{
  "version": 3,
  "sources": ["../../../node_modules/@rails/actioncable/src/adapters.js", "../../../node_modules/@rails/actioncable/src/logger.js", "../../../node_modules/@rails/actioncable/src/connection_monitor.js", "../../../node_modules/@rails/actioncable/src/internal.js", "../../../node_modules/@rails/actioncable/src/connection.js", "../../../node_modules/@rails/actioncable/src/subscription.js", "../../../node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../node_modules/@rails/actioncable/src/subscriptions.js", "../../../node_modules/@rails/actioncable/src/consumer.js", "../../../node_modules/@rails/actioncable/src/index.js", "../../../node_modules/dot/doT.js", "../../../node_modules/debounce/index.js", "../../../node_modules/@uppy/utils/lib/Translator.js", "../../../node_modules/@uppy/core/lib/BasePlugin.js", "../../../node_modules/@uppy/utils/lib/getTimeStamp.js", "../../../node_modules/@uppy/core/lib/loggers.js", "../../../node_modules/@uppy/utils/lib/isDOMElement.js", "../../../node_modules/@uppy/utils/lib/findDOMElement.js", "../../../node_modules/@uppy/utils/lib/getTextDirection.js", "../../../node_modules/preact/src/constants.js", "../../../node_modules/preact/src/util.js", "../../../node_modules/preact/src/options.js", "../../../node_modules/preact/src/create-element.js", "../../../node_modules/preact/src/component.js", "../../../node_modules/preact/src/diff/props.js", "../../../node_modules/preact/src/create-context.js", "../../../node_modules/preact/src/diff/children.js", "../../../node_modules/preact/src/diff/index.js", "../../../node_modules/preact/src/render.js", "../../../node_modules/preact/src/clone-element.js", "../../../node_modules/preact/src/diff/catch-error.js", "../../../node_modules/preact/hooks/src/index.js", "../../../node_modules/preact/compat/src/util.js", "../../../node_modules/preact/compat/src/hooks.js", "../../../node_modules/preact/compat/src/PureComponent.js", "../../../node_modules/preact/compat/src/memo.js", "../../../node_modules/preact/compat/src/forwardRef.js", "../../../node_modules/preact/compat/src/Children.js", "../../../node_modules/preact/compat/src/suspense.js", "../../../node_modules/preact/compat/src/suspense-list.js", "../../../node_modules/preact/src/constants.js", "../../../node_modules/preact/compat/src/portals.js", "../../../node_modules/preact/compat/src/render.js", "../../../node_modules/preact/compat/src/index.js", "../../../node_modules/@uppy/core/lib/UIPlugin.js", "../../../node_modules/@uppy/store-default/package.json", "../../../node_modules/@uppy/store-default/lib/index.js", "../../../node_modules/@uppy/utils/lib/getFileNameAndExtension.js", "../../../node_modules/@uppy/utils/lib/mimeTypes.js", "../../../node_modules/@uppy/utils/lib/getFileType.js", "../../../node_modules/@uppy/utils/lib/generateFileID.js", "../../../node_modules/lodash/isObject.js", "../../../node_modules/lodash/_freeGlobal.js", "../../../node_modules/lodash/_root.js", "../../../node_modules/lodash/now.js", "../../../node_modules/lodash/_trimmedEndIndex.js", "../../../node_modules/lodash/_baseTrim.js", "../../../node_modules/lodash/_Symbol.js", "../../../node_modules/lodash/_getRawTag.js", "../../../node_modules/lodash/_objectToString.js", "../../../node_modules/lodash/_baseGetTag.js", "../../../node_modules/lodash/isObjectLike.js", "../../../node_modules/lodash/isSymbol.js", "../../../node_modules/lodash/toNumber.js", "../../../node_modules/lodash/debounce.js", "../../../node_modules/lodash/throttle.js", "../../../node_modules/namespace-emitter/index.js", "../../../node_modules/nanoid/non-secure/index.js", "../../../node_modules/@uppy/core/package.json", "../../../node_modules/@uppy/core/lib/getFileName.js", "../../../node_modules/@uppy/core/lib/locale.js", "../../../node_modules/@transloadit/prettier-bytes/src/prettierBytes.ts", "../../../node_modules/wildcard/index.js", "../../../node_modules/mime-match/index.js", "../../../node_modules/@uppy/core/lib/Restricter.js", "../../../node_modules/@uppy/core/lib/supportsUploadProgress.js", "../../../node_modules/@uppy/core/lib/Uppy.js", "../../../node_modules/@uppy/core/lib/index.js", "../../../node_modules/classnames/index.js", "../../../node_modules/@uppy/utils/lib/isDragDropSupported.js", "../../../node_modules/@uppy/utils/lib/toArray.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/fallbackApi.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/index.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/index.js", "../../javascript/components/uppy/tut-drag-drop/index.js", "../../../node_modules/mediaelement/build/mediaelement-and-player.js", "../../../node_modules/mediaelement/full.js", "../../../node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js", "../../../node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js", "../../javascript/channels/index.js", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/controllers/alphabetic_sort_toggle_controller.js", "../../javascript/controllers/application.js", "../../javascript/controllers/assignment_controller.js", "../../../node_modules/async-pick/src/async-pick/async-pick-markup.js", "../../../node_modules/async-pick/src/async-pick/i18n/de.js", "../../../node_modules/async-pick/src/async-pick/i18n/en.js", "../../../node_modules/async-pick/src/async-pick/i18n/es.js", "../../../node_modules/async-pick/src/async-pick/i18n/fr.js", "../../../node_modules/async-pick/src/async-pick.js", "../../javascript/controllers/async_pick_controller.js", "../../../node_modules/@popperjs/core/lib/index.js", "../../../node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/@popperjs/core/lib/popper-lite.js", "../../../node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/bootstrap/js/src/dom/data.js", "../../../node_modules/bootstrap/js/src/util/index.js", "../../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../../node_modules/bootstrap/js/src/util/config.js", "../../../node_modules/bootstrap/js/src/base-component.js", "../../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../../node_modules/bootstrap/js/src/util/component-functions.js", "../../../node_modules/bootstrap/js/src/alert.js", "../../../node_modules/bootstrap/js/src/button.js", "../../../node_modules/bootstrap/js/src/util/swipe.js", "../../../node_modules/bootstrap/js/src/carousel.js", "../../../node_modules/bootstrap/js/src/collapse.js", "../../../node_modules/bootstrap/js/src/dropdown.js", "../../../node_modules/bootstrap/js/src/util/backdrop.js", "../../../node_modules/bootstrap/js/src/util/focustrap.js", "../../../node_modules/bootstrap/js/src/util/scrollbar.js", "../../../node_modules/bootstrap/js/src/modal.js", "../../../node_modules/bootstrap/js/src/offcanvas.js", "../../../node_modules/bootstrap/js/src/util/sanitizer.js", "../../../node_modules/bootstrap/js/src/util/template-factory.js", "../../../node_modules/bootstrap/js/src/tooltip.js", "../../../node_modules/bootstrap/js/src/popover.js", "../../../node_modules/bootstrap/js/src/scrollspy.js", "../../../node_modules/bootstrap/js/src/tab.js", "../../../node_modules/bootstrap/js/src/toast.js", "../../javascript/controllers/auto_redirect_controller.js", "../../javascript/controllers/autosave_controller.js", "../../../node_modules/chart.js/dist/chunks/helpers.segment.mjs", "../../../node_modules/chart.js/dist/chart.mjs", "../../../node_modules/chart.js/auto/auto.mjs", "../../../node_modules/stimulus-chartjs/dist/stimulus-chartjs.es.js", "../../javascript/controllers/chartjs_controller.js", "../../../node_modules/stimulus-checkbox-select-all/dist/stimulus-checkbox-select-all.mjs", "../../javascript/controllers/checkbox_select_all_controller.js", "../../javascript/controllers/checkbox_to_form_controller.js", "../../javascript/controllers/clipboard_controller.js", "../../javascript/controllers/collapse_all_controller.js", "../../javascript/controllers/collapse_aria_label_controller.js", "../../javascript/controllers/collapse_controller.js", "../../javascript/controllers/countdown_controller.js", "../../javascript/controllers/datatable_controller.js", "../../javascript/controllers/direct_upload_controller.js", "../../../node_modules/@uppy/xhr-upload/lib/index.js", "../../../node_modules/@uppy/core/lib/EventManager.js", "../../../node_modules/@uppy/utils/lib/NetworkError.js", "../../../node_modules/@uppy/utils/lib/ProgressTimeout.js", "../../../node_modules/@uppy/utils/lib/fetcher.js", "../../../node_modules/@uppy/utils/lib/fileFilters.js", "../../../node_modules/@uppy/utils/lib/getAllowedMetaFields.js", "../../../node_modules/@uppy/utils/lib/isNetworkError.js", "../../../node_modules/@uppy/utils/lib/RateLimitedQueue.js", "../../../node_modules/@uppy/xhr-upload/package.json", "../../../node_modules/@uppy/xhr-upload/lib/locale.js", "../../../node_modules/@uppy/status-bar/lib/StatusBar.js", "../../../node_modules/@uppy/utils/lib/emaFilter.js", "../../../node_modules/@uppy/status-bar/package.json", "../../../node_modules/@uppy/status-bar/lib/locale.js", "../../../node_modules/@uppy/status-bar/lib/StatusBarStates.js", "../../../node_modules/preact/jsx-runtime/src/utils.js", "../../../node_modules/preact/src/constants.js", "../../../node_modules/preact/jsx-runtime/src/index.js", "../../../node_modules/@uppy/status-bar/lib/StatusBarUI.js", "../../../node_modules/@uppy/status-bar/lib/Components.js", "../../../node_modules/@uppy/utils/lib/secondsToTime.js", "../../../node_modules/@uppy/utils/lib/prettyETA.js", "../../../node_modules/@uppy/status-bar/lib/calculateProcessingProgress.js", "../../javascript/components/uppy/locales/de_DE.js", "../../javascript/components/uppy/locales/en_US.js", "../../javascript/components/uppy/locales/es_ES.js", "../../javascript/components/uppy/locales/fr_FR.js", "../../javascript/components/utility/toast.js", "../../javascript/controllers/display_with_button_controller.js", "../../javascript/controllers/display_with_radio_button_controller.js", "../../../node_modules/sortablejs/modular/sortable.esm.js", "../../javascript/controllers/drag_drop_controller.js", "../../javascript/controllers/dropdown_controller.js", "../../../node_modules/es-toolkit/dist/compat/predicate/isArray.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs", "../../../node_modules/es-toolkit/dist/compat/util/eq.mjs", "../../../node_modules/es-toolkit/dist/function/noop.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs", "../../../node_modules/es-toolkit/dist/_internal/globalThis.mjs", "../../../node_modules/es-toolkit/dist/predicate/isBuffer.mjs", "../../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs", "../../../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs", "../../../node_modules/es-toolkit/dist/predicate/isEqual.mjs", "../../../node_modules/es-toolkit/dist/predicate/isLength.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toString.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/toKey.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toPath.mjs", "../../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs", "../../../node_modules/es-toolkit/dist/compat/object/get.mjs", "../../../node_modules/es-toolkit/dist/compat/object/property.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isObject.mjs", "../../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isMatchWith.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs", "../../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs", "../../../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs", "../../../node_modules/es-toolkit/dist/object/cloneDeep.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/matches.mjs", "../../../node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs", "../../../node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs", "../../../node_modules/es-toolkit/dist/compat/object/has.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/matchesProperty.mjs", "../../../node_modules/es-toolkit/dist/function/identity.mjs", "../../../node_modules/es-toolkit/dist/compat/util/iteratee.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toNumber.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toFinite.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toInteger.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isString.mjs", "../../../node_modules/es-toolkit/dist/compat/function/identity.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isKey.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs", "../../../node_modules/es-toolkit/dist/compat/util/times.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs", "../../../node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.mjs", "../../../node_modules/es-toolkit/dist/compat/object/updateWith.mjs", "../../../node_modules/es-toolkit/dist/compat/object/set.mjs", "../../../node_modules/es-toolkit/dist/function/debounce.mjs", "../../../node_modules/es-toolkit/dist/compat/function/debounce.mjs", "../../../node_modules/es-toolkit/dist/compat/function/throttle.mjs", "../../../node_modules/es-toolkit/dist/compat/object/keysIn.mjs", "../../../node_modules/es-toolkit/dist/compat/object/assignIn.mjs", "../../../node_modules/es-toolkit/dist/compat/object/clone.mjs", "../../../node_modules/es-toolkit/dist/object/mapValues.mjs", "../../../node_modules/es-toolkit/dist/compat/object/mapValues.mjs", "../../../node_modules/es-toolkit/dist/object/clone.mjs", "../../../node_modules/es-toolkit/dist/compat/object/mergeWith.mjs", "../../../node_modules/es-toolkit/dist/compat/object/merge.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isFunction.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isElement.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isEmpty.mjs", "../../../node_modules/es-toolkit/dist/function/after.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isEqualWith.mjs", "../../../node_modules/es-toolkit/dist/string/escapeRegExp.mjs", "../../../node_modules/es-toolkit/dist/compat/string/escapeRegExp.mjs", "../../../node_modules/es-toolkit/dist/string/upperFirst.mjs", "../../../node_modules/es-toolkit/dist/compat/string/upperFirst.mjs", "../../../node_modules/@ckeditor/ckeditor5-utils/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/global.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/env.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/fastdiff.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/diff.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/difftochanges.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/areconnectedthroughproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/spy.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/eventinfo.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/uid.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/priorities.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/inserttopriorityarray.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/ckeditorerror.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/version.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/observablemixin.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/elementreplacer.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/abortabledebounce.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/count.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/comparearrays.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/isiterable.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/createelement.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/config.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isnode.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/iswindow.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/emittermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/findclosestscrollableancestor.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getancestors.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getdatafromelement.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getborderwidths.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getrangefrommouseevent.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getcommonancestor.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getpositionedancestor.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/istext.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isrange.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/rect.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/resizeobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/setdatainelement.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/tounit.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/indexof.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/insertat.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/iscomment.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isvalidattributename.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isvisible.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/position.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/remove.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getvisualviewportoffset.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/scroll.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/keyboard.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/language.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/toarray.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/translation-service.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/locale.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/collection.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/first.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/nth.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/focustracker.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/keystrokehandler.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/objecttomap.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/tomap.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/mapsequal.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/wait.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/retry.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/splicearray.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/delay.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/parsebase64encodedobject.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/crc32.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/collectstylesheets.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/formathtml.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/unicode.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/decodelicensekey.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/isfeatureblockedbylicensekey.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/parsedimensionwithunit.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/placeholder.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/typecheckable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/node.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/text.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/textproxy.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/viewconsumable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/matcher.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/stylesmap.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/tokenlist.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/element.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/containerelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/editableelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/rooteditableelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/treewalker.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/position.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/range.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/selection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/documentselection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/document.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/attributeelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/emptyelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/uielement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/rawelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/documentfragment.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/downcastwriter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/filler.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/renderer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/domconverter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/observer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/domeventdata.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/domeventobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/keyobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/fakeselectionobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/mutationobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/focusobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/selectionobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/compositionobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/datatransfer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/inputobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/arrowkeysobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/tabobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/view.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/typecheckable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/textproxy.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/treewalker.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/position.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/range.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/mapper.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/modelconsumable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/comparemarkers.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/downcastdispatcher.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/node.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/selection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/liverange.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/text.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/documentselection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/nodelist.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/element.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/conversionhelpers.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/downcasthelpers.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/autoparagraphing.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/upcasthelpers.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/controller/editingcontroller.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/schema.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/upcastdispatcher.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dataprocessor/basichtmlwriter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/controller/datacontroller.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/conversion.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dataprocessor/xmldataprocessor.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/operation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/moveoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/insertoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/splitoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/mergeoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/markeroperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/attributeoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/nooperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/renameoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/rootattributeoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/rootoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/operationfactory.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/transform.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/liveposition.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/batch.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/differ.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/history.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/rootelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/document.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/markercollection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/detachoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/documentfragment.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/writer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/selection-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/deletecontent.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/getselectedcontent.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/insertcontent.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/insertobject.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/modifyselection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/model.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/clickobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/mouseobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/touchobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/pointerobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/upcastwriter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/background.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/border.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/margin.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/padding.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/view.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/model.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/operationreplayer.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/watchdog.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/utils/getsubnodes.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/utils/areconnectedthroughproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/utils/normalizerootsconfig.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/editorwatchdog.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/contextwatchdog.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/actionsrecorder.ts", "../../../node_modules/@ckeditor/ckeditor5-core/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-core/src/plugin.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/command.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/multicommand.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/commandcollection.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/plugincollection.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/context.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/contextplugin.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editingkeystrokehandler.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/accessibility.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/editorusagedata.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/editor.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/attachtoform.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/elementapimixin.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/securesourceelement.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/registerandinitializerootconfigattributes.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/normalizerootsconfig.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/verifyrootelements.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/rootacceptsblocks.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/pendingactions.ts", "../../../node_modules/@ckeditor/ckeditor5-icons/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/accessibility.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/add-comment.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-adjust-length.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-ask-ai.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-author.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-change-tone.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-chat-commands.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-continue-writing.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-grammar-check.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-improve-writing.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-other.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-quick-actions.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-review.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-translate.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-chat.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ai-history.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/align-bottom.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/align-center.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/align-justify.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/align-left.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/align-middle.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/align-right.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/align-top.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/arrow-down.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/arrow-up.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/bold.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/bookmark-inline.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/bookmark.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/bookmark-medium.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/bookmark-small.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/box-with-check.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/box-with-cross.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/box-with-marker.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/browse-files.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/bulb.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/bulleted-list.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/cancel.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/caption.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/case-change.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/check.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/chevron-down.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/chevron-up.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/chevron-right.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/ckbox-image-edit.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/close.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/code-block.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/code.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/cog.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/color-palette.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/color-tile-check.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/comments-archive.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/content-lock.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/content-unlock.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/copy.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/document.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/document-with-checkmark.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/document-with-cross.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/document-with-loupe.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/document-outline.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/document-outline-toggle.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/drag-handle.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/drag-indicator.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/dropbox.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/dropdown-arrow.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/edit-comment.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/emoji.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/eraser.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/error.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/export-pdf.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/export-word.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/eye.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/eye-crossed-out.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/facebook.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/file-upload.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/find-replace.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/font-background.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/font-color.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/font-family.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/font-size.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/footnote.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/fullscreen-enter.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/fullscreen-leave.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/google-drive.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/google-photos.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/heading1.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/heading2.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/heading3.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/heading4.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/heading5.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/heading6.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/history.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/horizontal-line.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/html.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/image-asset-manager.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/image.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/image-upload.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/image-url.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/import-export.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/import-word.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/indent.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/info.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/insert-merge-field.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/italic.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/legal-style-list.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/line-height.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/link.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-circle.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-decimal-leading-zero.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-decimal.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-disc.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-lower-latin.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-lower-roman.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-square.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-upper-latin.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-upper-roman.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/list-style-arabic-indic.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/local.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/loupe.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/low-vision.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/magic-wand.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/marker.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/maximize.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/media-placeholder.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/media.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/minimize.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/multi-level-list.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/next-arrow.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/notification.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/numbered-list.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-center.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-full-width.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-inline-left.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-inline-right.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-inline.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-left.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-right.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-size-custom.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-size-full.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-size-large.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-size-medium.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/object-size-small.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/onedrive.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/outdated.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/outdent.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/page-break.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/pagination-example.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/paint-roller-cursor-default.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/paint-roller-cursor-text.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/paint-roller.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/paper-clip.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/paragraph.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/pencil.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/pen.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/pilcrow.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/play.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/plus.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/preview-merge-fields.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/previous-arrow.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/print.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/project-logo.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/quote.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/redo.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/refresh.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/remove-comment.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/remove-format.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/remove.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/return-arrow.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/revision-history.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/robot-pencil.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/select-all.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/selection.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/settings.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/show-blocks.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/show-changes-off.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/show-changes-on.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/source.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/sparkle.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/special-characters.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/stop.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/strikethrough.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/submit.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/subscript.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/superscript.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table-cell-properties.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table-column.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table-merge-cell.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table-of-contents.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table-properties.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table-row.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/table-layout.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/template-generic.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/template.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/text-alternative.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/text.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/three-horizontal-dots.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/three-stars.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/three-vertical-dots.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/thumb-up.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/thumb-down.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/todo-list.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/track-changes-accept.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/track-changes-discard.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/track-changes.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/underline.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/undo.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/unlink.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/uploadcare-image-edit.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/uploadcare-image-upload.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/uploadcare-link.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/user.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/pin.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/warning.svg", "../../../node_modules/@ckeditor/ckeditor5-icons/theme/icons/web.svg", "../../../node_modules/color-name/index.js", "../../../node_modules/color-parse/index.js", "../../../node_modules/color-convert/conversions.js", "../../../node_modules/color-convert/route.js", "../../../node_modules/color-convert/index.js", "../../../node_modules/vanilla-colorful/src/lib/utils/math.ts", "../../../node_modules/vanilla-colorful/src/lib/utils/convert.ts", "../../../node_modules/vanilla-colorful/src/lib/utils/compare.ts", "../../../node_modules/vanilla-colorful/src/lib/utils/dom.ts", "../../../node_modules/vanilla-colorful/src/lib/components/slider.ts", "../../../node_modules/vanilla-colorful/src/lib/components/hue.ts", "../../../node_modules/vanilla-colorful/src/lib/components/saturation.ts", "../../../node_modules/vanilla-colorful/src/lib/styles/color-picker.ts", "../../../node_modules/vanilla-colorful/src/lib/styles/hue.ts", "../../../node_modules/vanilla-colorful/src/lib/styles/saturation.ts", "../../../node_modules/vanilla-colorful/src/lib/components/color-picker.ts", "../../../node_modules/vanilla-colorful/src/lib/entrypoints/hex.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-ui/src/viewcollection.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/template.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/view.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/arialiveannouncer.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/csstransitiondisablermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/draggableviewmixin.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/submithandler.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/addkeyboardhandlingforgrid.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/label/labelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/accessibilityhelp/accessibilityhelpcontentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/icon/iconview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/buttonlabelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/buttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/formheader/formheaderview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/focuscycler.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialogactionsview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialogcontentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialogview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialog.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/listitembuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistitembuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/accessibilityhelp/accessibilityhelp.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/bodycollection.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/badge/badge.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/poweredby.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/switchbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/filedialogbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/collapsible/collapsibleview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/colortileview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/colorgridview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorpicker/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/labeledfield/labeledfieldview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/input/inputbase.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/input/inputview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/inputtext/inputtextview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/inputnumber/inputnumberview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/textarea/textareaview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/dropdownpanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/dropdownview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenulistitembuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenubuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listseparatorview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listitemgroupview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenulistview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenulistitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenubehaviors.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenunestedmenupanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenunestedmenuview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenurootlistview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/toolbarseparatorview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/toolbarlinebreakview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/preventdefault.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/normalizetoolbarconfig.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/toolbarview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/button/splitbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/labeledfield/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorpicker/colorpickerview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/documentcolorcollection.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/colorgridsfragmentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/colorpickerfragmentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/colorselectorview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/componentfactory.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/tooltipmanager.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/evaluationbadge.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/editorui.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/editoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/boxed/boxededitoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editableui/editableuiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/formrow/formrowview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/iframe/iframeview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/labeledinput/labeledinputview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/filtergroupanditemnames.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/notification/notification.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/model.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/panel/sticky/stickypanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/text/searchtextqueryview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/searchinfoview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/searchresultsview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/text/searchtextview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/autocomplete/autocompleteview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/highlightedtext/highlightedtextview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/highlightedtext/buttonlabelwithhighlightview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/highlightedtext/labelwithhighlightview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/spinner/spinnerview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/balloon/balloontoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/block/blockbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/block/blocktoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenubuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenupanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenuview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistitemfiledialogbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarview.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-upload/src/filereader.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/src/filerepository.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/src/adapters/simpleuploadadapter.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignmentediting.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignmentui.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignment.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/changebuffer.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/inserttextcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/inserttextobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/input.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/deletecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/deleteobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/delete.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/typing.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/getlasttextline.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/textwatcher.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/twostepcaretmovement.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/texttransformation.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/findattributerange.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/inlinehighlight.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/attributecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/bold/boldediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/bold/boldui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/bold.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/code/codeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/code/codeui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/code.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/italic/italicediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/italic/italicui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/italic.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/strikethrough/strikethroughediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/strikethrough/strikethroughui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/strikethrough.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/subscript/subscriptediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/subscript/subscriptui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/subscript.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/superscript/superscriptediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/superscript/superscriptui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/superscript.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/underline/underlineediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/underline/underlineui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/underline.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-enter/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/entercommand.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/enterobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/enter.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/shiftentercommand.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/shiftenter.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-widget/src/highlightstack.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgettypearound/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgettypearound/widgettypearound.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/verticalnavigation.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widget.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgettoolbarrepository.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize/resizerstate.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize/sizeview.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize/resizer.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/utils/plaintexttohtml.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/utils/normalizeclipboarddata.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/utils/viewtoplaintext.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardmarkersutils.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardpipeline.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/lineview.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/dragdroptarget.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/dragdropblocktoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/dragdrop.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/pasteplaintext.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboard.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-undo/src/basecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undocommand.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/redocommand.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undoediting.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undoui.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undo.ts", "../../../node_modules/@ckeditor/ckeditor5-image/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageutils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/autoimage.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/imagetextalternativeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/ui/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/imagetextalternativeui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageloadobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/insertimagecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/replaceimagesourcecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagesizeattributes.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imagetypecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageplaceholder.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageblockediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/ui/imageinsertformview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/imageinsertui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageblock.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageinlineediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinline.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/imagecaptionutils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/toggleimagecaptioncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/imagecaptionediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/imagecaptionui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/imageuploadui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/imageuploadprogress.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/uploadimagecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/imageuploadediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/ui/imageinserturlview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/imageinsertviaurlui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsertviaurl.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/resizeimagecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imageresizeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imageresizebuttons.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imageresizehandles.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/utils/getselectedimageeditornodes.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/utils/getselectedimagewidthinunits.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/ui/imagecustomresizeformview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/utils/getselectedimagepossibleresizerange.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imagecustomresizeui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/imagestylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/imagestyleediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/imagestyleui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/pictureediting.ts", "../../../node_modules/@ckeditor/ckeditor5-link/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-link/src/utils/automaticdecorators.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/utils/conflictingdecorators.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/unlinkcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/utils/manualdecorator.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkediting.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkpreviewbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkformview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkprovideritemsview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkpropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkui.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/autolink.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/link.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkimageediting.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkimageui.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkimage.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/indentcodeblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/outdentcodeblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblockediting.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblockui.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblock.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/src/classiceditorui.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/src/classiceditoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/src/classiceditor.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mentioncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mentionediting.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/ui/mentionsview.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/ui/domwrapperview.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/ui/mentionlistitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mentionui.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mention.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectallcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectallediting.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectallui.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectall.ts", "../../../node_modules/@ckeditor/ckeditor5-essentials/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-essentials/src/essentials.ts", "../../../node_modules/@ckeditor/ckeditor5-font/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/fontfamilycommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/fontfamilyediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/fontfamilyui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/fontsizecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/fontsizeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/fontsizeui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor/fontcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor/fontcolorediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/ui/colorui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor/fontcolorui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/font.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/paragraphcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/insertparagraphcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/paragraph.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/paragraphbuttonui.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingediting.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingui.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/heading.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingbuttonsui.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/title.ts", "../../../node_modules/@ckeditor/ckeditor5-list/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/listwalker.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/model.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listindentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listmergecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listsplitcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemboldintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemitalicintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemfontsizeintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemfontcolorintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemfontfamilyintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/view.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/postfixers.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listui.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/liststartcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/utils/style.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/liststylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listreversedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listpropertiesutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/utils/config.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listpropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/ui/listpropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listpropertiesui.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/checktodolistcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/todocheckboxchangeobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/todolistediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/todolistui.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacylistcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacyindentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacyutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacylistutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacyconverters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacylistediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacyliststylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacylistreversedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacyliststartcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacylistpropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist/legacychecktodolistcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist/legacytodolistconverters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist/legacytodolistediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/adjacentlistssupport.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentediting.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentui.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indent.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentcommandbehavior/indentusingoffset.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentcommandbehavior/indentusingclasses.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/integrations/indentblocklistcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/integrations/indentblocklistitemcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentcommandbehavior/resetindentusingoffset.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentcommandbehavior/resetindentusingclasses.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/integrations/indentblocklistintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentblock.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaregistry.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedediting.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/automediaembed.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/ui/mediaformview.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedui.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembed.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedstyle/constants.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedstyle/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedtoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/resizemediaembedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/constants.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/mediaembedresizeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/mediaembedresizehandles.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/mediaembedresizebuttons.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/utils/getselectedmediaembededitornodes.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/utils/getselectedmediaembedwidthinunits.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/utils/getselectedmediaembedpossibleresizerange.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/ui/mediaembedcustomresizeformview.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize/mediaembedcustomresizeui.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedresize.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedstyle/mediaembedstylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedstyle/mediaembedstyleediting.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedstyle/mediaembedstyleui.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedstyle.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/bookmark.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/list.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/image.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removemsattributes.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/table.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removeinvalidtablewidth.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/replacemsfootnotes.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/normalizers/mswordnormalizer.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removeboldwrapper.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/br.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/replacetabswithinprewithspaces.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/normalizers/googledocsnormalizer.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removexmlns.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removegooglesheetstag.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removestyleblock.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/normalizers/googlesheetsnormalizer.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/space.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/parse.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformatui.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformatcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformatediting.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformat.ts", "../../../node_modules/@ckeditor/ckeditor5-table/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/tableproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablewalker.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/tablecellpropertiesutils.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/common.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/structure.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/upcasttable.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/constants.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableutils.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/table-properties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/downcast.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/inserttablecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/insertrowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/insertcolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/splitcellcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/mergecellcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/removerowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/removecolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/setheaderrowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/setfooterrowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/setheadercolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/mergecellscommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/selectrowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/selectcolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-layout-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-cell-paragraph-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-structure-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-structure-refresh-handler.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-cell-refresh-handler.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/ui/inserttableview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableselection.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableclipboard.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablekeyboard.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablemouse/mouseeventsobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablemouse.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/table.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/plaintableoutput.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/ui/widget.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tabletoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/ui/colorinputview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/ui/table-properties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/ui/contextualballoon.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellwidth/commands/tablecellwidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellwidth/tablecellwidthediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellpaddingcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellheightcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellverticalalignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellborderstylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellbordercolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellborderwidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecelltypecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout/tablelayoutui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/inserttablelayoutcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/tablewidthscommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/commands/tablecolumnwidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/tablecolumnresizeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout/commands/tabletypecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout/tablelayoutediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablepropertycommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablebackgroundcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablebordercolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tableborderstylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tableborderwidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablewidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tableheightcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablealignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/tablepropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/ui/tablepropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/tablepropertiesui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-caption-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/toggletablecaptioncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/tablecaptionediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/tablecaptionui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablescroll/watchers.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablescroll/tablescrollediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablescroll.ts", "../../../node_modules/@ckeditor/ckeditor5-word-count/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-word-count/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-word-count/src/wordcount.ts", "../../../node_modules/ckeditor5/dist/translations/de.js", "../../../node_modules/ckeditor5/dist/translations/es.js", "../../../node_modules/ckeditor5/dist/translations/fr.js", "../../javascript/controllers/editor_controller.js", "../../javascript/components/ckeditor/plugins/tutorize_media_file_embed.js", "../../javascript/components/ckeditor/plugins/tutorize_media_upload_ui.js", "../../javascript/components/ckeditor/plugins/tutorize_media_upload.js", "../../javascript/components/ckeditor/plugins/tutorize_upload_adapter_plugin.js", "../../javascript/components/ckeditor/mentions.js", "../../javascript/controllers/editor_media_file_embed_controller.js", "../../../node_modules/mediaelement/build/lang/de.js", "../../../node_modules/mediaelement/build/lang/fr.js", "../../../node_modules/mediaelement/build/lang/es.js", "../../../node_modules/mediaelement/build/renderers/vimeo.js", "../../javascript/components/utility/media_element_speed.js", "../../javascript/controllers/element_statistics_controller.js", "../../javascript/controllers/user_profile_controller.js", "../../javascript/components/utility/dom_parser_support.js", "../../javascript/components/utility/support_checker.js", "../../javascript/components/utility/load_scripts.js", "../../javascript/components/utility/handle_unauthorized.js", "../../javascript/controllers/fetch_html_controller.js", "../../javascript/controllers/filterable_controller.js", "../../javascript/controllers/form_leave_controller.js", "../../javascript/controllers/heartbeat_controller.js", "../../javascript/controllers/infinite_scroll_controller.js", "../../javascript/controllers/leave_page_controller.js", "../../javascript/controllers/lock_timeout_controller.js", "../../javascript/controllers/media_element_controller.js", "../../javascript/controllers/modal_controller.js", "../../javascript/controllers/modal_link_controller.js", "../../javascript/controllers/nav_tabs_scrollable_controller.js", "../../../node_modules/stimulus-rails-nested-form/dist/stimulus-rails-nested-form.mjs", "../../javascript/controllers/nested_form_controller.js", "../../javascript/controllers/no_paste_controller.js", "../../javascript/controllers/notification_controller.js", "../../javascript/controllers/password_show_toggle_controller.js", "../../javascript/controllers/per_page_dropdown_controller.js", "../../javascript/controllers/pdf_summary_confirmation_controller.js", "../../javascript/controllers/popover_controller.js", "../../javascript/controllers/radio_check_controller.js", "../../../node_modules/readmore-js/dist/readmore.es6.js", "../../javascript/controllers/readmore_controller.js", "../../javascript/controllers/refresh_csrf_token_controller.js", "../../javascript/controllers/resizable_chat_controller.js", "../../javascript/controllers/resize_controller.js", "../../javascript/controllers/resource_lock_channel_controller.js", "../../javascript/controllers/session_timeout_controller.js", "../../javascript/controllers/sidebar_toggle_controller.js", "../../javascript/controllers/submit_on_enter_controller.js", "../../javascript/controllers/submit_other_form_controller.js", "../../javascript/controllers/sum_point_controller.js", "../../../node_modules/sync-pick/src/sync-pick/sync-pick-markup.js", "../../../node_modules/sync-pick/src/sync-pick/i18n/en.js", "../../../node_modules/sync-pick/src/sync-pick/i18n/de.js", "../../../node_modules/sync-pick/src/sync-pick/i18n/es.js", "../../../node_modules/sync-pick/src/sync-pick/i18n/fr.js", "../../../node_modules/sync-pick/src/sync-pick.js", "../../javascript/controllers/sync_pick_controller.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/constants.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/helpers.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/defaults.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/dropdown.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/suggestions.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/persist.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/texts.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/templates.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/events.js", "../../../node_modules/@yaireo/tagify/dist/src/tagify.js", "../../../node_modules/@yaireo/tagify/dist/src/parts/EventDispatcher.js", "../../javascript/controllers/tag_input_controller.js", "../../javascript/controllers/tasks_widget_checkbox_controller.js", "../../javascript/controllers/toast_controller.js", "../../javascript/controllers/toggle_controller.js", "../../javascript/controllers/toggle_radio_group_controller.js", "../../javascript/controllers/tutorial_series_course_controller.js", "../../javascript/controllers/tutorial_time_settings_controller.js", "../../../node_modules/stimulus-autocomplete/src/autocomplete.js", "../../javascript/controllers/typeahead_controller.js", "../../javascript/controllers/validation_controller.js", "../../javascript/controllers/index.js", "../../../node_modules/@fortawesome/fontawesome-svg-core/index.mjs", "../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs", "../../../node_modules/@fortawesome/free-regular-svg-icons/index.mjs", "../../../node_modules/@fortawesome/free-brands-svg-icons/index.mjs", "../../javascript/components/font_awesome/index.js", "../../javascript/components/utility/print_iframe.js", "../../javascript/components/utility/a11y_focus_helpers.js", "../../javascript/components/utility/a11y_validation_announcer.js", "../../javascript/components/utility/a11y_submit_announcer.js", "../../javascript/application.js"],
  "sourcesContent": ["export default {\n  logger: typeof console !== \"undefined\" ? console : undefined,\n  WebSocket: typeof WebSocket !== \"undefined\" ? WebSocket : undefined,\n}\n", "import adapters from \"./adapters\"\n\n// The logger is disabled by default. You can enable it with:\n//\n//   ActionCable.logger.enabled = true\n//\n//   Example:\n//\n//   import * as ActionCable from '@rails/actioncable'\n//\n//   ActionCable.logger.enabled = true\n//   ActionCable.logger.log('Connection Established.')\n//\n\nexport default {\n  log(...messages) {\n    if (this.enabled) {\n      messages.push(Date.now())\n      adapters.logger.log(\"[ActionCable]\", ...messages)\n    }\n  },\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring the cable connection is in good health by validating the heartbeat pings sent from the server, and attempting\n// revival reconnections if things go astray. Internal class, not intended for direct user manipulation.\n\nconst now = () => new Date().getTime()\n\nconst secondsSince = time => (now() - time) / 1000\n\nclass ConnectionMonitor {\n  constructor(connection) {\n    this.visibilityDidChange = this.visibilityDidChange.bind(this)\n    this.connection = connection\n    this.reconnectAttempts = 0\n  }\n\n  start() {\n    if (!this.isRunning()) {\n      this.startedAt = now()\n      delete this.stoppedAt\n      this.startPolling()\n      addEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`)\n    }\n  }\n\n  stop() {\n    if (this.isRunning()) {\n      this.stoppedAt = now()\n      this.stopPolling()\n      removeEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(\"ConnectionMonitor stopped\")\n    }\n  }\n\n  isRunning() {\n    return this.startedAt && !this.stoppedAt\n  }\n\n  recordMessage() {\n    this.pingedAt = now()\n  }\n\n  recordConnect() {\n    this.reconnectAttempts = 0\n    delete this.disconnectedAt\n    logger.log(\"ConnectionMonitor recorded connect\")\n  }\n\n  recordDisconnect() {\n    this.disconnectedAt = now()\n    logger.log(\"ConnectionMonitor recorded disconnect\")\n  }\n\n  // Private\n\n  startPolling() {\n    this.stopPolling()\n    this.poll()\n  }\n\n  stopPolling() {\n    clearTimeout(this.pollTimeout)\n  }\n\n  poll() {\n    this.pollTimeout = setTimeout(() => {\n      this.reconnectIfStale()\n      this.poll()\n    }\n    , this.getPollInterval())\n  }\n\n  getPollInterval() {\n    const { staleThreshold, reconnectionBackoffRate } = this.constructor\n    const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10))\n    const jitterMax = this.reconnectAttempts === 0 ? 1.0 : reconnectionBackoffRate\n    const jitter = jitterMax * Math.random()\n    return staleThreshold * 1000 * backoff * (1 + jitter)\n  }\n\n  reconnectIfStale() {\n    if (this.connectionIsStale()) {\n      logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`)\n      this.reconnectAttempts++\n      if (this.disconnectedRecently()) {\n        logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`)\n      } else {\n        logger.log(\"ConnectionMonitor reopening\")\n        this.connection.reopen()\n      }\n    }\n  }\n\n  get refreshedAt() {\n    return this.pingedAt ? this.pingedAt : this.startedAt\n  }\n\n  connectionIsStale() {\n    return secondsSince(this.refreshedAt) > this.constructor.staleThreshold\n  }\n\n  disconnectedRecently() {\n    return this.disconnectedAt && (secondsSince(this.disconnectedAt) < this.constructor.staleThreshold)\n  }\n\n  visibilityDidChange() {\n    if (document.visibilityState === \"visible\") {\n      setTimeout(() => {\n        if (this.connectionIsStale() || !this.connection.isOpen()) {\n          logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`)\n          this.connection.reopen()\n        }\n      }\n      , 200)\n    }\n  }\n\n}\n\nConnectionMonitor.staleThreshold = 6 // Server::Connections::BEAT_INTERVAL * 2 (missed two pings)\nConnectionMonitor.reconnectionBackoffRate = 0.15\n\nexport default ConnectionMonitor\n", "export default {\n  \"message_types\": {\n    \"welcome\": \"welcome\",\n    \"disconnect\": \"disconnect\",\n    \"ping\": \"ping\",\n    \"confirmation\": \"confirm_subscription\",\n    \"rejection\": \"reject_subscription\"\n  },\n  \"disconnect_reasons\": {\n    \"unauthorized\": \"unauthorized\",\n    \"invalid_request\": \"invalid_request\",\n    \"server_restart\": \"server_restart\",\n    \"remote\": \"remote\"\n  },\n  \"default_mount_path\": \"/cable\",\n  \"protocols\": [\n    \"actioncable-v1-json\",\n    \"actioncable-unsupported\"\n  ]\n}\n", "import adapters from \"./adapters\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\n\n// Encapsulate the cable connection held by the consumer. This is an internal class not intended for direct user manipulation.\n\nconst {message_types, protocols} = INTERNAL\nconst supportedProtocols = protocols.slice(0, protocols.length - 1)\n\nconst indexOf = [].indexOf\n\nclass Connection {\n  constructor(consumer) {\n    this.open = this.open.bind(this)\n    this.consumer = consumer\n    this.subscriptions = this.consumer.subscriptions\n    this.monitor = new ConnectionMonitor(this)\n    this.disconnected = true\n  }\n\n  send(data) {\n    if (this.isOpen()) {\n      this.webSocket.send(JSON.stringify(data))\n      return true\n    } else {\n      return false\n    }\n  }\n\n  open() {\n    if (this.isActive()) {\n      logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`)\n      return false\n    } else {\n      const socketProtocols = [...protocols, ...this.consumer.subprotocols || []]\n      logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${socketProtocols}`)\n      if (this.webSocket) { this.uninstallEventHandlers() }\n      this.webSocket = new adapters.WebSocket(this.consumer.url, socketProtocols)\n      this.installEventHandlers()\n      this.monitor.start()\n      return true\n    }\n  }\n\n  close({allowReconnect} = {allowReconnect: true}) {\n    if (!allowReconnect) { this.monitor.stop() }\n    // Avoid closing websockets in a \"connecting\" state due to Safari 15.1+ bug. See: https://github.com/rails/rails/issues/43835#issuecomment-1002288478\n    if (this.isOpen()) {\n      return this.webSocket.close()\n    }\n  }\n\n  reopen() {\n    logger.log(`Reopening WebSocket, current state is ${this.getState()}`)\n    if (this.isActive()) {\n      try {\n        return this.close()\n      } catch (error) {\n        logger.log(\"Failed to reopen WebSocket\", error)\n      }\n      finally {\n        logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`)\n        setTimeout(this.open, this.constructor.reopenDelay)\n      }\n    } else {\n      return this.open()\n    }\n  }\n\n  getProtocol() {\n    if (this.webSocket) {\n      return this.webSocket.protocol\n    }\n  }\n\n  isOpen() {\n    return this.isState(\"open\")\n  }\n\n  isActive() {\n    return this.isState(\"open\", \"connecting\")\n  }\n\n  triedToReconnect() {\n    return this.monitor.reconnectAttempts > 0\n  }\n\n  // Private\n\n  isProtocolSupported() {\n    return indexOf.call(supportedProtocols, this.getProtocol()) >= 0\n  }\n\n  isState(...states) {\n    return indexOf.call(states, this.getState()) >= 0\n  }\n\n  getState() {\n    if (this.webSocket) {\n      for (let state in adapters.WebSocket) {\n        if (adapters.WebSocket[state] === this.webSocket.readyState) {\n          return state.toLowerCase()\n        }\n      }\n    }\n    return null\n  }\n\n  installEventHandlers() {\n    for (let eventName in this.events) {\n      const handler = this.events[eventName].bind(this)\n      this.webSocket[`on${eventName}`] = handler\n    }\n  }\n\n  uninstallEventHandlers() {\n    for (let eventName in this.events) {\n      this.webSocket[`on${eventName}`] = function() {}\n    }\n  }\n\n}\n\nConnection.reopenDelay = 500\n\nConnection.prototype.events = {\n  message(event) {\n    if (!this.isProtocolSupported()) { return }\n    const {identifier, message, reason, reconnect, type} = JSON.parse(event.data)\n    this.monitor.recordMessage()\n    switch (type) {\n      case message_types.welcome:\n        if (this.triedToReconnect()) {\n          this.reconnectAttempted = true\n        }\n        this.monitor.recordConnect()\n        return this.subscriptions.reload()\n      case message_types.disconnect:\n        logger.log(`Disconnecting. Reason: ${reason}`)\n        return this.close({allowReconnect: reconnect})\n      case message_types.ping:\n        return null\n      case message_types.confirmation:\n        this.subscriptions.confirmSubscription(identifier)\n        if (this.reconnectAttempted) {\n          this.reconnectAttempted = false\n          return this.subscriptions.notify(identifier, \"connected\", {reconnected: true})\n        } else {\n          return this.subscriptions.notify(identifier, \"connected\", {reconnected: false})\n        }\n      case message_types.rejection:\n        return this.subscriptions.reject(identifier)\n      default:\n        return this.subscriptions.notify(identifier, \"received\", message)\n    }\n  },\n\n  open() {\n    logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`)\n    this.disconnected = false\n    if (!this.isProtocolSupported()) {\n      logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\")\n      return this.close({allowReconnect: false})\n    }\n  },\n\n  close(event) {\n    logger.log(\"WebSocket onclose event\")\n    if (this.disconnected) { return }\n    this.disconnected = true\n    this.monitor.recordDisconnect()\n    return this.subscriptions.notifyAll(\"disconnected\", {willAttemptReconnect: this.monitor.isRunning()})\n  },\n\n  error() {\n    logger.log(\"WebSocket onerror event\")\n  }\n}\n\nexport default Connection\n", "// A new subscription is created through the ActionCable.Subscriptions instance available on the consumer.\n// It provides a number of callbacks and a method for calling remote procedure calls on the corresponding\n// Channel instance on the server side.\n//\n// An example demonstrates the basic functionality:\n//\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\", {\n//     connected() {\n//       // Called once the subscription has been successfully completed\n//     },\n//\n//     disconnected({ willAttemptReconnect: boolean }) {\n//       // Called when the client has disconnected with the server.\n//       // The object will have an `willAttemptReconnect` property which\n//       // says whether the client has the intention of attempting\n//       // to reconnect.\n//     },\n//\n//     appear() {\n//       this.perform('appear', {appearing_on: this.appearingOn()})\n//     },\n//\n//     away() {\n//       this.perform('away')\n//     },\n//\n//     appearingOn() {\n//       $('main').data('appearing-on')\n//     }\n//   })\n//\n// The methods #appear and #away forward their intent to the remote AppearanceChannel instance on the server\n// by calling the `perform` method with the first parameter being the action (which maps to AppearanceChannel#appear/away).\n// The second parameter is a hash that'll get JSON encoded and made available on the server in the data parameter.\n//\n// This is how the server component would look:\n//\n//   class AppearanceChannel < ApplicationActionCable::Channel\n//     def subscribed\n//       current_user.appear\n//     end\n//\n//     def unsubscribed\n//       current_user.disappear\n//     end\n//\n//     def appear(data)\n//       current_user.appear on: data['appearing_on']\n//     end\n//\n//     def away\n//       current_user.away\n//     end\n//   end\n//\n// The \"AppearanceChannel\" name is automatically mapped between the client-side subscription creation and the server-side Ruby class name.\n// The AppearanceChannel#appear/away public methods are exposed automatically to client-side invocation through the perform method.\n\nconst extend = function(object, properties) {\n  if (properties != null) {\n    for (let key in properties) {\n      const value = properties[key]\n      object[key] = value\n    }\n  }\n  return object\n}\n\nexport default class Subscription {\n  constructor(consumer, params = {}, mixin) {\n    this.consumer = consumer\n    this.identifier = JSON.stringify(params)\n    extend(this, mixin)\n  }\n\n  // Perform a channel action with the optional data passed as an attribute\n  perform(action, data = {}) {\n    data.action = action\n    return this.send(data)\n  }\n\n  send(data) {\n    return this.consumer.send({command: \"message\", identifier: this.identifier, data: JSON.stringify(data)})\n  }\n\n  unsubscribe() {\n    return this.consumer.subscriptions.remove(this)\n  }\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring channel subscribe command is confirmed, retrying until confirmation is received.\n// Internal class, not intended for direct user manipulation.\n\nclass SubscriptionGuarantor {\n  constructor(subscriptions) {\n    this.subscriptions = subscriptions\n    this.pendingSubscriptions = []\n  }\n\n  guarantee(subscription) {\n    if(this.pendingSubscriptions.indexOf(subscription) == -1){ \n      logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`)\n      this.pendingSubscriptions.push(subscription) \n    }\n    else {\n      logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`)\n    }\n    this.startGuaranteeing()\n  }\n\n  forget(subscription) {\n    logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`)\n    this.pendingSubscriptions = (this.pendingSubscriptions.filter((s) => s !== subscription))\n  }\n\n  startGuaranteeing() {\n    this.stopGuaranteeing()\n    this.retrySubscribing()\n  }\n  \n  stopGuaranteeing() {\n    clearTimeout(this.retryTimeout)\n  }\n\n  retrySubscribing() {\n    this.retryTimeout = setTimeout(() => {\n      if (this.subscriptions && typeof(this.subscriptions.subscribe) === \"function\") {\n        this.pendingSubscriptions.map((subscription) => {\n          logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`)\n          this.subscriptions.subscribe(subscription)\n        })\n      }\n    }\n    , 500)\n  }\n}\n\nexport default SubscriptionGuarantor", "import Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport logger from \"./logger\"\n\n// Collection class for creating (and internally managing) channel subscriptions.\n// The only method intended to be triggered by the user is ActionCable.Subscriptions#create,\n// and it should be called through the consumer like so:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n\nexport default class Subscriptions {\n  constructor(consumer) {\n    this.consumer = consumer\n    this.guarantor = new SubscriptionGuarantor(this)\n    this.subscriptions = []\n  }\n\n  create(channelName, mixin) {\n    const channel = channelName\n    const params = typeof channel === \"object\" ? channel : {channel}\n    const subscription = new Subscription(this.consumer, params, mixin)\n    return this.add(subscription)\n  }\n\n  // Private\n\n  add(subscription) {\n    this.subscriptions.push(subscription)\n    this.consumer.ensureActiveConnection()\n    this.notify(subscription, \"initialized\")\n    this.subscribe(subscription)\n    return subscription\n  }\n\n  remove(subscription) {\n    this.forget(subscription)\n    if (!this.findAll(subscription.identifier).length) {\n      this.sendCommand(subscription, \"unsubscribe\")\n    }\n    return subscription\n  }\n\n  reject(identifier) {\n    return this.findAll(identifier).map((subscription) => {\n      this.forget(subscription)\n      this.notify(subscription, \"rejected\")\n      return subscription\n    })\n  }\n\n  forget(subscription) {\n    this.guarantor.forget(subscription)\n    this.subscriptions = (this.subscriptions.filter((s) => s !== subscription))\n    return subscription\n  }\n\n  findAll(identifier) {\n    return this.subscriptions.filter((s) => s.identifier === identifier)\n  }\n\n  reload() {\n    return this.subscriptions.map((subscription) =>\n      this.subscribe(subscription))\n  }\n\n  notifyAll(callbackName, ...args) {\n    return this.subscriptions.map((subscription) =>\n      this.notify(subscription, callbackName, ...args))\n  }\n\n  notify(subscription, callbackName, ...args) {\n    let subscriptions\n    if (typeof subscription === \"string\") {\n      subscriptions = this.findAll(subscription)\n    } else {\n      subscriptions = [subscription]\n    }\n\n    return subscriptions.map((subscription) =>\n      (typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined))\n  }\n\n  subscribe(subscription) {\n    if (this.sendCommand(subscription, \"subscribe\")) {\n      this.guarantor.guarantee(subscription)\n    }\n  }\n\n  confirmSubscription(identifier) {\n    logger.log(`Subscription confirmed ${identifier}`)\n    this.findAll(identifier).map((subscription) =>\n      this.guarantor.forget(subscription))\n  }\n\n  sendCommand(subscription, command) {\n    const {identifier} = subscription\n    return this.consumer.send({command, identifier})\n  }\n}\n", "import Connection from \"./connection\"\nimport Subscriptions from \"./subscriptions\"\n\n// The ActionCable.Consumer establishes the connection to a server-side Ruby Connection object. Once established,\n// the ActionCable.ConnectionMonitor will ensure that its properly maintained through heartbeats and checking for stale updates.\n// The Consumer instance is also the gateway to establishing subscriptions to desired channels through the #createSubscription\n// method.\n//\n// The following example shows how this can be set up:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n//\n// When a consumer is created, it automatically connects with the server.\n//\n// To disconnect from the server, call\n//\n//   App.cable.disconnect()\n//\n// and to restart the connection:\n//\n//   App.cable.connect()\n//\n// Any channel subscriptions which existed prior to disconnecting will\n// automatically resubscribe.\n\nexport default class Consumer {\n  constructor(url) {\n    this._url = url\n    this.subscriptions = new Subscriptions(this)\n    this.connection = new Connection(this)\n    this.subprotocols = []\n  }\n\n  get url() {\n    return createWebSocketURL(this._url)\n  }\n\n  send(data) {\n    return this.connection.send(data)\n  }\n\n  connect() {\n    return this.connection.open()\n  }\n\n  disconnect() {\n    return this.connection.close({allowReconnect: false})\n  }\n\n  ensureActiveConnection() {\n    if (!this.connection.isActive()) {\n      return this.connection.open()\n    }\n  }\n\n  addSubProtocol(subprotocol) {\n    this.subprotocols = [...this.subprotocols, subprotocol]\n  }\n}\n\nexport function createWebSocketURL(url) {\n  if (typeof url === \"function\") {\n    url = url()\n  }\n\n  if (url && !/^wss?:/i.test(url)) {\n    const a = document.createElement(\"a\")\n    a.href = url\n    // Fix populating Location properties in IE. Otherwise, protocol will be blank.\n    a.href = a.href\n    a.protocol = a.protocol.replace(\"http\", \"ws\")\n    return a.href\n  } else {\n    return url\n  }\n}\n", "import Connection from \"./connection\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport Consumer, { createWebSocketURL } from \"./consumer\"\nimport INTERNAL from \"./internal\"\nimport Subscription from \"./subscription\"\nimport Subscriptions from \"./subscriptions\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport adapters from \"./adapters\"\nimport logger from \"./logger\"\n\nexport {\n  Connection,\n  ConnectionMonitor,\n  Consumer,\n  INTERNAL,\n  Subscription,\n  Subscriptions,\n  SubscriptionGuarantor,\n  adapters,\n  createWebSocketURL,\n  logger,\n}\n\nexport function createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n  return new Consumer(url)\n}\n\nexport function getConfig(name) {\n  const element = document.head.querySelector(`meta[name='action-cable-${name}']`)\n  if (element) {\n    return element.getAttribute(\"content\")\n  }\n}\n", "\"use strict\"\n\n// doT.js\n// 2011-2014, Laura Doktorova, https://github.com/olado/doT\n// Licensed under the MIT license.\n\nconst doT = {\n  templateSettings: {\n    argName: \"it\",\n    encoders: {},\n    selfContained: false,\n    strip: true,\n    internalPrefix: \"_val\",\n    encodersPrefix: \"_enc\",\n    delimiters: {\n      start: \"{{\",\n      end: \"}}\",\n    },\n  },\n  template,\n  compile,\n  setDelimiters,\n}\n\nmodule.exports = doT\n\n// depends on selfContained mode\nconst encoderType = {\n  false: \"function\",\n  true: \"string\",\n}\n\nconst defaultSyntax = {\n  evaluate: /\\{\\{([\\s\\S]+?(\\}?)+)\\}\\}/g,\n  interpolate: /\\{\\{=([\\s\\S]+?)\\}\\}/g,\n  typeInterpolate: /\\{\\{%([nsb])=([\\s\\S]+?)\\}\\}/g,\n  encode: /\\{\\{([a-z_$]+[\\w$]*)?!([\\s\\S]+?)\\}\\}/g,\n  use: /\\{\\{#([\\s\\S]+?)\\}\\}/g,\n  useParams: /(^|[^\\w$])def(?:\\.|\\[[\\'\\\"])([\\w$\\.]+)(?:[\\'\\\"]\\])?\\s*\\:\\s*([\\w$]+(?:\\.[\\w$]+|\\[[^\\]]+\\])*|\\\"[^\\\"]+\\\"|\\'[^\\']+\\'|\\{[^\\}]+\\})/g,\n  define: /\\{\\{##\\s*([\\w\\.$]+)\\s*(\\:|=)([\\s\\S]+?)#\\}\\}/g,\n  defineParams: /^\\s*([\\w$]+):([\\s\\S]+)/,\n  conditional: /\\{\\{\\?(\\?)?\\s*([\\s\\S]*?)\\s*\\}\\}/g,\n  iterate: /\\{\\{~\\s*(?:\\}\\}|([\\s\\S]+?)\\s*\\:\\s*([\\w$]+)\\s*(?:\\:\\s*([\\w$]+))?\\s*\\}\\})/g,\n}\n\nlet currentSyntax = {...defaultSyntax}\n\nconst TYPES = {\n  n: \"number\",\n  s: \"string\",\n  b: \"boolean\",\n}\n\nfunction resolveDefs(c, syn, block, def) {\n  return (typeof block === \"string\" ? block : block.toString())\n    .replace(syn.define, (_, code, assign, value) => {\n      if (code.indexOf(\"def.\") === 0) {\n        code = code.substring(4)\n      }\n      if (!(code in def)) {\n        if (assign === \":\") {\n          value.replace(syn.defineParams, (_, param, v) => {\n            def[code] = {arg: param, text: v}\n          })\n          if (!(code in def)) def[code] = value\n        } else {\n          new Function(\"def\", `def['${code}']=${value}`)(def)\n        }\n      }\n      return \"\"\n    })\n    .replace(syn.use, (_, code) => {\n      code = code.replace(syn.useParams, (_, s, d, param) => {\n        if (def[d] && def[d].arg && param) {\n          const rw = unescape((d + \":\" + param).replace(/'|\\\\/g, \"_\"))\n          def.__exp = def.__exp || {}\n          def.__exp[rw] = def[d].text.replace(\n            new RegExp(`(^|[^\\\\w$])${def[d].arg}([^\\\\w$])`, \"g\"),\n            `$1${param}$2`\n          )\n          return s + `def.__exp['${rw}']`\n        }\n      })\n      const v = new Function(\"def\", \"return \" + code)(def)\n      return v ? resolveDefs(c, syn, v, def) : v\n    })\n}\n\nfunction unescape(code) {\n  return code.replace(/\\\\('|\\\\)/g, \"$1\").replace(/[\\r\\t\\n]/g, \" \")\n}\n\nfunction template(tmpl, c, def) {\n  const ds = c && c.delimiters\n  const syn = ds && !sameDelimiters(ds) ? getSyntax(ds) : currentSyntax\n  c = c ? {...doT.templateSettings, ...c} : doT.templateSettings\n  let sid = 0\n  let str = resolveDefs(c, syn, tmpl, def || {})\n  const needEncoders = {}\n\n  str = (\n    \"let out='\" +\n    (c.strip\n      ? str\n          .trim()\n          .replace(/[\\t ]+(\\r|\\n)/g, \"\\n\") // remove trailing spaces\n          .replace(/(\\r|\\n)[\\t ]+/g, \" \") // leading spaces reduced to \" \"\n          .replace(/\\r|\\n|\\t|\\/\\*[\\s\\S]*?\\*\\//g, \"\") // remove breaks, tabs and JS comments\n      : str\n    )\n      .replace(/'|\\\\/g, \"\\\\$&\")\n      .replace(syn.interpolate, (_, code) => `'+(${unescape(code)})+'`)\n      .replace(syn.typeInterpolate, (_, typ, code) => {\n        sid++\n        const val = c.internalPrefix + sid\n        const error = `throw new Error(\"expected ${TYPES[typ]}, got \"+ (typeof ${val}))`\n        return `';const ${val}=(${unescape(code)});if(typeof ${val}!==\"${\n          TYPES[typ]\n        }\") ${error};out+=${val}+'`\n      })\n      .replace(syn.encode, (_, enc = \"\", code) => {\n        needEncoders[enc] = true\n        code = unescape(code)\n        const e = c.selfContained ? enc : enc ? \".\" + enc : '[\"\"]'\n        return `'+${c.encodersPrefix}${e}(${code})+'`\n      })\n      .replace(syn.conditional, (_, elseCase, code) => {\n        if (code) {\n          code = unescape(code)\n          return elseCase ? `';}else if(${code}){out+='` : `';if(${code}){out+='`\n        }\n        return elseCase ? \"';}else{out+='\" : \"';}out+='\"\n      })\n      .replace(syn.iterate, (_, arr, vName, iName) => {\n        if (!arr) return \"';} } out+='\"\n        sid++\n        const defI = iName ? `let ${iName}=-1;` : \"\"\n        const incI = iName ? `${iName}++;` : \"\"\n        const val = c.internalPrefix + sid\n        return `';const ${val}=${unescape(\n          arr\n        )};if(${val}){${defI}for (const ${vName} of ${val}){${incI}out+='`\n      })\n      .replace(syn.evaluate, (_, code) => `';${unescape(code)}out+='`) +\n    \"';return out;\"\n  )\n    .replace(/\\n/g, \"\\\\n\")\n    .replace(/\\t/g, \"\\\\t\")\n    .replace(/\\r/g, \"\\\\r\")\n    .replace(/(\\s|;|\\}|^|\\{)out\\+='';/g, \"$1\")\n    .replace(/\\+''/g, \"\")\n\n  const args = Array.isArray(c.argName) ? properties(c.argName) : c.argName\n\n  if (Object.keys(needEncoders).length === 0) {\n    return try_(() => new Function(args, str))\n  }\n  checkEncoders(c, needEncoders)\n  str = `return function(${args}){${str}};`\n  return try_(() =>\n    c.selfContained\n      ? new Function((str = addEncoders(c, needEncoders) + str))()\n      : new Function(c.encodersPrefix, str)(c.encoders)\n  )\n\n  function try_(f) {\n    try {\n      return f()\n    } catch (e) {\n      console.log(\"Could not create a template function: \" + str)\n      throw e\n    }\n  }\n}\n\nfunction compile(tmpl, def) {\n  return template(tmpl, null, def)\n}\n\nfunction sameDelimiters({start, end}) {\n  const d = doT.templateSettings.delimiters\n  return d.start === start && d.end === end\n}\n\nfunction setDelimiters(delimiters) {\n  if (sameDelimiters(delimiters)) {\n    console.log(\"delimiters did not change\")\n    return\n  }\n  currentSyntax = getSyntax(delimiters)\n  doT.templateSettings.delimiters = delimiters\n}\n\nfunction getSyntax({start, end}) {\n  start = escape(start)\n  end = escape(end)\n  const syntax = {}\n  for (const syn in defaultSyntax) {\n    const s = defaultSyntax[syn]\n      .toString()\n      .replace(/\\\\\\{\\\\\\{/g, start)\n      .replace(/\\\\\\}\\\\\\}/g, end)\n    syntax[syn] = strToRegExp(s)\n  }\n  return syntax\n}\n\nconst escapeCharacters = /([{}[\\]()<>\\\\\\/^$\\-.+*?!=|&:])/g\n\nfunction escape(str) {\n  return str.replace(escapeCharacters, \"\\\\$1\")\n}\n\nconst regexpPattern = /^\\/(.*)\\/([\\w]*)$/\n\nfunction strToRegExp(str) {\n  const [, rx, flags] = str.match(regexpPattern)\n  return new RegExp(rx, flags)\n}\n\nfunction properties(args) {\n  return args.reduce((s, a, i) => s + (i ? \",\" : \"\") + a, \"{\") + \"}\"\n}\n\nfunction checkEncoders(c, encoders) {\n  const typ = encoderType[c.selfContained]\n  for (const enc in encoders) {\n    const e = c.encoders[enc]\n    if (!e) throw new Error(`unknown encoder \"${enc}\"`)\n    if (typeof e !== typ)\n      throw new Error(`selfContained ${c.selfContained}: encoder type must be \"${typ}\"`)\n  }\n}\n\nfunction addEncoders(c, encoders) {\n  let s = \"\"\n  for (const enc in encoders) s += `const ${c.encodersPrefix}${enc}=${c.encoders[enc]};`\n  return s\n}\n", "/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n  var timeout, args, context, timestamp, result;\n  if (null == wait) wait = 100;\n\n  function later() {\n    var last = Date.now() - timestamp;\n\n    if (last < wait && last >= 0) {\n      timeout = setTimeout(later, wait - last);\n    } else {\n      timeout = null;\n      if (!immediate) {\n        result = func.apply(context, args);\n        context = args = null;\n      }\n    }\n  };\n\n  var debounced = function(){\n    context = this;\n    args = arguments;\n    timestamp = Date.now();\n    var callNow = immediate && !timeout;\n    if (!timeout) timeout = setTimeout(later, wait);\n    if (callNow) {\n      result = func.apply(context, args);\n      context = args = null;\n    }\n\n    return result;\n  };\n\n  debounced.clear = function() {\n    if (timeout) {\n      clearTimeout(timeout);\n      timeout = null;\n    }\n  };\n  \n  debounced.flush = function() {\n    if (timeout) {\n      result = func.apply(context, args);\n      context = args = null;\n      \n      clearTimeout(timeout);\n      timeout = null;\n    }\n  };\n\n  return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n", "function insertReplacement(source, rx, replacement) {\n    const newParts = [];\n    source.forEach((chunk) => {\n        // When the source contains multiple placeholders for interpolation,\n        // we should ignore chunks that are not strings, because those\n        // can be JSX objects and will be otherwise incorrectly turned into strings.\n        // Without this condition we\u2019d get this: [object Object] hello [object Object] my <button>\n        if (typeof chunk !== 'string') {\n            return newParts.push(chunk);\n        }\n        return rx[Symbol.split](chunk).forEach((raw, i, list) => {\n            if (raw !== '') {\n                newParts.push(raw);\n            }\n            // Interlace with the `replacement` value\n            if (i < list.length - 1) {\n                newParts.push(replacement);\n            }\n        });\n    });\n    return newParts;\n}\n/**\n * Takes a string with placeholder variables like `%{smart_count} file selected`\n * and replaces it with values from options `{smart_count: 5}`\n *\n * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE\n * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299\n *\n * @param phrase that needs interpolation, with placeholders\n * @param options with values that will be used to replace placeholders\n */\nfunction interpolate(phrase, options) {\n    const dollarRegex = /\\$/g;\n    const dollarBillsYall = '$$$$';\n    let interpolated = [phrase];\n    if (options == null)\n        return interpolated;\n    for (const arg of Object.keys(options)) {\n        if (arg !== '_') {\n            // Ensure replacement value is escaped to prevent special $-prefixed\n            // regex replace tokens. the \"$$$$\" is needed because each \"$\" needs to\n            // be escaped with \"$\" itself, and we need two in the resulting output.\n            let replacement = options[arg];\n            if (typeof replacement === 'string') {\n                replacement = dollarRegex[Symbol.replace](replacement, dollarBillsYall);\n            }\n            // We create a new `RegExp` each time instead of using a more-efficient\n            // string replace so that the same argument can be replaced multiple times\n            // in the same phrase.\n            interpolated = insertReplacement(interpolated, new RegExp(`%\\\\{${arg}\\\\}`, 'g'), replacement);\n        }\n    }\n    return interpolated;\n}\nconst defaultOnMissingKey = (key) => {\n    throw new Error(`missing string: ${key}`);\n};\n/**\n * Translates strings with interpolation & pluralization support.\n * Extensible with custom dictionaries and pluralization functions.\n *\n * Borrows heavily from and inspired by Polyglot https://github.com/airbnb/polyglot.js,\n * basically a stripped-down version of it. Differences: pluralization functions are not hardcoded\n * and can be easily added among with dictionaries, nested objects are used for pluralization\n * as opposed to `||||` delimeter\n *\n * Usage example: `translator.translate('files_chosen', {smart_count: 3})`\n */\nexport default class Translator {\n    locale;\n    constructor(locales, { onMissingKey = defaultOnMissingKey } = {}) {\n        this.locale = {\n            strings: {},\n            pluralize(n) {\n                if (n === 1) {\n                    return 0;\n                }\n                return 1;\n            },\n        };\n        if (Array.isArray(locales)) {\n            locales.forEach(this.#apply, this);\n        }\n        else {\n            this.#apply(locales);\n        }\n        this.#onMissingKey = onMissingKey;\n    }\n    #onMissingKey;\n    #apply(locale) {\n        if (!locale?.strings) {\n            return;\n        }\n        const prevLocale = this.locale;\n        Object.assign(this.locale, {\n            strings: { ...prevLocale.strings, ...locale.strings },\n            pluralize: locale.pluralize || prevLocale.pluralize,\n        });\n    }\n    /**\n     * Public translate method\n     *\n     * @param key\n     * @param options with values that will be used later to replace placeholders in string\n     * @returns string translated (and interpolated)\n     */\n    translate(key, options) {\n        return this.translateArray(key, options).join('');\n    }\n    /**\n     * Get a translation and return the translated and interpolated parts as an array.\n     *\n     * @returns The translated and interpolated parts, in order.\n     */\n    translateArray(key, options) {\n        let string = this.locale.strings[key];\n        if (string == null) {\n            this.#onMissingKey(key);\n            string = key;\n        }\n        const hasPluralForms = typeof string === 'object';\n        if (hasPluralForms) {\n            if (options && typeof options.smart_count !== 'undefined') {\n                const plural = this.locale.pluralize(options.smart_count);\n                return interpolate(string[plural], options);\n            }\n            throw new Error('Attempted to use a string with plural forms, but no value was given for %{smart_count}');\n        }\n        if (typeof string !== 'string') {\n            throw new Error(`string was not a string`);\n        }\n        return interpolate(string, options);\n    }\n}\n", "/**\n * Core plugin logic that all plugins share.\n *\n * BasePlugin does not contain DOM rendering so it can be used for plugins\n * without a user interface.\n *\n * See `Plugin` for the extended version with Preact rendering for interfaces.\n */\nimport Translator from '@uppy/utils/lib/Translator';\nexport default class BasePlugin {\n    uppy;\n    opts;\n    id;\n    defaultLocale;\n    i18n;\n    i18nArray;\n    type;\n    VERSION;\n    constructor(uppy, opts) {\n        this.uppy = uppy;\n        this.opts = opts ?? {};\n    }\n    getPluginState() {\n        const { plugins } = this.uppy.getState();\n        return (plugins?.[this.id] || {});\n    }\n    setPluginState(update) {\n        const { plugins } = this.uppy.getState();\n        this.uppy.setState({\n            plugins: {\n                ...plugins,\n                [this.id]: {\n                    ...plugins[this.id],\n                    ...update,\n                },\n            },\n        });\n    }\n    setOptions(newOpts) {\n        this.opts = { ...this.opts, ...newOpts };\n        this.setPluginState(undefined); // so that UI re-renders with new options\n        this.i18nInit();\n    }\n    i18nInit() {\n        const translator = new Translator([\n            this.defaultLocale,\n            this.uppy.locale,\n            this.opts.locale,\n        ]);\n        this.i18n = translator.translate.bind(translator);\n        this.i18nArray = translator.translateArray.bind(translator);\n        this.setPluginState(undefined); // so that UI re-renders and we see the updated locale\n    }\n    /**\n     * Extendable methods\n     * ==================\n     * These methods are here to serve as an overview of the extendable methods as well as\n     * making them not conditional in use, such as `if (this.afterUpdate)`.\n     */\n    addTarget(plugin) {\n        throw new Error(\"Extend the addTarget method to add your plugin to another plugin's target\");\n    }\n    install() { }\n    uninstall() { }\n    update(state) { }\n    // Called after every state update, after everything's mounted. Debounced.\n    afterUpdate() { }\n}\n", "/**\n * Adds zero to strings shorter than two characters.\n */\nfunction pad(number) {\n    return number < 10 ? `0${number}` : number.toString();\n}\n/**\n * Returns a timestamp in the format of `hours:minutes:seconds`\n */\nexport default function getTimeStamp() {\n    const date = new Date();\n    const hours = pad(date.getHours());\n    const minutes = pad(date.getMinutes());\n    const seconds = pad(date.getSeconds());\n    return `${hours}:${minutes}:${seconds}`;\n}\n", "import getTimeStamp from '@uppy/utils/lib/getTimeStamp';\n// Swallow all logs, except errors.\n// default if logger is not set or debug: false\nconst justErrorsLogger = {\n    debug: () => { },\n    warn: () => { },\n    error: (...args) => console.error(`[Uppy] [${getTimeStamp()}]`, ...args),\n};\n// Print logs to console with namespace + timestamp,\n// set by logger: Uppy.debugLogger or debug: true\nconst debugLogger = {\n    debug: (...args) => console.debug(`[Uppy] [${getTimeStamp()}]`, ...args),\n    warn: (...args) => console.warn(`[Uppy] [${getTimeStamp()}]`, ...args),\n    error: (...args) => console.error(`[Uppy] [${getTimeStamp()}]`, ...args),\n};\nexport { justErrorsLogger, debugLogger };\n", "/**\n * Check if an object is a DOM element. Duck-typing based on `nodeType`.\n */\nexport default function isDOMElement(obj) {\n    if (typeof obj !== 'object' || obj === null)\n        return false;\n    if (!('nodeType' in obj))\n        return false;\n    return obj.nodeType === Node.ELEMENT_NODE;\n}\n", "import isDOMElement from './isDOMElement.js';\nfunction findDOMElement(element, context = document) {\n    if (typeof element === 'string') {\n        return context.querySelector(element);\n    }\n    if (isDOMElement(element)) {\n        return element;\n    }\n    return null;\n}\nexport default findDOMElement;\n", "/**\n * Get the declared text direction for an element.\n */\nfunction getTextDirection(element) {\n    // There is another way to determine text direction using getComputedStyle(), as done here:\n    // https://github.com/pencil-js/text-direction/blob/2a235ce95089b3185acec3b51313cbba921b3811/text-direction.js\n    //\n    // We do not use that approach because we are interested specifically in the _declared_ text direction.\n    // If no text direction is declared, we have to provide our own explicit text direction so our\n    // bidirectional CSS style sheets work.\n    while (element && !element.dir) {\n        element = element.parentNode;\n    }\n    return element?.dir;\n}\nexport default getTextDirection;\n", "/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-expect-error We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {import('./index').ContainerNode} node The node to remove\n */\nexport function removeNode(node) {\n\tif (node && node.parentNode) node.parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n", "import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import { slice } from './util';\nimport options from './options';\nimport { NULL, UNDEFINED } from './constants';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor for this\n * virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array<import('.').ComponentChildren>} [children] The children of the\n * virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != NULL) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === UNDEFINED) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, NULL);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\t/** @type {import('./internal').VNode} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: NULL,\n\t\t_parent: NULL,\n\t\t_depth: 0,\n\t\t_dom: NULL,\n\t\t_component: NULL,\n\t\tconstructor: UNDEFINED,\n\t\t_original: original == NULL ? ++vnodeId : original,\n\t\t_index: -1,\n\t\t_flags: 0\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == NULL && options.vnode != NULL) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: NULL };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != NULL && vnode.constructor === UNDEFINED;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array<import('./internal').Component>}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n", "import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue._attached = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue._attached = oldValue._attached;\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e._dispatched == NULL) {\n\t\t\t\te._dispatched = eventClock++;\n\n\t\t\t\t// When `e._dispatched` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e._dispatched < eventHandler._attached) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n", "import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set<import('./internal').Component> | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport {\n\tEMPTY_OBJ,\n\tEMPTY_ARR,\n\tINSERT_VNODE,\n\tMATCHED,\n\tUNDEFINED,\n\tNULL\n} from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * @typedef {import('../internal').ComponentChildren} ComponentChildren\n * @typedef {import('../internal').Component} Component\n * @typedef {import('../internal').PreactElement} PreactElement\n * @typedef {import('../internal').VNode} VNode\n */\n\n/**\n * Diff the children of a virtual node\n * @param {PreactElement} parentDom The DOM element whose children are being\n * diffed\n * @param {ComponentChildren[]} renderResult\n * @param {VNode} newParentVNode The new virtual node whose children should be\n * diff'ed against oldParentVNode\n * @param {VNode} oldParentVNode The old virtual node whose children should be\n * diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\t/** @type {VNode} */\n\t\toldVNode,\n\t\t/** @type {VNode} */\n\t\tchildVNode,\n\t\t/** @type {PreactElement} */\n\t\tnewDom,\n\t\t/** @type {PreactElement} */\n\t\tfirstChildDom;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\t/** @type {VNode[]} */\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet newChildrenLength = renderResult.length;\n\n\toldDom = constructNewChildrenArray(\n\t\tnewParentVNode,\n\t\trenderResult,\n\t\toldChildren,\n\t\toldDom,\n\t\tnewChildrenLength\n\t);\n\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = newParentVNode._children[i];\n\t\tif (childVNode == NULL) continue;\n\n\t\t// At this point, constructNewChildrenArray has assigned _index to be the\n\t\t// matchingIndex for this VNode's oldVNode (or -1 if there is no oldVNode).\n\t\toldVNode =\n\t\t\t(childVNode._index != -1 && oldChildren[childVNode._index]) || EMPTY_OBJ;\n\n\t\t// Update childVNode._index to its final index\n\t\tchildVNode._index = i;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tlet result = diff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\t// Adjust DOM nodes\n\t\tnewDom = childVNode._dom;\n\t\tif (childVNode.ref && oldVNode.ref != childVNode.ref) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, NULL, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(\n\t\t\t\tchildVNode.ref,\n\t\t\t\tchildVNode._component || newDom,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t}\n\n\t\tif (firstChildDom == NULL && newDom != NULL) {\n\t\t\tfirstChildDom = newDom;\n\t\t}\n\n\t\tlet shouldPlace = !!(childVNode._flags & INSERT_VNODE);\n\t\tif (shouldPlace || oldVNode._children === childVNode._children) {\n\t\t\toldDom = insert(childVNode, oldDom, parentDom, shouldPlace);\n\t\t} else if (typeof childVNode.type == 'function' && result !== UNDEFINED) {\n\t\t\toldDom = result;\n\t\t} else if (newDom) {\n\t\t\toldDom = newDom.nextSibling;\n\t\t}\n\n\t\t// Unset diffing flags\n\t\tchildVNode._flags &= ~(INSERT_VNODE | MATCHED);\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\treturn oldDom;\n}\n\n/**\n * @param {VNode} newParentVNode\n * @param {ComponentChildren[]} renderResult\n * @param {VNode[]} oldChildren\n */\nfunction constructNewChildrenArray(\n\tnewParentVNode,\n\trenderResult,\n\toldChildren,\n\toldDom,\n\tnewChildrenLength\n) {\n\t/** @type {number} */\n\tlet i;\n\t/** @type {VNode} */\n\tlet childVNode;\n\t/** @type {VNode} */\n\tlet oldVNode;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength;\n\n\tlet skew = 0;\n\n\tnewParentVNode._children = new Array(newChildrenLength);\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\t// @ts-expect-error We are reusing the childVNode variable to hold both the\n\t\t// pre and post normalized childVNode\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == NULL ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tnewParentVNode._children[i] = NULL;\n\t\t\tcontinue;\n\t\t}\n\t\t// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint' ||\n\t\t\tchildVNode.constructor == String\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tNULL,\n\t\t\t\tchildVNode,\n\t\t\t\tNULL,\n\t\t\t\tNULL,\n\t\t\t\tNULL\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tNULL,\n\t\t\t\tNULL,\n\t\t\t\tNULL\n\t\t\t);\n\t\t} else if (childVNode.constructor === UNDEFINED && childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t//   const reuse = <div />\n\t\t\t//   <div>{reuse}<span />{reuse}</div>\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : NULL,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tnewParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\tconst skewedIndex = i + skew;\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Temporarily store the matchingIndex on the _index property so we can pull\n\t\t// out the oldVNode in diffChildren. We'll override this to the VNode's\n\t\t// final index after using this property to get the oldVNode\n\t\tconst matchingIndex = (childVNode._index = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t));\n\n\t\toldVNode = NULL;\n\t\tif (matchingIndex != -1) {\n\t\t\toldVNode = oldChildren[matchingIndex];\n\t\t\tremainingOldChildren--;\n\t\t\tif (oldVNode) {\n\t\t\t\toldVNode._flags |= MATCHED;\n\t\t\t}\n\t\t}\n\n\t\t// Here, we define isMounting for the purposes of the skew diffing\n\t\t// algorithm. Nodes that are unsuspending are considered mounting and we detect\n\t\t// this by checking if oldVNode._original == null\n\t\tconst isMounting = oldVNode == NULL || oldVNode._original == NULL;\n\n\t\tif (isMounting) {\n\t\t\tif (matchingIndex == -1) {\n\t\t\t\t// When the array of children is growing we need to decrease the skew\n\t\t\t\t// as we are adding a new element to the array.\n\t\t\t\t// Example:\n\t\t\t\t// [1, 2, 3] --> [0, 1, 2, 3]\n\t\t\t\t// oldChildren   newChildren\n\t\t\t\t//\n\t\t\t\t// The new element is at index 0, so our skew is 0,\n\t\t\t\t// we need to decrease the skew as we are adding a new element.\n\t\t\t\t// The decrease will cause us to compare the element at position 1\n\t\t\t\t// with value 1 with the element at position 0 with value 0.\n\t\t\t\t//\n\t\t\t\t// A linear concept is applied when the array is shrinking,\n\t\t\t\t// if the length is unchanged we can assume that no skew\n\t\t\t\t// changes are needed.\n\t\t\t\tif (newChildrenLength > oldChildrenLength) {\n\t\t\t\t\tskew--;\n\t\t\t\t} else if (newChildrenLength < oldChildrenLength) {\n\t\t\t\t\tskew++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we are mounting a DOM VNode, mark it for insertion\n\t\t\tif (typeof childVNode.type != 'function') {\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t} else if (matchingIndex != skewedIndex) {\n\t\t\t// When we move elements around i.e. [0, 1, 2] --> [1, 0, 2]\n\t\t\t// --> we diff 1, we find it at position 1 while our skewed index is 0 and our skew is 0\n\t\t\t//     we set the skew to 1 as we found an offset.\n\t\t\t// --> we diff 0, we find it at position 0 while our skewed index is at 2 and our skew is 1\n\t\t\t//     this makes us increase the skew again.\n\t\t\t// --> we diff 2, we find it at position 2 while our skewed index is at 4 and our skew is 2\n\t\t\t//\n\t\t\t// this becomes an optimization question where currently we see a 1 element offset as an insertion\n\t\t\t// or deletion i.e. we optimize for [0, 1, 2] --> [9, 0, 1, 2]\n\t\t\t// while a more than 1 offset we see as a swap.\n\t\t\t// We could probably build heuristics for having an optimized course of action here as well, but\n\t\t\t// might go at the cost of some bytes.\n\t\t\t//\n\t\t\t// If we wanted to optimize for i.e. only swaps we'd just do the last two code-branches and have\n\t\t\t// only the first item be a re-scouting and all the others fall in their skewed counter-part.\n\t\t\t// We could also further optimize for swaps\n\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\tskew--;\n\t\t\t} else if (matchingIndex == skewedIndex + 1) {\n\t\t\t\tskew++;\n\t\t\t} else {\n\t\t\t\tif (matchingIndex > skewedIndex) {\n\t\t\t\t\tskew--;\n\t\t\t\t} else {\n\t\t\t\t\tskew++;\n\t\t\t\t}\n\n\t\t\t\t// Move this VNode's DOM if the original index (matchingIndex) doesn't\n\t\t\t\t// match the new skew index (i + new skew)\n\t\t\t\t// In the former two branches we know that it matches after skewing\n\t\t\t\tchildVNode._flags |= INSERT_VNODE;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove remaining oldChildren if there are any. Loop forwards so that as we\n\t// unmount DOM from the beginning of the oldChildren, we can adjust oldDom to\n\t// point to the next child, which needs to be the first DOM node that won't be\n\t// unmounted.\n\tif (remainingOldChildren) {\n\t\tfor (i = 0; i < oldChildrenLength; i++) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode != NULL && (oldVNode._flags & MATCHED) == 0) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * @param {VNode} parentVNode\n * @param {PreactElement} oldDom\n * @param {PreactElement} parentDom\n * @param {boolean} shouldPlace\n * @returns {PreactElement}\n */\nfunction insert(parentVNode, oldDom, parentDom, shouldPlace) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\n\tif (typeof parentVNode.type == 'function') {\n\t\tlet children = parentVNode._children;\n\t\tfor (let i = 0; children && i < children.length; i++) {\n\t\t\tif (children[i]) {\n\t\t\t\t// If we enter this code path on sCU bailout, where we copy\n\t\t\t\t// oldVNode._children to newVNode._children, we need to update the old\n\t\t\t\t// children's _parent pointer to point to the newVNode (parentVNode\n\t\t\t\t// here).\n\t\t\t\tchildren[i]._parent = parentVNode;\n\t\t\t\toldDom = insert(children[i], oldDom, parentDom, shouldPlace);\n\t\t\t}\n\t\t}\n\n\t\treturn oldDom;\n\t} else if (parentVNode._dom != oldDom) {\n\t\tif (shouldPlace) {\n\t\t\tif (oldDom && parentVNode.type && !oldDom.parentNode) {\n\t\t\t\toldDom = getDomSibling(parentVNode);\n\t\t\t}\n\t\t\tparentDom.insertBefore(parentVNode._dom, oldDom || NULL);\n\t\t}\n\t\toldDom = parentVNode._dom;\n\t}\n\n\tdo {\n\t\toldDom = oldDom && oldDom.nextSibling;\n\t} while (oldDom != NULL && oldDom.nodeType == 8);\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {ComponentChildren} children The unflattened children of a virtual\n * node\n * @returns {VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == NULL || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\n/**\n * @param {VNode} childVNode\n * @param {VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet oldVNode = oldChildren[skewedIndex];\n\tconst matched = oldVNode != NULL && (oldVNode._flags & MATCHED) == 0;\n\n\t// We only need to perform a search if there are more children\n\t// (remainingOldChildren) to search. However, if the oldVNode we just looked\n\t// at skewedIndex was not already used in this diff, then there must be at\n\t// least 1 other (so greater than 1) remainingOldChildren to attempt to match\n\t// against. So the following condition checks that ensuring\n\t// remainingOldChildren > 1 if the oldVNode is not already used/matched. Else\n\t// if the oldVNode was null or matched, then there could needs to be at least\n\t// 1 (aka `remainingOldChildren > 0`) children to find and compare against.\n\t//\n\t// If there is an unkeyed functional VNode, that isn't a built-in like our Fragment,\n\t// we should not search as we risk re-using state of an unrelated VNode. (reverted for now)\n\tlet shouldSearch =\n\t\t// (typeof type != 'function' || type === Fragment || key) &&\n\t\tremainingOldChildren > (matched ? 1 : 0);\n\n\tif (\n\t\t(oldVNode === NULL && key == null) ||\n\t\t(matched && key == oldVNode.key && type == oldVNode.type)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (shouldSearch) {\n\t\tlet x = skewedIndex - 1;\n\t\tlet y = skewedIndex + 1;\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tconst childIndex = x >= 0 ? x-- : y++;\n\t\t\toldVNode = oldChildren[childIndex];\n\t\t\tif (\n\t\t\t\toldVNode != NULL &&\n\t\t\t\t(oldVNode._flags & MATCHED) == 0 &&\n\t\t\t\tkey == oldVNode.key &&\n\t\t\t\ttype == oldVNode.type\n\t\t\t) {\n\t\t\t\treturn childIndex;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n", "import {\n\tEMPTY_ARR,\n\tEMPTY_OBJ,\n\tMATH_NAMESPACE,\n\tMODE_HYDRATE,\n\tMODE_SUSPENDED,\n\tNULL,\n\tRESET_MODE,\n\tSVG_NAMESPACE,\n\tUNDEFINED,\n\tXHTML_NAMESPACE\n} from '../constants';\nimport { BaseComponent, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * @typedef {import('../internal').ComponentChildren} ComponentChildren\n * @typedef {import('../internal').Component} Component\n * @typedef {import('../internal').PreactElement} PreactElement\n * @typedef {import('../internal').VNode} VNode\n */\n\n/**\n * @template {any} T\n * @typedef {import('../internal').Ref<T>} Ref<T>\n */\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {PreactElement} parentDom The parent of the DOM element\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by\n * getChildContext\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {PreactElement} oldDom The current attached DOM element any new dom\n * elements should be placed around. Likely `null` on first render (except when\n * hydrating). Can be a sibling DOM element when diffing Fragments that have\n * siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\t/** @type {any} */\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== UNDEFINED) return NULL;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._flags & MODE_SUSPENDED) {\n\t\tisHydrating = !!(oldVNode._flags & MODE_HYDRATE);\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\t\t\tconst isClassComponent = newType.prototype && newType.prototype.render;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif (isClassComponent) {\n\t\t\t\t\t// @ts-expect-error The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-expect-error Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new BaseComponent(\n\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (isClassComponent && c._nextState == NULL) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (isClassComponent && newType.getDerivedStateFromProps != NULL) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tisClassComponent &&\n\t\t\t\t\tnewType.getDerivedStateFromProps == NULL &&\n\t\t\t\t\tc.componentWillMount != NULL\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (isClassComponent && c.componentDidMount != NULL) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tisClassComponent &&\n\t\t\t\t\tnewType.getDerivedStateFromProps == NULL &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != NULL\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tnewVNode._original == oldVNode._original ||\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != NULL &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original != oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.some(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tEMPTY_ARR.push.apply(c._renderCallbacks, c._stateCallbacks);\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != NULL) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (isClassComponent && c.componentDidUpdate != NULL) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif (isClassComponent) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tEMPTY_ARR.push.apply(c._renderCallbacks, c._stateCallbacks);\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != NULL) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (isClassComponent && !isNew && c.getSnapshotBeforeUpdate != NULL) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet renderResult =\n\t\t\t\ttmp != NULL && tmp.type === Fragment && tmp.key == NULL\n\t\t\t\t\t? cloneNode(tmp.props.children)\n\t\t\t\t\t: tmp;\n\n\t\t\toldDom = diffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnamespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._flags &= RESET_MODE;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = NULL;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = NULL;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != NULL) {\n\t\t\t\tif (e.then) {\n\t\t\t\t\tnewVNode._flags |= isHydrating\n\t\t\t\t\t\t? MODE_HYDRATE | MODE_SUSPENDED\n\t\t\t\t\t\t: MODE_SUSPENDED;\n\n\t\t\t\t\twhile (oldDom && oldDom.nodeType == 8 && oldDom.nextSibling) {\n\t\t\t\t\t\toldDom = oldDom.nextSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = NULL;\n\t\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\t} else {\n\t\t\t\t\tfor (let i = excessDomChildren.length; i--; ) {\n\t\t\t\t\t\tremoveNode(excessDomChildren[i]);\n\t\t\t\t\t}\n\t\t\t\t\tmarkAsForce(newVNode);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\tif (!e.then) markAsForce(newVNode);\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == NULL &&\n\t\tnewVNode._original == oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\toldDom = newVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tnamespace,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n\n\treturn newVNode._flags & MODE_SUSPENDED ? undefined : oldDom;\n}\n\nfunction markAsForce(vnode) {\n\tif (vnode) {\n\t\tif (vnode._component) vnode._component._force = true;\n\t\tif (vnode._children) vnode._children.some(markAsForce);\n\t}\n}\n\n/**\n * @param {Array<Component>} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-expect-error Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-expect-error See above comment on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\nfunction cloneNode(node) {\n\tif (typeof node != 'object' || node == NULL || node._depth > 0) {\n\t\treturn node;\n\t}\n\n\tif (isArray(node)) {\n\t\treturn node.map(cloneNode);\n\t}\n\n\treturn assign({}, node);\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {PreactElement} dom The DOM element representing the virtual nodes\n * being diffed\n * @param {VNode} newVNode The new virtual node\n * @param {VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {string} namespace Current namespace of the DOM node (HTML, SVG, or MathML)\n * @param {Array<PreactElement>} excessDomChildren\n * @param {Array<Component>} commitQueue List of components which have callbacks\n * to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {any[]} refQueue an array of elements needed to invoke refs\n * @returns {PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tnamespace,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props || EMPTY_OBJ;\n\tlet newProps = newVNode.props;\n\tlet nodeType = /** @type {string} */ (newVNode.type);\n\t/** @type {any} */\n\tlet i;\n\t/** @type {{ __html?: string }} */\n\tlet newHtml;\n\t/** @type {{ __html?: string }} */\n\tlet oldHtml;\n\t/** @type {ComponentChildren} */\n\tlet newChildren;\n\tlet value;\n\tlet inputValue;\n\tlet checked;\n\n\t// Tracks entering and exiting namespaces when descending through the tree.\n\tif (nodeType == 'svg') namespace = SVG_NAMESPACE;\n\telse if (nodeType == 'math') namespace = MATH_NAMESPACE;\n\telse if (!namespace) namespace = XHTML_NAMESPACE;\n\n\tif (excessDomChildren != NULL) {\n\t\tfor (i = 0; i < excessDomChildren.length; i++) {\n\t\t\tvalue = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tvalue &&\n\t\t\t\t'setAttribute' in value == !!nodeType &&\n\t\t\t\t(nodeType ? value.localName == nodeType : value.nodeType == 3)\n\t\t\t) {\n\t\t\t\tdom = value;\n\t\t\t\texcessDomChildren[i] = NULL;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == NULL) {\n\t\tif (nodeType == NULL) {\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tdom = document.createElementNS(\n\t\t\tnamespace,\n\t\t\tnodeType,\n\t\t\tnewProps.is && newProps\n\t\t);\n\n\t\t// we are creating a new node, so we can assume this is a new subtree (in\n\t\t// case we are hydrating), this deopts the hydrate\n\t\tif (isHydrating) {\n\t\t\tif (options._hydrationMismatch)\n\t\t\t\toptions._hydrationMismatch(newVNode, excessDomChildren);\n\t\t\tisHydrating = false;\n\t\t}\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = NULL;\n\t}\n\n\tif (nodeType == NULL) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data != newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\t// If we are in a situation where we are not hydrating but are using\n\t\t// existing DOM (e.g. replaceNode) we should read the existing DOM\n\t\t// attributes to diff them\n\t\tif (!isHydrating && excessDomChildren != NULL) {\n\t\t\toldProps = {};\n\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\tvalue = dom.attributes[i];\n\t\t\t\toldProps[value.name] = value.value;\n\t\t\t}\n\t\t}\n\n\t\tfor (i in oldProps) {\n\t\t\tvalue = oldProps[i];\n\t\t\tif (i == 'dangerouslySetInnerHTML') {\n\t\t\t\toldHtml = value;\n\t\t\t} else if (\n\t\t\t\ti != 'children' &&\n\t\t\t\t!(i in newProps) &&\n\t\t\t\t!(i == 'value' && 'defaultValue' in newProps) &&\n\t\t\t\t!(i == 'checked' && 'defaultChecked' in newProps)\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, NULL, value, namespace);\n\t\t\t}\n\t\t}\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tfor (i in newProps) {\n\t\t\tvalue = newProps[i];\n\t\t\tif (i == 'children') {\n\t\t\t\tnewChildren = value;\n\t\t\t} else if (i == 'dangerouslySetInnerHTML') {\n\t\t\t\tnewHtml = value;\n\t\t\t} else if (i == 'value') {\n\t\t\t\tinputValue = value;\n\t\t\t} else if (i == 'checked') {\n\t\t\t\tchecked = value;\n\t\t\t} else if (\n\t\t\t\t(!isHydrating || typeof value == 'function') &&\n\t\t\t\toldProps[i] !== value\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, value, oldProps[i], namespace);\n\t\t\t}\n\t\t}\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\tif (\n\t\t\t\t!isHydrating &&\n\t\t\t\t(!oldHtml ||\n\t\t\t\t\t(newHtml.__html != oldHtml.__html && newHtml.__html != dom.innerHTML))\n\t\t\t) {\n\t\t\t\tdom.innerHTML = newHtml.__html;\n\t\t\t}\n\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\tif (oldHtml) dom.innerHTML = '';\n\n\t\t\tdiffChildren(\n\t\t\t\t// @ts-expect-error\n\t\t\t\tnewVNode.type == 'template' ? dom.content : dom,\n\t\t\t\tisArray(newChildren) ? newChildren : [newChildren],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tnodeType == 'foreignObject' ? XHTML_NAMESPACE : namespace,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != NULL) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tremoveNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// As above, don't diff props during hydration\n\t\tif (!isHydrating) {\n\t\t\ti = 'value';\n\t\t\tif (nodeType == 'progress' && inputValue == NULL) {\n\t\t\t\tdom.removeAttribute('value');\n\t\t\t} else if (\n\t\t\t\tinputValue != UNDEFINED &&\n\t\t\t\t// #2756 For the <progress>-element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(inputValue !== dom[i] ||\n\t\t\t\t\t(nodeType == 'progress' && !inputValue) ||\n\t\t\t\t\t// This is only for IE 11 to fix <select> value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType == 'option' && inputValue != oldProps[i]))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, i, inputValue, oldProps[i], namespace);\n\t\t\t}\n\n\t\t\ti = 'checked';\n\t\t\tif (checked != UNDEFINED && checked != dom[i]) {\n\t\t\t\tsetProperty(dom, i, checked, oldProps[i], namespace);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {Ref<any> & { _unmount?: unknown }} ref\n * @param {any} value\n * @param {VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') {\n\t\t\tlet hasRefUnmount = typeof ref._unmount == 'function';\n\t\t\tif (hasRefUnmount) {\n\t\t\t\t// @ts-ignore TS doesn't like moving narrowing checks into variables\n\t\t\t\tref._unmount();\n\t\t\t}\n\n\t\t\tif (!hasRefUnmount || value != NULL) {\n\t\t\t\t// Store the cleanup function on the function\n\t\t\t\t// instance object itself to avoid shape\n\t\t\t\t// transitioning vnode\n\t\t\t\tref._unmount = ref(value);\n\t\t\t}\n\t\t} else ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {VNode} vnode The virtual node to unmount\n * @param {VNode} parentVNode The parent of the VNode that initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current == vnode._dom) {\n\t\t\tapplyRef(r, NULL, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != NULL) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = NULL;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type != 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\tvnode._component = vnode._parent = vnode._dom = UNDEFINED;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n", "import { EMPTY_OBJ, NULL } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\t// https://github.com/preactjs/preact/issues/3794\n\tif (parentDom == document) {\n\t\tparentDom = document.documentElement;\n\t}\n\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode == 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? NULL\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, NULL, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.namespaceURI,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t\t? NULL\n\t\t\t\t: parentDom.firstChild\n\t\t\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t\t\t: NULL,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t\t? oldVNode._dom\n\t\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n", "import { assign, slice } from './util';\nimport { createVNode } from './create-element';\nimport { NULL, UNDEFINED } from './constants';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its\n * children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Any additional arguments will be used\n * as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tlet defaultProps;\n\n\tif (vnode.type && vnode.type.defaultProps) {\n\t\tdefaultProps = vnode.type.defaultProps;\n\t}\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse if (props[i] === UNDEFINED && defaultProps != UNDEFINED) {\n\t\t\tnormalizedProps[i] = defaultProps[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tNULL\n\t);\n}\n", "import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n", "import { options as _options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {import('./internal').Component} */\nlet previousComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array<import('./internal').Component>} */\nlet afterPaintEffects = [];\n\n// Cast to use internal Options type\nconst options = /** @type {import('./internal').Options} */ (_options);\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\nlet oldRoot = options._root;\n\n// We take the minimum timeout for requestAnimationFrame to ensure that\n// the callback is invoked after the next frame. 35ms is based on a 30hz\n// refresh rate, which is the minimum rate for a smooth user experience.\nconst RAF_TIMEOUT = 35;\nlet prevRaf;\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions._diff = vnode => {\n\tcurrentComponent = null;\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n};\n\noptions._root = (vnode, parentDom) => {\n\tif (vnode && parentDom._children && parentDom._children._mask) {\n\t\tvnode._mask = parentDom._children._mask;\n\t}\n\n\tif (oldRoot) oldRoot(vnode, parentDom);\n};\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tconst hooks = currentComponent.__hooks;\n\tif (hooks) {\n\t\tif (previousComponent === currentComponent) {\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentComponent._renderCallbacks = [];\n\t\t\thooks._list.some(hookItem => {\n\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t}\n\t\t\t\thookItem._pendingArgs = hookItem._nextValue = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\thooks._pendingEffects.some(invokeCleanup);\n\t\t\thooks._pendingEffects.some(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentIndex = 0;\n\t\t}\n\t}\n\tpreviousComponent = currentComponent;\n};\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tif (c.__hooks._pendingEffects.length) afterPaint(afterPaintEffects.push(c));\n\t\tc.__hooks._list.some(hookItem => {\n\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t}\n\t\t\thookItem._pendingArgs = undefined;\n\t\t});\n\t}\n\tpreviousComponent = currentComponent = null;\n};\n\n// TODO: Improve typing of commitQueue parameter\n/** @type {(vnode: import('./internal').VNode, commitQueue: any) => void} */\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.some(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tlet hasErrored;\n\t\tc.__hooks._list.some(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tc.__hooks = undefined;\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({});\n\t}\n\n\treturn hooks._list[index];\n}\n\n/**\n * @template {unknown} S\n * @param {import('./index').Dispatch<import('./index').StateUpdater<S>>} [initialState]\n * @returns {[S, (state: S) => void]}\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @template {unknown} S\n * @template {unknown} A\n * @param {import('./index').Reducer<S, A>} reducer\n * @param {import('./index').Dispatch<import('./index').StateUpdater<S>>} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ S, (state: S) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._component) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst currentValue = hookState._nextValue\n\t\t\t\t\t? hookState._nextValue[0]\n\t\t\t\t\t: hookState._value[0];\n\t\t\t\tconst nextValue = hookState._reducer(currentValue, action);\n\n\t\t\t\tif (currentValue !== nextValue) {\n\t\t\t\t\thookState._nextValue = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._component = currentComponent;\n\n\t\tif (!currentComponent._hasScuFromHooks) {\n\t\t\tcurrentComponent._hasScuFromHooks = true;\n\t\t\tlet prevScu = currentComponent.shouldComponentUpdate;\n\t\t\tconst prevCWU = currentComponent.componentWillUpdate;\n\n\t\t\t// If we're dealing with a forced update `shouldComponentUpdate` will\n\t\t\t// not be called. But we use that to update the hook values, so we\n\t\t\t// need to call it.\n\t\t\tcurrentComponent.componentWillUpdate = function (p, s, c) {\n\t\t\t\tif (this._force) {\n\t\t\t\t\tlet tmp = prevScu;\n\t\t\t\t\t// Clear to avoid other sCU hooks from being called\n\t\t\t\t\tprevScu = undefined;\n\t\t\t\t\tupdateHookState(p, s, c);\n\t\t\t\t\tprevScu = tmp;\n\t\t\t\t}\n\n\t\t\t\tif (prevCWU) prevCWU.call(this, p, s, c);\n\t\t\t};\n\n\t\t\t// This SCU has the purpose of bailing out after repeated updates\n\t\t\t// to stateful hooks.\n\t\t\t// we store the next value in _nextValue[0] and keep doing that for all\n\t\t\t// state setters, if we have next states and\n\t\t\t// all next states within a component end up being equal to their original state\n\t\t\t// we are safe to bail out for this specific component.\n\t\t\t/**\n\t\t\t *\n\t\t\t * @type {import('./internal').Component[\"shouldComponentUpdate\"]}\n\t\t\t */\n\t\t\t// @ts-ignore - We don't use TS to downtranspile\n\t\t\t// eslint-disable-next-line no-inner-declarations\n\t\t\tfunction updateHookState(p, s, c) {\n\t\t\t\tif (!hookState._component.__hooks) return true;\n\n\t\t\t\tconst stateHooks = hookState._component.__hooks._list.filter(\n\t\t\t\t\tx => x._component\n\t\t\t\t);\n\n\t\t\t\tconst allHooksEmpty = stateHooks.every(x => !x._nextValue);\n\t\t\t\t// When we have no updated hooks in the component we invoke the previous SCU or\n\t\t\t\t// traverse the VDOM tree further.\n\t\t\t\tif (allHooksEmpty) {\n\t\t\t\t\treturn prevScu ? prevScu.call(this, p, s, c) : true;\n\t\t\t\t}\n\n\t\t\t\t// We check whether we have components with a nextValue set that\n\t\t\t\t// have values that aren't equal to one another this pushes\n\t\t\t\t// us to update further down the tree\n\t\t\t\tlet shouldUpdate = hookState._component.props !== p;\n\t\t\t\tstateHooks.some(hookItem => {\n\t\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\t\tconst currentValue = hookItem._value[0];\n\t\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t\t\thookItem._nextValue = undefined;\n\t\t\t\t\t\tif (currentValue !== hookItem._value[0]) shouldUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn prevScu\n\t\t\t\t\t? prevScu.call(this, p, s, c) || shouldUpdate\n\t\t\t\t\t: shouldUpdate;\n\t\t\t}\n\n\t\t\tcurrentComponent.shouldComponentUpdate = updateHookState;\n\t\t}\n\t}\n\n\treturn hookState._nextValue || hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {unknown[]} args\n * @returns {void}\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {unknown[]} args\n * @returns {void}\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\n/** @type {(initialValue: unknown) => unknown} */\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {unknown[]} args\n * @returns {void}\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tconst result = ref(createHandle());\n\t\t\t\treturn () => {\n\t\t\t\t\tref(null);\n\t\t\t\t\tif (result && typeof result == 'function') result();\n\t\t\t\t};\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @template {unknown} T\n * @param {() => T} factory\n * @param {unknown[]} args\n * @returns {T}\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState<T>} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._value = factory();\n\t\tstate._args = args;\n\t\tstate._factory = factory;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {unknown[]} args\n * @returns {() => void}\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {<T>(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(\n\t\t\tformatter ? formatter(value) : /** @type {any}*/ (value)\n\t\t);\n\t}\n}\n\n/**\n * @param {(error: unknown, errorInfo: import('preact').ErrorInfo) => void} cb\n * @returns {[unknown, () => void]}\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = (err, errorInfo) => {\n\t\t\tif (state._value) state._value(err, errorInfo);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\n/** @type {() => string} */\nexport function useId() {\n\t/** @type {import('./internal').IdHookState} */\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._value) {\n\t\t// Grab either the root node or the nearest async boundary node.\n\t\t/** @type {import('./internal').VNode} */\n\t\tlet root = currentComponent._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\tlet mask = root._mask || (root._mask = [0, 0]);\n\t\tstate._value = 'P' + mask[0] + '-' + mask[1]++;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet component;\n\twhile ((component = afterPaintEffects.shift())) {\n\t\tconst hooks = component.__hooks;\n\t\tif (!component._parentDom || !hooks) continue;\n\t\ttry {\n\t\t\thooks._pendingEffects.some(invokeCleanup);\n\t\t\thooks._pendingEffects.some(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t} catch (e) {\n\t\t\thooks._pendingEffects = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n * @returns {void}\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').HookState} hook\n * @returns {void}\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\n\tcurrentComponent = comp;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n * @returns {void}\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\thook._cleanup = hook._value();\n\tcurrentComponent = comp;\n}\n\n/**\n * @param {unknown[]} oldArgs\n * @param {unknown[]} newArgs\n * @returns {boolean}\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\n/**\n * @template Arg\n * @param {Arg} arg\n * @param {(arg: Arg) => any} f\n * @returns {any}\n */\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n", "/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n", "import { useState, useLayoutEffect, useEffect } from 'preact/hooks';\nimport { is } from './util';\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n * @typedef {{ _value: any; _getSnapshot: () => any }} Store\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\t/**\n\t * @typedef {{ _instance: Store }} StoreRef\n\t * @type {[StoreRef, (store: StoreRef) => void]}\n\t */\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (didSnapshotChange(_instance)) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\n/** @type {(inst: Store) => boolean} */\nfunction didSnapshotChange(inst) {\n\ttry {\n\t\treturn !is(inst._value, inst._getSnapshot());\n\t} catch (error) {\n\t\treturn true;\n\t}\n}\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n", "import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p, c) {\n\tthis.props = p;\n\tthis.context = c;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n", "import { createElement } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionComponent}\n */\nexport function memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tif (ref != nextProps.ref && ref) {\n\t\t\ttypeof ref == 'function' ? ref(null) : (ref.current = null);\n\t\t}\n\n\t\treturn comparer\n\t\t\t? !comparer(this.props, nextProps) || ref != nextProps.ref\n\t\t\t: shallowDiffers(this.props, nextProps);\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn createElement(c, props);\n\t}\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed._forwarded = Memoed.prototype.isReactComponent = true;\n\tMemoed.type = c;\n\treturn Memoed;\n}\n", "import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = fn;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n", "import { toChildArray } from 'preact';\n\nconst mapFn = (children, fn) => {\n\tif (children == null) return null;\n\treturn toChildArray(toChildArray(children).map(fn));\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nexport const Children = {\n\tmap: mapFn,\n\tforEach: mapFn,\n\tcount(children) {\n\t\treturn children ? toChildArray(children).length : 0;\n\t},\n\tonly(children) {\n\t\tconst normalized = toChildArray(children);\n\t\tif (normalized.length !== 1) throw 'Children.only';\n\t\treturn normalized[0];\n\t},\n\ttoArray: toChildArray\n};\n", "import { Component, createElement, options, Fragment } from 'preact';\nimport { MODE_HYDRATE } from '../../src/constants';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component) component._unmounted = true;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._flags & MODE_HYDRATE) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\n\t\t\tvnode._component._force = true;\n\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode && originalParent) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.appendChild(vnode._dom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved || c._unmounted) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\t// Store and null _parentDom to prevent setState/forceUpdate from\n\t// scheduling renders while suspended. Render would be a no-op anyway\n\t// since renderComponent checks _parentDom, but this avoids queue churn.\n\tconst originalParentDom = suspendingComponent._parentDom;\n\tsuspendingComponent._parentDom = null;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\t// Restore _parentDom before forceUpdate so render can proceed\n\t\t\t\tsuspended._parentDom = originalParentDom;\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tif (\n\t\t!c._pendingSuspensionCount++ &&\n\t\t!(suspendingVNode._flags & MODE_HYDRATE)\n\t) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._flags &= ~MODE_HYDRATE;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\tlet component = vnode._parent && vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component = null;\n\tlet error;\n\tlet resolved;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tif (exports) {\n\t\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t\t}\n\t\t\t\t\tresolved = true;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t\tresolved = true;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn component ? createElement(component, props) : null;\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n", "import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t//    each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t//    The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t//    componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n", "/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { createElement, render } from 'preact';\n\n/**\n * @param {import('../../src/index').RenderableProps<{ context: any }>} props\n */\nfunction ContextProvider(props) {\n\tthis.getChildContext = () => props.context;\n\treturn props.children;\n}\n\n/**\n * Portal component\n * @this {import('./internal').Component}\n * @param {object | null | undefined} props\n *\n * TODO: use createRoot() instead of fake root\n */\nfunction Portal(props) {\n\tconst _this = this;\n\tlet container = props._container;\n\n\t_this.componentWillUnmount = function () {\n\t\trender(null, _this._temp);\n\t\t_this._temp = null;\n\t\t_this._container = null;\n\t};\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif (_this._container && _this._container !== container) {\n\t\t_this.componentWillUnmount();\n\t}\n\n\tif (!_this._temp) {\n\t\t// Ensure the element has a mask for useId invocations\n\t\tlet root = _this._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\t_this._container = container;\n\n\t\t// Create a fake DOM parent node that manages a subset of `container`'s children:\n\t\t_this._temp = {\n\t\t\tnodeType: 1,\n\t\t\tparentNode: container,\n\t\t\tchildNodes: [],\n\t\t\t_children: { _mask: root._mask },\n\t\t\tcontains: () => true,\n\t\t\tnamespaceURI: container.namespaceURI,\n\t\t\tinsertBefore(child, before) {\n\t\t\t\tthis.childNodes.push(child);\n\t\t\t\t_this._container.insertBefore(child, before);\n\t\t\t},\n\t\t\tremoveChild(child) {\n\t\t\t\tthis.childNodes.splice(this.childNodes.indexOf(child) >>> 1, 1);\n\t\t\t\t_this._container.removeChild(child);\n\t\t\t}\n\t\t};\n\t}\n\n\t// Render our wrapping element into temp.\n\trender(\n\t\tcreateElement(ContextProvider, { context: _this.context }, props._vnode),\n\t\t_this._temp\n\t);\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nexport function createPortal(vnode, container) {\n\tconst el = createElement(Portal, { _vnode: vnode, _container: container });\n\tel.containerInfo = container;\n\treturn el;\n}\n", "import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\nimport {\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tuseEffect,\n\tuseId,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseReducer,\n\tuseRef,\n\tuseState\n} from 'preact/hooks';\nimport {\n\tuseDeferredValue,\n\tuseInsertionEffect,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './index';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = true;\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = () => {};\n\te.isPropagationStopped = function isPropagationStopped() {\n\t\treturn this.cancelBubble;\n\t};\n\te.isDefaultPrevented = function isDefaultPrevented() {\n\t\treturn this.defaultPrevented;\n\t};\n\treturn (e.nativeEvent = e);\n};\n\nconst classNameDescriptorNonEnumberable = {\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {},\n\t\tisNonDashedType = type.indexOf('-') == -1;\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'translate' && value === 'no') {\n\t\t\tvalue = false;\n\t\t} else if (lowerCased[0] === 'o' && lowerCased[1] === 'n') {\n\t\t\tif (lowerCased === 'ondoubleclick') {\n\t\t\t\ti = 'ondblclick';\n\t\t\t} else if (\n\t\t\t\tlowerCased === 'onchange' &&\n\t\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t\t!onChangeInputType(props.type)\n\t\t\t) {\n\t\t\t\tlowerCased = i = 'oninput';\n\t\t\t} else if (lowerCased === 'onfocus') {\n\t\t\t\ti = 'onfocusin';\n\t\t\t} else if (lowerCased === 'onblur') {\n\t\t\t\ti = 'onfocusout';\n\t\t\t} else if (ON_ANI.test(i)) {\n\t\t\t\ti = lowerCased;\n\t\t\t}\n\t\t} else if (isNonDashedType && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\tif (type == 'select') {\n\t\t// Add support for array select values: <select multiple value={[]} />\n\t\tif (normalizedProps.multiple && Array.isArray(normalizedProps.value)) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t},\n\t\t\tuseCallback,\n\t\t\tuseContext,\n\t\t\tuseDebugValue,\n\t\t\tuseDeferredValue,\n\t\t\tuseEffect,\n\t\t\tuseId,\n\t\t\tuseImperativeHandle,\n\t\t\tuseInsertionEffect,\n\t\t\tuseLayoutEffect,\n\t\t\tuseMemo,\n\t\t\t// useMutableSource, // experimental-only and replaced by uSES, likely not worth supporting\n\t\t\tuseReducer,\n\t\t\tuseRef,\n\t\t\tuseState,\n\t\t\tuseSyncExternalStore,\n\t\t\tuseTransition\n\t\t}\n\t}\n};\n", "import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment,\n\toptions\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport {\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '18.3.1'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Check if the passed element is a Memo node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isMemo(element) {\n\treturn (\n\t\t!!element &&\n\t\ttypeof element.displayName == 'string' &&\n\t\telement.displayName.indexOf('Memo(') == 0\n\t);\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => {\n\tconst prevDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => cb();\n\tconst res = callback(arg);\n\toptions.debounceRendering = prevDebounce;\n\treturn res;\n};\n\n// compat to react-is\nexport const isElement = isValidElement;\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tFragment as StrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode: Fragment,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n", "import findDOMElement from '@uppy/utils/lib/findDOMElement';\nimport getTextDirection from '@uppy/utils/lib/getTextDirection';\nimport { render } from 'preact/compat';\nimport BasePlugin from './BasePlugin.js';\n/**\n * Defer a frequent call to the microtask queue.\n */\nfunction debounce(fn) {\n    let calling = null;\n    let latestArgs;\n    return (...args) => {\n        latestArgs = args;\n        if (!calling) {\n            calling = Promise.resolve().then(() => {\n                calling = null;\n                // At this point `args` may be different from the most\n                // recent state, if multiple calls happened since this task\n                // was queued. So we use the `latestArgs`, which definitely\n                // is the most recent call.\n                return fn(...latestArgs);\n            });\n        }\n        return calling;\n    };\n}\n/**\n * UIPlugin is the extended version of BasePlugin to incorporate rendering with Preact.\n * Use this for plugins that need a user interface.\n *\n * For plugins without an user interface, see BasePlugin.\n */\nclass UIPlugin extends BasePlugin {\n    #updateUI;\n    isTargetDOMEl;\n    el;\n    parent;\n    title;\n    getTargetPlugin(target) {\n        let targetPlugin;\n        if (typeof target?.addTarget === 'function') {\n            // Targeting a plugin *instance*\n            targetPlugin = target;\n            if (!(targetPlugin instanceof UIPlugin)) {\n                console.warn(new Error('The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.', { cause: { targetPlugin, UIPlugin } }));\n            }\n        }\n        else if (typeof target === 'function') {\n            // Targeting a plugin type\n            const Target = target;\n            // Find the target plugin instance.\n            this.uppy.iteratePlugins((p) => {\n                if (p instanceof Target) {\n                    targetPlugin = p;\n                }\n            });\n        }\n        return targetPlugin;\n    }\n    /**\n     * Check if supplied `target` is a DOM element or an `object`.\n     * If it\u2019s an object \u2014 target is a plugin, and we search `plugins`\n     * for a plugin with same name and return its target.\n     */\n    mount(target, plugin) {\n        const callerPluginName = plugin.id;\n        const targetElement = findDOMElement(target);\n        if (targetElement) {\n            this.isTargetDOMEl = true;\n            // When target is <body> with a single <div> element,\n            // Preact thinks it\u2019s the Uppy root element in there when doing a diff,\n            // and destroys it. So we are creating a fragment (could be empty div)\n            const uppyRootElement = document.createElement('div');\n            uppyRootElement.classList.add('uppy-Root');\n            // API for plugins that require a synchronous rerender.\n            this.#updateUI = debounce((state) => {\n                // plugin could be removed, but this.rerender is debounced below,\n                // so it could still be called even after uppy.removePlugin or uppy.destroy\n                // hence the check\n                if (!this.uppy.getPlugin(this.id))\n                    return;\n                render(this.render(state, uppyRootElement), uppyRootElement);\n                this.afterUpdate();\n            });\n            this.uppy.log(`Installing ${callerPluginName} to a DOM element '${target}'`);\n            if (this.opts.replaceTargetContent) {\n                // Doing render(h(null), targetElement), which should have been\n                // a better way, since because the component might need to do additional cleanup when it is removed,\n                // stopped working \u2014 Preact just adds null into target, not replacing\n                targetElement.innerHTML = '';\n            }\n            render(this.render(this.uppy.getState(), uppyRootElement), uppyRootElement);\n            this.el = uppyRootElement;\n            targetElement.appendChild(uppyRootElement);\n            // Set the text direction if the page has not defined one.\n            uppyRootElement.dir =\n                this.opts.direction || getTextDirection(uppyRootElement) || 'ltr';\n            this.onMount();\n            return this.el;\n        }\n        const targetPlugin = this.getTargetPlugin(target);\n        if (targetPlugin) {\n            this.uppy.log(`Installing ${callerPluginName} to ${targetPlugin.id}`);\n            this.parent = targetPlugin;\n            this.el = targetPlugin.addTarget(plugin);\n            this.onMount();\n            return this.el;\n        }\n        this.uppy.log(`Not installing ${callerPluginName}`);\n        let message = `Invalid target option given to ${callerPluginName}.`;\n        if (typeof target === 'function') {\n            message +=\n                ' The given target is not a Plugin class. ' +\n                    \"Please check that you're not specifying a React Component instead of a plugin. \" +\n                    'If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: ' +\n                    'run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.';\n        }\n        else {\n            message +=\n                'If you meant to target an HTML element, please make sure that the element exists. ' +\n                    'Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. ' +\n                    '(see https://github.com/transloadit/uppy/issues/1042)\\n\\n' +\n                    'If you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.';\n        }\n        throw new Error(message);\n    }\n    /**\n     * Called when plugin is mounted, whether in DOM or into another plugin.\n     * Needed because sometimes plugins are mounted separately/after `install`,\n     * so this.el and this.parent might not be available in `install`.\n     * This is the case with @uppy/react plugins, for example.\n     */\n    render(state, container) {\n        throw new Error('Extend the render method to add your plugin to a DOM element');\n    }\n    update(state) {\n        if (this.el != null) {\n            this.#updateUI?.(state);\n        }\n    }\n    unmount() {\n        if (this.isTargetDOMEl) {\n            this.el?.remove();\n        }\n        this.onUnmount();\n    }\n    onMount() { }\n    onUnmount() { }\n}\nexport default UIPlugin;\n", "{\n  \"name\": \"@uppy/store-default\",\n  \"description\": \"The default simple object-based store for Uppy.\",\n  \"version\": \"4.3.2\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/index.js\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsc --build tsconfig.build.json\",\n    \"typecheck\": \"tsc --build\",\n    \"test\": \"vitest run --environment=jsdom --silent='passed-only'\"\n  },\n  \"keywords\": [\n    \"file uploader\",\n    \"uppy\",\n    \"uppy-store\"\n  ],\n  \"homepage\": \"https://uppy.io\",\n  \"bugs\": {\n    \"url\": \"https://github.com/transloadit/uppy/issues\"\n  },\n  \"devDependencies\": {\n    \"jsdom\": \"^26.1.0\",\n    \"typescript\": \"^5.8.3\",\n    \"vitest\": \"^3.2.4\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/transloadit/uppy.git\"\n  },\n  \"files\": [\n    \"src\",\n    \"lib\",\n    \"dist\",\n    \"CHANGELOG.md\"\n  ]\n}", "import packageJson from '../package.json' with { type: 'json' };\n/**\n * Default store that keeps state in a simple object.\n */\nclass DefaultStore {\n    static VERSION = packageJson.version;\n    state = {};\n    #callbacks = new Set();\n    getState() {\n        return this.state;\n    }\n    setState(patch) {\n        const prevState = { ...this.state };\n        const nextState = { ...this.state, ...patch };\n        this.state = nextState;\n        this.#publish(prevState, nextState, patch);\n    }\n    subscribe(listener) {\n        this.#callbacks.add(listener);\n        return () => {\n            this.#callbacks.delete(listener);\n        };\n    }\n    #publish(...args) {\n        this.#callbacks.forEach((listener) => {\n            listener(...args);\n        });\n    }\n}\nexport default DefaultStore;\n", "/**\n * Takes a full filename string and returns an object {name, extension}\n */\nexport default function getFileNameAndExtension(fullFileName) {\n    const lastDot = fullFileName.lastIndexOf('.');\n    // these count as no extension: \"no-dot\", \"trailing-dot.\"\n    if (lastDot === -1 || lastDot === fullFileName.length - 1) {\n        return {\n            name: fullFileName,\n            extension: undefined,\n        };\n    }\n    return {\n        name: fullFileName.slice(0, lastDot),\n        extension: fullFileName.slice(lastDot + 1),\n    };\n}\n", "// ___Why not add the mime-types package?\n//    It's 19.7kB gzipped, and we only need mime types for well-known extensions (for file previews).\n// ___Where to take new extensions from?\n//    https://github.com/jshttp/mime-db/blob/master/db.json\nexport default {\n    __proto__: null,\n    md: 'text/markdown',\n    markdown: 'text/markdown',\n    mp4: 'video/mp4',\n    mp3: 'audio/mp3',\n    svg: 'image/svg+xml',\n    jpg: 'image/jpeg',\n    png: 'image/png',\n    webp: 'image/webp',\n    gif: 'image/gif',\n    heic: 'image/heic',\n    heif: 'image/heif',\n    yaml: 'text/yaml',\n    yml: 'text/yaml',\n    csv: 'text/csv',\n    tsv: 'text/tab-separated-values',\n    tab: 'text/tab-separated-values',\n    avi: 'video/x-msvideo',\n    mks: 'video/x-matroska',\n    mkv: 'video/x-matroska',\n    mov: 'video/quicktime',\n    dicom: 'application/dicom',\n    doc: 'application/msword',\n    msg: 'application/vnd.ms-outlook',\n    docm: 'application/vnd.ms-word.document.macroenabled.12',\n    docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n    dot: 'application/msword',\n    dotm: 'application/vnd.ms-word.template.macroenabled.12',\n    dotx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n    xla: 'application/vnd.ms-excel',\n    xlam: 'application/vnd.ms-excel.addin.macroenabled.12',\n    xlc: 'application/vnd.ms-excel',\n    xlf: 'application/x-xliff+xml',\n    xlm: 'application/vnd.ms-excel',\n    xls: 'application/vnd.ms-excel',\n    xlsb: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',\n    xlsm: 'application/vnd.ms-excel.sheet.macroenabled.12',\n    xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n    xlt: 'application/vnd.ms-excel',\n    xltm: 'application/vnd.ms-excel.template.macroenabled.12',\n    xltx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n    xlw: 'application/vnd.ms-excel',\n    txt: 'text/plain',\n    text: 'text/plain',\n    conf: 'text/plain',\n    log: 'text/plain',\n    pdf: 'application/pdf',\n    zip: 'application/zip',\n    '7z': 'application/x-7z-compressed',\n    rar: 'application/x-rar-compressed',\n    tar: 'application/x-tar',\n    gz: 'application/gzip',\n    dmg: 'application/x-apple-diskimage',\n};\n", "import getFileNameAndExtension from './getFileNameAndExtension.js';\nimport mimeTypes from './mimeTypes.js';\nexport default function getFileType(file) {\n    if (file.type)\n        return file.type;\n    const fileExtension = file.name\n        ? getFileNameAndExtension(file.name).extension?.toLowerCase()\n        : null;\n    if (fileExtension && fileExtension in mimeTypes) {\n        // else, see if we can map extension to a mime type\n        return mimeTypes[fileExtension];\n    }\n    // if all fails, fall back to a generic byte stream type\n    return 'application/octet-stream';\n}\n", "import getFileType from './getFileType.js';\nfunction encodeCharacter(character) {\n    return character.charCodeAt(0).toString(32);\n}\nfunction encodeFilename(name) {\n    let suffix = '';\n    return (name.replace(/[^A-Z0-9]/gi, (character) => {\n        suffix += `-${encodeCharacter(character)}`;\n        return '/';\n    }) + suffix);\n}\n/**\n * Takes a file object and turns it into fileID, by converting file.name to lowercase,\n * removing extra characters and adding type, size and lastModified\n */\nexport default function generateFileID(file, instanceId) {\n    // It's tempting to do `[items].filter(Boolean).join('-')` here, but that\n    // is slower! simple string concatenation is fast\n    let id = instanceId || 'uppy';\n    if (typeof file.name === 'string') {\n        id += `-${encodeFilename(file.name.toLowerCase())}`;\n    }\n    if (file.type !== undefined) {\n        id += `-${file.type}`;\n    }\n    if (file.meta && typeof file.meta.relativePath === 'string') {\n        id += `-${encodeFilename(file.meta.relativePath.toLowerCase())}`;\n    }\n    if (file.data.size !== undefined) {\n        id += `-${file.data.size}`;\n    }\n    if (file.data.lastModified !== undefined) {\n        id += `-${file.data.lastModified}`;\n    }\n    return id;\n}\n// If the provider has a stable, unique ID, then we can use that to identify the file.\n// Then we don't have to generate our own ID, and we can add the same file many times if needed (different path)\nfunction hasFileStableId(file) {\n    if (!file.isRemote || !file.remote)\n        return false;\n    // These are the providers that it seems like have stable IDs for their files. The other's I haven't checked yet.\n    const stableIdProviders = new Set([\n        'box',\n        'dropbox',\n        'drive',\n        'facebook',\n        'unsplash',\n    ]);\n    return stableIdProviders.has(file.remote.provider);\n}\nexport function getSafeFileId(file, instanceId) {\n    if (hasFileStableId(file))\n        return file.id;\n    const fileType = getFileType(file);\n    return generateFileID({\n        ...file,\n        type: fileType,\n    }, instanceId);\n}\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nmodule.exports = now;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseTrim = require('./_baseTrim'),\n    isObject = require('./isObject'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var isObject = require('./isObject'),\n    now = require('./now'),\n    toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        timeWaiting = wait - timeSinceLastCall;\n\n    return maxing\n      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n      : timeWaiting;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        clearTimeout(timerId);\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\nmodule.exports = debounce;\n", "var debounce = require('./debounce'),\n    isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\nmodule.exports = throttle;\n", "/**\n* Create an event emitter with namespaces\n* @name createNamespaceEmitter\n* @example\n* var emitter = require('./index')()\n*\n* emitter.on('*', function () {\n*   console.log('all events emitted', this.event)\n* })\n*\n* emitter.on('example', function () {\n*   console.log('example event emitted')\n* })\n*/\nmodule.exports = function createNamespaceEmitter () {\n  var emitter = {}\n  var _fns = emitter._fns = {}\n\n  /**\n  * Emit an event. Optionally namespace the event. Handlers are fired in the order in which they were added with exact matches taking precedence. Separate the namespace and event with a `:`\n  * @name emit\n  * @param {String} event \u2013 the name of the event, with optional namespace\n  * @param {...*} data \u2013 up to 6 arguments that are passed to the event listener\n  * @example\n  * emitter.emit('example')\n  * emitter.emit('demo:test')\n  * emitter.emit('data', { example: true}, 'a string', 1)\n  */\n  emitter.emit = function emit (event, arg1, arg2, arg3, arg4, arg5, arg6) {\n    var toEmit = getListeners(event)\n\n    if (toEmit.length) {\n      emitAll(event, toEmit, [arg1, arg2, arg3, arg4, arg5, arg6])\n    }\n  }\n\n  /**\n  * Create en event listener.\n  * @name on\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.on('example', function () {})\n  * emitter.on('demo', function () {})\n  */\n  emitter.on = function on (event, fn) {\n    if (!_fns[event]) {\n      _fns[event] = []\n    }\n\n    _fns[event].push(fn)\n  }\n\n  /**\n  * Create en event listener that fires once.\n  * @name once\n  * @param {String} event\n  * @param {Function} fn\n  * @example\n  * emitter.once('example', function () {})\n  * emitter.once('demo', function () {})\n  */\n  emitter.once = function once (event, fn) {\n    function one () {\n      fn.apply(this, arguments)\n      emitter.off(event, one)\n    }\n    this.on(event, one)\n  }\n\n  /**\n  * Stop listening to an event. Stop all listeners on an event by only passing the event name. Stop a single listener by passing that event handler as a callback.\n  * You must be explicit about what will be unsubscribed: `emitter.off('demo')` will unsubscribe an `emitter.on('demo')` listener,\n  * `emitter.off('demo:example')` will unsubscribe an `emitter.on('demo:example')` listener\n  * @name off\n  * @param {String} event\n  * @param {Function} [fn] \u2013 the specific handler\n  * @example\n  * emitter.off('example')\n  * emitter.off('demo', function () {})\n  */\n  emitter.off = function off (event, fn) {\n    var keep = []\n\n    if (event && fn) {\n      var fns = this._fns[event]\n      var i = 0\n      var l = fns ? fns.length : 0\n\n      for (i; i < l; i++) {\n        if (fns[i] !== fn) {\n          keep.push(fns[i])\n        }\n      }\n    }\n\n    keep.length ? this._fns[event] = keep : delete this._fns[event]\n  }\n\n  function getListeners (e) {\n    var out = _fns[e] ? _fns[e] : []\n    var idx = e.indexOf(':')\n    var args = (idx === -1) ? [e] : [e.substring(0, idx), e.substring(idx + 1)]\n\n    var keys = Object.keys(_fns)\n    var i = 0\n    var l = keys.length\n\n    for (i; i < l; i++) {\n      var key = keys[i]\n      if (key === '*') {\n        out = out.concat(_fns[key])\n      }\n\n      if (args.length === 2 && args[0] === key) {\n        out = out.concat(_fns[key])\n        break\n      }\n    }\n\n    return out\n  }\n\n  function emitAll (e, fns, args) {\n    var i = 0\n    var l = fns.length\n\n    for (i; i < l; i++) {\n      if (!fns[i]) break\n      fns[i].event = e\n      fns[i].apply(fns[i], args)\n    }\n  }\n\n  return emitter\n}\n", "\nlet urlAlphabet =\n  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\nexport let customAlphabet = (alphabet, defaultSize = 21) => {\n  return (size = defaultSize) => {\n    let id = ''\n    let i = size | 0\n    while (i-- > 0) {\n      id += alphabet[(Math.random() * alphabet.length) | 0]\n    }\n    return id\n  }\n}\n\nexport let nanoid = (size = 21) => {\n  let id = ''\n  let i = size | 0\n  while (i-- > 0) {\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\n", "{\n  \"name\": \"@uppy/core\",\n  \"description\": \"Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:\",\n  \"version\": \"4.5.3\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/index.js\",\n  \"style\": \"dist/style.min.css\",\n  \"type\": \"module\",\n  \"sideEffects\": [\n    \"*.css\"\n  ],\n  \"scripts\": {\n    \"build\": \"tsc --build tsconfig.build.json\",\n    \"build:css\": \"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css\",\n    \"typecheck\": \"tsc --build\",\n    \"test\": \"vitest run --environment=jsdom --silent='passed-only'\"\n  },\n  \"keywords\": [\n    \"file uploader\",\n    \"uppy\",\n    \"uppy-plugin\"\n  ],\n  \"homepage\": \"https://uppy.io\",\n  \"bugs\": {\n    \"url\": \"https://github.com/transloadit/uppy/issues\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/transloadit/uppy.git\"\n  },\n  \"files\": [\n    \"src\",\n    \"lib\",\n    \"dist\",\n    \"CHANGELOG.md\"\n  ],\n  \"dependencies\": {\n    \"@transloadit/prettier-bytes\": \"^0.3.4\",\n    \"@uppy/store-default\": \"^4.3.2\",\n    \"@uppy/utils\": \"^6.2.2\",\n    \"lodash\": \"^4.17.21\",\n    \"mime-match\": \"^1.0.2\",\n    \"namespace-emitter\": \"^2.0.1\",\n    \"nanoid\": \"^5.0.9\",\n    \"preact\": \"^10.5.13\"\n  },\n  \"devDependencies\": {\n    \"@types/deep-freeze\": \"^0\",\n    \"cssnano\": \"^7.0.7\",\n    \"deep-freeze\": \"^0.0.1\",\n    \"jsdom\": \"^26.1.0\",\n    \"postcss\": \"^8.5.6\",\n    \"postcss-cli\": \"^11.0.1\",\n    \"sass\": \"^1.89.2\",\n    \"typescript\": \"^5.8.3\",\n    \"vitest\": \"^3.2.4\"\n  }\n}", "export default function getFileName(fileType, fileDescriptor) {\n    if (fileDescriptor.name) {\n        return fileDescriptor.name;\n    }\n    if (fileType.split('/')[0] === 'image') {\n        return `${fileType.split('/')[0]}.${fileType.split('/')[1]}`;\n    }\n    return 'noname';\n}\n", "export default {\n    strings: {\n        addBulkFilesFailed: {\n            0: 'Failed to add %{smart_count} file due to an internal error',\n            1: 'Failed to add %{smart_count} files due to internal errors',\n        },\n        youCanOnlyUploadX: {\n            0: 'You can only upload %{smart_count} file',\n            1: 'You can only upload %{smart_count} files',\n        },\n        youHaveToAtLeastSelectX: {\n            0: 'You have to select at least %{smart_count} file',\n            1: 'You have to select at least %{smart_count} files',\n        },\n        aggregateExceedsSize: 'You selected %{size} of files, but maximum allowed size is %{sizeAllowed}',\n        exceedsSize: '%{file} exceeds maximum allowed size of %{size}',\n        missingRequiredMetaField: 'Missing required meta fields',\n        missingRequiredMetaFieldOnFile: 'Missing required meta fields in %{fileName}',\n        inferiorSize: 'This file is smaller than the allowed size of %{size}',\n        youCanOnlyUploadFileTypes: 'You can only upload: %{types}',\n        noMoreFilesAllowed: 'Cannot add more files',\n        noDuplicates: \"Cannot add the duplicate file '%{fileName}', it already exists\",\n        companionError: 'Connection with Companion failed',\n        authAborted: 'Authentication aborted',\n        companionUnauthorizeHint: 'To unauthorize to your %{provider} account, please go to %{url}',\n        failedToUpload: 'Failed to upload %{file}',\n        noInternetConnection: 'No Internet connection',\n        connectedToInternet: 'Connected to the Internet',\n        // Strings for remote providers\n        noFilesFound: 'You have no files or folders here',\n        noSearchResults: 'Unfortunately, there are no results for this search',\n        selectX: {\n            0: 'Select %{smart_count}',\n            1: 'Select %{smart_count}',\n        },\n        allFilesFromFolderNamed: 'All files from folder %{name}',\n        openFolderNamed: 'Open folder %{name}',\n        cancel: 'Cancel',\n        logOut: 'Log out',\n        logIn: 'Log in',\n        pickFiles: 'Pick files',\n        pickPhotos: 'Pick photos',\n        filter: 'Filter',\n        resetFilter: 'Reset filter',\n        loading: 'Loading...',\n        loadedXFiles: 'Loaded %{numFiles} files',\n        authenticateWithTitle: 'Please authenticate with %{pluginName} to select files',\n        authenticateWith: 'Connect to %{pluginName}',\n        signInWithGoogle: 'Sign in with Google',\n        searchImages: 'Search for images',\n        enterTextToSearch: 'Enter text to search for images',\n        search: 'Search',\n        resetSearch: 'Reset search',\n        emptyFolderAdded: 'No files were added from empty folder',\n        addedNumFiles: 'Added %{numFiles} file(s)',\n        folderAlreadyAdded: 'The folder \"%{folder}\" was already added',\n        folderAdded: {\n            0: 'Added %{smart_count} file from %{folder}',\n            1: 'Added %{smart_count} files from %{folder}',\n        },\n        additionalRestrictionsFailed: '%{count} additional restrictions were not fulfilled',\n        unnamed: 'Unnamed',\n        pleaseWait: 'Please wait',\n    },\n};\n", "// Adapted from https://github.com/Flet/prettier-bytes/\n// Changing 1000 bytes to 1024, so we can keep uppercase KB vs kB\n// ISC License (c) Dan Flettre https://github.com/Flet/prettier-bytes/blob/master/LICENSE\nexport = function prettierBytes(input: number): string {\n  if (typeof input !== 'number' || Number.isNaN(input)) {\n    throw new TypeError(`Expected a number, got ${typeof input}`)\n  }\n\n  const neg = input < 0\n  let num = Math.abs(input)\n\n  if (neg) {\n    num = -num\n  }\n\n  if (num === 0) {\n    return '0 B'\n  }\n\n  const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n  const exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1)\n  const value = Number(num / 1024 ** exponent)\n  const unit = units[exponent]\n\n  return `${value >= 10 || value % 1 === 0 ? Math.round(value) : value.toFixed(1)} ${unit}`\n}\n", "/* jshint node: true */\n'use strict';\n\n/**\n  # wildcard\n\n  Very simple wildcard matching, which is designed to provide the same\n  functionality that is found in the\n  [eve](https://github.com/adobe-webplatform/eve) eventing library.\n\n  ## Usage\n\n  It works with strings:\n\n  <<< examples/strings.js\n\n  Arrays:\n\n  <<< examples/arrays.js\n\n  Objects (matching against keys):\n\n  <<< examples/objects.js\n\n  While the library works in Node, if you are are looking for file-based\n  wildcard matching then you should have a look at:\n\n  <https://github.com/isaacs/node-glob>\n**/\n\nfunction WildcardMatcher(text, separator) {\n  this.text = text = text || '';\n  this.hasWild = ~text.indexOf('*');\n  this.separator = separator;\n  this.parts = text.split(separator);\n}\n\nWildcardMatcher.prototype.match = function(input) {\n  var matches = true;\n  var parts = this.parts;\n  var ii;\n  var partsCount = parts.length;\n  var testParts;\n\n  if (typeof input == 'string' || input instanceof String) {\n    if (!this.hasWild && this.text != input) {\n      matches = false;\n    } else {\n      testParts = (input || '').split(this.separator);\n      for (ii = 0; matches && ii < partsCount; ii++) {\n        if (parts[ii] === '*')  {\n          continue;\n        } else if (ii < testParts.length) {\n          matches = parts[ii] === testParts[ii];\n        } else {\n          matches = false;\n        }\n      }\n\n      // If matches, then return the component parts\n      matches = matches && testParts;\n    }\n  }\n  else if (typeof input.splice == 'function') {\n    matches = [];\n\n    for (ii = input.length; ii--; ) {\n      if (this.match(input[ii])) {\n        matches[matches.length] = input[ii];\n      }\n    }\n  }\n  else if (typeof input == 'object') {\n    matches = {};\n\n    for (var key in input) {\n      if (this.match(key)) {\n        matches[key] = input[key];\n      }\n    }\n  }\n\n  return matches;\n};\n\nmodule.exports = function(text, test, separator) {\n  var matcher = new WildcardMatcher(text, separator || /[\\/\\.]/);\n  if (typeof test != 'undefined') {\n    return matcher.match(test);\n  }\n\n  return matcher;\n};\n", "var wildcard = require('wildcard');\nvar reMimePartSplit = /[\\/\\+\\.]/;\n\n/**\n  # mime-match\n\n  A simple function to checker whether a target mime type matches a mime-type\n  pattern (e.g. image/jpeg matches image/jpeg OR image/*).\n\n  ## Example Usage\n\n  <<< example.js\n\n**/\nmodule.exports = function(target, pattern) {\n  function test(pattern) {\n    var result = wildcard(pattern, target, reMimePartSplit);\n\n    // ensure that we have a valid mime type (should have two parts)\n    return result && result.length >= 2;\n  }\n\n  return pattern ? test(pattern.split(';')[0]) : test;\n};\n", "import prettierBytes from '@transloadit/prettier-bytes';\n// @ts-ignore untyped\nimport match from 'mime-match';\nconst defaultOptions = {\n    maxFileSize: null,\n    minFileSize: null,\n    maxTotalFileSize: null,\n    maxNumberOfFiles: null,\n    minNumberOfFiles: null,\n    allowedFileTypes: null,\n    requiredMetaFields: [],\n};\nclass RestrictionError extends Error {\n    isUserFacing;\n    file;\n    constructor(message, opts) {\n        super(message);\n        this.isUserFacing = opts?.isUserFacing ?? true;\n        if (opts?.file) {\n            this.file = opts.file; // only some restriction errors are related to a particular file\n        }\n    }\n    isRestriction = true;\n}\nclass Restricter {\n    getI18n;\n    getOpts;\n    constructor(getOpts, getI18n) {\n        this.getI18n = getI18n;\n        this.getOpts = () => {\n            const opts = getOpts();\n            if (opts.restrictions?.allowedFileTypes != null &&\n                !Array.isArray(opts.restrictions.allowedFileTypes)) {\n                throw new TypeError('`restrictions.allowedFileTypes` must be an array');\n            }\n            return opts;\n        };\n    }\n    // Because these operations are slow, we cannot run them for every file (if we are adding multiple files)\n    validateAggregateRestrictions(existingFiles, addingFiles) {\n        const { maxTotalFileSize, maxNumberOfFiles } = this.getOpts().restrictions;\n        if (maxNumberOfFiles) {\n            const nonGhostFiles = existingFiles.filter((f) => !f.isGhost);\n            if (nonGhostFiles.length + addingFiles.length > maxNumberOfFiles) {\n                throw new RestrictionError(`${this.getI18n()('youCanOnlyUploadX', {\n                    smart_count: maxNumberOfFiles,\n                })}`);\n            }\n        }\n        if (maxTotalFileSize) {\n            const totalFilesSize = [...existingFiles, ...addingFiles].reduce((total, f) => total + (f.size ?? 0), 0);\n            if (totalFilesSize > maxTotalFileSize) {\n                throw new RestrictionError(this.getI18n()('aggregateExceedsSize', {\n                    sizeAllowed: prettierBytes(maxTotalFileSize),\n                    size: prettierBytes(totalFilesSize),\n                }));\n            }\n        }\n    }\n    validateSingleFile(file) {\n        const { maxFileSize, minFileSize, allowedFileTypes } = this.getOpts().restrictions;\n        if (allowedFileTypes) {\n            const isCorrectFileType = allowedFileTypes.some((type) => {\n                // check if this is a mime-type\n                if (type.includes('/')) {\n                    if (!file.type)\n                        return false;\n                    return match(file.type.replace(/;.*?$/, ''), type);\n                }\n                // otherwise this is likely an extension\n                if (type[0] === '.' && file.extension) {\n                    return file.extension.toLowerCase() === type.slice(1).toLowerCase();\n                }\n                return false;\n            });\n            if (!isCorrectFileType) {\n                const allowedFileTypesString = allowedFileTypes.join(', ');\n                throw new RestrictionError(this.getI18n()('youCanOnlyUploadFileTypes', {\n                    types: allowedFileTypesString,\n                }), { file });\n            }\n        }\n        // We can't check maxFileSize if the size is unknown.\n        if (maxFileSize && file.size != null && file.size > maxFileSize) {\n            throw new RestrictionError(this.getI18n()('exceedsSize', {\n                size: prettierBytes(maxFileSize),\n                file: file.name ?? this.getI18n()('unnamed'),\n            }), { file });\n        }\n        // We can't check minFileSize if the size is unknown.\n        if (minFileSize && file.size != null && file.size < minFileSize) {\n            throw new RestrictionError(this.getI18n()('inferiorSize', {\n                size: prettierBytes(minFileSize),\n            }), { file });\n        }\n    }\n    validate(existingFiles, addingFiles) {\n        addingFiles.forEach((addingFile) => {\n            this.validateSingleFile(addingFile);\n        });\n        this.validateAggregateRestrictions(existingFiles, addingFiles);\n    }\n    validateMinNumberOfFiles(files) {\n        const { minNumberOfFiles } = this.getOpts().restrictions;\n        if (minNumberOfFiles && Object.keys(files).length < minNumberOfFiles) {\n            throw new RestrictionError(this.getI18n()('youHaveToAtLeastSelectX', {\n                smart_count: minNumberOfFiles,\n            }));\n        }\n    }\n    getMissingRequiredMetaFields(file) {\n        const error = new RestrictionError(this.getI18n()('missingRequiredMetaFieldOnFile', {\n            fileName: file.name ?? this.getI18n()('unnamed'),\n        }));\n        const { requiredMetaFields } = this.getOpts().restrictions;\n        const missingFields = [];\n        for (const field of requiredMetaFields) {\n            if (!Object.hasOwn(file.meta, field) || file.meta[field] === '') {\n                missingFields.push(field);\n            }\n        }\n        return { missingFields, error };\n    }\n}\nexport { Restricter, defaultOptions, RestrictionError };\n", "// Edge 15.x does not fire 'progress' events on uploads.\n// See https://github.com/transloadit/uppy/issues/945\n// And https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12224510/\nexport default function supportsUploadProgress(userAgent) {\n    // Allow passing in userAgent for tests\n    if (userAgent == null && typeof navigator !== 'undefined') {\n        userAgent = navigator.userAgent;\n    }\n    // Assume it works because basically everything supports progress events.\n    if (!userAgent)\n        return true;\n    const m = /Edge\\/(\\d+\\.\\d+)/.exec(userAgent);\n    if (!m)\n        return true;\n    const edgeVersion = m[1];\n    const version = edgeVersion.split('.', 2);\n    const major = parseInt(version[0], 10);\n    const minor = parseInt(version[1], 10);\n    // Worked before:\n    // Edge 40.15063.0.0\n    // Microsoft EdgeHTML 15.15063\n    if (major < 15 || (major === 15 && minor < 15063)) {\n        return true;\n    }\n    // Fixed in:\n    // Microsoft EdgeHTML 18.18218\n    if (major > 18 || (major === 18 && minor >= 18218)) {\n        return true;\n    }\n    // other versions don't work.\n    return false;\n}\n", "/* global AggregateError */\nimport DefaultStore, {} from '@uppy/store-default';\nimport { getSafeFileId } from '@uppy/utils/lib/generateFileID';\nimport getFileNameAndExtension from '@uppy/utils/lib/getFileNameAndExtension';\nimport getFileType from '@uppy/utils/lib/getFileType';\nimport Translator from '@uppy/utils/lib/Translator';\nimport throttle from 'lodash/throttle.js';\n// @ts-ignore untyped\nimport ee from 'namespace-emitter';\nimport { nanoid } from 'nanoid/non-secure';\nimport packageJson from '../package.json' with { type: 'json' };\nimport getFileName from './getFileName.js';\nimport locale from './locale.js';\nimport { debugLogger, justErrorsLogger } from './loggers.js';\nimport { defaultOptions as defaultRestrictionOptions, Restricter, RestrictionError, } from './Restricter.js';\nimport supportsUploadProgress from './supportsUploadProgress.js';\nconst defaultUploadState = {\n    totalProgress: 0,\n    allowNewUpload: true,\n    error: null,\n    recoveredState: null,\n};\n/**\n * Uppy Core module.\n * Manages plugins, state updates, acts as an event bus,\n * adds/removes files and metadata.\n */\nexport class Uppy {\n    static VERSION = packageJson.version;\n    #plugins = Object.create(null);\n    #restricter;\n    #storeUnsubscribe;\n    #emitter = ee();\n    #preProcessors = new Set();\n    #uploaders = new Set();\n    #postProcessors = new Set();\n    defaultLocale;\n    locale;\n    // The user optionally passes in options, but we set defaults for missing options.\n    // We consider all options present after the contructor has run.\n    opts;\n    store;\n    // Warning: do not use this from a plugin, as it will cause the plugins' translations to be missing\n    i18n;\n    i18nArray;\n    scheduledAutoProceed = null;\n    wasOffline = false;\n    /**\n     * Instantiate Uppy\n     */\n    constructor(opts) {\n        this.defaultLocale = locale;\n        const defaultOptions = {\n            id: 'uppy',\n            autoProceed: false,\n            allowMultipleUploadBatches: true,\n            debug: false,\n            restrictions: defaultRestrictionOptions,\n            meta: {},\n            onBeforeFileAdded: (file, files) => !Object.hasOwn(files, file.id),\n            onBeforeUpload: (files) => files,\n            store: new DefaultStore(),\n            logger: justErrorsLogger,\n            infoTimeout: 5000,\n        };\n        const merged = { ...defaultOptions, ...opts };\n        // Merge default options with the ones set by user,\n        // making sure to merge restrictions too\n        this.opts = {\n            ...merged,\n            restrictions: {\n                ...defaultOptions.restrictions,\n                ...opts?.restrictions,\n            },\n        };\n        // Support debug: true for backwards-compatability, unless logger is set in opts\n        // opts instead of this.opts to avoid comparing objects \u2014 we set logger: justErrorsLogger in defaultOptions\n        if (opts?.logger && opts.debug) {\n            this.log('You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.', 'warning');\n        }\n        else if (opts?.debug) {\n            this.opts.logger = debugLogger;\n        }\n        this.log(`Using Core v${Uppy.VERSION}`);\n        this.i18nInit();\n        this.store = this.opts.store;\n        this.setState({\n            ...defaultUploadState,\n            plugins: {},\n            files: {},\n            currentUploads: {},\n            capabilities: {\n                uploadProgress: supportsUploadProgress(),\n                individualCancellation: true,\n                resumableUploads: false,\n            },\n            meta: { ...this.opts.meta },\n            info: [],\n        });\n        this.#restricter = new Restricter(() => this.opts, () => this.i18n);\n        this.#storeUnsubscribe = this.store.subscribe((prevState, nextState, patch) => {\n            this.emit('state-update', prevState, nextState, patch);\n            this.updateAll(nextState);\n        });\n        // Exposing uppy object on window for debugging and testing\n        if (this.opts.debug && typeof window !== 'undefined') {\n            // @ts-ignore Mutating the global object for debug purposes\n            window[this.opts.id] = this;\n        }\n        this.#addListeners();\n    }\n    emit(event, ...args) {\n        this.#emitter.emit(event, ...args);\n    }\n    on(event, callback) {\n        this.#emitter.on(event, callback);\n        return this;\n    }\n    once(event, callback) {\n        this.#emitter.once(event, callback);\n        return this;\n    }\n    off(event, callback) {\n        this.#emitter.off(event, callback);\n        return this;\n    }\n    /**\n     * Iterate on all plugins and run `update` on them.\n     * Called each time state changes.\n     *\n     */\n    updateAll(state) {\n        this.iteratePlugins((plugin) => {\n            plugin.update(state);\n        });\n    }\n    /**\n     * Updates state with a patch\n     */\n    setState(patch) {\n        this.store.setState(patch);\n    }\n    /**\n     * Returns current state.\n     */\n    getState() {\n        return this.store.getState();\n    }\n    patchFilesState(filesWithNewState) {\n        const existingFilesState = this.getState().files;\n        this.setState({\n            files: {\n                ...existingFilesState,\n                ...Object.fromEntries(Object.entries(filesWithNewState).map(([fileID, newFileState]) => [\n                    fileID,\n                    {\n                        ...existingFilesState[fileID],\n                        ...newFileState,\n                    },\n                ])),\n            },\n        });\n    }\n    /**\n     * Shorthand to set state for a specific file.\n     */\n    setFileState(fileID, state) {\n        if (!this.getState().files[fileID]) {\n            throw new Error(`Can\u2019t set state for ${fileID} (the file could have been removed)`);\n        }\n        this.patchFilesState({ [fileID]: state });\n    }\n    i18nInit() {\n        const onMissingKey = (key) => this.log(`Missing i18n string: ${key}`, 'error');\n        const translator = new Translator([this.defaultLocale, this.opts.locale], {\n            onMissingKey,\n        });\n        this.i18n = translator.translate.bind(translator);\n        this.i18nArray = translator.translateArray.bind(translator);\n        this.locale = translator.locale;\n    }\n    setOptions(newOpts) {\n        this.opts = {\n            ...this.opts,\n            ...newOpts,\n            restrictions: {\n                ...this.opts.restrictions,\n                ...newOpts?.restrictions,\n            },\n        };\n        if (newOpts.meta) {\n            this.setMeta(newOpts.meta);\n        }\n        this.i18nInit();\n        if (newOpts.locale) {\n            this.iteratePlugins((plugin) => {\n                plugin.setOptions(newOpts);\n            });\n        }\n        // Note: this is not the preact `setState`, it's an internal function that has the same name.\n        this.setState(undefined); // so that UI re-renders with new options\n    }\n    resetProgress() {\n        const defaultProgress = {\n            percentage: 0,\n            bytesUploaded: false,\n            uploadComplete: false,\n            uploadStarted: null,\n        };\n        const files = { ...this.getState().files };\n        const updatedFiles = Object.create(null);\n        Object.keys(files).forEach((fileID) => {\n            updatedFiles[fileID] = {\n                ...files[fileID],\n                progress: {\n                    ...files[fileID].progress,\n                    ...defaultProgress,\n                },\n                // @ts-expect-error these typed are inserted\n                // into the namespace in their respective packages\n                // but core isn't ware of those\n                tus: undefined,\n                transloadit: undefined,\n            };\n        });\n        this.setState({ files: updatedFiles, ...defaultUploadState });\n    }\n    clear() {\n        const { capabilities, currentUploads } = this.getState();\n        if (Object.keys(currentUploads).length > 0 &&\n            !capabilities.individualCancellation) {\n            throw new Error('The installed uploader plugin does not allow removing files during an upload.');\n        }\n        this.setState({ ...defaultUploadState, files: {} });\n    }\n    addPreProcessor(fn) {\n        this.#preProcessors.add(fn);\n    }\n    removePreProcessor(fn) {\n        return this.#preProcessors.delete(fn);\n    }\n    addPostProcessor(fn) {\n        this.#postProcessors.add(fn);\n    }\n    removePostProcessor(fn) {\n        return this.#postProcessors.delete(fn);\n    }\n    addUploader(fn) {\n        this.#uploaders.add(fn);\n    }\n    removeUploader(fn) {\n        return this.#uploaders.delete(fn);\n    }\n    setMeta(data) {\n        const updatedMeta = { ...this.getState().meta, ...data };\n        const updatedFiles = { ...this.getState().files };\n        Object.keys(updatedFiles).forEach((fileID) => {\n            updatedFiles[fileID] = {\n                ...updatedFiles[fileID],\n                meta: { ...updatedFiles[fileID].meta, ...data },\n            };\n        });\n        this.log('Adding metadata:');\n        this.log(data);\n        this.setState({\n            meta: updatedMeta,\n            files: updatedFiles,\n        });\n    }\n    setFileMeta(fileID, data) {\n        const updatedFiles = { ...this.getState().files };\n        if (!updatedFiles[fileID]) {\n            this.log(`Was trying to set metadata for a file that has been removed: ${fileID}`);\n            return;\n        }\n        const newMeta = { ...updatedFiles[fileID].meta, ...data };\n        updatedFiles[fileID] = { ...updatedFiles[fileID], meta: newMeta };\n        this.setState({ files: updatedFiles });\n    }\n    /**\n     * Get a file object.\n     */\n    getFile(fileID) {\n        return this.getState().files[fileID];\n    }\n    /**\n     * Get all files in an array.\n     */\n    getFiles() {\n        const { files } = this.getState();\n        return Object.values(files);\n    }\n    getFilesByIds(ids) {\n        return ids.map((id) => this.getFile(id));\n    }\n    getObjectOfFilesPerState() {\n        const { files: filesObject, totalProgress, error } = this.getState();\n        const files = Object.values(filesObject);\n        const inProgressFiles = [];\n        const newFiles = [];\n        const startedFiles = [];\n        const uploadStartedFiles = [];\n        const pausedFiles = [];\n        const completeFiles = [];\n        const erroredFiles = [];\n        const inProgressNotPausedFiles = [];\n        const processingFiles = [];\n        for (const file of files) {\n            const { progress } = file;\n            if (!progress.uploadComplete && progress.uploadStarted) {\n                inProgressFiles.push(file);\n                if (!file.isPaused) {\n                    inProgressNotPausedFiles.push(file);\n                }\n            }\n            if (!progress.uploadStarted) {\n                newFiles.push(file);\n            }\n            if (progress.uploadStarted ||\n                progress.preprocess ||\n                progress.postprocess) {\n                startedFiles.push(file);\n            }\n            if (progress.uploadStarted) {\n                uploadStartedFiles.push(file);\n            }\n            if (file.isPaused) {\n                pausedFiles.push(file);\n            }\n            if (progress.uploadComplete) {\n                completeFiles.push(file);\n            }\n            if (file.error) {\n                erroredFiles.push(file);\n            }\n            if (progress.preprocess || progress.postprocess) {\n                processingFiles.push(file);\n            }\n        }\n        return {\n            newFiles,\n            startedFiles,\n            uploadStartedFiles,\n            pausedFiles,\n            completeFiles,\n            erroredFiles,\n            inProgressFiles,\n            inProgressNotPausedFiles,\n            processingFiles,\n            isUploadStarted: uploadStartedFiles.length > 0,\n            isAllComplete: totalProgress === 100 &&\n                completeFiles.length === files.length &&\n                processingFiles.length === 0,\n            isAllErrored: !!error && erroredFiles.length === files.length,\n            isAllPaused: inProgressFiles.length !== 0 &&\n                pausedFiles.length === inProgressFiles.length,\n            isUploadInProgress: inProgressFiles.length > 0,\n            isSomeGhost: files.some((file) => file.isGhost),\n        };\n    }\n    #informAndEmit(errors) {\n        for (const error of errors) {\n            if (error.isRestriction) {\n                this.emit('restriction-failed', error.file, error);\n            }\n            else {\n                this.emit('error', error, error.file);\n            }\n            this.log(error, 'warning');\n        }\n        const userFacingErrors = errors.filter((error) => error.isUserFacing);\n        // don't flood the user: only show the first 4 toasts\n        const maxNumToShow = 4;\n        const firstErrors = userFacingErrors.slice(0, maxNumToShow);\n        const additionalErrors = userFacingErrors.slice(maxNumToShow);\n        firstErrors.forEach(({ message, details = '' }) => {\n            this.info({ message, details }, 'error', this.opts.infoTimeout);\n        });\n        if (additionalErrors.length > 0) {\n            this.info({\n                message: this.i18n('additionalRestrictionsFailed', {\n                    count: additionalErrors.length,\n                }),\n            });\n        }\n    }\n    validateRestrictions(file, files = this.getFiles()) {\n        try {\n            this.#restricter.validate(files, [file]);\n        }\n        catch (err) {\n            return err;\n        }\n        return null;\n    }\n    validateSingleFile(file) {\n        try {\n            this.#restricter.validateSingleFile(file);\n        }\n        catch (err) {\n            return err.message;\n        }\n        return null;\n    }\n    validateAggregateRestrictions(files) {\n        const existingFiles = this.getFiles();\n        try {\n            this.#restricter.validateAggregateRestrictions(existingFiles, files);\n        }\n        catch (err) {\n            return err.message;\n        }\n        return null;\n    }\n    #checkRequiredMetaFieldsOnFile(file) {\n        const { missingFields, error } = this.#restricter.getMissingRequiredMetaFields(file);\n        if (missingFields.length > 0) {\n            this.setFileState(file.id, {\n                missingRequiredMetaFields: missingFields,\n                error: error.message,\n            });\n            this.log(error.message);\n            this.emit('restriction-failed', file, error);\n            return false;\n        }\n        if (missingFields.length === 0 && file.missingRequiredMetaFields) {\n            this.setFileState(file.id, {\n                missingRequiredMetaFields: [],\n            });\n        }\n        return true;\n    }\n    #checkRequiredMetaFields(files) {\n        let success = true;\n        for (const file of Object.values(files)) {\n            if (!this.#checkRequiredMetaFieldsOnFile(file)) {\n                success = false;\n            }\n        }\n        return success;\n    }\n    #assertNewUploadAllowed(file) {\n        const { allowNewUpload } = this.getState();\n        if (allowNewUpload === false) {\n            const error = new RestrictionError(this.i18n('noMoreFilesAllowed'), {\n                file,\n            });\n            this.#informAndEmit([error]);\n            throw error;\n        }\n    }\n    checkIfFileAlreadyExists(fileID) {\n        const { files } = this.getState();\n        if (files[fileID] && !files[fileID].isGhost) {\n            return true;\n        }\n        return false;\n    }\n    /**\n     * Create a file state object based on user-provided `addFile()` options.\n     */\n    #transformFile(fileDescriptorOrFile) {\n        // Uppy expects files in { name, type, size, data } format.\n        // If the actual File object is passed from input[type=file] or drag-drop,\n        // we normalize it to match Uppy file object\n        const file = (fileDescriptorOrFile instanceof File\n            ? {\n                name: fileDescriptorOrFile.name,\n                type: fileDescriptorOrFile.type,\n                size: fileDescriptorOrFile.size,\n                data: fileDescriptorOrFile,\n            }\n            : fileDescriptorOrFile);\n        const fileType = getFileType(file);\n        const fileName = getFileName(fileType, file);\n        const fileExtension = getFileNameAndExtension(fileName).extension;\n        const id = getSafeFileId(file, this.getID());\n        const meta = file.meta || {};\n        meta.name = fileName;\n        meta.type = fileType;\n        // `null` means the size is unknown.\n        const size = Number.isFinite(file.data.size)\n            ? file.data.size\n            : null;\n        return {\n            source: file.source || '',\n            id,\n            name: fileName,\n            extension: fileExtension || '',\n            meta: {\n                ...this.getState().meta,\n                ...meta,\n            },\n            type: fileType,\n            data: file.data,\n            progress: {\n                percentage: 0,\n                bytesUploaded: false,\n                bytesTotal: size,\n                uploadComplete: false,\n                uploadStarted: null,\n            },\n            size,\n            isGhost: false,\n            isRemote: file.isRemote || false,\n            remote: file.remote,\n            preview: file.preview,\n        };\n    }\n    // Schedule an upload if `autoProceed` is enabled.\n    #startIfAutoProceed() {\n        if (this.opts.autoProceed && !this.scheduledAutoProceed) {\n            this.scheduledAutoProceed = setTimeout(() => {\n                this.scheduledAutoProceed = null;\n                this.upload().catch((err) => {\n                    if (!err.isRestriction) {\n                        this.log(err.stack || err.message || err);\n                    }\n                });\n            }, 4);\n        }\n    }\n    #checkAndUpdateFileState(filesToAdd) {\n        let { files: existingFiles } = this.getState();\n        // create a copy of the files object only once\n        let nextFilesState = { ...existingFiles };\n        const validFilesToAdd = [];\n        const errors = [];\n        for (const fileToAdd of filesToAdd) {\n            try {\n                let newFile = this.#transformFile(fileToAdd);\n                // If a file has been recovered (Golden Retriever), but we were unable to recover its data (probably too large),\n                // users are asked to re-select these half-recovered files and then this method will be called again.\n                // In order to keep the progress, meta and everything else, we keep the existing file,\n                // but we replace `data`, and we remove `isGhost`, because the file is no longer a ghost now\n                const isGhost = existingFiles[newFile.id]?.isGhost;\n                if (isGhost) {\n                    const existingFileState = existingFiles[newFile.id];\n                    newFile = {\n                        ...existingFileState,\n                        isGhost: false,\n                        data: fileToAdd.data,\n                    };\n                    this.log(`Replaced the blob in the restored ghost file: ${newFile.name}, ${newFile.id}`);\n                }\n                const onBeforeFileAddedResult = this.opts.onBeforeFileAdded(newFile, nextFilesState);\n                // update state after onBeforeFileAdded\n                existingFiles = this.getState().files;\n                nextFilesState = { ...existingFiles, ...nextFilesState };\n                if (!onBeforeFileAddedResult &&\n                    this.checkIfFileAlreadyExists(newFile.id)) {\n                    throw new RestrictionError(this.i18n('noDuplicates', {\n                        fileName: newFile.name ?? this.i18n('unnamed'),\n                    }), { file: fileToAdd });\n                }\n                // Pass through reselected files from Golden Retriever\n                if (onBeforeFileAddedResult === false && !isGhost) {\n                    // Don\u2019t show UI info for this error, as it should be done by the developer\n                    throw new RestrictionError('Cannot add the file because onBeforeFileAdded returned false.', { isUserFacing: false, file: fileToAdd });\n                }\n                else if (typeof onBeforeFileAddedResult === 'object' &&\n                    onBeforeFileAddedResult !== null) {\n                    newFile = onBeforeFileAddedResult;\n                }\n                this.#restricter.validateSingleFile(newFile);\n                // need to add it to the new local state immediately, so we can use the state to validate the next files too\n                nextFilesState[newFile.id] = newFile;\n                validFilesToAdd.push(newFile);\n            }\n            catch (err) {\n                errors.push(err);\n            }\n        }\n        try {\n            // need to run this separately because it's much more slow, so if we run it inside the for-loop it will be very slow\n            // when many files are added\n            this.#restricter.validateAggregateRestrictions(Object.values(existingFiles), validFilesToAdd);\n        }\n        catch (err) {\n            errors.push(err);\n            // If we have any aggregate error, don't allow adding this batch\n            return {\n                nextFilesState: existingFiles,\n                validFilesToAdd: [],\n                errors,\n            };\n        }\n        return {\n            nextFilesState,\n            validFilesToAdd,\n            errors,\n        };\n    }\n    /**\n     * Add a new file to `state.files`. This will run `onBeforeFileAdded`,\n     * try to guess file type in a clever way, check file against restrictions,\n     * and start an upload if `autoProceed === true`.\n     */\n    addFile(file) {\n        this.#assertNewUploadAllowed(file);\n        const { nextFilesState, validFilesToAdd, errors } = this.#checkAndUpdateFileState([file]);\n        const restrictionErrors = errors.filter((error) => error.isRestriction);\n        this.#informAndEmit(restrictionErrors);\n        if (errors.length > 0)\n            throw errors[0];\n        this.setState({ files: nextFilesState });\n        const [firstValidFileToAdd] = validFilesToAdd;\n        this.emit('file-added', firstValidFileToAdd);\n        this.emit('files-added', validFilesToAdd);\n        this.log(`Added file: ${firstValidFileToAdd.name}, ${firstValidFileToAdd.id}, mime type: ${firstValidFileToAdd.type}`);\n        this.#startIfAutoProceed();\n        return firstValidFileToAdd.id;\n    }\n    /**\n     * Add multiple files to `state.files`. See the `addFile()` documentation.\n     *\n     * If an error occurs while adding a file, it is logged and the user is notified.\n     * This is good for UI plugins, but not for programmatic use.\n     * Programmatic users should usually still use `addFile()` on individual files.\n     */\n    addFiles(fileDescriptors) {\n        this.#assertNewUploadAllowed();\n        const { nextFilesState, validFilesToAdd, errors } = this.#checkAndUpdateFileState(fileDescriptors);\n        const restrictionErrors = errors.filter((error) => error.isRestriction);\n        this.#informAndEmit(restrictionErrors);\n        const nonRestrictionErrors = errors.filter((error) => !error.isRestriction);\n        if (nonRestrictionErrors.length > 0) {\n            let message = 'Multiple errors occurred while adding files:\\n';\n            nonRestrictionErrors.forEach((subError) => {\n                message += `\\n * ${subError.message}`;\n            });\n            this.info({\n                message: this.i18n('addBulkFilesFailed', {\n                    smart_count: nonRestrictionErrors.length,\n                }),\n                details: message,\n            }, 'error', this.opts.infoTimeout);\n            if (typeof AggregateError === 'function') {\n                throw new AggregateError(nonRestrictionErrors, message);\n            }\n            else {\n                const err = new Error(message);\n                // @ts-expect-error fallback when AggregateError is not available\n                err.errors = nonRestrictionErrors;\n                throw err;\n            }\n        }\n        // OK, we haven't thrown an error, we can start updating state and emitting events now:\n        this.setState({ files: nextFilesState });\n        validFilesToAdd.forEach((file) => {\n            this.emit('file-added', file);\n        });\n        this.emit('files-added', validFilesToAdd);\n        if (validFilesToAdd.length > 5) {\n            this.log(`Added batch of ${validFilesToAdd.length} files`);\n        }\n        else {\n            Object.values(validFilesToAdd).forEach((file) => {\n                this.log(`Added file: ${file.name}\\n id: ${file.id}\\n type: ${file.type}`);\n            });\n        }\n        if (validFilesToAdd.length > 0) {\n            this.#startIfAutoProceed();\n        }\n    }\n    removeFiles(fileIDs) {\n        const { files, currentUploads } = this.getState();\n        const updatedFiles = { ...files };\n        const updatedUploads = { ...currentUploads };\n        const removedFiles = Object.create(null);\n        fileIDs.forEach((fileID) => {\n            if (files[fileID]) {\n                removedFiles[fileID] = files[fileID];\n                delete updatedFiles[fileID];\n            }\n        });\n        // Remove files from the `fileIDs` list in each upload.\n        function fileIsNotRemoved(uploadFileID) {\n            return removedFiles[uploadFileID] === undefined;\n        }\n        Object.keys(updatedUploads).forEach((uploadID) => {\n            const newFileIDs = currentUploads[uploadID].fileIDs.filter(fileIsNotRemoved);\n            // Remove the upload if no files are associated with it anymore.\n            if (newFileIDs.length === 0) {\n                delete updatedUploads[uploadID];\n                return;\n            }\n            const { capabilities } = this.getState();\n            if (newFileIDs.length !== currentUploads[uploadID].fileIDs.length &&\n                !capabilities.individualCancellation) {\n                throw new Error('The installed uploader plugin does not allow removing files during an upload.');\n            }\n            updatedUploads[uploadID] = {\n                ...currentUploads[uploadID],\n                fileIDs: newFileIDs,\n            };\n        });\n        const stateUpdate = {\n            currentUploads: updatedUploads,\n            files: updatedFiles,\n        };\n        // If all files were removed - allow new uploads,\n        // and clear recoveredState\n        if (Object.keys(updatedFiles).length === 0) {\n            stateUpdate.allowNewUpload = true;\n            stateUpdate.error = null;\n            stateUpdate.recoveredState = null;\n        }\n        this.setState(stateUpdate);\n        this.#updateTotalProgressThrottled();\n        const removedFileIDs = Object.keys(removedFiles);\n        removedFileIDs.forEach((fileID) => {\n            this.emit('file-removed', removedFiles[fileID]);\n        });\n        if (removedFileIDs.length > 5) {\n            this.log(`Removed ${removedFileIDs.length} files`);\n        }\n        else {\n            this.log(`Removed files: ${removedFileIDs.join(', ')}`);\n        }\n    }\n    removeFile(fileID) {\n        this.removeFiles([fileID]);\n    }\n    pauseResume(fileID) {\n        if (!this.getState().capabilities.resumableUploads ||\n            this.getFile(fileID).progress.uploadComplete) {\n            return undefined;\n        }\n        const file = this.getFile(fileID);\n        const wasPaused = file.isPaused || false;\n        const isPaused = !wasPaused;\n        this.setFileState(fileID, {\n            isPaused,\n        });\n        this.emit('upload-pause', file, isPaused);\n        return isPaused;\n    }\n    pauseAll() {\n        const updatedFiles = { ...this.getState().files };\n        const inProgressUpdatedFiles = Object.keys(updatedFiles).filter((file) => {\n            return (!updatedFiles[file].progress.uploadComplete &&\n                updatedFiles[file].progress.uploadStarted);\n        });\n        inProgressUpdatedFiles.forEach((file) => {\n            const updatedFile = { ...updatedFiles[file], isPaused: true };\n            updatedFiles[file] = updatedFile;\n        });\n        this.setState({ files: updatedFiles });\n        this.emit('pause-all');\n    }\n    resumeAll() {\n        const updatedFiles = { ...this.getState().files };\n        const inProgressUpdatedFiles = Object.keys(updatedFiles).filter((file) => {\n            return (!updatedFiles[file].progress.uploadComplete &&\n                updatedFiles[file].progress.uploadStarted);\n        });\n        inProgressUpdatedFiles.forEach((file) => {\n            const updatedFile = {\n                ...updatedFiles[file],\n                isPaused: false,\n                error: null,\n            };\n            updatedFiles[file] = updatedFile;\n        });\n        this.setState({ files: updatedFiles });\n        this.emit('resume-all');\n    }\n    #getFilesToRetry() {\n        const { files } = this.getState();\n        return Object.keys(files).filter((fileId) => {\n            const file = files[fileId];\n            // Only retry files that have errors AND don't have missing required metadata\n            return (file.error &&\n                (!file.missingRequiredMetaFields ||\n                    file.missingRequiredMetaFields.length === 0));\n        });\n    }\n    async #doRetryAll() {\n        const filesToRetry = this.#getFilesToRetry();\n        const updatedFiles = { ...this.getState().files };\n        filesToRetry.forEach((fileID) => {\n            updatedFiles[fileID] = {\n                ...updatedFiles[fileID],\n                isPaused: false,\n                error: null,\n            };\n        });\n        this.setState({\n            files: updatedFiles,\n            error: null,\n        });\n        this.emit('retry-all', this.getFilesByIds(filesToRetry));\n        if (filesToRetry.length === 0) {\n            return {\n                successful: [],\n                failed: [],\n            };\n        }\n        const uploadID = this.#createUpload(filesToRetry, {\n            forceAllowNewUpload: true, // create new upload even if allowNewUpload: false\n        });\n        return this.#runUpload(uploadID);\n    }\n    async retryAll() {\n        const result = await this.#doRetryAll();\n        this.emit('complete', result);\n        return result;\n    }\n    cancelAll() {\n        this.emit('cancel-all');\n        const { files } = this.getState();\n        const fileIDs = Object.keys(files);\n        if (fileIDs.length) {\n            this.removeFiles(fileIDs);\n        }\n        this.setState(defaultUploadState);\n    }\n    retryUpload(fileID) {\n        this.setFileState(fileID, {\n            error: null,\n            isPaused: false,\n        });\n        this.emit('upload-retry', this.getFile(fileID));\n        const uploadID = this.#createUpload([fileID], {\n            forceAllowNewUpload: true, // create new upload even if allowNewUpload: false\n        });\n        return this.#runUpload(uploadID);\n    }\n    logout() {\n        this.iteratePlugins((plugin) => {\n            ;\n            plugin.provider?.logout?.();\n        });\n    }\n    #handleUploadProgress = (file, progress) => {\n        const fileInState = file ? this.getFile(file.id) : undefined;\n        if (file == null || !fileInState) {\n            this.log(`Not setting progress for a file that has been removed: ${file?.id}`);\n            return;\n        }\n        if (fileInState.progress.percentage === 100) {\n            this.log(`Not setting progress for a file that has been already uploaded: ${file.id}`);\n            return;\n        }\n        const newProgress = {\n            bytesTotal: progress.bytesTotal,\n            // bytesTotal may be null or zero; in that case we can't divide by it\n            percentage: progress.bytesTotal != null &&\n                Number.isFinite(progress.bytesTotal) &&\n                progress.bytesTotal > 0\n                ? Math.round((progress.bytesUploaded / progress.bytesTotal) * 100)\n                : undefined,\n        };\n        if (fileInState.progress.uploadStarted != null) {\n            this.setFileState(file.id, {\n                progress: {\n                    ...fileInState.progress,\n                    ...newProgress,\n                    bytesUploaded: progress.bytesUploaded,\n                },\n            });\n        }\n        else {\n            this.setFileState(file.id, {\n                progress: {\n                    ...fileInState.progress,\n                    ...newProgress,\n                },\n            });\n        }\n        this.#updateTotalProgressThrottled();\n    };\n    #updateTotalProgress() {\n        const totalProgress = this.#calculateTotalProgress();\n        let totalProgressPercent = null;\n        if (totalProgress != null) {\n            totalProgressPercent = Math.round(totalProgress * 100);\n            if (totalProgressPercent > 100)\n                totalProgressPercent = 100;\n            else if (totalProgressPercent < 0)\n                totalProgressPercent = 0;\n        }\n        this.emit('progress', totalProgressPercent ?? 0);\n        this.setState({\n            totalProgress: totalProgressPercent ?? 0,\n        });\n    }\n    // ___Why throttle at 500ms?\n    //    - We must throttle at >250ms for superfocus in Dashboard to work well\n    //    (because animation takes 0.25s, and we want to wait for all animations to be over before refocusing).\n    //    [Practical Check]: if thottle is at 100ms, then if you are uploading a file,\n    //    and click 'ADD MORE FILES', - focus won't activate in Firefox.\n    //    - We must throttle at around >500ms to avoid performance lags.\n    //    [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.\n    #updateTotalProgressThrottled = throttle(() => this.#updateTotalProgress(), 500, { leading: true, trailing: true });\n    [Symbol.for('uppy test: updateTotalProgress')]() {\n        return this.#updateTotalProgress();\n    }\n    #calculateTotalProgress() {\n        // calculate total progress, using the number of files currently uploading,\n        // between 0 and 1 and sum of individual progress of each file\n        const files = this.getFiles();\n        // note: also includes files that have completed uploading:\n        const filesInProgress = files.filter((file) => {\n            return (file.progress.uploadStarted ||\n                file.progress.preprocess ||\n                file.progress.postprocess);\n        });\n        if (filesInProgress.length === 0) {\n            return 0;\n        }\n        if (filesInProgress.every((file) => file.progress.uploadComplete)) {\n            // If every uploading file is complete, and we're still getting progress, it probably means\n            // there's a bug somewhere in some progress reporting code (maybe not even our code)\n            // and we're still getting progress, so let's just assume it means a 100% progress\n            return 1;\n        }\n        const isSizedFile = (file) => file.progress.bytesTotal != null && file.progress.bytesTotal !== 0;\n        const sizedFilesInProgress = filesInProgress.filter(isSizedFile);\n        const unsizedFilesInProgress = filesInProgress.filter((file) => !isSizedFile(file));\n        if (sizedFilesInProgress.every((file) => file.progress.uploadComplete) &&\n            unsizedFilesInProgress.length > 0 &&\n            !unsizedFilesInProgress.every((file) => file.progress.uploadComplete)) {\n            // we are done with uploading all files of known size, however\n            // there is at least one file with unknown size still uploading,\n            // and we cannot say anything about their progress\n            // In any case, return null because it doesn't make any sense to show a progress\n            return null;\n        }\n        const totalFilesSize = sizedFilesInProgress.reduce((acc, file) => acc + (file.progress.bytesTotal ?? 0), 0);\n        const totalUploadedSize = sizedFilesInProgress.reduce((acc, file) => acc + (file.progress.bytesUploaded || 0), 0);\n        return totalFilesSize === 0 ? 0 : totalUploadedSize / totalFilesSize;\n    }\n    /**\n     * Registers listeners for all global actions, like:\n     * `error`, `file-removed`, `upload-progress`\n     */\n    #addListeners() {\n        // Type inference only works for inline functions so we have to type it again\n        const errorHandler = (error, file, response) => {\n            let errorMsg = error.message || 'Unknown error';\n            if (error.details) {\n                errorMsg += ` ${error.details}`;\n            }\n            this.setState({ error: errorMsg });\n            if (file != null && file.id in this.getState().files) {\n                this.setFileState(file.id, {\n                    error: errorMsg,\n                    response,\n                });\n            }\n        };\n        this.on('error', errorHandler);\n        this.on('upload-error', (file, error, response) => {\n            errorHandler(error, file, response);\n            if (typeof error === 'object' && error.message) {\n                this.log(error.message, 'error');\n                const newError = new Error(this.i18n('failedToUpload', { file: file?.name ?? '' })); // we may want a new custom error here\n                newError.isUserFacing = true; // todo maybe don't do this with all errors?\n                newError.details = error.message;\n                if (error.details) {\n                    newError.details += ` ${error.details}`;\n                }\n                this.#informAndEmit([newError]);\n            }\n            else {\n                this.#informAndEmit([error]);\n            }\n        });\n        let uploadStalledWarningRecentlyEmitted = null;\n        this.on('upload-stalled', (error, files) => {\n            const { message } = error;\n            const details = files.map((file) => file.meta.name).join(', ');\n            if (!uploadStalledWarningRecentlyEmitted) {\n                this.info({ message, details }, 'warning', this.opts.infoTimeout);\n                uploadStalledWarningRecentlyEmitted = setTimeout(() => {\n                    uploadStalledWarningRecentlyEmitted = null;\n                }, this.opts.infoTimeout);\n            }\n            this.log(`${message} ${details}`.trim(), 'warning');\n        });\n        this.on('upload', () => {\n            this.setState({ error: null });\n        });\n        const onUploadStarted = (files) => {\n            const filesFiltered = files.filter((file) => {\n                const exists = file != null && this.getFile(file.id);\n                if (!exists)\n                    this.log(`Not setting progress for a file that has been removed: ${file?.id}`);\n                return exists;\n            });\n            const filesState = Object.fromEntries(filesFiltered.map((file) => [\n                file.id,\n                {\n                    progress: {\n                        uploadStarted: Date.now(),\n                        uploadComplete: false,\n                        bytesUploaded: 0,\n                        bytesTotal: file.size,\n                    },\n                },\n            ]));\n            this.patchFilesState(filesState);\n        };\n        this.on('upload-start', onUploadStarted);\n        this.on('upload-progress', this.#handleUploadProgress);\n        this.on('upload-success', (file, uploadResp) => {\n            if (file == null || !this.getFile(file.id)) {\n                this.log(`Not setting progress for a file that has been removed: ${file?.id}`);\n                return;\n            }\n            const currentProgress = this.getFile(file.id).progress;\n            this.setFileState(file.id, {\n                progress: {\n                    ...currentProgress,\n                    postprocess: this.#postProcessors.size > 0\n                        ? {\n                            mode: 'indeterminate',\n                        }\n                        : undefined,\n                    uploadComplete: true,\n                    percentage: 100,\n                    bytesUploaded: currentProgress.bytesTotal,\n                },\n                response: uploadResp,\n                uploadURL: uploadResp.uploadURL,\n                isPaused: false,\n            });\n            // Remote providers sometimes don't tell us the file size,\n            // but we can know how many bytes we uploaded once the upload is complete.\n            if (file.size == null) {\n                this.setFileState(file.id, {\n                    size: uploadResp.bytesUploaded || currentProgress.bytesTotal,\n                });\n            }\n            this.#updateTotalProgressThrottled();\n        });\n        this.on('preprocess-progress', (file, progress) => {\n            if (file == null || !this.getFile(file.id)) {\n                this.log(`Not setting progress for a file that has been removed: ${file?.id}`);\n                return;\n            }\n            this.setFileState(file.id, {\n                progress: { ...this.getFile(file.id).progress, preprocess: progress },\n            });\n        });\n        this.on('preprocess-complete', (file) => {\n            if (file == null || !this.getFile(file.id)) {\n                this.log(`Not setting progress for a file that has been removed: ${file?.id}`);\n                return;\n            }\n            const files = { ...this.getState().files };\n            files[file.id] = {\n                ...files[file.id],\n                progress: { ...files[file.id].progress },\n            };\n            delete files[file.id].progress.preprocess;\n            this.setState({ files });\n        });\n        this.on('postprocess-progress', (file, progress) => {\n            if (file == null || !this.getFile(file.id)) {\n                this.log(`Not setting progress for a file that has been removed: ${file?.id}`);\n                return;\n            }\n            this.setFileState(file.id, {\n                progress: {\n                    ...this.getState().files[file.id].progress,\n                    postprocess: progress,\n                },\n            });\n        });\n        this.on('postprocess-complete', (file) => {\n            if (file == null || !this.getFile(file.id)) {\n                this.log(`Not setting progress for a file that has been removed: ${file?.id}`);\n                return;\n            }\n            const files = {\n                ...this.getState().files,\n            };\n            files[file.id] = {\n                ...files[file.id],\n                progress: {\n                    ...files[file.id].progress,\n                },\n            };\n            delete files[file.id].progress.postprocess;\n            this.setState({ files });\n        });\n        this.on('restored', () => {\n            // Files may have changed--ensure progress is still accurate.\n            this.#updateTotalProgressThrottled();\n        });\n        // @ts-expect-error should fix itself when dashboard it typed (also this doesn't belong here)\n        this.on('dashboard:file-edit-complete', (file) => {\n            if (file) {\n                this.#checkRequiredMetaFieldsOnFile(file);\n            }\n        });\n        // show informer if offline\n        if (typeof window !== 'undefined' && window.addEventListener) {\n            window.addEventListener('online', this.#updateOnlineStatus);\n            window.addEventListener('offline', this.#updateOnlineStatus);\n            setTimeout(this.#updateOnlineStatus, 3000);\n        }\n    }\n    updateOnlineStatus() {\n        const online = window.navigator.onLine ?? true;\n        if (!online) {\n            this.emit('is-offline');\n            this.info(this.i18n('noInternetConnection'), 'error', 0);\n            this.wasOffline = true;\n        }\n        else {\n            this.emit('is-online');\n            if (this.wasOffline) {\n                this.emit('back-online');\n                this.info(this.i18n('connectedToInternet'), 'success', 3000);\n                this.wasOffline = false;\n            }\n        }\n    }\n    #updateOnlineStatus = this.updateOnlineStatus.bind(this);\n    getID() {\n        return this.opts.id;\n    }\n    /**\n     * Registers a plugin with Core.\n     */\n    use(Plugin, \n    // We want to let the plugin decide whether `opts` is optional or not\n    // so we spread the argument rather than defining `opts:` ourselves.\n    ...args) {\n        if (typeof Plugin !== 'function') {\n            const msg = `Expected a plugin class, but got ${Plugin === null ? 'null' : typeof Plugin}.` +\n                ' Please verify that the plugin was imported and spelled correctly.';\n            throw new TypeError(msg);\n        }\n        // Instantiate\n        const plugin = new Plugin(this, ...args);\n        const pluginId = plugin.id;\n        if (!pluginId) {\n            throw new Error('Your plugin must have an id');\n        }\n        if (!plugin.type) {\n            throw new Error('Your plugin must have a type');\n        }\n        const existsPluginAlready = this.getPlugin(pluginId);\n        if (existsPluginAlready) {\n            const msg = `Already found a plugin named '${existsPluginAlready.id}'. ` +\n                `Tried to use: '${pluginId}'.\\n` +\n                'Uppy plugins must have unique `id` options.';\n            throw new Error(msg);\n        }\n        // @ts-expect-error does exist\n        if (Plugin.VERSION) {\n            // @ts-expect-error does exist\n            this.log(`Using ${pluginId} v${Plugin.VERSION}`);\n        }\n        if (plugin.type in this.#plugins) {\n            this.#plugins[plugin.type].push(plugin);\n        }\n        else {\n            this.#plugins[plugin.type] = [plugin];\n        }\n        plugin.install();\n        this.emit('plugin-added', plugin);\n        return this;\n    }\n    /**\n     * Find one Plugin by name.\n     */\n    getPlugin(id) {\n        for (const plugins of Object.values(this.#plugins)) {\n            const foundPlugin = plugins.find((plugin) => plugin.id === id);\n            if (foundPlugin != null)\n                return foundPlugin;\n        }\n        return undefined;\n    }\n    [Symbol.for('uppy test: getPlugins')](type) {\n        return this.#plugins[type];\n    }\n    /**\n     * Iterate through all `use`d plugins.\n     *\n     */\n    iteratePlugins(method) {\n        Object.values(this.#plugins).flat(1).forEach(method);\n    }\n    /**\n     * Uninstall and remove a plugin.\n     *\n     * @param {object} instance The plugin instance to remove.\n     */\n    removePlugin(instance) {\n        this.log(`Removing plugin ${instance.id}`);\n        this.emit('plugin-remove', instance);\n        if (instance.uninstall) {\n            instance.uninstall();\n        }\n        const list = this.#plugins[instance.type];\n        // list.indexOf failed here, because Vue3 converted the plugin instance\n        // to a Proxy object, which failed the strict comparison test:\n        // obj !== objProxy\n        const index = list.findIndex((item) => item.id === instance.id);\n        if (index !== -1) {\n            list.splice(index, 1);\n        }\n        const state = this.getState();\n        const updatedState = {\n            plugins: {\n                ...state.plugins,\n                [instance.id]: undefined,\n            },\n        };\n        this.setState(updatedState);\n    }\n    /**\n     * Uninstall all plugins and close down this Uppy instance.\n     */\n    destroy() {\n        this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`);\n        this.cancelAll();\n        this.#storeUnsubscribe();\n        this.iteratePlugins((plugin) => {\n            this.removePlugin(plugin);\n        });\n        if (typeof window !== 'undefined' && window.removeEventListener) {\n            window.removeEventListener('online', this.#updateOnlineStatus);\n            window.removeEventListener('offline', this.#updateOnlineStatus);\n        }\n    }\n    hideInfo() {\n        const { info } = this.getState();\n        this.setState({ info: info.slice(1) });\n        this.emit('info-hidden');\n    }\n    /**\n     * Set info message in `state.info`, so that UI plugins like `Informer`\n     * can display the message.\n     */\n    info(message, type = 'info', duration = 3000) {\n        const isComplexMessage = typeof message === 'object';\n        this.setState({\n            info: [\n                ...this.getState().info,\n                {\n                    type,\n                    message: isComplexMessage ? message.message : message,\n                    details: isComplexMessage ? message.details : null,\n                },\n            ],\n        });\n        setTimeout(() => this.hideInfo(), duration);\n        this.emit('info-visible');\n    }\n    /**\n     * Passes messages to a function, provided in `opts.logger`.\n     * If `opts.logger: Uppy.debugLogger` or `opts.debug: true`, logs to the browser console.\n     */\n    log(message, type) {\n        const { logger } = this.opts;\n        switch (type) {\n            case 'error':\n                logger.error(message);\n                break;\n            case 'warning':\n                logger.warn(message);\n                break;\n            default:\n                logger.debug(message);\n                break;\n        }\n    }\n    // We need to store request clients by a unique ID, so we can share RequestClient instances across files\n    // this allows us to do rate limiting and synchronous operations like refreshing provider tokens\n    // example: refreshing tokens: if each file has their own requestclient,\n    // we don't have any way to synchronize all requests in order to\n    // - block all requests\n    // - refresh the token\n    // - unblock all requests and allow them to run with a the new access token\n    // back when we had a requestclient per file, once an access token expired,\n    // all 6 files would go ahead and refresh the token at the same time\n    // (calling /refresh-token up to 6 times), which will probably fail for some providers\n    #requestClientById = new Map();\n    registerRequestClient(id, client) {\n        this.#requestClientById.set(id, client);\n    }\n    /** @protected */\n    getRequestClientForFile(file) {\n        if (!file.remote)\n            throw new Error(`Tried to get RequestClient for a non-remote file ${file.id}`);\n        const requestClient = this.#requestClientById.get(file.remote.requestClientId);\n        if (requestClient == null)\n            throw new Error(`requestClientId \"${file.remote.requestClientId}\" not registered for file \"${file.id}\"`);\n        return requestClient;\n    }\n    /**\n     * Restore an upload by its ID.\n     */\n    restore(uploadID) {\n        this.log(`Core: attempting to restore upload \"${uploadID}\"`);\n        if (!this.getState().currentUploads[uploadID]) {\n            this.#removeUpload(uploadID);\n            return Promise.reject(new Error('Nonexistent upload'));\n        }\n        return this.#runUpload(uploadID);\n    }\n    /**\n     * Create an upload for a bunch of files.\n     *\n     */\n    #createUpload(fileIDs, opts = {}) {\n        // uppy.retryAll sets this to true \u2014 when retrying we want to ignore `allowNewUpload: false`\n        const { forceAllowNewUpload = false } = opts;\n        const { allowNewUpload, currentUploads } = this.getState();\n        if (!allowNewUpload && !forceAllowNewUpload) {\n            throw new Error('Cannot create a new upload: already uploading.');\n        }\n        const uploadID = nanoid();\n        this.emit('upload', uploadID, this.getFilesByIds(fileIDs));\n        this.setState({\n            allowNewUpload: this.opts.allowMultipleUploadBatches !== false &&\n                this.opts.allowMultipleUploads !== false,\n            currentUploads: {\n                ...currentUploads,\n                [uploadID]: {\n                    fileIDs,\n                    step: 0,\n                    result: {},\n                },\n            },\n        });\n        return uploadID;\n    }\n    [Symbol.for('uppy test: createUpload')](...args) {\n        // @ts-expect-error https://github.com/microsoft/TypeScript/issues/47595\n        return this.#createUpload(...args);\n    }\n    #getUpload(uploadID) {\n        const { currentUploads } = this.getState();\n        return currentUploads[uploadID];\n    }\n    /**\n     * Add data to an upload's result object.\n     */\n    addResultData(uploadID, data) {\n        if (!this.#getUpload(uploadID)) {\n            this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n            return;\n        }\n        const { currentUploads } = this.getState();\n        const currentUpload = {\n            ...currentUploads[uploadID],\n            result: { ...currentUploads[uploadID].result, ...data },\n        };\n        this.setState({\n            currentUploads: { ...currentUploads, [uploadID]: currentUpload },\n        });\n    }\n    /**\n     * Remove an upload, eg. if it has been canceled or completed.\n     *\n     */\n    #removeUpload(uploadID) {\n        const currentUploads = { ...this.getState().currentUploads };\n        delete currentUploads[uploadID];\n        this.setState({\n            currentUploads,\n        });\n    }\n    /**\n     * Run an upload. This picks up where it left off in case the upload is being restored.\n     */\n    async #runUpload(uploadID) {\n        const getCurrentUpload = () => {\n            const { currentUploads } = this.getState();\n            return currentUploads[uploadID];\n        };\n        let currentUpload = getCurrentUpload();\n        const steps = [\n            ...this.#preProcessors,\n            ...this.#uploaders,\n            ...this.#postProcessors,\n        ];\n        try {\n            for (let step = currentUpload.step || 0; step < steps.length; step++) {\n                if (!currentUpload) {\n                    break;\n                }\n                const fn = steps[step];\n                this.setState({\n                    currentUploads: {\n                        ...this.getState().currentUploads,\n                        [uploadID]: {\n                            ...currentUpload,\n                            step,\n                        },\n                    },\n                });\n                const { fileIDs } = currentUpload;\n                // TODO give this the `updatedUpload` object as its only parameter maybe?\n                // Otherwise when more metadata may be added to the upload this would keep getting more parameters\n                await fn(fileIDs, uploadID);\n                // Update currentUpload value in case it was modified asynchronously.\n                currentUpload = getCurrentUpload();\n            }\n        }\n        catch (err) {\n            this.#removeUpload(uploadID);\n            throw err;\n        }\n        // Set result data.\n        if (currentUpload) {\n            // Mark postprocessing step as complete if necessary; this addresses a case where we might get\n            // stuck in the postprocessing UI while the upload is fully complete.\n            // If the postprocessing steps do not do any work, they may not emit postprocessing events at\n            // all, and never mark the postprocessing as complete. This is fine on its own but we\n            // introduced code in the @uppy/core upload-success handler to prepare postprocessing progress\n            // state if any postprocessors are registered. That is to avoid a \"flash of completed state\"\n            // before the postprocessing plugins can emit events.\n            //\n            // So, just in case an upload with postprocessing plugins *has* completed *without* emitting\n            // postprocessing completion, we do it instead.\n            currentUpload.fileIDs.forEach((fileID) => {\n                const file = this.getFile(fileID);\n                if (file?.progress.postprocess) {\n                    this.emit('postprocess-complete', file);\n                }\n            });\n            const files = currentUpload.fileIDs.map((fileID) => this.getFile(fileID));\n            const successful = files.filter((file) => !file.error);\n            const failed = files.filter((file) => file.error);\n            this.addResultData(uploadID, { successful, failed, uploadID });\n            // Update currentUpload value in case it was modified asynchronously.\n            currentUpload = getCurrentUpload();\n        }\n        // Emit completion events.\n        // This is in a separate function so that the `currentUploads` variable\n        // always refers to the latest state. In the handler right above it refers\n        // to an outdated object without the `.result` property.\n        let result;\n        if (currentUpload) {\n            result = currentUpload.result;\n            this.#removeUpload(uploadID);\n        }\n        if (result == null) {\n            this.log(`Not setting result for an upload that has been removed: ${uploadID}`);\n            result = {\n                successful: [],\n                failed: [],\n                uploadID,\n            };\n        }\n        return result;\n    }\n    /**\n     * Start an upload for all the files that are not currently being uploaded.\n     */\n    async upload() {\n        if (!this.#plugins.uploader?.length) {\n            this.log('No uploader type plugins are used', 'warning');\n        }\n        let { files } = this.getState();\n        // retry any failed files from a previous upload() call\n        const filesToRetry = this.#getFilesToRetry();\n        if (filesToRetry.length > 0) {\n            const retryResult = await this.#doRetryAll(); // we don't want the complete event to fire\n            const hasNewFiles = this.getFiles().filter((file) => file.progress.uploadStarted == null)\n                .length > 0;\n            // if no new files, make it idempotent and return\n            if (!hasNewFiles) {\n                this.emit('complete', retryResult);\n                return retryResult;\n            }\n            // reload files which might have  changed after retry\n            ;\n            ({ files } = this.getState());\n        }\n        // If no files to retry, proceed with original upload() behavior for new files\n        const onBeforeUploadResult = this.opts.onBeforeUpload(files);\n        if (onBeforeUploadResult === false) {\n            return Promise.reject(new Error('Not starting the upload because onBeforeUpload returned false'));\n        }\n        if (onBeforeUploadResult && typeof onBeforeUploadResult === 'object') {\n            files = onBeforeUploadResult;\n            // Updating files in state, because uploader plugins receive file IDs,\n            // and then fetch the actual file object from state\n            this.setState({\n                files,\n            });\n        }\n        return Promise.resolve()\n            .then(() => this.#restricter.validateMinNumberOfFiles(files))\n            .catch((err) => {\n            this.#informAndEmit([err]);\n            throw err;\n        })\n            .then(() => {\n            if (!this.#checkRequiredMetaFields(files)) {\n                throw new RestrictionError(this.i18n('missingRequiredMetaField'));\n            }\n        })\n            .catch((err) => {\n            // Doing this in a separate catch because we already emited and logged\n            // all the errors in `checkRequiredMetaFields` so we only throw a generic\n            // missing fields error here.\n            throw err;\n        })\n            .then(async () => {\n            const { currentUploads } = this.getState();\n            // get a list of files that are currently assigned to uploads\n            const currentlyUploadingFiles = Object.values(currentUploads).flatMap((curr) => curr.fileIDs);\n            const waitingFileIDs = [];\n            Object.keys(files).forEach((fileID) => {\n                const file = this.getFile(fileID);\n                // if the file hasn't started uploading and hasn't already been assigned to an upload..\n                if (!file.progress.uploadStarted &&\n                    currentlyUploadingFiles.indexOf(fileID) === -1) {\n                    waitingFileIDs.push(file.id);\n                }\n            });\n            const uploadID = this.#createUpload(waitingFileIDs);\n            const result = await this.#runUpload(uploadID);\n            this.emit('complete', result);\n            return result;\n        })\n            .catch((err) => {\n            this.emit('error', err);\n            this.log(err, 'error');\n            throw err;\n        });\n    }\n}\nexport default Uppy;\n", "export { default as BasePlugin } from './BasePlugin.js';\nexport { debugLogger } from './loggers.js';\nexport { default as UIPlugin } from './UIPlugin.js';\nexport { default, default as Uppy } from './Uppy.js';\n", "/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "/**\n * Checks if the browser supports Drag & Drop (not supported on mobile devices, for example).\n */\nexport default function isDragDropSupported() {\n    const div = document.body;\n    if (!('draggable' in div) || !('ondragstart' in div && 'ondrop' in div)) {\n        return false;\n    }\n    if (!('FormData' in window)) {\n        return false;\n    }\n    if (!('FileReader' in window)) {\n        return false;\n    }\n    return true;\n}\n", "/**\n * Converts list into array\n */\nexport default Array.from;\n", "import toArray from '../../toArray.js';\n// .files fallback, should be implemented in any browser\nexport default function fallbackApi(dataTransfer) {\n    const files = toArray(dataTransfer.files);\n    return Promise.resolve(files);\n}\n", "/**\n * Recursive function, calls the original callback() when the directory is entirely parsed.\n */\nexport default function getFilesAndDirectoriesFromDirectory(directoryReader, oldEntries, logDropError, { onSuccess }) {\n    directoryReader.readEntries((entries) => {\n        const newEntries = [...oldEntries, ...entries];\n        // According to the FileSystem API spec, getFilesAndDirectoriesFromDirectory()\n        // must be called until it calls the onSuccess with an empty array.\n        if (entries.length) {\n            queueMicrotask(() => {\n                getFilesAndDirectoriesFromDirectory(directoryReader, newEntries, logDropError, { onSuccess });\n            });\n            // Done iterating this particular directory\n        }\n        else {\n            onSuccess(newEntries);\n        }\n    }, \n    // Make sure we resolve on error anyway, it's fine if only one directory couldn't be parsed!\n    (error) => {\n        logDropError(error);\n        onSuccess(oldEntries);\n    });\n}\n", "import getFilesAndDirectoriesFromDirectory from './getFilesAndDirectoriesFromDirectory.js';\n/**\n * Polyfill for the new (experimental) getAsFileSystemHandle API (using the popular webkitGetAsEntry behind the scenes)\n * so that we can switch to the getAsFileSystemHandle API once it (hopefully) becomes standard\n */\nfunction getAsFileSystemHandleFromEntry(entry, logDropError) {\n    if (entry == null)\n        return entry;\n    return {\n        kind: entry.isFile\n            ? 'file'\n            : entry.isDirectory\n                ? 'directory'\n                : undefined,\n        name: entry.name,\n        getFile() {\n            return new Promise((resolve, reject) => entry.file(resolve, reject));\n        },\n        async *values() {\n            // If the file is a directory.\n            const directoryReader = entry.createReader();\n            const entries = await new Promise((resolve) => {\n                getFilesAndDirectoriesFromDirectory(directoryReader, [], logDropError, {\n                    onSuccess: (dirEntries) => resolve(dirEntries.map((file) => getAsFileSystemHandleFromEntry(file, logDropError))),\n                });\n            });\n            yield* entries;\n        },\n        isSameEntry: undefined,\n    };\n}\nasync function* createPromiseToAddFileOrParseDirectory(entry, relativePath, lastResortFile = undefined) {\n    const getNextRelativePath = () => `${relativePath}/${entry.name}`;\n    // For each dropped item, - make sure it's a file/directory, and start deepening in!\n    if (entry.kind === 'file') {\n        const file = await entry.getFile();\n        if (file != null) {\n            ;\n            file.relativePath = relativePath ? getNextRelativePath() : null;\n            yield file;\n        }\n        else if (lastResortFile != null)\n            yield lastResortFile;\n    }\n    else if (entry.kind === 'directory') {\n        for await (const handle of entry.values()) {\n            // Recurse on the directory, appending the dir name to the relative path\n            yield* createPromiseToAddFileOrParseDirectory(handle, relativePath ? getNextRelativePath() : entry.name);\n        }\n    }\n    else if (lastResortFile != null)\n        yield lastResortFile;\n}\n/**\n * Load all files from data transfer, and recursively read any directories.\n * Note that IE is not supported for drag-drop, because IE doesn't support Data Transfers\n *\n * @param {DataTransfer} dataTransfer\n * @param {*} logDropError on error\n */\nexport default async function* getFilesFromDataTransfer(dataTransfer, logDropError) {\n    // Retrieving the dropped items must happen synchronously\n    // otherwise only the first item gets treated and the other ones are garbage collected.\n    // https://github.com/transloadit/uppy/pull/3998\n    const fileSystemHandles = await Promise.all(Array.from(dataTransfer.items, async (item) => {\n        // biome-ignore lint/style/useConst: ...\n        let fileSystemHandle;\n        // TODO enable getAsFileSystemHandle API once we can get it working with subdirectories\n        // IMPORTANT: Need to check isSecureContext *before* calling getAsFileSystemHandle\n        // or else Chrome will crash when running in HTTP: https://github.com/transloadit/uppy/issues/4133\n        // if (window.isSecureContext && item.getAsFileSystemHandle != null)\n        // fileSystemHandle = await item.getAsFileSystemHandle()\n        // `webkitGetAsEntry` exists in all popular browsers (including non-WebKit browsers),\n        // however it may be renamed to getAsEntry() in the future, so you should code defensively, looking for both.\n        // from https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry\n        const getAsEntry = () => typeof item.getAsEntry === 'function'\n            ? item.getAsEntry()\n            : item.webkitGetAsEntry();\n        fileSystemHandle ??= getAsFileSystemHandleFromEntry(getAsEntry(), logDropError);\n        return {\n            fileSystemHandle,\n            lastResortFile: item.getAsFile(), // can be used as a fallback in case other methods fail\n        };\n    }));\n    for (const { lastResortFile, fileSystemHandle } of fileSystemHandles) {\n        // fileSystemHandle and lastResortFile can be null when we drop an url.\n        if (fileSystemHandle != null) {\n            try {\n                yield* createPromiseToAddFileOrParseDirectory(fileSystemHandle, '', lastResortFile);\n            }\n            catch (err) {\n                // Example: If dropping a symbolic link, Chromium will throw:\n                // \"DOMException: A requested file or directory could not be found at the time an operation was processed.\",\n                // So we will use lastResortFile instead. See https://github.com/transloadit/uppy/issues/3505.\n                if (lastResortFile != null) {\n                    yield lastResortFile;\n                }\n                else {\n                    logDropError(err);\n                }\n            }\n        }\n        else if (lastResortFile != null)\n            yield lastResortFile;\n    }\n}\n", "import fallbackApi from './utils/fallbackApi.js';\nimport webkitGetAsEntryApi from './utils/webkitGetAsEntryApi/index.js';\n/**\n * Returns a promise that resolves to the array of dropped files (if a folder is\n * dropped, and browser supports folder parsing - promise resolves to the flat\n * array of all files in all directories).\n * Each file has .relativePath prop appended to it (e.g. \"/docs/Prague/ticket_from_prague_to_ufa.pdf\")\n * if browser supports it. Otherwise it's undefined.\n *\n * @param dataTransfer\n * @param options\n * @param options.logDropError - a function that's called every time some\n * folder or some file error out (e.g. because of the folder name being too long\n * on Windows). Notice that resulting promise will always be resolved anyway.\n *\n * @returns {Promise} - Array<File>\n */\nexport default async function getDroppedFiles(dataTransfer, options) {\n    // Get all files from all subdirs. Works (at least) in Chrome, Mozilla, and Safari\n    const logDropError = options?.logDropError ?? Function.prototype;\n    try {\n        const accumulator = [];\n        for await (const file of webkitGetAsEntryApi(dataTransfer, logDropError)) {\n            accumulator.push(file);\n        }\n        return accumulator;\n        // Otherwise just return all first-order files\n    }\n    catch {\n        return fallbackApi(dataTransfer);\n    }\n}\n", "import {BasePlugin} from '@uppy/core'\n\nimport Translator from '@uppy/utils/lib/Translator'\nimport isDragDropSupported from '@uppy/utils/lib/isDragDropSupported'\nimport getDroppedFiles from '@uppy/utils/lib/getDroppedFiles'\n\nconst escapeHtml = (value) => String(value)\n    .replace(/&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n\nclass TutDragDrop extends BasePlugin {\n    static VERSION = '0.1.0'\n\n    constructor(uppy, opts) {\n        super(uppy, opts)\n        this.id = this.opts.id || 'TutDragDrop'\n        this.type = 'acquirer'\n        this.title = 'Uppy Drag & Drop for TUTORize'\n\n        const defaultOptions = {\n            target: null,\n            inputFieldTarget: null,\n            inputName: 'files[]',\n            tooltipText: null,\n            mediaPoolUrl: null\n        }\n\n        this.opts = Object.assign({}, defaultOptions, opts)\n\n        this.isDragDropSupported = isDragDropSupported()\n        this.removeDragOverClassTimeout = null\n\n        this.i18nInit()\n\n        this.handleDragEnter = this.handleDragEnter.bind(this)\n        this.handleDragOver = this.handleDragOver.bind(this)\n        this.handleDragLeave = this.handleDragLeave.bind(this)\n        this.handleDrop = this.handleDrop.bind(this)\n        this.handleInputChange = this.handleInputChange.bind(this)\n        this.addFiles = this.addFiles.bind(this)\n    }\n\n    setOptions(newOpts) {\n        super.setOptions(newOpts)\n    }\n\n    i18nInit() {\n        this.translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale])\n        this.i18n = this.translator.translate.bind(this.translator)\n        this.i18nArray = this.translator.translateArray.bind(this.translator)\n    }\n\n    addFiles(files) {\n        const descriptors = files.map((file) => ({\n            source: this.id,\n            name: file.name,\n            type: file.type,\n            data: file,\n            meta: {\n                // path of the file relative to the ancestor directory the user selected.\n                // e.g. 'docs/Old Prague/airbnb.pdf'\n                relativePath: file.relativePath || null\n            }\n        }))\n\n        try {\n            this.uppy.addFiles(descriptors)\n        } catch (error) {\n            this.uppy.log(error)\n        }\n    }\n\n    handleDragEnter(event) {\n        event.preventDefault()\n        event.stopPropagation()\n\n        this.opts.target.classList.add('uppy-DragDrop--dragEnter')\n    }\n\n    handleDragOver(event) {\n        event.preventDefault()\n        event.stopPropagation()\n\n        // 1. Add a small (+) icon on drop\n        // (and prevent browsers from interpreting this as files being _moved_ into the browser,\n        // https://github.com/transloadit/uppy/issues/1978)\n        event.dataTransfer.dropEffect = 'copy'\n\n        clearTimeout(this.removeDragOverClassTimeout)\n        // this.setPluginState({isDraggingOver: true})\n\n        this.opts.target.classList.add('uppy-DragDrop--isDraggingOver')\n    }\n\n    handleDragLeave(event) {\n        event.preventDefault()\n        event.stopPropagation()\n\n        clearTimeout(this.removeDragOverClassTimeout)\n        // Timeout against flickering, this solution is taken from drag-drop library.\n        // Solution with 'pointer-events: none' didn't work across browsers.\n        this.removeDragOverClassTimeout = setTimeout(() => {\n            // this.setPluginState({isDraggingOver: false})\n            this.opts.target.classList.remove('uppy-DragDrop--isDraggingOver')\n            this.opts.target.classList.remove('uppy-DragDrop--dragEnter')\n        }, 50)\n    }\n\n    handleDrop(event) {\n        event.preventDefault()\n        event.stopPropagation()\n        clearTimeout(this.removeDragOverClassTimeout)\n\n        // 2. Remove dragover class\n        // this.setPluginState({isDraggingOver: false})\n\n        // 3. Add all dropped files\n        this.uppy.log('[TutDragDrop] Files were dropped')\n        const logDropError = (error) => {\n            this.uppy.log(error, 'error')\n        }\n        getDroppedFiles(event.dataTransfer, {logDropError}).then((files) => this.addFiles(files))\n\n        this.opts.target.classList.remove('uppy-DragDrop--isDraggingOver')\n        this.opts.target.classList.remove('uppy-DragDrop--dragEnter')\n    }\n\n    handleInputChange(event) {\n        const files = Array.from(event.target.files)\n        this.addFiles(files)\n        // Clears out the event target input field to not submit the file after initial upload.\n        event.target.value = ''\n    }\n\n    renderFileInput() {\n        const randomId = Date.now()\n        const restrictions = this.uppy.opts.restrictions\n        let inputText\n        let tooltip\n\n        let browseScreenReaderText\n        if (this.opts.mediaPoolUrl) {\n            browseScreenReaderText = this.i18n('dropHereOrMediaPool', {mediaPool: this.i18n('mediaPool'), browse: this.i18n('browse')})\n        } else {\n            browseScreenReaderText = this.i18n('dropHereOr', {browse: this.i18n('browse')})\n        }\n        const browseLabel = `<label for=\"${randomId}\" role=\"button\" tabindex=\"0\" onkeydown=\"if (event.key === ' ') event.preventDefault()\" onkeyup=\"if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); document.getElementById('${randomId}').click(); }\"><span aria-hidden=\"true\">${this.i18n('browse')}</span><span class=\"visually-hidden\">${escapeHtml(browseScreenReaderText)}</span></label>`\n\n        if (this.opts.mediaPoolUrl) {\n            inputText = this.i18nArray('dropHereOrMediaPool', {\n                mediaPool: `<a href=\"${this.opts.mediaPoolUrl}\" data-controller=\"modal-link\" data-action=\"click->modal-link#openModal\" role=\"button\" aria-haspopup=\"dialog\">${this.i18n('mediaPool')}</a>`,\n                browse: browseLabel\n            })\n        } else {\n            inputText = this.i18nArray('dropHereOr', {browse: browseLabel})\n        }\n\n        if (this.opts.tooltipText) {\n            const ariaLabel = this.opts.tooltipText.replace(/\\*\\.(\\w+)/g, (_, ending) => ending.toUpperCase())\n            tooltip = `<span class=\"uppy-DragDrop-inputTextTooltip\" data-controller=\"popover\" data-bs-content=\"${this.opts.tooltipText}\" role=\"button\" aria-label=\"${ariaLabel}\" ><i class=\"fas fa-question-circle\"></i></span>`\n        } else {\n            tooltip = ''\n        }\n\n        this.opts.inputFieldTarget.innerHTML = `\n            <div class=\"uppy-DragDrop-fileInput\">\n                <svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fas\" data-icon=\"cloud-upload-alt\" class=\"uppy-DragDrop-icon fa-cloud-upload-alt\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path fill=\"currentColor\" d=\"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z\"></path></svg>\n                <span class=\"uppy-DragDrop-inputText\">${inputText.join('')}</span>\n                ${tooltip}\n                <input hidden=\"hidden\" type=\"file\" name=\"${this.opts.inputName}\" id=\"${randomId}\"\n                    tabindex=\"${-1}\" focusable=\"false\" multiple=\"${restrictions.maxNumberOfFiles !== 1}\" \n                    accept=\"${restrictions.allowedFileTypes}\" class=\"uppy-DragDrop-input\">\n            </div>\n        `\n    }\n\n    //\n    // render(state) {\n    //     const dragDropClass = `\n    //         uppy-Root\n    //         uppy-u-reset\n    //         uppy-DragDrop-container\n    //         ${this.isDragDropSupported ? 'uppy-DragDrop--is-dragdrop-supported' : ''}\n    //         ${this.getPluginState().isDraggingOver ? 'uppy-DragDrop--isDraggingOver' : ''}\n    //        `\n    //\n    //     return this.renderFileInput()\n    // }\n\n    install() {\n        // this.setPluginState({isDraggingOver: false})\n        // const target = this.opts.target\n        // if (target) {\n        //     this.mount(target, this)\n        // }\n        this.opts.target.addEventListener('dragenter', this.handleDragEnter)\n        this.opts.target.addEventListener('dragover', this.handleDragOver)\n        this.opts.target.addEventListener('dragleave', this.handleDragLeave)\n        this.opts.target.addEventListener('drop', this.handleDrop)\n        if (this.opts.inputFieldTarget) {\n            this.renderFileInput()\n            this.opts.inputFieldTarget.querySelector('input[type=\"file\"]')\n                .addEventListener('change', this.handleInputChange)\n        }\n        this.opts.target.classList.add('uppy-DragDrop-container')\n        if (this.isDragDropSupported) this.opts.target.classList.add('uppy-DragDrop--is-dragdrop-supported')\n    }\n\n    uninstall() {\n        // this.unmount()\n        this.opts.target.removeEventListener('dragenter', this.handleDragEnter)\n        this.opts.target.removeEventListener('dragover', this.handleDragOver)\n        this.opts.target.removeEventListener('dragleave', this.handleDragLeave)\n        this.opts.target.removeEventListener('drop', this.handleDrop)\n        if (this.opts.inputFieldTarget)\n            this.opts.inputFieldTarget.querySelector('input[type=\"file\"]')\n                .removeEventListener('change', this.handleInputChange)\n    }\n}\n\nmodule.exports = TutDragDrop\n", "/*!\n * MediaElement.js\n * http://www.mediaelementjs.com/\n *\n * Wrapper that mimics native HTML5 MediaElement (audio and video)\n * using a variety of technologies (pure JavaScript, Flash, iframe)\n *\n * Copyright 2010-2017, John Dyer (http://j.hn/)\n * License: MIT\n *\n */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){\n\n},{}],2:[function(_dereq_,module,exports){\n(function (global){\nvar topLevel = typeof global !== 'undefined' ? global :\n    typeof window !== 'undefined' ? window : {}\nvar minDoc = _dereq_(1);\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n    doccy = document;\n} else {\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n    if (!doccy) {\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n    }\n}\n\nmodule.exports = doccy;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\nvar win;\n\nif (typeof window !== \"undefined\") {\n    win = window;\n} else if (typeof global !== \"undefined\") {\n    win = global;\n} else if (typeof self !== \"undefined\"){\n    win = self;\n} else {\n    win = {};\n}\n\nmodule.exports = win;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],4:[function(_dereq_,module,exports){\n(function (root) {\n\n  // Store setTimeout reference so promise-polyfill will be unaffected by\n  // other code modifying setTimeout (like sinon.useFakeTimers())\n  var setTimeoutFunc = setTimeout;\n\n  function noop() {}\n  \n  // Polyfill for Function.prototype.bind\n  function bind(fn, thisArg) {\n    return function () {\n      fn.apply(thisArg, arguments);\n    };\n  }\n\n  function Promise(fn) {\n    if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n    if (typeof fn !== 'function') throw new TypeError('not a function');\n    this._state = 0;\n    this._handled = false;\n    this._value = undefined;\n    this._deferreds = [];\n\n    doResolve(fn, this);\n  }\n\n  function handle(self, deferred) {\n    while (self._state === 3) {\n      self = self._value;\n    }\n    if (self._state === 0) {\n      self._deferreds.push(deferred);\n      return;\n    }\n    self._handled = true;\n    Promise._immediateFn(function () {\n      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n      if (cb === null) {\n        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n        return;\n      }\n      var ret;\n      try {\n        ret = cb(self._value);\n      } catch (e) {\n        reject(deferred.promise, e);\n        return;\n      }\n      resolve(deferred.promise, ret);\n    });\n  }\n\n  function resolve(self, newValue) {\n    try {\n      // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n      if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\n      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n        var then = newValue.then;\n        if (newValue instanceof Promise) {\n          self._state = 3;\n          self._value = newValue;\n          finale(self);\n          return;\n        } else if (typeof then === 'function') {\n          doResolve(bind(then, newValue), self);\n          return;\n        }\n      }\n      self._state = 1;\n      self._value = newValue;\n      finale(self);\n    } catch (e) {\n      reject(self, e);\n    }\n  }\n\n  function reject(self, newValue) {\n    self._state = 2;\n    self._value = newValue;\n    finale(self);\n  }\n\n  function finale(self) {\n    if (self._state === 2 && self._deferreds.length === 0) {\n      Promise._immediateFn(function() {\n        if (!self._handled) {\n          Promise._unhandledRejectionFn(self._value);\n        }\n      });\n    }\n\n    for (var i = 0, len = self._deferreds.length; i < len; i++) {\n      handle(self, self._deferreds[i]);\n    }\n    self._deferreds = null;\n  }\n\n  function Handler(onFulfilled, onRejected, promise) {\n    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n    this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n    this.promise = promise;\n  }\n\n  /**\n   * Take a potentially misbehaving resolver function and make sure\n   * onFulfilled and onRejected are only called once.\n   *\n   * Makes no guarantees about asynchrony.\n   */\n  function doResolve(fn, self) {\n    var done = false;\n    try {\n      fn(function (value) {\n        if (done) return;\n        done = true;\n        resolve(self, value);\n      }, function (reason) {\n        if (done) return;\n        done = true;\n        reject(self, reason);\n      });\n    } catch (ex) {\n      if (done) return;\n      done = true;\n      reject(self, ex);\n    }\n  }\n\n  Promise.prototype['catch'] = function (onRejected) {\n    return this.then(null, onRejected);\n  };\n\n  Promise.prototype.then = function (onFulfilled, onRejected) {\n    var prom = new (this.constructor)(noop);\n\n    handle(this, new Handler(onFulfilled, onRejected, prom));\n    return prom;\n  };\n\n  Promise.all = function (arr) {\n    var args = Array.prototype.slice.call(arr);\n\n    return new Promise(function (resolve, reject) {\n      if (args.length === 0) return resolve([]);\n      var remaining = args.length;\n\n      function res(i, val) {\n        try {\n          if (val && (typeof val === 'object' || typeof val === 'function')) {\n            var then = val.then;\n            if (typeof then === 'function') {\n              then.call(val, function (val) {\n                res(i, val);\n              }, reject);\n              return;\n            }\n          }\n          args[i] = val;\n          if (--remaining === 0) {\n            resolve(args);\n          }\n        } catch (ex) {\n          reject(ex);\n        }\n      }\n\n      for (var i = 0; i < args.length; i++) {\n        res(i, args[i]);\n      }\n    });\n  };\n\n  Promise.resolve = function (value) {\n    if (value && typeof value === 'object' && value.constructor === Promise) {\n      return value;\n    }\n\n    return new Promise(function (resolve) {\n      resolve(value);\n    });\n  };\n\n  Promise.reject = function (value) {\n    return new Promise(function (resolve, reject) {\n      reject(value);\n    });\n  };\n\n  Promise.race = function (values) {\n    return new Promise(function (resolve, reject) {\n      for (var i = 0, len = values.length; i < len; i++) {\n        values[i].then(resolve, reject);\n      }\n    });\n  };\n\n  // Use polyfill for setImmediate for performance gains\n  Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||\n    function (fn) {\n      setTimeoutFunc(fn, 0);\n    };\n\n  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n    if (typeof console !== 'undefined' && console) {\n      console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n    }\n  };\n\n  /**\n   * Set the immediate function to execute callbacks\n   * @param fn {function} Function to execute\n   * @deprecated\n   */\n  Promise._setImmediateFn = function _setImmediateFn(fn) {\n    Promise._immediateFn = fn;\n  };\n\n  /**\n   * Change the function to execute on unhandled rejection\n   * @param {function} fn Function to execute on unhandled rejection\n   * @deprecated\n   */\n  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n    Promise._unhandledRejectionFn = fn;\n  };\n  \n  if (typeof module !== 'undefined' && module.exports) {\n    module.exports = Promise;\n  } else if (!root.Promise) {\n    root.Promise = Promise;\n  }\n\n})(this);\n\n},{}],5:[function(_dereq_,module,exports){\n!function(root, factory) {\n    \"function\" == typeof define && define.amd ? // AMD. Register as an anonymous module unless amdModuleId is set\n    define([], function() {\n        return root.svg4everybody = factory();\n    }) : \"object\" == typeof module && module.exports ? // Node. Does not work with strict CommonJS, but\n    // only CommonJS-like environments that support module.exports,\n    // like Node.\n    module.exports = factory() : root.svg4everybody = factory();\n}(this, function() {\n    /*! svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody */\n    function embed(parent, svg, target) {\n        // if the target exists\n        if (target) {\n            // create a document fragment to hold the contents of the target\n            var fragment = document.createDocumentFragment(), viewBox = !svg.hasAttribute(\"viewBox\") && target.getAttribute(\"viewBox\");\n            // conditionally set the viewBox on the svg\n            viewBox && svg.setAttribute(\"viewBox\", viewBox);\n            // copy the contents of the clone into the fragment\n            for (// clone the target\n            var clone = target.cloneNode(!0); clone.childNodes.length; ) {\n                fragment.appendChild(clone.firstChild);\n            }\n            // append the fragment into the svg\n            parent.appendChild(fragment);\n        }\n    }\n    function loadreadystatechange(xhr) {\n        // listen to changes in the request\n        xhr.onreadystatechange = function() {\n            // if the request is ready\n            if (4 === xhr.readyState) {\n                // get the cached html document\n                var cachedDocument = xhr._cachedDocument;\n                // ensure the cached html document based on the xhr response\n                cachedDocument || (cachedDocument = xhr._cachedDocument = document.implementation.createHTMLDocument(\"\"), \n                cachedDocument.body.innerHTML = xhr.responseText, xhr._cachedTarget = {}), // clear the xhr embeds list and embed each item\n                xhr._embeds.splice(0).map(function(item) {\n                    // get the cached target\n                    var target = xhr._cachedTarget[item.id];\n                    // ensure the cached target\n                    target || (target = xhr._cachedTarget[item.id] = cachedDocument.getElementById(item.id)), \n                    // embed the target into the svg\n                    embed(item.parent, item.svg, target);\n                });\n            }\n        }, // test the ready state change immediately\n        xhr.onreadystatechange();\n    }\n    function svg4everybody(rawopts) {\n        function oninterval() {\n            // while the index exists in the live <use> collection\n            for (// get the cached <use> index\n            var index = 0; index < uses.length; ) {\n                // get the current <use>\n                var use = uses[index], parent = use.parentNode, svg = getSVGAncestor(parent), src = use.getAttribute(\"xlink:href\") || use.getAttribute(\"href\");\n                if (!src && opts.attributeName && (src = use.getAttribute(opts.attributeName)), \n                svg && src) {\n                    if (polyfill) {\n                        if (!opts.validate || opts.validate(src, svg, use)) {\n                            // remove the <use> element\n                            parent.removeChild(use);\n                            // parse the src and get the url and id\n                            var srcSplit = src.split(\"#\"), url = srcSplit.shift(), id = srcSplit.join(\"#\");\n                            // if the link is external\n                            if (url.length) {\n                                // get the cached xhr request\n                                var xhr = requests[url];\n                                // ensure the xhr request exists\n                                xhr || (xhr = requests[url] = new XMLHttpRequest(), xhr.open(\"GET\", url), xhr.send(), \n                                xhr._embeds = []), // add the svg and id as an item to the xhr embeds list\n                                xhr._embeds.push({\n                                    parent: parent,\n                                    svg: svg,\n                                    id: id\n                                }), // prepare the xhr ready state change event\n                                loadreadystatechange(xhr);\n                            } else {\n                                // embed the local id into the svg\n                                embed(parent, svg, document.getElementById(id));\n                            }\n                        } else {\n                            // increase the index when the previous value was not \"valid\"\n                            ++index, ++numberOfSvgUseElementsToBypass;\n                        }\n                    }\n                } else {\n                    // increase the index when the previous value was not \"valid\"\n                    ++index;\n                }\n            }\n            // continue the interval\n            (!uses.length || uses.length - numberOfSvgUseElementsToBypass > 0) && requestAnimationFrame(oninterval, 67);\n        }\n        var polyfill, opts = Object(rawopts), newerIEUA = /\\bTrident\\/[567]\\b|\\bMSIE (?:9|10)\\.0\\b/, webkitUA = /\\bAppleWebKit\\/(\\d+)\\b/, olderEdgeUA = /\\bEdge\\/12\\.(\\d+)\\b/, edgeUA = /\\bEdge\\/.(\\d+)\\b/, inIframe = window.top !== window.self;\n        polyfill = \"polyfill\" in opts ? opts.polyfill : newerIEUA.test(navigator.userAgent) || (navigator.userAgent.match(olderEdgeUA) || [])[1] < 10547 || (navigator.userAgent.match(webkitUA) || [])[1] < 537 || edgeUA.test(navigator.userAgent) && inIframe;\n        // create xhr requests object\n        var requests = {}, requestAnimationFrame = window.requestAnimationFrame || setTimeout, uses = document.getElementsByTagName(\"use\"), numberOfSvgUseElementsToBypass = 0;\n        // conditionally start the interval if the polyfill is active\n        polyfill && oninterval();\n    }\n    function getSVGAncestor(node) {\n        for (var svg = node; \"svg\" !== svg.nodeName.toLowerCase() && (svg = svg.parentNode); ) {}\n        return svg;\n    }\n    return svg4everybody;\n});\n},{}],6:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _en = _dereq_(16);\n\nvar _general = _dereq_(28);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar i18n = { lang: 'en', en: _en.EN };\n\ni18n.language = function () {\n\tfor (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t\targs[_key] = arguments[_key];\n\t}\n\n\tif (args !== null && args !== undefined && args.length) {\n\n\t\tif (typeof args[0] !== 'string') {\n\t\t\tthrow new TypeError('Language code must be a string value');\n\t\t}\n\n\t\tif (!/^[a-z]{2,3}((\\-|_)[a-z]{2})?$/i.test(args[0])) {\n\t\t\tthrow new TypeError('Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters');\n\t\t}\n\n\t\ti18n.lang = args[0];\n\n\t\tif (i18n[args[0]] === undefined) {\n\t\t\targs[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object' ? args[1] : {};\n\t\t\ti18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN;\n\t\t} else if (args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object') {\n\t\t\ti18n[args[0]] = args[1];\n\t\t}\n\t}\n\n\treturn i18n.lang;\n};\n\ni18n.t = function (message) {\n\tvar pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n\n\tif (typeof message === 'string' && message.length) {\n\n\t\tvar str = void 0,\n\t\t    pluralForm = void 0;\n\n\t\tvar language = i18n.language();\n\n\t\tvar _plural = function _plural(input, number, form) {\n\n\t\t\tif ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {\n\t\t\t\treturn input;\n\t\t\t}\n\n\t\t\tvar _pluralForms = function () {\n\t\t\t\treturn [function () {\n\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t}, function () {\n\t\t\t\t\treturn (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t}, function () {\n\t\t\t\t\treturn (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 4 ? undefined : arguments[4];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn [3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) {\n\t\t\t\t\t\treturn arguments.length <= 4 ? undefined : arguments[4];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) {\n\t\t\t\t\t\treturn arguments.length <= 4 ? undefined : arguments[4];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 5 ? undefined : arguments[5];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) {\n\t\t\t\t\t\treturn arguments.length <= 4 ? undefined : arguments[4];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {\n\t\t\t\t\t\treturn arguments.length <= 5 ? undefined : arguments[5];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 6 ? undefined : arguments[6];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 4 ? undefined : arguments[4];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\treturn (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 4 ? undefined : arguments[4];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\treturn (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 4 ? undefined : arguments[4];\n\t\t\t\t\t}\n\t\t\t\t}, function () {\n\t\t\t\t\tif ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {\n\t\t\t\t\t\treturn arguments.length <= 1 ? undefined : arguments[1];\n\t\t\t\t\t} else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n\t\t\t\t\t\treturn arguments.length <= 2 ? undefined : arguments[2];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn arguments.length <= 3 ? undefined : arguments[3];\n\t\t\t\t\t}\n\t\t\t\t}];\n\t\t\t}();\n\n\t\t\treturn _pluralForms[form].apply(null, [number].concat(input));\n\t\t};\n\n\t\tif (i18n[language] !== undefined) {\n\t\t\tstr = i18n[language][message];\n\t\t\tif (pluralParam !== null && typeof pluralParam === 'number') {\n\t\t\t\tpluralForm = i18n[language]['mejs.plural-form'];\n\t\t\t\tstr = _plural.apply(null, [str, pluralParam, pluralForm]);\n\t\t\t}\n\t\t}\n\n\t\tif (!str && i18n.en) {\n\t\t\tstr = i18n.en[message];\n\t\t\tif (pluralParam !== null && typeof pluralParam === 'number') {\n\t\t\t\tpluralForm = i18n.en['mejs.plural-form'];\n\t\t\t\tstr = _plural.apply(null, [str, pluralParam, pluralForm]);\n\t\t\t}\n\t\t}\n\n\t\tstr = str || message;\n\n\t\tif (pluralParam !== null && typeof pluralParam === 'number') {\n\t\t\tstr = str.replace('%1', pluralParam);\n\t\t}\n\n\t\treturn (0, _general.escapeHTML)(str);\n\t}\n\n\treturn message;\n};\n\n_mejs2.default.i18n = i18n;\n\nif (typeof mejsL10n !== 'undefined') {\n\t_mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings);\n}\n\nexports.default = i18n;\n\n},{\"16\":16,\"28\":28,\"8\":8}],7:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _general = _dereq_(28);\n\nvar _media2 = _dereq_(30);\n\nvar _renderer = _dereq_(9);\n\nvar _constants = _dereq_(26);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar MediaElement = function MediaElement(idOrNode, options, sources) {\n\tvar _this = this;\n\n\t_classCallCheck(this, MediaElement);\n\n\tvar t = this;\n\n\tsources = Array.isArray(sources) ? sources : null;\n\n\tt.defaults = {\n\t\trenderers: [],\n\n\t\tfakeNodeName: 'div',\n\n\t\tpluginPath: 'build/',\n\n\t\ticonSprite: 'mejs-controls.svg',\n\n\t\tshimScriptAccess: 'sameDomain'\n\t};\n\n\toptions = Object.assign(t.defaults, options);\n\n\tt.mediaElement = _document2.default.createElement(options.fakeNodeName);\n\n\tvar id = idOrNode,\n\t    error = false;\n\n\tif (typeof idOrNode === 'string') {\n\t\tt.mediaElement.originalNode = _document2.default.getElementById(idOrNode);\n\t} else {\n\t\tt.mediaElement.originalNode = idOrNode;\n\t\tid = idOrNode.id;\n\t}\n\n\tif (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {\n\t\treturn null;\n\t}\n\n\tt.mediaElement.options = options;\n\tid = id || 'mejs_' + Math.random().toString().slice(2);\n\n\tt.mediaElement.originalNode.setAttribute('id', id + '_from_mejs');\n\n\tvar tagName = t.mediaElement.originalNode.tagName.toLowerCase();\n\tif (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) {\n\t\tt.mediaElement.originalNode.setAttribute('preload', 'none');\n\t}\n\n\tt.mediaElement.originalNode.setAttribute('tabindex', -1);\n\n\tt.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode);\n\n\tt.mediaElement.appendChild(t.mediaElement.originalNode);\n\n\tvar processURL = function processURL(url, type) {\n\t\tif (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) {\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.onreadystatechange = function () {\n\t\t\t\tif (this.readyState === 4 && this.status === 200) {\n\t\t\t\t\tvar _url = _window2.default.URL || _window2.default.webkitURL,\n\t\t\t\t\t    blobUrl = _url.createObjectURL(this.response);\n\t\t\t\t\tt.mediaElement.originalNode.setAttribute('src', blobUrl);\n\t\t\t\t\treturn blobUrl;\n\t\t\t\t}\n\t\t\t\treturn url;\n\t\t\t};\n\t\t\txhr.open('GET', url);\n\t\t\txhr.responseType = 'blob';\n\t\t\txhr.send();\n\t\t}\n\n\t\treturn url;\n\t};\n\n\tvar mediaFiles = void 0;\n\tif (sources !== null) {\n\t\tmediaFiles = sources;\n\t} else if (t.mediaElement.originalNode !== null) {\n\n\t\tmediaFiles = [];\n\t\tswitch (t.mediaElement.originalNode.nodeName.toLowerCase()) {\n\t\t\tcase 'iframe':\n\t\t\t\tmediaFiles.push({\n\t\t\t\t\ttype: '',\n\t\t\t\t\tsrc: t.mediaElement.originalNode.getAttribute('src')\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'audio':\n\t\t\tcase 'video':\n\t\t\t\tvar _sources = t.mediaElement.originalNode.children.length,\n\t\t\t\t    nodeSource = t.mediaElement.originalNode.getAttribute('src');\n\n\t\t\t\tif (nodeSource) {\n\t\t\t\t\tvar node = t.mediaElement.originalNode,\n\t\t\t\t\t    type = (0, _media2.formatType)(nodeSource, node.getAttribute('type'));\n\t\t\t\t\tmediaFiles.push({\n\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\tsrc: processURL(nodeSource, type)\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 0; i < _sources; i++) {\n\t\t\t\t\tvar n = t.mediaElement.originalNode.children[i];\n\t\t\t\t\tif (n.tagName.toLowerCase() === 'source') {\n\t\t\t\t\t\tvar src = n.getAttribute('src'),\n\t\t\t\t\t\t    _type = (0, _media2.formatType)(src, n.getAttribute('type'));\n\t\t\t\t\t\tmediaFiles.push({ type: _type, src: processURL(src, _type) });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tt.mediaElement.id = id;\n\tt.mediaElement.renderers = {};\n\tt.mediaElement.events = {};\n\tt.mediaElement.promises = [];\n\tt.mediaElement.renderer = null;\n\tt.mediaElement.rendererName = null;\n\n\tt.mediaElement.changeRenderer = function (rendererName, mediaFiles) {\n\t\tvar t = _this,\n\t\t    media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;\n\n\t\tif (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) {\n\t\t\tt.mediaElement.renderer.pause();\n\t\t\tif (t.mediaElement.renderer.stop) {\n\t\t\t\tt.mediaElement.renderer.stop();\n\t\t\t}\n\t\t\tt.mediaElement.renderer.show();\n\t\t\tt.mediaElement.renderer.setSrc(media);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {\n\t\t\tt.mediaElement.renderer.pause();\n\t\t\tif (t.mediaElement.renderer.stop) {\n\t\t\t\tt.mediaElement.renderer.stop();\n\t\t\t}\n\t\t\tt.mediaElement.renderer.hide();\n\t\t}\n\n\t\tvar newRenderer = t.mediaElement.renderers[rendererName],\n\t\t    newRendererType = null;\n\n\t\tif (newRenderer !== undefined && newRenderer !== null) {\n\t\t\tnewRenderer.show();\n\t\t\tnewRenderer.setSrc(media);\n\t\t\tt.mediaElement.renderer = newRenderer;\n\t\t\tt.mediaElement.rendererName = rendererName;\n\t\t\treturn true;\n\t\t}\n\n\t\tvar rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order;\n\n\t\tfor (var _i = 0, total = rendererArray.length; _i < total; _i++) {\n\t\t\tvar index = rendererArray[_i];\n\n\t\t\tif (index === rendererName) {\n\t\t\t\tvar rendererList = _renderer.renderer.renderers;\n\t\t\t\tnewRendererType = rendererList[index];\n\n\t\t\t\tvar renderOptions = Object.assign(newRendererType.options, t.mediaElement.options);\n\t\t\t\tnewRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles);\n\t\t\t\tnewRenderer.name = rendererName;\n\n\t\t\t\tt.mediaElement.renderers[newRendererType.name] = newRenderer;\n\t\t\t\tt.mediaElement.renderer = newRenderer;\n\t\t\t\tt.mediaElement.rendererName = rendererName;\n\t\t\t\tnewRenderer.show();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tt.mediaElement.setSize = function (width, height) {\n\t\tif (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {\n\t\t\tt.mediaElement.renderer.setSize(width, height);\n\t\t}\n\t};\n\n\tt.mediaElement.generateError = function (message, urlList) {\n\t\tmessage = message || '';\n\t\turlList = Array.isArray(urlList) ? urlList : [];\n\t\tvar event = (0, _general.createEvent)('error', t.mediaElement);\n\t\tevent.message = message;\n\t\tevent.urls = urlList;\n\t\tt.mediaElement.dispatchEvent(event);\n\t\terror = true;\n\t};\n\n\tvar props = _mejs2.default.html5media.properties,\n\t    methods = _mejs2.default.html5media.methods,\n\t    addProperty = function addProperty(obj, name, onGet, onSet) {\n\t\tvar oldValue = obj[name];\n\t\tvar getFn = function getFn() {\n\t\t\treturn onGet.apply(obj, [oldValue]);\n\t\t},\n\t\t    setFn = function setFn(newValue) {\n\t\t\toldValue = onSet.apply(obj, [newValue]);\n\t\t\treturn oldValue;\n\t\t};\n\n\t\tObject.defineProperty(obj, name, {\n\t\t\tget: getFn,\n\t\t\tset: setFn\n\t\t});\n\t},\n\t    assignGettersSetters = function assignGettersSetters(propName) {\n\t\tif (propName !== 'src') {\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1),\n\t\t\t    getFn = function getFn() {\n\t\t\t\treturn t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null;\n\t\t\t},\n\t\t\t    setFn = function setFn(value) {\n\t\t\t\tif (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') {\n\t\t\t\t\tt.mediaElement.renderer['set' + capName](value);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\taddProperty(t.mediaElement, propName, getFn, setFn);\n\t\t\tt.mediaElement['get' + capName] = getFn;\n\t\t\tt.mediaElement['set' + capName] = setFn;\n\t\t}\n\t},\n\t    getSrc = function getSrc() {\n\t\treturn t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null;\n\t},\n\t    setSrc = function setSrc(value) {\n\t\tvar mediaFiles = [];\n\t\tif (typeof value === 'string') {\n\t\t\tmediaFiles.push({\n\t\t\t\tsrc: value,\n\t\t\t\ttype: value ? (0, _media2.getTypeFromFile)(value) : ''\n\t\t\t});\n\t\t} else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) {\n\t\t\tvar _src = (0, _media2.absolutizeUrl)(value.src),\n\t\t\t    _type2 = value.type,\n\t\t\t    media = Object.assign(value, {\n\t\t\t\tsrc: _src,\n\t\t\t\ttype: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2\n\t\t\t});\n\t\t\tmediaFiles.push(media);\n\t\t} else if (Array.isArray(value)) {\n\t\t\tfor (var _i2 = 0, total = value.length; _i2 < total; _i2++) {\n\n\t\t\t\tvar _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),\n\t\t\t\t    _type3 = value[_i2].type,\n\t\t\t\t    _media = Object.assign(value[_i2], {\n\t\t\t\t\tsrc: _src2,\n\t\t\t\t\ttype: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3\n\t\t\t\t});\n\t\t\t\tmediaFiles.push(_media);\n\t\t\t}\n\t\t}\n\n\t\tvar renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []),\n\t\t    event = void 0;\n\n\t\tif (!t.mediaElement.paused && !(t.mediaElement.src == null || t.mediaElement.src === '')) {\n\t\t\tt.mediaElement.pause();\n\t\t\tevent = (0, _general.createEvent)('pause', t.mediaElement);\n\t\t\tt.mediaElement.dispatchEvent(event);\n\t\t}\n\t\tt.mediaElement.originalNode.src = mediaFiles[0].src || '';\n\n\t\tif (renderInfo === null && mediaFiles[0].src) {\n\t\t\tt.mediaElement.generateError('No renderer found', mediaFiles);\n\t\t\treturn;\n\t\t}\n\n\t\tvar shouldChangeRenderer = !(mediaFiles[0].src == null || mediaFiles[0].src === '');\n\t\treturn shouldChangeRenderer ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null;\n\t},\n\t    triggerAction = function triggerAction(methodName, args) {\n\t\ttry {\n\t\t\tif (methodName === 'play' && (t.mediaElement.rendererName === 'native_dash' || t.mediaElement.rendererName === 'native_hls' || t.mediaElement.rendererName === 'vimeo_iframe')) {\n\t\t\t\tvar response = t.mediaElement.renderer[methodName](args);\n\t\t\t\tif (response && typeof response.then === 'function') {\n\t\t\t\t\tresponse.catch(function () {\n\t\t\t\t\t\tif (t.mediaElement.paused) {\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tvar tmpResponse = t.mediaElement.renderer.play();\n\t\t\t\t\t\t\t\tif (tmpResponse !== undefined) {\n\t\t\t\t\t\t\t\t\ttmpResponse.catch(function () {\n\t\t\t\t\t\t\t\t\t\tif (!t.mediaElement.renderer.paused) {\n\t\t\t\t\t\t\t\t\t\t\tt.mediaElement.renderer.pause();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, 150);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn response;\n\t\t\t} else {\n\t\t\t\treturn t.mediaElement.renderer[methodName](args);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tt.mediaElement.generateError(e, mediaFiles);\n\t\t\tthrow e;\n\t\t}\n\t},\n\t    assignMethods = function assignMethods(methodName) {\n\t\tt.mediaElement[methodName] = function () {\n\t\t\tfor (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t\t\t\targs[_key] = arguments[_key];\n\t\t\t}\n\n\t\t\tif (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') {\n\t\t\t\tif (t.mediaElement.promises.length) {\n\t\t\t\t\treturn Promise.all(t.mediaElement.promises).then(function () {\n\t\t\t\t\t\treturn triggerAction(methodName, args);\n\t\t\t\t\t}).catch(function (e) {\n\t\t\t\t\t\tt.mediaElement.generateError(e, mediaFiles);\n\t\t\t\t\t\treturn Promise.reject(e);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\treturn triggerAction(methodName, args);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\t};\n\n\taddProperty(t.mediaElement, 'src', getSrc, setSrc);\n\n\tt.mediaElement.getSrc = getSrc;\n\tt.mediaElement.setSrc = setSrc;\n\tfor (var _i3 = 0, total = props.length; _i3 < total; _i3++) {\n\t\tassignGettersSetters(props[_i3]);\n\t}\n\n\tfor (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {\n\t\tassignMethods(methods[_i4]);\n\t}\n\n\tt.mediaElement.addEventListener = function (eventName, callback) {\n\t\tt.mediaElement.events[eventName] = t.mediaElement.events[eventName] || [];\n\n\t\tt.mediaElement.events[eventName].push(callback);\n\t};\n\tt.mediaElement.removeEventListener = function (eventName, callback) {\n\t\tif (!eventName) {\n\t\t\tt.mediaElement.events = {};\n\t\t\treturn true;\n\t\t}\n\n\t\tvar callbacks = t.mediaElement.events[eventName];\n\n\t\tif (!callbacks) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!callback) {\n\t\t\tt.mediaElement.events[eventName] = [];\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (var _i5 = 0; _i5 < callbacks.length; _i5++) {\n\t\t\tif (callbacks[_i5] === callback) {\n\t\t\t\tt.mediaElement.events[eventName].splice(_i5, 1);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tt.mediaElement.dispatchEvent = function (event) {\n\t\tvar callbacks = t.mediaElement.events[event.type];\n\t\tif (callbacks) {\n\t\t\tfor (var _i6 = 0; _i6 < callbacks.length; _i6++) {\n\t\t\t\tcallbacks[_i6].apply(null, [event]);\n\t\t\t}\n\t\t}\n\t};\n\n\tt.mediaElement.destroy = function () {\n\t\tvar mediaElement = t.mediaElement.originalNode.cloneNode(true);\n\t\tvar wrapper = t.mediaElement.parentElement;\n\t\tmediaElement.removeAttribute('id');\n\t\tmediaElement.remove();\n\t\tt.mediaElement.remove();\n\t\twrapper.appendChild(mediaElement);\n\t};\n\n\tif (mediaFiles.length) {\n\t\tt.mediaElement.src = mediaFiles;\n\t}\n\n\tif (t.mediaElement.promises.length) {\n\t\tPromise.all(t.mediaElement.promises).then(function () {\n\t\t\tif (t.mediaElement.options.success) {\n\t\t\t\tt.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);\n\t\t\t}\n\t\t}).catch(function () {\n\t\t\tif (error && t.mediaElement.options.error) {\n\t\t\t\tt.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tif (t.mediaElement.options.success) {\n\t\t\tt.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);\n\t\t}\n\n\t\tif (error && t.mediaElement.options.error) {\n\t\t\tt.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);\n\t\t}\n\t}\n\n\treturn t.mediaElement;\n};\n\n_window2.default.MediaElement = MediaElement;\n_mejs2.default.MediaElement = MediaElement;\n\nexports.default = MediaElement;\n\n},{\"2\":2,\"26\":26,\"28\":28,\"3\":3,\"30\":30,\"8\":8,\"9\":9}],8:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mejs = {};\n\nmejs.version = '5.1.2';\n\nmejs.html5media = {\n\tproperties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],\n\treadOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'],\n\n\tmethods: ['load', 'play', 'pause', 'canPlayType'],\n\n\tevents: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'],\n\n\tmediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv']\n};\n\n_window2.default.mejs = mejs;\n\nexports.default = mejs;\n\n},{\"3\":3}],9:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.renderer = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Renderer = function () {\n\tfunction Renderer() {\n\t\t_classCallCheck(this, Renderer);\n\n\t\tthis.renderers = {};\n\t\tthis.order = [];\n\t}\n\n\t_createClass(Renderer, [{\n\t\tkey: 'add',\n\t\tvalue: function add(renderer) {\n\t\t\tif (renderer.name === undefined) {\n\t\t\t\tthrow new TypeError('renderer must contain at least `name` property');\n\t\t\t}\n\n\t\t\tthis.renderers[renderer.name] = renderer;\n\t\t\tthis.order.push(renderer.name);\n\t\t}\n\t}, {\n\t\tkey: 'select',\n\t\tvalue: function select(mediaFiles) {\n\t\t\tvar renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\t\tvar renderersLength = renderers.length;\n\n\t\t\trenderers = renderers.length ? renderers : this.order;\n\n\t\t\tif (!renderersLength) {\n\t\t\t\tvar rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],\n\t\t\t\t    rendererRanking = function rendererRanking(renderer) {\n\t\t\t\t\tfor (var i = 0, total = rendererIndicator.length; i < total; i++) {\n\t\t\t\t\t\tif (rendererIndicator[i].test(renderer)) {\n\t\t\t\t\t\t\treturn i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn rendererIndicator.length;\n\t\t\t\t};\n\n\t\t\t\trenderers.sort(function (a, b) {\n\t\t\t\t\treturn rendererRanking(a) - rendererRanking(b);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor (var i = 0, total = renderers.length; i < total; i++) {\n\t\t\t\tvar key = renderers[i],\n\t\t\t\t    _renderer = this.renderers[key];\n\n\t\t\t\tif (_renderer !== null && _renderer !== undefined) {\n\t\t\t\t\tfor (var j = 0, jl = mediaFiles.length; j < jl; j++) {\n\n\t\t\t\t\t\tif (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\trendererName: _renderer.name,\n\t\t\t\t\t\t\t\tsrc: mediaFiles[j].src\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t}, {\n\t\tkey: 'order',\n\t\tset: function set(order) {\n\t\t\tif (!Array.isArray(order)) {\n\t\t\t\tthrow new TypeError('order must be an array of strings.');\n\t\t\t}\n\n\t\t\tthis._order = order;\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this._order;\n\t\t}\n\t}, {\n\t\tkey: 'renderers',\n\t\tset: function set(renderers) {\n\t\t\tif (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') {\n\t\t\t\tthrow new TypeError('renderers must be an array of objects.');\n\t\t\t}\n\n\t\t\tthis._renderers = renderers;\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this._renderers;\n\t\t}\n\t}]);\n\n\treturn Renderer;\n}();\n\nvar renderer = exports.renderer = new Renderer();\n\n_mejs2.default.Renderers = renderer;\n\n},{\"8\":8}],10:[function(_dereq_,module,exports){\n'use strict';\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _player = _dereq_(17);\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _constants = _dereq_(26);\n\nvar Features = _interopRequireWildcard(_constants);\n\nvar _general = _dereq_(28);\n\nvar _dom = _dereq_(27);\n\nvar _media = _dereq_(30);\n\nvar _generate = _dereq_(29);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nObject.assign(_player.config, {\n\tusePluginFullScreen: true,\n\n\tfullscreenText: null,\n\n\tuseFakeFullscreen: false\n});\n\nObject.assign(_player2.default.prototype, {\n\tisFullScreen: false,\n\n\tisNativeFullScreen: false,\n\n\tisInIframe: false,\n\n\tisPluginClickThroughCreated: false,\n\n\tfullscreenMode: '',\n\n\tcontainerSizeTimeout: null,\n\n\tbuildfullscreen: function buildfullscreen(player) {\n\t\tif (!player.isVideo) {\n\t\t\treturn;\n\t\t}\n\n\t\tplayer.isInIframe = _window2.default.location !== _window2.default.parent.location;\n\n\t\tplayer.detectFullscreenMode();\n\n\t\tvar t = this,\n\t\t    fullscreenTitle = (0, _general.isString)(t.options.fullscreenText) ? t.options.fullscreenText : _i18n2.default.t('mejs.fullscreen'),\n\t\t    fullscreenBtn = _document2.default.createElement('div');\n\t\tfullscreenBtn.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'fullscreen-button';\n\t\tfullscreenBtn.innerHTML = (0, _generate.generateControlButton)(t.id, fullscreenTitle, fullscreenTitle, '' + t.media.options.iconSprite, ['icon-fullscreen', 'icon-unfullscreen'], '' + t.options.classPrefix);\n\t\tt.addControlElement(fullscreenBtn, 'fullscreen');\n\n\t\tfullscreenBtn.addEventListener('click', function () {\n\t\t\tvar isFullScreen = Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || player.isFullScreen;\n\n\t\t\tif (isFullScreen) {\n\t\t\t\tplayer.exitFullScreen();\n\t\t\t} else {\n\t\t\t\tplayer.enterFullScreen();\n\t\t\t}\n\t\t});\n\n\t\tplayer.fullscreenBtn = fullscreenBtn;\n\n\t\tt.options.keyActions.push({\n\t\t\tkeys: [70],\n\t\t\taction: function action(player, media, key, event) {\n\t\t\t\tif (!event.ctrlKey) {\n\t\t\t\t\tif (typeof player.enterFullScreen !== 'undefined') {\n\t\t\t\t\t\tif (player.isFullScreen) {\n\t\t\t\t\t\t\tplayer.exitFullScreen();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tplayer.enterFullScreen();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tt.exitFullscreenCallback = function (e) {\n\t\t\tvar key = e.which || e.keyCode || 0;\n\t\t\tif (t.options.enableKeyboard && key === 27 && (Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || t.isFullScreen)) {\n\t\t\t\tplayer.exitFullScreen();\n\t\t\t}\n\t\t};\n\n\t\tt.globalBind('keydown', t.exitFullscreenCallback);\n\n\t\tt.normalHeight = 0;\n\t\tt.normalWidth = 0;\n\n\t\tif (Features.HAS_TRUE_NATIVE_FULLSCREEN) {\n\t\t\tvar fullscreenChanged = function fullscreenChanged() {\n\t\t\t\tif (player.isFullScreen) {\n\t\t\t\t\tif (Features.isFullScreen()) {\n\t\t\t\t\t\tplayer.isNativeFullScreen = true;\n\n\t\t\t\t\t\tplayer.setControlsSize();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplayer.isNativeFullScreen = false;\n\n\t\t\t\t\t\tplayer.exitFullScreen();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tplayer.globalBind(Features.FULLSCREEN_EVENT_NAME, fullscreenChanged);\n\t\t}\n\t},\n\tcleanfullscreen: function cleanfullscreen(player) {\n\t\tplayer.exitFullScreen();\n\t\tplayer.globalUnbind('keydown', player.exitFullscreenCallback);\n\t},\n\tdetectFullscreenMode: function detectFullscreenMode() {\n\t\tvar t = this,\n\t\t    isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);\n\n\t\tvar mode = '';\n\n\t\tif (Features.HAS_TRUE_NATIVE_FULLSCREEN && isNative) {\n\t\t\tmode = 'native-native';\n\t\t} else if (Features.HAS_TRUE_NATIVE_FULLSCREEN && !isNative) {\n\t\t\tmode = 'plugin-native';\n\t\t} else if (t.usePluginFullScreen && Features.SUPPORT_POINTER_EVENTS) {\n\t\t\tmode = 'plugin-click';\n\t\t}\n\n\t\tt.fullscreenMode = mode;\n\t\treturn mode;\n\t},\n\tenterFullScreen: function enterFullScreen() {\n\t\tvar t = this,\n\t\t    isNative = t.media.rendererName !== null && /(html5|native)/i.test(t.media.rendererName),\n\t\t    containerStyles = getComputedStyle(t.getElement(t.container));\n\n\t\tif (!t.isVideo) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (t.options.useFakeFullscreen === false && (Features.IS_IOS || Features.IS_SAFARI) && Features.HAS_IOS_FULLSCREEN && typeof t.media.originalNode.webkitEnterFullscreen === 'function' && t.media.originalNode.canPlayType((0, _media.getTypeFromFile)(t.media.getSrc()))) {\n\t\t\tt.media.originalNode.webkitEnterFullscreen();\n\t\t\treturn;\n\t\t}\n\n\t\t(0, _dom.addClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');\n\t\t(0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');\n\n\t\tt.normalHeight = parseFloat(containerStyles.height);\n\t\tt.normalWidth = parseFloat(containerStyles.width);\n\n\t\tif (t.fullscreenMode === 'native-native' || t.fullscreenMode === 'plugin-native') {\n\t\t\tFeatures.requestFullScreen(t.getElement(t.container));\n\n\t\t\tif (t.isInIframe) {\n\t\t\t\tsetTimeout(function checkFullscreen() {\n\n\t\t\t\t\tif (t.isNativeFullScreen) {\n\t\t\t\t\t\tvar percentErrorMargin = 0.002,\n\t\t\t\t\t\t    windowWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth,\n\t\t\t\t\t\t    screenWidth = screen.width,\n\t\t\t\t\t\t    absDiff = Math.abs(screenWidth - windowWidth),\n\t\t\t\t\t\t    marginError = screenWidth * percentErrorMargin;\n\n\t\t\t\t\t\tif (absDiff > marginError) {\n\t\t\t\t\t\t\tt.exitFullScreen();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetTimeout(checkFullscreen, 500);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t}\n\n\t\tt.getElement(t.container).style.width = '100%';\n\t\tt.getElement(t.container).style.height = '100%';\n\n\t\tt.containerSizeTimeout = setTimeout(function () {\n\t\t\tt.getElement(t.container).style.width = '100%';\n\t\t\tt.getElement(t.container).style.height = '100%';\n\t\t\tt.setControlsSize();\n\t\t}, 500);\n\n\t\tif (isNative) {\n\t\t\tt.node.style.width = '100%';\n\t\t\tt.node.style.height = '100%';\n\t\t} else {\n\t\t\tvar elements = t.getElement(t.container).querySelectorAll('embed, object, video'),\n\t\t\t    _total = elements.length;\n\t\t\tfor (var i = 0; i < _total; i++) {\n\t\t\t\telements[i].style.width = '100%';\n\t\t\t\telements[i].style.height = '100%';\n\t\t\t}\n\t\t}\n\n\t\tif (t.options.setDimensions && typeof t.media.setSize === 'function') {\n\t\t\tt.media.setSize(screen.width, screen.height);\n\t\t}\n\n\t\tvar layers = t.getElement(t.layers).children,\n\t\t    total = layers.length;\n\t\tfor (var _i = 0; _i < total; _i++) {\n\t\t\tlayers[_i].style.width = '100%';\n\t\t\tlayers[_i].style.height = '100%';\n\t\t}\n\n\t\tif (t.fullscreenBtn) {\n\t\t\t(0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');\n\t\t\t(0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');\n\t\t}\n\n\t\tt.setControlsSize();\n\t\tt.isFullScreen = true;\n\n\t\tvar zoomFactor = Math.min(screen.width / t.width, screen.height / t.height),\n\t\t    captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');\n\t\tif (captionText) {\n\t\t\tcaptionText.style.fontSize = zoomFactor * 100 + '%';\n\t\t\tcaptionText.style.lineHeight = 'normal';\n\t\t\tt.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = (screen.height - t.normalHeight) / 2 - t.getElement(t.controls).offsetHeight / 2 + zoomFactor + 15 + 'px';\n\t\t}\n\t\tvar event = (0, _general.createEvent)('enteredfullscreen', t.getElement(t.container));\n\t\tt.getElement(t.container).dispatchEvent(event);\n\t},\n\texitFullScreen: function exitFullScreen() {\n\t\tvar t = this,\n\t\t    isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);\n\n\t\tif (!t.isVideo) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout(t.containerSizeTimeout);\n\n\t\tif (Features.HAS_TRUE_NATIVE_FULLSCREEN && (Features.IS_FULLSCREEN || t.isFullScreen)) {\n\t\t\tFeatures.cancelFullScreen();\n\t\t}\n\n\t\t(0, _dom.removeClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');\n\t\t(0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');\n\n\t\tif (t.options.setDimensions) {\n\t\t\tt.getElement(t.container).style.width = t.normalWidth + 'px';\n\t\t\tt.getElement(t.container).style.height = t.normalHeight + 'px';\n\n\t\t\tif (isNative) {\n\t\t\t\tt.node.style.width = t.normalWidth + 'px';\n\t\t\t\tt.node.style.height = t.normalHeight + 'px';\n\t\t\t} else {\n\t\t\t\tvar elements = t.getElement(t.container).querySelectorAll('embed, object, video'),\n\t\t\t\t    _total2 = elements.length;\n\t\t\t\tfor (var i = 0; i < _total2; i++) {\n\t\t\t\t\telements[i].style.width = t.normalWidth + 'px';\n\t\t\t\t\telements[i].style.height = t.normalHeight + 'px';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof t.media.setSize === 'function') {\n\t\t\t\tt.media.setSize(t.normalWidth, t.normalHeight);\n\t\t\t}\n\n\t\t\tvar layers = t.getElement(t.layers).children,\n\t\t\t    total = layers.length;\n\t\t\tfor (var _i2 = 0; _i2 < total; _i2++) {\n\t\t\t\tlayers[_i2].style.width = t.normalWidth + 'px';\n\t\t\t\tlayers[_i2].style.height = t.normalHeight + 'px';\n\t\t\t}\n\t\t}\n\n\t\tif (t.fullscreenBtn) {\n\t\t\t(0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');\n\t\t\t(0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');\n\t\t}\n\n\t\tt.setControlsSize();\n\t\tt.isFullScreen = false;\n\n\t\tvar captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');\n\t\tif (captionText) {\n\t\t\tcaptionText.style.fontSize = '';\n\t\t\tcaptionText.style.lineHeight = '';\n\t\t\tt.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = '';\n\t\t}\n\t\tvar event = (0, _general.createEvent)('exitedfullscreen', t.getElement(t.container));\n\t\tt.getElement(t.container).dispatchEvent(event);\n\t}\n});\n\n},{\"17\":17,\"2\":2,\"26\":26,\"27\":27,\"28\":28,\"29\":29,\"3\":3,\"30\":30,\"6\":6}],11:[function(_dereq_,module,exports){\n'use strict';\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _player = _dereq_(17);\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _general = _dereq_(28);\n\nvar _dom = _dereq_(27);\n\nvar _generate = _dereq_(29);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nObject.assign(_player.config, {\n\tplayText: null,\n\n\tpauseText: null\n});\n\nObject.assign(_player2.default.prototype, {\n\tbuildplaypause: function buildplaypause(player, controls, layers, media) {\n\t\tvar t = this,\n\t\t    op = t.options,\n\t\t    playTitle = (0, _general.isString)(op.playText) ? op.playText : _i18n2.default.t('mejs.play'),\n\t\t    pauseTitle = (0, _general.isString)(op.pauseText) ? op.pauseText : _i18n2.default.t('mejs.pause'),\n\t\t    play = _document2.default.createElement('div');\n\n\t\tplay.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'playpause-button ' + t.options.classPrefix + 'play';\n\t\tplay.innerHTML = (0, _generate.generateControlButton)(t.id, pauseTitle, playTitle, '' + t.media.options.iconSprite, ['icon-play', 'icon-pause', 'icon-replay'], '' + t.options.classPrefix);\n\t\tplay.addEventListener('click', function () {\n\t\t\tif (t.paused) {\n\t\t\t\tt.play();\n\t\t\t} else {\n\t\t\t\tt.pause();\n\t\t\t}\n\t\t});\n\n\t\tvar playBtn = play.querySelector('button');\n\t\tt.addControlElement(play, 'playpause');\n\n\t\tfunction togglePlayPause(which) {\n\t\t\t(0, _dom.removeClass)(play, t.options.classPrefix + 'play');\n\t\t\t(0, _dom.removeClass)(play, t.options.classPrefix + 'replay');\n\t\t\t(0, _dom.removeClass)(play, t.options.classPrefix + 'pause');\n\n\t\t\tif ('play' === which) {\n\t\t\t\t(0, _dom.addClass)(play, t.options.classPrefix + 'pause');\n\t\t\t\tplayBtn.setAttribute('title', pauseTitle);\n\t\t\t\tplayBtn.setAttribute('aria-label', pauseTitle);\n\t\t\t} else if ('pse' === which) {\n\t\t\t\t(0, _dom.addClass)(play, t.options.classPrefix + 'play');\n\t\t\t\tplayBtn.setAttribute('title', playTitle);\n\t\t\t\tplayBtn.setAttribute('aria-label', playTitle);\n\t\t\t} else {\n\t\t\t\t(0, _dom.addClass)(play, t.options.classPrefix + 'replay');\n\t\t\t\tplayBtn.setAttribute('title', playTitle);\n\t\t\t\tplayBtn.setAttribute('aria-label', playTitle);\n\t\t\t}\n\t\t}\n\n\t\ttogglePlayPause('pse');\n\n\t\tmedia.addEventListener('loadedmetadata', function () {\n\t\t\tif (media.rendererName.indexOf('flash') === -1) {\n\t\t\t\ttogglePlayPause('pse');\n\t\t\t}\n\t\t});\n\t\tmedia.addEventListener('play', function () {\n\t\t\ttogglePlayPause('play');\n\t\t});\n\t\tmedia.addEventListener('playing', function () {\n\t\t\ttogglePlayPause('play');\n\t\t});\n\t\tmedia.addEventListener('pause', function () {\n\t\t\ttogglePlayPause('pse');\n\t\t});\n\t\tmedia.addEventListener('ended', function () {\n\t\t\tif (!player.options.loop) {\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\ttogglePlayPause('replay');\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t});\n\t}\n});\n\n},{\"17\":17,\"2\":2,\"27\":27,\"28\":28,\"29\":29,\"6\":6}],12:[function(_dereq_,module,exports){\n'use strict';\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _player = _dereq_(17);\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _constants = _dereq_(26);\n\nvar _time = _dereq_(32);\n\nvar _dom = _dereq_(27);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nObject.assign(_player.config, {\n\tenableProgressTooltip: true,\n\n\tuseSmoothHover: true,\n\n\tforceLive: false\n});\n\nObject.assign(_player2.default.prototype, {\n\tbuildprogress: function buildprogress(player, controls, layers, media) {\n\n\t\tvar lastKeyPressTime = 0,\n\t\t    mouseIsDown = false,\n\t\t    startedPaused = false;\n\n\t\tvar t = this,\n\t\t    autoRewindInitial = player.options.autoRewind,\n\t\t    tooltip = player.options.enableProgressTooltip ? '<span class=\"' + t.options.classPrefix + 'time-float\">' + ('<span class=\"' + t.options.classPrefix + 'time-float-current\">00:00</span>') + ('<span class=\"' + t.options.classPrefix + 'time-float-corner\"></span>') + '</span>' : '',\n\t\t    rail = _document2.default.createElement('div');\n\n\t\trail.className = t.options.classPrefix + 'time-rail';\n\t\trail.innerHTML = '<span class=\"' + t.options.classPrefix + 'time-total ' + t.options.classPrefix + 'time-slider\">' + ('<span class=\"' + t.options.classPrefix + 'time-buffering\"></span>') + ('<span class=\"' + t.options.classPrefix + 'time-loaded\"></span>') + ('<span class=\"' + t.options.classPrefix + 'time-current\"></span>') + ('<span class=\"' + t.options.classPrefix + 'time-hovered no-hover\"></span>') + ('<span class=\"' + t.options.classPrefix + 'time-handle\"><span class=\"' + t.options.classPrefix + 'time-handle-content\"></span></span>') + ('' + tooltip) + '</span>';\n\n\t\tt.addControlElement(rail, 'progress');\n\n\t\tt.options.keyActions.push({\n\t\t\tkeys: [37, 227],\n\t\t\taction: function action(player) {\n\t\t\t\tif (!isNaN(player.duration) && player.duration > 0) {\n\t\t\t\t\tif (player.isVideo) {\n\t\t\t\t\t\tplayer.showControls();\n\t\t\t\t\t\tplayer.startControlsTimer();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar timeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'time-total');\n\t\t\t\t\tif (timeSlider) {\n\t\t\t\t\t\ttimeSlider.focus();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar newTime = Math.max(player.currentTime - player.options.defaultSeekBackwardInterval(player), 0);\n\n\t\t\t\t\tif (!player.paused) {\n\t\t\t\t\t\tplayer.pause();\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tplayer.setCurrentTime(newTime, true);\n\t\t\t\t\t}, 0);\n\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tplayer.play();\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}, {\n\t\t\tkeys: [39, 228],\n\t\t\taction: function action(player) {\n\n\t\t\t\tif (!isNaN(player.duration) && player.duration > 0) {\n\t\t\t\t\tif (player.isVideo) {\n\t\t\t\t\t\tplayer.showControls();\n\t\t\t\t\t\tplayer.startControlsTimer();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar timeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'time-total');\n\t\t\t\t\tif (timeSlider) {\n\t\t\t\t\t\ttimeSlider.focus();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar newTime = Math.min(player.currentTime + player.options.defaultSeekForwardInterval(player), player.duration);\n\n\t\t\t\t\tif (!player.paused) {\n\t\t\t\t\t\tplayer.pause();\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tplayer.setCurrentTime(newTime, true);\n\t\t\t\t\t}, 0);\n\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tplayer.play();\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tt.rail = controls.querySelector('.' + t.options.classPrefix + 'time-rail');\n\t\tt.total = controls.querySelector('.' + t.options.classPrefix + 'time-total');\n\t\tt.loaded = controls.querySelector('.' + t.options.classPrefix + 'time-loaded');\n\t\tt.current = controls.querySelector('.' + t.options.classPrefix + 'time-current');\n\t\tt.handle = controls.querySelector('.' + t.options.classPrefix + 'time-handle');\n\t\tt.timefloat = controls.querySelector('.' + t.options.classPrefix + 'time-float');\n\t\tt.timefloatcurrent = controls.querySelector('.' + t.options.classPrefix + 'time-float-current');\n\t\tt.slider = controls.querySelector('.' + t.options.classPrefix + 'time-slider');\n\t\tt.hovered = controls.querySelector('.' + t.options.classPrefix + 'time-hovered');\n\t\tt.buffer = controls.querySelector('.' + t.options.classPrefix + 'time-buffering');\n\t\tt.newTime = 0;\n\t\tt.forcedHandlePause = false;\n\t\tt.setTransformStyle = function (element, value) {\n\t\t\telement.style.transform = value;\n\t\t\telement.style.webkitTransform = value;\n\t\t\telement.style.MozTransform = value;\n\t\t\telement.style.msTransform = value;\n\t\t\telement.style.OTransform = value;\n\t\t};\n\n\t\tt.buffer.style.display = 'none';\n\n\t\tvar handleMouseMove = function handleMouseMove(e) {\n\t\t\tvar totalStyles = getComputedStyle(t.total),\n\t\t\t    offsetStyles = (0, _dom.offset)(t.total),\n\t\t\t    width = t.total.offsetWidth,\n\t\t\t    transform = function () {\n\t\t\t\tif (totalStyles.webkitTransform !== undefined) {\n\t\t\t\t\treturn 'webkitTransform';\n\t\t\t\t} else if (totalStyles.mozTransform !== undefined) {\n\t\t\t\t\treturn 'mozTransform ';\n\t\t\t\t} else if (totalStyles.oTransform !== undefined) {\n\t\t\t\t\treturn 'oTransform';\n\t\t\t\t} else if (totalStyles.msTransform !== undefined) {\n\t\t\t\t\treturn 'msTransform';\n\t\t\t\t} else {\n\t\t\t\t\treturn 'transform';\n\t\t\t\t}\n\t\t\t}(),\n\t\t\t    cssMatrix = function () {\n\t\t\t\tif ('WebKitCSSMatrix' in window) {\n\t\t\t\t\treturn 'WebKitCSSMatrix';\n\t\t\t\t} else if ('MSCSSMatrix' in window) {\n\t\t\t\t\treturn 'MSCSSMatrix';\n\t\t\t\t} else if ('CSSMatrix' in window) {\n\t\t\t\t\treturn 'CSSMatrix';\n\t\t\t\t}\n\t\t\t}();\n\n\t\t\tvar percentage = 0,\n\t\t\t    leftPos = 0,\n\t\t\t    pos = 0,\n\t\t\t    x = void 0;\n\n\t\t\tif (e.originalEvent && e.originalEvent.changedTouches) {\n\t\t\t\tx = e.originalEvent.changedTouches[0].pageX;\n\t\t\t} else if (e.changedTouches) {\n\t\t\t\tx = e.changedTouches[0].pageX;\n\t\t\t} else {\n\t\t\t\tx = e.pageX;\n\t\t\t}\n\n\t\t\tif (t.getDuration()) {\n\t\t\t\tif (x < offsetStyles.left) {\n\t\t\t\t\tx = offsetStyles.left;\n\t\t\t\t} else if (x > width + offsetStyles.left) {\n\t\t\t\t\tx = width + offsetStyles.left;\n\t\t\t\t}\n\n\t\t\t\tpos = x - offsetStyles.left;\n\t\t\t\tpercentage = pos / width;\n\t\t\t\tt.newTime = percentage * t.getDuration();\n\n\t\t\t\tif (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {\n\t\t\t\t\tt.setCurrentRailHandle(t.newTime);\n\t\t\t\t\tt.updateCurrent(t.newTime);\n\t\t\t\t}\n\n\t\t\t\tif (!_constants.IS_IOS && !_constants.IS_ANDROID) {\n\t\t\t\t\tif (pos < 0) {\n\t\t\t\t\t\tpos = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (t.options.useSmoothHover && cssMatrix !== null && typeof window[cssMatrix] !== 'undefined') {\n\t\t\t\t\t\tvar matrix = new window[cssMatrix](getComputedStyle(t.handle)[transform]),\n\t\t\t\t\t\t    handleLocation = matrix.m41,\n\t\t\t\t\t\t    hoverScaleX = pos / parseFloat(getComputedStyle(t.total).width) - handleLocation / parseFloat(getComputedStyle(t.total).width);\n\n\t\t\t\t\t\tt.hovered.style.left = handleLocation + 'px';\n\t\t\t\t\t\tt.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');\n\t\t\t\t\t\tt.hovered.setAttribute('pos', pos);\n\n\t\t\t\t\t\tif (hoverScaleX >= 0) {\n\t\t\t\t\t\t\t(0, _dom.removeClass)(t.hovered, 'negative');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t(0, _dom.addClass)(t.hovered, 'negative');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t.timefloat) {\n\t\t\t\t\t\tvar half = t.timefloat.offsetWidth / 2,\n\t\t\t\t\t\t    offsetContainer = mejs.Utils.offset(t.getElement(t.container)),\n\t\t\t\t\t\t    tooltipStyles = getComputedStyle(t.timefloat);\n\n\t\t\t\t\t\tif (x - offsetContainer.left < t.timefloat.offsetWidth) {\n\t\t\t\t\t\t\tleftPos = half;\n\t\t\t\t\t\t} else if (x - offsetContainer.left >= t.getElement(t.container).offsetWidth - half) {\n\t\t\t\t\t\t\tleftPos = t.total.offsetWidth - half;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tleftPos = pos;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ((0, _dom.hasClass)(t.getElement(t.container), t.options.classPrefix + 'long-video')) {\n\t\t\t\t\t\t\tleftPos += parseFloat(tooltipStyles.marginLeft) / 2 + t.timefloat.offsetWidth / 2;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tt.timefloat.style.left = leftPos + 'px';\n\t\t\t\t\t\tt.timefloatcurrent.innerHTML = (0, _time.secondsToTimeCode)(t.newTime, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat);\n\t\t\t\t\t\tt.timefloat.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!_constants.IS_IOS && !_constants.IS_ANDROID && t.timefloat) {\n\t\t\t\tleftPos = t.timefloat.offsetWidth + width >= t.getElement(t.container).offsetWidth ? t.timefloat.offsetWidth / 2 : 0;\n\t\t\t\tt.timefloat.style.left = leftPos + 'px';\n\t\t\t\tt.timefloat.style.left = leftPos + 'px';\n\t\t\t\tt.timefloat.style.display = 'block';\n\t\t\t}\n\t\t},\n\t\t    updateSlider = function updateSlider() {\n\t\t\tvar seconds = t.getCurrentTime(),\n\t\t\t    timeSliderText = _i18n2.default.t('mejs.time-slider'),\n\t\t\t    time = (0, _time.secondsToTimeCode)(seconds, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat),\n\t\t\t    duration = t.getDuration();\n\n\t\t\tt.slider.setAttribute('role', 'slider');\n\t\t\tt.slider.tabIndex = 0;\n\n\t\t\tif (media.paused) {\n\t\t\t\tt.slider.setAttribute('aria-label', timeSliderText);\n\t\t\t\tt.slider.setAttribute('aria-valuemin', 0);\n\t\t\t\tt.slider.setAttribute('aria-valuemax', isNaN(duration) ? 0 : duration);\n\t\t\t\tt.slider.setAttribute('aria-valuenow', seconds);\n\t\t\t\tt.slider.setAttribute('aria-valuetext', time);\n\t\t\t} else {\n\t\t\t\tt.slider.removeAttribute('aria-label');\n\t\t\t\tt.slider.removeAttribute('aria-valuemin');\n\t\t\t\tt.slider.removeAttribute('aria-valuemax');\n\t\t\t\tt.slider.removeAttribute('aria-valuenow');\n\t\t\t\tt.slider.removeAttribute('aria-valuetext');\n\t\t\t}\n\t\t},\n\t\t    restartPlayer = function restartPlayer() {\n\t\t\tif (new Date() - lastKeyPressTime >= 1000) {\n\t\t\t\tt.play();\n\t\t\t}\n\t\t},\n\t\t    handleMouseup = function handleMouseup() {\n\t\t\tif (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {\n\t\t\t\tt.setCurrentTime(t.newTime, true);\n\t\t\t\tt.setCurrentRailHandle(t.newTime);\n\t\t\t\tt.updateCurrent(t.newTime);\n\t\t\t}\n\t\t\tif (t.forcedHandlePause) {\n\t\t\t\tt.slider.focus();\n\t\t\t\tt.play();\n\t\t\t}\n\t\t\tt.forcedHandlePause = false;\n\t\t};\n\n\t\tt.slider.addEventListener('focus', function () {\n\t\t\tplayer.options.autoRewind = false;\n\t\t});\n\t\tt.slider.addEventListener('blur', function () {\n\t\t\tplayer.options.autoRewind = autoRewindInitial;\n\t\t});\n\t\tt.slider.addEventListener('keydown', function (e) {\n\t\t\tif (new Date() - lastKeyPressTime >= 1000) {\n\t\t\t\tstartedPaused = t.paused;\n\t\t\t}\n\n\t\t\tif (t.options.enableKeyboard && t.options.keyActions.length) {\n\n\t\t\t\tvar keyCode = e.which || e.keyCode || 0,\n\t\t\t\t    duration = t.getDuration(),\n\t\t\t\t    seekForward = player.options.defaultSeekForwardInterval(media),\n\t\t\t\t    seekBackward = player.options.defaultSeekBackwardInterval(media);\n\n\t\t\t\tvar seekTime = t.getCurrentTime();\n\t\t\t\tvar volume = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider');\n\n\t\t\t\tif (keyCode === 38 || keyCode === 40) {\n\t\t\t\t\tif (volume) {\n\t\t\t\t\t\tvolume.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t\tif (t.isVideo) {\n\t\t\t\t\t\tt.showControls();\n\t\t\t\t\t\tt.startControlsTimer();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar newVolume = keyCode === 38 ? Math.min(t.volume + 0.1, 1) : Math.max(t.volume - 0.1, 0),\n\t\t\t\t\t    mutePlayer = newVolume <= 0;\n\t\t\t\t\tt.setVolume(newVolume);\n\t\t\t\t\tt.setMuted(mutePlayer);\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tif (volume) {\n\t\t\t\t\t\tvolume.style.display = 'none';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tswitch (keyCode) {\n\t\t\t\t\tcase 37:\n\t\t\t\t\t\tif (t.getDuration() !== Infinity) {\n\t\t\t\t\t\t\tseekTime -= seekBackward;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 39:\n\t\t\t\t\t\tif (t.getDuration() !== Infinity) {\n\t\t\t\t\t\t\tseekTime += seekForward;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 36:\n\t\t\t\t\t\tseekTime = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 35:\n\t\t\t\t\t\tseekTime = duration;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 13:\n\t\t\t\t\t\tif (t.paused) {\n\t\t\t\t\t\t\tt.play();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tt.pause();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tseekTime = seekTime < 0 || isNaN(seekTime) ? 0 : seekTime >= duration ? duration : Math.floor(seekTime);\n\t\t\t\tlastKeyPressTime = new Date();\n\t\t\t\tif (!startedPaused) {\n\t\t\t\t\tplayer.pause();\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tt.setCurrentTime(seekTime, true);\n\t\t\t\t}, 0);\n\n\t\t\t\tif (seekTime < t.getDuration() && !startedPaused) {\n\t\t\t\t\tsetTimeout(restartPlayer, 1100);\n\t\t\t\t}\n\n\t\t\t\tplayer.showControls();\n\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t});\n\n\t\tvar events = ['mousedown', 'touchstart'];\n\n\t\tt.slider.addEventListener('dragstart', function () {\n\t\t\treturn false;\n\t\t});\n\n\t\tfor (var i = 0, total = events.length; i < total; i++) {\n\t\t\tt.slider.addEventListener(events[i], function (e) {\n\t\t\t\tt.forcedHandlePause = false;\n\t\t\t\tif (t.getDuration() !== Infinity) {\n\t\t\t\t\tif (e.which === 1 || e.which === 0) {\n\t\t\t\t\t\tif (!t.paused) {\n\t\t\t\t\t\t\tt.pause();\n\t\t\t\t\t\t\tt.forcedHandlePause = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmouseIsDown = true;\n\t\t\t\t\t\thandleMouseMove(e);\n\t\t\t\t\t\tvar endEvents = ['mouseup', 'touchend'];\n\n\t\t\t\t\t\tfor (var j = 0, totalEvents = endEvents.length; j < totalEvents; j++) {\n\t\t\t\t\t\t\tt.getElement(t.container).addEventListener(endEvents[j], function (event) {\n\t\t\t\t\t\t\t\tvar target = event.target;\n\t\t\t\t\t\t\t\tif (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {\n\t\t\t\t\t\t\t\t\thandleMouseMove(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt.globalBind('mouseup.dur touchend.dur', function () {\n\t\t\t\t\t\t\thandleMouseup();\n\t\t\t\t\t\t\tmouseIsDown = false;\n\t\t\t\t\t\t\tif (t.timefloat) {\n\t\t\t\t\t\t\t\tt.timefloat.style.display = 'none';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, _constants.SUPPORT_PASSIVE_EVENT && events[i] === 'touchstart' ? { passive: true } : false);\n\t\t}\n\t\tt.slider.addEventListener('mouseenter', function (e) {\n\t\t\tif (e.target === t.slider && t.getDuration() !== Infinity) {\n\t\t\t\tt.getElement(t.container).addEventListener('mousemove', function (event) {\n\t\t\t\t\tvar target = event.target;\n\t\t\t\t\tif (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {\n\t\t\t\t\t\thandleMouseMove(event);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (t.timefloat && !_constants.IS_IOS && !_constants.IS_ANDROID) {\n\t\t\t\t\tt.timefloat.style.display = 'block';\n\t\t\t\t}\n\t\t\t\tif (t.hovered && !_constants.IS_IOS && !_constants.IS_ANDROID && t.options.useSmoothHover) {\n\t\t\t\t\t(0, _dom.removeClass)(t.hovered, 'no-hover');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tt.slider.addEventListener('mouseleave', function () {\n\t\t\tif (t.getDuration() !== Infinity) {\n\t\t\t\tif (!mouseIsDown) {\n\t\t\t\t\tif (t.timefloat) {\n\t\t\t\t\t\tt.timefloat.style.display = 'none';\n\t\t\t\t\t}\n\t\t\t\t\tif (t.hovered && t.options.useSmoothHover) {\n\t\t\t\t\t\t(0, _dom.addClass)(t.hovered, 'no-hover');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tt.broadcastCallback = function (e) {\n\t\t\tvar broadcast = controls.querySelector('.' + t.options.classPrefix + 'broadcast');\n\t\t\tif (!t.options.forceLive && t.getDuration() !== Infinity) {\n\t\t\t\tif (broadcast) {\n\t\t\t\t\tt.slider.style.display = '';\n\t\t\t\t\tbroadcast.remove();\n\t\t\t\t}\n\n\t\t\t\tplayer.setProgressRail(e);\n\t\t\t\tif (!t.forcedHandlePause) {\n\t\t\t\t\tplayer.setCurrentRail(e);\n\t\t\t\t}\n\t\t\t\tupdateSlider();\n\t\t\t} else if (!broadcast && t.options.forceLive) {\n\t\t\t\tvar label = _document2.default.createElement('span');\n\t\t\t\tlabel.className = t.options.classPrefix + 'broadcast';\n\t\t\t\tlabel.innerText = _i18n2.default.t('mejs.live-broadcast');\n\t\t\t\tt.slider.style.display = 'none';\n\t\t\t\tt.rail.appendChild(label);\n\t\t\t}\n\t\t};\n\n\t\tmedia.addEventListener('progress', t.broadcastCallback);\n\t\tmedia.addEventListener('timeupdate', t.broadcastCallback);\n\t\tmedia.addEventListener('play', function () {\n\t\t\tt.buffer.style.display = 'none';\n\t\t});\n\t\tmedia.addEventListener('playing', function () {\n\t\t\tt.buffer.style.display = 'none';\n\t\t});\n\t\tmedia.addEventListener('seeking', function () {\n\t\t\tt.buffer.style.display = '';\n\t\t});\n\t\tmedia.addEventListener('seeked', function () {\n\t\t\tt.buffer.style.display = 'none';\n\t\t});\n\t\tmedia.addEventListener('pause', function () {\n\t\t\tt.buffer.style.display = 'none';\n\t\t});\n\t\tmedia.addEventListener('waiting', function () {\n\t\t\tt.buffer.style.display = '';\n\t\t});\n\t\tmedia.addEventListener('loadeddata', function () {\n\t\t\tt.buffer.style.display = '';\n\t\t});\n\t\tmedia.addEventListener('canplay', function () {\n\t\t\tt.buffer.style.display = 'none';\n\t\t});\n\t\tmedia.addEventListener('error', function () {\n\t\t\tt.buffer.style.display = 'none';\n\t\t});\n\n\t\tt.getElement(t.container).addEventListener('controlsresize', function (e) {\n\t\t\tif (t.getDuration() !== Infinity) {\n\t\t\t\tplayer.setProgressRail(e);\n\t\t\t\tif (!t.forcedHandlePause) {\n\t\t\t\t\tplayer.setCurrentRail(e);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\tcleanprogress: function cleanprogress(player, controls, layers, media) {\n\t\tmedia.removeEventListener('progress', player.broadcastCallback);\n\t\tmedia.removeEventListener('timeupdate', player.broadcastCallback);\n\t\tif (player.rail) {\n\t\t\tplayer.rail.remove();\n\t\t}\n\t},\n\tsetProgressRail: function setProgressRail(e) {\n\t\tvar t = this,\n\t\t    target = e !== undefined ? e.detail.target || e.target : t.media;\n\n\t\tvar percent = null;\n\n\t\tif (target && target.buffered && target.buffered.length > 0 && target.buffered.end && t.getDuration()) {\n\t\t\tpercent = target.buffered.end(target.buffered.length - 1) / t.getDuration();\n\t\t} else if (target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined) {\n\t\t\t\tpercent = target.bufferedBytes / target.bytesTotal;\n\t\t\t} else if (e && e.lengthComputable && e.total !== 0) {\n\t\t\t\t\tpercent = e.loaded / e.total;\n\t\t\t\t}\n\n\t\tif (percent !== null) {\n\t\t\tpercent = Math.min(1, Math.max(0, percent));\n\n\t\t\tif (t.loaded) {\n\t\t\t\tt.setTransformStyle(t.loaded, 'scaleX(' + percent + ')');\n\t\t\t}\n\t\t}\n\t},\n\tsetCurrentRailHandle: function setCurrentRailHandle(fakeTime) {\n\t\tvar t = this;\n\t\tt.setCurrentRailMain(t, fakeTime);\n\t},\n\tsetCurrentRail: function setCurrentRail() {\n\t\tvar t = this;\n\t\tt.setCurrentRailMain(t);\n\t},\n\tsetCurrentRailMain: function setCurrentRailMain(t, fakeTime) {\n\t\tif (t.getCurrentTime() !== undefined && t.getDuration()) {\n\t\t\tvar nTime = typeof fakeTime === 'undefined' ? t.getCurrentTime() : fakeTime;\n\n\t\t\tif (t.total && t.handle) {\n\t\t\t\tvar tW = parseFloat(getComputedStyle(t.total).width);\n\n\t\t\t\tvar newWidth = Math.round(tW * nTime / t.getDuration()),\n\t\t\t\t    handlePos = newWidth - Math.round(t.handle.offsetWidth / 2);\n\n\t\t\t\thandlePos = handlePos < 0 ? 0 : handlePos;\n\t\t\t\tt.setTransformStyle(t.current, 'scaleX(' + newWidth / tW + ')');\n\t\t\t\tt.setTransformStyle(t.handle, 'translateX(' + handlePos + 'px)');\n\n\t\t\t\tif (t.options.useSmoothHover && !(0, _dom.hasClass)(t.hovered, 'no-hover')) {\n\t\t\t\t\tvar pos = parseInt(t.hovered.getAttribute('pos'), 10);\n\t\t\t\t\tpos = isNaN(pos) ? 0 : pos;\n\n\t\t\t\t\tvar hoverScaleX = pos / tW - handlePos / tW;\n\n\t\t\t\t\tt.hovered.style.left = handlePos + 'px';\n\t\t\t\t\tt.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');\n\n\t\t\t\t\tif (hoverScaleX >= 0) {\n\t\t\t\t\t\t(0, _dom.removeClass)(t.hovered, 'negative');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t(0, _dom.addClass)(t.hovered, 'negative');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n});\n\n},{\"17\":17,\"2\":2,\"26\":26,\"27\":27,\"32\":32,\"6\":6}],13:[function(_dereq_,module,exports){\n'use strict';\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _player = _dereq_(17);\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _time = _dereq_(32);\n\nvar _dom = _dereq_(27);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nObject.assign(_player.config, {\n\tduration: 0,\n\n\ttimeAndDurationSeparator: '<span> | </span>'\n});\n\nObject.assign(_player2.default.prototype, {\n\tbuildcurrent: function buildcurrent(player, controls, layers, media) {\n\t\tvar t = this,\n\t\t    time = _document2.default.createElement('div');\n\n\t\ttime.className = t.options.classPrefix + 'time';\n\t\ttime.setAttribute('role', 'timer');\n\t\ttime.setAttribute('aria-live', 'off');\n\t\ttime.innerHTML = '<span class=\"mejs__offscreen\">' + _i18n2.default.t('mejs.current') + '</span><span class=\"' + t.options.classPrefix + 'currenttime\">' + (0, _time.secondsToTimeCode)(0, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat) + '</span>';\n\n\t\tt.addControlElement(time, 'current');\n\t\tplayer.updateCurrent();\n\t\tt.updateTimeCallback = function () {\n\t\t\tif (t.controlsAreVisible) {\n\t\t\t\tplayer.updateCurrent();\n\t\t\t}\n\t\t};\n\t\tmedia.addEventListener('timeupdate', t.updateTimeCallback);\n\t},\n\tcleancurrent: function cleancurrent(player, controls, layers, media) {\n\t\tmedia.removeEventListener('timeupdate', player.updateTimeCallback);\n\t},\n\tbuildduration: function buildduration(player, controls, layers, media) {\n\t\tvar t = this,\n\t\t    currTime = controls.lastChild.querySelector('.' + t.options.classPrefix + 'currenttime');\n\n\t\tif (currTime) {\n\t\t\tcontrols.querySelector('.' + t.options.classPrefix + 'time').innerHTML += t.options.timeAndDurationSeparator + '<span class=\"mejs__offscreen\">' + _i18n2.default.t('mejs.duration') + '</span><span class=\"' + t.options.classPrefix + 'duration\">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');\n\t\t} else {\n\t\t\tif (controls.querySelector('.' + t.options.classPrefix + 'currenttime')) {\n\t\t\t\t(0, _dom.addClass)(controls.querySelector('.' + t.options.classPrefix + 'currenttime').parentNode, t.options.classPrefix + 'currenttime-container');\n\t\t\t}\n\n\t\t\tvar duration = _document2.default.createElement('div');\n\t\t\tduration.className = t.options.classPrefix + 'time ' + t.options.classPrefix + 'duration-container';\n\t\t\tduration.innerHTML = '<span class=\"mejs__offscreen\">' + _i18n2.default.t('mejs.duration') + '</span><span class=\"' + t.options.classPrefix + 'duration\">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');\n\n\t\t\tt.addControlElement(duration, 'duration');\n\t\t}\n\n\t\tt.updateDurationCallback = function () {\n\t\t\tif (t.controlsAreVisible) {\n\t\t\t\tplayer.updateDuration();\n\t\t\t}\n\t\t};\n\n\t\tmedia.addEventListener('timeupdate', t.updateDurationCallback);\n\t},\n\tcleanduration: function cleanduration(player, controls, layers, media) {\n\t\tmedia.removeEventListener('timeupdate', player.updateDurationCallback);\n\t},\n\tupdateCurrent: function updateCurrent() {\n\t\tvar t = this;\n\n\t\tvar currentTime = t.getCurrentTime();\n\n\t\tif (isNaN(currentTime)) {\n\t\t\tcurrentTime = 0;\n\t\t}\n\n\t\tvar timecode = (0, _time.secondsToTimeCode)(currentTime, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);\n\n\t\tif (timecode.length > 5) {\n\t\t\t(0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');\n\t\t} else {\n\t\t\t(0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');\n\t\t}\n\n\t\tif (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime')) {\n\t\t\tt.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime').innerText = timecode;\n\t\t}\n\t},\n\tupdateDuration: function updateDuration() {\n\t\tvar t = this;\n\n\t\tvar duration = t.getDuration();\n\n\t\tif (t.media !== undefined && (isNaN(duration) || duration === Infinity || duration < 0)) {\n\t\t\tt.media.duration = t.options.duration = duration = 0;\n\t\t}\n\n\t\tif (t.options.duration > 0) {\n\t\t\tduration = t.options.duration;\n\t\t}\n\n\t\tvar timecode = (0, _time.secondsToTimeCode)(duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);\n\n\t\tif (timecode.length > 5) {\n\t\t\t(0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');\n\t\t} else {\n\t\t\t(0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');\n\t\t}\n\n\t\tif (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration') && duration > 0) {\n\t\t\tt.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration').innerHTML = timecode;\n\t\t}\n\t}\n});\n\n},{\"17\":17,\"2\":2,\"27\":27,\"32\":32,\"6\":6}],14:[function(_dereq_,module,exports){\n'use strict';\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _player = _dereq_(17);\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _time = _dereq_(32);\n\nvar _general = _dereq_(28);\n\nvar _dom = _dereq_(27);\n\nvar _generate = _dereq_(29);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nObject.assign(_player.config, {\n\tstartLanguage: '',\n\n\ttracksText: null,\n\n\tchaptersText: null,\n\n\ttracksAriaLive: false,\n\n\thideCaptionsButtonWhenEmpty: true,\n\n\ttoggleCaptionsButtonWhenOnlyOne: false,\n\n\tslidesSelector: ''\n});\n\nObject.assign(_player2.default.prototype, {\n\thasChapters: false,\n\n\tbuildtracks: function buildtracks(player, controls, layers, media) {\n\n\t\tthis.findTracks();\n\n\t\tif (!player.tracks.length && (!player.trackFiles || !player.trackFiles.length === 0)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar t = this,\n\t\t    attr = t.options.tracksAriaLive ? ' role=\"log\" aria-live=\"assertive\" aria-atomic=\"false\"' : '',\n\t\t    tracksTitle = (0, _general.isString)(t.options.tracksText) ? t.options.tracksText : _i18n2.default.t('mejs.captions-subtitles'),\n\t\t    chaptersTitle = (0, _general.isString)(t.options.chaptersText) ? t.options.chaptersText : _i18n2.default.t('mejs.captions-chapters'),\n\t\t    total = player.trackFiles === null ? player.tracks.length : player.trackFiles.length;\n\n\t\tif (t.domNode.textTracks) {\n\t\t\tfor (var i = t.domNode.textTracks.length - 1; i >= 0; i--) {\n\t\t\t\tt.domNode.textTracks[i].mode = 'hidden';\n\t\t\t}\n\t\t}\n\n\t\tt.cleartracks(player);\n\n\t\tplayer.captions = _document2.default.createElement('div');\n\t\tplayer.captions.className = t.options.classPrefix + 'captions-layer ' + t.options.classPrefix + 'layer';\n\t\tplayer.captions.innerHTML = '<div class=\"' + t.options.classPrefix + 'captions-position ' + t.options.classPrefix + 'captions-position-hover\"' + attr + '>' + ('<span class=\"' + t.options.classPrefix + 'captions-text\"></span>') + '</div>';\n\t\tplayer.captions.style.display = 'none';\n\t\tlayers.insertBefore(player.captions, layers.firstChild);\n\n\t\tplayer.captionsText = player.captions.querySelector('.' + t.options.classPrefix + 'captions-text');\n\n\t\tplayer.captionsButton = _document2.default.createElement('div');\n\t\tplayer.captionsButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'captions-button';\n\t\tplayer.captionsButton.innerHTML = (0, _generate.generateControlButton)(t.id, tracksTitle, tracksTitle, '' + t.media.options.iconSprite, ['icon-captions'], '' + t.options.classPrefix) + ('<div class=\"' + t.options.classPrefix + 'captions-selector ' + t.options.classPrefix + 'offscreen\">') + ('<ul class=\"' + t.options.classPrefix + 'captions-selector-list\">') + ('<li class=\"' + t.options.classPrefix + 'captions-selector-list-item\">') + ('<input type=\"radio\" class=\"' + t.options.classPrefix + 'captions-selector-input\" ') + ('name=\"' + player.id + '_captions\" id=\"' + player.id + '_captions_none\" ') + 'value=\"none\" checked disabled>' + ('<label class=\"' + t.options.classPrefix + 'captions-selector-label ') + (t.options.classPrefix + 'captions-selected\" ') + ('for=\"' + player.id + '_captions_none\">' + _i18n2.default.t('mejs.none') + '</label>') + '</li>' + '</ul>' + '</div>';\n\n\t\tt.addControlElement(player.captionsButton, 'tracks');\n\n\t\tplayer.captionsButton.querySelector('.' + t.options.classPrefix + 'captions-selector-input').disabled = false;\n\n\t\tplayer.chaptersButton = _document2.default.createElement('div');\n\t\tplayer.chaptersButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'chapters-button';\n\t\tplayer.chaptersButton.innerHTML = (0, _generate.generateControlButton)(t.id, chaptersTitle, chaptersTitle, '' + t.media.options.iconSprite, ['icon-chapters'], '' + t.options.classPrefix) + ('<div class=\"' + t.options.classPrefix + 'chapters-selector ' + t.options.classPrefix + 'offscreen\">') + ('<ul class=\"' + t.options.classPrefix + 'chapters-selector-list\"></ul>') + '</div>';\n\n\t\tvar subtitleCount = 0;\n\n\t\tfor (var _i = 0; _i < total; _i++) {\n\t\t\tvar kind = player.tracks[_i].kind,\n\t\t\t    src = player.tracks[_i].src;\n\t\t\tif (src.trim()) {\n\t\t\t\tif (kind === 'subtitles' || kind === 'captions') {\n\t\t\t\t\tsubtitleCount++;\n\t\t\t\t} else if (kind === 'chapters' && !controls.querySelector('.' + t.options.classPrefix + 'chapter-selector')) {\n\t\t\t\t\tplayer.captionsButton.parentNode.insertBefore(player.chaptersButton, player.captionsButton);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tplayer.trackToLoad = -1;\n\t\tplayer.selectedTrack = null;\n\t\tplayer.isLoadingTrack = false;\n\n\t\tfor (var _i2 = 0; _i2 < total; _i2++) {\n\t\t\tvar _kind = player.tracks[_i2].kind;\n\t\t\tif (player.tracks[_i2].src.trim() && (_kind === 'subtitles' || _kind === 'captions')) {\n\t\t\t\tplayer.addTrackButton(player.tracks[_i2].trackId, player.tracks[_i2].srclang, player.tracks[_i2].label);\n\t\t\t}\n\t\t}\n\n\t\tplayer.loadNextTrack();\n\n\t\tvar inEvents = ['mouseenter', 'focusin'],\n\t\t    outEvents = ['mouseleave', 'focusout'];\n\n\t\tif (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount === 1) {\n\t\t\tplayer.captionsButton.addEventListener('click', function (e) {\n\t\t\t\tvar trackId = 'none';\n\t\t\t\tif (player.selectedTrack === null) {\n\t\t\t\t\ttrackId = player.tracks[0].trackId;\n\t\t\t\t}\n\t\t\t\tvar keyboard = e.keyCode || e.which;\n\t\t\t\tplayer.setTrack(trackId, typeof keyboard !== 'undefined');\n\t\t\t});\n\t\t} else {\n\t\t\tvar labels = player.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selector-label'),\n\t\t\t    captions = player.captionsButton.querySelectorAll('input[type=radio]');\n\n\t\t\tfor (var _i3 = 0, _total = inEvents.length; _i3 < _total; _i3++) {\n\t\t\t\tplayer.captionsButton.addEventListener(inEvents[_i3], function () {\n\t\t\t\t\t(0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor (var _i4 = 0, _total2 = outEvents.length; _i4 < _total2; _i4++) {\n\t\t\t\tplayer.captionsButton.addEventListener(outEvents[_i4], function () {\n\t\t\t\t\t(0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor (var _i5 = 0, _total3 = captions.length; _i5 < _total3; _i5++) {\n\t\t\t\tcaptions[_i5].addEventListener('click', function (e) {\n\t\t\t\t\tvar keyboard = e.keyCode || e.which;\n\t\t\t\t\tplayer.setTrack(this.value, typeof keyboard !== 'undefined');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor (var _i6 = 0, _total4 = labels.length; _i6 < _total4; _i6++) {\n\t\t\t\tlabels[_i6].addEventListener('click', function (e) {\n\t\t\t\t\tvar radio = (0, _dom.siblings)(this, function (el) {\n\t\t\t\t\t\treturn el.tagName === 'INPUT';\n\t\t\t\t\t})[0],\n\t\t\t\t\t    event = (0, _general.createEvent)('click', radio);\n\t\t\t\t\tradio.dispatchEvent(event);\n\t\t\t\t\te.preventDefault();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tplayer.captionsButton.addEventListener('keydown', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t});\n\t\t}\n\n\t\tfor (var _i7 = 0, _total5 = inEvents.length; _i7 < _total5; _i7++) {\n\t\t\tplayer.chaptersButton.addEventListener(inEvents[_i7], function () {\n\t\t\t\tif (this.querySelector('.' + t.options.classPrefix + 'chapters-selector-list').children.length) {\n\t\t\t\t\t(0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfor (var _i8 = 0, _total6 = outEvents.length; _i8 < _total6; _i8++) {\n\t\t\tplayer.chaptersButton.addEventListener(outEvents[_i8], function () {\n\t\t\t\t(0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');\n\t\t\t});\n\t\t}\n\n\t\tplayer.chaptersButton.addEventListener('keydown', function (e) {\n\t\t\te.stopPropagation();\n\t\t});\n\n\t\tif (!player.options.alwaysShowControls) {\n\t\t\tplayer.getElement(player.container).addEventListener('controlsshown', function () {\n\t\t\t\t(0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');\n\t\t\t});\n\n\t\t\tplayer.getElement(player.container).addEventListener('controlshidden', function () {\n\t\t\t\tif (!media.paused) {\n\t\t\t\t\t(0, _dom.removeClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\t(0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');\n\t\t}\n\n\t\tmedia.addEventListener('timeupdate', function () {\n\t\t\tplayer.displayCaptions();\n\t\t});\n\n\t\tif (player.options.slidesSelector !== '') {\n\t\t\tplayer.slidesContainer = _document2.default.querySelectorAll(player.options.slidesSelector);\n\n\t\t\tmedia.addEventListener('timeupdate', function () {\n\t\t\t\tplayer.displaySlides();\n\t\t\t});\n\t\t}\n\t},\n\tcleartracks: function cleartracks(player) {\n\t\tif (player) {\n\t\t\tif (player.captions) {\n\t\t\t\tplayer.captions.remove();\n\t\t\t}\n\t\t\tif (player.chapters) {\n\t\t\t\tplayer.chapters.remove();\n\t\t\t}\n\t\t\tif (player.captionsText) {\n\t\t\t\tplayer.captionsText.remove();\n\t\t\t}\n\t\t\tif (player.captionsButton) {\n\t\t\t\tplayer.captionsButton.remove();\n\t\t\t}\n\t\t\tif (player.chaptersButton) {\n\t\t\t\tplayer.chaptersButton.remove();\n\t\t\t}\n\t\t}\n\t},\n\trebuildtracks: function rebuildtracks() {\n\t\tvar t = this;\n\t\tt.findTracks();\n\t\tt.buildtracks(t, t.getElement(t.controls), t.getElement(t.layers), t.media);\n\t},\n\tfindTracks: function findTracks() {\n\t\tvar t = this,\n\t\t    tracktags = t.trackFiles === null ? t.node.querySelectorAll('track') : t.trackFiles,\n\t\t    total = tracktags.length;\n\n\t\tt.tracks = [];\n\t\tfor (var i = 0; i < total; i++) {\n\t\t\tvar track = tracktags[i],\n\t\t\t    srclang = track.getAttribute('srclang').toLowerCase() || '',\n\t\t\t    trackId = t.id + '_track_' + i + '_' + track.getAttribute('kind') + '_' + srclang;\n\t\t\tt.tracks.push({\n\t\t\t\ttrackId: trackId,\n\t\t\t\tsrclang: srclang,\n\t\t\t\tsrc: track.getAttribute('src'),\n\t\t\t\tkind: track.getAttribute('kind'),\n\t\t\t\tlabel: track.getAttribute('label') || '',\n\t\t\t\tentries: [],\n\t\t\t\tisLoaded: false\n\t\t\t});\n\t\t}\n\t},\n\tsetTrack: function setTrack(trackId, setByKeyboard) {\n\n\t\tvar t = this,\n\t\t    radios = t.captionsButton.querySelectorAll('input[type=\"radio\"]'),\n\t\t    captions = t.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selected'),\n\t\t    track = t.captionsButton.querySelector('input[value=\"' + trackId + '\"]');\n\n\t\tfor (var i = 0, total = radios.length; i < total; i++) {\n\t\t\tradios[i].checked = false;\n\t\t}\n\n\t\tfor (var _i9 = 0, _total7 = captions.length; _i9 < _total7; _i9++) {\n\t\t\t(0, _dom.removeClass)(captions[_i9], t.options.classPrefix + 'captions-selected');\n\t\t}\n\n\t\ttrack.checked = true;\n\t\tvar labels = (0, _dom.siblings)(track, function (el) {\n\t\t\treturn (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');\n\t\t});\n\t\tfor (var _i10 = 0, _total8 = labels.length; _i10 < _total8; _i10++) {\n\t\t\t(0, _dom.addClass)(labels[_i10], t.options.classPrefix + 'captions-selected');\n\t\t}\n\n\t\tif (trackId === 'none') {\n\t\t\tt.selectedTrack = null;\n\t\t\t(0, _dom.removeClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');\n\t\t} else {\n\t\t\tfor (var _i11 = 0, _total9 = t.tracks.length; _i11 < _total9; _i11++) {\n\t\t\t\tvar _track = t.tracks[_i11];\n\t\t\t\tif (_track.trackId === trackId) {\n\t\t\t\t\tif (t.selectedTrack === null) {\n\t\t\t\t\t\t(0, _dom.addClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');\n\t\t\t\t\t}\n\t\t\t\t\tt.selectedTrack = _track;\n\t\t\t\t\tt.captions.setAttribute('lang', t.selectedTrack.srclang);\n\t\t\t\t\tt.displayCaptions();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar event = (0, _general.createEvent)('captionschange', t.media);\n\t\tevent.detail.caption = t.selectedTrack;\n\t\tt.media.dispatchEvent(event);\n\n\t\tif (!setByKeyboard) {\n\t\t\tsetTimeout(function () {\n\t\t\t\tt.getElement(t.container).focus();\n\t\t\t}, 500);\n\t\t}\n\t},\n\tloadNextTrack: function loadNextTrack() {\n\t\tvar t = this;\n\n\t\tt.trackToLoad++;\n\t\tif (t.trackToLoad < t.tracks.length) {\n\t\t\tt.isLoadingTrack = true;\n\t\t\tt.loadTrack(t.trackToLoad);\n\t\t} else {\n\t\t\tt.isLoadingTrack = false;\n\t\t\tt.checkForTracks();\n\t\t}\n\t},\n\tloadTrack: function loadTrack(index) {\n\t\tvar t = this,\n\t\t    track = t.tracks[index];\n\n\t\tif (track !== undefined && (track.src !== undefined || track.src !== \"\")) {\n\t\t\t(0, _dom.ajax)(track.src, 'text', function (d) {\n\t\t\t\ttrack.entries = typeof d === 'string' && /<tt\\s+xml/ig.exec(d) ? _mejs2.default.TrackFormatParser.dfxp.parse(d) : _mejs2.default.TrackFormatParser.webvtt.parse(d);\n\n\t\t\t\ttrack.isLoaded = true;\n\t\t\t\tt.enableTrackButton(track);\n\t\t\t\tt.loadNextTrack();\n\n\t\t\t\tif (track.kind === 'slides') {\n\t\t\t\t\tt.setupSlides(track);\n\t\t\t\t} else if (track.kind === 'chapters' && !t.hasChapters) {\n\t\t\t\t\t\tt.drawChapters(track);\n\t\t\t\t\t\tt.hasChapters = true;\n\t\t\t\t\t}\n\t\t\t}, function () {\n\t\t\t\tt.removeTrackButton(track.trackId);\n\t\t\t\tt.loadNextTrack();\n\t\t\t});\n\t\t}\n\t},\n\tenableTrackButton: function enableTrackButton(track) {\n\t\tvar t = this,\n\t\t    lang = track.srclang,\n\t\t    target = _document2.default.getElementById('' + track.trackId);\n\n\t\tif (!target) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar label = track.label;\n\n\t\tif (label === '') {\n\t\t\tlabel = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;\n\t\t}\n\t\ttarget.disabled = false;\n\t\tvar targetSiblings = (0, _dom.siblings)(target, function (el) {\n\t\t\treturn (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');\n\t\t});\n\t\tfor (var i = 0, total = targetSiblings.length; i < total; i++) {\n\t\t\ttargetSiblings[i].innerHTML = label;\n\t\t}\n\n\t\tif (t.options.startLanguage === lang) {\n\t\t\ttarget.checked = true;\n\t\t\tvar event = (0, _general.createEvent)('click', target);\n\t\t\ttarget.dispatchEvent(event);\n\t\t}\n\t},\n\tremoveTrackButton: function removeTrackButton(trackId) {\n\t\tvar element = _document2.default.getElementById('' + trackId);\n\t\tif (element) {\n\t\t\tvar button = element.closest('li');\n\t\t\tif (button) {\n\t\t\t\tbutton.remove();\n\t\t\t}\n\t\t}\n\t},\n\taddTrackButton: function addTrackButton(trackId, lang, label) {\n\t\tvar t = this;\n\t\tif (label === '') {\n\t\t\tlabel = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;\n\t\t}\n\n\t\tt.captionsButton.querySelector('ul').innerHTML += '<li class=\"' + t.options.classPrefix + 'captions-selector-list-item\">' + ('<input type=\"radio\" class=\"' + t.options.classPrefix + 'captions-selector-input\" ') + ('name=\"' + t.id + '_captions\" id=\"' + trackId + '\" value=\"' + trackId + '\" disabled>') + ('<label class=\"' + t.options.classPrefix + 'captions-selector-label\"') + ('for=\"' + trackId + '\">' + label + ' (loading)</label>') + '</li>';\n\t},\n\tcheckForTracks: function checkForTracks() {\n\t\tvar t = this;\n\n\t\tvar hasSubtitles = false;\n\n\t\tif (t.options.hideCaptionsButtonWhenEmpty) {\n\t\t\tfor (var i = 0, total = t.tracks.length; i < total; i++) {\n\t\t\t\tvar kind = t.tracks[i].kind;\n\t\t\t\tif ((kind === 'subtitles' || kind === 'captions') && t.tracks[i].isLoaded) {\n\t\t\t\t\thasSubtitles = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tt.captionsButton.style.display = hasSubtitles ? '' : 'none';\n\t\t\tt.setControlsSize();\n\t\t}\n\t},\n\tdisplayCaptions: function displayCaptions() {\n\t\tif (this.tracks === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar t = this,\n\t\t    track = t.selectedTrack,\n\t\t    sanitize = function sanitize(html) {\n\t\t\tvar div = _document2.default.createElement('div');\n\t\t\tdiv.innerHTML = html;\n\n\t\t\tvar scripts = div.getElementsByTagName('script');\n\t\t\tvar i = scripts.length;\n\t\t\twhile (i--) {\n\t\t\t\tscripts[i].remove();\n\t\t\t}\n\n\t\t\tvar allElements = div.getElementsByTagName('*');\n\t\t\tfor (var _i12 = 0, n = allElements.length; _i12 < n; _i12++) {\n\t\t\t\tvar attributesObj = allElements[_i12].attributes,\n\t\t\t\t    attributes = Array.prototype.slice.call(attributesObj);\n\n\t\t\t\tfor (var j = 0, total = attributes.length; j < total; j++) {\n\t\t\t\t\tif (attributes[j].name.startsWith('on') || attributes[j].value.startsWith('javascript')) {\n\t\t\t\t\t\tallElements[_i12].remove();\n\t\t\t\t\t} else if (attributes[j].name === 'style') {\n\t\t\t\t\t\tallElements[_i12].removeAttribute(attributes[j].name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn div.innerHTML;\n\t\t};\n\n\t\tif (track !== null && track.isLoaded) {\n\t\t\tvar i = t.searchTrackPosition(track.entries, t.media.currentTime);\n\t\t\tif (i > -1) {\n\t\t\t\tvar text = track.entries[i].text;\n\t\t\t\tif (typeof t.options.captionTextPreprocessor === 'function') text = t.options.captionTextPreprocessor(text);\n\t\t\t\tt.captionsText.innerHTML = sanitize(text);\n\t\t\t\tt.captionsText.className = t.options.classPrefix + 'captions-text ' + (track.entries[i].identifier || '');\n\t\t\t\tt.captions.style.display = '';\n\t\t\t\tt.captions.style.height = '0px';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tt.captions.style.display = 'none';\n\t\t} else {\n\t\t\tt.captions.style.display = 'none';\n\t\t}\n\t},\n\tsetupSlides: function setupSlides(track) {\n\t\tvar t = this;\n\t\tt.slides = track;\n\t\tt.slides.entries.imgs = [t.slides.entries.length];\n\t\tt.showSlide(0);\n\t},\n\tshowSlide: function showSlide(index) {\n\t\tvar _this = this;\n\n\t\tvar t = this;\n\n\t\tif (t.tracks === undefined || t.slidesContainer === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar url = t.slides.entries[index].text;\n\n\t\tvar img = t.slides.entries[index].imgs;\n\n\t\tif (img === undefined || img.fadeIn === undefined) {\n\t\t\tvar image = _document2.default.createElement('img');\n\t\t\timage.src = url;\n\t\t\timage.addEventListener('load', function () {\n\t\t\t\tvar self = _this,\n\t\t\t\t    visible = (0, _dom.siblings)(self, function (el) {\n\t\t\t\t\treturn visible(el);\n\t\t\t\t});\n\t\t\t\tself.style.display = 'none';\n\t\t\t\tt.slidesContainer.innerHTML += self.innerHTML;\n\t\t\t\t(0, _dom.fadeIn)(t.slidesContainer.querySelector(image));\n\t\t\t\tfor (var i = 0, total = visible.length; i < total; i++) {\n\t\t\t\t\t(0, _dom.fadeOut)(visible[i], 400);\n\t\t\t\t}\n\t\t\t});\n\t\t\tt.slides.entries[index].imgs = img = image;\n\t\t} else if (!(0, _dom.visible)(img)) {\n\t\t\tvar _visible = (0, _dom.siblings)(self, function (el) {\n\t\t\t\treturn _visible(el);\n\t\t\t});\n\t\t\t(0, _dom.fadeIn)(t.slidesContainer.querySelector(img));\n\t\t\tfor (var i = 0, total = _visible.length; i < total; i++) {\n\t\t\t\t(0, _dom.fadeOut)(_visible[i]);\n\t\t\t}\n\t\t}\n\t},\n\tdisplaySlides: function displaySlides() {\n\t\tvar t = this;\n\n\t\tif (this.slides === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar slides = t.slides,\n\t\t    i = t.searchTrackPosition(slides.entries, t.media.currentTime);\n\n\t\tif (i > -1) {\n\t\t\tt.showSlide(i);\n\t\t}\n\t},\n\tdrawChapters: function drawChapters(chapters) {\n\t\tvar t = this,\n\t\t    total = chapters.entries.length;\n\n\t\tif (!total) {\n\t\t\treturn;\n\t\t}\n\n\t\tt.chaptersButton.querySelector('ul').innerHTML = '';\n\n\t\tfor (var i = 0; i < total; i++) {\n\t\t\tt.chaptersButton.querySelector('ul').innerHTML += '<li class=\"' + t.options.classPrefix + 'chapters-selector-list-item\" ' + 'role=\"menuitemcheckbox\" aria-live=\"polite\" aria-disabled=\"false\" aria-checked=\"false\">' + ('<input type=\"radio\" class=\"' + t.options.classPrefix + 'captions-selector-input\" ') + ('name=\"' + t.id + '_chapters\" id=\"' + t.id + '_chapters_' + i + '\" value=\"' + chapters.entries[i].start + '\" disabled>') + ('<label class=\"' + t.options.classPrefix + 'chapters-selector-label\"') + ('for=\"' + t.id + '_chapters_' + i + '\">' + chapters.entries[i].text + '</label>') + '</li>';\n\t\t}\n\n\t\tvar radios = t.chaptersButton.querySelectorAll('input[type=\"radio\"]'),\n\t\t    labels = t.chaptersButton.querySelectorAll('.' + t.options.classPrefix + 'chapters-selector-label');\n\n\t\tfor (var _i13 = 0, _total10 = radios.length; _i13 < _total10; _i13++) {\n\t\t\tradios[_i13].disabled = false;\n\t\t\tradios[_i13].checked = false;\n\t\t\tradios[_i13].addEventListener('click', function (e) {\n\t\t\t\tvar self = this,\n\t\t\t\t    listItems = t.chaptersButton.querySelectorAll('li'),\n\t\t\t\t    label = (0, _dom.siblings)(self, function (el) {\n\t\t\t\t\treturn (0, _dom.hasClass)(el, t.options.classPrefix + 'chapters-selector-label');\n\t\t\t\t})[0];\n\n\t\t\t\tself.checked = true;\n\t\t\t\tself.parentNode.setAttribute('aria-checked', true);\n\t\t\t\t(0, _dom.addClass)(label, t.options.classPrefix + 'chapters-selected');\n\t\t\t\t(0, _dom.removeClass)(t.chaptersButton.querySelector('.' + t.options.classPrefix + 'chapters-selected'), t.options.classPrefix + 'chapters-selected');\n\n\t\t\t\tfor (var _i14 = 0, _total11 = listItems.length; _i14 < _total11; _i14++) {\n\t\t\t\t\tlistItems[_i14].setAttribute('aria-checked', false);\n\t\t\t\t}\n\n\t\t\t\tvar keyboard = e.keyCode || e.which;\n\t\t\t\tif (typeof keyboard === 'undefined') {\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tt.getElement(t.container).focus();\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tt.media.setCurrentTime(parseFloat(self.value));\n\t\t\t\tif (t.media.paused) {\n\t\t\t\t\tt.media.play();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfor (var _i15 = 0, _total12 = labels.length; _i15 < _total12; _i15++) {\n\t\t\tlabels[_i15].addEventListener('click', function (e) {\n\t\t\t\tvar radio = (0, _dom.siblings)(this, function (el) {\n\t\t\t\t\treturn el.tagName === 'INPUT';\n\t\t\t\t})[0],\n\t\t\t\t    event = (0, _general.createEvent)('click', radio);\n\t\t\t\tradio.dispatchEvent(event);\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t}\n\t},\n\tsearchTrackPosition: function searchTrackPosition(tracks, currentTime) {\n\t\tvar lo = 0,\n\t\t    hi = tracks.length - 1,\n\t\t    mid = void 0,\n\t\t    start = void 0,\n\t\t    stop = void 0;\n\n\t\twhile (lo <= hi) {\n\t\t\tmid = lo + hi >> 1;\n\t\t\tstart = tracks[mid].start;\n\t\t\tstop = tracks[mid].stop;\n\n\t\t\tif (currentTime >= start && currentTime < stop) {\n\t\t\t\treturn mid;\n\t\t\t} else if (start < currentTime) {\n\t\t\t\tlo = mid + 1;\n\t\t\t} else if (start > currentTime) {\n\t\t\t\thi = mid - 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n});\n\n_mejs2.default.language = {\n\tcodes: {\n\t\taf: 'mejs.afrikaans',\n\t\tsq: 'mejs.albanian',\n\t\tar: 'mejs.arabic',\n\t\tbe: 'mejs.belarusian',\n\t\tbg: 'mejs.bulgarian',\n\t\tca: 'mejs.catalan',\n\t\tzh: 'mejs.chinese',\n\t\t'zh-cn': 'mejs.chinese-simplified',\n\t\t'zh-tw': 'mejs.chines-traditional',\n\t\thr: 'mejs.croatian',\n\t\tcs: 'mejs.czech',\n\t\tda: 'mejs.danish',\n\t\tnl: 'mejs.dutch',\n\t\ten: 'mejs.english',\n\t\tet: 'mejs.estonian',\n\t\tfl: 'mejs.filipino',\n\t\tfi: 'mejs.finnish',\n\t\tfr: 'mejs.french',\n\t\tgl: 'mejs.galician',\n\t\tde: 'mejs.german',\n\t\tel: 'mejs.greek',\n\t\tht: 'mejs.haitian-creole',\n\t\tiw: 'mejs.hebrew',\n\t\thi: 'mejs.hindi',\n\t\thu: 'mejs.hungarian',\n\t\tis: 'mejs.icelandic',\n\t\tid: 'mejs.indonesian',\n\t\tga: 'mejs.irish',\n\t\tit: 'mejs.italian',\n\t\tja: 'mejs.japanese',\n\t\tko: 'mejs.korean',\n\t\tlv: 'mejs.latvian',\n\t\tlt: 'mejs.lithuanian',\n\t\tmk: 'mejs.macedonian',\n\t\tms: 'mejs.malay',\n\t\tmt: 'mejs.maltese',\n\t\tno: 'mejs.norwegian',\n\t\tfa: 'mejs.persian',\n\t\tpl: 'mejs.polish',\n\t\tpt: 'mejs.portuguese',\n\t\tro: 'mejs.romanian',\n\t\tru: 'mejs.russian',\n\t\tsr: 'mejs.serbian',\n\t\tsk: 'mejs.slovak',\n\t\tsl: 'mejs.slovenian',\n\t\tes: 'mejs.spanish',\n\t\tsw: 'mejs.swahili',\n\t\tsv: 'mejs.swedish',\n\t\ttl: 'mejs.tagalog',\n\t\tth: 'mejs.thai',\n\t\ttr: 'mejs.turkish',\n\t\tuk: 'mejs.ukrainian',\n\t\tvi: 'mejs.vietnamese',\n\t\tcy: 'mejs.welsh',\n\t\tyi: 'mejs.yiddish'\n\t}\n};\n\n_mejs2.default.TrackFormatParser = {\n\twebvtt: {\n\t\tpattern: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,\n\n\t\tparse: function parse(trackText) {\n\t\t\tvar lines = trackText.split(/\\r?\\n/),\n\t\t\t    entries = [];\n\n\t\t\tvar timecode = void 0,\n\t\t\t    text = void 0,\n\t\t\t    identifier = void 0;\n\n\t\t\tfor (var i = 0, total = lines.length; i < total; i++) {\n\t\t\t\ttimecode = this.pattern.exec(lines[i]);\n\n\t\t\t\tif (timecode && i < lines.length) {\n\t\t\t\t\tif (i - 1 >= 0 && lines[i - 1] !== '') {\n\t\t\t\t\t\tidentifier = lines[i - 1];\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\n\t\t\t\t\ttext = lines[i];\n\t\t\t\t\ti++;\n\t\t\t\t\twhile (lines[i] !== '' && i < lines.length) {\n\t\t\t\t\t\ttext = text + '\\n' + lines[i];\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\ttext = text === null ? '' : text.trim().replace(/(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/ig, \"<a href='$1' target='_blank'>$1</a>\");\n\t\t\t\t\tentries.push({\n\t\t\t\t\t\tidentifier: identifier,\n\t\t\t\t\t\tstart: (0, _time.convertSMPTEtoSeconds)(timecode[1]) === 0 ? 0.200 : (0, _time.convertSMPTEtoSeconds)(timecode[1]),\n\t\t\t\t\t\tstop: (0, _time.convertSMPTEtoSeconds)(timecode[3]),\n\t\t\t\t\t\ttext: text,\n\t\t\t\t\t\tsettings: timecode[5]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tidentifier = '';\n\t\t\t}\n\t\t\treturn entries;\n\t\t}\n\t},\n\n\tdfxp: {\n\t\tparse: function parse(trackText) {\n\t\t\tvar trackElem = _document2.default.adoptNode(new DOMParser().parseFromString(trackText, 'application/xml').documentElement),\n\t\t\t    container = trackElem.querySelector('div'),\n\t\t\t    lines = container.querySelectorAll('p'),\n\t\t\t    styleNode = _document2.default.getElementById(container.getAttribute('style')),\n\t\t\t    entries = [];\n\n\t\t\tvar styles = void 0;\n\n\t\t\tif (styleNode) {\n\t\t\t\tstyleNode.removeAttribute('id');\n\t\t\t\tvar attributes = styleNode.attributes;\n\t\t\t\tif (attributes.length) {\n\t\t\t\t\tstyles = {};\n\t\t\t\t\tfor (var i = 0, total = attributes.length; i < total; i++) {\n\t\t\t\t\t\tstyles[attributes[i].name.split(\":\")[1]] = attributes[i].value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var _i16 = 0, _total13 = lines.length; _i16 < _total13; _i16++) {\n\t\t\t\tvar style = void 0,\n\t\t\t\t    _temp = {\n\t\t\t\t\tstart: null,\n\t\t\t\t\tstop: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\ttext: null\n\t\t\t\t};\n\n\t\t\t\tif (lines[_i16].getAttribute('begin')) {\n\t\t\t\t\t_temp.start = (0, _time.convertSMPTEtoSeconds)(lines[_i16].getAttribute('begin'));\n\t\t\t\t}\n\t\t\t\tif (!_temp.start && lines[_i16 - 1].getAttribute('end')) {\n\t\t\t\t\t_temp.start = (0, _time.convertSMPTEtoSeconds)(lines[_i16 - 1].getAttribute('end'));\n\t\t\t\t}\n\t\t\t\tif (lines[_i16].getAttribute('end')) {\n\t\t\t\t\t_temp.stop = (0, _time.convertSMPTEtoSeconds)(lines[_i16].getAttribute('end'));\n\t\t\t\t}\n\t\t\t\tif (!_temp.stop && lines[_i16 + 1].getAttribute('begin')) {\n\t\t\t\t\t_temp.stop = (0, _time.convertSMPTEtoSeconds)(lines[_i16 + 1].getAttribute('begin'));\n\t\t\t\t}\n\n\t\t\t\tif (styles) {\n\t\t\t\t\tstyle = '';\n\t\t\t\t\tfor (var _style in styles) {\n\t\t\t\t\t\tstyle += _style + ': ' + styles[_style] + ';';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (style) {\n\t\t\t\t\t_temp.style = style;\n\t\t\t\t}\n\t\t\t\tif (_temp.start === 0) {\n\t\t\t\t\t_temp.start = 0.200;\n\t\t\t\t}\n\t\t\t\t_temp.text = lines[_i16].innerHTML.trim().replace(/(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#\\/%?=~_| !:, .; ]*[-A-Z0-9+&@#\\/%=~_|])/ig, \"<a href='$1' target='_blank'>$1</a>\");\n\t\t\t\tentries.push(_temp);\n\t\t\t}\n\t\t\treturn entries;\n\t\t}\n\t}\n};\n\n},{\"17\":17,\"2\":2,\"27\":27,\"28\":28,\"29\":29,\"32\":32,\"6\":6,\"8\":8}],15:[function(_dereq_,module,exports){\n'use strict';\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _player = _dereq_(17);\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _constants = _dereq_(26);\n\nvar _general = _dereq_(28);\n\nvar _dom = _dereq_(27);\n\nvar _generate = _dereq_(29);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nObject.assign(_player.config, {\n\tmuteText: null,\n\n\tunmuteText: null,\n\n\tallyVolumeControlText: null,\n\n\thideVolumeOnTouchDevices: true,\n\n\taudioVolume: 'horizontal',\n\n\tvideoVolume: 'vertical',\n\n\tstartVolume: 0.8\n});\n\nObject.assign(_player2.default.prototype, {\n\tbuildvolume: function buildvolume(player, controls, layers, media) {\n\t\tif ((_constants.IS_ANDROID || _constants.IS_IOS) && this.options.hideVolumeOnTouchDevices) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar t = this,\n\t\t    mode = t.isVideo ? t.options.videoVolume : t.options.audioVolume,\n\t\t    muteText = (0, _general.isString)(t.options.muteText) ? t.options.muteText : _i18n2.default.t('mejs.mute'),\n\t\t    unmuteText = (0, _general.isString)(t.options.unmuteText) ? t.options.unmuteText : _i18n2.default.t('mejs.unmute'),\n\t\t    volumeControlText = (0, _general.isString)(t.options.allyVolumeControlText) ? t.options.allyVolumeControlText : _i18n2.default.t('mejs.volume-help-text'),\n\t\t    mute = _document2.default.createElement('div');\n\n\t\tmute.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'volume-button ' + t.options.classPrefix + 'mute';\n\t\tmute.innerHTML = mode === 'horizontal' ? (0, _generate.generateControlButton)(t.id, muteText, muteText, '' + t.media.options.iconSprite, ['icon-mute', 'icon-unmute'], '' + t.options.classPrefix, '', t.options.classPrefix + 'horizontal-volume-slider') : (0, _generate.generateControlButton)(t.id, muteText, muteText, '' + t.media.options.iconSprite, ['icon-mute', 'icon-unmute'], '' + t.options.classPrefix, '', t.options.classPrefix + 'volume-slider') + ('<a class=\"' + t.options.classPrefix + 'volume-slider\" ') + ('aria-label=\"' + _i18n2.default.t('mejs.volume-slider') + '\" aria-valuemin=\"0\" aria-valuemax=\"100\" role=\"slider\" ') + 'aria-orientation=\"vertical\">' + ('<span class=\"' + t.options.classPrefix + 'offscreen\" id=\"' + t.options.classPrefix + 'volume-slider\">' + volumeControlText + '</span>') + ('<div class=\"' + t.options.classPrefix + 'volume-total\">') + ('<div class=\"' + t.options.classPrefix + 'volume-current\"></div>') + ('<div class=\"' + t.options.classPrefix + 'volume-handle\"></div>') + '</div>' + '</a>';\n\n\t\tt.addControlElement(mute, 'volume');\n\n\t\tt.options.keyActions.push({\n\t\t\tkeys: [38],\n\t\t\taction: function action(player) {\n\t\t\t\tvar volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');\n\t\t\t\tif (volumeSlider && volumeSlider.matches(':focus')) {\n\t\t\t\t\tvolumeSlider.style.display = 'block';\n\t\t\t\t}\n\t\t\t\tif (player.isVideo) {\n\t\t\t\t\tplayer.showControls();\n\t\t\t\t\tplayer.startControlsTimer();\n\t\t\t\t}\n\n\t\t\t\tvar newVolume = Math.min(player.volume + 0.1, 1);\n\t\t\t\tplayer.setVolume(newVolume);\n\t\t\t\tif (newVolume > 0) {\n\t\t\t\t\tplayer.setMuted(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}, {\n\t\t\tkeys: [40],\n\t\t\taction: function action(player) {\n\t\t\t\tvar volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');\n\t\t\t\tif (volumeSlider) {\n\t\t\t\t\tvolumeSlider.style.display = 'block';\n\t\t\t\t}\n\n\t\t\t\tif (player.isVideo) {\n\t\t\t\t\tplayer.showControls();\n\t\t\t\t\tplayer.startControlsTimer();\n\t\t\t\t}\n\n\t\t\t\tvar newVolume = Math.max(player.volume - 0.1, 0);\n\t\t\t\tplayer.setVolume(newVolume);\n\n\t\t\t\tif (newVolume <= 0.1) {\n\t\t\t\t\tplayer.setMuted(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}, {\n\t\t\tkeys: [77],\n\t\t\taction: function action(player) {\n\t\t\t\tvar volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');\n\t\t\t\tif (volumeSlider) {\n\t\t\t\t\tvolumeSlider.style.display = 'block';\n\t\t\t\t}\n\n\t\t\t\tif (player.isVideo) {\n\t\t\t\t\tplayer.showControls();\n\t\t\t\t\tplayer.startControlsTimer();\n\t\t\t\t}\n\t\t\t\tif (player.media.muted) {\n\t\t\t\t\tplayer.setMuted(false);\n\t\t\t\t} else {\n\t\t\t\t\tplayer.setMuted(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (mode === 'horizontal') {\n\t\t\tvar anchor = _document2.default.createElement('a');\n\t\t\tanchor.className = t.options.classPrefix + 'horizontal-volume-slider';\n\t\t\tanchor.setAttribute('aria-label', _i18n2.default.t('mejs.volume-slider'));\n\t\t\tanchor.setAttribute('aria-valuemin', 0);\n\t\t\tanchor.setAttribute('aria-valuemax', 100);\n\t\t\tanchor.setAttribute('aria-valuenow', 100);\n\t\t\tanchor.setAttribute('role', 'slider');\n\t\t\tanchor.innerHTML += '<span class=\"' + t.options.classPrefix + 'offscreen\" id=\"' + t.options.classPrefix + 'horizontal-volume-slider\">' + volumeControlText + '</span>' + ('<div class=\"' + t.options.classPrefix + 'horizontal-volume-total\">') + ('<div class=\"' + t.options.classPrefix + 'horizontal-volume-current\"></div>') + ('<div class=\"' + t.options.classPrefix + 'horizontal-volume-handle\"></div>') + '</div>';\n\t\t\tmute.parentNode.insertBefore(anchor, mute.nextSibling);\n\t\t}\n\n\t\tvar mouseIsDown = false,\n\t\t    mouseIsOver = false,\n\t\t    modified = false,\n\t\t    updateVolumeSlider = function updateVolumeSlider() {\n\t\t\tvar volume = Math.floor(media.volume * 100);\n\t\t\tvolumeSlider.setAttribute('aria-valuenow', volume);\n\t\t\tvolumeSlider.setAttribute('aria-valuetext', volume + '%');\n\t\t};\n\n\t\tvar volumeSlider = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-slider'),\n\t\t    volumeTotal = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-total') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-total'),\n\t\t    volumeCurrent = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-current') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-current'),\n\t\t    volumeHandle = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-handle') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-handle'),\n\t\t    positionVolumeHandle = function positionVolumeHandle(volume) {\n\n\t\t\tif (volume === null || isNaN(volume) || volume === undefined) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvolume = Math.max(0, volume);\n\t\t\tvolume = Math.min(volume, 1);\n\n\t\t\tif (volume === 0) {\n\t\t\t\t(0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');\n\t\t\t\t(0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');\n\t\t\t\tvar button = mute.firstElementChild;\n\t\t\t\tbutton.setAttribute('title', unmuteText);\n\t\t\t\tbutton.setAttribute('aria-label', unmuteText);\n\t\t\t} else {\n\t\t\t\t(0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');\n\t\t\t\t(0, _dom.addClass)(mute, t.options.classPrefix + 'mute');\n\t\t\t\tvar _button = mute.firstElementChild;\n\t\t\t\t_button.setAttribute('title', muteText);\n\t\t\t\t_button.setAttribute('aria-label', muteText);\n\t\t\t}\n\n\t\t\tvar volumePercentage = volume * 100 + '%',\n\t\t\t    volumeStyles = getComputedStyle(volumeHandle);\n\n\t\t\tif (mode === 'vertical') {\n\t\t\t\tvolumeCurrent.style.bottom = 0;\n\t\t\t\tvolumeCurrent.style.height = volumePercentage;\n\t\t\t\tvolumeHandle.style.bottom = volumePercentage;\n\t\t\t\tvolumeHandle.style.marginBottom = -parseFloat(volumeStyles.height) / 2 + 'px';\n\t\t\t} else {\n\t\t\t\tvolumeCurrent.style.left = 0;\n\t\t\t\tvolumeCurrent.style.width = volumePercentage;\n\t\t\t\tvolumeHandle.style.left = volumePercentage;\n\t\t\t\tvolumeHandle.style.marginLeft = -parseFloat(volumeStyles.width) / 2 + 'px';\n\t\t\t}\n\t\t},\n\t\t    handleVolumeMove = function handleVolumeMove(e) {\n\t\t\tvar totalOffset = (0, _dom.offset)(volumeTotal),\n\t\t\t    volumeStyles = getComputedStyle(volumeTotal);\n\n\t\t\tmodified = true;\n\n\t\t\tvar volume = null;\n\n\t\t\tif (mode === 'vertical') {\n\t\t\t\tvar railHeight = parseFloat(volumeStyles.height),\n\t\t\t\t    newY = e.pageY - totalOffset.top;\n\n\t\t\t\tvolume = (railHeight - newY) / railHeight;\n\n\t\t\t\tif (totalOffset.top === 0 || totalOffset.left === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar railWidth = parseFloat(volumeStyles.width),\n\t\t\t\t    newX = e.pageX - totalOffset.left;\n\n\t\t\t\tvolume = newX / railWidth;\n\t\t\t}\n\n\t\t\tvolume = Math.max(0, volume);\n\t\t\tvolume = Math.min(volume, 1);\n\n\t\t\tpositionVolumeHandle(volume);\n\n\t\t\tt.setMuted(volume === 0);\n\t\t\tt.setVolume(volume);\n\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t},\n\t\t    toggleMute = function toggleMute() {\n\t\t\tif (t.muted) {\n\t\t\t\tpositionVolumeHandle(0);\n\t\t\t\t(0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');\n\t\t\t\t(0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');\n\t\t\t} else {\n\n\t\t\t\tpositionVolumeHandle(media.volume);\n\t\t\t\t(0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');\n\t\t\t\t(0, _dom.addClass)(mute, t.options.classPrefix + 'mute');\n\t\t\t}\n\t\t};\n\n\t\tplayer.getElement(player.container).addEventListener('keydown', function (e) {\n\t\t\tvar hasFocus = !!e.target.closest('.' + t.options.classPrefix + 'container');\n\t\t\tif (!hasFocus && mode === 'vertical') {\n\t\t\t\tvolumeSlider.style.display = 'none';\n\t\t\t}\n\t\t});\n\n\t\tmute.addEventListener('mouseenter', function (e) {\n\t\t\tif (e.target === mute) {\n\t\t\t\tvolumeSlider.style.display = 'block';\n\t\t\t\tmouseIsOver = true;\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t});\n\t\tmute.addEventListener('focusin', function () {\n\t\t\tvolumeSlider.style.display = 'block';\n\t\t\tmouseIsOver = true;\n\t\t});\n\n\t\tmute.addEventListener('focusout', function (e) {\n\t\t\tif ((!e.relatedTarget || e.relatedTarget && !e.relatedTarget.matches('.' + t.options.classPrefix + 'volume-slider')) && mode === 'vertical') {\n\t\t\t\tvolumeSlider.style.display = 'none';\n\t\t\t}\n\t\t});\n\t\tmute.addEventListener('mouseleave', function () {\n\t\t\tmouseIsOver = false;\n\t\t\tif (!mouseIsDown && mode === 'vertical') {\n\t\t\t\tvolumeSlider.style.display = 'none';\n\t\t\t}\n\t\t});\n\t\tmute.addEventListener('focusout', function () {\n\t\t\tmouseIsOver = false;\n\t\t});\n\t\tmute.addEventListener('keydown', function (e) {\n\t\t\tif (t.options.enableKeyboard && t.options.keyActions.length) {\n\t\t\t\tvar keyCode = e.which || e.keyCode || 0,\n\t\t\t\t    volume = media.volume;\n\n\t\t\t\tswitch (keyCode) {\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tvolume = Math.min(volume + 0.1, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 40:\n\t\t\t\t\t\tvolume = Math.max(0, volume - 0.1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tmouseIsDown = false;\n\t\t\t\tpositionVolumeHandle(volume);\n\t\t\t\tmedia.setVolume(volume);\n\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t});\n\t\tmute.querySelector('button').addEventListener('click', function () {\n\t\t\tmedia.setMuted(!media.muted);\n\t\t\tvar event = (0, _general.createEvent)('volumechange', media);\n\t\t\tmedia.dispatchEvent(event);\n\t\t});\n\n\t\tvolumeSlider.addEventListener('dragstart', function () {\n\t\t\treturn false;\n\t\t});\n\n\t\tvolumeSlider.addEventListener('mouseover', function () {\n\t\t\tmouseIsOver = true;\n\t\t});\n\t\tvolumeSlider.addEventListener('focusin', function () {\n\t\t\tvolumeSlider.style.display = 'block';\n\t\t\tmouseIsOver = true;\n\t\t});\n\t\tvolumeSlider.addEventListener('focusout', function () {\n\t\t\tmouseIsOver = false;\n\t\t\tif (!mouseIsDown && mode === 'vertical') {\n\t\t\t\tvolumeSlider.style.display = 'none';\n\t\t\t}\n\t\t});\n\t\tvolumeSlider.addEventListener('mousedown', function (e) {\n\t\t\thandleVolumeMove(e);\n\t\t\tt.globalBind('mousemove.vol', function (event) {\n\t\t\t\tvar target = event.target;\n\t\t\t\tif (mouseIsDown && (target === volumeSlider || target.closest(mode === 'vertical' ? '.' + t.options.classPrefix + 'volume-slider' : '.' + t.options.classPrefix + 'horizontal-volume-slider'))) {\n\t\t\t\t\thandleVolumeMove(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tt.globalBind('mouseup.vol', function () {\n\t\t\t\tmouseIsDown = false;\n\t\t\t\tif (!mouseIsOver && mode === 'vertical') {\n\t\t\t\t\tvolumeSlider.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t\tmouseIsDown = true;\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t});\n\n\t\tmedia.addEventListener('volumechange', function (e) {\n\t\t\tif (!mouseIsDown) {\n\t\t\t\ttoggleMute();\n\t\t\t}\n\t\t\tupdateVolumeSlider(e);\n\t\t});\n\n\t\tvar rendered = false;\n\t\tmedia.addEventListener('rendererready', function () {\n\t\t\tif (!modified) {\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\trendered = true;\n\t\t\t\t\tif (player.options.startVolume === 0 || media.originalNode.muted) {\n\t\t\t\t\t\tmedia.setMuted(true);\n\t\t\t\t\t}\n\t\t\t\t\tmedia.setVolume(player.options.startVolume);\n\t\t\t\t\tt.setControlsSize();\n\t\t\t\t}, 250);\n\t\t\t}\n\t\t});\n\n\t\tmedia.addEventListener('loadedmetadata', function () {\n\t\t\tsetTimeout(function () {\n\t\t\t\tif (!modified && !rendered) {\n\t\t\t\t\tif (player.options.startVolume === 0 || media.originalNode.muted) {\n\t\t\t\t\t\tmedia.setMuted(true);\n\t\t\t\t\t}\n\t\t\t\t\tif (player.options.startVolume === 0) {\n\t\t\t\t\t\tplayer.options.startVolume = 0;\n\t\t\t\t\t}\n\t\t\t\t\tmedia.setVolume(player.options.startVolume);\n\t\t\t\t\tt.setControlsSize();\n\t\t\t\t}\n\t\t\t\trendered = false;\n\t\t\t}, 250);\n\t\t});\n\n\t\tif (player.options.startVolume === 0 || media.originalNode.muted) {\n\t\t\tmedia.setMuted(true);\n\t\t\tif (player.options.startVolume === 0) {\n\t\t\t\tplayer.options.startVolume = 0;\n\t\t\t}\n\t\t\ttoggleMute();\n\t\t}\n\n\t\tt.getElement(t.container).addEventListener('controlsresize', function () {\n\t\t\ttoggleMute();\n\t\t});\n\t}\n});\n\n},{\"17\":17,\"2\":2,\"26\":26,\"27\":27,\"28\":28,\"29\":29,\"6\":6}],16:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nvar EN = exports.EN = {\n\t'mejs.plural-form': 1,\n\n\t'mejs.download-file': 'Download File',\n\n\t'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/',\n\n\t'mejs.fullscreen': 'Fullscreen',\n\n\t'mejs.play': 'Play',\n\t'mejs.pause': 'Pause',\n\n\t'mejs.time-slider': 'Time Slider',\n\t'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',\n\t'mejs.live-broadcast': 'Live Broadcast',\n\n\t'mejs.current': 'Current time',\n\t'mejs.duration': 'Total duration',\n\n\t'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.',\n\t'mejs.unmute': 'Unmute',\n\t'mejs.mute': 'Mute',\n\t'mejs.volume-slider': 'Volume Slider',\n\n\t'mejs.video-player': 'Video Player',\n\t'mejs.audio-player': 'Audio Player',\n\n\t'mejs.captions-subtitles': 'Captions/Subtitles',\n\t'mejs.captions-chapters': 'Chapters',\n\t'mejs.none': 'None',\n\t'mejs.afrikaans': 'Afrikaans',\n\t'mejs.albanian': 'Albanian',\n\t'mejs.arabic': 'Arabic',\n\t'mejs.belarusian': 'Belarusian',\n\t'mejs.bulgarian': 'Bulgarian',\n\t'mejs.catalan': 'Catalan',\n\t'mejs.chinese': 'Chinese',\n\t'mejs.chinese-simplified': 'Chinese (Simplified)',\n\t'mejs.chinese-traditional': 'Chinese (Traditional)',\n\t'mejs.croatian': 'Croatian',\n\t'mejs.czech': 'Czech',\n\t'mejs.danish': 'Danish',\n\t'mejs.dutch': 'Dutch',\n\t'mejs.english': 'English',\n\t'mejs.estonian': 'Estonian',\n\t'mejs.filipino': 'Filipino',\n\t'mejs.finnish': 'Finnish',\n\t'mejs.french': 'French',\n\t'mejs.galician': 'Galician',\n\t'mejs.german': 'German',\n\t'mejs.greek': 'Greek',\n\t'mejs.haitian-creole': 'Haitian Creole',\n\t'mejs.hebrew': 'Hebrew',\n\t'mejs.hindi': 'Hindi',\n\t'mejs.hungarian': 'Hungarian',\n\t'mejs.icelandic': 'Icelandic',\n\t'mejs.indonesian': 'Indonesian',\n\t'mejs.irish': 'Irish',\n\t'mejs.italian': 'Italian',\n\t'mejs.japanese': 'Japanese',\n\t'mejs.korean': 'Korean',\n\t'mejs.latvian': 'Latvian',\n\t'mejs.lithuanian': 'Lithuanian',\n\t'mejs.macedonian': 'Macedonian',\n\t'mejs.malay': 'Malay',\n\t'mejs.maltese': 'Maltese',\n\t'mejs.norwegian': 'Norwegian',\n\t'mejs.persian': 'Persian',\n\t'mejs.polish': 'Polish',\n\t'mejs.portuguese': 'Portuguese',\n\t'mejs.romanian': 'Romanian',\n\t'mejs.russian': 'Russian',\n\t'mejs.serbian': 'Serbian',\n\t'mejs.slovak': 'Slovak',\n\t'mejs.slovenian': 'Slovenian',\n\t'mejs.spanish': 'Spanish',\n\t'mejs.swahili': 'Swahili',\n\t'mejs.swedish': 'Swedish',\n\t'mejs.tagalog': 'Tagalog',\n\t'mejs.thai': 'Thai',\n\t'mejs.turkish': 'Turkish',\n\t'mejs.ukrainian': 'Ukrainian',\n\t'mejs.vietnamese': 'Vietnamese',\n\t'mejs.welsh': 'Welsh',\n\t'mejs.yiddish': 'Yiddish'\n};\n\n},{}],17:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.config = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _mediaelement = _dereq_(7);\n\nvar _mediaelement2 = _interopRequireDefault(_mediaelement);\n\nvar _default = _dereq_(18);\n\nvar _default2 = _interopRequireDefault(_default);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _constants = _dereq_(26);\n\nvar _general = _dereq_(28);\n\nvar _time = _dereq_(32);\n\nvar _media = _dereq_(30);\n\nvar _dom = _dereq_(27);\n\nvar dom = _interopRequireWildcard(_dom);\n\nvar _generate = _dereq_(29);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n_mejs2.default.mepIndex = 0;\n\n_mejs2.default.players = {};\n\nvar config = exports.config = {\n\tposter: '',\n\n\tshowPosterWhenEnded: false,\n\n\tshowPosterWhenPaused: false,\n\n\tdefaultVideoWidth: 480,\n\n\tdefaultVideoHeight: 270,\n\n\tvideoWidth: -1,\n\n\tvideoHeight: -1,\n\n\tdefaultAudioWidth: 400,\n\n\tdefaultAudioHeight: 40,\n\n\tdefaultSeekBackwardInterval: function defaultSeekBackwardInterval(media) {\n\t\treturn media.getDuration() * 0.05;\n\t},\n\n\tdefaultSeekForwardInterval: function defaultSeekForwardInterval(media) {\n\t\treturn media.getDuration() * 0.05;\n\t},\n\n\tsetDimensions: true,\n\n\taudioWidth: -1,\n\n\taudioHeight: -1,\n\n\tloop: false,\n\n\tautoRewind: true,\n\n\tenableAutosize: true,\n\n\ttimeFormat: '',\n\n\talwaysShowHours: false,\n\n\tshowTimecodeFrameCount: false,\n\n\tframesPerSecond: 25,\n\n\talwaysShowControls: false,\n\n\thideVideoControlsOnLoad: false,\n\n\thideVideoControlsOnPause: false,\n\n\tclickToPlayPause: true,\n\n\tcontrolsTimeoutDefault: 1500,\n\n\tcontrolsTimeoutMouseEnter: 2500,\n\n\tcontrolsTimeoutMouseLeave: 1000,\n\n\tiPadUseNativeControls: false,\n\n\tiPhoneUseNativeControls: false,\n\n\tAndroidUseNativeControls: false,\n\n\tfeatures: ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'],\n\n\tuseDefaultControls: false,\n\n\tisVideo: true,\n\n\tstretching: 'auto',\n\n\tclassPrefix: 'mejs__',\n\n\tenableKeyboard: true,\n\n\tpauseOtherPlayers: true,\n\n\tsecondsDecimalLength: 0,\n\n\tcustomError: null,\n\n\tkeyActions: [],\n\n\thideScreenReaderTitle: false\n};\n\n_mejs2.default.MepDefaults = config;\n\nvar MediaElementPlayer = function () {\n\tfunction MediaElementPlayer(node, o) {\n\t\t_classCallCheck(this, MediaElementPlayer);\n\n\t\tvar t = this,\n\t\t    element = typeof node === 'string' ? _document2.default.getElementById(node) : node;\n\n\t\tif (!(t instanceof MediaElementPlayer)) {\n\t\t\treturn new MediaElementPlayer(element, o);\n\t\t}\n\n\t\tt.node = t.media = element;\n\n\t\tif (!t.node) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (t.media.player) {\n\t\t\treturn t.media.player;\n\t\t}\n\n\t\tt.hasFocus = false;\n\n\t\tt.controlsAreVisible = true;\n\n\t\tt.controlsEnabled = true;\n\n\t\tt.controlsTimer = null;\n\n\t\tt.currentMediaTime = 0;\n\n\t\tt.proxy = null;\n\n\t\tif (o === undefined) {\n\t\t\tvar options = t.node.getAttribute('data-mejsoptions');\n\t\t\to = options ? JSON.parse(options) : {};\n\t\t}\n\n\t\tt.options = Object.assign({}, config, o);\n\n\t\tif (t.options.loop && !t.media.getAttribute('loop')) {\n\t\t\tt.media.loop = true;\n\t\t\tt.node.loop = true;\n\t\t} else if (t.media.loop) {\n\t\t\tt.options.loop = true;\n\t\t}\n\n\t\tif (!t.options.timeFormat) {\n\t\t\tt.options.timeFormat = 'mm:ss';\n\t\t\tif (t.options.alwaysShowHours) {\n\t\t\t\tt.options.timeFormat = 'hh:mm:ss';\n\t\t\t}\n\t\t\tif (t.options.showTimecodeFrameCount) {\n\t\t\t\tt.options.timeFormat += ':ff';\n\t\t\t}\n\t\t}\n\n\t\t(0, _time.calculateTimeFormat)(0, t.options, t.options.framesPerSecond || 25);\n\n\t\tt.id = 'mep_' + _mejs2.default.mepIndex++;\n\n\t\t_mejs2.default.players[t.id] = t;\n\n\t\tt.init();\n\n\t\treturn t;\n\t}\n\n\t_createClass(MediaElementPlayer, [{\n\t\tkey: 'getElement',\n\t\tvalue: function getElement(element) {\n\t\t\treturn element;\n\t\t}\n\t}, {\n\t\tkey: 'init',\n\t\tvalue: function init() {\n\t\t\tvar t = this,\n\t\t\t    playerOptions = Object.assign({}, t.options, {\n\t\t\t\tsuccess: function success(media, domNode) {\n\t\t\t\t\tt._meReady(media, domNode);\n\t\t\t\t},\n\t\t\t\terror: function error(e) {\n\t\t\t\t\tt._handleError(e);\n\t\t\t\t}\n\t\t\t}),\n\t\t\t    tagName = t.node.tagName.toLowerCase();\n\n\t\t\tt.isDynamic = tagName !== 'audio' && tagName !== 'video' && tagName !== 'iframe';\n\t\t\tt.isVideo = t.isDynamic ? t.options.isVideo : tagName !== 'audio' && t.options.isVideo;\n\t\t\tt.mediaFiles = null;\n\t\t\tt.trackFiles = null;\n\n\t\t\tif (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls) {\n\t\t\t\tt.node.setAttribute('controls', true);\n\n\t\t\t\tif (_constants.IS_IPAD && t.node.getAttribute('autoplay')) {\n\t\t\t\t\tt.play();\n\t\t\t\t}\n\t\t\t} else if ((t.isVideo || !t.isVideo && (t.options.features.length || t.options.useDefaultControls)) && !(_constants.IS_ANDROID && t.options.AndroidUseNativeControls)) {\n\t\t\t\tt.node.removeAttribute('controls');\n\t\t\t\tvar videoPlayerTitle = t.isVideo ? _i18n2.default.t('mejs.video-player') : _i18n2.default.t('mejs.audio-player');\n\n\t\t\t\tif (!t.options.hideScreenReaderTitle) {\n\t\t\t\t\tvar offscreen = _document2.default.createElement('span');\n\t\t\t\t\toffscreen.className = t.options.classPrefix + 'offscreen';\n\t\t\t\t\toffscreen.innerText = videoPlayerTitle;\n\t\t\t\t\tt.media.parentNode.insertBefore(offscreen, t.media);\n\t\t\t\t}\n\n\t\t\t\tt.container = _document2.default.createElement('div');\n\t\t\t\tt.getElement(t.container).id = t.id;\n\t\t\t\tt.getElement(t.container).className = t.options.classPrefix + 'container ' + t.options.classPrefix + 'container-keyboard-inactive ' + t.media.className;\n\t\t\t\tt.getElement(t.container).tabIndex = 0;\n\t\t\t\tt.getElement(t.container).setAttribute('role', 'application');\n\t\t\t\tt.getElement(t.container).setAttribute('aria-label', videoPlayerTitle);\n\t\t\t\tt.getElement(t.container).innerHTML = '<div class=\"' + t.options.classPrefix + 'inner\">' + ('<div class=\"' + t.options.classPrefix + 'mediaelement\"></div>') + ('<div class=\"' + t.options.classPrefix + 'layers\"></div>') + ('<div class=\"' + t.options.classPrefix + 'controls\"></div>') + '</div>';\n\n\t\t\t\tt.getElement(t.container).addEventListener('focus', function (e) {\n\t\t\t\t\tif (!t.controlsAreVisible && !t.hasFocus && t.controlsEnabled) {\n\t\t\t\t\t\tt.showControls(true);\n\n\t\t\t\t\t\tvar btnSelector = (0, _general.isNodeAfter)(e.relatedTarget, t.getElement(t.container)) ? '.' + t.options.classPrefix + 'controls .' + t.options.classPrefix + 'button:last-child > button' : '.' + t.options.classPrefix + 'playpause-button > button',\n\t\t\t\t\t\t    button = t.getElement(t.container).querySelector(btnSelector);\n\n\t\t\t\t\t\tbutton.focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tt.node.parentNode.insertBefore(t.getElement(t.container), t.node);\n\n\t\t\t\tif (!t.options.features.length && !t.options.useDefaultControls) {\n\t\t\t\t\tt.getElement(t.container).style.background = 'transparent';\n\t\t\t\t\tt.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls').style.display = 'none';\n\t\t\t\t}\n\n\t\t\t\tif (t.isVideo && t.options.stretching === 'fill' && !dom.hasClass(t.getElement(t.container).parentNode, t.options.classPrefix + 'fill-container')) {\n\t\t\t\t\tt.outerContainer = t.media.parentNode;\n\n\t\t\t\t\tvar wrapper = _document2.default.createElement('div');\n\t\t\t\t\twrapper.className = t.options.classPrefix + 'fill-container';\n\t\t\t\t\tt.getElement(t.container).parentNode.insertBefore(wrapper, t.getElement(t.container));\n\t\t\t\t\twrapper.appendChild(t.getElement(t.container));\n\t\t\t\t}\n\n\t\t\t\tif (_constants.IS_ANDROID) {\n\t\t\t\t\tdom.addClass(t.getElement(t.container), t.options.classPrefix + 'android');\n\t\t\t\t}\n\t\t\t\tif (_constants.IS_IOS) {\n\t\t\t\t\tdom.addClass(t.getElement(t.container), t.options.classPrefix + 'ios');\n\t\t\t\t}\n\t\t\t\tif (_constants.IS_IPAD) {\n\t\t\t\t\tdom.addClass(t.getElement(t.container), t.options.classPrefix + 'ipad');\n\t\t\t\t}\n\t\t\t\tif (_constants.IS_IPHONE) {\n\t\t\t\t\tdom.addClass(t.getElement(t.container), t.options.classPrefix + 'iphone');\n\t\t\t\t}\n\t\t\t\tdom.addClass(t.getElement(t.container), t.isVideo ? t.options.classPrefix + 'video' : t.options.classPrefix + 'audio');\n\n\t\t\t\tt.getElement(t.container).querySelector('.' + t.options.classPrefix + 'mediaelement').appendChild(t.node);\n\n\t\t\t\tt.media.player = t;\n\n\t\t\t\tt.controls = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls');\n\t\t\t\tt.layers = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'layers');\n\n\t\t\t\tvar tagType = t.isVideo ? 'video' : 'audio',\n\t\t\t\t    capsTagName = tagType.substring(0, 1).toUpperCase() + tagType.substring(1);\n\n\t\t\t\tif (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {\n\t\t\t\t\tt.width = t.options[tagType + 'Width'];\n\t\t\t\t} else if (t.node.style.width !== '' && t.node.style.width !== null) {\n\t\t\t\t\tt.width = t.node.style.width;\n\t\t\t\t} else if (t.node.getAttribute('width')) {\n\t\t\t\t\tt.width = t.node.getAttribute('width');\n\t\t\t\t} else {\n\t\t\t\t\tt.width = t.options['default' + capsTagName + 'Width'];\n\t\t\t\t}\n\n\t\t\t\tif (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {\n\t\t\t\t\tt.height = t.options[tagType + 'Height'];\n\t\t\t\t} else if (t.node.style.height !== '' && t.node.style.height !== null) {\n\t\t\t\t\tt.height = t.node.style.height;\n\t\t\t\t} else if (t.node.getAttribute('height')) {\n\t\t\t\t\tt.height = t.node.getAttribute('height');\n\t\t\t\t} else {\n\t\t\t\t\tt.height = t.options['default' + capsTagName + 'Height'];\n\t\t\t\t}\n\t\t\t\tt.initialAspectRatio = t.height >= t.width ? t.width / t.height : t.height / t.width;\n\n\t\t\t\tt.setPlayerSize(t.width, t.height);\n\t\t\t} else if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {\n\t\t\t\t\tt.node.style.display = 'none';\n\t\t\t\t}\n\n\t\t\tplayerOptions.pluginWidth = t.width;\n\t\t\tplayerOptions.pluginHeight = t.height;\n\n\t\t\t_mejs2.default.MepDefaults = playerOptions;\n\n\t\t\tnew _mediaelement2.default(t.media, playerOptions, t.mediaFiles);\n\n\t\t\tif (t.getElement(t.container) !== undefined && t.options.features.length && t.controlsAreVisible && !t.options.hideVideoControlsOnLoad) {\n\t\t\t\tvar event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));\n\t\t\t\tt.getElement(t.container).dispatchEvent(event);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'showControls',\n\t\tvalue: function showControls(doAnimation) {\n\t\t\tvar t = this;\n\n\t\t\tdoAnimation = doAnimation === undefined || doAnimation;\n\n\t\t\tif (t.controlsAreVisible || !t.isVideo) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (doAnimation) {\n\t\t\t\t(function () {\n\t\t\t\t\tdom.fadeIn(t.getElement(t.controls), 200, function () {\n\t\t\t\t\t\tdom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');\n\t\t\t\t\t\tvar event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));\n\t\t\t\t\t\tt.getElement(t.container).dispatchEvent(event);\n\t\t\t\t\t});\n\n\t\t\t\t\tvar controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');\n\n\t\t\t\t\tvar _loop = function _loop(i, total) {\n\t\t\t\t\t\tdom.fadeIn(controls[i], 200, function () {\n\t\t\t\t\t\t\tdom.removeClass(controls[i], t.options.classPrefix + 'offscreen');\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\n\t\t\t\t\tfor (var i = 0, total = controls.length; i < total; i++) {\n\t\t\t\t\t\t_loop(i, total);\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t} else {\n\t\t\t\tdom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');\n\t\t\t\tt.getElement(t.controls).style.display = '';\n\t\t\t\tt.getElement(t.controls).style.opacity = 1;\n\n\t\t\t\tvar controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');\n\t\t\t\tfor (var i = 0, total = controls.length; i < total; i++) {\n\t\t\t\t\tdom.removeClass(controls[i], t.options.classPrefix + 'offscreen');\n\t\t\t\t\tcontrols[i].style.display = '';\n\t\t\t\t}\n\n\t\t\t\tvar event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));\n\t\t\t\tt.getElement(t.container).dispatchEvent(event);\n\t\t\t}\n\n\t\t\tt.controlsAreVisible = true;\n\t\t\tt.setControlsSize();\n\t\t}\n\t}, {\n\t\tkey: 'hideControls',\n\t\tvalue: function hideControls(doAnimation, forceHide) {\n\t\t\tvar t = this;\n\n\t\t\tdoAnimation = doAnimation === undefined || doAnimation;\n\n\t\t\tif (forceHide !== true && (!t.controlsAreVisible || t.options.alwaysShowControls || t.paused && t.readyState === 4 && (!t.options.hideVideoControlsOnLoad && t.currentTime <= 0 || !t.options.hideVideoControlsOnPause && t.currentTime > 0) || t.isVideo && !t.options.hideVideoControlsOnLoad && !t.readyState || t.ended)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (doAnimation) {\n\t\t\t\t(function () {\n\t\t\t\t\tdom.fadeOut(t.getElement(t.controls), 200, function () {\n\t\t\t\t\t\tdom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');\n\t\t\t\t\t\tt.getElement(t.controls).style.display = '';\n\t\t\t\t\t\tvar event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));\n\t\t\t\t\t\tt.getElement(t.container).dispatchEvent(event);\n\t\t\t\t\t});\n\n\t\t\t\t\tvar controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');\n\n\t\t\t\t\tvar _loop2 = function _loop2(i, total) {\n\t\t\t\t\t\tdom.fadeOut(controls[i], 200, function () {\n\t\t\t\t\t\t\tdom.addClass(controls[i], t.options.classPrefix + 'offscreen');\n\t\t\t\t\t\t\tcontrols[i].style.display = '';\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\n\t\t\t\t\tfor (var i = 0, total = controls.length; i < total; i++) {\n\t\t\t\t\t\t_loop2(i, total);\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t} else {\n\t\t\t\tdom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');\n\t\t\t\tt.getElement(t.controls).style.display = '';\n\t\t\t\tt.getElement(t.controls).style.opacity = 0;\n\n\t\t\t\tvar controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');\n\t\t\t\tfor (var i = 0, total = controls.length; i < total; i++) {\n\t\t\t\t\tdom.addClass(controls[i], t.options.classPrefix + 'offscreen');\n\t\t\t\t\tcontrols[i].style.display = '';\n\t\t\t\t}\n\n\t\t\t\tvar event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));\n\t\t\t\tt.getElement(t.container).dispatchEvent(event);\n\t\t\t}\n\n\t\t\tt.controlsAreVisible = false;\n\t\t}\n\t}, {\n\t\tkey: 'startControlsTimer',\n\t\tvalue: function startControlsTimer(timeout) {\n\t\t\tvar t = this;\n\n\t\t\ttimeout = typeof timeout !== 'undefined' ? timeout : t.options.controlsTimeoutDefault;\n\n\t\t\tt.killControlsTimer('start');\n\n\t\t\tt.controlsTimer = setTimeout(function () {\n\t\t\t\tt.hideControls();\n\t\t\t\tt.killControlsTimer('hide');\n\t\t\t}, timeout);\n\t\t}\n\t}, {\n\t\tkey: 'killControlsTimer',\n\t\tvalue: function killControlsTimer() {\n\t\t\tvar t = this;\n\n\t\t\tif (t.controlsTimer !== null) {\n\t\t\t\tclearTimeout(t.controlsTimer);\n\t\t\t\tdelete t.controlsTimer;\n\t\t\t\tt.controlsTimer = null;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'disableControls',\n\t\tvalue: function disableControls() {\n\t\t\tvar t = this;\n\n\t\t\tt.killControlsTimer();\n\t\t\tt.controlsEnabled = false;\n\t\t\tt.hideControls(false, true);\n\t\t}\n\t}, {\n\t\tkey: 'enableControls',\n\t\tvalue: function enableControls() {\n\t\t\tvar t = this;\n\n\t\t\tt.controlsEnabled = true;\n\t\t\tt.showControls(false);\n\t\t}\n\t}, {\n\t\tkey: '_setDefaultPlayer',\n\t\tvalue: function _setDefaultPlayer() {\n\t\t\tvar t = this;\n\t\t\tif (t.proxy) {\n\t\t\t\tt.proxy.pause();\n\t\t\t}\n\t\t\tt.proxy = new _default2.default(t);\n\t\t\tt.media.addEventListener('loadedmetadata', function () {\n\t\t\t\tif (t.getCurrentTime() > 0 && t.currentMediaTime > 0) {\n\t\t\t\t\tt.setCurrentTime(t.currentMediaTime);\n\t\t\t\t\tif (!_constants.IS_IOS && !_constants.IS_ANDROID) {\n\t\t\t\t\t\tt.play();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_meReady',\n\t\tvalue: function _meReady(media, domNode) {\n\t\t\tvar t = this,\n\t\t\t    autoplayAttr = domNode.getAttribute('autoplay'),\n\t\t\t    autoplay = !(autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === 'false'),\n\t\t\t    isNative = media.rendererName !== null && /(native|html5)/i.test(media.rendererName);\n\n\t\t\tif (t.getElement(t.controls)) {\n\t\t\t\tt.enableControls();\n\t\t\t}\n\n\t\t\tif (t.getElement(t.container) && t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play')) {\n\t\t\t\tt.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play').style.display = '';\n\t\t\t}\n\n\t\t\tif (t.created) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tt.created = true;\n\t\t\tt.media = media;\n\t\t\tt.domNode = domNode;\n\n\t\t\tif (!(_constants.IS_ANDROID && t.options.AndroidUseNativeControls) && !(_constants.IS_IPAD && t.options.iPadUseNativeControls) && !(_constants.IS_IPHONE && t.options.iPhoneUseNativeControls)) {\n\t\t\t\tif (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {\n\t\t\t\t\tif (autoplay && isNative) {\n\t\t\t\t\t\tt.play();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t.options.success) {\n\n\t\t\t\t\t\tif (typeof t.options.success === 'string') {\n\t\t\t\t\t\t\t_window2.default[t.options.success](t.media, t.domNode, t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tt.options.success(t.media, t.domNode, t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tt.featurePosition = {};\n\n\t\t\t\tt._setDefaultPlayer();\n\n\t\t\t\tt.buildposter(t, t.getElement(t.controls), t.getElement(t.layers), t.media);\n\t\t\t\tt.buildkeyboard(t, t.getElement(t.controls), t.getElement(t.layers), t.media);\n\t\t\t\tt.buildoverlays(t, t.getElement(t.controls), t.getElement(t.layers), t.media);\n\n\t\t\t\tif (t.options.useDefaultControls) {\n\t\t\t\t\tvar defaultControls = ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'];\n\t\t\t\t\tt.options.features = defaultControls.concat(t.options.features.filter(function (item) {\n\t\t\t\t\t\treturn defaultControls.indexOf(item) === -1;\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t\tt.buildfeatures(t, t.getElement(t.controls), t.getElement(t.layers), t.media);\n\n\t\t\t\tvar event = (0, _general.createEvent)('controlsready', t.getElement(t.container));\n\t\t\t\tt.getElement(t.container).dispatchEvent(event);\n\n\t\t\t\tt.setPlayerSize(t.width, t.height);\n\t\t\t\tt.setControlsSize();\n\n\t\t\t\tif (t.isVideo) {\n\t\t\t\t\tt.clickToPlayPauseCallback = function () {\n\t\t\t\t\t\tif (t.options.clickToPlayPause) {\n\t\t\t\t\t\t\tvar button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),\n\t\t\t\t\t\t\t    pressed = button.getAttribute('aria-pressed');\n\n\t\t\t\t\t\t\tif (t.paused && pressed) {\n\t\t\t\t\t\t\t\tt.pause();\n\t\t\t\t\t\t\t} else if (t.paused) {\n\t\t\t\t\t\t\t\tt.play();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tt.pause();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbutton.setAttribute('aria-pressed', !pressed);\n\t\t\t\t\t\t\tt.getElement(t.container).focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tt.createIframeLayer();\n\n\t\t\t\t\tt.media.addEventListener('click', t.clickToPlayPauseCallback);\n\n\t\t\t\t\tif ((_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls) {\n\t\t\t\t\t\tt.node.addEventListener('touchstart', function () {\n\t\t\t\t\t\t\tif (t.controlsAreVisible) {\n\t\t\t\t\t\t\t\tt.hideControls(false);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (t.controlsEnabled) {\n\t\t\t\t\t\t\t\t\tt.showControls(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, _constants.SUPPORT_PASSIVE_EVENT ? { passive: true } : false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.getElement(t.container).addEventListener('mouseenter', function () {\n\t\t\t\t\t\t\tif (t.controlsEnabled) {\n\t\t\t\t\t\t\t\tif (!t.options.alwaysShowControls) {\n\t\t\t\t\t\t\t\t\tt.killControlsTimer('enter');\n\t\t\t\t\t\t\t\t\tt.showControls();\n\t\t\t\t\t\t\t\t\tt.startControlsTimer(t.options.controlsTimeoutMouseEnter);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tt.getElement(t.container).addEventListener('mousemove', function () {\n\t\t\t\t\t\t\tif (t.controlsEnabled) {\n\t\t\t\t\t\t\t\tif (!t.controlsAreVisible) {\n\t\t\t\t\t\t\t\t\tt.showControls();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!t.options.alwaysShowControls) {\n\t\t\t\t\t\t\t\t\tt.startControlsTimer(t.options.controlsTimeoutMouseEnter);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tt.getElement(t.container).addEventListener('mouseleave', function () {\n\t\t\t\t\t\t\tif (t.controlsEnabled) {\n\t\t\t\t\t\t\t\tif (!t.paused && !t.options.alwaysShowControls) {\n\t\t\t\t\t\t\t\t\tt.startControlsTimer(t.options.controlsTimeoutMouseLeave);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t.options.hideVideoControlsOnLoad) {\n\t\t\t\t\t\tt.hideControls(false);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t.options.enableAutosize) {\n\t\t\t\t\t\tt.media.addEventListener('loadedmetadata', function (e) {\n\t\t\t\t\t\t\tvar target = e !== undefined ? e.detail.target || e.target : t.media;\n\t\t\t\t\t\t\tif (t.options.videoHeight <= 0 && !t.domNode.getAttribute('height') && !t.domNode.style.height && target !== null && !isNaN(target.videoHeight)) {\n\t\t\t\t\t\t\t\tt.setPlayerSize(target.videoWidth, target.videoHeight);\n\t\t\t\t\t\t\t\tt.setControlsSize();\n\t\t\t\t\t\t\t\tt.media.setSize(target.videoWidth, target.videoHeight);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tt.media.addEventListener('play', function () {\n\t\t\t\t\tt.hasFocus = true;\n\n\t\t\t\t\tfor (var playerIndex in _mejs2.default.players) {\n\t\t\t\t\t\tif (_mejs2.default.players.hasOwnProperty(playerIndex)) {\n\t\t\t\t\t\t\tvar p = _mejs2.default.players[playerIndex];\n\n\t\t\t\t\t\t\tif (p.id !== t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended && p.options.ignorePauseOtherPlayersOption !== true) {\n\t\t\t\t\t\t\t\tp.pause();\n\t\t\t\t\t\t\t\tp.hasFocus = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!(_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls && t.isVideo) {\n\t\t\t\t\t\tt.hideControls();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tt.media.addEventListener('ended', function () {\n\t\t\t\t\tif (t.options.autoRewind) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tt.setCurrentTime(0);\n\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tvar loadingElement = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-loading');\n\t\t\t\t\t\t\t\tif (loadingElement && loadingElement.parentNode) {\n\t\t\t\t\t\t\t\t\tloadingElement.parentNode.style.display = 'none';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, 20);\n\t\t\t\t\t\t} catch (exp) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof t.media.renderer.stop === 'function') {\n\t\t\t\t\t\tt.media.renderer.stop();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.pause();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t.setProgressRail) {\n\t\t\t\t\t\tt.setProgressRail();\n\t\t\t\t\t}\n\t\t\t\t\tif (t.setCurrentRail) {\n\t\t\t\t\t\tt.setCurrentRail();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t.options.loop) {\n\t\t\t\t\t\tt.play();\n\t\t\t\t\t} else if (!t.options.alwaysShowControls && t.controlsEnabled) {\n\t\t\t\t\t\tt.showControls();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tt.media.addEventListener('loadedmetadata', function () {\n\n\t\t\t\t\t(0, _time.calculateTimeFormat)(t.getDuration(), t.options, t.options.framesPerSecond || 25);\n\n\t\t\t\t\tif (t.updateDuration) {\n\t\t\t\t\t\tt.updateDuration();\n\t\t\t\t\t}\n\t\t\t\t\tif (t.updateCurrent) {\n\t\t\t\t\t\tt.updateCurrent();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!t.isFullScreen) {\n\t\t\t\t\t\tt.setPlayerSize(t.width, t.height);\n\t\t\t\t\t\tt.setControlsSize();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tvar duration = null;\n\t\t\t\tt.media.addEventListener('timeupdate', function () {\n\t\t\t\t\tif (!isNaN(t.getDuration()) && duration !== t.getDuration()) {\n\t\t\t\t\t\tduration = t.getDuration();\n\t\t\t\t\t\t(0, _time.calculateTimeFormat)(duration, t.options, t.options.framesPerSecond || 25);\n\n\t\t\t\t\t\tif (t.updateDuration) {\n\t\t\t\t\t\t\tt.updateDuration();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (t.updateCurrent) {\n\t\t\t\t\t\t\tt.updateCurrent();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tt.setControlsSize();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (t.options.enableKeyboard) {\n\t\t\t\t\tt.getElement(t.container).addEventListener('keydown', function (e) {\n\t\t\t\t\t\tvar keyCode = e.keyCode || e.which || 0;\n\n\t\t\t\t\t\tif (e.target === t.container && keyCode === 13) {\n\t\t\t\t\t\t\tif (t.paused) {\n\t\t\t\t\t\t\t\tt.play();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tt.pause();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tt.getElement(t.container).addEventListener('click', function (e) {\n\t\t\t\t\tdom.addClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');\n\t\t\t\t});\n\n\t\t\t\tt.getElement(t.container).addEventListener('focusin', function (e) {\n\t\t\t\t\tdom.removeClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');\n\t\t\t\t\tif (t.isVideo && !_constants.IS_ANDROID && !_constants.IS_IOS && t.controlsEnabled && !t.options.alwaysShowControls) {\n\t\t\t\t\t\tt.killControlsTimer('enter');\n\t\t\t\t\t\tt.showControls();\n\t\t\t\t\t\tt.startControlsTimer(t.options.controlsTimeoutMouseEnter);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tt.getElement(t.container).addEventListener('focusout', function (e) {\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tif (e.relatedTarget) {\n\t\t\t\t\t\t\tif (t.keyboardAction && !e.relatedTarget.closest('.' + t.options.classPrefix + 'container')) {\n\t\t\t\t\t\t\t\tt.keyboardAction = false;\n\t\t\t\t\t\t\t\tif (t.isVideo && !t.options.alwaysShowControls && !t.paused) {\n\t\t\t\t\t\t\t\t\tt.startControlsTimer(t.options.controlsTimeoutMouseLeave);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 0);\n\t\t\t\t});\n\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tt.setPlayerSize(t.width, t.height);\n\t\t\t\t\tt.setControlsSize();\n\t\t\t\t}, 0);\n\n\t\t\t\tt.globalResizeCallback = function () {\n\t\t\t\t\tif (!(t.isFullScreen || _constants.HAS_TRUE_NATIVE_FULLSCREEN && _document2.default.webkitIsFullScreen)) {\n\t\t\t\t\t\tt.setPlayerSize(t.width, t.height);\n\t\t\t\t\t}\n\n\t\t\t\t\tt.setControlsSize();\n\t\t\t\t};\n\n\t\t\t\tt.globalBind('resize', t.globalResizeCallback);\n\t\t\t}\n\n\t\t\tif (autoplay && isNative) {\n\t\t\t\tt.play();\n\t\t\t}\n\n\t\t\tif (t.options.success) {\n\t\t\t\tif (typeof t.options.success === 'string') {\n\t\t\t\t\t_window2.default[t.options.success](t.media, t.domNode, t);\n\t\t\t\t} else {\n\t\t\t\t\tt.options.success(t.media, t.domNode, t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: '_handleError',\n\t\tvalue: function _handleError(e, media, node) {\n\t\t\tvar t = this,\n\t\t\t    play = t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-play');\n\n\t\t\tif (play) {\n\t\t\t\tplay.style.display = 'none';\n\t\t\t}\n\n\t\t\tif (t.options.error) {\n\t\t\t\tt.options.error(e, media, node);\n\t\t\t}\n\n\t\t\tif (t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay')) {\n\t\t\t\tt.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay').remove();\n\t\t\t}\n\n\t\t\tvar errorContainer = _document2.default.createElement('div');\n\t\t\terrorContainer.className = t.options.classPrefix + 'cannotplay';\n\t\t\terrorContainer.style.width = '100%';\n\t\t\terrorContainer.style.height = '100%';\n\n\t\t\tvar errorContent = typeof t.options.customError === 'function' ? t.options.customError(t.media, t.media.originalNode) : t.options.customError,\n\t\t\t    imgError = '';\n\n\t\t\tif (!errorContent) {\n\t\t\t\tvar poster = t.media.originalNode.getAttribute('poster');\n\t\t\t\tif (poster) {\n\t\t\t\t\timgError = '<img src=\"' + poster + '\" alt=\"' + _mejs2.default.i18n.t('mejs.download-file') + '\">';\n\t\t\t\t}\n\n\t\t\t\tif (e.message) {\n\t\t\t\t\terrorContent = '<p>' + e.message + '</p>';\n\t\t\t\t}\n\n\t\t\t\tif (e.urls) {\n\t\t\t\t\tfor (var i = 0, total = e.urls.length; i < total; i++) {\n\t\t\t\t\t\tvar url = e.urls[i];\n\t\t\t\t\t\terrorContent += '<a href=\"' + url.src + '\" data-type=\"' + url.type + '\"><span>' + _mejs2.default.i18n.t('mejs.download-file') + ': ' + url.src + '</span></a>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (errorContent && t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error')) {\n\t\t\t\terrorContainer.innerHTML = errorContent;\n\t\t\t\tt.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').innerHTML = '' + imgError + errorContainer.outerHTML;\n\t\t\t\tt.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').parentNode.style.display = 'block';\n\t\t\t}\n\n\t\t\tif (t.controlsEnabled) {\n\t\t\t\tt.disableControls();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'setPlayerSize',\n\t\tvalue: function setPlayerSize(width, height) {\n\t\t\tvar t = this;\n\n\t\t\tif (!t.options.setDimensions) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (typeof width !== 'undefined') {\n\t\t\t\tt.width = width;\n\t\t\t}\n\n\t\t\tif (typeof height !== 'undefined') {\n\t\t\t\tt.height = height;\n\t\t\t}\n\n\t\t\tswitch (t.options.stretching) {\n\t\t\t\tcase 'fill':\n\t\t\t\t\tif (t.isVideo) {\n\t\t\t\t\t\tt.setFillMode();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.setDimensions(t.width, t.height);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'responsive':\n\t\t\t\t\tt.setResponsiveMode();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'none':\n\t\t\t\t\tt.setDimensions(t.width, t.height);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif (t.hasFluidMode() === true) {\n\t\t\t\t\t\tt.setResponsiveMode();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.setDimensions(t.width, t.height);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'hasFluidMode',\n\t\tvalue: function hasFluidMode() {\n\t\t\tvar t = this;\n\n\t\t\treturn t.height.toString().indexOf('%') !== -1 || t.node && t.node.style.maxWidth && t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width || t.node && t.node.currentStyle && t.node.currentStyle.maxWidth === '100%';\n\t\t}\n\t}, {\n\t\tkey: 'setResponsiveMode',\n\t\tvalue: function setResponsiveMode() {\n\t\t\tvar t = this,\n\t\t\t    parent = function () {\n\t\t\t\tvar parentEl = void 0,\n\t\t\t\t    el = t.getElement(t.container);\n\n\t\t\t\twhile (el) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {\n\t\t\t\t\t\t\treturn _window2.default.frameElement;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparentEl = el.parentElement;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tparentEl = el.parentElement;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parentEl && dom.visible(parentEl)) {\n\t\t\t\t\t\treturn parentEl;\n\t\t\t\t\t}\n\t\t\t\t\tel = parentEl;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}(),\n\t\t\t    parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null),\n\t\t\t    nativeWidth = function () {\n\t\t\t\tif (t.isVideo) {\n\t\t\t\t\tif (t.node.videoWidth && t.node.videoWidth > 0) {\n\t\t\t\t\t\treturn t.node.videoWidth;\n\t\t\t\t\t} else if (t.node.getAttribute('width')) {\n\t\t\t\t\t\treturn t.node.getAttribute('width');\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn t.options.defaultVideoWidth;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn t.options.defaultAudioWidth;\n\t\t\t\t}\n\t\t\t}(),\n\t\t\t    nativeHeight = function () {\n\t\t\t\tif (t.isVideo) {\n\t\t\t\t\tif (t.node.videoHeight && t.node.videoHeight > 0) {\n\t\t\t\t\t\treturn t.node.videoHeight;\n\t\t\t\t\t} else if (t.node.getAttribute('height')) {\n\t\t\t\t\t\treturn t.node.getAttribute('height');\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn t.options.defaultVideoHeight;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn t.options.defaultAudioHeight;\n\t\t\t\t}\n\t\t\t}(),\n\t\t\t    aspectRatio = function () {\n\t\t\t\tif (!t.options.enableAutosize) {\n\t\t\t\t\treturn t.initialAspectRatio;\n\t\t\t\t}\n\t\t\t\tvar ratio = 1;\n\t\t\t\tif (!t.isVideo) {\n\t\t\t\t\treturn ratio;\n\t\t\t\t}\n\n\t\t\t\tif (t.node.videoWidth && t.node.videoWidth > 0 && t.node.videoHeight && t.node.videoHeight > 0) {\n\t\t\t\t\tratio = t.height >= t.width ? t.node.videoWidth / t.node.videoHeight : t.node.videoHeight / t.node.videoWidth;\n\t\t\t\t} else {\n\t\t\t\t\tratio = t.initialAspectRatio;\n\t\t\t\t}\n\n\t\t\t\tif (isNaN(ratio) || ratio < 0.01 || ratio > 100) {\n\t\t\t\t\tratio = 1;\n\t\t\t\t}\n\t\t\t\treturn ratio;\n\t\t\t}(),\n\t\t\t    parentHeight = parseFloat(parentStyles.height);\n\n\t\t\tvar newHeight = void 0,\n\t\t\t    parentWidth = parseFloat(parentStyles.width);\n\n\t\t\tif (t.isVideo) {\n\t\t\t\tif (t.height === '100%') {\n\t\t\t\t\tnewHeight = parseFloat(parentWidth * nativeHeight / nativeWidth, 10);\n\t\t\t\t} else {\n\t\t\t\t\tnewHeight = t.height >= t.width ? parseFloat(parentWidth / aspectRatio, 10) : parseFloat(parentWidth * aspectRatio, 10);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewHeight = nativeHeight;\n\t\t\t}\n\n\t\t\tif (newHeight <= t.container.querySelector('.' + t.options.classPrefix + 'inner').offsetHeight) {\n\t\t\t\tnewHeight = t.container.querySelector('.' + t.options.classPrefix + 'inner').offsetHeight;\n\t\t\t}\n\n\t\t\tif (isNaN(newHeight)) {\n\t\t\t\tnewHeight = parentHeight;\n\t\t\t}\n\n\t\t\tif (t.getElement(t.container).parentNode.length > 0 && t.getElement(t.container).parentNode.tagName.toLowerCase() === 'body') {\n\t\t\t\tparentWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth;\n\t\t\t\tnewHeight = _window2.default.innerHeight || _document2.default.documentElement.clientHeight || _document2.default.body.clientHeight;\n\t\t\t}\n\n\t\t\tif (newHeight && parentWidth) {\n\t\t\t\tt.getElement(t.container).style.width = parentWidth + 'px';\n\t\t\t\tt.getElement(t.container).style.height = newHeight + 'px';\n\n\t\t\t\tt.node.style.width = '100%';\n\t\t\t\tt.node.style.height = '100%';\n\n\t\t\t\tif (t.isVideo && t.media.setSize) {\n\t\t\t\t\tt.media.setSize(parentWidth, newHeight);\n\t\t\t\t}\n\n\t\t\t\tif (newHeight <= t.container.querySelector('.' + t.options.classPrefix + 'inner').offsetHeight) {\n\t\t\t\t\tt.node.style.width = 'auto';\n\t\t\t\t\tt.node.style.height = 'auto';\n\t\t\t\t}\n\n\t\t\t\tvar layerChildren = t.getElement(t.layers).children;\n\t\t\t\tfor (var i = 0, total = layerChildren.length; i < total; i++) {\n\t\t\t\t\tlayerChildren[i].style.width = '100%';\n\t\t\t\t\tlayerChildren[i].style.height = '100%';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'setFillMode',\n\t\tvalue: function setFillMode() {\n\t\t\tvar t = this;\n\t\t\tvar isIframe = _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null;\n\t\t\tvar parent = function () {\n\t\t\t\tvar parentEl = void 0,\n\t\t\t\t    el = t.getElement(t.container);\n\n\t\t\t\twhile (el) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {\n\t\t\t\t\t\t\treturn _window2.default.frameElement;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparentEl = el.parentElement;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tparentEl = el.parentElement;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parentEl && dom.visible(parentEl)) {\n\t\t\t\t\t\treturn parentEl;\n\t\t\t\t\t}\n\t\t\t\t\tel = parentEl;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t}();\n\t\t\tvar parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null);\n\n\t\t\tif (t.node.style.height !== 'none' && t.node.style.height !== t.height) {\n\t\t\t\tt.node.style.height = 'auto';\n\t\t\t}\n\t\t\tif (t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width) {\n\t\t\t\tt.node.style.maxWidth = 'none';\n\t\t\t}\n\n\t\t\tif (t.node.style.maxHeight !== 'none' && t.node.style.maxHeight !== t.height) {\n\t\t\t\tt.node.style.maxHeight = 'none';\n\t\t\t}\n\n\t\t\tif (t.node.currentStyle) {\n\t\t\t\tif (t.node.currentStyle.height === '100%') {\n\t\t\t\t\tt.node.currentStyle.height = 'auto';\n\t\t\t\t}\n\t\t\t\tif (t.node.currentStyle.maxWidth === '100%') {\n\t\t\t\t\tt.node.currentStyle.maxWidth = 'none';\n\t\t\t\t}\n\t\t\t\tif (t.node.currentStyle.maxHeight === '100%') {\n\t\t\t\t\tt.node.currentStyle.maxHeight = 'none';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!isIframe && !parseFloat(parentStyles.width)) {\n\t\t\t\tparent.style.width = t.media.offsetWidth + 'px';\n\t\t\t}\n\n\t\t\tif (!isIframe && !parseFloat(parentStyles.height)) {\n\t\t\t\tparent.style.height = t.media.offsetHeight + 'px';\n\t\t\t}\n\n\t\t\tparentStyles = getComputedStyle(parent);\n\n\t\t\tvar parentWidth = parseFloat(parentStyles.width),\n\t\t\t    parentHeight = parseFloat(parentStyles.height);\n\t\t\tt.setDimensions('100%', '100%');\n\n\t\t\tvar poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');\n\t\t\tif (poster) {\n\t\t\t\tposter.style.display = '';\n\t\t\t}\n\n\t\t\tvar targetElement = t.getElement(t.container).querySelectorAll('object, embed, iframe, video'),\n\t\t\t    initHeight = t.height,\n\t\t\t    initWidth = t.width,\n\t\t\t    scaleX1 = parentWidth,\n\t\t\t    scaleY1 = initHeight * parentWidth / initWidth,\n\t\t\t    scaleX2 = initWidth * parentHeight / initHeight,\n\t\t\t    scaleY2 = parentHeight,\n\t\t\t    bScaleOnWidth = scaleX2 > parentWidth === false,\n\t\t\t    finalWidth = bScaleOnWidth ? Math.floor(scaleX1) : Math.floor(scaleX2),\n\t\t\t    finalHeight = bScaleOnWidth ? Math.floor(scaleY1) : Math.floor(scaleY2),\n\t\t\t    width = bScaleOnWidth ? parentWidth + 'px' : finalWidth + 'px',\n\t\t\t    height = bScaleOnWidth ? finalHeight + 'px' : parentHeight + 'px';\n\n\t\t\tfor (var i = 0, total = targetElement.length; i < total; i++) {\n\t\t\t\ttargetElement[i].style.height = height;\n\t\t\t\ttargetElement[i].style.width = width;\n\t\t\t\tif (t.media.setSize) {\n\t\t\t\t\tt.media.setSize(width, height);\n\t\t\t\t}\n\n\t\t\t\ttargetElement[i].style.marginLeft = Math.floor((parentWidth - finalWidth) / 2) + 'px';\n\t\t\t\ttargetElement[i].style.marginTop = 0;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'setDimensions',\n\t\tvalue: function setDimensions(width, height) {\n\t\t\tvar t = this;\n\n\t\t\twidth = (0, _general.isString)(width) && width.indexOf('%') > -1 ? width : parseFloat(width) + 'px';\n\t\t\theight = (0, _general.isString)(height) && height.indexOf('%') > -1 ? height : parseFloat(height) + 'px';\n\n\t\t\tt.getElement(t.container).style.width = width;\n\t\t\tt.getElement(t.container).style.height = height;\n\n\t\t\tvar layers = t.getElement(t.layers).children;\n\t\t\tfor (var i = 0, total = layers.length; i < total; i++) {\n\t\t\t\tlayers[i].style.width = width;\n\t\t\t\tlayers[i].style.height = height;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'setControlsSize',\n\t\tvalue: function setControlsSize() {\n\t\t\tvar t = this;\n\n\t\t\tif (!dom.visible(t.getElement(t.container))) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!(t.rail && dom.visible(t.rail))) {\n\t\t\t\tvar children = t.getElement(t.controls).children;\n\t\t\t\tvar minWidth = 0;\n\n\t\t\t\tfor (var i = 0, total = children.length; i < total; i++) {\n\t\t\t\t\tminWidth += children[i].offsetWidth;\n\t\t\t\t}\n\n\t\t\t\tt.getElement(t.container).style.minWidth = minWidth + 'px';\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'addControlElement',\n\t\tvalue: function addControlElement(element, key) {\n\t\t\tvar t = this;\n\n\t\t\tif (t.featurePosition[key] !== undefined) {\n\t\t\t\tvar child = t.getElement(t.controls).children[t.featurePosition[key] - 1];\n\t\t\t\tchild.parentNode.insertBefore(element, child.nextSibling);\n\t\t\t} else {\n\t\t\t\tt.getElement(t.controls).appendChild(element);\n\t\t\t\tvar children = t.getElement(t.controls).children;\n\t\t\t\tfor (var i = 0, total = children.length; i < total; i++) {\n\t\t\t\t\tif (element === children[i]) {\n\t\t\t\t\t\tt.featurePosition[key] = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'createIframeLayer',\n\t\tvalue: function createIframeLayer() {\n\t\t\tvar t = this;\n\n\t\t\tif (t.isVideo && t.media.rendererName !== null && t.media.rendererName.indexOf('iframe') > -1 && !_document2.default.getElementById(t.media.id + '-iframe-overlay')) {\n\n\t\t\t\tvar layer = _document2.default.createElement('div'),\n\t\t\t\t    target = _document2.default.getElementById(t.media.id + '_' + t.media.rendererName);\n\n\t\t\t\tlayer.id = t.media.id + '-iframe-overlay';\n\t\t\t\tlayer.className = t.options.classPrefix + 'iframe-overlay';\n\t\t\t\tlayer.addEventListener('click', function (e) {\n\t\t\t\t\tif (t.options.clickToPlayPause) {\n\t\t\t\t\t\tif (t.paused) {\n\t\t\t\t\t\t\tt.play();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tt.pause();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttarget.parentNode.insertBefore(layer, target);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'resetSize',\n\t\tvalue: function resetSize() {\n\t\t\tvar t = this;\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tt.setPlayerSize(t.width, t.height);\n\t\t\t\tt.setControlsSize();\n\t\t\t}, 50);\n\t\t}\n\t}, {\n\t\tkey: 'setPoster',\n\t\tvalue: function setPoster(url) {\n\t\t\tvar t = this;\n\n\t\t\tif (t.getElement(t.container)) {\n\t\t\t\tvar posterDiv = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster');\n\n\t\t\t\tif (!posterDiv) {\n\t\t\t\t\tposterDiv = _document2.default.createElement('div');\n\t\t\t\t\tposterDiv.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';\n\t\t\t\t\tt.getElement(t.layers).appendChild(posterDiv);\n\t\t\t\t}\n\n\t\t\t\tvar posterImg = posterDiv.querySelector('img');\n\n\t\t\t\tif (!posterImg && url) {\n\t\t\t\t\tposterImg = _document2.default.createElement('img');\n\t\t\t\t\tposterImg.alt = '';\n\t\t\t\t\tposterImg.className = t.options.classPrefix + 'poster-img';\n\t\t\t\t\tposterImg.width = '100%';\n\t\t\t\t\tposterImg.height = '100%';\n\t\t\t\t\tposterDiv.style.display = '';\n\t\t\t\t\tposterDiv.appendChild(posterImg);\n\t\t\t\t}\n\n\t\t\t\tif (url) {\n\t\t\t\t\tposterImg.setAttribute('src', url);\n\t\t\t\t\tposterDiv.style.backgroundImage = 'url(\"' + url + '\")';\n\t\t\t\t\tposterDiv.style.display = '';\n\t\t\t\t} else if (posterImg) {\n\t\t\t\t\tposterDiv.style.backgroundImage = 'none';\n\t\t\t\t\tposterDiv.style.display = 'none';\n\t\t\t\t\tposterImg.remove();\n\t\t\t\t} else {\n\t\t\t\t\tposterDiv.style.display = 'none';\n\t\t\t\t}\n\t\t\t} else if (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls || _constants.IS_ANDROID && t.options.AndroidUseNativeControls) {\n\t\t\t\tt.media.originalNode.poster = url;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'changeSkin',\n\t\tvalue: function changeSkin(className) {\n\t\t\tvar t = this;\n\n\t\t\tt.getElement(t.container).className = t.options.classPrefix + 'container ' + className;\n\t\t\tt.setPlayerSize(t.width, t.height);\n\t\t\tt.setControlsSize();\n\t\t}\n\t}, {\n\t\tkey: 'globalBind',\n\t\tvalue: function globalBind(events, callback) {\n\t\t\tvar t = this,\n\t\t\t    doc = t.node ? t.node.ownerDocument : _document2.default;\n\n\t\t\tevents = (0, _general.splitEvents)(events, t.id);\n\t\t\tif (events.d) {\n\t\t\t\tvar eventList = events.d.split(' ');\n\t\t\t\tfor (var i = 0, total = eventList.length; i < total; i++) {\n\t\t\t\t\teventList[i].split('.').reduce(function (part, e) {\n\t\t\t\t\t\tdoc.addEventListener(e, callback, false);\n\t\t\t\t\t\treturn e;\n\t\t\t\t\t}, '');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (events.w) {\n\t\t\t\tvar _eventList = events.w.split(' ');\n\t\t\t\tfor (var _i = 0, _total = _eventList.length; _i < _total; _i++) {\n\t\t\t\t\t_eventList[_i].split('.').reduce(function (part, e) {\n\t\t\t\t\t\t_window2.default.addEventListener(e, callback, false);\n\t\t\t\t\t\treturn e;\n\t\t\t\t\t}, '');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'globalUnbind',\n\t\tvalue: function globalUnbind(events, callback) {\n\t\t\tvar t = this,\n\t\t\t    doc = t.node ? t.node.ownerDocument : _document2.default;\n\n\t\t\tevents = (0, _general.splitEvents)(events, t.id);\n\t\t\tif (events.d) {\n\t\t\t\tvar eventList = events.d.split(' ');\n\t\t\t\tfor (var i = 0, total = eventList.length; i < total; i++) {\n\t\t\t\t\teventList[i].split('.').reduce(function (part, e) {\n\t\t\t\t\t\tdoc.removeEventListener(e, callback, false);\n\t\t\t\t\t\treturn e;\n\t\t\t\t\t}, '');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (events.w) {\n\t\t\t\tvar _eventList2 = events.w.split(' ');\n\t\t\t\tfor (var _i2 = 0, _total2 = _eventList2.length; _i2 < _total2; _i2++) {\n\t\t\t\t\t_eventList2[_i2].split('.').reduce(function (part, e) {\n\t\t\t\t\t\t_window2.default.removeEventListener(e, callback, false);\n\t\t\t\t\t\treturn e;\n\t\t\t\t\t}, '');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'buildfeatures',\n\t\tvalue: function buildfeatures(player, controls, layers, media) {\n\t\t\tvar t = this;\n\n\t\t\tfor (var i = 0, total = t.options.features.length; i < total; i++) {\n\t\t\t\tvar feature = t.options.features[i];\n\t\t\t\tif (t['build' + feature]) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tt['build' + feature](player, controls, layers, media);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error('error building ' + feature, e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'buildposter',\n\t\tvalue: function buildposter(player, controls, layers, media) {\n\t\t\tvar t = this,\n\t\t\t    poster = _document2.default.createElement('div');\n\n\t\t\tposter.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';\n\t\t\tlayers.appendChild(poster);\n\n\t\t\tvar posterUrl = media.originalNode.getAttribute('poster');\n\n\t\t\tif (player.options.poster !== '') {\n\t\t\t\tif (posterUrl && _constants.IS_IOS) {\n\t\t\t\t\tmedia.originalNode.removeAttribute('poster');\n\t\t\t\t}\n\t\t\t\tposterUrl = player.options.poster;\n\t\t\t}\n\n\t\t\tif (posterUrl) {\n\t\t\t\tt.setPoster(posterUrl);\n\t\t\t} else if (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {\n\t\t\t\tt.setPoster(t.media.renderer.getPosterUrl());\n\t\t\t} else {\n\t\t\t\tposter.style.display = 'none';\n\t\t\t}\n\n\t\t\tmedia.addEventListener('play', function () {\n\t\t\t\tposter.style.display = 'none';\n\t\t\t});\n\n\t\t\tmedia.addEventListener('playing', function () {\n\t\t\t\tposter.style.display = 'none';\n\t\t\t});\n\n\t\t\tif (player.options.showPosterWhenEnded && player.options.autoRewind) {\n\t\t\t\tmedia.addEventListener('ended', function () {\n\t\t\t\t\tposter.style.display = '';\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tmedia.addEventListener('error', function () {\n\t\t\t\tposter.style.display = 'none';\n\t\t\t});\n\n\t\t\tif (player.options.showPosterWhenPaused) {\n\t\t\t\tmedia.addEventListener('pause', function () {\n\t\t\t\t\tif (!player.ended) {\n\t\t\t\t\t\tposter.style.display = '';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'buildoverlays',\n\t\tvalue: function buildoverlays(player, controls, layers, media) {\n\t\t\tif (!player.isVideo) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar t = this,\n\t\t\t    loading = _document2.default.createElement('div'),\n\t\t\t    error = _document2.default.createElement('div'),\n\t\t\t    bigPlay = _document2.default.createElement('div');\n\n\t\t\tloading.style.display = 'none';\n\t\t\tloading.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';\n\t\t\tloading.innerHTML = '<div class=\"' + t.options.classPrefix + 'overlay-loading\">' + ('<div class=\"' + t.options.classPrefix + 'overlay-loading-bg-img\">\\n\\t\\t\\t\\t\\t<svg xmlns=\"http://www.w3.org/2000/svg\">\\n\\t\\t\\t\\t\\t\\t<use xlink:href=\"' + t.media.options.iconSprite + '#icon-loading-spinner\"></use>\\n\\t\\t\\t\\t\\t</svg>\\n\\t\\t\\t\\t</div>') + '</div>';\n\t\t\tlayers.appendChild(loading);\n\n\t\t\terror.style.display = 'none';\n\t\t\terror.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';\n\t\t\terror.innerHTML = '<div class=\"' + t.options.classPrefix + 'overlay-error\"></div>';\n\t\t\tlayers.appendChild(error);\n\n\t\t\tbigPlay.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer ' + t.options.classPrefix + 'overlay-play';\n\t\t\tbigPlay.innerHTML = (0, _generate.generateControlButton)(t.id, _i18n2.default.t('mejs.play'), _i18n2.default.t('mejs.play'), '' + t.media.options.iconSprite, ['icon-overlay-play'], '' + t.options.classPrefix, t.options.classPrefix + 'overlay-button', '', false);\n\n\t\t\tbigPlay.addEventListener('click', function () {\n\t\t\t\tif (t.options.clickToPlayPause) {\n\n\t\t\t\t\tvar button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),\n\t\t\t\t\t    pressed = button.getAttribute('aria-pressed');\n\n\t\t\t\t\tif (t.paused) {\n\t\t\t\t\t\tt.play();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.pause();\n\t\t\t\t\t}\n\n\t\t\t\t\tbutton.setAttribute('aria-pressed', !!pressed);\n\t\t\t\t\tt.getElement(t.container).focus();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tlayers.appendChild(bigPlay);\n\n\t\t\tif (t.media.rendererName !== null && (/(youtube|facebook)/i.test(t.media.rendererName) && !(t.media.originalNode.getAttribute('poster') || player.options.poster || typeof t.media.renderer.getPosterUrl === 'function' && t.media.renderer.getPosterUrl()) || _constants.IS_STOCK_ANDROID || t.media.originalNode.getAttribute('autoplay'))) {\n\t\t\t\tbigPlay.style.display = 'none';\n\t\t\t}\n\n\t\t\tvar hasError = false;\n\n\t\t\tmedia.addEventListener('play', function () {\n\t\t\t\tbigPlay.style.display = 'none';\n\t\t\t\tloading.style.display = 'none';\n\t\t\t\terror.style.display = 'none';\n\t\t\t\thasError = false;\n\t\t\t});\n\t\t\tmedia.addEventListener('playing', function () {\n\t\t\t\tbigPlay.style.display = 'none';\n\t\t\t\tloading.style.display = 'none';\n\t\t\t\terror.style.display = 'none';\n\t\t\t\thasError = false;\n\t\t\t});\n\t\t\tmedia.addEventListener('seeking', function () {\n\t\t\t\tbigPlay.style.display = 'none';\n\t\t\t\tloading.style.display = '';\n\t\t\t\thasError = false;\n\t\t\t});\n\t\t\tmedia.addEventListener('seeked', function () {\n\t\t\t\tbigPlay.style.display = t.paused && !_constants.IS_STOCK_ANDROID ? '' : 'none';\n\t\t\t\tloading.style.display = 'none';\n\t\t\t\thasError = false;\n\t\t\t});\n\t\t\tmedia.addEventListener('pause', function () {\n\t\t\t\tloading.style.display = 'none';\n\t\t\t\tif (!_constants.IS_STOCK_ANDROID && !hasError) {\n\t\t\t\t\tbigPlay.style.display = '';\n\t\t\t\t}\n\t\t\t\thasError = false;\n\t\t\t});\n\t\t\tmedia.addEventListener('waiting', function () {\n\t\t\t\tloading.style.display = '';\n\t\t\t\thasError = false;\n\t\t\t});\n\n\t\t\tmedia.addEventListener('loadeddata', function () {\n\t\t\t\tloading.style.display = '';\n\n\t\t\t\tif (_constants.IS_ANDROID) {\n\t\t\t\t\tmedia.canplayTimeout = setTimeout(function () {\n\t\t\t\t\t\tif (_document2.default.createEvent) {\n\t\t\t\t\t\t\tvar evt = _document2.default.createEvent('HTMLEvents');\n\t\t\t\t\t\t\tevt.initEvent('canplay', true, true);\n\t\t\t\t\t\t\treturn media.dispatchEvent(evt);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 300);\n\t\t\t\t}\n\t\t\t\thasError = false;\n\t\t\t});\n\t\t\tmedia.addEventListener('canplay', function () {\n\t\t\t\tloading.style.display = 'none';\n\n\t\t\t\tclearTimeout(media.canplayTimeout);\n\t\t\t\thasError = false;\n\t\t\t});\n\n\t\t\tmedia.addEventListener('error', function (e) {\n\t\t\t\tt._handleError(e, t.media, t.node);\n\t\t\t\tloading.style.display = 'none';\n\t\t\t\tbigPlay.style.display = 'none';\n\t\t\t\thasError = true;\n\t\t\t});\n\n\t\t\tmedia.addEventListener('loadedmetadata', function () {\n\t\t\t\tif (!t.controlsEnabled) {\n\t\t\t\t\tt.enableControls();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmedia.addEventListener('keydown', function (e) {\n\t\t\t\tt.onkeydown(player, media, e);\n\t\t\t\thasError = false;\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'buildkeyboard',\n\t\tvalue: function buildkeyboard(player, controls, layers, media) {\n\t\t\tvar t = this;\n\n\t\t\tt.getElement(t.container).addEventListener('keydown', function () {\n\t\t\t\tt.keyboardAction = true;\n\t\t\t});\n\n\t\t\tt.globalKeydownCallback = function (event) {\n\t\t\t\tif (!_document2.default.activeElement) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tvar container = _document2.default.activeElement.closest('.' + t.options.classPrefix + 'container'),\n\t\t\t\t    target = t.media.closest('.' + t.options.classPrefix + 'container');\n\t\t\t\tt.hasFocus = !!(container && target && container.id === target.id);\n\t\t\t\treturn t.onkeydown(player, media, event);\n\t\t\t};\n\n\t\t\tt.globalClickCallback = function (event) {\n\t\t\t\tt.hasFocus = !!event.target.closest('.' + t.options.classPrefix + 'container');\n\t\t\t};\n\n\t\t\tt.globalBind('keydown', t.globalKeydownCallback);\n\n\t\t\tt.globalBind('click', t.globalClickCallback);\n\t\t}\n\t}, {\n\t\tkey: 'onkeydown',\n\t\tvalue: function onkeydown(player, media, e) {\n\t\t\tif (player.hasFocus && player.options.enableKeyboard) {\n\t\t\t\tfor (var i = 0, total = player.options.keyActions.length; i < total; i++) {\n\t\t\t\t\tvar keyAction = player.options.keyActions[i];\n\n\t\t\t\t\tfor (var j = 0, jl = keyAction.keys.length; j < jl; j++) {\n\t\t\t\t\t\tif (e.keyCode === keyAction.keys[j]) {\n\t\t\t\t\t\t\tkeyAction.action(player, media, e.keyCode, e);\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}, {\n\t\tkey: 'play',\n\t\tvalue: function play() {\n\t\t\treturn this.proxy.play();\n\t\t}\n\t}, {\n\t\tkey: 'pause',\n\t\tvalue: function pause() {\n\t\t\treturn this.proxy.pause();\n\t\t}\n\t}, {\n\t\tkey: 'load',\n\t\tvalue: function load() {\n\t\t\treturn this.proxy.load();\n\t\t}\n\t}, {\n\t\tkey: 'setCurrentTime',\n\t\tvalue: function setCurrentTime(time) {\n\t\t\tvar userInteraction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\t\t\tthis.seekUserInteraction = userInteraction;\n\t\t\tthis.proxy.setCurrentTime(time);\n\t\t}\n\t}, {\n\t\tkey: 'getCurrentTime',\n\t\tvalue: function getCurrentTime() {\n\t\t\treturn this.proxy.currentTime;\n\t\t}\n\t}, {\n\t\tkey: 'getDuration',\n\t\tvalue: function getDuration() {\n\t\t\treturn this.proxy.duration;\n\t\t}\n\t}, {\n\t\tkey: 'setVolume',\n\t\tvalue: function setVolume(volume) {\n\t\t\tthis.proxy.volume = volume;\n\t\t}\n\t}, {\n\t\tkey: 'getVolume',\n\t\tvalue: function getVolume() {\n\t\t\treturn this.proxy.getVolume();\n\t\t}\n\t}, {\n\t\tkey: 'setMuted',\n\t\tvalue: function setMuted(value) {\n\t\t\tthis.proxy.setMuted(value);\n\t\t}\n\t}, {\n\t\tkey: 'setSrc',\n\t\tvalue: function setSrc(src) {\n\t\t\tif (!this.controlsEnabled) {\n\t\t\t\tthis.enableControls();\n\t\t\t}\n\t\t\tthis.proxy.setSrc(src);\n\t\t}\n\t}, {\n\t\tkey: 'getSrc',\n\t\tvalue: function getSrc() {\n\t\t\treturn this.proxy.getSrc();\n\t\t}\n\t}, {\n\t\tkey: 'canPlayType',\n\t\tvalue: function canPlayType(type) {\n\t\t\treturn this.proxy.canPlayType(type);\n\t\t}\n\t}, {\n\t\tkey: 'remove',\n\t\tvalue: function remove() {\n\t\t\tvar t = this,\n\t\t\t    rendererName = t.media.rendererName,\n\t\t\t    src = t.media.originalNode.src;\n\n\t\t\tfor (var featureIndex in t.options.features) {\n\t\t\t\tvar feature = t.options.features[featureIndex];\n\t\t\t\tif (t['clean' + feature]) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tt['clean' + feature](t, t.getElement(t.layers), t.getElement(t.controls), t.media);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error('error cleaning ' + feature, e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar nativeWidth = t.node.getAttribute('width'),\n\t\t\t    nativeHeight = t.node.getAttribute('height');\n\n\t\t\tif (nativeWidth) {\n\t\t\t\tif (nativeWidth.indexOf('%') === -1) {\n\t\t\t\t\tnativeWidth = nativeWidth + 'px';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnativeWidth = 'auto';\n\t\t\t}\n\n\t\t\tif (nativeHeight) {\n\t\t\t\tif (nativeHeight.indexOf('%') === -1) {\n\t\t\t\t\tnativeHeight = nativeHeight + 'px';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnativeHeight = 'auto';\n\t\t\t}\n\n\t\t\tt.node.style.width = nativeWidth;\n\t\t\tt.node.style.height = nativeHeight;\n\n\t\t\tt.setPlayerSize(0, 0);\n\n\t\t\tif (!t.isDynamic) {\n\t\t\t\t(function () {\n\t\t\t\t\tt.node.setAttribute('controls', true);\n\t\t\t\t\tt.node.setAttribute('id', t.node.getAttribute('id').replace('_' + rendererName, '').replace('_from_mejs', ''));\n\t\t\t\t\tvar poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');\n\t\t\t\t\tif (poster) {\n\t\t\t\t\t\tt.node.setAttribute('poster', poster.src);\n\t\t\t\t\t}\n\n\t\t\t\t\tdelete t.node.autoplay;\n\n\t\t\t\t\tt.node.setAttribute('src', '');\n\t\t\t\t\tif (t.media.canPlayType((0, _media.getTypeFromFile)(src)) !== '') {\n\t\t\t\t\t\tt.node.setAttribute('src', src);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (rendererName && rendererName.indexOf('iframe') > -1) {\n\t\t\t\t\t\tvar layer = _document2.default.getElementById(t.media.id + '-iframe-overlay');\n\t\t\t\t\t\tlayer.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar node = t.node.cloneNode();\n\t\t\t\t\tnode.style.display = '';\n\t\t\t\t\tt.getElement(t.container).parentNode.insertBefore(node, t.getElement(t.container));\n\t\t\t\t\tt.node.remove();\n\n\t\t\t\t\tif (t.mediaFiles) {\n\t\t\t\t\t\tfor (var i = 0, total = t.mediaFiles.length; i < total; i++) {\n\t\t\t\t\t\t\tvar source = _document2.default.createElement('source');\n\t\t\t\t\t\t\tsource.setAttribute('src', t.mediaFiles[i].src);\n\t\t\t\t\t\t\tsource.setAttribute('type', t.mediaFiles[i].type);\n\t\t\t\t\t\t\tnode.appendChild(source);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (t.trackFiles) {\n\t\t\t\t\t\tvar _loop3 = function _loop3(_i3, _total3) {\n\t\t\t\t\t\t\tvar track = t.trackFiles[_i3];\n\t\t\t\t\t\t\tvar newTrack = _document2.default.createElement('track');\n\t\t\t\t\t\t\tnewTrack.kind = track.kind;\n\t\t\t\t\t\t\tnewTrack.label = track.label;\n\t\t\t\t\t\t\tnewTrack.srclang = track.srclang;\n\t\t\t\t\t\t\tnewTrack.src = track.src;\n\n\t\t\t\t\t\t\tnode.appendChild(newTrack);\n\t\t\t\t\t\t\tnewTrack.addEventListener('load', function () {\n\t\t\t\t\t\t\t\tthis.mode = 'showing';\n\t\t\t\t\t\t\t\tnode.textTracks[_i3].mode = 'showing';\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tfor (var _i3 = 0, _total3 = t.trackFiles.length; _i3 < _total3; _i3++) {\n\t\t\t\t\t\t\t_loop3(_i3, _total3);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tdelete t.node;\n\t\t\t\t\tdelete t.mediaFiles;\n\t\t\t\t\tdelete t.trackFiles;\n\t\t\t\t})();\n\t\t\t} else {\n\t\t\t\tt.getElement(t.container).parentNode.insertBefore(t.node, t.getElement(t.container));\n\t\t\t}\n\n\t\t\tif (t.media.renderer && typeof t.media.renderer.destroy === 'function') {\n\t\t\t\tt.media.renderer.destroy();\n\t\t\t}\n\n\t\t\tdelete _mejs2.default.players[t.id];\n\n\t\t\tif (_typeof(t.getElement(t.container)) === 'object') {\n\t\t\t\tvar offscreen = t.getElement(t.container).parentNode.querySelector('.' + t.options.classPrefix + 'offscreen');\n\t\t\t\tif (offscreen) {\n\t\t\t\t\toffscreen.remove();\n\t\t\t\t}\n\t\t\t\tt.getElement(t.container).remove();\n\t\t\t}\n\t\t\tt.globalUnbind('resize', t.globalResizeCallback);\n\t\t\tt.globalUnbind('keydown', t.globalKeydownCallback);\n\t\t\tt.globalUnbind('click', t.globalClickCallback);\n\n\t\t\tdelete t.media.player;\n\t\t}\n\t}, {\n\t\tkey: 'paused',\n\t\tget: function get() {\n\t\t\treturn this.proxy.paused;\n\t\t}\n\t}, {\n\t\tkey: 'muted',\n\t\tget: function get() {\n\t\t\treturn this.proxy.muted;\n\t\t},\n\t\tset: function set(muted) {\n\t\t\tthis.setMuted(muted);\n\t\t}\n\t}, {\n\t\tkey: 'ended',\n\t\tget: function get() {\n\t\t\treturn this.proxy.ended;\n\t\t}\n\t}, {\n\t\tkey: 'readyState',\n\t\tget: function get() {\n\t\t\treturn this.proxy.readyState;\n\t\t}\n\t}, {\n\t\tkey: 'currentTime',\n\t\tset: function set(time) {\n\t\t\tthis.setCurrentTime(time);\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this.getCurrentTime();\n\t\t}\n\t}, {\n\t\tkey: 'duration',\n\t\tget: function get() {\n\t\t\treturn this.getDuration();\n\t\t}\n\t}, {\n\t\tkey: 'volume',\n\t\tset: function set(volume) {\n\t\t\tthis.setVolume(volume);\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this.getVolume();\n\t\t}\n\t}, {\n\t\tkey: 'src',\n\t\tset: function set(src) {\n\t\t\tthis.setSrc(src);\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this.getSrc();\n\t\t}\n\t}]);\n\n\treturn MediaElementPlayer;\n}();\n\n_window2.default.MediaElementPlayer = MediaElementPlayer;\n_mejs2.default.MediaElementPlayer = MediaElementPlayer;\n\nexports.default = MediaElementPlayer;\n\n},{\"18\":18,\"2\":2,\"26\":26,\"27\":27,\"28\":28,\"29\":29,\"3\":3,\"30\":30,\"32\":32,\"6\":6,\"7\":7,\"8\":8}],18:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DefaultPlayer = function () {\n\tfunction DefaultPlayer(player) {\n\t\t_classCallCheck(this, DefaultPlayer);\n\n\t\tthis.media = player.media;\n\t\tthis.isVideo = player.isVideo;\n\t\tthis.classPrefix = player.options.classPrefix;\n\t\tthis.createIframeLayer = function () {\n\t\t\treturn player.createIframeLayer();\n\t\t};\n\t\tthis.setPoster = function (url) {\n\t\t\treturn player.setPoster(url);\n\t\t};\n\t\treturn this;\n\t}\n\n\t_createClass(DefaultPlayer, [{\n\t\tkey: 'play',\n\t\tvalue: function play() {\n\t\t\treturn this.media.play();\n\t\t}\n\t}, {\n\t\tkey: 'pause',\n\t\tvalue: function pause() {\n\t\t\treturn this.media.pause();\n\t\t}\n\t}, {\n\t\tkey: 'load',\n\t\tvalue: function load() {\n\t\t\tvar t = this;\n\n\t\t\tif (!t.isLoaded) {\n\t\t\t\tt.media.load();\n\t\t\t}\n\n\t\t\tt.isLoaded = true;\n\t\t}\n\t}, {\n\t\tkey: 'setCurrentTime',\n\t\tvalue: function setCurrentTime(time) {\n\t\t\tthis.media.setCurrentTime(time);\n\t\t}\n\t}, {\n\t\tkey: 'getCurrentTime',\n\t\tvalue: function getCurrentTime() {\n\t\t\treturn this.media.currentTime;\n\t\t}\n\t}, {\n\t\tkey: 'getDuration',\n\t\tvalue: function getDuration() {\n\t\t\tvar duration = this.media.getDuration();\n\t\t\tif (duration === Infinity && this.media.seekable && this.media.seekable.length) {\n\t\t\t\tduration = this.media.seekable.end(0);\n\t\t\t}\n\t\t\treturn duration;\n\t\t}\n\t}, {\n\t\tkey: 'setVolume',\n\t\tvalue: function setVolume(volume) {\n\t\t\tthis.media.setVolume(volume);\n\t\t}\n\t}, {\n\t\tkey: 'getVolume',\n\t\tvalue: function getVolume() {\n\t\t\treturn this.media.getVolume();\n\t\t}\n\t}, {\n\t\tkey: 'setMuted',\n\t\tvalue: function setMuted(value) {\n\t\t\tthis.media.setMuted(value);\n\t\t}\n\t}, {\n\t\tkey: 'setSrc',\n\t\tvalue: function setSrc(src) {\n\t\t\tvar t = this,\n\t\t\t    layer = document.getElementById(t.media.id + '-iframe-overlay');\n\n\t\t\tif (layer) {\n\t\t\t\tlayer.remove();\n\t\t\t}\n\n\t\t\tt.media.setSrc(src);\n\t\t\tt.createIframeLayer();\n\t\t\tif (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {\n\t\t\t\tt.setPoster(t.media.renderer.getPosterUrl());\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'getSrc',\n\t\tvalue: function getSrc() {\n\t\t\treturn this.media.getSrc();\n\t\t}\n\t}, {\n\t\tkey: 'canPlayType',\n\t\tvalue: function canPlayType(type) {\n\t\t\treturn this.media.canPlayType(type);\n\t\t}\n\t}, {\n\t\tkey: 'paused',\n\t\tget: function get() {\n\t\t\treturn this.media.paused;\n\t\t}\n\t}, {\n\t\tkey: 'muted',\n\t\tset: function set(muted) {\n\t\t\tthis.setMuted(muted);\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this.media.muted;\n\t\t}\n\t}, {\n\t\tkey: 'ended',\n\t\tget: function get() {\n\t\t\treturn this.media.ended;\n\t\t}\n\t}, {\n\t\tkey: 'readyState',\n\t\tget: function get() {\n\t\t\treturn this.media.readyState;\n\t\t}\n\t}, {\n\t\tkey: 'currentTime',\n\t\tset: function set(time) {\n\t\t\tthis.setCurrentTime(time);\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this.getCurrentTime();\n\t\t}\n\t}, {\n\t\tkey: 'duration',\n\t\tget: function get() {\n\t\t\treturn this.getDuration();\n\t\t}\n\t}, {\n\t\tkey: 'remainingTime',\n\t\tget: function get() {\n\t\t\treturn this.getDuration() - this.currentTime();\n\t\t}\n\t}, {\n\t\tkey: 'volume',\n\t\tset: function set(volume) {\n\t\t\tthis.setVolume(volume);\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this.getVolume();\n\t\t}\n\t}, {\n\t\tkey: 'src',\n\t\tset: function set(src) {\n\t\t\tthis.setSrc(src);\n\t\t},\n\t\tget: function get() {\n\t\t\treturn this.getSrc();\n\t\t}\n\t}]);\n\n\treturn DefaultPlayer;\n}();\n\nexports.default = DefaultPlayer;\n\n\n_window2.default.DefaultPlayer = DefaultPlayer;\n\n},{\"3\":3}],19:[function(_dereq_,module,exports){\n'use strict';\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _player = _dereq_(17);\n\nvar _player2 = _interopRequireDefault(_player);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nif (typeof jQuery !== 'undefined') {\n\t_mejs2.default.$ = jQuery;\n} else if (typeof Zepto !== 'undefined') {\n\t_mejs2.default.$ = Zepto;\n} else if (typeof ender !== 'undefined') {\n\t_mejs2.default.$ = ender;\n}\n\n(function ($) {\n\tif (typeof $ !== 'undefined') {\n\t\t$.fn.mediaelementplayer = function (options) {\n\t\t\tif (options === false) {\n\t\t\t\tthis.each(function () {\n\t\t\t\t\tvar player = $(this).data('mediaelementplayer');\n\t\t\t\t\tif (player) {\n\t\t\t\t\t\tplayer.remove();\n\t\t\t\t\t}\n\t\t\t\t\t$(this).removeData('mediaelementplayer');\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.each(function () {\n\t\t\t\t\t$(this).data('mediaelementplayer', new _player2.default(this, options));\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this;\n\t\t};\n\n\t\t$(document).ready(function () {\n\t\t\t$('.' + _mejs2.default.MepDefaults.classPrefix + 'player').mediaelementplayer();\n\t\t});\n\t}\n})(_mejs2.default.$);\n\n},{\"17\":17,\"3\":3,\"8\":8}],20:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _renderer = _dereq_(9);\n\nvar _general = _dereq_(28);\n\nvar _media = _dereq_(30);\n\nvar _constants = _dereq_(26);\n\nvar _dom = _dereq_(27);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar NativeDash = {\n\n\tpromise: null,\n\n\tload: function load(settings) {\n\t\tif (typeof dashjs !== 'undefined') {\n\t\t\tNativeDash.promise = new Promise(function (resolve) {\n\t\t\t\tresolve();\n\t\t\t}).then(function () {\n\t\t\t\tNativeDash._createPlayer(settings);\n\t\t\t});\n\t\t} else {\n\t\t\tsettings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js';\n\n\t\t\tNativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path);\n\t\t\tNativeDash.promise.then(function () {\n\t\t\t\tNativeDash._createPlayer(settings);\n\t\t\t});\n\t\t}\n\n\t\treturn NativeDash.promise;\n\t},\n\n\t_createPlayer: function _createPlayer(settings) {\n\t\tvar player = dashjs.MediaPlayer().create();\n\t\t_window2.default['__ready__' + settings.id](player);\n\t\treturn player;\n\t}\n};\n\nvar DashNativeRenderer = {\n\tname: 'native_dash',\n\toptions: {\n\t\tprefix: 'native_dash',\n\t\tdash: {\n\t\t\tpath: 'https://cdn.dashjs.org/latest/dash.all.min.js',\n\t\t\tdebug: false,\n\t\t\tdrm: {},\n\n\t\t\trobustnessLevel: ''\n\t\t}\n\t},\n\n\tcanPlayType: function canPlayType(type) {\n\t\treturn _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1;\n\t},\n\n\tcreate: function create(mediaElement, options, mediaFiles) {\n\n\t\tvar originalNode = mediaElement.originalNode,\n\t\t    id = mediaElement.id + '_' + options.prefix,\n\t\t    autoplay = originalNode.autoplay,\n\t\t    children = originalNode.children;\n\n\t\tvar node = null,\n\t\t    dashPlayer = null;\n\n\t\toriginalNode.removeAttribute('type');\n\t\tfor (var i = 0, total = children.length; i < total; i++) {\n\t\t\tchildren[i].removeAttribute('type');\n\t\t}\n\n\t\tnode = originalNode.cloneNode(true);\n\t\toptions = Object.assign(options, mediaElement.options);\n\n\t\tvar props = _mejs2.default.html5media.properties,\n\t\t    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {\n\t\t\treturn e !== 'error';\n\t\t}),\n\t\t    attachNativeEvents = function attachNativeEvents(e) {\n\t\t\tvar event = (0, _general.createEvent)(e.type, mediaElement);\n\t\t\tmediaElement.dispatchEvent(event);\n\t\t},\n\t\t    assignGettersSetters = function assignGettersSetters(propName) {\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\tnode['get' + capName] = function () {\n\t\t\t\treturn dashPlayer !== null ? node[propName] : null;\n\t\t\t};\n\n\t\t\tnode['set' + capName] = function (value) {\n\t\t\t\tif (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n\t\t\t\t\tif (propName === 'src') {\n\t\t\t\t\t\tvar source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;\n\t\t\t\t\t\tnode[propName] = source;\n\t\t\t\t\t\tif (dashPlayer !== null) {\n\t\t\t\t\t\t\tdashPlayer.reset();\n\t\t\t\t\t\t\tfor (var _i = 0, _total = events.length; _i < _total; _i++) {\n\t\t\t\t\t\t\t\tnode.removeEventListener(events[_i], attachNativeEvents);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdashPlayer = NativeDash._createPlayer({\n\t\t\t\t\t\t\t\toptions: options.dash,\n\t\t\t\t\t\t\t\tid: id\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') {\n\t\t\t\t\t\t\t\tdashPlayer.setProtectionData(value.drm);\n\t\t\t\t\t\t\t\tif ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {\n\t\t\t\t\t\t\t\t\tdashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdashPlayer.attachSource(source);\n\t\t\t\t\t\t\tif (autoplay) {\n\t\t\t\t\t\t\t\tdashPlayer.play();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode[propName] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {\n\t\t\tassignGettersSetters(props[_i2]);\n\t\t}\n\n\t\t_window2.default['__ready__' + id] = function (_dashPlayer) {\n\t\t\tmediaElement.dashPlayer = dashPlayer = _dashPlayer;\n\n\t\t\tvar dashEvents = dashjs.MediaPlayer.events,\n\t\t\t    assignEvents = function assignEvents(eventName) {\n\t\t\t\tif (eventName === 'loadedmetadata') {\n\t\t\t\t\tdashPlayer.initialize();\n\t\t\t\t\tdashPlayer.attachView(node);\n\t\t\t\t\tdashPlayer.setAutoPlay(false);\n\n\t\t\t\t\tif (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) {\n\t\t\t\t\t\tdashPlayer.setProtectionData(options.dash.drm);\n\t\t\t\t\t\tif ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {\n\t\t\t\t\t\t\tdashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdashPlayer.attachSource(node.getSrc());\n\t\t\t\t}\n\n\t\t\t\tnode.addEventListener(eventName, attachNativeEvents);\n\t\t\t};\n\n\t\t\tfor (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {\n\t\t\t\tassignEvents(events[_i3]);\n\t\t\t}\n\n\t\t\tvar assignMdashEvents = function assignMdashEvents(e) {\n\t\t\t\tif (e.type.toLowerCase() === 'error') {\n\t\t\t\t\tmediaElement.generateError(e.message, node.src);\n\t\t\t\t\tconsole.error(e);\n\t\t\t\t} else {\n\t\t\t\t\tvar _event = (0, _general.createEvent)(e.type, mediaElement);\n\t\t\t\t\t_event.data = e;\n\t\t\t\t\tmediaElement.dispatchEvent(_event);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfor (var eventType in dashEvents) {\n\t\t\t\tif (dashEvents.hasOwnProperty(eventType)) {\n\t\t\t\t\tdashPlayer.on(dashEvents[eventType], function (e) {\n\t\t\t\t\t\treturn assignMdashEvents(e);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (mediaFiles && mediaFiles.length > 0) {\n\t\t\tfor (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {\n\t\t\t\tif (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {\n\t\t\t\t\tnode.setAttribute('src', mediaFiles[_i4].src);\n\t\t\t\t\tif (typeof mediaFiles[_i4].drm !== 'undefined') {\n\t\t\t\t\t\toptions.dash.drm = mediaFiles[_i4].drm;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tnode.setAttribute('id', id);\n\n\t\toriginalNode.parentNode.insertBefore(node, originalNode);\n\t\toriginalNode.autoplay = false;\n\t\toriginalNode.style.display = 'none';\n\n\t\tnode.setSize = function (width, height) {\n\t\t\tnode.style.width = width + 'px';\n\t\t\tnode.style.height = height + 'px';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.hide = function () {\n\t\t\tnode.pause();\n\t\t\tnode.style.display = 'none';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.show = function () {\n\t\t\tnode.style.display = '';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.destroy = function () {\n\t\t\tif (dashPlayer !== null) {\n\t\t\t\tdashPlayer.reset();\n\t\t\t}\n\t\t};\n\n\t\tvar event = (0, _general.createEvent)('rendererready', node);\n\t\tmediaElement.dispatchEvent(event);\n\n\t\tmediaElement.promises.push(NativeDash.load({\n\t\t\toptions: options.dash,\n\t\t\tid: id\n\t\t}));\n\n\t\treturn node;\n\t}\n};\n\n_media.typeChecks.push(function (url) {\n\treturn ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null;\n});\n\n_renderer.renderer.add(DashNativeRenderer);\n\n},{\"26\":26,\"27\":27,\"28\":28,\"3\":3,\"30\":30,\"8\":8,\"9\":9}],21:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.PluginDetector = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _i18n = _dereq_(6);\n\nvar _i18n2 = _interopRequireDefault(_i18n);\n\nvar _renderer = _dereq_(9);\n\nvar _general = _dereq_(28);\n\nvar _constants = _dereq_(26);\n\nvar _media = _dereq_(30);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PluginDetector = exports.PluginDetector = {\n\tplugins: [],\n\n\thasPluginVersion: function hasPluginVersion(plugin, v) {\n\t\tvar pv = PluginDetector.plugins[plugin];\n\t\tv[1] = v[1] || 0;\n\t\tv[2] = v[2] || 0;\n\t\treturn pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2];\n\t},\n\n\taddPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {\n\t\tPluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect);\n\t},\n\n\tdetectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {\n\n\t\tvar version = [0, 0, 0],\n\t\t    description = void 0,\n\t\t    ax = void 0;\n\n\t\tif (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') {\n\t\t\tdescription = _constants.NAV.plugins[pluginName].description;\n\t\t\tif (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) {\n\t\t\t\tversion = description.replace(pluginName, '').replace(/^\\s+/, '').replace(/\\sr/gi, '.').split('.');\n\t\t\t\tfor (var i = 0, total = version.length; i < total; i++) {\n\t\t\t\t\tversion[i] = parseInt(version[i].match(/\\d+/), 10);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (_window2.default.ActiveXObject !== undefined) {\n\t\t\ttry {\n\t\t\t\tax = new ActiveXObject(activeX);\n\t\t\t\tif (ax) {\n\t\t\t\t\tversion = axDetect(ax);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn version;\n\t}\n};\n\nPluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) {\n\tvar version = [],\n\t    d = ax.GetVariable(\"$version\");\n\n\tif (d) {\n\t\td = d.split(\" \")[1].split(\",\");\n\t\tversion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];\n\t}\n\treturn version;\n});\n\nvar FlashMediaElementRenderer = {\n\tcreate: function create(mediaElement, options, mediaFiles) {\n\n\t\tvar flash = {};\n\t\tvar isActive = false;\n\n\t\tflash.options = options;\n\t\tflash.id = mediaElement.id + '_' + flash.options.prefix;\n\t\tflash.mediaElement = mediaElement;\n\t\tflash.flashState = {};\n\t\tflash.flashApi = null;\n\t\tflash.flashApiStack = [];\n\n\t\tvar props = _mejs2.default.html5media.properties,\n\t\t    assignGettersSetters = function assignGettersSetters(propName) {\n\t\t\tflash.flashState[propName] = null;\n\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\tflash['get' + capName] = function () {\n\t\t\t\tif (flash.flashApi !== null) {\n\t\t\t\t\tif (typeof flash.flashApi['get_' + propName] === 'function') {\n\t\t\t\t\t\tvar value = flash.flashApi['get_' + propName]();\n\n\t\t\t\t\t\tif (propName === 'buffered') {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstart: function start() {\n\t\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tend: function end() {\n\t\t\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tlength: 1\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tflash['set' + capName] = function (value) {\n\t\t\t\tif (propName === 'src') {\n\t\t\t\t\tvalue = (0, _media.absolutizeUrl)(value);\n\t\t\t\t}\n\n\t\t\t\tif (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tflash.flashApi['set_' + propName](value);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tflash.flashApiStack.push({\n\t\t\t\t\t\ttype: 'set',\n\t\t\t\t\t\tpropName: propName,\n\t\t\t\t\t\tvalue: value\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var i = 0, total = props.length; i < total; i++) {\n\t\t\tassignGettersSetters(props[i]);\n\t\t}\n\n\t\tvar methods = _mejs2.default.html5media.methods,\n\t\t    assignMethods = function assignMethods(methodName) {\n\t\t\tflash[methodName] = function () {\n\t\t\t\tif (isActive) {\n\t\t\t\t\tif (flash.flashApi !== null) {\n\t\t\t\t\t\tif (flash.flashApi['fire_' + methodName]) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tflash.flashApi['fire_' + methodName]();\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tflash.flashApiStack.push({\n\t\t\t\t\t\t\ttype: 'call',\n\t\t\t\t\t\t\tmethodName: methodName\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\tmethods.push('stop');\n\t\tfor (var _i = 0, _total = methods.length; _i < _total; _i++) {\n\t\t\tassignMethods(methods[_i]);\n\t\t}\n\n\t\tvar initEvents = ['rendererready'];\n\n\t\tfor (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {\n\t\t\tvar event = (0, _general.createEvent)(initEvents[_i2], flash);\n\t\t\tmediaElement.dispatchEvent(event);\n\t\t}\n\n\t\t_window2.default['__ready__' + flash.id] = function () {\n\n\t\t\tflash.flashReady = true;\n\t\t\tflash.flashApi = _document2.default.getElementById('__' + flash.id);\n\n\t\t\tif (flash.flashApiStack.length) {\n\t\t\t\tfor (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {\n\t\t\t\t\tvar stackItem = flash.flashApiStack[_i3];\n\n\t\t\t\t\tif (stackItem.type === 'set') {\n\t\t\t\t\t\tvar propName = stackItem.propName,\n\t\t\t\t\t\t    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\t\t\t\tflash['set' + capName](stackItem.value);\n\t\t\t\t\t} else if (stackItem.type === 'call') {\n\t\t\t\t\t\tflash[stackItem.methodName]();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t_window2.default['__event__' + flash.id] = function (eventName, message) {\n\t\t\tvar event = (0, _general.createEvent)(eventName, flash);\n\t\t\tif (message) {\n\t\t\t\ttry {\n\t\t\t\t\tevent.data = JSON.parse(message);\n\t\t\t\t\tevent.details.data = JSON.parse(message);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tevent.message = message;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tflash.mediaElement.dispatchEvent(event);\n\t\t};\n\n\t\tflash.flashWrapper = _document2.default.createElement('div');\n\n\t\tif (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) {\n\t\t\tflash.options.shimScriptAccess = 'sameDomain';\n\t\t}\n\n\t\tvar autoplay = mediaElement.originalNode.autoplay,\n\t\t    flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')],\n\t\t    isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video',\n\t\t    flashHeight = isVideo ? mediaElement.originalNode.height : 1,\n\t\t    flashWidth = isVideo ? mediaElement.originalNode.width : 1;\n\n\t\tif (mediaElement.originalNode.getAttribute('src')) {\n\t\t\tflashVars.push('src=' + mediaElement.originalNode.getAttribute('src'));\n\t\t}\n\n\t\tif (flash.options.enablePseudoStreaming === true) {\n\t\t\tflashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam);\n\t\t\tflashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType);\n\t\t}\n\n\t\tif (flash.options.streamDelimiter) {\n\t\t\tflashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter));\n\t\t}\n\n\t\tif (flash.options.proxyType) {\n\t\t\tflashVars.push('proxytype=' + flash.options.proxyType);\n\t\t}\n\n\t\tmediaElement.appendChild(flash.flashWrapper);\n\t\tmediaElement.originalNode.style.display = 'none';\n\n\t\tvar settings = [];\n\n\t\tif (_constants.IS_IE || _constants.IS_EDGE) {\n\t\t\tvar specialIEContainer = _document2.default.createElement('div');\n\t\t\tflash.flashWrapper.appendChild(specialIEContainer);\n\n\t\t\tif (_constants.IS_EDGE) {\n\t\t\t\tsettings = ['type=\"application/x-shockwave-flash\"', 'data=\"' + flash.options.pluginPath + flash.options.filename + '\"', 'id=\"__' + flash.id + '\"', 'width=\"' + flashWidth + '\"', 'height=\"' + flashHeight + '\\'\"'];\n\t\t\t} else {\n\t\t\t\tsettings = ['classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"', 'codebase=\"//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\"', 'id=\"__' + flash.id + '\"', 'width=\"' + flashWidth + '\"', 'height=\"' + flashHeight + '\"'];\n\t\t\t}\n\n\t\t\tif (!isVideo) {\n\t\t\t\tsettings.push('style=\"clip: rect(0 0 0 0); position: absolute;\"');\n\t\t\t}\n\n\t\t\tspecialIEContainer.outerHTML = '<object ' + settings.join(' ') + '>' + ('<param name=\"movie\" value=\"' + flash.options.pluginPath + flash.options.filename + '?x=' + new Date() + '\" />') + ('<param name=\"flashvars\" value=\"' + flashVars.join('&amp;') + '\" />') + '<param name=\"quality\" value=\"high\" />' + '<param name=\"bgcolor\" value=\"#000000\" />' + '<param name=\"wmode\" value=\"transparent\" />' + ('<param name=\"allowScriptAccess\" value=\"' + flash.options.shimScriptAccess + '\" />') + '<param name=\"allowFullScreen\" value=\"true\" />' + ('<div>' + _i18n2.default.t('mejs.install-flash') + '</div>') + '</object>';\n\t\t} else {\n\n\t\t\tsettings = ['id=\"__' + flash.id + '\"', 'name=\"__' + flash.id + '\"', 'play=\"true\"', 'loop=\"false\"', 'quality=\"high\"', 'bgcolor=\"#000000\"', 'wmode=\"transparent\"', 'allowScriptAccess=\"' + flash.options.shimScriptAccess + '\"', 'allowFullScreen=\"true\"', 'type=\"application/x-shockwave-flash\"', 'pluginspage=\"//www.macromedia.com/go/getflashplayer\"', 'src=\"' + flash.options.pluginPath + flash.options.filename + '\"', 'flashvars=\"' + flashVars.join('&') + '\"'];\n\n\t\t\tif (isVideo) {\n\t\t\t\tsettings.push('width=\"' + flashWidth + '\"');\n\t\t\t\tsettings.push('height=\"' + flashHeight + '\"');\n\t\t\t} else {\n\t\t\t\tsettings.push('style=\"position: fixed; left: -9999em; top: -9999em;\"');\n\t\t\t}\n\n\t\t\tflash.flashWrapper.innerHTML = '<embed ' + settings.join(' ') + '>';\n\t\t}\n\n\t\tflash.flashNode = flash.flashWrapper.lastChild;\n\n\t\tflash.hide = function () {\n\t\t\tisActive = false;\n\t\t\tif (isVideo) {\n\t\t\t\tflash.flashNode.style.display = 'none';\n\t\t\t}\n\t\t};\n\t\tflash.show = function () {\n\t\t\tisActive = true;\n\t\t\tif (isVideo) {\n\t\t\t\tflash.flashNode.style.display = '';\n\t\t\t}\n\t\t};\n\t\tflash.setSize = function (width, height) {\n\t\t\tflash.flashNode.style.width = width + 'px';\n\t\t\tflash.flashNode.style.height = height + 'px';\n\n\t\t\tif (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') {\n\t\t\t\tflash.flashApi.fire_setSize(width, height);\n\t\t\t}\n\t\t};\n\n\t\tflash.destroy = function () {\n\t\t\tflash.flashNode.remove();\n\t\t};\n\n\t\tif (mediaFiles && mediaFiles.length > 0) {\n\t\t\tfor (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {\n\t\t\t\tif (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {\n\t\t\t\t\tflash.setSrc(mediaFiles[_i4].src);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn flash;\n\t}\n};\n\nvar hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]);\n\nif (hasFlash) {\n\t_media.typeChecks.push(function (url) {\n\t\turl = url.toLowerCase();\n\n\t\tif (url.startsWith('rtmp')) {\n\t\t\tif (~url.indexOf('.mp3')) {\n\t\t\t\treturn 'audio/rtmp';\n\t\t\t} else {\n\t\t\t\treturn 'video/rtmp';\n\t\t\t}\n\t\t} else if (/\\.og(a|g)/i.test(url)) {\n\t\t\treturn 'audio/ogg';\n\t\t} else if (~url.indexOf('.m3u8')) {\n\t\t\treturn 'application/x-mpegURL';\n\t\t} else if (~url.indexOf('.mpd')) {\n\t\t\treturn 'application/dash+xml';\n\t\t} else if (~url.indexOf('.flv')) {\n\t\t\treturn 'video/flv';\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t});\n\n\tvar FlashMediaElementVideoRenderer = {\n\t\tname: 'flash_video',\n\t\toptions: {\n\t\t\tprefix: 'flash_video',\n\t\t\tfilename: 'mediaelement-flash-video.swf',\n\t\t\tenablePseudoStreaming: false,\n\n\t\t\tpseudoStreamingStartQueryParam: 'start',\n\n\t\t\tpseudoStreamingType: 'byte',\n\n\t\t\tproxyType: '',\n\n\t\t\tstreamDelimiter: ''\n\t\t},\n\n\t\tcanPlayType: function canPlayType(type) {\n\t\t\treturn ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase());\n\t\t},\n\n\t\tcreate: FlashMediaElementRenderer.create\n\n\t};\n\t_renderer.renderer.add(FlashMediaElementVideoRenderer);\n\n\tvar FlashMediaElementHlsVideoRenderer = {\n\t\tname: 'flash_hls',\n\t\toptions: {\n\t\t\tprefix: 'flash_hls',\n\t\t\tfilename: 'mediaelement-flash-video-hls.swf'\n\t\t},\n\n\t\tcanPlayType: function canPlayType(type) {\n\t\t\treturn ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase());\n\t\t},\n\n\t\tcreate: FlashMediaElementRenderer.create\n\t};\n\t_renderer.renderer.add(FlashMediaElementHlsVideoRenderer);\n\n\tvar FlashMediaElementMdashVideoRenderer = {\n\t\tname: 'flash_dash',\n\t\toptions: {\n\t\t\tprefix: 'flash_dash',\n\t\t\tfilename: 'mediaelement-flash-video-mdash.swf'\n\t\t},\n\n\t\tcanPlayType: function canPlayType(type) {\n\t\t\treturn ~['application/dash+xml'].indexOf(type.toLowerCase());\n\t\t},\n\n\t\tcreate: FlashMediaElementRenderer.create\n\t};\n\t_renderer.renderer.add(FlashMediaElementMdashVideoRenderer);\n\n\tvar FlashMediaElementAudioRenderer = {\n\t\tname: 'flash_audio',\n\t\toptions: {\n\t\t\tprefix: 'flash_audio',\n\t\t\tfilename: 'mediaelement-flash-audio.swf'\n\t\t},\n\n\t\tcanPlayType: function canPlayType(type) {\n\t\t\treturn ~['audio/mp3'].indexOf(type.toLowerCase());\n\t\t},\n\n\t\tcreate: FlashMediaElementRenderer.create\n\t};\n\t_renderer.renderer.add(FlashMediaElementAudioRenderer);\n\n\tvar FlashMediaElementAudioOggRenderer = {\n\t\tname: 'flash_audio_ogg',\n\t\toptions: {\n\t\t\tprefix: 'flash_audio_ogg',\n\t\t\tfilename: 'mediaelement-flash-audio-ogg.swf'\n\t\t},\n\n\t\tcanPlayType: function canPlayType(type) {\n\t\t\treturn ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase());\n\t\t},\n\n\t\tcreate: FlashMediaElementRenderer.create\n\t};\n\t_renderer.renderer.add(FlashMediaElementAudioOggRenderer);\n}\n\n},{\"2\":2,\"26\":26,\"28\":28,\"3\":3,\"30\":30,\"6\":6,\"8\":8,\"9\":9}],22:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _renderer = _dereq_(9);\n\nvar _general = _dereq_(28);\n\nvar _constants = _dereq_(26);\n\nvar _media = _dereq_(30);\n\nvar _dom = _dereq_(27);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar NativeFlv = {\n\n\tpromise: null,\n\n\tload: function load(settings) {\n\t\tif (typeof flvjs !== 'undefined') {\n\t\t\tNativeFlv.promise = new Promise(function (resolve) {\n\t\t\t\tresolve();\n\t\t\t}).then(function () {\n\t\t\t\tNativeFlv._createPlayer(settings);\n\t\t\t});\n\t\t} else {\n\t\t\tsettings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest';\n\n\t\t\tNativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path);\n\t\t\tNativeFlv.promise.then(function () {\n\t\t\t\tNativeFlv._createPlayer(settings);\n\t\t\t});\n\t\t}\n\n\t\treturn NativeFlv.promise;\n\t},\n\n\t_createPlayer: function _createPlayer(settings) {\n\t\tflvjs.LoggingControl.enableDebug = settings.options.debug;\n\t\tflvjs.LoggingControl.enableVerbose = settings.options.debug;\n\t\tvar player = flvjs.createPlayer(settings.options, settings.configs);\n\t\t_window2.default['__ready__' + settings.id](player);\n\t\treturn player;\n\t}\n};\n\nvar FlvNativeRenderer = {\n\tname: 'native_flv',\n\toptions: {\n\t\tprefix: 'native_flv',\n\t\tflv: {\n\t\t\tpath: 'https://cdn.jsdelivr.net/npm/flv.js@latest',\n\n\t\t\tcors: true,\n\t\t\tdebug: false\n\t\t}\n\t},\n\n\tcanPlayType: function canPlayType(type) {\n\t\treturn _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1;\n\t},\n\n\tcreate: function create(mediaElement, options, mediaFiles) {\n\n\t\tvar originalNode = mediaElement.originalNode,\n\t\t    id = mediaElement.id + '_' + options.prefix;\n\n\t\tvar node = null,\n\t\t    flvPlayer = null;\n\n\t\tnode = originalNode.cloneNode(true);\n\t\toptions = Object.assign(options, mediaElement.options);\n\n\t\tvar props = _mejs2.default.html5media.properties,\n\t\t    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {\n\t\t\treturn e !== 'error';\n\t\t}),\n\t\t    attachNativeEvents = function attachNativeEvents(e) {\n\t\t\tvar event = (0, _general.createEvent)(e.type, mediaElement);\n\t\t\tmediaElement.dispatchEvent(event);\n\t\t},\n\t\t    assignGettersSetters = function assignGettersSetters(propName) {\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\tnode['get' + capName] = function () {\n\t\t\t\treturn flvPlayer !== null ? node[propName] : null;\n\t\t\t};\n\n\t\t\tnode['set' + capName] = function (value) {\n\t\t\t\tif (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n\t\t\t\t\tif (propName === 'src') {\n\t\t\t\t\t\tnode[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;\n\t\t\t\t\t\tif (flvPlayer !== null) {\n\t\t\t\t\t\t\tvar _flvOptions = {};\n\t\t\t\t\t\t\t_flvOptions.type = 'flv';\n\t\t\t\t\t\t\t_flvOptions.url = value;\n\t\t\t\t\t\t\t_flvOptions.cors = options.flv.cors;\n\t\t\t\t\t\t\t_flvOptions.debug = options.flv.debug;\n\t\t\t\t\t\t\t_flvOptions.path = options.flv.path;\n\t\t\t\t\t\t\tvar _flvConfigs = options.flv.configs;\n\n\t\t\t\t\t\t\tflvPlayer.destroy();\n\t\t\t\t\t\t\tfor (var i = 0, total = events.length; i < total; i++) {\n\t\t\t\t\t\t\t\tnode.removeEventListener(events[i], attachNativeEvents);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tflvPlayer = NativeFlv._createPlayer({\n\t\t\t\t\t\t\t\toptions: _flvOptions,\n\t\t\t\t\t\t\t\tconfigs: _flvConfigs,\n\t\t\t\t\t\t\t\tid: id\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tflvPlayer.attachMediaElement(node);\n\t\t\t\t\t\t\tflvPlayer.load();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode[propName] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var i = 0, total = props.length; i < total; i++) {\n\t\t\tassignGettersSetters(props[i]);\n\t\t}\n\n\t\t_window2.default['__ready__' + id] = function (_flvPlayer) {\n\t\t\tmediaElement.flvPlayer = flvPlayer = _flvPlayer;\n\n\t\t\tvar flvEvents = flvjs.Events,\n\t\t\t    assignEvents = function assignEvents(eventName) {\n\t\t\t\tif (eventName === 'loadedmetadata') {\n\t\t\t\t\tflvPlayer.unload();\n\t\t\t\t\tflvPlayer.detachMediaElement();\n\t\t\t\t\tflvPlayer.attachMediaElement(node);\n\t\t\t\t\tflvPlayer.load();\n\t\t\t\t}\n\n\t\t\t\tnode.addEventListener(eventName, attachNativeEvents);\n\t\t\t};\n\n\t\t\tfor (var _i = 0, _total = events.length; _i < _total; _i++) {\n\t\t\t\tassignEvents(events[_i]);\n\t\t\t}\n\n\t\t\tvar assignFlvEvents = function assignFlvEvents(name, data) {\n\t\t\t\tif (name === 'error') {\n\t\t\t\t\tvar message = data[0] + ': ' + data[1] + ' ' + data[2].msg;\n\t\t\t\t\tmediaElement.generateError(message, node.src);\n\t\t\t\t} else {\n\t\t\t\t\tvar _event = (0, _general.createEvent)(name, mediaElement);\n\t\t\t\t\t_event.data = data;\n\t\t\t\t\tmediaElement.dispatchEvent(_event);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar _loop = function _loop(eventType) {\n\t\t\t\tif (flvEvents.hasOwnProperty(eventType)) {\n\t\t\t\t\tflvPlayer.on(flvEvents[eventType], function () {\n\t\t\t\t\t\tfor (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t\t\t\t\t\t\targs[_key] = arguments[_key];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn assignFlvEvents(flvEvents[eventType], args);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfor (var eventType in flvEvents) {\n\t\t\t\t_loop(eventType);\n\t\t\t}\n\t\t};\n\n\t\tif (mediaFiles && mediaFiles.length > 0) {\n\t\t\tfor (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {\n\t\t\t\tif (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) {\n\t\t\t\t\tnode.setAttribute('src', mediaFiles[_i2].src);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tnode.setAttribute('id', id);\n\n\t\toriginalNode.parentNode.insertBefore(node, originalNode);\n\t\toriginalNode.autoplay = false;\n\t\toriginalNode.style.display = 'none';\n\n\t\tvar flvOptions = {};\n\t\tflvOptions.type = 'flv';\n\t\tflvOptions.url = node.src;\n\t\tflvOptions.cors = options.flv.cors;\n\t\tflvOptions.debug = options.flv.debug;\n\t\tflvOptions.path = options.flv.path;\n\t\tvar flvConfigs = options.flv.configs;\n\n\t\tnode.setSize = function (width, height) {\n\t\t\tnode.style.width = width + 'px';\n\t\t\tnode.style.height = height + 'px';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.hide = function () {\n\t\t\tif (flvPlayer !== null) {\n\t\t\t\tflvPlayer.pause();\n\t\t\t}\n\t\t\tnode.style.display = 'none';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.show = function () {\n\t\t\tnode.style.display = '';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.destroy = function () {\n\t\t\tif (flvPlayer !== null) {\n\t\t\t\tflvPlayer.destroy();\n\t\t\t}\n\t\t};\n\n\t\tvar event = (0, _general.createEvent)('rendererready', node);\n\t\tmediaElement.dispatchEvent(event);\n\n\t\tmediaElement.promises.push(NativeFlv.load({\n\t\t\toptions: flvOptions,\n\t\t\tconfigs: flvConfigs,\n\t\t\tid: id\n\t\t}));\n\n\t\treturn node;\n\t}\n};\n\n_media.typeChecks.push(function (url) {\n\treturn ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null;\n});\n\n_renderer.renderer.add(FlvNativeRenderer);\n\n},{\"26\":26,\"27\":27,\"28\":28,\"3\":3,\"30\":30,\"8\":8,\"9\":9}],23:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _renderer = _dereq_(9);\n\nvar _general = _dereq_(28);\n\nvar _constants = _dereq_(26);\n\nvar _media = _dereq_(30);\n\nvar _dom = _dereq_(27);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar NativeHls = {\n\n\tpromise: null,\n\n\tload: function load(settings) {\n\t\tif (typeof Hls !== 'undefined') {\n\t\t\tNativeHls.promise = new Promise(function (resolve) {\n\t\t\t\tresolve();\n\t\t\t}).then(function () {\n\t\t\t\tNativeHls._createPlayer(settings);\n\t\t\t});\n\t\t} else {\n\t\t\tsettings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest';\n\n\t\t\tNativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path);\n\t\t\tNativeHls.promise.then(function () {\n\t\t\t\tNativeHls._createPlayer(settings);\n\t\t\t});\n\t\t}\n\n\t\treturn NativeHls.promise;\n\t},\n\n\t_createPlayer: function _createPlayer(settings) {\n\t\tvar player = new Hls(settings.options);\n\t\t_window2.default['__ready__' + settings.id](player);\n\t\treturn player;\n\t}\n};\n\nvar HlsNativeRenderer = {\n\tname: 'native_hls',\n\toptions: {\n\t\tprefix: 'native_hls',\n\t\thls: {\n\t\t\tpath: 'https://cdn.jsdelivr.net/npm/hls.js@latest',\n\n\t\t\tautoStartLoad: false,\n\t\t\tdebug: false\n\t\t}\n\t},\n\n\tcanPlayType: function canPlayType(type) {\n\t\treturn _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1;\n\t},\n\n\tcreate: function create(mediaElement, options, mediaFiles) {\n\n\t\tvar originalNode = mediaElement.originalNode,\n\t\t    id = mediaElement.id + '_' + options.prefix,\n\t\t    preload = originalNode.getAttribute('preload'),\n\t\t    autoplay = originalNode.autoplay;\n\n\t\tvar hlsPlayer = null,\n\t\t    node = null,\n\t\t    index = 0,\n\t\t    total = mediaFiles.length;\n\n\t\tnode = originalNode.cloneNode(true);\n\t\toptions = Object.assign(options, mediaElement.options);\n\t\toptions.hls.autoStartLoad = preload && preload !== 'none' || autoplay;\n\n\t\tvar props = _mejs2.default.html5media.properties,\n\t\t    events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {\n\t\t\treturn e !== 'error';\n\t\t}),\n\t\t    attachNativeEvents = function attachNativeEvents(e) {\n\t\t\tvar event = (0, _general.createEvent)(e.type, mediaElement);\n\t\t\tmediaElement.dispatchEvent(event);\n\t\t},\n\t\t    assignGettersSetters = function assignGettersSetters(propName) {\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\tnode['get' + capName] = function () {\n\t\t\t\treturn hlsPlayer !== null ? node[propName] : null;\n\t\t\t};\n\n\t\t\tnode['set' + capName] = function (value) {\n\t\t\t\tif (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n\t\t\t\t\tif (propName === 'src') {\n\t\t\t\t\t\tnode[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;\n\t\t\t\t\t\tif (hlsPlayer !== null) {\n\t\t\t\t\t\t\thlsPlayer.destroy();\n\t\t\t\t\t\t\tfor (var i = 0, _total = events.length; i < _total; i++) {\n\t\t\t\t\t\t\t\tnode.removeEventListener(events[i], attachNativeEvents);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thlsPlayer = NativeHls._createPlayer({\n\t\t\t\t\t\t\t\toptions: options.hls,\n\t\t\t\t\t\t\t\tid: id\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\thlsPlayer.loadSource(value);\n\t\t\t\t\t\t\thlsPlayer.attachMedia(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode[propName] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var i = 0, _total2 = props.length; i < _total2; i++) {\n\t\t\tassignGettersSetters(props[i]);\n\t\t}\n\n\t\t_window2.default['__ready__' + id] = function (_hlsPlayer) {\n\t\t\tmediaElement.hlsPlayer = hlsPlayer = _hlsPlayer;\n\t\t\tvar hlsEvents = Hls.Events,\n\t\t\t    assignEvents = function assignEvents(eventName) {\n\t\t\t\tif (eventName === 'loadedmetadata') {\n\t\t\t\t\tvar url = mediaElement.originalNode.src;\n\t\t\t\t\thlsPlayer.detachMedia();\n\t\t\t\t\thlsPlayer.loadSource(url);\n\t\t\t\t\thlsPlayer.attachMedia(node);\n\t\t\t\t}\n\n\t\t\t\tnode.addEventListener(eventName, attachNativeEvents);\n\t\t\t};\n\n\t\t\tfor (var _i = 0, _total3 = events.length; _i < _total3; _i++) {\n\t\t\t\tassignEvents(events[_i]);\n\t\t\t}\n\n\t\t\tvar recoverDecodingErrorDate = void 0,\n\t\t\t    recoverSwapAudioCodecDate = void 0;\n\t\t\tvar assignHlsEvents = function assignHlsEvents(name, data) {\n\t\t\t\tif (name === 'hlsError') {\n\t\t\t\t\tconsole.warn(data);\n\t\t\t\t\tdata = data[1];\n\n\t\t\t\t\tif (data.fatal) {\n\t\t\t\t\t\tswitch (data.type) {\n\t\t\t\t\t\t\tcase 'mediaError':\n\t\t\t\t\t\t\t\tvar now = new Date().getTime();\n\t\t\t\t\t\t\t\tif (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {\n\t\t\t\t\t\t\t\t\trecoverDecodingErrorDate = new Date().getTime();\n\t\t\t\t\t\t\t\t\thlsPlayer.recoverMediaError();\n\t\t\t\t\t\t\t\t} else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) {\n\t\t\t\t\t\t\t\t\trecoverSwapAudioCodecDate = new Date().getTime();\n\t\t\t\t\t\t\t\t\tconsole.warn('Attempting to swap Audio Codec and recover from media error');\n\t\t\t\t\t\t\t\t\thlsPlayer.swapAudioCodec();\n\t\t\t\t\t\t\t\t\thlsPlayer.recoverMediaError();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tvar message = 'Cannot recover, last media error recovery failed';\n\t\t\t\t\t\t\t\t\tmediaElement.generateError(message, node.src);\n\t\t\t\t\t\t\t\t\tconsole.error(message);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'networkError':\n\t\t\t\t\t\t\t\tif (data.details === 'manifestLoadError') {\n\t\t\t\t\t\t\t\t\tif (index < total && mediaFiles[index + 1] !== undefined) {\n\t\t\t\t\t\t\t\t\t\tnode.setSrc(mediaFiles[index++].src);\n\t\t\t\t\t\t\t\t\t\tnode.load();\n\t\t\t\t\t\t\t\t\t\tnode.play();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tvar _message = 'Network error';\n\t\t\t\t\t\t\t\t\t\tmediaElement.generateError(_message, mediaFiles);\n\t\t\t\t\t\t\t\t\t\tconsole.error(_message);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tvar _message2 = 'Network error';\n\t\t\t\t\t\t\t\t\tmediaElement.generateError(_message2, mediaFiles);\n\t\t\t\t\t\t\t\t\tconsole.error(_message2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\thlsPlayer.destroy();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar event = (0, _general.createEvent)(name, mediaElement);\n\t\t\t\tevent.data = data;\n\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t};\n\n\t\t\tvar _loop = function _loop(eventType) {\n\t\t\t\tif (hlsEvents.hasOwnProperty(eventType)) {\n\t\t\t\t\thlsPlayer.on(hlsEvents[eventType], function () {\n\t\t\t\t\t\tfor (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t\t\t\t\t\t\targs[_key] = arguments[_key];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn assignHlsEvents(hlsEvents[eventType], args);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfor (var eventType in hlsEvents) {\n\t\t\t\t_loop(eventType);\n\t\t\t}\n\t\t};\n\n\t\tif (total > 0) {\n\t\t\tfor (; index < total; index++) {\n\t\t\t\tif (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {\n\t\t\t\t\tnode.setAttribute('src', mediaFiles[index].src);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (preload !== 'auto' && !autoplay) {\n\t\t\tnode.addEventListener('play', function () {\n\t\t\t\tif (hlsPlayer !== null) {\n\t\t\t\t\thlsPlayer.startLoad();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnode.addEventListener('pause', function () {\n\t\t\t\tif (hlsPlayer !== null) {\n\t\t\t\t\thlsPlayer.stopLoad();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tnode.setAttribute('id', id);\n\n\t\toriginalNode.parentNode.insertBefore(node, originalNode);\n\t\toriginalNode.autoplay = false;\n\t\toriginalNode.style.display = 'none';\n\n\t\tnode.setSize = function (width, height) {\n\t\t\tnode.style.width = width + 'px';\n\t\t\tnode.style.height = height + 'px';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.hide = function () {\n\t\t\tnode.pause();\n\t\t\tnode.style.display = 'none';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.show = function () {\n\t\t\tnode.style.display = '';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.destroy = function () {\n\t\t\tif (hlsPlayer !== null) {\n\t\t\t\thlsPlayer.stopLoad();\n\t\t\t\thlsPlayer.destroy();\n\t\t\t}\n\t\t};\n\n\t\tvar event = (0, _general.createEvent)('rendererready', node);\n\t\tmediaElement.dispatchEvent(event);\n\n\t\tmediaElement.promises.push(NativeHls.load({\n\t\t\toptions: options.hls,\n\t\t\tid: id\n\t\t}));\n\n\t\treturn node;\n\t}\n};\n\n_media.typeChecks.push(function (url) {\n\treturn ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null;\n});\n\n_renderer.renderer.add(HlsNativeRenderer);\n\n},{\"26\":26,\"27\":27,\"28\":28,\"3\":3,\"30\":30,\"8\":8,\"9\":9}],24:[function(_dereq_,module,exports){\n'use strict';\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _renderer = _dereq_(9);\n\nvar _general = _dereq_(28);\n\nvar _constants = _dereq_(26);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HtmlMediaElement = {\n\tname: 'html5',\n\toptions: {\n\t\tprefix: 'html5'\n\t},\n\n\tcanPlayType: function canPlayType(type) {\n\n\t\tvar mediaElement = _document2.default.createElement('video');\n\n\t\tif (_constants.IS_ANDROID && /\\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) {\n\t\t\treturn 'yes';\n\t\t} else if (mediaElement.canPlayType) {\n\t\t\treturn mediaElement.canPlayType(type.toLowerCase()).replace(/no/, '');\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t},\n\n\tcreate: function create(mediaElement, options, mediaFiles) {\n\n\t\tvar id = mediaElement.id + '_' + options.prefix;\n\t\tvar isActive = false;\n\n\t\tvar node = null;\n\n\t\tif (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {\n\t\t\tnode = _document2.default.createElement('audio');\n\t\t\tmediaElement.appendChild(node);\n\t\t} else {\n\t\t\tnode = mediaElement.originalNode;\n\t\t}\n\n\t\tnode.setAttribute('id', id);\n\n\t\tvar props = _mejs2.default.html5media.properties,\n\t\t    assignGettersSetters = function assignGettersSetters(propName) {\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\tnode['get' + capName] = function () {\n\t\t\t\treturn node[propName];\n\t\t\t};\n\n\t\t\tnode['set' + capName] = function (value) {\n\t\t\t\tif (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n\t\t\t\t\tnode[propName] = value;\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var i = 0, _total = props.length; i < _total; i++) {\n\t\t\tassignGettersSetters(props[i]);\n\t\t}\n\n\t\tvar events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {\n\t\t\treturn e !== 'error';\n\t\t}),\n\t\t    assignEvents = function assignEvents(eventName) {\n\t\t\tnode.addEventListener(eventName, function (e) {\n\t\t\t\tif (isActive) {\n\t\t\t\t\tvar _event = (0, _general.createEvent)(e.type, e.target);\n\t\t\t\t\tmediaElement.dispatchEvent(_event);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tfor (var _i = 0, _total2 = events.length; _i < _total2; _i++) {\n\t\t\tassignEvents(events[_i]);\n\t\t}\n\n\t\tnode.setSize = function (width, height) {\n\t\t\tnode.style.width = width + 'px';\n\t\t\tnode.style.height = height + 'px';\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.hide = function () {\n\t\t\tisActive = false;\n\t\t\tnode.style.display = 'none';\n\n\t\t\treturn node;\n\t\t};\n\n\t\tnode.show = function () {\n\t\t\tisActive = true;\n\t\t\tnode.style.display = '';\n\n\t\t\treturn node;\n\t\t};\n\n\t\tvar index = 0,\n\t\t    total = mediaFiles.length;\n\t\tif (total > 0) {\n\t\t\tfor (; index < total; index++) {\n\t\t\t\tif (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {\n\t\t\t\t\tnode.setAttribute('src', mediaFiles[index].src);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tnode.addEventListener('error', function (e) {\n\t\t\tif (e && e.target && e.target.error && e.target.error.code === 4 && isActive) {\n\t\t\t\tif (index < total && mediaFiles[index + 1] !== undefined) {\n\t\t\t\t\tnode.src = mediaFiles[index++].src;\n\t\t\t\t\tnode.load();\n\t\t\t\t\tnode.play();\n\t\t\t\t} else {\n\t\t\t\t\tmediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tvar event = (0, _general.createEvent)('rendererready', node);\n\t\tmediaElement.dispatchEvent(event);\n\n\t\treturn node;\n\t}\n};\n\n_window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement;\n\n_renderer.renderer.add(HtmlMediaElement);\n\n},{\"2\":2,\"26\":26,\"28\":28,\"3\":3,\"8\":8,\"9\":9}],25:[function(_dereq_,module,exports){\n'use strict';\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _renderer = _dereq_(9);\n\nvar _general = _dereq_(28);\n\nvar _media = _dereq_(30);\n\nvar _dom = _dereq_(27);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar YouTubeApi = {\n\tisIframeStarted: false,\n\n\tisIframeLoaded: false,\n\n\tiframeQueue: [],\n\n\tenqueueIframe: function enqueueIframe(settings) {\n\t\tYouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded;\n\n\t\tif (YouTubeApi.isLoaded) {\n\t\t\tYouTubeApi.createIframe(settings);\n\t\t} else {\n\t\t\tYouTubeApi.loadIframeApi();\n\t\t\tYouTubeApi.iframeQueue.push(settings);\n\t\t}\n\t},\n\n\tloadIframeApi: function loadIframeApi() {\n\t\tif (!YouTubeApi.isIframeStarted) {\n\t\t\t(0, _dom.loadScript)('https://www.youtube.com/player_api');\n\t\t\tYouTubeApi.isIframeStarted = true;\n\t\t}\n\t},\n\n\tiFrameReady: function iFrameReady() {\n\n\t\tYouTubeApi.isLoaded = true;\n\t\tYouTubeApi.isIframeLoaded = true;\n\n\t\twhile (YouTubeApi.iframeQueue.length > 0) {\n\t\t\tvar settings = YouTubeApi.iframeQueue.pop();\n\t\t\tYouTubeApi.createIframe(settings);\n\t\t}\n\t},\n\n\tcreateIframe: function createIframe(settings) {\n\t\treturn new YT.Player(settings.containerId, settings);\n\t},\n\n\tgetYouTubeId: function getYouTubeId(url) {\n\n\t\tvar youTubeId = '';\n\n\t\tif (url.indexOf('?') > 0) {\n\t\t\tyouTubeId = YouTubeApi.getYouTubeIdFromParam(url);\n\n\t\t\tif (youTubeId === '') {\n\t\t\t\tyouTubeId = YouTubeApi.getYouTubeIdFromUrl(url);\n\t\t\t}\n\t\t} else {\n\t\t\tyouTubeId = YouTubeApi.getYouTubeIdFromUrl(url);\n\t\t}\n\n\t\tvar id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1);\n\t\tyouTubeId = id.split('?');\n\t\treturn youTubeId[0];\n\t},\n\n\tgetYouTubeIdFromParam: function getYouTubeIdFromParam(url) {\n\n\t\tif (url === undefined || url === null || !url.trim().length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar parts = url.split('?'),\n\t\t    parameters = parts[1].split('&');\n\n\t\tvar youTubeId = '';\n\n\t\tfor (var i = 0, total = parameters.length; i < total; i++) {\n\t\t\tvar paramParts = parameters[i].split('=');\n\t\t\tif (paramParts[0] === 'v') {\n\t\t\t\tyouTubeId = paramParts[1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn youTubeId;\n\t},\n\n\tgetYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {\n\n\t\tif (url === undefined || url === null || !url.trim().length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar parts = url.split('?');\n\t\turl = parts[0];\n\t\treturn url.substring(url.lastIndexOf('/') + 1);\n\t},\n\n\tgetYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {\n\t\tif (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) {\n\t\t\treturn url;\n\t\t}\n\n\t\tvar parts = url.split('/');\n\t\tparts[2] = parts[2].replace('.com', '-nocookie.com');\n\t\treturn parts.join('/');\n\t}\n};\n\nvar YouTubeIframeRenderer = {\n\tname: 'youtube_iframe',\n\n\toptions: {\n\t\tprefix: 'youtube_iframe',\n\n\t\tyoutube: {\n\t\t\tautoplay: 0,\n\t\t\tcontrols: 0,\n\t\t\tdisablekb: 1,\n\t\t\tend: 0,\n\t\t\tloop: 0,\n\t\t\tmodestbranding: 0,\n\t\t\tplaysinline: 0,\n\t\t\trel: 0,\n\t\t\tshowinfo: 0,\n\t\t\tstart: 0,\n\t\t\tiv_load_policy: 3,\n\n\t\t\tnocookie: false,\n\n\t\t\timageQuality: null\n\t\t}\n\t},\n\n\tcanPlayType: function canPlayType(type) {\n\t\treturn ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase());\n\t},\n\n\tcreate: function create(mediaElement, options, mediaFiles) {\n\n\t\tvar youtube = {},\n\t\t    apiStack = [],\n\t\t    readyState = 4;\n\n\t\tvar youTubeApi = null,\n\t\t    paused = true,\n\t\t    ended = false,\n\t\t    youTubeIframe = null,\n\t\t    volume = 1;\n\n\t\tyoutube.options = options;\n\t\tyoutube.id = mediaElement.id + '_' + options.prefix;\n\t\tyoutube.mediaElement = mediaElement;\n\n\t\tvar props = _mejs2.default.html5media.properties,\n\t\t    assignGettersSetters = function assignGettersSetters(propName) {\n\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\tyoutube['get' + capName] = function () {\n\t\t\t\tif (youTubeApi !== null) {\n\t\t\t\t\tvar value = null;\n\n\t\t\t\t\tswitch (propName) {\n\t\t\t\t\t\tcase 'currentTime':\n\t\t\t\t\t\t\treturn youTubeApi.getCurrentTime();\n\t\t\t\t\t\tcase 'duration':\n\t\t\t\t\t\t\treturn youTubeApi.getDuration();\n\t\t\t\t\t\tcase 'volume':\n\t\t\t\t\t\t\tvolume = youTubeApi.getVolume() / 100;\n\t\t\t\t\t\t\treturn volume;\n\t\t\t\t\t\tcase 'playbackRate':\n\t\t\t\t\t\t\treturn youTubeApi.getPlaybackRate();\n\t\t\t\t\t\tcase 'paused':\n\t\t\t\t\t\t\treturn paused;\n\t\t\t\t\t\tcase 'ended':\n\t\t\t\t\t\t\treturn ended;\n\t\t\t\t\t\tcase 'muted':\n\t\t\t\t\t\t\treturn youTubeApi.isMuted();\n\t\t\t\t\t\tcase 'buffered':\n\t\t\t\t\t\t\tvar percentLoaded = youTubeApi.getVideoLoadedFraction(),\n\t\t\t\t\t\t\t    duration = youTubeApi.getDuration();\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstart: function start() {\n\t\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tend: function end() {\n\t\t\t\t\t\t\t\t\treturn percentLoaded * duration;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tlength: 1\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tcase 'src':\n\t\t\t\t\t\t\treturn youTubeApi.getVideoUrl();\n\t\t\t\t\t\tcase 'readyState':\n\t\t\t\t\t\t\treturn readyState;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn value;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tyoutube['set' + capName] = function (value) {\n\t\t\t\tif (youTubeApi !== null) {\n\t\t\t\t\tswitch (propName) {\n\t\t\t\t\t\tcase 'src':\n\t\t\t\t\t\t\tvar url = typeof value === 'string' ? value : value[0].src,\n\t\t\t\t\t\t\t    _videoId = YouTubeApi.getYouTubeId(url);\n\n\t\t\t\t\t\t\tif (mediaElement.originalNode.autoplay) {\n\t\t\t\t\t\t\t\tyouTubeApi.loadVideoById(_videoId);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tyouTubeApi.cueVideoById(_videoId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'currentTime':\n\t\t\t\t\t\t\tyouTubeApi.seekTo(value);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'muted':\n\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\tyouTubeApi.mute();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tyouTubeApi.unMute();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tvar event = (0, _general.createEvent)('volumechange', youtube);\n\t\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\t}, 50);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'volume':\n\t\t\t\t\t\t\tvolume = value;\n\t\t\t\t\t\t\tyouTubeApi.setVolume(value * 100);\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tvar event = (0, _general.createEvent)('volumechange', youtube);\n\t\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\t}, 50);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'playbackRate':\n\t\t\t\t\t\t\tyouTubeApi.setPlaybackRate(value);\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tvar event = (0, _general.createEvent)('ratechange', youtube);\n\t\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\t}, 50);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'readyState':\n\t\t\t\t\t\t\tvar event = (0, _general.createEvent)('canplay', youtube);\n\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tapiStack.push({ type: 'set', propName: propName, value: value });\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var i = 0, total = props.length; i < total; i++) {\n\t\t\tassignGettersSetters(props[i]);\n\t\t}\n\n\t\tvar methods = _mejs2.default.html5media.methods,\n\t\t    assignMethods = function assignMethods(methodName) {\n\t\t\tyoutube[methodName] = function () {\n\t\t\t\tif (youTubeApi !== null) {\n\t\t\t\t\tswitch (methodName) {\n\t\t\t\t\t\tcase 'play':\n\t\t\t\t\t\t\tpaused = false;\n\t\t\t\t\t\t\treturn youTubeApi.playVideo();\n\t\t\t\t\t\tcase 'pause':\n\t\t\t\t\t\t\tpaused = true;\n\t\t\t\t\t\t\treturn youTubeApi.pauseVideo();\n\t\t\t\t\t\tcase 'load':\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tapiStack.push({ type: 'call', methodName: methodName });\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var _i = 0, _total = methods.length; _i < _total; _i++) {\n\t\t\tassignMethods(methods[_i]);\n\t\t}\n\n\t\tvar errorHandler = function errorHandler(error) {\n\t\t\tvar message = '';\n\t\t\tswitch (error.data) {\n\t\t\t\tcase 2:\n\t\t\t\t\tmessage = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tmessage = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 100:\n\t\t\t\t\tmessage = 'The video requested was not found. Either video has been removed or has been marked as private.';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 101:\n\t\t\t\tcase 105:\n\t\t\t\t\tmessage = 'The owner of the requested video does not allow it to be played in embedded players.';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tmessage = 'Unknown error.';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles);\n\t\t};\n\n\t\tvar youtubeContainer = _document2.default.createElement('div');\n\t\tyoutubeContainer.id = youtube.id;\n\n\t\tif (youtube.options.youtube.nocookie) {\n\t\t\tmediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src);\n\t\t}\n\n\t\tmediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode);\n\t\tmediaElement.originalNode.style.display = 'none';\n\n\t\tvar isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio',\n\t\t    height = isAudio ? '1' : mediaElement.originalNode.height,\n\t\t    width = isAudio ? '1' : mediaElement.originalNode.width,\n\t\t    videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),\n\t\t    youtubeSettings = {\n\t\t\tid: youtube.id,\n\t\t\tcontainerId: youtubeContainer.id,\n\t\t\tvideoId: videoId,\n\t\t\theight: height,\n\t\t\twidth: width,\n\t\t\thost: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined,\n\t\t\tplayerVars: Object.assign({\n\t\t\t\tcontrols: 0,\n\t\t\t\trel: 0,\n\t\t\t\tdisablekb: 1,\n\t\t\t\tshowinfo: 0,\n\t\t\t\tmodestbranding: 0,\n\t\t\t\thtml5: 1,\n\t\t\t\tiv_load_policy: 3\n\t\t\t}, youtube.options.youtube),\n\t\t\torigin: _window2.default.location.host,\n\t\t\tevents: {\n\t\t\t\tonReady: function onReady(e) {\n\t\t\t\t\tmediaElement.youTubeApi = youTubeApi = e.target;\n\t\t\t\t\tmediaElement.youTubeState = {\n\t\t\t\t\t\tpaused: true,\n\t\t\t\t\t\tended: false\n\t\t\t\t\t};\n\n\t\t\t\t\tif (apiStack.length) {\n\t\t\t\t\t\tfor (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {\n\n\t\t\t\t\t\t\tvar stackItem = apiStack[_i2];\n\n\t\t\t\t\t\t\tif (stackItem.type === 'set') {\n\t\t\t\t\t\t\t\tvar propName = stackItem.propName,\n\t\t\t\t\t\t\t\t    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\t\t\t\t\t\tyoutube['set' + capName](stackItem.value);\n\t\t\t\t\t\t\t} else if (stackItem.type === 'call') {\n\t\t\t\t\t\t\t\tyoutube[stackItem.methodName]();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tyouTubeIframe = youTubeApi.getIframe();\n\n\t\t\t\t\tif (mediaElement.originalNode.muted) {\n\t\t\t\t\t\tyouTubeApi.mute();\n\t\t\t\t\t}\n\n\t\t\t\t\tvar events = ['mouseover', 'mouseout'],\n\t\t\t\t\t    assignEvents = function assignEvents(e) {\n\t\t\t\t\t\tvar newEvent = (0, _general.createEvent)(e.type, youtube);\n\t\t\t\t\t\tmediaElement.dispatchEvent(newEvent);\n\t\t\t\t\t};\n\n\t\t\t\t\tfor (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {\n\t\t\t\t\t\tyouTubeIframe.addEventListener(events[_i3], assignEvents, false);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];\n\n\t\t\t\t\tfor (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {\n\t\t\t\t\t\tvar event = (0, _general.createEvent)(initEvents[_i4], youtube);\n\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonStateChange: function onStateChange(e) {\n\t\t\t\t\tvar events = [];\n\n\t\t\t\t\tswitch (e.data) {\n\t\t\t\t\t\tcase -1:\n\t\t\t\t\t\t\tevents = ['loadedmetadata'];\n\t\t\t\t\t\t\tpaused = true;\n\t\t\t\t\t\t\tended = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tevents = ['ended'];\n\t\t\t\t\t\t\tpaused = false;\n\t\t\t\t\t\t\tended = !youtube.options.youtube.loop;\n\t\t\t\t\t\t\tif (!youtube.options.youtube.loop) {\n\t\t\t\t\t\t\t\tyoutube.stopInterval();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tevents = ['play', 'playing'];\n\t\t\t\t\t\t\tpaused = false;\n\t\t\t\t\t\t\tended = false;\n\t\t\t\t\t\t\tyoutube.startInterval();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tevents = ['pause'];\n\t\t\t\t\t\t\tpaused = true;\n\t\t\t\t\t\t\tended = false;\n\t\t\t\t\t\t\tyoutube.stopInterval();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tevents = ['progress'];\n\t\t\t\t\t\t\tended = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\tevents = ['loadeddata', 'loadedmetadata', 'canplay'];\n\t\t\t\t\t\t\tpaused = true;\n\t\t\t\t\t\t\tended = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {\n\t\t\t\t\t\tvar event = (0, _general.createEvent)(events[_i5], youtube);\n\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonError: function onError(e) {\n\t\t\t\t\treturn errorHandler(e);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) {\n\t\t\tyoutubeSettings.playerVars.playsinline = 1;\n\t\t}\n\n\t\tif (mediaElement.originalNode.controls) {\n\t\t\tyoutubeSettings.playerVars.controls = 1;\n\t\t}\n\t\tif (mediaElement.originalNode.autoplay) {\n\t\t\tyoutubeSettings.playerVars.autoplay = 1;\n\t\t}\n\t\tif (mediaElement.originalNode.loop) {\n\t\t\tyoutubeSettings.playerVars.loop = 1;\n\t\t}\n\n\t\tif ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) {\n\t\t\tyoutubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);\n\t\t}\n\n\t\tYouTubeApi.enqueueIframe(youtubeSettings);\n\n\t\tyoutube.onEvent = function (eventName, player, _youTubeState) {\n\t\t\tif (_youTubeState !== null && _youTubeState !== undefined) {\n\t\t\t\tmediaElement.youTubeState = _youTubeState;\n\t\t\t}\n\t\t};\n\n\t\tyoutube.setSize = function (width, height) {\n\t\t\tif (youTubeApi !== null) {\n\t\t\t\tyouTubeApi.setSize(width, height);\n\t\t\t}\n\t\t};\n\t\tyoutube.hide = function () {\n\t\t\tyoutube.stopInterval();\n\t\t\tyoutube.pause();\n\t\t\tif (youTubeIframe) {\n\t\t\t\tyouTubeIframe.style.display = 'none';\n\t\t\t}\n\t\t};\n\t\tyoutube.show = function () {\n\t\t\tif (youTubeIframe) {\n\t\t\t\tyouTubeIframe.style.display = '';\n\t\t\t}\n\t\t};\n\t\tyoutube.destroy = function () {\n\t\t\tyouTubeApi.destroy();\n\t\t};\n\t\tyoutube.interval = null;\n\n\t\tyoutube.startInterval = function () {\n\t\t\tyoutube.interval = setInterval(function () {\n\t\t\t\tvar event = (0, _general.createEvent)('timeupdate', youtube);\n\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t}, 250);\n\t\t};\n\t\tyoutube.stopInterval = function () {\n\t\t\tif (youtube.interval) {\n\t\t\t\tclearInterval(youtube.interval);\n\t\t\t}\n\t\t};\n\t\tyoutube.getPosterUrl = function () {\n\t\t\tvar quality = options.youtube.imageQuality,\n\t\t\t    resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'],\n\t\t\t    id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);\n\t\t\treturn quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : '';\n\t\t};\n\n\t\treturn youtube;\n\t}\n};\n\n_window2.default.onYouTubePlayerAPIReady = function () {\n\tYouTubeApi.iFrameReady();\n};\n\n_media.typeChecks.push(function (url) {\n\treturn (/\\/\\/(www\\.youtube|youtu\\.?be)/i.test(url) ? 'video/x-youtube' : null\n\t);\n});\n\n_renderer.renderer.add(YouTubeIframeRenderer);\n\n},{\"2\":2,\"27\":27,\"28\":28,\"3\":3,\"30\":30,\"8\":8,\"9\":9}],26:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined;\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar NAV = exports.NAV = _window2.default.navigator;\nvar UA = exports.UA = NAV.userAgent.toLowerCase();\nvar IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream;\nvar IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream;\nvar IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream;\nvar IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream;\nvar IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA);\nvar IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName);\nvar IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default);\nvar IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA);\nvar IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);\nvar IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;\nvar IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\\/\\d+\\.\\d+\\s\\(linux;\\su;/i.test(UA);\nvar HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;\nvar SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {\n\tvar element = _document2.default.createElement('x'),\n\t    documentElement = _document2.default.documentElement,\n\t    getComputedStyle = _window2.default.getComputedStyle;\n\n\tif (!('pointerEvents' in element.style)) {\n\t\treturn false;\n\t}\n\n\telement.style.pointerEvents = 'auto';\n\telement.style.pointerEvents = 'x';\n\tdocumentElement.appendChild(element);\n\tvar supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto';\n\telement.remove();\n\treturn !!supports;\n}();\n\nvar SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {\n\tvar supportsPassive = false;\n\ttry {\n\t\tvar opts = Object.defineProperty({}, 'passive', {\n\t\t\tget: function get() {\n\t\t\t\tsupportsPassive = true;\n\t\t\t}\n\t\t});\n\t\t_window2.default.addEventListener('test', null, opts);\n\t} catch (e) {}\n\n\treturn supportsPassive;\n}();\n\nvar html5Elements = ['source', 'track', 'audio', 'video'];\nvar video = void 0;\n\nfor (var i = 0, total = html5Elements.length; i < total; i++) {\n\tvideo = _document2.default.createElement(html5Elements[i]);\n}\n\nvar SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_IE && /edge/i.test(UA);\n\nvar hasiOSFullScreen = video.webkitEnterFullscreen !== undefined;\n\nvar hasNativeFullscreen = video.requestFullscreen !== undefined;\n\nif (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {\n\thasNativeFullscreen = false;\n\thasiOSFullScreen = false;\n}\n\nvar hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined;\nvar hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined;\nvar hasMsNativeFullScreen = video.msRequestFullscreen !== undefined;\nvar hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen;\nvar nativeFullScreenEnabled = hasTrueNativeFullScreen;\nvar fullScreenEventName = '';\nvar isFullScreen = void 0,\n    requestFullScreen = void 0,\n    cancelFullScreen = void 0;\n\nif (hasMozNativeFullScreen) {\n\tnativeFullScreenEnabled = _document2.default.mozFullScreenEnabled;\n} else if (hasMsNativeFullScreen) {\n\tnativeFullScreenEnabled = _document2.default.msFullscreenEnabled;\n}\n\nif (IS_CHROME) {\n\thasiOSFullScreen = false;\n}\n\nif (hasTrueNativeFullScreen) {\n\tif (hasWebkitNativeFullScreen) {\n\t\tfullScreenEventName = 'webkitfullscreenchange';\n\t} else if (hasMozNativeFullScreen) {\n\t\tfullScreenEventName = 'fullscreenchange';\n\t} else if (hasMsNativeFullScreen) {\n\t\tfullScreenEventName = 'MSFullscreenChange';\n\t}\n\n\texports.isFullScreen = isFullScreen = function isFullScreen() {\n\t\tif (hasMozNativeFullScreen) {\n\t\t\treturn _document2.default.mozFullScreen;\n\t\t} else if (hasWebkitNativeFullScreen) {\n\t\t\treturn _document2.default.webkitIsFullScreen;\n\t\t} else if (hasMsNativeFullScreen) {\n\t\t\treturn _document2.default.msFullscreenElement !== null;\n\t\t}\n\t};\n\n\texports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {\n\t\tif (hasWebkitNativeFullScreen) {\n\t\t\tel.webkitRequestFullScreen();\n\t\t} else if (hasMozNativeFullScreen) {\n\t\t\tel.mozRequestFullScreen();\n\t\t} else if (hasMsNativeFullScreen) {\n\t\t\tel.msRequestFullscreen();\n\t\t}\n\t};\n\n\texports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {\n\t\tif (hasWebkitNativeFullScreen) {\n\t\t\t_document2.default.webkitCancelFullScreen();\n\t\t} else if (hasMozNativeFullScreen) {\n\t\t\t_document2.default.mozCancelFullScreen();\n\t\t} else if (hasMsNativeFullScreen) {\n\t\t\t_document2.default.msExitFullscreen();\n\t\t}\n\t};\n}\n\nvar HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;\nvar HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;\nvar HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;\nvar HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;\nvar HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen;\nvar HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;\nvar HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;\nvar FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName;\nexports.isFullScreen = isFullScreen;\nexports.requestFullScreen = requestFullScreen;\nexports.cancelFullScreen = cancelFullScreen;\n\n\n_mejs2.default.Features = _mejs2.default.Features || {};\n_mejs2.default.Features.isiPad = IS_IPAD;\n_mejs2.default.Features.isiPod = IS_IPOD;\n_mejs2.default.Features.isiPhone = IS_IPHONE;\n_mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad;\n_mejs2.default.Features.isAndroid = IS_ANDROID;\n_mejs2.default.Features.isIE = IS_IE;\n_mejs2.default.Features.isEdge = IS_EDGE;\n_mejs2.default.Features.isChrome = IS_CHROME;\n_mejs2.default.Features.isFirefox = IS_FIREFOX;\n_mejs2.default.Features.isSafari = IS_SAFARI;\n_mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID;\n_mejs2.default.Features.hasMSE = HAS_MSE;\n_mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;\n_mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;\n_mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT;\n_mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;\n_mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;\n_mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;\n_mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;\n_mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;\n_mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;\n_mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;\n_mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;\n_mejs2.default.Features.isFullScreen = isFullScreen;\n_mejs2.default.Features.requestFullScreen = requestFullScreen;\n_mejs2.default.Features.cancelFullScreen = cancelFullScreen;\n\n},{\"2\":2,\"3\":3,\"8\":8}],27:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.removeClass = exports.addClass = exports.hasClass = undefined;\nexports.loadScript = loadScript;\nexports.offset = offset;\nexports.toggleClass = toggleClass;\nexports.fadeOut = fadeOut;\nexports.fadeIn = fadeIn;\nexports.siblings = siblings;\nexports.visible = visible;\nexports.ajax = ajax;\n\nvar _window = _dereq_(3);\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction loadScript(url) {\n\treturn new Promise(function (resolve, reject) {\n\t\tvar script = _document2.default.createElement('script');\n\t\tscript.src = url;\n\t\tscript.async = true;\n\t\tscript.onload = function () {\n\t\t\tscript.remove();\n\t\t\tresolve();\n\t\t};\n\t\tscript.onerror = function () {\n\t\t\tscript.remove();\n\t\t\treject();\n\t\t};\n\t\t_document2.default.head.appendChild(script);\n\t});\n}\n\nfunction offset(el) {\n\tvar rect = el.getBoundingClientRect(),\n\t    scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,\n\t    scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop;\n\treturn { top: rect.top + scrollTop, left: rect.left + scrollLeft };\n}\n\nvar hasClassMethod = void 0,\n    addClassMethod = void 0,\n    removeClassMethod = void 0;\n\nif ('classList' in _document2.default.documentElement) {\n\thasClassMethod = function hasClassMethod(el, className) {\n\t\treturn el.classList !== undefined && el.classList.contains(className);\n\t};\n\taddClassMethod = function addClassMethod(el, className) {\n\t\treturn el.classList.add(className);\n\t};\n\tremoveClassMethod = function removeClassMethod(el, className) {\n\t\treturn el.classList.remove(className);\n\t};\n} else {\n\thasClassMethod = function hasClassMethod(el, className) {\n\t\treturn new RegExp('\\\\b' + className + '\\\\b').test(el.className);\n\t};\n\taddClassMethod = function addClassMethod(el, className) {\n\t\tif (!hasClass(el, className)) {\n\t\t\tel.className += ' ' + className;\n\t\t}\n\t};\n\tremoveClassMethod = function removeClassMethod(el, className) {\n\t\tel.className = el.className.replace(new RegExp('\\\\b' + className + '\\\\b', 'g'), '');\n\t};\n}\n\nvar hasClass = exports.hasClass = hasClassMethod;\nvar addClass = exports.addClass = addClassMethod;\nvar removeClass = exports.removeClass = removeClassMethod;\n\nfunction toggleClass(el, className) {\n\thasClass(el, className) ? removeClass(el, className) : addClass(el, className);\n}\n\nfunction fadeOut(el) {\n\tvar duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;\n\tvar callback = arguments[2];\n\n\tif (!el.style.opacity) {\n\t\tel.style.opacity = 1;\n\t}\n\n\tvar start = null;\n\t_window2.default.requestAnimationFrame(function animate(timestamp) {\n\t\tstart = start || timestamp;\n\t\tvar progress = timestamp - start;\n\t\tvar opacity = parseFloat(1 - progress / duration, 2);\n\t\tel.style.opacity = opacity < 0 ? 0 : opacity;\n\t\tif (progress > duration) {\n\t\t\tif (callback && typeof callback === 'function') {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t} else {\n\t\t\t_window2.default.requestAnimationFrame(animate);\n\t\t}\n\t});\n}\n\nfunction fadeIn(el) {\n\tvar duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;\n\tvar callback = arguments[2];\n\n\tif (!el.style.opacity) {\n\t\tel.style.opacity = 0;\n\t}\n\n\tvar start = null;\n\t_window2.default.requestAnimationFrame(function animate(timestamp) {\n\t\tstart = start || timestamp;\n\t\tvar progress = timestamp - start;\n\t\tvar opacity = parseFloat(progress / duration, 2);\n\t\tel.style.opacity = opacity > 1 ? 1 : opacity;\n\t\tif (progress > duration) {\n\t\t\tif (callback && typeof callback === 'function') {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t} else {\n\t\t\t_window2.default.requestAnimationFrame(animate);\n\t\t}\n\t});\n}\n\nfunction siblings(el, filter) {\n\tvar siblings = [];\n\tel = el.parentNode.firstChild;\n\tdo {\n\t\tif (!filter || filter(el)) {\n\t\t\tsiblings.push(el);\n\t\t}\n\t} while (el = el.nextSibling);\n\treturn siblings;\n}\n\nfunction visible(elem) {\n\tif (elem.getClientRects !== undefined && elem.getClientRects === 'function') {\n\t\treturn !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);\n\t}\n\treturn !!(elem.offsetWidth || elem.offsetHeight);\n}\n\nfunction ajax(url, dataType, success, error) {\n\tvar xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');\n\n\tvar type = 'application/x-www-form-urlencoded; charset=UTF-8',\n\t    completed = false,\n\t    accept = '*/'.concat('*');\n\n\tswitch (dataType) {\n\t\tcase 'text':\n\t\t\ttype = 'text/plain';\n\t\t\tbreak;\n\t\tcase 'json':\n\t\t\ttype = 'application/json, text/javascript';\n\t\t\tbreak;\n\t\tcase 'html':\n\t\t\ttype = 'text/html';\n\t\t\tbreak;\n\t\tcase 'xml':\n\t\t\ttype = 'application/xml, text/xml';\n\t\t\tbreak;\n\t}\n\n\tif (type !== 'application/x-www-form-urlencoded') {\n\t\taccept = type + ', */*; q=0.01';\n\t}\n\n\tif (xhr) {\n\t\txhr.open('GET', url, true);\n\t\txhr.setRequestHeader('Accept', accept);\n\t\txhr.onreadystatechange = function () {\n\t\t\tif (completed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (xhr.readyState === 4) {\n\t\t\t\tif (xhr.status === 200) {\n\t\t\t\t\tcompleted = true;\n\t\t\t\t\tvar data = void 0;\n\t\t\t\t\tswitch (dataType) {\n\t\t\t\t\t\tcase 'json':\n\t\t\t\t\t\t\tdata = JSON.parse(xhr.responseText);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'xml':\n\t\t\t\t\t\t\tdata = xhr.responseXML;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tdata = xhr.responseText;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tsuccess(data);\n\t\t\t\t} else if (typeof error === 'function') {\n\t\t\t\t\terror(xhr.status);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\txhr.send();\n\t}\n}\n\n_mejs2.default.Utils = _mejs2.default.Utils || {};\n_mejs2.default.Utils.offset = offset;\n_mejs2.default.Utils.hasClass = hasClass;\n_mejs2.default.Utils.addClass = addClass;\n_mejs2.default.Utils.removeClass = removeClass;\n_mejs2.default.Utils.toggleClass = toggleClass;\n_mejs2.default.Utils.fadeIn = fadeIn;\n_mejs2.default.Utils.fadeOut = fadeOut;\n_mejs2.default.Utils.siblings = siblings;\n_mejs2.default.Utils.visible = visible;\n_mejs2.default.Utils.ajax = ajax;\n_mejs2.default.Utils.loadScript = loadScript;\n\n},{\"2\":2,\"3\":3,\"8\":8}],28:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.escapeHTML = escapeHTML;\nexports.debounce = debounce;\nexports.isObjectEmpty = isObjectEmpty;\nexports.splitEvents = splitEvents;\nexports.createEvent = createEvent;\nexports.isNodeAfter = isNodeAfter;\nexports.isString = isString;\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction escapeHTML(input) {\n\n\tif (typeof input !== 'string') {\n\t\tthrow new Error('Argument passed must be a string');\n\t}\n\n\tvar map = {\n\t\t'&': '&amp;',\n\t\t'<': '&lt;',\n\t\t'>': '&gt;',\n\t\t'\"': '&quot;'\n\t};\n\n\treturn input.replace(/[&<>\"]/g, function (c) {\n\t\treturn map[c];\n\t});\n}\n\nfunction debounce(func, wait) {\n\tvar _this = this,\n\t    _arguments = arguments;\n\n\tvar immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\n\tif (typeof func !== 'function') {\n\t\tthrow new Error('First argument must be a function');\n\t}\n\n\tif (typeof wait !== 'number') {\n\t\tthrow new Error('Second argument must be a numeric value');\n\t}\n\n\tvar timeout = void 0;\n\treturn function () {\n\t\tvar context = _this,\n\t\t    args = _arguments;\n\t\tvar later = function later() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) {\n\t\t\t\tfunc.apply(context, args);\n\t\t\t}\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\n\t\tif (callNow) {\n\t\t\tfunc.apply(context, args);\n\t\t}\n\t};\n}\n\nfunction isObjectEmpty(instance) {\n\treturn Object.getOwnPropertyNames(instance).length <= 0;\n}\n\nfunction splitEvents(events, id) {\n\tvar rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\\b/;\n\n\tvar ret = { d: [], w: [] };\n\t(events || '').split(' ').forEach(function (v) {\n\t\tvar eventName = '' + v + (id ? '.' + id : '');\n\n\t\tif (eventName.startsWith('.')) {\n\t\t\tret.d.push(eventName);\n\t\t\tret.w.push(eventName);\n\t\t} else {\n\t\t\tret[rwindow.test(v) ? 'w' : 'd'].push(eventName);\n\t\t}\n\t});\n\n\tret.d = ret.d.join(' ');\n\tret.w = ret.w.join(' ');\n\treturn ret;\n}\n\nfunction createEvent(eventName, target) {\n\n\tif (typeof eventName !== 'string') {\n\t\tthrow new Error('Event name must be a string');\n\t}\n\n\tvar eventFrags = eventName.match(/([a-z]+\\.([a-z]+))/i),\n\t    detail = {\n\t\ttarget: target\n\t};\n\n\tif (eventFrags !== null) {\n\t\teventName = eventFrags[1];\n\t\tdetail.namespace = eventFrags[2];\n\t}\n\n\treturn new window.CustomEvent(eventName, {\n\t\tdetail: detail\n\t});\n}\n\nfunction isNodeAfter(sourceNode, targetNode) {\n\n\treturn !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);\n}\n\nfunction isString(value) {\n\treturn typeof value === 'string';\n}\n\n_mejs2.default.Utils = _mejs2.default.Utils || {};\n_mejs2.default.Utils.escapeHTML = escapeHTML;\n_mejs2.default.Utils.debounce = debounce;\n_mejs2.default.Utils.isObjectEmpty = isObjectEmpty;\n_mejs2.default.Utils.splitEvents = splitEvents;\n_mejs2.default.Utils.createEvent = createEvent;\n_mejs2.default.Utils.isNodeAfter = isNodeAfter;\n_mejs2.default.Utils.isString = isString;\n\n},{\"8\":8}],29:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.generateControlButton = generateControlButton;\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction generateControlButton(playerId, ariaLabel, title, iconSprite, icons, classPrefix) {\n\tvar buttonClass = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n\tvar ariaDescribedby = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : '';\n\tvar ariaPressed = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;\n\n\n\tif (typeof playerId !== 'string') {\n\t\tthrow new Error('`ariaControls` argument must be a string');\n\t}\n\tif (typeof ariaLabel !== 'string') {\n\t\tthrow new Error('`ariaLabel` argument must be a string');\n\t}\n\tif (typeof title !== 'string') {\n\t\tthrow new Error('`title` argument must be a string');\n\t}\n\tif (typeof iconSprite !== 'string') {\n\t\tthrow new Error('`iconSprite` argument must be a string');\n\t}\n\tif (typeof ariaDescribedby !== 'string') {\n\t\tthrow new Error('`ariaDescribedby` argument must be a string');\n\t}\n\tif (!Array.isArray(icons)) {\n\t\tthrow new Error('`icons` argument must be an array');\n\t}\n\tif (typeof classPrefix !== 'string') {\n\t\tthrow new Error('`classPrefix` argument must be a string');\n\t}\n\n\tvar className = buttonClass ? 'class=\"' + buttonClass + '\" ' : '';\n\n\tvar ariaDescribedbyAttr = ariaDescribedby !== '' ? 'aria-describedby=\"' + ariaDescribedby + '\" ' : '';\n\n\tvar ariaPressedAttr = ariaPressed !== null ? 'aria-pressed=\"' + ariaPressed + '\"' : '';\n\n\tvar iconHtml = icons.map(function (icon) {\n\t\treturn '<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"' + playerId + '-' + icon + '\" class=\"' + classPrefix + icon + '\" aria-hidden=\"true\" focusable=\"false\">\\n\\t\\t\\t\\t<use xlink:href=\"' + iconSprite + '#' + icon + '\"></use>\\n\\t\\t\\t</svg>\\n';\n\t});\n\n\treturn '<button ' + className + ' type=\"button\" aria-controls=\"' + playerId + '\" title=\"' + title + '\" aria-label=\"' + ariaLabel + '\" ' + ariaDescribedbyAttr + ' ' + ariaPressedAttr + '>\\n\\t\\t\\t' + iconHtml.join('') + '\\n\\t\\t</button>';\n}\n\n_mejs2.default.Utils = _mejs2.default.Utils || {};\n_mejs2.default.Utils.generateControlButton = generateControlButton;\n\n},{\"8\":8}],30:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.typeChecks = undefined;\nexports.absolutizeUrl = absolutizeUrl;\nexports.formatType = formatType;\nexports.getMimeFromType = getMimeFromType;\nexports.getTypeFromFile = getTypeFromFile;\nexports.getExtension = getExtension;\nexports.normalizeExtension = normalizeExtension;\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nvar _general = _dereq_(28);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar typeChecks = exports.typeChecks = [];\n\nfunction absolutizeUrl(url) {\n\n\tif (typeof url !== 'string') {\n\t\tthrow new Error('`url` argument must be a string');\n\t}\n\n\tvar el = document.createElement('div');\n\tel.innerHTML = '<a href=\"' + (0, _general.escapeHTML)(url) + '\">x</a>';\n\treturn el.firstChild.href;\n}\n\nfunction formatType(url) {\n\tvar type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n\treturn url && !type ? getTypeFromFile(url) : type;\n}\n\nfunction getMimeFromType(type) {\n\n\tif (typeof type !== 'string') {\n\t\tthrow new Error('`type` argument must be a string');\n\t}\n\n\treturn type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;\n}\n\nfunction getTypeFromFile(url) {\n\n\tif (typeof url !== 'string') {\n\t\tthrow new Error('`url` argument must be a string');\n\t}\n\n\tfor (var i = 0, total = typeChecks.length; i < total; i++) {\n\t\tvar type = typeChecks[i](url);\n\n\t\tif (type) {\n\t\t\treturn type;\n\t\t}\n\t}\n\n\tvar ext = getExtension(url),\n\t    normalizedExt = normalizeExtension(ext);\n\n\tvar mime = 'video/mp4';\n\n\tif (normalizedExt) {\n\t\tif (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {\n\t\t\tmime = 'video/' + normalizedExt;\n\t\t} else if ('mov' === normalizedExt) {\n\t\t\tmime = 'video/quicktime';\n\t\t} else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {\n\t\t\tmime = 'audio/' + normalizedExt;\n\t\t}\n\t}\n\n\treturn mime;\n}\n\nfunction getExtension(url) {\n\n\tif (typeof url !== 'string') {\n\t\tthrow new Error('`url` argument must be a string');\n\t}\n\n\tvar baseUrl = url.split('?')[0],\n\t    baseName = baseUrl.split('\\\\').pop().split('/').pop();\n\treturn ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';\n}\n\nfunction normalizeExtension(extension) {\n\n\tif (typeof extension !== 'string') {\n\t\tthrow new Error('`extension` argument must be a string');\n\t}\n\n\tswitch (extension) {\n\t\tcase 'mp4':\n\t\tcase 'm4v':\n\t\t\treturn 'mp4';\n\t\tcase 'webm':\n\t\tcase 'webma':\n\t\tcase 'webmv':\n\t\t\treturn 'webm';\n\t\tcase 'ogg':\n\t\tcase 'oga':\n\t\tcase 'ogv':\n\t\t\treturn 'ogg';\n\t\tdefault:\n\t\t\treturn extension;\n\t}\n}\n\n_mejs2.default.Utils = _mejs2.default.Utils || {};\n_mejs2.default.Utils.typeChecks = typeChecks;\n_mejs2.default.Utils.absolutizeUrl = absolutizeUrl;\n_mejs2.default.Utils.formatType = formatType;\n_mejs2.default.Utils.getMimeFromType = getMimeFromType;\n_mejs2.default.Utils.getTypeFromFile = getTypeFromFile;\n_mejs2.default.Utils.getExtension = getExtension;\n_mejs2.default.Utils.normalizeExtension = normalizeExtension;\n\n},{\"28\":28,\"8\":8}],31:[function(_dereq_,module,exports){\n'use strict';\n\nvar _document = _dereq_(2);\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _promisePolyfill = _dereq_(4);\n\nvar _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);\n\nvar _svg4everybody = _dereq_(5);\n\nvar _svg4everybody2 = _interopRequireDefault(_svg4everybody);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function (arr) {\n\tarr.forEach(function (item) {\n\t\tif (item.hasOwnProperty('remove')) {\n\t\t\treturn;\n\t\t}\n\t\tObject.defineProperty(item, 'remove', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: true,\n\t\t\twritable: true,\n\t\t\tvalue: function remove() {\n\t\t\t\tthis.parentNode.removeChild(this);\n\t\t\t}\n\t\t});\n\t});\n})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);\n\n(function () {\n\n\tif (typeof window.CustomEvent === 'function') {\n\t\treturn false;\n\t}\n\n\tfunction CustomEvent(event, params) {\n\t\tparams = params || { bubbles: false, cancelable: false, detail: undefined };\n\t\tvar evt = _document2.default.createEvent('CustomEvent');\n\t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n\t\treturn evt;\n\t}\n\n\tCustomEvent.prototype = window.Event.prototype;\n\twindow.CustomEvent = CustomEvent;\n})();\n\nif (typeof Object.assign !== 'function') {\n\tObject.assign = function (target) {\n\n\t\tif (target === null || target === undefined) {\n\t\t\tthrow new TypeError('Cannot convert undefined or null to object');\n\t\t}\n\n\t\tvar to = Object(target);\n\n\t\tfor (var index = 1, total = arguments.length; index < total; index++) {\n\t\t\tvar nextSource = arguments[index];\n\n\t\t\tif (nextSource !== null) {\n\t\t\t\tfor (var nextKey in nextSource) {\n\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n\t\t\t\t\t\tto[nextKey] = nextSource[nextKey];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn to;\n\t};\n}\n\nif (!String.prototype.startsWith) {\n\tString.prototype.startsWith = function (searchString, position) {\n\t\tposition = position || 0;\n\t\treturn this.substr(position, searchString.length) === searchString;\n\t};\n}\n\nif (!Element.prototype.matches) {\n\tElement.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {\n\t\tvar matches = (this.document || this.ownerDocument).querySelectorAll(s),\n\t\t    i = matches.length - 1;\n\t\twhile (--i >= 0 && matches.item(i) !== this) {}\n\t\treturn i > -1;\n\t};\n}\n\nif (window.Element && !Element.prototype.closest) {\n\tElement.prototype.closest = function (s) {\n\t\tvar matches = (this.document || this.ownerDocument).querySelectorAll(s),\n\t\t    i = void 0,\n\t\t    el = this;\n\t\tdo {\n\t\t\ti = matches.length;\n\t\t\twhile (--i >= 0 && matches.item(i) !== el) {}\n\t\t} while (i < 0 && (el = el.parentElement));\n\t\treturn el;\n\t};\n}\n\n(function () {\n\tvar lastTime = 0;\n\tvar vendors = ['ms', 'moz', 'webkit', 'o'];\n\tfor (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n\t\twindow.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\n\t\twindow.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];\n\t}\n\n\tif (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {\n\t\tvar currTime = new Date().getTime();\n\t\tvar timeToCall = Math.max(0, 16 - (currTime - lastTime));\n\t\tvar id = window.setTimeout(function () {\n\t\t\tcallback(currTime + timeToCall);\n\t\t}, timeToCall);\n\t\tlastTime = currTime + timeToCall;\n\t\treturn id;\n\t};\n\n\tif (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {\n\t\tclearTimeout(id);\n\t};\n})();\n\nif (/firefox/i.test(navigator.userAgent)) {\n\tvar getComputedStyle = window.getComputedStyle;\n\twindow.getComputedStyle = function (el, pseudoEl) {\n\t\tvar t = getComputedStyle(el, pseudoEl);\n\t\treturn t === null ? { getPropertyValue: function getPropertyValue() {} } : t;\n\t};\n}\n\nif (!window.Promise) {\n\twindow.Promise = _promisePolyfill2.default;\n}\n\n(0, _svg4everybody2.default)();\n\n(function (constructor) {\n\tif (constructor && constructor.prototype && constructor.prototype.children === null) {\n\t\tObject.defineProperty(constructor.prototype, 'children', {\n\t\t\tget: function get() {\n\t\t\t\tvar i = 0,\n\t\t\t\t    node = void 0,\n\t\t\t\t    nodes = this.childNodes,\n\t\t\t\t    children = [];\n\t\t\t\twhile (node = nodes[i++]) {\n\t\t\t\t\tif (node.nodeType === 1) {\n\t\t\t\t\t\tchildren.push(node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn children;\n\t\t\t}\n\t\t});\n\t}\n})(window.Node || window.Element);\n\n},{\"2\":2,\"4\":4,\"5\":5}],32:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.isDropFrame = isDropFrame;\nexports.secondsToTimeCode = secondsToTimeCode;\nexports.timeCodeToSeconds = timeCodeToSeconds;\nexports.calculateTimeFormat = calculateTimeFormat;\nexports.convertSMPTEtoSeconds = convertSMPTEtoSeconds;\n\nvar _mejs = _dereq_(8);\n\nvar _mejs2 = _interopRequireDefault(_mejs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction isDropFrame() {\n\tvar fps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 25;\n\n\treturn !(fps % 1 === 0);\n}\nfunction secondsToTimeCode(time) {\n\tvar forceHours = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\tvar showFrameCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\tvar fps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 25;\n\tvar secondsDecimalLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n\tvar timeFormat = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'hh:mm:ss';\n\n\n\ttime = !time || typeof time !== 'number' || time < 0 ? 0 : time;\n\n\tvar dropFrames = Math.round(fps * 0.066666),\n\t    timeBase = Math.round(fps),\n\t    framesPer24Hours = Math.round(fps * 3600) * 24,\n\t    framesPer10Minutes = Math.round(fps * 600),\n\t    frameSep = isDropFrame(fps) ? ';' : ':',\n\t    hours = void 0,\n\t    minutes = void 0,\n\t    seconds = void 0,\n\t    frames = void 0,\n\t    f = Math.round(time * fps);\n\n\tif (isDropFrame(fps)) {\n\n\t\tif (f < 0) {\n\t\t\tf = framesPer24Hours + f;\n\t\t}\n\n\t\tf = f % framesPer24Hours;\n\n\t\tvar d = Math.floor(f / framesPer10Minutes);\n\t\tvar m = f % framesPer10Minutes;\n\t\tf = f + dropFrames * 9 * d;\n\t\tif (m > dropFrames) {\n\t\t\tf = f + dropFrames * Math.floor((m - dropFrames) / Math.round(timeBase * 60 - dropFrames));\n\t\t}\n\n\t\tvar timeBaseDivision = Math.floor(f / timeBase);\n\n\t\thours = Math.floor(Math.floor(timeBaseDivision / 60) / 60);\n\t\tminutes = Math.floor(timeBaseDivision / 60) % 60;\n\n\t\tif (showFrameCount) {\n\t\t\tseconds = timeBaseDivision % 60;\n\t\t} else {\n\t\t\tseconds = Math.floor(f / timeBase % 60).toFixed(secondsDecimalLength);\n\t\t}\n\t} else {\n\t\thours = Math.floor(time / 3600) % 24;\n\t\tminutes = Math.floor(time / 60) % 60;\n\t\tif (showFrameCount) {\n\t\t\tseconds = Math.floor(time % 60);\n\t\t} else {\n\t\t\tseconds = Math.floor(time % 60).toFixed(secondsDecimalLength);\n\t\t}\n\t}\n\thours = hours <= 0 ? 0 : hours;\n\tminutes = minutes <= 0 ? 0 : minutes;\n\tseconds = seconds <= 0 ? 0 : seconds;\n\n\tseconds = seconds === 60 ? 0 : seconds;\n\tminutes = minutes === 60 ? 0 : minutes;\n\n\tvar timeFormatFrags = timeFormat.split(':');\n\tvar timeFormatSettings = {};\n\tfor (var i = 0, total = timeFormatFrags.length; i < total; ++i) {\n\t\tvar unique = '';\n\t\tfor (var j = 0, t = timeFormatFrags[i].length; j < t; j++) {\n\t\t\tif (unique.indexOf(timeFormatFrags[i][j]) < 0) {\n\t\t\t\tunique += timeFormatFrags[i][j];\n\t\t\t}\n\t\t}\n\t\tif (~['f', 's', 'm', 'h'].indexOf(unique)) {\n\t\t\ttimeFormatSettings[unique] = timeFormatFrags[i].length;\n\t\t}\n\t}\n\n\tvar result = forceHours || hours > 0 ? (hours < 10 && timeFormatSettings.h > 1 ? '0' + hours : hours) + ':' : '';\n\tresult += (minutes < 10 && timeFormatSettings.m > 1 ? '0' + minutes : minutes) + ':';\n\tresult += '' + (seconds < 10 && timeFormatSettings.s > 1 ? '0' + seconds : seconds);\n\n\tif (showFrameCount) {\n\t\tframes = (f % timeBase).toFixed(0);\n\t\tframes = frames <= 0 ? 0 : frames;\n\t\tresult += frames < 10 && timeFormatSettings.f ? frameSep + '0' + frames : '' + frameSep + frames;\n\t}\n\n\treturn result;\n}\n\nfunction timeCodeToSeconds(time) {\n\tvar fps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;\n\n\n\tif (typeof time !== 'string') {\n\t\tthrow new TypeError('Time must be a string');\n\t}\n\n\tif (time.indexOf(';') > 0) {\n\t\ttime = time.replace(';', ':');\n\t}\n\n\tif (!/\\d{2}(\\:\\d{2}){0,3}/i.test(time)) {\n\t\tthrow new TypeError('Time code must have the format `00:00:00`');\n\t}\n\n\tvar parts = time.split(':');\n\n\tvar output = void 0,\n\t    hours = 0,\n\t    minutes = 0,\n\t    seconds = 0,\n\t    frames = 0,\n\t    totalMinutes = 0,\n\t    dropFrames = Math.round(fps * 0.066666),\n\t    timeBase = Math.round(fps),\n\t    hFrames = timeBase * 3600,\n\t    mFrames = timeBase * 60;\n\n\tswitch (parts.length) {\n\t\tdefault:\n\t\tcase 1:\n\t\t\tseconds = parseInt(parts[0], 10);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tminutes = parseInt(parts[0], 10);\n\t\t\tseconds = parseInt(parts[1], 10);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\thours = parseInt(parts[0], 10);\n\t\t\tminutes = parseInt(parts[1], 10);\n\t\t\tseconds = parseInt(parts[2], 10);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\thours = parseInt(parts[0], 10);\n\t\t\tminutes = parseInt(parts[1], 10);\n\t\t\tseconds = parseInt(parts[2], 10);\n\t\t\tframes = parseInt(parts[3], 10);\n\t\t\tbreak;\n\t}\n\n\tif (isDropFrame(fps)) {\n\t\ttotalMinutes = 60 * hours + minutes;\n\t\toutput = hFrames * hours + mFrames * minutes + timeBase * seconds + frames - dropFrames * (totalMinutes - Math.floor(totalMinutes / 10));\n\t} else {\n\t\toutput = (hFrames * hours + mFrames * minutes + fps * seconds + frames) / fps;\n\t}\n\n\treturn parseFloat(output.toFixed(3));\n}\n\nfunction calculateTimeFormat(time, options) {\n\tvar fps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 25;\n\n\n\ttime = !time || typeof time !== 'number' || time < 0 ? 0 : time;\n\n\tvar hours = Math.floor(time / 3600) % 24,\n\t    minutes = Math.floor(time / 60) % 60,\n\t    seconds = Math.floor(time % 60),\n\t    frames = Math.floor((time % 1 * fps).toFixed(3)),\n\t    lis = [[frames, 'f'], [seconds, 's'], [minutes, 'm'], [hours, 'h']];\n\n\tvar format = options.timeFormat,\n\t    firstTwoPlaces = format[1] === format[0],\n\t    separatorIndex = firstTwoPlaces ? 2 : 1,\n\t    separator = format.length < separatorIndex ? format[separatorIndex] : ':',\n\t    firstChar = format[0],\n\t    required = false;\n\n\tfor (var i = 0, len = lis.length; i < len; i++) {\n\t\tif (~format.indexOf(lis[i][1])) {\n\t\t\trequired = true;\n\t\t} else if (required) {\n\t\t\tvar hasNextValue = false;\n\t\t\tfor (var j = i; j < len; j++) {\n\t\t\t\tif (lis[j][0] > 0) {\n\t\t\t\t\thasNextValue = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!hasNextValue) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!firstTwoPlaces) {\n\t\t\t\tformat = firstChar + format;\n\t\t\t}\n\t\t\tformat = lis[i][1] + separator + format;\n\t\t\tif (firstTwoPlaces) {\n\t\t\t\tformat = lis[i][1] + format;\n\t\t\t}\n\t\t\tfirstChar = lis[i][1];\n\t\t}\n\t}\n\n\toptions.timeFormat = format;\n}\n\nfunction convertSMPTEtoSeconds(SMPTE) {\n\n\tif (typeof SMPTE !== 'string') {\n\t\tthrow new TypeError('Argument must be a string value');\n\t}\n\n\tSMPTE = SMPTE.replace(',', '.');\n\n\tvar decimalLen = ~SMPTE.indexOf('.') ? SMPTE.split('.')[1].length : 0;\n\n\tvar secs = 0,\n\t    multiplier = 1;\n\n\tSMPTE = SMPTE.split(':').reverse();\n\n\tfor (var i = 0, total = SMPTE.length; i < total; i++) {\n\t\tmultiplier = 1;\n\t\tif (i > 0) {\n\t\t\tmultiplier = Math.pow(60, i);\n\t\t}\n\t\tsecs += Number(SMPTE[i]) * multiplier;\n\t}\n\treturn Number(secs.toFixed(decimalLen));\n}\n\n_mejs2.default.Utils = _mejs2.default.Utils || {};\n_mejs2.default.Utils.secondsToTimeCode = secondsToTimeCode;\n_mejs2.default.Utils.timeCodeToSeconds = timeCodeToSeconds;\n_mejs2.default.Utils.calculateTimeFormat = calculateTimeFormat;\n_mejs2.default.Utils.convertSMPTEtoSeconds = convertSMPTEtoSeconds;\n\n},{\"8\":8}]},{},[31,7,6,16,24,21,20,22,23,25,17,19,18,10,11,12,13,14,15]);\n", "module.exports = require('./build/mediaelement-and-player.js');\n", "/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/javascript\nReleased under the MIT license\n */\nconst linkClickSelector = \"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]\";\n\nconst buttonClickSelector = {\n  selector: \"button[data-remote]:not([form]), button[data-confirm]:not([form])\",\n  exclude: \"form button\"\n};\n\nconst inputChangeSelector = \"select[data-remote], input[data-remote], textarea[data-remote]\";\n\nconst formSubmitSelector = \"form:not([data-turbo=true])\";\n\nconst formInputClickSelector = \"form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])\";\n\nconst formDisableSelector = \"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled\";\n\nconst formEnableSelector = \"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled\";\n\nconst fileInputSelector = \"input[name][type=file]:not([disabled])\";\n\nconst linkDisableSelector = \"a[data-disable-with], a[data-disable]\";\n\nconst buttonDisableSelector = \"button[data-remote][data-disable-with], button[data-remote][data-disable]\";\n\nlet nonce = null;\n\nconst loadCSPNonce = () => {\n  const metaTag = document.querySelector(\"meta[name=csp-nonce]\");\n  return nonce = metaTag && metaTag.content;\n};\n\nconst cspNonce = () => nonce || loadCSPNonce();\n\nconst m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nconst matches = function(element, selector) {\n  if (selector.exclude) {\n    return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n  } else {\n    return m.call(element, selector);\n  }\n};\n\nconst EXPANDO = \"_ujsData\";\n\nconst getData = (element, key) => element[EXPANDO] ? element[EXPANDO][key] : undefined;\n\nconst setData = function(element, key, value) {\n  if (!element[EXPANDO]) {\n    element[EXPANDO] = {};\n  }\n  return element[EXPANDO][key] = value;\n};\n\nconst $ = selector => Array.prototype.slice.call(document.querySelectorAll(selector));\n\nconst isContentEditable = function(element) {\n  var isEditable = false;\n  do {\n    if (element.isContentEditable) {\n      isEditable = true;\n      break;\n    }\n    element = element.parentElement;\n  } while (element);\n  return isEditable;\n};\n\nconst csrfToken = () => {\n  const meta = document.querySelector(\"meta[name=csrf-token]\");\n  return meta && meta.content;\n};\n\nconst csrfParam = () => {\n  const meta = document.querySelector(\"meta[name=csrf-param]\");\n  return meta && meta.content;\n};\n\nconst CSRFProtection = xhr => {\n  const token = csrfToken();\n  if (token) {\n    return xhr.setRequestHeader(\"X-CSRF-Token\", token);\n  }\n};\n\nconst refreshCSRFTokens = () => {\n  const token = csrfToken();\n  const param = csrfParam();\n  if (token && param) {\n    return $('form input[name=\"' + param + '\"]').forEach((input => input.value = token));\n  }\n};\n\nconst AcceptHeaders = {\n  \"*\": \"*/*\",\n  text: \"text/plain\",\n  html: \"text/html\",\n  xml: \"application/xml, text/xml\",\n  json: \"application/json, text/javascript\",\n  script: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n};\n\nconst ajax = options => {\n  options = prepareOptions(options);\n  var xhr = createXHR(options, (function() {\n    const response = processResponse(xhr.response != null ? xhr.response : xhr.responseText, xhr.getResponseHeader(\"Content-Type\"));\n    if (Math.floor(xhr.status / 100) === 2) {\n      if (typeof options.success === \"function\") {\n        options.success(response, xhr.statusText, xhr);\n      }\n    } else {\n      if (typeof options.error === \"function\") {\n        options.error(response, xhr.statusText, xhr);\n      }\n    }\n    return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : undefined;\n  }));\n  if (options.beforeSend && !options.beforeSend(xhr, options)) {\n    return false;\n  }\n  if (xhr.readyState === XMLHttpRequest.OPENED) {\n    return xhr.send(options.data);\n  }\n};\n\nvar prepareOptions = function(options) {\n  options.url = options.url || location.href;\n  options.type = options.type.toUpperCase();\n  if (options.type === \"GET\" && options.data) {\n    if (options.url.indexOf(\"?\") < 0) {\n      options.url += \"?\" + options.data;\n    } else {\n      options.url += \"&\" + options.data;\n    }\n  }\n  if (!(options.dataType in AcceptHeaders)) {\n    options.dataType = \"*\";\n  }\n  options.accept = AcceptHeaders[options.dataType];\n  if (options.dataType !== \"*\") {\n    options.accept += \", */*; q=0.01\";\n  }\n  return options;\n};\n\nvar createXHR = function(options, done) {\n  const xhr = new XMLHttpRequest;\n  xhr.open(options.type, options.url, true);\n  xhr.setRequestHeader(\"Accept\", options.accept);\n  if (typeof options.data === \"string\") {\n    xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n  }\n  if (!options.crossDomain) {\n    xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n    CSRFProtection(xhr);\n  }\n  xhr.withCredentials = !!options.withCredentials;\n  xhr.onreadystatechange = function() {\n    if (xhr.readyState === XMLHttpRequest.DONE) {\n      return done(xhr);\n    }\n  };\n  return xhr;\n};\n\nvar processResponse = function(response, type) {\n  if (typeof response === \"string\" && typeof type === \"string\") {\n    if (type.match(/\\bjson\\b/)) {\n      try {\n        response = JSON.parse(response);\n      } catch (error) {}\n    } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n      const script = document.createElement(\"script\");\n      script.setAttribute(\"nonce\", cspNonce());\n      script.text = response;\n      document.head.appendChild(script).parentNode.removeChild(script);\n    } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n      const parser = new DOMParser;\n      type = type.replace(/;.+/, \"\");\n      try {\n        response = parser.parseFromString(response, type);\n      } catch (error1) {}\n    }\n  }\n  return response;\n};\n\nconst href = element => element.href;\n\nconst isCrossDomain = function(url) {\n  const originAnchor = document.createElement(\"a\");\n  originAnchor.href = location.href;\n  const urlAnchor = document.createElement(\"a\");\n  try {\n    urlAnchor.href = url;\n    return !((!urlAnchor.protocol || urlAnchor.protocol === \":\") && !urlAnchor.host || originAnchor.protocol + \"//\" + originAnchor.host === urlAnchor.protocol + \"//\" + urlAnchor.host);\n  } catch (e) {\n    return true;\n  }\n};\n\nlet preventDefault;\n\nlet {CustomEvent: CustomEvent} = window;\n\nif (typeof CustomEvent !== \"function\") {\n  CustomEvent = function(event, params) {\n    const evt = document.createEvent(\"CustomEvent\");\n    evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n    return evt;\n  };\n  CustomEvent.prototype = window.Event.prototype;\n  ({preventDefault: preventDefault} = CustomEvent.prototype);\n  CustomEvent.prototype.preventDefault = function() {\n    const result = preventDefault.call(this);\n    if (this.cancelable && !this.defaultPrevented) {\n      Object.defineProperty(this, \"defaultPrevented\", {\n        get() {\n          return true;\n        }\n      });\n    }\n    return result;\n  };\n}\n\nconst fire = (obj, name, data) => {\n  const event = new CustomEvent(name, {\n    bubbles: true,\n    cancelable: true,\n    detail: data\n  });\n  obj.dispatchEvent(event);\n  return !event.defaultPrevented;\n};\n\nconst stopEverything = e => {\n  fire(e.target, \"ujs:everythingStopped\");\n  e.preventDefault();\n  e.stopPropagation();\n  e.stopImmediatePropagation();\n};\n\nconst delegate = (element, selector, eventType, handler) => element.addEventListener(eventType, (function(e) {\n  let {target: target} = e;\n  while (!!(target instanceof Element) && !matches(target, selector)) {\n    target = target.parentNode;\n  }\n  if (target instanceof Element && handler.call(target, e) === false) {\n    e.preventDefault();\n    e.stopPropagation();\n  }\n}));\n\nconst toArray = e => Array.prototype.slice.call(e);\n\nconst serializeElement = (element, additionalParam) => {\n  let inputs = [ element ];\n  if (matches(element, \"form\")) {\n    inputs = toArray(element.elements);\n  }\n  const params = [];\n  inputs.forEach((function(input) {\n    if (!input.name || input.disabled) {\n      return;\n    }\n    if (matches(input, \"fieldset[disabled] *\")) {\n      return;\n    }\n    if (matches(input, \"select\")) {\n      toArray(input.options).forEach((function(option) {\n        if (option.selected) {\n          params.push({\n            name: input.name,\n            value: option.value\n          });\n        }\n      }));\n    } else if (input.checked || [ \"radio\", \"checkbox\", \"submit\" ].indexOf(input.type) === -1) {\n      params.push({\n        name: input.name,\n        value: input.value\n      });\n    }\n  }));\n  if (additionalParam) {\n    params.push(additionalParam);\n  }\n  return params.map((function(param) {\n    if (param.name) {\n      return `${encodeURIComponent(param.name)}=${encodeURIComponent(param.value)}`;\n    } else {\n      return param;\n    }\n  })).join(\"&\");\n};\n\nconst formElements = (form, selector) => {\n  if (matches(form, \"form\")) {\n    return toArray(form.elements).filter((el => matches(el, selector)));\n  } else {\n    return toArray(form.querySelectorAll(selector));\n  }\n};\n\nconst handleConfirmWithRails = rails => function(e) {\n  if (!allowAction(this, rails)) {\n    stopEverything(e);\n  }\n};\n\nconst confirm = (message, element) => window.confirm(message);\n\nvar allowAction = function(element, rails) {\n  let callback;\n  const message = element.getAttribute(\"data-confirm\");\n  if (!message) {\n    return true;\n  }\n  let answer = false;\n  if (fire(element, \"confirm\")) {\n    try {\n      answer = rails.confirm(message, element);\n    } catch (error) {}\n    callback = fire(element, \"confirm:complete\", [ answer ]);\n  }\n  return answer && callback;\n};\n\nconst handleDisabledElement = function(e) {\n  const element = this;\n  if (element.disabled) {\n    stopEverything(e);\n  }\n};\n\nconst enableElement = e => {\n  let element;\n  if (e instanceof Event) {\n    if (isXhrRedirect(e)) {\n      return;\n    }\n    element = e.target;\n  } else {\n    element = e;\n  }\n  if (isContentEditable(element)) {\n    return;\n  }\n  if (matches(element, linkDisableSelector)) {\n    return enableLinkElement(element);\n  } else if (matches(element, buttonDisableSelector) || matches(element, formEnableSelector)) {\n    return enableFormElement(element);\n  } else if (matches(element, formSubmitSelector)) {\n    return enableFormElements(element);\n  }\n};\n\nconst disableElement = e => {\n  const element = e instanceof Event ? e.target : e;\n  if (isContentEditable(element)) {\n    return;\n  }\n  if (matches(element, linkDisableSelector)) {\n    return disableLinkElement(element);\n  } else if (matches(element, buttonDisableSelector) || matches(element, formDisableSelector)) {\n    return disableFormElement(element);\n  } else if (matches(element, formSubmitSelector)) {\n    return disableFormElements(element);\n  }\n};\n\nvar disableLinkElement = function(element) {\n  if (getData(element, \"ujs:disabled\")) {\n    return;\n  }\n  const replacement = element.getAttribute(\"data-disable-with\");\n  if (replacement != null) {\n    setData(element, \"ujs:enable-with\", element.innerHTML);\n    element.innerHTML = replacement;\n  }\n  element.addEventListener(\"click\", stopEverything);\n  return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableLinkElement = function(element) {\n  const originalText = getData(element, \"ujs:enable-with\");\n  if (originalText != null) {\n    element.innerHTML = originalText;\n    setData(element, \"ujs:enable-with\", null);\n  }\n  element.removeEventListener(\"click\", stopEverything);\n  return setData(element, \"ujs:disabled\", null);\n};\n\nvar disableFormElements = form => formElements(form, formDisableSelector).forEach(disableFormElement);\n\nvar disableFormElement = function(element) {\n  if (getData(element, \"ujs:disabled\")) {\n    return;\n  }\n  const replacement = element.getAttribute(\"data-disable-with\");\n  if (replacement != null) {\n    if (matches(element, \"button\")) {\n      setData(element, \"ujs:enable-with\", element.innerHTML);\n      element.innerHTML = replacement;\n    } else {\n      setData(element, \"ujs:enable-with\", element.value);\n      element.value = replacement;\n    }\n  }\n  element.disabled = true;\n  return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableFormElements = form => formElements(form, formEnableSelector).forEach((element => enableFormElement(element)));\n\nvar enableFormElement = function(element) {\n  const originalText = getData(element, \"ujs:enable-with\");\n  if (originalText != null) {\n    if (matches(element, \"button\")) {\n      element.innerHTML = originalText;\n    } else {\n      element.value = originalText;\n    }\n    setData(element, \"ujs:enable-with\", null);\n  }\n  element.disabled = false;\n  return setData(element, \"ujs:disabled\", null);\n};\n\nvar isXhrRedirect = function(event) {\n  const xhr = event.detail ? event.detail[0] : undefined;\n  return xhr && xhr.getResponseHeader(\"X-Xhr-Redirect\");\n};\n\nconst handleMethodWithRails = rails => function(e) {\n  const link = this;\n  const method = link.getAttribute(\"data-method\");\n  if (!method) {\n    return;\n  }\n  if (isContentEditable(this)) {\n    return;\n  }\n  const href = rails.href(link);\n  const csrfToken$1 = csrfToken();\n  const csrfParam$1 = csrfParam();\n  const form = document.createElement(\"form\");\n  let formContent = `<input name='_method' value='${method}' type='hidden' />`;\n  if (csrfParam$1 && csrfToken$1 && !isCrossDomain(href)) {\n    formContent += `<input name='${csrfParam$1}' value='${csrfToken$1}' type='hidden' />`;\n  }\n  formContent += '<input type=\"submit\" />';\n  form.method = \"post\";\n  form.action = href;\n  form.target = link.target;\n  form.innerHTML = formContent;\n  form.style.display = \"none\";\n  document.body.appendChild(form);\n  form.querySelector('[type=\"submit\"]').click();\n  stopEverything(e);\n};\n\nconst isRemote = function(element) {\n  const value = element.getAttribute(\"data-remote\");\n  return value != null && value !== \"false\";\n};\n\nconst handleRemoteWithRails = rails => function(e) {\n  let data, method, url;\n  const element = this;\n  if (!isRemote(element)) {\n    return true;\n  }\n  if (!fire(element, \"ajax:before\")) {\n    fire(element, \"ajax:stopped\");\n    return false;\n  }\n  if (isContentEditable(element)) {\n    fire(element, \"ajax:stopped\");\n    return false;\n  }\n  const withCredentials = element.getAttribute(\"data-with-credentials\");\n  const dataType = element.getAttribute(\"data-type\") || \"script\";\n  if (matches(element, formSubmitSelector)) {\n    const button = getData(element, \"ujs:submit-button\");\n    method = getData(element, \"ujs:submit-button-formmethod\") || element.getAttribute(\"method\") || \"get\";\n    url = getData(element, \"ujs:submit-button-formaction\") || element.getAttribute(\"action\") || location.href;\n    if (method.toUpperCase() === \"GET\") {\n      url = url.replace(/\\?.*$/, \"\");\n    }\n    if (element.enctype === \"multipart/form-data\") {\n      data = new FormData(element);\n      if (button != null) {\n        data.append(button.name, button.value);\n      }\n    } else {\n      data = serializeElement(element, button);\n    }\n    setData(element, \"ujs:submit-button\", null);\n    setData(element, \"ujs:submit-button-formmethod\", null);\n    setData(element, \"ujs:submit-button-formaction\", null);\n  } else if (matches(element, buttonClickSelector) || matches(element, inputChangeSelector)) {\n    method = element.getAttribute(\"data-method\");\n    url = element.getAttribute(\"data-url\");\n    data = serializeElement(element, element.getAttribute(\"data-params\"));\n  } else {\n    method = element.getAttribute(\"data-method\");\n    url = rails.href(element);\n    data = element.getAttribute(\"data-params\");\n  }\n  ajax({\n    type: method || \"GET\",\n    url: url,\n    data: data,\n    dataType: dataType,\n    beforeSend(xhr, options) {\n      if (fire(element, \"ajax:beforeSend\", [ xhr, options ])) {\n        return fire(element, \"ajax:send\", [ xhr ]);\n      } else {\n        fire(element, \"ajax:stopped\");\n        return false;\n      }\n    },\n    success(...args) {\n      return fire(element, \"ajax:success\", args);\n    },\n    error(...args) {\n      return fire(element, \"ajax:error\", args);\n    },\n    complete(...args) {\n      return fire(element, \"ajax:complete\", args);\n    },\n    crossDomain: isCrossDomain(url),\n    withCredentials: withCredentials != null && withCredentials !== \"false\"\n  });\n  stopEverything(e);\n};\n\nconst formSubmitButtonClick = function(e) {\n  const button = this;\n  const {form: form} = button;\n  if (!form) {\n    return;\n  }\n  if (button.name) {\n    setData(form, \"ujs:submit-button\", {\n      name: button.name,\n      value: button.value\n    });\n  }\n  setData(form, \"ujs:formnovalidate-button\", button.formNoValidate);\n  setData(form, \"ujs:submit-button-formaction\", button.getAttribute(\"formaction\"));\n  return setData(form, \"ujs:submit-button-formmethod\", button.getAttribute(\"formmethod\"));\n};\n\nconst preventInsignificantClick = function(e) {\n  const link = this;\n  const method = (link.getAttribute(\"data-method\") || \"GET\").toUpperCase();\n  const data = link.getAttribute(\"data-params\");\n  const metaClick = e.metaKey || e.ctrlKey;\n  const insignificantMetaClick = metaClick && method === \"GET\" && !data;\n  const nonPrimaryMouseClick = e.button != null && e.button !== 0;\n  if (nonPrimaryMouseClick || insignificantMetaClick) {\n    e.stopImmediatePropagation();\n  }\n};\n\nconst Rails = {\n  $: $,\n  ajax: ajax,\n  buttonClickSelector: buttonClickSelector,\n  buttonDisableSelector: buttonDisableSelector,\n  confirm: confirm,\n  cspNonce: cspNonce,\n  csrfToken: csrfToken,\n  csrfParam: csrfParam,\n  CSRFProtection: CSRFProtection,\n  delegate: delegate,\n  disableElement: disableElement,\n  enableElement: enableElement,\n  fileInputSelector: fileInputSelector,\n  fire: fire,\n  formElements: formElements,\n  formEnableSelector: formEnableSelector,\n  formDisableSelector: formDisableSelector,\n  formInputClickSelector: formInputClickSelector,\n  formSubmitButtonClick: formSubmitButtonClick,\n  formSubmitSelector: formSubmitSelector,\n  getData: getData,\n  handleDisabledElement: handleDisabledElement,\n  href: href,\n  inputChangeSelector: inputChangeSelector,\n  isCrossDomain: isCrossDomain,\n  linkClickSelector: linkClickSelector,\n  linkDisableSelector: linkDisableSelector,\n  loadCSPNonce: loadCSPNonce,\n  matches: matches,\n  preventInsignificantClick: preventInsignificantClick,\n  refreshCSRFTokens: refreshCSRFTokens,\n  serializeElement: serializeElement,\n  setData: setData,\n  stopEverything: stopEverything\n};\n\nconst handleConfirm = handleConfirmWithRails(Rails);\n\nRails.handleConfirm = handleConfirm;\n\nconst handleMethod = handleMethodWithRails(Rails);\n\nRails.handleMethod = handleMethod;\n\nconst handleRemote = handleRemoteWithRails(Rails);\n\nRails.handleRemote = handleRemote;\n\nconst start = function() {\n  if (window._rails_loaded) {\n    throw new Error(\"rails-ujs has already been loaded!\");\n  }\n  window.addEventListener(\"pageshow\", (function() {\n    $(formEnableSelector).forEach((function(el) {\n      if (getData(el, \"ujs:disabled\")) {\n        enableElement(el);\n      }\n    }));\n    $(linkDisableSelector).forEach((function(el) {\n      if (getData(el, \"ujs:disabled\")) {\n        enableElement(el);\n      }\n    }));\n  }));\n  delegate(document, linkDisableSelector, \"ajax:complete\", enableElement);\n  delegate(document, linkDisableSelector, \"ajax:stopped\", enableElement);\n  delegate(document, buttonDisableSelector, \"ajax:complete\", enableElement);\n  delegate(document, buttonDisableSelector, \"ajax:stopped\", enableElement);\n  delegate(document, linkClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, linkClickSelector, \"click\", handleDisabledElement);\n  delegate(document, linkClickSelector, \"click\", handleConfirm);\n  delegate(document, linkClickSelector, \"click\", disableElement);\n  delegate(document, linkClickSelector, \"click\", handleRemote);\n  delegate(document, linkClickSelector, \"click\", handleMethod);\n  delegate(document, buttonClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, buttonClickSelector, \"click\", handleDisabledElement);\n  delegate(document, buttonClickSelector, \"click\", handleConfirm);\n  delegate(document, buttonClickSelector, \"click\", disableElement);\n  delegate(document, buttonClickSelector, \"click\", handleRemote);\n  delegate(document, inputChangeSelector, \"change\", handleDisabledElement);\n  delegate(document, inputChangeSelector, \"change\", handleConfirm);\n  delegate(document, inputChangeSelector, \"change\", handleRemote);\n  delegate(document, formSubmitSelector, \"submit\", handleDisabledElement);\n  delegate(document, formSubmitSelector, \"submit\", handleConfirm);\n  delegate(document, formSubmitSelector, \"submit\", handleRemote);\n  delegate(document, formSubmitSelector, \"submit\", (e => setTimeout((() => disableElement(e)), 13)));\n  delegate(document, formSubmitSelector, \"ajax:send\", disableElement);\n  delegate(document, formSubmitSelector, \"ajax:complete\", enableElement);\n  delegate(document, formInputClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, formInputClickSelector, \"click\", handleDisabledElement);\n  delegate(document, formInputClickSelector, \"click\", handleConfirm);\n  delegate(document, formInputClickSelector, \"click\", formSubmitButtonClick);\n  document.addEventListener(\"DOMContentLoaded\", refreshCSRFTokens);\n  document.addEventListener(\"DOMContentLoaded\", loadCSPNonce);\n  return window._rails_loaded = true;\n};\n\nRails.start = start;\n\nif (typeof jQuery !== \"undefined\" && jQuery && jQuery.ajax) {\n  if (jQuery.rails) {\n    throw new Error(\"If you load both jquery_ujs and rails-ujs, use rails-ujs only.\");\n  }\n  jQuery.rails = Rails;\n  jQuery.ajaxPrefilter((function(options, originalOptions, xhr) {\n    if (!options.crossDomain) {\n      return CSRFProtection(xhr);\n    }\n  }));\n}\n\nexport { Rails as default };\n", "var adapters = {\n  logger: typeof console !== \"undefined\" ? console : undefined,\n  WebSocket: typeof WebSocket !== \"undefined\" ? WebSocket : undefined\n};\n\nvar logger = {\n  log(...messages) {\n    if (this.enabled) {\n      messages.push(Date.now());\n      adapters.logger.log(\"[ActionCable]\", ...messages);\n    }\n  }\n};\n\nconst now = () => (new Date).getTime();\n\nconst secondsSince = time => (now() - time) / 1e3;\n\nclass ConnectionMonitor {\n  constructor(connection) {\n    this.visibilityDidChange = this.visibilityDidChange.bind(this);\n    this.connection = connection;\n    this.reconnectAttempts = 0;\n  }\n  start() {\n    if (!this.isRunning()) {\n      this.startedAt = now();\n      delete this.stoppedAt;\n      this.startPolling();\n      addEventListener(\"visibilitychange\", this.visibilityDidChange);\n      logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`);\n    }\n  }\n  stop() {\n    if (this.isRunning()) {\n      this.stoppedAt = now();\n      this.stopPolling();\n      removeEventListener(\"visibilitychange\", this.visibilityDidChange);\n      logger.log(\"ConnectionMonitor stopped\");\n    }\n  }\n  isRunning() {\n    return this.startedAt && !this.stoppedAt;\n  }\n  recordMessage() {\n    this.pingedAt = now();\n  }\n  recordConnect() {\n    this.reconnectAttempts = 0;\n    delete this.disconnectedAt;\n    logger.log(\"ConnectionMonitor recorded connect\");\n  }\n  recordDisconnect() {\n    this.disconnectedAt = now();\n    logger.log(\"ConnectionMonitor recorded disconnect\");\n  }\n  startPolling() {\n    this.stopPolling();\n    this.poll();\n  }\n  stopPolling() {\n    clearTimeout(this.pollTimeout);\n  }\n  poll() {\n    this.pollTimeout = setTimeout((() => {\n      this.reconnectIfStale();\n      this.poll();\n    }), this.getPollInterval());\n  }\n  getPollInterval() {\n    const {staleThreshold: staleThreshold, reconnectionBackoffRate: reconnectionBackoffRate} = this.constructor;\n    const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10));\n    const jitterMax = this.reconnectAttempts === 0 ? 1 : reconnectionBackoffRate;\n    const jitter = jitterMax * Math.random();\n    return staleThreshold * 1e3 * backoff * (1 + jitter);\n  }\n  reconnectIfStale() {\n    if (this.connectionIsStale()) {\n      logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`);\n      this.reconnectAttempts++;\n      if (this.disconnectedRecently()) {\n        logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`);\n      } else {\n        logger.log(\"ConnectionMonitor reopening\");\n        this.connection.reopen();\n      }\n    }\n  }\n  get refreshedAt() {\n    return this.pingedAt ? this.pingedAt : this.startedAt;\n  }\n  connectionIsStale() {\n    return secondsSince(this.refreshedAt) > this.constructor.staleThreshold;\n  }\n  disconnectedRecently() {\n    return this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold;\n  }\n  visibilityDidChange() {\n    if (document.visibilityState === \"visible\") {\n      setTimeout((() => {\n        if (this.connectionIsStale() || !this.connection.isOpen()) {\n          logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`);\n          this.connection.reopen();\n        }\n      }), 200);\n    }\n  }\n}\n\nConnectionMonitor.staleThreshold = 6;\n\nConnectionMonitor.reconnectionBackoffRate = .15;\n\nvar INTERNAL = {\n  message_types: {\n    welcome: \"welcome\",\n    disconnect: \"disconnect\",\n    ping: \"ping\",\n    confirmation: \"confirm_subscription\",\n    rejection: \"reject_subscription\"\n  },\n  disconnect_reasons: {\n    unauthorized: \"unauthorized\",\n    invalid_request: \"invalid_request\",\n    server_restart: \"server_restart\",\n    remote: \"remote\"\n  },\n  default_mount_path: \"/cable\",\n  protocols: [ \"actioncable-v1-json\", \"actioncable-unsupported\" ]\n};\n\nconst {message_types: message_types, protocols: protocols} = INTERNAL;\n\nconst supportedProtocols = protocols.slice(0, protocols.length - 1);\n\nconst indexOf = [].indexOf;\n\nclass Connection {\n  constructor(consumer) {\n    this.open = this.open.bind(this);\n    this.consumer = consumer;\n    this.subscriptions = this.consumer.subscriptions;\n    this.monitor = new ConnectionMonitor(this);\n    this.disconnected = true;\n  }\n  send(data) {\n    if (this.isOpen()) {\n      this.webSocket.send(JSON.stringify(data));\n      return true;\n    } else {\n      return false;\n    }\n  }\n  open() {\n    if (this.isActive()) {\n      logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`);\n      return false;\n    } else {\n      const socketProtocols = [ ...protocols, ...this.consumer.subprotocols || [] ];\n      logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${socketProtocols}`);\n      if (this.webSocket) {\n        this.uninstallEventHandlers();\n      }\n      this.webSocket = new adapters.WebSocket(this.consumer.url, socketProtocols);\n      this.installEventHandlers();\n      this.monitor.start();\n      return true;\n    }\n  }\n  close({allowReconnect: allowReconnect} = {\n    allowReconnect: true\n  }) {\n    if (!allowReconnect) {\n      this.monitor.stop();\n    }\n    if (this.isOpen()) {\n      return this.webSocket.close();\n    }\n  }\n  reopen() {\n    logger.log(`Reopening WebSocket, current state is ${this.getState()}`);\n    if (this.isActive()) {\n      try {\n        return this.close();\n      } catch (error) {\n        logger.log(\"Failed to reopen WebSocket\", error);\n      } finally {\n        logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`);\n        setTimeout(this.open, this.constructor.reopenDelay);\n      }\n    } else {\n      return this.open();\n    }\n  }\n  getProtocol() {\n    if (this.webSocket) {\n      return this.webSocket.protocol;\n    }\n  }\n  isOpen() {\n    return this.isState(\"open\");\n  }\n  isActive() {\n    return this.isState(\"open\", \"connecting\");\n  }\n  triedToReconnect() {\n    return this.monitor.reconnectAttempts > 0;\n  }\n  isProtocolSupported() {\n    return indexOf.call(supportedProtocols, this.getProtocol()) >= 0;\n  }\n  isState(...states) {\n    return indexOf.call(states, this.getState()) >= 0;\n  }\n  getState() {\n    if (this.webSocket) {\n      for (let state in adapters.WebSocket) {\n        if (adapters.WebSocket[state] === this.webSocket.readyState) {\n          return state.toLowerCase();\n        }\n      }\n    }\n    return null;\n  }\n  installEventHandlers() {\n    for (let eventName in this.events) {\n      const handler = this.events[eventName].bind(this);\n      this.webSocket[`on${eventName}`] = handler;\n    }\n  }\n  uninstallEventHandlers() {\n    for (let eventName in this.events) {\n      this.webSocket[`on${eventName}`] = function() {};\n    }\n  }\n}\n\nConnection.reopenDelay = 500;\n\nConnection.prototype.events = {\n  message(event) {\n    if (!this.isProtocolSupported()) {\n      return;\n    }\n    const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);\n    this.monitor.recordMessage();\n    switch (type) {\n     case message_types.welcome:\n      if (this.triedToReconnect()) {\n        this.reconnectAttempted = true;\n      }\n      this.monitor.recordConnect();\n      return this.subscriptions.reload();\n\n     case message_types.disconnect:\n      logger.log(`Disconnecting. Reason: ${reason}`);\n      return this.close({\n        allowReconnect: reconnect\n      });\n\n     case message_types.ping:\n      return null;\n\n     case message_types.confirmation:\n      this.subscriptions.confirmSubscription(identifier);\n      if (this.reconnectAttempted) {\n        this.reconnectAttempted = false;\n        return this.subscriptions.notify(identifier, \"connected\", {\n          reconnected: true\n        });\n      } else {\n        return this.subscriptions.notify(identifier, \"connected\", {\n          reconnected: false\n        });\n      }\n\n     case message_types.rejection:\n      return this.subscriptions.reject(identifier);\n\n     default:\n      return this.subscriptions.notify(identifier, \"received\", message);\n    }\n  },\n  open() {\n    logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`);\n    this.disconnected = false;\n    if (!this.isProtocolSupported()) {\n      logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\");\n      return this.close({\n        allowReconnect: false\n      });\n    }\n  },\n  close(event) {\n    logger.log(\"WebSocket onclose event\");\n    if (this.disconnected) {\n      return;\n    }\n    this.disconnected = true;\n    this.monitor.recordDisconnect();\n    return this.subscriptions.notifyAll(\"disconnected\", {\n      willAttemptReconnect: this.monitor.isRunning()\n    });\n  },\n  error() {\n    logger.log(\"WebSocket onerror event\");\n  }\n};\n\nconst extend = function(object, properties) {\n  if (properties != null) {\n    for (let key in properties) {\n      const value = properties[key];\n      object[key] = value;\n    }\n  }\n  return object;\n};\n\nclass Subscription {\n  constructor(consumer, params = {}, mixin) {\n    this.consumer = consumer;\n    this.identifier = JSON.stringify(params);\n    extend(this, mixin);\n  }\n  perform(action, data = {}) {\n    data.action = action;\n    return this.send(data);\n  }\n  send(data) {\n    return this.consumer.send({\n      command: \"message\",\n      identifier: this.identifier,\n      data: JSON.stringify(data)\n    });\n  }\n  unsubscribe() {\n    return this.consumer.subscriptions.remove(this);\n  }\n}\n\nclass SubscriptionGuarantor {\n  constructor(subscriptions) {\n    this.subscriptions = subscriptions;\n    this.pendingSubscriptions = [];\n  }\n  guarantee(subscription) {\n    if (this.pendingSubscriptions.indexOf(subscription) == -1) {\n      logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`);\n      this.pendingSubscriptions.push(subscription);\n    } else {\n      logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`);\n    }\n    this.startGuaranteeing();\n  }\n  forget(subscription) {\n    logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`);\n    this.pendingSubscriptions = this.pendingSubscriptions.filter((s => s !== subscription));\n  }\n  startGuaranteeing() {\n    this.stopGuaranteeing();\n    this.retrySubscribing();\n  }\n  stopGuaranteeing() {\n    clearTimeout(this.retryTimeout);\n  }\n  retrySubscribing() {\n    this.retryTimeout = setTimeout((() => {\n      if (this.subscriptions && typeof this.subscriptions.subscribe === \"function\") {\n        this.pendingSubscriptions.map((subscription => {\n          logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`);\n          this.subscriptions.subscribe(subscription);\n        }));\n      }\n    }), 500);\n  }\n}\n\nclass Subscriptions {\n  constructor(consumer) {\n    this.consumer = consumer;\n    this.guarantor = new SubscriptionGuarantor(this);\n    this.subscriptions = [];\n  }\n  create(channelName, mixin) {\n    const channel = channelName;\n    const params = typeof channel === \"object\" ? channel : {\n      channel: channel\n    };\n    const subscription = new Subscription(this.consumer, params, mixin);\n    return this.add(subscription);\n  }\n  add(subscription) {\n    this.subscriptions.push(subscription);\n    this.consumer.ensureActiveConnection();\n    this.notify(subscription, \"initialized\");\n    this.subscribe(subscription);\n    return subscription;\n  }\n  remove(subscription) {\n    this.forget(subscription);\n    if (!this.findAll(subscription.identifier).length) {\n      this.sendCommand(subscription, \"unsubscribe\");\n    }\n    return subscription;\n  }\n  reject(identifier) {\n    return this.findAll(identifier).map((subscription => {\n      this.forget(subscription);\n      this.notify(subscription, \"rejected\");\n      return subscription;\n    }));\n  }\n  forget(subscription) {\n    this.guarantor.forget(subscription);\n    this.subscriptions = this.subscriptions.filter((s => s !== subscription));\n    return subscription;\n  }\n  findAll(identifier) {\n    return this.subscriptions.filter((s => s.identifier === identifier));\n  }\n  reload() {\n    return this.subscriptions.map((subscription => this.subscribe(subscription)));\n  }\n  notifyAll(callbackName, ...args) {\n    return this.subscriptions.map((subscription => this.notify(subscription, callbackName, ...args)));\n  }\n  notify(subscription, callbackName, ...args) {\n    let subscriptions;\n    if (typeof subscription === \"string\") {\n      subscriptions = this.findAll(subscription);\n    } else {\n      subscriptions = [ subscription ];\n    }\n    return subscriptions.map((subscription => typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined));\n  }\n  subscribe(subscription) {\n    if (this.sendCommand(subscription, \"subscribe\")) {\n      this.guarantor.guarantee(subscription);\n    }\n  }\n  confirmSubscription(identifier) {\n    logger.log(`Subscription confirmed ${identifier}`);\n    this.findAll(identifier).map((subscription => this.guarantor.forget(subscription)));\n  }\n  sendCommand(subscription, command) {\n    const {identifier: identifier} = subscription;\n    return this.consumer.send({\n      command: command,\n      identifier: identifier\n    });\n  }\n}\n\nclass Consumer {\n  constructor(url) {\n    this._url = url;\n    this.subscriptions = new Subscriptions(this);\n    this.connection = new Connection(this);\n    this.subprotocols = [];\n  }\n  get url() {\n    return createWebSocketURL(this._url);\n  }\n  send(data) {\n    return this.connection.send(data);\n  }\n  connect() {\n    return this.connection.open();\n  }\n  disconnect() {\n    return this.connection.close({\n      allowReconnect: false\n    });\n  }\n  ensureActiveConnection() {\n    if (!this.connection.isActive()) {\n      return this.connection.open();\n    }\n  }\n  addSubProtocol(subprotocol) {\n    this.subprotocols = [ ...this.subprotocols, subprotocol ];\n  }\n}\n\nfunction createWebSocketURL(url) {\n  if (typeof url === \"function\") {\n    url = url();\n  }\n  if (url && !/^wss?:/i.test(url)) {\n    const a = document.createElement(\"a\");\n    a.href = url;\n    a.href = a.href;\n    a.protocol = a.protocol.replace(\"http\", \"ws\");\n    return a.href;\n  } else {\n    return url;\n  }\n}\n\nfunction createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n  return new Consumer(url);\n}\n\nfunction getConfig(name) {\n  const element = document.head.querySelector(`meta[name='action-cable-${name}']`);\n  if (element) {\n    return element.getAttribute(\"content\");\n  }\n}\n\nexport { Connection, ConnectionMonitor, Consumer, INTERNAL, Subscription, SubscriptionGuarantor, Subscriptions, adapters, createConsumer, createWebSocketURL, getConfig, logger };\n", "import * as ActionCable from '@rails/actioncable'\n\nActionCable.logger.enabled = true\n\nwindow.App || (window.App = {});\nwindow.App.cable = ActionCable.createConsumer();\n", "/*!\nTurbo 8.0.23\nCopyright \u00A9 2026 37signals LLC\n */\nconst FrameLoadingStyle = {\n  eager: \"eager\",\n  lazy: \"lazy\"\n};\n\n/**\n * Contains a fragment of HTML which is updated based on navigation within\n * it (e.g. via links or form submissions).\n *\n * @customElement turbo-frame\n * @example\n *   <turbo-frame id=\"messages\">\n *     <a href=\"/messages/expanded\">\n *       Show all expanded messages in this frame.\n *     </a>\n *\n *     <form action=\"/messages\">\n *       Show response from this form within this frame.\n *     </form>\n *   </turbo-frame>\n */\nclass FrameElement extends HTMLElement {\n  static delegateConstructor = undefined\n\n  loaded = Promise.resolve()\n\n  static get observedAttributes() {\n    return [\"disabled\", \"loading\", \"src\"]\n  }\n\n  constructor() {\n    super();\n    this.delegate = new FrameElement.delegateConstructor(this);\n  }\n\n  connectedCallback() {\n    this.delegate.connect();\n  }\n\n  disconnectedCallback() {\n    this.delegate.disconnect();\n  }\n\n  reload() {\n    return this.delegate.sourceURLReloaded()\n  }\n\n  attributeChangedCallback(name) {\n    if (name == \"loading\") {\n      this.delegate.loadingStyleChanged();\n    } else if (name == \"src\") {\n      this.delegate.sourceURLChanged();\n    } else if (name == \"disabled\") {\n      this.delegate.disabledChanged();\n    }\n  }\n\n  /**\n   * Gets the URL to lazily load source HTML from\n   */\n  get src() {\n    return this.getAttribute(\"src\")\n  }\n\n  /**\n   * Sets the URL to lazily load source HTML from\n   */\n  set src(value) {\n    if (value) {\n      this.setAttribute(\"src\", value);\n    } else {\n      this.removeAttribute(\"src\");\n    }\n  }\n\n  /**\n   * Gets the refresh mode for the frame.\n   */\n  get refresh() {\n    return this.getAttribute(\"refresh\")\n  }\n\n  /**\n   * Sets the refresh mode for the frame.\n   */\n  set refresh(value) {\n    if (value) {\n      this.setAttribute(\"refresh\", value);\n    } else {\n      this.removeAttribute(\"refresh\");\n    }\n  }\n\n  get shouldReloadWithMorph() {\n    return this.src && this.refresh === \"morph\"\n  }\n\n  /**\n   * Determines if the element is loading\n   */\n  get loading() {\n    return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\")\n  }\n\n  /**\n   * Sets the value of if the element is loading\n   */\n  set loading(value) {\n    if (value) {\n      this.setAttribute(\"loading\", value);\n    } else {\n      this.removeAttribute(\"loading\");\n    }\n  }\n\n  /**\n   * Gets the disabled state of the frame.\n   *\n   * If disabled, no requests will be intercepted by the frame.\n   */\n  get disabled() {\n    return this.hasAttribute(\"disabled\")\n  }\n\n  /**\n   * Sets the disabled state of the frame.\n   *\n   * If disabled, no requests will be intercepted by the frame.\n   */\n  set disabled(value) {\n    if (value) {\n      this.setAttribute(\"disabled\", \"\");\n    } else {\n      this.removeAttribute(\"disabled\");\n    }\n  }\n\n  /**\n   * Gets the autoscroll state of the frame.\n   *\n   * If true, the frame will be scrolled into view automatically on update.\n   */\n  get autoscroll() {\n    return this.hasAttribute(\"autoscroll\")\n  }\n\n  /**\n   * Sets the autoscroll state of the frame.\n   *\n   * If true, the frame will be scrolled into view automatically on update.\n   */\n  set autoscroll(value) {\n    if (value) {\n      this.setAttribute(\"autoscroll\", \"\");\n    } else {\n      this.removeAttribute(\"autoscroll\");\n    }\n  }\n\n  /**\n   * Determines if the element has finished loading\n   */\n  get complete() {\n    return !this.delegate.isLoading\n  }\n\n  /**\n   * Gets the active state of the frame.\n   *\n   * If inactive, source changes will not be observed.\n   */\n  get isActive() {\n    return this.ownerDocument === document && !this.isPreview\n  }\n\n  /**\n   * Sets the active state of the frame.\n   *\n   * If inactive, source changes will not be observed.\n   */\n  get isPreview() {\n    return this.ownerDocument?.documentElement?.hasAttribute(\"data-turbo-preview\")\n  }\n}\n\nfunction frameLoadingStyleFromString(style) {\n  switch (style.toLowerCase()) {\n    case \"lazy\":\n      return FrameLoadingStyle.lazy\n    default:\n      return FrameLoadingStyle.eager\n  }\n}\n\nconst drive = {\n  enabled: true,\n  progressBarDelay: 500,\n  unvisitableExtensions: new Set(\n    [\n      \".7z\", \".aac\", \".apk\", \".avi\", \".bmp\", \".bz2\", \".css\", \".csv\", \".deb\", \".dmg\", \".doc\",\n      \".docx\", \".exe\", \".gif\", \".gz\", \".heic\", \".heif\", \".ico\", \".iso\", \".jpeg\", \".jpg\",\n      \".js\", \".json\", \".m4a\", \".mkv\", \".mov\", \".mp3\", \".mp4\", \".mpeg\", \".mpg\", \".msi\",\n      \".ogg\", \".ogv\", \".pdf\", \".pkg\", \".png\", \".ppt\", \".pptx\", \".rar\", \".rtf\",\n      \".svg\", \".tar\", \".tif\", \".tiff\", \".txt\", \".wav\", \".webm\", \".webp\", \".wma\", \".wmv\",\n      \".xls\", \".xlsx\", \".xml\", \".zip\"\n    ]\n  )\n};\n\nfunction activateScriptElement(element) {\n  if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n    return element\n  } else {\n    const createdScriptElement = document.createElement(\"script\");\n    const cspNonce = getCspNonce();\n    if (cspNonce) {\n      createdScriptElement.nonce = cspNonce;\n    }\n    createdScriptElement.textContent = element.textContent;\n    createdScriptElement.async = false;\n    copyElementAttributes(createdScriptElement, element);\n    return createdScriptElement\n  }\n}\n\nfunction copyElementAttributes(destinationElement, sourceElement) {\n  for (const { name, value } of sourceElement.attributes) {\n    destinationElement.setAttribute(name, value);\n  }\n}\n\nfunction createDocumentFragment(html) {\n  const template = document.createElement(\"template\");\n  template.innerHTML = html;\n  return template.content\n}\n\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n  const event = new CustomEvent(eventName, {\n    cancelable,\n    bubbles: true,\n    composed: true,\n    detail\n  });\n\n  if (target && target.isConnected) {\n    target.dispatchEvent(event);\n  } else {\n    document.documentElement.dispatchEvent(event);\n  }\n\n  return event\n}\n\nfunction cancelEvent(event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n}\n\nfunction nextRepaint() {\n  if (document.visibilityState === \"hidden\") {\n    return nextEventLoopTick()\n  } else {\n    return nextAnimationFrame()\n  }\n}\n\nfunction nextAnimationFrame() {\n  return new Promise((resolve) => requestAnimationFrame(() => resolve()))\n}\n\nfunction nextEventLoopTick() {\n  return new Promise((resolve) => setTimeout(() => resolve(), 0))\n}\n\nfunction parseHTMLDocument(html = \"\") {\n  return new DOMParser().parseFromString(html, \"text/html\")\n}\n\nfunction unindent(strings, ...values) {\n  const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n  const match = lines[0].match(/^\\s+/);\n  const indent = match ? match[0].length : 0;\n  return lines.map((line) => line.slice(indent)).join(\"\\n\")\n}\n\nfunction interpolate(strings, values) {\n  return strings.reduce((result, string, i) => {\n    const value = values[i] == undefined ? \"\" : values[i];\n    return result + string + value\n  }, \"\")\n}\n\nfunction uuid() {\n  return Array.from({ length: 36 })\n    .map((_, i) => {\n      if (i == 8 || i == 13 || i == 18 || i == 23) {\n        return \"-\"\n      } else if (i == 14) {\n        return \"4\"\n      } else if (i == 19) {\n        return (Math.floor(Math.random() * 4) + 8).toString(16)\n      } else {\n        return Math.floor(Math.random() * 16).toString(16)\n      }\n    })\n    .join(\"\")\n}\n\nfunction getAttribute(attributeName, ...elements) {\n  for (const value of elements.map((element) => element?.getAttribute(attributeName))) {\n    if (typeof value == \"string\") return value\n  }\n\n  return null\n}\n\nfunction hasAttribute(attributeName, ...elements) {\n  return elements.some((element) => element && element.hasAttribute(attributeName))\n}\n\nfunction markAsBusy(...elements) {\n  for (const element of elements) {\n    if (element.localName == \"turbo-frame\") {\n      element.setAttribute(\"busy\", \"\");\n    }\n    element.setAttribute(\"aria-busy\", \"true\");\n  }\n}\n\nfunction clearBusyState(...elements) {\n  for (const element of elements) {\n    if (element.localName == \"turbo-frame\") {\n      element.removeAttribute(\"busy\");\n    }\n\n    element.removeAttribute(\"aria-busy\");\n  }\n}\n\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n  return new Promise((resolve) => {\n    const onComplete = () => {\n      element.removeEventListener(\"error\", onComplete);\n      element.removeEventListener(\"load\", onComplete);\n      resolve();\n    };\n\n    element.addEventListener(\"load\", onComplete, { once: true });\n    element.addEventListener(\"error\", onComplete, { once: true });\n    setTimeout(resolve, timeoutInMilliseconds);\n  })\n}\n\nfunction getHistoryMethodForAction(action) {\n  switch (action) {\n    case \"replace\":\n      return history.replaceState\n    case \"advance\":\n    case \"restore\":\n      return history.pushState\n  }\n}\n\nfunction isAction(action) {\n  return action == \"advance\" || action == \"replace\" || action == \"restore\"\n}\n\nfunction getVisitAction(...elements) {\n  const action = getAttribute(\"data-turbo-action\", ...elements);\n\n  return isAction(action) ? action : null\n}\n\nfunction getMetaElement(name) {\n  return document.querySelector(`meta[name=\"${name}\"]`)\n}\n\nfunction getMetaContent(name) {\n  const element = getMetaElement(name);\n  return element && element.content\n}\n\nfunction getCspNonce() {\n  const element = getMetaElement(\"csp-nonce\");\n\n  if (element) {\n    const { nonce, content } = element;\n    return nonce == \"\" ? content : nonce\n  }\n}\n\nfunction setMetaContent(name, content) {\n  let element = getMetaElement(name);\n\n  if (!element) {\n    element = document.createElement(\"meta\");\n    element.setAttribute(\"name\", name);\n\n    document.head.appendChild(element);\n  }\n\n  element.setAttribute(\"content\", content);\n\n  return element\n}\n\nfunction findClosestRecursively(element, selector) {\n  if (element instanceof Element) {\n    return (\n      element.closest(selector) || findClosestRecursively(element.assignedSlot || element.getRootNode()?.host, selector)\n    )\n  }\n}\n\nfunction elementIsFocusable(element) {\n  const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n\n  return !!element && element.closest(inertDisabledOrHidden) == null && typeof element.focus == \"function\"\n}\n\nfunction queryAutofocusableElement(elementOrDocumentFragment) {\n  return Array.from(elementOrDocumentFragment.querySelectorAll(\"[autofocus]\")).find(elementIsFocusable)\n}\n\nasync function around(callback, reader) {\n  const before = reader();\n\n  callback();\n\n  await nextAnimationFrame();\n\n  const after = reader();\n\n  return [before, after]\n}\n\nfunction doesNotTargetIFrame(name) {\n  if (name === \"_blank\") {\n    return false\n  } else if (name) {\n    for (const element of document.getElementsByName(name)) {\n      if (element instanceof HTMLIFrameElement) return false\n    }\n\n    return true\n  } else {\n    return true\n  }\n}\n\nfunction findLinkFromClickTarget(target) {\n  const link = findClosestRecursively(target, \"a[href], a[xlink\\\\:href]\");\n\n  if (!link) return null\n  if (link.href.startsWith(\"#\")) return null\n  if (link.hasAttribute(\"download\")) return null\n\n  const linkTarget = link.getAttribute(\"target\");\n  if (linkTarget && linkTarget !== \"_self\") return null\n\n  return link\n}\n\nfunction debounce(fn, delay) {\n  let timeoutId = null;\n\n  return (...args) => {\n    const callback = () => fn.apply(this, args);\n    clearTimeout(timeoutId);\n    timeoutId = setTimeout(callback, delay);\n  }\n}\n\nconst submitter = {\n  \"aria-disabled\": {\n    beforeSubmit: submitter => {\n      submitter.setAttribute(\"aria-disabled\", \"true\");\n      submitter.addEventListener(\"click\", cancelEvent);\n    },\n\n    afterSubmit: submitter => {\n      submitter.removeAttribute(\"aria-disabled\");\n      submitter.removeEventListener(\"click\", cancelEvent);\n    }\n  },\n\n  \"disabled\": {\n    beforeSubmit: submitter => submitter.disabled = true,\n    afterSubmit: submitter => submitter.disabled = false\n  }\n};\n\nclass Config {\n  #submitter = null\n\n  constructor(config) {\n    Object.assign(this, config);\n  }\n\n  get submitter() {\n    return this.#submitter\n  }\n\n  set submitter(value) {\n    this.#submitter = submitter[value] || value;\n  }\n}\n\nconst forms = new Config({\n  mode: \"on\",\n  submitter: \"disabled\"\n});\n\nconst config = {\n  drive,\n  forms\n};\n\nfunction expandURL(locatable) {\n  return new URL(locatable.toString(), document.baseURI)\n}\n\nfunction getAnchor(url) {\n  let anchorMatch;\n  if (url.hash) {\n    return url.hash.slice(1)\n    // eslint-disable-next-line no-cond-assign\n  } else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n    return anchorMatch[1]\n  }\n}\n\nfunction getAction$1(form, submitter) {\n  const action = submitter?.getAttribute(\"formaction\") || form.getAttribute(\"action\") || form.action;\n\n  return expandURL(action)\n}\n\nfunction getExtension(url) {\n  return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\"\n}\n\nfunction isPrefixedBy(baseURL, url) {\n  const prefix = addTrailingSlash(url.origin + url.pathname);\n  return addTrailingSlash(baseURL.href) === prefix || baseURL.href.startsWith(prefix)\n}\n\nfunction locationIsVisitable(location, rootLocation) {\n  return isPrefixedBy(location, rootLocation) && !config.drive.unvisitableExtensions.has(getExtension(location))\n}\n\nfunction getLocationForLink(link) {\n  return expandURL(link.getAttribute(\"href\") || \"\")\n}\n\nfunction getRequestURL(url) {\n  const anchor = getAnchor(url);\n  return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href\n}\n\nfunction toCacheKey(url) {\n  return getRequestURL(url)\n}\n\nfunction urlsAreEqual(left, right) {\n  return expandURL(left).href == expandURL(right).href\n}\n\nfunction getPathComponents(url) {\n  return url.pathname.split(\"/\").slice(1)\n}\n\nfunction getLastPathComponent(url) {\n  return getPathComponents(url).slice(-1)[0]\n}\n\nfunction addTrailingSlash(value) {\n  return value.endsWith(\"/\") ? value : value + \"/\"\n}\n\nclass FetchResponse {\n  constructor(response) {\n    this.response = response;\n  }\n\n  get succeeded() {\n    return this.response.ok\n  }\n\n  get failed() {\n    return !this.succeeded\n  }\n\n  get clientError() {\n    return this.statusCode >= 400 && this.statusCode <= 499\n  }\n\n  get serverError() {\n    return this.statusCode >= 500 && this.statusCode <= 599\n  }\n\n  get redirected() {\n    return this.response.redirected\n  }\n\n  get location() {\n    return expandURL(this.response.url)\n  }\n\n  get isHTML() {\n    return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/)\n  }\n\n  get statusCode() {\n    return this.response.status\n  }\n\n  get contentType() {\n    return this.header(\"Content-Type\")\n  }\n\n  get responseText() {\n    return this.response.clone().text()\n  }\n\n  get responseHTML() {\n    if (this.isHTML) {\n      return this.response.clone().text()\n    } else {\n      return Promise.resolve(undefined)\n    }\n  }\n\n  header(name) {\n    return this.response.headers.get(name)\n  }\n}\n\nclass LimitedSet extends Set {\n  constructor(maxSize) {\n    super();\n    this.maxSize = maxSize;\n  }\n\n  add(value) {\n    if (this.size >= this.maxSize) {\n      const iterator = this.values();\n      const oldestValue = iterator.next().value;\n      this.delete(oldestValue);\n    }\n    super.add(value);\n  }\n}\n\nconst recentRequests = new LimitedSet(20);\n\nfunction fetchWithTurboHeaders(url, options = {}) {\n  const modifiedHeaders = new Headers(options.headers || {});\n  const requestUID = uuid();\n  recentRequests.add(requestUID);\n  modifiedHeaders.append(\"X-Turbo-Request-Id\", requestUID);\n\n  return window.fetch(url, {\n    ...options,\n    headers: modifiedHeaders\n  })\n}\n\nfunction fetchMethodFromString(method) {\n  switch (method.toLowerCase()) {\n    case \"get\":\n      return FetchMethod.get\n    case \"post\":\n      return FetchMethod.post\n    case \"put\":\n      return FetchMethod.put\n    case \"patch\":\n      return FetchMethod.patch\n    case \"delete\":\n      return FetchMethod.delete\n  }\n}\n\nconst FetchMethod = {\n  get: \"get\",\n  post: \"post\",\n  put: \"put\",\n  patch: \"patch\",\n  delete: \"delete\"\n};\n\nfunction fetchEnctypeFromString(encoding) {\n  switch (encoding.toLowerCase()) {\n    case FetchEnctype.multipart:\n      return FetchEnctype.multipart\n    case FetchEnctype.plain:\n      return FetchEnctype.plain\n    default:\n      return FetchEnctype.urlEncoded\n  }\n}\n\nconst FetchEnctype = {\n  urlEncoded: \"application/x-www-form-urlencoded\",\n  multipart: \"multipart/form-data\",\n  plain: \"text/plain\"\n};\n\nclass FetchRequest {\n  abortController = new AbortController()\n  #resolveRequestPromise = (_value) => {}\n\n  constructor(delegate, method, location, requestBody = new URLSearchParams(), target = null, enctype = FetchEnctype.urlEncoded) {\n    const [url, body] = buildResourceAndBody(expandURL(location), method, requestBody, enctype);\n\n    this.delegate = delegate;\n    this.url = url;\n    this.target = target;\n    this.fetchOptions = {\n      credentials: \"same-origin\",\n      redirect: \"follow\",\n      method: method.toUpperCase(),\n      headers: { ...this.defaultHeaders },\n      body: body,\n      signal: this.abortSignal,\n      referrer: this.delegate.referrer?.href\n    };\n    this.enctype = enctype;\n  }\n\n  get method() {\n    return this.fetchOptions.method\n  }\n\n  set method(value) {\n    const fetchBody = this.isSafe ? this.url.searchParams : this.fetchOptions.body || new FormData();\n    const fetchMethod = fetchMethodFromString(value) || FetchMethod.get;\n\n    this.url.search = \"\";\n\n    const [url, body] = buildResourceAndBody(this.url, fetchMethod, fetchBody, this.enctype);\n\n    this.url = url;\n    this.fetchOptions.body = body;\n    this.fetchOptions.method = fetchMethod.toUpperCase();\n  }\n\n  get headers() {\n    return this.fetchOptions.headers\n  }\n\n  set headers(value) {\n    this.fetchOptions.headers = value;\n  }\n\n  get body() {\n    if (this.isSafe) {\n      return this.url.searchParams\n    } else {\n      return this.fetchOptions.body\n    }\n  }\n\n  set body(value) {\n    this.fetchOptions.body = value;\n  }\n\n  get location() {\n    return this.url\n  }\n\n  get params() {\n    return this.url.searchParams\n  }\n\n  get entries() {\n    return this.body ? Array.from(this.body.entries()) : []\n  }\n\n  cancel() {\n    this.abortController.abort();\n  }\n\n  async perform() {\n    const { fetchOptions } = this;\n    this.delegate.prepareRequest(this);\n    const event = await this.#allowRequestToBeIntercepted(fetchOptions);\n    try {\n      this.delegate.requestStarted(this);\n\n      if (event.detail.fetchRequest) {\n        this.response = event.detail.fetchRequest.response;\n      } else {\n        this.response = fetchWithTurboHeaders(this.url.href, fetchOptions);\n      }\n\n      const response = await this.response;\n      return await this.receive(response)\n    } catch (error) {\n      if (error.name !== \"AbortError\") {\n        if (this.#willDelegateErrorHandling(error)) {\n          this.delegate.requestErrored(this, error);\n        }\n        throw error\n      }\n    } finally {\n      this.delegate.requestFinished(this);\n    }\n  }\n\n  async receive(response) {\n    const fetchResponse = new FetchResponse(response);\n    const event = dispatch(\"turbo:before-fetch-response\", {\n      cancelable: true,\n      detail: { fetchResponse },\n      target: this.target\n    });\n    if (event.defaultPrevented) {\n      this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n    } else if (fetchResponse.succeeded) {\n      this.delegate.requestSucceededWithResponse(this, fetchResponse);\n    } else {\n      this.delegate.requestFailedWithResponse(this, fetchResponse);\n    }\n    return fetchResponse\n  }\n\n  get defaultHeaders() {\n    return {\n      Accept: \"text/html, application/xhtml+xml\"\n    }\n  }\n\n  get isSafe() {\n    return isSafe(this.method)\n  }\n\n  get abortSignal() {\n    return this.abortController.signal\n  }\n\n  acceptResponseType(mimeType) {\n    this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n  }\n\n  async #allowRequestToBeIntercepted(fetchOptions) {\n    const requestInterception = new Promise((resolve) => (this.#resolveRequestPromise = resolve));\n    const event = dispatch(\"turbo:before-fetch-request\", {\n      cancelable: true,\n      detail: {\n        fetchOptions,\n        url: this.url,\n        resume: this.#resolveRequestPromise\n      },\n      target: this.target\n    });\n    this.url = event.detail.url;\n    if (event.defaultPrevented) await requestInterception;\n\n    return event\n  }\n\n  #willDelegateErrorHandling(error) {\n    const event = dispatch(\"turbo:fetch-request-error\", {\n      target: this.target,\n      cancelable: true,\n      detail: { request: this, error: error }\n    });\n\n    return !event.defaultPrevented\n  }\n}\n\nfunction isSafe(fetchMethod) {\n  return fetchMethodFromString(fetchMethod) == FetchMethod.get\n}\n\nfunction buildResourceAndBody(resource, method, requestBody, enctype) {\n  const searchParams =\n    Array.from(requestBody).length > 0 ? new URLSearchParams(entriesExcludingFiles(requestBody)) : resource.searchParams;\n\n  if (isSafe(method)) {\n    return [mergeIntoURLSearchParams(resource, searchParams), null]\n  } else if (enctype == FetchEnctype.urlEncoded) {\n    return [resource, searchParams]\n  } else {\n    return [resource, requestBody]\n  }\n}\n\nfunction entriesExcludingFiles(requestBody) {\n  const entries = [];\n\n  for (const [name, value] of requestBody) {\n    if (value instanceof File) continue\n    else entries.push([name, value]);\n  }\n\n  return entries\n}\n\nfunction mergeIntoURLSearchParams(url, requestBody) {\n  const searchParams = new URLSearchParams(entriesExcludingFiles(requestBody));\n\n  url.search = searchParams.toString();\n\n  return url\n}\n\nclass AppearanceObserver {\n  started = false\n\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.element = element;\n    this.intersectionObserver = new IntersectionObserver(this.intersect);\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      this.intersectionObserver.observe(this.element);\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      this.intersectionObserver.unobserve(this.element);\n    }\n  }\n\n  intersect = (entries) => {\n    const lastEntry = entries.slice(-1)[0];\n    if (lastEntry?.isIntersecting) {\n      this.delegate.elementAppearedInViewport(this.element);\n    }\n  }\n}\n\nclass StreamMessage {\n  static contentType = \"text/vnd.turbo-stream.html\"\n\n  static wrap(message) {\n    if (typeof message == \"string\") {\n      return new this(createDocumentFragment(message))\n    } else {\n      return message\n    }\n  }\n\n  constructor(fragment) {\n    this.fragment = importStreamElements(fragment);\n  }\n}\n\nfunction importStreamElements(fragment) {\n  for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n    const streamElement = document.importNode(element, true);\n\n    for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n      inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n    }\n\n    element.replaceWith(streamElement);\n  }\n\n  return fragment\n}\n\nconst identity = key => key;\n\nclass LRUCache {\n  keys = []\n  entries = {}\n  #toCacheKey\n\n  constructor(size, toCacheKey = identity) {\n    this.size = size;\n    this.#toCacheKey = toCacheKey;\n  }\n\n  has(key) {\n    return this.#toCacheKey(key) in this.entries\n  }\n\n  get(key) {\n    if (this.has(key)) {\n      const entry = this.read(key);\n      this.touch(key);\n      return entry\n    }\n  }\n\n  put(key, entry) {\n    this.write(key, entry);\n    this.touch(key);\n    return entry\n  }\n\n  clear() {\n    for (const key of Object.keys(this.entries)) {\n      this.evict(key);\n    }\n  }\n\n  // Private\n\n  read(key) {\n    return this.entries[this.#toCacheKey(key)]\n  }\n\n  write(key, entry) {\n    this.entries[this.#toCacheKey(key)] = entry;\n  }\n\n  touch(key) {\n    key = this.#toCacheKey(key);\n    const index = this.keys.indexOf(key);\n    if (index > -1) this.keys.splice(index, 1);\n    this.keys.unshift(key);\n    this.trim();\n  }\n\n  trim() {\n    for (const key of this.keys.splice(this.size)) {\n      this.evict(key);\n    }\n  }\n\n  evict(key) {\n    delete this.entries[key];\n  }\n}\n\nconst PREFETCH_DELAY = 100;\n\nclass PrefetchCache extends LRUCache {\n  #prefetchTimeout = null\n  #maxAges = {}\n\n  constructor(size = 1, prefetchDelay = PREFETCH_DELAY) {\n    super(size, toCacheKey);\n    this.prefetchDelay = prefetchDelay;\n  }\n\n  putLater(url, request, ttl) {\n    this.#prefetchTimeout = setTimeout(() => {\n      request.perform();\n      this.put(url, request, ttl);\n      this.#prefetchTimeout = null;\n    }, this.prefetchDelay);\n  }\n\n  put(url, request, ttl = cacheTtl) {\n    super.put(url, request);\n    this.#maxAges[toCacheKey(url)] = new Date(new Date().getTime() + ttl);\n  }\n\n  clear() {\n    super.clear();\n    if (this.#prefetchTimeout) clearTimeout(this.#prefetchTimeout);\n  }\n\n  evict(key) {\n    super.evict(key);\n    delete this.#maxAges[key];\n  }\n\n  has(key) {\n    if (super.has(key)) {\n      const maxAge = this.#maxAges[toCacheKey(key)];\n\n      return maxAge && maxAge > Date.now()\n    } else {\n      return false\n    }\n  }\n}\n\nconst cacheTtl = 10 * 1000;\nconst prefetchCache = new PrefetchCache();\n\nconst FormSubmissionState = {\n  initialized: \"initialized\",\n  requesting: \"requesting\",\n  waiting: \"waiting\",\n  receiving: \"receiving\",\n  stopping: \"stopping\",\n  stopped: \"stopped\"\n};\n\nclass FormSubmission {\n  state = FormSubmissionState.initialized\n\n  static confirmMethod(message) {\n    return Promise.resolve(confirm(message))\n  }\n\n  constructor(delegate, formElement, submitter, mustRedirect = false) {\n    const method = getMethod(formElement, submitter);\n    const action = getAction(getFormAction(formElement, submitter), method);\n    const body = buildFormData(formElement, submitter);\n    const enctype = getEnctype(formElement, submitter);\n\n    this.delegate = delegate;\n    this.formElement = formElement;\n    this.submitter = submitter;\n    this.fetchRequest = new FetchRequest(this, method, action, body, formElement, enctype);\n    this.mustRedirect = mustRedirect;\n  }\n\n  get method() {\n    return this.fetchRequest.method\n  }\n\n  set method(value) {\n    this.fetchRequest.method = value;\n  }\n\n  get action() {\n    return this.fetchRequest.url.toString()\n  }\n\n  set action(value) {\n    this.fetchRequest.url = expandURL(value);\n  }\n\n  get body() {\n    return this.fetchRequest.body\n  }\n\n  get enctype() {\n    return this.fetchRequest.enctype\n  }\n\n  get isSafe() {\n    return this.fetchRequest.isSafe\n  }\n\n  get location() {\n    return this.fetchRequest.url\n  }\n\n  // The submission process\n\n  async start() {\n    const { initialized, requesting } = FormSubmissionState;\n    const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n\n    if (typeof confirmationMessage === \"string\") {\n      const confirmMethod = typeof config.forms.confirm === \"function\" ?\n        config.forms.confirm :\n        FormSubmission.confirmMethod;\n\n      const answer = await confirmMethod(confirmationMessage, this.formElement, this.submitter);\n      if (!answer) {\n        return\n      }\n    }\n\n    if (this.state == initialized) {\n      this.state = requesting;\n      return this.fetchRequest.perform()\n    }\n  }\n\n  stop() {\n    const { stopping, stopped } = FormSubmissionState;\n    if (this.state != stopping && this.state != stopped) {\n      this.state = stopping;\n      this.fetchRequest.cancel();\n      return true\n    }\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(request) {\n    if (!request.isSafe) {\n      const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n      if (token) {\n        request.headers[\"X-CSRF-Token\"] = token;\n      }\n    }\n\n    if (this.requestAcceptsTurboStreamResponse(request)) {\n      request.acceptResponseType(StreamMessage.contentType);\n    }\n  }\n\n  requestStarted(_request) {\n    this.state = FormSubmissionState.waiting;\n    if (this.submitter) config.forms.submitter.beforeSubmit(this.submitter);\n    this.setSubmitsWith();\n    markAsBusy(this.formElement);\n    dispatch(\"turbo:submit-start\", {\n      target: this.formElement,\n      detail: { formSubmission: this }\n    });\n    this.delegate.formSubmissionStarted(this);\n  }\n\n  requestPreventedHandlingResponse(request, response) {\n    prefetchCache.clear();\n\n    this.result = { success: response.succeeded, fetchResponse: response };\n  }\n\n  requestSucceededWithResponse(request, response) {\n    if (response.clientError || response.serverError) {\n      this.delegate.formSubmissionFailedWithResponse(this, response);\n      return\n    }\n\n    prefetchCache.clear();\n\n    if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n      const error = new Error(\"Form responses must redirect to another location\");\n      this.delegate.formSubmissionErrored(this, error);\n    } else {\n      this.state = FormSubmissionState.receiving;\n      this.result = { success: true, fetchResponse: response };\n      this.delegate.formSubmissionSucceededWithResponse(this, response);\n    }\n  }\n\n  requestFailedWithResponse(request, response) {\n    this.result = { success: false, fetchResponse: response };\n    this.delegate.formSubmissionFailedWithResponse(this, response);\n  }\n\n  requestErrored(request, error) {\n    this.result = { success: false, error };\n    this.delegate.formSubmissionErrored(this, error);\n  }\n\n  requestFinished(_request) {\n    this.state = FormSubmissionState.stopped;\n    if (this.submitter) config.forms.submitter.afterSubmit(this.submitter);\n    this.resetSubmitterText();\n    clearBusyState(this.formElement);\n    dispatch(\"turbo:submit-end\", {\n      target: this.formElement,\n      detail: { formSubmission: this, ...this.result }\n    });\n    this.delegate.formSubmissionFinished(this);\n  }\n\n  // Private\n\n  setSubmitsWith() {\n    if (!this.submitter || !this.submitsWith) return\n\n    if (this.submitter.matches(\"button\")) {\n      this.originalSubmitText = this.submitter.innerHTML;\n      this.submitter.innerHTML = this.submitsWith;\n    } else if (this.submitter.matches(\"input\")) {\n      const input = this.submitter;\n      this.originalSubmitText = input.value;\n      input.value = this.submitsWith;\n    }\n  }\n\n  resetSubmitterText() {\n    if (!this.submitter || !this.originalSubmitText) return\n\n    if (this.submitter.matches(\"button\")) {\n      this.submitter.innerHTML = this.originalSubmitText;\n    } else if (this.submitter.matches(\"input\")) {\n      const input = this.submitter;\n      input.value = this.originalSubmitText;\n    }\n  }\n\n  requestMustRedirect(request) {\n    return !request.isSafe && this.mustRedirect\n  }\n\n  requestAcceptsTurboStreamResponse(request) {\n    return !request.isSafe || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement)\n  }\n\n  get submitsWith() {\n    return this.submitter?.getAttribute(\"data-turbo-submits-with\")\n  }\n}\n\nfunction buildFormData(formElement, submitter) {\n  const formData = new FormData(formElement);\n  const name = submitter?.getAttribute(\"name\");\n  const value = submitter?.getAttribute(\"value\");\n\n  if (name) {\n    formData.append(name, value || \"\");\n  }\n\n  return formData\n}\n\nfunction getCookieValue(cookieName) {\n  if (cookieName != null) {\n    const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n    const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n    if (cookie) {\n      const value = cookie.split(\"=\").slice(1).join(\"=\");\n      return value ? decodeURIComponent(value) : undefined\n    }\n  }\n}\n\nfunction responseSucceededWithoutRedirect(response) {\n  return response.statusCode == 200 && !response.redirected\n}\n\nfunction getFormAction(formElement, submitter) {\n  const formElementAction = typeof formElement.action === \"string\" ? formElement.action : null;\n\n  if (submitter?.hasAttribute(\"formaction\")) {\n    return submitter.getAttribute(\"formaction\") || \"\"\n  } else {\n    return formElement.getAttribute(\"action\") || formElementAction || \"\"\n  }\n}\n\nfunction getAction(formAction, fetchMethod) {\n  const action = expandURL(formAction);\n\n  if (isSafe(fetchMethod)) {\n    action.search = \"\";\n  }\n\n  return action\n}\n\nfunction getMethod(formElement, submitter) {\n  const method = submitter?.getAttribute(\"formmethod\") || formElement.getAttribute(\"method\") || \"\";\n  return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get\n}\n\nfunction getEnctype(formElement, submitter) {\n  return fetchEnctypeFromString(submitter?.getAttribute(\"formenctype\") || formElement.enctype)\n}\n\nclass Snapshot {\n  constructor(element) {\n    this.element = element;\n  }\n\n  get activeElement() {\n    return this.element.ownerDocument.activeElement\n  }\n\n  get children() {\n    return [...this.element.children]\n  }\n\n  hasAnchor(anchor) {\n    return this.getElementForAnchor(anchor) != null\n  }\n\n  getElementForAnchor(anchor) {\n    return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null\n  }\n\n  get isConnected() {\n    return this.element.isConnected\n  }\n\n  get firstAutofocusableElement() {\n    return queryAutofocusableElement(this.element)\n  }\n\n  get permanentElements() {\n    return queryPermanentElementsAll(this.element)\n  }\n\n  getPermanentElementById(id) {\n    return getPermanentElementById(this.element, id)\n  }\n\n  getPermanentElementMapForSnapshot(snapshot) {\n    const permanentElementMap = {};\n\n    for (const currentPermanentElement of this.permanentElements) {\n      const { id } = currentPermanentElement;\n      const newPermanentElement = snapshot.getPermanentElementById(id);\n      if (newPermanentElement) {\n        permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n      }\n    }\n\n    return permanentElementMap\n  }\n}\n\nfunction getPermanentElementById(node, id) {\n  return node.querySelector(`#${id}[data-turbo-permanent]`)\n}\n\nfunction queryPermanentElementsAll(node) {\n  return node.querySelectorAll(\"[id][data-turbo-permanent]\")\n}\n\nclass FormSubmitObserver {\n  started = false\n\n  constructor(delegate, eventTarget) {\n    this.delegate = delegate;\n    this.eventTarget = eventTarget;\n  }\n\n  start() {\n    if (!this.started) {\n      this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n      this.started = false;\n    }\n  }\n\n  submitCaptured = () => {\n    this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n    this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n  }\n\n  submitBubbled = (event) => {\n    if (!event.defaultPrevented) {\n      const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n      const submitter = event.submitter || undefined;\n\n      if (\n        form &&\n        submissionDoesNotDismissDialog(form, submitter) &&\n        submissionDoesNotTargetIFrame(form, submitter) &&\n        this.delegate.willSubmitForm(form, submitter)\n      ) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n        this.delegate.formSubmitted(form, submitter);\n      }\n    }\n  }\n}\n\nfunction submissionDoesNotDismissDialog(form, submitter) {\n  const method = submitter?.getAttribute(\"formmethod\") || form.getAttribute(\"method\");\n\n  return method != \"dialog\"\n}\n\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n  const target = submitter?.getAttribute(\"formtarget\") || form.getAttribute(\"target\");\n\n  return doesNotTargetIFrame(target)\n}\n\nclass View {\n  #resolveRenderPromise = (_value) => {}\n  #resolveInterceptionPromise = (_value) => {}\n\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.element = element;\n  }\n\n  // Scrolling\n\n  scrollToAnchor(anchor) {\n    const element = this.snapshot.getElementForAnchor(anchor);\n    if (element) {\n      this.focusElement(element);\n      this.scrollToElement(element);\n    } else {\n      this.scrollToPosition({ x: 0, y: 0 });\n    }\n  }\n\n  scrollToAnchorFromLocation(location) {\n    this.scrollToAnchor(getAnchor(location));\n  }\n\n  scrollToElement(element) {\n    element.scrollIntoView();\n  }\n\n  focusElement(element) {\n    if (element instanceof HTMLElement) {\n      if (element.hasAttribute(\"tabindex\")) {\n        element.focus();\n      } else {\n        element.setAttribute(\"tabindex\", \"-1\");\n        element.focus();\n        element.removeAttribute(\"tabindex\");\n      }\n    }\n  }\n\n  scrollToPosition({ x, y }) {\n    this.scrollRoot.scrollTo(x, y);\n  }\n\n  scrollToTop() {\n    this.scrollToPosition({ x: 0, y: 0 });\n  }\n\n  get scrollRoot() {\n    return window\n  }\n\n  // Rendering\n\n  async render(renderer) {\n    const { isPreview, shouldRender, willRender, newSnapshot: snapshot } = renderer;\n\n    // A workaround to ignore tracked element mismatch reloads when performing\n    // a promoted Visit from a frame navigation\n    const shouldInvalidate = willRender;\n\n    if (shouldRender) {\n      try {\n        this.renderPromise = new Promise((resolve) => (this.#resolveRenderPromise = resolve));\n        this.renderer = renderer;\n        await this.prepareToRenderSnapshot(renderer);\n\n        const renderInterception = new Promise((resolve) => (this.#resolveInterceptionPromise = resolve));\n        const options = { resume: this.#resolveInterceptionPromise, render: this.renderer.renderElement, renderMethod: this.renderer.renderMethod };\n        const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n        if (!immediateRender) await renderInterception;\n\n        await this.renderSnapshot(renderer);\n        this.delegate.viewRenderedSnapshot(snapshot, isPreview, this.renderer.renderMethod);\n        this.delegate.preloadOnLoadLinksForView(this.element);\n        this.finishRenderingSnapshot(renderer);\n      } finally {\n        delete this.renderer;\n        this.#resolveRenderPromise(undefined);\n        delete this.renderPromise;\n      }\n    } else if (shouldInvalidate) {\n      this.invalidate(renderer.reloadReason);\n    }\n  }\n\n  invalidate(reason) {\n    this.delegate.viewInvalidated(reason);\n  }\n\n  async prepareToRenderSnapshot(renderer) {\n    this.markAsPreview(renderer.isPreview);\n    await renderer.prepareToRender();\n  }\n\n  markAsPreview(isPreview) {\n    if (isPreview) {\n      this.element.setAttribute(\"data-turbo-preview\", \"\");\n    } else {\n      this.element.removeAttribute(\"data-turbo-preview\");\n    }\n  }\n\n  markVisitDirection(direction) {\n    this.element.setAttribute(\"data-turbo-visit-direction\", direction);\n  }\n\n  unmarkVisitDirection() {\n    this.element.removeAttribute(\"data-turbo-visit-direction\");\n  }\n\n  async renderSnapshot(renderer) {\n    await renderer.render();\n  }\n\n  finishRenderingSnapshot(renderer) {\n    renderer.finishRendering();\n  }\n}\n\nclass FrameView extends View {\n  missing() {\n    this.element.innerHTML = `<strong class=\"turbo-frame-error\">Content missing</strong>`;\n  }\n\n  get snapshot() {\n    return new Snapshot(this.element)\n  }\n}\n\nclass LinkInterceptor {\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.element = element;\n  }\n\n  start() {\n    this.element.addEventListener(\"click\", this.clickBubbled);\n    document.addEventListener(\"turbo:click\", this.linkClicked);\n    document.addEventListener(\"turbo:before-visit\", this.willVisit);\n  }\n\n  stop() {\n    this.element.removeEventListener(\"click\", this.clickBubbled);\n    document.removeEventListener(\"turbo:click\", this.linkClicked);\n    document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n  }\n\n  clickBubbled = (event) => {\n    if (this.clickEventIsSignificant(event)) {\n      this.clickEvent = event;\n    } else {\n      delete this.clickEvent;\n    }\n  }\n\n  linkClicked = (event) => {\n    if (this.clickEvent && this.clickEventIsSignificant(event)) {\n      if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n        this.clickEvent.preventDefault();\n        event.preventDefault();\n        this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n      }\n    }\n    delete this.clickEvent;\n  }\n\n  willVisit = (_event) => {\n    delete this.clickEvent;\n  }\n\n  clickEventIsSignificant(event) {\n    const target = event.composed ? event.target?.parentElement : event.target;\n    const element = findLinkFromClickTarget(target) || target;\n\n    return element instanceof Element && element.closest(\"turbo-frame, html\") == this.element\n  }\n}\n\nclass LinkClickObserver {\n  started = false\n\n  constructor(delegate, eventTarget) {\n    this.delegate = delegate;\n    this.eventTarget = eventTarget;\n  }\n\n  start() {\n    if (!this.started) {\n      this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n      this.started = false;\n    }\n  }\n\n  clickCaptured = () => {\n    this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n    this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n  }\n\n  clickBubbled = (event) => {\n    if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n      const target = (event.composedPath && event.composedPath()[0]) || event.target;\n      const link = findLinkFromClickTarget(target);\n      if (link && doesNotTargetIFrame(link.target)) {\n        const location = getLocationForLink(link);\n        if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n          event.preventDefault();\n          this.delegate.followedLinkToLocation(link, location);\n        }\n      }\n    }\n  }\n\n  clickEventIsSignificant(event) {\n    return !(\n      (event.target && event.target.isContentEditable) ||\n      event.defaultPrevented ||\n      event.which > 1 ||\n      event.altKey ||\n      event.ctrlKey ||\n      event.metaKey ||\n      event.shiftKey\n    )\n  }\n}\n\nclass FormLinkClickObserver {\n  constructor(delegate, element) {\n    this.delegate = delegate;\n    this.linkInterceptor = new LinkClickObserver(this, element);\n  }\n\n  start() {\n    this.linkInterceptor.start();\n  }\n\n  stop() {\n    this.linkInterceptor.stop();\n  }\n\n  // Link hover observer delegate\n\n  canPrefetchRequestToLocation(link, location) {\n    return false\n  }\n\n  prefetchAndCacheRequestToLocation(link, location) {\n    return\n  }\n\n  // Link click observer delegate\n\n  willFollowLinkToLocation(link, location, originalEvent) {\n    return (\n      this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n      (link.hasAttribute(\"data-turbo-method\") || link.hasAttribute(\"data-turbo-stream\"))\n    )\n  }\n\n  followedLinkToLocation(link, location) {\n    const form = document.createElement(\"form\");\n\n    const type = \"hidden\";\n    for (const [name, value] of location.searchParams) {\n      form.append(Object.assign(document.createElement(\"input\"), { type, name, value }));\n    }\n\n    const action = Object.assign(location, { search: \"\" });\n    form.setAttribute(\"data-turbo\", \"true\");\n    form.setAttribute(\"action\", action.href);\n    form.setAttribute(\"hidden\", \"\");\n\n    const method = link.getAttribute(\"data-turbo-method\");\n    if (method) form.setAttribute(\"method\", method);\n\n    const turboFrame = link.getAttribute(\"data-turbo-frame\");\n    if (turboFrame) form.setAttribute(\"data-turbo-frame\", turboFrame);\n\n    const turboAction = getVisitAction(link);\n    if (turboAction) form.setAttribute(\"data-turbo-action\", turboAction);\n\n    const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n    if (turboConfirm) form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n\n    const turboStream = link.hasAttribute(\"data-turbo-stream\");\n    if (turboStream) form.setAttribute(\"data-turbo-stream\", \"\");\n\n    this.delegate.submittedFormLinkToLocation(link, location, form);\n\n    document.body.appendChild(form);\n    form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n    requestAnimationFrame(() => form.requestSubmit());\n  }\n}\n\nclass Bardo {\n  static async preservingPermanentElements(delegate, permanentElementMap, callback) {\n    const bardo = new this(delegate, permanentElementMap);\n    bardo.enter();\n    await callback();\n    bardo.leave();\n  }\n\n  constructor(delegate, permanentElementMap) {\n    this.delegate = delegate;\n    this.permanentElementMap = permanentElementMap;\n  }\n\n  enter() {\n    for (const id in this.permanentElementMap) {\n      const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n      this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n      this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n    }\n  }\n\n  leave() {\n    for (const id in this.permanentElementMap) {\n      const [currentPermanentElement] = this.permanentElementMap[id];\n      this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n      this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n      this.delegate.leavingBardo(currentPermanentElement);\n    }\n  }\n\n  replaceNewPermanentElementWithPlaceholder(permanentElement) {\n    const placeholder = createPlaceholderForPermanentElement(permanentElement);\n    permanentElement.replaceWith(placeholder);\n  }\n\n  replaceCurrentPermanentElementWithClone(permanentElement) {\n    const clone = permanentElement.cloneNode(true);\n    permanentElement.replaceWith(clone);\n  }\n\n  replacePlaceholderWithPermanentElement(permanentElement) {\n    const placeholder = this.getPlaceholderById(permanentElement.id);\n    placeholder?.replaceWith(permanentElement);\n  }\n\n  getPlaceholderById(id) {\n    return this.placeholders.find((element) => element.content == id)\n  }\n\n  get placeholders() {\n    return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")]\n  }\n}\n\nfunction createPlaceholderForPermanentElement(permanentElement) {\n  const element = document.createElement(\"meta\");\n  element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n  element.setAttribute(\"content\", permanentElement.id);\n  return element\n}\n\nclass Renderer {\n  #activeElement = null\n\n  static renderElement(currentElement, newElement) {\n    // Abstract method\n  }\n\n  constructor(currentSnapshot, newSnapshot, isPreview, willRender = true) {\n    this.currentSnapshot = currentSnapshot;\n    this.newSnapshot = newSnapshot;\n    this.isPreview = isPreview;\n    this.willRender = willRender;\n    this.renderElement = this.constructor.renderElement;\n    this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n  }\n\n  get shouldRender() {\n    return true\n  }\n\n  get shouldAutofocus() {\n    return true\n  }\n\n  get reloadReason() {\n    return\n  }\n\n  prepareToRender() {\n    return\n  }\n\n  render() {\n    // Abstract method\n  }\n\n  finishRendering() {\n    if (this.resolvingFunctions) {\n      this.resolvingFunctions.resolve();\n      delete this.resolvingFunctions;\n    }\n  }\n\n  async preservingPermanentElements(callback) {\n    await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n  }\n\n  focusFirstAutofocusableElement() {\n    if (this.shouldAutofocus) {\n      const element = this.connectedSnapshot.firstAutofocusableElement;\n      if (element) {\n        element.focus();\n      }\n    }\n  }\n\n  // Bardo delegate\n\n  enteringBardo(currentPermanentElement) {\n    if (this.#activeElement) return\n\n    if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n      this.#activeElement = this.currentSnapshot.activeElement;\n    }\n  }\n\n  leavingBardo(currentPermanentElement) {\n    if (currentPermanentElement.contains(this.#activeElement) && this.#activeElement instanceof HTMLElement) {\n      this.#activeElement.focus();\n\n      this.#activeElement = null;\n    }\n  }\n\n  get connectedSnapshot() {\n    return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot\n  }\n\n  get currentElement() {\n    return this.currentSnapshot.element\n  }\n\n  get newElement() {\n    return this.newSnapshot.element\n  }\n\n  get permanentElementMap() {\n    return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)\n  }\n\n  get renderMethod() {\n    return \"replace\"\n  }\n}\n\nclass FrameRenderer extends Renderer {\n  static renderElement(currentElement, newElement) {\n    const destinationRange = document.createRange();\n    destinationRange.selectNodeContents(currentElement);\n    destinationRange.deleteContents();\n\n    const frameElement = newElement;\n    const sourceRange = frameElement.ownerDocument?.createRange();\n    if (sourceRange) {\n      sourceRange.selectNodeContents(frameElement);\n      currentElement.appendChild(sourceRange.extractContents());\n    }\n  }\n\n  constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n    super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n    this.delegate = delegate;\n  }\n\n  get shouldRender() {\n    return true\n  }\n\n  async render() {\n    await nextRepaint();\n    this.preservingPermanentElements(() => {\n      this.loadFrameElement();\n    });\n    this.scrollFrameIntoView();\n    await nextRepaint();\n    this.focusFirstAutofocusableElement();\n    await nextRepaint();\n    this.activateScriptElements();\n  }\n\n  loadFrameElement() {\n    this.delegate.willRenderFrame(this.currentElement, this.newElement);\n    this.renderElement(this.currentElement, this.newElement);\n  }\n\n  scrollFrameIntoView() {\n    if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n      const element = this.currentElement.firstElementChild;\n      const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n      const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n\n      if (element) {\n        element.scrollIntoView({ block, behavior });\n        return true\n      }\n    }\n    return false\n  }\n\n  activateScriptElements() {\n    for (const inertScriptElement of this.newScriptElements) {\n      const activatedScriptElement = activateScriptElement(inertScriptElement);\n      inertScriptElement.replaceWith(activatedScriptElement);\n    }\n  }\n\n  get newScriptElements() {\n    return this.currentElement.querySelectorAll(\"script\")\n  }\n}\n\nfunction readScrollLogicalPosition(value, defaultValue) {\n  if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n    return value\n  } else {\n    return defaultValue\n  }\n}\n\nfunction readScrollBehavior(value, defaultValue) {\n  if (value == \"auto\" || value == \"smooth\") {\n    return value\n  } else {\n    return defaultValue\n  }\n}\n\n/**\n * @typedef {object} ConfigHead\n *\n * @property {'merge' | 'append' | 'morph' | 'none'} [style]\n * @property {boolean} [block]\n * @property {boolean} [ignore]\n * @property {function(Element): boolean} [shouldPreserve]\n * @property {function(Element): boolean} [shouldReAppend]\n * @property {function(Element): boolean} [shouldRemove]\n * @property {function(Element, {added: Node[], kept: Element[], removed: Element[]}): void} [afterHeadMorphed]\n */\n\n/**\n * @typedef {object} ConfigCallbacks\n *\n * @property {function(Node): boolean} [beforeNodeAdded]\n * @property {function(Node): void} [afterNodeAdded]\n * @property {function(Element, Node): boolean} [beforeNodeMorphed]\n * @property {function(Element, Node): void} [afterNodeMorphed]\n * @property {function(Element): boolean} [beforeNodeRemoved]\n * @property {function(Element): void} [afterNodeRemoved]\n * @property {function(string, Element, \"update\" | \"remove\"): boolean} [beforeAttributeUpdated]\n */\n\n/**\n * @typedef {object} Config\n *\n * @property {'outerHTML' | 'innerHTML'} [morphStyle]\n * @property {boolean} [ignoreActive]\n * @property {boolean} [ignoreActiveValue]\n * @property {boolean} [restoreFocus]\n * @property {ConfigCallbacks} [callbacks]\n * @property {ConfigHead} [head]\n */\n\n/**\n * @typedef {function} NoOp\n *\n * @returns {void}\n */\n\n/**\n * @typedef {object} ConfigHeadInternal\n *\n * @property {'merge' | 'append' | 'morph' | 'none'} style\n * @property {boolean} [block]\n * @property {boolean} [ignore]\n * @property {(function(Element): boolean) | NoOp} shouldPreserve\n * @property {(function(Element): boolean) | NoOp} shouldReAppend\n * @property {(function(Element): boolean) | NoOp} shouldRemove\n * @property {(function(Element, {added: Node[], kept: Element[], removed: Element[]}): void) | NoOp} afterHeadMorphed\n */\n\n/**\n * @typedef {object} ConfigCallbacksInternal\n *\n * @property {(function(Node): boolean) | NoOp} beforeNodeAdded\n * @property {(function(Node): void) | NoOp} afterNodeAdded\n * @property {(function(Node, Node): boolean) | NoOp} beforeNodeMorphed\n * @property {(function(Node, Node): void) | NoOp} afterNodeMorphed\n * @property {(function(Node): boolean) | NoOp} beforeNodeRemoved\n * @property {(function(Node): void) | NoOp} afterNodeRemoved\n * @property {(function(string, Element, \"update\" | \"remove\"): boolean) | NoOp} beforeAttributeUpdated\n */\n\n/**\n * @typedef {object} ConfigInternal\n *\n * @property {'outerHTML' | 'innerHTML'} morphStyle\n * @property {boolean} [ignoreActive]\n * @property {boolean} [ignoreActiveValue]\n * @property {boolean} [restoreFocus]\n * @property {ConfigCallbacksInternal} callbacks\n * @property {ConfigHeadInternal} head\n */\n\n/**\n * @typedef {Object} IdSets\n * @property {Set<string>} persistentIds\n * @property {Map<Node, Set<string>>} idMap\n */\n\n/**\n * @typedef {Function} Morph\n *\n * @param {Element | Document} oldNode\n * @param {Element | Node | HTMLCollection | Node[] | string | null} newContent\n * @param {Config} [config]\n * @returns {undefined | Node[]}\n */\n\n// base IIFE to define idiomorph\n/**\n *\n * @type {{defaults: ConfigInternal, morph: Morph}}\n */\nvar Idiomorph = (function () {\n\n  /**\n   * @typedef {object} MorphContext\n   *\n   * @property {Element} target\n   * @property {Element} newContent\n   * @property {ConfigInternal} config\n   * @property {ConfigInternal['morphStyle']} morphStyle\n   * @property {ConfigInternal['ignoreActive']} ignoreActive\n   * @property {ConfigInternal['ignoreActiveValue']} ignoreActiveValue\n   * @property {ConfigInternal['restoreFocus']} restoreFocus\n   * @property {Map<Node, Set<string>>} idMap\n   * @property {Set<string>} persistentIds\n   * @property {ConfigInternal['callbacks']} callbacks\n   * @property {ConfigInternal['head']} head\n   * @property {HTMLDivElement} pantry\n   * @property {Element[]} activeElementAndParents\n   */\n\n  //=============================================================================\n  // AND NOW IT BEGINS...\n  //=============================================================================\n\n  const noOp = () => {};\n  /**\n   * Default configuration values, updatable by users now\n   * @type {ConfigInternal}\n   */\n  const defaults = {\n    morphStyle: \"outerHTML\",\n    callbacks: {\n      beforeNodeAdded: noOp,\n      afterNodeAdded: noOp,\n      beforeNodeMorphed: noOp,\n      afterNodeMorphed: noOp,\n      beforeNodeRemoved: noOp,\n      afterNodeRemoved: noOp,\n      beforeAttributeUpdated: noOp,\n    },\n    head: {\n      style: \"merge\",\n      shouldPreserve: (elt) => elt.getAttribute(\"im-preserve\") === \"true\",\n      shouldReAppend: (elt) => elt.getAttribute(\"im-re-append\") === \"true\",\n      shouldRemove: noOp,\n      afterHeadMorphed: noOp,\n    },\n    restoreFocus: true,\n  };\n\n  /**\n   * Core idiomorph function for morphing one DOM tree to another\n   *\n   * @param {Element | Document} oldNode\n   * @param {Element | Node | HTMLCollection | Node[] | string | null} newContent\n   * @param {Config} [config]\n   * @returns {Promise<Node[]> | Node[]}\n   */\n  function morph(oldNode, newContent, config = {}) {\n    oldNode = normalizeElement(oldNode);\n    const newNode = normalizeParent(newContent);\n    const ctx = createMorphContext(oldNode, newNode, config);\n\n    const morphedNodes = saveAndRestoreFocus(ctx, () => {\n      return withHeadBlocking(\n        ctx,\n        oldNode,\n        newNode,\n        /** @param {MorphContext} ctx */ (ctx) => {\n          if (ctx.morphStyle === \"innerHTML\") {\n            morphChildren(ctx, oldNode, newNode);\n            return Array.from(oldNode.childNodes);\n          } else {\n            return morphOuterHTML(ctx, oldNode, newNode);\n          }\n        },\n      );\n    });\n\n    ctx.pantry.remove();\n    return morphedNodes;\n  }\n\n  /**\n   * Morph just the outerHTML of the oldNode to the newContent\n   * We have to be careful because the oldNode could have siblings which need to be untouched\n   * @param {MorphContext} ctx\n   * @param {Element} oldNode\n   * @param {Element} newNode\n   * @returns {Node[]}\n   */\n  function morphOuterHTML(ctx, oldNode, newNode) {\n    const oldParent = normalizeParent(oldNode);\n    morphChildren(\n      ctx,\n      oldParent,\n      newNode,\n      // these two optional params are the secret sauce\n      oldNode, // start point for iteration\n      oldNode.nextSibling, // end point for iteration\n    );\n    // this is safe even with siblings, because normalizeParent returns a SlicedParentNode if needed.\n    return Array.from(oldParent.childNodes);\n  }\n\n  /**\n   * @param {MorphContext} ctx\n   * @param {Function} fn\n   * @returns {Promise<Node[]> | Node[]}\n   */\n  function saveAndRestoreFocus(ctx, fn) {\n    if (!ctx.config.restoreFocus) return fn();\n    let activeElement =\n      /** @type {HTMLInputElement|HTMLTextAreaElement|null} */ (\n        document.activeElement\n      );\n\n    // don't bother if the active element is not an input or textarea\n    if (\n      !(\n        activeElement instanceof HTMLInputElement ||\n        activeElement instanceof HTMLTextAreaElement\n      )\n    ) {\n      return fn();\n    }\n\n    const { id: activeElementId, selectionStart, selectionEnd } = activeElement;\n\n    const results = fn();\n\n    if (\n      activeElementId &&\n      activeElementId !== document.activeElement?.getAttribute(\"id\")\n    ) {\n      activeElement = ctx.target.querySelector(`[id=\"${activeElementId}\"]`);\n      activeElement?.focus();\n    }\n    if (activeElement && !activeElement.selectionEnd && selectionEnd) {\n      activeElement.setSelectionRange(selectionStart, selectionEnd);\n    }\n\n    return results;\n  }\n\n  const morphChildren = (function () {\n    /**\n     * This is the core algorithm for matching up children.  The idea is to use id sets to try to match up\n     * nodes as faithfully as possible.  We greedily match, which allows us to keep the algorithm fast, but\n     * by using id sets, we are able to better match up with content deeper in the DOM.\n     *\n     * Basic algorithm:\n     * - for each node in the new content:\n     *   - search self and siblings for an id set match, falling back to a soft match\n     *   - if match found\n     *     - remove any nodes up to the match:\n     *       - pantry persistent nodes\n     *       - delete the rest\n     *     - morph the match\n     *   - elsif no match found, and node is persistent\n     *     - find its match by querying the old root (future) and pantry (past)\n     *     - move it and its children here\n     *     - morph it\n     *   - else\n     *     - create a new node from scratch as a last result\n     *\n     * @param {MorphContext} ctx the merge context\n     * @param {Element} oldParent the old content that we are merging the new content into\n     * @param {Element} newParent the parent element of the new content\n     * @param {Node|null} [insertionPoint] the point in the DOM we start morphing at (defaults to first child)\n     * @param {Node|null} [endPoint] the point in the DOM we stop morphing at (defaults to after last child)\n     */\n    function morphChildren(\n      ctx,\n      oldParent,\n      newParent,\n      insertionPoint = null,\n      endPoint = null,\n    ) {\n      // normalize\n      if (\n        oldParent instanceof HTMLTemplateElement &&\n        newParent instanceof HTMLTemplateElement\n      ) {\n        // @ts-ignore we can pretend the DocumentFragment is an Element\n        oldParent = oldParent.content;\n        // @ts-ignore ditto\n        newParent = newParent.content;\n      }\n      insertionPoint ||= oldParent.firstChild;\n\n      // run through all the new content\n      for (const newChild of newParent.childNodes) {\n        // once we reach the end of the old parent content skip to the end and insert the rest\n        if (insertionPoint && insertionPoint != endPoint) {\n          const bestMatch = findBestMatch(\n            ctx,\n            newChild,\n            insertionPoint,\n            endPoint,\n          );\n          if (bestMatch) {\n            // if the node to morph is not at the insertion point then remove/move up to it\n            if (bestMatch !== insertionPoint) {\n              removeNodesBetween(ctx, insertionPoint, bestMatch);\n            }\n            morphNode(bestMatch, newChild, ctx);\n            insertionPoint = bestMatch.nextSibling;\n            continue;\n          }\n        }\n\n        // if the matching node is elsewhere in the original content\n        if (newChild instanceof Element) {\n          // we can pretend the id is non-null because the next `.has` line will reject it if not\n          const newChildId = /** @type {String} */ (\n            newChild.getAttribute(\"id\")\n          );\n          if (ctx.persistentIds.has(newChildId)) {\n            // move it and all its children here and morph\n            const movedChild = moveBeforeById(\n              oldParent,\n              newChildId,\n              insertionPoint,\n              ctx,\n            );\n            morphNode(movedChild, newChild, ctx);\n            insertionPoint = movedChild.nextSibling;\n            continue;\n          }\n        }\n\n        // last resort: insert the new node from scratch\n        const insertedNode = createNode(\n          oldParent,\n          newChild,\n          insertionPoint,\n          ctx,\n        );\n        // could be null if beforeNodeAdded prevented insertion\n        if (insertedNode) {\n          insertionPoint = insertedNode.nextSibling;\n        }\n      }\n\n      // remove any remaining old nodes that didn't match up with new content\n      while (insertionPoint && insertionPoint != endPoint) {\n        const tempNode = insertionPoint;\n        insertionPoint = insertionPoint.nextSibling;\n        removeNode(ctx, tempNode);\n      }\n    }\n\n    /**\n     * This performs the action of inserting a new node while handling situations where the node contains\n     * elements with persistent ids and possible state info we can still preserve by moving in and then morphing\n     *\n     * @param {Element} oldParent\n     * @param {Node} newChild\n     * @param {Node|null} insertionPoint\n     * @param {MorphContext} ctx\n     * @returns {Node|null}\n     */\n    function createNode(oldParent, newChild, insertionPoint, ctx) {\n      if (ctx.callbacks.beforeNodeAdded(newChild) === false) return null;\n      if (ctx.idMap.has(newChild)) {\n        // node has children with ids with possible state so create a dummy elt of same type and apply full morph algorithm\n        const newEmptyChild = document.createElement(\n          /** @type {Element} */ (newChild).tagName,\n        );\n        oldParent.insertBefore(newEmptyChild, insertionPoint);\n        morphNode(newEmptyChild, newChild, ctx);\n        ctx.callbacks.afterNodeAdded(newEmptyChild);\n        return newEmptyChild;\n      } else {\n        // optimisation: no id state to preserve so we can just insert a clone of the newChild and its descendants\n        const newClonedChild = document.importNode(newChild, true); // importNode to not mutate newParent\n        oldParent.insertBefore(newClonedChild, insertionPoint);\n        ctx.callbacks.afterNodeAdded(newClonedChild);\n        return newClonedChild;\n      }\n    }\n\n    //=============================================================================\n    // Matching Functions\n    //=============================================================================\n    const findBestMatch = (function () {\n      /**\n       * Scans forward from the startPoint to the endPoint looking for a match\n       * for the node. It looks for an id set match first, then a soft match.\n       * We abort softmatching if we find two future soft matches, to reduce churn.\n       * @param {Node} node\n       * @param {MorphContext} ctx\n       * @param {Node | null} startPoint\n       * @param {Node | null} endPoint\n       * @returns {Node | null}\n       */\n      function findBestMatch(ctx, node, startPoint, endPoint) {\n        let softMatch = null;\n        let nextSibling = node.nextSibling;\n        let siblingSoftMatchCount = 0;\n\n        let cursor = startPoint;\n        while (cursor && cursor != endPoint) {\n          // soft matching is a prerequisite for id set matching\n          if (isSoftMatch(cursor, node)) {\n            if (isIdSetMatch(ctx, cursor, node)) {\n              return cursor; // found an id set match, we're done!\n            }\n\n            // we haven't yet saved a soft match fallback\n            if (softMatch === null) {\n              // the current soft match will hard match something else in the future, leave it\n              if (!ctx.idMap.has(cursor)) {\n                // save this as the fallback if we get through the loop without finding a hard match\n                softMatch = cursor;\n              }\n            }\n          }\n          if (\n            softMatch === null &&\n            nextSibling &&\n            isSoftMatch(cursor, nextSibling)\n          ) {\n            // The next new node has a soft match with this node, so\n            // increment the count of future soft matches\n            siblingSoftMatchCount++;\n            nextSibling = nextSibling.nextSibling;\n\n            // If there are two future soft matches, block soft matching for this node to allow\n            // future siblings to soft match. This is to reduce churn in the DOM when an element\n            // is prepended.\n            if (siblingSoftMatchCount >= 2) {\n              softMatch = undefined;\n            }\n          }\n\n          // if the current node contains active element, stop looking for better future matches,\n          // because if one is found, this node will be moved to the pantry, reparenting it and thus losing focus\n          // @ts-ignore pretend cursor is Element rather than Node, we're just testing for array inclusion\n          if (ctx.activeElementAndParents.includes(cursor)) break;\n\n          cursor = cursor.nextSibling;\n        }\n\n        return softMatch || null;\n      }\n\n      /**\n       *\n       * @param {MorphContext} ctx\n       * @param {Node} oldNode\n       * @param {Node} newNode\n       * @returns {boolean}\n       */\n      function isIdSetMatch(ctx, oldNode, newNode) {\n        let oldSet = ctx.idMap.get(oldNode);\n        let newSet = ctx.idMap.get(newNode);\n\n        if (!newSet || !oldSet) return false;\n\n        for (const id of oldSet) {\n          // a potential match is an id in the new and old nodes that\n          // has not already been merged into the DOM\n          // But the newNode content we call this on has not been\n          // merged yet and we don't allow duplicate IDs so it is simple\n          if (newSet.has(id)) {\n            return true;\n          }\n        }\n        return false;\n      }\n\n      /**\n       *\n       * @param {Node} oldNode\n       * @param {Node} newNode\n       * @returns {boolean}\n       */\n      function isSoftMatch(oldNode, newNode) {\n        // ok to cast: if one is not element, `id` and `tagName` will be undefined and we'll just compare that.\n        const oldElt = /** @type {Element} */ (oldNode);\n        const newElt = /** @type {Element} */ (newNode);\n\n        return (\n          oldElt.nodeType === newElt.nodeType &&\n          oldElt.tagName === newElt.tagName &&\n          // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.\n          // We'll still match an anonymous node with an IDed newElt, though, because if it got this far,\n          // its not persistent, and new nodes can't have any hidden state.\n          // We can't use .id because of form input shadowing, and we can't count on .getAttribute's presence because it could be a document-fragment\n          (!oldElt.getAttribute?.(\"id\") ||\n            oldElt.getAttribute?.(\"id\") === newElt.getAttribute?.(\"id\"))\n        );\n      }\n\n      return findBestMatch;\n    })();\n\n    //=============================================================================\n    // DOM Manipulation Functions\n    //=============================================================================\n\n    /**\n     * Gets rid of an unwanted DOM node; strategy depends on nature of its reuse:\n     * - Persistent nodes will be moved to the pantry for later reuse\n     * - Other nodes will have their hooks called, and then are removed\n     * @param {MorphContext} ctx\n     * @param {Node} node\n     */\n    function removeNode(ctx, node) {\n      // are we going to id set match this later?\n      if (ctx.idMap.has(node)) {\n        // skip callbacks and move to pantry\n        moveBefore(ctx.pantry, node, null);\n      } else {\n        // remove for realsies\n        if (ctx.callbacks.beforeNodeRemoved(node) === false) return;\n        node.parentNode?.removeChild(node);\n        ctx.callbacks.afterNodeRemoved(node);\n      }\n    }\n\n    /**\n     * Remove nodes between the start and end nodes\n     * @param {MorphContext} ctx\n     * @param {Node} startInclusive\n     * @param {Node} endExclusive\n     * @returns {Node|null}\n     */\n    function removeNodesBetween(ctx, startInclusive, endExclusive) {\n      /** @type {Node | null} */\n      let cursor = startInclusive;\n      // remove nodes until the endExclusive node\n      while (cursor && cursor !== endExclusive) {\n        let tempNode = /** @type {Node} */ (cursor);\n        cursor = cursor.nextSibling;\n        removeNode(ctx, tempNode);\n      }\n      return cursor;\n    }\n\n    /**\n     * Search for an element by id within the document and pantry, and move it using moveBefore.\n     *\n     * @param {Element} parentNode - The parent node to which the element will be moved.\n     * @param {string} id - The ID of the element to be moved.\n     * @param {Node | null} after - The reference node to insert the element before.\n     *                              If `null`, the element is appended as the last child.\n     * @param {MorphContext} ctx\n     * @returns {Element} The found element\n     */\n    function moveBeforeById(parentNode, id, after, ctx) {\n      const target =\n        /** @type {Element} - will always be found */\n        (\n          // ctx.target.id unsafe because of form input shadowing\n          // ctx.target could be a document fragment which doesn't have `getAttribute`\n          (ctx.target.getAttribute?.(\"id\") === id && ctx.target) ||\n            ctx.target.querySelector(`[id=\"${id}\"]`) ||\n            ctx.pantry.querySelector(`[id=\"${id}\"]`)\n        );\n      removeElementFromAncestorsIdMaps(target, ctx);\n      moveBefore(parentNode, target, after);\n      return target;\n    }\n\n    /**\n     * Removes an element from its ancestors' id maps. This is needed when an element is moved from the\n     * \"future\" via `moveBeforeId`. Otherwise, its erstwhile ancestors could be mistakenly moved to the\n     * pantry rather than being deleted, preventing their removal hooks from being called.\n     *\n     * @param {Element} element - element to remove from its ancestors' id maps\n     * @param {MorphContext} ctx\n     */\n    function removeElementFromAncestorsIdMaps(element, ctx) {\n      // we know id is non-null String, because this function is only called on elements with ids\n      const id = /** @type {String} */ (element.getAttribute(\"id\"));\n      /** @ts-ignore - safe to loop in this way **/\n      while ((element = element.parentNode)) {\n        let idSet = ctx.idMap.get(element);\n        if (idSet) {\n          idSet.delete(id);\n          if (!idSet.size) {\n            ctx.idMap.delete(element);\n          }\n        }\n      }\n    }\n\n    /**\n     * Moves an element before another element within the same parent.\n     * Uses the proposed `moveBefore` API if available (and working), otherwise falls back to `insertBefore`.\n     * This is essentialy a forward-compat wrapper.\n     *\n     * @param {Element} parentNode - The parent node containing the after element.\n     * @param {Node} element - The element to be moved.\n     * @param {Node | null} after - The reference node to insert `element` before.\n     *                              If `null`, `element` is appended as the last child.\n     */\n    function moveBefore(parentNode, element, after) {\n      // @ts-ignore - use proposed moveBefore feature\n      if (parentNode.moveBefore) {\n        try {\n          // @ts-ignore - use proposed moveBefore feature\n          parentNode.moveBefore(element, after);\n        } catch (e) {\n          // fall back to insertBefore as some browsers may fail on moveBefore when trying to move Dom disconnected nodes to pantry\n          parentNode.insertBefore(element, after);\n        }\n      } else {\n        parentNode.insertBefore(element, after);\n      }\n    }\n\n    return morphChildren;\n  })();\n\n  //=============================================================================\n  // Single Node Morphing Code\n  //=============================================================================\n  const morphNode = (function () {\n    /**\n     * @param {Node} oldNode root node to merge content into\n     * @param {Node} newContent new content to merge\n     * @param {MorphContext} ctx the merge context\n     * @returns {Node | null} the element that ended up in the DOM\n     */\n    function morphNode(oldNode, newContent, ctx) {\n      if (ctx.ignoreActive && oldNode === document.activeElement) {\n        // don't morph focused element\n        return null;\n      }\n\n      if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) {\n        return oldNode;\n      }\n\n      if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) ; else if (\n        oldNode instanceof HTMLHeadElement &&\n        ctx.head.style !== \"morph\"\n      ) {\n        // ok to cast: if newContent wasn't also a <head>, it would've got caught in the `!isSoftMatch` branch above\n        handleHeadElement(\n          oldNode,\n          /** @type {HTMLHeadElement} */ (newContent),\n          ctx,\n        );\n      } else {\n        morphAttributes(oldNode, newContent, ctx);\n        if (!ignoreValueOfActiveElement(oldNode, ctx)) {\n          // @ts-ignore newContent can be a node here because .firstChild will be null\n          morphChildren(ctx, oldNode, newContent);\n        }\n      }\n      ctx.callbacks.afterNodeMorphed(oldNode, newContent);\n      return oldNode;\n    }\n\n    /**\n     * syncs the oldNode to the newNode, copying over all attributes and\n     * inner element state from the newNode to the oldNode\n     *\n     * @param {Node} oldNode the node to copy attributes & state to\n     * @param {Node} newNode the node to copy attributes & state from\n     * @param {MorphContext} ctx the merge context\n     */\n    function morphAttributes(oldNode, newNode, ctx) {\n      let type = newNode.nodeType;\n\n      // if is an element type, sync the attributes from the\n      // new node into the new node\n      if (type === 1 /* element type */) {\n        const oldElt = /** @type {Element} */ (oldNode);\n        const newElt = /** @type {Element} */ (newNode);\n\n        const oldAttributes = oldElt.attributes;\n        const newAttributes = newElt.attributes;\n        for (const newAttribute of newAttributes) {\n          if (ignoreAttribute(newAttribute.name, oldElt, \"update\", ctx)) {\n            continue;\n          }\n          if (oldElt.getAttribute(newAttribute.name) !== newAttribute.value) {\n            oldElt.setAttribute(newAttribute.name, newAttribute.value);\n          }\n        }\n        // iterate backwards to avoid skipping over items when a delete occurs\n        for (let i = oldAttributes.length - 1; 0 <= i; i--) {\n          const oldAttribute = oldAttributes[i];\n\n          // toAttributes is a live NamedNodeMap, so iteration+mutation is unsafe\n          // e.g. custom element attribute callbacks can remove other attributes\n          if (!oldAttribute) continue;\n\n          if (!newElt.hasAttribute(oldAttribute.name)) {\n            if (ignoreAttribute(oldAttribute.name, oldElt, \"remove\", ctx)) {\n              continue;\n            }\n            oldElt.removeAttribute(oldAttribute.name);\n          }\n        }\n\n        if (!ignoreValueOfActiveElement(oldElt, ctx)) {\n          syncInputValue(oldElt, newElt, ctx);\n        }\n      }\n\n      // sync text nodes\n      if (type === 8 /* comment */ || type === 3 /* text */) {\n        if (oldNode.nodeValue !== newNode.nodeValue) {\n          oldNode.nodeValue = newNode.nodeValue;\n        }\n      }\n    }\n\n    /**\n     * NB: many bothans died to bring us information:\n     *\n     *  https://github.com/patrick-steele-idem/morphdom/blob/master/src/specialElHandlers.js\n     *  https://github.com/choojs/nanomorph/blob/master/lib/morph.jsL113\n     *\n     * @param {Element} oldElement the element to sync the input value to\n     * @param {Element} newElement the element to sync the input value from\n     * @param {MorphContext} ctx the merge context\n     */\n    function syncInputValue(oldElement, newElement, ctx) {\n      if (\n        oldElement instanceof HTMLInputElement &&\n        newElement instanceof HTMLInputElement &&\n        newElement.type !== \"file\"\n      ) {\n        let newValue = newElement.value;\n        let oldValue = oldElement.value;\n\n        // sync boolean attributes\n        syncBooleanAttribute(oldElement, newElement, \"checked\", ctx);\n        syncBooleanAttribute(oldElement, newElement, \"disabled\", ctx);\n\n        if (!newElement.hasAttribute(\"value\")) {\n          if (!ignoreAttribute(\"value\", oldElement, \"remove\", ctx)) {\n            oldElement.value = \"\";\n            oldElement.removeAttribute(\"value\");\n          }\n        } else if (oldValue !== newValue) {\n          if (!ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n            oldElement.setAttribute(\"value\", newValue);\n            oldElement.value = newValue;\n          }\n        }\n        // TODO: QUESTION(1cg): this used to only check `newElement` unlike the other branches -- why?\n        // did I break something?\n      } else if (\n        oldElement instanceof HTMLOptionElement &&\n        newElement instanceof HTMLOptionElement\n      ) {\n        syncBooleanAttribute(oldElement, newElement, \"selected\", ctx);\n      } else if (\n        oldElement instanceof HTMLTextAreaElement &&\n        newElement instanceof HTMLTextAreaElement\n      ) {\n        let newValue = newElement.value;\n        let oldValue = oldElement.value;\n        if (ignoreAttribute(\"value\", oldElement, \"update\", ctx)) {\n          return;\n        }\n        if (newValue !== oldValue) {\n          oldElement.value = newValue;\n        }\n        if (\n          oldElement.firstChild &&\n          oldElement.firstChild.nodeValue !== newValue\n        ) {\n          oldElement.firstChild.nodeValue = newValue;\n        }\n      }\n    }\n\n    /**\n     * @param {Element} oldElement element to write the value to\n     * @param {Element} newElement element to read the value from\n     * @param {string} attributeName the attribute name\n     * @param {MorphContext} ctx the merge context\n     */\n    function syncBooleanAttribute(oldElement, newElement, attributeName, ctx) {\n      // @ts-ignore this function is only used on boolean attrs that are reflected as dom properties\n      const newLiveValue = newElement[attributeName],\n        // @ts-ignore ditto\n        oldLiveValue = oldElement[attributeName];\n      if (newLiveValue !== oldLiveValue) {\n        const ignoreUpdate = ignoreAttribute(\n          attributeName,\n          oldElement,\n          \"update\",\n          ctx,\n        );\n        if (!ignoreUpdate) {\n          // update attribute's associated DOM property\n          // @ts-ignore this function is only used on boolean attrs that are reflected as dom properties\n          oldElement[attributeName] = newElement[attributeName];\n        }\n        if (newLiveValue) {\n          if (!ignoreUpdate) {\n            // https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML\n            // this is the correct way to set a boolean attribute to \"true\"\n            oldElement.setAttribute(attributeName, \"\");\n          }\n        } else {\n          if (!ignoreAttribute(attributeName, oldElement, \"remove\", ctx)) {\n            oldElement.removeAttribute(attributeName);\n          }\n        }\n      }\n    }\n\n    /**\n     * @param {string} attr the attribute to be mutated\n     * @param {Element} element the element that is going to be updated\n     * @param {\"update\" | \"remove\"} updateType\n     * @param {MorphContext} ctx the merge context\n     * @returns {boolean} true if the attribute should be ignored, false otherwise\n     */\n    function ignoreAttribute(attr, element, updateType, ctx) {\n      if (\n        attr === \"value\" &&\n        ctx.ignoreActiveValue &&\n        element === document.activeElement\n      ) {\n        return true;\n      }\n      return (\n        ctx.callbacks.beforeAttributeUpdated(attr, element, updateType) ===\n        false\n      );\n    }\n\n    /**\n     * @param {Node} possibleActiveElement\n     * @param {MorphContext} ctx\n     * @returns {boolean}\n     */\n    function ignoreValueOfActiveElement(possibleActiveElement, ctx) {\n      return (\n        !!ctx.ignoreActiveValue &&\n        possibleActiveElement === document.activeElement &&\n        possibleActiveElement !== document.body\n      );\n    }\n\n    return morphNode;\n  })();\n\n  //=============================================================================\n  // Head Management Functions\n  //=============================================================================\n  /**\n   * @param {MorphContext} ctx\n   * @param {Element} oldNode\n   * @param {Element} newNode\n   * @param {function} callback\n   * @returns {Node[] | Promise<Node[]>}\n   */\n  function withHeadBlocking(ctx, oldNode, newNode, callback) {\n    if (ctx.head.block) {\n      const oldHead = oldNode.querySelector(\"head\");\n      const newHead = newNode.querySelector(\"head\");\n      if (oldHead && newHead) {\n        const promises = handleHeadElement(oldHead, newHead, ctx);\n        // when head promises resolve, proceed ignoring the head tag\n        return Promise.all(promises).then(() => {\n          const newCtx = Object.assign(ctx, {\n            head: {\n              block: false,\n              ignore: true,\n            },\n          });\n          return callback(newCtx);\n        });\n      }\n    }\n    // just proceed if we not head blocking\n    return callback(ctx);\n  }\n\n  /**\n   *  The HEAD tag can be handled specially, either w/ a 'merge' or 'append' style\n   *\n   * @param {Element} oldHead\n   * @param {Element} newHead\n   * @param {MorphContext} ctx\n   * @returns {Promise<void>[]}\n   */\n  function handleHeadElement(oldHead, newHead, ctx) {\n    let added = [];\n    let removed = [];\n    let preserved = [];\n    let nodesToAppend = [];\n\n    // put all new head elements into a Map, by their outerHTML\n    let srcToNewHeadNodes = new Map();\n    for (const newHeadChild of newHead.children) {\n      srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild);\n    }\n\n    // for each elt in the current head\n    for (const currentHeadElt of oldHead.children) {\n      // If the current head element is in the map\n      let inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML);\n      let isReAppended = ctx.head.shouldReAppend(currentHeadElt);\n      let isPreserved = ctx.head.shouldPreserve(currentHeadElt);\n      if (inNewContent || isPreserved) {\n        if (isReAppended) {\n          // remove the current version and let the new version replace it and re-execute\n          removed.push(currentHeadElt);\n        } else {\n          // this element already exists and should not be re-appended, so remove it from\n          // the new content map, preserving it in the DOM\n          srcToNewHeadNodes.delete(currentHeadElt.outerHTML);\n          preserved.push(currentHeadElt);\n        }\n      } else {\n        if (ctx.head.style === \"append\") {\n          // we are appending and this existing element is not new content\n          // so if and only if it is marked for re-append do we do anything\n          if (isReAppended) {\n            removed.push(currentHeadElt);\n            nodesToAppend.push(currentHeadElt);\n          }\n        } else {\n          // if this is a merge, we remove this content since it is not in the new head\n          if (ctx.head.shouldRemove(currentHeadElt) !== false) {\n            removed.push(currentHeadElt);\n          }\n        }\n      }\n    }\n\n    // Push the remaining new head elements in the Map into the\n    // nodes to append to the head tag\n    nodesToAppend.push(...srcToNewHeadNodes.values());\n\n    let promises = [];\n    for (const newNode of nodesToAppend) {\n      // TODO: This could theoretically be null, based on type\n      let newElt = /** @type {ChildNode} */ (\n        document.createRange().createContextualFragment(newNode.outerHTML)\n          .firstChild\n      );\n      if (ctx.callbacks.beforeNodeAdded(newElt) !== false) {\n        if (\n          (\"href\" in newElt && newElt.href) ||\n          (\"src\" in newElt && newElt.src)\n        ) {\n          /** @type {(result?: any) => void} */ let resolve;\n          let promise = new Promise(function (_resolve) {\n            resolve = _resolve;\n          });\n          newElt.addEventListener(\"load\", function () {\n            resolve();\n          });\n          promises.push(promise);\n        }\n        oldHead.appendChild(newElt);\n        ctx.callbacks.afterNodeAdded(newElt);\n        added.push(newElt);\n      }\n    }\n\n    // remove all removed elements, after we have appended the new elements to avoid\n    // additional network requests for things like style sheets\n    for (const removedElement of removed) {\n      if (ctx.callbacks.beforeNodeRemoved(removedElement) !== false) {\n        oldHead.removeChild(removedElement);\n        ctx.callbacks.afterNodeRemoved(removedElement);\n      }\n    }\n\n    ctx.head.afterHeadMorphed(oldHead, {\n      added: added,\n      kept: preserved,\n      removed: removed,\n    });\n    return promises;\n  }\n\n  //=============================================================================\n  // Create Morph Context Functions\n  //=============================================================================\n  const createMorphContext = (function () {\n    /**\n     *\n     * @param {Element} oldNode\n     * @param {Element} newContent\n     * @param {Config} config\n     * @returns {MorphContext}\n     */\n    function createMorphContext(oldNode, newContent, config) {\n      const { persistentIds, idMap } = createIdMaps(oldNode, newContent);\n\n      const mergedConfig = mergeDefaults(config);\n      const morphStyle = mergedConfig.morphStyle || \"outerHTML\";\n      if (![\"innerHTML\", \"outerHTML\"].includes(morphStyle)) {\n        throw `Do not understand how to morph style ${morphStyle}`;\n      }\n\n      return {\n        target: oldNode,\n        newContent: newContent,\n        config: mergedConfig,\n        morphStyle: morphStyle,\n        ignoreActive: mergedConfig.ignoreActive,\n        ignoreActiveValue: mergedConfig.ignoreActiveValue,\n        restoreFocus: mergedConfig.restoreFocus,\n        idMap: idMap,\n        persistentIds: persistentIds,\n        pantry: createPantry(),\n        activeElementAndParents: createActiveElementAndParents(oldNode),\n        callbacks: mergedConfig.callbacks,\n        head: mergedConfig.head,\n      };\n    }\n\n    /**\n     * Deep merges the config object and the Idiomorph.defaults object to\n     * produce a final configuration object\n     * @param {Config} config\n     * @returns {ConfigInternal}\n     */\n    function mergeDefaults(config) {\n      let finalConfig = Object.assign({}, defaults);\n\n      // copy top level stuff into final config\n      Object.assign(finalConfig, config);\n\n      // copy callbacks into final config (do this to deep merge the callbacks)\n      finalConfig.callbacks = Object.assign(\n        {},\n        defaults.callbacks,\n        config.callbacks,\n      );\n\n      // copy head config into final config  (do this to deep merge the head)\n      finalConfig.head = Object.assign({}, defaults.head, config.head);\n\n      return finalConfig;\n    }\n\n    /**\n     * @returns {HTMLDivElement}\n     */\n    function createPantry() {\n      const pantry = document.createElement(\"div\");\n      pantry.hidden = true;\n      document.body.insertAdjacentElement(\"afterend\", pantry);\n      return pantry;\n    }\n\n    /**\n     * @param {Element} oldNode\n     * @returns {Element[]}\n     */\n    function createActiveElementAndParents(oldNode) {\n      /** @type {Element[]} */\n      let activeElementAndParents = [];\n      let elt = document.activeElement;\n      if (elt?.tagName !== \"BODY\" && oldNode.contains(elt)) {\n        while (elt) {\n          activeElementAndParents.push(elt);\n          if (elt === oldNode) break;\n          elt = elt.parentElement;\n        }\n      }\n      return activeElementAndParents;\n    }\n\n    /**\n     * Returns all elements with an ID contained within the root element and its descendants\n     *\n     * @param {Element} root\n     * @returns {Element[]}\n     */\n    function findIdElements(root) {\n      let elements = Array.from(root.querySelectorAll(\"[id]\"));\n      // root could be a document fragment which doesn't have `getAttribute`\n      if (root.getAttribute?.(\"id\")) {\n        elements.push(root);\n      }\n      return elements;\n    }\n\n    /**\n     * A bottom-up algorithm that populates a map of Element -> IdSet.\n     * The idSet for a given element is the set of all IDs contained within its subtree.\n     * As an optimzation, we filter these IDs through the given list of persistent IDs,\n     * because we don't need to bother considering IDed elements that won't be in the new content.\n     *\n     * @param {Map<Node, Set<string>>} idMap\n     * @param {Set<string>} persistentIds\n     * @param {Element} root\n     * @param {Element[]} elements\n     */\n    function populateIdMapWithTree(idMap, persistentIds, root, elements) {\n      for (const elt of elements) {\n        // we can pretend id is non-null String, because the .has line will reject it immediately if not\n        const id = /** @type {String} */ (elt.getAttribute(\"id\"));\n        if (persistentIds.has(id)) {\n          /** @type {Element|null} */\n          let current = elt;\n          // walk up the parent hierarchy of that element, adding the id\n          // of element to the parent's id set\n          while (current) {\n            let idSet = idMap.get(current);\n            // if the id set doesn't exist, create it and insert it in the map\n            if (idSet == null) {\n              idSet = new Set();\n              idMap.set(current, idSet);\n            }\n            idSet.add(id);\n\n            if (current === root) break;\n            current = current.parentElement;\n          }\n        }\n      }\n    }\n\n    /**\n     * This function computes a map of nodes to all ids contained within that node (inclusive of the\n     * node).  This map can be used to ask if two nodes have intersecting sets of ids, which allows\n     * for a looser definition of \"matching\" than tradition id matching, and allows child nodes\n     * to contribute to a parent nodes matching.\n     *\n     * @param {Element} oldContent  the old content that will be morphed\n     * @param {Element} newContent  the new content to morph to\n     * @returns {IdSets}\n     */\n    function createIdMaps(oldContent, newContent) {\n      const oldIdElements = findIdElements(oldContent);\n      const newIdElements = findIdElements(newContent);\n\n      const persistentIds = createPersistentIds(oldIdElements, newIdElements);\n\n      /** @type {Map<Node, Set<string>>} */\n      let idMap = new Map();\n      populateIdMapWithTree(idMap, persistentIds, oldContent, oldIdElements);\n\n      /** @ts-ignore - if newContent is a duck-typed parent, pass its single child node as the root to halt upwards iteration */\n      const newRoot = newContent.__idiomorphRoot || newContent;\n      populateIdMapWithTree(idMap, persistentIds, newRoot, newIdElements);\n\n      return { persistentIds, idMap };\n    }\n\n    /**\n     * This function computes the set of ids that persist between the two contents excluding duplicates\n     *\n     * @param {Element[]} oldIdElements\n     * @param {Element[]} newIdElements\n     * @returns {Set<string>}\n     */\n    function createPersistentIds(oldIdElements, newIdElements) {\n      let duplicateIds = new Set();\n\n      /** @type {Map<string, string>} */\n      let oldIdTagNameMap = new Map();\n      for (const { id, tagName } of oldIdElements) {\n        if (oldIdTagNameMap.has(id)) {\n          duplicateIds.add(id);\n        } else {\n          oldIdTagNameMap.set(id, tagName);\n        }\n      }\n\n      let persistentIds = new Set();\n      for (const { id, tagName } of newIdElements) {\n        if (persistentIds.has(id)) {\n          duplicateIds.add(id);\n        } else if (oldIdTagNameMap.get(id) === tagName) {\n          persistentIds.add(id);\n        }\n        // skip if tag types mismatch because its not possible to morph one tag into another\n      }\n\n      for (const id of duplicateIds) {\n        persistentIds.delete(id);\n      }\n      return persistentIds;\n    }\n\n    return createMorphContext;\n  })();\n\n  //=============================================================================\n  // HTML Normalization Functions\n  //=============================================================================\n  const { normalizeElement, normalizeParent } = (function () {\n    /** @type {WeakSet<Node>} */\n    const generatedByIdiomorph = new WeakSet();\n\n    /**\n     *\n     * @param {Element | Document} content\n     * @returns {Element}\n     */\n    function normalizeElement(content) {\n      if (content instanceof Document) {\n        return content.documentElement;\n      } else {\n        return content;\n      }\n    }\n\n    /**\n     *\n     * @param {null | string | Node | HTMLCollection | Node[] | Document & {generatedByIdiomorph:boolean}} newContent\n     * @returns {Element}\n     */\n    function normalizeParent(newContent) {\n      if (newContent == null) {\n        return document.createElement(\"div\"); // dummy parent element\n      } else if (typeof newContent === \"string\") {\n        return normalizeParent(parseContent(newContent));\n      } else if (\n        generatedByIdiomorph.has(/** @type {Element} */ (newContent))\n      ) {\n        // the template tag created by idiomorph parsing can serve as a dummy parent\n        return /** @type {Element} */ (newContent);\n      } else if (newContent instanceof Node) {\n        if (newContent.parentNode) {\n          // we can't use the parent directly because newContent may have siblings\n          // that we don't want in the morph, and reparenting might be expensive (TODO is it?),\n          // so instead we create a fake parent node that only sees a slice of its children.\n          /** @type {Element} */\n          return /** @type {any} */ (new SlicedParentNode(newContent));\n        } else {\n          // a single node is added as a child to a dummy parent\n          const dummyParent = document.createElement(\"div\");\n          dummyParent.append(newContent);\n          return dummyParent;\n        }\n      } else {\n        // all nodes in the array or HTMLElement collection are consolidated under\n        // a single dummy parent element\n        const dummyParent = document.createElement(\"div\");\n        for (const elt of [...newContent]) {\n          dummyParent.append(elt);\n        }\n        return dummyParent;\n      }\n    }\n\n    /**\n     * A fake duck-typed parent element to wrap a single node, without actually reparenting it.\n     * This is useful because the node may have siblings that we don't want in the morph, and it may also be moved\n     * or replaced with one or more elements during the morph. This class effectively allows us a window into\n     * a slice of a node's children.\n     * \"If it walks like a duck, and quacks like a duck, then it must be a duck!\" -- James Whitcomb Riley (1849\u20131916)\n     */\n    class SlicedParentNode {\n      /** @param {Node} node */\n      constructor(node) {\n        this.originalNode = node;\n        this.realParentNode = /** @type {Element} */ (node.parentNode);\n        this.previousSibling = node.previousSibling;\n        this.nextSibling = node.nextSibling;\n      }\n\n      /** @returns {Node[]} */\n      get childNodes() {\n        // return slice of realParent's current childNodes, based on previousSibling and nextSibling\n        const nodes = [];\n        let cursor = this.previousSibling\n          ? this.previousSibling.nextSibling\n          : this.realParentNode.firstChild;\n        while (cursor && cursor != this.nextSibling) {\n          nodes.push(cursor);\n          cursor = cursor.nextSibling;\n        }\n        return nodes;\n      }\n\n      /**\n       * @param {string} selector\n       * @returns {Element[]}\n       */\n      querySelectorAll(selector) {\n        return this.childNodes.reduce((results, node) => {\n          if (node instanceof Element) {\n            if (node.matches(selector)) results.push(node);\n            const nodeList = node.querySelectorAll(selector);\n            for (let i = 0; i < nodeList.length; i++) {\n              results.push(nodeList[i]);\n            }\n          }\n          return results;\n        }, /** @type {Element[]} */ ([]));\n      }\n\n      /**\n       * @param {Node} node\n       * @param {Node} referenceNode\n       * @returns {Node}\n       */\n      insertBefore(node, referenceNode) {\n        return this.realParentNode.insertBefore(node, referenceNode);\n      }\n\n      /**\n       * @param {Node} node\n       * @param {Node} referenceNode\n       * @returns {Node}\n       */\n      moveBefore(node, referenceNode) {\n        // @ts-ignore - use new moveBefore feature\n        return this.realParentNode.moveBefore(node, referenceNode);\n      }\n\n      /**\n       * for later use with populateIdMapWithTree to halt upwards iteration\n       * @returns {Node}\n       */\n      get __idiomorphRoot() {\n        return this.originalNode;\n      }\n    }\n\n    /**\n     *\n     * @param {string} newContent\n     * @returns {Node | null | DocumentFragment}\n     */\n    function parseContent(newContent) {\n      let parser = new DOMParser();\n\n      // remove svgs to avoid false-positive matches on head, etc.\n      let contentWithSvgsRemoved = newContent.replace(\n        /<svg(\\s[^>]*>|>)([\\s\\S]*?)<\\/svg>/gim,\n        \"\",\n      );\n\n      // if the newContent contains a html, head or body tag, we can simply parse it w/o wrapping\n      if (\n        contentWithSvgsRemoved.match(/<\\/html>/) ||\n        contentWithSvgsRemoved.match(/<\\/head>/) ||\n        contentWithSvgsRemoved.match(/<\\/body>/)\n      ) {\n        let content = parser.parseFromString(newContent, \"text/html\");\n        // if it is a full HTML document, return the document itself as the parent container\n        if (contentWithSvgsRemoved.match(/<\\/html>/)) {\n          generatedByIdiomorph.add(content);\n          return content;\n        } else {\n          // otherwise return the html element as the parent container\n          let htmlElement = content.firstChild;\n          if (htmlElement) {\n            generatedByIdiomorph.add(htmlElement);\n          }\n          return htmlElement;\n        }\n      } else {\n        // if it is partial HTML, wrap it in a template tag to provide a parent element and also to help\n        // deal with touchy tags like tr, tbody, etc.\n        let responseDoc = parser.parseFromString(\n          \"<body><template>\" + newContent + \"</template></body>\",\n          \"text/html\",\n        );\n        let content = /** @type {HTMLTemplateElement} */ (\n          responseDoc.body.querySelector(\"template\")\n        ).content;\n        generatedByIdiomorph.add(content);\n        return content;\n      }\n    }\n\n    return { normalizeElement, normalizeParent };\n  })();\n\n  //=============================================================================\n  // This is what ends up becoming the Idiomorph global object\n  //=============================================================================\n  return {\n    morph,\n    defaults,\n  };\n})();\n\n/**\n * Morph the state of the currentElement based on the attributes and contents of\n * the newElement. Morphing may dispatch turbo:before-morph-element,\n * turbo:before-morph-attribute, and turbo:morph-element events.\n *\n * @param currentElement Element destination of morphing changes\n * @param newElement Element source of morphing changes\n */\nfunction morphElements(currentElement, newElement, { callbacks, ...options } = {}) {\n  Idiomorph.morph(currentElement, newElement, {\n    ...options,\n    callbacks: new DefaultIdiomorphCallbacks(callbacks)\n  });\n}\n\n/**\n * Morph the child elements of the currentElement based on the child elements of\n * the newElement. Morphing children may dispatch turbo:before-morph-element,\n * turbo:before-morph-attribute, and turbo:morph-element events.\n *\n * @param currentElement Element destination of morphing children changes\n * @param newElement Element source of morphing children changes\n */\nfunction morphChildren(currentElement, newElement, options = {}) {\n  morphElements(currentElement, newElement.childNodes, {\n    ...options,\n    morphStyle: \"innerHTML\"\n  });\n}\n\nfunction shouldRefreshFrameWithMorphing(currentFrame, newFrame) {\n  return currentFrame instanceof FrameElement &&\n    currentFrame.shouldReloadWithMorph && (!newFrame || areFramesCompatibleForRefreshing(currentFrame, newFrame)) &&\n    !currentFrame.closest(\"[data-turbo-permanent]\")\n}\n\nfunction areFramesCompatibleForRefreshing(currentFrame, newFrame) {\n  // newFrame cannot yet be an instance of FrameElement because custom\n  // elements don't get initialized until they're attached to the DOM, so\n  // test its Element#nodeName instead\n  return newFrame instanceof Element && newFrame.nodeName === \"TURBO-FRAME\" && currentFrame.id === newFrame.id &&\n  (!newFrame.getAttribute(\"src\") || urlsAreEqual(currentFrame.src, newFrame.getAttribute(\"src\")))\n}\n\nfunction closestFrameReloadableWithMorphing(node) {\n  return node.parentElement.closest(\"turbo-frame[src][refresh=morph]\")\n}\n\nclass DefaultIdiomorphCallbacks {\n  #beforeNodeMorphed\n\n  constructor({ beforeNodeMorphed } = {}) {\n    this.#beforeNodeMorphed = beforeNodeMorphed || (() => true);\n  }\n\n  beforeNodeAdded = (node) => {\n    return !(node.id && node.hasAttribute(\"data-turbo-permanent\") && document.getElementById(node.id))\n  }\n\n  beforeNodeMorphed = (currentElement, newElement) => {\n    if (currentElement instanceof Element) {\n      if (!currentElement.hasAttribute(\"data-turbo-permanent\") && this.#beforeNodeMorphed(currentElement, newElement)) {\n        const event = dispatch(\"turbo:before-morph-element\", {\n          cancelable: true,\n          target: currentElement,\n          detail: { currentElement, newElement }\n        });\n\n        return !event.defaultPrevented\n      } else {\n        return false\n      }\n    }\n  }\n\n  beforeAttributeUpdated = (attributeName, target, mutationType) => {\n    const event = dispatch(\"turbo:before-morph-attribute\", {\n      cancelable: true,\n      target,\n      detail: { attributeName, mutationType }\n    });\n\n    return !event.defaultPrevented\n  }\n\n  beforeNodeRemoved = (node) => {\n    return this.beforeNodeMorphed(node)\n  }\n\n  afterNodeMorphed = (currentElement, newElement) => {\n    if (currentElement instanceof Element) {\n      dispatch(\"turbo:morph-element\", {\n        target: currentElement,\n        detail: { currentElement, newElement }\n      });\n    }\n  }\n}\n\nclass MorphingFrameRenderer extends FrameRenderer {\n  static renderElement(currentElement, newElement) {\n    dispatch(\"turbo:before-frame-morph\", {\n      target: currentElement,\n      detail: { currentElement, newElement }\n    });\n\n    morphChildren(currentElement, newElement, {\n      callbacks: {\n        beforeNodeMorphed: (node, newNode) => {\n          if (\n            shouldRefreshFrameWithMorphing(node, newNode) &&\n              closestFrameReloadableWithMorphing(node) === currentElement\n          ) {\n            node.reload();\n            return false\n          }\n          return true\n        }\n      }\n    });\n  }\n\n  async preservingPermanentElements(callback) {\n    return await callback()\n  }\n}\n\nclass ProgressBar {\n  static animationDuration = 300 /*ms*/\n\n  static get defaultCSS() {\n    return unindent`\n      .turbo-progress-bar {\n        position: fixed;\n        display: block;\n        top: 0;\n        left: 0;\n        height: 3px;\n        background: #0076ff;\n        z-index: 2147483647;\n        transition:\n          width ${ProgressBar.animationDuration}ms ease-out,\n          opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n        transform: translate3d(0, 0, 0);\n      }\n    `\n  }\n\n  hiding = false\n  value = 0\n  visible = false\n\n  constructor() {\n    this.stylesheetElement = this.createStylesheetElement();\n    this.progressElement = this.createProgressElement();\n    this.installStylesheetElement();\n    this.setValue(0);\n  }\n\n  show() {\n    if (!this.visible) {\n      this.visible = true;\n      this.installProgressElement();\n      this.startTrickling();\n    }\n  }\n\n  hide() {\n    if (this.visible && !this.hiding) {\n      this.hiding = true;\n      this.fadeProgressElement(() => {\n        this.uninstallProgressElement();\n        this.stopTrickling();\n        this.visible = false;\n        this.hiding = false;\n      });\n    }\n  }\n\n  setValue(value) {\n    this.value = value;\n    this.refresh();\n  }\n\n  // Private\n\n  installStylesheetElement() {\n    document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n  }\n\n  installProgressElement() {\n    this.progressElement.style.width = \"0\";\n    this.progressElement.style.opacity = \"1\";\n    document.documentElement.insertBefore(this.progressElement, document.body);\n    this.refresh();\n  }\n\n  fadeProgressElement(callback) {\n    this.progressElement.style.opacity = \"0\";\n    setTimeout(callback, ProgressBar.animationDuration * 1.5);\n  }\n\n  uninstallProgressElement() {\n    if (this.progressElement.parentNode) {\n      document.documentElement.removeChild(this.progressElement);\n    }\n  }\n\n  startTrickling() {\n    if (!this.trickleInterval) {\n      this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n    }\n  }\n\n  stopTrickling() {\n    window.clearInterval(this.trickleInterval);\n    delete this.trickleInterval;\n  }\n\n  trickle = () => {\n    this.setValue(this.value + Math.random() / 100);\n  }\n\n  refresh() {\n    requestAnimationFrame(() => {\n      this.progressElement.style.width = `${10 + this.value * 90}%`;\n    });\n  }\n\n  createStylesheetElement() {\n    const element = document.createElement(\"style\");\n    element.type = \"text/css\";\n    element.textContent = ProgressBar.defaultCSS;\n    const cspNonce = getCspNonce();\n    if (cspNonce) {\n      element.nonce = cspNonce;\n    }\n    return element\n  }\n\n  createProgressElement() {\n    const element = document.createElement(\"div\");\n    element.className = \"turbo-progress-bar\";\n    return element\n  }\n}\n\nclass HeadSnapshot extends Snapshot {\n  detailsByOuterHTML = this.children\n    .filter((element) => !elementIsNoscript(element))\n    .map((element) => elementWithoutNonce(element))\n    .reduce((result, element) => {\n      const { outerHTML } = element;\n      const details =\n        outerHTML in result\n          ? result[outerHTML]\n          : {\n              type: elementType(element),\n              tracked: elementIsTracked(element),\n              elements: []\n            };\n      return {\n        ...result,\n        [outerHTML]: {\n          ...details,\n          elements: [...details.elements, element]\n        }\n      }\n    }, {})\n\n  get trackedElementSignature() {\n    return Object.keys(this.detailsByOuterHTML)\n      .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n      .join(\"\")\n  }\n\n  getScriptElementsNotInSnapshot(snapshot) {\n    return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot)\n  }\n\n  getStylesheetElementsNotInSnapshot(snapshot) {\n    return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot)\n  }\n\n  getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n    return Object.keys(this.detailsByOuterHTML)\n      .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n      .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n      .filter(({ type }) => type == matchedType)\n      .map(({ elements: [element] }) => element)\n  }\n\n  get provisionalElements() {\n    return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n      const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n      if (type == null && !tracked) {\n        return [...result, ...elements]\n      } else if (elements.length > 1) {\n        return [...result, ...elements.slice(1)]\n      } else {\n        return result\n      }\n    }, [])\n  }\n\n  getMetaValue(name) {\n    const element = this.findMetaElementByName(name);\n    return element ? element.getAttribute(\"content\") : null\n  }\n\n  findMetaElementByName(name) {\n    return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n      const {\n        elements: [element]\n      } = this.detailsByOuterHTML[outerHTML];\n      return elementIsMetaElementWithName(element, name) ? element : result\n    }, undefined | undefined)\n  }\n}\n\nfunction elementType(element) {\n  if (elementIsScript(element)) {\n    return \"script\"\n  } else if (elementIsStylesheet(element)) {\n    return \"stylesheet\"\n  }\n}\n\nfunction elementIsTracked(element) {\n  return element.getAttribute(\"data-turbo-track\") == \"reload\"\n}\n\nfunction elementIsScript(element) {\n  const tagName = element.localName;\n  return tagName == \"script\"\n}\n\nfunction elementIsNoscript(element) {\n  const tagName = element.localName;\n  return tagName == \"noscript\"\n}\n\nfunction elementIsStylesheet(element) {\n  const tagName = element.localName;\n  return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\")\n}\n\nfunction elementIsMetaElementWithName(element, name) {\n  const tagName = element.localName;\n  return tagName == \"meta\" && element.getAttribute(\"name\") == name\n}\n\nfunction elementWithoutNonce(element) {\n  if (element.hasAttribute(\"nonce\")) {\n    element.setAttribute(\"nonce\", \"\");\n  }\n\n  return element\n}\n\nclass PageSnapshot extends Snapshot {\n  static fromHTMLString(html = \"\") {\n    return this.fromDocument(parseHTMLDocument(html))\n  }\n\n  static fromElement(element) {\n    return this.fromDocument(element.ownerDocument)\n  }\n\n  static fromDocument({ documentElement, body, head }) {\n    return new this(documentElement, body, new HeadSnapshot(head))\n  }\n\n  constructor(documentElement, body, headSnapshot) {\n    super(body);\n    this.documentElement = documentElement;\n    this.headSnapshot = headSnapshot;\n  }\n\n  clone() {\n    const clonedElement = this.element.cloneNode(true);\n\n    const selectElements = this.element.querySelectorAll(\"select\");\n    const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n\n    for (const [index, source] of selectElements.entries()) {\n      const clone = clonedSelectElements[index];\n      for (const option of clone.selectedOptions) option.selected = false;\n      for (const option of source.selectedOptions) clone.options[option.index].selected = true;\n    }\n\n    for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n      clonedPasswordInput.value = \"\";\n    }\n\n    for (const clonedNoscriptElement of clonedElement.querySelectorAll(\"noscript\")) {\n      clonedNoscriptElement.remove();\n    }\n\n    return new PageSnapshot(this.documentElement, clonedElement, this.headSnapshot)\n  }\n\n  get lang() {\n    return this.documentElement.getAttribute(\"lang\")\n  }\n\n  get dir() {\n    return this.documentElement.getAttribute(\"dir\")\n  }\n\n  get headElement() {\n    return this.headSnapshot.element\n  }\n\n  get rootLocation() {\n    const root = this.getSetting(\"root\") ?? \"/\";\n    return expandURL(root)\n  }\n\n  get cacheControlValue() {\n    return this.getSetting(\"cache-control\")\n  }\n\n  get isPreviewable() {\n    return this.cacheControlValue != \"no-preview\"\n  }\n\n  get isCacheable() {\n    return this.cacheControlValue != \"no-cache\"\n  }\n\n  get isVisitable() {\n    return this.getSetting(\"visit-control\") != \"reload\"\n  }\n\n  get prefersViewTransitions() {\n    const viewTransitionEnabled = this.getSetting(\"view-transition\") === \"true\" || this.headSnapshot.getMetaValue(\"view-transition\") === \"same-origin\";\n    return viewTransitionEnabled && !window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n  }\n\n  get refreshMethod() {\n    return this.getSetting(\"refresh-method\")\n  }\n\n  get refreshScroll() {\n    return this.getSetting(\"refresh-scroll\")\n  }\n\n  // Private\n\n  getSetting(name) {\n    return this.headSnapshot.getMetaValue(`turbo-${name}`)\n  }\n}\n\nclass ViewTransitioner {\n  #viewTransitionStarted = false\n  #lastOperation = Promise.resolve()\n\n  renderChange(useViewTransition, render) {\n    if (useViewTransition && this.viewTransitionsAvailable && !this.#viewTransitionStarted) {\n      this.#viewTransitionStarted = true;\n      this.#lastOperation = this.#lastOperation.then(async () => {\n        await document.startViewTransition(render).finished;\n      });\n    } else {\n      this.#lastOperation = this.#lastOperation.then(render);\n    }\n\n    return this.#lastOperation\n  }\n\n  get viewTransitionsAvailable() {\n    return document.startViewTransition\n  }\n}\n\nconst defaultOptions = {\n  action: \"advance\",\n  historyChanged: false,\n  visitCachedSnapshot: () => {},\n  willRender: true,\n  updateHistory: true,\n  shouldCacheSnapshot: true,\n  acceptsStreamResponse: false,\n  refresh: {}\n};\n\nconst TimingMetric = {\n  visitStart: \"visitStart\",\n  requestStart: \"requestStart\",\n  requestEnd: \"requestEnd\",\n  visitEnd: \"visitEnd\"\n};\n\nconst VisitState = {\n  initialized: \"initialized\",\n  started: \"started\",\n  canceled: \"canceled\",\n  failed: \"failed\",\n  completed: \"completed\"\n};\n\nconst SystemStatusCode = {\n  networkFailure: 0,\n  timeoutFailure: -1,\n  contentTypeMismatch: -2\n};\n\nconst Direction = {\n  advance: \"forward\",\n  restore: \"back\",\n  replace: \"none\"\n};\n\nclass Visit {\n  identifier = uuid() // Required by turbo-ios\n  timingMetrics = {}\n\n  followedRedirect = false\n  historyChanged = false\n  scrolled = false\n  shouldCacheSnapshot = true\n  acceptsStreamResponse = false\n  snapshotCached = false\n  state = VisitState.initialized\n  viewTransitioner = new ViewTransitioner()\n\n  constructor(delegate, location, restorationIdentifier, options = {}) {\n    this.delegate = delegate;\n    this.location = location;\n    this.restorationIdentifier = restorationIdentifier || uuid();\n\n    const {\n      action,\n      historyChanged,\n      referrer,\n      snapshot,\n      snapshotHTML,\n      response,\n      visitCachedSnapshot,\n      willRender,\n      updateHistory,\n      shouldCacheSnapshot,\n      acceptsStreamResponse,\n      direction,\n      refresh\n    } = {\n      ...defaultOptions,\n      ...options\n    };\n    this.action = action;\n    this.historyChanged = historyChanged;\n    this.referrer = referrer;\n    this.snapshot = snapshot;\n    this.snapshotHTML = snapshotHTML;\n    this.response = response;\n    this.isPageRefresh = this.view.isPageRefresh(this);\n    this.visitCachedSnapshot = visitCachedSnapshot;\n    this.willRender = willRender;\n    this.updateHistory = updateHistory;\n    this.scrolled = !willRender;\n    this.shouldCacheSnapshot = shouldCacheSnapshot;\n    this.acceptsStreamResponse = acceptsStreamResponse;\n    this.direction = direction || Direction[action];\n    this.refresh = refresh;\n  }\n\n  get adapter() {\n    return this.delegate.adapter\n  }\n\n  get view() {\n    return this.delegate.view\n  }\n\n  get history() {\n    return this.delegate.history\n  }\n\n  get restorationData() {\n    return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)\n  }\n\n  start() {\n    if (this.state == VisitState.initialized) {\n      this.recordTimingMetric(TimingMetric.visitStart);\n      this.state = VisitState.started;\n      this.adapter.visitStarted(this);\n      this.delegate.visitStarted(this);\n    }\n  }\n\n  cancel() {\n    if (this.state == VisitState.started) {\n      if (this.request) {\n        this.request.cancel();\n      }\n      this.cancelRender();\n      this.state = VisitState.canceled;\n    }\n  }\n\n  complete() {\n    if (this.state == VisitState.started) {\n      this.recordTimingMetric(TimingMetric.visitEnd);\n      this.adapter.visitCompleted(this);\n      this.state = VisitState.completed;\n      this.followRedirect();\n\n      if (!this.followedRedirect) {\n        this.delegate.visitCompleted(this);\n      }\n    }\n  }\n\n  fail() {\n    if (this.state == VisitState.started) {\n      this.state = VisitState.failed;\n      this.adapter.visitFailed(this);\n      this.delegate.visitCompleted(this);\n    }\n  }\n\n  changeHistory() {\n    if (!this.historyChanged && this.updateHistory) {\n      const actionForHistory = this.location.href === this.referrer?.href ? \"replace\" : this.action;\n      const method = getHistoryMethodForAction(actionForHistory);\n      this.history.update(method, this.location, this.restorationIdentifier);\n      this.historyChanged = true;\n    }\n  }\n\n  issueRequest() {\n    if (this.hasPreloadedResponse()) {\n      this.simulateRequest();\n    } else if (this.shouldIssueRequest() && !this.request) {\n      this.request = new FetchRequest(this, FetchMethod.get, this.location);\n      this.request.perform();\n    }\n  }\n\n  simulateRequest() {\n    if (this.response) {\n      this.startRequest();\n      this.recordResponse();\n      this.finishRequest();\n    }\n  }\n\n  startRequest() {\n    this.recordTimingMetric(TimingMetric.requestStart);\n    this.adapter.visitRequestStarted(this);\n  }\n\n  recordResponse(response = this.response) {\n    this.response = response;\n    if (response) {\n      const { statusCode } = response;\n      if (isSuccessful(statusCode)) {\n        this.adapter.visitRequestCompleted(this);\n      } else {\n        this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n      }\n    }\n  }\n\n  finishRequest() {\n    this.recordTimingMetric(TimingMetric.requestEnd);\n    this.adapter.visitRequestFinished(this);\n  }\n\n  loadResponse() {\n    if (this.response) {\n      const { statusCode, responseHTML } = this.response;\n      this.render(async () => {\n        if (this.shouldCacheSnapshot) this.cacheSnapshot();\n        if (this.view.renderPromise) await this.view.renderPromise;\n\n        if (isSuccessful(statusCode) && responseHTML != null) {\n          const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n          await this.renderPageSnapshot(snapshot, false);\n\n          this.adapter.visitRendered(this);\n          this.complete();\n        } else {\n          await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n          this.adapter.visitRendered(this);\n          this.fail();\n        }\n      });\n    }\n  }\n\n  getCachedSnapshot() {\n    const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n\n    if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n      if (this.action == \"restore\" || snapshot.isPreviewable) {\n        return snapshot\n      }\n    }\n  }\n\n  getPreloadedSnapshot() {\n    if (this.snapshotHTML) {\n      return PageSnapshot.fromHTMLString(this.snapshotHTML)\n    }\n  }\n\n  hasCachedSnapshot() {\n    return this.getCachedSnapshot() != null\n  }\n\n  loadCachedSnapshot() {\n    const snapshot = this.getCachedSnapshot();\n    if (snapshot) {\n      const isPreview = this.shouldIssueRequest();\n      this.render(async () => {\n        this.cacheSnapshot();\n        if (this.isPageRefresh) {\n          this.adapter.visitRendered(this);\n        } else {\n          if (this.view.renderPromise) await this.view.renderPromise;\n\n          await this.renderPageSnapshot(snapshot, isPreview);\n\n          this.adapter.visitRendered(this);\n          if (!isPreview) {\n            this.complete();\n          }\n        }\n      });\n    }\n  }\n\n  followRedirect() {\n    if (this.redirectedToLocation && !this.followedRedirect && this.response?.redirected) {\n      this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n        action: \"replace\",\n        response: this.response,\n        shouldCacheSnapshot: false,\n        willRender: false\n      });\n      this.followedRedirect = true;\n    }\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(request) {\n    if (this.acceptsStreamResponse) {\n      request.acceptResponseType(StreamMessage.contentType);\n    }\n  }\n\n  requestStarted() {\n    this.startRequest();\n  }\n\n  requestPreventedHandlingResponse(_request, _response) {}\n\n  async requestSucceededWithResponse(request, response) {\n    const responseHTML = await response.responseHTML;\n    const { redirected, statusCode } = response;\n    if (responseHTML == undefined) {\n      this.recordResponse({\n        statusCode: SystemStatusCode.contentTypeMismatch,\n        redirected\n      });\n    } else {\n      this.redirectedToLocation = response.redirected ? response.location : undefined;\n      this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n    }\n  }\n\n  async requestFailedWithResponse(request, response) {\n    const responseHTML = await response.responseHTML;\n    const { redirected, statusCode } = response;\n    if (responseHTML == undefined) {\n      this.recordResponse({\n        statusCode: SystemStatusCode.contentTypeMismatch,\n        redirected\n      });\n    } else {\n      this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n    }\n  }\n\n  requestErrored(_request, _error) {\n    this.recordResponse({\n      statusCode: SystemStatusCode.networkFailure,\n      redirected: false\n    });\n  }\n\n  requestFinished() {\n    this.finishRequest();\n  }\n\n  // Scrolling\n\n  performScroll() {\n    if (!this.scrolled && !this.view.forceReloaded && !this.view.shouldPreserveScrollPosition(this)) {\n      if (this.action == \"restore\") {\n        this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n      } else {\n        this.scrollToAnchor() || this.view.scrollToTop();\n      }\n\n      this.scrolled = true;\n    }\n  }\n\n  scrollToRestoredPosition() {\n    const { scrollPosition } = this.restorationData;\n    if (scrollPosition) {\n      this.view.scrollToPosition(scrollPosition);\n      return true\n    }\n  }\n\n  scrollToAnchor() {\n    const anchor = getAnchor(this.location);\n    if (anchor != null) {\n      this.view.scrollToAnchor(anchor);\n      return true\n    }\n  }\n\n  // Instrumentation\n\n  recordTimingMetric(metric) {\n    this.timingMetrics[metric] = new Date().getTime();\n  }\n\n  getTimingMetrics() {\n    return { ...this.timingMetrics }\n  }\n\n  // Private\n\n  hasPreloadedResponse() {\n    return typeof this.response == \"object\"\n  }\n\n  shouldIssueRequest() {\n    if (this.action == \"restore\") {\n      return !this.hasCachedSnapshot()\n    } else {\n      return this.willRender\n    }\n  }\n\n  cacheSnapshot() {\n    if (!this.snapshotCached) {\n      this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n      this.snapshotCached = true;\n    }\n  }\n\n  async render(callback) {\n    this.cancelRender();\n    await new Promise((resolve) => {\n      this.frame =\n        document.visibilityState === \"hidden\" ? setTimeout(() => resolve(), 0) : requestAnimationFrame(() => resolve());\n    });\n    await callback();\n    delete this.frame;\n  }\n\n  async renderPageSnapshot(snapshot, isPreview) {\n    await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(snapshot), async () => {\n      await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n      this.performScroll();\n    });\n  }\n\n  cancelRender() {\n    if (this.frame) {\n      cancelAnimationFrame(this.frame);\n      delete this.frame;\n    }\n  }\n}\n\nfunction isSuccessful(statusCode) {\n  return statusCode >= 200 && statusCode < 300\n}\n\nclass BrowserAdapter {\n  progressBar = new ProgressBar()\n\n  constructor(session) {\n    this.session = session;\n  }\n\n  visitProposedToLocation(location, options) {\n    if (locationIsVisitable(location, this.navigator.rootLocation)) {\n      this.navigator.startVisit(location, options?.restorationIdentifier || uuid(), options);\n    } else {\n      window.location.href = location.toString();\n    }\n  }\n\n  visitStarted(visit) {\n    this.location = visit.location;\n    this.redirectedToLocation = null;\n\n    visit.loadCachedSnapshot();\n    visit.issueRequest();\n  }\n\n  visitRequestStarted(visit) {\n    this.progressBar.setValue(0);\n    if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n      this.showVisitProgressBarAfterDelay();\n    } else {\n      this.showProgressBar();\n    }\n  }\n\n  visitRequestCompleted(visit) {\n    visit.loadResponse();\n\n    if (visit.response.redirected) {\n      this.redirectedToLocation = visit.redirectedToLocation;\n    }\n  }\n\n  visitRequestFailedWithStatusCode(visit, statusCode) {\n    switch (statusCode) {\n      case SystemStatusCode.networkFailure:\n      case SystemStatusCode.timeoutFailure:\n      case SystemStatusCode.contentTypeMismatch:\n        return this.reload({\n          reason: \"request_failed\",\n          context: {\n            statusCode\n          }\n        })\n      default:\n        return visit.loadResponse()\n    }\n  }\n\n  visitRequestFinished(_visit) {}\n\n  visitCompleted(_visit) {\n    this.progressBar.setValue(1);\n    this.hideVisitProgressBar();\n  }\n\n  pageInvalidated(reason) {\n    this.reload(reason);\n  }\n\n  visitFailed(_visit) {\n    this.progressBar.setValue(1);\n    this.hideVisitProgressBar();\n  }\n\n  visitRendered(_visit) {}\n\n  // Link prefetching\n\n  linkPrefetchingIsEnabledForLocation(location) {\n    return true\n  }\n\n  // Form Submission Delegate\n\n  formSubmissionStarted(_formSubmission) {\n    this.progressBar.setValue(0);\n    this.showFormProgressBarAfterDelay();\n  }\n\n  formSubmissionFinished(_formSubmission) {\n    this.progressBar.setValue(1);\n    this.hideFormProgressBar();\n  }\n\n  // Private\n\n  showVisitProgressBarAfterDelay() {\n    this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n  }\n\n  hideVisitProgressBar() {\n    this.progressBar.hide();\n    if (this.visitProgressBarTimeout != null) {\n      window.clearTimeout(this.visitProgressBarTimeout);\n      delete this.visitProgressBarTimeout;\n    }\n  }\n\n  showFormProgressBarAfterDelay() {\n    if (this.formProgressBarTimeout == null) {\n      this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n    }\n  }\n\n  hideFormProgressBar() {\n    this.progressBar.hide();\n    if (this.formProgressBarTimeout != null) {\n      window.clearTimeout(this.formProgressBarTimeout);\n      delete this.formProgressBarTimeout;\n    }\n  }\n\n  showProgressBar = () => {\n    this.progressBar.show();\n  }\n\n  reload(reason) {\n    dispatch(\"turbo:reload\", { detail: reason });\n\n    window.location.href = (this.redirectedToLocation || this.location)?.toString() || window.location.href;\n  }\n\n  get navigator() {\n    return this.session.navigator\n  }\n}\n\nclass CacheObserver {\n  selector = \"[data-turbo-temporary]\"\n\n  started = false\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      addEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      removeEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n    }\n  }\n\n  removeTemporaryElements = (_event) => {\n    for (const element of this.temporaryElements) {\n      element.remove();\n    }\n  }\n\n  get temporaryElements() {\n    return [...document.querySelectorAll(this.selector)]\n  }\n}\n\nclass FrameRedirector {\n  constructor(session, element) {\n    this.session = session;\n    this.element = element;\n    this.linkInterceptor = new LinkInterceptor(this, element);\n    this.formSubmitObserver = new FormSubmitObserver(this, element);\n  }\n\n  start() {\n    this.linkInterceptor.start();\n    this.formSubmitObserver.start();\n  }\n\n  stop() {\n    this.linkInterceptor.stop();\n    this.formSubmitObserver.stop();\n  }\n\n  // Link interceptor delegate\n\n  shouldInterceptLinkClick(element, _location, _event) {\n    return this.#shouldRedirect(element)\n  }\n\n  linkClickIntercepted(element, url, event) {\n    const frame = this.#findFrameElement(element);\n    if (frame) {\n      frame.delegate.linkClickIntercepted(element, url, event);\n    }\n  }\n\n  // Form submit observer delegate\n\n  willSubmitForm(element, submitter) {\n    return (\n      element.closest(\"turbo-frame\") == null &&\n      this.#shouldSubmit(element, submitter) &&\n      this.#shouldRedirect(element, submitter)\n    )\n  }\n\n  formSubmitted(element, submitter) {\n    const frame = this.#findFrameElement(element, submitter);\n    if (frame) {\n      frame.delegate.formSubmitted(element, submitter);\n    }\n  }\n\n  #shouldSubmit(form, submitter) {\n    const action = getAction$1(form, submitter);\n    const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n    const rootLocation = expandURL(meta?.content ?? \"/\");\n\n    return this.#shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation)\n  }\n\n  #shouldRedirect(element, submitter) {\n    const isNavigatable =\n      element instanceof HTMLFormElement\n        ? this.session.submissionIsNavigatable(element, submitter)\n        : this.session.elementIsNavigatable(element);\n\n    if (isNavigatable) {\n      const frame = this.#findFrameElement(element, submitter);\n      return frame ? frame != element.closest(\"turbo-frame\") : false\n    } else {\n      return false\n    }\n  }\n\n  #findFrameElement(element, submitter) {\n    const id = submitter?.getAttribute(\"data-turbo-frame\") || element.getAttribute(\"data-turbo-frame\");\n    if (id && id != \"_top\") {\n      const frame = this.element.querySelector(`#${id}:not([disabled])`);\n      if (frame instanceof FrameElement) {\n        return frame\n      }\n    }\n  }\n}\n\nclass History {\n  location\n  restorationIdentifier = uuid()\n  restorationData = {}\n  started = false\n  currentIndex = 0\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"popstate\", this.onPopState, false);\n      this.currentIndex = history.state?.turbo?.restorationIndex || 0;\n      this.started = true;\n      this.replace(new URL(window.location.href));\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"popstate\", this.onPopState, false);\n      this.started = false;\n    }\n  }\n\n  push(location, restorationIdentifier) {\n    this.update(history.pushState, location, restorationIdentifier);\n  }\n\n  replace(location, restorationIdentifier) {\n    this.update(history.replaceState, location, restorationIdentifier);\n  }\n\n  update(method, location, restorationIdentifier = uuid()) {\n    if (method === history.pushState) ++this.currentIndex;\n\n    const state = { turbo: { restorationIdentifier, restorationIndex: this.currentIndex } };\n    method.call(history, state, \"\", location.href);\n    this.location = location;\n    this.restorationIdentifier = restorationIdentifier;\n  }\n\n  // Restoration data\n\n  getRestorationDataForIdentifier(restorationIdentifier) {\n    return this.restorationData[restorationIdentifier] || {}\n  }\n\n  updateRestorationData(additionalData) {\n    const { restorationIdentifier } = this;\n    const restorationData = this.restorationData[restorationIdentifier];\n    this.restorationData[restorationIdentifier] = {\n      ...restorationData,\n      ...additionalData\n    };\n  }\n\n  // Scroll restoration\n\n  assumeControlOfScrollRestoration() {\n    if (!this.previousScrollRestoration) {\n      this.previousScrollRestoration = history.scrollRestoration ?? \"auto\";\n      history.scrollRestoration = \"manual\";\n    }\n  }\n\n  relinquishControlOfScrollRestoration() {\n    if (this.previousScrollRestoration) {\n      history.scrollRestoration = this.previousScrollRestoration;\n      delete this.previousScrollRestoration;\n    }\n  }\n\n  // Event handlers\n\n  onPopState = (event) => {\n    const { turbo } = event.state || {};\n    this.location = new URL(window.location.href);\n\n    if (turbo) {\n      const { restorationIdentifier, restorationIndex } = turbo;\n      this.restorationIdentifier = restorationIdentifier;\n      const direction = restorationIndex > this.currentIndex ? \"forward\" : \"back\";\n      this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location, restorationIdentifier, direction);\n      this.currentIndex = restorationIndex;\n    } else {\n      this.currentIndex++;\n      this.delegate.historyPoppedWithEmptyState(this.location);\n    }\n  }\n}\n\nclass LinkPrefetchObserver {\n  started = false\n  #prefetchedLink = null\n\n  constructor(delegate, eventTarget) {\n    this.delegate = delegate;\n    this.eventTarget = eventTarget;\n  }\n\n  start() {\n    if (this.started) return\n\n    if (this.eventTarget.readyState === \"loading\") {\n      this.eventTarget.addEventListener(\"DOMContentLoaded\", this.#enable, { once: true });\n    } else {\n      this.#enable();\n    }\n  }\n\n  stop() {\n    if (!this.started) return\n\n    this.eventTarget.removeEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n      capture: true,\n      passive: true\n    });\n    this.eventTarget.removeEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n      capture: true,\n      passive: true\n    });\n\n    this.eventTarget.removeEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n    this.started = false;\n  }\n\n  #enable = () => {\n    this.eventTarget.addEventListener(\"mouseenter\", this.#tryToPrefetchRequest, {\n      capture: true,\n      passive: true\n    });\n    this.eventTarget.addEventListener(\"mouseleave\", this.#cancelRequestIfObsolete, {\n      capture: true,\n      passive: true\n    });\n\n    this.eventTarget.addEventListener(\"turbo:before-fetch-request\", this.#tryToUsePrefetchedRequest, true);\n    this.started = true;\n  }\n\n  #tryToPrefetchRequest = (event) => {\n    if (getMetaContent(\"turbo-prefetch\") === \"false\") return\n\n    const target = event.target;\n    const isLink = target.matches && target.matches(\"a[href]:not([target^=_]):not([download])\");\n\n    if (isLink && this.#isPrefetchable(target)) {\n      const link = target;\n      const location = getLocationForLink(link);\n\n      if (this.delegate.canPrefetchRequestToLocation(link, location)) {\n        this.#prefetchedLink = link;\n\n        const fetchRequest = new FetchRequest(\n          this,\n          FetchMethod.get,\n          location,\n          new URLSearchParams(),\n          target\n        );\n\n        fetchRequest.fetchOptions.priority = \"low\";\n\n        prefetchCache.putLater(location, fetchRequest, this.#cacheTtl);\n      }\n    }\n  }\n\n  #cancelRequestIfObsolete = (event) => {\n    if (event.target === this.#prefetchedLink) this.#cancelPrefetchRequest();\n  }\n\n  #cancelPrefetchRequest = () => {\n    prefetchCache.clear();\n    this.#prefetchedLink = null;\n  }\n\n  #tryToUsePrefetchedRequest = (event) => {\n    if (event.target.tagName !== \"FORM\" && event.detail.fetchOptions.method === \"GET\") {\n      const cached = prefetchCache.get(event.detail.url);\n\n      if (cached) {\n        // User clicked link, use cache response\n        event.detail.fetchRequest = cached;\n      }\n\n      prefetchCache.clear();\n    }\n  }\n\n  prepareRequest(request) {\n    const link = request.target;\n\n    request.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n\n    const turboFrame = link.closest(\"turbo-frame\");\n    const turboFrameTarget = link.getAttribute(\"data-turbo-frame\") || turboFrame?.getAttribute(\"target\") || turboFrame?.id;\n\n    if (turboFrameTarget && turboFrameTarget !== \"_top\") {\n      request.headers[\"Turbo-Frame\"] = turboFrameTarget;\n    }\n  }\n\n  // Fetch request interface\n\n  requestSucceededWithResponse() {}\n\n  requestStarted(fetchRequest) {}\n\n  requestErrored(fetchRequest) {}\n\n  requestFinished(fetchRequest) {}\n\n  requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n\n  requestFailedWithResponse(fetchRequest, fetchResponse) {}\n\n  get #cacheTtl() {\n    return Number(getMetaContent(\"turbo-prefetch-cache-time\")) || cacheTtl\n  }\n\n  #isPrefetchable(link) {\n    const href = link.getAttribute(\"href\");\n\n    if (!href) return false\n\n    if (unfetchableLink(link)) return false\n    if (linkToTheSamePage(link)) return false\n    if (linkOptsOut(link)) return false\n    if (nonSafeLink(link)) return false\n    if (eventPrevented(link)) return false\n\n    return true\n  }\n}\n\nconst unfetchableLink = (link) => {\n  return link.origin !== document.location.origin || ![\"http:\", \"https:\"].includes(link.protocol) || link.hasAttribute(\"target\")\n};\n\nconst linkToTheSamePage = (link) => {\n  return (link.pathname + link.search === document.location.pathname + document.location.search) || link.href.startsWith(\"#\")\n};\n\nconst linkOptsOut = (link) => {\n  if (link.getAttribute(\"data-turbo-prefetch\") === \"false\") return true\n  if (link.getAttribute(\"data-turbo\") === \"false\") return true\n\n  const turboPrefetchParent = findClosestRecursively(link, \"[data-turbo-prefetch]\");\n  if (turboPrefetchParent && turboPrefetchParent.getAttribute(\"data-turbo-prefetch\") === \"false\") return true\n\n  return false\n};\n\nconst nonSafeLink = (link) => {\n  const turboMethod = link.getAttribute(\"data-turbo-method\");\n  if (turboMethod && turboMethod.toLowerCase() !== \"get\") return true\n\n  if (isUJS(link)) return true\n  if (link.hasAttribute(\"data-turbo-confirm\")) return true\n  if (link.hasAttribute(\"data-turbo-stream\")) return true\n\n  return false\n};\n\nconst isUJS = (link) => {\n  return link.hasAttribute(\"data-remote\") || link.hasAttribute(\"data-behavior\") || link.hasAttribute(\"data-confirm\") || link.hasAttribute(\"data-method\")\n};\n\nconst eventPrevented = (link) => {\n  const event = dispatch(\"turbo:before-prefetch\", { target: link, cancelable: true });\n  return event.defaultPrevented\n};\n\nclass Navigator {\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  proposeVisit(location, options = {}) {\n    if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n      this.delegate.visitProposedToLocation(location, options);\n    }\n  }\n\n  startVisit(locatable, restorationIdentifier, options = {}) {\n    this.stop();\n    this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, {\n      referrer: this.location,\n      ...options\n    });\n    this.currentVisit.start();\n  }\n\n  submitForm(form, submitter) {\n    this.stop();\n    this.formSubmission = new FormSubmission(this, form, submitter, true);\n\n    this.formSubmission.start();\n  }\n\n  stop() {\n    if (this.formSubmission) {\n      this.formSubmission.stop();\n      delete this.formSubmission;\n    }\n\n    if (this.currentVisit) {\n      this.currentVisit.cancel();\n      delete this.currentVisit;\n    }\n  }\n\n  get adapter() {\n    return this.delegate.adapter\n  }\n\n  get view() {\n    return this.delegate.view\n  }\n\n  get rootLocation() {\n    return this.view.snapshot.rootLocation\n  }\n\n  get history() {\n    return this.delegate.history\n  }\n\n  // Form submission delegate\n\n  formSubmissionStarted(formSubmission) {\n    // Not all adapters implement formSubmissionStarted\n    if (typeof this.adapter.formSubmissionStarted === \"function\") {\n      this.adapter.formSubmissionStarted(formSubmission);\n    }\n  }\n\n  async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n    if (formSubmission == this.formSubmission) {\n      const responseHTML = await fetchResponse.responseHTML;\n      if (responseHTML) {\n        const shouldCacheSnapshot = formSubmission.isSafe;\n        if (!shouldCacheSnapshot) {\n          this.view.clearSnapshotCache();\n        }\n\n        const { statusCode, redirected } = fetchResponse;\n        const action = this.#getActionForFormSubmission(formSubmission, fetchResponse);\n        const visitOptions = {\n          action,\n          shouldCacheSnapshot,\n          response: { statusCode, responseHTML, redirected }\n        };\n        this.proposeVisit(fetchResponse.location, visitOptions);\n      }\n    }\n  }\n\n  async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n    const responseHTML = await fetchResponse.responseHTML;\n\n    if (responseHTML) {\n      const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n      if (fetchResponse.serverError) {\n        await this.view.renderError(snapshot, this.currentVisit);\n      } else {\n        await this.view.renderPage(snapshot, false, true, this.currentVisit);\n      }\n      if (snapshot.refreshScroll !== \"preserve\") {\n        this.view.scrollToTop();\n      }\n      this.view.clearSnapshotCache();\n    }\n  }\n\n  formSubmissionErrored(formSubmission, error) {\n    console.error(error);\n  }\n\n  formSubmissionFinished(formSubmission) {\n    // Not all adapters implement formSubmissionFinished\n    if (typeof this.adapter.formSubmissionFinished === \"function\") {\n      this.adapter.formSubmissionFinished(formSubmission);\n    }\n  }\n\n  // Link prefetching\n\n  linkPrefetchingIsEnabledForLocation(location) {\n    // Not all adapters implement linkPrefetchingIsEnabledForLocation\n    if (typeof this.adapter.linkPrefetchingIsEnabledForLocation === \"function\") {\n      return this.adapter.linkPrefetchingIsEnabledForLocation(location)\n    }\n\n    return true\n  }\n\n  // Visit delegate\n\n  visitStarted(visit) {\n    this.delegate.visitStarted(visit);\n  }\n\n  visitCompleted(visit) {\n    this.delegate.visitCompleted(visit);\n    delete this.currentVisit;\n  }\n\n  // Same-page links are no longer handled with a Visit.\n  // This method is still needed for Turbo Native adapters.\n  locationWithActionIsSamePage(location, action) {\n    return false\n  }\n\n  // Visits\n\n  get location() {\n    return this.history.location\n  }\n\n  get restorationIdentifier() {\n    return this.history.restorationIdentifier\n  }\n\n  #getActionForFormSubmission(formSubmission, fetchResponse) {\n    const { submitter, formElement } = formSubmission;\n    return getVisitAction(submitter, formElement) || this.#getDefaultAction(fetchResponse)\n  }\n\n  #getDefaultAction(fetchResponse) {\n    const sameLocationRedirect = fetchResponse.redirected && fetchResponse.location.href === this.location?.href;\n    return sameLocationRedirect ? \"replace\" : \"advance\"\n  }\n}\n\nconst PageStage = {\n  initial: 0,\n  loading: 1,\n  interactive: 2,\n  complete: 3\n};\n\nclass PageObserver {\n  stage = PageStage.initial\n  started = false\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      if (this.stage == PageStage.initial) {\n        this.stage = PageStage.loading;\n      }\n      document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n      addEventListener(\"pagehide\", this.pageWillUnload, false);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n      removeEventListener(\"pagehide\", this.pageWillUnload, false);\n      this.started = false;\n    }\n  }\n\n  interpretReadyState = () => {\n    const { readyState } = this;\n    if (readyState == \"interactive\") {\n      this.pageIsInteractive();\n    } else if (readyState == \"complete\") {\n      this.pageIsComplete();\n    }\n  }\n\n  pageIsInteractive() {\n    if (this.stage == PageStage.loading) {\n      this.stage = PageStage.interactive;\n      this.delegate.pageBecameInteractive();\n    }\n  }\n\n  pageIsComplete() {\n    this.pageIsInteractive();\n    if (this.stage == PageStage.interactive) {\n      this.stage = PageStage.complete;\n      this.delegate.pageLoaded();\n    }\n  }\n\n  pageWillUnload = () => {\n    this.delegate.pageWillUnload();\n  }\n\n  get readyState() {\n    return document.readyState\n  }\n}\n\nclass ScrollObserver {\n  started = false\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"scroll\", this.onScroll, false);\n      this.onScroll();\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"scroll\", this.onScroll, false);\n      this.started = false;\n    }\n  }\n\n  onScroll = () => {\n    this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n  }\n\n  // Private\n\n  updatePosition(position) {\n    this.delegate.scrollPositionChanged(position);\n  }\n}\n\nclass StreamMessageRenderer {\n  render({ fragment }) {\n    Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => {\n      withAutofocusFromFragment(fragment, () => {\n        withPreservedFocus(() => {\n          document.documentElement.appendChild(fragment);\n        });\n      });\n    });\n  }\n\n  // Bardo delegate\n\n  enteringBardo(currentPermanentElement, newPermanentElement) {\n    newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n  }\n\n  leavingBardo() {}\n}\n\nfunction getPermanentElementMapForFragment(fragment) {\n  const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n  const permanentElementMap = {};\n  for (const permanentElementInDocument of permanentElementsInDocument) {\n    const { id } = permanentElementInDocument;\n\n    for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n      const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n\n      if (elementInStream) {\n        permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n      }\n    }\n  }\n\n  return permanentElementMap\n}\n\nasync function withAutofocusFromFragment(fragment, callback) {\n  const generatedID = `turbo-stream-autofocus-${uuid()}`;\n  const turboStreams = fragment.querySelectorAll(\"turbo-stream\");\n  const elementWithAutofocus = firstAutofocusableElementInStreams(turboStreams);\n  let willAutofocusId = null;\n\n  if (elementWithAutofocus) {\n    if (elementWithAutofocus.id) {\n      willAutofocusId = elementWithAutofocus.id;\n    } else {\n      willAutofocusId = generatedID;\n    }\n\n    elementWithAutofocus.id = willAutofocusId;\n  }\n\n  callback();\n  await nextRepaint();\n\n  const hasNoActiveElement = document.activeElement == null || document.activeElement == document.body;\n\n  if (hasNoActiveElement && willAutofocusId) {\n    const elementToAutofocus = document.getElementById(willAutofocusId);\n\n    if (elementIsFocusable(elementToAutofocus)) {\n      elementToAutofocus.focus();\n    }\n    if (elementToAutofocus && elementToAutofocus.id == generatedID) {\n      elementToAutofocus.removeAttribute(\"id\");\n    }\n  }\n}\n\nasync function withPreservedFocus(callback) {\n  const [activeElementBeforeRender, activeElementAfterRender] = await around(callback, () => document.activeElement);\n\n  const restoreFocusTo = activeElementBeforeRender && activeElementBeforeRender.id;\n\n  if (restoreFocusTo) {\n    const elementToFocus = document.getElementById(restoreFocusTo);\n\n    if (elementIsFocusable(elementToFocus) && elementToFocus != activeElementAfterRender) {\n      elementToFocus.focus();\n    }\n  }\n}\n\nfunction firstAutofocusableElementInStreams(nodeListOfStreamElements) {\n  for (const streamElement of nodeListOfStreamElements) {\n    const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content);\n\n    if (elementWithAutofocus) return elementWithAutofocus\n  }\n\n  return null\n}\n\nclass StreamObserver {\n  sources = new Set()\n  #started = false\n\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.#started) {\n      this.#started = true;\n      addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n    }\n  }\n\n  stop() {\n    if (this.#started) {\n      this.#started = false;\n      removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n    }\n  }\n\n  connectStreamSource(source) {\n    if (!this.streamSourceIsConnected(source)) {\n      this.sources.add(source);\n      source.addEventListener(\"message\", this.receiveMessageEvent, false);\n    }\n  }\n\n  disconnectStreamSource(source) {\n    if (this.streamSourceIsConnected(source)) {\n      this.sources.delete(source);\n      source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n    }\n  }\n\n  streamSourceIsConnected(source) {\n    return this.sources.has(source)\n  }\n\n  inspectFetchResponse = (event) => {\n    const response = fetchResponseFromEvent(event);\n    if (response && fetchResponseIsStream(response)) {\n      event.preventDefault();\n      this.receiveMessageResponse(response);\n    }\n  }\n\n  receiveMessageEvent = (event) => {\n    if (this.#started && typeof event.data == \"string\") {\n      this.receiveMessageHTML(event.data);\n    }\n  }\n\n  async receiveMessageResponse(response) {\n    const html = await response.responseHTML;\n    if (html) {\n      this.receiveMessageHTML(html);\n    }\n  }\n\n  receiveMessageHTML(html) {\n    this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n  }\n}\n\nfunction fetchResponseFromEvent(event) {\n  const fetchResponse = event.detail?.fetchResponse;\n  if (fetchResponse instanceof FetchResponse) {\n    return fetchResponse\n  }\n}\n\nfunction fetchResponseIsStream(response) {\n  const contentType = response.contentType ?? \"\";\n  return contentType.startsWith(StreamMessage.contentType)\n}\n\nclass ErrorRenderer extends Renderer {\n  static renderElement(currentElement, newElement) {\n    const { documentElement, body } = document;\n\n    documentElement.replaceChild(newElement, body);\n  }\n\n  async render() {\n    this.replaceHeadAndBody();\n    this.activateScriptElements();\n  }\n\n  replaceHeadAndBody() {\n    const { documentElement, head } = document;\n    documentElement.replaceChild(this.newHead, head);\n    this.renderElement(this.currentElement, this.newElement);\n  }\n\n  activateScriptElements() {\n    for (const replaceableElement of this.scriptElements) {\n      const parentNode = replaceableElement.parentNode;\n      if (parentNode) {\n        const element = activateScriptElement(replaceableElement);\n        parentNode.replaceChild(element, replaceableElement);\n      }\n    }\n  }\n\n  get newHead() {\n    return this.newSnapshot.headSnapshot.element\n  }\n\n  get scriptElements() {\n    return document.documentElement.querySelectorAll(\"script\")\n  }\n}\n\nclass PageRenderer extends Renderer {\n  static renderElement(currentElement, newElement) {\n    if (document.body && newElement instanceof HTMLBodyElement) {\n      document.body.replaceWith(newElement);\n    } else {\n      document.documentElement.appendChild(newElement);\n    }\n  }\n\n  get shouldRender() {\n    return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical\n  }\n\n  get reloadReason() {\n    if (!this.newSnapshot.isVisitable) {\n      return {\n        reason: \"turbo_visit_control_is_reload\"\n      }\n    }\n\n    if (!this.trackedElementsAreIdentical) {\n      return {\n        reason: \"tracked_element_mismatch\"\n      }\n    }\n  }\n\n  async prepareToRender() {\n    this.#setLanguage();\n    await this.mergeHead();\n  }\n\n  async render() {\n    if (this.willRender) {\n      await this.replaceBody();\n    }\n  }\n\n  finishRendering() {\n    super.finishRendering();\n    if (!this.isPreview) {\n      this.focusFirstAutofocusableElement();\n    }\n  }\n\n  get currentHeadSnapshot() {\n    return this.currentSnapshot.headSnapshot\n  }\n\n  get newHeadSnapshot() {\n    return this.newSnapshot.headSnapshot\n  }\n\n  get newElement() {\n    return this.newSnapshot.element\n  }\n\n  #setLanguage() {\n    const { documentElement } = this.currentSnapshot;\n    const { dir, lang } = this.newSnapshot;\n\n    if (lang) {\n      documentElement.setAttribute(\"lang\", lang);\n    } else {\n      documentElement.removeAttribute(\"lang\");\n    }\n    if (dir) {\n      documentElement.setAttribute(\"dir\", dir);\n    } else {\n      documentElement.removeAttribute(\"dir\");\n    }\n  }\n\n  async mergeHead() {\n    const mergedHeadElements = this.mergeProvisionalElements();\n    const newStylesheetElements = this.copyNewHeadStylesheetElements();\n    this.copyNewHeadScriptElements();\n\n    await mergedHeadElements;\n    await newStylesheetElements;\n\n    if (this.willRender) {\n      this.removeUnusedDynamicStylesheetElements();\n    }\n  }\n\n  async replaceBody() {\n    await this.preservingPermanentElements(async () => {\n      this.activateNewBody();\n      await this.assignNewBody();\n    });\n  }\n\n  get trackedElementsAreIdentical() {\n    return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature\n  }\n\n  async copyNewHeadStylesheetElements() {\n    const loadingElements = [];\n\n    for (const element of this.newHeadStylesheetElements) {\n      loadingElements.push(waitForLoad(element));\n\n      document.head.appendChild(element);\n    }\n\n    await Promise.all(loadingElements);\n  }\n\n  copyNewHeadScriptElements() {\n    for (const element of this.newHeadScriptElements) {\n      document.head.appendChild(activateScriptElement(element));\n    }\n  }\n\n  removeUnusedDynamicStylesheetElements() {\n    for (const element of this.unusedDynamicStylesheetElements) {\n      document.head.removeChild(element);\n    }\n  }\n\n  async mergeProvisionalElements() {\n    const newHeadElements = [...this.newHeadProvisionalElements];\n\n    for (const element of this.currentHeadProvisionalElements) {\n      if (!this.isCurrentElementInElementList(element, newHeadElements)) {\n        document.head.removeChild(element);\n      }\n    }\n\n    for (const element of newHeadElements) {\n      document.head.appendChild(element);\n    }\n  }\n\n  isCurrentElementInElementList(element, elementList) {\n    for (const [index, newElement] of elementList.entries()) {\n      // if title element...\n      if (element.tagName == \"TITLE\") {\n        if (newElement.tagName != \"TITLE\") {\n          continue\n        }\n        if (element.innerHTML == newElement.innerHTML) {\n          elementList.splice(index, 1);\n          return true\n        }\n      }\n\n      // if any other element...\n      if (newElement.isEqualNode(element)) {\n        elementList.splice(index, 1);\n        return true\n      }\n    }\n\n    return false\n  }\n\n  removeCurrentHeadProvisionalElements() {\n    for (const element of this.currentHeadProvisionalElements) {\n      document.head.removeChild(element);\n    }\n  }\n\n  copyNewHeadProvisionalElements() {\n    for (const element of this.newHeadProvisionalElements) {\n      document.head.appendChild(element);\n    }\n  }\n\n  activateNewBody() {\n    document.adoptNode(this.newElement);\n    this.removeNoscriptElements();\n    this.activateNewBodyScriptElements();\n  }\n\n  removeNoscriptElements() {\n    for (const noscriptElement of this.newElement.querySelectorAll(\"noscript\")) {\n      noscriptElement.remove();\n    }\n  }\n\n  activateNewBodyScriptElements() {\n    for (const inertScriptElement of this.newBodyScriptElements) {\n      const activatedScriptElement = activateScriptElement(inertScriptElement);\n      inertScriptElement.replaceWith(activatedScriptElement);\n    }\n  }\n\n  async assignNewBody() {\n    await this.renderElement(this.currentElement, this.newElement);\n  }\n\n  get unusedDynamicStylesheetElements() {\n    return this.oldHeadStylesheetElements.filter((element) => {\n      return element.getAttribute(\"data-turbo-track\") === \"dynamic\"\n    })\n  }\n\n  get oldHeadStylesheetElements() {\n    return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)\n  }\n\n  get newHeadStylesheetElements() {\n    return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)\n  }\n\n  get newHeadScriptElements() {\n    return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)\n  }\n\n  get currentHeadProvisionalElements() {\n    return this.currentHeadSnapshot.provisionalElements\n  }\n\n  get newHeadProvisionalElements() {\n    return this.newHeadSnapshot.provisionalElements\n  }\n\n  get newBodyScriptElements() {\n    return this.newElement.querySelectorAll(\"script\")\n  }\n}\n\nclass MorphingPageRenderer extends PageRenderer {\n  static renderElement(currentElement, newElement) {\n    morphElements(currentElement, newElement, {\n      callbacks: {\n        beforeNodeMorphed: (node, newNode) => {\n          if (\n            shouldRefreshFrameWithMorphing(node, newNode) &&\n              !closestFrameReloadableWithMorphing(node)\n          ) {\n            node.reload();\n            return false\n          }\n          return true\n        }\n      }\n    });\n\n    dispatch(\"turbo:morph\", { detail: { currentElement, newElement } });\n  }\n\n  async preservingPermanentElements(callback) {\n    return await callback()\n  }\n\n  get renderMethod() {\n    return \"morph\"\n  }\n\n  get shouldAutofocus() {\n    return false\n  }\n}\n\nclass SnapshotCache extends LRUCache {\n  constructor(size) {\n    super(size, toCacheKey);\n  }\n\n  get snapshots() {\n    return this.entries\n  }\n}\n\nclass PageView extends View {\n  snapshotCache = new SnapshotCache(10)\n  lastRenderedLocation = new URL(location.href)\n  forceReloaded = false\n\n  shouldTransitionTo(newSnapshot) {\n    return this.snapshot.prefersViewTransitions && newSnapshot.prefersViewTransitions\n  }\n\n  renderPage(snapshot, isPreview = false, willRender = true, visit) {\n    const shouldMorphPage = this.isPageRefresh(visit) && (visit?.refresh?.method || this.snapshot.refreshMethod) === \"morph\";\n    const rendererClass = shouldMorphPage ? MorphingPageRenderer : PageRenderer;\n\n    const renderer = new rendererClass(this.snapshot, snapshot, isPreview, willRender);\n\n    if (!renderer.shouldRender) {\n      this.forceReloaded = true;\n    } else {\n      visit?.changeHistory();\n    }\n\n    return this.render(renderer)\n  }\n\n  renderError(snapshot, visit) {\n    visit?.changeHistory();\n    const renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n    return this.render(renderer)\n  }\n\n  clearSnapshotCache() {\n    this.snapshotCache.clear();\n  }\n\n  async cacheSnapshot(snapshot = this.snapshot) {\n    if (snapshot.isCacheable) {\n      this.delegate.viewWillCacheSnapshot();\n      const { lastRenderedLocation: location } = this;\n      await nextEventLoopTick();\n      const cachedSnapshot = snapshot.clone();\n      this.snapshotCache.put(location, cachedSnapshot);\n      return cachedSnapshot\n    }\n  }\n\n  getCachedSnapshotForLocation(location) {\n    return this.snapshotCache.get(location)\n  }\n\n  isPageRefresh(visit) {\n    return !visit || (this.lastRenderedLocation.pathname === visit.location.pathname && visit.action === \"replace\")\n  }\n\n  shouldPreserveScrollPosition(visit) {\n    return this.isPageRefresh(visit) && (visit?.refresh?.scroll || this.snapshot.refreshScroll) === \"preserve\"\n  }\n\n  get snapshot() {\n    return PageSnapshot.fromElement(this.element)\n  }\n}\n\nclass Preloader {\n  selector = \"a[data-turbo-preload]\"\n\n  constructor(delegate, snapshotCache) {\n    this.delegate = delegate;\n    this.snapshotCache = snapshotCache;\n  }\n\n  start() {\n    if (document.readyState === \"loading\") {\n      document.addEventListener(\"DOMContentLoaded\", this.#preloadAll);\n    } else {\n      this.preloadOnLoadLinksForView(document.body);\n    }\n  }\n\n  stop() {\n    document.removeEventListener(\"DOMContentLoaded\", this.#preloadAll);\n  }\n\n  preloadOnLoadLinksForView(element) {\n    for (const link of element.querySelectorAll(this.selector)) {\n      if (this.delegate.shouldPreloadLink(link)) {\n        this.preloadURL(link);\n      }\n    }\n  }\n\n  async preloadURL(link) {\n    const location = new URL(link.href);\n\n    if (this.snapshotCache.has(location)) {\n      return\n    }\n\n    const fetchRequest = new FetchRequest(this, FetchMethod.get, location, new URLSearchParams(), link);\n    await fetchRequest.perform();\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(fetchRequest) {\n    fetchRequest.headers[\"X-Sec-Purpose\"] = \"prefetch\";\n  }\n\n  async requestSucceededWithResponse(fetchRequest, fetchResponse) {\n    try {\n      const responseHTML = await fetchResponse.responseHTML;\n      const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n\n      this.snapshotCache.put(fetchRequest.url, snapshot);\n    } catch (_) {\n      // If we cannot preload that is ok!\n    }\n  }\n\n  requestStarted(fetchRequest) {}\n\n  requestErrored(fetchRequest) {}\n\n  requestFinished(fetchRequest) {}\n\n  requestPreventedHandlingResponse(fetchRequest, fetchResponse) {}\n\n  requestFailedWithResponse(fetchRequest, fetchResponse) {}\n\n  #preloadAll = () => {\n    this.preloadOnLoadLinksForView(document.body);\n  }\n}\n\nclass Cache {\n  constructor(session) {\n    this.session = session;\n  }\n\n  clear() {\n    this.session.clearCache();\n  }\n\n  resetCacheControl() {\n    this.#setCacheControl(\"\");\n  }\n\n  exemptPageFromCache() {\n    this.#setCacheControl(\"no-cache\");\n  }\n\n  exemptPageFromPreview() {\n    this.#setCacheControl(\"no-preview\");\n  }\n\n  #setCacheControl(value) {\n    setMetaContent(\"turbo-cache-control\", value);\n  }\n}\n\nclass Session {\n  navigator = new Navigator(this)\n  history = new History(this)\n  view = new PageView(this, document.documentElement)\n  adapter = new BrowserAdapter(this)\n\n  pageObserver = new PageObserver(this)\n  cacheObserver = new CacheObserver()\n  linkPrefetchObserver = new LinkPrefetchObserver(this, document)\n  linkClickObserver = new LinkClickObserver(this, window)\n  formSubmitObserver = new FormSubmitObserver(this, document)\n  scrollObserver = new ScrollObserver(this)\n  streamObserver = new StreamObserver(this)\n  formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement)\n  frameRedirector = new FrameRedirector(this, document.documentElement)\n  streamMessageRenderer = new StreamMessageRenderer()\n  cache = new Cache(this)\n\n  enabled = true\n  started = false\n  #pageRefreshDebouncePeriod = 150\n\n  constructor(recentRequests) {\n    this.recentRequests = recentRequests;\n    this.preloader = new Preloader(this, this.view.snapshotCache);\n    this.debouncedRefresh = this.refresh;\n    this.pageRefreshDebouncePeriod = this.pageRefreshDebouncePeriod;\n  }\n\n  start() {\n    if (!this.started) {\n      this.pageObserver.start();\n      this.cacheObserver.start();\n      this.linkPrefetchObserver.start();\n      this.formLinkClickObserver.start();\n      this.linkClickObserver.start();\n      this.formSubmitObserver.start();\n      this.scrollObserver.start();\n      this.streamObserver.start();\n      this.frameRedirector.start();\n      this.history.start();\n      this.preloader.start();\n      this.started = true;\n      this.enabled = true;\n    }\n  }\n\n  disable() {\n    this.enabled = false;\n  }\n\n  stop() {\n    if (this.started) {\n      this.pageObserver.stop();\n      this.cacheObserver.stop();\n      this.linkPrefetchObserver.stop();\n      this.formLinkClickObserver.stop();\n      this.linkClickObserver.stop();\n      this.formSubmitObserver.stop();\n      this.scrollObserver.stop();\n      this.streamObserver.stop();\n      this.frameRedirector.stop();\n      this.history.stop();\n      this.preloader.stop();\n      this.started = false;\n    }\n  }\n\n  registerAdapter(adapter) {\n    this.adapter = adapter;\n  }\n\n  visit(location, options = {}) {\n    const frameElement = options.frame ? document.getElementById(options.frame) : null;\n\n    if (frameElement instanceof FrameElement) {\n      const action = options.action || getVisitAction(frameElement);\n\n      frameElement.delegate.proposeVisitIfNavigatedWithAction(frameElement, action);\n      frameElement.src = location.toString();\n    } else {\n      this.navigator.proposeVisit(expandURL(location), options);\n    }\n  }\n\n  refresh(url, options = {}) {\n    options = typeof options === \"string\" ? { requestId: options } : options;\n\n    const { method, requestId, scroll } = options;\n    const isRecentRequest = requestId && this.recentRequests.has(requestId);\n    const isCurrentUrl = url === document.baseURI;\n    if (!isRecentRequest && !this.navigator.currentVisit && isCurrentUrl) {\n      this.visit(url, { action: \"replace\", shouldCacheSnapshot: false, refresh: { method, scroll } });\n    }\n  }\n\n  connectStreamSource(source) {\n    this.streamObserver.connectStreamSource(source);\n  }\n\n  disconnectStreamSource(source) {\n    this.streamObserver.disconnectStreamSource(source);\n  }\n\n  renderStreamMessage(message) {\n    this.streamMessageRenderer.render(StreamMessage.wrap(message));\n  }\n\n  clearCache() {\n    this.view.clearSnapshotCache();\n  }\n\n  setProgressBarDelay(delay) {\n    console.warn(\n      \"Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`\"\n    );\n\n    this.progressBarDelay = delay;\n  }\n\n  set progressBarDelay(delay) {\n    config.drive.progressBarDelay = delay;\n  }\n\n  get progressBarDelay() {\n    return config.drive.progressBarDelay\n  }\n\n  set drive(value) {\n    config.drive.enabled = value;\n  }\n\n  get drive() {\n    return config.drive.enabled\n  }\n\n  set formMode(value) {\n    config.forms.mode = value;\n  }\n\n  get formMode() {\n    return config.forms.mode\n  }\n\n  get location() {\n    return this.history.location\n  }\n\n  get restorationIdentifier() {\n    return this.history.restorationIdentifier\n  }\n\n  get pageRefreshDebouncePeriod() {\n    return this.#pageRefreshDebouncePeriod\n  }\n\n  set pageRefreshDebouncePeriod(value) {\n    this.refresh = debounce(this.debouncedRefresh.bind(this), value);\n    this.#pageRefreshDebouncePeriod = value;\n  }\n\n  // Preloader delegate\n\n  shouldPreloadLink(element) {\n    const isUnsafe = element.hasAttribute(\"data-turbo-method\");\n    const isStream = element.hasAttribute(\"data-turbo-stream\");\n    const frameTarget = element.getAttribute(\"data-turbo-frame\");\n    const frame = frameTarget == \"_top\" ?\n      null :\n      document.getElementById(frameTarget) || findClosestRecursively(element, \"turbo-frame:not([disabled])\");\n\n    if (isUnsafe || isStream || frame instanceof FrameElement) {\n      return false\n    } else {\n      const location = new URL(element.href);\n\n      return this.elementIsNavigatable(element) && locationIsVisitable(location, this.snapshot.rootLocation)\n    }\n  }\n\n  // History delegate\n\n  historyPoppedToLocationWithRestorationIdentifierAndDirection(location, restorationIdentifier, direction) {\n    if (this.enabled) {\n      this.navigator.startVisit(location, restorationIdentifier, {\n        action: \"restore\",\n        historyChanged: true,\n        direction\n      });\n    } else {\n      this.adapter.pageInvalidated({\n        reason: \"turbo_disabled\"\n      });\n    }\n  }\n\n  historyPoppedWithEmptyState(location) {\n    this.history.replace(location);\n    this.view.lastRenderedLocation = location;\n    this.view.cacheSnapshot();\n  }\n\n  // Scroll observer delegate\n\n  scrollPositionChanged(position) {\n    this.history.updateRestorationData({ scrollPosition: position });\n  }\n\n  // Form click observer delegate\n\n  willSubmitFormLinkToLocation(link, location) {\n    return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation)\n  }\n\n  submittedFormLinkToLocation() {}\n\n  // Link hover observer delegate\n\n  canPrefetchRequestToLocation(link, location) {\n    return (\n      this.elementIsNavigatable(link) &&\n      locationIsVisitable(location, this.snapshot.rootLocation) &&\n      this.navigator.linkPrefetchingIsEnabledForLocation(location)\n    )\n  }\n\n  // Link click observer delegate\n\n  willFollowLinkToLocation(link, location, event) {\n    return (\n      this.elementIsNavigatable(link) &&\n      locationIsVisitable(location, this.snapshot.rootLocation) &&\n      this.applicationAllowsFollowingLinkToLocation(link, location, event)\n    )\n  }\n\n  followedLinkToLocation(link, location) {\n    const action = this.getActionForLink(link);\n    const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n\n    this.visit(location.href, { action, acceptsStreamResponse });\n  }\n\n  // Navigator delegate\n\n  allowsVisitingLocationWithAction(location, action) {\n    return this.applicationAllowsVisitingLocation(location)\n  }\n\n  visitProposedToLocation(location, options) {\n    extendURLWithDeprecatedProperties(location);\n    this.adapter.visitProposedToLocation(location, options);\n  }\n\n  // Visit delegate\n\n  visitStarted(visit) {\n    if (!visit.acceptsStreamResponse) {\n      markAsBusy(document.documentElement);\n      this.view.markVisitDirection(visit.direction);\n    }\n    extendURLWithDeprecatedProperties(visit.location);\n    this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n  }\n\n  visitCompleted(visit) {\n    this.view.unmarkVisitDirection();\n    clearBusyState(document.documentElement);\n    this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n  }\n\n  // Form submit observer delegate\n\n  willSubmitForm(form, submitter) {\n    const action = getAction$1(form, submitter);\n\n    return (\n      this.submissionIsNavigatable(form, submitter) &&\n      locationIsVisitable(expandURL(action), this.snapshot.rootLocation)\n    )\n  }\n\n  formSubmitted(form, submitter) {\n    this.navigator.submitForm(form, submitter);\n  }\n\n  // Page observer delegate\n\n  pageBecameInteractive() {\n    this.view.lastRenderedLocation = this.location;\n    this.notifyApplicationAfterPageLoad();\n  }\n\n  pageLoaded() {\n    this.history.assumeControlOfScrollRestoration();\n  }\n\n  pageWillUnload() {\n    this.history.relinquishControlOfScrollRestoration();\n  }\n\n  // Stream observer delegate\n\n  receivedMessageFromStream(message) {\n    this.renderStreamMessage(message);\n  }\n\n  // Page view delegate\n\n  viewWillCacheSnapshot() {\n    this.notifyApplicationBeforeCachingSnapshot();\n  }\n\n  allowsImmediateRender({ element }, options) {\n    const event = this.notifyApplicationBeforeRender(element, options);\n    const {\n      defaultPrevented,\n      detail: { render }\n    } = event;\n\n    if (this.view.renderer && render) {\n      this.view.renderer.renderElement = render;\n    }\n\n    return !defaultPrevented\n  }\n\n  viewRenderedSnapshot(_snapshot, _isPreview, renderMethod) {\n    this.view.lastRenderedLocation = this.history.location;\n    this.notifyApplicationAfterRender(renderMethod);\n  }\n\n  preloadOnLoadLinksForView(element) {\n    this.preloader.preloadOnLoadLinksForView(element);\n  }\n\n  viewInvalidated(reason) {\n    this.adapter.pageInvalidated(reason);\n  }\n\n  // Frame element\n\n  frameLoaded(frame) {\n    this.notifyApplicationAfterFrameLoad(frame);\n  }\n\n  frameRendered(fetchResponse, frame) {\n    this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n  }\n\n  // Application events\n\n  applicationAllowsFollowingLinkToLocation(link, location, ev) {\n    const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n    return !event.defaultPrevented\n  }\n\n  applicationAllowsVisitingLocation(location) {\n    const event = this.notifyApplicationBeforeVisitingLocation(location);\n    return !event.defaultPrevented\n  }\n\n  notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n    return dispatch(\"turbo:click\", {\n      target: link,\n      detail: { url: location.href, originalEvent: event },\n      cancelable: true\n    })\n  }\n\n  notifyApplicationBeforeVisitingLocation(location) {\n    return dispatch(\"turbo:before-visit\", {\n      detail: { url: location.href },\n      cancelable: true\n    })\n  }\n\n  notifyApplicationAfterVisitingLocation(location, action) {\n    return dispatch(\"turbo:visit\", { detail: { url: location.href, action } })\n  }\n\n  notifyApplicationBeforeCachingSnapshot() {\n    return dispatch(\"turbo:before-cache\")\n  }\n\n  notifyApplicationBeforeRender(newBody, options) {\n    return dispatch(\"turbo:before-render\", {\n      detail: { newBody, ...options },\n      cancelable: true\n    })\n  }\n\n  notifyApplicationAfterRender(renderMethod) {\n    return dispatch(\"turbo:render\", { detail: { renderMethod } })\n  }\n\n  notifyApplicationAfterPageLoad(timing = {}) {\n    return dispatch(\"turbo:load\", {\n      detail: { url: this.location.href, timing }\n    })\n  }\n\n  notifyApplicationAfterFrameLoad(frame) {\n    return dispatch(\"turbo:frame-load\", { target: frame })\n  }\n\n  notifyApplicationAfterFrameRender(fetchResponse, frame) {\n    return dispatch(\"turbo:frame-render\", {\n      detail: { fetchResponse },\n      target: frame,\n      cancelable: true\n    })\n  }\n\n  // Helpers\n\n  submissionIsNavigatable(form, submitter) {\n    if (config.forms.mode == \"off\") {\n      return false\n    } else {\n      const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n\n      if (config.forms.mode == \"optin\") {\n        return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null\n      } else {\n        return submitterIsNavigatable && this.elementIsNavigatable(form)\n      }\n    }\n  }\n\n  elementIsNavigatable(element) {\n    const container = findClosestRecursively(element, \"[data-turbo]\");\n    const withinFrame = findClosestRecursively(element, \"turbo-frame\");\n\n    // Check if Drive is enabled on the session or we're within a Frame.\n    if (config.drive.enabled || withinFrame) {\n      // Element is navigatable by default, unless `data-turbo=\"false\"`.\n      if (container) {\n        return container.getAttribute(\"data-turbo\") != \"false\"\n      } else {\n        return true\n      }\n    } else {\n      // Element isn't navigatable by default, unless `data-turbo=\"true\"`.\n      if (container) {\n        return container.getAttribute(\"data-turbo\") == \"true\"\n      } else {\n        return false\n      }\n    }\n  }\n\n  // Private\n\n  getActionForLink(link) {\n    return getVisitAction(link) || \"advance\"\n  }\n\n  get snapshot() {\n    return this.view.snapshot\n  }\n}\n\n// Older versions of the Turbo Native adapters referenced the\n// `Location#absoluteURL` property in their implementations of\n// the `Adapter#visitProposedToLocation()` and `#visitStarted()`\n// methods. The Location class has since been removed in favor\n// of the DOM URL API, and accordingly all Adapter methods now\n// receive URL objects.\n//\n// We alias #absoluteURL to #toString() here to avoid crashing\n// older adapters which do not expect URL objects. We should\n// consider removing this support at some point in the future.\n\nfunction extendURLWithDeprecatedProperties(url) {\n  Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\n\nconst deprecatedLocationPropertyDescriptors = {\n  absoluteURL: {\n    get() {\n      return this.toString()\n    }\n  }\n};\n\nconst session = new Session(recentRequests);\n\n// Rename `navigator` to avoid shadowing `window.navigator`\nconst { cache, navigator: sessionNavigator } = session;\n\n/**\n * Starts the main session.\n * This initialises any necessary observers such as those to monitor\n * link interactions.\n */\nfunction start() {\n  session.start();\n}\n\n/**\n * Registers an adapter for the main session.\n *\n * @param adapter Adapter to register\n */\nfunction registerAdapter(adapter) {\n  session.registerAdapter(adapter);\n}\n\n/**\n * Performs an application visit to the given location.\n *\n * @param location Location to visit (a URL or path)\n * @param options Options to apply\n * @param options.action Type of history navigation to apply (\"restore\",\n * \"replace\" or \"advance\")\n * @param options.historyChanged Specifies whether the browser history has\n * already been changed for this visit or not\n * @param options.referrer Specifies the referrer of this visit such that\n * navigations to the same page will not result in a new history entry.\n * @param options.snapshotHTML Cached snapshot to render\n * @param options.response Response of the specified location\n */\nfunction visit(location, options) {\n  session.visit(location, options);\n}\n\n/**\n * Connects a stream source to the main session.\n *\n * @param source Stream source to connect\n */\nfunction connectStreamSource(source) {\n  session.connectStreamSource(source);\n}\n\n/**\n * Disconnects a stream source from the main session.\n *\n * @param source Stream source to disconnect\n */\nfunction disconnectStreamSource(source) {\n  session.disconnectStreamSource(source);\n}\n\n/**\n * Renders a stream message to the main session by appending it to the\n * current document.\n *\n * @param message Message to render\n */\nfunction renderStreamMessage(message) {\n  session.renderStreamMessage(message);\n}\n\n/**\n * Sets the delay after which the progress bar will appear during navigation.\n *\n * The progress bar appears after 500ms by default.\n *\n * Note that this method has no effect when used with the iOS or Android\n * adapters.\n *\n * @param delay Time to delay in milliseconds\n */\nfunction setProgressBarDelay(delay) {\n  console.warn(\n    \"Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n  );\n  config.drive.progressBarDelay = delay;\n}\n\nfunction setConfirmMethod(confirmMethod) {\n  console.warn(\n    \"Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n  );\n  config.forms.confirm = confirmMethod;\n}\n\nfunction setFormMode(mode) {\n  console.warn(\n    \"Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`\"\n  );\n  config.forms.mode = mode;\n}\n\n/**\n * Morph the state of the currentBody based on the attributes and contents of\n * the newBody. Morphing body elements may dispatch turbo:morph,\n * turbo:before-morph-element, turbo:before-morph-attribute, and\n * turbo:morph-element events.\n *\n * @param currentBody HTMLBodyElement destination of morphing changes\n * @param newBody HTMLBodyElement source of morphing changes\n */\nfunction morphBodyElements(currentBody, newBody) {\n  MorphingPageRenderer.renderElement(currentBody, newBody);\n}\n\n/**\n * Morph the child elements of the currentFrame based on the child elements of\n * the newFrame. Morphing turbo-frame elements may dispatch turbo:before-frame-morph,\n * turbo:before-morph-element, turbo:before-morph-attribute, and\n * turbo:morph-element events.\n *\n * @param currentFrame FrameElement destination of morphing children changes\n * @param newFrame FrameElement source of morphing children changes\n */\nfunction morphTurboFrameElements(currentFrame, newFrame) {\n  MorphingFrameRenderer.renderElement(currentFrame, newFrame);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  PageRenderer: PageRenderer,\n  PageSnapshot: PageSnapshot,\n  FrameRenderer: FrameRenderer,\n  fetch: fetchWithTurboHeaders,\n  config: config,\n  session: session,\n  cache: cache,\n  navigator: sessionNavigator,\n  start: start,\n  registerAdapter: registerAdapter,\n  visit: visit,\n  connectStreamSource: connectStreamSource,\n  disconnectStreamSource: disconnectStreamSource,\n  renderStreamMessage: renderStreamMessage,\n  setProgressBarDelay: setProgressBarDelay,\n  setConfirmMethod: setConfirmMethod,\n  setFormMode: setFormMode,\n  morphBodyElements: morphBodyElements,\n  morphTurboFrameElements: morphTurboFrameElements,\n  morphChildren: morphChildren,\n  morphElements: morphElements\n});\n\nclass TurboFrameMissingError extends Error {}\n\nclass FrameController {\n  fetchResponseLoaded = (_fetchResponse) => Promise.resolve()\n  #currentFetchRequest = null\n  #resolveVisitPromise = () => {}\n  #connected = false\n  #hasBeenLoaded = false\n  #ignoredAttributes = new Set()\n  #shouldMorphFrame = false\n  action = null\n\n  constructor(element) {\n    this.element = element;\n    this.view = new FrameView(this, this.element);\n    this.appearanceObserver = new AppearanceObserver(this, this.element);\n    this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n    this.linkInterceptor = new LinkInterceptor(this, this.element);\n    this.restorationIdentifier = uuid();\n    this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n  }\n\n  // Frame delegate\n\n  connect() {\n    if (!this.#connected) {\n      this.#connected = true;\n      if (this.loadingStyle == FrameLoadingStyle.lazy) {\n        this.appearanceObserver.start();\n      } else {\n        this.#loadSourceURL();\n      }\n      this.formLinkClickObserver.start();\n      this.linkInterceptor.start();\n      this.formSubmitObserver.start();\n    }\n  }\n\n  disconnect() {\n    if (this.#connected) {\n      this.#connected = false;\n      this.appearanceObserver.stop();\n      this.formLinkClickObserver.stop();\n      this.linkInterceptor.stop();\n      this.formSubmitObserver.stop();\n\n      if (!this.element.hasAttribute(\"recurse\")) {\n        this.#currentFetchRequest?.cancel();\n      }\n    }\n  }\n\n  disabledChanged() {\n    if (this.disabled) {\n      this.#currentFetchRequest?.cancel();\n    } else if (this.loadingStyle == FrameLoadingStyle.eager) {\n      this.#loadSourceURL();\n    }\n  }\n\n  sourceURLChanged() {\n    if (this.#isIgnoringChangesTo(\"src\")) return\n\n    if (!this.sourceURL) {\n      this.#currentFetchRequest?.cancel();\n    }\n\n    if (this.element.isConnected) {\n      this.complete = false;\n    }\n\n    if (this.loadingStyle == FrameLoadingStyle.eager || this.#hasBeenLoaded) {\n      this.#loadSourceURL();\n    }\n  }\n\n  sourceURLReloaded() {\n    const { refresh, src } = this.element;\n\n    this.#shouldMorphFrame = src && refresh === \"morph\";\n\n    this.element.removeAttribute(\"complete\");\n    this.element.src = null;\n    this.element.src = src;\n    return this.element.loaded\n  }\n\n  loadingStyleChanged() {\n    if (this.loadingStyle == FrameLoadingStyle.lazy) {\n      this.appearanceObserver.start();\n    } else {\n      this.appearanceObserver.stop();\n      this.#loadSourceURL();\n    }\n  }\n\n  async #loadSourceURL() {\n    if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n      this.element.loaded = this.#visit(expandURL(this.sourceURL));\n      this.appearanceObserver.stop();\n      await this.element.loaded;\n      this.#hasBeenLoaded = true;\n    }\n  }\n\n  async loadResponse(fetchResponse) {\n    if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n      this.sourceURL = fetchResponse.response.url;\n    }\n\n    try {\n      const html = await fetchResponse.responseHTML;\n      if (html) {\n        const document = parseHTMLDocument(html);\n        const pageSnapshot = PageSnapshot.fromDocument(document);\n\n        if (pageSnapshot.isVisitable) {\n          await this.#loadFrameResponse(fetchResponse, document);\n        } else {\n          await this.#handleUnvisitableFrameResponse(fetchResponse);\n        }\n      }\n    } finally {\n      this.#shouldMorphFrame = false;\n      this.fetchResponseLoaded = () => Promise.resolve();\n    }\n  }\n\n  // Appearance observer delegate\n\n  elementAppearedInViewport(element) {\n    this.proposeVisitIfNavigatedWithAction(element, getVisitAction(element));\n    this.#loadSourceURL();\n  }\n\n  // Form link click observer delegate\n\n  willSubmitFormLinkToLocation(link) {\n    return this.#shouldInterceptNavigation(link)\n  }\n\n  submittedFormLinkToLocation(link, _location, form) {\n    const frame = this.#findFrameElement(link);\n    if (frame) form.setAttribute(\"data-turbo-frame\", frame.id);\n  }\n\n  // Link interceptor delegate\n\n  shouldInterceptLinkClick(element, _location, _event) {\n    return this.#shouldInterceptNavigation(element)\n  }\n\n  linkClickIntercepted(element, location) {\n    this.#navigateFrame(element, location);\n  }\n\n  // Form submit observer delegate\n\n  willSubmitForm(element, submitter) {\n    return element.closest(\"turbo-frame\") == this.element && this.#shouldInterceptNavigation(element, submitter)\n  }\n\n  formSubmitted(element, submitter) {\n    if (this.formSubmission) {\n      this.formSubmission.stop();\n    }\n\n    this.formSubmission = new FormSubmission(this, element, submitter);\n\n    const { fetchRequest } = this.formSubmission;\n    const frame = this.#findFrameElement(element, submitter);\n\n    this.prepareRequest(fetchRequest, frame);\n    this.formSubmission.start();\n  }\n\n  // Fetch request delegate\n\n  prepareRequest(request, frame = this) {\n    request.headers[\"Turbo-Frame\"] = frame.id;\n\n    if (this.currentNavigationElement?.hasAttribute(\"data-turbo-stream\")) {\n      request.acceptResponseType(StreamMessage.contentType);\n    }\n  }\n\n  requestStarted(_request) {\n    markAsBusy(this.element);\n  }\n\n  requestPreventedHandlingResponse(_request, _response) {\n    this.#resolveVisitPromise();\n  }\n\n  async requestSucceededWithResponse(request, response) {\n    await this.loadResponse(response);\n    this.#resolveVisitPromise();\n  }\n\n  async requestFailedWithResponse(request, response) {\n    await this.loadResponse(response);\n    this.#resolveVisitPromise();\n  }\n\n  requestErrored(request, error) {\n    console.error(error);\n    this.#resolveVisitPromise();\n  }\n\n  requestFinished(_request) {\n    clearBusyState(this.element);\n  }\n\n  // Form submission delegate\n\n  formSubmissionStarted({ formElement }) {\n    markAsBusy(formElement, this.#findFrameElement(formElement));\n  }\n\n  formSubmissionSucceededWithResponse(formSubmission, response) {\n    const frame = this.#findFrameElement(formSubmission.formElement, formSubmission.submitter);\n\n    frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(formSubmission.submitter, formSubmission.formElement, frame));\n    frame.delegate.loadResponse(response);\n\n    if (!formSubmission.isSafe) {\n      session.clearCache();\n    }\n  }\n\n  formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n    this.element.delegate.loadResponse(fetchResponse);\n    session.clearCache();\n  }\n\n  formSubmissionErrored(formSubmission, error) {\n    console.error(error);\n  }\n\n  formSubmissionFinished({ formElement }) {\n    clearBusyState(formElement, this.#findFrameElement(formElement));\n  }\n\n  // View delegate\n\n  allowsImmediateRender({ element: newFrame }, options) {\n    const event = dispatch(\"turbo:before-frame-render\", {\n      target: this.element,\n      detail: { newFrame, ...options },\n      cancelable: true\n    });\n\n    const {\n      defaultPrevented,\n      detail: { render }\n    } = event;\n\n    if (this.view.renderer && render) {\n      this.view.renderer.renderElement = render;\n    }\n\n    return !defaultPrevented\n  }\n\n  viewRenderedSnapshot(_snapshot, _isPreview, _renderMethod) {}\n\n  preloadOnLoadLinksForView(element) {\n    session.preloadOnLoadLinksForView(element);\n  }\n\n  viewInvalidated() {}\n\n  // Frame renderer delegate\n\n  willRenderFrame(currentElement, _newElement) {\n    this.previousFrameElement = currentElement.cloneNode(true);\n  }\n\n  visitCachedSnapshot = ({ element }) => {\n    const frame = element.querySelector(\"#\" + this.element.id);\n\n    if (frame && this.previousFrameElement) {\n      frame.replaceChildren(...this.previousFrameElement.children);\n    }\n\n    delete this.previousFrameElement;\n  }\n\n  // Private\n\n  async #loadFrameResponse(fetchResponse, document) {\n    const newFrameElement = await this.extractForeignFrameElement(document.body);\n    const rendererClass = this.#shouldMorphFrame ? MorphingFrameRenderer : FrameRenderer;\n\n    if (newFrameElement) {\n      const snapshot = new Snapshot(newFrameElement);\n      const renderer = new rendererClass(this, this.view.snapshot, snapshot, false, false);\n      if (this.view.renderPromise) await this.view.renderPromise;\n      this.changeHistory();\n\n      await this.view.render(renderer);\n      this.complete = true;\n      session.frameRendered(fetchResponse, this.element);\n      session.frameLoaded(this.element);\n      await this.fetchResponseLoaded(fetchResponse);\n    } else if (this.#willHandleFrameMissingFromResponse(fetchResponse)) {\n      this.#handleFrameMissingFromResponse(fetchResponse);\n    }\n  }\n\n  async #visit(url) {\n    const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n\n    this.#currentFetchRequest?.cancel();\n    this.#currentFetchRequest = request;\n\n    return new Promise((resolve) => {\n      this.#resolveVisitPromise = () => {\n        this.#resolveVisitPromise = () => {};\n        this.#currentFetchRequest = null;\n        resolve();\n      };\n      request.perform();\n    })\n  }\n\n  #navigateFrame(element, url, submitter) {\n    const frame = this.#findFrameElement(element, submitter);\n\n    frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(submitter, element, frame));\n\n    this.#withCurrentNavigationElement(element, () => {\n      frame.src = url;\n    });\n  }\n\n  proposeVisitIfNavigatedWithAction(frame, action = null) {\n    this.action = action;\n\n    if (this.action) {\n      const pageSnapshot = PageSnapshot.fromElement(frame).clone();\n      const { visitCachedSnapshot } = frame.delegate;\n\n      frame.delegate.fetchResponseLoaded = async (fetchResponse) => {\n        if (frame.src) {\n          const { statusCode, redirected } = fetchResponse;\n          const responseHTML = await fetchResponse.responseHTML;\n          const response = { statusCode, redirected, responseHTML };\n          const options = {\n            response,\n            visitCachedSnapshot,\n            willRender: false,\n            updateHistory: false,\n            restorationIdentifier: this.restorationIdentifier,\n            snapshot: pageSnapshot\n          };\n\n          if (this.action) options.action = this.action;\n\n          session.visit(frame.src, options);\n        }\n      };\n    }\n  }\n\n  changeHistory() {\n    if (this.action) {\n      const method = getHistoryMethodForAction(this.action);\n      session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n    }\n  }\n\n  async #handleUnvisitableFrameResponse(fetchResponse) {\n    console.warn(\n      `The response (${fetchResponse.statusCode}) from <turbo-frame id=\"${this.element.id}\"> is performing a full page visit due to turbo-visit-control.`\n    );\n\n    await this.#visitResponse(fetchResponse.response);\n  }\n\n  #willHandleFrameMissingFromResponse(fetchResponse) {\n    this.element.setAttribute(\"complete\", \"\");\n\n    const response = fetchResponse.response;\n    const visit = async (url, options) => {\n      if (url instanceof Response) {\n        this.#visitResponse(url);\n      } else {\n        session.visit(url, options);\n      }\n    };\n\n    const event = dispatch(\"turbo:frame-missing\", {\n      target: this.element,\n      detail: { response, visit },\n      cancelable: true\n    });\n\n    return !event.defaultPrevented\n  }\n\n  #handleFrameMissingFromResponse(fetchResponse) {\n    this.view.missing();\n    this.#throwFrameMissingError(fetchResponse);\n  }\n\n  #throwFrameMissingError(fetchResponse) {\n    const message = `The response (${fetchResponse.statusCode}) did not contain the expected <turbo-frame id=\"${this.element.id}\"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;\n    throw new TurboFrameMissingError(message)\n  }\n\n  async #visitResponse(response) {\n    const wrapped = new FetchResponse(response);\n    const responseHTML = await wrapped.responseHTML;\n    const { location, redirected, statusCode } = wrapped;\n\n    return session.visit(location, { response: { redirected, statusCode, responseHTML } })\n  }\n\n  #findFrameElement(element, submitter) {\n    const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n    const target = this.#getFrameElementById(id);\n\n    return target instanceof FrameElement ? target : this.element\n  }\n\n  async extractForeignFrameElement(container) {\n    let element;\n    const id = CSS.escape(this.id);\n\n    try {\n      element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n      if (element) {\n        return element\n      }\n\n      element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n      if (element) {\n        await element.loaded;\n        return await this.extractForeignFrameElement(element)\n      }\n    } catch (error) {\n      console.error(error);\n      return new FrameElement()\n    }\n\n    return null\n  }\n\n  #formActionIsVisitable(form, submitter) {\n    const action = getAction$1(form, submitter);\n\n    return locationIsVisitable(expandURL(action), this.rootLocation)\n  }\n\n  #shouldInterceptNavigation(element, submitter) {\n    const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n\n    if (element instanceof HTMLFormElement && !this.#formActionIsVisitable(element, submitter)) {\n      return false\n    }\n\n    if (!this.enabled || id == \"_top\") {\n      return false\n    }\n\n    if (id) {\n      const frameElement = this.#getFrameElementById(id);\n      if (frameElement) {\n        return !frameElement.disabled\n      } else if (id == \"_parent\") {\n        return false\n      }\n    }\n\n    if (!session.elementIsNavigatable(element)) {\n      return false\n    }\n\n    if (submitter && !session.elementIsNavigatable(submitter)) {\n      return false\n    }\n\n    return true\n  }\n\n  // Computed properties\n\n  get id() {\n    return this.element.id\n  }\n\n  get disabled() {\n    return this.element.disabled\n  }\n\n  get enabled() {\n    return !this.disabled\n  }\n\n  get sourceURL() {\n    if (this.element.src) {\n      return this.element.src\n    }\n  }\n\n  set sourceURL(sourceURL) {\n    this.#ignoringChangesToAttribute(\"src\", () => {\n      this.element.src = sourceURL ?? null;\n    });\n  }\n\n  get loadingStyle() {\n    return this.element.loading\n  }\n\n  get isLoading() {\n    return this.formSubmission !== undefined || this.#resolveVisitPromise() !== undefined\n  }\n\n  get complete() {\n    return this.element.hasAttribute(\"complete\")\n  }\n\n  set complete(value) {\n    if (value) {\n      this.element.setAttribute(\"complete\", \"\");\n    } else {\n      this.element.removeAttribute(\"complete\");\n    }\n  }\n\n  get isActive() {\n    return this.element.isActive && this.#connected\n  }\n\n  get rootLocation() {\n    const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n    const root = meta?.content ?? \"/\";\n    return expandURL(root)\n  }\n\n  #isIgnoringChangesTo(attributeName) {\n    return this.#ignoredAttributes.has(attributeName)\n  }\n\n  #ignoringChangesToAttribute(attributeName, callback) {\n    this.#ignoredAttributes.add(attributeName);\n    callback();\n    this.#ignoredAttributes.delete(attributeName);\n  }\n\n  #withCurrentNavigationElement(element, callback) {\n    this.currentNavigationElement = element;\n    callback();\n    delete this.currentNavigationElement;\n  }\n\n  #getFrameElementById(id) {\n    if (id != null) {\n      const element = id === \"_parent\" ?\n        this.element.parentElement.closest(\"turbo-frame\") :\n        document.getElementById(id);\n      if (element instanceof FrameElement) {\n        return element\n      }\n    }\n  }\n}\n\nfunction activateElement(element, currentURL) {\n  if (element) {\n    const src = element.getAttribute(\"src\");\n    if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n      throw new Error(`Matching <turbo-frame id=\"${element.id}\"> element has a source URL which references itself`)\n    }\n    if (element.ownerDocument !== document) {\n      element = document.importNode(element, true);\n    }\n\n    if (element instanceof FrameElement) {\n      element.connectedCallback();\n      element.disconnectedCallback();\n      return element\n    }\n  }\n}\n\nconst StreamActions = {\n  after() {\n    this.removeDuplicateTargetSiblings();\n    this.targetElements.forEach((e) => e.parentElement?.insertBefore(this.templateContent, e.nextSibling));\n  },\n\n  append() {\n    this.removeDuplicateTargetChildren();\n    this.targetElements.forEach((e) => e.append(this.templateContent));\n  },\n\n  before() {\n    this.removeDuplicateTargetSiblings();\n    this.targetElements.forEach((e) => e.parentElement?.insertBefore(this.templateContent, e));\n  },\n\n  prepend() {\n    this.removeDuplicateTargetChildren();\n    this.targetElements.forEach((e) => e.prepend(this.templateContent));\n  },\n\n  remove() {\n    this.targetElements.forEach((e) => e.remove());\n  },\n\n  replace() {\n    const method = this.getAttribute(\"method\");\n\n    this.targetElements.forEach((targetElement) => {\n      if (method === \"morph\") {\n        morphElements(targetElement, this.templateContent);\n      } else {\n        targetElement.replaceWith(this.templateContent);\n      }\n    });\n  },\n\n  update() {\n    const method = this.getAttribute(\"method\");\n\n    this.targetElements.forEach((targetElement) => {\n      if (method === \"morph\") {\n        morphChildren(targetElement, this.templateContent);\n      } else {\n        targetElement.innerHTML = \"\";\n        targetElement.append(this.templateContent);\n      }\n    });\n  },\n\n  refresh() {\n    const method = this.getAttribute(\"method\");\n    const requestId = this.requestId;\n    const scroll = this.getAttribute(\"scroll\");\n\n    session.refresh(this.baseURI, { method, requestId, scroll });\n  }\n};\n\n// <turbo-stream action=replace target=id><template>...\n\n/**\n * Renders updates to the page from a stream of messages.\n *\n * Using the `action` attribute, this can be configured one of eight ways:\n *\n * - `after` - inserts the result after the target\n * - `append` - appends the result to the target\n * - `before` - inserts the result before the target\n * - `prepend` - prepends the result to the target\n * - `refresh` - initiates a page refresh\n * - `remove` - removes the target\n * - `replace` - replaces the outer HTML of the target\n * - `update` - replaces the inner HTML of the target\n *\n * @customElement turbo-stream\n * @example\n *   <turbo-stream action=\"append\" target=\"dom_id\">\n *     <template>\n *       Content to append to target designated with the dom_id.\n *     </template>\n *   </turbo-stream>\n */\nclass StreamElement extends HTMLElement {\n  static async renderElement(newElement) {\n    await newElement.performAction();\n  }\n\n  async connectedCallback() {\n    try {\n      await this.render();\n    } catch (error) {\n      console.error(error);\n    } finally {\n      this.disconnect();\n    }\n  }\n\n  async render() {\n    return (this.renderPromise ??= (async () => {\n      const event = this.beforeRenderEvent;\n\n      if (this.dispatchEvent(event)) {\n        await nextRepaint();\n        await event.detail.render(this);\n      }\n    })())\n  }\n\n  disconnect() {\n    try {\n      this.remove();\n      // eslint-disable-next-line no-empty\n    } catch {}\n  }\n\n  /**\n   * Removes duplicate children (by ID)\n   */\n  removeDuplicateTargetChildren() {\n    this.duplicateChildren.forEach((c) => c.remove());\n  }\n\n  /**\n   * Gets the list of duplicate children (i.e. those with the same ID)\n   */\n  get duplicateChildren() {\n    const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.getAttribute(\"id\"));\n    const newChildrenIds = [...(this.templateContent?.children || [])].filter((c) => !!c.getAttribute(\"id\")).map((c) => c.getAttribute(\"id\"));\n\n    return existingChildren.filter((c) => newChildrenIds.includes(c.getAttribute(\"id\")))\n  }\n\n  /**\n  * Removes duplicate siblings (by ID)\n  */\n  removeDuplicateTargetSiblings() {\n    this.duplicateSiblings.forEach((c) => c.remove());\n  }\n\n  /**\n  * Gets the list of duplicate siblings (i.e. those with the same ID)\n  */\n  get duplicateSiblings() {\n    const existingChildren = this.targetElements.flatMap((e) => [...e.parentElement.children]).filter((c) => !!c.id);\n    const newChildrenIds = [...(this.templateContent?.children || [])].filter((c) => !!c.id).map((c) => c.id);\n\n    return existingChildren.filter((c) => newChildrenIds.includes(c.id))\n  }\n\n  /**\n   * Gets the action function to be performed.\n   */\n  get performAction() {\n    if (this.action) {\n      const actionFunction = StreamActions[this.action];\n      if (actionFunction) {\n        return actionFunction\n      }\n      this.#raise(\"unknown action\");\n    }\n    this.#raise(\"action attribute is missing\");\n  }\n\n  /**\n   * Gets the target elements which the template will be rendered to.\n   */\n  get targetElements() {\n    if (this.target) {\n      return this.targetElementsById\n    } else if (this.targets) {\n      return this.targetElementsByQuery\n    } else {\n      this.#raise(\"target or targets attribute is missing\");\n    }\n  }\n\n  /**\n   * Gets the contents of the main `<template>`.\n   */\n  get templateContent() {\n    return this.templateElement.content.cloneNode(true)\n  }\n\n  /**\n   * Gets the main `<template>` used for rendering\n   */\n  get templateElement() {\n    if (this.firstElementChild === null) {\n      const template = this.ownerDocument.createElement(\"template\");\n      this.appendChild(template);\n      return template\n    } else if (this.firstElementChild instanceof HTMLTemplateElement) {\n      return this.firstElementChild\n    }\n    this.#raise(\"first child element must be a <template> element\");\n  }\n\n  /**\n   * Gets the current action.\n   */\n  get action() {\n    return this.getAttribute(\"action\")\n  }\n\n  /**\n   * Gets the current target (an element ID) to which the result will\n   * be rendered.\n   */\n  get target() {\n    return this.getAttribute(\"target\")\n  }\n\n  /**\n   * Gets the current \"targets\" selector (a CSS selector)\n   */\n  get targets() {\n    return this.getAttribute(\"targets\")\n  }\n\n  /**\n   * Reads the request-id attribute\n   */\n  get requestId() {\n    return this.getAttribute(\"request-id\")\n  }\n\n  #raise(message) {\n    throw new Error(`${this.description}: ${message}`)\n  }\n\n  get description() {\n    return (this.outerHTML.match(/<[^>]+>/) ?? [])[0] ?? \"<turbo-stream>\"\n  }\n\n  get beforeRenderEvent() {\n    return new CustomEvent(\"turbo:before-stream-render\", {\n      bubbles: true,\n      cancelable: true,\n      detail: { newStream: this, render: StreamElement.renderElement }\n    })\n  }\n\n  get targetElementsById() {\n    const element = this.ownerDocument?.getElementById(this.target);\n\n    if (element !== null) {\n      return [element]\n    } else {\n      return []\n    }\n  }\n\n  get targetElementsByQuery() {\n    const elements = this.ownerDocument?.querySelectorAll(this.targets);\n\n    if (elements.length !== 0) {\n      return Array.prototype.slice.call(elements)\n    } else {\n      return []\n    }\n  }\n}\n\nclass StreamSourceElement extends HTMLElement {\n  streamSource = null\n\n  connectedCallback() {\n    this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);\n\n    connectStreamSource(this.streamSource);\n  }\n\n  disconnectedCallback() {\n    if (this.streamSource) {\n      this.streamSource.close();\n\n      disconnectStreamSource(this.streamSource);\n    }\n  }\n\n  get src() {\n    return this.getAttribute(\"src\") || \"\"\n  }\n}\n\nFrameElement.delegateConstructor = FrameController;\n\nif (customElements.get(\"turbo-frame\") === undefined) {\n  customElements.define(\"turbo-frame\", FrameElement);\n}\n\nif (customElements.get(\"turbo-stream\") === undefined) {\n  customElements.define(\"turbo-stream\", StreamElement);\n}\n\nif (customElements.get(\"turbo-stream-source\") === undefined) {\n  customElements.define(\"turbo-stream-source\", StreamSourceElement);\n}\n\n(() => {\n  const scriptElement = document.currentScript;\n  if (!scriptElement) return\n  if (scriptElement.hasAttribute(\"data-turbo-suppress-warning\")) return\n\n  let element = scriptElement.parentElement;\n  while (element) {\n    if (element == document.body) {\n      return console.warn(\n        unindent`\n        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!\n\n        Load your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\n        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements\n\n        \u2014\u2014\n        Suppress this warning by adding a \"data-turbo-suppress-warning\" attribute to: %s\n      `,\n        scriptElement.outerHTML\n      )\n    }\n\n    element = element.parentElement;\n  }\n})();\n\nwindow.Turbo = { ...Turbo, StreamActions };\nstart();\n\nexport { FetchEnctype, FetchMethod, FetchRequest, FetchResponse, FrameElement, FrameLoadingStyle, FrameRenderer, PageRenderer, PageSnapshot, StreamActions, StreamElement, StreamSourceElement, cache, config, connectStreamSource, disconnectStreamSource, fetchWithTurboHeaders as fetch, fetchEnctypeFromString, fetchMethodFromString, isSafe, morphBodyElements, morphChildren, morphElements, morphTurboFrameElements, sessionNavigator as navigator, registerAdapter, renderStreamMessage, session, setConfirmMethod, setFormMode, setProgressBarDelay, start, visit };\n", "let consumer\n\nexport async function getConsumer() {\n  return consumer || setConsumer(createConsumer().then(setConsumer))\n}\n\nexport function setConsumer(newConsumer) {\n  return consumer = newConsumer\n}\n\nexport async function createConsumer() {\n  const { createConsumer } = await import(/* webpackChunkName: \"actioncable\" */ \"@rails/actioncable/src\")\n  return createConsumer()\n}\n\nexport async function subscribeTo(channel, mixin) {\n  const { subscriptions } = await getConsumer()\n  return subscriptions.create(channel, mixin)\n}\n", "// Based on https://github.com/nathan7/snakeize\n//\n// This software is released under the MIT license:\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nexport default function walk (obj) {\n    if (!obj || typeof obj !== 'object') return obj;\n    if (obj instanceof Date || obj instanceof RegExp) return obj;\n    if (Array.isArray(obj)) return obj.map(walk);\n    return Object.keys(obj).reduce(function (acc, key) {\n        var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function (m, x) {\n            return '_' + x.toLowerCase();\n        });\n        acc[camel] = walk(obj[key]);\n        return acc;\n    }, {});\n};", "import { connectStreamSource, disconnectStreamSource } from \"@hotwired/turbo\"\nimport { subscribeTo } from \"./cable\"\nimport snakeize from \"./snakeize\"\n\nclass TurboCableStreamSourceElement extends HTMLElement {\n  static observedAttributes = [\"channel\", \"signed-stream-name\"]\n\n  async connectedCallback() {\n    connectStreamSource(this)\n    this.subscription = await subscribeTo(this.channel, {\n      received: this.dispatchMessageEvent.bind(this),\n      connected: this.subscriptionConnected.bind(this),\n      disconnected: this.subscriptionDisconnected.bind(this)\n    })\n  }\n\n  disconnectedCallback() {\n    disconnectStreamSource(this)\n    if (this.subscription) this.subscription.unsubscribe()\n    this.subscriptionDisconnected()\n  }\n\n  attributeChangedCallback() {\n    if (this.subscription) {\n      this.disconnectedCallback()\n      this.connectedCallback()\n    }\n  }\n\n  dispatchMessageEvent(data) {\n    const event = new MessageEvent(\"message\", { data })\n    return this.dispatchEvent(event)\n  }\n\n  subscriptionConnected() {\n    this.setAttribute(\"connected\", \"\")\n  }\n\n  subscriptionDisconnected() {\n    this.removeAttribute(\"connected\")\n  }\n\n  get channel() {\n    const channel = this.getAttribute(\"channel\")\n    const signed_stream_name = this.getAttribute(\"signed-stream-name\")\n    return { channel, signed_stream_name, ...snakeize({ ...this.dataset }) }\n  }\n}\n\n\nif (customElements.get(\"turbo-cable-stream-source\") === undefined) {\n  customElements.define(\"turbo-cable-stream-source\", TurboCableStreamSourceElement)\n}\n", "export function encodeMethodIntoRequestBody(event) {\n  if (event.target instanceof HTMLFormElement) {\n    const { target: form, detail: { fetchOptions } } = event\n\n    form.addEventListener(\"turbo:submit-start\", ({ detail: { formSubmission: { submitter } } }) => {\n      const body = isBodyInit(fetchOptions.body) ? fetchOptions.body : new URLSearchParams()\n      const method = determineFetchMethod(submitter, body, form)\n\n      if (!/get/i.test(method)) {\n        if (/post/i.test(method)) {\n          body.delete(\"_method\")\n        } else {\n          body.set(\"_method\", method)\n        }\n\n        fetchOptions.method = \"post\"\n      }\n    }, { once: true })\n  }\n}\n\nfunction determineFetchMethod(submitter, body, form) {\n  const formMethod = determineFormMethod(submitter)\n  const overrideMethod = body.get(\"_method\")\n  const method = form.getAttribute(\"method\") || \"get\"\n\n  if (typeof formMethod == \"string\") {\n    return formMethod\n  } else if (typeof overrideMethod == \"string\") {\n    return overrideMethod\n  } else {\n    return method\n  }\n}\n\nfunction determineFormMethod(submitter) {\n  if (submitter instanceof HTMLButtonElement || submitter instanceof HTMLInputElement) {\n    // Rails 7 ActionView::Helpers::FormBuilder#button method has an override\n    // for formmethod if the button does not have name or value attributes\n    // set, which is the default. This means that if you use <%= f.button\n    // formmethod: :delete %>, it will generate a <button name=\"_method\"\n    // value=\"delete\" formmethod=\"post\">. Therefore, if the submitter's name\n    // is already _method, it's value attribute already contains the desired\n    // method.\n    if (submitter.name === '_method') {\n      return submitter.value\n    } else if (submitter.hasAttribute(\"formmethod\")) {\n      return submitter.formMethod\n    } else {\n      return null\n    }\n  } else {\n    return null\n  }\n}\n\nfunction isBodyInit(body) {\n  return body instanceof FormData || body instanceof URLSearchParams\n}\n", "import \"./cable_stream_source_element\"\n\nimport * as Turbo from \"@hotwired/turbo\"\nexport { Turbo }\n\nimport * as cable from \"./cable\"\nexport { cable }\n\nimport { encodeMethodIntoRequestBody } from \"./fetch_requests\"\n\nwindow.Turbo = Turbo\n\naddEventListener(\"turbo:before-fetch-request\", encodeMethodIntoRequestBody)\n", "/*\nStimulus 3.2.1\nCopyright \u00A9 2023 Basecamp, LLC\n */\nclass EventListener {\n    constructor(eventTarget, eventName, eventOptions) {\n        this.eventTarget = eventTarget;\n        this.eventName = eventName;\n        this.eventOptions = eventOptions;\n        this.unorderedBindings = new Set();\n    }\n    connect() {\n        this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n    }\n    disconnect() {\n        this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n    }\n    bindingConnected(binding) {\n        this.unorderedBindings.add(binding);\n    }\n    bindingDisconnected(binding) {\n        this.unorderedBindings.delete(binding);\n    }\n    handleEvent(event) {\n        const extendedEvent = extendEvent(event);\n        for (const binding of this.bindings) {\n            if (extendedEvent.immediatePropagationStopped) {\n                break;\n            }\n            else {\n                binding.handleEvent(extendedEvent);\n            }\n        }\n    }\n    hasBindings() {\n        return this.unorderedBindings.size > 0;\n    }\n    get bindings() {\n        return Array.from(this.unorderedBindings).sort((left, right) => {\n            const leftIndex = left.index, rightIndex = right.index;\n            return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n        });\n    }\n}\nfunction extendEvent(event) {\n    if (\"immediatePropagationStopped\" in event) {\n        return event;\n    }\n    else {\n        const { stopImmediatePropagation } = event;\n        return Object.assign(event, {\n            immediatePropagationStopped: false,\n            stopImmediatePropagation() {\n                this.immediatePropagationStopped = true;\n                stopImmediatePropagation.call(this);\n            },\n        });\n    }\n}\n\nclass Dispatcher {\n    constructor(application) {\n        this.application = application;\n        this.eventListenerMaps = new Map();\n        this.started = false;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.eventListeners.forEach((eventListener) => eventListener.connect());\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.eventListeners.forEach((eventListener) => eventListener.disconnect());\n        }\n    }\n    get eventListeners() {\n        return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n    }\n    bindingConnected(binding) {\n        this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n    }\n    bindingDisconnected(binding, clearEventListeners = false) {\n        this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n        if (clearEventListeners)\n            this.clearEventListenersForBinding(binding);\n    }\n    handleError(error, message, detail = {}) {\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    clearEventListenersForBinding(binding) {\n        const eventListener = this.fetchEventListenerForBinding(binding);\n        if (!eventListener.hasBindings()) {\n            eventListener.disconnect();\n            this.removeMappedEventListenerFor(binding);\n        }\n    }\n    removeMappedEventListenerFor(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        eventListenerMap.delete(cacheKey);\n        if (eventListenerMap.size == 0)\n            this.eventListenerMaps.delete(eventTarget);\n    }\n    fetchEventListenerForBinding(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        return this.fetchEventListener(eventTarget, eventName, eventOptions);\n    }\n    fetchEventListener(eventTarget, eventName, eventOptions) {\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        let eventListener = eventListenerMap.get(cacheKey);\n        if (!eventListener) {\n            eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n            eventListenerMap.set(cacheKey, eventListener);\n        }\n        return eventListener;\n    }\n    createEventListener(eventTarget, eventName, eventOptions) {\n        const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n        if (this.started) {\n            eventListener.connect();\n        }\n        return eventListener;\n    }\n    fetchEventListenerMapForEventTarget(eventTarget) {\n        let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n        if (!eventListenerMap) {\n            eventListenerMap = new Map();\n            this.eventListenerMaps.set(eventTarget, eventListenerMap);\n        }\n        return eventListenerMap;\n    }\n    cacheKey(eventName, eventOptions) {\n        const parts = [eventName];\n        Object.keys(eventOptions)\n            .sort()\n            .forEach((key) => {\n            parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n        });\n        return parts.join(\":\");\n    }\n}\n\nconst defaultActionDescriptorFilters = {\n    stop({ event, value }) {\n        if (value)\n            event.stopPropagation();\n        return true;\n    },\n    prevent({ event, value }) {\n        if (value)\n            event.preventDefault();\n        return true;\n    },\n    self({ event, value, element }) {\n        if (value) {\n            return element === event.target;\n        }\n        else {\n            return true;\n        }\n    },\n};\nconst descriptorPattern = /^(?:(?:([^.]+?)\\+)?(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n    const source = descriptorString.trim();\n    const matches = source.match(descriptorPattern) || [];\n    let eventName = matches[2];\n    let keyFilter = matches[3];\n    if (keyFilter && ![\"keydown\", \"keyup\", \"keypress\"].includes(eventName)) {\n        eventName += `.${keyFilter}`;\n        keyFilter = \"\";\n    }\n    return {\n        eventTarget: parseEventTarget(matches[4]),\n        eventName,\n        eventOptions: matches[7] ? parseEventOptions(matches[7]) : {},\n        identifier: matches[5],\n        methodName: matches[6],\n        keyFilter: matches[1] || keyFilter,\n    };\n}\nfunction parseEventTarget(eventTargetName) {\n    if (eventTargetName == \"window\") {\n        return window;\n    }\n    else if (eventTargetName == \"document\") {\n        return document;\n    }\n}\nfunction parseEventOptions(eventOptions) {\n    return eventOptions\n        .split(\":\")\n        .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n    if (eventTarget == window) {\n        return \"window\";\n    }\n    else if (eventTarget == document) {\n        return \"document\";\n    }\n}\n\nfunction camelize(value) {\n    return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction namespaceCamelize(value) {\n    return camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction capitalize(value) {\n    return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n    return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n    return value.match(/[^\\s]+/g) || [];\n}\n\nfunction isSomething(object) {\n    return object !== null && object !== undefined;\n}\nfunction hasProperty(object, property) {\n    return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nconst allModifiers = [\"meta\", \"ctrl\", \"alt\", \"shift\"];\nclass Action {\n    constructor(element, index, descriptor, schema) {\n        this.element = element;\n        this.index = index;\n        this.eventTarget = descriptor.eventTarget || element;\n        this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n        this.eventOptions = descriptor.eventOptions || {};\n        this.identifier = descriptor.identifier || error(\"missing identifier\");\n        this.methodName = descriptor.methodName || error(\"missing method name\");\n        this.keyFilter = descriptor.keyFilter || \"\";\n        this.schema = schema;\n    }\n    static forToken(token, schema) {\n        return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);\n    }\n    toString() {\n        const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n        const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n        return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n    }\n    shouldIgnoreKeyboardEvent(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filters = this.keyFilter.split(\"+\");\n        if (this.keyFilterDissatisfied(event, filters)) {\n            return true;\n        }\n        const standardFilter = filters.filter((key) => !allModifiers.includes(key))[0];\n        if (!standardFilter) {\n            return false;\n        }\n        if (!hasProperty(this.keyMappings, standardFilter)) {\n            error(`contains unknown key filter: ${this.keyFilter}`);\n        }\n        return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n    }\n    shouldIgnoreMouseEvent(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filters = [this.keyFilter];\n        if (this.keyFilterDissatisfied(event, filters)) {\n            return true;\n        }\n        return false;\n    }\n    get params() {\n        const params = {};\n        const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n        for (const { name, value } of Array.from(this.element.attributes)) {\n            const match = name.match(pattern);\n            const key = match && match[1];\n            if (key) {\n                params[camelize(key)] = typecast(value);\n            }\n        }\n        return params;\n    }\n    get eventTargetName() {\n        return stringifyEventTarget(this.eventTarget);\n    }\n    get keyMappings() {\n        return this.schema.keyMappings;\n    }\n    keyFilterDissatisfied(event, filters) {\n        const [meta, ctrl, alt, shift] = allModifiers.map((modifier) => filters.includes(modifier));\n        return event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift;\n    }\n}\nconst defaultEventNames = {\n    a: () => \"click\",\n    button: () => \"click\",\n    form: () => \"submit\",\n    details: () => \"toggle\",\n    input: (e) => (e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"),\n    select: () => \"change\",\n    textarea: () => \"input\",\n};\nfunction getDefaultEventNameForElement(element) {\n    const tagName = element.tagName.toLowerCase();\n    if (tagName in defaultEventNames) {\n        return defaultEventNames[tagName](element);\n    }\n}\nfunction error(message) {\n    throw new Error(message);\n}\nfunction typecast(value) {\n    try {\n        return JSON.parse(value);\n    }\n    catch (o_O) {\n        return value;\n    }\n}\n\nclass Binding {\n    constructor(context, action) {\n        this.context = context;\n        this.action = action;\n    }\n    get index() {\n        return this.action.index;\n    }\n    get eventTarget() {\n        return this.action.eventTarget;\n    }\n    get eventOptions() {\n        return this.action.eventOptions;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    handleEvent(event) {\n        const actionEvent = this.prepareActionEvent(event);\n        if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(actionEvent)) {\n            this.invokeWithEvent(actionEvent);\n        }\n    }\n    get eventName() {\n        return this.action.eventName;\n    }\n    get method() {\n        const method = this.controller[this.methodName];\n        if (typeof method == \"function\") {\n            return method;\n        }\n        throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n    }\n    applyEventModifiers(event) {\n        const { element } = this.action;\n        const { actionDescriptorFilters } = this.context.application;\n        const { controller } = this.context;\n        let passes = true;\n        for (const [name, value] of Object.entries(this.eventOptions)) {\n            if (name in actionDescriptorFilters) {\n                const filter = actionDescriptorFilters[name];\n                passes = passes && filter({ name, value, event, element, controller });\n            }\n            else {\n                continue;\n            }\n        }\n        return passes;\n    }\n    prepareActionEvent(event) {\n        return Object.assign(event, { params: this.action.params });\n    }\n    invokeWithEvent(event) {\n        const { target, currentTarget } = event;\n        try {\n            this.method.call(this.controller, event);\n            this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n        }\n        catch (error) {\n            const { identifier, controller, element, index } = this;\n            const detail = { identifier, controller, element, index, event };\n            this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n        }\n    }\n    willBeInvokedByEvent(event) {\n        const eventTarget = event.target;\n        if (event instanceof KeyboardEvent && this.action.shouldIgnoreKeyboardEvent(event)) {\n            return false;\n        }\n        if (event instanceof MouseEvent && this.action.shouldIgnoreMouseEvent(event)) {\n            return false;\n        }\n        if (this.element === eventTarget) {\n            return true;\n        }\n        else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n            return this.scope.containsElement(eventTarget);\n        }\n        else {\n            return this.scope.containsElement(this.action.element);\n        }\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    get methodName() {\n        return this.action.methodName;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nclass ElementObserver {\n    constructor(element, delegate) {\n        this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n        this.element = element;\n        this.started = false;\n        this.delegate = delegate;\n        this.elements = new Set();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.refresh();\n        }\n    }\n    pause(callback) {\n        if (this.started) {\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n        callback();\n        if (!this.started) {\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            const matches = new Set(this.matchElementsInTree());\n            for (const element of Array.from(this.elements)) {\n                if (!matches.has(element)) {\n                    this.removeElement(element);\n                }\n            }\n            for (const element of Array.from(matches)) {\n                this.addElement(element);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        if (mutation.type == \"attributes\") {\n            this.processAttributeChange(mutation.target, mutation.attributeName);\n        }\n        else if (mutation.type == \"childList\") {\n            this.processRemovedNodes(mutation.removedNodes);\n            this.processAddedNodes(mutation.addedNodes);\n        }\n    }\n    processAttributeChange(element, attributeName) {\n        if (this.elements.has(element)) {\n            if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n                this.delegate.elementAttributeChanged(element, attributeName);\n            }\n            else {\n                this.removeElement(element);\n            }\n        }\n        else if (this.matchElement(element)) {\n            this.addElement(element);\n        }\n    }\n    processRemovedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element) {\n                this.processTree(element, this.removeElement);\n            }\n        }\n    }\n    processAddedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element && this.elementIsActive(element)) {\n                this.processTree(element, this.addElement);\n            }\n        }\n    }\n    matchElement(element) {\n        return this.delegate.matchElement(element);\n    }\n    matchElementsInTree(tree = this.element) {\n        return this.delegate.matchElementsInTree(tree);\n    }\n    processTree(tree, processor) {\n        for (const element of this.matchElementsInTree(tree)) {\n            processor.call(this, element);\n        }\n    }\n    elementFromNode(node) {\n        if (node.nodeType == Node.ELEMENT_NODE) {\n            return node;\n        }\n    }\n    elementIsActive(element) {\n        if (element.isConnected != this.element.isConnected) {\n            return false;\n        }\n        else {\n            return this.element.contains(element);\n        }\n    }\n    addElement(element) {\n        if (!this.elements.has(element)) {\n            if (this.elementIsActive(element)) {\n                this.elements.add(element);\n                if (this.delegate.elementMatched) {\n                    this.delegate.elementMatched(element);\n                }\n            }\n        }\n    }\n    removeElement(element) {\n        if (this.elements.has(element)) {\n            this.elements.delete(element);\n            if (this.delegate.elementUnmatched) {\n                this.delegate.elementUnmatched(element);\n            }\n        }\n    }\n}\n\nclass AttributeObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeName = attributeName;\n        this.delegate = delegate;\n        this.elementObserver = new ElementObserver(element, this);\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    get selector() {\n        return `[${this.attributeName}]`;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    matchElement(element) {\n        return element.hasAttribute(this.attributeName);\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        if (this.delegate.elementMatchedAttribute) {\n            this.delegate.elementMatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementUnmatched(element) {\n        if (this.delegate.elementUnmatchedAttribute) {\n            this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementAttributeChanged(element, attributeName) {\n        if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n            this.delegate.elementAttributeValueChanged(element, attributeName);\n        }\n    }\n}\n\nfunction add(map, key, value) {\n    fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n    fetch(map, key).delete(value);\n    prune(map, key);\n}\nfunction fetch(map, key) {\n    let values = map.get(key);\n    if (!values) {\n        values = new Set();\n        map.set(key, values);\n    }\n    return values;\n}\nfunction prune(map, key) {\n    const values = map.get(key);\n    if (values != null && values.size == 0) {\n        map.delete(key);\n    }\n}\n\nclass Multimap {\n    constructor() {\n        this.valuesByKey = new Map();\n    }\n    get keys() {\n        return Array.from(this.valuesByKey.keys());\n    }\n    get values() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n    }\n    get size() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((size, set) => size + set.size, 0);\n    }\n    add(key, value) {\n        add(this.valuesByKey, key, value);\n    }\n    delete(key, value) {\n        del(this.valuesByKey, key, value);\n    }\n    has(key, value) {\n        const values = this.valuesByKey.get(key);\n        return values != null && values.has(value);\n    }\n    hasKey(key) {\n        return this.valuesByKey.has(key);\n    }\n    hasValue(value) {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.some((set) => set.has(value));\n    }\n    getValuesForKey(key) {\n        const values = this.valuesByKey.get(key);\n        return values ? Array.from(values) : [];\n    }\n    getKeysForValue(value) {\n        return Array.from(this.valuesByKey)\n            .filter(([_key, values]) => values.has(value))\n            .map(([key, _values]) => key);\n    }\n}\n\nclass IndexedMultimap extends Multimap {\n    constructor() {\n        super();\n        this.keysByValue = new Map();\n    }\n    get values() {\n        return Array.from(this.keysByValue.keys());\n    }\n    add(key, value) {\n        super.add(key, value);\n        add(this.keysByValue, value, key);\n    }\n    delete(key, value) {\n        super.delete(key, value);\n        del(this.keysByValue, value, key);\n    }\n    hasValue(value) {\n        return this.keysByValue.has(value);\n    }\n    getKeysForValue(value) {\n        const set = this.keysByValue.get(value);\n        return set ? Array.from(set) : [];\n    }\n}\n\nclass SelectorObserver {\n    constructor(element, selector, delegate, details) {\n        this._selector = selector;\n        this.details = details;\n        this.elementObserver = new ElementObserver(element, this);\n        this.delegate = delegate;\n        this.matchesByElement = new Multimap();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    get selector() {\n        return this._selector;\n    }\n    set selector(selector) {\n        this._selector = selector;\n        this.refresh();\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    matchElement(element) {\n        const { selector } = this;\n        if (selector) {\n            const matches = element.matches(selector);\n            if (this.delegate.selectorMatchElement) {\n                return matches && this.delegate.selectorMatchElement(element, this.details);\n            }\n            return matches;\n        }\n        else {\n            return false;\n        }\n    }\n    matchElementsInTree(tree) {\n        const { selector } = this;\n        if (selector) {\n            const match = this.matchElement(tree) ? [tree] : [];\n            const matches = Array.from(tree.querySelectorAll(selector)).filter((match) => this.matchElement(match));\n            return match.concat(matches);\n        }\n        else {\n            return [];\n        }\n    }\n    elementMatched(element) {\n        const { selector } = this;\n        if (selector) {\n            this.selectorMatched(element, selector);\n        }\n    }\n    elementUnmatched(element) {\n        const selectors = this.matchesByElement.getKeysForValue(element);\n        for (const selector of selectors) {\n            this.selectorUnmatched(element, selector);\n        }\n    }\n    elementAttributeChanged(element, _attributeName) {\n        const { selector } = this;\n        if (selector) {\n            const matches = this.matchElement(element);\n            const matchedBefore = this.matchesByElement.has(selector, element);\n            if (matches && !matchedBefore) {\n                this.selectorMatched(element, selector);\n            }\n            else if (!matches && matchedBefore) {\n                this.selectorUnmatched(element, selector);\n            }\n        }\n    }\n    selectorMatched(element, selector) {\n        this.delegate.selectorMatched(element, selector, this.details);\n        this.matchesByElement.add(selector, element);\n    }\n    selectorUnmatched(element, selector) {\n        this.delegate.selectorUnmatched(element, selector, this.details);\n        this.matchesByElement.delete(selector, element);\n    }\n}\n\nclass StringMapObserver {\n    constructor(element, delegate) {\n        this.element = element;\n        this.delegate = delegate;\n        this.started = false;\n        this.stringMap = new Map();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n            this.refresh();\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            for (const attributeName of this.knownAttributeNames) {\n                this.refreshAttribute(attributeName, null);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        const attributeName = mutation.attributeName;\n        if (attributeName) {\n            this.refreshAttribute(attributeName, mutation.oldValue);\n        }\n    }\n    refreshAttribute(attributeName, oldValue) {\n        const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n        if (key != null) {\n            if (!this.stringMap.has(attributeName)) {\n                this.stringMapKeyAdded(key, attributeName);\n            }\n            const value = this.element.getAttribute(attributeName);\n            if (this.stringMap.get(attributeName) != value) {\n                this.stringMapValueChanged(value, key, oldValue);\n            }\n            if (value == null) {\n                const oldValue = this.stringMap.get(attributeName);\n                this.stringMap.delete(attributeName);\n                if (oldValue)\n                    this.stringMapKeyRemoved(key, attributeName, oldValue);\n            }\n            else {\n                this.stringMap.set(attributeName, value);\n            }\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        if (this.delegate.stringMapKeyAdded) {\n            this.delegate.stringMapKeyAdded(key, attributeName);\n        }\n    }\n    stringMapValueChanged(value, key, oldValue) {\n        if (this.delegate.stringMapValueChanged) {\n            this.delegate.stringMapValueChanged(value, key, oldValue);\n        }\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        if (this.delegate.stringMapKeyRemoved) {\n            this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n        }\n    }\n    get knownAttributeNames() {\n        return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n    }\n    get currentAttributeNames() {\n        return Array.from(this.element.attributes).map((attribute) => attribute.name);\n    }\n    get recordedAttributeNames() {\n        return Array.from(this.stringMap.keys());\n    }\n}\n\nclass TokenListObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeObserver = new AttributeObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.tokensByElement = new Multimap();\n    }\n    get started() {\n        return this.attributeObserver.started;\n    }\n    start() {\n        this.attributeObserver.start();\n    }\n    pause(callback) {\n        this.attributeObserver.pause(callback);\n    }\n    stop() {\n        this.attributeObserver.stop();\n    }\n    refresh() {\n        this.attributeObserver.refresh();\n    }\n    get element() {\n        return this.attributeObserver.element;\n    }\n    get attributeName() {\n        return this.attributeObserver.attributeName;\n    }\n    elementMatchedAttribute(element) {\n        this.tokensMatched(this.readTokensForElement(element));\n    }\n    elementAttributeValueChanged(element) {\n        const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n        this.tokensUnmatched(unmatchedTokens);\n        this.tokensMatched(matchedTokens);\n    }\n    elementUnmatchedAttribute(element) {\n        this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n    }\n    tokensMatched(tokens) {\n        tokens.forEach((token) => this.tokenMatched(token));\n    }\n    tokensUnmatched(tokens) {\n        tokens.forEach((token) => this.tokenUnmatched(token));\n    }\n    tokenMatched(token) {\n        this.delegate.tokenMatched(token);\n        this.tokensByElement.add(token.element, token);\n    }\n    tokenUnmatched(token) {\n        this.delegate.tokenUnmatched(token);\n        this.tokensByElement.delete(token.element, token);\n    }\n    refreshTokensForElement(element) {\n        const previousTokens = this.tokensByElement.getValuesForKey(element);\n        const currentTokens = this.readTokensForElement(element);\n        const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n        if (firstDifferingIndex == -1) {\n            return [[], []];\n        }\n        else {\n            return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n        }\n    }\n    readTokensForElement(element) {\n        const attributeName = this.attributeName;\n        const tokenString = element.getAttribute(attributeName) || \"\";\n        return parseTokenString(tokenString, element, attributeName);\n    }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n    return tokenString\n        .trim()\n        .split(/\\s+/)\n        .filter((content) => content.length)\n        .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n    const length = Math.max(left.length, right.length);\n    return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n    return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n    constructor(element, attributeName, delegate) {\n        this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.parseResultsByToken = new WeakMap();\n        this.valuesByTokenByElement = new WeakMap();\n    }\n    get started() {\n        return this.tokenListObserver.started;\n    }\n    start() {\n        this.tokenListObserver.start();\n    }\n    stop() {\n        this.tokenListObserver.stop();\n    }\n    refresh() {\n        this.tokenListObserver.refresh();\n    }\n    get element() {\n        return this.tokenListObserver.element;\n    }\n    get attributeName() {\n        return this.tokenListObserver.attributeName;\n    }\n    tokenMatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).set(token, value);\n            this.delegate.elementMatchedValue(element, value);\n        }\n    }\n    tokenUnmatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).delete(token);\n            this.delegate.elementUnmatchedValue(element, value);\n        }\n    }\n    fetchParseResultForToken(token) {\n        let parseResult = this.parseResultsByToken.get(token);\n        if (!parseResult) {\n            parseResult = this.parseToken(token);\n            this.parseResultsByToken.set(token, parseResult);\n        }\n        return parseResult;\n    }\n    fetchValuesByTokenForElement(element) {\n        let valuesByToken = this.valuesByTokenByElement.get(element);\n        if (!valuesByToken) {\n            valuesByToken = new Map();\n            this.valuesByTokenByElement.set(element, valuesByToken);\n        }\n        return valuesByToken;\n    }\n    parseToken(token) {\n        try {\n            const value = this.delegate.parseValueForToken(token);\n            return { value };\n        }\n        catch (error) {\n            return { error };\n        }\n    }\n}\n\nclass BindingObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.bindingsByAction = new Map();\n    }\n    start() {\n        if (!this.valueListObserver) {\n            this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n            this.valueListObserver.start();\n        }\n    }\n    stop() {\n        if (this.valueListObserver) {\n            this.valueListObserver.stop();\n            delete this.valueListObserver;\n            this.disconnectAllActions();\n        }\n    }\n    get element() {\n        return this.context.element;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get actionAttribute() {\n        return this.schema.actionAttribute;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get bindings() {\n        return Array.from(this.bindingsByAction.values());\n    }\n    connectAction(action) {\n        const binding = new Binding(this.context, action);\n        this.bindingsByAction.set(action, binding);\n        this.delegate.bindingConnected(binding);\n    }\n    disconnectAction(action) {\n        const binding = this.bindingsByAction.get(action);\n        if (binding) {\n            this.bindingsByAction.delete(action);\n            this.delegate.bindingDisconnected(binding);\n        }\n    }\n    disconnectAllActions() {\n        this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));\n        this.bindingsByAction.clear();\n    }\n    parseValueForToken(token) {\n        const action = Action.forToken(token, this.schema);\n        if (action.identifier == this.identifier) {\n            return action;\n        }\n    }\n    elementMatchedValue(element, action) {\n        this.connectAction(action);\n    }\n    elementUnmatchedValue(element, action) {\n        this.disconnectAction(action);\n    }\n}\n\nclass ValueObserver {\n    constructor(context, receiver) {\n        this.context = context;\n        this.receiver = receiver;\n        this.stringMapObserver = new StringMapObserver(this.element, this);\n        this.valueDescriptorMap = this.controller.valueDescriptorMap;\n    }\n    start() {\n        this.stringMapObserver.start();\n        this.invokeChangedCallbacksForDefaultValues();\n    }\n    stop() {\n        this.stringMapObserver.stop();\n    }\n    get element() {\n        return this.context.element;\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    getStringMapKeyForAttribute(attributeName) {\n        if (attributeName in this.valueDescriptorMap) {\n            return this.valueDescriptorMap[attributeName].name;\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        const descriptor = this.valueDescriptorMap[attributeName];\n        if (!this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n        }\n    }\n    stringMapValueChanged(value, name, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[name];\n        if (value === null)\n            return;\n        if (oldValue === null) {\n            oldValue = descriptor.writer(descriptor.defaultValue);\n        }\n        this.invokeChangedCallback(name, value, oldValue);\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[key];\n        if (this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n        }\n        else {\n            this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n        }\n    }\n    invokeChangedCallbacksForDefaultValues() {\n        for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n            if (defaultValue != undefined && !this.controller.data.has(key)) {\n                this.invokeChangedCallback(name, writer(defaultValue), undefined);\n            }\n        }\n    }\n    invokeChangedCallback(name, rawValue, rawOldValue) {\n        const changedMethodName = `${name}Changed`;\n        const changedMethod = this.receiver[changedMethodName];\n        if (typeof changedMethod == \"function\") {\n            const descriptor = this.valueDescriptorNameMap[name];\n            try {\n                const value = descriptor.reader(rawValue);\n                let oldValue = rawOldValue;\n                if (rawOldValue) {\n                    oldValue = descriptor.reader(rawOldValue);\n                }\n                changedMethod.call(this.receiver, value, oldValue);\n            }\n            catch (error) {\n                if (error instanceof TypeError) {\n                    error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n                }\n                throw error;\n            }\n        }\n    }\n    get valueDescriptors() {\n        const { valueDescriptorMap } = this;\n        return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);\n    }\n    get valueDescriptorNameMap() {\n        const descriptors = {};\n        Object.keys(this.valueDescriptorMap).forEach((key) => {\n            const descriptor = this.valueDescriptorMap[key];\n            descriptors[descriptor.name] = descriptor;\n        });\n        return descriptors;\n    }\n    hasValue(attributeName) {\n        const descriptor = this.valueDescriptorNameMap[attributeName];\n        const hasMethodName = `has${capitalize(descriptor.name)}`;\n        return this.receiver[hasMethodName];\n    }\n}\n\nclass TargetObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.targetsByName = new Multimap();\n    }\n    start() {\n        if (!this.tokenListObserver) {\n            this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n            this.tokenListObserver.start();\n        }\n    }\n    stop() {\n        if (this.tokenListObserver) {\n            this.disconnectAllTargets();\n            this.tokenListObserver.stop();\n            delete this.tokenListObserver;\n        }\n    }\n    tokenMatched({ element, content: name }) {\n        if (this.scope.containsElement(element)) {\n            this.connectTarget(element, name);\n        }\n    }\n    tokenUnmatched({ element, content: name }) {\n        this.disconnectTarget(element, name);\n    }\n    connectTarget(element, name) {\n        var _a;\n        if (!this.targetsByName.has(name, element)) {\n            this.targetsByName.add(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n        }\n    }\n    disconnectTarget(element, name) {\n        var _a;\n        if (this.targetsByName.has(name, element)) {\n            this.targetsByName.delete(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n        }\n    }\n    disconnectAllTargets() {\n        for (const name of this.targetsByName.keys) {\n            for (const element of this.targetsByName.getValuesForKey(name)) {\n                this.disconnectTarget(element, name);\n            }\n        }\n    }\n    get attributeName() {\n        return `data-${this.context.identifier}-target`;\n    }\n    get element() {\n        return this.context.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return Array.from(ancestors.reduce((values, constructor) => {\n        getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));\n        return values;\n    }, new Set()));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return ancestors.reduce((pairs, constructor) => {\n        pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n        return pairs;\n    }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n    const ancestors = [];\n    while (constructor) {\n        ancestors.push(constructor);\n        constructor = Object.getPrototypeOf(constructor);\n    }\n    return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];\n}\n\nclass OutletObserver {\n    constructor(context, delegate) {\n        this.started = false;\n        this.context = context;\n        this.delegate = delegate;\n        this.outletsByName = new Multimap();\n        this.outletElementsByName = new Multimap();\n        this.selectorObserverMap = new Map();\n        this.attributeObserverMap = new Map();\n    }\n    start() {\n        if (!this.started) {\n            this.outletDefinitions.forEach((outletName) => {\n                this.setupSelectorObserverForOutlet(outletName);\n                this.setupAttributeObserverForOutlet(outletName);\n            });\n            this.started = true;\n            this.dependentContexts.forEach((context) => context.refresh());\n        }\n    }\n    refresh() {\n        this.selectorObserverMap.forEach((observer) => observer.refresh());\n        this.attributeObserverMap.forEach((observer) => observer.refresh());\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.disconnectAllOutlets();\n            this.stopSelectorObservers();\n            this.stopAttributeObservers();\n        }\n    }\n    stopSelectorObservers() {\n        if (this.selectorObserverMap.size > 0) {\n            this.selectorObserverMap.forEach((observer) => observer.stop());\n            this.selectorObserverMap.clear();\n        }\n    }\n    stopAttributeObservers() {\n        if (this.attributeObserverMap.size > 0) {\n            this.attributeObserverMap.forEach((observer) => observer.stop());\n            this.attributeObserverMap.clear();\n        }\n    }\n    selectorMatched(element, _selector, { outletName }) {\n        const outlet = this.getOutlet(element, outletName);\n        if (outlet) {\n            this.connectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorUnmatched(element, _selector, { outletName }) {\n        const outlet = this.getOutletFromMap(element, outletName);\n        if (outlet) {\n            this.disconnectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorMatchElement(element, { outletName }) {\n        const selector = this.selector(outletName);\n        const hasOutlet = this.hasOutlet(element, outletName);\n        const hasOutletController = element.matches(`[${this.schema.controllerAttribute}~=${outletName}]`);\n        if (selector) {\n            return hasOutlet && hasOutletController && element.matches(selector);\n        }\n        else {\n            return false;\n        }\n    }\n    elementMatchedAttribute(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    elementAttributeValueChanged(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    elementUnmatchedAttribute(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    connectOutlet(outlet, element, outletName) {\n        var _a;\n        if (!this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.add(outletName, outlet);\n            this.outletElementsByName.add(outletName, element);\n            (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));\n        }\n    }\n    disconnectOutlet(outlet, element, outletName) {\n        var _a;\n        if (this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.delete(outletName, outlet);\n            this.outletElementsByName.delete(outletName, element);\n            (_a = this.selectorObserverMap\n                .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));\n        }\n    }\n    disconnectAllOutlets() {\n        for (const outletName of this.outletElementsByName.keys) {\n            for (const element of this.outletElementsByName.getValuesForKey(outletName)) {\n                for (const outlet of this.outletsByName.getValuesForKey(outletName)) {\n                    this.disconnectOutlet(outlet, element, outletName);\n                }\n            }\n        }\n    }\n    updateSelectorObserverForOutlet(outletName) {\n        const observer = this.selectorObserverMap.get(outletName);\n        if (observer) {\n            observer.selector = this.selector(outletName);\n        }\n    }\n    setupSelectorObserverForOutlet(outletName) {\n        const selector = this.selector(outletName);\n        const selectorObserver = new SelectorObserver(document.body, selector, this, { outletName });\n        this.selectorObserverMap.set(outletName, selectorObserver);\n        selectorObserver.start();\n    }\n    setupAttributeObserverForOutlet(outletName) {\n        const attributeName = this.attributeNameForOutletName(outletName);\n        const attributeObserver = new AttributeObserver(this.scope.element, attributeName, this);\n        this.attributeObserverMap.set(outletName, attributeObserver);\n        attributeObserver.start();\n    }\n    selector(outletName) {\n        return this.scope.outlets.getSelectorForOutletName(outletName);\n    }\n    attributeNameForOutletName(outletName) {\n        return this.scope.schema.outletAttributeForScope(this.identifier, outletName);\n    }\n    getOutletNameFromOutletAttributeName(attributeName) {\n        return this.outletDefinitions.find((outletName) => this.attributeNameForOutletName(outletName) === attributeName);\n    }\n    get outletDependencies() {\n        const dependencies = new Multimap();\n        this.router.modules.forEach((module) => {\n            const constructor = module.definition.controllerConstructor;\n            const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n            outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));\n        });\n        return dependencies;\n    }\n    get outletDefinitions() {\n        return this.outletDependencies.getKeysForValue(this.identifier);\n    }\n    get dependentControllerIdentifiers() {\n        return this.outletDependencies.getValuesForKey(this.identifier);\n    }\n    get dependentContexts() {\n        const identifiers = this.dependentControllerIdentifiers;\n        return this.router.contexts.filter((context) => identifiers.includes(context.identifier));\n    }\n    hasOutlet(element, outletName) {\n        return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n    }\n    getOutlet(element, outletName) {\n        return this.application.getControllerForElementAndIdentifier(element, outletName);\n    }\n    getOutletFromMap(element, outletName) {\n        return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get router() {\n        return this.application.router;\n    }\n}\n\nclass Context {\n    constructor(module, scope) {\n        this.logDebugActivity = (functionName, detail = {}) => {\n            const { identifier, controller, element } = this;\n            detail = Object.assign({ identifier, controller, element }, detail);\n            this.application.logDebugActivity(this.identifier, functionName, detail);\n        };\n        this.module = module;\n        this.scope = scope;\n        this.controller = new module.controllerConstructor(this);\n        this.bindingObserver = new BindingObserver(this, this.dispatcher);\n        this.valueObserver = new ValueObserver(this, this.controller);\n        this.targetObserver = new TargetObserver(this, this);\n        this.outletObserver = new OutletObserver(this, this);\n        try {\n            this.controller.initialize();\n            this.logDebugActivity(\"initialize\");\n        }\n        catch (error) {\n            this.handleError(error, \"initializing controller\");\n        }\n    }\n    connect() {\n        this.bindingObserver.start();\n        this.valueObserver.start();\n        this.targetObserver.start();\n        this.outletObserver.start();\n        try {\n            this.controller.connect();\n            this.logDebugActivity(\"connect\");\n        }\n        catch (error) {\n            this.handleError(error, \"connecting controller\");\n        }\n    }\n    refresh() {\n        this.outletObserver.refresh();\n    }\n    disconnect() {\n        try {\n            this.controller.disconnect();\n            this.logDebugActivity(\"disconnect\");\n        }\n        catch (error) {\n            this.handleError(error, \"disconnecting controller\");\n        }\n        this.outletObserver.stop();\n        this.targetObserver.stop();\n        this.valueObserver.stop();\n        this.bindingObserver.stop();\n    }\n    get application() {\n        return this.module.application;\n    }\n    get identifier() {\n        return this.module.identifier;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get dispatcher() {\n        return this.application.dispatcher;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get parentElement() {\n        return this.element.parentElement;\n    }\n    handleError(error, message, detail = {}) {\n        const { identifier, controller, element } = this;\n        detail = Object.assign({ identifier, controller, element }, detail);\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    targetConnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetConnected`, element);\n    }\n    targetDisconnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n    }\n    outletConnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);\n    }\n    outletDisconnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n    }\n    invokeControllerMethod(methodName, ...args) {\n        const controller = this.controller;\n        if (typeof controller[methodName] == \"function\") {\n            controller[methodName](...args);\n        }\n    }\n}\n\nfunction bless(constructor) {\n    return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n    const shadowConstructor = extend(constructor);\n    const shadowProperties = getShadowProperties(constructor.prototype, properties);\n    Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n    return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n    const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n    return blessings.reduce((blessedProperties, blessing) => {\n        const properties = blessing(constructor);\n        for (const key in properties) {\n            const descriptor = blessedProperties[key] || {};\n            blessedProperties[key] = Object.assign(descriptor, properties[key]);\n        }\n        return blessedProperties;\n    }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n    return getOwnKeys(properties).reduce((shadowProperties, key) => {\n        const descriptor = getShadowedDescriptor(prototype, properties, key);\n        if (descriptor) {\n            Object.assign(shadowProperties, { [key]: descriptor });\n        }\n        return shadowProperties;\n    }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n    const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n    const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n    if (!shadowedByValue) {\n        const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n        if (shadowingDescriptor) {\n            descriptor.get = shadowingDescriptor.get || descriptor.get;\n            descriptor.set = shadowingDescriptor.set || descriptor.set;\n        }\n        return descriptor;\n    }\n}\nconst getOwnKeys = (() => {\n    if (typeof Object.getOwnPropertySymbols == \"function\") {\n        return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n    }\n    else {\n        return Object.getOwnPropertyNames;\n    }\n})();\nconst extend = (() => {\n    function extendWithReflect(constructor) {\n        function extended() {\n            return Reflect.construct(constructor, arguments, new.target);\n        }\n        extended.prototype = Object.create(constructor.prototype, {\n            constructor: { value: extended },\n        });\n        Reflect.setPrototypeOf(extended, constructor);\n        return extended;\n    }\n    function testReflectExtension() {\n        const a = function () {\n            this.a.call(this);\n        };\n        const b = extendWithReflect(a);\n        b.prototype.a = function () { };\n        return new b();\n    }\n    try {\n        testReflectExtension();\n        return extendWithReflect;\n    }\n    catch (error) {\n        return (constructor) => class extended extends constructor {\n        };\n    }\n})();\n\nfunction blessDefinition(definition) {\n    return {\n        identifier: definition.identifier,\n        controllerConstructor: bless(definition.controllerConstructor),\n    };\n}\n\nclass Module {\n    constructor(application, definition) {\n        this.application = application;\n        this.definition = blessDefinition(definition);\n        this.contextsByScope = new WeakMap();\n        this.connectedContexts = new Set();\n    }\n    get identifier() {\n        return this.definition.identifier;\n    }\n    get controllerConstructor() {\n        return this.definition.controllerConstructor;\n    }\n    get contexts() {\n        return Array.from(this.connectedContexts);\n    }\n    connectContextForScope(scope) {\n        const context = this.fetchContextForScope(scope);\n        this.connectedContexts.add(context);\n        context.connect();\n    }\n    disconnectContextForScope(scope) {\n        const context = this.contextsByScope.get(scope);\n        if (context) {\n            this.connectedContexts.delete(context);\n            context.disconnect();\n        }\n    }\n    fetchContextForScope(scope) {\n        let context = this.contextsByScope.get(scope);\n        if (!context) {\n            context = new Context(this, scope);\n            this.contextsByScope.set(scope, context);\n        }\n        return context;\n    }\n}\n\nclass ClassMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    has(name) {\n        return this.data.has(this.getDataKey(name));\n    }\n    get(name) {\n        return this.getAll(name)[0];\n    }\n    getAll(name) {\n        const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n        return tokenize(tokenString);\n    }\n    getAttributeName(name) {\n        return this.data.getAttributeNameForKey(this.getDataKey(name));\n    }\n    getDataKey(name) {\n        return `${name}-class`;\n    }\n    get data() {\n        return this.scope.data;\n    }\n}\n\nclass DataMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.getAttribute(name);\n    }\n    set(key, value) {\n        const name = this.getAttributeNameForKey(key);\n        this.element.setAttribute(name, value);\n        return this.get(key);\n    }\n    has(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.hasAttribute(name);\n    }\n    delete(key) {\n        if (this.has(key)) {\n            const name = this.getAttributeNameForKey(key);\n            this.element.removeAttribute(name);\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    getAttributeNameForKey(key) {\n        return `data-${this.identifier}-${dasherize(key)}`;\n    }\n}\n\nclass Guide {\n    constructor(logger) {\n        this.warnedKeysByObject = new WeakMap();\n        this.logger = logger;\n    }\n    warn(object, key, message) {\n        let warnedKeys = this.warnedKeysByObject.get(object);\n        if (!warnedKeys) {\n            warnedKeys = new Set();\n            this.warnedKeysByObject.set(object, warnedKeys);\n        }\n        if (!warnedKeys.has(key)) {\n            warnedKeys.add(key);\n            this.logger.warn(message, object);\n        }\n    }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n    return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(targetName) {\n        return this.find(targetName) != null;\n    }\n    find(...targetNames) {\n        return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n    }\n    findAll(...targetNames) {\n        return targetNames.reduce((targets, targetName) => [\n            ...targets,\n            ...this.findAllTargets(targetName),\n            ...this.findAllLegacyTargets(targetName),\n        ], []);\n    }\n    findTarget(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findElement(selector);\n    }\n    findAllTargets(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector);\n    }\n    getSelectorForTargetName(targetName) {\n        const attributeName = this.schema.targetAttributeForScope(this.identifier);\n        return attributeValueContainsToken(attributeName, targetName);\n    }\n    findLegacyTarget(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.deprecate(this.scope.findElement(selector), targetName);\n    }\n    findAllLegacyTargets(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));\n    }\n    getLegacySelectorForTargetName(targetName) {\n        const targetDescriptor = `${this.identifier}.${targetName}`;\n        return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n    }\n    deprecate(element, targetName) {\n        if (element) {\n            const { identifier } = this;\n            const attributeName = this.schema.targetAttribute;\n            const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n            this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n                `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n        }\n        return element;\n    }\n    get guide() {\n        return this.scope.guide;\n    }\n}\n\nclass OutletSet {\n    constructor(scope, controllerElement) {\n        this.scope = scope;\n        this.controllerElement = controllerElement;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(outletName) {\n        return this.find(outletName) != null;\n    }\n    find(...outletNames) {\n        return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);\n    }\n    findAll(...outletNames) {\n        return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);\n    }\n    getSelectorForOutletName(outletName) {\n        const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n        return this.controllerElement.getAttribute(attributeName);\n    }\n    findOutlet(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        if (selector)\n            return this.findElement(selector, outletName);\n    }\n    findAllOutlets(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        return selector ? this.findAllElements(selector, outletName) : [];\n    }\n    findElement(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];\n    }\n    findAllElements(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName));\n    }\n    matchesElement(element, selector, outletName) {\n        const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n        return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n    }\n}\n\nclass Scope {\n    constructor(schema, element, identifier, logger) {\n        this.targets = new TargetSet(this);\n        this.classes = new ClassMap(this);\n        this.data = new DataMap(this);\n        this.containsElement = (element) => {\n            return element.closest(this.controllerSelector) === this.element;\n        };\n        this.schema = schema;\n        this.element = element;\n        this.identifier = identifier;\n        this.guide = new Guide(logger);\n        this.outlets = new OutletSet(this.documentScope, element);\n    }\n    findElement(selector) {\n        return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n    }\n    findAllElements(selector) {\n        return [\n            ...(this.element.matches(selector) ? [this.element] : []),\n            ...this.queryElements(selector).filter(this.containsElement),\n        ];\n    }\n    queryElements(selector) {\n        return Array.from(this.element.querySelectorAll(selector));\n    }\n    get controllerSelector() {\n        return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n    }\n    get isDocumentScope() {\n        return this.element === document.documentElement;\n    }\n    get documentScope() {\n        return this.isDocumentScope\n            ? this\n            : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n    }\n}\n\nclass ScopeObserver {\n    constructor(element, schema, delegate) {\n        this.element = element;\n        this.schema = schema;\n        this.delegate = delegate;\n        this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n        this.scopesByIdentifierByElement = new WeakMap();\n        this.scopeReferenceCounts = new WeakMap();\n    }\n    start() {\n        this.valueListObserver.start();\n    }\n    stop() {\n        this.valueListObserver.stop();\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    parseValueForToken(token) {\n        const { element, content: identifier } = token;\n        return this.parseValueForElementAndIdentifier(element, identifier);\n    }\n    parseValueForElementAndIdentifier(element, identifier) {\n        const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n        let scope = scopesByIdentifier.get(identifier);\n        if (!scope) {\n            scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n            scopesByIdentifier.set(identifier, scope);\n        }\n        return scope;\n    }\n    elementMatchedValue(element, value) {\n        const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n        this.scopeReferenceCounts.set(value, referenceCount);\n        if (referenceCount == 1) {\n            this.delegate.scopeConnected(value);\n        }\n    }\n    elementUnmatchedValue(element, value) {\n        const referenceCount = this.scopeReferenceCounts.get(value);\n        if (referenceCount) {\n            this.scopeReferenceCounts.set(value, referenceCount - 1);\n            if (referenceCount == 1) {\n                this.delegate.scopeDisconnected(value);\n            }\n        }\n    }\n    fetchScopesByIdentifierForElement(element) {\n        let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n        if (!scopesByIdentifier) {\n            scopesByIdentifier = new Map();\n            this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n        }\n        return scopesByIdentifier;\n    }\n}\n\nclass Router {\n    constructor(application) {\n        this.application = application;\n        this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n        this.scopesByIdentifier = new Multimap();\n        this.modulesByIdentifier = new Map();\n    }\n    get element() {\n        return this.application.element;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get logger() {\n        return this.application.logger;\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    get modules() {\n        return Array.from(this.modulesByIdentifier.values());\n    }\n    get contexts() {\n        return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n    }\n    start() {\n        this.scopeObserver.start();\n    }\n    stop() {\n        this.scopeObserver.stop();\n    }\n    loadDefinition(definition) {\n        this.unloadIdentifier(definition.identifier);\n        const module = new Module(this.application, definition);\n        this.connectModule(module);\n        const afterLoad = definition.controllerConstructor.afterLoad;\n        if (afterLoad) {\n            afterLoad.call(definition.controllerConstructor, definition.identifier, this.application);\n        }\n    }\n    unloadIdentifier(identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            this.disconnectModule(module);\n        }\n    }\n    getContextForElementAndIdentifier(element, identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            return module.contexts.find((context) => context.element == element);\n        }\n    }\n    proposeToConnectScopeForElementAndIdentifier(element, identifier) {\n        const scope = this.scopeObserver.parseValueForElementAndIdentifier(element, identifier);\n        if (scope) {\n            this.scopeObserver.elementMatchedValue(scope.element, scope);\n        }\n        else {\n            console.error(`Couldn't find or create scope for identifier: \"${identifier}\" and element:`, element);\n        }\n    }\n    handleError(error, message, detail) {\n        this.application.handleError(error, message, detail);\n    }\n    createScopeForElementAndIdentifier(element, identifier) {\n        return new Scope(this.schema, element, identifier, this.logger);\n    }\n    scopeConnected(scope) {\n        this.scopesByIdentifier.add(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.connectContextForScope(scope);\n        }\n    }\n    scopeDisconnected(scope) {\n        this.scopesByIdentifier.delete(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.disconnectContextForScope(scope);\n        }\n    }\n    connectModule(module) {\n        this.modulesByIdentifier.set(module.identifier, module);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.connectContextForScope(scope));\n    }\n    disconnectModule(module) {\n        this.modulesByIdentifier.delete(module.identifier);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.disconnectContextForScope(scope));\n    }\n}\n\nconst defaultSchema = {\n    controllerAttribute: \"data-controller\",\n    actionAttribute: \"data-action\",\n    targetAttribute: \"data-target\",\n    targetAttributeForScope: (identifier) => `data-${identifier}-target`,\n    outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,\n    keyMappings: Object.assign(Object.assign({ enter: \"Enter\", tab: \"Tab\", esc: \"Escape\", space: \" \", up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\", home: \"Home\", end: \"End\", page_up: \"PageUp\", page_down: \"PageDown\" }, objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c) => [c, c]))), objectFromEntries(\"0123456789\".split(\"\").map((n) => [n, n]))),\n};\nfunction objectFromEntries(array) {\n    return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});\n}\n\nclass Application {\n    constructor(element = document.documentElement, schema = defaultSchema) {\n        this.logger = console;\n        this.debug = false;\n        this.logDebugActivity = (identifier, functionName, detail = {}) => {\n            if (this.debug) {\n                this.logFormattedMessage(identifier, functionName, detail);\n            }\n        };\n        this.element = element;\n        this.schema = schema;\n        this.dispatcher = new Dispatcher(this);\n        this.router = new Router(this);\n        this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);\n    }\n    static start(element, schema) {\n        const application = new this(element, schema);\n        application.start();\n        return application;\n    }\n    async start() {\n        await domReady();\n        this.logDebugActivity(\"application\", \"starting\");\n        this.dispatcher.start();\n        this.router.start();\n        this.logDebugActivity(\"application\", \"start\");\n    }\n    stop() {\n        this.logDebugActivity(\"application\", \"stopping\");\n        this.dispatcher.stop();\n        this.router.stop();\n        this.logDebugActivity(\"application\", \"stop\");\n    }\n    register(identifier, controllerConstructor) {\n        this.load({ identifier, controllerConstructor });\n    }\n    registerActionOption(name, filter) {\n        this.actionDescriptorFilters[name] = filter;\n    }\n    load(head, ...rest) {\n        const definitions = Array.isArray(head) ? head : [head, ...rest];\n        definitions.forEach((definition) => {\n            if (definition.controllerConstructor.shouldLoad) {\n                this.router.loadDefinition(definition);\n            }\n        });\n    }\n    unload(head, ...rest) {\n        const identifiers = Array.isArray(head) ? head : [head, ...rest];\n        identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));\n    }\n    get controllers() {\n        return this.router.contexts.map((context) => context.controller);\n    }\n    getControllerForElementAndIdentifier(element, identifier) {\n        const context = this.router.getContextForElementAndIdentifier(element, identifier);\n        return context ? context.controller : null;\n    }\n    handleError(error, message, detail) {\n        var _a;\n        this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n        (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n    }\n    logFormattedMessage(identifier, functionName, detail = {}) {\n        detail = Object.assign({ application: this }, detail);\n        this.logger.groupCollapsed(`${identifier} #${functionName}`);\n        this.logger.log(\"details:\", Object.assign({}, detail));\n        this.logger.groupEnd();\n    }\n}\nfunction domReady() {\n    return new Promise((resolve) => {\n        if (document.readyState == \"loading\") {\n            document.addEventListener(\"DOMContentLoaded\", () => resolve());\n        }\n        else {\n            resolve();\n        }\n    });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n    const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n    return classes.reduce((properties, classDefinition) => {\n        return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n    }, {});\n}\nfunction propertiesForClassDefinition(key) {\n    return {\n        [`${key}Class`]: {\n            get() {\n                const { classes } = this;\n                if (classes.has(key)) {\n                    return classes.get(key);\n                }\n                else {\n                    const attribute = classes.getAttributeName(key);\n                    throw new Error(`Missing attribute \"${attribute}\"`);\n                }\n            },\n        },\n        [`${key}Classes`]: {\n            get() {\n                return this.classes.getAll(key);\n            },\n        },\n        [`has${capitalize(key)}Class`]: {\n            get() {\n                return this.classes.has(key);\n            },\n        },\n    };\n}\n\nfunction OutletPropertiesBlessing(constructor) {\n    const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n    return outlets.reduce((properties, outletDefinition) => {\n        return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));\n    }, {});\n}\nfunction getOutletController(controller, element, identifier) {\n    return controller.application.getControllerForElementAndIdentifier(element, identifier);\n}\nfunction getControllerAndEnsureConnectedScope(controller, element, outletName) {\n    let outletController = getOutletController(controller, element, outletName);\n    if (outletController)\n        return outletController;\n    controller.application.router.proposeToConnectScopeForElementAndIdentifier(element, outletName);\n    outletController = getOutletController(controller, element, outletName);\n    if (outletController)\n        return outletController;\n}\nfunction propertiesForOutletDefinition(name) {\n    const camelizedName = namespaceCamelize(name);\n    return {\n        [`${camelizedName}Outlet`]: {\n            get() {\n                const outletElement = this.outlets.find(name);\n                const selector = this.outlets.getSelectorForOutletName(name);\n                if (outletElement) {\n                    const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n                    if (outletController)\n                        return outletController;\n                    throw new Error(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`);\n                }\n                throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n            },\n        },\n        [`${camelizedName}Outlets`]: {\n            get() {\n                const outlets = this.outlets.findAll(name);\n                if (outlets.length > 0) {\n                    return outlets\n                        .map((outletElement) => {\n                        const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n                        if (outletController)\n                            return outletController;\n                        console.warn(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`, outletElement);\n                    })\n                        .filter((controller) => controller);\n                }\n                return [];\n            },\n        },\n        [`${camelizedName}OutletElement`]: {\n            get() {\n                const outletElement = this.outlets.find(name);\n                const selector = this.outlets.getSelectorForOutletName(name);\n                if (outletElement) {\n                    return outletElement;\n                }\n                else {\n                    throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n                }\n            },\n        },\n        [`${camelizedName}OutletElements`]: {\n            get() {\n                return this.outlets.findAll(name);\n            },\n        },\n        [`has${capitalize(camelizedName)}Outlet`]: {\n            get() {\n                return this.outlets.has(name);\n            },\n        },\n    };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n    const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n    return targets.reduce((properties, targetDefinition) => {\n        return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n    }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n    return {\n        [`${name}Target`]: {\n            get() {\n                const target = this.targets.find(name);\n                if (target) {\n                    return target;\n                }\n                else {\n                    throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            },\n        },\n        [`${name}Targets`]: {\n            get() {\n                return this.targets.findAll(name);\n            },\n        },\n        [`has${capitalize(name)}Target`]: {\n            get() {\n                return this.targets.has(name);\n            },\n        },\n    };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n    const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n    const propertyDescriptorMap = {\n        valueDescriptorMap: {\n            get() {\n                return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n                    const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n                    const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n                    return Object.assign(result, { [attributeName]: valueDescriptor });\n                }, {});\n            },\n        },\n    };\n    return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n        return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n    }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n    const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n    const { key, name, reader: read, writer: write } = definition;\n    return {\n        [name]: {\n            get() {\n                const value = this.data.get(key);\n                if (value !== null) {\n                    return read(value);\n                }\n                else {\n                    return definition.defaultValue;\n                }\n            },\n            set(value) {\n                if (value === undefined) {\n                    this.data.delete(key);\n                }\n                else {\n                    this.data.set(key, write(value));\n                }\n            },\n        },\n        [`has${capitalize(name)}`]: {\n            get() {\n                return this.data.has(key) || definition.hasCustomDefaultValue;\n            },\n        },\n    };\n}\nfunction parseValueDefinitionPair([token, typeDefinition], controller) {\n    return valueDescriptorForTokenAndTypeDefinition({\n        controller,\n        token,\n        typeDefinition,\n    });\n}\nfunction parseValueTypeConstant(constant) {\n    switch (constant) {\n        case Array:\n            return \"array\";\n        case Boolean:\n            return \"boolean\";\n        case Number:\n            return \"number\";\n        case Object:\n            return \"object\";\n        case String:\n            return \"string\";\n    }\n}\nfunction parseValueTypeDefault(defaultValue) {\n    switch (typeof defaultValue) {\n        case \"boolean\":\n            return \"boolean\";\n        case \"number\":\n            return \"number\";\n        case \"string\":\n            return \"string\";\n    }\n    if (Array.isArray(defaultValue))\n        return \"array\";\n    if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n        return \"object\";\n}\nfunction parseValueTypeObject(payload) {\n    const { controller, token, typeObject } = payload;\n    const hasType = isSomething(typeObject.type);\n    const hasDefault = isSomething(typeObject.default);\n    const fullObject = hasType && hasDefault;\n    const onlyType = hasType && !hasDefault;\n    const onlyDefault = !hasType && hasDefault;\n    const typeFromObject = parseValueTypeConstant(typeObject.type);\n    const typeFromDefaultValue = parseValueTypeDefault(payload.typeObject.default);\n    if (onlyType)\n        return typeFromObject;\n    if (onlyDefault)\n        return typeFromDefaultValue;\n    if (typeFromObject !== typeFromDefaultValue) {\n        const propertyPath = controller ? `${controller}.${token}` : token;\n        throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${typeObject.default}\" is of type \"${typeFromDefaultValue}\".`);\n    }\n    if (fullObject)\n        return typeFromObject;\n}\nfunction parseValueTypeDefinition(payload) {\n    const { controller, token, typeDefinition } = payload;\n    const typeObject = { controller, token, typeObject: typeDefinition };\n    const typeFromObject = parseValueTypeObject(typeObject);\n    const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);\n    const typeFromConstant = parseValueTypeConstant(typeDefinition);\n    const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n    if (type)\n        return type;\n    const propertyPath = controller ? `${controller}.${typeDefinition}` : token;\n    throw new Error(`Unknown value type \"${propertyPath}\" for \"${token}\" value`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n    const constant = parseValueTypeConstant(typeDefinition);\n    if (constant)\n        return defaultValuesByType[constant];\n    const hasDefault = hasProperty(typeDefinition, \"default\");\n    const hasType = hasProperty(typeDefinition, \"type\");\n    const typeObject = typeDefinition;\n    if (hasDefault)\n        return typeObject.default;\n    if (hasType) {\n        const { type } = typeObject;\n        const constantFromType = parseValueTypeConstant(type);\n        if (constantFromType)\n            return defaultValuesByType[constantFromType];\n    }\n    return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n    const { token, typeDefinition } = payload;\n    const key = `${dasherize(token)}-value`;\n    const type = parseValueTypeDefinition(payload);\n    return {\n        type,\n        key,\n        name: camelize(key),\n        get defaultValue() {\n            return defaultValueForDefinition(typeDefinition);\n        },\n        get hasCustomDefaultValue() {\n            return parseValueTypeDefault(typeDefinition) !== undefined;\n        },\n        reader: readers[type],\n        writer: writers[type] || writers.default,\n    };\n}\nconst defaultValuesByType = {\n    get array() {\n        return [];\n    },\n    boolean: false,\n    number: 0,\n    get object() {\n        return {};\n    },\n    string: \"\",\n};\nconst readers = {\n    array(value) {\n        const array = JSON.parse(value);\n        if (!Array.isArray(array)) {\n            throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(array)}\"`);\n        }\n        return array;\n    },\n    boolean(value) {\n        return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n    },\n    number(value) {\n        return Number(value.replace(/_/g, \"\"));\n    },\n    object(value) {\n        const object = JSON.parse(value);\n        if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n            throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(object)}\"`);\n        }\n        return object;\n    },\n    string(value) {\n        return value;\n    },\n};\nconst writers = {\n    default: writeString,\n    array: writeJSON,\n    object: writeJSON,\n};\nfunction writeJSON(value) {\n    return JSON.stringify(value);\n}\nfunction writeString(value) {\n    return `${value}`;\n}\n\nclass Controller {\n    constructor(context) {\n        this.context = context;\n    }\n    static get shouldLoad() {\n        return true;\n    }\n    static afterLoad(_identifier, _application) {\n        return;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get targets() {\n        return this.scope.targets;\n    }\n    get outlets() {\n        return this.scope.outlets;\n    }\n    get classes() {\n        return this.scope.classes;\n    }\n    get data() {\n        return this.scope.data;\n    }\n    initialize() {\n    }\n    connect() {\n    }\n    disconnect() {\n    }\n    dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true, } = {}) {\n        const type = prefix ? `${prefix}:${eventName}` : eventName;\n        const event = new CustomEvent(type, { detail, bubbles, cancelable });\n        target.dispatchEvent(event);\n        return event;\n    }\n}\nController.blessings = [\n    ClassPropertiesBlessing,\n    TargetPropertiesBlessing,\n    ValuePropertiesBlessing,\n    OutletPropertiesBlessing,\n];\nController.targets = [];\nController.outlets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, SelectorObserver, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n", "import {Controller} from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n    static values = { storageKey: String, targetQuery: String, rootUrl: String }\n\n    connect() {\n\n        const saved = sessionStorage.getItem(this.storageKeyValue)\n        if (saved !== null) {\n\n            this._sorted = saved === \"true\"\n            this._updateIcon()\n            if (this.hasRootUrlValue && this._sorted) this._reloadRoot()\n        } else {\n            this._sorted = false\n        }\n    }\n\n    toggle(event) {\n        event.preventDefault()\n        this._sorted = !this._sorted\n        sessionStorage.setItem(this.storageKeyValue, this._sorted)\n        this._updateIcon()\n        this._reloadTarget()\n    }\n\n    _updateIcon() {\n        const icon = this.element.querySelector(\"svg\") || this.element.querySelector(\"i\")\n        if (!icon) return\n\n        if (this._sorted) {\n            icon.classList.remove(\"fa-sort-alpha-down\")\n            icon.classList.add(\"fa-sort-alpha-up\")\n            this.element.classList.add(\"is-sorted\")\n        } else {\n            icon.classList.remove(\"fa-sort-alpha-up\")\n            icon.classList.add(\"fa-sort-alpha-down\")\n            this.element.classList.remove(\"is-sorted\")\n        }\n        this._updateAriaLabel()\n    }\n\n    _reloadTarget() {\n        if (this.hasRootUrlValue) { this._reloadRoot(); return }\n\n        const target = document.querySelector(this.targetQueryValue)\n        if (!target) return\n\n        const fetchHtmlEl = this.element.closest(\"li\")?.querySelector(\"[data-controller~='fetch-html']\")\n        if (!fetchHtmlEl) { console.log('kein fetchHtmlEl gefunden'); return }\n\n        const currentUrl = new URL(fetchHtmlEl.dataset.fetchHtmlUrlValue, window.location.origin)\n        currentUrl.searchParams.set(\"direction\", this._sorted ? \"desc\" : \"asc\")\n        fetchHtmlEl.dataset.fetchHtmlUrlValue = currentUrl.toString()\n        fetchHtmlEl.fetchHtml?.reload({ spinner: false })\n    }\n\n    _reloadRoot() {\n        const url = new URL(this.rootUrlValue, window.location.origin)\n        url.searchParams.set(\"direction\", this._sorted ? \"desc\" : \"asc\")\n        window.Rails.ajax({ type: \"GET\", url: url.toString(), dataType: \"script\" })\n    }\n\n    _updateAriaLabel() {\n        const categoryName = this.element.dataset.categoryName\n        const stateText = this._sorted\n            ? this.element.dataset.labelDesc\n            : this.element.dataset.labelAsc\n        this.element.setAttribute('aria-label', categoryName ? `${stateText}: ${categoryName}` : stateText)\n    }\n}", "import {Application} from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus = application\n\nexport {application}\n", "/*\n  Assignment Stimulus Controller v1.0.0\n\n  Documentation for options 'delta: true':\n  This demonstrates how the js lib handels delta data on adding, removing and changing status of the data arrays.\n    + -> added object\n    - -> removed object\n    ~ -> changes status of object\n\n        +---------+                                       - Added objects will be removed from the removedData holder\n        |    +    |                                         when persistent.\n        +---------+                                       - Added object wil be added to the addedData holder when\n             |                                              not persistent.\n             |\n       -------------             +-----------------+\n     /               \\    yes    |                 |\n    |    persistent   | -------> | removedData -   |\n     \\               /           |                 |\n       -------------             +-----------------+\n             |\n             | no\n             v\n    +-----------------+\n    |                 |\n    | addedData +     |\n    |                 |\n    +-----------------+\n\n\n        +---------+                                       - Removed objects will be removed from the addedData holder\n        |    -    |                                         when persistent. This objects will also be added to the\n        +---------+                                         removedData holder if not already available.\n             |                                            - Removed objects wil be removed from the addedData holder\n             |                                              when not persistent.\n       -------------             +--------------------+\n     /               \\    yes    | addedData -        |\n    |    persistent   | -------> | removedData +      |\n     \\               /           | (if not available) |\n       -------------             +--------------------+\n             |\n             | no\n             v\n    +----------------+\n    |                |\n    | addedData -    |\n    |                |\n    +----------------+\n\n\n        +---------+                                        - Changed objects will be added to the removedData holder\n        |    ~    |                                          when persistent. This objects are set with the old status.\n        +---------+                                          This objects will also be changed in the addedData holder.\n             |                                             - Changed objects will be updated in the addedData holder\n             |                                               when not persistent.\n       -------------             +--------------------+\n     /               \\    yes    | addedData ~        |\n    |    persistent   | -------> | removedData +      |\n     \\               /           | (with old data)    |\n       -------------             +--------------------+\n             |\n             | no\n             v\n    +----------------+\n    |                |\n    | addedData ~    |\n    |                |\n    +----------------+\n */\nimport {Controller} from '@hotwired/stimulus'\nimport doT from 'dot'\nimport {debounce} from 'debounce'\n\nexport default class extends Controller {\n    static values = {\n        debug: {type: Boolean, default: false},\n        delta: {type: Boolean, default: false},\n        data: {type: Array, default: []},\n        paginationPerPage: {type: Number, default: 10},\n        paginationPageGapAt: {type: Number, default: 2},\n        paginationPreviousLabel: {type: String, default: '&#8592 Previous'},\n        paginationNextLabel: {type: String, default: 'Next &#8594'},\n        paginationPageGap: {type: String, default: '&hellip'},\n        emptyTableRowText: {type: String, default: 'No entries available'},\n        tableFilterText: {type: String, default: 'Filtered'},\n        tableSumText: {type: String, default: 'Total'},\n        elementExistsText: {type: String, default: 'Element already exists.'},\n        elementAddedText: {type: String, default: 'Element has been successfully added.'}\n    }\n\n    static targets = ['tableRowTemplate', 'elementsListTable', 'typeahead', 'feedback', 'tableFilter', 'tableFilterType', 'assignationForm']\n\n    initialize() {\n        this._handleAutocompleteChange = this._handleAutocompleteChange.bind(this)\n        this._handleAssignationFormAjaxComplete = this._handleAssignationFormAjaxComplete.bind(this)\n        this._handleAssignationFormSubmit = this._handleAssignationFormSubmit.bind(this)\n        this.handleAssignationFilterInput = debounce(this.handleAssignationFilterInput, 500)\n    }\n\n    connect() {\n        this._log(`Plugin Assignment for DOM element ${this.element}.`)\n        this._data = this.dataValue\n        this._originalData = this._data.slice()\n        if (this.deltaValue) {\n            this._dataDeltaAdded = []\n            this._dataDeltaRemoved = []\n        }\n        this._renderTable(1)\n        this._installTypeaheadHandler()\n        this._installAssignationFormSubmitHandlers()\n        this.element['assignment'] = {triggerTableRenderEvent: this._dispatchTableRenderCompleteEvent.bind(this)}\n    }\n\n    disconnect() {\n        this._uninstallTypeAheadHandler()\n        this._uninstallAssignationFormSubmitHandler()\n    }\n\n    _installAssignationFormSubmitHandlers() {\n        this._log('Form submit handler installed.')\n        this.assignationFormTarget.addEventListener('ajax:complete', this._handleAssignationFormAjaxComplete)\n        this.assignationFormTarget.addEventListener('submit', this._handleAssignationFormSubmit)\n    }\n\n    _uninstallAssignationFormSubmitHandler() {\n        this._log('Form submit handler uninstalled.')\n        this.assignationFormTarget.removeEventListener('ajax:complete', this._handleAssignationFormAjaxComplete)\n        this.assignationFormTarget.removeEventListener('submit', this._handleAssignationFormSubmit)\n    }\n\n    _installTypeaheadHandler() {\n        this._log('Typeahead handler installed.')\n        this.typeaheadTarget.addEventListener('autocomplete.change', this._handleAutocompleteChange)\n    }\n\n    _uninstallTypeAheadHandler() {\n        this._log('Typeahead handler uninstalled.')\n        this.typeaheadTarget.removeEventListener('autocomplete.change', this._handleAutocompleteChange)\n    }\n\n    handleAssignationFilterInput(event) {\n        if (event.keyCode === 13) {\n            event.preventDefault()\n            return false\n        }\n        let value = event.target.value\n        let filterTypeSelectedValue = false\n        if (this.hasTableFilterTypeTarget) {\n            filterTypeSelectedValue = this.tableFilterTypeTarget.querySelector('option:checked')?.value\n        }\n        if (value) {\n            this._data = this._originalData.filter(function (data_object) {\n                if (filterTypeSelectedValue) {\n                    return data_object.type === filterTypeSelectedValue && data_object['name'].toLowerCase().indexOf(value.toLowerCase()) >= 0\n                } else {\n                    return data_object['name'].toLowerCase().indexOf(value.toLowerCase()) >= 0\n                }\n            })\n        } else {\n            if (filterTypeSelectedValue) {\n                this._data = this._originalData.filter(function (data_object) {\n                    return data_object.type === filterTypeSelectedValue\n                })\n            } else {\n                this._data = this._originalData.slice(0)\n            }\n        }\n        this._renderTable(1)\n    }\n\n    handleAssignationFilterTypeSelect(event) {\n        this._log('AssignationFilterTypeSelect called.')\n        let selectedValue = event.target.querySelector('option:checked').value\n        let filterInputValue = this.tableFilterTarget.value\n        if (selectedValue) {\n            this._data = this._originalData.filter(function (data_object) {\n                if (filterInputValue) {\n                    return data_object.type === selectedValue && data_object['name'].toLowerCase().indexOf(filterInputValue.toLowerCase()) >= 0\n                } else {\n                    return data_object.type === selectedValue\n                }\n            })\n        } else {\n            if (filterInputValue) {\n                this._data = this._originalData.filter(function (data_object) {\n                    return data_object['name'].toLowerCase().indexOf(filterInputValue.toLowerCase()) >= 0\n                })\n            } else {\n                this._data = this._originalData.slice(0)\n            }\n        }\n        this._renderTable(1)\n    }\n\n    _handleAssignationFormAjaxComplete(_event) {\n        this._log('AssignationFormAjaxComplete called.')\n        if (this.deltaValue) {\n            this.element.dispatchEvent(\n                new CustomEvent('assignment.assignationFormAjaxComplete', {\n                    bubbles: true,\n                    detail: {\n                        dataDeltaAdded: this._dataDeltaAdded,\n                        dataDeltaRemoved: this._dataDeltaRemoved\n                    }\n                })\n            )\n        } else {\n            this.element.dispatchEvent(\n                new CustomEvent('assignment.assignationFormAjaxComplete', {\n                    bubbles: true,\n                    detail: {\n                        originalData: this._originalData\n                    }\n                })\n            )\n        }\n    }\n\n    _handleAssignationFormSubmit(_event) {\n        this._log('AssignationFormSubmit called.')\n        if (this.deltaValue) {\n            this.element.dispatchEvent(\n                new CustomEvent('assignment.assignationFormSubmit', {\n                    bubbles: true,\n                    detail: {\n                        dataDeltaAdded: this._dataDeltaAdded,\n                        dataDeltaRemoved: this._dataDeltaRemoved\n                    }\n                })\n            )\n        } else {\n            this.element.dispatchEvent(\n                new CustomEvent('assignment.assignationFormSubmit', {\n                    bubbles: true,\n                    detail: {\n                        originalData: this._originalData\n                    }\n                })\n            )\n        }\n    }\n\n    handleRemoveElement(event) {\n        if (!event.target.classList.contains('remove_element_btn')) return\n\n        this._log('RemoveElement called.')\n        event.preventDefault()\n\n        let tableRow = event.target.closest('tr')\n        let objectId = parseInt(tableRow.dataset.id)\n        let objectType = tableRow.dataset.type\n        let dataLength = this._data.length\n        let numberOfPages = Math.ceil(dataLength / this.paginationPerPageValue)\n\n        if (this.deltaValue) {\n            let isInAddedDeltaData = this._searchData(this._dataDeltaAdded, objectId, objectType).length > 0\n            let isInRemoveDeltaData = this._searchData(this._dataDeltaRemoved, objectId, objectType).length > 0\n            if (isInAddedDeltaData && isInRemoveDeltaData) {\n                this._dataDeltaAdded = this._grepData(this._dataDeltaAdded, objectId, objectType)\n            } else if (isInAddedDeltaData) {\n                this._dataDeltaAdded = this._grepData(this._dataDeltaAdded, objectId, objectType)\n            } else {\n                let removedObjects = this._searchData(this._originalData, objectId, objectType)\n                let oldDataObject = {...{}, ...removedObjects[0]}\n                this._dataDeltaRemoved.unshift(oldDataObject)\n            }\n        }\n        this._originalData = this._grepData(this._originalData, objectId, objectType)\n        this._data = this._grepData(this._data, objectId, objectType)\n        tableRow.remove()\n        let paginationId = `assignation_pagination_${this.elementsListTableTarget.id}`\n        let pagination = document.getElementById(paginationId).firstChild\n        let atPage = 1\n        if (pagination.querySelectorAll('li').length !== 0) {\n            let currentPage = pagination.querySelector('.page-item.active > a').rel\n            currentPage = parseInt(currentPage)\n            if (typeof currentPage !== 'undefined') {\n                atPage = Math.max(currentPage, 1)\n            }\n            if (dataLength - (numberOfPages - 1) * this.paginationPerPageValue === 1) {\n                atPage = Math.max(currentPage - 1, 1)\n            }\n        } else {\n            atPage = 1\n        }\n        this._renderTable(atPage)\n    }\n\n    _handleAutocompleteChange(event) {\n        this._log('AutocompleteChange called.')\n        let selectedElement = event.detail.selected\n        let selectedObject = {\n            type: selectedElement.dataset.type,\n            id: parseInt(selectedElement.dataset.id),\n            name: selectedElement.dataset.name,\n            assigned_at: '',\n            members_size: selectedElement.dataset.membersSize,\n            image_url: selectedElement.dataset.imageUrl\n        }\n        let typeAheadSearchInput = this.typeaheadTarget.querySelector('input[type=\"search\"]')\n        let searchResult = this._searchData(this._originalData, selectedObject.id, selectedObject.type)\n        if (searchResult.length > 0) {\n            typeAheadSearchInput.classList.remove('is-valid')\n            typeAheadSearchInput.classList.add('is-invalid')\n            this.feedbackTarget.classList.remove('valid-feedback')\n            this.feedbackTarget.classList.add('invalid-feedback')\n            if (searchResult[0].assigned_at === '' || searchResult[0].assigned_at === undefined) {\n                this.feedbackTarget.innerText = `${this.elementExistsTextValue}: ${selectedObject.name}.`\n            } else {\n                this.feedbackTarget.innerText = `${this.elementExistsTextValue}: ${selectedObject.name} (${searchResult[0].assigned_at}).`\n            }\n        } else {\n            typeAheadSearchInput.classList.remove('is-invalid')\n            typeAheadSearchInput.classList.add('is-valid')\n            this.feedbackTarget.classList.remove('invalid-feedback')\n            this.feedbackTarget.classList.add('valid-feedback')\n            this.feedbackTarget.innerText = `${this.elementAddedTextValue}: ${selectedObject.name}.`\n            if (this.deltaValue) {\n                let addedObjects = this._searchData(this._dataDeltaRemoved, selectedObject.id, selectedObject.type)\n                if (addedObjects.length > 0) {\n                    this._dataDeltaRemoved = this._grepData(this._dataDeltaRemoved, selectedObject.id, selectedObject.type)\n                } else {\n                    this._dataDeltaAdded.unshift(selectedObject)\n                }\n                if (addedObjects.length > 0) selectedObject = addedObjects[0]\n            }\n            if (this.tableFilterTarget.value) {\n                this._originalData.unshift(selectedObject)\n                if (selectedObject.name.toLowerCase().indexOf(this.tableFilterTarget.value.toLowerCase()) >= 0) {\n                    this._data = this._prepend(selectedObject, this._data)\n                    this._renderTable(1, true)\n                }\n            } else {\n                this._originalData.unshift(selectedObject)\n                this._data = this._prepend(selectedObject, this._data)\n                this._renderTable(1, true)\n            }\n        }\n        typeAheadSearchInput.value = ''\n        new Promise(resolve => setTimeout(resolve, 50)).then(() => typeAheadSearchInput.focus())\n    }\n\n    _renderTable(atPage, flashFirstRow) {\n        this._log(`Render table called at page: ${atPage}.`)\n        if (flashFirstRow == null) flashFirstRow = false\n        let tableRowTemplate = doT.template(this.tableRowTemplateTarget.innerHTML)\n        let startItem = Math.max(atPage - 1, 0) * this.paginationPerPageValue\n        let endItem = startItem + this.paginationPerPageValue\n        this.elementsListTableTarget.querySelector('tbody').innerHTML =\n            this._data.slice(startItem, endItem).map(object => {\n                return tableRowTemplate(object)\n            }).join('')\n        this._checkTableEntries()\n        if (flashFirstRow) {\n            this.elementsListTableTarget.querySelector('tbody > tr:first-child').classList.add('table_row_flash_green')\n        }\n        this._renderPagination(atPage)\n        this._renderTableFooter()\n        this._dispatchTableRenderCompleteEvent()\n    }\n\n    _renderTableFooter() {\n        this._log('Render table footer called.')\n        this.elementsListTableTarget.querySelector('tfoot tr td').innerHTML = `<span class=\"float-end\">${this.tableFilterTextValue}: ${this._data.length}, ${this.tableSumTextValue}: ${this._originalData.length}</span>`\n    }\n\n    _checkTableEntries() {\n        this._log('Checking table entries.')\n        let emptyTableRow = `<tr id=\"empty_table_row\"><td colspan=\"10\" class=\"align-middle text-center\">${this.emptyTableRowTextValue}</td></tr>`\n        let elementsListTableBody = this.elementsListTableTarget.querySelector('tbody')\n        if (elementsListTableBody.childNodes.length === 0) {\n            elementsListTableBody.innerHTML = emptyTableRow\n        } else {\n            this.element.querySelector('#empty_table_row')?.remove()\n        }\n    }\n\n    _renderPagination(atPage) {\n        this._log(`Render pagination called at page: ${atPage}.`)\n        let paginationId = `assignation_pagination_${this.elementsListTableTarget.id}`\n        if (document.getElementById(paginationId) === null) {\n            this.elementsListTableTarget.insertAdjacentHTML('afterend', `<nav id=\"${paginationId}\" aria-label=\"pager\" class=\"pagy-bootstrap-nav\" role=\"navigation\"><ul class=\"pagination justify-content-center\"></ul></nav>`)\n        }\n        let pagination = document.getElementById(paginationId).firstChild\n        pagination.innerHTML = ''\n        let numberOfPages = Math.ceil(this._data.length / this.paginationPerPageValue)\n        if (numberOfPages <= 1) return\n\n        let rangeStart = atPage - this.paginationPageGapAtValue\n        let rangeEnd = atPage + this.paginationPageGapAtValue\n        if (rangeEnd > numberOfPages) {\n            rangeEnd = numberOfPages\n            rangeStart = numberOfPages - (this.paginationPageGapAtValue * 2)\n            rangeStart = rangeStart < 1 ? 1 : rangeStart\n        }\n        if (rangeStart <= 1) {\n            rangeStart = 1\n            rangeEnd = Math.min(this.paginationPageGapAtValue * 2 + 1, numberOfPages)\n        }\n        this._log(`Render Pagination rangeStart: ${rangeStart}.`)\n        this._log(`Render Pagination rangeEnd: ${rangeEnd}.`)\n        let html = ''\n        let i\n        if (atPage === 1) {\n            html += `<li class=\"page-item previous disabled\"><a href=\"#\" class=\"page-link\">${this.paginationPreviousLabelValue}</a></li>`\n        } else {\n            html += `<li class=\"page-item previous\"><a href=\"#\" rel=\"previous\" class=\"page-link\" data-action=\"assignment#handlePaginationClick\">${this.paginationPreviousLabelValue}</a></li>`\n        }\n        if (rangeStart <= 3) {\n            i = 1\n            while (i < rangeStart) {\n                html += `<li class=\"page-item\"><a href=\"#\" rel=\"${i}\" class=\"page-link\" data-action=\"assignment#handlePaginationClick\">${i}</a></li>`\n                i++\n            }\n        } else {\n            html += '<li class=\"page-item\"><a href=\"#\" rel=\"1\" class=\"page-link\" data-action=\"assignment#handlePaginationClick\">1</a></li>'\n            html += `<li class=\"page-item disabled gap\"><a href=\"#\" class=\"page-link\">${this.paginationPageGapValue}</a></li>`\n        }\n        i = rangeStart\n        while (i <= rangeEnd) {\n            html += `<li class=\"page-item\"><a href=\"#\" rel=\"${i}\" class=\"page-link\" data-action=\"assignment#handlePaginationClick\">${i}</a></li>`\n            i++\n        }\n        if (rangeEnd >= numberOfPages - 2) {\n            i = rangeEnd + 1\n            while (i <= numberOfPages) {\n                html += `<li class=\"page-item\"><a href=\"#\" rel=\"${i}\" class=\"page-link\" data-action=\"assignment#handlePaginationClick\">${i}</a></li>`\n                i++\n            }\n        } else {\n            html += `<li class=\"page-item disabled gap\"><a href=\"#\" class=\"page-link\">${this.paginationPageGapValue}</a></li>`\n            html += `<li class=\"page-item\"><a href=\"#\" rel=\"${numberOfPages}\" class=\"page-link\" data-action=\"assignment#handlePaginationClick\">${numberOfPages}</a></li>`\n        }\n        if (atPage === numberOfPages) {\n            html += `<li class=\"page-item next disabled\"><a href=\"#\" class=\"page-link\">${this.paginationNextLabelValue}</a></li>`\n        } else {\n            html += `<li class=\"page-item next\"><a href=\"#\" rel=\"next\" class=\"page-link\" data-action=\"assignment#handlePaginationClick\">${this.paginationNextLabelValue}</a></li>`\n        }\n        pagination.innerHTML = html\n        pagination.querySelector(`a[rel=\"${atPage}\"]`).parentElement.classList.add('active')\n    }\n\n    _dispatchTableRenderCompleteEvent() {\n        if (this.deltaValue) {\n            this.element.dispatchEvent(\n                new CustomEvent('assignment.tableRenderComplete', {\n                    bubbles: true,\n                    detail: {\n                        elementList: this.elementsListTableTarget,\n                        originalData: this._originalData,\n                        dataDeltaAdded: this._dataDeltaAdded,\n                        dataDeltaRemoved: this._dataDeltaRemoved\n                    }\n                })\n            )\n        } else {\n            this.element.dispatchEvent(\n                new CustomEvent('assignment.tableRenderComplete', {\n                    bubbles: true,\n                    detail: {\n                        elementList: this.elementsListTableTarget,\n                        originalData: this._originalData,\n                    }\n                })\n            )\n        }\n    }\n\n    handlePaginationClick(event) {\n        this._log('PaginationClick called.')\n        let paginationId = `assignation_pagination_${this.elementsListTableTarget.id}`\n        let pagination = document.getElementById(paginationId).firstChild\n        let numberOfPages = Math.ceil(this._data.length / this.paginationPerPageValue)\n        let atPage = 1\n        let currentPage = event.target.rel\n        if (currentPage === 'previous') {\n            this._log('Pagination pre event called.')\n            currentPage = pagination.querySelector('.page-item.active > a').rel\n            currentPage = parseInt(currentPage)\n            if (typeof currentPage !== 'undefined') {\n                atPage = Math.max(currentPage - 1, 1)\n            }\n        } else if (currentPage === 'next') {\n            this._log('Pagination next event called.')\n            currentPage = pagination.querySelector('.page-item.active > a').rel\n            currentPage = parseInt(currentPage)\n            this._log(`current page: ${currentPage}`)\n            if (typeof currentPage === 'undefined') {\n                atPage = numberOfPages\n            } else {\n                atPage = Math.min(currentPage + 1, numberOfPages)\n            }\n        } else {\n            this._log(`Pagination number event called: ${currentPage}`)\n            atPage = parseInt(currentPage)\n        }\n        this._renderTable(atPage)\n    }\n\n    _grepData(data, objectIdToRemove, objectTypeToRemove) {\n        return data.filter(function (data_object) {\n            return !(data_object.id === objectIdToRemove && data_object.type === objectTypeToRemove)\n        })\n    }\n\n    _searchData(data, objectIdToSearch, objectTypeToSearch) {\n        return data.filter(function (data_object) {\n            return data_object.id === objectIdToSearch && data_object.type === objectTypeToSearch\n        })\n    }\n\n    _prepend(value, array) {\n        let newArray = array.slice()\n        newArray.unshift(value)\n        return newArray\n    }\n\n    _log(message) {\n        if (this.debugValue === true) console.log(`DEBUG assignment: ${message}`)\n    }\n}\n", "export default function AsyncPickMarkup (options) {\n    this.element = options.element\n    this.id = options.id\n    this.label = options.label\n    this.multiple = options.multiple || false\n    this.disabled = options.disabled || false\n    this.searchPlaceholder = options.searchPlaceholder\n    this.searchInputClasses = options.searchInputClasses\n    this.withSearch = options.withSearch\n    this.buttonClasses = options.buttonClasses\n    this.buttonDisabledClasses = options.buttonDisabledClasses\n    this.emptySelectButtonText = options.emptySelectButtonText\n    this.buttonIconClasses = options.buttonIconClasses\n    this.checkedIconClasses = options.checkedIconClasses\n    this.listClasses = options.listClasses\n    this.selectedTextFormat = options.selectedTextFormat\n    this.selectedTextVariable = options.selectedTextVariable\n    this.selectedText = options.selectedText\n    this.noResultsText = options.noResultsText\n    this.dividerText = options.dividerText\n    this.container = options.container\n    this.dropdownAlignRight = options.dropdownAlignRight\n    this.popupWidth = options.popupWidth\n    this.open = false\n    this.optionId = -1\n\n    this.wrapper = this.buildWrapper()\n    this.button = this.buildButton()\n    if (!this.disabled) {\n        this.popup = this.buildPopup()\n        this.liveRegion = this.buildLiveRegion()\n    }\n\n    this.hideOriginalSelect()\n    this.assemble()\n}\n\nAsyncPickMarkup.prototype.setExpanded = function (expanded) {\n    this.button.setAttribute('aria-expanded', expanded.toString())\n    if (this.searchInput) this.searchInput.setAttribute('aria-expanded', expanded.toString())\n}\n\nAsyncPickMarkup.prototype.getLabelId = function () {\n    if (!this.label) return null\n    if (!this.label.id) this.label.id = this.id + '__label'\n    return this.label.id\n}\n\n// element that keeps focus while navigating the list: the search input, or the button when there is no search\nAsyncPickMarkup.prototype.getActiveDescendantOwner = function () {\n    return this.withSearch ? this.searchInput : this.button\n}\n\nAsyncPickMarkup.prototype.hideOriginalSelect = function () {\n    this.element.classList.add('visually-hidden')\n    this.element.setAttribute('tabindex', '-1')\n    this.element.setAttribute('aria-hidden', 'true')\n}\n\nAsyncPickMarkup.prototype.showOriginalSelect = function () {\n    this.element.style.display = 'initial'\n    this.element.removeAttribute('aria-hidden')\n}\n\nAsyncPickMarkup.prototype.assemble = function () {\n    this.wrapper.appendChild(this.button)\n    if (!this.disabled) {\n        this.wrapper.appendChild(this.liveRegion)\n        if (!!this.container) {\n            const container = document.querySelector(this.container)\n            if (container) {\n                container.appendChild(this.popup)\n                this.popup.style.position = 'absolute'\n                this.popup.style.top = '0'\n            }\n        } else {\n            this.wrapper.appendChild(this.popup)\n        }\n    }\n    this.element.parentNode.insertBefore(this.wrapper, this.element)\n}\n\nAsyncPickMarkup.prototype.positionPopup = function () {\n    if (!this.open) return\n    if (!!this.container) {\n        const pos = this.wrapper.getBoundingClientRect()\n        const offset = getOffsetFromBoundingBox(pos)\n        const top = offset.top + this.wrapper.offsetHeight\n\n        if (this.shouldDropUp()) {\n            this.popup.style.top = (top - this.popup.offsetHeight - this.button.offsetHeight - parseInt(window.getComputedStyle(this.popup).marginTop)).toString() + 'px'\n        } else {\n            this.popup.style.top = top.toString() + 'px'\n        }\n        if (this.dropdownAlignRight) {\n            const right = window.innerWidth - pos.left - this.wrapper.offsetWidth\n            this.popup.style.right = right + 'px'\n        } else {\n            this.popup.style.left = offset.left.toString() + 'px'\n        }\n        this.popup.style.minWidth = this.wrapper.offsetWidth + 'px'\n        this.popup.style.width = this.popupWidth\n        this.popup.style.position = 'absolute'\n    } else {\n        if (this.shouldDropUp()) {\n            this.popup.style.top = 'auto'\n            this.popup.style.bottom = (this.button.offsetHeight + parseInt(window.getComputedStyle(this.popup).marginTop)).toString() + 'px'\n        } else {\n            this.popup.style.top = '100%'\n            this.popup.style.bottom = 'auto'\n        }\n    }\n}\n\nAsyncPickMarkup.prototype.shouldDropUp = function () {\n    const pos = this.button.getBoundingClientRect()\n    const offset = getOffsetFromBoundingBox(pos)\n    const selectOffsetTop = offset.top - document.documentElement.scrollTop\n    const selectOffsetBot = window.innerHeight - selectOffsetTop - this.button.offsetHeight\n    return selectOffsetTop > selectOffsetBot && selectOffsetBot < this.popup.offsetHeight\n}\n\nAsyncPickMarkup.prototype.buildWrapper = function () {\n    const wrapper = document.createElement('div')\n    wrapper.classList.add('async-pick')\n    if (this.multiple) wrapper.classList.add('async-pick--multiple')\n    return wrapper\n}\n\nAsyncPickMarkup.prototype.buildButton = function () {\n    const button = document.createElement('button')\n    button.setAttribute('type', 'button')\n    this.buttonClasses.forEach(function (buttonClass) {\n        button.classList.add(buttonClass)\n    })\n    button.disabled = true\n    if (this.disabled) {\n        this.buttonDisabledClasses.forEach(function (buttonDisabledClass) {\n            button.classList.add(buttonDisabledClass)\n        })\n    }\n\n    this.buttonText = document.createElement('span')\n    this.buttonText.id = this.id + '__button-text'\n    this.buttonText.classList.add('ap__button-text')\n\n    if (this.buttonIconClasses && this.buttonIconClasses.length > 0) {\n        let buttonIcon = document.createElement('i')\n        this.buttonIconClasses.forEach(function (buttonIconClass) {\n            buttonIcon.classList.add(buttonIconClass)\n        })\n        buttonIcon.setAttribute('aria-hidden', 'true')\n        button.appendChild(this.buttonText)\n        button.appendChild(buttonIcon)\n    } else {\n        button.appendChild(this.buttonText)\n    }\n\n    this.addButtonAriaAttributes(button)\n    return button\n}\n\nAsyncPickMarkup.prototype.addButtonAriaAttributes = function (button) {\n    const labelId = this.getLabelId()\n    if (this.withSearch) {\n        if (labelId) button.setAttribute('aria-labelledby', labelId + ' ' + this.buttonText.id)\n    } else {\n        // select-only combobox: the value is read from the content, so the name is only the label\n        button.setAttribute('role', 'combobox')\n        button.setAttribute('aria-haspopup', 'listbox')\n        button.setAttribute('aria-labelledby', labelId || this.buttonText.id)\n    }\n    if (!this.disabled) {\n        button.setAttribute('aria-expanded', 'false')\n        button.setAttribute('aria-controls', this.withSearch ? this.id + '__popup' : this.id + '__listbox')\n    }\n}\n\nAsyncPickMarkup.prototype.enableButton = function () {\n    this.button.disabled = false\n}\n\nAsyncPickMarkup.prototype.buildPopup = function () {\n    const popup = document.createElement('div')\n    popup.id = this.id + '__popup'\n    popup.classList.add('ap__popup')\n    if (this.dropdownAlignRight) popup.classList.add('ap__popup--right')\n\n    if (this.withSearch) popup.appendChild(this.buildSearchInput())\n    popup.appendChild(this.buildResultsScrollWrapper())\n\n    return popup\n}\n\n/**\n * Screen readers do not reliably announce an option becoming unselected, so changes are announced here.\n * It is outside the popup, because content inside a hidden element is not announced.\n */\nAsyncPickMarkup.prototype.buildLiveRegion = function () {\n    const liveRegion = document.createElement('div')\n    liveRegion.classList.add('visually-hidden')\n    liveRegion.setAttribute('role', 'status')\n    liveRegion.setAttribute('aria-live', 'polite')\n    return liveRegion\n}\n\nAsyncPickMarkup.prototype.announce = function (message) {\n    // cleared first and set with a delay, so the same message is announced again\n    this.liveRegion.textContent = ''\n    clearTimeout(this.announceTimer)\n    this.announceTimer = setTimeout(() => {\n        this.liveRegion.textContent = message\n    }, 100)\n}\n\nAsyncPickMarkup.prototype.buildSearchInput = function () {\n    const wrapper = document.createElement('div')\n    wrapper.classList.add('ap__search-input__wrapper')\n    this.searchInput = document.createElement('input')\n    this.searchInput.type = 'search'\n    this.searchInput.id = this.id + '__search'\n    this.searchInput.setAttribute('placeholder', this.searchPlaceholder)\n    this.searchInput.setAttribute('role', 'combobox')\n    this.searchInput.setAttribute('data-async-pick-keyboard-a11y', 'active-descendant-v1')\n    this.searchInput.setAttribute('aria-autocomplete', 'list')\n    this.searchInput.setAttribute('aria-haspopup', 'listbox')\n    this.searchInput.setAttribute('aria-expanded', 'false')\n    this.searchInput.setAttribute('aria-controls', this.id + '__listbox')\n    if (this.label) {\n        this.searchInput.setAttribute('aria-labelledby', this.getLabelId())\n    } else {\n        this.searchInput.setAttribute('aria-label', this.searchPlaceholder)\n    }\n    this.searchInput.classList.add('ap__search-input')\n\n    let self = this\n    this.searchInputClasses.forEach(function (searchInputClass) {\n        self.searchInput.classList.add(searchInputClass)\n    })\n\n    wrapper.appendChild(this.searchInput)\n    return wrapper\n}\n\nAsyncPickMarkup.prototype.buildResultsScrollWrapper = function () {\n    this.resultsScrollWrapper = document.createElement('div')\n    this.resultsScrollWrapper.classList.add('ap__results-scroll-wrapper')\n    this.resultsWrapper = document.createElement('div')\n    this.resultsWrapper.classList.add('ap__results')\n    this.resultsWrapper.id = this.id + '__listbox'\n    this.resultsWrapper.setAttribute('role', 'listbox')\n    this.resultsWrapper.setAttribute('aria-multiselectable', this.multiple.toString())\n    if (this.label) this.resultsWrapper.setAttribute('aria-labelledby', this.getLabelId())\n    this.resultsScrollWrapper.appendChild(this.buildTopLoader())\n    this.resultsScrollWrapper.appendChild(this.resultsWrapper)\n    this.resultsScrollWrapper.appendChild(this.buildBottomLoader())\n    return this.resultsScrollWrapper\n}\n\nAsyncPickMarkup.prototype.buildTopLoader = function () {\n    this.topLoader = document.createElement('div')\n    this.topLoader.classList.add('ap-top-loader')\n    this.topLoader.innerHTML = '...'\n    this.topLoader.style.display = 'none'\n    return this.topLoader\n}\n\nAsyncPickMarkup.prototype.buildBottomLoader = function () {\n    this.bottomLoader = document.createElement('div')\n    this.bottomLoader.classList.add('ap-bottom-loader')\n    this.bottomLoader.innerHTML = '...'\n    this.bottomLoader.style.display = 'none'\n    return this.bottomLoader\n}\n\nAsyncPickMarkup.prototype.appendSelectedList = function () {\n    this.popup.appendChild(this.buildDivider())\n    this.popup.appendChild(this.buildSelectedList())\n}\n\nAsyncPickMarkup.prototype.buildDivider = function () {\n    const divider = document.createElement('div')\n    divider.classList.add('ap__divider')\n    divider.innerHTML = this.dividerText\n    return divider\n}\n\nAsyncPickMarkup.prototype.buildSelectedList = function () {\n    const selected = document.createElement('div')\n    selected.classList.add('ap__selected-scroll-wrapper')\n    this.selectedList = buildUl(this.listClasses, null, 'list')\n    selected.appendChild(this.selectedList)\n    return selected\n}\n\nAsyncPickMarkup.prototype.renderSelectedList = function (selectedValues) {\n    let self = this\n\n    this.selectedList.innerHTML = ''\n    Object.keys(selectedValues).forEach(function (value) {\n        const li = buildLi({ value, ...selectedValues[value], role: 'listitem' })\n        self.selectedList.appendChild(li)\n    })\n}\n\nAsyncPickMarkup.prototype.appendEntries = function (newEntries, lowerPage, selectedValues, scrollTopOffset) {\n    const pageUl = buildUl(this.listClasses, lowerPage, 'presentation')\n    this.renderNewEntries(newEntries, pageUl, selectedValues)\n\n    const scrollableOffset = scrollTopOffset > 0 ? scrollTopOffset : this.resultsScrollWrapper.scrollTop\n\n    this.resultsWrapper.appendChild(pageUl)\n    this.resultsScrollWrapper.scrollTop = scrollableOffset\n    return pageUl\n}\n\nAsyncPickMarkup.prototype.prependEntries = function (newEntries, upperPage, selectedValues, scrollTopOffset) {\n    const pageUl = buildUl(this.listClasses, upperPage, 'presentation')\n    this.renderNewEntries(newEntries, pageUl, selectedValues)\n\n    const scrollableOffset = scrollTopOffset > 0 ? scrollTopOffset : this.resultsScrollWrapper.scrollTop\n\n    this.resultsWrapper.insertBefore(pageUl, this.resultsWrapper.firstChild)\n    this.resultsScrollWrapper.scrollTop = scrollableOffset + pageUl.offsetHeight\n    return pageUl\n}\n\nAsyncPickMarkup.prototype.renderNewEntries = function (newEntries, ul, selectedValues) {\n    let self = this\n    if (newEntries.length > 0) {\n        newEntries.forEach(function (element) {\n            const selected = !!selectedValues[element.value]\n            const li = buildLi({\n                ...element,\n                id: self.buildOptionId(),\n                selected,\n                addCheck: self.multiple,\n                checkedIconClasses: self.checkedIconClasses\n            })\n            ul.appendChild(li)\n        })\n    } else {\n        const li = buildLi({ text: this.noResultsText, role: 'presentation' })\n        li.classList.add('ap__results-list__item--muted')\n        ul.appendChild(li)\n    }\n}\n\nAsyncPickMarkup.prototype.renderSelectedOption = function (value, text) {\n    const option = document.createElement('option')\n    option.value = value\n    option.innerHTML = text\n    option.selected = true\n    option.setAttribute('data-selected', '')\n    return option\n}\n\nAsyncPickMarkup.prototype.removeSelectedOption = function (value) {\n    const self = this\n    Array.apply(null, this.element.options).filter(function (option) {\n        return option.value === value || option.value.toString() === value.toString()\n    }).forEach(function (option) {\n        self.element.removeChild(option)\n    })\n}\n\nAsyncPickMarkup.prototype.selectItem = function (value, optionData) {\n    const option = this.renderSelectedOption(value, optionData.text)\n    this.element.appendChild(option)\n    this.addSelectedClassByValue(value)\n    if (this.multiple) return this.addToSelectedList(value, optionData)\n}\n\nAsyncPickMarkup.prototype.deselectItem = function (value) {\n    this.removeSelectedOption(value)\n    this.removeSelectedClassByValue(value)\n    if (this.multiple) return this.removeFromSelectedList(value)\n}\n\nAsyncPickMarkup.prototype.addToSelectedList = function (value, optionData) {\n    const li = buildLi({ value, text: optionData.text, subtext: optionData.subtext, img: optionData.img, role: 'listitem' })\n    this.selectedList.appendChild(li)\n    return li\n}\n\nAsyncPickMarkup.prototype.removeFromSelectedList = function (value) {\n    const li = this.selectedList.querySelector('li.ap__results-list__item[data-value=\"' + value + '\"]')\n    if (li) this.selectedList.removeChild(li)\n    return li\n}\n\nAsyncPickMarkup.prototype.prependToPage = function (page, blankOptions, selectedValues) {\n    const ul = this.resultsWrapper.querySelector('ul[data-page=\"' + page + '\"]')\n    if (!ul) return\n\n    const self = this\n    Object.keys(blankOptions).forEach(function (value) {\n        const selected = !!selectedValues[value]\n        const li = buildLi({\n            value,\n            text: blankOptions[value],\n            id: self.buildOptionId(),\n            selected,\n            addCheck: self.multiple,\n            checkedIconClasses: self.checkedIconClasses\n        })\n        ul.insertBefore(li, ul.firstChild)\n    })\n}\n\nAsyncPickMarkup.prototype.removePage = function (page) {\n    const ul = this.resultsWrapper.querySelector('ul[data-page=\"' + page.toString() + '\"]')\n    if (ul) {\n        const owner = this.getActiveDescendantOwner()\n        const activeEntryId = owner && owner.getAttribute('aria-activedescendant')\n        const activeEntry = activeEntryId && document.getElementById(activeEntryId)\n        if (activeEntry && ul.contains(activeEntry)) this.setActiveEntry(null)\n        this.resultsWrapper.removeChild(ul)\n    }\n}\n\nAsyncPickMarkup.prototype.addSelectedClassByValue = function (value) {\n    const li = this.resultsWrapper.querySelector('li[data-value=\"' + value + '\"]')\n    if (li) setLiSelected(li, true, this.multiple, this.checkedIconClasses)\n}\n\nAsyncPickMarkup.prototype.removeSelectedClassByValue = function (value) {\n    const li = this.resultsWrapper.querySelector('li[data-value=\"' + value + '\"]')\n    if (li) setLiSelected(li, false, this.multiple, this.checkedIconClasses)\n}\n\nAsyncPickMarkup.prototype.destroy = function () {\n    clearTimeout(this.announceTimer)\n    this.showOriginalSelect()\n    if (!!this.container) {\n        const container = document.querySelector(this.container)\n        if (container) container.removeChild(this.popup)\n    }\n    if (this.element && this.element.parentNode) this.element.parentNode.removeChild(this.wrapper)\n}\n\nAsyncPickMarkup.prototype.clean = function () {\n    let self = this\n    this.setActiveEntry(null)\n    Array.apply(null, this.resultsWrapper.querySelectorAll('ul')).forEach(function (ul) {\n        self.resultsWrapper.removeChild(ul)\n    })\n}\n\nAsyncPickMarkup.prototype.scrollToTop = function () {\n    this.resultsScrollWrapper.scrollTop = 0\n}\n\nAsyncPickMarkup.prototype.getScrollTopWithoutPage = function (page) {\n    const ul = this.resultsWrapper.querySelector('ul[data-page=\"' + page.toString() + '\"]')\n    if (ul) {\n        return this.resultsScrollWrapper.scrollTop - ul.scrollHeight\n    } else {\n        return this.resultsScrollWrapper.scrollTop\n    }\n}\n\nAsyncPickMarkup.prototype.getSelected = function () {\n    return this.resultsWrapper.querySelectorAll('li.ap__results-list__item--selected')[0]\n}\n\nAsyncPickMarkup.prototype.buildOptionId = function () {\n    this.optionId++\n    return this.id + '__option_' + this.optionId\n}\n\nAsyncPickMarkup.prototype.setActiveEntry = function (entry) {\n    const owner = this.getActiveDescendantOwner()\n    if (!owner) return\n    if (entry) owner.setAttribute('aria-activedescendant', entry.id)\n    else owner.removeAttribute('aria-activedescendant')\n}\n\nAsyncPickMarkup.prototype.focusPreviousEntry = function () {\n    const selected = this.getSelected()\n    if (selected) {\n        const prev = selected.previousSibling || (selected.parentNode && selected.parentNode.previousSibling && selected.parentNode.previousSibling.lastChild)\n        if (prev) {\n            selected.classList.remove('ap__results-list__item--selected')\n            prev.classList.add('ap__results-list__item--selected')\n            this.setActiveEntry(prev)\n            this.scrollEntryIntoView(prev)\n        }\n    } else {\n        const first = this.resultsWrapper.querySelectorAll('li.ap__results-list__item[data-value]')[0]\n        if (!first) return\n        first.classList.add('ap__results-list__item--selected')\n        this.setActiveEntry(first)\n        this.scrollEntryIntoView(first)\n    }\n}\n\nAsyncPickMarkup.prototype.focusNextEntry = function () {\n    const selected = this.getSelected()\n    if (selected) {\n        const next = selected.nextSibling || (selected.parentNode && selected.parentNode.nextSibling && selected.parentNode.nextSibling.firstChild)\n        if (next) {\n            selected.classList.remove('ap__results-list__item--selected')\n            next.classList.add('ap__results-list__item--selected')\n            this.setActiveEntry(next)\n            this.scrollEntryIntoView(next)\n        }\n    } else {\n        const first = this.resultsWrapper.querySelectorAll('li.ap__results-list__item[data-value]')[0]\n        if (!first) return\n        first.classList.add('ap__results-list__item--selected')\n        this.setActiveEntry(first)\n        this.scrollEntryIntoView(first)\n    }\n}\n\nAsyncPickMarkup.prototype.scrollEntryIntoView = function (entry) {\n    const entryOffsetTop = entry.offsetTop - this.resultsScrollWrapper.offsetTop\n    const shouldScrollDown = this.resultsScrollWrapper.offsetHeight + this.resultsScrollWrapper.scrollTop < entryOffsetTop + entry.offsetHeight\n    const shouldScrollUp = entryOffsetTop < this.resultsScrollWrapper.scrollTop\n\n    if (shouldScrollDown) {\n        this.resultsScrollWrapper.scrollTop = entryOffsetTop - this.resultsScrollWrapper.offsetHeight + entry.offsetHeight\n    } else if (shouldScrollUp) {\n        this.resultsScrollWrapper.scrollTop = entryOffsetTop\n    }\n}\n\nAsyncPickMarkup.prototype.setButtonText = function (selectedValues) {\n    if (selectedValues && Object.keys(selectedValues).length > 0) {\n        this.buttonText.innerHTML = this.renderButtonText(selectedValues)\n    } else {\n        this.buttonText.innerHTML = this.emptySelectButtonText\n    }\n}\n\nAsyncPickMarkup.prototype.renderButtonText = function (selectedValues) {\n    if (this.multiple && this.selectedTextFormat) {\n        const match = this.selectedTextFormat.match(/count\\s?>\\s?([0-9]*)/)\n        const count = match && match[1] && parseInt(match[1])\n\n        if (count && count < Object.keys(selectedValues).length) {\n            return this.selectedText.replace(this.selectedTextVariable, Object.keys(selectedValues).length)\n        } else {\n            return joinSelectedTexts(selectedValues)\n        }\n    } else {\n        return joinSelectedTexts(selectedValues)\n    }\n}\n\nfunction joinSelectedTexts (selectedValues) {\n    let selected = []\n    Object.keys(selectedValues).forEach(function (value) {\n        selected.push(selectedValues[value].text)\n    })\n    return selected.join(', ')\n}\n\nfunction buildUl (additionalClasses, page, role) {\n    const pageUl = document.createElement('ul')\n    pageUl.classList.add('ap__results-list')\n    pageUl.setAttribute('role', role)\n    additionalClasses.forEach(function (listClass) {\n        pageUl.classList.add(listClass)\n    })\n    if (page) {\n        pageUl.setAttribute('data-page', page.toString())\n    }\n    return pageUl\n}\n\nfunction buildLi (options) {\n    const text = options.text\n    const value = options.value\n    const disabled = options.disabled\n    const subtext = options.subtext\n    const imgAttributes = options.img\n    const li = document.createElement('li')\n    const accessibleName = []\n\n    const textSpan = document.createElement('span')\n    textSpan.classList.add('ap__results-list__item__text')\n    textSpan.innerHTML = text\n\n    if (typeof options.id !== 'undefined') li.id = options.id\n    if (typeof value !== 'undefined' && value !== null) li.setAttribute('data-value', value)\n    if (typeof text !== 'undefined' && text !== null) {\n        li.setAttribute('title', textSpan.innerText)\n        li.setAttribute('data-text', text)\n        accessibleName.push(textSpan.textContent)\n    }\n    if (typeof disabled !== 'undefined' && disabled !== null) {\n        li.setAttribute('data-disabled', disabled)\n        if (disabled) li.classList.add('ap__results-list__item--disabled')\n    }\n    if (typeof subtext !== 'undefined' && subtext !== null) {\n        li.setAttribute('data-subtext', subtext)\n        const subtextDom = document.createElement('small')\n        subtextDom.innerHTML = subtext\n        subtextDom.classList.add('ap__results-list__item__subtext')\n        textSpan.appendChild(subtextDom)\n        accessibleName.push(subtextDom.textContent)\n    }\n\n    const role = options.role || (typeof value === 'undefined' ? 'listitem' : 'option')\n    li.setAttribute('role', role)\n    if (role === 'option') {\n        // plain text name with a separator, otherwise text and subtext are read as one word\n        if (accessibleName.length > 0) li.setAttribute('aria-label', accessibleName.join(', '))\n        li.setAttribute('aria-selected', options.selected ? 'true' : 'false')\n        if (li.classList.contains('ap__results-list__item--disabled')) li.setAttribute('aria-disabled', 'true')\n    }\n    li.classList.add('ap__results-list__item')\n\n    if (typeof imgAttributes !== 'undefined' && imgAttributes !== null) {\n        const imageTag = document.createElement('img')\n        Object.keys(imgAttributes).forEach(function (attr) {\n            imageTag.setAttribute(attr, imgAttributes[attr])\n        })\n        // to avoid duplicated text read for avatar images\n        imageTag.setAttribute('alt', '')\n\n        imageTag.classList.add('ap__results-list__item__image')\n        li.setAttribute('data-img', JSON.stringify(imgAttributes))\n        li.appendChild(imageTag)\n    }\n\n    li.appendChild(textSpan)\n    if (options.selected) {\n        setLiSelected(li, true, options.addCheck, options.checkedIconClasses)\n    }\n    return li\n}\n\nfunction setLiSelected (li, selected, addCheck, checkedIconClasses) {\n    if (li.getAttribute('role') === 'option') li.setAttribute('aria-selected', selected.toString())\n    if (selected) {\n        if (addCheck) {\n            const check = document.createElement('i')\n            checkedIconClasses.forEach(function (checkedIconClass) {\n                check.classList.add(checkedIconClass)\n            })\n            check.classList.add('ap__results-list__item__check-mark')\n            check.setAttribute('aria-hidden', 'true')\n            li.appendChild(check)\n        } else {\n            li.classList.add('ap__results-list__item--selected')\n        }\n    } else {\n        if (addCheck) {\n            const check = li.querySelector('.ap__results-list__item__check-mark')\n            if (check) li.removeChild(check)\n        } else {\n            li.classList.remove('ap__results-list__item--selected')\n        }\n    }\n}\n\nfunction getOffsetFromBoundingBox (box) {\n    const docElem = document.documentElement\n\n    return {\n        top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),\n        left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)\n    }\n}\n", "export default {\n    searchPlaceholder: 'Suchen',\n    emptySelectButtonText: 'Alle anzeigen',\n    noResultsText: 'Keine Ergebnisse gefunden',\n    selectedText: '%num% Eintr\u00E4ge ausgew\u00E4hlt',\n    dividerText: 'Ausgew\u00E4hlte Eintr\u00E4ge:',\n    itemSelectedText: '%item% ausgew\u00E4hlt',\n    itemDeselectedText: '%item% abgew\u00E4hlt'\n}\n", "export default {\n    searchPlaceholder: 'Search',\n    emptySelectButtonText: 'Show all',\n    noResultsText: 'No results found',\n    selectedText: '%num% selected',\n    dividerText: 'Selected entries:',\n    itemSelectedText: '%item% selected',\n    itemDeselectedText: '%item% deselected'\n}\n", "export default {\n    searchPlaceholder: 'Buscar',\n    emptySelectButtonText: 'Mostrar todos',\n    noResultsText: 'No se encontraron resultados',\n    selectedText: '%num% seleccionados',\n    dividerText: 'Entradas seleccionadas:',\n    itemSelectedText: '%item% seleccionado',\n    itemDeselectedText: '%item% deseleccionado'\n}\n", "export default {\n    searchPlaceholder: 'Rechercher',\n    emptySelectButtonText: 'afficher Tout',\n    noResultsText: 'Aucun r\u00E9sultat trouv\u00E9',\n    selectedText: '%num% s\u00E9lectionn\u00E9s',\n    dividerText: '\u00C9l\u00E9ments s\u00E9lectionn\u00E9s:',\n    itemSelectedText: '%item% s\u00E9lectionn\u00E9',\n    itemDeselectedText: '%item% d\u00E9s\u00E9lectionn\u00E9'\n}\n", "import AsyncPickMarkup from './async-pick/async-pick-markup'\nimport de from './async-pick/i18n/de'\nimport en from './async-pick/i18n/en'\nimport es from './async-pick/i18n/es'\nimport fr from './async-pick/i18n/fr'\n\n/**\n * AsyncPick\n * @param {Object}   options\n * @param {String}   options.id - id of the select to use\n * @param {String}   options.url - url to fetch data from\n * @param {String}  [options.language='en'] - set language. defaults to document language or 'en'\n * @param {String}  [options.searchParam='q'] - name of the query parameter for searching\n * @param {String}  [options.pageParam='_page'] - parameter to use for querying pages in the url\n * @param {String}  [options.perPageParam='_limit'] - parameter to use for setting page size in the url\n * @param {String}  [options.jsonKey=null] - name of the key where your nested json data lies under\n * @param {String}  [options.httpMethod='GET'] - http method to use for querying\n * @param {Number}  [options.maxPages=2] - number of pages to show simultaneously\n * @param {Number}  [options.perPage=50] - number of entries to show per page\n * @param {Number}  [options.paginateUpThreshold=20] - scroll percentage where to start loading the upper page\n * @param {Number}  [options.paginateDownThreshold=80] - scroll percentage where to start loading the lower page\n * @param {Number}  [options.searchTimeout=400] - timeout after the last keydown when to start searching\n * @param {String}  [options.searchPlaceholder='Search'] - placeholder for the search input\n * @param {Array}   [options.searchInputClasses=[]] - additional classes to add to the search input\n * @param {Boolean} [options.withSearch=true] - enable search functionality\n * @param {String}  [options.emptySelectButtonText=[]] - set the text of the select button before something is selected\n * @param {Array}   [options.buttonClasses=[]] - additional classes to add to the \"open\" button\n * @param {Array}   [options.buttonDisabledClasses=[]] - additional classes to add to the disabled button\n * @param {Array}   [options.buttonIconClasses=[]] - additional classes to add to \"open\" buttons icon\n * @param {Array}   [options.checkedIconClasses=[]] - additional classes to add to \"checked\" icon\n * @param {Array}   [options.listClasses=[]] - additional classes to add to each list built from loaded data\n * @param {String}  [options.selectedTextFormat=null] - set to 'count > X' where X is a number to show all texts if the\n *                                                      selected count is below X, otherwise show `selectedText`\n * @param {String}  [options.selectedTextVariable='%num%'] - set to some placeholder that is included in `selectedText`\n *                                                        that gets replaced by the actual count when displaying text\n * @param {String}  [options.selectedText=options.selectedTextVariable + 'selected'] - the actual text\n * @param {String}  [options.noResultsText='No results'] - text to display when api returns no results\n * @param {String}  [options.dividerText='Selected entries:'] - text to display inside of the divider in multiple\n * @param {Boolean} [options.resetOnClose=true] - choose to reset the content and reload when closing the popup\n * @param {String}  [options.container=null] - container to append the html to\n * @param {Boolean} [options.dropdownAlignRight=false] - set to true to align the dropdown on the right\n * @param {Boolean} [options.popupWidth='300px'] - set width for popup when container option is set\n * @param {Boolean} [options.multiple=false] - to enable multiple. alternatively set your select to multiple\n * @param {Boolean} [options.disabled=false] - to disabled the select. alternatively set your select to disabled\n * @param {Object}  [options.values] - hash with preselected values, overrides possible <option selected> elements.\n *                                    This is an alternative to adding actual <option selected> elements to the dom.\n *                                    Structure has to be {<value>: {text: <text>, disabled: <disabled>}}.\n *                                    Note that both <value> and <text> should be equal to the actual option values.\n * @param {String}  [options.itemSelectedText='%item% selected'] - screen reader announcement when an entry of a\n *                                                                  multiple select gets selected\n * @param {String}  [options.itemDeselectedText='%item% deselected'] - screen reader announcement when an entry of a\n *                                                                      multiple select gets deselected\n * @param {Boolean} [options.debug=false] - enable to log debug messages\n * @param {Function} [options.customDebugHandler=null] - additional function to call when debug messages are logged.\n *                                                       Receives the instance of async-pick as first arg.\n * @constructor\n */\nexport default function AsyncPick (options) {\n    this.id = options.id\n    this.label = document.querySelector('label[for=\"' + this.id + '\"]')\n    if (this.isInitialized()) AsyncPick.elements[this.id].destroy()\n\n    this.element = document.getElementById(this.id)\n    this.url = options.url.replace(/&amp;/g, '&')\n    this.language = options.language || document.documentElement.lang || 'en'\n    this.i18n = AsyncPick.i18n ? AsyncPick.i18n[this.language] : {}\n\n    this.searchParam = options.searchParam || 'q'\n    this.pageParam = options.pageParam || '_page'\n    this.perPageParam = options.perPageParam || '_limit'\n    this.jsonKey = options.jsonKey || null\n    this.httpMethod = options.httpMethod || 'GET'\n    this.maxPages = options.maxPages || 2\n    this.perPage = options.perPage || 50\n    this.paginateUpThreshold = options.paginateUpThreshold || 20\n    this.paginateDownThreshold = options.paginateDownThreshold || 80\n    this.searchTimeout = options.searchTimeout || 400\n    this.searchPlaceholder = options.searchPlaceholder || this.i18n.searchPlaceholder || 'Search'\n    this.searchInputClasses = options.searchInputClasses || []\n    this.withSearch = options.hasOwnProperty('withSearch') ? options.withSearch : true\n    this.buttonClasses = options.buttonClasses || []\n    this.emptySelectButtonText = options.emptySelectButtonText || this.i18n.emptySelectButtonText || 'Select'\n    this.buttonDisabledClasses = options.buttonDisabledClasses || []\n    this.buttonIconClasses = options.buttonIconClasses || ['fas', 'fa-fw', 'fa-caret-down']\n    this.checkedIconClasses = options.checkedIconClasses || ['fas', 'fa-fw', 'fa-check']\n    this.listClasses = options.listClasses || []\n    this.selectedTextFormat = options.selectedTextFormat || null\n    this.selectedTextVariable = options.selectedTextVariable || '%num%'\n    this.selectedText = options.selectedText || this.i18n.selectedText || this.selectedTextVariable + ' selected'\n    this.noResultsText = options.noResultsText || this.i18n.noResultsText || 'No results'\n    this.dividerText = options.dividerText || this.i18n.dividerText || 'Selected entries:'\n    this.resetOnClose = !!options.resetOnClose\n    this.container = options.container || null\n    this.dropdownAlignRight = !!options.dropdownAlignRight\n    this.popupWidth = options.popupWidth || '300px'\n    this.selectedValues = options.values || null\n    this.itemSelectedText = options.itemSelectedText || this.i18n.itemSelectedText || '%item% selected'\n    this.itemDeselectedText = options.itemDeselectedText || this.i18n.itemDeselectedText || '%item% deselected'\n    this.debug = options.debug || false\n    this.customDebugHandler = options.customDebugHandler || null\n\n    this.multiple = !!this.element.multiple || !!options.multiple\n    this.disabled = !!this.element.disabled || !!options.disabled\n    this.resetPageProps()\n    this.blankOption = {}\n    this.previousSearchValue = ''\n    this.open = false\n    this.originalInnerHTML = this.element.innerHTML\n\n    this.initialize()\n    this.logDebugMessage('initialized with options:', this)\n    return this\n}\nAsyncPick.i18n = { de, en, es, fr }\nAsyncPick.elements = {}\n\nAsyncPick.prototype.initialize = function () {\n    this.markup = this.buildMarkup()\n    if (!this.disabled) {\n        this.addHandlers()\n        this.addEvents()\n    }\n    this.setupSelectedValues()\n    this.setupBlankOption()\n    this.register()\n    if (!this.disabled) this.loadFirstPage()\n    this.markup.setButtonText(this.selectedValues)\n}\n\nAsyncPick.prototype.buildMarkup = function () {\n    return new AsyncPickMarkup({\n        element: this.element,\n        id: this.id,\n        label: this.label,\n        multiple: this.multiple,\n        disabled: this.disabled,\n        searchPlaceholder: this.searchPlaceholder,\n        searchInputClasses: this.searchInputClasses,\n        withSearch: this.withSearch,\n        buttonClasses: this.buttonClasses,\n        buttonDisabledClasses: this.buttonDisabledClasses,\n        emptySelectButtonText: this.emptySelectButtonText,\n        buttonIconClasses: this.buttonIconClasses,\n        checkedIconClasses: this.checkedIconClasses,\n        listClasses: this.listClasses,\n        selectedTextFormat: this.selectedTextFormat,\n        selectedTextVariable: this.selectedTextVariable,\n        selectedText: this.selectedText,\n        noResultsText: this.noResultsText,\n        dividerText: this.dividerText,\n        container: this.container,\n        dropdownAlignRight: this.dropdownAlignRight,\n        popupWidth: this.popupWidth\n    })\n}\n\nAsyncPick.prototype.addHandlers = function () {\n    this.togglePopupHandler = this.togglePopup.bind(this)\n    if (this.withSearch) this.searchHandler = this.search.bind(this)\n    this.onEntriesListScrollHandler = this.onEntriesListScroll.bind(this)\n    this.closePopupHandler = this.closePopup.bind(this)\n    this.selectHandler = this.select.bind(this)\n    this.stopPropagationHandler = function (e) {\n        e.stopPropagation()\n    }\n    this.buttonKeyHandler = this.onButtonKeyDown.bind(this)\n    this.markupKeyHandler = this.onMarkupKeyDown.bind(this)\n    this.labelClickHandler = function (e) {\n        e.preventDefault()\n        this.markup.button.focus()\n    }.bind(this)\n    this.containerPositionHandler = this.markup.positionPopup.bind(this.markup)\n    this.resetFormHandler = this.resetAndReload.bind(this)\n}\n\nAsyncPick.prototype.resetAndReload = function () {\n    this.logDebugMessage('form reset! reloading async-pick')\n    this.resetting = true\n    this.element.innerHTML = this.originalInnerHTML\n    this.reload()\n}\n\nAsyncPick.prototype.onButtonKeyDown = function (e) {\n    if (e.keyCode === 13) { // enter\n        e.preventDefault()\n        // without search the button also navigates the list, so enter selects the active entry instead\n        if (!this.withSearch && this.open && this.markup.getSelected()) return\n        this.togglePopup(e)\n    }\n}\n\nAsyncPick.prototype.onMarkupKeyDown = function (e) {\n    if (e.keyCode === 9 || e.keyCode === 27) { // tab || esc\n        this.closePopupAndFocus()\n    } else if (e.keyCode === 40 || e.keyCode === 38) { // arrow down || arrow up\n        e.preventDefault()\n        if (!this.open) {\n            this.openPopup()\n        } else if (e.keyCode === 40) {\n            this.markup.focusNextEntry()\n        } else {\n            this.markup.focusPreviousEntry()\n        }\n    } else if (e.keyCode === 13) { // enter\n        e.preventDefault()\n        const li = this.markup.getSelected()\n        if (li && !li.classList.contains('ap__results-list__item--disabled')) this.select({ currentTarget: li })\n    }\n}\n\nAsyncPick.prototype.addEvents = function () {\n    this.markup.button.addEventListener('click', this.togglePopupHandler)\n    if (this.withSearch) this.markup.searchInput.addEventListener('input', this.searchHandler)\n    this.markup.resultsScrollWrapper.addEventListener('scroll', this.onEntriesListScrollHandler)\n    this.markup.popup.addEventListener('click', this.stopPropagationHandler)\n    this.markup.button.addEventListener('keydown', this.buttonKeyHandler)\n    if (this.withSearch) {\n        this.markup.popup.addEventListener('keydown', this.markupKeyHandler)\n    } else {\n        this.markup.button.addEventListener('keydown', this.markupKeyHandler)\n    }\n    document.addEventListener('click', this.closePopupHandler)\n    window.addEventListener('resize', this.containerPositionHandler)\n    window.addEventListener('scroll', this.containerPositionHandler)\n    if (this.label) this.label.addEventListener('click', this.labelClickHandler)\n    if (this.element.form) this.element.form.addEventListener('reset', this.resetFormHandler)\n    let self = this\n    onDomRemove(this.markup.element, function () {\n        self.destroy()\n    })\n}\n\nAsyncPick.prototype.removeEvents = function () {\n    let self = this\n    this.markup.button.removeEventListener('click', this.togglePopupHandler)\n    if (this.withSearch) this.markup.searchInput.removeEventListener('input', this.searchHandler)\n    this.markup.resultsScrollWrapper.removeEventListener('scroll', this.onEntriesListScrollHandler)\n    Array.apply(null, this.markup.resultsWrapper.querySelectorAll('li')).forEach(function (li) {\n        li.removeEventListener('click', self.selectHandler)\n    })\n    if (this.multiple) Array.apply(null, this.markup.selectedList.querySelectorAll('li')).forEach(function (li) {\n        li.removeEventListener('click', self.selectHandler)\n    })\n    this.markup.popup.removeEventListener('click', this.stopPropagationHandler)\n    this.markup.button.removeEventListener('keydown', this.buttonKeyHandler)\n    this.markup.popup.removeEventListener('keydown', this.markupKeyHandler)\n    document.removeEventListener('click', this.closePopupHandler)\n    window.removeEventListener('resize', this.containerPositionHandler)\n    window.removeEventListener('scroll', this.containerPositionHandler)\n    if (this.label) this.label.removeEventListener('click', this.labelClickHandler)\n    if (this.element.form) this.element.form.removeEventListener('reset', this.resetFormHandler)\n}\n\nAsyncPick.prototype.setupSelectedValues = function () {\n    if (!this.selectedValues) {\n        this.selectedValues = {}\n        let self = this\n        Array.apply(null, this.element.options).filter(function (option) {\n            return option.selected\n        }).forEach(function (option) {\n            self.selectedValues[option.value] = {\n                text: option.innerHTML,\n                subtext: option.getAttribute('data-subtext'),\n                disabled: option.disabled,\n                img: JSON.parse(option.getAttribute('data-img'))\n            }\n        })\n    }\n}\n\nAsyncPick.prototype.setupBlankOption = function () {\n    let blank = Array.apply(null, this.element.options).filter(function (option) {\n        return option.value === ''\n    })[0]\n    if (!!blank) this.blankOption[''] = blank.innerHTML\n}\n\nAsyncPick.prototype.loadFirstPage = function () {\n    if (!this.loaded) this.paginateDown(this.afterFirstPageLoad)\n}\n\nAsyncPick.prototype.togglePopup = function () {\n    this.open ? this.closePopupAndFocus() : this.openPopup()\n}\n\nAsyncPick.prototype.search = function () {\n    if (!this.withSearch) return\n    if (this.searchInputTimer) clearTimeout(this.searchInputTimer)\n\n    let inputValue = this.markup.searchInput.value\n    if (this.shouldSearch(inputValue)) {\n        let self = this\n        self.previousSearchValue = inputValue\n        this.searchInputTimer = setTimeout(function () {\n            self.resetPages()\n            self.searchQuery = self.markup.searchInput.value\n            self.paginateDown()\n        }, self.searchTimeout)\n    }\n}\n\nAsyncPick.prototype.openPopup = function () {\n    this.markup.popup.classList.add('ap__popup--visible')\n    this.open = true\n    this.markup.open = true\n    this.markup.setExpanded(true)\n    this.markup.positionPopup()\n    if (this.withSearch) this.markup.searchInput.focus()\n    if (this.resetOnClose) this.markup.scrollToTop()\n}\n\nAsyncPick.prototype.closePopupAndFocus = function (e) {\n    this.closePopup(e)\n    this.markup.button.focus()\n}\n\nAsyncPick.prototype.closePopup = function (e) {\n    let clickedButton = e && (e.target === this.markup.button || e.target.parentElement === this.markup.button)\n    if (this.open && !clickedButton) {\n        this.markup.popup.classList.remove('ap__popup--visible')\n        this.open = false\n        this.markup.open = false\n        this.markup.setExpanded(false)\n        this.markup.setActiveEntry(null)\n        if (!this.resetting && this.resetOnClose) this.resetPagesAndSearch()\n    }\n}\n\nAsyncPick.prototype.onEntriesListScroll = function () {\n    const percentage = getScrollPercent(this.markup.resultsScrollWrapper)\n    if (this.shouldPaginateUp(percentage)) {\n        this.paginateUp()\n    } else if (this.shouldPaginateDown(percentage)) {\n        this.paginateDown()\n    }\n}\n\nAsyncPick.prototype.buildUrl = function (page) {\n    if (this.url.indexOf('?') > -1) {\n        return this.url + '&' + this.getDefaultUrlParams(page)\n    } else {\n        return this.url + '?' + this.getDefaultUrlParams(page)\n    }\n}\n\nAsyncPick.prototype.paginateUp = function () {\n    this.beforePaginateUp()\n    const url = this.buildUrl(this.upperPage)\n    request(this.httpMethod, url, this.afterPaginateUp, this)\n}\n\nAsyncPick.prototype.beforePaginateUp = function () {\n    this.paginating = true\n    this.paginatingUp = true\n    if (this.upperPage > 1) this.upperPage--\n    this.markup.topLoader.style.display = 'block'\n}\n\nAsyncPick.prototype.handleXhrResponse = function (xhr) {\n    if (responseSuccess(xhr)) {\n        try {\n            const parsedJson = JSON.parse(xhr.responseText)\n            return getObjectKey(parsedJson, this.jsonKey)\n        } catch (e) {\n            console.error('AsyncPick could not parse json! Please make sure that your server returns the correct response. Got the following:')\n            console.error(xhr.responseText)\n            return []\n        }\n    } else {\n        console.error('AsyncPick did not get a valid server response. xhr:')\n        console.error(xhr)\n        return []\n    }\n}\n\nAsyncPick.prototype.afterPaginateUp = function (xhr, self) {\n    let json = self.handleXhrResponse(xhr)\n\n    let scrollTop = 0\n    if (self.pageCount < self.maxPages) {\n        self.pageCount++\n    } else {\n        self.endReached = false\n        scrollTop = self.markup.getScrollTopWithoutPage(self.lowerPage)\n        self.markup.removePage(self.lowerPage)\n        self.lowerPage--\n    }\n\n    if (self.upperPage === 1) self.topReached = true\n    const pageUl = self.markup.prependEntries(json, self.upperPage, self.selectedValues, scrollTop)\n    if (!self.searchQueryPresent() && self.upperPage === 1 && Object.keys(self.blankOption).length > 0) {\n        self.markup.prependToPage(self.upperPage, self.blankOption, self.selectedValues)\n    }\n    self.addEventListenersForPage(pageUl)\n    self.paginatingUp = false\n    self.paginating = false\n    self.markup.topLoader.style.display = 'none'\n    self.logDebugMessage('Paginating up finished')\n}\n\nAsyncPick.prototype.paginateDown = function (callback) {\n    this.beforePaginateDown()\n    const url = this.buildUrl(this.lowerPage)\n    request(this.httpMethod, url, callback || this.afterPaginateDown, this)\n}\n\nAsyncPick.prototype.beforePaginateDown = function () {\n    this.paginating = true\n    this.paginatingDown = true\n    this.lowerPage++\n    this.markup.bottomLoader.style.display = 'block'\n}\n\nAsyncPick.prototype.afterFirstPageLoad = function (xhr, self) {\n    self.afterPaginateDown(xhr, self)\n    self.loaded = true\n    self.markup.enableButton()\n    if (self.multiple) {\n        self.markup.appendSelectedList()\n        self.markup.renderSelectedList(self.selectedValues)\n        Array.apply(null, self.markup.selectedList.querySelectorAll('li')).forEach(function (li) {\n            li.addEventListener('click', self.selectHandler)\n        })\n    }\n}\n\nAsyncPick.prototype.afterPaginateDown = function (xhr, self) {\n    let json = self.handleXhrResponse(xhr)\n\n    let scrollTop = 0\n    if (self.pageCount < self.maxPages) {\n        self.pageCount++\n    } else {\n        self.topReached = false\n        scrollTop = self.markup.getScrollTopWithoutPage(self.upperPage)\n        self.markup.removePage(self.upperPage)\n        self.upperPage++\n    }\n    if (json.length < self.perPage) self.endReached = true\n    const pageUl = self.markup.appendEntries(json, self.lowerPage, self.selectedValues, scrollTop)\n    if (!self.searchQueryPresent() && self.lowerPage === 1 && Object.keys(self.blankOption).length > 0) {\n        self.markup.prependToPage(self.lowerPage, self.blankOption, self.selectedValues)\n    }\n    self.addEventListenersForPage(pageUl)\n    self.paginatingDown = false\n    self.paginating = false\n    self.markup.bottomLoader.style.display = 'none'\n    self.logDebugMessage('Paginating down finished')\n}\n\nAsyncPick.prototype.addEventListenersForPage = function (pageUl) {\n    let self = this\n    Array.apply(null, pageUl.querySelectorAll('li.ap__results-list__item[data-value]:not(.ap__results-list__item--disabled)')).forEach(function (li) {\n        li.addEventListener('click', self.selectHandler)\n    })\n}\n\nAsyncPick.prototype.resetPageProps = function () {\n    this.pageCount = 0\n    this.upperPage = 1\n    this.lowerPage = 0\n    this.topReached = true\n    this.endReached = false\n    this.paginatingUp = false\n    this.paginatingDown = false\n    this.paginating = false\n    this.loaded = false\n    this.searchInputTimer = null\n}\n\nAsyncPick.prototype.shouldPaginateUp = function (percentage) {\n    return !this.paginating && !this.paginatingUp && !this.topReached && percentage <= this.paginateUpThreshold\n}\n\nAsyncPick.prototype.shouldPaginateDown = function (percentage) {\n    return !this.paginating && !this.paginatingDown && !this.endReached && percentage >= this.paginateDownThreshold\n}\n\nAsyncPick.prototype.shouldSearch = function (newValue) {\n    return this.withSearch && this.previousSearchValue !== newValue\n}\n\nAsyncPick.prototype.select = function (e) {\n    const li = e.currentTarget\n    const value = li.getAttribute('data-value')\n    const optionData = {\n        text: li.getAttribute('data-text'),\n        subtext: li.getAttribute('data-subtext'),\n        disabled: li.getAttribute('data-disabled'),\n        img: JSON.parse(li.getAttribute('data-img'))\n    }\n\n    if (this.multiple) {\n        this.toggleSelectedValue(value, optionData)\n        // a single select announces the new value itself, when the focus returns to the button\n        const message = this.selectedValues[value] ? this.itemSelectedText : this.itemDeselectedText\n        this.markup.announce(message.replace('%item%', li.getAttribute('title') || optionData.text))\n    } else {\n        this.setSelectedValue(value, optionData)\n    }\n    this.markup.setButtonText(this.selectedValues)\n    if (!this.multiple) this.closePopupAndFocus()\n    this.triggerChange()\n}\n\nAsyncPick.prototype.triggerChange = function () {\n    let event = new CustomEvent('Event', { detail: this.selectedValues })\n    event.initEvent('change', true, true)\n    this.element.dispatchEvent(event)\n}\n\nAsyncPick.prototype.toggleSelectedValue = function (value, optionData) {\n    if (this.selectedValues[value]) {\n        this.removeSelectedValue(value)\n    } else {\n        this.addSelectedValue(value, optionData)\n    }\n}\n\nAsyncPick.prototype.addSelectedValue = function (value, optionData) {\n    this.selectedValues[value] = optionData\n    const newLi = this.markup.selectItem(value, optionData)\n    if (newLi) newLi.addEventListener('click', this.selectHandler)\n    if (this.withSearch) this.markup.searchInput.focus()\n    this.logDebugMessage('Value added:', optionData)\n}\n\nAsyncPick.prototype.removeSelectedValue = function (value) {\n    delete this.selectedValues[value]\n    const removedLi = this.markup.deselectItem(value)\n    if (removedLi) removedLi.removeEventListener('click', this.selectHandler)\n    this.logDebugMessage('Value removed:', value)\n}\n\nAsyncPick.prototype.setSelectedValue = function (value, optionData) {\n    this.removeSelectedValue(Object.keys(this.selectedValues)[0])\n    this.element.innerHTML = '' // remove all remaining options that might have been added initially\n    this.addSelectedValue(value, optionData)\n    this.logDebugMessage('Value set:', optionData)\n}\n\nAsyncPick.prototype.logDebugMessage = function (msg, someObject) {\n    if (this.debug) {\n        if (msg) console.log('AsyncPick#' + this.id, msg)\n        if (someObject) console.log(someObject)\n        if (typeof this.customDebugHandler === 'function') this.customDebugHandler(this)\n    }\n}\n\nAsyncPick.prototype.getDefaultUrlParams = function (page) {\n    let params = {}\n    params[this.perPageParam] = this.perPage\n    params[this.pageParam] = page\n    if (this.searchQueryPresent()) params[this.searchParam] = this.searchQuery\n    return objectToUrlParam(params)\n}\n\nAsyncPick.prototype.searchQueryPresent = function () {\n    if (!this.withSearch) return false\n    const query = this.markup.searchInput.value\n    return typeof query !== 'undefined' && query.trim().length > 0\n}\n\nAsyncPick.prototype.register = function () {\n    AsyncPick.elements[this.id] = this\n}\n\nAsyncPick.prototype.isInitialized = function () {\n    if (typeof window.AsyncPick === 'undefined') {\n        return false\n    } else {\n        return !!AsyncPick.elements[this.id]\n    }\n}\n\nAsyncPick.prototype.resetPages = function () {\n    this.markup.clean()\n    this.resetPageProps()\n}\n\nAsyncPick.prototype.resetPagesAndSearch = function () {\n    if (this.withSearch) this.markup.searchInput.value = ''\n    this.resetPages()\n    this.paginateDown()\n}\n\nAsyncPick.prototype.destroy = function () {\n    if (!this.disabled) this.removeEvents()\n    if (this.markup) this.markup.destroy()\n    this.selectedValues = {}\n    delete this.markup\n    delete AsyncPick.elements[this.id]\n    this.element.classList.remove('visually-hidden')\n}\n\nAsyncPick.prototype.reload = function () {\n    this.destroy()\n    this.resetPageProps()\n    this.multiple = !!this.element.multiple\n    this.disabled = !!this.element.disabled\n    this.selectedValues = null\n    this.initialize()\n}\n\n/**\n * Helpers\n */\n\nfunction getScrollPercent (element) {\n    return (element.scrollTop / (element.scrollHeight - element.clientHeight) * 100)\n}\n\nfunction objectToUrlParam (object) {\n    let params = []\n    Object.keys(object).forEach(function (key) {\n        params.push(key + '=' + encodeURIComponent(object[key]))\n    })\n    return params.join('&')\n}\n\nfunction request (method, url, handler, context) {\n    let xhr = new XMLHttpRequest()\n    xhr.addEventListener('load', function () {\n        handler(this, context)\n    })\n    xhr.open(method, url)\n    xhr.setRequestHeader('Accept', 'application/json')\n    xhr.send()\n}\n\nfunction getObjectKey (object, key) {\n    if (!key) return object\n    return object[key]\n}\n\nfunction responseSuccess (xhr) {\n    return xhr.readyState === 4 && xhr.status.toString().match(/2\\d\\d/)\n}\n\nfunction onDomRemove (element, onDetachCallback) {\n    const observer = new MutationObserver(function () {\n        function isDetached (el) {\n            if (el.parentNode === document) {\n                return false\n            } else if (el.parentNode === null) {\n                return true\n            } else {\n                return isDetached(el.parentNode)\n            }\n        }\n\n        if (isDetached(element)) {\n            observer.disconnect()\n            onDetachCallback()\n        }\n    })\n\n    observer.observe(document, {\n        childList: true,\n        subtree: true\n    })\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nimport AsyncPick from 'async-pick'\n\nexport default class extends Controller {\n    static values = {\n        urlOption: String,\n        emptySelectButtonTextOption: String,\n        containerOption: String,\n        searchParamOption: String,\n        jsonKeyOption: String,\n        dropdownAlignRightOption: Boolean,\n        selectedTextFormatOption: String,\n        resetOnCloseOption: Boolean,\n        withSearchOption: Boolean\n    }\n\n    reconnect() {\n        this._async_pick.destroy()\n        this.load()\n    }\n\n    connect() {\n        this.load()\n        this.element['asyncPick'] = {\n            reconnect: this.reconnect.bind(this),\n            values: this._async_pick.selectedValues\n        }\n    }\n\n    load() {\n        let options = this.options\n        Object.keys(options).forEach(function (key) {\n            if (options[key] === \"\") delete options[key]\n        })\n\n        const elementId = this.element.getAttribute('id')\n        this._async_pick = new AsyncPick(Object.assign({}, this.defaultOptions, {id: elementId}, options))\n    }\n\n    get options() {\n        return {\n            emptySelectButtonText: this.emptySelectButtonTextOptionValue,\n            url: this.urlOptionValue,\n            container: this.containerOptionValue,\n            searchParam: this.searchParamOptionValue,\n            jsonKey: this.jsonKeyOptionValue,\n            dropdownAlignRight: this.hasDropdownAlignRightOptionValue ? this.dropdownAlignRightOptionValue : \"\",\n            selectedTextFormat: this.selectedTextFormatOptionValue,\n            resetOnClose: this.hasResetOnCloseOptionValue ? this.resetOnCloseOptionValue : \"\",\n            withSearch: this.hasWithSearchOptionValue ? this.withSearchOptionValue : true\n        }\n    }\n\n    get defaultOptions() {\n        return {\n            language: document.documentElement.lang,\n            pageParam: 'page',\n            perPageParam: 'per_page',\n            jsonKey: 'data',\n            searchParam: 'q[username_or_email_or_full_name_or_full_name_reverse_cont_any]',\n            httpMethod: 'GET',\n            maxPages: 2,\n            perPage: 50,\n            paginateUpThreshold: 10,\n            paginateDownThreshold: 90,\n            searchTimeout: 400,\n            searchInputClasses: ['form-control'],\n            withSearch: true,\n            buttonClasses: ['form-select'],\n            buttonDisabledClasses: ['btn-disabled'],\n            buttonIconClasses: [],\n            checkedIconClasses: ['fas', 'fa-fw', 'fa-check'],\n            listClasses: [],\n            selectedTextFormat: 'count>3',\n            selectedTextVariable: '%num%',\n            resetOnClose: true,\n            container: false,\n            dropdownAlignRight: false,\n            popupWidth: '300px',\n            values: null\n        }\n    }\n}\n", "export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n  // IE 11 has no ShadowRoot\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "export default function getUAString() {\n  var uaData = navigator.userAgentData;\n\n  if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n    return uaData.brands.map(function (item) {\n      return item.brand + \"/\" + item.version;\n    }).join(' ');\n  }\n\n  return navigator.userAgent;\n}", "import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n  return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}", "import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n\n  var clientRect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n\n  if (includeScale && isHTMLElement(element)) {\n    scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n    scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n  }\n\n  var _ref = isElement(element) ? getWindow(element) : window,\n      visualViewport = _ref.visualViewport;\n\n  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n  var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n  var width = clientRect.width / scaleX;\n  var height = clientRect.height / scaleY;\n  return {\n    width: width,\n    height: height,\n    top: y,\n    right: x + width,\n    bottom: y + height,\n    left: x,\n    x: x,\n    y: y\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n  // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: width,\n    height: height\n  };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ( // DOM Element detected\n    isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var isFirefox = /firefox/i.test(getUAString());\n  var isIE = /Trident/i.test(getUAString());\n\n  if (isIE && isHTMLElement(element)) {\n    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n    var elementCss = getComputedStyle(element);\n\n    if (elementCss.position === 'fixed') {\n      return null;\n    }\n  }\n\n  var currentNode = getParentNode(element);\n\n  if (isShadowRoot(currentNode)) {\n    currentNode = currentNode.host;\n  }\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n  return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n  var v = within(min, value, max);\n  return v > max ? max : v;\n}", "export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name,\n      options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};", "export default function getVariation(placement) {\n  return placement.split('-')[1];\n}", "import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n  var x = _ref.x,\n      y = _ref.y;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      variation = _ref2.variation,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets,\n      isFixed = _ref2.isFixed;\n  var _offsets$x = offsets.x,\n      x = _offsets$x === void 0 ? 0 : _offsets$x,\n      _offsets$y = offsets.y,\n      y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref3.x;\n  y = _ref3.y;\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n    var heightProp = 'clientHeight';\n    var widthProp = 'clientWidth';\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n\n      if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n        heightProp = 'scrollHeight';\n        widthProp = 'scrollWidth';\n      }\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n    offsetParent = offsetParent;\n\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n      offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n      offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n    x: x,\n    y: y\n  }, getWindow(popper)) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref4.x;\n  y = _ref4.y;\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n  var state = _ref5.state,\n      options = _ref5.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration,\n    isFixed: state.options.strategy === 'fixed'\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};", "var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}", "var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    var layoutViewport = isLayoutViewport();\n\n    if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var _element$ownerDocumen;\n\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  var _element$ownerDocumen;\n\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n  var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}", "import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$strategy = _options.strategy,\n      strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases \u2013 research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};", "export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = offset + overflow[mainSide];\n    var max = offset - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _len = altAxis === 'y' ? 'height' : 'width';\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};", "export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}", "export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}", "export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions, state.options, options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        });\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update \u2013 it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update \u2013 it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref) {\n        var name = _ref.name,\n            _ref$options = _ref.options,\n            options = _ref$options === void 0 ? {} : _ref$options,\n            effect = _ref.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n  set(element, key, instance) {\n    if (!elementMap.has(element)) {\n      elementMap.set(element, new Map())\n    }\n\n    const instanceMap = elementMap.get(element)\n\n    // make it clear we only want one instance per element\n    // can be removed later when multiple key/instances are fine to be used\n    if (!instanceMap.has(key) && instanceMap.size !== 0) {\n      // eslint-disable-next-line no-console\n      console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n      return\n    }\n\n    instanceMap.set(key, instance)\n  },\n\n  get(element, key) {\n    if (elementMap.has(element)) {\n      return elementMap.get(element).get(key) || null\n    }\n\n    return null\n  },\n\n  remove(element, key) {\n    if (!elementMap.has(element)) {\n      return\n    }\n\n    const instanceMap = elementMap.get(element)\n\n    instanceMap.delete(key)\n\n    // free up element references if there are no instances left for an element\n    if (instanceMap.size === 0) {\n      elementMap.delete(element)\n    }\n  }\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1_000_000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n/**\n * Properly escape IDs selectors to handle weird IDs\n * @param {string} selector\n * @returns {string}\n */\nconst parseSelector = selector => {\n  if (selector && window.CSS && window.CSS.escape) {\n    // document.querySelector needs escaping to handle IDs (html5+) containing for instance /\n    selector = selector.replace(/#([^\\s\"#']+)/g, (match, id) => `#${CSS.escape(id)}`)\n  }\n\n  return selector\n}\n\n// Shout-out Angus Croll (https://goo.gl/pxwQGp)\nconst toType = object => {\n  if (object === null || object === undefined) {\n    return `${object}`\n  }\n\n  return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * Public Util API\n */\n\nconst getUID = prefix => {\n  do {\n    prefix += Math.floor(Math.random() * MAX_UID)\n  } while (document.getElementById(prefix))\n\n  return prefix\n}\n\nconst getTransitionDurationFromElement = element => {\n  if (!element) {\n    return 0\n  }\n\n  // Get transition-duration of the element\n  let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n  const floatTransitionDuration = Number.parseFloat(transitionDuration)\n  const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n  // Return 0 if element or transition duration is not found\n  if (!floatTransitionDuration && !floatTransitionDelay) {\n    return 0\n  }\n\n  // If multiple durations are defined, take the first\n  transitionDuration = transitionDuration.split(',')[0]\n  transitionDelay = transitionDelay.split(',')[0]\n\n  return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n  element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = object => {\n  if (!object || typeof object !== 'object') {\n    return false\n  }\n\n  if (typeof object.jquery !== 'undefined') {\n    object = object[0]\n  }\n\n  return typeof object.nodeType !== 'undefined'\n}\n\nconst getElement = object => {\n  // it's a jQuery object or a node element\n  if (isElement(object)) {\n    return object.jquery ? object[0] : object\n  }\n\n  if (typeof object === 'string' && object.length > 0) {\n    return document.querySelector(parseSelector(object))\n  }\n\n  return null\n}\n\nconst isVisible = element => {\n  if (!isElement(element) || element.getClientRects().length === 0) {\n    return false\n  }\n\n  const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'\n  // Handle `details` element as its content may falsie appear visible when it is closed\n  const closedDetails = element.closest('details:not([open])')\n\n  if (!closedDetails) {\n    return elementIsVisible\n  }\n\n  if (closedDetails !== element) {\n    const summary = element.closest('summary')\n    if (summary && summary.parentNode !== closedDetails) {\n      return false\n    }\n\n    if (summary === null) {\n      return false\n    }\n  }\n\n  return elementIsVisible\n}\n\nconst isDisabled = element => {\n  if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n    return true\n  }\n\n  if (element.classList.contains('disabled')) {\n    return true\n  }\n\n  if (typeof element.disabled !== 'undefined') {\n    return element.disabled\n  }\n\n  return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n  if (!document.documentElement.attachShadow) {\n    return null\n  }\n\n  // Can find the shadow root otherwise it'll return the document\n  if (typeof element.getRootNode === 'function') {\n    const root = element.getRootNode()\n    return root instanceof ShadowRoot ? root : null\n  }\n\n  if (element instanceof ShadowRoot) {\n    return element\n  }\n\n  // when we don't find a shadow root\n  if (!element.parentNode) {\n    return null\n  }\n\n  return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\n/**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\nconst reflow = element => {\n  element.offsetHeight // eslint-disable-line no-unused-expressions\n}\n\nconst getjQuery = () => {\n  if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n    return window.jQuery\n  }\n\n  return null\n}\n\nconst DOMContentLoadedCallbacks = []\n\nconst onDOMContentLoaded = callback => {\n  if (document.readyState === 'loading') {\n    // add listener on the first call when the document is in loading state\n    if (!DOMContentLoadedCallbacks.length) {\n      document.addEventListener('DOMContentLoaded', () => {\n        for (const callback of DOMContentLoadedCallbacks) {\n          callback()\n        }\n      })\n    }\n\n    DOMContentLoadedCallbacks.push(callback)\n  } else {\n    callback()\n  }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n  onDOMContentLoaded(() => {\n    const $ = getjQuery()\n    /* istanbul ignore if */\n    if ($) {\n      const name = plugin.NAME\n      const JQUERY_NO_CONFLICT = $.fn[name]\n      $.fn[name] = plugin.jQueryInterface\n      $.fn[name].Constructor = plugin\n      $.fn[name].noConflict = () => {\n        $.fn[name] = JQUERY_NO_CONFLICT\n        return plugin.jQueryInterface\n      }\n    }\n  })\n}\n\nconst execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {\n  return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue\n}\n\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n  if (!waitForTransition) {\n    execute(callback)\n    return\n  }\n\n  const durationPadding = 5\n  const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding\n\n  let called = false\n\n  const handler = ({ target }) => {\n    if (target !== transitionElement) {\n      return\n    }\n\n    called = true\n    transitionElement.removeEventListener(TRANSITION_END, handler)\n    execute(callback)\n  }\n\n  transitionElement.addEventListener(TRANSITION_END, handler)\n  setTimeout(() => {\n    if (!called) {\n      triggerTransitionEnd(transitionElement)\n    }\n  }, emulatedDuration)\n}\n\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list    The list of elements\n * @param activeElement   The active element\n * @param shouldGetNext   Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n  const listLength = list.length\n  let index = list.indexOf(activeElement)\n\n  // if the element does not exist in the list return an element\n  // depending on the direction and if cycle is allowed\n  if (index === -1) {\n    return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0]\n  }\n\n  index += shouldGetNext ? 1 : -1\n\n  if (isCycleAllowed) {\n    index = (index + listLength) % listLength\n  }\n\n  return list[Math.max(0, Math.min(index, listLength - 1))]\n}\n\nexport {\n  defineJQueryPlugin,\n  execute,\n  executeAfterTransition,\n  findShadowRoot,\n  getElement,\n  getjQuery,\n  getNextActiveElement,\n  getTransitionDurationFromElement,\n  getUID,\n  isDisabled,\n  isElement,\n  isRTL,\n  isVisible,\n  noop,\n  onDOMContentLoaded,\n  parseSelector,\n  reflow,\n  triggerTransitionEnd,\n  toType\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index.js'\n\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n  mouseenter: 'mouseover',\n  mouseleave: 'mouseout'\n}\n\nconst nativeEvents = new Set([\n  'click',\n  'dblclick',\n  'mouseup',\n  'mousedown',\n  'contextmenu',\n  'mousewheel',\n  'DOMMouseScroll',\n  'mouseover',\n  'mouseout',\n  'mousemove',\n  'selectstart',\n  'selectend',\n  'keydown',\n  'keypress',\n  'keyup',\n  'orientationchange',\n  'touchstart',\n  'touchmove',\n  'touchend',\n  'touchcancel',\n  'pointerdown',\n  'pointermove',\n  'pointerup',\n  'pointerleave',\n  'pointercancel',\n  'gesturestart',\n  'gesturechange',\n  'gestureend',\n  'focus',\n  'blur',\n  'change',\n  'reset',\n  'select',\n  'submit',\n  'focusin',\n  'focusout',\n  'load',\n  'unload',\n  'beforeunload',\n  'resize',\n  'move',\n  'DOMContentLoaded',\n  'readystatechange',\n  'error',\n  'abort',\n  'scroll'\n])\n\n/**\n * Private methods\n */\n\nfunction makeEventUid(element, uid) {\n  return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getElementEvents(element) {\n  const uid = makeEventUid(element)\n\n  element.uidEvent = uid\n  eventRegistry[uid] = eventRegistry[uid] || {}\n\n  return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n  return function handler(event) {\n    hydrateObj(event, { delegateTarget: element })\n\n    if (handler.oneOff) {\n      EventHandler.off(element, event.type, fn)\n    }\n\n    return fn.apply(element, [event])\n  }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n  return function handler(event) {\n    const domElements = element.querySelectorAll(selector)\n\n    for (let { target } = event; target && target !== this; target = target.parentNode) {\n      for (const domElement of domElements) {\n        if (domElement !== target) {\n          continue\n        }\n\n        hydrateObj(event, { delegateTarget: target })\n\n        if (handler.oneOff) {\n          EventHandler.off(element, event.type, selector, fn)\n        }\n\n        return fn.apply(target, [event])\n      }\n    }\n  }\n}\n\nfunction findHandler(events, callable, delegationSelector = null) {\n  return Object.values(events)\n    .find(event => event.callable === callable && event.delegationSelector === delegationSelector)\n}\n\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n  const isDelegated = typeof handler === 'string'\n  // TODO: tooltip passes `false` instead of selector, so we need to check\n  const callable = isDelegated ? delegationFunction : (handler || delegationFunction)\n  let typeEvent = getTypeEvent(originalTypeEvent)\n\n  if (!nativeEvents.has(typeEvent)) {\n    typeEvent = originalTypeEvent\n  }\n\n  return [isDelegated, callable, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n  if (typeof originalTypeEvent !== 'string' || !element) {\n    return\n  }\n\n  let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n\n  // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n  // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n  if (originalTypeEvent in customEvents) {\n    const wrapFunction = fn => {\n      return function (event) {\n        if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n          return fn.call(this, event)\n        }\n      }\n    }\n\n    callable = wrapFunction(callable)\n  }\n\n  const events = getElementEvents(element)\n  const handlers = events[typeEvent] || (events[typeEvent] = {})\n  const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null)\n\n  if (previousFunction) {\n    previousFunction.oneOff = previousFunction.oneOff && oneOff\n\n    return\n  }\n\n  const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''))\n  const fn = isDelegated ?\n    bootstrapDelegationHandler(element, handler, callable) :\n    bootstrapHandler(element, callable)\n\n  fn.delegationSelector = isDelegated ? handler : null\n  fn.callable = callable\n  fn.oneOff = oneOff\n  fn.uidEvent = uid\n  handlers[uid] = fn\n\n  element.addEventListener(typeEvent, fn, isDelegated)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n  const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n  if (!fn) {\n    return\n  }\n\n  element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n  delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n  const storeElementEvent = events[typeEvent] || {}\n\n  for (const [handlerKey, event] of Object.entries(storeElementEvent)) {\n    if (handlerKey.includes(namespace)) {\n      removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n    }\n  }\n}\n\nfunction getTypeEvent(event) {\n  // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n  event = event.replace(stripNameRegex, '')\n  return customEvents[event] || event\n}\n\nconst EventHandler = {\n  on(element, event, handler, delegationFunction) {\n    addHandler(element, event, handler, delegationFunction, false)\n  },\n\n  one(element, event, handler, delegationFunction) {\n    addHandler(element, event, handler, delegationFunction, true)\n  },\n\n  off(element, originalTypeEvent, handler, delegationFunction) {\n    if (typeof originalTypeEvent !== 'string' || !element) {\n      return\n    }\n\n    const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n    const inNamespace = typeEvent !== originalTypeEvent\n    const events = getElementEvents(element)\n    const storeElementEvent = events[typeEvent] || {}\n    const isNamespace = originalTypeEvent.startsWith('.')\n\n    if (typeof callable !== 'undefined') {\n      // Simplest case: handler is passed, remove that listener ONLY.\n      if (!Object.keys(storeElementEvent).length) {\n        return\n      }\n\n      removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null)\n      return\n    }\n\n    if (isNamespace) {\n      for (const elementEvent of Object.keys(events)) {\n        removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n      }\n    }\n\n    for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {\n      const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n      if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n        removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n      }\n    }\n  },\n\n  trigger(element, event, args) {\n    if (typeof event !== 'string' || !element) {\n      return null\n    }\n\n    const $ = getjQuery()\n    const typeEvent = getTypeEvent(event)\n    const inNamespace = event !== typeEvent\n\n    let jQueryEvent = null\n    let bubbles = true\n    let nativeDispatch = true\n    let defaultPrevented = false\n\n    if (inNamespace && $) {\n      jQueryEvent = $.Event(event, args)\n\n      $(element).trigger(jQueryEvent)\n      bubbles = !jQueryEvent.isPropagationStopped()\n      nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n      defaultPrevented = jQueryEvent.isDefaultPrevented()\n    }\n\n    const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args)\n\n    if (defaultPrevented) {\n      evt.preventDefault()\n    }\n\n    if (nativeDispatch) {\n      element.dispatchEvent(evt)\n    }\n\n    if (evt.defaultPrevented && jQueryEvent) {\n      jQueryEvent.preventDefault()\n    }\n\n    return evt\n  }\n}\n\nfunction hydrateObj(obj, meta = {}) {\n  for (const [key, value] of Object.entries(meta)) {\n    try {\n      obj[key] = value\n    } catch {\n      Object.defineProperty(obj, key, {\n        configurable: true,\n        get() {\n          return value\n        }\n      })\n    }\n  }\n\n  return obj\n}\n\nexport default EventHandler\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n  if (value === 'true') {\n    return true\n  }\n\n  if (value === 'false') {\n    return false\n  }\n\n  if (value === Number(value).toString()) {\n    return Number(value)\n  }\n\n  if (value === '' || value === 'null') {\n    return null\n  }\n\n  if (typeof value !== 'string') {\n    return value\n  }\n\n  try {\n    return JSON.parse(decodeURIComponent(value))\n  } catch {\n    return value\n  }\n}\n\nfunction normalizeDataKey(key) {\n  return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n  setDataAttribute(element, key, value) {\n    element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n  },\n\n  removeDataAttribute(element, key) {\n    element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n  },\n\n  getDataAttributes(element) {\n    if (!element) {\n      return {}\n    }\n\n    const attributes = {}\n    const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n    for (const key of bsKeys) {\n      let pureKey = key.replace(/^bs/, '')\n      pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1)\n      attributes[pureKey] = normalizeData(element.dataset[key])\n    }\n\n    return attributes\n  },\n\n  getDataAttribute(element, key) {\n    return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n  }\n}\n\nexport default Manipulator\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport { isElement, toType } from './index.js'\n\n/**\n * Class definition\n */\n\nclass Config {\n  // Getters\n  static get Default() {\n    return {}\n  }\n\n  static get DefaultType() {\n    return {}\n  }\n\n  static get NAME() {\n    throw new Error('You have to implement the static method \"NAME\", for each component!')\n  }\n\n  _getConfig(config) {\n    config = this._mergeConfigObj(config)\n    config = this._configAfterMerge(config)\n    this._typeCheckConfig(config)\n    return config\n  }\n\n  _configAfterMerge(config) {\n    return config\n  }\n\n  _mergeConfigObj(config, element) {\n    const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {} // try to parse\n\n    return {\n      ...this.constructor.Default,\n      ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n      ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n      ...(typeof config === 'object' ? config : {})\n    }\n  }\n\n  _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n    for (const [property, expectedTypes] of Object.entries(configTypes)) {\n      const value = config[property]\n      const valueType = isElement(value) ? 'element' : toType(value)\n\n      if (!new RegExp(expectedTypes).test(valueType)) {\n        throw new TypeError(\n          `${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n        )\n      }\n    }\n  }\n}\n\nexport default Config\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.8'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n  constructor(element, config) {\n    super()\n\n    element = getElement(element)\n    if (!element) {\n      return\n    }\n\n    this._element = element\n    this._config = this._getConfig(config)\n\n    Data.set(this._element, this.constructor.DATA_KEY, this)\n  }\n\n  // Public\n  dispose() {\n    Data.remove(this._element, this.constructor.DATA_KEY)\n    EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n    for (const propertyName of Object.getOwnPropertyNames(this)) {\n      this[propertyName] = null\n    }\n  }\n\n  // Private\n  _queueCallback(callback, element, isAnimated = true) {\n    executeAfterTransition(callback, element, isAnimated)\n  }\n\n  _getConfig(config) {\n    config = this._mergeConfigObj(config, this._element)\n    config = this._configAfterMerge(config)\n    this._typeCheckConfig(config)\n    return config\n  }\n\n  // Static\n  static getInstance(element) {\n    return Data.get(getElement(element), this.DATA_KEY)\n  }\n\n  static getOrCreateInstance(element, config = {}) {\n    return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n  }\n\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get DATA_KEY() {\n    return `bs.${this.NAME}`\n  }\n\n  static get EVENT_KEY() {\n    return `.${this.DATA_KEY}`\n  }\n\n  static eventName(name) {\n    return `${name}${this.EVENT_KEY}`\n  }\n}\n\nexport default BaseComponent\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { isDisabled, isVisible, parseSelector } from '../util/index.js'\n\nconst getSelector = element => {\n  let selector = element.getAttribute('data-bs-target')\n\n  if (!selector || selector === '#') {\n    let hrefAttribute = element.getAttribute('href')\n\n    // The only valid content that could double as a selector are IDs or classes,\n    // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n    // `document.querySelector` will rightfully complain it is invalid.\n    // See https://github.com/twbs/bootstrap/issues/32273\n    if (!hrefAttribute || (!hrefAttribute.includes('#') && !hrefAttribute.startsWith('.'))) {\n      return null\n    }\n\n    // Just in case some CMS puts out a full URL with the anchor appended\n    if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n      hrefAttribute = `#${hrefAttribute.split('#')[1]}`\n    }\n\n    selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null\n  }\n\n  return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null\n}\n\nconst SelectorEngine = {\n  find(selector, element = document.documentElement) {\n    return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n  },\n\n  findOne(selector, element = document.documentElement) {\n    return Element.prototype.querySelector.call(element, selector)\n  },\n\n  children(element, selector) {\n    return [].concat(...element.children).filter(child => child.matches(selector))\n  },\n\n  parents(element, selector) {\n    const parents = []\n    let ancestor = element.parentNode.closest(selector)\n\n    while (ancestor) {\n      parents.push(ancestor)\n      ancestor = ancestor.parentNode.closest(selector)\n    }\n\n    return parents\n  },\n\n  prev(element, selector) {\n    let previous = element.previousElementSibling\n\n    while (previous) {\n      if (previous.matches(selector)) {\n        return [previous]\n      }\n\n      previous = previous.previousElementSibling\n    }\n\n    return []\n  },\n  // TODO: this is now unused; remove later along with prev()\n  next(element, selector) {\n    let next = element.nextElementSibling\n\n    while (next) {\n      if (next.matches(selector)) {\n        return [next]\n      }\n\n      next = next.nextElementSibling\n    }\n\n    return []\n  },\n\n  focusableChildren(element) {\n    const focusables = [\n      'a',\n      'button',\n      'input',\n      'textarea',\n      'select',\n      'details',\n      '[tabindex]',\n      '[contenteditable=\"true\"]'\n    ].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',')\n\n    return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el))\n  },\n\n  getSelectorFromElement(element) {\n    const selector = getSelector(element)\n\n    if (selector) {\n      return SelectorEngine.findOne(selector) ? selector : null\n    }\n\n    return null\n  },\n\n  getElementFromSelector(element) {\n    const selector = getSelector(element)\n\n    return selector ? SelectorEngine.findOne(selector) : null\n  },\n\n  getMultipleElementsFromSelector(element) {\n    const selector = getSelector(element)\n\n    return selector ? SelectorEngine.find(selector) : []\n  }\n}\n\nexport default SelectorEngine\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport { isDisabled } from './index.js'\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n  const clickEvent = `click.dismiss${component.EVENT_KEY}`\n  const name = component.NAME\n\n  EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n    if (['A', 'AREA'].includes(this.tagName)) {\n      event.preventDefault()\n    }\n\n    if (isDisabled(this)) {\n      return\n    }\n\n    const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`)\n    const instance = component.getOrCreateInstance(target)\n\n    // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n    instance[method]()\n  })\n}\n\nexport {\n  enableDismissTrigger\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n  // Getters\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  close() {\n    const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n    if (closeEvent.defaultPrevented) {\n      return\n    }\n\n    this._element.classList.remove(CLASS_NAME_SHOW)\n\n    const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n    this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n  }\n\n  // Private\n  _destroyElement() {\n    this._element.remove()\n    EventHandler.trigger(this._element, EVENT_CLOSED)\n    this.dispose()\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Alert.getOrCreateInstance(this)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config](this)\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n  // Getters\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle() {\n    // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n    this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Button.getOrCreateInstance(this)\n\n      if (config === 'toggle') {\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n  event.preventDefault()\n\n  const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n  const data = Button.getOrCreateInstance(button)\n\n  data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport Config from './config.js'\nimport { execute } from './index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'swipe'\nconst EVENT_KEY = '.bs.swipe'\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst POINTER_TYPE_TOUCH = 'touch'\nconst POINTER_TYPE_PEN = 'pen'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n  endCallback: null,\n  leftCallback: null,\n  rightCallback: null\n}\n\nconst DefaultType = {\n  endCallback: '(function|null)',\n  leftCallback: '(function|null)',\n  rightCallback: '(function|null)'\n}\n\n/**\n * Class definition\n */\n\nclass Swipe extends Config {\n  constructor(element, config) {\n    super()\n    this._element = element\n\n    if (!element || !Swipe.isSupported()) {\n      return\n    }\n\n    this._config = this._getConfig(config)\n    this._deltaX = 0\n    this._supportPointerEvents = Boolean(window.PointerEvent)\n    this._initEvents()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  dispose() {\n    EventHandler.off(this._element, EVENT_KEY)\n  }\n\n  // Private\n  _start(event) {\n    if (!this._supportPointerEvents) {\n      this._deltaX = event.touches[0].clientX\n\n      return\n    }\n\n    if (this._eventIsPointerPenTouch(event)) {\n      this._deltaX = event.clientX\n    }\n  }\n\n  _end(event) {\n    if (this._eventIsPointerPenTouch(event)) {\n      this._deltaX = event.clientX - this._deltaX\n    }\n\n    this._handleSwipe()\n    execute(this._config.endCallback)\n  }\n\n  _move(event) {\n    this._deltaX = event.touches && event.touches.length > 1 ?\n      0 :\n      event.touches[0].clientX - this._deltaX\n  }\n\n  _handleSwipe() {\n    const absDeltaX = Math.abs(this._deltaX)\n\n    if (absDeltaX <= SWIPE_THRESHOLD) {\n      return\n    }\n\n    const direction = absDeltaX / this._deltaX\n\n    this._deltaX = 0\n\n    if (!direction) {\n      return\n    }\n\n    execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback)\n  }\n\n  _initEvents() {\n    if (this._supportPointerEvents) {\n      EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event))\n      EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event))\n\n      this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n    } else {\n      EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event))\n      EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event))\n      EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event))\n    }\n  }\n\n  _eventIsPointerPenTouch(event) {\n    return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)\n  }\n\n  // Static\n  static isSupported() {\n    return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n  }\n}\n\nexport default Swipe\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport Manipulator from './dom/manipulator.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n  defineJQueryPlugin,\n  getNextActiveElement,\n  isRTL,\n  isVisible,\n  reflow,\n  triggerTransitionEnd\n} from './util/index.js'\nimport Swipe from './util/swipe.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\n\nconst ORDER_NEXT = 'next'\nconst ORDER_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst KEY_TO_DIRECTION = {\n  [ARROW_LEFT_KEY]: DIRECTION_RIGHT,\n  [ARROW_RIGHT_KEY]: DIRECTION_LEFT\n}\n\nconst Default = {\n  interval: 5000,\n  keyboard: true,\n  pause: 'hover',\n  ride: false,\n  touch: true,\n  wrap: true\n}\n\nconst DefaultType = {\n  interval: '(number|boolean)', // TODO:v6 remove boolean support\n  keyboard: 'boolean',\n  pause: '(string|boolean)',\n  ride: '(boolean|string)',\n  touch: 'boolean',\n  wrap: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Carousel extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._interval = null\n    this._activeElement = null\n    this._isSliding = false\n    this.touchTimeout = null\n    this._swipeHelper = null\n\n    this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n    this._addEventListeners()\n\n    if (this._config.ride === CLASS_NAME_CAROUSEL) {\n      this.cycle()\n    }\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  next() {\n    this._slide(ORDER_NEXT)\n  }\n\n  nextWhenVisible() {\n    // FIXME TODO use `document.visibilityState`\n    // Don't call next when the page isn't visible\n    // or the carousel or its parent isn't visible\n    if (!document.hidden && isVisible(this._element)) {\n      this.next()\n    }\n  }\n\n  prev() {\n    this._slide(ORDER_PREV)\n  }\n\n  pause() {\n    if (this._isSliding) {\n      triggerTransitionEnd(this._element)\n    }\n\n    this._clearInterval()\n  }\n\n  cycle() {\n    this._clearInterval()\n    this._updateInterval()\n\n    this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval)\n  }\n\n  _maybeEnableCycle() {\n    if (!this._config.ride) {\n      return\n    }\n\n    if (this._isSliding) {\n      EventHandler.one(this._element, EVENT_SLID, () => this.cycle())\n      return\n    }\n\n    this.cycle()\n  }\n\n  to(index) {\n    const items = this._getItems()\n    if (index > items.length - 1 || index < 0) {\n      return\n    }\n\n    if (this._isSliding) {\n      EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n      return\n    }\n\n    const activeIndex = this._getItemIndex(this._getActive())\n    if (activeIndex === index) {\n      return\n    }\n\n    const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV\n\n    this._slide(order, items[index])\n  }\n\n  dispose() {\n    if (this._swipeHelper) {\n      this._swipeHelper.dispose()\n    }\n\n    super.dispose()\n  }\n\n  // Private\n  _configAfterMerge(config) {\n    config.defaultInterval = config.interval\n    return config\n  }\n\n  _addEventListeners() {\n    if (this._config.keyboard) {\n      EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n    }\n\n    if (this._config.pause === 'hover') {\n      EventHandler.on(this._element, EVENT_MOUSEENTER, () => this.pause())\n      EventHandler.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle())\n    }\n\n    if (this._config.touch && Swipe.isSupported()) {\n      this._addTouchEventListeners()\n    }\n  }\n\n  _addTouchEventListeners() {\n    for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n      EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault())\n    }\n\n    const endCallBack = () => {\n      if (this._config.pause !== 'hover') {\n        return\n      }\n\n      // If it's a touch-enabled device, mouseenter/leave are fired as\n      // part of the mouse compatibility events on first tap - the carousel\n      // would stop cycling until user tapped out of it;\n      // here, we listen for touchend, explicitly pause the carousel\n      // (as if it's the second time we tap on it, mouseenter compat event\n      // is NOT fired) and after a timeout (to allow for mouse compatibility\n      // events to fire) we explicitly restart cycling\n\n      this.pause()\n      if (this.touchTimeout) {\n        clearTimeout(this.touchTimeout)\n      }\n\n      this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n    }\n\n    const swipeConfig = {\n      leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n      rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n      endCallback: endCallBack\n    }\n\n    this._swipeHelper = new Swipe(this._element, swipeConfig)\n  }\n\n  _keydown(event) {\n    if (/input|textarea/i.test(event.target.tagName)) {\n      return\n    }\n\n    const direction = KEY_TO_DIRECTION[event.key]\n    if (direction) {\n      event.preventDefault()\n      this._slide(this._directionToOrder(direction))\n    }\n  }\n\n  _getItemIndex(element) {\n    return this._getItems().indexOf(element)\n  }\n\n  _setActiveIndicatorElement(index) {\n    if (!this._indicatorsElement) {\n      return\n    }\n\n    const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)\n\n    activeIndicator.classList.remove(CLASS_NAME_ACTIVE)\n    activeIndicator.removeAttribute('aria-current')\n\n    const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement)\n\n    if (newActiveIndicator) {\n      newActiveIndicator.classList.add(CLASS_NAME_ACTIVE)\n      newActiveIndicator.setAttribute('aria-current', 'true')\n    }\n  }\n\n  _updateInterval() {\n    const element = this._activeElement || this._getActive()\n\n    if (!element) {\n      return\n    }\n\n    const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)\n\n    this._config.interval = elementInterval || this._config.defaultInterval\n  }\n\n  _slide(order, element = null) {\n    if (this._isSliding) {\n      return\n    }\n\n    const activeElement = this._getActive()\n    const isNext = order === ORDER_NEXT\n    const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap)\n\n    if (nextElement === activeElement) {\n      return\n    }\n\n    const nextElementIndex = this._getItemIndex(nextElement)\n\n    const triggerEvent = eventName => {\n      return EventHandler.trigger(this._element, eventName, {\n        relatedTarget: nextElement,\n        direction: this._orderToDirection(order),\n        from: this._getItemIndex(activeElement),\n        to: nextElementIndex\n      })\n    }\n\n    const slideEvent = triggerEvent(EVENT_SLIDE)\n\n    if (slideEvent.defaultPrevented) {\n      return\n    }\n\n    if (!activeElement || !nextElement) {\n      // Some weirdness is happening, so we bail\n      // TODO: change tests that use empty divs to avoid this check\n      return\n    }\n\n    const isCycling = Boolean(this._interval)\n    this.pause()\n\n    this._isSliding = true\n\n    this._setActiveIndicatorElement(nextElementIndex)\n    this._activeElement = nextElement\n\n    const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END\n    const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV\n\n    nextElement.classList.add(orderClassName)\n\n    reflow(nextElement)\n\n    activeElement.classList.add(directionalClassName)\n    nextElement.classList.add(directionalClassName)\n\n    const completeCallBack = () => {\n      nextElement.classList.remove(directionalClassName, orderClassName)\n      nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n      activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)\n\n      this._isSliding = false\n\n      triggerEvent(EVENT_SLID)\n    }\n\n    this._queueCallback(completeCallBack, activeElement, this._isAnimated())\n\n    if (isCycling) {\n      this.cycle()\n    }\n  }\n\n  _isAnimated() {\n    return this._element.classList.contains(CLASS_NAME_SLIDE)\n  }\n\n  _getActive() {\n    return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n  }\n\n  _getItems() {\n    return SelectorEngine.find(SELECTOR_ITEM, this._element)\n  }\n\n  _clearInterval() {\n    if (this._interval) {\n      clearInterval(this._interval)\n      this._interval = null\n    }\n  }\n\n  _directionToOrder(direction) {\n    if (isRTL()) {\n      return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT\n    }\n\n    return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV\n  }\n\n  _orderToDirection(order) {\n    if (isRTL()) {\n      return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT\n    }\n\n    return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Carousel.getOrCreateInstance(this, config)\n\n      if (typeof config === 'number') {\n        data.to(config)\n        return\n      }\n\n      if (typeof config === 'string') {\n        if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) {\n  const target = SelectorEngine.getElementFromSelector(this)\n\n  if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n    return\n  }\n\n  event.preventDefault()\n\n  const carousel = Carousel.getOrCreateInstance(target)\n  const slideIndex = this.getAttribute('data-bs-slide-to')\n\n  if (slideIndex) {\n    carousel.to(slideIndex)\n    carousel._maybeEnableCycle()\n    return\n  }\n\n  if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n    carousel.next()\n    carousel._maybeEnableCycle()\n    return\n  }\n\n  carousel.prev()\n  carousel._maybeEnableCycle()\n})\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)\n\n  for (const carousel of carousels) {\n    Carousel.getOrCreateInstance(carousel)\n  }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Carousel)\n\nexport default Carousel\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n  defineJQueryPlugin,\n  getElement,\n  reflow\n} from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'collapse'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\nconst CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`\nconst CLASS_NAME_HORIZONTAL = 'collapse-horizontal'\n\nconst WIDTH = 'width'\nconst HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]'\n\nconst Default = {\n  parent: null,\n  toggle: true\n}\n\nconst DefaultType = {\n  parent: '(null|element)',\n  toggle: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Collapse extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._isTransitioning = false\n    this._triggerArray = []\n\n    const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n    for (const elem of toggleList) {\n      const selector = SelectorEngine.getSelectorFromElement(elem)\n      const filterElement = SelectorEngine.find(selector)\n        .filter(foundElement => foundElement === this._element)\n\n      if (selector !== null && filterElement.length) {\n        this._triggerArray.push(elem)\n      }\n    }\n\n    this._initializeChildren()\n\n    if (!this._config.parent) {\n      this._addAriaAndCollapsedClass(this._triggerArray, this._isShown())\n    }\n\n    if (this._config.toggle) {\n      this.toggle()\n    }\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle() {\n    if (this._isShown()) {\n      this.hide()\n    } else {\n      this.show()\n    }\n  }\n\n  show() {\n    if (this._isTransitioning || this._isShown()) {\n      return\n    }\n\n    let activeChildren = []\n\n    // find active children\n    if (this._config.parent) {\n      activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES)\n        .filter(element => element !== this._element)\n        .map(element => Collapse.getOrCreateInstance(element, { toggle: false }))\n    }\n\n    if (activeChildren.length && activeChildren[0]._isTransitioning) {\n      return\n    }\n\n    const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n    if (startEvent.defaultPrevented) {\n      return\n    }\n\n    for (const activeInstance of activeChildren) {\n      activeInstance.hide()\n    }\n\n    const dimension = this._getDimension()\n\n    this._element.classList.remove(CLASS_NAME_COLLAPSE)\n    this._element.classList.add(CLASS_NAME_COLLAPSING)\n\n    this._element.style[dimension] = 0\n\n    this._addAriaAndCollapsedClass(this._triggerArray, true)\n    this._isTransitioning = true\n\n    const complete = () => {\n      this._isTransitioning = false\n\n      this._element.classList.remove(CLASS_NAME_COLLAPSING)\n      this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n      this._element.style[dimension] = ''\n\n      EventHandler.trigger(this._element, EVENT_SHOWN)\n    }\n\n    const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n    const scrollSize = `scroll${capitalizedDimension}`\n\n    this._queueCallback(complete, this._element, true)\n    this._element.style[dimension] = `${this._element[scrollSize]}px`\n  }\n\n  hide() {\n    if (this._isTransitioning || !this._isShown()) {\n      return\n    }\n\n    const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n    if (startEvent.defaultPrevented) {\n      return\n    }\n\n    const dimension = this._getDimension()\n\n    this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n    reflow(this._element)\n\n    this._element.classList.add(CLASS_NAME_COLLAPSING)\n    this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n    for (const trigger of this._triggerArray) {\n      const element = SelectorEngine.getElementFromSelector(trigger)\n\n      if (element && !this._isShown(element)) {\n        this._addAriaAndCollapsedClass([trigger], false)\n      }\n    }\n\n    this._isTransitioning = true\n\n    const complete = () => {\n      this._isTransitioning = false\n      this._element.classList.remove(CLASS_NAME_COLLAPSING)\n      this._element.classList.add(CLASS_NAME_COLLAPSE)\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    }\n\n    this._element.style[dimension] = ''\n\n    this._queueCallback(complete, this._element, true)\n  }\n\n  // Private\n  _isShown(element = this._element) {\n    return element.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  _configAfterMerge(config) {\n    config.toggle = Boolean(config.toggle) // Coerce string values\n    config.parent = getElement(config.parent)\n    return config\n  }\n\n  _getDimension() {\n    return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT\n  }\n\n  _initializeChildren() {\n    if (!this._config.parent) {\n      return\n    }\n\n    const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE)\n\n    for (const element of children) {\n      const selected = SelectorEngine.getElementFromSelector(element)\n\n      if (selected) {\n        this._addAriaAndCollapsedClass([element], this._isShown(selected))\n      }\n    }\n  }\n\n  _getFirstLevelChildren(selector) {\n    const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent)\n    // remove children if greater depth\n    return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element))\n  }\n\n  _addAriaAndCollapsedClass(triggerArray, isOpen) {\n    if (!triggerArray.length) {\n      return\n    }\n\n    for (const element of triggerArray) {\n      element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen)\n      element.setAttribute('aria-expanded', isOpen)\n    }\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    const _config = {}\n    if (typeof config === 'string' && /show|hide/.test(config)) {\n      _config.toggle = false\n    }\n\n    return this.each(function () {\n      const data = Collapse.getOrCreateInstance(this, _config)\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n  if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) {\n    event.preventDefault()\n  }\n\n  for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {\n    Collapse.getOrCreateInstance(element, { toggle: false }).toggle()\n  }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Collapse)\n\nexport default Collapse\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport Manipulator from './dom/manipulator.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n  defineJQueryPlugin,\n  execute,\n  getElement,\n  getNextActiveElement,\n  isDisabled,\n  isElement,\n  isRTL,\n  isVisible,\n  noop\n} from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_DROPUP_CENTER = 'dropup-center'\nconst CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)'\nconst SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE}.${CLASS_NAME_SHOW}`\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR = '.navbar'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'\nconst PLACEMENT_TOPCENTER = 'top'\nconst PLACEMENT_BOTTOMCENTER = 'bottom'\n\nconst Default = {\n  autoClose: true,\n  boundary: 'clippingParents',\n  display: 'dynamic',\n  offset: [0, 2],\n  popperConfig: null,\n  reference: 'toggle'\n}\n\nconst DefaultType = {\n  autoClose: '(boolean|string)',\n  boundary: '(string|element)',\n  display: 'string',\n  offset: '(array|string|function)',\n  popperConfig: '(null|object|function)',\n  reference: '(string|element|object)'\n}\n\n/**\n * Class definition\n */\n\nclass Dropdown extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._popper = null\n    this._parent = this._element.parentNode // dropdown wrapper\n    // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/\n    this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] ||\n      SelectorEngine.prev(this._element, SELECTOR_MENU)[0] ||\n      SelectorEngine.findOne(SELECTOR_MENU, this._parent)\n    this._inNavbar = this._detectNavbar()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle() {\n    return this._isShown() ? this.hide() : this.show()\n  }\n\n  show() {\n    if (isDisabled(this._element) || this._isShown()) {\n      return\n    }\n\n    const relatedTarget = {\n      relatedTarget: this._element\n    }\n\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._createPopper()\n\n    // If this is a touch-enabled device we add extra\n    // empty mouseover listeners to the body's immediate children;\n    // only needed because of broken event delegation on iOS\n    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n    if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.on(element, 'mouseover', noop)\n      }\n    }\n\n    this._element.focus()\n    this._element.setAttribute('aria-expanded', true)\n\n    this._menu.classList.add(CLASS_NAME_SHOW)\n    this._element.classList.add(CLASS_NAME_SHOW)\n    EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)\n  }\n\n  hide() {\n    if (isDisabled(this._element) || !this._isShown()) {\n      return\n    }\n\n    const relatedTarget = {\n      relatedTarget: this._element\n    }\n\n    this._completeHide(relatedTarget)\n  }\n\n  dispose() {\n    if (this._popper) {\n      this._popper.destroy()\n    }\n\n    super.dispose()\n  }\n\n  update() {\n    this._inNavbar = this._detectNavbar()\n    if (this._popper) {\n      this._popper.update()\n    }\n  }\n\n  // Private\n  _completeHide(relatedTarget) {\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    // If this is a touch-enabled device we remove the extra\n    // empty mouseover listeners we added for iOS support\n    if ('ontouchstart' in document.documentElement) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.off(element, 'mouseover', noop)\n      }\n    }\n\n    if (this._popper) {\n      this._popper.destroy()\n    }\n\n    this._menu.classList.remove(CLASS_NAME_SHOW)\n    this._element.classList.remove(CLASS_NAME_SHOW)\n    this._element.setAttribute('aria-expanded', 'false')\n    Manipulator.removeDataAttribute(this._menu, 'popper')\n    EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)\n  }\n\n  _getConfig(config) {\n    config = super._getConfig(config)\n\n    if (typeof config.reference === 'object' && !isElement(config.reference) &&\n      typeof config.reference.getBoundingClientRect !== 'function'\n    ) {\n      // Popper virtual elements require a getBoundingClientRect method\n      throw new TypeError(`${NAME.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`)\n    }\n\n    return config\n  }\n\n  _createPopper() {\n    if (typeof Popper === 'undefined') {\n      throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org/docs/v2/)')\n    }\n\n    let referenceElement = this._element\n\n    if (this._config.reference === 'parent') {\n      referenceElement = this._parent\n    } else if (isElement(this._config.reference)) {\n      referenceElement = getElement(this._config.reference)\n    } else if (typeof this._config.reference === 'object') {\n      referenceElement = this._config.reference\n    }\n\n    const popperConfig = this._getPopperConfig()\n    this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)\n  }\n\n  _isShown() {\n    return this._menu.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  _getPlacement() {\n    const parentDropdown = this._parent\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n      return PLACEMENT_RIGHT\n    }\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n      return PLACEMENT_LEFT\n    }\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n      return PLACEMENT_TOPCENTER\n    }\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n      return PLACEMENT_BOTTOMCENTER\n    }\n\n    // We need to trim the value because custom properties can also include spaces\n    const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n      return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n    }\n\n    return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n  }\n\n  _detectNavbar() {\n    return this._element.closest(SELECTOR_NAVBAR) !== null\n  }\n\n  _getOffset() {\n    const { offset } = this._config\n\n    if (typeof offset === 'string') {\n      return offset.split(',').map(value => Number.parseInt(value, 10))\n    }\n\n    if (typeof offset === 'function') {\n      return popperData => offset(popperData, this._element)\n    }\n\n    return offset\n  }\n\n  _getPopperConfig() {\n    const defaultBsPopperConfig = {\n      placement: this._getPlacement(),\n      modifiers: [{\n        name: 'preventOverflow',\n        options: {\n          boundary: this._config.boundary\n        }\n      },\n      {\n        name: 'offset',\n        options: {\n          offset: this._getOffset()\n        }\n      }]\n    }\n\n    // Disable Popper if we have a static display or Dropdown is in Navbar\n    if (this._inNavbar || this._config.display === 'static') {\n      Manipulator.setDataAttribute(this._menu, 'popper', 'static') // TODO: v6 remove\n      defaultBsPopperConfig.modifiers = [{\n        name: 'applyStyles',\n        enabled: false\n      }]\n    }\n\n    return {\n      ...defaultBsPopperConfig,\n      ...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])\n    }\n  }\n\n  _selectMenuItem({ key, target }) {\n    const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element))\n\n    if (!items.length) {\n      return\n    }\n\n    // if target isn't included in items (e.g. when expanding the dropdown)\n    // allow cycling to get the last item in case key equals ARROW_UP_KEY\n    getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus()\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Dropdown.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n\n  static clearMenus(event) {\n    if (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY)) {\n      return\n    }\n\n    const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN)\n\n    for (const toggle of openToggles) {\n      const context = Dropdown.getInstance(toggle)\n      if (!context || context._config.autoClose === false) {\n        continue\n      }\n\n      const composedPath = event.composedPath()\n      const isMenuTarget = composedPath.includes(context._menu)\n      if (\n        composedPath.includes(context._element) ||\n        (context._config.autoClose === 'inside' && !isMenuTarget) ||\n        (context._config.autoClose === 'outside' && isMenuTarget)\n      ) {\n        continue\n      }\n\n      // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n      if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n        continue\n      }\n\n      const relatedTarget = { relatedTarget: context._element }\n\n      if (event.type === 'click') {\n        relatedTarget.clickEvent = event\n      }\n\n      context._completeHide(relatedTarget)\n    }\n  }\n\n  static dataApiKeydownHandler(event) {\n    // If not an UP | DOWN | ESCAPE key => not a dropdown command\n    // If input/textarea && if key is other than ESCAPE => not a dropdown command\n\n    const isInput = /input|textarea/i.test(event.target.tagName)\n    const isEscapeEvent = event.key === ESCAPE_KEY\n    const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)\n\n    if (!isUpOrDownEvent && !isEscapeEvent) {\n      return\n    }\n\n    if (isInput && !isEscapeEvent) {\n      return\n    }\n\n    event.preventDefault()\n\n    // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/\n    const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ?\n      this :\n      (SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0] ||\n        SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] ||\n        SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode))\n\n    const instance = Dropdown.getOrCreateInstance(getToggleButton)\n\n    if (isUpOrDownEvent) {\n      event.stopPropagation()\n      instance.show()\n      instance._selectMenuItem(event)\n      return\n    }\n\n    if (instance._isShown()) { // else is escape and we check if it is shown\n      event.stopPropagation()\n      instance.hide()\n      getToggleButton.focus()\n    }\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  event.preventDefault()\n  Dropdown.getOrCreateInstance(this).toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Dropdown)\n\nexport default Dropdown\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport Config from './config.js'\nimport {\n  execute, executeAfterTransition, getElement, reflow\n} from './index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'backdrop'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`\n\nconst Default = {\n  className: 'modal-backdrop',\n  clickCallback: null,\n  isAnimated: false,\n  isVisible: true, // if false, we use the backdrop helper without adding any element to the dom\n  rootElement: 'body' // give the choice to place backdrop under different elements\n}\n\nconst DefaultType = {\n  className: 'string',\n  clickCallback: '(function|null)',\n  isAnimated: 'boolean',\n  isVisible: 'boolean',\n  rootElement: '(element|string)'\n}\n\n/**\n * Class definition\n */\n\nclass Backdrop extends Config {\n  constructor(config) {\n    super()\n    this._config = this._getConfig(config)\n    this._isAppended = false\n    this._element = null\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  show(callback) {\n    if (!this._config.isVisible) {\n      execute(callback)\n      return\n    }\n\n    this._append()\n\n    const element = this._getElement()\n    if (this._config.isAnimated) {\n      reflow(element)\n    }\n\n    element.classList.add(CLASS_NAME_SHOW)\n\n    this._emulateAnimation(() => {\n      execute(callback)\n    })\n  }\n\n  hide(callback) {\n    if (!this._config.isVisible) {\n      execute(callback)\n      return\n    }\n\n    this._getElement().classList.remove(CLASS_NAME_SHOW)\n\n    this._emulateAnimation(() => {\n      this.dispose()\n      execute(callback)\n    })\n  }\n\n  dispose() {\n    if (!this._isAppended) {\n      return\n    }\n\n    EventHandler.off(this._element, EVENT_MOUSEDOWN)\n\n    this._element.remove()\n    this._isAppended = false\n  }\n\n  // Private\n  _getElement() {\n    if (!this._element) {\n      const backdrop = document.createElement('div')\n      backdrop.className = this._config.className\n      if (this._config.isAnimated) {\n        backdrop.classList.add(CLASS_NAME_FADE)\n      }\n\n      this._element = backdrop\n    }\n\n    return this._element\n  }\n\n  _configAfterMerge(config) {\n    // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n    config.rootElement = getElement(config.rootElement)\n    return config\n  }\n\n  _append() {\n    if (this._isAppended) {\n      return\n    }\n\n    const element = this._getElement()\n    this._config.rootElement.append(element)\n\n    EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n      execute(this._config.clickCallback)\n    })\n\n    this._isAppended = true\n  }\n\n  _emulateAnimation(callback) {\n    executeAfterTransition(callback, this._getElement(), this._config.isAnimated)\n  }\n}\n\nexport default Backdrop\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport Config from './config.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'focustrap'\nconst DATA_KEY = 'bs.focustrap'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY}`\n\nconst TAB_KEY = 'Tab'\nconst TAB_NAV_FORWARD = 'forward'\nconst TAB_NAV_BACKWARD = 'backward'\n\nconst Default = {\n  autofocus: true,\n  trapElement: null // The element to trap focus inside of\n}\n\nconst DefaultType = {\n  autofocus: 'boolean',\n  trapElement: 'element'\n}\n\n/**\n * Class definition\n */\n\nclass FocusTrap extends Config {\n  constructor(config) {\n    super()\n    this._config = this._getConfig(config)\n    this._isActive = false\n    this._lastTabNavDirection = null\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  activate() {\n    if (this._isActive) {\n      return\n    }\n\n    if (this._config.autofocus) {\n      this._config.trapElement.focus()\n    }\n\n    EventHandler.off(document, EVENT_KEY) // guard against infinite focus loop\n    EventHandler.on(document, EVENT_FOCUSIN, event => this._handleFocusin(event))\n    EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event))\n\n    this._isActive = true\n  }\n\n  deactivate() {\n    if (!this._isActive) {\n      return\n    }\n\n    this._isActive = false\n    EventHandler.off(document, EVENT_KEY)\n  }\n\n  // Private\n  _handleFocusin(event) {\n    const { trapElement } = this._config\n\n    if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n      return\n    }\n\n    const elements = SelectorEngine.focusableChildren(trapElement)\n\n    if (elements.length === 0) {\n      trapElement.focus()\n    } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n      elements[elements.length - 1].focus()\n    } else {\n      elements[0].focus()\n    }\n  }\n\n  _handleKeydown(event) {\n    if (event.key !== TAB_KEY) {\n      return\n    }\n\n    this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD\n  }\n}\n\nexport default FocusTrap\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport { isElement } from './index.js'\n\n/**\n * Constants\n */\n\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\nconst PROPERTY_PADDING = 'padding-right'\nconst PROPERTY_MARGIN = 'margin-right'\n\n/**\n * Class definition\n */\n\nclass ScrollBarHelper {\n  constructor() {\n    this._element = document.body\n  }\n\n  // Public\n  getWidth() {\n    // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n    const documentWidth = document.documentElement.clientWidth\n    return Math.abs(window.innerWidth - documentWidth)\n  }\n\n  hide() {\n    const width = this.getWidth()\n    this._disableOverFlow()\n    // give padding to element to balance the hidden scrollbar width\n    this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width)\n    // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n    this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width)\n    this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width)\n  }\n\n  reset() {\n    this._resetElementAttributes(this._element, 'overflow')\n    this._resetElementAttributes(this._element, PROPERTY_PADDING)\n    this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING)\n    this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN)\n  }\n\n  isOverflowing() {\n    return this.getWidth() > 0\n  }\n\n  // Private\n  _disableOverFlow() {\n    this._saveInitialAttribute(this._element, 'overflow')\n    this._element.style.overflow = 'hidden'\n  }\n\n  _setElementAttributes(selector, styleProperty, callback) {\n    const scrollbarWidth = this.getWidth()\n    const manipulationCallBack = element => {\n      if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n        return\n      }\n\n      this._saveInitialAttribute(element, styleProperty)\n      const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty)\n      element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`)\n    }\n\n    this._applyManipulationCallback(selector, manipulationCallBack)\n  }\n\n  _saveInitialAttribute(element, styleProperty) {\n    const actualValue = element.style.getPropertyValue(styleProperty)\n    if (actualValue) {\n      Manipulator.setDataAttribute(element, styleProperty, actualValue)\n    }\n  }\n\n  _resetElementAttributes(selector, styleProperty) {\n    const manipulationCallBack = element => {\n      const value = Manipulator.getDataAttribute(element, styleProperty)\n      // We only want to remove the property if the value is `null`; the value can also be zero\n      if (value === null) {\n        element.style.removeProperty(styleProperty)\n        return\n      }\n\n      Manipulator.removeDataAttribute(element, styleProperty)\n      element.style.setProperty(styleProperty, value)\n    }\n\n    this._applyManipulationCallback(selector, manipulationCallBack)\n  }\n\n  _applyManipulationCallback(selector, callBack) {\n    if (isElement(selector)) {\n      callBack(selector)\n      return\n    }\n\n    for (const sel of SelectorEngine.find(selector, this._element)) {\n      callBack(sel)\n    }\n  }\n}\n\nexport default ScrollBarHelper\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport Backdrop from './util/backdrop.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport FocusTrap from './util/focustrap.js'\nimport {\n  defineJQueryPlugin, isRTL, isVisible, reflow\n} from './util/index.js'\nimport ScrollBarHelper from './util/scrollbar.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'modal'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst ESCAPE_KEY = 'Escape'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst OPEN_SELECTOR = '.modal.show'\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]'\n\nconst Default = {\n  backdrop: true,\n  focus: true,\n  keyboard: true\n}\n\nconst DefaultType = {\n  backdrop: '(boolean|string)',\n  focus: 'boolean',\n  keyboard: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Modal extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element)\n    this._backdrop = this._initializeBackDrop()\n    this._focustrap = this._initializeFocusTrap()\n    this._isShown = false\n    this._isTransitioning = false\n    this._scrollBar = new ScrollBarHelper()\n\n    this._addEventListeners()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle(relatedTarget) {\n    return this._isShown ? this.hide() : this.show(relatedTarget)\n  }\n\n  show(relatedTarget) {\n    if (this._isShown || this._isTransitioning) {\n      return\n    }\n\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n      relatedTarget\n    })\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._isShown = true\n    this._isTransitioning = true\n\n    this._scrollBar.hide()\n\n    document.body.classList.add(CLASS_NAME_OPEN)\n\n    this._adjustDialog()\n\n    this._backdrop.show(() => this._showElement(relatedTarget))\n  }\n\n  hide() {\n    if (!this._isShown || this._isTransitioning) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    this._isShown = false\n    this._isTransitioning = true\n    this._focustrap.deactivate()\n\n    this._element.classList.remove(CLASS_NAME_SHOW)\n\n    this._queueCallback(() => this._hideModal(), this._element, this._isAnimated())\n  }\n\n  dispose() {\n    EventHandler.off(window, EVENT_KEY)\n    EventHandler.off(this._dialog, EVENT_KEY)\n\n    this._backdrop.dispose()\n    this._focustrap.deactivate()\n\n    super.dispose()\n  }\n\n  handleUpdate() {\n    this._adjustDialog()\n  }\n\n  // Private\n  _initializeBackDrop() {\n    return new Backdrop({\n      isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value,\n      isAnimated: this._isAnimated()\n    })\n  }\n\n  _initializeFocusTrap() {\n    return new FocusTrap({\n      trapElement: this._element\n    })\n  }\n\n  _showElement(relatedTarget) {\n    // try to append dynamic modal\n    if (!document.body.contains(this._element)) {\n      document.body.append(this._element)\n    }\n\n    this._element.style.display = 'block'\n    this._element.removeAttribute('aria-hidden')\n    this._element.setAttribute('aria-modal', true)\n    this._element.setAttribute('role', 'dialog')\n    this._element.scrollTop = 0\n\n    const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)\n    if (modalBody) {\n      modalBody.scrollTop = 0\n    }\n\n    reflow(this._element)\n\n    this._element.classList.add(CLASS_NAME_SHOW)\n\n    const transitionComplete = () => {\n      if (this._config.focus) {\n        this._focustrap.activate()\n      }\n\n      this._isTransitioning = false\n      EventHandler.trigger(this._element, EVENT_SHOWN, {\n        relatedTarget\n      })\n    }\n\n    this._queueCallback(transitionComplete, this._dialog, this._isAnimated())\n  }\n\n  _addEventListeners() {\n    EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n      if (event.key !== ESCAPE_KEY) {\n        return\n      }\n\n      if (this._config.keyboard) {\n        this.hide()\n        return\n      }\n\n      this._triggerBackdropTransition()\n    })\n\n    EventHandler.on(window, EVENT_RESIZE, () => {\n      if (this._isShown && !this._isTransitioning) {\n        this._adjustDialog()\n      }\n    })\n\n    EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n      // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n      EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n        if (this._element !== event.target || this._element !== event2.target) {\n          return\n        }\n\n        if (this._config.backdrop === 'static') {\n          this._triggerBackdropTransition()\n          return\n        }\n\n        if (this._config.backdrop) {\n          this.hide()\n        }\n      })\n    })\n  }\n\n  _hideModal() {\n    this._element.style.display = 'none'\n    this._element.setAttribute('aria-hidden', true)\n    this._element.removeAttribute('aria-modal')\n    this._element.removeAttribute('role')\n    this._isTransitioning = false\n\n    this._backdrop.hide(() => {\n      document.body.classList.remove(CLASS_NAME_OPEN)\n      this._resetAdjustments()\n      this._scrollBar.reset()\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    })\n  }\n\n  _isAnimated() {\n    return this._element.classList.contains(CLASS_NAME_FADE)\n  }\n\n  _triggerBackdropTransition() {\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n    const initialOverflowY = this._element.style.overflowY\n    // return if the following background transition hasn't yet completed\n    if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n      return\n    }\n\n    if (!isModalOverflowing) {\n      this._element.style.overflowY = 'hidden'\n    }\n\n    this._element.classList.add(CLASS_NAME_STATIC)\n    this._queueCallback(() => {\n      this._element.classList.remove(CLASS_NAME_STATIC)\n      this._queueCallback(() => {\n        this._element.style.overflowY = initialOverflowY\n      }, this._dialog)\n    }, this._dialog)\n\n    this._element.focus()\n  }\n\n  /**\n   * The following methods are used to handle overflowing modals\n   */\n\n  _adjustDialog() {\n    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n    const scrollbarWidth = this._scrollBar.getWidth()\n    const isBodyOverflowing = scrollbarWidth > 0\n\n    if (isBodyOverflowing && !isModalOverflowing) {\n      const property = isRTL() ? 'paddingLeft' : 'paddingRight'\n      this._element.style[property] = `${scrollbarWidth}px`\n    }\n\n    if (!isBodyOverflowing && isModalOverflowing) {\n      const property = isRTL() ? 'paddingRight' : 'paddingLeft'\n      this._element.style[property] = `${scrollbarWidth}px`\n    }\n  }\n\n  _resetAdjustments() {\n    this._element.style.paddingLeft = ''\n    this._element.style.paddingRight = ''\n  }\n\n  // Static\n  static jQueryInterface(config, relatedTarget) {\n    return this.each(function () {\n      const data = Modal.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config](relatedTarget)\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  const target = SelectorEngine.getElementFromSelector(this)\n\n  if (['A', 'AREA'].includes(this.tagName)) {\n    event.preventDefault()\n  }\n\n  EventHandler.one(target, EVENT_SHOW, showEvent => {\n    if (showEvent.defaultPrevented) {\n      // only register focus restorer if modal will actually get shown\n      return\n    }\n\n    EventHandler.one(target, EVENT_HIDDEN, () => {\n      if (isVisible(this)) {\n        this.focus()\n      }\n    })\n  })\n\n  // avoid conflict when clicking modal toggler while another one is open\n  const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)\n  if (alreadyOpen) {\n    Modal.getInstance(alreadyOpen).hide()\n  }\n\n  const data = Modal.getOrCreateInstance(target)\n\n  data.toggle(this)\n})\n\nenableDismissTrigger(Modal)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Modal)\n\nexport default Modal\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport Backdrop from './util/backdrop.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport FocusTrap from './util/focustrap.js'\nimport {\n  defineJQueryPlugin,\n  isDisabled,\n  isVisible\n} from './util/index.js'\nimport ScrollBarHelper from './util/scrollbar.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'offcanvas'\nconst DATA_KEY = 'bs.offcanvas'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst ESCAPE_KEY = 'Escape'\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\nconst CLASS_NAME_HIDING = 'hiding'\nconst CLASS_NAME_BACKDROP = 'offcanvas-backdrop'\nconst OPEN_SELECTOR = '.offcanvas.show'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"offcanvas\"]'\n\nconst Default = {\n  backdrop: true,\n  keyboard: true,\n  scroll: false\n}\n\nconst DefaultType = {\n  backdrop: '(boolean|string)',\n  keyboard: 'boolean',\n  scroll: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Offcanvas extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._isShown = false\n    this._backdrop = this._initializeBackDrop()\n    this._focustrap = this._initializeFocusTrap()\n    this._addEventListeners()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle(relatedTarget) {\n    return this._isShown ? this.hide() : this.show(relatedTarget)\n  }\n\n  show(relatedTarget) {\n    if (this._isShown) {\n      return\n    }\n\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, { relatedTarget })\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._isShown = true\n    this._backdrop.show()\n\n    if (!this._config.scroll) {\n      new ScrollBarHelper().hide()\n    }\n\n    this._element.setAttribute('aria-modal', true)\n    this._element.setAttribute('role', 'dialog')\n    this._element.classList.add(CLASS_NAME_SHOWING)\n\n    const completeCallBack = () => {\n      if (!this._config.scroll || this._config.backdrop) {\n        this._focustrap.activate()\n      }\n\n      this._element.classList.add(CLASS_NAME_SHOW)\n      this._element.classList.remove(CLASS_NAME_SHOWING)\n      EventHandler.trigger(this._element, EVENT_SHOWN, { relatedTarget })\n    }\n\n    this._queueCallback(completeCallBack, this._element, true)\n  }\n\n  hide() {\n    if (!this._isShown) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    this._focustrap.deactivate()\n    this._element.blur()\n    this._isShown = false\n    this._element.classList.add(CLASS_NAME_HIDING)\n    this._backdrop.hide()\n\n    const completeCallback = () => {\n      this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING)\n      this._element.removeAttribute('aria-modal')\n      this._element.removeAttribute('role')\n\n      if (!this._config.scroll) {\n        new ScrollBarHelper().reset()\n      }\n\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    }\n\n    this._queueCallback(completeCallback, this._element, true)\n  }\n\n  dispose() {\n    this._backdrop.dispose()\n    this._focustrap.deactivate()\n    super.dispose()\n  }\n\n  // Private\n  _initializeBackDrop() {\n    const clickCallback = () => {\n      if (this._config.backdrop === 'static') {\n        EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n        return\n      }\n\n      this.hide()\n    }\n\n    // 'static' option will be translated to true, and booleans will keep their value\n    const isVisible = Boolean(this._config.backdrop)\n\n    return new Backdrop({\n      className: CLASS_NAME_BACKDROP,\n      isVisible,\n      isAnimated: true,\n      rootElement: this._element.parentNode,\n      clickCallback: isVisible ? clickCallback : null\n    })\n  }\n\n  _initializeFocusTrap() {\n    return new FocusTrap({\n      trapElement: this._element\n    })\n  }\n\n  _addEventListeners() {\n    EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n      if (event.key !== ESCAPE_KEY) {\n        return\n      }\n\n      if (this._config.keyboard) {\n        this.hide()\n        return\n      }\n\n      EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n    })\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Offcanvas.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config](this)\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  const target = SelectorEngine.getElementFromSelector(this)\n\n  if (['A', 'AREA'].includes(this.tagName)) {\n    event.preventDefault()\n  }\n\n  if (isDisabled(this)) {\n    return\n  }\n\n  EventHandler.one(target, EVENT_HIDDEN, () => {\n    // focus on trigger when it is closed\n    if (isVisible(this)) {\n      this.focus()\n    }\n  })\n\n  // avoid conflict when clicking a toggler of an offcanvas, while another is open\n  const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)\n  if (alreadyOpen && alreadyOpen !== target) {\n    Offcanvas.getInstance(alreadyOpen).hide()\n  }\n\n  const data = Offcanvas.getOrCreateInstance(target)\n  data.toggle(this)\n})\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n    Offcanvas.getOrCreateInstance(selector).show()\n  }\n})\n\nEventHandler.on(window, EVENT_RESIZE, () => {\n  for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n    if (getComputedStyle(element).position !== 'fixed') {\n      Offcanvas.getOrCreateInstance(element).hide()\n    }\n  }\n})\n\nenableDismissTrigger(Offcanvas)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Offcanvas)\n\nexport default Offcanvas\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n// js-docs-start allow-list\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\nexport const DefaultAllowlist = {\n  // Global attributes allowed on any supplied element below.\n  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n  a: ['target', 'href', 'title', 'rel'],\n  area: [],\n  b: [],\n  br: [],\n  col: [],\n  code: [],\n  dd: [],\n  div: [],\n  dl: [],\n  dt: [],\n  em: [],\n  hr: [],\n  h1: [],\n  h2: [],\n  h3: [],\n  h4: [],\n  h5: [],\n  h6: [],\n  i: [],\n  img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n  li: [],\n  ol: [],\n  p: [],\n  pre: [],\n  s: [],\n  small: [],\n  span: [],\n  sub: [],\n  sup: [],\n  strong: [],\n  u: [],\n  ul: []\n}\n// js-docs-end allow-list\n\nconst uriAttributes = new Set([\n  'background',\n  'cite',\n  'href',\n  'itemtype',\n  'longdesc',\n  'poster',\n  'src',\n  'xlink:href'\n])\n\n/**\n * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38\n */\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i\n\nconst allowedAttribute = (attribute, allowedAttributeList) => {\n  const attributeName = attribute.nodeName.toLowerCase()\n\n  if (allowedAttributeList.includes(attributeName)) {\n    if (uriAttributes.has(attributeName)) {\n      return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue))\n    }\n\n    return true\n  }\n\n  // Check if a regular expression validates the attribute.\n  return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp)\n    .some(regex => regex.test(attributeName))\n}\n\nexport function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n  if (!unsafeHtml.length) {\n    return unsafeHtml\n  }\n\n  if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n    return sanitizeFunction(unsafeHtml)\n  }\n\n  const domParser = new window.DOMParser()\n  const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n  const elements = [].concat(...createdDocument.body.querySelectorAll('*'))\n\n  for (const element of elements) {\n    const elementName = element.nodeName.toLowerCase()\n\n    if (!Object.keys(allowList).includes(elementName)) {\n      element.remove()\n      continue\n    }\n\n    const attributeList = [].concat(...element.attributes)\n    const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || [])\n\n    for (const attribute of attributeList) {\n      if (!allowedAttribute(attribute, allowedAttributes)) {\n        element.removeAttribute(attribute.nodeName)\n      }\n    }\n  }\n\n  return createdDocument.body.innerHTML\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport SelectorEngine from '../dom/selector-engine.js'\nimport Config from './config.js'\nimport { DefaultAllowlist, sanitizeHtml } from './sanitizer.js'\nimport { execute, getElement, isElement } from './index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'TemplateFactory'\n\nconst Default = {\n  allowList: DefaultAllowlist,\n  content: {}, // { selector : text ,  selector2 : text2 , }\n  extraClass: '',\n  html: false,\n  sanitize: true,\n  sanitizeFn: null,\n  template: '<div></div>'\n}\n\nconst DefaultType = {\n  allowList: 'object',\n  content: 'object',\n  extraClass: '(string|function)',\n  html: 'boolean',\n  sanitize: 'boolean',\n  sanitizeFn: '(null|function)',\n  template: 'string'\n}\n\nconst DefaultContentType = {\n  entry: '(string|element|function|null)',\n  selector: '(string|element)'\n}\n\n/**\n * Class definition\n */\n\nclass TemplateFactory extends Config {\n  constructor(config) {\n    super()\n    this._config = this._getConfig(config)\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  getContent() {\n    return Object.values(this._config.content)\n      .map(config => this._resolvePossibleFunction(config))\n      .filter(Boolean)\n  }\n\n  hasContent() {\n    return this.getContent().length > 0\n  }\n\n  changeContent(content) {\n    this._checkContent(content)\n    this._config.content = { ...this._config.content, ...content }\n    return this\n  }\n\n  toHtml() {\n    const templateWrapper = document.createElement('div')\n    templateWrapper.innerHTML = this._maybeSanitize(this._config.template)\n\n    for (const [selector, text] of Object.entries(this._config.content)) {\n      this._setContent(templateWrapper, text, selector)\n    }\n\n    const template = templateWrapper.children[0]\n    const extraClass = this._resolvePossibleFunction(this._config.extraClass)\n\n    if (extraClass) {\n      template.classList.add(...extraClass.split(' '))\n    }\n\n    return template\n  }\n\n  // Private\n  _typeCheckConfig(config) {\n    super._typeCheckConfig(config)\n    this._checkContent(config.content)\n  }\n\n  _checkContent(arg) {\n    for (const [selector, content] of Object.entries(arg)) {\n      super._typeCheckConfig({ selector, entry: content }, DefaultContentType)\n    }\n  }\n\n  _setContent(template, content, selector) {\n    const templateElement = SelectorEngine.findOne(selector, template)\n\n    if (!templateElement) {\n      return\n    }\n\n    content = this._resolvePossibleFunction(content)\n\n    if (!content) {\n      templateElement.remove()\n      return\n    }\n\n    if (isElement(content)) {\n      this._putElementInTemplate(getElement(content), templateElement)\n      return\n    }\n\n    if (this._config.html) {\n      templateElement.innerHTML = this._maybeSanitize(content)\n      return\n    }\n\n    templateElement.textContent = content\n  }\n\n  _maybeSanitize(arg) {\n    return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg\n  }\n\n  _resolvePossibleFunction(arg) {\n    return execute(arg, [undefined, this])\n  }\n\n  _putElementInTemplate(element, templateElement) {\n    if (this._config.html) {\n      templateElement.innerHTML = ''\n      templateElement.append(element)\n      return\n    }\n\n    templateElement.textContent = element.textContent\n  }\n}\n\nexport default TemplateFactory\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport Manipulator from './dom/manipulator.js'\nimport {\n  defineJQueryPlugin, execute, findShadowRoot, getElement, getUID, isRTL, noop\n} from './util/index.js'\nimport { DefaultAllowlist } from './util/sanitizer.js'\nimport TemplateFactory from './util/template-factory.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'tooltip'\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\nconst SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`\n\nconst EVENT_MODAL_HIDE = 'hide.bs.modal'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\nconst EVENT_HIDE = 'hide'\nconst EVENT_HIDDEN = 'hidden'\nconst EVENT_SHOW = 'show'\nconst EVENT_SHOWN = 'shown'\nconst EVENT_INSERTED = 'inserted'\nconst EVENT_CLICK = 'click'\nconst EVENT_FOCUSIN = 'focusin'\nconst EVENT_FOCUSOUT = 'focusout'\nconst EVENT_MOUSEENTER = 'mouseenter'\nconst EVENT_MOUSELEAVE = 'mouseleave'\n\nconst AttachmentMap = {\n  AUTO: 'auto',\n  TOP: 'top',\n  RIGHT: isRTL() ? 'left' : 'right',\n  BOTTOM: 'bottom',\n  LEFT: isRTL() ? 'right' : 'left'\n}\n\nconst Default = {\n  allowList: DefaultAllowlist,\n  animation: true,\n  boundary: 'clippingParents',\n  container: false,\n  customClass: '',\n  delay: 0,\n  fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n  html: false,\n  offset: [0, 6],\n  placement: 'top',\n  popperConfig: null,\n  sanitize: true,\n  sanitizeFn: null,\n  selector: false,\n  template: '<div class=\"tooltip\" role=\"tooltip\">' +\n            '<div class=\"tooltip-arrow\"></div>' +\n            '<div class=\"tooltip-inner\"></div>' +\n            '</div>',\n  title: '',\n  trigger: 'hover focus'\n}\n\nconst DefaultType = {\n  allowList: 'object',\n  animation: 'boolean',\n  boundary: '(string|element)',\n  container: '(string|element|boolean)',\n  customClass: '(string|function)',\n  delay: '(number|object)',\n  fallbackPlacements: 'array',\n  html: 'boolean',\n  offset: '(array|string|function)',\n  placement: '(string|function)',\n  popperConfig: '(null|object|function)',\n  sanitize: 'boolean',\n  sanitizeFn: '(null|function)',\n  selector: '(string|boolean)',\n  template: 'string',\n  title: '(string|element|function)',\n  trigger: 'string'\n}\n\n/**\n * Class definition\n */\n\nclass Tooltip extends BaseComponent {\n  constructor(element, config) {\n    if (typeof Popper === 'undefined') {\n      throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org/docs/v2/)')\n    }\n\n    super(element, config)\n\n    // Private\n    this._isEnabled = true\n    this._timeout = 0\n    this._isHovered = null\n    this._activeTrigger = {}\n    this._popper = null\n    this._templateFactory = null\n    this._newContent = null\n\n    // Protected\n    this.tip = null\n\n    this._setListeners()\n\n    if (!this._config.selector) {\n      this._fixTitle()\n    }\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  enable() {\n    this._isEnabled = true\n  }\n\n  disable() {\n    this._isEnabled = false\n  }\n\n  toggleEnabled() {\n    this._isEnabled = !this._isEnabled\n  }\n\n  toggle() {\n    if (!this._isEnabled) {\n      return\n    }\n\n    if (this._isShown()) {\n      this._leave()\n      return\n    }\n\n    this._enter()\n  }\n\n  dispose() {\n    clearTimeout(this._timeout)\n\n    EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n\n    if (this._element.getAttribute('data-bs-original-title')) {\n      this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'))\n    }\n\n    this._disposePopper()\n    super.dispose()\n  }\n\n  show() {\n    if (this._element.style.display === 'none') {\n      throw new Error('Please use show on visible elements')\n    }\n\n    if (!(this._isWithContent() && this._isEnabled)) {\n      return\n    }\n\n    const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW))\n    const shadowRoot = findShadowRoot(this._element)\n    const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element)\n\n    if (showEvent.defaultPrevented || !isInTheDom) {\n      return\n    }\n\n    // TODO: v6 remove this or make it optional\n    this._disposePopper()\n\n    const tip = this._getTipElement()\n\n    this._element.setAttribute('aria-describedby', tip.getAttribute('id'))\n\n    const { container } = this._config\n\n    if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n      container.append(tip)\n      EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED))\n    }\n\n    this._popper = this._createPopper(tip)\n\n    tip.classList.add(CLASS_NAME_SHOW)\n\n    // If this is a touch-enabled device we add extra\n    // empty mouseover listeners to the body's immediate children;\n    // only needed because of broken event delegation on iOS\n    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n    if ('ontouchstart' in document.documentElement) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.on(element, 'mouseover', noop)\n      }\n    }\n\n    const complete = () => {\n      EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN))\n\n      if (this._isHovered === false) {\n        this._leave()\n      }\n\n      this._isHovered = false\n    }\n\n    this._queueCallback(complete, this.tip, this._isAnimated())\n  }\n\n  hide() {\n    if (!this._isShown()) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE))\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    const tip = this._getTipElement()\n    tip.classList.remove(CLASS_NAME_SHOW)\n\n    // If this is a touch-enabled device we remove the extra\n    // empty mouseover listeners we added for iOS support\n    if ('ontouchstart' in document.documentElement) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.off(element, 'mouseover', noop)\n      }\n    }\n\n    this._activeTrigger[TRIGGER_CLICK] = false\n    this._activeTrigger[TRIGGER_FOCUS] = false\n    this._activeTrigger[TRIGGER_HOVER] = false\n    this._isHovered = null // it is a trick to support manual triggering\n\n    const complete = () => {\n      if (this._isWithActiveTrigger()) {\n        return\n      }\n\n      if (!this._isHovered) {\n        this._disposePopper()\n      }\n\n      this._element.removeAttribute('aria-describedby')\n      EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN))\n    }\n\n    this._queueCallback(complete, this.tip, this._isAnimated())\n  }\n\n  update() {\n    if (this._popper) {\n      this._popper.update()\n    }\n  }\n\n  // Protected\n  _isWithContent() {\n    return Boolean(this._getTitle())\n  }\n\n  _getTipElement() {\n    if (!this.tip) {\n      this.tip = this._createTipElement(this._newContent || this._getContentForTemplate())\n    }\n\n    return this.tip\n  }\n\n  _createTipElement(content) {\n    const tip = this._getTemplateFactory(content).toHtml()\n\n    // TODO: remove this check in v6\n    if (!tip) {\n      return null\n    }\n\n    tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n    // TODO: v6 the following can be achieved with CSS only\n    tip.classList.add(`bs-${this.constructor.NAME}-auto`)\n\n    const tipId = getUID(this.constructor.NAME).toString()\n\n    tip.setAttribute('id', tipId)\n\n    if (this._isAnimated()) {\n      tip.classList.add(CLASS_NAME_FADE)\n    }\n\n    return tip\n  }\n\n  setContent(content) {\n    this._newContent = content\n    if (this._isShown()) {\n      this._disposePopper()\n      this.show()\n    }\n  }\n\n  _getTemplateFactory(content) {\n    if (this._templateFactory) {\n      this._templateFactory.changeContent(content)\n    } else {\n      this._templateFactory = new TemplateFactory({\n        ...this._config,\n        // the `content` var has to be after `this._config`\n        // to override config.content in case of popover\n        content,\n        extraClass: this._resolvePossibleFunction(this._config.customClass)\n      })\n    }\n\n    return this._templateFactory\n  }\n\n  _getContentForTemplate() {\n    return {\n      [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n    }\n  }\n\n  _getTitle() {\n    return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title')\n  }\n\n  // Private\n  _initializeOnDelegatedTarget(event) {\n    return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())\n  }\n\n  _isAnimated() {\n    return this._config.animation || (this.tip && this.tip.classList.contains(CLASS_NAME_FADE))\n  }\n\n  _isShown() {\n    return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  _createPopper(tip) {\n    const placement = execute(this._config.placement, [this, tip, this._element])\n    const attachment = AttachmentMap[placement.toUpperCase()]\n    return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n  }\n\n  _getOffset() {\n    const { offset } = this._config\n\n    if (typeof offset === 'string') {\n      return offset.split(',').map(value => Number.parseInt(value, 10))\n    }\n\n    if (typeof offset === 'function') {\n      return popperData => offset(popperData, this._element)\n    }\n\n    return offset\n  }\n\n  _resolvePossibleFunction(arg) {\n    return execute(arg, [this._element, this._element])\n  }\n\n  _getPopperConfig(attachment) {\n    const defaultBsPopperConfig = {\n      placement: attachment,\n      modifiers: [\n        {\n          name: 'flip',\n          options: {\n            fallbackPlacements: this._config.fallbackPlacements\n          }\n        },\n        {\n          name: 'offset',\n          options: {\n            offset: this._getOffset()\n          }\n        },\n        {\n          name: 'preventOverflow',\n          options: {\n            boundary: this._config.boundary\n          }\n        },\n        {\n          name: 'arrow',\n          options: {\n            element: `.${this.constructor.NAME}-arrow`\n          }\n        },\n        {\n          name: 'preSetPlacement',\n          enabled: true,\n          phase: 'beforeMain',\n          fn: data => {\n            // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n            // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n            this._getTipElement().setAttribute('data-popper-placement', data.state.placement)\n          }\n        }\n      ]\n    }\n\n    return {\n      ...defaultBsPopperConfig,\n      ...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])\n    }\n  }\n\n  _setListeners() {\n    const triggers = this._config.trigger.split(' ')\n\n    for (const trigger of triggers) {\n      if (trigger === 'click') {\n        EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => {\n          const context = this._initializeOnDelegatedTarget(event)\n          context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK])\n          context.toggle()\n        })\n      } else if (trigger !== TRIGGER_MANUAL) {\n        const eventIn = trigger === TRIGGER_HOVER ?\n          this.constructor.eventName(EVENT_MOUSEENTER) :\n          this.constructor.eventName(EVENT_FOCUSIN)\n        const eventOut = trigger === TRIGGER_HOVER ?\n          this.constructor.eventName(EVENT_MOUSELEAVE) :\n          this.constructor.eventName(EVENT_FOCUSOUT)\n\n        EventHandler.on(this._element, eventIn, this._config.selector, event => {\n          const context = this._initializeOnDelegatedTarget(event)\n          context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true\n          context._enter()\n        })\n        EventHandler.on(this._element, eventOut, this._config.selector, event => {\n          const context = this._initializeOnDelegatedTarget(event)\n          context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] =\n            context._element.contains(event.relatedTarget)\n\n          context._leave()\n        })\n      }\n    }\n\n    this._hideModalHandler = () => {\n      if (this._element) {\n        this.hide()\n      }\n    }\n\n    EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n  }\n\n  _fixTitle() {\n    const title = this._element.getAttribute('title')\n\n    if (!title) {\n      return\n    }\n\n    if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n      this._element.setAttribute('aria-label', title)\n    }\n\n    this._element.setAttribute('data-bs-original-title', title) // DO NOT USE IT. Is only for backwards compatibility\n    this._element.removeAttribute('title')\n  }\n\n  _enter() {\n    if (this._isShown() || this._isHovered) {\n      this._isHovered = true\n      return\n    }\n\n    this._isHovered = true\n\n    this._setTimeout(() => {\n      if (this._isHovered) {\n        this.show()\n      }\n    }, this._config.delay.show)\n  }\n\n  _leave() {\n    if (this._isWithActiveTrigger()) {\n      return\n    }\n\n    this._isHovered = false\n\n    this._setTimeout(() => {\n      if (!this._isHovered) {\n        this.hide()\n      }\n    }, this._config.delay.hide)\n  }\n\n  _setTimeout(handler, timeout) {\n    clearTimeout(this._timeout)\n    this._timeout = setTimeout(handler, timeout)\n  }\n\n  _isWithActiveTrigger() {\n    return Object.values(this._activeTrigger).includes(true)\n  }\n\n  _getConfig(config) {\n    const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n    for (const dataAttribute of Object.keys(dataAttributes)) {\n      if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n        delete dataAttributes[dataAttribute]\n      }\n    }\n\n    config = {\n      ...dataAttributes,\n      ...(typeof config === 'object' && config ? config : {})\n    }\n    config = this._mergeConfigObj(config)\n    config = this._configAfterMerge(config)\n    this._typeCheckConfig(config)\n    return config\n  }\n\n  _configAfterMerge(config) {\n    config.container = config.container === false ? document.body : getElement(config.container)\n\n    if (typeof config.delay === 'number') {\n      config.delay = {\n        show: config.delay,\n        hide: config.delay\n      }\n    }\n\n    if (typeof config.title === 'number') {\n      config.title = config.title.toString()\n    }\n\n    if (typeof config.content === 'number') {\n      config.content = config.content.toString()\n    }\n\n    return config\n  }\n\n  _getDelegateConfig() {\n    const config = {}\n\n    for (const [key, value] of Object.entries(this._config)) {\n      if (this.constructor.Default[key] !== value) {\n        config[key] = value\n      }\n    }\n\n    config.selector = false\n    config.trigger = 'manual'\n\n    // In the future can be replaced with:\n    // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n    // `Object.fromEntries(keysWithDifferentValues)`\n    return config\n  }\n\n  _disposePopper() {\n    if (this._popper) {\n      this._popper.destroy()\n      this._popper = null\n    }\n\n    if (this.tip) {\n      this.tip.remove()\n      this.tip = null\n    }\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Tooltip.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Tooltip)\n\nexport default Tooltip\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Tooltip from './tooltip.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n  ...Tooltip.Default,\n  content: '',\n  offset: [0, 8],\n  placement: 'right',\n  template: '<div class=\"popover\" role=\"tooltip\">' +\n    '<div class=\"popover-arrow\"></div>' +\n    '<h3 class=\"popover-header\"></h3>' +\n    '<div class=\"popover-body\"></div>' +\n    '</div>',\n  trigger: 'click'\n}\n\nconst DefaultType = {\n  ...Tooltip.DefaultType,\n  content: '(null|string|element|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Overrides\n  _isWithContent() {\n    return this._getTitle() || this._getContent()\n  }\n\n  // Private\n  _getContentForTemplate() {\n    return {\n      [SELECTOR_TITLE]: this._getTitle(),\n      [SELECTOR_CONTENT]: this._getContent()\n    }\n  }\n\n  _getContent() {\n    return this._resolvePossibleFunction(this._config.content)\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Popover.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n  defineJQueryPlugin, getElement, isDisabled, isVisible\n} from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_TARGET_LINKS = '[href]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst Default = {\n  offset: null, // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n  rootMargin: '0px 0px -25%',\n  smoothScroll: false,\n  target: null,\n  threshold: [0.1, 0.5, 1]\n}\n\nconst DefaultType = {\n  offset: '(number|null)', // TODO v6 @deprecated, keep it for backwards compatibility reasons\n  rootMargin: 'string',\n  smoothScroll: 'boolean',\n  target: 'element',\n  threshold: 'array'\n}\n\n/**\n * Class definition\n */\n\nclass ScrollSpy extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    // this._element is the observablesContainer and config.target the menu links wrapper\n    this._targetLinks = new Map()\n    this._observableSections = new Map()\n    this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element\n    this._activeTarget = null\n    this._observer = null\n    this._previousScrollData = {\n      visibleEntryTop: 0,\n      parentScrollTop: 0\n    }\n    this.refresh() // initialize\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  refresh() {\n    this._initializeTargetsAndObservables()\n    this._maybeEnableSmoothScroll()\n\n    if (this._observer) {\n      this._observer.disconnect()\n    } else {\n      this._observer = this._getNewObserver()\n    }\n\n    for (const section of this._observableSections.values()) {\n      this._observer.observe(section)\n    }\n  }\n\n  dispose() {\n    this._observer.disconnect()\n    super.dispose()\n  }\n\n  // Private\n  _configAfterMerge(config) {\n    // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n    config.target = getElement(config.target) || document.body\n\n    // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n    config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin\n\n    if (typeof config.threshold === 'string') {\n      config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value))\n    }\n\n    return config\n  }\n\n  _maybeEnableSmoothScroll() {\n    if (!this._config.smoothScroll) {\n      return\n    }\n\n    // unregister any previous listeners\n    EventHandler.off(this._config.target, EVENT_CLICK)\n\n    EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n      const observableSection = this._observableSections.get(event.target.hash)\n      if (observableSection) {\n        event.preventDefault()\n        const root = this._rootElement || window\n        const height = observableSection.offsetTop - this._element.offsetTop\n        if (root.scrollTo) {\n          root.scrollTo({ top: height, behavior: 'smooth' })\n          return\n        }\n\n        // Chrome 60 doesn't support `scrollTo`\n        root.scrollTop = height\n      }\n    })\n  }\n\n  _getNewObserver() {\n    const options = {\n      root: this._rootElement,\n      threshold: this._config.threshold,\n      rootMargin: this._config.rootMargin\n    }\n\n    return new IntersectionObserver(entries => this._observerCallback(entries), options)\n  }\n\n  // The logic of selection\n  _observerCallback(entries) {\n    const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`)\n    const activate = entry => {\n      this._previousScrollData.visibleEntryTop = entry.target.offsetTop\n      this._process(targetElement(entry))\n    }\n\n    const parentScrollTop = (this._rootElement || document.documentElement).scrollTop\n    const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop\n    this._previousScrollData.parentScrollTop = parentScrollTop\n\n    for (const entry of entries) {\n      if (!entry.isIntersecting) {\n        this._activeTarget = null\n        this._clearActiveClass(targetElement(entry))\n\n        continue\n      }\n\n      const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop\n      // if we are scrolling down, pick the bigger offsetTop\n      if (userScrollsDown && entryIsLowerThanPrevious) {\n        activate(entry)\n        // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n        if (!parentScrollTop) {\n          return\n        }\n\n        continue\n      }\n\n      // if we are scrolling up, pick the smallest offsetTop\n      if (!userScrollsDown && !entryIsLowerThanPrevious) {\n        activate(entry)\n      }\n    }\n  }\n\n  _initializeTargetsAndObservables() {\n    this._targetLinks = new Map()\n    this._observableSections = new Map()\n\n    const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target)\n\n    for (const anchor of targetLinks) {\n      // ensure that the anchor has an id and is not disabled\n      if (!anchor.hash || isDisabled(anchor)) {\n        continue\n      }\n\n      const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element)\n\n      // ensure that the observableSection exists & is visible\n      if (isVisible(observableSection)) {\n        this._targetLinks.set(decodeURI(anchor.hash), anchor)\n        this._observableSections.set(anchor.hash, observableSection)\n      }\n    }\n  }\n\n  _process(target) {\n    if (this._activeTarget === target) {\n      return\n    }\n\n    this._clearActiveClass(this._config.target)\n    this._activeTarget = target\n    target.classList.add(CLASS_NAME_ACTIVE)\n    this._activateParents(target)\n\n    EventHandler.trigger(this._element, EVENT_ACTIVATE, { relatedTarget: target })\n  }\n\n  _activateParents(target) {\n    // Activate dropdown parents\n    if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n      SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN))\n        .classList.add(CLASS_NAME_ACTIVE)\n      return\n    }\n\n    for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n      // Set triggered links parents as active\n      // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n      for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {\n        item.classList.add(CLASS_NAME_ACTIVE)\n      }\n    }\n  }\n\n  _clearActiveClass(parent) {\n    parent.classList.remove(CLASS_NAME_ACTIVE)\n\n    const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE}`, parent)\n    for (const node of activeNodes) {\n      node.classList.remove(CLASS_NAME_ACTIVE)\n    }\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = ScrollSpy.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {\n    ScrollSpy.getOrCreateInstance(spy)\n  }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(ScrollSpy)\n\nexport default ScrollSpy\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport { defineJQueryPlugin, getNextActiveElement, isDisabled } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'tab'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}`\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst HOME_KEY = 'Home'\nconst END_KEY = 'End'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_DROPDOWN = 'dropdown'\n\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\nconst SELECTOR_DROPDOWN_MENU = '.dropdown-menu'\nconst NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`\n\nconst SELECTOR_TAB_PANEL = '.list-group, .nav, [role=\"tablist\"]'\nconst SELECTOR_OUTER = '.nav-item, .list-group-item'\nconst SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role=\"tab\"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]' // TODO: could only be `tab` in v6\nconst SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`\n\nconst SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle=\"tab\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"pill\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"list\"]`\n\n/**\n * Class definition\n */\n\nclass Tab extends BaseComponent {\n  constructor(element) {\n    super(element)\n    this._parent = this._element.closest(SELECTOR_TAB_PANEL)\n\n    if (!this._parent) {\n      return\n      // TODO: should throw exception in v6\n      // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)\n    }\n\n    // Set up initial aria attributes\n    this._setInitialAttributes(this._parent, this._getChildren())\n\n    EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n  }\n\n  // Getters\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  show() { // Shows this elem and deactivate the active sibling if exists\n    const innerElem = this._element\n    if (this._elemIsActive(innerElem)) {\n      return\n    }\n\n    // Search for active tab on same parent to deactivate it\n    const active = this._getActiveElem()\n\n    const hideEvent = active ?\n      EventHandler.trigger(active, EVENT_HIDE, { relatedTarget: innerElem }) :\n      null\n\n    const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW, { relatedTarget: active })\n\n    if (showEvent.defaultPrevented || (hideEvent && hideEvent.defaultPrevented)) {\n      return\n    }\n\n    this._deactivate(active, innerElem)\n    this._activate(innerElem, active)\n  }\n\n  // Private\n  _activate(element, relatedElem) {\n    if (!element) {\n      return\n    }\n\n    element.classList.add(CLASS_NAME_ACTIVE)\n\n    this._activate(SelectorEngine.getElementFromSelector(element)) // Search and activate/show the proper section\n\n    const complete = () => {\n      if (element.getAttribute('role') !== 'tab') {\n        element.classList.add(CLASS_NAME_SHOW)\n        return\n      }\n\n      element.removeAttribute('tabindex')\n      element.setAttribute('aria-selected', true)\n      this._toggleDropDown(element, true)\n      EventHandler.trigger(element, EVENT_SHOWN, {\n        relatedTarget: relatedElem\n      })\n    }\n\n    this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE))\n  }\n\n  _deactivate(element, relatedElem) {\n    if (!element) {\n      return\n    }\n\n    element.classList.remove(CLASS_NAME_ACTIVE)\n    element.blur()\n\n    this._deactivate(SelectorEngine.getElementFromSelector(element)) // Search and deactivate the shown section too\n\n    const complete = () => {\n      if (element.getAttribute('role') !== 'tab') {\n        element.classList.remove(CLASS_NAME_SHOW)\n        return\n      }\n\n      element.setAttribute('aria-selected', false)\n      element.setAttribute('tabindex', '-1')\n      this._toggleDropDown(element, false)\n      EventHandler.trigger(element, EVENT_HIDDEN, { relatedTarget: relatedElem })\n    }\n\n    this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE))\n  }\n\n  _keydown(event) {\n    if (!([ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key))) {\n      return\n    }\n\n    event.stopPropagation()// stopPropagation/preventDefault both added to support up/down keys without scrolling the page\n    event.preventDefault()\n\n    const children = this._getChildren().filter(element => !isDisabled(element))\n    let nextActiveElement\n\n    if ([HOME_KEY, END_KEY].includes(event.key)) {\n      nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1]\n    } else {\n      const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key)\n      nextActiveElement = getNextActiveElement(children, event.target, isNext, true)\n    }\n\n    if (nextActiveElement) {\n      nextActiveElement.focus({ preventScroll: true })\n      Tab.getOrCreateInstance(nextActiveElement).show()\n    }\n  }\n\n  _getChildren() { // collection of inner elements\n    return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent)\n  }\n\n  _getActiveElem() {\n    return this._getChildren().find(child => this._elemIsActive(child)) || null\n  }\n\n  _setInitialAttributes(parent, children) {\n    this._setAttributeIfNotExists(parent, 'role', 'tablist')\n\n    for (const child of children) {\n      this._setInitialAttributesOnChild(child)\n    }\n  }\n\n  _setInitialAttributesOnChild(child) {\n    child = this._getInnerElement(child)\n    const isActive = this._elemIsActive(child)\n    const outerElem = this._getOuterElement(child)\n    child.setAttribute('aria-selected', isActive)\n\n    if (outerElem !== child) {\n      this._setAttributeIfNotExists(outerElem, 'role', 'presentation')\n    }\n\n    if (!isActive) {\n      child.setAttribute('tabindex', '-1')\n    }\n\n    this._setAttributeIfNotExists(child, 'role', 'tab')\n\n    // set attributes to the related panel too\n    this._setInitialAttributesOnTargetPanel(child)\n  }\n\n  _setInitialAttributesOnTargetPanel(child) {\n    const target = SelectorEngine.getElementFromSelector(child)\n\n    if (!target) {\n      return\n    }\n\n    this._setAttributeIfNotExists(target, 'role', 'tabpanel')\n\n    if (child.id) {\n      this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`)\n    }\n  }\n\n  _toggleDropDown(element, open) {\n    const outerElem = this._getOuterElement(element)\n    if (!outerElem.classList.contains(CLASS_DROPDOWN)) {\n      return\n    }\n\n    const toggle = (selector, className) => {\n      const element = SelectorEngine.findOne(selector, outerElem)\n      if (element) {\n        element.classList.toggle(className, open)\n      }\n    }\n\n    toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE)\n    toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW)\n    outerElem.setAttribute('aria-expanded', open)\n  }\n\n  _setAttributeIfNotExists(element, attribute, value) {\n    if (!element.hasAttribute(attribute)) {\n      element.setAttribute(attribute, value)\n    }\n  }\n\n  _elemIsActive(elem) {\n    return elem.classList.contains(CLASS_NAME_ACTIVE)\n  }\n\n  // Try to get the inner element (usually the .nav-link)\n  _getInnerElement(elem) {\n    return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem)\n  }\n\n  // Try to get the outer element (usually the .nav-item)\n  _getOuterElement(elem) {\n    return elem.closest(SELECTOR_OUTER) || elem\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Tab.getOrCreateInstance(this)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  if (['A', 'AREA'].includes(this.tagName)) {\n    event.preventDefault()\n  }\n\n  if (isDisabled(this)) {\n    return\n  }\n\n  Tab.getOrCreateInstance(this).show()\n})\n\n/**\n * Initialize on focus\n */\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {\n    Tab.getOrCreateInstance(element)\n  }\n})\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Tab)\n\nexport default Tab\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin, reflow } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'toast'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`\nconst EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_FOCUSOUT = `focusout${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_HIDE = 'hide' // @deprecated - kept here only for backwards compatibility\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\n\nconst DefaultType = {\n  animation: 'boolean',\n  autohide: 'boolean',\n  delay: 'number'\n}\n\nconst Default = {\n  animation: true,\n  autohide: true,\n  delay: 5000\n}\n\n/**\n * Class definition\n */\n\nclass Toast extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._timeout = null\n    this._hasMouseInteraction = false\n    this._hasKeyboardInteraction = false\n    this._setListeners()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  show() {\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._clearTimeout()\n\n    if (this._config.animation) {\n      this._element.classList.add(CLASS_NAME_FADE)\n    }\n\n    const complete = () => {\n      this._element.classList.remove(CLASS_NAME_SHOWING)\n      EventHandler.trigger(this._element, EVENT_SHOWN)\n\n      this._maybeScheduleHide()\n    }\n\n    this._element.classList.remove(CLASS_NAME_HIDE) // @deprecated\n    reflow(this._element)\n    this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING)\n\n    this._queueCallback(complete, this._element, this._config.animation)\n  }\n\n  hide() {\n    if (!this.isShown()) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    const complete = () => {\n      this._element.classList.add(CLASS_NAME_HIDE) // @deprecated\n      this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW)\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    }\n\n    this._element.classList.add(CLASS_NAME_SHOWING)\n    this._queueCallback(complete, this._element, this._config.animation)\n  }\n\n  dispose() {\n    this._clearTimeout()\n\n    if (this.isShown()) {\n      this._element.classList.remove(CLASS_NAME_SHOW)\n    }\n\n    super.dispose()\n  }\n\n  isShown() {\n    return this._element.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  // Private\n  _maybeScheduleHide() {\n    if (!this._config.autohide) {\n      return\n    }\n\n    if (this._hasMouseInteraction || this._hasKeyboardInteraction) {\n      return\n    }\n\n    this._timeout = setTimeout(() => {\n      this.hide()\n    }, this._config.delay)\n  }\n\n  _onInteraction(event, isInteracting) {\n    switch (event.type) {\n      case 'mouseover':\n      case 'mouseout': {\n        this._hasMouseInteraction = isInteracting\n        break\n      }\n\n      case 'focusin':\n      case 'focusout': {\n        this._hasKeyboardInteraction = isInteracting\n        break\n      }\n\n      default: {\n        break\n      }\n    }\n\n    if (isInteracting) {\n      this._clearTimeout()\n      return\n    }\n\n    const nextElement = event.relatedTarget\n    if (this._element === nextElement || this._element.contains(nextElement)) {\n      return\n    }\n\n    this._maybeScheduleHide()\n  }\n\n  _setListeners() {\n    EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true))\n    EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false))\n    EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true))\n    EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false))\n  }\n\n  _clearTimeout() {\n    clearTimeout(this._timeout)\n    this._timeout = null\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Toast.getOrCreateInstance(this, config)\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config](this)\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Toast)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Toast)\n\nexport default Toast\n", "import {Controller} from \"@hotwired/stimulus\"\nimport {Modal} from \"bootstrap\"\n\nexport default class extends Controller {\n    static values = {\n        delay: Number,\n        redirectPath: String\n    }\n\n    connect() {\n        this.modal = new Modal(this.element);\n        this.modal.show();\n        this.timeoutId = setTimeout(() => {\n            this.autoSaveAndRedirect();\n        }, this.delayValue);\n    }\n\n    disconnect() {\n        clearTimeout(this.timeoutId);\n    }\n\n    autoSaveAndRedirect() {\n        this.disableFormLeave();\n\n        const autoSaveFlags = document.querySelectorAll('.auto_save_flag');\n        if (autoSaveFlags.length > 0) {\n            autoSaveFlags.forEach((flag) => {\n                flag.value = 'true';\n            });\n            this.saveChanges();\n        } else {\n            window.location.href = this.redirectPathValue;\n        }\n\n        setTimeout(() => {\n            console.log(\"Force redirect.\")\n            this.forceRedirect();\n        }, 3500);\n    }\n\n    saveChanges() {\n        const submitButtons = this.querySubmitButtons();\n        console.log(`Triggering submit on ${submitButtons.length} forms.`);\n        if (submitButtons.length > 0) {\n            submitButtons.forEach((button) => button.click());\n        }\n    }\n\n    querySubmitButtons() {\n        const timeSettingsForm = document.querySelector('#timeSettingsForm');\n        if (timeSettingsForm) {\n            const selectedRadio = document.querySelector('input[name=\"tutorial[time_type]\"]:checked');\n            const radioBsTargetId = selectedRadio.value;\n            const form = this.getTimeSettingsForm(radioBsTargetId);\n            return form ? form.querySelectorAll('button[name=\"button\"][type=\"submit\"]') : [];\n        } else {\n            const selector = 'button[name=\"button\"][type=\"submit\"]:not([data-triggers-external-api])';\n            return document.querySelectorAll(selector);\n        }\n    }\n\n    getTimeSettingsForm(bsTargetId) {\n        if (parseInt(bsTargetId) === 0) {\n            return null;\n        } else if (parseInt(bsTargetId) === 1) {\n            return document.querySelector('#repetitionsAreaForm');\n        } else if (parseInt(bsTargetId) === 2) {\n            return document.querySelector('#exceedsAreaForm');\n        } else if (parseInt(bsTargetId) === 3) {\n            return document.querySelector('#dripFeedSettingsAreaForm');\n        }\n    }\n\n    disableFormLeave() {\n        document.querySelectorAll('[data-controller~=\"form-leave\"]').forEach(el => {\n            el.dataset.preventLeave = \"false\";\n        });\n    }\n\n    forceRedirect() {\n        this.disableFormLeave();\n\n        document.querySelectorAll('form').forEach(form => form.remove());\n        window.location.href = this.redirectPathValue;\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {debounce} from 'debounce'\n\nexport default class extends Controller {\n    initialize() {\n        this.save = this.save.bind(this)\n    }\n\n    connect() {\n        this.save = debounce(this.save, 50)\n    }\n\n    save() {\n        if (!window._rails_loaded) return\n        if (!this.element.reportValidity()) return\n\n        let defaultPrevented = Rails.fire(this.element, 'submit')\n        // Submit the form when Rails prevented the default behavior. ++Rails.fire++ return false if the form is remote.\n        if (defaultPrevented) this.element.submit()\n    }\n}\n", "/*!\n * Chart.js v3.9.1\n * https://www.chartjs.org\n * (c) 2022 Chart.js Contributors\n * Released under the MIT License\n */\nfunction noop() {}\nconst uid = (function() {\n  let id = 0;\n  return function() {\n    return id++;\n  };\n}());\nfunction isNullOrUndef(value) {\n  return value === null || typeof value === 'undefined';\n}\nfunction isArray(value) {\n  if (Array.isArray && Array.isArray(value)) {\n    return true;\n  }\n  const type = Object.prototype.toString.call(value);\n  if (type.slice(0, 7) === '[object' && type.slice(-6) === 'Array]') {\n    return true;\n  }\n  return false;\n}\nfunction isObject(value) {\n  return value !== null && Object.prototype.toString.call(value) === '[object Object]';\n}\nconst isNumberFinite = (value) => (typeof value === 'number' || value instanceof Number) && isFinite(+value);\nfunction finiteOrDefault(value, defaultValue) {\n  return isNumberFinite(value) ? value : defaultValue;\n}\nfunction valueOrDefault(value, defaultValue) {\n  return typeof value === 'undefined' ? defaultValue : value;\n}\nconst toPercentage = (value, dimension) =>\n  typeof value === 'string' && value.endsWith('%') ?\n    parseFloat(value) / 100\n    : value / dimension;\nconst toDimension = (value, dimension) =>\n  typeof value === 'string' && value.endsWith('%') ?\n    parseFloat(value) / 100 * dimension\n    : +value;\nfunction callback(fn, args, thisArg) {\n  if (fn && typeof fn.call === 'function') {\n    return fn.apply(thisArg, args);\n  }\n}\nfunction each(loopable, fn, thisArg, reverse) {\n  let i, len, keys;\n  if (isArray(loopable)) {\n    len = loopable.length;\n    if (reverse) {\n      for (i = len - 1; i >= 0; i--) {\n        fn.call(thisArg, loopable[i], i);\n      }\n    } else {\n      for (i = 0; i < len; i++) {\n        fn.call(thisArg, loopable[i], i);\n      }\n    }\n  } else if (isObject(loopable)) {\n    keys = Object.keys(loopable);\n    len = keys.length;\n    for (i = 0; i < len; i++) {\n      fn.call(thisArg, loopable[keys[i]], keys[i]);\n    }\n  }\n}\nfunction _elementsEqual(a0, a1) {\n  let i, ilen, v0, v1;\n  if (!a0 || !a1 || a0.length !== a1.length) {\n    return false;\n  }\n  for (i = 0, ilen = a0.length; i < ilen; ++i) {\n    v0 = a0[i];\n    v1 = a1[i];\n    if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction clone$1(source) {\n  if (isArray(source)) {\n    return source.map(clone$1);\n  }\n  if (isObject(source)) {\n    const target = Object.create(null);\n    const keys = Object.keys(source);\n    const klen = keys.length;\n    let k = 0;\n    for (; k < klen; ++k) {\n      target[keys[k]] = clone$1(source[keys[k]]);\n    }\n    return target;\n  }\n  return source;\n}\nfunction isValidKey(key) {\n  return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\n}\nfunction _merger(key, target, source, options) {\n  if (!isValidKey(key)) {\n    return;\n  }\n  const tval = target[key];\n  const sval = source[key];\n  if (isObject(tval) && isObject(sval)) {\n    merge(tval, sval, options);\n  } else {\n    target[key] = clone$1(sval);\n  }\n}\nfunction merge(target, source, options) {\n  const sources = isArray(source) ? source : [source];\n  const ilen = sources.length;\n  if (!isObject(target)) {\n    return target;\n  }\n  options = options || {};\n  const merger = options.merger || _merger;\n  for (let i = 0; i < ilen; ++i) {\n    source = sources[i];\n    if (!isObject(source)) {\n      continue;\n    }\n    const keys = Object.keys(source);\n    for (let k = 0, klen = keys.length; k < klen; ++k) {\n      merger(keys[k], target, source, options);\n    }\n  }\n  return target;\n}\nfunction mergeIf(target, source) {\n  return merge(target, source, {merger: _mergerIf});\n}\nfunction _mergerIf(key, target, source) {\n  if (!isValidKey(key)) {\n    return;\n  }\n  const tval = target[key];\n  const sval = source[key];\n  if (isObject(tval) && isObject(sval)) {\n    mergeIf(tval, sval);\n  } else if (!Object.prototype.hasOwnProperty.call(target, key)) {\n    target[key] = clone$1(sval);\n  }\n}\nfunction _deprecated(scope, value, previous, current) {\n  if (value !== undefined) {\n    console.warn(scope + ': \"' + previous +\n\t\t\t'\" is deprecated. Please use \"' + current + '\" instead');\n  }\n}\nconst keyResolvers = {\n  '': v => v,\n  x: o => o.x,\n  y: o => o.y\n};\nfunction resolveObjectKey(obj, key) {\n  const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));\n  return resolver(obj);\n}\nfunction _getKeyResolver(key) {\n  const keys = _splitKey(key);\n  return obj => {\n    for (const k of keys) {\n      if (k === '') {\n        break;\n      }\n      obj = obj && obj[k];\n    }\n    return obj;\n  };\n}\nfunction _splitKey(key) {\n  const parts = key.split('.');\n  const keys = [];\n  let tmp = '';\n  for (const part of parts) {\n    tmp += part;\n    if (tmp.endsWith('\\\\')) {\n      tmp = tmp.slice(0, -1) + '.';\n    } else {\n      keys.push(tmp);\n      tmp = '';\n    }\n  }\n  return keys;\n}\nfunction _capitalize(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\nconst defined = (value) => typeof value !== 'undefined';\nconst isFunction = (value) => typeof value === 'function';\nconst setsEqual = (a, b) => {\n  if (a.size !== b.size) {\n    return false;\n  }\n  for (const item of a) {\n    if (!b.has(item)) {\n      return false;\n    }\n  }\n  return true;\n};\nfunction _isClickEvent(e) {\n  return e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu';\n}\n\nconst PI = Math.PI;\nconst TAU = 2 * PI;\nconst PITAU = TAU + PI;\nconst INFINITY = Number.POSITIVE_INFINITY;\nconst RAD_PER_DEG = PI / 180;\nconst HALF_PI = PI / 2;\nconst QUARTER_PI = PI / 4;\nconst TWO_THIRDS_PI = PI * 2 / 3;\nconst log10 = Math.log10;\nconst sign = Math.sign;\nfunction niceNum(range) {\n  const roundedRange = Math.round(range);\n  range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;\n  const niceRange = Math.pow(10, Math.floor(log10(range)));\n  const fraction = range / niceRange;\n  const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;\n  return niceFraction * niceRange;\n}\nfunction _factorize(value) {\n  const result = [];\n  const sqrt = Math.sqrt(value);\n  let i;\n  for (i = 1; i < sqrt; i++) {\n    if (value % i === 0) {\n      result.push(i);\n      result.push(value / i);\n    }\n  }\n  if (sqrt === (sqrt | 0)) {\n    result.push(sqrt);\n  }\n  result.sort((a, b) => a - b).pop();\n  return result;\n}\nfunction isNumber(n) {\n  return !isNaN(parseFloat(n)) && isFinite(n);\n}\nfunction almostEquals(x, y, epsilon) {\n  return Math.abs(x - y) < epsilon;\n}\nfunction almostWhole(x, epsilon) {\n  const rounded = Math.round(x);\n  return ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);\n}\nfunction _setMinAndMaxByKey(array, target, property) {\n  let i, ilen, value;\n  for (i = 0, ilen = array.length; i < ilen; i++) {\n    value = array[i][property];\n    if (!isNaN(value)) {\n      target.min = Math.min(target.min, value);\n      target.max = Math.max(target.max, value);\n    }\n  }\n}\nfunction toRadians(degrees) {\n  return degrees * (PI / 180);\n}\nfunction toDegrees(radians) {\n  return radians * (180 / PI);\n}\nfunction _decimalPlaces(x) {\n  if (!isNumberFinite(x)) {\n    return;\n  }\n  let e = 1;\n  let p = 0;\n  while (Math.round(x * e) / e !== x) {\n    e *= 10;\n    p++;\n  }\n  return p;\n}\nfunction getAngleFromPoint(centrePoint, anglePoint) {\n  const distanceFromXCenter = anglePoint.x - centrePoint.x;\n  const distanceFromYCenter = anglePoint.y - centrePoint.y;\n  const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n  let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n  if (angle < (-0.5 * PI)) {\n    angle += TAU;\n  }\n  return {\n    angle,\n    distance: radialDistanceFromCenter\n  };\n}\nfunction distanceBetweenPoints(pt1, pt2) {\n  return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n}\nfunction _angleDiff(a, b) {\n  return (a - b + PITAU) % TAU - PI;\n}\nfunction _normalizeAngle(a) {\n  return (a % TAU + TAU) % TAU;\n}\nfunction _angleBetween(angle, start, end, sameAngleIsFullCircle) {\n  const a = _normalizeAngle(angle);\n  const s = _normalizeAngle(start);\n  const e = _normalizeAngle(end);\n  const angleToStart = _normalizeAngle(s - a);\n  const angleToEnd = _normalizeAngle(e - a);\n  const startToAngle = _normalizeAngle(a - s);\n  const endToAngle = _normalizeAngle(a - e);\n  return a === s || a === e || (sameAngleIsFullCircle && s === e)\n    || (angleToStart > angleToEnd && startToAngle < endToAngle);\n}\nfunction _limitValue(value, min, max) {\n  return Math.max(min, Math.min(max, value));\n}\nfunction _int16Range(value) {\n  return _limitValue(value, -32768, 32767);\n}\nfunction _isBetween(value, start, end, epsilon = 1e-6) {\n  return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;\n}\n\nfunction _lookup(table, value, cmp) {\n  cmp = cmp || ((index) => table[index] < value);\n  let hi = table.length - 1;\n  let lo = 0;\n  let mid;\n  while (hi - lo > 1) {\n    mid = (lo + hi) >> 1;\n    if (cmp(mid)) {\n      lo = mid;\n    } else {\n      hi = mid;\n    }\n  }\n  return {lo, hi};\n}\nconst _lookupByKey = (table, key, value, last) =>\n  _lookup(table, value, last\n    ? index => table[index][key] <= value\n    : index => table[index][key] < value);\nconst _rlookupByKey = (table, key, value) =>\n  _lookup(table, value, index => table[index][key] >= value);\nfunction _filterBetween(values, min, max) {\n  let start = 0;\n  let end = values.length;\n  while (start < end && values[start] < min) {\n    start++;\n  }\n  while (end > start && values[end - 1] > max) {\n    end--;\n  }\n  return start > 0 || end < values.length\n    ? values.slice(start, end)\n    : values;\n}\nconst arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\nfunction listenArrayEvents(array, listener) {\n  if (array._chartjs) {\n    array._chartjs.listeners.push(listener);\n    return;\n  }\n  Object.defineProperty(array, '_chartjs', {\n    configurable: true,\n    enumerable: false,\n    value: {\n      listeners: [listener]\n    }\n  });\n  arrayEvents.forEach((key) => {\n    const method = '_onData' + _capitalize(key);\n    const base = array[key];\n    Object.defineProperty(array, key, {\n      configurable: true,\n      enumerable: false,\n      value(...args) {\n        const res = base.apply(this, args);\n        array._chartjs.listeners.forEach((object) => {\n          if (typeof object[method] === 'function') {\n            object[method](...args);\n          }\n        });\n        return res;\n      }\n    });\n  });\n}\nfunction unlistenArrayEvents(array, listener) {\n  const stub = array._chartjs;\n  if (!stub) {\n    return;\n  }\n  const listeners = stub.listeners;\n  const index = listeners.indexOf(listener);\n  if (index !== -1) {\n    listeners.splice(index, 1);\n  }\n  if (listeners.length > 0) {\n    return;\n  }\n  arrayEvents.forEach((key) => {\n    delete array[key];\n  });\n  delete array._chartjs;\n}\nfunction _arrayUnique(items) {\n  const set = new Set();\n  let i, ilen;\n  for (i = 0, ilen = items.length; i < ilen; ++i) {\n    set.add(items[i]);\n  }\n  if (set.size === ilen) {\n    return items;\n  }\n  return Array.from(set);\n}\n\nfunction fontString(pixelSize, fontStyle, fontFamily) {\n  return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n}\nconst requestAnimFrame = (function() {\n  if (typeof window === 'undefined') {\n    return function(callback) {\n      return callback();\n    };\n  }\n  return window.requestAnimationFrame;\n}());\nfunction throttled(fn, thisArg, updateFn) {\n  const updateArgs = updateFn || ((args) => Array.prototype.slice.call(args));\n  let ticking = false;\n  let args = [];\n  return function(...rest) {\n    args = updateArgs(rest);\n    if (!ticking) {\n      ticking = true;\n      requestAnimFrame.call(window, () => {\n        ticking = false;\n        fn.apply(thisArg, args);\n      });\n    }\n  };\n}\nfunction debounce(fn, delay) {\n  let timeout;\n  return function(...args) {\n    if (delay) {\n      clearTimeout(timeout);\n      timeout = setTimeout(fn, delay, args);\n    } else {\n      fn.apply(this, args);\n    }\n    return delay;\n  };\n}\nconst _toLeftRightCenter = (align) => align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';\nconst _alignStartEnd = (align, start, end) => align === 'start' ? start : align === 'end' ? end : (start + end) / 2;\nconst _textX = (align, left, right, rtl) => {\n  const check = rtl ? 'left' : 'right';\n  return align === check ? right : align === 'center' ? (left + right) / 2 : left;\n};\nfunction _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled) {\n  const pointCount = points.length;\n  let start = 0;\n  let count = pointCount;\n  if (meta._sorted) {\n    const {iScale, _parsed} = meta;\n    const axis = iScale.axis;\n    const {min, max, minDefined, maxDefined} = iScale.getUserBounds();\n    if (minDefined) {\n      start = _limitValue(Math.min(\n        _lookupByKey(_parsed, iScale.axis, min).lo,\n        animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo),\n      0, pointCount - 1);\n    }\n    if (maxDefined) {\n      count = _limitValue(Math.max(\n        _lookupByKey(_parsed, iScale.axis, max, true).hi + 1,\n        animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max), true).hi + 1),\n      start, pointCount) - start;\n    } else {\n      count = pointCount - start;\n    }\n  }\n  return {start, count};\n}\nfunction _scaleRangesChanged(meta) {\n  const {xScale, yScale, _scaleRanges} = meta;\n  const newRanges = {\n    xmin: xScale.min,\n    xmax: xScale.max,\n    ymin: yScale.min,\n    ymax: yScale.max\n  };\n  if (!_scaleRanges) {\n    meta._scaleRanges = newRanges;\n    return true;\n  }\n  const changed = _scaleRanges.xmin !== xScale.min\n\t\t|| _scaleRanges.xmax !== xScale.max\n\t\t|| _scaleRanges.ymin !== yScale.min\n\t\t|| _scaleRanges.ymax !== yScale.max;\n  Object.assign(_scaleRanges, newRanges);\n  return changed;\n}\n\nconst atEdge = (t) => t === 0 || t === 1;\nconst elasticIn = (t, s, p) => -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));\nconst elasticOut = (t, s, p) => Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;\nconst effects = {\n  linear: t => t,\n  easeInQuad: t => t * t,\n  easeOutQuad: t => -t * (t - 2),\n  easeInOutQuad: t => ((t /= 0.5) < 1)\n    ? 0.5 * t * t\n    : -0.5 * ((--t) * (t - 2) - 1),\n  easeInCubic: t => t * t * t,\n  easeOutCubic: t => (t -= 1) * t * t + 1,\n  easeInOutCubic: t => ((t /= 0.5) < 1)\n    ? 0.5 * t * t * t\n    : 0.5 * ((t -= 2) * t * t + 2),\n  easeInQuart: t => t * t * t * t,\n  easeOutQuart: t => -((t -= 1) * t * t * t - 1),\n  easeInOutQuart: t => ((t /= 0.5) < 1)\n    ? 0.5 * t * t * t * t\n    : -0.5 * ((t -= 2) * t * t * t - 2),\n  easeInQuint: t => t * t * t * t * t,\n  easeOutQuint: t => (t -= 1) * t * t * t * t + 1,\n  easeInOutQuint: t => ((t /= 0.5) < 1)\n    ? 0.5 * t * t * t * t * t\n    : 0.5 * ((t -= 2) * t * t * t * t + 2),\n  easeInSine: t => -Math.cos(t * HALF_PI) + 1,\n  easeOutSine: t => Math.sin(t * HALF_PI),\n  easeInOutSine: t => -0.5 * (Math.cos(PI * t) - 1),\n  easeInExpo: t => (t === 0) ? 0 : Math.pow(2, 10 * (t - 1)),\n  easeOutExpo: t => (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1,\n  easeInOutExpo: t => atEdge(t) ? t : t < 0.5\n    ? 0.5 * Math.pow(2, 10 * (t * 2 - 1))\n    : 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),\n  easeInCirc: t => (t >= 1) ? t : -(Math.sqrt(1 - t * t) - 1),\n  easeOutCirc: t => Math.sqrt(1 - (t -= 1) * t),\n  easeInOutCirc: t => ((t /= 0.5) < 1)\n    ? -0.5 * (Math.sqrt(1 - t * t) - 1)\n    : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),\n  easeInElastic: t => atEdge(t) ? t : elasticIn(t, 0.075, 0.3),\n  easeOutElastic: t => atEdge(t) ? t : elasticOut(t, 0.075, 0.3),\n  easeInOutElastic(t) {\n    const s = 0.1125;\n    const p = 0.45;\n    return atEdge(t) ? t :\n      t < 0.5\n        ? 0.5 * elasticIn(t * 2, s, p)\n        : 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);\n  },\n  easeInBack(t) {\n    const s = 1.70158;\n    return t * t * ((s + 1) * t - s);\n  },\n  easeOutBack(t) {\n    const s = 1.70158;\n    return (t -= 1) * t * ((s + 1) * t + s) + 1;\n  },\n  easeInOutBack(t) {\n    let s = 1.70158;\n    if ((t /= 0.5) < 1) {\n      return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));\n    }\n    return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\n  },\n  easeInBounce: t => 1 - effects.easeOutBounce(1 - t),\n  easeOutBounce(t) {\n    const m = 7.5625;\n    const d = 2.75;\n    if (t < (1 / d)) {\n      return m * t * t;\n    }\n    if (t < (2 / d)) {\n      return m * (t -= (1.5 / d)) * t + 0.75;\n    }\n    if (t < (2.5 / d)) {\n      return m * (t -= (2.25 / d)) * t + 0.9375;\n    }\n    return m * (t -= (2.625 / d)) * t + 0.984375;\n  },\n  easeInOutBounce: t => (t < 0.5)\n    ? effects.easeInBounce(t * 2) * 0.5\n    : effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5,\n};\n\n/*!\n * @kurkle/color v0.2.1\n * https://github.com/kurkle/color#readme\n * (c) 2022 Jukka Kurkela\n * Released under the MIT License\n */\nfunction round(v) {\n  return v + 0.5 | 0;\n}\nconst lim = (v, l, h) => Math.max(Math.min(v, h), l);\nfunction p2b(v) {\n  return lim(round(v * 2.55), 0, 255);\n}\nfunction n2b(v) {\n  return lim(round(v * 255), 0, 255);\n}\nfunction b2n(v) {\n  return lim(round(v / 2.55) / 100, 0, 1);\n}\nfunction n2p(v) {\n  return lim(round(v * 100), 0, 100);\n}\nconst map$1 = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};\nconst hex = [...'0123456789ABCDEF'];\nconst h1 = b => hex[b & 0xF];\nconst h2 = b => hex[(b & 0xF0) >> 4] + hex[b & 0xF];\nconst eq = b => ((b & 0xF0) >> 4) === (b & 0xF);\nconst isShort = v => eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);\nfunction hexParse(str) {\n  var len = str.length;\n  var ret;\n  if (str[0] === '#') {\n    if (len === 4 || len === 5) {\n      ret = {\n        r: 255 & map$1[str[1]] * 17,\n        g: 255 & map$1[str[2]] * 17,\n        b: 255 & map$1[str[3]] * 17,\n        a: len === 5 ? map$1[str[4]] * 17 : 255\n      };\n    } else if (len === 7 || len === 9) {\n      ret = {\n        r: map$1[str[1]] << 4 | map$1[str[2]],\n        g: map$1[str[3]] << 4 | map$1[str[4]],\n        b: map$1[str[5]] << 4 | map$1[str[6]],\n        a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255\n      };\n    }\n  }\n  return ret;\n}\nconst alpha = (a, f) => a < 255 ? f(a) : '';\nfunction hexString(v) {\n  var f = isShort(v) ? h1 : h2;\n  return v\n    ? '#' + f(v.r) + f(v.g) + f(v.b) + alpha(v.a, f)\n    : undefined;\n}\nconst HUE_RE = /^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction hsl2rgbn(h, s, l) {\n  const a = s * Math.min(l, 1 - l);\n  const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n  return [f(0), f(8), f(4)];\n}\nfunction hsv2rgbn(h, s, v) {\n  const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n  return [f(5), f(3), f(1)];\n}\nfunction hwb2rgbn(h, w, b) {\n  const rgb = hsl2rgbn(h, 1, 0.5);\n  let i;\n  if (w + b > 1) {\n    i = 1 / (w + b);\n    w *= i;\n    b *= i;\n  }\n  for (i = 0; i < 3; i++) {\n    rgb[i] *= 1 - w - b;\n    rgb[i] += w;\n  }\n  return rgb;\n}\nfunction hueValue(r, g, b, d, max) {\n  if (r === max) {\n    return ((g - b) / d) + (g < b ? 6 : 0);\n  }\n  if (g === max) {\n    return (b - r) / d + 2;\n  }\n  return (r - g) / d + 4;\n}\nfunction rgb2hsl(v) {\n  const range = 255;\n  const r = v.r / range;\n  const g = v.g / range;\n  const b = v.b / range;\n  const max = Math.max(r, g, b);\n  const min = Math.min(r, g, b);\n  const l = (max + min) / 2;\n  let h, s, d;\n  if (max !== min) {\n    d = max - min;\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n    h = hueValue(r, g, b, d, max);\n    h = h * 60 + 0.5;\n  }\n  return [h | 0, s || 0, l];\n}\nfunction calln(f, a, b, c) {\n  return (\n    Array.isArray(a)\n      ? f(a[0], a[1], a[2])\n      : f(a, b, c)\n  ).map(n2b);\n}\nfunction hsl2rgb(h, s, l) {\n  return calln(hsl2rgbn, h, s, l);\n}\nfunction hwb2rgb(h, w, b) {\n  return calln(hwb2rgbn, h, w, b);\n}\nfunction hsv2rgb(h, s, v) {\n  return calln(hsv2rgbn, h, s, v);\n}\nfunction hue(h) {\n  return (h % 360 + 360) % 360;\n}\nfunction hueParse(str) {\n  const m = HUE_RE.exec(str);\n  let a = 255;\n  let v;\n  if (!m) {\n    return;\n  }\n  if (m[5] !== v) {\n    a = m[6] ? p2b(+m[5]) : n2b(+m[5]);\n  }\n  const h = hue(+m[2]);\n  const p1 = +m[3] / 100;\n  const p2 = +m[4] / 100;\n  if (m[1] === 'hwb') {\n    v = hwb2rgb(h, p1, p2);\n  } else if (m[1] === 'hsv') {\n    v = hsv2rgb(h, p1, p2);\n  } else {\n    v = hsl2rgb(h, p1, p2);\n  }\n  return {\n    r: v[0],\n    g: v[1],\n    b: v[2],\n    a: a\n  };\n}\nfunction rotate(v, deg) {\n  var h = rgb2hsl(v);\n  h[0] = hue(h[0] + deg);\n  h = hsl2rgb(h);\n  v.r = h[0];\n  v.g = h[1];\n  v.b = h[2];\n}\nfunction hslString(v) {\n  if (!v) {\n    return;\n  }\n  const a = rgb2hsl(v);\n  const h = a[0];\n  const s = n2p(a[1]);\n  const l = n2p(a[2]);\n  return v.a < 255\n    ? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`\n    : `hsl(${h}, ${s}%, ${l}%)`;\n}\nconst map = {\n  x: 'dark',\n  Z: 'light',\n  Y: 're',\n  X: 'blu',\n  W: 'gr',\n  V: 'medium',\n  U: 'slate',\n  A: 'ee',\n  T: 'ol',\n  S: 'or',\n  B: 'ra',\n  C: 'lateg',\n  D: 'ights',\n  R: 'in',\n  Q: 'turquois',\n  E: 'hi',\n  P: 'ro',\n  O: 'al',\n  N: 'le',\n  M: 'de',\n  L: 'yello',\n  F: 'en',\n  K: 'ch',\n  G: 'arks',\n  H: 'ea',\n  I: 'ightg',\n  J: 'wh'\n};\nconst names$1 = {\n  OiceXe: 'f0f8ff',\n  antiquewEte: 'faebd7',\n  aqua: 'ffff',\n  aquamarRe: '7fffd4',\n  azuY: 'f0ffff',\n  beige: 'f5f5dc',\n  bisque: 'ffe4c4',\n  black: '0',\n  blanKedOmond: 'ffebcd',\n  Xe: 'ff',\n  XeviTet: '8a2be2',\n  bPwn: 'a52a2a',\n  burlywood: 'deb887',\n  caMtXe: '5f9ea0',\n  KartYuse: '7fff00',\n  KocTate: 'd2691e',\n  cSO: 'ff7f50',\n  cSnflowerXe: '6495ed',\n  cSnsilk: 'fff8dc',\n  crimson: 'dc143c',\n  cyan: 'ffff',\n  xXe: '8b',\n  xcyan: '8b8b',\n  xgTMnPd: 'b8860b',\n  xWay: 'a9a9a9',\n  xgYF: '6400',\n  xgYy: 'a9a9a9',\n  xkhaki: 'bdb76b',\n  xmagFta: '8b008b',\n  xTivegYF: '556b2f',\n  xSange: 'ff8c00',\n  xScEd: '9932cc',\n  xYd: '8b0000',\n  xsOmon: 'e9967a',\n  xsHgYF: '8fbc8f',\n  xUXe: '483d8b',\n  xUWay: '2f4f4f',\n  xUgYy: '2f4f4f',\n  xQe: 'ced1',\n  xviTet: '9400d3',\n  dAppRk: 'ff1493',\n  dApskyXe: 'bfff',\n  dimWay: '696969',\n  dimgYy: '696969',\n  dodgerXe: '1e90ff',\n  fiYbrick: 'b22222',\n  flSOwEte: 'fffaf0',\n  foYstWAn: '228b22',\n  fuKsia: 'ff00ff',\n  gaRsbSo: 'dcdcdc',\n  ghostwEte: 'f8f8ff',\n  gTd: 'ffd700',\n  gTMnPd: 'daa520',\n  Way: '808080',\n  gYF: '8000',\n  gYFLw: 'adff2f',\n  gYy: '808080',\n  honeyMw: 'f0fff0',\n  hotpRk: 'ff69b4',\n  RdianYd: 'cd5c5c',\n  Rdigo: '4b0082',\n  ivSy: 'fffff0',\n  khaki: 'f0e68c',\n  lavFMr: 'e6e6fa',\n  lavFMrXsh: 'fff0f5',\n  lawngYF: '7cfc00',\n  NmoncEffon: 'fffacd',\n  ZXe: 'add8e6',\n  ZcSO: 'f08080',\n  Zcyan: 'e0ffff',\n  ZgTMnPdLw: 'fafad2',\n  ZWay: 'd3d3d3',\n  ZgYF: '90ee90',\n  ZgYy: 'd3d3d3',\n  ZpRk: 'ffb6c1',\n  ZsOmon: 'ffa07a',\n  ZsHgYF: '20b2aa',\n  ZskyXe: '87cefa',\n  ZUWay: '778899',\n  ZUgYy: '778899',\n  ZstAlXe: 'b0c4de',\n  ZLw: 'ffffe0',\n  lime: 'ff00',\n  limegYF: '32cd32',\n  lRF: 'faf0e6',\n  magFta: 'ff00ff',\n  maPon: '800000',\n  VaquamarRe: '66cdaa',\n  VXe: 'cd',\n  VScEd: 'ba55d3',\n  VpurpN: '9370db',\n  VsHgYF: '3cb371',\n  VUXe: '7b68ee',\n  VsprRggYF: 'fa9a',\n  VQe: '48d1cc',\n  VviTetYd: 'c71585',\n  midnightXe: '191970',\n  mRtcYam: 'f5fffa',\n  mistyPse: 'ffe4e1',\n  moccasR: 'ffe4b5',\n  navajowEte: 'ffdead',\n  navy: '80',\n  Tdlace: 'fdf5e6',\n  Tive: '808000',\n  TivedBb: '6b8e23',\n  Sange: 'ffa500',\n  SangeYd: 'ff4500',\n  ScEd: 'da70d6',\n  pOegTMnPd: 'eee8aa',\n  pOegYF: '98fb98',\n  pOeQe: 'afeeee',\n  pOeviTetYd: 'db7093',\n  papayawEp: 'ffefd5',\n  pHKpuff: 'ffdab9',\n  peru: 'cd853f',\n  pRk: 'ffc0cb',\n  plum: 'dda0dd',\n  powMrXe: 'b0e0e6',\n  purpN: '800080',\n  YbeccapurpN: '663399',\n  Yd: 'ff0000',\n  Psybrown: 'bc8f8f',\n  PyOXe: '4169e1',\n  saddNbPwn: '8b4513',\n  sOmon: 'fa8072',\n  sandybPwn: 'f4a460',\n  sHgYF: '2e8b57',\n  sHshell: 'fff5ee',\n  siFna: 'a0522d',\n  silver: 'c0c0c0',\n  skyXe: '87ceeb',\n  UXe: '6a5acd',\n  UWay: '708090',\n  UgYy: '708090',\n  snow: 'fffafa',\n  sprRggYF: 'ff7f',\n  stAlXe: '4682b4',\n  tan: 'd2b48c',\n  teO: '8080',\n  tEstN: 'd8bfd8',\n  tomato: 'ff6347',\n  Qe: '40e0d0',\n  viTet: 'ee82ee',\n  JHt: 'f5deb3',\n  wEte: 'ffffff',\n  wEtesmoke: 'f5f5f5',\n  Lw: 'ffff00',\n  LwgYF: '9acd32'\n};\nfunction unpack() {\n  const unpacked = {};\n  const keys = Object.keys(names$1);\n  const tkeys = Object.keys(map);\n  let i, j, k, ok, nk;\n  for (i = 0; i < keys.length; i++) {\n    ok = nk = keys[i];\n    for (j = 0; j < tkeys.length; j++) {\n      k = tkeys[j];\n      nk = nk.replace(k, map[k]);\n    }\n    k = parseInt(names$1[ok], 16);\n    unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];\n  }\n  return unpacked;\n}\nlet names;\nfunction nameParse(str) {\n  if (!names) {\n    names = unpack();\n    names.transparent = [0, 0, 0, 0];\n  }\n  const a = names[str.toLowerCase()];\n  return a && {\n    r: a[0],\n    g: a[1],\n    b: a[2],\n    a: a.length === 4 ? a[3] : 255\n  };\n}\nconst RGB_RE = /^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction rgbParse(str) {\n  const m = RGB_RE.exec(str);\n  let a = 255;\n  let r, g, b;\n  if (!m) {\n    return;\n  }\n  if (m[7] !== r) {\n    const v = +m[7];\n    a = m[8] ? p2b(v) : lim(v * 255, 0, 255);\n  }\n  r = +m[1];\n  g = +m[3];\n  b = +m[5];\n  r = 255 & (m[2] ? p2b(r) : lim(r, 0, 255));\n  g = 255 & (m[4] ? p2b(g) : lim(g, 0, 255));\n  b = 255 & (m[6] ? p2b(b) : lim(b, 0, 255));\n  return {\n    r: r,\n    g: g,\n    b: b,\n    a: a\n  };\n}\nfunction rgbString(v) {\n  return v && (\n    v.a < 255\n      ? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`\n      : `rgb(${v.r}, ${v.g}, ${v.b})`\n  );\n}\nconst to = v => v <= 0.0031308 ? v * 12.92 : Math.pow(v, 1.0 / 2.4) * 1.055 - 0.055;\nconst from = v => v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\nfunction interpolate(rgb1, rgb2, t) {\n  const r = from(b2n(rgb1.r));\n  const g = from(b2n(rgb1.g));\n  const b = from(b2n(rgb1.b));\n  return {\n    r: n2b(to(r + t * (from(b2n(rgb2.r)) - r))),\n    g: n2b(to(g + t * (from(b2n(rgb2.g)) - g))),\n    b: n2b(to(b + t * (from(b2n(rgb2.b)) - b))),\n    a: rgb1.a + t * (rgb2.a - rgb1.a)\n  };\n}\nfunction modHSL(v, i, ratio) {\n  if (v) {\n    let tmp = rgb2hsl(v);\n    tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));\n    tmp = hsl2rgb(tmp);\n    v.r = tmp[0];\n    v.g = tmp[1];\n    v.b = tmp[2];\n  }\n}\nfunction clone(v, proto) {\n  return v ? Object.assign(proto || {}, v) : v;\n}\nfunction fromObject(input) {\n  var v = {r: 0, g: 0, b: 0, a: 255};\n  if (Array.isArray(input)) {\n    if (input.length >= 3) {\n      v = {r: input[0], g: input[1], b: input[2], a: 255};\n      if (input.length > 3) {\n        v.a = n2b(input[3]);\n      }\n    }\n  } else {\n    v = clone(input, {r: 0, g: 0, b: 0, a: 1});\n    v.a = n2b(v.a);\n  }\n  return v;\n}\nfunction functionParse(str) {\n  if (str.charAt(0) === 'r') {\n    return rgbParse(str);\n  }\n  return hueParse(str);\n}\nclass Color {\n  constructor(input) {\n    if (input instanceof Color) {\n      return input;\n    }\n    const type = typeof input;\n    let v;\n    if (type === 'object') {\n      v = fromObject(input);\n    } else if (type === 'string') {\n      v = hexParse(input) || nameParse(input) || functionParse(input);\n    }\n    this._rgb = v;\n    this._valid = !!v;\n  }\n  get valid() {\n    return this._valid;\n  }\n  get rgb() {\n    var v = clone(this._rgb);\n    if (v) {\n      v.a = b2n(v.a);\n    }\n    return v;\n  }\n  set rgb(obj) {\n    this._rgb = fromObject(obj);\n  }\n  rgbString() {\n    return this._valid ? rgbString(this._rgb) : undefined;\n  }\n  hexString() {\n    return this._valid ? hexString(this._rgb) : undefined;\n  }\n  hslString() {\n    return this._valid ? hslString(this._rgb) : undefined;\n  }\n  mix(color, weight) {\n    if (color) {\n      const c1 = this.rgb;\n      const c2 = color.rgb;\n      let w2;\n      const p = weight === w2 ? 0.5 : weight;\n      const w = 2 * p - 1;\n      const a = c1.a - c2.a;\n      const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n      w2 = 1 - w1;\n      c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;\n      c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;\n      c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;\n      c1.a = p * c1.a + (1 - p) * c2.a;\n      this.rgb = c1;\n    }\n    return this;\n  }\n  interpolate(color, t) {\n    if (color) {\n      this._rgb = interpolate(this._rgb, color._rgb, t);\n    }\n    return this;\n  }\n  clone() {\n    return new Color(this.rgb);\n  }\n  alpha(a) {\n    this._rgb.a = n2b(a);\n    return this;\n  }\n  clearer(ratio) {\n    const rgb = this._rgb;\n    rgb.a *= 1 - ratio;\n    return this;\n  }\n  greyscale() {\n    const rgb = this._rgb;\n    const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);\n    rgb.r = rgb.g = rgb.b = val;\n    return this;\n  }\n  opaquer(ratio) {\n    const rgb = this._rgb;\n    rgb.a *= 1 + ratio;\n    return this;\n  }\n  negate() {\n    const v = this._rgb;\n    v.r = 255 - v.r;\n    v.g = 255 - v.g;\n    v.b = 255 - v.b;\n    return this;\n  }\n  lighten(ratio) {\n    modHSL(this._rgb, 2, ratio);\n    return this;\n  }\n  darken(ratio) {\n    modHSL(this._rgb, 2, -ratio);\n    return this;\n  }\n  saturate(ratio) {\n    modHSL(this._rgb, 1, ratio);\n    return this;\n  }\n  desaturate(ratio) {\n    modHSL(this._rgb, 1, -ratio);\n    return this;\n  }\n  rotate(deg) {\n    rotate(this._rgb, deg);\n    return this;\n  }\n}\nfunction index_esm(input) {\n  return new Color(input);\n}\n\nfunction isPatternOrGradient(value) {\n  if (value && typeof value === 'object') {\n    const type = value.toString();\n    return type === '[object CanvasPattern]' || type === '[object CanvasGradient]';\n  }\n  return false;\n}\nfunction color(value) {\n  return isPatternOrGradient(value) ? value : index_esm(value);\n}\nfunction getHoverColor(value) {\n  return isPatternOrGradient(value)\n    ? value\n    : index_esm(value).saturate(0.5).darken(0.1).hexString();\n}\n\nconst overrides = Object.create(null);\nconst descriptors = Object.create(null);\nfunction getScope$1(node, key) {\n  if (!key) {\n    return node;\n  }\n  const keys = key.split('.');\n  for (let i = 0, n = keys.length; i < n; ++i) {\n    const k = keys[i];\n    node = node[k] || (node[k] = Object.create(null));\n  }\n  return node;\n}\nfunction set(root, scope, values) {\n  if (typeof scope === 'string') {\n    return merge(getScope$1(root, scope), values);\n  }\n  return merge(getScope$1(root, ''), scope);\n}\nclass Defaults {\n  constructor(_descriptors) {\n    this.animation = undefined;\n    this.backgroundColor = 'rgba(0,0,0,0.1)';\n    this.borderColor = 'rgba(0,0,0,0.1)';\n    this.color = '#666';\n    this.datasets = {};\n    this.devicePixelRatio = (context) => context.chart.platform.getDevicePixelRatio();\n    this.elements = {};\n    this.events = [\n      'mousemove',\n      'mouseout',\n      'click',\n      'touchstart',\n      'touchmove'\n    ];\n    this.font = {\n      family: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n      size: 12,\n      style: 'normal',\n      lineHeight: 1.2,\n      weight: null\n    };\n    this.hover = {};\n    this.hoverBackgroundColor = (ctx, options) => getHoverColor(options.backgroundColor);\n    this.hoverBorderColor = (ctx, options) => getHoverColor(options.borderColor);\n    this.hoverColor = (ctx, options) => getHoverColor(options.color);\n    this.indexAxis = 'x';\n    this.interaction = {\n      mode: 'nearest',\n      intersect: true,\n      includeInvisible: false\n    };\n    this.maintainAspectRatio = true;\n    this.onHover = null;\n    this.onClick = null;\n    this.parsing = true;\n    this.plugins = {};\n    this.responsive = true;\n    this.scale = undefined;\n    this.scales = {};\n    this.showLine = true;\n    this.drawActiveElementsOnTop = true;\n    this.describe(_descriptors);\n  }\n  set(scope, values) {\n    return set(this, scope, values);\n  }\n  get(scope) {\n    return getScope$1(this, scope);\n  }\n  describe(scope, values) {\n    return set(descriptors, scope, values);\n  }\n  override(scope, values) {\n    return set(overrides, scope, values);\n  }\n  route(scope, name, targetScope, targetName) {\n    const scopeObject = getScope$1(this, scope);\n    const targetScopeObject = getScope$1(this, targetScope);\n    const privateName = '_' + name;\n    Object.defineProperties(scopeObject, {\n      [privateName]: {\n        value: scopeObject[name],\n        writable: true\n      },\n      [name]: {\n        enumerable: true,\n        get() {\n          const local = this[privateName];\n          const target = targetScopeObject[targetName];\n          if (isObject(local)) {\n            return Object.assign({}, target, local);\n          }\n          return valueOrDefault(local, target);\n        },\n        set(value) {\n          this[privateName] = value;\n        }\n      }\n    });\n  }\n}\nvar defaults = new Defaults({\n  _scriptable: (name) => !name.startsWith('on'),\n  _indexable: (name) => name !== 'events',\n  hover: {\n    _fallback: 'interaction'\n  },\n  interaction: {\n    _scriptable: false,\n    _indexable: false,\n  }\n});\n\nfunction toFontString(font) {\n  if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {\n    return null;\n  }\n  return (font.style ? font.style + ' ' : '')\n\t\t+ (font.weight ? font.weight + ' ' : '')\n\t\t+ font.size + 'px '\n\t\t+ font.family;\n}\nfunction _measureText(ctx, data, gc, longest, string) {\n  let textWidth = data[string];\n  if (!textWidth) {\n    textWidth = data[string] = ctx.measureText(string).width;\n    gc.push(string);\n  }\n  if (textWidth > longest) {\n    longest = textWidth;\n  }\n  return longest;\n}\nfunction _longestText(ctx, font, arrayOfThings, cache) {\n  cache = cache || {};\n  let data = cache.data = cache.data || {};\n  let gc = cache.garbageCollect = cache.garbageCollect || [];\n  if (cache.font !== font) {\n    data = cache.data = {};\n    gc = cache.garbageCollect = [];\n    cache.font = font;\n  }\n  ctx.save();\n  ctx.font = font;\n  let longest = 0;\n  const ilen = arrayOfThings.length;\n  let i, j, jlen, thing, nestedThing;\n  for (i = 0; i < ilen; i++) {\n    thing = arrayOfThings[i];\n    if (thing !== undefined && thing !== null && isArray(thing) !== true) {\n      longest = _measureText(ctx, data, gc, longest, thing);\n    } else if (isArray(thing)) {\n      for (j = 0, jlen = thing.length; j < jlen; j++) {\n        nestedThing = thing[j];\n        if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {\n          longest = _measureText(ctx, data, gc, longest, nestedThing);\n        }\n      }\n    }\n  }\n  ctx.restore();\n  const gcLen = gc.length / 2;\n  if (gcLen > arrayOfThings.length) {\n    for (i = 0; i < gcLen; i++) {\n      delete data[gc[i]];\n    }\n    gc.splice(0, gcLen);\n  }\n  return longest;\n}\nfunction _alignPixel(chart, pixel, width) {\n  const devicePixelRatio = chart.currentDevicePixelRatio;\n  const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;\n  return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n}\nfunction clearCanvas(canvas, ctx) {\n  ctx = ctx || canvas.getContext('2d');\n  ctx.save();\n  ctx.resetTransform();\n  ctx.clearRect(0, 0, canvas.width, canvas.height);\n  ctx.restore();\n}\nfunction drawPoint(ctx, options, x, y) {\n  drawPointLegend(ctx, options, x, y, null);\n}\nfunction drawPointLegend(ctx, options, x, y, w) {\n  let type, xOffset, yOffset, size, cornerRadius, width;\n  const style = options.pointStyle;\n  const rotation = options.rotation;\n  const radius = options.radius;\n  let rad = (rotation || 0) * RAD_PER_DEG;\n  if (style && typeof style === 'object') {\n    type = style.toString();\n    if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n      ctx.save();\n      ctx.translate(x, y);\n      ctx.rotate(rad);\n      ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n      ctx.restore();\n      return;\n    }\n  }\n  if (isNaN(radius) || radius <= 0) {\n    return;\n  }\n  ctx.beginPath();\n  switch (style) {\n  default:\n    if (w) {\n      ctx.ellipse(x, y, w / 2, radius, 0, 0, TAU);\n    } else {\n      ctx.arc(x, y, radius, 0, TAU);\n    }\n    ctx.closePath();\n    break;\n  case 'triangle':\n    ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n    rad += TWO_THIRDS_PI;\n    ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n    rad += TWO_THIRDS_PI;\n    ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n    ctx.closePath();\n    break;\n  case 'rectRounded':\n    cornerRadius = radius * 0.516;\n    size = radius - cornerRadius;\n    xOffset = Math.cos(rad + QUARTER_PI) * size;\n    yOffset = Math.sin(rad + QUARTER_PI) * size;\n    ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n    ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n    ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n    ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n    ctx.closePath();\n    break;\n  case 'rect':\n    if (!rotation) {\n      size = Math.SQRT1_2 * radius;\n      width = w ? w / 2 : size;\n      ctx.rect(x - width, y - size, 2 * width, 2 * size);\n      break;\n    }\n    rad += QUARTER_PI;\n  case 'rectRot':\n    xOffset = Math.cos(rad) * radius;\n    yOffset = Math.sin(rad) * radius;\n    ctx.moveTo(x - xOffset, y - yOffset);\n    ctx.lineTo(x + yOffset, y - xOffset);\n    ctx.lineTo(x + xOffset, y + yOffset);\n    ctx.lineTo(x - yOffset, y + xOffset);\n    ctx.closePath();\n    break;\n  case 'crossRot':\n    rad += QUARTER_PI;\n  case 'cross':\n    xOffset = Math.cos(rad) * radius;\n    yOffset = Math.sin(rad) * radius;\n    ctx.moveTo(x - xOffset, y - yOffset);\n    ctx.lineTo(x + xOffset, y + yOffset);\n    ctx.moveTo(x + yOffset, y - xOffset);\n    ctx.lineTo(x - yOffset, y + xOffset);\n    break;\n  case 'star':\n    xOffset = Math.cos(rad) * radius;\n    yOffset = Math.sin(rad) * radius;\n    ctx.moveTo(x - xOffset, y - yOffset);\n    ctx.lineTo(x + xOffset, y + yOffset);\n    ctx.moveTo(x + yOffset, y - xOffset);\n    ctx.lineTo(x - yOffset, y + xOffset);\n    rad += QUARTER_PI;\n    xOffset = Math.cos(rad) * radius;\n    yOffset = Math.sin(rad) * radius;\n    ctx.moveTo(x - xOffset, y - yOffset);\n    ctx.lineTo(x + xOffset, y + yOffset);\n    ctx.moveTo(x + yOffset, y - xOffset);\n    ctx.lineTo(x - yOffset, y + xOffset);\n    break;\n  case 'line':\n    xOffset = w ? w / 2 : Math.cos(rad) * radius;\n    yOffset = Math.sin(rad) * radius;\n    ctx.moveTo(x - xOffset, y - yOffset);\n    ctx.lineTo(x + xOffset, y + yOffset);\n    break;\n  case 'dash':\n    ctx.moveTo(x, y);\n    ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\n    break;\n  }\n  ctx.fill();\n  if (options.borderWidth > 0) {\n    ctx.stroke();\n  }\n}\nfunction _isPointInArea(point, area, margin) {\n  margin = margin || 0.5;\n  return !area || (point && point.x > area.left - margin && point.x < area.right + margin &&\n\t\tpoint.y > area.top - margin && point.y < area.bottom + margin);\n}\nfunction clipArea(ctx, area) {\n  ctx.save();\n  ctx.beginPath();\n  ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n  ctx.clip();\n}\nfunction unclipArea(ctx) {\n  ctx.restore();\n}\nfunction _steppedLineTo(ctx, previous, target, flip, mode) {\n  if (!previous) {\n    return ctx.lineTo(target.x, target.y);\n  }\n  if (mode === 'middle') {\n    const midpoint = (previous.x + target.x) / 2.0;\n    ctx.lineTo(midpoint, previous.y);\n    ctx.lineTo(midpoint, target.y);\n  } else if (mode === 'after' !== !!flip) {\n    ctx.lineTo(previous.x, target.y);\n  } else {\n    ctx.lineTo(target.x, previous.y);\n  }\n  ctx.lineTo(target.x, target.y);\n}\nfunction _bezierCurveTo(ctx, previous, target, flip) {\n  if (!previous) {\n    return ctx.lineTo(target.x, target.y);\n  }\n  ctx.bezierCurveTo(\n    flip ? previous.cp1x : previous.cp2x,\n    flip ? previous.cp1y : previous.cp2y,\n    flip ? target.cp2x : target.cp1x,\n    flip ? target.cp2y : target.cp1y,\n    target.x,\n    target.y);\n}\nfunction renderText(ctx, text, x, y, font, opts = {}) {\n  const lines = isArray(text) ? text : [text];\n  const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';\n  let i, line;\n  ctx.save();\n  ctx.font = font.string;\n  setRenderOpts(ctx, opts);\n  for (i = 0; i < lines.length; ++i) {\n    line = lines[i];\n    if (stroke) {\n      if (opts.strokeColor) {\n        ctx.strokeStyle = opts.strokeColor;\n      }\n      if (!isNullOrUndef(opts.strokeWidth)) {\n        ctx.lineWidth = opts.strokeWidth;\n      }\n      ctx.strokeText(line, x, y, opts.maxWidth);\n    }\n    ctx.fillText(line, x, y, opts.maxWidth);\n    decorateText(ctx, x, y, line, opts);\n    y += font.lineHeight;\n  }\n  ctx.restore();\n}\nfunction setRenderOpts(ctx, opts) {\n  if (opts.translation) {\n    ctx.translate(opts.translation[0], opts.translation[1]);\n  }\n  if (!isNullOrUndef(opts.rotation)) {\n    ctx.rotate(opts.rotation);\n  }\n  if (opts.color) {\n    ctx.fillStyle = opts.color;\n  }\n  if (opts.textAlign) {\n    ctx.textAlign = opts.textAlign;\n  }\n  if (opts.textBaseline) {\n    ctx.textBaseline = opts.textBaseline;\n  }\n}\nfunction decorateText(ctx, x, y, line, opts) {\n  if (opts.strikethrough || opts.underline) {\n    const metrics = ctx.measureText(line);\n    const left = x - metrics.actualBoundingBoxLeft;\n    const right = x + metrics.actualBoundingBoxRight;\n    const top = y - metrics.actualBoundingBoxAscent;\n    const bottom = y + metrics.actualBoundingBoxDescent;\n    const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;\n    ctx.strokeStyle = ctx.fillStyle;\n    ctx.beginPath();\n    ctx.lineWidth = opts.decorationWidth || 2;\n    ctx.moveTo(left, yDecoration);\n    ctx.lineTo(right, yDecoration);\n    ctx.stroke();\n  }\n}\nfunction addRoundedRectPath(ctx, rect) {\n  const {x, y, w, h, radius} = rect;\n  ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);\n  ctx.lineTo(x, y + h - radius.bottomLeft);\n  ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);\n  ctx.lineTo(x + w - radius.bottomRight, y + h);\n  ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);\n  ctx.lineTo(x + w, y + radius.topRight);\n  ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);\n  ctx.lineTo(x + radius.topLeft, y);\n}\n\nconst LINE_HEIGHT = new RegExp(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\nconst FONT_STYLE = new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);\nfunction toLineHeight(value, size) {\n  const matches = ('' + value).match(LINE_HEIGHT);\n  if (!matches || matches[1] === 'normal') {\n    return size * 1.2;\n  }\n  value = +matches[2];\n  switch (matches[3]) {\n  case 'px':\n    return value;\n  case '%':\n    value /= 100;\n    break;\n  }\n  return size * value;\n}\nconst numberOrZero = v => +v || 0;\nfunction _readValueToProps(value, props) {\n  const ret = {};\n  const objProps = isObject(props);\n  const keys = objProps ? Object.keys(props) : props;\n  const read = isObject(value)\n    ? objProps\n      ? prop => valueOrDefault(value[prop], value[props[prop]])\n      : prop => value[prop]\n    : () => value;\n  for (const prop of keys) {\n    ret[prop] = numberOrZero(read(prop));\n  }\n  return ret;\n}\nfunction toTRBL(value) {\n  return _readValueToProps(value, {top: 'y', right: 'x', bottom: 'y', left: 'x'});\n}\nfunction toTRBLCorners(value) {\n  return _readValueToProps(value, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']);\n}\nfunction toPadding(value) {\n  const obj = toTRBL(value);\n  obj.width = obj.left + obj.right;\n  obj.height = obj.top + obj.bottom;\n  return obj;\n}\nfunction toFont(options, fallback) {\n  options = options || {};\n  fallback = fallback || defaults.font;\n  let size = valueOrDefault(options.size, fallback.size);\n  if (typeof size === 'string') {\n    size = parseInt(size, 10);\n  }\n  let style = valueOrDefault(options.style, fallback.style);\n  if (style && !('' + style).match(FONT_STYLE)) {\n    console.warn('Invalid font style specified: \"' + style + '\"');\n    style = '';\n  }\n  const font = {\n    family: valueOrDefault(options.family, fallback.family),\n    lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),\n    size,\n    style,\n    weight: valueOrDefault(options.weight, fallback.weight),\n    string: ''\n  };\n  font.string = toFontString(font);\n  return font;\n}\nfunction resolve(inputs, context, index, info) {\n  let cacheable = true;\n  let i, ilen, value;\n  for (i = 0, ilen = inputs.length; i < ilen; ++i) {\n    value = inputs[i];\n    if (value === undefined) {\n      continue;\n    }\n    if (context !== undefined && typeof value === 'function') {\n      value = value(context);\n      cacheable = false;\n    }\n    if (index !== undefined && isArray(value)) {\n      value = value[index % value.length];\n      cacheable = false;\n    }\n    if (value !== undefined) {\n      if (info && !cacheable) {\n        info.cacheable = false;\n      }\n      return value;\n    }\n  }\n}\nfunction _addGrace(minmax, grace, beginAtZero) {\n  const {min, max} = minmax;\n  const change = toDimension(grace, (max - min) / 2);\n  const keepZero = (value, add) => beginAtZero && value === 0 ? 0 : value + add;\n  return {\n    min: keepZero(min, -Math.abs(change)),\n    max: keepZero(max, change)\n  };\n}\nfunction createContext(parentContext, context) {\n  return Object.assign(Object.create(parentContext), context);\n}\n\nfunction _createResolver(scopes, prefixes = [''], rootScopes = scopes, fallback, getTarget = () => scopes[0]) {\n  if (!defined(fallback)) {\n    fallback = _resolve('_fallback', scopes);\n  }\n  const cache = {\n    [Symbol.toStringTag]: 'Object',\n    _cacheable: true,\n    _scopes: scopes,\n    _rootScopes: rootScopes,\n    _fallback: fallback,\n    _getTarget: getTarget,\n    override: (scope) => _createResolver([scope, ...scopes], prefixes, rootScopes, fallback),\n  };\n  return new Proxy(cache, {\n    deleteProperty(target, prop) {\n      delete target[prop];\n      delete target._keys;\n      delete scopes[0][prop];\n      return true;\n    },\n    get(target, prop) {\n      return _cached(target, prop,\n        () => _resolveWithPrefixes(prop, prefixes, scopes, target));\n    },\n    getOwnPropertyDescriptor(target, prop) {\n      return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);\n    },\n    getPrototypeOf() {\n      return Reflect.getPrototypeOf(scopes[0]);\n    },\n    has(target, prop) {\n      return getKeysFromAllScopes(target).includes(prop);\n    },\n    ownKeys(target) {\n      return getKeysFromAllScopes(target);\n    },\n    set(target, prop, value) {\n      const storage = target._storage || (target._storage = getTarget());\n      target[prop] = storage[prop] = value;\n      delete target._keys;\n      return true;\n    }\n  });\n}\nfunction _attachContext(proxy, context, subProxy, descriptorDefaults) {\n  const cache = {\n    _cacheable: false,\n    _proxy: proxy,\n    _context: context,\n    _subProxy: subProxy,\n    _stack: new Set(),\n    _descriptors: _descriptors(proxy, descriptorDefaults),\n    setContext: (ctx) => _attachContext(proxy, ctx, subProxy, descriptorDefaults),\n    override: (scope) => _attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)\n  };\n  return new Proxy(cache, {\n    deleteProperty(target, prop) {\n      delete target[prop];\n      delete proxy[prop];\n      return true;\n    },\n    get(target, prop, receiver) {\n      return _cached(target, prop,\n        () => _resolveWithContext(target, prop, receiver));\n    },\n    getOwnPropertyDescriptor(target, prop) {\n      return target._descriptors.allKeys\n        ? Reflect.has(proxy, prop) ? {enumerable: true, configurable: true} : undefined\n        : Reflect.getOwnPropertyDescriptor(proxy, prop);\n    },\n    getPrototypeOf() {\n      return Reflect.getPrototypeOf(proxy);\n    },\n    has(target, prop) {\n      return Reflect.has(proxy, prop);\n    },\n    ownKeys() {\n      return Reflect.ownKeys(proxy);\n    },\n    set(target, prop, value) {\n      proxy[prop] = value;\n      delete target[prop];\n      return true;\n    }\n  });\n}\nfunction _descriptors(proxy, defaults = {scriptable: true, indexable: true}) {\n  const {_scriptable = defaults.scriptable, _indexable = defaults.indexable, _allKeys = defaults.allKeys} = proxy;\n  return {\n    allKeys: _allKeys,\n    scriptable: _scriptable,\n    indexable: _indexable,\n    isScriptable: isFunction(_scriptable) ? _scriptable : () => _scriptable,\n    isIndexable: isFunction(_indexable) ? _indexable : () => _indexable\n  };\n}\nconst readKey = (prefix, name) => prefix ? prefix + _capitalize(name) : name;\nconst needsSubResolver = (prop, value) => isObject(value) && prop !== 'adapters' &&\n  (Object.getPrototypeOf(value) === null || value.constructor === Object);\nfunction _cached(target, prop, resolve) {\n  if (Object.prototype.hasOwnProperty.call(target, prop)) {\n    return target[prop];\n  }\n  const value = resolve();\n  target[prop] = value;\n  return value;\n}\nfunction _resolveWithContext(target, prop, receiver) {\n  const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;\n  let value = _proxy[prop];\n  if (isFunction(value) && descriptors.isScriptable(prop)) {\n    value = _resolveScriptable(prop, value, target, receiver);\n  }\n  if (isArray(value) && value.length) {\n    value = _resolveArray(prop, value, target, descriptors.isIndexable);\n  }\n  if (needsSubResolver(prop, value)) {\n    value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);\n  }\n  return value;\n}\nfunction _resolveScriptable(prop, value, target, receiver) {\n  const {_proxy, _context, _subProxy, _stack} = target;\n  if (_stack.has(prop)) {\n    throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);\n  }\n  _stack.add(prop);\n  value = value(_context, _subProxy || receiver);\n  _stack.delete(prop);\n  if (needsSubResolver(prop, value)) {\n    value = createSubResolver(_proxy._scopes, _proxy, prop, value);\n  }\n  return value;\n}\nfunction _resolveArray(prop, value, target, isIndexable) {\n  const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;\n  if (defined(_context.index) && isIndexable(prop)) {\n    value = value[_context.index % value.length];\n  } else if (isObject(value[0])) {\n    const arr = value;\n    const scopes = _proxy._scopes.filter(s => s !== arr);\n    value = [];\n    for (const item of arr) {\n      const resolver = createSubResolver(scopes, _proxy, prop, item);\n      value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));\n    }\n  }\n  return value;\n}\nfunction resolveFallback(fallback, prop, value) {\n  return isFunction(fallback) ? fallback(prop, value) : fallback;\n}\nconst getScope = (key, parent) => key === true ? parent\n  : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;\nfunction addScopes(set, parentScopes, key, parentFallback, value) {\n  for (const parent of parentScopes) {\n    const scope = getScope(key, parent);\n    if (scope) {\n      set.add(scope);\n      const fallback = resolveFallback(scope._fallback, key, value);\n      if (defined(fallback) && fallback !== key && fallback !== parentFallback) {\n        return fallback;\n      }\n    } else if (scope === false && defined(parentFallback) && key !== parentFallback) {\n      return null;\n    }\n  }\n  return false;\n}\nfunction createSubResolver(parentScopes, resolver, prop, value) {\n  const rootScopes = resolver._rootScopes;\n  const fallback = resolveFallback(resolver._fallback, prop, value);\n  const allScopes = [...parentScopes, ...rootScopes];\n  const set = new Set();\n  set.add(value);\n  let key = addScopesFromKey(set, allScopes, prop, fallback || prop, value);\n  if (key === null) {\n    return false;\n  }\n  if (defined(fallback) && fallback !== prop) {\n    key = addScopesFromKey(set, allScopes, fallback, key, value);\n    if (key === null) {\n      return false;\n    }\n  }\n  return _createResolver(Array.from(set), [''], rootScopes, fallback,\n    () => subGetTarget(resolver, prop, value));\n}\nfunction addScopesFromKey(set, allScopes, key, fallback, item) {\n  while (key) {\n    key = addScopes(set, allScopes, key, fallback, item);\n  }\n  return key;\n}\nfunction subGetTarget(resolver, prop, value) {\n  const parent = resolver._getTarget();\n  if (!(prop in parent)) {\n    parent[prop] = {};\n  }\n  const target = parent[prop];\n  if (isArray(target) && isObject(value)) {\n    return value;\n  }\n  return target;\n}\nfunction _resolveWithPrefixes(prop, prefixes, scopes, proxy) {\n  let value;\n  for (const prefix of prefixes) {\n    value = _resolve(readKey(prefix, prop), scopes);\n    if (defined(value)) {\n      return needsSubResolver(prop, value)\n        ? createSubResolver(scopes, proxy, prop, value)\n        : value;\n    }\n  }\n}\nfunction _resolve(key, scopes) {\n  for (const scope of scopes) {\n    if (!scope) {\n      continue;\n    }\n    const value = scope[key];\n    if (defined(value)) {\n      return value;\n    }\n  }\n}\nfunction getKeysFromAllScopes(target) {\n  let keys = target._keys;\n  if (!keys) {\n    keys = target._keys = resolveKeysFromAllScopes(target._scopes);\n  }\n  return keys;\n}\nfunction resolveKeysFromAllScopes(scopes) {\n  const set = new Set();\n  for (const scope of scopes) {\n    for (const key of Object.keys(scope).filter(k => !k.startsWith('_'))) {\n      set.add(key);\n    }\n  }\n  return Array.from(set);\n}\nfunction _parseObjectDataRadialScale(meta, data, start, count) {\n  const {iScale} = meta;\n  const {key = 'r'} = this._parsing;\n  const parsed = new Array(count);\n  let i, ilen, index, item;\n  for (i = 0, ilen = count; i < ilen; ++i) {\n    index = i + start;\n    item = data[index];\n    parsed[i] = {\n      r: iScale.parse(resolveObjectKey(item, key), index)\n    };\n  }\n  return parsed;\n}\n\nconst EPSILON = Number.EPSILON || 1e-14;\nconst getPoint = (points, i) => i < points.length && !points[i].skip && points[i];\nconst getValueAxis = (indexAxis) => indexAxis === 'x' ? 'y' : 'x';\nfunction splineCurve(firstPoint, middlePoint, afterPoint, t) {\n  const previous = firstPoint.skip ? middlePoint : firstPoint;\n  const current = middlePoint;\n  const next = afterPoint.skip ? middlePoint : afterPoint;\n  const d01 = distanceBetweenPoints(current, previous);\n  const d12 = distanceBetweenPoints(next, current);\n  let s01 = d01 / (d01 + d12);\n  let s12 = d12 / (d01 + d12);\n  s01 = isNaN(s01) ? 0 : s01;\n  s12 = isNaN(s12) ? 0 : s12;\n  const fa = t * s01;\n  const fb = t * s12;\n  return {\n    previous: {\n      x: current.x - fa * (next.x - previous.x),\n      y: current.y - fa * (next.y - previous.y)\n    },\n    next: {\n      x: current.x + fb * (next.x - previous.x),\n      y: current.y + fb * (next.y - previous.y)\n    }\n  };\n}\nfunction monotoneAdjust(points, deltaK, mK) {\n  const pointsLen = points.length;\n  let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;\n  let pointAfter = getPoint(points, 0);\n  for (let i = 0; i < pointsLen - 1; ++i) {\n    pointCurrent = pointAfter;\n    pointAfter = getPoint(points, i + 1);\n    if (!pointCurrent || !pointAfter) {\n      continue;\n    }\n    if (almostEquals(deltaK[i], 0, EPSILON)) {\n      mK[i] = mK[i + 1] = 0;\n      continue;\n    }\n    alphaK = mK[i] / deltaK[i];\n    betaK = mK[i + 1] / deltaK[i];\n    squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n    if (squaredMagnitude <= 9) {\n      continue;\n    }\n    tauK = 3 / Math.sqrt(squaredMagnitude);\n    mK[i] = alphaK * tauK * deltaK[i];\n    mK[i + 1] = betaK * tauK * deltaK[i];\n  }\n}\nfunction monotoneCompute(points, mK, indexAxis = 'x') {\n  const valueAxis = getValueAxis(indexAxis);\n  const pointsLen = points.length;\n  let delta, pointBefore, pointCurrent;\n  let pointAfter = getPoint(points, 0);\n  for (let i = 0; i < pointsLen; ++i) {\n    pointBefore = pointCurrent;\n    pointCurrent = pointAfter;\n    pointAfter = getPoint(points, i + 1);\n    if (!pointCurrent) {\n      continue;\n    }\n    const iPixel = pointCurrent[indexAxis];\n    const vPixel = pointCurrent[valueAxis];\n    if (pointBefore) {\n      delta = (iPixel - pointBefore[indexAxis]) / 3;\n      pointCurrent[`cp1${indexAxis}`] = iPixel - delta;\n      pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];\n    }\n    if (pointAfter) {\n      delta = (pointAfter[indexAxis] - iPixel) / 3;\n      pointCurrent[`cp2${indexAxis}`] = iPixel + delta;\n      pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];\n    }\n  }\n}\nfunction splineCurveMonotone(points, indexAxis = 'x') {\n  const valueAxis = getValueAxis(indexAxis);\n  const pointsLen = points.length;\n  const deltaK = Array(pointsLen).fill(0);\n  const mK = Array(pointsLen);\n  let i, pointBefore, pointCurrent;\n  let pointAfter = getPoint(points, 0);\n  for (i = 0; i < pointsLen; ++i) {\n    pointBefore = pointCurrent;\n    pointCurrent = pointAfter;\n    pointAfter = getPoint(points, i + 1);\n    if (!pointCurrent) {\n      continue;\n    }\n    if (pointAfter) {\n      const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];\n      deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;\n    }\n    mK[i] = !pointBefore ? deltaK[i]\n      : !pointAfter ? deltaK[i - 1]\n      : (sign(deltaK[i - 1]) !== sign(deltaK[i])) ? 0\n      : (deltaK[i - 1] + deltaK[i]) / 2;\n  }\n  monotoneAdjust(points, deltaK, mK);\n  monotoneCompute(points, mK, indexAxis);\n}\nfunction capControlPoint(pt, min, max) {\n  return Math.max(Math.min(pt, max), min);\n}\nfunction capBezierPoints(points, area) {\n  let i, ilen, point, inArea, inAreaPrev;\n  let inAreaNext = _isPointInArea(points[0], area);\n  for (i = 0, ilen = points.length; i < ilen; ++i) {\n    inAreaPrev = inArea;\n    inArea = inAreaNext;\n    inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);\n    if (!inArea) {\n      continue;\n    }\n    point = points[i];\n    if (inAreaPrev) {\n      point.cp1x = capControlPoint(point.cp1x, area.left, area.right);\n      point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);\n    }\n    if (inAreaNext) {\n      point.cp2x = capControlPoint(point.cp2x, area.left, area.right);\n      point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);\n    }\n  }\n}\nfunction _updateBezierControlPoints(points, options, area, loop, indexAxis) {\n  let i, ilen, point, controlPoints;\n  if (options.spanGaps) {\n    points = points.filter((pt) => !pt.skip);\n  }\n  if (options.cubicInterpolationMode === 'monotone') {\n    splineCurveMonotone(points, indexAxis);\n  } else {\n    let prev = loop ? points[points.length - 1] : points[0];\n    for (i = 0, ilen = points.length; i < ilen; ++i) {\n      point = points[i];\n      controlPoints = splineCurve(\n        prev,\n        point,\n        points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen],\n        options.tension\n      );\n      point.cp1x = controlPoints.previous.x;\n      point.cp1y = controlPoints.previous.y;\n      point.cp2x = controlPoints.next.x;\n      point.cp2y = controlPoints.next.y;\n      prev = point;\n    }\n  }\n  if (options.capBezierPoints) {\n    capBezierPoints(points, area);\n  }\n}\n\nfunction _isDomSupported() {\n  return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\nfunction _getParentNode(domNode) {\n  let parent = domNode.parentNode;\n  if (parent && parent.toString() === '[object ShadowRoot]') {\n    parent = parent.host;\n  }\n  return parent;\n}\nfunction parseMaxStyle(styleValue, node, parentProperty) {\n  let valueInPixels;\n  if (typeof styleValue === 'string') {\n    valueInPixels = parseInt(styleValue, 10);\n    if (styleValue.indexOf('%') !== -1) {\n      valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n    }\n  } else {\n    valueInPixels = styleValue;\n  }\n  return valueInPixels;\n}\nconst getComputedStyle = (element) => window.getComputedStyle(element, null);\nfunction getStyle(el, property) {\n  return getComputedStyle(el).getPropertyValue(property);\n}\nconst positions = ['top', 'right', 'bottom', 'left'];\nfunction getPositionedStyle(styles, style, suffix) {\n  const result = {};\n  suffix = suffix ? '-' + suffix : '';\n  for (let i = 0; i < 4; i++) {\n    const pos = positions[i];\n    result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;\n  }\n  result.width = result.left + result.right;\n  result.height = result.top + result.bottom;\n  return result;\n}\nconst useOffsetPos = (x, y, target) => (x > 0 || y > 0) && (!target || !target.shadowRoot);\nfunction getCanvasPosition(e, canvas) {\n  const touches = e.touches;\n  const source = touches && touches.length ? touches[0] : e;\n  const {offsetX, offsetY} = source;\n  let box = false;\n  let x, y;\n  if (useOffsetPos(offsetX, offsetY, e.target)) {\n    x = offsetX;\n    y = offsetY;\n  } else {\n    const rect = canvas.getBoundingClientRect();\n    x = source.clientX - rect.left;\n    y = source.clientY - rect.top;\n    box = true;\n  }\n  return {x, y, box};\n}\nfunction getRelativePosition(evt, chart) {\n  if ('native' in evt) {\n    return evt;\n  }\n  const {canvas, currentDevicePixelRatio} = chart;\n  const style = getComputedStyle(canvas);\n  const borderBox = style.boxSizing === 'border-box';\n  const paddings = getPositionedStyle(style, 'padding');\n  const borders = getPositionedStyle(style, 'border', 'width');\n  const {x, y, box} = getCanvasPosition(evt, canvas);\n  const xOffset = paddings.left + (box && borders.left);\n  const yOffset = paddings.top + (box && borders.top);\n  let {width, height} = chart;\n  if (borderBox) {\n    width -= paddings.width + borders.width;\n    height -= paddings.height + borders.height;\n  }\n  return {\n    x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),\n    y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)\n  };\n}\nfunction getContainerSize(canvas, width, height) {\n  let maxWidth, maxHeight;\n  if (width === undefined || height === undefined) {\n    const container = _getParentNode(canvas);\n    if (!container) {\n      width = canvas.clientWidth;\n      height = canvas.clientHeight;\n    } else {\n      const rect = container.getBoundingClientRect();\n      const containerStyle = getComputedStyle(container);\n      const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');\n      const containerPadding = getPositionedStyle(containerStyle, 'padding');\n      width = rect.width - containerPadding.width - containerBorder.width;\n      height = rect.height - containerPadding.height - containerBorder.height;\n      maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');\n      maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');\n    }\n  }\n  return {\n    width,\n    height,\n    maxWidth: maxWidth || INFINITY,\n    maxHeight: maxHeight || INFINITY\n  };\n}\nconst round1 = v => Math.round(v * 10) / 10;\nfunction getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {\n  const style = getComputedStyle(canvas);\n  const margins = getPositionedStyle(style, 'margin');\n  const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;\n  const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;\n  const containerSize = getContainerSize(canvas, bbWidth, bbHeight);\n  let {width, height} = containerSize;\n  if (style.boxSizing === 'content-box') {\n    const borders = getPositionedStyle(style, 'border', 'width');\n    const paddings = getPositionedStyle(style, 'padding');\n    width -= paddings.width + borders.width;\n    height -= paddings.height + borders.height;\n  }\n  width = Math.max(0, width - margins.width);\n  height = Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height - margins.height);\n  width = round1(Math.min(width, maxWidth, containerSize.maxWidth));\n  height = round1(Math.min(height, maxHeight, containerSize.maxHeight));\n  if (width && !height) {\n    height = round1(width / 2);\n  }\n  return {\n    width,\n    height\n  };\n}\nfunction retinaScale(chart, forceRatio, forceStyle) {\n  const pixelRatio = forceRatio || 1;\n  const deviceHeight = Math.floor(chart.height * pixelRatio);\n  const deviceWidth = Math.floor(chart.width * pixelRatio);\n  chart.height = deviceHeight / pixelRatio;\n  chart.width = deviceWidth / pixelRatio;\n  const canvas = chart.canvas;\n  if (canvas.style && (forceStyle || (!canvas.style.height && !canvas.style.width))) {\n    canvas.style.height = `${chart.height}px`;\n    canvas.style.width = `${chart.width}px`;\n  }\n  if (chart.currentDevicePixelRatio !== pixelRatio\n      || canvas.height !== deviceHeight\n      || canvas.width !== deviceWidth) {\n    chart.currentDevicePixelRatio = pixelRatio;\n    canvas.height = deviceHeight;\n    canvas.width = deviceWidth;\n    chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n    return true;\n  }\n  return false;\n}\nconst supportsEventListenerOptions = (function() {\n  let passiveSupported = false;\n  try {\n    const options = {\n      get passive() {\n        passiveSupported = true;\n        return false;\n      }\n    };\n    window.addEventListener('test', null, options);\n    window.removeEventListener('test', null, options);\n  } catch (e) {\n  }\n  return passiveSupported;\n}());\nfunction readUsedSize(element, property) {\n  const value = getStyle(element, property);\n  const matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n  return matches ? +matches[1] : undefined;\n}\n\nfunction _pointInLine(p1, p2, t, mode) {\n  return {\n    x: p1.x + t * (p2.x - p1.x),\n    y: p1.y + t * (p2.y - p1.y)\n  };\n}\nfunction _steppedInterpolation(p1, p2, t, mode) {\n  return {\n    x: p1.x + t * (p2.x - p1.x),\n    y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y\n    : mode === 'after' ? t < 1 ? p1.y : p2.y\n    : t > 0 ? p2.y : p1.y\n  };\n}\nfunction _bezierInterpolation(p1, p2, t, mode) {\n  const cp1 = {x: p1.cp2x, y: p1.cp2y};\n  const cp2 = {x: p2.cp1x, y: p2.cp1y};\n  const a = _pointInLine(p1, cp1, t);\n  const b = _pointInLine(cp1, cp2, t);\n  const c = _pointInLine(cp2, p2, t);\n  const d = _pointInLine(a, b, t);\n  const e = _pointInLine(b, c, t);\n  return _pointInLine(d, e, t);\n}\n\nconst intlCache = new Map();\nfunction getNumberFormat(locale, options) {\n  options = options || {};\n  const cacheKey = locale + JSON.stringify(options);\n  let formatter = intlCache.get(cacheKey);\n  if (!formatter) {\n    formatter = new Intl.NumberFormat(locale, options);\n    intlCache.set(cacheKey, formatter);\n  }\n  return formatter;\n}\nfunction formatNumber(num, locale, options) {\n  return getNumberFormat(locale, options).format(num);\n}\n\nconst getRightToLeftAdapter = function(rectX, width) {\n  return {\n    x(x) {\n      return rectX + rectX + width - x;\n    },\n    setWidth(w) {\n      width = w;\n    },\n    textAlign(align) {\n      if (align === 'center') {\n        return align;\n      }\n      return align === 'right' ? 'left' : 'right';\n    },\n    xPlus(x, value) {\n      return x - value;\n    },\n    leftForLtr(x, itemWidth) {\n      return x - itemWidth;\n    },\n  };\n};\nconst getLeftToRightAdapter = function() {\n  return {\n    x(x) {\n      return x;\n    },\n    setWidth(w) {\n    },\n    textAlign(align) {\n      return align;\n    },\n    xPlus(x, value) {\n      return x + value;\n    },\n    leftForLtr(x, _itemWidth) {\n      return x;\n    },\n  };\n};\nfunction getRtlAdapter(rtl, rectX, width) {\n  return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();\n}\nfunction overrideTextDirection(ctx, direction) {\n  let style, original;\n  if (direction === 'ltr' || direction === 'rtl') {\n    style = ctx.canvas.style;\n    original = [\n      style.getPropertyValue('direction'),\n      style.getPropertyPriority('direction'),\n    ];\n    style.setProperty('direction', direction, 'important');\n    ctx.prevTextDirection = original;\n  }\n}\nfunction restoreTextDirection(ctx, original) {\n  if (original !== undefined) {\n    delete ctx.prevTextDirection;\n    ctx.canvas.style.setProperty('direction', original[0], original[1]);\n  }\n}\n\nfunction propertyFn(property) {\n  if (property === 'angle') {\n    return {\n      between: _angleBetween,\n      compare: _angleDiff,\n      normalize: _normalizeAngle,\n    };\n  }\n  return {\n    between: _isBetween,\n    compare: (a, b) => a - b,\n    normalize: x => x\n  };\n}\nfunction normalizeSegment({start, end, count, loop, style}) {\n  return {\n    start: start % count,\n    end: end % count,\n    loop: loop && (end - start + 1) % count === 0,\n    style\n  };\n}\nfunction getSegment(segment, points, bounds) {\n  const {property, start: startBound, end: endBound} = bounds;\n  const {between, normalize} = propertyFn(property);\n  const count = points.length;\n  let {start, end, loop} = segment;\n  let i, ilen;\n  if (loop) {\n    start += count;\n    end += count;\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      if (!between(normalize(points[start % count][property]), startBound, endBound)) {\n        break;\n      }\n      start--;\n      end--;\n    }\n    start %= count;\n    end %= count;\n  }\n  if (end < start) {\n    end += count;\n  }\n  return {start, end, loop, style: segment.style};\n}\nfunction _boundSegment(segment, points, bounds) {\n  if (!bounds) {\n    return [segment];\n  }\n  const {property, start: startBound, end: endBound} = bounds;\n  const count = points.length;\n  const {compare, between, normalize} = propertyFn(property);\n  const {start, end, loop, style} = getSegment(segment, points, bounds);\n  const result = [];\n  let inside = false;\n  let subStart = null;\n  let value, point, prevValue;\n  const startIsBefore = () => between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;\n  const endIsBefore = () => compare(endBound, value) === 0 || between(endBound, prevValue, value);\n  const shouldStart = () => inside || startIsBefore();\n  const shouldStop = () => !inside || endIsBefore();\n  for (let i = start, prev = start; i <= end; ++i) {\n    point = points[i % count];\n    if (point.skip) {\n      continue;\n    }\n    value = normalize(point[property]);\n    if (value === prevValue) {\n      continue;\n    }\n    inside = between(value, startBound, endBound);\n    if (subStart === null && shouldStart()) {\n      subStart = compare(value, startBound) === 0 ? i : prev;\n    }\n    if (subStart !== null && shouldStop()) {\n      result.push(normalizeSegment({start: subStart, end: i, loop, count, style}));\n      subStart = null;\n    }\n    prev = i;\n    prevValue = value;\n  }\n  if (subStart !== null) {\n    result.push(normalizeSegment({start: subStart, end, loop, count, style}));\n  }\n  return result;\n}\nfunction _boundSegments(line, bounds) {\n  const result = [];\n  const segments = line.segments;\n  for (let i = 0; i < segments.length; i++) {\n    const sub = _boundSegment(segments[i], line.points, bounds);\n    if (sub.length) {\n      result.push(...sub);\n    }\n  }\n  return result;\n}\nfunction findStartAndEnd(points, count, loop, spanGaps) {\n  let start = 0;\n  let end = count - 1;\n  if (loop && !spanGaps) {\n    while (start < count && !points[start].skip) {\n      start++;\n    }\n  }\n  while (start < count && points[start].skip) {\n    start++;\n  }\n  start %= count;\n  if (loop) {\n    end += start;\n  }\n  while (end > start && points[end % count].skip) {\n    end--;\n  }\n  end %= count;\n  return {start, end};\n}\nfunction solidSegments(points, start, max, loop) {\n  const count = points.length;\n  const result = [];\n  let last = start;\n  let prev = points[start];\n  let end;\n  for (end = start + 1; end <= max; ++end) {\n    const cur = points[end % count];\n    if (cur.skip || cur.stop) {\n      if (!prev.skip) {\n        loop = false;\n        result.push({start: start % count, end: (end - 1) % count, loop});\n        start = last = cur.stop ? end : null;\n      }\n    } else {\n      last = end;\n      if (prev.skip) {\n        start = end;\n      }\n    }\n    prev = cur;\n  }\n  if (last !== null) {\n    result.push({start: start % count, end: last % count, loop});\n  }\n  return result;\n}\nfunction _computeSegments(line, segmentOptions) {\n  const points = line.points;\n  const spanGaps = line.options.spanGaps;\n  const count = points.length;\n  if (!count) {\n    return [];\n  }\n  const loop = !!line._loop;\n  const {start, end} = findStartAndEnd(points, count, loop, spanGaps);\n  if (spanGaps === true) {\n    return splitByStyles(line, [{start, end, loop}], points, segmentOptions);\n  }\n  const max = end < start ? end + count : end;\n  const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;\n  return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);\n}\nfunction splitByStyles(line, segments, points, segmentOptions) {\n  if (!segmentOptions || !segmentOptions.setContext || !points) {\n    return segments;\n  }\n  return doSplitByStyles(line, segments, points, segmentOptions);\n}\nfunction doSplitByStyles(line, segments, points, segmentOptions) {\n  const chartContext = line._chart.getContext();\n  const baseStyle = readStyle(line.options);\n  const {_datasetIndex: datasetIndex, options: {spanGaps}} = line;\n  const count = points.length;\n  const result = [];\n  let prevStyle = baseStyle;\n  let start = segments[0].start;\n  let i = start;\n  function addStyle(s, e, l, st) {\n    const dir = spanGaps ? -1 : 1;\n    if (s === e) {\n      return;\n    }\n    s += count;\n    while (points[s % count].skip) {\n      s -= dir;\n    }\n    while (points[e % count].skip) {\n      e += dir;\n    }\n    if (s % count !== e % count) {\n      result.push({start: s % count, end: e % count, loop: l, style: st});\n      prevStyle = st;\n      start = e % count;\n    }\n  }\n  for (const segment of segments) {\n    start = spanGaps ? start : segment.start;\n    let prev = points[start % count];\n    let style;\n    for (i = start + 1; i <= segment.end; i++) {\n      const pt = points[i % count];\n      style = readStyle(segmentOptions.setContext(createContext(chartContext, {\n        type: 'segment',\n        p0: prev,\n        p1: pt,\n        p0DataIndex: (i - 1) % count,\n        p1DataIndex: i % count,\n        datasetIndex\n      })));\n      if (styleChanged(style, prevStyle)) {\n        addStyle(start, i - 1, segment.loop, prevStyle);\n      }\n      prev = pt;\n      prevStyle = style;\n    }\n    if (start < i - 1) {\n      addStyle(start, i - 1, segment.loop, prevStyle);\n    }\n  }\n  return result;\n}\nfunction readStyle(options) {\n  return {\n    backgroundColor: options.backgroundColor,\n    borderCapStyle: options.borderCapStyle,\n    borderDash: options.borderDash,\n    borderDashOffset: options.borderDashOffset,\n    borderJoinStyle: options.borderJoinStyle,\n    borderWidth: options.borderWidth,\n    borderColor: options.borderColor\n  };\n}\nfunction styleChanged(style, prevStyle) {\n  return prevStyle && JSON.stringify(style) !== JSON.stringify(prevStyle);\n}\n\nexport { _isPointInArea as $, _factorize as A, finiteOrDefault as B, callback as C, _addGrace as D, _limitValue as E, toDegrees as F, _measureText as G, HALF_PI as H, _int16Range as I, _alignPixel as J, toPadding as K, clipArea as L, renderText as M, unclipArea as N, toFont as O, PI as P, each as Q, _toLeftRightCenter as R, _alignStartEnd as S, TAU as T, overrides as U, merge as V, _capitalize as W, getRelativePosition as X, _rlookupByKey as Y, _lookupByKey as Z, _arrayUnique as _, resolve as a, toLineHeight as a$, getAngleFromPoint as a0, getMaximumSize as a1, _getParentNode as a2, readUsedSize as a3, throttled as a4, supportsEventListenerOptions as a5, _isDomSupported as a6, descriptors as a7, isFunction as a8, _attachContext as a9, getRtlAdapter as aA, overrideTextDirection as aB, _textX as aC, restoreTextDirection as aD, drawPointLegend as aE, noop as aF, distanceBetweenPoints as aG, _setMinAndMaxByKey as aH, niceNum as aI, almostWhole as aJ, almostEquals as aK, _decimalPlaces as aL, _longestText as aM, _filterBetween as aN, _lookup as aO, isPatternOrGradient as aP, getHoverColor as aQ, clone$1 as aR, _merger as aS, _mergerIf as aT, _deprecated as aU, _splitKey as aV, toFontString as aW, splineCurve as aX, splineCurveMonotone as aY, getStyle as aZ, fontString as a_, _createResolver as aa, _descriptors as ab, mergeIf as ac, uid as ad, debounce as ae, retinaScale as af, clearCanvas as ag, setsEqual as ah, _elementsEqual as ai, _isClickEvent as aj, _isBetween as ak, _readValueToProps as al, _updateBezierControlPoints as am, _computeSegments as an, _boundSegments as ao, _steppedInterpolation as ap, _bezierInterpolation as aq, _pointInLine as ar, _steppedLineTo as as, _bezierCurveTo as at, drawPoint as au, addRoundedRectPath as av, toTRBL as aw, toTRBLCorners as ax, _boundSegment as ay, _normalizeAngle as az, isArray as b, PITAU as b0, INFINITY as b1, RAD_PER_DEG as b2, QUARTER_PI as b3, TWO_THIRDS_PI as b4, _angleDiff as b5, color as c, defaults as d, effects as e, resolveObjectKey as f, isNumberFinite as g, createContext as h, isObject as i, defined as j, isNullOrUndef as k, listenArrayEvents as l, toPercentage as m, toDimension as n, formatNumber as o, _angleBetween as p, _getStartAndCountOfVisiblePoints as q, requestAnimFrame as r, sign as s, toRadians as t, unlistenArrayEvents as u, valueOrDefault as v, _scaleRangesChanged as w, isNumber as x, _parseObjectDataRadialScale as y, log10 as z };\n", "/*!\n * Chart.js v3.9.1\n * https://www.chartjs.org\n * (c) 2022 Chart.js Contributors\n * Released under the MIT License\n */\nimport { r as requestAnimFrame, a as resolve, e as effects, c as color, d as defaults, i as isObject, b as isArray, v as valueOrDefault, u as unlistenArrayEvents, l as listenArrayEvents, f as resolveObjectKey, g as isNumberFinite, h as createContext, j as defined, s as sign, k as isNullOrUndef, _ as _arrayUnique, t as toRadians, m as toPercentage, n as toDimension, T as TAU, o as formatNumber, p as _angleBetween, H as HALF_PI, P as PI, q as _getStartAndCountOfVisiblePoints, w as _scaleRangesChanged, x as isNumber, y as _parseObjectDataRadialScale, z as log10, A as _factorize, B as finiteOrDefault, C as callback, D as _addGrace, E as _limitValue, F as toDegrees, G as _measureText, I as _int16Range, J as _alignPixel, K as toPadding, L as clipArea, M as renderText, N as unclipArea, O as toFont, Q as each, R as _toLeftRightCenter, S as _alignStartEnd, U as overrides, V as merge, W as _capitalize, X as getRelativePosition, Y as _rlookupByKey, Z as _lookupByKey, $ as _isPointInArea, a0 as getAngleFromPoint, a1 as getMaximumSize, a2 as _getParentNode, a3 as readUsedSize, a4 as throttled, a5 as supportsEventListenerOptions, a6 as _isDomSupported, a7 as descriptors, a8 as isFunction, a9 as _attachContext, aa as _createResolver, ab as _descriptors, ac as mergeIf, ad as uid, ae as debounce, af as retinaScale, ag as clearCanvas, ah as setsEqual, ai as _elementsEqual, aj as _isClickEvent, ak as _isBetween, al as _readValueToProps, am as _updateBezierControlPoints, an as _computeSegments, ao as _boundSegments, ap as _steppedInterpolation, aq as _bezierInterpolation, ar as _pointInLine, as as _steppedLineTo, at as _bezierCurveTo, au as drawPoint, av as addRoundedRectPath, aw as toTRBL, ax as toTRBLCorners, ay as _boundSegment, az as _normalizeAngle, aA as getRtlAdapter, aB as overrideTextDirection, aC as _textX, aD as restoreTextDirection, aE as drawPointLegend, aF as noop, aG as distanceBetweenPoints, aH as _setMinAndMaxByKey, aI as niceNum, aJ as almostWhole, aK as almostEquals, aL as _decimalPlaces, aM as _longestText, aN as _filterBetween, aO as _lookup } from './chunks/helpers.segment.mjs';\nexport { d as defaults } from './chunks/helpers.segment.mjs';\n\nclass Animator {\n  constructor() {\n    this._request = null;\n    this._charts = new Map();\n    this._running = false;\n    this._lastDate = undefined;\n  }\n  _notify(chart, anims, date, type) {\n    const callbacks = anims.listeners[type];\n    const numSteps = anims.duration;\n    callbacks.forEach(fn => fn({\n      chart,\n      initial: anims.initial,\n      numSteps,\n      currentStep: Math.min(date - anims.start, numSteps)\n    }));\n  }\n  _refresh() {\n    if (this._request) {\n      return;\n    }\n    this._running = true;\n    this._request = requestAnimFrame.call(window, () => {\n      this._update();\n      this._request = null;\n      if (this._running) {\n        this._refresh();\n      }\n    });\n  }\n  _update(date = Date.now()) {\n    let remaining = 0;\n    this._charts.forEach((anims, chart) => {\n      if (!anims.running || !anims.items.length) {\n        return;\n      }\n      const items = anims.items;\n      let i = items.length - 1;\n      let draw = false;\n      let item;\n      for (; i >= 0; --i) {\n        item = items[i];\n        if (item._active) {\n          if (item._total > anims.duration) {\n            anims.duration = item._total;\n          }\n          item.tick(date);\n          draw = true;\n        } else {\n          items[i] = items[items.length - 1];\n          items.pop();\n        }\n      }\n      if (draw) {\n        chart.draw();\n        this._notify(chart, anims, date, 'progress');\n      }\n      if (!items.length) {\n        anims.running = false;\n        this._notify(chart, anims, date, 'complete');\n        anims.initial = false;\n      }\n      remaining += items.length;\n    });\n    this._lastDate = date;\n    if (remaining === 0) {\n      this._running = false;\n    }\n  }\n  _getAnims(chart) {\n    const charts = this._charts;\n    let anims = charts.get(chart);\n    if (!anims) {\n      anims = {\n        running: false,\n        initial: true,\n        items: [],\n        listeners: {\n          complete: [],\n          progress: []\n        }\n      };\n      charts.set(chart, anims);\n    }\n    return anims;\n  }\n  listen(chart, event, cb) {\n    this._getAnims(chart).listeners[event].push(cb);\n  }\n  add(chart, items) {\n    if (!items || !items.length) {\n      return;\n    }\n    this._getAnims(chart).items.push(...items);\n  }\n  has(chart) {\n    return this._getAnims(chart).items.length > 0;\n  }\n  start(chart) {\n    const anims = this._charts.get(chart);\n    if (!anims) {\n      return;\n    }\n    anims.running = true;\n    anims.start = Date.now();\n    anims.duration = anims.items.reduce((acc, cur) => Math.max(acc, cur._duration), 0);\n    this._refresh();\n  }\n  running(chart) {\n    if (!this._running) {\n      return false;\n    }\n    const anims = this._charts.get(chart);\n    if (!anims || !anims.running || !anims.items.length) {\n      return false;\n    }\n    return true;\n  }\n  stop(chart) {\n    const anims = this._charts.get(chart);\n    if (!anims || !anims.items.length) {\n      return;\n    }\n    const items = anims.items;\n    let i = items.length - 1;\n    for (; i >= 0; --i) {\n      items[i].cancel();\n    }\n    anims.items = [];\n    this._notify(chart, anims, Date.now(), 'complete');\n  }\n  remove(chart) {\n    return this._charts.delete(chart);\n  }\n}\nvar animator = new Animator();\n\nconst transparent = 'transparent';\nconst interpolators = {\n  boolean(from, to, factor) {\n    return factor > 0.5 ? to : from;\n  },\n  color(from, to, factor) {\n    const c0 = color(from || transparent);\n    const c1 = c0.valid && color(to || transparent);\n    return c1 && c1.valid\n      ? c1.mix(c0, factor).hexString()\n      : to;\n  },\n  number(from, to, factor) {\n    return from + (to - from) * factor;\n  }\n};\nclass Animation {\n  constructor(cfg, target, prop, to) {\n    const currentValue = target[prop];\n    to = resolve([cfg.to, to, currentValue, cfg.from]);\n    const from = resolve([cfg.from, currentValue, to]);\n    this._active = true;\n    this._fn = cfg.fn || interpolators[cfg.type || typeof from];\n    this._easing = effects[cfg.easing] || effects.linear;\n    this._start = Math.floor(Date.now() + (cfg.delay || 0));\n    this._duration = this._total = Math.floor(cfg.duration);\n    this._loop = !!cfg.loop;\n    this._target = target;\n    this._prop = prop;\n    this._from = from;\n    this._to = to;\n    this._promises = undefined;\n  }\n  active() {\n    return this._active;\n  }\n  update(cfg, to, date) {\n    if (this._active) {\n      this._notify(false);\n      const currentValue = this._target[this._prop];\n      const elapsed = date - this._start;\n      const remain = this._duration - elapsed;\n      this._start = date;\n      this._duration = Math.floor(Math.max(remain, cfg.duration));\n      this._total += elapsed;\n      this._loop = !!cfg.loop;\n      this._to = resolve([cfg.to, to, currentValue, cfg.from]);\n      this._from = resolve([cfg.from, currentValue, to]);\n    }\n  }\n  cancel() {\n    if (this._active) {\n      this.tick(Date.now());\n      this._active = false;\n      this._notify(false);\n    }\n  }\n  tick(date) {\n    const elapsed = date - this._start;\n    const duration = this._duration;\n    const prop = this._prop;\n    const from = this._from;\n    const loop = this._loop;\n    const to = this._to;\n    let factor;\n    this._active = from !== to && (loop || (elapsed < duration));\n    if (!this._active) {\n      this._target[prop] = to;\n      this._notify(true);\n      return;\n    }\n    if (elapsed < 0) {\n      this._target[prop] = from;\n      return;\n    }\n    factor = (elapsed / duration) % 2;\n    factor = loop && factor > 1 ? 2 - factor : factor;\n    factor = this._easing(Math.min(1, Math.max(0, factor)));\n    this._target[prop] = this._fn(from, to, factor);\n  }\n  wait() {\n    const promises = this._promises || (this._promises = []);\n    return new Promise((res, rej) => {\n      promises.push({res, rej});\n    });\n  }\n  _notify(resolved) {\n    const method = resolved ? 'res' : 'rej';\n    const promises = this._promises || [];\n    for (let i = 0; i < promises.length; i++) {\n      promises[i][method]();\n    }\n  }\n}\n\nconst numbers = ['x', 'y', 'borderWidth', 'radius', 'tension'];\nconst colors = ['color', 'borderColor', 'backgroundColor'];\ndefaults.set('animation', {\n  delay: undefined,\n  duration: 1000,\n  easing: 'easeOutQuart',\n  fn: undefined,\n  from: undefined,\n  loop: undefined,\n  to: undefined,\n  type: undefined,\n});\nconst animationOptions = Object.keys(defaults.animation);\ndefaults.describe('animation', {\n  _fallback: false,\n  _indexable: false,\n  _scriptable: (name) => name !== 'onProgress' && name !== 'onComplete' && name !== 'fn',\n});\ndefaults.set('animations', {\n  colors: {\n    type: 'color',\n    properties: colors\n  },\n  numbers: {\n    type: 'number',\n    properties: numbers\n  },\n});\ndefaults.describe('animations', {\n  _fallback: 'animation',\n});\ndefaults.set('transitions', {\n  active: {\n    animation: {\n      duration: 400\n    }\n  },\n  resize: {\n    animation: {\n      duration: 0\n    }\n  },\n  show: {\n    animations: {\n      colors: {\n        from: 'transparent'\n      },\n      visible: {\n        type: 'boolean',\n        duration: 0\n      },\n    }\n  },\n  hide: {\n    animations: {\n      colors: {\n        to: 'transparent'\n      },\n      visible: {\n        type: 'boolean',\n        easing: 'linear',\n        fn: v => v | 0\n      },\n    }\n  }\n});\nclass Animations {\n  constructor(chart, config) {\n    this._chart = chart;\n    this._properties = new Map();\n    this.configure(config);\n  }\n  configure(config) {\n    if (!isObject(config)) {\n      return;\n    }\n    const animatedProps = this._properties;\n    Object.getOwnPropertyNames(config).forEach(key => {\n      const cfg = config[key];\n      if (!isObject(cfg)) {\n        return;\n      }\n      const resolved = {};\n      for (const option of animationOptions) {\n        resolved[option] = cfg[option];\n      }\n      (isArray(cfg.properties) && cfg.properties || [key]).forEach((prop) => {\n        if (prop === key || !animatedProps.has(prop)) {\n          animatedProps.set(prop, resolved);\n        }\n      });\n    });\n  }\n  _animateOptions(target, values) {\n    const newOptions = values.options;\n    const options = resolveTargetOptions(target, newOptions);\n    if (!options) {\n      return [];\n    }\n    const animations = this._createAnimations(options, newOptions);\n    if (newOptions.$shared) {\n      awaitAll(target.options.$animations, newOptions).then(() => {\n        target.options = newOptions;\n      }, () => {\n      });\n    }\n    return animations;\n  }\n  _createAnimations(target, values) {\n    const animatedProps = this._properties;\n    const animations = [];\n    const running = target.$animations || (target.$animations = {});\n    const props = Object.keys(values);\n    const date = Date.now();\n    let i;\n    for (i = props.length - 1; i >= 0; --i) {\n      const prop = props[i];\n      if (prop.charAt(0) === '$') {\n        continue;\n      }\n      if (prop === 'options') {\n        animations.push(...this._animateOptions(target, values));\n        continue;\n      }\n      const value = values[prop];\n      let animation = running[prop];\n      const cfg = animatedProps.get(prop);\n      if (animation) {\n        if (cfg && animation.active()) {\n          animation.update(cfg, value, date);\n          continue;\n        } else {\n          animation.cancel();\n        }\n      }\n      if (!cfg || !cfg.duration) {\n        target[prop] = value;\n        continue;\n      }\n      running[prop] = animation = new Animation(cfg, target, prop, value);\n      animations.push(animation);\n    }\n    return animations;\n  }\n  update(target, values) {\n    if (this._properties.size === 0) {\n      Object.assign(target, values);\n      return;\n    }\n    const animations = this._createAnimations(target, values);\n    if (animations.length) {\n      animator.add(this._chart, animations);\n      return true;\n    }\n  }\n}\nfunction awaitAll(animations, properties) {\n  const running = [];\n  const keys = Object.keys(properties);\n  for (let i = 0; i < keys.length; i++) {\n    const anim = animations[keys[i]];\n    if (anim && anim.active()) {\n      running.push(anim.wait());\n    }\n  }\n  return Promise.all(running);\n}\nfunction resolveTargetOptions(target, newOptions) {\n  if (!newOptions) {\n    return;\n  }\n  let options = target.options;\n  if (!options) {\n    target.options = newOptions;\n    return;\n  }\n  if (options.$shared) {\n    target.options = options = Object.assign({}, options, {$shared: false, $animations: {}});\n  }\n  return options;\n}\n\nfunction scaleClip(scale, allowedOverflow) {\n  const opts = scale && scale.options || {};\n  const reverse = opts.reverse;\n  const min = opts.min === undefined ? allowedOverflow : 0;\n  const max = opts.max === undefined ? allowedOverflow : 0;\n  return {\n    start: reverse ? max : min,\n    end: reverse ? min : max\n  };\n}\nfunction defaultClip(xScale, yScale, allowedOverflow) {\n  if (allowedOverflow === false) {\n    return false;\n  }\n  const x = scaleClip(xScale, allowedOverflow);\n  const y = scaleClip(yScale, allowedOverflow);\n  return {\n    top: y.end,\n    right: x.end,\n    bottom: y.start,\n    left: x.start\n  };\n}\nfunction toClip(value) {\n  let t, r, b, l;\n  if (isObject(value)) {\n    t = value.top;\n    r = value.right;\n    b = value.bottom;\n    l = value.left;\n  } else {\n    t = r = b = l = value;\n  }\n  return {\n    top: t,\n    right: r,\n    bottom: b,\n    left: l,\n    disabled: value === false\n  };\n}\nfunction getSortedDatasetIndices(chart, filterVisible) {\n  const keys = [];\n  const metasets = chart._getSortedDatasetMetas(filterVisible);\n  let i, ilen;\n  for (i = 0, ilen = metasets.length; i < ilen; ++i) {\n    keys.push(metasets[i].index);\n  }\n  return keys;\n}\nfunction applyStack(stack, value, dsIndex, options = {}) {\n  const keys = stack.keys;\n  const singleMode = options.mode === 'single';\n  let i, ilen, datasetIndex, otherValue;\n  if (value === null) {\n    return;\n  }\n  for (i = 0, ilen = keys.length; i < ilen; ++i) {\n    datasetIndex = +keys[i];\n    if (datasetIndex === dsIndex) {\n      if (options.all) {\n        continue;\n      }\n      break;\n    }\n    otherValue = stack.values[datasetIndex];\n    if (isNumberFinite(otherValue) && (singleMode || (value === 0 || sign(value) === sign(otherValue)))) {\n      value += otherValue;\n    }\n  }\n  return value;\n}\nfunction convertObjectDataToArray(data) {\n  const keys = Object.keys(data);\n  const adata = new Array(keys.length);\n  let i, ilen, key;\n  for (i = 0, ilen = keys.length; i < ilen; ++i) {\n    key = keys[i];\n    adata[i] = {\n      x: key,\n      y: data[key]\n    };\n  }\n  return adata;\n}\nfunction isStacked(scale, meta) {\n  const stacked = scale && scale.options.stacked;\n  return stacked || (stacked === undefined && meta.stack !== undefined);\n}\nfunction getStackKey(indexScale, valueScale, meta) {\n  return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;\n}\nfunction getUserBounds(scale) {\n  const {min, max, minDefined, maxDefined} = scale.getUserBounds();\n  return {\n    min: minDefined ? min : Number.NEGATIVE_INFINITY,\n    max: maxDefined ? max : Number.POSITIVE_INFINITY\n  };\n}\nfunction getOrCreateStack(stacks, stackKey, indexValue) {\n  const subStack = stacks[stackKey] || (stacks[stackKey] = {});\n  return subStack[indexValue] || (subStack[indexValue] = {});\n}\nfunction getLastIndexInStack(stack, vScale, positive, type) {\n  for (const meta of vScale.getMatchingVisibleMetas(type).reverse()) {\n    const value = stack[meta.index];\n    if ((positive && value > 0) || (!positive && value < 0)) {\n      return meta.index;\n    }\n  }\n  return null;\n}\nfunction updateStacks(controller, parsed) {\n  const {chart, _cachedMeta: meta} = controller;\n  const stacks = chart._stacks || (chart._stacks = {});\n  const {iScale, vScale, index: datasetIndex} = meta;\n  const iAxis = iScale.axis;\n  const vAxis = vScale.axis;\n  const key = getStackKey(iScale, vScale, meta);\n  const ilen = parsed.length;\n  let stack;\n  for (let i = 0; i < ilen; ++i) {\n    const item = parsed[i];\n    const {[iAxis]: index, [vAxis]: value} = item;\n    const itemStacks = item._stacks || (item._stacks = {});\n    stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);\n    stack[datasetIndex] = value;\n    stack._top = getLastIndexInStack(stack, vScale, true, meta.type);\n    stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);\n  }\n}\nfunction getFirstScaleId(chart, axis) {\n  const scales = chart.scales;\n  return Object.keys(scales).filter(key => scales[key].axis === axis).shift();\n}\nfunction createDatasetContext(parent, index) {\n  return createContext(parent,\n    {\n      active: false,\n      dataset: undefined,\n      datasetIndex: index,\n      index,\n      mode: 'default',\n      type: 'dataset'\n    }\n  );\n}\nfunction createDataContext(parent, index, element) {\n  return createContext(parent, {\n    active: false,\n    dataIndex: index,\n    parsed: undefined,\n    raw: undefined,\n    element,\n    index,\n    mode: 'default',\n    type: 'data'\n  });\n}\nfunction clearStacks(meta, items) {\n  const datasetIndex = meta.controller.index;\n  const axis = meta.vScale && meta.vScale.axis;\n  if (!axis) {\n    return;\n  }\n  items = items || meta._parsed;\n  for (const parsed of items) {\n    const stacks = parsed._stacks;\n    if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {\n      return;\n    }\n    delete stacks[axis][datasetIndex];\n  }\n}\nconst isDirectUpdateMode = (mode) => mode === 'reset' || mode === 'none';\nconst cloneIfNotShared = (cached, shared) => shared ? cached : Object.assign({}, cached);\nconst createStack = (canStack, meta, chart) => canStack && !meta.hidden && meta._stacked\n  && {keys: getSortedDatasetIndices(chart, true), values: null};\nclass DatasetController {\n  constructor(chart, datasetIndex) {\n    this.chart = chart;\n    this._ctx = chart.ctx;\n    this.index = datasetIndex;\n    this._cachedDataOpts = {};\n    this._cachedMeta = this.getMeta();\n    this._type = this._cachedMeta.type;\n    this.options = undefined;\n    this._parsing = false;\n    this._data = undefined;\n    this._objectData = undefined;\n    this._sharedOptions = undefined;\n    this._drawStart = undefined;\n    this._drawCount = undefined;\n    this.enableOptionSharing = false;\n    this.supportsDecimation = false;\n    this.$context = undefined;\n    this._syncList = [];\n    this.initialize();\n  }\n  initialize() {\n    const meta = this._cachedMeta;\n    this.configure();\n    this.linkScales();\n    meta._stacked = isStacked(meta.vScale, meta);\n    this.addElements();\n  }\n  updateIndex(datasetIndex) {\n    if (this.index !== datasetIndex) {\n      clearStacks(this._cachedMeta);\n    }\n    this.index = datasetIndex;\n  }\n  linkScales() {\n    const chart = this.chart;\n    const meta = this._cachedMeta;\n    const dataset = this.getDataset();\n    const chooseId = (axis, x, y, r) => axis === 'x' ? x : axis === 'r' ? r : y;\n    const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));\n    const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));\n    const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));\n    const indexAxis = meta.indexAxis;\n    const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);\n    const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);\n    meta.xScale = this.getScaleForId(xid);\n    meta.yScale = this.getScaleForId(yid);\n    meta.rScale = this.getScaleForId(rid);\n    meta.iScale = this.getScaleForId(iid);\n    meta.vScale = this.getScaleForId(vid);\n  }\n  getDataset() {\n    return this.chart.data.datasets[this.index];\n  }\n  getMeta() {\n    return this.chart.getDatasetMeta(this.index);\n  }\n  getScaleForId(scaleID) {\n    return this.chart.scales[scaleID];\n  }\n  _getOtherScale(scale) {\n    const meta = this._cachedMeta;\n    return scale === meta.iScale\n      ? meta.vScale\n      : meta.iScale;\n  }\n  reset() {\n    this._update('reset');\n  }\n  _destroy() {\n    const meta = this._cachedMeta;\n    if (this._data) {\n      unlistenArrayEvents(this._data, this);\n    }\n    if (meta._stacked) {\n      clearStacks(meta);\n    }\n  }\n  _dataCheck() {\n    const dataset = this.getDataset();\n    const data = dataset.data || (dataset.data = []);\n    const _data = this._data;\n    if (isObject(data)) {\n      this._data = convertObjectDataToArray(data);\n    } else if (_data !== data) {\n      if (_data) {\n        unlistenArrayEvents(_data, this);\n        const meta = this._cachedMeta;\n        clearStacks(meta);\n        meta._parsed = [];\n      }\n      if (data && Object.isExtensible(data)) {\n        listenArrayEvents(data, this);\n      }\n      this._syncList = [];\n      this._data = data;\n    }\n  }\n  addElements() {\n    const meta = this._cachedMeta;\n    this._dataCheck();\n    if (this.datasetElementType) {\n      meta.dataset = new this.datasetElementType();\n    }\n  }\n  buildOrUpdateElements(resetNewElements) {\n    const meta = this._cachedMeta;\n    const dataset = this.getDataset();\n    let stackChanged = false;\n    this._dataCheck();\n    const oldStacked = meta._stacked;\n    meta._stacked = isStacked(meta.vScale, meta);\n    if (meta.stack !== dataset.stack) {\n      stackChanged = true;\n      clearStacks(meta);\n      meta.stack = dataset.stack;\n    }\n    this._resyncElements(resetNewElements);\n    if (stackChanged || oldStacked !== meta._stacked) {\n      updateStacks(this, meta._parsed);\n    }\n  }\n  configure() {\n    const config = this.chart.config;\n    const scopeKeys = config.datasetScopeKeys(this._type);\n    const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);\n    this.options = config.createResolver(scopes, this.getContext());\n    this._parsing = this.options.parsing;\n    this._cachedDataOpts = {};\n  }\n  parse(start, count) {\n    const {_cachedMeta: meta, _data: data} = this;\n    const {iScale, _stacked} = meta;\n    const iAxis = iScale.axis;\n    let sorted = start === 0 && count === data.length ? true : meta._sorted;\n    let prev = start > 0 && meta._parsed[start - 1];\n    let i, cur, parsed;\n    if (this._parsing === false) {\n      meta._parsed = data;\n      meta._sorted = true;\n      parsed = data;\n    } else {\n      if (isArray(data[start])) {\n        parsed = this.parseArrayData(meta, data, start, count);\n      } else if (isObject(data[start])) {\n        parsed = this.parseObjectData(meta, data, start, count);\n      } else {\n        parsed = this.parsePrimitiveData(meta, data, start, count);\n      }\n      const isNotInOrderComparedToPrev = () => cur[iAxis] === null || (prev && cur[iAxis] < prev[iAxis]);\n      for (i = 0; i < count; ++i) {\n        meta._parsed[i + start] = cur = parsed[i];\n        if (sorted) {\n          if (isNotInOrderComparedToPrev()) {\n            sorted = false;\n          }\n          prev = cur;\n        }\n      }\n      meta._sorted = sorted;\n    }\n    if (_stacked) {\n      updateStacks(this, parsed);\n    }\n  }\n  parsePrimitiveData(meta, data, start, count) {\n    const {iScale, vScale} = meta;\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    const labels = iScale.getLabels();\n    const singleScale = iScale === vScale;\n    const parsed = new Array(count);\n    let i, ilen, index;\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      index = i + start;\n      parsed[i] = {\n        [iAxis]: singleScale || iScale.parse(labels[index], index),\n        [vAxis]: vScale.parse(data[index], index)\n      };\n    }\n    return parsed;\n  }\n  parseArrayData(meta, data, start, count) {\n    const {xScale, yScale} = meta;\n    const parsed = new Array(count);\n    let i, ilen, index, item;\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      index = i + start;\n      item = data[index];\n      parsed[i] = {\n        x: xScale.parse(item[0], index),\n        y: yScale.parse(item[1], index)\n      };\n    }\n    return parsed;\n  }\n  parseObjectData(meta, data, start, count) {\n    const {xScale, yScale} = meta;\n    const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;\n    const parsed = new Array(count);\n    let i, ilen, index, item;\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      index = i + start;\n      item = data[index];\n      parsed[i] = {\n        x: xScale.parse(resolveObjectKey(item, xAxisKey), index),\n        y: yScale.parse(resolveObjectKey(item, yAxisKey), index)\n      };\n    }\n    return parsed;\n  }\n  getParsed(index) {\n    return this._cachedMeta._parsed[index];\n  }\n  getDataElement(index) {\n    return this._cachedMeta.data[index];\n  }\n  applyStack(scale, parsed, mode) {\n    const chart = this.chart;\n    const meta = this._cachedMeta;\n    const value = parsed[scale.axis];\n    const stack = {\n      keys: getSortedDatasetIndices(chart, true),\n      values: parsed._stacks[scale.axis]\n    };\n    return applyStack(stack, value, meta.index, {mode});\n  }\n  updateRangeFromParsed(range, scale, parsed, stack) {\n    const parsedValue = parsed[scale.axis];\n    let value = parsedValue === null ? NaN : parsedValue;\n    const values = stack && parsed._stacks[scale.axis];\n    if (stack && values) {\n      stack.values = values;\n      value = applyStack(stack, parsedValue, this._cachedMeta.index);\n    }\n    range.min = Math.min(range.min, value);\n    range.max = Math.max(range.max, value);\n  }\n  getMinMax(scale, canStack) {\n    const meta = this._cachedMeta;\n    const _parsed = meta._parsed;\n    const sorted = meta._sorted && scale === meta.iScale;\n    const ilen = _parsed.length;\n    const otherScale = this._getOtherScale(scale);\n    const stack = createStack(canStack, meta, this.chart);\n    const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};\n    const {min: otherMin, max: otherMax} = getUserBounds(otherScale);\n    let i, parsed;\n    function _skip() {\n      parsed = _parsed[i];\n      const otherValue = parsed[otherScale.axis];\n      return !isNumberFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;\n    }\n    for (i = 0; i < ilen; ++i) {\n      if (_skip()) {\n        continue;\n      }\n      this.updateRangeFromParsed(range, scale, parsed, stack);\n      if (sorted) {\n        break;\n      }\n    }\n    if (sorted) {\n      for (i = ilen - 1; i >= 0; --i) {\n        if (_skip()) {\n          continue;\n        }\n        this.updateRangeFromParsed(range, scale, parsed, stack);\n        break;\n      }\n    }\n    return range;\n  }\n  getAllParsedValues(scale) {\n    const parsed = this._cachedMeta._parsed;\n    const values = [];\n    let i, ilen, value;\n    for (i = 0, ilen = parsed.length; i < ilen; ++i) {\n      value = parsed[i][scale.axis];\n      if (isNumberFinite(value)) {\n        values.push(value);\n      }\n    }\n    return values;\n  }\n  getMaxOverflow() {\n    return false;\n  }\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const iScale = meta.iScale;\n    const vScale = meta.vScale;\n    const parsed = this.getParsed(index);\n    return {\n      label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',\n      value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''\n    };\n  }\n  _update(mode) {\n    const meta = this._cachedMeta;\n    this.update(mode || 'default');\n    meta._clip = toClip(valueOrDefault(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));\n  }\n  update(mode) {}\n  draw() {\n    const ctx = this._ctx;\n    const chart = this.chart;\n    const meta = this._cachedMeta;\n    const elements = meta.data || [];\n    const area = chart.chartArea;\n    const active = [];\n    const start = this._drawStart || 0;\n    const count = this._drawCount || (elements.length - start);\n    const drawActiveElementsOnTop = this.options.drawActiveElementsOnTop;\n    let i;\n    if (meta.dataset) {\n      meta.dataset.draw(ctx, area, start, count);\n    }\n    for (i = start; i < start + count; ++i) {\n      const element = elements[i];\n      if (element.hidden) {\n        continue;\n      }\n      if (element.active && drawActiveElementsOnTop) {\n        active.push(element);\n      } else {\n        element.draw(ctx, area);\n      }\n    }\n    for (i = 0; i < active.length; ++i) {\n      active[i].draw(ctx, area);\n    }\n  }\n  getStyle(index, active) {\n    const mode = active ? 'active' : 'default';\n    return index === undefined && this._cachedMeta.dataset\n      ? this.resolveDatasetElementOptions(mode)\n      : this.resolveDataElementOptions(index || 0, mode);\n  }\n  getContext(index, active, mode) {\n    const dataset = this.getDataset();\n    let context;\n    if (index >= 0 && index < this._cachedMeta.data.length) {\n      const element = this._cachedMeta.data[index];\n      context = element.$context ||\n        (element.$context = createDataContext(this.getContext(), index, element));\n      context.parsed = this.getParsed(index);\n      context.raw = dataset.data[index];\n      context.index = context.dataIndex = index;\n    } else {\n      context = this.$context ||\n        (this.$context = createDatasetContext(this.chart.getContext(), this.index));\n      context.dataset = dataset;\n      context.index = context.datasetIndex = this.index;\n    }\n    context.active = !!active;\n    context.mode = mode;\n    return context;\n  }\n  resolveDatasetElementOptions(mode) {\n    return this._resolveElementOptions(this.datasetElementType.id, mode);\n  }\n  resolveDataElementOptions(index, mode) {\n    return this._resolveElementOptions(this.dataElementType.id, mode, index);\n  }\n  _resolveElementOptions(elementType, mode = 'default', index) {\n    const active = mode === 'active';\n    const cache = this._cachedDataOpts;\n    const cacheKey = elementType + '-' + mode;\n    const cached = cache[cacheKey];\n    const sharing = this.enableOptionSharing && defined(index);\n    if (cached) {\n      return cloneIfNotShared(cached, sharing);\n    }\n    const config = this.chart.config;\n    const scopeKeys = config.datasetElementScopeKeys(this._type, elementType);\n    const prefixes = active ? [`${elementType}Hover`, 'hover', elementType, ''] : [elementType, ''];\n    const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n    const names = Object.keys(defaults.elements[elementType]);\n    const context = () => this.getContext(index, active);\n    const values = config.resolveNamedOptions(scopes, names, context, prefixes);\n    if (values.$shared) {\n      values.$shared = sharing;\n      cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));\n    }\n    return values;\n  }\n  _resolveAnimations(index, transition, active) {\n    const chart = this.chart;\n    const cache = this._cachedDataOpts;\n    const cacheKey = `animation-${transition}`;\n    const cached = cache[cacheKey];\n    if (cached) {\n      return cached;\n    }\n    let options;\n    if (chart.options.animation !== false) {\n      const config = this.chart.config;\n      const scopeKeys = config.datasetAnimationScopeKeys(this._type, transition);\n      const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n      options = config.createResolver(scopes, this.getContext(index, active, transition));\n    }\n    const animations = new Animations(chart, options && options.animations);\n    if (options && options._cacheable) {\n      cache[cacheKey] = Object.freeze(animations);\n    }\n    return animations;\n  }\n  getSharedOptions(options) {\n    if (!options.$shared) {\n      return;\n    }\n    return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));\n  }\n  includeOptions(mode, sharedOptions) {\n    return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;\n  }\n  _getSharedOptions(start, mode) {\n    const firstOpts = this.resolveDataElementOptions(start, mode);\n    const previouslySharedOptions = this._sharedOptions;\n    const sharedOptions = this.getSharedOptions(firstOpts);\n    const includeOptions = this.includeOptions(mode, sharedOptions) || (sharedOptions !== previouslySharedOptions);\n    this.updateSharedOptions(sharedOptions, mode, firstOpts);\n    return {sharedOptions, includeOptions};\n  }\n  updateElement(element, index, properties, mode) {\n    if (isDirectUpdateMode(mode)) {\n      Object.assign(element, properties);\n    } else {\n      this._resolveAnimations(index, mode).update(element, properties);\n    }\n  }\n  updateSharedOptions(sharedOptions, mode, newOptions) {\n    if (sharedOptions && !isDirectUpdateMode(mode)) {\n      this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);\n    }\n  }\n  _setStyle(element, index, mode, active) {\n    element.active = active;\n    const options = this.getStyle(index, active);\n    this._resolveAnimations(index, mode, active).update(element, {\n      options: (!active && this.getSharedOptions(options)) || options\n    });\n  }\n  removeHoverStyle(element, datasetIndex, index) {\n    this._setStyle(element, index, 'active', false);\n  }\n  setHoverStyle(element, datasetIndex, index) {\n    this._setStyle(element, index, 'active', true);\n  }\n  _removeDatasetHoverStyle() {\n    const element = this._cachedMeta.dataset;\n    if (element) {\n      this._setStyle(element, undefined, 'active', false);\n    }\n  }\n  _setDatasetHoverStyle() {\n    const element = this._cachedMeta.dataset;\n    if (element) {\n      this._setStyle(element, undefined, 'active', true);\n    }\n  }\n  _resyncElements(resetNewElements) {\n    const data = this._data;\n    const elements = this._cachedMeta.data;\n    for (const [method, arg1, arg2] of this._syncList) {\n      this[method](arg1, arg2);\n    }\n    this._syncList = [];\n    const numMeta = elements.length;\n    const numData = data.length;\n    const count = Math.min(numData, numMeta);\n    if (count) {\n      this.parse(0, count);\n    }\n    if (numData > numMeta) {\n      this._insertElements(numMeta, numData - numMeta, resetNewElements);\n    } else if (numData < numMeta) {\n      this._removeElements(numData, numMeta - numData);\n    }\n  }\n  _insertElements(start, count, resetNewElements = true) {\n    const meta = this._cachedMeta;\n    const data = meta.data;\n    const end = start + count;\n    let i;\n    const move = (arr) => {\n      arr.length += count;\n      for (i = arr.length - 1; i >= end; i--) {\n        arr[i] = arr[i - count];\n      }\n    };\n    move(data);\n    for (i = start; i < end; ++i) {\n      data[i] = new this.dataElementType();\n    }\n    if (this._parsing) {\n      move(meta._parsed);\n    }\n    this.parse(start, count);\n    if (resetNewElements) {\n      this.updateElements(data, start, count, 'reset');\n    }\n  }\n  updateElements(element, start, count, mode) {}\n  _removeElements(start, count) {\n    const meta = this._cachedMeta;\n    if (this._parsing) {\n      const removed = meta._parsed.splice(start, count);\n      if (meta._stacked) {\n        clearStacks(meta, removed);\n      }\n    }\n    meta.data.splice(start, count);\n  }\n  _sync(args) {\n    if (this._parsing) {\n      this._syncList.push(args);\n    } else {\n      const [method, arg1, arg2] = args;\n      this[method](arg1, arg2);\n    }\n    this.chart._dataChanges.push([this.index, ...args]);\n  }\n  _onDataPush() {\n    const count = arguments.length;\n    this._sync(['_insertElements', this.getDataset().data.length - count, count]);\n  }\n  _onDataPop() {\n    this._sync(['_removeElements', this._cachedMeta.data.length - 1, 1]);\n  }\n  _onDataShift() {\n    this._sync(['_removeElements', 0, 1]);\n  }\n  _onDataSplice(start, count) {\n    if (count) {\n      this._sync(['_removeElements', start, count]);\n    }\n    const newCount = arguments.length - 2;\n    if (newCount) {\n      this._sync(['_insertElements', start, newCount]);\n    }\n  }\n  _onDataUnshift() {\n    this._sync(['_insertElements', 0, arguments.length]);\n  }\n}\nDatasetController.defaults = {};\nDatasetController.prototype.datasetElementType = null;\nDatasetController.prototype.dataElementType = null;\n\nfunction getAllScaleValues(scale, type) {\n  if (!scale._cache.$bar) {\n    const visibleMetas = scale.getMatchingVisibleMetas(type);\n    let values = [];\n    for (let i = 0, ilen = visibleMetas.length; i < ilen; i++) {\n      values = values.concat(visibleMetas[i].controller.getAllParsedValues(scale));\n    }\n    scale._cache.$bar = _arrayUnique(values.sort((a, b) => a - b));\n  }\n  return scale._cache.$bar;\n}\nfunction computeMinSampleSize(meta) {\n  const scale = meta.iScale;\n  const values = getAllScaleValues(scale, meta.type);\n  let min = scale._length;\n  let i, ilen, curr, prev;\n  const updateMinAndPrev = () => {\n    if (curr === 32767 || curr === -32768) {\n      return;\n    }\n    if (defined(prev)) {\n      min = Math.min(min, Math.abs(curr - prev) || min);\n    }\n    prev = curr;\n  };\n  for (i = 0, ilen = values.length; i < ilen; ++i) {\n    curr = scale.getPixelForValue(values[i]);\n    updateMinAndPrev();\n  }\n  prev = undefined;\n  for (i = 0, ilen = scale.ticks.length; i < ilen; ++i) {\n    curr = scale.getPixelForTick(i);\n    updateMinAndPrev();\n  }\n  return min;\n}\nfunction computeFitCategoryTraits(index, ruler, options, stackCount) {\n  const thickness = options.barThickness;\n  let size, ratio;\n  if (isNullOrUndef(thickness)) {\n    size = ruler.min * options.categoryPercentage;\n    ratio = options.barPercentage;\n  } else {\n    size = thickness * stackCount;\n    ratio = 1;\n  }\n  return {\n    chunk: size / stackCount,\n    ratio,\n    start: ruler.pixels[index] - (size / 2)\n  };\n}\nfunction computeFlexCategoryTraits(index, ruler, options, stackCount) {\n  const pixels = ruler.pixels;\n  const curr = pixels[index];\n  let prev = index > 0 ? pixels[index - 1] : null;\n  let next = index < pixels.length - 1 ? pixels[index + 1] : null;\n  const percent = options.categoryPercentage;\n  if (prev === null) {\n    prev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n  }\n  if (next === null) {\n    next = curr + curr - prev;\n  }\n  const start = curr - (curr - Math.min(prev, next)) / 2 * percent;\n  const size = Math.abs(next - prev) / 2 * percent;\n  return {\n    chunk: size / stackCount,\n    ratio: options.barPercentage,\n    start\n  };\n}\nfunction parseFloatBar(entry, item, vScale, i) {\n  const startValue = vScale.parse(entry[0], i);\n  const endValue = vScale.parse(entry[1], i);\n  const min = Math.min(startValue, endValue);\n  const max = Math.max(startValue, endValue);\n  let barStart = min;\n  let barEnd = max;\n  if (Math.abs(min) > Math.abs(max)) {\n    barStart = max;\n    barEnd = min;\n  }\n  item[vScale.axis] = barEnd;\n  item._custom = {\n    barStart,\n    barEnd,\n    start: startValue,\n    end: endValue,\n    min,\n    max\n  };\n}\nfunction parseValue(entry, item, vScale, i) {\n  if (isArray(entry)) {\n    parseFloatBar(entry, item, vScale, i);\n  } else {\n    item[vScale.axis] = vScale.parse(entry, i);\n  }\n  return item;\n}\nfunction parseArrayOrPrimitive(meta, data, start, count) {\n  const iScale = meta.iScale;\n  const vScale = meta.vScale;\n  const labels = iScale.getLabels();\n  const singleScale = iScale === vScale;\n  const parsed = [];\n  let i, ilen, item, entry;\n  for (i = start, ilen = start + count; i < ilen; ++i) {\n    entry = data[i];\n    item = {};\n    item[iScale.axis] = singleScale || iScale.parse(labels[i], i);\n    parsed.push(parseValue(entry, item, vScale, i));\n  }\n  return parsed;\n}\nfunction isFloatBar(custom) {\n  return custom && custom.barStart !== undefined && custom.barEnd !== undefined;\n}\nfunction barSign(size, vScale, actualBase) {\n  if (size !== 0) {\n    return sign(size);\n  }\n  return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);\n}\nfunction borderProps(properties) {\n  let reverse, start, end, top, bottom;\n  if (properties.horizontal) {\n    reverse = properties.base > properties.x;\n    start = 'left';\n    end = 'right';\n  } else {\n    reverse = properties.base < properties.y;\n    start = 'bottom';\n    end = 'top';\n  }\n  if (reverse) {\n    top = 'end';\n    bottom = 'start';\n  } else {\n    top = 'start';\n    bottom = 'end';\n  }\n  return {start, end, reverse, top, bottom};\n}\nfunction setBorderSkipped(properties, options, stack, index) {\n  let edge = options.borderSkipped;\n  const res = {};\n  if (!edge) {\n    properties.borderSkipped = res;\n    return;\n  }\n  if (edge === true) {\n    properties.borderSkipped = {top: true, right: true, bottom: true, left: true};\n    return;\n  }\n  const {start, end, reverse, top, bottom} = borderProps(properties);\n  if (edge === 'middle' && stack) {\n    properties.enableBorderRadius = true;\n    if ((stack._top || 0) === index) {\n      edge = top;\n    } else if ((stack._bottom || 0) === index) {\n      edge = bottom;\n    } else {\n      res[parseEdge(bottom, start, end, reverse)] = true;\n      edge = top;\n    }\n  }\n  res[parseEdge(edge, start, end, reverse)] = true;\n  properties.borderSkipped = res;\n}\nfunction parseEdge(edge, a, b, reverse) {\n  if (reverse) {\n    edge = swap(edge, a, b);\n    edge = startEnd(edge, b, a);\n  } else {\n    edge = startEnd(edge, a, b);\n  }\n  return edge;\n}\nfunction swap(orig, v1, v2) {\n  return orig === v1 ? v2 : orig === v2 ? v1 : orig;\n}\nfunction startEnd(v, start, end) {\n  return v === 'start' ? start : v === 'end' ? end : v;\n}\nfunction setInflateAmount(properties, {inflateAmount}, ratio) {\n  properties.inflateAmount = inflateAmount === 'auto'\n    ? ratio === 1 ? 0.33 : 0\n    : inflateAmount;\n}\nclass BarController extends DatasetController {\n  parsePrimitiveData(meta, data, start, count) {\n    return parseArrayOrPrimitive(meta, data, start, count);\n  }\n  parseArrayData(meta, data, start, count) {\n    return parseArrayOrPrimitive(meta, data, start, count);\n  }\n  parseObjectData(meta, data, start, count) {\n    const {iScale, vScale} = meta;\n    const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;\n    const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;\n    const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;\n    const parsed = [];\n    let i, ilen, item, obj;\n    for (i = start, ilen = start + count; i < ilen; ++i) {\n      obj = data[i];\n      item = {};\n      item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);\n      parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));\n    }\n    return parsed;\n  }\n  updateRangeFromParsed(range, scale, parsed, stack) {\n    super.updateRangeFromParsed(range, scale, parsed, stack);\n    const custom = parsed._custom;\n    if (custom && scale === this._cachedMeta.vScale) {\n      range.min = Math.min(range.min, custom.min);\n      range.max = Math.max(range.max, custom.max);\n    }\n  }\n  getMaxOverflow() {\n    return 0;\n  }\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const {iScale, vScale} = meta;\n    const parsed = this.getParsed(index);\n    const custom = parsed._custom;\n    const value = isFloatBar(custom)\n      ? '[' + custom.start + ', ' + custom.end + ']'\n      : '' + vScale.getLabelForValue(parsed[vScale.axis]);\n    return {\n      label: '' + iScale.getLabelForValue(parsed[iScale.axis]),\n      value\n    };\n  }\n  initialize() {\n    this.enableOptionSharing = true;\n    super.initialize();\n    const meta = this._cachedMeta;\n    meta.stack = this.getDataset().stack;\n  }\n  update(mode) {\n    const meta = this._cachedMeta;\n    this.updateElements(meta.data, 0, meta.data.length, mode);\n  }\n  updateElements(bars, start, count, mode) {\n    const reset = mode === 'reset';\n    const {index, _cachedMeta: {vScale}} = this;\n    const base = vScale.getBasePixel();\n    const horizontal = vScale.isHorizontal();\n    const ruler = this._getRuler();\n    const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n    for (let i = start; i < start + count; i++) {\n      const parsed = this.getParsed(i);\n      const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {base, head: base} : this._calculateBarValuePixels(i);\n      const ipixels = this._calculateBarIndexPixels(i, ruler);\n      const stack = (parsed._stacks || {})[vScale.axis];\n      const properties = {\n        horizontal,\n        base: vpixels.base,\n        enableBorderRadius: !stack || isFloatBar(parsed._custom) || (index === stack._top || index === stack._bottom),\n        x: horizontal ? vpixels.head : ipixels.center,\n        y: horizontal ? ipixels.center : vpixels.head,\n        height: horizontal ? ipixels.size : Math.abs(vpixels.size),\n        width: horizontal ? Math.abs(vpixels.size) : ipixels.size\n      };\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);\n      }\n      const options = properties.options || bars[i].options;\n      setBorderSkipped(properties, options, stack, index);\n      setInflateAmount(properties, options, ruler.ratio);\n      this.updateElement(bars[i], i, properties, mode);\n    }\n  }\n  _getStacks(last, dataIndex) {\n    const {iScale} = this._cachedMeta;\n    const metasets = iScale.getMatchingVisibleMetas(this._type)\n      .filter(meta => meta.controller.options.grouped);\n    const stacked = iScale.options.stacked;\n    const stacks = [];\n    const skipNull = (meta) => {\n      const parsed = meta.controller.getParsed(dataIndex);\n      const val = parsed && parsed[meta.vScale.axis];\n      if (isNullOrUndef(val) || isNaN(val)) {\n        return true;\n      }\n    };\n    for (const meta of metasets) {\n      if (dataIndex !== undefined && skipNull(meta)) {\n        continue;\n      }\n      if (stacked === false || stacks.indexOf(meta.stack) === -1 ||\n\t\t\t\t(stacked === undefined && meta.stack === undefined)) {\n        stacks.push(meta.stack);\n      }\n      if (meta.index === last) {\n        break;\n      }\n    }\n    if (!stacks.length) {\n      stacks.push(undefined);\n    }\n    return stacks;\n  }\n  _getStackCount(index) {\n    return this._getStacks(undefined, index).length;\n  }\n  _getStackIndex(datasetIndex, name, dataIndex) {\n    const stacks = this._getStacks(datasetIndex, dataIndex);\n    const index = (name !== undefined)\n      ? stacks.indexOf(name)\n      : -1;\n    return (index === -1)\n      ? stacks.length - 1\n      : index;\n  }\n  _getRuler() {\n    const opts = this.options;\n    const meta = this._cachedMeta;\n    const iScale = meta.iScale;\n    const pixels = [];\n    let i, ilen;\n    for (i = 0, ilen = meta.data.length; i < ilen; ++i) {\n      pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));\n    }\n    const barThickness = opts.barThickness;\n    const min = barThickness || computeMinSampleSize(meta);\n    return {\n      min,\n      pixels,\n      start: iScale._startPixel,\n      end: iScale._endPixel,\n      stackCount: this._getStackCount(),\n      scale: iScale,\n      grouped: opts.grouped,\n      ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage\n    };\n  }\n  _calculateBarValuePixels(index) {\n    const {_cachedMeta: {vScale, _stacked}, options: {base: baseValue, minBarLength}} = this;\n    const actualBase = baseValue || 0;\n    const parsed = this.getParsed(index);\n    const custom = parsed._custom;\n    const floating = isFloatBar(custom);\n    let value = parsed[vScale.axis];\n    let start = 0;\n    let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value;\n    let head, size;\n    if (length !== value) {\n      start = length - value;\n      length = value;\n    }\n    if (floating) {\n      value = custom.barStart;\n      length = custom.barEnd - custom.barStart;\n      if (value !== 0 && sign(value) !== sign(custom.barEnd)) {\n        start = 0;\n      }\n      start += value;\n    }\n    const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;\n    let base = vScale.getPixelForValue(startValue);\n    if (this.chart.getDataVisibility(index)) {\n      head = vScale.getPixelForValue(start + length);\n    } else {\n      head = base;\n    }\n    size = head - base;\n    if (Math.abs(size) < minBarLength) {\n      size = barSign(size, vScale, actualBase) * minBarLength;\n      if (value === actualBase) {\n        base -= size / 2;\n      }\n      const startPixel = vScale.getPixelForDecimal(0);\n      const endPixel = vScale.getPixelForDecimal(1);\n      const min = Math.min(startPixel, endPixel);\n      const max = Math.max(startPixel, endPixel);\n      base = Math.max(Math.min(base, max), min);\n      head = base + size;\n    }\n    if (base === vScale.getPixelForValue(actualBase)) {\n      const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;\n      base += halfGrid;\n      size -= halfGrid;\n    }\n    return {\n      size,\n      base,\n      head,\n      center: head + size / 2\n    };\n  }\n  _calculateBarIndexPixels(index, ruler) {\n    const scale = ruler.scale;\n    const options = this.options;\n    const skipNull = options.skipNull;\n    const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);\n    let center, size;\n    if (ruler.grouped) {\n      const stackCount = skipNull ? this._getStackCount(index) : ruler.stackCount;\n      const range = options.barThickness === 'flex'\n        ? computeFlexCategoryTraits(index, ruler, options, stackCount)\n        : computeFitCategoryTraits(index, ruler, options, stackCount);\n      const stackIndex = this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index : undefined);\n      center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);\n      size = Math.min(maxBarThickness, range.chunk * range.ratio);\n    } else {\n      center = scale.getPixelForValue(this.getParsed(index)[scale.axis], index);\n      size = Math.min(maxBarThickness, ruler.min * ruler.ratio);\n    }\n    return {\n      base: center - size / 2,\n      head: center + size / 2,\n      center,\n      size\n    };\n  }\n  draw() {\n    const meta = this._cachedMeta;\n    const vScale = meta.vScale;\n    const rects = meta.data;\n    const ilen = rects.length;\n    let i = 0;\n    for (; i < ilen; ++i) {\n      if (this.getParsed(i)[vScale.axis] !== null) {\n        rects[i].draw(this._ctx);\n      }\n    }\n  }\n}\nBarController.id = 'bar';\nBarController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'bar',\n  categoryPercentage: 0.8,\n  barPercentage: 0.9,\n  grouped: true,\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['x', 'y', 'base', 'width', 'height']\n    }\n  }\n};\nBarController.overrides = {\n  scales: {\n    _index_: {\n      type: 'category',\n      offset: true,\n      grid: {\n        offset: true\n      }\n    },\n    _value_: {\n      type: 'linear',\n      beginAtZero: true,\n    }\n  }\n};\n\nclass BubbleController extends DatasetController {\n  initialize() {\n    this.enableOptionSharing = true;\n    super.initialize();\n  }\n  parsePrimitiveData(meta, data, start, count) {\n    const parsed = super.parsePrimitiveData(meta, data, start, count);\n    for (let i = 0; i < parsed.length; i++) {\n      parsed[i]._custom = this.resolveDataElementOptions(i + start).radius;\n    }\n    return parsed;\n  }\n  parseArrayData(meta, data, start, count) {\n    const parsed = super.parseArrayData(meta, data, start, count);\n    for (let i = 0; i < parsed.length; i++) {\n      const item = data[start + i];\n      parsed[i]._custom = valueOrDefault(item[2], this.resolveDataElementOptions(i + start).radius);\n    }\n    return parsed;\n  }\n  parseObjectData(meta, data, start, count) {\n    const parsed = super.parseObjectData(meta, data, start, count);\n    for (let i = 0; i < parsed.length; i++) {\n      const item = data[start + i];\n      parsed[i]._custom = valueOrDefault(item && item.r && +item.r, this.resolveDataElementOptions(i + start).radius);\n    }\n    return parsed;\n  }\n  getMaxOverflow() {\n    const data = this._cachedMeta.data;\n    let max = 0;\n    for (let i = data.length - 1; i >= 0; --i) {\n      max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n    }\n    return max > 0 && max;\n  }\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const {xScale, yScale} = meta;\n    const parsed = this.getParsed(index);\n    const x = xScale.getLabelForValue(parsed.x);\n    const y = yScale.getLabelForValue(parsed.y);\n    const r = parsed._custom;\n    return {\n      label: meta.label,\n      value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'\n    };\n  }\n  update(mode) {\n    const points = this._cachedMeta.data;\n    this.updateElements(points, 0, points.length, mode);\n  }\n  updateElements(points, start, count, mode) {\n    const reset = mode === 'reset';\n    const {iScale, vScale} = this._cachedMeta;\n    const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    for (let i = start; i < start + count; i++) {\n      const point = points[i];\n      const parsed = !reset && this.getParsed(i);\n      const properties = {};\n      const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);\n      const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);\n      properties.skip = isNaN(iPixel) || isNaN(vPixel);\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n        if (reset) {\n          properties.options.radius = 0;\n        }\n      }\n      this.updateElement(point, i, properties, mode);\n    }\n  }\n  resolveDataElementOptions(index, mode) {\n    const parsed = this.getParsed(index);\n    let values = super.resolveDataElementOptions(index, mode);\n    if (values.$shared) {\n      values = Object.assign({}, values, {$shared: false});\n    }\n    const radius = values.radius;\n    if (mode !== 'active') {\n      values.radius = 0;\n    }\n    values.radius += valueOrDefault(parsed && parsed._custom, radius);\n    return values;\n  }\n}\nBubbleController.id = 'bubble';\nBubbleController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'point',\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['x', 'y', 'borderWidth', 'radius']\n    }\n  }\n};\nBubbleController.overrides = {\n  scales: {\n    x: {\n      type: 'linear'\n    },\n    y: {\n      type: 'linear'\n    }\n  },\n  plugins: {\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        }\n      }\n    }\n  }\n};\n\nfunction getRatioAndOffset(rotation, circumference, cutout) {\n  let ratioX = 1;\n  let ratioY = 1;\n  let offsetX = 0;\n  let offsetY = 0;\n  if (circumference < TAU) {\n    const startAngle = rotation;\n    const endAngle = startAngle + circumference;\n    const startX = Math.cos(startAngle);\n    const startY = Math.sin(startAngle);\n    const endX = Math.cos(endAngle);\n    const endY = Math.sin(endAngle);\n    const calcMax = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);\n    const calcMin = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);\n    const maxX = calcMax(0, startX, endX);\n    const maxY = calcMax(HALF_PI, startY, endY);\n    const minX = calcMin(PI, startX, endX);\n    const minY = calcMin(PI + HALF_PI, startY, endY);\n    ratioX = (maxX - minX) / 2;\n    ratioY = (maxY - minY) / 2;\n    offsetX = -(maxX + minX) / 2;\n    offsetY = -(maxY + minY) / 2;\n  }\n  return {ratioX, ratioY, offsetX, offsetY};\n}\nclass DoughnutController extends DatasetController {\n  constructor(chart, datasetIndex) {\n    super(chart, datasetIndex);\n    this.enableOptionSharing = true;\n    this.innerRadius = undefined;\n    this.outerRadius = undefined;\n    this.offsetX = undefined;\n    this.offsetY = undefined;\n  }\n  linkScales() {}\n  parse(start, count) {\n    const data = this.getDataset().data;\n    const meta = this._cachedMeta;\n    if (this._parsing === false) {\n      meta._parsed = data;\n    } else {\n      let getter = (i) => +data[i];\n      if (isObject(data[start])) {\n        const {key = 'value'} = this._parsing;\n        getter = (i) => +resolveObjectKey(data[i], key);\n      }\n      let i, ilen;\n      for (i = start, ilen = start + count; i < ilen; ++i) {\n        meta._parsed[i] = getter(i);\n      }\n    }\n  }\n  _getRotation() {\n    return toRadians(this.options.rotation - 90);\n  }\n  _getCircumference() {\n    return toRadians(this.options.circumference);\n  }\n  _getRotationExtents() {\n    let min = TAU;\n    let max = -TAU;\n    for (let i = 0; i < this.chart.data.datasets.length; ++i) {\n      if (this.chart.isDatasetVisible(i)) {\n        const controller = this.chart.getDatasetMeta(i).controller;\n        const rotation = controller._getRotation();\n        const circumference = controller._getCircumference();\n        min = Math.min(min, rotation);\n        max = Math.max(max, rotation + circumference);\n      }\n    }\n    return {\n      rotation: min,\n      circumference: max - min,\n    };\n  }\n  update(mode) {\n    const chart = this.chart;\n    const {chartArea} = chart;\n    const meta = this._cachedMeta;\n    const arcs = meta.data;\n    const spacing = this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;\n    const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);\n    const cutout = Math.min(toPercentage(this.options.cutout, maxSize), 1);\n    const chartWeight = this._getRingWeight(this.index);\n    const {circumference, rotation} = this._getRotationExtents();\n    const {ratioX, ratioY, offsetX, offsetY} = getRatioAndOffset(rotation, circumference, cutout);\n    const maxWidth = (chartArea.width - spacing) / ratioX;\n    const maxHeight = (chartArea.height - spacing) / ratioY;\n    const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n    const outerRadius = toDimension(this.options.radius, maxRadius);\n    const innerRadius = Math.max(outerRadius * cutout, 0);\n    const radiusLength = (outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();\n    this.offsetX = offsetX * outerRadius;\n    this.offsetY = offsetY * outerRadius;\n    meta.total = this.calculateTotal();\n    this.outerRadius = outerRadius - radiusLength * this._getRingWeightOffset(this.index);\n    this.innerRadius = Math.max(this.outerRadius - radiusLength * chartWeight, 0);\n    this.updateElements(arcs, 0, arcs.length, mode);\n  }\n  _circumference(i, reset) {\n    const opts = this.options;\n    const meta = this._cachedMeta;\n    const circumference = this._getCircumference();\n    if ((reset && opts.animation.animateRotate) || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {\n      return 0;\n    }\n    return this.calculateCircumference(meta._parsed[i] * circumference / TAU);\n  }\n  updateElements(arcs, start, count, mode) {\n    const reset = mode === 'reset';\n    const chart = this.chart;\n    const chartArea = chart.chartArea;\n    const opts = chart.options;\n    const animationOpts = opts.animation;\n    const centerX = (chartArea.left + chartArea.right) / 2;\n    const centerY = (chartArea.top + chartArea.bottom) / 2;\n    const animateScale = reset && animationOpts.animateScale;\n    const innerRadius = animateScale ? 0 : this.innerRadius;\n    const outerRadius = animateScale ? 0 : this.outerRadius;\n    const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n    let startAngle = this._getRotation();\n    let i;\n    for (i = 0; i < start; ++i) {\n      startAngle += this._circumference(i, reset);\n    }\n    for (i = start; i < start + count; ++i) {\n      const circumference = this._circumference(i, reset);\n      const arc = arcs[i];\n      const properties = {\n        x: centerX + this.offsetX,\n        y: centerY + this.offsetY,\n        startAngle,\n        endAngle: startAngle + circumference,\n        circumference,\n        outerRadius,\n        innerRadius\n      };\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, arc.active ? 'active' : mode);\n      }\n      startAngle += circumference;\n      this.updateElement(arc, i, properties, mode);\n    }\n  }\n  calculateTotal() {\n    const meta = this._cachedMeta;\n    const metaData = meta.data;\n    let total = 0;\n    let i;\n    for (i = 0; i < metaData.length; i++) {\n      const value = meta._parsed[i];\n      if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {\n        total += Math.abs(value);\n      }\n    }\n    return total;\n  }\n  calculateCircumference(value) {\n    const total = this._cachedMeta.total;\n    if (total > 0 && !isNaN(value)) {\n      return TAU * (Math.abs(value) / total);\n    }\n    return 0;\n  }\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const chart = this.chart;\n    const labels = chart.data.labels || [];\n    const value = formatNumber(meta._parsed[index], chart.options.locale);\n    return {\n      label: labels[index] || '',\n      value,\n    };\n  }\n  getMaxBorderWidth(arcs) {\n    let max = 0;\n    const chart = this.chart;\n    let i, ilen, meta, controller, options;\n    if (!arcs) {\n      for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\n        if (chart.isDatasetVisible(i)) {\n          meta = chart.getDatasetMeta(i);\n          arcs = meta.data;\n          controller = meta.controller;\n          break;\n        }\n      }\n    }\n    if (!arcs) {\n      return 0;\n    }\n    for (i = 0, ilen = arcs.length; i < ilen; ++i) {\n      options = controller.resolveDataElementOptions(i);\n      if (options.borderAlign !== 'inner') {\n        max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);\n      }\n    }\n    return max;\n  }\n  getMaxOffset(arcs) {\n    let max = 0;\n    for (let i = 0, ilen = arcs.length; i < ilen; ++i) {\n      const options = this.resolveDataElementOptions(i);\n      max = Math.max(max, options.offset || 0, options.hoverOffset || 0);\n    }\n    return max;\n  }\n  _getRingWeightOffset(datasetIndex) {\n    let ringWeightOffset = 0;\n    for (let i = 0; i < datasetIndex; ++i) {\n      if (this.chart.isDatasetVisible(i)) {\n        ringWeightOffset += this._getRingWeight(i);\n      }\n    }\n    return ringWeightOffset;\n  }\n  _getRingWeight(datasetIndex) {\n    return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);\n  }\n  _getVisibleDatasetWeightTotal() {\n    return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;\n  }\n}\nDoughnutController.id = 'doughnut';\nDoughnutController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'arc',\n  animation: {\n    animateRotate: true,\n    animateScale: false\n  },\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['circumference', 'endAngle', 'innerRadius', 'outerRadius', 'startAngle', 'x', 'y', 'offset', 'borderWidth', 'spacing']\n    },\n  },\n  cutout: '50%',\n  rotation: 0,\n  circumference: 360,\n  radius: '100%',\n  spacing: 0,\n  indexAxis: 'r',\n};\nDoughnutController.descriptors = {\n  _scriptable: (name) => name !== 'spacing',\n  _indexable: (name) => name !== 'spacing',\n};\nDoughnutController.overrides = {\n  aspectRatio: 1,\n  plugins: {\n    legend: {\n      labels: {\n        generateLabels(chart) {\n          const data = chart.data;\n          if (data.labels.length && data.datasets.length) {\n            const {labels: {pointStyle}} = chart.legend.options;\n            return data.labels.map((label, i) => {\n              const meta = chart.getDatasetMeta(0);\n              const style = meta.controller.getStyle(i);\n              return {\n                text: label,\n                fillStyle: style.backgroundColor,\n                strokeStyle: style.borderColor,\n                lineWidth: style.borderWidth,\n                pointStyle: pointStyle,\n                hidden: !chart.getDataVisibility(i),\n                index: i\n              };\n            });\n          }\n          return [];\n        }\n      },\n      onClick(e, legendItem, legend) {\n        legend.chart.toggleDataVisibility(legendItem.index);\n        legend.chart.update();\n      }\n    },\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        },\n        label(tooltipItem) {\n          let dataLabel = tooltipItem.label;\n          const value = ': ' + tooltipItem.formattedValue;\n          if (isArray(dataLabel)) {\n            dataLabel = dataLabel.slice();\n            dataLabel[0] += value;\n          } else {\n            dataLabel += value;\n          }\n          return dataLabel;\n        }\n      }\n    }\n  }\n};\n\nclass LineController extends DatasetController {\n  initialize() {\n    this.enableOptionSharing = true;\n    this.supportsDecimation = true;\n    super.initialize();\n  }\n  update(mode) {\n    const meta = this._cachedMeta;\n    const {dataset: line, data: points = [], _dataset} = meta;\n    const animationsDisabled = this.chart._animationsDisabled;\n    let {start, count} = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n    this._drawStart = start;\n    this._drawCount = count;\n    if (_scaleRangesChanged(meta)) {\n      start = 0;\n      count = points.length;\n    }\n    line._chart = this.chart;\n    line._datasetIndex = this.index;\n    line._decimated = !!_dataset._decimated;\n    line.points = points;\n    const options = this.resolveDatasetElementOptions(mode);\n    if (!this.options.showLine) {\n      options.borderWidth = 0;\n    }\n    options.segment = this.options.segment;\n    this.updateElement(line, undefined, {\n      animated: !animationsDisabled,\n      options\n    }, mode);\n    this.updateElements(points, start, count, mode);\n  }\n  updateElements(points, start, count, mode) {\n    const reset = mode === 'reset';\n    const {iScale, vScale, _stacked, _dataset} = this._cachedMeta;\n    const {sharedOptions, includeOptions} = this._getSharedOptions(start, mode);\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    const {spanGaps, segment} = this.options;\n    const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n    const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n    let prevParsed = start > 0 && this.getParsed(start - 1);\n    for (let i = start; i < start + count; ++i) {\n      const point = points[i];\n      const parsed = this.getParsed(i);\n      const properties = directUpdate ? point : {};\n      const nullData = isNullOrUndef(parsed[vAxis]);\n      const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n      const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n      properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n      properties.stop = i > 0 && (Math.abs(parsed[iAxis] - prevParsed[iAxis])) > maxGapLength;\n      if (segment) {\n        properties.parsed = parsed;\n        properties.raw = _dataset.data[i];\n      }\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n      }\n      if (!directUpdate) {\n        this.updateElement(point, i, properties, mode);\n      }\n      prevParsed = parsed;\n    }\n  }\n  getMaxOverflow() {\n    const meta = this._cachedMeta;\n    const dataset = meta.dataset;\n    const border = dataset.options && dataset.options.borderWidth || 0;\n    const data = meta.data || [];\n    if (!data.length) {\n      return border;\n    }\n    const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n    const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n    return Math.max(border, firstPoint, lastPoint) / 2;\n  }\n  draw() {\n    const meta = this._cachedMeta;\n    meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);\n    super.draw();\n  }\n}\nLineController.id = 'line';\nLineController.defaults = {\n  datasetElementType: 'line',\n  dataElementType: 'point',\n  showLine: true,\n  spanGaps: false,\n};\nLineController.overrides = {\n  scales: {\n    _index_: {\n      type: 'category',\n    },\n    _value_: {\n      type: 'linear',\n    },\n  }\n};\n\nclass PolarAreaController extends DatasetController {\n  constructor(chart, datasetIndex) {\n    super(chart, datasetIndex);\n    this.innerRadius = undefined;\n    this.outerRadius = undefined;\n  }\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const chart = this.chart;\n    const labels = chart.data.labels || [];\n    const value = formatNumber(meta._parsed[index].r, chart.options.locale);\n    return {\n      label: labels[index] || '',\n      value,\n    };\n  }\n  parseObjectData(meta, data, start, count) {\n    return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n  }\n  update(mode) {\n    const arcs = this._cachedMeta.data;\n    this._updateRadius();\n    this.updateElements(arcs, 0, arcs.length, mode);\n  }\n  getMinMax() {\n    const meta = this._cachedMeta;\n    const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};\n    meta.data.forEach((element, index) => {\n      const parsed = this.getParsed(index).r;\n      if (!isNaN(parsed) && this.chart.getDataVisibility(index)) {\n        if (parsed < range.min) {\n          range.min = parsed;\n        }\n        if (parsed > range.max) {\n          range.max = parsed;\n        }\n      }\n    });\n    return range;\n  }\n  _updateRadius() {\n    const chart = this.chart;\n    const chartArea = chart.chartArea;\n    const opts = chart.options;\n    const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n    const outerRadius = Math.max(minSize / 2, 0);\n    const innerRadius = Math.max(opts.cutoutPercentage ? (outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\n    const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();\n    this.outerRadius = outerRadius - (radiusLength * this.index);\n    this.innerRadius = this.outerRadius - radiusLength;\n  }\n  updateElements(arcs, start, count, mode) {\n    const reset = mode === 'reset';\n    const chart = this.chart;\n    const opts = chart.options;\n    const animationOpts = opts.animation;\n    const scale = this._cachedMeta.rScale;\n    const centerX = scale.xCenter;\n    const centerY = scale.yCenter;\n    const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;\n    let angle = datasetStartAngle;\n    let i;\n    const defaultAngle = 360 / this.countVisibleElements();\n    for (i = 0; i < start; ++i) {\n      angle += this._computeAngle(i, mode, defaultAngle);\n    }\n    for (i = start; i < start + count; i++) {\n      const arc = arcs[i];\n      let startAngle = angle;\n      let endAngle = angle + this._computeAngle(i, mode, defaultAngle);\n      let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(this.getParsed(i).r) : 0;\n      angle = endAngle;\n      if (reset) {\n        if (animationOpts.animateScale) {\n          outerRadius = 0;\n        }\n        if (animationOpts.animateRotate) {\n          startAngle = endAngle = datasetStartAngle;\n        }\n      }\n      const properties = {\n        x: centerX,\n        y: centerY,\n        innerRadius: 0,\n        outerRadius,\n        startAngle,\n        endAngle,\n        options: this.resolveDataElementOptions(i, arc.active ? 'active' : mode)\n      };\n      this.updateElement(arc, i, properties, mode);\n    }\n  }\n  countVisibleElements() {\n    const meta = this._cachedMeta;\n    let count = 0;\n    meta.data.forEach((element, index) => {\n      if (!isNaN(this.getParsed(index).r) && this.chart.getDataVisibility(index)) {\n        count++;\n      }\n    });\n    return count;\n  }\n  _computeAngle(index, mode, defaultAngle) {\n    return this.chart.getDataVisibility(index)\n      ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle)\n      : 0;\n  }\n}\nPolarAreaController.id = 'polarArea';\nPolarAreaController.defaults = {\n  dataElementType: 'arc',\n  animation: {\n    animateRotate: true,\n    animateScale: true\n  },\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['x', 'y', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius']\n    },\n  },\n  indexAxis: 'r',\n  startAngle: 0,\n};\nPolarAreaController.overrides = {\n  aspectRatio: 1,\n  plugins: {\n    legend: {\n      labels: {\n        generateLabels(chart) {\n          const data = chart.data;\n          if (data.labels.length && data.datasets.length) {\n            const {labels: {pointStyle}} = chart.legend.options;\n            return data.labels.map((label, i) => {\n              const meta = chart.getDatasetMeta(0);\n              const style = meta.controller.getStyle(i);\n              return {\n                text: label,\n                fillStyle: style.backgroundColor,\n                strokeStyle: style.borderColor,\n                lineWidth: style.borderWidth,\n                pointStyle: pointStyle,\n                hidden: !chart.getDataVisibility(i),\n                index: i\n              };\n            });\n          }\n          return [];\n        }\n      },\n      onClick(e, legendItem, legend) {\n        legend.chart.toggleDataVisibility(legendItem.index);\n        legend.chart.update();\n      }\n    },\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        },\n        label(context) {\n          return context.chart.data.labels[context.dataIndex] + ': ' + context.formattedValue;\n        }\n      }\n    }\n  },\n  scales: {\n    r: {\n      type: 'radialLinear',\n      angleLines: {\n        display: false\n      },\n      beginAtZero: true,\n      grid: {\n        circular: true\n      },\n      pointLabels: {\n        display: false\n      },\n      startAngle: 0\n    }\n  }\n};\n\nclass PieController extends DoughnutController {\n}\nPieController.id = 'pie';\nPieController.defaults = {\n  cutout: 0,\n  rotation: 0,\n  circumference: 360,\n  radius: '100%'\n};\n\nclass RadarController extends DatasetController {\n  getLabelAndValue(index) {\n    const vScale = this._cachedMeta.vScale;\n    const parsed = this.getParsed(index);\n    return {\n      label: vScale.getLabels()[index],\n      value: '' + vScale.getLabelForValue(parsed[vScale.axis])\n    };\n  }\n  parseObjectData(meta, data, start, count) {\n    return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n  }\n  update(mode) {\n    const meta = this._cachedMeta;\n    const line = meta.dataset;\n    const points = meta.data || [];\n    const labels = meta.iScale.getLabels();\n    line.points = points;\n    if (mode !== 'resize') {\n      const options = this.resolveDatasetElementOptions(mode);\n      if (!this.options.showLine) {\n        options.borderWidth = 0;\n      }\n      const properties = {\n        _loop: true,\n        _fullLoop: labels.length === points.length,\n        options\n      };\n      this.updateElement(line, undefined, properties, mode);\n    }\n    this.updateElements(points, 0, points.length, mode);\n  }\n  updateElements(points, start, count, mode) {\n    const scale = this._cachedMeta.rScale;\n    const reset = mode === 'reset';\n    for (let i = start; i < start + count; i++) {\n      const point = points[i];\n      const options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n      const pointPosition = scale.getPointPositionForValue(i, this.getParsed(i).r);\n      const x = reset ? scale.xCenter : pointPosition.x;\n      const y = reset ? scale.yCenter : pointPosition.y;\n      const properties = {\n        x,\n        y,\n        angle: pointPosition.angle,\n        skip: isNaN(x) || isNaN(y),\n        options\n      };\n      this.updateElement(point, i, properties, mode);\n    }\n  }\n}\nRadarController.id = 'radar';\nRadarController.defaults = {\n  datasetElementType: 'line',\n  dataElementType: 'point',\n  indexAxis: 'r',\n  showLine: true,\n  elements: {\n    line: {\n      fill: 'start'\n    }\n  },\n};\nRadarController.overrides = {\n  aspectRatio: 1,\n  scales: {\n    r: {\n      type: 'radialLinear',\n    }\n  }\n};\n\nclass Element {\n  constructor() {\n    this.x = undefined;\n    this.y = undefined;\n    this.active = false;\n    this.options = undefined;\n    this.$animations = undefined;\n  }\n  tooltipPosition(useFinalPosition) {\n    const {x, y} = this.getProps(['x', 'y'], useFinalPosition);\n    return {x, y};\n  }\n  hasValue() {\n    return isNumber(this.x) && isNumber(this.y);\n  }\n  getProps(props, final) {\n    const anims = this.$animations;\n    if (!final || !anims) {\n      return this;\n    }\n    const ret = {};\n    props.forEach(prop => {\n      ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop];\n    });\n    return ret;\n  }\n}\nElement.defaults = {};\nElement.defaultRoutes = undefined;\n\nconst formatters = {\n  values(value) {\n    return isArray(value) ? value : '' + value;\n  },\n  numeric(tickValue, index, ticks) {\n    if (tickValue === 0) {\n      return '0';\n    }\n    const locale = this.chart.options.locale;\n    let notation;\n    let delta = tickValue;\n    if (ticks.length > 1) {\n      const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));\n      if (maxTick < 1e-4 || maxTick > 1e+15) {\n        notation = 'scientific';\n      }\n      delta = calculateDelta(tickValue, ticks);\n    }\n    const logDelta = log10(Math.abs(delta));\n    const numDecimal = Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);\n    const options = {notation, minimumFractionDigits: numDecimal, maximumFractionDigits: numDecimal};\n    Object.assign(options, this.options.ticks.format);\n    return formatNumber(tickValue, locale, options);\n  },\n  logarithmic(tickValue, index, ticks) {\n    if (tickValue === 0) {\n      return '0';\n    }\n    const remain = tickValue / (Math.pow(10, Math.floor(log10(tickValue))));\n    if (remain === 1 || remain === 2 || remain === 5) {\n      return formatters.numeric.call(this, tickValue, index, ticks);\n    }\n    return '';\n  }\n};\nfunction calculateDelta(tickValue, ticks) {\n  let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;\n  if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {\n    delta = tickValue - Math.floor(tickValue);\n  }\n  return delta;\n}\nvar Ticks = {formatters};\n\ndefaults.set('scale', {\n  display: true,\n  offset: false,\n  reverse: false,\n  beginAtZero: false,\n  bounds: 'ticks',\n  grace: 0,\n  grid: {\n    display: true,\n    lineWidth: 1,\n    drawBorder: true,\n    drawOnChartArea: true,\n    drawTicks: true,\n    tickLength: 8,\n    tickWidth: (_ctx, options) => options.lineWidth,\n    tickColor: (_ctx, options) => options.color,\n    offset: false,\n    borderDash: [],\n    borderDashOffset: 0.0,\n    borderWidth: 1\n  },\n  title: {\n    display: false,\n    text: '',\n    padding: {\n      top: 4,\n      bottom: 4\n    }\n  },\n  ticks: {\n    minRotation: 0,\n    maxRotation: 50,\n    mirror: false,\n    textStrokeWidth: 0,\n    textStrokeColor: '',\n    padding: 3,\n    display: true,\n    autoSkip: true,\n    autoSkipPadding: 3,\n    labelOffset: 0,\n    callback: Ticks.formatters.values,\n    minor: {},\n    major: {},\n    align: 'center',\n    crossAlign: 'near',\n    showLabelBackdrop: false,\n    backdropColor: 'rgba(255, 255, 255, 0.75)',\n    backdropPadding: 2,\n  }\n});\ndefaults.route('scale.ticks', 'color', '', 'color');\ndefaults.route('scale.grid', 'color', '', 'borderColor');\ndefaults.route('scale.grid', 'borderColor', '', 'borderColor');\ndefaults.route('scale.title', 'color', '', 'color');\ndefaults.describe('scale', {\n  _fallback: false,\n  _scriptable: (name) => !name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',\n  _indexable: (name) => name !== 'borderDash' && name !== 'tickBorderDash',\n});\ndefaults.describe('scales', {\n  _fallback: 'scale',\n});\ndefaults.describe('scale.ticks', {\n  _scriptable: (name) => name !== 'backdropPadding' && name !== 'callback',\n  _indexable: (name) => name !== 'backdropPadding',\n});\n\nfunction autoSkip(scale, ticks) {\n  const tickOpts = scale.options.ticks;\n  const ticksLimit = tickOpts.maxTicksLimit || determineMaxTicks(scale);\n  const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\n  const numMajorIndices = majorIndices.length;\n  const first = majorIndices[0];\n  const last = majorIndices[numMajorIndices - 1];\n  const newTicks = [];\n  if (numMajorIndices > ticksLimit) {\n    skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);\n    return newTicks;\n  }\n  const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);\n  if (numMajorIndices > 0) {\n    let i, ilen;\n    const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;\n    skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\n    for (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {\n      skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);\n    }\n    skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\n    return newTicks;\n  }\n  skip(ticks, newTicks, spacing);\n  return newTicks;\n}\nfunction determineMaxTicks(scale) {\n  const offset = scale.options.offset;\n  const tickLength = scale._tickSize();\n  const maxScale = scale._length / tickLength + (offset ? 0 : 1);\n  const maxChart = scale._maxLength / tickLength;\n  return Math.floor(Math.min(maxScale, maxChart));\n}\nfunction calculateSpacing(majorIndices, ticks, ticksLimit) {\n  const evenMajorSpacing = getEvenSpacing(majorIndices);\n  const spacing = ticks.length / ticksLimit;\n  if (!evenMajorSpacing) {\n    return Math.max(spacing, 1);\n  }\n  const factors = _factorize(evenMajorSpacing);\n  for (let i = 0, ilen = factors.length - 1; i < ilen; i++) {\n    const factor = factors[i];\n    if (factor > spacing) {\n      return factor;\n    }\n  }\n  return Math.max(spacing, 1);\n}\nfunction getMajorIndices(ticks) {\n  const result = [];\n  let i, ilen;\n  for (i = 0, ilen = ticks.length; i < ilen; i++) {\n    if (ticks[i].major) {\n      result.push(i);\n    }\n  }\n  return result;\n}\nfunction skipMajors(ticks, newTicks, majorIndices, spacing) {\n  let count = 0;\n  let next = majorIndices[0];\n  let i;\n  spacing = Math.ceil(spacing);\n  for (i = 0; i < ticks.length; i++) {\n    if (i === next) {\n      newTicks.push(ticks[i]);\n      count++;\n      next = majorIndices[count * spacing];\n    }\n  }\n}\nfunction skip(ticks, newTicks, spacing, majorStart, majorEnd) {\n  const start = valueOrDefault(majorStart, 0);\n  const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);\n  let count = 0;\n  let length, i, next;\n  spacing = Math.ceil(spacing);\n  if (majorEnd) {\n    length = majorEnd - majorStart;\n    spacing = length / Math.floor(length / spacing);\n  }\n  next = start;\n  while (next < 0) {\n    count++;\n    next = Math.round(start + count * spacing);\n  }\n  for (i = Math.max(start, 0); i < end; i++) {\n    if (i === next) {\n      newTicks.push(ticks[i]);\n      count++;\n      next = Math.round(start + count * spacing);\n    }\n  }\n}\nfunction getEvenSpacing(arr) {\n  const len = arr.length;\n  let i, diff;\n  if (len < 2) {\n    return false;\n  }\n  for (diff = arr[0], i = 1; i < len; ++i) {\n    if (arr[i] - arr[i - 1] !== diff) {\n      return false;\n    }\n  }\n  return diff;\n}\n\nconst reverseAlign = (align) => align === 'left' ? 'right' : align === 'right' ? 'left' : align;\nconst offsetFromEdge = (scale, edge, offset) => edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;\nfunction sample(arr, numItems) {\n  const result = [];\n  const increment = arr.length / numItems;\n  const len = arr.length;\n  let i = 0;\n  for (; i < len; i += increment) {\n    result.push(arr[Math.floor(i)]);\n  }\n  return result;\n}\nfunction getPixelForGridLine(scale, index, offsetGridLines) {\n  const length = scale.ticks.length;\n  const validIndex = Math.min(index, length - 1);\n  const start = scale._startPixel;\n  const end = scale._endPixel;\n  const epsilon = 1e-6;\n  let lineValue = scale.getPixelForTick(validIndex);\n  let offset;\n  if (offsetGridLines) {\n    if (length === 1) {\n      offset = Math.max(lineValue - start, end - lineValue);\n    } else if (index === 0) {\n      offset = (scale.getPixelForTick(1) - lineValue) / 2;\n    } else {\n      offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\n    }\n    lineValue += validIndex < index ? offset : -offset;\n    if (lineValue < start - epsilon || lineValue > end + epsilon) {\n      return;\n    }\n  }\n  return lineValue;\n}\nfunction garbageCollect(caches, length) {\n  each(caches, (cache) => {\n    const gc = cache.gc;\n    const gcLen = gc.length / 2;\n    let i;\n    if (gcLen > length) {\n      for (i = 0; i < gcLen; ++i) {\n        delete cache.data[gc[i]];\n      }\n      gc.splice(0, gcLen);\n    }\n  });\n}\nfunction getTickMarkLength(options) {\n  return options.drawTicks ? options.tickLength : 0;\n}\nfunction getTitleHeight(options, fallback) {\n  if (!options.display) {\n    return 0;\n  }\n  const font = toFont(options.font, fallback);\n  const padding = toPadding(options.padding);\n  const lines = isArray(options.text) ? options.text.length : 1;\n  return (lines * font.lineHeight) + padding.height;\n}\nfunction createScaleContext(parent, scale) {\n  return createContext(parent, {\n    scale,\n    type: 'scale'\n  });\n}\nfunction createTickContext(parent, index, tick) {\n  return createContext(parent, {\n    tick,\n    index,\n    type: 'tick'\n  });\n}\nfunction titleAlign(align, position, reverse) {\n  let ret = _toLeftRightCenter(align);\n  if ((reverse && position !== 'right') || (!reverse && position === 'right')) {\n    ret = reverseAlign(ret);\n  }\n  return ret;\n}\nfunction titleArgs(scale, offset, position, align) {\n  const {top, left, bottom, right, chart} = scale;\n  const {chartArea, scales} = chart;\n  let rotation = 0;\n  let maxWidth, titleX, titleY;\n  const height = bottom - top;\n  const width = right - left;\n  if (scale.isHorizontal()) {\n    titleX = _alignStartEnd(align, left, right);\n    if (isObject(position)) {\n      const positionAxisID = Object.keys(position)[0];\n      const value = position[positionAxisID];\n      titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;\n    } else if (position === 'center') {\n      titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;\n    } else {\n      titleY = offsetFromEdge(scale, position, offset);\n    }\n    maxWidth = right - left;\n  } else {\n    if (isObject(position)) {\n      const positionAxisID = Object.keys(position)[0];\n      const value = position[positionAxisID];\n      titleX = scales[positionAxisID].getPixelForValue(value) - width + offset;\n    } else if (position === 'center') {\n      titleX = (chartArea.left + chartArea.right) / 2 - width + offset;\n    } else {\n      titleX = offsetFromEdge(scale, position, offset);\n    }\n    titleY = _alignStartEnd(align, bottom, top);\n    rotation = position === 'left' ? -HALF_PI : HALF_PI;\n  }\n  return {titleX, titleY, maxWidth, rotation};\n}\nclass Scale extends Element {\n  constructor(cfg) {\n    super();\n    this.id = cfg.id;\n    this.type = cfg.type;\n    this.options = undefined;\n    this.ctx = cfg.ctx;\n    this.chart = cfg.chart;\n    this.top = undefined;\n    this.bottom = undefined;\n    this.left = undefined;\n    this.right = undefined;\n    this.width = undefined;\n    this.height = undefined;\n    this._margins = {\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    };\n    this.maxWidth = undefined;\n    this.maxHeight = undefined;\n    this.paddingTop = undefined;\n    this.paddingBottom = undefined;\n    this.paddingLeft = undefined;\n    this.paddingRight = undefined;\n    this.axis = undefined;\n    this.labelRotation = undefined;\n    this.min = undefined;\n    this.max = undefined;\n    this._range = undefined;\n    this.ticks = [];\n    this._gridLineItems = null;\n    this._labelItems = null;\n    this._labelSizes = null;\n    this._length = 0;\n    this._maxLength = 0;\n    this._longestTextCache = {};\n    this._startPixel = undefined;\n    this._endPixel = undefined;\n    this._reversePixels = false;\n    this._userMax = undefined;\n    this._userMin = undefined;\n    this._suggestedMax = undefined;\n    this._suggestedMin = undefined;\n    this._ticksLength = 0;\n    this._borderValue = 0;\n    this._cache = {};\n    this._dataLimitsCached = false;\n    this.$context = undefined;\n  }\n  init(options) {\n    this.options = options.setContext(this.getContext());\n    this.axis = options.axis;\n    this._userMin = this.parse(options.min);\n    this._userMax = this.parse(options.max);\n    this._suggestedMin = this.parse(options.suggestedMin);\n    this._suggestedMax = this.parse(options.suggestedMax);\n  }\n  parse(raw, index) {\n    return raw;\n  }\n  getUserBounds() {\n    let {_userMin, _userMax, _suggestedMin, _suggestedMax} = this;\n    _userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);\n    _userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);\n    _suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);\n    _suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);\n    return {\n      min: finiteOrDefault(_userMin, _suggestedMin),\n      max: finiteOrDefault(_userMax, _suggestedMax),\n      minDefined: isNumberFinite(_userMin),\n      maxDefined: isNumberFinite(_userMax)\n    };\n  }\n  getMinMax(canStack) {\n    let {min, max, minDefined, maxDefined} = this.getUserBounds();\n    let range;\n    if (minDefined && maxDefined) {\n      return {min, max};\n    }\n    const metas = this.getMatchingVisibleMetas();\n    for (let i = 0, ilen = metas.length; i < ilen; ++i) {\n      range = metas[i].controller.getMinMax(this, canStack);\n      if (!minDefined) {\n        min = Math.min(min, range.min);\n      }\n      if (!maxDefined) {\n        max = Math.max(max, range.max);\n      }\n    }\n    min = maxDefined && min > max ? max : min;\n    max = minDefined && min > max ? min : max;\n    return {\n      min: finiteOrDefault(min, finiteOrDefault(max, min)),\n      max: finiteOrDefault(max, finiteOrDefault(min, max))\n    };\n  }\n  getPadding() {\n    return {\n      left: this.paddingLeft || 0,\n      top: this.paddingTop || 0,\n      right: this.paddingRight || 0,\n      bottom: this.paddingBottom || 0\n    };\n  }\n  getTicks() {\n    return this.ticks;\n  }\n  getLabels() {\n    const data = this.chart.data;\n    return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\n  }\n  beforeLayout() {\n    this._cache = {};\n    this._dataLimitsCached = false;\n  }\n  beforeUpdate() {\n    callback(this.options.beforeUpdate, [this]);\n  }\n  update(maxWidth, maxHeight, margins) {\n    const {beginAtZero, grace, ticks: tickOpts} = this.options;\n    const sampleSize = tickOpts.sampleSize;\n    this.beforeUpdate();\n    this.maxWidth = maxWidth;\n    this.maxHeight = maxHeight;\n    this._margins = margins = Object.assign({\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    }, margins);\n    this.ticks = null;\n    this._labelSizes = null;\n    this._gridLineItems = null;\n    this._labelItems = null;\n    this.beforeSetDimensions();\n    this.setDimensions();\n    this.afterSetDimensions();\n    this._maxLength = this.isHorizontal()\n      ? this.width + margins.left + margins.right\n      : this.height + margins.top + margins.bottom;\n    if (!this._dataLimitsCached) {\n      this.beforeDataLimits();\n      this.determineDataLimits();\n      this.afterDataLimits();\n      this._range = _addGrace(this, grace, beginAtZero);\n      this._dataLimitsCached = true;\n    }\n    this.beforeBuildTicks();\n    this.ticks = this.buildTicks() || [];\n    this.afterBuildTicks();\n    const samplingEnabled = sampleSize < this.ticks.length;\n    this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize) : this.ticks);\n    this.configure();\n    this.beforeCalculateLabelRotation();\n    this.calculateLabelRotation();\n    this.afterCalculateLabelRotation();\n    if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {\n      this.ticks = autoSkip(this, this.ticks);\n      this._labelSizes = null;\n      this.afterAutoSkip();\n    }\n    if (samplingEnabled) {\n      this._convertTicksToLabels(this.ticks);\n    }\n    this.beforeFit();\n    this.fit();\n    this.afterFit();\n    this.afterUpdate();\n  }\n  configure() {\n    let reversePixels = this.options.reverse;\n    let startPixel, endPixel;\n    if (this.isHorizontal()) {\n      startPixel = this.left;\n      endPixel = this.right;\n    } else {\n      startPixel = this.top;\n      endPixel = this.bottom;\n      reversePixels = !reversePixels;\n    }\n    this._startPixel = startPixel;\n    this._endPixel = endPixel;\n    this._reversePixels = reversePixels;\n    this._length = endPixel - startPixel;\n    this._alignToPixels = this.options.alignToPixels;\n  }\n  afterUpdate() {\n    callback(this.options.afterUpdate, [this]);\n  }\n  beforeSetDimensions() {\n    callback(this.options.beforeSetDimensions, [this]);\n  }\n  setDimensions() {\n    if (this.isHorizontal()) {\n      this.width = this.maxWidth;\n      this.left = 0;\n      this.right = this.width;\n    } else {\n      this.height = this.maxHeight;\n      this.top = 0;\n      this.bottom = this.height;\n    }\n    this.paddingLeft = 0;\n    this.paddingTop = 0;\n    this.paddingRight = 0;\n    this.paddingBottom = 0;\n  }\n  afterSetDimensions() {\n    callback(this.options.afterSetDimensions, [this]);\n  }\n  _callHooks(name) {\n    this.chart.notifyPlugins(name, this.getContext());\n    callback(this.options[name], [this]);\n  }\n  beforeDataLimits() {\n    this._callHooks('beforeDataLimits');\n  }\n  determineDataLimits() {}\n  afterDataLimits() {\n    this._callHooks('afterDataLimits');\n  }\n  beforeBuildTicks() {\n    this._callHooks('beforeBuildTicks');\n  }\n  buildTicks() {\n    return [];\n  }\n  afterBuildTicks() {\n    this._callHooks('afterBuildTicks');\n  }\n  beforeTickToLabelConversion() {\n    callback(this.options.beforeTickToLabelConversion, [this]);\n  }\n  generateTickLabels(ticks) {\n    const tickOpts = this.options.ticks;\n    let i, ilen, tick;\n    for (i = 0, ilen = ticks.length; i < ilen; i++) {\n      tick = ticks[i];\n      tick.label = callback(tickOpts.callback, [tick.value, i, ticks], this);\n    }\n  }\n  afterTickToLabelConversion() {\n    callback(this.options.afterTickToLabelConversion, [this]);\n  }\n  beforeCalculateLabelRotation() {\n    callback(this.options.beforeCalculateLabelRotation, [this]);\n  }\n  calculateLabelRotation() {\n    const options = this.options;\n    const tickOpts = options.ticks;\n    const numTicks = this.ticks.length;\n    const minRotation = tickOpts.minRotation || 0;\n    const maxRotation = tickOpts.maxRotation;\n    let labelRotation = minRotation;\n    let tickWidth, maxHeight, maxLabelDiagonal;\n    if (!this._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !this.isHorizontal()) {\n      this.labelRotation = minRotation;\n      return;\n    }\n    const labelSizes = this._getLabelSizes();\n    const maxLabelWidth = labelSizes.widest.width;\n    const maxLabelHeight = labelSizes.highest.height;\n    const maxWidth = _limitValue(this.chart.width - maxLabelWidth, 0, this.maxWidth);\n    tickWidth = options.offset ? this.maxWidth / numTicks : maxWidth / (numTicks - 1);\n    if (maxLabelWidth + 6 > tickWidth) {\n      tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\n      maxHeight = this.maxHeight - getTickMarkLength(options.grid)\n\t\t\t\t- tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);\n      maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\n      labelRotation = toDegrees(Math.min(\n        Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)),\n        Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))\n      ));\n      labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\n    }\n    this.labelRotation = labelRotation;\n  }\n  afterCalculateLabelRotation() {\n    callback(this.options.afterCalculateLabelRotation, [this]);\n  }\n  afterAutoSkip() {}\n  beforeFit() {\n    callback(this.options.beforeFit, [this]);\n  }\n  fit() {\n    const minSize = {\n      width: 0,\n      height: 0\n    };\n    const {chart, options: {ticks: tickOpts, title: titleOpts, grid: gridOpts}} = this;\n    const display = this._isVisible();\n    const isHorizontal = this.isHorizontal();\n    if (display) {\n      const titleHeight = getTitleHeight(titleOpts, chart.options.font);\n      if (isHorizontal) {\n        minSize.width = this.maxWidth;\n        minSize.height = getTickMarkLength(gridOpts) + titleHeight;\n      } else {\n        minSize.height = this.maxHeight;\n        minSize.width = getTickMarkLength(gridOpts) + titleHeight;\n      }\n      if (tickOpts.display && this.ticks.length) {\n        const {first, last, widest, highest} = this._getLabelSizes();\n        const tickPadding = tickOpts.padding * 2;\n        const angleRadians = toRadians(this.labelRotation);\n        const cos = Math.cos(angleRadians);\n        const sin = Math.sin(angleRadians);\n        if (isHorizontal) {\n          const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;\n          minSize.height = Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);\n        } else {\n          const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;\n          minSize.width = Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);\n        }\n        this._calculatePadding(first, last, sin, cos);\n      }\n    }\n    this._handleMargins();\n    if (isHorizontal) {\n      this.width = this._length = chart.width - this._margins.left - this._margins.right;\n      this.height = minSize.height;\n    } else {\n      this.width = minSize.width;\n      this.height = this._length = chart.height - this._margins.top - this._margins.bottom;\n    }\n  }\n  _calculatePadding(first, last, sin, cos) {\n    const {ticks: {align, padding}, position} = this.options;\n    const isRotated = this.labelRotation !== 0;\n    const labelsBelowTicks = position !== 'top' && this.axis === 'x';\n    if (this.isHorizontal()) {\n      const offsetLeft = this.getPixelForTick(0) - this.left;\n      const offsetRight = this.right - this.getPixelForTick(this.ticks.length - 1);\n      let paddingLeft = 0;\n      let paddingRight = 0;\n      if (isRotated) {\n        if (labelsBelowTicks) {\n          paddingLeft = cos * first.width;\n          paddingRight = sin * last.height;\n        } else {\n          paddingLeft = sin * first.height;\n          paddingRight = cos * last.width;\n        }\n      } else if (align === 'start') {\n        paddingRight = last.width;\n      } else if (align === 'end') {\n        paddingLeft = first.width;\n      } else if (align !== 'inner') {\n        paddingLeft = first.width / 2;\n        paddingRight = last.width / 2;\n      }\n      this.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);\n      this.paddingRight = Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);\n    } else {\n      let paddingTop = last.height / 2;\n      let paddingBottom = first.height / 2;\n      if (align === 'start') {\n        paddingTop = 0;\n        paddingBottom = first.height;\n      } else if (align === 'end') {\n        paddingTop = last.height;\n        paddingBottom = 0;\n      }\n      this.paddingTop = paddingTop + padding;\n      this.paddingBottom = paddingBottom + padding;\n    }\n  }\n  _handleMargins() {\n    if (this._margins) {\n      this._margins.left = Math.max(this.paddingLeft, this._margins.left);\n      this._margins.top = Math.max(this.paddingTop, this._margins.top);\n      this._margins.right = Math.max(this.paddingRight, this._margins.right);\n      this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom);\n    }\n  }\n  afterFit() {\n    callback(this.options.afterFit, [this]);\n  }\n  isHorizontal() {\n    const {axis, position} = this.options;\n    return position === 'top' || position === 'bottom' || axis === 'x';\n  }\n  isFullSize() {\n    return this.options.fullSize;\n  }\n  _convertTicksToLabels(ticks) {\n    this.beforeTickToLabelConversion();\n    this.generateTickLabels(ticks);\n    let i, ilen;\n    for (i = 0, ilen = ticks.length; i < ilen; i++) {\n      if (isNullOrUndef(ticks[i].label)) {\n        ticks.splice(i, 1);\n        ilen--;\n        i--;\n      }\n    }\n    this.afterTickToLabelConversion();\n  }\n  _getLabelSizes() {\n    let labelSizes = this._labelSizes;\n    if (!labelSizes) {\n      const sampleSize = this.options.ticks.sampleSize;\n      let ticks = this.ticks;\n      if (sampleSize < ticks.length) {\n        ticks = sample(ticks, sampleSize);\n      }\n      this._labelSizes = labelSizes = this._computeLabelSizes(ticks, ticks.length);\n    }\n    return labelSizes;\n  }\n  _computeLabelSizes(ticks, length) {\n    const {ctx, _longestTextCache: caches} = this;\n    const widths = [];\n    const heights = [];\n    let widestLabelSize = 0;\n    let highestLabelSize = 0;\n    let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;\n    for (i = 0; i < length; ++i) {\n      label = ticks[i].label;\n      tickFont = this._resolveTickFontOptions(i);\n      ctx.font = fontString = tickFont.string;\n      cache = caches[fontString] = caches[fontString] || {data: {}, gc: []};\n      lineHeight = tickFont.lineHeight;\n      width = height = 0;\n      if (!isNullOrUndef(label) && !isArray(label)) {\n        width = _measureText(ctx, cache.data, cache.gc, width, label);\n        height = lineHeight;\n      } else if (isArray(label)) {\n        for (j = 0, jlen = label.length; j < jlen; ++j) {\n          nestedLabel = label[j];\n          if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\n            width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);\n            height += lineHeight;\n          }\n        }\n      }\n      widths.push(width);\n      heights.push(height);\n      widestLabelSize = Math.max(width, widestLabelSize);\n      highestLabelSize = Math.max(height, highestLabelSize);\n    }\n    garbageCollect(caches, length);\n    const widest = widths.indexOf(widestLabelSize);\n    const highest = heights.indexOf(highestLabelSize);\n    const valueAt = (idx) => ({width: widths[idx] || 0, height: heights[idx] || 0});\n    return {\n      first: valueAt(0),\n      last: valueAt(length - 1),\n      widest: valueAt(widest),\n      highest: valueAt(highest),\n      widths,\n      heights,\n    };\n  }\n  getLabelForValue(value) {\n    return value;\n  }\n  getPixelForValue(value, index) {\n    return NaN;\n  }\n  getValueForPixel(pixel) {}\n  getPixelForTick(index) {\n    const ticks = this.ticks;\n    if (index < 0 || index > ticks.length - 1) {\n      return null;\n    }\n    return this.getPixelForValue(ticks[index].value);\n  }\n  getPixelForDecimal(decimal) {\n    if (this._reversePixels) {\n      decimal = 1 - decimal;\n    }\n    const pixel = this._startPixel + decimal * this._length;\n    return _int16Range(this._alignToPixels ? _alignPixel(this.chart, pixel, 0) : pixel);\n  }\n  getDecimalForPixel(pixel) {\n    const decimal = (pixel - this._startPixel) / this._length;\n    return this._reversePixels ? 1 - decimal : decimal;\n  }\n  getBasePixel() {\n    return this.getPixelForValue(this.getBaseValue());\n  }\n  getBaseValue() {\n    const {min, max} = this;\n    return min < 0 && max < 0 ? max :\n      min > 0 && max > 0 ? min :\n      0;\n  }\n  getContext(index) {\n    const ticks = this.ticks || [];\n    if (index >= 0 && index < ticks.length) {\n      const tick = ticks[index];\n      return tick.$context ||\n\t\t\t\t(tick.$context = createTickContext(this.getContext(), index, tick));\n    }\n    return this.$context ||\n\t\t\t(this.$context = createScaleContext(this.chart.getContext(), this));\n  }\n  _tickSize() {\n    const optionTicks = this.options.ticks;\n    const rot = toRadians(this.labelRotation);\n    const cos = Math.abs(Math.cos(rot));\n    const sin = Math.abs(Math.sin(rot));\n    const labelSizes = this._getLabelSizes();\n    const padding = optionTicks.autoSkipPadding || 0;\n    const w = labelSizes ? labelSizes.widest.width + padding : 0;\n    const h = labelSizes ? labelSizes.highest.height + padding : 0;\n    return this.isHorizontal()\n      ? h * cos > w * sin ? w / cos : h / sin\n      : h * sin < w * cos ? h / cos : w / sin;\n  }\n  _isVisible() {\n    const display = this.options.display;\n    if (display !== 'auto') {\n      return !!display;\n    }\n    return this.getMatchingVisibleMetas().length > 0;\n  }\n  _computeGridLineItems(chartArea) {\n    const axis = this.axis;\n    const chart = this.chart;\n    const options = this.options;\n    const {grid, position} = options;\n    const offset = grid.offset;\n    const isHorizontal = this.isHorizontal();\n    const ticks = this.ticks;\n    const ticksLength = ticks.length + (offset ? 1 : 0);\n    const tl = getTickMarkLength(grid);\n    const items = [];\n    const borderOpts = grid.setContext(this.getContext());\n    const axisWidth = borderOpts.drawBorder ? borderOpts.borderWidth : 0;\n    const axisHalfWidth = axisWidth / 2;\n    const alignBorderValue = function(pixel) {\n      return _alignPixel(chart, pixel, axisWidth);\n    };\n    let borderValue, i, lineValue, alignedLineValue;\n    let tx1, ty1, tx2, ty2, x1, y1, x2, y2;\n    if (position === 'top') {\n      borderValue = alignBorderValue(this.bottom);\n      ty1 = this.bottom - tl;\n      ty2 = borderValue - axisHalfWidth;\n      y1 = alignBorderValue(chartArea.top) + axisHalfWidth;\n      y2 = chartArea.bottom;\n    } else if (position === 'bottom') {\n      borderValue = alignBorderValue(this.top);\n      y1 = chartArea.top;\n      y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\n      ty1 = borderValue + axisHalfWidth;\n      ty2 = this.top + tl;\n    } else if (position === 'left') {\n      borderValue = alignBorderValue(this.right);\n      tx1 = this.right - tl;\n      tx2 = borderValue - axisHalfWidth;\n      x1 = alignBorderValue(chartArea.left) + axisHalfWidth;\n      x2 = chartArea.right;\n    } else if (position === 'right') {\n      borderValue = alignBorderValue(this.left);\n      x1 = chartArea.left;\n      x2 = alignBorderValue(chartArea.right) - axisHalfWidth;\n      tx1 = borderValue + axisHalfWidth;\n      tx2 = this.left + tl;\n    } else if (axis === 'x') {\n      if (position === 'center') {\n        borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n      }\n      y1 = chartArea.top;\n      y2 = chartArea.bottom;\n      ty1 = borderValue + axisHalfWidth;\n      ty2 = ty1 + tl;\n    } else if (axis === 'y') {\n      if (position === 'center') {\n        borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n      }\n      tx1 = borderValue - axisHalfWidth;\n      tx2 = tx1 - tl;\n      x1 = chartArea.left;\n      x2 = chartArea.right;\n    }\n    const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);\n    const step = Math.max(1, Math.ceil(ticksLength / limit));\n    for (i = 0; i < ticksLength; i += step) {\n      const optsAtIndex = grid.setContext(this.getContext(i));\n      const lineWidth = optsAtIndex.lineWidth;\n      const lineColor = optsAtIndex.color;\n      const borderDash = optsAtIndex.borderDash || [];\n      const borderDashOffset = optsAtIndex.borderDashOffset;\n      const tickWidth = optsAtIndex.tickWidth;\n      const tickColor = optsAtIndex.tickColor;\n      const tickBorderDash = optsAtIndex.tickBorderDash || [];\n      const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;\n      lineValue = getPixelForGridLine(this, i, offset);\n      if (lineValue === undefined) {\n        continue;\n      }\n      alignedLineValue = _alignPixel(chart, lineValue, lineWidth);\n      if (isHorizontal) {\n        tx1 = tx2 = x1 = x2 = alignedLineValue;\n      } else {\n        ty1 = ty2 = y1 = y2 = alignedLineValue;\n      }\n      items.push({\n        tx1,\n        ty1,\n        tx2,\n        ty2,\n        x1,\n        y1,\n        x2,\n        y2,\n        width: lineWidth,\n        color: lineColor,\n        borderDash,\n        borderDashOffset,\n        tickWidth,\n        tickColor,\n        tickBorderDash,\n        tickBorderDashOffset,\n      });\n    }\n    this._ticksLength = ticksLength;\n    this._borderValue = borderValue;\n    return items;\n  }\n  _computeLabelItems(chartArea) {\n    const axis = this.axis;\n    const options = this.options;\n    const {position, ticks: optionTicks} = options;\n    const isHorizontal = this.isHorizontal();\n    const ticks = this.ticks;\n    const {align, crossAlign, padding, mirror} = optionTicks;\n    const tl = getTickMarkLength(options.grid);\n    const tickAndPadding = tl + padding;\n    const hTickAndPadding = mirror ? -padding : tickAndPadding;\n    const rotation = -toRadians(this.labelRotation);\n    const items = [];\n    let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\n    let textBaseline = 'middle';\n    if (position === 'top') {\n      y = this.bottom - hTickAndPadding;\n      textAlign = this._getXAxisLabelAlignment();\n    } else if (position === 'bottom') {\n      y = this.top + hTickAndPadding;\n      textAlign = this._getXAxisLabelAlignment();\n    } else if (position === 'left') {\n      const ret = this._getYAxisLabelAlignment(tl);\n      textAlign = ret.textAlign;\n      x = ret.x;\n    } else if (position === 'right') {\n      const ret = this._getYAxisLabelAlignment(tl);\n      textAlign = ret.textAlign;\n      x = ret.x;\n    } else if (axis === 'x') {\n      if (position === 'center') {\n        y = ((chartArea.top + chartArea.bottom) / 2) + tickAndPadding;\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        y = this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;\n      }\n      textAlign = this._getXAxisLabelAlignment();\n    } else if (axis === 'y') {\n      if (position === 'center') {\n        x = ((chartArea.left + chartArea.right) / 2) - tickAndPadding;\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        x = this.chart.scales[positionAxisID].getPixelForValue(value);\n      }\n      textAlign = this._getYAxisLabelAlignment(tl).textAlign;\n    }\n    if (axis === 'y') {\n      if (align === 'start') {\n        textBaseline = 'top';\n      } else if (align === 'end') {\n        textBaseline = 'bottom';\n      }\n    }\n    const labelSizes = this._getLabelSizes();\n    for (i = 0, ilen = ticks.length; i < ilen; ++i) {\n      tick = ticks[i];\n      label = tick.label;\n      const optsAtIndex = optionTicks.setContext(this.getContext(i));\n      pixel = this.getPixelForTick(i) + optionTicks.labelOffset;\n      font = this._resolveTickFontOptions(i);\n      lineHeight = font.lineHeight;\n      lineCount = isArray(label) ? label.length : 1;\n      const halfCount = lineCount / 2;\n      const color = optsAtIndex.color;\n      const strokeColor = optsAtIndex.textStrokeColor;\n      const strokeWidth = optsAtIndex.textStrokeWidth;\n      let tickTextAlign = textAlign;\n      if (isHorizontal) {\n        x = pixel;\n        if (textAlign === 'inner') {\n          if (i === ilen - 1) {\n            tickTextAlign = !this.options.reverse ? 'right' : 'left';\n          } else if (i === 0) {\n            tickTextAlign = !this.options.reverse ? 'left' : 'right';\n          } else {\n            tickTextAlign = 'center';\n          }\n        }\n        if (position === 'top') {\n          if (crossAlign === 'near' || rotation !== 0) {\n            textOffset = -lineCount * lineHeight + lineHeight / 2;\n          } else if (crossAlign === 'center') {\n            textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;\n          } else {\n            textOffset = -labelSizes.highest.height + lineHeight / 2;\n          }\n        } else {\n          if (crossAlign === 'near' || rotation !== 0) {\n            textOffset = lineHeight / 2;\n          } else if (crossAlign === 'center') {\n            textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;\n          } else {\n            textOffset = labelSizes.highest.height - lineCount * lineHeight;\n          }\n        }\n        if (mirror) {\n          textOffset *= -1;\n        }\n      } else {\n        y = pixel;\n        textOffset = (1 - lineCount) * lineHeight / 2;\n      }\n      let backdrop;\n      if (optsAtIndex.showLabelBackdrop) {\n        const labelPadding = toPadding(optsAtIndex.backdropPadding);\n        const height = labelSizes.heights[i];\n        const width = labelSizes.widths[i];\n        let top = y + textOffset - labelPadding.top;\n        let left = x - labelPadding.left;\n        switch (textBaseline) {\n        case 'middle':\n          top -= height / 2;\n          break;\n        case 'bottom':\n          top -= height;\n          break;\n        }\n        switch (textAlign) {\n        case 'center':\n          left -= width / 2;\n          break;\n        case 'right':\n          left -= width;\n          break;\n        }\n        backdrop = {\n          left,\n          top,\n          width: width + labelPadding.width,\n          height: height + labelPadding.height,\n          color: optsAtIndex.backdropColor,\n        };\n      }\n      items.push({\n        rotation,\n        label,\n        font,\n        color,\n        strokeColor,\n        strokeWidth,\n        textOffset,\n        textAlign: tickTextAlign,\n        textBaseline,\n        translation: [x, y],\n        backdrop,\n      });\n    }\n    return items;\n  }\n  _getXAxisLabelAlignment() {\n    const {position, ticks} = this.options;\n    const rotation = -toRadians(this.labelRotation);\n    if (rotation) {\n      return position === 'top' ? 'left' : 'right';\n    }\n    let align = 'center';\n    if (ticks.align === 'start') {\n      align = 'left';\n    } else if (ticks.align === 'end') {\n      align = 'right';\n    } else if (ticks.align === 'inner') {\n      align = 'inner';\n    }\n    return align;\n  }\n  _getYAxisLabelAlignment(tl) {\n    const {position, ticks: {crossAlign, mirror, padding}} = this.options;\n    const labelSizes = this._getLabelSizes();\n    const tickAndPadding = tl + padding;\n    const widest = labelSizes.widest.width;\n    let textAlign;\n    let x;\n    if (position === 'left') {\n      if (mirror) {\n        x = this.right + padding;\n        if (crossAlign === 'near') {\n          textAlign = 'left';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x += (widest / 2);\n        } else {\n          textAlign = 'right';\n          x += widest;\n        }\n      } else {\n        x = this.right - tickAndPadding;\n        if (crossAlign === 'near') {\n          textAlign = 'right';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x -= (widest / 2);\n        } else {\n          textAlign = 'left';\n          x = this.left;\n        }\n      }\n    } else if (position === 'right') {\n      if (mirror) {\n        x = this.left + padding;\n        if (crossAlign === 'near') {\n          textAlign = 'right';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x -= (widest / 2);\n        } else {\n          textAlign = 'left';\n          x -= widest;\n        }\n      } else {\n        x = this.left + tickAndPadding;\n        if (crossAlign === 'near') {\n          textAlign = 'left';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x += widest / 2;\n        } else {\n          textAlign = 'right';\n          x = this.right;\n        }\n      }\n    } else {\n      textAlign = 'right';\n    }\n    return {textAlign, x};\n  }\n  _computeLabelArea() {\n    if (this.options.ticks.mirror) {\n      return;\n    }\n    const chart = this.chart;\n    const position = this.options.position;\n    if (position === 'left' || position === 'right') {\n      return {top: 0, left: this.left, bottom: chart.height, right: this.right};\n    } if (position === 'top' || position === 'bottom') {\n      return {top: this.top, left: 0, bottom: this.bottom, right: chart.width};\n    }\n  }\n  drawBackground() {\n    const {ctx, options: {backgroundColor}, left, top, width, height} = this;\n    if (backgroundColor) {\n      ctx.save();\n      ctx.fillStyle = backgroundColor;\n      ctx.fillRect(left, top, width, height);\n      ctx.restore();\n    }\n  }\n  getLineWidthForValue(value) {\n    const grid = this.options.grid;\n    if (!this._isVisible() || !grid.display) {\n      return 0;\n    }\n    const ticks = this.ticks;\n    const index = ticks.findIndex(t => t.value === value);\n    if (index >= 0) {\n      const opts = grid.setContext(this.getContext(index));\n      return opts.lineWidth;\n    }\n    return 0;\n  }\n  drawGrid(chartArea) {\n    const grid = this.options.grid;\n    const ctx = this.ctx;\n    const items = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(chartArea));\n    let i, ilen;\n    const drawLine = (p1, p2, style) => {\n      if (!style.width || !style.color) {\n        return;\n      }\n      ctx.save();\n      ctx.lineWidth = style.width;\n      ctx.strokeStyle = style.color;\n      ctx.setLineDash(style.borderDash || []);\n      ctx.lineDashOffset = style.borderDashOffset;\n      ctx.beginPath();\n      ctx.moveTo(p1.x, p1.y);\n      ctx.lineTo(p2.x, p2.y);\n      ctx.stroke();\n      ctx.restore();\n    };\n    if (grid.display) {\n      for (i = 0, ilen = items.length; i < ilen; ++i) {\n        const item = items[i];\n        if (grid.drawOnChartArea) {\n          drawLine(\n            {x: item.x1, y: item.y1},\n            {x: item.x2, y: item.y2},\n            item\n          );\n        }\n        if (grid.drawTicks) {\n          drawLine(\n            {x: item.tx1, y: item.ty1},\n            {x: item.tx2, y: item.ty2},\n            {\n              color: item.tickColor,\n              width: item.tickWidth,\n              borderDash: item.tickBorderDash,\n              borderDashOffset: item.tickBorderDashOffset\n            }\n          );\n        }\n      }\n    }\n  }\n  drawBorder() {\n    const {chart, ctx, options: {grid}} = this;\n    const borderOpts = grid.setContext(this.getContext());\n    const axisWidth = grid.drawBorder ? borderOpts.borderWidth : 0;\n    if (!axisWidth) {\n      return;\n    }\n    const lastLineWidth = grid.setContext(this.getContext(0)).lineWidth;\n    const borderValue = this._borderValue;\n    let x1, x2, y1, y2;\n    if (this.isHorizontal()) {\n      x1 = _alignPixel(chart, this.left, axisWidth) - axisWidth / 2;\n      x2 = _alignPixel(chart, this.right, lastLineWidth) + lastLineWidth / 2;\n      y1 = y2 = borderValue;\n    } else {\n      y1 = _alignPixel(chart, this.top, axisWidth) - axisWidth / 2;\n      y2 = _alignPixel(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;\n      x1 = x2 = borderValue;\n    }\n    ctx.save();\n    ctx.lineWidth = borderOpts.borderWidth;\n    ctx.strokeStyle = borderOpts.borderColor;\n    ctx.beginPath();\n    ctx.moveTo(x1, y1);\n    ctx.lineTo(x2, y2);\n    ctx.stroke();\n    ctx.restore();\n  }\n  drawLabels(chartArea) {\n    const optionTicks = this.options.ticks;\n    if (!optionTicks.display) {\n      return;\n    }\n    const ctx = this.ctx;\n    const area = this._computeLabelArea();\n    if (area) {\n      clipArea(ctx, area);\n    }\n    const items = this._labelItems || (this._labelItems = this._computeLabelItems(chartArea));\n    let i, ilen;\n    for (i = 0, ilen = items.length; i < ilen; ++i) {\n      const item = items[i];\n      const tickFont = item.font;\n      const label = item.label;\n      if (item.backdrop) {\n        ctx.fillStyle = item.backdrop.color;\n        ctx.fillRect(item.backdrop.left, item.backdrop.top, item.backdrop.width, item.backdrop.height);\n      }\n      let y = item.textOffset;\n      renderText(ctx, label, 0, y, tickFont, item);\n    }\n    if (area) {\n      unclipArea(ctx);\n    }\n  }\n  drawTitle() {\n    const {ctx, options: {position, title, reverse}} = this;\n    if (!title.display) {\n      return;\n    }\n    const font = toFont(title.font);\n    const padding = toPadding(title.padding);\n    const align = title.align;\n    let offset = font.lineHeight / 2;\n    if (position === 'bottom' || position === 'center' || isObject(position)) {\n      offset += padding.bottom;\n      if (isArray(title.text)) {\n        offset += font.lineHeight * (title.text.length - 1);\n      }\n    } else {\n      offset += padding.top;\n    }\n    const {titleX, titleY, maxWidth, rotation} = titleArgs(this, offset, position, align);\n    renderText(ctx, title.text, 0, 0, font, {\n      color: title.color,\n      maxWidth,\n      rotation,\n      textAlign: titleAlign(align, position, reverse),\n      textBaseline: 'middle',\n      translation: [titleX, titleY],\n    });\n  }\n  draw(chartArea) {\n    if (!this._isVisible()) {\n      return;\n    }\n    this.drawBackground();\n    this.drawGrid(chartArea);\n    this.drawBorder();\n    this.drawTitle();\n    this.drawLabels(chartArea);\n  }\n  _layers() {\n    const opts = this.options;\n    const tz = opts.ticks && opts.ticks.z || 0;\n    const gz = valueOrDefault(opts.grid && opts.grid.z, -1);\n    if (!this._isVisible() || this.draw !== Scale.prototype.draw) {\n      return [{\n        z: tz,\n        draw: (chartArea) => {\n          this.draw(chartArea);\n        }\n      }];\n    }\n    return [{\n      z: gz,\n      draw: (chartArea) => {\n        this.drawBackground();\n        this.drawGrid(chartArea);\n        this.drawTitle();\n      }\n    }, {\n      z: gz + 1,\n      draw: () => {\n        this.drawBorder();\n      }\n    }, {\n      z: tz,\n      draw: (chartArea) => {\n        this.drawLabels(chartArea);\n      }\n    }];\n  }\n  getMatchingVisibleMetas(type) {\n    const metas = this.chart.getSortedVisibleDatasetMetas();\n    const axisID = this.axis + 'AxisID';\n    const result = [];\n    let i, ilen;\n    for (i = 0, ilen = metas.length; i < ilen; ++i) {\n      const meta = metas[i];\n      if (meta[axisID] === this.id && (!type || meta.type === type)) {\n        result.push(meta);\n      }\n    }\n    return result;\n  }\n  _resolveTickFontOptions(index) {\n    const opts = this.options.ticks.setContext(this.getContext(index));\n    return toFont(opts.font);\n  }\n  _maxDigits() {\n    const fontSize = this._resolveTickFontOptions(0).lineHeight;\n    return (this.isHorizontal() ? this.width : this.height) / fontSize;\n  }\n}\n\nclass TypedRegistry {\n  constructor(type, scope, override) {\n    this.type = type;\n    this.scope = scope;\n    this.override = override;\n    this.items = Object.create(null);\n  }\n  isForType(type) {\n    return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);\n  }\n  register(item) {\n    const proto = Object.getPrototypeOf(item);\n    let parentScope;\n    if (isIChartComponent(proto)) {\n      parentScope = this.register(proto);\n    }\n    const items = this.items;\n    const id = item.id;\n    const scope = this.scope + '.' + id;\n    if (!id) {\n      throw new Error('class does not have id: ' + item);\n    }\n    if (id in items) {\n      return scope;\n    }\n    items[id] = item;\n    registerDefaults(item, scope, parentScope);\n    if (this.override) {\n      defaults.override(item.id, item.overrides);\n    }\n    return scope;\n  }\n  get(id) {\n    return this.items[id];\n  }\n  unregister(item) {\n    const items = this.items;\n    const id = item.id;\n    const scope = this.scope;\n    if (id in items) {\n      delete items[id];\n    }\n    if (scope && id in defaults[scope]) {\n      delete defaults[scope][id];\n      if (this.override) {\n        delete overrides[id];\n      }\n    }\n  }\n}\nfunction registerDefaults(item, scope, parentScope) {\n  const itemDefaults = merge(Object.create(null), [\n    parentScope ? defaults.get(parentScope) : {},\n    defaults.get(scope),\n    item.defaults\n  ]);\n  defaults.set(scope, itemDefaults);\n  if (item.defaultRoutes) {\n    routeDefaults(scope, item.defaultRoutes);\n  }\n  if (item.descriptors) {\n    defaults.describe(scope, item.descriptors);\n  }\n}\nfunction routeDefaults(scope, routes) {\n  Object.keys(routes).forEach(property => {\n    const propertyParts = property.split('.');\n    const sourceName = propertyParts.pop();\n    const sourceScope = [scope].concat(propertyParts).join('.');\n    const parts = routes[property].split('.');\n    const targetName = parts.pop();\n    const targetScope = parts.join('.');\n    defaults.route(sourceScope, sourceName, targetScope, targetName);\n  });\n}\nfunction isIChartComponent(proto) {\n  return 'id' in proto && 'defaults' in proto;\n}\n\nclass Registry {\n  constructor() {\n    this.controllers = new TypedRegistry(DatasetController, 'datasets', true);\n    this.elements = new TypedRegistry(Element, 'elements');\n    this.plugins = new TypedRegistry(Object, 'plugins');\n    this.scales = new TypedRegistry(Scale, 'scales');\n    this._typedRegistries = [this.controllers, this.scales, this.elements];\n  }\n  add(...args) {\n    this._each('register', args);\n  }\n  remove(...args) {\n    this._each('unregister', args);\n  }\n  addControllers(...args) {\n    this._each('register', args, this.controllers);\n  }\n  addElements(...args) {\n    this._each('register', args, this.elements);\n  }\n  addPlugins(...args) {\n    this._each('register', args, this.plugins);\n  }\n  addScales(...args) {\n    this._each('register', args, this.scales);\n  }\n  getController(id) {\n    return this._get(id, this.controllers, 'controller');\n  }\n  getElement(id) {\n    return this._get(id, this.elements, 'element');\n  }\n  getPlugin(id) {\n    return this._get(id, this.plugins, 'plugin');\n  }\n  getScale(id) {\n    return this._get(id, this.scales, 'scale');\n  }\n  removeControllers(...args) {\n    this._each('unregister', args, this.controllers);\n  }\n  removeElements(...args) {\n    this._each('unregister', args, this.elements);\n  }\n  removePlugins(...args) {\n    this._each('unregister', args, this.plugins);\n  }\n  removeScales(...args) {\n    this._each('unregister', args, this.scales);\n  }\n  _each(method, args, typedRegistry) {\n    [...args].forEach(arg => {\n      const reg = typedRegistry || this._getRegistryForType(arg);\n      if (typedRegistry || reg.isForType(arg) || (reg === this.plugins && arg.id)) {\n        this._exec(method, reg, arg);\n      } else {\n        each(arg, item => {\n          const itemReg = typedRegistry || this._getRegistryForType(item);\n          this._exec(method, itemReg, item);\n        });\n      }\n    });\n  }\n  _exec(method, registry, component) {\n    const camelMethod = _capitalize(method);\n    callback(component['before' + camelMethod], [], component);\n    registry[method](component);\n    callback(component['after' + camelMethod], [], component);\n  }\n  _getRegistryForType(type) {\n    for (let i = 0; i < this._typedRegistries.length; i++) {\n      const reg = this._typedRegistries[i];\n      if (reg.isForType(type)) {\n        return reg;\n      }\n    }\n    return this.plugins;\n  }\n  _get(id, typedRegistry, type) {\n    const item = typedRegistry.get(id);\n    if (item === undefined) {\n      throw new Error('\"' + id + '\" is not a registered ' + type + '.');\n    }\n    return item;\n  }\n}\nvar registry = new Registry();\n\nclass ScatterController extends DatasetController {\n  update(mode) {\n    const meta = this._cachedMeta;\n    const {data: points = []} = meta;\n    const animationsDisabled = this.chart._animationsDisabled;\n    let {start, count} = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n    this._drawStart = start;\n    this._drawCount = count;\n    if (_scaleRangesChanged(meta)) {\n      start = 0;\n      count = points.length;\n    }\n    if (this.options.showLine) {\n      const {dataset: line, _dataset} = meta;\n      line._chart = this.chart;\n      line._datasetIndex = this.index;\n      line._decimated = !!_dataset._decimated;\n      line.points = points;\n      const options = this.resolveDatasetElementOptions(mode);\n      options.segment = this.options.segment;\n      this.updateElement(line, undefined, {\n        animated: !animationsDisabled,\n        options\n      }, mode);\n    }\n    this.updateElements(points, start, count, mode);\n  }\n  addElements() {\n    const {showLine} = this.options;\n    if (!this.datasetElementType && showLine) {\n      this.datasetElementType = registry.getElement('line');\n    }\n    super.addElements();\n  }\n  updateElements(points, start, count, mode) {\n    const reset = mode === 'reset';\n    const {iScale, vScale, _stacked, _dataset} = this._cachedMeta;\n    const firstOpts = this.resolveDataElementOptions(start, mode);\n    const sharedOptions = this.getSharedOptions(firstOpts);\n    const includeOptions = this.includeOptions(mode, sharedOptions);\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    const {spanGaps, segment} = this.options;\n    const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n    const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n    let prevParsed = start > 0 && this.getParsed(start - 1);\n    for (let i = start; i < start + count; ++i) {\n      const point = points[i];\n      const parsed = this.getParsed(i);\n      const properties = directUpdate ? point : {};\n      const nullData = isNullOrUndef(parsed[vAxis]);\n      const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n      const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n      properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n      properties.stop = i > 0 && (Math.abs(parsed[iAxis] - prevParsed[iAxis])) > maxGapLength;\n      if (segment) {\n        properties.parsed = parsed;\n        properties.raw = _dataset.data[i];\n      }\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n      }\n      if (!directUpdate) {\n        this.updateElement(point, i, properties, mode);\n      }\n      prevParsed = parsed;\n    }\n    this.updateSharedOptions(sharedOptions, mode, firstOpts);\n  }\n  getMaxOverflow() {\n    const meta = this._cachedMeta;\n    const data = meta.data || [];\n    if (!this.options.showLine) {\n      let max = 0;\n      for (let i = data.length - 1; i >= 0; --i) {\n        max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n      }\n      return max > 0 && max;\n    }\n    const dataset = meta.dataset;\n    const border = dataset.options && dataset.options.borderWidth || 0;\n    if (!data.length) {\n      return border;\n    }\n    const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n    const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n    return Math.max(border, firstPoint, lastPoint) / 2;\n  }\n}\nScatterController.id = 'scatter';\nScatterController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'point',\n  showLine: false,\n  fill: false\n};\nScatterController.overrides = {\n  interaction: {\n    mode: 'point'\n  },\n  plugins: {\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        },\n        label(item) {\n          return '(' + item.label + ', ' + item.formattedValue + ')';\n        }\n      }\n    }\n  },\n  scales: {\n    x: {\n      type: 'linear'\n    },\n    y: {\n      type: 'linear'\n    }\n  }\n};\n\nvar controllers = /*#__PURE__*/Object.freeze({\n__proto__: null,\nBarController: BarController,\nBubbleController: BubbleController,\nDoughnutController: DoughnutController,\nLineController: LineController,\nPolarAreaController: PolarAreaController,\nPieController: PieController,\nRadarController: RadarController,\nScatterController: ScatterController\n});\n\nfunction abstract() {\n  throw new Error('This method is not implemented: Check that a complete date adapter is provided.');\n}\nclass DateAdapter {\n  constructor(options) {\n    this.options = options || {};\n  }\n  init(chartOptions) {}\n  formats() {\n    return abstract();\n  }\n  parse(value, format) {\n    return abstract();\n  }\n  format(timestamp, format) {\n    return abstract();\n  }\n  add(timestamp, amount, unit) {\n    return abstract();\n  }\n  diff(a, b, unit) {\n    return abstract();\n  }\n  startOf(timestamp, unit, weekday) {\n    return abstract();\n  }\n  endOf(timestamp, unit) {\n    return abstract();\n  }\n}\nDateAdapter.override = function(members) {\n  Object.assign(DateAdapter.prototype, members);\n};\nvar adapters = {\n  _date: DateAdapter\n};\n\nfunction binarySearch(metaset, axis, value, intersect) {\n  const {controller, data, _sorted} = metaset;\n  const iScale = controller._cachedMeta.iScale;\n  if (iScale && axis === iScale.axis && axis !== 'r' && _sorted && data.length) {\n    const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;\n    if (!intersect) {\n      return lookupMethod(data, axis, value);\n    } else if (controller._sharedOptions) {\n      const el = data[0];\n      const range = typeof el.getRange === 'function' && el.getRange(axis);\n      if (range) {\n        const start = lookupMethod(data, axis, value - range);\n        const end = lookupMethod(data, axis, value + range);\n        return {lo: start.lo, hi: end.hi};\n      }\n    }\n  }\n  return {lo: 0, hi: data.length - 1};\n}\nfunction evaluateInteractionItems(chart, axis, position, handler, intersect) {\n  const metasets = chart.getSortedVisibleDatasetMetas();\n  const value = position[axis];\n  for (let i = 0, ilen = metasets.length; i < ilen; ++i) {\n    const {index, data} = metasets[i];\n    const {lo, hi} = binarySearch(metasets[i], axis, value, intersect);\n    for (let j = lo; j <= hi; ++j) {\n      const element = data[j];\n      if (!element.skip) {\n        handler(element, index, j);\n      }\n    }\n  }\n}\nfunction getDistanceMetricForAxis(axis) {\n  const useX = axis.indexOf('x') !== -1;\n  const useY = axis.indexOf('y') !== -1;\n  return function(pt1, pt2) {\n    const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n    const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n    return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n  };\n}\nfunction getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) {\n  const items = [];\n  if (!includeInvisible && !chart.isPointInArea(position)) {\n    return items;\n  }\n  const evaluationFunc = function(element, datasetIndex, index) {\n    if (!includeInvisible && !_isPointInArea(element, chart.chartArea, 0)) {\n      return;\n    }\n    if (element.inRange(position.x, position.y, useFinalPosition)) {\n      items.push({element, datasetIndex, index});\n    }\n  };\n  evaluateInteractionItems(chart, axis, position, evaluationFunc, true);\n  return items;\n}\nfunction getNearestRadialItems(chart, position, axis, useFinalPosition) {\n  let items = [];\n  function evaluationFunc(element, datasetIndex, index) {\n    const {startAngle, endAngle} = element.getProps(['startAngle', 'endAngle'], useFinalPosition);\n    const {angle} = getAngleFromPoint(element, {x: position.x, y: position.y});\n    if (_angleBetween(angle, startAngle, endAngle)) {\n      items.push({element, datasetIndex, index});\n    }\n  }\n  evaluateInteractionItems(chart, axis, position, evaluationFunc);\n  return items;\n}\nfunction getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n  let items = [];\n  const distanceMetric = getDistanceMetricForAxis(axis);\n  let minDistance = Number.POSITIVE_INFINITY;\n  function evaluationFunc(element, datasetIndex, index) {\n    const inRange = element.inRange(position.x, position.y, useFinalPosition);\n    if (intersect && !inRange) {\n      return;\n    }\n    const center = element.getCenterPoint(useFinalPosition);\n    const pointInArea = !!includeInvisible || chart.isPointInArea(center);\n    if (!pointInArea && !inRange) {\n      return;\n    }\n    const distance = distanceMetric(position, center);\n    if (distance < minDistance) {\n      items = [{element, datasetIndex, index}];\n      minDistance = distance;\n    } else if (distance === minDistance) {\n      items.push({element, datasetIndex, index});\n    }\n  }\n  evaluateInteractionItems(chart, axis, position, evaluationFunc);\n  return items;\n}\nfunction getNearestItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n  if (!includeInvisible && !chart.isPointInArea(position)) {\n    return [];\n  }\n  return axis === 'r' && !intersect\n    ? getNearestRadialItems(chart, position, axis, useFinalPosition)\n    : getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible);\n}\nfunction getAxisItems(chart, position, axis, intersect, useFinalPosition) {\n  const items = [];\n  const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';\n  let intersectsItem = false;\n  evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index) => {\n    if (element[rangeMethod](position[axis], useFinalPosition)) {\n      items.push({element, datasetIndex, index});\n      intersectsItem = intersectsItem || element.inRange(position.x, position.y, useFinalPosition);\n    }\n  });\n  if (intersect && !intersectsItem) {\n    return [];\n  }\n  return items;\n}\nvar Interaction = {\n  evaluateInteractionItems,\n  modes: {\n    index(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'x';\n      const includeInvisible = options.includeInvisible || false;\n      const items = options.intersect\n        ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible)\n        : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n      const elements = [];\n      if (!items.length) {\n        return [];\n      }\n      chart.getSortedVisibleDatasetMetas().forEach((meta) => {\n        const index = items[0].index;\n        const element = meta.data[index];\n        if (element && !element.skip) {\n          elements.push({element, datasetIndex: meta.index, index});\n        }\n      });\n      return elements;\n    },\n    dataset(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'xy';\n      const includeInvisible = options.includeInvisible || false;\n      let items = options.intersect\n        ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) :\n        getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n      if (items.length > 0) {\n        const datasetIndex = items[0].datasetIndex;\n        const data = chart.getDatasetMeta(datasetIndex).data;\n        items = [];\n        for (let i = 0; i < data.length; ++i) {\n          items.push({element: data[i], datasetIndex, index: i});\n        }\n      }\n      return items;\n    },\n    point(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'xy';\n      const includeInvisible = options.includeInvisible || false;\n      return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);\n    },\n    nearest(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'xy';\n      const includeInvisible = options.includeInvisible || false;\n      return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible);\n    },\n    x(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);\n    },\n    y(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      return getAxisItems(chart, position, 'y', options.intersect, useFinalPosition);\n    }\n  }\n};\n\nconst STATIC_POSITIONS = ['left', 'top', 'right', 'bottom'];\nfunction filterByPosition(array, position) {\n  return array.filter(v => v.pos === position);\n}\nfunction filterDynamicPositionByAxis(array, axis) {\n  return array.filter(v => STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);\n}\nfunction sortByWeight(array, reverse) {\n  return array.sort((a, b) => {\n    const v0 = reverse ? b : a;\n    const v1 = reverse ? a : b;\n    return v0.weight === v1.weight ?\n      v0.index - v1.index :\n      v0.weight - v1.weight;\n  });\n}\nfunction wrapBoxes(boxes) {\n  const layoutBoxes = [];\n  let i, ilen, box, pos, stack, stackWeight;\n  for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\n    box = boxes[i];\n    ({position: pos, options: {stack, stackWeight = 1}} = box);\n    layoutBoxes.push({\n      index: i,\n      box,\n      pos,\n      horizontal: box.isHorizontal(),\n      weight: box.weight,\n      stack: stack && (pos + stack),\n      stackWeight\n    });\n  }\n  return layoutBoxes;\n}\nfunction buildStacks(layouts) {\n  const stacks = {};\n  for (const wrap of layouts) {\n    const {stack, pos, stackWeight} = wrap;\n    if (!stack || !STATIC_POSITIONS.includes(pos)) {\n      continue;\n    }\n    const _stack = stacks[stack] || (stacks[stack] = {count: 0, placed: 0, weight: 0, size: 0});\n    _stack.count++;\n    _stack.weight += stackWeight;\n  }\n  return stacks;\n}\nfunction setLayoutDims(layouts, params) {\n  const stacks = buildStacks(layouts);\n  const {vBoxMaxWidth, hBoxMaxHeight} = params;\n  let i, ilen, layout;\n  for (i = 0, ilen = layouts.length; i < ilen; ++i) {\n    layout = layouts[i];\n    const {fullSize} = layout.box;\n    const stack = stacks[layout.stack];\n    const factor = stack && layout.stackWeight / stack.weight;\n    if (layout.horizontal) {\n      layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;\n      layout.height = hBoxMaxHeight;\n    } else {\n      layout.width = vBoxMaxWidth;\n      layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;\n    }\n  }\n  return stacks;\n}\nfunction buildLayoutBoxes(boxes) {\n  const layoutBoxes = wrapBoxes(boxes);\n  const fullSize = sortByWeight(layoutBoxes.filter(wrap => wrap.box.fullSize), true);\n  const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n  const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\n  const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n  const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n  const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');\n  const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');\n  return {\n    fullSize,\n    leftAndTop: left.concat(top),\n    rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),\n    chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n    vertical: left.concat(right).concat(centerVertical),\n    horizontal: top.concat(bottom).concat(centerHorizontal)\n  };\n}\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\n  return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n}\nfunction updateMaxPadding(maxPadding, boxPadding) {\n  maxPadding.top = Math.max(maxPadding.top, boxPadding.top);\n  maxPadding.left = Math.max(maxPadding.left, boxPadding.left);\n  maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\n  maxPadding.right = Math.max(maxPadding.right, boxPadding.right);\n}\nfunction updateDims(chartArea, params, layout, stacks) {\n  const {pos, box} = layout;\n  const maxPadding = chartArea.maxPadding;\n  if (!isObject(pos)) {\n    if (layout.size) {\n      chartArea[pos] -= layout.size;\n    }\n    const stack = stacks[layout.stack] || {size: 0, count: 1};\n    stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);\n    layout.size = stack.size / stack.count;\n    chartArea[pos] += layout.size;\n  }\n  if (box.getPadding) {\n    updateMaxPadding(maxPadding, box.getPadding());\n  }\n  const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));\n  const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));\n  const widthChanged = newWidth !== chartArea.w;\n  const heightChanged = newHeight !== chartArea.h;\n  chartArea.w = newWidth;\n  chartArea.h = newHeight;\n  return layout.horizontal\n    ? {same: widthChanged, other: heightChanged}\n    : {same: heightChanged, other: widthChanged};\n}\nfunction handleMaxPadding(chartArea) {\n  const maxPadding = chartArea.maxPadding;\n  function updatePos(pos) {\n    const change = Math.max(maxPadding[pos] - chartArea[pos], 0);\n    chartArea[pos] += change;\n    return change;\n  }\n  chartArea.y += updatePos('top');\n  chartArea.x += updatePos('left');\n  updatePos('right');\n  updatePos('bottom');\n}\nfunction getMargins(horizontal, chartArea) {\n  const maxPadding = chartArea.maxPadding;\n  function marginForPositions(positions) {\n    const margin = {left: 0, top: 0, right: 0, bottom: 0};\n    positions.forEach((pos) => {\n      margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\n    });\n    return margin;\n  }\n  return horizontal\n    ? marginForPositions(['left', 'right'])\n    : marginForPositions(['top', 'bottom']);\n}\nfunction fitBoxes(boxes, chartArea, params, stacks) {\n  const refitBoxes = [];\n  let i, ilen, layout, box, refit, changed;\n  for (i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i) {\n    layout = boxes[i];\n    box = layout.box;\n    box.update(\n      layout.width || chartArea.w,\n      layout.height || chartArea.h,\n      getMargins(layout.horizontal, chartArea)\n    );\n    const {same, other} = updateDims(chartArea, params, layout, stacks);\n    refit |= same && refitBoxes.length;\n    changed = changed || other;\n    if (!box.fullSize) {\n      refitBoxes.push(layout);\n    }\n  }\n  return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;\n}\nfunction setBoxDims(box, left, top, width, height) {\n  box.top = top;\n  box.left = left;\n  box.right = left + width;\n  box.bottom = top + height;\n  box.width = width;\n  box.height = height;\n}\nfunction placeBoxes(boxes, chartArea, params, stacks) {\n  const userPadding = params.padding;\n  let {x, y} = chartArea;\n  for (const layout of boxes) {\n    const box = layout.box;\n    const stack = stacks[layout.stack] || {count: 1, placed: 0, weight: 1};\n    const weight = (layout.stackWeight / stack.weight) || 1;\n    if (layout.horizontal) {\n      const width = chartArea.w * weight;\n      const height = stack.size || box.height;\n      if (defined(stack.start)) {\n        y = stack.start;\n      }\n      if (box.fullSize) {\n        setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);\n      } else {\n        setBoxDims(box, chartArea.left + stack.placed, y, width, height);\n      }\n      stack.start = y;\n      stack.placed += width;\n      y = box.bottom;\n    } else {\n      const height = chartArea.h * weight;\n      const width = stack.size || box.width;\n      if (defined(stack.start)) {\n        x = stack.start;\n      }\n      if (box.fullSize) {\n        setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);\n      } else {\n        setBoxDims(box, x, chartArea.top + stack.placed, width, height);\n      }\n      stack.start = x;\n      stack.placed += height;\n      x = box.right;\n    }\n  }\n  chartArea.x = x;\n  chartArea.y = y;\n}\ndefaults.set('layout', {\n  autoPadding: true,\n  padding: {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  }\n});\nvar layouts = {\n  addBox(chart, item) {\n    if (!chart.boxes) {\n      chart.boxes = [];\n    }\n    item.fullSize = item.fullSize || false;\n    item.position = item.position || 'top';\n    item.weight = item.weight || 0;\n    item._layers = item._layers || function() {\n      return [{\n        z: 0,\n        draw(chartArea) {\n          item.draw(chartArea);\n        }\n      }];\n    };\n    chart.boxes.push(item);\n  },\n  removeBox(chart, layoutItem) {\n    const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n    if (index !== -1) {\n      chart.boxes.splice(index, 1);\n    }\n  },\n  configure(chart, item, options) {\n    item.fullSize = options.fullSize;\n    item.position = options.position;\n    item.weight = options.weight;\n  },\n  update(chart, width, height, minPadding) {\n    if (!chart) {\n      return;\n    }\n    const padding = toPadding(chart.options.layout.padding);\n    const availableWidth = Math.max(width - padding.width, 0);\n    const availableHeight = Math.max(height - padding.height, 0);\n    const boxes = buildLayoutBoxes(chart.boxes);\n    const verticalBoxes = boxes.vertical;\n    const horizontalBoxes = boxes.horizontal;\n    each(chart.boxes, box => {\n      if (typeof box.beforeLayout === 'function') {\n        box.beforeLayout();\n      }\n    });\n    const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap) =>\n      wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;\n    const params = Object.freeze({\n      outerWidth: width,\n      outerHeight: height,\n      padding,\n      availableWidth,\n      availableHeight,\n      vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,\n      hBoxMaxHeight: availableHeight / 2\n    });\n    const maxPadding = Object.assign({}, padding);\n    updateMaxPadding(maxPadding, toPadding(minPadding));\n    const chartArea = Object.assign({\n      maxPadding,\n      w: availableWidth,\n      h: availableHeight,\n      x: padding.left,\n      y: padding.top\n    }, padding);\n    const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\n    fitBoxes(boxes.fullSize, chartArea, params, stacks);\n    fitBoxes(verticalBoxes, chartArea, params, stacks);\n    if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {\n      fitBoxes(verticalBoxes, chartArea, params, stacks);\n    }\n    handleMaxPadding(chartArea);\n    placeBoxes(boxes.leftAndTop, chartArea, params, stacks);\n    chartArea.x += chartArea.w;\n    chartArea.y += chartArea.h;\n    placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);\n    chart.chartArea = {\n      left: chartArea.left,\n      top: chartArea.top,\n      right: chartArea.left + chartArea.w,\n      bottom: chartArea.top + chartArea.h,\n      height: chartArea.h,\n      width: chartArea.w,\n    };\n    each(boxes.chartArea, (layout) => {\n      const box = layout.box;\n      Object.assign(box, chart.chartArea);\n      box.update(chartArea.w, chartArea.h, {left: 0, top: 0, right: 0, bottom: 0});\n    });\n  }\n};\n\nclass BasePlatform {\n  acquireContext(canvas, aspectRatio) {}\n  releaseContext(context) {\n    return false;\n  }\n  addEventListener(chart, type, listener) {}\n  removeEventListener(chart, type, listener) {}\n  getDevicePixelRatio() {\n    return 1;\n  }\n  getMaximumSize(element, width, height, aspectRatio) {\n    width = Math.max(0, width || element.width);\n    height = height || element.height;\n    return {\n      width,\n      height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)\n    };\n  }\n  isAttached(canvas) {\n    return true;\n  }\n  updateConfig(config) {\n  }\n}\n\nclass BasicPlatform extends BasePlatform {\n  acquireContext(item) {\n    return item && item.getContext && item.getContext('2d') || null;\n  }\n  updateConfig(config) {\n    config.options.animation = false;\n  }\n}\n\nconst EXPANDO_KEY = '$chartjs';\nconst EVENT_TYPES = {\n  touchstart: 'mousedown',\n  touchmove: 'mousemove',\n  touchend: 'mouseup',\n  pointerenter: 'mouseenter',\n  pointerdown: 'mousedown',\n  pointermove: 'mousemove',\n  pointerup: 'mouseup',\n  pointerleave: 'mouseout',\n  pointerout: 'mouseout'\n};\nconst isNullOrEmpty = value => value === null || value === '';\nfunction initCanvas(canvas, aspectRatio) {\n  const style = canvas.style;\n  const renderHeight = canvas.getAttribute('height');\n  const renderWidth = canvas.getAttribute('width');\n  canvas[EXPANDO_KEY] = {\n    initial: {\n      height: renderHeight,\n      width: renderWidth,\n      style: {\n        display: style.display,\n        height: style.height,\n        width: style.width\n      }\n    }\n  };\n  style.display = style.display || 'block';\n  style.boxSizing = style.boxSizing || 'border-box';\n  if (isNullOrEmpty(renderWidth)) {\n    const displayWidth = readUsedSize(canvas, 'width');\n    if (displayWidth !== undefined) {\n      canvas.width = displayWidth;\n    }\n  }\n  if (isNullOrEmpty(renderHeight)) {\n    if (canvas.style.height === '') {\n      canvas.height = canvas.width / (aspectRatio || 2);\n    } else {\n      const displayHeight = readUsedSize(canvas, 'height');\n      if (displayHeight !== undefined) {\n        canvas.height = displayHeight;\n      }\n    }\n  }\n  return canvas;\n}\nconst eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;\nfunction addListener(node, type, listener) {\n  node.addEventListener(type, listener, eventListenerOptions);\n}\nfunction removeListener(chart, type, listener) {\n  chart.canvas.removeEventListener(type, listener, eventListenerOptions);\n}\nfunction fromNativeEvent(event, chart) {\n  const type = EVENT_TYPES[event.type] || event.type;\n  const {x, y} = getRelativePosition(event, chart);\n  return {\n    type,\n    chart,\n    native: event,\n    x: x !== undefined ? x : null,\n    y: y !== undefined ? y : null,\n  };\n}\nfunction nodeListContains(nodeList, canvas) {\n  for (const node of nodeList) {\n    if (node === canvas || node.contains(canvas)) {\n      return true;\n    }\n  }\n}\nfunction createAttachObserver(chart, type, listener) {\n  const canvas = chart.canvas;\n  const observer = new MutationObserver(entries => {\n    let trigger = false;\n    for (const entry of entries) {\n      trigger = trigger || nodeListContains(entry.addedNodes, canvas);\n      trigger = trigger && !nodeListContains(entry.removedNodes, canvas);\n    }\n    if (trigger) {\n      listener();\n    }\n  });\n  observer.observe(document, {childList: true, subtree: true});\n  return observer;\n}\nfunction createDetachObserver(chart, type, listener) {\n  const canvas = chart.canvas;\n  const observer = new MutationObserver(entries => {\n    let trigger = false;\n    for (const entry of entries) {\n      trigger = trigger || nodeListContains(entry.removedNodes, canvas);\n      trigger = trigger && !nodeListContains(entry.addedNodes, canvas);\n    }\n    if (trigger) {\n      listener();\n    }\n  });\n  observer.observe(document, {childList: true, subtree: true});\n  return observer;\n}\nconst drpListeningCharts = new Map();\nlet oldDevicePixelRatio = 0;\nfunction onWindowResize() {\n  const dpr = window.devicePixelRatio;\n  if (dpr === oldDevicePixelRatio) {\n    return;\n  }\n  oldDevicePixelRatio = dpr;\n  drpListeningCharts.forEach((resize, chart) => {\n    if (chart.currentDevicePixelRatio !== dpr) {\n      resize();\n    }\n  });\n}\nfunction listenDevicePixelRatioChanges(chart, resize) {\n  if (!drpListeningCharts.size) {\n    window.addEventListener('resize', onWindowResize);\n  }\n  drpListeningCharts.set(chart, resize);\n}\nfunction unlistenDevicePixelRatioChanges(chart) {\n  drpListeningCharts.delete(chart);\n  if (!drpListeningCharts.size) {\n    window.removeEventListener('resize', onWindowResize);\n  }\n}\nfunction createResizeObserver(chart, type, listener) {\n  const canvas = chart.canvas;\n  const container = canvas && _getParentNode(canvas);\n  if (!container) {\n    return;\n  }\n  const resize = throttled((width, height) => {\n    const w = container.clientWidth;\n    listener(width, height);\n    if (w < container.clientWidth) {\n      listener();\n    }\n  }, window);\n  const observer = new ResizeObserver(entries => {\n    const entry = entries[0];\n    const width = entry.contentRect.width;\n    const height = entry.contentRect.height;\n    if (width === 0 && height === 0) {\n      return;\n    }\n    resize(width, height);\n  });\n  observer.observe(container);\n  listenDevicePixelRatioChanges(chart, resize);\n  return observer;\n}\nfunction releaseObserver(chart, type, observer) {\n  if (observer) {\n    observer.disconnect();\n  }\n  if (type === 'resize') {\n    unlistenDevicePixelRatioChanges(chart);\n  }\n}\nfunction createProxyAndListen(chart, type, listener) {\n  const canvas = chart.canvas;\n  const proxy = throttled((event) => {\n    if (chart.ctx !== null) {\n      listener(fromNativeEvent(event, chart));\n    }\n  }, chart, (args) => {\n    const event = args[0];\n    return [event, event.offsetX, event.offsetY];\n  });\n  addListener(canvas, type, proxy);\n  return proxy;\n}\nclass DomPlatform extends BasePlatform {\n  acquireContext(canvas, aspectRatio) {\n    const context = canvas && canvas.getContext && canvas.getContext('2d');\n    if (context && context.canvas === canvas) {\n      initCanvas(canvas, aspectRatio);\n      return context;\n    }\n    return null;\n  }\n  releaseContext(context) {\n    const canvas = context.canvas;\n    if (!canvas[EXPANDO_KEY]) {\n      return false;\n    }\n    const initial = canvas[EXPANDO_KEY].initial;\n    ['height', 'width'].forEach((prop) => {\n      const value = initial[prop];\n      if (isNullOrUndef(value)) {\n        canvas.removeAttribute(prop);\n      } else {\n        canvas.setAttribute(prop, value);\n      }\n    });\n    const style = initial.style || {};\n    Object.keys(style).forEach((key) => {\n      canvas.style[key] = style[key];\n    });\n    canvas.width = canvas.width;\n    delete canvas[EXPANDO_KEY];\n    return true;\n  }\n  addEventListener(chart, type, listener) {\n    this.removeEventListener(chart, type);\n    const proxies = chart.$proxies || (chart.$proxies = {});\n    const handlers = {\n      attach: createAttachObserver,\n      detach: createDetachObserver,\n      resize: createResizeObserver\n    };\n    const handler = handlers[type] || createProxyAndListen;\n    proxies[type] = handler(chart, type, listener);\n  }\n  removeEventListener(chart, type) {\n    const proxies = chart.$proxies || (chart.$proxies = {});\n    const proxy = proxies[type];\n    if (!proxy) {\n      return;\n    }\n    const handlers = {\n      attach: releaseObserver,\n      detach: releaseObserver,\n      resize: releaseObserver\n    };\n    const handler = handlers[type] || removeListener;\n    handler(chart, type, proxy);\n    proxies[type] = undefined;\n  }\n  getDevicePixelRatio() {\n    return window.devicePixelRatio;\n  }\n  getMaximumSize(canvas, width, height, aspectRatio) {\n    return getMaximumSize(canvas, width, height, aspectRatio);\n  }\n  isAttached(canvas) {\n    const container = _getParentNode(canvas);\n    return !!(container && container.isConnected);\n  }\n}\n\nfunction _detectPlatform(canvas) {\n  if (!_isDomSupported() || (typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas)) {\n    return BasicPlatform;\n  }\n  return DomPlatform;\n}\n\nclass PluginService {\n  constructor() {\n    this._init = [];\n  }\n  notify(chart, hook, args, filter) {\n    if (hook === 'beforeInit') {\n      this._init = this._createDescriptors(chart, true);\n      this._notify(this._init, chart, 'install');\n    }\n    const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);\n    const result = this._notify(descriptors, chart, hook, args);\n    if (hook === 'afterDestroy') {\n      this._notify(descriptors, chart, 'stop');\n      this._notify(this._init, chart, 'uninstall');\n    }\n    return result;\n  }\n  _notify(descriptors, chart, hook, args) {\n    args = args || {};\n    for (const descriptor of descriptors) {\n      const plugin = descriptor.plugin;\n      const method = plugin[hook];\n      const params = [chart, args, descriptor.options];\n      if (callback(method, params, plugin) === false && args.cancelable) {\n        return false;\n      }\n    }\n    return true;\n  }\n  invalidate() {\n    if (!isNullOrUndef(this._cache)) {\n      this._oldCache = this._cache;\n      this._cache = undefined;\n    }\n  }\n  _descriptors(chart) {\n    if (this._cache) {\n      return this._cache;\n    }\n    const descriptors = this._cache = this._createDescriptors(chart);\n    this._notifyStateChanges(chart);\n    return descriptors;\n  }\n  _createDescriptors(chart, all) {\n    const config = chart && chart.config;\n    const options = valueOrDefault(config.options && config.options.plugins, {});\n    const plugins = allPlugins(config);\n    return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);\n  }\n  _notifyStateChanges(chart) {\n    const previousDescriptors = this._oldCache || [];\n    const descriptors = this._cache;\n    const diff = (a, b) => a.filter(x => !b.some(y => x.plugin.id === y.plugin.id));\n    this._notify(diff(previousDescriptors, descriptors), chart, 'stop');\n    this._notify(diff(descriptors, previousDescriptors), chart, 'start');\n  }\n}\nfunction allPlugins(config) {\n  const localIds = {};\n  const plugins = [];\n  const keys = Object.keys(registry.plugins.items);\n  for (let i = 0; i < keys.length; i++) {\n    plugins.push(registry.getPlugin(keys[i]));\n  }\n  const local = config.plugins || [];\n  for (let i = 0; i < local.length; i++) {\n    const plugin = local[i];\n    if (plugins.indexOf(plugin) === -1) {\n      plugins.push(plugin);\n      localIds[plugin.id] = true;\n    }\n  }\n  return {plugins, localIds};\n}\nfunction getOpts(options, all) {\n  if (!all && options === false) {\n    return null;\n  }\n  if (options === true) {\n    return {};\n  }\n  return options;\n}\nfunction createDescriptors(chart, {plugins, localIds}, options, all) {\n  const result = [];\n  const context = chart.getContext();\n  for (const plugin of plugins) {\n    const id = plugin.id;\n    const opts = getOpts(options[id], all);\n    if (opts === null) {\n      continue;\n    }\n    result.push({\n      plugin,\n      options: pluginOpts(chart.config, {plugin, local: localIds[id]}, opts, context)\n    });\n  }\n  return result;\n}\nfunction pluginOpts(config, {plugin, local}, opts, context) {\n  const keys = config.pluginScopeKeys(plugin);\n  const scopes = config.getOptionScopes(opts, keys);\n  if (local && plugin.defaults) {\n    scopes.push(plugin.defaults);\n  }\n  return config.createResolver(scopes, context, [''], {\n    scriptable: false,\n    indexable: false,\n    allKeys: true\n  });\n}\n\nfunction getIndexAxis(type, options) {\n  const datasetDefaults = defaults.datasets[type] || {};\n  const datasetOptions = (options.datasets || {})[type] || {};\n  return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';\n}\nfunction getAxisFromDefaultScaleID(id, indexAxis) {\n  let axis = id;\n  if (id === '_index_') {\n    axis = indexAxis;\n  } else if (id === '_value_') {\n    axis = indexAxis === 'x' ? 'y' : 'x';\n  }\n  return axis;\n}\nfunction getDefaultScaleIDFromAxis(axis, indexAxis) {\n  return axis === indexAxis ? '_index_' : '_value_';\n}\nfunction axisFromPosition(position) {\n  if (position === 'top' || position === 'bottom') {\n    return 'x';\n  }\n  if (position === 'left' || position === 'right') {\n    return 'y';\n  }\n}\nfunction determineAxis(id, scaleOptions) {\n  if (id === 'x' || id === 'y') {\n    return id;\n  }\n  return scaleOptions.axis || axisFromPosition(scaleOptions.position) || id.charAt(0).toLowerCase();\n}\nfunction mergeScaleConfig(config, options) {\n  const chartDefaults = overrides[config.type] || {scales: {}};\n  const configScales = options.scales || {};\n  const chartIndexAxis = getIndexAxis(config.type, options);\n  const firstIDs = Object.create(null);\n  const scales = Object.create(null);\n  Object.keys(configScales).forEach(id => {\n    const scaleConf = configScales[id];\n    if (!isObject(scaleConf)) {\n      return console.error(`Invalid scale configuration for scale: ${id}`);\n    }\n    if (scaleConf._proxy) {\n      return console.warn(`Ignoring resolver passed as options for scale: ${id}`);\n    }\n    const axis = determineAxis(id, scaleConf);\n    const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);\n    const defaultScaleOptions = chartDefaults.scales || {};\n    firstIDs[axis] = firstIDs[axis] || id;\n    scales[id] = mergeIf(Object.create(null), [{axis}, scaleConf, defaultScaleOptions[axis], defaultScaleOptions[defaultId]]);\n  });\n  config.data.datasets.forEach(dataset => {\n    const type = dataset.type || config.type;\n    const indexAxis = dataset.indexAxis || getIndexAxis(type, options);\n    const datasetDefaults = overrides[type] || {};\n    const defaultScaleOptions = datasetDefaults.scales || {};\n    Object.keys(defaultScaleOptions).forEach(defaultID => {\n      const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);\n      const id = dataset[axis + 'AxisID'] || firstIDs[axis] || axis;\n      scales[id] = scales[id] || Object.create(null);\n      mergeIf(scales[id], [{axis}, configScales[id], defaultScaleOptions[defaultID]]);\n    });\n  });\n  Object.keys(scales).forEach(key => {\n    const scale = scales[key];\n    mergeIf(scale, [defaults.scales[scale.type], defaults.scale]);\n  });\n  return scales;\n}\nfunction initOptions(config) {\n  const options = config.options || (config.options = {});\n  options.plugins = valueOrDefault(options.plugins, {});\n  options.scales = mergeScaleConfig(config, options);\n}\nfunction initData(data) {\n  data = data || {};\n  data.datasets = data.datasets || [];\n  data.labels = data.labels || [];\n  return data;\n}\nfunction initConfig(config) {\n  config = config || {};\n  config.data = initData(config.data);\n  initOptions(config);\n  return config;\n}\nconst keyCache = new Map();\nconst keysCached = new Set();\nfunction cachedKeys(cacheKey, generate) {\n  let keys = keyCache.get(cacheKey);\n  if (!keys) {\n    keys = generate();\n    keyCache.set(cacheKey, keys);\n    keysCached.add(keys);\n  }\n  return keys;\n}\nconst addIfFound = (set, obj, key) => {\n  const opts = resolveObjectKey(obj, key);\n  if (opts !== undefined) {\n    set.add(opts);\n  }\n};\nclass Config {\n  constructor(config) {\n    this._config = initConfig(config);\n    this._scopeCache = new Map();\n    this._resolverCache = new Map();\n  }\n  get platform() {\n    return this._config.platform;\n  }\n  get type() {\n    return this._config.type;\n  }\n  set type(type) {\n    this._config.type = type;\n  }\n  get data() {\n    return this._config.data;\n  }\n  set data(data) {\n    this._config.data = initData(data);\n  }\n  get options() {\n    return this._config.options;\n  }\n  set options(options) {\n    this._config.options = options;\n  }\n  get plugins() {\n    return this._config.plugins;\n  }\n  update() {\n    const config = this._config;\n    this.clearCache();\n    initOptions(config);\n  }\n  clearCache() {\n    this._scopeCache.clear();\n    this._resolverCache.clear();\n  }\n  datasetScopeKeys(datasetType) {\n    return cachedKeys(datasetType,\n      () => [[\n        `datasets.${datasetType}`,\n        ''\n      ]]);\n  }\n  datasetAnimationScopeKeys(datasetType, transition) {\n    return cachedKeys(`${datasetType}.transition.${transition}`,\n      () => [\n        [\n          `datasets.${datasetType}.transitions.${transition}`,\n          `transitions.${transition}`,\n        ],\n        [\n          `datasets.${datasetType}`,\n          ''\n        ]\n      ]);\n  }\n  datasetElementScopeKeys(datasetType, elementType) {\n    return cachedKeys(`${datasetType}-${elementType}`,\n      () => [[\n        `datasets.${datasetType}.elements.${elementType}`,\n        `datasets.${datasetType}`,\n        `elements.${elementType}`,\n        ''\n      ]]);\n  }\n  pluginScopeKeys(plugin) {\n    const id = plugin.id;\n    const type = this.type;\n    return cachedKeys(`${type}-plugin-${id}`,\n      () => [[\n        `plugins.${id}`,\n        ...plugin.additionalOptionScopes || [],\n      ]]);\n  }\n  _cachedScopes(mainScope, resetCache) {\n    const _scopeCache = this._scopeCache;\n    let cache = _scopeCache.get(mainScope);\n    if (!cache || resetCache) {\n      cache = new Map();\n      _scopeCache.set(mainScope, cache);\n    }\n    return cache;\n  }\n  getOptionScopes(mainScope, keyLists, resetCache) {\n    const {options, type} = this;\n    const cache = this._cachedScopes(mainScope, resetCache);\n    const cached = cache.get(keyLists);\n    if (cached) {\n      return cached;\n    }\n    const scopes = new Set();\n    keyLists.forEach(keys => {\n      if (mainScope) {\n        scopes.add(mainScope);\n        keys.forEach(key => addIfFound(scopes, mainScope, key));\n      }\n      keys.forEach(key => addIfFound(scopes, options, key));\n      keys.forEach(key => addIfFound(scopes, overrides[type] || {}, key));\n      keys.forEach(key => addIfFound(scopes, defaults, key));\n      keys.forEach(key => addIfFound(scopes, descriptors, key));\n    });\n    const array = Array.from(scopes);\n    if (array.length === 0) {\n      array.push(Object.create(null));\n    }\n    if (keysCached.has(keyLists)) {\n      cache.set(keyLists, array);\n    }\n    return array;\n  }\n  chartOptionScopes() {\n    const {options, type} = this;\n    return [\n      options,\n      overrides[type] || {},\n      defaults.datasets[type] || {},\n      {type},\n      defaults,\n      descriptors\n    ];\n  }\n  resolveNamedOptions(scopes, names, context, prefixes = ['']) {\n    const result = {$shared: true};\n    const {resolver, subPrefixes} = getResolver(this._resolverCache, scopes, prefixes);\n    let options = resolver;\n    if (needContext(resolver, names)) {\n      result.$shared = false;\n      context = isFunction(context) ? context() : context;\n      const subResolver = this.createResolver(scopes, context, subPrefixes);\n      options = _attachContext(resolver, context, subResolver);\n    }\n    for (const prop of names) {\n      result[prop] = options[prop];\n    }\n    return result;\n  }\n  createResolver(scopes, context, prefixes = [''], descriptorDefaults) {\n    const {resolver} = getResolver(this._resolverCache, scopes, prefixes);\n    return isObject(context)\n      ? _attachContext(resolver, context, undefined, descriptorDefaults)\n      : resolver;\n  }\n}\nfunction getResolver(resolverCache, scopes, prefixes) {\n  let cache = resolverCache.get(scopes);\n  if (!cache) {\n    cache = new Map();\n    resolverCache.set(scopes, cache);\n  }\n  const cacheKey = prefixes.join();\n  let cached = cache.get(cacheKey);\n  if (!cached) {\n    const resolver = _createResolver(scopes, prefixes);\n    cached = {\n      resolver,\n      subPrefixes: prefixes.filter(p => !p.toLowerCase().includes('hover'))\n    };\n    cache.set(cacheKey, cached);\n  }\n  return cached;\n}\nconst hasFunction = value => isObject(value)\n  && Object.getOwnPropertyNames(value).reduce((acc, key) => acc || isFunction(value[key]), false);\nfunction needContext(proxy, names) {\n  const {isScriptable, isIndexable} = _descriptors(proxy);\n  for (const prop of names) {\n    const scriptable = isScriptable(prop);\n    const indexable = isIndexable(prop);\n    const value = (indexable || scriptable) && proxy[prop];\n    if ((scriptable && (isFunction(value) || hasFunction(value)))\n      || (indexable && isArray(value))) {\n      return true;\n    }\n  }\n  return false;\n}\n\nvar version = \"3.9.1\";\n\nconst KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];\nfunction positionIsHorizontal(position, axis) {\n  return position === 'top' || position === 'bottom' || (KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x');\n}\nfunction compare2Level(l1, l2) {\n  return function(a, b) {\n    return a[l1] === b[l1]\n      ? a[l2] - b[l2]\n      : a[l1] - b[l1];\n  };\n}\nfunction onAnimationsComplete(context) {\n  const chart = context.chart;\n  const animationOptions = chart.options.animation;\n  chart.notifyPlugins('afterRender');\n  callback(animationOptions && animationOptions.onComplete, [context], chart);\n}\nfunction onAnimationProgress(context) {\n  const chart = context.chart;\n  const animationOptions = chart.options.animation;\n  callback(animationOptions && animationOptions.onProgress, [context], chart);\n}\nfunction getCanvas(item) {\n  if (_isDomSupported() && typeof item === 'string') {\n    item = document.getElementById(item);\n  } else if (item && item.length) {\n    item = item[0];\n  }\n  if (item && item.canvas) {\n    item = item.canvas;\n  }\n  return item;\n}\nconst instances = {};\nconst getChart = (key) => {\n  const canvas = getCanvas(key);\n  return Object.values(instances).filter((c) => c.canvas === canvas).pop();\n};\nfunction moveNumericKeys(obj, start, move) {\n  const keys = Object.keys(obj);\n  for (const key of keys) {\n    const intKey = +key;\n    if (intKey >= start) {\n      const value = obj[key];\n      delete obj[key];\n      if (move > 0 || intKey > start) {\n        obj[intKey + move] = value;\n      }\n    }\n  }\n}\nfunction determineLastEvent(e, lastEvent, inChartArea, isClick) {\n  if (!inChartArea || e.type === 'mouseout') {\n    return null;\n  }\n  if (isClick) {\n    return lastEvent;\n  }\n  return e;\n}\nclass Chart {\n  constructor(item, userConfig) {\n    const config = this.config = new Config(userConfig);\n    const initialCanvas = getCanvas(item);\n    const existingChart = getChart(initialCanvas);\n    if (existingChart) {\n      throw new Error(\n        'Canvas is already in use. Chart with ID \\'' + existingChart.id + '\\'' +\n\t\t\t\t' must be destroyed before the canvas with ID \\'' + existingChart.canvas.id + '\\' can be reused.'\n      );\n    }\n    const options = config.createResolver(config.chartOptionScopes(), this.getContext());\n    this.platform = new (config.platform || _detectPlatform(initialCanvas))();\n    this.platform.updateConfig(config);\n    const context = this.platform.acquireContext(initialCanvas, options.aspectRatio);\n    const canvas = context && context.canvas;\n    const height = canvas && canvas.height;\n    const width = canvas && canvas.width;\n    this.id = uid();\n    this.ctx = context;\n    this.canvas = canvas;\n    this.width = width;\n    this.height = height;\n    this._options = options;\n    this._aspectRatio = this.aspectRatio;\n    this._layers = [];\n    this._metasets = [];\n    this._stacks = undefined;\n    this.boxes = [];\n    this.currentDevicePixelRatio = undefined;\n    this.chartArea = undefined;\n    this._active = [];\n    this._lastEvent = undefined;\n    this._listeners = {};\n    this._responsiveListeners = undefined;\n    this._sortedMetasets = [];\n    this.scales = {};\n    this._plugins = new PluginService();\n    this.$proxies = {};\n    this._hiddenIndices = {};\n    this.attached = false;\n    this._animationsDisabled = undefined;\n    this.$context = undefined;\n    this._doResize = debounce(mode => this.update(mode), options.resizeDelay || 0);\n    this._dataChanges = [];\n    instances[this.id] = this;\n    if (!context || !canvas) {\n      console.error(\"Failed to create chart: can't acquire context from the given item\");\n      return;\n    }\n    animator.listen(this, 'complete', onAnimationsComplete);\n    animator.listen(this, 'progress', onAnimationProgress);\n    this._initialize();\n    if (this.attached) {\n      this.update();\n    }\n  }\n  get aspectRatio() {\n    const {options: {aspectRatio, maintainAspectRatio}, width, height, _aspectRatio} = this;\n    if (!isNullOrUndef(aspectRatio)) {\n      return aspectRatio;\n    }\n    if (maintainAspectRatio && _aspectRatio) {\n      return _aspectRatio;\n    }\n    return height ? width / height : null;\n  }\n  get data() {\n    return this.config.data;\n  }\n  set data(data) {\n    this.config.data = data;\n  }\n  get options() {\n    return this._options;\n  }\n  set options(options) {\n    this.config.options = options;\n  }\n  _initialize() {\n    this.notifyPlugins('beforeInit');\n    if (this.options.responsive) {\n      this.resize();\n    } else {\n      retinaScale(this, this.options.devicePixelRatio);\n    }\n    this.bindEvents();\n    this.notifyPlugins('afterInit');\n    return this;\n  }\n  clear() {\n    clearCanvas(this.canvas, this.ctx);\n    return this;\n  }\n  stop() {\n    animator.stop(this);\n    return this;\n  }\n  resize(width, height) {\n    if (!animator.running(this)) {\n      this._resize(width, height);\n    } else {\n      this._resizeBeforeDraw = {width, height};\n    }\n  }\n  _resize(width, height) {\n    const options = this.options;\n    const canvas = this.canvas;\n    const aspectRatio = options.maintainAspectRatio && this.aspectRatio;\n    const newSize = this.platform.getMaximumSize(canvas, width, height, aspectRatio);\n    const newRatio = options.devicePixelRatio || this.platform.getDevicePixelRatio();\n    const mode = this.width ? 'resize' : 'attach';\n    this.width = newSize.width;\n    this.height = newSize.height;\n    this._aspectRatio = this.aspectRatio;\n    if (!retinaScale(this, newRatio, true)) {\n      return;\n    }\n    this.notifyPlugins('resize', {size: newSize});\n    callback(options.onResize, [this, newSize], this);\n    if (this.attached) {\n      if (this._doResize(mode)) {\n        this.render();\n      }\n    }\n  }\n  ensureScalesHaveIDs() {\n    const options = this.options;\n    const scalesOptions = options.scales || {};\n    each(scalesOptions, (axisOptions, axisID) => {\n      axisOptions.id = axisID;\n    });\n  }\n  buildOrUpdateScales() {\n    const options = this.options;\n    const scaleOpts = options.scales;\n    const scales = this.scales;\n    const updated = Object.keys(scales).reduce((obj, id) => {\n      obj[id] = false;\n      return obj;\n    }, {});\n    let items = [];\n    if (scaleOpts) {\n      items = items.concat(\n        Object.keys(scaleOpts).map((id) => {\n          const scaleOptions = scaleOpts[id];\n          const axis = determineAxis(id, scaleOptions);\n          const isRadial = axis === 'r';\n          const isHorizontal = axis === 'x';\n          return {\n            options: scaleOptions,\n            dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',\n            dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'\n          };\n        })\n      );\n    }\n    each(items, (item) => {\n      const scaleOptions = item.options;\n      const id = scaleOptions.id;\n      const axis = determineAxis(id, scaleOptions);\n      const scaleType = valueOrDefault(scaleOptions.type, item.dtype);\n      if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {\n        scaleOptions.position = item.dposition;\n      }\n      updated[id] = true;\n      let scale = null;\n      if (id in scales && scales[id].type === scaleType) {\n        scale = scales[id];\n      } else {\n        const scaleClass = registry.getScale(scaleType);\n        scale = new scaleClass({\n          id,\n          type: scaleType,\n          ctx: this.ctx,\n          chart: this\n        });\n        scales[scale.id] = scale;\n      }\n      scale.init(scaleOptions, options);\n    });\n    each(updated, (hasUpdated, id) => {\n      if (!hasUpdated) {\n        delete scales[id];\n      }\n    });\n    each(scales, (scale) => {\n      layouts.configure(this, scale, scale.options);\n      layouts.addBox(this, scale);\n    });\n  }\n  _updateMetasets() {\n    const metasets = this._metasets;\n    const numData = this.data.datasets.length;\n    const numMeta = metasets.length;\n    metasets.sort((a, b) => a.index - b.index);\n    if (numMeta > numData) {\n      for (let i = numData; i < numMeta; ++i) {\n        this._destroyDatasetMeta(i);\n      }\n      metasets.splice(numData, numMeta - numData);\n    }\n    this._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));\n  }\n  _removeUnreferencedMetasets() {\n    const {_metasets: metasets, data: {datasets}} = this;\n    if (metasets.length > datasets.length) {\n      delete this._stacks;\n    }\n    metasets.forEach((meta, index) => {\n      if (datasets.filter(x => x === meta._dataset).length === 0) {\n        this._destroyDatasetMeta(index);\n      }\n    });\n  }\n  buildOrUpdateControllers() {\n    const newControllers = [];\n    const datasets = this.data.datasets;\n    let i, ilen;\n    this._removeUnreferencedMetasets();\n    for (i = 0, ilen = datasets.length; i < ilen; i++) {\n      const dataset = datasets[i];\n      let meta = this.getDatasetMeta(i);\n      const type = dataset.type || this.config.type;\n      if (meta.type && meta.type !== type) {\n        this._destroyDatasetMeta(i);\n        meta = this.getDatasetMeta(i);\n      }\n      meta.type = type;\n      meta.indexAxis = dataset.indexAxis || getIndexAxis(type, this.options);\n      meta.order = dataset.order || 0;\n      meta.index = i;\n      meta.label = '' + dataset.label;\n      meta.visible = this.isDatasetVisible(i);\n      if (meta.controller) {\n        meta.controller.updateIndex(i);\n        meta.controller.linkScales();\n      } else {\n        const ControllerClass = registry.getController(type);\n        const {datasetElementType, dataElementType} = defaults.datasets[type];\n        Object.assign(ControllerClass.prototype, {\n          dataElementType: registry.getElement(dataElementType),\n          datasetElementType: datasetElementType && registry.getElement(datasetElementType)\n        });\n        meta.controller = new ControllerClass(this, i);\n        newControllers.push(meta.controller);\n      }\n    }\n    this._updateMetasets();\n    return newControllers;\n  }\n  _resetElements() {\n    each(this.data.datasets, (dataset, datasetIndex) => {\n      this.getDatasetMeta(datasetIndex).controller.reset();\n    }, this);\n  }\n  reset() {\n    this._resetElements();\n    this.notifyPlugins('reset');\n  }\n  update(mode) {\n    const config = this.config;\n    config.update();\n    const options = this._options = config.createResolver(config.chartOptionScopes(), this.getContext());\n    const animsDisabled = this._animationsDisabled = !options.animation;\n    this._updateScales();\n    this._checkEventBindings();\n    this._updateHiddenIndices();\n    this._plugins.invalidate();\n    if (this.notifyPlugins('beforeUpdate', {mode, cancelable: true}) === false) {\n      return;\n    }\n    const newControllers = this.buildOrUpdateControllers();\n    this.notifyPlugins('beforeElementsUpdate');\n    let minPadding = 0;\n    for (let i = 0, ilen = this.data.datasets.length; i < ilen; i++) {\n      const {controller} = this.getDatasetMeta(i);\n      const reset = !animsDisabled && newControllers.indexOf(controller) === -1;\n      controller.buildOrUpdateElements(reset);\n      minPadding = Math.max(+controller.getMaxOverflow(), minPadding);\n    }\n    minPadding = this._minPadding = options.layout.autoPadding ? minPadding : 0;\n    this._updateLayout(minPadding);\n    if (!animsDisabled) {\n      each(newControllers, (controller) => {\n        controller.reset();\n      });\n    }\n    this._updateDatasets(mode);\n    this.notifyPlugins('afterUpdate', {mode});\n    this._layers.sort(compare2Level('z', '_idx'));\n    const {_active, _lastEvent} = this;\n    if (_lastEvent) {\n      this._eventHandler(_lastEvent, true);\n    } else if (_active.length) {\n      this._updateHoverStyles(_active, _active, true);\n    }\n    this.render();\n  }\n  _updateScales() {\n    each(this.scales, (scale) => {\n      layouts.removeBox(this, scale);\n    });\n    this.ensureScalesHaveIDs();\n    this.buildOrUpdateScales();\n  }\n  _checkEventBindings() {\n    const options = this.options;\n    const existingEvents = new Set(Object.keys(this._listeners));\n    const newEvents = new Set(options.events);\n    if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {\n      this.unbindEvents();\n      this.bindEvents();\n    }\n  }\n  _updateHiddenIndices() {\n    const {_hiddenIndices} = this;\n    const changes = this._getUniformDataChanges() || [];\n    for (const {method, start, count} of changes) {\n      const move = method === '_removeElements' ? -count : count;\n      moveNumericKeys(_hiddenIndices, start, move);\n    }\n  }\n  _getUniformDataChanges() {\n    const _dataChanges = this._dataChanges;\n    if (!_dataChanges || !_dataChanges.length) {\n      return;\n    }\n    this._dataChanges = [];\n    const datasetCount = this.data.datasets.length;\n    const makeSet = (idx) => new Set(\n      _dataChanges\n        .filter(c => c[0] === idx)\n        .map((c, i) => i + ',' + c.splice(1).join(','))\n    );\n    const changeSet = makeSet(0);\n    for (let i = 1; i < datasetCount; i++) {\n      if (!setsEqual(changeSet, makeSet(i))) {\n        return;\n      }\n    }\n    return Array.from(changeSet)\n      .map(c => c.split(','))\n      .map(a => ({method: a[1], start: +a[2], count: +a[3]}));\n  }\n  _updateLayout(minPadding) {\n    if (this.notifyPlugins('beforeLayout', {cancelable: true}) === false) {\n      return;\n    }\n    layouts.update(this, this.width, this.height, minPadding);\n    const area = this.chartArea;\n    const noArea = area.width <= 0 || area.height <= 0;\n    this._layers = [];\n    each(this.boxes, (box) => {\n      if (noArea && box.position === 'chartArea') {\n        return;\n      }\n      if (box.configure) {\n        box.configure();\n      }\n      this._layers.push(...box._layers());\n    }, this);\n    this._layers.forEach((item, index) => {\n      item._idx = index;\n    });\n    this.notifyPlugins('afterLayout');\n  }\n  _updateDatasets(mode) {\n    if (this.notifyPlugins('beforeDatasetsUpdate', {mode, cancelable: true}) === false) {\n      return;\n    }\n    for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n      this.getDatasetMeta(i).controller.configure();\n    }\n    for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n      this._updateDataset(i, isFunction(mode) ? mode({datasetIndex: i}) : mode);\n    }\n    this.notifyPlugins('afterDatasetsUpdate', {mode});\n  }\n  _updateDataset(index, mode) {\n    const meta = this.getDatasetMeta(index);\n    const args = {meta, index, mode, cancelable: true};\n    if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {\n      return;\n    }\n    meta.controller._update(mode);\n    args.cancelable = false;\n    this.notifyPlugins('afterDatasetUpdate', args);\n  }\n  render() {\n    if (this.notifyPlugins('beforeRender', {cancelable: true}) === false) {\n      return;\n    }\n    if (animator.has(this)) {\n      if (this.attached && !animator.running(this)) {\n        animator.start(this);\n      }\n    } else {\n      this.draw();\n      onAnimationsComplete({chart: this});\n    }\n  }\n  draw() {\n    let i;\n    if (this._resizeBeforeDraw) {\n      const {width, height} = this._resizeBeforeDraw;\n      this._resize(width, height);\n      this._resizeBeforeDraw = null;\n    }\n    this.clear();\n    if (this.width <= 0 || this.height <= 0) {\n      return;\n    }\n    if (this.notifyPlugins('beforeDraw', {cancelable: true}) === false) {\n      return;\n    }\n    const layers = this._layers;\n    for (i = 0; i < layers.length && layers[i].z <= 0; ++i) {\n      layers[i].draw(this.chartArea);\n    }\n    this._drawDatasets();\n    for (; i < layers.length; ++i) {\n      layers[i].draw(this.chartArea);\n    }\n    this.notifyPlugins('afterDraw');\n  }\n  _getSortedDatasetMetas(filterVisible) {\n    const metasets = this._sortedMetasets;\n    const result = [];\n    let i, ilen;\n    for (i = 0, ilen = metasets.length; i < ilen; ++i) {\n      const meta = metasets[i];\n      if (!filterVisible || meta.visible) {\n        result.push(meta);\n      }\n    }\n    return result;\n  }\n  getSortedVisibleDatasetMetas() {\n    return this._getSortedDatasetMetas(true);\n  }\n  _drawDatasets() {\n    if (this.notifyPlugins('beforeDatasetsDraw', {cancelable: true}) === false) {\n      return;\n    }\n    const metasets = this.getSortedVisibleDatasetMetas();\n    for (let i = metasets.length - 1; i >= 0; --i) {\n      this._drawDataset(metasets[i]);\n    }\n    this.notifyPlugins('afterDatasetsDraw');\n  }\n  _drawDataset(meta) {\n    const ctx = this.ctx;\n    const clip = meta._clip;\n    const useClip = !clip.disabled;\n    const area = this.chartArea;\n    const args = {\n      meta,\n      index: meta.index,\n      cancelable: true\n    };\n    if (this.notifyPlugins('beforeDatasetDraw', args) === false) {\n      return;\n    }\n    if (useClip) {\n      clipArea(ctx, {\n        left: clip.left === false ? 0 : area.left - clip.left,\n        right: clip.right === false ? this.width : area.right + clip.right,\n        top: clip.top === false ? 0 : area.top - clip.top,\n        bottom: clip.bottom === false ? this.height : area.bottom + clip.bottom\n      });\n    }\n    meta.controller.draw();\n    if (useClip) {\n      unclipArea(ctx);\n    }\n    args.cancelable = false;\n    this.notifyPlugins('afterDatasetDraw', args);\n  }\n  isPointInArea(point) {\n    return _isPointInArea(point, this.chartArea, this._minPadding);\n  }\n  getElementsAtEventForMode(e, mode, options, useFinalPosition) {\n    const method = Interaction.modes[mode];\n    if (typeof method === 'function') {\n      return method(this, e, options, useFinalPosition);\n    }\n    return [];\n  }\n  getDatasetMeta(datasetIndex) {\n    const dataset = this.data.datasets[datasetIndex];\n    const metasets = this._metasets;\n    let meta = metasets.filter(x => x && x._dataset === dataset).pop();\n    if (!meta) {\n      meta = {\n        type: null,\n        data: [],\n        dataset: null,\n        controller: null,\n        hidden: null,\n        xAxisID: null,\n        yAxisID: null,\n        order: dataset && dataset.order || 0,\n        index: datasetIndex,\n        _dataset: dataset,\n        _parsed: [],\n        _sorted: false\n      };\n      metasets.push(meta);\n    }\n    return meta;\n  }\n  getContext() {\n    return this.$context || (this.$context = createContext(null, {chart: this, type: 'chart'}));\n  }\n  getVisibleDatasetCount() {\n    return this.getSortedVisibleDatasetMetas().length;\n  }\n  isDatasetVisible(datasetIndex) {\n    const dataset = this.data.datasets[datasetIndex];\n    if (!dataset) {\n      return false;\n    }\n    const meta = this.getDatasetMeta(datasetIndex);\n    return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;\n  }\n  setDatasetVisibility(datasetIndex, visible) {\n    const meta = this.getDatasetMeta(datasetIndex);\n    meta.hidden = !visible;\n  }\n  toggleDataVisibility(index) {\n    this._hiddenIndices[index] = !this._hiddenIndices[index];\n  }\n  getDataVisibility(index) {\n    return !this._hiddenIndices[index];\n  }\n  _updateVisibility(datasetIndex, dataIndex, visible) {\n    const mode = visible ? 'show' : 'hide';\n    const meta = this.getDatasetMeta(datasetIndex);\n    const anims = meta.controller._resolveAnimations(undefined, mode);\n    if (defined(dataIndex)) {\n      meta.data[dataIndex].hidden = !visible;\n      this.update();\n    } else {\n      this.setDatasetVisibility(datasetIndex, visible);\n      anims.update(meta, {visible});\n      this.update((ctx) => ctx.datasetIndex === datasetIndex ? mode : undefined);\n    }\n  }\n  hide(datasetIndex, dataIndex) {\n    this._updateVisibility(datasetIndex, dataIndex, false);\n  }\n  show(datasetIndex, dataIndex) {\n    this._updateVisibility(datasetIndex, dataIndex, true);\n  }\n  _destroyDatasetMeta(datasetIndex) {\n    const meta = this._metasets[datasetIndex];\n    if (meta && meta.controller) {\n      meta.controller._destroy();\n    }\n    delete this._metasets[datasetIndex];\n  }\n  _stop() {\n    let i, ilen;\n    this.stop();\n    animator.remove(this);\n    for (i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n      this._destroyDatasetMeta(i);\n    }\n  }\n  destroy() {\n    this.notifyPlugins('beforeDestroy');\n    const {canvas, ctx} = this;\n    this._stop();\n    this.config.clearCache();\n    if (canvas) {\n      this.unbindEvents();\n      clearCanvas(canvas, ctx);\n      this.platform.releaseContext(ctx);\n      this.canvas = null;\n      this.ctx = null;\n    }\n    this.notifyPlugins('destroy');\n    delete instances[this.id];\n    this.notifyPlugins('afterDestroy');\n  }\n  toBase64Image(...args) {\n    return this.canvas.toDataURL(...args);\n  }\n  bindEvents() {\n    this.bindUserEvents();\n    if (this.options.responsive) {\n      this.bindResponsiveEvents();\n    } else {\n      this.attached = true;\n    }\n  }\n  bindUserEvents() {\n    const listeners = this._listeners;\n    const platform = this.platform;\n    const _add = (type, listener) => {\n      platform.addEventListener(this, type, listener);\n      listeners[type] = listener;\n    };\n    const listener = (e, x, y) => {\n      e.offsetX = x;\n      e.offsetY = y;\n      this._eventHandler(e);\n    };\n    each(this.options.events, (type) => _add(type, listener));\n  }\n  bindResponsiveEvents() {\n    if (!this._responsiveListeners) {\n      this._responsiveListeners = {};\n    }\n    const listeners = this._responsiveListeners;\n    const platform = this.platform;\n    const _add = (type, listener) => {\n      platform.addEventListener(this, type, listener);\n      listeners[type] = listener;\n    };\n    const _remove = (type, listener) => {\n      if (listeners[type]) {\n        platform.removeEventListener(this, type, listener);\n        delete listeners[type];\n      }\n    };\n    const listener = (width, height) => {\n      if (this.canvas) {\n        this.resize(width, height);\n      }\n    };\n    let detached;\n    const attached = () => {\n      _remove('attach', attached);\n      this.attached = true;\n      this.resize();\n      _add('resize', listener);\n      _add('detach', detached);\n    };\n    detached = () => {\n      this.attached = false;\n      _remove('resize', listener);\n      this._stop();\n      this._resize(0, 0);\n      _add('attach', attached);\n    };\n    if (platform.isAttached(this.canvas)) {\n      attached();\n    } else {\n      detached();\n    }\n  }\n  unbindEvents() {\n    each(this._listeners, (listener, type) => {\n      this.platform.removeEventListener(this, type, listener);\n    });\n    this._listeners = {};\n    each(this._responsiveListeners, (listener, type) => {\n      this.platform.removeEventListener(this, type, listener);\n    });\n    this._responsiveListeners = undefined;\n  }\n  updateHoverStyle(items, mode, enabled) {\n    const prefix = enabled ? 'set' : 'remove';\n    let meta, item, i, ilen;\n    if (mode === 'dataset') {\n      meta = this.getDatasetMeta(items[0].datasetIndex);\n      meta.controller['_' + prefix + 'DatasetHoverStyle']();\n    }\n    for (i = 0, ilen = items.length; i < ilen; ++i) {\n      item = items[i];\n      const controller = item && this.getDatasetMeta(item.datasetIndex).controller;\n      if (controller) {\n        controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);\n      }\n    }\n  }\n  getActiveElements() {\n    return this._active || [];\n  }\n  setActiveElements(activeElements) {\n    const lastActive = this._active || [];\n    const active = activeElements.map(({datasetIndex, index}) => {\n      const meta = this.getDatasetMeta(datasetIndex);\n      if (!meta) {\n        throw new Error('No dataset found at index ' + datasetIndex);\n      }\n      return {\n        datasetIndex,\n        element: meta.data[index],\n        index,\n      };\n    });\n    const changed = !_elementsEqual(active, lastActive);\n    if (changed) {\n      this._active = active;\n      this._lastEvent = null;\n      this._updateHoverStyles(active, lastActive);\n    }\n  }\n  notifyPlugins(hook, args, filter) {\n    return this._plugins.notify(this, hook, args, filter);\n  }\n  _updateHoverStyles(active, lastActive, replay) {\n    const hoverOptions = this.options.hover;\n    const diff = (a, b) => a.filter(x => !b.some(y => x.datasetIndex === y.datasetIndex && x.index === y.index));\n    const deactivated = diff(lastActive, active);\n    const activated = replay ? active : diff(active, lastActive);\n    if (deactivated.length) {\n      this.updateHoverStyle(deactivated, hoverOptions.mode, false);\n    }\n    if (activated.length && hoverOptions.mode) {\n      this.updateHoverStyle(activated, hoverOptions.mode, true);\n    }\n  }\n  _eventHandler(e, replay) {\n    const args = {\n      event: e,\n      replay,\n      cancelable: true,\n      inChartArea: this.isPointInArea(e)\n    };\n    const eventFilter = (plugin) => (plugin.options.events || this.options.events).includes(e.native.type);\n    if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {\n      return;\n    }\n    const changed = this._handleEvent(e, replay, args.inChartArea);\n    args.cancelable = false;\n    this.notifyPlugins('afterEvent', args, eventFilter);\n    if (changed || args.changed) {\n      this.render();\n    }\n    return this;\n  }\n  _handleEvent(e, replay, inChartArea) {\n    const {_active: lastActive = [], options} = this;\n    const useFinalPosition = replay;\n    const active = this._getActiveElements(e, lastActive, inChartArea, useFinalPosition);\n    const isClick = _isClickEvent(e);\n    const lastEvent = determineLastEvent(e, this._lastEvent, inChartArea, isClick);\n    if (inChartArea) {\n      this._lastEvent = null;\n      callback(options.onHover, [e, active, this], this);\n      if (isClick) {\n        callback(options.onClick, [e, active, this], this);\n      }\n    }\n    const changed = !_elementsEqual(active, lastActive);\n    if (changed || replay) {\n      this._active = active;\n      this._updateHoverStyles(active, lastActive, replay);\n    }\n    this._lastEvent = lastEvent;\n    return changed;\n  }\n  _getActiveElements(e, lastActive, inChartArea, useFinalPosition) {\n    if (e.type === 'mouseout') {\n      return [];\n    }\n    if (!inChartArea) {\n      return lastActive;\n    }\n    const hoverOptions = this.options.hover;\n    return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);\n  }\n}\nconst invalidatePlugins = () => each(Chart.instances, (chart) => chart._plugins.invalidate());\nconst enumerable = true;\nObject.defineProperties(Chart, {\n  defaults: {\n    enumerable,\n    value: defaults\n  },\n  instances: {\n    enumerable,\n    value: instances\n  },\n  overrides: {\n    enumerable,\n    value: overrides\n  },\n  registry: {\n    enumerable,\n    value: registry\n  },\n  version: {\n    enumerable,\n    value: version\n  },\n  getChart: {\n    enumerable,\n    value: getChart\n  },\n  register: {\n    enumerable,\n    value: (...items) => {\n      registry.add(...items);\n      invalidatePlugins();\n    }\n  },\n  unregister: {\n    enumerable,\n    value: (...items) => {\n      registry.remove(...items);\n      invalidatePlugins();\n    }\n  }\n});\n\nfunction clipArc(ctx, element, endAngle) {\n  const {startAngle, pixelMargin, x, y, outerRadius, innerRadius} = element;\n  let angleMargin = pixelMargin / outerRadius;\n  ctx.beginPath();\n  ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n  if (innerRadius > pixelMargin) {\n    angleMargin = pixelMargin / innerRadius;\n    ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);\n  } else {\n    ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);\n  }\n  ctx.closePath();\n  ctx.clip();\n}\nfunction toRadiusCorners(value) {\n  return _readValueToProps(value, ['outerStart', 'outerEnd', 'innerStart', 'innerEnd']);\n}\nfunction parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta) {\n  const o = toRadiusCorners(arc.options.borderRadius);\n  const halfThickness = (outerRadius - innerRadius) / 2;\n  const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);\n  const computeOuterLimit = (val) => {\n    const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;\n    return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));\n  };\n  return {\n    outerStart: computeOuterLimit(o.outerStart),\n    outerEnd: computeOuterLimit(o.outerEnd),\n    innerStart: _limitValue(o.innerStart, 0, innerLimit),\n    innerEnd: _limitValue(o.innerEnd, 0, innerLimit),\n  };\n}\nfunction rThetaToXY(r, theta, x, y) {\n  return {\n    x: x + r * Math.cos(theta),\n    y: y + r * Math.sin(theta),\n  };\n}\nfunction pathArc(ctx, element, offset, spacing, end, circular) {\n  const {x, y, startAngle: start, pixelMargin, innerRadius: innerR} = element;\n  const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);\n  const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;\n  let spacingOffset = 0;\n  const alpha = end - start;\n  if (spacing) {\n    const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;\n    const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;\n    const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;\n    const adjustedAngle = avNogSpacingRadius !== 0 ? (alpha * avNogSpacingRadius) / (avNogSpacingRadius + spacing) : alpha;\n    spacingOffset = (alpha - adjustedAngle) / 2;\n  }\n  const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;\n  const angleOffset = (alpha - beta) / 2;\n  const startAngle = start + angleOffset + spacingOffset;\n  const endAngle = end - angleOffset - spacingOffset;\n  const {outerStart, outerEnd, innerStart, innerEnd} = parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle);\n  const outerStartAdjustedRadius = outerRadius - outerStart;\n  const outerEndAdjustedRadius = outerRadius - outerEnd;\n  const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;\n  const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;\n  const innerStartAdjustedRadius = innerRadius + innerStart;\n  const innerEndAdjustedRadius = innerRadius + innerEnd;\n  const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;\n  const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;\n  ctx.beginPath();\n  if (circular) {\n    ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerEndAdjustedAngle);\n    if (outerEnd > 0) {\n      const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);\n    }\n    const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);\n    ctx.lineTo(p4.x, p4.y);\n    if (innerEnd > 0) {\n      const pCenter = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);\n    }\n    ctx.arc(x, y, innerRadius, endAngle - (innerEnd / innerRadius), startAngle + (innerStart / innerRadius), true);\n    if (innerStart > 0) {\n      const pCenter = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);\n    }\n    const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);\n    ctx.lineTo(p8.x, p8.y);\n    if (outerStart > 0) {\n      const pCenter = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);\n    }\n  } else {\n    ctx.moveTo(x, y);\n    const outerStartX = Math.cos(outerStartAdjustedAngle) * outerRadius + x;\n    const outerStartY = Math.sin(outerStartAdjustedAngle) * outerRadius + y;\n    ctx.lineTo(outerStartX, outerStartY);\n    const outerEndX = Math.cos(outerEndAdjustedAngle) * outerRadius + x;\n    const outerEndY = Math.sin(outerEndAdjustedAngle) * outerRadius + y;\n    ctx.lineTo(outerEndX, outerEndY);\n  }\n  ctx.closePath();\n}\nfunction drawArc(ctx, element, offset, spacing, circular) {\n  const {fullCircles, startAngle, circumference} = element;\n  let endAngle = element.endAngle;\n  if (fullCircles) {\n    pathArc(ctx, element, offset, spacing, startAngle + TAU, circular);\n    for (let i = 0; i < fullCircles; ++i) {\n      ctx.fill();\n    }\n    if (!isNaN(circumference)) {\n      endAngle = startAngle + circumference % TAU;\n      if (circumference % TAU === 0) {\n        endAngle += TAU;\n      }\n    }\n  }\n  pathArc(ctx, element, offset, spacing, endAngle, circular);\n  ctx.fill();\n  return endAngle;\n}\nfunction drawFullCircleBorders(ctx, element, inner) {\n  const {x, y, startAngle, pixelMargin, fullCircles} = element;\n  const outerRadius = Math.max(element.outerRadius - pixelMargin, 0);\n  const innerRadius = element.innerRadius + pixelMargin;\n  let i;\n  if (inner) {\n    clipArc(ctx, element, startAngle + TAU);\n  }\n  ctx.beginPath();\n  ctx.arc(x, y, innerRadius, startAngle + TAU, startAngle, true);\n  for (i = 0; i < fullCircles; ++i) {\n    ctx.stroke();\n  }\n  ctx.beginPath();\n  ctx.arc(x, y, outerRadius, startAngle, startAngle + TAU);\n  for (i = 0; i < fullCircles; ++i) {\n    ctx.stroke();\n  }\n}\nfunction drawBorder(ctx, element, offset, spacing, endAngle, circular) {\n  const {options} = element;\n  const {borderWidth, borderJoinStyle} = options;\n  const inner = options.borderAlign === 'inner';\n  if (!borderWidth) {\n    return;\n  }\n  if (inner) {\n    ctx.lineWidth = borderWidth * 2;\n    ctx.lineJoin = borderJoinStyle || 'round';\n  } else {\n    ctx.lineWidth = borderWidth;\n    ctx.lineJoin = borderJoinStyle || 'bevel';\n  }\n  if (element.fullCircles) {\n    drawFullCircleBorders(ctx, element, inner);\n  }\n  if (inner) {\n    clipArc(ctx, element, endAngle);\n  }\n  pathArc(ctx, element, offset, spacing, endAngle, circular);\n  ctx.stroke();\n}\nclass ArcElement extends Element {\n  constructor(cfg) {\n    super();\n    this.options = undefined;\n    this.circumference = undefined;\n    this.startAngle = undefined;\n    this.endAngle = undefined;\n    this.innerRadius = undefined;\n    this.outerRadius = undefined;\n    this.pixelMargin = 0;\n    this.fullCircles = 0;\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n  inRange(chartX, chartY, useFinalPosition) {\n    const point = this.getProps(['x', 'y'], useFinalPosition);\n    const {angle, distance} = getAngleFromPoint(point, {x: chartX, y: chartY});\n    const {startAngle, endAngle, innerRadius, outerRadius, circumference} = this.getProps([\n      'startAngle',\n      'endAngle',\n      'innerRadius',\n      'outerRadius',\n      'circumference'\n    ], useFinalPosition);\n    const rAdjust = this.options.spacing / 2;\n    const _circumference = valueOrDefault(circumference, endAngle - startAngle);\n    const betweenAngles = _circumference >= TAU || _angleBetween(angle, startAngle, endAngle);\n    const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);\n    return (betweenAngles && withinRadius);\n  }\n  getCenterPoint(useFinalPosition) {\n    const {x, y, startAngle, endAngle, innerRadius, outerRadius} = this.getProps([\n      'x',\n      'y',\n      'startAngle',\n      'endAngle',\n      'innerRadius',\n      'outerRadius',\n      'circumference',\n    ], useFinalPosition);\n    const {offset, spacing} = this.options;\n    const halfAngle = (startAngle + endAngle) / 2;\n    const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;\n    return {\n      x: x + Math.cos(halfAngle) * halfRadius,\n      y: y + Math.sin(halfAngle) * halfRadius\n    };\n  }\n  tooltipPosition(useFinalPosition) {\n    return this.getCenterPoint(useFinalPosition);\n  }\n  draw(ctx) {\n    const {options, circumference} = this;\n    const offset = (options.offset || 0) / 2;\n    const spacing = (options.spacing || 0) / 2;\n    const circular = options.circular;\n    this.pixelMargin = (options.borderAlign === 'inner') ? 0.33 : 0;\n    this.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;\n    if (circumference === 0 || this.innerRadius < 0 || this.outerRadius < 0) {\n      return;\n    }\n    ctx.save();\n    let radiusOffset = 0;\n    if (offset) {\n      radiusOffset = offset / 2;\n      const halfAngle = (this.startAngle + this.endAngle) / 2;\n      ctx.translate(Math.cos(halfAngle) * radiusOffset, Math.sin(halfAngle) * radiusOffset);\n      if (this.circumference >= PI) {\n        radiusOffset = offset;\n      }\n    }\n    ctx.fillStyle = options.backgroundColor;\n    ctx.strokeStyle = options.borderColor;\n    const endAngle = drawArc(ctx, this, radiusOffset, spacing, circular);\n    drawBorder(ctx, this, radiusOffset, spacing, endAngle, circular);\n    ctx.restore();\n  }\n}\nArcElement.id = 'arc';\nArcElement.defaults = {\n  borderAlign: 'center',\n  borderColor: '#fff',\n  borderJoinStyle: undefined,\n  borderRadius: 0,\n  borderWidth: 2,\n  offset: 0,\n  spacing: 0,\n  angle: undefined,\n  circular: true,\n};\nArcElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor'\n};\n\nfunction setStyle(ctx, options, style = options) {\n  ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);\n  ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));\n  ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);\n  ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);\n  ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);\n  ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);\n}\nfunction lineTo(ctx, previous, target) {\n  ctx.lineTo(target.x, target.y);\n}\nfunction getLineMethod(options) {\n  if (options.stepped) {\n    return _steppedLineTo;\n  }\n  if (options.tension || options.cubicInterpolationMode === 'monotone') {\n    return _bezierCurveTo;\n  }\n  return lineTo;\n}\nfunction pathVars(points, segment, params = {}) {\n  const count = points.length;\n  const {start: paramsStart = 0, end: paramsEnd = count - 1} = params;\n  const {start: segmentStart, end: segmentEnd} = segment;\n  const start = Math.max(paramsStart, segmentStart);\n  const end = Math.min(paramsEnd, segmentEnd);\n  const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;\n  return {\n    count,\n    start,\n    loop: segment.loop,\n    ilen: end < start && !outside ? count + end - start : end - start\n  };\n}\nfunction pathSegment(ctx, line, segment, params) {\n  const {points, options} = line;\n  const {count, start, loop, ilen} = pathVars(points, segment, params);\n  const lineMethod = getLineMethod(options);\n  let {move = true, reverse} = params || {};\n  let i, point, prev;\n  for (i = 0; i <= ilen; ++i) {\n    point = points[(start + (reverse ? ilen - i : i)) % count];\n    if (point.skip) {\n      continue;\n    } else if (move) {\n      ctx.moveTo(point.x, point.y);\n      move = false;\n    } else {\n      lineMethod(ctx, prev, point, reverse, options.stepped);\n    }\n    prev = point;\n  }\n  if (loop) {\n    point = points[(start + (reverse ? ilen : 0)) % count];\n    lineMethod(ctx, prev, point, reverse, options.stepped);\n  }\n  return !!loop;\n}\nfunction fastPathSegment(ctx, line, segment, params) {\n  const points = line.points;\n  const {count, start, ilen} = pathVars(points, segment, params);\n  const {move = true, reverse} = params || {};\n  let avgX = 0;\n  let countX = 0;\n  let i, point, prevX, minY, maxY, lastY;\n  const pointIndex = (index) => (start + (reverse ? ilen - index : index)) % count;\n  const drawX = () => {\n    if (minY !== maxY) {\n      ctx.lineTo(avgX, maxY);\n      ctx.lineTo(avgX, minY);\n      ctx.lineTo(avgX, lastY);\n    }\n  };\n  if (move) {\n    point = points[pointIndex(0)];\n    ctx.moveTo(point.x, point.y);\n  }\n  for (i = 0; i <= ilen; ++i) {\n    point = points[pointIndex(i)];\n    if (point.skip) {\n      continue;\n    }\n    const x = point.x;\n    const y = point.y;\n    const truncX = x | 0;\n    if (truncX === prevX) {\n      if (y < minY) {\n        minY = y;\n      } else if (y > maxY) {\n        maxY = y;\n      }\n      avgX = (countX * avgX + x) / ++countX;\n    } else {\n      drawX();\n      ctx.lineTo(x, y);\n      prevX = truncX;\n      countX = 0;\n      minY = maxY = y;\n    }\n    lastY = y;\n  }\n  drawX();\n}\nfunction _getSegmentMethod(line) {\n  const opts = line.options;\n  const borderDash = opts.borderDash && opts.borderDash.length;\n  const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;\n  return useFastPath ? fastPathSegment : pathSegment;\n}\nfunction _getInterpolationMethod(options) {\n  if (options.stepped) {\n    return _steppedInterpolation;\n  }\n  if (options.tension || options.cubicInterpolationMode === 'monotone') {\n    return _bezierInterpolation;\n  }\n  return _pointInLine;\n}\nfunction strokePathWithCache(ctx, line, start, count) {\n  let path = line._path;\n  if (!path) {\n    path = line._path = new Path2D();\n    if (line.path(path, start, count)) {\n      path.closePath();\n    }\n  }\n  setStyle(ctx, line.options);\n  ctx.stroke(path);\n}\nfunction strokePathDirect(ctx, line, start, count) {\n  const {segments, options} = line;\n  const segmentMethod = _getSegmentMethod(line);\n  for (const segment of segments) {\n    setStyle(ctx, options, segment.style);\n    ctx.beginPath();\n    if (segmentMethod(ctx, line, segment, {start, end: start + count - 1})) {\n      ctx.closePath();\n    }\n    ctx.stroke();\n  }\n}\nconst usePath2D = typeof Path2D === 'function';\nfunction draw(ctx, line, start, count) {\n  if (usePath2D && !line.options.segment) {\n    strokePathWithCache(ctx, line, start, count);\n  } else {\n    strokePathDirect(ctx, line, start, count);\n  }\n}\nclass LineElement extends Element {\n  constructor(cfg) {\n    super();\n    this.animated = true;\n    this.options = undefined;\n    this._chart = undefined;\n    this._loop = undefined;\n    this._fullLoop = undefined;\n    this._path = undefined;\n    this._points = undefined;\n    this._segments = undefined;\n    this._decimated = false;\n    this._pointsUpdated = false;\n    this._datasetIndex = undefined;\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n  updateControlPoints(chartArea, indexAxis) {\n    const options = this.options;\n    if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !this._pointsUpdated) {\n      const loop = options.spanGaps ? this._loop : this._fullLoop;\n      _updateBezierControlPoints(this._points, options, chartArea, loop, indexAxis);\n      this._pointsUpdated = true;\n    }\n  }\n  set points(points) {\n    this._points = points;\n    delete this._segments;\n    delete this._path;\n    this._pointsUpdated = false;\n  }\n  get points() {\n    return this._points;\n  }\n  get segments() {\n    return this._segments || (this._segments = _computeSegments(this, this.options.segment));\n  }\n  first() {\n    const segments = this.segments;\n    const points = this.points;\n    return segments.length && points[segments[0].start];\n  }\n  last() {\n    const segments = this.segments;\n    const points = this.points;\n    const count = segments.length;\n    return count && points[segments[count - 1].end];\n  }\n  interpolate(point, property) {\n    const options = this.options;\n    const value = point[property];\n    const points = this.points;\n    const segments = _boundSegments(this, {property, start: value, end: value});\n    if (!segments.length) {\n      return;\n    }\n    const result = [];\n    const _interpolate = _getInterpolationMethod(options);\n    let i, ilen;\n    for (i = 0, ilen = segments.length; i < ilen; ++i) {\n      const {start, end} = segments[i];\n      const p1 = points[start];\n      const p2 = points[end];\n      if (p1 === p2) {\n        result.push(p1);\n        continue;\n      }\n      const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));\n      const interpolated = _interpolate(p1, p2, t, options.stepped);\n      interpolated[property] = point[property];\n      result.push(interpolated);\n    }\n    return result.length === 1 ? result[0] : result;\n  }\n  pathSegment(ctx, segment, params) {\n    const segmentMethod = _getSegmentMethod(this);\n    return segmentMethod(ctx, this, segment, params);\n  }\n  path(ctx, start, count) {\n    const segments = this.segments;\n    const segmentMethod = _getSegmentMethod(this);\n    let loop = this._loop;\n    start = start || 0;\n    count = count || (this.points.length - start);\n    for (const segment of segments) {\n      loop &= segmentMethod(ctx, this, segment, {start, end: start + count - 1});\n    }\n    return !!loop;\n  }\n  draw(ctx, chartArea, start, count) {\n    const options = this.options || {};\n    const points = this.points || [];\n    if (points.length && options.borderWidth) {\n      ctx.save();\n      draw(ctx, this, start, count);\n      ctx.restore();\n    }\n    if (this.animated) {\n      this._pointsUpdated = false;\n      this._path = undefined;\n    }\n  }\n}\nLineElement.id = 'line';\nLineElement.defaults = {\n  borderCapStyle: 'butt',\n  borderDash: [],\n  borderDashOffset: 0,\n  borderJoinStyle: 'miter',\n  borderWidth: 3,\n  capBezierPoints: true,\n  cubicInterpolationMode: 'default',\n  fill: false,\n  spanGaps: false,\n  stepped: false,\n  tension: 0,\n};\nLineElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor',\n  borderColor: 'borderColor'\n};\nLineElement.descriptors = {\n  _scriptable: true,\n  _indexable: (name) => name !== 'borderDash' && name !== 'fill',\n};\n\nfunction inRange$1(el, pos, axis, useFinalPosition) {\n  const options = el.options;\n  const {[axis]: value} = el.getProps([axis], useFinalPosition);\n  return (Math.abs(pos - value) < options.radius + options.hitRadius);\n}\nclass PointElement extends Element {\n  constructor(cfg) {\n    super();\n    this.options = undefined;\n    this.parsed = undefined;\n    this.skip = undefined;\n    this.stop = undefined;\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n  inRange(mouseX, mouseY, useFinalPosition) {\n    const options = this.options;\n    const {x, y} = this.getProps(['x', 'y'], useFinalPosition);\n    return ((Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2)) < Math.pow(options.hitRadius + options.radius, 2));\n  }\n  inXRange(mouseX, useFinalPosition) {\n    return inRange$1(this, mouseX, 'x', useFinalPosition);\n  }\n  inYRange(mouseY, useFinalPosition) {\n    return inRange$1(this, mouseY, 'y', useFinalPosition);\n  }\n  getCenterPoint(useFinalPosition) {\n    const {x, y} = this.getProps(['x', 'y'], useFinalPosition);\n    return {x, y};\n  }\n  size(options) {\n    options = options || this.options || {};\n    let radius = options.radius || 0;\n    radius = Math.max(radius, radius && options.hoverRadius || 0);\n    const borderWidth = radius && options.borderWidth || 0;\n    return (radius + borderWidth) * 2;\n  }\n  draw(ctx, area) {\n    const options = this.options;\n    if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {\n      return;\n    }\n    ctx.strokeStyle = options.borderColor;\n    ctx.lineWidth = options.borderWidth;\n    ctx.fillStyle = options.backgroundColor;\n    drawPoint(ctx, options, this.x, this.y);\n  }\n  getRange() {\n    const options = this.options || {};\n    return options.radius + options.hitRadius;\n  }\n}\nPointElement.id = 'point';\nPointElement.defaults = {\n  borderWidth: 1,\n  hitRadius: 1,\n  hoverBorderWidth: 1,\n  hoverRadius: 4,\n  pointStyle: 'circle',\n  radius: 3,\n  rotation: 0\n};\nPointElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor',\n  borderColor: 'borderColor'\n};\n\nfunction getBarBounds(bar, useFinalPosition) {\n  const {x, y, base, width, height} = bar.getProps(['x', 'y', 'base', 'width', 'height'], useFinalPosition);\n  let left, right, top, bottom, half;\n  if (bar.horizontal) {\n    half = height / 2;\n    left = Math.min(x, base);\n    right = Math.max(x, base);\n    top = y - half;\n    bottom = y + half;\n  } else {\n    half = width / 2;\n    left = x - half;\n    right = x + half;\n    top = Math.min(y, base);\n    bottom = Math.max(y, base);\n  }\n  return {left, top, right, bottom};\n}\nfunction skipOrLimit(skip, value, min, max) {\n  return skip ? 0 : _limitValue(value, min, max);\n}\nfunction parseBorderWidth(bar, maxW, maxH) {\n  const value = bar.options.borderWidth;\n  const skip = bar.borderSkipped;\n  const o = toTRBL(value);\n  return {\n    t: skipOrLimit(skip.top, o.top, 0, maxH),\n    r: skipOrLimit(skip.right, o.right, 0, maxW),\n    b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),\n    l: skipOrLimit(skip.left, o.left, 0, maxW)\n  };\n}\nfunction parseBorderRadius(bar, maxW, maxH) {\n  const {enableBorderRadius} = bar.getProps(['enableBorderRadius']);\n  const value = bar.options.borderRadius;\n  const o = toTRBLCorners(value);\n  const maxR = Math.min(maxW, maxH);\n  const skip = bar.borderSkipped;\n  const enableBorder = enableBorderRadius || isObject(value);\n  return {\n    topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),\n    topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),\n    bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),\n    bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)\n  };\n}\nfunction boundingRects(bar) {\n  const bounds = getBarBounds(bar);\n  const width = bounds.right - bounds.left;\n  const height = bounds.bottom - bounds.top;\n  const border = parseBorderWidth(bar, width / 2, height / 2);\n  const radius = parseBorderRadius(bar, width / 2, height / 2);\n  return {\n    outer: {\n      x: bounds.left,\n      y: bounds.top,\n      w: width,\n      h: height,\n      radius\n    },\n    inner: {\n      x: bounds.left + border.l,\n      y: bounds.top + border.t,\n      w: width - border.l - border.r,\n      h: height - border.t - border.b,\n      radius: {\n        topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),\n        topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),\n        bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),\n        bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r)),\n      }\n    }\n  };\n}\nfunction inRange(bar, x, y, useFinalPosition) {\n  const skipX = x === null;\n  const skipY = y === null;\n  const skipBoth = skipX && skipY;\n  const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);\n  return bounds\n\t\t&& (skipX || _isBetween(x, bounds.left, bounds.right))\n\t\t&& (skipY || _isBetween(y, bounds.top, bounds.bottom));\n}\nfunction hasRadius(radius) {\n  return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;\n}\nfunction addNormalRectPath(ctx, rect) {\n  ctx.rect(rect.x, rect.y, rect.w, rect.h);\n}\nfunction inflateRect(rect, amount, refRect = {}) {\n  const x = rect.x !== refRect.x ? -amount : 0;\n  const y = rect.y !== refRect.y ? -amount : 0;\n  const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;\n  const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;\n  return {\n    x: rect.x + x,\n    y: rect.y + y,\n    w: rect.w + w,\n    h: rect.h + h,\n    radius: rect.radius\n  };\n}\nclass BarElement extends Element {\n  constructor(cfg) {\n    super();\n    this.options = undefined;\n    this.horizontal = undefined;\n    this.base = undefined;\n    this.width = undefined;\n    this.height = undefined;\n    this.inflateAmount = undefined;\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n  draw(ctx) {\n    const {inflateAmount, options: {borderColor, backgroundColor}} = this;\n    const {inner, outer} = boundingRects(this);\n    const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;\n    ctx.save();\n    if (outer.w !== inner.w || outer.h !== inner.h) {\n      ctx.beginPath();\n      addRectPath(ctx, inflateRect(outer, inflateAmount, inner));\n      ctx.clip();\n      addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));\n      ctx.fillStyle = borderColor;\n      ctx.fill('evenodd');\n    }\n    ctx.beginPath();\n    addRectPath(ctx, inflateRect(inner, inflateAmount));\n    ctx.fillStyle = backgroundColor;\n    ctx.fill();\n    ctx.restore();\n  }\n  inRange(mouseX, mouseY, useFinalPosition) {\n    return inRange(this, mouseX, mouseY, useFinalPosition);\n  }\n  inXRange(mouseX, useFinalPosition) {\n    return inRange(this, mouseX, null, useFinalPosition);\n  }\n  inYRange(mouseY, useFinalPosition) {\n    return inRange(this, null, mouseY, useFinalPosition);\n  }\n  getCenterPoint(useFinalPosition) {\n    const {x, y, base, horizontal} = this.getProps(['x', 'y', 'base', 'horizontal'], useFinalPosition);\n    return {\n      x: horizontal ? (x + base) / 2 : x,\n      y: horizontal ? y : (y + base) / 2\n    };\n  }\n  getRange(axis) {\n    return axis === 'x' ? this.width / 2 : this.height / 2;\n  }\n}\nBarElement.id = 'bar';\nBarElement.defaults = {\n  borderSkipped: 'start',\n  borderWidth: 0,\n  borderRadius: 0,\n  inflateAmount: 'auto',\n  pointStyle: undefined\n};\nBarElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor',\n  borderColor: 'borderColor'\n};\n\nvar elements = /*#__PURE__*/Object.freeze({\n__proto__: null,\nArcElement: ArcElement,\nLineElement: LineElement,\nPointElement: PointElement,\nBarElement: BarElement\n});\n\nfunction lttbDecimation(data, start, count, availableWidth, options) {\n  const samples = options.samples || availableWidth;\n  if (samples >= count) {\n    return data.slice(start, start + count);\n  }\n  const decimated = [];\n  const bucketWidth = (count - 2) / (samples - 2);\n  let sampledIndex = 0;\n  const endIndex = start + count - 1;\n  let a = start;\n  let i, maxAreaPoint, maxArea, area, nextA;\n  decimated[sampledIndex++] = data[a];\n  for (i = 0; i < samples - 2; i++) {\n    let avgX = 0;\n    let avgY = 0;\n    let j;\n    const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;\n    const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;\n    const avgRangeLength = avgRangeEnd - avgRangeStart;\n    for (j = avgRangeStart; j < avgRangeEnd; j++) {\n      avgX += data[j].x;\n      avgY += data[j].y;\n    }\n    avgX /= avgRangeLength;\n    avgY /= avgRangeLength;\n    const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;\n    const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;\n    const {x: pointAx, y: pointAy} = data[a];\n    maxArea = area = -1;\n    for (j = rangeOffs; j < rangeTo; j++) {\n      area = 0.5 * Math.abs(\n        (pointAx - avgX) * (data[j].y - pointAy) -\n        (pointAx - data[j].x) * (avgY - pointAy)\n      );\n      if (area > maxArea) {\n        maxArea = area;\n        maxAreaPoint = data[j];\n        nextA = j;\n      }\n    }\n    decimated[sampledIndex++] = maxAreaPoint;\n    a = nextA;\n  }\n  decimated[sampledIndex++] = data[endIndex];\n  return decimated;\n}\nfunction minMaxDecimation(data, start, count, availableWidth) {\n  let avgX = 0;\n  let countX = 0;\n  let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;\n  const decimated = [];\n  const endIndex = start + count - 1;\n  const xMin = data[start].x;\n  const xMax = data[endIndex].x;\n  const dx = xMax - xMin;\n  for (i = start; i < start + count; ++i) {\n    point = data[i];\n    x = (point.x - xMin) / dx * availableWidth;\n    y = point.y;\n    const truncX = x | 0;\n    if (truncX === prevX) {\n      if (y < minY) {\n        minY = y;\n        minIndex = i;\n      } else if (y > maxY) {\n        maxY = y;\n        maxIndex = i;\n      }\n      avgX = (countX * avgX + point.x) / ++countX;\n    } else {\n      const lastIndex = i - 1;\n      if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {\n        const intermediateIndex1 = Math.min(minIndex, maxIndex);\n        const intermediateIndex2 = Math.max(minIndex, maxIndex);\n        if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {\n          decimated.push({\n            ...data[intermediateIndex1],\n            x: avgX,\n          });\n        }\n        if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {\n          decimated.push({\n            ...data[intermediateIndex2],\n            x: avgX\n          });\n        }\n      }\n      if (i > 0 && lastIndex !== startIndex) {\n        decimated.push(data[lastIndex]);\n      }\n      decimated.push(point);\n      prevX = truncX;\n      countX = 0;\n      minY = maxY = y;\n      minIndex = maxIndex = startIndex = i;\n    }\n  }\n  return decimated;\n}\nfunction cleanDecimatedDataset(dataset) {\n  if (dataset._decimated) {\n    const data = dataset._data;\n    delete dataset._decimated;\n    delete dataset._data;\n    Object.defineProperty(dataset, 'data', {value: data});\n  }\n}\nfunction cleanDecimatedData(chart) {\n  chart.data.datasets.forEach((dataset) => {\n    cleanDecimatedDataset(dataset);\n  });\n}\nfunction getStartAndCountOfVisiblePointsSimplified(meta, points) {\n  const pointCount = points.length;\n  let start = 0;\n  let count;\n  const {iScale} = meta;\n  const {min, max, minDefined, maxDefined} = iScale.getUserBounds();\n  if (minDefined) {\n    start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);\n  }\n  if (maxDefined) {\n    count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;\n  } else {\n    count = pointCount - start;\n  }\n  return {start, count};\n}\nvar plugin_decimation = {\n  id: 'decimation',\n  defaults: {\n    algorithm: 'min-max',\n    enabled: false,\n  },\n  beforeElementsUpdate: (chart, args, options) => {\n    if (!options.enabled) {\n      cleanDecimatedData(chart);\n      return;\n    }\n    const availableWidth = chart.width;\n    chart.data.datasets.forEach((dataset, datasetIndex) => {\n      const {_data, indexAxis} = dataset;\n      const meta = chart.getDatasetMeta(datasetIndex);\n      const data = _data || dataset.data;\n      if (resolve([indexAxis, chart.options.indexAxis]) === 'y') {\n        return;\n      }\n      if (!meta.controller.supportsDecimation) {\n        return;\n      }\n      const xAxis = chart.scales[meta.xAxisID];\n      if (xAxis.type !== 'linear' && xAxis.type !== 'time') {\n        return;\n      }\n      if (chart.options.parsing) {\n        return;\n      }\n      let {start, count} = getStartAndCountOfVisiblePointsSimplified(meta, data);\n      const threshold = options.threshold || 4 * availableWidth;\n      if (count <= threshold) {\n        cleanDecimatedDataset(dataset);\n        return;\n      }\n      if (isNullOrUndef(_data)) {\n        dataset._data = data;\n        delete dataset.data;\n        Object.defineProperty(dataset, 'data', {\n          configurable: true,\n          enumerable: true,\n          get: function() {\n            return this._decimated;\n          },\n          set: function(d) {\n            this._data = d;\n          }\n        });\n      }\n      let decimated;\n      switch (options.algorithm) {\n      case 'lttb':\n        decimated = lttbDecimation(data, start, count, availableWidth, options);\n        break;\n      case 'min-max':\n        decimated = minMaxDecimation(data, start, count, availableWidth);\n        break;\n      default:\n        throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);\n      }\n      dataset._decimated = decimated;\n    });\n  },\n  destroy(chart) {\n    cleanDecimatedData(chart);\n  }\n};\n\nfunction _segments(line, target, property) {\n  const segments = line.segments;\n  const points = line.points;\n  const tpoints = target.points;\n  const parts = [];\n  for (const segment of segments) {\n    let {start, end} = segment;\n    end = _findSegmentEnd(start, end, points);\n    const bounds = _getBounds(property, points[start], points[end], segment.loop);\n    if (!target.segments) {\n      parts.push({\n        source: segment,\n        target: bounds,\n        start: points[start],\n        end: points[end]\n      });\n      continue;\n    }\n    const targetSegments = _boundSegments(target, bounds);\n    for (const tgt of targetSegments) {\n      const subBounds = _getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);\n      const fillSources = _boundSegment(segment, points, subBounds);\n      for (const fillSource of fillSources) {\n        parts.push({\n          source: fillSource,\n          target: tgt,\n          start: {\n            [property]: _getEdge(bounds, subBounds, 'start', Math.max)\n          },\n          end: {\n            [property]: _getEdge(bounds, subBounds, 'end', Math.min)\n          }\n        });\n      }\n    }\n  }\n  return parts;\n}\nfunction _getBounds(property, first, last, loop) {\n  if (loop) {\n    return;\n  }\n  let start = first[property];\n  let end = last[property];\n  if (property === 'angle') {\n    start = _normalizeAngle(start);\n    end = _normalizeAngle(end);\n  }\n  return {property, start, end};\n}\nfunction _pointsFromSegments(boundary, line) {\n  const {x = null, y = null} = boundary || {};\n  const linePoints = line.points;\n  const points = [];\n  line.segments.forEach(({start, end}) => {\n    end = _findSegmentEnd(start, end, linePoints);\n    const first = linePoints[start];\n    const last = linePoints[end];\n    if (y !== null) {\n      points.push({x: first.x, y});\n      points.push({x: last.x, y});\n    } else if (x !== null) {\n      points.push({x, y: first.y});\n      points.push({x, y: last.y});\n    }\n  });\n  return points;\n}\nfunction _findSegmentEnd(start, end, points) {\n  for (;end > start; end--) {\n    const point = points[end];\n    if (!isNaN(point.x) && !isNaN(point.y)) {\n      break;\n    }\n  }\n  return end;\n}\nfunction _getEdge(a, b, prop, fn) {\n  if (a && b) {\n    return fn(a[prop], b[prop]);\n  }\n  return a ? a[prop] : b ? b[prop] : 0;\n}\n\nfunction _createBoundaryLine(boundary, line) {\n  let points = [];\n  let _loop = false;\n  if (isArray(boundary)) {\n    _loop = true;\n    points = boundary;\n  } else {\n    points = _pointsFromSegments(boundary, line);\n  }\n  return points.length ? new LineElement({\n    points,\n    options: {tension: 0},\n    _loop,\n    _fullLoop: _loop\n  }) : null;\n}\nfunction _shouldApplyFill(source) {\n  return source && source.fill !== false;\n}\n\nfunction _resolveTarget(sources, index, propagate) {\n  const source = sources[index];\n  let fill = source.fill;\n  const visited = [index];\n  let target;\n  if (!propagate) {\n    return fill;\n  }\n  while (fill !== false && visited.indexOf(fill) === -1) {\n    if (!isNumberFinite(fill)) {\n      return fill;\n    }\n    target = sources[fill];\n    if (!target) {\n      return false;\n    }\n    if (target.visible) {\n      return fill;\n    }\n    visited.push(fill);\n    fill = target.fill;\n  }\n  return false;\n}\nfunction _decodeFill(line, index, count) {\n  const fill = parseFillOption(line);\n  if (isObject(fill)) {\n    return isNaN(fill.value) ? false : fill;\n  }\n  let target = parseFloat(fill);\n  if (isNumberFinite(target) && Math.floor(target) === target) {\n    return decodeTargetIndex(fill[0], index, target, count);\n  }\n  return ['origin', 'start', 'end', 'stack', 'shape'].indexOf(fill) >= 0 && fill;\n}\nfunction decodeTargetIndex(firstCh, index, target, count) {\n  if (firstCh === '-' || firstCh === '+') {\n    target = index + target;\n  }\n  if (target === index || target < 0 || target >= count) {\n    return false;\n  }\n  return target;\n}\nfunction _getTargetPixel(fill, scale) {\n  let pixel = null;\n  if (fill === 'start') {\n    pixel = scale.bottom;\n  } else if (fill === 'end') {\n    pixel = scale.top;\n  } else if (isObject(fill)) {\n    pixel = scale.getPixelForValue(fill.value);\n  } else if (scale.getBasePixel) {\n    pixel = scale.getBasePixel();\n  }\n  return pixel;\n}\nfunction _getTargetValue(fill, scale, startValue) {\n  let value;\n  if (fill === 'start') {\n    value = startValue;\n  } else if (fill === 'end') {\n    value = scale.options.reverse ? scale.min : scale.max;\n  } else if (isObject(fill)) {\n    value = fill.value;\n  } else {\n    value = scale.getBaseValue();\n  }\n  return value;\n}\nfunction parseFillOption(line) {\n  const options = line.options;\n  const fillOption = options.fill;\n  let fill = valueOrDefault(fillOption && fillOption.target, fillOption);\n  if (fill === undefined) {\n    fill = !!options.backgroundColor;\n  }\n  if (fill === false || fill === null) {\n    return false;\n  }\n  if (fill === true) {\n    return 'origin';\n  }\n  return fill;\n}\n\nfunction _buildStackLine(source) {\n  const {scale, index, line} = source;\n  const points = [];\n  const segments = line.segments;\n  const sourcePoints = line.points;\n  const linesBelow = getLinesBelow(scale, index);\n  linesBelow.push(_createBoundaryLine({x: null, y: scale.bottom}, line));\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n    for (let j = segment.start; j <= segment.end; j++) {\n      addPointsBelow(points, sourcePoints[j], linesBelow);\n    }\n  }\n  return new LineElement({points, options: {}});\n}\nfunction getLinesBelow(scale, index) {\n  const below = [];\n  const metas = scale.getMatchingVisibleMetas('line');\n  for (let i = 0; i < metas.length; i++) {\n    const meta = metas[i];\n    if (meta.index === index) {\n      break;\n    }\n    if (!meta.hidden) {\n      below.unshift(meta.dataset);\n    }\n  }\n  return below;\n}\nfunction addPointsBelow(points, sourcePoint, linesBelow) {\n  const postponed = [];\n  for (let j = 0; j < linesBelow.length; j++) {\n    const line = linesBelow[j];\n    const {first, last, point} = findPoint(line, sourcePoint, 'x');\n    if (!point || (first && last)) {\n      continue;\n    }\n    if (first) {\n      postponed.unshift(point);\n    } else {\n      points.push(point);\n      if (!last) {\n        break;\n      }\n    }\n  }\n  points.push(...postponed);\n}\nfunction findPoint(line, sourcePoint, property) {\n  const point = line.interpolate(sourcePoint, property);\n  if (!point) {\n    return {};\n  }\n  const pointValue = point[property];\n  const segments = line.segments;\n  const linePoints = line.points;\n  let first = false;\n  let last = false;\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n    const firstValue = linePoints[segment.start][property];\n    const lastValue = linePoints[segment.end][property];\n    if (_isBetween(pointValue, firstValue, lastValue)) {\n      first = pointValue === firstValue;\n      last = pointValue === lastValue;\n      break;\n    }\n  }\n  return {first, last, point};\n}\n\nclass simpleArc {\n  constructor(opts) {\n    this.x = opts.x;\n    this.y = opts.y;\n    this.radius = opts.radius;\n  }\n  pathSegment(ctx, bounds, opts) {\n    const {x, y, radius} = this;\n    bounds = bounds || {start: 0, end: TAU};\n    ctx.arc(x, y, radius, bounds.end, bounds.start, true);\n    return !opts.bounds;\n  }\n  interpolate(point) {\n    const {x, y, radius} = this;\n    const angle = point.angle;\n    return {\n      x: x + Math.cos(angle) * radius,\n      y: y + Math.sin(angle) * radius,\n      angle\n    };\n  }\n}\n\nfunction _getTarget(source) {\n  const {chart, fill, line} = source;\n  if (isNumberFinite(fill)) {\n    return getLineByIndex(chart, fill);\n  }\n  if (fill === 'stack') {\n    return _buildStackLine(source);\n  }\n  if (fill === 'shape') {\n    return true;\n  }\n  const boundary = computeBoundary(source);\n  if (boundary instanceof simpleArc) {\n    return boundary;\n  }\n  return _createBoundaryLine(boundary, line);\n}\nfunction getLineByIndex(chart, index) {\n  const meta = chart.getDatasetMeta(index);\n  const visible = meta && chart.isDatasetVisible(index);\n  return visible ? meta.dataset : null;\n}\nfunction computeBoundary(source) {\n  const scale = source.scale || {};\n  if (scale.getPointPositionForValue) {\n    return computeCircularBoundary(source);\n  }\n  return computeLinearBoundary(source);\n}\nfunction computeLinearBoundary(source) {\n  const {scale = {}, fill} = source;\n  const pixel = _getTargetPixel(fill, scale);\n  if (isNumberFinite(pixel)) {\n    const horizontal = scale.isHorizontal();\n    return {\n      x: horizontal ? pixel : null,\n      y: horizontal ? null : pixel\n    };\n  }\n  return null;\n}\nfunction computeCircularBoundary(source) {\n  const {scale, fill} = source;\n  const options = scale.options;\n  const length = scale.getLabels().length;\n  const start = options.reverse ? scale.max : scale.min;\n  const value = _getTargetValue(fill, scale, start);\n  const target = [];\n  if (options.grid.circular) {\n    const center = scale.getPointPositionForValue(0, start);\n    return new simpleArc({\n      x: center.x,\n      y: center.y,\n      radius: scale.getDistanceFromCenterForValue(value)\n    });\n  }\n  for (let i = 0; i < length; ++i) {\n    target.push(scale.getPointPositionForValue(i, value));\n  }\n  return target;\n}\n\nfunction _drawfill(ctx, source, area) {\n  const target = _getTarget(source);\n  const {line, scale, axis} = source;\n  const lineOpts = line.options;\n  const fillOption = lineOpts.fill;\n  const color = lineOpts.backgroundColor;\n  const {above = color, below = color} = fillOption || {};\n  if (target && line.points.length) {\n    clipArea(ctx, area);\n    doFill(ctx, {line, target, above, below, area, scale, axis});\n    unclipArea(ctx);\n  }\n}\nfunction doFill(ctx, cfg) {\n  const {line, target, above, below, area, scale} = cfg;\n  const property = line._loop ? 'angle' : cfg.axis;\n  ctx.save();\n  if (property === 'x' && below !== above) {\n    clipVertical(ctx, target, area.top);\n    fill(ctx, {line, target, color: above, scale, property});\n    ctx.restore();\n    ctx.save();\n    clipVertical(ctx, target, area.bottom);\n  }\n  fill(ctx, {line, target, color: below, scale, property});\n  ctx.restore();\n}\nfunction clipVertical(ctx, target, clipY) {\n  const {segments, points} = target;\n  let first = true;\n  let lineLoop = false;\n  ctx.beginPath();\n  for (const segment of segments) {\n    const {start, end} = segment;\n    const firstPoint = points[start];\n    const lastPoint = points[_findSegmentEnd(start, end, points)];\n    if (first) {\n      ctx.moveTo(firstPoint.x, firstPoint.y);\n      first = false;\n    } else {\n      ctx.lineTo(firstPoint.x, clipY);\n      ctx.lineTo(firstPoint.x, firstPoint.y);\n    }\n    lineLoop = !!target.pathSegment(ctx, segment, {move: lineLoop});\n    if (lineLoop) {\n      ctx.closePath();\n    } else {\n      ctx.lineTo(lastPoint.x, clipY);\n    }\n  }\n  ctx.lineTo(target.first().x, clipY);\n  ctx.closePath();\n  ctx.clip();\n}\nfunction fill(ctx, cfg) {\n  const {line, target, property, color, scale} = cfg;\n  const segments = _segments(line, target, property);\n  for (const {source: src, target: tgt, start, end} of segments) {\n    const {style: {backgroundColor = color} = {}} = src;\n    const notShape = target !== true;\n    ctx.save();\n    ctx.fillStyle = backgroundColor;\n    clipBounds(ctx, scale, notShape && _getBounds(property, start, end));\n    ctx.beginPath();\n    const lineLoop = !!line.pathSegment(ctx, src);\n    let loop;\n    if (notShape) {\n      if (lineLoop) {\n        ctx.closePath();\n      } else {\n        interpolatedLineTo(ctx, target, end, property);\n      }\n      const targetLoop = !!target.pathSegment(ctx, tgt, {move: lineLoop, reverse: true});\n      loop = lineLoop && targetLoop;\n      if (!loop) {\n        interpolatedLineTo(ctx, target, start, property);\n      }\n    }\n    ctx.closePath();\n    ctx.fill(loop ? 'evenodd' : 'nonzero');\n    ctx.restore();\n  }\n}\nfunction clipBounds(ctx, scale, bounds) {\n  const {top, bottom} = scale.chart.chartArea;\n  const {property, start, end} = bounds || {};\n  if (property === 'x') {\n    ctx.beginPath();\n    ctx.rect(start, top, end - start, bottom - top);\n    ctx.clip();\n  }\n}\nfunction interpolatedLineTo(ctx, target, point, property) {\n  const interpolatedPoint = target.interpolate(point, property);\n  if (interpolatedPoint) {\n    ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);\n  }\n}\n\nvar index = {\n  id: 'filler',\n  afterDatasetsUpdate(chart, _args, options) {\n    const count = (chart.data.datasets || []).length;\n    const sources = [];\n    let meta, i, line, source;\n    for (i = 0; i < count; ++i) {\n      meta = chart.getDatasetMeta(i);\n      line = meta.dataset;\n      source = null;\n      if (line && line.options && line instanceof LineElement) {\n        source = {\n          visible: chart.isDatasetVisible(i),\n          index: i,\n          fill: _decodeFill(line, i, count),\n          chart,\n          axis: meta.controller.options.indexAxis,\n          scale: meta.vScale,\n          line,\n        };\n      }\n      meta.$filler = source;\n      sources.push(source);\n    }\n    for (i = 0; i < count; ++i) {\n      source = sources[i];\n      if (!source || source.fill === false) {\n        continue;\n      }\n      source.fill = _resolveTarget(sources, i, options.propagate);\n    }\n  },\n  beforeDraw(chart, _args, options) {\n    const draw = options.drawTime === 'beforeDraw';\n    const metasets = chart.getSortedVisibleDatasetMetas();\n    const area = chart.chartArea;\n    for (let i = metasets.length - 1; i >= 0; --i) {\n      const source = metasets[i].$filler;\n      if (!source) {\n        continue;\n      }\n      source.line.updateControlPoints(area, source.axis);\n      if (draw && source.fill) {\n        _drawfill(chart.ctx, source, area);\n      }\n    }\n  },\n  beforeDatasetsDraw(chart, _args, options) {\n    if (options.drawTime !== 'beforeDatasetsDraw') {\n      return;\n    }\n    const metasets = chart.getSortedVisibleDatasetMetas();\n    for (let i = metasets.length - 1; i >= 0; --i) {\n      const source = metasets[i].$filler;\n      if (_shouldApplyFill(source)) {\n        _drawfill(chart.ctx, source, chart.chartArea);\n      }\n    }\n  },\n  beforeDatasetDraw(chart, args, options) {\n    const source = args.meta.$filler;\n    if (!_shouldApplyFill(source) || options.drawTime !== 'beforeDatasetDraw') {\n      return;\n    }\n    _drawfill(chart.ctx, source, chart.chartArea);\n  },\n  defaults: {\n    propagate: true,\n    drawTime: 'beforeDatasetDraw'\n  }\n};\n\nconst getBoxSize = (labelOpts, fontSize) => {\n  let {boxHeight = fontSize, boxWidth = fontSize} = labelOpts;\n  if (labelOpts.usePointStyle) {\n    boxHeight = Math.min(boxHeight, fontSize);\n    boxWidth = labelOpts.pointStyleWidth || Math.min(boxWidth, fontSize);\n  }\n  return {\n    boxWidth,\n    boxHeight,\n    itemHeight: Math.max(fontSize, boxHeight)\n  };\n};\nconst itemsEqual = (a, b) => a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;\nclass Legend extends Element {\n  constructor(config) {\n    super();\n    this._added = false;\n    this.legendHitBoxes = [];\n    this._hoveredItem = null;\n    this.doughnutMode = false;\n    this.chart = config.chart;\n    this.options = config.options;\n    this.ctx = config.ctx;\n    this.legendItems = undefined;\n    this.columnSizes = undefined;\n    this.lineWidths = undefined;\n    this.maxHeight = undefined;\n    this.maxWidth = undefined;\n    this.top = undefined;\n    this.bottom = undefined;\n    this.left = undefined;\n    this.right = undefined;\n    this.height = undefined;\n    this.width = undefined;\n    this._margins = undefined;\n    this.position = undefined;\n    this.weight = undefined;\n    this.fullSize = undefined;\n  }\n  update(maxWidth, maxHeight, margins) {\n    this.maxWidth = maxWidth;\n    this.maxHeight = maxHeight;\n    this._margins = margins;\n    this.setDimensions();\n    this.buildLabels();\n    this.fit();\n  }\n  setDimensions() {\n    if (this.isHorizontal()) {\n      this.width = this.maxWidth;\n      this.left = this._margins.left;\n      this.right = this.width;\n    } else {\n      this.height = this.maxHeight;\n      this.top = this._margins.top;\n      this.bottom = this.height;\n    }\n  }\n  buildLabels() {\n    const labelOpts = this.options.labels || {};\n    let legendItems = callback(labelOpts.generateLabels, [this.chart], this) || [];\n    if (labelOpts.filter) {\n      legendItems = legendItems.filter((item) => labelOpts.filter(item, this.chart.data));\n    }\n    if (labelOpts.sort) {\n      legendItems = legendItems.sort((a, b) => labelOpts.sort(a, b, this.chart.data));\n    }\n    if (this.options.reverse) {\n      legendItems.reverse();\n    }\n    this.legendItems = legendItems;\n  }\n  fit() {\n    const {options, ctx} = this;\n    if (!options.display) {\n      this.width = this.height = 0;\n      return;\n    }\n    const labelOpts = options.labels;\n    const labelFont = toFont(labelOpts.font);\n    const fontSize = labelFont.size;\n    const titleHeight = this._computeTitleHeight();\n    const {boxWidth, itemHeight} = getBoxSize(labelOpts, fontSize);\n    let width, height;\n    ctx.font = labelFont.string;\n    if (this.isHorizontal()) {\n      width = this.maxWidth;\n      height = this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n    } else {\n      height = this.maxHeight;\n      width = this._fitCols(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n    }\n    this.width = Math.min(width, options.maxWidth || this.maxWidth);\n    this.height = Math.min(height, options.maxHeight || this.maxHeight);\n  }\n  _fitRows(titleHeight, fontSize, boxWidth, itemHeight) {\n    const {ctx, maxWidth, options: {labels: {padding}}} = this;\n    const hitboxes = this.legendHitBoxes = [];\n    const lineWidths = this.lineWidths = [0];\n    const lineHeight = itemHeight + padding;\n    let totalHeight = titleHeight;\n    ctx.textAlign = 'left';\n    ctx.textBaseline = 'middle';\n    let row = -1;\n    let top = -lineHeight;\n    this.legendItems.forEach((legendItem, i) => {\n      const itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\n      if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {\n        totalHeight += lineHeight;\n        lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\n        top += lineHeight;\n        row++;\n      }\n      hitboxes[i] = {left: 0, top, row, width: itemWidth, height: itemHeight};\n      lineWidths[lineWidths.length - 1] += itemWidth + padding;\n    });\n    return totalHeight;\n  }\n  _fitCols(titleHeight, fontSize, boxWidth, itemHeight) {\n    const {ctx, maxHeight, options: {labels: {padding}}} = this;\n    const hitboxes = this.legendHitBoxes = [];\n    const columnSizes = this.columnSizes = [];\n    const heightLimit = maxHeight - titleHeight;\n    let totalWidth = padding;\n    let currentColWidth = 0;\n    let currentColHeight = 0;\n    let left = 0;\n    let col = 0;\n    this.legendItems.forEach((legendItem, i) => {\n      const itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\n      if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {\n        totalWidth += currentColWidth + padding;\n        columnSizes.push({width: currentColWidth, height: currentColHeight});\n        left += currentColWidth + padding;\n        col++;\n        currentColWidth = currentColHeight = 0;\n      }\n      hitboxes[i] = {left, top: currentColHeight, col, width: itemWidth, height: itemHeight};\n      currentColWidth = Math.max(currentColWidth, itemWidth);\n      currentColHeight += itemHeight + padding;\n    });\n    totalWidth += currentColWidth;\n    columnSizes.push({width: currentColWidth, height: currentColHeight});\n    return totalWidth;\n  }\n  adjustHitBoxes() {\n    if (!this.options.display) {\n      return;\n    }\n    const titleHeight = this._computeTitleHeight();\n    const {legendHitBoxes: hitboxes, options: {align, labels: {padding}, rtl}} = this;\n    const rtlHelper = getRtlAdapter(rtl, this.left, this.width);\n    if (this.isHorizontal()) {\n      let row = 0;\n      let left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n      for (const hitbox of hitboxes) {\n        if (row !== hitbox.row) {\n          row = hitbox.row;\n          left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n        }\n        hitbox.top += this.top + titleHeight + padding;\n        hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);\n        left += hitbox.width + padding;\n      }\n    } else {\n      let col = 0;\n      let top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n      for (const hitbox of hitboxes) {\n        if (hitbox.col !== col) {\n          col = hitbox.col;\n          top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n        }\n        hitbox.top = top;\n        hitbox.left += this.left + padding;\n        hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);\n        top += hitbox.height + padding;\n      }\n    }\n  }\n  isHorizontal() {\n    return this.options.position === 'top' || this.options.position === 'bottom';\n  }\n  draw() {\n    if (this.options.display) {\n      const ctx = this.ctx;\n      clipArea(ctx, this);\n      this._draw();\n      unclipArea(ctx);\n    }\n  }\n  _draw() {\n    const {options: opts, columnSizes, lineWidths, ctx} = this;\n    const {align, labels: labelOpts} = opts;\n    const defaultColor = defaults.color;\n    const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n    const labelFont = toFont(labelOpts.font);\n    const {color: fontColor, padding} = labelOpts;\n    const fontSize = labelFont.size;\n    const halfFontSize = fontSize / 2;\n    let cursor;\n    this.drawTitle();\n    ctx.textAlign = rtlHelper.textAlign('left');\n    ctx.textBaseline = 'middle';\n    ctx.lineWidth = 0.5;\n    ctx.font = labelFont.string;\n    const {boxWidth, boxHeight, itemHeight} = getBoxSize(labelOpts, fontSize);\n    const drawLegendBox = function(x, y, legendItem) {\n      if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {\n        return;\n      }\n      ctx.save();\n      const lineWidth = valueOrDefault(legendItem.lineWidth, 1);\n      ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);\n      ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');\n      ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);\n      ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');\n      ctx.lineWidth = lineWidth;\n      ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);\n      ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));\n      if (labelOpts.usePointStyle) {\n        const drawOptions = {\n          radius: boxHeight * Math.SQRT2 / 2,\n          pointStyle: legendItem.pointStyle,\n          rotation: legendItem.rotation,\n          borderWidth: lineWidth\n        };\n        const centerX = rtlHelper.xPlus(x, boxWidth / 2);\n        const centerY = y + halfFontSize;\n        drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth);\n      } else {\n        const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);\n        const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);\n        const borderRadius = toTRBLCorners(legendItem.borderRadius);\n        ctx.beginPath();\n        if (Object.values(borderRadius).some(v => v !== 0)) {\n          addRoundedRectPath(ctx, {\n            x: xBoxLeft,\n            y: yBoxTop,\n            w: boxWidth,\n            h: boxHeight,\n            radius: borderRadius,\n          });\n        } else {\n          ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);\n        }\n        ctx.fill();\n        if (lineWidth !== 0) {\n          ctx.stroke();\n        }\n      }\n      ctx.restore();\n    };\n    const fillText = function(x, y, legendItem) {\n      renderText(ctx, legendItem.text, x, y + (itemHeight / 2), labelFont, {\n        strikethrough: legendItem.hidden,\n        textAlign: rtlHelper.textAlign(legendItem.textAlign)\n      });\n    };\n    const isHorizontal = this.isHorizontal();\n    const titleHeight = this._computeTitleHeight();\n    if (isHorizontal) {\n      cursor = {\n        x: _alignStartEnd(align, this.left + padding, this.right - lineWidths[0]),\n        y: this.top + padding + titleHeight,\n        line: 0\n      };\n    } else {\n      cursor = {\n        x: this.left + padding,\n        y: _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),\n        line: 0\n      };\n    }\n    overrideTextDirection(this.ctx, opts.textDirection);\n    const lineHeight = itemHeight + padding;\n    this.legendItems.forEach((legendItem, i) => {\n      ctx.strokeStyle = legendItem.fontColor || fontColor;\n      ctx.fillStyle = legendItem.fontColor || fontColor;\n      const textWidth = ctx.measureText(legendItem.text).width;\n      const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));\n      const width = boxWidth + halfFontSize + textWidth;\n      let x = cursor.x;\n      let y = cursor.y;\n      rtlHelper.setWidth(this.width);\n      if (isHorizontal) {\n        if (i > 0 && x + width + padding > this.right) {\n          y = cursor.y += lineHeight;\n          cursor.line++;\n          x = cursor.x = _alignStartEnd(align, this.left + padding, this.right - lineWidths[cursor.line]);\n        }\n      } else if (i > 0 && y + lineHeight > this.bottom) {\n        x = cursor.x = x + columnSizes[cursor.line].width + padding;\n        cursor.line++;\n        y = cursor.y = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);\n      }\n      const realX = rtlHelper.x(x);\n      drawLegendBox(realX, y, legendItem);\n      x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : this.right, opts.rtl);\n      fillText(rtlHelper.x(x), y, legendItem);\n      if (isHorizontal) {\n        cursor.x += width + padding;\n      } else {\n        cursor.y += lineHeight;\n      }\n    });\n    restoreTextDirection(this.ctx, opts.textDirection);\n  }\n  drawTitle() {\n    const opts = this.options;\n    const titleOpts = opts.title;\n    const titleFont = toFont(titleOpts.font);\n    const titlePadding = toPadding(titleOpts.padding);\n    if (!titleOpts.display) {\n      return;\n    }\n    const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n    const ctx = this.ctx;\n    const position = titleOpts.position;\n    const halfFontSize = titleFont.size / 2;\n    const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;\n    let y;\n    let left = this.left;\n    let maxWidth = this.width;\n    if (this.isHorizontal()) {\n      maxWidth = Math.max(...this.lineWidths);\n      y = this.top + topPaddingPlusHalfFontSize;\n      left = _alignStartEnd(opts.align, left, this.right - maxWidth);\n    } else {\n      const maxHeight = this.columnSizes.reduce((acc, size) => Math.max(acc, size.height), 0);\n      y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());\n    }\n    const x = _alignStartEnd(position, left, left + maxWidth);\n    ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));\n    ctx.textBaseline = 'middle';\n    ctx.strokeStyle = titleOpts.color;\n    ctx.fillStyle = titleOpts.color;\n    ctx.font = titleFont.string;\n    renderText(ctx, titleOpts.text, x, y, titleFont);\n  }\n  _computeTitleHeight() {\n    const titleOpts = this.options.title;\n    const titleFont = toFont(titleOpts.font);\n    const titlePadding = toPadding(titleOpts.padding);\n    return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;\n  }\n  _getLegendItemAt(x, y) {\n    let i, hitBox, lh;\n    if (_isBetween(x, this.left, this.right)\n      && _isBetween(y, this.top, this.bottom)) {\n      lh = this.legendHitBoxes;\n      for (i = 0; i < lh.length; ++i) {\n        hitBox = lh[i];\n        if (_isBetween(x, hitBox.left, hitBox.left + hitBox.width)\n          && _isBetween(y, hitBox.top, hitBox.top + hitBox.height)) {\n          return this.legendItems[i];\n        }\n      }\n    }\n    return null;\n  }\n  handleEvent(e) {\n    const opts = this.options;\n    if (!isListened(e.type, opts)) {\n      return;\n    }\n    const hoveredItem = this._getLegendItemAt(e.x, e.y);\n    if (e.type === 'mousemove' || e.type === 'mouseout') {\n      const previous = this._hoveredItem;\n      const sameItem = itemsEqual(previous, hoveredItem);\n      if (previous && !sameItem) {\n        callback(opts.onLeave, [e, previous, this], this);\n      }\n      this._hoveredItem = hoveredItem;\n      if (hoveredItem && !sameItem) {\n        callback(opts.onHover, [e, hoveredItem, this], this);\n      }\n    } else if (hoveredItem) {\n      callback(opts.onClick, [e, hoveredItem, this], this);\n    }\n  }\n}\nfunction isListened(type, opts) {\n  if ((type === 'mousemove' || type === 'mouseout') && (opts.onHover || opts.onLeave)) {\n    return true;\n  }\n  if (opts.onClick && (type === 'click' || type === 'mouseup')) {\n    return true;\n  }\n  return false;\n}\nvar plugin_legend = {\n  id: 'legend',\n  _element: Legend,\n  start(chart, _args, options) {\n    const legend = chart.legend = new Legend({ctx: chart.ctx, options, chart});\n    layouts.configure(chart, legend, options);\n    layouts.addBox(chart, legend);\n  },\n  stop(chart) {\n    layouts.removeBox(chart, chart.legend);\n    delete chart.legend;\n  },\n  beforeUpdate(chart, _args, options) {\n    const legend = chart.legend;\n    layouts.configure(chart, legend, options);\n    legend.options = options;\n  },\n  afterUpdate(chart) {\n    const legend = chart.legend;\n    legend.buildLabels();\n    legend.adjustHitBoxes();\n  },\n  afterEvent(chart, args) {\n    if (!args.replay) {\n      chart.legend.handleEvent(args.event);\n    }\n  },\n  defaults: {\n    display: true,\n    position: 'top',\n    align: 'center',\n    fullSize: true,\n    reverse: false,\n    weight: 1000,\n    onClick(e, legendItem, legend) {\n      const index = legendItem.datasetIndex;\n      const ci = legend.chart;\n      if (ci.isDatasetVisible(index)) {\n        ci.hide(index);\n        legendItem.hidden = true;\n      } else {\n        ci.show(index);\n        legendItem.hidden = false;\n      }\n    },\n    onHover: null,\n    onLeave: null,\n    labels: {\n      color: (ctx) => ctx.chart.options.color,\n      boxWidth: 40,\n      padding: 10,\n      generateLabels(chart) {\n        const datasets = chart.data.datasets;\n        const {labels: {usePointStyle, pointStyle, textAlign, color}} = chart.legend.options;\n        return chart._getSortedDatasetMetas().map((meta) => {\n          const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\n          const borderWidth = toPadding(style.borderWidth);\n          return {\n            text: datasets[meta.index].label,\n            fillStyle: style.backgroundColor,\n            fontColor: color,\n            hidden: !meta.visible,\n            lineCap: style.borderCapStyle,\n            lineDash: style.borderDash,\n            lineDashOffset: style.borderDashOffset,\n            lineJoin: style.borderJoinStyle,\n            lineWidth: (borderWidth.width + borderWidth.height) / 4,\n            strokeStyle: style.borderColor,\n            pointStyle: pointStyle || style.pointStyle,\n            rotation: style.rotation,\n            textAlign: textAlign || style.textAlign,\n            borderRadius: 0,\n            datasetIndex: meta.index\n          };\n        }, this);\n      }\n    },\n    title: {\n      color: (ctx) => ctx.chart.options.color,\n      display: false,\n      position: 'center',\n      text: '',\n    }\n  },\n  descriptors: {\n    _scriptable: (name) => !name.startsWith('on'),\n    labels: {\n      _scriptable: (name) => !['generateLabels', 'filter', 'sort'].includes(name),\n    }\n  },\n};\n\nclass Title extends Element {\n  constructor(config) {\n    super();\n    this.chart = config.chart;\n    this.options = config.options;\n    this.ctx = config.ctx;\n    this._padding = undefined;\n    this.top = undefined;\n    this.bottom = undefined;\n    this.left = undefined;\n    this.right = undefined;\n    this.width = undefined;\n    this.height = undefined;\n    this.position = undefined;\n    this.weight = undefined;\n    this.fullSize = undefined;\n  }\n  update(maxWidth, maxHeight) {\n    const opts = this.options;\n    this.left = 0;\n    this.top = 0;\n    if (!opts.display) {\n      this.width = this.height = this.right = this.bottom = 0;\n      return;\n    }\n    this.width = this.right = maxWidth;\n    this.height = this.bottom = maxHeight;\n    const lineCount = isArray(opts.text) ? opts.text.length : 1;\n    this._padding = toPadding(opts.padding);\n    const textSize = lineCount * toFont(opts.font).lineHeight + this._padding.height;\n    if (this.isHorizontal()) {\n      this.height = textSize;\n    } else {\n      this.width = textSize;\n    }\n  }\n  isHorizontal() {\n    const pos = this.options.position;\n    return pos === 'top' || pos === 'bottom';\n  }\n  _drawArgs(offset) {\n    const {top, left, bottom, right, options} = this;\n    const align = options.align;\n    let rotation = 0;\n    let maxWidth, titleX, titleY;\n    if (this.isHorizontal()) {\n      titleX = _alignStartEnd(align, left, right);\n      titleY = top + offset;\n      maxWidth = right - left;\n    } else {\n      if (options.position === 'left') {\n        titleX = left + offset;\n        titleY = _alignStartEnd(align, bottom, top);\n        rotation = PI * -0.5;\n      } else {\n        titleX = right - offset;\n        titleY = _alignStartEnd(align, top, bottom);\n        rotation = PI * 0.5;\n      }\n      maxWidth = bottom - top;\n    }\n    return {titleX, titleY, maxWidth, rotation};\n  }\n  draw() {\n    const ctx = this.ctx;\n    const opts = this.options;\n    if (!opts.display) {\n      return;\n    }\n    const fontOpts = toFont(opts.font);\n    const lineHeight = fontOpts.lineHeight;\n    const offset = lineHeight / 2 + this._padding.top;\n    const {titleX, titleY, maxWidth, rotation} = this._drawArgs(offset);\n    renderText(ctx, opts.text, 0, 0, fontOpts, {\n      color: opts.color,\n      maxWidth,\n      rotation,\n      textAlign: _toLeftRightCenter(opts.align),\n      textBaseline: 'middle',\n      translation: [titleX, titleY],\n    });\n  }\n}\nfunction createTitle(chart, titleOpts) {\n  const title = new Title({\n    ctx: chart.ctx,\n    options: titleOpts,\n    chart\n  });\n  layouts.configure(chart, title, titleOpts);\n  layouts.addBox(chart, title);\n  chart.titleBlock = title;\n}\nvar plugin_title = {\n  id: 'title',\n  _element: Title,\n  start(chart, _args, options) {\n    createTitle(chart, options);\n  },\n  stop(chart) {\n    const titleBlock = chart.titleBlock;\n    layouts.removeBox(chart, titleBlock);\n    delete chart.titleBlock;\n  },\n  beforeUpdate(chart, _args, options) {\n    const title = chart.titleBlock;\n    layouts.configure(chart, title, options);\n    title.options = options;\n  },\n  defaults: {\n    align: 'center',\n    display: false,\n    font: {\n      weight: 'bold',\n    },\n    fullSize: true,\n    padding: 10,\n    position: 'top',\n    text: '',\n    weight: 2000\n  },\n  defaultRoutes: {\n    color: 'color'\n  },\n  descriptors: {\n    _scriptable: true,\n    _indexable: false,\n  },\n};\n\nconst map = new WeakMap();\nvar plugin_subtitle = {\n  id: 'subtitle',\n  start(chart, _args, options) {\n    const title = new Title({\n      ctx: chart.ctx,\n      options,\n      chart\n    });\n    layouts.configure(chart, title, options);\n    layouts.addBox(chart, title);\n    map.set(chart, title);\n  },\n  stop(chart) {\n    layouts.removeBox(chart, map.get(chart));\n    map.delete(chart);\n  },\n  beforeUpdate(chart, _args, options) {\n    const title = map.get(chart);\n    layouts.configure(chart, title, options);\n    title.options = options;\n  },\n  defaults: {\n    align: 'center',\n    display: false,\n    font: {\n      weight: 'normal',\n    },\n    fullSize: true,\n    padding: 0,\n    position: 'top',\n    text: '',\n    weight: 1500\n  },\n  defaultRoutes: {\n    color: 'color'\n  },\n  descriptors: {\n    _scriptable: true,\n    _indexable: false,\n  },\n};\n\nconst positioners = {\n  average(items) {\n    if (!items.length) {\n      return false;\n    }\n    let i, len;\n    let x = 0;\n    let y = 0;\n    let count = 0;\n    for (i = 0, len = items.length; i < len; ++i) {\n      const el = items[i].element;\n      if (el && el.hasValue()) {\n        const pos = el.tooltipPosition();\n        x += pos.x;\n        y += pos.y;\n        ++count;\n      }\n    }\n    return {\n      x: x / count,\n      y: y / count\n    };\n  },\n  nearest(items, eventPosition) {\n    if (!items.length) {\n      return false;\n    }\n    let x = eventPosition.x;\n    let y = eventPosition.y;\n    let minDistance = Number.POSITIVE_INFINITY;\n    let i, len, nearestElement;\n    for (i = 0, len = items.length; i < len; ++i) {\n      const el = items[i].element;\n      if (el && el.hasValue()) {\n        const center = el.getCenterPoint();\n        const d = distanceBetweenPoints(eventPosition, center);\n        if (d < minDistance) {\n          minDistance = d;\n          nearestElement = el;\n        }\n      }\n    }\n    if (nearestElement) {\n      const tp = nearestElement.tooltipPosition();\n      x = tp.x;\n      y = tp.y;\n    }\n    return {\n      x,\n      y\n    };\n  }\n};\nfunction pushOrConcat(base, toPush) {\n  if (toPush) {\n    if (isArray(toPush)) {\n      Array.prototype.push.apply(base, toPush);\n    } else {\n      base.push(toPush);\n    }\n  }\n  return base;\n}\nfunction splitNewlines(str) {\n  if ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\n    return str.split('\\n');\n  }\n  return str;\n}\nfunction createTooltipItem(chart, item) {\n  const {element, datasetIndex, index} = item;\n  const controller = chart.getDatasetMeta(datasetIndex).controller;\n  const {label, value} = controller.getLabelAndValue(index);\n  return {\n    chart,\n    label,\n    parsed: controller.getParsed(index),\n    raw: chart.data.datasets[datasetIndex].data[index],\n    formattedValue: value,\n    dataset: controller.getDataset(),\n    dataIndex: index,\n    datasetIndex,\n    element\n  };\n}\nfunction getTooltipSize(tooltip, options) {\n  const ctx = tooltip.chart.ctx;\n  const {body, footer, title} = tooltip;\n  const {boxWidth, boxHeight} = options;\n  const bodyFont = toFont(options.bodyFont);\n  const titleFont = toFont(options.titleFont);\n  const footerFont = toFont(options.footerFont);\n  const titleLineCount = title.length;\n  const footerLineCount = footer.length;\n  const bodyLineItemCount = body.length;\n  const padding = toPadding(options.padding);\n  let height = padding.height;\n  let width = 0;\n  let combinedBodyLength = body.reduce((count, bodyItem) => count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);\n  combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;\n  if (titleLineCount) {\n    height += titleLineCount * titleFont.lineHeight\n\t\t\t+ (titleLineCount - 1) * options.titleSpacing\n\t\t\t+ options.titleMarginBottom;\n  }\n  if (combinedBodyLength) {\n    const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;\n    height += bodyLineItemCount * bodyLineHeight\n\t\t\t+ (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight\n\t\t\t+ (combinedBodyLength - 1) * options.bodySpacing;\n  }\n  if (footerLineCount) {\n    height += options.footerMarginTop\n\t\t\t+ footerLineCount * footerFont.lineHeight\n\t\t\t+ (footerLineCount - 1) * options.footerSpacing;\n  }\n  let widthPadding = 0;\n  const maxLineWidth = function(line) {\n    width = Math.max(width, ctx.measureText(line).width + widthPadding);\n  };\n  ctx.save();\n  ctx.font = titleFont.string;\n  each(tooltip.title, maxLineWidth);\n  ctx.font = bodyFont.string;\n  each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);\n  widthPadding = options.displayColors ? (boxWidth + 2 + options.boxPadding) : 0;\n  each(body, (bodyItem) => {\n    each(bodyItem.before, maxLineWidth);\n    each(bodyItem.lines, maxLineWidth);\n    each(bodyItem.after, maxLineWidth);\n  });\n  widthPadding = 0;\n  ctx.font = footerFont.string;\n  each(tooltip.footer, maxLineWidth);\n  ctx.restore();\n  width += padding.width;\n  return {width, height};\n}\nfunction determineYAlign(chart, size) {\n  const {y, height} = size;\n  if (y < height / 2) {\n    return 'top';\n  } else if (y > (chart.height - height / 2)) {\n    return 'bottom';\n  }\n  return 'center';\n}\nfunction doesNotFitWithAlign(xAlign, chart, options, size) {\n  const {x, width} = size;\n  const caret = options.caretSize + options.caretPadding;\n  if (xAlign === 'left' && x + width + caret > chart.width) {\n    return true;\n  }\n  if (xAlign === 'right' && x - width - caret < 0) {\n    return true;\n  }\n}\nfunction determineXAlign(chart, options, size, yAlign) {\n  const {x, width} = size;\n  const {width: chartWidth, chartArea: {left, right}} = chart;\n  let xAlign = 'center';\n  if (yAlign === 'center') {\n    xAlign = x <= (left + right) / 2 ? 'left' : 'right';\n  } else if (x <= width / 2) {\n    xAlign = 'left';\n  } else if (x >= chartWidth - width / 2) {\n    xAlign = 'right';\n  }\n  if (doesNotFitWithAlign(xAlign, chart, options, size)) {\n    xAlign = 'center';\n  }\n  return xAlign;\n}\nfunction determineAlignment(chart, options, size) {\n  const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size);\n  return {\n    xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign),\n    yAlign\n  };\n}\nfunction alignX(size, xAlign) {\n  let {x, width} = size;\n  if (xAlign === 'right') {\n    x -= width;\n  } else if (xAlign === 'center') {\n    x -= (width / 2);\n  }\n  return x;\n}\nfunction alignY(size, yAlign, paddingAndSize) {\n  let {y, height} = size;\n  if (yAlign === 'top') {\n    y += paddingAndSize;\n  } else if (yAlign === 'bottom') {\n    y -= height + paddingAndSize;\n  } else {\n    y -= (height / 2);\n  }\n  return y;\n}\nfunction getBackgroundPoint(options, size, alignment, chart) {\n  const {caretSize, caretPadding, cornerRadius} = options;\n  const {xAlign, yAlign} = alignment;\n  const paddingAndSize = caretSize + caretPadding;\n  const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(cornerRadius);\n  let x = alignX(size, xAlign);\n  const y = alignY(size, yAlign, paddingAndSize);\n  if (yAlign === 'center') {\n    if (xAlign === 'left') {\n      x += paddingAndSize;\n    } else if (xAlign === 'right') {\n      x -= paddingAndSize;\n    }\n  } else if (xAlign === 'left') {\n    x -= Math.max(topLeft, bottomLeft) + caretSize;\n  } else if (xAlign === 'right') {\n    x += Math.max(topRight, bottomRight) + caretSize;\n  }\n  return {\n    x: _limitValue(x, 0, chart.width - size.width),\n    y: _limitValue(y, 0, chart.height - size.height)\n  };\n}\nfunction getAlignedX(tooltip, align, options) {\n  const padding = toPadding(options.padding);\n  return align === 'center'\n    ? tooltip.x + tooltip.width / 2\n    : align === 'right'\n      ? tooltip.x + tooltip.width - padding.right\n      : tooltip.x + padding.left;\n}\nfunction getBeforeAfterBodyLines(callback) {\n  return pushOrConcat([], splitNewlines(callback));\n}\nfunction createTooltipContext(parent, tooltip, tooltipItems) {\n  return createContext(parent, {\n    tooltip,\n    tooltipItems,\n    type: 'tooltip'\n  });\n}\nfunction overrideCallbacks(callbacks, context) {\n  const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;\n  return override ? callbacks.override(override) : callbacks;\n}\nclass Tooltip extends Element {\n  constructor(config) {\n    super();\n    this.opacity = 0;\n    this._active = [];\n    this._eventPosition = undefined;\n    this._size = undefined;\n    this._cachedAnimations = undefined;\n    this._tooltipItems = [];\n    this.$animations = undefined;\n    this.$context = undefined;\n    this.chart = config.chart || config._chart;\n    this._chart = this.chart;\n    this.options = config.options;\n    this.dataPoints = undefined;\n    this.title = undefined;\n    this.beforeBody = undefined;\n    this.body = undefined;\n    this.afterBody = undefined;\n    this.footer = undefined;\n    this.xAlign = undefined;\n    this.yAlign = undefined;\n    this.x = undefined;\n    this.y = undefined;\n    this.height = undefined;\n    this.width = undefined;\n    this.caretX = undefined;\n    this.caretY = undefined;\n    this.labelColors = undefined;\n    this.labelPointStyles = undefined;\n    this.labelTextColors = undefined;\n  }\n  initialize(options) {\n    this.options = options;\n    this._cachedAnimations = undefined;\n    this.$context = undefined;\n  }\n  _resolveAnimations() {\n    const cached = this._cachedAnimations;\n    if (cached) {\n      return cached;\n    }\n    const chart = this.chart;\n    const options = this.options.setContext(this.getContext());\n    const opts = options.enabled && chart.options.animation && options.animations;\n    const animations = new Animations(this.chart, opts);\n    if (opts._cacheable) {\n      this._cachedAnimations = Object.freeze(animations);\n    }\n    return animations;\n  }\n  getContext() {\n    return this.$context ||\n\t\t\t(this.$context = createTooltipContext(this.chart.getContext(), this, this._tooltipItems));\n  }\n  getTitle(context, options) {\n    const {callbacks} = options;\n    const beforeTitle = callbacks.beforeTitle.apply(this, [context]);\n    const title = callbacks.title.apply(this, [context]);\n    const afterTitle = callbacks.afterTitle.apply(this, [context]);\n    let lines = [];\n    lines = pushOrConcat(lines, splitNewlines(beforeTitle));\n    lines = pushOrConcat(lines, splitNewlines(title));\n    lines = pushOrConcat(lines, splitNewlines(afterTitle));\n    return lines;\n  }\n  getBeforeBody(tooltipItems, options) {\n    return getBeforeAfterBodyLines(options.callbacks.beforeBody.apply(this, [tooltipItems]));\n  }\n  getBody(tooltipItems, options) {\n    const {callbacks} = options;\n    const bodyItems = [];\n    each(tooltipItems, (context) => {\n      const bodyItem = {\n        before: [],\n        lines: [],\n        after: []\n      };\n      const scoped = overrideCallbacks(callbacks, context);\n      pushOrConcat(bodyItem.before, splitNewlines(scoped.beforeLabel.call(this, context)));\n      pushOrConcat(bodyItem.lines, scoped.label.call(this, context));\n      pushOrConcat(bodyItem.after, splitNewlines(scoped.afterLabel.call(this, context)));\n      bodyItems.push(bodyItem);\n    });\n    return bodyItems;\n  }\n  getAfterBody(tooltipItems, options) {\n    return getBeforeAfterBodyLines(options.callbacks.afterBody.apply(this, [tooltipItems]));\n  }\n  getFooter(tooltipItems, options) {\n    const {callbacks} = options;\n    const beforeFooter = callbacks.beforeFooter.apply(this, [tooltipItems]);\n    const footer = callbacks.footer.apply(this, [tooltipItems]);\n    const afterFooter = callbacks.afterFooter.apply(this, [tooltipItems]);\n    let lines = [];\n    lines = pushOrConcat(lines, splitNewlines(beforeFooter));\n    lines = pushOrConcat(lines, splitNewlines(footer));\n    lines = pushOrConcat(lines, splitNewlines(afterFooter));\n    return lines;\n  }\n  _createItems(options) {\n    const active = this._active;\n    const data = this.chart.data;\n    const labelColors = [];\n    const labelPointStyles = [];\n    const labelTextColors = [];\n    let tooltipItems = [];\n    let i, len;\n    for (i = 0, len = active.length; i < len; ++i) {\n      tooltipItems.push(createTooltipItem(this.chart, active[i]));\n    }\n    if (options.filter) {\n      tooltipItems = tooltipItems.filter((element, index, array) => options.filter(element, index, array, data));\n    }\n    if (options.itemSort) {\n      tooltipItems = tooltipItems.sort((a, b) => options.itemSort(a, b, data));\n    }\n    each(tooltipItems, (context) => {\n      const scoped = overrideCallbacks(options.callbacks, context);\n      labelColors.push(scoped.labelColor.call(this, context));\n      labelPointStyles.push(scoped.labelPointStyle.call(this, context));\n      labelTextColors.push(scoped.labelTextColor.call(this, context));\n    });\n    this.labelColors = labelColors;\n    this.labelPointStyles = labelPointStyles;\n    this.labelTextColors = labelTextColors;\n    this.dataPoints = tooltipItems;\n    return tooltipItems;\n  }\n  update(changed, replay) {\n    const options = this.options.setContext(this.getContext());\n    const active = this._active;\n    let properties;\n    let tooltipItems = [];\n    if (!active.length) {\n      if (this.opacity !== 0) {\n        properties = {\n          opacity: 0\n        };\n      }\n    } else {\n      const position = positioners[options.position].call(this, active, this._eventPosition);\n      tooltipItems = this._createItems(options);\n      this.title = this.getTitle(tooltipItems, options);\n      this.beforeBody = this.getBeforeBody(tooltipItems, options);\n      this.body = this.getBody(tooltipItems, options);\n      this.afterBody = this.getAfterBody(tooltipItems, options);\n      this.footer = this.getFooter(tooltipItems, options);\n      const size = this._size = getTooltipSize(this, options);\n      const positionAndSize = Object.assign({}, position, size);\n      const alignment = determineAlignment(this.chart, options, positionAndSize);\n      const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, this.chart);\n      this.xAlign = alignment.xAlign;\n      this.yAlign = alignment.yAlign;\n      properties = {\n        opacity: 1,\n        x: backgroundPoint.x,\n        y: backgroundPoint.y,\n        width: size.width,\n        height: size.height,\n        caretX: position.x,\n        caretY: position.y\n      };\n    }\n    this._tooltipItems = tooltipItems;\n    this.$context = undefined;\n    if (properties) {\n      this._resolveAnimations().update(this, properties);\n    }\n    if (changed && options.external) {\n      options.external.call(this, {chart: this.chart, tooltip: this, replay});\n    }\n  }\n  drawCaret(tooltipPoint, ctx, size, options) {\n    const caretPosition = this.getCaretPosition(tooltipPoint, size, options);\n    ctx.lineTo(caretPosition.x1, caretPosition.y1);\n    ctx.lineTo(caretPosition.x2, caretPosition.y2);\n    ctx.lineTo(caretPosition.x3, caretPosition.y3);\n  }\n  getCaretPosition(tooltipPoint, size, options) {\n    const {xAlign, yAlign} = this;\n    const {caretSize, cornerRadius} = options;\n    const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(cornerRadius);\n    const {x: ptX, y: ptY} = tooltipPoint;\n    const {width, height} = size;\n    let x1, x2, x3, y1, y2, y3;\n    if (yAlign === 'center') {\n      y2 = ptY + (height / 2);\n      if (xAlign === 'left') {\n        x1 = ptX;\n        x2 = x1 - caretSize;\n        y1 = y2 + caretSize;\n        y3 = y2 - caretSize;\n      } else {\n        x1 = ptX + width;\n        x2 = x1 + caretSize;\n        y1 = y2 - caretSize;\n        y3 = y2 + caretSize;\n      }\n      x3 = x1;\n    } else {\n      if (xAlign === 'left') {\n        x2 = ptX + Math.max(topLeft, bottomLeft) + (caretSize);\n      } else if (xAlign === 'right') {\n        x2 = ptX + width - Math.max(topRight, bottomRight) - caretSize;\n      } else {\n        x2 = this.caretX;\n      }\n      if (yAlign === 'top') {\n        y1 = ptY;\n        y2 = y1 - caretSize;\n        x1 = x2 - caretSize;\n        x3 = x2 + caretSize;\n      } else {\n        y1 = ptY + height;\n        y2 = y1 + caretSize;\n        x1 = x2 + caretSize;\n        x3 = x2 - caretSize;\n      }\n      y3 = y1;\n    }\n    return {x1, x2, x3, y1, y2, y3};\n  }\n  drawTitle(pt, ctx, options) {\n    const title = this.title;\n    const length = title.length;\n    let titleFont, titleSpacing, i;\n    if (length) {\n      const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n      pt.x = getAlignedX(this, options.titleAlign, options);\n      ctx.textAlign = rtlHelper.textAlign(options.titleAlign);\n      ctx.textBaseline = 'middle';\n      titleFont = toFont(options.titleFont);\n      titleSpacing = options.titleSpacing;\n      ctx.fillStyle = options.titleColor;\n      ctx.font = titleFont.string;\n      for (i = 0; i < length; ++i) {\n        ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);\n        pt.y += titleFont.lineHeight + titleSpacing;\n        if (i + 1 === length) {\n          pt.y += options.titleMarginBottom - titleSpacing;\n        }\n      }\n    }\n  }\n  _drawColorBox(ctx, pt, i, rtlHelper, options) {\n    const labelColors = this.labelColors[i];\n    const labelPointStyle = this.labelPointStyles[i];\n    const {boxHeight, boxWidth, boxPadding} = options;\n    const bodyFont = toFont(options.bodyFont);\n    const colorX = getAlignedX(this, 'left', options);\n    const rtlColorX = rtlHelper.x(colorX);\n    const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;\n    const colorY = pt.y + yOffSet;\n    if (options.usePointStyle) {\n      const drawOptions = {\n        radius: Math.min(boxWidth, boxHeight) / 2,\n        pointStyle: labelPointStyle.pointStyle,\n        rotation: labelPointStyle.rotation,\n        borderWidth: 1\n      };\n      const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;\n      const centerY = colorY + boxHeight / 2;\n      ctx.strokeStyle = options.multiKeyBackground;\n      ctx.fillStyle = options.multiKeyBackground;\n      drawPoint(ctx, drawOptions, centerX, centerY);\n      ctx.strokeStyle = labelColors.borderColor;\n      ctx.fillStyle = labelColors.backgroundColor;\n      drawPoint(ctx, drawOptions, centerX, centerY);\n    } else {\n      ctx.lineWidth = isObject(labelColors.borderWidth) ? Math.max(...Object.values(labelColors.borderWidth)) : (labelColors.borderWidth || 1);\n      ctx.strokeStyle = labelColors.borderColor;\n      ctx.setLineDash(labelColors.borderDash || []);\n      ctx.lineDashOffset = labelColors.borderDashOffset || 0;\n      const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth - boxPadding);\n      const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - boxPadding - 2);\n      const borderRadius = toTRBLCorners(labelColors.borderRadius);\n      if (Object.values(borderRadius).some(v => v !== 0)) {\n        ctx.beginPath();\n        ctx.fillStyle = options.multiKeyBackground;\n        addRoundedRectPath(ctx, {\n          x: outerX,\n          y: colorY,\n          w: boxWidth,\n          h: boxHeight,\n          radius: borderRadius,\n        });\n        ctx.fill();\n        ctx.stroke();\n        ctx.fillStyle = labelColors.backgroundColor;\n        ctx.beginPath();\n        addRoundedRectPath(ctx, {\n          x: innerX,\n          y: colorY + 1,\n          w: boxWidth - 2,\n          h: boxHeight - 2,\n          radius: borderRadius,\n        });\n        ctx.fill();\n      } else {\n        ctx.fillStyle = options.multiKeyBackground;\n        ctx.fillRect(outerX, colorY, boxWidth, boxHeight);\n        ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);\n        ctx.fillStyle = labelColors.backgroundColor;\n        ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);\n      }\n    }\n    ctx.fillStyle = this.labelTextColors[i];\n  }\n  drawBody(pt, ctx, options) {\n    const {body} = this;\n    const {bodySpacing, bodyAlign, displayColors, boxHeight, boxWidth, boxPadding} = options;\n    const bodyFont = toFont(options.bodyFont);\n    let bodyLineHeight = bodyFont.lineHeight;\n    let xLinePadding = 0;\n    const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n    const fillLineOfText = function(line) {\n      ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);\n      pt.y += bodyLineHeight + bodySpacing;\n    };\n    const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\n    let bodyItem, textColor, lines, i, j, ilen, jlen;\n    ctx.textAlign = bodyAlign;\n    ctx.textBaseline = 'middle';\n    ctx.font = bodyFont.string;\n    pt.x = getAlignedX(this, bodyAlignForCalculation, options);\n    ctx.fillStyle = options.bodyColor;\n    each(this.beforeBody, fillLineOfText);\n    xLinePadding = displayColors && bodyAlignForCalculation !== 'right'\n      ? bodyAlign === 'center' ? (boxWidth / 2 + boxPadding) : (boxWidth + 2 + boxPadding)\n      : 0;\n    for (i = 0, ilen = body.length; i < ilen; ++i) {\n      bodyItem = body[i];\n      textColor = this.labelTextColors[i];\n      ctx.fillStyle = textColor;\n      each(bodyItem.before, fillLineOfText);\n      lines = bodyItem.lines;\n      if (displayColors && lines.length) {\n        this._drawColorBox(ctx, pt, i, rtlHelper, options);\n        bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);\n      }\n      for (j = 0, jlen = lines.length; j < jlen; ++j) {\n        fillLineOfText(lines[j]);\n        bodyLineHeight = bodyFont.lineHeight;\n      }\n      each(bodyItem.after, fillLineOfText);\n    }\n    xLinePadding = 0;\n    bodyLineHeight = bodyFont.lineHeight;\n    each(this.afterBody, fillLineOfText);\n    pt.y -= bodySpacing;\n  }\n  drawFooter(pt, ctx, options) {\n    const footer = this.footer;\n    const length = footer.length;\n    let footerFont, i;\n    if (length) {\n      const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n      pt.x = getAlignedX(this, options.footerAlign, options);\n      pt.y += options.footerMarginTop;\n      ctx.textAlign = rtlHelper.textAlign(options.footerAlign);\n      ctx.textBaseline = 'middle';\n      footerFont = toFont(options.footerFont);\n      ctx.fillStyle = options.footerColor;\n      ctx.font = footerFont.string;\n      for (i = 0; i < length; ++i) {\n        ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);\n        pt.y += footerFont.lineHeight + options.footerSpacing;\n      }\n    }\n  }\n  drawBackground(pt, ctx, tooltipSize, options) {\n    const {xAlign, yAlign} = this;\n    const {x, y} = pt;\n    const {width, height} = tooltipSize;\n    const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(options.cornerRadius);\n    ctx.fillStyle = options.backgroundColor;\n    ctx.strokeStyle = options.borderColor;\n    ctx.lineWidth = options.borderWidth;\n    ctx.beginPath();\n    ctx.moveTo(x + topLeft, y);\n    if (yAlign === 'top') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n    ctx.lineTo(x + width - topRight, y);\n    ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);\n    if (yAlign === 'center' && xAlign === 'right') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n    ctx.lineTo(x + width, y + height - bottomRight);\n    ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);\n    if (yAlign === 'bottom') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n    ctx.lineTo(x + bottomLeft, y + height);\n    ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);\n    if (yAlign === 'center' && xAlign === 'left') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n    ctx.lineTo(x, y + topLeft);\n    ctx.quadraticCurveTo(x, y, x + topLeft, y);\n    ctx.closePath();\n    ctx.fill();\n    if (options.borderWidth > 0) {\n      ctx.stroke();\n    }\n  }\n  _updateAnimationTarget(options) {\n    const chart = this.chart;\n    const anims = this.$animations;\n    const animX = anims && anims.x;\n    const animY = anims && anims.y;\n    if (animX || animY) {\n      const position = positioners[options.position].call(this, this._active, this._eventPosition);\n      if (!position) {\n        return;\n      }\n      const size = this._size = getTooltipSize(this, options);\n      const positionAndSize = Object.assign({}, position, this._size);\n      const alignment = determineAlignment(chart, options, positionAndSize);\n      const point = getBackgroundPoint(options, positionAndSize, alignment, chart);\n      if (animX._to !== point.x || animY._to !== point.y) {\n        this.xAlign = alignment.xAlign;\n        this.yAlign = alignment.yAlign;\n        this.width = size.width;\n        this.height = size.height;\n        this.caretX = position.x;\n        this.caretY = position.y;\n        this._resolveAnimations().update(this, point);\n      }\n    }\n  }\n  _willRender() {\n    return !!this.opacity;\n  }\n  draw(ctx) {\n    const options = this.options.setContext(this.getContext());\n    let opacity = this.opacity;\n    if (!opacity) {\n      return;\n    }\n    this._updateAnimationTarget(options);\n    const tooltipSize = {\n      width: this.width,\n      height: this.height\n    };\n    const pt = {\n      x: this.x,\n      y: this.y\n    };\n    opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;\n    const padding = toPadding(options.padding);\n    const hasTooltipContent = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;\n    if (options.enabled && hasTooltipContent) {\n      ctx.save();\n      ctx.globalAlpha = opacity;\n      this.drawBackground(pt, ctx, tooltipSize, options);\n      overrideTextDirection(ctx, options.textDirection);\n      pt.y += padding.top;\n      this.drawTitle(pt, ctx, options);\n      this.drawBody(pt, ctx, options);\n      this.drawFooter(pt, ctx, options);\n      restoreTextDirection(ctx, options.textDirection);\n      ctx.restore();\n    }\n  }\n  getActiveElements() {\n    return this._active || [];\n  }\n  setActiveElements(activeElements, eventPosition) {\n    const lastActive = this._active;\n    const active = activeElements.map(({datasetIndex, index}) => {\n      const meta = this.chart.getDatasetMeta(datasetIndex);\n      if (!meta) {\n        throw new Error('Cannot find a dataset at index ' + datasetIndex);\n      }\n      return {\n        datasetIndex,\n        element: meta.data[index],\n        index,\n      };\n    });\n    const changed = !_elementsEqual(lastActive, active);\n    const positionChanged = this._positionChanged(active, eventPosition);\n    if (changed || positionChanged) {\n      this._active = active;\n      this._eventPosition = eventPosition;\n      this._ignoreReplayEvents = true;\n      this.update(true);\n    }\n  }\n  handleEvent(e, replay, inChartArea = true) {\n    if (replay && this._ignoreReplayEvents) {\n      return false;\n    }\n    this._ignoreReplayEvents = false;\n    const options = this.options;\n    const lastActive = this._active || [];\n    const active = this._getActiveElements(e, lastActive, replay, inChartArea);\n    const positionChanged = this._positionChanged(active, e);\n    const changed = replay || !_elementsEqual(active, lastActive) || positionChanged;\n    if (changed) {\n      this._active = active;\n      if (options.enabled || options.external) {\n        this._eventPosition = {\n          x: e.x,\n          y: e.y\n        };\n        this.update(true, replay);\n      }\n    }\n    return changed;\n  }\n  _getActiveElements(e, lastActive, replay, inChartArea) {\n    const options = this.options;\n    if (e.type === 'mouseout') {\n      return [];\n    }\n    if (!inChartArea) {\n      return lastActive;\n    }\n    const active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);\n    if (options.reverse) {\n      active.reverse();\n    }\n    return active;\n  }\n  _positionChanged(active, e) {\n    const {caretX, caretY, options} = this;\n    const position = positioners[options.position].call(this, active, e);\n    return position !== false && (caretX !== position.x || caretY !== position.y);\n  }\n}\nTooltip.positioners = positioners;\nvar plugin_tooltip = {\n  id: 'tooltip',\n  _element: Tooltip,\n  positioners,\n  afterInit(chart, _args, options) {\n    if (options) {\n      chart.tooltip = new Tooltip({chart, options});\n    }\n  },\n  beforeUpdate(chart, _args, options) {\n    if (chart.tooltip) {\n      chart.tooltip.initialize(options);\n    }\n  },\n  reset(chart, _args, options) {\n    if (chart.tooltip) {\n      chart.tooltip.initialize(options);\n    }\n  },\n  afterDraw(chart) {\n    const tooltip = chart.tooltip;\n    if (tooltip && tooltip._willRender()) {\n      const args = {\n        tooltip\n      };\n      if (chart.notifyPlugins('beforeTooltipDraw', args) === false) {\n        return;\n      }\n      tooltip.draw(chart.ctx);\n      chart.notifyPlugins('afterTooltipDraw', args);\n    }\n  },\n  afterEvent(chart, args) {\n    if (chart.tooltip) {\n      const useFinalPosition = args.replay;\n      if (chart.tooltip.handleEvent(args.event, useFinalPosition, args.inChartArea)) {\n        args.changed = true;\n      }\n    }\n  },\n  defaults: {\n    enabled: true,\n    external: null,\n    position: 'average',\n    backgroundColor: 'rgba(0,0,0,0.8)',\n    titleColor: '#fff',\n    titleFont: {\n      weight: 'bold',\n    },\n    titleSpacing: 2,\n    titleMarginBottom: 6,\n    titleAlign: 'left',\n    bodyColor: '#fff',\n    bodySpacing: 2,\n    bodyFont: {\n    },\n    bodyAlign: 'left',\n    footerColor: '#fff',\n    footerSpacing: 2,\n    footerMarginTop: 6,\n    footerFont: {\n      weight: 'bold',\n    },\n    footerAlign: 'left',\n    padding: 6,\n    caretPadding: 2,\n    caretSize: 5,\n    cornerRadius: 6,\n    boxHeight: (ctx, opts) => opts.bodyFont.size,\n    boxWidth: (ctx, opts) => opts.bodyFont.size,\n    multiKeyBackground: '#fff',\n    displayColors: true,\n    boxPadding: 0,\n    borderColor: 'rgba(0,0,0,0)',\n    borderWidth: 0,\n    animation: {\n      duration: 400,\n      easing: 'easeOutQuart',\n    },\n    animations: {\n      numbers: {\n        type: 'number',\n        properties: ['x', 'y', 'width', 'height', 'caretX', 'caretY'],\n      },\n      opacity: {\n        easing: 'linear',\n        duration: 200\n      }\n    },\n    callbacks: {\n      beforeTitle: noop,\n      title(tooltipItems) {\n        if (tooltipItems.length > 0) {\n          const item = tooltipItems[0];\n          const labels = item.chart.data.labels;\n          const labelCount = labels ? labels.length : 0;\n          if (this && this.options && this.options.mode === 'dataset') {\n            return item.dataset.label || '';\n          } else if (item.label) {\n            return item.label;\n          } else if (labelCount > 0 && item.dataIndex < labelCount) {\n            return labels[item.dataIndex];\n          }\n        }\n        return '';\n      },\n      afterTitle: noop,\n      beforeBody: noop,\n      beforeLabel: noop,\n      label(tooltipItem) {\n        if (this && this.options && this.options.mode === 'dataset') {\n          return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;\n        }\n        let label = tooltipItem.dataset.label || '';\n        if (label) {\n          label += ': ';\n        }\n        const value = tooltipItem.formattedValue;\n        if (!isNullOrUndef(value)) {\n          label += value;\n        }\n        return label;\n      },\n      labelColor(tooltipItem) {\n        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options = meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n          borderColor: options.borderColor,\n          backgroundColor: options.backgroundColor,\n          borderWidth: options.borderWidth,\n          borderDash: options.borderDash,\n          borderDashOffset: options.borderDashOffset,\n          borderRadius: 0,\n        };\n      },\n      labelTextColor() {\n        return this.options.bodyColor;\n      },\n      labelPointStyle(tooltipItem) {\n        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options = meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n          pointStyle: options.pointStyle,\n          rotation: options.rotation,\n        };\n      },\n      afterLabel: noop,\n      afterBody: noop,\n      beforeFooter: noop,\n      footer: noop,\n      afterFooter: noop\n    }\n  },\n  defaultRoutes: {\n    bodyFont: 'font',\n    footerFont: 'font',\n    titleFont: 'font'\n  },\n  descriptors: {\n    _scriptable: (name) => name !== 'filter' && name !== 'itemSort' && name !== 'external',\n    _indexable: false,\n    callbacks: {\n      _scriptable: false,\n      _indexable: false,\n    },\n    animation: {\n      _fallback: false\n    },\n    animations: {\n      _fallback: 'animation'\n    }\n  },\n  additionalOptionScopes: ['interaction']\n};\n\nvar plugins = /*#__PURE__*/Object.freeze({\n__proto__: null,\nDecimation: plugin_decimation,\nFiller: index,\nLegend: plugin_legend,\nSubTitle: plugin_subtitle,\nTitle: plugin_title,\nTooltip: plugin_tooltip\n});\n\nconst addIfString = (labels, raw, index, addedLabels) => {\n  if (typeof raw === 'string') {\n    index = labels.push(raw) - 1;\n    addedLabels.unshift({index, label: raw});\n  } else if (isNaN(raw)) {\n    index = null;\n  }\n  return index;\n};\nfunction findOrAddLabel(labels, raw, index, addedLabels) {\n  const first = labels.indexOf(raw);\n  if (first === -1) {\n    return addIfString(labels, raw, index, addedLabels);\n  }\n  const last = labels.lastIndexOf(raw);\n  return first !== last ? index : first;\n}\nconst validIndex = (index, max) => index === null ? null : _limitValue(Math.round(index), 0, max);\nclass CategoryScale extends Scale {\n  constructor(cfg) {\n    super(cfg);\n    this._startValue = undefined;\n    this._valueRange = 0;\n    this._addedLabels = [];\n  }\n  init(scaleOptions) {\n    const added = this._addedLabels;\n    if (added.length) {\n      const labels = this.getLabels();\n      for (const {index, label} of added) {\n        if (labels[index] === label) {\n          labels.splice(index, 1);\n        }\n      }\n      this._addedLabels = [];\n    }\n    super.init(scaleOptions);\n  }\n  parse(raw, index) {\n    if (isNullOrUndef(raw)) {\n      return null;\n    }\n    const labels = this.getLabels();\n    index = isFinite(index) && labels[index] === raw ? index\n      : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);\n    return validIndex(index, labels.length - 1);\n  }\n  determineDataLimits() {\n    const {minDefined, maxDefined} = this.getUserBounds();\n    let {min, max} = this.getMinMax(true);\n    if (this.options.bounds === 'ticks') {\n      if (!minDefined) {\n        min = 0;\n      }\n      if (!maxDefined) {\n        max = this.getLabels().length - 1;\n      }\n    }\n    this.min = min;\n    this.max = max;\n  }\n  buildTicks() {\n    const min = this.min;\n    const max = this.max;\n    const offset = this.options.offset;\n    const ticks = [];\n    let labels = this.getLabels();\n    labels = (min === 0 && max === labels.length - 1) ? labels : labels.slice(min, max + 1);\n    this._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);\n    this._startValue = this.min - (offset ? 0.5 : 0);\n    for (let value = min; value <= max; value++) {\n      ticks.push({value});\n    }\n    return ticks;\n  }\n  getLabelForValue(value) {\n    const labels = this.getLabels();\n    if (value >= 0 && value < labels.length) {\n      return labels[value];\n    }\n    return value;\n  }\n  configure() {\n    super.configure();\n    if (!this.isHorizontal()) {\n      this._reversePixels = !this._reversePixels;\n    }\n  }\n  getPixelForValue(value) {\n    if (typeof value !== 'number') {\n      value = this.parse(value);\n    }\n    return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n  }\n  getPixelForTick(index) {\n    const ticks = this.ticks;\n    if (index < 0 || index > ticks.length - 1) {\n      return null;\n    }\n    return this.getPixelForValue(ticks[index].value);\n  }\n  getValueForPixel(pixel) {\n    return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);\n  }\n  getBasePixel() {\n    return this.bottom;\n  }\n}\nCategoryScale.id = 'category';\nCategoryScale.defaults = {\n  ticks: {\n    callback: CategoryScale.prototype.getLabelForValue\n  }\n};\n\nfunction generateTicks$1(generationOptions, dataRange) {\n  const ticks = [];\n  const MIN_SPACING = 1e-14;\n  const {bounds, step, min, max, precision, count, maxTicks, maxDigits, includeBounds} = generationOptions;\n  const unit = step || 1;\n  const maxSpaces = maxTicks - 1;\n  const {min: rmin, max: rmax} = dataRange;\n  const minDefined = !isNullOrUndef(min);\n  const maxDefined = !isNullOrUndef(max);\n  const countDefined = !isNullOrUndef(count);\n  const minSpacing = (rmax - rmin) / (maxDigits + 1);\n  let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;\n  let factor, niceMin, niceMax, numSpaces;\n  if (spacing < MIN_SPACING && !minDefined && !maxDefined) {\n    return [{value: rmin}, {value: rmax}];\n  }\n  numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n  if (numSpaces > maxSpaces) {\n    spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;\n  }\n  if (!isNullOrUndef(precision)) {\n    factor = Math.pow(10, precision);\n    spacing = Math.ceil(spacing * factor) / factor;\n  }\n  if (bounds === 'ticks') {\n    niceMin = Math.floor(rmin / spacing) * spacing;\n    niceMax = Math.ceil(rmax / spacing) * spacing;\n  } else {\n    niceMin = rmin;\n    niceMax = rmax;\n  }\n  if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {\n    numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));\n    spacing = (max - min) / numSpaces;\n    niceMin = min;\n    niceMax = max;\n  } else if (countDefined) {\n    niceMin = minDefined ? min : niceMin;\n    niceMax = maxDefined ? max : niceMax;\n    numSpaces = count - 1;\n    spacing = (niceMax - niceMin) / numSpaces;\n  } else {\n    numSpaces = (niceMax - niceMin) / spacing;\n    if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n      numSpaces = Math.round(numSpaces);\n    } else {\n      numSpaces = Math.ceil(numSpaces);\n    }\n  }\n  const decimalPlaces = Math.max(\n    _decimalPlaces(spacing),\n    _decimalPlaces(niceMin)\n  );\n  factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);\n  niceMin = Math.round(niceMin * factor) / factor;\n  niceMax = Math.round(niceMax * factor) / factor;\n  let j = 0;\n  if (minDefined) {\n    if (includeBounds && niceMin !== min) {\n      ticks.push({value: min});\n      if (niceMin < min) {\n        j++;\n      }\n      if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {\n        j++;\n      }\n    } else if (niceMin < min) {\n      j++;\n    }\n  }\n  for (; j < numSpaces; ++j) {\n    ticks.push({value: Math.round((niceMin + j * spacing) * factor) / factor});\n  }\n  if (maxDefined && includeBounds && niceMax !== max) {\n    if (ticks.length && almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {\n      ticks[ticks.length - 1].value = max;\n    } else {\n      ticks.push({value: max});\n    }\n  } else if (!maxDefined || niceMax === max) {\n    ticks.push({value: niceMax});\n  }\n  return ticks;\n}\nfunction relativeLabelSize(value, minSpacing, {horizontal, minRotation}) {\n  const rad = toRadians(minRotation);\n  const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;\n  const length = 0.75 * minSpacing * ('' + value).length;\n  return Math.min(minSpacing / ratio, length);\n}\nclass LinearScaleBase extends Scale {\n  constructor(cfg) {\n    super(cfg);\n    this.start = undefined;\n    this.end = undefined;\n    this._startValue = undefined;\n    this._endValue = undefined;\n    this._valueRange = 0;\n  }\n  parse(raw, index) {\n    if (isNullOrUndef(raw)) {\n      return null;\n    }\n    if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {\n      return null;\n    }\n    return +raw;\n  }\n  handleTickRangeOptions() {\n    const {beginAtZero} = this.options;\n    const {minDefined, maxDefined} = this.getUserBounds();\n    let {min, max} = this;\n    const setMin = v => (min = minDefined ? min : v);\n    const setMax = v => (max = maxDefined ? max : v);\n    if (beginAtZero) {\n      const minSign = sign(min);\n      const maxSign = sign(max);\n      if (minSign < 0 && maxSign < 0) {\n        setMax(0);\n      } else if (minSign > 0 && maxSign > 0) {\n        setMin(0);\n      }\n    }\n    if (min === max) {\n      let offset = 1;\n      if (max >= Number.MAX_SAFE_INTEGER || min <= Number.MIN_SAFE_INTEGER) {\n        offset = Math.abs(max * 0.05);\n      }\n      setMax(max + offset);\n      if (!beginAtZero) {\n        setMin(min - offset);\n      }\n    }\n    this.min = min;\n    this.max = max;\n  }\n  getTickLimit() {\n    const tickOpts = this.options.ticks;\n    let {maxTicksLimit, stepSize} = tickOpts;\n    let maxTicks;\n    if (stepSize) {\n      maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;\n      if (maxTicks > 1000) {\n        console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxTicks} ticks. Limiting to 1000.`);\n        maxTicks = 1000;\n      }\n    } else {\n      maxTicks = this.computeTickLimit();\n      maxTicksLimit = maxTicksLimit || 11;\n    }\n    if (maxTicksLimit) {\n      maxTicks = Math.min(maxTicksLimit, maxTicks);\n    }\n    return maxTicks;\n  }\n  computeTickLimit() {\n    return Number.POSITIVE_INFINITY;\n  }\n  buildTicks() {\n    const opts = this.options;\n    const tickOpts = opts.ticks;\n    let maxTicks = this.getTickLimit();\n    maxTicks = Math.max(2, maxTicks);\n    const numericGeneratorOptions = {\n      maxTicks,\n      bounds: opts.bounds,\n      min: opts.min,\n      max: opts.max,\n      precision: tickOpts.precision,\n      step: tickOpts.stepSize,\n      count: tickOpts.count,\n      maxDigits: this._maxDigits(),\n      horizontal: this.isHorizontal(),\n      minRotation: tickOpts.minRotation || 0,\n      includeBounds: tickOpts.includeBounds !== false\n    };\n    const dataRange = this._range || this;\n    const ticks = generateTicks$1(numericGeneratorOptions, dataRange);\n    if (opts.bounds === 'ticks') {\n      _setMinAndMaxByKey(ticks, this, 'value');\n    }\n    if (opts.reverse) {\n      ticks.reverse();\n      this.start = this.max;\n      this.end = this.min;\n    } else {\n      this.start = this.min;\n      this.end = this.max;\n    }\n    return ticks;\n  }\n  configure() {\n    const ticks = this.ticks;\n    let start = this.min;\n    let end = this.max;\n    super.configure();\n    if (this.options.offset && ticks.length) {\n      const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\n      start -= offset;\n      end += offset;\n    }\n    this._startValue = start;\n    this._endValue = end;\n    this._valueRange = end - start;\n  }\n  getLabelForValue(value) {\n    return formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n  }\n}\n\nclass LinearScale extends LinearScaleBase {\n  determineDataLimits() {\n    const {min, max} = this.getMinMax(true);\n    this.min = isNumberFinite(min) ? min : 0;\n    this.max = isNumberFinite(max) ? max : 1;\n    this.handleTickRangeOptions();\n  }\n  computeTickLimit() {\n    const horizontal = this.isHorizontal();\n    const length = horizontal ? this.width : this.height;\n    const minRotation = toRadians(this.options.ticks.minRotation);\n    const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;\n    const tickFont = this._resolveTickFontOptions(0);\n    return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));\n  }\n  getPixelForValue(value) {\n    return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n  }\n  getValueForPixel(pixel) {\n    return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\n  }\n}\nLinearScale.id = 'linear';\nLinearScale.defaults = {\n  ticks: {\n    callback: Ticks.formatters.numeric\n  }\n};\n\nfunction isMajor(tickVal) {\n  const remain = tickVal / (Math.pow(10, Math.floor(log10(tickVal))));\n  return remain === 1;\n}\nfunction generateTicks(generationOptions, dataRange) {\n  const endExp = Math.floor(log10(dataRange.max));\n  const endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));\n  const ticks = [];\n  let tickVal = finiteOrDefault(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));\n  let exp = Math.floor(log10(tickVal));\n  let significand = Math.floor(tickVal / Math.pow(10, exp));\n  let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\n  do {\n    ticks.push({value: tickVal, major: isMajor(tickVal)});\n    ++significand;\n    if (significand === 10) {\n      significand = 1;\n      ++exp;\n      precision = exp >= 0 ? 1 : precision;\n    }\n    tickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;\n  } while (exp < endExp || (exp === endExp && significand < endSignificand));\n  const lastTick = finiteOrDefault(generationOptions.max, tickVal);\n  ticks.push({value: lastTick, major: isMajor(tickVal)});\n  return ticks;\n}\nclass LogarithmicScale extends Scale {\n  constructor(cfg) {\n    super(cfg);\n    this.start = undefined;\n    this.end = undefined;\n    this._startValue = undefined;\n    this._valueRange = 0;\n  }\n  parse(raw, index) {\n    const value = LinearScaleBase.prototype.parse.apply(this, [raw, index]);\n    if (value === 0) {\n      this._zero = true;\n      return undefined;\n    }\n    return isNumberFinite(value) && value > 0 ? value : null;\n  }\n  determineDataLimits() {\n    const {min, max} = this.getMinMax(true);\n    this.min = isNumberFinite(min) ? Math.max(0, min) : null;\n    this.max = isNumberFinite(max) ? Math.max(0, max) : null;\n    if (this.options.beginAtZero) {\n      this._zero = true;\n    }\n    this.handleTickRangeOptions();\n  }\n  handleTickRangeOptions() {\n    const {minDefined, maxDefined} = this.getUserBounds();\n    let min = this.min;\n    let max = this.max;\n    const setMin = v => (min = minDefined ? min : v);\n    const setMax = v => (max = maxDefined ? max : v);\n    const exp = (v, m) => Math.pow(10, Math.floor(log10(v)) + m);\n    if (min === max) {\n      if (min <= 0) {\n        setMin(1);\n        setMax(10);\n      } else {\n        setMin(exp(min, -1));\n        setMax(exp(max, +1));\n      }\n    }\n    if (min <= 0) {\n      setMin(exp(max, -1));\n    }\n    if (max <= 0) {\n      setMax(exp(min, +1));\n    }\n    if (this._zero && this.min !== this._suggestedMin && min === exp(this.min, 0)) {\n      setMin(exp(min, -1));\n    }\n    this.min = min;\n    this.max = max;\n  }\n  buildTicks() {\n    const opts = this.options;\n    const generationOptions = {\n      min: this._userMin,\n      max: this._userMax\n    };\n    const ticks = generateTicks(generationOptions, this);\n    if (opts.bounds === 'ticks') {\n      _setMinAndMaxByKey(ticks, this, 'value');\n    }\n    if (opts.reverse) {\n      ticks.reverse();\n      this.start = this.max;\n      this.end = this.min;\n    } else {\n      this.start = this.min;\n      this.end = this.max;\n    }\n    return ticks;\n  }\n  getLabelForValue(value) {\n    return value === undefined\n      ? '0'\n      : formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n  }\n  configure() {\n    const start = this.min;\n    super.configure();\n    this._startValue = log10(start);\n    this._valueRange = log10(this.max) - log10(start);\n  }\n  getPixelForValue(value) {\n    if (value === undefined || value === 0) {\n      value = this.min;\n    }\n    if (value === null || isNaN(value)) {\n      return NaN;\n    }\n    return this.getPixelForDecimal(value === this.min\n      ? 0\n      : (log10(value) - this._startValue) / this._valueRange);\n  }\n  getValueForPixel(pixel) {\n    const decimal = this.getDecimalForPixel(pixel);\n    return Math.pow(10, this._startValue + decimal * this._valueRange);\n  }\n}\nLogarithmicScale.id = 'logarithmic';\nLogarithmicScale.defaults = {\n  ticks: {\n    callback: Ticks.formatters.logarithmic,\n    major: {\n      enabled: true\n    }\n  }\n};\n\nfunction getTickBackdropHeight(opts) {\n  const tickOpts = opts.ticks;\n  if (tickOpts.display && opts.display) {\n    const padding = toPadding(tickOpts.backdropPadding);\n    return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;\n  }\n  return 0;\n}\nfunction measureLabelSize(ctx, font, label) {\n  label = isArray(label) ? label : [label];\n  return {\n    w: _longestText(ctx, font.string, label),\n    h: label.length * font.lineHeight\n  };\n}\nfunction determineLimits(angle, pos, size, min, max) {\n  if (angle === min || angle === max) {\n    return {\n      start: pos - (size / 2),\n      end: pos + (size / 2)\n    };\n  } else if (angle < min || angle > max) {\n    return {\n      start: pos - size,\n      end: pos\n    };\n  }\n  return {\n    start: pos,\n    end: pos + size\n  };\n}\nfunction fitWithPointLabels(scale) {\n  const orig = {\n    l: scale.left + scale._padding.left,\n    r: scale.right - scale._padding.right,\n    t: scale.top + scale._padding.top,\n    b: scale.bottom - scale._padding.bottom\n  };\n  const limits = Object.assign({}, orig);\n  const labelSizes = [];\n  const padding = [];\n  const valueCount = scale._pointLabels.length;\n  const pointLabelOpts = scale.options.pointLabels;\n  const additionalAngle = pointLabelOpts.centerPointLabels ? PI / valueCount : 0;\n  for (let i = 0; i < valueCount; i++) {\n    const opts = pointLabelOpts.setContext(scale.getPointLabelContext(i));\n    padding[i] = opts.padding;\n    const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i], additionalAngle);\n    const plFont = toFont(opts.font);\n    const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);\n    labelSizes[i] = textSize;\n    const angleRadians = _normalizeAngle(scale.getIndexAngle(i) + additionalAngle);\n    const angle = Math.round(toDegrees(angleRadians));\n    const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n    const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n    updateLimits(limits, orig, angleRadians, hLimits, vLimits);\n  }\n  scale.setCenterPoint(\n    orig.l - limits.l,\n    limits.r - orig.r,\n    orig.t - limits.t,\n    limits.b - orig.b\n  );\n  scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);\n}\nfunction updateLimits(limits, orig, angle, hLimits, vLimits) {\n  const sin = Math.abs(Math.sin(angle));\n  const cos = Math.abs(Math.cos(angle));\n  let x = 0;\n  let y = 0;\n  if (hLimits.start < orig.l) {\n    x = (orig.l - hLimits.start) / sin;\n    limits.l = Math.min(limits.l, orig.l - x);\n  } else if (hLimits.end > orig.r) {\n    x = (hLimits.end - orig.r) / sin;\n    limits.r = Math.max(limits.r, orig.r + x);\n  }\n  if (vLimits.start < orig.t) {\n    y = (orig.t - vLimits.start) / cos;\n    limits.t = Math.min(limits.t, orig.t - y);\n  } else if (vLimits.end > orig.b) {\n    y = (vLimits.end - orig.b) / cos;\n    limits.b = Math.max(limits.b, orig.b + y);\n  }\n}\nfunction buildPointLabelItems(scale, labelSizes, padding) {\n  const items = [];\n  const valueCount = scale._pointLabels.length;\n  const opts = scale.options;\n  const extra = getTickBackdropHeight(opts) / 2;\n  const outerDistance = scale.drawingArea;\n  const additionalAngle = opts.pointLabels.centerPointLabels ? PI / valueCount : 0;\n  for (let i = 0; i < valueCount; i++) {\n    const pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + padding[i], additionalAngle);\n    const angle = Math.round(toDegrees(_normalizeAngle(pointLabelPosition.angle + HALF_PI)));\n    const size = labelSizes[i];\n    const y = yForAngle(pointLabelPosition.y, size.h, angle);\n    const textAlign = getTextAlignForAngle(angle);\n    const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);\n    items.push({\n      x: pointLabelPosition.x,\n      y,\n      textAlign,\n      left,\n      top: y,\n      right: left + size.w,\n      bottom: y + size.h\n    });\n  }\n  return items;\n}\nfunction getTextAlignForAngle(angle) {\n  if (angle === 0 || angle === 180) {\n    return 'center';\n  } else if (angle < 180) {\n    return 'left';\n  }\n  return 'right';\n}\nfunction leftForTextAlign(x, w, align) {\n  if (align === 'right') {\n    x -= w;\n  } else if (align === 'center') {\n    x -= (w / 2);\n  }\n  return x;\n}\nfunction yForAngle(y, h, angle) {\n  if (angle === 90 || angle === 270) {\n    y -= (h / 2);\n  } else if (angle > 270 || angle < 90) {\n    y -= h;\n  }\n  return y;\n}\nfunction drawPointLabels(scale, labelCount) {\n  const {ctx, options: {pointLabels}} = scale;\n  for (let i = labelCount - 1; i >= 0; i--) {\n    const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));\n    const plFont = toFont(optsAtIndex.font);\n    const {x, y, textAlign, left, top, right, bottom} = scale._pointLabelItems[i];\n    const {backdropColor} = optsAtIndex;\n    if (!isNullOrUndef(backdropColor)) {\n      const borderRadius = toTRBLCorners(optsAtIndex.borderRadius);\n      const padding = toPadding(optsAtIndex.backdropPadding);\n      ctx.fillStyle = backdropColor;\n      const backdropLeft = left - padding.left;\n      const backdropTop = top - padding.top;\n      const backdropWidth = right - left + padding.width;\n      const backdropHeight = bottom - top + padding.height;\n      if (Object.values(borderRadius).some(v => v !== 0)) {\n        ctx.beginPath();\n        addRoundedRectPath(ctx, {\n          x: backdropLeft,\n          y: backdropTop,\n          w: backdropWidth,\n          h: backdropHeight,\n          radius: borderRadius,\n        });\n        ctx.fill();\n      } else {\n        ctx.fillRect(backdropLeft, backdropTop, backdropWidth, backdropHeight);\n      }\n    }\n    renderText(\n      ctx,\n      scale._pointLabels[i],\n      x,\n      y + (plFont.lineHeight / 2),\n      plFont,\n      {\n        color: optsAtIndex.color,\n        textAlign: textAlign,\n        textBaseline: 'middle'\n      }\n    );\n  }\n}\nfunction pathRadiusLine(scale, radius, circular, labelCount) {\n  const {ctx} = scale;\n  if (circular) {\n    ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);\n  } else {\n    let pointPosition = scale.getPointPosition(0, radius);\n    ctx.moveTo(pointPosition.x, pointPosition.y);\n    for (let i = 1; i < labelCount; i++) {\n      pointPosition = scale.getPointPosition(i, radius);\n      ctx.lineTo(pointPosition.x, pointPosition.y);\n    }\n  }\n}\nfunction drawRadiusLine(scale, gridLineOpts, radius, labelCount) {\n  const ctx = scale.ctx;\n  const circular = gridLineOpts.circular;\n  const {color, lineWidth} = gridLineOpts;\n  if ((!circular && !labelCount) || !color || !lineWidth || radius < 0) {\n    return;\n  }\n  ctx.save();\n  ctx.strokeStyle = color;\n  ctx.lineWidth = lineWidth;\n  ctx.setLineDash(gridLineOpts.borderDash);\n  ctx.lineDashOffset = gridLineOpts.borderDashOffset;\n  ctx.beginPath();\n  pathRadiusLine(scale, radius, circular, labelCount);\n  ctx.closePath();\n  ctx.stroke();\n  ctx.restore();\n}\nfunction createPointLabelContext(parent, index, label) {\n  return createContext(parent, {\n    label,\n    index,\n    type: 'pointLabel'\n  });\n}\nclass RadialLinearScale extends LinearScaleBase {\n  constructor(cfg) {\n    super(cfg);\n    this.xCenter = undefined;\n    this.yCenter = undefined;\n    this.drawingArea = undefined;\n    this._pointLabels = [];\n    this._pointLabelItems = [];\n  }\n  setDimensions() {\n    const padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);\n    const w = this.width = this.maxWidth - padding.width;\n    const h = this.height = this.maxHeight - padding.height;\n    this.xCenter = Math.floor(this.left + w / 2 + padding.left);\n    this.yCenter = Math.floor(this.top + h / 2 + padding.top);\n    this.drawingArea = Math.floor(Math.min(w, h) / 2);\n  }\n  determineDataLimits() {\n    const {min, max} = this.getMinMax(false);\n    this.min = isNumberFinite(min) && !isNaN(min) ? min : 0;\n    this.max = isNumberFinite(max) && !isNaN(max) ? max : 0;\n    this.handleTickRangeOptions();\n  }\n  computeTickLimit() {\n    return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n  }\n  generateTickLabels(ticks) {\n    LinearScaleBase.prototype.generateTickLabels.call(this, ticks);\n    this._pointLabels = this.getLabels()\n      .map((value, index) => {\n        const label = callback(this.options.pointLabels.callback, [value, index], this);\n        return label || label === 0 ? label : '';\n      })\n      .filter((v, i) => this.chart.getDataVisibility(i));\n  }\n  fit() {\n    const opts = this.options;\n    if (opts.display && opts.pointLabels.display) {\n      fitWithPointLabels(this);\n    } else {\n      this.setCenterPoint(0, 0, 0, 0);\n    }\n  }\n  setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {\n    this.xCenter += Math.floor((leftMovement - rightMovement) / 2);\n    this.yCenter += Math.floor((topMovement - bottomMovement) / 2);\n    this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(leftMovement, rightMovement, topMovement, bottomMovement));\n  }\n  getIndexAngle(index) {\n    const angleMultiplier = TAU / (this._pointLabels.length || 1);\n    const startAngle = this.options.startAngle || 0;\n    return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));\n  }\n  getDistanceFromCenterForValue(value) {\n    if (isNullOrUndef(value)) {\n      return NaN;\n    }\n    const scalingFactor = this.drawingArea / (this.max - this.min);\n    if (this.options.reverse) {\n      return (this.max - value) * scalingFactor;\n    }\n    return (value - this.min) * scalingFactor;\n  }\n  getValueForDistanceFromCenter(distance) {\n    if (isNullOrUndef(distance)) {\n      return NaN;\n    }\n    const scaledDistance = distance / (this.drawingArea / (this.max - this.min));\n    return this.options.reverse ? this.max - scaledDistance : this.min + scaledDistance;\n  }\n  getPointLabelContext(index) {\n    const pointLabels = this._pointLabels || [];\n    if (index >= 0 && index < pointLabels.length) {\n      const pointLabel = pointLabels[index];\n      return createPointLabelContext(this.getContext(), index, pointLabel);\n    }\n  }\n  getPointPosition(index, distanceFromCenter, additionalAngle = 0) {\n    const angle = this.getIndexAngle(index) - HALF_PI + additionalAngle;\n    return {\n      x: Math.cos(angle) * distanceFromCenter + this.xCenter,\n      y: Math.sin(angle) * distanceFromCenter + this.yCenter,\n      angle\n    };\n  }\n  getPointPositionForValue(index, value) {\n    return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n  }\n  getBasePosition(index) {\n    return this.getPointPositionForValue(index || 0, this.getBaseValue());\n  }\n  getPointLabelPosition(index) {\n    const {left, top, right, bottom} = this._pointLabelItems[index];\n    return {\n      left,\n      top,\n      right,\n      bottom,\n    };\n  }\n  drawBackground() {\n    const {backgroundColor, grid: {circular}} = this.options;\n    if (backgroundColor) {\n      const ctx = this.ctx;\n      ctx.save();\n      ctx.beginPath();\n      pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this._pointLabels.length);\n      ctx.closePath();\n      ctx.fillStyle = backgroundColor;\n      ctx.fill();\n      ctx.restore();\n    }\n  }\n  drawGrid() {\n    const ctx = this.ctx;\n    const opts = this.options;\n    const {angleLines, grid} = opts;\n    const labelCount = this._pointLabels.length;\n    let i, offset, position;\n    if (opts.pointLabels.display) {\n      drawPointLabels(this, labelCount);\n    }\n    if (grid.display) {\n      this.ticks.forEach((tick, index) => {\n        if (index !== 0) {\n          offset = this.getDistanceFromCenterForValue(tick.value);\n          const optsAtIndex = grid.setContext(this.getContext(index - 1));\n          drawRadiusLine(this, optsAtIndex, offset, labelCount);\n        }\n      });\n    }\n    if (angleLines.display) {\n      ctx.save();\n      for (i = labelCount - 1; i >= 0; i--) {\n        const optsAtIndex = angleLines.setContext(this.getPointLabelContext(i));\n        const {color, lineWidth} = optsAtIndex;\n        if (!lineWidth || !color) {\n          continue;\n        }\n        ctx.lineWidth = lineWidth;\n        ctx.strokeStyle = color;\n        ctx.setLineDash(optsAtIndex.borderDash);\n        ctx.lineDashOffset = optsAtIndex.borderDashOffset;\n        offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);\n        position = this.getPointPosition(i, offset);\n        ctx.beginPath();\n        ctx.moveTo(this.xCenter, this.yCenter);\n        ctx.lineTo(position.x, position.y);\n        ctx.stroke();\n      }\n      ctx.restore();\n    }\n  }\n  drawBorder() {}\n  drawLabels() {\n    const ctx = this.ctx;\n    const opts = this.options;\n    const tickOpts = opts.ticks;\n    if (!tickOpts.display) {\n      return;\n    }\n    const startAngle = this.getIndexAngle(0);\n    let offset, width;\n    ctx.save();\n    ctx.translate(this.xCenter, this.yCenter);\n    ctx.rotate(startAngle);\n    ctx.textAlign = 'center';\n    ctx.textBaseline = 'middle';\n    this.ticks.forEach((tick, index) => {\n      if (index === 0 && !opts.reverse) {\n        return;\n      }\n      const optsAtIndex = tickOpts.setContext(this.getContext(index));\n      const tickFont = toFont(optsAtIndex.font);\n      offset = this.getDistanceFromCenterForValue(this.ticks[index].value);\n      if (optsAtIndex.showLabelBackdrop) {\n        ctx.font = tickFont.string;\n        width = ctx.measureText(tick.label).width;\n        ctx.fillStyle = optsAtIndex.backdropColor;\n        const padding = toPadding(optsAtIndex.backdropPadding);\n        ctx.fillRect(\n          -width / 2 - padding.left,\n          -offset - tickFont.size / 2 - padding.top,\n          width + padding.width,\n          tickFont.size + padding.height\n        );\n      }\n      renderText(ctx, tick.label, 0, -offset, tickFont, {\n        color: optsAtIndex.color,\n      });\n    });\n    ctx.restore();\n  }\n  drawTitle() {}\n}\nRadialLinearScale.id = 'radialLinear';\nRadialLinearScale.defaults = {\n  display: true,\n  animate: true,\n  position: 'chartArea',\n  angleLines: {\n    display: true,\n    lineWidth: 1,\n    borderDash: [],\n    borderDashOffset: 0.0\n  },\n  grid: {\n    circular: false\n  },\n  startAngle: 0,\n  ticks: {\n    showLabelBackdrop: true,\n    callback: Ticks.formatters.numeric\n  },\n  pointLabels: {\n    backdropColor: undefined,\n    backdropPadding: 2,\n    display: true,\n    font: {\n      size: 10\n    },\n    callback(label) {\n      return label;\n    },\n    padding: 5,\n    centerPointLabels: false\n  }\n};\nRadialLinearScale.defaultRoutes = {\n  'angleLines.color': 'borderColor',\n  'pointLabels.color': 'color',\n  'ticks.color': 'color'\n};\nRadialLinearScale.descriptors = {\n  angleLines: {\n    _fallback: 'grid'\n  }\n};\n\nconst INTERVALS = {\n  millisecond: {common: true, size: 1, steps: 1000},\n  second: {common: true, size: 1000, steps: 60},\n  minute: {common: true, size: 60000, steps: 60},\n  hour: {common: true, size: 3600000, steps: 24},\n  day: {common: true, size: 86400000, steps: 30},\n  week: {common: false, size: 604800000, steps: 4},\n  month: {common: true, size: 2.628e9, steps: 12},\n  quarter: {common: false, size: 7.884e9, steps: 4},\n  year: {common: true, size: 3.154e10}\n};\nconst UNITS = (Object.keys(INTERVALS));\nfunction sorter(a, b) {\n  return a - b;\n}\nfunction parse(scale, input) {\n  if (isNullOrUndef(input)) {\n    return null;\n  }\n  const adapter = scale._adapter;\n  const {parser, round, isoWeekday} = scale._parseOpts;\n  let value = input;\n  if (typeof parser === 'function') {\n    value = parser(value);\n  }\n  if (!isNumberFinite(value)) {\n    value = typeof parser === 'string'\n      ? adapter.parse(value, parser)\n      : adapter.parse(value);\n  }\n  if (value === null) {\n    return null;\n  }\n  if (round) {\n    value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true)\n      ? adapter.startOf(value, 'isoWeek', isoWeekday)\n      : adapter.startOf(value, round);\n  }\n  return +value;\n}\nfunction determineUnitForAutoTicks(minUnit, min, max, capacity) {\n  const ilen = UNITS.length;\n  for (let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {\n    const interval = INTERVALS[UNITS[i]];\n    const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;\n    if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\n      return UNITS[i];\n    }\n  }\n  return UNITS[ilen - 1];\n}\nfunction determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n  for (let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n    const unit = UNITS[i];\n    if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n      return unit;\n    }\n  }\n  return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}\nfunction determineMajorUnit(unit) {\n  for (let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {\n    if (INTERVALS[UNITS[i]].common) {\n      return UNITS[i];\n    }\n  }\n}\nfunction addTick(ticks, time, timestamps) {\n  if (!timestamps) {\n    ticks[time] = true;\n  } else if (timestamps.length) {\n    const {lo, hi} = _lookup(timestamps, time);\n    const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];\n    ticks[timestamp] = true;\n  }\n}\nfunction setMajorTicks(scale, ticks, map, majorUnit) {\n  const adapter = scale._adapter;\n  const first = +adapter.startOf(ticks[0].value, majorUnit);\n  const last = ticks[ticks.length - 1].value;\n  let major, index;\n  for (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {\n    index = map[major];\n    if (index >= 0) {\n      ticks[index].major = true;\n    }\n  }\n  return ticks;\n}\nfunction ticksFromTimestamps(scale, values, majorUnit) {\n  const ticks = [];\n  const map = {};\n  const ilen = values.length;\n  let i, value;\n  for (i = 0; i < ilen; ++i) {\n    value = values[i];\n    map[value] = i;\n    ticks.push({\n      value,\n      major: false\n    });\n  }\n  return (ilen === 0 || !majorUnit) ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\n}\nclass TimeScale extends Scale {\n  constructor(props) {\n    super(props);\n    this._cache = {\n      data: [],\n      labels: [],\n      all: []\n    };\n    this._unit = 'day';\n    this._majorUnit = undefined;\n    this._offsets = {};\n    this._normalized = false;\n    this._parseOpts = undefined;\n  }\n  init(scaleOpts, opts) {\n    const time = scaleOpts.time || (scaleOpts.time = {});\n    const adapter = this._adapter = new adapters._date(scaleOpts.adapters.date);\n    adapter.init(opts);\n    mergeIf(time.displayFormats, adapter.formats());\n    this._parseOpts = {\n      parser: time.parser,\n      round: time.round,\n      isoWeekday: time.isoWeekday\n    };\n    super.init(scaleOpts);\n    this._normalized = opts.normalized;\n  }\n  parse(raw, index) {\n    if (raw === undefined) {\n      return null;\n    }\n    return parse(this, raw);\n  }\n  beforeLayout() {\n    super.beforeLayout();\n    this._cache = {\n      data: [],\n      labels: [],\n      all: []\n    };\n  }\n  determineDataLimits() {\n    const options = this.options;\n    const adapter = this._adapter;\n    const unit = options.time.unit || 'day';\n    let {min, max, minDefined, maxDefined} = this.getUserBounds();\n    function _applyBounds(bounds) {\n      if (!minDefined && !isNaN(bounds.min)) {\n        min = Math.min(min, bounds.min);\n      }\n      if (!maxDefined && !isNaN(bounds.max)) {\n        max = Math.max(max, bounds.max);\n      }\n    }\n    if (!minDefined || !maxDefined) {\n      _applyBounds(this._getLabelBounds());\n      if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {\n        _applyBounds(this.getMinMax(false));\n      }\n    }\n    min = isNumberFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);\n    max = isNumberFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;\n    this.min = Math.min(min, max - 1);\n    this.max = Math.max(min + 1, max);\n  }\n  _getLabelBounds() {\n    const arr = this.getLabelTimestamps();\n    let min = Number.POSITIVE_INFINITY;\n    let max = Number.NEGATIVE_INFINITY;\n    if (arr.length) {\n      min = arr[0];\n      max = arr[arr.length - 1];\n    }\n    return {min, max};\n  }\n  buildTicks() {\n    const options = this.options;\n    const timeOpts = options.time;\n    const tickOpts = options.ticks;\n    const timestamps = tickOpts.source === 'labels' ? this.getLabelTimestamps() : this._generate();\n    if (options.bounds === 'ticks' && timestamps.length) {\n      this.min = this._userMin || timestamps[0];\n      this.max = this._userMax || timestamps[timestamps.length - 1];\n    }\n    const min = this.min;\n    const max = this.max;\n    const ticks = _filterBetween(timestamps, min, max);\n    this._unit = timeOpts.unit || (tickOpts.autoSkip\n      ? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min))\n      : determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));\n    this._majorUnit = !tickOpts.major.enabled || this._unit === 'year' ? undefined\n      : determineMajorUnit(this._unit);\n    this.initOffsets(timestamps);\n    if (options.reverse) {\n      ticks.reverse();\n    }\n    return ticksFromTimestamps(this, ticks, this._majorUnit);\n  }\n  afterAutoSkip() {\n    if (this.options.offsetAfterAutoskip) {\n      this.initOffsets(this.ticks.map(tick => +tick.value));\n    }\n  }\n  initOffsets(timestamps) {\n    let start = 0;\n    let end = 0;\n    let first, last;\n    if (this.options.offset && timestamps.length) {\n      first = this.getDecimalForValue(timestamps[0]);\n      if (timestamps.length === 1) {\n        start = 1 - first;\n      } else {\n        start = (this.getDecimalForValue(timestamps[1]) - first) / 2;\n      }\n      last = this.getDecimalForValue(timestamps[timestamps.length - 1]);\n      if (timestamps.length === 1) {\n        end = last;\n      } else {\n        end = (last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;\n      }\n    }\n    const limit = timestamps.length < 3 ? 0.5 : 0.25;\n    start = _limitValue(start, 0, limit);\n    end = _limitValue(end, 0, limit);\n    this._offsets = {start, end, factor: 1 / (start + 1 + end)};\n  }\n  _generate() {\n    const adapter = this._adapter;\n    const min = this.min;\n    const max = this.max;\n    const options = this.options;\n    const timeOpts = options.time;\n    const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));\n    const stepSize = valueOrDefault(timeOpts.stepSize, 1);\n    const weekday = minor === 'week' ? timeOpts.isoWeekday : false;\n    const hasWeekday = isNumber(weekday) || weekday === true;\n    const ticks = {};\n    let first = min;\n    let time, count;\n    if (hasWeekday) {\n      first = +adapter.startOf(first, 'isoWeek', weekday);\n    }\n    first = +adapter.startOf(first, hasWeekday ? 'day' : minor);\n    if (adapter.diff(max, min, minor) > 100000 * stepSize) {\n      throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);\n    }\n    const timestamps = options.ticks.source === 'data' && this.getDataTimestamps();\n    for (time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++) {\n      addTick(ticks, time, timestamps);\n    }\n    if (time === max || options.bounds === 'ticks' || count === 1) {\n      addTick(ticks, time, timestamps);\n    }\n    return Object.keys(ticks).sort((a, b) => a - b).map(x => +x);\n  }\n  getLabelForValue(value) {\n    const adapter = this._adapter;\n    const timeOpts = this.options.time;\n    if (timeOpts.tooltipFormat) {\n      return adapter.format(value, timeOpts.tooltipFormat);\n    }\n    return adapter.format(value, timeOpts.displayFormats.datetime);\n  }\n  _tickFormatFunction(time, index, ticks, format) {\n    const options = this.options;\n    const formats = options.time.displayFormats;\n    const unit = this._unit;\n    const majorUnit = this._majorUnit;\n    const minorFormat = unit && formats[unit];\n    const majorFormat = majorUnit && formats[majorUnit];\n    const tick = ticks[index];\n    const major = majorUnit && majorFormat && tick && tick.major;\n    const label = this._adapter.format(time, format || (major ? majorFormat : minorFormat));\n    const formatter = options.ticks.callback;\n    return formatter ? callback(formatter, [label, index, ticks], this) : label;\n  }\n  generateTickLabels(ticks) {\n    let i, ilen, tick;\n    for (i = 0, ilen = ticks.length; i < ilen; ++i) {\n      tick = ticks[i];\n      tick.label = this._tickFormatFunction(tick.value, i, ticks);\n    }\n  }\n  getDecimalForValue(value) {\n    return value === null ? NaN : (value - this.min) / (this.max - this.min);\n  }\n  getPixelForValue(value) {\n    const offsets = this._offsets;\n    const pos = this.getDecimalForValue(value);\n    return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);\n  }\n  getValueForPixel(pixel) {\n    const offsets = this._offsets;\n    const pos = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n    return this.min + pos * (this.max - this.min);\n  }\n  _getLabelSize(label) {\n    const ticksOpts = this.options.ticks;\n    const tickLabelWidth = this.ctx.measureText(label).width;\n    const angle = toRadians(this.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\n    const cosRotation = Math.cos(angle);\n    const sinRotation = Math.sin(angle);\n    const tickFontSize = this._resolveTickFontOptions(0).size;\n    return {\n      w: (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation),\n      h: (tickLabelWidth * sinRotation) + (tickFontSize * cosRotation)\n    };\n  }\n  _getLabelCapacity(exampleTime) {\n    const timeOpts = this.options.time;\n    const displayFormats = timeOpts.displayFormats;\n    const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\n    const exampleLabel = this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [exampleTime], this._majorUnit), format);\n    const size = this._getLabelSize(exampleLabel);\n    const capacity = Math.floor(this.isHorizontal() ? this.width / size.w : this.height / size.h) - 1;\n    return capacity > 0 ? capacity : 1;\n  }\n  getDataTimestamps() {\n    let timestamps = this._cache.data || [];\n    let i, ilen;\n    if (timestamps.length) {\n      return timestamps;\n    }\n    const metas = this.getMatchingVisibleMetas();\n    if (this._normalized && metas.length) {\n      return (this._cache.data = metas[0].controller.getAllParsedValues(this));\n    }\n    for (i = 0, ilen = metas.length; i < ilen; ++i) {\n      timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));\n    }\n    return (this._cache.data = this.normalize(timestamps));\n  }\n  getLabelTimestamps() {\n    const timestamps = this._cache.labels || [];\n    let i, ilen;\n    if (timestamps.length) {\n      return timestamps;\n    }\n    const labels = this.getLabels();\n    for (i = 0, ilen = labels.length; i < ilen; ++i) {\n      timestamps.push(parse(this, labels[i]));\n    }\n    return (this._cache.labels = this._normalized ? timestamps : this.normalize(timestamps));\n  }\n  normalize(values) {\n    return _arrayUnique(values.sort(sorter));\n  }\n}\nTimeScale.id = 'time';\nTimeScale.defaults = {\n  bounds: 'data',\n  adapters: {},\n  time: {\n    parser: false,\n    unit: false,\n    round: false,\n    isoWeekday: false,\n    minUnit: 'millisecond',\n    displayFormats: {}\n  },\n  ticks: {\n    source: 'auto',\n    major: {\n      enabled: false\n    }\n  }\n};\n\nfunction interpolate(table, val, reverse) {\n  let lo = 0;\n  let hi = table.length - 1;\n  let prevSource, nextSource, prevTarget, nextTarget;\n  if (reverse) {\n    if (val >= table[lo].pos && val <= table[hi].pos) {\n      ({lo, hi} = _lookupByKey(table, 'pos', val));\n    }\n    ({pos: prevSource, time: prevTarget} = table[lo]);\n    ({pos: nextSource, time: nextTarget} = table[hi]);\n  } else {\n    if (val >= table[lo].time && val <= table[hi].time) {\n      ({lo, hi} = _lookupByKey(table, 'time', val));\n    }\n    ({time: prevSource, pos: prevTarget} = table[lo]);\n    ({time: nextSource, pos: nextTarget} = table[hi]);\n  }\n  const span = nextSource - prevSource;\n  return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;\n}\nclass TimeSeriesScale extends TimeScale {\n  constructor(props) {\n    super(props);\n    this._table = [];\n    this._minPos = undefined;\n    this._tableRange = undefined;\n  }\n  initOffsets() {\n    const timestamps = this._getTimestampsForTable();\n    const table = this._table = this.buildLookupTable(timestamps);\n    this._minPos = interpolate(table, this.min);\n    this._tableRange = interpolate(table, this.max) - this._minPos;\n    super.initOffsets(timestamps);\n  }\n  buildLookupTable(timestamps) {\n    const {min, max} = this;\n    const items = [];\n    const table = [];\n    let i, ilen, prev, curr, next;\n    for (i = 0, ilen = timestamps.length; i < ilen; ++i) {\n      curr = timestamps[i];\n      if (curr >= min && curr <= max) {\n        items.push(curr);\n      }\n    }\n    if (items.length < 2) {\n      return [\n        {time: min, pos: 0},\n        {time: max, pos: 1}\n      ];\n    }\n    for (i = 0, ilen = items.length; i < ilen; ++i) {\n      next = items[i + 1];\n      prev = items[i - 1];\n      curr = items[i];\n      if (Math.round((next + prev) / 2) !== curr) {\n        table.push({time: curr, pos: i / (ilen - 1)});\n      }\n    }\n    return table;\n  }\n  _getTimestampsForTable() {\n    let timestamps = this._cache.all || [];\n    if (timestamps.length) {\n      return timestamps;\n    }\n    const data = this.getDataTimestamps();\n    const label = this.getLabelTimestamps();\n    if (data.length && label.length) {\n      timestamps = this.normalize(data.concat(label));\n    } else {\n      timestamps = data.length ? data : label;\n    }\n    timestamps = this._cache.all = timestamps;\n    return timestamps;\n  }\n  getDecimalForValue(value) {\n    return (interpolate(this._table, value) - this._minPos) / this._tableRange;\n  }\n  getValueForPixel(pixel) {\n    const offsets = this._offsets;\n    const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n    return interpolate(this._table, decimal * this._tableRange + this._minPos, true);\n  }\n}\nTimeSeriesScale.id = 'timeseries';\nTimeSeriesScale.defaults = TimeScale.defaults;\n\nvar scales = /*#__PURE__*/Object.freeze({\n__proto__: null,\nCategoryScale: CategoryScale,\nLinearScale: LinearScale,\nLogarithmicScale: LogarithmicScale,\nRadialLinearScale: RadialLinearScale,\nTimeScale: TimeScale,\nTimeSeriesScale: TimeSeriesScale\n});\n\nconst registerables = [\n  controllers,\n  elements,\n  plugins,\n  scales,\n];\n\nexport { Animation, Animations, ArcElement, BarController, BarElement, BasePlatform, BasicPlatform, BubbleController, CategoryScale, Chart, DatasetController, plugin_decimation as Decimation, DomPlatform, DoughnutController, Element, index as Filler, Interaction, plugin_legend as Legend, LineController, LineElement, LinearScale, LogarithmicScale, PieController, PointElement, PolarAreaController, RadarController, RadialLinearScale, Scale, ScatterController, plugin_subtitle as SubTitle, Ticks, TimeScale, TimeSeriesScale, plugin_title as Title, plugin_tooltip as Tooltip, adapters as _adapters, _detectPlatform, animator, controllers, elements, layouts, plugins, registerables, registry, scales };\n", "import {Chart, registerables} from '../dist/chart.mjs';\n\nChart.register(...registerables);\n\nexport default Chart;\n", "var __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp.call(b, prop))\n      __defNormalProp(a, prop, b[prop]);\n  if (__getOwnPropSymbols)\n    for (var prop of __getOwnPropSymbols(b)) {\n      if (__propIsEnum.call(b, prop))\n        __defNormalProp(a, prop, b[prop]);\n    }\n  return a;\n};\nimport { Controller } from \"@hotwired/stimulus\";\nimport Chart from \"chart.js/auto\";\nclass src_default extends Controller {\n  connect() {\n    const element = this.hasCanvasTarget ? this.canvasTarget : this.element;\n    this.chart = new Chart(element.getContext(\"2d\"), {\n      type: this.typeValue,\n      data: this.chartData,\n      options: this.chartOptions\n    });\n  }\n  disconnect() {\n    this.chart.destroy();\n    this.chart = void 0;\n  }\n  get chartData() {\n    if (!this.hasDataValue) {\n      console.warn(\"[stimulus-chartjs] You need to pass data as JSON to see the chart.\");\n    }\n    return this.dataValue;\n  }\n  get chartOptions() {\n    return __spreadValues(__spreadValues({}, this.defaultOptions), this.optionsValue);\n  }\n  get defaultOptions() {\n    return {};\n  }\n}\nsrc_default.targets = [\"canvas\"];\nsrc_default.values = {\n  type: {\n    type: String,\n    default: \"line\"\n  },\n  data: Object,\n  options: Object\n};\nexport { src_default as default };\n", "import ChartJs from \"stimulus-chartjs\"\nexport default ChartJs", "import { Controller as s } from \"@hotwired/stimulus\";\nconst c = class c extends s {\n  initialize() {\n    this.toggle = this.toggle.bind(this), this.refresh = this.refresh.bind(this);\n  }\n  checkboxAllTargetConnected(e) {\n    e.addEventListener(\"change\", this.toggle), this.refresh();\n  }\n  checkboxTargetConnected(e) {\n    e.addEventListener(\"change\", this.refresh), this.refresh();\n  }\n  checkboxAllTargetDisconnected(e) {\n    e.removeEventListener(\"change\", this.toggle), this.refresh();\n  }\n  checkboxTargetDisconnected(e) {\n    e.removeEventListener(\"change\", this.refresh), this.refresh();\n  }\n  toggle(e) {\n    e.preventDefault(), this.checkboxTargets.forEach((t) => {\n      t.checked = e.target.checked, this.triggerInputEvent(t);\n    });\n  }\n  refresh() {\n    const e = this.checkboxTargets.length, t = this.checked.length;\n    this.checkboxAllTarget.checked = t > 0, this.checkboxAllTarget.indeterminate = t > 0 && t < e;\n  }\n  triggerInputEvent(e) {\n    const t = new Event(\"input\", { bubbles: !1, cancelable: !0 });\n    e.dispatchEvent(t);\n  }\n  get checked() {\n    return this.checkboxTargets.filter((e) => e.checked);\n  }\n  get unchecked() {\n    return this.checkboxTargets.filter((e) => !e.checked);\n  }\n};\nc.targets = [\"checkboxAll\", \"checkbox\"];\nlet h = c;\nexport {\n  h as default\n};\n", "import CheckboxSelectAll from \"stimulus-checkbox-select-all\"\nexport default CheckboxSelectAll", "/*\n  Checkbox to Form Stimulus Controller v1.0.0\n\n  This controller is able to listen on click events from a checkbox input and put this information to hidden fields\n  that are put on a given outputForm Target.\n\n*/\n\nimport {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['checkbox', 'outputForm']\n    static values = {outputFieldName: String}\n\n    checkboxTargetConnected(checkbox) {\n        Array.prototype.forEach.call(this.outputFormTarget.querySelectorAll('input[type=\"hidden\"]'), function (element) {\n            if (element.value === checkbox.value) {\n                checkbox.checked = true\n            }\n        })\n    }\n\n    perform(event) {\n        let currentCheckboxValue = event.target.value\n        let existingCheckbox = document.getElementById(`${this.outputFieldNameValue}_${currentCheckboxValue}`)\n\n        if (existingCheckbox === null && event.target.checked === true) {\n            let newHiddenField = document.createElement('input')\n            newHiddenField.type = 'hidden'\n            newHiddenField.id = `${this.outputFieldNameValue}_${currentCheckboxValue}`\n            newHiddenField.name = this.outputFieldNameValue\n            newHiddenField.value = currentCheckboxValue\n            this.outputFormTarget.appendChild(newHiddenField)\n        } else {\n            existingCheckbox.remove()\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['source', 'copyButton']\n\n    connect() {\n        if (this._clipboardSupport()) {\n            this.element.classList.add('clipboard--supported')\n        } else {\n            this.copyButtonTarget.style.display = 'none'\n        }\n    }\n\n    async copy() {\n        const text = this.sourceTarget instanceof HTMLInputElement\n            ? this.sourceTarget.value\n            : this.sourceTarget.innerText.trim()\n\n        try {\n            await navigator.clipboard.writeText(text)\n        } catch (error) {\n            console.error('Unable to copy text to clipboard', error)\n        }\n    }\n\n    _clipboardSupport() {\n        return window.isSecureContext &&\n            typeof navigator.clipboard?.writeText === 'function'\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['trigger', 'collapsible']\n    static values = {state: {type: String, default: 'open'}, open: String, close: String}\n\n    toggle(_event) {\n        if (this.stateValue === 'open') {\n            Array.prototype.forEach.call(this.collapsibleTargets, function (element) {\n                if (element.getAttribute('aria-expanded') === 'true') element.click()\n            })\n            this.stateValue = 'closed'\n            this.triggerTarget.innerText = this.closeValue\n        } else if (this.stateValue === 'closed') {\n            Array.prototype.forEach.call(this.collapsibleTargets, function (element) {\n                if (element.getAttribute('aria-expanded') === 'false') element.click()\n            })\n            this.stateValue = 'open'\n            this.triggerTarget.innerText = this.openValue\n        }\n    }\n}\n", "import {Controller} from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n    connect() {\n        this._handleShown = this._handleShown.bind(this)\n        this._handleHidden = this._handleHidden.bind(this)\n\n        const targetId = this.element.getAttribute('href')\n        this._target = document.querySelector(targetId)\n        if (!this._target) return\n\n        this._target.addEventListener('shown.bs.collapse', this._handleShown)\n        this._target.addEventListener('hidden.bs.collapse', this._handleHidden)\n\n        this._updateLabel(this._target.classList.contains('show'))\n    }\n\n    disconnect() {\n        if (!this._target) return\n        this._target.removeEventListener('shown.bs.collapse', this._handleShown)\n        this._target.removeEventListener('hidden.bs.collapse', this._handleHidden)\n    }\n\n    _handleShown(event) {\n        // Events von verschachtelten Collapses bubblen bis hierher \u2013 ignorieren\n        if (event.target !== this._target) return\n        const hadFocus = this._triggerHasFocus()\n        this._updateLabel(true)\n        if (hadFocus) this._refocusTrigger()\n    }\n\n    _handleHidden(event) {\n        if (event.target !== this._target) return\n        const hadFocus = this._triggerHasFocus()\n        this._updateLabel(false)\n        if (hadFocus) this._refocusTrigger()\n    }\n\n    _updateLabel(isExpanded) {\n        const name = this.element.dataset.categoryName\n        const label = isExpanded\n            ? this.element.dataset.labelCollapse\n            : this.element.dataset.labelExpand\n        if (!label) return\n        this.element.setAttribute('aria-label', name ? `${label}: ${name}` : label)\n    }\n\n    _triggerHasFocus() {\n        const active = document.activeElement\n        if (!active) return false\n        if (active === this.element) return true\n        return !!(\n            window.__a11yFocusResetElement &&\n            active === window.__a11yFocusResetElement &&\n            window.__lastFocusedElement === this.element\n        )\n    }\n\n    _refocusTrigger() {\n        if (typeof window.refocusAndScrollIntoView === 'function') {\n            window.refocusAndScrollIntoView(this.element)\n        } else {\n            this.element.blur()\n            requestAnimationFrame(() => this.element.focus())\n        }\n    }\n}", "import {Controller} from '@hotwired/stimulus'\nimport {Collapse} from 'bootstrap'\n\nexport default class extends Controller {\n    connect() {\n        // TODO: Actually make this work. For some reasons this wont work and cannot trigger the element itself,\n        //  only the collapse can be triggered. @see popover_controller.js\n        new Collapse(this.element)\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\n// Delay between announcing the expiry and submitting the form, so screen readers can read the announcement first\nconst SUBMIT_DELAY_MS = 2000\n\nexport default class extends Controller {\n    static targets = ['hour', 'minute', 'second']\n    // announcements: remaining minutes => text, announced once when the remaining time falls below the minutes\n    static values = {minutes: Number, announcements: Object, expiredText: String}\n\n    initialize() {\n        this.countdownTimer = this.countdownTimer.bind(this)\n\n        const date = new Date()\n        this.initialTime = date.setMinutes(date.getMinutes() + this.minutesValue)\n        this.announcedMinutes = new Set()\n    }\n\n    connect() {\n        this.countdownTimer()\n        this._timeout = setInterval(this.countdownTimer, 1000)\n    }\n\n    disconnect() {\n        if (this._timeout) clearInterval(this._timeout)\n        if (this._submitTimeout) clearTimeout(this._submitTimeout)\n    }\n\n    countdownTimer() {\n        const date = new Date()\n        date.setMinutes(date.getMinutes() + this.minutesValue)\n\n        const difference = +this.initialTime - +new Date()\n\n        if (difference > 0) {\n            const parts = {\n                hours: Math.floor((difference / (1000 * 60 * 60)) % 24),\n                minutes: Math.floor((difference / 1000 / 60) % 60),\n                seconds: Math.floor((difference / 1000) % 60),\n            }\n\n            this.hourTarget.innerText = parts['hours']\n            this.minuteTarget.innerText = parts['minutes']\n            this.secondTarget.innerText = parts['seconds']\n\n            this._announceRemainingTime(difference)\n        } else {\n            if (this._timeout) clearInterval(this._timeout)\n            this._announce('sr-announcer', this.expiredTextValue)\n            this._submitTimeout = setTimeout(() => this._submitClosestForm(), SUBMIT_DELAY_MS)\n        }\n    }\n\n    _announceRemainingTime(difference) {\n        Object.entries(this.announcementsValue).forEach(([minutes, text]) => {\n            if (difference > minutes * 60 * 1000 || this.announcedMinutes.has(minutes)) return\n\n            this.announcedMinutes.add(minutes)\n            this._announce('sr-announcer-polite', text)\n        })\n    }\n\n    _announce(announcerId, text) {\n        const announcer = document.getElementById(announcerId)\n        if (!announcer || !text) return\n\n        // Clear first, so the same text is announced again when it appears a second time\n        announcer.textContent = ''\n        setTimeout(() => { announcer.textContent = text }, 100)\n    }\n\n    _submitClosestForm() {\n        const form = this.element.closest('form')\n        Rails.fire(form, 'submit')\n\n        if (form.dataset.remote !== 'true') form.submit()\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {debounce} from 'debounce'\n\nexport default class extends Controller {\n    static values = {\n        debug: {type: Boolean, default: false},\n        debounceWait: {type: Number, default: 500},\n        spinner: String,\n        spinnerLabel: String,\n        filterFormSelector: String,\n        perPageName: {type: String, default: 'per_page'},\n        perPageDefault: {type: Number, default: 10},\n        sortName: {type: String, default: 'q[s]'},\n        sessionStorageKey: String,\n        autoFillUrlEnabled: {type: Boolean, default: true},\n        autoFillStorageEnabled: {type: Boolean, default: true}\n    }\n    static targets = ['tableWrapper', 'filterIndicator', 'filterReset']\n\n    initialize() {\n        // Debounce action method, triggered by form elements.\n        this.debouncedSubmitFilterForm = debounce(this.submitFilterForm, this.debounceWaitValue)\n        this._handlePostError = this._handlePostError.bind(this)\n        this._handleResults = this._handleResults.bind(this)\n    }\n\n    connect() {\n        this._showLoader()\n        this._filterForm = this.element.querySelector(this.filterFormSelector)\n        this._installAjaxErrorListener()\n        this._installResultsListener()\n        this._installFocusRestoreObserver()\n        this._addPerPageField()\n        this._addPageField()\n        this._addSortField()\n        this._originalFilterFormData = this._getFormData()\n        this._setFormData()\n        this._saveToSessionStorage()\n        this._toggleFilterReset()\n        Rails.fire(this._filterForm, 'submit')\n\n        // Stimulus Power Move - For Reference.\n        this.element[this.identifier] = {\n            submitFilterForm: this.submitFilterForm.bind(this),\n            debouncedSubmitFilterForm: this.debouncedSubmitFilterForm.bind(this),\n            resetFilterForm: this.resetFilterForm.bind(this),\n            reloadFilterForm: this.reloadFilterForm.bind(this)\n        }\n    }\n\n    disconnect() {\n        this._uninstallAjaxErrorListener()\n        this._uninstallResultsListener()\n        this._uninstallFocusRestoreObserver()\n    }\n\n    submitFilterForm(_event) {\n        this._log('fire rails form submit')\n        this._announceNextResults = true\n        this._showLoader()\n        this._pageField.value = '' // Reset page field whenever the users uses the form filters.\n        this._saveToSessionStorage()\n        this._setUrlSearchParams()\n        this._toggleFilterReset()\n        Rails.fire(this._filterForm, 'submit')\n    }\n\n    reloadFilterForm(_event) {\n        this._log('reload form')\n        this._showLoader()\n        Rails.fire(this._filterForm, 'submit')\n    }\n\n    resetFilterForm(_event) {\n        this._log('reset form')\n        this._announceNextResults = true\n        this._showLoader()\n        this._filterForm.reset()\n        // Hidden fields are not reset by form.reset().\n        this._pageField.value = ''\n        this._sortField.value = ''\n        this._saveToSessionStorage()\n        this._setUrlSearchParams()\n        this._toggleFilterReset()\n        Rails.fire(this._filterForm, 'submit')\n    }\n\n    selectPerPage(event) {\n        this._log('select per page')\n        this._focusTableAfterLoad(event.currentTarget)\n        this._showLoader()\n        this._perPageField.value = event.currentTarget.dataset.perPage\n        this._saveToSessionStorage()\n        this._setUrlSearchParams()\n    }\n\n    filterTable(event) {\n        this._log('filter table')\n        this._rememberSortLinkFocus(event.currentTarget)\n        this._showLoader()\n        let sortParam = ''\n        if (this.autoFillUrlEnabledValue && event.currentTarget instanceof HTMLAnchorElement) {\n            sortParam = new URL(event.currentTarget.href).searchParams.get(this.sortNameValue)\n        }\n        this._sortField.value = sortParam\n        this._saveToSessionStorage()\n        this._setUrlSearchParams()\n        this._toggleFilterReset()\n    }\n\n    paginate(event) {\n        this._log('paginate')\n        this._focusTableAfterLoad(event.currentTarget)\n        this._showLoader()\n        let perPageParam = ''\n        if (this.autoFillUrlEnabledValue) perPageParam = new URL(event.currentTarget.href).searchParams.get('page')\n        this._pageField.value = perPageParam === '1' ? '' : perPageParam\n        this._saveToSessionStorage()\n        this._setUrlSearchParams()\n    }\n\n    get spinner() {\n        return this.spinnerValue || `<tr><td colspan=\"42\"><div class=\"text-center py-4\"><div class=\"spinner-border\" role=\"status\"><span class=\"visually-hidden\">${this.spinnerLabel}</span></div></div></td></tr>`\n    }\n\n    get spinnerLabel() {\n        return this.spinnerLabelValue || 'Loading...'\n    }\n\n    get filterFormSelector() {\n        return this.filterFormSelectorValue || 'form'\n    }\n\n    get sessionStorageKey() {\n        return this.sessionStorageKeyValue || this.filterFormSelector\n    }\n\n    _rememberSortLinkFocus(link) {\n        if (!(link instanceof HTMLAnchorElement)) return\n\n        const th = link.closest('th')\n        if (!th) return\n\n        this._pendingSortFocus = {\n            link: link,\n            column: Array.prototype.indexOf.call(th.parentElement.children, th)\n        }\n        clearTimeout(this._pendingSortFocusTimer)\n        this._pendingSortFocusTimer = setTimeout(() => {\n            this._pendingSortFocus = null\n        }, 5000)\n    }\n\n    _focusTableAfterLoad(link) {\n        link.addEventListener('ajax:success', () => {\n            const target = this.tableWrapperTarget.querySelector('table') || this.tableWrapperTarget\n            target.setAttribute('tabindex', '-1')\n            window.refocusAndScrollIntoView(target)\n        }, {once: true})\n    }\n\n    _installFocusRestoreObserver() {\n        this._focusRestoreObserver = new MutationObserver(() => this._restoreSortLinkFocus())\n        this._focusRestoreObserver.observe(this.element, {childList: true, subtree: true})\n    }\n\n    _uninstallFocusRestoreObserver() {\n        if (this._focusRestoreObserver) this._focusRestoreObserver.disconnect()\n        clearTimeout(this._pendingSortFocusTimer)\n        this._pendingSortFocus = null\n    }\n\n    _restoreSortLinkFocus() {\n        const pending = this._pendingSortFocus\n        if (!pending || pending.link.isConnected) return\n\n        const link = this.tableWrapperTarget.querySelector(`thead tr th:nth-child(${pending.column + 1}) a`)\n        if (!link) return\n\n        this._pendingSortFocus = null\n        clearTimeout(this._pendingSortFocusTimer)\n        if (typeof window.refocusAndScrollIntoView === 'function') {\n            window.refocusAndScrollIntoView(link)\n        } else {\n            link.focus()\n        }\n    }\n\n    _toggleFilterReset() {\n        this._log('toggle filter reset')\n        if (!this.hasFilterIndicatorTarget) return\n\n        const original_form_data = Object.assign({}, this._originalFilterFormData)\n        const current_form_data = Object.assign({}, this._getFormData())\n\n        // We do not want to compare the per_page value because it should not reset.\n        delete original_form_data[this.perPageNameValue]\n        delete current_form_data[this.perPageNameValue]\n\n        if (JSON.stringify(original_form_data) === JSON.stringify(current_form_data)) {\n            this.filterIndicatorTarget.querySelector('.fa-layers-counter').classList.add('d-none')\n            this.filterResetTarget.classList.add('d-none')\n        } else {\n            this.filterIndicatorTarget.querySelector('.fa-layers-counter').classList.remove('d-none')\n            this.filterResetTarget.classList.remove('d-none')\n        }\n    }\n\n    _setUrlSearchParams() {\n        if (!this.autoFillUrlEnabledValue) return false\n\n        const original_form_data = Object.assign({}, this._originalFilterFormData)\n        const current_form_data = Object.assign({}, this._getFormData())\n\n        if (JSON.stringify(original_form_data) === JSON.stringify(current_form_data)) {\n            window.history.replaceState({}, '', location.pathname)\n        } else {\n            const searchParamsString = new URLSearchParams(this._getFormData(false)).toString()\n            window.history.replaceState({}, '', `${location.pathname}?${searchParamsString}`)\n        }\n    }\n\n    _showLoader() {\n        this._log('show loader spinner')\n        let tbody = this.tableWrapperTarget.querySelector('tbody')\n        if (tbody !== null) {\n            tbody.innerHTML = this.spinner\n        } else {\n            this.tableWrapperTarget.innerHTML = this.spinner\n        }\n    }\n\n    _getFormData(asObject = true) {\n        const formData = new FormData(this._filterForm)\n        let data = []\n\n        if (asObject) {\n            for (let key of formData.keys()) {\n                if (key !== 'authenticity_token') data.push([key, formData.getAll(key)])\n            }\n            return Object.fromEntries(data)\n        } else {\n            for (let pair of formData.entries()) {\n                if (pair[0] !== 'authenticity_token') data.push([pair[0], pair[1]])\n            }\n            return data\n        }\n    }\n\n    _addPerPageField() {\n        this._perPageField = this._filterForm.querySelector(`input[name='${this.perPageNameValue}']`)\n        if (!this._perPageField) {\n            this._perPageField = document.createElement('input')\n            this._perPageField.type = 'hidden'\n            this._perPageField.name = this.perPageNameValue\n            // Enable special debug for overriding per_page attribute.\n            let urlSearchParams = new URLSearchParams(window.location.search)\n            if (urlSearchParams.has('debug_per_page')) {\n                this._perPageField.value = urlSearchParams.get('debug_per_page')\n            } else {\n                this._perPageField.value = this.perPageDefaultValue\n            }\n            this._filterForm.appendChild(this._perPageField)\n        }\n    }\n\n    _addPageField() {\n        this._pageField = this._filterForm.querySelector('input[name=\"page\"]')\n        if (!this._pageField) {\n            this._pageField = document.createElement('input')\n            this._pageField.type = 'hidden'\n            this._pageField.name = 'page'\n            this._filterForm.appendChild(this._pageField)\n        }\n    }\n\n    _addSortField() {\n        this._sortField = this._filterForm.querySelector(`input[name='${this.sortNameValue}']`)\n        if (!this._sortField) {\n            this._sortField = document.createElement('input')\n            this._sortField.type = 'hidden'\n            this._sortField.name = this.sortNameValue\n            this._sortField.value = new URLSearchParams(window.location.search).get(this.sortNameValue)\n            this._filterForm.appendChild(this._sortField)\n        }\n    }\n\n    _setFormData() {\n        let data = {}\n        if (this.autoFillUrlEnabledValue && window.location.search !== '') {\n            let urlSearchParams = new URLSearchParams(window.location.search)\n            // Run through the parameter because Object.fromEntries(urlSearchParams)\n            for (let key of urlSearchParams.keys()) {\n                data[key] = urlSearchParams.getAll(key)\n            }\n        } else if (this.autoFillStorageEnabledValue && this._sessionStorageSupported() && sessionStorage.getItem(this.sessionStorageKey) !== null) {\n            data = JSON.parse(sessionStorage.getItem(this.sessionStorageKey))\n        } else {\n            return false\n        }\n\n        Object.entries(data).forEach((entry) => {\n            let name = entry[0]\n            let value = entry[1]\n            let input = null\n            if ([this.perPageNameValue, 'page', this.sortNameValue].indexOf(name) >= 0) {\n                input = this._filterForm.querySelector(`[name='${name}']`)\n            } else {\n                input = this._filterForm.querySelector(`[name='${name}']:not([type=hidden])`)\n            }\n            if (input === null) return false\n\n            if (input.type === 'select-multiple') {\n                if (!value) return false\n                // TODO: Check if removing empty options is needed. Because of the empty filter option on management\n                //       news, removing empty options from array is disabled for now.\n                // value = [...value].filter(String) // remove all empty options from multi select filter.\n                Array.prototype.forEach.call(input.options, (option, _index) => {\n                    if (value.includes(option.value)) option.selected = true\n                })\n            } else if (input.type === 'checkbox') {\n                if (Array.isArray(value)) {\n                    value.forEach(inputValue => {\n                        const checkbox = this._filterForm.querySelector(`[name='${name}'][value='${inputValue}']:not([type=hidden])`)\n                        if (checkbox) checkbox.checked = true\n                    })\n                } else {\n                    input.checked = true\n                }\n            } else if (input.type === 'radio') {\n                const activeRadio = this._filterForm.querySelector(`[name='${name}'][value='${value}']:not([type=hidden])`)\n                if (activeRadio) activeRadio.checked = true\n            } else {\n                input.value = value\n            }\n        })\n    }\n\n    _saveToSessionStorage() {\n        if (!this.autoFillStorageEnabledValue) return false\n\n        this._log('save data to session storage')\n        if (!this._sessionStorageSupported()) return false\n\n        const data = this._getFormData()\n        sessionStorage.setItem(this.sessionStorageKey, JSON.stringify(data))\n    }\n\n    _clearSessionStorage() {\n        this._log('clear data from session storage')\n        // This is not used. The code only stays here in case we decide to reset the forms completely in the future.\n        if (!this._sessionStorageSupported() || sessionStorage.getItem(this.sessionStorageKey) === null) return false\n\n        sessionStorage.removeItem(this.sessionStorageKey)\n    }\n\n    _log(message) {\n        if (this.debugValue) console.log(`DEBUG datatable: ${message}`)\n    }\n\n    _sessionStorageSupported() {\n        return typeof (Storage) !== 'undefined'\n    }\n\n    _installAjaxErrorListener() {\n        this._filterForm.addEventListener('ajax:error', this._handlePostError)\n    }\n\n    _uninstallAjaxErrorListener() {\n        this._filterForm.removeEventListener('ajax:error', this._handlePostError)\n    }\n\n    // The index.js.erb of a datatable dispatches this event (see datatable_announce_results). The results are only\n    // announced to screen readers when the reload was triggered by the user changing a filter, not on the initial load,\n    // sorting or pagination.\n    _installResultsListener() {\n        document.addEventListener('datatable:results', this._handleResults)\n    }\n\n    _uninstallResultsListener() {\n        document.removeEventListener('datatable:results', this._handleResults)\n    }\n\n    _handleResults(event) {\n        if (!this._announceNextResults) return\n\n        this._announceNextResults = false\n        const announcer = document.getElementById('sr-announcer-polite')\n        if (!announcer) return\n\n        // Clear first, so an unchanged text is announced again.\n        announcer.textContent = ''\n        setTimeout(() => {\n            announcer.textContent = event.detail.text\n        }, 100)\n    }\n\n    _handlePostError(event) {\n        this._announceNextResults = false\n        let [data, status, _xhr] = event.detail\n        this._log(`post error status ${status}`)\n        this._log(data)\n        if (data.responseText) this._log(data.responseText)\n        this._toggleFilterReset()\n    }\n}", "import {Controller} from '@hotwired/stimulus'\n\nimport Uppy from '@uppy/core'\nimport XHRUpload from '@uppy/xhr-upload'\nimport StatusBar from '@uppy/status-bar'\nimport TutDragDrop from '../components/uppy/tut-drag-drop'\n\nimport German from '../components/uppy/locales/de_DE'\nimport English from '../components/uppy/locales/en_US'\nimport Spanish from '../components/uppy/locales/es_ES'\nimport French from '../components/uppy/locales/fr_FR'\nimport {toast} from '../components/utility/toast'\n\n// Neat trick for generating \"unique\" ids for stimulus controller instances, @see initialize().\nlet id = 0\n\n/*\n    Targets:\n        statusBarTarget\n            Shows a upload progress bar at this location. Optional.\n        dragDropTarget\n            Define the drag&drop area. Optional.\n        fieldFileIDTarget\n            Set this element for storing media files ids. Optional.\n        fileNameTarget\n            Define a target for displaying media file names after a successful upload.\n        fileInputTarget\n            Define a target area to render the hidden file input. Required.\n        searchFormTarget\n            Can be set on a different form target within the DOM controlled by this controller. If set, the form submit\n            will be triggered. This is used for submitting the search form of the media pool modal dialog to \"reset\" the\n            search results after a successful upload.\n\n    Dataset:\n        data-direct-upload-max-file-size\n            Define the maximum file size of uploadable files in bytes. Default: 2 Gigabytes\n        data-direct-upload-max-number-of-files\n            Define the maximum number files. Default: 1\n        data-direct-upload-min-number-of-files\n            Define the minimum number files. Default: 1\n        data-direct-upload-allowed-file-types\n            Define the allowed filetypes. Default: '*'\n        data-direct-upload-endpoint\n            Set upload URL. Default: ''\n        data-direct-upload-field-name\n            Define the field name for uploading files. Default: 'media_file[media]'\n        data-direct-upload-submit-closest-form\n            (default false) Submit closest surrounding form after a successful upload.\n        data-direct-upload-tooltip-text\n            This shows a hoverable tooltip information icon after the file input information and links. Default: ''\n        data-direct-upload-media-pool-url\n            Define a url for the media pool. If set, show an additional Link for opening a modal dialog with a list if\n            files. Default: ''\n*/\nexport default class extends Controller {\n    static targets = ['statusBar', 'dragDrop', 'fieldFileID', 'fileName', 'fileInput', 'searchForm']\n\n    TWO_GIGABYTES = 2147483648\n\n    initialize() {\n        this.data.set('id', id++)\n        this.uppy()\n        this._handleMediaPoolClick = this._handleMediaPoolClick.bind(this)\n        this._handleMediaFileClick = this._handleMediaFileClick.bind(this)\n    }\n\n    connect() {\n        this._installMediaPoolClickListener()\n        this._installMediaFileClickListener()\n        this._updateFilesDescription()\n    }\n\n    disconnect() {\n        this._uninstallMediaPoolClickHandler()\n        this._uninstallMediaFileClickListener()\n    }\n\n    uppy() {\n        if (this._uppy === undefined) {\n            let locale = German\n            switch (document.documentElement.lang) {\n                case 'en':\n                    locale = English;\n                    break;\n                case 'es':\n                    locale = Spanish;\n                    break;\n                case 'fr':\n                    locale = French;\n                    break;\n            }\n\n            const options = this._options(locale)\n\n            this._uppy = new Uppy(options.Core)\n                .use(TutDragDrop, options.TutDragDrop)\n                .use(XHRUpload, options.XHRUpload)\n                .use(StatusBar, options.StatusBar)\n                .on('error', this._onError)\n                .on('upload-error', this._onUploadError)\n                .on('files-added', this._onFilesAdded)\n                .on('upload-success', this._onUploadSuccess)\n                .on('restriction-failed', this._onRestrictionFailed)\n                .on('complete', this._onComplete)\n        }\n\n        return this._uppy\n    }\n\n    removeFileAction(event) {\n        this.uppy().log('[DirectUploads] remove file action called')\n        if (!this._canAcceptMultipleFiles()) return\n\n        let element = event.currentTarget\n        let mediaFileId = element.dataset.mediaFileId\n\n        if (element && mediaFileId) {\n            let existingMediaFileIds = JSON.parse(this.fieldFileIDTarget.value)\n            existingMediaFileIds.splice(existingMediaFileIds.indexOf(parseInt(mediaFileId)), 1)\n            this.fieldFileIDTarget.value = JSON.stringify(existingMediaFileIds)\n            let listElement = element.parentNode\n            listElement.parentNode.removeChild(listElement)\n            this._setAnnouncerForFiles(this.uppy().i18n('fileRemovedAnnouncement', {\n                file: listElement.firstChild.textContent.trim()\n            }))\n        }\n    }\n\n    _onUploadSuccess = (file, response) => {\n        this.uppy().log('[DirectUploads] onUploadSuccess')\n        if (response.body.growl_message) toast(response.body.growl_message, 'success')\n\n        if (this.hasFieldFileIDTarget) {\n            let mediaFileId = response.body.id\n            if (this._canAcceptMultipleFiles()) {\n                let existingMediaFileIds = JSON.parse(this.fieldFileIDTarget.value)\n                if (existingMediaFileIds.length <= 0) this.fileNameTarget.innerHTML = ''\n                if (existingMediaFileIds.indexOf(mediaFileId) === -1) {\n                    // existingMediaFileIds list does not include newly uploaded file.\n                    existingMediaFileIds.push(mediaFileId)\n                    let uniqMediaFileIDs = [...new Set(existingMediaFileIds)]\n                    this.fieldFileIDTarget.value = JSON.stringify(uniqMediaFileIDs)\n                    this.fileNameTarget.insertAdjacentHTML('beforeend', `\n                        <li>\n                            ${file.name}\n                            <button name=\"button\" type=\"button\" class=\"btn btn-link\" aria-label=\"${this._escapeHtml(this.uppy().i18n('removeFileAriaLabel', {file: file.name}))}\"\n                            data-action=\"click->direct-upload#removeFileAction\" data-media-file-id=\"${mediaFileId}\">\n                                <i class=\"fas fa-times-circle fa-fw\" aria-hidden=\"true\"></i>\n                            </button>\n                        </li>\n                    `)\n                }\n            } else {\n                if (this.hasFileNameTarget) this.fileNameTarget.innerText = file.name\n                if (this.hasFieldFileIDTarget) this.fieldFileIDTarget.value = mediaFileId\n                this._triggerFileUploaded(response.body)\n            }\n        }\n\n        this._submitClosestForm()\n    }\n\n    _onUploadError = (file, error, response) => {\n        this.uppy().log('[DirectUploads] onUploadError')\n        this.uppy().log(`[DirectUploads] Upload error: ${error.stack}`, 'warning')\n        if (response.responseText) {\n            toast(JSON.parse(response.responseText).error, 'alert')\n        }\n        if (response.body.error) {\n            this.uppy().log(`[DirectUploads] Upload error response: ${response.body.error}`)\n            toast(response.body.error, 'alert')\n        }\n    }\n\n    _onError = (error) => {\n        this.uppy().log('[DirectUploads] onError')\n        this.uppy().log(`[DirectUploads] Uppy error: ${error.stack}`, 'warning')\n    }\n\n    _onFilesAdded = () => {\n        // Remove the describedby element temporarily here to not read out the old not yet updated message\n        const label = this.hasFileInputTarget && this.fileInputTarget.querySelector('label[for]')\n        if (label) label.removeAttribute('aria-describedby')\n    }\n\n    _onComplete = (result) => {\n        this.uppy().log('[DirectUploads] onComplete')\n\n        if (result.successful.length > 0) {\n            const uploaded = this.uppy().i18n('uploadSuccessAnnouncement', {\n                smart_count: result.successful.length,\n                files: result.successful.map(f => f.name).join(', ')\n            })\n            this._setAnnouncerForFiles(uploaded)\n        } else this._updateFilesDescription()\n        this.uppy().cancelAll()\n        let firstSuccessfulFileName = typeof result.successful[0] != 'undefined' ? result.successful[0].name : null\n        if (firstSuccessfulFileName) {\n            this._submitSearchFormTarget(firstSuccessfulFileName)\n        } else {\n            this._submitSearchFormTarget('')\n        }\n        this._clearHeartbeatInterval()\n    }\n\n    _onRestrictionFailed = (file, error) => {\n        this.uppy().log('[DirectUploads] onRestrictionFailed')\n        this.uppy().log(`[DirectUploads] Restriction errors: ${error}`)\n    }\n\n    _onBeforeUpload = (_files) => {\n        this.uppy().log('[DirectUploads] onBeforeUpload')\n        this._setHeartbeatInterval()\n    }\n\n    _onBeforeFileAdded = (currentFile, files) => {\n        this.uppy().log('[DirectUploads] onBeforeFileAdded')\n        const {maxFileSize, maxNumberOfFiles, allowedFileTypes} = this.uppy().opts.restrictions\n\n        if (maxNumberOfFiles) {\n            if (Object.keys(files).length + 1 > maxNumberOfFiles) {\n                toast(this.uppy().i18n('youCanOnlyUploadX', {smart_count: maxNumberOfFiles}), 'alert')\n            }\n        }\n\n        if (allowedFileTypes) {\n            const isCorrectFileType = allowedFileTypes.some((type) => {\n                // if this is a mime-type\n                if (type.indexOf('/') > -1) {\n                    if (!currentFile.type) return false\n                    return currentFile.type.replace(/;.*?$/, '').match(type)\n                }\n\n                // otherwise this is likely an extension\n                if (type[0] === '.') {\n                    const extension = currentFile.name.slice(currentFile.name.lastIndexOf('.') + 1)\n                    return extension.toLowerCase() === type.substr(1).toLowerCase()\n                }\n                return false\n            })\n\n            if (!isCorrectFileType) {\n                toast(this.uppy().i18n('fileTypeNotAllowed'), 'alert')\n            }\n        }\n\n        // We can't check maxFileSize if the size is unknown.\n        if (maxFileSize && currentFile.data.size != null) {\n            if (currentFile.data.size > maxFileSize) {\n                toast(this.uppy().i18n('exceedsSize'), 'alert')\n            }\n        }\n    }\n\n    _options(locale) {\n        return {\n            Core: {\n                debug: true,\n                autoProceed: true,\n                allowMultipleUploads: false,\n                locale: locale,\n                restrictions: {\n                    maxFileSize: parseInt(this.data.get('maxFileSize')) || this.TWO_GIGABYTES,\n                    maxNumberOfFiles: this.data.get('maxNumberOfFiles') || 1,\n                    minNumberOfFiles: this.data.get('minNumberOfFiles') || 1,\n                    allowedFileTypes: this.data.has('allowedFileTypes') ? this.data.get('allowedFileTypes').split(',') : ''\n                },\n                onBeforeFileAdded: this._onBeforeFileAdded,\n                onBeforeUpload: this._onBeforeUpload\n            },\n            TutDragDrop: {\n                target: this.dragDropTarget,\n                inputFieldTarget: this.fileInputTarget,\n                tooltipText: this.data.get('tooltipText'),\n                mediaPoolUrl: this.data.get('mediaPoolUrl')\n            },\n            XHRUpload: {\n                endpoint: this.data.get('endpoint'),\n                formData: true,\n                fieldName: this.data.get('fieldName') || 'media_file[media]',\n                headers: {\n                    'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`,\n                    'Accept': 'application/json'\n                },\n                limit: 10, // default 5\n                timeout: 60000 // default 30000\n            },\n            StatusBar: {\n                target: this.statusBarTarget,\n                showProgressDetails: true,\n                hidePauseResumeButton: true,\n                hideUploadButton: true\n            }\n        }\n    }\n\n    _canAcceptMultipleFiles() {\n        return (this.data.has('maxNumberOfFiles') && this.data.get('maxNumberOfFiles') !== '1')\n    }\n\n    _submitClosestForm() {\n        this.uppy().log('[DirectUploads] fire rails form submit on closest form')\n        if (this.data.has('submitClosestForm') && this.data.get('submitClosestForm').toLowerCase() === 'true') {\n            const form = this.element.closest('form')\n            Rails.fire(form, 'submit')\n\n            if (form.dataset.remote !== 'true') form.submit()\n        }\n    }\n\n    _submitSearchFormTarget(searchFormText) {\n        this.uppy().log('[DirectUploads] fire rails form submit on search form target')\n        if (!this.hasSearchFormTarget) return\n\n        let searchFormSearchInput = this.searchFormTarget.querySelector('input[type=search]')\n        if (searchFormSearchInput) searchFormSearchInput.value = searchFormText\n        Rails.fire(this.searchFormTarget, 'submit_datatable')\n    }\n\n    _installMediaPoolClickListener() {\n        this.uppy().log('[DirectUploads] install media pool listener')\n        if (!this.data.has('mediaPoolUrl')) return\n\n        this.fileInputTarget.querySelector('[data-controller=\"modal-link\"]')\n            .addEventListener('click', this._handleMediaPoolClick)\n    }\n\n    _uninstallMediaPoolClickHandler() {\n        this.uppy().log('[DirectUploads] uninstall media pool listener')\n        if (!this.data.has('mediaPoolUrl')) return\n\n        this.fileInputTarget.querySelector('[data-controller=\"modal-link\"]')\n            .removeEventListener('click', this._handleMediaPoolClick)\n    }\n\n    _handleMediaPoolClick() {\n        document.getElementById('modalHolder').dataset.id = this.data.get('id')\n        this._triggerMediaPoolOpened()\n    }\n\n    _installMediaFileClickListener() {\n        this.uppy().log('[DirectUploads] install media file listener')\n        if (!this.data.has('mediaPoolUrl')) return\n\n        document.addEventListener('click', this._handleMediaFileClick)\n    }\n\n    _uninstallMediaFileClickListener() {\n        this.uppy().log('[DirectUploads] uninstall media file listener')\n        if (!this.data.has('mediaPoolUrl')) return\n\n        document.removeEventListener('click', this._handleMediaFileClick)\n    }\n\n    _handleMediaFileClick(event) {\n        const element = event.target\n        const modalHolder = document.getElementById('modalHolder')\n\n        if (modalHolder.dataset.id !== this.data.get('id')) return\n        if (!element.classList.contains('choose_media_file')) return\n\n        const mediaFileData = JSON.parse(element.dataset.mediaFileJson)\n\n        if (this.hasFileNameTarget) this.fileNameTarget.innerText = mediaFileData.name\n        if (this.hasFieldFileIDTarget) this.fieldFileIDTarget.value = mediaFileData.id\n        this._triggerFileUploaded(mediaFileData)\n\n        this._submitClosestForm()\n    }\n\n    _triggerFileUploaded(file) {\n        let event = new CustomEvent('fileUploaded', {detail: file})\n        this.element.dispatchEvent(event)\n    }\n\n    _triggerMediaPoolOpened() {\n        const event = new CustomEvent('mediaPoolOpened')\n        this.element.dispatchEvent(event)\n    }\n\n    _setHeartbeatInterval() {\n        this._heartbeatTimeout = setInterval(function () {\n            fetch('/heartbeats', {\n                method: 'PATCH',\n                credentials: 'same-origin',\n                headers: {\n                    'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`,\n                    'Accept': 'application/json'\n                }\n            }).catch(error => console.log(error))\n        }, 300000)\n    }\n\n    _setAnnouncerForFiles(fileChange = \"\") {\n        this._updateFilesDescription()\n        const announcer = document.getElementById('sr-announcer-polite')\n\n        announcer.textContent = ''\n        setTimeout(() => {\n            announcer.textContent = fileChange\n        }, 100)\n\n    }\n\n    _updateFilesDescription() {\n        if (!this._canAcceptMultipleFiles() || !this.hasFileNameTarget) return\n\n        const filenames = Array.from(this.fileNameTarget.querySelectorAll('li'),\n            li => li.firstChild.textContent.trim())\n        const message = filenames.length > 0\n            ? this.uppy().i18n('filesCountDescription', {smart_count: filenames.length})\n            : this.uppy().i18n('noFilesAnnouncement')\n\n        if (!this.hasFileInputTarget) return\n        const label = this.fileInputTarget.querySelector('label[for]')\n        if (!label) return\n\n        if (!this._filesDescription) this._setFilesDescription()\n\n        this._filesDescription.textContent = message\n        label.setAttribute('aria-describedby', this._filesDescription.id)\n    }\n\n    _escapeHtml(text) {\n        const div = document.createElement('div')\n        div.textContent = text\n        return div.innerHTML.replace(/\"/g, '&quot;')\n    }\n\n    _setFilesDescription() {\n        this._filesDescription = document.createElement('span')\n        this._filesDescription.className = 'visually-hidden'\n        this._filesDescription.id = `direct-upload-current-files-${this.data.get('id')}`\n        this.fileInputTarget.appendChild(this._filesDescription)\n    }\n\n    _clearHeartbeatInterval() {\n        if (this._heartbeatTimeout) clearInterval(this._heartbeatTimeout)\n    }\n}\n", "import { BasePlugin } from '@uppy/core';\nimport EventManager from '@uppy/core/lib/EventManager.js';\nimport { fetcher } from '@uppy/utils/lib/fetcher';\nimport { filterFilesToEmitUploadStarted, filterNonFailedFiles, } from '@uppy/utils/lib/fileFilters';\nimport getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields';\nimport isNetworkError from '@uppy/utils/lib/isNetworkError';\nimport NetworkError from '@uppy/utils/lib/NetworkError';\nimport { internalRateLimitedQueue, RateLimitedQueue,\n// @ts-ignore untyped\n } from '@uppy/utils/lib/RateLimitedQueue';\nimport packageJson from '../package.json' with { type: 'json' };\nimport locale from './locale.js';\nfunction buildResponseError(xhr, err) {\n    let error = err;\n    // No error message\n    if (!error)\n        error = new Error('Upload error');\n    // Got an error message string\n    if (typeof error === 'string')\n        error = new Error(error);\n    // Got something else\n    if (!(error instanceof Error)) {\n        error = Object.assign(new Error('Upload error'), { data: error });\n    }\n    if (isNetworkError(xhr)) {\n        error = new NetworkError(error, xhr);\n        return error;\n    }\n    // @ts-expect-error request can only be set on NetworkError\n    // but we use NetworkError to distinguish between errors.\n    error.request = xhr;\n    return error;\n}\n/**\n * Set `data.type` in the blob to `file.meta.type`,\n * because we might have detected a more accurate file type in Uppy\n * https://stackoverflow.com/a/50875615\n */\nfunction setTypeInBlob(file) {\n    const dataWithUpdatedType = file.data.slice(0, file.data.size, file.meta.type);\n    return dataWithUpdatedType;\n}\nconst defaultOptions = {\n    formData: true,\n    fieldName: 'file',\n    method: 'post',\n    allowedMetaFields: true,\n    bundle: false,\n    headers: {},\n    timeout: 30 * 1000,\n    limit: 5,\n    withCredentials: false,\n    responseType: '',\n};\nexport default class XHRUpload extends BasePlugin {\n    static VERSION = packageJson.version;\n    #getFetcher;\n    requests;\n    uploaderEvents;\n    constructor(uppy, opts) {\n        super(uppy, {\n            ...defaultOptions,\n            fieldName: opts.bundle ? 'files[]' : 'file',\n            ...opts,\n        });\n        this.type = 'uploader';\n        this.id = this.opts.id || 'XHRUpload';\n        this.defaultLocale = locale;\n        this.i18nInit();\n        // Simultaneous upload limiting is shared across all uploads with this plugin.\n        if (internalRateLimitedQueue in this.opts) {\n            // @ts-ignore untyped internal\n            this.requests = this.opts[internalRateLimitedQueue];\n        }\n        else {\n            this.requests = new RateLimitedQueue(this.opts.limit);\n        }\n        if (this.opts.bundle && !this.opts.formData) {\n            throw new Error('`opts.formData` must be true when `opts.bundle` is enabled.');\n        }\n        if (this.opts.bundle && typeof this.opts.headers === 'function') {\n            throw new Error('`opts.headers` can not be a function when the `bundle: true` option is set.');\n        }\n        if (opts?.allowedMetaFields === undefined && 'metaFields' in this.opts) {\n            throw new Error('The `metaFields` option has been renamed to `allowedMetaFields`.');\n        }\n        this.uploaderEvents = Object.create(null);\n        /**\n         * xhr-upload wrapper for `fetcher` to handle user options\n         * `validateStatus`, `getResponseError`, `getResponseData`\n         * and to emit `upload-progress`, `upload-error`, and `upload-success` events.\n         */\n        this.#getFetcher = (files) => {\n            return async (url, options) => {\n                try {\n                    const res = await fetcher(url, {\n                        ...options,\n                        onBeforeRequest: (xhr, retryCount) => this.opts.onBeforeRequest?.(xhr, retryCount, files),\n                        shouldRetry: this.opts.shouldRetry,\n                        onAfterResponse: this.opts.onAfterResponse,\n                        onTimeout: (timeout) => {\n                            const seconds = Math.ceil(timeout / 1000);\n                            const error = new Error(this.i18n('uploadStalled', { seconds }));\n                            this.uppy.emit('upload-stalled', error, files);\n                        },\n                        onUploadProgress: (event) => {\n                            if (event.lengthComputable) {\n                                for (const { id } of files) {\n                                    const file = this.uppy.getFile(id);\n                                    this.uppy.emit('upload-progress', file, {\n                                        uploadStarted: file.progress.uploadStarted ?? 0,\n                                        bytesUploaded: (event.loaded / event.total) * file.size,\n                                        bytesTotal: file.size,\n                                    });\n                                }\n                            }\n                        },\n                    });\n                    let body = await this.opts.getResponseData?.(res);\n                    if (res.responseType === 'json') {\n                        body ??= res.response;\n                    }\n                    else {\n                        try {\n                            body ??= JSON.parse(res.responseText);\n                        }\n                        catch (cause) {\n                            throw new Error('@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.', { cause });\n                        }\n                    }\n                    const uploadURL = typeof body?.url === 'string' ? body.url : undefined;\n                    for (const { id } of files) {\n                        this.uppy.emit('upload-success', this.uppy.getFile(id), {\n                            status: res.status,\n                            body,\n                            uploadURL,\n                        });\n                    }\n                    return res;\n                }\n                catch (error) {\n                    if (error.name === 'AbortError') {\n                        return undefined;\n                    }\n                    const request = error.request;\n                    for (const file of files) {\n                        this.uppy.emit('upload-error', this.uppy.getFile(file.id), buildResponseError(request, error), request);\n                    }\n                    throw error;\n                }\n            };\n        };\n    }\n    getOptions(file) {\n        const overrides = this.uppy.getState().xhrUpload;\n        const { headers } = this.opts;\n        const opts = {\n            ...this.opts,\n            ...(overrides || {}),\n            ...(file.xhrUpload || {}),\n            headers: {},\n        };\n        // Support for `headers` as a function, only in the XHRUpload settings.\n        // Options set by other plugins in Uppy state or on the files themselves are still merged in afterward.\n        //\n        // ```js\n        // headers: (file) => ({ expires: file.meta.expires })\n        // ```\n        if (typeof headers === 'function') {\n            opts.headers = headers(file);\n        }\n        else {\n            Object.assign(opts.headers, this.opts.headers);\n        }\n        if (overrides) {\n            Object.assign(opts.headers, overrides.headers);\n        }\n        if (file.xhrUpload) {\n            Object.assign(opts.headers, file.xhrUpload.headers);\n        }\n        return opts;\n    }\n    addMetadata(formData, meta, opts) {\n        const allowedMetaFields = getAllowedMetaFields(opts.allowedMetaFields, meta);\n        allowedMetaFields.forEach((item) => {\n            const value = meta[item];\n            if (Array.isArray(value)) {\n                // In this case we don't transform `item` to add brackets, it's up to\n                // the user to add the brackets so it won't be overridden.\n                value.forEach((subItem) => formData.append(item, subItem));\n            }\n            else {\n                formData.append(item, value);\n            }\n        });\n    }\n    createFormDataUpload(file, opts) {\n        const formPost = new FormData();\n        this.addMetadata(formPost, file.meta, opts);\n        const dataWithUpdatedType = setTypeInBlob(file);\n        if (file.name) {\n            formPost.append(opts.fieldName, dataWithUpdatedType, file.meta.name);\n        }\n        else {\n            formPost.append(opts.fieldName, dataWithUpdatedType);\n        }\n        return formPost;\n    }\n    createBundledUpload(files, opts) {\n        const formPost = new FormData();\n        const { meta } = this.uppy.getState();\n        this.addMetadata(formPost, meta, opts);\n        files.forEach((file) => {\n            const options = this.getOptions(file);\n            const dataWithUpdatedType = setTypeInBlob(file);\n            if (file.name) {\n                formPost.append(options.fieldName, dataWithUpdatedType, file.name);\n            }\n            else {\n                formPost.append(options.fieldName, dataWithUpdatedType);\n            }\n        });\n        return formPost;\n    }\n    async #uploadLocalFile(file) {\n        const events = new EventManager(this.uppy);\n        const controller = new AbortController();\n        const uppyFetch = this.requests.wrapPromiseFunction(async () => {\n            const opts = this.getOptions(file);\n            const fetch = this.#getFetcher([file]);\n            const body = opts.formData\n                ? this.createFormDataUpload(file, opts)\n                : file.data;\n            const endpoint = typeof opts.endpoint === 'string'\n                ? opts.endpoint\n                : await opts.endpoint(file);\n            return fetch(endpoint, {\n                ...opts,\n                body,\n                signal: controller.signal,\n            });\n        });\n        events.onFileRemove(file.id, () => controller.abort());\n        events.onCancelAll(file.id, () => {\n            controller.abort();\n        });\n        try {\n            await uppyFetch().abortOn(controller.signal);\n        }\n        catch (error) {\n            // TODO: create formal error with name 'AbortError' (this comes from RateLimitedQueue)\n            if (error.message !== 'Cancelled') {\n                throw error;\n            }\n        }\n        finally {\n            events.remove();\n        }\n    }\n    async #uploadBundle(files) {\n        const controller = new AbortController();\n        const uppyFetch = this.requests.wrapPromiseFunction(async () => {\n            const optsFromState = this.uppy.getState().xhrUpload ?? {};\n            const fetch = this.#getFetcher(files);\n            const body = this.createBundledUpload(files, {\n                ...this.opts,\n                ...optsFromState,\n            });\n            const endpoint = typeof this.opts.endpoint === 'string'\n                ? this.opts.endpoint\n                : await this.opts.endpoint(files);\n            return fetch(endpoint, {\n                // headers can't be a function with bundle: true\n                ...this.opts,\n                body,\n                signal: controller.signal,\n            });\n        });\n        function abort() {\n            controller.abort();\n        }\n        // We only need to abort on cancel all because\n        // individual cancellations are not possible with bundle: true\n        this.uppy.once('cancel-all', abort);\n        try {\n            await uppyFetch().abortOn(controller.signal);\n        }\n        catch (error) {\n            // TODO: create formal error with name 'AbortError' (this comes from RateLimitedQueue)\n            if (error.message !== 'Cancelled') {\n                throw error;\n            }\n        }\n        finally {\n            this.uppy.off('cancel-all', abort);\n        }\n    }\n    #getCompanionClientArgs(file) {\n        const opts = this.getOptions(file);\n        const allowedMetaFields = getAllowedMetaFields(opts.allowedMetaFields, file.meta);\n        return {\n            ...file.remote?.body,\n            protocol: 'multipart',\n            endpoint: opts.endpoint,\n            size: file.data.size,\n            fieldname: opts.fieldName,\n            metadata: Object.fromEntries(allowedMetaFields.map((name) => [name, file.meta[name]])),\n            httpMethod: opts.method,\n            useFormData: opts.formData,\n            headers: opts.headers,\n        };\n    }\n    async #uploadFiles(files) {\n        await Promise.allSettled(files.map((file) => {\n            if (file.isRemote) {\n                const getQueue = () => this.requests;\n                const controller = new AbortController();\n                const removedHandler = (removedFile) => {\n                    if (removedFile.id === file.id)\n                        controller.abort();\n                };\n                this.uppy.on('file-removed', removedHandler);\n                const uploadPromise = this.uppy\n                    .getRequestClientForFile(file)\n                    .uploadRemoteFile(file, this.#getCompanionClientArgs(file), {\n                    signal: controller.signal,\n                    getQueue,\n                });\n                this.requests.wrapSyncFunction(() => {\n                    this.uppy.off('file-removed', removedHandler);\n                }, { priority: -1 })();\n                return uploadPromise;\n            }\n            return this.#uploadLocalFile(file);\n        }));\n    }\n    #handleUpload = async (fileIDs) => {\n        if (fileIDs.length === 0) {\n            this.uppy.log('[XHRUpload] No files to upload!');\n            return;\n        }\n        // No limit configured by the user, and no RateLimitedQueue passed in by a \"parent\" plugin\n        // (basically just AwsS3) using the internal symbol\n        // @ts-ignore untyped internal\n        if (this.opts.limit === 0 && !this.opts[internalRateLimitedQueue]) {\n            this.uppy.log('[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0', 'warning');\n        }\n        this.uppy.log('[XHRUpload] Uploading...');\n        const files = this.uppy.getFilesByIds(fileIDs);\n        const filesFiltered = filterNonFailedFiles(files);\n        const filesToEmit = filterFilesToEmitUploadStarted(filesFiltered);\n        this.uppy.emit('upload-start', filesToEmit);\n        if (this.opts.bundle) {\n            // if bundle: true, we don\u2019t support remote uploads\n            const isSomeFileRemote = filesFiltered.some((file) => file.isRemote);\n            if (isSomeFileRemote) {\n                throw new Error('Can\u2019t upload remote files when the `bundle: true` option is set');\n            }\n            if (typeof this.opts.headers === 'function') {\n                throw new TypeError('`headers` may not be a function when the `bundle: true` option is set');\n            }\n            await this.#uploadBundle(filesFiltered);\n        }\n        else {\n            await this.#uploadFiles(filesFiltered);\n        }\n    };\n    install() {\n        if (this.opts.bundle) {\n            const { capabilities } = this.uppy.getState();\n            this.uppy.setState({\n                capabilities: {\n                    ...capabilities,\n                    individualCancellation: false,\n                },\n            });\n        }\n        this.uppy.addUploader(this.#handleUpload);\n    }\n    uninstall() {\n        if (this.opts.bundle) {\n            const { capabilities } = this.uppy.getState();\n            this.uppy.setState({\n                capabilities: {\n                    ...capabilities,\n                    individualCancellation: true,\n                },\n            });\n        }\n        this.uppy.removeUploader(this.#handleUpload);\n    }\n}\n", "/**\n * Create a wrapper around an event emitter with a `remove` method to remove\n * all events that were added using the wrapped emitter.\n */\nexport default class EventManager {\n    #uppy;\n    #events = [];\n    constructor(uppy) {\n        this.#uppy = uppy;\n    }\n    on(event, fn) {\n        this.#events.push([event, fn]);\n        return this.#uppy.on(event, fn);\n    }\n    remove() {\n        for (const [event, fn] of this.#events.splice(0)) {\n            this.#uppy.off(event, fn);\n        }\n    }\n    onFilePause(fileID, cb) {\n        this.on('upload-pause', (file, isPaused) => {\n            if (fileID === file?.id) {\n                cb(isPaused);\n            }\n        });\n    }\n    onFileRemove(fileID, cb) {\n        this.on('file-removed', (file) => {\n            if (fileID === file.id)\n                cb(file.id);\n        });\n    }\n    onPause(fileID, cb) {\n        this.on('upload-pause', (file, isPaused) => {\n            if (fileID === file?.id) {\n                // const isPaused = this.#uppy.pauseResume(fileID)\n                cb(isPaused);\n            }\n        });\n    }\n    onRetry(fileID, cb) {\n        this.on('upload-retry', (file) => {\n            if (fileID === file?.id) {\n                cb();\n            }\n        });\n    }\n    onRetryAll(fileID, cb) {\n        this.on('retry-all', () => {\n            if (!this.#uppy.getFile(fileID))\n                return;\n            cb();\n        });\n    }\n    onPauseAll(fileID, cb) {\n        this.on('pause-all', () => {\n            if (!this.#uppy.getFile(fileID))\n                return;\n            cb();\n        });\n    }\n    onCancelAll(fileID, eventHandler) {\n        this.on('cancel-all', (...args) => {\n            if (!this.#uppy.getFile(fileID))\n                return;\n            eventHandler(...args);\n        });\n    }\n    onResumeAll(fileID, cb) {\n        this.on('resume-all', () => {\n            if (!this.#uppy.getFile(fileID))\n                return;\n            cb();\n        });\n    }\n}\n", "class NetworkError extends Error {\n    cause;\n    isNetworkError;\n    request;\n    constructor(error, xhr = null) {\n        super(`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.`);\n        this.cause = error;\n        this.isNetworkError = true;\n        this.request = xhr;\n    }\n}\nexport default NetworkError;\n", "/**\n * Helper to abort upload requests if there has not been any progress for `timeout` ms.\n * Create an instance using `timer = new ProgressTimeout(10000, onTimeout)`\n * Call `timer.progress()` to signal that there has been progress of any kind.\n * Call `timer.done()` when the upload has completed.\n */\nclass ProgressTimeout {\n    #aliveTimer;\n    #isDone = false;\n    #onTimedOut;\n    #timeout;\n    constructor(timeout, timeoutHandler) {\n        this.#timeout = timeout;\n        this.#onTimedOut = () => timeoutHandler(timeout);\n    }\n    progress() {\n        // Some browsers fire another progress event when the upload is\n        // cancelled, so we have to ignore progress after the timer was\n        // told to stop.\n        if (this.#isDone)\n            return;\n        if (this.#timeout > 0) {\n            clearTimeout(this.#aliveTimer);\n            this.#aliveTimer = setTimeout(this.#onTimedOut, this.#timeout);\n        }\n    }\n    done() {\n        if (!this.#isDone) {\n            clearTimeout(this.#aliveTimer);\n            this.#aliveTimer = undefined;\n            this.#isDone = true;\n        }\n    }\n}\nexport default ProgressTimeout;\n", "import NetworkError from './NetworkError.js';\nimport ProgressTimeout from './ProgressTimeout.js';\nconst noop = () => { };\n/**\n * Fetches data from a specified URL using XMLHttpRequest, with optional retry functionality and progress tracking.\n *\n * @param url The URL to send the request to.\n * @param options Optional settings for the fetch operation.\n */\nexport function fetcher(url, options = {}) {\n    const { body = null, headers = {}, method = 'GET', onBeforeRequest = noop, onUploadProgress = noop, shouldRetry = () => true, onAfterResponse = noop, onTimeout = noop, responseType, retries = 3, signal = null, timeout = 30_000, withCredentials = false, } = options;\n    // 300 ms, 600 ms, 1200 ms, 2400 ms, 4800 ms\n    const delay = (attempt) => 0.3 * 2 ** (attempt - 1) * 1000;\n    const timer = new ProgressTimeout(timeout, onTimeout);\n    function requestWithRetry(retryCount = 0) {\n        // biome-ignore lint/suspicious/noAsyncPromiseExecutor: it's fine\n        return new Promise(async (resolve, reject) => {\n            const xhr = new XMLHttpRequest();\n            const onError = (error) => {\n                if (shouldRetry(xhr) && retryCount < retries) {\n                    setTimeout(() => {\n                        requestWithRetry(retryCount + 1).then(resolve, reject);\n                    }, delay(retryCount));\n                }\n                else {\n                    timer.done();\n                    reject(error);\n                }\n            };\n            xhr.open(method, url, true);\n            xhr.withCredentials = withCredentials;\n            if (responseType) {\n                xhr.responseType = responseType;\n            }\n            signal?.addEventListener('abort', () => {\n                xhr.abort();\n                // Using DOMException for abort errors aligns with\n                // the convention established by the Fetch API.\n                reject(new DOMException('Aborted', 'AbortError'));\n            });\n            xhr.onload = async () => {\n                try {\n                    await onAfterResponse(xhr, retryCount);\n                }\n                catch (err) {\n                    // This is important as we need to emit the xhr\n                    // over the upload-error event.\n                    err.request = xhr;\n                    onError(err);\n                    return;\n                }\n                if (xhr.status >= 200 && xhr.status < 300) {\n                    timer.done();\n                    resolve(xhr);\n                }\n                else if (shouldRetry(xhr) && retryCount < retries) {\n                    setTimeout(() => {\n                        requestWithRetry(retryCount + 1).then(resolve, reject);\n                    }, delay(retryCount));\n                }\n                else {\n                    timer.done();\n                    reject(new NetworkError(xhr.statusText, xhr));\n                }\n            };\n            xhr.onerror = () => onError(new NetworkError(xhr.statusText, xhr));\n            xhr.upload.onprogress = (event) => {\n                timer.progress();\n                onUploadProgress(event);\n            };\n            if (headers) {\n                Object.keys(headers).forEach((key) => {\n                    xhr.setRequestHeader(key, headers[key]);\n                });\n            }\n            await onBeforeRequest(xhr, retryCount);\n            xhr.send(body);\n        });\n    }\n    return requestWithRetry();\n}\n", "export function filterNonFailedFiles(files) {\n    const hasError = (file) => 'error' in file && !!file.error;\n    return files.filter((file) => !hasError(file));\n}\n// Don't double-emit upload-started for Golden Retriever-restored files that were already started\nexport function filterFilesToEmitUploadStarted(files) {\n    return files.filter((file) => !file.progress?.uploadStarted || !file.isRestored);\n}\n", "export default function getAllowedMetaFields(fields, meta) {\n    if (fields === true) {\n        return Object.keys(meta);\n    }\n    if (Array.isArray(fields)) {\n        return fields;\n    }\n    return [];\n}\n", "function isNetworkError(xhr) {\n    if (!xhr) {\n        return false;\n    }\n    return (xhr.readyState !== 0 && xhr.readyState !== 4) || xhr.status === 0;\n}\nexport default isNetworkError;\n", "function createCancelError(cause) {\n    return new Error('Cancelled', { cause });\n}\nfunction abortOn(signal) {\n    if (signal != null) {\n        const abortPromise = () => this.abort(signal.reason);\n        signal.addEventListener('abort', abortPromise, { once: true });\n        const removeAbortListener = () => {\n            signal.removeEventListener('abort', abortPromise);\n        };\n        this.then?.(removeAbortListener, removeAbortListener);\n    }\n    return this;\n}\nexport class RateLimitedQueue {\n    #activeRequests = 0;\n    #queuedHandlers = [];\n    #paused = false;\n    #pauseTimer;\n    #downLimit = 1;\n    #upperLimit;\n    #rateLimitingTimer;\n    limit;\n    constructor(limit) {\n        if (typeof limit !== 'number' || limit === 0) {\n            this.limit = Infinity;\n        }\n        else {\n            this.limit = limit;\n        }\n    }\n    #call(fn) {\n        this.#activeRequests += 1;\n        let done = false;\n        let cancelActive;\n        try {\n            cancelActive = fn();\n        }\n        catch (err) {\n            this.#activeRequests -= 1;\n            throw err;\n        }\n        return {\n            abort: (cause) => {\n                if (done)\n                    return;\n                done = true;\n                this.#activeRequests -= 1;\n                cancelActive?.(cause);\n                this.#queueNext();\n            },\n            done: () => {\n                if (done)\n                    return;\n                done = true;\n                this.#activeRequests -= 1;\n                this.#queueNext();\n            },\n        };\n    }\n    #queueNext() {\n        // Do it soon but not immediately, this allows clearing out the entire queue synchronously\n        // one by one without continuously _advancing_ it (and starting new tasks before immediately\n        // aborting them)\n        queueMicrotask(() => this.#next());\n    }\n    #next() {\n        if (this.#paused || this.#activeRequests >= this.limit) {\n            return;\n        }\n        if (this.#queuedHandlers.length === 0) {\n            return;\n        }\n        // Dispatch the next request, and update the abort/done handlers\n        // so that cancelling it does the Right Thing (and doesn't just try\n        // to dequeue an already-running request).\n        const next = this.#queuedHandlers.shift();\n        if (next == null) {\n            throw new Error('Invariant violation: next is null');\n        }\n        const handler = this.#call(next.fn);\n        next.abort = handler.abort;\n        next.done = handler.done;\n    }\n    #queue(fn, options) {\n        const handler = {\n            fn,\n            priority: options?.priority || 0,\n            abort: () => {\n                this.#dequeue(handler);\n            },\n            done: () => {\n                throw new Error('Cannot mark a queued request as done: this indicates a bug');\n            },\n        };\n        const index = this.#queuedHandlers.findIndex((other) => {\n            return handler.priority > other.priority;\n        });\n        if (index === -1) {\n            this.#queuedHandlers.push(handler);\n        }\n        else {\n            this.#queuedHandlers.splice(index, 0, handler);\n        }\n        return handler;\n    }\n    #dequeue(handler) {\n        const index = this.#queuedHandlers.indexOf(handler);\n        if (index !== -1) {\n            this.#queuedHandlers.splice(index, 1);\n        }\n    }\n    run(fn, queueOptions) {\n        if (!this.#paused && this.#activeRequests < this.limit) {\n            return this.#call(fn);\n        }\n        return this.#queue(fn, queueOptions);\n    }\n    wrapSyncFunction(fn, queueOptions) {\n        return (...args) => {\n            const queuedRequest = this.run(() => {\n                fn(...args);\n                queueMicrotask(() => queuedRequest.done());\n                return () => { };\n            }, queueOptions);\n            return {\n                abortOn,\n                abort() {\n                    queuedRequest.abort();\n                },\n            };\n        };\n    }\n    wrapPromiseFunction(fn, queueOptions) {\n        return (...args) => {\n            let queuedRequest;\n            const outerPromise = new Promise((resolve, reject) => {\n                queuedRequest = this.run(() => {\n                    let cancelError;\n                    let innerPromise;\n                    try {\n                        innerPromise = Promise.resolve(fn(...args));\n                    }\n                    catch (err) {\n                        innerPromise = Promise.reject(err);\n                    }\n                    innerPromise.then((result) => {\n                        if (cancelError) {\n                            reject(cancelError);\n                        }\n                        else {\n                            queuedRequest.done();\n                            resolve(result);\n                        }\n                    }, (err) => {\n                        if (cancelError) {\n                            reject(cancelError);\n                        }\n                        else {\n                            queuedRequest.done();\n                            reject(err);\n                        }\n                    });\n                    return (cause) => {\n                        cancelError = createCancelError(cause);\n                    };\n                }, queueOptions);\n            });\n            outerPromise.abort = (cause) => {\n                queuedRequest.abort(cause);\n            };\n            outerPromise.abortOn = abortOn;\n            return outerPromise;\n        };\n    }\n    resume() {\n        this.#paused = false;\n        clearTimeout(this.#pauseTimer);\n        for (let i = 0; i < this.limit; i++) {\n            this.#queueNext();\n        }\n    }\n    #resume = () => this.resume();\n    /**\n     * Freezes the queue for a while or indefinitely.\n     *\n     * @param {number | null } [duration] Duration for the pause to happen, in milliseconds.\n     *                                    If omitted, the queue won't resume automatically.\n     */\n    pause(duration = null) {\n        this.#paused = true;\n        clearTimeout(this.#pauseTimer);\n        if (duration != null) {\n            this.#pauseTimer = setTimeout(this.#resume, duration);\n        }\n    }\n    /**\n     * Pauses the queue for a duration, and lower the limit of concurrent requests\n     * when the queue resumes. When the queue resumes, it tries to progressively\n     * increase the limit in `this.#increaseLimit` until another call is made to\n     * `this.rateLimit`.\n     * Call this function when using the RateLimitedQueue for network requests and\n     * the remote server responds with 429 HTTP code.\n     *\n     * @param {number} duration in milliseconds.\n     */\n    rateLimit(duration) {\n        clearTimeout(this.#rateLimitingTimer);\n        this.pause(duration);\n        if (this.limit > 1 && Number.isFinite(this.limit)) {\n            this.#upperLimit = this.limit - 1;\n            this.limit = this.#downLimit;\n            this.#rateLimitingTimer = setTimeout(this.#increaseLimit, duration);\n        }\n    }\n    #increaseLimit = () => {\n        if (this.#paused) {\n            this.#rateLimitingTimer = setTimeout(this.#increaseLimit, 0);\n            return;\n        }\n        this.#downLimit = this.limit;\n        this.limit = Math.ceil((this.#upperLimit + this.#downLimit) / 2);\n        for (let i = this.#downLimit; i <= this.limit; i++) {\n            this.#queueNext();\n        }\n        if (this.#upperLimit - this.#downLimit > 3) {\n            this.#rateLimitingTimer = setTimeout(this.#increaseLimit, 2000);\n        }\n        else {\n            this.#downLimit = Math.floor(this.#downLimit / 2);\n        }\n    };\n    get isPaused() {\n        return this.#paused;\n    }\n}\nexport const internalRateLimitedQueue = Symbol('__queue');\n", "{\n  \"name\": \"@uppy/xhr-upload\",\n  \"description\": \"Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.\",\n  \"version\": \"4.4.2\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/index.js\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsc --build tsconfig.build.json\",\n    \"typecheck\": \"tsc --build\",\n    \"test\": \"vitest run --environment=jsdom --silent='passed-only'\"\n  },\n  \"keywords\": [\n    \"file uploader\",\n    \"xhr\",\n    \"xhr upload\",\n    \"XMLHttpRequest\",\n    \"ajax\",\n    \"fetch\",\n    \"uppy\",\n    \"uppy-plugin\"\n  ],\n  \"homepage\": \"https://uppy.io\",\n  \"bugs\": {\n    \"url\": \"https://github.com/transloadit/uppy/issues\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/transloadit/uppy.git\"\n  },\n  \"files\": [\n    \"src\",\n    \"lib\",\n    \"dist\",\n    \"CHANGELOG.md\"\n  ],\n  \"dependencies\": {\n    \"@uppy/companion-client\": \"^4.5.2\",\n    \"@uppy/utils\": \"^6.2.2\"\n  },\n  \"devDependencies\": {\n    \"@uppy/core\": \"^4.5.2\",\n    \"jsdom\": \"^26.1.0\",\n    \"nock\": \"^13.1.0\",\n    \"typescript\": \"^5.8.3\",\n    \"vitest\": \"^3.2.4\"\n  },\n  \"peerDependencies\": {\n    \"@uppy/core\": \"^4.5.2\"\n  }\n}", "export default {\n    strings: {\n        // Shown in the Informer if an upload is being canceled because it stalled for too long.\n        uploadStalled: 'Upload has not made any progress for %{seconds} seconds. You may want to retry it.',\n    },\n};\n", "import { UIPlugin } from '@uppy/core';\nimport emaFilter from '@uppy/utils/lib/emaFilter';\nimport getTextDirection from '@uppy/utils/lib/getTextDirection';\nimport { h } from 'preact';\nimport packageJson from '../package.json' with { type: 'json' };\nimport locale from './locale.js';\nimport statusBarStates from './StatusBarStates.js';\nimport StatusBarUI, {} from './StatusBarUI.js';\nconst speedFilterHalfLife = 2000;\nconst ETAFilterHalfLife = 2000;\nfunction getUploadingState(error, isAllComplete, recoveredState, files) {\n    if (error) {\n        return statusBarStates.STATE_ERROR;\n    }\n    if (isAllComplete) {\n        return statusBarStates.STATE_COMPLETE;\n    }\n    if (recoveredState) {\n        return statusBarStates.STATE_WAITING;\n    }\n    let state = statusBarStates.STATE_WAITING;\n    const fileIDs = Object.keys(files);\n    for (let i = 0; i < fileIDs.length; i++) {\n        const { progress } = files[fileIDs[i]];\n        // If ANY files are being uploaded right now, show the uploading state.\n        if (progress.uploadStarted && !progress.uploadComplete) {\n            return statusBarStates.STATE_UPLOADING;\n        }\n        // If files are being preprocessed AND postprocessed at this time, we show the\n        // preprocess state. If any files are being uploaded we show uploading.\n        if (progress.preprocess) {\n            state = statusBarStates.STATE_PREPROCESSING;\n        }\n        // If NO files are being preprocessed or uploaded right now, but some files are\n        // being postprocessed, show the postprocess state.\n        if (progress.postprocess && state !== statusBarStates.STATE_PREPROCESSING) {\n            state = statusBarStates.STATE_POSTPROCESSING;\n        }\n    }\n    return state;\n}\nconst defaultOptions = {\n    hideUploadButton: false,\n    hideRetryButton: false,\n    hidePauseResumeButton: false,\n    hideCancelButton: false,\n    showProgressDetails: false,\n    hideAfterFinish: true,\n    doneButtonHandler: null,\n};\n/**\n * StatusBar: renders a status bar with upload/pause/resume/cancel/retry buttons,\n * progress percentage and time remaining.\n */\nexport default class StatusBar extends UIPlugin {\n    static VERSION = packageJson.version;\n    #lastUpdateTime;\n    #previousUploadedBytes;\n    #previousSpeed;\n    #previousETA;\n    constructor(uppy, opts) {\n        super(uppy, { ...defaultOptions, ...opts });\n        this.id = this.opts.id || 'StatusBar';\n        this.title = 'StatusBar';\n        this.type = 'progressindicator';\n        this.defaultLocale = locale;\n        this.i18nInit();\n        this.render = this.render.bind(this);\n        this.install = this.install.bind(this);\n    }\n    #computeSmoothETA(totalBytes) {\n        if (totalBytes.total == null || totalBytes.total === 0) {\n            return null;\n        }\n        const remaining = totalBytes.total - totalBytes.uploaded;\n        if (remaining <= 0) {\n            return null;\n        }\n        // When state is restored, lastUpdateTime is still nullish at this point.\n        this.#lastUpdateTime ??= performance.now();\n        const dt = performance.now() - this.#lastUpdateTime;\n        if (dt === 0) {\n            return Math.round((this.#previousETA ?? 0) / 100) / 10;\n        }\n        const uploadedBytesSinceLastTick = totalBytes.uploaded - this.#previousUploadedBytes;\n        this.#previousUploadedBytes = totalBytes.uploaded;\n        // uploadedBytesSinceLastTick can be negative in some cases (packet loss?)\n        // in which case, we wait for next tick to update ETA.\n        if (uploadedBytesSinceLastTick <= 0) {\n            return Math.round((this.#previousETA ?? 0) / 100) / 10;\n        }\n        const currentSpeed = uploadedBytesSinceLastTick / dt;\n        const filteredSpeed = this.#previousSpeed == null\n            ? currentSpeed\n            : emaFilter(currentSpeed, this.#previousSpeed, speedFilterHalfLife, dt);\n        this.#previousSpeed = filteredSpeed;\n        const instantETA = remaining / filteredSpeed;\n        const updatedPreviousETA = Math.max(this.#previousETA - dt, 0);\n        const filteredETA = this.#previousETA == null\n            ? instantETA\n            : emaFilter(instantETA, updatedPreviousETA, ETAFilterHalfLife, dt);\n        this.#previousETA = filteredETA;\n        this.#lastUpdateTime = performance.now();\n        return Math.round(filteredETA / 100) / 10;\n    }\n    startUpload = () => {\n        return this.uppy.upload().catch((() => {\n            // Error logged in Core\n        }));\n    };\n    render(state) {\n        const { capabilities, files, allowNewUpload, totalProgress, error, recoveredState, } = state;\n        const { newFiles, startedFiles, completeFiles, isUploadStarted, isAllComplete, isAllPaused, isUploadInProgress, isSomeGhost, } = this.uppy.getObjectOfFilesPerState();\n        // If some state was recovered, we want to show Upload button/counter\n        // for all the files, because in this case it\u2019s not an Upload button,\n        // but \u201CConfirm Restore Button\u201D\n        const newFilesOrRecovered = recoveredState ? Object.values(files) : newFiles;\n        const resumableUploads = !!capabilities.resumableUploads;\n        const supportsUploadProgress = capabilities.uploadProgress !== false;\n        let totalSize = null;\n        let totalUploadedSize = 0;\n        // Only if all files have a known size, does it make sense to display a total size\n        if (startedFiles.every((f) => f.progress.bytesTotal != null && f.progress.bytesTotal !== 0)) {\n            totalSize = 0;\n            startedFiles.forEach((file) => {\n                totalSize += file.progress.bytesTotal || 0;\n                totalUploadedSize += file.progress.bytesUploaded || 0;\n            });\n        }\n        else {\n            // however uploaded size we will always have\n            startedFiles.forEach((file) => {\n                totalUploadedSize += file.progress.bytesUploaded || 0;\n            });\n        }\n        const totalETA = this.#computeSmoothETA({\n            uploaded: totalUploadedSize,\n            total: totalSize,\n        });\n        return StatusBarUI({\n            error,\n            uploadState: getUploadingState(error, isAllComplete, recoveredState, state.files || {}),\n            allowNewUpload,\n            totalProgress,\n            totalSize,\n            totalUploadedSize,\n            isAllComplete: false,\n            isAllPaused,\n            isUploadStarted,\n            isUploadInProgress,\n            isSomeGhost,\n            recoveredState,\n            complete: completeFiles.length,\n            newFiles: newFilesOrRecovered.length,\n            numUploads: startedFiles.length,\n            totalETA,\n            files,\n            i18n: this.i18n,\n            uppy: this.uppy,\n            startUpload: this.startUpload,\n            doneButtonHandler: this.opts.doneButtonHandler,\n            resumableUploads,\n            supportsUploadProgress,\n            showProgressDetails: this.opts.showProgressDetails,\n            hideUploadButton: this.opts.hideUploadButton,\n            hideRetryButton: this.opts.hideRetryButton,\n            hidePauseResumeButton: this.opts.hidePauseResumeButton,\n            hideCancelButton: this.opts.hideCancelButton,\n            hideAfterFinish: this.opts.hideAfterFinish,\n        });\n    }\n    onMount() {\n        // Set the text direction if the page has not defined one.\n        const element = this.el;\n        const direction = getTextDirection(element);\n        if (!direction) {\n            element.dir = 'ltr';\n        }\n    }\n    #onUploadStart = () => {\n        const { recoveredState } = this.uppy.getState();\n        this.#previousSpeed = null;\n        this.#previousETA = null;\n        if (recoveredState) {\n            this.#previousUploadedBytes = Object.values(recoveredState.files).reduce((pv, { progress }) => pv + progress.bytesUploaded, 0);\n            // We don't set `#lastUpdateTime` at this point because the upload won't\n            // actually resume until the user asks for it.\n            this.uppy.emit('restore-confirmed');\n            return;\n        }\n        this.#lastUpdateTime = performance.now();\n        this.#previousUploadedBytes = 0;\n    };\n    install() {\n        const { target } = this.opts;\n        if (target) {\n            this.mount(target, this);\n        }\n        this.uppy.on('upload', this.#onUploadStart);\n        // To cover the use case where the status bar is installed while the upload\n        // has started, we set `lastUpdateTime` right away.\n        this.#lastUpdateTime = performance.now();\n        this.#previousUploadedBytes = this.uppy\n            .getFiles()\n            .reduce((pv, file) => pv + file.progress.bytesUploaded, 0);\n    }\n    uninstall() {\n        this.unmount();\n        this.uppy.off('upload', this.#onUploadStart);\n    }\n}\n", "/**\n * Low-pass filter using Exponential Moving Averages (aka exponential smoothing)\n * Filters a sequence of values by updating the mixing the previous output value\n * with the new input using the exponential window function\n *\n * @param newValue the n-th value of the sequence\n * @param previousSmoothedValue the exponential average of the first n-1 values\n * @param halfLife value of `dt` to move the smoothed value halfway between `previousFilteredValue` and `newValue`\n * @param dt time elapsed between adding the (n-1)th and the n-th values\n * @returns the exponential average of the first n values\n */\nexport default function emaFilter(newValue, previousSmoothedValue, halfLife, dt) {\n    if (halfLife === 0 || newValue === previousSmoothedValue)\n        return newValue;\n    if (dt === 0)\n        return previousSmoothedValue;\n    return newValue + (previousSmoothedValue - newValue) * 2 ** (-dt / halfLife);\n}\n", "{\n  \"name\": \"@uppy/status-bar\",\n  \"description\": \"A progress bar for Uppy, with many bells and whistles.\",\n  \"version\": \"4.2.3\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/index.js\",\n  \"style\": \"dist/style.min.css\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"tsc --build tsconfig.build.json\",\n    \"build:css\": \"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css\",\n    \"typecheck\": \"tsc --build\"\n  },\n  \"keywords\": [\n    \"file uploader\",\n    \"uppy\",\n    \"uppy-plugin\",\n    \"progress bar\",\n    \"status bar\",\n    \"progress\",\n    \"upload\",\n    \"eta\",\n    \"speed\"\n  ],\n  \"homepage\": \"https://uppy.io\",\n  \"bugs\": {\n    \"url\": \"https://github.com/transloadit/uppy/issues\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/transloadit/uppy.git\"\n  },\n  \"files\": [\n    \"src\",\n    \"lib\",\n    \"dist\",\n    \"CHANGELOG.md\"\n  ],\n  \"dependencies\": {\n    \"@transloadit/prettier-bytes\": \"^0.3.4\",\n    \"@uppy/utils\": \"^6.2.2\",\n    \"classnames\": \"^2.2.6\",\n    \"preact\": \"^10.5.13\"\n  },\n  \"peerDependencies\": {\n    \"@uppy/core\": \"^4.5.2\"\n  },\n  \"devDependencies\": {\n    \"cssnano\": \"^7.0.7\",\n    \"postcss\": \"^8.5.6\",\n    \"postcss-cli\": \"^11.0.1\",\n    \"sass\": \"^1.89.2\",\n    \"typescript\": \"^5.8.3\"\n  }\n}", "export default {\n    strings: {\n        // Shown in the status bar while files are being uploaded.\n        uploading: 'Uploading',\n        // Shown in the status bar once all files have been uploaded.\n        complete: 'Complete',\n        // Shown in the status bar if an upload failed.\n        uploadFailed: 'Upload failed',\n        // Shown in the status bar while the upload is paused.\n        paused: 'Paused',\n        // Used as the label for the button that retries an upload.\n        retry: 'Retry',\n        // Used as the label for the button that cancels an upload.\n        cancel: 'Cancel',\n        // Used as the label for the button that pauses an upload.\n        pause: 'Pause',\n        // Used as the label for the button that resumes an upload.\n        resume: 'Resume',\n        // Used as the label for the button that resets the upload state after an upload\n        done: 'Done',\n        // When `showProgressDetails` is set, shows the number of files that have been fully uploaded so far.\n        filesUploadedOfTotal: {\n            0: '%{complete} of %{smart_count} file uploaded',\n            1: '%{complete} of %{smart_count} files uploaded',\n        },\n        // When `showProgressDetails` is set, shows the amount of bytes that have been uploaded so far.\n        dataUploadedOfTotal: '%{complete} of %{total}',\n        dataUploadedOfUnknown: '%{complete} of unknown',\n        // When `showProgressDetails` is set, shows an estimation of how long the upload will take to complete.\n        xTimeLeft: '%{time} left',\n        // Used as the label for the button that starts an upload.\n        uploadXFiles: {\n            0: 'Upload %{smart_count} file',\n            1: 'Upload %{smart_count} files',\n        },\n        // Used as the label for the button that starts an upload, if another upload has been started in the past\n        // and new files were added later.\n        uploadXNewFiles: {\n            0: 'Upload +%{smart_count} file',\n            1: 'Upload +%{smart_count} files',\n        },\n        upload: 'Upload',\n        retryUpload: 'Retry upload',\n        xMoreFilesAdded: {\n            0: '%{smart_count} more file added',\n            1: '%{smart_count} more files added',\n        },\n        showErrorDetails: 'Show error details',\n    },\n};\n", "export default {\n    STATE_ERROR: 'error',\n    STATE_WAITING: 'waiting',\n    STATE_PREPROCESSING: 'preprocessing',\n    STATE_UPLOADING: 'uploading',\n    STATE_POSTPROCESSING: 'postprocessing',\n    STATE_COMPLETE: 'complete',\n};\n", "const ENCODED_ENTITIES = /[\"&<]/;\n\n/** @param {string} str */\nexport function encodeEntities(str) {\n\t// Skip all work for strings with no entities needing encoding:\n\tif (str.length === 0 || ENCODED_ENTITIES.test(str) === false) return str;\n\n\tlet last = 0,\n\t\ti = 0,\n\t\tout = '',\n\t\tch = '';\n\n\t// Seek forward in str until the next entity char:\n\tfor (; i < str.length; i++) {\n\t\tswitch (str.charCodeAt(i)) {\n\t\t\tcase 34:\n\t\t\t\tch = '&quot;';\n\t\t\t\tbreak;\n\t\t\tcase 38:\n\t\t\t\tch = '&amp;';\n\t\t\t\tbreak;\n\t\t\tcase 60:\n\t\t\t\tch = '&lt;';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcontinue;\n\t\t}\n\t\t// Append skipped/buffered characters and the encoded entity:\n\t\tif (i !== last) out += str.slice(last, i);\n\t\tout += ch;\n\t\t// Start the next seek/buffer after the entity's offset:\n\t\tlast = i + 1;\n\t}\n\tif (i !== last) out += str.slice(last, i);\n\treturn out;\n}\n", "/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param  {Array<string | null | VNode>} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array<string | null | VNode>}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n", "import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\nimport classNames from 'classnames';\nimport { h } from 'preact';\nimport { CancelBtn, DoneBtn, PauseResumeButton, ProgressBarComplete, ProgressBarError, ProgressBarProcessing, ProgressBarUploading, RetryBtn, UploadBtn, } from './Components.js';\nimport calculateProcessingProgress from './calculateProcessingProgress.js';\nimport statusBarStates from './StatusBarStates.js';\nconst { STATE_ERROR, STATE_WAITING, STATE_PREPROCESSING, STATE_UPLOADING, STATE_POSTPROCESSING, STATE_COMPLETE, } = statusBarStates;\nexport default function StatusBarUI({ newFiles, allowNewUpload, isUploadInProgress, isAllPaused, resumableUploads, error, hideUploadButton = undefined, hidePauseResumeButton = false, hideCancelButton = false, hideRetryButton = false, recoveredState, uploadState, totalProgress, files, supportsUploadProgress, hideAfterFinish = false, isSomeGhost, doneButtonHandler = undefined, isUploadStarted, i18n, startUpload, uppy, isAllComplete, showProgressDetails = undefined, numUploads, complete, totalSize, totalETA, totalUploadedSize, }) {\n    function getProgressValue() {\n        switch (uploadState) {\n            case STATE_POSTPROCESSING:\n            case STATE_PREPROCESSING: {\n                const progress = calculateProcessingProgress(files);\n                if (progress.mode === 'determinate') {\n                    return progress.value * 100;\n                }\n                return totalProgress;\n            }\n            case STATE_ERROR: {\n                return null;\n            }\n            case STATE_UPLOADING: {\n                if (!supportsUploadProgress) {\n                    return null;\n                }\n                return totalProgress;\n            }\n            default:\n                return totalProgress;\n        }\n    }\n    function getIsIndeterminate() {\n        switch (uploadState) {\n            case STATE_POSTPROCESSING:\n            case STATE_PREPROCESSING: {\n                const { mode } = calculateProcessingProgress(files);\n                return mode === 'indeterminate';\n            }\n            case STATE_UPLOADING: {\n                if (!supportsUploadProgress) {\n                    return true;\n                }\n                return false;\n            }\n            default:\n                return false;\n        }\n    }\n    const progressValue = getProgressValue();\n    const width = progressValue ?? 100;\n    const showUploadBtn = !error &&\n        newFiles &&\n        ((!isUploadInProgress && !isAllPaused) || recoveredState) &&\n        allowNewUpload &&\n        !hideUploadButton;\n    const showCancelBtn = !hideCancelButton &&\n        uploadState !== STATE_WAITING &&\n        uploadState !== STATE_COMPLETE;\n    const showPauseResumeBtn = resumableUploads &&\n        !hidePauseResumeButton &&\n        uploadState === STATE_UPLOADING;\n    const showRetryBtn = error && !isAllComplete && !hideRetryButton;\n    const showDoneBtn = doneButtonHandler && uploadState === STATE_COMPLETE;\n    const progressClassNames = classNames('uppy-StatusBar-progress', {\n        'is-indeterminate': getIsIndeterminate(),\n    });\n    const statusBarClassNames = classNames('uppy-StatusBar', `is-${uploadState}`, { 'has-ghosts': isSomeGhost });\n    const progressBarStateEl = (() => {\n        switch (uploadState) {\n            case STATE_PREPROCESSING:\n            case STATE_POSTPROCESSING:\n                return (_jsx(ProgressBarProcessing, { progress: calculateProcessingProgress(files) }));\n            case STATE_COMPLETE:\n                return _jsx(ProgressBarComplete, { i18n: i18n });\n            case STATE_ERROR:\n                return (_jsx(ProgressBarError, { error: error, i18n: i18n, numUploads: numUploads, complete: complete }));\n            case STATE_UPLOADING:\n                return (_jsx(ProgressBarUploading, { i18n: i18n, supportsUploadProgress: supportsUploadProgress, totalProgress: totalProgress, showProgressDetails: showProgressDetails, isUploadStarted: isUploadStarted, isAllComplete: isAllComplete, isAllPaused: isAllPaused, newFiles: newFiles, numUploads: numUploads, complete: complete, totalUploadedSize: totalUploadedSize, totalSize: totalSize, totalETA: totalETA, startUpload: startUpload }));\n            default:\n                return null;\n        }\n    })();\n    const atLeastOneAction = showUploadBtn ||\n        showRetryBtn ||\n        showPauseResumeBtn ||\n        showCancelBtn ||\n        showDoneBtn;\n    const thereIsNothingInside = !atLeastOneAction && !progressBarStateEl;\n    const isHidden = thereIsNothingInside || (uploadState === STATE_COMPLETE && hideAfterFinish);\n    if (isHidden) {\n        return null;\n    }\n    return (_jsxs(\"div\", { className: statusBarClassNames, children: [_jsx(\"div\", { className: progressClassNames, style: { width: `${width}%` }, role: \"progressbar\", \"aria-label\": `${width}%`, \"aria-valuetext\": `${width}%`, \"aria-valuemin\": 0, \"aria-valuemax\": 100, \"aria-valuenow\": progressValue }), progressBarStateEl, _jsxs(\"div\", { className: \"uppy-StatusBar-actions\", children: [showUploadBtn ? (_jsx(UploadBtn, { newFiles: newFiles, isUploadStarted: isUploadStarted, recoveredState: recoveredState, i18n: i18n, isSomeGhost: isSomeGhost, startUpload: startUpload, uploadState: uploadState })) : null, showRetryBtn ? _jsx(RetryBtn, { i18n: i18n, uppy: uppy }) : null, showPauseResumeBtn ? (_jsx(PauseResumeButton, { isAllPaused: isAllPaused, i18n: i18n, isAllComplete: isAllComplete, resumableUploads: resumableUploads, uppy: uppy })) : null, showCancelBtn ? _jsx(CancelBtn, { i18n: i18n, uppy: uppy }) : null, showDoneBtn ? (_jsx(DoneBtn, { i18n: i18n, doneButtonHandler: doneButtonHandler })) : null] })] }));\n}\n", "import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\nimport prettierBytes from '@transloadit/prettier-bytes';\nimport prettyETA from '@uppy/utils/lib/prettyETA';\nimport classNames from 'classnames';\nimport { h } from 'preact';\nimport statusBarStates from './StatusBarStates.js';\nconst DOT = `\\u00B7`;\nconst renderDot = () => ` ${DOT} `;\nfunction UploadBtn(props) {\n    const { newFiles, isUploadStarted, recoveredState, i18n, uploadState, isSomeGhost, startUpload, } = props;\n    const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--upload', {\n        'uppy-c-btn-primary': uploadState === statusBarStates.STATE_WAITING,\n    }, { 'uppy-StatusBar-actionBtn--disabled': isSomeGhost });\n    const uploadBtnText = newFiles && isUploadStarted && !recoveredState\n        ? i18n('uploadXNewFiles', { smart_count: newFiles })\n        : i18n('uploadXFiles', { smart_count: newFiles });\n    return (_jsx(\"button\", { type: \"button\", className: uploadBtnClassNames, \"aria-label\": i18n('uploadXFiles', { smart_count: newFiles }), onClick: startUpload, disabled: isSomeGhost, \"data-uppy-super-focusable\": true, children: uploadBtnText }));\n}\nfunction RetryBtn(props) {\n    const { i18n, uppy } = props;\n    return (_jsxs(\"button\", { type: \"button\", className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry\", \"aria-label\": i18n('retryUpload'), onClick: () => uppy.retryAll().catch(() => {\n            /* Error reported and handled via an event */\n        }), \"data-uppy-super-focusable\": true, \"data-cy\": \"retry\", children: [_jsx(\"svg\", { \"aria-hidden\": \"true\", focusable: \"false\", className: \"uppy-c-icon\", width: \"8\", height: \"10\", viewBox: \"0 0 8 10\", children: _jsx(\"path\", { d: \"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z\" }) }), i18n('retry')] }));\n}\nfunction CancelBtn(props) {\n    const { i18n, uppy } = props;\n    return (_jsx(\"button\", { type: \"button\", className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\", title: i18n('cancel'), \"aria-label\": i18n('cancel'), onClick: () => uppy.cancelAll(), \"data-cy\": \"cancel\", \"data-uppy-super-focusable\": true, children: _jsx(\"svg\", { \"aria-hidden\": \"true\", focusable: \"false\", className: \"uppy-c-icon\", width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", children: _jsxs(\"g\", { fill: \"none\", fillRule: \"evenodd\", children: [_jsx(\"circle\", { fill: \"#888\", cx: \"8\", cy: \"8\", r: \"8\" }), _jsx(\"path\", { fill: \"#FFF\", d: \"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z\" })] }) }) }));\n}\nfunction PauseResumeButton(props) {\n    const { isAllPaused, i18n, isAllComplete, resumableUploads, uppy } = props;\n    const title = isAllPaused ? i18n('resume') : i18n('pause');\n    function togglePauseResume() {\n        if (isAllComplete)\n            return;\n        if (!resumableUploads) {\n            uppy.cancelAll();\n            return;\n        }\n        if (isAllPaused) {\n            uppy.resumeAll();\n            return;\n        }\n        uppy.pauseAll();\n    }\n    return (_jsx(\"button\", { title: title, \"aria-label\": title, className: \"uppy-u-reset uppy-StatusBar-actionCircleBtn\", type: \"button\", onClick: togglePauseResume, \"data-cy\": \"togglePauseResume\", \"data-uppy-super-focusable\": true, children: _jsx(\"svg\", { \"aria-hidden\": \"true\", focusable: \"false\", className: \"uppy-c-icon\", width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", children: _jsxs(\"g\", { fill: \"none\", fillRule: \"evenodd\", children: [_jsx(\"circle\", { fill: \"#888\", cx: \"8\", cy: \"8\", r: \"8\" }), _jsx(\"path\", { fill: \"#FFF\", d: isAllPaused\n                            ? 'M6 4.25L11.5 8 6 11.75z'\n                            : 'M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z' })] }) }) }));\n}\nfunction DoneBtn(props) {\n    const { i18n, doneButtonHandler } = props;\n    return (_jsx(\"button\", { type: \"button\", className: \"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done\", onClick: doneButtonHandler, \"data-uppy-super-focusable\": true, children: i18n('done') }));\n}\nfunction LoadingSpinner() {\n    return (_jsx(\"svg\", { className: \"uppy-StatusBar-spinner\", \"aria-hidden\": \"true\", focusable: \"false\", width: \"14\", height: \"14\", children: _jsx(\"path\", { d: \"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0\", fillRule: \"evenodd\" }) }));\n}\nfunction ProgressBarProcessing(props) {\n    const { progress } = props;\n    const { value, mode, message } = progress;\n    const dot = `\\u00B7`;\n    return (_jsxs(\"div\", { className: \"uppy-StatusBar-content\", children: [_jsx(LoadingSpinner, {}), mode === 'determinate' ? `${Math.round(value * 100)}% ${dot} ` : '', message] }));\n}\nfunction ProgressDetails(props) {\n    const { numUploads, complete, totalUploadedSize, totalSize, totalETA, i18n } = props;\n    const ifShowFilesUploadedOfTotal = numUploads > 1;\n    const totalUploadedSizeStr = prettierBytes(totalUploadedSize);\n    return (_jsxs(\"div\", { className: \"uppy-StatusBar-statusSecondary\", children: [ifShowFilesUploadedOfTotal &&\n                i18n('filesUploadedOfTotal', {\n                    complete,\n                    smart_count: numUploads,\n                }), _jsxs(\"span\", { className: \"uppy-StatusBar-additionalInfo\", children: [ifShowFilesUploadedOfTotal && renderDot(), totalSize != null\n                        ? i18n('dataUploadedOfTotal', {\n                            complete: totalUploadedSizeStr,\n                            total: prettierBytes(totalSize),\n                        })\n                        : i18n('dataUploadedOfUnknown', { complete: totalUploadedSizeStr }), renderDot(), totalETA != null &&\n                        i18n('xTimeLeft', {\n                            time: prettyETA(totalETA),\n                        })] })] }));\n}\nfunction FileUploadCount(props) {\n    const { i18n, complete, numUploads } = props;\n    return (_jsx(\"div\", { className: \"uppy-StatusBar-statusSecondary\", children: i18n('filesUploadedOfTotal', { complete, smart_count: numUploads }) }));\n}\nfunction UploadNewlyAddedFiles(props) {\n    const { i18n, newFiles, startUpload } = props;\n    const uploadBtnClassNames = classNames('uppy-u-reset', 'uppy-c-btn', 'uppy-StatusBar-actionBtn', 'uppy-StatusBar-actionBtn--uploadNewlyAdded');\n    return (_jsxs(\"div\", { className: \"uppy-StatusBar-statusSecondary\", children: [_jsx(\"div\", { className: \"uppy-StatusBar-statusSecondaryHint\", children: i18n('xMoreFilesAdded', { smart_count: newFiles }) }), _jsx(\"button\", { type: \"button\", className: uploadBtnClassNames, \"aria-label\": i18n('uploadXFiles', { smart_count: newFiles }), onClick: startUpload, children: i18n('upload') })] }));\n}\nfunction ProgressBarUploading(props) {\n    const { i18n, supportsUploadProgress, totalProgress, showProgressDetails, isUploadStarted, isAllComplete, isAllPaused, newFiles, numUploads, complete, totalUploadedSize, totalSize, totalETA, startUpload, } = props;\n    const showUploadNewlyAddedFiles = newFiles && isUploadStarted;\n    if (!isUploadStarted || isAllComplete) {\n        return null;\n    }\n    const title = isAllPaused ? i18n('paused') : i18n('uploading');\n    function renderProgressDetails() {\n        if (!isAllPaused && !showUploadNewlyAddedFiles && showProgressDetails) {\n            if (supportsUploadProgress) {\n                return (_jsx(ProgressDetails, { numUploads: numUploads, complete: complete, totalUploadedSize: totalUploadedSize, totalSize: totalSize, totalETA: totalETA, i18n: i18n }));\n            }\n            return (_jsx(FileUploadCount, { i18n: i18n, complete: complete, numUploads: numUploads }));\n        }\n        return null;\n    }\n    return (_jsxs(\"div\", { className: \"uppy-StatusBar-content\", title: title, children: [!isAllPaused ? _jsx(LoadingSpinner, {}) : null, _jsxs(\"div\", { className: \"uppy-StatusBar-status\", children: [_jsx(\"div\", { className: \"uppy-StatusBar-statusPrimary\", children: supportsUploadProgress && totalProgress !== 0\n                            ? `${title}: ${totalProgress}%`\n                            : title }), renderProgressDetails(), showUploadNewlyAddedFiles ? (_jsx(UploadNewlyAddedFiles, { i18n: i18n, newFiles: newFiles, startUpload: startUpload })) : null] })] }));\n}\nfunction ProgressBarComplete(props) {\n    const { i18n } = props;\n    return (_jsx(\"div\", { className: \"uppy-StatusBar-content\", \n        // biome-ignore lint/a11y/useSemanticElements: ...\n        role: \"status\", title: i18n('complete'), children: _jsx(\"div\", { className: \"uppy-StatusBar-status\", children: _jsxs(\"div\", { className: \"uppy-StatusBar-statusPrimary\", children: [_jsx(\"svg\", { \"aria-hidden\": \"true\", focusable: \"false\", className: \"uppy-StatusBar-statusIndicator uppy-c-icon\", width: \"15\", height: \"11\", viewBox: \"0 0 15 11\", children: _jsx(\"path\", { d: \"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z\" }) }), i18n('complete')] }) }) }));\n}\nfunction ProgressBarError(props) {\n    const { error, i18n, complete, numUploads } = props;\n    function displayErrorAlert() {\n        const errorMessage = `${i18n('uploadFailed')} \\n\\n ${error}`;\n        alert(errorMessage); // TODO: move to custom alert implementation\n    }\n    return (_jsxs(\"div\", { className: \"uppy-StatusBar-content\", title: i18n('uploadFailed'), children: [_jsx(\"svg\", { \"aria-hidden\": \"true\", focusable: \"false\", className: \"uppy-StatusBar-statusIndicator uppy-c-icon\", width: \"11\", height: \"11\", viewBox: \"0 0 11 11\", children: _jsx(\"path\", { d: \"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z\" }) }), _jsxs(\"div\", { className: \"uppy-StatusBar-status\", children: [_jsxs(\"div\", { className: \"uppy-StatusBar-statusPrimary\", children: [i18n('uploadFailed'), _jsx(\"button\", { className: \"uppy-u-reset uppy-StatusBar-details\", \"aria-label\": i18n('showErrorDetails'), \"data-microtip-position\": \"top-right\", \"data-microtip-size\": \"medium\", onClick: displayErrorAlert, type: \"button\", children: \"?\" })] }), _jsx(FileUploadCount, { i18n: i18n, complete: complete, numUploads: numUploads })] })] }));\n}\nexport { UploadBtn, RetryBtn, CancelBtn, PauseResumeButton, DoneBtn, LoadingSpinner, ProgressDetails, ProgressBarProcessing, ProgressBarError, ProgressBarUploading, ProgressBarComplete, };\n", "export default function secondsToTime(rawSeconds) {\n    const hours = Math.floor(rawSeconds / 3600) % 24;\n    const minutes = Math.floor(rawSeconds / 60) % 60;\n    const seconds = Math.floor(rawSeconds % 60);\n    return { hours, minutes, seconds };\n}\n", "import secondsToTime from './secondsToTime.js';\nexport default function prettyETA(seconds) {\n    const time = secondsToTime(seconds);\n    // Only display hours and minutes if they are greater than 0 but always\n    // display minutes if hours is being displayed\n    // Display a leading zero if the there is a preceding unit: 1m 05s, but 5s\n    const hoursStr = time.hours === 0 ? '' : `${time.hours}h`;\n    const minutesStr = time.minutes === 0\n        ? ''\n        : `${time.hours === 0\n            ? time.minutes\n            : ` ${time.minutes.toString(10).padStart(2, '0')}`}m`;\n    const secondsStr = time.hours !== 0\n        ? ''\n        : `${time.minutes === 0\n            ? time.seconds\n            : ` ${time.seconds.toString(10).padStart(2, '0')}`}s`;\n    return `${hoursStr}${minutesStr}${secondsStr}`;\n}\n", "export default function calculateProcessingProgress(files) {\n    const values = [];\n    let mode = 'indeterminate';\n    let message;\n    for (const { progress } of Object.values(files)) {\n        const { preprocess, postprocess } = progress;\n        // In the future we should probably do this differently. For now we'll take the\n        // mode and message from the first file\u2026\n        if (message == null && (preprocess || postprocess)) {\n            ;\n            ({ mode, message } = preprocess || postprocess);\n        }\n        if (preprocess?.mode === 'determinate')\n            values.push(preprocess.value);\n        if (postprocess?.mode === 'determinate')\n            values.push(postprocess.value);\n    }\n    const value = values.reduce((total, progressValue) => {\n        return total + progressValue / values.length;\n    }, 0);\n    return {\n        mode,\n        message,\n        value,\n    };\n}\n", "const de_DE = {\n    pluralize(count) {\n        if (count === 1) {\n            return 0;\n        }\n\n        return 1;\n    }\n\n};\nde_DE.strings = {\n    addBulkFilesFailed: {\n        '0': 'Das Hinzuf\u00FCgen einer Datei ist aufgrund eines internen Fehlers fehlgeschlagen',\n        '1': 'Das Hinzuf\u00FCgen von %{smart_count} Dateien ist aufgrund eines internen Fehlers fehlgeschlagen'\n    },\n    addingMoreFiles: 'Dateien hinzuf\u00FCgen',\n    addMore: 'Mehr hinzuf\u00FCgen',\n    addMoreFiles: 'Dateien hinzuf\u00FCgen',\n    allFilesFromFolderNamed: 'Alle Dateien vom Ordner %{name}',\n    allowAccessDescription: 'Um Bilder oder Videos mit Ihrer Kamera aufzunehmen, erlauben Sie dieser Website bitte den Zugriff auf Ihre Kamera.',\n    allowAccessTitle: 'Bitte erlauben Sie Zugriff auf Ihre Kamera',\n    aspectRatioLandscape: 'Zuschneiden auf Querformat (16:9)',\n    aspectRatioPortrait: 'Zuschneiden auf Hochformat (9:16)',\n    aspectRatioSquare: 'Zuschneiden auf Quadrat',\n    authenticateWith: 'Mit %{pluginName} verbinden',\n    authenticateWithTitle: 'Bitte authentifizieren Sie sich mit %{pluginName}, um Dateien auszuw\u00E4hlen',\n    back: 'Zur\u00FCck',\n    backToSearch: 'Zur\u00FCck zur Suche',\n    browse: 'Datei-Auswahl',\n    mediaPool: 'Medienpool',\n    browseFiles: 'Dateien durchsuchen',\n    browseFolders: 'Ordner durchsuchen',\n    cancel: 'Abbrechen',\n    cancelUpload: 'Hochladen abbrechen',\n    chooseFiles: 'Dateien ausw\u00E4hlen',\n    closeModal: 'Fenster schlie\u00DFen',\n    companionError: 'Verbindung zu Companion fehlgeschlagen',\n    companionUnauthorizeHint: 'Um die Autorisierung f\u00FCr Ihr %{provider} Konto aufzuheben, gehen Sie bitte zu %{url}',\n    complete: 'Fertig',\n    connectedToInternet: 'Mit dem Internet verbunden',\n    copyLink: 'Link kopieren',\n    copyLinkToClipboardFallback: 'Untenstehende URL kopieren',\n    copyLinkToClipboardSuccess: 'Link in die Zwischenablage kopiert',\n    creatingAssembly: 'Das Hochladen wird vorbereiten...',\n    creatingAssemblyFailed: 'Transloadit: Assembly konnte nicht erstellt werden',\n    dashboardTitle: 'Hochladen von Dateien',\n    dashboardWindowTitle: 'Hochladen von Dateien (ESC dr\u00FCcken zum Schlie\u00DFen)',\n    dataUploadedOfTotal: '%{complete} von %{total}',\n    discardRecordedFile: 'Aufgenommene Datei verwerfen',\n    done: 'Abgeschlossen',\n    dropHereOr: 'Dateien k\u00F6nnen \u00FCber \"Drag&Drop\" oder per %{browse} hinzugef\u00FCgt werden',\n    dropHereOrMediaPool: 'Dateien k\u00F6nnen aus Ihrem %{mediaPool}, \u00FCber Drag&Drop oder per %{browse} hinzugef\u00FCgt werden',\n    dropHint: 'Dateien hier ablegen',\n    dropPasteBoth: 'Dateien hier ablegen/einf\u00FCgen, %{browseFiles} oder %{browseFolders}',\n    dropPasteFiles: 'Dateien hier ablegen/einf\u00FCgen oder %{browseFiles}',\n    dropPasteFolders: 'Dateien hier ablegen/einf\u00FCgen oder %{browseFolders}',\n    dropPasteImportBoth: 'Dateien hier ablegen/einf\u00FCgen, %{browse} oder von folgenden Quellen importieren:',\n    dropPasteImportFiles: 'Dateien hier ablegen/einf\u00FCgen, %{browseFiles} oder von folgenden Quellen importieren:',\n    dropPasteImportFolders: 'Dateien hier ablegen/einf\u00FCgen, %{browseFolders} oder von folgenden Quellen importieren:',\n    editFile: 'Datei bearbeiten',\n    editFileWithFilename: 'Datei %{file} bearbeiten',\n    editing: '%{file} bearbeiten',\n    emptyFolderAdded: 'Keine Dateien hinzugef\u00FCgt, da der Ordner leer war',\n    encoding: 'Kodieren...',\n    enterCorrectUrl: 'Falsche URL: Bitte stellen Sie sicher, dass Sie einen direkten Link zu einer Datei eingeben',\n    enterTextToSearch: 'Text zum Suchen von Bildern eingeben',\n    enterUrlToImport: 'URL zum Importieren einer Datei eingeben',\n    exceedsSize: 'Diese Datei ist gr\u00F6\u00DFer als die maximal erlaubte Dateigr\u00F6\u00DFe',\n    failedToFetch: 'Companion konnte diese URL nicht verarbeiten - stellen Sie bitte sicher, dass sie korrekt ist',\n    failedToUpload: 'Fehler beim Hochladen der Datei %{file}',\n    filesUploadedOfTotal: {\n        '0': '%{complete} von %{smart_count} Datei hochgeladen',\n        '1': '%{complete} von %{smart_count} Dateien hochgeladen'\n    },\n    filter: 'Filter',\n    finishEditingFile: 'Bearbeitung beenden',\n    flipHorizontal: 'Horizontal spiegeln',\n    folderAdded: {\n        '0': 'Eine Datei von %{folder} hinzugef\u00FCgt',\n        '1': '%{smart_count} Dateien von %{folder} hinzugef\u00FCgt'\n    },\n    folderAlreadyAdded: 'Der Ordner \"%{folder}\" wurde bereits hinzugef\u00FCgt',\n    generatingThumbnails: 'Erstellen von Miniaturansichten...',\n    import: 'Importieren',\n    importFiles: 'Importiere Dateien von:',\n    importFrom: 'Importieren von %{name}',\n    inferiorSize: 'Diese Datei ist kleiner als die minimal erlaubte Dateigr\u00F6\u00DFe von %{size}',\n    loading: 'Laden...',\n    logOut: 'Abmelden',\n    micDisabled: 'Zugriff auf Mikrofon von Benutzer abgelehnt',\n    missingRequiredMetaField: 'Fehlende erforderliche Meta-Felder',\n    missingRequiredMetaFieldOnFile: 'Fehlende erforderliche Meta-Felder in %{fileName}',\n    myDevice: 'Mein Ger\u00E4t',\n    noCameraDescription: 'Bitte Kamera anschlie\u00DFen, um Bilder oder Videos aufzunehmen',\n    noCameraTitle: 'Kamera nicht verf\u00FCgbar',\n    noDuplicates: 'Datei \\'%{fileName}\\' existiert bereits und kann nicht erneut hinzugef\u00FCgt werden',\n    noFilesFound: 'Sie haben hier keine Dateien oder Ordner',\n    noInternetConnection: 'Keine Internetverbindung',\n    noMoreFilesAllowed: 'W\u00E4hrend der Upload l\u00E4uft, k\u00F6nnen keine weiteren Dateien hinzugef\u00FCgt werden',\n    openFolderNamed: 'Ordner %{name} \u00F6ffnen',\n    pause: 'Pausieren',\n    paused: 'Pausiert',\n    pauseUpload: 'Hochladen pausieren',\n    pluginNameBox: 'Box',\n    pluginNameCamera: 'Kamera',\n    pluginNameDropbox: 'Dropbox',\n    pluginNameFacebook: 'Facebook',\n    pluginNameGoogleDrive: 'Google Drive',\n    pluginNameInstagram: 'Instagram',\n    pluginNameOneDrive: 'OneDrive',\n    pluginNameZoom: 'Zoom',\n    poweredBy: 'Powered by %{uppy}',\n    processingXFiles: {\n        '0': 'Eine Datei verarbeiten',\n        '1': '%{smart_count} Dateien verarbeiten'\n    },\n    recording: 'Aufnahme',\n    recordingLength: 'Aufnahmedauer %{recording_length}',\n    recordingStoppedMaxSize: 'Die Aufnahme wurde gestoppt, weil die Dateigr\u00F6\u00DFe das Limit \u00FCberschritten hat',\n    recoveredAllFiles: 'Wir haben alle Dateien wiederhergestellt. Sie k\u00F6nnen mit dem Hochladen fortfahren.',\n    recoveredXFiles: {\n        '0': 'Wir konnten eine Datei nicht vollst\u00E4ndig wiederherstellen. Bitte w\u00E4hlen Sie sie erneut aus und fahren Sie dann mit dem Hochladen fort.',\n        '1': 'Wir konnten %{smart_count} Dateien nicht vollst\u00E4ndig wiederherstellen. Bitte w\u00E4hlen Sie sie erneut aus und fahren Sie dann mit dem Hochladen fort.'\n    },\n    removeFile: 'Datei entfernen',\n    removeFileAriaLabel: 'Datei %{file} entfernen',\n    reSelect: 'Erneut ausw\u00E4hlen',\n    resetFilter: 'Filter zur\u00FCcksetzen',\n    resume: 'Fortsetzen',\n    resumeUpload: 'Hochladen fortsetzen',\n    retry: 'Erneut versuchen',\n    retryUpload: 'Hochladen erneut versuchen',\n    revert: 'R\u00FCckg\u00E4ngig machen',\n    rotate: 'Drehen',\n    save: 'Speichern',\n    saveChanges: '\u00C4nderungen speichern',\n    searchImages: 'Suche nach Bildern',\n    selectX: {\n        '0': 'W\u00E4hlen Sie %{smart_count}',\n        '1': 'W\u00E4hlen Sie %{smart_count}'\n    },\n    sessionRestored: '',\n    smile: 'Bitte l\u00E4cheln!',\n    startCapturing: 'Bildschirmaufnahme starten',\n    startRecording: 'Videoaufnahme starten',\n    stopCapturing: 'Bildschirmaufnahme stoppen',\n    stopRecording: 'Videoaufnahme stoppen',\n    streamActive: 'Stream aktiv',\n    streamPassive: 'Stream passiv',\n    submitRecordedFile: 'Aufgezeichnete Datei verwenden',\n    takePicture: 'Ein Foto machen',\n    timedOut: 'Upload f\u00FCr %{seconds} Sekunden stehen geblieben, breche ab.',\n    upload: 'Hochladen',\n    uploadComplete: 'Hochladen abgeschlossen',\n    currentFilesAnnouncement: {\n        '0': 'Aktuelle Datei: %{files}',\n        '1': 'Aktuelle Dateien: %{files}'\n    },\n    noFilesAnnouncement: 'Keine Dateien vorhanden',\n    fileRemovedAnnouncement: '%{file} entfernt.',\n    uploadSuccessAnnouncement: {\n        '0': '%{files} erfolgreich hochgeladen.',\n        '1': '%{files} erfolgreich hochgeladen.'\n    },\n    filesCountDescription: {\n        '0': '%{smart_count} Datei hinzugef\u00FCgt',\n        '1': '%{smart_count} Dateien hinzugef\u00FCgt'\n    },\n    uploadFailed: 'Hochladen fehlgeschlagen',\n    uploading: 'Wird hochgeladen',\n    uploadingXFiles: {\n        '0': 'Eine Datei wird hochgeladen',\n        '1': '%{smart_count} Dateien werden hochgeladen'\n    },\n    uploadPaused: 'Hochladen pausiert',\n    uploadXFiles: {\n        '0': 'Eine Datei hochladen',\n        '1': '%{smart_count} Dateien hochladen'\n    },\n    uploadXNewFiles: {\n        '0': '+%{smart_count} Datei hochladen',\n        '1': '+%{smart_count} Dateien hochladen'\n    },\n    xFilesSelected: {\n        '0': 'Eine Datei ausgew\u00E4hlt',\n        '1': '%{smart_count} Dateien ausgew\u00E4hlt'\n    },\n    xMoreFilesAdded: {\n        '0': 'Eine weitere Datei hinzugef\u00FCgt',\n        '1': '%{smart_count} weitere Dateien hinzugef\u00FCgt'\n    },\n    xTimeLeft: '%{time} verbleibend',\n    youCanOnlyUploadFileTypes: 'Sie k\u00F6nnen nur folgende Dateitypen hochladen: %{types}',\n    fileTypeNotAllowed: 'Der Dateityp der Datei ist nicht erlaubt',\n    youCanOnlyUploadX: {\n        '0': 'Sie k\u00F6nnen nur eine Datei hochladen',\n        '1': 'Sie k\u00F6nnen nur %{smart_count} Dateien hochladen'\n    },\n    youHaveToAtLeastSelectX: {\n        '0': 'Sie m\u00FCssen mindestens eine Datei ausw\u00E4hlen',\n        '1': 'Sie m\u00FCssen mindestens %{smart_count} Dateien ausw\u00E4hlen'\n    },\n    zoomIn: 'Vergr\u00F6\u00DFern',\n    zoomOut: 'Verkleinern'\n};\n\nif (typeof Uppy !== 'undefined') {\n    globalThis.Uppy.locales.de_DE = de_DE;\n}\n\nexport default de_DE;\n", "const en_US = {\n    pluralize(count) {\n        if (count === 1) {\n            return 0;\n        }\n\n        return 1;\n    }\n\n};\nen_US.strings = {\n    addBulkFilesFailed: {\n        '0': 'Failed to add %{smart_count} file due to an internal error',\n        '1': 'Failed to add %{smart_count} files due to internal errors'\n    },\n    addingMoreFiles: 'Adding more files',\n    addMore: 'Add more',\n    addMoreFiles: 'Add more files',\n    allFilesFromFolderNamed: 'All files from folder %{name}',\n    allowAccessDescription: 'In order to take pictures or record video with your camera, please allow camera access for this site.',\n    allowAccessTitle: 'Please allow access to your camera',\n    allowAudioAccessDescription: 'In order to record audio, please allow microphone access for this site.',\n    allowAudioAccessTitle: 'Please allow access to your microphone',\n    aspectRatioLandscape: 'Crop landscape (16:9)',\n    aspectRatioPortrait: 'Crop portrait (9:16)',\n    aspectRatioSquare: 'Crop square',\n    authAborted: 'Authentication aborted',\n    authenticateWith: 'Connect to %{pluginName}',\n    authenticateWithTitle: 'Please authenticate with %{pluginName} to select files',\n    back: 'Back',\n    browse: 'browse',\n    mediaPool: 'media pool',\n    browseFiles: 'browse files',\n    browseFolders: 'browse folders',\n    cancel: 'Cancel',\n    cancelUpload: 'Cancel upload',\n    chooseFiles: 'Choose files',\n    closeModal: 'Close Modal',\n    companionError: 'Connection with Companion failed',\n    companionUnauthorizeHint: 'To unauthorize to your %{provider} account, please go to %{url}',\n    complete: 'Complete',\n    compressedX: 'Saved %{size} by compressing images',\n    compressingImages: 'Compressing images...',\n    connectedToInternet: 'Connected to the Internet',\n    copyLink: 'Copy link',\n    copyLinkToClipboardFallback: 'Copy the URL below',\n    copyLinkToClipboardSuccess: 'Link copied to clipboard.',\n    creatingAssembly: 'Preparing upload...',\n    creatingAssemblyFailed: 'Transloadit: Could not create Assembly',\n    dashboardTitle: 'Uppy Dashboard',\n    dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',\n    dataUploadedOfTotal: '%{complete} of %{total}',\n    discardRecordedFile: 'Discard recorded file',\n    done: 'Done',\n    dropHereOr: 'Drop here or %{browse}',\n    dropHereOrMediaPool: 'Search files in your %{mediaPool}, drop files here or %{browse}',\n    dropHint: 'Drop your files here',\n    dropPasteBoth: 'Drop files here, %{browseFiles} or %{browseFolders}',\n    dropPasteFiles: 'Drop files here or %{browseFiles}',\n    dropPasteFolders: 'Drop files here or %{browseFolders}',\n    dropPasteImportBoth: 'Drop files here, %{browseFiles}, %{browseFolders} or import from:',\n    dropPasteImportFiles: 'Drop files here, %{browseFiles} or import from:',\n    dropPasteImportFolders: 'Drop files here, %{browseFolders} or import from:',\n    editFile: 'Edit file',\n    editFileWithFilename: 'Edit file %{file}',\n    editing: 'Editing %{file}',\n    emptyFolderAdded: 'No files were added from empty folder',\n    encoding: 'Encoding...',\n    enterCorrectUrl: 'Incorrect URL: Please make sure you are entering a direct link to a file',\n    enterTextToSearch: 'Enter text to search for images',\n    enterUrlToImport: 'Enter URL to import a file',\n    exceedsSize: 'This file exceeds maximum allowed size',\n    failedToFetch: 'Companion failed to fetch this URL, please make sure it\u2019s correct',\n    failedToUpload: 'Failed to upload %{file}',\n    filesUploadedOfTotal: {\n        '0': '%{complete} of %{smart_count} file uploaded',\n        '1': '%{complete} of %{smart_count} files uploaded'\n    },\n    filter: 'Filter',\n    finishEditingFile: 'Finish editing file',\n    flipHorizontal: 'Flip horizontal',\n    folderAdded: {\n        '0': 'Added %{smart_count} file from %{folder}',\n        '1': 'Added %{smart_count} files from %{folder}'\n    },\n    folderAlreadyAdded: 'The folder \"%{folder}\" was already added',\n    generatingThumbnails: 'Generating thumbnails...',\n    import: 'Import',\n    importFiles: 'Import files from:',\n    importFrom: 'Import from %{name}',\n    inferiorSize: 'This file is smaller than the allowed size of %{size}',\n    loading: 'Loading...',\n    logOut: 'Log out',\n    micDisabled: 'Microphone access denied by user',\n    missingRequiredMetaField: 'Missing required meta fields',\n    missingRequiredMetaFieldOnFile: 'Missing required meta fields in %{fileName}',\n    missingRequiredMetaFields: {\n        '0': 'Missing required meta field: %{fields}.',\n        '1': 'Missing required meta fields: %{fields}.'\n    },\n    myDevice: 'My Device',\n    noAudioDescription: 'In order to record audio, please connect a microphone or another audio input device',\n    noAudioTitle: 'Microphone Not Available',\n    noCameraDescription: 'In order to take pictures or record video, please connect a camera device',\n    noCameraTitle: 'Camera Not Available',\n    noDuplicates: \"Cannot add the duplicate file '%{fileName}', it already exists\",\n    noFilesFound: 'You have no files or folders here',\n    noInternetConnection: 'No Internet connection',\n    noMoreFilesAllowed: 'Cannot add more files',\n    openFolderNamed: 'Open folder %{name}',\n    pause: 'Pause',\n    paused: 'Paused',\n    pauseUpload: 'Pause upload',\n    pluginNameAudio: 'Audio',\n    pluginNameBox: 'Box',\n    pluginNameCamera: 'Camera',\n    pluginNameDropbox: 'Dropbox',\n    pluginNameFacebook: 'Facebook',\n    pluginNameGoogleDrive: 'Google Drive',\n    pluginNameInstagram: 'Instagram',\n    pluginNameOneDrive: 'OneDrive',\n    pluginNameZoom: 'Zoom',\n    poweredBy: 'Powered by %{uppy}',\n    processingXFiles: {\n        '0': 'Processing %{smart_count} file',\n        '1': 'Processing %{smart_count} files'\n    },\n    recording: 'Recording',\n    recordingLength: 'Recording length %{recording_length}',\n    recordingStoppedMaxSize: 'Recording stopped because the file size is about to exceed the limit',\n    recordVideoBtn: 'Record Video',\n    recoveredAllFiles: 'We restored all files. You can now resume the upload.',\n    recoveredXFiles: {\n        '0': 'We could not fully recover 1 file. Please re-select it and resume the upload.',\n        '1': 'We could not fully recover %{smart_count} files. Please re-select them and resume the upload.'\n    },\n    removeFile: 'Remove file',\n    removeFileAriaLabel: 'Remove file %{file}',\n    reSelect: 'Re-select',\n    resetFilter: 'Reset filter',\n    resume: 'Resume',\n    resumeUpload: 'Resume upload',\n    retry: 'Retry',\n    retryUpload: 'Retry upload',\n    revert: 'Revert',\n    rotate: 'Rotate',\n    save: 'Save',\n    saveChanges: 'Save changes',\n    search: 'Search',\n    searchImages: 'Search for images',\n    selectX: {\n        '0': 'Select %{smart_count}',\n        '1': 'Select %{smart_count}'\n    },\n    sessionRestored: 'Session restored',\n    showErrorDetails: 'Show error details',\n    signInWithGoogle: 'Sign in with Google',\n    smile: 'Smile!',\n    startAudioRecording: 'Begin audio recording',\n    startCapturing: 'Begin screen capturing',\n    startRecording: 'Begin video recording',\n    stopAudioRecording: 'Stop audio recording',\n    stopCapturing: 'Stop screen capturing',\n    stopRecording: 'Stop video recording',\n    streamActive: 'Stream active',\n    streamPassive: 'Stream passive',\n    submitRecordedFile: 'Submit recorded file',\n    takePicture: 'Take a picture',\n    takePictureBtn: 'Take Picture',\n    timedOut: 'Upload stalled for %{seconds} seconds, aborting.',\n    upload: 'Upload',\n    uploadComplete: 'Upload complete',\n    currentFilesAnnouncement: {\n        '0': 'Current file: %{files}',\n        '1': 'Current files: %{files}'\n    },\n    noFilesAnnouncement: 'No files attached',\n    fileRemovedAnnouncement: '%{file} removed.',\n    uploadSuccessAnnouncement: {\n        '0': '%{files} uploaded successfully.',\n        '1': '%{files} uploaded successfully.'\n    },\n    filesCountDescription: {\n        '0': '%{smart_count} file added',\n        '1': '%{smart_count} files added'\n    },\n    uploadFailed: 'Upload failed',\n    uploading: 'Uploading',\n    uploadingXFiles: {\n        '0': 'Uploading %{smart_count} file',\n        '1': 'Uploading %{smart_count} files'\n    },\n    uploadPaused: 'Upload paused',\n    uploadXFiles: {\n        '0': 'Upload %{smart_count} file',\n        '1': 'Upload %{smart_count} files'\n    },\n    uploadXNewFiles: {\n        '0': 'Upload +%{smart_count} file',\n        '1': 'Upload +%{smart_count} files'\n    },\n    xFilesSelected: {\n        '0': '%{smart_count} file selected',\n        '1': '%{smart_count} files selected'\n    },\n    xMoreFilesAdded: {\n        '0': '%{smart_count} more file added',\n        '1': '%{smart_count} more files added'\n    },\n    xTimeLeft: '%{time} left',\n    youCanOnlyUploadFileTypes: 'You can only upload: %{types}',\n    fileTypeNotAllowed: 'The file type of the file is not allowed',\n    youCanOnlyUploadX: {\n        '0': 'You can only upload %{smart_count} file',\n        '1': 'You can only upload %{smart_count} files'\n    },\n    youHaveToAtLeastSelectX: {\n        '0': 'You have to select at least %{smart_count} file',\n        '1': 'You have to select at least %{smart_count} files'\n    },\n    zoomIn: 'Zoom in',\n    zoomOut: 'Zoom out'\n};\n\nif (typeof Uppy !== 'undefined') {\n    globalThis.Uppy.locales.en_US = en_US;\n}\n\nexport default en_US;\n", "const es_ES = {\n    pluralize(count) {\n        if (count === 1) {\n            return 0;\n        }\n\n        return 1;\n    }\n\n};\nes_ES.strings = {\n    addBulkFilesFailed: {\n      '0': 'No se pudo agregar %{smart_count} archivo debido a un error interno',\n      '1': 'No se pudieron agregar %{smart_count} archivos debido a errores internos',\n    },\n    addedNumFiles: 'Se agreg\u00F3 %{numFiles} archivo(s)',\n    addingMoreFiles: 'Agregando m\u00E1s archivos',\n    additionalRestrictionsFailed: 'No se cumplieron %{count} restricciones adicionales',\n    addMore: 'Agregar m\u00E1s',\n    addMoreFiles: 'Agregar m\u00E1s archivos',\n    allFilesFromFolderNamed: 'Todos los archivos de la carpeta %{name}',\n    allowAccessDescription: 'Para tomar fotos o grabar videos con tu c\u00E1mara, por favor permite el acceso a la c\u00E1mara para este sitio.',\n    allowAccessTitle: 'Por favor, permite el acceso a tu c\u00E1mara',\n    allowAudioAccessDescription: 'Para grabar audio, por favor permite el acceso al micr\u00F3fono para este sitio.',\n    allowAudioAccessTitle: 'Por favor, permite el acceso a tu micr\u00F3fono',\n    aspectRatioLandscape: 'Recortar horizontal (16:9)',\n    aspectRatioPortrait: 'Recortar vertical (9:16)',\n    aspectRatioSquare: 'Recortar cuadrado',\n    authAborted: 'Autenticaci\u00F3n cancelada',\n    authenticateWith: 'Conectar con %{pluginName}',\n    authenticateWithTitle: 'Por favor, autent\u00EDcate con %{pluginName} para seleccionar archivos',\n    back: 'Atr\u00E1s',\n    browse: 'Navegar',\n    browseFiles: 'Navegar por archivos',\n    browseFolders: 'Navegar por carpetas',\n    cancel: 'Cancelar',\n    cancelUpload: 'Cancelar subida',\n    chooseFiles: 'Seleccionar archivos',\n    closeModal: 'Cerrar ventana',\n    companionError: 'Error en la conexi\u00F3n con Companion',\n    companionUnauthorizeHint:\n      'Para desautorizar tu cuenta de %{provider}, por favor ve a %{url}',\n    complete: 'Completado',\n    compressedX: 'Se ahorr\u00F3 %{size} comprimiendo im\u00E1genes',\n    compressingImages: 'Comprimiendo im\u00E1genes...',\n    connectedToInternet: 'Conectado a Internet',\n    copyLink: 'Copiar enlace',\n    copyLinkToClipboardFallback: 'Copia la siguiente URL',\n    copyLinkToClipboardSuccess: 'Enlace copiado al portapapeles',\n    creatingAssembly: 'Preparando subida...',\n    creatingAssemblyFailed: 'No se pudo crear un Assembly',\n    dashboardTitle: 'Cargador de archivos',\n    dashboardWindowTitle: 'Ventana para cargar archivos (Presiona escape para cerrar)',\n    dataUploadedOfTotal: '%{complete} de %{total}',\n    discardRecordedFile: 'Descartar archivo grabado',\n    done: 'Hecho',\n    dropHereOr: 'Suelta archivos aqu\u00ED o %{browse}',\n    dropHereOrMediaPool: 'Busca archivos en tu %{mediaPool}, suelta archivos aqu\u00ED o %{browse}',\n    dropHint: 'Suelta tus archivos aqu\u00ED',\n    dropPasteBoth: 'Suelta archivos aqu\u00ED, %{browseFiles} o %{browseFolders}',\n    dropPasteFiles: 'Suelta archivos aqu\u00ED o %{browseFiles}',\n    dropPasteFolders: 'Suelta archivos aqu\u00ED o %{browseFolders}',\n    dropPasteImportBoth: 'Suelta archivos aqu\u00ED, %{browseFiles}, %{browseFolders} o importar desde:',\n    dropPasteImportFiles: 'Suelta archivos aqu\u00ED, %{browseFiles} o importar desde:',\n    dropPasteImportFolders: 'Suelta archivos aqu\u00ED, %{browseFolders} o importar desde:',\n    editFile: 'Editar archivo',\n    editImage: 'Editar imagen',\n    editFileWithFilename: 'Editar archivo %{file}',\n    editing: 'Editando %{file}',\n    emptyFolderAdded: 'No se agregaron archivos desde la carpeta vac\u00EDa',\n    encoding: 'Codificando...',\n    enterCorrectUrl: 'URL incorrecta: Por favor, aseg\u00FArate de ingresar un enlace directo a un archivo',\n    enterTextToSearch: 'Ingresa texto para buscar im\u00E1genes',\n    enterUrlToImport: 'Ingresa la URL para importar un archivo',\n    error: 'Error',\n    exceedsSize: '%{file} excede el tama\u00F1o m\u00E1ximo permitido de %{size}',\n    failedToFetch: 'Companion no pudo recuperar esta URL, por favor aseg\u00FArate de que sea correcta',\n    failedToUpload: 'No se pudo subir %{file}',\n    fileSource: 'Fuente de archivo: %{name}',\n    filesUploadedOfTotal: {\n      '0': '%{complete} de %{smart_count} archivo subido',\n      '1': '%{complete} de %{smart_count} archivos subidos',\n    },\n    filter: 'Filtrar',\n    finishEditingFile: 'Terminar edici\u00F3n de archivo',\n    flipHorizontal: 'Voltear horizontalmente',\n    folderAdded: {\n      '0': 'Se agreg\u00F3 %{smart_count} archivo desde %{folder}',\n      '1': 'Se agregaron %{smart_count} archivos desde %{folder}',\n    },\n    folderAlreadyAdded: 'La carpeta \"%{folder}\" ya fue agregada',\n    generatingThumbnails: 'Generando miniaturas...',\n    import: 'Importar',\n    importFiles: 'Importar archivos desde:',\n    importFrom: 'Importar desde %{name}',\n    inferiorSize:\n      'Este archivo es m\u00E1s peque\u00F1o que el tama\u00F1o permitido de %{size}',\n    loading: 'Cargando...',\n    logOut: 'Cerrar sesi\u00F3n',\n    mediaPool: 'Conjunto de medios',\n    micDisabled: 'El acceso al micr\u00F3fono fue denegado por el usuario',\n    missingRequiredMetaField: 'Faltan campos de metadatos obligatorios',\n    missingRequiredMetaFieldOnFile: 'Faltan campos de metadatos obligatorios en %{fileName}',\n    missingRequiredMetaFields: {\n      '0': 'Falta el campo de metadatos obligatorio: %{fields}.',\n      '1': 'Faltan los campos de metadatos obligatorios: %{fields}.',\n    },\n    myDevice: 'Mi dispositivo',\n    noAudioDescription: 'Para grabar audio, por favor conecta un micr\u00F3fono u otro dispositivo de entrada de audio',\n    noAudioTitle: 'Micr\u00F3fono no disponible',\n    noCameraDescription: 'Para tomar fotos o grabar video, por favor conecta un dispositivo de c\u00E1mara',\n    noCameraTitle: 'C\u00E1mara no disponible',\n    noDuplicates: \"No se puede agregar el archivo duplicado '%{fileName}', ya existe\",\n    noFilesFound: 'No tienes archivos o carpetas aqu\u00ED',\n    noInternetConnection: 'Sin conexi\u00F3n a Internet',\n    noMoreFilesAllowed: 'No se pueden agregar m\u00E1s archivos',\n    noSearchResults: 'Lamentablemente, no hay resultados para esta b\u00FAsqueda',\n    openFolderNamed: 'Abrir carpeta %{name}',\n    pause: 'Pausar',\n    paused: 'En pausa',\n    pauseUpload: 'Pausar subida',\n    pluginNameAudio: 'Audio',\n    pluginNameBox: 'Box',\n    pluginNameCamera: 'C\u00E1mara',\n    pluginNameDropbox: 'Dropbox',\n    pluginNameFacebook: 'Facebook',\n    pluginNameGoogleDrive: 'Google Drive',\n    pluginNameInstagram: 'Instagram',\n    pluginNameOneDrive: 'OneDrive',\n    pluginNameZoom: 'Zoom',\n    poweredBy: 'Desarrollado por %{uppy}',\n    processingXFiles: {\n      '0': 'Procesando %{smart_count} archivo',\n      '1': 'Procesando %{smart_count} archivos',\n    },\n    recording: 'Grabando',\n    recordingLength: 'Duraci\u00F3n de la grabaci\u00F3n %{recording_length}',\n    recordingStoppedMaxSize: 'La grabaci\u00F3n se detuvo porque el tama\u00F1o del archivo est\u00E1 a punto de exceder el l\u00EDmite',\n    recordVideoBtn: 'Grabar video',\n    recoveredAllFiles: 'Se restauraron todos los archivos. Ahora puedes reanudar la subida.',\n    recoveredXFiles: {\n      '0': 'No pudimos recuperar completamente 1 archivo. Por favor, vuelve a seleccionarlo y reanuda la subida.',\n      '1': 'No pudimos recuperar completamente %{smart_count} archivos. Por favor, vuelve a seleccionarlos y reanuda la subida.',\n    },\n    removeFile: 'Eliminar archivo',\n    removeFileAriaLabel: 'Eliminar archivo %{file}',\n    reSelect: 'Volver a seleccionar',\n    resetFilter: 'Restablecer filtro',\n    resetSearch: 'Restablecer b\u00FAsqueda',\n    resume: 'Reanudar',\n    resumeUpload: 'Reanudar subida',\n    retry: 'Reintentar',\n    retryUpload: 'Reintentar subida',\n    revert: 'Revertir',\n    rotate: 'Rotar',\n    save: 'Guardar',\n    saveChanges: 'Guardar cambios',\n    search: 'Buscar',\n    searchImages: 'Buscar im\u00E1genes',\n    selectX: {\n      '0': 'Seleccionar %{smart_count}',\n      '1': 'Seleccionar %{smart_count}',\n    },\n    sessionRestored: 'Sesi\u00F3n restaurada',\n    showErrorDetails: 'Mostrar detalles del error',\n    signInWithGoogle: 'Iniciar sesi\u00F3n con Google',\n    smile: '\u00A1Sonr\u00EDe!',\n    startAudioRecording: 'Iniciar grabaci\u00F3n de audio',\n    startCapturing: 'Iniciar captura de pantalla',\n    startRecording: 'Iniciar grabaci\u00F3n de video',\n    stopAudioRecording: 'Detener grabaci\u00F3n de audio',\n    stopCapturing: 'Detener captura de pantalla',\n    stopRecording: 'Detener grabaci\u00F3n de video',\n    streamActive: 'Transmisi\u00F3n activa',\n    streamPassive: 'Transmisi\u00F3n pasiva',\n    submitRecordedFile: 'Enviar archivo grabado',\n    takePicture: 'Tomar una foto',\n    takePictureBtn: 'Tomar foto',\n    timedOut: 'La subida se detuvo durante %{seconds} segundos, abortando.',\n    upload: 'Subir',\n    uploadComplete: 'Subida completa',\n    currentFilesAnnouncement: {\n        '0': 'Fichero actual: %{files}',\n        '1': 'Ficheros actuales: %{files}'\n    },\n    noFilesAnnouncement: 'No hay ficheros adjuntos',\n    fileRemovedAnnouncement: '%{file} eliminado.',\n    uploadSuccessAnnouncement: {\n        '0': '%{files} se ha subido correctamente.',\n        '1': '%{files} se han subido correctamente.'\n    },\n    filesCountDescription: {\n        '0': '%{smart_count} fichero a\u00F1adido',\n        '1': '%{smart_count} ficheros a\u00F1adidos'\n    },\n    uploadFailed: 'Error en la subida',\n    uploading: 'Subiendo',\n    uploadingXFiles: {\n      '0': 'Subiendo %{smart_count} archivo',\n      '1': 'Subiendo %{smart_count} archivos',\n    },\n    uploadPaused: 'Subida en pausa',\n    uploadStalled: 'La subida no ha realizado ning\u00FAn progreso durante %{seconds} segundos. Puedes intentarlo de nuevo.',\n    uploadXFiles: {\n      '0': 'Subir %{smart_count} archivo',\n      '1': 'Subir %{smart_count} archivos',\n    },\n    uploadXNewFiles: {\n      '0': 'Subir +%{smart_count} archivo',\n      '1': 'Subir +%{smart_count} archivos',\n    },\n    xFilesSelected: {\n      '0': '%{smart_count} archivo seleccionado',\n      '1': '%{smart_count} archivos seleccionados',\n    },\n    xMoreFilesAdded: {\n      '0': 'Se agreg\u00F3 %{smart_count} archivo m\u00E1s',\n      '1': 'Se agregaron %{smart_count} archivos m\u00E1s',\n    },\n    xTimeLeft: '%{time} restante',\n    youCanOnlyUploadFileTypes: 'Solo puedes subir: %{types}',\n    youCanOnlyUploadX: {\n      '0': 'Solo puedes subir %{smart_count} archivo',\n      '1': 'Solo puedes subir %{smart_count} archivos',\n    },\n    youHaveToAtLeastSelectX: {\n      '0': 'Debes seleccionar al menos %{smart_count} archivo',\n      '1': 'Debes seleccionar al menos %{smart_count} archivos',\n    },\n    zoomIn: 'Acercar',\n    zoomOut: 'Alejar',\n    selectFileNamed: 'Seleccione archivo %{name}',\n    unselectFileNamed: 'Deseleccionar archivo %{name}',\n}\n\nif (typeof Uppy !== 'undefined') {\n    globalThis.Uppy.locales.es_ES = es_ES\n}\n\nexport default es_ES\n", "const fr_FR = {\n    pluralize(count) {\n        if (count === 1) {\n            return 0;\n        }\n\n        return 1;\n    }\n\n};\nfr_FR.strings = {\n    addBulkFilesFailed: {\n      '0': 'L\u2019ajout de %{smart_count} fichier a \u00E9chou\u00E9',\n      '1': 'L\u2019ajout de %{smart_count} fichiers a \u00E9chou\u00E9',\n    },\n    addedNumFiles: '%{numFiles} fichier(s) ajout\u00E9(s)',\n    addingMoreFiles: 'Ajout de fichiers',\n    addMore: 'Ajouter d\u2019autres',\n    addMoreFiles: 'Ajouter d\u2019autres fichiers',\n    allFilesFromFolderNamed: 'Tous les fichiers du dossier %{name}',\n    allowAccessDescription: 'Pour prendre des photos ou enregistrer une vid\u00E9o, veuillez autoriser l\u2019acc\u00E8s \u00E0 votre cam\u00E9ra pour ce site.',\n    allowAccessTitle: 'Veuillez autoriser l\u2019acc\u00E8s \u00E0 votre cam\u00E9ra',\n    authAborted: 'Authentification interrompue',\n    authenticateWith: 'Se connecter \u00E0 %{pluginName}',\n    authenticateWithTitle: 'Veuillez vous authentifier avec %{pluginName} pour s\u00E9lectionner les fichiers',\n    back: 'Retour',\n    browse: 'naviguer',\n    browseFiles: 'naviguer',\n    cancel: 'Annuler',\n    cancelUpload: 'Annuler le t\u00E9l\u00E9versement',\n    chooseFiles: 'Choisir des fichiers',\n    closeModal: 'Fermer la fen\u00EAtre',\n    companionError: 'Connexion \u00E0 Companion a \u00E9chou\u00E9',\n    companionUnauthorizeHint: 'Pour vous d\u00E9connecter de votre compte %{provider}, veuillez aller \u00E0 %{url}',\n    complete: 'Termin\u00E9',\n    compressedX: '%{size} \u00E9conomis\u00E9(s) par la compression',\n    compressingImages: 'Compression des images\u2026',\n    connectedToInternet: 'Connect\u00E9 \u00E0 Internet',\n    copyLink: 'Copier le lien',\n    copyLinkToClipboardFallback: 'Copier le lien ci-dessous',\n    copyLinkToClipboardSuccess: 'Lien copi\u00E9',\n    creatingAssembly: 'Pr\u00E9paration du t\u00E9l\u00E9versement\u2026',\n    creatingAssemblyFailed: 'Transloadit: Impossible de cr\u00E9er Assembly',\n    dashboardTitle: 'T\u00E9l\u00E9verseur de fichiers',\n    dashboardWindowTitle: 'Fen\u00EAtre de t\u00E9l\u00E9versement de fichiers (Appuyez sur \u00C9chap pour fermer)',\n    dataUploadedOfTotal: '%{complete} sur %{total}',\n    done: 'Termin\u00E9',\n    dropHereOr: 'Les fichiers peuvent \u00EAtre ajout\u00E9s via \u00AB Drag & Drop \u00BB ou via le s\u00E9lecteur de fichiers: %{browse}',\n    dropHereOrMediaPool: 'Recherche de fichiers dans votre %{mediaPool}, d\u00E9poser les fichiers ici, coller ou %{browse}',\n    dropHint: 'D\u00E9posez vos fichiers ici',\n    dropPasteBoth: 'D\u00E9poser les fichiers ici, coller ou %{browse}',\n    dropPasteFiles: 'D\u00E9poser les fichiers ici, coller ou %{browse}',\n    dropPasteFolders: 'D\u00E9poser les fichiers ici, coller ou %{browse}',\n    dropPasteImportBoth: 'D\u00E9poser les fichiers ici, coller, %{browse} ou importer de',\n    dropPasteImportFiles: 'D\u00E9poser les fichiers ici, coller, %{browse} ou importer de',\n    dropPasteImportFolders: 'D\u00E9poser les fichiers ici, coller, %{browse} ou importer de',\n    editFile: 'Modifier le fichier',\n    editImage: 'Modifier l\u2019image',\n    editFileWithFilename: 'Modifier le fichier %{file}',\n    editing: 'Modification en cours de %{file}',\n    emptyFolderAdded: 'Aucun fichier n\u2019a \u00E9t\u00E9 ajout\u00E9 depuis un dossier vide',\n    encoding: 'Traitement\u2026',\n    enterCorrectUrl: 'Lien incorrect: Assurez-vous que vous entrez un lien direct vers le fichier',\n    enterUrlToImport: 'Entrez le lien pour importer un fichier',\n    exceedsSize: 'Ce fichier d\u00E9passe la taille maximale autoris\u00E9e de %{size}',\n    failedToFetch: 'Companion a \u00E9chou\u00E9 \u00E0 r\u00E9cup\u00E9rer ce lien, assurez-vous qu\u2019il est correct',\n    failedToUpload: 'Le t\u00E9l\u00E9versement de %{file} a \u00E9chou\u00E9',\n    fileSource: 'Fichier source: %{name}',\n    filesUploadedOfTotal: {\n      '0': '%{complete} sur %{smart_count} fichier t\u00E9l\u00E9vers\u00E9',\n      '1': '%{complete} sur %{smart_count} fichiers t\u00E9l\u00E9vers\u00E9s',\n    },\n    filter: 'Filtrer',\n    finishEditingFile: 'Terminer l\u2019\u00E9dition du fichier',\n    folderAdded: {\n      '0': '%{smart_count} fichier ajout\u00E9 de %{folder}',\n      '1': '%{smart_count} fichiers ajout\u00E9s de %{folder}',\n    },\n    generatingThumbnails: 'G\u00E9n\u00E9ration des vignettes\u2026',\n    import: 'Importer',\n    importFrom: 'Importer de %{name}',\n    loading: 'Chargement\u2026',\n    logOut: 'D\u00E9connexion',\n    mediaPool: 'Pool de m\u00E9dias',\n    micDisabled: 'Acc\u00E8s au micro refus\u00E9 par l\u2019utilisateur',\n    myDevice: 'Mon Appareil',\n    noDuplicates: 'Impossible d\u2019ajouter le fichier \"%{fileName}\", il existe d\u00E9j\u00E0',\n    noFilesFound: 'Vous n\u2019avez aucun fichier ou dossier ici',\n    noInternetConnection: 'Pas de connexion \u00E0 Internet',\n    noMoreFilesAllowed: 'Impossible d\u2019ajouter de nouveaux fichiers: en cours de chargement ',\n    openFolderNamed: 'Ouvrir %{name}',\n    pause: 'Pause',\n    pauseUpload: 'Mettre en pause le t\u00E9l\u00E9versement',\n    paused: 'En pause',\n    poweredBy: 'Propuls\u00E9 par %{uppy}',\n    processingXFiles: {\n      '0': 'Traitement de %{smart_count} fichier',\n      '1': 'Traitement de %{smart_count} fichiers',\n    },\n    recording: 'Enregistrement',\n    recordingLength: 'Dur\u00E9e d\u2019enregistrement %{recording_length}',\n    recordingStoppedMaxSize: 'L\u2019enregistrement s\u2019est arr\u00E9t\u00E9 car la taille du fichier d\u00E9passe la limite',\n    removeFile: 'Effacer le fichier %{file}',\n    removeFileAriaLabel: 'Effacer le fichier %{file}',\n    resetFilter: 'R\u00E9initialiser filtre',\n    resume: 'Reprendre',\n    resumeUpload: 'Reprendre le t\u00E9l\u00E9versement',\n    retry: 'R\u00E9essayer',\n    retryUpload: 'R\u00E9essayer le t\u00E9l\u00E9versement',\n    save: 'Sauvegarder',\n    saveChanges: 'Sauvegarder les modifications',\n    selectFileNamed: 'S\u00E9lectionner le fichier %{name}',\n    selectX: {\n      '0': 'S\u00E9lectionner %{smart_count}',\n      '1': 'S\u00E9lectionner %{smart_count}',\n    },\n    smile: 'Souriez !',\n    startRecording: 'Commencer l\u2019enregistrement vid\u00E9o',\n    stopRecording: 'Arr\u00EAter l\u2019enregistrement vid\u00E9o',\n    streamActive: 'Stream actif',\n    streamPassive: 'Stream passif',\n    submitRecordedFile: 'Envoyer la vid\u00E9o enregistr\u00E9e',\n    takePicture: 'Prendre une photo',\n    timedOut: 'T\u00E9l\u00E9versement bloqu\u00E9 durant %{seconds} secondes, annulation.',\n    unselectFileNamed: 'D\u00E9s\u00E9lectionner le fichier %{name}',\n    upload: 'T\u00E9l\u00E9verser',\n    uploadComplete: 'T\u00E9l\u00E9versement termin\u00E9',\n    currentFilesAnnouncement: {\n        '0': 'Fichier actuel : %{files}',\n        '1': 'Fichiers actuels : %{files}'\n    },\n    noFilesAnnouncement: 'Aucun fichier joint',\n    fileRemovedAnnouncement: '%{file} supprim\u00E9.',\n    uploadSuccessAnnouncement: {\n        '0': '%{files} a \u00E9t\u00E9 t\u00E9l\u00E9vers\u00E9 avec succ\u00E8s.',\n        '1': '%{files} ont \u00E9t\u00E9 t\u00E9l\u00E9vers\u00E9s avec succ\u00E8s.'\n    },\n    filesCountDescription: {\n        '0': '%{smart_count} fichier ajout\u00E9',\n        '1': '%{smart_count} fichiers ajout\u00E9s'\n    },\n    uploadFailed: 'Le t\u00E9l\u00E9versement a \u00E9chou\u00E9',\n    uploadPaused: 'T\u00E9l\u00E9versement mis en pause',\n    uploadStalled: 'T\u00E9l\u00E9versement bloqu\u00E9 depuis %{seconds} secondes. Il est peut-\u00EAtre n\u00E9cessaire de recommencer l\u2019op\u00E9ration.',\n    uploadXFiles: {\n      '0': 'T\u00E9l\u00E9verser %{smart_count} fichier',\n      '1': 'T\u00E9l\u00E9verser %{smart_count} fichiers',\n    },\n    uploadXNewFiles: {\n      '0': 'T\u00E9l\u00E9verser +%{smart_count} fichier',\n      '1': 'T\u00E9l\u00E9verser +%{smart_count} fichiers',\n    },\n    uploading: 'T\u00E9l\u00E9versement en cours',\n    uploadingXFiles: {\n      '0': 'T\u00E9l\u00E9versement de %{smart_count} fichier',\n      '1': 'T\u00E9l\u00E9versement de %{smart_count} fichiers',\n    },\n    xFilesSelected: {\n      '0': '%{smart_count} fichier s\u00E9lectionn\u00E9',\n      '1': '%{smart_count} fichiers s\u00E9lectionn\u00E9s',\n    },\n    xMoreFilesAdded: {\n      '0': '%{smart_count} autre fichier ajout\u00E9',\n      '1': '%{smart_count} autres fichiers ajout\u00E9s',\n    },\n    xTimeLeft: '%{time} restantes',\n    youCanOnlyUploadFileTypes: 'Vous pouvez seulement t\u00E9l\u00E9verser: %{types}',\n    youCanOnlyUploadX: {\n      '0': 'Vous pouvez seulement t\u00E9l\u00E9verser %{smart_count} fichier',\n      '1': 'Vous pouvez seulement t\u00E9l\u00E9verser %{smart_count} fichiers',\n    },\n    youHaveToAtLeastSelectX: {\n      '0': 'Vous devez s\u00E9lectionner au moins %{smart_count} fichier',\n      '1': 'Vous devez s\u00E9lectionner au moins %{smart_count} fichiers',\n    },\n}\n\nif (typeof Uppy !== 'undefined') {\n  globalThis.Uppy.locales.fr_FR = fr_FR\n}\n\nexport default fr_FR\n", "/**\n * *********************************************************************************************************************\n * ************ WARNING: WHEN MAKING CHANGES HERE - app/helpers/flash_notices_helper.rb:46 (flash_notice_tag) **********\n * *********************************************************************************************************************\n *\n * Renders a toast growl message into #flashNotices.\n * @param message: Displayed text message, may contain HTML (e.g. a button).\n * @param type: Type of displayed growl message (e.g. 'alert', 'error', 'success', 'notice').\n * @param autohide: Boolean, overrides the default of the type, e.g. false keeps a warning open until the user closes it.\n * @return The inserted toast element. (The last child of #flashNotices - used by session_timeout_controller.js)\n */\nexport const toast = (message, type, overrides = {}) => {\n    const options = {\n        typeClasses: 'text-body bg-light',\n        buttonClasses: 'btn-close-white',\n        timeout: 5000,\n        autohide: 'true'\n    }\n\n    if (type === 'notice') {\n        options.typeClasses = 'text-body bg-info'\n        options.buttonClasses = 'btn-close-body'\n    } else if (type === 'success') {\n        options.typeClasses = 'text-white bg-success'\n    } else if (type === 'alert') {\n        options.typeClasses = 'text-body bg-warning'\n        options.buttonClasses = 'btn-close-body'\n        options.timeout = 10000\n    } else if (type === 'error') {\n        options.typeClasses = 'text-white bg-danger'\n        options.autohide = 'false'\n    }\n\n    if (overrides.autohide !== undefined) options.autohide = String(overrides.autohide)\n\n    const flashContainer = document.getElementById('flashNotices')\n    const accessibility = flashContainer?.dataset?.userAccessibility === 'true'\n    const prefixes = flashContainer?.dataset?.flashPrefixes ?\n        JSON.parse(flashContainer.dataset.flashPrefixes) : {}\n\n    let displayMessage = message\n    if (accessibility && prefixes[type]) {\n        displayMessage = `<strong>${prefixes[type]}</strong>${message}`\n    }\n\n    flashContainer.insertAdjacentHTML(\n        'beforeend',\n        `<div class=\"toast align-items-center ${options.typeClasses} border-0\"\n              data-controller=\"toast\"\n              data-bs-delay=\"${options.timeout}\"\n              data-bs-autohide=\"${options.autohide}\">\n            <div class=\"d-flex\">\n                <div class=\"toast-body text-break\">${displayMessage}</div>\n                <button name=\"button\"\n                        type=\"button\"\n                        class=\"btn-close ${options.buttonClasses} me-2 m-auto\"\n                        aria-label=\"${flashContainer.dataset.closeText}\"\n                        data-bs-dismiss=\"toast\"></button>\n            </div>\n        </div>`\n    )\n\n    return flashContainer.lastElementChild\n}", "import {Controller} from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"display-with-button\"\nexport default class extends Controller {\n    static targets = ['displayDoms']\n\n    connect() {\n        document.body.style.overflow = \"\"\n        this._isOpen = false\n        this._scrollPos = 0\n    }\n\n    disconnect() {\n        document.body.style.overflow = \"\"\n    }\n\n    toggle_display() {\n        this._isOpen = !this._isOpen\n\n        const cardBody = document.querySelector(\"#aiChat .card-body\")\n\n        if (!this._isOpen && cardBody) {\n            if (cardBody) this._scrollPos = cardBody.scrollTop\n            this.displayDomsTargets.forEach(dom => dom.style.display = \"none\")\n        } else {\n            this.displayDomsTargets.forEach(dom => dom.style.display = \"\")\n            if (cardBody) requestAnimationFrame(() => {\n                requestAnimationFrame(() => cardBody.scrollTop = this._scrollPos)\n            })\n        }\n\n        this.displayDomsTargets.forEach(dom => dom.style.display = this._isOpen ? \"\" : \"none\")\n\n        if (window.innerWidth <= 1024)\n            document.body.style.overflow = this._isOpen ? \"hidden\" : \"\"\n\n        document.getElementById(\"chat-launcher\")\n            ?.classList.toggle(\"chat-launcher--active\")\n\n        document.getElementById(\"chat-mobile\")\n            ?.classList.toggle(\"chat-mobile--active\", this._isOpen && window.innerWidth <= 1024)\n\n\n    }\n\n\n}\n", "import {Controller} from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"display-with-radio-button\"\nexport default class extends Controller {\n    static targets = ['display']\n\n    connect() {\n        //console.log(\"big brother\")\n    }\n\n    // true means: global settings apply and we destroy local setting\n    toggle_display(event) {\n        if (event?.target?.value === \"true\") {\n            this.displayTarget.classList.add(\"d-none\")\n        } else {\n            this.displayTarget.classList.remove(\"d-none\")\n        }\n    }\n}\n", "/**!\n * Sortable 1.15.7\n * @author\tRubaXa   <trash@rubaxa.org>\n * @author\towenm    <owen23355@gmail.com>\n * @license MIT\n */\nfunction _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nfunction _arrayWithoutHoles(r) {\n  if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _defineProperty(e, r, t) {\n  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nfunction _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nfunction _iterableToArray(r) {\n  if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction ownKeys(e, r) {\n  var t = Object.keys(e);\n  if (Object.getOwnPropertySymbols) {\n    var o = Object.getOwnPropertySymbols(e);\n    r && (o = o.filter(function (r) {\n      return Object.getOwnPropertyDescriptor(e, r).enumerable;\n    })), t.push.apply(t, o);\n  }\n  return t;\n}\nfunction _objectSpread2(e) {\n  for (var r = 1; r < arguments.length; r++) {\n    var t = null != arguments[r] ? arguments[r] : {};\n    r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n      _defineProperty(e, r, t[r]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n    });\n  }\n  return e;\n}\nfunction _objectWithoutProperties(e, t) {\n  if (null == e) return {};\n  var o,\n    r,\n    i = _objectWithoutPropertiesLoose(e, t);\n  if (Object.getOwnPropertySymbols) {\n    var n = Object.getOwnPropertySymbols(e);\n    for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n  }\n  return i;\n}\nfunction _objectWithoutPropertiesLoose(r, e) {\n  if (null == r) return {};\n  var t = {};\n  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n    if (-1 !== e.indexOf(n)) continue;\n    t[n] = r[n];\n  }\n  return t;\n}\nfunction _toConsumableArray(r) {\n  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n  if (\"object\" != typeof t || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != typeof i) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n  var i = _toPrimitive(t, \"string\");\n  return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n  }\n}\n\nvar version = \"1.15.7\";\n\nfunction userAgent(pattern) {\n  if (typeof window !== 'undefined' && window.navigator) {\n    return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n  }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n  capture: false,\n  passive: false\n};\nfunction on(el, event, fn) {\n  el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n  el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n  if (!selector) return;\n  selector[0] === '>' && (selector = selector.substring(1));\n  if (el) {\n    try {\n      if (el.matches) {\n        return el.matches(selector);\n      } else if (el.msMatchesSelector) {\n        return el.msMatchesSelector(selector);\n      } else if (el.webkitMatchesSelector) {\n        return el.webkitMatchesSelector(selector);\n      }\n    } catch (_) {\n      return false;\n    }\n  }\n  return false;\n}\nfunction getParentOrHost(el) {\n  return el.host && el !== document && el.host.nodeType && el.host !== el ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n  if (el) {\n    ctx = ctx || document;\n    do {\n      if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n        return el;\n      }\n      if (el === ctx) break;\n      /* jshint boss:true */\n    } while (el = getParentOrHost(el));\n  }\n  return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n  if (el && name) {\n    if (el.classList) {\n      el.classList[state ? 'add' : 'remove'](name);\n    } else {\n      var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n      el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n    }\n  }\n}\nfunction css(el, prop, val) {\n  var style = el && el.style;\n  if (style) {\n    if (val === void 0) {\n      if (document.defaultView && document.defaultView.getComputedStyle) {\n        val = document.defaultView.getComputedStyle(el, '');\n      } else if (el.currentStyle) {\n        val = el.currentStyle;\n      }\n      return prop === void 0 ? val : val[prop];\n    } else {\n      if (!(prop in style) && prop.indexOf('webkit') === -1) {\n        prop = '-webkit-' + prop;\n      }\n      style[prop] = val + (typeof val === 'string' ? '' : 'px');\n    }\n  }\n}\nfunction matrix(el, selfOnly) {\n  var appliedTransforms = '';\n  if (typeof el === 'string') {\n    appliedTransforms = el;\n  } else {\n    do {\n      var transform = css(el, 'transform');\n      if (transform && transform !== 'none') {\n        appliedTransforms = transform + ' ' + appliedTransforms;\n      }\n      /* jshint boss:true */\n    } while (!selfOnly && (el = el.parentNode));\n  }\n  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  /*jshint -W056 */\n  return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n  if (ctx) {\n    var list = ctx.getElementsByTagName(tagName),\n      i = 0,\n      n = list.length;\n    if (iterator) {\n      for (; i < n; i++) {\n        iterator(list[i], i);\n      }\n    }\n    return list;\n  }\n  return [];\n}\nfunction getWindowScrollingElement() {\n  var scrollingElement = document.scrollingElement;\n  if (scrollingElement) {\n    return scrollingElement;\n  } else {\n    return document.documentElement;\n  }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param  {HTMLElement} el                       The element whose boundingClientRect is wanted\r\n * @param  {[Boolean]} relativeToContainingBlock  Whether the rect should be relative to the containing block of (including) the container\r\n * @param  {[Boolean]} relativeToNonStaticParent  Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param  {[Boolean]} undoScale                  Whether the container's scale() should be undone\r\n * @param  {[HTMLElement]} container              The parent the element will be placed in\r\n * @return {Object}                               The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n  if (!el.getBoundingClientRect && el !== window) return;\n  var elRect, top, left, bottom, right, height, width;\n  if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n    elRect = el.getBoundingClientRect();\n    top = elRect.top;\n    left = elRect.left;\n    bottom = elRect.bottom;\n    right = elRect.right;\n    height = elRect.height;\n    width = elRect.width;\n  } else {\n    top = 0;\n    left = 0;\n    bottom = window.innerHeight;\n    right = window.innerWidth;\n    height = window.innerHeight;\n    width = window.innerWidth;\n  }\n  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n    // Adjust for translate()\n    container = container || el.parentNode;\n\n    // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n    // Not needed on <= IE11\n    if (!IE11OrLess) {\n      do {\n        if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n          var containerRect = container.getBoundingClientRect();\n\n          // Set relative to edges of padding box of container\n          top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n          left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n          bottom = top + elRect.height;\n          right = left + elRect.width;\n          break;\n        }\n        /* jshint boss:true */\n      } while (container = container.parentNode);\n    }\n  }\n  if (undoScale && el !== window) {\n    // Adjust for scale()\n    var elMatrix = matrix(container || el),\n      scaleX = elMatrix && elMatrix.a,\n      scaleY = elMatrix && elMatrix.d;\n    if (elMatrix) {\n      top /= scaleY;\n      left /= scaleX;\n      width /= scaleX;\n      height /= scaleY;\n      bottom = top + height;\n      right = left + width;\n    }\n  }\n  return {\n    top: top,\n    left: left,\n    bottom: bottom,\n    right: right,\n    width: width,\n    height: height\n  };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param  {HTMLElement}  el           The element who's side being scrolled out of view is in question\r\n * @param  {String}       elSide       Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param  {String}       parentSide   Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement}               The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n  var parent = getParentAutoScrollElement(el, true),\n    elSideVal = getRect(el)[elSide];\n\n  /* jshint boss:true */\n  while (parent) {\n    var parentSideVal = getRect(parent)[parentSide],\n      visible = void 0;\n    if (parentSide === 'top' || parentSide === 'left') {\n      visible = elSideVal >= parentSideVal;\n    } else {\n      visible = elSideVal <= parentSideVal;\n    }\n    if (!visible) return parent;\n    if (parent === getWindowScrollingElement()) break;\n    parent = getParentAutoScrollElement(parent, false);\n  }\n  return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param  {HTMLElement} el       The parent element\r\n * @param  {Number} childNum      The index of the child\r\n * @param  {Object} options       Parent Sortable's options\r\n * @return {HTMLElement}          The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n  var currentChild = 0,\n    i = 0,\n    children = el.children;\n  while (i < children.length) {\n    if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n      if (currentChild === childNum) {\n        return children[i];\n      }\n      currentChild++;\n    }\n    i++;\n  }\n  return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param  {HTMLElement} el       Parent element\r\n * @param  {selector} selector    Any other elements that should be ignored\r\n * @return {HTMLElement}          The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n  var last = el.lastElementChild;\n  while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n    last = last.previousElementSibling;\n  }\n  return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param  {HTMLElement} el\r\n * @param  {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n  var index = 0;\n  if (!el || !el.parentNode) {\n    return -1;\n  }\n\n  /* jshint boss:true */\n  while (el = el.previousElementSibling) {\n    if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n      index++;\n    }\n  }\n  return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param  {HTMLElement} el\r\n * @return {Array}             Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n  var offsetLeft = 0,\n    offsetTop = 0,\n    winScroller = getWindowScrollingElement();\n  if (el) {\n    do {\n      var elMatrix = matrix(el),\n        scaleX = elMatrix.a,\n        scaleY = elMatrix.d;\n      offsetLeft += el.scrollLeft * scaleX;\n      offsetTop += el.scrollTop * scaleY;\n    } while (el !== winScroller && (el = el.parentNode));\n  }\n  return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param  {Array} arr   Array that may or may not hold the object\r\n * @param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number}      The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n  for (var i in arr) {\n    if (!arr.hasOwnProperty(i)) continue;\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n    }\n  }\n  return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n  // skip to window\n  if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n  var elem = el;\n  var gotSelf = false;\n  do {\n    // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n      var elemCSS = css(elem);\n      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n        if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n        if (gotSelf || includeSelf) return elem;\n        gotSelf = true;\n      }\n    }\n    /* jshint boss:true */\n  } while (elem = elem.parentNode);\n  return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n  if (dst && src) {\n    for (var key in src) {\n      if (src.hasOwnProperty(key)) {\n        dst[key] = src[key];\n      }\n    }\n  }\n  return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n  return function () {\n    if (!_throttleTimeout) {\n      var args = arguments,\n        _this = this;\n      if (args.length === 1) {\n        callback.call(_this, args[0]);\n      } else {\n        callback.apply(_this, args);\n      }\n      _throttleTimeout = setTimeout(function () {\n        _throttleTimeout = void 0;\n      }, ms);\n    }\n  };\n}\nfunction cancelThrottle() {\n  clearTimeout(_throttleTimeout);\n  _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n  el.scrollLeft += x;\n  el.scrollTop += y;\n}\nfunction clone(el) {\n  var Polymer = window.Polymer;\n  var $ = window.jQuery || window.Zepto;\n  if (Polymer && Polymer.dom) {\n    return Polymer.dom(el).cloneNode(true);\n  } else if ($) {\n    return $(el).clone(true)[0];\n  } else {\n    return el.cloneNode(true);\n  }\n}\nfunction setRect(el, rect) {\n  css(el, 'position', 'absolute');\n  css(el, 'top', rect.top);\n  css(el, 'left', rect.left);\n  css(el, 'width', rect.width);\n  css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n  css(el, 'position', '');\n  css(el, 'top', '');\n  css(el, 'left', '');\n  css(el, 'width', '');\n  css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n  var rect = {};\n  Array.from(container.children).forEach(function (child) {\n    var _rect$left, _rect$top, _rect$right, _rect$bottom;\n    if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n    var childRect = getRect(child);\n    rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n    rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n    rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n    rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n  });\n  rect.width = rect.right - rect.left;\n  rect.height = rect.bottom - rect.top;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n  var animationStates = [],\n    animationCallbackId;\n  return {\n    captureAnimationState: function captureAnimationState() {\n      animationStates = [];\n      if (!this.options.animation) return;\n      var children = [].slice.call(this.el.children);\n      children.forEach(function (child) {\n        if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n        animationStates.push({\n          target: child,\n          rect: getRect(child)\n        });\n        var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n        // If animating: compensate for current animation\n        if (child.thisAnimationDuration) {\n          var childMatrix = matrix(child, true);\n          if (childMatrix) {\n            fromRect.top -= childMatrix.f;\n            fromRect.left -= childMatrix.e;\n          }\n        }\n        child.fromRect = fromRect;\n      });\n    },\n    addAnimationState: function addAnimationState(state) {\n      animationStates.push(state);\n    },\n    removeAnimationState: function removeAnimationState(target) {\n      animationStates.splice(indexOfObject(animationStates, {\n        target: target\n      }), 1);\n    },\n    animateAll: function animateAll(callback) {\n      var _this = this;\n      if (!this.options.animation) {\n        clearTimeout(animationCallbackId);\n        if (typeof callback === 'function') callback();\n        return;\n      }\n      var animating = false,\n        animationTime = 0;\n      animationStates.forEach(function (state) {\n        var time = 0,\n          target = state.target,\n          fromRect = target.fromRect,\n          toRect = getRect(target),\n          prevFromRect = target.prevFromRect,\n          prevToRect = target.prevToRect,\n          animatingRect = state.rect,\n          targetMatrix = matrix(target, true);\n        if (targetMatrix) {\n          // Compensate for current animation\n          toRect.top -= targetMatrix.f;\n          toRect.left -= targetMatrix.e;\n        }\n        target.toRect = toRect;\n        if (target.thisAnimationDuration) {\n          // Could also check if animatingRect is between fromRect and toRect\n          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n          // Make sure animatingRect is on line between toRect & fromRect\n          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n            // If returning to same place as started from animation and on same axis\n            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n          }\n        }\n\n        // if fromRect != toRect: animate\n        if (!isRectEqual(toRect, fromRect)) {\n          target.prevFromRect = fromRect;\n          target.prevToRect = toRect;\n          if (!time) {\n            time = _this.options.animation;\n          }\n          _this.animate(target, animatingRect, toRect, time);\n        }\n        if (time) {\n          animating = true;\n          animationTime = Math.max(animationTime, time);\n          clearTimeout(target.animationResetTimer);\n          target.animationResetTimer = setTimeout(function () {\n            target.animationTime = 0;\n            target.prevFromRect = null;\n            target.fromRect = null;\n            target.prevToRect = null;\n            target.thisAnimationDuration = null;\n          }, time);\n          target.thisAnimationDuration = time;\n        }\n      });\n      clearTimeout(animationCallbackId);\n      if (!animating) {\n        if (typeof callback === 'function') callback();\n      } else {\n        animationCallbackId = setTimeout(function () {\n          if (typeof callback === 'function') callback();\n        }, animationTime);\n      }\n      animationStates = [];\n    },\n    animate: function animate(target, currentRect, toRect, duration) {\n      if (duration) {\n        css(target, 'transition', '');\n        css(target, 'transform', '');\n        var elMatrix = matrix(this.el),\n          scaleX = elMatrix && elMatrix.a,\n          scaleY = elMatrix && elMatrix.d,\n          translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n          translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n        target.animatingX = !!translateX;\n        target.animatingY = !!translateY;\n        css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n        this.forRepaintDummy = repaint(target); // repaint\n\n        css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n        css(target, 'transform', 'translate3d(0,0,0)');\n        typeof target.animated === 'number' && clearTimeout(target.animated);\n        target.animated = setTimeout(function () {\n          css(target, 'transition', '');\n          css(target, 'transform', '');\n          target.animated = false;\n          target.animatingX = false;\n          target.animatingY = false;\n        }, duration);\n      }\n    }\n  };\n}\nfunction repaint(target) {\n  return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n  initializeByDefault: true\n};\nvar PluginManager = {\n  mount: function mount(plugin) {\n    // Set default static properties\n    for (var option in defaults) {\n      if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n        plugin[option] = defaults[option];\n      }\n    }\n    plugins.forEach(function (p) {\n      if (p.pluginName === plugin.pluginName) {\n        throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n      }\n    });\n    plugins.push(plugin);\n  },\n  pluginEvent: function pluginEvent(eventName, sortable, evt) {\n    var _this = this;\n    this.eventCanceled = false;\n    evt.cancel = function () {\n      _this.eventCanceled = true;\n    };\n    var eventNameGlobal = eventName + 'Global';\n    plugins.forEach(function (plugin) {\n      if (!sortable[plugin.pluginName]) return;\n      // Fire global events if it exists in this sortable\n      if (sortable[plugin.pluginName][eventNameGlobal]) {\n        sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n\n      // Only fire plugin event if plugin is enabled in this sortable,\n      // and plugin has event defined\n      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n        sortable[plugin.pluginName][eventName](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n    });\n  },\n  initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n    plugins.forEach(function (plugin) {\n      var pluginName = plugin.pluginName;\n      if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n      var initialized = new plugin(sortable, el, sortable.options);\n      initialized.sortable = sortable;\n      initialized.options = sortable.options;\n      sortable[pluginName] = initialized;\n\n      // Add default options from plugin\n      _extends(defaults, initialized.defaults);\n    });\n    for (var option in sortable.options) {\n      if (!sortable.options.hasOwnProperty(option)) continue;\n      var modified = this.modifyOption(sortable, option, sortable.options[option]);\n      if (typeof modified !== 'undefined') {\n        sortable.options[option] = modified;\n      }\n    }\n  },\n  getEventProperties: function getEventProperties(name, sortable) {\n    var eventProperties = {};\n    plugins.forEach(function (plugin) {\n      if (typeof plugin.eventProperties !== 'function') return;\n      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n    });\n    return eventProperties;\n  },\n  modifyOption: function modifyOption(sortable, name, value) {\n    var modifiedValue;\n    plugins.forEach(function (plugin) {\n      // Plugin must exist on the Sortable\n      if (!sortable[plugin.pluginName]) return;\n\n      // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n      if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n      }\n    });\n    return modifiedValue;\n  }\n};\n\nfunction dispatchEvent(_ref) {\n  var sortable = _ref.sortable,\n    rootEl = _ref.rootEl,\n    name = _ref.name,\n    targetEl = _ref.targetEl,\n    cloneEl = _ref.cloneEl,\n    toEl = _ref.toEl,\n    fromEl = _ref.fromEl,\n    oldIndex = _ref.oldIndex,\n    newIndex = _ref.newIndex,\n    oldDraggableIndex = _ref.oldDraggableIndex,\n    newDraggableIndex = _ref.newDraggableIndex,\n    originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    extraEventProperties = _ref.extraEventProperties;\n  sortable = sortable || rootEl && rootEl[expando];\n  if (!sortable) return;\n  var evt,\n    options = sortable.options,\n    onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(name, {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent(name, true, true);\n  }\n  evt.to = toEl || rootEl;\n  evt.from = fromEl || rootEl;\n  evt.item = targetEl || rootEl;\n  evt.clone = cloneEl;\n  evt.oldIndex = oldIndex;\n  evt.newIndex = newIndex;\n  evt.oldDraggableIndex = oldDraggableIndex;\n  evt.newDraggableIndex = newDraggableIndex;\n  evt.originalEvent = originalEvent;\n  evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n  var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n  for (var option in allEventProperties) {\n    evt[option] = allEventProperties[option];\n  }\n  if (rootEl) {\n    rootEl.dispatchEvent(evt);\n  }\n  if (options[onName]) {\n    options[onName].call(sortable, evt);\n  }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    originalEvent = _ref.evt,\n    data = _objectWithoutProperties(_ref, _excluded);\n  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n    dragEl: dragEl,\n    parentEl: parentEl,\n    ghostEl: ghostEl,\n    rootEl: rootEl,\n    nextEl: nextEl,\n    lastDownEl: lastDownEl,\n    cloneEl: cloneEl,\n    cloneHidden: cloneHidden,\n    dragStarted: moved,\n    putSortable: putSortable,\n    activeSortable: Sortable.active,\n    originalEvent: originalEvent,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex,\n    hideGhostForTarget: _hideGhostForTarget,\n    unhideGhostForTarget: _unhideGhostForTarget,\n    cloneNowHidden: function cloneNowHidden() {\n      cloneHidden = true;\n    },\n    cloneNowShown: function cloneNowShown() {\n      cloneHidden = false;\n    },\n    dispatchSortableEvent: function dispatchSortableEvent(name) {\n      _dispatchEvent({\n        sortable: sortable,\n        name: name,\n        originalEvent: originalEvent\n      });\n    }\n  }, data));\n};\nfunction _dispatchEvent(info) {\n  dispatchEvent(_objectSpread2({\n    putSortable: putSortable,\n    cloneEl: cloneEl,\n    targetEl: dragEl,\n    rootEl: rootEl,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex\n  }, info));\n}\nvar dragEl,\n  parentEl,\n  ghostEl,\n  rootEl,\n  nextEl,\n  lastDownEl,\n  cloneEl,\n  cloneHidden,\n  oldIndex,\n  newIndex,\n  oldDraggableIndex,\n  newDraggableIndex,\n  activeGroup,\n  putSortable,\n  awaitingDragStarted = false,\n  ignoreNextClick = false,\n  sortables = [],\n  tapEvt,\n  touchEvt,\n  lastDx,\n  lastDy,\n  tapDistanceLeft,\n  tapDistanceTop,\n  moved,\n  lastTarget,\n  lastDirection,\n  pastFirstInvertThresh = false,\n  isCircumstantialInvert = false,\n  targetMoveDistance,\n  // For positioning ghost absolutely\n  ghostRelativeParent,\n  ghostRelativeParentInitialScroll = [],\n  // (left, top)\n\n  _silent = false,\n  savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n  PositionGhostAbsolutely = IOS,\n  CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n  // This will not pass for IE9, because IE9 DnD only works on anchors\n  supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n  supportCssPointerEvents = function () {\n    if (!documentExists) return;\n    // false when <= IE11\n    if (IE11OrLess) {\n      return false;\n    }\n    var el = document.createElement('x');\n    el.style.cssText = 'pointer-events:auto';\n    return el.style.pointerEvents === 'auto';\n  }(),\n  _detectDirection = function _detectDirection(el, options) {\n    var elCSS = css(el),\n      elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n      child1 = getChild(el, 0, options),\n      child2 = getChild(el, 1, options),\n      firstChildCSS = child1 && css(child1),\n      secondChildCSS = child2 && css(child2),\n      firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n      secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n    if (elCSS.display === 'flex') {\n      return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n    }\n    if (elCSS.display === 'grid') {\n      return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n    }\n    if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n      var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n      return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n    }\n    return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n  },\n  _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n    var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n      dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n      dragElOppLength = vertical ? dragRect.width : dragRect.height,\n      targetS1Opp = vertical ? targetRect.left : targetRect.top,\n      targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n      targetOppLength = vertical ? targetRect.width : targetRect.height;\n    return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n  },\n  /**\r\n   * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n   * @param  {Number} x      X position\r\n   * @param  {Number} y      Y position\r\n   * @return {HTMLElement}   Element of the first found nearest Sortable\r\n   */\n  _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n    var ret;\n    sortables.some(function (sortable) {\n      var threshold = sortable[expando].options.emptyInsertThreshold;\n      if (!threshold || lastChild(sortable)) return;\n      var rect = getRect(sortable),\n        insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n        insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n      if (insideHorizontally && insideVertically) {\n        return ret = sortable;\n      }\n    });\n    return ret;\n  },\n  _prepareGroup = function _prepareGroup(options) {\n    function toFn(value, pull) {\n      return function (to, from, dragEl, evt) {\n        var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n        if (value == null && (pull || sameGroup)) {\n          // Default pull value\n          // Default pull and put value if same group\n          return true;\n        } else if (value == null || value === false) {\n          return false;\n        } else if (pull && value === 'clone') {\n          return value;\n        } else if (typeof value === 'function') {\n          return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n        } else {\n          var otherGroup = (pull ? to : from).options.group.name;\n          return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n        }\n      };\n    }\n    var group = {};\n    var originalGroup = options.group;\n    if (!originalGroup || _typeof(originalGroup) != 'object') {\n      originalGroup = {\n        name: originalGroup\n      };\n    }\n    group.name = originalGroup.name;\n    group.checkPull = toFn(originalGroup.pull, true);\n    group.checkPut = toFn(originalGroup.put);\n    group.revertClone = originalGroup.revertClone;\n    options.group = group;\n  },\n  _hideGhostForTarget = function _hideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', 'none');\n    }\n  },\n  _unhideGhostForTarget = function _unhideGhostForTarget() {\n    if (!supportCssPointerEvents && ghostEl) {\n      css(ghostEl, 'display', '');\n    }\n  };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n  document.addEventListener('click', function (evt) {\n    if (ignoreNextClick) {\n      evt.preventDefault();\n      evt.stopPropagation && evt.stopPropagation();\n      evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n      ignoreNextClick = false;\n      return false;\n    }\n  }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n  if (dragEl) {\n    evt = evt.touches ? evt.touches[0] : evt;\n    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n    if (nearest) {\n      // Create imitation event\n      var event = {};\n      for (var i in evt) {\n        if (evt.hasOwnProperty(i)) {\n          event[i] = evt[i];\n        }\n      }\n      event.target = event.rootEl = nearest;\n      event.preventDefault = void 0;\n      event.stopPropagation = void 0;\n      nearest[expando]._onDragOver(event);\n    }\n  }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n  if (dragEl) {\n    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n  }\n};\n\n/**\r\n * @class  Sortable\r\n * @param  {HTMLElement}  el\r\n * @param  {Object}       [options]\r\n */\nfunction Sortable(el, options) {\n  if (!(el && el.nodeType && el.nodeType === 1)) {\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n  }\n  this.el = el; // root element\n  this.options = options = _extends({}, options);\n\n  // Export instance\n  el[expando] = this;\n  var defaults = {\n    group: null,\n    sort: true,\n    disabled: false,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: false,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: true,\n    direction: function direction() {\n      return _detectDirection(el, this.options);\n    },\n    ghostClass: 'sortable-ghost',\n    chosenClass: 'sortable-chosen',\n    dragClass: 'sortable-drag',\n    ignore: 'a, img',\n    filter: null,\n    preventOnFilter: true,\n    animation: 0,\n    easing: null,\n    setData: function setData(dataTransfer, dragEl) {\n      dataTransfer.setData('Text', dragEl.textContent);\n    },\n    dropBubble: false,\n    dragoverBubble: false,\n    dataIdAttr: 'data-id',\n    delay: 0,\n    delayOnTouchOnly: false,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: false,\n    fallbackClass: 'sortable-fallback',\n    fallbackOnBody: false,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    // Disabled on Safari: #1571; Enabled on Safari IOS: #2244\n    supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),\n    emptyInsertThreshold: 5\n  };\n  PluginManager.initializePlugins(this, el, defaults);\n\n  // Set default options\n  for (var name in defaults) {\n    !(name in options) && (options[name] = defaults[name]);\n  }\n  _prepareGroup(options);\n\n  // Bind all private methods\n  for (var fn in this) {\n    if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n      this[fn] = this[fn].bind(this);\n    }\n  }\n\n  // Setup drag mode\n  this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n  if (this.nativeDraggable) {\n    // Touch start threshold cannot be greater than the native dragstart threshold\n    this.options.touchStartThreshold = 1;\n  }\n\n  // Bind events\n  if (options.supportPointer) {\n    on(el, 'pointerdown', this._onTapStart);\n  } else {\n    on(el, 'mousedown', this._onTapStart);\n    on(el, 'touchstart', this._onTapStart);\n  }\n  if (this.nativeDraggable) {\n    on(el, 'dragover', this);\n    on(el, 'dragenter', this);\n  }\n  sortables.push(this.el);\n\n  // Restore sorting\n  options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n  // Add animation state manager\n  _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n  constructor: Sortable,\n  _isOutsideThisEl: function _isOutsideThisEl(target) {\n    if (!this.el.contains(target) && target !== this.el) {\n      lastTarget = null;\n    }\n  },\n  _getDirection: function _getDirection(evt, target) {\n    return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n  },\n  _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n    if (!evt.cancelable) return;\n    var _this = this,\n      el = this.el,\n      options = this.options,\n      preventOnFilter = options.preventOnFilter,\n      type = evt.type,\n      touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n      target = (touch || evt).target,\n      originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n      filter = options.filter;\n    _saveInputCheckedState(el);\n\n    // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n    if (dragEl) {\n      return;\n    }\n    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n      return; // only left button and enabled\n    }\n\n    // cancel dnd if original target is content editable\n    if (originalTarget.isContentEditable) {\n      return;\n    }\n\n    // Safari ignores further event handling after mousedown\n    if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n      return;\n    }\n    target = closest(target, options.draggable, el, false);\n    if (target && target.animated) {\n      return;\n    }\n    if (lastDownEl === target) {\n      // Ignoring duplicate `down`\n      return;\n    }\n\n    // Get the index of the dragged element within its parent\n    oldIndex = index(target);\n    oldDraggableIndex = index(target, options.draggable);\n\n    // Check filter\n    if (typeof filter === 'function') {\n      if (filter.call(this, evt, target, this)) {\n        _dispatchEvent({\n          sortable: _this,\n          rootEl: originalTarget,\n          name: 'filter',\n          targetEl: target,\n          toEl: el,\n          fromEl: el\n        });\n        pluginEvent('filter', _this, {\n          evt: evt\n        });\n        preventOnFilter && evt.preventDefault();\n        return; // cancel dnd\n      }\n    } else if (filter) {\n      filter = filter.split(',').some(function (criteria) {\n        criteria = closest(originalTarget, criteria.trim(), el, false);\n        if (criteria) {\n          _dispatchEvent({\n            sortable: _this,\n            rootEl: criteria,\n            name: 'filter',\n            targetEl: target,\n            fromEl: el,\n            toEl: el\n          });\n          pluginEvent('filter', _this, {\n            evt: evt\n          });\n          return true;\n        }\n      });\n      if (filter) {\n        preventOnFilter && evt.preventDefault();\n        return; // cancel dnd\n      }\n    }\n    if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n      return;\n    }\n\n    // Prepare `dragstart`\n    this._prepareDragStart(evt, touch, target);\n  },\n  _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n    var _this = this,\n      el = _this.el,\n      options = _this.options,\n      ownerDocument = el.ownerDocument,\n      dragStartFn;\n    if (target && !dragEl && target.parentNode === el) {\n      var dragRect = getRect(target);\n      rootEl = el;\n      dragEl = target;\n      parentEl = dragEl.parentNode;\n      nextEl = dragEl.nextSibling;\n      lastDownEl = target;\n      activeGroup = options.group;\n      Sortable.dragged = dragEl;\n      tapEvt = {\n        target: dragEl,\n        clientX: (touch || evt).clientX,\n        clientY: (touch || evt).clientY\n      };\n      tapDistanceLeft = tapEvt.clientX - dragRect.left;\n      tapDistanceTop = tapEvt.clientY - dragRect.top;\n      this._lastX = (touch || evt).clientX;\n      this._lastY = (touch || evt).clientY;\n      dragEl.style['will-change'] = 'all';\n      dragStartFn = function dragStartFn() {\n        pluginEvent('delayEnded', _this, {\n          evt: evt\n        });\n        if (Sortable.eventCanceled) {\n          _this._onDrop();\n          return;\n        }\n        // Delayed drag has been triggered\n        // we can re-enable the events: touchmove/mousemove\n        _this._disableDelayedDragEvents();\n        if (!FireFox && _this.nativeDraggable) {\n          dragEl.draggable = true;\n        }\n\n        // Bind the events: dragstart/dragend\n        _this._triggerDragStart(evt, touch);\n\n        // Drag start event\n        _dispatchEvent({\n          sortable: _this,\n          name: 'choose',\n          originalEvent: evt\n        });\n\n        // Chosen item\n        toggleClass(dragEl, options.chosenClass, true);\n      };\n\n      // Disable \"draggable\"\n      options.ignore.split(',').forEach(function (criteria) {\n        find(dragEl, criteria.trim(), _disableDraggable);\n      });\n      on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n      if (options.supportPointer) {\n        on(ownerDocument, 'pointerup', _this._onDrop);\n        // Native D&D triggers pointercancel\n        !this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);\n      } else {\n        on(ownerDocument, 'mouseup', _this._onDrop);\n        on(ownerDocument, 'touchend', _this._onDrop);\n        on(ownerDocument, 'touchcancel', _this._onDrop);\n      }\n\n      // Make dragEl draggable (must be before delay for FireFox)\n      if (FireFox && this.nativeDraggable) {\n        this.options.touchStartThreshold = 4;\n        dragEl.draggable = true;\n      }\n      pluginEvent('delayStart', this, {\n        evt: evt\n      });\n\n      // Delay is impossible for native DnD in Edge or IE\n      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n        if (Sortable.eventCanceled) {\n          this._onDrop();\n          return;\n        }\n        // If the user moves the pointer or let go the click or touch\n        // before the delay has been reached:\n        // disable the delayed drag\n        if (options.supportPointer) {\n          on(ownerDocument, 'pointerup', _this._disableDelayedDrag);\n          on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);\n        } else {\n          on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n          on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n          on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n        }\n        on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n        on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n        options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n      } else {\n        dragStartFn();\n      }\n    }\n  },\n  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n    var touch = e.touches ? e.touches[0] : e;\n    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n      this._disableDelayedDrag();\n    }\n  },\n  _disableDelayedDrag: function _disableDelayedDrag() {\n    dragEl && _disableDraggable(dragEl);\n    clearTimeout(this._dragStartTimer);\n    this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n    off(ownerDocument, 'touchend', this._disableDelayedDrag);\n    off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n    off(ownerDocument, 'pointerup', this._disableDelayedDrag);\n    off(ownerDocument, 'pointercancel', this._disableDelayedDrag);\n    off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n    touch = touch || evt.pointerType == 'touch' && evt;\n    if (!this.nativeDraggable || touch) {\n      if (this.options.supportPointer) {\n        on(document, 'pointermove', this._onTouchMove);\n      } else if (touch) {\n        on(document, 'touchmove', this._onTouchMove);\n      } else {\n        on(document, 'mousemove', this._onTouchMove);\n      }\n    } else {\n      on(dragEl, 'dragend', this);\n      on(rootEl, 'dragstart', this._onDragStart);\n    }\n    try {\n      if (document.selection) {\n        _nextTick(function () {\n          document.selection.empty();\n        });\n      } else {\n        window.getSelection().removeAllRanges();\n      }\n    } catch (err) {}\n  },\n  _dragStarted: function _dragStarted(fallback, evt) {\n    awaitingDragStarted = false;\n    if (rootEl && dragEl) {\n      pluginEvent('dragStarted', this, {\n        evt: evt\n      });\n      if (this.nativeDraggable) {\n        on(document, 'dragover', _checkOutsideTargetEl);\n      }\n      var options = this.options;\n\n      // Apply effect\n      !fallback && toggleClass(dragEl, options.dragClass, false);\n      toggleClass(dragEl, options.ghostClass, true);\n      Sortable.active = this;\n      fallback && this._appendGhost();\n\n      // Drag start event\n      _dispatchEvent({\n        sortable: this,\n        name: 'start',\n        originalEvent: evt\n      });\n    } else {\n      this._nulling();\n    }\n  },\n  _emulateDragOver: function _emulateDragOver() {\n    if (touchEvt) {\n      this._lastX = touchEvt.clientX;\n      this._lastY = touchEvt.clientY;\n      _hideGhostForTarget();\n      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n      var parent = target;\n      while (target && target.shadowRoot) {\n        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n        if (target === parent) break;\n        parent = target;\n      }\n      dragEl.parentNode[expando]._isOutsideThisEl(target);\n      if (parent) {\n        do {\n          if (parent[expando]) {\n            var inserted = void 0;\n            inserted = parent[expando]._onDragOver({\n              clientX: touchEvt.clientX,\n              clientY: touchEvt.clientY,\n              target: target,\n              rootEl: parent\n            });\n            if (inserted && !this.options.dragoverBubble) {\n              break;\n            }\n          }\n          target = parent; // store last element\n        }\n        /* jshint boss:true */ while (parent = getParentOrHost(parent));\n      }\n      _unhideGhostForTarget();\n    }\n  },\n  _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n    if (tapEvt) {\n      var options = this.options,\n        fallbackTolerance = options.fallbackTolerance,\n        fallbackOffset = options.fallbackOffset,\n        touch = evt.touches ? evt.touches[0] : evt,\n        ghostMatrix = ghostEl && matrix(ghostEl, true),\n        scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n        scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n        relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n        dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n        dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n      // only set the status to dragging, when we are actually dragging\n      if (!Sortable.active && !awaitingDragStarted) {\n        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n          return;\n        }\n        this._onDragStart(evt, true);\n      }\n      if (ghostEl) {\n        if (ghostMatrix) {\n          ghostMatrix.e += dx - (lastDx || 0);\n          ghostMatrix.f += dy - (lastDy || 0);\n        } else {\n          ghostMatrix = {\n            a: 1,\n            b: 0,\n            c: 0,\n            d: 1,\n            e: dx,\n            f: dy\n          };\n        }\n        var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n        css(ghostEl, 'webkitTransform', cssMatrix);\n        css(ghostEl, 'mozTransform', cssMatrix);\n        css(ghostEl, 'msTransform', cssMatrix);\n        css(ghostEl, 'transform', cssMatrix);\n        lastDx = dx;\n        lastDy = dy;\n        touchEvt = touch;\n      }\n      evt.cancelable && evt.preventDefault();\n    }\n  },\n  _appendGhost: function _appendGhost() {\n    // Bug if using scale(): https://stackoverflow.com/questions/2637058\n    // Not being adjusted for\n    if (!ghostEl) {\n      var container = this.options.fallbackOnBody ? document.body : rootEl,\n        rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n        options = this.options;\n\n      // Position absolutely\n      if (PositionGhostAbsolutely) {\n        // Get relatively positioned parent\n        ghostRelativeParent = container;\n        while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n          ghostRelativeParent = ghostRelativeParent.parentNode;\n        }\n        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n          if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n          rect.top += ghostRelativeParent.scrollTop;\n          rect.left += ghostRelativeParent.scrollLeft;\n        } else {\n          ghostRelativeParent = getWindowScrollingElement();\n        }\n        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n      }\n      ghostEl = dragEl.cloneNode(true);\n      toggleClass(ghostEl, options.ghostClass, false);\n      toggleClass(ghostEl, options.fallbackClass, true);\n      toggleClass(ghostEl, options.dragClass, true);\n      css(ghostEl, 'transition', '');\n      css(ghostEl, 'transform', '');\n      css(ghostEl, 'box-sizing', 'border-box');\n      css(ghostEl, 'margin', 0);\n      css(ghostEl, 'top', rect.top);\n      css(ghostEl, 'left', rect.left);\n      css(ghostEl, 'width', rect.width);\n      css(ghostEl, 'height', rect.height);\n      css(ghostEl, 'opacity', '0.8');\n      css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n      css(ghostEl, 'zIndex', '100000');\n      css(ghostEl, 'pointerEvents', 'none');\n      Sortable.ghost = ghostEl;\n      container.appendChild(ghostEl);\n\n      // Set transform-origin\n      css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n    }\n  },\n  _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n    var _this = this;\n    var dataTransfer = evt.dataTransfer;\n    var options = _this.options;\n    pluginEvent('dragStart', this, {\n      evt: evt\n    });\n    if (Sortable.eventCanceled) {\n      this._onDrop();\n      return;\n    }\n    pluginEvent('setupClone', this);\n    if (!Sortable.eventCanceled) {\n      cloneEl = clone(dragEl);\n      cloneEl.removeAttribute(\"id\");\n      cloneEl.draggable = false;\n      cloneEl.style['will-change'] = '';\n      this._hideClone();\n      toggleClass(cloneEl, this.options.chosenClass, false);\n      Sortable.clone = cloneEl;\n    }\n\n    // #1143: IFrame support workaround\n    _this.cloneId = _nextTick(function () {\n      pluginEvent('clone', _this);\n      if (Sortable.eventCanceled) return;\n      if (!_this.options.removeCloneOnHide) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      }\n      _this._hideClone();\n      _dispatchEvent({\n        sortable: _this,\n        name: 'clone'\n      });\n    });\n    !fallback && toggleClass(dragEl, options.dragClass, true);\n\n    // Set proper drop events\n    if (fallback) {\n      ignoreNextClick = true;\n      _this._loopId = setInterval(_this._emulateDragOver, 50);\n    } else {\n      // Undo what was set in _prepareDragStart before drag started\n      off(document, 'mouseup', _this._onDrop);\n      off(document, 'touchend', _this._onDrop);\n      off(document, 'touchcancel', _this._onDrop);\n      if (dataTransfer) {\n        dataTransfer.effectAllowed = 'move';\n        options.setData && options.setData.call(_this, dataTransfer, dragEl);\n      }\n      on(document, 'drop', _this);\n\n      // #1276 fix:\n      css(dragEl, 'transform', 'translateZ(0)');\n    }\n    awaitingDragStarted = true;\n    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n    on(document, 'selectstart', _this);\n    moved = true;\n    window.getSelection().removeAllRanges();\n    if (Safari) {\n      css(document.body, 'user-select', 'none');\n    }\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function _onDragOver( /**Event*/evt) {\n    var el = this.el,\n      target = evt.target,\n      dragRect,\n      targetRect,\n      revert,\n      options = this.options,\n      group = options.group,\n      activeSortable = Sortable.active,\n      isOwner = activeGroup === group,\n      canSort = options.sort,\n      fromSortable = putSortable || activeSortable,\n      vertical,\n      _this = this,\n      completedFired = false;\n    if (_silent) return;\n    function dragOverEvent(name, extra) {\n      pluginEvent(name, _this, _objectSpread2({\n        evt: evt,\n        isOwner: isOwner,\n        axis: vertical ? 'vertical' : 'horizontal',\n        revert: revert,\n        dragRect: dragRect,\n        targetRect: targetRect,\n        canSort: canSort,\n        fromSortable: fromSortable,\n        target: target,\n        completed: completed,\n        onMove: function onMove(target, after) {\n          return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n        },\n        changed: changed\n      }, extra));\n    }\n\n    // Capture animation state\n    function capture() {\n      dragOverEvent('dragOverAnimationCapture');\n      _this.captureAnimationState();\n      if (_this !== fromSortable) {\n        fromSortable.captureAnimationState();\n      }\n    }\n\n    // Return invocation when dragEl is inserted (or completed)\n    function completed(insertion) {\n      dragOverEvent('dragOverCompleted', {\n        insertion: insertion\n      });\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        } else {\n          activeSortable._showClone(_this);\n        }\n        if (_this !== fromSortable) {\n          // Set ghost class to new sortable's ghost class\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n          toggleClass(dragEl, options.ghostClass, true);\n        }\n        if (putSortable !== _this && _this !== Sortable.active) {\n          putSortable = _this;\n        } else if (_this === Sortable.active && putSortable) {\n          putSortable = null;\n        }\n\n        // Animation\n        if (fromSortable === _this) {\n          _this._ignoreWhileAnimating = target;\n        }\n        _this.animateAll(function () {\n          dragOverEvent('dragOverAnimationComplete');\n          _this._ignoreWhileAnimating = null;\n        });\n        if (_this !== fromSortable) {\n          fromSortable.animateAll();\n          fromSortable._ignoreWhileAnimating = null;\n        }\n      }\n\n      // Null lastTarget if it is not inside a previously swapped element\n      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n        lastTarget = null;\n      }\n\n      // no bubbling and not fallback\n      if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n        dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n        // Do not detect for empty insert if already inserted\n        !insertion && nearestEmptyInsertDetectEvent(evt);\n      }\n      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n      return completedFired = true;\n    }\n\n    // Call when dragEl has been inserted\n    function changed() {\n      newIndex = index(dragEl);\n      newDraggableIndex = index(dragEl, options.draggable);\n      _dispatchEvent({\n        sortable: _this,\n        name: 'change',\n        toEl: el,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex,\n        originalEvent: evt\n      });\n    }\n    if (evt.preventDefault !== void 0) {\n      evt.cancelable && evt.preventDefault();\n    }\n    target = closest(target, options.draggable, el, true);\n    dragOverEvent('dragOver');\n    if (Sortable.eventCanceled) return completedFired;\n    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n      return completed(false);\n    }\n    ignoreNextClick = false;\n    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n    : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n      vertical = this._getDirection(evt, target) === 'vertical';\n      dragRect = getRect(dragEl);\n      dragOverEvent('dragOverValid');\n      if (Sortable.eventCanceled) return completedFired;\n      if (revert) {\n        parentEl = rootEl; // actualization\n        capture();\n        this._hideClone();\n        dragOverEvent('revert');\n        if (!Sortable.eventCanceled) {\n          if (nextEl) {\n            rootEl.insertBefore(dragEl, nextEl);\n          } else {\n            rootEl.appendChild(dragEl);\n          }\n        }\n        return completed(true);\n      }\n      var elLastChild = lastChild(el, options.draggable);\n      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n        // Insert to end of list\n\n        // If already at end of list: Do not insert\n        if (elLastChild === dragEl) {\n          return completed(false);\n        }\n\n        // if there is a last element, it is the target\n        if (elLastChild && el === evt.target) {\n          target = elLastChild;\n        }\n        if (target) {\n          targetRect = getRect(target);\n        }\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n          capture();\n          if (elLastChild && elLastChild.nextSibling) {\n            // the last draggable element is not the last node\n            el.insertBefore(dragEl, elLastChild.nextSibling);\n          } else {\n            el.appendChild(dragEl);\n          }\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n        // Insert to start of list\n        var firstChild = getChild(el, 0, options, true);\n        if (firstChild === dragEl) {\n          return completed(false);\n        }\n        target = firstChild;\n        targetRect = getRect(target);\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n          capture();\n          el.insertBefore(dragEl, firstChild);\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (target.parentNode === el) {\n        targetRect = getRect(target);\n        var direction = 0,\n          targetBeforeFirstSwap,\n          differentLevel = dragEl.parentNode !== el,\n          differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n          side1 = vertical ? 'top' : 'left',\n          scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n          scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n        if (lastTarget !== target) {\n          targetBeforeFirstSwap = targetRect[side1];\n          pastFirstInvertThresh = false;\n          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n        }\n        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n        var sibling;\n        if (direction !== 0) {\n          // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n          var dragIndex = index(dragEl);\n          do {\n            dragIndex -= direction;\n            sibling = parentEl.children[dragIndex];\n          } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n        }\n        // If dragEl is already beside target: Do not insert\n        if (direction === 0 || sibling === target) {\n          return completed(false);\n        }\n        lastTarget = target;\n        lastDirection = direction;\n        var nextSibling = target.nextElementSibling,\n          after = false;\n        after = direction === 1;\n        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n        if (moveVector !== false) {\n          if (moveVector === 1 || moveVector === -1) {\n            after = moveVector === 1;\n          }\n          _silent = true;\n          setTimeout(_unsilent, 30);\n          capture();\n          if (after && !nextSibling) {\n            el.appendChild(dragEl);\n          } else {\n            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n          }\n\n          // Undo chrome's scroll adjustment (has no effect on other browsers)\n          if (scrolledPastTop) {\n            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n          }\n          parentEl = dragEl.parentNode; // actualization\n\n          // must be done before animation\n          if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n          }\n          changed();\n          return completed(true);\n        }\n      }\n      if (el.contains(dragEl)) {\n        return completed(false);\n      }\n    }\n    return false;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function _offMoveEvents() {\n    off(document, 'mousemove', this._onTouchMove);\n    off(document, 'touchmove', this._onTouchMove);\n    off(document, 'pointermove', this._onTouchMove);\n    off(document, 'dragover', nearestEmptyInsertDetectEvent);\n    off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n    off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n  },\n  _offUpEvents: function _offUpEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._onDrop);\n    off(ownerDocument, 'touchend', this._onDrop);\n    off(ownerDocument, 'pointerup', this._onDrop);\n    off(ownerDocument, 'pointercancel', this._onDrop);\n    off(ownerDocument, 'touchcancel', this._onDrop);\n    off(document, 'selectstart', this);\n  },\n  _onDrop: function _onDrop( /**Event*/evt) {\n    var el = this.el,\n      options = this.options;\n\n    // Get the index of the dragged element within its parent\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    pluginEvent('drop', this, {\n      evt: evt\n    });\n    parentEl = dragEl && dragEl.parentNode;\n\n    // Get again after plugin event\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    if (Sortable.eventCanceled) {\n      this._nulling();\n      return;\n    }\n    awaitingDragStarted = false;\n    isCircumstantialInvert = false;\n    pastFirstInvertThresh = false;\n    clearInterval(this._loopId);\n    clearTimeout(this._dragStartTimer);\n    _cancelNextTick(this.cloneId);\n    _cancelNextTick(this._dragStartId);\n\n    // Unbind events\n    if (this.nativeDraggable) {\n      off(document, 'drop', this);\n      off(el, 'dragstart', this._onDragStart);\n    }\n    this._offMoveEvents();\n    this._offUpEvents();\n    if (Safari) {\n      css(document.body, 'user-select', '');\n    }\n    css(dragEl, 'transform', '');\n    if (evt) {\n      if (moved) {\n        evt.cancelable && evt.preventDefault();\n        !options.dropBubble && evt.stopPropagation();\n      }\n      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        // Remove clone(s)\n        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n      }\n      if (dragEl) {\n        if (this.nativeDraggable) {\n          off(dragEl, 'dragend', this);\n        }\n        _disableDraggable(dragEl);\n        dragEl.style['will-change'] = '';\n\n        // Remove classes\n        // ghostClass is added in dragStarted\n        if (moved && !awaitingDragStarted) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n        }\n        toggleClass(dragEl, this.options.chosenClass, false);\n\n        // Drag stop event\n        _dispatchEvent({\n          sortable: this,\n          name: 'unchoose',\n          toEl: parentEl,\n          newIndex: null,\n          newDraggableIndex: null,\n          originalEvent: evt\n        });\n        if (rootEl !== parentEl) {\n          if (newIndex >= 0) {\n            // Add event\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'add',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n\n            // Remove event\n            _dispatchEvent({\n              sortable: this,\n              name: 'remove',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n\n            // drag from one list and drop into another\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'sort',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n            _dispatchEvent({\n              sortable: this,\n              name: 'sort',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n          }\n          putSortable && putSortable.save();\n        } else {\n          if (newIndex !== oldIndex) {\n            if (newIndex >= 0) {\n              // drag & drop within the same list\n              _dispatchEvent({\n                sortable: this,\n                name: 'update',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n              _dispatchEvent({\n                sortable: this,\n                name: 'sort',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n            }\n          }\n        }\n        if (Sortable.active) {\n          /* jshint eqnull:true */\n          if (newIndex == null || newIndex === -1) {\n            newIndex = oldIndex;\n            newDraggableIndex = oldDraggableIndex;\n          }\n          _dispatchEvent({\n            sortable: this,\n            name: 'end',\n            toEl: parentEl,\n            originalEvent: evt\n          });\n\n          // Save sorting\n          this.save();\n        }\n      }\n    }\n    this._nulling();\n  },\n  _nulling: function _nulling() {\n    pluginEvent('nulling', this);\n    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n    var el = this.el;\n    savedInputChecked.forEach(function (checkEl) {\n      if (el.contains(checkEl)) {\n        checkEl.checked = true;\n      }\n    });\n    savedInputChecked.length = lastDx = lastDy = 0;\n  },\n  handleEvent: function handleEvent( /**Event*/evt) {\n    switch (evt.type) {\n      case 'drop':\n      case 'dragend':\n        this._onDrop(evt);\n        break;\n      case 'dragenter':\n      case 'dragover':\n        if (dragEl) {\n          this._onDragOver(evt);\n          _globalDragOver(evt);\n        }\n        break;\n      case 'selectstart':\n        evt.preventDefault();\n        break;\n    }\n  },\n  /**\r\n   * Serializes the item into an array of string.\r\n   * @returns {String[]}\r\n   */\n  toArray: function toArray() {\n    var order = [],\n      el,\n      children = this.el.children,\n      i = 0,\n      n = children.length,\n      options = this.options;\n    for (; i < n; i++) {\n      el = children[i];\n      if (closest(el, options.draggable, this.el, false)) {\n        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n      }\n    }\n    return order;\n  },\n  /**\r\n   * Sorts the elements according to the array.\r\n   * @param  {String[]}  order  order of the items\r\n   */\n  sort: function sort(order, useAnimation) {\n    var items = {},\n      rootEl = this.el;\n    this.toArray().forEach(function (id, i) {\n      var el = rootEl.children[i];\n      if (closest(el, this.options.draggable, rootEl, false)) {\n        items[id] = el;\n      }\n    }, this);\n    useAnimation && this.captureAnimationState();\n    order.forEach(function (id) {\n      if (items[id]) {\n        rootEl.removeChild(items[id]);\n        rootEl.appendChild(items[id]);\n      }\n    });\n    useAnimation && this.animateAll();\n  },\n  /**\r\n   * Save the current sorting\r\n   */\n  save: function save() {\n    var store = this.options.store;\n    store && store.set && store.set(this);\n  },\n  /**\r\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n   * @param   {HTMLElement}  el\r\n   * @param   {String}       [selector]  default: `options.draggable`\r\n   * @returns {HTMLElement|null}\r\n   */\n  closest: function closest$1(el, selector) {\n    return closest(el, selector || this.options.draggable, this.el, false);\n  },\n  /**\r\n   * Set/get option\r\n   * @param   {string} name\r\n   * @param   {*}      [value]\r\n   * @returns {*}\r\n   */\n  option: function option(name, value) {\n    var options = this.options;\n    if (value === void 0) {\n      return options[name];\n    } else {\n      var modifiedValue = PluginManager.modifyOption(this, name, value);\n      if (typeof modifiedValue !== 'undefined') {\n        options[name] = modifiedValue;\n      } else {\n        options[name] = value;\n      }\n      if (name === 'group') {\n        _prepareGroup(options);\n      }\n    }\n  },\n  /**\r\n   * Destroy\r\n   */\n  destroy: function destroy() {\n    pluginEvent('destroy', this);\n    var el = this.el;\n    el[expando] = null;\n    off(el, 'mousedown', this._onTapStart);\n    off(el, 'touchstart', this._onTapStart);\n    off(el, 'pointerdown', this._onTapStart);\n    if (this.nativeDraggable) {\n      off(el, 'dragover', this);\n      off(el, 'dragenter', this);\n    }\n    // Remove draggable attributes\n    Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n      el.removeAttribute('draggable');\n    });\n    this._onDrop();\n    this._disableDelayedDragEvents();\n    sortables.splice(sortables.indexOf(this.el), 1);\n    this.el = el = null;\n  },\n  _hideClone: function _hideClone() {\n    if (!cloneHidden) {\n      pluginEvent('hideClone', this);\n      if (Sortable.eventCanceled) return;\n      css(cloneEl, 'display', 'none');\n      if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n        cloneEl.parentNode.removeChild(cloneEl);\n      }\n      cloneHidden = true;\n    }\n  },\n  _showClone: function _showClone(putSortable) {\n    if (putSortable.lastPutMode !== 'clone') {\n      this._hideClone();\n      return;\n    }\n    if (cloneHidden) {\n      pluginEvent('showClone', this);\n      if (Sortable.eventCanceled) return;\n\n      // show clone at dragEl or original position\n      if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      } else if (nextEl) {\n        rootEl.insertBefore(cloneEl, nextEl);\n      } else {\n        rootEl.appendChild(cloneEl);\n      }\n      if (this.options.group.revertClone) {\n        this.animate(dragEl, cloneEl);\n      }\n      css(cloneEl, 'display', '');\n      cloneHidden = false;\n    }\n  }\n};\nfunction _globalDragOver( /**Event*/evt) {\n  if (evt.dataTransfer) {\n    evt.dataTransfer.dropEffect = 'move';\n  }\n  evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n  var evt,\n    sortable = fromEl[expando],\n    onMoveFn = sortable.options.onMove,\n    retVal;\n  // Support for new CustomEvent feature\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent('move', {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent('move', true, true);\n  }\n  evt.to = toEl;\n  evt.from = fromEl;\n  evt.dragged = dragEl;\n  evt.draggedRect = dragRect;\n  evt.related = targetEl || toEl;\n  evt.relatedRect = targetRect || getRect(toEl);\n  evt.willInsertAfter = willInsertAfter;\n  evt.originalEvent = originalEvent;\n  fromEl.dispatchEvent(evt);\n  if (onMoveFn) {\n    retVal = onMoveFn.call(sortable, evt, originalEvent);\n  }\n  return retVal;\n}\nfunction _disableDraggable(el) {\n  el.draggable = false;\n}\nfunction _unsilent() {\n  _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n  var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n  var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n  var spacer = 10;\n  return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n  var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n    targetLength = vertical ? targetRect.height : targetRect.width,\n    targetS1 = vertical ? targetRect.top : targetRect.left,\n    targetS2 = vertical ? targetRect.bottom : targetRect.right,\n    invert = false;\n  if (!invertSwap) {\n    // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n      // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n      // check if past first invert threshold on side opposite of lastDirection\n      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n        // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n        pastFirstInvertThresh = true;\n      }\n      if (!pastFirstInvertThresh) {\n        // dragEl shadow (target move distance shadow)\n        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n        : mouseOnAxis > targetS2 - targetMoveDistance) {\n          return -lastDirection;\n        }\n      } else {\n        invert = true;\n      }\n    } else {\n      // Regular\n      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n        return _getInsertDirection(target);\n      }\n    }\n  }\n  invert = invert || invertSwap;\n  if (invert) {\n    // Invert of regular\n    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n  }\n  return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param  {HTMLElement} target       The target whose position dragEl is being inserted at\r\n * @return {Number}                   Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n  if (index(dragEl) < index(target)) {\n    return 1;\n  } else {\n    return -1;\n  }\n}\n\n/**\r\n * Generate id\r\n * @param   {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n  var str = el.tagName + el.className + el.src + el.href + el.textContent,\n    i = str.length,\n    sum = 0;\n  while (i--) {\n    sum += str.charCodeAt(i);\n  }\n  return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n  savedInputChecked.length = 0;\n  var inputs = root.getElementsByTagName('input');\n  var idx = inputs.length;\n  while (idx--) {\n    var el = inputs[idx];\n    el.checked && savedInputChecked.push(el);\n  }\n}\nfunction _nextTick(fn) {\n  return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n  return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n  on(document, 'touchmove', function (evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n      evt.preventDefault();\n    }\n  });\n}\n\n// Export utils\nSortable.utils = {\n  on: on,\n  off: off,\n  css: css,\n  find: find,\n  is: function is(el, selector) {\n    return !!closest(el, selector, el, false);\n  },\n  extend: extend,\n  throttle: throttle,\n  closest: closest,\n  toggleClass: toggleClass,\n  clone: clone,\n  index: index,\n  nextTick: _nextTick,\n  cancelNextTick: _cancelNextTick,\n  detectDirection: _detectDirection,\n  getChild: getChild,\n  expando: expando\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param  {HTMLElement} element The element\r\n * @return {Sortable|undefined}         The instance of Sortable\r\n */\nSortable.get = function (element) {\n  return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param  {...SortablePlugin|SortablePlugin[]} plugins       Plugins being mounted\r\n */\nSortable.mount = function () {\n  for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n    plugins[_key] = arguments[_key];\n  }\n  if (plugins[0].constructor === Array) plugins = plugins[0];\n  plugins.forEach(function (plugin) {\n    if (!plugin.prototype || !plugin.prototype.constructor) {\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n    }\n    if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n    PluginManager.mount(plugin);\n  });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement}  el\r\n * @param {Object}      [options]\r\n */\nSortable.create = function (el, options) {\n  return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n  scrollEl,\n  scrollRootEl,\n  scrolling = false,\n  lastAutoScrollX,\n  lastAutoScrollY,\n  touchEvt$1,\n  pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n  function AutoScroll() {\n    this.defaults = {\n      scroll: true,\n      forceAutoScrollFallback: false,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: true\n    };\n\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n  }\n  AutoScroll.prototype = {\n    dragStarted: function dragStarted(_ref) {\n      var originalEvent = _ref.originalEvent;\n      if (this.sortable.nativeDraggable) {\n        on(document, 'dragover', this._handleAutoScroll);\n      } else {\n        if (this.options.supportPointer) {\n          on(document, 'pointermove', this._handleFallbackAutoScroll);\n        } else if (originalEvent.touches) {\n          on(document, 'touchmove', this._handleFallbackAutoScroll);\n        } else {\n          on(document, 'mousemove', this._handleFallbackAutoScroll);\n        }\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref2) {\n      var originalEvent = _ref2.originalEvent;\n      // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n      if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n        this._handleAutoScroll(originalEvent);\n      }\n    },\n    drop: function drop() {\n      if (this.sortable.nativeDraggable) {\n        off(document, 'dragover', this._handleAutoScroll);\n      } else {\n        off(document, 'pointermove', this._handleFallbackAutoScroll);\n        off(document, 'touchmove', this._handleFallbackAutoScroll);\n        off(document, 'mousemove', this._handleFallbackAutoScroll);\n      }\n      clearPointerElemChangedInterval();\n      clearAutoScrolls();\n      cancelThrottle();\n    },\n    nulling: function nulling() {\n      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n      autoScrolls.length = 0;\n    },\n    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n      this._handleAutoScroll(evt, true);\n    },\n    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n      var _this = this;\n      var x = (evt.touches ? evt.touches[0] : evt).clientX,\n        y = (evt.touches ? evt.touches[0] : evt).clientY,\n        elem = document.elementFromPoint(x, y);\n      touchEvt$1 = evt;\n\n      // IE does not seem to have native autoscroll,\n      // Edge's autoscroll seems too conditional,\n      // MACOS Safari does not have autoscroll,\n      // Firefox and Chrome are good\n      if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n        autoScroll(evt, this.options, elem, fallback);\n\n        // Listener for pointer element change\n        var ogElemScroller = getParentAutoScrollElement(elem, true);\n        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n          pointerElemChangedInterval && clearPointerElemChangedInterval();\n          // Detect for pointer elem change, emulating native DnD behaviour\n          pointerElemChangedInterval = setInterval(function () {\n            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n            if (newElem !== ogElemScroller) {\n              ogElemScroller = newElem;\n              clearAutoScrolls();\n            }\n            autoScroll(evt, _this.options, newElem, fallback);\n          }, 10);\n          lastAutoScrollX = x;\n          lastAutoScrollY = y;\n        }\n      } else {\n        // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n          clearAutoScrolls();\n          return;\n        }\n        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n      }\n    }\n  };\n  return _extends(AutoScroll, {\n    pluginName: 'scroll',\n    initializeByDefault: true\n  });\n}\nfunction clearAutoScrolls() {\n  autoScrolls.forEach(function (autoScroll) {\n    clearInterval(autoScroll.pid);\n  });\n  autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n  clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n  if (!options.scroll) return;\n  var x = (evt.touches ? evt.touches[0] : evt).clientX,\n    y = (evt.touches ? evt.touches[0] : evt).clientY,\n    sens = options.scrollSensitivity,\n    speed = options.scrollSpeed,\n    winScroller = getWindowScrollingElement();\n  var scrollThisInstance = false,\n    scrollCustomFn;\n\n  // New scroll root, set scrollEl\n  if (scrollRootEl !== rootEl) {\n    scrollRootEl = rootEl;\n    clearAutoScrolls();\n    scrollEl = options.scroll;\n    scrollCustomFn = options.scrollFn;\n    if (scrollEl === true) {\n      scrollEl = getParentAutoScrollElement(rootEl, true);\n    }\n  }\n  var layersOut = 0;\n  var currentParent = scrollEl;\n  do {\n    var el = currentParent,\n      rect = getRect(el),\n      top = rect.top,\n      bottom = rect.bottom,\n      left = rect.left,\n      right = rect.right,\n      width = rect.width,\n      height = rect.height,\n      canScrollX = void 0,\n      canScrollY = void 0,\n      scrollWidth = el.scrollWidth,\n      scrollHeight = el.scrollHeight,\n      elCSS = css(el),\n      scrollPosX = el.scrollLeft,\n      scrollPosY = el.scrollTop;\n    if (el === winScroller) {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n    } else {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n    }\n    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n    if (!autoScrolls[layersOut]) {\n      for (var i = 0; i <= layersOut; i++) {\n        if (!autoScrolls[i]) {\n          autoScrolls[i] = {};\n        }\n      }\n    }\n    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n      autoScrolls[layersOut].el = el;\n      autoScrolls[layersOut].vx = vx;\n      autoScrolls[layersOut].vy = vy;\n      clearInterval(autoScrolls[layersOut].pid);\n      if (vx != 0 || vy != 0) {\n        scrollThisInstance = true;\n        /* jshint loopfunc:true */\n        autoScrolls[layersOut].pid = setInterval(function () {\n          // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n          if (isFallback && this.layer === 0) {\n            Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n          }\n          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n          if (typeof scrollCustomFn === 'function') {\n            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n              return;\n            }\n          }\n          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n        }.bind({\n          layer: layersOut\n        }), 24);\n      }\n    }\n    layersOut++;\n  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n  scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n  var originalEvent = _ref.originalEvent,\n    putSortable = _ref.putSortable,\n    dragEl = _ref.dragEl,\n    activeSortable = _ref.activeSortable,\n    dispatchSortableEvent = _ref.dispatchSortableEvent,\n    hideGhostForTarget = _ref.hideGhostForTarget,\n    unhideGhostForTarget = _ref.unhideGhostForTarget;\n  if (!originalEvent) return;\n  var toSortable = putSortable || activeSortable;\n  hideGhostForTarget();\n  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n  var target = document.elementFromPoint(touch.clientX, touch.clientY);\n  unhideGhostForTarget();\n  if (toSortable && !toSortable.el.contains(target)) {\n    dispatchSortableEvent('spill');\n    this.onSpill({\n      dragEl: dragEl,\n      putSortable: putSortable\n    });\n  }\n};\nfunction Revert() {}\nRevert.prototype = {\n  startIndex: null,\n  dragStart: function dragStart(_ref2) {\n    var oldDraggableIndex = _ref2.oldDraggableIndex;\n    this.startIndex = oldDraggableIndex;\n  },\n  onSpill: function onSpill(_ref3) {\n    var dragEl = _ref3.dragEl,\n      putSortable = _ref3.putSortable;\n    this.sortable.captureAnimationState();\n    if (putSortable) {\n      putSortable.captureAnimationState();\n    }\n    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n    if (nextSibling) {\n      this.sortable.el.insertBefore(dragEl, nextSibling);\n    } else {\n      this.sortable.el.appendChild(dragEl);\n    }\n    this.sortable.animateAll();\n    if (putSortable) {\n      putSortable.animateAll();\n    }\n  },\n  drop: drop\n};\n_extends(Revert, {\n  pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n  onSpill: function onSpill(_ref4) {\n    var dragEl = _ref4.dragEl,\n      putSortable = _ref4.putSortable;\n    var parentSortable = putSortable || this.sortable;\n    parentSortable.captureAnimationState();\n    dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n    parentSortable.animateAll();\n  },\n  drop: drop\n};\n_extends(Remove, {\n  pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n  function Swap() {\n    this.defaults = {\n      swapClass: 'sortable-swap-highlight'\n    };\n  }\n  Swap.prototype = {\n    dragStart: function dragStart(_ref) {\n      var dragEl = _ref.dragEl;\n      lastSwapEl = dragEl;\n    },\n    dragOverValid: function dragOverValid(_ref2) {\n      var completed = _ref2.completed,\n        target = _ref2.target,\n        onMove = _ref2.onMove,\n        activeSortable = _ref2.activeSortable,\n        changed = _ref2.changed,\n        cancel = _ref2.cancel;\n      if (!activeSortable.options.swap) return;\n      var el = this.sortable.el,\n        options = this.options;\n      if (target && target !== el) {\n        var prevSwapEl = lastSwapEl;\n        if (onMove(target) !== false) {\n          toggleClass(target, options.swapClass, true);\n          lastSwapEl = target;\n        } else {\n          lastSwapEl = null;\n        }\n        if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n          toggleClass(prevSwapEl, options.swapClass, false);\n        }\n      }\n      changed();\n      completed(true);\n      cancel();\n    },\n    drop: function drop(_ref3) {\n      var activeSortable = _ref3.activeSortable,\n        putSortable = _ref3.putSortable,\n        dragEl = _ref3.dragEl;\n      var toSortable = putSortable || this.sortable;\n      var options = this.options;\n      lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n      if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n        if (dragEl !== lastSwapEl) {\n          toSortable.captureAnimationState();\n          if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n          swapNodes(dragEl, lastSwapEl);\n          toSortable.animateAll();\n          if (toSortable !== activeSortable) activeSortable.animateAll();\n        }\n      }\n    },\n    nulling: function nulling() {\n      lastSwapEl = null;\n    }\n  };\n  return _extends(Swap, {\n    pluginName: 'swap',\n    eventProperties: function eventProperties() {\n      return {\n        swapItem: lastSwapEl\n      };\n    }\n  });\n}\nfunction swapNodes(n1, n2) {\n  var p1 = n1.parentNode,\n    p2 = n2.parentNode,\n    i1,\n    i2;\n  if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n  i1 = index(n1);\n  i2 = index(n2);\n  if (p1.isEqualNode(p2) && i1 < i2) {\n    i2++;\n  }\n  p1.insertBefore(n2, p1.children[i1]);\n  p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n  multiDragClones = [],\n  lastMultiDragSelect,\n  // for selection with modifier key down (SHIFT)\n  multiDragSortable,\n  initialFolding = false,\n  // Initial multi-drag fold when drag started\n  folding = false,\n  // Folding any other time\n  dragStarted = false,\n  dragEl$1,\n  clonesFromRect,\n  clonesHidden;\nfunction MultiDragPlugin() {\n  function MultiDrag(sortable) {\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n    if (!sortable.options.avoidImplicitDeselect) {\n      if (sortable.options.supportPointer) {\n        on(document, 'pointerup', this._deselectMultiDrag);\n      } else {\n        on(document, 'mouseup', this._deselectMultiDrag);\n        on(document, 'touchend', this._deselectMultiDrag);\n      }\n    }\n    on(document, 'keydown', this._checkKeyDown);\n    on(document, 'keyup', this._checkKeyUp);\n    this.defaults = {\n      selectedClass: 'sortable-selected',\n      multiDragKey: null,\n      avoidImplicitDeselect: false,\n      setData: function setData(dataTransfer, dragEl) {\n        var data = '';\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          multiDragElements.forEach(function (multiDragElement, i) {\n            data += (!i ? '' : ', ') + multiDragElement.textContent;\n          });\n        } else {\n          data = dragEl.textContent;\n        }\n        dataTransfer.setData('Text', data);\n      }\n    };\n  }\n  MultiDrag.prototype = {\n    multiDragKeyDown: false,\n    isMultiDrag: false,\n    delayStartGlobal: function delayStartGlobal(_ref) {\n      var dragged = _ref.dragEl;\n      dragEl$1 = dragged;\n    },\n    delayEnded: function delayEnded() {\n      this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n    },\n    setupClone: function setupClone(_ref2) {\n      var sortable = _ref2.sortable,\n        cancel = _ref2.cancel;\n      if (!this.isMultiDrag) return;\n      for (var i = 0; i < multiDragElements.length; i++) {\n        multiDragClones.push(clone(multiDragElements[i]));\n        multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n        multiDragClones[i].draggable = false;\n        multiDragClones[i].style['will-change'] = '';\n        toggleClass(multiDragClones[i], this.options.selectedClass, false);\n        multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n      }\n      sortable._hideClone();\n      cancel();\n    },\n    clone: function clone(_ref3) {\n      var sortable = _ref3.sortable,\n        rootEl = _ref3.rootEl,\n        dispatchSortableEvent = _ref3.dispatchSortableEvent,\n        cancel = _ref3.cancel;\n      if (!this.isMultiDrag) return;\n      if (!this.options.removeCloneOnHide) {\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          insertMultiDragClones(true, rootEl);\n          dispatchSortableEvent('clone');\n          cancel();\n        }\n      }\n    },\n    showClone: function showClone(_ref4) {\n      var cloneNowShown = _ref4.cloneNowShown,\n        rootEl = _ref4.rootEl,\n        cancel = _ref4.cancel;\n      if (!this.isMultiDrag) return;\n      insertMultiDragClones(false, rootEl);\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', '');\n      });\n      cloneNowShown();\n      clonesHidden = false;\n      cancel();\n    },\n    hideClone: function hideClone(_ref5) {\n      var _this = this;\n      var sortable = _ref5.sortable,\n        cloneNowHidden = _ref5.cloneNowHidden,\n        cancel = _ref5.cancel;\n      if (!this.isMultiDrag) return;\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', 'none');\n        if (_this.options.removeCloneOnHide && clone.parentNode) {\n          clone.parentNode.removeChild(clone);\n        }\n      });\n      cloneNowHidden();\n      clonesHidden = true;\n      cancel();\n    },\n    dragStartGlobal: function dragStartGlobal(_ref6) {\n      var sortable = _ref6.sortable;\n      if (!this.isMultiDrag && multiDragSortable) {\n        multiDragSortable.multiDrag._deselectMultiDrag();\n      }\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.sortableIndex = index(multiDragElement);\n      });\n\n      // Sort multi-drag elements\n      multiDragElements = multiDragElements.sort(function (a, b) {\n        return a.sortableIndex - b.sortableIndex;\n      });\n      dragStarted = true;\n    },\n    dragStarted: function dragStarted(_ref7) {\n      var _this2 = this;\n      var sortable = _ref7.sortable;\n      if (!this.isMultiDrag) return;\n      if (this.options.sort) {\n        // Capture rects,\n        // hide multi drag elements (by positioning them absolute),\n        // set multi drag elements rects to dragRect,\n        // show multi drag elements,\n        // animate to rects,\n        // unset rects & remove from DOM\n\n        sortable.captureAnimationState();\n        if (this.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            css(multiDragElement, 'position', 'absolute');\n          });\n          var dragRect = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRect);\n          });\n          folding = true;\n          initialFolding = true;\n        }\n      }\n      sortable.animateAll(function () {\n        folding = false;\n        initialFolding = false;\n        if (_this2.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n        }\n\n        // Remove all auxiliary multidrag items from el, if sorting enabled\n        if (_this2.options.sort) {\n          removeMultiDragElements();\n        }\n      });\n    },\n    dragOver: function dragOver(_ref8) {\n      var target = _ref8.target,\n        completed = _ref8.completed,\n        cancel = _ref8.cancel;\n      if (folding && ~multiDragElements.indexOf(target)) {\n        completed(false);\n        cancel();\n      }\n    },\n    revert: function revert(_ref9) {\n      var fromSortable = _ref9.fromSortable,\n        rootEl = _ref9.rootEl,\n        sortable = _ref9.sortable,\n        dragRect = _ref9.dragRect;\n      if (multiDragElements.length > 1) {\n        // Setup unfold animation\n        multiDragElements.forEach(function (multiDragElement) {\n          sortable.addAnimationState({\n            target: multiDragElement,\n            rect: folding ? getRect(multiDragElement) : dragRect\n          });\n          unsetRect(multiDragElement);\n          multiDragElement.fromRect = dragRect;\n          fromSortable.removeAnimationState(multiDragElement);\n        });\n        folding = false;\n        insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref10) {\n      var sortable = _ref10.sortable,\n        isOwner = _ref10.isOwner,\n        insertion = _ref10.insertion,\n        activeSortable = _ref10.activeSortable,\n        parentEl = _ref10.parentEl,\n        putSortable = _ref10.putSortable;\n      var options = this.options;\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        }\n        initialFolding = false;\n        // If leaving sort:false root, or already folding - Fold to new location\n        if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n          // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n          var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRectAbsolute);\n\n            // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n            // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n            parentEl.appendChild(multiDragElement);\n          });\n          folding = true;\n        }\n\n        // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n        if (!isOwner) {\n          // Only remove if not folding (folding will remove them anyways)\n          if (!folding) {\n            removeMultiDragElements();\n          }\n          if (multiDragElements.length > 1) {\n            var clonesHiddenBefore = clonesHidden;\n            activeSortable._showClone(sortable);\n\n            // Unfold animation for clones if showing from hidden\n            if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n              multiDragClones.forEach(function (clone) {\n                activeSortable.addAnimationState({\n                  target: clone,\n                  rect: clonesFromRect\n                });\n                clone.fromRect = clonesFromRect;\n                clone.thisAnimationDuration = null;\n              });\n            }\n          } else {\n            activeSortable._showClone(sortable);\n          }\n        }\n      }\n    },\n    dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n      var dragRect = _ref11.dragRect,\n        isOwner = _ref11.isOwner,\n        activeSortable = _ref11.activeSortable;\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.thisAnimationDuration = null;\n      });\n      if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n        clonesFromRect = _extends({}, dragRect);\n        var dragMatrix = matrix(dragEl$1, true);\n        clonesFromRect.top -= dragMatrix.f;\n        clonesFromRect.left -= dragMatrix.e;\n      }\n    },\n    dragOverAnimationComplete: function dragOverAnimationComplete() {\n      if (folding) {\n        folding = false;\n        removeMultiDragElements();\n      }\n    },\n    drop: function drop(_ref12) {\n      var evt = _ref12.originalEvent,\n        rootEl = _ref12.rootEl,\n        parentEl = _ref12.parentEl,\n        sortable = _ref12.sortable,\n        dispatchSortableEvent = _ref12.dispatchSortableEvent,\n        oldIndex = _ref12.oldIndex,\n        putSortable = _ref12.putSortable;\n      var toSortable = putSortable || this.sortable;\n      if (!evt) return;\n      var options = this.options,\n        children = parentEl.children;\n\n      // Multi-drag selection\n      if (!dragStarted) {\n        if (options.multiDragKey && !this.multiDragKeyDown) {\n          this._deselectMultiDrag();\n        }\n        toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n        if (!~multiDragElements.indexOf(dragEl$1)) {\n          multiDragElements.push(dragEl$1);\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'select',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n\n          // Modifier activated, select from last to dragEl\n          if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n            var lastIndex = index(lastMultiDragSelect),\n              currentIndex = index(dragEl$1);\n            if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n              (function () {\n                // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n                // (but previous selection existed)\n                var n, i;\n                if (currentIndex > lastIndex) {\n                  i = lastIndex;\n                  n = currentIndex;\n                } else {\n                  i = currentIndex;\n                  n = lastIndex + 1;\n                }\n                var filter = options.filter;\n                for (; i < n; i++) {\n                  if (~multiDragElements.indexOf(children[i])) continue;\n                  // Check if element is draggable\n                  if (!closest(children[i], options.draggable, parentEl, false)) continue;\n                  // Check if element is filtered\n                  var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {\n                    return closest(children[i], criteria.trim(), parentEl, false);\n                  }));\n                  if (filtered) continue;\n                  toggleClass(children[i], options.selectedClass, true);\n                  multiDragElements.push(children[i]);\n                  dispatchEvent({\n                    sortable: sortable,\n                    rootEl: rootEl,\n                    name: 'select',\n                    targetEl: children[i],\n                    originalEvent: evt\n                  });\n                }\n              })();\n            }\n          } else {\n            lastMultiDragSelect = dragEl$1;\n          }\n          multiDragSortable = toSortable;\n        } else {\n          multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n          lastMultiDragSelect = null;\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'deselect',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n        }\n      }\n\n      // Multi-drag drop\n      if (dragStarted && this.isMultiDrag) {\n        folding = false;\n        // Do not \"unfold\" after around dragEl if reverted\n        if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n          var dragRect = getRect(dragEl$1),\n            multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n          if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n          toSortable.captureAnimationState();\n          if (!initialFolding) {\n            if (options.animation) {\n              dragEl$1.fromRect = dragRect;\n              multiDragElements.forEach(function (multiDragElement) {\n                multiDragElement.thisAnimationDuration = null;\n                if (multiDragElement !== dragEl$1) {\n                  var rect = folding ? getRect(multiDragElement) : dragRect;\n                  multiDragElement.fromRect = rect;\n\n                  // Prepare unfold animation\n                  toSortable.addAnimationState({\n                    target: multiDragElement,\n                    rect: rect\n                  });\n                }\n              });\n            }\n\n            // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n            // properly they must all be removed\n            removeMultiDragElements();\n            multiDragElements.forEach(function (multiDragElement) {\n              if (children[multiDragIndex]) {\n                parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n              } else {\n                parentEl.appendChild(multiDragElement);\n              }\n              multiDragIndex++;\n            });\n\n            // If initial folding is done, the elements may have changed position because they are now\n            // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n            // must be fired here as Sortable will not.\n            if (oldIndex === index(dragEl$1)) {\n              var update = false;\n              multiDragElements.forEach(function (multiDragElement) {\n                if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n                  update = true;\n                  return;\n                }\n              });\n              if (update) {\n                dispatchSortableEvent('update');\n                dispatchSortableEvent('sort');\n              }\n            }\n          }\n\n          // Must be done after capturing individual rects (scroll bar)\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n          toSortable.animateAll();\n        }\n        multiDragSortable = toSortable;\n      }\n\n      // Remove clones if necessary\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        multiDragClones.forEach(function (clone) {\n          clone.parentNode && clone.parentNode.removeChild(clone);\n        });\n      }\n    },\n    nullingGlobal: function nullingGlobal() {\n      this.isMultiDrag = dragStarted = false;\n      multiDragClones.length = 0;\n    },\n    destroyGlobal: function destroyGlobal() {\n      this._deselectMultiDrag();\n      off(document, 'pointerup', this._deselectMultiDrag);\n      off(document, 'mouseup', this._deselectMultiDrag);\n      off(document, 'touchend', this._deselectMultiDrag);\n      off(document, 'keydown', this._checkKeyDown);\n      off(document, 'keyup', this._checkKeyUp);\n    },\n    _deselectMultiDrag: function _deselectMultiDrag(evt) {\n      if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n      // Only deselect if selection is in this sortable\n      if (multiDragSortable !== this.sortable) return;\n\n      // Only deselect if target is not item in this sortable\n      if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n      // Only deselect if left click\n      if (evt && evt.button !== 0) return;\n      while (multiDragElements.length) {\n        var el = multiDragElements[0];\n        toggleClass(el, this.options.selectedClass, false);\n        multiDragElements.shift();\n        dispatchEvent({\n          sortable: this.sortable,\n          rootEl: this.sortable.el,\n          name: 'deselect',\n          targetEl: el,\n          originalEvent: evt\n        });\n      }\n    },\n    _checkKeyDown: function _checkKeyDown(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = true;\n      }\n    },\n    _checkKeyUp: function _checkKeyUp(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = false;\n      }\n    }\n  };\n  return _extends(MultiDrag, {\n    // Static methods & properties\n    pluginName: 'multiDrag',\n    utils: {\n      /**\r\n       * Selects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be selected\r\n       */\n      select: function select(el) {\n        var sortable = el.parentNode[expando];\n        if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n        if (multiDragSortable && multiDragSortable !== sortable) {\n          multiDragSortable.multiDrag._deselectMultiDrag();\n          multiDragSortable = sortable;\n        }\n        toggleClass(el, sortable.options.selectedClass, true);\n        multiDragElements.push(el);\n      },\n      /**\r\n       * Deselects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be deselected\r\n       */\n      deselect: function deselect(el) {\n        var sortable = el.parentNode[expando],\n          index = multiDragElements.indexOf(el);\n        if (!sortable || !sortable.options.multiDrag || !~index) return;\n        toggleClass(el, sortable.options.selectedClass, false);\n        multiDragElements.splice(index, 1);\n      }\n    },\n    eventProperties: function eventProperties() {\n      var _this3 = this;\n      var oldIndicies = [],\n        newIndicies = [];\n      multiDragElements.forEach(function (multiDragElement) {\n        oldIndicies.push({\n          multiDragElement: multiDragElement,\n          index: multiDragElement.sortableIndex\n        });\n\n        // multiDragElements will already be sorted if folding\n        var newIndex;\n        if (folding && multiDragElement !== dragEl$1) {\n          newIndex = -1;\n        } else if (folding) {\n          newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n        } else {\n          newIndex = index(multiDragElement);\n        }\n        newIndicies.push({\n          multiDragElement: multiDragElement,\n          index: newIndex\n        });\n      });\n      return {\n        items: _toConsumableArray(multiDragElements),\n        clones: [].concat(multiDragClones),\n        oldIndicies: oldIndicies,\n        newIndicies: newIndicies\n      };\n    },\n    optionListeners: {\n      multiDragKey: function multiDragKey(key) {\n        key = key.toLowerCase();\n        if (key === 'ctrl') {\n          key = 'Control';\n        } else if (key.length > 1) {\n          key = key.charAt(0).toUpperCase() + key.substr(1);\n        }\n        return key;\n      }\n    }\n  });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n  multiDragElements.forEach(function (multiDragElement, i) {\n    var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(multiDragElement, target);\n    } else {\n      rootEl.appendChild(multiDragElement);\n    }\n  });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param  {[Boolean]} elementsInserted  Whether the multi-drag elements are inserted\r\n * @param  {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n  multiDragClones.forEach(function (clone, i) {\n    var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n    if (target) {\n      rootEl.insertBefore(clone, target);\n    } else {\n      rootEl.appendChild(clone);\n    }\n  });\n}\nfunction removeMultiDragElements() {\n  multiDragElements.forEach(function (multiDragElement) {\n    if (multiDragElement === dragEl$1) return;\n    multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n  });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n", "import {Controller} from '@hotwired/stimulus'\nimport Sortable from 'sortablejs'\n\nexport default class extends Controller {\n    static values = {\n        handleClass: {type: String, default: 'handle'},\n        sortableGroup: String\n    }\n\n    initialize() {\n        this.onEnd = this.onEnd.bind(this)\n        this.onMove = this.onMove.bind(this)\n    }\n\n    connect() {\n        this._sortable = this._initSortable(this.element)\n    }\n\n    _initSortable(element) {\n        return Sortable.create(element, {\n            tutorizeSortable: true,\n            handle: `.${this.handleClassValue}`,\n            onEnd: this.onEnd,\n            onMove: this.onMove,\n            group: this.sortableGroupValue,\n            fallbackOnBody: true,\n            swapThreshold: 0.65,\n            emptyInsertThreshold: 5,\n            forceFallback: true\n        })\n    }\n\n    onEnd(event) {\n        this.element.dispatchEvent(new CustomEvent('dragDrop.onDrop', {bubbles: true}))\n\n        const draggedElement = event.item\n        const url = draggedElement.dataset.moveUrl\n        if (!url) return\n\n        let data = new FormData()\n        const target = event.to\n        const position = event.newIndex.toString()\n        data.append('move[new_position]', position)\n        if (draggedElement.dataset.id) data.append('move[id]', draggedElement.dataset.id)\n        if (target.dataset.parentId) data.append('move[new_parent_id]', target.dataset.parentId)\n\n        Rails.ajax({\n            type: 'PATCH', url, data, error: (_response, _statusText, _xhr) => {\n                this._revert(draggedElement, event.oldIndex)\n            }\n        })\n    }\n\n    onMove(event) {\n        if (event.dragged.getAttribute('data-not-nestable') === 'true') {\n            return !!event.to.getAttribute('data-sortable-root-container')\n        }\n        return true\n    }\n\n    _revert(el, oldIndex) {\n        let nextSibling = Sortable.utils.getChild(this._sortable.el, oldIndex, {}, false)\n\n        if (nextSibling) {\n            this._sortable.el.insertBefore(el, nextSibling)\n        } else {\n            this._sortable.el.appendChild(el)\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {Dropdown} from 'bootstrap'\n\nexport default class extends Controller {\n    connect() {\n        new Dropdown(this.element, {\n            boundary: document.body,\n            reference: 'toggle',\n            popperConfig(defaultBsPopperConfig) {\n                return {...defaultBsPopperConfig, strategy: 'fixed'}\n            }\n        })\n    }\n}\n", "//#region src/compat/predicate/isArray.ts\n/**\n* Checks if the given value is an array.\n*\n* This function tests whether the provided value is an array or not.\n* It returns `true` if the value is an array, and `false` otherwise.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an array.\n*\n* @param value - The value to test if it is an array.\n* @returns `true` if the value is an array, `false` otherwise.\n*\n* @example\n* const value1 = [1, 2, 3];\n* const value2 = 'abc';\n* const value3 = () => {};\n*\n* console.log(isArray(value1)); // true\n* console.log(isArray(value2)); // false\n* console.log(isArray(value3)); // false\n*/\nfunction isArray(value) {\n\treturn Array.isArray(value);\n}\n//#endregion\nexport { isArray };\n", "//#region src/compat/predicate/isPlainObject.ts\n/**\n* Checks if a given value is a plain object.\n*\n* A plain object is an object created by the `{}` literal, `new Object()`, or\n* `Object.create(null)`.\n*\n* This function also handles objects with custom\n* `Symbol.toStringTag` properties.\n*\n* `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the\n* default string description of objects.\n*\n* @param [object] - The value to check.\n* @returns True if the value is a plain object, otherwise false.\n*\n* @example\n* console.log(isPlainObject({})); // true\n* console.log(isPlainObject([])); // false\n* console.log(isPlainObject(null)); // false\n* console.log(isPlainObject(Object.create(null))); // true\n* console.log(isPlainObject(new Map())); // false\n*/\nfunction isPlainObject(object) {\n\tif (typeof object !== \"object\") return false;\n\tif (object == null) return false;\n\tif (Object.getPrototypeOf(object) === null) return true;\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") {\n\t\tconst tag = object[Symbol.toStringTag];\n\t\tif (tag == null) return false;\n\t\tif (!Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable) return false;\n\t\treturn object.toString() === `[object ${tag}]`;\n\t}\n\tlet proto = object;\n\twhile (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);\n\treturn Object.getPrototypeOf(object) === proto;\n}\n//#endregion\nexport { isPlainObject };\n", "//#region src/compat/util/eq.ts\n/**\n* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.\n*\n* @param value The value to compare.\n* @param other The other value to compare.\n* @returns Returns `true` if the values are equivalent, else `false`.\n*\n* @example\n* eq(1, 1); // true\n* eq(0, -0); // true\n* eq(NaN, NaN); // true\n* eq('a', Object('a')); // false\n*/\nfunction eq(value, other) {\n\treturn value === other || Number.isNaN(value) && Number.isNaN(other);\n}\n//#endregion\nexport { eq };\n", "//#region src/function/noop.ts\n/**\n* A no-operation function that does nothing.\n* This can be used as a placeholder or default function.\n*\n* @example\n* noop(); // Does nothing\n*\n* @returns This function does not return anything.\n*/\nfunction noop() {}\n//#endregion\nexport { noop };\n", "//#region src/compat/_internal/getSymbols.ts\nfunction getSymbols(object) {\n\treturn Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));\n}\n//#endregion\nexport { getSymbols };\n", "//#region src/compat/_internal/getTag.ts\n/**\n* Gets the `toStringTag` of `value`.\n*\n* @private\n* @param {T} value The value to query.\n* @returns {string} Returns the `Object.prototype.toString.call` result.\n*/\nfunction getTag(value) {\n\tif (value == null) return value === void 0 ? \"[object Undefined]\" : \"[object Null]\";\n\treturn Object.prototype.toString.call(value);\n}\n//#endregion\nexport { getTag };\n", "//#region src/compat/_internal/tags.ts\nconst regexpTag = \"[object RegExp]\";\nconst stringTag = \"[object String]\";\nconst numberTag = \"[object Number]\";\nconst booleanTag = \"[object Boolean]\";\nconst argumentsTag = \"[object Arguments]\";\nconst symbolTag = \"[object Symbol]\";\nconst dateTag = \"[object Date]\";\nconst mapTag = \"[object Map]\";\nconst setTag = \"[object Set]\";\nconst arrayTag = \"[object Array]\";\nconst functionTag = \"[object Function]\";\nconst arrayBufferTag = \"[object ArrayBuffer]\";\nconst objectTag = \"[object Object]\";\nconst errorTag = \"[object Error]\";\nconst dataViewTag = \"[object DataView]\";\nconst uint8ArrayTag = \"[object Uint8Array]\";\nconst uint8ClampedArrayTag = \"[object Uint8ClampedArray]\";\nconst uint16ArrayTag = \"[object Uint16Array]\";\nconst uint32ArrayTag = \"[object Uint32Array]\";\nconst bigUint64ArrayTag = \"[object BigUint64Array]\";\nconst int8ArrayTag = \"[object Int8Array]\";\nconst int16ArrayTag = \"[object Int16Array]\";\nconst int32ArrayTag = \"[object Int32Array]\";\nconst bigInt64ArrayTag = \"[object BigInt64Array]\";\nconst float32ArrayTag = \"[object Float32Array]\";\nconst float64ArrayTag = \"[object Float64Array]\";\n//#endregion\nexport { argumentsTag, arrayBufferTag, arrayTag, bigInt64ArrayTag, bigUint64ArrayTag, booleanTag, dataViewTag, dateTag, errorTag, float32ArrayTag, float64ArrayTag, functionTag, int16ArrayTag, int32ArrayTag, int8ArrayTag, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, symbolTag, uint16ArrayTag, uint32ArrayTag, uint8ArrayTag, uint8ClampedArrayTag };\n", "//#region src/_internal/globalThis.ts\nconst globalThis_ = typeof globalThis === \"object\" && globalThis || typeof window === \"object\" && window || typeof self === \"object\" && self || typeof global === \"object\" && global || (function() {\n\treturn this;\n})();\n//#endregion\nexport { globalThis_ };\n", "import { globalThis_ } from \"../_internal/globalThis.mjs\";\n//#region src/predicate/isBuffer.ts\n/**\n* Checks if the given value is a Buffer instance.\n*\n* This function tests whether the provided value is an instance of Buffer.\n* It returns `true` if the value is a Buffer, and `false` otherwise.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.\n*\n* @param x - The value to check if it is a Buffer.\n* @returns Returns `true` if `x` is a Buffer, else `false`.\n*\n* @example\n* const buffer = Buffer.from(\"test\");\n* console.log(isBuffer(buffer)); // true\n*\n* const notBuffer = \"not a buffer\";\n* console.log(isBuffer(notBuffer)); // false\n*/\nfunction isBuffer(x) {\n\treturn typeof globalThis_.Buffer !== \"undefined\" && globalThis_.Buffer.isBuffer(x);\n}\n//#endregion\nexport { isBuffer };\n", "//#region src/predicate/isPlainObject.ts\n/**\n* Checks if a given value is a plain object.\n*\n* @param value - The value to check.\n* @returns True if the value is a plain object, otherwise false.\n*\n* @example\n* ```typescript\n* // \u2705\uD83D\uDC47 True\n*\n* isPlainObject({ });                       // \u2705\n* isPlainObject({ key: 'value' });          // \u2705\n* isPlainObject({ key: new Date() });       // \u2705\n* isPlainObject(new Object());              // \u2705\n* isPlainObject(Object.create(null));       // \u2705\n* isPlainObject({ nested: { key: true} });  // \u2705\n* isPlainObject(new Proxy({}, {}));         // \u2705\n* isPlainObject({ [Symbol('tag')]: 'A' });  // \u2705\n*\n* // \u2705\uD83D\uDC47 (cross-realms, node context, workers, ...)\n* const runInNewContext = await import('node:vm').then(\n*     (mod) => mod.runInNewContext\n* );\n* isPlainObject(runInNewContext('({})'));   // \u2705\n*\n* // \u274C\uD83D\uDC47 False\n*\n* class Test { };\n* isPlainObject(new Test())           // \u274C\n* isPlainObject(10);                  // \u274C\n* isPlainObject(null);                // \u274C\n* isPlainObject('hello');             // \u274C\n* isPlainObject([]);                  // \u274C\n* isPlainObject(new Date());          // \u274C\n* isPlainObject(new Uint8Array([1])); // \u274C\n* isPlainObject(Buffer.from('ABC'));  // \u274C\n* isPlainObject(Promise.resolve({})); // \u274C\n* isPlainObject(Object.create({}));   // \u274C\n* isPlainObject(new (class Cls {}));  // \u274C\n* isPlainObject(globalThis);          // \u274C,\n* ```\n*/\nfunction isPlainObject(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst proto = Object.getPrototypeOf(value);\n\tif (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;\n\treturn Object.prototype.toString.call(value) === \"[object Object]\";\n}\n//#endregion\nexport { isPlainObject };\n", "import { getSymbols } from \"../compat/_internal/getSymbols.mjs\";\nimport { getTag } from \"../compat/_internal/getTag.mjs\";\nimport { arrayBufferTag, arrayTag, bigInt64ArrayTag, bigUint64ArrayTag, booleanTag, dataViewTag, dateTag, errorTag, float32ArrayTag, float64ArrayTag, functionTag, int16ArrayTag, int32ArrayTag, int8ArrayTag, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, symbolTag, uint16ArrayTag, uint32ArrayTag, uint8ArrayTag, uint8ClampedArrayTag } from \"../compat/_internal/tags.mjs\";\nimport { isBuffer } from \"./isBuffer.mjs\";\nimport { isPlainObject } from \"./isPlainObject.mjs\";\nimport { eq } from \"../compat/util/eq.mjs\";\n//#region src/predicate/isEqualWith.ts\n/**\n* Compares two values for equality using a custom comparison function.\n*\n* The custom function allows for fine-tuned control over the comparison process. If it returns a boolean, that result determines the equality. If it returns undefined, the function falls back to the default equality comparison.\n*\n* This function also uses the custom equality function to compare values inside objects,\n* arrays, maps, sets, and other complex structures, ensuring a deep comparison.\n*\n* This approach provides flexibility in handling complex comparisons while maintaining efficient default behavior for simpler cases.\n*\n* The custom comparison function can take up to six parameters:\n* - `x`: The value from the first object `a`.\n* - `y`: The value from the second object `b`.\n* - `property`: The property key used to get `x` and `y`.\n* - `xParent`: The parent of the first value `x`.\n* - `yParent`: The parent of the second value `y`.\n* - `stack`: An internal stack (Map) to handle circular references.\n*\n* @param a - The first value to compare.\n* @param b - The second value to compare.\n* @param areValuesEqual - A function to customize the comparison.\n*   If it returns a boolean, that result will be used. If it returns undefined,\n*   the default equality comparison will be used.\n* @returns `true` if the values are equal according to the customizer, otherwise `false`.\n*\n* @example\n* const customizer = (a, b) => {\n*   if (typeof a === 'string' && typeof b === 'string') {\n*     return a.toLowerCase() === b.toLowerCase();\n*   }\n* };\n* isEqualWith('Hello', 'hello', customizer); // true\n* isEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n* isEqualWith([1, 2, 3], [1, 2, 3], customizer); // true\n*/\nfunction isEqualWith(a, b, areValuesEqual) {\n\treturn isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);\n}\nfunction isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {\n\tconst result = areValuesEqual(a, b, property, aParent, bParent, stack);\n\tif (result !== void 0) return result;\n\tif (typeof a === typeof b) switch (typeof a) {\n\t\tcase \"bigint\":\n\t\tcase \"string\":\n\t\tcase \"boolean\":\n\t\tcase \"symbol\":\n\t\tcase \"undefined\": return a === b;\n\t\tcase \"number\": return a === b || Object.is(a, b);\n\t\tcase \"function\": return a === b;\n\t\tcase \"object\": return areObjectsEqual(a, b, stack, areValuesEqual);\n\t}\n\treturn areObjectsEqual(a, b, stack, areValuesEqual);\n}\nfunction areObjectsEqual(a, b, stack, areValuesEqual) {\n\tif (Object.is(a, b)) return true;\n\tlet aTag = getTag(a);\n\tlet bTag = getTag(b);\n\tif (aTag === \"[object Arguments]\") aTag = objectTag;\n\tif (bTag === \"[object Arguments]\") bTag = objectTag;\n\tif (aTag !== bTag) return false;\n\tswitch (aTag) {\n\t\tcase stringTag: return a.toString() === b.toString();\n\t\tcase numberTag: return eq(a.valueOf(), b.valueOf());\n\t\tcase booleanTag:\n\t\tcase dateTag:\n\t\tcase symbolTag: return Object.is(a.valueOf(), b.valueOf());\n\t\tcase regexpTag: return a.source === b.source && a.flags === b.flags;\n\t\tcase functionTag: return a === b;\n\t}\n\tstack = stack ?? /* @__PURE__ */ new Map();\n\tconst aStack = stack.get(a);\n\tconst bStack = stack.get(b);\n\tif (aStack != null && bStack != null) return aStack === b;\n\tstack.set(a, b);\n\tstack.set(b, a);\n\ttry {\n\t\tswitch (aTag) {\n\t\t\tcase mapTag:\n\t\t\t\tif (a.size !== b.size) return false;\n\t\t\t\tfor (const [key, value] of a.entries()) if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) return false;\n\t\t\t\treturn true;\n\t\t\tcase setTag: {\n\t\t\t\tif (a.size !== b.size) return false;\n\t\t\t\tconst aValues = Array.from(a.values());\n\t\t\t\tconst bValues = Array.from(b.values());\n\t\t\t\tfor (let i = 0; i < aValues.length; i++) {\n\t\t\t\t\tconst aValue = aValues[i];\n\t\t\t\t\tconst index = bValues.findIndex((bValue) => {\n\t\t\t\t\t\treturn isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual);\n\t\t\t\t\t});\n\t\t\t\t\tif (index === -1) return false;\n\t\t\t\t\tbValues.splice(index, 1);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcase arrayTag:\n\t\t\tcase uint8ArrayTag:\n\t\t\tcase uint8ClampedArrayTag:\n\t\t\tcase uint16ArrayTag:\n\t\t\tcase uint32ArrayTag:\n\t\t\tcase bigUint64ArrayTag:\n\t\t\tcase int8ArrayTag:\n\t\t\tcase int16ArrayTag:\n\t\t\tcase int32ArrayTag:\n\t\t\tcase bigInt64ArrayTag:\n\t\t\tcase float32ArrayTag:\n\t\t\tcase float64ArrayTag:\n\t\t\t\tif (isBuffer(a) !== isBuffer(b)) return false;\n\t\t\t\tif (a.length !== b.length) return false;\n\t\t\t\tfor (let i = 0; i < a.length; i++) if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) return false;\n\t\t\t\treturn true;\n\t\t\tcase arrayBufferTag:\n\t\t\t\tif (a.byteLength !== b.byteLength) return false;\n\t\t\t\treturn areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);\n\t\t\tcase dataViewTag:\n\t\t\t\tif (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) return false;\n\t\t\t\treturn areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);\n\t\t\tcase errorTag: return a.name === b.name && a.message === b.message;\n\t\t\tcase objectTag: {\n\t\t\t\tif (!(areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a) && isPlainObject(b))) return false;\n\t\t\t\tconst aKeys = [...Object.keys(a), ...getSymbols(a)];\n\t\t\t\tconst bKeys = [...Object.keys(b), ...getSymbols(b)];\n\t\t\t\tif (aKeys.length !== bKeys.length) return false;\n\t\t\t\tfor (let i = 0; i < aKeys.length; i++) {\n\t\t\t\t\tconst propKey = aKeys[i];\n\t\t\t\t\tconst aProp = a[propKey];\n\t\t\t\t\tif (!Object.hasOwn(b, propKey)) return false;\n\t\t\t\t\tconst bProp = b[propKey];\n\t\t\t\t\tif (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdefault: return false;\n\t\t}\n\t} finally {\n\t\tstack.delete(a);\n\t\tstack.delete(b);\n\t}\n}\n//#endregion\nexport { isEqualWith };\n", "import { noop } from \"../function/noop.mjs\";\nimport { isEqualWith } from \"./isEqualWith.mjs\";\n//#region src/predicate/isEqual.ts\n/**\n* Checks if two values are equal, including support for `Date`, `RegExp`, and deep object comparison.\n*\n* @param a - The first value to compare.\n* @param b - The second value to compare.\n* @returns `true` if the values are equal, otherwise `false`.\n*\n* @example\n* isEqual(1, 1); // true\n* isEqual({ a: 1 }, { a: 1 }); // true\n* isEqual(/abc/g, /abc/g); // true\n* isEqual(new Date('2020-01-01'), new Date('2020-01-01')); // true\n* isEqual([1, 2, 3], [1, 2, 3]); // true\n*/\nfunction isEqual(a, b) {\n\treturn isEqualWith(a, b, noop);\n}\n//#endregion\nexport { isEqual };\n", "//#region src/predicate/isLength.ts\n/**\n* Checks if a given value is a valid length.\n*\n* A valid length is of type `number`, is a non-negative integer, and is less than or equal to\n* JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`).\n* It returns `true` if the value is a valid length, and `false` otherwise.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the\n* argument to a valid length (`number`).\n*\n* @param value The value to check.\n* @returns Returns `true` if `value` is a valid length, else `false`.\n*\n* @example\n* isLength(0); // true\n* isLength(42); // true\n* isLength(-1); // false\n* isLength(1.5); // false\n* isLength(Number.MAX_SAFE_INTEGER); // true\n* isLength(Number.MAX_SAFE_INTEGER + 1); // false\n*/\nfunction isLength(value) {\n\treturn Number.isSafeInteger(value) && value >= 0;\n}\n//#endregion\nexport { isLength };\n", "import { isLength } from \"../../predicate/isLength.mjs\";\n//#region src/compat/predicate/isArrayLike.ts\n/**\n* Checks if `value` is array-like.\n*\n* @param value The value to check.\n* @returns Returns `true` if `value` is array-like, else `false`.\n*\n* @example\n* isArrayLike([1, 2, 3]); // true\n* isArrayLike('abc'); // true\n* isArrayLike({ 0: 'a', length: 1 }); // true\n* isArrayLike({}); // false\n* isArrayLike(null); // false\n* isArrayLike(undefined); // false\n*/\nfunction isArrayLike(value) {\n\treturn value != null && typeof value !== \"function\" && isLength(value.length);\n}\n//#endregion\nexport { isArrayLike };\n", "//#region src/compat/predicate/isSymbol.ts\n/**\n* Check whether a value is a symbol.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.\n*\n* @param value The value to check.\n* @returns Returns `true` if `value` is a symbol, else `false`.\n* @example\n* isSymbol(Symbol.iterator);\n* // => true\n*\n* isSymbol('abc');\n* // => false\n*/\nfunction isSymbol(value) {\n\treturn typeof value === \"symbol\" || value instanceof Symbol;\n}\n//#endregion\nexport { isSymbol };\n", "import { isSymbol } from \"../predicate/isSymbol.mjs\";\n//#region src/compat/util/toString.ts\n/**\n* Converts `value` to a string.\n*\n* An empty string is returned for `null` and `undefined` values.\n* The sign of `-0` is preserved.\n*\n* @param value - The value to convert.\n* @returns Returns the converted string.\n*\n* @example\n* toString(null) // returns ''\n* toString(undefined) // returns ''\n* toString(-0) // returns '-0'\n* toString([1, 2, -0]) // returns '1,2,-0'\n* toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)'\n*/\nfunction toString(value) {\n\tif (value == null) return \"\";\n\treturn baseToString(value);\n}\nfunction baseToString(value) {\n\tif (typeof value === \"string\") return value;\n\tif (Array.isArray(value)) return value.map(baseToString).join(\",\");\n\tif (isSymbol(value)) return value.toString();\n\tconst result = value + \"\";\n\tif (result === \"0\" && Object.is(Number(value), -0)) return \"-0\";\n\treturn result;\n}\n//#endregion\nexport { toString };\n", "//#region src/compat/_internal/toKey.ts\n/**\n* Converts `value` to a string key if it's not a string or symbol.\n*\n* @private\n* @param {unknown} value The value to inspect.\n* @returns {string|symbol} Returns the key.\n*/\nfunction toKey(value) {\n\tif (typeof value === \"string\" || typeof value === \"symbol\") return value;\n\tif (Object.is(value?.valueOf?.(), -0)) return \"-0\";\n\treturn String(value);\n}\n//#endregion\nexport { toKey };\n", "import { toKey } from \"../_internal/toKey.mjs\";\nimport { toString } from \"./toString.mjs\";\n//#region src/compat/util/toPath.ts\n/**\n* Converts a deep key string into an array of path segments.\n*\n* This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.\n*\n* @param deepKey - The deep key string to convert.\n* @returns An array of strings, each representing a segment of the path.\n*\n* Examples:\n*\n* toPath('a.b.c') // Returns ['a', 'b', 'c']\n* toPath('a[b][c]') // Returns ['a', 'b', 'c']\n* toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']\n* toPath('a[\"b.c\"].d') // Returns ['a', 'b.c', 'd']\n* toPath('') // Returns []\n* toPath('.a[b].c.d[e][\"f.g\"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']\n*/\nfunction toPath(deepKey) {\n\tif (Array.isArray(deepKey)) return deepKey.map(toKey);\n\tif (typeof deepKey === \"symbol\") return [deepKey];\n\tdeepKey = toString(deepKey);\n\tconst result = [];\n\tconst length = deepKey.length;\n\tif (length === 0) return result;\n\tlet index = 0;\n\tlet key = \"\";\n\tlet quoteChar = \"\";\n\tlet bracket = false;\n\tlet bracketHadQuote = false;\n\tconst bracketNumberRegex = /^-?\\d+(?:\\.\\d+)?$/;\n\tif (deepKey.charCodeAt(0) === 46) result.push(\"\");\n\twhile (index < length) {\n\t\tconst char = deepKey[index];\n\t\tif (quoteChar) if (char === \"\\\\\" && index + 1 < length) {\n\t\t\tindex++;\n\t\t\tkey += deepKey[index];\n\t\t} else if (char === quoteChar) quoteChar = \"\";\n\t\telse key += char;\n\t\telse if (bracket) if (char === \"\\\"\" || char === \"'\") {\n\t\t\tquoteChar = char;\n\t\t\tbracketHadQuote = true;\n\t\t} else if (char === \"]\") {\n\t\t\tbracket = false;\n\t\t\tif (!bracketHadQuote && key.includes(\".\") && !bracketNumberRegex.test(key)) {\n\t\t\t\tconst segments = key.split(\".\");\n\t\t\t\tfor (let i = 0; i < segments.length; i++) if (segments[i] !== \"\") result.push(segments[i]);\n\t\t\t} else result.push(key);\n\t\t\tkey = \"\";\n\t\t} else key += char;\n\t\telse if (char === \"[\") {\n\t\t\tbracket = true;\n\t\t\tbracketHadQuote = false;\n\t\t\tif (key) {\n\t\t\t\tresult.push(key);\n\t\t\t\tkey = \"\";\n\t\t\t}\n\t\t} else if (char === \".\") {\n\t\t\tif (key) {\n\t\t\t\tresult.push(key);\n\t\t\t\tkey = \"\";\n\t\t\t}\n\t\t\tconst next = deepKey[index + 1];\n\t\t\tif (next === void 0 || next === \".\") result.push(\"\");\n\t\t} else key += char;\n\t\tindex++;\n\t}\n\tif (key) result.push(key);\n\treturn result;\n}\n//#endregion\nexport { toPath };\n", "//#region src/_internal/isUnsafeProperty.ts\n/**\n* Checks if a property key is unsafe to access or copy directly.\n*\n* This function is used in functions like `get`, `unset`, and `merge` to prevent\n* prototype pollution attacks by identifying `__proto__`, which modifies the object's\n* prototype chain. `constructor` and `prototype` stay accessible here because lodash\n* keeps reads of them unrestricted; write paths use `isUnsafeToWriteProperty` instead,\n* which also blocks those keys.\n*\n* @param key - The property key to check\n* @returns `true` if the property is unsafe to access directly, `false` otherwise\n* @internal\n*/\nfunction isUnsafeProperty(key) {\n\treturn key === \"__proto__\";\n}\n//#endregion\nexport { isUnsafeProperty };\n", "//#region src/compat/_internal/isDeepKey.ts\n/** Matches any deep property path. Examples: `a.b`, `a[0]`, `a[\"b\"]` */\nconst regexIsDeepProp = /\\.|(\\[(?:[^[\\]]*|([\"'])(?:(?!\\2)[^\\\\]|\\\\.)*?\\2)\\])/;\n/**\n* Checks if a given key is a deep key.\n*\n* A deep key is a string that contains a dot (.) or square brackets with a property accessor.\n*\n* @param {PropertyKey} key - The key to check.\n* @returns {boolean} - Returns true if the key is a deep key, otherwise false.\n*\n* Examples:\n*\n* isDeepKey('a.b') // true\n* isDeepKey('a[b]') // true\n* isDeepKey('a') // false\n* isDeepKey(123) // false\n* isDeepKey('a.b.c') // true\n* isDeepKey('a[b][c]') // true\n* isDeepKey('a.') // false\n* isDeepKey('.a') // false\n* isDeepKey('a[b') // false\n* isDeepKey('a]b]') // false\n* isDeepKey('a][b') // false\n* isDeepKey('') // false\n* isDeepKey('a[0]') // true\n*\n*/\nfunction isDeepKey(key) {\n\tswitch (typeof key) {\n\t\tcase \"number\":\n\t\tcase \"symbol\": return false;\n\t\tcase \"string\":\n\t\t\tif (key === \"\" || key.startsWith(\".\") || key.endsWith(\".\")) return false;\n\t\t\treturn regexIsDeepProp.test(key);\n\t\tdefault: return false;\n\t}\n}\n//#endregion\nexport { isDeepKey };\n", "import { isUnsafeProperty } from \"../../_internal/isUnsafeProperty.mjs\";\nimport { isDeepKey } from \"../_internal/isDeepKey.mjs\";\nimport { toKey } from \"../_internal/toKey.mjs\";\nimport { toPath } from \"../util/toPath.mjs\";\n//#region src/compat/object/get.ts\n/**\n* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.\n*\n* @param object - The object to query.\n* @param path - The path of the property to get.\n* @param [defaultValue] - The value returned if the resolved value is undefined.\n* @returns Returns the resolved value.\n*\n* @example\n* const object = { a: { b: { c: 1 } } };\n* get(object, 'a.b.c');\n* // => 1\n*\n* get(object, ['a', 'b', 'c']);\n* // => 1\n*\n* get(object, 'a.b.d', 'default');\n* // => 'default'\n*/\nfunction get(object, path, defaultValue) {\n\tif (object == null) return defaultValue;\n\tswitch (typeof path) {\n\t\tcase \"string\": {\n\t\t\tif (isUnsafeProperty(path)) return defaultValue;\n\t\t\tconst result = object[path];\n\t\t\tif (result === void 0) if (isDeepKey(path) && !Object.hasOwn(object, path)) return get(object, toPath(path), defaultValue);\n\t\t\telse return defaultValue;\n\t\t\treturn result;\n\t\t}\n\t\tcase \"number\":\n\t\tcase \"symbol\": {\n\t\t\tif (typeof path === \"number\") path = toKey(path);\n\t\t\tconst result = object[path];\n\t\t\tif (result === void 0) return defaultValue;\n\t\t\treturn result;\n\t\t}\n\t\tdefault: {\n\t\t\tif (Array.isArray(path)) return getWithPath(object, path, defaultValue);\n\t\t\tif (Object.is(path?.valueOf(), -0)) path = \"-0\";\n\t\t\telse path = String(path);\n\t\t\tif (isUnsafeProperty(path)) return defaultValue;\n\t\t\tconst result = object[path];\n\t\t\tif (result === void 0) return defaultValue;\n\t\t\treturn result;\n\t\t}\n\t}\n}\nfunction getWithPath(object, path, defaultValue) {\n\tif (path.length === 0) return defaultValue;\n\tlet current = object;\n\tfor (let index = 0; index < path.length; index++) {\n\t\tif (current == null) return defaultValue;\n\t\tif (isUnsafeProperty(path[index])) return defaultValue;\n\t\tcurrent = current[path[index]];\n\t}\n\tif (current === void 0) return defaultValue;\n\treturn current;\n}\n//#endregion\nexport { get };\n", "import { get } from \"./get.mjs\";\n//#region src/compat/object/property.ts\n/**\n* Creates a function that returns the value at a given path of an object.\n*\n* @template T - The type of object.\n* @template R - The type of the value to return.\n* @param path - The path of the property to get.\n* @returns Returns a new function that takes an object and returns the value at the specified path.\n*\n* @example\n* const getObjectValue = property('a.b.c');\n* const result = getObjectValue({ a: { b: { c: 3 } } });\n* console.log(result); // => 3\n*\n* @example\n* const getObjectValue = property(['a', 'b', 'c']);\n* const result = getObjectValue({ a: { b: { c: 3 } } });\n* console.log(result); // => 3\n*/\nfunction property(path) {\n\treturn function(object) {\n\t\treturn get(object, path);\n\t};\n}\n//#endregion\nexport { property };\n", "//#region src/compat/predicate/isObject.ts\n/**\n* Checks if the given value is an object. An object is a value that is\n* not a primitive type (string, number, boolean, symbol, null, or undefined).\n*\n* This function tests whether the provided value is an object or not.\n* It returns `true` if the value is an object, and `false` otherwise.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object value.\n*\n* @param value - The value to check if it is an object.\n* @returns `true` if the value is an object, `false` otherwise.\n*\n* @example\n* const value1 = {};\n* const value2 = [1, 2, 3];\n* const value3 = () => {};\n* const value4 = null;\n*\n* console.log(isObject(value1)); // true\n* console.log(isObject(value2)); // true\n* console.log(isObject(value3)); // true\n* console.log(isObject(value4)); // false\n*/\nfunction isObject(value) {\n\treturn value !== null && (typeof value === \"object\" || typeof value === \"function\");\n}\n//#endregion\nexport { isObject };\n", "//#region src/predicate/isPrimitive.ts\n/**\n* Checks whether a value is a JavaScript primitive.\n* JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.\n*\n* @param value The value to check.\n* @returns Returns true if `value` is a primitive, false otherwise.\n*\n* @example\n* isPrimitive(null); // true\n* isPrimitive(undefined); // true\n* isPrimitive('123'); // true\n* isPrimitive(false); // true\n* isPrimitive(true); // true\n* isPrimitive(Symbol('a')); // true\n* isPrimitive(123n); // true\n* isPrimitive({}); // false\n* isPrimitive(new Date()); // false\n* isPrimitive(new Map()); // false\n* isPrimitive(new Set()); // false\n* isPrimitive([1, 2, 3]); // false\n*/\nfunction isPrimitive(value) {\n\treturn value == null || typeof value !== \"object\" && typeof value !== \"function\";\n}\n//#endregion\nexport { isPrimitive };\n", "import { isPrimitive } from \"../../predicate/isPrimitive.mjs\";\nimport { getTag } from \"../_internal/getTag.mjs\";\nimport \"../_internal/tags.mjs\";\nimport { eq } from \"../util/eq.mjs\";\nimport { isObject } from \"./isObject.mjs\";\n//#region src/compat/predicate/isMatchWith.ts\n/**\n* Performs a deep comparison between a target value and a source pattern to determine if they match,\n* using a custom comparison function for fine-grained control over the matching logic.\n*\n* This function recursively traverses both values, calling the custom compare function for each\n* property/element pair. If the compare function returns a boolean, that result is used directly.\n* If it returns undefined, the default matching behavior continues recursively.\n*\n* The matching behavior varies by data type:\n* - **Objects**: Matches if all properties in the source exist in the target and match\n* - **Arrays**: Matches if all elements in the source array can be found in the target array (order-independent)\n* - **Maps**: Matches if all key-value pairs in the source Map exist and match in the target Map\n* - **Sets**: Matches if all elements in the source Set can be found in the target Set\n* - **Functions**: Matches using strict equality, or object comparison if the function has properties\n* - **Primitives**: Matches using strict equality\n*\n* Special cases:\n* - Empty arrays, Maps, and Sets always match any target\n* - An empty object matches any target at the top level, but at nested levels it only matches object targets\n* - `null` and `undefined` source values have specific matching rules\n* - Circular references are handled using an internal stack to prevent infinite recursion\n*\n* @param target - The value to be tested for matching\n* @param source - The pattern/template to match against\n* @param [compare] - Optional custom comparison function that receives:\n*   - `objValue` - The value from the target at the current path\n*   - `srcValue` - The value from the source at the current path\n*   - `key` - The property key or array index being compared\n*   - `object` - The parent object/array from the target\n*   - `source` - The parent object/array from the source\n*   - `stack` - Internal Map used for circular reference detection\n*   Should return `true` for a match, `false` for no match, or `undefined` to continue with default behavior\n*\n* @returns `true` if the target matches the source pattern, `false` otherwise\n*\n* @example\n* // Basic matching without custom comparator\n* isMatchWith({ a: 1, b: 2 }, { a: 1 }); // true\n* isMatchWith([1, 2, 3], [1, 3]); // true\n*\n* @example\n* // Custom comparison for case-insensitive string matching\n* const caseInsensitiveCompare = (objVal, srcVal) => {\n*   if (typeof objVal === 'string' && typeof srcVal === 'string') {\n*     return objVal.toLowerCase() === srcVal.toLowerCase();\n*   }\n*   return undefined; // Use default behavior for non-strings\n* };\n*\n* isMatchWith(\n*   { name: 'JOHN', age: 30 },\n*   { name: 'john' },\n*   caseInsensitiveCompare\n* ); // true\n*\n* @example\n* // Custom comparison for range matching\n* const rangeCompare = (objVal, srcVal, key) => {\n*   if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {\n*     return objVal >= srcVal.min && objVal <= srcVal.max;\n*   }\n*   return undefined;\n* };\n*\n* isMatchWith(\n*   { name: 'John', age: 25 },\n*   { age: { min: 18, max: 30 } },\n*   rangeCompare\n* ); // true\n*/\nfunction isMatchWith(target, source, compare) {\n\tif (typeof compare !== \"function\") return isMatchWith(target, source, () => void 0);\n\treturn isMatchWithInternal(target, source, function doesMatch(objValue, srcValue, key, object, source, stack) {\n\t\tconst isEqual = compare(objValue, srcValue, key, object, source, stack);\n\t\tif (isEqual !== void 0) return Boolean(isEqual);\n\t\treturn isMatchWithInternal(objValue, srcValue, doesMatch, stack, false);\n\t}, /* @__PURE__ */ new Map(), true);\n}\nfunction isMatchWithInternal(target, source, compare, stack, isRoot = false) {\n\tif (source === target) return true;\n\tswitch (typeof source) {\n\t\tcase \"object\": return isObjectMatch(target, source, compare, stack, isRoot);\n\t\tcase \"function\":\n\t\t\tif (Object.keys(source).length > 0) return isMatchWithInternal(target, { ...source }, compare, stack, isRoot);\n\t\t\treturn eq(target, source);\n\t\tdefault:\n\t\t\tif (!isObject(target)) return eq(target, source);\n\t\t\tif (isRoot) {\n\t\t\t\tif (typeof source === \"string\") return source === \"\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn eq(target, source);\n\t}\n}\nfunction isObjectMatch(target, source, compare, stack, isRoot = false) {\n\tif (source == null) return true;\n\tif (Array.isArray(source)) return isArrayMatch(target, source, compare, stack);\n\tif (source instanceof Map) return isMapMatch(target, source, compare, stack);\n\tif (source instanceof Set) return isSetMatch(target, source, compare, stack);\n\tconst keys = Object.keys(source);\n\tif (target == null) return isRoot && keys.length === 0;\n\tif (isRoot) {\n\t\tif (isPrimitive(target)) target = Object(target);\n\t} else {\n\t\tconst tag = getTag(target);\n\t\tif (tag !== \"[object Object]\" && tag !== \"[object Arguments]\") return false;\n\t}\n\tif (keys.length === 0) return true;\n\tif (stack?.has(source)) return stack.get(source) === target;\n\tstack?.set(source, target);\n\ttry {\n\t\tfor (let i = 0; i < keys.length; i++) {\n\t\t\tconst key = keys[i];\n\t\t\tif (!(key in target)) return false;\n\t\t\tif (source[key] === void 0 && target[key] !== void 0) return false;\n\t\t\tif (source[key] === null && target[key] !== null) return false;\n\t\t\tif (!compare(target[key], source[key], key, target, source, stack)) return false;\n\t\t}\n\t\treturn true;\n\t} finally {\n\t\tstack?.delete(source);\n\t}\n}\nfunction isMapMatch(target, source, compare, stack) {\n\tif (source.size === 0) return true;\n\tif (!(target instanceof Map)) return false;\n\tfor (const [key, sourceValue] of source.entries()) if (compare(target.get(key), sourceValue, key, target, source, stack) === false) return false;\n\treturn true;\n}\nfunction isArrayMatch(target, source, compare, stack) {\n\tif (source.length === 0) return true;\n\tif (!Array.isArray(target)) return false;\n\tconst countedIndex = /* @__PURE__ */ new Set();\n\tfor (let i = 0; i < source.length; i++) {\n\t\tconst sourceItem = source[i];\n\t\tlet found = false;\n\t\tfor (let j = 0; j < target.length; j++) {\n\t\t\tif (countedIndex.has(j)) continue;\n\t\t\tconst targetItem = target[j];\n\t\t\tlet matches = false;\n\t\t\tif (compare(targetItem, sourceItem, i, target, source, stack)) matches = true;\n\t\t\tif (matches) {\n\t\t\t\tcountedIndex.add(j);\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!found) return false;\n\t}\n\treturn true;\n}\nfunction isSetMatch(target, source, compare, stack) {\n\tif (source.size === 0) return true;\n\tif (!(target instanceof Set)) return false;\n\treturn isArrayMatch([...target], [...source], compare, stack);\n}\n//#endregion\nexport { isMatchWith };\n", "import { isMatchWith } from \"./isMatchWith.mjs\";\n//#region src/compat/predicate/isMatch.ts\n/**\n* Checks if the target matches the source by comparing their structures and values.\n* This function supports deep comparison for objects, arrays, maps, and sets.\n*\n* @param target - The target value to match against.\n* @param source - The source value to match with.\n* @returns Returns `true` if the target matches the source, otherwise `false`.\n*\n* @example\n* // Basic usage\n* isMatch({ a: 1, b: 2 }, { a: 1 }); // true\n*\n* @example\n* // Matching arrays\n* isMatch([1, 2, 3], [1, 2, 3]); // true\n*\n* @example\n* // Matching maps\n* const targetMap = new Map([['key1', 'value1'], ['key2', 'value2']]);\n* const sourceMap = new Map([['key1', 'value1']]);\n* isMatch(targetMap, sourceMap); // true\n*\n* @example\n* // Matching sets\n* const targetSet = new Set([1, 2, 3]);\n* const sourceSet = new Set([1, 2]);\n* isMatch(targetSet, sourceSet); // true\n*/\nfunction isMatch(target, source) {\n\treturn isMatchWith(target, source, () => void 0);\n}\n//#endregion\nexport { isMatch };\n", "//#region src/predicate/isTypedArray.ts\n/**\n* Checks if a value is a TypedArray.\n* @param x The value to check.\n* @returns Returns true if `x` is a TypedArray, false otherwise.\n*\n* @example\n* const arr = new Uint8Array([1, 2, 3]);\n* isTypedArray(arr); // true\n*\n* const regularArray = [1, 2, 3];\n* isTypedArray(regularArray); // false\n*\n* const buffer = new ArrayBuffer(16);\n* isTypedArray(buffer); // false\n*/\nfunction isTypedArray(x) {\n\treturn ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n//#endregion\nexport { isTypedArray };\n", "import { isPrimitive } from \"../predicate/isPrimitive.mjs\";\nimport { isTypedArray } from \"../predicate/isTypedArray.mjs\";\nimport { getSymbols } from \"../compat/_internal/getSymbols.mjs\";\nimport { getTag } from \"../compat/_internal/getTag.mjs\";\nimport { argumentsTag, arrayBufferTag, arrayTag, booleanTag, dataViewTag, dateTag, float32ArrayTag, float64ArrayTag, int16ArrayTag, int32ArrayTag, int8ArrayTag, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, symbolTag, uint16ArrayTag, uint32ArrayTag, uint8ArrayTag, uint8ClampedArrayTag } from \"../compat/_internal/tags.mjs\";\nimport { isBuffer } from \"../predicate/isBuffer.mjs\";\n//#region src/object/cloneDeepWith.ts\n/**\n* Deeply clones the given object.\n*\n* You can customize the deep cloning process using the `cloneValue` function.\n* The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.\n* If the function returns a value, that value is used;\n* if it returns `undefined`, the default cloning method is used.\n*\n* @template T - The type of the object.\n* @param obj - The object to clone.\n* @param [cloneValue] - A function to customize the cloning process.\n* @returns A deep clone of the given object.\n*\n* @example\n* // Clone a primitive value\n* const num = 29;\n* const clonedNum = cloneDeepWith(num);\n* console.log(clonedNum); // 29\n* console.log(clonedNum === num); // true\n*\n* @example\n* // Clone an object with a customizer\n* const obj = { a: 1, b: 2 };\n* const clonedObj = cloneDeepWith(obj, (value) => {\n*   if (typeof value === 'number') {\n*     return value * 2; // Double the number\n*   }\n* });\n* console.log(clonedObj); // { a: 2, b: 4 }\n* console.log(clonedObj === obj); // false\n*\n* @example\n* // Clone an array with a customizer\n* const arr = [1, 2, 3];\n* const clonedArr = cloneDeepWith(arr, (value) => {\n*   if (typeof value === 'number') {\n*     return value + 1; // Increment each number\n*   }\n* });\n* console.log(clonedArr); // [2, 3, 4]\n* console.log(clonedArr === arr); // false\n*/\nfunction cloneDeepWith(obj, cloneValue) {\n\treturn cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);\n}\nfunction cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {\n\tconst cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);\n\tif (cloned !== void 0) return cloned;\n\tif (isPrimitive(valueToClone)) return valueToClone;\n\tif (stack.has(valueToClone)) return stack.get(valueToClone);\n\tif (Array.isArray(valueToClone)) {\n\t\tconst result = new Array(valueToClone.length);\n\t\tstack.set(valueToClone, result);\n\t\tfor (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n\t\tif (Object.hasOwn(valueToClone, \"index\")) result.index = valueToClone.index;\n\t\tif (Object.hasOwn(valueToClone, \"input\")) result.input = valueToClone.input;\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof Date) return new Date(valueToClone.getTime());\n\tif (valueToClone instanceof RegExp) {\n\t\tconst result = new RegExp(valueToClone.source, valueToClone.flags);\n\t\tresult.lastIndex = valueToClone.lastIndex;\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof Map) {\n\t\tconst result = /* @__PURE__ */ new Map();\n\t\tstack.set(valueToClone, result);\n\t\tfor (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof Set) {\n\t\tconst result = /* @__PURE__ */ new Set();\n\t\tstack.set(valueToClone, result);\n\t\tfor (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));\n\t\treturn result;\n\t}\n\tif (isBuffer(valueToClone)) return valueToClone.subarray();\n\tif (isTypedArray(valueToClone)) {\n\t\tconst result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);\n\t\tstack.set(valueToClone, result);\n\t\tfor (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== \"undefined\" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);\n\tif (valueToClone instanceof DataView) {\n\t\tconst result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);\n\t\tstack.set(valueToClone, result);\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (typeof File !== \"undefined\" && valueToClone instanceof File) {\n\t\tconst result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });\n\t\tstack.set(valueToClone, result);\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (typeof Blob !== \"undefined\" && valueToClone instanceof Blob) {\n\t\tconst result = new Blob([valueToClone], { type: valueToClone.type });\n\t\tstack.set(valueToClone, result);\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof Error) {\n\t\tconst result = structuredClone(valueToClone);\n\t\tstack.set(valueToClone, result);\n\t\tresult.message = valueToClone.message;\n\t\tresult.name = valueToClone.name;\n\t\tresult.stack = valueToClone.stack;\n\t\tresult.cause = valueToClone.cause;\n\t\tresult.constructor = valueToClone.constructor;\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof Boolean) {\n\t\tconst result = new Boolean(valueToClone.valueOf());\n\t\tstack.set(valueToClone, result);\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof Number) {\n\t\tconst result = new Number(valueToClone.valueOf());\n\t\tstack.set(valueToClone, result);\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (valueToClone instanceof String) {\n\t\tconst result = new String(valueToClone.valueOf());\n\t\tstack.set(valueToClone, result);\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\tif (typeof valueToClone === \"object\" && isCloneableObject(valueToClone)) {\n\t\tconst result = Object.create(Object.getPrototypeOf(valueToClone));\n\t\tstack.set(valueToClone, result);\n\t\tcopyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n\t\treturn result;\n\t}\n\treturn valueToClone;\n}\nfunction copyProperties(target, source, objectToClone = target, stack, cloneValue) {\n\tconst keys = [...Object.keys(source), ...getSymbols(source)];\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tconst descriptor = Object.getOwnPropertyDescriptor(target, key);\n\t\tif (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);\n\t}\n}\nfunction isCloneableObject(object) {\n\tswitch (getTag(object)) {\n\t\tcase argumentsTag:\n\t\tcase arrayTag:\n\t\tcase arrayBufferTag:\n\t\tcase dataViewTag:\n\t\tcase booleanTag:\n\t\tcase dateTag:\n\t\tcase float32ArrayTag:\n\t\tcase float64ArrayTag:\n\t\tcase int8ArrayTag:\n\t\tcase int16ArrayTag:\n\t\tcase int32ArrayTag:\n\t\tcase mapTag:\n\t\tcase numberTag:\n\t\tcase objectTag:\n\t\tcase regexpTag:\n\t\tcase setTag:\n\t\tcase stringTag:\n\t\tcase symbolTag:\n\t\tcase uint8ArrayTag:\n\t\tcase uint8ClampedArrayTag:\n\t\tcase uint16ArrayTag:\n\t\tcase uint32ArrayTag: return true;\n\t\tdefault: return false;\n\t}\n}\n//#endregion\nexport { cloneDeepWith, cloneDeepWithImpl, copyProperties };\n", "import { cloneDeepWithImpl } from \"./cloneDeepWith.mjs\";\n//#region src/object/cloneDeep.ts\n/**\n* Creates a deep clone of the given object.\n*\n* @template T - The type of the object.\n* @param obj - The object to clone.\n* @returns A deep clone of the given object.\n*\n* @example\n* // Clone a primitive value\n* const num = 29;\n* const clonedNum = cloneDeep(num);\n* console.log(clonedNum); // 29\n* console.log(clonedNum === num); // true\n*\n* @example\n* // Clone an array\n* const arr = [1, 2, 3];\n* const clonedArr = cloneDeep(arr);\n* console.log(clonedArr); // [1, 2, 3]\n* console.log(clonedArr === arr); // false\n*\n* @example\n* // Clone an array with nested objects\n* const arr = [1, { a: 1 }, [1, 2, 3]];\n* const clonedArr = cloneDeep(arr);\n* arr[1].a = 2;\n* console.log(arr); // [1, { a: 2 }, [1, 2, 3]]\n* console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]\n* console.log(clonedArr === arr); // false\n*\n* @example\n* // Clone an object\n* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n* const clonedObj = cloneDeep(obj);\n* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n* console.log(clonedObj === obj); // false\n*\n* @example\n* // Clone an object with nested objects\n* const obj = { a: 1, b: { c: 1 } };\n* const clonedObj = cloneDeep(obj);\n* obj.b.c = 2;\n* console.log(obj); // { a: 1, b: { c: 2 } }\n* console.log(clonedObj); // { a: 1, b: { c: 1 } }\n* console.log(clonedObj === obj); // false\n*/\nfunction cloneDeep(obj) {\n\treturn cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);\n}\n//#endregion\nexport { cloneDeep };\n", "import { cloneDeep } from \"../../object/cloneDeep.mjs\";\nimport { isMatch } from \"./isMatch.mjs\";\n//#region src/compat/predicate/matches.ts\n/**\n* Creates a function that performs a deep comparison between a given target and the source object.\n*\n* @template T\n* @template V\n* @param source - The source object to create the matcher from.\n* @returns Returns a function that takes a target object and returns `true` if the target matches the source, otherwise `false`.\n*\n* @example\n* // Basic usage\n* const matcher = matches({ a: 1, b: 2 });\n* matcher({ a: 1, b: 2, c: 3 }); // true\n* matcher({ a: 1, c: 3 }); // false\n*\n* @example\n* // Matching arrays\n* const arrayMatcher = matches([1, 2, 3]);\n* arrayMatcher([1, 2, 3, 4]); // true\n* arrayMatcher([4, 5, 6]); // false\n*\n* @example\n* // Matching objects with nested structures\n* const nestedMatcher = matches({ a: { b: 2 } });\n* nestedMatcher({ a: { b: 2, c: 3 } }); // true\n* nestedMatcher({ a: { c: 3 } }); // false\n*/\nfunction matches(source) {\n\tsource = cloneDeep(source);\n\treturn (target) => {\n\t\treturn isMatch(target, source);\n\t};\n}\n//#endregion\nexport { matches };\n", "import { getTag } from \"../_internal/getTag.mjs\";\nimport { argumentsTag, booleanTag, numberTag, stringTag } from \"../_internal/tags.mjs\";\nimport { cloneDeepWith as cloneDeepWith$1, copyProperties } from \"../../object/cloneDeepWith.mjs\";\n//#region src/compat/object/cloneDeepWith.ts\n/**\n* Creates a deep clone of the given object using a customizer function.\n*\n* @template T - The type of the object.\n* @param obj - The object to clone.\n* @param [cloneValue] - A function to customize the cloning process.\n* @returns A deep clone of the given object.\n*\n* @example\n* // Clone a primitive value\n* const num = 29;\n* const clonedNum = cloneDeepWith(num);\n* console.log(clonedNum); // 29\n* console.log(clonedNum === num); // true\n*\n* @example\n* // Clone an object with a customizer\n* const obj = { a: 1, b: 2 };\n* const clonedObj = cloneDeepWith(obj, (value) => {\n*   if (typeof value === 'number') {\n*     return value * 2; // Double the number\n*   }\n* });\n* console.log(clonedObj); // { a: 2, b: 4 }\n* console.log(clonedObj === obj); // false\n*\n* @example\n* // Clone an array with a customizer\n* const arr = [1, 2, 3];\n* const clonedArr = cloneDeepWith(arr, (value) => {\n*   if (typeof value === 'number') {\n*     return value + 1; // Increment each number\n*   }\n* });\n* console.log(clonedArr); // [2, 3, 4]\n* console.log(clonedArr === arr); // false\n*/\nfunction cloneDeepWith(obj, customizer) {\n\treturn cloneDeepWith$1(obj, (value, key, object, stack) => {\n\t\tconst cloned = customizer?.(value, key, object, stack);\n\t\tif (cloned !== void 0) return cloned;\n\t\tif (typeof obj !== \"object\") return;\n\t\tif (getTag(obj) === \"[object Object]\" && typeof obj.constructor !== \"function\") {\n\t\t\tconst result = {};\n\t\t\tstack.set(obj, result);\n\t\t\tcopyProperties(result, obj, object, stack);\n\t\t\treturn result;\n\t\t}\n\t\tswitch (Object.prototype.toString.call(obj)) {\n\t\t\tcase numberTag:\n\t\t\tcase stringTag:\n\t\t\tcase booleanTag: {\n\t\t\t\tconst result = new obj.constructor(obj?.valueOf());\n\t\t\t\tcopyProperties(result, obj);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tcase argumentsTag: {\n\t\t\t\tconst result = {};\n\t\t\t\tcopyProperties(result, obj);\n\t\t\t\tresult.length = obj.length;\n\t\t\t\tresult[Symbol.iterator] = obj[Symbol.iterator];\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdefault: return;\n\t\t}\n\t});\n}\n//#endregion\nexport { cloneDeepWith };\n", "import { cloneDeepWith } from \"./cloneDeepWith.mjs\";\n//#region src/compat/object/cloneDeep.ts\n/**\n* Creates a deep clone of the given object.\n*\n* @template T - The type of the object.\n* @param obj - The object to clone.\n* @returns A deep clone of the given object.\n*\n* @example\n* // Clone a primitive value\n* const num = 29;\n* const clonedNum = clone(num);\n* console.log(clonedNum); // 29\n* console.log(clonedNum === num); // true\n*\n* @example\n* // Clone an array\n* const arr = [1, 2, 3];\n* const clonedArr = cloneDeep(arr);\n* console.log(clonedArr); // [1, 2, 3]\n* console.log(clonedArr === arr); // false\n*\n* @example\n* // Clone an array with nested objects\n* const arr = [1, { a: 1 }, [1, 2, 3]];\n* const clonedArr = cloneDeep(arr);\n* arr[1].a = 2;\n* console.log(arr); // [1, { a: 2 }, [1, 2, 3]]\n* console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]\n* console.log(clonedArr === arr); // false\n*\n* @example\n* // Clone an object\n* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n* const clonedObj = cloneDeep(obj);\n* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n* console.log(clonedObj === obj); // false\n*\n* @example\n* // Clone an object with nested objects\n* const obj = { a: 1, b: { c: 1 } };\n* const clonedObj = cloneDeep(obj);\n* obj.b.c = 2;\n* console.log(obj); // { a: 1, b: { c: 2 } }\n* console.log(clonedObj); // { a: 1, b: { c: 1 } }\n* console.log(clonedObj === obj); // false\n*/\nfunction cloneDeep(obj) {\n\treturn cloneDeepWith(obj);\n}\n//#endregion\nexport { cloneDeep };\n", "import { getTag } from \"../_internal/getTag.mjs\";\n//#region src/compat/predicate/isArguments.ts\n/**\n* Checks if the given value is an arguments object.\n*\n* This function tests whether the provided value is an arguments object or not.\n* It returns `true` if the value is an arguments object, and `false` otherwise.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.\n*\n* @param value - The value to test if it is an arguments object.\n* @returns `true` if the value is an arguments, `false` otherwise.\n*\n* @example\n* const args = (function() { return arguments; })();\n* const strictArgs = (function() { 'use strict'; return arguments; })();\n* const value = [1, 2, 3];\n*\n* console.log(isArguments(args)); // true\n* console.log(isArguments(strictArgs)); // true\n* console.log(isArguments(value)); // false\n*/\nfunction isArguments(value) {\n\treturn value !== null && typeof value === \"object\" && getTag(value) === \"[object Arguments]\";\n}\n//#endregion\nexport { isArguments };\n", "//#region src/compat/_internal/isIndex.ts\nconst IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\\d*)$/;\nfunction isIndex(value, length = Number.MAX_SAFE_INTEGER) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return Number.isInteger(value) && value >= 0 && value < length;\n\t\tcase \"symbol\": return false;\n\t\tcase \"string\": return IS_UNSIGNED_INTEGER.test(value);\n\t}\n}\n//#endregion\nexport { isIndex };\n", "import { isDeepKey } from \"../_internal/isDeepKey.mjs\";\nimport { toKey } from \"../_internal/toKey.mjs\";\nimport { toPath } from \"../util/toPath.mjs\";\nimport { isIndex } from \"../_internal/isIndex.mjs\";\nimport { isArguments } from \"../predicate/isArguments.mjs\";\n//#region src/compat/object/has.ts\n/**\n* Checks if a given path exists within an object.\n*\n* You can provide the path as a single property key, an array of property keys,\n* or a string representing a deep path.\n*\n* If the path is an index and the object is an array or an arguments object, the function will verify\n* if the index is valid and within the bounds of the array or arguments object, even if the array or\n* arguments object is sparse (i.e., not all indexes are defined).\n*\n* @param object - The object to query.\n* @param path - The path to check. This can be a single property key,\n*        an array of property keys, or a string representing a deep path.\n* @returns Returns `true` if the path exists in the object, `false` otherwise.\n*\n* @example\n*\n* const obj = { a: { b: { c: 3 } } };\n*\n* has(obj, 'a'); // true\n* has(obj, ['a', 'b']); // true\n* has(obj, ['a', 'b', 'c']); // true\n* has(obj, 'a.b.c'); // true\n* has(obj, 'a.b.d'); // false\n* has(obj, ['a', 'b', 'c', 'd']); // false\n* has([], 0); // false\n* has([1, 2, 3], 2); // true\n* has([1, 2, 3], 5); // false\n*/\nfunction has(object, path) {\n\tlet resolvedPath;\n\tif (Array.isArray(path)) resolvedPath = path;\n\telse if (typeof path === \"string\" && isDeepKey(path) && !(path in Object(object))) resolvedPath = toPath(path);\n\telse resolvedPath = [path];\n\tif (resolvedPath.length === 0) return false;\n\tlet current = object;\n\tfor (let i = 0; i < resolvedPath.length; i++) {\n\t\tconst key = toKey(resolvedPath[i]);\n\t\tif (current == null || !Object.hasOwn(current, key)) {\n\t\t\tif (!((Array.isArray(current) || isArguments(current)) && isIndex(key) && Number(key) < current.length)) return false;\n\t\t}\n\t\tcurrent = current[key];\n\t}\n\treturn true;\n}\n//#endregion\nexport { has };\n", "import { toKey } from \"../_internal/toKey.mjs\";\nimport { get } from \"../object/get.mjs\";\nimport { isMatch } from \"./isMatch.mjs\";\nimport { cloneDeep } from \"../object/cloneDeep.mjs\";\nimport { has } from \"../object/has.mjs\";\n//#region src/compat/predicate/matchesProperty.ts\n/**\n* Creates a function that checks if a given target object matches a specific property value.\n*\n* The returned function takes a target object and determines if the property at the\n* specified path within the target object is equal to the given value.\n*\n* @param property - The property path to check within the target object.\n*     This can be a single property key or an array of property keys.\n* @param source - The value to compare against the property value in the target object.\n*\n* @returns A function that takes a target object and returns\n*     `true` if the property value at the given path in the target object matches the provided value,\n*     otherwise returns `false`.\n*\n* @example\n* // Using a single property key\n* const checkName = matchesProperty('name', 'Alice');\n* console.log(checkName({ name: 'Alice' })); // true\n* console.log(checkName({ name: 'Bob' })); // false\n*\n* // Using an array of property keys\n* const checkNested = matchesProperty(['address', 'city'], 'New York');\n* console.log(checkNested({ address: { city: 'New York' } })); // true\n* console.log(checkNested({ address: { city: 'Los Angeles' } })); // false\n*/\nfunction matchesProperty(property, source) {\n\tswitch (typeof property) {\n\t\tcase \"object\":\n\t\t\tif (Object.is(property?.valueOf(), -0)) property = \"-0\";\n\t\t\tbreak;\n\t\tcase \"number\":\n\t\t\tproperty = toKey(property);\n\t\t\tbreak;\n\t}\n\tsource = cloneDeep(source);\n\treturn function(target) {\n\t\tconst result = get(target, property);\n\t\tif (result === void 0) return has(target, property);\n\t\tif (source === void 0) return result === void 0;\n\t\treturn isMatch(result, source);\n\t};\n}\n//#endregion\nexport { matchesProperty };\n", "//#region src/function/identity.ts\n/**\n* Returns the input value unchanged.\n*\n* @template T - The type of the input value.\n* @param x - The value to be returned.\n* @returns The input value.\n*\n* @example\n* // Returns 5\n* identity(5);\n*\n* @example\n* // Returns 'hello'\n* identity('hello');\n*\n* @example\n* // Returns { key: 'value' }\n* identity({ key: 'value' });\n*/\nfunction identity(x) {\n\treturn x;\n}\n//#endregion\nexport { identity };\n", "import { identity } from \"../../function/identity.mjs\";\nimport { property } from \"../object/property.mjs\";\nimport { matches } from \"../predicate/matches.mjs\";\nimport { matchesProperty } from \"../predicate/matchesProperty.mjs\";\n//#region src/compat/util/iteratee.ts\n/**\n* Creates a function that returns a value from an element in a collection.\n*\n* You can call `iteratee` with the following types of arguments:\n*\n* - **Function**: Returns the function as-is, which will be called with the element from the collection.\n* - **Property name**: Returns the value of the specified property from the element.\n* - **Property-value pair**: Returns a boolean indicating whether the element's property matches the given value.\n* - **Partial object**: Returns a boolean indicating whether the element matches the properties of the partial object.\n*\n* If you don't provide any arguments or pass `null`, this function will return a function that simply returns its input unchanged.\n*\n* @param value - The value to convert to an iteratee.\n* @returns Returns the new iteratee function.\n* @example\n* const func = iteratee();\n* [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [{ a: 1 }, { a: 2 }, { a: 3 }]\n*\n* const func = iteratee((object) => object.a);\n* [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]\n*\n* const func = iteratee('a');\n* [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]\n*\n* const func = iteratee({ a: 1 });\n* [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }\n*\n* const func = iteratee(['a', 1]);\n* [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }\n*/\nfunction iteratee(value) {\n\tif (value == null) return identity;\n\tswitch (typeof value) {\n\t\tcase \"function\": return value;\n\t\tcase \"object\":\n\t\t\tif (Array.isArray(value) && value.length === 2) return matchesProperty(value[0], value[1]);\n\t\t\treturn matches(value);\n\t\tdefault: return property(value);\n\t}\n}\n//#endregion\nexport { iteratee };\n", "//#region src/compat/predicate/isObjectLike.ts\n/**\n* Checks if the given value is object-like.\n*\n* A value is object-like if its type is object and it is not null.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object-like value.\n*\n* @param value - The value to test if it is an object-like.\n* @returns `true` if the value is an object-like, `false` otherwise.\n*\n* @example\n* const value1 = { a: 1 };\n* const value2 = [1, 2, 3];\n* const value3 = 'abc';\n* const value4 = () => {};\n* const value5 = null;\n*\n* console.log(isObjectLike(value1)); // true\n* console.log(isObjectLike(value2)); // true\n* console.log(isObjectLike(value3)); // false\n* console.log(isObjectLike(value4)); // false\n* console.log(isObjectLike(value5)); // false\n*/\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\n//#endregion\nexport { isObjectLike };\n", "import { isArrayLike } from \"./isArrayLike.mjs\";\nimport { isObjectLike } from \"./isObjectLike.mjs\";\n//#region src/compat/predicate/isArrayLikeObject.ts\n/**\n* Checks if the given value is a non-primitive, array-like object.\n*\n* @param value The value to check.\n* @returns `true` if the value is a non-primitive, array-like object, `false` otherwise.\n*\n* @example\n* isArrayLikeObject([1, 2, 3]); // true\n* isArrayLikeObject({ 0: 'a', length: 1 }); // true\n* isArrayLikeObject('abc'); // false\n* isArrayLikeObject(()=>{}); // false\n*/\nfunction isArrayLikeObject(value) {\n\treturn isObjectLike(value) && isArrayLike(value);\n}\n//#endregion\nexport { isArrayLikeObject };\n", "import { isSymbol } from \"../predicate/isSymbol.mjs\";\n//#region src/compat/util/toNumber.ts\n/**\n* Converts `value` to a number.\n*\n* Unlike `Number()`, this function returns `NaN` for symbols.\n*\n* @param value - The value to convert.\n* @returns Returns the number.\n*\n* @example\n* toNumber(3.2); // => 3.2\n* toNumber(Number.MIN_VALUE); // => 5e-324\n* toNumber(Infinity); // => Infinity\n* toNumber('3.2'); // => 3.2\n* toNumber(Symbol.iterator); // => NaN\n* toNumber(NaN); // => NaN\n*/\nfunction toNumber(value) {\n\tif (isSymbol(value)) return NaN;\n\treturn Number(value);\n}\n//#endregion\nexport { toNumber };\n", "import { toNumber } from \"./toNumber.mjs\";\n//#region src/compat/util/toFinite.ts\n/**\n* Converts `value` to a finite number.\n*\n* @param value - The value to convert.\n* @returns Returns the number.\n*\n* @example\n* toFinite(3.2); // => 3.2\n* toFinite(Number.MIN_VALUE); // => 5e-324\n* toFinite(Infinity); // => 1.7976931348623157e+308\n* toFinite('3.2'); // => 3.2\n* toFinite(Symbol.iterator); // => 0\n* toFinite(NaN); // => 0\n*/\nfunction toFinite(value) {\n\tif (!value) return value === 0 ? value : 0;\n\tvalue = toNumber(value);\n\tif (value === Infinity || value === -Infinity) return (value < 0 ? -1 : 1) * Number.MAX_VALUE;\n\treturn value === value ? value : 0;\n}\n//#endregion\nexport { toFinite };\n", "import { toFinite } from \"./toFinite.mjs\";\n//#region src/compat/util/toInteger.ts\n/**\n* Converts `value` to an integer.\n*\n* This function first converts `value` to a finite number. If the result has any decimal places,\n* they are removed by rounding down to the nearest whole number.\n*\n* @param value - The value to convert.\n* @returns Returns the number.\n*\n* @example\n* toInteger(3.2); // => 3\n* toInteger(Number.MIN_VALUE); // => 0\n* toInteger(Infinity); // => 1.7976931348623157e+308\n* toInteger('3.2'); // => 3\n* toInteger(Symbol.iterator); // => 0\n* toInteger(NaN); // => 0\n*/\nfunction toInteger(value) {\n\tconst finite = toFinite(value);\n\tconst remainder = finite % 1;\n\treturn remainder ? finite - remainder : finite;\n}\n//#endregion\nexport { toInteger };\n", "//#region src/compat/predicate/isString.ts\n/**\n* Checks if a given value is string.\n*\n* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `string`.\n*\n* @param value The value to check if it is string.\n* @returns Returns `true` if `value` is a string, else `false`.\n*\n* @example\n* const value1 = 'abc';\n* const value2 = 123;\n* const value3 = true;\n*\n* console.log(isString(value1)); // true\n* console.log(isString(value2)); // false\n* console.log(isString(value3)); // false\n*/\nfunction isString(value) {\n\treturn typeof value === \"string\" || value instanceof String;\n}\n//#endregion\nexport { isString };\n", "//#region src/compat/function/identity.ts\nfunction identity(x) {\n\treturn x;\n}\n//#endregion\nexport { identity };\n", "import { isSymbol } from \"../predicate/isSymbol.mjs\";\n//#region src/compat/_internal/isKey.ts\n/**  Matches any deep property path. (e.g. `a.b[0].c`)*/\nconst regexIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/;\n/**  Matches any word character (alphanumeric & underscore).*/\nconst regexIsPlainProp = /^\\w*$/;\n/**\n* Checks if `value` is a property name and not a property path. (It's ok that the `value` is not in the keys of the `object`)\n* @param {unknown} value The value to check.\n* @param {unknown} object The object to query.\n* @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n*\n* @example\n* isKey('a', { a: 1 });\n* // => true\n*\n* isKey('a.b', { a: { b: 2 } });\n* // => false\n*/\nfunction isKey(value, object) {\n\tif (Array.isArray(value)) return false;\n\tif (typeof value === \"number\" || typeof value === \"boolean\" || value == null || isSymbol(value)) return true;\n\treturn typeof value === \"string\" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);\n}\n//#endregion\nexport { isKey };\n", "import { isTypedArray as isTypedArray$1 } from \"../../predicate/isTypedArray.mjs\";\n//#region src/compat/predicate/isTypedArray.ts\n/**\n* Checks if a value is a TypedArray.\n* @param x The value to check.\n* @returns Returns true if `x` is a TypedArray, false otherwise.\n*\n* @example\n* const arr = new Uint8Array([1, 2, 3]);\n* isTypedArray(arr); // true\n*\n* const regularArray = [1, 2, 3];\n* isTypedArray(regularArray); // false\n*\n* const buffer = new ArrayBuffer(16);\n* isTypedArray(buffer); // false\n*/\nfunction isTypedArray(x) {\n\treturn isTypedArray$1(x);\n}\n//#endregion\nexport { isTypedArray };\n", "import { toInteger } from \"./toInteger.mjs\";\n//#region src/compat/util/times.ts\n/**\n* Invokes the getValue function n times, returning an array of the results.\n*\n* @template R The return type of the getValue function.\n* @param n - The number of times to invoke getValue.\n* @param getValue - The function to invoke for each index.\n* @returns An array containing the results of invoking getValue n times.\n* @example\n* times(3, (i) => i * 2); // => [0, 2, 4]\n* times(2, () => 'es-toolkit'); // => ['es-toolkit', 'es-toolkit']\n*/\nfunction times(n, getValue) {\n\tn = toInteger(n);\n\tif (n < 1 || !Number.isSafeInteger(n)) return [];\n\tconst result = new Array(n);\n\tfor (let i = 0; i < n; i++) result[i] = typeof getValue === \"function\" ? getValue(i) : i;\n\treturn result;\n}\n//#endregion\nexport { times };\n", "//#region src/compat/_internal/isPrototype.ts\nfunction isPrototype(value) {\n\tconst constructor = value?.constructor;\n\treturn value === (typeof constructor === \"function\" ? constructor.prototype : Object.prototype);\n}\n//#endregion\nexport { isPrototype };\n", "import { eq } from \"../util/eq.mjs\";\n//#region src/compat/_internal/assignValue.ts\nconst assignValue = (object, key, value) => {\n\tconst objValue = object[key];\n\tif (!(Object.hasOwn(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;\n};\n//#endregion\nexport { assignValue };\n", "//#region src/_internal/isUnsafeToWriteProperty.ts\n/**\n* Checks if a property key is unsafe to write to.\n*\n* Writing through `__proto__`, `constructor`, or `prototype` can reach\n* `Object.prototype` and pollute every object, so write paths like `set`,\n* `update`, and `zipObjectDeep` abort when a path segment matches one of\n* these keys, matching lodash's behavior.\n*\n* Read paths like `get` and `unset` use `isUnsafeProperty` instead, which\n* only blocks `__proto__`; lodash keeps reads of `constructor` and\n* `prototype` unrestricted.\n*\n* @param key - The property key to check\n* @returns `true` if the property is unsafe to write to, `false` otherwise\n* @internal\n*/\nfunction isUnsafeToWriteProperty(key) {\n\treturn key === \"__proto__\" || key === \"constructor\" || key === \"prototype\";\n}\n//#endregion\nexport { isUnsafeToWriteProperty };\n", "import { toKey } from \"../_internal/toKey.mjs\";\nimport { toPath } from \"../util/toPath.mjs\";\nimport { get } from \"./get.mjs\";\nimport { isObject } from \"../predicate/isObject.mjs\";\nimport { isIndex } from \"../_internal/isIndex.mjs\";\nimport { isKey } from \"../_internal/isKey.mjs\";\nimport { assignValue } from \"../_internal/assignValue.mjs\";\nimport { isUnsafeToWriteProperty } from \"../../_internal/isUnsafeToWriteProperty.mjs\";\n//#region src/compat/object/updateWith.ts\n/**\n* Updates the value at the specified path of the given object using an updater function and a customizer.\n* If any part of the path does not exist, it will be created.\n*\n* @template T - The type of the object.\n* @template R - The type of the return value.\n* @param obj - The object to modify.\n* @param path - The path of the property to update.\n* @param updater - The function to produce the updated value.\n* @param customizer - The function to customize the update process.\n* @returns The modified object.\n*\n* @example\n* const object = { 'a': [{ 'b': { 'c': 3 } }] };\n* updateWith(object, 'a[0].b.c', (n) => n * n);\n* // => { 'a': [{ 'b': { 'c': 9 } }] }\n*/\nfunction updateWith(obj, path, updater, customizer) {\n\tif (obj == null && !isObject(obj)) return obj;\n\tlet resolvedPath;\n\tif (isKey(path, obj)) resolvedPath = [path];\n\telse if (Array.isArray(path)) resolvedPath = path;\n\telse resolvedPath = toPath(path);\n\tconst updateValue = updater(get(obj, resolvedPath));\n\tlet current = obj;\n\tfor (let i = 0; i < resolvedPath.length && current != null; i++) {\n\t\tconst key = toKey(resolvedPath[i]);\n\t\tif (isUnsafeToWriteProperty(key)) return obj;\n\t\tlet newValue;\n\t\tif (i === resolvedPath.length - 1) newValue = updateValue;\n\t\telse {\n\t\t\tconst objValue = current[key];\n\t\t\tconst customizerResult = customizer?.(objValue, key, obj);\n\t\t\tnewValue = customizerResult !== void 0 ? customizerResult : isObject(objValue) ? objValue : isIndex(resolvedPath[i + 1]) ? [] : {};\n\t\t}\n\t\tassignValue(current, key, newValue);\n\t\tcurrent = current[key];\n\t}\n\treturn obj;\n}\n//#endregion\nexport { updateWith };\n", "import { updateWith } from \"./updateWith.mjs\";\n//#region src/compat/object/set.ts\n/**\n* Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.\n*\n* @template T - The type of the object.\n* @param obj - The object to modify.\n* @param path - The path of the property to set.\n* @param value - The value to set.\n* @returns The modified object.\n*\n* @example\n* // Set a value in a nested object\n* const obj = { a: { b: { c: 3 } } };\n* set(obj, 'a.b.c', 4);\n* console.log(obj.a.b.c); // 4\n*\n* @example\n* // Set a value in an array\n* const arr = [1, 2, 3];\n* set(arr, 1, 4);\n* console.log(arr[1]); // 4\n*\n* @example\n* // Create non-existent path and set value\n* const obj = {};\n* set(obj, 'a.b.c', 4);\n* console.log(obj); // { a: { b: { c: 4 } } }\n*/\nfunction set(obj, path, value) {\n\treturn updateWith(obj, path, () => value, () => void 0);\n}\n//#endregion\nexport { set };\n", "//#region src/function/debounce.ts\n/**\n* Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds\n* have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`\n* method to cancel any pending execution.\n*\n* @template F - The type of function.\n* @param func - The function to debounce.\n* @param debounceMs - The number of milliseconds to delay.\n* @param options - The options object\n* @param options.signal - An optional AbortSignal to cancel the debounced function.\n* @param options.edges - An optional array specifying whether the function should be invoked on the leading edge, trailing edge, or both.\n* @returns A new debounced function with a `cancel` method.\n*\n* @example\n* const debouncedFunction = debounce(() => {\n*   console.log('Function executed');\n* }, 1000);\n*\n* // Will log 'Function executed' after 1 second if not called again in that time\n* debouncedFunction();\n*\n* // Will not log anything as the previous call is canceled\n* debouncedFunction.cancel();\n*\n* // With AbortSignal\n* const controller = new AbortController();\n* const signal = controller.signal;\n* const debouncedWithSignal = debounce(() => {\n*  console.log('Function executed');\n* }, 1000, { signal });\n*\n* debouncedWithSignal();\n*\n* // Will cancel the debounced function call\n* controller.abort();\n*/\nfunction debounce(func, debounceMs, { signal, edges } = {}) {\n\tlet pendingThis = void 0;\n\tlet pendingArgs = null;\n\tconst leading = edges != null && edges.includes(\"leading\");\n\tconst trailing = edges == null || edges.includes(\"trailing\");\n\tconst invoke = () => {\n\t\tif (pendingArgs !== null) {\n\t\t\tfunc.apply(pendingThis, pendingArgs);\n\t\t\tpendingThis = void 0;\n\t\t\tpendingArgs = null;\n\t\t}\n\t};\n\tconst onTimerEnd = () => {\n\t\tif (trailing) invoke();\n\t\tcancel();\n\t};\n\tlet timeoutId = null;\n\tconst schedule = () => {\n\t\tif (timeoutId != null) clearTimeout(timeoutId);\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutId = null;\n\t\t\tonTimerEnd();\n\t\t}, debounceMs);\n\t};\n\tconst cancelTimer = () => {\n\t\tif (timeoutId !== null) {\n\t\t\tclearTimeout(timeoutId);\n\t\t\ttimeoutId = null;\n\t\t}\n\t};\n\tconst cancel = () => {\n\t\tcancelTimer();\n\t\tpendingThis = void 0;\n\t\tpendingArgs = null;\n\t};\n\tconst flush = () => {\n\t\tinvoke();\n\t};\n\tconst debounced = function(...args) {\n\t\tif (signal?.aborted) return;\n\t\tpendingThis = this;\n\t\tpendingArgs = args;\n\t\tconst isFirstCall = timeoutId == null;\n\t\tschedule();\n\t\tif (leading && isFirstCall) invoke();\n\t};\n\tdebounced.schedule = schedule;\n\tdebounced.cancel = cancel;\n\tdebounced.flush = flush;\n\tsignal?.addEventListener(\"abort\", cancel, { once: true });\n\treturn debounced;\n}\n//#endregion\nexport { debounce };\n", "import { debounce as debounce$1 } from \"../../function/debounce.mjs\";\n//#region src/compat/function/debounce.ts\nfunction debounce(func, debounceMs = 0, options = {}) {\n\tif (typeof options !== \"object\") options = {};\n\tconst { leading = false, trailing = true, maxWait } = options;\n\tconst edges = Array(2);\n\tif (leading) edges[0] = \"leading\";\n\tif (trailing) edges[1] = \"trailing\";\n\tlet result = void 0;\n\tlet pendingAt = null;\n\tconst _debounced = debounce$1(function(...args) {\n\t\tresult = func.apply(this, args);\n\t\tpendingAt = null;\n\t}, debounceMs, { edges });\n\tconst debounced = function(...args) {\n\t\tif (maxWait != null) {\n\t\t\tif (pendingAt === null) pendingAt = Date.now();\n\t\t\tif (Date.now() - pendingAt >= maxWait) {\n\t\t\t\tif (leading || trailing) result = func.apply(this, args);\n\t\t\t\tpendingAt = Date.now();\n\t\t\t\t_debounced.cancel();\n\t\t\t\t_debounced.schedule();\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\t_debounced.apply(this, args);\n\t\treturn result;\n\t};\n\tconst flush = () => {\n\t\t_debounced.flush();\n\t\treturn result;\n\t};\n\tdebounced.cancel = _debounced.cancel;\n\tdebounced.flush = flush;\n\treturn debounced;\n}\n//#endregion\nexport { debounce };\n", "import { debounce } from \"./debounce.mjs\";\n//#region src/compat/function/throttle.ts\n/**\n* Creates a throttled function that only invokes the provided function at most once\n* per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n* within the wait time will not trigger the execution of the original function.\n*\n* @template F - The type of function.\n* @param func - The function to throttle.\n* @param throttleMs - The number of milliseconds to throttle executions to.\n* @param options - The options object\n* @param options.signal - An optional AbortSignal to cancel the throttled function.\n* @param options.leading - If `true`, the function will be invoked on the leading edge of the timeout.\n* @param options.trailing - If `true`, the function will be invoked on the trailing edge of the timeout.\n* @returns A new throttled function that accepts the same parameters as the original function.\n*\n* @example\n* const throttledFunction = throttle(() => {\n*   console.log('Function executed');\n* }, 1000);\n*\n* // Will log 'Function executed' immediately\n* throttledFunction();\n*\n* // Will not log anything as it is within the throttle time\n* throttledFunction();\n*\n* // After 1 second\n* setTimeout(() => {\n*   throttledFunction(); // Will log 'Function executed'\n* }, 1000);\n*/\nfunction throttle(func, throttleMs = 0, options = {}) {\n\tconst { leading = true, trailing = true } = options;\n\treturn debounce(func, throttleMs, {\n\t\tleading,\n\t\tmaxWait: throttleMs,\n\t\ttrailing\n\t});\n}\n//#endregion\nexport { throttle };\n", "import { isBuffer } from \"../../predicate/isBuffer.mjs\";\nimport { isArrayLike } from \"../predicate/isArrayLike.mjs\";\nimport { isPrototype } from \"../_internal/isPrototype.mjs\";\nimport { isTypedArray } from \"../predicate/isTypedArray.mjs\";\nimport { times } from \"../util/times.mjs\";\n//#region src/compat/object/keysIn.ts\n/**\n* This function retrieves the names of string-keyed properties from an object, including those inherited from its prototype.\n*\n* - If the value is not an object, it is converted to an object.\n* - Array-like objects are treated like arrays.\n* - Sparse arrays with some missing indices are treated like dense arrays.\n* - If the value is `null` or `undefined`, an empty array is returned.\n* - When handling prototype objects, the `constructor` property is excluded from the results.\n*\n* @param [object] - The object to inspect for keys.\n* @returns An array of string keys from the object.\n*\n* @example\n* const obj = { a: 1, b: 2 };\n* console.log(keysIn(obj)); // ['a', 'b']\n*\n* const arr = [1, 2, 3];\n* console.log(keysIn(arr)); // ['0', '1', '2']\n*\n* function Foo() {}\n* Foo.prototype.a = 1;\n* console.log(keysIn(new Foo())); // ['a']\n*/\nfunction keysIn(object) {\n\tif (object == null) return [];\n\tswitch (typeof object) {\n\t\tcase \"object\":\n\t\tcase \"function\":\n\t\t\tif (isArrayLike(object)) return arrayLikeKeysIn(object);\n\t\t\tif (isPrototype(object)) return prototypeKeysIn(object);\n\t\t\treturn keysInImpl(object);\n\t\tdefault: return keysInImpl(Object(object));\n\t}\n}\nfunction keysInImpl(object) {\n\tconst result = [];\n\tfor (const key in object) result.push(key);\n\treturn result;\n}\nfunction prototypeKeysIn(object) {\n\treturn keysInImpl(object).filter((key) => key !== \"constructor\");\n}\nfunction arrayLikeKeysIn(object) {\n\tconst indices = times(object.length, (index) => `${index}`);\n\tconst filteredKeys = new Set(indices);\n\tif (isBuffer(object)) {\n\t\tfilteredKeys.add(\"offset\");\n\t\tfilteredKeys.add(\"parent\");\n\t}\n\tif (isTypedArray(object)) {\n\t\tfilteredKeys.add(\"buffer\");\n\t\tfilteredKeys.add(\"byteLength\");\n\t\tfilteredKeys.add(\"byteOffset\");\n\t}\n\tconst inheritedKeys = keysInImpl(object).filter((key) => !filteredKeys.has(key));\n\tif (Array.isArray(object)) return [...indices, ...inheritedKeys];\n\treturn [...indices.filter((index) => Object.hasOwn(object, index)), ...inheritedKeys];\n}\n//#endregion\nexport { keysIn };\n", "import { eq } from \"../util/eq.mjs\";\nimport { keysIn } from \"./keysIn.mjs\";\n//#region src/compat/object/assignIn.ts\n/**\n* Assigns properties from multiple source objects to a target object.\n*\n* This function merges the properties of the source objects into the target object,\n* including properties from the prototype chain. If a property in the source objects\n* is equal to the corresponding property in the target object, it will not be overwritten.\n*\n* @param object - The target object to which properties will be assigned.\n* @param sources - The source objects whose properties will be assigned to the target object.\n* @returns The updated target object with properties from the source objects assigned.\n*\n* @example\n* const target = { a: 1 };\n* const result = assignIn(target, { b: 2 }, { c: 3 });\n* console.log(result); // Output: { a: 1, b: 2, c: 3 }\n*/\nfunction assignIn(object, ...sources) {\n\tfor (let i = 0; i < sources.length; i++) assignInImpl(object, sources[i]);\n\treturn object;\n}\nfunction assignInImpl(object, source) {\n\tconst keys = keysIn(source);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tif (!(key in object) || !eq(object[key], source[key])) object[key] = source[key];\n\t}\n}\n//#endregion\nexport { assignIn };\n", "import { isPrimitive } from \"../../predicate/isPrimitive.mjs\";\nimport { getTag } from \"../_internal/getTag.mjs\";\nimport { argumentsTag, arrayBufferTag, arrayTag, booleanTag, dataViewTag, dateTag, float32ArrayTag, float64ArrayTag, int16ArrayTag, int32ArrayTag, int8ArrayTag, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, symbolTag, uint16ArrayTag, uint32ArrayTag, uint8ArrayTag, uint8ClampedArrayTag } from \"../_internal/tags.mjs\";\nimport { isArray } from \"../predicate/isArray.mjs\";\nimport { isTypedArray } from \"../predicate/isTypedArray.mjs\";\n//#region src/compat/object/clone.ts\n/**\n* Creates a shallow clone of the given object.\n*\n* @template T - The type of the object.\n* @param obj - The object to clone.\n* @returns A shallow clone of the given object.\n*\n* @example\n* // Clone a primitive object\n* const num = 29;\n* const clonedNum = clone(num);\n* console.log(clonedNum); // 29\n* console.log(clonedNum === num); // true\n*\n* @example\n* // Clone an array\n* const arr = [1, 2, 3];\n* const clonedArr = clone(arr);\n* console.log(clonedArr); // [1, 2, 3]\n* console.log(clonedArr === arr); // false\n*\n* @example\n* // Clone an object\n* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n* const clonedObj = clone(obj);\n* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n* console.log(clonedObj === obj); // false\n*/\nfunction clone(obj) {\n\tif (isPrimitive(obj)) return obj;\n\tconst tag = getTag(obj);\n\tif (!isCloneableObject(obj)) return {};\n\tif (isArray(obj)) {\n\t\tconst result = Array.from(obj);\n\t\tif (obj.length > 0 && typeof obj[0] === \"string\" && Object.hasOwn(obj, \"index\")) {\n\t\t\tresult.index = obj.index;\n\t\t\tresult.input = obj.input;\n\t\t}\n\t\treturn result;\n\t}\n\tif (isTypedArray(obj)) {\n\t\tconst typedArray = obj;\n\t\tconst Ctor = typedArray.constructor;\n\t\treturn new Ctor(typedArray.buffer, typedArray.byteOffset, typedArray.length);\n\t}\n\tif (tag === \"[object ArrayBuffer]\") return new ArrayBuffer(obj.byteLength);\n\tif (tag === \"[object DataView]\") {\n\t\tconst dataView = obj;\n\t\tconst buffer = dataView.buffer;\n\t\tconst byteOffset = dataView.byteOffset;\n\t\tconst byteLength = dataView.byteLength;\n\t\tconst clonedBuffer = new ArrayBuffer(byteLength);\n\t\tconst srcView = new Uint8Array(buffer, byteOffset, byteLength);\n\t\tnew Uint8Array(clonedBuffer).set(srcView);\n\t\treturn new DataView(clonedBuffer);\n\t}\n\tif (tag === \"[object Boolean]\" || tag === \"[object Number]\" || tag === \"[object String]\") {\n\t\tconst Ctor = obj.constructor;\n\t\tconst clone = new Ctor(obj.valueOf());\n\t\tif (tag === \"[object String]\") cloneStringObjectProperties(clone, obj);\n\t\telse copyOwnProperties(clone, obj);\n\t\treturn clone;\n\t}\n\tif (tag === \"[object Date]\") return new Date(Number(obj));\n\tif (tag === \"[object RegExp]\") {\n\t\tconst regExp = obj;\n\t\tconst clone = new RegExp(regExp.source, regExp.flags);\n\t\tclone.lastIndex = regExp.lastIndex;\n\t\treturn clone;\n\t}\n\tif (tag === \"[object Symbol]\") return Object(Symbol.prototype.valueOf.call(obj));\n\tif (tag === \"[object Map]\") {\n\t\tconst map = obj;\n\t\tconst result = /* @__PURE__ */ new Map();\n\t\tmap.forEach((obj, key) => {\n\t\t\tresult.set(key, obj);\n\t\t});\n\t\treturn result;\n\t}\n\tif (tag === \"[object Set]\") {\n\t\tconst set = obj;\n\t\tconst result = /* @__PURE__ */ new Set();\n\t\tset.forEach((obj) => {\n\t\t\tresult.add(obj);\n\t\t});\n\t\treturn result;\n\t}\n\tif (tag === \"[object Arguments]\") {\n\t\tconst args = obj;\n\t\tconst result = {};\n\t\tcopyOwnProperties(result, args);\n\t\tresult.length = args.length;\n\t\tresult[Symbol.iterator] = args[Symbol.iterator];\n\t\treturn result;\n\t}\n\tconst result = {};\n\tcopyPrototype(result, obj);\n\tcopyOwnProperties(result, obj);\n\tcopySymbolProperties(result, obj);\n\treturn result;\n}\nfunction isCloneableObject(object) {\n\tswitch (getTag(object)) {\n\t\tcase argumentsTag:\n\t\tcase arrayTag:\n\t\tcase arrayBufferTag:\n\t\tcase dataViewTag:\n\t\tcase booleanTag:\n\t\tcase dateTag:\n\t\tcase float32ArrayTag:\n\t\tcase float64ArrayTag:\n\t\tcase int8ArrayTag:\n\t\tcase int16ArrayTag:\n\t\tcase int32ArrayTag:\n\t\tcase mapTag:\n\t\tcase numberTag:\n\t\tcase objectTag:\n\t\tcase regexpTag:\n\t\tcase setTag:\n\t\tcase stringTag:\n\t\tcase symbolTag:\n\t\tcase uint8ArrayTag:\n\t\tcase uint8ClampedArrayTag:\n\t\tcase uint16ArrayTag:\n\t\tcase uint32ArrayTag: return true;\n\t\tdefault: return false;\n\t}\n}\nfunction copyOwnProperties(target, source) {\n\tfor (const key in source) if (Object.hasOwn(source, key)) target[key] = source[key];\n}\nfunction copySymbolProperties(target, source) {\n\tconst symbols = Object.getOwnPropertySymbols(source);\n\tfor (let i = 0; i < symbols.length; i++) {\n\t\tconst symbol = symbols[i];\n\t\tif (Object.prototype.propertyIsEnumerable.call(source, symbol)) target[symbol] = source[symbol];\n\t}\n}\nfunction cloneStringObjectProperties(target, source) {\n\tconst stringLength = source.valueOf().length;\n\tfor (const key in source) if (Object.hasOwn(source, key) && (Number.isNaN(Number(key)) || Number(key) >= stringLength)) target[key] = source[key];\n}\nfunction copyPrototype(target, source) {\n\tconst proto = Object.getPrototypeOf(source);\n\tif (proto !== null) {\n\t\tif (typeof source.constructor === \"function\") Object.setPrototypeOf(target, proto);\n\t}\n}\n//#endregion\nexport { clone };\n", "//#region src/object/mapValues.ts\n/**\n* Creates a new object with the same keys as the given object, but with values generated\n* by running each own enumerable property of the object through the iteratee function.\n*\n* @template T - The type of the object.\n* @template K - The type of the keys in the object.\n* @template V - The type of the new values generated by the iteratee function.\n*\n* @param object - The object to iterate over.\n* @param getNewValue - The function invoked per own enumerable property.\n* @returns Returns the new mapped object.\n*\n* @example\n* // Example usage:\n* const obj = { a: 1, b: 2 };\n* const result = mapValues(obj, (value) => value * 2);\n* console.log(result); // { a: 2, b: 4 }\n*/\nfunction mapValues(object, getNewValue) {\n\tconst result = {};\n\tconst keys = Object.keys(object);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tconst value = object[key];\n\t\tresult[key] = getNewValue(value, key, object);\n\t}\n\treturn result;\n}\n//#endregion\nexport { mapValues };\n", "import { identity } from \"../../function/identity.mjs\";\nimport { mapValues as mapValues$1 } from \"../../object/mapValues.mjs\";\nimport { iteratee } from \"../util/iteratee.mjs\";\n//#region src/compat/object/mapValues.ts\n/**\n* Creates a new object with the same keys as the given object, but with values generated\n* by running each own enumerable property of the object through the iteratee function.\n*\n* @template T - The type of the object.\n* @template K - The type of the keys in the object.\n* @template V - The type of the new values generated by the iteratee function.\n*\n* @param object - The object to iterate over.\n* @param [getNewValue] -\n*        The function invoked per own enumerable property, or a path to generate new values.\n* @returns Returns the new mapped object.\n*\n* @example\n* // Example usage:\n* const obj = { a: 1, b: 2 };\n* const result = mapValues(obj, (value) => value * 2);\n* console.log(result); // { a: 2, b: 4 }\n*/\nfunction mapValues(object, getNewValue = identity) {\n\tif (object == null) return {};\n\treturn mapValues$1(object, iteratee(getNewValue));\n}\n//#endregion\nexport { mapValues };\n", "import { isPrimitive } from \"../predicate/isPrimitive.mjs\";\nimport { isTypedArray } from \"../predicate/isTypedArray.mjs\";\n//#region src/object/clone.ts\n/**\n* Creates a shallow clone of the given object.\n*\n* @template T - The type of the object.\n* @param obj - The object to clone.\n* @returns A shallow clone of the given object.\n*\n* @example\n* // Clone a primitive value\n* const num = 29;\n* const clonedNum = clone(num);\n* console.log(clonedNum); // 29\n* console.log(clonedNum === num); // true\n*\n* @example\n* // Clone an array\n* const arr = [1, 2, 3];\n* const clonedArr = clone(arr);\n* console.log(clonedArr); // [1, 2, 3]\n* console.log(clonedArr === arr); // false\n*\n* @example\n* // Clone an object\n* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n* const clonedObj = clone(obj);\n* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n* console.log(clonedObj === obj); // false\n*/\nfunction clone(obj) {\n\tif (isPrimitive(obj)) return obj;\n\tif (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== \"undefined\" && obj instanceof SharedArrayBuffer) return obj.slice(0);\n\tconst prototype = Object.getPrototypeOf(obj);\n\tif (prototype == null) return Object.assign(Object.create(prototype), obj);\n\tconst Constructor = prototype.constructor;\n\tif (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);\n\tif (obj instanceof RegExp) {\n\t\tconst newRegExp = new Constructor(obj);\n\t\tnewRegExp.lastIndex = obj.lastIndex;\n\t\treturn newRegExp;\n\t}\n\tif (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));\n\tif (obj instanceof Error) {\n\t\tlet newError;\n\t\tif (obj instanceof AggregateError) newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });\n\t\telse newError = new Constructor(obj.message, { cause: obj.cause });\n\t\tnewError.stack = obj.stack;\n\t\tObject.assign(newError, obj);\n\t\treturn newError;\n\t}\n\tif (typeof File !== \"undefined\" && obj instanceof File) return new Constructor([obj], obj.name, {\n\t\ttype: obj.type,\n\t\tlastModified: obj.lastModified\n\t});\n\tif (typeof obj === \"object\") return Object.assign(Object.create(prototype), obj);\n\treturn obj;\n}\n//#endregion\nexport { clone };\n", "import { isPrimitive } from \"../../predicate/isPrimitive.mjs\";\nimport { clone } from \"../../object/clone.mjs\";\nimport { getSymbols } from \"../_internal/getSymbols.mjs\";\nimport { isBuffer } from \"../../predicate/isBuffer.mjs\";\nimport { isUnsafeProperty } from \"../../_internal/isUnsafeProperty.mjs\";\nimport { isPlainObject } from \"../predicate/isPlainObject.mjs\";\nimport { cloneDeep } from \"./cloneDeep.mjs\";\nimport { isArguments } from \"../predicate/isArguments.mjs\";\nimport { isObjectLike } from \"../predicate/isObjectLike.mjs\";\nimport { isArrayLikeObject } from \"../predicate/isArrayLikeObject.mjs\";\nimport { isTypedArray } from \"../predicate/isTypedArray.mjs\";\n//#region src/compat/object/mergeWith.ts\n/**\n* Merges the properties of one or more source objects into the target object using a customizer function.\n*\n* This function performs a deep merge, recursively merging nested objects and arrays.\n* If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.\n* If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.\n*\n* You can provide a custom `merge` function to control how properties are merged. The `merge` function is called for each property that is being merged and receives the following arguments:\n*\n* - `targetValue`: The current value of the property in the target object.\n* - `sourceValue`: The value of the property in the source object.\n* - `key`: The key of the property being merged.\n* - `target`: The target object.\n* - `source`: The source object.\n* - `stack`: A `Map` used to keep track of objects that have already been processed to handle circular references.\n*\n* The `merge` function should return the value to be set in the target object. If it returns `undefined`, a default deep merge will be applied for arrays and objects.\n*\n* The function can handle multiple source objects and will merge them all into the target object.\n*\n* @param object - The target object into which the source object properties will be merged. This object is modified in place.\n* @param otherArgs - Additional source objects to merge into the target object, including the custom `merge` function.\n* @returns The updated target object with properties from the source object(s) merged in.\n*\n* @example\n* const target = { a: 1, b: 2 };\n* const source = { b: 3, c: 4 };\n*\n* mergeWith(target, source, (targetValue, sourceValue) => {\n*   if (typeof targetValue === 'number' && typeof sourceValue === 'number') {\n*     return targetValue + sourceValue;\n*   }\n* });\n* // Returns { a: 1, b: 5, c: 4 }\n* @example\n* const target = { a: [1], b: [2] };\n* const source = { a: [3], b: [4] };\n*\n* const result = mergeWith(target, source, (objValue, srcValue) => {\n*   if (Array.isArray(objValue)) {\n*     return objValue.concat(srcValue);\n*   }\n* });\n*\n* expect(result).toEqual({ a: [1, 3], b: [2, 4] });\n*/\nfunction mergeWith(object, ...otherArgs) {\n\tconst sources = otherArgs.slice(0, -1);\n\tconst merge = otherArgs[otherArgs.length - 1];\n\tlet result = object;\n\tfor (let i = 0; i < sources.length; i++) {\n\t\tconst source = sources[i];\n\t\tresult = mergeWithDeep(result, source, merge, /* @__PURE__ */ new Map());\n\t}\n\treturn result;\n}\nfunction mergeWithDeep(target, source, merge, stack) {\n\tif (isPrimitive(target)) target = Object(target);\n\tif (source == null || typeof source !== \"object\") return target;\n\tif (stack.has(source)) return clone(stack.get(source));\n\tstack.set(source, target);\n\tif (Array.isArray(source)) {\n\t\tsource = source.slice();\n\t\tfor (let i = 0; i < source.length; i++) if (!(i in source)) source[i] = void 0;\n\t}\n\tconst sourceKeys = [...Object.keys(source), ...getSymbols(source)];\n\tfor (let i = 0; i < sourceKeys.length; i++) {\n\t\tconst key = sourceKeys[i];\n\t\tif (isUnsafeProperty(key)) continue;\n\t\tlet sourceValue = source[key];\n\t\tlet targetValue = target[key];\n\t\tif (isArguments(sourceValue)) sourceValue = { ...sourceValue };\n\t\tif (isArguments(targetValue)) targetValue = { ...targetValue };\n\t\tif (isBuffer(sourceValue)) sourceValue = cloneDeep(sourceValue);\n\t\tif (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) {\n\t\t\tconst cloned = [];\n\t\t\tconst targetKeys = Reflect.ownKeys(targetValue);\n\t\t\tfor (let i = 0; i < targetKeys.length; i++) {\n\t\t\t\tconst targetKey = targetKeys[i];\n\t\t\t\tcloned[targetKey] = targetValue[targetKey];\n\t\t\t}\n\t\t\ttargetValue = cloned;\n\t\t} else if (isArrayLikeObject(targetValue)) {\n\t\t\tconst cloned = [];\n\t\t\tfor (let i = 0; i < targetValue.length; i++) cloned[i] = targetValue[i];\n\t\t\ttargetValue = cloned;\n\t\t} else targetValue = [];\n\t\tconst merged = merge(targetValue, sourceValue, key, target, source, stack);\n\t\tif (merged !== void 0) target[key] = merged;\n\t\telse if (Array.isArray(sourceValue)) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n\t\telse if (isObjectLike(targetValue) && isObjectLike(sourceValue) && (isPlainObject(targetValue) || isPlainObject(sourceValue) || isTypedArray(targetValue) || isTypedArray(sourceValue))) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);\n\t\telse if (targetValue == null && isPlainObject(sourceValue)) target[key] = mergeWithDeep({}, sourceValue, merge, stack);\n\t\telse if (targetValue == null && isTypedArray(sourceValue)) target[key] = cloneDeep(sourceValue);\n\t\telse if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;\n\t}\n\treturn target;\n}\n//#endregion\nexport { mergeWith };\n", "import { noop } from \"../../function/noop.mjs\";\nimport { mergeWith } from \"./mergeWith.mjs\";\n//#region src/compat/object/merge.ts\n/**\n* Merges the properties of one or more source objects into the target object.\n*\n* This function performs a deep merge, recursively merging nested objects and arrays.\n* If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.\n* If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.\n*\n* The function can handle multiple source objects and will merge them all into the target object.\n*\n* @param object - The target object into which the source object properties will be merged. This object is modified in place.\n* @param sources - The source objects whose properties will be merged into the target object.\n* @returns The updated target object with properties from the source object(s) merged in.\n*\n* @example\n* const target = { a: 1, b: { x: 1, y: 2 } };\n* const source = { b: { y: 3, z: 4 }, c: 5 };\n*\n* const result = merge(target, source);\n* console.log(result);\n* // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }\n*\n* @example\n* const target = { a: [1, 2], b: { x: 1 } };\n* const source = { a: [3], b: { y: 2 } };\n*\n* const result = merge(target, source);\n* console.log(result);\n* // Output: { a: [3], b: { x: 1, y: 2 } }\n*\n* @example\n* const target = { a: null };\n* const source = { a: [1, 2, 3] };\n*\n* const result = merge(target, source);\n* console.log(result);\n* // Output: { a: [1, 2, 3] }\n*/\nfunction merge(object, ...sources) {\n\treturn mergeWith(object, ...sources, noop);\n}\n//#endregion\nexport { merge };\n", "//#region src/compat/predicate/isFunction.ts\n/**\n* Checks if `value` is a function.\n*\n* @param value The value to check.\n* @returns Returns `true` if `value` is a function, else `false`.\n*\n* @example\n* isFunction(Array.prototype.slice); // true\n* isFunction(async function () {}); // true\n* isFunction(function* () {}); // true\n* isFunction(Proxy); // true\n* isFunction(Int8Array); // true\n*/\nfunction isFunction(value) {\n\treturn typeof value === \"function\";\n}\n//#endregion\nexport { isFunction };\n", "import { isPlainObject } from \"./isPlainObject.mjs\";\nimport { isObjectLike } from \"./isObjectLike.mjs\";\n//#region src/compat/predicate/isElement.ts\n/**\n* Checks if `value` is likely a DOM element.\n*\n* @param value The value to check.\n* @returns Returns `true` if `value` is a DOM element, else `false`.\n*\n* @example\n* console.log(isElement(document.body)); // true\n* console.log(isElement('<body>')); // false\n*/\nfunction isElement(value) {\n\treturn isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n}\n//#endregion\nexport { isElement };\n", "import { isBuffer } from \"../../predicate/isBuffer.mjs\";\nimport { isArrayLike } from \"./isArrayLike.mjs\";\nimport { isArguments } from \"./isArguments.mjs\";\nimport { isPrototype } from \"../_internal/isPrototype.mjs\";\nimport { isTypedArray } from \"./isTypedArray.mjs\";\n//#region src/compat/predicate/isEmpty.ts\n/**\n* Checks if a given value is empty.\n*\n* - If the given value is a string, checks if it is an empty string.\n* - If the given value is an array, `Map`, or `Set`, checks if its size is 0.\n* - If the given value is an [array-like object](../predicate/isArrayLike.md), checks if its length is 0.\n* - If the given value is an object, checks if it is an empty object with no properties.\n* - Primitive values (booleans, numbers, or bigints) are considered empty.\n*\n* @param [value] - The value to check.\n* @returns `true` if the value is empty, `false` otherwise.\n*\n* @example\n* isEmpty(); // true\n* isEmpty(null); // true\n* isEmpty(\"\"); // true\n* isEmpty([]); // true\n* isEmpty({}); // true\n* isEmpty(new Map()); // true\n* isEmpty(new Set()); // true\n* isEmpty(\"hello\"); // false\n* isEmpty([1, 2, 3]); // false\n* isEmpty({ a: 1 }); // false\n* isEmpty(new Map([[\"key\", \"value\"]])); // false\n* isEmpty(new Set([1, 2, 3])); // false\n*/\nfunction isEmpty(value) {\n\tif (value == null) return true;\n\tif (isArrayLike(value)) {\n\t\tif (typeof value.splice !== \"function\" && typeof value !== \"string\" && !isBuffer(value) && !isTypedArray(value) && !isArguments(value)) return false;\n\t\treturn value.length === 0;\n\t}\n\tif (typeof value === \"object\" || typeof value === \"function\") {\n\t\tif (value instanceof Map || value instanceof Set) return value.size === 0;\n\t\tconst keys = Object.keys(value);\n\t\tif (isPrototype(value)) return keys.filter((x) => x !== \"constructor\").length === 0;\n\t\treturn keys.length === 0;\n\t}\n\treturn true;\n}\n//#endregion\nexport { isEmpty };\n", "//#region src/function/after.ts\n/**\n* Creates a function that only executes starting from the `n`-th call.\n* The provided function will be invoked starting from the `n`-th call.\n*\n* This is particularly useful for scenarios involving events or asynchronous operations\n* where an action should occur only after a certain number of invocations.\n*\n* @template F - The type of the function to be invoked.\n* @param n - The number of calls required for `func` to execute.\n* @param func - The function to be invoked.\n* @returns A new function that:\n* - Tracks the number of calls.\n* - Invokes `func` starting from the `n`-th call.\n* - Returns `undefined` if fewer than `n` calls have been made.\n* @throws {Error} - Throws an error if `n` is negative.\n* @example\n*\n* const afterFn = after(3, () => {\n*  console.log(\"called\")\n* });\n*\n* // Will not log anything.\n* afterFn()\n* // Will not log anything.\n* afterFn()\n* // Will log 'called'.\n* afterFn()\n*/\nfunction after(n, func) {\n\tif (!Number.isInteger(n) || n < 0) throw new Error(`n must be a non-negative integer.`);\n\tlet counter = 0;\n\treturn (...args) => {\n\t\tif (++counter >= n) return func(...args);\n\t};\n}\n//#endregion\nexport { after };\n", "import { after } from \"../../function/after.mjs\";\nimport { isEqualWith as isEqualWith$1 } from \"../../predicate/isEqualWith.mjs\";\n//#region src/compat/predicate/isEqualWith.ts\n/**\n* Compares two values for equality using a custom comparison function.\n*\n* The custom function allows for fine-tuned control over the comparison process. If it returns a boolean, that result determines the equality. If it returns undefined, the function falls back to the default equality comparison.\n*\n* This function also uses the custom equality function to compare values inside objects,\n* arrays, maps, sets, and other complex structures, ensuring a deep comparison.\n*\n* This approach provides flexibility in handling complex comparisons while maintaining efficient default behavior for simpler cases.\n*\n* The custom comparison function can take up to six parameters:\n* - `x`: The value from the first object `a`.\n* - `y`: The value from the second object `b`.\n* - `property`: The property key used to get `x` and `y`.\n* - `xParent`: The parent of the first value `x`.\n* - `yParent`: The parent of the second value `y`.\n* - `stack`: An internal stack (Map) to handle circular references.\n*\n* @param a - The first value to compare.\n* @param b - The second value to compare.\n* @param [areValuesEqual=noop] - A function to customize the comparison.\n*   If it returns a boolean, that result will be used. If it returns undefined,\n*   the default equality comparison will be used.\n* @returns `true` if the values are equal according to the customizer, otherwise `false`.\n*\n* @example\n* const customizer = (a, b) => {\n*   if (typeof a === 'string' && typeof b === 'string') {\n*     return a.toLowerCase() === b.toLowerCase();\n*   }\n* };\n* isEqualWith('Hello', 'hello', customizer); // true\n* isEqualWith({ a: 'Hello' }, { a: 'hello' }, customizer); // true\n* isEqualWith([1, 2, 3], [1, 2, 3], customizer); // true\n*/\nfunction isEqualWith(a, b, areValuesEqual) {\n\tif (typeof areValuesEqual !== \"function\") areValuesEqual = () => void 0;\n\treturn isEqualWith$1(a, b, (...args) => {\n\t\tconst result = areValuesEqual(...args);\n\t\tif (result !== void 0) return Boolean(result);\n\t\tif (a instanceof Map && b instanceof Map) return isEqualWith(Array.from(a), Array.from(b), after(2, areValuesEqual));\n\t\tif (a instanceof Set && b instanceof Set) return isEqualWith(Array.from(a), Array.from(b), after(2, areValuesEqual));\n\t});\n}\n//#endregion\nexport { isEqualWith };\n", "//#region src/string/escapeRegExp.ts\n/**\n* Escapes the RegExp special characters \"^\", \"$\", \"\\\\\", \".\", \"*\", \"+\", \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `str`.\n*\n* @param str The string to escape.\n* @returns Returns the escaped string.\n*\n* @example\n* import { escapeRegExp } from 'es-toolkit/string';\n*\n* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\\[es-toolkit\\]\\(https://es-toolkit\\.dev/\\)'\n*/\nfunction escapeRegExp(str) {\n\treturn str.replace(/[\\\\^$.*+?()[\\]{}|]/g, \"\\\\$&\");\n}\n//#endregion\nexport { escapeRegExp };\n", "import { escapeRegExp as escapeRegExp$1 } from \"../../string/escapeRegExp.mjs\";\nimport { toString } from \"../util/toString.mjs\";\n//#region src/compat/string/escapeRegExp.ts\n/**\n* Escapes the RegExp special characters \"^\", \"$\", \"\\\\\", \".\", \"*\", \"+\", \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `str`.\n*\n* @param str The string to escape.\n* @returns Returns the escaped string.\n*\n* @example\n* import { escapeRegExp } from 'es-toolkit/string';\n*\n* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\\[es-toolkit\\]\\(https://es-toolkit\\.dev/\\)'\n*/\nfunction escapeRegExp(str) {\n\treturn escapeRegExp$1(toString(str));\n}\n//#endregion\nexport { escapeRegExp };\n", "//#region src/string/upperFirst.ts\n/**\n* Converts the first character of string to upper case.\n*\n* @param str - The string that is to be changed\n* @returns The converted string.\n*\n* @example\n* const convertedStr1 = upperFirst('fred') // returns 'Fred'\n* const convertedStr2 = upperFirst('Fred') // returns 'Fred'\n* const convertedStr3 = upperFirst('FRED') // returns 'FRED'\n*/\nfunction upperFirst(str) {\n\treturn str.substring(0, 1).toUpperCase() + str.substring(1);\n}\n//#endregion\nexport { upperFirst };\n", "import { upperFirst as upperFirst$1 } from \"../../string/upperFirst.mjs\";\nimport { toString } from \"../util/toString.mjs\";\n//#region src/compat/string/upperFirst.ts\n/**\n* Converts the first character of string to upper case.\n*\n* @param str - The string that is to be changed\n* @returns The converted string.\n*\n* @example\n* const convertedStr1 = upperFirst('fred') // returns 'Fred'\n* const convertedStr2 = upperFirst('Fred') // returns 'Fred'\n* const convertedStr3 = upperFirst('FRED') // returns 'FRED'\n*/\nfunction upperFirst(str) {\n\treturn upperFirst$1(toString(str));\n}\n//#endregion\nexport { upperFirst };\n", "import { 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.3\";\nconst releaseDate = new Date(2026, 9, 27);\n/* v8 ignore next -- @preserve */\nif (globalThis.CKEDITOR_VERSION)\n /**\n* This error is thrown when, due to a mistake in the way CKEditor&nbsp;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&nbsp;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&nbsp;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&nbsp;5 you use, you may need to downgrade the CKEditor&nbsp;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&nbsp;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&nbsp;5 packages.\n*\n* - **New installation methods (NIM)** &ndash; Imports from the `ckeditor5` and `ckeditor5-premium-features` packages.\n* - **Optimized build** for the new installation methods &ndash; Imports from the `@ckeditor/ckeditor5-<NAME>/dist/index.js`.\n* - **Predefined builds** (no longer supported) &ndash; Imports from the `@ckeditor/ckeditor5-build-<NAME>` packages.\n* - **Default imports** (legacy) &ndash; Imports from the `@ckeditor/ckeditor5-<NAME>` packages (default export).\n* - **`src`** (legacy) &ndash; Imports from the `@ckeditor/ckeditor5-<NAME>/src/*`.\n* - **DLL builds** (legacy) &ndash; 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&nbsp;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&nbsp;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) {\n\t\t\t\t\tif (eventCallbacks.length === 1) delete emitterInfo.callbacks[event];\n\t\t\t\t\telse removeEventListener(this, emitter, event, callback);\n\t\t\t\t}\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\tconst colonIndex = name.lastIndexOf(\":\");\n\t\tname = colonIndex > -1 ? name.substring(0, colonIndex) : \"\";\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) {\n\t\t\tif (isSourceRange) {\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects(source);\n\t\t\t\tcopyRectProperties(this, Rect.getBoundingRect(rangeRects));\n\t\t\t} else copyRectProperties(this, source.getBoundingClientRect());\n\t\t} else 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)) {\n\t\t\tif (alignToTop) scrollY += rect.top - viewportRect.top - viewportOffset.top;\n\t\t\telse scrollY += rect.bottom - viewportRect.bottom + viewportOffset.bottom;\n\t\t}\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)) {\n\t\t\t\tif (alignToTop) parent.scrollTop += targetRect.top - parentRect.top - ancestorOffset;\n\t\t\t\telse parent.scrollTop += targetRect.bottom - parentRect.bottom + ancestorOffset;\n\t\t\t}\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", "/**\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/**\n * @module utils/dom/global\n */\n\n// This interface exists to make our API pages more readable.\n/**\n * A helper (module) giving an access to the global DOM objects such as `window` and `document`.\n */\nexport interface GlobalType {\n\treadonly window: Window & typeof globalThis;\n\treadonly document: Document;\n}\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: GlobalType; // named globalVar instead of global: https://github.com/ckeditor/ckeditor5/issues/12971\n\n// In some environments window and document API might not be available.\ntry {\n\tglobalVar = { window, document };\n} catch {\n\t/* v8 ignore start -- @preserve */\n\n\t// It's not possible to mock a window object to simulate lack of a window object without writing extremely convoluted code.\n\t// Let's cast it to not change module's API.\n\t// We only handle this so loading editor in environments without window and document doesn't fail.\n\t// For better DX we shouldn't introduce mixed types and require developers to check the type manually.\n\t// This module should not be used on purpose in any environment outside browser.\n\tglobalVar = { window: {} as any, document: {} as any };\n\n\t/* v8 ignore stop -- @preserve */\n}\n\nexport { globalVar as global };\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/**\n * @module utils/env\n */\n\nimport { global } from './dom/global.js';\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 */\nexport function getUserAgent(): string {\n\t// In some environments navigator API might not be available.\n\ttry {\n\t\treturn navigator.userAgent.toLowerCase();\n\t} catch {\n\t\treturn '';\n\t}\n}\n\nconst userAgent = /* #__PURE__ */ getUserAgent();\n\n// This interface exists to make our API pages more readable.\n/**\n * A namespace containing environment and browser information.\n */\nexport interface EnvType {\n\n\t/**\n\t * Indicates that the application is running on Macintosh.\n\t */\n\treadonly isMac: boolean;\n\n\t/**\n\t * Indicates that the application is running on Windows.\n\t */\n\treadonly isWindows: boolean;\n\n\t/**\n\t * Indicates that the application is running in Firefox (Gecko).\n\t */\n\treadonly isGecko: boolean;\n\n\t/**\n\t * Indicates that the application is running in Safari.\n\t */\n\treadonly isSafari: boolean;\n\n\t/**\n\t * Indicates that the application is running in iOS.\n\t */\n\treadonly isiOS: boolean;\n\n\t/**\n\t * Indicates that the application is running on Android mobile device.\n\t */\n\treadonly isAndroid: boolean;\n\n\t/**\n\t * Indicates that the application is running in a browser using the Blink engine.\n\t */\n\treadonly isBlink: boolean;\n\n\t/**\n\t * Indicates that the user agent has enabled a forced colors mode (e.g. Windows High Contrast mode).\n\t *\n\t * Note that the value of this property is evaluated each time it is accessed, and it may change over time, if the environment\n\t * settings have changed.\n\t */\n\treadonly isMediaForcedColors: boolean;\n\n\t/**\n\t * Indicates that \"prefer reduced motion\" browser setting is active.\n\t *\n\t * Note that the value of this property is evaluated each time it is accessed, and it may change over time, if the environment\n\t * settings have changed.\n\t */\n\treadonly isMotionReduced: boolean;\n\n\t/**\n\t * Environment features information.\n\t */\n\treadonly features: EnvFeaturesType;\n}\n\nexport interface EnvFeaturesType {\n\n\t/**\n\t * Indicates that the environment supports ES2018 Unicode property escapes — like `\\p{P}` or `\\p{L}`.\n\t * More information about unicode properties might be found\n\t * [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).\n\t */\n\treadonly isRegExpUnicodePropertySupported: boolean;\n}\n\n/**\n * A namespace containing environment and browser information.\n */\nexport const env: EnvType = {\n\tisMac: /* #__PURE__ */ isMac( userAgent ),\n\n\tisWindows: /* #__PURE__ */ isWindows( userAgent ),\n\n\tisGecko: /* #__PURE__ */ isGecko( userAgent ),\n\n\tisSafari: /* #__PURE__ */ isSafari( userAgent ),\n\n\tisiOS: /* #__PURE__ */ isiOS( userAgent ),\n\n\tisAndroid: /* #__PURE__ */ isAndroid( userAgent ),\n\n\tisBlink: /* #__PURE__ */ isBlink( userAgent ),\n\n\tget isMediaForcedColors() {\n\t\treturn isMediaForcedColors();\n\t},\n\n\tget isMotionReduced() {\n\t\treturn isMotionReduced();\n\t},\n\n\tfeatures: {\n\t\tisRegExpUnicodePropertySupported: /* #__PURE__ */ isRegExpUnicodePropertySupported()\n\t}\n};\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 */\nexport function isMac( userAgent: string ): boolean {\n\treturn userAgent.indexOf( 'macintosh' ) > -1;\n}\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 */\nexport function isWindows( userAgent: string ): boolean {\n\treturn userAgent.indexOf( 'windows' ) > -1;\n}\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 */\nexport function isGecko( userAgent: string ): boolean {\n\treturn !!userAgent.match( /gecko\\/\\d+/ );\n}\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 */\nexport function isSafari( userAgent: string ): boolean {\n\treturn userAgent.indexOf( ' applewebkit/' ) > -1 && userAgent.indexOf( 'chrome' ) === -1;\n}\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 */\nexport function isiOS( userAgent: string ): boolean {\n\t// \"Request mobile site\" || \"Request desktop site\".\n\treturn !!userAgent.match( /iphone|ipad/i ) || ( isMac( userAgent ) && navigator.maxTouchPoints > 0 );\n}\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 */\nexport function isAndroid( userAgent: string ): boolean {\n\treturn userAgent.indexOf( 'android' ) > -1;\n}\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 */\nexport function isBlink( userAgent: string ): boolean {\n\t// The Edge browser before switching to the Blink engine used to report itself as Chrome (and \"Edge/\")\n\t// but after switching to the Blink it replaced \"Edge/\" with \"Edg/\".\n\treturn userAgent.indexOf( 'chrome/' ) > -1 && userAgent.indexOf( 'edge/' ) < 0;\n}\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 */\nexport function isRegExpUnicodePropertySupported(): boolean {\n\tlet isSupported = false;\n\n\t// Feature detection for Unicode properties. Added in ES2018. Currently Firefox does not support it.\n\t// See https://github.com/ckeditor/ckeditor5-mention/issues/44#issuecomment-487002174.\n\n\ttry {\n\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\tisSupported = 'ć'.search( new RegExp( '[\\\\p{L}]', 'u' ) ) === 0;\n\t} catch {\n\t\t// Firefox throws a SyntaxError when the group is unsupported.\n\t}\n\n\treturn isSupported;\n}\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 */\nexport function isMediaForcedColors(): boolean {\n\treturn global.window.matchMedia ? global.window.matchMedia( '(forced-colors: active)' ).matches : false;\n}\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 */\nexport function isMotionReduced(): boolean {\n\treturn global.window.matchMedia ? global.window.matchMedia( '(prefers-reduced-motion)' ).matches : false;\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/**\n * @module utils/fastdiff\n */\n\nimport type { DiffResult } from './diff.js';\nimport type { Change } from './difftochanges.js';\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 */\nexport function fastDiff<T, AtomicChanges extends boolean = false>(\n\ta: ArrayLike<T>,\n\tb: ArrayLike<T>,\n\tcmp?: ( a: T, b: T ) => boolean,\n\tatomicChanges?: AtomicChanges\n): Array<AtomicChanges extends true ? DiffResult : Change<T>> {\n\t// Set the comparator function.\n\tcmp = cmp || function( a, b ) {\n\t\treturn a === b;\n\t};\n\n\t// Convert the string (or any array-like object - eg. NodeList) to an array by using the slice() method because,\n\t// unlike Array.from(), it returns array of UTF-16 code units instead of the code points of a string.\n\t// One code point might be a surrogate pair of two code units. All text offsets are expected to be in code units.\n\t// See https://github.com/ckeditor/ckeditor5/issues/3147.\n\t//\n\t// We need to make sure here that fastDiff() works identical to diff().\n\tconst arrayA: Array<T> = Array.isArray( a ) ? a : Array.prototype.slice.call( a );\n\tconst arrayB: Array<T> = Array.isArray( b ) ? b : Array.prototype.slice.call( b );\n\n\t// Find first and last change.\n\tconst changeIndexes = findChangeBoundaryIndexes( arrayA, arrayB, cmp );\n\n\t// Transform into changes array.\n\tconst result = atomicChanges ?\n\t\tchangeIndexesToAtomicChanges( changeIndexes, arrayB.length ) :\n\t\tchangeIndexesToChanges( arrayB, changeIndexes );\n\n\treturn result as any;\n}\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<T>( arr1: ReadonlyArray<T>, arr2: ReadonlyArray<T>, cmp: ( a: T, b: T ) => boolean ): ChangeIndexes {\n\t// Find the first difference between passed values.\n\tconst firstIndex = findFirstDifferenceIndex( arr1, arr2, cmp );\n\n\t// If arrays are equal return -1 indexes object.\n\tif ( firstIndex === -1 ) {\n\t\treturn { firstIndex: -1, lastIndexOld: -1, lastIndexNew: -1 };\n\t}\n\n\t// Remove the common part of each value and reverse them to make it simpler to find the last difference between them.\n\tconst oldArrayReversed = cutAndReverse( arr1, firstIndex );\n\tconst newArrayReversed = cutAndReverse( arr2, firstIndex );\n\n\t// Find the first difference between reversed values.\n\t// It should be treated as \"how many elements from the end the last difference occurred\".\n\t//\n\t// For example:\n\t//\n\t// \t\t\t\tinitial\t->\tafter cut\t-> reversed:\n\t// oldValue:\t'321ba'\t->\t'21ba'\t\t-> 'ab12'\n\t// newValue:\t'31xba'\t->\t'1xba'\t\t-> 'abx1'\n\t// lastIndex:\t\t\t\t\t\t\t-> 2\n\t//\n\t// So the last change occurred two characters from the end of the arrays.\n\tconst lastIndex = findFirstDifferenceIndex( oldArrayReversed, newArrayReversed, cmp );\n\n\t// Use `lastIndex` to calculate proper offset, starting from the beginning (`lastIndex` kind of starts from the end).\n\tconst lastIndexOld = arr1.length - lastIndex;\n\tconst lastIndexNew = arr2.length - lastIndex;\n\n\treturn { firstIndex, lastIndexOld, lastIndexNew };\n}\n\n/**\n * Returns a first index on which given arrays differ. If both arrays are the same, -1 is returned.\n */\nfunction findFirstDifferenceIndex<T>( arr1: ReadonlyArray<T>, arr2: ReadonlyArray<T>, cmp: ( a: T, b: T ) => boolean ): number {\n\tfor ( let i = 0; i < Math.max( arr1.length, arr2.length ); i++ ) {\n\t\tif ( arr1[ i ] === undefined || arr2[ i ] === undefined || !cmp( arr1[ i ], arr2[ i ] ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1; // Return -1 if arrays are equal.\n}\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<T>( arr: ReadonlyArray<T>, howMany: number ): Array<T> {\n\treturn arr.slice( howMany ).reverse();\n}\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<T>( newArray: ReadonlyArray<T>, changeIndexes: ChangeIndexes ): Array<Change<T>> {\n\tconst result: Array<Change<T>> = [];\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\n\t// Order operations as 'insert', 'delete' array to keep compatibility with {@link module:utils/difftochanges~diffToChanges}\n\t// in most cases. However, 'diffToChanges' does not stick to any order so in some cases\n\t// (for example replacing '12345' with 'abcd') it will generate 'delete', 'insert' order.\n\tif ( lastIndexNew - firstIndex > 0 ) {\n\t\tresult.push( {\n\t\t\tindex: firstIndex,\n\t\t\ttype: 'insert',\n\t\t\tvalues: newArray.slice( firstIndex, lastIndexNew )\n\t\t} );\n\t}\n\n\tif ( lastIndexOld - firstIndex > 0 ) {\n\t\tresult.push( {\n\t\t\tindex: firstIndex + ( lastIndexNew - firstIndex ), // Increase index of what was inserted.\n\t\t\ttype: 'delete',\n\t\t\thowMany: lastIndexOld - firstIndex\n\t\t} );\n\t}\n\n\treturn result;\n}\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: ChangeIndexes, newLength: number ): Array<DiffResult> {\n\tconst { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n\n\t// No changes.\n\tif ( firstIndex === -1 ) {\n\t\treturn Array( newLength ).fill( 'equal' );\n\t}\n\n\tlet result: Array<DiffResult> = [];\n\n\tif ( firstIndex > 0 ) {\n\t\tresult = result.concat( Array( firstIndex ).fill( 'equal' ) );\n\t}\n\n\tif ( lastIndexNew - firstIndex > 0 ) {\n\t\tresult = result.concat( Array( lastIndexNew - firstIndex ).fill( 'insert' ) );\n\t}\n\n\tif ( lastIndexOld - firstIndex > 0 ) {\n\t\tresult = result.concat( Array( lastIndexOld - firstIndex ).fill( 'delete' ) );\n\t}\n\n\tif ( lastIndexNew < newLength ) {\n\t\tresult = result.concat( Array( newLength - lastIndexNew ).fill( 'equal' ) );\n\t}\n\n\treturn result;\n}\n\n/**\n * Indexes of the first and the last change in the given arrays.\n */\ninterface ChangeIndexes {\n\n\t/**\n\t * Index of the first change in both values (always the same for both).\n\t */\n\tfirstIndex: number;\n\n\t/**\n\t * Index of the last common value in `arr1`.\n\t */\n\tlastIndexOld: number;\n\n\t/**\n\t * Index of the last common value in `arr2`.\n\t */\n\tlastIndexNew: number;\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/**\n * @module utils/diff\n */\n\nimport { fastDiff as fastDiffFunction } from './fastdiff.js';\n\n// The following code is based on the \"O(NP) Sequence Comparison Algorithm\"\n// by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n\nexport type Diff = {\n\t<T>( a: ArrayLike<T>, b: ArrayLike<T>, cmp?: ( a: T, b: T ) => boolean ): Array<DiffResult>;\n\tfastDiff: typeof fastDiffFunction;\n};\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 */\nexport const diff: Diff = function<T>(\n\ta: ArrayLike<T>,\n\tb: ArrayLike<T>,\n\tcmp?: ( a: T, b: T ) => boolean\n): Array<DiffResult> {\n\t// Set the comparator function.\n\tcmp = cmp || function( a, b ) {\n\t\treturn a === b;\n\t};\n\n\tconst aLength = a.length;\n\tconst bLength = b.length;\n\n\t// Perform `fastDiff` for longer strings/arrays (see https://github.com/ckeditor/ckeditor5-utils/issues/269).\n\tif ( aLength > 200 || bLength > 200 || aLength + bLength > 300 ) {\n\t\treturn diff.fastDiff( a, b, cmp, true );\n\t}\n\n\t// Temporary action type statics.\n\tlet _insert: DiffResult, _delete: DiffResult;\n\n\t// Swapped the arrays to use the shorter one as the first one.\n\tif ( bLength < aLength ) {\n\t\tconst tmp = a;\n\n\t\ta = b;\n\t\tb = tmp;\n\n\t\t// We swap the action types as well.\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\n\tconst m = a.length;\n\tconst n = b.length;\n\tconst delta = n - m;\n\n\t// Edit scripts, for each diagonal.\n\tconst es: { [ k: number ]: Array<DiffResult> } = {};\n\t// Furthest points, the furthest y we can get on each diagonal.\n\tconst fp: { [ k: number]: number } = {};\n\n\tfunction snake( k: number ): number {\n\t\t// We use -1 as an alternative below to handle initial values ( instead of filling the fp with -1 first ).\n\t\t// Furthest points (y) on the diagonal below k.\n\t\tconst y1 = ( fp[ k - 1 ] !== undefined ? fp[ k - 1 ] : -1 ) + 1;\n\t\t// Furthest points (y) on the diagonal above k.\n\t\tconst y2 = fp[ k + 1 ] !== undefined ? fp[ k + 1 ] : -1;\n\t\t// The way we should go to get further.\n\t\tconst dir = y1 > y2 ? -1 : 1;\n\n\t\t// Clone previous changes array (if any).\n\t\tif ( es[ k + dir ] ) {\n\t\t\tes[ k ] = es[ k + dir ].slice( 0 );\n\t\t}\n\n\t\t// Create changes array.\n\t\tif ( !es[ k ] ) {\n\t\t\tes[ k ] = [];\n\t\t}\n\n\t\t// Push the action.\n\t\tes[ k ].push( y1 > y2 ? _insert : _delete );\n\n\t\t// Set the beginning coordinates.\n\t\tlet y = Math.max( y1, y2 );\n\t\tlet x = y - k;\n\n\t\t// Traverse the diagonal as long as the values match.\n\t\twhile ( x < m && y < n && cmp!( a[ x ], b[ y ] ) ) {\n\t\t\tx++;\n\t\t\ty++;\n\t\t\t// Push no change action.\n\t\t\tes[ k ].push( 'equal' );\n\t\t}\n\n\t\treturn y;\n\t}\n\n\tlet p = 0;\n\tlet k;\n\n\t// Traverse the graph until we reach the end of the longer string.\n\tdo {\n\t\t// Updates furthest points and edit scripts for diagonals below delta.\n\t\tfor ( k = -p; k < delta; k++ ) {\n\t\t\tfp[ k ] = snake( k );\n\t\t}\n\n\t\t// Updates furthest points and edit scripts for diagonals above delta.\n\t\tfor ( k = delta + p; k > delta; k-- ) {\n\t\t\tfp[ k ] = snake( k );\n\t\t}\n\n\t\t// Updates furthest point and edit script for the delta diagonal.\n\t\t// note that the delta diagonal is the one which goes through the sink (m, n).\n\t\tfp[ delta ] = snake( delta );\n\n\t\tp++;\n\t} while ( fp[ delta ] !== n );\n\n\t// Return the final list of edit changes.\n\t// We remove the first item that represents the action for the injected nulls.\n\treturn es[ delta ].slice( 1 );\n} as Diff;\n\n// Store the API in static property to easily overwrite it in tests.\n// Too bad dependency injection does not work in Webpack + ES 6 (const) + Babel.\ndiff.fastDiff = fastDiffFunction;\n\n/**\n * The element of the result of {@link module:utils/diff~diff} function.\n */\nexport type DiffResult = 'equal' | 'insert' | 'delete';\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/**\n * @module utils/difftochanges\n */\n\nimport type { DiffResult } from './diff.js';\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 */\nexport function diffToChanges<T>( diff: ReadonlyArray<DiffResult>, output: ArrayLike<T> ): Array<Change<T>> {\n\tconst changes: Array<Change<T>> = [];\n\tlet index = 0;\n\tlet lastOperation: Change<T> | null = null;\n\n\tdiff.forEach( change => {\n\t\tif ( change == 'equal' ) {\n\t\t\tpushLast();\n\n\t\t\tindex++;\n\t\t} else if ( change == 'insert' ) {\n\t\t\tif ( lastOperation && lastOperation.type == 'insert' ) {\n\t\t\t\tlastOperation.values.push( output[ index ] );\n\t\t\t} else {\n\t\t\t\tpushLast();\n\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\n\t\t\tindex++;\n\t\t} else /* if ( change == 'delete' ) */ {\n\t\t\tif ( lastOperation && lastOperation.type == 'delete' ) {\n\t\t\t\tlastOperation.howMany++;\n\t\t\t} else {\n\t\t\t\tpushLast();\n\n\t\t\t\tlastOperation = {\n\t\t\t\t\ttype: 'delete',\n\t\t\t\t\tindex,\n\t\t\t\t\thowMany: 1\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t} );\n\n\tpushLast();\n\n\treturn changes;\n\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 * An object describing insertion change.\n *\n * @typeParam T The type of output array element.\n */\nexport interface InsertChange<T> {\n\ttype: 'insert';\n\tindex: number;\n\tvalues: Array<T>;\n}\n\n/**\n * An object describing deletion change.\n */\nexport interface DeleteChange {\n\ttype: 'delete';\n\tindex: number;\n\thowMany: number;\n}\n\n/**\n * The element of the result of {@link module:utils/difftochanges~diffToChanges} function.\n *\n * @typeParam T The type of output array element.\n */\nexport type Change<T> = InsertChange<T> | DeleteChange;\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/**\n * @module utils/areconnectedthroughproperties\n */\n\n/**\n * Traverses both structures to find out whether there is a reference that is shared between both structures.\n */\nexport function areConnectedThroughProperties( obj1: object, obj2: object ): boolean {\n\tif ( obj1 === obj2 && isObject( obj1 ) ) {\n\t\treturn true;\n\t}\n\n\tconst subNodes1 = getSubNodes( obj1 );\n\tconst subNodes2 = getSubNodes( obj2 );\n\n\tfor ( const node of subNodes1 ) {\n\t\tif ( subNodes2.has( node ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\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: unknown ): Set<unknown> {\n\tconst nodes = [ head ];\n\n\t// Nodes are stored to prevent infinite looping.\n\tconst subNodes = new Set();\n\n\twhile ( nodes.length > 0 ) {\n\t\tconst node = nodes.shift();\n\n\t\tif ( subNodes.has( node ) || shouldNodeBeSkipped( node ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tsubNodes.add( node );\n\n\t\t// Handle arrays, maps, sets, custom collections that implements `[ Symbol.iterator ]()`, etc.\n\t\tif ( ( node as Iterable<unknown> )[ Symbol.iterator ] ) {\n\t\t\t// The custom editor iterators might cause some problems if the editor is crashed.\n\t\t\ttry {\n\t\t\t\tnodes.push( ...( node as Iterable<unknown> ) );\n\t\t\t}\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tcatch {}\n\t\t} else {\n\t\t\tnodes.push( ...Object.values( node as any ) );\n\t\t}\n\t}\n\n\treturn subNodes;\n}\n\nfunction shouldNodeBeSkipped( node: unknown ): boolean {\n\tconst type = Object.prototype.toString.call( node );\n\n\treturn (\n\t\ttype === '[object Number]' ||\n\t\ttype === '[object Boolean]' ||\n\t\ttype === '[object String]' ||\n\t\ttype === '[object Symbol]' ||\n\t\ttype === '[object Function]' ||\n\t\ttype === '[object Date]' ||\n\t\ttype === '[object RegExp]' ||\n\n\t\tnode === undefined ||\n\t\tnode === null ||\n\n\t\t// Skip native DOM objects, e.g. Window, nodes, events, etc.\n\t\tnode instanceof EventTarget ||\n\t\tnode instanceof Event\n\t);\n}\n\nfunction isObject( structure: unknown ): boolean {\n\treturn typeof structure === 'object' && structure !== null;\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/**\n * @module utils/spy\n */\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 */\nexport function spy(): { (): void; called?: boolean } {\n\treturn function spy() {\n\t\t( spy as any ).called = true;\n\t};\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/**\n * @module utils/eventinfo\n */\n\nimport { spy } from './spy.js';\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 */\nexport class EventInfo<TName extends string = string, TReturn = unknown> {\n\t/**\n\t * The object that fired the event.\n\t */\n\tpublic readonly source: object;\n\n\t/**\n\t * The event name.\n\t */\n\tpublic readonly name: TName;\n\n\t/**\n\t * Path this event has followed. See {@link module:utils/emittermixin~Emitter#delegate}.\n\t */\n\tpublic path: Array<object>;\n\n\t/**\n\t * Stops the event emitter to call further callbacks for this event interaction.\n\t */\n\tpublic readonly stop: { (): void; called?: boolean };\n\n\t/**\n\t * Removes the current callback from future interactions of this event.\n\t */\n\tpublic readonly off: { (): void; called?: boolean };\n\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\tpublic return: TReturn | undefined;\n\n\t/**\n\t * @param source The emitter.\n\t * @param name The event name.\n\t */\n\tconstructor( source: object, name: TName ) {\n\t\tthis.source = source;\n\t\tthis.name = name;\n\t\tthis.path = [];\n\n\t\t// The following methods are defined in the constructor because they must be re-created per instance.\n\t\tthis.stop = spy();\n\t\tthis.off = spy();\n\t}\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/**\n * @module utils/uid\n */\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( '' )\n\t.map( ( _, index ) => ( '0' + ( index ).toString( 16 ) ).slice( -2 ) );\n\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 */\nexport function uid(): string {\n\t// Let's create some positive random 32bit integers first.\n\tconst [ r1, r2, r3, r4 ] = crypto.getRandomValues( new Uint32Array( 4 ) );\n\n\t// Make sure that id does not start with number.\n\treturn 'e' +\n\t\tHEX_NUMBERS[ r1 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r1 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r2 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r3 >> 24 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 0 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 8 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 16 & 0xFF ] +\n\t\tHEX_NUMBERS[ r4 >> 24 & 0xFF ];\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/**\n * @module utils/priorities\n */\n\n/**\n * String representing a priority value.\n */\nexport type PriorityString = 'highest' | 'high' | 'normal' | 'low' | 'lowest' | number;\n\n// This interface exists to make our API pages more readable.\n/**\n * Provides group of constants to use instead of hardcoding numeric priority values.\n */\nexport interface PrioritiesType {\n\n\t/**\n\t * Converts a string with priority name to it's numeric value. If `Number` is given, it just returns it.\n\t *\n\t * @param priority Priority to convert.\n\t * @returns Converted priority.\n\t */\n\tget( priority?: PriorityString ): number;\n\n\treadonly highest: number;\n\treadonly high: number;\n\treadonly normal: number;\n\treadonly low: number;\n\treadonly lowest: number;\n}\n\n/**\n * Provides group of constants to use instead of hardcoding numeric priority values.\n */\nexport const priorities: PrioritiesType = {\n\tget( priority: PriorityString = 'normal' ): number {\n\t\tif ( typeof priority != 'number' ) {\n\t\t\treturn this[ priority ] || this.normal;\n\t\t} else {\n\t\t\treturn priority;\n\t\t}\n\t},\n\n\thighest: 100000,\n\thigh: 1000,\n\tnormal: 0,\n\tlow: -1000,\n\tlowest: -100000\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/**\n * @module utils/inserttopriorityarray\n */\n\nimport { priorities, type PriorityString } from './priorities.js';\n\n/**\n * The priority object descriptor.\n *\n * ```ts\n * const objectWithPriority = {\n * \tpriority: 'high'\n * }\n * ```\n */\nexport interface ObjectWithPriority {\n\n\t/**\n\t * Priority of the object.\n\t */\n\tpriority: PriorityString;\n}\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 */\nexport function insertToPriorityArray<T extends ObjectWithPriority>( objects: Array<T>, objectToInsert: T ): void {\n\tconst priority = priorities.get( objectToInsert.priority );\n\n\t// Binary search for better performance in large tables.\n\tlet left = 0;\n\tlet right = objects.length;\n\n\twhile ( left < right ) {\n\t\tconst mid = ( left + right ) >> 1; // Use bitwise operator for faster floor division by 2.\n\t\tconst midPriority = priorities.get( objects[ mid ].priority );\n\n\t\tif ( midPriority < priority ) {\n\t\t\tright = mid;\n\t\t} else {\n\t\t\tleft = mid + 1;\n\t\t}\n\t}\n\n\tobjects.splice( left, 0, objectToInsert );\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/**\n * @module utils/ckeditorerror\n */\n\n/**\n * URL to the documentation with error codes.\n */\nexport const DOCUMENTATION_URL = 'https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html';\n\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 */\nexport 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\tpublic readonly context: object | null | undefined;\n\n\t/**\n\t * The additional error data passed to the constructor. Undefined if none was passed.\n\t */\n\tpublic readonly data?: object;\n\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: string, context?: object | null, data?: object, originalError?: Error ) {\n\t\tsuper( getErrorMessage( errorName, data, originalError ) );\n\n\t\tthis.name = 'CKEditorError';\n\t\tthis.context = context;\n\t\tthis.data = data;\n\n\t\t// Wrapping an original error in a CKEditorError instance.\n\t\tif ( originalError ) {\n\t\t\t// Restore the original stack trace to make the error look like the original one.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/5595 for more details.\n\t\t\tthis.stack = originalError.stack;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the error is of the `CKEditorError` type.\n\t */\n\tpublic is( type: string ): boolean {\n\t\treturn type === 'CKEditorError';\n\t}\n\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\tpublic static rethrowUnexpectedError( error: Error, context: object ): never {\n\t\tif ( ( error as any ).is && ( error as any ).is( 'CKEditorError' ) ) {\n\t\t\tthrow error;\n\t\t}\n\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, undefined, error );\n\t}\n}\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 */\nexport function logWarning( errorName: string, data?: object ): void {\n\tconsole.warn( ...formatConsoleArguments( errorName, data ) );\n}\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 */\nexport function logError( errorName: string, data?: object ): void {\n\tconsole.error( ...formatConsoleArguments( errorName, data ) );\n}\n\n/**\n * Returns formatted link to documentation message.\n */\nfunction getLinkToDocumentationMessage( errorName: string ): string {\n\treturn `\\nRead more: ${ DOCUMENTATION_URL }#error-${ errorName }`;\n}\n\n/**\n * Returns formatted error message.\n */\nfunction getErrorMessage( errorName: string, data?: object, originalError?: Error ): string {\n\tconst processedObjects = new WeakSet();\n\tconst circularReferencesReplacer = ( key: string, value: unknown ) => {\n\t\tif ( typeof value === 'object' && value !== null ) {\n\t\t\tif ( processedObjects.has( value ) ) {\n\t\t\t\treturn `[object ${ value.constructor.name }]`;\n\t\t\t}\n\n\t\t\tprocessedObjects.add( value );\n\t\t}\n\n\t\treturn value;\n\t};\n\n\tconst stringifiedData = data ? ` ${ JSON.stringify( data, circularReferencesReplacer ) }` : '';\n\tconst documentationLink = getLinkToDocumentationMessage( errorName );\n\tconst originalErrorMessage = originalError ? `\\nOriginal error: ${ originalError.name }: ${ originalError.message }` : '';\n\n\treturn errorName + stringifiedData + documentationLink + originalErrorMessage;\n}\n\n/**\n * Returns formatted console error arguments.\n */\nfunction formatConsoleArguments( errorName: string, data?: object ): Array<unknown> {\n\tconst documentationMessage = getLinkToDocumentationMessage( errorName );\n\n\treturn data ? [ errorName, data, documentationMessage ] : [ errorName, documentationMessage ];\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/**\n * @module utils/version\n */\n\nimport { CKEditorError } from './ckeditorerror.js';\n\nexport const version = '48.5.3';\n\n// The second argument is not a month. It is `monthIndex` and starts from `0`.\nexport const releaseDate: Date = new Date( 2026, 9, 27 );\n\ndeclare global {\n\tvar CKEDITOR_VERSION: string;\n}\n\n/* v8 ignore next -- @preserve */\nif ( globalThis.CKEDITOR_VERSION ) {\n\t/**\n\t * This error is thrown when, due to a mistake in the way CKEditor&nbsp;5 was installed,\n\t * imported, or initialized, some of its modules were evaluated and executed twice.\n\t * Duplicate modules inevitably lead to runtime errors and increased bundle size.\n\t *\n\t * # Check dependency versions\n\t *\n\t * First, make sure that you use the latest version of all CKEditor&nbsp;5 dependencies.\n\t * Depending on the installation method, you should check the versions of the `ckeditor5`,\n\t * `ckeditor5-premium-features`, or `@ckeditor/ckeditor5-<NAME>` packages. If you cannot update\n\t * to the latest version, ensure that all the CKEditor&nbsp;5 packages are\n\t * in the same version.\n\t *\n\t * If you use third-party plugins, make sure to update them, too. If they are incompatible\n\t * with the version of CKEditor&nbsp;5 you use, you may need to downgrade the CKEditor&nbsp;5 packages\n\t * (which we do not recommend). Ask the plugin's author to upgrade the dependencies,\n\t * or fork their project and update it yourself.\n\t *\n\t * # Check imports\n\t *\n\t * The next step is to look at how you import CKEditor&nbsp;5 into your project.\n\t *\n\t * **The {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods}\n\t * are designed to prevent module duplication, so if you are not using them yet, you should consider\n\t * updating your project**. However, several legacy installation methods are still supported for backward\n\t * compatibility, and mixing them may result in module duplication.\n\t *\n\t * These are the most common import methods of the CKEditor&nbsp;5 packages.\n\t *\n\t * - **New installation methods (NIM)** &ndash; Imports from the `ckeditor5` and `ckeditor5-premium-features` packages.\n\t * - **Optimized build** for the new installation methods &ndash; Imports from the `@ckeditor/ckeditor5-<NAME>/dist/index.js`.\n\t * - **Predefined builds** (no longer supported) &ndash; Imports from the `@ckeditor/ckeditor5-build-<NAME>` packages.\n\t * - **Default imports** (legacy) &ndash; Imports from the `@ckeditor/ckeditor5-<NAME>` packages (default export).\n\t * - **`src`** (legacy) &ndash; Imports from the `@ckeditor/ckeditor5-<NAME>/src/*`.\n\t * - **DLL builds** (legacy) &ndash; Imports from the `ckeditor5/build/<NAME>` and `@ckeditor/ckeditor5-<NAME>/build/*`.\n\t *\n\t * The best way to avoid duplicate modules is to avoid mixing these installation methods. For example, if you use imports\n\t * specific to the optimized build, you should use them for all CKEditor&nbsp;5 packages. In addition, since\n\t * the DLL builds already include the core of the editor, they cannot be used with other types of imports.\n\t *\n\t * Here is a matrix showing which installation methods are compatible with each other:\n\t *\n\t * |                  | NIM | Optimized build | Predefined builds | Default imports | `src` | DLL builds |\n\t * |------------------|-----|-----------------|-------------------|-----------------|-------|------------|\n\t * | NIM              | ✅  | ✅              | ❌                | ❌              | ❌    | ❌         |\n\t * | Optimized builds | ✅  | ✅              | ❌                | ❌              | ❌    | ❌         |\n\t * | Predefined build | ❌  | ❌              | ✅                | ❌              | ❌    | ❌         |\n\t * | Default imports  | ❌  | ❌              | ❌                | ✅              | ✅    | ❌         |\n\t * | `src`            | ❌  | ❌              | ❌                | ✅              | ✅    | ❌         |\n\t * | DLL builds       | ❌  | ❌              | ❌                | ❌              | ❌    | ✅         |\n\t *\n\t * If you use any third-party plugins, make sure the way you import them is compatible with\n\t * the way you import CKEditor&nbsp;5.\n\t *\n\t * <details>\n\t * <summary>New installation methods and optimized builds</summary>\n\t *\n\t * If you use the {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods},\n\t * you should only import { code } from the `ckeditor5` and `ckeditor5-premium-features` packages.\n\t * Do not import { code } from the `@ckeditor/ckeditor5-<NAME>` packages unless you follow\n\t * the {@glink getting-started/setup/optimizing-build-size Optimizing build size} guide and the imports from\n\t * the `@ckeditor/ckeditor5-<NAME>` packages end with `/dist/index.js`.\n\t *\n\t * If you use a CDN, ensure that some files are not included twice in your project.\n\t *\n\t * Examples of valid and invalid import paths:\n\t *\n\t * ```js\n\t * import { ClassicEditor, Highlight } from 'ckeditor5'; // ✅\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ✅\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌\n\t * import '@ckeditor/ckeditor5-highlight/build/highlight.js'; // ❌\n\t * ```\n\t * </details>\n\t *\n\t * <details>\n\t * <summary>(Deprecated) Predefined builds</summary>\n\t *\n\t * **As of April, 2025 predefined build are no longer supported. Please refer to the\n\t * {@glink getting-started/index Quick Start} guide\n\t * to choose one of the modern installation and integration methods available**.\n\t *\n\t * If you use the predefined builds, you cannot import any additional plugins.\n\t * These builds already include the editor's core and selected plugins and importing additional\n\t * ones will cause some modules to be bundled and loaded twice.\n\t *\n\t * Examples of valid and invalid import paths:\n\t *\n\t * ```js\n\t * import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic'; // ✅\n\t * import { Highlight } from 'ckeditor5'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight'; // ❌\n\t * import '@ckeditor/ckeditor5-highlight/build/highlight'; // ❌\n\t * ```\n\t *\n\t * If you are missing some features from the list of plugins, you should switch to the\n\t * {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods}\n\t * which do not have this limitation.\n\t * </details>\n\t *\n\t * <details>\n\t * <summary>(Legacy) Default imports and `src` imports</summary>\n\t *\n\t * If you use the legacy customized installation\n\t * method, you should only import code from the `@ckeditor/ckeditor5-<NAME>` packages. While you can import code from\n\t * the `@ckeditor/ckeditor5-<NAME>/src/*` files, it is not recommended as it can make migration to the new installation\n\t * methods more difficult.\n\t *\n\t * If you use this installation method, you should not import { code } from the `ckeditor5` or `ckeditor5-premium-features` packages.\n\t *\n\t * Examples of valid and invalid import paths:\n\t *\n\t * ```js\n\t * import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic'; // ✅\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ✅\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ✅ (not recommended)\n\t * import { Highlight } from 'ckeditor5'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌\n\t * import '@ckeditor/ckeditor5-highlight/build/highlight'; // ❌\n\t * ```\n\t * </details>\n\t *\n\t * <details>\n\t * <summary>(Legacy) DLL builds</summary>\n\t *\n\t * If you are using the {@glink updating/nim-migration/dll-builds legacy DLL builds},\n\t * you should not import any non-DLL modules.\n\t *\n\t * Examples of valid and invalid import paths:\n\t *\n\t * ```js\n\t * import 'ckeditor5/build/ckeditor5-dll.js';// ✅\n\t * import '@ckeditor/ckeditor5-editor-classic/build/editor-classic.js';// ✅\n\t * import '@ckeditor/ckeditor5-highlight/build/highlight.js';// ✅\n\t * import { Highlight } from 'ckeditor5'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/dist/index.js'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight'; // ❌\n\t * import { Highlight } from '@ckeditor/ckeditor5-highlight/src/highlight.js'; // ❌\n\t * ```\n\t * </details>\n\t *\n\t * # Reinstall `node_modules`\n\t *\n\t * Usually, npm and other package managers deduplicate all packages - for example, `ckeditor5` is only installed once\n\t * in `node_modules/`. However, it is known to fail to do so occasionally.\n\t *\n\t * To rule out this possibility, you can try the following:\n\t *\n\t * 1. Remove the `node_modules` directory.\n\t * 2. Remove the `package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml` files (depending on the package manager used).\n\t * 3. Run `npm install` to reinstall all packages.\n\t * 4. Run `npm ls` to check how many times packages like `@ckeditor/ckeditor5-core` are installed.\n\t * If they are installed more than once, verify which package causes that.\n\t *\n\t * @error ckeditor-duplicated-modules\n\t */\n\tthrow new CKEditorError(\n\t\t'ckeditor-duplicated-modules',\n\t\tnull\n\t);\n} else {\n\tglobalThis.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/**\n * @module utils/emittermixin\n */\n\nimport { EventInfo } from './eventinfo.js';\nimport { uid } from './uid.js';\nimport { priorities, type PriorityString } from './priorities.js';\nimport { insertToPriorityArray } from './inserttopriorityarray.js';\nimport type { Constructor, Mixed } from './mix.js';\n\n// To check if component is loaded more than once.\nimport './version.js';\nimport { CKEditorError } from './ckeditorerror.js';\n\nconst _listeningTo = Symbol( 'listeningTo' );\nconst _emitterId = Symbol( 'emitterId' );\nconst _delegations = Symbol( 'delegations' );\n\n// Keep this a plain alias. A conditional type does not work here: TypeScript cannot reduce a\n// conditional over an unresolved type parameter, so a generic wrapper around `EmitterMixin( base )`\n// silently loses the base class members. The default is a concrete nullary constructor, which\n// is why `undefined` is no longer a valid type argument.\n// See https://github.com/ckeditor/ckeditor5/issues/20238.\n/**\n * Constructor returned by {@link ~EmitterMixin}. Use it to name a mixin base class before extending it.\n *\n * ```\n * const MyEmitterBase: EmitterMixinConstructor<typeof BaseClass> = EmitterMixin( BaseClass );\n *\n * class MyEmitter extends MyEmitterBase {}\n * ```\n */\nexport type EmitterMixinConstructor<Base extends Constructor = new () => object> = Mixed<Base, Emitter>;\n\nconst defaultEmitterClass = /* #__PURE__ */ EmitterMixin( Object );\n\n/**\n * Mixin that injects the {@link ~Emitter events API} into its host.\n *\n * This function creates a class that inherits from the provided `base` and implements `Emitter` interface.\n *\n * ```ts\n * class BaseClass { ... }\n *\n * class MyClass extends EmitterMixin( BaseClass ) {\n * \t// This class derives from `BaseClass` and implements the `Emitter` interface.\n * }\n * ```\n *\n * Read more about the concept of emitters in the:\n * * {@glink framework/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/architecture/core-editor-architecture Core editor architecture} guide.\n * * {@glink framework/deep-dive/event-system Event system} deep-dive guide.\n *\n * @label EXTENDS\n */\nexport function EmitterMixin<Base extends Constructor>( base: Base ): EmitterMixinConstructor<Base>;\n\n/**\n * Mixin that injects the {@link ~Emitter events API} into its host.\n *\n * This function creates a class that implements `Emitter` interface.\n *\n * ```ts\n * class MyClass extends EmitterMixin() {\n * \t// This class implements the `Emitter` interface.\n * }\n * ```\n *\n * Read more about the concept of emitters in the:\n * * {@glink framework/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/architecture/core-editor-architecture Core editor architecture} guide.\n * * {@glink framework/deep-dive/event-system Event system} deep dive guide.\n *\n * @label NO_ARGUMENTS\n */\nexport function EmitterMixin(): EmitterMixinConstructor;\n\nexport function EmitterMixin( base?: Constructor ): unknown {\n\tif ( !base ) {\n\t\treturn defaultEmitterClass;\n\t}\n\n\tabstract class Mixin extends base implements EmitterInternal {\n\t\tpublic on<TEvent extends BaseEvent>(\n\t\t\tevent: TEvent[ 'name' ],\n\t\t\tcallback: GetCallback<TEvent>,\n\t\t\toptions?: CallbackOptions\n\t\t): void {\n\t\t\tthis.listenTo( this, event, callback, options );\n\t\t}\n\n\t\tpublic once<TEvent extends BaseEvent>(\n\t\t\tevent: TEvent[ 'name' ],\n\t\t\tcallback: GetCallback<TEvent>,\n\t\t\toptions?: CallbackOptions\n\t\t): void {\n\t\t\tlet wasFired = false;\n\n\t\t\tconst onceCallback: typeof callback = ( event, ...args ) => {\n\t\t\t\t// Ensure the callback is called only once even if the callback itself leads to re-firing the event\n\t\t\t\t// (which would call the callback again).\n\t\t\t\tif ( !wasFired ) {\n\t\t\t\t\twasFired = true;\n\n\t\t\t\t\t// Go off() at the first call.\n\t\t\t\t\tevent.off();\n\n\t\t\t\t\t// Go with the original callback.\n\t\t\t\t\tcallback.call( this, event, ...args );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Make a similar on() call, simply replacing the callback.\n\t\t\tthis.listenTo( this, event, onceCallback, options );\n\t\t}\n\n\t\tpublic off( event: string, callback: Function ): void {\n\t\t\tthis.stopListening( this, event, callback );\n\t\t}\n\n\t\tpublic listenTo<TEvent extends BaseEvent>(\n\t\t\temitter: Emitter,\n\t\t\tevent: TEvent[ 'name' ],\n\t\t\tcallback: GetCallback<TEvent>,\n\t\t\toptions: CallbackOptions = {}\n\t\t): void {\n\t\t\tlet emitterInfo, eventCallbacks;\n\n\t\t\t// _listeningTo contains a list of emitters that this object is listening to.\n\t\t\t// This list has the following format:\n\t\t\t//\n\t\t\t// _listeningTo: {\n\t\t\t//     emitterId: {\n\t\t\t//         emitter: emitter,\n\t\t\t//         callbacks: {\n\t\t\t//             event1: [ callback1, callback2, ... ]\n\t\t\t//             ....\n\t\t\t//         }\n\t\t\t//     },\n\t\t\t//     ...\n\t\t\t// }\n\n\t\t\tif ( !this[ _listeningTo ] ) {\n\t\t\t\tthis[ _listeningTo ] = {};\n\t\t\t}\n\n\t\t\tconst emitters = this[ _listeningTo ]!;\n\n\t\t\tif ( !_getEmitterId( emitter ) ) {\n\t\t\t\t_setEmitterId( emitter );\n\t\t\t}\n\n\t\t\tconst emitterId = _getEmitterId( emitter )!;\n\n\t\t\tif ( !( emitterInfo = emitters[ emitterId ] ) ) {\n\t\t\t\temitterInfo = emitters[ emitterId ] = {\n\t\t\t\t\temitter,\n\t\t\t\t\tcallbacks: {}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif ( !( eventCallbacks = emitterInfo.callbacks[ event ] ) ) {\n\t\t\t\teventCallbacks = emitterInfo.callbacks[ event ] = [];\n\t\t\t}\n\n\t\t\teventCallbacks.push( callback );\n\n\t\t\t// Finally register the callback to the event.\n\t\t\taddEventListener( this, emitter, event, callback, options );\n\t\t}\n\n\t\tpublic stopListening( emitter?: Emitter, event?: string, callback?: Function ): void {\n\t\t\tconst emitters = this[ _listeningTo ];\n\t\t\tlet emitterId = emitter && _getEmitterId( emitter );\n\t\t\tconst emitterInfo = ( emitters && emitterId ) ? emitters[ emitterId ] : undefined;\n\t\t\tconst eventCallbacks = ( emitterInfo && event ) ? emitterInfo.callbacks[ event ] : undefined;\n\n\t\t\t// Stop if nothing has been listened.\n\t\t\tif ( !emitters || ( emitter && !emitterInfo ) || ( event && !eventCallbacks ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// All params provided. off() that single callback.\n\t\t\tif ( callback ) {\n\t\t\t\tremoveEventListener( this, emitter!, event!, callback );\n\n\t\t\t\t// We must remove callbacks as well in order to prevent memory leaks.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/pull/8480\n\t\t\t\tconst index = eventCallbacks!.indexOf( callback );\n\n\t\t\t\tif ( index !== -1 ) {\n\t\t\t\t\tif ( eventCallbacks!.length === 1 ) {\n\t\t\t\t\t\tdelete emitterInfo!.callbacks[ event! ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tremoveEventListener( this, emitter!, event!, callback );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Only `emitter` and `event` provided. off() all callbacks for that event.\n\t\t\telse if ( eventCallbacks ) {\n\t\t\t\twhile ( ( callback = eventCallbacks.pop() ) ) {\n\t\t\t\t\tremoveEventListener( this, emitter!, event!, callback );\n\t\t\t\t}\n\n\t\t\t\tdelete emitterInfo!.callbacks[ event! ];\n\t\t\t}\n\t\t\t// Only `emitter` provided. off() all events for that emitter.\n\t\t\telse if ( emitterInfo ) {\n\t\t\t\tfor ( event in emitterInfo.callbacks ) {\n\t\t\t\t\tthis.stopListening( emitter!, event );\n\t\t\t\t}\n\t\t\t\tdelete emitters[ emitterId! ];\n\t\t\t}\n\t\t\t// No params provided. off() all emitters.\n\t\t\telse {\n\t\t\t\tfor ( emitterId in emitters ) {\n\t\t\t\t\tthis.stopListening( emitters[ emitterId ].emitter );\n\t\t\t\t}\n\t\t\t\tdelete this[ _listeningTo ];\n\t\t\t}\n\t\t}\n\n\t\tpublic fire<TEvent extends BaseEvent>(\n\t\t\teventOrInfo: GetNameOrEventInfo<TEvent>,\n\t\t\t...args: TEvent[ 'args' ]\n\t\t): GetEventInfo<TEvent>[ 'return' ] {\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\n\t\t\t\t// Record that the event passed this emitter on its path.\n\t\t\t\teventInfo.path.push( this );\n\n\t\t\t\t// Handle event listener callbacks first.\n\t\t\t\tif ( callbacks ) {\n\t\t\t\t\t// Copying callbacks array is the easiest and most secure way of preventing infinite loops, when event callbacks\n\t\t\t\t\t// are added while processing other callbacks. Previous solution involved adding counters (unique ids) but\n\t\t\t\t\t// failed if callbacks were added to the queue before currently processed callback.\n\t\t\t\t\t// If this proves to be too inefficient, another method is to change `.on()` so callbacks are stored if same\n\t\t\t\t\t// event is currently processed. Then, `.fire()` at the end, would have to add all stored events.\n\t\t\t\t\tcallbacks = callbacks.slice();\n\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\n\t\t\t\t\t\tfn.call( this, eventInfo, ...args );\n\n\t\t\t\t\t\t// Remove the callback from future requests if off() has been called.\n\t\t\t\t\t\tif ( eventInfo.off.called ) {\n\t\t\t\t\t\t\t// Remove the called mark for the next calls.\n\t\t\t\t\t\t\tdelete eventInfo.off.called;\n\n\t\t\t\t\t\t\tthis._removeEventListener( event, fn );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Do not execute next callbacks if stop() was called.\n\t\t\t\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Delegate event to other emitters if needed.\n\t\t\t\tconst delegations = this[ _delegations ];\n\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\n\t\t\t\t\tif ( destinations ) {\n\t\t\t\t\t\tfireDelegatedEvents( destinations, eventInfo, args );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( passAllDestinations ) {\n\t\t\t\t\t\tfireDelegatedEvents( passAllDestinations, eventInfo, args );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn eventInfo.return;\n\t\t\t} catch ( err ) {\n\t\t\t\t// @if CK_DEBUG // throw err;\n\t\t\t\t/* v8 ignore next -- @preserve */\n\t\t\t\tCKEditorError.rethrowUnexpectedError( err as Error, this );\n\t\t\t}\n\t\t}\n\n\t\tpublic delegate( ...events: Array<string> ): EmitterMixinDelegateChain {\n\t\t\treturn {\n\t\t\t\tto: ( emitter, nameOrFunction ) => {\n\t\t\t\t\tif ( !this[ _delegations ] ) {\n\t\t\t\t\t\tthis[ _delegations ] = new Map();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Originally there was a for..of loop which unfortunately caused an error in Babel that didn't allow\n\t\t\t\t\t// build an application. See: https://github.com/ckeditor/ckeditor5-react/issues/40.\n\t\t\t\t\tevents.forEach( eventName => {\n\t\t\t\t\t\tconst destinations = this[ _delegations ]!.get( eventName );\n\n\t\t\t\t\t\tif ( !destinations ) {\n\t\t\t\t\t\t\tthis[ _delegations ]!.set( eventName, new Map( [ [ emitter, nameOrFunction ] ] ) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdestinations.set( emitter, nameOrFunction );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tpublic stopDelegating( event?: string, emitter?: Emitter ): void {\n\t\t\tif ( !this[ _delegations ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !event ) {\n\t\t\t\tthis[ _delegations ]!.clear();\n\t\t\t} else if ( !emitter ) {\n\t\t\t\tthis[ _delegations ]!.delete( event );\n\t\t\t} else {\n\t\t\t\tconst destinations = this[ _delegations ]!.get( event );\n\n\t\t\t\tif ( destinations ) {\n\t\t\t\t\tdestinations.delete( emitter );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpublic _addEventListener<TEvent extends BaseEvent>(\n\t\t\tevent: TEvent[ 'name' ],\n\t\t\tcallback: GetCallback<TEvent>,\n\t\t\toptions: CallbackOptions\n\t\t): void {\n\t\t\tcreateEventNamespace( this, event );\n\n\t\t\tconst lists = getCallbacksListsForNamespace( this, event );\n\t\t\tconst priority = priorities.get( options.priority );\n\n\t\t\tconst callbackDefinition = {\n\t\t\t\tcallback,\n\t\t\t\tpriority\n\t\t\t};\n\n\t\t\t// Add the callback to all callbacks list.\n\t\t\tfor ( const callbacks of lists ) {\n\t\t\t\t// Add the callback to the list in the right priority position.\n\t\t\t\tinsertToPriorityArray( callbacks, callbackDefinition );\n\t\t\t}\n\t\t}\n\n\t\tpublic _removeEventListener( event: string, callback: Function ): void {\n\t\t\tconst lists = getCallbacksListsForNamespace( this, event );\n\n\t\t\tfor ( const callbacks of lists ) {\n\t\t\t\tfor ( let i = 0; i < callbacks.length; i++ ) {\n\t\t\t\t\tif ( callbacks[ i ].callback == callback ) {\n\t\t\t\t\t\t// Remove the callback from the list (fixing the next index).\n\t\t\t\t\t\tcallbacks.splice( i, 1 );\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpublic declare _events?: { [ eventName: string ]: EventNode };\n\n\t\tpublic declare [ _emitterId ]?: string;\n\n\t\tpublic declare [ _listeningTo ]?: {\n\t\t\t[ emitterId: string ]: {\n\t\t\t\temitter: Emitter;\n\t\t\t\tcallbacks: { [ event: string]: Array<Function> };\n\t\t\t};\n\t\t};\n\n\t\tpublic declare [ _delegations ]?: Map<string, Map<Emitter, string | ( ( name: string ) => string ) | undefined>>;\n\t}\n\n\treturn Mixin;\n}\n\n/**\n * Emitter/listener interface.\n *\n * Can be easily implemented by a class by mixing the {@link module:utils/emittermixin~Emitter} mixin.\n *\n * ```ts\n * class MyClass extends EmitterMixin() {\n * \t// This class now implements the `Emitter` interface.\n * }\n * ```\n *\n * Read more about the usage of this interface in the:\n * * {@glink framework/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/architecture/core-editor-architecture Core editor architecture} guide.\n * * {@glink framework/deep-dive/event-system Event system} deep-dive guide.\n */\nexport interface Emitter {\n\n\t/**\n\t * Registers a callback function to be executed when an event is fired.\n\t *\n\t * Shorthand for {@link #listenTo `this.listenTo( this, event, callback, options )`} (it makes the emitter\n\t * listen on itself).\n\t *\n\t * @typeParam TEvent The type descibing the event. See {@link module:utils/emittermixin~BaseEvent}.\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\ton<TEvent extends BaseEvent>(\n\t\tevent: TEvent[ 'name' ],\n\t\tcallback: GetCallback<TEvent>,\n\t\toptions?: GetCallbackOptions<TEvent>\n\t): void;\n\n\t/**\n\t * Registers a callback function to be executed on the next time the event is fired only. This is similar to\n\t * calling {@link #on} followed by {@link #off} in the callback.\n\t *\n\t * @typeParam TEvent The type descibing the event. See {@link module:utils/emittermixin~BaseEvent}.\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\tonce<TEvent extends BaseEvent>(\n\t\tevent: TEvent[ 'name' ],\n\t\tcallback: GetCallback<TEvent>,\n\t\toptions?: GetCallbackOptions<TEvent>\n\t): void;\n\n\t/**\n\t * Stops executing the callback on the given event.\n\t * Shorthand for {@link #stopListening `this.stopListening( this, event, callback )`}.\n\t *\n\t * @param event The name of the event.\n\t * @param callback The function to stop being called.\n\t */\n\toff( event: string, callback: Function ): void;\n\n\t/**\n\t * Registers a callback function to be executed when an event is fired in a specific (emitter) object.\n\t *\n\t * Events can be grouped in namespaces using `:`.\n\t * When namespaced event is fired, it additionally fires all callbacks for that namespace.\n\t *\n\t * ```ts\n\t * // myEmitter.on( ... ) is a shorthand for myEmitter.listenTo( myEmitter, ... ).\n\t * myEmitter.on( 'myGroup', genericCallback );\n\t * myEmitter.on( 'myGroup:myEvent', specificCallback );\n\t *\n\t * // genericCallback is fired.\n\t * myEmitter.fire( 'myGroup' );\n\t * // both genericCallback and specificCallback are fired.\n\t * myEmitter.fire( 'myGroup:myEvent' );\n\t * // genericCallback is fired even though there are no callbacks for \"foo\".\n\t * myEmitter.fire( 'myGroup:foo' );\n\t * ```\n\t *\n\t * An event callback can {@link module:utils/eventinfo~EventInfo#stop stop the event} and\n\t * set the {@link module:utils/eventinfo~EventInfo#return return value} of the {@link #fire} method.\n\t *\n\t * @label BASE_EMITTER\n\t * @typeParam TEvent The type describing the event. See {@link module:utils/emittermixin~BaseEvent}.\n\t * @param emitter The object that fires the event.\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\tlistenTo<TEvent extends BaseEvent>(\n\t\temitter: Emitter,\n\t\tevent: TEvent[ 'name' ],\n\t\tcallback: GetCallback<TEvent>,\n\t\toptions?: GetCallbackOptions<TEvent>\n\t): void;\n\n\t/**\n\t * Stops listening for events. It can be used at different levels:\n\t *\n\t * * To stop listening to a specific callback.\n\t * * To stop listening to a specific event.\n\t * * To stop listening to all events fired by a specific object.\n\t * * To stop listening to all events fired by all objects.\n\t *\n\t * @label BASE_STOP\n\t * @param emitter The object to stop listening to. If omitted, stops it for all objects.\n\t * @param event (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it\n\t * for all events from `emitter`.\n\t * @param callback (Requires the `event`) The function to be removed from the call list for the given\n\t * `event`.\n\t */\n\tstopListening( emitter?: Emitter, event?: string, callback?: Function ): void;\n\n\t/**\n\t * Fires an event, executing all callbacks registered for it.\n\t *\n\t * The first parameter passed to callbacks is an {@link module:utils/eventinfo~EventInfo} object,\n\t * followed by the optional `args` provided in the `fire()` method call.\n\t *\n\t * @typeParam TEvent The type describing the event. See {@link module:utils/emittermixin~BaseEvent}.\n\t * @param eventOrInfo The name of the event or `EventInfo` object if event is delegated.\n\t * @param args Additional arguments to be passed to the callbacks.\n\t * @returns By default the method returns `undefined`. However, the return value can be changed by listeners\n\t * through modification of the {@link module:utils/eventinfo~EventInfo#return `evt.return`}'s property (the event info\n\t * is the first param of every callback).\n\t */\n\tfire<TEvent extends BaseEvent>(\n\t\teventOrInfo: GetNameOrEventInfo<TEvent>,\n\t\t...args: TEvent[ 'args' ]\n\t): GetEventInfo<TEvent>[ 'return' ];\n\n\t/**\n\t * Delegates selected events to another {@link module:utils/emittermixin~Emitter}. For instance:\n\t *\n\t * ```ts\n\t * emitterA.delegate( 'eventX' ).to( emitterB );\n\t * emitterA.delegate( 'eventX', 'eventY' ).to( emitterC );\n\t * ```\n\t *\n\t * then `eventX` is delegated (fired by) `emitterB` and `emitterC` along with `data`:\n\t *\n\t * ```ts\n\t * emitterA.fire( 'eventX', data );\n\t * ```\n\t *\n\t * and `eventY` is delegated (fired by) `emitterC` along with `data`:\n\t *\n\t * ```ts\n\t * emitterA.fire( 'eventY', data );\n\t * ```\n\t *\n\t * @param events Event names that will be delegated to another emitter.\n\t */\n\tdelegate( ...events: Array<string> ): EmitterMixinDelegateChain;\n\n\t/**\n\t * Stops delegating events. It can be used at different levels:\n\t *\n\t * * To stop delegating all events.\n\t * * To stop delegating a specific event to all emitters.\n\t * * To stop delegating a specific event to a specific emitter.\n\t *\n\t * @param event The name of the event to stop delegating. If omitted, stops it all delegations.\n\t * @param emitter (requires `event`) The object to stop delegating a particular event to.\n\t * If omitted, stops delegation of `event` to all emitters.\n\t */\n\tstopDelegating( event?: string, emitter?: Emitter ): void;\n}\n\ninterface EmitterInternal extends Emitter {\n\n\t/**\n\t * Adds callback to emitter for given event.\n\t *\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?: <TEvent extends BaseEvent>(\n\t\tevent: TEvent[ 'name' ],\n\t\tcallback: GetCallback<TEvent>,\n\t\toptions: CallbackOptions\n\t) => void;\n\n\t/**\n\t * Removes callback from emitter for given event.\n\t *\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: string, callback: Function ) => void;\n\n\t_events?: { [ eventName: string ]: EventNode };\n\n\t[ _emitterId ]?: string;\n\n\t[ _listeningTo ]?: {\n\t\t[ emitterId: string ]: {\n\t\t\temitter: Emitter;\n\t\t\tcallbacks: { [ event: string]: Array<Function> };\n\t\t};\n\t};\n\n\t[ _delegations ]?: Map<string, Map<Emitter, string | ( ( name: string ) => string ) | undefined>>;\n}\n\n/**\n * Default type describing any event.\n *\n * Every custom event has to be compatible with `BaseEvent`.\n *\n * ```ts\n * type MyEvent = {\n * \t// In `fire<MyEvent>( name )`, `on<MyEvent>( name )`, `once<MyEvent>( name )` and `listenTo<MyEvent>( name )` calls\n * \t// the `name` argument will be type-checked to ensure it's `'myEvent'` or have `'myEvent:'` prefix.\n * \t// Required.\n * \tname: 'myEvent' | `myEvent:${ string }`;\n *\n * \t// In `fire<MyEvent>( name, a, b )` call, `a` and `b` parameters will be type-checked against `number` and `string`.\n * \t// In `on<MyEvent>`, `once<MyEvent>` and `listenTo<MyEvent>` calls, the parameters of provided callback function\n * \t// will be automatically inferred as `EventInfo`, `number` and `string`.\n * \t// Required.\n * \targs: [ number, string ];\n *\n * \t// `fire<MyEvent>` will have return type `boolean | undefined`.\n * \t// Optional, unknown by default.\n * \treturn: boolean;\n *\n * \t// `fire<MyEvent>( eventInfo )` will type-check that `eventInfo` is `MyEventInfo`, not a base `EventInfo` or string.\n * \t// In `on<MyEvent>`, `once<MyEvent>` and `listenTo<MyEvent>` calls, the first callback parameter will be of this type.\n * \t// Optional.\n * \teventInfo: MyEventInfo;\n *\n * \t// In `on<MyEvent>`, `once<MyEvent>` and `listenTo<MyEvent>` calls, the `options` parameter will be of type\n * \t// `{ myOption?: boolean; priority?: PriorityString }\n * \t// Optional.\n * \tcallbackOptions: { myOption?: boolean };\n * };\n * ```\n */\nexport type BaseEvent = {\n\tname: string;\n\targs: Array<any>;\n};\n\n/**\n * Utility type that gets the `EventInfo` subclass for the given event.\n */\nexport type GetEventInfo<TEvent extends BaseEvent> = TEvent extends { eventInfo: EventInfo } ?\n\tTEvent[ 'eventInfo' ] :\n\tEventInfo<TEvent[ 'name' ], ( TEvent extends { return: infer TReturn } ? TReturn : unknown )>;\n\n/**\n * Utility type that gets the `EventInfo` subclass or event name type for the given event.\n */\nexport type GetNameOrEventInfo<TEvent extends BaseEvent> = TEvent extends { eventInfo: EventInfo } ?\n\tTEvent[ 'eventInfo' ] :\n\tTEvent[ 'name' ] | EventInfo<TEvent[ 'name' ], ( TEvent extends { return: infer TReturn } ? TReturn : unknown )>;\n\n/**\n * Utility type that gets the callback type for the given event.\n */\nexport type GetCallback<TEvent extends BaseEvent> = ( this: Emitter, ev: GetEventInfo<TEvent>, ...args: TEvent[ 'args' ] ) => void;\n\n/**\n * Utility type that gets the callback options for the given event.\n */\nexport type GetCallbackOptions<TEvent extends BaseEvent> = TEvent extends { callbackOptions: infer TOptions } ?\n\tTOptions & CallbackOptions :\n\tCallbackOptions;\n\n/**\n * Additional options for registering a callback.\n */\nexport interface CallbackOptions {\n\n\t/**\n\t * The priority of this event callback. The higher\n\t * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n\t * order they were added.\n\t *\n\t * @defaultValue `'normal'`\n\t */\n\treadonly priority?: PriorityString;\n}\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 */\nexport function _getEmitterListenedTo( listeningEmitter: Emitter, listenedToEmitterId: string ): Emitter | null {\n\tconst listeningTo = ( listeningEmitter as EmitterInternal )[ _listeningTo ];\n\tif ( listeningTo && listeningTo[ listenedToEmitterId ] ) {\n\t\treturn listeningTo[ listenedToEmitterId ].emitter;\n\t}\n\n\treturn null;\n}\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 */\nexport function _setEmitterId( emitter: Emitter, id?: string ): void {\n\tif ( !( emitter as EmitterInternal )[ _emitterId ] ) {\n\t\t( emitter as EmitterInternal )[ _emitterId ] = id || uid();\n\t}\n}\n\n/**\n * Returns emitter's unique id.\n *\n * @internal\n * @param emitter An emitter which id will be returned.\n */\nexport function _getEmitterId( emitter: Emitter ): string | undefined {\n\treturn ( emitter as EmitterInternal )[ _emitterId ];\n}\n\ninterface EventNode {\n\tcallbacks: Array<{ callback: Function; priority: number }>;\n\tchildEvents: Array<string>;\n}\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: EmitterInternal ): { [ eventName: string ]: EventNode } {\n\tif ( !source._events ) {\n\t\tObject.defineProperty( source, '_events', {\n\t\t\tvalue: {}\n\t\t} );\n\t}\n\n\treturn source._events!;\n}\n\n/**\n * Creates event node for generic-specific events relation architecture.\n */\nfunction makeEventNode(): EventNode {\n\treturn {\n\t\tcallbacks: [],\n\t\tchildEvents: []\n\t};\n}\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: EmitterInternal, eventName: string ): void {\n\tconst events = getEvents( source );\n\n\t// First, check if the event we want to add to the structure already exists.\n\tif ( events[ eventName ] ) {\n\t\t// If it exists, we don't have to do anything.\n\t\treturn;\n\t}\n\n\t// In other case, we have to create the structure for the event.\n\t// Note, that we might need to create intermediate events too.\n\t// I.e. if foo:bar:abc is being registered and we only have foo in the structure,\n\t// we need to also register foo:bar.\n\n\t// Currently processed event name.\n\tlet name = eventName;\n\t// Name of the event that is a child event for currently processed event.\n\tlet childEventName = null;\n\n\t// Array containing all newly created specific events.\n\tconst newEventNodes = [];\n\n\t// While loop can't check for ':' index because we have to handle generic events too.\n\t// In each loop, we truncate event name, going from the most specific name to the generic one.\n\t// I.e. foo:bar:abc -> foo:bar -> foo.\n\twhile ( name !== '' ) {\n\t\tif ( events[ name ] ) {\n\t\t\t// If the currently processed event name is already registered, we can be sure\n\t\t\t// that it already has all the structure created, so we can break the loop here\n\t\t\t// as no more events need to be registered.\n\t\t\tbreak;\n\t\t}\n\n\t\t// If this event is not yet registered, create a new object for it.\n\t\tevents[ name ] = makeEventNode();\n\t\t// Add it to the array with newly created events.\n\t\tnewEventNodes.push( events[ name ] );\n\n\t\t// Add previously processed event name as a child of this event.\n\t\tif ( childEventName ) {\n\t\t\tevents[ name ].childEvents.push( childEventName );\n\t\t}\n\n\t\tchildEventName = name;\n\t\t// Truncate to the parent namespace. Do not use `substr( 0, lastIndexOf( ':' ) )`:\n\t\t// when there is no `:`, `lastIndexOf` is -1 and some JSC builds (Safari 27 x86_64)\n\t\t// miscompile `substr` with a negative length, returning the original string instead of `''`.\n\t\tconst colonIndex = name.lastIndexOf( ':' );\n\n\t\tname = colonIndex > -1 ? name.substring( 0, colonIndex ) : '';\n\t}\n\n\tif ( name !== '' ) {\n\t\t// If name is not empty, we found an already registered event that was a parent of the\n\t\t// event we wanted to register.\n\n\t\t// Copy that event's callbacks to newly registered events.\n\t\tfor ( const node of newEventNodes ) {\n\t\t\tnode.callbacks = events[ name ].callbacks.slice();\n\t\t}\n\n\t\t// Add last newly created event to the already registered event.\n\t\tevents[ name ].childEvents.push( childEventName! );\n\t}\n}\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: EmitterInternal, eventName: string ): Array<EventNode[ 'callbacks' ]> {\n\tconst eventNode = getEvents( source )[ eventName ];\n\n\tif ( !eventNode ) {\n\t\treturn [];\n\t}\n\n\tlet callbacksLists = [ eventNode.callbacks ];\n\n\tfor ( let i = 0; i < eventNode.childEvents.length; i++ ) {\n\t\tconst childCallbacksLists = getCallbacksListsForNamespace( source, eventNode.childEvents[ i ] );\n\n\t\tcallbacksLists = callbacksLists.concat( childCallbacksLists );\n\t}\n\n\treturn callbacksLists;\n}\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: EmitterInternal, eventName: string ): EventNode[ 'callbacks' ] | null {\n\tif ( !source._events ) {\n\t\treturn null;\n\t}\n\n\tlet currentEventName = eventName;\n\n\tdo {\n\t\tconst event = source._events[ currentEventName ];\n\n\t\tif ( event && event.callbacks && event.callbacks.length ) {\n\t\t\treturn event.callbacks;\n\t\t}\n\n\t\tconst colonIndex = currentEventName.lastIndexOf( ':' );\n\n\t\tcurrentEventName = colonIndex > -1 ? currentEventName.substring( 0, colonIndex ) : '';\n\t} while ( currentEventName );\n\n\treturn null;\n}\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(\n\tdestinations: Map<Emitter, string | ( ( name: string ) => string ) | undefined>,\n\teventInfo: EventInfo,\n\tfireArgs: Array<any>\n) {\n\tfor ( let [ emitter, name ] of destinations ) {\n\t\tif ( !name ) {\n\t\t\tname = eventInfo.name;\n\t\t} else if ( typeof name == 'function' ) {\n\t\t\tname = name( eventInfo.name );\n\t\t}\n\n\t\tconst delegatedInfo = new EventInfo( eventInfo.source, name );\n\n\t\tdelegatedInfo.path = [ ...eventInfo.path ];\n\n\t\temitter.fire( delegatedInfo, ...fireArgs );\n\t}\n}\n\n/**\n * Helper for registering event callback on the emitter.\n */\nfunction addEventListener<TEvent extends BaseEvent>(\n\tlistener: EmitterInternal,\n\temitter: EmitterInternal,\n\tevent: TEvent[ 'name' ],\n\tcallback: GetCallback<TEvent>,\n\toptions: CallbackOptions\n) {\n\tif ( emitter._addEventListener ) {\n\t\temitter._addEventListener( event, callback, options );\n\t} else {\n\t\t// Allow listening on objects that do not implement Emitter interface.\n\t\t// This is needed in some tests that are using mocks instead of the real objects with EmitterMixin mixed.\n\t\t( listener._addEventListener!<TEvent> ).call( emitter, event, callback, options );\n\t}\n}\n\n/**\n * Helper for removing event callback from the emitter.\n */\nfunction removeEventListener( listener: EmitterInternal, emitter: EmitterInternal, event: string, callback: Function ): void {\n\tif ( emitter._removeEventListener ) {\n\t\temitter._removeEventListener( event, callback );\n\t} else {\n\t\t// Allow listening on objects that do not implement Emitter interface.\n\t\t// This is needed in some tests that are using mocks instead of the real objects with EmitterMixin mixed.\n\t\tlistener._removeEventListener!.call( emitter, event, callback );\n\t}\n}\n\n/**\n * The return value of {@link ~Emitter#delegate}.\n */\nexport interface EmitterMixinDelegateChain {\n\n\t/**\n\t * Selects destination for {@link module:utils/emittermixin~Emitter#delegate} events.\n\t *\n\t * @param emitter An `EmitterMixin` instance which is the destination for delegated events.\n\t * @param nameOrFunction A custom event name or function which converts the original name string.\n\t */\n\tto( emitter: Emitter, nameOrFunction?: string | ( ( name: string ) => string ) ): void;\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/* eslint-disable @typescript-eslint/unified-signatures */\n\n/**\n * @module utils/observablemixin\n */\n\nimport { EmitterMixin, type Emitter } from './emittermixin.js';\nimport { CKEditorError } from './ckeditorerror.js';\nimport type { Constructor, Mixed } from './mix.js';\n\nimport { isObject } from 'es-toolkit/compat';\n\nconst observablePropertiesSymbol = Symbol( 'observableProperties' );\nconst boundObservablesSymbol = Symbol( 'boundObservables' );\nconst boundPropertiesSymbol = Symbol( 'boundProperties' );\n\nconst decoratedMethods = Symbol( 'decoratedMethods' );\nconst decoratedOriginal = Symbol( 'decoratedOriginal' );\n\n// Keep this a plain alias. A conditional type does not work here: TypeScript cannot reduce a\n// conditional over an unresolved type parameter, so a generic wrapper around `ObservableMixin( base )`\n// silently loses the base class members. The default is a concrete nullary constructor, which\n// is why `undefined` is no longer a valid type argument.\n// See https://github.com/ckeditor/ckeditor5/issues/20238.\n/**\n * Constructor returned by {@link ~ObservableMixin}. Use it to name a mixin base class before extending it.\n *\n * ```ts\n * const MyObservableBase: ObservableMixinConstructor<typeof BaseClass> = ObservableMixin( BaseClass );\n *\n * class MyObservable extends MyObservableBase {}\n * ```\n */\nexport type ObservableMixinConstructor<Base extends Constructor<Emitter> = new () => Emitter> = Mixed<Base, Observable>;\n\nconst defaultObservableClass = /* #__PURE__ */ ObservableMixin( /* #__PURE__ */ EmitterMixin() );\n\n/**\n * A mixin that injects the \"observable properties\" and data binding functionality described in the\n * {@link ~Observable} interface.\n *\n * This function creates a class that inherits from the provided `base` and implements `Observable` interface.\n *\n * ```ts\n * class BaseClass { ... }\n *\n * class MyClass extends ObservableMixin( BaseClass ) {\n * \t// This class derives from `BaseClass` and implements the `Observable` interface.\n * }\n * ```\n *\n * Read more about the concept of observables in the:\n * * {@glink framework/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/architecture/core-editor-architecture Core editor architecture} guide,\n * * {@glink framework/deep-dive/observables Observables deep-dive} guide.\n *\n * @label EXTENDS\n */\nexport function ObservableMixin<Base extends Constructor<Emitter>>( base: Base ): ObservableMixinConstructor<Base>;\n\n/**\n * A mixin that injects the \"observable properties\" and data binding functionality described in the\n * {@link ~Observable} interface.\n *\n * This function creates a class that implements `Observable` interface.\n *\n * ```ts\n * class MyClass extends ObservableMixin() {\n * \t// This class implements the `Observable` interface.\n * }\n * ```\n *\n * Read more about the concept of observables in the:\n * * {@glink framework/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/architecture/core-editor-architecture Core editor architecture} guide,\n * * {@glink framework/deep-dive/observables Observables deep dive} guide.\n *\n * @label NO_ARGUMENTS\n */\nexport function ObservableMixin(): ObservableMixinConstructor;\n\nexport function ObservableMixin( base?: Constructor<Emitter> ): unknown {\n\tif ( !base ) {\n\t\treturn defaultObservableClass;\n\t}\n\n\tabstract class Mixin extends base implements ObservableInternal {\n\t\tpublic set( name: string | { [ name: string ]: unknown }, value?: unknown ): void {\n\t\t\t// If the first parameter is an Object, iterate over its properties.\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\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinitObservable( this );\n\n\t\t\tconst properties = this[ observablePropertiesSymbol ];\n\n\t\t\tif ( ( name in this ) && !properties!.has( name ) ) {\n\t\t\t\t/**\n\t\t\t\t * Cannot override an existing property.\n\t\t\t\t *\n\t\t\t\t * This error is thrown when trying to {@link module:utils/observablemixin~Observable#set set} a property with\n\t\t\t\t * a name of an already existing property. For example:\n\t\t\t\t *\n\t\t\t\t * ```ts\n\t\t\t\t * let observable = new Model();\n\t\t\t\t * observable.property = 1;\n\t\t\t\t * observable.set( 'property', 2 );\t\t\t// throws\n\t\t\t\t *\n\t\t\t\t * observable.set( 'property', 1 );\n\t\t\t\t * observable.set( 'property', 2 );\t\t\t// ok, because this is an existing property.\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * @error observable-set-cannot-override\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'observable-set-cannot-override', this );\n\t\t\t}\n\n\t\t\tObject.defineProperty( this, name, {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\n\t\t\t\tget() {\n\t\t\t\t\treturn properties!.get( name );\n\t\t\t\t},\n\n\t\t\t\tset( this: Observable, value ) {\n\t\t\t\t\tconst oldValue = properties!.get( name );\n\n\t\t\t\t\t// Fire `set` event before the new value will be set to make it possible\n\t\t\t\t\t// to override observable property without affecting `change` event.\n\t\t\t\t\t// See https://github.com/ckeditor/ckeditor5-utils/issues/171.\n\t\t\t\t\tlet newValue = this.fire<ObservableSetEvent>( `set:${ name }`, name, value, oldValue );\n\n\t\t\t\t\tif ( newValue === undefined ) {\n\t\t\t\t\t\tnewValue = value;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Allow undefined as an initial value like A.define( 'x', undefined ).\n\t\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/132.\n\t\t\t\t\t// Note: When properties map has no such own property, then its value is undefined.\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<ObservableChangeEvent>( `change:${ name }`, name, newValue, oldValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t( this as any )[ name ] = value;\n\t\t}\n\n\t\tpublic bind( ...bindProperties: Array<string> ): any {\n\t\t\tif ( !bindProperties.length || !isStringArray( bindProperties ) ) {\n\t\t\t\t/**\n\t\t\t\t * All properties must be strings.\n\t\t\t\t *\n\t\t\t\t * @error observable-bind-wrong-properties\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'observable-bind-wrong-properties', this );\n\t\t\t}\n\n\t\t\tif ( ( new Set( bindProperties ) ).size !== bindProperties.length ) {\n\t\t\t\t/**\n\t\t\t\t * Properties must be unique.\n\t\t\t\t *\n\t\t\t\t * @error observable-bind-duplicate-properties\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'observable-bind-duplicate-properties', this );\n\t\t\t}\n\n\t\t\tinitObservable( this );\n\n\t\t\tconst boundProperties = this[ boundPropertiesSymbol ];\n\n\t\t\tbindProperties.forEach( propertyName => {\n\t\t\t\tif ( boundProperties!.has( propertyName ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Cannot bind the same property more than once.\n\t\t\t\t\t *\n\t\t\t\t\t * @error observable-bind-rebind\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'observable-bind-rebind', this );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst bindings = new Map<string, Binding>();\n\n\t\t\tbindProperties.forEach( a => {\n\t\t\t\tconst binding = { property: a, to: [] };\n\n\t\t\t\tboundProperties!.set( a, binding );\n\t\t\t\tbindings.set( a, binding );\n\t\t\t} );\n\n\t\t\treturn {\n\t\t\t\tto: bindTo,\n\t\t\t\ttoMany: bindToMany,\n\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\n\t\tpublic unbind( ...unbindProperties: Array<keyof this & string> ): void {\n\t\t\t// Nothing to do here if not inited yet.\n\t\t\tif ( !( this[ observablePropertiesSymbol ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst boundProperties = this[ boundPropertiesSymbol ]!;\n\t\t\tconst boundObservables = this[ boundObservablesSymbol ]!;\n\n\t\t\tif ( unbindProperties.length ) {\n\t\t\t\tif ( !isStringArray( unbindProperties ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Properties must be strings.\n\t\t\t\t\t *\n\t\t\t\t\t * @error observable-unbind-wrong-properties\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'observable-unbind-wrong-properties', this );\n\t\t\t\t}\n\n\t\t\t\tunbindProperties.forEach( propertyName => {\n\t\t\t\t\tconst binding = boundProperties.get( propertyName );\n\n\t\t\t\t\t// Nothing to do if the binding is not defined\n\t\t\t\t\tif ( !binding ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\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\n\t\t\t\t\t\ttoPropertyBindings.delete( binding );\n\n\t\t\t\t\t\tif ( !toPropertyBindings.size ) {\n\t\t\t\t\t\t\tdelete toProperties[ toProperty ];\n\t\t\t\t\t\t}\n\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\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\n\t\t\t\tboundObservables.clear();\n\t\t\t\tboundProperties.clear();\n\t\t\t}\n\t\t}\n\n\t\tpublic decorate( this: this & { [ x: string ]: any }, methodName: keyof this & string ): void {\n\t\t\tinitObservable( this );\n\n\t\t\tconst originalMethod = this[ methodName ];\n\n\t\t\tif ( !originalMethod ) {\n\t\t\t\t/**\n\t\t\t\t * Cannot decorate an undefined method.\n\t\t\t\t *\n\t\t\t\t * @error observablemixin-cannot-decorate-undefined\n\t\t\t\t * @param {object} object The object which method should be decorated.\n\t\t\t\t * @param {string} methodName Name of the method which does not exist.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'observablemixin-cannot-decorate-undefined',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ object: this, methodName }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.on( methodName, ( evt, args ) => {\n\t\t\t\tevt.return = originalMethod.apply( this, args );\n\t\t\t} );\n\n\t\t\tthis[ methodName ] = function( ...args: Array<unknown> ) {\n\t\t\t\treturn this.fire( methodName, args );\n\t\t\t};\n\n\t\t\tthis[ methodName ][ decoratedOriginal ] = originalMethod;\n\n\t\t\tif ( !this[ decoratedMethods ] ) {\n\t\t\t\tthis[ decoratedMethods ] = [];\n\t\t\t}\n\n\t\t\tthis[ decoratedMethods ]!.push( methodName );\n\t\t}\n\n\t\t// Override the EmitterMixin stopListening method to be able to clean (and restore) decorated methods.\n\t\t// This is needed in case of:\n\t\t//  1. Have x.foo() decorated.\n\t\t//  2. Call x.stopListening()\n\t\t//  3. Call x.foo(). Problem: nothing happens (the original foo() method is not executed)\n\t\tpublic override stopListening(\n\t\t\tthis: ObservableInternal & { [ x: string ]: any },\n\t\t\temitter?: Emitter,\n\t\t\tevent?: string,\n\t\t\tcallback?: Function\n\t\t): void {\n\t\t\t// Removing all listeners so let's clean the decorated methods to the original state.\n\t\t\tif ( !emitter && this[ decoratedMethods ] ) {\n\t\t\t\tfor ( const methodName of this[ decoratedMethods ]! ) {\n\t\t\t\t\tthis[ methodName ] = this[ methodName ][ decoratedOriginal ];\n\t\t\t\t}\n\n\t\t\t\tdelete this[ decoratedMethods ];\n\t\t\t}\n\n\t\t\tsuper.stopListening( emitter, event, callback );\n\t\t}\n\n\t\tpublic [ observablePropertiesSymbol ]?: Map<string, unknown>;\n\n\t\tpublic [ decoratedMethods ]?: Array<string>;\n\n\t\tpublic [ boundPropertiesSymbol ]?: Map<string, Binding>;\n\n\t\tpublic [ boundObservablesSymbol ]?: Map<Observable, Record<string, Set<Binding>>>;\n\t}\n\n\treturn Mixin;\n}\n\ninterface Binding {\n\n\t/**\n\t * Property which is bound.\n\t */\n\tproperty: string;\n\n\t/**\n\t * Array of observable–property components of the binding (`{ observable: ..., property: .. }`).\n\t */\n\tto: Array<[ Observable, string ]>;\n\n\t/**\n\t * A function which processes `to` components.\n\t */\n\tcallback?: Function;\n}\n\ninterface BindChainInternal {\n\tto: Function;\n\t_observable: Observable;\n\t_bindings: Map<string, Binding>;\n\t_bindProperties: Array<string>;\n\t_to: Array<{\n\t\tobservable: Observable;\n\t\tproperties: Array<string>;\n\t}>;\n}\n\n// Init symbol properties needed for the observable mechanism to work.\nfunction initObservable( observable: ObservableInternal ): void {\n\t// Do nothing if already inited.\n\tif ( observable[ observablePropertiesSymbol ] ) {\n\t\treturn;\n\t}\n\n\t// The internal hash containing the observable's state.\n\tObject.defineProperty( observable, observablePropertiesSymbol, {\n\t\tvalue: new Map()\n\t} );\n\n\t// Map containing bindings to external observables. It shares the binding objects\n\t// (`{ observable: A, property: 'a', to: ... }`) with {@link module:utils/observablemixin~Observable#_boundProperties} and\n\t// it is used to observe external observables to update own properties accordingly.\n\t// See {@link module:utils/observablemixin~Observable#bind}.\n\t//\n\t//\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n\t//\t\tconsole.log( A._boundObservables );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\tB: {\n\t//\t\t\t\t\tx: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\t\t\t{ observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\ty: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t}\n\t//\t\t\t} )\n\t//\n\t//\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n\t//\t\tconsole.log( A._boundObservables );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\tB: {\n\t//\t\t\t\t\tx: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\t\t\t{ observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\ty: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\tz: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t},\n\t//\t\t\t\tC: {\n\t//\t\t\t\t\tw: Set( [\n\t//\t\t\t\t\t\t{ observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t}\n\t//\t\t\t} )\n\t//\n\tObject.defineProperty( observable, boundObservablesSymbol, {\n\t\tvalue: new Map()\n\t} );\n\n\t// Object that stores which properties of this observable are bound and how. It shares\n\t// the binding objects (`{ observable: A, property: 'a', to: ... }`) with\n\t// {@link module:utils/observablemixin~Observable#_boundObservables}. This data structure is\n\t// a reverse of {@link module:utils/observablemixin~Observable#_boundObservables} and it is helpful for\n\t// {@link module:utils/observablemixin~Observable#unbind}.\n\t//\n\t// See {@link module:utils/observablemixin~Observable#bind}.\n\t//\n\t//\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n\t//\t\tconsole.log( A._boundProperties );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\ta: { observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\tb: { observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\tc: { observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t} )\n\t//\n\t//\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n\t//\t\tconsole.log( A._boundProperties );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\ta: { observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\tb: { observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\tc: { observable: A, property: 'c', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\td: { observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t} )\n\tObject.defineProperty( observable, boundPropertiesSymbol, {\n\t\tvalue: new Map()\n\t} );\n}\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( this: BindChainInternal, ...args: Array<Observable | string | Function> ): void {\n\tconst parsedArgs = parseBindToArgs( ...args );\n\tconst bindingsKeys = Array.from( this._bindings.keys() );\n\tconst numberOfBindings = bindingsKeys.length;\n\n\t// Eliminate A.bind( 'x' ).to( B, C )\n\tif ( !parsedArgs.callback && parsedArgs.to.length > 1 ) {\n\t\t/**\n\t\t * Binding multiple observables only possible with callback.\n\t\t *\n\t\t * @error observable-bind-to-no-callback\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-no-callback', this );\n\t}\n\n\t// Eliminate A.bind( 'x', 'y' ).to( B, callback )\n\tif ( numberOfBindings > 1 && parsedArgs.callback ) {\n\t\t/**\n\t\t * Cannot bind multiple properties and use a callback in one binding.\n\t\t *\n\t\t * @error observable-bind-to-extra-callback\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'observable-bind-to-extra-callback',\n\t\t\tthis\n\t\t);\n\t}\n\n\tparsedArgs.to.forEach( to => {\n\t\t// Eliminate A.bind( 'x', 'y' ).to( B, 'a' )\n\t\tif ( to.properties.length && to.properties.length !== numberOfBindings ) {\n\t\t\t/**\n\t\t\t * The number of properties must match.\n\t\t\t *\n\t\t\t * @error observable-bind-to-properties-length\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-bind-to-properties-length', this );\n\t\t}\n\n\t\t// When no to.properties specified, observing source properties instead i.e.\n\t\t// A.bind( 'x', 'y' ).to( B ) -> Observe B.x and B.y\n\t\tif ( !to.properties.length ) {\n\t\t\tto.properties = this._bindProperties;\n\t\t}\n\t} );\n\n\tthis._to = parsedArgs.to;\n\n\t// Fill {@link BindChain#_bindings} with callback. When the callback is set there's only one binding.\n\tif ( parsedArgs.callback ) {\n\t\tthis._bindings.get( bindingsKeys[ 0 ] )!.callback = parsedArgs.callback;\n\t}\n\n\tattachBindToListeners( this._observable, this._to );\n\n\t// Update observable._boundProperties and observable._boundObservables.\n\tupdateBindToBound( this );\n\n\t// Set initial values of bound properties.\n\tthis._bindProperties.forEach( propertyName => {\n\t\tupdateBoundObservableProperty( this._observable, propertyName );\n\t} );\n}\n\n/**\n * Binds to an attribute in a set of iterable observables.\n */\nfunction bindToMany( this: BindChainInternal, observables: Array<Observable>, attribute: string, callback: Function ): void {\n\tif ( this._bindings.size > 1 ) {\n\t\t/**\n\t\t * Binding one attribute to many observables only possible with one attribute.\n\t\t *\n\t\t * @error observable-bind-to-many-not-one-binding\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-many-not-one-binding', this );\n\t}\n\n\tthis.to(\n\t\t// Bind to #attribute of each observable...\n\t\t...getBindingTargets( observables, attribute ),\n\t\t// ...using given callback to parse attribute values.\n\t\tcallback\n\t);\n}\n\n/**\n * Returns an array of binding components for\n * {@link Observable#bind} from a set of iterable observables.\n */\nfunction getBindingTargets( observables: Array<Observable>, attribute: string ): Array<Observable | string> {\n\tconst observableAndAttributePairs = observables.map( observable => [ observable, attribute ] );\n\n\t// Merge pairs to one-dimension array of observables and attributes.\n\treturn Array.prototype.concat.apply( [], observableAndAttributePairs );\n}\n\n/**\n * Check if all entries of the array are of `String` type.\n */\nfunction isStringArray( arr: Array<unknown> ): arr is Array<string> {\n\treturn arr.every( a => typeof a == 'string' );\n}\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: Array<Observable | string | Function> ) {\n\t// Eliminate A.bind( 'x' ).to()\n\tif ( !args.length ) {\n\t\t/**\n\t\t * Invalid argument syntax in `to()`.\n\t\t *\n\t\t * @error observable-bind-to-parse-error\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-parse-error', null );\n\t}\n\n\tconst parsed: { to: BindChainInternal[ '_to' ]; callback?: Function } = { to: [] };\n\tlet lastObservable: { observable: Observable; properties: Array<string> };\n\n\tif ( typeof args[ args.length - 1 ] == 'function' ) {\n\t\tparsed.callback = args.pop() as Function;\n\t}\n\n\targs.forEach( a => {\n\t\tif ( typeof a == 'string' ) {\n\t\t\tlastObservable.properties.push( a );\n\t\t} else if ( typeof a == 'object' ) {\n\t\t\tlastObservable = { observable: a, properties: [] };\n\t\t\tparsed.to.push( lastObservable );\n\t\t} else {\n\t\t\tthrow new CKEditorError( 'observable-bind-to-parse-error', null );\n\t\t}\n\t} );\n\n\treturn parsed;\n}\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(\n\tobservable: ObservableInternal,\n\tbinding: Binding,\n\ttoObservable: Observable,\n\ttoPropertyName: string\n): void {\n\tconst boundObservables = observable[ boundObservablesSymbol ]!;\n\tconst bindingsToObservable = boundObservables.get( toObservable );\n\tconst bindings = bindingsToObservable || {};\n\n\tif ( !bindings[ toPropertyName ] ) {\n\t\tbindings[ toPropertyName ] = new Set();\n\t}\n\n\t// Pass the binding to a corresponding Set in `observable._boundObservables`.\n\tbindings[ toPropertyName ].add( binding );\n\n\tif ( !bindingsToObservable ) {\n\t\tboundObservables.set( toObservable, bindings );\n\t}\n}\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: BindChainInternal ): void {\n\tlet toProperty;\n\n\tchain._bindings.forEach( ( binding, propertyName ) => {\n\t\t// Note: For a binding without a callback, this will run only once\n\t\t// like in A.bind( 'x', 'y' ).to( B, 'a', 'b' )\n\t\t// TODO: ES6 destructuring.\n\t\tchain._to.forEach( to => {\n\t\t\ttoProperty = to.properties[ binding.callback ? 0 : chain._bindProperties.indexOf( propertyName ) ];\n\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/**\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: ObservableInternal, propertyName: string ): void {\n\tconst boundProperties = observable[ boundPropertiesSymbol ]!;\n\tconst binding = boundProperties.get( propertyName )!;\n\tlet propertyValue;\n\n\t// When a binding with callback is created like\n\t//\n\t// \t\tA.bind( 'a' ).to( B, 'b', C, 'c', callback );\n\t//\n\t// collect B.b and C.c, then pass them to callback to set A.a.\n\tif ( binding.callback ) {\n\t\tpropertyValue = binding.callback.apply( observable, binding.to.map( to => ( to[ 0 ] as any )[ to[ 1 ] ] ) );\n\t} else {\n\t\tpropertyValue = binding.to[ 0 ];\n\t\tpropertyValue = ( propertyValue[ 0 ] as any )[ propertyValue[ 1 ] ];\n\t}\n\n\tif ( Object.prototype.hasOwnProperty.call( observable, propertyName ) ) {\n\t\t( observable as any )[ propertyName ] = propertyValue;\n\t} else {\n\t\tobservable.set( propertyName as any, propertyValue );\n\t}\n}\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: ObservableInternal, toBindings: BindChainInternal[ '_to' ] ): void {\n\ttoBindings.forEach( to => {\n\t\tconst boundObservables = observable[ boundObservablesSymbol ]!;\n\t\tlet bindings;\n\n\t\t// If there's already a chain between the observables (`observable` listens to\n\t\t// `to.observable`), there's no need to create another `change` event listener.\n\t\tif ( !boundObservables.get( to.observable ) ) {\n\t\t\tobservable.listenTo<ObservableChangeEvent>( to.observable, 'change', ( evt, propertyName ) => {\n\t\t\t\tbindings = boundObservables.get( to.observable )![ propertyName ];\n\n\t\t\t\t// Note: to.observable will fire for any property change, react\n\t\t\t\t// to changes of properties which are bound only.\n\t\t\t\tif ( bindings ) {\n\t\t\t\t\tbindings.forEach( binding => {\n\t\t\t\t\t\tupdateBoundObservableProperty( observable, binding.property );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n}\n\n/**\n * An interface which adds \"observable properties\" and data binding functionality.\n *\n * Can be easily implemented by a class by mixing the {@link module:utils/observablemixin~Observable} mixin.\n *\n * ```ts\n * class MyClass extends ObservableMixin( OtherBaseClass ) {\n * \t// This class now implements the `Observable` interface.\n * }\n * ```\n *\n * Read more about the usage of this interface in the:\n * * {@glink framework/architecture/core-editor-architecture#event-system-and-observables Event system and observables}\n * section of the {@glink framework/architecture/core-editor-architecture Core editor architecture} guide,\n * * {@glink framework/deep-dive/observables Observables deep-dive} guide.\n */\nexport interface Observable extends Emitter {\n\n\t/**\n\t * Creates and sets the value of an observable property of this object. Such a property becomes a part\n\t * of the state and is observable.\n\t *\n\t * This method throws the `observable-set-cannot-override` error if the observable instance already\n\t * has a property with the given property name. This prevents from mistakenly overriding existing\n\t * properties and methods, but means that `foo.set( 'bar', 1 )` may be slightly slower than `foo.bar = 1`.\n\t *\n\t * In TypeScript, those properties should be declared in class using `declare` keyword. In example:\n\t *\n\t * ```ts\n\t * public declare myProp: number;\n\t *\n\t * constructor() {\n\t * \tthis.set( 'myProp', 2 );\n\t * }\n\t * ```\n\t *\n\t * @label KEY_VALUE\n\t * @param name The property's name.\n\t * @param value The property's value.\n\t */\n\tset<K extends keyof this & string>( name: K, value: this[ K ] ): void;\n\n\t/**\n\t * Creates and sets the value of an observable properties of this object. Such a property becomes a part\n\t * of the state and is observable.\n\t *\n\t * It accepts a single object literal containing key/value pairs with properties to be set.\n\t *\n\t * This method throws the `observable-set-cannot-override` error if the observable instance already\n\t * has a property with the given property name. This prevents from mistakenly overriding existing\n\t * properties and methods, but means that `foo.set( 'bar', 1 )` may be slightly slower than `foo.bar = 1`.\n\t *\n\t * In TypeScript, those properties should be declared in class using `declare` keyword. In example:\n\t *\n\t * ```ts\n\t * public declare myProp1: number;\n\t * public declare myProp2: string;\n\t *\n\t * constructor() {\n\t * \tthis.set( {\n\t * \t\t'myProp1: 2,\n\t * \t\t'myProp2: 'foo'\n\t * \t} );\n\t * }\n\t * ```\n\t * @label OBJECT\n\t * @param values An object with `name=>value` pairs.\n\t */\n\tset( values: object & { readonly [ K in keyof this ]?: unknown } ): void;\n\n\t/**\n\t * Binds {@link #set observable properties} to other objects implementing the\n\t * {@link module:utils/observablemixin~Observable} interface.\n\t *\n\t * Read more in the {@glink framework/deep-dive/observables#property-bindings dedicated} guide\n\t * covering the topic of property bindings with some additional examples.\n\t *\n\t * Consider two objects: a `button` and an associated `command` (both `Observable`).\n\t *\n\t * A simple property binding could be as follows:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t * ```\n\t *\n\t * or even shorter:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command );\n\t * ```\n\t *\n\t * which works in the following way:\n\t *\n\t * * `button.isEnabled` **instantly equals** `command.isEnabled`,\n\t * * whenever `command.isEnabled` changes, `button.isEnabled` will immediately reflect its value.\n\t *\n\t * **Note**: To release the binding, use {@link module:utils/observablemixin~Observable#unbind}.\n\t *\n\t * You can also \"rename\" the property in the binding by specifying the new name in the `to()` chain:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isWorking' );\n\t * ```\n\t *\n\t * It is possible to bind more than one property at a time to shorten the code:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled', 'value' ).to( command );\n\t * ```\n\t *\n\t * which corresponds to:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command );\n\t * button.bind( 'value' ).to( command );\n\t * ```\n\t *\n\t * The binding can include more than one observable, combining multiple data sources in a custom callback:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isEnabled', ui, 'isVisible',\n\t * \t( isCommandEnabled, isUIVisible ) => isCommandEnabled && isUIVisible );\n\t * ```\n\t *\n\t * Using a custom callback allows processing the value before passing it to the target property:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'value', value => value === 'heading1' );\n\t * ```\n\t *\n\t * It is also possible to bind to the same property in an array of observables.\n\t * To bind a `button` to multiple commands (also `Observables`) so that each and every one of them\n\t * must be enabled for the button to become enabled, use the following code:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).toMany( [ commandA, commandB, commandC ], 'isEnabled',\n\t * \t( isAEnabled, isBEnabled, isCEnabled ) => isAEnabled && isBEnabled && isCEnabled );\n\t * ```\n\t *\n\t * @label SINGLE_BIND\n\t * @param bindProperty Observable property that will be bound to other observable(s).\n\t * @returns The bind chain with the `to()` and `toMany()` methods.\n\t */\n\tbind<K extends keyof this & string>(\n\t\tbindProperty: K\n\t): ObservableSingleBindChain<K, this[ K ]>;\n\n\t/**\n\t * Binds {@link #set observable properties} to other objects implementing the\n\t * {@link module:utils/observablemixin~Observable} interface.\n\t *\n\t * Read more in the {@glink framework/deep-dive/observables#property-bindings dedicated} guide\n\t * covering the topic of property bindings with some additional examples.\n\t *\n\t * Consider two objects: a `button` and an associated `command` (both `Observable`).\n\t *\n\t * A simple property binding could be as follows:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t * ```\n\t *\n\t * or even shorter:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command );\n\t * ```\n\t *\n\t * which works in the following way:\n\t *\n\t * * `button.isEnabled` **instantly equals** `command.isEnabled`,\n\t * * whenever `command.isEnabled` changes, `button.isEnabled` will immediately reflect its value.\n\t *\n\t * **Note**: To release the binding, use {@link module:utils/observablemixin~Observable#unbind}.\n\t *\n\t * You can also \"rename\" the property in the binding by specifying the new name in the `to()` chain:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isWorking' );\n\t * ```\n\t *\n\t * It is possible to bind more than one property at a time to shorten the code:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled', 'value' ).to( command );\n\t * ```\n\t *\n\t * which corresponds to:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command );\n\t * button.bind( 'value' ).to( command );\n\t * ```\n\t *\n\t * The binding can include more than one observable, combining multiple data sources in a custom callback:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isEnabled', ui, 'isVisible',\n\t * \t( isCommandEnabled, isUIVisible ) => isCommandEnabled && isUIVisible );\n\t * ```\n\t *\n\t * Using a custom callback allows processing the value before passing it to the target property:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'value', value => value === 'heading1' );\n\t * ```\n\t *\n\t * It is also possible to bind to the same property in an array of observables.\n\t * To bind a `button` to multiple commands (also `Observables`) so that each and every one of them\n\t * must be enabled for the button to become enabled, use the following code:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).toMany( [ commandA, commandB, commandC ], 'isEnabled',\n\t * \t( isAEnabled, isBEnabled, isCEnabled ) => isAEnabled && isBEnabled && isCEnabled );\n\t * ```\n\t *\n\t * @label DUAL_BIND\n\t * @param bindProperty1 Observable property that will be bound to other observable(s).\n\t * @param bindProperty2 Observable property that will be bound to other observable(s).\n\t * @returns The bind chain with the `to()` and `toMany()` methods.\n\t */\n\tbind<K1 extends keyof this & string, K2 extends keyof this & string>(\n\t\tbindProperty1: K1,\n\t\tbindProperty2: K2\n\t): ObservableDualBindChain<K1, this[ K1 ], K2, this[ K2 ]>;\n\n\t/**\n\t * Binds {@link #set observable properties} to other objects implementing the\n\t * {@link module:utils/observablemixin~Observable} interface.\n\t *\n\t * Read more in the {@glink framework/deep-dive/observables#property-bindings dedicated} guide\n\t * covering the topic of property bindings with some additional examples.\n\t *\n\t * Consider two objects: a `button` and an associated `command` (both `Observable`).\n\t *\n\t * A simple property binding could be as follows:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t * ```\n\t *\n\t * or even shorter:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command );\n\t * ```\n\t *\n\t * which works in the following way:\n\t *\n\t * * `button.isEnabled` **instantly equals** `command.isEnabled`,\n\t * * whenever `command.isEnabled` changes, `button.isEnabled` will immediately reflect its value.\n\t *\n\t * **Note**: To release the binding, use {@link module:utils/observablemixin~Observable#unbind}.\n\t *\n\t * You can also \"rename\" the property in the binding by specifying the new name in the `to()` chain:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isWorking' );\n\t * ```\n\t *\n\t * It is possible to bind more than one property at a time to shorten the code:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled', 'value' ).to( command );\n\t * ```\n\t *\n\t * which corresponds to:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command );\n\t * button.bind( 'value' ).to( command );\n\t * ```\n\t *\n\t * The binding can include more than one observable, combining multiple data sources in a custom callback:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'isEnabled', ui, 'isVisible',\n\t * \t( isCommandEnabled, isUIVisible ) => isCommandEnabled && isUIVisible );\n\t * ```\n\t *\n\t * Using a custom callback allows processing the value before passing it to the target property:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).to( command, 'value', value => value === 'heading1' );\n\t * ```\n\t *\n\t * It is also possible to bind to the same property in an array of observables.\n\t * To bind a `button` to multiple commands (also `Observables`) so that each and every one of them\n\t * must be enabled for the button to become enabled, use the following code:\n\t *\n\t * ```ts\n\t * button.bind( 'isEnabled' ).toMany( [ commandA, commandB, commandC ], 'isEnabled',\n\t * \t( isAEnabled, isBEnabled, isCEnabled ) => isAEnabled && isBEnabled && isCEnabled );\n\t * ```\n\t *\n\t * @label MANY_BIND\n\t * @param bindProperties Observable properties that will be bound to other observable(s).\n\t * @returns The bind chain with the `to()` and `toMany()` methods.\n\t */\n\tbind( ...bindProperties: Array<keyof this & string> ): ObservableMultiBindChain;\n\n\t/**\n\t * Removes the binding created with {@link #bind}.\n\t *\n\t * ```ts\n\t * // Removes the binding for the 'a' property.\n\t * A.unbind( 'a' );\n\t *\n\t * // Removes bindings for all properties.\n\t * A.unbind();\n\t * ```\n\t *\n\t * @param unbindProperties Observable properties to be unbound. All the bindings will\n\t * be released if no properties are provided.\n\t */\n\tunbind( ...unbindProperties: Array<keyof this & string> ): void;\n\n\t/**\n\t * Turns the given methods of this object into event-based ones. This means that the new method will fire an event\n\t * (named after the method) and the original action will be plugged as a listener to that event.\n\t *\n\t * Read more in the {@glink framework/deep-dive/observables#decorating-object-methods dedicated} guide\n\t * covering the topic of decorating methods with some additional examples.\n\t *\n\t * Decorating the method does not change its behavior (it only adds an event),\n\t * but it allows to modify it later on by listening to the method's event.\n\t *\n\t * For example, to cancel the method execution the event can be {@link module:utils/eventinfo~EventInfo#stop stopped}:\n\t *\n\t * ```ts\n\t * class Foo extends ObservableMixin() {\n\t * \tconstructor() {\n\t * \t\tsuper();\n\t * \t\tthis.decorate( 'method' );\n\t * \t}\n\t *\n\t * \tmethod() {\n\t * \t\tconsole.log( 'called!' );\n\t * \t}\n\t * }\n\t *\n\t * const foo = new Foo();\n\t * foo.on( 'method', ( evt ) => {\n\t * \tevt.stop();\n\t * }, { priority: 'high' } );\n\t *\n\t * foo.method(); // Nothing is logged.\n\t * ```\n\t *\n\t *\n\t * **Note**: The high {@link module:utils/priorities~PriorityString priority} listener\n\t * has been used to execute this particular callback before the one which calls the original method\n\t * (which uses the \"normal\" priority).\n\t *\n\t * It is also possible to change the returned value:\n\t *\n\t * ```ts\n\t * foo.on( 'method', ( evt ) => {\n\t * \tevt.return = 'Foo!';\n\t * } );\n\t *\n\t * foo.method(); // -> 'Foo'\n\t * ```\n\t *\n\t * Finally, it is possible to access and modify the arguments the method is called with:\n\t *\n\t * ```ts\n\t * method( a, b ) {\n\t * \tconsole.log( `${ a }, ${ b }`  );\n\t * }\n\t *\n\t * // ...\n\t *\n\t * foo.on( 'method', ( evt, args ) => {\n\t * \targs[ 0 ] = 3;\n\t *\n\t * \tconsole.log( args[ 1 ] ); // -> 2\n\t * }, { priority: 'high' } );\n\t *\n\t * foo.method( 1, 2 ); // -> '3, 2'\n\t * ```\n\t *\n\t * @param methodName Name of the method to decorate.\n\t */\n\tdecorate( methodName: keyof this & string ): void;\n}\n\ninterface ObservableInternal extends Observable {\n\t[ observablePropertiesSymbol ]?: Map<string, unknown>;\n\n\t[ decoratedMethods ]?: Array<string>;\n\n\t[ boundPropertiesSymbol ]?: Map<string, Binding>;\n\n\t[ boundObservablesSymbol]?: Map<Observable, Record<string, Set<Binding>>>;\n}\n\n/**\n * Fired when a property changed value.\n *\n * ```ts\n * observable.set( 'prop', 1 );\n *\n * observable.on<ObservableChangeEvent<number>>( 'change:prop', ( evt, propertyName, newValue, oldValue ) => {\n * \tconsole.log( `${ propertyName } has changed from ${ oldValue } to ${ newValue }` );\n * } );\n *\n * observable.prop = 2; // -> 'prop has changed from 1 to 2'\n * ```\n *\n * @eventName ~Observable#change:\\{property\\}\n * @param {String} name The property name.\n * @param {*} value The new property value.\n * @param {*} oldValue The previous property value.\n */\nexport type ObservableChangeEvent<TValue = any> = {\n\tname: 'change' | `change:${ string }`;\n\targs: [ name: string, value: TValue, oldValue: TValue ];\n};\n\n/**\n * Fired when a property value is going to be set but is not set yet (before the `change` event is fired).\n *\n * You can control the final value of the property by using\n * the {@link module:utils/eventinfo~EventInfo#return event's `return` property}.\n *\n * ```ts\n * observable.set( 'prop', 1 );\n *\n * observable.on<ObservableSetEvent<number>>( 'set:prop', ( evt, propertyName, newValue, oldValue ) => {\n * \tconsole.log( `Value is going to be changed from ${ oldValue } to ${ newValue }` );\n * \tconsole.log( `Current property value is ${ observable[ propertyName ] }` );\n *\n * \t// Let's override the value.\n * \tevt.return = 3;\n * } );\n *\n * observable.on<ObservableChangeEvent<number>>( 'change:prop', ( evt, propertyName, newValue, oldValue ) => {\n * \tconsole.log( `Value has changed from ${ oldValue } to ${ newValue }` );\n * } );\n *\n * observable.prop = 2; // -> 'Value is going to be changed from 1 to 2'\n *                      // -> 'Current property value is 1'\n *                      // -> 'Value has changed from 1 to 3'\n * ```\n *\n * **Note:** The event is fired even when the new value is the same as the old value.\n *\n * @eventName ~Observable#set:\\{property\\}\n * @param {String} name The property name.\n * @param {*} value The new property value.\n * @param {*} oldValue The previous property value.\n */\nexport type ObservableSetEvent<TValue = any> = {\n\tname: 'set' | `set:${ string }`;\n\targs: [ name: string, value: TValue, oldValue: TValue ];\n\treturn: TValue;\n};\n\n/**\n * Utility type that creates an event describing type from decorated method.\n *\n * ```ts\n * class Foo extends ObservableMixin() {\n * \tconstructor() {\n * \t\tsuper();\n * \t\tthis.decorate( 'method' );\n * \t}\n *\n * \tmethod( a: number, b: number ): number {\n * \t\treturn a + b;\n * \t}\n * }\n *\n * type FooMethodEvent = DecoratedMethodEvent<Foo, 'method'>;\n *\n * const foo = new Foo();\n *\n * foo.on<FooMethodEvent>( 'method', ( evt, [ a, b ] ) => {\n * \t// `a` and `b` are inferred as numbers.\n * } )\n * ```\n */\nexport type DecoratedMethodEvent<\n\tTObservable extends Observable & { [ N in TName ]: ( ...args: Array<any> ) => any },\n\tTName extends keyof TObservable & string\n> = {\n\tname: TName;\n\targs: [ Parameters<TObservable[ TName ]> ];\n\treturn: ReturnType<TObservable[ TName ]>;\n};\n\nexport interface ObservableSingleBindChain<TKey extends string, TVal> {\n\ttoMany<O extends Observable, K extends keyof O>(\n\t\tobservables: ReadonlyArray<O>,\n\t\tkey: K,\n\t\tcallback: ( ...values: Array<O[ K ]> ) => TVal\n\t): void;\n\n\tto<O extends ObservableWithProperty<TKey, TVal>>(\n\t\tobservable: O\n\t): void;\n\tto<O extends ObservableWithProperty<TKey>>(\n\t\tobservable: O,\n\t\tcallback: ( value: O[ TKey ] ) => TVal\n\t): void;\n\tto<O extends ObservableWithProperty<K, TVal>, K extends keyof O>(\n\t\tobservable: O,\n\t\tkey: K\n\t): void;\n\tto<O extends Observable, K extends keyof O>(\n\t\tobservable: O,\n\t\tkey: K,\n\t\tcallback: ( value: O[ K ] ) => TVal,\n\t): void;\n\tto<\n\t\tO1 extends ObservableWithProperty<TKey>,\n\t\tO2 extends ObservableWithProperty<TKey>\n\t>(\n\t\tobservable1: O1,\n\t\tobservable2: O2,\n\t\tcallback: ( value1: O1[ TKey ], value2: O2[ TKey ] ) => TVal\n\t): void;\n\tto<\n\t\tO1 extends Observable,\n\t\tK1 extends keyof O1,\n\t\tO2 extends Observable,\n\t\tK2 extends keyof O2\n\t>(\n\t\tobservable1: O1,\n\t\tkey1: K1,\n\t\tobservable2: O2,\n\t\tkey2: K2,\n\t\tcallback: ( value1: O1[ K1 ], value2: O2[ K2 ] ) => TVal\n\t): void;\n\tto<\n\t\tO1 extends ObservableWithProperty<TKey>,\n\t\tO2 extends ObservableWithProperty<TKey>,\n\t\tO3 extends ObservableWithProperty<TKey>\n\t>(\n\t\tobservable1: O1,\n\t\tobservable2: O2,\n\t\tobservable3: O3,\n\t\tcallback: ( value1: O1[ TKey ], value2: O2[ TKey ], value3: O3[ TKey ] ) => TVal\n\t): void;\n\tto<\n\t\tO1 extends Observable,\n\t\tK1 extends keyof O1,\n\t\tO2 extends Observable,\n\t\tK2 extends keyof O2,\n\t\tO3 extends Observable,\n\t\tK3 extends keyof O3\n\t>(\n\t\tobservable1: O1,\n\t\tkey1: K1,\n\t\tobservable2: O2,\n\t\tkey2: K2,\n\t\tobservable3: O3,\n\t\tkey3: K3,\n\t\tcallback: ( value1: O1[ K1 ], value2: O2[ K2 ], value3: O3[ K3 ] ) => TVal\n\t): void;\n\tto<\n\t\tO1 extends ObservableWithProperty<TKey>,\n\t\tO2 extends ObservableWithProperty<TKey>,\n\t\tO3 extends ObservableWithProperty<TKey>,\n\t\tO4 extends ObservableWithProperty<TKey>\n\t>(\n\t\tobservable1: O1,\n\t\tobservable2: O2,\n\t\tobservable3: O3,\n\t\tobservable4: O4,\n\t\tcallback: ( value1: O1[ TKey ], value2: O2[ TKey ], value3: O3[ TKey ], value4: O4[ TKey ] ) => TVal\n\t): void;\n\tto<\n\t\tO1 extends Observable,\n\t\tK1 extends keyof O1,\n\t\tO2 extends Observable,\n\t\tK2 extends keyof O2,\n\t\tO3 extends Observable,\n\t\tK3 extends keyof O3,\n\t\tO4 extends Observable,\n\t\tK4 extends keyof O4\n\t>(\n\t\tobservable1: O1,\n\t\tkey1: K1,\n\t\tobservable2: O2,\n\t\tkey2: K2,\n\t\tobservable3: O3,\n\t\tkey3: K3,\n\t\tobservable4: O4,\n\t\tkey4: K4,\n\t\tcallback: ( value1: O1[ K1 ], value2: O2[ K2 ], value3: O3[ K3 ], value4: O4[ K4 ] ) => TVal\n\t): void;\n\tto<\n\t\tO1 extends ObservableWithProperty<TKey>,\n\t\tO2 extends ObservableWithProperty<TKey>,\n\t\tO3 extends ObservableWithProperty<TKey>,\n\t\tO4 extends ObservableWithProperty<TKey>,\n\t\tO5 extends ObservableWithProperty<TKey>\n\t>(\n\t\tobservable1: O1,\n\t\tobservable2: O2,\n\t\tobservable3: O3,\n\t\tobservable4: O4,\n\t\tobservable5: O5,\n\t\tcallback: ( value1: O1[ TKey ], value2: O2[ TKey ], value3: O3[ TKey ], value4: O4[ TKey ], value5: O5[ TKey ] ) => TVal\n\t): void;\n\tto<\n\t\tO1 extends Observable,\n\t\tK1 extends keyof O1,\n\t\tO2 extends Observable,\n\t\tK2 extends keyof O2,\n\t\tO3 extends Observable,\n\t\tK3 extends keyof O3,\n\t\tO4 extends Observable,\n\t\tK4 extends keyof O4,\n\t\tO5 extends Observable,\n\t\tK5 extends keyof O5\n\t>(\n\t\tobservable1: O1,\n\t\tkey1: K1,\n\t\tobservable2: O2,\n\t\tkey2: K2,\n\t\tobservable3: O3,\n\t\tkey3: K3,\n\t\tobservable4: O4,\n\t\tkey4: K4,\n\t\tobservable5: O5,\n\t\tkey5: K5,\n\t\tcallback: ( value1: O1[ K1 ], value2: O2[ K2 ], value3: O3[ K3 ], value4: O4[ K4 ], value5: O5[ K5 ] ) => TVal\n\t): void;\n}\n\n/**\n * A helper type that can be used as a constraint, ensuring the type is both observable and have the given property.\n *\n * ```ts\n * // Ensures that `obj` is `Observable` and have property named 'abc'.\n * function f<O extends ObservableWithProperty<'abc'>>( obj: O ) {}\n *\n * // Ensures that `obj` is `Observable` and have property named 'abc' with value `number`.\n * function f<O extends ObservableWithProperty<'abc', number>>( obj: O ) {}\n * ```\n */\nexport type ObservableWithProperty<TKey extends PropertyKey, TVal = any> = undefined extends TVal ?\n\tObservable & { [ P in TKey ]?: TVal } :\n\tObservable & { [ P in TKey ]: TVal };\n\nexport interface ObservableDualBindChain<TKey1 extends string, TVal1, TKey2 extends string, TVal2> {\n\tto<\n\t\tO extends ObservableWithProperty<K1, TVal1> & ObservableWithProperty<K2, TVal2>,\n\t\tK1 extends keyof O,\n\t\tK2 extends keyof O\n\t>(\n\t\tobservable: O,\n\t\tkey1: K1,\n\t\tkey2: K2\n\t): void;\n\n\tto<\n\t\tO extends ObservableWithProperty<TKey1, TVal1> & ObservableWithProperty<TKey2, TVal2>\n\t>(\n\t\tobservable: O\n\t): void;\n}\n\nexport interface ObservableMultiBindChain {\n\tto<O extends Observable>( observable: O, ...properties: Array<keyof O> ): void;\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/**\n * @module utils/elementreplacer\n */\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 */\nexport class ElementReplacer {\n\t/**\n\t * The elements replaced by {@link #replace} and their replacements.\n\t */\n\tprivate _replacedElements: Array<{ element: HTMLElement; newElement?: HTMLElement }>;\n\n\tconstructor() {\n\t\tthis._replacedElements = [];\n\t}\n\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\tpublic replace( element: HTMLElement, newElement?: HTMLElement ): void {\n\t\tthis._replacedElements.push( { element, newElement } );\n\n\t\telement.style.display = 'none';\n\n\t\tif ( newElement ) {\n\t\t\telement.parentNode!.insertBefore( newElement, element.nextSibling );\n\t\t}\n\t}\n\n\t/**\n\t * Restores what {@link #replace} did.\n\t */\n\tpublic restore(): void {\n\t\tthis._replacedElements.forEach( ( { element, newElement } ) => {\n\t\t\telement.style.display = '';\n\n\t\t\tif ( newElement ) {\n\t\t\t\tnewElement.remove();\n\t\t\t}\n\t\t} );\n\n\t\tthis._replacedElements = [];\n\t}\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/**\n * @module utils/abortabledebounce\n */\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 */\nexport function abortableDebounce<Args extends Array<any>, Ret>(\n\tfunc: ( signal: AbortSignal, ...args: Args ) => Ret\n): AbortableFunc<Args, Ret> {\n\tlet controller = new AbortController();\n\n\tfunction abortable( ...args: Args ) {\n\t\tcontroller.abort();\n\t\tcontroller = new AbortController();\n\n\t\treturn func( controller.signal, ...args );\n\t}\n\n\tabortable.abort = () => controller.abort();\n\n\treturn abortable;\n}\n\nexport interface AbortableFunc<Args extends Array<any>, Ret> {\n\t( ...args: Args ): Ret;\n\tabort(): void;\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/**\n * @module utils/count\n */\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 */\nexport function count( iterable: Iterable<unknown> ): number {\n\tlet count = 0;\n\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tfor ( const _ of iterable ) {\n\t\tcount++;\n\t}\n\n\treturn count;\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/**\n * @module utils/comparearrays\n */\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 */\nexport function compareArrays( a: ReadonlyArray<unknown>, b: ReadonlyArray<unknown> ): ArrayRelation | number {\n\tconst minLen = Math.min( a.length, b.length );\n\n\tfor ( let i = 0; i < minLen; i++ ) {\n\t\tif ( a[ i ] != b[ i ] ) {\n\t\t\t// The arrays are different.\n\t\t\treturn i;\n\t\t}\n\t}\n\n\t// Both arrays were same at all points.\n\tif ( a.length == b.length ) {\n\t\t// If their length is also same, they are the same.\n\t\treturn 'same';\n\t} else if ( a.length < b.length ) {\n\t\t// Compared array is shorter so it is a prefix of the other array.\n\t\treturn 'prefix';\n\t} else {\n\t\t// Compared array is longer so it is an extension of the other array.\n\t\treturn 'extension';\n\t}\n}\n\n/**\n * Array relation.\n */\nexport type ArrayRelation = 'extension' | 'same' | 'prefix';\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/**\n * @module utils/isiterable\n */\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 */\nexport function isIterable( value: any ): value is Iterable<any> {\n\treturn !!( value && value[ Symbol.iterator ] );\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/**\n * @module utils/dom/createelement\n */\n\nimport { isIterable } from '../isiterable.js';\nimport { isString } from 'es-toolkit/compat';\n\n/**\n * Attributes to be applied to the HTML element.\n */\nexport type HTMLElementAttributes = { readonly [ key: string ]: string };\n\n/**\n * Attributes to be applied to the SVG element.\n */\nexport type SVGElementAttributes = HTMLElementAttributes & { xmlns: string };\n\n/**\n * Element or elements that will be added to the created element as children. Strings will be automatically turned into Text nodes.\n */\nexport type ChildrenElements = Node | string | Iterable<Node | string>;\n\n/**\n * Creates an SVG element with attributes and children elements.\n *\n * ```ts\n * createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' } ); // <mask>\n * createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg', id: 'foo' } ); // <mask id=\"foo\">\n * createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' }, 'foo' ); // <mask>foo</mask>\n * createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' }, [ createElement(...) ] ); // <mask><...></mask>\n * ```\n *\n * @label SVG_ELEMENT\n * @param doc Document used to create the element.\n * @param name Name of the SVG 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 SVG element.\n */\nexport function createElement<T extends keyof SVGElementTagNameMap>(\n\tdoc: Document,\n\tname: T,\n\tattributes: SVGElementAttributes,\n\tchildren?: ChildrenElements\n): SVGElementTagNameMap[T];\n\n/**\n * Creates an HTML element with attributes and children elements.\n *\n * ```ts\n * createElement( document, 'p' ); // <p>\n * createElement( document, 'p', { class: 'foo' } ); // <p class=\"foo\">\n * createElement( document, 'p', null, 'foo' ); // <p>foo</p>\n * createElement( document, 'p', null, [ createElement(...) ] ); // <p><...></p>\n * ```\n *\n * @label HTML_ELEMENT\n * @param doc Document used to create the element.\n * @param name Name of the HTML 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 element.\n */\nexport function createElement<T extends keyof HTMLElementTagNameMap>(\n\tdoc: Document,\n\tname: T,\n\tattributes?: HTMLElementAttributes,\n\tchildren?: ChildrenElements\n): HTMLElementTagNameMap[T];\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 */\nexport function createElement(\n\tdoc: Document,\n\tname: string,\n\tattributes: SVGElementAttributes | HTMLElementAttributes = {},\n\tchildren: ChildrenElements = []\n): Element {\n\tconst namespace = attributes && attributes.xmlns;\n\tconst element = namespace ? doc.createElementNS( namespace, name ) : doc.createElement( name );\n\n\tfor ( const key in attributes ) {\n\t\telement.setAttribute( key, attributes[ key ] );\n\t}\n\n\tif ( isString( children ) || !isIterable( children ) ) {\n\t\tchildren = [ children ];\n\t}\n\n\tfor ( let child of children ) {\n\t\tif ( isString( child ) ) {\n\t\t\tchild = doc.createTextNode( child );\n\t\t}\n\n\t\telement.appendChild( child );\n\t}\n\n\treturn element;\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/**\n * @module utils/config\n */\n\nimport { isPlainObject, isElement, cloneDeepWith } from 'es-toolkit/compat';\n\n/**\n * Handles a configuration dictionary.\n *\n * @typeParam Cfg A type of the configuration dictionary.\n */\nexport class Config<Cfg> {\n\t/**\n\t * Store for the whole configuration.\n\t */\n\tprivate readonly _config: Record<string, any>;\n\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?: Partial<Cfg>, defaultConfigurations?: Partial<Cfg> ) {\n\t\tthis._config = Object.create( null );\n\n\t\t// Set default configuration.\n\t\tif ( defaultConfigurations ) {\n\t\t\t// Clone the configuration to make sure that the properties will not be shared\n\t\t\t// between editors and make the watchdog feature work correctly.\n\t\t\tthis.define( cloneConfig( defaultConfigurations ) );\n\t\t}\n\n\t\t// Set initial configuration.\n\t\tif ( configurations ) {\n\t\t\tthis._setObjectToTarget( this._config, configurations );\n\t\t}\n\t}\n\n\t/**\n\t * Set configuration values.\n\t *\n\t * It also accepts setting a \"deep configuration\" by using dots in the name. For example, `'resize.width'` sets\n\t * the value for the `width` configuration in the `resize` subset.\n\t *\n\t * ```ts\n\t * config.set( 'resize.width', 500 );\n\t * ```\n\t *\n\t * It accepts both a name/value pair or an object, which properties and values will be used to set\n\t * configurations. See {@link #set:CONFIG_OBJECT}.\n\t *\n\t * @label KEY_VALUE\n\t * @param name The configuration name. Configuration names are case-sensitive.\n\t * @param value The configuration value.\n\t */\n\tpublic set<K extends string>( name: K, value: GetSubConfig<Cfg, K> ): void;\n\n\t/**\n\t * Set configuration values.\n\t *\n\t * It accepts an object, which properties and values will be used to set configurations.\n\t *\n\t * ```ts\n\t * config.set( {\n\t * \twidth: 500\n\t * \ttoolbar: {\n\t * \t\tcollapsed: true\n\t * \t}\n\t * } );\n\t *\n\t * // Equivalent to:\n\t * config.set( 'width', 500 );\n\t * config.set( 'toolbar.collapsed', true );\n\t * ```\n\t *\n\t * Passing an object as the value will amend the configuration, not replace it.\n\t *\n\t * ```ts\n\t * config.set( 'toolbar', {\n\t * \tcollapsed: true,\n\t * } );\n\t *\n\t * config.set( 'toolbar', {\n\t * \tcolor: 'red',\n\t * } );\n\t *\n\t * config.get( 'toolbar.collapsed' ); // true\n\t * config.get( 'toolbar.color' ); // 'red'\n\t * ```\n\t *\n\t * It accepts both a name/value pair or an object, which properties and values will be used to set\n\t * configurations. See {@link #set:KEY_VALUE}.\n\t *\n\t * @label CONFIG_OBJECT\n\t * @param config The configuration object from which take properties as\n\t * configuration entries. Configuration names are case-sensitive.\n\t */\n\tpublic set( config: Partial<Cfg> ): void;\n\n\tpublic set( name: string | Record<string, any>, value?: any ): void {\n\t\tthis._setToTarget( this._config, name, value );\n\t}\n\n\t/**\n\t * Does exactly the same as {@link #set:KEY_VALUE} with one exception – passed configuration extends\n\t * existing one, but does not overwrite already defined values.\n\t *\n\t * This method is supposed to be called by plugin developers to setup plugin's configurations. It would be\n\t * rarely used for other needs.\n\t *\n\t * @label KEY_VALUE\n\t * @param name The configuration name. Configuration names are case-sensitive.\n\t * @param value The configuration value.\n\t */\n\tpublic define<K extends string>( name: K, value: GetSubConfig<Cfg, K> ): void;\n\n\t/**\n\t * Does exactly the same as {@link #set:CONFIG_OBJECT} with one exception – passed configuration extends\n\t * existing one, but does not overwrite already defined values.\n\t *\n\t * This method is supposed to be called by plugin developers to setup plugin's configurations. It would be\n\t * rarely used for other needs.\n\t *\n\t * @label CONFIG_OBJECT\n\t * @param config The configuration object from which take properties as\n\t * configuration entries. Configuration names are case-sensitive.\n\t */\n\tpublic define( config: Partial<Cfg> ): void;\n\n\tpublic define( name: string | Record<string, any>, value?: any ): void {\n\t\tconst isDefine = true;\n\n\t\tthis._setToTarget( this._config, name, value, isDefine );\n\t}\n\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\tpublic get<K extends string>( name: K ): GetSubConfig<Cfg, K> | undefined {\n\t\treturn this._getFromSource( this._config, name );\n\t}\n\n\t/**\n\t * Iterates over all top level configuration names.\n\t */\n\tpublic* names(): Iterable<string> {\n\t\tfor ( const name of Object.keys( this._config ) ) {\n\t\t\tyield name;\n\t\t}\n\t}\n\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\tprivate _setToTarget( target: any, name: any, value: any, isDefine: boolean = false ): void {\n\t\t// In case of an object, iterate through it and call `_setToTarget` again for each property.\n\t\tif ( isPlainObject( name ) ) {\n\t\t\tthis._setObjectToTarget( target, name, isDefine );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// The configuration name should be split into parts if it has dots. E.g. `resize.width` -> [`resize`, `width`].\n\t\tconst parts = name.split( '.' );\n\n\t\t// Take the name of the configuration out of the parts. E.g. `resize.width` -> `width`.\n\t\tname = parts.pop();\n\n\t\t// Iterate over parts to check if currently stored configuration has proper structure.\n\t\tfor ( const part of parts ) {\n\t\t\t// If there is no object for specified part then create one.\n\t\t\tif ( !isPlainObject( target[ part ] ) ) {\n\t\t\t\ttarget[ part ] = Object.create( null );\n\t\t\t}\n\n\t\t\t// Nested object becomes a target.\n\t\t\ttarget = target[ part ];\n\t\t}\n\n\t\t// In case of value is an object.\n\t\tif ( isPlainObject( value ) ) {\n\t\t\t// We take care of proper config structure.\n\t\t\tif ( !isPlainObject( target[ name ] ) ) {\n\t\t\t\ttarget[ name ] = Object.create( null );\n\t\t\t}\n\n\t\t\ttarget = target[ name ];\n\n\t\t\t// And iterate through this object calling `_setToTarget` again for each property.\n\t\t\tthis._setObjectToTarget( target, value, isDefine );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Do nothing if we are defining configuration for non empty name.\n\t\tif ( isDefine && typeof target[ name ] != 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttarget[ name ] = value;\n\t}\n\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\tprivate _getFromSource( source: any, name: string ): any {\n\t\t// The configuration name should be split into parts if it has dots. E.g. `resize.width` -> [`resize`, `width`].\n\t\tconst parts = name.split( '.' );\n\n\t\t// Take the name of the configuration out of the parts. E.g. `resize.width` -> `width`.\n\t\tname = parts.pop()!;\n\n\t\t// Iterate over parts to check if currently stored configuration has proper structure.\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\n\t\t\t// Nested object becomes a source.\n\t\t\tsource = source[ part ];\n\t\t}\n\n\t\t// Always returns undefined for non existing configuration.\n\t\treturn source ? cloneConfig( source[ name ] ) : undefined;\n\t}\n\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\tprivate _setObjectToTarget( target: any, configuration: any, isDefine?: boolean ): void {\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/**\n * Clones configuration object or value.\n */\nfunction cloneConfig<T>( source: T ): T {\n\treturn cloneDeepWith( source, leaveItemReferences );\n}\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: unknown ): unknown {\n\treturn isElement( value ) || typeof value === 'function' ? value : undefined;\n}\n\n/**\n * An utility type excluding primitive values and arrays from the union.\n */\nexport type OnlyObject<T> = Exclude<T, undefined | null | string | number | boolean | Array<any>>;\n\n/**\n * An utility type extracting configuration value from the given name.\n *\n * @typeParam T The type of a configuration dictionary.\n * @typeParam K The literal type of configuration name (dot-separated path).\n */\nexport type GetSubConfig<T, K> = K extends keyof T ?\n\tT[ K ] :\n\tK extends `${ infer K1 }.${ infer K2 }` ?\n\t\tK1 extends keyof T ?\n\t\t\tGetSubConfig<OnlyObject<T[ K1 ]>, K2> :\n\t\t\tunknown :\n\t\tunknown;\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/**\n * @module utils/dom/isnode\n */\n\n/**\n * Checks if the object is a native DOM Node.\n */\nexport function isNode( obj: any ): obj is Node {\n\tif ( obj ) {\n\t\tif ( obj.defaultView ) {\n\t\t\treturn obj instanceof obj.defaultView.Document;\n\t\t} else if ( obj.ownerDocument && obj.ownerDocument.defaultView ) {\n\t\t\treturn obj instanceof obj.ownerDocument.defaultView.Node;\n\t\t}\n\t}\n\n\treturn false;\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/**\n * @module utils/dom/iswindow\n */\n\n/**\n * Checks if the object is a native DOM Window.\n */\nexport function isWindow( obj: unknown ): obj is Window {\n\tconst stringifiedObject = Object.prototype.toString.apply( obj );\n\n\t// Returns `true` for the `window` object in browser environments.\n\tif ( stringifiedObject == '[object Window]' ) {\n\t\treturn true;\n\t}\n\n\t// Returns `true` for the `window` object in the Electron environment.\n\tif ( stringifiedObject == '[object global]' ) {\n\t\treturn true;\n\t}\n\n\treturn false;\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/**\n * @module utils/dom/emittermixin\n */\n\nimport {\n\tEmitterMixin,\n\t_getEmitterListenedTo,\n\t_setEmitterId,\n\ttype Emitter,\n\ttype CallbackOptions,\n\ttype BaseEvent,\n\ttype GetCallback,\n\ttype EmitterMixinConstructor\n} from '../emittermixin.js';\nimport { uid } from '../uid.js';\nimport { isNode } from './isnode.js';\nimport { isWindow } from './iswindow.js';\nimport { type EventInfo } from '../eventinfo.js';\nimport type { Constructor, Mixed } from '../mix.js';\nimport { global } from './global.js';\n\n// Keep this a plain alias. A conditional type does not work here: TypeScript cannot reduce a\n// conditional over an unresolved type parameter, so a generic wrapper around `DomEmitterMixin( base )`\n// silently loses the base class members. The default is a concrete nullary constructor, which\n// is why `undefined` is no longer a valid type argument.\n// See https://github.com/ckeditor/ckeditor5/issues/20238.\n/**\n * Constructor returned by {@link ~DomEmitterMixin}. Use it to name a mixin base class before extending it.\n *\n * ```ts\n * const MyDomEmitterBase: DomEmitterMixinConstructor<typeof BaseClass> = DomEmitterMixin( BaseClass );\n *\n * class MyDomEmitter extends MyDomEmitterBase {}\n * ```\n */\nexport type DomEmitterMixinConstructor<Base extends Constructor<Emitter> = new () => Emitter> = Mixed<Base, DomEmitter>;\n\nconst defaultEmitterClass = /* #__PURE__ */ DomEmitterMixin( /* #__PURE__ */ EmitterMixin() );\nconst ProxyEmitterBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * Mixin that injects the DOM events API into its host. It provides the API\n * compatible with {@link module:utils/emittermixin~Emitter}.\n *\n * This function creates a class that inherits from the provided `base` and implements `Emitter` interface.\n *\n * DOM emitter mixin is by default available in the {@link module:ui/view~View} class,\n * but it can also be mixed into any other class:\n *\n * ```ts\n * import { DomEmitterMixin } from '../utils/dom/emittermixin.js';\n *\n * class BaseClass { ... }\n *\n * class SomeView extends DomEmitterMixin( BaseClass ) {}\n *\n * const view = new SomeView();\n * view.listenTo( domElement, ( evt, domEvt ) => {\n * \tconsole.log( evt, domEvt );\n * } );\n * ```\n *\n * @label EXTENDS\n */\nexport function DomEmitterMixin<Base extends Constructor<Emitter>>( base: Base ): DomEmitterMixinConstructor<Base>;\n\n/**\n * Mixin that injects the DOM events API into its host. It provides the API\n * compatible with {@link module:utils/emittermixin~Emitter}.\n *\n * This function creates a class that implements `Emitter` interface.\n *\n * DOM emitter mixin is by default available in the {@link module:ui/view~View} class,\n * but it can also be mixed into any other class:\n *\n * ```ts\n * import { DomEmitterMixin } from '../utils/dom/emittermixin.js';\n *\n * class SomeView extends DomEmitterMixin() {}\n *\n * const view = new SomeView();\n * view.listenTo( domElement, ( evt, domEvt ) => {\n * \tconsole.log( evt, domEvt );\n * } );\n * ```\n *\n * @label NO_ARGUMENTS\n */\nexport function DomEmitterMixin(): DomEmitterMixinConstructor;\n\nexport function DomEmitterMixin( base?: Constructor<Emitter> ): unknown {\n\tif ( !base ) {\n\t\treturn defaultEmitterClass;\n\t}\n\n\tabstract class Mixin extends base implements DomEmitter {\n\t\tpublic override listenTo<K extends keyof HTMLElementEventMap>(\n\t\t\temitter: Node | Window | EventTarget,\n\t\t\tevent: K,\n\t\t\tcallback: ( this: this, ev: EventInfo, event: HTMLElementEventMap[ K ] ) => void,\n\t\t\toptions?: CallbackOptions & { readonly useCapture?: boolean; readonly usePassive?: boolean }\n\t\t): void;\n\t\tpublic override listenTo<TEvent extends BaseEvent>(\n\t\t\temitter: Emitter,\n\t\t\tevent: TEvent[ 'name' ],\n\t\t\tcallback: GetCallback<TEvent>,\n\t\t\toptions?: CallbackOptions\n\t\t): void;\n\t\tpublic override listenTo(\n\t\t\temitter: Emitter | Node | Window | EventTarget,\n\t\t\tevent: string,\n\t\t\tcallback: ( ev: EventInfo, ...args: Array<any> ) => void,\n\t\t\toptions: CallbackOptions & { readonly useCapture?: boolean; readonly usePassive?: boolean } = {}\n\t\t): void {\n\t\t\t// Check if emitter is an instance of DOM Node. If so, use corresponding ProxyEmitter (or create one if not existing).\n\t\t\tif ( isNode( emitter ) || isWindow( emitter ) || emitter instanceof global.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\n\t\t\t\tconst proxyEmitter = this._getProxyEmitter( emitter, proxyOptions ) || new ProxyEmitter( emitter, proxyOptions );\n\n\t\t\t\tthis.listenTo( proxyEmitter, event, callback, options );\n\t\t\t} else {\n\t\t\t\t// Execute parent class method with Emitter (or ProxyEmitter) instance.\n\t\t\t\tsuper.listenTo( emitter, event, callback, options );\n\t\t\t}\n\t\t}\n\n\t\tpublic override stopListening(\n\t\t\temitter?: Emitter | Node | Window | EventTarget,\n\t\t\tevent?: string,\n\t\t\tcallback?: Function\n\t\t): void {\n\t\t\t// Check if the emitter is an instance of DOM Node. If so, forward the call to the corresponding ProxyEmitters.\n\t\t\tif ( isNode( emitter ) || isWindow( emitter ) || emitter instanceof global.window.EventTarget ) {\n\t\t\t\tconst proxyEmitters = this._getAllProxyEmitters( emitter );\n\n\t\t\t\tfor ( const proxy of proxyEmitters ) {\n\t\t\t\t\tthis.stopListening( proxy, event, callback );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Execute parent class method with Emitter (or ProxyEmitter) instance.\n\t\t\t\tsuper.stopListening( emitter, event, callback );\n\t\t\t}\n\t\t}\n\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\tprivate _getProxyEmitter(\n\t\t\tnode: Node | Window | EventTarget,\n\t\t\toptions: { capture: boolean; passive: boolean }\n\t\t): Emitter | null {\n\t\t\treturn _getEmitterListenedTo( this, getProxyEmitterId( node, options ) );\n\t\t}\n\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\tprivate _getAllProxyEmitters( node: Node | Window | EventTarget ): Array<ProxyEmitter> {\n\t\t\treturn [\n\t\t\t\t{ capture: false, passive: false },\n\t\t\t\t{ capture: false, passive: true },\n\t\t\t\t{ capture: true, passive: false },\n\t\t\t\t{ capture: true, passive: true }\n\t\t\t].map( options => this._getProxyEmitter( node, options ) ).filter( proxy => !!proxy ) as any;\n\t\t}\n\t}\n\n\treturn Mixin;\n}\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 */\nclass ProxyEmitter extends ProxyEmitterBase {\n\tprivate readonly _domNode: Node | Window | EventTarget;\n\tprivate readonly _options: { capture: boolean; passive: boolean };\n\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(\n\t\tnode: Node | Window | EventTarget,\n\t\toptions: { capture: boolean; passive: boolean }\n\t) {\n\t\tsuper();\n\n\t\t// Set emitter ID to match DOM Node \"expando\" property.\n\t\t_setEmitterId( this, getProxyEmitterId( node, options ) );\n\n\t\t// Remember the DOM Node this ProxyEmitter is bound to.\n\t\tthis._domNode = node;\n\n\t\t// And given options.\n\t\tthis._options = options;\n\t}\n\n\t/**\n\t * Collection of native DOM listeners.\n\t */\n\tprivate _domListeners?: {\n\t\t[ event: string ]: {\n\t\t\t( domEvent: unknown ): void;\n\t\t\tremoveListener(): void;\n\t\t};\n\t};\n\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\tpublic attach( event: string ): void {\n\t\t// If the DOM Listener for given event already exist it is pointless\n\t\t// to attach another one.\n\t\tif ( this._domListeners && this._domListeners[ event ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domListener = this._createDomListener( event );\n\n\t\t// Attach the native DOM listener to DOM Node.\n\t\tthis._domNode.addEventListener( event, domListener, this._options );\n\n\t\tif ( !this._domListeners ) {\n\t\t\tthis._domListeners = {};\n\t\t}\n\n\t\t// Store the native DOM listener in this ProxyEmitter. It will be helpful\n\t\t// when stopping listening to the event.\n\t\tthis._domListeners[ event ] = domListener;\n\t}\n\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\tpublic detach( event: string ): void {\n\t\tlet events;\n\n\t\t// Remove native DOM listeners which are orphans. If no callbacks\n\t\t// are awaiting given event, detach native DOM listener from DOM Node.\n\t\t// See: {@link attach}.\n\n\t\tif ( this._domListeners![ event ] && ( !( events = ( this as any )._events![ event ] ) || !events.callbacks.length ) ) {\n\t\t\tthis._domListeners![ event ].removeListener();\n\t\t}\n\t}\n\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\tpublic _addEventListener<TEvent extends BaseEvent>(\n\t\tevent: TEvent[ 'name' ],\n\t\tcallback: GetCallback<TEvent>,\n\t\toptions: CallbackOptions\n\t): void {\n\t\tthis.attach( event );\n\t\t( EmitterMixin().prototype as any )._addEventListener.call( this, event, callback, options );\n\t}\n\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\tpublic _removeEventListener( event: string, callback: Function ) {\n\t\t( EmitterMixin().prototype as any )._removeEventListener.call( this, event, callback );\n\t\tthis.detach( event );\n\t}\n\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\tprivate _createDomListener( event: string ) {\n\t\tconst domListener = ( domEvt: unknown ) => {\n\t\t\tthis.fire( event, domEvt );\n\t\t};\n\n\t\t// Supply the DOM listener callback with a function that will help\n\t\t// detach it from the DOM Node, when it is no longer necessary.\n\t\t// See: {@link detach}.\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\n\t\treturn domListener;\n\t}\n}\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: any ): string {\n\treturn node[ 'data-ck-expando' ] || ( node[ 'data-ck-expando' ] = uid() );\n}\n\n/**\n * Gets id of the ProxyEmitter for the given node.\n */\nfunction getProxyEmitterId( node: Node | Window | EventTarget, options: { [ option: string ]: any } ): string {\n\tlet id = getNodeUID( node );\n\n\tfor ( const option of Object.keys( options ).sort() ) {\n\t\tif ( options[ option ] ) {\n\t\t\tid += '-' + option;\n\t\t}\n\t}\n\n\treturn id;\n}\n\nexport interface DomEventMap extends HTMLElementEventMap, WindowEventMap {\n}\n\n/**\n * Interface representing classes which mix in {@link module:utils/dom/emittermixin~DomEmitterMixin}.\n *\n * Can be easily implemented by a class by mixing the {@link module:utils/dom/emittermixin~DomEmitterMixin} mixin.\n *\n * ```ts\n * class MyClass extends DomEmitterMixin( OtherBaseClass ) {\n * \t// This class now implements the `Emitter` interface.\n * }\n * ```\n */\nexport interface DomEmitter extends Emitter {\n\n\t/**\n\t * Registers a callback function to be executed when an event is fired in a specific Emitter or DOM Node.\n\t * It is backwards compatible with {@link module:utils/emittermixin~Emitter#listenTo}.\n\t *\n\t * @label HTML_EMITTER\n\t * @param emitter The object that fires the event.\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 * @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\tlistenTo<K extends keyof DomEventMap>(\n\t\temitter: Node | Window | EventTarget,\n\t\tevent: K,\n\t\tcallback: ( this: this, ev: EventInfo, event: DomEventMap[ K ] ) => void,\n\t\toptions?: CallbackOptions & { readonly useCapture?: boolean; readonly usePassive?: boolean }\n\t): void;\n\n\t/**\n\t * Registers a callback function to be executed when an event is fired in a specific (emitter) object.\n\t *\n\t * Events can be grouped in namespaces using `:`.\n\t * When namespaced event is fired, it additionally fires all callbacks for that namespace.\n\t *\n\t * ```ts\n\t * // myEmitter.on( ... ) is a shorthand for myEmitter.listenTo( myEmitter, ... ).\n\t * myEmitter.on( 'myGroup', genericCallback );\n\t * myEmitter.on( 'myGroup:myEvent', specificCallback );\n\t *\n\t * // genericCallback is fired.\n\t * myEmitter.fire( 'myGroup' );\n\t * // both genericCallback and specificCallback are fired.\n\t * myEmitter.fire( 'myGroup:myEvent' );\n\t * // genericCallback is fired even though there are no callbacks for \"foo\".\n\t * myEmitter.fire( 'myGroup:foo' );\n\t * ```\n\t *\n\t * An event callback can {@link module:utils/eventinfo~EventInfo#stop stop the event} and\n\t * set the {@link module:utils/eventinfo~EventInfo#return return value} of the {@link #fire} method.\n\t *\n\t * @label DOM_EMITTER\n\t * @typeParam TEvent The type describing the event. See {@link module:utils/emittermixin~BaseEvent}.\n\t * @param emitter The object that fires the event.\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\tlistenTo<TEvent extends BaseEvent>(\n\t\temitter: Emitter,\n\t\tevent: TEvent[ 'name' ],\n\t\tcallback: GetCallback<TEvent>,\n\t\toptions?: CallbackOptions\n\t): void;\n\n\t/**\n\t * Stops listening for events. It can be used at different levels:\n\t * It is backwards compatible with {@link module:utils/emittermixin~Emitter#listenTo}.\n\t *\n\t * * To stop listening to a specific callback.\n\t * * To stop listening to a specific event.\n\t * * To stop listening to all events fired by a specific object.\n\t * * To stop listening to all events fired by all objects.\n\t *\n\t * @label DOM_STOP\n\t * @param emitter The object to stop listening to.\n\t * If omitted, stops it for all objects.\n\t * @param event (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it\n\t * for all events from `emitter`.\n\t * @param callback (Requires the `event`) The function to be removed from the call list for the given\n\t * `event`.\n\t */\n\tstopListening( emitter?: Emitter | Node | Window | EventTarget, event?: string, callback?: Function ): void;\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/**\n * @module utils/dom/findclosestscrollableancestor\n */\n\nimport { global } from './global.js';\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 */\nexport function findClosestScrollableAncestor( domElement: HTMLElement ): HTMLElement | null {\n\tlet element = domElement.parentElement;\n\tif ( !element ) {\n\t\treturn null;\n\t}\n\n\twhile ( element.tagName != 'BODY' ) {\n\t\tconst overflow = element.style.overflowY || global.window.getComputedStyle( element ).overflowY;\n\n\t\tif ( overflow === 'auto' || overflow === 'scroll' ) {\n\t\t\tbreak;\n\t\t}\n\n\t\telement = element.parentElement;\n\n\t\tif ( !element ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\treturn element;\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/**\n * @module utils/dom/getancestors\n */\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 */\nexport function getAncestors( node: Node ): Array<Node> {\n\tconst nodes: Array<Node> = [];\n\tlet currentNode: Node | null = node;\n\n\t// We are interested in `Node`s `DocumentFragment`s only.\n\twhile ( currentNode && currentNode.nodeType != Node.DOCUMENT_NODE ) {\n\t\tnodes.unshift( currentNode );\n\t\tcurrentNode = currentNode.parentNode;\n\t}\n\n\treturn nodes;\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/**\n * @module utils/dom/getdatafromelement\n */\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 */\nexport function getDataFromElement( el: HTMLElement ): string {\n\tif ( el instanceof HTMLTextAreaElement ) {\n\t\treturn el.value;\n\t}\n\n\treturn el.innerHTML;\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/**\n * @module utils/dom/getborderwidths\n */\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 */\nexport function getBorderWidths( element: HTMLElement ): BorderWidths {\n\t// Call getComputedStyle on the window the element document belongs to.\n\tconst style = element.ownerDocument.defaultView!.getComputedStyle( element );\n\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 * An object describing widths of `HTMLElement` borders.\n*/\nexport interface BorderWidths {\n\ttop: number;\n\tright: number;\n\tbottom: number;\n\tleft: number;\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/**\n * @module utils/dom/getrangefrommouseevent\n */\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 */\nexport function getRangeFromMouseEvent(\n\tdomEvent: MouseEvent & {\n\t\trangeParent?: HTMLElement;\n\t\trangeOffset?: number;\n\t}\n): Range | null {\n\tif ( !domEvent.target ) {\n\t\treturn null;\n\t}\n\n\tconst domDoc = ( domEvent.target as HTMLElement ).ownerDocument;\n\tconst x = domEvent.clientX;\n\tconst y = domEvent.clientY;\n\tlet domRange = null;\n\n\t// Webkit & Blink.\n\tif ( domDoc.caretRangeFromPoint && domDoc.caretRangeFromPoint( x, y ) ) {\n\t\tdomRange = domDoc.caretRangeFromPoint( x, y );\n\t}\n\n\t// FF.\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\n\treturn domRange;\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/**\n * @module utils/dom/getcommonancestor\n */\n\nimport { getAncestors } from './getancestors.js';\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 */\nexport function getCommonAncestor( nodeA: Node, nodeB: Node ): Node | null {\n\tconst ancestorsA = getAncestors( nodeA );\n\tconst ancestorsB = getAncestors( nodeB );\n\n\tlet i = 0;\n\n\t// It does not matter which array is shorter.\n\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\ti++;\n\t}\n\n\treturn i === 0 ? null : ancestorsA[ i - 1 ];\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/**\n * @module utils/dom/getpositionedancestor\n */\n\nimport { global } from './global.js';\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 */\nexport function getPositionedAncestor( element?: HTMLElement ): HTMLElement | null {\n\tif ( !element || !element.parentNode ) {\n\t\treturn null;\n\t}\n\n\tif ( element.offsetParent === global.document.body ) {\n\t\treturn null;\n\t}\n\n\treturn element.offsetParent as HTMLElement;\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/**\n * @module utils/dom/istext\n */\n\n/**\n * Checks if the object is a native DOM Text node.\n */\nexport function isText( obj: unknown ): obj is Text {\n\treturn Object.prototype.toString.call( obj ) == '[object Text]';\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/**\n * @module utils/dom/isrange\n */\n\n/**\n * Checks if the object is a native DOM Range.\n */\nexport function isRange( obj: unknown ): obj is Range {\n\treturn Object.prototype.toString.apply( obj ) == '[object Range]';\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/**\n * @module utils/dom/rect\n */\n\nimport { isRange } from './isrange.js';\nimport { isWindow } from './iswindow.js';\nimport { getBorderWidths } from './getborderwidths.js';\nimport { isText } from './istext.js';\nimport { getPositionedAncestor } from './getpositionedancestor.js';\nimport { global } from './global.js';\n\nconst RECT_PROPERTIES: ReadonlyArray<keyof DomRectLike> = [ 'top', 'right', 'bottom', 'left', 'width', 'height' ];\nconst POSITIONING_VALUES: ReadonlySet<string> = new Set( [ 'relative', 'absolute', 'fixed', '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 */\nexport class Rect {\n\t/**\n\t * The \"top\" value of the rect.\n\t *\n\t * @readonly\n\t */\n\tpublic top!: number;\n\n\t/**\n\t * The \"right\" value of the rect.\n\t *\n\t * @readonly\n\t */\n\tpublic right!: number;\n\n\t/**\n\t * The \"bottom\" value of the rect.\n\t *\n\t * @readonly\n\t */\n\tpublic bottom!: number;\n\n\t/**\n\t * The \"left\" value of the rect.\n\t *\n\t * @readonly\n\t */\n\tpublic left!: number;\n\n\t/**\n\t * The \"width\" value of the rect.\n\t *\n\t * @readonly\n\t */\n\tpublic width!: number;\n\n\t/**\n\t * The \"height\" value of the rect.\n\t *\n\t * @readonly\n\t */\n\tpublic height!: number;\n\n\t/**\n\t * The object this rect is for.\n\t *\n\t * @readonly\n\t */\n\tprivate _source!: RectSource;\n\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: RectSource ) {\n\t\tconst isSourceRange = isRange( source );\n\n\t\tObject.defineProperty( this, '_source', {\n\t\t\t// If the source is a Rect instance, copy it's #_source.\n\t\t\tvalue: ( source as any )._source || source,\n\t\t\twritable: true,\n\t\t\tenumerable: false\n\t\t} );\n\n\t\tif ( isDomElement( source ) || isSourceRange ) {\n\t\t\t// The `Rect` class depends on `getBoundingClientRect` and `getClientRects` DOM methods. If the source\n\t\t\t// of a rect in an HTML element or a DOM range but it does not belong to any rendered DOM tree, these methods\n\t\t\t// will fail to obtain the geometry and the rect instance makes little sense to the features using it.\n\t\t\t// To get rid of this warning make sure the source passed to the constructor is a descendant of `window.document.body`.\n\t\t\t// @if CK_DEBUG // const sourceNode = isSourceRange ? source.startContainer : source;\n\t\t\t// @if CK_DEBUG // if ( !sourceNode.ownerDocument || !sourceNode.ownerDocument.body.contains( sourceNode ) ) {\n\t\t\t// @if CK_DEBUG // \tconsole.warn(\n\t\t\t// @if CK_DEBUG // \t\t'rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',\n\t\t\t// @if CK_DEBUG // \t\t{ source } );\n\t\t\t// @if CK_DEBUG // }\n\n\t\t\tif ( isSourceRange ) {\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects( source );\n\t\t\t\tcopyRectProperties( this, Rect.getBoundingRect( rangeRects )! );\n\t\t\t} else {\n\t\t\t\tcopyRectProperties( this, source.getBoundingClientRect() );\n\t\t\t}\n\t\t} else if ( isWindow( source ) ) {\n\t\t\tconst { innerWidth, innerHeight } = source;\n\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 {\n\t\t\tcopyRectProperties( this, source );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a clone of the rect.\n\t *\n\t * @returns A cloned rect.\n\t */\n\tpublic clone(): Rect {\n\t\treturn new Rect( this );\n\t}\n\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\tpublic moveTo( x: number, y: number ): this {\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\n\t\treturn this;\n\t}\n\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\tpublic moveBy( x: number, y: number ): this {\n\t\tthis.top += y;\n\t\tthis.right += x;\n\t\tthis.left += x;\n\t\tthis.bottom += y;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns a new rect a a result of intersection with another rect.\n\t */\n\tpublic getIntersection( anotherRect: Rect ): Rect | null {\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\n\t\trect.width = rect.right - rect.left;\n\t\trect.height = rect.bottom - rect.top;\n\n\t\tif ( rect.width < 0 || rect.height < 0 ) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tconst newRect = new Rect( rect );\n\n\t\t\tnewRect._source = this._source;\n\n\t\t\treturn newRect;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the area of intersection with another rect.\n\t *\n\t * @returns Area of intersection.\n\t */\n\tpublic getIntersectionArea( anotherRect: Rect ): number {\n\t\tconst rect = this.getIntersection( anotherRect );\n\n\t\tif ( rect ) {\n\t\t\treturn rect.getArea();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the area of the rect.\n\t */\n\tpublic getArea(): number {\n\t\treturn this.width * this.height;\n\t}\n\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\tpublic getVisible(): Rect | null {\n\t\tconst source: RectSource & { parentNode?: Node | null; commonAncestorContainer?: Node | null } = this._source;\n\n\t\tlet visibleRect = this.clone();\n\n\t\t// There's no ancestor to crop <body> with the overflow.\n\t\tif ( isBody( source ) ) {\n\t\t\treturn visibleRect;\n\t\t}\n\n\t\tlet child: any = source;\n\t\tlet parent = source.parentNode || source.commonAncestorContainer;\n\t\tlet lastPositionedChildElement;\n\n\t\t// Check the ancestors all the way up to the <body>.\n\t\twhile ( parent && !isBody( parent ) ) {\n\t\t\tconst isNonClippingParent = getElementOverflow( parent as HTMLElement ) === 'visible';\n\n\t\t\tif ( isPositioned( child ) ) {\n\t\t\t\tlastPositionedChildElement = child;\n\t\t\t}\n\n\t\t\t// 1. If a parent has overflow: visible, it can be safely skipped in consideration for any parent-child configuration.\n\t\t\t// 2. If a parent has any other overflow (it clips), for the actual clipping to happen the following must be true:\n\t\t\t// * the last positioned child must have `position: absolute`,\n\t\t\t// * the parent must have a position other than `position: static`.\n\t\t\t//\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/14107.\n\t\t\tif (\n\t\t\t\tisNonClippingParent ||\n\t\t\t\t( lastPositionedChildElement && getElementPosition( lastPositionedChildElement ) === 'absolute' && !isPositioned( parent ) )\n\t\t\t) {\n\t\t\t\tchild = parent;\n\t\t\t\tparent = parent.parentNode;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst parentRect = new Rect( parent as HTMLElement );\n\t\t\tconst intersectionRect = visibleRect.getIntersection( parentRect );\n\n\t\t\tif ( intersectionRect ) {\n\t\t\t\tif ( intersectionRect.getArea() < visibleRect.getArea() ) {\n\t\t\t\t\t// Reduce the visible rect to the intersection.\n\t\t\t\t\tvisibleRect = intersectionRect;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There's no intersection, the rect is completely invisible.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tchild = parent;\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\treturn visibleRect;\n\t}\n\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\tpublic isEqual( anotherRect: Rect ): boolean {\n\t\tfor ( const prop of RECT_PROPERTIES ) {\n\t\t\tif ( this[ prop ] !== anotherRect[ prop ] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\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\tpublic contains( anotherRect: Rect ): boolean {\n\t\tconst intersectRect = this.getIntersection( anotherRect );\n\n\t\treturn !!( intersectRect && intersectRect.isEqual( anotherRect ) );\n\t}\n\n\t/**\n\t * Recalculates screen coordinates to coordinates relative to the positioned ancestor offset.\n\t */\n\tpublic toAbsoluteRect(): Rect {\n\t\tconst { scrollX, scrollY } = global.window;\n\t\tconst absoluteRect = this.clone().moveBy( scrollX, scrollY );\n\n\t\tif ( isDomElement( absoluteRect._source ) ) {\n\t\t\tconst positionedAncestor = getPositionedAncestor( absoluteRect._source );\n\n\t\t\tif ( positionedAncestor ) {\n\t\t\t\tshiftRectToCompensatePositionedAncestor( absoluteRect, positionedAncestor );\n\t\t\t}\n\t\t}\n\n\t\treturn absoluteRect;\n\t}\n\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\tpublic excludeScrollbarsAndBorders(): this {\n\t\tconst source = this._source as ( HTMLElement | Window );\n\t\tlet scrollBarWidth, scrollBarHeight, direction;\n\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\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\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\n\t\tthis.width -= scrollBarWidth;\n\n\t\tif ( direction === 'ltr' ) {\n\t\t\tthis.right -= scrollBarWidth;\n\t\t} else {\n\t\t\tthis.left += scrollBarWidth;\n\t\t}\n\n\t\tthis.height -= scrollBarHeight;\n\t\tthis.bottom -= scrollBarHeight;\n\n\t\treturn this;\n\t}\n\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\tpublic static getDomRangeRects( range: Range ): Array<Rect> {\n\t\tconst rects: Array<Rect> = [];\n\t\t// Safari does not iterate over ClientRectList using for...of loop.\n\t\tconst clientRects = Array.from( range.getClientRects() );\n\n\t\tif ( clientRects.length ) {\n\t\t\tfor ( const rect of clientRects ) {\n\t\t\t\tconst r = new Rect( rect );\n\n\t\t\t\t// Point the rect source to the DOM range instead of of the DOM client rect to allow proper clipping,\n\t\t\t\t// in `Rect#getVisible()` method.\n\t\t\t\tr._source = range;\n\t\t\t\trects.push( r );\n\t\t\t}\n\t\t}\n\t\t// If there's no client rects for the Range, use parent container's bounding rect\n\t\t// instead and adjust rect's width to simulate the actual geometry of such range.\n\t\t// https://github.com/ckeditor/ckeditor5-utils/issues/153\n\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/317\n\t\telse {\n\t\t\tlet startContainer = range.startContainer;\n\n\t\t\tif ( isText( startContainer ) ) {\n\t\t\t\tstartContainer = startContainer.parentNode!;\n\t\t\t}\n\n\t\t\tconst rect = new Rect( ( startContainer as Element ).getBoundingClientRect() );\n\t\t\trect.right = rect.left;\n\t\t\trect.width = 0;\n\n\t\t\trects.push( rect );\n\t\t}\n\n\t\treturn rects;\n\t}\n\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\tpublic static getDomElementRects( element: HTMLElement ): Array<Rect> {\n\t\treturn Array.from( element.getClientRects() ).map( clientRect => {\n\t\t\tconst rect = new Rect( clientRect );\n\n\t\t\t// Point the rect source to the DOM element instead of of the DOM client rect to allow proper clipping,\n\t\t\t// in `Rect#getVisible()` method.\n\t\t\trect._source = element;\n\n\t\t\treturn rect;\n\t\t} );\n\t}\n\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\tpublic static getBoundingRect( rects: Iterable<Rect> ): Rect | null {\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\n\t\tfor ( const rect of rects ) {\n\t\t\trectangleCount++;\n\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\n\t\tif ( rectangleCount == 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tboundingRectData.width = boundingRectData.right - boundingRectData.left;\n\t\tboundingRectData.height = boundingRectData.bottom - boundingRectData.top;\n\n\t\treturn new Rect( boundingRectData );\n\t}\n}\n\n/**\n * A source of {@link module:utils/dom/rect~Rect}.\n */\nexport type RectSource = HTMLElement | Range | Window | DomRectLike;\n\n/**\n * An object that describes properties of `ClientRect` object.\n */\nexport interface DomRectLike {\n\treadonly top: number;\n\treadonly right: number;\n\treadonly bottom: number;\n\treadonly left: number;\n\treadonly width: number;\n\treadonly height: number;\n}\n\n/**\n * Acquires all the rect properties from the passed source.\n */\nfunction copyRectProperties( rect: Rect, source: DomRectLike ): void {\n\tfor ( const p of RECT_PROPERTIES ) {\n\t\trect[ p ] = source[ p ];\n\t}\n}\n\n/**\n * Checks if provided object is a <body> HTML element.\n */\nfunction isBody( value: unknown ): value is HTMLBodyElement {\n\tif ( !isDomElement( value ) ) {\n\t\treturn false;\n\t}\n\n\treturn value === value.ownerDocument.body;\n}\n\n/**\n * Checks if provided object \"looks like\" a DOM Element and has API required by `Rect` class.\n */\nfunction isDomElement( value: any ): value is Element {\n\t// Note: earlier we used `isElement()` from lodash library, however that function is less performant because\n\t// it makes complicated checks to make sure that given value is a DOM element.\n\treturn value !== null && typeof value === 'object' && value.nodeType === 1 && typeof value.getBoundingClientRect === 'function';\n}\n\n/**\n * Returns the value of the `position` style of an `HTMLElement`.\n */\nfunction getElementPosition( element: HTMLElement ): string {\n\treturn element.ownerDocument.defaultView!.getComputedStyle( element ).position;\n}\n\n/**\n * Returns the value of the `overflow` style of an `HTMLElement` or a `Range`.\n */\nfunction getElementOverflow( element: HTMLElement | Range ): string {\n\treturn element instanceof HTMLElement ? element.ownerDocument.defaultView!.getComputedStyle( element ).overflow : 'visible';\n}\n\n/**\n * Checks if the given node is positioned in any other way than `position: static`.\n */\nfunction isPositioned( node: Node ): boolean {\n\treturn node instanceof HTMLElement && POSITIONING_VALUES.has( getElementPosition( node ) );\n}\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: Rect, positionedElementAncestor: HTMLElement ): void {\n\tconst ancestorPosition = new Rect( positionedElementAncestor );\n\tconst ancestorBorderWidths = getBorderWidths( positionedElementAncestor );\n\n\tlet moveX = 0;\n\tlet moveY = 0;\n\n\t// (https://github.com/ckeditor/ckeditor5-ui-default/issues/126)\n\t// If there's some positioned ancestor of the panel, then its `Rect` must be taken into\n\t// consideration. `Rect` is always relative to the viewport while `position: absolute` works\n\t// with respect to that positioned ancestor.\n\tmoveX -= ancestorPosition.left;\n\tmoveY -= ancestorPosition.top;\n\n\t// (https://github.com/ckeditor/ckeditor5-utils/issues/139)\n\t// If there's some positioned ancestor of the panel, not only its position must be taken into\n\t// consideration (see above) but also its internal scrolls. Scroll have an impact here because `Rect`\n\t// is relative to the viewport (it doesn't care about scrolling), while `position: absolute`\n\t// must compensate that scrolling.\n\tmoveX += positionedElementAncestor.scrollLeft;\n\tmoveY += positionedElementAncestor.scrollTop;\n\n\t// (https://github.com/ckeditor/ckeditor5-utils/issues/139)\n\t// If there's some positioned ancestor of the panel, then its `Rect` includes its CSS `borderWidth`\n\t// while `position: absolute` positioning does not consider it.\n\t// E.g. `{ position: absolute, top: 0, left: 0 }` means upper left corner of the element,\n\t// not upper-left corner of its border.\n\tmoveX -= ancestorBorderWidths.left;\n\tmoveY -= ancestorBorderWidths.top;\n\n\trect.moveBy( moveX, moveY );\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/**\n * @module utils/dom/resizeobserver\n */\n\nimport { global } from './global.js';\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 */\nexport class ResizeObserver {\n\t/**\n\t * The element observed by this observer.\n\t */\n\tprivate readonly _element: Element;\n\n\t/**\n\t * The callback executed each time {@link #_element} is resized.\n\t */\n\tprivate readonly _callback: ( entry: ResizeObserverEntry ) => void;\n\n\t/**\n\t * The single native observer instance shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n\t */\n\tprivate static _observerInstance: InstanceType<typeof global.window.ResizeObserver> | null = null;\n\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\tprivate static _elementCallbacks: Map<Element, Set<( entry: ResizeObserverEntry ) => void>> | null = null;\n\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: Element, callback: ( entry: ResizeObserverEntry ) => void ) {\n\t\t// **Note**: For the maximum performance, this class ensures only a single instance of the native\n\t\t// observer is used no matter how many instances of this class were created.\n\t\tif ( !ResizeObserver._observerInstance ) {\n\t\t\tResizeObserver._createObserver();\n\t\t}\n\n\t\tthis._element = element;\n\t\tthis._callback = callback;\n\n\t\tResizeObserver._addElementCallback( element, callback );\n\t\tResizeObserver._observerInstance!.observe( element );\n\t}\n\n\t/**\n\t * The element observed by this observer.\n\t */\n\tpublic get element(): Element {\n\t\treturn this._element;\n\t}\n\n\t/**\n\t * Destroys the observer which disables the `callback` passed to the {@link #constructor}.\n\t */\n\tpublic destroy(): void {\n\t\tResizeObserver._deleteElementCallback( this._element, this._callback );\n\t}\n\n\t/**\n\t * Registers a new resize callback for the DOM element.\n\t */\n\tprivate static _addElementCallback( element: Element, callback: ( entry: ResizeObserverEntry ) => void ): void {\n\t\tif ( !ResizeObserver._elementCallbacks ) {\n\t\t\tResizeObserver._elementCallbacks = new Map();\n\t\t}\n\n\t\tlet callbacks = ResizeObserver._elementCallbacks.get( element );\n\n\t\tif ( !callbacks ) {\n\t\t\tcallbacks = new Set();\n\t\t\tResizeObserver._elementCallbacks.set( element, callbacks );\n\t\t}\n\n\t\tcallbacks.add( callback );\n\t}\n\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\tprivate static _deleteElementCallback( element: Element, callback: ( entry: ResizeObserverEntry ) => void ): void {\n\t\tconst callbacks = ResizeObserver._getElementCallbacks( element );\n\n\t\t// Remove the element callback. Check if exist first in case someone\n\t\t// called destroy() twice.\n\t\tif ( callbacks ) {\n\t\t\tcallbacks.delete( callback );\n\n\t\t\t// If no callbacks left for the element, also remove the element.\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\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\n\t/**\n\t * Returns are registered resize callbacks for the DOM element.\n\t */\n\tprivate static _getElementCallbacks( element: Element ): Set<( entry: ResizeObserverEntry ) => void> | null | undefined {\n\t\tif ( !ResizeObserver._elementCallbacks ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn ResizeObserver._elementCallbacks.get( element );\n\t}\n\n\t/**\n\t * Creates the single native observer shared across all `ResizeObserver` instances.\n\t */\n\tprivate static _createObserver(): void {\n\t\tResizeObserver._observerInstance = new global.window.ResizeObserver( entries => {\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst callbacks = ResizeObserver._getElementCallbacks( entry.target );\n\n\t\t\t\tif ( callbacks ) {\n\t\t\t\t\tfor ( const callback of callbacks ) {\n\t\t\t\t\t\tcallback( entry );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module utils/dom/setdatainelement\n */\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 */\nexport function setDataInElement( el: HTMLElement, data: string ): void {\n\tif ( el instanceof HTMLTextAreaElement ) {\n\t\tel.value = data;\n\t}\n\n\tel.innerHTML = data;\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/**\n * @module utils/dom/tounit\n */\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 */\nexport function toUnit( unit: string ): ToUnitHelper {\n\treturn value => value + unit;\n}\n\n/**\n * A function, which adds a pre–defined trailing `unit`\n * to the passed `value`.\n *\n * @param value A value to be given the unit.\n * @returns A value with the trailing unit.\n */\nexport type ToUnitHelper = ( value: string | number ) => string;\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/**\n * @module utils/dom/indexof\n */\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 */\nexport function indexOf( node: Node ): number {\n\tlet index = 0;\n\n\twhile ( node.previousSibling ) {\n\t\tnode = node.previousSibling;\n\t\tindex++;\n\t}\n\n\treturn index;\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/**\n * @module utils/dom/insertat\n */\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 */\nexport function insertAt(\n\tparentElement: Element,\n\tindex: number,\n\tnodeToInsert: Node\n): void {\n\tparentElement.insertBefore( nodeToInsert, parentElement.childNodes[ index ] || null );\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/**\n * @module utils/dom/iscomment\n */\n\n/**\n * Checks whether the object is a native DOM Comment node.\n */\nexport function isComment( obj: any ): obj is Comment {\n\treturn obj && obj.nodeType === Node.COMMENT_NODE;\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/**\n * @module utils/dom/isvalidattributename\n */\n\nimport { global } from './global.js';\n\n/**\n * Checks if the given attribute name is valid in terms of HTML.\n *\n * @param name Attribute name.\n */\nexport function isValidAttributeName( name: string ): boolean {\n\ttry {\n\t\tglobal.document.createAttribute( name );\n\t} catch {\n\t\treturn false;\n\t}\n\n\treturn true;\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/**\n * @module utils/dom/isvisible\n */\n\nimport { isText } from './istext.js';\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 */\nexport function isVisible( element: Text | HTMLElement | null | undefined ): boolean {\n\tif ( !element ) {\n\t\treturn false;\n\t}\n\n\tif ( isText( element ) ) {\n\t\treturn isVisible( element.parentElement );\n\t}\n\n\tif ( element.getClientRects ) {\n\t\treturn !!( element.getClientRects().length );\n\t}\n\n\treturn false;\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/**\n * @module utils/dom/position\n */\n\nimport { global } from './global.js';\nimport { Rect, type RectSource } from './rect.js';\nimport { getPositionedAncestor } from './getpositionedancestor.js';\nimport { isFunction } from 'es-toolkit/compat';\n\n// @if CK_DEBUG_POSITION // import {\n// @if CK_DEBUG_POSITION // \tRectDrawer,\n// @if CK_DEBUG_POSITION // \tdiagonalStylesBlack,\n// @if CK_DEBUG_POSITION // \tdiagonalStylesGreen,\n// @if CK_DEBUG_POSITION // \tdiagonalStylesRed\n// @if CK_DEBUG_POSITION // } from '@ckeditor/ckeditor5-utils/tests/_utils/rectdrawer.js';\n// @if CK_DEBUG_POSITION // const TARGET_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px', outlineStyle: 'dashed', outlineColor: 'blue', outlineOffset: '2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const VISIBLE_TARGET_RECT_STYLE = {\n// @if CK_DEBUG_POSITION //\t\t...diagonalStylesBlack,\n// @if CK_DEBUG_POSITION //\t\topacity: '1',\n// @if CK_DEBUG_POSITION //\t\tbackgroundColor: '#00000033',\n// @if CK_DEBUG_POSITION //\t\toutlineWidth: '2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const VIEWPORT_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px',\n// @if CK_DEBUG_POSITION // \toutlineOffset: '-2px',\n// @if CK_DEBUG_POSITION // \toutlineStyle: 'solid',\n// @if CK_DEBUG_POSITION // \toutlineColor: 'red'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const VISIBLE_LIMITER_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \t...diagonalStylesGreen,\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px',\n// @if CK_DEBUG_POSITION // \toutlineOffset: '-2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const ELEMENT_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px', outlineColor: 'orange', outlineOffset: '-2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const CHOSEN_POSITION_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \topacity: .5, outlineColor: 'magenta', backgroundColor: 'magenta'\n// @if CK_DEBUG_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 */\nexport function getOptimalPosition( {\n\telement, target, positions, limiter, fitInViewport, viewportOffsetConfig\n}: DomOptimalPositionOptions ): DomPoint | null {\n\t// If the {@link module:utils/dom/position~Options#target} is a function, use what it returns.\n\t// https://github.com/ckeditor/ckeditor5-utils/issues/157\n\tif ( isFunction( target ) ) {\n\t\ttarget = target();\n\t}\n\n\t// If the {@link module:utils/dom/position~Options#limiter} is a function, use what it returns.\n\t// https://github.com/ckeditor/ckeditor5-ui/issues/260\n\tif ( isFunction( limiter ) ) {\n\t\tlimiter = limiter();\n\t}\n\n\tconst positionedElementAncestor = getPositionedAncestor( element );\n\tconst constrainedViewportRect = getConstrainedViewportRect( viewportOffsetConfig );\n\tconst elementRect = new Rect( element );\n\tconst visibleTargetRect = getVisibleViewportIntersectionRect( target, constrainedViewportRect );\n\n\tlet bestPosition: DomPoint | null;\n\n\t// @if CK_DEBUG_POSITION // const targetRect = new Rect( target );\n\t// @if CK_DEBUG_POSITION // RectDrawer.clear();\n\t// @if CK_DEBUG_POSITION // RectDrawer.draw( targetRect, TARGET_RECT_STYLE, 'Target' );\n\t// @if CK_DEBUG_POSITION // if ( constrainedViewportRect ) {\n\t// @if CK_DEBUG_POSITION //\t\tRectDrawer.draw( constrainedViewportRect, VIEWPORT_RECT_STYLE, 'Viewport' );\n\t// @if CK_DEBUG_POSITION // }\n\n\t// If the target got cropped by ancestors or went off the screen, positioning does not make any sense.\n\tif ( !visibleTargetRect || !constrainedViewportRect.getIntersection( visibleTargetRect ) ) {\n\t\treturn null;\n\t}\n\n\t// @if CK_DEBUG_POSITION //\tRectDrawer.draw( visibleTargetRect, VISIBLE_TARGET_RECT_STYLE, 'VisTgt' );\n\n\tconst positionOptions: PositionObjectOptions = {\n\t\ttargetRect: visibleTargetRect,\n\t\telementRect,\n\t\tpositionedElementAncestor,\n\t\tviewportRect: constrainedViewportRect\n\t};\n\n\t// If there are no limits, just grab the very first position and be done with that drama.\n\tif ( !limiter && !fitInViewport ) {\n\t\tbestPosition = new PositionObject( positions[ 0 ], positionOptions );\n\t} else {\n\t\tif ( limiter ) {\n\t\t\tconst visibleLimiterRect = getVisibleViewportIntersectionRect( limiter, constrainedViewportRect );\n\n\t\t\tif ( visibleLimiterRect ) {\n\t\t\t\tpositionOptions.limiterRect = visibleLimiterRect;\n\t\t\t\t// @if CK_DEBUG_POSITION // RectDrawer.draw( visibleLimiterRect, VISIBLE_LIMITER_RECT_STYLE, 'VisLim' );\n\t\t\t}\n\t\t}\n\n\t\t// If there's no best position found, i.e. when all intersections have no area because\n\t\t// rects have no width or height, then just return `null`\n\t\tbestPosition = getBestPosition( positions, positionOptions );\n\t}\n\n\treturn bestPosition;\n}\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: RectSource, viewportRect: Rect ): Rect | null {\n\tconst visibleSourceRect = new Rect( source ).getVisible();\n\n\tif ( !visibleSourceRect ) {\n\t\treturn null;\n\t}\n\n\treturn visibleSourceRect.getIntersection( viewportRect );\n}\n\n/**\n * Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n */\nexport function getConstrainedViewportRect( viewportOffsetConfig: DomOptimalPositionOptions[ 'viewportOffsetConfig' ] ): Rect {\n\tviewportOffsetConfig = Object.assign( { top: 0, bottom: 0, left: 0, right: 0 }, viewportOffsetConfig );\n\n\tconst viewportRect = new Rect( global.window );\n\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\n\treturn viewportRect;\n}\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(\n\tpositions: ReadonlyArray<PositioningFunction>,\n\toptions: ConstructorParameters<typeof PositionObject>[ 1 ]\n): DomPoint | null {\n\tconst { elementRect } = options;\n\n\t// This is when element is fully visible.\n\tconst elementRectArea = elementRect.getArea();\n\n\tconst positionInstances = positions\n\t\t.map( positioningFunction => new PositionObject( positioningFunction, options ) )\n\t\t// Some positioning functions may return `null` if they don't want to participate.\n\t\t.filter( position => !!position.name );\n\n\tlet maxFitFactor = 0;\n\tlet bestPosition = null;\n\n\tfor ( const position of positionInstances ) {\n\t\tconst { limiterIntersectionArea, viewportIntersectionArea } = position;\n\n\t\t// If a such position is found that element is fully contained by the limiter then, obviously,\n\t\t// there will be no better one, so finishing.\n\t\tif ( limiterIntersectionArea === elementRectArea ) {\n\t\t\t// @if CK_DEBUG_POSITION //\tRectDrawer.draw( position._rect, CHOSEN_POSITION_RECT_STYLE, [\n\t\t\t// @if CK_DEBUG_POSITION //\t\tposition.name,\n\t\t\t// @if CK_DEBUG_POSITION //\t\t'100% fit',\n\t\t\t// @if CK_DEBUG_POSITION //\t].join( '\\n' ) );\n\n\t\t\treturn position;\n\t\t}\n\n\t\t// To maximize both viewport and limiter intersection areas we use distance on _viewportIntersectionArea\n\t\t// and _limiterIntersectionArea plane (without sqrt because we are looking for max value).\n\t\tconst fitFactor = viewportIntersectionArea ** 2 + limiterIntersectionArea ** 2;\n\n\t\t// @if CK_DEBUG_POSITION //\tRectDrawer.draw( position._rect, { opacity: .4 }, [\n\t\t// @if CK_DEBUG_POSITION //\t\tposition.name,\n\t\t// @if CK_DEBUG_POSITION //\t\t'Vi=' +  Math.round( viewportIntersectionArea ),\n\t\t// @if CK_DEBUG_POSITION //\t\t'Li=' + Math.round( limiterIntersectionArea )\n\t\t// @if CK_DEBUG_POSITION //\t].join( '\\n' ) );\n\n\t\tif ( fitFactor > maxFitFactor ) {\n\t\t\tmaxFitFactor = fitFactor;\n\t\t\tbestPosition = position;\n\t\t}\n\t}\n\n\t// @if CK_DEBUG_POSITION // if ( bestPosition ) {\n\t// @if CK_DEBUG_POSITION // \tRectDrawer.draw( bestPosition._rect, CHOSEN_POSITION_RECT_STYLE );\n\t// @if CK_DEBUG_POSITION // }\n\n\treturn bestPosition;\n}\n\n/**\n * A position object which instances are created and used by the {@link module:utils/dom/position~getOptimalPosition} helper.\n *\n * {@link module:utils/dom/position~DomPoint#top} and {@link module:utils/dom/position~DomPoint#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 */\nexport interface DomPoint {\n\n\t/**\n\t * Position name.\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * Additional position configuration, as passed from the {@link module:utils/dom/position~PositioningFunction positioning function}.\n\t *\n\t * This object can be use, for instance, to pass through presentation options used by the consumer of the\n\t * {@link module:utils/dom/position~getOptimalPosition} helper.\n\t */\n\treadonly config?: object;\n\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\treadonly left: number;\n\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\treadonly top: number;\n}\n\n/**\n * A position options object which options are passed in the {@link module:utils/dom/position~PositionObject Class constructor},\n * to be used by {@link module:utils/dom/position~PositioningFunction positioning function}.\n */\ntype PositionObjectOptions = {\n\telementRect: Rect;\n\ttargetRect: Rect;\n\tviewportRect: Rect;\n\tpositionedElementAncestor?: HTMLElement | null;\n\tlimiterRect?: Rect;\n};\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 */\nclass PositionObject implements DomPoint {\n\tpublic name?: string;\n\tpublic config?: object;\n\n\tprivate _positioningFunctionCoordinates!: { left: number; top: number };\n\tprivate _options!: ConstructorParameters<typeof PositionObject>[ 1 ];\n\tprivate _cachedRect?: Rect;\n\tprivate _cachedAbsoluteRect?: Rect;\n\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(\n\t\tpositioningFunction: PositioningFunction,\n\t\toptions: Readonly<PositionObjectOptions>\n\t) {\n\t\tconst positioningFunctionOutput = positioningFunction(\n\t\t\toptions.targetRect,\n\t\t\toptions.elementRect,\n\t\t\toptions.viewportRect,\n\t\t\toptions.limiterRect\n\t\t);\n\n\t\t// Nameless position for a function that didn't participate.\n\t\tif ( !positioningFunctionOutput ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { left, top, name, config } = positioningFunctionOutput;\n\n\t\tthis.name = name;\n\t\tthis.config = config;\n\n\t\tthis._positioningFunctionCoordinates = { left, top };\n\t\tthis._options = options;\n\t}\n\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\tpublic get left(): number {\n\t\treturn this._absoluteRect.left;\n\t}\n\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\tpublic get top(): number {\n\t\treturn this._absoluteRect.top;\n\t}\n\n\t/**\n\t * An intersection area between positioned element and limiter within viewport constraints.\n\t */\n\tpublic get limiterIntersectionArea(): number {\n\t\tconst limiterRect = this._options.limiterRect;\n\n\t\tif ( limiterRect ) {\n\t\t\treturn limiterRect.getIntersectionArea( this._rect );\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * An intersection area between positioned element and viewport.\n\t */\n\tpublic get viewportIntersectionArea(): number {\n\t\tconst viewportRect = this._options.viewportRect!;\n\n\t\treturn viewportRect.getIntersectionArea( this._rect );\n\t}\n\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\tprivate get _rect(): Rect {\n\t\tif ( this._cachedRect ) {\n\t\t\treturn this._cachedRect;\n\t\t}\n\n\t\tthis._cachedRect = this._options.elementRect.clone().moveTo(\n\t\t\tthis._positioningFunctionCoordinates.left,\n\t\t\tthis._positioningFunctionCoordinates.top\n\t\t);\n\n\t\treturn this._cachedRect;\n\t}\n\n\t/**\n\t * An already absolutely positioned element rect. See ({@link #_rect}).\n\t */\n\tprivate get _absoluteRect(): Rect {\n\t\tif ( this._cachedAbsoluteRect ) {\n\t\t\treturn this._cachedAbsoluteRect;\n\t\t}\n\n\t\tthis._cachedAbsoluteRect = this._rect.toAbsoluteRect();\n\n\t\treturn this._cachedAbsoluteRect;\n\t}\n}\n\n/**\n * The `getOptimalPosition()` helper options.\n */\nexport interface DomOptimalPositionOptions {\n\n\t/**\n\t * Element that is to be positioned.\n\t */\n\treadonly element: HTMLElement;\n\n\t/**\n\t * Target with respect to which the `element` is to be positioned.\n\t */\n\treadonly target: RectSource | ( () => RectSource );\n\n\t/**\n\t * An array of positioning functions.\n\t *\n\t * **Note**: Positioning functions are processed in the order of preference. The first function that works\n\t * in the current environment (e.g. offers the complete fit in the viewport geometry) will be picked by\n\t * `getOptimalPosition()`.\n\t *\n\t * **Note**: Any positioning function returning `null` is ignored.\n\t */\n\treadonly positions: ReadonlyArray<PositioningFunction>;\n\n\t/**\n\t * When set, the algorithm will chose position which fits the most in the\n\t * limiter's bounding rect.\n\t */\n\treadonly limiter?: RectSource | ( () => ( RectSource | null ) ) | null;\n\n\t/**\n\t * When set, the algorithm will chose such a position which fits `element`\n\t * the most inside visible viewport.\n\t */\n\treadonly fitInViewport?: boolean;\n\n\t/**\n\t * Viewport offset config object. It restricts the visible viewport available to the `getOptimalPosition()` from each side.\n\t *\n\t * ```ts\n\t * {\n\t * \ttop: 50,\n\t * \tright: 50,\n\t * \tbottom: 50,\n\t * \tleft: 50\n\t * }\n\t * ```\n\t */\n\treadonly viewportOffsetConfig?: {\n\t\treadonly top?: number;\n\t\treadonly right?: number;\n\t\treadonly bottom?: number;\n\t\treadonly left?: number;\n\t};\n}\n\n/**\n * A positioning function which, based on positioned element and target {@link module:utils/dom/rect~Rect Rects}, returns rect coordinates\n * representing the geometrical relation between them. Used by the {@link module:utils/dom/position~getOptimalPosition} helper.\n *\n * ```ts\n * // This simple position will place the element directly under the target, in the middle:\n * //\n * //\t    [ Target ]\n * //\t+-----------------+\n * //\t|     Element     |\n * //\t+-----------------+\n * //\n * const position = ( targetRect, elementRect, [ viewportRect ] ) => ( {\n * \ttop: targetRect.bottom,\n * \tleft: targetRect.left + targetRect.width / 2 - elementRect.width / 2,\n * \tname: 'bottomMiddle',\n *\n * \t// Note: The config is optional.\n * \tconfig: {\n * \t\tzIndex: '999'\n * \t}\n * } );\n * ```\n *\n * @param elementRect The rect of the element to be positioned.\n * @param targetRect The rect of the target the element (its rect) is relatively positioned to.\n * @param viewportRect The rect of the visual browser viewport.\n * @returns When the function returns `null`, it will not be considered by {@link module:utils/dom/position~getOptimalPosition}.\n */\nexport type PositioningFunction = (\n\telementRect: Rect,\n\ttargetRect: Rect,\n\tviewportRect: Rect,\n\tlimiterRect?: Rect\n) => DomPositioningFunctionResult | null;\n\n/**\n * The result of {@link module:utils/dom/position~PositioningFunction}.\n */\nexport interface DomPositioningFunctionResult {\n\n\t/**\n\t * The `top` value of the element rect that would represent the position.\n\t */\n\ttop: number;\n\n\t/**\n\t * The `left` value of the element rect that would represent the position.\n\t */\n\tleft: number;\n\n\t/**\n\t * The name of the position. It helps the user of the {@link module:utils/dom/position~getOptimalPosition}\n\t * helper to recognize different positioning function results. It will pass through to the {@link module:utils/dom/position~DomPoint}\n\t * returned by the helper.\n\t */\n\tname?: string;\n\n\t/**\n\t * An optional configuration that will pass-through the {@link module:utils/dom/position~getOptimalPosition} helper\n\t * to the {@link module:utils/dom/position~DomPoint} returned by this helper.\n\t * This configuration may, for instance, let the user of {@link module:utils/dom/position~getOptimalPosition} know that this particular\n\t * position comes with a certain presentation.\n\t */\n\tconfig?: object;\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/**\n * @module utils/dom/remove\n */\n\n/**\n * Removes given node from parent.\n *\n * @param node Node to remove.\n */\nexport function remove( node: Node ): void {\n\tconst parent = node.parentNode;\n\n\tif ( parent ) {\n\t\tparent.removeChild( node );\n\t}\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/**\n * @module utils/dom/getvisualviewportoffset\n */\n\nimport { global } from './global.js';\nimport { env } from '../env.js';\n\n/**\n * Returns the visual viewport offsets to adjust elements with `position: fixed` style.\n */\nexport function getVisualViewportOffset(): { left: number; top: number } {\n\tconst visualViewport = global.window.visualViewport;\n\n\tif ( !visualViewport || !( env.isiOS || env.isSafari ) ) {\n\t\treturn { left: 0, top: 0 };\n\t}\n\n\tconst left = Math.max( Math.round( visualViewport.offsetLeft ), 0 );\n\tconst top = Math.max( Math.round( visualViewport.offsetTop ), 0 );\n\n\treturn { left, top };\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/**\n * @module utils/dom/scroll\n */\n\nimport { isRange } from './isrange.js';\nimport { Rect } from './rect.js';\nimport { isText } from './istext.js';\n\nexport type IfTrue<T> = T extends true ? true : never;\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 */\nexport function scrollViewportToShowTarget<T extends boolean, U extends IfTrue<T>>(\n\t{\n\t\ttarget,\n\t\tviewportOffset = 0,\n\t\tancestorOffset = 0,\n\t\talignToTop,\n\t\tforceScroll\n\t}:\n\t{\n\t\treadonly target: HTMLElement | Range;\n\t\treadonly viewportOffset?: number | { top: number; bottom: number; left: number; right: number };\n\t\treadonly ancestorOffset?: number;\n\t\treadonly alignToTop?: T;\n\t\treadonly forceScroll?: U;\n\t}\n): void {\n\tconst targetWindow = getWindow( target );\n\tlet currentWindow: Window | null = targetWindow;\n\tlet currentFrame: HTMLElement | null = null;\n\n\tviewportOffset = normalizeViewportOffset( viewportOffset );\n\n\t// Iterate over all windows, starting from target's parent window up to window#top.\n\twhile ( currentWindow ) {\n\t\tlet firstAncestorToScroll: HTMLElement;\n\n\t\t// Let's scroll target's ancestors first to reveal it. Then, once the ancestor scrolls\n\t\t// settled down, the algorithm can eventually scroll the viewport of the current window.\n\t\t//\n\t\t// Note: If the current window is target's **original** window (e.g. the first one),\n\t\t// start scrolling the closest parent of the target. If not, scroll the closest parent\n\t\t// of an iframe that resides in the current window.\n\t\tif ( currentWindow == targetWindow ) {\n\t\t\tfirstAncestorToScroll = getParentElement( target );\n\t\t} else {\n\t\t\tfirstAncestorToScroll = getParentElement( currentFrame! );\n\t\t}\n\n\t\t// Scroll the target's ancestors first. Once done, scrolling the viewport is easy.\n\t\tscrollAncestorsToShowRect( {\n\t\t\tparent: firstAncestorToScroll,\n\t\t\tgetRect: () => {\n\t\t\t\t// Note: If the target does not belong to the current window **directly**,\n\t\t\t\t// i.e. it resides in an iframe belonging to the window, obtain the target's rect\n\t\t\t\t// in the coordinates of the current window. By default, a Rect returns geometry\n\t\t\t\t// relative to the current window's viewport. To make it work in a parent window,\n\t\t\t\t// it must be shifted.\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\n\t\t// Obtain the rect of the target after it has been scrolled within its ancestors.\n\t\t// It's time to scroll the viewport.\n\t\tlet targetRect = getRectRelativeToWindow( target, currentWindow );\n\n\t\t// Detect situation where the target is higher than the first scrollable ancestor.\n\t\t// In such case scrolling the viewport to reveal the target might be malfunctioning because\n\t\t// the target `.top` position is lower than the ancestor's `.top` position. If it's large enough it can be negative.\n\t\t// It causes the `scrollWindowToShowRect` to scroll the viewport to the negative top position which is not possible\n\t\t// and leads to the viewport being scrolled to the absolute top of the document. To prevent this, the target's rect\n\t\t// must be shifted to the ancestor's top position. It should not affect the target's visibility because the ancestor\n\t\t// is already scrolled to reveal the target.\n\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/17079\n\t\tconst ancestorWindowRelativeRect = getRectRelativeToWindow( firstAncestorToScroll, currentWindow );\n\n\t\tif ( targetRect.height > ancestorWindowRelativeRect.height ) {\n\t\t\tconst ancestorTargetIntersection = targetRect.getIntersection( ancestorWindowRelativeRect );\n\n\t\t\tif ( ancestorTargetIntersection ) {\n\t\t\t\ttargetRect = ancestorTargetIntersection;\n\t\t\t}\n\t\t}\n\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\n\t\tif ( currentWindow.parent != currentWindow ) {\n\t\t\t// Keep the reference to the <iframe> element the \"previous current window\" was\n\t\t\t// rendered within. It will be useful to re–calculate the rect of the target\n\t\t\t// in the parent window's relative geometry. The target's rect must be shifted\n\t\t\t// by it's iframe's position.\n\t\t\tcurrentFrame = currentWindow.frameElement as HTMLElement | null;\n\t\t\tcurrentWindow = currentWindow.parent;\n\n\t\t\t// If the current window has some parent but frameElement is inaccessible, then they have\n\t\t\t// different domains/ports and, due to security reasons, accessing and scrolling\n\t\t\t// the parent window won't be possible.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/930.\n\t\t\tif ( !currentFrame ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tcurrentWindow = null;\n\t\t}\n\t}\n}\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 */\nexport function scrollAncestorsToShowTarget(\n\ttarget: HTMLElement | Range,\n\tancestorOffset?: number,\n\tlimiterElement?: HTMLElement,\n\talignToTop?: boolean,\n\tforceScroll?: true\n): void {\n\tconst targetParent = getParentElement( target );\n\n\tscrollAncestorsToShowRect( {\n\t\tparent: targetParent,\n\t\tgetRect: () => new Rect( target ),\n\t\tancestorOffset,\n\t\tlimiterElement,\n\t\talignToTop,\n\t\tforceScroll\n\t} );\n}\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<T extends boolean, U extends IfTrue<T>>(\n\t{\n\t\twindow,\n\t\trect,\n\t\talignToTop,\n\t\tforceScroll,\n\t\tviewportOffset\n\t}: {\n\t\treadonly window: Window;\n\t\treadonly rect: Rect;\n\t\treadonly viewportOffset: { top: number; bottom: number; left: number; right: number };\n\t\treadonly alignToTop?: T;\n\t\treadonly forceScroll?: U;\n\t}\n): void {\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\n\tconst rects = [ targetShiftedUpRect, targetShiftedDownRect ];\n\tconst forceScrollToTop = alignToTop && forceScroll;\n\tconst allRectsFitInViewport = rects.every( rect => viewportRect.contains( rect ) );\n\n\tlet { scrollX, scrollY } = window;\n\tconst initialScrollX = scrollX;\n\tconst initialScrollY = scrollY;\n\n\tif ( forceScrollToTop ) {\n\t\tscrollY -= ( viewportRect.top - rect.top ) + viewportOffset.top;\n\t} else if ( !allRectsFitInViewport ) {\n\t\tif ( isAbove( targetShiftedUpRect, viewportRect ) ) {\n\t\t\tscrollY -= viewportRect.top - rect.top + viewportOffset.top;\n\t\t} else if ( isBelow( targetShiftedDownRect, viewportRect ) ) {\n\t\t\tif ( alignToTop ) {\n\t\t\t\tscrollY += rect.top - viewportRect.top - viewportOffset.top;\n\t\t\t} else {\n\t\t\t\tscrollY += rect.bottom - viewportRect.bottom + viewportOffset.bottom;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !allRectsFitInViewport ) {\n\t\t// TODO: Web browsers scroll natively to place the target in the middle\n\t\t// of the viewport. It's not a very popular case, though.\n\t\tif ( isLeftOf( rect, viewportRect ) ) {\n\t\t\tscrollX -= viewportRect.left - rect.left + viewportOffset.left;\n\t\t} else if ( isRightOf( rect, viewportRect ) ) {\n\t\t\tscrollX += rect.right - viewportRect.right + viewportOffset.right;\n\t\t}\n\t}\n\n\tif ( scrollX != initialScrollX || scrollY !== initialScrollY ) {\n\t\twindow.scrollTo( scrollX, scrollY );\n\t}\n}\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<T extends boolean, U extends IfTrue<T>>(\n\t{\n\t\tparent,\n\t\tgetRect,\n\t\talignToTop,\n\t\tforceScroll,\n\t\tancestorOffset = 0,\n\t\tlimiterElement\n\t}: {\n\t\treadonly parent: HTMLElement;\n\t\treadonly getRect: () => Rect;\n\t\treadonly alignToTop?: T;\n\t\treadonly forceScroll?: U;\n\t\treadonly ancestorOffset?: number;\n\t\treadonly limiterElement?: HTMLElement;\n\t}\n): void {\n\tconst parentWindow = getWindow( parent );\n\tconst forceScrollToTop = alignToTop && forceScroll;\n\tlet parentRect: Rect, targetRect: Rect, targetFitsInTarget: boolean;\n\n\tconst limiter = limiterElement || parentWindow.document.body;\n\n\twhile ( parent != limiter ) {\n\t\ttargetRect = getRect();\n\t\tparentRect = new Rect( parent ).excludeScrollbarsAndBorders();\n\t\ttargetFitsInTarget = parentRect.contains( targetRect );\n\n\t\tif ( forceScrollToTop ) {\n\t\t\tparent.scrollTop -= ( parentRect.top - targetRect.top ) + ancestorOffset;\n\t\t} else if ( !targetFitsInTarget ) {\n\t\t\tif ( isAbove( targetRect, parentRect ) ) {\n\t\t\t\tparent.scrollTop -= parentRect.top - targetRect.top + ancestorOffset;\n\t\t\t} else if ( isBelow( targetRect, parentRect ) ) {\n\t\t\t\tif ( alignToTop ) {\n\t\t\t\t\tparent.scrollTop += targetRect.top - parentRect.top - ancestorOffset;\n\t\t\t\t} else {\n\t\t\t\t\tparent.scrollTop += targetRect.bottom - parentRect.bottom + ancestorOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( !targetFitsInTarget ) {\n\t\t\tif ( isLeftOf( targetRect, parentRect ) ) {\n\t\t\t\tparent.scrollLeft -= parentRect.left - targetRect.left + ancestorOffset;\n\t\t\t} else if ( isRightOf( targetRect, parentRect ) ) {\n\t\t\t\tparent.scrollLeft += targetRect.right - parentRect.right + ancestorOffset;\n\t\t\t}\n\t\t}\n\n\t\tparent = parent.parentNode as HTMLElement;\n\t}\n}\n\n/**\n * Determines if a given `Rect` extends beyond the bottom edge of the second `Rect`.\n */\nfunction isBelow( firstRect: Rect, secondRect: Rect ): boolean {\n\treturn firstRect.bottom > secondRect.bottom;\n}\n\n/**\n * Determines if a given `Rect` extends beyond the top edge of the second `Rect`.\n */\nfunction isAbove( firstRect: Rect, secondRect: Rect ): boolean {\n\treturn firstRect.top < secondRect.top;\n}\n\n/**\n * Determines if a given `Rect` extends beyond the left edge of the second `Rect`.\n */\nfunction isLeftOf( firstRect: Rect, secondRect: Rect ): boolean {\n\treturn firstRect.left < secondRect.left;\n}\n\n/**\n * Determines if a given `Rect` extends beyond the right edge of the second `Rect`.\n */\nfunction isRightOf( firstRect: Rect, secondRect: Rect ): boolean {\n\treturn firstRect.right > secondRect.right;\n}\n\n/**\n * Returns the closest window of an element or range.\n */\nfunction getWindow( elementOrRange: HTMLElement | Range ): Window {\n\tif ( isRange( elementOrRange ) ) {\n\t\treturn elementOrRange.startContainer.ownerDocument!.defaultView!;\n\t} else {\n\t\treturn elementOrRange.ownerDocument.defaultView!;\n\t}\n}\n\n/**\n * Returns the closest parent of an element or DOM range.\n */\nfunction getParentElement( elementOrRange: HTMLElement | Range ): HTMLElement {\n\tif ( isRange( elementOrRange ) ) {\n\t\tlet parent = elementOrRange.commonAncestorContainer as HTMLElement;\n\n\t\t// If a Range is attached to the Text, use the closest element ancestor.\n\t\tif ( isText( parent ) ) {\n\t\t\tparent = parent.parentNode as HTMLElement;\n\t\t}\n\n\t\treturn parent;\n\t} else {\n\t\treturn elementOrRange.parentNode as HTMLElement;\n\t}\n}\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: HTMLElement | Range, relativeWindow: Window ): Rect {\n\tconst targetWindow = getWindow( target );\n\tconst rect = new Rect( target );\n\n\tif ( targetWindow === relativeWindow ) {\n\t\treturn rect;\n\t} else {\n\t\tlet currentWindow = targetWindow;\n\n\t\twhile ( currentWindow != relativeWindow ) {\n\t\t\tconst frame = currentWindow.frameElement as HTMLElement;\n\t\t\tconst frameRect = new Rect( frame ).excludeScrollbarsAndBorders();\n\n\t\t\trect.moveBy( frameRect.left, frameRect.top );\n\n\t\t\tcurrentWindow = currentWindow.parent;\n\t\t}\n\t}\n\n\treturn rect;\n}\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: number | { top: number; bottom: number; left: number; right: number } ) {\n\tif ( typeof viewportOffset === 'number' ) {\n\t\treturn {\n\t\t\ttop: viewportOffset,\n\t\t\tbottom: viewportOffset,\n\t\t\tleft: viewportOffset,\n\t\t\tright: viewportOffset\n\t\t};\n\t}\n\n\treturn viewportOffset;\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/**\n * A set of utilities related to keyboard support.\n *\n * @module utils/keyboard\n */\n\nimport type { LanguageDirection } from './language.js';\nimport { CKEditorError } from './ckeditorerror.js';\nimport { env } from './env.js';\n\nconst modifiersToGlyphsMac = {\n\tctrl: '⌃',\n\tcmd: '⌘',\n\talt: '⌥',\n\tshift: '⇧'\n} as const;\n\nconst modifiersToGlyphsNonMac = {\n\tctrl: 'Ctrl+',\n\talt: 'Alt+',\n\tshift: 'Shift+'\n} as const;\n\nconst keyCodesToGlyphs: { [key: number]: string } = {\n\t37: '←',\n\t38: '↑',\n\t39: '→',\n\t40: '↓',\n\t9: '⇥',\n\t33: 'Page Up',\n\t34: 'Page Down'\n} as const;\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 */\nexport const keyCodes: Record<string, number> = /* #__PURE__ */ generateKnownKeyCodes();\n\nconst keyCodeNames: { readonly [ keyCode: number ]: string } = /* #__PURE__ */ Object.fromEntries(\n\t/* #__PURE__ */ Object.entries( keyCodes ).map( ( [ name, code ] ) => {\n\t\tlet prettyKeyName;\n\n\t\tif ( code in keyCodesToGlyphs ) {\n\t\t\tprettyKeyName = keyCodesToGlyphs[ code ];\n\t\t} else {\n\t\t\tprettyKeyName = name.charAt( 0 ).toUpperCase() + name.slice( 1 );\n\t\t}\n\n\t\treturn [ code, prettyKeyName ];\n\t} )\n);\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 */\nexport function getCode( key: string | Readonly<KeystrokeInfo> ): number {\n\tlet keyCode: number | undefined;\n\n\tif ( typeof key == 'string' ) {\n\t\tkeyCode = keyCodes[ key.toLowerCase() ];\n\n\t\tif ( !keyCode ) {\n\t\t\t/**\n\t\t\t * Unknown key name. Only key names included in the {@link module:utils/keyboard#keyCodes} can be used.\n\t\t\t *\n\t\t\t * @error keyboard-unknown-key\n\t\t\t * @param {string} key Ths specified key name.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'keyboard-unknown-key', null, { key } );\n\t\t}\n\t} else {\n\t\tkeyCode = key.keyCode +\n\t\t\t( key.altKey ? keyCodes.alt : 0 ) +\n\t\t\t( key.ctrlKey ? keyCodes.ctrl : 0 ) +\n\t\t\t( key.shiftKey ? keyCodes.shift : 0 ) +\n\t\t\t( key.metaKey ? keyCodes.cmd : 0 );\n\t}\n\n\treturn keyCode;\n}\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 */\nexport function parseKeystroke( keystroke: string | ReadonlyArray<number | string> ): number {\n\tif ( typeof keystroke == 'string' ) {\n\t\tkeystroke = splitKeystrokeText( keystroke );\n\t}\n\n\treturn keystroke\n\t\t.map( key => ( typeof key == 'string' ) ? getEnvKeyCode( key ) : key )\n\t\t.reduce( ( key, sum ) => sum + key, 0 );\n}\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 */\nexport function getEnvKeystrokeText( keystroke: string, forcedEnv?: 'PC' | 'Mac' ): string {\n\tlet keystrokeCode = parseKeystroke( keystroke );\n\n\tconst isMac = forcedEnv ? forcedEnv === 'Mac' : env.isMac || env.isiOS;\n\n\tconst modifiersToGlyphs = Object.entries( isMac ? modifiersToGlyphsMac : modifiersToGlyphsNonMac );\n\n\tconst modifiers = modifiersToGlyphs.reduce( ( modifiers, [ name, glyph ] ) => {\n\t\t// Modifier keys are stored as a bit mask so extract those from the keystroke code.\n\t\tif ( ( keystrokeCode & keyCodes[ name ] ) != 0 ) {\n\t\t\tkeystrokeCode &= ~keyCodes[ name ];\n\t\t\tmodifiers += glyph;\n\t\t}\n\n\t\treturn modifiers;\n\t}, '' );\n\n\treturn modifiers + ( keystrokeCode ? keyCodeNames[ keystrokeCode ] : '' );\n}\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 */\nexport function isArrowKeyCode( keyCode: number ): boolean {\n\treturn keyCode == keyCodes.arrowright ||\n\t\tkeyCode == keyCodes.arrowleft ||\n\t\tkeyCode == keyCodes.arrowup ||\n\t\tkeyCode == keyCodes.arrowdown;\n}\n\n/**\n * String representing a direction of an arrow key kode.\n */\nexport type ArrowKeyCodeDirection = 'left' | 'up' | 'right' | 'down';\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 */\nexport function getLocalizedArrowKeyCodeDirection(\n\tkeyCode: number,\n\tcontentLanguageDirection: LanguageDirection\n): ArrowKeyCodeDirection | undefined {\n\tconst isLtrContent = contentLanguageDirection === 'ltr';\n\n\tswitch ( keyCode ) {\n\t\tcase keyCodes.arrowleft:\n\t\t\treturn isLtrContent ? 'left' : 'right';\n\n\t\tcase keyCodes.arrowright:\n\t\t\treturn isLtrContent ? 'right' : 'left';\n\n\t\tcase keyCodes.arrowup:\n\t\t\treturn 'up';\n\n\t\tcase keyCodes.arrowdown:\n\t\t\treturn 'down';\n\t}\n}\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: string ): number {\n\t// Don't remap modifier key for forced modifiers.\n\tif ( key.endsWith( '!' ) ) {\n\t\treturn getCode( key.slice( 0, -1 ) );\n\t}\n\n\tconst code = getCode( key );\n\n\treturn ( env.isMac || env.isiOS ) && code == keyCodes.ctrl ? keyCodes.cmd : code;\n}\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 */\nexport function isForwardArrowKeyCode(\n\tkeyCode: number,\n\tcontentLanguageDirection: LanguageDirection\n): boolean {\n\tconst localizedKeyCodeDirection = getLocalizedArrowKeyCodeDirection( keyCode, contentLanguageDirection );\n\n\treturn localizedKeyCodeDirection === 'down' || localizedKeyCodeDirection === 'right';\n}\n\nfunction generateKnownKeyCodes(): { readonly [ keyCode: string ]: number } {\n\tconst keyCodes: { [keyCode: string]: number } = {\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\n\t\t// The idea about these numbers is that they do not collide with any real key codes, so we can use them\n\t\t// like bit masks.\n\t\tctrl: 0x110000,\n\t\tshift: 0x220000,\n\t\talt: 0x440000,\n\t\tcmd: 0x880000\n\t};\n\n\t// a-z\n\tfor ( let code = 65; code <= 90; code++ ) {\n\t\tconst letter = String.fromCharCode( code );\n\n\t\tkeyCodes[ letter.toLowerCase() ] = code;\n\t}\n\n\t// 0-9\n\tfor ( let code = 48; code <= 57; code++ ) {\n\t\tkeyCodes[ code - 48 ] = code;\n\t}\n\n\t// F1-F12\n\tfor ( let code = 112; code <= 123; code++ ) {\n\t\tkeyCodes[ 'f' + ( code - 111 ) ] = code;\n\t}\n\n\t// other characters\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\n\treturn keyCodes;\n}\n\nfunction splitKeystrokeText( keystroke: string ): Array<string> {\n\treturn keystroke.split( '+' ).map( key => key.trim() );\n}\n\n/**\n * Information about the keystroke.\n */\nexport interface KeystrokeInfo {\n\n\t/**\n\t * The [key code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode).\n\t */\n\tkeyCode: number;\n\n\t/**\n\t * Whether the <kbd>Alt</kbd> modifier was pressed.\n\t */\n\taltKey: boolean;\n\n\t/**\n\t * Whether the <kbd>Cmd</kbd> modifier was pressed.\n\t */\n\tmetaKey: boolean;\n\n\t/**\n\t * Whether the <kbd>Ctrl</kbd> modifier was pressed.\n\t */\n\tctrlKey: boolean;\n\n\t/**\n\t * Whether the <kbd>Shift</kbd> modifier was pressed.\n\t */\n\tshiftKey: boolean;\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/**\n * @module utils/language\n */\n\n/**\n * String representing a language direction.\n */\nexport type LanguageDirection = 'ltr' | 'rtl';\n\nconst RTL_LANGUAGE_CODES = [\n\t'ar', 'ara', // Arabic\n\t'dv', 'div', // Dhivehi\n\t'fa', 'per', 'fas', // Persian\n\t'he', 'heb', // Hebrew\n\t'ku', 'kur', // Kurdish\n\t'ug', 'uig', // Uighur, Uyghur\n\t'ur', 'urd' // Urdu\n];\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 */\nexport function getLanguageDirection( languageCode: string ): LanguageDirection {\n\treturn RTL_LANGUAGE_CODES.includes( languageCode ) ? 'rtl' : 'ltr';\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/**\n * @module utils/toarray\n */\n\n/**\n * Transforms any value to an array. If the provided value is already an array, it is returned unchanged.\n *\n * @label MUTABLE\n * @param data The value to transform to an array.\n * @returns An array created from data.\n */\nexport function toArray<T>( data: ArrayOrItem<T> ): Array<T>;\n\n/**\n * Transforms any value to an array. If the provided value is already an array, it is returned unchanged.\n *\n * @label IMMUTABLE\n * @param data The value to transform to an array.\n * @returns An array created from data.\n */\nexport function toArray<T>( data: ReadonlyArrayOrItem<T> ): ReadonlyArray<T>;\n\nexport function toArray<T>( data: ArrayOrItem<T> ): Array<T> {\n\treturn Array.isArray( data ) ? data : [ data ];\n}\n\nexport type ArrayOrItem<T> = T | Array<T>;\nexport type ReadonlyArrayOrItem<T> = T | ReadonlyArray<T>;\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/**\n * @module utils/translation-service\n */\n\nimport type { Translations } from './locale.js';\nimport { CKEditorError } from './ckeditorerror.js';\nimport { global } from './dom/global.js';\nimport { merge } from 'es-toolkit/compat';\nimport { type ArrayOrItem } from './toarray.js';\n\ndeclare global {\n\tvar CKEDITOR_TRANSLATIONS: Translations;\n}\n\n/* v8 ignore else -- @preserve */\nif ( !global.window.CKEDITOR_TRANSLATIONS ) {\n\tglobal.window.CKEDITOR_TRANSLATIONS = {};\n}\n\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 */\nexport function add(\n\tlanguage: string,\n\ttranslations: { readonly [ messageId: string ]: string | ReadonlyArray<string> },\n\tgetPluralForm?: ( n: number ) => number\n): void {\n\tif ( !global.window.CKEDITOR_TRANSLATIONS[ language ] ) {\n\t\tglobal.window.CKEDITOR_TRANSLATIONS[ language ] = {} as any;\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\tObject.assign( languageTranslations.dictionary, translations );\n}\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 */\nexport function _translate(\n\tlanguage: string,\n\tmessage: Message,\n\tquantity: number = 1,\n\ttranslations?: Translations\n): string {\n\tif ( typeof quantity !== 'number' ) {\n\t\t/**\n\t\t * An incorrect value was passed to the translation function. This was probably caused\n\t\t * by an incorrect message interpolation of a plural form. Note that for messages supporting plural forms\n\t\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\t *\n\t\t * @error translation-service-quantity-not-a-number\n\t\t */\n\t\tthrow new CKEditorError( 'translation-service-quantity-not-a-number', null, { quantity } );\n\t}\n\n\tconst normalizedTranslations: Translations = translations || global.window.CKEDITOR_TRANSLATIONS;\n\tconst numberOfLanguages = getNumberOfLanguages( normalizedTranslations );\n\n\tif ( numberOfLanguages === 1 ) {\n\t\t// Override the language to the only supported one.\n\t\t// This can't be done in the `Locale` class, because the translations comes after the `Locale` class initialization.\n\t\tlanguage = Object.keys( normalizedTranslations )[ 0 ];\n\t}\n\n\tconst messageId = message.id || message.string;\n\n\tif ( numberOfLanguages === 0 || !hasTranslation( language, messageId, normalizedTranslations ) ) {\n\t\tif ( quantity !== 1 ) {\n\t\t\t// Return the default plural form that was passed in the `message.plural` parameter.\n\t\t\treturn message.plural!;\n\t\t}\n\n\t\treturn message.string;\n\t}\n\n\tconst dictionary = normalizedTranslations[ language ].dictionary;\n\tconst getPluralForm = normalizedTranslations[ language ].getPluralForm || ( n => n === 1 ? 0 : 1 );\n\tconst translation = dictionary[ messageId ];\n\n\tif ( typeof translation === 'string' ) {\n\t\treturn translation;\n\t}\n\n\tconst pluralFormIndex = Number( getPluralForm( quantity ) );\n\n\t// Note: The `translate` function is not responsible for replacing `%0, %1, ...` with values.\n\treturn translation[ pluralFormIndex ];\n}\n\n/**\n * Clears dictionaries for test purposes.\n *\n * @internal\n */\nexport function _clear(): void {\n\tif ( global.window.CKEDITOR_TRANSLATIONS ) {\n\t\tglobal.window.CKEDITOR_TRANSLATIONS = {};\n\t}\n}\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 */\nexport function _unifyTranslations(\n\ttranslations?: ArrayOrItem<Translations>\n): Translations | undefined {\n\treturn Array.isArray( translations ) ?\n\t\ttranslations.reduce( ( acc, translation ) => merge( acc, translation ) ) :\n\t\ttranslations;\n}\n\n/**\n * Checks whether the dictionary exists and translation in that dictionary exists.\n */\nfunction hasTranslation( language: string, messageId: string, translations: Translations ): boolean {\n\treturn !!translations[ language ] && !!translations[ language ].dictionary[ messageId ];\n}\n\nfunction getNumberOfLanguages( translations: Translations ): number {\n\treturn Object.keys( translations ).length;\n}\n\n/**\n * The internationalization message interface. A message that implements this interface can be passed to the `t()` function\n * to be translated to the target UI language.\n */\nexport interface Message {\n\n\t/**\n\t * The message string to translate. Acts as a default translation if the translation for a given language\n\t * is not defined. When the message is supposed to support plural forms, the string should be the English singular form of the message.\n\t */\n\treadonly string: string;\n\n\t/**\n\t * The message ID. If passed, the message ID is taken from this property instead of the `message.string`.\n\t * This property is useful when various messages share the same message string, for example, the `editor` string in `in the editor`\n\t * and `my editor` sentences.\n\t */\n\treadonly id?: string;\n\n\t/**\n\t * The plural form of the message. This property should be skipped when a message is not supposed\n\t * to support plural forms. Otherwise it should always be set to a string with the English plural form of the message.\n\t */\n\treadonly plural?: string;\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/**\n * @module utils/locale\n */\n\nimport { toArray, type ArrayOrItem } from './toarray.js';\nimport { _translate, _unifyTranslations, type Message } from './translation-service.js';\nimport { getLanguageDirection, type LanguageDirection } from './language.js';\n\n/**\n * Represents the localization services.\n */\nexport class Locale {\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\tpublic readonly uiLanguage: string;\n\n\t/**\n\t * Text direction of the {@link #uiLanguage editor UI language}. Either `'ltr'` or `'rtl'`.\n\t */\n\tpublic readonly uiLanguageDirection: LanguageDirection;\n\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\tpublic readonly contentLanguage: string;\n\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\tpublic readonly contentLanguageDirection: LanguageDirection;\n\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\tpublic readonly t: LocaleTranslate;\n\n\t/**\n\t * Object that contains translations.\n\t */\n\tpublic translations?: Translations;\n\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(\n\t\t{\n\t\t\tuiLanguage = 'en',\n\t\t\tcontentLanguage,\n\t\t\ttranslations\n\t\t}: {\n\t\t\treadonly uiLanguage?: string;\n\t\t\treadonly contentLanguage?: string;\n\t\t\treadonly translations?: ArrayOrItem<Translations>;\n\t\t} = {}\n\t) {\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\n\t/**\n\t * An unbound version of the {@link #t} method.\n\t */\n\tprivate _t( message: string | Message, values: number | string | ReadonlyArray<number | string> = [] ): string {\n\t\tvalues = toArray( values );\n\n\t\tif ( typeof message === 'string' ) {\n\t\t\tmessage = { string: message };\n\t\t}\n\n\t\tconst hasPluralForm = !!message.plural;\n\t\tconst quantity = hasPluralForm ? values[ 0 ] as number : 1;\n\n\t\tconst translatedString = _translate( this.uiLanguage, message, quantity, this.translations );\n\n\t\treturn interpolateString( translatedString, values );\n\t}\n}\n\n/**\n * @param message A message that will be localized (translated).\n * @param values A value or an array of values that will fill message placeholders.\n * For messages supporting plural forms the first value will determine the plural form.\n */\nexport type LocaleTranslate = (\n\tmessage: string | Message,\n\tvalues?: number | string | ReadonlyArray<number | string>\n) => string;\n\n/**\n * Fills the `%0, %1, ...` string placeholders with values.\n */\nfunction interpolateString( string: string, values: ReadonlyArray<any> ): string {\n\treturn string.replace( /%(\\d+)/g, ( match, index ) => {\n\t\treturn ( index < values.length ) ? values[ index ] : match;\n\t} );\n}\n\n/**\n * Translations object definition.\n */\nexport type Translations = {\n\t[ language: string ]: {\n\t\tdictionary: { [ messageId: string ]: string | ReadonlyArray<string> };\n\t\tgetPluralForm?: ( ( n: number ) => number | boolean ) | null;\n\t};\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/**\n * @module utils/collection\n */\n\nimport { EmitterMixin, type EmitterMixinConstructor } from './emittermixin.js';\nimport { CKEditorError } from './ckeditorerror.js';\nimport { uid } from './uid.js';\nimport { isIterable } from './isiterable.js';\n\nconst CollectionBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\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 */\nexport class Collection<T extends Record<string, any>> extends CollectionBase implements Iterable<T> {\n\t/**\n\t * The internal list of items in the collection.\n\t */\n\tprivate readonly _items: Array<T>;\n\n\t/**\n\t * The internal map of items in the collection.\n\t */\n\tprivate readonly _itemMap: Map<string, T>;\n\n\t/**\n\t * The name of the property which is considered to identify an item.\n\t */\n\tprivate readonly _idProperty: string;\n\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\tprivate _bindToCollection?: Collection<any> | null;\n\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\tprivate readonly _bindToExternalToInternalMap: WeakMap<any, T>;\n\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\tprivate readonly _bindToInternalToExternalMap: WeakMap<T, any>;\n\n\t/**\n\t * Stores indexes of skipped items from bound external collection.\n\t */\n\tprivate _skippedIndexesFromExternal: Array<number>;\n\n\t/**\n\t * Creates a new Collection instance.\n\t *\n\t * You can pass a configuration object as the argument of the constructor:\n\t *\n\t * ```ts\n\t * const emptyCollection = new Collection<{ name: string }>( { idProperty: 'name' } );\n\t * emptyCollection.add( { name: 'John' } );\n\t * console.log( collection.get( 'John' ) ); // -> { name: 'John' }\n\t * ```\n\t *\n\t * The collection is empty by default. You can add new items using the {@link #add} method:\n\t *\n\t * ```ts\n\t * const collection = new Collection<{ id: string }>();\n\t *\n\t * collection.add( { id: 'John' } );\n\t * console.log( collection.get( 0 ) ); // -> { id: 'John' }\n\t * ```\n\t *\n\t * @label NO_ITEMS\n\t * @param options The options object.\n\t * @param options.idProperty The name of the property which is used to identify an item.\n\t * Items that do not have such a property will be assigned one when added to the collection.\n\t */\n\tconstructor( options?: { readonly idProperty?: string } );\n\n\t/**\n\t * Creates a new Collection instance with specified initial items.\n\t *\n\t * ```ts\n\t * const collection = new Collection<{ id: string }>( [ { id: 'John' }, { id: 'Mike' } ] );\n\t *\n\t * console.log( collection.get( 0 ) ); // -> { id: 'John' }\n\t * console.log( collection.get( 1 ) ); // -> { id: 'Mike' }\n\t * console.log( collection.get( 'Mike' ) ); // -> { id: 'Mike' }\n\t * ```\n\t *\n\t * You can always pass a configuration object as the last argument of the constructor:\n\t *\n\t * ```ts\n\t * const nonEmptyCollection = new Collection<{ name: string }>( [ { name: 'John' } ], { idProperty: 'name' } );\n\t * nonEmptyCollection.add( { name: 'George' } );\n\t * console.log( collection.get( 'George' ) ); // -> { name: 'George' }\n\t * console.log( collection.get( 'John' ) ); // -> { name: 'John' }\n\t * ```\n\t *\n\t * @label INITIAL_ITEMS\n\t * @param initialItems The initial items of the collection.\n\t * @param options The options object.\n\t * @param options.idProperty The name of the property which is used to identify an item.\n\t * Items that do not have such a property will be assigned one when added to the collection.\n\t */\n\tconstructor( initialItems: Iterable<T>, options?: { readonly idProperty?: string } );\n\n\tconstructor(\n\t\tinitialItemsOrOptions: Iterable<T> | { readonly idProperty?: string } = {},\n\t\toptions: { readonly idProperty?: string } = {}\n\t) {\n\t\tsuper();\n\n\t\tconst hasInitialItems = isIterable( initialItemsOrOptions );\n\n\t\tif ( !hasInitialItems ) {\n\t\t\toptions = initialItemsOrOptions;\n\t\t}\n\n\t\tthis._items = [];\n\t\tthis._itemMap = new Map();\n\t\tthis._idProperty = options.idProperty || 'id';\n\t\tthis._bindToExternalToInternalMap = new WeakMap();\n\t\tthis._bindToInternalToExternalMap = new WeakMap();\n\t\tthis._skippedIndexesFromExternal = [];\n\n\t\t// Set the initial content of the collection (if provided in the constructor).\n\t\tif ( hasInitialItems ) {\n\t\t\tfor ( const item of initialItemsOrOptions ) {\n\t\t\t\tthis._items.push( item );\n\t\t\t\tthis._itemMap.set( this._getItemIdBeforeAdding( item ), item );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The number of items available in the collection.\n\t */\n\tpublic get length(): number {\n\t\treturn this._items.length;\n\t}\n\n\t/**\n\t * Returns the first item from the collection or null when collection is empty.\n\t */\n\tpublic get first(): T | null {\n\t\treturn this._items[ 0 ] || null;\n\t}\n\n\t/**\n\t * Returns the last item from the collection or null when collection is empty.\n\t */\n\tpublic get last(): T | null {\n\t\treturn this._items[ this.length - 1 ] || null;\n\t}\n\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\tpublic add( item: T, index?: number ): this {\n\t\treturn this.addMany( [ item ], index );\n\t}\n\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\tpublic addMany( items: Iterable<T>, index?: number ): this {\n\t\tif ( index === undefined ) {\n\t\t\tindex = this._items.length;\n\t\t} else if ( index > this._items.length || index < 0 ) {\n\t\t\t/**\n\t\t\t * The `index` passed to {@link module:utils/collection~Collection#addMany `Collection#addMany()`}\n\t\t\t * is invalid. It must be a number between 0 and the collection's length.\n\t\t\t *\n\t\t\t * @error collection-add-item-invalid-index\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-add-item-invalid-index', this );\n\t\t}\n\n\t\tlet offset = 0;\n\n\t\tfor ( const item of items ) {\n\t\t\tconst itemId = this._getItemIdBeforeAdding( item );\n\t\t\tconst currentItemIndex = index + offset;\n\n\t\t\tthis._items.splice( currentItemIndex, 0, item );\n\t\t\tthis._itemMap.set( itemId, item );\n\n\t\t\tthis.fire<CollectionAddEvent<T>>( 'add', item, currentItemIndex );\n\n\t\t\toffset++;\n\t\t}\n\n\t\tthis.fire<CollectionChangeEvent<T>>( 'change', {\n\t\t\tadded: items,\n\t\t\tremoved: [],\n\t\t\tindex\n\t\t} );\n\n\t\treturn this;\n\t}\n\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\tpublic get( idOrIndex: string | number ): T | null {\n\t\tlet item: T | undefined;\n\n\t\tif ( typeof idOrIndex == 'string' ) {\n\t\t\titem = this._itemMap.get( idOrIndex );\n\t\t} else if ( typeof idOrIndex == 'number' ) {\n\t\t\titem = this._items[ idOrIndex ];\n\t\t} else {\n\t\t\t/**\n\t\t\t * An index or ID must be given.\n\t\t\t *\n\t\t\t * @error collection-get-invalid-arg\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-get-invalid-arg', this );\n\t\t}\n\n\t\treturn item || null;\n\t}\n\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\tpublic has( itemOrId: T | string ): boolean {\n\t\tif ( typeof itemOrId == 'string' ) {\n\t\t\treturn this._itemMap.has( itemOrId );\n\t\t} else { // Object\n\t\t\tconst idProperty = this._idProperty;\n\t\t\tconst id = itemOrId[ idProperty ];\n\n\t\t\treturn id && this._itemMap.has( id );\n\t\t}\n\t}\n\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\tpublic getIndex( itemOrId: T | string ): number {\n\t\tlet item: T | undefined;\n\n\t\tif ( typeof itemOrId == 'string' ) {\n\t\t\titem = this._itemMap.get( itemOrId );\n\t\t} else {\n\t\t\titem = itemOrId;\n\t\t}\n\n\t\treturn item ? this._items.indexOf( item ) : -1;\n\t}\n\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\tpublic remove( subject: T | number | string ): T {\n\t\tconst [ item, index ] = this._remove( subject );\n\n\t\tthis.fire<CollectionChangeEvent<T>>( 'change', {\n\t\t\tadded: [],\n\t\t\tremoved: [ item ],\n\t\t\tindex\n\t\t} );\n\n\t\treturn item;\n\t}\n\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\tpublic map<U>(\n\t\tcallback: ( item: T, index: number ) => U,\n\t\tctx?: any\n\t): Array<U> {\n\t\treturn this._items.map( callback, ctx );\n\t}\n\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\tpublic forEach(\n\t\tcallback: ( item: T, index: number ) => unknown,\n\t\tctx?: any\n\t): void {\n\t\tthis._items.forEach( callback, ctx );\n\t}\n\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\tpublic find(\n\t\tcallback: ( item: T, index: number ) => boolean,\n\t\tctx?: any\n\t): T | undefined {\n\t\treturn this._items.find( callback, ctx );\n\t}\n\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\tpublic filter(\n\t\tcallback: ( item: T, index: number ) => boolean,\n\t\tctx?: any\n\t): Array<T> {\n\t\treturn this._items.filter( callback, ctx );\n\t}\n\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\tpublic clear(): void {\n\t\tif ( this._bindToCollection ) {\n\t\t\tthis.stopListening( this._bindToCollection );\n\t\t\tthis._bindToCollection = null;\n\t\t}\n\n\t\tconst removedItems = Array.from( this._items );\n\n\t\twhile ( this.length ) {\n\t\t\tthis._remove( 0 );\n\t\t}\n\n\t\tthis.fire<CollectionChangeEvent<T>>( 'change', {\n\t\t\tadded: [],\n\t\t\tremoved: removedItems,\n\t\t\tindex: 0\n\t\t} );\n\t}\n\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\tpublic bindTo<S extends Record<string, any>>(\n\t\texternalCollection: Collection<S>\n\t): CollectionBindToChain<S, T> {\n\t\tif ( this._bindToCollection ) {\n\t\t\t/**\n\t\t\t * The collection cannot be bound more than once.\n\t\t\t *\n\t\t\t * @error collection-bind-to-rebind\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-bind-to-rebind', this );\n\t\t}\n\n\t\tthis._bindToCollection = externalCollection;\n\n\t\treturn {\n\t\t\tas: Class => {\n\t\t\t\tthis._setUpBindToBinding<S>( item => new Class( item ) );\n\t\t\t},\n\n\t\t\tusing: callbackOrProperty => {\n\t\t\t\tif ( typeof callbackOrProperty == 'function' ) {\n\t\t\t\t\tthis._setUpBindToBinding<S>( callbackOrProperty );\n\t\t\t\t} else {\n\t\t\t\t\tthis._setUpBindToBinding<S>( item => item[ callbackOrProperty ] );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\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\tprivate _setUpBindToBinding<S>( factory: ( item: S ) => T | null ): void {\n\t\tconst externalCollection = this._bindToCollection!;\n\n\t\t// Adds the item to the collection once a change has been done to the external collection.\n\t\tconst addItem = ( evt: unknown, externalItem: S, index: number ) => {\n\t\t\tconst isExternalBoundToThis = externalCollection._bindToCollection == this;\n\t\t\tconst externalItemBound = externalCollection._bindToInternalToExternalMap.get( externalItem );\n\n\t\t\t// If an external collection is bound to this collection, which makes it a 2–way binding,\n\t\t\t// and the particular external collection item is already bound, don't add it here.\n\t\t\t// The external item has been created **out of this collection's item** and (re)adding it will\n\t\t\t// cause a loop.\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\n\t\t\t\t// When there is no item we need to remember skipped index first and then we can skip this item.\n\t\t\t\tif ( !item ) {\n\t\t\t\t\tthis._skippedIndexesFromExternal.push( index );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Lets try to put item at the same index as index in external collection\n\t\t\t\t// but when there are a skipped items in one or both collections we need to recalculate this index.\n\t\t\t\tlet finalIndex = index;\n\n\t\t\t\t// When we try to insert item after some skipped items from external collection we need\n\t\t\t\t// to include this skipped items and decrease index.\n\t\t\t\t//\n\t\t\t\t// For the following example:\n\t\t\t\t// external -> [ 'A', 'B - skipped for internal', 'C - skipped for internal' ]\n\t\t\t\t// internal -> [ A ]\n\t\t\t\t//\n\t\t\t\t// Another item is been added at the end of external collection:\n\t\t\t\t// external.add( 'D' )\n\t\t\t\t// external -> [ 'A', 'B - skipped for internal', 'C - skipped for internal', 'D' ]\n\t\t\t\t//\n\t\t\t\t// We can't just add 'D' to internal at the same index as index in external because\n\t\t\t\t// this will produce empty indexes what is invalid:\n\t\t\t\t// internal -> [ 'A', empty, empty, 'D' ]\n\t\t\t\t//\n\t\t\t\t// So we need to include skipped items and decrease index\n\t\t\t\t// internal -> [ 'A', 'D' ]\n\t\t\t\tfor ( const skipped of this._skippedIndexesFromExternal ) {\n\t\t\t\t\tif ( index > skipped ) {\n\t\t\t\t\t\tfinalIndex--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// We need to take into consideration that external collection could skip some items from\n\t\t\t\t// internal collection.\n\t\t\t\t//\n\t\t\t\t// For the following example:\n\t\t\t\t// internal -> [ 'A', 'B - skipped for external', 'C - skipped for external' ]\n\t\t\t\t// external -> [ A ]\n\t\t\t\t//\n\t\t\t\t// Another item is been added at the end of external collection:\n\t\t\t\t// external.add( 'D' )\n\t\t\t\t// external -> [ 'A', 'D' ]\n\t\t\t\t//\n\t\t\t\t// We need to include skipped items and place new item after them:\n\t\t\t\t// internal -> [ 'A', 'B - skipped for external', 'C - skipped for external', 'D' ]\n\t\t\t\tfor ( const skipped of externalCollection._skippedIndexesFromExternal ) {\n\t\t\t\t\tif ( finalIndex >= skipped ) {\n\t\t\t\t\t\tfinalIndex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\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\n\t\t\t\t// After adding new element to internal collection we need update indexes\n\t\t\t\t// of skipped items in external collection.\n\t\t\t\tfor ( let i = 0; i < externalCollection._skippedIndexesFromExternal.length; i++ ) {\n\t\t\t\t\tif ( finalIndex <= externalCollection._skippedIndexesFromExternal[ i ] ) {\n\t\t\t\t\t\texternalCollection._skippedIndexesFromExternal[ i ]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Load the initial content of the collection.\n\t\tfor ( const externalItem of externalCollection ) {\n\t\t\taddItem( null, externalItem, externalCollection.getIndex( externalItem ) );\n\t\t}\n\n\t\t// Synchronize the with collection as new items are added.\n\t\tthis.listenTo<CollectionAddEvent<S>>( externalCollection, 'add', addItem );\n\n\t\t// Synchronize the with collection as new items are removed.\n\t\tthis.listenTo<CollectionRemoveEvent<S>>( externalCollection, 'remove', ( evt, externalItem, index ) => {\n\t\t\tconst item = this._bindToExternalToInternalMap.get( externalItem );\n\n\t\t\tif ( item ) {\n\t\t\t\tthis.remove( item );\n\t\t\t}\n\n\t\t\t// After removing element from external collection we need update/remove indexes\n\t\t\t// of skipped items in internal collection.\n\t\t\tthis._skippedIndexesFromExternal = this._skippedIndexesFromExternal.reduce( ( result, skipped ) => {\n\t\t\t\tif ( index < skipped ) {\n\t\t\t\t\tresult.push( skipped - 1 );\n\t\t\t\t}\n\n\t\t\t\tif ( index > skipped ) {\n\t\t\t\t\tresult.push( skipped );\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}, [] as Array<number> );\n\t\t} );\n\t}\n\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\tprivate _getItemIdBeforeAdding( item: any ): string {\n\t\tconst idProperty = this._idProperty;\n\t\tlet itemId: string | undefined;\n\n\t\tif ( ( idProperty in item ) ) {\n\t\t\titemId = item[ idProperty ];\n\n\t\t\tif ( typeof itemId != 'string' ) {\n\t\t\t\t/**\n\t\t\t\t * This item's ID should be a string.\n\t\t\t\t *\n\t\t\t\t * @error collection-add-invalid-id\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'collection-add-invalid-id', this );\n\t\t\t}\n\n\t\t\tif ( this.get( itemId ) ) {\n\t\t\t\t/**\n\t\t\t\t * This item already exists in the collection.\n\t\t\t\t *\n\t\t\t\t * @error collection-add-item-already-exists\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'collection-add-item-already-exists', this );\n\t\t\t}\n\t\t} else {\n\t\t\titem[ idProperty ] = itemId = uid();\n\t\t}\n\n\t\treturn itemId;\n\t}\n\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\tprivate _remove( subject: T | number | string ): [ item: T, index: number ] {\n\t\tlet index: number, id: string, item: T;\n\t\tlet itemDoesNotExist;\n\t\tconst idProperty = this._idProperty;\n\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\n\t\t\tif ( item ) {\n\t\t\t\tindex = this._items.indexOf( item );\n\t\t\t}\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\n\t\t\tif ( item ) {\n\t\t\t\tid = item[ idProperty ]!;\n\t\t\t}\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\n\t\tif ( itemDoesNotExist ) {\n\t\t\t/**\n\t\t\t * Item not found.\n\t\t\t *\n\t\t\t * @error collection-remove-404\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'collection-remove-404', this );\n\t\t}\n\n\t\tthis._items.splice( index!, 1 );\n\t\tthis._itemMap.delete( id! );\n\n\t\tconst externalItem = this._bindToInternalToExternalMap.get( item );\n\t\tthis._bindToInternalToExternalMap.delete( item );\n\t\tthis._bindToExternalToInternalMap.delete( externalItem );\n\n\t\tthis.fire<CollectionRemoveEvent<T>>( 'remove', item, index! );\n\n\t\treturn [ item, index! ];\n\t}\n\n\t/**\n\t * Iterable interface.\n\t */\n\tpublic [ Symbol.iterator ](): Iterator<T> {\n\t\treturn this._items[ Symbol.iterator ]();\n\t}\n}\n\n/**\n * Fired when an item is added to the collection.\n *\n * @eventName ~Collection#add\n * @param item The added item.\n * @param index An index where the addition occurred.\n */\nexport type CollectionAddEvent<T = any> = {\n\tname: 'add';\n\targs: [ item: T, index: number ];\n};\n\n/**\n * Fired when the collection was changed due to adding or removing items.\n *\n * @eventName ~Collection#change\n * @param data Changed items.\n */\nexport type CollectionChangeEvent<T = any> = {\n\tname: 'change';\n\targs: [ data: CollectionChangeEventData<T> ];\n};\n\n/**\n * A structure describing the {@link ~Collection#event:change `Collection#change`} event.\n */\nexport type CollectionChangeEventData<T = any> = {\n\n\t/**\n\t * A list of added items.\n\t */\n\tadded: Iterable<T>;\n\n\t/**\n\t * A list of removed items.\n\t */\n\tremoved: Iterable<T>;\n\n\t/**\n\t * An index where the addition or removal occurred.\n\t */\n\tindex: number;\n};\n\n/**\n * Fired when an item is removed from the collection.\n *\n * @eventName ~Collection#remove\n * @param item The removed item.\n * @param index Index from which item was removed.\n */\nexport type CollectionRemoveEvent<T = any> = {\n\tname: 'remove';\n\targs: [ item: T, index: number ];\n};\n\n/**\n * An object returned by the {@link module:utils/collection~Collection#bindTo `bindTo()`} method\n * providing functions that specify the type of the binding.\n *\n * See the {@link module:utils/collection~Collection#bindTo `bindTo()`} documentation for examples.\n */\nexport interface CollectionBindToChain<S, T> {\n\n\t/**\n\t * Creates the class factory binding in which items of the source collection are passed to\n\t * the constructor of the specified class.\n\t *\n\t * @param Class The class constructor used to create instances in the factory.\n\t */\n\tas( Class: new ( item: S ) => T ): void;\n\n\t/**\n\t * Creates a callback or a property binding.\n\t *\n\t * @param callbackOrProperty When the function is passed, it should return\n\t * the collection items. When the string is provided, the property value is used to create the bound collection items.\n\t */\n\tusing( callbackOrProperty: keyof S | ( ( item: S ) => T | null ) ): void;\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/**\n * @module utils/first\n */\n\n/**\n * Returns first item of the given `iterator`.\n */\nexport function first<T>( iterator: Iterator<T> ): T | null {\n\tconst iteratorItem = iterator.next();\n\n\tif ( iteratorItem.done ) {\n\t\treturn null;\n\t}\n\n\treturn iteratorItem.value;\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/**\n * @module utils/nth\n */\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 */\nexport function nth<T>( index: number, iterable: Iterable<T> ): T | null {\n\tfor ( const item of iterable ) {\n\t\tif ( index === 0 ) {\n\t\t\treturn item;\n\t\t}\n\t\tindex -= 1;\n\t}\n\n\treturn null;\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/**\n * @module utils/focustracker\n */\n\nimport { DomEmitterMixin, type DomEmitterMixinConstructor } from './dom/emittermixin.js';\nimport { ObservableMixin, type ObservableMixinConstructor } from './observablemixin.js';\nimport { CKEditorError } from './ckeditorerror.js';\nimport type { View } from '@ckeditor/ckeditor5-ui';\nimport { isElement as _isElement } from 'es-toolkit/compat';\n\nconst FocusTrackerBase: DomEmitterMixinConstructor<ObservableMixinConstructor> =\n\t/* #__PURE__ */ DomEmitterMixin( /* #__PURE__ */ ObservableMixin() );\n\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 */\nexport class FocusTracker extends FocusTrackerBase {\n\t/**\n\t * True when one of the registered {@link #elements} or {@link #externalViews} is focused.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isFocused: boolean;\n\n\t/**\n\t * The currently focused element.\n\t *\n\t * While {@link #isFocused `isFocused`} remains `true`, the focus can move between different UI elements. This property tracks those\n\t * elements and tells which one is currently focused.\n\t *\n\t * **Note**: The values of this property are restricted to {@link #elements} or {@link module:ui/view~View#element elements}\n\t * registered in {@link #externalViews}.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public focusedElement: Element | null;\n\n\t/**\n\t * List of registered DOM elements.\n\t *\n\t * @internal\n\t */\n\tpublic _elements: Set<Element> = new Set();\n\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\tpublic _externalViews: Set<ViewWithFocusTracker> = new Set();\n\n\t/**\n\t * Asynchronous blur event timeout.\n\t */\n\tprivate _blurTimeout: ReturnType<typeof setTimeout> | null = null;\n\n\t// @if CK_DEBUG_FOCUSTRACKER // public _label?: string;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'focusedElement', null );\n\n\t\t// @if CK_DEBUG_FOCUSTRACKER // FocusTracker._instances.push( this );\n\t}\n\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\tpublic get elements(): Array<Element> {\n\t\treturn Array.from( this._elements.values() );\n\t}\n\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\tpublic get externalViews(): Array<ViewWithFocusTracker> {\n\t\treturn Array.from( this._externalViews.values() );\n\t}\n\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\tpublic add( elementOrView: Element | View ): void {\n\t\tif ( isElement( elementOrView ) ) {\n\t\t\tthis._addElement( elementOrView );\n\t\t} else {\n\t\t\tif ( isViewWithFocusTracker( elementOrView ) ) {\n\t\t\t\tthis._addView( elementOrView );\n\t\t\t} else {\n\t\t\t\tif ( !elementOrView.element ) {\n\t\t\t\t\t/**\n\t\t\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\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\t\t * it to the focus tracker.\n\t\t\t\t\t *\n\t\t\t\t\t * @error focustracker-add-view-missing-element\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'focustracker-add-view-missing-element', {\n\t\t\t\t\t\tfocusTracker: this,\n\t\t\t\t\t\tview: elementOrView\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tthis._addElement( elementOrView.element );\n\t\t\t}\n\t\t}\n\t}\n\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\tpublic remove( elementOrView: Element | View ): void {\n\t\tif ( isElement( elementOrView ) ) {\n\t\t\tthis._removeElement( elementOrView );\n\t\t} else {\n\t\t\tif ( isViewWithFocusTracker( elementOrView ) ) {\n\t\t\t\tthis._removeView( elementOrView );\n\t\t\t} else {\n\t\t\t\t// Assuming that if the view was successfully added, it must have come with an existing #element.\n\t\t\t\tthis._removeElement( elementOrView.element! );\n\t\t\t}\n\t\t}\n\t}\n\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\tprivate _addElement( element: Element ): void {\n\t\tif ( this._elements.has( element ) ) {\n\t\t\t/**\n\t\t\t * This element is already tracked by {@link module:utils/focustracker~FocusTracker}.\n\t\t\t *\n\t\t\t * @error focustracker-add-element-already-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'focustracker-add-element-already-exist', this );\n\t\t}\n\n\t\tthis.listenTo( element, 'focus', () => {\n\t\t\t// @if CK_DEBUG_FOCUSTRACKER // console.log( `\"${ getName( this ) }\": Focus with useCapture on DOM element` );\n\n\t\t\tconst externalFocusedViewInSubtree = this.externalViews.find( view => isExternalViewSubtreeFocused( element, view ) );\n\n\t\t\tif ( externalFocusedViewInSubtree ) {\n\t\t\t\tthis._focus( externalFocusedViewInSubtree.element! );\n\t\t\t} else {\n\t\t\t\tthis._focus( element );\n\t\t\t}\n\t\t}, { useCapture: true } );\n\n\t\tthis.listenTo( element, 'blur', () => {\n\t\t\t// @if CK_DEBUG_FOCUSTRACKER // console.log( `\"${ getName( this ) }\": Blur with useCapture on DOM element` );\n\n\t\t\tthis._blur();\n\t\t}, { useCapture: true } );\n\n\t\tthis._elements.add( element );\n\t}\n\n\t/**\n\t * Removes a DOM element from the focus tracker.\n\t */\n\tprivate _removeElement( element: Element ): void {\n\t\tif ( this._elements.has( element ) ) {\n\t\t\tthis.stopListening( element );\n\t\t\tthis._elements.delete( element );\n\t\t}\n\n\t\tif ( element === this.focusedElement ) {\n\t\t\tthis._blur();\n\t\t}\n\t}\n\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\tprivate _addView( view: ViewWithFocusTracker ): void {\n\t\tif ( view.element ) {\n\t\t\tthis._addElement( view.element );\n\t\t}\n\n\t\tthis.listenTo( view.focusTracker, 'change:focusedElement', () => {\n\t\t\t// @if CK_DEBUG_FOCUSTRACKER // console.log(\n\t\t\t// @if CK_DEBUG_FOCUSTRACKER // \t`\"${ getName( this ) }\": Related \"${ getName( view.focusTracker ) }\"#focusedElement = `,\n\t\t\t// @if CK_DEBUG_FOCUSTRACKER // \tview.focusTracker.focusedElement\n\t\t\t// @if CK_DEBUG_FOCUSTRACKER // );\n\n\t\t\tif ( view.focusTracker.focusedElement ) {\n\t\t\t\tif ( view.element ) {\n\t\t\t\t\tthis._focus( view.element );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._blur();\n\t\t\t}\n\t\t} );\n\n\t\tthis._externalViews.add( view );\n\t}\n\n\t/**\n\t * Removes an external {@link module:ui/view~View view instance} from this focus tracker.\n\t */\n\tprivate _removeView( view: ViewWithFocusTracker ): void {\n\t\tif ( view.element ) {\n\t\t\tthis._removeElement( view.element );\n\t\t}\n\n\t\tthis.stopListening( view.focusTracker );\n\t\tthis._externalViews.delete( view );\n\t}\n\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\tpublic destroy(): void {\n\t\tthis.stopListening();\n\n\t\tthis._elements.clear();\n\t\tthis._externalViews.clear();\n\n\t\tthis.isFocused = false;\n\t\tthis.focusedElement = null;\n\t}\n\n\t/**\n\t * Stores currently focused element as {@link #focusedElement} and sets {@link #isFocused} `true`.\n\t */\n\tprivate _focus( element: Element ): void {\n\t\t// @if CK_DEBUG_FOCUSTRACKER // console.log( `\"${ getName( this ) }\": _focus() on element`, element );\n\n\t\tthis._clearBlurTimeout();\n\n\t\tthis.focusedElement = element;\n\t\tthis.isFocused = true;\n\t}\n\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\tprivate _blur(): void {\n\t\tconst isAnyElementFocused = this.elements.find( element => element.contains( document.activeElement ) );\n\n\t\t// Avoid blurs originating from external FTs when the focus still remains in one of the #elements.\n\t\tif ( isAnyElementFocused ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isAnyExternalViewFocused = this.externalViews.find( view => {\n\t\t\t// Do not consider external views's focus trackers as focused if there's a blur timeout pending.\n\t\t\treturn view.focusTracker.isFocused && !view.focusTracker._blurTimeout;\n\t\t} );\n\n\t\t// Avoid unnecessary DOM blurs coming from #elements when the focus still remains in one of #externalViews.\n\t\tif ( isAnyExternalViewFocused ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._clearBlurTimeout();\n\n\t\tthis._blurTimeout = setTimeout( () => {\n\t\t\t// @if CK_DEBUG_FOCUSTRACKER // console.log( `\"${ getName( this ) }\": Blur.` );\n\n\t\t\tthis.focusedElement = null;\n\t\t\tthis.isFocused = false;\n\t\t}, 0 );\n\t}\n\n\t/**\n\t * Clears the asynchronous blur event timeout on demand. See {@link #_blur} to learn more.\n\t */\n\tprivate _clearBlurTimeout(): void {\n\t\tclearTimeout( this._blurTimeout! );\n\t\tthis._blurTimeout = null;\n\t}\n\n\t// @if CK_DEBUG_FOCUSTRACKER // public static _instances: Array<FocusTracker> = [];\n}\n\n/**\n * A {@link module:ui/view~View} instance with a {@link module:utils/focustracker~FocusTracker} instance exposed\n * at the `#focusTracker` property.\n */\nexport type ViewWithFocusTracker = View & { focusTracker: FocusTracker };\n\n/**\n * Checks whether a view is an instance of {@link ~ViewWithFocusTracker}.\n */\nexport function isViewWithFocusTracker( view: any ): view is ViewWithFocusTracker {\n\treturn 'focusTracker' in view && view.focusTracker instanceof FocusTracker;\n}\n\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\n}\n\nfunction isExternalViewSubtreeFocused( subTreeRoot: Element, view: ViewWithFocusTracker ): boolean {\n\tif ( isFocusedView( subTreeRoot, view ) ) {\n\t\treturn true;\n\t}\n\n\treturn !!view.focusTracker.externalViews.find( view => isFocusedView( subTreeRoot, view ) );\n}\n\nfunction isFocusedView( subTreeRoot: Element, view: View ): boolean {\n\t// Note: You cannot depend on externalView.focusTracker.focusedElement because blurs are asynchronous and the value may\n\t// be outdated when moving focus between two elements. Using document.activeElement instead.\n\treturn !!view.element && view.element.contains( document.activeElement ) && subTreeRoot.contains( view.element );\n}\n\n// @if CK_DEBUG_FOCUSTRACKER // declare global {\n// @if CK_DEBUG_FOCUSTRACKER // \tinterface Window {\n// @if CK_DEBUG_FOCUSTRACKER // \t\tlogFocusTrackers: Function;\n// @if CK_DEBUG_FOCUSTRACKER // \t}\n// @if CK_DEBUG_FOCUSTRACKER // }\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // function getName( focusTracker: FocusTracker ): string {\n// @if CK_DEBUG_FOCUSTRACKER // \treturn focusTracker._label || 'Unknown';\n// @if CK_DEBUG_FOCUSTRACKER // }\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // function logState(\n// @if CK_DEBUG_FOCUSTRACKER // \tfocusTracker: FocusTracker,\n// @if CK_DEBUG_FOCUSTRACKER // \tkeysToLog: Array<string> = [ 'isFocused', 'focusedElement' ]\n// @if CK_DEBUG_FOCUSTRACKER // ): string {\n// @if CK_DEBUG_FOCUSTRACKER // \tkeysToLog.forEach( key => { console.log( `${ key }=`, focusTracker[ key ] ) } );\n// @if CK_DEBUG_FOCUSTRACKER // \tconsole.log( 'elements', focusTracker.elements );\n// @if CK_DEBUG_FOCUSTRACKER // \tconsole.log( 'externalViews', focusTracker.externalViews );\n// @if CK_DEBUG_FOCUSTRACKER // }\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // window.logFocusTrackers = (\n// @if CK_DEBUG_FOCUSTRACKER // \tfilter = () => true,\n// @if CK_DEBUG_FOCUSTRACKER // \tkeysToLog: Array<string>\n// @if CK_DEBUG_FOCUSTRACKER // ): void => {\n// @if CK_DEBUG_FOCUSTRACKER // \tconsole.group( 'FocusTrackers' );\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // \tfor ( const focusTracker of FocusTracker._instances ) {\n// @if CK_DEBUG_FOCUSTRACKER // \t\tif ( filter( focusTracker ) ) {\n// @if CK_DEBUG_FOCUSTRACKER // \t\t\tconsole.group( `\"${ getName( focusTracker ) }\"` );\n// @if CK_DEBUG_FOCUSTRACKER // \t\t\tlogState( focusTracker, keysToLog );\n// @if CK_DEBUG_FOCUSTRACKER // \t\t\tconsole.groupEnd();\n// @if CK_DEBUG_FOCUSTRACKER // \t\t}\n// @if CK_DEBUG_FOCUSTRACKER // \t}\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // \tconsole.groupEnd();\n// @if CK_DEBUG_FOCUSTRACKER // };\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // window.logFocusTrackerTree = (\n// @if CK_DEBUG_FOCUSTRACKER // \trootFocusTracker: FocusTracker,\n// @if CK_DEBUG_FOCUSTRACKER // \tfilter = () => true,\n// @if CK_DEBUG_FOCUSTRACKER // \tkeysToLog: Array<string>\n// @if CK_DEBUG_FOCUSTRACKER // ): void => {\n// @if CK_DEBUG_FOCUSTRACKER // \tconsole.group( 'FocusTrackers tree' );\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // \tlogBranch( rootFocusTracker, filter );\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // \tfunction logBranch( focusTracker, filter ) {\n// @if CK_DEBUG_FOCUSTRACKER // \t\tconsole.group( `\"${ getName( focusTracker ) }\"` );\n// @if CK_DEBUG_FOCUSTRACKER // \t\tlogState( focusTracker, keysToLog );\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // \t\tfor ( const externalView of focusTracker.externalViews ) {\n// @if CK_DEBUG_FOCUSTRACKER // \t\t\tif ( filter( externalView.focusTracker ) ) {\n// @if CK_DEBUG_FOCUSTRACKER // \t\t\t\tlogBranch( externalView.focusTracker, filter );\n// @if CK_DEBUG_FOCUSTRACKER // \t\t\t}\n// @if CK_DEBUG_FOCUSTRACKER // \t\t}\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // \t\tconsole.groupEnd();\n// @if CK_DEBUG_FOCUSTRACKER // \t}\n// @if CK_DEBUG_FOCUSTRACKER //\n// @if CK_DEBUG_FOCUSTRACKER // \tconsole.groupEnd();\n// @if CK_DEBUG_FOCUSTRACKER // };\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/**\n * @module utils/keystrokehandler\n */\n\nimport { DomEmitterMixin, type DomEmitter } from './dom/emittermixin.js';\nimport type { Emitter } from './emittermixin.js';\nimport { getCode, parseKeystroke, type KeystrokeInfo } from './keyboard.js';\nimport type { PriorityString } from './priorities.js';\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 */\nexport class KeystrokeHandler {\n\t/**\n\t * Listener used to listen to events for easier keystroke handler destruction.\n\t */\n\tprivate readonly _listener: DomEmitter;\n\n\t/**\n\t * Creates an instance of the keystroke handler.\n\t */\n\tconstructor() {\n\t\tthis._listener = new ( DomEmitterMixin() )();\n\t}\n\n\t/**\n\t * Starts listening for `keydown` events from a given emitter.\n\t */\n\tpublic listenTo( emitter: Emitter | HTMLElement | Window ): void {\n\t\t// The #_listener works here as a kind of dispatcher. It groups the events coming from the same\n\t\t// keystroke so the listeners can be attached to them with different priorities.\n\t\t//\n\t\t// E.g. all the keystrokes with the `keyCode` of 42 coming from the `emitter` are propagated\n\t\t// as a `_keydown:42` event by the `_listener`. If there's a callback created by the `set`\n\t\t// method for this 42 keystroke, it listens to the `_listener#_keydown:42` event only and interacts\n\t\t// only with other listeners of this particular event, thus making it possible to prioritize\n\t\t// the listeners and safely cancel execution, when needed. Instead of duplicating the Emitter logic,\n\t\t// the KeystrokeHandler re–uses it to do its job.\n\t\tthis._listener.listenTo( emitter as HTMLElement | Window, 'keydown', ( evt, keyEvtData ) => {\n\t\t\tthis._listener.fire( '_keydown:' + getCode( keyEvtData ), keyEvtData );\n\t\t} );\n\t}\n\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\tpublic set(\n\t\tkeystroke: string | ReadonlyArray<string | number>,\n\t\tcallback: ( ev: KeyboardEvent, cancel: () => void ) => void,\n\t\toptions: KeystrokeHandlerOptions = {}\n\t): void {\n\t\tconst keyCode = parseKeystroke( keystroke );\n\t\tconst priority = options.priority;\n\n\t\t// Execute the passed callback on KeystrokeHandler#_keydown.\n\t\t// TODO: https://github.com/ckeditor/ckeditor5-utils/issues/144\n\t\tthis._listener.listenTo( this._listener, '_keydown:' + keyCode, ( evt, keyEvtData: KeyboardEvent ) => {\n\t\t\tif ( options.filter && !options.filter( keyEvtData ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcallback( keyEvtData, () => {\n\t\t\t\t// Stop the event in the DOM: no listener in the web page\n\t\t\t\t// will be triggered by this event.\n\t\t\t\tkeyEvtData.preventDefault();\n\t\t\t\tkeyEvtData.stopPropagation();\n\n\t\t\t\t// Stop the event in the KeystrokeHandler: no more callbacks\n\t\t\t\t// will be executed for this keystroke.\n\t\t\t\tevt.stop();\n\t\t\t} );\n\n\t\t\t// Mark this keystroke as handled by the callback. See: #press.\n\t\t\tevt.return = true;\n\t\t}, { priority } );\n\t}\n\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\tpublic press( keyEvtData: Readonly<KeystrokeInfo> ): boolean {\n\t\treturn !!this._listener.fire( '_keydown:' + getCode( keyEvtData ), keyEvtData );\n\t}\n\n\t/**\n\t * Stops listening to `keydown` events from the given emitter.\n\t */\n\tpublic stopListening( emitter?: Emitter | HTMLElement | Window ): void {\n\t\tthis._listener.stopListening( emitter );\n\t}\n\n\t/**\n\t * Destroys the keystroke handler.\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\t}\n}\n\n/**\n * {@link module:utils/keystrokehandler~KeystrokeHandler#set} method options.\n */\nexport interface KeystrokeHandlerOptions {\n\n\t/**\n\t * The priority of the keystroke callback. The higher the priority value the sooner the callback will be executed.\n\t * Keystrokes having the same priority are called in the order they were added.\n\t */\n\treadonly priority?: PriorityString;\n\n\t/**\n\t * An optional callback function allowing for filtering keystrokes based on arbitrary criteria.\n\t * The callback function receives `keydown` DOM event as a parameter.\n\t */\n\treadonly filter?: ( keyEvtData: KeyboardEvent ) => boolean;\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/**\n * @module utils/objecttomap\n */\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 */\nexport function objectToMap<T>( obj: { readonly [ key: string ]: T } | null | undefined ): Map<string, T> {\n\tconst map = new Map<string, T>();\n\n\tfor ( const key in obj ) {\n\t\tmap.set( key, obj[ key ] );\n\t}\n\n\treturn map;\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/**\n * @module utils/tomap\n */\n\nimport { objectToMap } from './objecttomap.js';\nimport { isIterable } from './isiterable.js';\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 */\nexport function toMap<T>( data: { readonly [ key: string ]: T } | Iterable<readonly [ string, T ]> | null | undefined ):\nMap<string, T>\n{\n\tif ( isIterable( data ) ) {\n\t\treturn new Map( data );\n\t} else {\n\t\treturn objectToMap( data );\n\t}\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/**\n * @module utils/mapsequal\n */\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 */\nexport function mapsEqual<Key>( mapA: Map<Key, unknown>, mapB: Map<Key, unknown> ): boolean {\n\tif ( mapA.size != mapB.size ) {\n\t\treturn false;\n\t}\n\n\tfor ( const attr of mapA.entries() ) {\n\t\tconst valA = JSON.stringify( attr[ 1 ] );\n\t\tconst valB = JSON.stringify( mapB.get( attr[ 0 ] ) );\n\n\t\tif ( valA !== valB ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\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/**\n * @module utils/wait\n */\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 */\nexport function wait( timeout: number, options: { signal?: AbortSignal } = {} ): Promise<void> {\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst signal = options.signal || ( new AbortController() ).signal;\n\n\t\tsignal.throwIfAborted();\n\n\t\tconst timer = setTimeout( timeoutHandler, timeout );\n\n\t\tsignal.addEventListener( 'abort', abortHandler, { once: true } );\n\n\t\tfunction timeoutHandler() {\n\t\t\tsignal.removeEventListener( 'abort', abortHandler );\n\t\t\tresolve();\n\t\t}\n\n\t\tfunction abortHandler() {\n\t\t\tclearTimeout( timer );\n\t\t\treject( signal.reason );\n\t\t}\n\t} );\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/**\n * @module utils/retry\n */\n\nimport { wait } from './wait.js';\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 */\nexport async function retry<TResult>(\n\tcallback: () => Promise<TResult>,\n\toptions: {\n\t\tmaxAttempts?: number;\n\t\tretryDelay?: ( attempt: number ) => number;\n\t\tsignal?: AbortSignal;\n\t} = {}\n): Promise<TResult> {\n\tconst {\n\t\tmaxAttempts = 4,\n\t\tretryDelay = exponentialDelay(),\n\t\tsignal = ( new AbortController() ).signal\n\t} = options;\n\n\tsignal.throwIfAborted();\n\n\tfor ( let attempt = 0; ; attempt++ ) {\n\t\ttry {\n\t\t\treturn await callback();\n\t\t} catch ( err ) {\n\t\t\tconst isLast = attempt + 1 >= maxAttempts;\n\n\t\t\tif ( isLast ) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t\tawait wait( retryDelay( attempt ), { signal } );\n\t}\n}\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 */\nexport function exponentialDelay(\n\toptions: {\n\t\tdelay?: number;\n\t\tfactor?: number;\n\t\tmaxDelay?: number;\n\t} = {}\n): ( attempt: number ) => number {\n\tconst {\n\t\tdelay = 1000,\n\t\tfactor = 2,\n\t\tmaxDelay = 10000\n\t} = options;\n\n\treturn attempt => Math.min( factor ** attempt * delay, maxDelay );\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/**\n * @module utils/splicearray\n */\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 */\nexport function spliceArray<T>(\n\ttargetArray: Array<T>,\n\tinsertArray: Array<T>,\n\tindex: number\n): void {\n\tconst originalLength = targetArray.length;\n\tconst insertLength = insertArray.length;\n\n\t// Shift elements in the target array to make space for insertArray\n\tfor ( let i = originalLength - 1; i >= index; i-- ) {\n\t\ttargetArray[ i + insertLength ] = targetArray[ i ];\n\t}\n\n\t// Copy elements from insertArray into the target array\n\tfor ( let i = 0; i < insertLength; i++ ) {\n\t\ttargetArray[ index + i ] = insertArray[ i ];\n\t}\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/**\n * @module utils/delay\n */\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 */\nexport function delay<T extends ( ...args: Array<any> ) => any>( func: T, wait: number ): DelayedFunc<T> {\n\tlet timer: ReturnType<typeof setTimeout>;\n\n\tfunction delayed( ...args: Parameters<T> ) {\n\t\tdelayed.cancel();\n\t\ttimer = setTimeout( () => func( ...args ), wait );\n\t}\n\n\tdelayed.cancel = () => {\n\t\tclearTimeout( timer );\n\t};\n\n\treturn delayed;\n}\n\nexport interface DelayedFunc<T extends ( ...args: Array<any> ) => any> {\n\t( ...args: Parameters<T> ): void;\n\tcancel(): void;\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/**\n * @module utils/parsebase64encodedobject\n */\n\n/**\n * Parses a base64-encoded object and returns the decoded object, or null if the decoding was unsuccessful.\n */\nexport function parseBase64EncodedObject( encoded: string ): Record<string, any> | null {\n\ttry {\n\t\tif ( !encoded.startsWith( 'ey' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst decoded = atob( encoded.replace( /-/g, '+' ).replace( /_/g, '/' ) );\n\n\t\treturn JSON.parse( decoded );\n\t} catch {\n\t\treturn null;\n\t}\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/**\n * @module utils/crc32\n */\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(): Array<number> {\n\tconst crcTable: Array<number> = [];\n\n\tfor ( let n = 0; n < 256; n++ ) {\n\t\tlet c: number = n;\n\n\t\tfor ( let k = 0; k < 8; k++ ) {\n\t\t\tif ( c & 1 ) {\n\t\t\t\tc = 0xEDB88320 ^ ( c >>> 1 );\n\t\t\t} else {\n\t\t\t\tc = c >>> 1;\n\t\t\t}\n\t\t}\n\n\t\tcrcTable[ n ] = c;\n\t}\n\n\treturn crcTable;\n}\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 */\nexport function crc32( inputData: CRCData ): string {\n\tconst dataArray = Array.isArray( inputData ) ? inputData : [ inputData ];\n\tconst crcTable: Array<number> = makeCrcTable();\n\tlet crc: number = 0 ^ ( -1 );\n\n\t// Convert data to a single string.\n\tconst dataString: string = dataArray.map( item => {\n\t\tif ( Array.isArray( item ) ) {\n\t\t\treturn item.join( '' );\n\t\t}\n\n\t\treturn String( item );\n\t} ).join( '' );\n\n\t// Calculate the CRC for the resulting string.\n\tfor ( let i = 0; i < dataString.length; i++ ) {\n\t\tconst byte: number = dataString.charCodeAt( i );\n\t\tcrc = ( crc >>> 8 ) ^ crcTable[ ( crc ^ byte ) & 0xFF ];\n\t}\n\n\tcrc = ( crc ^ ( -1 ) ) >>> 0; // Force unsigned integer.\n\n\treturn crc.toString( 16 ).padStart( 8, '0' );\n}\n\n/**\n * The input data for the CRC-32 checksum calculation.\n * Can be a single value (string, number, boolean), an array of strings, or an array of all of the above types.\n */\nexport type CRCData = CRCValue | Array<CRCValue>;\n\nexport type CRCValue = string | number | boolean | Array<string>;\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/**\n * @module utils/collectstylesheets\n */\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 */\nexport async function collectStylesheets( stylesheets?: Array<string> ): Promise<string> {\n\tif ( !stylesheets ) {\n\t\treturn '';\n\t}\n\n\tconst results = await Promise.all(\n\t\tstylesheets.map( async stylesheet => {\n\t\t\tif ( stylesheet === 'EDITOR_STYLES' ) {\n\t\t\t\treturn getEditorStyles();\n\t\t\t}\n\n\t\t\tconst response = await window.fetch( stylesheet );\n\n\t\t\treturn response.text();\n\t\t} )\n\t);\n\n\treturn results.join( ' ' ).trim();\n}\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(): string {\n\tconst editorStyles = [];\n\tconst editorCSSVariables = [];\n\n\tfor ( const styleSheet of Array.from( document.styleSheets ) ) {\n\t\tconst ownerNode = styleSheet.ownerNode as Element;\n\n\t\tif ( ownerNode.hasAttribute( 'data-cke' ) ) {\n\t\t\tfor ( const rule of Array.from( styleSheet.cssRules ) ) {\n\t\t\t\tif ( rule.cssText.indexOf( '.ck-content' ) !== -1 ) {\n\t\t\t\t\teditorStyles.push( rule.cssText );\n\t\t\t\t} else if ( rule.cssText.indexOf( ':root' ) !== -1 ) {\n\t\t\t\t\teditorCSSVariables.push( rule.cssText );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !editorStyles.length ) {\n\t\tconsole.warn(\n\t\t\t'The editor stylesheet could not be found in the document. ' +\n\t\t\t'Check your webpack config - style-loader should use data-cke=true attribute for the editor stylesheet.'\n\t\t);\n\t}\n\n\t// We want to trim the returned value in case of `[ \"\", \"\", ... ]`.\n\treturn [ ...editorCSSVariables, ...editorStyles ].join( ' ' ).trim();\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/**\n * @module utils/formathtml\n */\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 */\nexport function formatHtml( input: string ): string {\n\t// A list of block-like elements around which the new lines should be inserted, and within which\n\t// the indentation of their children should be increased.\n\t// The list is partially based on https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements that contains\n\t// a full list of HTML block-level elements.\n\t// A void element is an element that cannot have any child - https://html.spec.whatwg.org/multipage/syntax.html#void-elements.\n\t// Note that <pre> element is not listed on this list to avoid breaking whitespace formatting.\n\t// Note that <br> element is not listed and handled separately so no additional white spaces are injected.\n\tconst elementsToFormat: Array<FormattedElementDefinition> = [\n\t\t{ name: 'address', isVoid: false },\n\t\t{ name: 'article', isVoid: false },\n\t\t{ name: 'aside', isVoid: false },\n\t\t{ name: 'blockquote', isVoid: false },\n\t\t{ name: 'details', isVoid: false },\n\t\t{ name: 'dialog', isVoid: false },\n\t\t{ name: 'dd', isVoid: false },\n\t\t{ name: 'div', isVoid: false },\n\t\t{ name: 'dl', isVoid: false },\n\t\t{ name: 'dt', isVoid: false },\n\t\t{ name: 'fieldset', isVoid: false },\n\t\t{ name: 'figcaption', isVoid: false },\n\t\t{ name: 'figure', isVoid: false },\n\t\t{ name: 'footer', isVoid: false },\n\t\t{ name: 'form', isVoid: false },\n\t\t{ name: 'h1', isVoid: false },\n\t\t{ name: 'h2', isVoid: false },\n\t\t{ name: 'h3', isVoid: false },\n\t\t{ name: 'h4', isVoid: false },\n\t\t{ name: 'h5', isVoid: false },\n\t\t{ name: 'h6', isVoid: false },\n\t\t{ name: 'header', isVoid: false },\n\t\t{ name: 'hgroup', isVoid: false },\n\t\t{ name: 'hr', isVoid: true },\n\t\t{ name: 'li', isVoid: false },\n\t\t{ name: 'main', isVoid: false },\n\t\t{ name: 'nav', isVoid: false },\n\t\t{ name: 'ol', isVoid: false },\n\t\t{ name: 'p', isVoid: false },\n\t\t{ name: 'section', isVoid: false },\n\t\t{ name: 'table', isVoid: false },\n\t\t{ name: 'tbody', isVoid: false },\n\t\t{ name: 'td', isVoid: false },\n\t\t{ name: 'th', isVoid: false },\n\t\t{ name: 'thead', isVoid: false },\n\t\t{ name: 'tfoot', isVoid: false },\n\t\t{ name: 'tr', isVoid: false },\n\t\t{ name: 'ul', isVoid: false }\n\t];\n\n\tconst elementNamesToFormat = elementsToFormat.map( element => element.name ).join( '|' );\n\n\t// It is not the fastest way to format the HTML markup but the performance should be good enough.\n\tconst lines = input\n\t\t// Add new line before and after `<tag>` and `</tag>`.\n\t\t// It may separate individual elements with two new lines, but this will be fixed below.\n\t\t.replace( new RegExp( `</?(${ elementNamesToFormat })( .*?)?>`, 'g' ), '\\n$&\\n' )\n\t\t// Keep `<br>`s at the end of line to avoid adding additional whitespaces before `<br>`.\n\t\t.replace( /<br[^>]*>/g, '$&\\n' )\n\t\t// Divide input string into lines, which start with either an opening tag, a closing tag, or just a text.\n\t\t.split( '\\n' );\n\n\tlet indentCount = 0;\n\tlet isPreformattedLine: ReturnType<typeof isPreformattedBlockLine> = false;\n\n\treturn lines\n\t\t.map( line => {\n\t\t\tisPreformattedLine = isPreformattedBlockLine( line, isPreformattedLine );\n\n\t\t\t// Ignore empty lines outside a <pre> block.\n\t\t\tif ( !line.length && !isPreformattedLine ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif ( isNonVoidOpeningTag( line, elementsToFormat ) ) {\n\t\t\t\treturn indentLine( line, indentCount++ );\n\t\t\t}\n\n\t\t\tif ( isClosingTag( line, elementsToFormat ) ) {\n\t\t\t\treturn indentLine( line, --indentCount );\n\t\t\t}\n\n\t\t\tif ( isPreformattedLine === 'middle' || isPreformattedLine === 'last' ) {\n\t\t\t\treturn indentLine( line, 0 );\n\t\t\t}\n\n\t\t\treturn indentLine( line, indentCount );\n\t\t} )\n\t\t.join( '' )\n\t\t.trimEnd();\n}\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: string, elementsToFormat: Array<FormattedElementDefinition> ): boolean {\n\treturn elementsToFormat.some( element => {\n\t\tif ( element.isVoid ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !new RegExp( `<${ element.name }( .*?)?>` ).test( line ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n}\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: string, elementsToFormat: Array<FormattedElementDefinition> ): boolean {\n\treturn elementsToFormat.some( element => {\n\t\treturn new RegExp( `</${ element.name }>` ).test( line );\n\t} );\n}\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: string, indentCount: number, indentChar: string = '    ' ): string {\n\t// More about Math.max() here in https://github.com/ckeditor/ckeditor5/issues/10698.\n\treturn `${ indentChar.repeat( Math.max( 0, indentCount ) ) }${ line }\\n`;\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: string, isPreviousLinePreFormatted: 'first' | 'last' | 'middle' | false ) {\n\tconst isPreOpen = /<pre( .*?)?>/.test( line );\n\tconst isPreClose = /<\\/pre>/.test( line );\n\n\tif ( isPreOpen && isPreClose ) {\n\t\t// If both an opening and closing a <pre> tag, no special treatment needed.\n\t\treturn false;\n\t} else if ( isPreOpen ) {\n\t\treturn 'first';\n\t} else if ( isPreClose ) {\n\t\treturn 'last';\n\t} else if ( isPreviousLinePreFormatted === 'first' || isPreviousLinePreFormatted === 'middle' ) {\n\t\t// This line is just after a 'first' or 'middle' line of a multi-line pre-block.\n\t\treturn 'middle';\n\t} else {\n\t\treturn false;\n\t}\n}\n\n/**\n * Element to be formatted.\n */\ninterface FormattedElementDefinition {\n\n\t/**\n\t *  Element name.\n\t */\n\tname: string;\n\n\t/**\n\t *  Flag indicating whether element is a void one.\n\t */\n\tisVoid: boolean;\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/**\n * Set of utils to handle unicode characters.\n *\n * @module utils/unicode\n */\n\n/**\n * Checks whether given `character` is a combining mark.\n *\n * @param character Character to check.\n */\nexport function isCombiningMark( character: string ): boolean {\n\t// eslint-disable-next-line no-misleading-character-class\n\treturn !!character && character.length == 1 && /[\\u0300-\\u036f\\u1ab0-\\u1aff\\u1dc0-\\u1dff\\u20d0-\\u20ff\\ufe20-\\ufe2f]/.test( character );\n}\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 */\nexport function isHighSurrogateHalf( character: string ): boolean {\n\treturn !!character && character.length == 1 && /[\\ud800-\\udbff]/.test( character );\n}\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 */\nexport function isLowSurrogateHalf( character: string ): boolean {\n\treturn !!character && character.length == 1 && /[\\udc00-\\udfff]/.test( character );\n}\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 */\nexport function isInsideSurrogatePair( string: string, offset: number ): boolean {\n\treturn isHighSurrogateHalf( string.charAt( offset - 1 ) ) && isLowSurrogateHalf( string.charAt( offset ) );\n}\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 */\nexport function isInsideCombinedSymbol( string: string, offset: number ): boolean {\n\treturn isCombiningMark( string.charAt( offset ) );\n}\n\nconst EMOJI_PATTERN = /* #__PURE__ */ buildEmojiRegexp();\n\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 */\nexport function isInsideEmojiSequence( string: string, offset: number ): boolean {\n\tconst matches = String( string ).matchAll( EMOJI_PATTERN );\n\n\treturn Array.from( matches ).some( match => match.index! < offset && offset < match.index! + match[ 0 ].length );\n}\n\nfunction buildEmojiRegexp(): RegExp {\n\tconst parts = [\n\t\t// Emoji Tag Sequence (ETS)\n\t\t/\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}/u,\n\n\t\t// Emoji Keycap Sequence\n\t\t/\\p{Emoji}\\u{FE0F}?\\u{20E3}/u,\n\n\t\t// Emoji Presentation Sequence\n\t\t/\\p{Emoji}\\u{FE0F}/u,\n\n\t\t// Single-Character Emoji / Emoji Modifier Sequence\n\t\t/(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*/u\n\t];\n\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\n\treturn new RegExp( sequence, 'ug' );\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/**\n * @module utils/decodelicensekey\n*/\n\nimport { parseBase64EncodedObject } from './parsebase64encodedobject.js';\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 */\nexport function decodeLicenseKey( licenseKey?: string ): Record<string, any> | null {\n\tif ( !licenseKey ) {\n\t\treturn null;\n\t}\n\n\tconst encodedPayload = getLicenseKeyPayload( licenseKey );\n\n\tif ( !encodedPayload ) {\n\t\treturn null;\n\t}\n\n\treturn parseBase64EncodedObject( encodedPayload );\n}\n\nfunction getLicenseKeyPayload( licenseKey: string ): string | null {\n\tconst parts = licenseKey.split( '.' );\n\n\tif ( parts.length != 3 ) {\n\t\treturn null;\n\t}\n\n\treturn parts[ 1 ];\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/**\n * @module utils/isfeatureblockedbylicensekey\n */\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 */\nexport function isFeatureBlockedByLicenseKey( licensePayload: Record<string, any>, licenseFeatureCode: string ): boolean {\n\tconst blockedFeatures = licensePayload.removeFeatures || [];\n\n\treturn blockedFeatures.includes( licenseFeatureCode );\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/**\n * @module utils/parsedimensionwithunit\n */\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 */\nexport function tryParseDimensionWithUnit( dimension: string | null | undefined ): DimensionWithUnit | null {\n\tif ( !dimension ) {\n\t\treturn null;\n\t}\n\n\tconst [ , rawValue, unit ] = dimension.trim().match( /([.,\\d]+)(%|px)$/ ) || [];\n\tconst parsedValue = Number.parseFloat( rawValue );\n\n\tif ( Number.isNaN( parsedValue ) ) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tvalue: parsedValue,\n\t\tunit\n\t};\n}\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 */\nexport function tryCastDimensionsToUnit( parentDimensionPx: number, dimension: DimensionWithUnit, targetUnit: string ): DimensionWithUnit {\n\t// \"%\" -> \"px\" conversion\n\tif ( targetUnit === 'px' ) {\n\t\treturn {\n\t\t\tvalue: dimension.value,\n\t\t\tunit: 'px'\n\t\t};\n\t}\n\n\t// \"px\" -> \"%\" conversion\n\treturn {\n\t\tvalue: dimension.value / parentDimensionPx * 100,\n\t\tunit: '%'\n\t};\n}\n\n/**\n * @internal\n */\nexport type DimensionWithUnit = {\n\tvalue: number;\n\tunit: string;\n};\n", "import { CKEditorError, Collection, DomEmitterMixin, EmitterMixin, EventInfo, ObservableMixin, compareArrays, count, diff, env, fastDiff, first, getAncestors, getCode, global, indexOf, insertAt, isArrowKeyCode, isComment, isInsideCombinedSymbol, isInsideEmojiSequence, isInsideSurrogatePair, isIterable, isNode, isText, isValidAttributeName, keyCodes, logWarning, priorities, remove as remove$1, scrollViewportToShowTarget, spliceArray, toArray, toMap, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { clone, cloneDeep, debounce, extend, get, isEmpty, isEqual, isEqualWith, isObject, isPlainObject, merge, set } 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*/\nconst documentPlaceholders = /* @__PURE__ */ new WeakMap();\nlet hasDisplayedPlaceholderDeprecationWarning = false;\n/**\n* A helper that enables a placeholder on the provided view element (also updates its visibility).\n* The placeholder is a CSS pseudo–element (with a text content) attached to the element.\n*\n* To change the placeholder text, change value of the `placeholder` property in the provided `element`.\n*\n* To disable the placeholder, use {@link module:engine/view/placeholder~disableViewPlaceholder `disableViewPlaceholder()`} helper.\n*\n* @param options Configuration options of the placeholder.\n* @param options.view Editing view instance.\n* @param options.element Element that will gain a placeholder. See `options.isDirectHost` to learn more.\n* @param options.isDirectHost If set `false`, the placeholder will not be enabled directly\n* in the passed `element` but in one of its children (selected automatically, i.e. a first empty child element).\n* Useful when attaching placeholders to elements that can host other elements (not just text), for instance,\n* editable root elements.\n* @param options.text Placeholder text. It's **deprecated** and will be removed soon. Use\n* {@link module:engine/view/placeholder~PlaceholderableViewElement#placeholder `options.element.placeholder`} instead.\n* @param options.keepOnFocus If set `true`, the placeholder stay visible when the host element is focused.\n*/\nfunction enableViewPlaceholder({ view, element, text, isDirectHost = true, keepOnFocus = false }) {\n\tconst doc = view.document;\n\tif (!documentPlaceholders.has(doc)) {\n\t\tdocumentPlaceholders.set(doc, /* @__PURE__ */ new Map());\n\t\tdoc.registerPostFixer((writer) => updateDocumentPlaceholders(documentPlaceholders.get(doc), writer));\n\t\tdoc.on(\"change:isComposing\", () => {\n\t\t\tview.change((writer) => updateDocumentPlaceholders(documentPlaceholders.get(doc), writer));\n\t\t}, { priority: \"high\" });\n\t}\n\tif (element.is(\"editableElement\")) element.on(\"change:placeholder\", (evtInfo, evt, text) => setPlaceholder(text));\n\tif (element.placeholder) setPlaceholder(element.placeholder);\n\telse if (text) setPlaceholder(text);\n\tif (text) showViewPlaceholderTextDeprecationWarning();\n\tfunction setPlaceholder(text) {\n\t\tconst config = {\n\t\t\ttext,\n\t\t\tisDirectHost,\n\t\t\tkeepOnFocus,\n\t\t\thostElement: isDirectHost ? element : null\n\t\t};\n\t\tdocumentPlaceholders.get(doc).set(element, config);\n\t\tview.change((writer) => updateDocumentPlaceholders([[element, config]], writer));\n\t}\n}\n/**\n* Disables the placeholder functionality from a given element.\n*\n* See {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} to learn more.\n*/\nfunction disableViewPlaceholder(view, element) {\n\tconst doc = element.document;\n\tif (!documentPlaceholders.has(doc)) return;\n\tview.change((writer) => {\n\t\tconst placeholders = documentPlaceholders.get(doc);\n\t\tconst config = placeholders.get(element);\n\t\twriter.removeAttribute(\"data-placeholder\", config.hostElement);\n\t\thideViewPlaceholder(writer, config.hostElement);\n\t\tplaceholders.delete(element);\n\t});\n}\n/**\n* Shows a placeholder in the provided element by changing related attributes and CSS classes.\n*\n* **Note**: This helper will not update the placeholder visibility nor manage the\n* it in any way in the future. What it does is a one–time state change of an element. Use\n* {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} and\n* {@link module:engine/view/placeholder~disableViewPlaceholder `disableViewPlaceholder()`} for full\n* placeholder functionality.\n*\n* **Note**: This helper will blindly show the placeholder directly in the root editable element if\n* one is passed, which could result in a visual clash if the editable element has some children\n* (for instance, an empty paragraph). Use {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`}\n* in that case or make sure the correct element is passed to the helper.\n*\n* @returns `true`, if any changes were made to the `element`.\n*/\nfunction showViewPlaceholder(writer, element) {\n\tif (!element.hasClass(\"ck-placeholder\")) {\n\t\twriter.addClass(\"ck-placeholder\", element);\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* Hides a placeholder in the element by changing related attributes and CSS classes.\n*\n* **Note**: This helper will not update the placeholder visibility nor manage the\n* it in any way in the future. What it does is a one–time state change of an element. Use\n* {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} and\n* {@link module:engine/view/placeholder~disableViewPlaceholder `disableViewPlaceholder()`} for full\n* placeholder functionality.\n*\n* @returns `true`, if any changes were made to the `element`.\n*/\nfunction hideViewPlaceholder(writer, element) {\n\tif (element.hasClass(\"ck-placeholder\")) {\n\t\twriter.removeClass(\"ck-placeholder\", element);\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* Checks if a placeholder should be displayed in the element.\n*\n* **Note**: This helper will blindly check the possibility of showing a placeholder directly in the\n* root editable element if one is passed, which may not be the expected result. If an element can\n* host other elements (not just text), most likely one of its children should be checked instead\n* because it will be the final host for the placeholder. Use\n* {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} in that case or make\n* sure the correct element is passed to the helper.\n*\n* @param element Element that holds the placeholder.\n* @param keepOnFocus Focusing the element will keep the placeholder visible.\n*/\nfunction needsViewPlaceholder(element, keepOnFocus) {\n\tif (!element.isAttached()) return false;\n\tif (hasContent(element)) return false;\n\tconst doc = element.document;\n\tconst selectionAnchor = doc.selection.anchor;\n\tif (doc.isComposing && selectionAnchor && selectionAnchor.parent === element) return false;\n\tif (keepOnFocus) return true;\n\tif (!doc.isFocused) return true;\n\treturn !!selectionAnchor && selectionAnchor.parent !== element;\n}\n/**\n* Anything but uiElement(s) counts as content.\n*/\nfunction hasContent(element) {\n\tfor (const child of element.getChildren()) if (!child.is(\"uiElement\")) return true;\n\treturn false;\n}\n/**\n* Updates all placeholders associated with a document in a post–fixer callback.\n*\n* @returns True if any changes were made to the view document.\n*/\nfunction updateDocumentPlaceholders(placeholders, writer) {\n\tconst directHostElements = [];\n\tlet wasViewModified = false;\n\tfor (const [element, config] of placeholders) if (config.isDirectHost) {\n\t\tdirectHostElements.push(element);\n\t\tif (updatePlaceholder(writer, element, config)) wasViewModified = true;\n\t}\n\tfor (const [element, config] of placeholders) {\n\t\tif (config.isDirectHost) continue;\n\t\tconst hostElement = getChildPlaceholderHostSubstitute(element);\n\t\tif (hostElement !== config.hostElement && config.hostElement) {\n\t\t\twriter.removeAttribute(\"data-placeholder\", config.hostElement);\n\t\t\thideViewPlaceholder(writer, config.hostElement);\n\t\t\tconfig.hostElement = null;\n\t\t\twasViewModified = true;\n\t\t}\n\t\tif (!hostElement) continue;\n\t\tif (directHostElements.includes(hostElement)) continue;\n\t\tconfig.hostElement = hostElement;\n\t\tif (updatePlaceholder(writer, element, config)) wasViewModified = true;\n\t}\n\treturn wasViewModified;\n}\n/**\n* Updates a single placeholder in a post–fixer callback.\n*\n* @returns True if any changes were made to the view document.\n*/\nfunction updatePlaceholder(writer, element, config) {\n\tconst { text, isDirectHost, hostElement } = config;\n\tlet wasViewModified = false;\n\tif (hostElement.getAttribute(\"data-placeholder\") !== text) {\n\t\twriter.setAttribute(\"data-placeholder\", text, hostElement);\n\t\twasViewModified = true;\n\t}\n\tif ((isDirectHost || element.childCount == 1) && needsViewPlaceholder(hostElement, config.keepOnFocus)) {\n\t\tif (showViewPlaceholder(writer, hostElement)) wasViewModified = true;\n\t} else if (hideViewPlaceholder(writer, hostElement)) wasViewModified = true;\n\treturn wasViewModified;\n}\n/**\n* Gets a child element capable of displaying a placeholder if a parent element can host more\n* than just text (for instance, when it is a root editable element). The child element\n* can then be used in other placeholder helpers as a substitute of its parent.\n*/\nfunction getChildPlaceholderHostSubstitute(parent) {\n\tif (parent.childCount) {\n\t\tconst firstChild = parent.getChild(0);\n\t\tif (firstChild.is(\"element\") && !firstChild.is(\"uiElement\") && !firstChild.is(\"attributeElement\")) return firstChild;\n\t}\n\treturn null;\n}\n/**\n* Displays a deprecation warning message in the console, but only once per page load.\n*/\nfunction showViewPlaceholderTextDeprecationWarning() {\n\tif (!hasDisplayedPlaceholderDeprecationWarning)\n /**\n\t* The \"text\" option in the {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`}\n\t* function is deprecated and will be removed soon.\n\t*\n\t* See the `#view-element-placeholder` section in the `Update to v39.x` section in the\n\t* {@glink updating/guides/updating-from-older-versions updating from older versions} guide\n\t* for more information on how to apply this change.\n\t*\n\t* @error enableViewPlaceholder-deprecated-text-option\n\t*/\n\tlogWarning(\"enableViewPlaceholder-deprecated-text-option\");\n\thasDisplayedPlaceholderDeprecationWarning = 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*/\nvar ViewTypeCheckable = class {\n\t/* v8 ignore next -- @preserve */\n\tis() {\n\t\tthrow new Error(\"is() method is abstract\");\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 engine/view/node\n*/\nconst ViewNodeBase = /* #__PURE__ */ EmitterMixin(ViewTypeCheckable);\n/**\n* Abstract view node class.\n*\n* This is an abstract class. Its constructor should not be used directly.\n* Use the {@link module:engine/view/downcastwriter~ViewDowncastWriter} or {@link module:engine/view/upcastwriter~ViewUpcastWriter}\n* to create new instances of view nodes.\n*/\nvar ViewNode = class extends ViewNodeBase {\n\t/**\n\t* The document instance to which this node belongs.\n\t*/\n\tdocument;\n\t/**\n\t* Parent element. Null by default. Set by {@link module:engine/view/element~ViewElement#_insertChild}.\n\t*/\n\tparent;\n\t/**\n\t* Creates a tree view node.\n\t*\n\t* @param document The document instance to which this node belongs.\n\t*/\n\tconstructor(document) {\n\t\tsuper();\n\t\tthis.document = document;\n\t\tthis.parent = null;\n\t}\n\t/**\n\t* Index of the node in the parent element or null if the node has no parent.\n\t*\n\t* Accessing this property throws an error if this node's parent element does not contain it.\n\t* This means that view tree got broken.\n\t*/\n\tget index() {\n\t\tlet pos;\n\t\tif (!this.parent) return null;\n\t\tif ((pos = this.parent.getChildIndex(this)) == -1)\n /**\n\t\t* The node's parent does not contain this node. It means that the document tree is corrupted.\n\t\t*\n\t\t* @error view-node-not-found-in-parent\n\t\t*/\n\t\tthrow new CKEditorError(\"view-node-not-found-in-parent\", this);\n\t\treturn pos;\n\t}\n\t/**\n\t* Node's next sibling, or `null` if it is the last child.\n\t*/\n\tget nextSibling() {\n\t\tconst index = this.index;\n\t\treturn index !== null && this.parent.getChild(index + 1) || null;\n\t}\n\t/**\n\t* Node's previous sibling, or `null` if it is the first child.\n\t*/\n\tget previousSibling() {\n\t\tconst index = this.index;\n\t\treturn index !== null && this.parent.getChild(index - 1) || null;\n\t}\n\t/**\n\t* Top-most ancestor of the node. If the node has no parent it is the root itself.\n\t*/\n\tget root() {\n\t\tlet root = this;\n\t\twhile (root.parent) root = root.parent;\n\t\treturn root;\n\t}\n\t/**\n\t* Returns true if the node is in a tree rooted in the document (is a descendant of one of its roots).\n\t*/\n\tisAttached() {\n\t\treturn this.root.is(\"rootElement\");\n\t}\n\t/**\n\t* Gets a path to the node. The path is an array containing indices of consecutive ancestors of this node,\n\t* beginning from {@link module:engine/view/node~ViewNode#root root}, down to this node's index.\n\t*\n\t* ```ts\n\t* const abc = downcastWriter.createText( 'abc' );\n\t* const foo = downcastWriter.createText( 'foo' );\n\t* const h1 = downcastWriter.createElement( 'h1', null, downcastWriter.createText( 'header' ) );\n\t* const p = downcastWriter.createElement( 'p', null, [ abc, foo ] );\n\t* const div = downcastWriter.createElement( 'div', null, [ h1, p ] );\n\t* foo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t* h1.getPath(); // Returns [ 0 ].\n\t* div.getPath(); // Returns [].\n\t* ```\n\t*\n\t* @returns The path.\n\t*/\n\tgetPath() {\n\t\tconst path = [];\n\t\tlet node = this;\n\t\twhile (node.parent) {\n\t\t\tpath.unshift(node.index);\n\t\t\tnode = node.parent;\n\t\t}\n\t\treturn path;\n\t}\n\t/**\n\t* Returns ancestors array of this node.\n\t*\n\t* @param options Options object.\n\t* @param options.includeSelf When set to `true` this node will be also included in parent's array.\n\t* @param options.parentFirst When set to `true`, array will be sorted from node's parent to root element,\n\t* otherwise root element will be the first item in the array.\n\t* @returns Array with ancestors.\n\t*/\n\tgetAncestors(options = {}) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\t\twhile (parent) {\n\t\t\tancestors[options.parentFirst ? \"push\" : \"unshift\"](parent);\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn ancestors;\n\t}\n\t/**\n\t* Returns a {@link module:engine/view/element~ViewElement} or {@link module:engine/view/documentfragment~ViewDocumentFragment}\n\t* which is a common ancestor of both nodes.\n\t*\n\t* @param node The second node.\n\t* @param options Options object.\n\t* @param options.includeSelf When set to `true` both nodes will be considered \"ancestors\" too.\n\t* Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t*/\n\tgetCommonAncestor(node, options = {}) {\n\t\tconst ancestorsA = this.getAncestors(options);\n\t\tconst ancestorsB = node.getAncestors(options);\n\t\tlet i = 0;\n\t\twhile (ancestorsA[i] == ancestorsB[i] && ancestorsA[i]) i++;\n\t\treturn i === 0 ? null : ancestorsA[i - 1];\n\t}\n\t/**\n\t* Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t* in different {@link module:engine/view/documentfragment~ViewDocumentFragment}s).\n\t*\n\t* @param node Node to compare with.\n\t*/\n\tisBefore(node) {\n\t\tif (this == node) return false;\n\t\tif (this.root !== node.root) return false;\n\t\tconst thisPath = this.getPath();\n\t\tconst nodePath = node.getPath();\n\t\tconst result = compareArrays(thisPath, nodePath);\n\t\tswitch (result) {\n\t\t\tcase \"prefix\": return true;\n\t\t\tcase \"extension\": return false;\n\t\t\tdefault: return thisPath[result] < nodePath[result];\n\t\t}\n\t}\n\t/**\n\t* Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t* in different {@link module:engine/view/documentfragment~ViewDocumentFragment}s).\n\t*\n\t* @param node Node to compare with.\n\t*/\n\tisAfter(node) {\n\t\tif (this == node) return false;\n\t\tif (this.root !== node.root) return false;\n\t\treturn !this.isBefore(node);\n\t}\n\t/**\n\t* Removes node from parent.\n\t*\n\t* @internal\n\t*/\n\t_remove() {\n\t\tthis.parent._removeChildren(this.index);\n\t}\n\t/**\n\t* @internal\n\t* @param type Type of the change.\n\t* @param node Changed node.\n\t* @param data Additional data.\n\t* @fires change\n\t*/\n\t_fireChange(type, node, data) {\n\t\tthis.fire(`change:${type}`, node, data);\n\t\tif (this.parent) this.parent._fireChange(type, node, data);\n\t}\n\t/**\n\t* Converts `ViewNode` to plain object and returns it.\n\t*\n\t* @returns `ViewNode` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = {\n\t\t\tpath: this.getPath(),\n\t\t\ttype: \"Node\"\n\t\t};\n\t\tif (this !== this.root && this.root.is(\"rootElement\")) json.root = this.root.toJSON();\n\t\treturn json;\n\t}\n};\nViewNode.prototype.is = function(type) {\n\treturn type === \"node\" || type === \"view: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 engine/view/text\n*/\n/**\n* Tree view text node.\n*\n* The constructor of this class should not be used directly. To create a new text node instance\n* use the {@link module:engine/view/downcastwriter~ViewDowncastWriter#createText `ViewDowncastWriter#createText()`}\n* method when working on data downcasted from the model or the\n* {@link module:engine/view/upcastwriter~ViewUpcastWriter#createText `ViewUpcastWriter#createText()`}\n* method when working on non-semantic views.\n*/\nvar ViewText = class ViewText extends ViewNode {\n\t/**\n\t* The text content.\n\t*\n\t* Setting the data fires the {@link module:engine/view/node~ViewNode#event:change:text change event}.\n\t*/\n\t_textData;\n\t/**\n\t* Creates a tree view text node.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#createText\n\t* @internal\n\t* @param document The document instance to which this text node belongs.\n\t* @param data The text's data.\n\t*/\n\tconstructor(document, data) {\n\t\tsuper(document);\n\t\tthis._textData = data;\n\t}\n\t/**\n\t* The text content.\n\t*/\n\tget data() {\n\t\treturn this._textData;\n\t}\n\t/**\n\t* The `_data` property is controlled by a getter and a setter.\n\t*\n\t* The getter is required when using the addition assignment operator on protected property:\n\t*\n\t* ```ts\n\t* const foo = downcastWriter.createText( 'foo' );\n\t* const bar = downcastWriter.createText( 'bar' );\n\t*\n\t* foo._data += bar.data;   // executes: `foo._data = foo._data + bar.data`\n\t* console.log( foo.data ); // prints: 'foobar'\n\t* ```\n\t*\n\t* If the protected getter didn't exist, `foo._data` will return `undefined` and result of the merge will be invalid.\n\t*\n\t* The setter sets data and fires the {@link module:engine/view/node~ViewNode#event:change:text change event}.\n\t*\n\t* @internal\n\t*/\n\tget _data() {\n\t\treturn this.data;\n\t}\n\tset _data(data) {\n\t\tthis._fireChange(\"text\", this);\n\t\tthis._textData = data;\n\t}\n\t/**\n\t* Checks if this text node is similar to other text node.\n\t* Both nodes should have the same data to be considered as similar.\n\t*\n\t* @param otherNode Node to check if it is same as this node.\n\t*/\n\tisSimilar(otherNode) {\n\t\tif (!(otherNode instanceof ViewText)) return false;\n\t\treturn this === otherNode || this.data === otherNode.data;\n\t}\n\t/**\n\t* Converts `ViewText` instance to plain object and returns it.\n\t*\n\t* @returns `ViewText` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.type = \"Text\";\n\t\tjson.data = this.data;\n\t\treturn json;\n\t}\n\t/**\n\t* Clones this node.\n\t*\n\t* @internal\n\t* @returns Text node that is a clone of this node.\n\t*/\n\t_clone() {\n\t\treturn new ViewText(this.document, this.data);\n\t}\n};\nViewText.prototype.is = function(type) {\n\treturn type === \"$text\" || type === \"view:$text\" || type === \"text\" || type === \"view:text\" || type === \"node\" || type === \"view: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 engine/view/textproxy\n*/\n/**\n* ViewTextProxy is a wrapper for substring of {@link module:engine/view/text~ViewText}. Instance of this class is created by\n* {@link module:engine/view/treewalker~ViewTreeWalker} when only a part of {@link module:engine/view/text~ViewText} needs to be returned.\n*\n* `ViewTextProxy` has an API similar to {@link module:engine/view/text~ViewText Text} and allows to do most of the common tasks performed\n* on view nodes.\n*\n* **Note:** Some `ViewTextProxy` instances may represent whole text node, not just a part of it.\n* See {@link module:engine/view/textproxy~ViewTextProxy#isPartial}.\n*\n* **Note:** `ViewTextProxy` is a readonly interface.\n*\n* **Note:** `ViewTextProxy` instances are created on the fly basing\n* on the current state of parent {@link module:engine/view/text~ViewText}.\n* Because of this it is highly unrecommended to store references to `TextProxy instances because they might get\n* invalidated due to operations on Document. Also ViewTextProxy is not a {@link module:engine/view/node~ViewNode} so it cannot be\n* inserted as a child of {@link module:engine/view/element~ViewElement}.\n*\n* `ViewTextProxy` instances are created by {@link module:engine/view/treewalker~ViewTreeWalker view tree walker}.\n* You should not need to create an instance of this class by your own.\n*/\nvar ViewTextProxy = class extends ViewTypeCheckable {\n\t/**\n\t* Reference to the {@link module:engine/view/text~ViewText} element which ViewTextProxy is a substring.\n\t*/\n\ttextNode;\n\t/**\n\t* Text data represented by this text proxy.\n\t*/\n\tdata;\n\t/**\n\t* Offset in the `textNode` where this `ViewTextProxy` instance starts.\n\t*/\n\toffsetInText;\n\t/**\n\t* Creates a text proxy.\n\t*\n\t* @internal\n\t* @param textNode Text node which part is represented by this text proxy.\n\t* @param offsetInText Offset in {@link module:engine/view/textproxy~ViewTextProxy#textNode text node}\n\t* from which the text proxy starts.\n\t* @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t*/\n\tconstructor(textNode, offsetInText, length) {\n\t\tsuper();\n\t\tthis.textNode = textNode;\n\t\tif (offsetInText < 0 || offsetInText > textNode.data.length)\n /**\n\t\t* Given offsetInText value is incorrect.\n\t\t*\n\t\t* @error view-textproxy-wrong-offsetintext\n\t\t*/\n\t\tthrow new CKEditorError(\"view-textproxy-wrong-offsetintext\", this);\n\t\tif (length < 0 || offsetInText + length > textNode.data.length)\n /**\n\t\t* Given length value is incorrect.\n\t\t*\n\t\t* @error view-textproxy-wrong-length\n\t\t*/\n\t\tthrow new CKEditorError(\"view-textproxy-wrong-length\", this);\n\t\tthis.data = textNode.data.substring(offsetInText, offsetInText + length);\n\t\tthis.offsetInText = offsetInText;\n\t}\n\t/**\n\t* Offset size of this node.\n\t*/\n\tget offsetSize() {\n\t\treturn this.data.length;\n\t}\n\t/**\n\t* Flag indicating whether `ViewTextProxy` instance covers only part of the original {@link module:engine/view/text~ViewText text node}\n\t* (`true`) or the whole text node (`false`).\n\t*\n\t* This is `false` when text proxy starts at the very beginning of {@link module:engine/view/textproxy~ViewTextProxy#textNode textNode}\n\t* ({@link module:engine/view/textproxy~ViewTextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t* text node size.\n\t*/\n\tget isPartial() {\n\t\treturn this.data.length !== this.textNode.data.length;\n\t}\n\t/**\n\t* Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t*/\n\tget parent() {\n\t\treturn this.textNode.parent;\n\t}\n\t/**\n\t* Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t*/\n\tget root() {\n\t\treturn this.textNode.root;\n\t}\n\t/**\n\t* {@link module:engine/view/document~ViewDocument View document} that owns this text proxy, or `null` if the text proxy is inside\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}.\n\t*/\n\tget document() {\n\t\treturn this.textNode.document;\n\t}\n\t/**\n\t* Returns ancestors array of this text proxy.\n\t*\n\t* @param options Options object.\n\t* @param options.includeSelf When set to `true`, textNode will be also included in parent's array.\n\t* @param options.parentFirst When set to `true`, array will be sorted from text proxy parent to\n\t* root element, otherwise root element will be the first item in the array.\n\t* @returns Array with ancestors.\n\t*/\n\tgetAncestors(options = {}) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this.textNode : this.parent;\n\t\twhile (parent !== null) {\n\t\t\tancestors[options.parentFirst ? \"push\" : \"unshift\"](parent);\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn ancestors;\n\t}\n};\nViewTextProxy.prototype.is = function(type) {\n\treturn type === \"$textProxy\" || type === \"view:$textProxy\" || type === \"textProxy\" || type === \"view:textProxy\";\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 engine/conversion/viewconsumable\n*/\n/**\n* Class used for handling consumption of view {@link module:engine/view/element~ViewElement elements},\n* {@link module:engine/view/text~ViewText text nodes} and\n* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragments}.\n* Element's name and its parts (attributes, classes and styles) can be consumed separately. Consuming an element's name\n* does not consume its attributes, classes and styles.\n* To add items for consumption use {@link module:engine/conversion/viewconsumable~ViewConsumable#add add method}.\n* To test items use {@link module:engine/conversion/viewconsumable~ViewConsumable#test test method}.\n* To consume items use {@link module:engine/conversion/viewconsumable~ViewConsumable#consume consume method}.\n* To revert already consumed items use {@link module:engine/conversion/viewconsumable~ViewConsumable#revert revert method}.\n*\n* ```ts\n* viewConsumable.add( element, { name: true } ); // Adds element's name as ready to be consumed.\n* viewConsumable.add( textNode ); // Adds text node for consumption.\n* viewConsumable.add( docFragment ); // Adds document fragment for consumption.\n* viewConsumable.test( element, { name: true }  ); // Tests if element's name can be consumed.\n* viewConsumable.test( textNode ); // Tests if text node can be consumed.\n* viewConsumable.test( docFragment ); // Tests if document fragment can be consumed.\n* viewConsumable.consume( element, { name: true }  ); // Consume element's name.\n* viewConsumable.consume( textNode ); // Consume text node.\n* viewConsumable.consume( docFragment ); // Consume document fragment.\n* viewConsumable.revert( element, { name: true }  ); // Revert already consumed element's name.\n* viewConsumable.revert( textNode ); // Revert already consumed text node.\n* viewConsumable.revert( docFragment ); // Revert already consumed document fragment.\n* ```\n*/\nvar ViewConsumable = class ViewConsumable {\n\t/**\n\t* Map of consumable elements. If {@link module:engine/view/element~ViewElement element} is used as a key,\n\t* {@link module:engine/conversion/viewconsumable~ViewElementConsumables ViewElementConsumables} instance is stored as value.\n\t* For {@link module:engine/view/text~ViewText text nodes} and\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragments} boolean value is stored as value.\n\t*/\n\t_consumables = /* @__PURE__ */ new Map();\n\t/**\n\t* Adds view {@link module:engine/view/element~ViewElement element}, {@link module:engine/view/text~ViewText text node} or\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment} as ready to be consumed.\n\t*\n\t* ```ts\n\t* viewConsumable.add( p, { name: true } ); // Adds element's name to consume.\n\t* viewConsumable.add( p, { attributes: 'name' } ); // Adds element's attribute.\n\t* viewConsumable.add( p, { classes: 'foobar' } ); // Adds element's class.\n\t* viewConsumable.add( p, { styles: 'color' } ); // Adds element's style\n\t* viewConsumable.add( p, { attributes: 'name', styles: 'color' } ); // Adds attribute and style.\n\t* viewConsumable.add( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be provided.\n\t* viewConsumable.add( textNode ); // Adds text node to consume.\n\t* viewConsumable.add( docFragment ); // Adds document fragment to consume.\n\t* ```\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t* attribute is provided - it should be handled separately by providing actual style/class.\n\t*\n\t* ```ts\n\t* viewConsumable.add( p, { attributes: 'style' } ); // This call will throw an exception.\n\t* viewConsumable.add( p, { styles: 'color' } ); // This is properly handled style.\n\t* ```\n\t*\n\t* @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t* @param consumables.name If set to true element's name will be included.\n\t* @param consumables.attributes Attribute name or array of attribute names.\n\t* @param consumables.classes Class name or array of class names.\n\t* @param consumables.styles Style name or array of style names.\n\t*/\n\tadd(element, consumables) {\n\t\tlet elementConsumables;\n\t\tif (element.is(\"$text\") || element.is(\"documentFragment\")) {\n\t\t\tthis._consumables.set(element, true);\n\t\t\treturn;\n\t\t}\n\t\tif (!this._consumables.has(element)) {\n\t\t\telementConsumables = new ViewElementConsumables(element);\n\t\t\tthis._consumables.set(element, elementConsumables);\n\t\t} else elementConsumables = this._consumables.get(element);\n\t\telementConsumables.add(consumables ? normalizeConsumables(consumables) : element._getConsumables());\n\t}\n\t/**\n\t* Tests if {@link module:engine/view/element~ViewElement view element}, {@link module:engine/view/text~ViewText text node} or\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment} can be consumed.\n\t* It returns `true` when all items included in method's call can be consumed. Returns `false` when\n\t* first already consumed item is found and `null` when first non-consumable item is found.\n\t*\n\t* ```ts\n\t* viewConsumable.test( p, { name: true } ); // Tests element's name.\n\t* viewConsumable.test( p, { attributes: 'name' } ); // Tests attribute.\n\t* viewConsumable.test( p, { classes: 'foobar' } ); // Tests class.\n\t* viewConsumable.test( p, { styles: 'color' } ); // Tests style.\n\t* viewConsumable.test( p, { attributes: 'name', styles: 'color' } ); // Tests attribute and style.\n\t* viewConsumable.test( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be tested.\n\t* viewConsumable.test( textNode ); // Tests text node.\n\t* viewConsumable.test( docFragment ); // Tests document fragment.\n\t* ```\n\t*\n\t* Testing classes and styles as attribute will test if all added classes/styles can be consumed.\n\t*\n\t* ```ts\n\t* viewConsumable.test( p, { attributes: 'class' } ); // Tests if all added classes can be consumed.\n\t* viewConsumable.test( p, { attributes: 'style' } ); // Tests if all added styles can be consumed.\n\t* ```\n\t*\n\t* @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t* @param consumables.name If set to true element's name will be included.\n\t* @param consumables.attributes Attribute name or array of attribute names.\n\t* @param consumables.classes Class name or array of class names.\n\t* @param consumables.styles Style name or array of style names.\n\t* @returns Returns `true` when all items included in method's call can be consumed. Returns `false`\n\t* when first already consumed item is found and `null` when first non-consumable item is found.\n\t*/\n\ttest(element, consumables) {\n\t\tconst elementConsumables = this._consumables.get(element);\n\t\tif (elementConsumables === void 0) return null;\n\t\tif (element.is(\"$text\") || element.is(\"documentFragment\")) return elementConsumables;\n\t\treturn elementConsumables.test(normalizeConsumables(consumables));\n\t}\n\t/**\n\t* Consumes {@link module:engine/view/element~ViewElement view element}, {@link module:engine/view/text~ViewText text node} or\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}.\n\t* It returns `true` when all items included in method's call can be consumed, otherwise returns `false`.\n\t*\n\t* ```ts\n\t* viewConsumable.consume( p, { name: true } ); // Consumes element's name.\n\t* viewConsumable.consume( p, { attributes: 'name' } ); // Consumes element's attribute.\n\t* viewConsumable.consume( p, { classes: 'foobar' } ); // Consumes element's class.\n\t* viewConsumable.consume( p, { styles: 'color' } ); // Consumes element's style.\n\t* viewConsumable.consume( p, { attributes: 'name', styles: 'color' } ); // Consumes attribute and style.\n\t* viewConsumable.consume( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be consumed.\n\t* viewConsumable.consume( textNode ); // Consumes text node.\n\t* viewConsumable.consume( docFragment ); // Consumes document fragment.\n\t* ```\n\t*\n\t* Consuming classes and styles as attribute will test if all added classes/styles can be consumed.\n\t*\n\t* ```ts\n\t* viewConsumable.consume( p, { attributes: 'class' } ); // Consume only if all added classes can be consumed.\n\t* viewConsumable.consume( p, { attributes: 'style' } ); // Consume only if all added styles can be consumed.\n\t* ```\n\t*\n\t* @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t* @param consumables.name If set to true element's name will be included.\n\t* @param consumables.attributes Attribute name or array of attribute names.\n\t* @param consumables.classes Class name or array of class names.\n\t* @param consumables.styles Style name or array of style names.\n\t* @returns Returns `true` when all items included in method's call can be consumed,\n\t* otherwise returns `false`.\n\t*/\n\tconsume(element, consumables) {\n\t\tif (element.is(\"$text\") || element.is(\"documentFragment\")) {\n\t\t\tif (!this.test(element, consumables)) return false;\n\t\t\tthis._consumables.set(element, false);\n\t\t\treturn true;\n\t\t}\n\t\tconst elementConsumables = this._consumables.get(element);\n\t\tif (elementConsumables === void 0) return false;\n\t\treturn elementConsumables.consume(normalizeConsumables(consumables));\n\t}\n\t/**\n\t* Reverts {@link module:engine/view/element~ViewElement view element}, {@link module:engine/view/text~ViewText text node} or\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment} so they can be consumed once again.\n\t* Method does not revert items that were never previously added for consumption, even if they are included in\n\t* method's call.\n\t*\n\t* ```ts\n\t* viewConsumable.revert( p, { name: true } ); // Reverts element's name.\n\t* viewConsumable.revert( p, { attributes: 'name' } ); // Reverts element's attribute.\n\t* viewConsumable.revert( p, { classes: 'foobar' } ); // Reverts element's class.\n\t* viewConsumable.revert( p, { styles: 'color' } ); // Reverts element's style.\n\t* viewConsumable.revert( p, { attributes: 'name', styles: 'color' } ); // Reverts attribute and style.\n\t* viewConsumable.revert( p, { classes: [ 'baz', 'bar' ] } ); // Multiple names can be reverted.\n\t* viewConsumable.revert( textNode ); // Reverts text node.\n\t* viewConsumable.revert( docFragment ); // Reverts document fragment.\n\t* ```\n\t*\n\t* Reverting classes and styles as attribute will revert all classes/styles that were previously added for\n\t* consumption.\n\t*\n\t* ```ts\n\t* viewConsumable.revert( p, { attributes: 'class' } ); // Reverts all classes added for consumption.\n\t* viewConsumable.revert( p, { attributes: 'style' } ); // Reverts all styles added for consumption.\n\t* ```\n\t*\n\t* @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t* @param consumables.name If set to true element's name will be included.\n\t* @param consumables.attributes Attribute name or array of attribute names.\n\t* @param consumables.classes Class name or array of class names.\n\t* @param consumables.styles Style name or array of style names.\n\t*/\n\trevert(element, consumables) {\n\t\tconst elementConsumables = this._consumables.get(element);\n\t\tif (elementConsumables !== void 0) {\n\t\t\tif (element.is(\"$text\") || element.is(\"documentFragment\")) this._consumables.set(element, true);\n\t\t\telse elementConsumables.revert(normalizeConsumables(consumables));\n\t\t}\n\t}\n\t/**\n\t* Creates {@link module:engine/conversion/viewconsumable~ViewConsumable ViewConsumable} instance from\n\t* {@link module:engine/view/node~ViewNode node} or {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}.\n\t* Instance will contain all elements, child nodes, attributes, styles and classes added for consumption.\n\t*\n\t* @param from View node or document fragment from which `ViewConsumable` will be created.\n\t* @param instance If provided, given `ViewConsumable` instance will be used\n\t* to add all consumables. It will be returned instead of a new instance.\n\t*/\n\tstatic createFrom(from, instance) {\n\t\tif (!instance) instance = new ViewConsumable();\n\t\tif (from.is(\"$text\")) instance.add(from);\n\t\telse if (from.is(\"element\") || from.is(\"documentFragment\")) {\n\t\t\tinstance.add(from);\n\t\t\tfor (const child of from.getChildren()) ViewConsumable.createFrom(child, instance);\n\t\t}\n\t\treturn instance;\n\t}\n};\n/**\n* This is a private helper-class for {@link module:engine/conversion/viewconsumable~ViewConsumable}.\n* It represents and manipulates consumable parts of a single {@link module:engine/view/element~ViewElement}.\n*\n* @internal\n*/\nvar ViewElementConsumables = class {\n\telement;\n\t/**\n\t* Flag indicating if name of the element can be consumed.\n\t*/\n\t_canConsumeName = null;\n\t/**\n\t* A map of element's consumables.\n\t* * For plain attributes the value is a boolean indicating whether the attribute is available to consume.\n\t* * For token based attributes (like class list and style) the value is a map of tokens to booleans\n\t* indicating whether the token is available to consume on the given attribute.\n\t*/\n\t_attributes = /* @__PURE__ */ new Map();\n\t/**\n\t* Creates ViewElementConsumables instance.\n\t*\n\t* @param from View element from which `ViewElementConsumables` is being created.\n\t*/\n\tconstructor(from) {\n\t\tthis.element = from;\n\t}\n\t/**\n\t* Adds consumable parts of the {@link module:engine/view/element~ViewElement view element}.\n\t* Element's name itself can be marked to be consumed (when element's name is consumed its attributes, classes and\n\t* styles still could be consumed):\n\t*\n\t* ```ts\n\t* consumables.add( { name: true } );\n\t* ```\n\t*\n\t* Attributes classes and styles:\n\t*\n\t* ```ts\n\t* consumables.add( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color'] ] } );\n\t* consumables.add( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t* ```\n\t*\n\t* Note: This method accepts only {@link module:engine/view/element~ViewNormalizedConsumables}.\n\t* You can use {@link module:engine/conversion/viewconsumable~normalizeConsumables} helper to convert from\n\t* {@link module:engine/conversion/viewconsumable~Consumables} to `ViewNormalizedConsumables`.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t* attribute is provided - it should be handled separately by providing `style` and `class` in consumables object.\n\t*\n\t* @param consumables Object describing which parts of the element can be consumed.\n\t*/\n\tadd(consumables) {\n\t\tif (consumables.name) this._canConsumeName = true;\n\t\tfor (const [name, token] of consumables.attributes) if (token) {\n\t\t\tlet attributeTokens = this._attributes.get(name);\n\t\t\tif (!attributeTokens || typeof attributeTokens == \"boolean\") {\n\t\t\t\tattributeTokens = /* @__PURE__ */ new Map();\n\t\t\t\tthis._attributes.set(name, attributeTokens);\n\t\t\t}\n\t\t\tattributeTokens.set(token, true);\n\t\t} else if (name == \"style\" || name == \"class\")\n /**\n\t\t* Class and style attributes should be handled separately in\n\t\t* {@link module:engine/conversion/viewconsumable~ViewConsumable#add `ViewConsumable#add()`}.\n\t\t*\n\t\t* What you have done is trying to use:\n\t\t*\n\t\t* ```ts\n\t\t* consumables.add( { attributes: [ 'class', 'style' ] } );\n\t\t* ```\n\t\t*\n\t\t* While each class and style should be registered separately:\n\t\t*\n\t\t* ```ts\n\t\t* consumables.add( { classes: 'some-class', styles: 'font-weight' } );\n\t\t* ```\n\t\t*\n\t\t* @error viewconsumable-invalid-attribute\n\t\t*/\n\t\tthrow new CKEditorError(\"viewconsumable-invalid-attribute\", this);\n\t\telse this._attributes.set(name, true);\n\t}\n\t/**\n\t* Tests if parts of the {@link module:engine/view/element~ViewElement view element} can be consumed.\n\t*\n\t* Element's name can be tested:\n\t*\n\t* ```ts\n\t* consumables.test( { name: true } );\n\t* ```\n\t*\n\t* Attributes classes and styles:\n\t*\n\t* ```ts\n\t* consumables.test( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color' ] ] } );\n\t* consumables.test( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t* ```\n\t*\n\t* @param consumables Object describing which parts of the element should be tested.\n\t* @returns `true` when all tested items can be consumed, `null` when even one of the items\n\t* was never marked for consumption and `false` when even one of the items was already consumed.\n\t*/\n\ttest(consumables) {\n\t\tif (consumables.name && !this._canConsumeName) return this._canConsumeName;\n\t\tfor (const [name, token] of consumables.attributes) {\n\t\t\tconst value = this._attributes.get(name);\n\t\t\tif (value === void 0) return null;\n\t\t\tif (value === false) return false;\n\t\t\tif (value === true) continue;\n\t\t\tif (!token) {\n\t\t\t\tfor (const tokenValue of value.values()) if (!tokenValue) return false;\n\t\t\t} else {\n\t\t\t\tconst tokenValue = value.get(token);\n\t\t\t\tif (tokenValue === void 0) return null;\n\t\t\t\tif (!tokenValue) return false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Tests if parts of the {@link module:engine/view/element~ViewElement view element} can be consumed and consumes them if available.\n\t* It returns `true` when all items included in method's call can be consumed, otherwise returns `false`.\n\t*\n\t* Element's name can be consumed:\n\t*\n\t* ```ts\n\t* consumables.consume( { name: true } );\n\t* ```\n\t*\n\t* Attributes classes and styles:\n\t*\n\t* ```ts\n\t* consumables.consume( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color' ] ] } );\n\t* consumables.consume( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t* ```\n\t*\n\t* @param consumables Object describing which parts of the element should be consumed.\n\t* @returns `true` when all tested items can be consumed and `false` when even one of the items could not be consumed.\n\t*/\n\tconsume(consumables) {\n\t\tif (!this.test(consumables)) return false;\n\t\tif (consumables.name) this._canConsumeName = false;\n\t\tfor (const [name, token] of consumables.attributes) {\n\t\t\tconst value = this._attributes.get(name);\n\t\t\tif (typeof value == \"boolean\") for (const [toConsume] of this.element._getConsumables(name, token).attributes) this._attributes.set(toConsume, false);\n\t\t\telse if (!token) for (const token of value.keys()) value.set(token, false);\n\t\t\telse for (const [, toConsume] of this.element._getConsumables(name, token).attributes) value.set(toConsume, false);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Revert already consumed parts of {@link module:engine/view/element~ViewElement view Element}, so they can be consumed once again.\n\t* Element's name can be reverted:\n\t*\n\t* ```ts\n\t* consumables.revert( { name: true } );\n\t* ```\n\t*\n\t* Attributes classes and styles:\n\t*\n\t* ```ts\n\t* consumables.revert( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color' ] ] } );\n\t* consumables.revert( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t* ```\n\t*\n\t* @param consumables Object describing which parts of the element should be reverted.\n\t*/\n\trevert(consumables) {\n\t\tif (consumables.name) this._canConsumeName = true;\n\t\tfor (const [name, token] of consumables.attributes) {\n\t\t\tconst value = this._attributes.get(name);\n\t\t\tif (value === false) {\n\t\t\t\tthis._attributes.set(name, true);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value === void 0 || value === true) continue;\n\t\t\tif (!token) for (const token of value.keys()) value.set(token, true);\n\t\t\telse if (value.get(token) === false) value.set(token, true);\n\t\t}\n\t}\n};\n/**\n* Normalizes a {@link module:engine/conversion/viewconsumable~Consumables} or {@link module:engine/view/matcher~Match}\n* to a {@link module:engine/view/element~ViewNormalizedConsumables}.\n*\n* @internal\n*/\nfunction normalizeConsumables(consumables) {\n\tconst attributes = [];\n\tif (\"attributes\" in consumables && consumables.attributes) normalizeConsumablePart(attributes, consumables.attributes);\n\tif (\"classes\" in consumables && consumables.classes) normalizeConsumablePart(attributes, consumables.classes, \"class\");\n\tif (\"styles\" in consumables && consumables.styles) normalizeConsumablePart(attributes, consumables.styles, \"style\");\n\treturn {\n\t\tname: consumables.name || false,\n\t\tattributes\n\t};\n}\n/**\n* Normalizes a list of consumable attributes to a common tuple format.\n*/\nfunction normalizeConsumablePart(attributes, items, prefix) {\n\tif (typeof items == \"string\") {\n\t\tattributes.push(prefix ? [prefix, items] : [items]);\n\t\treturn;\n\t}\n\tfor (const item of items) if (Array.isArray(item)) attributes.push(item);\n\telse attributes.push(prefix ? [prefix, item] : [item]);\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* View matcher class.\n* Instance of this class can be used to find {@link module:engine/view/element~ViewElement elements} that match given pattern.\n*/\nvar Matcher = class {\n\t_patterns = [];\n\t/**\n\t* Creates new instance of Matcher.\n\t*\n\t* @param pattern Match patterns. See {@link module:engine/view/matcher~Matcher#add add method} for more information.\n\t*/\n\tconstructor(...pattern) {\n\t\tthis.add(...pattern);\n\t}\n\t/**\n\t* Adds pattern or patterns to matcher instance.\n\t*\n\t* ```ts\n\t* // String.\n\t* matcher.add( 'div' );\n\t*\n\t* // Regular expression.\n\t* matcher.add( /^\\w/ );\n\t*\n\t* // Single class.\n\t* matcher.add( {\n\t* \tclasses: 'foobar'\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/view/matcher~MatcherPattern} for more examples.\n\t*\n\t* Multiple patterns can be added in one call:\n\t*\n\t* ```ts\n\t* matcher.add( 'div', { classes: 'foobar' } );\n\t* ```\n\t*\n\t* @param pattern Object describing pattern details. If string or regular expression\n\t* is provided it will be used to match element's name. Pattern can be also provided in a form\n\t* of a function - then this function will be called with each {@link module:engine/view/element~ViewElement element} as a parameter.\n\t* Function's return value will be stored under `match` key of the object returned from\n\t* {@link module:engine/view/matcher~Matcher#match match} or {@link module:engine/view/matcher~Matcher#matchAll matchAll} methods.\n\t*/\n\tadd(...pattern) {\n\t\tfor (let item of pattern) {\n\t\t\tif (typeof item == \"string\" || item instanceof RegExp) item = { name: item };\n\t\t\tthis._patterns.push(item);\n\t\t}\n\t}\n\t/**\n\t* Matches elements for currently stored patterns. Returns match information about first found\n\t* {@link module:engine/view/element~ViewElement element}, otherwise returns `null`.\n\t*\n\t* Example of returned object:\n\t*\n\t* ```ts\n\t* {\n\t* \telement: <instance of found element>,\n\t* \tpattern: <pattern used to match found element>,\n\t* \tmatch: {\n\t* \t\tname: true,\n\t* \t\tattributes: [\n\t* \t\t\t[ 'title' ],\n\t* \t\t\t[ 'href' ],\n\t* \t\t\t[ 'class', 'foo' ],\n\t* \t\t\t[ 'style', 'color' ],\n\t* \t\t\t[ 'style', 'position' ]\n\t* \t\t]\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* You could use the `match` field from the above returned object as an input for the\n\t* {@link module:engine/conversion/viewconsumable~ViewConsumable#test `ViewConsumable#test()`} and\n\t* {@link module:engine/conversion/viewconsumable~ViewConsumable#consume `ViewConsumable#consume()`} methods.\n\t*\n\t* @see module:engine/view/matcher~Matcher#add\n\t* @see module:engine/view/matcher~Matcher#matchAll\n\t* @param element View element to match against stored patterns.\n\t* @returns The match information about found element or `null`.\n\t*/\n\tmatch(...element) {\n\t\tfor (const singleElement of element) for (const pattern of this._patterns) {\n\t\t\tconst match = this._isElementMatching(singleElement, pattern);\n\t\t\tif (match) return {\n\t\t\t\telement: singleElement,\n\t\t\t\tpattern,\n\t\t\t\tmatch\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Matches elements for currently stored patterns. Returns array of match information with all found\n\t* {@link module:engine/view/element~ViewElement elements}. If no element is found - returns `null`.\n\t*\n\t* @see module:engine/view/matcher~Matcher#add\n\t* @see module:engine/view/matcher~Matcher#match\n\t* @param element View element to match against stored patterns.\n\t* @returns Array with match information about found elements or `null`. For more information\n\t* see {@link module:engine/view/matcher~Matcher#match match method} description.\n\t*/\n\tmatchAll(...element) {\n\t\tconst results = [];\n\t\tfor (const singleElement of element) for (const pattern of this._patterns) {\n\t\t\tconst match = this._isElementMatching(singleElement, pattern);\n\t\t\tif (match) results.push({\n\t\t\t\telement: singleElement,\n\t\t\t\tpattern,\n\t\t\t\tmatch\n\t\t\t});\n\t\t}\n\t\treturn results.length > 0 ? results : null;\n\t}\n\t/**\n\t* Returns the name of the element to match if there is exactly one pattern added to the matcher instance\n\t* and it matches element name defined by `string` (not `RegExp`). Otherwise, returns `null`.\n\t*\n\t* @returns Element name trying to match.\n\t*/\n\tgetElementName() {\n\t\tif (this._patterns.length !== 1) return null;\n\t\tconst pattern = this._patterns[0];\n\t\tconst name = pattern.name;\n\t\treturn typeof pattern != \"function\" && name && !(name instanceof RegExp) ? name : null;\n\t}\n\t/**\n\t* Returns match information if {@link module:engine/view/element~ViewElement element} is matching provided pattern.\n\t* If element cannot be matched to provided pattern - returns `null`.\n\t*\n\t* @returns Returns object with match information or null if element is not matching.\n\t*/\n\t_isElementMatching(element, pattern) {\n\t\tif (typeof pattern == \"function\") {\n\t\t\tconst match = pattern(element);\n\t\t\tif (!match || typeof match != \"object\") return match;\n\t\t\treturn normalizeConsumables(match);\n\t\t}\n\t\tconst match = {};\n\t\tif (pattern.name) {\n\t\t\tmatch.name = matchName(pattern.name, element.name);\n\t\t\tif (!match.name) return null;\n\t\t}\n\t\tconst attributesMatch = [];\n\t\tif (pattern.attributes && !matchAttributes(pattern.attributes, element, attributesMatch)) return null;\n\t\tif (pattern.classes && !matchClasses(pattern.classes, element, attributesMatch)) return null;\n\t\tif (pattern.styles && !matchStyles(pattern.styles, element, attributesMatch)) return null;\n\t\tif (attributesMatch.length) match.attributes = attributesMatch;\n\t\treturn match;\n\t}\n};\n/**\n* Returns true if the given `item` matches the pattern.\n*\n* @internal\n* @param pattern A pattern representing a key/value we want to match.\n* @param item An actual item key/value (e.g. `'src'`, `'background-color'`, `'ck-widget'`) we're testing against pattern.\n*/\nfunction isPatternMatched(pattern, item) {\n\treturn pattern === true || pattern === item || pattern instanceof RegExp && !!String(item).match(pattern);\n}\n/**\n* Checks if name can be matched by provided pattern.\n*\n* @returns Returns `true` if name can be matched, `false` otherwise.\n*/\nfunction matchName(pattern, name) {\n\tif (pattern instanceof RegExp) return !!name.match(pattern);\n\treturn pattern === name;\n}\n/**\n* Bring all the possible pattern forms to an array of tuples where first item is a key, second is a value,\n* and third optional is a token value.\n*\n* Examples:\n*\n* Boolean pattern value:\n*\n* ```ts\n* true\n* ```\n*\n* to\n*\n* ```ts\n* [ [ true, true ] ]\n* ```\n*\n* Textual pattern value:\n*\n* ```ts\n* 'attribute-name-or-class-or-style'\n* ```\n*\n* to\n*\n* ```ts\n* [ [ 'attribute-name-or-class-or-style', true ] ]\n* ```\n*\n* Regular expression:\n*\n* ```ts\n* /^data-.*$/\n* ```\n*\n* to\n*\n* ```ts\n* [ [ /^data-.*$/, true ] ]\n* ```\n*\n* Objects (plain or with `key` and `value` specified explicitly):\n*\n* ```ts\n* {\n* \tsrc: /^https:.*$/\n* }\n* ```\n*\n* or\n*\n* ```ts\n* [ {\n* \tkey: 'src',\n* \tvalue: /^https:.*$/\n* } ]\n* ```\n*\n* to:\n*\n* ```ts\n* [ [ 'src', /^https:.*$/ ] ]\n* ```\n*\n* @returns Returns an array of objects or null if provided patterns were not in an expected form.\n*/\nfunction normalizePatterns(patterns, prefix) {\n\tif (Array.isArray(patterns)) return patterns.map((pattern) => {\n\t\tif (typeof pattern !== \"object\" || pattern instanceof RegExp) return prefix ? [\n\t\t\tprefix,\n\t\t\tpattern,\n\t\t\ttrue\n\t\t] : [pattern, true];\n\t\tif (pattern.key === void 0 || pattern.value === void 0) logWarning(\"matcher-pattern-missing-key-or-value\", pattern);\n\t\treturn prefix ? [\n\t\t\tprefix,\n\t\t\tpattern.key,\n\t\t\tpattern.value\n\t\t] : [pattern.key, pattern.value];\n\t});\n\tif (typeof patterns !== \"object\" || patterns instanceof RegExp) return [prefix ? [\n\t\tprefix,\n\t\tpatterns,\n\t\ttrue\n\t] : [patterns, true]];\n\tconst normalizedPatterns = [];\n\tfor (const key in patterns) if (Object.prototype.hasOwnProperty.call(patterns, key)) normalizedPatterns.push(prefix ? [\n\t\tprefix,\n\t\tkey,\n\t\tpatterns[key]\n\t] : [key, patterns[key]]);\n\treturn normalizedPatterns;\n}\n/**\n* Checks if attributes of provided element can be matched against provided patterns.\n*\n* @param patterns Object with information about attributes to match. Each key of the object will be\n* used as attribute name. Value of each key can be a string or regular expression to match against attribute value.\n* @param  element Element which attributes will be tested.\n* @param match An array to populate with matching tuples.\n* @returns Returns array with matched attribute names or `null` if no attributes were matched.\n*/\nfunction matchAttributes(patterns, element, match) {\n\tlet excludeAttributes;\n\tif (typeof patterns === \"object\" && !(patterns instanceof RegExp) && !Array.isArray(patterns)) {\n\t\tif (patterns.style !== void 0) logWarning(\"matcher-pattern-deprecated-attributes-style-key\", patterns);\n\t\tif (patterns.class !== void 0) logWarning(\"matcher-pattern-deprecated-attributes-class-key\", patterns);\n\t} else excludeAttributes = [\"class\", \"style\"];\n\treturn element._collectAttributesMatch(normalizePatterns(patterns), match, excludeAttributes);\n}\n/**\n* Checks if classes of provided element can be matched against provided patterns.\n*\n* @param patterns Array of strings or regular expressions to match against element's classes.\n* @param element Element which classes will be tested.\n* @param match An array to populate with matching tuples.\n* @returns Returns array with matched class names or `null` if no classes were matched.\n*/\nfunction matchClasses(patterns, element, match) {\n\treturn element._collectAttributesMatch(normalizePatterns(patterns, \"class\"), match);\n}\n/**\n* Checks if styles of provided element can be matched against provided patterns.\n*\n* @param patterns Object with information about styles to match. Each key of the object will be\n* used as style name. Value of each key can be a string or regular expression to match against style value.\n* @param element Element which styles will be tested.\n* @param match An array to populate with matching tuples.\n* @returns Returns array with matched style names or `null` if no styles were matched.\n*/\nfunction matchStyles(patterns, element, match) {\n\treturn element._collectAttributesMatch(normalizePatterns(patterns, \"style\"), match);\n}\n/**\n* The key-value matcher pattern is missing key or value. Both must be present.\n* Refer the documentation: {@link module:engine/view/matcher~MatcherPattern}.\n*\n* @param pattern Pattern with missing properties.\n* @error matcher-pattern-missing-key-or-value\n*/\n/**\n* The key-value matcher pattern for `attributes` option is using deprecated `style` key.\n*\n* Use `styles` matcher pattern option instead:\n*\n* ```ts\n* // Instead of:\n* const pattern = {\n* \tattributes: {\n* \t\tkey1: 'value1',\n* \t\tkey2: 'value2',\n* \t\tstyle: /^border.*$/\n* \t}\n* }\n*\n* // Use:\n* const pattern = {\n* \tattributes: {\n* \t\tkey1: 'value1',\n* \t\tkey2: 'value2'\n* \t},\n* \tstyles: /^border.*$/\n* }\n* ```\n*\n* Refer to the `#update-to-ckeditor-5-v2910` section in the `Update to v29.x` section in the\n* {@glink updating/guides/updating-from-older-versions updating from older versions} guide\n* and {@link module:engine/view/matcher~MatcherPattern} documentation.\n*\n* @param pattern Pattern with missing properties.\n* @error matcher-pattern-deprecated-attributes-style-key\n*/\n/**\n* The key-value matcher pattern for `attributes` option is using deprecated `class` key.\n*\n* Use `classes` matcher pattern option instead:\n*\n* ```ts\n* // Instead of:\n* const pattern = {\n* \tattributes: {\n* \t\tkey1: 'value1',\n* \t\tkey2: 'value2',\n* \t\tclass: 'foobar'\n* \t}\n* }\n*\n* // Use:\n* const pattern = {\n* \tattributes: {\n* \t\tkey1: 'value1',\n* \t\tkey2: 'value2'\n* \t},\n* \tclasses: 'foobar'\n* }\n* ```\n*\n* Refer to the `#update-to-ckeditor-5-v2910` paragraph in the Update to v29.x guide in the\n* {@glink updating/guides/updating-from-older-versions updating from older versions} guide\n* and the {@link module:engine/view/matcher~MatcherPattern} documentation.\n*\n* @param pattern Pattern with missing properties.\n* @error matcher-pattern-deprecated-attributes-class-key\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 engine/view/stylesmap\n*/\n/**\n* Styles map. Allows handling (adding, removing, retrieving) a set of style rules (usually, of an element).\n*/\nvar StylesMap = class {\n\t/**\n\t* Keeps an internal representation of styles map. Normalized styles are kept as object tree to allow unified modification and\n\t* value access model using lodash's get, set, unset, etc methods.\n\t*\n\t* When no style processor rules are defined it acts as simple key-value storage.\n\t*/\n\t_styles;\n\t/**\n\t* Cached list of style names for faster access.\n\t*/\n\t_cachedStyleNames = null;\n\t/**\n\t* Cached list of expanded style names for faster access.\n\t*/\n\t_cachedExpandedStyleNames = null;\n\t/**\n\t* An instance of the {@link module:engine/view/stylesmap~StylesProcessor}.\n\t*/\n\t_styleProcessor;\n\t/**\n\t* Creates Styles instance.\n\t*/\n\tconstructor(styleProcessor) {\n\t\tthis._styles = {};\n\t\tthis._styleProcessor = styleProcessor;\n\t}\n\t/**\n\t* Returns true if style map has no styles set.\n\t*/\n\tget isEmpty() {\n\t\treturn !Object.entries(this._styles).length;\n\t}\n\t/**\n\t* Number of styles defined.\n\t*/\n\tget size() {\n\t\tif (this.isEmpty) return 0;\n\t\treturn this.getStyleNames().length;\n\t}\n\t/**\n\t* Set styles map to a new value.\n\t*\n\t* ```ts\n\t* styles.setTo( 'border:1px solid blue;margin-top:1px;' );\n\t* ```\n\t*/\n\tsetTo(inlineStyle) {\n\t\tthis.clear();\n\t\tconst parsedStyles = parseInlineStyles(inlineStyle);\n\t\tfor (const [key, value] of parsedStyles) this._styleProcessor.toNormalizedForm(key, value, this._styles);\n\t\treturn this;\n\t}\n\t/**\n\t* Checks if a given style is set.\n\t*\n\t* ```ts\n\t* styles.setTo( 'margin-left:1px;' );\n\t*\n\t* styles.has( 'margin-left' );    // -> true\n\t* styles.has( 'padding' );        // -> false\n\t* ```\n\t*\n\t* **Note**: This check supports normalized style names.\n\t*\n\t* ```ts\n\t* // Enable 'margin' shorthand processing:\n\t* editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t*\n\t* styles.setTo( 'margin:2px;' );\n\t*\n\t* styles.has( 'margin' );         // -> true\n\t* styles.has( 'margin-top' );     // -> true\n\t* styles.has( 'margin-left' );    // -> true\n\t*\n\t* styles.remove( 'margin-top' );\n\t*\n\t* styles.has( 'margin' );         // -> false\n\t* styles.has( 'margin-top' );     // -> false\n\t* styles.has( 'margin-left' );    // -> true\n\t* ```\n\t*\n\t* @param name Style name.\n\t*/\n\thas(name) {\n\t\tif (this.isEmpty) return false;\n\t\tconst propertyDescriptor = this._styleProcessor.getReducedForm(name, this._styles).find(([property]) => property === name);\n\t\treturn Array.isArray(propertyDescriptor);\n\t}\n\tset(nameOrObject, valueOrObject) {\n\t\tthis._cachedStyleNames = null;\n\t\tthis._cachedExpandedStyleNames = null;\n\t\tif (isObject(nameOrObject)) for (const [key, value] of Object.entries(nameOrObject)) this._styleProcessor.toNormalizedForm(key, value, this._styles);\n\t\telse this._styleProcessor.toNormalizedForm(nameOrObject, valueOrObject, this._styles);\n\t}\n\t/**\n\t* Removes given style.\n\t*\n\t* ```ts\n\t* styles.setTo( 'background:#f00;margin-right:2px;' );\n\t*\n\t* styles.remove( 'background' );\n\t*\n\t* styles.toString();   // -> 'margin-right:2px;'\n\t* ```\n\t*\n\t* ***Note**:* This method uses {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules\n\t* enabled style processor rules} to normalize passed values.\n\t*\n\t* ```ts\n\t* // Enable 'margin' shorthand processing:\n\t* editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t*\n\t* styles.setTo( 'margin:1px' );\n\t*\n\t* styles.remove( 'margin-top' );\n\t* styles.remove( 'margin-right' );\n\t*\n\t* styles.toString(); // -> 'margin-bottom:1px;margin-left:1px;'\n\t* ```\n\t*\n\t* @param names Style name or an array of names.\n\t*/\n\tremove(names) {\n\t\tconst normalizedStylesToRemove = {};\n\t\tfor (const name of toArray(names)) {\n\t\t\tconst path = toPath(name);\n\t\t\tconst pathValue = get(this._styles, path);\n\t\t\tif (pathValue) appendStyleValue(normalizedStylesToRemove, path, pathValue);\n\t\t\telse {\n\t\t\t\tconst value = this.getAsString(name);\n\t\t\t\tif (value !== void 0) this._styleProcessor.toNormalizedForm(name, value, normalizedStylesToRemove);\n\t\t\t}\n\t\t}\n\t\tif (Object.keys(normalizedStylesToRemove).length) {\n\t\t\tremoveStyles(this._styles, normalizedStylesToRemove);\n\t\t\tthis._cachedStyleNames = null;\n\t\t\tthis._cachedExpandedStyleNames = null;\n\t\t}\n\t}\n\t/**\n\t* Returns a normalized style object or a single value.\n\t*\n\t* ```ts\n\t* // Enable 'margin' shorthand processing:\n\t* editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t*\n\t* const styles = new Styles();\n\t* styles.setTo( 'margin:1px 2px 3em;' );\n\t*\n\t* styles.getNormalized( 'margin' );\n\t* // will log:\n\t* // {\n\t* //     top: '1px',\n\t* //     right: '2px',\n\t* //     bottom: '3em',\n\t* //     left: '2px'     // normalized value from margin shorthand\n\t* // }\n\t*\n\t* styles.getNormalized( 'margin-left' ); // -> '2px'\n\t* ```\n\t*\n\t* **Note**: This method will only return normalized styles if a style processor was defined.\n\t*\n\t* @param name Style name.\n\t*/\n\tgetNormalized(name) {\n\t\treturn this._styleProcessor.getNormalized(name, this._styles);\n\t}\n\t/**\n\t* Returns a normalized style string. Styles are sorted by name.\n\t*\n\t* ```ts\n\t* styles.set( 'margin' , '1px' );\n\t* styles.set( 'background', '#f00' );\n\t*\n\t* styles.toString(); // -> 'background:#f00;margin:1px;'\n\t* ```\n\t*\n\t* **Note**: This method supports normalized styles if defined.\n\t*\n\t* ```ts\n\t* // Enable 'margin' shorthand processing:\n\t* editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t*\n\t* styles.set( 'margin' , '1px' );\n\t* styles.set( 'background', '#f00' );\n\t* styles.remove( 'margin-top' );\n\t* styles.remove( 'margin-right' );\n\t*\n\t* styles.toString(); // -> 'background:#f00;margin-bottom:1px;margin-left:1px;'\n\t* ```\n\t*/\n\ttoString() {\n\t\tif (this.isEmpty) return \"\";\n\t\treturn this.getStylesEntries().map((arr) => arr.join(\":\")).sort().join(\";\") + \";\";\n\t}\n\t/**\n\t* Returns property as a value string or undefined if property is not set.\n\t*\n\t* ```ts\n\t* // Enable 'margin' shorthand processing:\n\t* editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t*\n\t* const styles = new Styles();\n\t* styles.setTo( 'margin:1px;' );\n\t* styles.set( 'margin-bottom', '3em' );\n\t*\n\t* styles.getAsString( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t* ```\n\t*\n\t* Note, however, that all sub-values must be set for the longhand property name to return a value:\n\t*\n\t* ```ts\n\t* const styles = new Styles();\n\t* styles.setTo( 'margin:1px;' );\n\t* styles.remove( 'margin-bottom' );\n\t*\n\t* styles.getAsString( 'margin' ); // -> undefined\n\t* ```\n\t*\n\t* In the above scenario, it is not possible to return a `margin` value, so `undefined` is returned.\n\t* Instead, you should use:\n\t*\n\t* ```ts\n\t* const styles = new Styles();\n\t* styles.setTo( 'margin:1px;' );\n\t* styles.remove( 'margin-bottom' );\n\t*\n\t* for ( const styleName of styles.getStyleNames() ) {\n\t* \tconsole.log( styleName, styles.getAsString( styleName ) );\n\t* }\n\t* // 'margin-top', '1px'\n\t* // 'margin-right', '1px'\n\t* // 'margin-left', '1px'\n\t* ```\n\t*\n\t* In general, it is recommend to iterate over style names like in the example above. This way, you will always get all\n\t* the currently set style values. So, if all the 4 margin values would be set\n\t* the for-of loop above would yield only `'margin'`, `'1px'`:\n\t*\n\t* ```ts\n\t* const styles = new Styles();\n\t* styles.setTo( 'margin:1px;' );\n\t*\n\t* for ( const styleName of styles.getStyleNames() ) {\n\t* \tconsole.log( styleName, styles.getAsString( styleName ) );\n\t* }\n\t* // 'margin', '1px'\n\t* ```\n\t*\n\t* **Note**: To get a normalized version of a longhand property use the {@link #getNormalized `#getNormalized()`} method.\n\t*/\n\tgetAsString(propertyName) {\n\t\tif (this.isEmpty) return;\n\t\tif (this._styles[propertyName] && !isObject(this._styles[propertyName])) return this._styles[propertyName];\n\t\tconst propertyDescriptor = this._styleProcessor.getReducedForm(propertyName, this._styles).find(([property]) => property === propertyName);\n\t\tif (Array.isArray(propertyDescriptor)) return propertyDescriptor[1];\n\t}\n\t/**\n\t* Returns all style properties names as they would appear when using {@link #toString `#toString()`}.\n\t*\n\t* When `expand` is set to true and there's a shorthand style property set, it will also return all equivalent styles:\n\t*\n\t* ```ts\n\t* stylesMap.setTo( 'margin: 1em' )\n\t* ```\n\t*\n\t* will be expanded to:\n\t*\n\t* ```ts\n\t* [ 'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ]\n\t* ```\n\t*\n\t* @param expand Expand shorthand style properties and all return equivalent style representations.\n\t*/\n\tgetStyleNames(expand = false) {\n\t\tif (this.isEmpty) return [];\n\t\tif (expand) {\n\t\t\tthis._cachedExpandedStyleNames ||= this._styleProcessor.getStyleNames(this._styles);\n\t\t\treturn this._cachedExpandedStyleNames;\n\t\t}\n\t\tthis._cachedStyleNames ||= this.getStylesEntries().map(([key]) => key);\n\t\treturn this._cachedStyleNames;\n\t}\n\t/**\n\t* Alias for {@link #getStyleNames}.\n\t*/\n\tkeys() {\n\t\treturn this.getStyleNames();\n\t}\n\t/**\n\t* Removes all styles.\n\t*/\n\tclear() {\n\t\tthis._styles = {};\n\t\tthis._cachedStyleNames = null;\n\t\tthis._cachedExpandedStyleNames = null;\n\t}\n\t/**\n\t* Returns `true` if both attributes have the same styles.\n\t*/\n\tisSimilar(other) {\n\t\tif (this.size !== other.size) return false;\n\t\tfor (const property of this.getStyleNames()) if (!other.has(property) || other.getAsString(property) !== this.getAsString(property)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Returns normalized styles entries for further processing.\n\t*/\n\tgetStylesEntries() {\n\t\tconst parsed = [];\n\t\tconst keys = Object.keys(this._styles);\n\t\tfor (const key of keys) parsed.push(...this._styleProcessor.getReducedForm(key, this._styles));\n\t\treturn parsed;\n\t}\n\t/**\n\t* Clones the attribute value.\n\t*\n\t* @internal\n\t*/\n\t_clone() {\n\t\tconst clone = new this.constructor(this._styleProcessor);\n\t\tclone.set(this.getNormalized());\n\t\treturn clone;\n\t}\n\t/**\n\t* Used by the {@link module:engine/view/matcher~Matcher Matcher} to collect matching styles.\n\t*\n\t* @internal\n\t* @param tokenPattern The matched style name pattern.\n\t* @param valuePattern The matched style value pattern.\n\t* @returns An array of matching tokens (style names).\n\t*/\n\t_getTokensMatch(tokenPattern, valuePattern) {\n\t\tconst match = [];\n\t\tfor (const styleName of this.getStyleNames(true)) if (isPatternMatched(tokenPattern, styleName)) {\n\t\t\tif (valuePattern === true) {\n\t\t\t\tmatch.push(styleName);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst value = this.getAsString(styleName);\n\t\t\tif (isPatternMatched(valuePattern, value)) match.push(styleName);\n\t\t}\n\t\treturn match.length ? match : void 0;\n\t}\n\t/**\n\t* Returns a list of consumables for the attribute. This includes related styles.\n\t*\n\t* Could be filtered by the given style name.\n\t*\n\t* @internal\n\t*/\n\t_getConsumables(name) {\n\t\tconst result = [];\n\t\tif (name) {\n\t\t\tresult.push(name);\n\t\t\tfor (const relatedName of this._styleProcessor.getRelatedStyles(name)) result.push(relatedName);\n\t\t} else for (const name of this.getStyleNames()) {\n\t\t\tfor (const relatedName of this._styleProcessor.getRelatedStyles(name)) result.push(relatedName);\n\t\t\tresult.push(name);\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_canMergeAttributesFrom} to verify if the given attribute can be merged without\n\t* conflicts into the attribute.\n\t*\n\t* This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t*\n\t* @internal\n\t*/\n\t_canMergeFrom(other) {\n\t\tfor (const key of other.getStyleNames()) if (this.has(key) && this.getAsString(key) !== other.getAsString(key)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_mergeAttributesFrom} to merge a given attribute into the attribute.\n\t*\n\t* This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t*\n\t* @internal\n\t*/\n\t_mergeFrom(other) {\n\t\tfor (const prop of other.getStyleNames()) if (!this.has(prop)) this.set(prop, other.getAsString(prop));\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_canSubtractAttributesOf} to verify if the given attribute can be fully\n\t* subtracted from the attribute.\n\t*\n\t* This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t*\n\t* @internal\n\t*/\n\t_isMatching(other) {\n\t\tfor (const key of other.getStyleNames()) if (!this.has(key) || this.getAsString(key) !== other.getAsString(key)) return false;\n\t\treturn true;\n\t}\n};\n/**\n* Style processor is responsible for writing and reading a normalized styles object.\n*/\nvar StylesProcessor = class {\n\t_normalizers;\n\t_extractors;\n\t_reducers;\n\t_consumables;\n\t/**\n\t* Creates StylesProcessor instance.\n\t*\n\t* @internal\n\t*/\n\tconstructor() {\n\t\tthis._normalizers = /* @__PURE__ */ new Map();\n\t\tthis._extractors = /* @__PURE__ */ new Map();\n\t\tthis._reducers = /* @__PURE__ */ new Map();\n\t\tthis._consumables = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* Parse style string value to a normalized object and appends it to styles object.\n\t*\n\t* ```ts\n\t* const styles = {};\n\t*\n\t* stylesProcessor.toNormalizedForm( 'margin', '1px', styles );\n\t*\n\t* // styles will consist: { margin: { top: '1px', right: '1px', bottom: '1px', left: '1px; } }\n\t* ```\n\t*\n\t* **Note**: To define normalizer callbacks use {@link #setNormalizer}.\n\t*\n\t* @param name Name of style property.\n\t* @param propertyValue Value of style property.\n\t* @param styles Object holding normalized styles.\n\t*/\n\ttoNormalizedForm(name, propertyValue, styles) {\n\t\tif (isObject(propertyValue)) {\n\t\t\tappendStyleValue(styles, toPath(name), propertyValue);\n\t\t\treturn;\n\t\t}\n\t\tif (this._normalizers.has(name)) {\n\t\t\tconst { path, value } = this._normalizers.get(name)(propertyValue);\n\t\t\tappendStyleValue(styles, path, value);\n\t\t} else appendStyleValue(styles, name, propertyValue);\n\t}\n\t/**\n\t* Returns a normalized version of a style property.\n\t*\n\t* ```ts\n\t* const styles = {\n\t* \tmargin: { top: '1px', right: '1px', bottom: '1px', left: '1px; },\n\t* \tbackground: { color: '#f00' }\n\t* };\n\t*\n\t* stylesProcessor.getNormalized( 'background' );\n\t* // will return: { color: '#f00' }\n\t*\n\t* stylesProcessor.getNormalized( 'margin-top' );\n\t* // will return: '1px'\n\t* ```\n\t*\n\t* **Note**: In some cases extracting single value requires defining an extractor callback {@link #setExtractor}.\n\t*\n\t* @param name Name of style property.\n\t* @param styles Object holding normalized styles.\n\t*/\n\tgetNormalized(name, styles) {\n\t\tif (!name) return merge({}, styles);\n\t\tif (styles[name] !== void 0) return styles[name];\n\t\tif (this._extractors.has(name)) {\n\t\t\tconst extractor = this._extractors.get(name);\n\t\t\tif (typeof extractor === \"string\") return get(styles, extractor);\n\t\t\tconst value = extractor(name, styles);\n\t\t\tif (value) return value;\n\t\t}\n\t\treturn get(styles, toPath(name));\n\t}\n\t/**\n\t* Returns a reduced form of style property form normalized object.\n\t*\n\t* For default margin reducer, the below code:\n\t*\n\t* ```ts\n\t* stylesProcessor.getReducedForm( 'margin', {\n\t* \tmargin: { top: '1px', right: '1px', bottom: '2px', left: '1px; }\n\t* } );\n\t* ```\n\t*\n\t* will return:\n\t*\n\t* ```ts\n\t* [\n\t* \t[ 'margin', '1px 1px 2px' ]\n\t* ]\n\t* ```\n\t*\n\t* because it might be represented as a shorthand 'margin' value. However if one of margin long hand values is missing it should return:\n\t*\n\t* ```ts\n\t* [\n\t* \t[ 'margin-top', '1px' ],\n\t* \t[ 'margin-right', '1px' ],\n\t* \t[ 'margin-bottom', '2px' ]\n\t* \t// the 'left' value is missing - cannot use 'margin' shorthand.\n\t* ]\n\t* ```\n\t*\n\t* **Note**: To define reducer callbacks use {@link #setReducer}.\n\t*\n\t* @param name Name of style property.\n\t*/\n\tgetReducedForm(name, styles) {\n\t\tconst normalizedValue = this.getNormalized(name, styles);\n\t\tif (normalizedValue === void 0) return [];\n\t\tif (this._reducers.has(name)) return this._reducers.get(name)(normalizedValue);\n\t\treturn [[name, normalizedValue]];\n\t}\n\t/**\n\t* Return all style properties. Also expand shorthand properties (e.g. `margin`, `background`) if respective extractor is available.\n\t*\n\t* @param styles Object holding normalized styles.\n\t*/\n\tgetStyleNames(styles) {\n\t\tconst styleNamesKeysSet = /* @__PURE__ */ new Set();\n\t\tfor (const name of this._consumables.keys()) {\n\t\t\tconst style = this.getNormalized(name, styles);\n\t\t\tif (style && (typeof style != \"object\" || Object.keys(style).length)) styleNamesKeysSet.add(name);\n\t\t}\n\t\tfor (const name of Object.keys(styles)) styleNamesKeysSet.add(name);\n\t\treturn Array.from(styleNamesKeysSet);\n\t}\n\t/**\n\t* Returns related style names.\n\t*\n\t* ```ts\n\t* stylesProcessor.getRelatedStyles( 'margin' );\n\t* // will return: [ 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ];\n\t*\n\t* stylesProcessor.getRelatedStyles( 'margin-top' );\n\t* // will return: [ 'margin' ];\n\t* ```\n\t*\n\t* **Note**: To define new style relations load an existing style processor or use\n\t* {@link module:engine/view/stylesmap~StylesProcessor#setStyleRelation `StylesProcessor.setStyleRelation()`}.\n\t*/\n\tgetRelatedStyles(name) {\n\t\treturn this._consumables.get(name) || [];\n\t}\n\t/**\n\t* Adds a normalizer method for a style property.\n\t*\n\t* A normalizer returns describing how the value should be normalized.\n\t*\n\t* For instance 'margin' style is a shorthand for four margin values:\n\t*\n\t* - 'margin-top'\n\t* - 'margin-right'\n\t* - 'margin-bottom'\n\t* - 'margin-left'\n\t*\n\t* and can be written in various ways if some values are equal to others. For instance `'margin: 1px 2em;'` is a shorthand for\n\t* `'margin-top: 1px;margin-right: 2em;margin-bottom: 1px;margin-left: 2em'`.\n\t*\n\t* A normalizer should parse various margin notations as a single object:\n\t*\n\t* ```ts\n\t* const styles = {\n\t* \tmargin: {\n\t* \t\ttop: '1px',\n\t* \t\tright: '2em',\n\t* \t\tbottom: '1px',\n\t* \t\tleft: '2em'\n\t* \t}\n\t* };\n\t* ```\n\t*\n\t* Thus a normalizer for 'margin' style should return an object defining style path and value to store:\n\t*\n\t* ```ts\n\t* const returnValue = {\n\t* \tpath: 'margin',\n\t* \tvalue: {\n\t* \t\ttop: '1px',\n\t* \t\tright: '2em',\n\t* \t\tbottom: '1px',\n\t* \t\tleft: '2em'\n\t* \t}\n\t* };\n\t* ```\n\t*\n\t* Additionally to fully support all margin notations there should be also defined 4 normalizers for longhand margin notations. Below\n\t* is an example for 'margin-top' style property normalizer:\n\t*\n\t* ```ts\n\t* stylesProcessor.setNormalizer( 'margin-top', valueString => {\n\t* \treturn {\n\t* \t\tpath: 'margin.top',\n\t* \t\tvalue: valueString\n\t* \t}\n\t* } );\n\t* ```\n\t*/\n\tsetNormalizer(name, callback) {\n\t\tthis._normalizers.set(name, callback);\n\t}\n\t/**\n\t* Adds a extractor callback for a style property.\n\t*\n\t* Most normalized style values are stored as one level objects. It is assumed that `'margin-top'` style will be stored as:\n\t*\n\t* ```ts\n\t* const styles = {\n\t* \tmargin: {\n\t* \t\ttop: 'value'\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* However, some styles can have conflicting notations and thus it might be harder to extract a style value from shorthand. For instance\n\t* the 'border-top-style' can be defined using `'border-top:solid'`, `'border-style:solid none none none'` or by `'border:solid'`\n\t* shorthands. The default border styles processors stores styles as:\n\t*\n\t* ```ts\n\t* const styles = {\n\t* \tborder: {\n\t* \t\tstyle: {\n\t* \t\t\ttop: 'solid'\n\t* \t\t}\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* as it is better to modify border style independently from other values. On the other part the output of the border might be\n\t* desired as `border-top`, `border-left`, etc notation.\n\t*\n\t* In the above example an extractor should return a side border value that combines style, color and width:\n\t*\n\t* ```ts\n\t* styleProcessor.setExtractor( 'border-top', styles => {\n\t* \treturn {\n\t* \t\tcolor: styles.border.color.top,\n\t* \t\tstyle: styles.border.style.top,\n\t* \t\twidth: styles.border.width.top\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* @param callbackOrPath Callback that return a requested value or path string for single values.\n\t*/\n\tsetExtractor(name, callbackOrPath) {\n\t\tthis._extractors.set(name, callbackOrPath);\n\t}\n\t/**\n\t* Adds a reducer callback for a style property.\n\t*\n\t* Reducer returns a minimal notation for given style name. For longhand properties it is not required to write a reducer as\n\t* by default the direct value from style path is taken.\n\t*\n\t* For shorthand styles a reducer should return minimal style notation either by returning single name-value tuple or multiple tuples\n\t* if a shorthand cannot be used. For instance for a margin shorthand a reducer might return:\n\t*\n\t* ```ts\n\t* const marginShortHandTuple = [\n\t* \t[ 'margin', '1px 1px 2px' ]\n\t* ];\n\t* ```\n\t*\n\t* or a longhand tuples for defined values:\n\t*\n\t* ```ts\n\t* // Considering margin.bottom and margin.left are undefined.\n\t* const marginLonghandsTuples = [\n\t* \t[ 'margin-top', '1px' ],\n\t* \t[ 'margin-right', '1px' ]\n\t* ];\n\t* ```\n\t*\n\t* A reducer obtains a normalized style value:\n\t*\n\t* ```ts\n\t* // Simplified reducer that always outputs 4 values which are always present:\n\t* stylesProcessor.setReducer( 'margin', margin => {\n\t* \treturn [\n\t* \t\t[ 'margin', `${ margin.top } ${ margin.right } ${ margin.bottom } ${ margin.left }` ]\n\t* \t]\n\t* } );\n\t* ```\n\t*/\n\tsetReducer(name, callback) {\n\t\tthis._reducers.set(name, callback);\n\t}\n\t/**\n\t* Defines a style shorthand relation to other style notations.\n\t*\n\t* ```ts\n\t* stylesProcessor.setStyleRelation( 'margin', [\n\t* \t'margin-top',\n\t* \t'margin-right',\n\t* \t'margin-bottom',\n\t* \t'margin-left'\n\t* ] );\n\t* ```\n\t*\n\t* This enables expanding of style names for shorthands. For instance, if defined,\n\t* {@link module:engine/conversion/viewconsumable~ViewConsumable view consumable} items are automatically created\n\t* for long-hand margin style notation alongside the `'margin'` item.\n\t*\n\t* This means that when an element being converted has a style `margin`, a converter for `margin-left` will work just\n\t* fine since the view consumable will contain a consumable `margin-left` item (thanks to the relation) and\n\t* `element.getStyle( 'margin-left' )` will work as well assuming that the style processor was correctly configured.\n\t* However, once `margin-left` is consumed, `margin` will not be consumable anymore.\n\t*/\n\tsetStyleRelation(shorthandName, styleNames) {\n\t\tthis._mapStyleNames(shorthandName, styleNames);\n\t\tfor (const alsoName of styleNames) this._mapStyleNames(alsoName, [shorthandName]);\n\t}\n\t/**\n\t* Set two-way binding of style names.\n\t*/\n\t_mapStyleNames(name, styleNames) {\n\t\tif (!this._consumables.has(name)) this._consumables.set(name, []);\n\t\tthis._consumables.get(name).push(...styleNames);\n\t}\n};\n/**\n* Parses inline styles and puts property - value pairs into styles map.\n*\n* @param stylesString Styles to parse.\n* @returns Map of parsed properties and values.\n*/\nfunction parseInlineStyles(stylesString) {\n\tlet quoteType = null;\n\tlet propertyNameStart = 0;\n\tlet propertyValueStart = 0;\n\tlet propertyName = null;\n\tconst stylesMap = /* @__PURE__ */ new Map();\n\tif (stylesString === \"\") return stylesMap;\n\tif (stylesString.charAt(stylesString.length - 1) != \";\") stylesString = stylesString + \";\";\n\tfor (let i = 0; i < stylesString.length; i++) {\n\t\tconst char = stylesString.charAt(i);\n\t\tif (quoteType === null) switch (char) {\n\t\t\tcase \":\":\n\t\t\t\tif (!propertyName) {\n\t\t\t\t\tpropertyName = stylesString.substr(propertyNameStart, i - propertyNameStart);\n\t\t\t\t\tpropertyValueStart = i + 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"\\\"\":\n\t\t\tcase \"'\":\n\t\t\t\tquoteType = char;\n\t\t\t\tbreak;\n\t\t\tcase \";\": {\n\t\t\t\tconst propertyValue = stylesString.substr(propertyValueStart, i - propertyValueStart);\n\t\t\t\tif (propertyName) stylesMap.set(propertyName.trim(), propertyValue.trim());\n\t\t\t\tpropertyName = null;\n\t\t\t\tpropertyNameStart = i + 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if (char === quoteType) quoteType = null;\n\t}\n\treturn stylesMap;\n}\n/**\n* Return lodash compatible path from style name.\n*/\nfunction toPath(name) {\n\treturn name.replace(\"-\", \".\");\n}\n/**\n* Appends style definition to the styles object.\n*/\nfunction appendStyleValue(stylesObject, nameOrPath, valueOrObject) {\n\tlet valueToSet = valueOrObject;\n\tif (isObject(valueOrObject) && !Array.isArray(valueOrObject)) valueToSet = merge({}, get(stylesObject, nameOrPath), valueOrObject);\n\tset(stylesObject, nameOrPath, valueToSet);\n}\n/**\n* Modifies the `styles` deeply nested object by removing properties defined in `toRemove`.\n*/\nfunction removeStyles(styles, toRemove) {\n\tfor (const key of Object.keys(toRemove)) if (styles[key] !== null && !Array.isArray(styles[key]) && typeof styles[key] == \"object\" && typeof toRemove[key] == \"object\") {\n\t\tremoveStyles(styles[key], toRemove[key]);\n\t\tif (!Object.keys(styles[key]).length) delete styles[key];\n\t} else delete styles[key];\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 engine/view/tokenlist\n*/\n/**\n* Token list. Allows handling (adding, removing, retrieving) a set of tokens (for example class names).\n*/\nvar ViewTokenList = class {\n\t/**\n\t* The set of tokens.\n\t*/\n\t_set = /* @__PURE__ */ new Set();\n\t/**\n\t* Returns true if token list has no tokens set.\n\t*/\n\tget isEmpty() {\n\t\treturn this._set.size == 0;\n\t}\n\t/**\n\t* Number of tokens.\n\t*/\n\tget size() {\n\t\treturn this._set.size;\n\t}\n\t/**\n\t* Checks if a given token is set.\n\t*/\n\thas(name) {\n\t\treturn this._set.has(name);\n\t}\n\t/**\n\t* Returns all tokens.\n\t*/\n\tkeys() {\n\t\treturn Array.from(this._set.keys());\n\t}\n\t/**\n\t* Resets the value to the given one.\n\t*/\n\tsetTo(value) {\n\t\tthis.clear();\n\t\tfor (const token of value.split(/\\s+/)) if (token) this._set.add(token);\n\t\treturn this;\n\t}\n\t/**\n\t* Sets a given token without affecting other tokens.\n\t*/\n\tset(tokens) {\n\t\tfor (const token of toArray(tokens)) if (token) this._set.add(token);\n\t}\n\t/**\n\t* Removes given token.\n\t*/\n\tremove(tokens) {\n\t\tfor (const token of toArray(tokens)) this._set.delete(token);\n\t}\n\t/**\n\t* Removes all tokens.\n\t*/\n\tclear() {\n\t\tthis._set.clear();\n\t}\n\t/**\n\t* Returns a normalized tokens string.\n\t*/\n\ttoString() {\n\t\treturn Array.from(this._set).join(\" \");\n\t}\n\t/**\n\t* Returns `true` if both attributes have the same tokens.\n\t*/\n\tisSimilar(other) {\n\t\tif (this.size !== other.size) return false;\n\t\tfor (const token of this.keys()) if (!other.has(token)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Clones the attribute value.\n\t*\n\t* @internal\n\t*/\n\t_clone() {\n\t\tconst clone = new this.constructor();\n\t\tclone._set = new Set(this._set);\n\t\treturn clone;\n\t}\n\t/**\n\t* Used by the {@link module:engine/view/matcher~Matcher Matcher} to collect matching attribute tokens.\n\t*\n\t* @internal\n\t* @param tokenPattern The matched token name pattern.\n\t* @returns An array of matching tokens.\n\t*/\n\t_getTokensMatch(tokenPattern) {\n\t\tconst match = [];\n\t\tif (tokenPattern === true) {\n\t\t\tfor (const token of this._set.keys()) match.push(token);\n\t\t\treturn match;\n\t\t}\n\t\tif (typeof tokenPattern == \"string\") {\n\t\t\tfor (const token of tokenPattern.split(/\\s+/)) if (this._set.has(token)) match.push(token);\n\t\t\telse return;\n\t\t\treturn match;\n\t\t}\n\t\tfor (const token of this._set.keys()) if (token.match(tokenPattern)) match.push(token);\n\t\treturn match.length ? match : void 0;\n\t}\n\t/**\n\t* Returns a list of consumables for the attribute.\n\t*\n\t* Could be filtered by the given token name.\n\t*\n\t* @internal\n\t*/\n\t_getConsumables(name) {\n\t\treturn name ? [name] : this.keys();\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_canMergeAttributesFrom} to verify if the given attribute\n\t* can be merged without conflicts into the attribute.\n\t*\n\t* This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while downcasting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other `AttributeElement`.\n\t*\n\t* @internal\n\t*/\n\t_canMergeFrom() {\n\t\treturn true;\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_mergeAttributesFrom} to merge a given attribute into the attribute.\n\t*\n\t* This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t*\n\t* @internal\n\t*/\n\t_mergeFrom(other) {\n\t\tfor (const token of other._set.keys()) if (!this._set.has(token)) this._set.add(token);\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_canSubtractAttributesOf} to verify if the given attribute\n\t* can be fully subtracted from the attribute.\n\t*\n\t* This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t*\n\t* @internal\n\t*/\n\t_isMatching(other) {\n\t\tfor (const name of other._set.keys()) if (!this._set.has(name)) return false;\n\t\treturn 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 engine/view/element\n*/\n/**\n* View element.\n*\n* The editing engine does not define a fixed semantics of its elements (it is \"DTD-free\").\n* This is why the type of the {@link module:engine/view/element~ViewElement} need to\n* be defined by the feature developer. When creating an element you should use one of the following methods:\n*\n* * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement `downcastWriter#createContainerElement()`}\n* in order to create a {@link module:engine/view/containerelement~ViewContainerElement},\n* * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement `downcastWriter#createAttributeElement()`}\n* in order to create a {@link module:engine/view/attributeelement~ViewAttributeElement},\n* * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`}\n* in order to create a {@link module:engine/view/emptyelement~ViewEmptyElement}.\n* * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `downcastWriter#createUIElement()`}\n* in order to create a {@link module:engine/view/uielement~ViewUIElement}.\n* * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEditableElement `downcastWriter#createEditableElement()`}\n* in order to create a {@link module:engine/view/editableelement~ViewEditableElement}.\n*\n* Note that for view elements which are not created from the model, like elements from mutations, paste or\n* {@link module:engine/controller/datacontroller~DataController#set data.set} it is not possible to define the type of the element.\n* In such cases the {@link module:engine/view/upcastwriter~ViewUpcastWriter#createElement `UpcastWriter#createElement()`} method\n* should be used to create generic view elements.\n*/\nvar ViewElement = class ViewElement extends ViewNode {\n\t/**\n\t* Name of the element.\n\t*/\n\tname;\n\t/**\n\t* A list of attribute names that should be rendered in the editing pipeline even though filtering mechanisms\n\t* implemented in the {@link module:engine/view/domconverter~ViewDomConverter} (for instance,\n\t* {@link module:engine/view/domconverter~ViewDomConverter#shouldRenderAttribute}) would filter them out.\n\t*\n\t* These attributes can be specified as an option when the element is created by\n\t* the {@link module:engine/view/downcastwriter~ViewDowncastWriter}. To check whether an unsafe an attribute should\n\t* be permitted, use the {@link #shouldRenderUnsafeAttribute} method.\n\t*\n\t* @internal\n\t*/\n\t_unsafeAttributesToRender = [];\n\t/**\n\t* Map of attributes, where attributes names are keys and attributes values are values.\n\t*/\n\t_attrs;\n\t/**\n\t* Array of child nodes.\n\t*/\n\t_children;\n\t/**\n\t* Map of custom properties.\n\t* Custom properties can be added to element instance, will be cloned but not rendered into DOM.\n\t*/\n\t_customProperties = /* @__PURE__ */ new Map();\n\t/**\n\t* Set of classes associated with element instance.\n\t*\n\t* Note that this is just an alias for `this._attrs.get( 'class' );`\n\t*/\n\tget _classes() {\n\t\treturn this._attrs.get(\"class\");\n\t}\n\t/**\n\t* Normalized styles.\n\t*\n\t* Note that this is just an alias for `this._attrs.get( 'style' );`\n\t*/\n\tget _styles() {\n\t\treturn this._attrs.get(\"style\");\n\t}\n\t/**\n\t* Creates a view element.\n\t*\n\t* Attributes can be passed in various formats:\n\t*\n\t* ```ts\n\t* new Element( viewDocument, 'div', { class: 'editor', contentEditable: 'true' } ); // object\n\t* new Element( viewDocument, 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t* new Element( viewDocument, 'div', mapOfAttributes ); // map\n\t* ```\n\t*\n\t* @internal\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t* @param attrs Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t*/\n\tconstructor(document, name, attrs, children) {\n\t\tsuper(document);\n\t\tthis.name = name;\n\t\tthis._attrs = this._parseAttributes(attrs);\n\t\tthis._children = [];\n\t\tif (children) this._insertChild(0, children);\n\t}\n\t/**\n\t* Number of element's children.\n\t*/\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\t/**\n\t* Is `true` if there are no nodes inside this element, `false` otherwise.\n\t*/\n\tget isEmpty() {\n\t\treturn this._children.length === 0;\n\t}\n\t/**\n\t* Gets child at the given index.\n\t*\n\t* @param index Index of child.\n\t* @returns Child node.\n\t*/\n\tgetChild(index) {\n\t\treturn this._children[index];\n\t}\n\t/**\n\t* Gets index of the given child node. Returns `-1` if child node is not found.\n\t*\n\t* @param node Child node.\n\t* @returns Index of the child node.\n\t*/\n\tgetChildIndex(node) {\n\t\treturn this._children.indexOf(node);\n\t}\n\t/**\n\t* Gets child nodes iterator.\n\t*\n\t* @returns Child nodes iterator.\n\t*/\n\tgetChildren() {\n\t\treturn this._children[Symbol.iterator]();\n\t}\n\t/**\n\t* Returns an iterator that contains the keys for attributes. Order of inserting attributes is not preserved.\n\t*\n\t* @returns Keys for attributes.\n\t*/\n\t*getAttributeKeys() {\n\t\tif (this._classes) yield \"class\";\n\t\tif (this._styles) yield \"style\";\n\t\tfor (const key of this._attrs.keys()) if (key != \"class\" && key != \"style\") yield key;\n\t}\n\t/**\n\t* Returns iterator that iterates over this element's attributes.\n\t*\n\t* Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t* This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t*/\n\t*getAttributes() {\n\t\tfor (const [name, value] of this._attrs.entries()) yield [name, String(value)];\n\t}\n\t/**\n\t* Gets attribute by key. If attribute is not present - returns undefined.\n\t*\n\t* @param key Attribute key.\n\t* @returns Attribute value.\n\t*/\n\tgetAttribute(key) {\n\t\treturn this._attrs.has(key) ? String(this._attrs.get(key)) : void 0;\n\t}\n\t/**\n\t* Returns a boolean indicating whether an attribute with the specified key exists in the element.\n\t*\n\t* @param key Attribute key.\n\t* @returns `true` if attribute with the specified key exists in the element, `false` otherwise.\n\t*/\n\thasAttribute(key, token) {\n\t\tif (!this._attrs.has(key)) return false;\n\t\tif (token !== void 0) {\n\t\t\tif (usesStylesMap(this.name, key) || usesTokenList(this.name, key)) return this._attrs.get(key).has(token);\n\t\t\telse return this._attrs.get(key) === token;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Checks if this element is similar to other element.\n\t* Both elements should have the same name and attributes to be considered as similar. Two similar elements\n\t* can contain different set of children nodes.\n\t*/\n\tisSimilar(otherElement) {\n\t\tif (!(otherElement instanceof ViewElement)) return false;\n\t\tif (this === otherElement) return true;\n\t\tif (this.name != otherElement.name) return false;\n\t\tif (this._attrs.size !== otherElement._attrs.size) return false;\n\t\tfor (const [key, value] of this._attrs) {\n\t\t\tconst otherValue = otherElement._attrs.get(key);\n\t\t\tif (otherValue === void 0) return false;\n\t\t\tif (typeof value == \"string\" || typeof otherValue == \"string\") {\n\t\t\t\tif (otherValue !== value) return false;\n\t\t\t} else if (!value.isSimilar(otherValue)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Returns true if class is present.\n\t* If more then one class is provided - returns true only when all classes are present.\n\t*\n\t* ```ts\n\t* element.hasClass( 'foo' ); // Returns true if 'foo' class is present.\n\t* element.hasClass( 'foo', 'bar' ); // Returns true if 'foo' and 'bar' classes are both present.\n\t* ```\n\t*/\n\thasClass(...className) {\n\t\tfor (const name of className) if (!this._classes || !this._classes.has(name)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Returns iterator that contains all class names.\n\t*/\n\tgetClassNames() {\n\t\tconst array = this._classes ? this._classes.keys() : [];\n\t\tconst iterator = array[Symbol.iterator]();\n\t\treturn Object.assign(array, { next: iterator.next.bind(iterator) });\n\t}\n\t/**\n\t* Returns style value for the given property name.\n\t* If the style does not exist `undefined` is returned.\n\t*\n\t* **Note**: This method can work with normalized style names if\n\t* {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t* See {@link module:engine/view/stylesmap~StylesMap#getAsString `StylesMap#getAsString()`} for details.\n\t*\n\t* For an element with style set to `'margin:1px'`:\n\t*\n\t* ```ts\n\t* // Enable 'margin' shorthand processing:\n\t* editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t*\n\t* const element = view.change( writer => {\n\t* \tconst element = writer.createElement();\n\t* \twriter.setStyle( 'margin', '1px' );\n\t* \twriter.setStyle( 'margin-bottom', '3em' );\n\t*\n\t* \treturn element;\n\t* } );\n\t*\n\t* element.getStyle( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t* ```\n\t*/\n\tgetStyle(property) {\n\t\treturn this._styles && this._styles.getAsString(property);\n\t}\n\t/**\n\t* Returns a normalized style object or single style value.\n\t*\n\t* For an element with style set to: margin:1px 2px 3em;\n\t*\n\t* ```ts\n\t* element.getNormalizedStyle( 'margin' ) );\n\t* ```\n\t*\n\t* will return:\n\t*\n\t* ```ts\n\t* {\n\t* \ttop: '1px',\n\t* \tright: '2px',\n\t* \tbottom: '3em',\n\t* \tleft: '2px'    // a normalized value from margin shorthand\n\t* }\n\t* ```\n\t*\n\t* and reading for single style value:\n\t*\n\t* ```ts\n\t* styles.getNormalizedStyle( 'margin-left' );\n\t* ```\n\t*\n\t* Will return a `2px` string.\n\t*\n\t* **Note**: This method will return normalized values only if\n\t* {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t* See {@link module:engine/view/stylesmap~StylesMap#getNormalized `StylesMap#getNormalized()`} for details.\n\t*\n\t* @param property Name of CSS property\n\t*/\n\tgetNormalizedStyle(property) {\n\t\treturn this._styles && this._styles.getNormalized(property);\n\t}\n\t/**\n\t* Returns an array that contains all style names.\n\t*\n\t* @param expand Expand shorthand style properties and return all equivalent style representations.\n\t*/\n\tgetStyleNames(expand) {\n\t\treturn this._styles ? this._styles.getStyleNames(expand) : [];\n\t}\n\t/**\n\t* Returns true if style keys are present.\n\t* If more then one style property is provided - returns true only when all properties are present.\n\t*\n\t* ```ts\n\t* element.hasStyle( 'color' ); // Returns true if 'border-top' style is present.\n\t* element.hasStyle( 'color', 'border-top' ); // Returns true if 'color' and 'border-top' styles are both present.\n\t* ```\n\t*/\n\thasStyle(...property) {\n\t\tfor (const name of property) if (!this._styles || !this._styles.has(name)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Returns ancestor element that match specified pattern.\n\t* Provided patterns should be compatible with {@link module:engine/view/matcher~Matcher Matcher} as it is used internally.\n\t*\n\t* @see module:engine/view/matcher~Matcher\n\t* @param patterns Patterns used to match correct ancestor. See {@link module:engine/view/matcher~Matcher}.\n\t* @returns Found element or `null` if no matching ancestor was found.\n\t*/\n\tfindAncestor(...patterns) {\n\t\tconst matcher = new Matcher(...patterns);\n\t\tlet parent = this.parent;\n\t\twhile (parent && !parent.is(\"documentFragment\")) {\n\t\t\tif (matcher.match(parent)) return parent;\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Returns the custom property value for the given key.\n\t*/\n\tgetCustomProperty(key) {\n\t\treturn this._customProperties.get(key);\n\t}\n\t/**\n\t* Returns an iterator which iterates over this element's custom properties.\n\t* Iterator provides `[ key, value ]` pairs for each stored property.\n\t*/\n\t*getCustomProperties() {\n\t\tyield* this._customProperties.entries();\n\t}\n\t/**\n\t* Returns identity string based on element's name, styles, classes and other attributes.\n\t* Two elements that {@link #isSimilar are similar} will have same identity string.\n\t* It has the following format:\n\t*\n\t* ```ts\n\t* 'name class=\"class1,class2\" style=\"style1:value1;style2:value2\" attr1=\"val1\" attr2=\"val2\"'\n\t* ```\n\t*\n\t* For example:\n\t*\n\t* ```ts\n\t* const element = writer.createContainerElement( 'foo', {\n\t* \tbanana: '10',\n\t* \tapple: '20',\n\t* \tstyle: 'color: red; border-color: white;',\n\t* \tclass: 'baz'\n\t* } );\n\t*\n\t* // returns 'foo class=\"baz\" style=\"border-color:white;color:red\" apple=\"20\" banana=\"10\"'\n\t* element.getIdentity();\n\t* ```\n\t*\n\t* **Note**: Classes, styles and other attributes are sorted alphabetically.\n\t*/\n\tgetIdentity() {\n\t\tconst classes = this._classes ? this._classes.keys().sort().join(\",\") : \"\";\n\t\tconst styles = this._styles && String(this._styles);\n\t\tconst attributes = Array.from(this._attrs).filter(([key]) => key != \"style\" && key != \"class\").map((i) => `${i[0]}=\"${i[1]}\"`).sort().join(\" \");\n\t\treturn this.name + (classes == \"\" ? \"\" : ` class=\"${classes}\"`) + (!styles ? \"\" : ` style=\"${styles}\"`) + (attributes == \"\" ? \"\" : ` ${attributes}`);\n\t}\n\t/**\n\t* Decides whether an unsafe attribute is whitelisted and should be rendered in the editing pipeline even though filtering mechanisms\n\t* like {@link module:engine/view/domconverter~ViewDomConverter#shouldRenderAttribute} say it should not.\n\t*\n\t* Unsafe attribute names can be specified when creating an element via {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t*\n\t* @param attributeName The name of the attribute to be checked.\n\t*/\n\tshouldRenderUnsafeAttribute(attributeName) {\n\t\treturn this._unsafeAttributesToRender.includes(attributeName);\n\t}\n\t/**\n\t* Converts `ViewElement` to plain object and returns it.\n\t*\n\t* @returns `ViewElement` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.name = this.name;\n\t\tjson.type = \"Element\";\n\t\tif (this._attrs.size) json.attributes = Object.fromEntries(this.getAttributes());\n\t\tif (this._children.length > 0) {\n\t\t\tjson.children = [];\n\t\t\tfor (const node of this._children) json.children.push(node.toJSON());\n\t\t}\n\t\treturn json;\n\t}\n\t/**\n\t* Clones provided element.\n\t*\n\t* @internal\n\t* @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t* element will be cloned without any children.\n\t* @returns Clone of this element.\n\t*/\n\t_clone(deep = false) {\n\t\tconst childrenClone = [];\n\t\tif (deep) for (const child of this.getChildren()) childrenClone.push(child._clone(deep));\n\t\tconst cloned = new this.constructor(this.document, this.name, this._attrs, childrenClone);\n\t\tcloned._customProperties = new Map(this._customProperties);\n\t\tcloned.getFillerOffset = this.getFillerOffset;\n\t\tcloned._unsafeAttributesToRender = this._unsafeAttributesToRender;\n\t\treturn cloned;\n\t}\n\t/**\n\t* {@link module:engine/view/element~ViewElement#_insertChild Insert} a child node or a list of child nodes at the end of this node\n\t* and sets the parent of these nodes to this element.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#insert\n\t* @internal\n\t* @param items Items to be inserted.\n\t* @fires change\n\t* @returns Number of appended nodes.\n\t*/\n\t_appendChild(items) {\n\t\treturn this._insertChild(this.childCount, items);\n\t}\n\t/**\n\t* Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t* this element.\n\t*\n\t* @internal\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#insert\n\t* @param index Position where nodes should be inserted.\n\t* @param items Items to be inserted.\n\t* @fires change\n\t* @returns Number of inserted nodes.\n\t*/\n\t_insertChild(index, items) {\n\t\tthis._fireChange(\"children\", this, { index });\n\t\tlet count = 0;\n\t\tconst nodes = normalize$3(this.document, items);\n\t\tfor (const node of nodes) {\n\t\t\tif (node.parent !== null) node._remove();\n\t\t\tnode.parent = this;\n\t\t\tnode.document = this.document;\n\t\t\tthis._children.splice(index, 0, node);\n\t\t\tindex++;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}\n\t/**\n\t* Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#remove\n\t* @internal\n\t* @param index Number of the first node to remove.\n\t* @param howMany Number of nodes to remove.\n\t* @fires change\n\t* @returns The array of removed nodes.\n\t*/\n\t_removeChildren(index, howMany = 1) {\n\t\tthis._fireChange(\"children\", this, { index });\n\t\tfor (let i = index; i < index + howMany; i++) this._children[i].parent = null;\n\t\treturn this._children.splice(index, howMany);\n\t}\n\t/**\n\t* Adds or overwrite attribute with a specified key and value.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#setAttribute\n\t* @internal\n\t* @param key Attribute key.\n\t* @param value Attribute value.\n\t* @param overwrite Whether tokenized attribute should override the attribute value or just add a token.\n\t* @fires change\n\t*/\n\t_setAttribute(key, value, overwrite = true) {\n\t\tthis._fireChange(\"attributes\", this);\n\t\tif (usesStylesMap(this.name, key) || usesTokenList(this.name, key)) {\n\t\t\tlet currentValue = this._attrs.get(key);\n\t\t\tif (!currentValue) {\n\t\t\t\tcurrentValue = usesStylesMap(this.name, key) ? new StylesMap(this.document.stylesProcessor) : new ViewTokenList();\n\t\t\t\tthis._attrs.set(key, currentValue);\n\t\t\t}\n\t\t\tif (overwrite) currentValue.setTo(String(value));\n\t\t\telse if (usesStylesMap(this.name, key)) {\n\t\t\t\tif (Array.isArray(value)) currentValue.set(value[0], value[1]);\n\t\t\t\telse currentValue.set(value);\n\t\t\t} else currentValue.set(typeof value == \"string\" ? value.split(/\\s+/) : value);\n\t\t} else this._attrs.set(key, String(value));\n\t}\n\t/**\n\t* Removes attribute from the element.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#removeAttribute\n\t* @internal\n\t* @param key Attribute key.\n\t* @param tokens Attribute value tokens to remove. The whole attribute is removed if not specified.\n\t* @returns Returns true if an attribute existed and has been removed.\n\t* @fires change\n\t*/\n\t_removeAttribute(key, tokens) {\n\t\tthis._fireChange(\"attributes\", this);\n\t\tif (tokens !== void 0 && (usesStylesMap(this.name, key) || usesTokenList(this.name, key))) {\n\t\t\tconst currentValue = this._attrs.get(key);\n\t\t\tif (!currentValue) return false;\n\t\t\tif (usesTokenList(this.name, key) && typeof tokens == \"string\") tokens = tokens.split(/\\s+/);\n\t\t\tcurrentValue.remove(tokens);\n\t\t\tif (currentValue.isEmpty) return this._attrs.delete(key);\n\t\t\treturn false;\n\t\t}\n\t\treturn this._attrs.delete(key);\n\t}\n\t/**\n\t* Adds specified class.\n\t*\n\t* ```ts\n\t* element._addClass( 'foo' ); // Adds 'foo' class.\n\t* element._addClass( [ 'foo', 'bar' ] ); // Adds 'foo' and 'bar' classes.\n\t* ```\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#addClass\n\t* @internal\n\t* @fires change\n\t*/\n\t_addClass(className) {\n\t\tthis._setAttribute(\"class\", className, false);\n\t}\n\t/**\n\t* Removes specified class.\n\t*\n\t* ```ts\n\t* element._removeClass( 'foo' );  // Removes 'foo' class.\n\t* element._removeClass( [ 'foo', 'bar' ] ); // Removes both 'foo' and 'bar' classes.\n\t* ```\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#removeClass\n\t* @internal\n\t* @fires change\n\t*/\n\t_removeClass(className) {\n\t\tthis._removeAttribute(\"class\", className);\n\t}\n\t_setStyle(property, value) {\n\t\tif (typeof property != \"string\") this._setAttribute(\"style\", property, false);\n\t\telse this._setAttribute(\"style\", [property, value], false);\n\t}\n\t/**\n\t* Removes specified style.\n\t*\n\t* ```ts\n\t* element._removeStyle( 'color' );  // Removes 'color' style.\n\t* element._removeStyle( [ 'color', 'border-top' ] ); // Removes both 'color' and 'border-top' styles.\n\t* ```\n\t*\n\t* **Note**: This method can work with normalized style names if\n\t* {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t* See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#removeStyle\n\t* @internal\n\t* @fires change\n\t*/\n\t_removeStyle(property) {\n\t\tthis._removeAttribute(\"style\", property);\n\t}\n\t/**\n\t* Used by the {@link module:engine/view/matcher~Matcher Matcher} to collect matching attribute tuples\n\t* (attribute name and optional token).\n\t*\n\t* Normalized patterns can be used in following ways:\n\t* - to match any attribute name with any or no value:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ true, true ]\n\t* ]\n\t* ```\n\t*\n\t* - to match a specific attribute with any value:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ 'required', true ]\n\t* ]\n\t* ```\n\t*\n\t* - to match an attribute name with a RegExp with any value:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ /h[1-6]/, true ]\n\t* ]\n\t* ```\n\t*\n\t* \t- to match a specific attribute with the exact value:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ 'rel', 'nofollow' ]\n\t* ]\n\t* ```\n\t*\n\t* \t- to match a specific attribute with a value matching a RegExp:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ 'src', /^https/ ]\n\t* ]\n\t* ```\n\t*\n\t* \t- to match an attribute name with a RegExp and the exact value:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ /^data-property-/, 'foobar' ],\n\t* ]\n\t* ```\n\t*\n\t* \t- to match an attribute name with a RegExp and match a value with another RegExp:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ /^data-property-/, /^foo/ ]\n\t* ]\n\t* ```\n\t*\n\t* \t- to match a specific style property with the value matching a RegExp:\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ 'style', 'font-size', /px$/ ]\n\t* ]\n\t* ```\n\t*\n\t* \t- to match a specific class (class attribute is tokenized so it matches tokens individually):\n\t*\n\t* ```ts\n\t* patterns: [\n\t* \t[ 'class', 'foo' ]\n\t* ]\n\t* ```\n\t*\n\t* @internal\n\t* @param patterns An array of normalized patterns (tuples of 2 or 3 items depending on if tokenized attribute value match is needed).\n\t* @param match An array to populate with matching tuples.\n\t* @param exclude Array of attribute names to exclude from match.\n\t* @returns `true` if element matches all patterns. The matching tuples are pushed to the `match` array.\n\t*/\n\t_collectAttributesMatch(patterns, match, exclude) {\n\t\tfor (const [keyPattern, tokenPattern, valuePattern] of patterns) {\n\t\t\tlet hasKey = false;\n\t\t\tlet hasValue = false;\n\t\t\tfor (const [key, value] of this._attrs) {\n\t\t\t\tif (exclude && exclude.includes(key) || !isPatternMatched(keyPattern, key)) continue;\n\t\t\t\thasKey = true;\n\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\tif (isPatternMatched(tokenPattern, value)) {\n\t\t\t\t\t\tmatch.push([key]);\n\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t} else if (!(keyPattern instanceof RegExp)) return false;\n\t\t\t\t} else {\n\t\t\t\t\tconst tokenMatch = value._getTokensMatch(tokenPattern, valuePattern || true);\n\t\t\t\t\tif (tokenMatch) {\n\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t\tfor (const tokenMatchItem of tokenMatch) match.push([key, tokenMatchItem]);\n\t\t\t\t\t} else if (!(keyPattern instanceof RegExp)) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!hasKey || !hasValue) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Used by the {@link module:engine/conversion/viewconsumable~ViewConsumable} to collect the\n\t* {@link module:engine/view/element~ViewNormalizedConsumables} for the element.\n\t*\n\t* When `key` and `token` parameters are provided the output is filtered for the specified attribute and it's tokens and related tokens.\n\t*\n\t* @internal\n\t* @param key Attribute name.\n\t* @param token Reference token to collect all related tokens.\n\t*/\n\t_getConsumables(key, token) {\n\t\tconst attributes = [];\n\t\tif (key) {\n\t\t\tconst value = this._attrs.get(key);\n\t\t\tif (value !== void 0) {\n\t\t\t\tif (typeof value == \"string\") attributes.push([key]);\n\t\t\t\telse for (const prop of value._getConsumables(token)) attributes.push([key, prop]);\n\t\t\t}\n\t\t} else for (const [key, value] of this._attrs) if (typeof value == \"string\") attributes.push([key]);\n\t\telse for (const prop of value._getConsumables()) attributes.push([key, prop]);\n\t\treturn {\n\t\t\tname: !key,\n\t\t\tattributes\n\t\t};\n\t}\n\t/**\n\t* Verify if the given element can be merged without conflicts into the element.\n\t*\n\t* Note that this method is extended by the {@link module:engine/view/attributeelement~ViewAttributeElement} implementation.\n\t*\n\t* This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t*\n\t* @internal\n\t* @returns Returns `true` if elements can be merged.\n\t*/\n\t_canMergeAttributesFrom(otherElement) {\n\t\tif (this.name != otherElement.name) return false;\n\t\tfor (const [key, otherValue] of otherElement._attrs) {\n\t\t\tconst value = this._attrs.get(key);\n\t\t\tif (value === void 0) continue;\n\t\t\tif (typeof value == \"string\" || typeof otherValue == \"string\") {\n\t\t\t\tif (value !== otherValue) return false;\n\t\t\t} else if (!value._canMergeFrom(otherValue)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Merges attributes of a given element into the element.\n\t* This includes also tokenized attributes like style and class.\n\t*\n\t* Note that you should make sure there are no conflicts before merging (see {@link #_canMergeAttributesFrom}).\n\t*\n\t* This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t*\n\t* @internal\n\t*/\n\t_mergeAttributesFrom(otherElement) {\n\t\tthis._fireChange(\"attributes\", this);\n\t\tfor (const [key, otherValue] of otherElement._attrs) {\n\t\t\tconst value = this._attrs.get(key);\n\t\t\tif (value === void 0 || typeof value == \"string\" || typeof otherValue == \"string\") this._setAttribute(key, otherValue);\n\t\t\telse value._mergeFrom(otherValue);\n\t\t}\n\t}\n\t/**\n\t* Verify if the given element attributes can be fully subtracted from the element.\n\t*\n\t* Note that this method is extended by the {@link module:engine/view/attributeelement~ViewAttributeElement} implementation.\n\t*\n\t* This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t*\n\t* @internal\n\t* @returns Returns `true` if elements attributes can be fully subtracted.\n\t*/\n\t_canSubtractAttributesOf(otherElement) {\n\t\tif (this.name != otherElement.name) return false;\n\t\tfor (const [key, otherValue] of otherElement._attrs) {\n\t\t\tconst value = this._attrs.get(key);\n\t\t\tif (value === void 0) return false;\n\t\t\tif (typeof value == \"string\" || typeof otherValue == \"string\") {\n\t\t\t\tif (value !== otherValue) return false;\n\t\t\t} else if (!value._isMatching(otherValue)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Removes (subtracts) corresponding attributes of the given element from the element.\n\t* This includes also tokenized attributes like style and class.\n\t* All attributes, classes and styles from given element should be present inside the element being unwrapped.\n\t*\n\t* Note that you should make sure all attributes could be subtracted before subtracting them (see {@link #_canSubtractAttributesOf}).\n\t*\n\t* This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t* an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t*\n\t* @internal\n\t*/\n\t_subtractAttributesOf(otherElement) {\n\t\tthis._fireChange(\"attributes\", this);\n\t\tfor (const [key, otherValue] of otherElement._attrs) {\n\t\t\tconst value = this._attrs.get(key);\n\t\t\tif (typeof value == \"string\" || typeof otherValue == \"string\") this._attrs.delete(key);\n\t\t\telse {\n\t\t\t\tvalue.remove(otherValue.keys());\n\t\t\t\tif (value.isEmpty) this._attrs.delete(key);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Sets a custom property. Unlike attributes, custom properties are not rendered to the DOM,\n\t* so they can be used to add special data to elements.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#setCustomProperty\n\t* @internal\n\t*/\n\t_setCustomProperty(key, value) {\n\t\tthis._customProperties.set(key, value);\n\t}\n\t/**\n\t* Removes the custom property stored under the given key.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#removeCustomProperty\n\t* @internal\n\t* @returns Returns true if property was removed.\n\t*/\n\t_removeCustomProperty(key) {\n\t\treturn this._customProperties.delete(key);\n\t}\n\t/**\n\t* Parses attributes provided to the element constructor before they are applied to an element. If attributes are passed\n\t* as an object (instead of `Iterable`), the object is transformed to the map. Attributes with `null` value are removed.\n\t* Attributes with non-`String` value are converted to `String`.\n\t*\n\t* @param attrs Attributes to parse.\n\t* @returns Parsed attributes.\n\t*/\n\t_parseAttributes(attrs) {\n\t\tconst attrsMap = toMap(attrs);\n\t\tfor (const [key, value] of attrsMap) if (value === null) attrsMap.delete(key);\n\t\telse if (usesStylesMap(this.name, key)) {\n\t\t\tconst newValue = value instanceof StylesMap ? value._clone() : new StylesMap(this.document.stylesProcessor).setTo(String(value));\n\t\t\tattrsMap.set(key, newValue);\n\t\t} else if (usesTokenList(this.name, key)) {\n\t\t\tconst newValue = value instanceof ViewTokenList ? value._clone() : new ViewTokenList().setTo(String(value));\n\t\t\tattrsMap.set(key, newValue);\n\t\t} else if (typeof value != \"string\") attrsMap.set(key, String(value));\n\t\treturn attrsMap;\n\t}\n};\nViewElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"element\" || type === \"view:element\");\n};\n/**\n* Converts strings to Text and non-iterables to arrays.\n*/\nfunction normalize$3(document, nodes) {\n\tif (typeof nodes == \"string\") return [new ViewText(document, nodes)];\n\tif (!isIterable(nodes)) nodes = [nodes];\n\tconst normalizedNodes = [];\n\tfor (const node of nodes) if (typeof node == \"string\") normalizedNodes.push(new ViewText(document, node));\n\telse if (node instanceof ViewTextProxy) normalizedNodes.push(new ViewText(document, node.data));\n\telse normalizedNodes.push(node);\n\treturn normalizedNodes;\n}\n/**\n* Returns `true` if an attribute on a given element should be handled as a TokenList.\n*/\nfunction usesTokenList(elementName, key) {\n\treturn key == \"class\" || elementName == \"a\" && key == \"rel\";\n}\n/**\n* Returns `true` if an attribute on a given element should be handled as a StylesMap.\n*/\nfunction usesStylesMap(elementName, key) {\n\treturn key == \"style\";\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 engine/view/containerelement\n*/\n/**\n* Containers are elements which define document structure. They define boundaries for\n* {@link module:engine/view/attributeelement~ViewAttributeElement attributes}.\n* They are mostly used for block elements like `<p>` or `<div>`.\n*\n* Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n* types (container element, {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n* {@link module:engine/view/emptyelement~ViewEmptyElement empty element}, etc) when developing a feature.\n*\n* The container element should be your default choice when writing a converter, unless:\n*\n* * this element represents a model text attribute (then use {@link module:engine/view/attributeelement~ViewAttributeElement}),\n* * this is an empty element like `<img>` (then use {@link module:engine/view/emptyelement~ViewEmptyElement}),\n* * this is a root element,\n* * this is a nested editable element (then use  {@link module:engine/view/editableelement~ViewEditableElement}).\n*\n* To create a new container element instance use the\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement `ViewDowncastWriter#createContainerElement()`}\n* method.\n*/\nvar ViewContainerElement = class extends ViewElement {\n\t/**\n\t* Creates a container element.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement\n\t* @see module:engine/view/element~ViewElement\n\t* @internal\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t* @param attrs Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t*/\n\tconstructor(document, name, attrs, children) {\n\t\tsuper(document, name, attrs, children);\n\t\tthis.getFillerOffset = getViewFillerOffset;\n\t}\n\t/**\n\t* Converts `ViewContainerElement` instance to plain object and returns it.\n\t*\n\t* @returns `ViewContainerElement` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.type = \"ContainerElement\";\n\t\treturn json;\n\t}\n};\nViewContainerElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"containerElement\" || type === \"view:containerElement\" || type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"containerElement\" || type === \"view:containerElement\" || type === \"element\" || type === \"view:element\");\n};\n/**\n* Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n*\n* @returns Block filler offset or `null` if block filler is not needed.\n*/\nfunction getViewFillerOffset() {\n\tconst children = [...this.getChildren()];\n\tlet lastChild = children[this.childCount - 1];\n\tif (lastChild && lastChild.is(\"element\", \"br\")) return this.childCount;\n\twhile (lastChild && lastChild.is(\"attributeElement\")) {\n\t\tlastChild = lastChild.getChild(lastChild.childCount - 1);\n\t\tif (lastChild && lastChild.is(\"element\", \"br\")) return this.childCount;\n\t}\n\tfor (const child of children) if (!child.is(\"uiElement\")) return null;\n\treturn this.childCount;\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 engine/view/editableelement\n*/\nconst ViewEditableElementBase = /* #__PURE__ */ ObservableMixin(ViewContainerElement);\n/**\n* Editable element which can be a {@link module:engine/view/rooteditableelement~ViewRootEditableElement root}\n* or nested editable area in the editor.\n*\n* Editable is automatically read-only when its {@link module:engine/view/document~ViewDocument Document} is read-only.\n*\n* The constructor of this class shouldn't be used directly. To create new `ViewEditableElement` use the\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEditableElement `downcastWriter#createEditableElement()`} method.\n*/\nvar ViewEditableElement = class extends ViewEditableElementBase {\n\t/**\n\t* Creates an editable element.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#createEditableElement\n\t* @internal\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t* @param attributes Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t*/\n\tconstructor(document, name, attributes, children) {\n\t\tsuper(document, name, attributes, children);\n\t\tthis.set(\"isReadOnly\", false);\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"placeholder\", void 0);\n\t\tthis.bind(\"isReadOnly\").to(document);\n\t\tthis.bind(\"isFocused\").to(document, \"isFocused\", (isFocused) => isFocused && document.selection.editableElement == this);\n\t\tthis.listenTo(document.selection, \"change\", () => {\n\t\t\tthis.isFocused = document.isFocused && document.selection.editableElement == this;\n\t\t});\n\t}\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Converts `ViewEditableElement` instance to plain object and returns it.\n\t*\n\t* @returns `ViewEditableElement` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.type = \"EditableElement\";\n\t\tjson.isReadOnly = this.isReadOnly;\n\t\tjson.isFocused = this.isFocused;\n\t\treturn json;\n\t}\n};\nViewEditableElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"editableElement\" || type === \"view:editableElement\" || type === \"containerElement\" || type === \"view:containerElement\" || type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"editableElement\" || type === \"view:editableElement\" || type === \"containerElement\" || type === \"view:containerElement\" || type === \"element\" || type === \"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 engine/view/rooteditableelement\n*/\nconst rootNameSymbol = Symbol(\"rootName\");\n/**\n* Class representing a single root in the data view. A root can be either\n* {@link ~ViewRootEditableElement#isReadOnly editable or read-only},\n* but in both cases it is called \"an editable\". Roots can contain other {@link module:engine/view/editableelement~ViewEditableElement\n* editable elements} making them \"nested editables\".\n*/\nvar ViewRootEditableElement = class extends ViewEditableElement {\n\t/**\n\t* Creates root editable element.\n\t*\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t*/\n\tconstructor(document, name) {\n\t\tsuper(document, name);\n\t\tthis.rootName = \"main\";\n\t}\n\t/**\n\t* Name of this root inside {@link module:engine/view/document~ViewDocument} that is an owner of this root. If no\n\t* other name is set, `main` name is used.\n\t*\n\t* @readonly\n\t*/\n\tget rootName() {\n\t\treturn this.getCustomProperty(rootNameSymbol);\n\t}\n\tset rootName(rootName) {\n\t\tthis._setCustomProperty(rootNameSymbol, rootName);\n\t}\n\t/**\n\t* Converts `ViewRootEditableElement` instance to string and returns it.\n\t*\n\t* @returns `ViewRootEditableElement` instance converted to string.\n\t*/\n\ttoJSON() {\n\t\treturn this.rootName;\n\t}\n\t/**\n\t* Overrides old element name and sets new one.\n\t* This is needed because view roots are created before they are attached to the DOM.\n\t* The name of the root element is temporary at this stage. It has to be changed when the\n\t* view root element is attached to the DOM element.\n\t*\n\t* @internal\n\t* @param name The new name of element.\n\t*/\n\tset _name(name) {\n\t\tthis.name = name;\n\t}\n};\nViewRootEditableElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"rootElement\" || type === \"view:rootElement\" || type === \"editableElement\" || type === \"view:editableElement\" || type === \"containerElement\" || type === \"view:containerElement\" || type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"rootElement\" || type === \"view:rootElement\" || type === \"editableElement\" || type === \"view:editableElement\" || type === \"containerElement\" || type === \"view:containerElement\" || type === \"element\" || type === \"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* Position iterator class. It allows to iterate forward and backward over the document.\n*/\nvar ViewTreeWalker = class {\n\t/**\n\t* Walking direction. Defaults `'forward'`.\n\t*/\n\tdirection;\n\t/**\n\t* Iterator boundaries.\n\t*\n\t* When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t* on the start of boundary, then `{ done: true }` is returned.\n\t*\n\t* If boundaries are not defined they are set before first and after last child of the root node.\n\t*/\n\tboundaries;\n\t/**\n\t* Flag indicating whether all characters from {@link module:engine/view/text~ViewText} should be returned as one\n\t* {@link module:engine/view/text~ViewText} or one by one as {@link module:engine/view/textproxy~ViewTextProxy}.\n\t*/\n\tsingleCharacters;\n\t/**\n\t* Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t* iterated node will not be returned along with `elementEnd` tag.\n\t*/\n\tshallow;\n\t/**\n\t* Flag indicating whether iterator should ignore `elementEnd` tags. If set to `true`, walker will not\n\t* return a parent node of the start position. Each {@link module:engine/view/element~ViewElement} will be returned once.\n\t* When set to `false` each element might be returned twice: for `'elementStart'` and `'elementEnd'`.\n\t*/\n\tignoreElementEnd;\n\t/**\n\t* Iterator position. If start position is not defined then position depends on {@link #direction}. If direction is\n\t* `'forward'` position starts form the beginning, when direction is `'backward'` position starts from the end.\n\t*/\n\t_position;\n\t/**\n\t* Start boundary parent.\n\t*/\n\t_boundaryStartParent;\n\t/**\n\t* End boundary parent.\n\t*/\n\t_boundaryEndParent;\n\t/**\n\t* Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t*\n\t* @param options Object with configuration.\n\t*/\n\tconstructor(options = {}) {\n\t\tif (!options.boundaries && !options.startPosition)\n /**\n\t\t* Neither boundaries nor starting position have been defined.\n\t\t*\n\t\t* @error view-tree-walker-no-start-position\n\t\t*/\n\t\tthrow new CKEditorError(\"view-tree-walker-no-start-position\", null);\n\t\tif (options.direction && options.direction != \"forward\" && options.direction != \"backward\")\n /**\n\t\t* Only `backward` and `forward` direction allowed.\n\t\t*\n\t\t* @error view-tree-walker-unknown-direction\n\t\t*/\n\t\tthrow new CKEditorError(\"view-tree-walker-unknown-direction\", options.startPosition, { direction: options.direction });\n\t\tthis.boundaries = options.boundaries || null;\n\t\tif (options.startPosition) this._position = ViewPosition._createAt(options.startPosition);\n\t\telse this._position = ViewPosition._createAt(options.boundaries[options.direction == \"backward\" ? \"end\" : \"start\"]);\n\t\tthis.direction = options.direction || \"forward\";\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\t\tthis.shallow = !!options.shallow;\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\t}\n\t/**\n\t* Iterable interface.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this;\n\t}\n\t/**\n\t* Iterator position. If start position is not defined then position depends on {@link #direction}. If direction is\n\t* `'forward'` position starts form the beginning, when direction is `'backward'` position starts from the end.\n\t*/\n\tget position() {\n\t\treturn this._position;\n\t}\n\t/**\n\t* Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t*\n\t* For example:\n\t*\n\t* ```ts\n\t* walker.skip( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t* walker.skip( value => true ); // Move the position to the end: <p>{}foo</p> -> <p>foo</p>[]\n\t* walker.skip( value => false ); // Do not move the position.\n\t* ```\n\t*\n\t* @param skip Callback function. Gets {@link module:engine/view/treewalker~ViewTreeWalkerValue} and should\n\t* return `true` if the value should be skipped or `false` if not.\n\t*/\n\tskip(skip) {\n\t\tlet nextResult;\n\t\tlet prevPosition;\n\t\tdo {\n\t\t\tprevPosition = this.position;\n\t\t\tnextResult = this.next();\n\t\t} while (!nextResult.done && skip(nextResult.value));\n\t\tif (!nextResult.done) this._position = prevPosition;\n\t}\n\t/**\n\t* Moves tree walker {@link #position} to provided `position`. Tree walker will\n\t* continue traversing from that position.\n\t*\n\t* Note: in contrary to {@link ~ViewTreeWalker#skip}, this method does not iterate over the nodes along the way.\n\t* It simply sets the current tree walker position to a new one.\n\t* From the performance standpoint, it is better to use {@link ~ViewTreeWalker#jumpTo} rather than {@link ~ViewTreeWalker#skip}.\n\t*\n\t* If the provided position is before the start boundary, the position will be\n\t* set to the start boundary. If the provided position is after the end boundary,\n\t* the position will be set to the end boundary.\n\t* This is done to prevent the treewalker from traversing outside the boundaries.\n\t*\n\t* @param position Position to jump to.\n\t*/\n\tjumpTo(position) {\n\t\tif (this._boundaryStartParent && position.isBefore(this.boundaries.start)) position = this.boundaries.start;\n\t\telse if (this._boundaryEndParent && position.isAfter(this.boundaries.end)) position = this.boundaries.end;\n\t\tthis._position = position.clone();\n\t}\n\t/**\n\t* Gets the next tree walker's value.\n\t*\n\t* @returns Object implementing iterator interface, returning\n\t* information about taken step.\n\t*/\n\tnext() {\n\t\tif (this.direction == \"forward\") return this._next();\n\t\telse return this._previous();\n\t}\n\t/**\n\t* Makes a step forward in view. Moves the {@link #position} to the next position and returns the encountered value.\n\t*/\n\t_next() {\n\t\tlet position = this.position.clone();\n\t\tconst previousPosition = this.position;\n\t\tconst parent = position.parent;\n\t\tif (parent.parent === null && position.offset === parent.childCount) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tif (parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tlet node;\n\t\tif (parent && parent.is(\"view:$text\")) {\n\t\t\tif (position.isAtEnd) {\n\t\t\t\tthis._position = ViewPosition._createAfter(parent);\n\t\t\t\treturn this._next();\n\t\t\t}\n\t\t\tnode = parent.data[position.offset];\n\t\t} else node = parent.getChild(position.offset);\n\t\tif (typeof node == \"string\") {\n\t\t\tlet textLength;\n\t\t\tif (this.singleCharacters) textLength = 1;\n\t\t\telse textLength = (parent === this._boundaryEndParent ? this.boundaries.end.offset : parent.data.length) - position.offset;\n\t\t\tconst textProxy = new ViewTextProxy(parent, position.offset, textLength);\n\t\t\tposition.offset += textLength;\n\t\t\tthis._position = position;\n\t\t\treturn this._formatReturnValue(\"text\", textProxy, previousPosition, position, textLength);\n\t\t}\n\t\tif (node && node.is(\"view:element\")) {\n\t\t\tif (!this.shallow) position = new ViewPosition(node, 0);\n\t\t\telse {\n\t\t\t\tif (this.boundaries && this.boundaries.end.isBefore(position)) return {\n\t\t\t\t\tdone: true,\n\t\t\t\t\tvalue: void 0\n\t\t\t\t};\n\t\t\t\tposition.offset++;\n\t\t\t}\n\t\t\tthis._position = position;\n\t\t\treturn this._formatReturnValue(\"elementStart\", node, previousPosition, position, 1);\n\t\t}\n\t\tif (node && node.is(\"view:$text\")) {\n\t\t\tif (this.singleCharacters) {\n\t\t\t\tposition = new ViewPosition(node, 0);\n\t\t\t\tthis._position = position;\n\t\t\t\treturn this._next();\n\t\t\t}\n\t\t\tlet charactersCount = node.data.length;\n\t\t\tlet item;\n\t\t\tif (node == this._boundaryEndParent) {\n\t\t\t\tcharactersCount = this.boundaries.end.offset;\n\t\t\t\titem = new ViewTextProxy(node, 0, charactersCount);\n\t\t\t\tposition = ViewPosition._createAfter(item);\n\t\t\t} else {\n\t\t\t\titem = new ViewTextProxy(node, 0, node.data.length);\n\t\t\t\tposition.offset++;\n\t\t\t}\n\t\t\tthis._position = position;\n\t\t\treturn this._formatReturnValue(\"text\", item, previousPosition, position, charactersCount);\n\t\t}\n\t\tposition = ViewPosition._createAfter(parent);\n\t\tthis._position = position;\n\t\tif (this.ignoreElementEnd) return this._next();\n\t\treturn this._formatReturnValue(\"elementEnd\", parent, previousPosition, position);\n\t}\n\t/**\n\t* Makes a step backward in view. Moves the {@link #position} to the previous position and returns the encountered value.\n\t*/\n\t_previous() {\n\t\tlet position = this.position.clone();\n\t\tconst previousPosition = this.position;\n\t\tconst parent = position.parent;\n\t\tif (parent.parent === null && position.offset === 0) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tif (parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tlet node;\n\t\tif (parent.is(\"view:$text\")) {\n\t\t\tif (position.isAtStart) {\n\t\t\t\tthis._position = ViewPosition._createBefore(parent);\n\t\t\t\treturn this._previous();\n\t\t\t}\n\t\t\tnode = parent.data[position.offset - 1];\n\t\t} else node = parent.getChild(position.offset - 1);\n\t\tif (typeof node == \"string\") {\n\t\t\tlet textLength;\n\t\t\tif (!this.singleCharacters) {\n\t\t\t\tconst startOffset = parent === this._boundaryStartParent ? this.boundaries.start.offset : 0;\n\t\t\t\ttextLength = position.offset - startOffset;\n\t\t\t} else textLength = 1;\n\t\t\tposition.offset -= textLength;\n\t\t\tconst textProxy = new ViewTextProxy(parent, position.offset, textLength);\n\t\t\tthis._position = position;\n\t\t\treturn this._formatReturnValue(\"text\", textProxy, previousPosition, position, textLength);\n\t\t}\n\t\tif (node && node.is(\"view:element\")) {\n\t\t\tif (this.shallow) {\n\t\t\t\tposition.offset--;\n\t\t\t\tthis._position = position;\n\t\t\t\treturn this._formatReturnValue(\"elementStart\", node, previousPosition, position, 1);\n\t\t\t}\n\t\t\tposition = new ViewPosition(node, node.childCount);\n\t\t\tthis._position = position;\n\t\t\tif (this.ignoreElementEnd) return this._previous();\n\t\t\treturn this._formatReturnValue(\"elementEnd\", node, previousPosition, position);\n\t\t}\n\t\tif (node && node.is(\"view:$text\")) {\n\t\t\tif (this.singleCharacters) {\n\t\t\t\tposition = new ViewPosition(node, node.data.length);\n\t\t\t\tthis._position = position;\n\t\t\t\treturn this._previous();\n\t\t\t}\n\t\t\tlet charactersCount = node.data.length;\n\t\t\tlet item;\n\t\t\tif (node == this._boundaryStartParent) {\n\t\t\t\tconst offset = this.boundaries.start.offset;\n\t\t\t\titem = new ViewTextProxy(node, offset, node.data.length - offset);\n\t\t\t\tcharactersCount = item.data.length;\n\t\t\t\tposition = ViewPosition._createBefore(item);\n\t\t\t} else {\n\t\t\t\titem = new ViewTextProxy(node, 0, node.data.length);\n\t\t\t\tposition.offset--;\n\t\t\t}\n\t\t\tthis._position = position;\n\t\t\treturn this._formatReturnValue(\"text\", item, previousPosition, position, charactersCount);\n\t\t}\n\t\tposition = ViewPosition._createBefore(parent);\n\t\tthis._position = position;\n\t\treturn this._formatReturnValue(\"elementStart\", parent, previousPosition, position, 1);\n\t}\n\t/**\n\t* Format returned data and adjust `previousPosition` and `nextPosition` if\n\t* reach the bound of the {@link module:engine/view/text~ViewText}.\n\t*\n\t* @param type Type of step.\n\t* @param item Item between old and new position.\n\t* @param previousPosition Previous position of iterator.\n\t* @param nextPosition Next position of iterator.\n\t* @param length Length of the item.\n\t*/\n\t_formatReturnValue(type, item, previousPosition, nextPosition, length) {\n\t\tif (item.is(\"view:$textProxy\")) {\n\t\t\tif (item.offsetInText + item.data.length == item.textNode.data.length) {\n\t\t\t\tif (this.direction == \"forward\" && !(this.boundaries && this.boundaries.end.isEqual(this.position))) {\n\t\t\t\t\tnextPosition = ViewPosition._createAfter(item.textNode);\n\t\t\t\t\tthis._position = nextPosition;\n\t\t\t\t} else previousPosition = ViewPosition._createAfter(item.textNode);\n\t\t\t}\n\t\t\tif (item.offsetInText === 0) {\n\t\t\t\tif (this.direction == \"backward\" && !(this.boundaries && this.boundaries.start.isEqual(this.position))) {\n\t\t\t\t\tnextPosition = ViewPosition._createBefore(item.textNode);\n\t\t\t\t\tthis._position = nextPosition;\n\t\t\t\t} else previousPosition = ViewPosition._createBefore(item.textNode);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tdone: false,\n\t\t\tvalue: {\n\t\t\t\ttype,\n\t\t\t\titem,\n\t\t\t\tpreviousPosition,\n\t\t\t\tnextPosition,\n\t\t\t\tlength\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 engine/view/position\n*/\n/**\n* Position in the view tree. Position is represented by its parent node and an offset in this parent.\n*\n* In order to create a new position instance use the `createPosition*()` factory methods available in:\n*\n* * {@link module:engine/view/view~EditingView}\n* * {@link module:engine/view/downcastwriter~ViewDowncastWriter}\n* * {@link module:engine/view/upcastwriter~ViewUpcastWriter}\n*/\nvar ViewPosition = class ViewPosition extends ViewTypeCheckable {\n\t/**\n\t* Position parent.\n\t*/\n\tparent;\n\t/**\n\t* Position offset.\n\t*/\n\toffset;\n\t/**\n\t* Creates a position.\n\t*\n\t* @param parent Position parent.\n\t* @param offset Position offset.\n\t*/\n\tconstructor(parent, offset) {\n\t\tsuper();\n\t\tthis.parent = parent;\n\t\tthis.offset = offset;\n\t}\n\t/**\n\t* Node directly after the position. Equals `null` when there is no node after position or position is located\n\t* inside text node.\n\t*/\n\tget nodeAfter() {\n\t\tif (this.parent.is(\"$text\")) return null;\n\t\treturn this.parent.getChild(this.offset) || null;\n\t}\n\t/**\n\t* Node directly before the position. Equals `null` when there is no node before position or position is located\n\t* inside text node.\n\t*/\n\tget nodeBefore() {\n\t\tif (this.parent.is(\"$text\")) return null;\n\t\treturn this.parent.getChild(this.offset - 1) || null;\n\t}\n\t/**\n\t* Is `true` if position is at the beginning of its {@link module:engine/view/position~ViewPosition#parent parent}, `false` otherwise.\n\t*/\n\tget isAtStart() {\n\t\treturn this.offset === 0;\n\t}\n\t/**\n\t* Is `true` if position is at the end of its {@link module:engine/view/position~ViewPosition#parent parent}, `false` otherwise.\n\t*/\n\tget isAtEnd() {\n\t\tconst endOffset = this.parent.is(\"$text\") ? this.parent.data.length : this.parent.childCount;\n\t\treturn this.offset === endOffset;\n\t}\n\t/**\n\t* Position's root, that is the root of the position's parent element.\n\t*/\n\tget root() {\n\t\treturn this.parent.root;\n\t}\n\t/**\n\t* {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement} instance that contains this position, or `null` if\n\t* position is not inside an editable element.\n\t*/\n\tget editableElement() {\n\t\tlet editable = this.parent;\n\t\twhile (!(editable instanceof ViewEditableElement)) if (editable.parent) editable = editable.parent;\n\t\telse return null;\n\t\treturn editable;\n\t}\n\t/**\n\t* Returns a new instance of Position with offset incremented by `shift` value.\n\t*\n\t* @param shift How position offset should get changed. Accepts negative values.\n\t* @returns Shifted position.\n\t*/\n\tgetShiftedBy(shift) {\n\t\tconst shifted = ViewPosition._createAt(this);\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\t\treturn shifted;\n\t}\n\t/**\n\t* Gets the farthest position which matches the callback using\n\t* {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker}.\n\t*\n\t* For example:\n\t*\n\t* ```ts\n\t* getLastMatchingPosition( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t* getLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } ); // <p>foo[]</p> -> <p>{}foo</p>\n\t* getLastMatchingPosition( value => false ); // Do not move the position.\n\t* ```\n\t*\n\t* @param skip Callback function. Gets {@link module:engine/view/treewalker~ViewTreeWalkerValue} and should\n\t* return `true` if the value should be skipped or `false` if not.\n\t* @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t* @returns The position after the last item which matches the `skip` callback test.\n\t*/\n\tgetLastMatchingPosition(skip, options = {}) {\n\t\toptions.startPosition = this;\n\t\tconst treeWalker = new ViewTreeWalker(options);\n\t\ttreeWalker.skip(skip);\n\t\treturn treeWalker.position;\n\t}\n\t/**\n\t* Returns ancestors array of this position, that is this position's parent and it's ancestors.\n\t*\n\t* @returns Array with ancestors.\n\t*/\n\tgetAncestors() {\n\t\tif (this.parent.is(\"documentFragment\")) return [this.parent];\n\t\telse return this.parent.getAncestors({ includeSelf: true });\n\t}\n\t/**\n\t* Returns a {@link module:engine/view/node~ViewNode} or {@link module:engine/view/documentfragment~ViewDocumentFragment}\n\t* which is a common ancestor of both positions.\n\t*/\n\tgetCommonAncestor(position) {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\t\tlet i = 0;\n\t\twhile (ancestorsA[i] == ancestorsB[i] && ancestorsA[i]) i++;\n\t\treturn i === 0 ? null : ancestorsA[i - 1];\n\t}\n\t/**\n\t* Checks whether this position equals given position.\n\t*\n\t* @param otherPosition Position to compare with.\n\t* @returns True if positions are same.\n\t*/\n\tisEqual(otherPosition) {\n\t\treturn this.parent == otherPosition.parent && this.offset == otherPosition.offset;\n\t}\n\t/**\n\t* Checks whether this position is located before given position. When method returns `false` it does not mean that\n\t* this position is after give one. Two positions may be located inside separate roots and in that situation this\n\t* method will still return `false`.\n\t*\n\t* @see module:engine/view/position~ViewPosition#isAfter\n\t* @see module:engine/view/position~ViewPosition#compareWith\n\t* @param otherPosition Position to compare with.\n\t* @returns Returns `true` if this position is before given position.\n\t*/\n\tisBefore(otherPosition) {\n\t\treturn this.compareWith(otherPosition) == \"before\";\n\t}\n\t/**\n\t* Checks whether this position is located after given position. When method returns `false` it does not mean that\n\t* this position is before give one. Two positions may be located inside separate roots and in that situation this\n\t* method will still return `false`.\n\t*\n\t* @see module:engine/view/position~ViewPosition#isBefore\n\t* @see module:engine/view/position~ViewPosition#compareWith\n\t* @param otherPosition Position to compare with.\n\t* @returns Returns `true` if this position is after given position.\n\t*/\n\tisAfter(otherPosition) {\n\t\treturn this.compareWith(otherPosition) == \"after\";\n\t}\n\t/**\n\t* Checks whether this position is before, after or in same position that other position. Two positions may be also\n\t* different when they are located in separate roots.\n\t*\n\t* @param otherPosition Position to compare with.\n\t*/\n\tcompareWith(otherPosition) {\n\t\tif (this.root !== otherPosition.root) return \"different\";\n\t\tif (this.isEqual(otherPosition)) return \"same\";\n\t\tconst thisPath = this.parent.is(\"node\") ? this.parent.getPath() : [];\n\t\tconst otherPath = otherPosition.parent.is(\"node\") ? otherPosition.parent.getPath() : [];\n\t\tthisPath.push(this.offset);\n\t\totherPath.push(otherPosition.offset);\n\t\tconst result = compareArrays(thisPath, otherPath);\n\t\tswitch (result) {\n\t\t\tcase \"prefix\": return \"before\";\n\t\t\tcase \"extension\": return \"after\";\n\t\t\tdefault: return thisPath[result] < otherPath[result] ? \"before\" : \"after\";\n\t\t}\n\t}\n\t/**\n\t* Creates a {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker} instance with this positions as a start position.\n\t*\n\t* @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}\n\t*/\n\tgetWalker(options = {}) {\n\t\toptions.startPosition = this;\n\t\treturn new ViewTreeWalker(options);\n\t}\n\t/**\n\t* Clones this position.\n\t*/\n\tclone() {\n\t\treturn new ViewPosition(this.parent, this.offset);\n\t}\n\t/**\n\t* Converts `ViewPosition` instance to plain object and returns it.\n\t*\n\t* @returns `ViewPosition` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\treturn {\n\t\t\tparent: this.parent.toJSON(),\n\t\t\toffset: this.offset\n\t\t};\n\t}\n\t/**\n\t* Creates position at the given location. The location can be specified as:\n\t*\n\t* * a {@link module:engine/view/position~ViewPosition position},\n\t* * parent element and offset (offset defaults to `0`),\n\t* * parent element and `'end'` (sets position at the end of that element),\n\t* * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t*\n\t* This method is a shortcut to other constructors such as:\n\t*\n\t* * {@link module:engine/view/position~ViewPosition._createBefore},\n\t* * {@link module:engine/view/position~ViewPosition._createAfter}.\n\t*\n\t* @internal\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t*/\n\tstatic _createAt(itemOrPosition, offset) {\n\t\tif (itemOrPosition instanceof ViewPosition) return new this(itemOrPosition.parent, itemOrPosition.offset);\n\t\telse {\n\t\t\tconst node = itemOrPosition;\n\t\t\tif (offset == \"end\") offset = node.is(\"$text\") ? node.data.length : node.childCount;\n\t\t\telse if (offset == \"before\") return this._createBefore(node);\n\t\t\telse if (offset == \"after\") return this._createAfter(node);\n\t\t\telse if (offset !== 0 && !offset)\n /**\n\t\t\t* {@link module:engine/view/view~EditingView#createPositionAt `View#createPositionAt()`}\n\t\t\t* requires the offset to be specified when the first parameter is a view item.\n\t\t\t*\n\t\t\t* @error view-createpositionat-offset-required\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"view-createpositionat-offset-required\", node);\n\t\t\treturn new ViewPosition(node, offset);\n\t\t}\n\t}\n\t/**\n\t* Creates a new position after given view item.\n\t*\n\t* @internal\n\t* @param item View item after which the position should be located.\n\t*/\n\tstatic _createAfter(item) {\n\t\tif (item.is(\"$textProxy\")) return new ViewPosition(item.textNode, item.offsetInText + item.data.length);\n\t\tif (!item.parent)\n /**\n\t\t* You cannot make a position after a root.\n\t\t*\n\t\t* @error view-position-after-root\n\t\t* @param {module:engine/view/node~ViewNode} root A root item.\n\t\t*/\n\t\tthrow new CKEditorError(\"view-position-after-root\", item, { root: item });\n\t\treturn new ViewPosition(item.parent, item.index + 1);\n\t}\n\t/**\n\t* Creates a new position before given view item.\n\t*\n\t* @internal\n\t* @param item View item before which the position should be located.\n\t*/\n\tstatic _createBefore(item) {\n\t\tif (item.is(\"$textProxy\")) return new ViewPosition(item.textNode, item.offsetInText);\n\t\tif (!item.parent)\n /**\n\t\t* You cannot make a position before a root.\n\t\t*\n\t\t* @error view-position-before-root\n\t\t* @param {module:engine/view/node~ViewNode} root A root item.\n\t\t*/\n\t\tthrow new CKEditorError(\"view-position-before-root\", item, { root: item });\n\t\treturn new ViewPosition(item.parent, item.index);\n\t}\n};\nViewPosition.prototype.is = function(type) {\n\treturn type === \"position\" || type === \"view:position\";\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 engine/view/range\n*/\n/**\n* Range in the view tree. A range is represented by its start and end {@link module:engine/view/position~ViewPosition positions}.\n*\n* In order to create a new position instance use the `createPosition*()` factory methods available in:\n*\n* * {@link module:engine/view/view~EditingView}\n* * {@link module:engine/view/downcastwriter~ViewDowncastWriter}\n* * {@link module:engine/view/upcastwriter~ViewUpcastWriter}\n*/\nvar ViewRange = class ViewRange extends ViewTypeCheckable {\n\t/**\n\t* Start position.\n\t*/\n\tstart;\n\t/**\n\t* End position.\n\t*/\n\tend;\n\t/**\n\t* Creates a range spanning from `start` position to `end` position.\n\t*\n\t* **Note:** Constructor creates it's own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t*\n\t* @param start Start position.\n\t* @param end End position. If not set, range will be collapsed at the `start` position.\n\t*/\n\tconstructor(start, end = null) {\n\t\tsuper();\n\t\tthis.start = start.clone();\n\t\tthis.end = end ? end.clone() : start.clone();\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* Iterates over all {@link module:engine/view/item~ViewItem view items} that are in this range and returns\n\t* them together with additional information like length or {@link module:engine/view/position~ViewPosition positions},\n\t* grouped as {@link module:engine/view/treewalker~ViewTreeWalkerValue}.\n\t*\n\t* This iterator uses {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker} with `boundaries` set to this range and\n\t* `ignoreElementEnd` option\n\t* set to `true`.\n\t*/\n\t*[Symbol.iterator]() {\n\t\tyield* new ViewTreeWalker({\n\t\t\tboundaries: this,\n\t\t\tignoreElementEnd: true\n\t\t});\n\t}\n\t/**\n\t* Returns whether the range is collapsed, that is it start and end positions are equal.\n\t*/\n\tget isCollapsed() {\n\t\treturn this.start.isEqual(this.end);\n\t}\n\t/**\n\t* Returns whether this range is flat, that is if {@link module:engine/view/range~ViewRange#start start} position and\n\t* {@link module:engine/view/range~ViewRange#end end} position are in the same\n\t* {@link module:engine/view/position~ViewPosition#parent parent}.\n\t*/\n\tget isFlat() {\n\t\treturn this.start.parent === this.end.parent;\n\t}\n\t/**\n\t* Range root element.\n\t*/\n\tget root() {\n\t\treturn this.start.root;\n\t}\n\t/**\n\t* Creates a maximal range that has the same content as this range but is expanded in both ways (at the beginning\n\t* and at the end).\n\t*\n\t* For example:\n\t*\n\t* ```html\n\t* <p>Foo</p><p><b>{Bar}</b></p> -> <p>Foo</p>[<p><b>Bar</b>]</p>\n\t* <p><b>foo</b>{bar}<span></span></p> -> <p><b>foo[</b>bar<span></span>]</p>\n\t* ```\n\t*\n\t* Note that in the sample above:\n\t*\n\t* - `<p>` have type of {@link module:engine/view/containerelement~ViewContainerElement},\n\t* - `<b>` have type of {@link module:engine/view/attributeelement~ViewAttributeElement},\n\t* - `<span>` have type of {@link module:engine/view/uielement~ViewUIElement}.\n\t*\n\t* @returns Enlarged range.\n\t*/\n\tgetEnlarged() {\n\t\tlet start = this.start.getLastMatchingPosition(enlargeTrimSkip, { direction: \"backward\" });\n\t\tlet end = this.end.getLastMatchingPosition(enlargeTrimSkip);\n\t\tif (start.parent.is(\"$text\") && start.isAtStart) start = ViewPosition._createBefore(start.parent);\n\t\tif (end.parent.is(\"$text\") && end.isAtEnd) end = ViewPosition._createAfter(end.parent);\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Creates a minimum range that has the same content as this range but is trimmed in both ways (at the beginning\n\t* and at the end).\n\t*\n\t* For example:\n\t*\n\t* ```html\n\t* <p>Foo</p>[<p><b>Bar</b>]</p> -> <p>Foo</p><p><b>{Bar}</b></p>\n\t* <p><b>foo[</b>bar<span></span>]</p> -> <p><b>foo</b>{bar}<span></span></p>\n\t* ```\n\t*\n\t* Note that in the sample above:\n\t*\n\t* - `<p>` have type of {@link module:engine/view/containerelement~ViewContainerElement},\n\t* - `<b>` have type of {@link module:engine/view/attributeelement~ViewAttributeElement},\n\t* - `<span>` have type of {@link module:engine/view/uielement~ViewUIElement}.\n\t*\n\t* @returns Shrunk range.\n\t*/\n\tgetTrimmed() {\n\t\tlet start = this.start.getLastMatchingPosition(enlargeTrimSkip);\n\t\tif (start.isAfter(this.end) || start.isEqual(this.end)) return new ViewRange(start, start);\n\t\tlet end = this.end.getLastMatchingPosition(enlargeTrimSkip, { direction: \"backward\" });\n\t\tconst nodeAfterStart = start.nodeAfter;\n\t\tconst nodeBeforeEnd = end.nodeBefore;\n\t\tif (nodeAfterStart && nodeAfterStart.is(\"$text\")) start = new ViewPosition(nodeAfterStart, 0);\n\t\tif (nodeBeforeEnd && nodeBeforeEnd.is(\"$text\")) end = new ViewPosition(nodeBeforeEnd, nodeBeforeEnd.data.length);\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Two ranges are equal if their start and end positions are equal.\n\t*\n\t* @param otherRange Range to compare with.\n\t* @returns `true` if ranges are equal, `false` otherwise\n\t*/\n\tisEqual(otherRange) {\n\t\treturn this == otherRange || this.start.isEqual(otherRange.start) && this.end.isEqual(otherRange.end);\n\t}\n\t/**\n\t* Checks whether this range contains given {@link module:engine/view/position~ViewPosition position}.\n\t*\n\t* @param position Position to check.\n\t* @returns `true` if given {@link module:engine/view/position~ViewPosition position} is contained in this range, `false` otherwise.\n\t*/\n\tcontainsPosition(position) {\n\t\treturn position.isAfter(this.start) && position.isBefore(this.end);\n\t}\n\t/**\n\t* Checks whether this range contains given {@link module:engine/view/range~ViewRange range}.\n\t*\n\t* @param otherRange Range to check.\n\t* @param loose Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t* start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t* even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t* @returns `true` if given {@link module:engine/view/range~ViewRange range} boundaries are contained by this range, `false`\n\t* otherwise.\n\t*/\n\tcontainsRange(otherRange, loose = false) {\n\t\tif (otherRange.isCollapsed) loose = false;\n\t\tconst containsStart = this.containsPosition(otherRange.start) || loose && this.start.isEqual(otherRange.start);\n\t\tconst containsEnd = this.containsPosition(otherRange.end) || loose && this.end.isEqual(otherRange.end);\n\t\treturn containsStart && containsEnd;\n\t}\n\t/**\n\t* Computes which part(s) of this {@link module:engine/view/range~ViewRange range} is not a part of given\n\t* {@link module:engine/view/range~ViewRange range}.\n\t* Returned array contains zero, one or two {@link module:engine/view/range~ViewRange ranges}.\n\t*\n\t* Examples:\n\t*\n\t* ```ts\n\t* let foo = downcastWriter.createText( 'foo' );\n\t* let img = downcastWriter.createContainerElement( 'img' );\n\t* let bar = downcastWriter.createText( 'bar' );\n\t* let p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t*\n\t* let range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t* let otherRange = view.createRange( // \"oo\", img, \"ba\" are in range.\n\t* \tview.createPositionAt( foo, 1 ),\n\t* \tview.createPositionAt( bar, 2 )\n\t* );\n\t* let transformed = range.getDifference( otherRange );\n\t* // transformed array has no ranges because `otherRange` contains `range`\n\t*\n\t* otherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t* transformed = range.getDifference( otherRange );\n\t* // transformed array has one range: from ( p, 2 ) to ( bar, 1 )\n\t*\n\t* otherRange = view.createRange( view.createPositionAt( p, 1 ), view.createPositionAt( p, 2 ) ); // img is in range.\n\t* transformed = range.getDifference( otherRange );\n\t* // transformed array has two ranges: from ( foo, 1 ) to ( p, 1 ) and from ( p, 2 ) to ( bar, 1 )\n\t* ```\n\t*\n\t* @param otherRange Range to differentiate against.\n\t* @returns The difference between ranges.\n\t*/\n\tgetDifference(otherRange) {\n\t\tconst ranges = [];\n\t\tif (this.isIntersecting(otherRange)) {\n\t\t\tif (this.containsPosition(otherRange.start)) ranges.push(new ViewRange(this.start, otherRange.start));\n\t\t\tif (this.containsPosition(otherRange.end)) ranges.push(new ViewRange(otherRange.end, this.end));\n\t\t} else ranges.push(this.clone());\n\t\treturn ranges;\n\t}\n\t/**\n\t* Returns an intersection of this {@link module:engine/view/range~ViewRange range}\n\t* and given {@link module:engine/view/range~ViewRange range}.\n\t* Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t*\n\t* Examples:\n\t*\n\t* ```ts\n\t* let foo = downcastWriter.createText( 'foo' );\n\t* let img = downcastWriter.createContainerElement( 'img' );\n\t* let bar = downcastWriter.createText( 'bar' );\n\t* let p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t*\n\t* let range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t* let otherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t* let transformed = range.getIntersection( otherRange ); // range from ( foo, 1 ) to ( p, 2 ).\n\t*\n\t* otherRange = view.createRange( view.createPositionAt( bar, 1 ), view.createPositionAt( bar, 3 ); \"ar\" is in range.\n\t* transformed = range.getIntersection( otherRange ); // null - no common part.\n\t* ```\n\t*\n\t* @param otherRange Range to check for intersection.\n\t* @returns A common part of given ranges or `null` if ranges have no common part.\n\t*/\n\tgetIntersection(otherRange) {\n\t\tif (this.isIntersecting(otherRange)) {\n\t\t\tlet commonRangeStart = this.start;\n\t\t\tlet commonRangeEnd = this.end;\n\t\t\tif (this.containsPosition(otherRange.start)) commonRangeStart = otherRange.start;\n\t\t\tif (this.containsPosition(otherRange.end)) commonRangeEnd = otherRange.end;\n\t\t\treturn new ViewRange(commonRangeStart, commonRangeEnd);\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Creates a {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker} instance with this range as a boundary.\n\t*\n\t* @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t*/\n\tgetWalker(options = {}) {\n\t\toptions.boundaries = this;\n\t\treturn new ViewTreeWalker(options);\n\t}\n\t/**\n\t* Returns a {@link module:engine/view/node~ViewNode} or {@link module:engine/view/documentfragment~ViewDocumentFragment}\n\t* which is a common ancestor of range's both ends (in which the entire range is contained).\n\t*/\n\tgetCommonAncestor() {\n\t\treturn this.start.getCommonAncestor(this.end);\n\t}\n\t/**\n\t* Returns an {@link module:engine/view/element~ViewElement Element} contained by the range.\n\t* The element will be returned when it is the **only** node within the range and **fully–contained**\n\t* at the same time.\n\t*/\n\tgetContainedElement() {\n\t\tif (this.isCollapsed) return null;\n\t\tlet nodeAfterStart = this.start.nodeAfter;\n\t\tlet nodeBeforeEnd = this.end.nodeBefore;\n\t\tif (this.start.parent.is(\"$text\") && this.start.isAtEnd && this.start.parent.nextSibling) nodeAfterStart = this.start.parent.nextSibling;\n\t\tif (this.end.parent.is(\"$text\") && this.end.isAtStart && this.end.parent.previousSibling) nodeBeforeEnd = this.end.parent.previousSibling;\n\t\tif (nodeAfterStart && nodeAfterStart.is(\"element\") && nodeAfterStart === nodeBeforeEnd) return nodeAfterStart;\n\t\treturn null;\n\t}\n\t/**\n\t* Clones this range.\n\t*/\n\tclone() {\n\t\treturn new ViewRange(this.start, this.end);\n\t}\n\t/**\n\t* Returns an iterator that iterates over all {@link module:engine/view/item~ViewItem view items} that are in this range and returns\n\t* them.\n\t*\n\t* This method uses {@link module:engine/view/treewalker~ViewTreeWalker} with `boundaries` set to this range\n\t* and `ignoreElementEnd` option set to `true`. However it returns only {@link module:engine/view/item~ViewItem items},\n\t* not {@link module:engine/view/treewalker~ViewTreeWalkerValue}.\n\t*\n\t* You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~ViewTreeWalker} for\n\t* a full list of available options.\n\t*\n\t* @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t*/\n\t*getItems(options = {}) {\n\t\toptions.boundaries = this;\n\t\toptions.ignoreElementEnd = true;\n\t\tconst treeWalker = new ViewTreeWalker(options);\n\t\tfor (const value of treeWalker) yield value.item;\n\t}\n\t/**\n\t* Returns an iterator that iterates over all {@link module:engine/view/position~ViewPosition positions} that are boundaries or\n\t* contained in this range.\n\t*\n\t* This method uses {@link module:engine/view/treewalker~ViewTreeWalker} with `boundaries` set to this range. However it returns only\n\t* {@link module:engine/view/position~ViewPosition positions}, not {@link module:engine/view/treewalker~ViewTreeWalkerValue}.\n\t*\n\t* You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~ViewTreeWalker} for\n\t* a full list of available options.\n\t*\n\t* @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t*/\n\t*getPositions(options = {}) {\n\t\toptions.boundaries = this;\n\t\tconst treeWalker = new ViewTreeWalker(options);\n\t\tyield treeWalker.position;\n\t\tfor (const value of treeWalker) yield value.nextPosition;\n\t}\n\t/**\n\t* Checks and returns whether this range intersects with the given range.\n\t*\n\t* @param otherRange Range to compare with.\n\t* @returns True if ranges intersect.\n\t*/\n\tisIntersecting(otherRange) {\n\t\treturn this.start.isBefore(otherRange.end) && this.end.isAfter(otherRange.start);\n\t}\n\t/**\n\t* Converts `ViewRange` instance to plain object and returns it.\n\t*\n\t* @returns `ViewRange` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\treturn {\n\t\t\tstart: this.start.toJSON(),\n\t\t\tend: this.end.toJSON()\n\t\t};\n\t}\n\t/**\n\t* Creates a range from the given parents and offsets.\n\t*\n\t* @internal\n\t* @param startElement Start position parent element.\n\t* @param startOffset Start position offset.\n\t* @param endElement End position parent element.\n\t* @param endOffset End position offset.\n\t* @returns Created range.\n\t*/\n\tstatic _createFromParentsAndOffsets(startElement, startOffset, endElement, endOffset) {\n\t\treturn new this(new ViewPosition(startElement, startOffset), new ViewPosition(endElement, endOffset));\n\t}\n\t/**\n\t* Creates a new range, spreading from specified {@link module:engine/view/position~ViewPosition position} to a position moved by\n\t* given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t*\n\t* @internal\n\t* @param position Beginning of the range.\n\t* @param shift How long the range should be.\n\t*/\n\tstatic _createFromPositionAndShift(position, shift) {\n\t\tconst start = position;\n\t\tconst end = position.getShiftedBy(shift);\n\t\treturn shift > 0 ? new this(start, end) : new this(end, start);\n\t}\n\t/**\n\t* Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* @internal\n\t* @param element Element which is a parent for the range.\n\t*/\n\tstatic _createIn(element) {\n\t\treturn this._createFromParentsAndOffsets(element, 0, element, element.childCount);\n\t}\n\t/**\n\t* Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t*\n\t* @internal\n\t*/\n\tstatic _createOn(item) {\n\t\tconst size = item.is(\"$textProxy\") ? item.offsetSize : 1;\n\t\treturn this._createFromPositionAndShift(ViewPosition._createBefore(item), size);\n\t}\n};\nViewRange.prototype.is = function(type) {\n\treturn type === \"range\" || type === \"view:range\";\n};\n/**\n* Function used by getEnlarged and getTrimmed methods.\n*/\nfunction enlargeTrimSkip(value) {\n\tif (value.item.is(\"attributeElement\") || value.item.is(\"uiElement\")) 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 engine/view/selection\n*/\nconst ViewSelectionBase = /* #__PURE__ */ EmitterMixin(ViewTypeCheckable);\n/**\n* Class representing an arbirtary selection in the view.\n* See also {@link module:engine/view/documentselection~ViewDocumentSelection}.\n*\n* New selection instances can be created via the constructor or one these methods:\n*\n* * {@link module:engine/view/view~EditingView#createSelection `View#createSelection()`},\n* * {@link module:engine/view/upcastwriter~ViewUpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n*\n* A selection can consist of {@link module:engine/view/range~ViewRange ranges} that can be set by using\n* the {@link module:engine/view/selection~ViewSelection#setTo `Selection#setTo()`} method.\n*/\nvar ViewSelection = class ViewSelection extends ViewSelectionBase {\n\t/**\n\t* Stores all ranges that are selected.\n\t*/\n\t_ranges;\n\t/**\n\t* Specifies whether the last added range was added as a backward or forward range.\n\t*/\n\t_lastRangeBackward;\n\t/**\n\t* Specifies whether selection instance is fake.\n\t*/\n\t_isFake;\n\t/**\n\t* Fake selection's label.\n\t*/\n\t_fakeSelectionLabel;\n\t/**\n\t* Creates new selection instance.\n\t*\n\t* **Note**: The selection constructor is available as a factory method:\n\t*\n\t* * {@link module:engine/view/view~EditingView#createSelection `View#createSelection()`},\n\t* * {@link module:engine/view/upcastwriter~ViewUpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n\t*\n\t* ```ts\n\t* // Creates empty selection without ranges.\n\t* const selection = writer.createSelection();\n\t*\n\t* // Creates selection at the given range.\n\t* const range = writer.createRange( start, end );\n\t* const selection = writer.createSelection( range );\n\t*\n\t* // Creates selection at the given ranges\n\t* const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t* const selection = writer.createSelection( ranges );\n\t*\n\t* // Creates selection from the other selection.\n\t* const otherSelection = writer.createSelection();\n\t* const selection = writer.createSelection( otherSelection );\n\t*\n\t* // Creates selection from the document selection.\n\t* const selection = writer.createSelection( editor.editing.view.document.selection );\n\t*\n\t* // Creates selection at the given position.\n\t* const position = writer.createPositionFromPath( root, path );\n\t* const selection = writer.createSelection( position );\n\t*\n\t* // Creates collapsed selection at the position of given item and offset.\n\t* const paragraph = writer.createContainerElement( 'paragraph' );\n\t* const selection = writer.createSelection( paragraph, offset );\n\t*\n\t* // Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the\n\t* // first child of that element and ends after the last child of that element.\n\t* const selection = writer.createSelection( paragraph, 'in' );\n\t*\n\t* // Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends\n\t* // just after the item.\n\t* const selection = writer.createSelection( paragraph, 'on' );\n\t* ```\n\t*\n\t* `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t*\n\t* ```ts\n\t* // Creates backward selection.\n\t* const selection = writer.createSelection( range, { backward: true } );\n\t* ```\n\t*\n\t* Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t* This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t* represented in other way, for example by applying proper CSS class.\n\t*\n\t* Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t* (and be  properly handled by screen readers).\n\t*\n\t* ```ts\n\t* // Creates fake selection with label.\n\t* const selection = writer.createSelection( range, { fake: true, label: 'foo' } );\n\t* ```\n\t*\n\t* @internal\n\t*/\n\tconstructor(...args) {\n\t\tsuper();\n\t\tthis._ranges = [];\n\t\tthis._lastRangeBackward = false;\n\t\tthis._isFake = false;\n\t\tthis._fakeSelectionLabel = \"\";\n\t\tif (args.length) this.setTo(...args);\n\t}\n\t/**\n\t* Returns true if selection instance is marked as `fake`.\n\t*\n\t* @see #setTo\n\t*/\n\tget isFake() {\n\t\treturn this._isFake;\n\t}\n\t/**\n\t* Returns fake selection label.\n\t*\n\t* @see #setTo\n\t*/\n\tget fakeSelectionLabel() {\n\t\treturn this._fakeSelectionLabel;\n\t}\n\t/**\n\t* Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t* {@link #focus focus} they define the direction of selection, which is important\n\t* when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t* It may be a bit unintuitive when there are multiple ranges in selection.\n\t*\n\t* @see #focus\n\t*/\n\tget anchor() {\n\t\tif (!this._ranges.length) return null;\n\t\tconst range = this._ranges[this._ranges.length - 1];\n\t\treturn (this._lastRangeBackward ? range.end : range.start).clone();\n\t}\n\t/**\n\t* Selection focus. Focus is a position where the selection ends.\n\t*\n\t* @see #anchor\n\t*/\n\tget focus() {\n\t\tif (!this._ranges.length) return null;\n\t\tconst range = this._ranges[this._ranges.length - 1];\n\t\treturn (this._lastRangeBackward ? range.start : range.end).clone();\n\t}\n\t/**\n\t* Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t* collapsed.\n\t*/\n\tget isCollapsed() {\n\t\treturn this.rangeCount === 1 && this._ranges[0].isCollapsed;\n\t}\n\t/**\n\t* Returns number of ranges in selection.\n\t*/\n\tget rangeCount() {\n\t\treturn this._ranges.length;\n\t}\n\t/**\n\t* Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t*/\n\tget isBackward() {\n\t\treturn !this.isCollapsed && this._lastRangeBackward;\n\t}\n\t/**\n\t* {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement} instance that contains this selection, or `null`\n\t* if the selection is not inside an editable element.\n\t*/\n\tget editableElement() {\n\t\tif (this.anchor) return this.anchor.editableElement;\n\t\treturn null;\n\t}\n\t/**\n\t* Returns an iterable that contains copies of all ranges added to the selection.\n\t*/\n\t*getRanges() {\n\t\tfor (const range of this._ranges) yield range.clone();\n\t}\n\t/**\n\t* Returns copy of the first range in the selection. First range is the one which\n\t* {@link module:engine/view/range~ViewRange#start start} position\n\t* {@link module:engine/view/position~ViewPosition#isBefore is before} start\n\t* position of all other ranges (not to confuse with the first range added to the selection).\n\t* Returns `null` if no ranges are added to selection.\n\t*/\n\tgetFirstRange() {\n\t\tlet first = null;\n\t\tfor (const range of this._ranges) if (!first || range.start.isBefore(first.start)) first = range;\n\t\treturn first ? first.clone() : null;\n\t}\n\t/**\n\t* Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~ViewRange#end end}\n\t* position {@link module:engine/view/position~ViewPosition#isAfter is after} end position of all other ranges (not to confuse\n\t* with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t*/\n\tgetLastRange() {\n\t\tlet last = null;\n\t\tfor (const range of this._ranges) if (!last || range.end.isAfter(last.end)) last = range;\n\t\treturn last ? last.clone() : null;\n\t}\n\t/**\n\t* Returns copy of the first position in the selection. First position is the position that\n\t* {@link module:engine/view/position~ViewPosition#isBefore is before} any other position in the selection ranges.\n\t* Returns `null` if no ranges are added to selection.\n\t*/\n\tgetFirstPosition() {\n\t\tconst firstRange = this.getFirstRange();\n\t\treturn firstRange ? firstRange.start.clone() : null;\n\t}\n\t/**\n\t* Returns copy of the last position in the selection. Last position is the position that\n\t* {@link module:engine/view/position~ViewPosition#isAfter is after} any other position in the selection ranges.\n\t* Returns `null` if no ranges are added to selection.\n\t*/\n\tgetLastPosition() {\n\t\tconst lastRange = this.getLastRange();\n\t\treturn lastRange ? lastRange.end.clone() : null;\n\t}\n\t/**\n\t* Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t* same number of ranges and all ranges from one selection equal to a range from other selection.\n\t*\n\t* @param otherSelection Selection to compare with.\n\t* @returns `true` if selections are equal, `false` otherwise.\n\t*/\n\tisEqual(otherSelection) {\n\t\tif (this.isFake != otherSelection.isFake) return false;\n\t\tif (this.isFake && this.fakeSelectionLabel != otherSelection.fakeSelectionLabel) return false;\n\t\tif (this.rangeCount != otherSelection.rangeCount) return false;\n\t\telse if (this.rangeCount === 0) return true;\n\t\tif (!this.anchor.isEqual(otherSelection.anchor) || !this.focus.isEqual(otherSelection.focus)) return false;\n\t\tfor (const thisRange of this._ranges) {\n\t\t\tlet found = false;\n\t\t\tfor (const otherRange of otherSelection._ranges) if (thisRange.isEqual(otherRange)) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!found) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t* number of ranges, and all {@link module:engine/view/range~ViewRange#getTrimmed trimmed} ranges from one selection are\n\t* equal to any trimmed range from other selection.\n\t*\n\t* @param otherSelection Selection to compare with.\n\t* @returns `true` if selections are similar, `false` otherwise.\n\t*/\n\tisSimilar(otherSelection) {\n\t\tif (this.isBackward != otherSelection.isBackward) return false;\n\t\tconst numOfRangesA = count(this.getRanges());\n\t\tif (numOfRangesA != count(otherSelection.getRanges())) return false;\n\t\tif (numOfRangesA == 0) return true;\n\t\tfor (let rangeA of this.getRanges()) {\n\t\t\trangeA = rangeA.getTrimmed();\n\t\t\tlet found = false;\n\t\t\tfor (let rangeB of otherSelection.getRanges()) {\n\t\t\t\trangeB = rangeB.getTrimmed();\n\t\t\t\tif (rangeA.start.isEqual(rangeB.start) && rangeA.end.isEqual(rangeB.end)) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Returns the selected element. {@link module:engine/view/element~ViewElement Element} is considered as selected if there is only\n\t* one range in the selection, and that range contains exactly one element.\n\t* Returns `null` if there is no selected element.\n\t*/\n\tgetSelectedElement() {\n\t\tif (this.rangeCount !== 1) return null;\n\t\treturn this.getFirstRange().getContainedElement();\n\t}\n\t/**\n\t* Sets this selection's ranges and direction to the specified location based on the given\n\t* {@link module:engine/view/selection~ViewSelectable selectable}.\n\t*\n\t* ```ts\n\t* // Sets selection to the given range.\n\t* const range = writer.createRange( start, end );\n\t* selection.setTo( range );\n\t*\n\t* // Sets selection to given ranges.\n\t* const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t* selection.setTo( range );\n\t*\n\t* // Sets selection to the other selection.\n\t* const otherSelection = writer.createSelection();\n\t* selection.setTo( otherSelection );\n\t*\n\t* // Sets selection to contents of ViewDocumentSelection.\n\t* selection.setTo( editor.editing.view.document.selection );\n\t*\n\t* // Sets collapsed selection at the given position.\n\t* const position = writer.createPositionAt( root, path );\n\t* selection.setTo( position );\n\t*\n\t* // Sets collapsed selection at the position of given item and offset.\n\t* selection.setTo( paragraph, offset );\n\t* ```\n\t*\n\t* Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* ```ts\n\t* selection.setTo( paragraph, 'in' );\n\t* ```\n\t*\n\t* Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends just after the item.\n\t*\n\t* ```ts\n\t* selection.setTo( paragraph, 'on' );\n\t*\n\t* // Clears selection. Removes all ranges.\n\t* selection.setTo( null );\n\t* ```\n\t*\n\t* `Selection#setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t*\n\t* ```ts\n\t* // Sets selection as backward.\n\t* selection.setTo( range, { backward: true } );\n\t* ```\n\t*\n\t* Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t* This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t* represented in other way, for example by applying proper CSS class.\n\t*\n\t* Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t* (and be  properly handled by screen readers).\n\t*\n\t* ```ts\n\t* // Creates fake selection with label.\n\t* selection.setTo( range, { fake: true, label: 'foo' } );\n\t* ```\n\t*\n\t* @fires change\n\t*/\n\tsetTo(...args) {\n\t\tlet [selectable, placeOrOffset, options] = args;\n\t\tif (typeof placeOrOffset == \"object\") {\n\t\t\toptions = placeOrOffset;\n\t\t\tplaceOrOffset = void 0;\n\t\t}\n\t\tif (selectable === null) {\n\t\t\tthis._setRanges([]);\n\t\t\tthis._setFakeOptions(options);\n\t\t} else if (selectable instanceof ViewSelection || selectable instanceof ViewDocumentSelection) {\n\t\t\tthis._setRanges(selectable.getRanges(), selectable.isBackward);\n\t\t\tthis._setFakeOptions({\n\t\t\t\tfake: selectable.isFake,\n\t\t\t\tlabel: selectable.fakeSelectionLabel\n\t\t\t});\n\t\t} else if (selectable instanceof ViewRange) {\n\t\t\tthis._setRanges([selectable], options && options.backward);\n\t\t\tthis._setFakeOptions(options);\n\t\t} else if (selectable instanceof ViewPosition) {\n\t\t\tthis._setRanges([new ViewRange(selectable)]);\n\t\t\tthis._setFakeOptions(options);\n\t\t} else if (selectable instanceof ViewNode) {\n\t\t\tconst backward = !!options && !!options.backward;\n\t\t\tlet range;\n\t\t\tif (placeOrOffset === void 0)\n /**\n\t\t\t* selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t*\n\t\t\t* @error view-selection-setto-required-second-parameter\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"view-selection-setto-required-second-parameter\", this);\n\t\t\telse if (placeOrOffset == \"in\") range = ViewRange._createIn(selectable);\n\t\t\telse if (placeOrOffset == \"on\") range = ViewRange._createOn(selectable);\n\t\t\telse range = new ViewRange(ViewPosition._createAt(selectable, placeOrOffset));\n\t\t\tthis._setRanges([range], backward);\n\t\t\tthis._setFakeOptions(options);\n\t\t} else if (isIterable(selectable)) {\n\t\t\tthis._setRanges(selectable, options && options.backward);\n\t\t\tthis._setFakeOptions(options);\n\t\t} else\n /**\n\t\t* Cannot set selection to given place.\n\t\t*\n\t\t* @error view-selection-setto-not-selectable\n\t\t*/\n\t\tthrow new CKEditorError(\"view-selection-setto-not-selectable\", this);\n\t\tthis.fire(\"change\");\n\t}\n\t/**\n\t* Moves {@link #focus} to the specified location.\n\t*\n\t* The location can be specified in the same form as\n\t* {@link module:engine/view/view~EditingView#createPositionAt view.createPositionAt()}\n\t* parameters.\n\t*\n\t* @fires change\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t*/\n\tsetFocus(itemOrPosition, offset) {\n\t\tif (this.anchor === null)\n /**\n\t\t* Cannot set selection focus if there are no ranges in selection.\n\t\t*\n\t\t* @error view-selection-setfocus-no-ranges\n\t\t*/\n\t\tthrow new CKEditorError(\"view-selection-setfocus-no-ranges\", this);\n\t\tconst newFocus = ViewPosition._createAt(itemOrPosition, offset);\n\t\tif (newFocus.compareWith(this.focus) == \"same\") return;\n\t\tconst anchor = this.anchor;\n\t\tthis._ranges.pop();\n\t\tif (newFocus.compareWith(anchor) == \"before\") this._addRange(new ViewRange(newFocus, anchor), true);\n\t\telse this._addRange(new ViewRange(anchor, newFocus));\n\t\tthis.fire(\"change\");\n\t}\n\t/**\n\t* Converts `ViewSelection` instance to plain object and returns it.\n\t*\n\t* @returns `ViewSelection` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = { ranges: Array.from(this.getRanges()).map((range) => range.toJSON()) };\n\t\tif (this.isBackward) json.isBackward = true;\n\t\tif (this.isFake) json.isFake = true;\n\t\treturn json;\n\t}\n\t/**\n\t* Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t* is treated like the last added range and is used to set {@link #anchor anchor} and {@link #focus focus}.\n\t* Accepts a flag describing in which way the selection is made.\n\t*\n\t* @param newRanges Iterable object of ranges to set.\n\t* @param isLastBackward Flag describing if last added range was selected forward - from start to end\n\t* (`false`) or backward - from end to start (`true`). Defaults to `false`.\n\t*/\n\t_setRanges(newRanges, isLastBackward = false) {\n\t\tnewRanges = Array.from(newRanges);\n\t\tthis._ranges = [];\n\t\tfor (const range of newRanges) this._addRange(range);\n\t\tthis._lastRangeBackward = !!isLastBackward;\n\t}\n\t/**\n\t* Sets this selection instance to be marked as `fake`. A fake selection does not render as browser native selection\n\t* over selected elements and is hidden to the user. This way, no native selection UI artifacts are displayed to\n\t* the user and selection over elements can be represented in other way, for example by applying proper CSS class.\n\t*\n\t* Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM (and be\n\t* properly handled by screen readers).\n\t*/\n\t_setFakeOptions(options = {}) {\n\t\tthis._isFake = !!options.fake;\n\t\tthis._fakeSelectionLabel = options.fake ? options.label || \"\" : \"\";\n\t}\n\t/**\n\t* Adds a range to the selection. Added range is copied. This means that passed range is not saved in the\n\t* selection instance and you can safely operate on it.\n\t*\n\t* Accepts a flag describing in which way the selection is made - passed range might be selected from\n\t* {@link module:engine/view/range~ViewRange#start start} to {@link module:engine/view/range~ViewRange#end end}\n\t* or from {@link module:engine/view/range~ViewRange#end end} to {@link module:engine/view/range~ViewRange#start start}.\n\t* The flag is used to set {@link #anchor anchor} and {@link #focus focus} properties.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t* with ranges already stored in Selection instance.\n\t*/\n\t_addRange(range, isBackward = false) {\n\t\tif (!(range instanceof ViewRange))\n /**\n\t\t* Selection range set to an object that is not an instance of {@link module:engine/view/range~ViewRange}.\n\t\t*\n\t\t* @error view-selection-add-range-not-range\n\t\t*/\n\t\tthrow new CKEditorError(\"view-selection-add-range-not-range\", this);\n\t\tthis._pushRange(range);\n\t\tthis._lastRangeBackward = !!isBackward;\n\t}\n\t/**\n\t* Adds range to selection - creates copy of given range so it can be safely used and modified.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t* with ranges already stored in selection instance.\n\t*/\n\t_pushRange(range) {\n\t\tfor (const storedRange of this._ranges) if (range.isIntersecting(storedRange))\n /**\n\t\t* Trying to add a range that intersects with another range from selection.\n\t\t*\n\t\t* @error view-selection-range-intersects\n\t\t* @param {module:engine/view/range~ViewRange} addedRange Range that was added to the selection.\n\t\t* @param {module:engine/view/range~ViewRange} intersectingRange Range from selection that intersects with `addedRange`.\n\t\t*/\n\t\tthrow new CKEditorError(\"view-selection-range-intersects\", this, {\n\t\t\taddedRange: range,\n\t\t\tintersectingRange: storedRange\n\t\t});\n\t\tthis._ranges.push(new ViewRange(range.start, range.end));\n\t}\n};\nViewSelection.prototype.is = function(type) {\n\treturn type === \"selection\" || type === \"view:selection\";\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 engine/view/documentselection\n*/\nconst ViewDocumentSelectionBase = /* #__PURE__ */ EmitterMixin(ViewTypeCheckable);\n/**\n* Class representing the document selection in the view.\n*\n* Its instance is available in {@link module:engine/view/document~ViewDocument#selection `Document#selection`}.\n*\n* It is similar to {@link module:engine/view/selection~ViewSelection} but\n* it has a read-only API and can be modified only by the writer available in\n* the {@link module:engine/view/view~EditingView#change `View#change()`} block\n* (so via {@link module:engine/view/downcastwriter~ViewDowncastWriter#setSelection `ViewDowncastWriter#setSelection()`}).\n*/\nvar ViewDocumentSelection = class extends ViewDocumentSelectionBase {\n\t/**\n\t* Selection is used internally (`ViewDocumentSelection` is a proxy to that selection).\n\t*/\n\t_selection;\n\tconstructor(...args) {\n\t\tsuper();\n\t\tthis._selection = new ViewSelection();\n\t\tthis._selection.delegate(\"change\").to(this);\n\t\tif (args.length) this._selection.setTo(...args);\n\t}\n\t/**\n\t* Returns true if selection instance is marked as `fake`.\n\t*\n\t* @see #_setTo\n\t*/\n\tget isFake() {\n\t\treturn this._selection.isFake;\n\t}\n\t/**\n\t* Returns fake selection label.\n\t*\n\t* @see #_setTo\n\t*/\n\tget fakeSelectionLabel() {\n\t\treturn this._selection.fakeSelectionLabel;\n\t}\n\t/**\n\t* Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t* {@link #focus focus} they define the direction of selection, which is important\n\t* when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t* It may be a bit unintuitive when there are multiple ranges in selection.\n\t*\n\t* @see #focus\n\t*/\n\tget anchor() {\n\t\treturn this._selection.anchor;\n\t}\n\t/**\n\t* Selection focus. Focus is a position where the selection ends.\n\t*\n\t* @see #anchor\n\t*/\n\tget focus() {\n\t\treturn this._selection.focus;\n\t}\n\t/**\n\t* Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t* collapsed.\n\t*/\n\tget isCollapsed() {\n\t\treturn this._selection.isCollapsed;\n\t}\n\t/**\n\t* Returns number of ranges in selection.\n\t*/\n\tget rangeCount() {\n\t\treturn this._selection.rangeCount;\n\t}\n\t/**\n\t* Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t*/\n\tget isBackward() {\n\t\treturn this._selection.isBackward;\n\t}\n\t/**\n\t* {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement} instance that contains this selection, or `null`\n\t* if the selection is not inside an editable element.\n\t*/\n\tget editableElement() {\n\t\treturn this._selection.editableElement;\n\t}\n\t/**\n\t* Used for the compatibility with the {@link module:engine/view/selection~ViewSelection#isEqual} method.\n\t*\n\t* @internal\n\t*/\n\tget _ranges() {\n\t\treturn this._selection._ranges;\n\t}\n\t/**\n\t* Returns an iterable that contains copies of all ranges added to the selection.\n\t*/\n\t*getRanges() {\n\t\tyield* this._selection.getRanges();\n\t}\n\t/**\n\t* Returns copy of the first range in the selection. First range is the one which\n\t* {@link module:engine/view/range~ViewRange#start start} position\n\t* {@link module:engine/view/position~ViewPosition#isBefore is before} start\n\t* position of all other ranges (not to confuse with the first range added to the selection).\n\t* Returns `null` if no ranges are added to selection.\n\t*/\n\tgetFirstRange() {\n\t\treturn this._selection.getFirstRange();\n\t}\n\t/**\n\t* Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~ViewRange#end end}\n\t* position {@link module:engine/view/position~ViewPosition#isAfter is after} end position of all other ranges (not to confuse\n\t* with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t*/\n\tgetLastRange() {\n\t\treturn this._selection.getLastRange();\n\t}\n\t/**\n\t* Returns copy of the first position in the selection. First position is the position that\n\t* {@link module:engine/view/position~ViewPosition#isBefore is before} any other position in the selection ranges.\n\t* Returns `null` if no ranges are added to selection.\n\t*/\n\tgetFirstPosition() {\n\t\treturn this._selection.getFirstPosition();\n\t}\n\t/**\n\t* Returns copy of the last position in the selection. Last position is the position that\n\t* {@link module:engine/view/position~ViewPosition#isAfter is after} any other position in the selection ranges.\n\t* Returns `null` if no ranges are added to selection.\n\t*/\n\tgetLastPosition() {\n\t\treturn this._selection.getLastPosition();\n\t}\n\t/**\n\t* Returns the selected element. {@link module:engine/view/element~ViewElement Element} is considered as selected if there is only\n\t* one range in the selection, and that range contains exactly one element.\n\t* Returns `null` if there is no selected element.\n\t*/\n\tgetSelectedElement() {\n\t\treturn this._selection.getSelectedElement();\n\t}\n\t/**\n\t* Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t* same number of ranges and all ranges from one selection equal to a range from other selection.\n\t*\n\t* @param otherSelection Selection to compare with.\n\t* @returns `true` if selections are equal, `false` otherwise.\n\t*/\n\tisEqual(otherSelection) {\n\t\treturn this._selection.isEqual(otherSelection);\n\t}\n\t/**\n\t* Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t* number of ranges, and all {@link module:engine/view/range~ViewRange#getTrimmed trimmed} ranges from one selection are\n\t* equal to any trimmed range from other selection.\n\t*\n\t* @param otherSelection Selection to compare with.\n\t* @returns `true` if selections are similar, `false` otherwise.\n\t*/\n\tisSimilar(otherSelection) {\n\t\treturn this._selection.isSimilar(otherSelection);\n\t}\n\t/**\n\t* Converts `ViewDocumentSelection` instance to plain object and returns it.\n\t*\n\t* @returns `ViewDocumentSelection` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\treturn this._selection.toJSON();\n\t}\n\t/**\n\t* Sets this selection's ranges and direction to the specified location based on the given\n\t* {@link module:engine/view/selection~ViewSelectable selectable}.\n\t*\n\t* ```ts\n\t* // Sets selection to the given range.\n\t* const range = writer.createRange( start, end );\n\t* documentSelection._setTo( range );\n\t*\n\t* // Sets selection to given ranges.\n\t* const ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t* documentSelection._setTo( range );\n\t*\n\t* // Sets selection to the other selection.\n\t* const otherSelection = writer.createSelection();\n\t* documentSelection._setTo( otherSelection );\n\t*\n\t* // Sets collapsed selection at the given position.\n\t* const position = writer.createPositionAt( root, offset );\n\t* documentSelection._setTo( position );\n\t*\n\t* // Sets collapsed selection at the position of given item and offset.\n\t* documentSelection._setTo( paragraph, offset );\n\t* ```\n\t*\n\t* Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* ```ts\n\t* documentSelection._setTo( paragraph, 'in' );\n\t* ```\n\t*\n\t* Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends just after the item.\n\t*\n\t* ```ts\n\t* documentSelection._setTo( paragraph, 'on' );\n\t*\n\t* // Clears selection. Removes all ranges.\n\t* documentSelection._setTo( null );\n\t* ```\n\t*\n\t* `Selection#_setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t*\n\t* ```ts\n\t* // Sets selection as backward.\n\t* documentSelection._setTo( range, { backward: true } );\n\t* ```\n\t*\n\t* Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t* This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t* represented in other way, for example by applying proper CSS class.\n\t*\n\t* Additionally fake's selection label can be provided. It will be used to des cribe fake selection in DOM\n\t* (and be  properly handled by screen readers).\n\t*\n\t* ```ts\n\t* // Creates fake selection with label.\n\t* documentSelection._setTo( range, { fake: true, label: 'foo' } );\n\t* ```\n\t*\n\t* @internal\n\t* @fires change\n\t*/\n\t_setTo(...args) {\n\t\tthis._selection.setTo(...args);\n\t}\n\t/**\n\t* Moves {@link #focus} to the specified location.\n\t*\n\t* The location can be specified in the same form as\n\t* {@link module:engine/view/view~EditingView#createPositionAt view.createPositionAt()}\n\t* parameters.\n\t*\n\t* @internal\n\t* @fires change\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t*/\n\t_setFocus(itemOrPosition, offset) {\n\t\tthis._selection.setFocus(itemOrPosition, offset);\n\t}\n};\nViewDocumentSelection.prototype.is = function(type) {\n\treturn type === \"selection\" || type == \"documentSelection\" || type == \"view:selection\" || type == \"view:documentSelection\";\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 engine/view/observer/bubblingeventinfo\n*/\n/**\n* The event object passed to bubbling event callbacks. It is used to provide information about the event as well as a tool to\n* manipulate it.\n*/\nvar BubblingEventInfo = class extends EventInfo {\n\t/**\n\t* The view range that the bubbling should start from.\n\t*/\n\tstartRange;\n\t/**\n\t* The current event phase.\n\t*/\n\t_eventPhase;\n\t/**\n\t* The current bubbling target.\n\t*/\n\t_currentTarget;\n\t/**\n\t* @param source The emitter.\n\t* @param name The event name.\n\t* @param startRange The view range that the bubbling should start from.\n\t*/\n\tconstructor(source, name, startRange) {\n\t\tsuper(source, name);\n\t\tthis.startRange = startRange;\n\t\tthis._eventPhase = \"none\";\n\t\tthis._currentTarget = null;\n\t}\n\t/**\n\t* The current event phase.\n\t*/\n\tget eventPhase() {\n\t\treturn this._eventPhase;\n\t}\n\t/**\n\t* The current bubbling target.\n\t*/\n\tget currentTarget() {\n\t\treturn this._currentTarget;\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 engine/view/observer/bubblingemittermixin\n*/\nconst bubblingEmitterSymbol = Symbol(\"bubblingEmitter\");\nconst callbackMapSymbol = Symbol(\"bubblingCallbacks\");\nconst contextsSymbol = Symbol(\"bubblingContexts\");\n/**\n* Bubbling emitter mixin for the view document as described in the {@link ~BubblingEmitter} interface.\n*\n* This function creates a class that inherits from the provided `base` and implements `Emitter` interface.\n* The base class must implement {@link module:utils/emittermixin~Emitter} interface.\n*\n* ```ts\n* class BaseClass extends EmitterMixin() {\n* \t// ...\n* }\n*\n* class MyClass extends BubblingEmitterMixin( BaseClass ) {\n* \t// This class derives from `BaseClass` and implements the `BubblingEmitter` interface.\n* }\n* ```\n*/\nfunction BubblingEmitterMixin(base) {\n\tclass Mixin extends base {\n\t\tfire(eventOrInfo, ...eventArgs) {\n\t\t\ttry {\n\t\t\t\tconst eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo(this, eventOrInfo);\n\t\t\t\tconst bubblingEmitter = getBubblingEmitter(this);\n\t\t\t\tconst customContexts = getCustomContexts(this);\n\t\t\t\tupdateEventInfo(eventInfo, \"capturing\", this);\n\t\t\t\tif (fireListenerFor(bubblingEmitter, \"$capture\", eventInfo, ...eventArgs)) return eventInfo.return;\n\t\t\t\tconst startRange = eventInfo.startRange || this.selection.getFirstRange();\n\t\t\t\tconst selectedElement = startRange ? startRange.getContainedElement() : null;\n\t\t\t\tconst isCustomContext = selectedElement ? hasMatchingCustomContext(customContexts, selectedElement) : false;\n\t\t\t\tlet node = selectedElement || getDeeperRangeParent(startRange);\n\t\t\t\tupdateEventInfo(eventInfo, \"atTarget\", node);\n\t\t\t\tif (!isCustomContext) {\n\t\t\t\t\tif (fireListenerFor(bubblingEmitter, \"$text\", eventInfo, ...eventArgs)) return eventInfo.return;\n\t\t\t\t\tupdateEventInfo(eventInfo, \"bubbling\", node);\n\t\t\t\t}\n\t\t\t\twhile (node) {\n\t\t\t\t\tif (node.is(\"element\") && fireListenerFor(bubblingEmitter, node, eventInfo, ...eventArgs)) return eventInfo.return;\n\t\t\t\t\tnode = node.parent;\n\t\t\t\t\tupdateEventInfo(eventInfo, \"bubbling\", node);\n\t\t\t\t}\n\t\t\t\tupdateEventInfo(eventInfo, \"bubbling\", this);\n\t\t\t\tfireListenerFor(bubblingEmitter, \"$document\", eventInfo, ...eventArgs);\n\t\t\t\treturn eventInfo.return;\n\t\t\t} catch (err) {\n\t\t\t\tCKEditorError.rethrowUnexpectedError(err, this);\n\t\t\t}\n\t\t}\n\t\t_addEventListener(event, callback, options) {\n\t\t\tconst contexts = toArray(options.context || \"$document\");\n\t\t\tconst bubblingEmitter = getBubblingEmitter(this);\n\t\t\tconst callbacksMap = getCallbackMap(this);\n\t\t\tfor (const context of contexts) if (typeof context == \"function\") getCustomContexts(this).add(context);\n\t\t\tconst wrappedCallback = wrapCallback(this, contexts, callback);\n\t\t\tcallbacksMap.set(callback, wrappedCallback);\n\t\t\tthis.listenTo(bubblingEmitter, event, wrappedCallback, options);\n\t\t}\n\t\t_removeEventListener(event, callback) {\n\t\t\tconst bubblingEmitter = getBubblingEmitter(this);\n\t\t\tconst callbacksMap = getCallbackMap(this);\n\t\t\tconst wrappedCallback = callbacksMap.get(callback);\n\t\t\tif (wrappedCallback) {\n\t\t\t\tcallbacksMap.delete(callback);\n\t\t\t\tthis.stopListening(bubblingEmitter, event, wrappedCallback);\n\t\t\t}\n\t\t}\n\t}\n\treturn Mixin;\n}\n/**\n* Update the event info bubbling fields.\n*\n* @param eventInfo The event info object to update.\n* @param eventPhase The current event phase.\n* @param currentTarget The current bubbling target.\n*/\nfunction updateEventInfo(eventInfo, eventPhase, currentTarget) {\n\tif (eventInfo instanceof BubblingEventInfo) {\n\t\teventInfo._eventPhase = eventPhase;\n\t\teventInfo._currentTarget = currentTarget;\n\t}\n}\n/**\n* Fires the listener for the specified context. Returns `true` if event was stopped.\n*\n* @param eventInfo The `EventInfo` object.\n* @param eventArgs Additional arguments to be passed to the callbacks.\n* @returns True if event stop was called.\n*/\nfunction fireListenerFor(emitter, currentTarget, eventInfo, ...eventArgs) {\n\temitter.fire(eventInfo, {\n\t\tcurrentTarget,\n\t\teventArgs\n\t});\n\tif (eventInfo.stop.called) return true;\n\treturn false;\n}\n/**\n* Returns an event callback wrapped with context check condition.\n*/\nfunction wrapCallback(emitter, contexts, callback) {\n\treturn function(event, data) {\n\t\tconst { currentTarget, eventArgs } = data;\n\t\tif (typeof currentTarget == \"string\") {\n\t\t\tif (contexts.includes(currentTarget)) callback.call(emitter, event, ...eventArgs);\n\t\t\treturn;\n\t\t}\n\t\tif (currentTarget.is(\"rootElement\") && contexts.includes(\"$root\")) {\n\t\t\tcallback.call(emitter, event, ...eventArgs);\n\t\t\treturn;\n\t\t}\n\t\tif (contexts.includes(currentTarget.name)) {\n\t\t\tcallback.call(emitter, event, ...eventArgs);\n\t\t\treturn;\n\t\t}\n\t\tfor (const context of contexts) if (typeof context == \"function\" && context(currentTarget)) {\n\t\t\tcallback.call(emitter, event, ...eventArgs);\n\t\t\treturn;\n\t\t}\n\t};\n}\n/**\n* Returns bubbling emitter for the source (emitter).\n*/\nfunction getBubblingEmitter(source) {\n\tif (!source[bubblingEmitterSymbol]) source[bubblingEmitterSymbol] = new (EmitterMixin())();\n\treturn source[bubblingEmitterSymbol];\n}\n/**\n* Returns map of callbacks (original to wrapped one).\n*/\nfunction getCallbackMap(source) {\n\tif (!source[callbackMapSymbol]) source[callbackMapSymbol] = /* @__PURE__ */ new Map();\n\treturn source[callbackMapSymbol];\n}\n/**\n* Returns the set of registered custom contexts.\n*/\nfunction getCustomContexts(source) {\n\tif (!source[contextsSymbol]) source[contextsSymbol] = /* @__PURE__ */ new Set();\n\treturn source[contextsSymbol];\n}\n/**\n* Returns true if any of custom context match the given element.\n*/\nfunction hasMatchingCustomContext(customContexts, element) {\n\tfor (const context of customContexts) if (context(element)) return true;\n\treturn false;\n}\n/**\n* Returns the deeper parent element for the range.\n*/\nfunction getDeeperRangeParent(range) {\n\tif (!range) return null;\n\tconst startParent = range.start.parent;\n\tconst endParent = range.end.parent;\n\tconst startPath = startParent.getPath();\n\tconst endPath = endParent.getPath();\n\treturn startPath.length > endPath.length ? startParent : endParent;\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 engine/view/document\n*/\nconst ViewDocumentBase = /* #__PURE__ */ BubblingEmitterMixin(/* #__PURE__ */ ObservableMixin());\n/**\n* Document class creates an abstract layer over the content editable area, contains a tree of view elements and\n* {@link module:engine/view/documentselection~ViewDocumentSelection view selection} associated with this document.\n*/\nvar ViewDocument = class extends ViewDocumentBase {\n\t/**\n\t* Selection done on this document.\n\t*/\n\tselection;\n\t/**\n\t* Roots of the view tree. Collection of the {@link module:engine/view/element~ViewElement view elements}.\n\t*\n\t* View roots are created as a result of binding between {@link module:engine/view/document~ViewDocument#roots} and\n\t* {@link module:engine/model/document~ModelDocument#roots} and this is handled by\n\t* {@link module:engine/controller/editingcontroller~EditingController}, so to create view root we need to create\n\t* model root using {@link module:engine/model/document~ModelDocument#createRoot}.\n\t*/\n\troots;\n\t/**\n\t* The styles processor instance used by this document when normalizing styles.\n\t*/\n\tstylesProcessor;\n\t/**\n\t* Post-fixer callbacks registered to the view document.\n\t*/\n\t_postFixers = /* @__PURE__ */ new Set();\n\t/**\n\t* Creates a Document instance.\n\t*\n\t* @param stylesProcessor The styles processor instance.\n\t*/\n\tconstructor(stylesProcessor) {\n\t\tsuper();\n\t\tthis.selection = new ViewDocumentSelection();\n\t\tthis.roots = new Collection({ idProperty: \"rootName\" });\n\t\tthis.stylesProcessor = stylesProcessor;\n\t\tthis.set(\"isReadOnly\", false);\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"isSelecting\", false);\n\t\tthis.set(\"isComposing\", false);\n\t}\n\t/**\n\t* Gets a {@link module:engine/view/document~ViewDocument#roots view root element} with the specified name. If the name is not\n\t* specific \"main\" root is returned.\n\t*\n\t* @param name Name of the root.\n\t* @returns The view root element with the specified name or null when there is no root of given name.\n\t*/\n\tgetRoot(name = \"main\") {\n\t\treturn this.roots.get(name);\n\t}\n\t/**\n\t* Returns an array with all roots added to the document.\n\t*/\n\tgetRoots() {\n\t\treturn Array.from(this.roots);\n\t}\n\t/**\n\t* Allows registering post-fixer callbacks. A post-fixers mechanism allows to update the view tree just before it is rendered\n\t* to the DOM.\n\t*\n\t* Post-fixers are executed right after all changes from the outermost change block were applied but\n\t* before the {@link module:engine/view/view~EditingView#event:render render event} is fired. If a post-fixer callback made\n\t* a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should\n\t* not be fixed in the new document tree state.\n\t*\n\t* View post-fixers are useful when you want to apply some fixes whenever the view structure changes. Keep in mind that\n\t* changes executed in a view post-fixer should not break model-view mapping.\n\t*\n\t* The types of changes which should be safe:\n\t*\n\t* * adding or removing attribute from elements,\n\t* * changes inside of {@link module:engine/view/uielement~ViewUIElement UI elements},\n\t* * {@link module:engine/controller/editingcontroller~EditingController#reconvertItem marking some of the model elements to be\n\t* re-converted}.\n\t*\n\t* Try to avoid changes which touch view structure:\n\t*\n\t* * you should not add or remove nor wrap or unwrap any view elements,\n\t* * you should not change the editor data model in a view post-fixer.\n\t*\n\t* As a parameter, a post-fixer callback receives a {@link module:engine/view/downcastwriter~ViewDowncastWriter downcast writer}.\n\t*\n\t* Typically, a post-fixer will look like this:\n\t*\n\t* ```ts\n\t* editor.editing.view.document.registerPostFixer( writer => {\n\t* \tif ( checkSomeCondition() ) {\n\t* \t\twriter.doSomething();\n\t*\n\t* \t\t// Let other post-fixers know that something changed.\n\t* \t\treturn true;\n\t* \t}\n\t*\n\t* \treturn false;\n\t* } );\n\t* ```\n\t*\n\t* Note that nothing happens right after you register a post-fixer (e.g. execute such a code in the console).\n\t* That is because adding a post-fixer does not execute it.\n\t* The post-fixer will be executed as soon as any change in the document needs to cause its rendering.\n\t* If you want to re-render the editor's view after registering the post-fixer then you should do it manually by calling\n\t* {@link module:engine/view/view~EditingView#forceRender `view.forceRender()`}.\n\t*\n\t* If you need to register a callback which is executed when DOM elements are already updated,\n\t* use {@link module:engine/view/view~EditingView#event:render render event}.\n\t*/\n\tregisterPostFixer(postFixer) {\n\t\tthis._postFixers.add(postFixer);\n\t}\n\t/**\n\t* Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t*/\n\tdestroy() {\n\t\tthis.roots.forEach((root) => root.destroy());\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.\n\t*\n\t* @internal\n\t*/\n\t_callPostFixers(writer) {\n\t\tlet wasFixed = false;\n\t\tdo\n\t\t\tfor (const callback of this._postFixers) {\n\t\t\t\twasFixed = callback(writer);\n\t\t\t\tif (wasFixed) break;\n\t\t\t}\n\t\twhile (wasFixed);\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 engine/view/attributeelement\n*/\nconst DEFAULT_PRIORITY = 10;\n/**\n* Attribute elements are used to represent formatting elements in the view (think – `<b>`, `<span style=\"font-size: 2em\">`, etc.).\n* Most often they are created when downcasting model text attributes.\n*\n* Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n* types (container element, {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n* {@link module:engine/view/emptyelement~ViewEmptyElement empty element}, etc) when developing a feature.\n*\n* To create a new attribute element instance use the\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement `ViewDowncastWriter#createAttributeElement()`} method.\n*/\nvar ViewAttributeElement = class extends ViewElement {\n\tstatic DEFAULT_PRIORITY = DEFAULT_PRIORITY;\n\t/**\n\t* Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t*\n\t* @internal\n\t* @readonly\n\t*/\n\t_priority = DEFAULT_PRIORITY;\n\t/**\n\t* Element identifier. If set, it is used by {@link module:engine/view/element~ViewElement#isSimilar},\n\t* and then two elements are considered similar if, and only if they have the same `_id`.\n\t*\n\t* @internal\n\t* @readonly\n\t*/\n\t_id = null;\n\t/**\n\t* Keeps all the attribute elements that have the same {@link module:engine/view/attributeelement~ViewAttributeElement#id ids}\n\t* and still exist in the view tree.\n\t*\n\t* This property is managed by {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t*/\n\t_clonesGroup = null;\n\t/**\n\t* Creates an attribute element.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement\n\t* @see module:engine/view/element~ViewElement\n\t* @protected\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t* @param attrs Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t*/\n\tconstructor(document, name, attrs, children) {\n\t\tsuper(document, name, attrs, children);\n\t\tthis.getFillerOffset = getFillerOffset$3;\n\t}\n\t/**\n\t* Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t*/\n\tget priority() {\n\t\treturn this._priority;\n\t}\n\t/**\n\t* Element identifier. If set, it is used by {@link module:engine/view/element~ViewElement#isSimilar},\n\t* and then two elements are considered similar if, and only if they have the same `id`.\n\t*/\n\tget id() {\n\t\treturn this._id;\n\t}\n\t/**\n\t* Returns all {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that has the\n\t* same {@link module:engine/view/attributeelement~ViewAttributeElement#id id} and are in the view tree (were not removed).\n\t*\n\t* Note: If this element has been removed from the tree, returned set will not include it.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError attribute-element-get-elements-with-same-id-no-id}\n\t* if this element has no `id`.\n\t*\n\t* @returns Set containing all the attribute elements\n\t* with the same `id` that were added and not removed from the view tree.\n\t*/\n\tgetElementsWithSameId() {\n\t\tif (this.id === null)\n /**\n\t\t* Cannot get elements with the same id for an attribute element without id.\n\t\t*\n\t\t* @error attribute-element-get-elements-with-same-id-no-id\n\t\t*/\n\t\tthrow new CKEditorError(\"attribute-element-get-elements-with-same-id-no-id\", this);\n\t\treturn new Set(this._clonesGroup);\n\t}\n\t/**\n\t* Checks if this element is similar to other element.\n\t*\n\t* If none of elements has set {@link module:engine/view/attributeelement~ViewAttributeElement#id}, then both elements\n\t* should have the same name, attributes and priority to be considered as similar. Two similar elements can contain\n\t* different set of children nodes.\n\t*\n\t* If at least one element has {@link module:engine/view/attributeelement~ViewAttributeElement#id} set, then both\n\t* elements have to have the same {@link module:engine/view/attributeelement~ViewAttributeElement#id} value to be\n\t* considered similar.\n\t*\n\t* Similarity is important for {@link module:engine/view/downcastwriter~ViewDowncastWriter}. For example:\n\t*\n\t* * two following similar elements can be merged together into one, longer element,\n\t* * {@link module:engine/view/downcastwriter~ViewDowncastWriter#unwrap} checks similarity of passed element and processed element to\n\t* decide whether processed element should be unwrapped,\n\t* * etc.\n\t*/\n\tisSimilar(otherElement) {\n\t\tif (this.id !== null || otherElement.id !== null) return this.id === otherElement.id;\n\t\treturn super.isSimilar(otherElement) && this.priority == otherElement.priority;\n\t}\n\t/**\n\t* Converts `ViewAttributeElement` instance to plain object and returns it.\n\t*\n\t* @returns `ViewAttributeElement` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.type = \"AttributeElement\";\n\t\treturn json;\n\t}\n\t/**\n\t* Clones provided element with priority.\n\t*\n\t* @internal\n\t* @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t* element will be cloned without any children.\n\t* @returns Clone of this element.\n\t*/\n\t_clone(deep = false) {\n\t\tconst cloned = super._clone(deep);\n\t\tcloned._priority = this._priority;\n\t\tcloned._id = this._id;\n\t\treturn cloned;\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_mergeAttributesFrom} to verify if the given element can be merged without\n\t* conflicts into this element.\n\t*\n\t* @internal\n\t*/\n\t_canMergeAttributesFrom(otherElement) {\n\t\tif (this.id !== null || otherElement.id !== null || this.priority !== otherElement.priority) return false;\n\t\treturn super._canMergeAttributesFrom(otherElement);\n\t}\n\t/**\n\t* Used by {@link module:engine/view/element~ViewElement#_subtractAttributesOf} to verify if the given element attributes\n\t* can be fully subtracted from this element.\n\t*\n\t* @internal\n\t*/\n\t_canSubtractAttributesOf(otherElement) {\n\t\tif (this.id !== null || otherElement.id !== null || this.priority !== otherElement.priority) return false;\n\t\treturn super._canSubtractAttributesOf(otherElement);\n\t}\n};\nViewAttributeElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"attributeElement\" || type === \"view:attributeElement\" || type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"attributeElement\" || type === \"view:attributeElement\" || type === \"element\" || type === \"view:element\");\n};\n/**\n* Returns block {@link module:engine/view/filler~Filler filler} offset or `null` if block filler is not needed.\n*\n* @returns Block filler offset or `null` if block filler is not needed.\n*/\nfunction getFillerOffset$3() {\n\tif (nonUiChildrenCount(this)) return null;\n\tlet element = this.parent;\n\twhile (element && element.is(\"attributeElement\")) {\n\t\tif (nonUiChildrenCount(element) > 1) return null;\n\t\telement = element.parent;\n\t}\n\tif (!element || nonUiChildrenCount(element) > 1) return null;\n\treturn this.childCount;\n}\n/**\n* Returns total count of children that are not {@link module:engine/view/uielement~ViewUIElement UIElements}.\n*/\nfunction nonUiChildrenCount(element) {\n\treturn Array.from(element.getChildren()).filter((element) => !element.is(\"uiElement\")).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 engine/view/emptyelement\n*/\n/**\n* Empty element class. It is used to represent elements that cannot contain any child nodes (for example `<img>` elements).\n*\n* To create a new empty element use the\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`} method.\n*/\nvar ViewEmptyElement = class extends ViewElement {\n\t/**\n\t* Creates new instance of ViewEmptyElement.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` when third parameter is passed,\n\t* to inform that usage of ViewEmptyElement is incorrect (adding child nodes to ViewEmptyElement is forbidden).\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement\n\t* @internal\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t* @param attributes Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t*/\n\tconstructor(document, name, attributes, children) {\n\t\tsuper(document, name, attributes, children);\n\t\tthis.getFillerOffset = getFillerOffset$2;\n\t}\n\t/**\n\t* Converts `ViewEmptyElement` instance to plain object and returns it.\n\t*\n\t* @returns `ViewEmptyElement` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.type = \"EmptyElement\";\n\t\treturn json;\n\t}\n\t/**\n\t* Overrides {@link module:engine/view/element~ViewElement#_insertChild} method.\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` to prevent\n\t* adding any child nodes to ViewEmptyElement.\n\t*\n\t* @internal\n\t*/\n\t_insertChild(index, items) {\n\t\tif (items && (items instanceof ViewNode || Array.from(items).length > 0))\n /**\n\t\t* Cannot add children to {@link module:engine/view/emptyelement~ViewEmptyElement}.\n\t\t*\n\t\t* @error view-emptyelement-cannot-add\n\t\t*/\n\t\tthrow new CKEditorError(\"view-emptyelement-cannot-add\", [this, items]);\n\t\treturn 0;\n\t}\n};\nViewEmptyElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"emptyElement\" || type === \"view:emptyElement\" || type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"emptyElement\" || type === \"view:emptyElement\" || type === \"element\" || type === \"view:element\");\n};\n/**\n* Returns `null` because block filler is not needed for ViewEmptyElements.\n*/\nfunction getFillerOffset$2() {\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 engine/view/uielement\n*/\n/**\n* UI element class. It should be used to represent editing UI which needs to be injected into the editing view\n* If possible, you should keep your UI outside the editing view. However, if that is not possible,\n* UI elements can be used.\n*\n* How a UI element is rendered is in your control (you pass a callback to\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `downcastWriter#createUIElement()`}).\n* The editor will ignore your UI element – the selection cannot be placed in it, it is skipped (invisible) when\n* the user modifies the selection by using arrow keys and the editor does not listen to any mutations which\n* happen inside your UI elements.\n*\n* The limitation is that you cannot convert a model element to a UI element. UI elements need to be\n* created for {@link module:engine/model/markercollection~Marker markers} or as additinal elements\n* inside normal {@link module:engine/view/containerelement~ViewContainerElement container elements}.\n*\n* To create a new UI element use the\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `downcastWriter#createUIElement()`} method.\n*/\nvar ViewUIElement = class extends ViewElement {\n\t/**\n\t* Creates new instance of UIElement.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` when third parameter is passed,\n\t* to inform that usage of UIElement is incorrect (adding child nodes to UIElement is forbidden).\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement\n\t* @internal\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t* @param attrs Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t*/\n\tconstructor(document, name, attrs, children) {\n\t\tsuper(document, name, attrs, children);\n\t\tthis.getFillerOffset = getFillerOffset$1;\n\t}\n\t/**\n\t* Overrides {@link module:engine/view/element~ViewElement#_insertChild} method.\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` to prevent adding any child nodes\n\t* to UIElement.\n\t*\n\t* @internal\n\t*/\n\t_insertChild(index, items) {\n\t\tif (items && (items instanceof ViewNode || Array.from(items).length > 0))\n /**\n\t\t* Cannot add children to {@link module:engine/view/uielement~ViewUIElement}.\n\t\t*\n\t\t* @error view-uielement-cannot-add\n\t\t*/\n\t\tthrow new CKEditorError(\"view-uielement-cannot-add\", [this, items]);\n\t\treturn 0;\n\t}\n\t/**\n\t* Renders this {@link module:engine/view/uielement~ViewUIElement} to DOM. This method is called by\n\t* {@link module:engine/view/domconverter~ViewDomConverter}.\n\t* Do not use inheritance to create custom rendering method, replace `render()` method instead:\n\t*\n\t* ```ts\n\t* const myUIElement = downcastWriter.createUIElement( 'span' );\n\t* myUIElement.render = function( domDocument, domConverter ) {\n\t* \tconst domElement = this.toDomElement( domDocument );\n\t*\n\t* \tdomConverter.setContentOf( domElement, '<b>this is ui element</b>' );\n\t*\n\t* \treturn domElement;\n\t* };\n\t* ```\n\t*\n\t* If changes in your UI element should trigger some editor UI update you should call\n\t* the {@link module:ui/editorui/editorui~EditorUI#update `editor.ui.update()`} method\n\t* after rendering your UI element.\n\t*\n\t* @param domConverter Instance of the ViewDomConverter used to optimize the output.\n\t*/\n\trender(domDocument, domConverter) {\n\t\treturn this.toDomElement(domDocument);\n\t}\n\t/**\n\t* Creates DOM element based on this view UIElement.\n\t* Note that each time this method is called new DOM element is created.\n\t*/\n\ttoDomElement(domDocument) {\n\t\tconst domElement = domDocument.createElement(this.name);\n\t\tfor (const key of this.getAttributeKeys()) domElement.setAttribute(key, this.getAttribute(key));\n\t\treturn domElement;\n\t}\n\t/**\n\t* Converts `ViewUIElement` instance to plain object and returns it.\n\t*\n\t* @returns `ViewUIElement` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.type = \"UIElement\";\n\t\treturn json;\n\t}\n};\nViewUIElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"uiElement\" || type === \"view:uiElement\" || type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"uiElement\" || type === \"view:uiElement\" || type === \"element\" || type === \"view:element\");\n};\n/**\n* This function injects UI element handling to the given {@link module:engine/view/document~ViewDocument document}.\n*\n* A callback is added to {@link module:engine/view/document~ViewDocument#event:keydown document keydown event}.\n* The callback handles the situation when right arrow key is pressed and selection is collapsed before a UI element.\n* Without this handler, it would be impossible to \"jump over\" UI element using right arrow key.\n*\n* @param view View controller to which the quirks handling will be injected.\n* @internal\n*/\nfunction injectUiElementHandling(view) {\n\tview.document.on(\"arrowKey\", (evt, data) => jumpOverUiElement(evt, data, view.domConverter), { priority: \"low\" });\n}\n/**\n* Returns `null` because block filler is not needed for UIElements.\n*/\nfunction getFillerOffset$1() {\n\treturn null;\n}\n/**\n* Selection cannot be placed in a `UIElement`. Whenever it is placed there, it is moved before it. This\n* causes a situation when it is impossible to jump over `UIElement` using right arrow key, because the selection\n* ends up in ui element (in DOM) and is moved back to the left. This handler fixes this situation.\n*/\nfunction jumpOverUiElement(evt, data, domConverter) {\n\tif (data.keyCode == keyCodes.arrowright) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView.getSelection();\n\t\tconst domSelectionCollapsed = domSelection.rangeCount == 1 && domSelection.getRangeAt(0).collapsed;\n\t\tif (domSelectionCollapsed || data.shiftKey) {\n\t\t\tconst domParent = domSelection.focusNode;\n\t\t\tconst domOffset = domSelection.focusOffset;\n\t\t\tconst viewPosition = domConverter.domPositionToView(domParent, domOffset);\n\t\t\tif (viewPosition === null) return;\n\t\t\tlet jumpedOverAnyUiElement = false;\n\t\t\tconst nextViewPosition = viewPosition.getLastMatchingPosition((value) => {\n\t\t\t\tif (value.item.is(\"uiElement\")) jumpedOverAnyUiElement = true;\n\t\t\t\tif (value.item.is(\"uiElement\") || value.item.is(\"attributeElement\")) return true;\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\tif (jumpedOverAnyUiElement) {\n\t\t\t\tconst newDomPosition = domConverter.viewPositionToDom(nextViewPosition);\n\t\t\t\tif (domSelectionCollapsed) domSelection.collapse(newDomPosition.parent, newDomPosition.offset);\n\t\t\t\telse domSelection.extend(newDomPosition.parent, newDomPosition.offset);\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 engine/view/rawelement\n*/\n/**\n* The raw element class.\n*\n* The raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n* even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n* in the editor content without, for instance, worrying about compatibility with other editor features.\n* Raw elements are a perfect tool for integration with external frameworks and data sources.\n*\n* Unlike {@link module:engine/view/uielement~ViewUIElement UI elements}, raw elements act like real editor\n* content (similar to {@link module:engine/view/containerelement~ViewContainerElement} or\n* {@link module:engine/view/emptyelement~ViewEmptyElement}), they are considered by the editor selection and\n* {@link module:widget/utils~toWidget they can work as widgets}.\n*\n* To create a new raw element, use the\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createRawElement `downcastWriter#createRawElement()`} method.\n*/\nvar ViewRawElement = class extends ViewElement {\n\t/**\n\t* Creates a new instance of a raw element.\n\t*\n\t* Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} when the `children`\n\t* parameter is passed to inform that the usage of `ViewRawElement` is incorrect (adding child nodes to `ViewRawElement` is forbidden).\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#createRawElement\n\t* @internal\n\t* @param document The document instance to which this element belongs.\n\t* @param name Node name.\n\t* @param attrs Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t*/\n\tconstructor(document, name, attrs, children) {\n\t\tsuper(document, name, attrs, children);\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\t/**\n\t* Converts `ViewRawElement` instance to plain object and returns it.\n\t*\n\t* @returns `ViewRawElement` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.type = \"RawElement\";\n\t\treturn json;\n\t}\n\t/**\n\t* Overrides the {@link module:engine/view/element~ViewElement#_insertChild} method.\n\t* Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} to prevent\n\t* adding any child nodes to a raw element.\n\t*\n\t* @internal\n\t*/\n\t_insertChild(index, items) {\n\t\tif (items && (items instanceof ViewNode || Array.from(items).length > 0))\n /**\n\t\t* Cannot add children to a {@link module:engine/view/rawelement~ViewRawElement} instance.\n\t\t*\n\t\t* @error view-rawelement-cannot-add\n\t\t*/\n\t\tthrow new CKEditorError(\"view-rawelement-cannot-add\", [this, items]);\n\t\treturn 0;\n\t}\n\t/**\n\t* This allows rendering the children of a {@link module:engine/view/rawelement~ViewRawElement} on the DOM level.\n\t* This method is called by the {@link module:engine/view/domconverter~ViewDomConverter} with the raw DOM element\n\t* passed as an argument, leaving the number and shape of the children up to the integrator.\n\t*\n\t* This method **must be defined** for the raw element to work:\n\t*\n\t* ```ts\n\t* const myRawElement = downcastWriter.createRawElement( 'div' );\n\t*\n\t* myRawElement.render = function( domElement, domConverter ) {\n\t* \tdomConverter.setContentOf( domElement, '<b>This is the raw content of myRawElement.</b>' );\n\t* };\n\t* ```\n\t*\n\t* @param domElement The native DOM element representing the raw view element.\n\t* @param domConverter Instance of the ViewDomConverter used to optimize the output.\n\t*/\n\trender(domElement, domConverter) {}\n};\nViewRawElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"rawElement\" || type === \"view:rawElement\" || type === this.name || type === \"view:\" + this.name || type === \"element\" || type === \"view:element\" || type === \"node\" || type === \"view:node\";\n\telse return name === this.name && (type === \"rawElement\" || type === \"view:rawElement\" || type === \"element\" || type === \"view:element\");\n};\n/**\n* Returns `null` because block filler is not needed for raw elements.\n*/\nfunction getFillerOffset() {\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 engine/view/documentfragment\n*/\nconst ViewDocumentFragmentBase = /* #__PURE__ */ EmitterMixin(ViewTypeCheckable);\n/**\n* Document fragment.\n*\n* To create a new document fragment instance use the\n* {@link module:engine/view/upcastwriter~ViewUpcastWriter#createDocumentFragment `ViewUpcastWriter#createDocumentFragment()`}\n* method.\n*/\nvar ViewDocumentFragment = class extends ViewDocumentFragmentBase {\n\t/**\n\t* The document to which this document fragment belongs.\n\t*/\n\tdocument;\n\t/**\n\t* Array of child nodes.\n\t*/\n\t_children = [];\n\t/**\n\t* Map of custom properties.\n\t* Custom properties can be added to document fragment instance.\n\t*/\n\t_customProperties = /* @__PURE__ */ new Map();\n\t/**\n\t* Creates new DocumentFragment instance.\n\t*\n\t* @internal\n\t* @param document The document to which this document fragment belongs.\n\t* @param children A list of nodes to be inserted into the created document fragment.\n\t*/\n\tconstructor(document, children) {\n\t\tsuper();\n\t\tthis.document = document;\n\t\tif (children) this._insertChild(0, children);\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* Iterates over nodes added to this document fragment.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this._children[Symbol.iterator]();\n\t}\n\t/**\n\t* Number of child nodes in this document fragment.\n\t*/\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\t/**\n\t* Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t*/\n\tget isEmpty() {\n\t\treturn this.childCount === 0;\n\t}\n\t/**\n\t* Artificial root of `DocumentFragment`. Returns itself. Added for compatibility reasons.\n\t*/\n\tget root() {\n\t\treturn this;\n\t}\n\t/**\n\t* Artificial parent of `DocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t*/\n\tget parent() {\n\t\treturn null;\n\t}\n\t/**\n\t* Artificial element name. Returns `undefined`. Added for compatibility reasons.\n\t*/\n\tget name() {}\n\t/**\n\t* Artificial element getFillerOffset. Returns `undefined`. Added for compatibility reasons.\n\t*/\n\tget getFillerOffset() {}\n\t/**\n\t* Returns the custom property value for the given key.\n\t*/\n\tgetCustomProperty(key) {\n\t\treturn this._customProperties.get(key);\n\t}\n\t/**\n\t* Returns an iterator which iterates over this document fragment's custom properties.\n\t* Iterator provides `[ key, value ]` pairs for each stored property.\n\t*/\n\t*getCustomProperties() {\n\t\tyield* this._customProperties.entries();\n\t}\n\t/**\n\t* Converts `ViewDocumentFragment` instance to plain object and returns it.\n\t* Takes care of converting all of this document fragment's children.\n\t*\n\t* @returns `ViewDocumentFragment` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = [];\n\t\tfor (const node of this._children) json.push(node.toJSON());\n\t\treturn json;\n\t}\n\t/**\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment#_insertChild Insert} a child node or a list of child nodes at the end\n\t* and sets the parent of these nodes to this fragment.\n\t*\n\t* @internal\n\t* @param items Items to be inserted.\n\t* @returns Number of appended nodes.\n\t*/\n\t_appendChild(items) {\n\t\treturn this._insertChild(this.childCount, items);\n\t}\n\t/**\n\t* Gets child at the given index.\n\t*\n\t* @param index Index of child.\n\t* @returns Child node.\n\t*/\n\tgetChild(index) {\n\t\treturn this._children[index];\n\t}\n\t/**\n\t* Gets index of the given child node. Returns `-1` if child node is not found.\n\t*\n\t* @param node Child node.\n\t* @returns Index of the child node.\n\t*/\n\tgetChildIndex(node) {\n\t\treturn this._children.indexOf(node);\n\t}\n\t/**\n\t* Gets child nodes iterator.\n\t*\n\t* @returns Child nodes iterator.\n\t*/\n\tgetChildren() {\n\t\treturn this._children[Symbol.iterator]();\n\t}\n\t/**\n\t* Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t* this fragment.\n\t*\n\t* @internal\n\t* @param index Position where nodes should be inserted.\n\t* @param items Items to be inserted.\n\t* @returns Number of inserted nodes.\n\t*/\n\t_insertChild(index, items) {\n\t\tthis._fireChange(\"children\", this, { index });\n\t\tlet count = 0;\n\t\tconst nodes = normalize$2(this.document, items);\n\t\tfor (const node of nodes) {\n\t\t\tif (node.parent !== null) node._remove();\n\t\t\tnode.parent = this;\n\t\t\tthis._children.splice(index, 0, node);\n\t\t\tindex++;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}\n\t/**\n\t* Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t*\n\t* @internal\n\t* @param index Number of the first node to remove.\n\t* @param howMany Number of nodes to remove.\n\t* @returns The array of removed nodes.\n\t*/\n\t_removeChildren(index, howMany = 1) {\n\t\tthis._fireChange(\"children\", this, { index });\n\t\tfor (let i = index; i < index + howMany; i++) this._children[i].parent = null;\n\t\treturn this._children.splice(index, howMany);\n\t}\n\t/**\n\t* @internal\n\t* @param type Type of the change.\n\t* @param node Changed node.\n\t* @param data Additional data.\n\t* @fires module:engine/view/node~ViewNode#event:change\n\t*/\n\t_fireChange(type, node, data) {\n\t\tthis.fire(`change:${type}`, node, data);\n\t}\n\t/**\n\t* Sets a custom property. They can be used to add special data to elements.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#setCustomProperty\n\t* @internal\n\t*/\n\t_setCustomProperty(key, value) {\n\t\tthis._customProperties.set(key, value);\n\t}\n\t/**\n\t* Removes the custom property stored under the given key.\n\t*\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#removeCustomProperty\n\t* @internal\n\t* @returns Returns true if property was removed.\n\t*/\n\t_removeCustomProperty(key) {\n\t\treturn this._customProperties.delete(key);\n\t}\n};\nViewDocumentFragment.prototype.is = function(type) {\n\treturn type === \"documentFragment\" || type === \"view:documentFragment\";\n};\n/**\n* Converts strings to Text and non-iterables to arrays.\n*/\nfunction normalize$2(document, nodes) {\n\tif (typeof nodes == \"string\") return [new ViewText(document, nodes)];\n\tif (!isIterable(nodes)) nodes = [nodes];\n\treturn Array.from(nodes).map((node) => {\n\t\tif (typeof node == \"string\") return new ViewText(document, node);\n\t\tif (node instanceof ViewTextProxy) return new ViewText(document, node.data);\n\t\treturn node;\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 engine/view/downcastwriter\n*/\n/**\n* View downcast writer.\n*\n* It provides a set of methods used to manipulate view nodes.\n*\n* Do not create an instance of this writer manually. To modify a view structure, use\n* the {@link module:engine/view/view~EditingView#change `View#change()`} block.\n*\n* The `ViewDowncastWriter` is designed to work with semantic views which are the views that were/are being downcasted from the model.\n* To work with ordinary views (e.g. parsed from a pasted content) use the\n* {@link module:engine/view/upcastwriter~ViewUpcastWriter upcast writer}.\n*\n* Read more about changing the view in the {@glink framework/architecture/editing-engine#changing-the-view Changing the view}\n* section of the {@glink framework/architecture/editing-engine Editing engine architecture} guide.\n*/\nvar ViewDowncastWriter = class {\n\t/**\n\t* The view document instance in which this writer operates.\n\t*/\n\tdocument;\n\t/**\n\t* Holds references to the attribute groups that share the same {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t* The keys are `id`s, the values are `Set`s holding {@link module:engine/view/attributeelement~ViewAttributeElement}s.\n\t*/\n\t_cloneGroups = /* @__PURE__ */ new Map();\n\t/**\n\t* The slot factory used by the `elementToStructure` downcast helper.\n\t*/\n\t_slotFactory = null;\n\t/**\n\t* @param document The view document instance.\n\t*/\n\tconstructor(document) {\n\t\tthis.document = document;\n\t}\n\tsetSelection(...args) {\n\t\tthis.document.selection._setTo(...args);\n\t}\n\t/**\n\t* Moves {@link module:engine/view/documentselection~ViewDocumentSelection#focus selection's focus} to the specified location.\n\t*\n\t* The location can be specified in the same form as\n\t* {@link module:engine/view/view~EditingView#createPositionAt view.createPositionAt()}\n\t* parameters.\n\t*\n\t* @param itemOrPosition\n\t* @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t*/\n\tsetSelectionFocus(itemOrPosition, offset) {\n\t\tthis.document.selection._setFocus(itemOrPosition, offset);\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/documentfragment~ViewDocumentFragment} instance.\n\t*\n\t* @param children A list of nodes to be inserted into the created document fragment.\n\t* @returns The created document fragment.\n\t*/\n\tcreateDocumentFragment(children) {\n\t\treturn new ViewDocumentFragment(this.document, children);\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/text~ViewText text node}.\n\t*\n\t* ```ts\n\t* writer.createText( 'foo' );\n\t* ```\n\t*\n\t* @param data The text's data.\n\t* @returns The created text node.\n\t*/\n\tcreateText(data) {\n\t\treturn new ViewText(this.document, data);\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/attributeelement~ViewAttributeElement}.\n\t*\n\t* ```ts\n\t* writer.createAttributeElement( 'strong' );\n\t* writer.createAttributeElement( 'a', { href: 'foo.bar' } );\n\t*\n\t* // Make `<a>` element contain other attributes element so the `<a>` element is not broken.\n\t* writer.createAttributeElement( 'a', { href: 'foo.bar' }, { priority: 5 } );\n\t*\n\t* // Set `id` of a marker element so it is not joined or merged with \"normal\" elements.\n\t* writer.createAttributeElement( 'span', { class: 'my-marker' }, { id: 'marker:my' } );\n\t* ```\n\t*\n\t* @param name Name of the element.\n\t* @param attributes Element's attributes.\n\t* @param options Element's options.\n\t* @param options.priority Element's {@link module:engine/view/attributeelement~ViewAttributeElement#priority priority}.\n\t* @param options.id Element's {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t* @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t* pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t* @returns Created element.\n\t*/\n\tcreateAttributeElement(name, attributes, options = {}) {\n\t\tconst attributeElement = new ViewAttributeElement(this.document, name, attributes);\n\t\tif (typeof options.priority === \"number\") attributeElement._priority = options.priority;\n\t\tif (options.id) attributeElement._id = options.id;\n\t\tif (options.renderUnsafeAttributes) attributeElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n\t\treturn attributeElement;\n\t}\n\tcreateContainerElement(name, attributes, childrenOrOptions = {}, options = {}) {\n\t\tlet children = void 0;\n\t\tif (isContainerOptions(childrenOrOptions)) options = childrenOrOptions;\n\t\telse children = childrenOrOptions;\n\t\tconst containerElement = new ViewContainerElement(this.document, name, attributes, children);\n\t\tif (options.renderUnsafeAttributes) containerElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n\t\treturn containerElement;\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/editableelement~ViewEditableElement}.\n\t*\n\t* ```ts\n\t* writer.createEditableElement( 'div' );\n\t* writer.createEditableElement( 'div', { id: 'foo-1234' } );\n\t* ```\n\t*\n\t* Note: The editable element is to be used in the editing pipeline. Usually, together with\n\t* {@link module:widget/utils~toWidgetEditable `toWidgetEditable()`}.\n\t*\n\t* @param name Name of the element.\n\t* @param attributes Elements attributes.\n\t* @param options Element's options.\n\t* @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t* pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t* @returns Created element.\n\t*/\n\tcreateEditableElement(name, attributes, options = {}) {\n\t\tconst editableElement = new ViewEditableElement(this.document, name, attributes);\n\t\tif (options.renderUnsafeAttributes) editableElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n\t\treturn editableElement;\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/emptyelement~ViewEmptyElement}.\n\t*\n\t* ```ts\n\t* writer.createEmptyElement( 'img' );\n\t* writer.createEmptyElement( 'img', { id: 'foo-1234' } );\n\t* ```\n\t*\n\t* @param name Name of the element.\n\t* @param attributes Elements attributes.\n\t* @param options Element's options.\n\t* @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t* pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t* @returns Created element.\n\t*/\n\tcreateEmptyElement(name, attributes, options = {}) {\n\t\tconst emptyElement = new ViewEmptyElement(this.document, name, attributes);\n\t\tif (options.renderUnsafeAttributes) emptyElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n\t\treturn emptyElement;\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/uielement~ViewUIElement}.\n\t*\n\t* ```ts\n\t* writer.createUIElement( 'span' );\n\t* writer.createUIElement( 'span', { id: 'foo-1234' } );\n\t* ```\n\t*\n\t* A custom render function can be provided as the third parameter:\n\t*\n\t* ```ts\n\t* writer.createUIElement( 'span', null, function( domDocument ) {\n\t* \tconst domElement = this.toDomElement( domDocument );\n\t* \tdomElement.innerHTML = '<b>this is ui element</b>';\n\t*\n\t* \treturn domElement;\n\t* } );\n\t* ```\n\t*\n\t* Unlike {@link #createRawElement raw elements}, UI elements are by no means editor content, for instance,\n\t* they are ignored by the editor selection system.\n\t*\n\t* You should not use UI elements as data containers. Check out {@link #createRawElement} instead.\n\t*\n\t* @param name The name of the element.\n\t* @param attributes Element attributes.\n\t* @param renderFunction A custom render function.\n\t* @returns The created element.\n\t*/\n\tcreateUIElement(name, attributes, renderFunction) {\n\t\tconst uiElement = new ViewUIElement(this.document, name, attributes);\n\t\tif (renderFunction) uiElement.render = renderFunction;\n\t\treturn uiElement;\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/rawelement~ViewRawElement}.\n\t*\n\t* ```ts\n\t* writer.createRawElement( 'span', { id: 'foo-1234' }, function( domElement ) {\n\t* \tdomElement.innerHTML = '<b>This is the raw content of the raw element.</b>';\n\t* } );\n\t* ```\n\t*\n\t* Raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n\t* even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n\t* in the editor content without, for instance, worrying about compatibility with other editor features.\n\t* Raw elements are a perfect tool for integration with external frameworks and data sources.\n\t*\n\t* Unlike {@link #createUIElement UI elements}, raw elements act like \"real\" editor content (similar to\n\t* {@link module:engine/view/containerelement~ViewContainerElement} or {@link module:engine/view/emptyelement~ViewEmptyElement}),\n\t* and they are considered by the editor selection.\n\t*\n\t* You should not use raw elements to render the UI in the editor content. Check out {@link #createUIElement `#createUIElement()`}\n\t* instead.\n\t*\n\t* @param name The name of the element.\n\t* @param attributes Element attributes.\n\t* @param renderFunction A custom render function.\n\t* @param options Element's options.\n\t* @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t* pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t* @returns The created element.\n\t*/\n\tcreateRawElement(name, attributes, renderFunction, options = {}) {\n\t\tconst rawElement = new ViewRawElement(this.document, name, attributes);\n\t\tif (renderFunction) rawElement.render = renderFunction;\n\t\tif (options.renderUnsafeAttributes) rawElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n\t\treturn rawElement;\n\t}\n\tsetAttribute(key, value, elementOrOverwrite, element) {\n\t\tif (element !== void 0) element._setAttribute(key, value, elementOrOverwrite);\n\t\telse elementOrOverwrite._setAttribute(key, value);\n\t}\n\tremoveAttribute(key, elementOrTokens, element) {\n\t\tif (element !== void 0) element._removeAttribute(key, elementOrTokens);\n\t\telse elementOrTokens._removeAttribute(key);\n\t}\n\t/**\n\t* Adds specified class to the element.\n\t*\n\t* ```ts\n\t* writer.addClass( 'foo', linkElement );\n\t* writer.addClass( [ 'foo', 'bar' ], linkElement );\n\t* ```\n\t*/\n\taddClass(className, element) {\n\t\telement._addClass(className);\n\t}\n\t/**\n\t* Removes specified class from the element.\n\t*\n\t* ```ts\n\t* writer.removeClass( 'foo', linkElement );\n\t* writer.removeClass( [ 'foo', 'bar' ], linkElement );\n\t* ```\n\t*/\n\tremoveClass(className, element) {\n\t\telement._removeClass(className);\n\t}\n\tsetStyle(property, value, element) {\n\t\tif (isPlainObject(property) && element === void 0) value._setStyle(property);\n\t\telse element._setStyle(property, value);\n\t}\n\t/**\n\t* Removes specified style from the element.\n\t*\n\t* ```ts\n\t* writer.removeStyle( 'color', element ); // Removes 'color' style.\n\t* writer.removeStyle( [ 'color', 'border-top' ], element ); // Removes both 'color' and 'border-top' styles.\n\t* ```\n\t*\n\t* **Note**: This method can work with normalized style names if\n\t* {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t* See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t*/\n\tremoveStyle(property, element) {\n\t\telement._removeStyle(property);\n\t}\n\t/**\n\t* Sets a custom property on element. Unlike attributes, custom properties are not rendered to the DOM,\n\t* so they can be used to add special data to elements.\n\t*/\n\tsetCustomProperty(key, value, element) {\n\t\telement._setCustomProperty(key, value);\n\t}\n\t/**\n\t* Removes a custom property stored under the given key.\n\t*\n\t* @returns Returns true if property was removed.\n\t*/\n\tremoveCustomProperty(key, element) {\n\t\treturn element._removeCustomProperty(key);\n\t}\n\t/**\n\t* Breaks attribute elements at the provided position or at the boundaries of a provided range. It breaks attribute elements\n\t* up to their first ancestor that is a container element.\n\t*\n\t* In following examples `<p>` is a container, `<b>` and `<u>` are attribute elements:\n\t*\n\t* ```html\n\t* <p>foo<b><u>bar{}</u></b></p> -> <p>foo<b><u>bar</u></b>[]</p>\n\t* <p>foo<b><u>{}bar</u></b></p> -> <p>foo{}<b><u>bar</u></b></p>\n\t* <p>foo<b><u>b{}ar</u></b></p> -> <p>foo<b><u>b</u></b>[]<b><u>ar</u></b></p>\n\t* <p><b>fo{o</b><u>ba}r</u></p> -> <p><b>fo</b><b>o</b><u>ba</u><u>r</u></b></p>\n\t* ```\n\t*\n\t* **Note:** {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment} is treated like a container.\n\t*\n\t* **Note:** The difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes breakAttributes()} and\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that are ancestors of a given `position`,\n\t* up to the first encountered {@link module:engine/view/containerelement~ViewContainerElement container element}.\n\t* `breakContainer()` assumes that a given `position` is directly in the container element and breaks that container element.\n\t*\n\t* Throws the `view-writer-invalid-range-container` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t* when the {@link module:engine/view/range~ViewRange#start start}\n\t* and {@link module:engine/view/range~ViewRange#end end} positions of a passed range are not placed inside same parent container.\n\t*\n\t* Throws the `view-writer-cannot-break-empty-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t* when trying to break attributes inside an {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElement}.\n\t*\n\t* Throws the `view-writer-cannot-break-ui-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t* when trying to break attributes inside a {@link module:engine/view/uielement~ViewUIElement UIElement}.\n\t*\n\t* @see module:engine/view/attributeelement~ViewAttributeElement\n\t* @see module:engine/view/containerelement~ViewContainerElement\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#breakContainer\n\t* @param positionOrRange The position where to break attribute elements.\n\t* @returns The new position or range, after breaking the attribute elements.\n\t*/\n\tbreakAttributes(positionOrRange) {\n\t\tif (positionOrRange instanceof ViewPosition) return this._breakAttributes(positionOrRange);\n\t\telse return this._breakAttributesRange(positionOrRange);\n\t}\n\t/**\n\t* Breaks a {@link module:engine/view/containerelement~ViewContainerElement container view element} into two, at the given position.\n\t* The position has to be directly inside the container element and cannot be in the root. It does not break the conrainer view element\n\t* if the position is at the beginning or at the end of its parent element.\n\t*\n\t* ```html\n\t* <p>foo^bar</p> -> <p>foo</p><p>bar</p>\n\t* <div><p>foo</p>^<p>bar</p></div> -> <div><p>foo</p></div><div><p>bar</p></div>\n\t* <p>^foobar</p> -> ^<p>foobar</p>\n\t* <p>foobar^</p> -> <p>foobar</p>^\n\t* ```\n\t*\n\t* **Note:** The difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes breakAttributes()} and\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that are ancestors of a given `position`,\n\t* up to the first encountered {@link module:engine/view/containerelement~ViewContainerElement container element}.\n\t* `breakContainer()` assumes that the given `position` is directly in the container element and breaks that container element.\n\t*\n\t* @see module:engine/view/attributeelement~ViewAttributeElement\n\t* @see module:engine/view/containerelement~ViewContainerElement\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes\n\t* @param position The position where to break the element.\n\t* @returns The position between broken elements. If an element has not been broken,\n\t* the returned position is placed either before or after it.\n\t*/\n\tbreakContainer(position) {\n\t\tconst element = position.parent;\n\t\tif (!element.is(\"containerElement\"))\n /**\n\t\t* Trying to break an element which is not a container element.\n\t\t*\n\t\t* @error view-writer-break-non-container-element\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-break-non-container-element\", this.document);\n\t\tif (!element.parent)\n /**\n\t\t* Trying to break root element.\n\t\t*\n\t\t* @error view-writer-break-root\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-break-root\", this.document);\n\t\tif (position.isAtStart) return ViewPosition._createBefore(element);\n\t\telse if (!position.isAtEnd) {\n\t\t\tconst newElement = element._clone(false);\n\t\t\tthis.insert(ViewPosition._createAfter(element), newElement);\n\t\t\tconst sourceRange = new ViewRange(position, ViewPosition._createAt(element, \"end\"));\n\t\t\tconst targetPosition = new ViewPosition(newElement, 0);\n\t\t\tthis.move(sourceRange, targetPosition);\n\t\t}\n\t\treturn ViewPosition._createAfter(element);\n\t}\n\t/**\n\t* Merges {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements}. It also merges text nodes if needed.\n\t* Only {@link module:engine/view/attributeelement~ViewAttributeElement#isSimilar similar} attribute elements can be merged.\n\t*\n\t* In following examples `<p>` is a container and `<b>` is an attribute element:\n\t*\n\t* ```html\n\t* <p>foo[]bar</p> -> <p>foo{}bar</p>\n\t* <p><b>foo</b>[]<b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t* <p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p> -> <p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p>\n\t* ```\n\t*\n\t* It will also take care about empty attributes when merging:\n\t*\n\t* ```html\n\t* <p><b>[]</b></p> -> <p>[]</p>\n\t* <p><b>foo</b><i>[]</i><b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t* ```\n\t*\n\t* **Note:** Difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeAttributes mergeAttributes} and\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} or\n\t* {@link module:engine/view/text~ViewText text nodes} while `mergeContainer` merges two\n\t* {@link module:engine/view/containerelement~ViewContainerElement container elements}.\n\t*\n\t* @see module:engine/view/attributeelement~ViewAttributeElement\n\t* @see module:engine/view/containerelement~ViewContainerElement\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#mergeContainers\n\t* @param position Merge position.\n\t* @returns Position after merge.\n\t*/\n\tmergeAttributes(position) {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\t\tif (positionParent.is(\"$text\")) return position;\n\t\tif (positionParent.is(\"attributeElement\") && positionParent.childCount === 0) {\n\t\t\tconst parent = positionParent.parent;\n\t\t\tconst offset = positionParent.index;\n\t\t\tpositionParent._remove();\n\t\t\tthis._removeFromClonedElementsGroup(positionParent);\n\t\t\treturn this.mergeAttributes(new ViewPosition(parent, offset));\n\t\t}\n\t\tconst nodeBefore = positionParent.getChild(positionOffset - 1);\n\t\tconst nodeAfter = positionParent.getChild(positionOffset);\n\t\tif (!nodeBefore || !nodeAfter) return position;\n\t\tif (nodeBefore.is(\"$text\") && nodeAfter.is(\"$text\")) return mergeTextNodes(nodeBefore, nodeAfter);\n\t\telse if (nodeBefore.is(\"attributeElement\") && nodeAfter.is(\"attributeElement\") && nodeBefore.isSimilar(nodeAfter)) {\n\t\t\tconst count = nodeBefore.childCount;\n\t\t\tnodeBefore._appendChild(nodeAfter.getChildren());\n\t\t\tnodeAfter._remove();\n\t\t\tthis._removeFromClonedElementsGroup(nodeAfter);\n\t\t\treturn this.mergeAttributes(new ViewPosition(nodeBefore, count));\n\t\t}\n\t\treturn position;\n\t}\n\t/**\n\t* Merges two {@link module:engine/view/containerelement~ViewContainerElement container elements} that are\n\t* before and after given position. Precisely, the element after the position is removed and it's contents are\n\t* moved to element before the position.\n\t*\n\t* ```html\n\t* <p>foo</p>^<p>bar</p> -> <p>foo^bar</p>\n\t* <div>foo</div>^<p>bar</p> -> <div>foo^bar</div>\n\t* ```\n\t*\n\t* **Note:** Difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeAttributes mergeAttributes} and\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} or\n\t* {@link module:engine/view/text~ViewText text nodes} while `mergeContainer` merges two\n\t* {@link module:engine/view/containerelement~ViewContainerElement container elements}.\n\t*\n\t* @see module:engine/view/attributeelement~ViewAttributeElement\n\t* @see module:engine/view/containerelement~ViewContainerElement\n\t* @see module:engine/view/downcastwriter~ViewDowncastWriter#mergeAttributes\n\t* @param position Merge position.\n\t* @returns Position after merge.\n\t*/\n\tmergeContainers(position) {\n\t\tconst prev = position.nodeBefore;\n\t\tconst next = position.nodeAfter;\n\t\tif (!prev || !next || !prev.is(\"containerElement\") || !next.is(\"containerElement\"))\n /**\n\t\t* Element before and after given position cannot be merged.\n\t\t*\n\t\t* @error view-writer-merge-containers-invalid-position\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-merge-containers-invalid-position\", this.document);\n\t\tconst lastChild = prev.getChild(prev.childCount - 1);\n\t\tconst newPosition = lastChild instanceof ViewText ? ViewPosition._createAt(lastChild, \"end\") : ViewPosition._createAt(prev, \"end\");\n\t\tthis.move(ViewRange._createIn(next), ViewPosition._createAt(prev, \"end\"));\n\t\tthis.remove(ViewRange._createOn(next));\n\t\treturn newPosition;\n\t}\n\t/**\n\t* Inserts a node or nodes at specified position. Takes care about breaking attributes before insertion\n\t* and merging them afterwards.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n\t* contains instances that are not {@link module:engine/view/text~ViewText Texts},\n\t* {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElements},\n\t* {@link module:engine/view/containerelement~ViewContainerElement ViewContainerElements},\n\t* {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElements},\n\t* {@link module:engine/view/rawelement~ViewRawElement RawElements} or\n\t* {@link module:engine/view/uielement~ViewUIElement UIElements}.\n\t*\n\t* @param position Insertion position.\n\t* @param nodes Node or nodes to insert.\n\t* @returns Range around inserted nodes.\n\t*/\n\tinsert(position, nodes) {\n\t\tnodes = isIterable(nodes) ? [...nodes] : [nodes];\n\t\tvalidateNodesToInsert(nodes, this.document);\n\t\tconst nodeGroups = nodes.reduce((groups, node) => {\n\t\t\tconst lastGroup = groups[groups.length - 1];\n\t\t\tconst breakAttributes = !node.is(\"uiElement\");\n\t\t\tif (!lastGroup || lastGroup.breakAttributes != breakAttributes) groups.push({\n\t\t\t\tbreakAttributes,\n\t\t\t\tnodes: [node]\n\t\t\t});\n\t\t\telse lastGroup.nodes.push(node);\n\t\t\treturn groups;\n\t\t}, []);\n\t\tlet start = null;\n\t\tlet end = position;\n\t\tfor (const { nodes, breakAttributes } of nodeGroups) {\n\t\t\tconst range = this._insertNodes(end, nodes, breakAttributes);\n\t\t\tif (!start) start = range.start;\n\t\t\tend = range.end;\n\t\t}\n\t\tif (!start) return new ViewRange(position);\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Removes provided range from the container.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t* {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t* positions are not placed inside same parent container.\n\t*\n\t* @param rangeOrItem Range to remove from container\n\t* or an {@link module:engine/view/item~ViewItem item} to remove. If range is provided, after removing, it will be updated\n\t* to a collapsed range showing the new position.\n\t* @returns Document fragment containing removed nodes.\n\t*/\n\tremove(rangeOrItem) {\n\t\tconst range = rangeOrItem instanceof ViewRange ? rangeOrItem : ViewRange._createOn(rangeOrItem);\n\t\tvalidateRangeContainer(range, this.document);\n\t\tif (range.isCollapsed) return new ViewDocumentFragment(this.document);\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange(range, true);\n\t\tconst parentContainer = breakStart.parent;\n\t\tconst count = breakEnd.offset - breakStart.offset;\n\t\tconst removed = parentContainer._removeChildren(breakStart.offset, count);\n\t\tfor (const node of removed) this._removeFromClonedElementsGroup(node);\n\t\tconst mergePosition = this.mergeAttributes(breakStart);\n\t\trange.start = mergePosition;\n\t\trange.end = mergePosition.clone();\n\t\treturn new ViewDocumentFragment(this.document, removed);\n\t}\n\t/**\n\t* Removes matching elements from given range.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t* {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t* positions are not placed inside same parent container.\n\t*\n\t* @param range Range to clear.\n\t* @param element Element to remove.\n\t*/\n\tclear(range, element) {\n\t\tvalidateRangeContainer(range, this.document);\n\t\tconst walker = range.getWalker({\n\t\t\tdirection: \"backward\",\n\t\t\tignoreElementEnd: true\n\t\t});\n\t\tfor (const current of walker) {\n\t\t\tconst item = current.item;\n\t\t\tlet rangeToRemove;\n\t\t\tif (item.is(\"element\") && element.isSimilar(item)) rangeToRemove = ViewRange._createOn(item);\n\t\t\telse if (!current.nextPosition.isAfter(range.start) && item.is(\"$textProxy\")) {\n\t\t\t\tconst parentElement = item.getAncestors().find((ancestor) => {\n\t\t\t\t\treturn ancestor.is(\"element\") && element.isSimilar(ancestor);\n\t\t\t\t});\n\t\t\t\tif (parentElement) rangeToRemove = ViewRange._createIn(parentElement);\n\t\t\t}\n\t\t\tif (rangeToRemove) {\n\t\t\t\tif (rangeToRemove.end.isAfter(range.end)) rangeToRemove.end = range.end;\n\t\t\t\tif (rangeToRemove.start.isBefore(range.start)) rangeToRemove.start = range.start;\n\t\t\t\tthis.remove(rangeToRemove);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Moves nodes from provided range to target position.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t* {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t* positions are not placed inside same parent container.\n\t*\n\t* @param sourceRange Range containing nodes to move.\n\t* @param targetPosition Position to insert.\n\t* @returns Range in target container. Inserted nodes are placed between\n\t* {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end} positions.\n\t*/\n\tmove(sourceRange, targetPosition) {\n\t\tlet nodes;\n\t\tif (targetPosition.isAfter(sourceRange.end)) {\n\t\t\ttargetPosition = this._breakAttributes(targetPosition, true);\n\t\t\tconst parent = targetPosition.parent;\n\t\t\tconst countBefore = parent.childCount;\n\t\t\tsourceRange = this._breakAttributesRange(sourceRange, true);\n\t\t\tnodes = this.remove(sourceRange);\n\t\t\ttargetPosition.offset += parent.childCount - countBefore;\n\t\t} else nodes = this.remove(sourceRange);\n\t\treturn this.insert(targetPosition, nodes);\n\t}\n\t/**\n\t* Wraps elements within range with provided {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t* If a collapsed range is provided, it will be wrapped only if it is equal to view selection.\n\t*\n\t* If a collapsed range was passed and is same as selection, the selection\n\t* will be moved to the inside of the wrapped attribute element.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-invalid-range-container`\n\t* when {@link module:engine/view/range~ViewRange#start}\n\t* and {@link module:engine/view/range~ViewRange#end} positions are not placed inside same parent container.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t* an instance of {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-nonselection-collapsed-range` when passed range\n\t* is collapsed and different than view selection.\n\t*\n\t* @param range Range to wrap.\n\t* @param attribute Attribute element to use as wrapper.\n\t* @returns range Range after wrapping, spanning over wrapping attribute element.\n\t*/\n\twrap(range, attribute) {\n\t\tif (!(attribute instanceof ViewAttributeElement)) throw new CKEditorError(\"view-writer-wrap-invalid-attribute\", this.document);\n\t\tvalidateRangeContainer(range, this.document);\n\t\tif (!range.isCollapsed) return this._wrapRange(range, attribute);\n\t\telse {\n\t\t\tlet position = range.start;\n\t\t\tif (position.parent.is(\"element\") && !_hasNonUiChildren(position.parent)) position = position.getLastMatchingPosition((value) => value.item.is(\"uiElement\"));\n\t\t\tposition = this._wrapPosition(position, attribute);\n\t\t\tconst viewSelection = this.document.selection;\n\t\t\tif (viewSelection.isCollapsed && viewSelection.getFirstPosition().isEqual(range.start)) this.setSelection(position);\n\t\t\treturn new ViewRange(position);\n\t\t}\n\t}\n\t/**\n\t* Unwraps nodes within provided range from attribute element.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t* {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t* positions are not placed inside same parent container.\n\t*/\n\tunwrap(range, attribute) {\n\t\tif (!(attribute instanceof ViewAttributeElement))\n /**\n\t\t* The `attribute` passed to {@link module:engine/view/downcastwriter~ViewDowncastWriter#unwrap `ViewDowncastWriter#unwrap()`}\n\t\t* must be an instance of {@link module:engine/view/attributeelement~ViewAttributeElement `AttributeElement`}.\n\t\t*\n\t\t* @error view-writer-unwrap-invalid-attribute\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-unwrap-invalid-attribute\", this.document);\n\t\tvalidateRangeContainer(range, this.document);\n\t\tif (range.isCollapsed) return range;\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange(range, true);\n\t\tconst parentContainer = breakStart.parent;\n\t\tconst newRange = this._unwrapChildren(parentContainer, breakStart.offset, breakEnd.offset, attribute);\n\t\tconst start = this.mergeAttributes(newRange.start);\n\t\tif (!start.isEqual(newRange.start)) newRange.end.offset--;\n\t\tconst end = this.mergeAttributes(newRange.end);\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Renames element by creating a copy of renamed element but with changed name and then moving contents of the\n\t* old element to the new one. Keep in mind that this will invalidate all {@link module:engine/view/position~ViewPosition positions}\n\t* which has renamed element as {@link module:engine/view/position~ViewPosition#parent a parent}.\n\t*\n\t* New element has to be created because `Element#tagName` property in DOM is readonly.\n\t*\n\t* Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n\t*\n\t* @param newName New name for element.\n\t* @param viewElement Element to be renamed.\n\t* @returns Element created due to rename.\n\t*/\n\trename(newName, viewElement) {\n\t\tconst newElement = new ViewContainerElement(this.document, newName, viewElement.getAttributes());\n\t\tthis.insert(ViewPosition._createAfter(viewElement), newElement);\n\t\tthis.move(ViewRange._createIn(viewElement), ViewPosition._createAt(newElement, 0));\n\t\tthis.remove(ViewRange._createOn(viewElement));\n\t\treturn newElement;\n\t}\n\t/**\n\t* Cleans up memory by removing obsolete cloned elements group from the writer.\n\t*\n\t* Should be used whenever all {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements}\n\t* with the same {@link module:engine/view/attributeelement~ViewAttributeElement#id id} are going to be removed from the view and\n\t* the group will no longer be needed.\n\t*\n\t* Cloned elements group are not removed automatically in case if the group is still needed after all its elements\n\t* were removed from the view.\n\t*\n\t* Keep in mind that group names are equal to the `id` property of the attribute element.\n\t*\n\t* @param groupName Name of the group to clear.\n\t*/\n\tclearClonedElementsGroup(groupName) {\n\t\tthis._cloneGroups.delete(groupName);\n\t}\n\t/**\n\t* Creates position at the given location. The location can be specified as:\n\t*\n\t* * a {@link module:engine/view/position~ViewPosition position},\n\t* * parent element and offset (offset defaults to `0`),\n\t* * parent element and `'end'` (sets position at the end of that element),\n\t* * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t*\n\t* This method is a shortcut to other constructors such as:\n\t*\n\t* * {@link #createPositionBefore},\n\t* * {@link #createPositionAfter},\n\t*\n\t* @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t*/\n\tcreatePositionAt(itemOrPosition, offset) {\n\t\treturn ViewPosition._createAt(itemOrPosition, offset);\n\t}\n\t/**\n\t* Creates a new position after given view item.\n\t*\n\t* @param item View item after which the position should be located.\n\t*/\n\tcreatePositionAfter(item) {\n\t\treturn ViewPosition._createAfter(item);\n\t}\n\t/**\n\t* Creates a new position before given view item.\n\t*\n\t* @param item View item before which the position should be located.\n\t*/\n\tcreatePositionBefore(item) {\n\t\treturn ViewPosition._createBefore(item);\n\t}\n\t/**\n\t* Creates a range spanning from `start` position to `end` position.\n\t*\n\t* **Note:** This factory method creates its own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t*\n\t* @param start Start position.\n\t* @param end End position. If not set, range will be collapsed at `start` position.\n\t*/\n\tcreateRange(start, end) {\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t*/\n\tcreateRangeOn(item) {\n\t\treturn ViewRange._createOn(item);\n\t}\n\t/**\n\t* Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* @param element Element which is a parent for the range.\n\t*/\n\tcreateRangeIn(element) {\n\t\treturn ViewRange._createIn(element);\n\t}\n\tcreateSelection(...args) {\n\t\treturn new ViewSelection(...args);\n\t}\n\t/**\n\t* Creates placeholders for child elements of the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t* `elementToStructure()`} conversion helper.\n\t*\n\t* ```ts\n\t* const viewSlot = conversionApi.writer.createSlot();\n\t* const viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t*\n\t* conversionApi.writer.insert( viewPosition, viewSlot );\n\t* ```\n\t*\n\t* It could be filtered down to a specific subset of children (only `<foo>` model elements in this case):\n\t*\n\t* ```ts\n\t* const viewSlot = conversionApi.writer.createSlot( node => node.is( 'element', 'foo' ) );\n\t* const viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t*\n\t* conversionApi.writer.insert( viewPosition, viewSlot );\n\t* ```\n\t*\n\t* While providing a filtered slot, make sure to provide slots for all child nodes. A single node cannot be downcasted into\n\t* multiple slots.\n\t*\n\t* **Note**: You should not change the order of nodes. View elements should be in the same order as model nodes.\n\t*\n\t* @param modeOrFilter The filter for child nodes.\n\t* @returns The slot element to be placed in to the view structure while processing\n\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure `elementToStructure()`}.\n\t*/\n\tcreateSlot(modeOrFilter = \"children\") {\n\t\tif (!this._slotFactory)\n /**\n\t\t* The `createSlot()` method is only allowed inside the `elementToStructure` downcast helper callback.\n\t\t*\n\t\t* @error view-writer-invalid-create-slot-context\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-invalid-create-slot-context\", this.document);\n\t\treturn this._slotFactory(this, modeOrFilter);\n\t}\n\t/**\n\t* Registers a slot factory.\n\t*\n\t* @internal\n\t* @param slotFactory The slot factory.\n\t*/\n\t_registerSlotFactory(slotFactory) {\n\t\tthis._slotFactory = slotFactory;\n\t}\n\t/**\n\t* Clears the registered slot factory.\n\t*\n\t* @internal\n\t*/\n\t_clearSlotFactory() {\n\t\tthis._slotFactory = null;\n\t}\n\t/**\n\t* Inserts a node or nodes at the specified position. Takes care of breaking attributes before insertion\n\t* and merging them afterwards if requested by the breakAttributes param.\n\t*\n\t* @param position Insertion position.\n\t* @param nodes Node or nodes to insert.\n\t* @param breakAttributes Whether attributes should be broken.\n\t* @returns Range around inserted nodes.\n\t*/\n\t_insertNodes(position, nodes, breakAttributes) {\n\t\tlet parentElement;\n\t\tif (breakAttributes) parentElement = getParentContainer(position);\n\t\telse parentElement = position.parent.is(\"$text\") ? position.parent.parent : position.parent;\n\t\tif (!parentElement)\n /**\n\t\t* Position's parent container cannot be found.\n\t\t*\n\t\t* @error view-writer-invalid-position-container\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-invalid-position-container\", this.document);\n\t\tlet insertionPosition;\n\t\tif (breakAttributes) insertionPosition = this._breakAttributes(position, true);\n\t\telse insertionPosition = position.parent.is(\"$text\") ? breakTextNode(position) : position;\n\t\tconst length = parentElement._insertChild(insertionPosition.offset, nodes);\n\t\tfor (const node of nodes) this._addToClonedElementsGroup(node);\n\t\tconst endPosition = insertionPosition.getShiftedBy(length);\n\t\tconst start = this.mergeAttributes(insertionPosition);\n\t\tif (!start.isEqual(insertionPosition)) endPosition.offset--;\n\t\tconst end = this.mergeAttributes(endPosition);\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Wraps children with provided `wrapElement`. Only children contained in `parent` element between\n\t* `startOffset` and `endOffset` will be wrapped.\n\t*/\n\t_wrapChildren(parent, startOffset, endOffset, wrapElement) {\n\t\tlet i = startOffset;\n\t\tconst wrapPositions = [];\n\t\twhile (i < endOffset) {\n\t\t\tconst child = parent.getChild(i);\n\t\t\tconst isText = child.is(\"$text\");\n\t\t\tconst isAttribute = child.is(\"attributeElement\");\n\t\t\tif (isAttribute && child._canMergeAttributesFrom(wrapElement)) {\n\t\t\t\tchild._mergeAttributesFrom(wrapElement);\n\t\t\t\twrapPositions.push(new ViewPosition(parent, i));\n\t\t\t} else if (isText || !isAttribute || shouldABeOutsideB(wrapElement, child)) {\n\t\t\t\tconst newAttribute = wrapElement._clone();\n\t\t\t\tchild._remove();\n\t\t\t\tnewAttribute._appendChild(child);\n\t\t\t\tparent._insertChild(i, newAttribute);\n\t\t\t\tthis._addToClonedElementsGroup(newAttribute);\n\t\t\t\twrapPositions.push(new ViewPosition(parent, i));\n\t\t\t} else this._wrapChildren(child, 0, child.childCount, wrapElement);\n\t\t\ti++;\n\t\t}\n\t\tlet offsetChange = 0;\n\t\tfor (const position of wrapPositions) {\n\t\t\tposition.offset -= offsetChange;\n\t\t\tif (position.offset == startOffset) continue;\n\t\t\tif (!this.mergeAttributes(position).isEqual(position)) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\t\treturn ViewRange._createFromParentsAndOffsets(parent, startOffset, parent, endOffset);\n\t}\n\t/**\n\t* Unwraps children from provided `unwrapElement`. Only children contained in `parent` element between\n\t* `startOffset` and `endOffset` will be unwrapped.\n\t*/\n\t_unwrapChildren(parent, startOffset, endOffset, unwrapElement) {\n\t\tlet i = startOffset;\n\t\tconst unwrapPositions = [];\n\t\twhile (i < endOffset) {\n\t\t\tconst child = parent.getChild(i);\n\t\t\tif (!child.is(\"attributeElement\")) {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.isSimilar(unwrapElement)) {\n\t\t\t\tconst unwrapped = child.getChildren();\n\t\t\t\tconst count = child.childCount;\n\t\t\t\tchild._remove();\n\t\t\t\tparent._insertChild(i, unwrapped);\n\t\t\t\tthis._removeFromClonedElementsGroup(child);\n\t\t\t\tunwrapPositions.push(new ViewPosition(parent, i), new ViewPosition(parent, i + count));\n\t\t\t\ti += count;\n\t\t\t\tendOffset += count - 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child._canSubtractAttributesOf(unwrapElement)) {\n\t\t\t\tchild._subtractAttributesOf(unwrapElement);\n\t\t\t\tunwrapPositions.push(new ViewPosition(parent, i), new ViewPosition(parent, i + 1));\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._unwrapChildren(child, 0, child.childCount, unwrapElement);\n\t\t\ti++;\n\t\t}\n\t\tlet offsetChange = 0;\n\t\tfor (const position of unwrapPositions) {\n\t\t\tposition.offset -= offsetChange;\n\t\t\tif (position.offset == startOffset || position.offset == endOffset) continue;\n\t\t\tif (!this.mergeAttributes(position).isEqual(position)) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\t\treturn ViewRange._createFromParentsAndOffsets(parent, startOffset, parent, endOffset);\n\t}\n\t/**\n\t* Helper function for `view.writer.wrap`. Wraps range with provided attribute element.\n\t* This method will also merge newly added attribute element with its siblings whenever possible.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t* an instance of {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t*\n\t* @returns New range after wrapping, spanning over wrapping attribute element.\n\t*/\n\t_wrapRange(range, attribute) {\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange(range, true);\n\t\tconst parentContainer = breakStart.parent;\n\t\tconst newRange = this._wrapChildren(parentContainer, breakStart.offset, breakEnd.offset, attribute);\n\t\tconst start = this.mergeAttributes(newRange.start);\n\t\tif (!start.isEqual(newRange.start)) newRange.end.offset--;\n\t\tconst end = this.mergeAttributes(newRange.end);\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Helper function for {@link #wrap}. Wraps position with provided attribute element.\n\t* This method will also merge newly added attribute element with its siblings whenever possible.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t* an instance of {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t*\n\t* @returns New position after wrapping.\n\t*/\n\t_wrapPosition(position, attribute) {\n\t\tif (attribute.isSimilar(position.parent)) return movePositionToTextNode(position.clone());\n\t\tif (position.parent.is(\"$text\")) position = breakTextNode(position);\n\t\tconst fakeElement = this.createAttributeElement(\"_wrapPosition-fake-element\");\n\t\tfakeElement._priority = Number.POSITIVE_INFINITY;\n\t\tfakeElement.isSimilar = () => false;\n\t\tposition.parent._insertChild(position.offset, fakeElement);\n\t\tconst wrapRange = new ViewRange(position, position.getShiftedBy(1));\n\t\tthis.wrap(wrapRange, attribute);\n\t\tconst newPosition = new ViewPosition(fakeElement.parent, fakeElement.index);\n\t\tfakeElement._remove();\n\t\tconst nodeBefore = newPosition.nodeBefore;\n\t\tconst nodeAfter = newPosition.nodeAfter;\n\t\tif (nodeBefore && nodeBefore.is(\"view:$text\") && nodeAfter && nodeAfter.is(\"view:$text\")) return mergeTextNodes(nodeBefore, nodeAfter);\n\t\treturn movePositionToTextNode(newPosition);\n\t}\n\t/**\n\t* Helper function used by other `ViewDowncastWriter` methods. Breaks attribute elements at the boundaries of given range.\n\t*\n\t* @param range Range which `start` and `end` positions will be used to break attributes.\n\t* @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t* This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t* @returns New range with located at break positions.\n\t*/\n\t_breakAttributesRange(range, forceSplitText = false) {\n\t\tconst rangeStart = range.start;\n\t\tconst rangeEnd = range.end;\n\t\tvalidateRangeContainer(range, this.document);\n\t\tif (range.isCollapsed) {\n\t\t\tconst position = this._breakAttributes(range.start, forceSplitText);\n\t\t\treturn new ViewRange(position, position);\n\t\t}\n\t\tconst breakEnd = this._breakAttributes(rangeEnd, forceSplitText);\n\t\tconst count = breakEnd.parent.childCount;\n\t\tconst breakStart = this._breakAttributes(rangeStart, forceSplitText);\n\t\tbreakEnd.offset += breakEnd.parent.childCount - count;\n\t\treturn new ViewRange(breakStart, breakEnd);\n\t}\n\t/**\n\t* Helper function used by other `ViewDowncastWriter` methods. Breaks attribute elements at given position.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n\t* is placed inside {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElement}.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n\t* is placed inside {@link module:engine/view/uielement~ViewUIElement UIElement}.\n\t*\n\t* @param position Position where to break attributes.\n\t* @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t* This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t* @returns New position after breaking the attributes.\n\t*/\n\t_breakAttributes(position, forceSplitText = false) {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\t\tif (position.parent.is(\"emptyElement\"))\n /**\n\t\t* Cannot break an `EmptyElement` instance.\n\t\t*\n\t\t* This error is thrown if\n\t\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes `ViewDowncastWriter#breakAttributes()`}\n\t\t* was executed in an incorrect position.\n\t\t*\n\t\t* @error view-writer-cannot-break-empty-element\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-cannot-break-empty-element\", this.document);\n\t\tif (position.parent.is(\"uiElement\"))\n /**\n\t\t* Cannot break a `UIElement` instance.\n\t\t*\n\t\t* This error is thrown if\n\t\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes `ViewDowncastWriter#breakAttributes()`}\n\t\t* was executed in an incorrect position.\n\t\t*\n\t\t* @error view-writer-cannot-break-ui-element\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-cannot-break-ui-element\", this.document);\n\t\tif (position.parent.is(\"rawElement\"))\n /**\n\t\t* Cannot break a `RawElement` instance.\n\t\t*\n\t\t* This error is thrown if\n\t\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes `ViewDowncastWriter#breakAttributes()`}\n\t\t* was executed in an incorrect position.\n\t\t*\n\t\t* @error view-writer-cannot-break-raw-element\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-cannot-break-raw-element\", this.document);\n\t\tif (!forceSplitText && positionParent.is(\"$text\") && isContainerOrFragment(positionParent.parent)) return position.clone();\n\t\tif (isContainerOrFragment(positionParent)) return position.clone();\n\t\tif (positionParent.is(\"$text\")) return this._breakAttributes(breakTextNode(position), forceSplitText);\n\t\tif (positionOffset == positionParent.childCount) {\n\t\t\tconst newPosition = new ViewPosition(positionParent.parent, positionParent.index + 1);\n\t\t\treturn this._breakAttributes(newPosition, forceSplitText);\n\t\t} else if (positionOffset === 0) {\n\t\t\tconst newPosition = new ViewPosition(positionParent.parent, positionParent.index);\n\t\t\treturn this._breakAttributes(newPosition, forceSplitText);\n\t\t} else {\n\t\t\tconst offsetAfter = positionParent.index + 1;\n\t\t\tconst clonedNode = positionParent._clone();\n\t\t\tpositionParent.parent._insertChild(offsetAfter, clonedNode);\n\t\t\tthis._addToClonedElementsGroup(clonedNode);\n\t\t\tconst count = positionParent.childCount - positionOffset;\n\t\t\tconst nodesToMove = positionParent._removeChildren(positionOffset, count);\n\t\t\tclonedNode._appendChild(nodesToMove);\n\t\t\tconst newPosition = new ViewPosition(positionParent.parent, offsetAfter);\n\t\t\treturn this._breakAttributes(newPosition, forceSplitText);\n\t\t}\n\t}\n\t/**\n\t* Stores the information that an {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} was\n\t* added to the tree. Saves the reference to the group in the given element and updates the group, so other elements\n\t* from the group now keep a reference to the given attribute element.\n\t*\n\t* The clones group can be obtained using {@link module:engine/view/attributeelement~ViewAttributeElement#getElementsWithSameId}.\n\t*\n\t* Does nothing if added element has no {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t*\n\t* @param element Attribute element to save.\n\t*/\n\t_addToClonedElementsGroup(element) {\n\t\tif (!element.root.is(\"rootElement\")) return;\n\t\tif (element.is(\"element\")) for (const child of element.getChildren()) this._addToClonedElementsGroup(child);\n\t\tconst id = element.id;\n\t\tif (!id) return;\n\t\tlet group = this._cloneGroups.get(id);\n\t\tif (!group) {\n\t\t\tgroup = /* @__PURE__ */ new Set();\n\t\t\tthis._cloneGroups.set(id, group);\n\t\t}\n\t\tgroup.add(element);\n\t\telement._clonesGroup = group;\n\t}\n\t/**\n\t* Removes all the information about the given {@link module:engine/view/attributeelement~ViewAttributeElement attribute element}\n\t* from its clones group.\n\t*\n\t* Keep in mind, that the element will still keep a reference to the group (but the group will not keep a reference to it).\n\t* This allows to reference the whole group even if the element was already removed from the tree.\n\t*\n\t* Does nothing if the element has no {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t*\n\t* @param element Attribute element to remove.\n\t*/\n\t_removeFromClonedElementsGroup(element) {\n\t\tif (element.is(\"element\")) for (const child of element.getChildren()) this._removeFromClonedElementsGroup(child);\n\t\tconst id = element.id;\n\t\tif (!id) return;\n\t\tconst group = this._cloneGroups.get(id);\n\t\tif (!group) return;\n\t\tgroup.delete(element);\n\t}\n};\nfunction _hasNonUiChildren(parent) {\n\treturn Array.from(parent.getChildren()).some((child) => !child.is(\"uiElement\"));\n}\n/**\n* The `attribute` passed to {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#wrap()`}\n* must be an instance of {@link module:engine/view/attributeelement~ViewAttributeElement `AttributeElement`}.\n*\n* @error view-writer-wrap-invalid-attribute\n*/\n/**\n* Returns first parent container of specified {@link module:engine/view/position~ViewPosition Position}.\n* Position's parent node is checked as first, then next parents are checked.\n* Note that {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment} is treated like a container.\n*\n* @param position Position used as a start point to locate parent container.\n* @returns Parent container element or `undefined` if container is not found.\n*/\nfunction getParentContainer(position) {\n\tlet parent = position.parent;\n\twhile (!isContainerOrFragment(parent)) {\n\t\tif (!parent) return;\n\t\tparent = parent.parent;\n\t}\n\treturn parent;\n}\n/**\n* Checks if first {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement} provided to the function\n* can be wrapped outside second element. It is done by comparing elements'\n* {@link module:engine/view/attributeelement~ViewAttributeElement#priority priorities}, if both have same priority\n* {@link module:engine/view/element~ViewElement#getIdentity identities} are compared.\n*/\nfunction shouldABeOutsideB(a, b) {\n\tif (a.priority < b.priority) return true;\n\telse if (a.priority > b.priority) return false;\n\treturn a.getIdentity() < b.getIdentity();\n}\n/**\n* Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n* specified position.\n*\n* ```html\n* <p>foo[]</p>  ->  <p>foo{}</p>\n* <p>[]foo</p>  ->  <p>{}foo</p>\n* ```\n*\n* @returns Position located inside text node or same position if there is no text nodes\n* before or after position location.\n*/\nfunction movePositionToTextNode(position) {\n\tconst nodeBefore = position.nodeBefore;\n\tif (nodeBefore && nodeBefore.is(\"$text\")) return new ViewPosition(nodeBefore, nodeBefore.data.length);\n\tconst nodeAfter = position.nodeAfter;\n\tif (nodeAfter && nodeAfter.is(\"$text\")) return new ViewPosition(nodeAfter, 0);\n\treturn position;\n}\n/**\n* Breaks text node into two text nodes when possible.\n*\n* ```html\n* <p>foo{}bar</p> -> <p>foo[]bar</p>\n* <p>{}foobar</p> -> <p>[]foobar</p>\n* <p>foobar{}</p> -> <p>foobar[]</p>\n* ```\n*\n* @param position Position that need to be placed inside text node.\n* @returns New position after breaking text node.\n*/\nfunction breakTextNode(position) {\n\tif (position.offset == position.parent.data.length) return new ViewPosition(position.parent.parent, position.parent.index + 1);\n\tif (position.offset === 0) return new ViewPosition(position.parent.parent, position.parent.index);\n\tconst textToMove = position.parent.data.slice(position.offset);\n\tposition.parent._data = position.parent.data.slice(0, position.offset);\n\tposition.parent.parent._insertChild(position.parent.index + 1, new ViewText(position.root.document, textToMove));\n\treturn new ViewPosition(position.parent.parent, position.parent.index + 1);\n}\n/**\n* Merges two text nodes into first node. Removes second node and returns merge position.\n*\n* @param t1 First text node to merge. Data from second text node will be moved at the end of this text node.\n* @param t2 Second text node to merge. This node will be removed after merging.\n* @returns Position after merging text nodes.\n*/\nfunction mergeTextNodes(t1, t2) {\n\tconst nodeBeforeLength = t1.data.length;\n\tt1._data += t2.data;\n\tt2._remove();\n\treturn new ViewPosition(t1, nodeBeforeLength);\n}\nconst validNodesToInsert = [\n\tViewText,\n\tViewAttributeElement,\n\tViewContainerElement,\n\tViewEmptyElement,\n\tViewRawElement,\n\tViewUIElement\n];\n/**\n* Checks if provided nodes are valid to insert.\n*\n* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n* contains instances that are not supported ones (see error description for valid ones.\n*/\nfunction validateNodesToInsert(nodes, errorContext) {\n\tfor (const node of nodes) {\n\t\tif (!validNodesToInsert.some((validNode) => node instanceof validNode))\n /**\n\t\t* One of the nodes to be inserted is of an invalid type.\n\t\t*\n\t\t* Nodes to be inserted with {@link module:engine/view/downcastwriter~ViewDowncastWriter#insert `ViewDowncastWriter#insert()`}\n\t\t* should be of the following types:\n\t\t*\n\t\t* * {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement},\n\t\t* * {@link module:engine/view/containerelement~ViewContainerElement ViewContainerElement},\n\t\t* * {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElement},\n\t\t* * {@link module:engine/view/uielement~ViewUIElement UIElement},\n\t\t* * {@link module:engine/view/rawelement~ViewRawElement RawElement},\n\t\t* * {@link module:engine/view/text~ViewText Text}.\n\t\t*\n\t\t* @error view-writer-insert-invalid-node-type\n\t\t*/\n\t\tthrow new CKEditorError(\"view-writer-insert-invalid-node-type\", errorContext);\n\t\tif (!node.is(\"$text\")) validateNodesToInsert(node.getChildren(), errorContext);\n\t}\n}\n/**\n* Checks if node is ViewContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n*\n* @returns Returns `true` if node is instance of ViewContainerElement or DocumentFragment.\n*/\nfunction isContainerOrFragment(node) {\n\treturn node && (node.is(\"containerElement\") || node.is(\"documentFragment\"));\n}\n/**\n* Checks if {@link module:engine/view/range~ViewRange#start range start} and {@link module:engine/view/range~ViewRange#end range end}\n* are placed inside same {@link module:engine/view/containerelement~ViewContainerElement container element}.\n* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n*/\nfunction validateRangeContainer(range, errorContext) {\n\tconst startContainer = getParentContainer(range.start);\n\tconst endContainer = getParentContainer(range.end);\n\tif (!startContainer || !endContainer || startContainer !== endContainer)\n /**\n\t* The container of the given range is invalid.\n\t*\n\t* This may happen if {@link module:engine/view/range~ViewRange#start range start} and\n\t* {@link module:engine/view/range~ViewRange#end range end} positions are not placed inside the same container element or\n\t* a parent container for these positions cannot be found.\n\t*\n\t* Methods like {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#remove()`},\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#clean()`},\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#wrap()`},\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#unwrap()`} need to be called\n\t* on a range that has its start and end positions located in the same container element. Both positions can be\n\t* nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same.\n\t*\n\t* @error view-writer-invalid-range-container\n\t*/\n\tthrow new CKEditorError(\"view-writer-invalid-range-container\", errorContext);\n}\n/**\n* Checks if the provided argument is a plain object that can be used as options for container element.\n*/\nfunction isContainerOptions(childrenOrOptions) {\n\treturn isPlainObject(childrenOrOptions);\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 utilities related to handling block and inline fillers.\n*\n* Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all\n* empty elements which should be selectable with elements or characters called \"fillers\". Unfortunately there is no one\n* universal filler, this is why two types are uses:\n*\n* * Block filler is an element which fill block elements, like `<p>`. CKEditor uses `<br>` as a block filler during the editing,\n* as browsers do natively. So instead of an empty `<p>` there will be `<p><br></p>`. The advantage of block filler is that\n* it is transparent for the selection, so when the caret is before the `<br>` and user presses right arrow he will be\n* moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it cannot be used\n* in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `<br>` filler} can be replaced with any other\n* character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or\n* {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.\n*\n* * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty\n* `<b>` surrendered by text: `foo<b></b>bar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width\n* spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined\n* {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to\n* avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not\n* transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional\n* code is needed to handle the caret.\n*\n* Both inline and block fillers are handled by the {@link module:engine/view/renderer~ViewRenderer renderer} and are not present in the\n* view.\n*\n* @module engine/view/filler\n*/\n/**\n* Non-breaking space filler creator. This function creates the `&nbsp;` text node.\n* It defines how the filler is created.\n*\n* @see module:engine/view/filler~MARKED_NBSP_FILLER\n* @see module:engine/view/filler~BR_FILLER\n* @internal\n*/\nconst NBSP_FILLER = (domDocument) => domDocument.createTextNode(\"\\xA0\");\n/**\n* Marked non-breaking space filler creator. This function creates the `<span data-cke-filler=\"true\">&nbsp;</span>` element.\n* It defines how the filler is created.\n*\n* @see module:engine/view/filler~NBSP_FILLER\n* @see module:engine/view/filler~BR_FILLER\n* @internal\n*/\nconst MARKED_NBSP_FILLER = (domDocument) => {\n\tconst span = domDocument.createElement(\"span\");\n\tspan.dataset.ckeFiller = \"true\";\n\tspan.innerText = \"\\xA0\";\n\treturn span;\n};\n/**\n* `<br>` filler creator. This function creates the `<br data-cke-filler=\"true\">` element.\n* It defines how the filler is created.\n*\n* @see module:engine/view/filler~NBSP_FILLER\n* @see module:engine/view/filler~MARKED_NBSP_FILLER\n* @internal\n*/\nconst BR_FILLER = (domDocument) => {\n\tconst fillerBr = domDocument.createElement(\"br\");\n\tfillerBr.dataset.ckeFiller = \"true\";\n\treturn fillerBr;\n};\n/**\n* Length of the {@link module:engine/view/filler~INLINE_FILLER INLINE_FILLER}.\n*\n* @internal\n*/\nconst INLINE_FILLER_LENGTH = 7;\n/**\n* Inline filler which is a sequence of the word joiners.\n*\n* @internal\n*/\nconst INLINE_FILLER = \"⁠\".repeat(7);\n/**\n* Checks if the node is a text node which starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n*\n* ```ts\n* startsWithFiller( document.createTextNode( INLINE_FILLER ) ); // true\n* startsWithFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // true\n* startsWithFiller( document.createTextNode( 'foo' ) ); // false\n* startsWithFiller( document.createElement( 'p' ) ); // false\n* ```\n*\n* @param domNode DOM node.\n* @returns True if the text node starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n* @internal\n*/\nfunction startsWithFiller(domNode) {\n\tif (typeof domNode == \"string\") return domNode.substr(0, 7) === INLINE_FILLER;\n\treturn isText(domNode) && domNode.data.substr(0, 7) === INLINE_FILLER;\n}\n/**\n* Checks if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n*\n* ```ts\n* isInlineFiller( document.createTextNode( INLINE_FILLER ) ); // true\n* isInlineFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // false\n* ```\n*\n* @param domText DOM text node.\n* @returns True if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n* @internal\n*/\nfunction isInlineFiller(domText) {\n\treturn domText.data.length == 7 && startsWithFiller(domText);\n}\n/**\n* Get string data from the text node, removing an {@link module:engine/view/filler~INLINE_FILLER inline filler} from it,\n* if text node contains it.\n*\n* ```ts\n* getDataWithoutFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ) == 'foo' // true\n* getDataWithoutFiller( document.createTextNode( 'foo' ) ) == 'foo' // true\n* ```\n*\n* @param domText DOM text node, possible with inline filler.\n* @returns Data without filler.\n* @internal\n*/\nfunction getDataWithoutFiller(domText) {\n\tconst data = typeof domText == \"string\" ? domText : domText.data;\n\tif (startsWithFiller(domText)) return data.slice(7);\n\treturn data;\n}\n/**\n* Assign key observer which move cursor from the end of the inline filler to the beginning of it when\n* the left arrow is pressed, so the filler does not break navigation.\n*\n* @param view View controller instance we should inject quirks handling on.\n* @internal\n*/\nfunction injectQuirksHandling(view) {\n\tview.document.on(\"arrowKey\", jumpOverInlineFiller, { priority: \"low\" });\n}\n/**\n* Move cursor from the end of the inline filler to the beginning of it when, so the filler does not break navigation.\n*/\nfunction jumpOverInlineFiller(evt, data) {\n\tif (data.keyCode == keyCodes.arrowleft) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView.getSelection();\n\t\tif (domSelection.rangeCount == 1 && domSelection.getRangeAt(0).collapsed) {\n\t\t\tconst domParent = domSelection.getRangeAt(0).startContainer;\n\t\t\tconst domOffset = domSelection.getRangeAt(0).startOffset;\n\t\t\tif (startsWithFiller(domParent) && domOffset <= 7) domSelection.collapse(domParent, 0);\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 engine/view/renderer\n*/\nconst ViewRendererBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Renderer is responsible for updating the DOM structure and the DOM selection based on\n* the {@link module:engine/view/renderer~ViewRenderer#markToSync information about updated view nodes}.\n* In other words, it renders the view to the DOM.\n*\n* Its main responsibility is to make only the necessary, minimal changes to the DOM. However, unlike in many\n* virtual DOM implementations, the primary reason for doing minimal changes is not the performance but ensuring\n* that native editing features such as text composition, autocompletion, spell checking, selection's x-index are\n* affected as little as possible.\n*\n* Renderer uses {@link module:engine/view/domconverter~ViewDomConverter} to transform view nodes and positions\n* to and from the DOM.\n*/\nvar ViewRenderer = class extends ViewRendererBase {\n\t/**\n\t* Set of DOM Documents instances.\n\t*/\n\tdomDocuments = /* @__PURE__ */ new Set();\n\t/**\n\t* Converter instance.\n\t*/\n\tdomConverter;\n\t/**\n\t* Set of nodes which attributes changed and may need to be rendered.\n\t*/\n\tmarkedAttributes = /* @__PURE__ */ new Set();\n\t/**\n\t* Set of elements which child lists changed and may need to be rendered.\n\t*/\n\tmarkedChildren = /* @__PURE__ */ new Set();\n\t/**\n\t* Set of text nodes which text data changed and may need to be rendered.\n\t*/\n\tmarkedTexts = /* @__PURE__ */ new Set();\n\t/**\n\t* View selection. Renderer updates DOM selection based on the view selection.\n\t*/\n\tselection;\n\t/**\n\t* The text node in which the inline filler was rendered.\n\t*/\n\t_inlineFiller = null;\n\t/**\n\t* DOM element containing fake selection.\n\t*/\n\t_fakeSelectionContainer = null;\n\t/**\n\t* Creates a renderer instance.\n\t*\n\t* @param domConverter Converter instance.\n\t* @param selection View selection.\n\t*/\n\tconstructor(domConverter, selection) {\n\t\tsuper();\n\t\tthis.domConverter = domConverter;\n\t\tthis.selection = selection;\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"isSelecting\", false);\n\t\tthis.set(\"isComposing\", false);\n\t\tif (env.isBlink && !env.isAndroid) this.on(\"change:isSelecting\", () => {\n\t\t\tif (!this.isSelecting) this.render();\n\t\t});\n\t}\n\t/**\n\t* Marks a view node to be updated in the DOM by {@link #render `render()`}.\n\t*\n\t* Note that only view nodes whose parents have corresponding DOM elements need to be marked to be synchronized.\n\t*\n\t* @see #markedAttributes\n\t* @see #markedChildren\n\t* @see #markedTexts\n\t*\n\t* @param type Type of the change.\n\t* @param node ViewNode to be marked.\n\t*/\n\tmarkToSync(type, node) {\n\t\tif (type === \"text\") {\n\t\t\tif (this.domConverter.mapViewToDom(node.parent)) this.markedTexts.add(node);\n\t\t} else {\n\t\t\tif (!this.domConverter.mapViewToDom(node)) return;\n\t\t\tif (type === \"attributes\") this.markedAttributes.add(node);\n\t\t\telse if (type === \"children\") this.markedChildren.add(node);\n\t\t\telse\n /**\n\t\t\t* Unknown type passed to Renderer.markToSync.\n\t\t\t*\n\t\t\t* @error view-renderer-unknown-type\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"view-renderer-unknown-type\", this);\n\t\t}\n\t}\n\t/**\n\t* Renders all buffered changes ({@link #markedAttributes}, {@link #markedChildren} and {@link #markedTexts}) and\n\t* the current view selection (if needed) to the DOM by applying a minimal set of changes to it.\n\t*\n\t* Renderer tries not to break the text composition (e.g. IME) and x-index of the selection,\n\t* so it does as little as it is needed to update the DOM.\n\t*\n\t* Renderer also handles {@link module:engine/view/filler fillers}. Especially, it checks if the inline filler is needed\n\t* at the selection position and adds or removes it. To prevent breaking text composition inline filler will not be\n\t* removed as long as the selection is in the text node which needed it at first.\n\t*/\n\trender() {\n\t\tif (this.isComposing && !env.isAndroid) return;\n\t\tlet inlineFillerPosition = null;\n\t\tconst isInlineFillerRenderingPossible = env.isBlink && !env.isAndroid ? !this.isSelecting : true;\n\t\tfor (const element of this.markedChildren) this._updateChildrenMappings(element);\n\t\tif (isInlineFillerRenderingPossible) {\n\t\t\tif (this._inlineFiller && !this._isSelectionInInlineFiller()) this._removeInlineFiller();\n\t\t\tif (this._inlineFiller) inlineFillerPosition = this._getInlineFillerPosition();\n\t\t\telse if (this._needsInlineFillerAtSelection()) {\n\t\t\t\tinlineFillerPosition = this.selection.getFirstPosition();\n\t\t\t\tthis.markedChildren.add(inlineFillerPosition.parent);\n\t\t\t}\n\t\t} else if (this._inlineFiller && this._inlineFiller.parentNode) {\n\t\t\tinlineFillerPosition = this.domConverter.domPositionToView(this._inlineFiller);\n\t\t\tif (inlineFillerPosition && inlineFillerPosition.parent.is(\"$text\")) inlineFillerPosition = ViewPosition._createBefore(inlineFillerPosition.parent);\n\t\t}\n\t\tfor (const element of this.markedAttributes) this._updateAttrs(element);\n\t\tfor (const element of this.markedChildren) this._updateChildren(element, { inlineFillerPosition });\n\t\tfor (const node of this.markedTexts) if (!this.markedChildren.has(node.parent) && this.domConverter.mapViewToDom(node.parent)) this._updateText(node, { inlineFillerPosition });\n\t\tif (isInlineFillerRenderingPossible) {\n\t\t\tif (inlineFillerPosition) {\n\t\t\t\tconst fillerDomPosition = this.domConverter.viewPositionToDom(inlineFillerPosition);\n\t\t\t\tconst domDocument = fillerDomPosition.parent.ownerDocument;\n\t\t\t\tif (!startsWithFiller(fillerDomPosition.parent)) this._inlineFiller = addInlineFiller(domDocument, fillerDomPosition.parent, fillerDomPosition.offset);\n\t\t\t\telse this._inlineFiller = fillerDomPosition.parent;\n\t\t\t} else this._inlineFiller = null;\n\t\t}\n\t\tthis._updateFocus();\n\t\tthis._updateSelection();\n\t\tthis.domConverter._clearTemporaryCustomProperties();\n\t\tthis.markedTexts.clear();\n\t\tthis.markedAttributes.clear();\n\t\tthis.markedChildren.clear();\n\t}\n\t/**\n\t* Updates mappings of view element's children.\n\t*\n\t* Children that were replaced in the view structure by similar elements (same tag name) are treated as 'replaced'.\n\t* This means that their mappings can be updated so the new view elements are mapped to the existing DOM elements.\n\t* Thanks to that these elements do not need to be re-rendered completely.\n\t*\n\t* @param viewElement The view element whose children mappings will be updated.\n\t*/\n\t_updateChildrenMappings(viewElement) {\n\t\tconst domElement = this.domConverter.mapViewToDom(viewElement);\n\t\tif (!domElement) return;\n\t\tconst actualDomChildren = Array.from(domElement.childNodes);\n\t\tconst expectedDomChildren = Array.from(this.domConverter.viewChildrenToDom(viewElement, { withChildren: false }));\n\t\tconst diff = this._diffNodeLists(actualDomChildren, expectedDomChildren);\n\t\tconst actions = this._findUpdateActions(diff, actualDomChildren, expectedDomChildren, areSimilarElements);\n\t\tif (actions.indexOf(\"update\") !== -1) {\n\t\t\tconst counter = {\n\t\t\t\tequal: 0,\n\t\t\t\tinsert: 0,\n\t\t\t\tdelete: 0\n\t\t\t};\n\t\t\tfor (const action of actions) if (action === \"update\") {\n\t\t\t\tconst insertIndex = counter.equal + counter.insert;\n\t\t\t\tconst deleteIndex = counter.equal + counter.delete;\n\t\t\t\tconst viewChild = viewElement.getChild(insertIndex);\n\t\t\t\tif (viewChild && !viewChild.is(\"uiElement\") && !viewChild.is(\"rawElement\")) this._updateElementMappings(viewChild, actualDomChildren[deleteIndex]);\n\t\t\t\tremove$1(expectedDomChildren[insertIndex]);\n\t\t\t\tcounter.equal++;\n\t\t\t} else counter[action]++;\n\t\t}\n\t}\n\t/**\n\t* Updates mappings of a given view element.\n\t*\n\t* @param viewElement The view element whose mappings will be updated.\n\t* @param domElement The DOM element representing the given view element.\n\t*/\n\t_updateElementMappings(viewElement, domElement) {\n\t\tthis.domConverter.unbindDomElement(domElement);\n\t\tthis.domConverter.bindElements(domElement, viewElement);\n\t\tthis.markedChildren.add(viewElement);\n\t\tthis.markedAttributes.add(viewElement);\n\t}\n\t/**\n\t* Gets the position of the inline filler based on the current selection.\n\t* Here, we assume that we know that the filler is needed and\n\t* {@link #_isSelectionInInlineFiller is at the selection position}, and, since it is needed,\n\t* it is somewhere at the selection position.\n\t*\n\t* Note: The filler position cannot be restored based on the filler's DOM text node, because\n\t* when this method is called (before rendering), the bindings will often be broken. View-to-DOM\n\t* bindings are only dependable after rendering.\n\t*/\n\t_getInlineFillerPosition() {\n\t\tconst firstPos = this.selection.getFirstPosition();\n\t\tif (firstPos.parent.is(\"$text\")) return ViewPosition._createBefore(firstPos.parent);\n\t\telse return firstPos;\n\t}\n\t/**\n\t* Returns `true` if the selection has not left the inline filler's text node.\n\t* If it is `true`, it means that the filler had been added for a reason and the selection did not\n\t* leave the filler's text node. For example, the user can be in the middle of a composition so it should not be touched.\n\t*\n\t* @returns `true` if the inline filler and selection are in the same place.\n\t*/\n\t_isSelectionInInlineFiller() {\n\t\tif (this.selection.rangeCount != 1 || !this.selection.isCollapsed) return false;\n\t\tconst selectionPosition = this.selection.getFirstPosition();\n\t\tconst position = this.domConverter.viewPositionToDom(selectionPosition);\n\t\tif (position && isText(position.parent) && startsWithFiller(position.parent)) return true;\n\t\treturn false;\n\t}\n\t/**\n\t* Removes the inline filler.\n\t*/\n\t_removeInlineFiller() {\n\t\tconst domFillerNode = this._inlineFiller;\n\t\tif (!startsWithFiller(domFillerNode))\n /**\n\t\t* The inline filler node was lost. Most likely, something overwrote the filler text node\n\t\t* in the DOM.\n\t\t*\n\t\t* @error view-renderer-filler-was-lost\n\t\t*/\n\t\tthrow new CKEditorError(\"view-renderer-filler-was-lost\", this);\n\t\tif (isInlineFiller(domFillerNode)) domFillerNode.remove();\n\t\telse domFillerNode.data = domFillerNode.data.substr(7);\n\t\tthis._inlineFiller = null;\n\t}\n\t/**\n\t* Checks if the inline {@link module:engine/view/filler filler} should be added.\n\t*\n\t* @returns `true` if the inline filler should be added.\n\t*/\n\t_needsInlineFillerAtSelection() {\n\t\tif (this.selection.rangeCount != 1 || !this.selection.isCollapsed) return false;\n\t\tconst selectionPosition = this.selection.getFirstPosition();\n\t\tconst selectionParent = selectionPosition.parent;\n\t\tconst selectionOffset = selectionPosition.offset;\n\t\tif (!this.domConverter.mapViewToDom(selectionParent.root)) return false;\n\t\tif (!selectionParent.is(\"element\")) return false;\n\t\tif (!isEditable(selectionParent)) return false;\n\t\tconst nodeBefore = selectionPosition.nodeBefore;\n\t\tconst nodeAfter = selectionPosition.nodeAfter;\n\t\tif (nodeBefore instanceof ViewText || nodeAfter instanceof ViewText) return false;\n\t\tif (selectionOffset === selectionParent.getFillerOffset() && (!nodeBefore || !nodeBefore.is(\"element\", \"br\"))) return false;\n\t\tif (env.isAndroid && (nodeBefore || nodeAfter)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Checks if text needs to be updated and possibly updates it.\n\t*\n\t* @param viewText View text to update.\n\t* @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t*/\n\t_updateText(viewText, options) {\n\t\tconst domText = this.domConverter.findCorrespondingDomText(viewText);\n\t\tlet expectedText = this.domConverter.viewToDom(viewText).data;\n\t\tconst filler = options.inlineFillerPosition;\n\t\tif (filler && filler.parent == viewText.parent && filler.offset == viewText.index) expectedText = INLINE_FILLER + expectedText;\n\t\tthis._updateTextNode(domText, expectedText);\n\t}\n\t/**\n\t* Checks if attribute list needs to be updated and possibly updates it.\n\t*\n\t* @param viewElement The view element to update.\n\t*/\n\t_updateAttrs(viewElement) {\n\t\tconst domElement = this.domConverter.mapViewToDom(viewElement);\n\t\tif (!domElement) return;\n\t\tfor (const domAttr of Array.from(domElement.attributes)) {\n\t\t\tconst key = domAttr.name;\n\t\t\tif (!viewElement.hasAttribute(key)) this.domConverter.removeDomElementAttribute(domElement, key);\n\t\t}\n\t\tfor (const key of viewElement.getAttributeKeys()) this.domConverter.setDomElementAttribute(domElement, key, viewElement.getAttribute(key), viewElement);\n\t}\n\t/**\n\t* Checks if elements child list needs to be updated and possibly updates it.\n\t*\n\t* Note that on Android, to reduce the risk of composition breaks, it tries to update data of an existing\n\t* child text nodes instead of replacing them completely.\n\t*\n\t* @param viewElement View element to update.\n\t* @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t*/\n\t_updateChildren(viewElement, options) {\n\t\tconst domElement = this.domConverter.mapViewToDom(viewElement);\n\t\tif (!domElement) return;\n\t\tif (env.isAndroid) {\n\t\t\tlet previousDomNode = null;\n\t\t\tfor (const domNode of Array.from(domElement.childNodes)) {\n\t\t\t\tif (previousDomNode && isText(previousDomNode) && isText(domNode)) {\n\t\t\t\t\tdomElement.normalize();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpreviousDomNode = domNode;\n\t\t\t}\n\t\t}\n\t\tconst inlineFillerPosition = options.inlineFillerPosition;\n\t\tconst actualDomChildren = domElement.childNodes;\n\t\tconst expectedDomChildren = Array.from(this.domConverter.viewChildrenToDom(viewElement, { bind: true }));\n\t\tif (inlineFillerPosition && inlineFillerPosition.parent === viewElement) addInlineFiller(domElement.ownerDocument, expectedDomChildren, inlineFillerPosition.offset);\n\t\tconst diff = this._diffNodeLists(actualDomChildren, expectedDomChildren);\n\t\tconst actions = this._findUpdateActions(diff, actualDomChildren, expectedDomChildren, areTextNodes);\n\t\tlet i = 0;\n\t\tconst nodesToUnbind = /* @__PURE__ */ new Set();\n\t\tfor (const action of actions) if (action === \"delete\") {\n\t\t\tnodesToUnbind.add(actualDomChildren[i]);\n\t\t\tremove$1(actualDomChildren[i]);\n\t\t} else if (action === \"equal\" || action === \"update\") i++;\n\t\ti = 0;\n\t\tfor (const action of actions) if (action === \"insert\") {\n\t\t\tinsertAt(domElement, i, expectedDomChildren[i]);\n\t\t\ti++;\n\t\t} else if (action === \"update\") {\n\t\t\tthis._updateTextNode(actualDomChildren[i], expectedDomChildren[i].data);\n\t\t\ti++;\n\t\t} else if (action === \"equal\") {\n\t\t\tthis._markDescendantTextToSync(this.domConverter.domToView(expectedDomChildren[i]));\n\t\t\ti++;\n\t\t}\n\t\tfor (const node of nodesToUnbind) if (!node.parentNode) this.domConverter.unbindDomElement(node);\n\t}\n\t/**\n\t* Shorthand for diffing two arrays or node lists of DOM nodes.\n\t*\n\t* @param actualDomChildren Actual DOM children\n\t* @param expectedDomChildren Expected DOM children.\n\t* @returns The list of actions based on the {@link module:utils/diff~diff} function.\n\t*/\n\t_diffNodeLists(actualDomChildren, expectedDomChildren) {\n\t\tactualDomChildren = filterOutFakeSelectionContainer(actualDomChildren, this._fakeSelectionContainer);\n\t\treturn diff(actualDomChildren, expectedDomChildren, sameNodes$1.bind(null, this.domConverter));\n\t}\n\t/**\n\t* Finds DOM nodes that were replaced with the similar nodes (same tag name) in the view. All nodes are compared\n\t* within one `insert`/`delete` action group, for example:\n\t*\n\t* ```\n\t* Actual DOM:\t\t<p><b>Foo</b>Bar<i>Baz</i><b>Bax</b></p>\n\t* Expected DOM:\t<p>Bar<b>123</b><i>Baz</i><b>456</b></p>\n\t* Input actions:\t[ insert, insert, delete, delete, equal, insert, delete ]\n\t* Output actions:\t[ insert, replace, delete, equal, replace ]\n\t* ```\n\t*\n\t* @param actions Actions array which is a result of the {@link module:utils/diff~diff} function.\n\t* @param actualDom Actual DOM children\n\t* @param expectedDom Expected DOM children.\n\t* @param comparator A comparator function that should return `true` if the given node should be reused\n\t* (either by the update of a text node data or an element children list for similar elements).\n\t* @returns Actions array modified with the `update` actions.\n\t*/\n\t_findUpdateActions(actions, actualDom, expectedDom, comparator) {\n\t\tif (actions.indexOf(\"insert\") === -1 || actions.indexOf(\"delete\") === -1) return actions;\n\t\tlet newActions = [];\n\t\tlet actualSlice = [];\n\t\tlet expectedSlice = [];\n\t\tconst counter = {\n\t\t\tequal: 0,\n\t\t\tinsert: 0,\n\t\t\tdelete: 0\n\t\t};\n\t\tfor (const action of actions) {\n\t\t\tif (action === \"insert\") expectedSlice.push(expectedDom[counter.equal + counter.insert]);\n\t\t\telse if (action === \"delete\") actualSlice.push(actualDom[counter.equal + counter.delete]);\n\t\t\telse {\n\t\t\t\tnewActions = newActions.concat(diff(actualSlice, expectedSlice, comparator).map((action) => action === \"equal\" ? \"update\" : action));\n\t\t\t\tnewActions.push(\"equal\");\n\t\t\t\tactualSlice = [];\n\t\t\t\texpectedSlice = [];\n\t\t\t}\n\t\t\tcounter[action]++;\n\t\t}\n\t\treturn newActions.concat(diff(actualSlice, expectedSlice, comparator).map((action) => action === \"equal\" ? \"update\" : action));\n\t}\n\t/**\n\t* Checks if text needs to be updated and possibly updates it by removing and inserting only parts\n\t* of the data from the existing text node to reduce impact on the IME composition.\n\t*\n\t* @param domText DOM text node to update.\n\t* @param expectedText The expected data of a text node.\n\t*/\n\t_updateTextNode(domText, expectedText) {\n\t\tconst actualText = domText.data;\n\t\tif (actualText == expectedText) return;\n\t\tif (env.isAndroid && this.isComposing && actualText.replace(/\\u00A0/g, \" \") == expectedText.replace(/\\u00A0/g, \" \")) return;\n\t\tthis._updateTextNodeInternal(domText, expectedText);\n\t}\n\t/**\n\t* Part of the `_updateTextNode` method extracted for easier testing.\n\t*/\n\t_updateTextNodeInternal(domText, expectedText) {\n\t\tconst actions = fastDiff(domText.data, expectedText);\n\t\tfor (const action of actions) if (action.type === \"insert\") domText.insertData(action.index, action.values.join(\"\"));\n\t\telse domText.deleteData(action.index, action.howMany);\n\t}\n\t/**\n\t* Marks text nodes to be synchronized.\n\t*\n\t* If a text node is passed, it will be marked. If an element is passed, all descendant text nodes inside it will be marked.\n\t*\n\t* @param viewNode View node to sync.\n\t*/\n\t_markDescendantTextToSync(viewNode) {\n\t\tif (!viewNode) return;\n\t\tif (viewNode.is(\"$text\")) this.markedTexts.add(viewNode);\n\t\telse if (viewNode.is(\"element\")) for (const child of viewNode.getChildren()) this._markDescendantTextToSync(child);\n\t}\n\t/**\n\t* Checks if the selection needs to be updated and possibly updates it.\n\t*/\n\t_updateSelection() {\n\t\tif (env.isBlink && !env.isAndroid && this.isSelecting && !this.markedChildren.size) return;\n\t\tif (this.selection.rangeCount === 0) {\n\t\t\tthis._removeDomSelection();\n\t\t\tthis._removeFakeSelection();\n\t\t\treturn;\n\t\t}\n\t\tconst domEditable = this.domConverter.mapViewToDom(this.selection.editableElement);\n\t\tif (!this.isFocused || !domEditable) {\n\t\t\tif (!this.selection.isFake && this._fakeSelectionContainer && this._fakeSelectionContainer.isConnected) this._removeFakeSelection();\n\t\t\treturn;\n\t\t}\n\t\tif (this.selection.isFake) this._updateFakeSelection(domEditable);\n\t\telse if (this._fakeSelectionContainer && this._fakeSelectionContainer.isConnected) {\n\t\t\tthis._removeFakeSelection();\n\t\t\tthis._updateDomSelection(domEditable);\n\t\t} else if (!(this.isComposing && env.isAndroid)) this._updateDomSelection(domEditable);\n\t}\n\t/**\n\t* Updates the fake selection.\n\t*\n\t* @param domEditable A valid DOM editable where the fake selection container should be added.\n\t*/\n\t_updateFakeSelection(domEditable) {\n\t\tconst domDocument = domEditable.ownerDocument;\n\t\tif (!this._fakeSelectionContainer) this._fakeSelectionContainer = createFakeSelectionContainer(domDocument);\n\t\tconst container = this._fakeSelectionContainer;\n\t\tthis.domConverter.bindFakeSelection(container, this.selection);\n\t\tif (!this._fakeSelectionNeedsUpdate(domEditable)) return;\n\t\tif (!container.parentElement || container.parentElement != domEditable) domEditable.appendChild(container);\n\t\tcontainer.textContent = this.selection.fakeSelectionLabel || \"\\xA0\";\n\t\tconst domSelection = domDocument.getSelection();\n\t\tconst domRange = domDocument.createRange();\n\t\tdomSelection.removeAllRanges();\n\t\tdomRange.selectNodeContents(container);\n\t\tdomSelection.addRange(domRange);\n\t}\n\t/**\n\t* Updates the DOM selection.\n\t*\n\t* @param domEditable A valid DOM editable where the DOM selection should be rendered.\n\t*/\n\t_updateDomSelection(domEditable) {\n\t\tconst domSelection = domEditable.ownerDocument.defaultView.getSelection();\n\t\tif (!this._domSelectionNeedsUpdate(domSelection)) return;\n\t\tconst anchor = this.domConverter.viewPositionToDom(this.selection.anchor);\n\t\tconst focus = this.domConverter.viewPositionToDom(this.selection.focus);\n\t\tdomSelection.setBaseAndExtent(anchor.parent, anchor.offset, focus.parent, focus.offset);\n\t\tif (env.isGecko) fixGeckoSelectionAfterBr(focus, domSelection);\n\t}\n\t/**\n\t* Checks whether a given DOM selection needs to be updated.\n\t*\n\t* @param domSelection The DOM selection to check.\n\t*/\n\t_domSelectionNeedsUpdate(domSelection) {\n\t\tif (!this.domConverter.isDomSelectionCorrect(domSelection)) return true;\n\t\tconst oldViewSelection = domSelection && this.domConverter.domSelectionToView(domSelection);\n\t\tif (oldViewSelection && this.selection.isEqual(oldViewSelection)) return false;\n\t\tif (!this.selection.isCollapsed && this.selection.isSimilar(oldViewSelection)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Checks whether the fake selection needs to be updated.\n\t*\n\t* @param domEditable A valid DOM editable where a new fake selection container should be added.\n\t*/\n\t_fakeSelectionNeedsUpdate(domEditable) {\n\t\tconst container = this._fakeSelectionContainer;\n\t\tconst domSelection = domEditable.ownerDocument.getSelection();\n\t\tif (!container || container.parentElement !== domEditable) return true;\n\t\tif (domSelection.anchorNode !== container && !container.contains(domSelection.anchorNode)) return true;\n\t\treturn container.textContent !== this.selection.fakeSelectionLabel;\n\t}\n\t/**\n\t* Removes the DOM selection.\n\t*/\n\t_removeDomSelection() {\n\t\tfor (const doc of this.domDocuments) {\n\t\t\tconst domSelection = doc.getSelection();\n\t\t\tif (domSelection.rangeCount) {\n\t\t\t\tconst activeDomElement = doc.activeElement;\n\t\t\t\tconst viewElement = this.domConverter.mapDomToView(activeDomElement);\n\t\t\t\tif (activeDomElement && viewElement) domSelection.removeAllRanges();\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Removes the fake selection.\n\t*/\n\t_removeFakeSelection() {\n\t\tconst container = this._fakeSelectionContainer;\n\t\tif (container) container.remove();\n\t}\n\t/**\n\t* Checks if focus needs to be updated and possibly updates it.\n\t*/\n\t_updateFocus() {\n\t\tif (this.isFocused) {\n\t\t\tconst editable = this.selection.editableElement;\n\t\t\tif (editable) this.domConverter.focus(editable);\n\t\t}\n\t}\n};\n/**\n* Checks if provided element is editable.\n*/\nfunction isEditable(element) {\n\tif (element.getAttribute(\"contenteditable\") == \"false\") return false;\n\tconst parent = element.findAncestor((element) => element.hasAttribute(\"contenteditable\"));\n\treturn !parent || parent.getAttribute(\"contenteditable\") == \"true\";\n}\n/**\n* Adds inline filler at a given position.\n*\n* The position can be given as an array of DOM nodes and an offset in that array,\n* or a DOM parent element and an offset in that element.\n*\n* @returns The DOM text node that contains an inline filler.\n*/\nfunction addInlineFiller(domDocument, domParentOrArray, offset) {\n\tconst childNodes = domParentOrArray instanceof Array ? domParentOrArray : domParentOrArray.childNodes;\n\tconst nodeAfterFiller = childNodes[offset];\n\tif (isText(nodeAfterFiller)) {\n\t\tnodeAfterFiller.data = INLINE_FILLER + nodeAfterFiller.data;\n\t\treturn nodeAfterFiller;\n\t} else {\n\t\tconst fillerNode = domDocument.createTextNode(INLINE_FILLER);\n\t\tif (Array.isArray(domParentOrArray)) childNodes.splice(offset, 0, fillerNode);\n\t\telse insertAt(domParentOrArray, offset, fillerNode);\n\t\treturn fillerNode;\n\t}\n}\n/**\n* Whether two DOM nodes should be considered as similar.\n* Nodes are considered similar if they have the same tag name.\n*/\nfunction areSimilarElements(node1, node2) {\n\treturn isNode(node1) && isNode(node2) && !isText(node1) && !isText(node2) && !isComment(node1) && !isComment(node2) && node1.tagName.toLowerCase() === node2.tagName.toLowerCase();\n}\n/**\n* Whether two DOM nodes are text nodes.\n*/\nfunction areTextNodes(node1, node2) {\n\treturn isNode(node1) && isNode(node2) && isText(node1) && isText(node2);\n}\n/**\n* Whether two dom nodes should be considered as the same.\n* Two nodes which are considered the same are:\n*\n* * Text nodes with the same text.\n* * Element nodes represented by the same object.\n* * Two block filler elements.\n*\n* @param blockFillerMode Block filler mode, see {@link module:engine/view/domconverter~ViewDomConverter#blockFillerMode}.\n*/\nfunction sameNodes$1(domConverter, actualDomChild, expectedDomChild) {\n\tif (actualDomChild === expectedDomChild) return true;\n\telse if (isText(actualDomChild) && isText(expectedDomChild)) return actualDomChild.data === expectedDomChild.data;\n\telse if (domConverter.isBlockFiller(actualDomChild) && domConverter.isBlockFiller(expectedDomChild)) return true;\n\treturn false;\n}\n/**\n* The following is a Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n* When the native DOM selection is at the end of the block and preceded by <br /> e.g.\n*\n* ```html\n* <p>foo<br/>[]</p>\n* ```\n*\n* which happens a lot when using the soft line break, the browser fails to (visually) move the\n* caret to the new line. A quick fix is as simple as force–refreshing the selection with the same range.\n*/\nfunction fixGeckoSelectionAfterBr(focus, domSelection) {\n\tlet parent = focus.parent;\n\tlet offset = focus.offset;\n\tif (isText(parent) && isInlineFiller(parent)) {\n\t\toffset = indexOf(parent) + 1;\n\t\tparent = parent.parentNode;\n\t}\n\tif (parent.nodeType != Node.ELEMENT_NODE || offset != parent.childNodes.length - 1) return;\n\tconst childAtOffset = parent.childNodes[offset];\n\tif (childAtOffset && childAtOffset.tagName == \"BR\") domSelection.addRange(domSelection.getRangeAt(0));\n}\nfunction filterOutFakeSelectionContainer(domChildList, fakeSelectionContainer) {\n\tconst childList = Array.from(domChildList);\n\tif (childList.length == 0 || !fakeSelectionContainer) return childList;\n\tif (childList[childList.length - 1] == fakeSelectionContainer) childList.pop();\n\treturn childList;\n}\n/**\n* Creates a fake selection container for a given document.\n*/\nfunction createFakeSelectionContainer(domDocument) {\n\tconst container = domDocument.createElement(\"div\");\n\tcontainer.className = \"ck-fake-selection-container\";\n\tObject.assign(container.style, {\n\t\tposition: \"fixed\",\n\t\ttop: 0,\n\t\tleft: \"-9999px\",\n\t\twidth: \"42px\"\n\t});\n\tcontainer.textContent = \"\\xA0\";\n\treturn container;\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 engine/view/domconverter\n*/\nconst BR_FILLER_REF = BR_FILLER(global.document);\nconst NBSP_FILLER_REF = NBSP_FILLER(global.document);\nconst MARKED_NBSP_FILLER_REF = MARKED_NBSP_FILLER(global.document);\nconst UNSAFE_ATTRIBUTE_NAME_PREFIX = \"data-ck-unsafe-attribute-\";\nconst UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = \"data-ck-unsafe-element\";\n/**\n* `ViewDomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles\n* {@link module:engine/view/domconverter~ViewDomConverter#bindElements bindings} between these nodes.\n*\n* An instance of the DOM converter is available under\n* {@link module:engine/view/view~EditingView#domConverter `editor.editing.view.domConverter`}.\n*\n* The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~ViewRenderer}), does not keep the\n* state of a tree nor keeps the synchronization between the tree view and\n* the DOM tree (use {@link module:engine/view/document~ViewDocument}).\n*\n* The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.\n* Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.\n*/\nvar ViewDomConverter = class {\n\tdocument;\n\t/**\n\t* Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.\n\t*/\n\trenderingMode;\n\t/**\n\t* The mode of a block filler used by the DOM converter.\n\t*/\n\tblockFillerMode;\n\t/**\n\t* Elements which are considered pre-formatted elements.\n\t*/\n\tpreElements;\n\t/**\n\t* Elements which are considered block elements (and hence should be filled with a\n\t* {@link #isBlockFiller block filler}).\n\t*\n\t* Whether an element is considered a block element also affects handling of trailing whitespaces.\n\t*\n\t* You can extend this array if you introduce support for block elements which are not yet recognized here.\n\t*/\n\tblockElements;\n\t/**\n\t* A list of elements that exist inline (in text) but their inner structure cannot be edited because\n\t* of the way they are rendered by the browser. They are mostly HTML form elements but there are other\n\t* elements such as `<img>` or `<iframe>` that also have non-editable children or no children whatsoever.\n\t*\n\t* Whether an element is considered an inline object has an impact on white space rendering (trimming)\n\t* around (and inside of it). In short, white spaces in text nodes next to inline objects are not trimmed.\n\t*\n\t* You can extend this array if you introduce support for inline object elements which are not yet recognized here.\n\t*/\n\tinlineObjectElements;\n\t/**\n\t* A list of elements which may affect the editing experience. To avoid this, those elements are replaced with\n\t* `<span data-ck-unsafe-element=\"[element name]\"></span>` while rendering in the editing mode.\n\t*/\n\tunsafeElements;\n\t/**\n\t* The DOM Document used by `ViewDomConverter` to create DOM nodes.\n\t*/\n\t_domDocument;\n\t/**\n\t* The DOM-to-view mapping.\n\t*/\n\t_domToViewMapping = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* The view-to-DOM mapping.\n\t*/\n\t_viewToDomMapping = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* Holds the mapping between fake selection containers and corresponding view selections.\n\t*/\n\t_fakeSelectionMapping = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* Matcher for view elements whose content should be treated as raw data\n\t* and not processed during the conversion from DOM nodes to view elements.\n\t*/\n\t_rawContentElementMatcher = new Matcher();\n\t/**\n\t* Matcher for inline object view elements. This is an extension of a simple {@link #inlineObjectElements} array of element names.\n\t*/\n\t_inlineObjectElementMatcher = new Matcher();\n\t/**\n\t* Set of elements with temporary custom properties that require clearing after render.\n\t*/\n\t_elementsWithTemporaryCustomProperties = /* @__PURE__ */ new Set();\n\t/**\n\t* Creates a DOM converter.\n\t*\n\t* @param document The view document instance.\n\t* @param options An object with configuration options.\n\t* @param options.blockFillerMode The type of the block filler to use.\n\t* Default value depends on the options.renderingMode:\n\t*  'nbsp' when options.renderingMode == 'data',\n\t*  'br' when options.renderingMode == 'editing'.\n\t* @param options.renderingMode Whether to leave the View-to-DOM conversion result unchanged\n\t* or improve editing experience by filtering out interactive data.\n\t*/\n\tconstructor(document, { blockFillerMode, renderingMode = \"editing\" } = {}) {\n\t\tthis.document = document;\n\t\tthis.renderingMode = renderingMode;\n\t\tthis.blockFillerMode = blockFillerMode || (renderingMode === \"editing\" ? \"br\" : \"nbsp\");\n\t\tthis.preElements = [\"pre\", \"textarea\"];\n\t\tthis.blockElements = [\n\t\t\t\"address\",\n\t\t\t\"article\",\n\t\t\t\"aside\",\n\t\t\t\"blockquote\",\n\t\t\t\"caption\",\n\t\t\t\"center\",\n\t\t\t\"dd\",\n\t\t\t\"details\",\n\t\t\t\"dir\",\n\t\t\t\"div\",\n\t\t\t\"dl\",\n\t\t\t\"dt\",\n\t\t\t\"fieldset\",\n\t\t\t\"figcaption\",\n\t\t\t\"figure\",\n\t\t\t\"footer\",\n\t\t\t\"form\",\n\t\t\t\"h1\",\n\t\t\t\"h2\",\n\t\t\t\"h3\",\n\t\t\t\"h4\",\n\t\t\t\"h5\",\n\t\t\t\"h6\",\n\t\t\t\"header\",\n\t\t\t\"hgroup\",\n\t\t\t\"legend\",\n\t\t\t\"li\",\n\t\t\t\"main\",\n\t\t\t\"menu\",\n\t\t\t\"nav\",\n\t\t\t\"ol\",\n\t\t\t\"p\",\n\t\t\t\"pre\",\n\t\t\t\"section\",\n\t\t\t\"summary\",\n\t\t\t\"table\",\n\t\t\t\"tbody\",\n\t\t\t\"td\",\n\t\t\t\"tfoot\",\n\t\t\t\"th\",\n\t\t\t\"thead\",\n\t\t\t\"tr\",\n\t\t\t\"ul\"\n\t\t];\n\t\tthis.inlineObjectElements = [\n\t\t\t\"object\",\n\t\t\t\"iframe\",\n\t\t\t\"input\",\n\t\t\t\"button\",\n\t\t\t\"textarea\",\n\t\t\t\"select\",\n\t\t\t\"option\",\n\t\t\t\"video\",\n\t\t\t\"embed\",\n\t\t\t\"audio\",\n\t\t\t\"img\",\n\t\t\t\"canvas\"\n\t\t];\n\t\tthis.unsafeElements = [\"script\", \"style\"];\n\t\tthis._domDocument = this.renderingMode === \"editing\" ? global.document : global.document.implementation.createHTMLDocument(\"\");\n\t}\n\t/**\n\t* The DOM Document used by `ViewDomConverter` to create DOM nodes.\n\t*/\n\tget domDocument() {\n\t\treturn this._domDocument;\n\t}\n\t/**\n\t* Binds a given DOM element that represents fake selection to a **position** of a\n\t* {@link module:engine/view/documentselection~ViewDocumentSelection document selection}.\n\t* Document selection copy is stored and can be retrieved by the\n\t* {@link module:engine/view/domconverter~ViewDomConverter#fakeSelectionToView} method.\n\t*/\n\tbindFakeSelection(domElement, viewDocumentSelection) {\n\t\tthis._fakeSelectionMapping.set(domElement, new ViewSelection(viewDocumentSelection));\n\t}\n\t/**\n\t* Returns a {@link module:engine/view/selection~ViewSelection view selection} instance corresponding to a given\n\t* DOM element that represents fake selection. Returns `undefined` if binding to the given DOM element does not exist.\n\t*/\n\tfakeSelectionToView(domElement) {\n\t\treturn this._fakeSelectionMapping.get(domElement);\n\t}\n\t/**\n\t* Binds DOM and view elements, so it will be possible to get corresponding elements using\n\t* {@link module:engine/view/domconverter~ViewDomConverter#mapDomToView} and\n\t* {@link module:engine/view/domconverter~ViewDomConverter#mapViewToDom}.\n\t*\n\t* @param domElement The DOM element to bind.\n\t* @param viewElement The view element to bind.\n\t*/\n\tbindElements(domElement, viewElement) {\n\t\tthis._domToViewMapping.set(domElement, viewElement);\n\t\tthis._viewToDomMapping.set(viewElement, domElement);\n\t}\n\t/**\n\t* Unbinds a given DOM element from the view element it was bound to. Unbinding is deep, meaning that all children of\n\t* the DOM element will be unbound too.\n\t*\n\t* @param domElement The DOM element to unbind.\n\t*/\n\tunbindDomElement(domElement) {\n\t\tconst viewElement = this._domToViewMapping.get(domElement);\n\t\tif (viewElement) {\n\t\t\tthis._domToViewMapping.delete(domElement);\n\t\t\tthis._viewToDomMapping.delete(viewElement);\n\t\t\tfor (const child of domElement.children) this.unbindDomElement(child);\n\t\t}\n\t}\n\t/**\n\t* Binds DOM and view document fragments, so it will be possible to get corresponding document fragments using\n\t* {@link module:engine/view/domconverter~ViewDomConverter#mapDomToView} and\n\t* {@link module:engine/view/domconverter~ViewDomConverter#mapViewToDom}.\n\t*\n\t* @param domFragment The DOM document fragment to bind.\n\t* @param viewFragment The view document fragment to bind.\n\t*/\n\tbindDocumentFragments(domFragment, viewFragment) {\n\t\tthis._domToViewMapping.set(domFragment, viewFragment);\n\t\tthis._viewToDomMapping.set(viewFragment, domFragment);\n\t}\n\t/**\n\t* Decides whether a given pair of attribute key and value should be passed further down the pipeline.\n\t*\n\t* @param elementName Element name in lower case.\n\t*/\n\tshouldRenderAttribute(attributeKey, attributeValue, elementName) {\n\t\tif (this.renderingMode === \"data\") return true;\n\t\tattributeKey = attributeKey.toLowerCase();\n\t\tif (attributeKey.startsWith(\"on\")) return false;\n\t\tif (attributeKey === \"srcdoc\") return false;\n\t\tif (elementName === \"img\" && (attributeKey === \"src\" || attributeKey === \"srcset\")) return true;\n\t\tif (elementName === \"source\" && attributeKey === \"srcset\") return true;\n\t\tattributeValue = attributeValue.replace(/[\\s\\u0000-\\u0020]+/g, \"\");\n\t\tif (attributeValue.match(/^javascript:/i)) return false;\n\t\tif (attributeValue.match(/^data:/i)) {\n\t\t\tconst isImage = attributeValue.match(/^data:image\\/(png|jpeg|jpg|gif|webp|avif|bmp|x-icon|vnd\\.microsoft\\.icon|apng|tiff|heic|heif|jxl)($|[;,])/i);\n\t\t\tconst isMedia = attributeValue.match(/^data:(audio|video)\\/(mp4|mpeg|mp3|ogg|webm|wav|x-wav|aac|flac|quicktime|3gpp)($|[;,])/i);\n\t\t\tif (!isImage && !isMedia) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Set `domElement`'s content using provided `html` argument. Apply necessary filtering for the editing pipeline.\n\t*\n\t* @param domElement DOM element that should have `html` set as its content.\n\t* @param html Textual representation of the HTML that will be set on `domElement`.\n\t*/\n\tsetContentOf(domElement, html) {\n\t\tif (this.renderingMode === \"data\") {\n\t\t\tdomElement.innerHTML = html;\n\t\t\treturn;\n\t\t}\n\t\tconst document = new DOMParser().parseFromString(html, \"text/html\");\n\t\tconst fragment = document.createDocumentFragment();\n\t\tconst bodyChildNodes = document.body.childNodes;\n\t\twhile (bodyChildNodes.length > 0) fragment.appendChild(bodyChildNodes[0]);\n\t\tconst treeWalker = document.createTreeWalker(fragment, NodeFilter.SHOW_ELEMENT);\n\t\tconst nodes = [];\n\t\tlet currentNode;\n\t\twhile (currentNode = treeWalker.nextNode()) nodes.push(currentNode);\n\t\tfor (const currentNode of nodes) {\n\t\t\tfor (const attributeName of currentNode.getAttributeNames()) this.setDomElementAttribute(currentNode, attributeName, currentNode.getAttribute(attributeName));\n\t\t\tconst elementName = currentNode.tagName.toLowerCase();\n\t\t\tif (this._shouldRenameElement(elementName)) {\n\t\t\t\t_logUnsafeElement(elementName);\n\t\t\t\tcurrentNode.replaceWith(this._createReplacementDomElement(elementName, currentNode));\n\t\t\t}\n\t\t}\n\t\twhile (domElement.firstChild) domElement.firstChild.remove();\n\t\tdomElement.append(fragment);\n\t}\n\t/**\n\t* Converts the view to the DOM. For all text nodes, not bound elements and document fragments new items will\n\t* be created. For bound elements and document fragments the method will return corresponding items.\n\t*\n\t* @param viewNode View node or document fragment to transform.\n\t* @param options Conversion options.\n\t* @param options.bind Determines whether new elements will be bound.\n\t* @param options.withChildren If `false`, node's and document fragment's children will not be converted.\n\t* @returns Converted node or DocumentFragment.\n\t*/\n\tviewToDom(viewNode, options = {}) {\n\t\tif (viewNode.is(\"$text\")) {\n\t\t\tconst textData = this._processDataFromViewText(viewNode);\n\t\t\treturn this._domDocument.createTextNode(textData);\n\t\t} else {\n\t\t\tconst viewElementOrFragment = viewNode;\n\t\t\tif (this.mapViewToDom(viewElementOrFragment)) {\n\t\t\t\tif (viewElementOrFragment.getCustomProperty(\"editingPipeline:doNotReuseOnce\")) this._elementsWithTemporaryCustomProperties.add(viewElementOrFragment);\n\t\t\t\telse return this.mapViewToDom(viewElementOrFragment);\n\t\t\t}\n\t\t\tlet domElement;\n\t\t\tif (viewElementOrFragment.is(\"documentFragment\")) {\n\t\t\t\tdomElement = this._domDocument.createDocumentFragment();\n\t\t\t\tif (options.bind) this.bindDocumentFragments(domElement, viewElementOrFragment);\n\t\t\t} else if (viewElementOrFragment.is(\"uiElement\")) {\n\t\t\t\tif (viewElementOrFragment.name === \"$comment\") domElement = this._domDocument.createComment(viewElementOrFragment.getCustomProperty(\"$rawContent\"));\n\t\t\t\telse domElement = viewElementOrFragment.render(this._domDocument, this);\n\t\t\t\tif (options.bind) this.bindElements(domElement, viewElementOrFragment);\n\t\t\t\treturn domElement;\n\t\t\t} else {\n\t\t\t\tif (this._shouldRenameElement(viewElementOrFragment.name)) {\n\t\t\t\t\t_logUnsafeElement(viewElementOrFragment.name);\n\t\t\t\t\tdomElement = this._createReplacementDomElement(viewElementOrFragment.name);\n\t\t\t\t} else if (viewElementOrFragment.hasAttribute(\"xmlns\")) domElement = this._domDocument.createElementNS(viewElementOrFragment.getAttribute(\"xmlns\"), viewElementOrFragment.name);\n\t\t\t\telse domElement = this._domDocument.createElement(viewElementOrFragment.name);\n\t\t\t\tif (viewElementOrFragment.is(\"rawElement\")) viewElementOrFragment.render(domElement, this);\n\t\t\t\tif (options.bind) this.bindElements(domElement, viewElementOrFragment);\n\t\t\t\tfor (const key of viewElementOrFragment.getAttributeKeys()) this.setDomElementAttribute(domElement, key, viewElementOrFragment.getAttribute(key), viewElementOrFragment);\n\t\t\t}\n\t\t\tif (options.withChildren !== false) for (const child of this.viewChildrenToDom(viewElementOrFragment, options)) if (domElement instanceof HTMLTemplateElement) domElement.content.appendChild(child);\n\t\t\telse domElement.appendChild(child);\n\t\t\treturn domElement;\n\t\t}\n\t}\n\t/**\n\t* Sets the attribute on a DOM element.\n\t*\n\t* **Note**: To remove the attribute, use {@link #removeDomElementAttribute}.\n\t*\n\t* @param domElement The DOM element the attribute should be set on.\n\t* @param key The name of the attribute.\n\t* @param value The value of the attribute.\n\t* @param relatedViewElement The view element related to the `domElement` (if there is any).\n\t* It helps decide whether the attribute set is unsafe. For instance, view elements created via the\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter} methods can allow certain attributes\n\t* that would normally be filtered out.\n\t*/\n\tsetDomElementAttribute(domElement, key, value, relatedViewElement) {\n\t\tconst shouldRenderAttribute = this.shouldRenderAttribute(key, value, domElement.tagName.toLowerCase()) || relatedViewElement && relatedViewElement.shouldRenderUnsafeAttribute(key);\n\t\tif (!shouldRenderAttribute) logWarning(\"domconverter-unsafe-attribute-detected\", {\n\t\t\tdomElement,\n\t\t\tkey,\n\t\t\tvalue\n\t\t});\n\t\tif (!isValidAttributeName(key)) {\n\t\t\t/**\n\t\t\t* Invalid attribute name was ignored during rendering.\n\t\t\t*\n\t\t\t* @error domconverter-invalid-attribute-detected\n\t\t\t*/\n\t\t\tlogWarning(\"domconverter-invalid-attribute-detected\", {\n\t\t\t\tdomElement,\n\t\t\t\tkey,\n\t\t\t\tvalue\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (domElement.hasAttribute(key) && !shouldRenderAttribute) domElement.removeAttribute(key);\n\t\telse if (domElement.hasAttribute(UNSAFE_ATTRIBUTE_NAME_PREFIX + key) && shouldRenderAttribute) domElement.removeAttribute(UNSAFE_ATTRIBUTE_NAME_PREFIX + key);\n\t\tdomElement.setAttribute(shouldRenderAttribute ? key : UNSAFE_ATTRIBUTE_NAME_PREFIX + key, value);\n\t}\n\t/**\n\t* Removes an attribute from a DOM element.\n\t*\n\t* **Note**: To set the attribute, use {@link #setDomElementAttribute}.\n\t*\n\t* @param domElement The DOM element the attribute should be removed from.\n\t* @param key The name of the attribute.\n\t*/\n\tremoveDomElementAttribute(domElement, key) {\n\t\tif (key == UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE) return;\n\t\tdomElement.removeAttribute(key);\n\t\tdomElement.removeAttribute(UNSAFE_ATTRIBUTE_NAME_PREFIX + key);\n\t}\n\t/**\n\t* Converts children of the view element to DOM using the\n\t* {@link module:engine/view/domconverter~ViewDomConverter#viewToDom} method.\n\t* Additionally, this method adds block {@link module:engine/view/filler filler} to the list of children, if needed.\n\t*\n\t* @param viewElement Parent view element.\n\t* @param options See {@link module:engine/view/domconverter~ViewDomConverter#viewToDom} options parameter.\n\t* @returns DOM nodes.\n\t*/\n\t*viewChildrenToDom(viewElement, options = {}) {\n\t\tconst fillerPositionOffset = viewElement.getFillerOffset && viewElement.getFillerOffset();\n\t\tlet offset = 0;\n\t\tfor (const childView of viewElement.getChildren()) {\n\t\t\tif (fillerPositionOffset === offset) yield this._getBlockFiller();\n\t\t\tconst transparentRendering = childView.is(\"element\") && !!childView.getCustomProperty(\"dataPipeline:transparentRendering\") && !first(childView.getAttributes());\n\t\t\tif (transparentRendering && this.renderingMode == \"data\") {\n\t\t\t\tif (childView.is(\"rawElement\")) {\n\t\t\t\t\tconst tempElement = this._domDocument.createElement(childView.name);\n\t\t\t\t\tchildView.render(tempElement, this);\n\t\t\t\t\tyield* [...tempElement.childNodes];\n\t\t\t\t} else yield* this.viewChildrenToDom(childView, options);\n\t\t\t} else {\n\t\t\t\tif (transparentRendering)\n /**\n\t\t\t\t* The `dataPipeline:transparentRendering` flag is supported only in the data pipeline.\n\t\t\t\t*\n\t\t\t\t* @error domconverter-transparent-rendering-unsupported-in-editing-pipeline\n\t\t\t\t*/\n\t\t\t\tlogWarning(\"domconverter-transparent-rendering-unsupported-in-editing-pipeline\", { viewElement: childView });\n\t\t\t\tyield this.viewToDom(childView, options);\n\t\t\t}\n\t\t\toffset++;\n\t\t}\n\t\tif (fillerPositionOffset === offset) yield this._getBlockFiller();\n\t}\n\t/**\n\t* Converts view {@link module:engine/view/range~ViewRange} to DOM range.\n\t* Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t*\n\t* @param viewRange View range.\n\t* @returns DOM range.\n\t*/\n\tviewRangeToDom(viewRange) {\n\t\tconst domStart = this.viewPositionToDom(viewRange.start);\n\t\tconst domEnd = this.viewPositionToDom(viewRange.end);\n\t\tconst domRange = this._domDocument.createRange();\n\t\tdomRange.setStart(domStart.parent, domStart.offset);\n\t\tdomRange.setEnd(domEnd.parent, domEnd.offset);\n\t\treturn domRange;\n\t}\n\t/**\n\t* Converts view {@link module:engine/view/position~ViewPosition} to DOM parent and offset.\n\t*\n\t* Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t* If the converted position is directly before inline filler it is moved inside the filler.\n\t*\n\t* @param viewPosition View position.\n\t* @returns DOM position or `null` if view position could not be converted to DOM.\n\t* DOM position has two properties:\n\t* * `parent` - DOM position parent.\n\t* * `offset` - DOM position offset.\n\t*/\n\tviewPositionToDom(viewPosition) {\n\t\tconst viewParent = viewPosition.parent;\n\t\tif (viewParent.is(\"$text\")) {\n\t\t\tconst domParent = this.findCorrespondingDomText(viewParent);\n\t\t\tif (!domParent) return null;\n\t\t\tlet offset = viewPosition.offset;\n\t\t\tif (startsWithFiller(domParent)) offset += 7;\n\t\t\tif (domParent.data && offset > domParent.data.length) offset = domParent.data.length;\n\t\t\treturn {\n\t\t\t\tparent: domParent,\n\t\t\t\toffset\n\t\t\t};\n\t\t} else {\n\t\t\tlet domParent, domBefore, domAfter;\n\t\t\tif (viewPosition.offset === 0) {\n\t\t\t\tdomParent = this.mapViewToDom(viewParent);\n\t\t\t\tif (!domParent) return null;\n\t\t\t\tdomAfter = domParent.childNodes[0];\n\t\t\t} else {\n\t\t\t\tconst nodeBefore = viewPosition.nodeBefore;\n\t\t\t\tdomBefore = nodeBefore.is(\"$text\") ? this.findCorrespondingDomText(nodeBefore) : this.mapViewToDom(nodeBefore);\n\t\t\t\tif (!domBefore) return null;\n\t\t\t\tdomParent = domBefore.parentNode;\n\t\t\t\tdomAfter = domBefore.nextSibling;\n\t\t\t}\n\t\t\tif (isText(domAfter) && startsWithFiller(domAfter)) return {\n\t\t\t\tparent: domAfter,\n\t\t\t\toffset: 7\n\t\t\t};\n\t\t\tconst offset = domBefore ? indexOf(domBefore) + 1 : 0;\n\t\t\treturn {\n\t\t\t\tparent: domParent,\n\t\t\t\toffset\n\t\t\t};\n\t\t}\n\t}\n\t/**\n\t* Converts DOM to view. For all text nodes, not bound elements and document fragments new items will\n\t* be created. For bound elements and document fragments function will return corresponding items. For\n\t* {@link module:engine/view/filler fillers} `null` will be returned.\n\t* For all DOM elements rendered by {@link module:engine/view/uielement~ViewUIElement} that UIElement will be returned.\n\t*\n\t* @param domNode DOM node or document fragment to transform.\n\t* @param options Conversion options.\n\t* @param options.bind Determines whether new elements will be bound. False by default.\n\t* @param options.withChildren If `true`, node's and document fragment's children will be converted too. True by default.\n\t* @param options.keepOriginalCase If `false`, node's tag name will be converted to lower case. False by default.\n\t* @param options.skipComments If `false`, comment nodes will be converted to `$comment`\n\t* {@link module:engine/view/uielement~ViewUIElement view UI elements}. False by default.\n\t* @returns Converted node or document fragment or `null` if DOM node is a {@link module:engine/view/filler filler}\n\t* or the given node is an empty text node.\n\t*/\n\tdomToView(domNode, options = {}) {\n\t\tconst inlineNodes = [];\n\t\tconst generator = this._domToView(domNode, options, inlineNodes);\n\t\tconst node = generator.next().value;\n\t\tif (!node) return null;\n\t\tgenerator.next();\n\t\tthis._processDomInlineNodes(null, inlineNodes, options);\n\t\tif (this.blockFillerMode == \"br\" && isViewBrFiller(node)) return null;\n\t\tif (node.is(\"$text\") && node.data.length == 0) return null;\n\t\treturn node;\n\t}\n\t/**\n\t* Converts children of the DOM element to view nodes using\n\t* the {@link module:engine/view/domconverter~ViewDomConverter#domToView} method.\n\t* Additionally this method omits block {@link module:engine/view/filler filler}, if it exists in the DOM parent.\n\t*\n\t* @param domElement Parent DOM element.\n\t* @param options See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.\n\t* @param inlineNodes An array that will be populated with inline nodes. It's used internally for whitespace processing.\n\t* @returns View nodes.\n\t*/\n\t*domChildrenToView(domElement, options = {}, inlineNodes = []) {\n\t\tlet childNodes;\n\t\tif (domElement instanceof HTMLTemplateElement) childNodes = [...domElement.content.childNodes];\n\t\telse childNodes = [...domElement.childNodes];\n\t\tfor (let i = 0; i < childNodes.length; i++) {\n\t\t\tconst domChild = childNodes[i];\n\t\t\tconst generator = this._domToView(domChild, options, inlineNodes);\n\t\t\tconst viewChild = generator.next().value;\n\t\t\tif (viewChild !== null) {\n\t\t\t\tif (this._isBlockViewElement(viewChild)) this._processDomInlineNodes(domElement, inlineNodes, options);\n\t\t\t\tif (!(this.blockFillerMode == \"br\" && isViewBrFiller(viewChild))) yield viewChild;\n\t\t\t\tgenerator.next();\n\t\t\t}\n\t\t}\n\t\tthis._processDomInlineNodes(domElement, inlineNodes, options);\n\t}\n\t/**\n\t* Converts DOM selection to view {@link module:engine/view/selection~ViewSelection}.\n\t* Ranges which cannot be converted will be omitted.\n\t*\n\t* @param domSelection DOM selection.\n\t* @returns View selection.\n\t*/\n\tdomSelectionToView(domSelection) {\n\t\tif (isGeckoRestrictedDomSelection(domSelection)) return new ViewSelection([]);\n\t\tif (domSelection.rangeCount === 1) {\n\t\t\tlet container = domSelection.getRangeAt(0).startContainer;\n\t\t\tif (isText(container)) container = container.parentNode;\n\t\t\tconst viewSelection = this.fakeSelectionToView(container);\n\t\t\tif (viewSelection) return viewSelection;\n\t\t}\n\t\tconst isBackward = this.isDomSelectionBackward(domSelection);\n\t\tconst viewRanges = [];\n\t\tfor (let i = 0; i < domSelection.rangeCount; i++) {\n\t\t\tconst domRange = domSelection.getRangeAt(i);\n\t\t\tconst viewRange = this.domRangeToView(domRange);\n\t\t\tif (viewRange) viewRanges.push(viewRange);\n\t\t}\n\t\treturn new ViewSelection(viewRanges, { backward: isBackward });\n\t}\n\t/**\n\t* Converts DOM Range to view {@link module:engine/view/range~ViewRange}.\n\t* If the start or end position cannot be converted `null` is returned.\n\t*\n\t* @param domRange DOM range.\n\t* @returns View range.\n\t*/\n\tdomRangeToView(domRange) {\n\t\tconst viewStart = this.domPositionToView(domRange.startContainer, domRange.startOffset);\n\t\tconst viewEnd = this.domPositionToView(domRange.endContainer, domRange.endOffset);\n\t\tif (viewStart && viewEnd) return new ViewRange(viewStart, viewEnd);\n\t\treturn null;\n\t}\n\t/**\n\t* Converts DOM parent and offset to view {@link module:engine/view/position~ViewPosition}.\n\t*\n\t* If the position is inside a {@link module:engine/view/filler filler} which has no corresponding view node,\n\t* position of the filler will be converted and returned.\n\t*\n\t* If the position is inside DOM element rendered by {@link module:engine/view/uielement~ViewUIElement}\n\t* that position will be converted to view position before that UIElement.\n\t*\n\t* If structures are too different and it is not possible to find corresponding position then `null` will be returned.\n\t*\n\t* @param domParent DOM position parent.\n\t* @param domOffset DOM position offset. You can skip it when converting the inline filler node.\n\t* @returns View position.\n\t*/\n\tdomPositionToView(domParent, domOffset = 0) {\n\t\tif (this.isBlockFiller(domParent)) return this.domPositionToView(domParent.parentNode, indexOf(domParent));\n\t\tconst viewElement = this.mapDomToView(domParent);\n\t\tif (viewElement && (viewElement.is(\"uiElement\") || viewElement.is(\"rawElement\"))) return ViewPosition._createBefore(viewElement);\n\t\tif (isText(domParent)) {\n\t\t\tif (isInlineFiller(domParent)) return this.domPositionToView(domParent.parentNode, indexOf(domParent));\n\t\t\tconst viewParent = this.findCorrespondingViewText(domParent);\n\t\t\tlet offset = domOffset;\n\t\t\tif (!viewParent) return null;\n\t\t\tif (startsWithFiller(domParent)) {\n\t\t\t\toffset -= 7;\n\t\t\t\toffset = offset < 0 ? 0 : offset;\n\t\t\t}\n\t\t\treturn new ViewPosition(viewParent, offset);\n\t\t} else {\n\t\t\tif (domOffset === 0) {\n\t\t\t\tconst viewParent = this.mapDomToView(domParent);\n\t\t\t\tif (viewParent) return new ViewPosition(viewParent, 0);\n\t\t\t} else {\n\t\t\t\tconst domBefore = domParent.childNodes[domOffset - 1];\n\t\t\t\tif (isText(domBefore) && isInlineFiller(domBefore) || domBefore && this.isBlockFiller(domBefore)) return this.domPositionToView(domBefore.parentNode, indexOf(domBefore));\n\t\t\t\tconst viewBefore = isText(domBefore) ? this.findCorrespondingViewText(domBefore) : this.mapDomToView(domBefore);\n\t\t\t\tif (viewBefore && viewBefore.parent) return new ViewPosition(viewBefore.parent, viewBefore.index + 1);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}\n\t/**\n\t* Returns corresponding view {@link module:engine/view/element~ViewElement Element} or\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment} for provided DOM element or\n\t* document fragment. If there is no view item {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}\n\t* to the given DOM - `undefined` is returned.\n\t*\n\t* For all DOM elements rendered by a {@link module:engine/view/uielement~ViewUIElement} or\n\t* a {@link module:engine/view/rawelement~ViewRawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t*\n\t* @param domElementOrDocumentFragment DOM element or document fragment.\n\t* @returns Corresponding view element, document fragment or `undefined` if no element was bound.\n\t*/\n\tmapDomToView(domElementOrDocumentFragment) {\n\t\treturn this.getHostViewElement(domElementOrDocumentFragment) || this._domToViewMapping.get(domElementOrDocumentFragment);\n\t}\n\t/**\n\t* Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound},\n\t* corresponding text node is returned based on the sibling or parent.\n\t*\n\t* If the directly previous sibling is a {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound} element, it is used\n\t* to find the corresponding text node.\n\t*\n\t* If this is a first child in the parent and the parent is a\n\t* {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}\n\t* element, it is used to find the corresponding text node.\n\t*\n\t* For all text nodes rendered by a {@link module:engine/view/uielement~ViewUIElement} or\n\t* a {@link module:engine/view/rawelement~ViewRawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t*\n\t* Otherwise `null` is returned.\n\t*\n\t* Note that for the block or inline {@link module:engine/view/filler filler} this method returns `null`.\n\t*\n\t* @param domText DOM text node.\n\t* @returns Corresponding view text node or `null`, if it was not possible to find a corresponding node.\n\t*/\n\tfindCorrespondingViewText(domText) {\n\t\tif (isInlineFiller(domText)) return null;\n\t\tconst hostElement = this.getHostViewElement(domText);\n\t\tif (hostElement) return hostElement;\n\t\tconst previousSibling = domText.previousSibling;\n\t\tif (previousSibling) {\n\t\t\tif (!this.isElement(previousSibling)) return null;\n\t\t\tconst viewElement = this.mapDomToView(previousSibling);\n\t\t\tif (viewElement) {\n\t\t\t\tconst nextSibling = viewElement.nextSibling;\n\t\t\t\tif (nextSibling instanceof ViewText) return nextSibling;\n\t\t\t\telse return null;\n\t\t\t}\n\t\t} else {\n\t\t\tconst viewElement = this.mapDomToView(domText.parentNode);\n\t\t\tif (viewElement) {\n\t\t\t\tconst firstChild = viewElement.getChild(0);\n\t\t\t\tif (firstChild instanceof ViewText) return firstChild;\n\t\t\t\telse return null;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\tmapViewToDom(documentFragmentOrElement) {\n\t\treturn this._viewToDomMapping.get(documentFragmentOrElement);\n\t}\n\t/**\n\t* Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound},\n\t* corresponding text node is returned based on the sibling or parent.\n\t*\n\t* If the directly previous sibling is a {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound} element, it is used\n\t* to find the corresponding text node.\n\t*\n\t* If this is a first child in the parent and the parent is a\n\t* {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}\n\t* element, it is used to find the corresponding text node.\n\t*\n\t* Otherwise `null` is returned.\n\t*\n\t* @param viewText View text node.\n\t* @returns Corresponding DOM text node or `null`, if it was not possible to find a corresponding node.\n\t*/\n\tfindCorrespondingDomText(viewText) {\n\t\tconst previousSibling = viewText.previousSibling;\n\t\tif (previousSibling && this.mapViewToDom(previousSibling)) return this.mapViewToDom(previousSibling).nextSibling;\n\t\tif (!previousSibling && viewText.parent && this.mapViewToDom(viewText.parent)) return this.mapViewToDom(viewText.parent).childNodes[0];\n\t\treturn null;\n\t}\n\t/**\n\t* Focuses DOM editable that is corresponding to provided {@link module:engine/view/editableelement~ViewEditableElement}.\n\t*/\n\tfocus(viewEditable) {\n\t\tconst domEditable = this.mapViewToDom(viewEditable);\n\t\tif (!domEditable || domEditable.ownerDocument.activeElement === domEditable) return;\n\t\tconst { scrollX, scrollY } = global.window;\n\t\tconst scrollPositions = [];\n\t\tforEachDomElementAncestor(domEditable, (node) => {\n\t\t\tconst { scrollLeft, scrollTop } = node;\n\t\t\tscrollPositions.push([scrollLeft, scrollTop]);\n\t\t});\n\t\tdomEditable.focus({ preventScroll: true });\n\t\tforEachDomElementAncestor(domEditable, (node) => {\n\t\t\tconst [scrollLeft, scrollTop] = scrollPositions.shift();\n\t\t\tnode.scrollLeft = scrollLeft;\n\t\t\tnode.scrollTop = scrollTop;\n\t\t});\n\t\tglobal.window.scrollTo(scrollX, scrollY);\n\t}\n\t/**\n\t* Remove DOM selection from blurred editable, so it won't interfere with clicking on dropdowns (especially on iOS).\n\t*\n\t* @internal\n\t*/\n\t_clearDomSelection() {\n\t\tconst domEditable = this.mapViewToDom(this.document.selection.editableElement);\n\t\tif (!domEditable) return;\n\t\tconst domSelection = domEditable.ownerDocument.defaultView.getSelection();\n\t\tconst newViewSelection = this.domSelectionToView(domSelection);\n\t\tif (newViewSelection && newViewSelection.rangeCount > 0) domSelection.removeAllRanges();\n\t}\n\t/**\n\t* Returns `true` when `node.nodeType` equals `Node.ELEMENT_NODE`.\n\t*\n\t* @param node Node to check.\n\t*/\n\tisElement(node) {\n\t\treturn node && node.nodeType == Node.ELEMENT_NODE;\n\t}\n\t/**\n\t* Returns `true` when `node.nodeType` equals `Node.DOCUMENT_FRAGMENT_NODE`.\n\t*\n\t* @param node Node to check.\n\t*/\n\tisDocumentFragment(node) {\n\t\treturn node && node.nodeType == Node.DOCUMENT_FRAGMENT_NODE;\n\t}\n\t/**\n\t* Checks if the node is an instance of the block filler for this DOM converter.\n\t*\n\t* ```ts\n\t* const converter = new ViewDomConverter( viewDocument, { blockFillerMode: 'br' } );\n\t*\n\t* converter.isBlockFiller( BR_FILLER( document ) ); // true\n\t* converter.isBlockFiller( NBSP_FILLER( document ) ); // false\n\t* ```\n\t*\n\t* **Note:**: For the `'nbsp'` mode the method also checks context of a node so it cannot be a detached node.\n\t*\n\t* **Note:** A special case in the `'nbsp'` mode exists where the `<br>` in `<p><br></p>` is treated as a block filler.\n\t*\n\t* @param domNode DOM node to check.\n\t* @returns True if a node is considered a block filler for given mode.\n\t*/\n\tisBlockFiller(domNode) {\n\t\tif (this.blockFillerMode == \"br\") return domNode.isEqualNode(BR_FILLER_REF);\n\t\tif (isOnlyBrInBlock(domNode, this.blockElements)) return true;\n\t\treturn domNode.isEqualNode(MARKED_NBSP_FILLER_REF) || isNbspBlockFiller(domNode, this.blockElements);\n\t}\n\t/**\n\t* Returns `true` if given selection is a backward selection, that is, if it's `focus` is before `anchor`.\n\t*\n\t* @param selection Selection instance to check.\n\t*/\n\tisDomSelectionBackward(selection) {\n\t\tif (selection.isCollapsed) return false;\n\t\tconst range = this._domDocument.createRange();\n\t\ttry {\n\t\t\trange.setStart(selection.anchorNode, selection.anchorOffset);\n\t\t\trange.setEnd(selection.focusNode, selection.focusOffset);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t\tconst backward = range.collapsed;\n\t\trange.detach();\n\t\treturn backward;\n\t}\n\t/**\n\t* Returns a parent {@link module:engine/view/uielement~ViewUIElement} or {@link module:engine/view/rawelement~ViewRawElement}\n\t* that hosts the provided DOM node. Returns `null` if there is no such parent.\n\t*/\n\tgetHostViewElement(domNode) {\n\t\tconst ancestors = getAncestors(domNode);\n\t\tancestors.pop();\n\t\twhile (ancestors.length) {\n\t\t\tconst domNode = ancestors.pop();\n\t\t\tconst viewNode = this._domToViewMapping.get(domNode);\n\t\t\tif (viewNode && (viewNode.is(\"uiElement\") || viewNode.is(\"rawElement\"))) return viewNode;\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Checks if the given selection's boundaries are at correct places.\n\t*\n\t* The following places are considered as incorrect for selection boundaries:\n\t*\n\t* * before or in the middle of an inline filler sequence,\n\t* * inside a DOM element which represents {@link module:engine/view/uielement~ViewUIElement a view UI element},\n\t* * inside a DOM element which represents {@link module:engine/view/rawelement~ViewRawElement a view raw element}.\n\t*\n\t* @param domSelection The DOM selection object to be checked.\n\t* @returns `true` if the given selection is at a correct place, `false` otherwise.\n\t*/\n\tisDomSelectionCorrect(domSelection) {\n\t\treturn this._isDomSelectionPositionCorrect(domSelection.anchorNode, domSelection.anchorOffset) && this._isDomSelectionPositionCorrect(domSelection.focusNode, domSelection.focusOffset);\n\t}\n\t/**\n\t* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t* and not processed during the conversion from DOM nodes to view elements.\n\t*\n\t* This is affecting how {@link module:engine/view/domconverter~ViewDomConverter#domToView} and\n\t* {@link module:engine/view/domconverter~ViewDomConverter#domChildrenToView} process DOM nodes.\n\t*\n\t* The raw data can be later accessed by a\n\t* {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t*\n\t* @param pattern Pattern matching a view element whose content should\n\t* be treated as raw data.\n\t*/\n\tregisterRawContentMatcher(pattern) {\n\t\tthis._rawContentElementMatcher.add(pattern);\n\t}\n\t/**\n\t* Registers a {@link module:engine/view/matcher~MatcherPattern} for inline object view elements.\n\t*\n\t* This is affecting how {@link module:engine/view/domconverter~ViewDomConverter#domToView} and\n\t* {@link module:engine/view/domconverter~ViewDomConverter#domChildrenToView} process DOM nodes.\n\t*\n\t* This is an extension of a simple {@link #inlineObjectElements} array of element names.\n\t*\n\t* @param pattern Pattern matching a view element which should be treated as an inline object.\n\t*/\n\tregisterInlineObjectMatcher(pattern) {\n\t\tthis._inlineObjectElementMatcher.add(pattern);\n\t}\n\t/**\n\t* Clear temporary custom properties.\n\t*\n\t* @internal\n\t*/\n\t_clearTemporaryCustomProperties() {\n\t\tfor (const element of this._elementsWithTemporaryCustomProperties) element._removeCustomProperty(\"editingPipeline:doNotReuseOnce\");\n\t\tthis._elementsWithTemporaryCustomProperties.clear();\n\t}\n\t/**\n\t* Returns the block {@link module:engine/view/filler filler} node based on the current {@link #blockFillerMode} setting.\n\t*/\n\t_getBlockFiller() {\n\t\tswitch (this.blockFillerMode) {\n\t\t\tcase \"nbsp\": return NBSP_FILLER(this._domDocument);\n\t\t\tcase \"markedNbsp\": return MARKED_NBSP_FILLER(this._domDocument);\n\t\t\tcase \"br\": return BR_FILLER(this._domDocument);\n\t\t}\n\t}\n\t/**\n\t* Checks if the given DOM position is a correct place for selection boundary. See {@link #isDomSelectionCorrect}.\n\t*\n\t* @param domParent Position parent.\n\t* @param offset Position offset.\n\t* @returns `true` if given position is at a correct place for selection boundary, `false` otherwise.\n\t*/\n\t_isDomSelectionPositionCorrect(domParent, offset) {\n\t\tif (isText(domParent) && startsWithFiller(domParent) && offset < 7) return false;\n\t\tif (this.isElement(domParent) && startsWithFiller(domParent.childNodes[offset])) return false;\n\t\tconst viewParent = this.mapDomToView(domParent);\n\t\tif (viewParent && (viewParent.is(\"uiElement\") || viewParent.is(\"rawElement\"))) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Internal generator for {@link #domToView}. Also used by {@link #domChildrenToView}.\n\t* Separates DOM nodes conversion from whitespaces processing.\n\t*\n\t* @param domNode DOM node or document fragment to transform.\n\t* @param inlineNodes An array of recently encountered inline nodes truncated to the block element boundaries.\n\t* Used later to process whitespaces.\n\t*/\n\t*_domToView(domNode, options, inlineNodes) {\n\t\tif (this.blockFillerMode != \"br\" && isOnlyBrInBlock(domNode, this.blockElements)) return null;\n\t\tconst hostElement = this.getHostViewElement(domNode);\n\t\tif (hostElement) return hostElement;\n\t\tif (isComment(domNode) && options.skipComments) return null;\n\t\tif (isText(domNode)) {\n\t\t\tif (isInlineFiller(domNode)) return null;\n\t\t\telse {\n\t\t\t\tconst textData = domNode.data;\n\t\t\t\tif (textData === \"\") return null;\n\t\t\t\tconst textNode = new ViewText(this.document, textData);\n\t\t\t\tinlineNodes.push(textNode);\n\t\t\t\treturn textNode;\n\t\t\t}\n\t\t} else {\n\t\t\tlet viewElement = this.mapDomToView(domNode);\n\t\t\tif (viewElement) {\n\t\t\t\tif (this._isInlineObjectElement(viewElement)) inlineNodes.push(viewElement);\n\t\t\t\treturn viewElement;\n\t\t\t}\n\t\t\tif (this.isDocumentFragment(domNode)) {\n\t\t\t\tviewElement = new ViewDocumentFragment(this.document);\n\t\t\t\tif (options.bind) this.bindDocumentFragments(domNode, viewElement);\n\t\t\t} else {\n\t\t\t\tviewElement = this._createViewElement(domNode, options);\n\t\t\t\tif (options.bind) this.bindElements(domNode, viewElement);\n\t\t\t\tconst attrs = domNode.attributes;\n\t\t\t\tif (attrs) for (let l = attrs.length, i = 0; i < l; i++) viewElement._setAttribute(attrs[i].name, attrs[i].value);\n\t\t\t\tif (this._isViewElementWithRawContent(viewElement, options)) {\n\t\t\t\t\tviewElement._setCustomProperty(\"$rawContent\", domNode.innerHTML);\n\t\t\t\t\tif (!this._isBlockViewElement(viewElement)) inlineNodes.push(viewElement);\n\t\t\t\t\treturn viewElement;\n\t\t\t\t}\n\t\t\t\tif (isComment(domNode)) {\n\t\t\t\t\tviewElement._setCustomProperty(\"$rawContent\", domNode.data);\n\t\t\t\t\treturn viewElement;\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield viewElement;\n\t\t\tconst nestedInlineNodes = [];\n\t\t\tif (options.withChildren !== false) for (const child of this.domChildrenToView(domNode, options, nestedInlineNodes)) viewElement._appendChild(child);\n\t\t\tif (this._isInlineObjectElement(viewElement)) {\n\t\t\t\tinlineNodes.push(viewElement);\n\t\t\t\tthis._processDomInlineNodes(null, nestedInlineNodes, options);\n\t\t\t} else for (const inlineNode of nestedInlineNodes) inlineNodes.push(inlineNode);\n\t\t}\n\t}\n\t/**\n\t* Internal helper that walks the list of inline view nodes already generated from DOM nodes\n\t* and handles whitespaces and NBSPs.\n\t*\n\t* @param domParent The DOM parent of the given inline nodes. This should be a document fragment or\n\t* a block element to whitespace processing start cleaning.\n\t* @param inlineNodes An array of recently encountered inline nodes truncated to the block element boundaries.\n\t*/\n\t_processDomInlineNodes(domParent, inlineNodes, options) {\n\t\tif (!inlineNodes.length) return;\n\t\tif (domParent && !this.isDocumentFragment(domParent) && !this._isBlockDomElement(domParent)) return;\n\t\tlet prevNodeEndsWithSpace = false;\n\t\tfor (let i = 0; i < inlineNodes.length; i++) {\n\t\t\tconst node = inlineNodes[i];\n\t\t\tif (!node.is(\"$text\")) {\n\t\t\t\tprevNodeEndsWithSpace = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet data;\n\t\t\tlet nodeEndsWithSpace = false;\n\t\t\tif (this._isPreFormatted(node)) data = getDataWithoutFiller(node.data);\n\t\t\telse {\n\t\t\t\tdata = node.data.replace(/[ \\n\\t\\r]{1,}/g, \" \");\n\t\t\t\tnodeEndsWithSpace = /[^\\S\\u00A0]/.test(data.charAt(data.length - 1));\n\t\t\t\tconst prevNode = i > 0 ? inlineNodes[i - 1] : null;\n\t\t\t\tconst nextNode = i + 1 < inlineNodes.length ? inlineNodes[i + 1] : null;\n\t\t\t\tconst shouldLeftTrim = !prevNode || prevNode.is(\"element\") && prevNode.name == \"br\" || prevNodeEndsWithSpace;\n\t\t\t\tconst shouldRightTrim = nextNode ? false : !startsWithFiller(node.data);\n\t\t\t\tif (options.withChildren !== false) {\n\t\t\t\t\tif (shouldLeftTrim) data = data.replace(/^ /, \"\");\n\t\t\t\t\tif (shouldRightTrim) data = data.replace(/ $/, \"\");\n\t\t\t\t}\n\t\t\t\tdata = getDataWithoutFiller(data);\n\t\t\t\tif (this.blockFillerMode != \"br\" && node.parent) {\n\t\t\t\t\tif (isViewMarkedNbspFiller(node.parent, data)) {\n\t\t\t\t\t\tdata = \"\";\n\t\t\t\t\t\tif (node.parent.parent) {\n\t\t\t\t\t\t\tnode.parent.parent._setCustomProperty(\"$hasBlockFiller\", true);\n\t\t\t\t\t\t\tnode.parent._remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (isViewNbspFiller(node.parent, data, this.blockElements)) {\n\t\t\t\t\t\tdata = \"\";\n\t\t\t\t\t\tnode.parent._setCustomProperty(\"$hasBlockFiller\", true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdata = data.replace(/ \\u00A0/g, \"  \");\n\t\t\t\tconst isNextNodeInlineObjectElement = nextNode && nextNode.is(\"element\") && nextNode.name != \"br\";\n\t\t\t\tconst isNextNodeStartingWithSpace = nextNode && nextNode.is(\"$text\") && nextNode.data.charAt(0) == \" \";\n\t\t\t\tif (/[ \\u00A0]\\u00A0$/.test(data) || !nextNode || isNextNodeInlineObjectElement || isNextNodeStartingWithSpace) data = data.replace(/\\u00A0$/, \" \");\n\t\t\t\tif (shouldLeftTrim || prevNode && prevNode.is(\"element\") && prevNode.name != \"br\") data = data.replace(/^\\u00A0/, \" \");\n\t\t\t}\n\t\t\tif (data.length == 0 && node.parent) {\n\t\t\t\tnode._remove();\n\t\t\t\tinlineNodes.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t} else {\n\t\t\t\tnode._data = data;\n\t\t\t\tprevNodeEndsWithSpace = nodeEndsWithSpace;\n\t\t\t}\n\t\t}\n\t\tinlineNodes.length = 0;\n\t}\n\t/**\n\t* Takes text data from a given {@link module:engine/view/text~ViewText#data} and processes it so\n\t* it is correctly displayed in the DOM.\n\t*\n\t* Following changes are done:\n\t*\n\t* * a space at the beginning is changed to `&nbsp;` if this is the first text node in its container\n\t* element or if a previous text node ends with a space character,\n\t* * space at the end of the text node is changed to `&nbsp;` if there are two spaces at the end of a node or if next node\n\t* starts with a space or if it is the last text node in its container,\n\t* * remaining spaces are replaced to a chain of spaces and `&nbsp;` (e.g. `'x   x'` becomes `'x &nbsp; x'`).\n\t*\n\t* Content of {@link #preElements} is not processed.\n\t*\n\t* @param node View text node to process.\n\t* @returns Processed text data.\n\t*/\n\t_processDataFromViewText(node) {\n\t\tlet data = node.data;\n\t\tif (this._isPreFormatted(node)) return data;\n\t\tif (data.charAt(0) == \" \") {\n\t\t\tconst prevNode = this._getTouchingInlineViewNode(node, false);\n\t\t\tif (prevNode && prevNode.is(\"$textProxy\") && this._nodeEndsWithSpace(prevNode) || !prevNode) data = \"\\xA0\" + data.substr(1);\n\t\t}\n\t\tif (data.charAt(data.length - 1) == \" \") {\n\t\t\tconst nextNode = this._getTouchingInlineViewNode(node, true);\n\t\t\tconst nextStartsWithSpace = nextNode && nextNode.is(\"$textProxy\") && nextNode.data.charAt(0) == \" \";\n\t\t\tif (data.charAt(data.length - 2) == \" \" || !nextNode || nextStartsWithSpace) data = data.substr(0, data.length - 1) + \"\\xA0\";\n\t\t}\n\t\treturn data.replace(/ {2}/g, \" \\xA0\");\n\t}\n\t/**\n\t* Checks whether given node ends with a space character after changing appropriate space characters to `&nbsp;`s.\n\t*\n\t* @param  node Node to check.\n\t* @returns `true` if given `node` ends with space, `false` otherwise.\n\t*/\n\t_nodeEndsWithSpace(node) {\n\t\tif (this._isPreFormatted(node)) return false;\n\t\tconst data = this._processDataFromViewText(node);\n\t\treturn data.charAt(data.length - 1) == \" \";\n\t}\n\t/**\n\t* Checks whether given text contains preformatted white space. This is the case if\n\t* * any of node ancestors has a name which is in `preElements` array, or\n\t* * the closest ancestor that has the `white-space` CSS property sets it to a value that preserves spaces\n\t*\n\t* @param node Node to check\n\t* @returns `true` if given node contains preformatted white space, `false` otherwise.\n\t*/\n\t_isPreFormatted(node) {\n\t\tif (_hasViewParentOfType(node, this.preElements)) return true;\n\t\tfor (const ancestor of node.getAncestors({ parentFirst: true })) {\n\t\t\tif (!ancestor.is(\"element\") || !ancestor.hasStyle(\"white-space\") || ancestor.getStyle(\"white-space\") === \"inherit\") continue;\n\t\t\treturn [\n\t\t\t\t\"pre\",\n\t\t\t\t\"pre-wrap\",\n\t\t\t\t\"break-spaces\"\n\t\t\t].includes(ancestor.getStyle(\"white-space\"));\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Helper function. For given {@link module:engine/view/text~ViewText view text node}, it finds previous or next sibling\n\t* that is contained in the same container element. If there is no such sibling, `null` is returned.\n\t*\n\t* @param node Reference node.\n\t* @returns Touching text node, an inline object\n\t* or `null` if there is no next or previous touching text node.\n\t*/\n\t_getTouchingInlineViewNode(node, getNext) {\n\t\tconst treeWalker = new ViewTreeWalker({\n\t\t\tstartPosition: getNext ? ViewPosition._createAfter(node) : ViewPosition._createBefore(node),\n\t\t\tdirection: getNext ? \"forward\" : \"backward\"\n\t\t});\n\t\tfor (const { item } of treeWalker) if (item.is(\"$textProxy\")) return item;\n\t\telse if (item.is(\"element\") && item.getCustomProperty(\"dataPipeline:transparentRendering\")) continue;\n\t\telse if (item.is(\"element\", \"br\")) return null;\n\t\telse if (this._isInlineObjectElement(item)) return item;\n\t\telse if (item.is(\"containerElement\") || this._isBlockViewElement(item)) return null;\n\t\treturn null;\n\t}\n\t/**\n\t* Returns `true` if a DOM node belongs to {@link #blockElements}. `false` otherwise.\n\t*/\n\t_isBlockDomElement(node) {\n\t\treturn this.isElement(node) && this.blockElements.includes(node.tagName.toLowerCase());\n\t}\n\t/**\n\t* Returns `true` if a view node belongs to {@link #blockElements}. `false` otherwise.\n\t*/\n\t_isBlockViewElement(node) {\n\t\treturn node.is(\"element\") && this.blockElements.includes(node.name);\n\t}\n\t/**\n\t* Returns `true` if a DOM node belongs to {@link #inlineObjectElements}. `false` otherwise.\n\t*/\n\t_isInlineObjectElement(node) {\n\t\tif (!node.is(\"element\")) return false;\n\t\treturn node.name == \"br\" || this.inlineObjectElements.includes(node.name) || !!this._inlineObjectElementMatcher.match(node);\n\t}\n\t/**\n\t* Creates view element basing on the node type.\n\t*\n\t* @param node DOM node to check.\n\t* @param options Conversion options. See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.\n\t*/\n\t_createViewElement(node, options) {\n\t\tif (isComment(node)) return new ViewUIElement(this.document, \"$comment\");\n\t\tconst viewName = options.keepOriginalCase ? node.tagName : node.tagName.toLowerCase();\n\t\treturn new ViewElement(this.document, viewName);\n\t}\n\t/**\n\t* Checks if view element's content should be treated as a raw data.\n\t*\n\t* @param viewElement View element to check.\n\t* @param options Conversion options. See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.\n\t*/\n\t_isViewElementWithRawContent(viewElement, options) {\n\t\treturn options.withChildren !== false && viewElement.is(\"element\") && !!this._rawContentElementMatcher.match(viewElement);\n\t}\n\t/**\n\t* Checks whether a given element name should be renamed in a current rendering mode.\n\t*\n\t* @param elementName The name of view element.\n\t*/\n\t_shouldRenameElement(elementName) {\n\t\tconst name = elementName.toLowerCase();\n\t\treturn this.renderingMode === \"editing\" && this.unsafeElements.includes(name);\n\t}\n\t/**\n\t* Return a <span> element with a special attribute holding the name of the original element.\n\t* Optionally, copy all the attributes of the original element if that element is provided.\n\t*\n\t* @param elementName The name of view element.\n\t* @param originalDomElement The original DOM element to copy attributes and content from.\n\t*/\n\t_createReplacementDomElement(elementName, originalDomElement) {\n\t\tconst newDomElement = this._domDocument.createElement(\"span\");\n\t\tnewDomElement.setAttribute(UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE, elementName);\n\t\tif (originalDomElement) {\n\t\t\twhile (originalDomElement.firstChild) newDomElement.appendChild(originalDomElement.firstChild);\n\t\t\tfor (const attributeName of originalDomElement.getAttributeNames()) newDomElement.setAttribute(attributeName, originalDomElement.getAttribute(attributeName));\n\t\t}\n\t\treturn newDomElement;\n\t}\n};\n/**\n* Helper function.\n* Used to check if given native `Element` or `Text` node has parent with tag name from `types` array.\n*\n* @returns`true` if such parent exists or `false` if it does not.\n*/\nfunction _hasViewParentOfType(node, types) {\n\treturn node.getAncestors().some((parent) => parent.is(\"element\") && types.includes(parent.name));\n}\n/**\n* A helper that executes given callback for each DOM node's ancestor, starting from the given node\n* and ending in document#documentElement.\n*\n* @param callback A callback to be executed for each ancestor.\n*/\nfunction forEachDomElementAncestor(element, callback) {\n\tlet node = element;\n\twhile (node) {\n\t\tcallback(node);\n\t\tnode = node.parentElement;\n\t}\n}\n/**\n* Checks if given DOM node is a nbsp block filler.\n*\n* A &nbsp; is a block filler only if it is a single child of a block element.\n*\n* @param domNode DOM node.\n*/\nfunction isNbspBlockFiller(domNode, blockElements) {\n\treturn domNode.isEqualNode(NBSP_FILLER_REF) && hasBlockParent(domNode, blockElements) && domNode.parentNode.childNodes.length === 1;\n}\n/**\n* Checks if domNode has block parent.\n*\n* @param domNode DOM node.\n*/\nfunction hasBlockParent(domNode, blockElements) {\n\tconst parent = domNode.parentNode;\n\treturn !!parent && !!parent.tagName && blockElements.includes(parent.tagName.toLowerCase());\n}\n/**\n* Checks if given view node is a nbsp block filler.\n*\n* A &nbsp; is a block filler only if it is a single child of a block element.\n*/\nfunction isViewNbspFiller(parent, data, blockElements) {\n\treturn data == \"\\xA0\" && parent && parent.is(\"element\") && parent.childCount == 1 && blockElements.includes(parent.name);\n}\n/**\n* Checks if given view node is a marked-nbsp block filler.\n*\n* A &nbsp; is a block filler only if it is wrapped in `<span data-cke-filler=\"true\">` element.\n*/\nfunction isViewMarkedNbspFiller(parent, data) {\n\treturn data == \"\\xA0\" && parent && parent.is(\"element\", \"span\") && parent.childCount == 1 && parent.hasAttribute(\"data-cke-filler\");\n}\n/**\n* Checks if given view node is a br block filler.\n*\n* A <br> is a block filler only if it has data-cke-filler attribute set.\n*/\nfunction isViewBrFiller(node) {\n\treturn node.is(\"element\", \"br\") && node.hasAttribute(\"data-cke-filler\");\n}\n/**\n* Special case for `<p><br></p>` in which `<br>` should be treated as filler even when we are not in the 'br' mode.\n*/\nfunction isOnlyBrInBlock(domNode, blockElements) {\n\treturn domNode.tagName === \"BR\" && hasBlockParent(domNode, blockElements) && domNode.parentNode.childNodes.length === 1;\n}\n/**\n* Log to console the information about element that was replaced.\n* Check UNSAFE_ELEMENTS for all recognized unsafe elements.\n*\n* @param elementName The name of the view element.\n*/\nfunction _logUnsafeElement(elementName) {\n\tif (elementName === \"script\") logWarning(\"domconverter-unsafe-script-element-detected\");\n\tif (elementName === \"style\") logWarning(\"domconverter-unsafe-style-element-detected\");\n}\n/**\n* In certain cases, Firefox mysteriously assigns so called \"restricted objects\" to native DOM Range properties.\n* Any attempt at accessing restricted object's properties causes errors.\n* See: https://github.com/ckeditor/ckeditor5/issues/9635.\n*/\nfunction isGeckoRestrictedDomSelection(domSelection) {\n\tif (!env.isGecko) return false;\n\tif (!domSelection.rangeCount) return false;\n\tconst container = domSelection.getRangeAt(0).startContainer;\n\ttry {\n\t\tObject.prototype.toString.call(container);\n\t} catch {\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* While rendering the editor content, the {@link module:engine/view/domconverter~ViewDomConverter} detected a `<script>` element that may\n* disrupt the editing experience. To avoid this, the `<script>` element was replaced with `<span data-ck-unsafe-element=\"script\"></span>`.\n*\n* @error domconverter-unsafe-script-element-detected\n*/\n/**\n* While rendering the editor content, the\n* {@link module:engine/view/domconverter~ViewDomConverter} detected a `<style>` element that may affect\n* the editing experience. To avoid this, the `<style>` element was replaced with `<span data-ck-unsafe-element=\"style\"></span>`.\n*\n* @error domconverter-unsafe-style-element-detected\n*/\n/**\n* The {@link module:engine/view/domconverter~ViewDomConverter} detected an interactive attribute in the\n* {@glink framework/architecture/editing-engine#editing-pipeline editing pipeline}. For the best\n* editing experience, the attribute was renamed to `data-ck-unsafe-attribute-[original attribute name]`.\n*\n* If you are the author of the plugin that generated this attribute and you want it to be preserved\n* in the editing pipeline, you can configure this when creating the element\n* using {@link module:engine/view/downcastwriter~ViewDowncastWriter} during the\n* {@glink framework/architecture/editing-engine#conversion model–view conversion}. Methods such as\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement},\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement}, or\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement}\n* accept an option that will disable filtering of specific attributes:\n*\n* ```ts\n* const paragraph = writer.createContainerElement( 'p',\n* \t{\n* \t\tclass: 'clickable-paragraph',\n* \t\tonclick: 'alert( \"Paragraph clicked!\" )'\n* \t},\n* \t{\n* \t\t// Make sure the \"onclick\" attribute will pass through.\n* \t\trenderUnsafeAttributes: [ 'onclick' ]\n* \t}\n* );\n* ```\n*\n* @error domconverter-unsafe-attribute-detected\n* @param {HTMLElement} domElement The DOM element the attribute was set on.\n* @param {string} key The original name of the attribute\n* @param {string} value The value of the original attribute\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 engine/view/observer/observer\n*/\nconst ObserverBase = /* #__PURE__ */ DomEmitterMixin();\n/**\n* Abstract base observer class. Observers are classes which listen to DOM events, do the preliminary\n* processing and fire events on the {@link module:engine/view/document~ViewDocument} objects.\n* Observers can also add features to the view, for instance by updating its status or marking elements\n* which need a refresh on DOM events.\n*/\nvar Observer = class extends ObserverBase {\n\t/**\n\t* An instance of the view controller.\n\t*/\n\tview;\n\t/**\n\t* A reference to the {@link module:engine/view/document~ViewDocument} object.\n\t*/\n\tdocument;\n\t/**\n\t* The state of the observer. If it is disabled, no events will be fired.\n\t*/\n\t_isEnabled = false;\n\t/**\n\t* Creates an instance of the observer.\n\t*/\n\tconstructor(view) {\n\t\tsuper();\n\t\tthis.view = view;\n\t\tthis.document = view.document;\n\t}\n\t/**\n\t* The state of the observer. If it is disabled, no events will be fired.\n\t*/\n\tget isEnabled() {\n\t\treturn this._isEnabled;\n\t}\n\t/**\n\t* Enables the observer. This method is called when the observer is registered to the\n\t* {@link module:engine/view/view~EditingView} and after {@link module:engine/view/view~EditingView#forceRender rendering}\n\t* (all observers are {@link #disable disabled} before rendering).\n\t*\n\t* A typical use case for disabling observers is that mutation observers need to be disabled for the rendering.\n\t* However, a child class may not need to be disabled, so it can implement an empty method.\n\t*\n\t* @see module:engine/view/observer/observer~Observer#disable\n\t*/\n\tenable() {\n\t\tthis._isEnabled = true;\n\t}\n\t/**\n\t* Disables the observer. This method is called before\n\t* {@link module:engine/view/view~EditingView#forceRender rendering} to prevent firing events during rendering.\n\t*\n\t* @see module:engine/view/observer/observer~Observer#enable\n\t*/\n\tdisable() {\n\t\tthis._isEnabled = false;\n\t}\n\t/**\n\t* Disables and destroys the observer, among others removes event listeners created by the observer.\n\t*/\n\tdestroy() {\n\t\tthis.disable();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Checks whether a given DOM event should be ignored (should not be turned into a synthetic view document event).\n\t*\n\t* Currently, an event will be ignored only if its target or any of its ancestors has the `data-cke-ignore-events` attribute.\n\t* This attribute can be used inside the structures generated by\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `ViewDowncastWriter#createUIElement()`} to ignore events\n\t* fired within a UI that should be excluded from CKEditor 5's realms.\n\t*\n\t* @param domTarget The DOM event target to check (usually an element, sometimes a text node and\n\t* potentially sometimes a document, too).\n\t* @returns Whether this event should be ignored by the observer.\n\t*/\n\tcheckShouldIgnoreEventFromTarget(domTarget) {\n\t\tif (domTarget && domTarget.nodeType === 3) domTarget = domTarget.parentNode;\n\t\tif (!domTarget || domTarget.nodeType !== 1) return false;\n\t\treturn domTarget.matches(\"[data-cke-ignore-events], [data-cke-ignore-events] *\");\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 engine/view/observer/domeventdata\n*/\n/**\n* Information about a DOM event in context of the {@link module:engine/view/document~ViewDocument}.\n* It wraps the native event, which usually should not be used as the wrapper contains\n* additional data (like key code for keyboard events).\n*\n* @typeParam TEvent The type of DOM Event that this class represents.\n*/\nvar ViewDocumentDomEventData = class {\n\t/**\n\t* Instance of the view controller.\n\t*/\n\tview;\n\t/**\n\t* The instance of the document.\n\t*/\n\tdocument;\n\t/**\n\t* The DOM event.\n\t*/\n\tdomEvent;\n\t/**\n\t* The DOM target.\n\t*/\n\tdomTarget;\n\t/**\n\t* @param view The instance of the view controller.\n\t* @param domEvent The DOM event.\n\t* @param additionalData Additional properties that the instance should contain.\n\t*/\n\tconstructor(view, domEvent, additionalData) {\n\t\tthis.view = view;\n\t\tthis.document = view.document;\n\t\tthis.domEvent = domEvent;\n\t\tthis.domTarget = domEvent.target;\n\t\textend(this, additionalData);\n\t}\n\t/**\n\t* The tree view element representing the target.\n\t*/\n\tget target() {\n\t\treturn this.view.domConverter.mapDomToView(this.domTarget);\n\t}\n\t/**\n\t* Prevents the native's event default action.\n\t*/\n\tpreventDefault() {\n\t\tthis.domEvent.preventDefault();\n\t}\n\t/**\n\t* Stops native event propagation.\n\t*/\n\tstopPropagation() {\n\t\tthis.domEvent.stopPropagation();\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 engine/view/observer/domeventobserver\n*/\n/**\n* Base class for DOM event observers. This class handles\n* {@link module:engine/view/observer/observer~Observer#observe adding} listeners to DOM elements,\n* {@link module:engine/view/observer/observer~Observer#disable disabling} and\n* {@link module:engine/view/observer/observer~Observer#enable re-enabling} events.\n* Child class needs to define\n* {@link module:engine/view/observer/domeventobserver~DomEventObserver#domEventType DOM event type} and\n* {@link module:engine/view/observer/domeventobserver~DomEventObserver#onDomEvent callback}.\n*\n* For instance:\n*\n* ```ts\n* class ClickObserver extends DomEventObserver<'click'> {\n* \t// It can also be defined as a normal property in the constructor.\n* \tget domEventType(): 'click' {\n* \t\treturn 'click';\n* \t}\n*\n* \tonDomEvent( domEvent: MouseEvent ): void {\n* \t\tthis.fire( 'click', domEvent );\n* \t}\n* }\n* ```\n*\n* @typeParam EventType DOM Event type name or an union of those.\n* @typeParam AdditionalData Additional data passed along with the event.\n*/\nvar DomEventObserver = class extends Observer {\n\t/**\n\t* If set to `true` DOM events will be listened on the capturing phase.\n\t* Default value is `false`.\n\t*/\n\tuseCapture = false;\n\t/**\n\t* If set to `true`, indicates that the function specified by listener will never call `preventDefault()`.\n\t* Default value is `false`.\n\t*/\n\tusePassive = false;\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve(domElement) {\n\t\t(typeof this.domEventType == \"string\" ? [this.domEventType] : this.domEventType).forEach((type) => {\n\t\t\tthis.listenTo(domElement, type, (eventInfo, domEvent) => {\n\t\t\t\tif (this.isEnabled && !this.checkShouldIgnoreEventFromTarget(domEvent.target)) this.onDomEvent(domEvent);\n\t\t\t}, {\n\t\t\t\tuseCapture: this.useCapture,\n\t\t\t\tusePassive: this.usePassive\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving(domElement) {\n\t\tthis.stopListening(domElement);\n\t}\n\t/**\n\t* Calls `Document#fire()` if observer {@link #isEnabled is enabled}.\n\t*\n\t* @see module:utils/emittermixin~Emitter#fire\n\t* @param eventType The event type (name).\n\t* @param domEvent The DOM event.\n\t* @param additionalData The additional data which should extend the\n\t* {@link module:engine/view/observer/domeventdata~ViewDocumentDomEventData event data} object.\n\t*/\n\tfire(eventType, domEvent, additionalData) {\n\t\tif (this.isEnabled) this.document.fire(eventType, new ViewDocumentDomEventData(this.view, domEvent, additionalData));\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 engine/view/observer/keyobserver\n*/\n/**\n* Observer for events connected with pressing keyboard keys.\n*\n* Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n*/\nvar KeyObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = [\"keydown\", \"keyup\"];\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvt) {\n\t\tconst data = {\n\t\t\tkeyCode: domEvt.keyCode,\n\t\t\taltKey: domEvt.altKey,\n\t\t\tctrlKey: domEvt.ctrlKey,\n\t\t\tshiftKey: domEvt.shiftKey,\n\t\t\tmetaKey: domEvt.metaKey,\n\t\t\tget keystroke() {\n\t\t\t\treturn getCode(this);\n\t\t\t}\n\t\t};\n\t\tthis.fire(domEvt.type, domEvt, data);\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 engine/view/observer/fakeselectionobserver\n*/\n/**\n* Fake selection observer class. If view selection is fake it is placed in dummy DOM container. This observer listens\n* on {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and handles moving\n* fake view selection to the correct place if arrow keys are pressed.\n* Fires {@link module:engine/view/document~ViewDocument#event:selectionChange selectionChange event} simulating natural behaviour of\n* {@link module:engine/view/observer/selectionobserver~SelectionObserver SelectionObserver}.\n*/\nvar FakeSelectionObserver = class extends Observer {\n\t/**\n\t* Fires debounced event `selectionChangeDone`. It uses `es-toolkit#debounce` method to delay function call.\n\t*/\n\t_fireSelectionChangeDoneDebounced;\n\t/**\n\t* Creates new FakeSelectionObserver instance.\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tthis._fireSelectionChangeDoneDebounced = debounce((data) => {\n\t\t\tthis.document.fire(\"selectionChangeDone\", data);\n\t\t}, 200);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {\n\t\tconst document = this.document;\n\t\tdocument.on(\"arrowKey\", (eventInfo, data) => {\n\t\t\tif (document.selection.isFake && this.isEnabled) data.preventDefault();\n\t\t}, { context: \"$capture\" });\n\t\tdocument.on(\"arrowKey\", (eventInfo, data) => {\n\t\t\tif (document.selection.isFake && this.isEnabled) this._handleSelectionMove(data.keyCode);\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t}\n\t/**\n\t* Handles collapsing view selection according to given key code. If left or up key is provided - new selection will be\n\t* collapsed to left. If right or down key is pressed - new selection will be collapsed to right.\n\t*\n\t* This method fires {@link module:engine/view/document~ViewDocument#event:selectionChange} and\n\t* {@link module:engine/view/document~ViewDocument#event:selectionChangeDone} events imitating behaviour of\n\t* {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n\t*/\n\t_handleSelectionMove(keyCode) {\n\t\tconst selection = this.document.selection;\n\t\tconst newSelection = new ViewSelection(selection.getRanges(), {\n\t\t\tbackward: selection.isBackward,\n\t\t\tfake: false\n\t\t});\n\t\tif (keyCode == keyCodes.arrowleft || keyCode == keyCodes.arrowup) newSelection.setTo(newSelection.getFirstPosition());\n\t\tif (keyCode == keyCodes.arrowright || keyCode == keyCodes.arrowdown) newSelection.setTo(newSelection.getLastPosition());\n\t\tconst data = {\n\t\t\toldSelection: selection,\n\t\t\tnewSelection,\n\t\t\tdomSelection: null\n\t\t};\n\t\tthis.document.fire(\"selectionChange\", data);\n\t\tthis._fireSelectionChangeDoneDebounced(data);\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 engine/view/observer/mutationobserver\n*/\n/**\n* Mutation observer's role is to watch for any DOM changes inside the editor that weren't\n* done by the editor's {@link module:engine/view/renderer~ViewRenderer} itself and reverting these changes.\n*\n* It does this by observing all mutations in the DOM, marking related view elements as changed and calling\n* {@link module:engine/view/renderer~ViewRenderer#render}. Because all mutated nodes are marked as\n* \"to be rendered\" and the {@link module:engine/view/renderer~ViewRenderer#render `render()`} method is called,\n* all changes are reverted in the DOM (the DOM is synced with the editor's view structure).\n*\n* Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n*/\nvar MutationObserver = class extends Observer {\n\t/**\n\t* Reference to the {@link module:engine/view/view~EditingView#domConverter}.\n\t*/\n\tdomConverter;\n\t/**\n\t* Native mutation observer config.\n\t*/\n\t_config;\n\t/**\n\t* Observed DOM elements.\n\t*/\n\t_domElements;\n\t/**\n\t* Native mutation observer.\n\t*/\n\t_mutationObserver;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tthis._config = {\n\t\t\tchildList: true,\n\t\t\tcharacterData: true,\n\t\t\tsubtree: true\n\t\t};\n\t\tthis.domConverter = view.domConverter;\n\t\tthis._domElements = /* @__PURE__ */ new Set();\n\t\tthis._mutationObserver = new window.MutationObserver(this._onMutations.bind(this));\n\t}\n\t/**\n\t* Synchronously handles mutations and empties the queue.\n\t*/\n\tflush() {\n\t\tthis._onMutations(this._mutationObserver.takeRecords());\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve(domElement) {\n\t\tthis._domElements.add(domElement);\n\t\tif (this.isEnabled) this._mutationObserver.observe(domElement, this._config);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving(domElement) {\n\t\tthis._domElements.delete(domElement);\n\t\tif (this.isEnabled) {\n\t\t\tthis._mutationObserver.disconnect();\n\t\t\tfor (const domElement of this._domElements) this._mutationObserver.observe(domElement, this._config);\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tenable() {\n\t\tsuper.enable();\n\t\tfor (const domElement of this._domElements) this._mutationObserver.observe(domElement, this._config);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdisable() {\n\t\tsuper.disable();\n\t\tthis._mutationObserver.disconnect();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._mutationObserver.disconnect();\n\t}\n\t/**\n\t* Handles mutations. Mark view elements to sync and call render.\n\t*\n\t* @param domMutations Array of native mutations.\n\t*/\n\t_onMutations(domMutations) {\n\t\tif (domMutations.length === 0) return;\n\t\tconst domConverter = this.domConverter;\n\t\tconst mutatedTextNodes = /* @__PURE__ */ new Set();\n\t\tconst elementsWithMutatedChildren = /* @__PURE__ */ new Set();\n\t\tfor (const mutation of domMutations) {\n\t\t\tconst element = domConverter.mapDomToView(mutation.target);\n\t\t\tif (!element) continue;\n\t\t\tif (element.is(\"uiElement\") || element.is(\"rawElement\")) continue;\n\t\t\tif (mutation.type === \"childList\" && !this._isBogusBrMutation(mutation)) elementsWithMutatedChildren.add(element);\n\t\t}\n\t\tfor (const mutation of domMutations) {\n\t\t\tconst element = domConverter.mapDomToView(mutation.target);\n\t\t\tif (element && (element.is(\"uiElement\") || element.is(\"rawElement\"))) continue;\n\t\t\tif (mutation.type === \"characterData\") {\n\t\t\t\tconst text = domConverter.findCorrespondingViewText(mutation.target);\n\t\t\t\tif (text && !elementsWithMutatedChildren.has(text.parent)) mutatedTextNodes.add(text);\n\t\t\t\telse if (!text && startsWithFiller(mutation.target)) elementsWithMutatedChildren.add(domConverter.mapDomToView(mutation.target.parentNode));\n\t\t\t}\n\t\t}\n\t\tconst mutations = [];\n\t\tfor (const textNode of mutatedTextNodes) mutations.push({\n\t\t\ttype: \"text\",\n\t\t\tnode: textNode\n\t\t});\n\t\tfor (const viewElement of elementsWithMutatedChildren) {\n\t\t\tconst domElement = domConverter.mapViewToDom(viewElement);\n\t\t\tconst viewChildren = Array.from(viewElement.getChildren());\n\t\t\tconst newViewChildren = Array.from(domConverter.domChildrenToView(domElement, { withChildren: false }));\n\t\t\tif (!isEqualWith(viewChildren, newViewChildren, sameNodes)) mutations.push({\n\t\t\t\ttype: \"children\",\n\t\t\t\tnode: viewElement\n\t\t\t});\n\t\t}\n\t\tif (mutations.length) this.document.fire(\"mutations\", { mutations });\n\t}\n\t/**\n\t* Checks if mutation was generated by the browser inserting bogus br on the end of the block element.\n\t* Such mutations are generated while pressing space or performing native spellchecker correction\n\t* on the end of the block element in Firefox browser.\n\t*\n\t* @param mutation Native mutation object.\n\t*/\n\t_isBogusBrMutation(mutation) {\n\t\tlet addedNode = null;\n\t\tif (mutation.nextSibling === null && mutation.removedNodes.length === 0 && mutation.addedNodes.length == 1) addedNode = this.domConverter.domToView(mutation.addedNodes[0], { withChildren: false });\n\t\treturn addedNode && addedNode.is(\"element\", \"br\");\n\t}\n};\nfunction sameNodes(child1, child2) {\n\tif (Array.isArray(child1)) return;\n\tif (child1 === child2) return true;\n\telse if (child1.is(\"$text\") && child2.is(\"$text\")) return child1.data === child2.data;\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 engine/view/observer/focusobserver\n*/\n/**\n* {@link module:engine/view/document~ViewDocument#event:focus Focus}\n* and {@link module:engine/view/document~ViewDocument#event:blur blur} events observer.\n* Focus observer handle also {@link module:engine/view/rooteditableelement~ViewRootEditableElement#isFocused isFocused} property of the\n* {@link module:engine/view/rooteditableelement~ViewRootEditableElement root elements}.\n*\n* Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n*/\nvar FocusObserver = class extends DomEventObserver {\n\t/**\n\t* Identifier of the timeout currently used by focus listener to delay rendering execution.\n\t*/\n\t_renderTimeoutId = null;\n\t/**\n\t* Set to `true` if the document is in the process of setting the focus.\n\t*\n\t* The flag is used to indicate that setting the focus is in progress.\n\t*/\n\t_isFocusChanging = false;\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = [\"focus\", \"blur\"];\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tthis.useCapture = true;\n\t\tconst document = this.document;\n\t\tdocument.on(\"focus\", () => this._handleFocus());\n\t\tdocument.on(\"blur\", (evt, data) => this._handleBlur(data));\n\t\tdocument.on(\"beforeinput\", () => {\n\t\t\tif (!document.isFocused) this._handleFocus();\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* Finishes setting the document focus state.\n\t*/\n\tflush() {\n\t\tif (this._isFocusChanging) {\n\t\t\tthis._isFocusChanging = false;\n\t\t\tthis.document.isFocused = true;\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tthis.fire(domEvent.type, domEvent);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._clearTimeout();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* The `focus` event handler.\n\t*/\n\t_handleFocus() {\n\t\tthis._clearTimeout();\n\t\tthis._isFocusChanging = true;\n\t\tthis._renderTimeoutId = setTimeout(() => {\n\t\t\tthis._renderTimeoutId = null;\n\t\t\tthis.flush();\n\t\t\tthis.view.change(() => {});\n\t\t}, 50);\n\t}\n\t/**\n\t* The `blur` event handler.\n\t*/\n\t_handleBlur(data) {\n\t\tconst selectedEditable = this.document.selection.editableElement;\n\t\tif (selectedEditable === null || selectedEditable === data.target) {\n\t\t\tthis.document.isFocused = false;\n\t\t\tthis._isFocusChanging = false;\n\t\t\tthis.view.change(() => {});\n\t\t}\n\t}\n\t/**\n\t* Clears timeout.\n\t*/\n\t_clearTimeout() {\n\t\tif (this._renderTimeoutId) {\n\t\t\tclearTimeout(this._renderTimeoutId);\n\t\t\tthis._renderTimeoutId = 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 engine/view/observer/selectionobserver\n*/\n/**\n* Selection observer class observes selection changes in the document. If a selection changes on the document this\n* observer checks if the DOM selection is different from the {@link module:engine/view/document~ViewDocument#selection view selection}.\n* The selection observer fires {@link module:engine/view/document~ViewDocument#event:selectionChange} event only if\n* a selection change was the only change in the document and the DOM selection is different from the view selection.\n*\n* This observer also manages the {@link module:engine/view/document~ViewDocument#isSelecting} property of the view document.\n*\n* Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n*/\nvar SelectionObserver = class extends Observer {\n\t/**\n\t* Instance of the mutation observer. Selection observer calls\n\t* {@link module:engine/view/observer/mutationobserver~MutationObserver#flush} to ensure that the mutations will be handled\n\t* before the {@link module:engine/view/document~ViewDocument#event:selectionChange} event is fired.\n\t*/\n\tmutationObserver;\n\t/**\n\t* Instance of the focus observer. Focus observer calls\n\t* {@link module:engine/view/observer/focusobserver~FocusObserver#flush} to mark the latest focus change as complete.\n\t*/\n\tfocusObserver;\n\t/**\n\t* Reference to the view {@link module:engine/view/documentselection~ViewDocumentSelection} object used to compare\n\t* new selection with it.\n\t*/\n\tselection;\n\t/**\n\t* Reference to the {@link module:engine/view/view~EditingView#domConverter}.\n\t*/\n\tdomConverter;\n\t/**\n\t* A set of documents which have added `selectionchange` listener to avoid adding a listener twice to the same\n\t* document.\n\t*/\n\t_documents = /* @__PURE__ */ new WeakSet();\n\t/**\n\t* Fires debounced event `selectionChangeDone`. It uses `es-toolkit#debounce` method to delay function call.\n\t*/\n\t_fireSelectionChangeDoneDebounced;\n\t/**\n\t* When called, starts clearing the {@link #_loopbackCounter} counter in time intervals. When the number of selection\n\t* changes exceeds a certain limit within the interval of time, the observer will not fire `selectionChange` but warn about\n\t* possible infinite selection loop.\n\t*/\n\t_clearInfiniteLoopInterval;\n\t/**\n\t* Unlocks the `isSelecting` state of the view document in case the selection observer did not record this fact\n\t* correctly (for whatever reason). It is a safeguard (paranoid check), that returns document to the normal state\n\t* after a certain period of time (debounced, postponed by each selectionchange event).\n\t*/\n\t_documentIsSelectingInactivityTimeoutDebounced;\n\t/**\n\t* Private property to check if the code does not enter infinite loop.\n\t*/\n\t_loopbackCounter = 0;\n\t/**\n\t* A set of DOM documents that have a pending selection change.\n\t* Pending selection change is recorded while selection change event is detected on non focused editable.\n\t*/\n\t_pendingSelectionChange = /* @__PURE__ */ new Set();\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tthis.mutationObserver = view.getObserver(MutationObserver);\n\t\tthis.focusObserver = view.getObserver(FocusObserver);\n\t\tthis.selection = this.document.selection;\n\t\tthis.domConverter = view.domConverter;\n\t\tthis._fireSelectionChangeDoneDebounced = debounce((data) => {\n\t\t\tthis.document.fire(\"selectionChangeDone\", data);\n\t\t}, 200);\n\t\tthis._clearInfiniteLoopInterval = setInterval(() => this._clearInfiniteLoop(), 1e3);\n\t\tthis._documentIsSelectingInactivityTimeoutDebounced = debounce(() => this.document.isSelecting = false, 5e3);\n\t\tthis.view.document.on(\"change:isFocused\", (evt, name, isFocused) => {\n\t\t\tif (isFocused && this._pendingSelectionChange.size) {\n\t\t\t\tfor (const domDocument of Array.from(this._pendingSelectionChange)) this._handleSelectionChange(domDocument);\n\t\t\t\tthis._pendingSelectionChange.clear();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve(domElement) {\n\t\tconst domDocument = domElement.ownerDocument;\n\t\tconst startDocumentIsSelecting = () => {\n\t\t\tthis.document.isSelecting = true;\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced();\n\t\t};\n\t\tconst endDocumentIsSelecting = () => {\n\t\t\tif (!this.document.isSelecting) return;\n\t\t\tthis._handleSelectionChange(domDocument);\n\t\t\tthis.document.isSelecting = false;\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced.cancel();\n\t\t};\n\t\tthis.listenTo(domElement, \"selectstart\", startDocumentIsSelecting, { priority: \"highest\" });\n\t\tthis.listenTo(domElement, \"keydown\", endDocumentIsSelecting, {\n\t\t\tpriority: \"highest\",\n\t\t\tuseCapture: true\n\t\t});\n\t\tthis.listenTo(domElement, \"keyup\", endDocumentIsSelecting, {\n\t\t\tpriority: \"highest\",\n\t\t\tuseCapture: true\n\t\t});\n\t\tif (this._documents.has(domDocument)) return;\n\t\tthis.listenTo(domDocument, \"mouseup\", endDocumentIsSelecting, {\n\t\t\tpriority: \"highest\",\n\t\t\tuseCapture: true\n\t\t});\n\t\tthis.listenTo(domDocument, \"selectionchange\", () => {\n\t\t\tif (this.document.isComposing && !env.isAndroid) return;\n\t\t\tthis._handleSelectionChange(domDocument);\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced();\n\t\t});\n\t\tthis.listenTo(this.view.document, \"compositionstart\", () => {\n\t\t\tthis._handleSelectionChange(domDocument);\n\t\t}, { priority: \"lowest\" });\n\t\tthis._documents.add(domDocument);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving(domElement) {\n\t\tthis.stopListening(domElement);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tclearInterval(this._clearInfiniteLoopInterval);\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t\tthis._documentIsSelectingInactivityTimeoutDebounced.cancel();\n\t}\n\t/* v8 ignore next 6 -- @preserve */\n\t_reportInfiniteLoop() {}\n\t/**\n\t* Selection change listener. {@link module:engine/view/observer/mutationobserver~MutationObserver#flush Flush} mutations, check if\n\t* a selection changes and fires {@link module:engine/view/document~ViewDocument#event:selectionChange} event on every change\n\t* and {@link module:engine/view/document~ViewDocument#event:selectionChangeDone} when a selection stop changing.\n\t*\n\t* @param domDocument DOM document.\n\t*/\n\t_handleSelectionChange(domDocument) {\n\t\tif (!this.isEnabled) return;\n\t\tconst domSelection = domDocument.defaultView.getSelection();\n\t\tif (this.checkShouldIgnoreEventFromTarget(domSelection.anchorNode)) return;\n\t\tthis.mutationObserver.flush();\n\t\tconst newViewSelection = this.domConverter.domSelectionToView(domSelection);\n\t\tif (newViewSelection.rangeCount == 0) {\n\t\t\tthis.view.hasDomSelection = false;\n\t\t\treturn;\n\t\t}\n\t\tthis.view.hasDomSelection = true;\n\t\tthis.focusObserver.flush();\n\t\tif (!this.view.document.isFocused && !this.view.document.isReadOnly) {\n\t\t\tthis._pendingSelectionChange.add(domDocument);\n\t\t\treturn;\n\t\t}\n\t\tthis._pendingSelectionChange.delete(domDocument);\n\t\tif (this.selection.isEqual(newViewSelection) && this.domConverter.isDomSelectionCorrect(domSelection)) return;\n\t\tif (++this._loopbackCounter > 60) {\n\t\t\tthis._reportInfiniteLoop();\n\t\t\treturn;\n\t\t}\n\t\tif (!isSelectionWithinRootElements(newViewSelection)) this.view.forceRender();\n\t\telse if (this.selection.isSimilar(newViewSelection)) this.view.forceRender();\n\t\telse {\n\t\t\tconst data = {\n\t\t\t\toldSelection: this.selection,\n\t\t\t\tnewSelection: newViewSelection,\n\t\t\t\tdomSelection\n\t\t\t};\n\t\t\tthis.document.fire(\"selectionChange\", data);\n\t\t\tthis._fireSelectionChangeDoneDebounced(data);\n\t\t}\n\t}\n\t/**\n\t* Clears `SelectionObserver` internal properties connected with preventing infinite loop.\n\t*/\n\t_clearInfiniteLoop() {\n\t\tthis._loopbackCounter = 0;\n\t}\n};\n/**\n* Checks if all roots of the selection's range boundaries are root elements.\n* Returns true if the selection is fully contained within root elements (not orphaned).\n*\n* @param selection The view selection to check.\n* @returns True if all range boundaries are within root elements, false otherwise.\n*/\nfunction isSelectionWithinRootElements(selection) {\n\treturn Array.from(selection.getRanges()).flatMap((range) => [range.start.root, range.end.root]).every((root) => root && root.is(\"rootElement\"));\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 engine/view/observer/compositionobserver\n*/\n/**\n* {@link module:engine/view/document~ViewDocument#event:compositionstart Compositionstart},\n* {@link module:engine/view/document~ViewDocument#event:compositionupdate compositionupdate} and\n* {@link module:engine/view/document~ViewDocument#event:compositionend compositionend} events observer.\n*\n* Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n*/\nvar CompositionObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = [\n\t\t\"compositionstart\",\n\t\t\"compositionupdate\",\n\t\t\"compositionend\"\n\t];\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tconst document = this.document;\n\t\tdocument.on(\"compositionstart\", () => {\n\t\t\tdocument.isComposing = true;\n\t\t});\n\t\tdocument.on(\"compositionend\", () => {\n\t\t\tdocument.isComposing = false;\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tthis.fire(domEvent.type, domEvent, { data: domEvent.data });\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* A facade over the native [`DataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n*/\nvar ViewDataTransfer = class {\n\t/**\n\t* The array of files created from the native `DataTransfer#files` or `DataTransfer#items`.\n\t*/\n\t_files;\n\t/**\n\t* The native DataTransfer object.\n\t*/\n\t_native;\n\t/**\n\t* @param nativeDataTransfer The native [`DataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n\t* @param options.cacheFiles Whether `files` list should be initialized in the constructor.\n\t*/\n\tconstructor(nativeDataTransfer, options = {}) {\n\t\tthis._files = options.cacheFiles ? getFiles(nativeDataTransfer) : null;\n\t\tthis._native = nativeDataTransfer;\n\t}\n\t/**\n\t* The array of files created from the native `DataTransfer#files` or `DataTransfer#items`.\n\t*/\n\tget files() {\n\t\tif (!this._files) this._files = getFiles(this._native);\n\t\treturn this._files;\n\t}\n\t/**\n\t* Returns an array of available native content types.\n\t*/\n\tget types() {\n\t\treturn this._native.types;\n\t}\n\t/**\n\t* Gets the data from the data transfer by its MIME type.\n\t*\n\t* ```ts\n\t* dataTransfer.getData( 'text/plain' );\n\t* ```\n\t*\n\t* @param type The MIME type. E.g. `text/html` or `text/plain`.\n\t*/\n\tgetData(type) {\n\t\treturn this._native.getData(type);\n\t}\n\t/**\n\t* Sets the data in the data transfer.\n\t*\n\t* @param type The MIME type. E.g. `text/html` or `text/plain`.\n\t*/\n\tsetData(type, data) {\n\t\tthis._native.setData(type, data);\n\t}\n\t/**\n\t* The effect that is allowed for a drag operation.\n\t*/\n\tset effectAllowed(value) {\n\t\tthis._native.effectAllowed = value;\n\t}\n\tget effectAllowed() {\n\t\treturn this._native.effectAllowed;\n\t}\n\t/**\n\t* The actual drop effect.\n\t*/\n\tset dropEffect(value) {\n\t\tthis._native.dropEffect = value;\n\t}\n\tget dropEffect() {\n\t\treturn this._native.dropEffect;\n\t}\n\t/**\n\t* Set a preview image of the dragged content.\n\t*/\n\tsetDragImage(image, x, y) {\n\t\tthis._native.setDragImage(image, x, y);\n\t}\n\t/**\n\t* Whether the dragging operation was canceled.\n\t*/\n\tget isCanceled() {\n\t\treturn this._native.dropEffect == \"none\" || !!this._native.mozUserCancelled;\n\t}\n};\nfunction getFiles(nativeDataTransfer) {\n\tconst files = Array.from(nativeDataTransfer.files || []);\n\tconst items = Array.from(nativeDataTransfer.items || []);\n\tif (files.length) return files;\n\treturn items.filter((item) => item.kind === \"file\").map((item) => item.getAsFile());\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 engine/view/observer/inputobserver\n*/\n/**\n* Observer for events connected with data input.\n*\n* **Note**: This observer is attached by {@link module:engine/view/view~EditingView} and available by default in all\n* editor instances.\n*/\nvar InputObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = \"beforeinput\";\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tconst domTargetRanges = domEvent.getTargetRanges();\n\t\tconst view = this.view;\n\t\tconst viewDocument = view.document;\n\t\tlet dataTransfer = null;\n\t\tlet data = null;\n\t\tlet targetRanges = [];\n\t\tif (domEvent.dataTransfer) dataTransfer = new ViewDataTransfer(domEvent.dataTransfer);\n\t\tif (domEvent.data !== null) data = domEvent.data;\n\t\telse if (dataTransfer) data = dataTransfer.getData(\"text/plain\");\n\t\tif (viewDocument.selection.isFake) {\n\t\t\ttargetRanges = Array.from(viewDocument.selection.getRanges());\n\t\t\tdomEvent.preventDefault();\n\t\t} else if (domTargetRanges.length) targetRanges = domTargetRanges.map((domRange) => {\n\t\t\tlet viewStart = view.domConverter.domPositionToView(domRange.startContainer, domRange.startOffset);\n\t\t\tconst viewEnd = view.domConverter.domPositionToView(domRange.endContainer, domRange.endOffset);\n\t\t\tif (viewStart && startsWithFiller(domRange.startContainer) && domRange.startOffset < 7) {\n\t\t\t\tdomEvent.preventDefault();\n\t\t\t\tlet count = 7 - domRange.startOffset;\n\t\t\t\tviewStart = viewStart.getLastMatchingPosition((value) => {\n\t\t\t\t\tif (value.item.is(\"attributeElement\") || value.item.is(\"uiElement\")) return true;\n\t\t\t\t\tif (value.item.is(\"$textProxy\") && count--) return true;\n\t\t\t\t\treturn false;\n\t\t\t\t}, {\n\t\t\t\t\tdirection: \"backward\",\n\t\t\t\t\tsingleCharacters: true\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (isFollowedByInlineFiller(domRange.endContainer, domRange.endOffset)) domEvent.preventDefault();\n\t\t\tif (viewStart) return view.createRange(viewStart, viewEnd);\n\t\t\telse if (viewEnd) return view.createRange(viewEnd);\n\t\t}).filter((range) => !!range);\n\t\telse if (env.isAndroid) {\n\t\t\tconst domSelection = domEvent.target.ownerDocument.defaultView.getSelection();\n\t\t\ttargetRanges = Array.from(view.domConverter.domSelectionToView(domSelection).getRanges());\n\t\t}\n\t\tif (env.isAndroid && domEvent.inputType == \"insertCompositionText\" && data && data.endsWith(\"\\n\")) {\n\t\t\tthis.fire(domEvent.type, domEvent, {\n\t\t\t\tinputType: \"insertParagraph\",\n\t\t\t\ttargetRanges: [view.createRange(targetRanges[0].end)]\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif ([\"insertText\", \"insertReplacementText\"].includes(domEvent.inputType) && data && data.includes(\"\\n\")) {\n\t\t\tconst parts = data.split(/\\n{1,2}/g);\n\t\t\tlet partTargetRanges = targetRanges;\n\t\t\tdomEvent.preventDefault();\n\t\t\tfor (let i = 0; i < parts.length; i++) {\n\t\t\t\tconst dataPart = parts[i];\n\t\t\t\tif (dataPart != \"\") {\n\t\t\t\t\tthis.fire(domEvent.type, domEvent, {\n\t\t\t\t\t\tdata: dataPart,\n\t\t\t\t\t\tdataTransfer,\n\t\t\t\t\t\ttargetRanges: partTargetRanges,\n\t\t\t\t\t\tinputType: domEvent.inputType,\n\t\t\t\t\t\tisComposing: domEvent.isComposing\n\t\t\t\t\t});\n\t\t\t\t\tpartTargetRanges = [viewDocument.selection.getFirstRange()];\n\t\t\t\t}\n\t\t\t\tif (i + 1 < parts.length) {\n\t\t\t\t\tthis.fire(domEvent.type, domEvent, {\n\t\t\t\t\t\tinputType: \"insertParagraph\",\n\t\t\t\t\t\ttargetRanges: partTargetRanges\n\t\t\t\t\t});\n\t\t\t\t\tpartTargetRanges = [viewDocument.selection.getFirstRange()];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis.fire(domEvent.type, domEvent, {\n\t\t\tdata,\n\t\t\tdataTransfer,\n\t\t\ttargetRanges,\n\t\t\tinputType: domEvent.inputType,\n\t\t\tisComposing: domEvent.isComposing\n\t\t});\n\t}\n};\n/**\n* Returns `true` if there is an inline filler just after the position in DOM.\n* It walks up the DOM tree if the offset is at the end of the node.\n*/\nfunction isFollowedByInlineFiller(node, offset) {\n\twhile (node.parentNode) {\n\t\tif (isText(node)) {\n\t\t\tif (offset != node.data.length) return false;\n\t\t} else if (offset != node.childNodes.length) return false;\n\t\toffset = indexOf(node) + 1;\n\t\tnode = node.parentNode;\n\t\tif (offset < node.childNodes.length && startsWithFiller(node.childNodes[offset])) return true;\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 engine/view/observer/arrowkeysobserver\n*/\n/**\n* Arrow keys observer introduces the {@link module:engine/view/document~ViewDocument#event:arrowKey `Document#arrowKey`} event.\n*\n* Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n*/\nvar ArrowKeysObserver = class extends Observer {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tthis.document.on(\"keydown\", (event, data) => {\n\t\t\tif (this.isEnabled && isArrowKeyCode(data.keyCode)) {\n\t\t\t\tconst eventInfo = new BubblingEventInfo(this.document, \"arrowKey\", this.document.selection.getFirstRange());\n\t\t\t\tthis.document.fire(eventInfo, data);\n\t\t\t\tif (eventInfo.stop.called) event.stop();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\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* Tab observer introduces the {@link module:engine/view/document~ViewDocument#event:tab `Document#tab`} event.\n*\n* Note that because {@link module:engine/view/observer/tabobserver~TabObserver} is attached by the\n* {@link module:engine/view/view~EditingView}, this event is available by default.\n*/\nvar TabObserver = class extends Observer {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tconst doc = this.document;\n\t\tdoc.on(\"keydown\", (evt, data) => {\n\t\t\tif (!this.isEnabled || data.keyCode != keyCodes.tab || data.ctrlKey) return;\n\t\t\tconst event = new BubblingEventInfo(doc, \"tab\", doc.selection.getFirstRange());\n\t\t\tdoc.fire(event, data);\n\t\t\tif (event.stop.called) evt.stop();\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\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 engine/view/view\n*/\nconst EditingViewBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Editor's view controller class. Its main responsibility is DOM - View management for editing purposes, to provide\n* abstraction over the DOM structure and events and hide all browsers quirks.\n*\n* View controller renders view document to DOM whenever view structure changes. To determine when view can be rendered,\n* all changes need to be done using the {@link module:engine/view/view~EditingView#change} method, using\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter}:\n*\n* ```ts\n* view.change( writer => {\n* \twriter.insert( position, writer.createText( 'foo' ) );\n* } );\n* ```\n*\n* View controller also register {@link module:engine/view/observer/observer~Observer observers} which observes changes\n* on DOM and fire events on the {@link module:engine/view/document~ViewDocument Document}.\n* Note that the following observers are added by the class constructor and are always available:\n*\n* * {@link module:engine/view/observer/selectionobserver~SelectionObserver},\n* * {@link module:engine/view/observer/focusobserver~FocusObserver},\n* * {@link module:engine/view/observer/keyobserver~KeyObserver},\n* * {@link module:engine/view/observer/fakeselectionobserver~FakeSelectionObserver}.\n* * {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n* * {@link module:engine/view/observer/inputobserver~InputObserver}.\n* * {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver}.\n* * {@link module:engine/view/observer/tabobserver~TabObserver}.\n*\n* This class also {@link module:engine/view/view~EditingView#attachDomRoot binds the DOM and the view elements}.\n*\n* If you do not need full a DOM - view management, and only want to transform a tree of view elements to a tree of DOM\n* elements you do not need this controller. You can use the {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n* instead.\n*/\nvar EditingView = class extends EditingViewBase {\n\t/**\n\t* Instance of the {@link module:engine/view/document~ViewDocument} associated with this view controller.\n\t*/\n\tdocument;\n\t/**\n\t* Instance of the {@link module:engine/view/domconverter~ViewDomConverter domConverter} used by\n\t* {@link module:engine/view/view~EditingView#_renderer renderer}\n\t* and {@link module:engine/view/observer/observer~Observer observers}.\n\t*/\n\tdomConverter;\n\t/**\n\t* Roots of the DOM tree. Map on the `HTMLElement`s with roots names as keys.\n\t*/\n\tdomRoots = /* @__PURE__ */ new Map();\n\t/**\n\t* Instance of the {@link module:engine/view/renderer~ViewRenderer renderer}.\n\t*/\n\t_renderer;\n\t/**\n\t* A DOM root attributes cache. It saves the initial values of DOM root attributes before the DOM element\n\t* is {@link module:engine/view/view~EditingView#attachDomRoot attached} to the view so later on, when\n\t* the view is destroyed ({@link module:engine/view/view~EditingView#detachDomRoot}), they can be easily restored.\n\t* This way, the DOM element can go back to the (clean) state as if the editing view never used it.\n\t*/\n\t_initialDomRootAttributes = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* Map of registered {@link module:engine/view/observer/observer~Observer observers}.\n\t*/\n\t_observers = /* @__PURE__ */ new Map();\n\t/**\n\t* ViewDowncastWriter instance used in {@link #change change method} callbacks.\n\t*/\n\t_writer;\n\t/**\n\t* Is set to `true` when {@link #change view changes} are currently in progress.\n\t*/\n\t_ongoingChange = false;\n\t/**\n\t* Used to prevent calling {@link #forceRender} and {@link #change} during rendering view to the DOM.\n\t*/\n\t_postFixersInProgress = false;\n\t/**\n\t* Internal flag to temporary disable rendering. See the usage in the {@link #_disableRendering}.\n\t*/\n\t_renderingDisabled = false;\n\t/**\n\t* Internal flag that disables rendering when there are no changes since the last rendering.\n\t* It stores information about changed selection and changed elements from attached document roots.\n\t*/\n\t_hasChangedSinceTheLastRendering = false;\n\t/**\n\t* @param stylesProcessor The styles processor instance.\n\t*/\n\tconstructor(stylesProcessor) {\n\t\tsuper();\n\t\tthis.document = new ViewDocument(stylesProcessor);\n\t\tthis.domConverter = new ViewDomConverter(this.document);\n\t\tthis.set(\"isRenderingInProgress\", false);\n\t\tthis.set(\"hasDomSelection\", false);\n\t\tthis._renderer = new ViewRenderer(this.domConverter, this.document.selection);\n\t\tthis._renderer.bind(\"isFocused\", \"isSelecting\", \"isComposing\").to(this.document, \"isFocused\", \"isSelecting\", \"isComposing\");\n\t\tthis._writer = new ViewDowncastWriter(this.document);\n\t\tthis.addObserver(MutationObserver);\n\t\tthis.addObserver(FocusObserver);\n\t\tthis.addObserver(SelectionObserver);\n\t\tthis.addObserver(KeyObserver);\n\t\tthis.addObserver(FakeSelectionObserver);\n\t\tthis.addObserver(CompositionObserver);\n\t\tthis.addObserver(ArrowKeysObserver);\n\t\tthis.addObserver(InputObserver);\n\t\tthis.addObserver(TabObserver);\n\t\tinjectQuirksHandling(this);\n\t\tinjectUiElementHandling(this);\n\t\tthis.on(\"render\", () => {\n\t\t\tthis._render();\n\t\t\tthis.document.fire(\"layoutChanged\");\n\t\t\tthis._hasChangedSinceTheLastRendering = false;\n\t\t});\n\t\tthis.listenTo(this.document.selection, \"change\", () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t});\n\t\tthis.listenTo(this.document, \"change:isFocused\", () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t});\n\t\tif (env.isiOS) this.listenTo(this.document, \"blur\", (evt, data) => {\n\t\t\tif (!this.domConverter.mapDomToView(data.domEvent.relatedTarget)) this.domConverter._clearDomSelection();\n\t\t});\n\t\tthis.listenTo(this.document, \"mutations\", (evt, { mutations }) => {\n\t\t\tmutations.forEach((mutation) => this._renderer.markToSync(mutation.type, mutation.node));\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(this.document, \"mutations\", () => {\n\t\t\tthis.forceRender();\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* Attaches a DOM root element to the view element and enable all observers on that element.\n\t* Also {@link module:engine/view/renderer~ViewRenderer#markToSync mark element} to be synchronized\n\t* with the view what means that all child nodes will be removed and replaced with content of the view root.\n\t*\n\t* This method also will change view element name as the same as tag name of given dom root.\n\t* Name is always transformed to lower case.\n\t*\n\t* **Note:** Use {@link #detachDomRoot `detachDomRoot()`} to revert this action.\n\t*\n\t* @param domRoot DOM root element.\n\t* @param name Name of the root.\n\t*/\n\tattachDomRoot(domRoot, name = \"main\") {\n\t\tconst viewRoot = this.document.getRoot(name);\n\t\tviewRoot._name = domRoot.tagName.toLowerCase();\n\t\tconst initialDomRootAttributes = {};\n\t\tfor (const { name, value } of Array.from(domRoot.attributes)) {\n\t\t\tinitialDomRootAttributes[name] = value;\n\t\t\tif (name === \"class\") this._writer.addClass(value.split(\" \"), viewRoot);\n\t\t\telse if (!viewRoot.hasAttribute(name)) this._writer.setAttribute(name, value, viewRoot);\n\t\t}\n\t\tthis._initialDomRootAttributes.set(domRoot, initialDomRootAttributes);\n\t\tconst updateContenteditableAttribute = () => {\n\t\t\tthis._writer.setAttribute(\"contenteditable\", (!viewRoot.isReadOnly).toString(), viewRoot);\n\t\t\tif (viewRoot.isReadOnly) this._writer.addClass(\"ck-read-only\", viewRoot);\n\t\t\telse this._writer.removeClass(\"ck-read-only\", viewRoot);\n\t\t};\n\t\tupdateContenteditableAttribute();\n\t\tthis.domRoots.set(name, domRoot);\n\t\tthis.domConverter.bindElements(domRoot, viewRoot);\n\t\tthis._renderer.markToSync(\"children\", viewRoot);\n\t\tthis._renderer.markToSync(\"attributes\", viewRoot);\n\t\tthis._renderer.domDocuments.add(domRoot.ownerDocument);\n\t\tviewRoot.on(\"change:children\", (evt, node) => this._renderer.markToSync(\"children\", node));\n\t\tviewRoot.on(\"change:attributes\", (evt, node) => this._renderer.markToSync(\"attributes\", node));\n\t\tviewRoot.on(\"change:text\", (evt, node) => this._renderer.markToSync(\"text\", node));\n\t\tviewRoot.on(\"change:isReadOnly\", () => this.change(updateContenteditableAttribute));\n\t\tviewRoot.on(\"change\", () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t});\n\t\tfor (const observer of this._observers.values()) observer.observe(domRoot, name);\n\t}\n\t/**\n\t* Detaches a DOM root element from the view element and restores its attributes to the state before\n\t* {@link #attachDomRoot `attachDomRoot()`}.\n\t*\n\t* @param name Name of the root to detach.\n\t*/\n\tdetachDomRoot(name) {\n\t\tconst domRoot = this.domRoots.get(name);\n\t\tArray.from(domRoot.attributes).forEach(({ name }) => domRoot.removeAttribute(name));\n\t\tconst initialDomRootAttributes = this._initialDomRootAttributes.get(domRoot);\n\t\tfor (const attribute in initialDomRootAttributes) domRoot.setAttribute(attribute, initialDomRootAttributes[attribute]);\n\t\tthis.domRoots.delete(name);\n\t\tthis.domConverter.unbindDomElement(domRoot);\n\t\tfor (const observer of this._observers.values()) observer.stopObserving(domRoot);\n\t}\n\t/**\n\t* Gets DOM root element.\n\t*\n\t* @param name  Name of the root.\n\t* @returns DOM root element instance.\n\t*/\n\tgetDomRoot(name = \"main\") {\n\t\treturn this.domRoots.get(name);\n\t}\n\t/**\n\t* Creates observer of the given type if not yet created, {@link module:engine/view/observer/observer~Observer#enable enables} it\n\t* and {@link module:engine/view/observer/observer~Observer#observe attaches} to all existing and future\n\t* {@link #domRoots DOM roots}.\n\t*\n\t* Note: Observers are recognized by their constructor (classes). A single observer will be instantiated and used only\n\t* when registered for the first time. This means that features and other components can register a single observer\n\t* multiple times without caring whether it has been already added or not.\n\t*\n\t* @param ObserverConstructor The constructor of an observer to add.\n\t* Should create an instance inheriting from {@link module:engine/view/observer/observer~Observer}.\n\t* @returns Added observer instance.\n\t*/\n\taddObserver(ObserverConstructor) {\n\t\tlet observer = this._observers.get(ObserverConstructor);\n\t\tif (observer) return observer;\n\t\tobserver = new ObserverConstructor(this);\n\t\tthis._observers.set(ObserverConstructor, observer);\n\t\tfor (const [name, domElement] of this.domRoots) observer.observe(domElement, name);\n\t\tobserver.enable();\n\t\treturn observer;\n\t}\n\t/**\n\t* Returns observer of the given type or `undefined` if such observer has not been added yet.\n\t*\n\t* @param ObserverConstructor The constructor of an observer to get.\n\t* @returns Observer instance or undefined.\n\t*/\n\tgetObserver(ObserverConstructor) {\n\t\treturn this._observers.get(ObserverConstructor);\n\t}\n\t/**\n\t* Disables all added observers.\n\t*/\n\tdisableObservers() {\n\t\tfor (const observer of this._observers.values()) observer.disable();\n\t}\n\t/**\n\t* Enables all added observers.\n\t*/\n\tenableObservers() {\n\t\tfor (const observer of this._observers.values()) observer.enable();\n\t}\n\t/**\n\t* Scrolls the page viewport and {@link #domRoots} with their ancestors to reveal the\n\t* caret, **if not already visible to the user**.\n\t*\n\t* **Note**: Calling this method fires the {@link module:engine/view/view~ViewScrollToTheSelectionEvent} event that\n\t* allows custom behaviors.\n\t*\n\t* @param options Additional configuration of the scrolling behavior.\n\t* @param options.viewportOffset A distance between the DOM selection and the viewport boundary to be maintained\n\t* while scrolling to the selection (default is 20px). Setting this value to `0` will reveal the selection precisely at\n\t* the viewport boundary.\n\t* @param options.ancestorOffset A distance between the DOM selection and scrollable DOM root ancestor(s) to be maintained\n\t* while scrolling to the selection (default is 20px). Setting this value to `0` will reveal the selection precisely at\n\t* the scrollable ancestor(s) boundary.\n\t* @param options.alignToTop When set `true`, the DOM selection will be aligned to the top of the viewport if not already visible\n\t* (see `forceScroll` to learn more).\n\t* @param options.forceScroll When set `true`, the DOM selection will be aligned to the top of the viewport and scrollable ancestors\n\t* whether it is already visible or not. This option will only work when `alignToTop` is `true`.\n\t*/\n\tscrollToTheSelection({ alignToTop, forceScroll, viewportOffset = 20, ancestorOffset = 20 } = {}) {\n\t\tconst range = this.document.selection.getFirstRange();\n\t\tif (!range) return;\n\t\tconst originalArgs = cloneDeep({\n\t\t\talignToTop,\n\t\t\tforceScroll,\n\t\t\tviewportOffset,\n\t\t\tancestorOffset\n\t\t});\n\t\tif (typeof viewportOffset === \"number\") viewportOffset = {\n\t\t\ttop: viewportOffset,\n\t\t\tbottom: viewportOffset,\n\t\t\tleft: viewportOffset,\n\t\t\tright: viewportOffset\n\t\t};\n\t\tconst options = {\n\t\t\ttarget: this.domConverter.viewRangeToDom(range),\n\t\t\tviewportOffset,\n\t\t\tancestorOffset,\n\t\t\talignToTop,\n\t\t\tforceScroll\n\t\t};\n\t\tthis.fire(\"scrollToTheSelection\", options, originalArgs);\n\t\tscrollViewportToShowTarget(options);\n\t}\n\t/**\n\t* It will focus DOM element representing {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement}\n\t* that is currently having selection inside.\n\t*/\n\tfocus() {\n\t\tif (!this.document.isFocused) {\n\t\t\tconst editable = this.document.selection.editableElement;\n\t\t\tif (editable) {\n\t\t\t\tthis.domConverter.focus(editable);\n\t\t\t\tthis.forceRender();\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* The `change()` method is the primary way of changing the view. You should use it to modify any node in the view tree.\n\t* It makes sure that after all changes are made the view is rendered to the DOM (assuming that the view will be changed\n\t* inside the callback). It prevents situations when the DOM is updated when the view state is not yet correct. It allows\n\t* to nest calls one inside another and still performs a single rendering after all those changes are made.\n\t* It also returns the return value of its callback.\n\t*\n\t* ```ts\n\t* const text = view.change( writer => {\n\t* \tconst newText = writer.createText( 'foo' );\n\t* \twriter.insert( position1, newText );\n\t*\n\t* \tview.change( writer => {\n\t* \t\twriter.insert( position2, writer.createText( 'bar' ) );\n\t* \t} );\n\t*\n\t* \twriter.remove( range );\n\t*\n\t* \treturn newText;\n\t* } );\n\t* ```\n\t*\n\t* When the outermost change block is done and rendering to the DOM is over the\n\t* {@link module:engine/view/view~EditingView#event:render `View#render`} event is fired.\n\t*\n\t* This method throws a `applying-view-changes-on-rendering` error when\n\t* the change block is used after rendering to the DOM has started.\n\t*\n\t* @param callback Callback function which may modify the view.\n\t* @returns Value returned by the callback.\n\t*/\n\tchange(callback) {\n\t\tif (this.isRenderingInProgress || this._postFixersInProgress)\n /**\n\t\t* Thrown when there is an attempt to make changes to the view tree when it is in incorrect state. This may\n\t\t* cause some unexpected behaviour and inconsistency between the DOM and the view.\n\t\t* This may be caused by:\n\t\t*\n\t\t* * calling {@link module:engine/view/view~EditingView#change} or {@link module:engine/view/view~EditingView#forceRender}\n\t\t* during rendering process,\n\t\t* * calling {@link module:engine/view/view~EditingView#change} or {@link module:engine/view/view~EditingView#forceRender}\n\t\t* inside of {@link module:engine/view/document~ViewDocument#registerPostFixer post-fixer function}.\n\t\t*\n\t\t* @error cannot-change-view-tree\n\t\t*/\n\t\tthrow new CKEditorError(\"cannot-change-view-tree\", this);\n\t\ttry {\n\t\t\tif (this._ongoingChange) return callback(this._writer);\n\t\t\tthis._ongoingChange = true;\n\t\t\tconst callbackResult = callback(this._writer);\n\t\t\tthis._ongoingChange = false;\n\t\t\tif (!this._renderingDisabled && this._hasChangedSinceTheLastRendering) {\n\t\t\t\tthis._postFixersInProgress = true;\n\t\t\t\tthis.document._callPostFixers(this._writer);\n\t\t\t\tthis._postFixersInProgress = false;\n\t\t\t\tthis.fire(\"render\");\n\t\t\t}\n\t\t\treturn callbackResult;\n\t\t} catch (err) {\n\t\t\tCKEditorError.rethrowUnexpectedError(err, this);\n\t\t}\n\t}\n\t/**\n\t* Forces rendering {@link module:engine/view/document~ViewDocument view document} to DOM. If any view changes are\n\t* currently in progress, rendering will start after all {@link #change change blocks} are processed.\n\t*\n\t* Note that this method is dedicated for special cases. All view changes should be wrapped in the {@link #change}\n\t* block and the view will automatically check whether it needs to render DOM or not.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `applying-view-changes-on-rendering` when\n\t* trying to re-render when rendering to DOM has already started.\n\t*/\n\tforceRender() {\n\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\tthis.getObserver(FocusObserver).flush();\n\t\tthis.change(() => {});\n\t}\n\t/**\n\t* Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t*/\n\tdestroy() {\n\t\tfor (const observer of this._observers.values()) observer.destroy();\n\t\tthis.document.destroy();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Creates position at the given location. The location can be specified as:\n\t*\n\t* * a {@link module:engine/view/position~ViewPosition position},\n\t* * parent element and offset (offset defaults to `0`),\n\t* * parent element and `'end'` (sets position at the end of that element),\n\t* * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t*\n\t* This method is a shortcut to other constructors such as:\n\t*\n\t* * {@link #createPositionBefore},\n\t* * {@link #createPositionAfter},\n\t*\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t*/\n\tcreatePositionAt(itemOrPosition, offset) {\n\t\treturn ViewPosition._createAt(itemOrPosition, offset);\n\t}\n\t/**\n\t* Creates a new position after given view item.\n\t*\n\t* @param item View item after which the position should be located.\n\t*/\n\tcreatePositionAfter(item) {\n\t\treturn ViewPosition._createAfter(item);\n\t}\n\t/**\n\t* Creates a new position before given view item.\n\t*\n\t* @param item View item before which the position should be located.\n\t*/\n\tcreatePositionBefore(item) {\n\t\treturn ViewPosition._createBefore(item);\n\t}\n\t/**\n\t* Creates a range spanning from `start` position to `end` position.\n\t*\n\t* **Note:** This factory method creates it's own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t*\n\t* @param start Start position.\n\t* @param end End position. If not set, range will be collapsed at `start` position.\n\t*/\n\tcreateRange(start, end) {\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t*/\n\tcreateRangeOn(item) {\n\t\treturn ViewRange._createOn(item);\n\t}\n\t/**\n\t* Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* @param element Element which is a parent for the range.\n\t*/\n\tcreateRangeIn(element) {\n\t\treturn ViewRange._createIn(element);\n\t}\n\tcreateSelection(...args) {\n\t\treturn new ViewSelection(...args);\n\t}\n\t/**\n\t* Disables or enables rendering. If the flag is set to `true` then the rendering will be disabled.\n\t* If the flag is set to `false` and if there was some change in the meantime, then the rendering action will be performed.\n\t*\n\t* @internal\n\t* @param flag A flag indicates whether the rendering should be disabled.\n\t*/\n\t_disableRendering(flag) {\n\t\tthis._renderingDisabled = flag;\n\t\tif (flag == false) this.change(() => {});\n\t}\n\t/**\n\t* Renders all changes. In order to avoid triggering the observers (e.g. selection) all observers are disabled\n\t* before rendering and re-enabled after that.\n\t*/\n\t_render() {\n\t\tthis.isRenderingInProgress = true;\n\t\tthis.disableObservers();\n\t\tthis._renderer.render();\n\t\tthis.enableObservers();\n\t\tthis.isRenderingInProgress = false;\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*/\nvar ModelTypeCheckable = class {\n\t/* v8 ignore next -- @preserve */\n\tis() {\n\t\tthrow new Error(\"is() method is abstract\");\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 engine/model/textproxy\n*/\n/**\n* `ModelTextProxy` represents a part of {@link module:engine/model/text~ModelText text node}.\n*\n* Since {@link module:engine/model/position~ModelPosition positions} can be placed between characters of a text node,\n* {@link module:engine/model/range~ModelRange ranges} may contain only parts of text nodes.\n* When {@link module:engine/model/range~ModelRange#getItems getting items}\n* contained in such range, we need to represent a part of that text node, since returning the whole text node would be incorrect.\n* `ModelTextProxy` solves this issue.\n*\n* `ModelTextProxy` has an API similar to {@link module:engine/model/text~ModelText Text} and allows to do\n* most of the common tasks performed on model nodes.\n*\n* **Note:** Some `ModelTextProxy` instances may represent whole text node, not just a part of it.\n* See {@link module:engine/model/textproxy~ModelTextProxy#isPartial}.\n*\n* **Note:** `ModelTextProxy` is not an instance of {@link module:engine/model/node~ModelNode node}. Keep this in mind when using it as a\n* parameter of methods.\n*\n* **Note:** `ModelTextProxy` is a readonly interface. If you want to perform changes on model data represented by a `ModelTextProxy`\n* use {@link module:engine/model/writer~ModelWriter model writer API}.\n*\n* **Note:** `ModelTextProxy` instances are created on the fly, basing on the current state of model. Because of this, it is\n* highly unrecommended to store references to `ModelTextProxy` instances. `ModelTextProxy` instances are not refreshed when\n* model changes, so they might get invalidated. Instead, consider creating {@link module:engine/model/liveposition~ModelLivePosition live\n* position}.\n*\n* `ModelTextProxy` instances are created by {@link module:engine/model/treewalker~ModelTreeWalker model tree walker}.\n* You should not need to create an instance of this class by your own.\n*/\nvar ModelTextProxy = class extends ModelTypeCheckable {\n\t/**\n\t* Text node which part is represented by this text proxy.\n\t*/\n\ttextNode;\n\t/**\n\t* Text data represented by this text proxy.\n\t*/\n\tdata;\n\t/**\n\t* Offset in {@link module:engine/model/textproxy~ModelTextProxy#textNode text node} from which the text proxy starts.\n\t*/\n\toffsetInText;\n\t/**\n\t* Creates a text proxy.\n\t*\n\t* @internal\n\t* @param textNode Text node which part is represented by this text proxy.\n\t* @param offsetInText Offset in {@link module:engine/model/textproxy~ModelTextProxy#textNode text node} from which the text proxy\n\t* starts.\n\t* @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t*/\n\tconstructor(textNode, offsetInText, length) {\n\t\tsuper();\n\t\tthis.textNode = textNode;\n\t\tif (offsetInText < 0 || offsetInText > textNode.offsetSize)\n /**\n\t\t* Given `offsetInText` value is incorrect.\n\t\t*\n\t\t* @error model-textproxy-wrong-offsetintext\n\t\t*/\n\t\tthrow new CKEditorError(\"model-textproxy-wrong-offsetintext\", this);\n\t\tif (length < 0 || offsetInText + length > textNode.offsetSize)\n /**\n\t\t* Given `length` value is incorrect.\n\t\t*\n\t\t* @error model-textproxy-wrong-length\n\t\t*/\n\t\tthrow new CKEditorError(\"model-textproxy-wrong-length\", this);\n\t\tthis.data = textNode.data.substring(offsetInText, offsetInText + length);\n\t\tthis.offsetInText = offsetInText;\n\t}\n\t/**\n\t* Offset at which this text proxy starts in it's parent.\n\t*\n\t* @see module:engine/model/node~ModelNode#startOffset\n\t*/\n\tget startOffset() {\n\t\treturn this.textNode.startOffset !== null ? this.textNode.startOffset + this.offsetInText : null;\n\t}\n\t/**\n\t* Offset size of this text proxy. Equal to the number of characters represented by the text proxy.\n\t*\n\t* @see module:engine/model/node~ModelNode#offsetSize\n\t*/\n\tget offsetSize() {\n\t\treturn this.data.length;\n\t}\n\t/**\n\t* Offset at which this text proxy ends in it's parent.\n\t*\n\t* @see module:engine/model/node~ModelNode#endOffset\n\t*/\n\tget endOffset() {\n\t\treturn this.startOffset !== null ? this.startOffset + this.offsetSize : null;\n\t}\n\t/**\n\t* Flag indicating whether `ModelTextProxy` instance covers only part of the original\n\t* {@link module:engine/model/text~ModelText text node} (`true`) or the whole text node (`false`).\n\t*\n\t* This is `false` when text proxy starts at the very beginning of\n\t* {@link module:engine/model/textproxy~ModelTextProxy#textNode textNode}\n\t* ({@link module:engine/model/textproxy~ModelTextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t* text node size.\n\t*/\n\tget isPartial() {\n\t\treturn this.offsetSize !== this.textNode.offsetSize;\n\t}\n\t/**\n\t* Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t*/\n\tget parent() {\n\t\treturn this.textNode.parent;\n\t}\n\t/**\n\t* Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t*/\n\tget root() {\n\t\treturn this.textNode.root;\n\t}\n\t/**\n\t* Gets path to this text proxy.\n\t*\n\t* @see module:engine/model/node~ModelNode#getPath\n\t*/\n\tgetPath() {\n\t\tconst path = this.textNode.getPath();\n\t\tif (path.length > 0) path[path.length - 1] += this.offsetInText;\n\t\treturn path;\n\t}\n\t/**\n\t* Returns ancestors array of this text proxy.\n\t*\n\t* @param options Options object.\n\t* @param options.includeSelf When set to `true` this text proxy will be also included in parent's array.\n\t* @param options.parentFirst When set to `true`, array will be sorted from text proxy parent to root element,\n\t* otherwise root element will be the first item in the array.\n\t* @returns Array with ancestors.\n\t*/\n\tgetAncestors(options = {}) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\t\twhile (parent) {\n\t\t\tancestors[options.parentFirst ? \"push\" : \"unshift\"](parent);\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn ancestors;\n\t}\n\t/**\n\t* Checks if this text proxy has an attribute for given key.\n\t*\n\t* @param key Key of attribute to check.\n\t* @returns `true` if attribute with given key is set on text proxy, `false` otherwise.\n\t*/\n\thasAttribute(key) {\n\t\treturn this.textNode.hasAttribute(key);\n\t}\n\t/**\n\t* Gets an attribute value for given key or `undefined` if that attribute is not set on text proxy.\n\t*\n\t* @param key Key of attribute to look for.\n\t* @returns Attribute value or `undefined`.\n\t*/\n\tgetAttribute(key) {\n\t\treturn this.textNode.getAttribute(key);\n\t}\n\t/**\n\t* Returns iterator that iterates over this node's attributes. Attributes are returned as arrays containing two\n\t* items. First one is attribute key and second is attribute value.\n\t*\n\t* This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t*/\n\tgetAttributes() {\n\t\treturn this.textNode.getAttributes();\n\t}\n\t/**\n\t* Returns iterator that iterates over this node's attribute keys.\n\t*/\n\tgetAttributeKeys() {\n\t\treturn this.textNode.getAttributeKeys();\n\t}\n};\nModelTextProxy.prototype.is = function(type) {\n\treturn type === \"$textProxy\" || type === \"model:$textProxy\" || type === \"textProxy\" || type === \"model:textProxy\";\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* Position iterator class. It allows to iterate forward and backward over the document.\n*/\nvar ModelTreeWalker = class {\n\t/**\n\t* Walking direction. Defaults `'forward'`.\n\t*/\n\tdirection;\n\t/**\n\t* Iterator boundaries.\n\t*\n\t* When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t* on the start of boundary, then `{ done: true }` is returned.\n\t*\n\t* If boundaries are not defined they are set before first and after last child of the root node.\n\t*/\n\tboundaries;\n\t/**\n\t* Flag indicating whether all consecutive characters with the same attributes should be\n\t* returned as one {@link module:engine/model/textproxy~ModelTextProxy} (`true`) or one by one (`false`).\n\t*/\n\tsingleCharacters;\n\t/**\n\t* Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t* iterated node will not be returned along with `elementEnd` tag.\n\t*/\n\tshallow;\n\t/**\n\t* Flag indicating whether iterator should ignore `elementEnd` tags. If the option is true walker will not\n\t* return a parent node of the start position. If this option is `true` each {@link module:engine/model/element~ModelElement} will\n\t* be returned once, while if the option is `false` they might be returned twice:\n\t* for `'elementStart'` and `'elementEnd'`.\n\t*/\n\tignoreElementEnd;\n\t/**\n\t* Iterator position. This is always static position, even if the initial position was a\n\t* {@link module:engine/model/liveposition~ModelLivePosition live position}. If start position is not defined then position depends\n\t* on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t* is `'backward'` position starts from the end.\n\t*/\n\t_position;\n\t/**\n\t* Start boundary cached for optimization purposes.\n\t*/\n\t_boundaryStartParent;\n\t/**\n\t* End boundary cached for optimization purposes.\n\t*/\n\t_boundaryEndParent;\n\t/**\n\t* Parent of the most recently visited node. Cached for optimization purposes.\n\t*/\n\t_visitedParent;\n\t/**\n\t* Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t*\n\t* @param options Object with configuration.\n\t*/\n\tconstructor(options) {\n\t\tif (!options || !options.boundaries && !options.startPosition)\n /**\n\t\t* Neither boundaries nor starting position of a `TreeWalker` have been defined.\n\t\t*\n\t\t* @error model-tree-walker-no-start-position\n\t\t*/\n\t\tthrow new CKEditorError(\"model-tree-walker-no-start-position\", null);\n\t\tconst direction = options.direction || \"forward\";\n\t\tif (direction != \"forward\" && direction != \"backward\")\n /**\n\t\t* Only `backward` and `forward` direction allowed.\n\t\t*\n\t\t* @error model-tree-walker-unknown-direction\n\t\t*/\n\t\tthrow new CKEditorError(\"model-tree-walker-unknown-direction\", options, { direction });\n\t\tthis.direction = direction;\n\t\tthis.boundaries = options.boundaries || null;\n\t\tif (options.startPosition) this._position = options.startPosition.clone();\n\t\telse this._position = ModelPosition._createAt(this.boundaries[this.direction == \"backward\" ? \"end\" : \"start\"]);\n\t\tthis.position.stickiness = \"toNone\";\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\t\tthis.shallow = !!options.shallow;\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\t\tthis._visitedParent = this.position.parent;\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* @returns {Iterable.<module:engine/model/treewalker~ModelTreeWalkerValue>}\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this;\n\t}\n\t/**\n\t* Iterator position. This is always static position, even if the initial position was a\n\t* {@link module:engine/model/liveposition~ModelLivePosition live position}. If start position is not defined then position depends\n\t* on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t* is `'backward'` position starts from the end.\n\t*/\n\tget position() {\n\t\treturn this._position;\n\t}\n\t/**\n\t* Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t*\n\t* For example:\n\t*\n\t* ```ts\n\t* walker.skip( value => value.type == 'text' ); // <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t* walker.skip( () => true ); // Move the position to the end: <paragraph>[]foo</paragraph> -> <paragraph>foo</paragraph>[]\n\t* walker.skip( () => false ); // Do not move the position.\n\t* ```\n\t*\n\t* @param skip Callback function. Gets {@link module:engine/model/treewalker~ModelTreeWalkerValue} and should\n\t* return `true` if the value should be skipped or `false` if not.\n\t*/\n\tskip(skip) {\n\t\tlet done, value, prevPosition, prevVisitedParent;\n\t\tdo {\n\t\t\tprevPosition = this.position;\n\t\t\tprevVisitedParent = this._visitedParent;\n\t\t\t({done, value} = this.next());\n\t\t} while (!done && skip(value));\n\t\tif (!done) {\n\t\t\tthis._position = prevPosition;\n\t\t\tthis._visitedParent = prevVisitedParent;\n\t\t}\n\t}\n\t/**\n\t* Moves tree walker {@link #position} to provided `position`. Tree walker will\n\t* continue traversing from that position.\n\t*\n\t* Note: in contrary to {@link ~ModelTreeWalker#skip}, this method does not iterate over the nodes along the way.\n\t* It simply sets the current tree walker position to a new one.\n\t* From the performance standpoint, it is better to use {@link ~ModelTreeWalker#jumpTo} rather than {@link ~ModelTreeWalker#skip}.\n\t*\n\t* If the provided position is before the start boundary, the position will be\n\t* set to the start boundary. If the provided position is after the end boundary,\n\t* the position will be set to the end boundary.\n\t* This is done to prevent the treewalker from traversing outside the boundaries.\n\t*\n\t* @param position Position to jump to.\n\t*/\n\tjumpTo(position) {\n\t\tif (this._boundaryStartParent && position.isBefore(this.boundaries.start)) position = this.boundaries.start;\n\t\telse if (this._boundaryEndParent && position.isAfter(this.boundaries.end)) position = this.boundaries.end;\n\t\tthis._position = position.clone();\n\t\tthis._visitedParent = position.parent;\n\t}\n\t/**\n\t* Gets the next tree walker's value.\n\t*/\n\tnext() {\n\t\tif (this.direction == \"forward\") return this._next();\n\t\telse return this._previous();\n\t}\n\t/**\n\t* Makes a step forward in model. Moves the {@link #position} to the next position and returns the encountered value.\n\t*/\n\t_next() {\n\t\tconst previousPosition = this.position;\n\t\tconst position = this.position.clone();\n\t\tconst parent = this._visitedParent;\n\t\tif (parent.parent === null && position.offset === parent.maxOffset) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tif (parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tconst textNodeAtPosition = getTextNodeAtPosition(position, parent);\n\t\tconst node = textNodeAtPosition || getNodeAfterPosition(position, parent, textNodeAtPosition);\n\t\tif (node && node.is(\"model:element\")) {\n\t\t\tif (!this.shallow) {\n\t\t\t\tposition.path.push(0);\n\t\t\t\tthis._visitedParent = node;\n\t\t\t} else {\n\t\t\t\tif (this.boundaries && this.boundaries.end.isBefore(position)) return {\n\t\t\t\t\tdone: true,\n\t\t\t\t\tvalue: void 0\n\t\t\t\t};\n\t\t\t\tposition.offset++;\n\t\t\t}\n\t\t\tthis._position = position;\n\t\t\treturn formatReturnValue(\"elementStart\", node, previousPosition, position, 1);\n\t\t}\n\t\tif (node && node.is(\"model:$text\")) {\n\t\t\tlet charactersCount;\n\t\t\tif (this.singleCharacters) charactersCount = 1;\n\t\t\telse {\n\t\t\t\tlet offset = node.endOffset;\n\t\t\t\tif (this._boundaryEndParent == parent && this.boundaries.end.offset < offset) offset = this.boundaries.end.offset;\n\t\t\t\tcharactersCount = offset - position.offset;\n\t\t\t}\n\t\t\tconst offsetInTextNode = position.offset - node.startOffset;\n\t\t\tconst item = new ModelTextProxy(node, offsetInTextNode, charactersCount);\n\t\t\tposition.offset += charactersCount;\n\t\t\tthis._position = position;\n\t\t\treturn formatReturnValue(\"text\", item, previousPosition, position, charactersCount);\n\t\t}\n\t\tposition.path.pop();\n\t\tposition.offset++;\n\t\tthis._position = position;\n\t\tthis._visitedParent = parent.parent;\n\t\tif (this.ignoreElementEnd) return this._next();\n\t\treturn formatReturnValue(\"elementEnd\", parent, previousPosition, position);\n\t}\n\t/**\n\t* Makes a step backward in model. Moves the {@link #position} to the previous position and returns the encountered value.\n\t*/\n\t_previous() {\n\t\tconst previousPosition = this.position;\n\t\tconst position = this.position.clone();\n\t\tconst parent = this._visitedParent;\n\t\tif (parent.parent === null && position.offset === 0) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tif (parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tconst positionParent = position.parent;\n\t\tconst textNodeAtPosition = getTextNodeAtPosition(position, positionParent);\n\t\tconst node = textNodeAtPosition || getNodeBeforePosition(position, positionParent, textNodeAtPosition);\n\t\tif (node && node.is(\"model:element\")) {\n\t\t\tposition.offset--;\n\t\t\tif (this.shallow) {\n\t\t\t\tthis._position = position;\n\t\t\t\treturn formatReturnValue(\"elementStart\", node, previousPosition, position, 1);\n\t\t\t}\n\t\t\tposition.path.push(node.maxOffset);\n\t\t\tthis._position = position;\n\t\t\tthis._visitedParent = node;\n\t\t\tif (this.ignoreElementEnd) return this._previous();\n\t\t\treturn formatReturnValue(\"elementEnd\", node, previousPosition, position);\n\t\t}\n\t\tif (node && node.is(\"model:$text\")) {\n\t\t\tlet charactersCount;\n\t\t\tif (this.singleCharacters) charactersCount = 1;\n\t\t\telse {\n\t\t\t\tlet offset = node.startOffset;\n\t\t\t\tif (this._boundaryStartParent == parent && this.boundaries.start.offset > offset) offset = this.boundaries.start.offset;\n\t\t\t\tcharactersCount = position.offset - offset;\n\t\t\t}\n\t\t\tconst offsetInTextNode = position.offset - node.startOffset;\n\t\t\tconst item = new ModelTextProxy(node, offsetInTextNode - charactersCount, charactersCount);\n\t\t\tposition.offset -= charactersCount;\n\t\t\tthis._position = position;\n\t\t\treturn formatReturnValue(\"text\", item, previousPosition, position, charactersCount);\n\t\t}\n\t\tposition.path.pop();\n\t\tthis._position = position;\n\t\tthis._visitedParent = parent.parent;\n\t\treturn formatReturnValue(\"elementStart\", parent, previousPosition, position, 1);\n\t}\n};\nfunction formatReturnValue(type, item, previousPosition, nextPosition, length) {\n\treturn {\n\t\tdone: false,\n\t\tvalue: {\n\t\t\ttype,\n\t\t\titem,\n\t\t\tpreviousPosition,\n\t\t\tnextPosition,\n\t\t\tlength\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 engine/model/position\n*/\n/**\n* Represents a position in the model tree.\n*\n* A position is represented by its {@link module:engine/model/position~ModelPosition#root} and\n* a {@link module:engine/model/position~ModelPosition#path} in that root.\n*\n* You can create position instances via its constructor or the `createPosition*()` factory methods of\n* {@link module:engine/model/model~Model} and {@link module:engine/model/writer~ModelWriter}.\n*\n* **Note:** Position is based on offsets, not indexes. This means that a position between two text nodes\n* `foo` and `bar` has offset `3`, not `1`. See {@link module:engine/model/position~ModelPosition#path} for more information.\n*\n* Since a position in the model is represented by a {@link module:engine/model/position~ModelPosition#root position root} and\n* {@link module:engine/model/position~ModelPosition#path position path} it is possible to create positions placed in non-existing places.\n* This requirement is important for operational transformation algorithms.\n*\n* Also, {@link module:engine/model/operation/operation~Operation operations}\n* kept in the {@link module:engine/model/document~ModelDocument#history document history}\n* are storing positions (and ranges) which were correct when those operations were applied, but may not be correct\n* after the document has changed.\n*\n* When changes are applied to the model, it may also happen that {@link module:engine/model/position~ModelPosition#parent position parent}\n* will change even if position path has not changed. Keep in mind, that if a position leads to non-existing element,\n* {@link module:engine/model/position~ModelPosition#parent} and some other properties and methods will throw errors.\n*\n* In most cases, position with wrong path is caused by an error in code, but it is sometimes needed, as described above.\n*/\nvar ModelPosition = class ModelPosition extends ModelTypeCheckable {\n\t/**\n\t* Root of the position path.\n\t*/\n\troot;\n\t/**\n\t* Position of the node in the tree. **Path contains offsets, not indexes.**\n\t*\n\t* Position can be placed before, after or in a {@link module:engine/model/node~ModelNode node} if that node has\n\t* {@link module:engine/model/node~ModelNode#offsetSize} greater than `1`. Items in position path are\n\t* {@link module:engine/model/node~ModelNode#startOffset starting offsets} of position ancestors, starting from direct root children,\n\t* down to the position offset in it's parent.\n\t*\n\t* ```\n\t* ROOT\n\t*  |- P            before: [ 0 ]         after: [ 1 ]\n\t*  |- UL           before: [ 1 ]         after: [ 2 ]\n\t*     |- LI        before: [ 1, 0 ]      after: [ 1, 1 ]\n\t*     |  |- foo    before: [ 1, 0, 0 ]   after: [ 1, 0, 3 ]\n\t*     |- LI        before: [ 1, 1 ]      after: [ 1, 2 ]\n\t*        |- bar    before: [ 1, 1, 0 ]   after: [ 1, 1, 3 ]\n\t* ```\n\t*\n\t* `foo` and `bar` are representing {@link module:engine/model/text~ModelText text nodes}. Since text nodes has offset size\n\t* greater than `1` you can place position offset between their start and end:\n\t*\n\t* ```\n\t* ROOT\n\t*  |- P\n\t*  |- UL\n\t*     |- LI\n\t*     |  |- f^o|o  ^ has path: [ 1, 0, 1 ]   | has path: [ 1, 0, 2 ]\n\t*     |- LI\n\t*        |- b^a|r  ^ has path: [ 1, 1, 1 ]   | has path: [ 1, 1, 2 ]\n\t* ```\n\t*/\n\tpath;\n\t/**\n\t* Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t*/\n\tstickiness;\n\t/**\n\t* Creates a position.\n\t*\n\t* @param root Root of the position.\n\t* @param path Position path. See {@link module:engine/model/position~ModelPosition#path}.\n\t* @param stickiness Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t*/\n\tconstructor(root, path, stickiness = \"toNone\") {\n\t\tsuper();\n\t\tif (!root.is(\"element\") && !root.is(\"documentFragment\"))\n /**\n\t\t* Position root is invalid.\n\t\t*\n\t\t* Positions can only be anchored in elements or document fragments.\n\t\t*\n\t\t* @error model-position-root-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"model-position-root-invalid\", root);\n\t\tif (!Array.isArray(path) || path.length === 0)\n /**\n\t\t* Position path must be an array with at least one item.\n\t\t*\n\t\t* @error model-position-path-incorrect-format\n\t\t* @param {Array.<number>} path A path to the position.\n\t\t*/\n\t\tthrow new CKEditorError(\"model-position-path-incorrect-format\", root, { path });\n\t\tif (root.is(\"rootElement\")) path = path.slice();\n\t\telse {\n\t\t\tpath = [...root.getPath(), ...path];\n\t\t\troot = root.root;\n\t\t}\n\t\tthis.root = root;\n\t\tthis.path = path;\n\t\tthis.stickiness = stickiness;\n\t}\n\t/**\n\t* Offset at which this position is located in its {@link module:engine/model/position~ModelPosition#parent parent}. It is equal\n\t* to the last item in position {@link module:engine/model/position~ModelPosition#path path}.\n\t*\n\t* @type {Number}\n\t*/\n\tget offset() {\n\t\treturn this.path[this.path.length - 1];\n\t}\n\tset offset(newOffset) {\n\t\tthis.path[this.path.length - 1] = newOffset;\n\t}\n\t/**\n\t* Parent element of this position.\n\t*\n\t* Keep in mind that `parent` value is calculated when the property is accessed.\n\t* If {@link module:engine/model/position~ModelPosition#path position path}\n\t* leads to a non-existing element, `parent` property will throw error.\n\t*\n\t* Also it is a good idea to cache `parent` property if it is used frequently in an algorithm (i.e. in a long loop).\n\t*/\n\tget parent() {\n\t\tlet parent = this.root;\n\t\tfor (let i = 0; i < this.path.length - 1; i++) {\n\t\t\tparent = parent.getChildAtOffset(this.path[i]);\n\t\t\tif (!parent)\n /**\n\t\t\t* The position's path is incorrect. This means that a position does not point to\n\t\t\t* a correct place in the tree and hence, some of its methods and getters cannot work correctly.\n\t\t\t*\n\t\t\t* **Note**: Unlike DOM and view positions, in the model, the\n\t\t\t* {@link module:engine/model/position~ModelPosition#parent position's parent} is always an element or a document fragment.\n\t\t\t* The last offset in the\n\t\t\t* {@link module:engine/model/position~ModelPosition#path position's path} is the point in this element\n\t\t\t* where this position points.\n\t\t\t*\n\t\t\t* Read more about model positions and offsets in\n\t\t\t* the {@glink framework/architecture/editing-engine#indexes-and-offsets Editing engine architecture} guide.\n\t\t\t*\n\t\t\t* @error model-position-path-incorrect\n\t\t\t* @param {module:engine/model/position~ModelPosition} position The incorrect position.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"model-position-path-incorrect\", this, { position: this });\n\t\t}\n\t\tif (parent.is(\"$text\")) throw new CKEditorError(\"model-position-path-incorrect\", this, { position: this });\n\t\treturn parent;\n\t}\n\t/**\n\t* Position {@link module:engine/model/position~ModelPosition#offset offset} converted to an index in position's parent node. It is\n\t* equal to the {@link module:engine/model/node~ModelNode#index index} of a node after this position. If position is placed\n\t* in text node, position index is equal to the index of that text node.\n\t*/\n\tget index() {\n\t\treturn this.parent.offsetToIndex(this.offset);\n\t}\n\t/**\n\t* Returns {@link module:engine/model/text~ModelText text node} instance in which this position is placed or `null` if this\n\t* position is not in a text node.\n\t*/\n\tget textNode() {\n\t\treturn getTextNodeAtPosition(this, this.parent);\n\t}\n\t/**\n\t* Node directly after this position. Returns `null` if this position is at the end of its parent, or if it is in a text node.\n\t*/\n\tget nodeAfter() {\n\t\tconst parent = this.parent;\n\t\treturn getNodeAfterPosition(this, parent, getTextNodeAtPosition(this, parent));\n\t}\n\t/**\n\t* Node directly before this position. Returns `null` if this position is at the start of its parent, or if it is in a text node.\n\t*/\n\tget nodeBefore() {\n\t\tconst parent = this.parent;\n\t\treturn getNodeBeforePosition(this, parent, getTextNodeAtPosition(this, parent));\n\t}\n\t/**\n\t* Is `true` if position is at the beginning of its {@link module:engine/model/position~ModelPosition#parent parent}, `false` otherwise.\n\t*/\n\tget isAtStart() {\n\t\treturn this.offset === 0;\n\t}\n\t/**\n\t* Is `true` if position is at the end of its {@link module:engine/model/position~ModelPosition#parent parent}, `false` otherwise.\n\t*/\n\tget isAtEnd() {\n\t\treturn this.offset == this.parent.maxOffset;\n\t}\n\t/**\n\t* Checks whether the position is valid in current model tree, that is whether it points to an existing place in the model.\n\t*/\n\tisValid() {\n\t\tif (this.offset < 0) return false;\n\t\tlet parent = this.root;\n\t\tfor (let i = 0; i < this.path.length - 1; i++) {\n\t\t\tparent = parent.getChildAtOffset(this.path[i]);\n\t\t\tif (!parent) return false;\n\t\t}\n\t\treturn this.offset <= parent.maxOffset;\n\t}\n\t/**\n\t* Checks whether this position is before or after given position.\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*/\n\tcompareWith(otherPosition) {\n\t\tif (this.root != otherPosition.root) return \"different\";\n\t\tconst result = compareArrays(this.path, otherPosition.path);\n\t\tswitch (result) {\n\t\t\tcase \"same\": return \"same\";\n\t\t\tcase \"prefix\": return \"before\";\n\t\t\tcase \"extension\": return \"after\";\n\t\t\tdefault: return this.path[result] < otherPosition.path[result] ? \"before\" : \"after\";\n\t\t}\n\t}\n\t/**\n\t* Gets the farthest position which matches the callback using\n\t* {@link module:engine/model/treewalker~ModelTreeWalker TreeWalker}.\n\t*\n\t* For example:\n\t*\n\t* ```ts\n\t* getLastMatchingPosition( value => value.type == 'text' );\n\t* // <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t*\n\t* getLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } );\n\t* // <paragraph>foo[]</paragraph> -> <paragraph>[]foo</paragraph>\n\t*\n\t* getLastMatchingPosition( value => false );\n\t* // Do not move the position.\n\t* ```\n\t*\n\t* @param skip Callback function. Gets {@link module:engine/model/treewalker~ModelTreeWalkerValue} and should\n\t* return `true` if the value should be skipped or `false` if not.\n\t* @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t*\n\t* @returns The position after the last item which matches the `skip` callback test.\n\t*/\n\tgetLastMatchingPosition(skip, options = {}) {\n\t\toptions.startPosition = this;\n\t\tconst treeWalker = new ModelTreeWalker(options);\n\t\ttreeWalker.skip(skip);\n\t\treturn treeWalker.position;\n\t}\n\t/**\n\t* Returns a path to this position's parent. Parent path is equal to position\n\t* {@link module:engine/model/position~ModelPosition#path path} but without the last item.\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @returns Path to the parent.\n\t*/\n\tgetParentPath() {\n\t\treturn this.path.slice(0, -1);\n\t}\n\t/**\n\t* Returns ancestors array of this position, that is this position's parent and its ancestors.\n\t*\n\t* @returns Array with ancestors.\n\t*/\n\tgetAncestors() {\n\t\tconst parent = this.parent;\n\t\tif (parent.is(\"documentFragment\")) return [parent];\n\t\telse return parent.getAncestors({ includeSelf: true });\n\t}\n\t/**\n\t* Returns the parent element of the given name. Returns null if the position is not inside the desired parent.\n\t*\n\t* @param parentName The name of the parent element to find.\n\t*/\n\tfindAncestor(parentName) {\n\t\tconst parent = this.parent;\n\t\tif (parent.is(\"element\")) return parent.findAncestor(parentName, { includeSelf: true });\n\t\treturn null;\n\t}\n\t/**\n\t* Returns the slice of two position {@link #path paths} which is identical. The {@link #root roots}\n\t* of these two paths must be identical.\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @param position The second position.\n\t* @returns The common path.\n\t*/\n\tgetCommonPath(position) {\n\t\tif (this.root != position.root) return [];\n\t\tconst cmp = compareArrays(this.path, position.path);\n\t\tconst diffAt = typeof cmp == \"string\" ? Math.min(this.path.length, position.path.length) : cmp;\n\t\treturn this.path.slice(0, diffAt);\n\t}\n\t/**\n\t* Returns an {@link module:engine/model/element~ModelElement} or {@link module:engine/model/documentfragment~ModelDocumentFragment}\n\t* which is a common ancestor of both positions. The {@link #root roots} of these two positions must be identical.\n\t*\n\t* @param position The second position.\n\t*/\n\tgetCommonAncestor(position) {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\t\tlet i = 0;\n\t\twhile (ancestorsA[i] == ancestorsB[i] && ancestorsA[i]) i++;\n\t\treturn i === 0 ? null : ancestorsA[i - 1];\n\t}\n\t/**\n\t* Returns a new instance of `Position`, that has same {@link #parent parent} but it's offset\n\t* is shifted by `shift` value (can be a negative value).\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @param shift Offset shift. Can be a negative value.\n\t* @returns Shifted position.\n\t*/\n\tgetShiftedBy(shift) {\n\t\tconst shifted = this.clone();\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\t\treturn shifted;\n\t}\n\t/**\n\t* Checks whether this position is after given position.\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @see module:engine/model/position~ModelPosition#isBefore\n\t* @param  otherPosition Position to compare with.\n\t* @returns True if this position is after given position.\n\t*/\n\tisAfter(otherPosition) {\n\t\treturn this.compareWith(otherPosition) == \"after\";\n\t}\n\t/**\n\t* Checks whether this position is before given position.\n\t*\n\t* **Note:** watch out when using negation of the value returned by this method, because the negation will also\n\t* be `true` if positions are in different roots and you might not expect this. You should probably use\n\t* `a.isAfter( b ) || a.isEqual( b )` or `!a.isBefore( p ) && a.root == b.root` in most scenarios. If your\n\t* condition uses multiple `isAfter` and `isBefore` checks, build them so they do not use negated values, i.e.:\n\t*\n\t* ```ts\n\t* if ( a.isBefore( b ) && c.isAfter( d ) ) {\n\t* \t// do A.\n\t* } else {\n\t* \t// do B.\n\t* }\n\t* ```\n\t*\n\t* or, if you have only one if-branch:\n\t*\n\t* ```ts\n\t* if ( !( a.isBefore( b ) && c.isAfter( d ) ) {\n\t* \t// do B.\n\t* }\n\t* ```\n\t*\n\t* rather than:\n\t*\n\t* ```ts\n\t* if ( !a.isBefore( b ) || && !c.isAfter( d ) ) {\n\t* \t// do B.\n\t* } else {\n\t* \t// do A.\n\t* }\n\t* ```\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @param otherPosition Position to compare with.\n\t* @returns True if this position is before given position.\n\t*/\n\tisBefore(otherPosition) {\n\t\treturn this.compareWith(otherPosition) == \"before\";\n\t}\n\t/**\n\t* Checks whether this position is equal to given position.\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @param otherPosition Position to compare with.\n\t* @returns True if positions are same.\n\t*/\n\tisEqual(otherPosition) {\n\t\treturn this.compareWith(otherPosition) == \"same\";\n\t}\n\t/**\n\t* Checks whether this position is touching given position. Positions touch when there are no text nodes\n\t* or empty nodes in a range between them. Technically, those positions are not equal but in many cases\n\t* they are very similar or even indistinguishable.\n\t*\n\t* @param otherPosition Position to compare with.\n\t* @returns True if positions touch.\n\t*/\n\tisTouching(otherPosition) {\n\t\tif (this.root !== otherPosition.root) return false;\n\t\tconst commonLevel = Math.min(this.path.length, otherPosition.path.length);\n\t\tfor (let level = 0; level < commonLevel; level++) {\n\t\t\tconst diff = this.path[level] - otherPosition.path[level];\n\t\t\tif (diff < -1 || diff > 1) return false;\n\t\t\telse if (diff === 1) return checkTouchingBranch(otherPosition, this, level);\n\t\t\telse if (diff === -1) return checkTouchingBranch(this, otherPosition, level);\n\t\t}\n\t\tif (this.path.length === otherPosition.path.length) return true;\n\t\telse if (this.path.length > otherPosition.path.length) return checkOnlyZeroes(this.path, commonLevel);\n\t\telse return checkOnlyZeroes(otherPosition.path, commonLevel);\n\t}\n\t/**\n\t* Checks if two positions are in the same parent.\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @param position Position to compare with.\n\t* @returns `true` if positions have the same parent, `false` otherwise.\n\t*/\n\thasSameParentAs(position) {\n\t\tif (this.root !== position.root) return false;\n\t\tconst thisParentPath = this.getParentPath();\n\t\tconst posParentPath = position.getParentPath();\n\t\treturn compareArrays(thisParentPath, posParentPath) == \"same\";\n\t}\n\t/**\n\t* Returns a copy of this position that is transformed by given `operation`.\n\t*\n\t* The new position's parameters are updated accordingly to the effect of the `operation`.\n\t*\n\t* For example, if `n` nodes are inserted before the position, the returned position {@link ~ModelPosition#offset} will be\n\t* increased by `n`. If the position was in a merged element, it will be accordingly moved to the new element, etc.\n\t*\n\t* This method is safe to use it on non-existing positions (for example during operational transformation).\n\t*\n\t* @param operation Operation to transform by.\n\t* @returns Transformed position.\n\t*/\n\tgetTransformedByOperation(operation) {\n\t\tlet result;\n\t\tswitch (operation.type) {\n\t\t\tcase \"insert\":\n\t\t\t\tresult = this._getTransformedByInsertOperation(operation);\n\t\t\t\tbreak;\n\t\t\tcase \"move\":\n\t\t\tcase \"remove\":\n\t\t\tcase \"reinsert\":\n\t\t\t\tresult = this._getTransformedByMoveOperation(operation);\n\t\t\t\tbreak;\n\t\t\tcase \"split\":\n\t\t\t\tresult = this._getTransformedBySplitOperation(operation);\n\t\t\t\tbreak;\n\t\t\tcase \"merge\":\n\t\t\t\tresult = this._getTransformedByMergeOperation(operation);\n\t\t\t\tbreak;\n\t\t\tcase \"detach\":\n\t\t\t\tresult = this._getTransformedByDetachOperation(operation);\n\t\t\t\tbreak;\n\t\t\tdefault: result = ModelPosition._createAt(this);\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Returns a copy of this position transformed by a detach operation.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByDetachOperation(operation) {\n\t\treturn this._getTransformedByDeletion(operation.sourcePosition, operation.howMany) || ModelPosition._createAt(operation.sourcePosition);\n\t}\n\t/**\n\t* Returns a copy of this position transformed by an insert operation.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByInsertOperation(operation) {\n\t\treturn this._getTransformedByInsertion(operation.position, operation.howMany);\n\t}\n\t/**\n\t* Returns a copy of this position transformed by a move operation.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByMoveOperation(operation) {\n\t\treturn this._getTransformedByMove(operation.sourcePosition, operation.targetPosition, operation.howMany);\n\t}\n\t/**\n\t* Returns a copy of this position transformed by a split operation.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedBySplitOperation(operation) {\n\t\tconst movedRange = operation.movedRange;\n\t\tif (movedRange.containsPosition(this) || movedRange.start.isEqual(this) && this.stickiness == \"toNext\") return this._getCombined(operation.splitPosition, operation.moveTargetPosition);\n\t\telse if (operation.graveyardPosition) return this._getTransformedByMove(operation.graveyardPosition, operation.insertionPosition, 1);\n\t\telse return this._getTransformedByInsertion(operation.insertionPosition, 1);\n\t}\n\t/**\n\t* Returns a copy of this position transformed by merge operation.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByMergeOperation(operation) {\n\t\tconst movedRange = operation.movedRange;\n\t\tconst isContained = movedRange.containsPosition(this) || movedRange.start.isEqual(this);\n\t\tlet pos;\n\t\tif (isContained) {\n\t\t\tpos = this._getCombined(operation.sourcePosition, operation.targetPosition);\n\t\t\tif (operation.sourcePosition.isBefore(operation.targetPosition)) pos = pos._getTransformedByDeletion(operation.deletionPosition, 1);\n\t\t} else if (this.isEqual(operation.deletionPosition)) pos = ModelPosition._createAt(operation.deletionPosition);\n\t\telse pos = this._getTransformedByMove(operation.deletionPosition, operation.graveyardPosition, 1);\n\t\treturn pos;\n\t}\n\t/**\n\t* Returns a copy of this position that is updated by removing `howMany` nodes starting from `deletePosition`.\n\t* It may happen that this position is in a removed node. If that is the case, `null` is returned instead.\n\t*\n\t* @internal\n\t* @param deletePosition Position before the first removed node.\n\t* @param howMany How many nodes are removed.\n\t* @returns Transformed position or `null`.\n\t*/\n\t_getTransformedByDeletion(deletePosition, howMany) {\n\t\tconst transformed = ModelPosition._createAt(this);\n\t\tif (this.root != deletePosition.root) return transformed;\n\t\tif (compareArrays(deletePosition.getParentPath(), this.getParentPath()) == \"same\") {\n\t\t\tif (deletePosition.offset < this.offset) {\n\t\t\t\tif (deletePosition.offset + howMany > this.offset) return null;\n\t\t\t\telse transformed.offset -= howMany;\n\t\t\t}\n\t\t} else if (compareArrays(deletePosition.getParentPath(), this.getParentPath()) == \"prefix\") {\n\t\t\tconst i = deletePosition.path.length - 1;\n\t\t\tif (deletePosition.offset <= this.path[i]) {\n\t\t\t\tif (deletePosition.offset + howMany > this.path[i]) return null;\n\t\t\t\telse transformed.path[i] -= howMany;\n\t\t\t}\n\t\t}\n\t\treturn transformed;\n\t}\n\t/**\n\t* Returns a copy of this position that is updated by inserting `howMany` nodes at `insertPosition`.\n\t*\n\t* @internal\n\t* @param insertPosition Position where nodes are inserted.\n\t* @param howMany How many nodes are inserted.\n\t* @returns Transformed position.\n\t*/\n\t_getTransformedByInsertion(insertPosition, howMany) {\n\t\tconst transformed = ModelPosition._createAt(this);\n\t\tif (this.root != insertPosition.root) return transformed;\n\t\tif (compareArrays(insertPosition.getParentPath(), this.getParentPath()) == \"same\") {\n\t\t\tif (insertPosition.offset < this.offset || insertPosition.offset == this.offset && this.stickiness != \"toPrevious\") transformed.offset += howMany;\n\t\t} else if (compareArrays(insertPosition.getParentPath(), this.getParentPath()) == \"prefix\") {\n\t\t\tconst i = insertPosition.path.length - 1;\n\t\t\tif (insertPosition.offset <= this.path[i]) transformed.path[i] += howMany;\n\t\t}\n\t\treturn transformed;\n\t}\n\t/**\n\t* Returns a copy of this position that is updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t*\n\t* @internal\n\t* @param sourcePosition Position before the first element to move.\n\t* @param targetPosition Position where moved elements will be inserted.\n\t* @param howMany How many consecutive nodes to move, starting from `sourcePosition`.\n\t* @returns Transformed position.\n\t*/\n\t_getTransformedByMove(sourcePosition, targetPosition, howMany) {\n\t\ttargetPosition = targetPosition._getTransformedByDeletion(sourcePosition, howMany);\n\t\tif (sourcePosition.isEqual(targetPosition)) return ModelPosition._createAt(this);\n\t\tconst transformed = this._getTransformedByDeletion(sourcePosition, howMany);\n\t\tif (transformed === null || sourcePosition.isEqual(this) && this.stickiness == \"toNext\" || sourcePosition.getShiftedBy(howMany).isEqual(this) && this.stickiness == \"toPrevious\") return this._getCombined(sourcePosition, targetPosition);\n\t\telse return transformed._getTransformedByInsertion(targetPosition, howMany);\n\t}\n\t/**\n\t* Returns a new position that is a combination of this position and given positions.\n\t*\n\t* The combined position is a copy of this position transformed by moving a range starting at `source` position\n\t* to the `target` position. It is expected that this position is inside the moved range.\n\t*\n\t* Example:\n\t*\n\t* ```ts\n\t* let original = model.createPositionFromPath( root, [ 2, 3, 1 ] );\n\t* let source = model.createPositionFromPath( root, [ 2, 2 ] );\n\t* let target = model.createPositionFromPath( otherRoot, [ 1, 1, 3 ] );\n\t* original._getCombined( source, target ); // path is [ 1, 1, 4, 1 ], root is `otherRoot`\n\t* ```\n\t*\n\t* Explanation:\n\t*\n\t* We have a position `[ 2, 3, 1 ]` and move some nodes from `[ 2, 2 ]` to `[ 1, 1, 3 ]`. The original position\n\t* was inside moved nodes and now should point to the new place. The moved nodes will be after\n\t* positions `[ 1, 1, 3 ]`, `[ 1, 1, 4 ]`, `[ 1, 1, 5 ]`. Since our position was in the second moved node,\n\t* the transformed position will be in a sub-tree of a node at `[ 1, 1, 4 ]`. Looking at original path, we\n\t* took care of `[ 2, 3 ]` part of it. Now we have to add the rest of the original path to the transformed path.\n\t* Finally, the transformed position will point to `[ 1, 1, 4, 1 ]`.\n\t*\n\t* @internal\n\t* @param source Beginning of the moved range.\n\t* @param target Position where the range is moved.\n\t* @returns Combined position.\n\t*/\n\t_getCombined(source, target) {\n\t\tconst i = source.path.length - 1;\n\t\tconst combined = ModelPosition._createAt(target);\n\t\tcombined.stickiness = this.stickiness;\n\t\tcombined.offset = combined.offset + this.path[i] - source.offset;\n\t\tcombined.path = [...combined.path, ...this.path.slice(i + 1)];\n\t\treturn combined;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\treturn {\n\t\t\troot: this.root.toJSON(),\n\t\t\tpath: Array.from(this.path),\n\t\t\tstickiness: this.stickiness\n\t\t};\n\t}\n\t/**\n\t* Returns a new position that is equal to current position.\n\t*/\n\tclone() {\n\t\treturn new this.constructor(this.root, this.path, this.stickiness);\n\t}\n\t/**\n\t* Creates position at the given location. The location can be specified as:\n\t*\n\t* * a {@link module:engine/model/position~ModelPosition position},\n\t* * parent element and offset (offset defaults to `0`),\n\t* * parent element and `'end'` (sets position at the end of that element),\n\t* * {@link module:engine/model/item~ModelItem model item} and `'before'` or `'after'` (sets position before or after given model item).\n\t*\n\t* This method is a shortcut to other factory methods such as:\n\t*\n\t* * {@link module:engine/model/position~ModelPosition._createBefore},\n\t* * {@link module:engine/model/position~ModelPosition._createAfter}.\n\t*\n\t* @internal\n\t* @param offset Offset or one of the flags. Used only when the first parameter\n\t* is a {@link module:engine/model/item~ModelItem model item}.\n\t* @param stickiness Position stickiness. Used only when the first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\tstatic _createAt(itemOrPosition, offset, stickiness = \"toNone\") {\n\t\tif (itemOrPosition.is(\"model:position\")) return new ModelPosition(itemOrPosition.root, itemOrPosition.path, itemOrPosition.stickiness);\n\t\telse {\n\t\t\tconst node = itemOrPosition;\n\t\t\tif (offset == \"end\") offset = node.maxOffset;\n\t\t\telse if (offset == \"before\") return this._createBefore(node, stickiness);\n\t\t\telse if (offset == \"after\") return this._createAfter(node, stickiness);\n\t\t\telse if (offset !== 0 && !offset)\n /**\n\t\t\t* {@link module:engine/model/model~Model#createPositionAt `Model#createPositionAt()`}\n\t\t\t* requires the offset to be specified when the first parameter is a model item.\n\t\t\t*\n\t\t\t* @error model-createpositionat-offset-required\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"model-createpositionat-offset-required\", [this, itemOrPosition]);\n\t\t\tif (!node.is(\"element\") && !node.is(\"documentFragment\"))\n /**\n\t\t\t* Position parent have to be a model element or model document fragment.\n\t\t\t*\n\t\t\t* @error model-position-parent-incorrect\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"model-position-parent-incorrect\", [this, itemOrPosition]);\n\t\t\tconst path = node.getPath();\n\t\t\tpath.push(offset);\n\t\t\treturn new this(node.root, path, stickiness);\n\t\t}\n\t}\n\t/**\n\t* Creates a new position, after given {@link module:engine/model/item~ModelItem model item}.\n\t*\n\t* @internal\n\t* @param item Item after which the position should be placed.\n\t* @param stickiness Position stickiness.\n\t*/\n\tstatic _createAfter(item, stickiness) {\n\t\tif (!item.parent)\n /**\n\t\t* You cannot make a position after a root element.\n\t\t*\n\t\t* @error model-position-after-root\n\t\t* @param {module:engine/model/rootelement~ModelRootElement} root The root element..\n\t\t*/\n\t\tthrow new CKEditorError(\"model-position-after-root\", [this, item], { root: item });\n\t\treturn this._createAt(item.parent, item.endOffset, stickiness);\n\t}\n\t/**\n\t* Creates a new position, before the given {@link module:engine/model/item~ModelItem model item}.\n\t*\n\t* @internal\n\t* @param item Item before which the position should be placed.\n\t* @param stickiness Position stickiness.\n\t*/\n\tstatic _createBefore(item, stickiness) {\n\t\tif (!item.parent)\n /**\n\t\t* You cannot make a position before a root element.\n\t\t*\n\t\t* @error model-position-before-root\n\t\t* @param {module:engine/model/rootelement~ModelRootElement} root The root element..\n\t\t*/\n\t\tthrow new CKEditorError(\"model-position-before-root\", item, { root: item });\n\t\treturn this._createAt(item.parent, item.startOffset, stickiness);\n\t}\n\t/**\n\t* Creates a `Position` instance from given plain object (i.e. parsed JSON string).\n\t*\n\t* @param json Plain object to be converted to `Position`.\n\t* @param doc Document object that will be position owner.\n\t* @returns `Position` instance created using given plain object.\n\t*/\n\tstatic fromJSON(json, doc) {\n\t\tif (json.root === \"$graveyard\") {\n\t\t\tconst pos = new ModelPosition(doc.graveyard, json.path);\n\t\t\tpos.stickiness = json.stickiness;\n\t\t\treturn pos;\n\t\t}\n\t\tif (!doc.getRoot(json.root))\n /**\n\t\t* Cannot create position for document. Root with specified name does not exist.\n\t\t*\n\t\t* @error model-position-fromjson-no-root\n\t\t* @param {string} rootName The root name.\n\t\t*/\n\t\tthrow new CKEditorError(\"model-position-fromjson-no-root\", doc, { rootName: json.root });\n\t\treturn new ModelPosition(doc.getRoot(json.root), json.path, json.stickiness);\n\t}\n};\nModelPosition.prototype.is = function(type) {\n\treturn type === \"position\" || type === \"model:position\";\n};\n/**\n* Returns a text node at the given position.\n*\n* This is a helper function optimized to reuse the position parent instance for performance reasons.\n*\n* Normally, you should use {@link module:engine/model/position~ModelPosition#textNode `Position#textNode`}.\n* If you start hitting performance issues with {@link module:engine/model/position~ModelPosition#parent `Position#parent`}\n* check if your algorithm does not access it multiple times (which can happen directly or indirectly via other position properties).\n*\n* See https://github.com/ckeditor/ckeditor5/issues/6579.\n*\n* See also:\n*\n* * {@link module:engine/model/position~getNodeAfterPosition}\n* * {@link module:engine/model/position~getNodeBeforePosition}\n*\n* @param position\n* @param positionParent The parent of the given position.\n* @internal\n*/\nfunction getTextNodeAtPosition(position, positionParent) {\n\tconst node = positionParent.getChildAtOffset(position.offset);\n\tif (node && node.is(\"$text\") && node.startOffset < position.offset) return node;\n\treturn null;\n}\n/**\n* Returns the node after the given position.\n*\n* This is a helper function optimized to reuse the position parent instance and the calculation of the text node at the\n* specific position for performance reasons.\n*\n* Normally, you should use {@link module:engine/model/position~ModelPosition#nodeAfter `Position#nodeAfter`}.\n* If you start hitting performance issues with {@link module:engine/model/position~ModelPosition#parent `Position#parent`} and/or\n* {@link module:engine/model/position~ModelPosition#textNode `Position#textNode`}\n* check if your algorithm does not access those properties multiple times\n* (which can happen directly or indirectly via other position properties).\n*\n* See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.\n*\n* See also:\n*\n* * {@link module:engine/model/position~getTextNodeAtPosition}\n* * {@link module:engine/model/position~getNodeBeforePosition}\n*\n* @param position Position to check.\n* @param positionParent The parent of the given position.\n* @param textNode Text node at the given position.\n* @internal\n*/\nfunction getNodeAfterPosition(position, positionParent, textNode) {\n\tif (textNode !== null) return null;\n\treturn positionParent.getChildAtOffset(position.offset);\n}\n/**\n* Returns the node before the given position.\n*\n* Refer to {@link module:engine/model/position~getNodeBeforePosition} for documentation on when to use this util method.\n*\n* See also:\n*\n* * {@link module:engine/model/position~getTextNodeAtPosition}\n* * {@link module:engine/model/position~getNodeAfterPosition}\n*\n* @param position Position to check.\n* @param positionParent The parent of the given position.\n* @param textNode Text node at the given position.\n* @internal\n*/\nfunction getNodeBeforePosition(position, positionParent, textNode) {\n\tif (textNode !== null) return null;\n\treturn positionParent.getChild(positionParent.offsetToIndex(position.offset) - 1);\n}\n/**\n* This is a helper function for `Position#isTouching()`.\n*\n* It checks whether to given positions are touching, considering that they have the same root and paths\n* until given level, and at given level they differ by 1 (so they are branching at `level` point).\n*\n* The exact requirements for touching positions are described in `Position#isTouching()` and also\n* in the body of this function.\n*\n* @param left Position \"on the left\" (it is before `right`).\n* @param right Position \"on the right\" (it is after `left`).\n* @param level Level on which the positions are different.\n*/\nfunction checkTouchingBranch(left, right, level) {\n\tif (level + 1 === left.path.length) return false;\n\tif (!checkOnlyZeroes(right.path, level + 1)) return false;\n\tif (!checkOnlyMaxOffset(left, level + 1)) return false;\n\treturn true;\n}\n/**\n* Checks whether for given array, starting from given index until the end of the array, all items are `0`s.\n*\n* This is a helper function for `Position#isTouching()`.\n*/\nfunction checkOnlyZeroes(arr, idx) {\n\twhile (idx < arr.length) {\n\t\tif (arr[idx] !== 0) return false;\n\t\tidx++;\n\t}\n\treturn true;\n}\n/**\n* Checks whether for given position, starting from given path level, whether the position is at the end of\n* its parent and whether each element on the path to the position is also at at the end of its parent.\n*\n* This is a helper function for `Position#isTouching()`.\n*/\nfunction checkOnlyMaxOffset(pos, level) {\n\tlet parent = pos.parent;\n\tlet idx = pos.path.length - 1;\n\tlet add = 0;\n\twhile (idx >= level) {\n\t\tif (pos.path[idx] + add !== parent.maxOffset) return false;\n\t\tadd = 1;\n\t\tidx--;\n\t\tparent = parent.parent;\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 engine/model/range\n*/\n/**\n* Represents a range in the model tree.\n*\n* A range is defined by its {@link module:engine/model/range~ModelRange#start} and {@link module:engine/model/range~ModelRange#end}\n* positions.\n*\n* You can create range instances via its constructor or the `createRange*()` factory methods of\n* {@link module:engine/model/model~Model} and {@link module:engine/model/writer~ModelWriter}.\n*/\nvar ModelRange = class ModelRange extends ModelTypeCheckable {\n\t/**\n\t* Start position.\n\t*/\n\tstart;\n\t/**\n\t* End position.\n\t*/\n\tend;\n\t/**\n\t* Creates a range spanning from `start` position to `end` position.\n\t*\n\t* @param start The start position.\n\t* @param end The end position. If not set, the range will be collapsed at the `start` position.\n\t*/\n\tconstructor(start, end) {\n\t\tsuper();\n\t\tthis.start = ModelPosition._createAt(start);\n\t\tthis.end = end ? ModelPosition._createAt(end) : ModelPosition._createAt(start);\n\t\tthis.start.stickiness = this.isCollapsed ? \"toNone\" : \"toNext\";\n\t\tthis.end.stickiness = this.isCollapsed ? \"toNone\" : \"toPrevious\";\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* Iterates over all {@link module:engine/model/item~ModelItem items} that are in this range and returns\n\t* them together with additional information like length or {@link module:engine/model/position~ModelPosition positions},\n\t* grouped as {@link module:engine/model/treewalker~ModelTreeWalkerValue}.\n\t* It iterates over all {@link module:engine/model/textproxy~ModelTextProxy text contents} that are inside the range\n\t* and all the {@link module:engine/model/element~ModelElement}s that are entered into when iterating over this range.\n\t*\n\t* This iterator uses {@link module:engine/model/treewalker~ModelTreeWalker} with `boundaries` set to this range\n\t* and `ignoreElementEnd` option set to `true`.\n\t*/\n\t*[Symbol.iterator]() {\n\t\tyield* new ModelTreeWalker({\n\t\t\tboundaries: this,\n\t\t\tignoreElementEnd: true\n\t\t});\n\t}\n\t/**\n\t* Describes whether the range is collapsed, that is if {@link #start} and\n\t* {@link #end} positions are equal.\n\t*/\n\tget isCollapsed() {\n\t\treturn this.start.isEqual(this.end);\n\t}\n\t/**\n\t* Describes whether this range is flat, that is if {@link #start} position and\n\t* {@link #end} position are in the same {@link module:engine/model/position~ModelPosition#parent}.\n\t*/\n\tget isFlat() {\n\t\tconst startParentPath = this.start.getParentPath();\n\t\tconst endParentPath = this.end.getParentPath();\n\t\treturn compareArrays(startParentPath, endParentPath) == \"same\";\n\t}\n\t/**\n\t* Range root element.\n\t*/\n\tget root() {\n\t\treturn this.start.root;\n\t}\n\t/**\n\t* Checks whether this range contains given {@link module:engine/model/position~ModelPosition position}.\n\t*\n\t* @param position Position to check.\n\t* @returns `true` if given {@link module:engine/model/position~ModelPosition position} is contained\n\t* in this range,`false` otherwise.\n\t*/\n\tcontainsPosition(position) {\n\t\treturn position.isAfter(this.start) && position.isBefore(this.end);\n\t}\n\t/**\n\t* Checks whether this range contains given {@link module:engine/model/range~ModelRange range}.\n\t*\n\t* @param otherRange Range to check.\n\t* @param loose Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t* start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t* even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t* @returns {Boolean} `true` if given {@link module:engine/model/range~ModelRange range} boundaries are contained by this range,\n\t* `false` otherwise.\n\t*/\n\tcontainsRange(otherRange, loose = false) {\n\t\tif (otherRange.isCollapsed) loose = false;\n\t\tconst containsStart = this.containsPosition(otherRange.start) || loose && this.start.isEqual(otherRange.start);\n\t\tconst containsEnd = this.containsPosition(otherRange.end) || loose && this.end.isEqual(otherRange.end);\n\t\treturn containsStart && containsEnd;\n\t}\n\t/**\n\t* Checks whether given {@link module:engine/model/item~ModelItem} is inside this range.\n\t*/\n\tcontainsItem(item) {\n\t\tconst pos = ModelPosition._createBefore(item);\n\t\treturn this.containsPosition(pos) || this.start.isEqual(pos);\n\t}\n\t/**\n\t* Two ranges are equal if their {@link #start} and {@link #end} positions are equal.\n\t*\n\t* @param otherRange Range to compare with.\n\t* @returns `true` if ranges are equal, `false` otherwise.\n\t*/\n\tisEqual(otherRange) {\n\t\treturn this.start.isEqual(otherRange.start) && this.end.isEqual(otherRange.end);\n\t}\n\t/**\n\t* Checks and returns whether this range intersects with given range.\n\t*\n\t* @param otherRange Range to compare with.\n\t* @returns `true` if ranges intersect, `false` otherwise.\n\t*/\n\tisIntersecting(otherRange) {\n\t\treturn this.start.isBefore(otherRange.end) && this.end.isAfter(otherRange.start);\n\t}\n\t/**\n\t* Computes which part(s) of this {@link module:engine/model/range~ModelRange range} is not a part of given\n\t* {@link module:engine/model/range~ModelRange range}.\n\t* Returned array contains zero, one or two {@link module:engine/model/range~ModelRange ranges}.\n\t*\n\t* Examples:\n\t*\n\t* ```ts\n\t* let range = model.createRange(\n\t* \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t* \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t* );\n\t* let otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t* let transformed = range.getDifference( otherRange );\n\t* // transformed array has no ranges because `otherRange` contains `range`\n\t*\n\t* otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 3 ] ) );\n\t* transformed = range.getDifference( otherRange );\n\t* // transformed array has one range: from [ 3 ] to [ 4, 0, 1 ]\n\t*\n\t* otherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 4 ] ) );\n\t* transformed = range.getDifference( otherRange );\n\t* // transformed array has two ranges: from [ 2, 7 ] to [ 3 ] and from [ 4 ] to [ 4, 0, 1 ]\n\t* ```\n\t*\n\t* @param otherRange Range to differentiate against.\n\t* @returns The difference between ranges.\n\t*/\n\tgetDifference(otherRange) {\n\t\tconst ranges = [];\n\t\tif (this.isIntersecting(otherRange)) {\n\t\t\tif (this.containsPosition(otherRange.start)) ranges.push(new ModelRange(this.start, otherRange.start));\n\t\t\tif (this.containsPosition(otherRange.end)) ranges.push(new ModelRange(otherRange.end, this.end));\n\t\t} else ranges.push(new ModelRange(this.start, this.end));\n\t\treturn ranges;\n\t}\n\t/**\n\t* Returns an intersection of this {@link module:engine/model/range~ModelRange range} and given\n\t* {@link module:engine/model/range~ModelRange range}.\n\t* Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t*\n\t* Examples:\n\t*\n\t* ```ts\n\t* let range = model.createRange(\n\t* \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t* \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t* );\n\t* let otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 2 ] ) );\n\t* let transformed = range.getIntersection( otherRange ); // null - ranges have no common part\n\t*\n\t* otherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t* transformed = range.getIntersection( otherRange ); // range from [ 3 ] to [ 4, 0, 1 ]\n\t* ```\n\t*\n\t* @param otherRange Range to check for intersection.\n\t* @returns A common part of given ranges or `null` if ranges have no common part.\n\t*/\n\tgetIntersection(otherRange) {\n\t\tif (this.isIntersecting(otherRange)) {\n\t\t\tlet commonRangeStart = this.start;\n\t\t\tlet commonRangeEnd = this.end;\n\t\t\tif (this.containsPosition(otherRange.start)) commonRangeStart = otherRange.start;\n\t\t\tif (this.containsPosition(otherRange.end)) commonRangeEnd = otherRange.end;\n\t\t\treturn new ModelRange(commonRangeStart, commonRangeEnd);\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Returns a range created by joining this {@link module:engine/model/range~ModelRange range} with the given\n\t* {@link module:engine/model/range~ModelRange range}.\n\t* If ranges have no common part, returns `null`.\n\t*\n\t* Examples:\n\t*\n\t* ```ts\n\t* let range = model.createRange(\n\t* \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t* \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t* );\n\t* let otherRange = model.createRange(\n\t* \tmodel.createPositionFromPath( root, [ 1 ] ),\n\t* \tmodel.createPositionFromPath( root, [ 2 ] )\n\t* );\n\t* let transformed = range.getJoined( otherRange ); // null - ranges have no common part\n\t*\n\t* otherRange = model.createRange(\n\t* \tmodel.createPositionFromPath( root, [ 3 ] ),\n\t* \tmodel.createPositionFromPath( root, [ 5 ] )\n\t* );\n\t* transformed = range.getJoined( otherRange ); // range from [ 2, 7 ] to [ 5 ]\n\t* ```\n\t*\n\t* @param otherRange Range to be joined.\n\t* @param loose Whether the intersection check is loose or strict. If the check is strict (`false`),\n\t* ranges are tested for intersection or whether start/end positions are equal. If the check is loose (`true`),\n\t* compared range is also checked if it's {@link module:engine/model/position~ModelPosition#isTouching touching} current range.\n\t* @returns A sum of given ranges or `null` if ranges have no common part.\n\t*/\n\tgetJoined(otherRange, loose = false) {\n\t\tlet shouldJoin = this.isIntersecting(otherRange);\n\t\tif (!shouldJoin) {\n\t\t\tif (this.start.isBefore(otherRange.start)) shouldJoin = loose ? this.end.isTouching(otherRange.start) : this.end.isEqual(otherRange.start);\n\t\t\telse shouldJoin = loose ? otherRange.end.isTouching(this.start) : otherRange.end.isEqual(this.start);\n\t\t}\n\t\tif (!shouldJoin) return null;\n\t\tlet startPosition = this.start;\n\t\tlet endPosition = this.end;\n\t\tif (otherRange.start.isBefore(startPosition)) startPosition = otherRange.start;\n\t\tif (otherRange.end.isAfter(endPosition)) endPosition = otherRange.end;\n\t\treturn new ModelRange(startPosition, endPosition);\n\t}\n\t/**\n\t* Computes and returns the smallest set of {@link #isFlat flat} ranges, that covers this range in whole.\n\t*\n\t* See an example of a model structure (`[` and `]` are range boundaries):\n\t*\n\t* ```\n\t* root                                                            root\n\t*  |- element DIV                         DIV             P2              P3             DIV\n\t*  |   |- element H                   H        P1        f o o           b a r       H         P4\n\t*  |   |   |- \"fir[st\"             fir[st     lorem                               se]cond     ipsum\n\t*  |   |- element P1\n\t*  |   |   |- \"lorem\"                                              ||\n\t*  |- element P2                                                   ||\n\t*  |   |- \"foo\"                                                    VV\n\t*  |- element P3\n\t*  |   |- \"bar\"                                                   root\n\t*  |- element DIV                         DIV             [P2             P3]             DIV\n\t*  |   |- element H                   H       [P1]       f o o           b a r        H         P4\n\t*  |   |   |- \"se]cond\"            fir[st]    lorem                               [se]cond     ipsum\n\t*  |   |- element P4\n\t*  |   |   |- \"ipsum\"\n\t* ```\n\t*\n\t* As it can be seen, letters contained in the range are: `stloremfoobarse`, spread across different parents.\n\t* We are looking for minimal set of flat ranges that contains the same nodes.\n\t*\n\t* Minimal flat ranges for above range `( [ 0, 0, 3 ], [ 3, 0, 2 ] )` will be:\n\t*\n\t* ```\n\t* ( [ 0, 0, 3 ], [ 0, 0, 5 ] ) = \"st\"\n\t* ( [ 0, 1 ], [ 0, 2 ] ) = element P1 (\"lorem\")\n\t* ( [ 1 ], [ 3 ] ) = element P2, element P3 (\"foobar\")\n\t* ( [ 3, 0, 0 ], [ 3, 0, 2 ] ) = \"se\"\n\t* ```\n\t*\n\t* **Note:** if an {@link module:engine/model/element~ModelElement element} is not wholly contained in this range, it won't be returned\n\t* in any of the returned flat ranges. See in the example how `H` elements at the beginning and at the end of the range\n\t* were omitted. Only their parts that were wholly in the range were returned.\n\t*\n\t* **Note:** this method is not returning flat ranges that contain no nodes.\n\t*\n\t* @returns Array of flat ranges covering this range.\n\t*/\n\tgetMinimalFlatRanges() {\n\t\tconst ranges = [];\n\t\tconst diffAt = this.start.getCommonPath(this.end).length;\n\t\tconst pos = ModelPosition._createAt(this.start);\n\t\tlet posParent = pos.parent;\n\t\twhile (pos.path.length > diffAt + 1) {\n\t\t\tconst howMany = posParent.maxOffset - pos.offset;\n\t\t\tif (howMany !== 0) ranges.push(new ModelRange(pos, pos.getShiftedBy(howMany)));\n\t\t\tpos.path = pos.path.slice(0, -1);\n\t\t\tpos.offset++;\n\t\t\tposParent = posParent.parent;\n\t\t}\n\t\twhile (pos.path.length <= this.end.path.length) {\n\t\t\tconst offset = this.end.path[pos.path.length - 1];\n\t\t\tconst howMany = offset - pos.offset;\n\t\t\tif (howMany !== 0) ranges.push(new ModelRange(pos, pos.getShiftedBy(howMany)));\n\t\t\tpos.offset = offset;\n\t\t\tpos.path.push(0);\n\t\t}\n\t\treturn ranges;\n\t}\n\t/**\n\t* Creates a {@link module:engine/model/treewalker~ModelTreeWalker TreeWalker} instance with this range as a boundary.\n\t*\n\t* For example, to iterate over all items in the entire document root:\n\t*\n\t* ```ts\n\t* // Create a range spanning over the entire root content:\n\t* const range = editor.model.createRangeIn( editor.model.document.getRoot() );\n\t*\n\t* // Iterate over all items in this range:\n\t* for ( const value of range.getWalker() ) {\n\t* \tconsole.log( value.item );\n\t* }\n\t* ```\n\t*\n\t* @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t*/\n\tgetWalker(options = {}) {\n\t\toptions.boundaries = this;\n\t\treturn new ModelTreeWalker(options);\n\t}\n\t/**\n\t* Returns an iterator that iterates over all {@link module:engine/model/item~ModelItem items} that are in this range and returns\n\t* them.\n\t*\n\t* This method uses {@link module:engine/model/treewalker~ModelTreeWalker} with `boundaries` set to this range and\n\t* `ignoreElementEnd` option set to `true`. However it returns only {@link module:engine/model/item~ModelItem model items},\n\t* not {@link module:engine/model/treewalker~ModelTreeWalkerValue}.\n\t*\n\t* You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~ModelTreeWalker} for\n\t* a full list of available options.\n\t*\n\t* @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t*/\n\t*getItems(options = {}) {\n\t\toptions.boundaries = this;\n\t\toptions.ignoreElementEnd = true;\n\t\tconst treeWalker = new ModelTreeWalker(options);\n\t\tfor (const value of treeWalker) yield value.item;\n\t}\n\t/**\n\t* Returns an iterator that iterates over all {@link module:engine/model/position~ModelPosition positions} that are boundaries or\n\t* contained in this range.\n\t*\n\t* This method uses {@link module:engine/model/treewalker~ModelTreeWalker} with `boundaries` set to this range. However it returns only\n\t* {@link module:engine/model/position~ModelPosition positions}, not {@link module:engine/model/treewalker~ModelTreeWalkerValue}.\n\t*\n\t* You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~ModelTreeWalker} for\n\t* a full list of available options.\n\t*\n\t* @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t*/\n\t*getPositions(options = {}) {\n\t\toptions.boundaries = this;\n\t\tconst treeWalker = new ModelTreeWalker(options);\n\t\tyield treeWalker.position;\n\t\tfor (const value of treeWalker) yield value.nextPosition;\n\t}\n\t/**\n\t* Returns a range that is a result of transforming this range by given `operation`.\n\t*\n\t* **Note:** transformation may break one range into multiple ranges (for example, when a part of the range is\n\t* moved to a different part of document tree). For this reason, an array is returned by this method and it\n\t* may contain one or more `Range` instances.\n\t*\n\t* @param operation Operation to transform range by.\n\t* @returns Range which is the result of transformation.\n\t*/\n\tgetTransformedByOperation(operation) {\n\t\tswitch (operation.type) {\n\t\t\tcase \"insert\": return this._getTransformedByInsertOperation(operation);\n\t\t\tcase \"move\":\n\t\t\tcase \"remove\":\n\t\t\tcase \"reinsert\": return this._getTransformedByMoveOperation(operation);\n\t\t\tcase \"split\": return [this._getTransformedBySplitOperation(operation)];\n\t\t\tcase \"merge\": return [this._getTransformedByMergeOperation(operation)];\n\t\t\tcase \"detach\": return this._getTransformedByDetachOperation(operation);\n\t\t}\n\t\treturn [new ModelRange(this.start, this.end)];\n\t}\n\t/**\n\t* Returns a range that is a result of transforming this range by multiple `operations`.\n\t*\n\t* @see module:engine/model/range~ModelRange#getTransformedByOperation\n\t* @param operations Operations to transform the range by.\n\t* @returns Range which is the result of transformation.\n\t*/\n\tgetTransformedByOperations(operations) {\n\t\tconst ranges = [new ModelRange(this.start, this.end)];\n\t\tfor (const operation of operations) for (let i = 0; i < ranges.length; i++) {\n\t\t\tconst result = ranges[i].getTransformedByOperation(operation);\n\t\t\tranges.splice(i, 1, ...result);\n\t\t\ti += result.length - 1;\n\t\t}\n\t\tfor (let i = 0; i < ranges.length; i++) {\n\t\t\tconst range = ranges[i];\n\t\t\tfor (let j = i + 1; j < ranges.length; j++) {\n\t\t\t\tconst next = ranges[j];\n\t\t\t\tif (range.containsRange(next) || next.containsRange(range) || range.isEqual(next)) ranges.splice(j, 1);\n\t\t\t}\n\t\t}\n\t\treturn ranges;\n\t}\n\t/**\n\t* Returns an {@link module:engine/model/element~ModelElement} or {@link module:engine/model/documentfragment~ModelDocumentFragment}\n\t* which is a common ancestor of the range's both ends (in which the entire range is contained).\n\t*/\n\tgetCommonAncestor() {\n\t\treturn this.start.getCommonAncestor(this.end);\n\t}\n\t/**\n\t* Returns an {@link module:engine/model/element~ModelElement Element} contained by the range.\n\t* The element will be returned when it is the **only** node within the range and **fully–contained**\n\t* at the same time.\n\t*/\n\tgetContainedElement() {\n\t\tif (this.isCollapsed) return null;\n\t\tconst nodeAfterStart = this.start.nodeAfter;\n\t\tconst nodeBeforeEnd = this.end.nodeBefore;\n\t\tif (nodeAfterStart && nodeAfterStart.is(\"element\") && nodeAfterStart === nodeBeforeEnd) return nodeAfterStart;\n\t\treturn null;\n\t}\n\t/**\n\t* Converts `Range` to plain object and returns it.\n\t*\n\t* @returns `Range` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\treturn {\n\t\t\tstart: this.start.toJSON(),\n\t\t\tend: this.end.toJSON()\n\t\t};\n\t}\n\t/**\n\t* Returns a new range that is equal to current range.\n\t*/\n\tclone() {\n\t\treturn new this.constructor(this.start, this.end);\n\t}\n\t/**\n\t* Returns a result of transforming a copy of this range by insert operation.\n\t*\n\t* One or more ranges may be returned as a result of this transformation.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByInsertOperation(operation, spread = false) {\n\t\treturn this._getTransformedByInsertion(operation.position, operation.howMany, spread);\n\t}\n\t/**\n\t* Returns a result of transforming a copy of this range by move operation.\n\t*\n\t* One or more ranges may be returned as a result of this transformation.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByMoveOperation(operation, spread = false) {\n\t\tconst sourcePosition = operation.sourcePosition;\n\t\tconst howMany = operation.howMany;\n\t\tconst targetPosition = operation.targetPosition;\n\t\treturn this._getTransformedByMove(sourcePosition, targetPosition, howMany, spread);\n\t}\n\t/**\n\t* Returns a result of transforming a copy of this range by split operation.\n\t*\n\t* Always one range is returned. The transformation is done in a way to not break the range.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedBySplitOperation(operation) {\n\t\tconst start = this.start._getTransformedBySplitOperation(operation);\n\t\tlet end = this.end._getTransformedBySplitOperation(operation);\n\t\tif (this.end.isEqual(operation.insertionPosition)) end = this.end.getShiftedBy(1);\n\t\tif (start.root != end.root) end = this.end.getShiftedBy(-1);\n\t\treturn new ModelRange(start, end);\n\t}\n\t/**\n\t* Returns a result of transforming a copy of this range by merge operation.\n\t*\n\t* Always one range is returned. The transformation is done in a way to not break the range.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByMergeOperation(operation) {\n\t\tif (this.start.isEqual(operation.targetPosition) && this.end.isEqual(operation.deletionPosition)) return new ModelRange(this.start);\n\t\tlet start = this.start._getTransformedByMergeOperation(operation);\n\t\tlet end = this.end._getTransformedByMergeOperation(operation);\n\t\tif (start.root != end.root) end = this.end.getShiftedBy(-1);\n\t\tif (start.isAfter(end)) {\n\t\t\tif (operation.sourcePosition.isBefore(operation.targetPosition)) {\n\t\t\t\tstart = ModelPosition._createAt(end);\n\t\t\t\tstart.offset = 0;\n\t\t\t} else {\n\t\t\t\tif (!operation.deletionPosition.isEqual(start)) end = operation.deletionPosition;\n\t\t\t\tstart = operation.targetPosition;\n\t\t\t}\n\t\t\treturn new ModelRange(start, end);\n\t\t}\n\t\treturn new ModelRange(start, end);\n\t}\n\t/**\n\t* Returns a result of transforming a copy of this range by detach operation.\n\t*\n\t* If the range is completely removed, an empty array is returned.\n\t*\n\t* @internal\n\t*/\n\t_getTransformedByDetachOperation(operation) {\n\t\tconst result = this._getTransformedByDeletion(operation.sourcePosition, operation.howMany);\n\t\treturn result ? [result] : [];\n\t}\n\t/**\n\t* Returns an array containing one or two {@link module:engine/model/range~ModelRange ranges} that are a result of transforming this\n\t* {@link module:engine/model/range~ModelRange range} by inserting `howMany` nodes at `insertPosition`. Two\n\t* {@link module:engine/model/range~ModelRange ranges} are returned if the insertion was inside this\n\t* {@link module:engine/model/range~ModelRange range} and `spread` is set to `true`.\n\t*\n\t* Examples:\n\t*\n\t* ```ts\n\t* let range = model.createRange(\n\t* \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t* \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t* );\n\t* let transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 1 ] ), 2 );\n\t* // transformed array has one range from [ 4, 7 ] to [ 6, 0, 1 ]\n\t*\n\t* transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 4, 0, 0 ] ), 4 );\n\t* // transformed array has one range from [ 2, 7 ] to [ 4, 0, 5 ]\n\t*\n\t* transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4 );\n\t* // transformed array has one range, which is equal to original range\n\t*\n\t* transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4, true );\n\t* // transformed array has two ranges: from [ 2, 7 ] to [ 3, 2 ] and from [ 3, 6 ] to [ 4, 0, 1 ]\n\t* ```\n\t*\n\t* @internal\n\t* @param insertPosition Position where nodes are inserted.\n\t* @param howMany How many nodes are inserted.\n\t* @param spread Flag indicating whether this range should be spread if insertion\n\t* was inside the range. Defaults to `false`.\n\t* @returns Result of the transformation.\n\t*/\n\t_getTransformedByInsertion(insertPosition, howMany, spread = false) {\n\t\tif (spread && this.containsPosition(insertPosition)) return [new ModelRange(this.start, insertPosition), new ModelRange(insertPosition.getShiftedBy(howMany), this.end._getTransformedByInsertion(insertPosition, howMany))];\n\t\telse {\n\t\t\tconst range = new ModelRange(this.start, this.end);\n\t\t\trange.start = range.start._getTransformedByInsertion(insertPosition, howMany);\n\t\t\trange.end = range.end._getTransformedByInsertion(insertPosition, howMany);\n\t\t\treturn [range];\n\t\t}\n\t}\n\t/**\n\t* Returns an array containing {@link module:engine/model/range~ModelRange ranges} that are a result of transforming this\n\t* {@link module:engine/model/range~ModelRange range} by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t*\n\t* @internal\n\t* @param sourcePosition Position from which nodes are moved.\n\t* @param targetPosition Position to where nodes are moved.\n\t* @param howMany How many nodes are moved.\n\t* @param spread Whether the range should be spread if the move points inside the range.\n\t* @returns  Result of the transformation.\n\t*/\n\t_getTransformedByMove(sourcePosition, targetPosition, howMany, spread = false) {\n\t\tif (this.isCollapsed) {\n\t\t\tconst newPos = this.start._getTransformedByMove(sourcePosition, targetPosition, howMany);\n\t\t\treturn [new ModelRange(newPos)];\n\t\t}\n\t\tconst moveRange = ModelRange._createFromPositionAndShift(sourcePosition, howMany);\n\t\tconst insertPosition = targetPosition._getTransformedByDeletion(sourcePosition, howMany);\n\t\tif (this.containsPosition(targetPosition) && !spread) {\n\t\t\tif (moveRange.containsPosition(this.start) || moveRange.containsPosition(this.end)) {\n\t\t\t\tconst start = this.start._getTransformedByMove(sourcePosition, targetPosition, howMany);\n\t\t\t\tconst end = this.end._getTransformedByMove(sourcePosition, targetPosition, howMany);\n\t\t\t\treturn [new ModelRange(start, end)];\n\t\t\t}\n\t\t}\n\t\tlet result;\n\t\tconst differenceSet = this.getDifference(moveRange);\n\t\tlet difference = null;\n\t\tconst common = this.getIntersection(moveRange);\n\t\tif (differenceSet.length == 1) difference = new ModelRange(differenceSet[0].start._getTransformedByDeletion(sourcePosition, howMany), differenceSet[0].end._getTransformedByDeletion(sourcePosition, howMany));\n\t\telse if (differenceSet.length == 2) difference = new ModelRange(this.start, this.end._getTransformedByDeletion(sourcePosition, howMany));\n\t\tif (difference) result = difference._getTransformedByInsertion(insertPosition, howMany, common !== null || spread);\n\t\telse result = [];\n\t\tif (common) {\n\t\t\tconst transformedCommon = new ModelRange(common.start._getCombined(moveRange.start, insertPosition), common.end._getCombined(moveRange.start, insertPosition));\n\t\t\tif (result.length == 2) result.splice(1, 0, transformedCommon);\n\t\t\telse result.push(transformedCommon);\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Returns a copy of this range that is transformed by deletion of `howMany` nodes from `deletePosition`.\n\t*\n\t* If the deleted range is intersecting with the transformed range, the transformed range will be shrank.\n\t*\n\t* If the deleted range contains transformed range, `null` will be returned.\n\t*\n\t* @internal\n\t* @param deletePosition Position from which nodes are removed.\n\t* @param howMany How many nodes are removed.\n\t* @returns Result of the transformation.\n\t*/\n\t_getTransformedByDeletion(deletePosition, howMany) {\n\t\tlet newStart = this.start._getTransformedByDeletion(deletePosition, howMany);\n\t\tlet newEnd = this.end._getTransformedByDeletion(deletePosition, howMany);\n\t\tif (newStart == null && newEnd == null) return null;\n\t\tif (newStart == null) newStart = deletePosition;\n\t\tif (newEnd == null) newEnd = deletePosition;\n\t\treturn new ModelRange(newStart, newEnd);\n\t}\n\t/**\n\t* Creates a new range, spreading from specified {@link module:engine/model/position~ModelPosition position} to a position moved by\n\t* given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t*\n\t* @internal\n\t* @param position Beginning of the range.\n\t* @param shift How long the range should be.\n\t*/\n\tstatic _createFromPositionAndShift(position, shift) {\n\t\tconst start = position;\n\t\tconst end = position.getShiftedBy(shift);\n\t\treturn shift > 0 ? new this(start, end) : new this(end, start);\n\t}\n\t/**\n\t* Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* @internal\n\t* @param element Element which is a parent for the range.\n\t*/\n\tstatic _createIn(element) {\n\t\treturn new this(ModelPosition._createAt(element, 0), ModelPosition._createAt(element, element.maxOffset));\n\t}\n\t/**\n\t* Creates a range that starts before given {@link module:engine/model/item~ModelItem model item} and ends after it.\n\t*\n\t* @internal\n\t*/\n\tstatic _createOn(item) {\n\t\treturn this._createFromPositionAndShift(ModelPosition._createBefore(item), item.offsetSize);\n\t}\n\t/**\n\t* Combines all ranges from the passed array into a one range. At least one range has to be passed.\n\t* Passed ranges must not have common parts.\n\t*\n\t* The first range from the array is a reference range. If other ranges start or end on the exactly same position where\n\t* the reference range, they get combined into one range.\n\t*\n\t* ```\n\t* [  ][]  [    ][ ][             ][ ][]  [  ]  // Passed ranges, shown sorted\n\t* [    ]                                       // The result of the function if the first range was a reference range.\n\t*         [                           ]        // The result of the function if the third-to-seventh range was a reference range.\n\t*                                        [  ]  // The result of the function if the last range was a reference range.\n\t* ```\n\t*\n\t* @internal\n\t* @param ranges Ranges to combine.\n\t* @returns Combined range.\n\t*/\n\tstatic _createFromRanges(ranges) {\n\t\tif (ranges.length === 0)\n /**\n\t\t* At least one range has to be passed to\n\t\t* {@link module:engine/model/range~ModelRange._createFromRanges `Range._createFromRanges()`}.\n\t\t*\n\t\t* @error range-create-from-ranges-empty-array\n\t\t*/\n\t\tthrow new CKEditorError(\"range-create-from-ranges-empty-array\", null);\n\t\telse if (ranges.length == 1) return ranges[0].clone();\n\t\tconst ref = ranges[0];\n\t\tranges.sort((a, b) => {\n\t\t\treturn a.start.isAfter(b.start) ? 1 : -1;\n\t\t});\n\t\tconst refIndex = ranges.indexOf(ref);\n\t\tconst result = new this(ref.start, ref.end);\n\t\tfor (let i = refIndex - 1; i >= 0; i--) if (ranges[i].end.isEqual(result.start)) result.start = ModelPosition._createAt(ranges[i].start);\n\t\telse break;\n\t\tfor (let i = refIndex + 1; i < ranges.length; i++) if (ranges[i].start.isEqual(result.end)) result.end = ModelPosition._createAt(ranges[i].end);\n\t\telse break;\n\t\treturn result;\n\t}\n\t/**\n\t* Creates a `Range` instance from given plain object (i.e. parsed JSON string).\n\t*\n\t* @param json Plain object to be converted to `Range`.\n\t* @param doc Document object that will be range owner.\n\t* @returns `Range` instance created using given plain object.\n\t*/\n\tstatic fromJSON(json, doc) {\n\t\treturn new this(ModelPosition.fromJSON(json.start, doc), ModelPosition.fromJSON(json.end, doc));\n\t}\n};\nModelRange.prototype.is = function(type) {\n\treturn type === \"range\" || type === \"model: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 engine/conversion/mapper\n*/\nconst MapperBase = /* #__PURE__ */ EmitterMixin();\nconst MapperCacheBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Maps elements, positions and markers between the {@link module:engine/view/document~ViewDocument view} and\n* the {@link module:engine/model/model model}.\n*\n* The instance of the Mapper used for the editing pipeline is available in\n* {@link module:engine/controller/editingcontroller~EditingController#mapper `editor.editing.mapper`}.\n*\n* Mapper uses bound elements to find corresponding elements and positions, so, to get proper results,\n* all model elements should be {@link module:engine/conversion/mapper~Mapper#bindElements bound}.\n*\n* To map the complex model to/from view relations, you may provide custom callbacks for the\n* {@link module:engine/conversion/mapper~Mapper#event:modelToViewPosition modelToViewPosition event} and\n* {@link module:engine/conversion/mapper~Mapper#event:viewToModelPosition viewToModelPosition event} that are fired whenever\n* a position mapping request occurs.\n* Those events are fired by the {@link module:engine/conversion/mapper~Mapper#toViewPosition toViewPosition}\n* and {@link module:engine/conversion/mapper~Mapper#toModelPosition toModelPosition} methods. `Mapper` adds its own default callbacks\n* with `'lowest'` priority. To override default `Mapper` mapping, add custom callback with higher priority and\n* stop the event.\n*/\nvar Mapper = class extends MapperBase {\n\t/**\n\t* Model element to view element mapping.\n\t*/\n\t_modelToViewMapping = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* View element to model element mapping.\n\t*/\n\t_viewToModelMapping = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* A map containing callbacks between view element names and functions evaluating length of view elements\n\t* in model.\n\t*/\n\t_viewToModelLengthCallbacks = /* @__PURE__ */ new Map();\n\t/**\n\t* Model marker name to view elements mapping.\n\t*\n\t* Keys are `String`s while values are `Set`s with {@link module:engine/view/element~ViewElement view elements}.\n\t* One marker (name) can be mapped to multiple elements.\n\t*/\n\t_markerNameToElements = /* @__PURE__ */ new Map();\n\t/**\n\t* View element to model marker names mapping.\n\t*\n\t* This is reverse to {@link ~Mapper#_markerNameToElements} map.\n\t*/\n\t_elementToMarkerNames = /* @__PURE__ */ new Map();\n\t/**\n\t* The map of removed view elements with their current root (used for deferred unbinding).\n\t*/\n\t_deferredBindingRemovals = /* @__PURE__ */ new Map();\n\t/**\n\t* Stores marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t* has been removed, moved or renamed).\n\t*/\n\t_unboundMarkerNames = /* @__PURE__ */ new Set();\n\t/**\n\t* Manages dynamic cache for the `Mapper` to improve the performance.\n\t*/\n\t_cache = new MapperCache();\n\t/**\n\t* Creates an instance of the mapper.\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.on(\"modelToViewPosition\", (evt, data) => {\n\t\t\tif (data.viewPosition) return;\n\t\t\tconst viewContainer = this._modelToViewMapping.get(data.modelPosition.parent);\n\t\t\tif (!viewContainer)\n /**\n\t\t\t* A model position could not be mapped to the view because the parent of the model position\n\t\t\t* does not have a mapped view element (might have not been converted yet or it has no converter).\n\t\t\t*\n\t\t\t* Make sure that the model element is correctly converted to the view.\n\t\t\t*\n\t\t\t* @error mapping-model-position-view-parent-not-found\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"mapping-model-position-view-parent-not-found\", this, { modelPosition: data.modelPosition });\n\t\t\tdata.viewPosition = this.findPositionIn(viewContainer, data.modelPosition.offset);\n\t\t}, { priority: \"low\" });\n\t\tthis.on(\"viewToModelPosition\", (evt, data) => {\n\t\t\tif (data.modelPosition) return;\n\t\t\tconst viewBlock = this.findMappedViewAncestor(data.viewPosition);\n\t\t\tconst modelParent = this._viewToModelMapping.get(viewBlock);\n\t\t\tconst modelOffset = this._toModelOffset(data.viewPosition.parent, data.viewPosition.offset, viewBlock);\n\t\t\tdata.modelPosition = ModelPosition._createAt(modelParent, modelOffset);\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Marks model and view elements as corresponding. Corresponding elements can be retrieved by using\n\t* the {@link module:engine/conversion/mapper~Mapper#toModelElement toModelElement} and\n\t* {@link module:engine/conversion/mapper~Mapper#toViewElement toViewElement} methods.\n\t* The information that elements are bound is also used to translate positions.\n\t*\n\t* @param modelElement Model element.\n\t* @param viewElement View element.\n\t*/\n\tbindElements(modelElement, viewElement) {\n\t\tthis._modelToViewMapping.set(modelElement, viewElement);\n\t\tthis._viewToModelMapping.set(viewElement, modelElement);\n\t}\n\t/**\n\t* Unbinds the given {@link module:engine/view/element~ViewElement view element} from the map.\n\t*\n\t* **Note:** view-to-model binding will be removed, if it existed. However, corresponding model-to-view binding\n\t* will be removed only if model element is still bound to the passed `viewElement`.\n\t*\n\t* This behavior allows for re-binding model element to another view element without fear of losing the new binding\n\t* when the previously bound view element is unbound.\n\t*\n\t* @param viewElement View element to unbind.\n\t* @param options The options object.\n\t* @param options.defer Controls whether the binding should be removed immediately or deferred until a\n\t* {@link #flushDeferredBindings `flushDeferredBindings()`} call.\n\t*/\n\tunbindViewElement(viewElement, options = {}) {\n\t\tconst modelElement = this.toModelElement(viewElement);\n\t\tif (this._elementToMarkerNames.has(viewElement)) for (const markerName of this._elementToMarkerNames.get(viewElement)) this._unboundMarkerNames.add(markerName);\n\t\tif (options.defer) this._deferredBindingRemovals.set(viewElement, viewElement.root);\n\t\telse {\n\t\t\tif (this._viewToModelMapping.delete(viewElement)) this._cache.stopTracking(viewElement);\n\t\t\tif (this._modelToViewMapping.get(modelElement) == viewElement) this._modelToViewMapping.delete(modelElement);\n\t\t}\n\t}\n\t/**\n\t* Unbinds the given {@link module:engine/model/element~ModelElement model element} from the map.\n\t*\n\t* **Note:** the model-to-view binding will be removed, if it existed. However, the corresponding view-to-model binding\n\t* will be removed only if the view element is still bound to the passed `modelElement`.\n\t*\n\t* This behavior lets for re-binding view element to another model element without fear of losing the new binding\n\t* when the previously bound model element is unbound.\n\t*\n\t* @param modelElement Model element to unbind.\n\t*/\n\tunbindModelElement(modelElement) {\n\t\tconst viewElement = this.toViewElement(modelElement);\n\t\tthis._modelToViewMapping.delete(modelElement);\n\t\tif (this._viewToModelMapping.get(viewElement) == modelElement) {\n\t\t\t/* v8 ignore next 4 -- @preserve */\n\t\t\tif (this._viewToModelMapping.delete(viewElement)) this._cache.stopTracking(viewElement);\n\t\t}\n\t}\n\t/**\n\t* Binds the given marker name with the given {@link module:engine/view/element~ViewElement view element}. The element\n\t* will be added to the current set of elements bound with the given marker name.\n\t*\n\t* @param element Element to bind.\n\t* @param name Marker name.\n\t*/\n\tbindElementToMarker(element, name) {\n\t\tconst elements = this._markerNameToElements.get(name) || /* @__PURE__ */ new Set();\n\t\telements.add(element);\n\t\tconst names = this._elementToMarkerNames.get(element) || /* @__PURE__ */ new Set();\n\t\tnames.add(name);\n\t\tthis._markerNameToElements.set(name, elements);\n\t\tthis._elementToMarkerNames.set(element, names);\n\t}\n\t/**\n\t* Unbinds an element from given marker name.\n\t*\n\t* @param element Element to unbind.\n\t* @param name Marker name.\n\t*/\n\tunbindElementFromMarkerName(element, name) {\n\t\tconst nameToElements = this._markerNameToElements.get(name);\n\t\tif (nameToElements) {\n\t\t\tnameToElements.delete(element);\n\t\t\tif (nameToElements.size == 0) this._markerNameToElements.delete(name);\n\t\t}\n\t\tconst elementToNames = this._elementToMarkerNames.get(element);\n\t\tif (elementToNames) {\n\t\t\telementToNames.delete(name);\n\t\t\tif (elementToNames.size == 0) this._elementToMarkerNames.delete(element);\n\t\t}\n\t}\n\t/**\n\t* Returns all marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t* has been removed, moved or renamed) since the last flush. After returning, the marker names list is cleared.\n\t*/\n\tflushUnboundMarkerNames() {\n\t\tconst markerNames = Array.from(this._unboundMarkerNames);\n\t\tthis._unboundMarkerNames.clear();\n\t\treturn markerNames;\n\t}\n\t/**\n\t* Unbinds all deferred binding removals of view elements that in the meantime were not re-attached to some root or document fragment.\n\t*\n\t* See: {@link #unbindViewElement `unbindViewElement()`}.\n\t*/\n\tflushDeferredBindings() {\n\t\tfor (const [viewElement, root] of this._deferredBindingRemovals) if (viewElement.root == root) this.unbindViewElement(viewElement);\n\t\tthis._deferredBindingRemovals = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* Removes all model to view and view to model bindings.\n\t*/\n\tclearBindings() {\n\t\tthis._modelToViewMapping = /* @__PURE__ */ new WeakMap();\n\t\tthis._viewToModelMapping = /* @__PURE__ */ new WeakMap();\n\t\tthis._markerNameToElements = /* @__PURE__ */ new Map();\n\t\tthis._elementToMarkerNames = /* @__PURE__ */ new Map();\n\t\tthis._unboundMarkerNames = /* @__PURE__ */ new Set();\n\t\tthis._deferredBindingRemovals = /* @__PURE__ */ new Map();\n\t}\n\ttoModelElement(viewElement) {\n\t\treturn this._viewToModelMapping.get(viewElement);\n\t}\n\ttoViewElement(modelElement) {\n\t\treturn this._modelToViewMapping.get(modelElement);\n\t}\n\t/**\n\t* Gets the corresponding model range.\n\t*\n\t* @param viewRange View range.\n\t* @returns Corresponding model range.\n\t*/\n\ttoModelRange(viewRange) {\n\t\treturn new ModelRange(this.toModelPosition(viewRange.start), this.toModelPosition(viewRange.end));\n\t}\n\t/**\n\t* Gets the corresponding view range.\n\t*\n\t* @param modelRange Model range.\n\t* @returns Corresponding view range.\n\t*/\n\ttoViewRange(modelRange) {\n\t\treturn new ViewRange(this.toViewPosition(modelRange.start), this.toViewPosition(modelRange.end));\n\t}\n\t/**\n\t* Gets the corresponding model position.\n\t*\n\t* @fires viewToModelPosition\n\t* @param viewPosition View position.\n\t* @returns Corresponding model position.\n\t*/\n\ttoModelPosition(viewPosition) {\n\t\tconst data = {\n\t\t\tviewPosition,\n\t\t\tmapper: this\n\t\t};\n\t\tthis.fire(\"viewToModelPosition\", data);\n\t\treturn data.modelPosition;\n\t}\n\t/**\n\t* Gets the corresponding view position.\n\t*\n\t* @fires modelToViewPosition\n\t* @param modelPosition Model position.\n\t* @param options Additional options for position mapping process.\n\t* @param options.isPhantom Should be set to `true` if the model position to map is pointing to a place\n\t* in model tree which no longer exists. For example, it could be an end of a removed model range.\n\t* @returns Corresponding view position.\n\t*/\n\ttoViewPosition(modelPosition, options = {}) {\n\t\tconst data = {\n\t\t\tmodelPosition,\n\t\t\tmapper: this,\n\t\t\tisPhantom: options.isPhantom\n\t\t};\n\t\tthis.fire(\"modelToViewPosition\", data);\n\t\treturn data.viewPosition;\n\t}\n\t/**\n\t* Gets all view elements bound to the given marker name.\n\t*\n\t* @param name Marker name.\n\t* @returns View elements bound with the given marker name or `null`\n\t* if no elements are bound to the given marker name.\n\t*/\n\tmarkerNameToElements(name) {\n\t\tconst boundElements = this._markerNameToElements.get(name);\n\t\tif (!boundElements) return null;\n\t\tconst elements = /* @__PURE__ */ new Set();\n\t\tfor (const element of boundElements) if (element.is(\"attributeElement\")) for (const clone of element.getElementsWithSameId()) elements.add(clone);\n\t\telse elements.add(element);\n\t\treturn elements;\n\t}\n\t/**\n\t* **This method is deprecated and will be removed in one of the future CKEditor 5 releases.**\n\t*\n\t* **Using this method will turn off `Mapper` caching system and may degrade performance when operating on bigger documents.**\n\t*\n\t* Registers a callback that evaluates the length in the model of a view element with the given name.\n\t*\n\t* The callback is fired with one argument, which is a view element instance. The callback is expected to return\n\t* a number representing the length of the view element in the model.\n\t*\n\t* ```ts\n\t* // List item in view may contain nested list, which have other list items. In model though,\n\t* // the lists are represented by flat structure. Because of those differences, length of list view element\n\t* // may be greater than one. In the callback it's checked how many nested list items are in evaluated list item.\n\t*\n\t* function getViewListItemLength( element ) {\n\t* \tlet length = 1;\n\t*\n\t* \tfor ( let child of element.getChildren() ) {\n\t* \t\tif ( child.name == 'ul' || child.name == 'ol' ) {\n\t* \t\t\tfor ( let item of child.getChildren() ) {\n\t* \t\t\t\tlength += getViewListItemLength( item );\n\t* \t\t\t}\n\t* \t\t}\n\t* \t}\n\t*\n\t* \treturn length;\n\t* }\n\t*\n\t* mapper.registerViewToModelLength( 'li', getViewListItemLength );\n\t* ```\n\t*\n\t* @param viewElementName Name of view element for which callback is registered.\n\t* @param lengthCallback Function return a length of view element instance in model.\n\t* @deprecated\n\t*/\n\tregisterViewToModelLength(viewElementName, lengthCallback) {\n\t\tthis._viewToModelLengthCallbacks.set(viewElementName, lengthCallback);\n\t}\n\t/**\n\t* For the given `viewPosition`, finds and returns the closest ancestor of this position that has a mapping to\n\t* the model.\n\t*\n\t* @param viewPosition Position for which a mapped ancestor should be found.\n\t*/\n\tfindMappedViewAncestor(viewPosition) {\n\t\tlet parent = viewPosition.parent;\n\t\twhile (!this._viewToModelMapping.has(parent)) parent = parent.parent;\n\t\treturn parent;\n\t}\n\t/**\n\t* Calculates model offset based on the view position and the block element.\n\t*\n\t* Example:\n\t*\n\t* ```html\n\t* <p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, p ) -> 5\n\t* ```\n\t*\n\t* Is a sum of:\n\t*\n\t* ```html\n\t* <p>foo|<b>bar</b></p> // _toModelOffset( p, 3, p ) -> 3\n\t* <p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, b ) -> 2\n\t* ```\n\t*\n\t* @param viewParent Position parent.\n\t* @param viewOffset Position offset.\n\t* @param viewBlock Block used as a base to calculate offset.\n\t* @returns Offset in the model.\n\t*/\n\t_toModelOffset(viewParent, viewOffset, viewBlock) {\n\t\tif (viewBlock != viewParent) return this._toModelOffset(viewParent.parent, viewParent.index, viewBlock) + this._toModelOffset(viewParent, viewOffset, viewParent);\n\t\tif (viewParent.is(\"$text\")) return viewOffset;\n\t\tlet modelOffset = 0;\n\t\tfor (let i = 0; i < viewOffset; i++) modelOffset += this.getModelLength(viewParent.getChild(i));\n\t\treturn modelOffset;\n\t}\n\t/**\n\t* Gets the length of the view element in the model.\n\t*\n\t* The length is calculated as follows:\n\t* * if a {@link #registerViewToModelLength length mapping callback} is provided for the given `viewNode`, it is used to\n\t* evaluate the model length (`viewNode` is used as first and only parameter passed to the callback),\n\t* * length of a {@link module:engine/view/text~ViewText text node} is equal to the length of its\n\t* {@link module:engine/view/text~ViewText#data data},\n\t* * length of a {@link module:engine/view/uielement~ViewUIElement ui element} is equal to 0,\n\t* * length of a mapped {@link module:engine/view/element~ViewElement element} is equal to 1,\n\t* * length of a non-mapped {@link module:engine/view/element~ViewElement element} is equal to the length of its children.\n\t*\n\t* Examples:\n\t*\n\t* ```\n\t* foo                          -> 3 // Text length is equal to its data length.\n\t* <p>foo</p>                   -> 1 // Length of an element which is mapped is by default equal to 1.\n\t* <b>foo</b>                   -> 3 // Length of an element which is not mapped is a length of its children.\n\t* <div><p>x</p><p>y</p></div>  -> 2 // Assuming that <div> is not mapped and <p> are mapped.\n\t* ```\n\t*\n\t* @param viewNode View node.\n\t* @returns Length of the node in the tree model.\n\t*/\n\tgetModelLength(viewNode) {\n\t\tconst stack = [viewNode];\n\t\tlet len = 0;\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tconst callback = node.name && this._viewToModelLengthCallbacks.size > 0 && this._viewToModelLengthCallbacks.get(node.name);\n\t\t\tif (callback) len += callback(node);\n\t\t\telse if (this._viewToModelMapping.has(node)) len += 1;\n\t\t\telse if (node.is(\"$text\")) len += node.data.length;\n\t\t\telse if (node.is(\"uiElement\")) continue;\n\t\t\telse for (const child of node.getChildren()) stack.push(child);\n\t\t}\n\t\treturn len;\n\t}\n\t/**\n\t* Finds the position in a view element or view document fragment node (or in its children) with the expected model offset.\n\t*\n\t* If the passed `viewContainer` is bound to model, `Mapper` will use caching mechanism to improve performance.\n\t*\n\t* @param viewContainer Tree view element in which we are looking for the position.\n\t* @param modelOffset Expected offset.\n\t* @returns Found position.\n\t*/\n\tfindPositionIn(viewContainer, modelOffset) {\n\t\tif (modelOffset === 0) return this._moveViewPositionToTextNode(new ViewPosition(viewContainer, 0));\n\t\tif (this._viewToModelLengthCallbacks.size == 0 && this._viewToModelMapping.has(viewContainer)) {\n\t\t\tconst cacheItem = this._cache.getClosest(viewContainer, modelOffset);\n\t\t\treturn this._findPositionStartingFrom(cacheItem.viewPosition, cacheItem.modelOffset, modelOffset, viewContainer, true);\n\t\t} else return this._findPositionStartingFrom(new ViewPosition(viewContainer, 0), 0, modelOffset, viewContainer, false);\n\t}\n\t/**\n\t* Performs most of the logic for `Mapper#findPositionIn()`.\n\t*\n\t* It allows to start looking for the requested model offset from a given starting position, to enable caching. Using the cache,\n\t* you can set the starting point and skip all the calculations that were already previously done.\n\t*\n\t* This method uses recursion to find positions inside deep structures. Example:\n\t*\n\t* ```\n\t* <p>fo<b>bar</b>bom</p>  -> target offset: 4\n\t* <p>|fo<b>bar</b>bom</p> -> target offset: 4, traversed offset: 0\n\t* <p>fo|<b>bar</b>bom</p> -> target offset: 4, traversed offset: 2\n\t* <p>fo<b>bar</b>|bom</p> -> target offset: 4, traversed offset: 5 -> we are too far, look recursively in <b>.\n\t*\n\t* <p>fo<b>|bar</b>bom</p> -> target offset: 4, traversed offset: 2\n\t* <p>fo<b>bar|</b>bom</p> -> target offset: 4, traversed offset: 5 -> we are too far, look inside \"bar\".\n\t*\n\t* <p>fo<b>ba|r</b>bom</p> -> target offset: 4, traversed offset: 2 -> position is inside text node at offset 4-2 = 2.\n\t* ```\n\t*\n\t* @param startViewPosition View position to start looking from.\n\t* @param startModelOffset Model offset related to `startViewPosition`.\n\t* @param targetModelOffset Target model offset to find.\n\t* @param viewContainer Mapped ancestor of `startViewPosition`. `startModelOffset` is the offset inside a model element or model\n\t* document fragment mapped to `viewContainer`.\n\t* @param useCache Whether `Mapper` should cache positions while traversing the view tree looking for `expectedModelOffset`.\n\t* @returns View position mapped to `targetModelOffset`.\n\t*/\n\t_findPositionStartingFrom(startViewPosition, startModelOffset, targetModelOffset, viewContainer, useCache) {\n\t\tlet viewParent = startViewPosition.parent;\n\t\tlet viewOffset = startViewPosition.offset;\n\t\tif (viewParent.is(\"$text\")) return new ViewPosition(viewParent, targetModelOffset - startModelOffset);\n\t\tlet viewNode;\n\t\tlet traversedModelOffset = startModelOffset;\n\t\tlet lastLength = 0;\n\t\twhile (traversedModelOffset < targetModelOffset) {\n\t\t\tviewNode = viewParent.getChild(viewOffset);\n\t\t\tif (!viewNode) {\n\t\t\t\tif (viewParent == viewContainer)\n /**\n\t\t\t\t* A model position could not be mapped to the view because specified model offset was too big and could not be\n\t\t\t\t* found inside the mapped view element or view document fragment.\n\t\t\t\t*\n\t\t\t\t* @error mapping-model-offset-not-found\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"mapping-model-offset-not-found\", this, {\n\t\t\t\t\tmodelOffset: targetModelOffset,\n\t\t\t\t\tviewContainer\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tviewOffset = viewParent.parent.getChildIndex(viewParent) + 1;\n\t\t\t\t\tviewParent = viewParent.parent;\n\t\t\t\t\tif (useCache) this._cache.save(viewParent, viewOffset, viewContainer, traversedModelOffset);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (useCache) lastLength = this._getModelLengthAndCache(viewNode, viewContainer, traversedModelOffset);\n\t\t\telse lastLength = this.getModelLength(viewNode);\n\t\t\ttraversedModelOffset += lastLength;\n\t\t\tviewOffset++;\n\t\t}\n\t\tlet viewPosition = new ViewPosition(viewParent, viewOffset);\n\t\tif (useCache) while (viewPosition.isAtEnd && viewPosition.parent !== viewContainer && viewPosition.parent.parent) {\n\t\t\tconst cacheViewParent = viewPosition.parent.parent;\n\t\t\tconst cacheViewOffset = cacheViewParent.getChildIndex(viewPosition.parent) + 1;\n\t\t\tthis._cache.save(cacheViewParent, cacheViewOffset, viewContainer, traversedModelOffset);\n\t\t\tviewPosition = new ViewPosition(cacheViewParent, cacheViewOffset);\n\t\t}\n\t\tif (traversedModelOffset == targetModelOffset) return this._moveViewPositionToTextNode(viewPosition);\n\t\telse return this._findPositionStartingFrom(new ViewPosition(viewNode, 0), traversedModelOffset - lastLength, targetModelOffset, viewContainer, useCache);\n\t}\n\t/**\n\t* Gets the length of the view element in the model and updates cache values after each view item it visits.\n\t*\n\t* See also {@link #getModelLength}.\n\t*\n\t* @param viewNode View node.\n\t* @param viewContainer Ancestor of `viewNode` that is a mapped view element.\n\t* @param modelOffset Model offset at which the `viewNode` starts.\n\t* @returns Length of the node in the tree model.\n\t*/\n\t_getModelLengthAndCache(viewNode, viewContainer, modelOffset) {\n\t\tlet len = 0;\n\t\tif (this._viewToModelMapping.has(viewNode)) len = 1;\n\t\telse if (viewNode.is(\"$text\")) len = viewNode.data.length;\n\t\telse if (!viewNode.is(\"uiElement\")) for (const child of viewNode.getChildren()) len += this._getModelLengthAndCache(child, viewContainer, modelOffset + len);\n\t\tthis._cache.save(viewNode.parent, viewNode.index + 1, viewContainer, modelOffset + len);\n\t\treturn len;\n\t}\n\t/**\n\t* Because we prefer positions in the text nodes over positions next to text nodes, if the view position was next to a text node,\n\t* it moves it into the text node instead.\n\t*\n\t* ```\n\t* <p>[]<b>foo</b></p> -> <p>[]<b>foo</b></p> // do not touch if position is not directly next to text\n\t* <p>foo[]<b>foo</b></p> -> <p>foo{}<b>foo</b></p> // move to text node\n\t* <p><b>[]foo</b></p> -> <p><b>{}foo</b></p> // move to text node\n\t* ```\n\t*\n\t* @param viewPosition Position potentially next to the text node.\n\t* @returns Position in the text node if possible.\n\t*/\n\t_moveViewPositionToTextNode(viewPosition) {\n\t\tconst nodeBefore = viewPosition.nodeBefore;\n\t\tconst nodeAfter = viewPosition.nodeAfter;\n\t\tif (nodeBefore && nodeBefore.is(\"view:$text\")) return new ViewPosition(nodeBefore, nodeBefore.data.length);\n\t\telse if (nodeAfter && nodeAfter.is(\"view:$text\")) return new ViewPosition(nodeAfter, 0);\n\t\treturn viewPosition;\n\t}\n};\n/**\n* Cache mechanism for {@link module:engine/conversion/mapper~Mapper Mapper}.\n*\n* `MapperCache` improves performance for model-to-view position mapping, which is the main `Mapper` task. Asking for a mapping is much\n* more frequent than actually performing changes, and even if the change happens, we can still partially keep the cache. This makes\n* caching a useful strategy for `Mapper`.\n*\n* `MapperCache` will store some data for view elements or view document fragments that are mapped by the `Mapper`. These view items\n* are \"tracked\" by the `MapperCache`. For such view items, we will keep entries of model offsets inside their mapped counterpart. For\n* the cached model offsets, we will keep a view position that is inside the tracked item. This allows us to either get the mapping\n* instantly, or at least in less steps than when calculating it from the beginning.\n*\n* Important problem related to caching is invalidating the cache. The cache must be invalidated each time the tracked view item changes.\n* Additionally, we should invalidate as small part of the cache as possible. Since all the logic is encapsulated inside `MapperCache`,\n* the `MapperCache` listens to view items {@link module:engine/view/node~ViewNodeChangeEvent `change` event} and reacts to it.\n* Then, it invalidates just the part of the cache that is \"after\" the changed part of the view.\n*\n* As mentioned, `MapperCache` currently is used only for model-to-view position mapping as it was much bigger problem than view-to-model\n* mapping. However, it should be possible to use it also for view-to-model.\n*\n* The main assumptions regarding `MapperCache` are:\n*\n* * it is an internal tool, used by `Mapper`, transparent to the outside (no additional effort when developing a plugin or a converter),\n* * it stores all the necessary data internally, which makes it easier to disable or debug,\n* * it is optimized for initial downcast process (long insertions), which is crucial for editor init and data save,\n* * it does not save all possible positions mapping for memory considerations, although it is a possible improvement, which may increase\n*   performance, as well as simplify some parts of the `MapperCache` logic.\n*\n* @internal\n*/\nvar MapperCache = class extends MapperCacheBase {\n\t/**\n\t* For every view element or document fragment tracked by `MapperCache`, it holds currently cached data, or more precisely,\n\t* model offset to view position mappings. See also `MappingCache` and `CacheItem`.\n\t*\n\t* If an item is tracked by `MapperCache` it has an entry in this structure, so this structure can be used to check which items\n\t* are tracked by `MapperCache`. When an item is no longer tracked, it is removed from this structure.\n\t*\n\t* Although `MappingCache` and `CacheItem` structures allows for caching any model offsets and view positions, we only cache\n\t* values for model offsets that are after a view node. So, in essence, positions inside text nodes are not cached. However, it takes\n\t* from one to at most a few steps, to get from a cached position to a position that is inside a view text node.\n\t*\n\t* Additionally, only one item per `modelOffset` is cached. There can be several view positions that map to the same `modelOffset`.\n\t* Only the first save for `modelOffset` is stored.\n\t*/\n\t_cachedMapping = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* When `MapperCache` {@link ~MapperCache#save saves} view position -> model offset mapping, a `CacheItem` is inserted into certain\n\t* `MappingCache#cacheList` at some index. Additionally, we store that index with the view node that is before the cached view position.\n\t*\n\t* This allows to quickly get a cache list item related to certain view node, and hence, for fast cache invalidation.\n\t*\n\t* For example, consider view: `<p>Some <strong>bold</strong> text.</p>`, where `<p>` is a view element tracked by `MapperCache`.\n\t* If all `<p>` children were visited by `MapperCache`, then `<p>` cache list would have four items, related to following model offsets:\n\t* `0`, `5`, `9`, `15`. Then, view node `\"Some \"` would have index `1`, `<strong>` index `2`, and `\" text.\" index `3`.\n\t*\n\t* Note that the index related with a node is always greater than `0`. The first item in cache list is always for model offset `0`\n\t* (and view offset `0`), and it is not related to any node.\n\t*/\n\t_nodeToCacheListIndex = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* Callback fired whenever there is a direct or indirect children change in tracked view element or tracked view document fragment.\n\t*\n\t* This is specified as a property to make it easier to set as an event callback and to later turn off that event.\n\t*/\n\t_invalidateOnChildrenChangeCallback = (evt, viewNode, data) => {\n\t\tthis._clearCacheInsideParent(viewNode, data.index);\n\t};\n\t/**\n\t* Callback fired whenever a view text node directly or indirectly inside a tracked view element or tracked view document fragment\n\t* changes its text data.\n\t*\n\t* This is specified as a property to make it easier to set as an event callback and to later turn off that event.\n\t*/\n\t_invalidateOnTextChangeCallback = (evt, viewNode) => {\n\t\tthis._clearCacheAfter(viewNode);\n\t};\n\t/**\n\t* Saves cache for given view position mapping <-> model offset mapping. The view position should be after a node (i.e. it cannot\n\t* be the first position inside its parent, or in other words, `viewOffset` must be greater than `0`).\n\t*\n\t* Note, that if `modelOffset` for given `viewContainer` was already saved, the stored view position (i.e. parent+offset) will not\n\t* be overwritten. However, it is important to still save it, as we still store additional data related to cached view positions.\n\t*\n\t* @param viewParent View position parent.\n\t* @param viewOffset View position offset. Must be greater than `0`.\n\t* @param viewContainer Tracked view position ascendant (it may be the direct parent of the view position).\n\t* @param modelOffset Model offset in the model element or document fragment which is mapped to `viewContainer`.\n\t*/\n\tsave(viewParent, viewOffset, viewContainer, modelOffset) {\n\t\tconst cache = this._cachedMapping.get(viewContainer);\n\t\tconst cacheItem = cache.cacheMap.get(modelOffset);\n\t\tif (cacheItem) {\n\t\t\tconst viewChild = viewParent.getChild(viewOffset - 1);\n\t\t\tconst index = cacheItem.viewPosition.nodeBefore ? this._nodeToCacheListIndex.get(cacheItem.viewPosition.nodeBefore) : 0;\n\t\t\tthis._nodeToCacheListIndex.set(viewChild, index);\n\t\t\treturn;\n\t\t}\n\t\tconst newCacheItem = {\n\t\t\tviewPosition: new ViewPosition(viewParent, viewOffset),\n\t\t\tmodelOffset\n\t\t};\n\t\tcache.maxModelOffset = modelOffset > cache.maxModelOffset ? modelOffset : cache.maxModelOffset;\n\t\tcache.cacheMap.set(modelOffset, newCacheItem);\n\t\tlet i = cache.cacheList.length - 1;\n\t\twhile (i >= 0 && cache.cacheList[i].modelOffset > modelOffset) i--;\n\t\tcache.cacheList.splice(i + 1, 0, newCacheItem);\n\t\tif (viewOffset > 0) {\n\t\t\tconst viewChild = viewParent.getChild(viewOffset - 1);\n\t\t\tthis._nodeToCacheListIndex.set(viewChild, i + 1);\n\t\t}\n\t}\n\t/**\n\t* For given `modelOffset` inside a model element mapped to given `viewContainer`, it returns the closest saved cache item\n\t* (view position and related model offset) to the requested one.\n\t*\n\t* It can be exactly the requested mapping, or it can be mapping that is the closest starting point to look for the requested mapping.\n\t*\n\t* `viewContainer` must be a view element or document fragment that is mapped by the {@link ~Mapper Mapper}.\n\t*\n\t* If `viewContainer` is not yet tracked by the `MapperCache`, it will be automatically tracked after calling this method.\n\t*\n\t* Note: this method will automatically \"hoist\" cached positions, i.e. it will return a position that is closest to the tracked element.\n\t*\n\t* For example, if `<p>` is tracked element, and `^` is cached position:\n\t*\n\t* ```\n\t* <p>This is <strong>some <em>heavily <u>formatted</u>^</em></strong> text.</p>\n\t* ```\n\t*\n\t* If this position would be returned, instead, a position directly in `<p>` would be returned:\n\t*\n\t* ```\n\t* <p>This is <strong>some <em>heavily <u>formatted</u></em></strong>^ text.</p>\n\t* ```\n\t*\n\t* Note, that `modelOffset` for both positions is the same.\n\t*\n\t* @param viewContainer Tracked view element or document fragment, which cache will be used.\n\t* @param modelOffset Model offset in a model element or document fragment, which is mapped to `viewContainer`.\n\t*/\n\tgetClosest(viewContainer, modelOffset) {\n\t\tconst cache = this._cachedMapping.get(viewContainer);\n\t\tlet result;\n\t\tif (cache) {\n\t\t\tif (modelOffset > cache.maxModelOffset) result = cache.cacheList[cache.cacheList.length - 1];\n\t\t\telse {\n\t\t\t\tconst cacheItem = cache.cacheMap.get(modelOffset);\n\t\t\t\tif (cacheItem) result = cacheItem;\n\t\t\t\telse result = this._findInCacheList(cache.cacheList, modelOffset);\n\t\t\t}\n\t\t} else result = this.startTracking(viewContainer);\n\t\treturn {\n\t\t\tmodelOffset: result.modelOffset,\n\t\t\tviewPosition: result.viewPosition.clone()\n\t\t};\n\t}\n\t/**\n\t* Starts tracking given `viewContainer`, which must be mapped to a model element or model document fragment.\n\t*\n\t* Note, that this method is automatically called by\n\t* {@link module:engine/conversion/mapper~MapperCache#getClosest `MapperCache#getClosest()`} and there is no need to call it manually.\n\t*\n\t* This method initializes the cache for `viewContainer` and adds callbacks for\n\t* {@link module:engine/view/node~ViewNodeChangeEvent `change` event} fired by `viewContainer`. `MapperCache` listens to `change` event\n\t* on the tracked elements to invalidate the stored cache.\n\t*/\n\tstartTracking(viewContainer) {\n\t\tconst initialCacheItem = {\n\t\t\tviewPosition: new ViewPosition(viewContainer, 0),\n\t\t\tmodelOffset: 0\n\t\t};\n\t\tconst initialCache = {\n\t\t\tmaxModelOffset: 0,\n\t\t\tcacheList: [initialCacheItem],\n\t\t\tcacheMap: /* @__PURE__ */ new Map([[0, initialCacheItem]])\n\t\t};\n\t\tthis._cachedMapping.set(viewContainer, initialCache);\n\t\tviewContainer.on(\"change:children\", this._invalidateOnChildrenChangeCallback);\n\t\tviewContainer.on(\"change:text\", this._invalidateOnTextChangeCallback);\n\t\treturn initialCacheItem;\n\t}\n\t/**\n\t* Stops tracking given `viewContainer`.\n\t*\n\t* It removes the cached data and stops listening to {@link module:engine/view/node~ViewNodeChangeEvent `change` event} on the\n\t* `viewContainer`.\n\t*/\n\tstopTracking(viewContainer) {\n\t\tviewContainer.off(\"change:children\", this._invalidateOnChildrenChangeCallback);\n\t\tviewContainer.off(\"change:text\", this._invalidateOnTextChangeCallback);\n\t\tthis._cachedMapping.delete(viewContainer);\n\t}\n\t/**\n\t* Invalidates cache inside `viewParent`, starting from given `index` in that parent.\n\t*\n\t* This method may clear a bit more cache than just what was saved after given `index`, but it is guaranteed that at least it\n\t* will invalidate everything after `index`.\n\t*/\n\t_clearCacheInsideParent(viewParent, index) {\n\t\tif (index == 0) {\n\t\t\tif (this._cachedMapping.has(viewParent)) this._clearCacheAll(viewParent);\n\t\t\telse this._clearCacheInsideParent(viewParent.parent, viewParent.index);\n\t\t} else {\n\t\t\tconst lastValidNode = viewParent.getChild(index - 1);\n\t\t\tthis._clearCacheAfter(lastValidNode);\n\t\t}\n\t}\n\t/**\n\t* Clears all the cache for given tracked `viewContainer`.\n\t*/\n\t_clearCacheAll(viewContainer) {\n\t\tconst cache = this._cachedMapping.get(viewContainer);\n\t\tif (cache.maxModelOffset > 0) {\n\t\t\tcache.maxModelOffset = 0;\n\t\t\tcache.cacheList.length = 1;\n\t\t\tcache.cacheMap.clear();\n\t\t\tcache.cacheMap.set(0, cache.cacheList[0]);\n\t\t}\n\t}\n\t/**\n\t* Clears all the stored cache that is after given `viewNode`. The `viewNode` can be any node that is inside a tracked view element\n\t* or view document fragment.\n\t*\n\t* In reality, this function may clear a bit more cache than just \"starting after\" `viewNode`, but it is guaranteed that at least\n\t* all cache after `viewNode` is invalidated.\n\t*/\n\t_clearCacheAfter(viewNode) {\n\t\tconst cacheListIndex = this._nodeToCacheListIndex.get(viewNode);\n\t\tif (cacheListIndex === void 0) {\n\t\t\tconst viewParent = viewNode.parent;\n\t\t\tif (!this._cachedMapping.has(viewParent)) this._clearCacheInsideParent(viewParent.parent, viewParent.index);\n\t\t\treturn;\n\t\t}\n\t\tlet viewContainer = viewNode.parent;\n\t\twhile (!this._cachedMapping.has(viewContainer)) viewContainer = viewContainer.parent;\n\t\tthis._clearCacheFromCacheIndex(viewContainer, cacheListIndex);\n\t}\n\t/**\n\t* Clears all the cache in the cache list related to given `viewContainer`, starting from `index` (inclusive).\n\t*/\n\t_clearCacheFromCacheIndex(viewContainer, index) {\n\t\tif (index === 0) index = 1;\n\t\tconst cache = this._cachedMapping.get(viewContainer);\n\t\tconst cacheItem = cache.cacheList[index - 1];\n\t\tif (!cacheItem) return;\n\t\tcache.maxModelOffset = cacheItem.modelOffset;\n\t\tconst clearedItems = cache.cacheList.splice(index);\n\t\tfor (const item of clearedItems) {\n\t\t\tcache.cacheMap.delete(item.modelOffset);\n\t\t\tconst viewNode = item.viewPosition.nodeBefore;\n\t\t\tthis._nodeToCacheListIndex.delete(viewNode);\n\t\t}\n\t}\n\t/**\n\t* Finds a cache item in the given cache list, which `modelOffset` is closest (but smaller or equal) to given `offset`.\n\t*\n\t* Since `cacheList` is a sorted array, this uses binary search to retrieve the item quickly.\n\t*/\n\t_findInCacheList(cacheList, offset) {\n\t\tlet start = 0;\n\t\tlet end = cacheList.length - 1;\n\t\tlet index = end - start >> 1;\n\t\tlet item = cacheList[index];\n\t\twhile (start < end) {\n\t\t\tif (item.modelOffset < offset) start = index + 1;\n\t\t\telse end = index - 1;\n\t\t\tindex = start + (end - start >> 1);\n\t\t\titem = cacheList[index];\n\t\t}\n\t\treturn item.modelOffset <= offset ? item : cacheList[index - 1];\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 engine/conversion/modelconsumable\n*/\n/**\n* Manages a list of consumable values for the {@link module:engine/model/item~ModelItem model items}.\n*\n* Consumables are various aspects of the model. A model item can be broken down into separate, single properties that might be\n* taken into consideration when converting that item.\n*\n* `ModelConsumable` is used by {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} while analyzing the changed\n* parts of {@link module:engine/model/document~ModelDocument the document}. The added / changed / removed model items are broken down\n* into singular properties (the item itself and its attributes). All those parts are saved in `ModelConsumable`. Then,\n* during conversion, when the given part of a model item is converted (i.e. the view element has been inserted into the view,\n* but without attributes), the consumable value is removed from `ModelConsumable`.\n*\n* For model items, `ModelConsumable` stores consumable values of one of following types: `insert`, `addattribute:<attributeKey>`,\n* `changeattributes:<attributeKey>`, `removeattributes:<attributeKey>`.\n*\n* In most cases, it is enough to let th {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}\n* gather consumable values, so there is no need to use\n* the {@link module:engine/conversion/modelconsumable~ModelConsumable#add add method} directly.\n* However, it is important to understand how consumable values can be\n* {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed}.\n* See {@link module:engine/conversion/downcasthelpers default downcast converters} for more information.\n*\n* Keep in mind that one conversion event may have multiple callbacks (converters) attached to it. Each of those is\n* able to convert one or more parts of the model. However, when one of those callbacks actually converts\n* something, the others should not, because they would duplicate the results. Using `ModelConsumable` helps to avoid\n* this situation, because callbacks should only convert these values that were not yet consumed from `ModelConsumable`.\n*\n* Consuming multiple values in a single callback:\n*\n* ```ts\n* // Converter for custom `imageBlock` element that might have a `caption` element inside which changes\n* // how the image is displayed in the view:\n* //\n* // Model:\n* //\n* // [imageBlock]\n* //   └─ [caption]\n* //       └─ foo\n* //\n* // View:\n* //\n* // <figure>\n* //   ├─ <img />\n* //   └─ <caption>\n* //       └─ foo\n* modelConversionDispatcher.on( 'insert:imageBlock', ( evt, data, conversionApi ) => {\n* \t// First, consume the `imageBlock` element.\n* \tconversionApi.consumable.consume( data.item, 'insert' );\n*\n* \t// Just create normal image element for the view.\n* \t// Maybe it will be \"decorated\" later.\n* \tconst viewImage = new ViewElement( 'img' );\n* \tconst insertPosition = conversionApi.mapper.toViewPosition( data.range.start );\n* \tconst viewWriter = conversionApi.writer;\n*\n* \t// Check if the `imageBlock` element has children.\n* \tif ( data.item.childCount > 0 ) {\n* \t\tconst modelCaption = data.item.getChild( 0 );\n*\n* \t\t// `modelCaption` insertion change is consumed from consumable values.\n* \t\t// It will not be converted by other converters, but it's children (probably some text) will be.\n* \t\t// Through mapping, converters for text will know where to insert contents of `modelCaption`.\n* \t\tif ( conversionApi.consumable.consume( modelCaption, 'insert' ) ) {\n* \t\t\tconst viewCaption = new ViewElement( 'figcaption' );\n*\n* \t\t\tconst viewImageHolder = new ViewElement( 'figure', null, [ viewImage, viewCaption ] );\n*\n* \t\t\tconversionApi.mapper.bindElements( modelCaption, viewCaption );\n* \t\t\tconversionApi.mapper.bindElements( data.item, viewImageHolder );\n* \t\t\tviewWriter.insert( insertPosition, viewImageHolder );\n* \t\t}\n* \t} else {\n* \t\tconversionApi.mapper.bindElements( data.item, viewImage );\n* \t\tviewWriter.insert( insertPosition, viewImage );\n* \t}\n*\n* \tevt.stop();\n* } );\n* ```\n*/\nvar ModelConsumable = class {\n\t/**\n\t* Contains list of consumable values.\n\t*/\n\t_consumable = /* @__PURE__ */ new Map();\n\t/**\n\t* For each {@link module:engine/model/textproxy~ModelTextProxy} added to `ModelConsumable`, this registry holds a parent\n\t* of that `ModelTextProxy` and the start and end indices of that `ModelTextProxy`. This allows identification of the `ModelTextProxy`\n\t* instances that point to the same part of the model but are different instances. Each distinct `ModelTextProxy`\n\t* is given a unique `Symbol` which is then registered as consumable. This process is transparent for the `ModelConsumable`\n\t* API user because whenever `ModelTextProxy` is added, tested, consumed or reverted, the internal mechanisms of\n\t* `ModelConsumable` translate `ModelTextProxy` to that unique `Symbol`.\n\t*/\n\t_textProxyRegistry = /* @__PURE__ */ new Map();\n\t/**\n\t* Adds a consumable value to the consumables list and links it with a given model item.\n\t*\n\t* ```ts\n\t* modelConsumable.add( modelElement, 'insert' ); // Add `modelElement` insertion change to consumable values.\n\t* modelConsumable.add( modelElement, 'addAttribute:bold' ); // Add `bold` attribute insertion on `modelElement` change.\n\t* modelConsumable.add( modelElement, 'removeAttribute:bold' ); // Add `bold` attribute removal on `modelElement` change.\n\t* modelConsumable.add( modelSelection, 'selection' ); // Add `modelSelection` to consumable values.\n\t* modelConsumable.add( modelRange, 'range' ); // Add `modelRange` to consumable values.\n\t* ```\n\t*\n\t* @param item Model item, range or selection that has the consumable.\n\t* @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t* Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t*/\n\tadd(item, type) {\n\t\ttype = _normalizeConsumableType(type);\n\t\tif (item instanceof ModelTextProxy) item = this._getSymbolForTextProxy(item);\n\t\tif (!this._consumable.has(item)) this._consumable.set(item, /* @__PURE__ */ new Map());\n\t\tthis._consumable.get(item).set(type, true);\n\t}\n\t/**\n\t* Removes a given consumable value from a given model item.\n\t*\n\t* ```ts\n\t* modelConsumable.consume( modelElement, 'insert' ); // Remove `modelElement` insertion change from consumable values.\n\t* modelConsumable.consume( modelElement, 'addAttribute:bold' ); // Remove `bold` attribute insertion on `modelElement` change.\n\t* modelConsumable.consume( modelElement, 'removeAttribute:bold' ); // Remove `bold` attribute removal on `modelElement` change.\n\t* modelConsumable.consume( modelSelection, 'selection' ); // Remove `modelSelection` from consumable values.\n\t* modelConsumable.consume( modelRange, 'range' ); // Remove 'modelRange' from consumable values.\n\t* ```\n\t*\n\t* @param item Model item, range or selection from which consumable will be consumed.\n\t* @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t* Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t* @returns `true` if consumable value was available and was consumed, `false` otherwise.\n\t*/\n\tconsume(item, type) {\n\t\ttype = _normalizeConsumableType(type);\n\t\tif (item instanceof ModelTextProxy) item = this._getSymbolForTextProxy(item);\n\t\tif (this.test(item, type)) {\n\t\t\tthis._consumable.get(item).set(type, false);\n\t\t\treturn true;\n\t\t} else return false;\n\t}\n\t/**\n\t* Tests whether there is a consumable value of a given type connected with a given model item.\n\t*\n\t* ```ts\n\t* modelConsumable.test( modelElement, 'insert' ); // Check for `modelElement` insertion change.\n\t* modelConsumable.test( modelElement, 'addAttribute:bold' ); // Check for `bold` attribute insertion on `modelElement` change.\n\t* modelConsumable.test( modelElement, 'removeAttribute:bold' ); // Check for `bold` attribute removal on `modelElement` change.\n\t* modelConsumable.test( modelSelection, 'selection' ); // Check if `modelSelection` is consumable.\n\t* modelConsumable.test( modelRange, 'range' ); // Check if `modelRange` is consumable.\n\t* ```\n\t*\n\t* @param item Model item, range or selection to be tested.\n\t* @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t* Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t* @returns `null` if such consumable was never added, `false` if the consumable values was\n\t* already consumed or `true` if it was added and not consumed yet.\n\t*/\n\ttest(item, type) {\n\t\ttype = _normalizeConsumableType(type);\n\t\tif (item instanceof ModelTextProxy) item = this._getSymbolForTextProxy(item);\n\t\tconst itemConsumables = this._consumable.get(item);\n\t\tif (itemConsumables === void 0) return null;\n\t\tconst value = itemConsumables.get(type);\n\t\tif (value === void 0) return null;\n\t\treturn value;\n\t}\n\t/**\n\t* Reverts consuming of a consumable value.\n\t*\n\t* ```ts\n\t* modelConsumable.revert( modelElement, 'insert' ); // Revert consuming `modelElement` insertion change.\n\t* modelConsumable.revert( modelElement, 'addAttribute:bold' ); // Revert consuming `bold` attribute insert from `modelElement`.\n\t* modelConsumable.revert( modelElement, 'removeAttribute:bold' ); // Revert consuming `bold` attribute remove from `modelElement`.\n\t* modelConsumable.revert( modelSelection, 'selection' ); // Revert consuming `modelSelection`.\n\t* modelConsumable.revert( modelRange, 'range' ); // Revert consuming `modelRange`.\n\t* ```\n\t*\n\t* @param item Model item, range or selection to be reverted.\n\t* @param type Consumable type.\n\t* @returns `true` if consumable has been reversed, `false` otherwise. `null` if the consumable has\n\t* never been added.\n\t*/\n\trevert(item, type) {\n\t\ttype = _normalizeConsumableType(type);\n\t\tif (item instanceof ModelTextProxy) item = this._getSymbolForTextProxy(item);\n\t\tconst test = this.test(item, type);\n\t\tif (test === false) {\n\t\t\tthis._consumable.get(item).set(type, true);\n\t\t\treturn true;\n\t\t} else if (test === true) return false;\n\t\treturn null;\n\t}\n\t/**\n\t* Verifies if all events from the specified group were consumed.\n\t*\n\t* @param eventGroup The events group to verify.\n\t*/\n\tverifyAllConsumed(eventGroup) {\n\t\tconst items = [];\n\t\tfor (const [item, consumables] of this._consumable) for (const [event, canConsume] of consumables) {\n\t\t\tconst eventPrefix = event.split(\":\")[0];\n\t\t\tif (canConsume && eventGroup == eventPrefix) items.push({\n\t\t\t\tevent,\n\t\t\t\titem: item.name || item.description\n\t\t\t});\n\t\t}\n\t\tif (items.length)\n /**\n\t\t* Some of the {@link module:engine/model/item~ModelItem model items} were not consumed while downcasting the model to view.\n\t\t*\n\t\t* This might be the effect of:\n\t\t*\n\t\t* * A missing converter for some model elements. Make sure that you registered downcast converters for all model elements.\n\t\t* * A custom converter that does not consume converted items. Make sure that you\n\t\t* {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} all model elements that you converted\n\t\t* from the model to the view.\n\t\t* * A custom converter that called `event.stop()`. When providing a custom converter, keep in mind that you should not stop\n\t\t* the event. If you stop it then the default converter at the `lowest` priority will not trigger the conversion of this node's\n\t\t* attributes and child nodes.\n\t\t*\n\t\t* @error conversion-model-consumable-not-consumed\n\t\t* @param {Array.<module:engine/model/item~ModelItem>} items Items that were not consumed.\n\t\t*/\n\t\tthrow new CKEditorError(\"conversion-model-consumable-not-consumed\", null, { items });\n\t}\n\t/**\n\t* Gets a unique symbol for the passed {@link module:engine/model/textproxy~ModelTextProxy} instance.\n\t* All `ModelTextProxy` instances that have same parent, same start index and same end index will get the same symbol.\n\t*\n\t* Used internally to correctly consume `ModelTextProxy` instances.\n\t*\n\t* @internal\n\t* @param textProxy `ModelTextProxy` instance to get a symbol for.\n\t* @returns Symbol representing all equal instances of `ModelTextProxy`.\n\t*/\n\t_getSymbolForTextProxy(textProxy) {\n\t\tlet symbol = null;\n\t\tconst startMap = this._textProxyRegistry.get(textProxy.startOffset);\n\t\tif (startMap) {\n\t\t\tconst endMap = startMap.get(textProxy.endOffset);\n\t\t\tif (endMap) symbol = endMap.get(textProxy.parent);\n\t\t}\n\t\tif (!symbol) symbol = this._addSymbolForTextProxy(textProxy);\n\t\treturn symbol;\n\t}\n\t/**\n\t* Adds a symbol for the given {@link module:engine/model/textproxy~ModelTextProxy} instance.\n\t*\n\t* Used internally to correctly consume `ModelTextProxy` instances.\n\t*\n\t* @param textProxy Text proxy instance.\n\t* @returns Symbol generated for given `ModelTextProxy`.\n\t*/\n\t_addSymbolForTextProxy(textProxy) {\n\t\tconst start = textProxy.startOffset;\n\t\tconst end = textProxy.endOffset;\n\t\tconst parent = textProxy.parent;\n\t\tconst symbol = Symbol(\"$textProxy:\" + textProxy.data);\n\t\tlet startMap;\n\t\tlet endMap;\n\t\tstartMap = this._textProxyRegistry.get(start);\n\t\tif (!startMap) {\n\t\t\tstartMap = /* @__PURE__ */ new Map();\n\t\t\tthis._textProxyRegistry.set(start, startMap);\n\t\t}\n\t\tendMap = startMap.get(end);\n\t\tif (!endMap) {\n\t\t\tendMap = /* @__PURE__ */ new Map();\n\t\t\tstartMap.set(end, endMap);\n\t\t}\n\t\tendMap.set(parent, symbol);\n\t\treturn symbol;\n\t}\n};\n/**\n* Returns a normalized consumable type name from the given string. A normalized consumable type name is a string that has\n* at most one colon, for example: `insert` or `addMarker:highlight`. If a string to normalize has more \"parts\" (more colons),\n* the further parts are dropped, for example: `addattribute:bold:$text` -> `addattributes:bold`.\n*\n* @param type Consumable type.\n* @returns Normalized consumable type.\n*/\nfunction _normalizeConsumableType(type) {\n\tconst parts = type.split(\":\");\n\tif (parts[0] == \"insert\") return parts[0];\n\tif (parts[0] == \"addMarker\" || parts[0] == \"removeMarker\") return type;\n\treturn parts.length > 1 ? parts[0] + \":\" + parts[1] : parts[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* Sorts markers so the downcast result is deterministic regardless of the order\n* markers were added to the marker collection.\n*\n* The sort key is the marker's range, ordered \"right-to-left\" through the document so that\n* a marker's opening boundary is processed *after* any markers nested inside it. This way\n* the outer marker wraps the inner ones at conversion time.\n*\n* Cases (positions shown as `0123456789`, sort result top-to-bottom):\n*\n* 1. Non-overlapping ranges — sorted by position, last range first:\n*\n*        a: [--]               →   c, b, a\n*        b:     [--]\n*        c:        [--]\n*\n* 2. Adjacent ranges (end === start) — treated as non-overlapping:\n*\n*        first:  [---]         →   third, second, first\n*        second:    [---]\n*        third:        [---]\n*\n* 3. Nested ranges (same start, different ends) — inner first, outer last:\n*\n*        shorter: [-]          →   shorter, longer\n*        longer:  [---]\n*\n* 4. Partially overlapping ranges — sorted by start position:\n*\n*        earlier: [---]        →   later, earlier\n*        later:     [---]\n*\n* 5. Identical ranges — fall back to reverse name comparison:\n*\n*        alpha:   [---]        →   charlie, bravo, alpha\n*        bravo:   [---]\n*        charlie: [---]\n*\n* @internal\n*/\nfunction compareMarkersForDowncast([name1, range1], [name2, range2]) {\n\tif (range1.end.compareWith(range2.start) !== \"after\") return 1;\n\telse if (range1.start.compareWith(range2.end) !== \"before\") return -1;\n\telse switch (range1.start.compareWith(range2.start)) {\n\t\tcase \"before\": return 1;\n\t\tcase \"after\": return -1;\n\t\tdefault: switch (range1.end.compareWith(range2.end)) {\n\t\t\tcase \"before\": return -1;\n\t\t\tcase \"after\": return 1;\n\t\t\tdefault: return name2.localeCompare(name1);\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 engine/conversion/downcastdispatcher\n*/\nconst DowncastDispatcherBase = /* #__PURE__ */ EmitterMixin();\n/**\n* The downcast dispatcher is a central point of downcasting (conversion from the model to the view), which is a process of reacting\n* to changes in the model and firing a set of events. The callbacks listening to these events are called converters. The\n* converters' role is to convert the model changes to changes in view (for example, adding view nodes or\n* changing attributes on view elements).\n*\n* During the conversion process, downcast dispatcher fires events basing on the state of the model and prepares\n* data for these events. It is important to understand that the events are connected with the changes done on the model,\n* for example: \"a node has been inserted\" or \"an attribute has changed\". This is in contrary to upcasting (a view-to-model conversion)\n* where you convert the view state (view nodes) to a model tree.\n*\n* The events are prepared basing on a diff created by the {@link module:engine/model/differ~Differ Differ}, which buffers them\n* and then passes to the downcast dispatcher as a diff between the old model state and the new model state.\n*\n* Note that because the changes are converted, there is a need to have a mapping between the model structure and the view structure.\n* To map positions and elements during the downcast (a model-to-view conversion), use {@link module:engine/conversion/mapper~Mapper}.\n*\n* Downcast dispatcher fires the following events for model tree changes:\n*\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`} &ndash;\n* If a range of nodes was inserted to the model tree.\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove `remove`} &ndash;\n* If a range of nodes was removed from the model tree.\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`} &ndash;\n* If an attribute was added, changed or removed from a model node.\n*\n* For {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`}\n* and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`},\n* the downcast dispatcher generates {@link module:engine/conversion/modelconsumable~ModelConsumable consumables}.\n* These are used to have control over which changes have already been consumed. It is useful when some converters\n* overwrite others or convert multiple changes (for example, it converts an insertion of an element and also converts that\n* element's attributes during the insertion).\n*\n* Additionally, downcast dispatcher fires events for {@link module:engine/model/markercollection~Marker marker} changes:\n*\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`} &ndash; If a marker was added.\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:removeMarker `removeMarker`} &ndash; If a marker was\n* removed.\n*\n* Note that changing a marker is done through removing the marker from the old range and adding it to the new range,\n* so both of these events are fired.\n*\n* Finally, a downcast dispatcher also handles firing events for the {@link module:engine/model/selection model selection}\n* conversion:\n*\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:selection `selection`}\n* &ndash; Converts the selection from the model to the view.\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`}\n* &ndash; Fired for every selection attribute.\n* * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`}\n* &ndash; Fired for every marker that contains a selection.\n*\n* Unlike the model tree and the markers, the events for selection are not fired for changes but for a selection state.\n*\n* When providing custom listeners for a downcast dispatcher, remember to check whether a given change has not been\n* {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} yet.\n*\n* When providing custom listeners for a downcast dispatcher, keep in mind that you **should not** stop the event. If you stop it,\n* then the default converter at the `lowest` priority will not trigger the conversion of this node's attributes and child nodes.\n*\n* When providing custom listeners for a downcast dispatcher, remember to use the provided\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter view downcast writer} to apply changes to the view document.\n*\n* You can read more about conversion in the following guide:\n*\n* * {@glink framework/deep-dive/conversion/downcast Downcast conversion}\n*\n* An example of a custom converter for the downcast dispatcher:\n*\n* ```ts\n* // You will convert inserting a \"paragraph\" model element into the model.\n* downcastDispatcher.on( 'insert:paragraph', ( evt, data, conversionApi ) => {\n* \t// Remember to check whether the change has not been consumed yet and consume it.\n* \tif ( !conversionApi.consumable.consume( data.item, 'insert' ) ) {\n* \t\treturn;\n* \t}\n*\n* \t// Translate the position in the model to a position in the view.\n* \tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n*\n* \t// Create a <p> element that will be inserted into the view at the `viewPosition`.\n* \tconst viewElement = conversionApi.writer.createContainerElement( 'p' );\n*\n* \t// Bind the newly created view element to the model element so positions will map accordingly in the future.\n* \tconversionApi.mapper.bindElements( data.item, viewElement );\n*\n* \t// Add the newly created view element to the view.\n* \tconversionApi.writer.insert( viewPosition, viewElement );\n* } );\n* ```\n*/\nvar DowncastDispatcher = class extends DowncastDispatcherBase {\n\t/**\n\t* A template for an interface passed by the dispatcher to the event callbacks.\n\t*\n\t* @internal\n\t*/\n\t_conversionApi;\n\t/**\n\t* A map of already fired events for a given `ModelConsumable`.\n\t*/\n\t_firedEventsMap;\n\t/**\n\t* Creates a downcast dispatcher instance.\n\t*\n\t* @see module:engine/conversion/downcastdispatcher~DowncastConversionApi\n\t*\n\t* @param conversionApi Additional properties for an interface that will be passed to events fired\n\t* by the downcast dispatcher.\n\t*/\n\tconstructor(conversionApi) {\n\t\tsuper();\n\t\tthis._conversionApi = {\n\t\t\tdispatcher: this,\n\t\t\t...conversionApi\n\t\t};\n\t\tthis._firedEventsMap = /* @__PURE__ */ new WeakMap();\n\t}\n\t/**\n\t* Converts changes buffered in the given {@link module:engine/model/differ~Differ model differ}\n\t* and fires conversion events based on it.\n\t*\n\t* @fires insert\n\t* @fires remove\n\t* @fires attribute\n\t* @fires addMarker\n\t* @fires removeMarker\n\t* @fires reduceChanges\n\t* @param differ The differ object with buffered changes.\n\t* @param markers Markers related to the model fragment to convert.\n\t* @param writer The view writer that should be used to modify the view document.\n\t*/\n\tconvertChanges(differ, markers, writer) {\n\t\tconst refreshedItems = differ.getRefreshedItems();\n\t\tconst conversionApi = this._createConversionApi(writer, refreshedItems);\n\t\tfor (const change of differ.getMarkersToRemove()) this._convertMarkerRemove(change.name, change.range, conversionApi);\n\t\tconst changes = this._reduceChanges(differ.getChanges(), refreshedItems);\n\t\tfor (const entry of changes) if (entry.type === \"insert\") this._convertInsert(ModelRange._createFromPositionAndShift(entry.position, entry.length), conversionApi);\n\t\telse if (entry.type === \"reinsert\") this._convertReinsert(ModelRange._createFromPositionAndShift(entry.position, entry.length), conversionApi);\n\t\telse if (entry.type === \"remove\") this._convertRemove(entry.position, entry.length, entry.name, conversionApi);\n\t\telse this._convertAttribute(entry.range, entry.attributeKey, entry.attributeOldValue, entry.attributeNewValue, conversionApi);\n\t\tconversionApi.mapper.flushDeferredBindings();\n\t\tfor (const markerName of conversionApi.mapper.flushUnboundMarkerNames()) {\n\t\t\tconst markerRange = markers.get(markerName).getRange();\n\t\t\tthis._convertMarkerRemove(markerName, markerRange, conversionApi);\n\t\t\tthis._convertMarkerAdd(markerName, markerRange, conversionApi);\n\t\t}\n\t\tconst markersToAdd = differ.getMarkersToAdd().sort((a, b) => compareMarkersForDowncast([a.name, a.range], [b.name, b.range]));\n\t\tfor (const change of markersToAdd) this._convertMarkerAdd(change.name, change.range, conversionApi);\n\t\tconversionApi.consumable.verifyAllConsumed(\"insert\");\n\t}\n\t/**\n\t* Starts a conversion of a model range and the provided markers.\n\t*\n\t* @fires insert\n\t* @fires attribute\n\t* @fires addMarker\n\t* @param range The inserted range.\n\t* @param markers The map of markers that should be down-casted.\n\t* @param writer The view writer that should be used to modify the view document.\n\t* @param options Optional options object passed to `convertionApi.options`.\n\t*/\n\tconvert(range, markers, writer, options = {}) {\n\t\tconst conversionApi = this._createConversionApi(writer, void 0, options);\n\t\tthis._convertInsert(range, conversionApi);\n\t\tfor (const [name, range] of Array.from(markers).sort(compareMarkersForDowncast)) this._convertMarkerAdd(name, range, conversionApi);\n\t\tconversionApi.consumable.verifyAllConsumed(\"insert\");\n\t}\n\t/**\n\t* Starts the model selection conversion.\n\t*\n\t* Fires events for a given {@link module:engine/model/selection~ModelSelection selection} to start the selection conversion.\n\t*\n\t* @fires selection\n\t* @fires addMarker\n\t* @fires attribute\n\t* @param selection The selection to convert.\n\t* @param markers Markers connected with the converted model.\n\t* @param writer View writer that should be used to modify the view document.\n\t*/\n\tconvertSelection(selection, markers, writer) {\n\t\tconst conversionApi = this._createConversionApi(writer);\n\t\tthis.fire(\"cleanSelection\", { selection }, conversionApi);\n\t\tconst modelRoot = selection.getFirstPosition().root;\n\t\tif (!conversionApi.mapper.toViewElement(modelRoot)) return;\n\t\tconst markersAtSelection = Array.from(markers.getMarkersAtPosition(selection.getFirstPosition()));\n\t\tthis._addConsumablesForSelection(conversionApi.consumable, selection, markersAtSelection);\n\t\tthis.fire(\"selection\", { selection }, conversionApi);\n\t\tif (!selection.isCollapsed) return;\n\t\tfor (const marker of markersAtSelection) if (conversionApi.consumable.test(selection, \"addMarker:\" + marker.name)) {\n\t\t\tconst markerRange = marker.getRange();\n\t\t\tif (!shouldMarkerChangeBeConverted(selection.getFirstPosition(), marker, conversionApi.mapper)) continue;\n\t\t\tconst data = {\n\t\t\t\titem: selection,\n\t\t\t\tmarkerName: marker.name,\n\t\t\t\tmarkerRange\n\t\t\t};\n\t\t\tthis.fire(`addMarker:${marker.name}`, data, conversionApi);\n\t\t}\n\t\tfor (const key of selection.getAttributeKeys()) if (conversionApi.consumable.test(selection, \"attribute:\" + key)) {\n\t\t\tconst data = {\n\t\t\t\titem: selection,\n\t\t\t\trange: selection.getFirstRange(),\n\t\t\t\tattributeKey: key,\n\t\t\t\tattributeOldValue: null,\n\t\t\t\tattributeNewValue: selection.getAttribute(key)\n\t\t\t};\n\t\t\tthis.fire(`attribute:${key}:$text`, data, conversionApi);\n\t\t}\n\t}\n\t/**\n\t* Fires insertion conversion of a range of nodes.\n\t*\n\t* For each node in the range, {@link #event:insert `insert` event is fired}. For each attribute on each node,\n\t* {@link #event:attribute `attribute` event is fired}.\n\t*\n\t* @fires insert\n\t* @fires attribute\n\t* @param range The inserted range.\n\t* @param conversionApi The conversion API object.\n\t* @param options.doNotAddConsumables Whether the ModelConsumable should not get populated\n\t* for items in the provided range.\n\t*/\n\t_convertInsert(range, conversionApi, options = {}) {\n\t\tif (!options.doNotAddConsumables) this._addConsumablesForInsert(conversionApi.consumable, range);\n\t\tfor (const data of range.getWalker({ shallow: true })) this._testAndFire(\"insert\", walkerValueToEventData(data), conversionApi);\n\t}\n\t/**\n\t* Fires conversion of a single node removal. Fires {@link #event:remove remove event} with provided data.\n\t*\n\t* @param position Position from which node was removed.\n\t* @param length Offset size of removed node.\n\t* @param name Name of removed node.\n\t* @param conversionApi The conversion API object.\n\t*/\n\t_convertRemove(position, length, name, conversionApi) {\n\t\tthis.fire(`remove:${name}`, {\n\t\t\tposition,\n\t\t\tlength\n\t\t}, conversionApi);\n\t}\n\t/**\n\t* Starts a conversion of an attribute change on a given `range`.\n\t*\n\t* For each node in the given `range`, {@link #event:attribute attribute event} is fired with the passed data.\n\t*\n\t* @fires attribute\n\t* @param range Changed range.\n\t* @param key Key of the attribute that has changed.\n\t* @param oldValue Attribute value before the change or `null` if the attribute has not been set before.\n\t* @param newValue New attribute value or `null` if the attribute has been removed.\n\t* @param conversionApi The conversion API object.\n\t*/\n\t_convertAttribute(range, key, oldValue, newValue, conversionApi) {\n\t\tthis._addConsumablesForRange(conversionApi.consumable, range, `attribute:${key}`);\n\t\tfor (const value of range) {\n\t\t\tconst data = {\n\t\t\t\titem: value.item,\n\t\t\t\trange: ModelRange._createFromPositionAndShift(value.previousPosition, value.length),\n\t\t\t\tattributeKey: key,\n\t\t\t\tattributeOldValue: oldValue,\n\t\t\t\tattributeNewValue: newValue\n\t\t\t};\n\t\t\tthis._testAndFire(`attribute:${key}`, data, conversionApi);\n\t\t}\n\t}\n\t/**\n\t* Fires re-insertion conversion (with a `reconversion` flag passed to `remove` and `insert` events)\n\t* of a range of elements (only elements on the range depth, without children).\n\t*\n\t* For each node in the range on its depth (without children), {@link #event:insert `insert` event} is fired.\n\t* For each attribute on each node, {@link #event:attribute `attribute` event} is fired.\n\t*\n\t* @fires insert\n\t* @fires attribute\n\t* @param range The range to reinsert.\n\t* @param conversionApi The conversion API object.\n\t*/\n\t_convertReinsert(range, conversionApi) {\n\t\tconst walkerValues = Array.from(range.getWalker({ shallow: true }));\n\t\tthis._addConsumablesForInsert(conversionApi.consumable, walkerValues);\n\t\tfor (const data of walkerValues.map(walkerValueToEventData)) {\n\t\t\tthis.fire(`remove:${data.item.is(\"element\") ? data.item.name : \"$text\"}`, {\n\t\t\t\tposition: data.range.start,\n\t\t\t\tlength: data.item.offsetSize,\n\t\t\t\treconversion: true\n\t\t\t}, conversionApi);\n\t\t\tthis._testAndFire(\"insert\", {\n\t\t\t\t...data,\n\t\t\t\treconversion: true\n\t\t\t}, conversionApi);\n\t\t}\n\t}\n\t/**\n\t* Converts the added marker. Fires the {@link #event:addMarker `addMarker`} event for each item\n\t* in the marker's range. If the range is collapsed, a single event is dispatched. See the event description for more details.\n\t*\n\t* @fires addMarker\n\t* @param markerName Marker name.\n\t* @param markerRange The marker range.\n\t* @param conversionApi The conversion API object.\n\t*/\n\t_convertMarkerAdd(markerName, markerRange, conversionApi) {\n\t\tif (markerRange.root.rootName == \"$graveyard\") return;\n\t\tconst eventName = `addMarker:${markerName}`;\n\t\tconversionApi.consumable.add(markerRange, eventName);\n\t\tthis.fire(eventName, {\n\t\t\tmarkerName,\n\t\t\tmarkerRange\n\t\t}, conversionApi);\n\t\tif (!conversionApi.consumable.consume(markerRange, eventName)) return;\n\t\tthis._addConsumablesForRange(conversionApi.consumable, markerRange, eventName);\n\t\tfor (const item of markerRange.getItems()) {\n\t\t\tif (!conversionApi.consumable.test(item, eventName)) continue;\n\t\t\tconst data = {\n\t\t\t\titem,\n\t\t\t\trange: ModelRange._createOn(item),\n\t\t\t\tmarkerName,\n\t\t\t\tmarkerRange\n\t\t\t};\n\t\t\tthis.fire(eventName, data, conversionApi);\n\t\t}\n\t}\n\t/**\n\t* Fires the conversion of the marker removal. Fires the {@link #event:removeMarker `removeMarker`} event with the provided data.\n\t*\n\t* @fires removeMarker\n\t* @param markerName Marker name.\n\t* @param markerRange The marker range.\n\t* @param conversionApi The conversion API object.\n\t*/\n\t_convertMarkerRemove(markerName, markerRange, conversionApi) {\n\t\tif (markerRange.root.rootName == \"$graveyard\") return;\n\t\tthis.fire(`removeMarker:${markerName}`, {\n\t\t\tmarkerName,\n\t\t\tmarkerRange\n\t\t}, conversionApi);\n\t}\n\t/**\n\t* Fires the reduction of changes buffered in the {@link module:engine/model/differ~Differ `Differ`}.\n\t*\n\t* Features can replace selected {@link module:engine/model/differ~DifferItem `DifferItem`}s with `reinsert` entries to trigger\n\t* reconversion. The {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t* `DowncastHelpers.elementToStructure()`} is using this event to trigger reconversion.\n\t*\n\t* @fires reduceChanges\n\t*/\n\t_reduceChanges(changes, refreshedItems) {\n\t\tconst data = {\n\t\t\tchanges,\n\t\t\trefreshedItems\n\t\t};\n\t\tthis.fire(\"reduceChanges\", data);\n\t\treturn data.changes;\n\t}\n\t/**\n\t* Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume from a given range,\n\t* assuming that the range has just been inserted to the model.\n\t*\n\t* @param consumable The consumable.\n\t* @param walkerValues The walker values for the inserted range.\n\t* @returns The values to consume.\n\t*/\n\t_addConsumablesForInsert(consumable, walkerValues) {\n\t\tfor (const value of walkerValues) {\n\t\t\tconst item = value.item;\n\t\t\tif (consumable.test(item, \"insert\") === null) {\n\t\t\t\tconsumable.add(item, \"insert\");\n\t\t\t\tfor (const key of item.getAttributeKeys()) consumable.add(item, \"attribute:\" + key);\n\t\t\t}\n\t\t}\n\t\treturn consumable;\n\t}\n\t/**\n\t* Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume for a given range.\n\t*\n\t* @param consumable The consumable.\n\t* @param range The affected range.\n\t* @param type Consumable type.\n\t* @returns The values to consume.\n\t*/\n\t_addConsumablesForRange(consumable, range, type) {\n\t\tfor (const item of range.getItems()) consumable.add(item, type);\n\t\treturn consumable;\n\t}\n\t/**\n\t* Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with selection consumable values.\n\t*\n\t* @param consumable The consumable.\n\t* @param selection The selection to create the consumable from.\n\t* @param markers Markers that contain the selection.\n\t* @returns The values to consume.\n\t*/\n\t_addConsumablesForSelection(consumable, selection, markers) {\n\t\tconsumable.add(selection, \"selection\");\n\t\tfor (const marker of markers) consumable.add(selection, \"addMarker:\" + marker.name);\n\t\tfor (const key of selection.getAttributeKeys()) consumable.add(selection, \"attribute:\" + key);\n\t\treturn consumable;\n\t}\n\t/**\n\t* Tests whether given event wasn't already fired and if so, fires it.\n\t*\n\t* @fires insert\n\t* @fires attribute\n\t* @param type Event type.\n\t* @param data Event data.\n\t* @param conversionApi The conversion API object.\n\t*/\n\t_testAndFire(type, data, conversionApi) {\n\t\tconst eventName = getEventName(type, data);\n\t\tconst itemKey = data.item.is(\"$textProxy\") ? conversionApi.consumable._getSymbolForTextProxy(data.item) : data.item;\n\t\tconst eventsFiredForConversion = this._firedEventsMap.get(conversionApi);\n\t\tconst eventsFiredForItem = eventsFiredForConversion.get(itemKey);\n\t\tif (!eventsFiredForItem) eventsFiredForConversion.set(itemKey, /* @__PURE__ */ new Set([eventName]));\n\t\telse if (!eventsFiredForItem.has(eventName)) eventsFiredForItem.add(eventName);\n\t\telse return;\n\t\tthis.fire(eventName, data, conversionApi);\n\t}\n\t/**\n\t* Fires not already fired events for setting attributes on just inserted item.\n\t*\n\t* @param item The model item to convert attributes for.\n\t* @param conversionApi The conversion API object.\n\t*/\n\t_testAndFireAddAttributes(item, conversionApi) {\n\t\tconst data = {\n\t\t\titem,\n\t\t\trange: ModelRange._createOn(item)\n\t\t};\n\t\tfor (const key of data.item.getAttributeKeys()) {\n\t\t\tdata.attributeKey = key;\n\t\t\tdata.attributeOldValue = null;\n\t\t\tdata.attributeNewValue = data.item.getAttribute(key);\n\t\t\tthis._testAndFire(`attribute:${key}`, data, conversionApi);\n\t\t}\n\t}\n\t/**\n\t* Builds an instance of the {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi} from a template and a given\n\t* {@link module:engine/view/downcastwriter~ViewDowncastWriter `ViewDowncastWriter`} and options object.\n\t*\n\t* @param writer View writer that should be used to modify the view document.\n\t* @param refreshedItems A set of model elements that should not reuse their\n\t* previous view representations.\n\t* @param options Optional options passed to `convertionApi.options`.\n\t* @return The conversion API object.\n\t*/\n\t_createConversionApi(writer, refreshedItems = /* @__PURE__ */ new Set(), options = {}) {\n\t\tconst conversionApi = {\n\t\t\t...this._conversionApi,\n\t\t\tconsumable: new ModelConsumable(),\n\t\t\twriter,\n\t\t\toptions,\n\t\t\tconvertItem: (item) => this._convertInsert(ModelRange._createOn(item), conversionApi),\n\t\t\tconvertChildren: (element) => this._convertInsert(ModelRange._createIn(element), conversionApi, { doNotAddConsumables: true }),\n\t\t\tconvertAttributes: (item) => this._testAndFireAddAttributes(item, conversionApi),\n\t\t\tcanReuseView: (viewElement) => !refreshedItems.has(conversionApi.mapper.toModelElement(viewElement))\n\t\t};\n\t\tthis._firedEventsMap.set(conversionApi, /* @__PURE__ */ new Map());\n\t\treturn conversionApi;\n\t}\n};\n/**\n* Helper function, checks whether change of `marker` at `modelPosition` should be converted. Marker changes are not\n* converted if they happen inside an element with custom conversion method.\n*/\nfunction shouldMarkerChangeBeConverted(modelPosition, marker, mapper) {\n\tconst range = marker.getRange();\n\tconst ancestors = Array.from(modelPosition.getAncestors());\n\tancestors.shift();\n\tancestors.reverse();\n\treturn !ancestors.some((element) => {\n\t\tif (range.containsItem(element)) return !!mapper.toViewElement(element).getCustomProperty(\"addHighlight\");\n\t});\n}\nfunction getEventName(type, data) {\n\treturn `${type}:${data.item.is(\"element\") ? data.item.name : \"$text\"}`;\n}\nfunction walkerValueToEventData(value) {\n\treturn {\n\t\titem: value.item,\n\t\trange: ModelRange._createFromPositionAndShift(value.previousPosition, value.length)\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 engine/model/node\n*/\n/**\n* Model node. Most basic structure of model tree.\n*\n* This is an abstract class that is a base for other classes representing different nodes in model.\n*\n* **Note:** If a node is detached from the model tree, you can manipulate it using it's API.\n* However, it is **very important** that nodes already attached to model tree should be only changed through\n* {@link module:engine/model/writer~ModelWriter Writer API}.\n*\n* Changes done by `Node` methods, like {@link module:engine/model/element~ModelElement#_insertChild _insertChild} or\n* {@link module:engine/model/node~ModelNode#_setAttribute _setAttribute}\n* do not generate {@link module:engine/model/operation/operation~Operation operations}\n* which are essential for correct editor work if you modify nodes in {@link module:engine/model/document~ModelDocument document} root.\n*\n* The flow of working on `Node` (and classes that inherits from it) is as such:\n* 1. You can create a `Node` instance, modify it using it's API.\n* 2. Add `Node` to the model using `Batch` API.\n* 3. Change `Node` that was already added to the model using `Batch` API.\n*\n* Similarly, you cannot use `Batch` API on a node that has not been added to the model tree, with the exception\n* of {@link module:engine/model/writer~ModelWriter#insert inserting} that node to the model tree.\n*\n* Be aware that using {@link module:engine/model/writer~ModelWriter#remove remove from Batch API} does not allow to use `Node` API because\n* the information about `Node` is still kept in model document.\n*\n* In case of {@link module:engine/model/element~ModelElement element node}, adding and removing children also counts as changing a node and\n* follows same rules.\n*/\nvar ModelNode = class extends ModelTypeCheckable {\n\t/**\n\t* Parent of this node. It could be {@link module:engine/model/element~ModelElement}\n\t* or {@link module:engine/model/documentfragment~ModelDocumentFragment}.\n\t* Equals to `null` if the node has no parent.\n\t*/\n\tparent = null;\n\t/**\n\t* Attributes set on this node.\n\t*/\n\t_attrs;\n\t/**\n\t* Index of this node in its parent or `null` if the node has no parent.\n\t*\n\t* @internal\n\t*/\n\t_index = null;\n\t/**\n\t* Offset at which this node starts in its parent or `null` if the node has no parent.\n\t*\n\t* @internal\n\t*/\n\t_startOffset = null;\n\t/**\n\t* Creates a model node.\n\t*\n\t* This is an abstract class, so this constructor should not be used directly.\n\t*\n\t* @param attrs Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t*/\n\tconstructor(attrs) {\n\t\tsuper();\n\t\tthis._attrs = toMap(attrs);\n\t}\n\t/**\n\t* {@link module:engine/model/document~ModelDocument Document} that owns this root element.\n\t*/\n\tget document() {\n\t\treturn null;\n\t}\n\t/**\n\t* Index of this node in its parent or `null` if the node has no parent.\n\t*/\n\tget index() {\n\t\treturn this._index;\n\t}\n\t/**\n\t* Offset at which this node starts in its parent. It is equal to the sum of {@link #offsetSize offsetSize}\n\t* of all its previous siblings. Equals to `null` if node has no parent.\n\t*/\n\tget startOffset() {\n\t\treturn this._startOffset;\n\t}\n\t/**\n\t* Offset size of this node.\n\t*\n\t* Represents how much \"offset space\" is occupied by the node in its parent. It is important for\n\t* {@link module:engine/model/position~ModelPosition position}. When node has `offsetSize` greater\n\t* than `1`, position can be placed between that node start and end. `offsetSize` greater than `1` is for\n\t* nodes that represents more than one entity, i.e. a {@link module:engine/model/text~ModelText text node}.\n\t*/\n\tget offsetSize() {\n\t\treturn 1;\n\t}\n\t/**\n\t* Offset at which this node ends in its parent. It is equal to the sum of this node's\n\t* {@link module:engine/model/node~ModelNode#startOffset start offset} and {@link #offsetSize offset size}.\n\t* Equals to `null` if the node has no parent.\n\t*/\n\tget endOffset() {\n\t\tif (this.startOffset === null) return null;\n\t\treturn this.startOffset + this.offsetSize;\n\t}\n\t/**\n\t* Node's next sibling or `null` if the node is a last child of it's parent or if the node has no parent.\n\t*/\n\tget nextSibling() {\n\t\tconst index = this.index;\n\t\treturn index !== null && this.parent.getChild(index + 1) || null;\n\t}\n\t/**\n\t* Node's previous sibling or `null` if the node is a first child of it's parent or if the node has no parent.\n\t*/\n\tget previousSibling() {\n\t\tconst index = this.index;\n\t\treturn index !== null && this.parent.getChild(index - 1) || null;\n\t}\n\t/**\n\t* The top-most ancestor of the node. If node has no parent it is the root itself. If the node is a part\n\t* of {@link module:engine/model/documentfragment~ModelDocumentFragment}, it's `root` is equal to that `DocumentFragment`.\n\t*/\n\tget root() {\n\t\tlet root = this;\n\t\twhile (root.parent) root = root.parent;\n\t\treturn root;\n\t}\n\t/**\n\t* Returns `true` if the node is inside a document root that is attached to the document.\n\t*/\n\tisAttached() {\n\t\treturn this.parent === null ? false : this.root.isAttached();\n\t}\n\t/**\n\t* Gets path to the node. The path is an array containing starting offsets of consecutive ancestors of this node,\n\t* beginning from {@link module:engine/model/node~ModelNode#root root}, down to this node's starting offset. The path can be used to\n\t* create {@link module:engine/model/position~ModelPosition Position} instance.\n\t*\n\t* ```ts\n\t* const abc = new Text( 'abc' );\n\t* const foo = new Text( 'foo' );\n\t* const h1 = new ModelElement( 'h1', null, new Text( 'header' ) );\n\t* const p = new ModelElement( 'p', null, [ abc, foo ] );\n\t* const div = new ModelElement( 'div', null, [ h1, p ] );\n\t* foo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t* h1.getPath(); // Returns [ 0 ].\n\t* div.getPath(); // Returns [].\n\t* ```\n\t*/\n\tgetPath() {\n\t\tconst path = [];\n\t\tlet node = this;\n\t\twhile (node.parent) {\n\t\t\tpath.unshift(node.startOffset);\n\t\t\tnode = node.parent;\n\t\t}\n\t\treturn path;\n\t}\n\t/**\n\t* Returns ancestors array of this node.\n\t*\n\t* @param options Options object.\n\t* @param options.includeSelf When set to `true` this node will be also included in parent's array.\n\t* @param options.parentFirst When set to `true`, array will be sorted from node's parent to root element,\n\t* otherwise root element will be the first item in the array.\n\t* @returns Array with ancestors.\n\t*/\n\tgetAncestors(options = {}) {\n\t\tconst ancestors = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\t\twhile (parent) {\n\t\t\tancestors[options.parentFirst ? \"push\" : \"unshift\"](parent);\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn ancestors;\n\t}\n\t/**\n\t* Returns a {@link module:engine/model/element~ModelElement} or {@link module:engine/model/documentfragment~ModelDocumentFragment}\n\t* which is a common ancestor of both nodes.\n\t*\n\t* @param node The second node.\n\t* @param options Options object.\n\t* @param options.includeSelf When set to `true` both nodes will be considered \"ancestors\" too.\n\t* Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t*/\n\tgetCommonAncestor(node, options = {}) {\n\t\tconst ancestorsA = this.getAncestors(options);\n\t\tconst ancestorsB = node.getAncestors(options);\n\t\tlet i = 0;\n\t\twhile (ancestorsA[i] == ancestorsB[i] && ancestorsA[i]) i++;\n\t\treturn i === 0 ? null : ancestorsA[i - 1];\n\t}\n\t/**\n\t* Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t* in different {@link module:engine/model/documentfragment~ModelDocumentFragment}s).\n\t*\n\t* @param node Node to compare with.\n\t*/\n\tisBefore(node) {\n\t\tif (this == node) return false;\n\t\tif (this.root !== node.root) return false;\n\t\tconst thisPath = this.getPath();\n\t\tconst nodePath = node.getPath();\n\t\tconst result = compareArrays(thisPath, nodePath);\n\t\tswitch (result) {\n\t\t\tcase \"prefix\": return true;\n\t\t\tcase \"extension\": return false;\n\t\t\tdefault: return thisPath[result] < nodePath[result];\n\t\t}\n\t}\n\t/**\n\t* Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t* in different {@link module:engine/model/documentfragment~ModelDocumentFragment}s).\n\t*\n\t* @param node Node to compare with.\n\t*/\n\tisAfter(node) {\n\t\tif (this == node) return false;\n\t\tif (this.root !== node.root) return false;\n\t\treturn !this.isBefore(node);\n\t}\n\t/**\n\t* Checks if the node has an attribute with given key.\n\t*\n\t* @param key Key of attribute to check.\n\t* @returns `true` if attribute with given key is set on node, `false` otherwise.\n\t*/\n\thasAttribute(key) {\n\t\treturn this._attrs.has(key);\n\t}\n\t/**\n\t* Gets an attribute value for given key or `undefined` if that attribute is not set on node.\n\t*\n\t* @param key Key of attribute to look for.\n\t* @returns Attribute value or `undefined`.\n\t*/\n\tgetAttribute(key) {\n\t\treturn this._attrs.get(key);\n\t}\n\t/**\n\t* Returns iterator that iterates over this node's attributes.\n\t*\n\t* Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t* This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t*/\n\tgetAttributes() {\n\t\treturn this._attrs.entries();\n\t}\n\t/**\n\t* Returns iterator that iterates over this node's attribute keys.\n\t*/\n\tgetAttributeKeys() {\n\t\treturn this._attrs.keys();\n\t}\n\t/**\n\t* Converts `Node` to plain object and returns it.\n\t*\n\t* @returns `Node` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = {};\n\t\tif (this._attrs.size) json.attributes = Array.from(this._attrs).reduce((result, attr) => {\n\t\t\tresult[attr[0]] = attr[1];\n\t\t\treturn result;\n\t\t}, {});\n\t\treturn json;\n\t}\n\t/**\n\t* Creates a copy of this node, that is a node with exactly same attributes, and returns it.\n\t*\n\t* @internal\n\t* @returns Node with same attributes as this node.\n\t*/\n\t_clone(_deep) {\n\t\treturn new this.constructor(this._attrs);\n\t}\n\t/**\n\t* Removes this node from its parent.\n\t*\n\t* @internal\n\t* @see module:engine/model/writer~ModelWriter#remove\n\t*/\n\t_remove() {\n\t\tthis.parent._removeChildren(this.index);\n\t}\n\t/**\n\t* Sets attribute on the node. If attribute with the same key already is set, it's value is overwritten.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#setAttribute\n\t* @internal\n\t* @param key Key of attribute to set.\n\t* @param value Attribute value.\n\t*/\n\t_setAttribute(key, value) {\n\t\tthis._attrs.set(key, value);\n\t}\n\t/**\n\t* Removes all attributes from the node and sets given attributes.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#setAttributes\n\t* @internal\n\t* @param attrs Attributes to set. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t*/\n\t_setAttributesTo(attrs) {\n\t\tthis._attrs = toMap(attrs);\n\t}\n\t/**\n\t* Removes an attribute with given key from the node.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#removeAttribute\n\t* @internal\n\t* @param key Key of attribute to remove.\n\t* @returns `true` if the attribute was set on the element, `false` otherwise.\n\t*/\n\t_removeAttribute(key) {\n\t\treturn this._attrs.delete(key);\n\t}\n\t/**\n\t* Removes all attributes from the node.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#clearAttributes\n\t* @internal\n\t*/\n\t_clearAttributes() {\n\t\tthis._attrs.clear();\n\t}\n};\nModelNode.prototype.is = function(type) {\n\treturn type === \"node\" || type === \"model: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 engine/model/selection\n*/\nconst ModelSelectionBase = /* #__PURE__ */ EmitterMixin(ModelTypeCheckable);\n/**\n* Selection is a set of {@link module:engine/model/range~ModelRange ranges}. It has a direction specified by its\n* {@link module:engine/model/selection~ModelSelection#anchor anchor} and {@link module:engine/model/selection~ModelSelection#focus focus}\n* (it can be {@link module:engine/model/selection~ModelSelection#isBackward forward or backward}).\n* Additionally, selection may have its own attributes (think – whether text typed in in this selection\n* should have those attributes – e.g. whether you type a bolded text).\n*/\nvar ModelSelection = class ModelSelection extends ModelSelectionBase {\n\t/**\n\t* Specifies whether the last added range was added as a backward or forward range.\n\t*/\n\t_lastRangeBackward = false;\n\t/**\n\t* List of attributes set on current selection.\n\t*/\n\t_attrs = /* @__PURE__ */ new Map();\n\t/** @internal */\n\t_ranges = [];\n\t/**\n\t* Creates a new selection instance based on the given {@link module:engine/model/selection~ModelSelectable selectable}\n\t* or creates an empty selection if no arguments were passed.\n\t*\n\t* ```ts\n\t* // Creates empty selection without ranges.\n\t* const selection = writer.createSelection();\n\t*\n\t* // Creates selection at the given range.\n\t* const range = writer.createRange( start, end );\n\t* const selection = writer.createSelection( range );\n\t*\n\t* // Creates selection at the given ranges\n\t* const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t* const selection = writer.createSelection( ranges );\n\t*\n\t* // Creates selection from the other selection.\n\t* // Note: It doesn't copy selection attributes.\n\t* const otherSelection = writer.createSelection();\n\t* const selection = writer.createSelection( otherSelection );\n\t*\n\t* // Creates selection from the given document selection.\n\t* // Note: It doesn't copy selection attributes.\n\t* const documentSelection = model.document.selection;\n\t* const selection = writer.createSelection( documentSelection );\n\t*\n\t* // Creates selection at the given position.\n\t* const position = writer.createPositionFromPath( root, path );\n\t* const selection = writer.createSelection( position );\n\t*\n\t* // Creates selection at the given offset in the given element.\n\t* const paragraph = writer.createElement( 'paragraph' );\n\t* const selection = writer.createSelection( paragraph, offset );\n\t*\n\t* // Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the\n\t* // first child of that element and ends after the last child of that element.\n\t* const selection = writer.createSelection( paragraph, 'in' );\n\t*\n\t* // Creates a range on an {@link module:engine/model/item~ModelItem item} which starts before the item and ends\n\t* // just after the item.\n\t* const selection = writer.createSelection( paragraph, 'on' );\n\t* ```\n\t*\n\t* Selection's constructor allow passing additional options (`'backward'`) as the last argument.\n\t*\n\t* ```ts\n\t* // Creates backward selection.\n\t* const selection = writer.createSelection( range, { backward: true } );\n\t* ```\n\t*\n\t* @internal\n\t*/\n\tconstructor(...args) {\n\t\tsuper();\n\t\tif (args.length) this.setTo(...args);\n\t}\n\t/**\n\t* Selection anchor. Anchor is the position from which the selection was started. If a user is making a selection\n\t* by dragging the mouse, the anchor is where the user pressed the mouse button (the beginning of the selection).\n\t*\n\t* Anchor and {@link #focus} define the direction of the selection, which is important\n\t* when expanding/shrinking selection. The focus moves, while the anchor should remain in the same place.\n\t*\n\t* Anchor is always set to the {@link module:engine/model/range~ModelRange#start start} or\n\t* {@link module:engine/model/range~ModelRange#end end} position of the last of selection's ranges. Whether it is\n\t* the `start` or `end` depends on the specified `options.backward`. See the {@link #setTo `setTo()`} method.\n\t*\n\t* May be set to `null` if there are no ranges in the selection.\n\t*\n\t* @see #focus\n\t*/\n\tget anchor() {\n\t\tif (this._ranges.length > 0) {\n\t\t\tconst range = this._ranges[this._ranges.length - 1];\n\t\t\treturn this._lastRangeBackward ? range.end : range.start;\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Selection focus. Focus is the position where the selection ends. If a user is making a selection\n\t* by dragging the mouse, the focus is where the mouse cursor is.\n\t*\n\t* May be set to `null` if there are no ranges in the selection.\n\t*\n\t* @see #anchor\n\t*/\n\tget focus() {\n\t\tif (this._ranges.length > 0) {\n\t\t\tconst range = this._ranges[this._ranges.length - 1];\n\t\t\treturn this._lastRangeBackward ? range.start : range.end;\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Whether the selection is collapsed. Selection is collapsed when there is exactly one range in it\n\t* and it is collapsed.\n\t*/\n\tget isCollapsed() {\n\t\tif (this._ranges.length === 1) return this._ranges[0].isCollapsed;\n\t\telse return false;\n\t}\n\t/**\n\t* Returns the number of ranges in the selection.\n\t*/\n\tget rangeCount() {\n\t\treturn this._ranges.length;\n\t}\n\t/**\n\t* Specifies whether the selection's {@link #focus} precedes the selection's {@link #anchor}.\n\t*/\n\tget isBackward() {\n\t\treturn !this.isCollapsed && this._lastRangeBackward;\n\t}\n\t/**\n\t* Checks whether this selection is equal to the given selection. Selections are equal if they have the same directions,\n\t* the same number of ranges and all ranges from one selection equal to ranges from the another selection.\n\t*\n\t* @param otherSelection Selection to compare with.\n\t* @returns `true` if selections are equal, `false` otherwise.\n\t*/\n\tisEqual(otherSelection) {\n\t\tif (this.rangeCount != otherSelection.rangeCount) return false;\n\t\telse if (this.rangeCount === 0) return true;\n\t\tif (!this.anchor.isEqual(otherSelection.anchor) || !this.focus.isEqual(otherSelection.focus)) return false;\n\t\tfor (const thisRange of this._ranges) {\n\t\t\tlet found = false;\n\t\t\tfor (const otherRange of otherSelection._ranges) if (thisRange.isEqual(otherRange)) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!found) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Returns an iterable object that iterates over copies of selection ranges.\n\t*/\n\t*getRanges() {\n\t\tfor (const range of this._ranges) yield new ModelRange(range.start, range.end);\n\t}\n\t/**\n\t* Returns a copy of the first range in the selection.\n\t* First range is the one which {@link module:engine/model/range~ModelRange#start start} position\n\t* {@link module:engine/model/position~ModelPosition#isBefore is before} start position of all other ranges\n\t* (not to confuse with the first range added to the selection).\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetFirstRange() {\n\t\tlet first = null;\n\t\tfor (const range of this._ranges) if (!first || range.start.isBefore(first.start)) first = range;\n\t\treturn first ? new ModelRange(first.start, first.end) : null;\n\t}\n\t/**\n\t* Returns a copy of the last range in the selection.\n\t* Last range is the one which {@link module:engine/model/range~ModelRange#end end} position\n\t* {@link module:engine/model/position~ModelPosition#isAfter is after} end position of all other\n\t* ranges (not to confuse with the range most recently added to the selection).\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetLastRange() {\n\t\tlet last = null;\n\t\tfor (const range of this._ranges) if (!last || range.end.isAfter(last.end)) last = range;\n\t\treturn last ? new ModelRange(last.start, last.end) : null;\n\t}\n\t/**\n\t* Returns the first position in the selection.\n\t* First position is the position that {@link module:engine/model/position~ModelPosition#isBefore is before}\n\t* any other position in the selection.\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetFirstPosition() {\n\t\tconst first = this.getFirstRange();\n\t\treturn first ? first.start.clone() : null;\n\t}\n\t/**\n\t* Returns the last position in the selection.\n\t* Last position is the position that {@link module:engine/model/position~ModelPosition#isAfter is after}\n\t* any other position in the selection.\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetLastPosition() {\n\t\tconst lastRange = this.getLastRange();\n\t\treturn lastRange ? lastRange.end.clone() : null;\n\t}\n\t/**\n\t* Sets this selection's ranges and direction to the specified location based on the given\n\t* {@link module:engine/model/selection~ModelSelectable selectable}.\n\t*\n\t* ```ts\n\t* // Removes all selection's ranges.\n\t* selection.setTo( null );\n\t*\n\t* // Sets selection to the given range.\n\t* const range = writer.createRange( start, end );\n\t* selection.setTo( range );\n\t*\n\t* // Sets selection to given ranges.\n\t* const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t* selection.setTo( ranges );\n\t*\n\t* // Sets selection to other selection.\n\t* // Note: It doesn't copy selection attributes.\n\t* const otherSelection = writer.createSelection();\n\t* selection.setTo( otherSelection );\n\t*\n\t* // Sets selection to the given document selection.\n\t* // Note: It doesn't copy selection attributes.\n\t* const documentSelection = new ModelDocumentSelection( doc );\n\t* selection.setTo( documentSelection );\n\t*\n\t* // Sets collapsed selection at the given position.\n\t* const position = writer.createPositionFromPath( root, path );\n\t* selection.setTo( position );\n\t*\n\t* // Sets collapsed selection at the position of the given node and an offset.\n\t* selection.setTo( paragraph, offset );\n\t* ```\n\t*\n\t* Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* ```ts\n\t* selection.setTo( paragraph, 'in' );\n\t* ```\n\t*\n\t* Creates a range on an {@link module:engine/model/item~ModelItem item} which starts before the item and ends just after the item.\n\t*\n\t* ```ts\n\t* selection.setTo( paragraph, 'on' );\n\t* ```\n\t*\n\t* `Selection#setTo()` method allows passing additional options (`backward`) as the last argument.\n\t*\n\t* ```ts\n\t* // Sets backward selection.\n\t* const selection = writer.createSelection( range, { backward: true } );\n\t* ```\n\t*/\n\tsetTo(...args) {\n\t\tlet [selectable, placeOrOffset, options] = args;\n\t\tif (typeof placeOrOffset == \"object\") {\n\t\t\toptions = placeOrOffset;\n\t\t\tplaceOrOffset = void 0;\n\t\t}\n\t\tif (selectable === null) this._setRanges([]);\n\t\telse if (selectable instanceof ModelSelection) this._setRanges(selectable.getRanges(), selectable.isBackward);\n\t\telse if (selectable && typeof selectable.getRanges == \"function\") this._setRanges(selectable.getRanges(), selectable.isBackward);\n\t\telse if (selectable instanceof ModelRange) this._setRanges([selectable], !!options && !!options.backward);\n\t\telse if (selectable instanceof ModelPosition) this._setRanges([new ModelRange(selectable)]);\n\t\telse if (selectable instanceof ModelNode) {\n\t\t\tconst backward = !!options && !!options.backward;\n\t\t\tlet range;\n\t\t\tif (placeOrOffset == \"in\") range = ModelRange._createIn(selectable);\n\t\t\telse if (placeOrOffset == \"on\") range = ModelRange._createOn(selectable);\n\t\t\telse if (placeOrOffset !== void 0) range = new ModelRange(ModelPosition._createAt(selectable, placeOrOffset));\n\t\t\telse\n /**\n\t\t\t* selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t*\n\t\t\t* @error model-selection-setto-required-second-parameter\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"model-selection-setto-required-second-parameter\", [this, selectable]);\n\t\t\tthis._setRanges([range], backward);\n\t\t} else if (isIterable(selectable)) this._setRanges(selectable, options && !!options.backward);\n\t\telse\n /**\n\t\t* Cannot set the selection to the given place.\n\t\t*\n\t\t* Invalid parameters were specified when setting the selection. Common issues:\n\t\t*\n\t\t* * A {@link module:engine/model/textproxy~ModelTextProxy} instance was passed instead of\n\t\t* a real {@link module:engine/model/text~ModelText}.\n\t\t* * View nodes were passed instead of model nodes.\n\t\t* * `null`/`undefined` was passed.\n\t\t*\n\t\t* @error model-selection-setto-not-selectable\n\t\t*/\n\t\tthrow new CKEditorError(\"model-selection-setto-not-selectable\", [this, selectable]);\n\t}\n\t/**\n\t* Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t* is treated like the last added range and is used to set {@link module:engine/model/selection~ModelSelection#anchor} and\n\t* {@link module:engine/model/selection~ModelSelection#focus}. Accepts a flag describing in which direction the selection is made.\n\t*\n\t* @fires change:range\n\t* @param newRanges Ranges to set.\n\t* @param isLastBackward Flag describing if last added range was selected forward - from start to end (`false`)\n\t* or backward - from end to start (`true`).\n\t*/\n\t_setRanges(newRanges, isLastBackward = false) {\n\t\tconst ranges = Array.from(newRanges);\n\t\tconst anyNewRange = ranges.some((newRange) => {\n\t\t\tif (!(newRange instanceof ModelRange))\n /**\n\t\t\t* Selection range set to an object that is not an instance of {@link module:engine/model/range~ModelRange}.\n\t\t\t*\n\t\t\t* Only {@link module:engine/model/range~ModelRange} instances can be used to set a selection.\n\t\t\t* Common mistakes leading to this error are:\n\t\t\t*\n\t\t\t* * using DOM `Range` object,\n\t\t\t* * incorrect CKEditor 5 installation with multiple `ckeditor5-engine` packages having different versions.\n\t\t\t*\n\t\t\t* @error model-selection-set-ranges-not-range\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"model-selection-set-ranges-not-range\", [this, newRanges]);\n\t\t\treturn this._ranges.every((oldRange) => {\n\t\t\t\treturn !oldRange.isEqual(newRange);\n\t\t\t});\n\t\t});\n\t\tif (ranges.length === this._ranges.length && !anyNewRange) return;\n\t\tthis._replaceAllRanges(ranges);\n\t\tthis._lastRangeBackward = !!isLastBackward;\n\t\tthis.fire(\"change:range\", { directChange: true });\n\t}\n\t/**\n\t* Moves {@link module:engine/model/selection~ModelSelection#focus} to the specified location.\n\t*\n\t* The location can be specified in the same form as\n\t* {@link module:engine/model/writer~ModelWriter#createPositionAt writer.createPositionAt()} parameters.\n\t*\n\t* @fires change:range\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\tsetFocus(itemOrPosition, offset) {\n\t\tif (this.anchor === null)\n /**\n\t\t* Cannot set selection focus if there are no ranges in selection.\n\t\t*\n\t\t* @error model-selection-setfocus-no-ranges\n\t\t*/\n\t\tthrow new CKEditorError(\"model-selection-setfocus-no-ranges\", [this, itemOrPosition]);\n\t\tconst newFocus = ModelPosition._createAt(itemOrPosition, offset);\n\t\tif (newFocus.compareWith(this.focus) == \"same\") return;\n\t\tconst anchor = this.anchor;\n\t\tif (this._ranges.length) this._popRange();\n\t\tif (newFocus.compareWith(anchor) == \"before\") {\n\t\t\tthis._pushRange(new ModelRange(newFocus, anchor));\n\t\t\tthis._lastRangeBackward = true;\n\t\t} else {\n\t\t\tthis._pushRange(new ModelRange(anchor, newFocus));\n\t\t\tthis._lastRangeBackward = false;\n\t\t}\n\t\tthis.fire(\"change:range\", { directChange: true });\n\t}\n\t/**\n\t* Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t*\n\t* @param key Key of attribute to look for.\n\t* @returns Attribute value or `undefined`.\n\t*/\n\tgetAttribute(key) {\n\t\treturn this._attrs.get(key);\n\t}\n\t/**\n\t* Returns iterable that iterates over this selection's attributes.\n\t*\n\t* Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t* This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t*/\n\tgetAttributes() {\n\t\treturn this._attrs.entries();\n\t}\n\t/**\n\t* Returns iterable that iterates over this selection's attribute keys.\n\t*/\n\tgetAttributeKeys() {\n\t\treturn this._attrs.keys();\n\t}\n\t/**\n\t* Checks if the selection has an attribute for given key.\n\t*\n\t* @param key Key of attribute to check.\n\t* @returns `true` if attribute with given key is set on selection, `false` otherwise.\n\t*/\n\thasAttribute(key) {\n\t\treturn this._attrs.has(key);\n\t}\n\t/**\n\t* Removes an attribute with given key from the selection.\n\t*\n\t* If given attribute was set on the selection, fires the {@link #event:change:range} event with\n\t* removed attribute key.\n\t*\n\t* @fires change:attribute\n\t* @param key Key of attribute to remove.\n\t*/\n\tremoveAttribute(key) {\n\t\tif (this.hasAttribute(key)) {\n\t\t\tthis._attrs.delete(key);\n\t\t\tthis.fire(\"change:attribute\", {\n\t\t\t\tattributeKeys: [key],\n\t\t\t\tdirectChange: true\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t*\n\t* If the attribute value has changed, fires the {@link #event:change:range} event with\n\t* the attribute key.\n\t*\n\t* @fires change:attribute\n\t* @param key Key of attribute to set.\n\t* @param value Attribute value.\n\t*/\n\tsetAttribute(key, value) {\n\t\tif (this.getAttribute(key) !== value) {\n\t\t\tthis._attrs.set(key, value);\n\t\t\tthis.fire(\"change:attribute\", {\n\t\t\t\tattributeKeys: [key],\n\t\t\t\tdirectChange: true\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Returns the selected element. {@link module:engine/model/element~ModelElement Element} is considered as selected if there is only\n\t* one range in the selection, and that range contains exactly one element.\n\t* Returns `null` if there is no selected element.\n\t*/\n\tgetSelectedElement() {\n\t\tif (this.rangeCount !== 1) return null;\n\t\treturn this.getFirstRange().getContainedElement();\n\t}\n\t/**\n\t* Gets elements of type {@link module:engine/model/schema~ModelSchema#isBlock \"block\"} touched by the selection.\n\t*\n\t* This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t*\n\t* **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t* but will not return blocks nested in other blocks.\n\t*\n\t* In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t*\n\t* ```xml\n\t* <paragraph>[a</paragraph>\n\t* <blockQuote>\n\t* \t<paragraph>b</paragraph>\n\t* </blockQuote>\n\t* <paragraph>c]d</paragraph>\n\t* ```\n\t*\n\t* In this case the paragraph will also be returned, despite the collapsed selection:\n\t*\n\t* ```xml\n\t* <paragraph>[]a</paragraph>\n\t* ```\n\t*\n\t* In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t*\n\t* ```xml\n\t* [<blockA></blockA>\n\t* <blockB>\n\t* \t<blockC></blockC>\n\t* \t<blockD></blockD>\n\t* </blockB>\n\t* <blockE></blockE>]\n\t* ```\n\t*\n\t* If the selection is inside a block all the inner blocks (A & B) are returned:\n\t*\n\t* ```xml\n\t* <block>\n\t* \t<blockA>[a</blockA>\n\t* \t<blockB>b]</blockB>\n\t* </block>\n\t* ```\n\t*\n\t* **Special case**: Selection ignores first and/or last blocks if nothing (from user perspective) is selected in them.\n\t*\n\t* ```xml\n\t* // Selection ends and the beginning of the last block.\n\t* <paragraph>[a</paragraph>\n\t* <paragraph>b</paragraph>\n\t* <paragraph>]c</paragraph> // This block will not be returned\n\t*\n\t* // Selection begins at the end of the first block.\n\t* <paragraph>a[</paragraph> // This block will not be returned\n\t* <paragraph>b</paragraph>\n\t* <paragraph>c]</paragraph>\n\t*\n\t* // Selection begings at the end of the first block and ends at the beginning of the last block.\n\t* <paragraph>a[</paragraph> // This block will not be returned\n\t* <paragraph>b</paragraph>\n\t* <paragraph>]c</paragraph> // This block will not be returned\n\t* ```\n\t*/\n\t*getSelectedBlocks() {\n\t\tconst visited = /* @__PURE__ */ new WeakSet();\n\t\tfor (const range of this.getRanges()) {\n\t\t\tconst startBlock = getParentBlock$1(range.start, visited);\n\t\t\tif (isStartBlockSelected(startBlock, range)) yield startBlock;\n\t\t\tconst treewalker = range.getWalker();\n\t\t\tfor (const value of treewalker) {\n\t\t\t\tconst block = value.item;\n\t\t\t\tif (value.type == \"elementEnd\" && isUnvisitedTopBlock(block, visited, range)) yield block;\n\t\t\t\telse if (value.type == \"elementStart\" && block.is(\"model:element\") && block.root.document.model.schema.isBlock(block)) treewalker.jumpTo(ModelPosition._createAt(block, \"end\"));\n\t\t\t}\n\t\t\tconst endBlock = getParentBlock$1(range.end, visited);\n\t\t\tif (isEndBlockSelected(endBlock, range)) yield endBlock;\n\t\t}\n\t}\n\t/**\n\t* Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t* at a position {@link module:engine/model/position~ModelPosition#isTouching touching} the element's start and ends at position\n\t* touching the element's end.\n\t*\n\t* By default, this method will check whether the entire content of the selection's current root is selected.\n\t* Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t*/\n\tcontainsEntireContent(element = this.anchor.root) {\n\t\tconst limitStartPosition = ModelPosition._createAt(element, 0);\n\t\tconst limitEndPosition = ModelPosition._createAt(element, \"end\");\n\t\treturn limitStartPosition.isTouching(this.getFirstPosition()) && limitEndPosition.isTouching(this.getLastPosition());\n\t}\n\t/**\n\t* Converts `Selection` to plain object and returns it.\n\t*\n\t* @returns `Selection` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = { ranges: Array.from(this.getRanges()).map((range) => range.toJSON()) };\n\t\tconst attributes = Object.fromEntries(this.getAttributes());\n\t\tif (Object.keys(attributes).length) json.attributes = attributes;\n\t\tif (this.isBackward) json.isBackward = true;\n\t\treturn json;\n\t}\n\t/**\n\t* Adds given range to internal {@link #_ranges ranges array}. Throws an error\n\t* if given range is intersecting with any range that is already stored in this selection.\n\t*/\n\t_pushRange(range) {\n\t\tthis._checkRange(range);\n\t\tthis._ranges.push(new ModelRange(range.start, range.end));\n\t}\n\t/**\n\t* Checks if given range intersects with ranges that are already in the selection. Throws an error if it does.\n\t*/\n\t_checkRange(range) {\n\t\tfor (let i = 0; i < this._ranges.length; i++) if (range.isIntersecting(this._ranges[i]))\n /**\n\t\t* Trying to add a range that intersects with another range in the selection.\n\t\t*\n\t\t* @error model-selection-range-intersects\n\t\t* @param {module:engine/model/range~ModelRange} addedRange Range that was added to the selection.\n\t\t* @param {module:engine/model/range~ModelRange} intersectingRange Range in the selection that intersects with `addedRange`.\n\t\t*/\n\t\tthrow new CKEditorError(\"model-selection-range-intersects\", [this, range], {\n\t\t\taddedRange: range,\n\t\t\tintersectingRange: this._ranges[i]\n\t\t});\n\t}\n\t/**\n\t* Replaces all the ranges by the given ones.\n\t* Uses {@link #_popRange _popRange} and {@link #_pushRange _pushRange} to ensure proper ranges removal and addition.\n\t*/\n\t_replaceAllRanges(ranges) {\n\t\tthis._removeAllRanges();\n\t\tfor (const range of ranges) this._pushRange(range);\n\t}\n\t/**\n\t* Deletes ranges from internal range array. Uses {@link #_popRange _popRange} to\n\t* ensure proper ranges removal.\n\t*/\n\t_removeAllRanges() {\n\t\twhile (this._ranges.length > 0) this._popRange();\n\t}\n\t/**\n\t* Removes most recently added range from the selection.\n\t*/\n\t_popRange() {\n\t\tthis._ranges.pop();\n\t}\n};\nModelSelection.prototype.is = function(type) {\n\treturn type === \"selection\" || type === \"model:selection\";\n};\n/**\n* Checks whether the given element extends $block in the schema and has a parent (is not a root).\n* Marks it as already visited.\n*/\nfunction isUnvisitedBlock(element, visited) {\n\tif (visited.has(element)) return false;\n\tvisited.add(element);\n\treturn element.root.document.model.schema.isBlock(element) && !!element.parent;\n}\n/**\n* Checks if the given element is a $block was not previously visited and is a top block in a range.\n*/\nfunction isUnvisitedTopBlock(element, visited, range) {\n\treturn isUnvisitedBlock(element, visited) && isTopBlockInRange(element, range);\n}\n/**\n* Finds the lowest element in position's ancestors which is a block.\n* It will search until first ancestor that is a limit element.\n* Marks all ancestors as already visited to not include any of them later on.\n*/\nfunction getParentBlock$1(position, visited) {\n\tconst schema = position.parent.root.document.model.schema;\n\tconst ancestors = position.parent.getAncestors({\n\t\tparentFirst: true,\n\t\tincludeSelf: true\n\t});\n\tlet hasParentLimit = false;\n\tconst block = ancestors.find((element) => {\n\t\tif (hasParentLimit) return false;\n\t\thasParentLimit = schema.isLimit(element);\n\t\treturn !hasParentLimit && isUnvisitedBlock(element, visited);\n\t});\n\tancestors.forEach((element) => visited.add(element));\n\treturn block;\n}\n/**\n* Checks if the blocks is not nested in other block inside a range.\n*/\nfunction isTopBlockInRange(block, range) {\n\tconst parentBlock = findAncestorBlock(block);\n\tif (!parentBlock) return true;\n\treturn !range.containsRange(ModelRange._createOn(parentBlock), true);\n}\n/**\n* If a selection starts at the end of a block, that block is not returned as from the user's perspective this block wasn't selected.\n* See [#11585](https://github.com/ckeditor/ckeditor5/issues/11585) for more details.\n*\n* ```xml\n* <paragraph>a[</paragraph> // This block will not be returned\n* <paragraph>b</paragraph>\n* <paragraph>c]</paragraph>\n* ```\n*\n* Collapsed selection is not affected by it:\n*\n* ```xml\n* <paragraph>a[]</paragraph> // This block will be returned\n* ```\n*/\nfunction isStartBlockSelected(startBlock, range) {\n\tif (!startBlock) return false;\n\tif (range.isCollapsed || startBlock.isEmpty) return true;\n\tif (range.start.isTouching(ModelPosition._createAt(startBlock, startBlock.maxOffset))) return false;\n\treturn isTopBlockInRange(startBlock, range);\n}\n/**\n* If a selection ends at the beginning of a block, that block is not returned as from the user's perspective this block wasn't selected.\n* See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n*\n* ```xml\n* <paragraph>[a</paragraph>\n* <paragraph>b</paragraph>\n* <paragraph>]c</paragraph> // this block will not be returned\n* ```\n*\n* Collapsed selection is not affected by it:\n*\n* ```xml\n* <paragraph>[]a</paragraph> // this block will be returned\n* ```\n*/\nfunction isEndBlockSelected(endBlock, range) {\n\tif (!endBlock) return false;\n\tif (range.isCollapsed || endBlock.isEmpty) return true;\n\tif (range.end.isTouching(ModelPosition._createAt(endBlock, 0))) return false;\n\treturn isTopBlockInRange(endBlock, range);\n}\n/**\n* Returns first ancestor block of a node.\n*/\nfunction findAncestorBlock(node) {\n\tconst schema = node.root.document.model.schema;\n\tlet parent = node.parent;\n\twhile (parent) {\n\t\tif (schema.isBlock(parent)) return parent;\n\t\tparent = parent.parent;\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 engine/model/liverange\n*/\nconst ModelLiveRangeBase = /* #__PURE__ */ EmitterMixin(ModelRange);\n/**\n* `ModelLiveRange` is a type of {@link module:engine/model/range~ModelRange Range}\n* that updates itself as {@link module:engine/model/document~ModelDocument document}\n* is changed through operations. It may be used as a bookmark.\n*\n* **Note:** Be very careful when dealing with `ModelLiveRange`. Each `ModelLiveRange` instance bind events that might\n* have to be unbound. Use {@link module:engine/model/liverange~ModelLiveRange#detach detach} whenever you don't need\n* `ModelLiveRange` anymore.\n*/\nvar ModelLiveRange = class ModelLiveRange extends ModelLiveRangeBase {\n\t/**\n\t* Creates a live range.\n\t*\n\t* @see module:engine/model/range~ModelRange\n\t*/\n\tconstructor(start, end, model) {\n\t\tsuper(start, end);\n\t\tconst root = this.root;\n\t\tconst boundModel = model || (root.is(\"rootElement\") ? root.document.model : null);\n\t\tif (!boundModel)\n /**\n\t\t* LiveRange's root has to be an instance of ModelRootElement or have a reference to a model instance.\n\t\t*\n\t\t* @error model-liverange-no-model-reference\n\t\t*/\n\t\tthrow new CKEditorError(\"model-liverange-no-model-reference\", root);\n\t\tbindWithModel$1.call(this, boundModel);\n\t}\n\t/**\n\t* Unbinds all events previously bound by `ModelLiveRange`. Use it whenever you don't need `ModelLiveRange` instance\n\t* anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was\n\t* referring to it).\n\t*/\n\tdetach() {\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Creates a {@link module:engine/model/range~ModelRange range instance} that is equal to this live range.\n\t*/\n\ttoRange() {\n\t\treturn new ModelRange(this.start, this.end);\n\t}\n\t/**\n\t* Creates a `ModelLiveRange` instance that is equal to the given range.\n\t*/\n\tstatic fromRange(range) {\n\t\treturn new ModelLiveRange(range.start, range.end);\n\t}\n\t/**\n\t* Creates a `ModelLiveRange` for a range rooted in\n\t* a {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n\t*\n\t* Document fragment does not belong to a document, so the live range is bound to the provided `model` and keeps\n\t* itself in sync with every operation applied to that fragment (e.g. while editing clipboard content).\n\t*\n\t* @internal\n\t*/\n\tstatic _fromRangeInDocumentFragment(range, model) {\n\t\treturn new this(range.start, range.end, model);\n\t}\n};\nModelLiveRange.prototype.is = function(type) {\n\treturn type === \"liveRange\" || type === \"model:liveRange\" || type == \"range\" || type === \"model:range\";\n};\n/**\n* Binds this `ModelLiveRange` to the given model, so the range updates itself on every operation applied to it.\n*/\nfunction bindWithModel$1(model) {\n\tconst isDetached = !this.root.is(\"rootElement\");\n\tthis.listenTo(model, \"applyOperation\", (event, args) => {\n\t\tconst operation = args[0];\n\t\tif (!isDetached && !operation.isDocumentOperation) return;\n\t\ttransform$2.call(this, operation);\n\t}, { priority: \"low\" });\n}\n/**\n* Updates this range accordingly to the updates applied to the model. Bases on change events.\n*/\nfunction transform$2(operation) {\n\tconst ranges = this.getTransformedByOperation(operation);\n\tif (ranges.length === 0) {\n\t\tconst deletionPosition = operation.sourcePosition;\n\t\tthis.start = deletionPosition;\n\t\tthis.end = deletionPosition;\n\t\tthis.fire(\"change:drop\", this.toRange(), { deletionPosition });\n\t\treturn;\n\t}\n\tconst result = ModelRange._createFromRanges(ranges);\n\tconst boundariesChanged = !result.isEqual(this);\n\tconst contentChanged = doesOperationChangeRangeContent(this, operation);\n\tlet deletionPosition = null;\n\tif (boundariesChanged) {\n\t\tif (result.root.rootName == \"$graveyard\") {\n\t\t\tif (operation.type == \"remove\") deletionPosition = operation.sourcePosition;\n\t\t\telse deletionPosition = operation.deletionPosition;\n\t\t}\n\t\tconst oldRange = this.toRange();\n\t\tthis.start = result.start;\n\t\tthis.end = result.end;\n\t\tthis.fire(\"change:range\", oldRange, { deletionPosition });\n\t} else if (contentChanged) this.fire(\"change:content\", this.toRange(), { deletionPosition });\n}\n/**\n* Checks whether given operation changes something inside the range (even if it does not change boundaries).\n*/\nfunction doesOperationChangeRangeContent(range, operation) {\n\tswitch (operation.type) {\n\t\tcase \"insert\": return range.containsPosition(operation.position);\n\t\tcase \"move\":\n\t\tcase \"remove\":\n\t\tcase \"reinsert\":\n\t\tcase \"merge\": return range.containsPosition(operation.sourcePosition) || range.start.isEqual(operation.sourcePosition) || range.containsPosition(operation.targetPosition);\n\t\tcase \"split\": return range.containsPosition(operation.splitPosition) || range.containsPosition(operation.insertionPosition);\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 engine/model/text\n*/\n/**\n* Model text node. Type of {@link module:engine/model/node~ModelNode node} that\n* contains {@link module:engine/model/text~ModelText#data text data}.\n*\n* **Important:** see {@link module:engine/model/node~ModelNode} to read about restrictions using `Text` and `Node` API.\n*\n* **Note:** keep in mind that `Text` instances might indirectly got removed from model tree when model is changed.\n* This happens when {@link module:engine/model/writer~ModelWriter model writer} is used to change model and the text node is merged with\n* another text node. Then, both text nodes are removed and a new text node is inserted into the model. Because of\n* this behavior, keeping references to `Text` is not recommended. Instead, consider creating\n* {@link module:engine/model/liveposition~ModelLivePosition live position} placed before the text node.\n*/\nvar ModelText = class ModelText extends ModelNode {\n\t/**\n\t* Text data contained in this text node.\n\t*\n\t* @internal\n\t*/\n\t_data;\n\t/**\n\t* Creates a text node.\n\t*\n\t* **Note:** Constructor of this class shouldn't be used directly in the code.\n\t* Use the {@link module:engine/model/writer~ModelWriter#createText} method instead.\n\t*\n\t* @internal\n\t* @param data Node's text.\n\t* @param attrs Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t*/\n\tconstructor(data, attrs) {\n\t\tsuper(attrs);\n\t\tthis._data = data || \"\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget offsetSize() {\n\t\treturn this.data.length;\n\t}\n\t/**\n\t* Returns a text data contained in the node.\n\t*/\n\tget data() {\n\t\treturn this._data;\n\t}\n\t/**\n\t* Converts `Text` instance to plain object and returns it.\n\t*\n\t* @returns`Text` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.data = this.data;\n\t\treturn json;\n\t}\n\t/**\n\t* Creates a copy of this text node and returns it. Created text node has same text data and attributes as original text node.\n\t*\n\t* @internal\n\t* @returns `Text` instance created using given plain object.\n\t*/\n\t_clone() {\n\t\treturn new ModelText(this.data, this.getAttributes());\n\t}\n\t/**\n\t* Creates a `Text` instance from given plain object (i.e. parsed JSON string).\n\t*\n\t* @param json Plain object to be converted to `Text`.\n\t* @returns `Text` instance created using given plain object.\n\t*/\n\tstatic fromJSON(json) {\n\t\treturn new ModelText(json.data, json.attributes);\n\t}\n};\nModelText.prototype.is = function(type) {\n\treturn type === \"$text\" || type === \"model:$text\" || type === \"text\" || type === \"model:text\" || type === \"node\" || type === \"model: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 engine/model/documentselection\n*/\nconst storePrefix = \"selection:\";\nconst ModelDocumentSelectionBase = /* #__PURE__ */ EmitterMixin(ModelTypeCheckable);\n/**\n* `ModelDocumentSelection` is a special selection which is used as the\n* {@link module:engine/model/document~ModelDocument#selection document's selection}.\n* There can be only one instance of `ModelDocumentSelection` per document.\n*\n* Document selection can only be changed by using the {@link module:engine/model/writer~ModelWriter} instance\n* inside the {@link module:engine/model/model~Model#change `change()`} block, as it provides a secure way to modify model.\n*\n* `ModelDocumentSelection` is automatically updated upon changes in the {@link module:engine/model/document~ModelDocument document}\n* to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n*\n* Differences between {@link module:engine/model/selection~ModelSelection} and `ModelDocumentSelection` are:\n* * there is always a range in `ModelDocumentSelection` - even if no ranges were added there is a \"default range\"\n* present in the selection,\n* * ranges added to this selection updates automatically when the document changes,\n* * attributes of `ModelDocumentSelection` are updated automatically according to selection ranges.\n*\n* Since `ModelDocumentSelection` uses {@link module:engine/model/liverange~ModelLiveRange live ranges}\n* and is updated when {@link module:engine/model/document~ModelDocument document}\n* changes, it cannot be set on {@link module:engine/model/node~ModelNode nodes}\n* that are inside {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n* If you need to represent a selection in document fragment,\n* use {@link module:engine/model/selection~ModelSelection Selection class} instead.\n*/\nvar ModelDocumentSelection = class extends ModelDocumentSelectionBase {\n\t/**\n\t* Selection used internally by that class (`ModelDocumentSelection` is a proxy to that selection).\n\t*/\n\t_selection;\n\t/**\n\t* Creates an empty live selection for given {@link module:engine/model/document~ModelDocument}.\n\t*\n\t* @param doc Document which owns this selection.\n\t*/\n\tconstructor(doc) {\n\t\tsuper();\n\t\tthis._selection = new LiveSelection(doc);\n\t\tthis._selection.delegate(\"change:range\").to(this);\n\t\tthis._selection.delegate(\"change:attribute\").to(this);\n\t\tthis._selection.delegate(\"change:marker\").to(this);\n\t}\n\t/**\n\t* Describes whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t* collapsed.\n\t*/\n\tget isCollapsed() {\n\t\treturn this._selection.isCollapsed;\n\t}\n\t/**\n\t* Selection anchor. Anchor may be described as a position where the most recent part of the selection starts.\n\t* Together with {@link #focus} they define the direction of selection, which is important\n\t* when expanding/shrinking selection. Anchor is always {@link module:engine/model/range~ModelRange#start start} or\n\t* {@link module:engine/model/range~ModelRange#end end} position of the most recently added range.\n\t*\n\t* Is set to `null` if there are no ranges in selection.\n\t*\n\t* @see #focus\n\t*/\n\tget anchor() {\n\t\treturn this._selection.anchor;\n\t}\n\t/**\n\t* Selection focus. Focus is a position where the selection ends.\n\t*\n\t* Is set to `null` if there are no ranges in selection.\n\t*\n\t* @see #anchor\n\t*/\n\tget focus() {\n\t\treturn this._selection.focus;\n\t}\n\t/**\n\t* Number of ranges in selection.\n\t*/\n\tget rangeCount() {\n\t\treturn this._selection.rangeCount;\n\t}\n\t/**\n\t* Describes whether `Documentselection` has own range(s) set, or if it is defaulted to\n\t* {@link module:engine/model/document~ModelDocument#_getDefaultRange document's default range}.\n\t*/\n\tget hasOwnRange() {\n\t\treturn this._selection.hasOwnRange;\n\t}\n\t/**\n\t* Specifies whether the {@link #focus}\n\t* precedes {@link #anchor}.\n\t*\n\t* @readonly\n\t* @type {Boolean}\n\t*/\n\tget isBackward() {\n\t\treturn this._selection.isBackward;\n\t}\n\t/**\n\t* Describes whether the gravity is overridden (using {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}) or not.\n\t*\n\t* Note that the gravity remains overridden as long as will not be restored the same number of times as it was overridden.\n\t*/\n\tget isGravityOverridden() {\n\t\treturn this._selection.isGravityOverridden;\n\t}\n\t/**\n\t* A collection of selection {@link module:engine/model/markercollection~Marker markers}.\n\t* Marker is a selection marker when selection range is inside the marker range.\n\t*\n\t* **Note**: Only markers from {@link ~ModelDocumentSelection#observeMarkers observed markers groups} are collected.\n\t*/\n\tget markers() {\n\t\treturn this._selection.markers;\n\t}\n\t/**\n\t* Used for the compatibility with the {@link module:engine/model/selection~ModelSelection#isEqual} method.\n\t*\n\t* @internal\n\t*/\n\tget _ranges() {\n\t\treturn this._selection._ranges;\n\t}\n\t/**\n\t* Returns an iterable that iterates over copies of selection ranges.\n\t*/\n\tgetRanges() {\n\t\treturn this._selection.getRanges();\n\t}\n\t/**\n\t* Returns the first position in the selection.\n\t* First position is the position that {@link module:engine/model/position~ModelPosition#isBefore is before}\n\t* any other position in the selection.\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetFirstPosition() {\n\t\treturn this._selection.getFirstPosition();\n\t}\n\t/**\n\t* Returns the last position in the selection.\n\t* Last position is the position that {@link module:engine/model/position~ModelPosition#isAfter is after}\n\t* any other position in the selection.\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetLastPosition() {\n\t\treturn this._selection.getLastPosition();\n\t}\n\t/**\n\t* Returns a copy of the first range in the selection.\n\t* First range is the one which {@link module:engine/model/range~ModelRange#start start} position\n\t* {@link module:engine/model/position~ModelPosition#isBefore is before} start position of all other ranges\n\t* (not to confuse with the first range added to the selection).\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetFirstRange() {\n\t\treturn this._selection.getFirstRange();\n\t}\n\t/**\n\t* Returns a copy of the last range in the selection.\n\t* Last range is the one which {@link module:engine/model/range~ModelRange#end end} position\n\t* {@link module:engine/model/position~ModelPosition#isAfter is after} end position of all\n\t* other ranges (not to confuse with the range most recently added to the selection).\n\t*\n\t* Returns `null` if there are no ranges in selection.\n\t*/\n\tgetLastRange() {\n\t\treturn this._selection.getLastRange();\n\t}\n\t/**\n\t* Gets elements of type {@link module:engine/model/schema~ModelSchema#isBlock \"block\"} touched by the selection.\n\t*\n\t* This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t*\n\t* **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t* but will not return blocks nested in other blocks.\n\t*\n\t* In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t*\n\t* ```\n\t* <paragraph>[a</paragraph>\n\t* <blockQuote>\n\t* \t<paragraph>b</paragraph>\n\t* </blockQuote>\n\t* <paragraph>c]d</paragraph>\n\t* ```\n\t*\n\t* In this case the paragraph will also be returned, despite the collapsed selection:\n\t*\n\t* ```\n\t* <paragraph>[]a</paragraph>\n\t* ```\n\t*\n\t* In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t*\n\t* ```\n\t* [<blockA></blockA>\n\t* <blockB>\n\t* \t<blockC></blockC>\n\t* \t<blockD></blockD>\n\t* </blockB>\n\t* <blockE></blockE>]\n\t* ```\n\t*\n\t* If the selection is inside a block all the inner blocks (A & B) are returned:\n\t*\n\t* ```\n\t* <block>\n\t* \t<blockA>[a</blockA>\n\t* \t<blockB>b]</blockB>\n\t* </block>\n\t* ```\n\t*\n\t* **Special case**: If a selection ends at the beginning of a block, that block is not returned as from user perspective\n\t* this block wasn't selected. See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n\t*\n\t* ```\n\t* <paragraph>[a</paragraph>\n\t* <paragraph>b</paragraph>\n\t* <paragraph>]c</paragraph> // this block will not be returned\n\t* ```\n\t*/\n\tgetSelectedBlocks() {\n\t\treturn this._selection.getSelectedBlocks();\n\t}\n\t/**\n\t* Returns the selected element. {@link module:engine/model/element~ModelElement Element} is considered as selected if there is only\n\t* one range in the selection, and that range contains exactly one element.\n\t* Returns `null` if there is no selected element.\n\t*/\n\tgetSelectedElement() {\n\t\treturn this._selection.getSelectedElement();\n\t}\n\t/**\n\t* Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t* at a position {@link module:engine/model/position~ModelPosition#isTouching touching} the element's start and ends at position\n\t* touching the element's end.\n\t*\n\t* By default, this method will check whether the entire content of the selection's current root is selected.\n\t* Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t*/\n\tcontainsEntireContent(element) {\n\t\treturn this._selection.containsEntireContent(element);\n\t}\n\t/**\n\t* Unbinds all events previously bound by document selection.\n\t*/\n\tdestroy() {\n\t\tthis._selection.destroy();\n\t}\n\t/**\n\t* Returns iterable that iterates over this selection's attribute keys.\n\t*/\n\tgetAttributeKeys() {\n\t\treturn this._selection.getAttributeKeys();\n\t}\n\t/**\n\t* Returns iterable that iterates over this selection's attributes.\n\t*\n\t* Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t* This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t*/\n\tgetAttributes() {\n\t\treturn this._selection.getAttributes();\n\t}\n\t/**\n\t* Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t*\n\t* @param key Key of attribute to look for.\n\t* @returns Attribute value or `undefined`.\n\t*/\n\tgetAttribute(key) {\n\t\treturn this._selection.getAttribute(key);\n\t}\n\t/**\n\t* Checks if the selection has an attribute for given key.\n\t*\n\t* @param key Key of attribute to check.\n\t* @returns `true` if attribute with given key is set on selection, `false` otherwise.\n\t*/\n\thasAttribute(key) {\n\t\treturn this._selection.hasAttribute(key);\n\t}\n\t/**\n\t* Refreshes selection attributes and markers according to the current position in the model.\n\t*/\n\trefresh() {\n\t\tthis._selection.updateMarkers();\n\t\tthis._selection._updateAttributes(false);\n\t}\n\t/**\n\t* Registers a marker group prefix or a marker name to be collected in the\n\t* {@link ~ModelDocumentSelection#markers selection markers collection}.\n\t*\n\t* See also {@link module:engine/model/markercollection~MarkerCollection#getMarkersGroup `MarkerCollection#getMarkersGroup()`}.\n\t*\n\t* @param prefixOrName The marker group prefix or marker name.\n\t*/\n\tobserveMarkers(prefixOrName) {\n\t\tthis._selection.observeMarkers(prefixOrName);\n\t}\n\t/**\n\t* Converts `DocumentSelection` to plain object and returns it.\n\t*\n\t* @returns `DocumentSelection` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\treturn this._selection.toJSON();\n\t}\n\t/**\n\t* Moves {@link module:engine/model/documentselection~ModelDocumentSelection#focus} to the specified location.\n\t* Should be used only within the {@link module:engine/model/writer~ModelWriter#setSelectionFocus} method.\n\t*\n\t* The location can be specified in the same form as\n\t* {@link module:engine/model/writer~ModelWriter#createPositionAt writer.createPositionAt()} parameters.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#setSelectionFocus\n\t* @internal\n\t* @param offset Offset or one of the flags. Used only when\n\t* first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\t_setFocus(itemOrPosition, offset) {\n\t\tthis._selection.setFocus(itemOrPosition, offset);\n\t}\n\t/**\n\t* Sets this selection's ranges and direction to the specified location based on the given\n\t* {@link module:engine/model/selection~ModelSelectable selectable}.\n\t* Should be used only within the {@link module:engine/model/writer~ModelWriter#setSelection} method.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#setSelection\n\t* @internal\n\t*/\n\t_setTo(...args) {\n\t\tthis._selection.setTo(...args);\n\t}\n\t/**\n\t* Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t* Should be used only within the {@link module:engine/model/writer~ModelWriter#setSelectionAttribute} method.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#setSelectionAttribute\n\t* @internal\n\t* @param key Key of the attribute to set.\n\t* @param value Attribute value.\n\t*/\n\t_setAttribute(key, value) {\n\t\tthis._selection.setAttribute(key, value);\n\t}\n\t/**\n\t* Removes an attribute with given key from the selection.\n\t* If the given attribute was set on the selection, fires the {@link module:engine/model/selection~ModelSelection#event:change:range}\n\t* event with removed attribute key.\n\t* Should be used only within the {@link module:engine/model/writer~ModelWriter#removeSelectionAttribute} method.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#removeSelectionAttribute\n\t* @internal\n\t* @param key Key of the attribute to remove.\n\t*/\n\t_removeAttribute(key) {\n\t\tthis._selection.removeAttribute(key);\n\t}\n\t/**\n\t* Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t*\n\t* @internal\n\t*/\n\t_getStoredAttributes() {\n\t\treturn this._selection.getStoredAttributes();\n\t}\n\t/**\n\t* Temporarily changes the gravity of the selection from the left to the right.\n\t*\n\t* The gravity defines from which direction the selection inherits its attributes. If it's the default left\n\t* gravity, the selection (after being moved by the the user) inherits attributes from its left hand side.\n\t* This method allows to temporarily override this behavior by forcing the gravity to the right.\n\t*\n\t* It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry\n\t* of the process.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#overrideSelectionGravity\n\t* @internal\n\t* @returns The unique id which allows restoring the gravity.\n\t*/\n\t_overrideGravity() {\n\t\treturn this._selection.overrideGravity();\n\t}\n\t/**\n\t* Restores the {@link ~ModelDocumentSelection#_overrideGravity overridden gravity}.\n\t*\n\t* Restoring the gravity is only possible using the unique identifier returned by\n\t* {@link ~ModelDocumentSelection#_overrideGravity}. Note that the gravity remains overridden as long as won't be restored\n\t* the same number of times it was overridden.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#restoreSelectionGravity\n\t* @internal\n\t* @param uid The unique id returned by {@link #_overrideGravity}.\n\t*/\n\t_restoreGravity(uid) {\n\t\tthis._selection.restoreGravity(uid);\n\t}\n\t/**\n\t* Generates and returns an attribute key for selection attributes store, basing on original attribute key.\n\t*\n\t* @internal\n\t* @param key Attribute key to convert.\n\t* @returns Converted attribute key, applicable for selection store.\n\t*/\n\tstatic _getStoreAttributeKey(key) {\n\t\treturn storePrefix + key;\n\t}\n\t/**\n\t* Checks whether the given attribute key is an attribute stored on an element.\n\t*\n\t* @internal\n\t*/\n\tstatic _isStoreAttributeKey(key) {\n\t\treturn key.startsWith(storePrefix);\n\t}\n\t/**\n\t* Drop selection attribute key prefix.\n\t*\n\t* @internal\n\t*/\n\tstatic _dropStoreAttributeKeyPrefix(key) {\n\t\tif (key.startsWith(storePrefix)) return key.substring(10);\n\t\treturn key;\n\t}\n};\nModelDocumentSelection.prototype.is = function(type) {\n\treturn type === \"selection\" || type == \"model:selection\" || type == \"documentSelection\" || type == \"model:documentSelection\";\n};\n/**\n* `LiveSelection` is used internally by {@link module:engine/model/documentselection~ModelDocumentSelection}\n* and shouldn't be used directly.\n*\n* `LiveSelection` is automatically updated upon changes in the {@link module:engine/model/document~ModelDocument document}\n* to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n*\n* Differences between {@link module:engine/model/selection~ModelSelection} and `LiveSelection` are:\n* * there is always a range in `LiveSelection` - even if no ranges were added there is a \"default range\"\n* present in the selection,\n* * ranges added to this selection updates automatically when the document changes,\n* * attributes of `LiveSelection` are updated automatically according to selection ranges.\n*/\nvar LiveSelection = class extends ModelSelection {\n\t/**\n\t* List of selection markers.\n\t* Marker is a selection marker when selection range is inside the marker range.\n\t*/\n\tmarkers = new Collection({ idProperty: \"name\" });\n\t/**\n\t* Document which owns this selection.\n\t*/\n\t_model;\n\t/**\n\t* Document which owns this selection.\n\t*/\n\t_document;\n\t/**\n\t* Keeps mapping of attribute name to priority with which the attribute got modified (added/changed/removed)\n\t* last time. Possible values of priority are: `'low'` and `'normal'`.\n\t*\n\t* Priorities are used by internal `LiveSelection` mechanisms. All attributes set using `LiveSelection`\n\t* attributes API are set with `'normal'` priority.\n\t*/\n\t_attributePriority = /* @__PURE__ */ new Map();\n\t/**\n\t* Position to which the selection should be set if the last selection range was moved to the graveyard.\n\t*/\n\t_selectionRestorePosition = null;\n\t/**\n\t* Flag that informs whether the selection ranges have changed. It is changed on true when `LiveRange#change:range` event is fired.\n\t*/\n\t_hasChangedRange = false;\n\t/**\n\t* Each overriding gravity adds an UID to the set and each removal removes it.\n\t* Gravity is overridden when there's at least one UID in the set.\n\t* Gravity is restored when the set is empty.\n\t* This is to prevent conflicts when gravity is overridden by more than one feature at the same time.\n\t*/\n\t_overriddenGravityRegister = /* @__PURE__ */ new Set();\n\t/**\n\t* Prefixes of marker names that should affect `LiveSelection#markers` collection.\n\t*/\n\t_observedMarkers = /* @__PURE__ */ new Set();\n\t/**\n\t* Creates an empty live selection for given {@link module:engine/model/document~ModelDocument}.\n\t*\n\t* @param doc Document which owns this selection.\n\t*/\n\tconstructor(doc) {\n\t\tsuper();\n\t\tthis._model = doc.model;\n\t\tthis._document = doc;\n\t\tthis.listenTo(this._model, \"applyOperation\", (evt, args) => {\n\t\t\tconst operation = args[0];\n\t\t\tif (!operation.isDocumentOperation || operation.type == \"marker\" || operation.type == \"rename\" || operation.type == \"noop\") return;\n\t\t\tif (this._ranges.length == 0 && this._selectionRestorePosition) this._fixGraveyardSelection(this._selectionRestorePosition);\n\t\t\tthis._selectionRestorePosition = null;\n\t\t\tif (this._hasChangedRange) {\n\t\t\t\tthis._hasChangedRange = false;\n\t\t\t\tthis.fire(\"change:range\", { directChange: false });\n\t\t\t}\n\t\t}, { priority: \"lowest\" });\n\t\tthis.on(\"change:range\", () => {\n\t\t\tthis._validateSelectionRanges(this.getRanges());\n\t\t});\n\t\tthis.listenTo(this._model.markers, \"update\", (evt, marker, oldRange, newRange) => {\n\t\t\tthis._updateMarker(marker, newRange);\n\t\t});\n\t\tthis.listenTo(this._document, \"change\", (evt, batch) => {\n\t\t\tclearAttributesStoredInElement(this._model, batch);\n\t\t});\n\t}\n\tget isCollapsed() {\n\t\treturn this._ranges.length === 0 ? this._document._getDefaultRange().isCollapsed : super.isCollapsed;\n\t}\n\tget anchor() {\n\t\treturn super.anchor || this._document._getDefaultRange().start;\n\t}\n\tget focus() {\n\t\treturn super.focus || this._document._getDefaultRange().end;\n\t}\n\tget rangeCount() {\n\t\treturn this._ranges.length ? this._ranges.length : 1;\n\t}\n\t/**\n\t* Describes whether `LiveSelection` has own range(s) set, or if it is defaulted to\n\t* {@link module:engine/model/document~ModelDocument#_getDefaultRange document's default range}.\n\t*/\n\tget hasOwnRange() {\n\t\treturn this._ranges.length > 0;\n\t}\n\t/**\n\t* When set to `true` then selection attributes on node before the caret won't be taken\n\t* into consideration while updating selection attributes.\n\t*/\n\tget isGravityOverridden() {\n\t\treturn !!this._overriddenGravityRegister.size;\n\t}\n\t/**\n\t* Unbinds all events previously bound by live selection.\n\t*/\n\tdestroy() {\n\t\tfor (let i = 0; i < this._ranges.length; i++) this._ranges[i].detach();\n\t\tthis.stopListening();\n\t}\n\t*getRanges() {\n\t\tif (this._ranges.length) yield* super.getRanges();\n\t\telse yield this._document._getDefaultRange();\n\t}\n\tgetFirstRange() {\n\t\treturn super.getFirstRange() || this._document._getDefaultRange();\n\t}\n\tgetLastRange() {\n\t\treturn super.getLastRange() || this._document._getDefaultRange();\n\t}\n\tsetTo(...args) {\n\t\tsuper.setTo(...args);\n\t\tthis._updateAttributes(true);\n\t\tthis.updateMarkers();\n\t}\n\tsetFocus(itemOrPosition, offset) {\n\t\tsuper.setFocus(itemOrPosition, offset);\n\t\tthis._updateAttributes(true);\n\t\tthis.updateMarkers();\n\t}\n\tsetAttribute(key, value) {\n\t\tif (this._setAttribute(key, value)) {\n\t\t\tconst attributeKeys = [key];\n\t\t\tthis.fire(\"change:attribute\", {\n\t\t\t\tattributeKeys,\n\t\t\t\tdirectChange: true\n\t\t\t});\n\t\t}\n\t}\n\tremoveAttribute(key) {\n\t\tif (this._removeAttribute(key)) {\n\t\t\tconst attributeKeys = [key];\n\t\t\tthis.fire(\"change:attribute\", {\n\t\t\t\tattributeKeys,\n\t\t\t\tdirectChange: true\n\t\t\t});\n\t\t}\n\t}\n\toverrideGravity() {\n\t\tconst overrideUid = uid();\n\t\tthis._overriddenGravityRegister.add(overrideUid);\n\t\tif (this._overriddenGravityRegister.size === 1) this._updateAttributes(true);\n\t\treturn overrideUid;\n\t}\n\trestoreGravity(uid) {\n\t\tif (!this._overriddenGravityRegister.has(uid))\n /**\n\t\t* Restoring gravity for an unknown UID is not possible. Make sure you are using a correct\n\t\t* UID obtained from the {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity} to restore.\n\t\t*\n\t\t* @error document-selection-gravity-wrong-restore\n\t\t* @param {string} uid The unique identifier returned by\n\t\t* {@link module:engine/model/documentselection~ModelDocumentSelection#_overrideGravity}.\n\t\t*/\n\t\tthrow new CKEditorError(\"document-selection-gravity-wrong-restore\", this, { uid });\n\t\tthis._overriddenGravityRegister.delete(uid);\n\t\tif (!this.isGravityOverridden) this._updateAttributes(true);\n\t}\n\tobserveMarkers(prefixOrName) {\n\t\tthis._observedMarkers.add(prefixOrName);\n\t\tthis.updateMarkers();\n\t}\n\t_replaceAllRanges(ranges) {\n\t\tthis._validateSelectionRanges(ranges);\n\t\tsuper._replaceAllRanges(ranges);\n\t}\n\t_popRange() {\n\t\tthis._ranges.pop().detach();\n\t}\n\t_pushRange(range) {\n\t\tconst liveRange = this._prepareRange(range);\n\t\tif (liveRange) this._ranges.push(liveRange);\n\t}\n\t/**\n\t* Converts `LiveSelection` to plain object and returns it.\n\t*\n\t* @returns `LiveSelection` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tif (this.markers.length) json.markers = this.markers.map((marker) => marker.toJSON());\n\t\treturn json;\n\t}\n\t_validateSelectionRanges(ranges) {\n\t\tfor (const range of ranges) if (!this._document._validateSelectionRange(range))\n /**\n\t\t* Range from {@link module:engine/model/documentselection~ModelDocumentSelection document selection}\n\t\t* starts or ends at incorrect position.\n\t\t*\n\t\t* @error document-selection-wrong-position\n\t\t* @param {module:engine/model/range~ModelRange} range The invalid range.\n\t\t*/\n\t\tthrow new CKEditorError(\"document-selection-wrong-position\", this, { range });\n\t}\n\t/**\n\t* Prepares given range to be added to selection. Checks if it is correct,\n\t* converts it to {@link module:engine/model/liverange~ModelLiveRange ModelLiveRange}\n\t* and sets listeners listening to the range's change event.\n\t*/\n\t_prepareRange(range) {\n\t\tthis._checkRange(range);\n\t\tif (range.root == this._document.graveyard) return;\n\t\tconst liveRange = ModelLiveRange.fromRange(range);\n\t\tliveRange.on(\"change:range\", (evt, oldRange, data) => {\n\t\t\tthis._hasChangedRange = true;\n\t\t\tif (liveRange.root == this._document.graveyard) {\n\t\t\t\tthis._selectionRestorePosition = data.deletionPosition;\n\t\t\t\tconst index = this._ranges.indexOf(liveRange);\n\t\t\t\tthis._ranges.splice(index, 1);\n\t\t\t\tliveRange.detach();\n\t\t\t}\n\t\t});\n\t\treturn liveRange;\n\t}\n\tupdateMarkers() {\n\t\tif (!this._observedMarkers.size) return;\n\t\tconst markers = [];\n\t\tlet changed = false;\n\t\tfor (const marker of this._model.markers) {\n\t\t\tconst markerGroup = marker.name.split(\":\", 1)[0];\n\t\t\tif (!this._observedMarkers.has(markerGroup)) continue;\n\t\t\tconst markerRange = marker.getRange();\n\t\t\tfor (const selectionRange of this.getRanges()) if (markerRange.containsRange(selectionRange, !selectionRange.isCollapsed)) markers.push(marker);\n\t\t}\n\t\tconst oldMarkers = Array.from(this.markers);\n\t\tfor (const marker of markers) if (!this.markers.has(marker)) {\n\t\t\tthis.markers.add(marker);\n\t\t\tchanged = true;\n\t\t}\n\t\tfor (const marker of Array.from(this.markers)) if (!markers.includes(marker)) {\n\t\t\tthis.markers.remove(marker);\n\t\t\tchanged = true;\n\t\t}\n\t\tif (changed) this.fire(\"change:marker\", {\n\t\t\toldMarkers,\n\t\t\tdirectChange: false\n\t\t});\n\t}\n\t_updateMarker(marker, markerRange) {\n\t\tconst markerGroup = marker.name.split(\":\", 1)[0];\n\t\tif (!this._observedMarkers.has(markerGroup)) return;\n\t\tlet changed = false;\n\t\tconst oldMarkers = Array.from(this.markers);\n\t\tconst hasMarker = this.markers.has(marker);\n\t\tif (!markerRange) {\n\t\t\tif (hasMarker) {\n\t\t\t\tthis.markers.remove(marker);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t} else {\n\t\t\tlet contained = false;\n\t\t\tfor (const selectionRange of this.getRanges()) if (markerRange.containsRange(selectionRange, !selectionRange.isCollapsed)) {\n\t\t\t\tcontained = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (contained && !hasMarker) {\n\t\t\t\tthis.markers.add(marker);\n\t\t\t\tchanged = true;\n\t\t\t} else if (!contained && hasMarker) {\n\t\t\t\tthis.markers.remove(marker);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\tif (changed) this.fire(\"change:marker\", {\n\t\t\toldMarkers,\n\t\t\tdirectChange: false\n\t\t});\n\t}\n\t/**\n\t* Updates this selection attributes according to its ranges and the {@link module:engine/model/document~ModelDocument model document}.\n\t*/\n\t_updateAttributes(clearAll) {\n\t\tconst newAttributes = toMap(this._getSurroundingAttributes());\n\t\tconst oldAttributes = toMap(this.getAttributes());\n\t\tif (clearAll) {\n\t\t\tthis._attributePriority = /* @__PURE__ */ new Map();\n\t\t\tthis._attrs = /* @__PURE__ */ new Map();\n\t\t} else for (const [key, priority] of this._attributePriority) if (priority == \"low\") {\n\t\t\tthis._attrs.delete(key);\n\t\t\tthis._attributePriority.delete(key);\n\t\t}\n\t\tthis._setAttributesTo(newAttributes);\n\t\tconst changed = [];\n\t\tfor (const [newKey, newValue] of this.getAttributes()) if (!oldAttributes.has(newKey) || oldAttributes.get(newKey) !== newValue) changed.push(newKey);\n\t\tfor (const [oldKey] of oldAttributes) if (!this.hasAttribute(oldKey)) changed.push(oldKey);\n\t\tif (changed.length > 0) this.fire(\"change:attribute\", {\n\t\t\tattributeKeys: changed,\n\t\t\tdirectChange: false\n\t\t});\n\t}\n\t/**\n\t* Internal method for setting `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t* parameter).\n\t*/\n\t_setAttribute(key, value, directChange = true) {\n\t\tconst priority = directChange ? \"normal\" : \"low\";\n\t\tif (priority == \"low\" && this._attributePriority.get(key) == \"normal\") return false;\n\t\tif (super.getAttribute(key) === value) return false;\n\t\tthis._attrs.set(key, value);\n\t\tthis._attributePriority.set(key, priority);\n\t\treturn true;\n\t}\n\t/**\n\t* Internal method for removing `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t* parameter).\n\t*\n\t* NOTE: Even if attribute is not present in the selection but is provided to this method, it's priority will\n\t* be changed according to `directChange` parameter.\n\t*/\n\t_removeAttribute(key, directChange = true) {\n\t\tconst priority = directChange ? \"normal\" : \"low\";\n\t\tif (priority == \"low\" && this._attributePriority.get(key) == \"normal\") return false;\n\t\tthis._attributePriority.set(key, priority);\n\t\tif (!super.hasAttribute(key)) return false;\n\t\tthis._attrs.delete(key);\n\t\treturn true;\n\t}\n\t/**\n\t* Internal method for setting multiple `LiveSelection` attributes. Supports attribute priorities (through\n\t* `directChange` parameter).\n\t*/\n\t_setAttributesTo(attrs) {\n\t\tconst changed = /* @__PURE__ */ new Set();\n\t\tfor (const [oldKey, oldValue] of this.getAttributes()) {\n\t\t\tif (attrs.get(oldKey) === oldValue) continue;\n\t\t\tthis._removeAttribute(oldKey, false);\n\t\t}\n\t\tfor (const [key, value] of attrs) if (this._setAttribute(key, value, false)) changed.add(key);\n\t\treturn changed;\n\t}\n\t/**\n\t* Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t*/\n\t*getStoredAttributes() {\n\t\tconst selectionParent = this.getFirstPosition().parent;\n\t\tif (this.isCollapsed && selectionParent.isEmpty) {\n\t\t\tfor (const key of selectionParent.getAttributeKeys()) if (key.startsWith(storePrefix)) yield [key.substr(10), selectionParent.getAttribute(key)];\n\t\t}\n\t}\n\t/**\n\t* Checks model text nodes that are closest to the selection's first position and returns attributes of first\n\t* found element. If there are no text nodes in selection's first position parent, it returns selection\n\t* attributes stored in that parent.\n\t*/\n\t_getSurroundingAttributes() {\n\t\tconst position = this.getFirstPosition();\n\t\tconst schema = this._model.schema;\n\t\tif (position.root.rootName == \"$graveyard\") return null;\n\t\tlet attrs = null;\n\t\tif (!this.isCollapsed) {\n\t\t\tconst range = this.getFirstRange();\n\t\t\tfor (const value of range) {\n\t\t\t\tif (value.item.is(\"element\") && schema.isObject(value.item)) {\n\t\t\t\t\tattrs = getTextAttributes(value.item, schema);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (value.type == \"text\") {\n\t\t\t\t\tattrs = value.item.getAttributes();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst nodeBefore = position.textNode ? position.textNode : position.nodeBefore;\n\t\t\tconst nodeAfter = position.textNode ? position.textNode : position.nodeAfter;\n\t\t\tif (!this.isGravityOverridden) attrs = getTextAttributes(nodeBefore, schema);\n\t\t\tif (!attrs) attrs = getTextAttributes(nodeAfter, schema);\n\t\t\tif (!this.isGravityOverridden && !attrs) attrs = getTextAttributes(nodeBefore, schema, \"backward\");\n\t\t\tif (!attrs) attrs = getTextAttributes(nodeAfter, schema, \"forward\");\n\t\t\tif (!attrs) attrs = this.getStoredAttributes();\n\t\t}\n\t\treturn attrs;\n\t}\n\t/**\n\t* Fixes the selection after all its ranges got removed.\n\t* @param deletionPosition Position where the deletion happened.\n\t*/\n\t_fixGraveyardSelection(deletionPosition) {\n\t\tconst selectionRange = this._model.schema.getNearestSelectionRange(deletionPosition);\n\t\tif (selectionRange) this._pushRange(selectionRange);\n\t}\n};\n/**\n* Helper function for {@link module:engine/model/liveselection~LiveSelection#_updateAttributes}.\n*\n* It checks if the passed model node is a text node and, if so, returns its attributes.\n* If not, it checks if item is an inline element and does the same. Otherwise, it returns `null`.\n*/\nfunction getTextAttributes(startNode, schema, scan = \"self\") {\n\tif (!startNode) return null;\n\tfor (const node of siblingNodes(startNode, scan)) {\n\t\tif (!node) return null;\n\t\tif (node instanceof ModelText) return node.getAttributes();\n\t\tif (!schema.isInline(node)) continue;\n\t\tconst isObject = schema.isObject(node);\n\t\tconst attributes = [];\n\t\tfor (const [key, value] of node.getAttributes()) if (schema.checkAttribute(\"$text\", key) && (!isObject || schema.getAttributeProperties(key).copyFromObject !== false)) attributes.push([key, value]);\n\t\treturn attributes;\n\t}\n\treturn null;\n}\n/**\n* Returns sibling nodes from the given start node.\n*/\nfunction* siblingNodes(startNode, scan) {\n\tif (scan == \"self\") yield startNode;\n\telse {\n\t\tlet node = startNode;\n\t\twhile (node) {\n\t\t\tnode = scan == \"backward\" ? node.previousSibling : node.nextSibling;\n\t\t\tyield node;\n\t\t}\n\t}\n\treturn null;\n}\n/**\n* Removes selection attributes from element which is not empty anymore.\n*/\nfunction clearAttributesStoredInElement(model, batch) {\n\tconst differ = model.document.differ;\n\tfor (const entry of differ.getChanges()) {\n\t\tif (entry.type != \"insert\") continue;\n\t\tconst changeParent = entry.position.parent;\n\t\tif (entry.length === changeParent.maxOffset) model.enqueueChange(batch, (writer) => {\n\t\t\tconst storedAttributes = Array.from(changeParent.getAttributeKeys()).filter((key) => key.startsWith(storePrefix));\n\t\t\tfor (const key of storedAttributes) writer.removeAttribute(key, changeParent);\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 engine/model/nodelist\n*/\n/**\n* Provides an interface to operate on a list of {@link module:engine/model/node~ModelNode nodes}. `NodeList` is used internally\n* in classes like {@link module:engine/model/element~ModelElement Element}\n* or {@link module:engine/model/documentfragment~ModelDocumentFragment ModelDocumentFragment}.\n*/\nvar ModelNodeList = class {\n\t/**\n\t* Nodes contained in this node list.\n\t*/\n\t_nodes = [];\n\t/**\n\t* This array maps numbers (offsets) to node that is placed at that offset.\n\t*\n\t* This array is similar to `_nodes` with the difference that one node may occupy multiple consecutive items in the array.\n\t*\n\t* This array is needed to quickly retrieve a node that is placed at given offset.\n\t*/\n\t_offsetToNode = [];\n\t/**\n\t* Creates a node list.\n\t*\n\t* @internal\n\t* @param nodes Nodes contained in this node list.\n\t*/\n\tconstructor(nodes) {\n\t\tif (nodes) this._insertNodes(0, nodes);\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* Iterates over all nodes contained inside this node list.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this._nodes[Symbol.iterator]();\n\t}\n\t/**\n\t* Number of nodes contained inside this node list.\n\t*/\n\tget length() {\n\t\treturn this._nodes.length;\n\t}\n\t/**\n\t* Sum of {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all nodes contained inside this node list.\n\t*/\n\tget maxOffset() {\n\t\treturn this._offsetToNode.length;\n\t}\n\t/**\n\t* Gets the node at the given index. Returns `null` if incorrect index was passed.\n\t*/\n\tgetNode(index) {\n\t\treturn this._nodes[index] || null;\n\t}\n\t/**\n\t* Gets the node at the given offset. Returns `null` if incorrect offset was passed.\n\t*/\n\tgetNodeAtOffset(offset) {\n\t\treturn this._offsetToNode[offset] || null;\n\t}\n\t/**\n\t* Returns an index of the given node or `null` if given node does not have a parent.\n\t*\n\t* This is an alias to {@link module:engine/model/node~ModelNode#index}.\n\t*/\n\tgetNodeIndex(node) {\n\t\treturn node.index;\n\t}\n\t/**\n\t* Returns the offset at which given node is placed in its parent or `null` if given node does not have a parent.\n\t*\n\t* This is an alias to {@link module:engine/model/node~ModelNode#startOffset}.\n\t*/\n\tgetNodeStartOffset(node) {\n\t\treturn node.startOffset;\n\t}\n\t/**\n\t* Converts index to offset in node list.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `model-nodelist-index-out-of-bounds` if given index is less\n\t* than `0` or more than {@link #length}.\n\t*/\n\tindexToOffset(index) {\n\t\tif (index == this._nodes.length) return this.maxOffset;\n\t\tconst node = this._nodes[index];\n\t\tif (!node)\n /**\n\t\t* Given index cannot be found in the node list.\n\t\t*\n\t\t* @error model-nodelist-index-out-of-bounds\n\t\t*/\n\t\tthrow new CKEditorError(\"model-nodelist-index-out-of-bounds\", this);\n\t\treturn this.getNodeStartOffset(node);\n\t}\n\t/**\n\t* Converts offset in node list to index.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `model-nodelist-offset-out-of-bounds` if given offset is less\n\t* than `0` or more than {@link #maxOffset}.\n\t*/\n\toffsetToIndex(offset) {\n\t\tif (offset == this._offsetToNode.length) return this._nodes.length;\n\t\tconst node = this._offsetToNode[offset];\n\t\tif (!node)\n /**\n\t\t* Given offset cannot be found in the node list.\n\t\t*\n\t\t* @error model-nodelist-offset-out-of-bounds\n\t\t* @param {number} offset The offset value.\n\t\t* @param {module:engine/model/nodelist~ModelNodeList} nodeList Stringified node list.\n\t\t*/\n\t\tthrow new CKEditorError(\"model-nodelist-offset-out-of-bounds\", this, {\n\t\t\toffset,\n\t\t\tnodeList: this\n\t\t});\n\t\treturn this.getNodeIndex(node);\n\t}\n\t/**\n\t* Inserts given nodes at given index.\n\t*\n\t* @internal\n\t* @param index Index at which nodes should be inserted.\n\t* @param nodes Nodes to be inserted.\n\t*/\n\t_insertNodes(index, nodes) {\n\t\tconst nodesArray = [];\n\t\tfor (const node of nodes) {\n\t\t\tif (!(node instanceof ModelNode))\n /**\n\t\t\t* Trying to insert an object which is not a Node instance.\n\t\t\t*\n\t\t\t* @error model-nodelist-insertnodes-not-node\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"model-nodelist-insertnodes-not-node\", this);\n\t\t\tnodesArray.push(node);\n\t\t}\n\t\tlet offset = this.indexToOffset(index);\n\t\tspliceArray(this._nodes, nodesArray, index);\n\t\tspliceArray(this._offsetToNode, makeOffsetsArray(nodesArray), offset);\n\t\tfor (let i = index; i < this._nodes.length; i++) {\n\t\t\tthis._nodes[i]._index = i;\n\t\t\tthis._nodes[i]._startOffset = offset;\n\t\t\toffset += this._nodes[i].offsetSize;\n\t\t}\n\t}\n\t/**\n\t* Removes one or more nodes starting at the given index.\n\t*\n\t* @internal\n\t* @param indexStart Index of the first node to remove.\n\t* @param howMany Number of nodes to remove.\n\t* @returns Array containing removed nodes.\n\t*/\n\t_removeNodes(indexStart, howMany = 1) {\n\t\tif (howMany == 0) return [];\n\t\tlet offset = this.indexToOffset(indexStart);\n\t\tconst nodes = this._nodes.splice(indexStart, howMany);\n\t\tconst lastNode = nodes[nodes.length - 1];\n\t\tconst removedOffsetSum = lastNode.startOffset + lastNode.offsetSize - offset;\n\t\tthis._offsetToNode.splice(offset, removedOffsetSum);\n\t\tfor (const node of nodes) {\n\t\t\tnode._index = null;\n\t\t\tnode._startOffset = null;\n\t\t}\n\t\tfor (let i = indexStart; i < this._nodes.length; i++) {\n\t\t\tthis._nodes[i]._index = i;\n\t\t\tthis._nodes[i]._startOffset = offset;\n\t\t\toffset += this._nodes[i].offsetSize;\n\t\t}\n\t\treturn nodes;\n\t}\n\t/**\n\t* Removes children nodes provided as an array. These nodes do not need to be direct siblings.\n\t*\n\t* This method is faster than removing nodes one by one, as it recalculates offsets only once.\n\t*\n\t* @internal\n\t* @param nodes Array of nodes.\n\t*/\n\t_removeNodesArray(nodes) {\n\t\tif (nodes.length == 0) return;\n\t\tfor (const node of nodes) {\n\t\t\tnode._index = null;\n\t\t\tnode._startOffset = null;\n\t\t}\n\t\tthis._nodes = this._nodes.filter((node) => node.index !== null);\n\t\tthis._offsetToNode = this._offsetToNode.filter((node) => node.index !== null);\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < this._nodes.length; i++) {\n\t\t\tthis._nodes[i]._index = i;\n\t\t\tthis._nodes[i]._startOffset = offset;\n\t\t\toffset += this._nodes[i].offsetSize;\n\t\t}\n\t}\n\t/**\n\t* Converts `NodeList` instance to an array containing nodes that were inserted in the node list. Nodes\n\t* are also converted to their plain object representation.\n\t*\n\t* @returns `NodeList` instance converted to `Array`.\n\t*/\n\ttoJSON() {\n\t\treturn this._nodes.map((node) => node.toJSON());\n\t}\n};\n/**\n* Creates an array of nodes in the format as in {@link module:engine/model/nodelist~ModelNodeList#_offsetToNode}, i.e. one node will\n* occupy multiple items if its offset size is greater than one.\n*/\nfunction makeOffsetsArray(nodes) {\n\tconst offsets = [];\n\tlet index = 0;\n\tfor (const node of nodes) for (let i = 0; i < node.offsetSize; i++) offsets[index++] = node;\n\treturn offsets;\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 engine/model/element\n*/\n/**\n* Model element. Type of {@link module:engine/model/node~ModelNode node} that has a\n* {@link module:engine/model/element~ModelElement#name name} and {@link module:engine/model/element~ModelElement#getChildren child nodes}.\n*\n* **Important**: see {@link module:engine/model/node~ModelNode} to read about restrictions using `Element` and `Node` API.\n*/\nvar ModelElement = class ModelElement extends ModelNode {\n\t/**\n\t* Element name.\n\t*/\n\tname;\n\t/**\n\t* List of children nodes.\n\t*/\n\t_children = new ModelNodeList();\n\t/**\n\t* Creates a model element.\n\t*\n\t* **Note:** Constructor of this class shouldn't be used directly in the code.\n\t* Use the {@link module:engine/model/writer~ModelWriter#createElement} method instead.\n\t*\n\t* @internal\n\t* @param name Element's name.\n\t* @param attrs Element's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t* @param children One or more nodes to be inserted as children of created element.\n\t*/\n\tconstructor(name, attrs, children) {\n\t\tsuper(attrs);\n\t\tthis.name = name;\n\t\tif (children) this._insertChild(0, children);\n\t}\n\t/**\n\t* Number of this element's children.\n\t*/\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\t/**\n\t* Sum of {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all of this element's children.\n\t*/\n\tget maxOffset() {\n\t\treturn this._children.maxOffset;\n\t}\n\t/**\n\t* Is `true` if there are no nodes inside this element, `false` otherwise.\n\t*/\n\tget isEmpty() {\n\t\treturn this.childCount === 0;\n\t}\n\t/**\n\t* Gets the child at the given index. Returns `null` if incorrect index was passed.\n\t*\n\t* @param index Index in this element.\n\t* @returns Child node.\n\t*/\n\tgetChild(index) {\n\t\treturn this._children.getNode(index);\n\t}\n\t/**\n\t* Gets the child at the given offset. Returns `null` if incorrect index was passed.\n\t*\n\t* @param offset Offset in this element.\n\t* @returns Child node.\n\t*/\n\tgetChildAtOffset(offset) {\n\t\treturn this._children.getNodeAtOffset(offset);\n\t}\n\t/**\n\t* Returns an iterator that iterates over all of this element's children.\n\t*/\n\tgetChildren() {\n\t\treturn this._children[Symbol.iterator]();\n\t}\n\t/**\n\t* Returns an index of the given child node. Returns `null` if given node is not a child of this element.\n\t*\n\t* @param node Child node to look for.\n\t* @returns Child node's index in this element.\n\t*/\n\tgetChildIndex(node) {\n\t\treturn this._children.getNodeIndex(node);\n\t}\n\t/**\n\t* Returns the starting offset of given child. Starting offset is equal to the sum of\n\t* {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t* given node is not a child of this element.\n\t*\n\t* @param node Child node to look for.\n\t* @returns Child node's starting offset.\n\t*/\n\tgetChildStartOffset(node) {\n\t\treturn this._children.getNodeStartOffset(node);\n\t}\n\t/**\n\t* Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t* too high, returns {@link module:engine/model/element~ModelElement#getChildIndex index after last child}.\n\t*\n\t* ```ts\n\t* const textNode = new Text( 'foo' );\n\t* const pElement = new Element( 'p' );\n\t* const divElement = new Element( [ textNode, pElement ] );\n\t* divElement.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t* divElement.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t* divElement.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t* divElement.offsetToIndex( 2 ); // Returns 0.\n\t* divElement.offsetToIndex( 3 ); // Returns 1.\n\t* divElement.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t* ```\n\t*/\n\toffsetToIndex(offset) {\n\t\treturn this._children.offsetToIndex(offset);\n\t}\n\t/**\n\t* Returns a descendant node by its path relative to this element.\n\t*\n\t* ```ts\n\t* // <this>a<b>c</b></this>\n\t* this.getNodeByPath( [ 0 ] );     // -> \"a\"\n\t* this.getNodeByPath( [ 1 ] );     // -> <b>\n\t* this.getNodeByPath( [ 1, 0 ] );  // -> \"c\"\n\t* ```\n\t*\n\t* @param relativePath Path of the node to find, relative to this element.\n\t*/\n\tgetNodeByPath(relativePath) {\n\t\tlet node = this;\n\t\tfor (const offset of relativePath) node = node.getChildAtOffset(offset);\n\t\treturn node;\n\t}\n\t/**\n\t* Returns the parent element of the given name. Returns null if the element is not inside the desired parent.\n\t*\n\t* @param parentName The name of the parent element to find.\n\t* @param options Options object.\n\t* @param options.includeSelf When set to `true` this node will be also included while searching.\n\t*/\n\tfindAncestor(parentName, options = {}) {\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\t\twhile (parent) {\n\t\t\tif (parent.name === parentName) return parent;\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Converts `Element` instance to plain object and returns it. Takes care of converting all of this element's children.\n\t*\n\t* @returns `Element` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.name = this.name;\n\t\tif (this._children.length > 0) {\n\t\t\tjson.children = [];\n\t\t\tfor (const node of this._children) json.children.push(node.toJSON());\n\t\t}\n\t\treturn json;\n\t}\n\t/**\n\t* Creates a copy of this element and returns it. Created element has the same name and attributes as the original element.\n\t* If clone is deep, the original element's children are also cloned. If not, then empty element is returned.\n\t*\n\t* @internal\n\t* @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t* element will be cloned without any child.\n\t*/\n\t_clone(deep = false) {\n\t\tconst children = deep ? cloneNodes(this._children) : void 0;\n\t\treturn new ModelElement(this.name, this.getAttributes(), children);\n\t}\n\t/**\n\t* {@link module:engine/model/element~ModelElement#_insertChild Inserts} one or more nodes at the end of this element.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#append\n\t* @internal\n\t* @param nodes Nodes to be inserted.\n\t*/\n\t_appendChild(nodes) {\n\t\tthis._insertChild(this.childCount, nodes);\n\t}\n\t/**\n\t* Inserts one or more nodes at the given index and sets {@link module:engine/model/node~ModelNode#parent parent} of these nodes\n\t* to this element.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#insert\n\t* @internal\n\t* @param index Index at which nodes should be inserted.\n\t* @param items Items to be inserted.\n\t*/\n\t_insertChild(index, items) {\n\t\tconst nodes = normalize$1(items);\n\t\tfor (const node of nodes) {\n\t\t\tif (node.parent !== null) node._remove();\n\t\t\tnode.parent = this;\n\t\t}\n\t\tthis._children._insertNodes(index, nodes);\n\t}\n\t/**\n\t* Removes one or more nodes starting at the given index and sets\n\t* {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t*\n\t* @see module:engine/model/writer~ModelWriter#remove\n\t* @internal\n\t* @param index Index of the first node to remove.\n\t* @param howMany Number of nodes to remove.\n\t* @returns Array containing removed nodes.\n\t*/\n\t_removeChildren(index, howMany = 1) {\n\t\tconst nodes = this._children._removeNodes(index, howMany);\n\t\tfor (const node of nodes) node.parent = null;\n\t\treturn nodes;\n\t}\n\t/**\n\t* Removes children nodes provided as an array and sets\n\t* the {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t*\n\t* These nodes do not need to be direct siblings.\n\t*\n\t* This method is faster than removing nodes one by one, as it recalculates offsets only once.\n\t*\n\t* @internal\n\t* @param nodes Array of nodes.\n\t*/\n\t_removeChildrenArray(nodes) {\n\t\tthis._children._removeNodesArray(nodes);\n\t\tfor (const node of nodes) node.parent = null;\n\t}\n\t/**\n\t* Creates an `Element` instance from given plain object (i.e. parsed JSON string).\n\t* Converts `Element` children to proper nodes.\n\t*\n\t* @param json Plain object to be converted to `Element`.\n\t* @returns `Element` instance created using given plain object.\n\t*/\n\tstatic fromJSON(json) {\n\t\tlet children;\n\t\tif (json.children) {\n\t\t\tchildren = [];\n\t\t\tfor (const child of json.children) if (child.name) children.push(ModelElement.fromJSON(child));\n\t\t\telse children.push(ModelText.fromJSON(child));\n\t\t}\n\t\treturn new ModelElement(json.name, json.attributes, children);\n\t}\n};\nModelElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"element\" || type === \"model:element\" || type === \"node\" || type === \"model:node\";\n\treturn name === this.name && (type === \"element\" || type === \"model:element\");\n};\n/**\n* Converts strings to Text and non-iterables to arrays.\n*/\nfunction normalize$1(nodes) {\n\tif (typeof nodes == \"string\") return [new ModelText(nodes)];\n\tif (!isIterable(nodes)) nodes = [nodes];\n\tconst normalizedNodes = [];\n\tfor (const node of nodes) if (typeof node == \"string\") normalizedNodes.push(new ModelText(node));\n\telse if (node instanceof ModelTextProxy) normalizedNodes.push(new ModelText(node.data, node.getAttributes()));\n\telse normalizedNodes.push(node);\n\treturn normalizedNodes;\n}\nfunction cloneNodes(nodes) {\n\tconst clonedNodes = [];\n\tfor (const node of nodes) clonedNodes.push(node._clone(true));\n\treturn clonedNodes;\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 engine/conversion/conversionhelpers\n*/\n/**\n* Base class for conversion helpers.\n*/\nvar ConversionHelpers = class {\n\t_dispatchers;\n\t/**\n\t* Creates a conversion helpers instance.\n\t*/\n\tconstructor(dispatchers) {\n\t\tthis._dispatchers = dispatchers;\n\t}\n\t/**\n\t* Registers a conversion helper.\n\t*\n\t* **Note**: See full usage example in the `{@link module:engine/conversion/conversion~Conversion#for conversion.for()}`\n\t* method description.\n\t*\n\t* @param conversionHelper The function to be called on event.\n\t*/\n\tadd(conversionHelper) {\n\t\tfor (const dispatcher of this._dispatchers) conversionHelper(dispatcher);\n\t\treturn this;\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* Contains downcast (model-to-view) converters for {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}.\n*\n* @module engine/conversion/downcasthelpers\n*/\n/**\n* Downcast conversion helper functions.\n*\n* Learn more about {@glink framework/deep-dive/conversion/downcast downcast helpers}.\n*\n* @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n*/\nvar DowncastHelpers = class extends ConversionHelpers {\n\t/**\n\t* Model element to view element conversion helper.\n\t*\n\t* This conversion results in creating a view element. For example, model `<paragraph>Foo</paragraph>` becomes `<p>Foo</p>` in the view.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).elementToElement( {\n\t* \tmodel: 'paragraph',\n\t* \tview: 'p'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).elementToElement( {\n\t* \tmodel: 'paragraph',\n\t* \tview: 'div',\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).elementToElement( {\n\t* \tmodel: 'fancyParagraph',\n\t* \tview: {\n\t* \t\tname: 'p',\n\t* \t\tclasses: 'fancy'\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).elementToElement( {\n\t* \tmodel: 'heading',\n\t* \tview: ( modelElement, conversionApi ) => {\n\t* \t\tconst { writer } = conversionApi;\n\t*\n\t* \t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* The element-to-element conversion supports the reconversion mechanism. It can be enabled by using either the `attributes` or\n\t* the `children` props on a model description. You will find a couple examples below.\n\t*\n\t* In order to reconvert an element if any of its direct children have been added or removed, use the `children` property on a `model`\n\t* description. For example, this model:\n\t*\n\t* ```xml\n\t* <box>\n\t* \t<paragraph>Some text.</paragraph>\n\t* </box>\n\t* ```\n\t*\n\t* will be converted into this structure in the view:\n\t*\n\t* ```html\n\t* <div class=\"box\" data-type=\"single\">\n\t* \t<p>Some text.</p>\n\t* </div>\n\t* ```\n\t*\n\t* But if more items were inserted in the model:\n\t*\n\t* ```xml\n\t* <box>\n\t* \t<paragraph>Some text.</paragraph>\n\t* \t<paragraph>Other item.</paragraph>\n\t* </box>\n\t* ```\n\t*\n\t* it will be converted into this structure in the view (note the element `data-type` change):\n\t*\n\t* ```html\n\t* <div class=\"box\" data-type=\"multiple\">\n\t* \t<p>Some text.</p>\n\t* \t<p>Other item.</p>\n\t* </div>\n\t* ```\n\t*\n\t* Such a converter would look like this (note that the `paragraph` elements are converted separately):\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).elementToElement( {\n\t* \tmodel: {\n\t* \t\tname: 'box',\n\t* \t\tchildren: true\n\t* \t},\n\t* \tview: ( modelElement, conversionApi ) => {\n\t* \t\tconst { writer } = conversionApi;\n\t*\n\t* \t\treturn writer.createContainerElement( 'div', {\n\t* \t\t\tclass: 'box',\n\t* \t\t\t'data-type': modelElement.childCount == 1 ? 'single' : 'multiple'\n\t* \t\t} );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* In order to reconvert element if any of its attributes have been updated, use the `attributes` property on a `model`\n\t* description. For example, this model:\n\t*\n\t* ```xml\n\t* <heading level=\"2\">Some text.</heading>\n\t* ```\n\t*\n\t* will be converted into this structure in the view:\n\t*\n\t* ```html\n\t* <h2>Some text.</h2>\n\t* ```\n\t*\n\t* But if the `heading` element's `level` attribute has been updated to `3` for example, then\n\t* it will be converted into this structure in the view:\n\t*\n\t* ```html\n\t* <h3>Some text.</h3>\n\t* ```\n\t*\n\t* Such a converter would look as follows:\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).elementToElement( {\n\t* \tmodel: {\n\t* \t\tname: 'heading',\n\t* \t\tattributes: 'level'\n\t* \t},\n\t* \tview: ( modelElement, conversionApi ) => {\n\t* \t\tconst { writer } = conversionApi;\n\t*\n\t* \t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* You can read more about the element-to-element conversion in the\n\t* {@glink framework/deep-dive/conversion/downcast downcast conversion} guide.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.model The description or a name of the model element to convert.\n\t* @param config.view A view element definition or a function that takes the model element and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t* as parameters and returns a view container element.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\telementToElement(config) {\n\t\treturn this.add(downcastElementToElement(config));\n\t}\n\t/**\n\t* The model element to view structure (several elements) conversion helper.\n\t*\n\t* This conversion results in creating a view structure with one or more slots defined for the child nodes.\n\t* For example, a model `<table>` may become this structure in the view:\n\t*\n\t* ```html\n\t* <figure class=\"table\">\n\t* \t<table>\n\t* \t\t<tbody>${ slot for table rows }</tbody>\n\t* \t</table>\n\t* </figure>\n\t* ```\n\t*\n\t* The children of the model's `<table>` element will be inserted into the `<tbody>` element.\n\t* If the `elementToElement()` helper was used, the children would be inserted into the `<figure>`.\n\t*\n\t* Imagine a table feature where for this model structure:\n\t*\n\t* ```xml\n\t* <table headingRows=\"1\">\n\t* \t<tableRow> ... table cells 1 ... </tableRow>\n\t* \t<tableRow> ... table cells 2 ... </tableRow>\n\t* \t<tableRow> ... table cells 3 ... </tableRow>\n\t* \t<caption>Caption text</caption>\n\t* </table>\n\t* ```\n\t*\n\t* we want to generate this view structure:\n\t*\n\t* ```html\n\t* <figure class=\"table\">\n\t* \t<table>\n\t* \t\t<thead>\n\t* \t\t\t<tr> ... table cells 1 ... </tr>\n\t* \t\t</thead>\n\t* \t\t<tbody>\n\t* \t\t\t<tr> ... table cells 2 ... </tr>\n\t* \t\t\t<tr> ... table cells 3 ... </tr>\n\t* \t\t</tbody>\n\t* \t</table>\n\t* \t<figcaption>Caption text</figcaption>\n\t* </figure>\n\t* ```\n\t*\n\t* The converter has to take the `headingRows` attribute into consideration when allocating the `<tableRow>` elements\n\t* into the `<tbody>` and `<thead>` elements. Hence, we need two slots and need to define proper filter callbacks for them.\n\t*\n\t* Additionally, all elements other than `<tableRow>` should be placed outside the `<table>` tag.\n\t* In the example above, this will handle the table caption.\n\t*\n\t* Such a converter would look like this:\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).elementToStructure( {\n\t* \tmodel: {\n\t* \t\tname: 'table',\n\t* \t\tattributes: [ 'headingRows' ]\n\t* \t},\n\t* \tview: ( modelElement, conversionApi ) => {\n\t* \t\tconst { writer } = conversionApi;\n\t*\n\t* \t\tconst figureElement = writer.createContainerElement( 'figure', { class: 'table' } );\n\t* \t\tconst tableElement = writer.createContainerElement( 'table' );\n\t*\n\t* \t\twriter.insert( writer.createPositionAt( figureElement, 0 ), tableElement );\n\t*\n\t* \t\tconst headingRows = modelElement.getAttribute( 'headingRows' ) || 0;\n\t*\n\t* \t\tif ( headingRows > 0 ) {\n\t* \t\t\tconst tableHead = writer.createContainerElement( 'thead' );\n\t*\n\t* \t\t\tconst headSlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index < headingRows );\n\t*\n\t* \t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableHead );\n\t* \t\t\twriter.insert( writer.createPositionAt( tableHead, 0 ), headSlot );\n\t* \t\t}\n\t*\n\t* \t\tif ( headingRows < tableUtils.getRows( table ) ) {\n\t* \t\t\tconst tableBody = writer.createContainerElement( 'tbody' );\n\t*\n\t* \t\t\tconst bodySlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index >= headingRows );\n\t*\n\t* \t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableBody );\n\t* \t\t\twriter.insert( writer.createPositionAt( tableBody, 0 ), bodySlot );\n\t* \t\t}\n\t*\n\t* \t\tconst restSlot = writer.createSlot( node => !node.is( 'element', 'tableRow' ) );\n\t*\n\t* \t\twriter.insert( writer.createPositionAt( figureElement, 'end' ), restSlot );\n\t*\n\t* \t\treturn figureElement;\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* Note: The children of a model element that's being converted must be allocated in the same order in the view\n\t* in which they are placed in the model.\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.model The description or a name of the model element to convert.\n\t* @param config.view A function that takes the model element and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters\n\t* and returns a view container element with slots for model child nodes to be converted into.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\telementToStructure(config) {\n\t\treturn this.add(downcastElementToStructure(config));\n\t}\n\t/**\n\t* Model attribute to view element conversion helper.\n\t*\n\t* This conversion results in wrapping view nodes with a view attribute element. For example, a model text node with\n\t* `\"Foo\"` as data and the `bold` attribute becomes `<strong>Foo</strong>` in the view.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).attributeToElement( {\n\t* \tmodel: 'bold',\n\t* \tview: 'strong'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToElement( {\n\t* \tmodel: 'bold',\n\t* \tview: 'b',\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToElement( {\n\t* \tmodel: 'invert',\n\t* \tview: {\n\t* \t\tname: 'span',\n\t* \t\tclasses: [ 'font-light', 'bg-dark' ]\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToElement( {\n\t* \tmodel: {\n\t* \t\tkey: 'fontSize',\n\t* \t\tvalues: [ 'big', 'small' ]\n\t* \t},\n\t* \tview: {\n\t* \t\tbig: {\n\t* \t\t\tname: 'span',\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'font-size': '1.2em'\n\t* \t\t\t}\n\t* \t\t},\n\t* \t\tsmall: {\n\t* \t\t\tname: 'span',\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'font-size': '0.8em'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToElement( {\n\t* \tmodel: 'bold',\n\t* \tview: ( modelAttributeValue, conversionApi ) => {\n\t* \t\tconst { writer } = conversionApi;\n\t*\n\t* \t\treturn writer.createAttributeElement( 'span', {\n\t* \t\t\tstyle: 'font-weight:' + modelAttributeValue\n\t* \t\t} );\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToElement( {\n\t* \tmodel: {\n\t* \t\tkey: 'color',\n\t* \t\tname: '$text'\n\t* \t},\n\t* \tview: ( modelAttributeValue, conversionApi ) => {\n\t* \t\tconst { writer } = conversionApi;\n\t*\n\t* \t\treturn writer.createAttributeElement( 'span', {\n\t* \t\t\tstyle: 'color:' + modelAttributeValue\n\t* \t\t} );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n\t* of `String`s with possible values if the model attribute is an enumerable.\n\t* @param config.view A view element definition or a function\n\t* that takes the model attribute value and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters and returns a view\n\t* attribute element. If `config.model.values` is given, `config.view` should be an object assigning values from `config.model.values`\n\t* to view element definitions or functions.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\tattributeToElement(config) {\n\t\treturn this.add(downcastAttributeToElement(config));\n\t}\n\t/**\n\t* Model attribute to view attribute conversion helper.\n\t*\n\t* This conversion results in adding an attribute to a view node, basing on an attribute from a model node. For example,\n\t* `<imageInline src='foo.jpg'></imageInline>` is converted to `<img src='foo.jpg'></img>`.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t* \tmodel: 'source',\n\t* \tview: 'src'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t* \tmodel: 'source',\n\t* \tview: 'href',\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t* \tmodel: {\n\t* \t\tname: 'imageInline',\n\t* \t\tkey: 'source'\n\t* \t},\n\t* \tview: 'src'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t* \tmodel: {\n\t* \t\tname: 'styled',\n\t* \t\tvalues: [ 'dark', 'light' ]\n\t* \t},\n\t* \tview: {\n\t* \t\tdark: {\n\t* \t\t\tkey: 'class',\n\t* \t\t\tvalue: [ 'styled', 'styled-dark' ]\n\t* \t\t},\n\t* \t\tlight: {\n\t* \t\t\tkey: 'class',\n\t* \t\t\tvalue: [ 'styled', 'styled-light' ]\n\t* \t\t}\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t* \tmodel: 'styled',\n\t* \tview: modelAttributeValue => ( {\n\t* \t\tkey: 'class',\n\t* \t\tvalue: 'styled-' + modelAttributeValue\n\t* \t} )\n\t* } );\n\t* ```\n\t*\n\t* **Note**: Downcasting to a style property requires providing `value` as an object:\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t* \tmodel: 'lineHeight',\n\t* \tview: modelAttributeValue => ( {\n\t* \t\tkey: 'style',\n\t* \t\tvalue: {\n\t* \t\t\t'line-height': modelAttributeValue,\n\t* \t\t\t'border-bottom': '1px dotted #ba2'\n\t* \t\t}\n\t* \t} )\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n\t* the attribute key, possible values and, optionally, an element name to convert from.\n\t* @param config.view A view attribute key, or a `{ key, value }` object or a function that takes the model attribute value and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t* as parameters and returns a `{ key, value }` object. If the `key` is `'class'`, the `value` can be a `String` or an\n\t* array of `String`s. If the `key` is `'style'`, the `value` is an object with key-value pairs. In other cases, `value` is a `String`.\n\t* If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n\t* `{ key, value }` objects or a functions.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\tattributeToAttribute(config) {\n\t\treturn this.add(downcastAttributeToAttribute(config));\n\t}\n\t/**\n\t* Model marker to view element conversion helper.\n\t*\n\t* **Note**: This method should be used mainly for editing the downcast and it is recommended\n\t* to use the {@link #markerToData `#markerToData()`} helper instead.\n\t*\n\t* This helper may produce invalid HTML code (e.g. a span between table cells).\n\t* It should only be used when you are sure that the produced HTML will be semantically correct.\n\t*\n\t* This conversion results in creating a view element on the boundaries of the converted marker. If the converted marker\n\t* is collapsed, only one element is created. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>`\n\t* becomes `<p>F<span data-marker=\"search\"></span>oo b<span data-marker=\"search\"></span>ar</p>` in the view.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t* \tmodel: 'search',\n\t* \tview: 'marker-search'\n\t* } );\n\t*\n\t* editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t* \tmodel: 'search',\n\t* \tview: 'search-result',\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t* \tmodel: 'search',\n\t* \tview: {\n\t* \t\tname: 'span',\n\t* \t\tattributes: {\n\t* \t\t\t'data-marker': 'search'\n\t* \t\t}\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t* \tmodel: 'search',\n\t* \tview: ( markerData, conversionApi ) => {\n\t* \t\tconst { writer } = conversionApi;\n\t*\n\t* \t\treturn writer.createUIElement( 'span', {\n\t* \t\t\t'data-marker': 'search',\n\t* \t\t\t'data-start': markerData.isOpening\n\t* \t\t} );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* If a function is passed as the `config.view` parameter, it will be used to generate both boundary elements. The function\n\t* receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t* as a parameters and should return an instance of the\n\t* {@link module:engine/view/uielement~ViewUIElement view UI element}. The `data` object and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi `conversionApi`} are passed from\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}. Additionally,\n\t* the `data.isOpening` parameter is passed, which is set to `true` for the marker start boundary element, and `false` for\n\t* the marker end boundary element.\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.model The name of the model marker (or model marker group) to convert.\n\t* @param config.view A view element definition or a function that takes the model marker data and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as a parameters\n\t* and returns a view UI element.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\tmarkerToElement(config) {\n\t\treturn this.add(downcastMarkerToElement(config));\n\t}\n\t/**\n\t* Model marker to highlight conversion helper.\n\t*\n\t* This conversion results in creating a highlight on view nodes. For this kind of conversion,\n\t* the {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor} should be provided.\n\t*\n\t* For text nodes, a `<span>` {@link module:engine/view/attributeelement~ViewAttributeElement} is created and it wraps all text nodes\n\t* in the converted marker range. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>` becomes\n\t* `<p>F<span class=\"comment\">oo b</span>ar</p>` in the view.\n\t*\n\t* {@link module:engine/view/containerelement~ViewContainerElement} may provide a custom way of handling highlight. Most often,\n\t* the element itself is given classes and attributes described in the highlight descriptor (instead of being wrapped in `<span>`).\n\t* For example, a model marker set like this:\n\t* `[<imageInline src=\"foo.jpg\"></imageInline>]` becomes `<img src=\"foo.jpg\" class=\"comment\"></img>` in the view.\n\t*\n\t* For container elements, the conversion is two-step. While the converter processes the highlight descriptor and passes it\n\t* to a container element, it is the container element instance itself that applies values from the highlight descriptor.\n\t* So, in a sense, the converter takes care of stating what should be applied on what, while the element decides how to apply that.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' ).markerToHighlight( { model: 'comment', view: { classes: 'comment' } } );\n\t*\n\t* editor.conversion.for( 'downcast' ).markerToHighlight( {\n\t* \tmodel: 'comment',\n\t* \tview: { classes: 'comment' },\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'downcast' ).markerToHighlight( {\n\t* \tmodel: 'comment',\n\t* \tview: ( data, conversionApi ) => {\n\t* \t\t// Assuming that the marker name is in a form of comment:commentType:commentId.\n\t* \t\tconst [ , commentType, commentId ] = data.markerName.split( ':' );\n\t*\n\t* \t\treturn {\n\t* \t\t\tclasses: [ 'comment', 'comment-' + commentType ],\n\t* \t\t\tattributes: { 'data-comment-id': commentId }\n\t* \t\t};\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* If a function is passed as the `config.view` parameter, it will be used to generate the highlight descriptor. The function\n\t* receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t* as the parameters and should return a\n\t* {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor highlight descriptor}.\n\t* The `data` object properties are passed from {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}.\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.model The name of the model marker (or model marker group) to convert.\n\t* @param config.view A highlight descriptor that will be used for highlighting or a function that takes the model marker data and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as a parameters\n\t* and returns a highlight descriptor.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\tmarkerToHighlight(config) {\n\t\treturn this.add(downcastMarkerToHighlight(config));\n\t}\n\t/**\n\t* Model marker converter for data downcast.\n\t*\n\t* This conversion creates a representation for model marker boundaries in the view:\n\t*\n\t* * If the marker boundary is before or after a model element, a view attribute is set on a corresponding view element.\n\t* * In other cases, a view element with the specified tag name is inserted at the corresponding view position.\n\t*\n\t* Typically, the marker names use the `group:uniqueId:otherData` convention. For example: `comment:e34zfk9k2n459df53sjl34:zx32c`.\n\t* The default configuration for this conversion is that the first part is the `group` part and the rest of\n\t* the marker name becomes the `name` part.\n\t*\n\t* Tag and attribute names and values are generated from the marker name:\n\t*\n\t* * The templates for attributes are `data-[group]-start-before=\"[name]\"`, `data-[group]-start-after=\"[name]\"`,\n\t* `data-[group]-end-before=\"[name]\"` and `data-[group]-end-after=\"[name]\"`.\n\t* * The templates for view elements are `<[group]-start name=\"[name]\">` and `<[group]-end name=\"[name]\">`.\n\t*\n\t* Attributes mark whether the given marker's start or end boundary is before or after the given element.\n\t* The `data-[group]-start-before` and `data-[group]-end-after` attributes are favored.\n\t* The other two are used when the former two cannot be used.\n\t*\n\t* The conversion configuration can take a function that will generate different group and name parts.\n\t* If such a function is set as the `config.view` parameter, it is passed a marker name and it is expected to return an object with two\n\t* properties: `group` and `name`. If the function returns a falsy value, the conversion will not take place.\n\t*\n\t* Basic usage:\n\t*\n\t* ```ts\n\t* // Using the default conversion.\n\t* // In this case, all markers with names starting with 'comment:' will be converted.\n\t* // The `group` parameter will be set to `comment`.\n\t* // The `name` parameter will be the rest of the marker name (without the `:`).\n\t* editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t* \tmodel: 'comment'\n\t* } );\n\t* ```\n\t*\n\t* An example of a view that may be generated by this conversion (assuming a marker with the name `comment:commentId:uid` marked\n\t* by `[]`):\n\t*\n\t* ```\n\t* // Model:\n\t* <paragraph>Foo[bar</paragraph>\n\t* <imageBlock src=\"abc.jpg\"></imageBlock>]\n\t*\n\t* // View:\n\t* <p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t* <figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t* ```\n\t*\n\t* In the example above, the comment starts before \"bar\" and ends after the image.\n\t*\n\t* If the `name` part is empty, the following view may be generated:\n\t*\n\t* ```html\n\t* <p>Foo <myMarker-start></myMarker-start>bar</p>\n\t* <figure data-myMarker-end-after=\"\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t* ```\n\t*\n\t* **Note:** A situation where some markers have the `name` part and some do not, is incorrect and should be avoided.\n\t*\n\t* Examples where `data-group-start-after` and `data-group-end-before` are used:\n\t*\n\t* ```\n\t* // Model:\n\t* <blockQuote>[]<paragraph>Foo</paragraph></blockQuote>\n\t*\n\t* // View:\n\t* <blockquote><p data-group-end-before=\"name\" data-group-start-before=\"name\">Foo</p></blockquote>\n\t* ```\n\t*\n\t* Similarly, when a marker is collapsed after the last element:\n\t*\n\t* ```\n\t* // Model:\n\t* <blockQuote><paragraph>Foo</paragraph>[]</blockQuote>\n\t*\n\t* // View:\n\t* <blockquote><p data-group-end-after=\"name\" data-group-start-after=\"name\">Foo</p></blockquote>\n\t* ```\n\t*\n\t* When there are multiple markers from the same group stored in the same attribute of the same element, their\n\t* name parts are put together in the attribute value, for example: `data-group-start-before=\"name1,name2,name3\"`.\n\t*\n\t* Other examples of usage:\n\t*\n\t* ```ts\n\t* // Using a custom function which is the same as the default conversion:\n\t* editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t* \tmodel: 'comment',\n\t* \tview: markerName => ( {\n\t* \t\tgroup: 'comment',\n\t* \t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t* \t} )\n\t* } );\n\t*\n\t* // Using the converter priority:\n\t* editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t* \tmodel: 'comment',\n\t* \tview: markerName => ( {\n\t* \t\tgroup: 'comment',\n\t* \t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t* \t} ),\n\t* \tconverterPriority: 'high'\n\t* } );\n\t* ```\n\t*\n\t* This kind of conversion is useful for saving data into the database, so it should be used in the data conversion pipeline.\n\t*\n\t* See the {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} API guide to learn how to\n\t* add a converter to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.model The name of the model marker (or the model marker group) to convert.\n\t* @param config.view A function that takes the model marker name and\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as the parameters\n\t* and returns an object with the `group` and `name` properties.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\tmarkerToData(config) {\n\t\treturn this.add(downcastMarkerToData(config));\n\t}\n};\n/**\n* Function factory that creates a default downcast converter for text insertion changes.\n*\n* The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n*\n* ```ts\n* modelDispatcher.on( 'insert:$text', insertText() );\n* ```\n*\n* @returns Insert text event converter.\n* @internal\n*/\nfunction insertText() {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition(data.range.start);\n\t\tconst viewText = viewWriter.createText(data.item.data);\n\t\tviewWriter.insert(viewPosition, viewText);\n\t};\n}\n/**\n* Function factory that creates a default downcast converter for triggering attributes and children conversion.\n*\n* @returns The converter.\n* @internal\n*/\nfunction insertAttributesAndChildren() {\n\treturn (evt, data, conversionApi) => {\n\t\tconversionApi.convertAttributes(data.item);\n\t\tif (!data.reconversion && data.item.is(\"element\") && !data.item.isEmpty) conversionApi.convertChildren(data.item);\n\t};\n}\n/**\n* Function factory that creates a default downcast converter for node remove changes.\n*\n* ```ts\n* modelDispatcher.on( 'remove', remove() );\n* ```\n*\n* @returns Remove event converter.\n* @internal\n*/\nfunction remove() {\n\treturn (evt, data, conversionApi) => {\n\t\tif (data.reconversion) return;\n\t\tconst viewStart = conversionApi.mapper.toViewPosition(data.position);\n\t\tconst modelEnd = data.position.getShiftedBy(data.length);\n\t\tconst viewEnd = conversionApi.mapper.toViewPosition(modelEnd, { isPhantom: true });\n\t\tremoveRangeAndUnbind(conversionApi.writer.createRange(viewStart, viewEnd).getTrimmed(), conversionApi);\n\t};\n}\n/**\n* Creates a `<span>` {@link module:engine/view/attributeelement~ViewAttributeElement view attribute element} from the information\n* provided by the {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor highlight descriptor} object. If the priority\n* is not provided in the descriptor, the default priority will be used.\n*\n* @internal\n*/\nfunction createViewElementFromDowncastHighlightDescriptor(writer, descriptor) {\n\tconst viewElement = writer.createAttributeElement(\"span\", descriptor.attributes);\n\tif (descriptor.classes) viewElement._addClass(descriptor.classes);\n\tif (typeof descriptor.priority === \"number\") viewElement._priority = descriptor.priority;\n\tviewElement._id = descriptor.id;\n\treturn viewElement;\n}\n/**\n* Function factory that creates a converter which converts a non-collapsed\n* {@link module:engine/model/selection~ModelSelection model selection}\n* to a {@link module:engine/view/documentselection~ViewDocumentSelection view selection}. The converter consumes appropriate\n* value from the `consumable` object and maps model positions from the selection to view positions.\n*\n* ```ts\n* modelDispatcher.on( 'selection', convertRangeSelection() );\n* ```\n*\n* @returns Selection converter.\n* @internal\n*/\nfunction convertRangeSelection() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst selection = data.selection;\n\t\tif (selection.isCollapsed) return;\n\t\tif (!conversionApi.consumable.consume(selection, \"selection\")) return;\n\t\tconst viewRanges = [];\n\t\tfor (const range of selection.getRanges()) viewRanges.push(conversionApi.mapper.toViewRange(range));\n\t\tconversionApi.writer.setSelection(viewRanges, { backward: selection.isBackward });\n\t};\n}\n/**\n* Function factory that creates a converter which converts a collapsed\n* {@link module:engine/model/selection~ModelSelection model selection} to\n* a {@link module:engine/view/documentselection~ViewDocumentSelection view selection}. The converter consumes appropriate\n* value from the `consumable` object, maps the model selection position to the view position and breaks\n* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} at the selection position.\n*\n* ```ts\n* modelDispatcher.on( 'selection', convertCollapsedSelection() );\n* ```\n*\n* An example of the view state before and after converting the collapsed selection:\n*\n* ```\n*    <p><strong>f^oo<strong>bar</p>\n* -> <p><strong>f</strong>^<strong>oo</strong>bar</p>\n* ```\n*\n* By breaking attribute elements like `<strong>`, the selection is in a correct element. Then, when the selection attribute is\n* converted, broken attributes might be merged again, or the position where the selection is may be wrapped\n* with different, appropriate attribute elements.\n*\n* See also {@link module:engine/conversion/downcasthelpers~cleanSelection} which does a clean-up\n* by merging attributes.\n*\n* @returns Selection converter.\n* @internal\n*/\nfunction convertCollapsedSelection() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst selection = data.selection;\n\t\tif (!selection.isCollapsed) return;\n\t\tif (!conversionApi.consumable.consume(selection, \"selection\")) return;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst modelPosition = selection.getFirstPosition();\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition(modelPosition);\n\t\tconst brokenPosition = viewWriter.breakAttributes(viewPosition);\n\t\tviewWriter.setSelection(brokenPosition);\n\t};\n}\n/**\n* Function factory that creates a converter which cleans artifacts after the previous\n* {@link module:engine/model/selection~ModelSelection model selection} conversion. It removes all empty\n* {@link module:engine/view/attributeelement~ViewAttributeElement view attribute elements} and merges\n* sibling attributes at all start and end positions of all ranges.\n*\n* ```\n*    <p><strong>^</strong></p>\n* -> <p>^</p>\n*\n*    <p><strong>foo</strong>^<strong>bar</strong>bar</p>\n* -> <p><strong>foo^bar<strong>bar</p>\n*\n*    <p><strong>foo</strong><em>^</em><strong>bar</strong>bar</p>\n* -> <p><strong>foo^bar<strong>bar</p>\n* ```\n*\n* This listener should be assigned before any converter for the new selection:\n*\n* ```ts\n* modelDispatcher.on( 'cleanSelection', cleanSelection() );\n* ```\n*\n* See {@link module:engine/conversion/downcasthelpers~convertCollapsedSelection}\n* which does the opposite by breaking attributes in the selection position.\n*\n* @returns Selection converter.\n* @internal\n*/\nfunction cleanSelection() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewSelection = viewWriter.document.selection;\n\t\tfor (const range of viewSelection.getRanges()) if (range.isCollapsed) {\n\t\t\tif (range.end.parent.isAttached()) conversionApi.writer.mergeAttributes(range.start);\n\t\t}\n\t\tviewWriter.setSelection(null);\n\t};\n}\n/**\n* Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n* It can also be used to convert selection attributes. In that case, an empty attribute element will be created and the\n* selection will be put inside it.\n*\n* Attributes from the model are converted to a view element that will be wrapping these view nodes that are bound to\n* model elements having the given attribute. This is useful for attributes like `bold` that may be set on text nodes in the model\n* but are represented as an element in the view:\n*\n* ```\n* [paragraph]              MODEL ====> VIEW        <p>\n* \t|- a {bold: true}                             |- <b>\n* \t|- b {bold: true}                             |   |- ab\n* \t|- c                                          |- c\n* \t```\n*\n* Passed `Function` will be provided with the attribute value and then all the parameters of the\n* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute` event}.\n* It is expected that the function returns an {@link module:engine/view/element~ViewElement}.\n* The result of the function will be the wrapping element.\n* When the provided `Function` does not return any element, no conversion will take place.\n*\n* The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n*\n* ```ts\n* modelDispatcher.on( 'attribute:bold', wrap( ( modelAttributeValue, { writer } ) => {\n* \treturn writer.createAttributeElement( 'strong' );\n* } );\n* ```\n*\n* @internal\n* @param elementCreator Function returning a view element that will be used for wrapping.\n* @returns Set/change attribute converter.\n*/\nfunction wrap(elementCreator) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\t\tconst oldViewElement = elementCreator(data.attributeOldValue, conversionApi, data);\n\t\tconst newViewElement = elementCreator(data.attributeNewValue, conversionApi, data);\n\t\tif (!oldViewElement && !newViewElement) return;\n\t\tconversionApi.consumable.consume(data.item, evt.name);\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewSelection = viewWriter.document.selection;\n\t\tif (data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection) viewWriter.wrap(viewSelection.getFirstRange(), newViewElement);\n\t\telse {\n\t\t\tlet viewRange = conversionApi.mapper.toViewRange(data.range);\n\t\t\tif (data.attributeOldValue !== null && oldViewElement) viewRange = viewWriter.unwrap(viewRange, oldViewElement);\n\t\t\tif (data.attributeNewValue !== null && newViewElement) viewWriter.wrap(viewRange, newViewElement);\n\t\t}\n\t};\n}\n/**\n* Function factory that creates a converter which converts node insertion changes from the model to the view.\n* The function passed will be provided with all the parameters of the dispatcher's\n* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert` event}.\n* It is expected that the function returns an {@link module:engine/view/element~ViewElement}.\n* The result of the function will be inserted into the view.\n*\n* The converter automatically consumes the corresponding value from the consumables list and binds the model and view elements.\n*\n* ```ts\n* downcastDispatcher.on(\n* \t'insert:myElem',\n* \tinsertElement( ( modelItem, { writer } ) => {\n* \t\tconst text = writer.createText( 'myText' );\n* \t\tconst myElem = writer.createElement( 'myElem', { myAttr: 'my-' + modelItem.getAttribute( 'myAttr' ) }, text );\n*\n* \t\t// Do something fancy with `myElem` using `modelItem` or other parameters.\n*\n* \t\treturn myElem;\n* \t}\n* ) );\n* ```\n*\n* @internal\n* @param  elementCreator Function returning a view element, which will be inserted.\n* @param consumer Function defining element consumption process.\n* By default this function just consume passed item insertion.\n* @returns Insert element event converter.\n*/\nfunction insertElement(elementCreator, consumer = defaultConsumer) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!consumer(data.item, conversionApi.consumable, { preflight: true })) return;\n\t\tconst viewElement = elementCreator(data.item, conversionApi, data);\n\t\tif (!viewElement) return;\n\t\tconsumer(data.item, conversionApi.consumable);\n\t\tconst viewPosition = data.reconversion && removeElementAndUnbind(data.item, conversionApi) || conversionApi.mapper.toViewPosition(data.range.start);\n\t\tconversionApi.mapper.bindElements(data.item, viewElement);\n\t\tconversionApi.writer.insert(viewPosition, viewElement);\n\t\tconversionApi.convertAttributes(data.item);\n\t\treinsertOrConvertNodes(viewElement, data.item.getChildren(), conversionApi, { reconversion: data.reconversion });\n\t};\n}\n/**\n* Function factory that creates a converter which converts a single model node insertion to a view structure.\n*\n* It is expected that the passed element creator function returns an {@link module:engine/view/element~ViewElement} with attached slots\n* created with `writer.createSlot()` to indicate where child nodes should be converted.\n*\n* @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n*\n* @internal\n* @param elementCreator Function returning a view structure, which will be inserted.\n* @param consumer A callback that is expected to consume all the consumables\n* that were used by the element creator.\n* @returns Insert element event converter.\n*/\nfunction insertStructure(elementCreator, consumer) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!consumer(data.item, conversionApi.consumable, { preflight: true })) return;\n\t\tconst slotsMap = /* @__PURE__ */ new Map();\n\t\tconversionApi.writer._registerSlotFactory(createSlotFactory(data.item, slotsMap, conversionApi));\n\t\tconst viewElement = elementCreator(data.item, conversionApi, data);\n\t\tconversionApi.writer._clearSlotFactory();\n\t\tif (!viewElement) return;\n\t\tvalidateSlotsChildren(data.item, slotsMap, conversionApi);\n\t\tconsumer(data.item, conversionApi.consumable);\n\t\tconst viewPosition = data.reconversion && removeElementAndUnbind(data.item, conversionApi) || conversionApi.mapper.toViewPosition(data.range.start);\n\t\tconversionApi.mapper.bindElements(data.item, viewElement);\n\t\tconversionApi.writer.insert(viewPosition, viewElement);\n\t\tconversionApi.convertAttributes(data.item);\n\t\tfillSlots(viewElement, slotsMap, conversionApi, { reconversion: data.reconversion });\n\t};\n}\n/**\n* Function factory that creates a converter which converts marker adding change to the\n* {@link module:engine/view/uielement~ViewUIElement view UI element}.\n*\n* The view UI element that will be added to the view depends on the passed parameter. See {@link ~insertElement}.\n* In case of a non-collapsed range, the UI element will not wrap nodes but separate elements will be placed at the beginning\n* and at the end of the range.\n*\n* This converter binds created UI elements with the marker name using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n*\n* @internal\n* @param elementCreator A view UI element or a function returning the view element that will be inserted.\n* @returns Insert element event converter.\n*/\nfunction insertUIElement(elementCreator) {\n\treturn (evt, data, conversionApi) => {\n\t\tdata.isOpening = true;\n\t\tconst viewStartElement = elementCreator(data, conversionApi);\n\t\tdata.isOpening = false;\n\t\tconst viewEndElement = elementCreator(data, conversionApi);\n\t\tif (!viewStartElement || !viewEndElement) return;\n\t\tconst { markerRange, markerName } = data;\n\t\tif (markerRange.isCollapsed && !conversionApi.consumable.consume(markerRange, evt.name)) return;\n\t\tfor (const value of markerRange) if (!conversionApi.consumable.consume(value.item, evt.name)) return;\n\t\tconst mapper = conversionApi.mapper;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tviewWriter.setCustomProperty(\"markerBoundaryType\", \"start\", viewStartElement);\n\t\tviewWriter.setCustomProperty(\"markerBoundaryName\", markerName, viewStartElement);\n\t\tviewWriter.setCustomProperty(\"markerBoundaryType\", \"end\", viewEndElement);\n\t\tviewWriter.setCustomProperty(\"markerBoundaryName\", markerName, viewEndElement);\n\t\tconst getBoundaryModelPosition = (name, type) => {\n\t\t\tconst elements = mapper.markerNameToElements(name);\n\t\t\tif (elements) {\n\t\t\t\tfor (const el of elements) if (el.getCustomProperty(\"markerBoundaryType\") === type) return mapper.toModelPosition(viewWriter.createPositionBefore(el));\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\t\tif (!markerRange.isCollapsed) {\n\t\t\tconst endViewPosition = mapper.toViewPosition(markerRange.end).getLastMatchingPosition(({ item }) => {\n\t\t\t\tif (!item.is(\"uiElement\") || item.getCustomProperty(\"markerBoundaryType\") !== \"end\") return false;\n\t\t\t\tconst existingName = item.getCustomProperty(\"markerBoundaryName\");\n\t\t\t\tconst existingStartPos = getBoundaryModelPosition(existingName, \"start\");\n\t\t\t\tif (!existingStartPos) return false;\n\t\t\t\tconst cmp = existingStartPos.compareWith(markerRange.start);\n\t\t\t\tif (cmp === \"same\") return existingName.localeCompare(markerName) > 0;\n\t\t\t\treturn cmp === \"after\";\n\t\t\t});\n\t\t\tviewWriter.insert(endViewPosition, viewEndElement);\n\t\t\tmapper.bindElementToMarker(viewEndElement, markerName);\n\t\t}\n\t\tconst startViewPosition = mapper.toViewPosition(markerRange.start).getLastMatchingPosition(({ item }) => {\n\t\t\tif (!item.is(\"uiElement\")) return false;\n\t\t\tconst boundaryType = item.getCustomProperty(\"markerBoundaryType\");\n\t\t\tif (!boundaryType) return false;\n\t\t\tif (boundaryType === \"end\") return true;\n\t\t\tconst existingName = item.getCustomProperty(\"markerBoundaryName\");\n\t\t\tconst existingEndPos = getBoundaryModelPosition(existingName, \"end\");\n\t\t\tif (!existingEndPos) return markerRange.isCollapsed;\n\t\t\tif (markerRange.isCollapsed) return true;\n\t\t\tconst cmp = existingEndPos.compareWith(markerRange.end);\n\t\t\tif (cmp === \"same\") return existingName.localeCompare(markerName) < 0;\n\t\t\treturn cmp === \"after\";\n\t\t});\n\t\tviewWriter.insert(startViewPosition, viewStartElement);\n\t\tmapper.bindElementToMarker(viewStartElement, markerName);\n\t\tevt.stop();\n\t};\n}\n/**\n* Removes given view range content and unbinds removed elements.\n*/\nfunction removeRangeAndUnbind(viewRange, conversionApi) {\n\tconst removed = conversionApi.writer.remove(viewRange);\n\tfor (const child of conversionApi.writer.createRangeIn(removed).getItems()) conversionApi.mapper.unbindViewElement(child, { defer: true });\n\treturn viewRange.start;\n}\n/**\n* Removes view element for given model element and unbinds removed view elements.\n*/\nfunction removeElementAndUnbind(modelElement, conversionApi) {\n\tconst viewElement = conversionApi.mapper.toViewElement(modelElement);\n\treturn viewElement && removeRangeAndUnbind(conversionApi.writer.createRangeOn(viewElement), conversionApi);\n}\n/**\n* Function factory that returns a default downcast converter for removing a {@link module:engine/view/uielement~ViewUIElement UI element}\n* based on marker remove change.\n*\n* This converter unbinds elements from the marker name.\n*\n* @returns Removed UI element converter.\n*/\nfunction removeUIElement() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst elements = conversionApi.mapper.markerNameToElements(data.markerName);\n\t\tif (!elements) return;\n\t\tfor (const element of elements) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName(element, data.markerName);\n\t\t\tconversionApi.writer.clear(conversionApi.writer.createRangeOn(element), element);\n\t\t}\n\t\tconversionApi.writer.clearClonedElementsGroup(data.markerName);\n\t\tevt.stop();\n\t};\n}\n/**\n* Function factory that creates a default converter for model markers.\n*\n* See {@link DowncastHelpers#markerToData} for more information what type of view is generated.\n*\n* This converter binds created UI elements and affected view elements with the marker name\n* using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n*\n* @returns Add marker converter.\n*/\nfunction insertMarkerData(viewCreator) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst viewMarkerData = viewCreator(data.markerName, conversionApi);\n\t\tif (!viewMarkerData) return;\n\t\tconst markerRange = data.markerRange;\n\t\tif (!conversionApi.consumable.consume(markerRange, evt.name)) return;\n\t\thandleMarkerBoundary(markerRange, false, conversionApi, data, viewMarkerData);\n\t\thandleMarkerBoundary(markerRange, true, conversionApi, data, viewMarkerData);\n\t\tevt.stop();\n\t};\n}\n/**\n* Helper function for `insertMarkerData()` that marks a marker boundary at the beginning or end of given `range`.\n*/\nfunction handleMarkerBoundary(range, isStart, conversionApi, data, viewMarkerData) {\n\tconst modelPosition = isStart ? range.start : range.end;\n\tconst elementAfter = modelPosition.nodeAfter && modelPosition.nodeAfter.is(\"element\") ? modelPosition.nodeAfter : null;\n\tconst elementBefore = modelPosition.nodeBefore && modelPosition.nodeBefore.is(\"element\") ? modelPosition.nodeBefore : null;\n\tif (elementAfter || elementBefore) {\n\t\tlet modelElement;\n\t\tlet isBefore;\n\t\tif (isStart && elementAfter || !isStart && !elementBefore) {\n\t\t\tmodelElement = elementAfter;\n\t\t\tisBefore = true;\n\t\t} else {\n\t\t\tmodelElement = elementBefore;\n\t\t\tisBefore = false;\n\t\t}\n\t\tconst viewElement = conversionApi.mapper.toViewElement(modelElement);\n\t\tif (viewElement) {\n\t\t\tinsertMarkerAsAttribute(viewElement, isStart, isBefore, conversionApi, data, viewMarkerData);\n\t\t\treturn;\n\t\t}\n\t}\n\tinsertMarkerAsElement(conversionApi.mapper.toViewPosition(modelPosition), isStart, conversionApi, data, viewMarkerData);\n}\n/**\n* Helper function for `insertMarkerData()` that marks a marker boundary in the view as an attribute on a view element.\n*/\nfunction insertMarkerAsAttribute(viewElement, isStart, isBefore, conversionApi, data, viewMarkerData) {\n\tconst attributeName = `data-${viewMarkerData.group}-${isStart ? \"start\" : \"end\"}-${isBefore ? \"before\" : \"after\"}`;\n\tconst markerNames = viewElement.hasAttribute(attributeName) ? viewElement.getAttribute(attributeName).split(\",\") : [];\n\tmarkerNames.unshift(viewMarkerData.name);\n\tconversionApi.writer.setAttribute(attributeName, markerNames.join(\",\"), viewElement);\n\tconversionApi.mapper.bindElementToMarker(viewElement, data.markerName);\n}\n/**\n* Helper function for `insertMarkerData()` that marks a marker boundary in the view as a separate view ui element.\n*/\nfunction insertMarkerAsElement(position, isStart, conversionApi, data, viewMarkerData) {\n\tconst viewElementName = `${viewMarkerData.group}-${isStart ? \"start\" : \"end\"}`;\n\tconst attrs = viewMarkerData.name ? { \"name\": viewMarkerData.name } : null;\n\tconst viewElement = conversionApi.writer.createUIElement(viewElementName, attrs);\n\tconversionApi.writer.insert(position, viewElement);\n\tconversionApi.mapper.bindElementToMarker(viewElement, data.markerName);\n}\n/**\n* Function factory that creates a converter for removing a model marker data added by the {@link #insertMarkerData} converter.\n*\n* @returns Remove marker converter.\n*/\nfunction removeMarkerData(viewCreator) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst viewData = viewCreator(data.markerName, conversionApi);\n\t\tif (!viewData) return;\n\t\tconst elements = conversionApi.mapper.markerNameToElements(data.markerName);\n\t\tif (!elements) return;\n\t\tfor (const element of elements) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName(element, data.markerName);\n\t\t\tif (element.is(\"containerElement\")) {\n\t\t\t\tremoveMarkerFromAttribute(`data-${viewData.group}-start-before`, element);\n\t\t\t\tremoveMarkerFromAttribute(`data-${viewData.group}-start-after`, element);\n\t\t\t\tremoveMarkerFromAttribute(`data-${viewData.group}-end-before`, element);\n\t\t\t\tremoveMarkerFromAttribute(`data-${viewData.group}-end-after`, element);\n\t\t\t} else conversionApi.writer.clear(conversionApi.writer.createRangeOn(element), element);\n\t\t}\n\t\tconversionApi.writer.clearClonedElementsGroup(data.markerName);\n\t\tevt.stop();\n\t\tfunction removeMarkerFromAttribute(attributeName, element) {\n\t\t\tif (element.hasAttribute(attributeName)) {\n\t\t\t\tconst markerNames = new Set(element.getAttribute(attributeName).split(\",\"));\n\t\t\t\tmarkerNames.delete(viewData.name);\n\t\t\t\tif (markerNames.size == 0) conversionApi.writer.removeAttribute(attributeName, element);\n\t\t\t\telse conversionApi.writer.setAttribute(attributeName, Array.from(markerNames).join(\",\"), element);\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n*\n* Attributes from the model are converted to the view element attributes in the view. You may provide a custom function to generate\n* a key-value attribute pair to add/change/remove. If not provided, model attributes will be converted to view element\n* attributes on a one-to-one basis.\n*\n* *Note:** The provided attribute creator should always return the same `key` for a given attribute from the model.\n*\n* The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n*\n* ```ts\n* modelDispatcher.on( 'attribute:customAttr:myElem', changeAttribute( ( value, data ) => {\n* \t// Change attribute key from `customAttr` to `class` in the view.\n* \tconst key = 'class';\n* \tlet value = data.attributeNewValue;\n*\n* \t// Force attribute value to 'empty' if the model element is empty.\n* \tif ( data.item.childCount === 0 ) {\n* \t\tvalue = 'empty';\n* \t}\n*\n* \t// Return the key-value pair.\n* \treturn { key, value };\n* } ) );\n* ```\n*\n* @param attributeCreator Function returning an object with two properties: `key` and `value`, which\n* represent the attribute key and attribute value to be set on a {@link module:engine/view/element~ViewElement view element}.\n* The function is passed the model attribute value as the first parameter and additional data about the change as the second parameter.\n* @returns Set/change attribute converter.\n*/\nfunction changeAttribute(attributeCreator) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\t\tconst oldAttribute = attributeCreator(data.attributeOldValue, conversionApi, data);\n\t\tconst newAttribute = attributeCreator(data.attributeNewValue, conversionApi, data);\n\t\tif (!oldAttribute && !newAttribute) return;\n\t\tconversionApi.consumable.consume(data.item, evt.name);\n\t\tconst viewElement = conversionApi.mapper.toViewElement(data.item);\n\t\tconst viewWriter = conversionApi.writer;\n\t\tif (!viewElement)\n /**\n\t\t* This error occurs when a {@link module:engine/model/textproxy~ModelTextProxy text node's} attribute is to be downcasted\n\t\t* by an {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `Attribute to Attribute converter`}.\n\t\t* In most cases it is caused by converters misconfiguration when only \"generic\" converter is defined:\n\t\t*\n\t\t* ```ts\n\t\t* editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t\t* \tmodel: 'attribute-name',\n\t\t* \tview: 'attribute-name'\n\t\t* } ) );\n\t\t* ```\n\t\t*\n\t\t* and given attribute is used on text node, for example:\n\t\t*\n\t\t* ```ts\n\t\t* model.change( writer => {\n\t\t* \twriter.insertText( 'Foo', { 'attribute-name': 'bar' }, parent, 0 );\n\t\t* } );\n\t\t* ```\n\t\t*\n\t\t* In such cases, to convert the same attribute for both {@link module:engine/model/element~ModelElement}\n\t\t* and {@link module:engine/model/textproxy~ModelTextProxy `Text`} nodes, text specific\n\t\t* {@link module:engine/conversion/conversion~Conversion#attributeToElement `Attribute to Element converter`}\n\t\t* with higher {@link module:utils/priorities~PriorityString priority} must also be defined:\n\t\t*\n\t\t* ```ts\n\t\t* editor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t* \tmodel: {\n\t\t* \t\tkey: 'attribute-name',\n\t\t* \t\tname: '$text'\n\t\t* \t},\n\t\t* \tview: ( value, { writer } ) => {\n\t\t* \t\treturn writer.createAttributeElement( 'span', { 'attribute-name': value } );\n\t\t* \t},\n\t\t* \tconverterPriority: 'high'\n\t\t* } ) );\n\t\t* ```\n\t\t*\n\t\t* @error conversion-attribute-to-attribute-on-text\n\t\t* @param {object} data The conversion data.\n\t\t*/\n\t\tthrow new CKEditorError(\"conversion-attribute-to-attribute-on-text\", conversionApi.dispatcher, data);\n\t\tif (data.attributeOldValue !== null && oldAttribute) {\n\t\t\tlet value = oldAttribute.value;\n\t\t\tif (oldAttribute.key == \"style\") {\n\t\t\t\tif (typeof oldAttribute.value == \"string\") value = new StylesMap(viewWriter.document.stylesProcessor).setTo(oldAttribute.value).getStylesEntries().map(([key]) => key);\n\t\t\t\telse value = Object.keys(oldAttribute.value);\n\t\t\t}\n\t\t\tviewWriter.removeAttribute(oldAttribute.key, value, viewElement);\n\t\t}\n\t\tif (data.attributeNewValue !== null && newAttribute) {\n\t\t\tlet value = newAttribute.value;\n\t\t\tif (newAttribute.key == \"style\" && typeof newAttribute.value == \"string\") value = Object.fromEntries(new StylesMap(viewWriter.document.stylesProcessor).setTo(newAttribute.value).getStylesEntries());\n\t\t\tviewWriter.setAttribute(newAttribute.key, value, false, viewElement);\n\t\t}\n\t};\n}\n/**\n* Function factory that creates a converter which converts the text inside marker's range. The converter wraps the text with\n* {@link module:engine/view/attributeelement~ViewAttributeElement} created from the provided descriptor.\n* See {link module:engine/conversion/downcasthelpers~createViewElementFromDowncastHighlightDescriptor}.\n*\n* It can also be used to convert the selection that is inside a marker. In that case, an empty attribute element will be\n* created and the selection will be put inside it.\n*\n* If the highlight descriptor does not provide the `priority` property, `10` will be used.\n*\n* If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n*\n* This converter binds the created {@link module:engine/view/attributeelement~ViewAttributeElement attribute elemens} with the marker name\n* using the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n*/\nfunction highlightText(highlightDescriptor) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!data.item) return;\n\t\tif (!(data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection) && !data.item.is(\"$textProxy\")) return;\n\t\tconst descriptor = prepareDescriptor(highlightDescriptor, data, conversionApi);\n\t\tif (!descriptor) return;\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewElement = createViewElementFromDowncastHighlightDescriptor(viewWriter, descriptor);\n\t\tconst viewSelection = viewWriter.document.selection;\n\t\tif (data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection) viewWriter.wrap(viewSelection.getFirstRange(), viewElement);\n\t\telse {\n\t\t\tconst viewRange = conversionApi.mapper.toViewRange(data.range);\n\t\t\tconst rangeAfterWrap = viewWriter.wrap(viewRange, viewElement);\n\t\t\tfor (const element of rangeAfterWrap.getItems()) if (element.is(\"attributeElement\") && element.isSimilar(viewElement)) {\n\t\t\t\tconversionApi.mapper.bindElementToMarker(element, data.markerName);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* Converter function factory. It creates a function which applies the marker's highlight to an element inside the marker's range.\n*\n* The converter checks if an element has the `addHighlight` function stored as a\n* {@link module:engine/view/element~ViewElement#_setCustomProperty custom property} and, if so, uses it to apply the highlight.\n* In such case the converter will consume all element's children, assuming that they were handled by the element itself.\n*\n* When the `addHighlight` custom property is not present, the element is not converted in any special way.\n* This means that converters will proceed to convert the element's child nodes.\n*\n* If the highlight descriptor does not provide the `priority` property, `10` will be used.\n*\n* If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n*\n* This converter binds altered {@link module:engine/view/containerelement~ViewContainerElement container elements}\n* with the marker name using the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n*/\nfunction highlightElement(highlightDescriptor) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!data.item) return;\n\t\tif (!(data.item instanceof ModelElement)) return;\n\t\tconst descriptor = prepareDescriptor(highlightDescriptor, data, conversionApi);\n\t\tif (!descriptor) return;\n\t\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\t\tconst viewElement = conversionApi.mapper.toViewElement(data.item);\n\t\tif (viewElement && viewElement.getCustomProperty(\"addHighlight\")) {\n\t\t\tconversionApi.consumable.consume(data.item, evt.name);\n\t\t\tfor (const value of ModelRange._createIn(data.item)) conversionApi.consumable.consume(value.item, evt.name);\n\t\t\tviewElement.getCustomProperty(\"addHighlight\")(viewElement, descriptor, conversionApi.writer);\n\t\t\tconversionApi.mapper.bindElementToMarker(viewElement, data.markerName);\n\t\t}\n\t};\n}\n/**\n* Function factory that creates a converter which converts the removing model marker to the view.\n*\n* Both text nodes and elements are handled by this converter but they are handled a bit differently.\n*\n* Text nodes are unwrapped using the {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} created from the\n* provided highlight descriptor. See {link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor}.\n*\n* For elements, the converter checks if an element has the `removeHighlight` function stored as a\n* {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}. If so, it uses it to remove the highlight.\n* In such case, the children of that element will not be converted.\n*\n* When `removeHighlight` is not present, the element is not converted in any special way.\n* The converter will proceed to convert the element's child nodes instead.\n*\n* If the highlight descriptor does not provide the `priority` property, `10` will be used.\n*\n* If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n*\n* This converter unbinds elements from the marker name.\n*/\nfunction removeHighlight(highlightDescriptor) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (data.markerRange.isCollapsed) return;\n\t\tconst descriptor = prepareDescriptor(highlightDescriptor, data, conversionApi);\n\t\tif (!descriptor) return;\n\t\tconst viewHighlightElement = createViewElementFromDowncastHighlightDescriptor(conversionApi.writer, descriptor);\n\t\tconst elements = conversionApi.mapper.markerNameToElements(data.markerName);\n\t\tif (!elements) return;\n\t\tfor (const element of elements) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName(element, data.markerName);\n\t\t\tif (element.is(\"attributeElement\")) conversionApi.writer.unwrap(conversionApi.writer.createRangeOn(element), viewHighlightElement);\n\t\t\telse element.getCustomProperty(\"removeHighlight\")(element, descriptor.id, conversionApi.writer);\n\t\t}\n\t\tconversionApi.writer.clearClonedElementsGroup(data.markerName);\n\t\tevt.stop();\n\t};\n}\n/**\n* Model element to view element conversion helper.\n*\n* See {@link ~DowncastHelpers#elementToElement `.elementToElement()` downcast helper} for examples and config params description.\n*\n* @param config Conversion configuration.\n* @param config.model The description or a name of the model element to convert.\n* @param config.model.attributes List of attributes triggering element reconversion.\n* @param config.model.children Should reconvert element if the list of model child nodes changed.\n* @returns Conversion helper.\n*/\nfunction downcastElementToElement(config) {\n\tconst model = normalizeModelElementConfig(config.model);\n\tconst view = normalizeToElementConfig(config.view, \"container\");\n\tif (model.attributes.length) model.children = true;\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`insert:${model.name}`, insertElement(view, createConsumer(model)), { priority: config.converterPriority || \"normal\" });\n\t\tif (model.children || model.attributes.length) dispatcher.on(\"reduceChanges\", createChangeReducer(model), { priority: \"low\" });\n\t};\n}\n/**\n* Model element to view structure conversion helper.\n*\n* See {@link ~DowncastHelpers#elementToStructure `.elementToStructure()` downcast helper} for examples and config params description.\n*\n* @param config Conversion configuration.\n* @returns Conversion helper.\n*/\nfunction downcastElementToStructure(config) {\n\tconst model = normalizeModelElementConfig(config.model);\n\tconst view = normalizeToElementConfig(config.view, \"container\");\n\tmodel.children = true;\n\treturn (dispatcher) => {\n\t\tif (dispatcher._conversionApi.schema.checkChild(model.name, \"$text\"))\n /**\n\t\t* This error occurs when a {@link module:engine/model/element~ModelElement model element} is downcasted\n\t\t* via {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure} helper but the element was\n\t\t* allowed to host `$text` by the {@link module:engine/model/schema~ModelSchema model schema}.\n\t\t*\n\t\t* For instance, this may be the result of `myElement` allowing the content of\n\t\t* {@glink framework/deep-dive/schema#generic-items `$block`} in its schema definition:\n\t\t*\n\t\t* ```ts\n\t\t* // Element definition in schema.\n\t\t* schema.register( 'myElement', {\n\t\t* \tallowContentOf: '$block',\n\t\t*\n\t\t* \t// ...\n\t\t* } );\n\t\t*\n\t\t* // ...\n\t\t*\n\t\t* // Conversion of myElement with the use of elementToStructure().\n\t\t* editor.conversion.for( 'downcast' ).elementToStructure( {\n\t\t* \tmodel: 'myElement',\n\t\t* \tview: ( modelElement, { writer } ) => {\n\t\t* \t\t// ...\n\t\t* \t}\n\t\t* } );\n\t\t* ```\n\t\t*\n\t\t* In such case, {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`} helper\n\t\t* can be used instead to get around this problem:\n\t\t*\n\t\t* ```ts\n\t\t* editor.conversion.for( 'downcast' ).elementToElement( {\n\t\t* \tmodel: 'myElement',\n\t\t* \tview: ( modelElement, { writer } ) => {\n\t\t* \t\t// ...\n\t\t* \t}\n\t\t* } );\n\t\t* ```\n\t\t*\n\t\t* @error conversion-element-to-structure-disallowed-text\n\t\t* @param {string} elementName The name of the element the structure is to be created for.\n\t\t*/\n\t\tthrow new CKEditorError(\"conversion-element-to-structure-disallowed-text\", dispatcher, { elementName: model.name });\n\t\tdispatcher.on(`insert:${model.name}`, insertStructure(view, createConsumer(model)), { priority: config.converterPriority || \"normal\" });\n\t\tdispatcher.on(\"reduceChanges\", createChangeReducer(model), { priority: \"low\" });\n\t};\n}\n/**\n* Model attribute to view element conversion helper.\n*\n* See {@link ~DowncastHelpers#attributeToElement `.attributeToElement()` downcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n* of `String`s with possible values if the model attribute is an enumerable.\n* @param config.view A view element definition or a function that takes the model attribute value and\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter view downcast writer} as parameters and returns a view attribute element.\n* If `config.model.values` is given, `config.view` should be an object assigning values from `config.model.values` to view element\n* definitions or functions.\n* @param config.converterPriority Converter priority.\n* @returns Conversion helper.\n*/\nfunction downcastAttributeToElement(config) {\n\tconfig = cloneDeep(config);\n\tlet model = config.model;\n\tif (typeof model == \"string\") model = { key: model };\n\tlet eventName = `attribute:${model.key}`;\n\tif (model.name) eventName += \":\" + model.name;\n\tif (model.values) for (const modelValue of model.values) config.view[modelValue] = normalizeToElementConfig(config.view[modelValue], \"attribute\");\n\telse config.view = normalizeToElementConfig(config.view, \"attribute\");\n\tconst elementCreator = getFromAttributeCreator(config);\n\treturn (dispatcher) => {\n\t\tdispatcher.on(eventName, wrap(elementCreator), { priority: config.converterPriority || \"normal\" });\n\t};\n}\n/**\n* Model attribute to view attribute conversion helper.\n*\n* See {@link ~DowncastHelpers#attributeToAttribute `.attributeToAttribute()` downcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n* the attribute key, possible values and, optionally, an element name to convert from.\n* @param config.view A view attribute key, or a `{ key, value }` object or a function that takes the model attribute value and returns\n* a `{ key, value }` object.\n* If `key` is `'class'`, `value` can be a `String` or an array of `String`s. If `key` is `'style'`, `value` is an object with\n* key-value pairs. In other cases, `value` is a `String`.\n* If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n* `{ key, value }` objects or a functions.\n* @param config.converterPriority Converter priority.\n* @returns Conversion helper.\n*/\nfunction downcastAttributeToAttribute(config) {\n\tconfig = cloneDeep(config);\n\tlet model = config.model;\n\tif (typeof model == \"string\") model = { key: model };\n\tlet eventName = `attribute:${model.key}`;\n\tif (model.name) eventName += \":\" + model.name;\n\tif (model.values) for (const modelValue of model.values) config.view[modelValue] = normalizeToAttributeConfig(config.view[modelValue]);\n\telse config.view = normalizeToAttributeConfig(config.view);\n\tconst elementCreator = getFromAttributeCreator(config);\n\treturn (dispatcher) => {\n\t\tdispatcher.on(eventName, changeAttribute(elementCreator), { priority: config.converterPriority || \"normal\" });\n\t};\n}\n/**\n* Model marker to view element conversion helper.\n*\n* See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.model The name of the model marker (or model marker group) to convert.\n* @param config.view A view element definition or a function that takes the model marker data as a parameter and returns a view UI element.\n* @param config.converterPriority Converter priority.\n* @returns Conversion helper.\n*/\nfunction downcastMarkerToElement(config) {\n\tconst view = normalizeToElementConfig(config.view, \"ui\");\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`addMarker:${config.model}`, insertUIElement(view), { priority: config.converterPriority || \"normal\" });\n\t\tdispatcher.on(`removeMarker:${config.model}`, removeUIElement(), { priority: config.converterPriority || \"normal\" });\n\t};\n}\n/**\n* Model marker to view data conversion helper.\n*\n* See {@link ~DowncastHelpers#markerToData `markerToData()` downcast helper} to learn more.\n*\n* @returns Conversion helper.\n*/\nfunction downcastMarkerToData(config) {\n\tconfig = cloneDeep(config);\n\tconst group = config.model;\n\tlet view = config.view;\n\tif (!view) view = (markerName) => ({\n\t\tgroup,\n\t\tname: markerName.substr(config.model.length + 1)\n\t});\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`addMarker:${group}`, insertMarkerData(view), { priority: config.converterPriority || \"normal\" });\n\t\tdispatcher.on(`removeMarker:${group}`, removeMarkerData(view), { priority: config.converterPriority || \"normal\" });\n\t};\n}\n/**\n* Model marker to highlight conversion helper.\n*\n* See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.model The name of the model marker (or model marker group) to convert.\n* @param config.view A highlight descriptor that will be used for highlighting or a function that takes\n* the model marker data as a parameter and returns a highlight descriptor.\n* @param config.converterPriority Converter priority.\n* @returns Conversion helper.\n*/\nfunction downcastMarkerToHighlight(config) {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`addMarker:${config.model}`, highlightText(config.view), { priority: config.converterPriority || \"normal\" });\n\t\tdispatcher.on(`addMarker:${config.model}`, highlightElement(config.view), { priority: config.converterPriority || \"normal\" });\n\t\tdispatcher.on(`removeMarker:${config.model}`, removeHighlight(config.view), { priority: config.converterPriority || \"normal\" });\n\t};\n}\n/**\n* Takes `config.model`, and converts it to an object with normalized structure.\n*\n* @param model Model configuration or element name.\n*/\nfunction normalizeModelElementConfig(model) {\n\tif (typeof model == \"string\") model = { name: model };\n\treturn {\n\t\tname: model.name,\n\t\tattributes: model.attributes ? toArray(model.attributes) : [],\n\t\tchildren: !!model.children\n\t};\n}\n/**\n* Takes `config.view`, and if it is an {@link module:engine/view/elementdefinition~ViewElementDefinition}, converts it\n* to a function (because lower level converters accept only element creator functions).\n*\n* @param view View configuration.\n* @param viewElementType View element type to create.\n* @returns Element creator function to use in lower level converters.\n*/\nfunction normalizeToElementConfig(view, viewElementType) {\n\tif (typeof view == \"function\") return view;\n\treturn ((modelData, conversionApi) => createViewElementFromDefinition(view, conversionApi, viewElementType));\n}\n/**\n* Creates a view element instance from the provided {@link module:engine/view/elementdefinition~ViewElementDefinition} and class.\n*/\nfunction createViewElementFromDefinition(viewElementDefinition, conversionApi, viewElementType) {\n\tif (typeof viewElementDefinition == \"string\") viewElementDefinition = { name: viewElementDefinition };\n\tlet element;\n\tconst viewWriter = conversionApi.writer;\n\tconst attributes = Object.assign({}, viewElementDefinition.attributes);\n\tif (viewElementType == \"container\") element = viewWriter.createContainerElement(viewElementDefinition.name, attributes);\n\telse if (viewElementType == \"attribute\") {\n\t\tconst options = { priority: viewElementDefinition.priority || ViewAttributeElement.DEFAULT_PRIORITY };\n\t\telement = viewWriter.createAttributeElement(viewElementDefinition.name, attributes, options);\n\t} else element = viewWriter.createUIElement(viewElementDefinition.name, attributes);\n\tif (viewElementDefinition.styles) {\n\t\tconst keys = Object.keys(viewElementDefinition.styles);\n\t\tfor (const key of keys) viewWriter.setStyle(key, viewElementDefinition.styles[key], element);\n\t}\n\tif (viewElementDefinition.classes) {\n\t\tconst classes = viewElementDefinition.classes;\n\t\tif (typeof classes == \"string\") viewWriter.addClass(classes, element);\n\t\telse for (const className of classes) viewWriter.addClass(className, element);\n\t}\n\treturn element;\n}\nfunction getFromAttributeCreator(config) {\n\tif (config.model.values) return ((modelAttributeValue, conversionApi, data) => {\n\t\tconst view = config.view[modelAttributeValue];\n\t\tif (view) return view(modelAttributeValue, conversionApi, data);\n\t\treturn null;\n\t});\n\telse return config.view;\n}\n/**\n* Takes the configuration, adds default parameters if they do not exist and normalizes other parameters to be used in downcast converters\n* for generating a view attribute.\n*\n* @param view View configuration.\n*/\nfunction normalizeToAttributeConfig(view) {\n\tif (typeof view == \"string\") return (modelAttributeValue) => ({\n\t\tkey: view,\n\t\tvalue: modelAttributeValue\n\t});\n\telse if (typeof view == \"object\") {\n\t\tif (view.value) return () => view;\n\t\telse return (modelAttributeValue) => ({\n\t\t\tkey: view.key,\n\t\t\tvalue: modelAttributeValue\n\t\t});\n\t} else return view;\n}\n/**\n* Helper function for `highlight`. Prepares the actual descriptor object using value passed to the converter.\n*/\nfunction prepareDescriptor(highlightDescriptor, data, conversionApi) {\n\tconst descriptor = typeof highlightDescriptor == \"function\" ? highlightDescriptor(data, conversionApi) : { ...highlightDescriptor };\n\tif (!descriptor) return null;\n\tif (!descriptor.priority) descriptor.priority = 10;\n\tif (!descriptor.id) descriptor.id = data.markerName;\n\treturn descriptor;\n}\n/**\n* Creates a function that checks a single differ diff item whether it should trigger reconversion.\n*\n* @param model A normalized `config.model` converter configuration.\n* @param model.name The name of element.\n* @param model.attributes The list of attribute names that should trigger reconversion.\n* @param model.children Whether the child list change should trigger reconversion.\n*/\nfunction createChangeReducerCallback(model) {\n\treturn (node, change) => {\n\t\tif (!node.is(\"element\", model.name)) return false;\n\t\tif (change.type == \"attribute\") {\n\t\t\tif (model.attributes.includes(change.attributeKey)) return true;\n\t\t} else if (model.children) return true;\n\t\treturn false;\n\t};\n}\n/**\n* Creates a `reduceChanges` event handler for reconversion.\n*\n* @param model A normalized `config.model` converter configuration.\n* @param model.name The name of element.\n* @param model.attributes The list of attribute names that should trigger reconversion.\n* @param model.children Whether the child list change should trigger reconversion.\n*/\nfunction createChangeReducer(model) {\n\tconst shouldReplace = createChangeReducerCallback(model);\n\treturn (evt, data) => {\n\t\tconst reducedChanges = [];\n\t\tif (!data.reconvertedElements) data.reconvertedElements = /* @__PURE__ */ new Set();\n\t\tfor (const change of data.changes) {\n\t\t\tconst node = change.type == \"attribute\" ? change.range.start.nodeAfter : change.position.parent;\n\t\t\tif (!node || !shouldReplace(node, change) || change.type == \"reinsert\") {\n\t\t\t\treducedChanges.push(change);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (change.type == \"insert\" && change.action == \"rename\") data.refreshedItems.add(change.position.nodeAfter);\n\t\t\tif (!data.reconvertedElements.has(node)) {\n\t\t\t\tdata.reconvertedElements.add(node);\n\t\t\t\tconst position = ModelPosition._createBefore(node);\n\t\t\t\tlet changeIndex = reducedChanges.length;\n\t\t\t\tfor (let i = reducedChanges.length - 1; i >= 0; i--) {\n\t\t\t\t\tconst change = reducedChanges[i];\n\t\t\t\t\tconst positionRelation = (change.type == \"attribute\" ? change.range.start : change.position).compareWith(position);\n\t\t\t\t\tif (positionRelation == \"before\" || change.type == \"remove\" && positionRelation == \"same\") break;\n\t\t\t\t\tchangeIndex = i;\n\t\t\t\t}\n\t\t\t\treducedChanges.splice(changeIndex, 0, {\n\t\t\t\t\ttype: \"reinsert\",\n\t\t\t\t\tname: node.name,\n\t\t\t\t\tposition,\n\t\t\t\t\tlength: 1\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tdata.changes = reducedChanges;\n\t};\n}\n/**\n* Creates a function that checks if an element and its watched attributes can be consumed and consumes them.\n*\n* @param model A normalized `config.model` converter configuration.\n* @param model.name The name of element.\n* @param model.attributes The list of attribute names that should trigger reconversion.\n* @param model.children Whether the child list change should trigger reconversion.\n*/\nfunction createConsumer(model) {\n\treturn (node, consumable, options = {}) => {\n\t\tconst events = [\"insert\"];\n\t\tfor (const attributeName of model.attributes) if (node.hasAttribute(attributeName)) events.push(`attribute:${attributeName}`);\n\t\tif (!events.every((event) => consumable.test(node, event))) return false;\n\t\tif (!options.preflight) events.forEach((event) => consumable.consume(node, event));\n\t\treturn true;\n\t};\n}\n/**\n* Creates a function that creates view slots.\n*\n* @returns Function exposed by the writer as `createSlot()`.\n*/\nfunction createSlotFactory(element, slotsMap, conversionApi) {\n\treturn (writer, modeOrFilter) => {\n\t\tconst slot = writer.createContainerElement(\"$slot\");\n\t\tlet children;\n\t\tif (modeOrFilter === \"children\") children = Array.from(element.getChildren());\n\t\telse if (typeof modeOrFilter == \"function\") children = Array.from(element.getChildren()).filter((element) => modeOrFilter(element));\n\t\telse\n /**\n\t\t* Unknown slot mode was provided to `writer.createSlot()` in the downcast converter.\n\t\t*\n\t\t* @error conversion-slot-mode-unknown\n\t\t* @param {never} modeOrFilter The specified mode or filter.\n\t\t*/\n\t\tthrow new CKEditorError(\"conversion-slot-mode-unknown\", conversionApi.dispatcher, { modeOrFilter });\n\t\tslotsMap.set(slot, children);\n\t\treturn slot;\n\t};\n}\n/**\n* Checks if all children are covered by slots and there is no child that landed in multiple slots.\n*/\nfunction validateSlotsChildren(element, slotsMap, conversionApi) {\n\tconst childrenInSlots = Array.from(slotsMap.values()).flat();\n\tconst uniqueChildrenInSlots = new Set(childrenInSlots);\n\tif (uniqueChildrenInSlots.size != childrenInSlots.length)\n /**\n\t* Filters provided to `writer.createSlot()` overlap (at least two filters accept the same child element).\n\t*\n\t* @error conversion-slot-filter-overlap\n\t* @param {module:engine/model/element~ModelElement} element The element of which children would not be properly\n\t* allocated to multiple slots.\n\t*/\n\tthrow new CKEditorError(\"conversion-slot-filter-overlap\", conversionApi.dispatcher, { element });\n\tif (uniqueChildrenInSlots.size != element.childCount)\n /**\n\t* Filters provided to `writer.createSlot()` are incomplete and exclude at least one children element (one of\n\t* the children elements would not be assigned to any of the slots).\n\t*\n\t* @error conversion-slot-filter-incomplete\n\t* @param {module:engine/model/element~ModelElement} element The element of which children would not be properly\n\t* allocated to multiple slots.\n\t*/\n\tthrow new CKEditorError(\"conversion-slot-filter-incomplete\", conversionApi.dispatcher, { element });\n}\n/**\n* Fill slots with appropriate view elements.\n*/\nfunction fillSlots(viewElement, slotsMap, conversionApi, options) {\n\tconversionApi.mapper.on(\"modelToViewPosition\", toViewPositionMapping, { priority: \"highest\" });\n\tlet currentSlot = null;\n\tlet currentSlotNodes = null;\n\tfor ([currentSlot, currentSlotNodes] of slotsMap) {\n\t\treinsertOrConvertNodes(viewElement, currentSlotNodes, conversionApi, options);\n\t\tconversionApi.writer.setCustomProperty(\"$structureSlotParent\", true, currentSlot.parent);\n\t\tconversionApi.writer.move(conversionApi.writer.createRangeIn(currentSlot), conversionApi.writer.createPositionBefore(currentSlot));\n\t\tconversionApi.writer.remove(currentSlot);\n\t}\n\tconversionApi.mapper.off(\"modelToViewPosition\", toViewPositionMapping);\n\tfunction toViewPositionMapping(evt, data) {\n\t\tconst element = data.modelPosition.nodeAfter;\n\t\tconst index = currentSlotNodes.indexOf(element);\n\t\tif (index < 0) return;\n\t\tdata.viewPosition = data.mapper.findPositionIn(currentSlot, index);\n\t}\n}\n/**\n* Inserts view representation of `nodes` into the `viewElement` either by bringing back just removed view nodes\n* or by triggering conversion for them.\n*/\nfunction reinsertOrConvertNodes(viewElement, modelNodes, conversionApi, options) {\n\tfor (const modelChildNode of modelNodes) if (!reinsertNode(viewElement.root, modelChildNode, conversionApi, options)) conversionApi.convertItem(modelChildNode);\n}\n/**\n* Checks if the view for the given model element could be reused and reinserts it to the view.\n*\n* @returns `false` if view element can't be reused.\n*/\nfunction reinsertNode(viewRoot, modelNode, conversionApi, options) {\n\tconst { writer, mapper } = conversionApi;\n\tif (!options.reconversion) return false;\n\tconst viewChildNode = mapper.toViewElement(modelNode);\n\tif (!viewChildNode || viewChildNode.root == viewRoot) return false;\n\tif (!conversionApi.canReuseView(viewChildNode)) return false;\n\twriter.move(writer.createRangeOn(viewChildNode), mapper.toViewPosition(ModelPosition._createBefore(modelNode)));\n\treturn true;\n}\n/**\n* The default consumer for insert events.\n*\n* @param item Model item.\n* @param consumable The model consumable.\n* @param options.preflight Whether should consume or just check if can be consumed.\n*/\nfunction defaultConsumer(item, consumable, { preflight } = {}) {\n\tif (preflight) return consumable.test(item, \"insert\");\n\telse return consumable.consume(item, \"insert\");\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* Fixes all empty roots.\n*\n* @internal\n* @param writer The model writer.\n* @returns `true` if any change has been applied, `false` otherwise.\n*/\nfunction autoParagraphEmptyRoots(writer) {\n\tconst { schema, document } = writer.model;\n\tfor (const root of document.getRoots()) if (root.isEmpty && !schema.checkChild(root, \"$text\")) {\n\t\tif (schema.checkChild(root, \"paragraph\")) {\n\t\t\twriter.insertElement(\"paragraph\", root);\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n* Checks if the given node wrapped with a paragraph would be accepted by the schema in the given position.\n*\n* @internal\n* @param position The position at which to check.\n* @param nodeOrType The child node or child type to check.\n* @param schema A schema instance used for element validation.\n*/\nfunction isParagraphable(position, nodeOrType, schema) {\n\tconst context = schema.createContext(position);\n\tif (!schema.checkChild(context, \"paragraph\")) return false;\n\tif (!schema.checkChild(context.push(\"paragraph\"), nodeOrType)) return false;\n\treturn true;\n}\n/**\n* Inserts a new paragraph at the given position and returns a position inside that paragraph.\n*\n* @internal\n* @param position The position where a paragraph should be inserted.\n* @param writer The model writer.\n* @returns  Position inside the created paragraph.\n*/\nfunction wrapInParagraph(position, writer) {\n\tconst paragraph = writer.createElement(\"paragraph\");\n\twriter.insert(paragraph, position);\n\treturn writer.createPositionAt(paragraph, 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* Contains the {@link module:engine/view/view view} to {@link module:engine/model/model model} converters for\n* {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}.\n*\n* @module engine/conversion/upcasthelpers\n*/\n/**\n* Upcast conversion helper functions.\n*\n* Learn more about {@glink framework/deep-dive/conversion/upcast upcast helpers}.\n*\n* @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n*/\nvar UpcastHelpers = class extends ConversionHelpers {\n\t/**\n\t* View element to model element conversion helper.\n\t*\n\t* This conversion results in creating a model element. For example,\n\t* view `<p>Foo</p>` becomes `<paragraph>Foo</paragraph>` in the model.\n\t*\n\t* Keep in mind that the element will be inserted only if it is allowed\n\t* by {@link module:engine/model/schema~ModelSchema schema} configuration.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'upcast' ).elementToElement( {\n\t* \tview: 'p',\n\t* \tmodel: 'paragraph'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToElement( {\n\t* \tview: 'p',\n\t* \tmodel: 'paragraph',\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToElement( {\n\t* \tview: {\n\t* \t\tname: 'p',\n\t* \t\tclasses: 'fancy'\n\t* \t},\n\t* \tmodel: 'fancyParagraph'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToElement( {\n\t* \tview: {\n\t* \t\tname: 'p',\n\t* \t\tclasses: 'heading'\n\t* \t},\n\t* \tmodel: ( viewElement, conversionApi ) => {\n\t* \t\tconst modelWriter = conversionApi.writer;\n\t*\n\t* \t\treturn modelWriter.createElement( 'heading', { level: viewElement.getAttribute( 'data-level' ) } );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.view Pattern matching all view elements which should be converted. If not set, the converter\n\t* will fire for every view element.\n\t* @param config.model Name of the model element, a model element instance or a function that takes a view element\n\t* and {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API}\n\t* and returns a model element. The model element will be inserted in the model.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\telementToElement(config) {\n\t\treturn this.add(upcastElementToElement(config));\n\t}\n\t/**\n\t* View element to model attribute conversion helper.\n\t*\n\t* This conversion results in setting an attribute on a model node. For example, view `<strong>Foo</strong>` becomes\n\t* `Foo` {@link module:engine/model/text~ModelText model text node} with `bold` attribute set to `true`.\n\t*\n\t* This helper is meant to set a model attribute on all the elements that are inside the converted element:\n\t*\n\t* ```\n\t* <strong>Foo</strong>   -->   <strong><p>Foo</p></strong>   -->   <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t* ```\n\t*\n\t* Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t* Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text. See\n\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute} for comparison.\n\t*\n\t* Keep in mind that the attribute will be set only if it is allowed by\n\t* {@link module:engine/model/schema~ModelSchema schema} configuration.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t* \tview: 'strong',\n\t* \tmodel: 'bold'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t* \tview: 'strong',\n\t* \tmodel: 'bold',\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t* \tview: {\n\t* \t\tname: 'span',\n\t* \t\tclasses: 'bold'\n\t* \t},\n\t* \tmodel: 'bold'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t* \tview: {\n\t* \t\tname: 'span',\n\t* \t\tclasses: [ 'styled', 'styled-dark' ]\n\t* \t},\n\t* \tmodel: {\n\t* \t\tkey: 'styled',\n\t* \t\tvalue: 'dark'\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t* \tview: {\n\t* \t\tname: 'span',\n\t* \t\tstyles: {\n\t* \t\t\t'font-size': /[\\s\\S]+/\n\t* \t\t}\n\t* \t},\n\t* \tmodel: {\n\t* \t\tkey: 'fontSize',\n\t* \t\tvalue: ( viewElement, conversionApi ) => {\n\t* \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t* \t\t\tconst value = fontSize.substr( 0, fontSize.length - 2 );\n\t*\n\t* \t\t\tif ( value <= 10 ) {\n\t* \t\t\t\treturn 'small';\n\t* \t\t\t} else if ( value > 12 ) {\n\t* \t\t\t\treturn 'big';\n\t* \t\t\t}\n\t*\n\t* \t\t\treturn null;\n\t* \t\t}\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.view Pattern matching all view elements which should be converted.\n\t* @param config.model Model attribute key or an object with `key` and `value` properties, describing\n\t* the model attribute. `value` property may be set as a function that takes a view element and\n\t* {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t* If `String` is given, the model attribute value will be set to `true`.\n\t* @param config.converterPriority Converter priority. Defaults to `low`.\n\t*/\n\telementToAttribute(config) {\n\t\treturn this.add(upcastElementToAttribute(config));\n\t}\n\t/**\n\t* View attribute to model attribute conversion helper.\n\t*\n\t* This conversion results in setting an attribute on a model node. For example, view `<img src=\"foo.jpg\"></img>` becomes\n\t* `<imageBlock source=\"foo.jpg\"></imageBlock>` in the model.\n\t*\n\t* This helper is meant to convert view attributes from view elements which got converted to the model, so the view attribute\n\t* is set only on the corresponding model node:\n\t*\n\t* ```\n\t* <div class=\"dark\"><div>foo</div></div>    -->    <div dark=\"true\"><div>foo</div></div>\n\t* ```\n\t*\n\t* Above, `class=\"dark\"` attribute is added only to the `<div>` elements that has it. This is in contrast to\n\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute} which sets attributes for\n\t* all the children in the model:\n\t*\n\t* ```\n\t* <strong>Foo</strong>   -->   <strong><p>Foo</p></strong>   -->   <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t* ```\n\t*\n\t* Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t* Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text.\n\t*\n\t* Keep in mind that the attribute will be set only if it is allowed by\n\t* {@link module:engine/model/schema~ModelSchema schema} configuration.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: 'src',\n\t* \tmodel: 'source'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: { key: 'src' },\n\t* \tmodel: 'source'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: { key: 'src' },\n\t* \tmodel: 'source',\n\t* \tconverterPriority: 'normal'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: {\n\t* \t\tkey: 'data-style',\n\t* \t\tvalue: /[\\s\\S]+/\n\t* \t},\n\t* \tmodel: 'styled'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: {\n\t* \t\tname: 'img',\n\t* \t\tkey: 'class',\n\t* \t\tvalue: 'styled-dark'\n\t* \t},\n\t* \tmodel: {\n\t* \t\tkey: 'styled',\n\t* \t\tvalue: 'dark'\n\t* \t}\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: {\n\t* \t\tkey: 'class',\n\t* \t\tvalue: /styled-[\\S]+/\n\t* \t},\n\t* \tmodel: {\n\t* \t\tkey: 'styled'\n\t* \t\tvalue: ( viewElement, conversionApi ) => {\n\t* \t\t\tconst regexp = /styled-([\\S]+)/;\n\t* \t\t\tconst match = viewElement.getAttribute( 'class' ).match( regexp );\n\t*\n\t* \t\t\treturn match[ 1 ];\n\t* \t\t}\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* Converting styles works a bit differently as it requires `view.styles` to be an object and by default\n\t* a model attribute will be set to `true` by such a converter. You can set the model attribute to any value by providing the `value`\n\t* callback that returns the desired value.\n\t*\n\t* ```ts\n\t* // Default conversion of font-weight style will result in setting bold attribute to true.\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: {\n\t* \t\tstyles: {\n\t* \t\t\t'font-weight': 'bold'\n\t* \t\t}\n\t* \t},\n\t* \tmodel: 'bold'\n\t* } );\n\t*\n\t* // This converter will pass any style value to the `lineHeight` model attribute.\n\t* editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t* \tview: {\n\t* \t\tstyles: {\n\t* \t\t\t'line-height': /[\\s\\S]+/\n\t* \t\t}\n\t* \t},\n\t* \tmodel: {\n\t* \t\tkey: 'lineHeight',\n\t* \t\tvalue: ( viewElement, conversionApi ) => viewElement.getStyle( 'line-height' )\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.view Specifies which view attribute will be converted. If a `String` is passed,\n\t* attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n\t* specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n\t* property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n\t* a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n\t* @param config.model Model attribute key or an object with `key` and `value` properties, describing\n\t* the model attribute. `value` property may be set as a function that takes a view element and\n\t* {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t* If `String` is given, the model attribute value will be same as view attribute value.\n\t* @param config.converterPriority Converter priority. Defaults to `low`.\n\t*/\n\tattributeToAttribute(config) {\n\t\treturn this.add(upcastAttributeToAttribute(config));\n\t}\n\t/**\n\t* View element to model marker conversion helper.\n\t*\n\t* This conversion results in creating a model marker. For example, if the marker was stored in a view as an element:\n\t* `<p>Fo<span data-marker=\"comment\" data-comment-id=\"7\"></span>o</p><p>B<span data-marker=\"comment\" data-comment-id=\"7\"></span>ar</p>`,\n\t* after the conversion is done, the marker will be available in\n\t* {@link module:engine/model/model~Model#markers model document markers}.\n\t*\n\t* **Note**: When this helper is used in the data upcast in combination with\n\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} in the data downcast,\n\t* then invalid HTML code (e.g. a span between table cells) may be produced by the latter converter.\n\t*\n\t* In most of the cases, the {@link #dataToMarker} should be used instead.\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'upcast' ).elementToMarker( {\n\t* \tview: 'marker-search',\n\t* \tmodel: 'search'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToMarker( {\n\t* \tview: 'marker-search',\n\t* \tmodel: 'search',\n\t* \tconverterPriority: 'high'\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToMarker( {\n\t* \tview: 'marker-search',\n\t* \tmodel: ( viewElement, conversionApi ) => 'comment:' + viewElement.getAttribute( 'data-comment-id' )\n\t* } );\n\t*\n\t* editor.conversion.for( 'upcast' ).elementToMarker( {\n\t* \tview: {\n\t* \t\tname: 'span',\n\t* \t\tattributes: {\n\t* \t\t\t'data-marker': 'search'\n\t* \t\t}\n\t* \t},\n\t* \tmodel: 'search'\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.view Pattern matching all view elements which should be converted.\n\t* @param config.model Name of the model marker, or a function that takes a view element and returns\n\t* a model marker name.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\telementToMarker(config) {\n\t\treturn this.add(upcastElementToMarker(config));\n\t}\n\t/**\n\t* View-to-model marker conversion helper.\n\t*\n\t* Converts view data created by {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`}\n\t* back to a model marker.\n\t*\n\t* This converter looks for specific view elements and view attributes that mark marker boundaries. See\n\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} to learn what view data\n\t* is expected by this converter.\n\t*\n\t* The `config.view` property is equal to the marker group name to convert.\n\t*\n\t* By default, this converter creates markers with the `group:name` name convention (to match the default `markerToData` conversion).\n\t*\n\t* The conversion configuration can take a function that will generate a marker name.\n\t* If such function is set as the `config.model` parameter, it is passed the `name` part from the view element or attribute and it is\n\t* expected to return a string with the marker name.\n\t*\n\t* Basic usage:\n\t*\n\t* ```ts\n\t* // Using the default conversion.\n\t* // In this case, all markers from the `comment` group will be converted.\n\t* // The conversion will look for `<comment-start>` and `<comment-end>` tags and\n\t* // `data-comment-start-before`, `data-comment-start-after`,\n\t* // `data-comment-end-before` and `data-comment-end-after` attributes.\n\t* editor.conversion.for( 'upcast' ).dataToMarker( {\n\t* \tview: 'comment'\n\t* } );\n\t* ```\n\t*\n\t* An example of a model that may be generated by this conversion:\n\t*\n\t* ```\n\t* // View:\n\t* <p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t* <figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t*\n\t* // Model:\n\t* <paragraph>Foo[bar</paragraph>\n\t* <imageBlock src=\"abc.jpg\"></imageBlock>]\n\t* ```\n\t*\n\t* Where `[]` are boundaries of a marker that will receive the `comment:commentId:uid` name.\n\t*\n\t* Other examples of usage:\n\t*\n\t* ```ts\n\t* // Using a custom function which is the same as the default conversion:\n\t* editor.conversion.for( 'upcast' ).dataToMarker( {\n\t* \tview: 'comment',\n\t* \tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t* } );\n\t*\n\t* // Using the converter priority:\n\t* editor.conversion.for( 'upcast' ).dataToMarker( {\n\t* \tview: 'comment',\n\t* \tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t* \tconverterPriority: 'high'\n\t* } );\n\t* ```\n\t*\n\t* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t* to the conversion process.\n\t*\n\t* @param config Conversion configuration.\n\t* @param config.view The marker group name to convert.\n\t* @param config.model A function that takes the `name` part from the view element or attribute and\n\t* {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the marker name.\n\t* @param config.converterPriority Converter priority.\n\t*/\n\tdataToMarker(config) {\n\t\treturn this.add(upcastDataToMarker(config));\n\t}\n};\n/**\n* Function factory, creates a converter that converts\n* {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment}\n* or all children of {@link module:engine/view/element~ViewElement} into\n* {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment}.\n* This is the \"entry-point\" converter for upcast (view to model conversion). This converter starts the conversion of all children\n* of passed view document fragment. Those children {@link module:engine/view/node~ViewNode view nodes} are then\n* handled by other converters.\n*\n* This also a \"default\", last resort converter for all view elements that has not been converted by other converters.\n* When a view element is being converted to the model but it does not have converter specified, that view element\n* will be converted to {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment} and returned.\n*\n* @returns Universal converter for view {@link module:engine/view/documentfragment~ViewDocumentFragment fragments} and\n* {@link module:engine/view/element~ViewElement elements} that returns\n* {@link module:engine/model/documentfragment~ModelDocumentFragment model fragment} with children of converted view item.\n*\n* @internal\n*/\nfunction convertToModelFragment() {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!data.modelRange && conversionApi.consumable.consume(data.viewItem, { name: true })) {\n\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren(data.viewItem, data.modelCursor);\n\t\t\tdata.modelRange = modelRange;\n\t\t\tdata.modelCursor = modelCursor;\n\t\t}\n\t};\n}\n/**\n* Function factory, creates a converter that converts\n* {@link module:engine/view/text~ViewText} to {@link module:engine/model/text~ModelText}.\n*\n* @returns {@link module:engine/view/text~ViewText View text} converter.\n* @internal\n*/\nfunction convertText() {\n\treturn (evt, data, { schema, consumable, writer }) => {\n\t\tlet position = data.modelCursor;\n\t\tif (!consumable.test(data.viewItem)) return;\n\t\tif (!schema.checkChild(position, \"$text\")) {\n\t\t\tif (!isParagraphable(position, \"$text\", schema)) return;\n\t\t\tif (data.viewItem.data.trim().length == 0) return;\n\t\t\tposition = wrapInParagraph(position, writer);\n\t\t}\n\t\tconsumable.consume(data.viewItem);\n\t\tconst text = writer.createText(data.viewItem.data);\n\t\twriter.insert(text, position);\n\t\tdata.modelRange = writer.createRange(position, position.getShiftedBy(text.offsetSize));\n\t\tdata.modelCursor = data.modelRange.end;\n\t};\n}\n/**\n* Function factory, creates a callback function which converts a {@link module:engine/view/selection~ViewSelection\n* view selection} taken from the {@link module:engine/view/document~ViewDocument#event:selectionChange} event\n* and sets in on the {@link module:engine/model/document~ModelDocument#selection model}.\n*\n* **Note**: because there is no view selection change dispatcher nor any other advanced view selection to model\n* conversion mechanism, the callback should be set directly on view document.\n*\n* ```ts\n* view.document.on( 'selectionChange', convertSelectionChange( modelDocument, mapper ) );\n* ```\n*\n* @param model Data model.\n* @param mapper Conversion mapper.\n* @returns {@link module:engine/view/document~ViewDocument#event:selectionChange} callback function.\n* @internal\n*/\nfunction convertSelectionChange(model, mapper) {\n\treturn (evt, data) => {\n\t\tconst viewSelection = data.newSelection;\n\t\tconst ranges = [];\n\t\tfor (const viewRange of viewSelection.getRanges()) ranges.push(mapper.toModelRange(viewRange));\n\t\tconst modelSelection = model.createSelection(ranges, { backward: viewSelection.isBackward });\n\t\tif (!modelSelection.isEqual(model.document.selection)) model.change((writer) => {\n\t\t\twriter.setSelection(modelSelection);\n\t\t});\n\t};\n}\n/**\n* View element to model element conversion helper.\n*\n* See {@link ~UpcastHelpers#elementToElement `.elementToElement()` upcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.view Pattern matching all view elements which should be converted. If not\n* set, the converter will fire for every view element.\n* @param config.model Name of the model element, a model element\n* instance or a function that takes a view element and returns a model element. The model element will be inserted in the model.\n* @param config.converterPriority Converter priority.\n* @returns Conversion helper.\n*/\nfunction upcastElementToElement(config) {\n\tconfig = cloneDeep(config);\n\tconst converter = prepareToElementConverter(config);\n\tconst elementName = getViewElementNameFromConfig(config.view);\n\tconst eventName = elementName ? `element:${elementName}` : \"element\";\n\treturn (dispatcher) => {\n\t\tdispatcher.on(eventName, converter, { priority: config.converterPriority || \"normal\" });\n\t};\n}\n/**\n* View element to model attribute conversion helper.\n*\n* See {@link ~UpcastHelpers#elementToAttribute `.elementToAttribute()` upcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.view Pattern matching all view elements which should be converted.\n* @param config.model Model attribute key or an object with `key` and `value` properties, describing\n* the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n* If `String` is given, the model attribute value will be set to `true`.\n* @param config.converterPriority Converter priority. Defaults to `low`.\n* @returns Conversion helper.\n*/\nfunction upcastElementToAttribute(config) {\n\tconfig = cloneDeep(config);\n\tnormalizeModelAttributeConfig(config);\n\tconst converter = prepareToAttributeConverter(config, false);\n\tconst elementName = getViewElementNameFromConfig(config.view);\n\tconst eventName = elementName ? `element:${elementName}` : \"element\";\n\treturn (dispatcher) => {\n\t\tdispatcher.on(eventName, converter, { priority: config.converterPriority || \"low\" });\n\t};\n}\n/**\n* View attribute to model attribute conversion helper.\n*\n* See {@link ~UpcastHelpers#attributeToAttribute `.attributeToAttribute()` upcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.view Specifies which view attribute will be converted. If a `String` is passed,\n* attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n* specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n* property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n* a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n* @param config.model Model attribute key or an object with `key` and `value` properties, describing\n* the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n* If `String` is given, the model attribute value will be same as view attribute value.\n* @param config.converterPriority Converter priority. Defaults to `low`.\n* @returns Conversion helper.\n*/\nfunction upcastAttributeToAttribute(config) {\n\tconfig = cloneDeep(config);\n\tlet viewKey = null;\n\tif (typeof config.view == \"string\" || config.view.key) viewKey = normalizeViewAttributeKeyValueConfig(config);\n\tnormalizeModelAttributeConfig(config, viewKey);\n\tconst converter = prepareToAttributeConverter(config, true);\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element\", converter, { priority: config.converterPriority || \"low\" });\n\t};\n}\n/**\n* View element to model marker conversion helper.\n*\n* See {@link ~UpcastHelpers#elementToMarker `.elementToMarker()` upcast helper} for examples.\n*\n* @param config Conversion configuration.\n* @param config.view Pattern matching all view elements which should be converted.\n* @param config.model Name of the model marker, or a function that takes a view element and returns\n* a model marker name.\n* @param config.converterPriority Converter priority.\n* @returns Conversion helper.\n*/\nfunction upcastElementToMarker(config) {\n\tconst model = normalizeElementToMarkerModelConfig(config.model);\n\treturn upcastElementToElement({\n\t\t...config,\n\t\tmodel\n\t});\n}\n/**\n* View data to model marker conversion helper.\n*\n* See {@link ~UpcastHelpers#dataToMarker} to learn more.\n*\n* @returns Conversion helper.\n*/\nfunction upcastDataToMarker(config) {\n\tconfig = cloneDeep(config);\n\tif (!config.model) config.model = (name) => {\n\t\treturn name ? config.view + \":\" + name : config.view;\n\t};\n\tconst normalizedConfig = {\n\t\tview: config.view,\n\t\tmodel: config.model\n\t};\n\tconst converterStart = prepareToElementConverter(normalizeDataToMarkerConfig(normalizedConfig, \"start\"));\n\tconst converterEnd = prepareToElementConverter(normalizeDataToMarkerConfig(normalizedConfig, \"end\"));\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`element:${config.view}-start`, converterStart, { priority: config.converterPriority || \"normal\" });\n\t\tdispatcher.on(`element:${config.view}-end`, converterEnd, { priority: config.converterPriority || \"normal\" });\n\t\tconst basePriority = priorities.low;\n\t\tconst maxPriority = priorities.highest;\n\t\tconst priorityFactor = priorities.get(config.converterPriority) / maxPriority;\n\t\tdispatcher.on(\"element\", upcastAttributeToMarker(normalizedConfig), { priority: basePriority + priorityFactor });\n\t};\n}\n/**\n* Function factory, returns a callback function which converts view attributes to a model marker.\n*\n* The converter looks for elements with `data-group-start-before`, `data-group-start-after`, `data-group-end-before`\n* and `data-group-end-after` attributes and inserts `$marker` model elements before/after those elements.\n* `group` part is specified in `config.view`.\n*\n* @returns Marker converter.\n*/\nfunction upcastAttributeToMarker(config) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst attrName = `data-${config.view}`;\n\t\tif (!conversionApi.consumable.test(data.viewItem, { attributes: attrName + \"-end-after\" }) && !conversionApi.consumable.test(data.viewItem, { attributes: attrName + \"-start-after\" }) && !conversionApi.consumable.test(data.viewItem, { attributes: attrName + \"-end-before\" }) && !conversionApi.consumable.test(data.viewItem, { attributes: attrName + \"-start-before\" })) return;\n\t\tif (!data.modelRange) Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n\t\tif (conversionApi.consumable.consume(data.viewItem, { attributes: attrName + \"-end-after\" })) addMarkerElements(data.modelRange.end, data.viewItem.getAttribute(attrName + \"-end-after\").split(\",\"));\n\t\tif (conversionApi.consumable.consume(data.viewItem, { attributes: attrName + \"-start-after\" })) addMarkerElements(data.modelRange.end, data.viewItem.getAttribute(attrName + \"-start-after\").split(\",\"));\n\t\tif (conversionApi.consumable.consume(data.viewItem, { attributes: attrName + \"-end-before\" })) addMarkerElements(data.modelRange.start, data.viewItem.getAttribute(attrName + \"-end-before\").split(\",\"));\n\t\tif (conversionApi.consumable.consume(data.viewItem, { attributes: attrName + \"-start-before\" })) addMarkerElements(data.modelRange.start, data.viewItem.getAttribute(attrName + \"-start-before\").split(\",\"));\n\t\tfunction addMarkerElements(position, markerViewNames) {\n\t\t\tfor (const markerViewName of markerViewNames) {\n\t\t\t\tconst markerName = config.model(markerViewName, conversionApi);\n\t\t\t\tconst element = conversionApi.writer.createElement(\"$marker\", { \"data-name\": markerName });\n\t\t\t\tconversionApi.writer.insert(element, position);\n\t\t\t\tif (data.modelCursor.isEqual(position)) data.modelCursor = data.modelCursor.getShiftedBy(1);\n\t\t\t\telse data.modelCursor = data.modelCursor._getTransformedByInsertion(position, 1);\n\t\t\t\tdata.modelRange = data.modelRange._getTransformedByInsertion(position, 1)[0];\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* Helper function for from-view-element conversion. Checks if `config.view` directly specifies converted view element's name\n* and if so, returns it.\n*\n* @param config Conversion view config.\n* @returns View element name or `null` if name is not directly set.\n*/\nfunction getViewElementNameFromConfig(viewConfig) {\n\tif (typeof viewConfig == \"string\") return viewConfig;\n\tif (typeof viewConfig == \"object\" && typeof viewConfig.name == \"string\") return viewConfig.name;\n\treturn null;\n}\n/**\n* Helper for to-model-element conversion. Takes a config object and returns a proper converter function.\n*\n* @param config Conversion configuration.\n* @returns View to model converter.\n*/\nfunction prepareToElementConverter(config) {\n\tconst matcher = new Matcher(config.view);\n\treturn (evt, data, conversionApi) => {\n\t\tconst matcherResult = matcher.match(data.viewItem);\n\t\tif (!matcherResult) return;\n\t\tconst match = matcherResult.match;\n\t\tmatch.name = true;\n\t\tif (!conversionApi.consumable.test(data.viewItem, match)) return;\n\t\tconst modelElement = getModelElement(config.model, data.viewItem, conversionApi);\n\t\tif (!modelElement) return;\n\t\tif (!conversionApi.safeInsert(modelElement, data.modelCursor)) return;\n\t\tconversionApi.consumable.consume(data.viewItem, match);\n\t\tconversionApi.convertChildren(data.viewItem, modelElement);\n\t\tconversionApi.updateConversionResult(modelElement, data);\n\t};\n}\n/**\n* Helper function for upcasting-to-element converter. Takes the model configuration, the converted view element\n* and a writer instance and returns a model element instance to be inserted in the model.\n*\n* @param model Model conversion configuration.\n* @param input The converted view node.\n* @param conversionApi The upcast conversion API.\n*/\nfunction getModelElement(model, input, conversionApi) {\n\tif (model instanceof Function) return model(input, conversionApi);\n\telse return conversionApi.writer.createElement(model);\n}\n/**\n* Helper function view-attribute-to-model-attribute helper. Normalizes `config.view` which was set as `String` or\n* as an `Object` with `key`, `value` and `name` properties. Normalized `config.view` has is compatible with\n* {@link module:engine/view/matcher~MatcherPattern}.\n*\n* @param config Conversion config.\n* @returns Key of the converted view attribute.\n*/\nfunction normalizeViewAttributeKeyValueConfig(config) {\n\tif (typeof config.view == \"string\") config.view = { key: config.view };\n\tconst key = config.view.key;\n\tconst value = typeof config.view.value == \"undefined\" ? /[\\s\\S]*/ : config.view.value;\n\tlet normalized;\n\tif (key == \"class\" || key == \"style\") normalized = { [key == \"class\" ? \"classes\" : \"styles\"]: value };\n\telse normalized = { attributes: { [key]: value } };\n\tif (config.view.name) normalized.name = config.view.name;\n\tconfig.view = normalized;\n\treturn key;\n}\n/**\n* Helper function that normalizes `config.model` in from-model-attribute conversion. `config.model` can be set\n* as a `String`, an `Object` with only `key` property or an `Object` with `key` and `value` properties. Normalized\n* `config.model` is an `Object` with `key` and `value` properties.\n*\n* @param config Conversion config.\n* @param viewAttributeKeyToCopy Key of the converted view attribute. If it is set, model attribute value\n* will be equal to view attribute value.\n*/\nfunction normalizeModelAttributeConfig(config, viewAttributeKeyToCopy = null) {\n\tconst defaultModelValue = viewAttributeKeyToCopy === null ? true : (viewElement) => viewElement.getAttribute(viewAttributeKeyToCopy);\n\tconfig.model = {\n\t\tkey: typeof config.model != \"object\" ? config.model : config.model.key,\n\t\tvalue: typeof config.model != \"object\" || typeof config.model.value == \"undefined\" ? defaultModelValue : config.model.value\n\t};\n}\n/**\n* Helper for to-model-attribute conversion. Takes the model attribute name and conversion configuration and returns\n* a proper converter function.\n*\n* @param config Conversion configuration. It is possible to provide multiple configurations in an array.\n* @param shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n* on all elements in the range.\n*/\nfunction prepareToAttributeConverter(config, shallow) {\n\tconst matcher = new Matcher(config.view);\n\treturn (evt, data, conversionApi) => {\n\t\tif (!data.modelRange && shallow) return;\n\t\tconst match = matcher.match(data.viewItem);\n\t\tif (!match) return;\n\t\tif (onlyViewNameIsDefined(config.view, data.viewItem)) match.match.name = true;\n\t\telse delete match.match.name;\n\t\tif (!conversionApi.consumable.test(data.viewItem, match.match)) return;\n\t\tconst modelKey = config.model.key;\n\t\tconst modelValue = typeof config.model.value == \"function\" ? config.model.value(data.viewItem, conversionApi, data) : config.model.value;\n\t\tif (modelValue === null || modelValue === void 0) return;\n\t\tif (!data.modelRange) Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n\t\tif (setAttributeOn(data.modelRange, {\n\t\t\tkey: modelKey,\n\t\t\tvalue: modelValue\n\t\t}, shallow, conversionApi)) {\n\t\t\tif (conversionApi.consumable.test(data.viewItem, { name: true })) match.match.name = true;\n\t\t\tconversionApi.consumable.consume(data.viewItem, match.match);\n\t\t}\n\t};\n}\n/**\n* Helper function that checks if element name should be consumed in attribute converters.\n*\n* @param viewConfig Conversion view config.\n*/\nfunction onlyViewNameIsDefined(viewConfig, viewItem) {\n\tconst configToTest = typeof viewConfig == \"function\" ? viewConfig(viewItem) : viewConfig;\n\tif (typeof configToTest == \"object\" && !getViewElementNameFromConfig(configToTest)) return false;\n\treturn !configToTest.classes && !configToTest.attributes && !configToTest.styles;\n}\n/**\n* Helper function for to-model-attribute converter. Sets model attribute on given range.\n* Checks {@link module:engine/model/schema~ModelSchema} to ensure proper model structure.\n*\n* If any node on the given range has already defined an attribute with the same name, its value will not be updated.\n*\n* @param modelRange Model range on which attribute should be set.\n* @param modelAttribute Model attribute to set.\n* @param conversionApi Conversion API.\n* @param shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n* on all elements in the range.\n* @returns `true` if attribute was set on at least one node from given `modelRange`.\n*/\nfunction setAttributeOn(modelRange, modelAttribute, shallow, conversionApi) {\n\tlet result = false;\n\tfor (const node of Array.from(modelRange.getItems({ shallow }))) {\n\t\tif (!conversionApi.schema.checkAttribute(node, modelAttribute.key)) continue;\n\t\tresult = true;\n\t\tif (node.hasAttribute(modelAttribute.key)) continue;\n\t\tconversionApi.writer.setAttribute(modelAttribute.key, modelAttribute.value, node);\n\t}\n\treturn result;\n}\n/**\n* Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastElementToMarker()`\n* function and converts it to a format that is supported by `upcastElementToElement()` function.\n*/\nfunction normalizeElementToMarkerModelConfig(model) {\n\treturn (viewElement, conversionApi) => {\n\t\tconst markerName = typeof model == \"string\" ? model : model(viewElement, conversionApi);\n\t\treturn conversionApi.writer.createElement(\"$marker\", { \"data-name\": markerName });\n\t};\n}\n/**\n* Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastDataToMarker()`\n* function and converts it to a format that is supported by `upcastElementToElement()` function.\n*/\nfunction normalizeDataToMarkerConfig(config, type) {\n\tconst elementCreatorFunction = (viewElement, conversionApi) => {\n\t\tconst viewName = viewElement.getAttribute(\"name\");\n\t\tconst markerName = config.model(viewName, conversionApi);\n\t\treturn conversionApi.writer.createElement(\"$marker\", { \"data-name\": markerName });\n\t};\n\treturn {\n\t\tview: `${config.view}-${type}`,\n\t\tmodel: elementCreatorFunction\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 engine/controller/editingcontroller\n*/\nconst EditingControllerBase = /* #__PURE__ */ ObservableMixin();\n/**\n* A controller for the editing pipeline. The editing pipeline controls the {@link ~EditingController#model model} rendering,\n* including selection handling. It also creates the {@link ~EditingController#view view} which builds a\n* browser-independent virtualization over the DOM elements. The editing controller also attaches default converters.\n*/\nvar EditingController = class extends EditingControllerBase {\n\t/**\n\t* Editor model.\n\t*/\n\tmodel;\n\t/**\n\t* Editing view controller.\n\t*/\n\tview;\n\t/**\n\t* A mapper that describes the model-view binding.\n\t*/\n\tmapper;\n\t/**\n\t* Downcast dispatcher that converts changes from the model to the {@link #view editing view}.\n\t*/\n\tdowncastDispatcher;\n\t/**\n\t* Creates an editing controller instance.\n\t*\n\t* @param model Editing model.\n\t* @param stylesProcessor The styles processor instance.\n\t*/\n\tconstructor(model, stylesProcessor) {\n\t\tsuper();\n\t\tthis.model = model;\n\t\tthis.view = new EditingView(stylesProcessor);\n\t\tthis.mapper = new Mapper();\n\t\tthis.downcastDispatcher = new DowncastDispatcher({\n\t\t\tmapper: this.mapper,\n\t\t\tschema: model.schema\n\t\t});\n\t\tconst doc = this.model.document;\n\t\tconst selection = doc.selection;\n\t\tconst markers = this.model.markers;\n\t\tthis.listenTo(this.model, \"_beforeChanges\", () => {\n\t\t\tthis.view._disableRendering(true);\n\t\t}, { priority: \"highest\" });\n\t\tthis.listenTo(this.model, \"_afterChanges\", () => {\n\t\t\tthis.view._disableRendering(false);\n\t\t}, { priority: \"lowest\" });\n\t\tthis.listenTo(doc, \"change\", () => {\n\t\t\tthis.view.change((writer) => {\n\t\t\t\tthis.downcastDispatcher.convertChanges(doc.differ, markers, writer);\n\t\t\t\tthis.downcastDispatcher.convertSelection(selection, markers, writer);\n\t\t\t});\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(this.view.document, \"selectionChange\", convertSelectionChange(this.model, this.mapper));\n\t\tthis.downcastDispatcher.on(\"insert:$text\", insertText(), { priority: \"lowest\" });\n\t\tthis.downcastDispatcher.on(\"insert\", insertAttributesAndChildren(), { priority: \"lowest\" });\n\t\tthis.downcastDispatcher.on(\"remove\", remove(), { priority: \"low\" });\n\t\tthis.downcastDispatcher.on(\"cleanSelection\", cleanSelection());\n\t\tthis.downcastDispatcher.on(\"selection\", convertRangeSelection(), { priority: \"low\" });\n\t\tthis.downcastDispatcher.on(\"selection\", convertCollapsedSelection(), { priority: \"low\" });\n\t\tthis.view.document.roots.bindTo(this.model.document.roots).using((root) => {\n\t\t\tif (root.rootName == \"$graveyard\") return null;\n\t\t\tconst viewRoot = new ViewRootEditableElement(this.view.document, root.name);\n\t\t\tviewRoot.rootName = root.rootName;\n\t\t\tthis.mapper.bindElements(root, viewRoot);\n\t\t\treturn viewRoot;\n\t\t});\n\t}\n\t/**\n\t* Removes all event listeners attached to the `EditingController`. Destroys all objects created\n\t* by `EditingController` that need to be destroyed.\n\t*/\n\tdestroy() {\n\t\tthis.view.destroy();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Calling this method will refresh the marker by triggering the downcast conversion for it.\n\t*\n\t* Reconverting the marker is useful when you want to change its {@link module:engine/view/element~ViewElement view element}\n\t* without changing any marker data. For instance:\n\t*\n\t* ```ts\n\t* let isCommentActive = false;\n\t*\n\t* model.conversion.markerToHighlight( {\n\t* \tmodel: 'comment',\n\t* \tview: data => {\n\t* \t\tconst classes = [ 'comment-marker' ];\n\t*\n\t* \t\tif ( isCommentActive ) {\n\t* \t\t\tclasses.push( 'comment-marker--active' );\n\t* \t\t}\n\t*\n\t* \t\treturn { classes };\n\t* \t}\n\t* } );\n\t*\n\t* // ...\n\t*\n\t* // Change the property that indicates if marker is displayed as active or not.\n\t* isCommentActive = true;\n\t*\n\t* // Reconverting will downcast and synchronize the marker with the new isCommentActive state value.\n\t* editor.editing.reconvertMarker( 'comment' );\n\t* ```\n\t*\n\t* **Note**: If you want to reconvert a model item, use {@link #reconvertItem} instead.\n\t*\n\t* @param markerOrName Name of a marker to update, or a marker instance.\n\t*/\n\treconvertMarker(markerOrName) {\n\t\tconst markerName = typeof markerOrName == \"string\" ? markerOrName : markerOrName.name;\n\t\tconst currentMarker = this.model.markers.get(markerName);\n\t\tif (!currentMarker)\n /**\n\t\t* The marker with the provided name does not exist and cannot be reconverted.\n\t\t*\n\t\t* @error editingcontroller-reconvertmarker-marker-not-exist\n\t\t* @param {string} markerName The name of the reconverted marker.\n\t\t*/\n\t\tthrow new CKEditorError(\"editingcontroller-reconvertmarker-marker-not-exist\", this, { markerName });\n\t\tthis.model.change(() => {\n\t\t\tthis.model.markers._refresh(currentMarker);\n\t\t});\n\t}\n\t/**\n\t* Calling this method will downcast a model item on demand (by requesting a refresh in the {@link module:engine/model/differ~Differ}).\n\t*\n\t* You can use it if you want the view representation of a specific item updated as a response to external modifications. For instance,\n\t* when the view structure depends not only on the associated model data but also on some external state.\n\t*\n\t* **Note**: If you want to reconvert a model marker, use {@link #reconvertMarker} instead.\n\t*\n\t* @param item Item to refresh.\n\t*/\n\treconvertItem(item) {\n\t\tthis.model.change(() => {\n\t\t\tthis.model.document.differ._refreshItem(item);\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 engine/model/schema\n*/\nconst ModelSchemaBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The model's schema. It defines the allowed and disallowed structures of nodes as well as nodes' attributes.\n* The schema is usually defined by the features and based on them, the editing framework and features\n* make decisions on how to change and process the model.\n*\n* The instance of schema is available in {@link module:engine/model/model~Model#schema `editor.model.schema`}.\n*\n* Read more about the schema in:\n*\n* * The {@glink framework/architecture/editing-engine#schema schema section} of the\n* {@glink framework/architecture/editing-engine Introduction to the Editing engine architecture} guide.\n* * The {@glink framework/deep-dive/schema Schema deep-dive} guide.\n*/\nvar ModelSchema = class extends ModelSchemaBase {\n\t_sourceDefinitions = {};\n\t/**\n\t* A dictionary containing attribute properties.\n\t*/\n\t_attributeProperties = Object.create(null);\n\t/**\n\t* Stores additional callbacks registered for schema items, which are evaluated when {@link ~ModelSchema#checkChild} is called.\n\t*\n\t* Keys are schema item names for which the callbacks are registered. Values are arrays with the callbacks.\n\t*\n\t* Some checks are added under {@link ~ModelSchema#_genericCheckSymbol} key, these are\n\t* evaluated for every {@link ~ModelSchema#checkChild} call.\n\t*/\n\t_customChildChecks = /* @__PURE__ */ new Map();\n\t/**\n\t* Stores additional callbacks registered for attribute names, which are evaluated when {@link ~ModelSchema#checkAttribute} is called.\n\t*\n\t* Keys are schema attribute names for which the callbacks are registered. Values are arrays with the callbacks.\n\t*\n\t* Some checks are added under {@link ~ModelSchema#_genericCheckSymbol} key, these are evaluated for every\n\t* {@link ~ModelSchema#checkAttribute} call.\n\t*/\n\t_customAttributeChecks = /* @__PURE__ */ new Map();\n\t_genericCheckSymbol = Symbol(\"$generic\");\n\t_compiledDefinitions;\n\t/**\n\t* Creates a schema instance.\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.decorate(\"checkChild\");\n\t\tthis.decorate(\"checkAttribute\");\n\t\tthis.on(\"checkAttribute\", (evt, args) => {\n\t\t\targs[0] = new ModelSchemaContext(args[0]);\n\t\t}, { priority: \"highest\" });\n\t\tthis.on(\"checkChild\", (evt, args) => {\n\t\t\targs[0] = new ModelSchemaContext(args[0]);\n\t\t\targs[1] = this.getDefinition(args[1]);\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* Registers a schema item. Can only be called once for every item name.\n\t*\n\t* ```ts\n\t* schema.register( 'paragraph', {\n\t* \tinheritAllFrom: '$block'\n\t* } );\n\t* ```\n\t*/\n\tregister(itemName, definition) {\n\t\tif (this._sourceDefinitions[itemName])\n /**\n\t\t* A single item cannot be registered twice in the schema.\n\t\t*\n\t\t* This situation may happen when:\n\t\t*\n\t\t* * Two or more plugins called {@link module:engine/model/schema~ModelSchema#register `register()`} with the same name.\n\t\t* This will usually mean that there is a collision between plugins which try to use the same element in the model.\n\t\t* Unfortunately, the only way to solve this is by modifying one of these plugins to use a unique model element name.\n\t\t* * A single plugin was loaded twice. This happens when it is installed by npm/yarn in two versions\n\t\t* and usually means one or more of the following issues:\n\t\t*     * a version mismatch (two of your dependencies require two different versions of this plugin),\n\t\t*     * incorrect imports (this plugin is somehow imported twice in a way which confuses webpack),\n\t\t*     * mess in `node_modules/` (`rm -rf node_modules/` may help).\n\t\t*\n\t\t* **Note:** Check the logged `itemName` to better understand which plugin was duplicated/conflicting.\n\t\t*\n\t\t* @param itemName The name of the model element that is being registered twice.\n\t\t* @error schema-cannot-register-item-twice\n\t\t*/\n\t\tthrow new CKEditorError(\"schema-cannot-register-item-twice\", this, { itemName });\n\t\tthis._sourceDefinitions[itemName] = [Object.assign({}, definition)];\n\t\tthis._clearCache();\n\t}\n\t/**\n\t* Extends a {@link #register registered} item's definition.\n\t*\n\t* Extending properties such as `allowIn` will add more items to the existing properties,\n\t* while redefining properties such as `isBlock` will override the previously defined ones.\n\t*\n\t* ```ts\n\t* schema.register( 'foo', {\n\t* \tallowIn: '$root',\n\t* \tisBlock: true;\n\t* } );\n\t* schema.extend( 'foo', {\n\t* \tallowIn: 'blockQuote',\n\t* \tisBlock: false\n\t* } );\n\t*\n\t* schema.getDefinition( 'foo' );\n\t* //\t{\n\t* //\t\tallowIn: [ '$root', 'blockQuote' ],\n\t* // \t\tisBlock: false\n\t* //\t}\n\t* ```\n\t*/\n\textend(itemName, definition) {\n\t\tif (!this._sourceDefinitions[itemName])\n /**\n\t\t* Cannot extend an item which was not registered yet.\n\t\t*\n\t\t* This error happens when a plugin tries to extend the schema definition of an item which was not\n\t\t* {@link module:engine/model/schema~ModelSchema#register registered} yet.\n\t\t*\n\t\t* @param itemName The name of the model element which is being extended.\n\t\t* @error schema-cannot-extend-missing-item\n\t\t*/\n\t\tthrow new CKEditorError(\"schema-cannot-extend-missing-item\", this, { itemName });\n\t\tthis._sourceDefinitions[itemName].push(Object.assign({}, definition));\n\t\tthis._clearCache();\n\t}\n\t/**\n\t* Returns data of all registered items.\n\t*\n\t* This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t* checking a list of all block elements, etc).\n\t* Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t* in other cases.\n\t*/\n\tgetDefinitions() {\n\t\tif (!this._compiledDefinitions) this._compile();\n\t\treturn this._compiledDefinitions;\n\t}\n\t/**\n\t* Returns a definition of the given item or `undefined` if an item is not registered.\n\t*\n\t* This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t* checking a list of all block elements, etc).\n\t* Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t* in other cases.\n\t*/\n\tgetDefinition(item) {\n\t\tlet itemName;\n\t\tif (typeof item == \"string\") itemName = item;\n\t\telse if (\"is\" in item && (item.is(\"$text\") || item.is(\"$textProxy\"))) itemName = \"$text\";\n\t\telse itemName = item.name;\n\t\treturn this.getDefinitions()[itemName];\n\t}\n\t/**\n\t* Returns `true` if the given item is registered in the schema.\n\t*\n\t* ```ts\n\t* schema.isRegistered( 'paragraph' ); // -> true\n\t* schema.isRegistered( editor.model.document.getRoot() ); // -> true\n\t* schema.isRegistered( 'foo' ); // -> false\n\t* ```\n\t*/\n\tisRegistered(item) {\n\t\treturn !!this.getDefinition(item);\n\t}\n\t/**\n\t* Returns `true` if the given item is defined to be\n\t* a block by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isBlock` property.\n\t*\n\t* ```ts\n\t* schema.isBlock( 'paragraph' ); // -> true\n\t* schema.isBlock( '$root' ); // -> false\n\t*\n\t* const paragraphElement = writer.createElement( 'paragraph' );\n\t* schema.isBlock( paragraphElement ); // -> true\n\t* ```\n\t*\n\t* See the {@glink framework/deep-dive/schema#block-elements Block elements} section of\n\t* the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*/\n\tisBlock(item) {\n\t\tconst def = this.getDefinition(item);\n\t\treturn !!(def && def.isBlock);\n\t}\n\t/**\n\t* Returns `true` if the given item should be treated as a limit element.\n\t*\n\t* It considers an item to be a limit element if its\n\t* {@link module:engine/model/schema~ModelSchemaItemDefinition}'s\n\t* {@link module:engine/model/schema~ModelSchemaItemDefinition#isLimit `isLimit`} or\n\t* {@link module:engine/model/schema~ModelSchemaItemDefinition#isObject `isObject`} property\n\t* was set to `true`.\n\t*\n\t* ```ts\n\t* schema.isLimit( 'paragraph' ); // -> false\n\t* schema.isLimit( '$root' ); // -> true\n\t* schema.isLimit( editor.model.document.getRoot() ); // -> true\n\t* schema.isLimit( 'imageBlock' ); // -> true\n\t* ```\n\t*\n\t* See the {@glink framework/deep-dive/schema#limit-elements Limit elements} section of\n\t* the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*/\n\tisLimit(item) {\n\t\tconst def = this.getDefinition(item);\n\t\tif (!def) return false;\n\t\treturn !!(def.isLimit || def.isObject);\n\t}\n\t/**\n\t* Returns `true` if the given item should be treated as an object element.\n\t*\n\t* It considers an item to be an object element if its\n\t* {@link module:engine/model/schema~ModelSchemaItemDefinition}'s\n\t* {@link module:engine/model/schema~ModelSchemaItemDefinition#isObject `isObject`} property\n\t* was set to `true`.\n\t*\n\t* ```ts\n\t* schema.isObject( 'paragraph' ); // -> false\n\t* schema.isObject( 'imageBlock' ); // -> true\n\t*\n\t* const imageElement = writer.createElement( 'imageBlock' );\n\t* schema.isObject( imageElement ); // -> true\n\t* ```\n\t*\n\t* See the {@glink framework/deep-dive/schema#object-elements Object elements} section of\n\t* the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*/\n\tisObject(item) {\n\t\tconst def = this.getDefinition(item);\n\t\tif (!def) return false;\n\t\treturn !!(def.isObject || def.isLimit && def.isSelectable && def.isContent);\n\t}\n\t/**\n\t* Returns `true` if the given item is defined to be\n\t* an inline element by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isInline` property.\n\t*\n\t* ```ts\n\t* schema.isInline( 'paragraph' ); // -> false\n\t* schema.isInline( 'softBreak' ); // -> true\n\t*\n\t* const text = writer.createText( 'foo' );\n\t* schema.isInline( text ); // -> true\n\t* ```\n\t*\n\t* See the {@glink framework/deep-dive/schema#inline-elements Inline elements} section of\n\t* the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*/\n\tisInline(item) {\n\t\tconst def = this.getDefinition(item);\n\t\treturn !!(def && def.isInline);\n\t}\n\t/**\n\t* Returns `true` if the given item is defined to be\n\t* a selectable element by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isSelectable` property.\n\t*\n\t* ```ts\n\t* schema.isSelectable( 'paragraph' ); // -> false\n\t* schema.isSelectable( 'heading1' ); // -> false\n\t* schema.isSelectable( 'imageBlock' ); // -> true\n\t* schema.isSelectable( 'tableCell' ); // -> true\n\t*\n\t* const text = writer.createText( 'foo' );\n\t* schema.isSelectable( text ); // -> false\n\t* ```\n\t*\n\t* See the {@glink framework/deep-dive/schema#selectable-elements Selectable elements section} of\n\t* the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*/\n\tisSelectable(item) {\n\t\tconst def = this.getDefinition(item);\n\t\tif (!def) return false;\n\t\treturn !!(def.isSelectable || def.isObject);\n\t}\n\t/**\n\t* Returns `true` if the given item is defined to be\n\t* a content by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isContent` property.\n\t*\n\t* ```ts\n\t* schema.isContent( 'paragraph' ); // -> false\n\t* schema.isContent( 'heading1' ); // -> false\n\t* schema.isContent( 'imageBlock' ); // -> true\n\t* schema.isContent( 'horizontalLine' ); // -> true\n\t*\n\t* const text = writer.createText( 'foo' );\n\t* schema.isContent( text ); // -> true\n\t* ```\n\t*\n\t* See the {@glink framework/deep-dive/schema#content-elements Content elements section} of\n\t* the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*/\n\tisContent(item) {\n\t\tconst def = this.getDefinition(item);\n\t\tif (!def) return false;\n\t\treturn !!(def.isContent || def.isObject);\n\t}\n\t/**\n\t* Checks whether the given node can be a child of the given context.\n\t*\n\t* ```ts\n\t* schema.checkChild( model.document.getRoot(), paragraph ); // -> false\n\t*\n\t* schema.register( 'paragraph', {\n\t* \tallowIn: '$root'\n\t* } );\n\t*\n\t* schema.checkChild( model.document.getRoot(), paragraph ); // -> true\n\t* ```\n\t*\n\t* Both {@link module:engine/model/schema~ModelSchema#addChildCheck callback checks} and declarative rules (added when\n\t* {@link module:engine/model/schema~ModelSchema#register registering} and\n\t* {@link module:engine/model/schema~ModelSchema#extend extending} items)\n\t* are evaluated when this method is called.\n\t*\n\t* Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t*\n\t* Note that when verifying whether the given node can be a child of the given context, the schema also verifies the entire\n\t* context &ndash; from its root to its last element. Therefore, it is possible for `checkChild()` to return `false` even though\n\t* the `context` last element can contain the checked child. It happens if one of the `context` elements does not allow its child.\n\t* When `context` is verified, {@link module:engine/model/schema~ModelSchema#addChildCheck custom checks} are considered as well.\n\t*\n\t* @fires checkChild\n\t* @param context The context in which the child will be checked.\n\t* @param def The child to check.\n\t*/\n\tcheckChild(context, def) {\n\t\tif (!def) return false;\n\t\treturn this._checkContextMatch(context, def);\n\t}\n\t/**\n\t* Checks whether the given attribute can be applied in the given context (on the last item of the context).\n\t*\n\t* ```ts\n\t* schema.checkAttribute( textNode, 'bold' ); // -> false\n\t*\n\t* schema.extend( '$text', {\n\t* \tallowAttributes: 'bold'\n\t* } );\n\t*\n\t* schema.checkAttribute( textNode, 'bold' ); // -> true\n\t* ```\n\t*\n\t* Both {@link module:engine/model/schema~ModelSchema#addAttributeCheck callback checks} and declarative rules (added when\n\t* {@link module:engine/model/schema~ModelSchema#register registering} and\n\t* {@link module:engine/model/schema~ModelSchema#extend extending} items)\n\t* are evaluated when this method is called.\n\t*\n\t* Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t*\n\t* @fires checkAttribute\n\t* @param context The context in which the attribute will be checked.\n\t* @param attributeName Name of attribute to check in the given context.\n\t*/\n\tcheckAttribute(context, attributeName) {\n\t\tconst def = this.getDefinition(context.last);\n\t\tif (!def) return false;\n\t\tconst isAllowed = this._evaluateAttributeChecks(context, attributeName);\n\t\treturn isAllowed !== void 0 ? isAllowed : def.allowAttributes.includes(attributeName);\n\t}\n\t/**\n\t* Checks whether the given element (`elementToMerge`) can be merged with the specified base element (`positionOrBaseElement`).\n\t*\n\t* In other words &ndash; both elements are not a limit elements and whether `elementToMerge`'s children\n\t* {@link #checkChild are allowed} in the `positionOrBaseElement`.\n\t*\n\t* This check ensures that elements merged with {@link module:engine/model/writer~ModelWriter#merge `Writer#merge()`}\n\t* will be valid.\n\t*\n\t* Instead of elements, you can pass the instance of the {@link module:engine/model/position~ModelPosition} class as the\n\t* `positionOrBaseElement`. It means that the elements before and after the position will be checked whether they can be merged.\n\t*\n\t* @param positionOrBaseElement The position or base element to which the `elementToMerge` will be merged.\n\t* @param elementToMerge The element to merge. Required if `positionOrBaseElement` is an element.\n\t*/\n\tcheckMerge(positionOrBaseElement, elementToMerge) {\n\t\tif (positionOrBaseElement instanceof ModelPosition) {\n\t\t\tconst nodeBefore = positionOrBaseElement.nodeBefore;\n\t\t\tconst nodeAfter = positionOrBaseElement.nodeAfter;\n\t\t\tif (!(nodeBefore instanceof ModelElement))\n /**\n\t\t\t* The node before the merge position must be an element.\n\t\t\t*\n\t\t\t* @error schema-check-merge-no-element-before\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"schema-check-merge-no-element-before\", this);\n\t\t\tif (!(nodeAfter instanceof ModelElement))\n /**\n\t\t\t* The node after the merge position must be an element.\n\t\t\t*\n\t\t\t* @error schema-check-merge-no-element-after\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"schema-check-merge-no-element-after\", this);\n\t\t\treturn this.checkMerge(nodeBefore, nodeAfter);\n\t\t}\n\t\tif (this.isLimit(positionOrBaseElement) || this.isLimit(elementToMerge)) return false;\n\t\tfor (const child of elementToMerge.getChildren()) if (!this.checkChild(positionOrBaseElement, child)) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Allows registering a callback to the {@link #checkChild} method calls.\n\t*\n\t* Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t* by using the declarative API of {@link module:engine/model/schema~ModelSchemaItemDefinition}.\n\t*\n\t* Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t*\n\t* For example, by using this method you can disallow elements in specific contexts:\n\t*\n\t* ```ts\n\t* // Disallow `heading1` inside a `blockQuote` that is inside a table.\n\t* schema.addChildCheck( ( context, childDefinition ) => {\n\t* \tif ( context.endsWith( 'tableCell blockQuote' ) ) {\n\t* \t\treturn false;\n\t* \t}\n\t* }, 'heading1' );\n\t* ```\n\t*\n\t* You can skip the optional `itemName` parameter to evaluate the callback for every `checkChild()` call.\n\t*\n\t* ```ts\n\t* // Inside specific custom element, allow only children, which allows for a specific attribute.\n\t* schema.addChildCheck( ( context, childDefinition ) => {\n\t* \tif ( context.endsWith( 'myElement' ) ) {\n\t* \t\treturn childDefinition.allowAttributes.includes( 'myAttribute' );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* Please note that the generic callbacks may affect the editor performance and should be avoided if possible.\n\t*\n\t* When one of the callbacks makes a decision (returns `true` or `false`) the processing is finished and other callbacks are not fired.\n\t* Callbacks are fired in the order they were added, however generic callbacks are fired before callbacks added for a specified item.\n\t*\n\t* You can also use `checkChild` event, if you need even better control. The result from the example above could also be\n\t* achieved with following event callback:\n\t*\n\t* ```ts\n\t* schema.on( 'checkChild', ( evt, args ) => {\n\t* \tconst context = args[ 0 ];\n\t* \tconst childDefinition = args[ 1 ];\n\t*\n\t* \tif ( context.endsWith( 'myElement' ) ) {\n\t* \t\t// Prevent next listeners from being called.\n\t* \t\tevt.stop();\n\t* \t\t// Set the `checkChild()` return value.\n\t* \t\tevt.return = childDefinition.allowAttributes.includes( 'myAttribute' );\n\t* \t}\n\t* }, { priority: 'high' } );\n\t* ```\n\t*\n\t* Note that the callback checks and declarative rules checks are processed on `normal` priority.\n\t*\n\t* Adding callbacks this way can also negatively impact editor performance.\n\t*\n\t* @param callback The callback to be called. It is called with two parameters:\n\t* {@link module:engine/model/schema~ModelSchemaContext} (context) instance and\n\t* {@link module:engine/model/schema~ModelSchemaCompiledItemDefinition} (definition). The callback may return `true/false` to\n\t* override `checkChild()`'s return value. If it does not return a boolean value, the default algorithm (or other callbacks) will define\n\t* `checkChild()`'s return value.\n\t* @param itemName Name of the schema item for which the callback is registered. If specified, the callback will be run only for\n\t* `checkChild()` calls which `def` parameter matches the `itemName`. Otherwise, the callback will run for every `checkChild` call.\n\t*/\n\taddChildCheck(callback, itemName) {\n\t\tconst key = itemName !== void 0 ? itemName : this._genericCheckSymbol;\n\t\tconst checks = this._customChildChecks.get(key) || [];\n\t\tchecks.push(callback);\n\t\tthis._customChildChecks.set(key, checks);\n\t}\n\t/**\n\t* Allows registering a callback to the {@link #checkAttribute} method calls.\n\t*\n\t* Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t* by using the declarative API of {@link module:engine/model/schema~ModelSchemaItemDefinition}.\n\t*\n\t* Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t*\n\t* For example, by using this method you can disallow setting attributes on nodes in specific contexts:\n\t*\n\t* ```ts\n\t* // Disallow setting `bold` on text inside `heading1` element:\n\t* schema.addAttributeCheck( context => {\n\t* \tif ( context.endsWith( 'heading1 $text' ) ) {\n\t* \t\treturn false;\n\t* \t}\n\t* }, 'bold' );\n\t* ```\n\t*\n\t* You can skip the optional `attributeName` parameter to evaluate the callback for every `checkAttribute()` call.\n\t*\n\t* ```ts\n\t* // Disallow formatting attributes on text inside custom `myTitle` element:\n\t* schema.addAttributeCheck( ( context, attributeName ) => {\n\t* \tif ( context.endsWith( 'myTitle $text' ) && schema.getAttributeProperties( attributeName ).isFormatting ) {\n\t* \t\treturn false;\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* Please note that the generic callbacks may affect the editor performance and should be avoided if possible.\n\t*\n\t* When one of the callbacks makes a decision (returns `true` or `false`) the processing is finished and other callbacks are not fired.\n\t* Callbacks are fired in the order they were added, however generic callbacks are fired before callbacks added for a specified item.\n\t*\n\t* You can also use {@link #event:checkAttribute} event, if you need even better control. The result from the example above could also\n\t* be achieved with following event callback:\n\t*\n\t* ```ts\n\t* schema.on( 'checkAttribute', ( evt, args ) => {\n\t* \tconst context = args[ 0 ];\n\t* \tconst attributeName = args[ 1 ];\n\t*\n\t* \tif ( context.endsWith( 'myTitle $text' ) && schema.getAttributeProperties( attributeName ).isFormatting ) {\n\t* \t\t// Prevent next listeners from being called.\n\t* \t\tevt.stop();\n\t* \t\t// Set the `checkAttribute()` return value.\n\t* \t\tevt.return = false;\n\t* \t}\n\t* }, { priority: 'high' } );\n\t* ```\n\t*\n\t* Note that the callback checks and declarative rules checks are processed on `normal` priority.\n\t*\n\t* Adding callbacks this way can also negatively impact editor performance.\n\t*\n\t* @param callback The callback to be called. It is called with two parameters:\n\t* {@link module:engine/model/schema~ModelSchemaContext `context`} and attribute name. The callback may return `true` or `false`, to\n\t* override `checkAttribute()`'s return value. If it does not return a boolean value, the default algorithm (or other callbacks)\n\t* will define `checkAttribute()`'s return value.\n\t* @param attributeName Name of the attribute for which the callback is registered. If specified, the callback will be run only for\n\t* `checkAttribute()` calls with matching `attributeName`. Otherwise, the callback will run for every `checkAttribute()` call.\n\t*/\n\taddAttributeCheck(callback, attributeName) {\n\t\tconst key = attributeName !== void 0 ? attributeName : this._genericCheckSymbol;\n\t\tconst checks = this._customAttributeChecks.get(key) || [];\n\t\tchecks.push(callback);\n\t\tthis._customAttributeChecks.set(key, checks);\n\t}\n\t/**\n\t* This method allows assigning additional metadata to the model attributes. For example,\n\t* {@link module:engine/model/schema~ModelAttributeProperties `AttributeProperties#isFormatting` property} is\n\t* used to mark formatting attributes (like `bold` or `italic`).\n\t*\n\t* ```ts\n\t* // Mark bold as a formatting attribute.\n\t* schema.setAttributeProperties( 'bold', {\n\t* \tisFormatting: true\n\t* } );\n\t*\n\t* // Override code not to be considered a formatting markup.\n\t* schema.setAttributeProperties( 'code', {\n\t* \tisFormatting: false\n\t* } );\n\t* ```\n\t*\n\t* Properties are not limited to members defined in the\n\t* {@link module:engine/model/schema~ModelAttributeProperties `AttributeProperties` type} and you can also use custom properties:\n\t*\n\t* ```ts\n\t* schema.setAttributeProperties( 'blockQuote', {\n\t* \tcustomProperty: 'value'\n\t* } );\n\t* ```\n\t*\n\t* Subsequent calls with the same attribute will extend its custom properties:\n\t*\n\t* ```ts\n\t* schema.setAttributeProperties( 'blockQuote', {\n\t* \tone: 1\n\t* } );\n\t*\n\t* schema.setAttributeProperties( 'blockQuote', {\n\t* \ttwo: 2\n\t* } );\n\t*\n\t* console.log( schema.getAttributeProperties( 'blockQuote' ) );\n\t* // Logs: { one: 1, two: 2 }\n\t* ```\n\t*\n\t* @param attributeName A name of the attribute to receive the properties.\n\t* @param properties A dictionary of properties.\n\t*/\n\tsetAttributeProperties(attributeName, properties) {\n\t\tthis._attributeProperties[attributeName] = Object.assign(this.getAttributeProperties(attributeName), properties);\n\t}\n\t/**\n\t* Returns properties associated with a given model attribute. See {@link #setAttributeProperties `setAttributeProperties()`}.\n\t*\n\t* @param attributeName A name of the attribute.\n\t*/\n\tgetAttributeProperties(attributeName) {\n\t\treturn this._attributeProperties[attributeName] || Object.create(null);\n\t}\n\t/**\n\t* Returns the lowest {@link module:engine/model/schema~ModelSchema#isLimit limit element} containing the entire\n\t* selection/range/position or the root otherwise.\n\t*\n\t* @param selectionOrRangeOrPosition The selection/range/position to check.\n\t* @returns The lowest limit element containing the entire `selectionOrRangeOrPosition`.\n\t*/\n\tgetLimitElement(selectionOrRangeOrPosition) {\n\t\tlet element;\n\t\tif (selectionOrRangeOrPosition instanceof ModelPosition) element = selectionOrRangeOrPosition.parent;\n\t\telse element = (selectionOrRangeOrPosition instanceof ModelRange ? [selectionOrRangeOrPosition] : Array.from(selectionOrRangeOrPosition.getRanges())).reduce((element, range) => {\n\t\t\tconst rangeCommonAncestor = range.getCommonAncestor();\n\t\t\tif (!element) return rangeCommonAncestor;\n\t\t\treturn element.getCommonAncestor(rangeCommonAncestor, { includeSelf: true });\n\t\t}, null);\n\t\twhile (!this.isLimit(element)) if (element.parent) element = element.parent;\n\t\telse break;\n\t\treturn element;\n\t}\n\t/**\n\t* Checks whether the attribute is allowed in selection:\n\t*\n\t* * if the selection is not collapsed, then checks if the attribute is allowed on any of nodes in that range,\n\t* * if the selection is collapsed, then checks if on the selection position there's a text with the\n\t* specified attribute allowed.\n\t*\n\t* @param selection Selection which will be checked.\n\t* @param attribute The name of the attribute to check.\n\t*/\n\tcheckAttributeInSelection(selection, attribute) {\n\t\tif (selection.isCollapsed) {\n\t\t\tconst context = [...selection.getFirstPosition().getAncestors(), new ModelText(\"\", selection.getAttributes())];\n\t\t\treturn this.checkAttribute(context, attribute);\n\t\t} else {\n\t\t\tconst ranges = selection.getRanges();\n\t\t\tfor (const range of ranges) for (const value of range) if (this.checkAttribute(value.item, attribute)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Transforms the given set of ranges into a set of ranges where the given attribute is allowed (and can be applied).\n\t*\n\t* @param ranges Ranges to be validated.\n\t* @param attribute The name of the attribute to check.\n\t* @param options Optional configuration.\n\t* @param options.includeEmptyRanges When `true`, empty ranges that allow the attribute are also included\n\t* in the returned ranges.\n\t* @returns Ranges in which the attribute is allowed.\n\t*/\n\t*getValidRanges(ranges, attribute, options = {}) {\n\t\tranges = convertToMinimalFlatRanges(ranges);\n\t\tfor (const range of ranges) yield* this._getValidRangesForRange(range, attribute, options);\n\t}\n\t/**\n\t* Basing on given `position`, finds and returns a {@link module:engine/model/range~ModelRange range} which is\n\t* nearest to that `position` and is a correct range for selection.\n\t*\n\t* The correct selection range might be collapsed when it is located in a position where the text node can be placed.\n\t* Non-collapsed range is returned when selection can be placed around element marked as an \"object\" in\n\t* the {@link module:engine/model/schema~ModelSchema schema}.\n\t*\n\t* Direction of searching for the nearest correct selection range can be specified as:\n\t*\n\t* * `both` - searching will be performed in both ways,\n\t* * `forward` - searching will be performed only forward,\n\t* * `backward` - searching will be performed only backward.\n\t*\n\t* When valid selection range cannot be found, `null` is returned.\n\t*\n\t* @param position Reference position where new selection range should be looked for.\n\t* @param direction Search direction.\n\t* @returns Nearest selection range or `null` if one cannot be found.\n\t*/\n\tgetNearestSelectionRange(position, direction = \"both\") {\n\t\tif (position.root.rootName == \"$graveyard\") return null;\n\t\tif (this.checkChild(position, \"$text\")) return new ModelRange(position);\n\t\tlet backwardWalker, forwardWalker;\n\t\tconst limitElement = position.getAncestors().reverse().find((item) => this.isLimit(item)) || position.root;\n\t\tif (direction == \"both\" || direction == \"backward\") backwardWalker = new ModelTreeWalker({\n\t\t\tboundaries: ModelRange._createIn(limitElement),\n\t\t\tstartPosition: position,\n\t\t\tdirection: \"backward\"\n\t\t});\n\t\tif (direction == \"both\" || direction == \"forward\") forwardWalker = new ModelTreeWalker({\n\t\t\tboundaries: ModelRange._createIn(limitElement),\n\t\t\tstartPosition: position\n\t\t});\n\t\tfor (const data of combineWalkers(backwardWalker, forwardWalker)) {\n\t\t\tconst type = data.walker == backwardWalker ? \"elementEnd\" : \"elementStart\";\n\t\t\tconst value = data.value;\n\t\t\tif (value.type == type && this.isObject(value.item)) return ModelRange._createOn(value.item);\n\t\t\tif (this.checkChild(value.nextPosition, \"$text\")) return new ModelRange(value.nextPosition);\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Tries to find position ancestors that allow to insert a given node.\n\t* It starts searching from the given position and goes node by node to the top of the model tree\n\t* as long as a {@link module:engine/model/schema~ModelSchema#isLimit limit element}, an\n\t* {@link module:engine/model/schema~ModelSchema#isObject object element} or a topmost ancestor is not reached.\n\t*\n\t* @param position The position that the search will start from.\n\t* @param node The node for which an allowed parent should be found or its name.\n\t* @returns Allowed parent or null if nothing was found.\n\t*/\n\tfindAllowedParent(position, node) {\n\t\tlet parent = position.parent;\n\t\twhile (parent) {\n\t\t\tif (this.checkChild(parent, node)) return parent;\n\t\t\tif (this.isLimit(parent)) return null;\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Sets attributes allowed by the schema on a given node.\n\t*\n\t* @param node A node to set attributes on.\n\t* @param attributes Attributes keys and values.\n\t* @param writer An instance of the model writer.\n\t*/\n\tsetAllowedAttributes(node, attributes, writer) {\n\t\tconst model = writer.model;\n\t\tfor (const [attributeName, attributeValue] of Object.entries(attributes)) if (model.schema.checkAttribute(node, attributeName)) writer.setAttribute(attributeName, attributeValue, node);\n\t}\n\t/**\n\t* Removes attributes disallowed by the schema.\n\t*\n\t* @param nodes Nodes that will be filtered.\n\t*/\n\tremoveDisallowedAttributes(nodes, writer) {\n\t\tfor (const node of nodes) if (node.is(\"$text\")) removeDisallowedAttributeFromNode(this, node, writer);\n\t\telse {\n\t\t\tconst positionsInRange = ModelRange._createIn(node).getPositions();\n\t\t\tfor (const position of positionsInRange) {\n\t\t\t\tconst item = position.nodeBefore || position.parent;\n\t\t\t\tremoveDisallowedAttributeFromNode(this, item, writer);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Gets attributes of a node that have a given property.\n\t*\n\t* @param node Node to get attributes from.\n\t* @param propertyName Name of the property that attribute must have to return it.\n\t* @param propertyValue Desired value of the property that we want to check.\n\t* When `undefined` attributes will be returned if they have set a given property no matter what the value is. If specified it will\n\t* return attributes which given property's value is equal to this parameter.\n\t* @returns Object with attributes' names as key and attributes' values as value.\n\t*/\n\tgetAttributesWithProperty(node, propertyName, propertyValue) {\n\t\tconst attributes = {};\n\t\tfor (const [attributeName, attributeValue] of node.getAttributes()) {\n\t\t\tconst attributeProperties = this.getAttributeProperties(attributeName);\n\t\t\tif (attributeProperties[propertyName] === void 0) continue;\n\t\t\tif (propertyValue === void 0 || propertyValue === attributeProperties[propertyName]) attributes[attributeName] = attributeValue;\n\t\t}\n\t\treturn attributes;\n\t}\n\t/**\n\t* Creates an instance of the schema context.\n\t*/\n\tcreateContext(context) {\n\t\treturn new ModelSchemaContext(context);\n\t}\n\t_clearCache() {\n\t\tthis._compiledDefinitions = null;\n\t}\n\t_compile() {\n\t\tconst definitions = {};\n\t\tconst sourceRules = this._sourceDefinitions;\n\t\tconst itemNames = Object.keys(sourceRules);\n\t\tfor (const itemName of itemNames) definitions[itemName] = compileBaseItemRule(sourceRules[itemName], itemName);\n\t\tconst items = Object.values(definitions);\n\t\tfor (const item of items) {\n\t\t\tpropagateAllowIn(definitions, item);\n\t\t\tpropagateAllowChildren(definitions, item);\n\t\t\tpropagateDisallowIn(definitions, item);\n\t\t\tpropagateDisallowChildren(definitions, item);\n\t\t}\n\t\tfor (const item of items) resolveDisallows(definitions, item);\n\t\tfor (const item of items) compileAllowContentOf(definitions, item);\n\t\tfor (const item of items) compileAllowWhere(definitions, item);\n\t\tfor (const item of items) compileAllowAttributesOf(definitions, item);\n\t\tfor (const item of items) compileInheritPropertiesFrom(definitions, item);\n\t\tthis._compiledDefinitions = compileDefinitions(definitions);\n\t}\n\t_checkContextMatch(context, def) {\n\t\tconst parentItem = context.last;\n\t\tlet isAllowed = this._evaluateChildChecks(context, def);\n\t\tisAllowed = isAllowed !== void 0 ? isAllowed : def.allowIn.includes(parentItem.name);\n\t\tif (!isAllowed) return false;\n\t\tconst parentItemDefinition = this.getDefinition(parentItem);\n\t\tconst parentContext = context.trimLast();\n\t\tif (!parentItemDefinition) return false;\n\t\tif (parentContext.length == 0) return true;\n\t\treturn this._checkContextMatch(parentContext, parentItemDefinition);\n\t}\n\t/**\n\t* Calls child check callbacks to decide whether `def` is allowed in `context`. It uses both generic and specific (defined for `def`\n\t* item) callbacks. If neither callback makes a decision, `undefined` is returned.\n\t*\n\t* Note that the first callback that makes a decision \"wins\", i.e., if any callback returns `true` or `false`, then the processing\n\t* is over and that result is returned.\n\t*/\n\t_evaluateChildChecks(context, def) {\n\t\tconst genericChecks = this._customChildChecks.get(this._genericCheckSymbol) || [];\n\t\tconst childChecks = this._customChildChecks.get(def.name) || [];\n\t\tfor (const check of [...genericChecks, ...childChecks]) {\n\t\t\tconst result = check(context, def);\n\t\t\tif (result !== void 0) return result;\n\t\t}\n\t}\n\t/**\n\t* Calls attribute check callbacks to decide whether `attributeName` can be set on the last element of `context`. It uses both\n\t* generic and specific (defined for `attributeName`) callbacks. If neither callback makes a decision, `undefined` is returned.\n\t*\n\t* Note that the first callback that makes a decision \"wins\", i.e., if any callback returns `true` or `false`, then the processing\n\t* is over and that result is returned.\n\t*/\n\t_evaluateAttributeChecks(context, attributeName) {\n\t\tconst genericChecks = this._customAttributeChecks.get(this._genericCheckSymbol) || [];\n\t\tconst childChecks = this._customAttributeChecks.get(attributeName) || [];\n\t\tfor (const check of [...genericChecks, ...childChecks]) {\n\t\t\tconst result = check(context, attributeName);\n\t\t\tif (result !== void 0) return result;\n\t\t}\n\t}\n\t/**\n\t* Takes a flat range and an attribute name. Traverses the range recursively and deeply to find and return all ranges\n\t* inside the given range on which the attribute can be applied.\n\t*\n\t* This is a helper function for {@link ~ModelSchema#getValidRanges}.\n\t*\n\t* @param range The range to process.\n\t* @param attribute The name of the attribute to check.\n\t* @returns Ranges in which the attribute is allowed.\n\t*/\n\t*_getValidRangesForRange(range, attribute, options) {\n\t\tlet start = range.start;\n\t\tlet end = range.start;\n\t\tfor (const item of range.getItems({ shallow: true })) {\n\t\t\tif (item.is(\"element\")) {\n\t\t\t\tif (options.includeEmptyRanges && item.isEmpty) {\n\t\t\t\t\tconst context = this.createContext(item);\n\t\t\t\t\tif (this.checkChild(context, \"$text\") && this.checkAttribute(context.push(\"$text\"), attribute)) yield ModelRange._createIn(item);\n\t\t\t\t} else yield* this._getValidRangesForRange(ModelRange._createIn(item), attribute, options);\n\t\t\t}\n\t\t\tif (!this.checkAttribute(item, attribute)) {\n\t\t\t\tif (!start.isEqual(end)) yield new ModelRange(start, end);\n\t\t\t\tstart = ModelPosition._createAfter(item);\n\t\t\t}\n\t\t\tend = ModelPosition._createAfter(item);\n\t\t}\n\t\tif (!start.isEqual(end)) yield new ModelRange(start, end);\n\t}\n\t/**\n\t* Returns a model range which is optimal (in terms of UX) for inserting a widget block.\n\t*\n\t* For instance, if a selection is in the middle of a paragraph, the collapsed range before this paragraph\n\t* will be returned so that it is not split. If the selection is at the end of a paragraph,\n\t* the collapsed range after this paragraph will be returned.\n\t*\n\t* Note: If the selection is placed in an empty block, the range in that block will be returned. If that range\n\t* is then passed to {@link module:engine/model/model~Model#insertContent}, the block will be fully replaced\n\t* by the inserted widget block.\n\t*\n\t* @internal\n\t* @param selection The selection based on which the insertion position should be calculated.\n\t* @param place The place where to look for optimal insertion range.\n\t* The `auto` value will determine itself the best position for insertion.\n\t* The `before` value will try to find a position before selection.\n\t* The `after` value will try to find a position after selection.\n\t* @returns The optimal range.\n\t*/\n\tfindOptimalInsertionRange(selection, place) {\n\t\tconst selectedElement = selection.getSelectedElement();\n\t\tif (selectedElement && this.isObject(selectedElement) && !this.isInline(selectedElement)) {\n\t\t\tif (place == \"before\" || place == \"after\") return new ModelRange(ModelPosition._createAt(selectedElement, place));\n\t\t\treturn ModelRange._createOn(selectedElement);\n\t\t}\n\t\tconst firstBlock = first(selection.getSelectedBlocks());\n\t\tif (!firstBlock) return new ModelRange(selection.focus);\n\t\tif (firstBlock.isEmpty) return new ModelRange(ModelPosition._createAt(firstBlock, 0));\n\t\tconst positionAfter = ModelPosition._createAfter(firstBlock);\n\t\tif (selection.focus.isTouching(positionAfter)) return new ModelRange(positionAfter);\n\t\treturn new ModelRange(ModelPosition._createBefore(firstBlock));\n\t}\n};\n/**\n* A schema context &ndash; a list of ancestors of a given position in the document.\n*\n* Considering such position:\n*\n* ```xml\n* <$root>\n* \t<blockQuote>\n* \t\t<paragraph>\n* \t\t\t^\n* \t\t</paragraph>\n* \t</blockQuote>\n* </$root>\n* ```\n*\n* The context of this position is its {@link module:engine/model/position~ModelPosition#getAncestors lists of ancestors}:\n*\n*\t\t[ rootElement, blockQuoteElement, paragraphElement ]\n*\n* Contexts are used in the {@link module:engine/model/schema~ModelSchema#event:checkChild `Schema#checkChild`} and\n* {@link module:engine/model/schema~ModelSchema#event:checkAttribute `Schema#checkAttribute`} events as a definition\n* of a place in the document where the check occurs. The context instances are created based on the first arguments\n* of the {@link module:engine/model/schema~ModelSchema#checkChild `Schema#checkChild()`} and\n* {@link module:engine/model/schema~ModelSchema#checkAttribute `Schema#checkAttribute()`} methods so when\n* using these methods you need to use {@link module:engine/model/schema~ModelSchemaContextDefinition}s.\n*/\nvar ModelSchemaContext = class ModelSchemaContext {\n\t_items;\n\t/**\n\t* Creates an instance of the context.\n\t*/\n\tconstructor(context) {\n\t\tif (context instanceof ModelSchemaContext) return context;\n\t\tlet items;\n\t\tif (typeof context == \"string\") items = [context];\n\t\telse if (!Array.isArray(context)) items = context.getAncestors({ includeSelf: true });\n\t\telse items = context;\n\t\tthis._items = items.map(mapContextItem);\n\t}\n\t/**\n\t* The number of items.\n\t*/\n\tget length() {\n\t\treturn this._items.length;\n\t}\n\t/**\n\t* The last item (the lowest node).\n\t*/\n\tget last() {\n\t\treturn this._items[this._items.length - 1];\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* Iterates over all context items.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this._items[Symbol.iterator]();\n\t}\n\t/**\n\t* Returns a new schema context instance with an additional item.\n\t*\n\t* Item can be added as:\n\t*\n\t* ```ts\n\t* const context = new ModelSchemaContext( [ '$root' ] );\n\t*\n\t* // An element.\n\t* const fooElement = writer.createElement( 'fooElement' );\n\t* const newContext = context.push( fooElement ); // [ '$root', 'fooElement' ]\n\t*\n\t* // A text node.\n\t* const text = writer.createText( 'foobar' );\n\t* const newContext = context.push( text ); // [ '$root', '$text' ]\n\t*\n\t* // A string (element name).\n\t* const newContext = context.push( 'barElement' ); // [ '$root', 'barElement' ]\n\t* ```\n\t*\n\t* **Note** {@link module:engine/model/node~ModelNode} that is already in the model tree will be added as the only item\n\t* (without ancestors).\n\t*\n\t* @param item An item that will be added to the current context.\n\t* @returns A new schema context instance with an additional item.\n\t*/\n\tpush(item) {\n\t\tconst ctx = new ModelSchemaContext([item]);\n\t\tctx._items = [...this._items, ...ctx._items];\n\t\treturn ctx;\n\t}\n\t/**\n\t* Returns a new schema context that is based on this context but has the last item removed.\n\t*\n\t* ```ts\n\t* const ctxParagraph = new ModelSchemaContext( [ '$root', 'blockQuote', 'paragraph' ] );\n\t* const ctxBlockQuote = ctxParagraph.trimLast(); // Items in `ctxBlockQuote` are: `$root` an `blockQuote`.\n\t* const ctxRoot = ctxBlockQuote.trimLast(); // Items in `ctxRoot` are: `$root`.\n\t* ```\n\t*\n\t* @returns A new reduced schema context instance.\n\t*/\n\ttrimLast() {\n\t\tconst ctx = new ModelSchemaContext([]);\n\t\tctx._items = this._items.slice(0, -1);\n\t\treturn ctx;\n\t}\n\t/**\n\t* Gets an item on the given index.\n\t*/\n\tgetItem(index) {\n\t\treturn this._items[index];\n\t}\n\t/**\n\t* Returns the names of items.\n\t*/\n\t*getNames() {\n\t\tyield* this._items.map((item) => item.name);\n\t}\n\t/**\n\t* Checks whether the context ends with the given nodes.\n\t*\n\t* ```ts\n\t* const ctx = new ModelSchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t*\n\t* ctx.endsWith( '$text' ); // -> true\n\t* ctx.endsWith( 'paragraph $text' ); // -> true\n\t* ctx.endsWith( '$root' ); // -> false\n\t* ctx.endsWith( 'paragraph' ); // -> false\n\t* ```\n\t*/\n\tendsWith(query) {\n\t\treturn Array.from(this.getNames()).join(\" \").endsWith(query);\n\t}\n\t/**\n\t* Checks whether the context starts with the given nodes.\n\t*\n\t* ```ts\n\t* const ctx = new ModelSchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t*\n\t* ctx.endsWith( '$root' ); // -> true\n\t* ctx.endsWith( '$root paragraph' ); // -> true\n\t* ctx.endsWith( '$text' ); // -> false\n\t* ctx.endsWith( 'paragraph' ); // -> false\n\t* ```\n\t*/\n\tstartsWith(query) {\n\t\treturn Array.from(this.getNames()).join(\" \").startsWith(query);\n\t}\n};\nfunction compileBaseItemRule(sourceItemRules, itemName) {\n\tconst itemRule = {\n\t\tname: itemName,\n\t\tallowIn: /* @__PURE__ */ new Set(),\n\t\tallowChildren: /* @__PURE__ */ new Set(),\n\t\tdisallowIn: /* @__PURE__ */ new Set(),\n\t\tdisallowChildren: /* @__PURE__ */ new Set(),\n\t\tallowContentOf: /* @__PURE__ */ new Set(),\n\t\tallowWhere: /* @__PURE__ */ new Set(),\n\t\tallowAttributes: /* @__PURE__ */ new Set(),\n\t\tdisallowAttributes: /* @__PURE__ */ new Set(),\n\t\tallowAttributesOf: /* @__PURE__ */ new Set(),\n\t\tinheritTypesFrom: /* @__PURE__ */ new Set()\n\t};\n\tcopyTypes(sourceItemRules, itemRule);\n\tcopyProperty(sourceItemRules, itemRule, \"allowIn\");\n\tcopyProperty(sourceItemRules, itemRule, \"allowChildren\");\n\tcopyProperty(sourceItemRules, itemRule, \"disallowIn\");\n\tcopyProperty(sourceItemRules, itemRule, \"disallowChildren\");\n\tcopyProperty(sourceItemRules, itemRule, \"allowContentOf\");\n\tcopyProperty(sourceItemRules, itemRule, \"allowWhere\");\n\tcopyProperty(sourceItemRules, itemRule, \"allowAttributes\");\n\tcopyProperty(sourceItemRules, itemRule, \"disallowAttributes\");\n\tcopyProperty(sourceItemRules, itemRule, \"allowAttributesOf\");\n\tcopyProperty(sourceItemRules, itemRule, \"inheritTypesFrom\");\n\tresolveInheritAll(sourceItemRules, itemRule);\n\treturn itemRule;\n}\nfunction propagateAllowIn(definitions, item) {\n\tfor (const parentName of item.allowIn) {\n\t\tconst parentItem = definitions[parentName];\n\t\tif (parentItem) parentItem.allowChildren.add(item.name);\n\t\telse item.allowIn.delete(parentName);\n\t}\n}\nfunction propagateAllowChildren(definitions, item) {\n\tfor (const childName of item.allowChildren) {\n\t\tconst childItem = definitions[childName];\n\t\tif (childItem) childItem.allowIn.add(item.name);\n\t\telse item.allowChildren.delete(childName);\n\t}\n}\nfunction propagateDisallowIn(definitions, item) {\n\tfor (const parentName of item.disallowIn) {\n\t\tconst parentItem = definitions[parentName];\n\t\tif (parentItem) parentItem.disallowChildren.add(item.name);\n\t\telse item.disallowIn.delete(parentName);\n\t}\n}\nfunction propagateDisallowChildren(definitions, item) {\n\tfor (const childName of item.disallowChildren) {\n\t\tconst childItem = definitions[childName];\n\t\tif (childItem) childItem.disallowIn.add(item.name);\n\t\telse item.disallowChildren.delete(childName);\n\t}\n}\nfunction resolveDisallows(definitions, item) {\n\tfor (const childName of item.disallowChildren) item.allowChildren.delete(childName);\n\tfor (const parentName of item.disallowIn) item.allowIn.delete(parentName);\n\tfor (const attributeName of item.disallowAttributes) item.allowAttributes.delete(attributeName);\n}\nfunction compileAllowContentOf(definitions, item) {\n\tfor (const allowContentOfItemName of item.allowContentOf) {\n\t\tconst baseItem = definitions[allowContentOfItemName];\n\t\tif (!baseItem) continue;\n\t\tbaseItem.disallowChildren.forEach((childName) => {\n\t\t\tif (item.allowChildren.has(childName)) return;\n\t\t\titem.disallowChildren.add(childName);\n\t\t\tdefinitions[childName].disallowIn.add(item.name);\n\t\t});\n\t\tbaseItem.allowChildren.forEach((childName) => {\n\t\t\tif (item.disallowChildren.has(childName)) return;\n\t\t\titem.allowChildren.add(childName);\n\t\t\tdefinitions[childName].allowIn.add(item.name);\n\t\t});\n\t}\n}\nfunction compileAllowWhere(definitions, item) {\n\tfor (const allowWhereItemName of item.allowWhere) {\n\t\tconst baseItem = definitions[allowWhereItemName];\n\t\tif (!baseItem) continue;\n\t\tbaseItem.disallowIn.forEach((parentName) => {\n\t\t\tif (item.allowIn.has(parentName)) return;\n\t\t\titem.disallowIn.add(parentName);\n\t\t\tdefinitions[parentName].disallowChildren.add(item.name);\n\t\t});\n\t\tbaseItem.allowIn.forEach((parentName) => {\n\t\t\tif (item.disallowIn.has(parentName)) return;\n\t\t\titem.allowIn.add(parentName);\n\t\t\tdefinitions[parentName].allowChildren.add(item.name);\n\t\t});\n\t}\n}\nfunction compileDefinitions(definitions) {\n\tconst finalDefinitions = {};\n\tfor (const item of Object.values(definitions)) finalDefinitions[item.name] = {\n\t\tname: item.name,\n\t\tisBlock: !!item.isBlock,\n\t\tisContent: !!item.isContent,\n\t\tisInline: !!item.isInline,\n\t\tisLimit: !!item.isLimit,\n\t\tisObject: !!item.isObject,\n\t\tisSelectable: !!item.isSelectable,\n\t\tallowIn: Array.from(item.allowIn).filter((name) => !!definitions[name]),\n\t\tallowChildren: Array.from(item.allowChildren).filter((name) => !!definitions[name]),\n\t\tallowAttributes: Array.from(item.allowAttributes)\n\t};\n\treturn finalDefinitions;\n}\nfunction compileAllowAttributesOf(definitions, item) {\n\tfor (const allowAttributeOfItemName of item.allowAttributesOf) {\n\t\tconst baseItem = definitions[allowAttributeOfItemName];\n\t\tif (!baseItem) return;\n\t\tbaseItem.allowAttributes.forEach((attributeName) => {\n\t\t\tif (item.disallowAttributes.has(attributeName)) return;\n\t\t\titem.allowAttributes.add(attributeName);\n\t\t});\n\t}\n}\nfunction compileInheritPropertiesFrom(definitions, item) {\n\tfor (const inheritPropertiesOfItemName of item.inheritTypesFrom) {\n\t\tconst inheritFrom = definitions[inheritPropertiesOfItemName];\n\t\tif (inheritFrom) {\n\t\t\tconst typeNames = Object.keys(inheritFrom).filter((name) => name.startsWith(\"is\"));\n\t\t\tfor (const name of typeNames) if (!(name in item)) item[name] = inheritFrom[name];\n\t\t}\n\t}\n}\nfunction copyTypes(sourceItemRules, itemRule) {\n\tfor (const sourceItemRule of sourceItemRules) {\n\t\tconst typeNames = Object.keys(sourceItemRule).filter((name) => name.startsWith(\"is\"));\n\t\tfor (const name of typeNames) itemRule[name] = !!sourceItemRule[name];\n\t}\n}\nfunction copyProperty(sourceItemRules, itemRule, propertyName) {\n\tfor (const sourceItemRule of sourceItemRules) {\n\t\tlet value = sourceItemRule[propertyName];\n\t\tif (typeof value == \"string\") value = [value];\n\t\tif (Array.isArray(value)) value.forEach((singleValue) => itemRule[propertyName].add(singleValue));\n\t}\n}\nfunction resolveInheritAll(sourceItemRules, itemRule) {\n\tfor (const sourceItemRule of sourceItemRules) {\n\t\tconst inheritFrom = sourceItemRule.inheritAllFrom;\n\t\tif (inheritFrom) {\n\t\t\titemRule.allowContentOf.add(inheritFrom);\n\t\t\titemRule.allowWhere.add(inheritFrom);\n\t\t\titemRule.allowAttributesOf.add(inheritFrom);\n\t\t\titemRule.inheritTypesFrom.add(inheritFrom);\n\t\t}\n\t}\n}\nfunction mapContextItem(ctxItem) {\n\tif (typeof ctxItem == \"string\" || ctxItem.is(\"documentFragment\")) return {\n\t\tname: typeof ctxItem == \"string\" ? ctxItem : \"$documentFragment\",\n\t\t*getAttributeKeys() {},\n\t\tgetAttribute() {}\n\t};\n\telse return {\n\t\tname: ctxItem.is(\"element\") ? ctxItem.name : \"$text\",\n\t\t*getAttributeKeys() {\n\t\t\tyield* ctxItem.getAttributeKeys();\n\t\t},\n\t\tgetAttribute(key) {\n\t\t\treturn ctxItem.getAttribute(key);\n\t\t}\n\t};\n}\n/**\n* Generator function returning values from provided walkers, switching between them at each iteration. If only one walker\n* is provided it will return data only from that walker.\n*\n* @param backward Walker iterating in backward direction.\n* @param forward Walker iterating in forward direction.\n* @returns Object returned at each iteration contains `value` and `walker` (informing which walker returned\n* given value) fields.\n*/\nfunction* combineWalkers(backward, forward) {\n\tlet done = false;\n\twhile (!done) {\n\t\tdone = true;\n\t\tif (backward) {\n\t\t\tconst step = backward.next();\n\t\t\tif (!step.done) {\n\t\t\t\tdone = false;\n\t\t\t\tyield {\n\t\t\t\t\twalker: backward,\n\t\t\t\t\tvalue: step.value\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tif (forward) {\n\t\t\tconst step = forward.next();\n\t\t\tif (!step.done) {\n\t\t\t\tdone = false;\n\t\t\t\tyield {\n\t\t\t\t\twalker: forward,\n\t\t\t\t\tvalue: step.value\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n/**\n* Takes an array of non-intersecting ranges. For each of them gets minimal flat ranges covering that range and returns\n* all those minimal flat ranges.\n*\n* @param ranges Ranges to process.\n* @returns Minimal flat ranges of given `ranges`.\n*/\nfunction* convertToMinimalFlatRanges(ranges) {\n\tfor (const range of ranges) yield* range.getMinimalFlatRanges();\n}\nfunction removeDisallowedAttributeFromNode(schema, node, writer) {\n\tfor (const attribute of node.getAttributeKeys()) if (!schema.checkAttribute(node, attribute)) writer.removeAttribute(attribute, 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 engine/conversion/upcastdispatcher\n*/\nconst UpcastDispatcherBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Upcast dispatcher is a central point of the view-to-model conversion, which is a process of\n* converting a given {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment} or\n* {@link module:engine/view/element~ViewElement view element} into a correct model structure.\n*\n* During the conversion process, the dispatcher fires events for all {@link module:engine/view/node~ViewNode view nodes}\n* from the converted view document fragment.\n* Special callbacks called \"converters\" should listen to these events in order to convert the view nodes.\n*\n* The second parameter of the callback is the `data` object with the following properties:\n*\n* * `data.viewItem` contains a {@link module:engine/view/node~ViewNode view node} or a\n* {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment}\n* that is converted at the moment and might be handled by the callback.\n* * `data.modelRange` is used to point to the result\n* of the current conversion (e.g. the element that is being inserted)\n* and is always a {@link module:engine/model/range~ModelRange} when the conversion succeeds.\n* * `data.modelCursor` is a {@link module:engine/model/position~ModelPosition position} on which the converter should insert\n* the newly created items.\n*\n* The third parameter of the callback is an instance of {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi}\n* which provides additional tools for converters.\n*\n* You can read more about conversion in the {@glink framework/deep-dive/conversion/upcast Upcast conversion} guide.\n*\n* Examples of event-based converters:\n*\n* ```ts\n* // A converter for links (<a>).\n* editor.data.upcastDispatcher.on( 'element:a', ( evt, data, conversionApi ) => {\n* \tif ( conversionApi.consumable.consume( data.viewItem, { name: true, attributes: [ 'href' ] } ) ) {\n* \t\t// The <a> element is inline and is represented by an attribute in the model.\n* \t\t// This is why you need to convert only children.\n* \t\tconst { modelRange } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n*\n* \t\tfor ( let item of modelRange.getItems() ) {\n* \t\t\tif ( conversionApi.schema.checkAttribute( item, 'linkHref' ) ) {\n* \t\t\t\tconversionApi.writer.setAttribute( 'linkHref', data.viewItem.getAttribute( 'href' ), item );\n* \t\t\t}\n* \t\t}\n* \t}\n* } );\n*\n* // Convert <p> element's font-size style.\n* // Note: You should use a low-priority observer in order to ensure that\n* // it is executed after the element-to-element converter.\n* editor.data.upcastDispatcher.on( 'element:p', ( evt, data, conversionApi ) => {\n* \tconst { consumable, schema, writer } = conversionApi;\n*\n* \tif ( !consumable.consume( data.viewItem, { style: 'font-size' } ) ) {\n* \t\treturn;\n* \t}\n*\n* \tconst fontSize = data.viewItem.getStyle( 'font-size' );\n*\n* \t// Do not go for the model element after data.modelCursor because it might happen\n* \t// that a single view element was converted to multiple model elements. Get all of them.\n* \tfor ( const item of data.modelRange.getItems( { shallow: true } ) ) {\n* \t\tif ( schema.checkAttribute( item, 'fontSize' ) ) {\n* \t\t\twriter.setAttribute( 'fontSize', fontSize, item );\n* \t\t}\n* \t}\n* }, { priority: 'low' } );\n*\n* // Convert all elements which have no custom converter into a paragraph (autoparagraphing).\n* editor.data.upcastDispatcher.on( 'element', ( evt, data, conversionApi ) => {\n* \t// Check if an element can be converted.\n* \tif ( !conversionApi.consumable.test( data.viewItem, { name: data.viewItem.name } ) ) {\n* \t\t// When an element is already consumed by higher priority converters, do nothing.\n* \t\treturn;\n* \t}\n*\n* \tconst paragraph = conversionApi.writer.createElement( 'paragraph' );\n*\n* \t// Try to safely insert a paragraph at the model cursor - it will find an allowed parent for the current element.\n* \tif ( !conversionApi.safeInsert( paragraph, data.modelCursor ) ) {\n* \t\t// When an element was not inserted, it means that you cannot insert a paragraph at this position.\n* \t\treturn;\n* \t}\n*\n* \t// Consume the inserted element.\n* \tconversionApi.consumable.consume( data.viewItem, { name: data.viewItem.name } ) );\n*\n* \t// Convert the children to a paragraph.\n* \tconst { modelRange } = conversionApi.convertChildren( data.viewItem,  paragraph ) );\n*\n* \t// Update `modelRange` and `modelCursor` in the `data` as a conversion result.\n* \tconversionApi.updateConversionResult( paragraph, data );\n* }, { priority: 'low' } );\n* ```\n*\n* @fires viewCleanup\n* @fires element\n* @fires text\n* @fires documentFragment\n*/\nvar UpcastDispatcher = class extends UpcastDispatcherBase {\n\t/**\n\t* An interface passed by the dispatcher to the event callbacks.\n\t*/\n\tconversionApi;\n\t/**\n\t* The list of elements that were created during splitting.\n\t*\n\t* After the conversion process, the list is cleared.\n\t*/\n\t_splitParts = /* @__PURE__ */ new Map();\n\t/**\n\t* The list of cursor parent elements that were created during splitting.\n\t*\n\t* After the conversion process the list is cleared.\n\t*/\n\t_cursorParents = /* @__PURE__ */ new Map();\n\t/**\n\t* The position in the temporary structure where the converted content is inserted. The structure reflects the context of\n\t* the target position where the content will be inserted. This property is built based on the context parameter of the\n\t* convert method.\n\t*/\n\t_modelCursor = null;\n\t/**\n\t* The list of elements that were created during the splitting but should not get removed on conversion end even if they are empty.\n\t*\n\t* The list is cleared after the conversion process.\n\t*/\n\t_emptyElementsToKeep = /* @__PURE__ */ new Set();\n\t/**\n\t* Creates an upcast dispatcher that operates using the passed API.\n\t*\n\t* @see module:engine/conversion/upcastdispatcher~UpcastConversionApi\n\t* @param conversionApi Additional properties for an interface that will be passed to events fired\n\t* by the upcast dispatcher.\n\t*/\n\tconstructor(conversionApi) {\n\t\tsuper();\n\t\tthis.conversionApi = {\n\t\t\t...conversionApi,\n\t\t\tconsumable: null,\n\t\t\twriter: null,\n\t\t\tstore: null,\n\t\t\tconvertItem: (viewItem, modelCursor) => this._convertItem(viewItem, modelCursor),\n\t\t\tconvertChildren: (viewElement, positionOrElement) => this._convertChildren(viewElement, positionOrElement),\n\t\t\tsafeInsert: (modelNode, position) => this._safeInsert(modelNode, position),\n\t\t\tupdateConversionResult: (modelElement, data) => this._updateConversionResult(modelElement, data),\n\t\t\tsplitToAllowedParent: (modelNode, modelCursor) => this._splitToAllowedParent(modelNode, modelCursor),\n\t\t\tgetSplitParts: (modelElement) => this._getSplitParts(modelElement),\n\t\t\tkeepEmptyElement: (modelElement) => this._keepEmptyElement(modelElement)\n\t\t};\n\t}\n\t/**\n\t* Starts the conversion process. The entry point for the conversion.\n\t*\n\t* **Note:** The default `context` value is `[ '$root' ]`, which only matches the generic root. When the editor uses\n\t* a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n\t* {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n\t* explicitly, otherwise the conversion result may be wrong.\n\t* See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t* {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*\n\t* @fires element\n\t* @fires text\n\t* @fires documentFragment\n\t* @param viewElement The part of the view to be converted.\n\t* @param writer An instance of the model writer.\n\t* @param context Elements will be converted according to this context.\n\t* @returns Model data that is the result of the conversion process\n\t* wrapped in `DocumentFragment`. Converted marker elements will be set as the document fragment's\n\t* {@link module:engine/model/documentfragment~ModelDocumentFragment#markers static markers map}.\n\t*/\n\tconvert(viewElement, writer, context = [\"$root\"]) {\n\t\tthis.fire(\"viewCleanup\", viewElement);\n\t\tthis._modelCursor = createContextTree(context, writer);\n\t\tthis.conversionApi.writer = writer;\n\t\tthis.conversionApi.consumable = ViewConsumable.createFrom(viewElement);\n\t\tthis.conversionApi.store = {};\n\t\tconst { modelRange } = this._convertItem(viewElement, this._modelCursor);\n\t\tconst documentFragment = writer.createDocumentFragment();\n\t\tif (modelRange) {\n\t\t\tthis._removeEmptyElements();\n\t\t\tconst parent = this._modelCursor.parent;\n\t\t\tconst children = parent._removeChildren(0, parent.childCount);\n\t\t\tdocumentFragment._insertChild(0, children);\n\t\t\tdocumentFragment.markers = extractMarkersFromModelFragment(documentFragment, writer);\n\t\t}\n\t\tthis._modelCursor = null;\n\t\tthis._splitParts.clear();\n\t\tthis._cursorParents.clear();\n\t\tthis._emptyElementsToKeep.clear();\n\t\tthis.conversionApi.writer = null;\n\t\tthis.conversionApi.store = null;\n\t\treturn documentFragment;\n\t}\n\t/**\n\t* @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertItem\n\t*/\n\t_convertItem(viewItem, modelCursor) {\n\t\tconst data = {\n\t\t\tviewItem,\n\t\t\tmodelCursor,\n\t\t\tmodelRange: null\n\t\t};\n\t\tif (viewItem.is(\"element\")) this.fire(`element:${viewItem.name}`, data, this.conversionApi);\n\t\telse if (viewItem.is(\"$text\")) this.fire(\"text\", data, this.conversionApi);\n\t\telse this.fire(\"documentFragment\", data, this.conversionApi);\n\t\tif (data.modelRange && !(data.modelRange instanceof ModelRange))\n /**\n\t\t* Incorrect conversion result was dropped.\n\t\t*\n\t\t* {@link module:engine/model/range~ModelRange Model range} should be a conversion result.\n\t\t*\n\t\t* @error view-conversion-dispatcher-incorrect-result\n\t\t*/\n\t\tthrow new CKEditorError(\"view-conversion-dispatcher-incorrect-result\", this);\n\t\treturn {\n\t\t\tmodelRange: data.modelRange,\n\t\t\tmodelCursor: data.modelCursor\n\t\t};\n\t}\n\t/**\n\t* @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertChildren\n\t*/\n\t_convertChildren(viewItem, elementOrModelCursor) {\n\t\tlet nextModelCursor = elementOrModelCursor.is(\"position\") ? elementOrModelCursor : ModelPosition._createAt(elementOrModelCursor, 0);\n\t\tconst modelRange = new ModelRange(nextModelCursor);\n\t\tfor (const viewChild of Array.from(viewItem.getChildren())) {\n\t\t\tconst result = this._convertItem(viewChild, nextModelCursor);\n\t\t\tif (result.modelRange instanceof ModelRange) {\n\t\t\t\tmodelRange.end = result.modelRange.end;\n\t\t\t\tnextModelCursor = result.modelCursor;\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tmodelRange,\n\t\t\tmodelCursor: nextModelCursor\n\t\t};\n\t}\n\t/**\n\t* @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#safeInsert\n\t*/\n\t_safeInsert(modelNode, position) {\n\t\tconst splitResult = this._splitToAllowedParent(modelNode, position);\n\t\tif (!splitResult) return false;\n\t\tthis.conversionApi.writer.insert(modelNode, splitResult.position);\n\t\treturn true;\n\t}\n\t/**\n\t* @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#updateConversionResult\n\t*/\n\t_updateConversionResult(modelElement, data) {\n\t\tconst parts = this._getSplitParts(modelElement);\n\t\tconst writer = this.conversionApi.writer;\n\t\tif (!data.modelRange) data.modelRange = writer.createRange(writer.createPositionBefore(modelElement), writer.createPositionAfter(parts[parts.length - 1]));\n\t\tconst savedCursorParent = this._cursorParents.get(modelElement);\n\t\tif (savedCursorParent) data.modelCursor = writer.createPositionAt(savedCursorParent, 0);\n\t\telse data.modelCursor = data.modelRange.end;\n\t}\n\t/**\n\t* @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#splitToAllowedParent\n\t*/\n\t_splitToAllowedParent(node, modelCursor) {\n\t\tconst { schema, writer } = this.conversionApi;\n\t\tlet allowedParent = schema.findAllowedParent(modelCursor, node);\n\t\tif (allowedParent) {\n\t\t\tif (allowedParent === modelCursor.parent) return { position: modelCursor };\n\t\t\tif (this._modelCursor.parent.getAncestors().includes(allowedParent)) allowedParent = null;\n\t\t}\n\t\tif (!allowedParent) {\n\t\t\tif (!isParagraphable(modelCursor, node, schema)) return null;\n\t\t\treturn { position: wrapInParagraph(modelCursor, writer) };\n\t\t}\n\t\tconst splitResult = this.conversionApi.writer.split(modelCursor, allowedParent);\n\t\tconst stack = [];\n\t\tfor (const treeWalkerValue of splitResult.range.getWalker()) if (treeWalkerValue.type == \"elementEnd\") stack.push(treeWalkerValue.item);\n\t\telse {\n\t\t\tconst originalPart = stack.pop();\n\t\t\tconst splitPart = treeWalkerValue.item;\n\t\t\tthis._registerSplitPair(originalPart, splitPart);\n\t\t}\n\t\tconst cursorParent = splitResult.range.end.parent;\n\t\tthis._cursorParents.set(node, cursorParent);\n\t\treturn {\n\t\t\tposition: splitResult.position,\n\t\t\tcursorParent\n\t\t};\n\t}\n\t/**\n\t* Registers that a `splitPart` element is a split part of the `originalPart` element.\n\t*\n\t* The data set by this method is used by {@link #_getSplitParts} and {@link #_removeEmptyElements}.\n\t*/\n\t_registerSplitPair(originalPart, splitPart) {\n\t\tif (!this._splitParts.has(originalPart)) this._splitParts.set(originalPart, [originalPart]);\n\t\tconst list = this._splitParts.get(originalPart);\n\t\tthis._splitParts.set(splitPart, list);\n\t\tlist.push(splitPart);\n\t}\n\t/**\n\t* @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#getSplitParts\n\t*/\n\t_getSplitParts(element) {\n\t\tlet parts;\n\t\tif (!this._splitParts.has(element)) parts = [element];\n\t\telse parts = this._splitParts.get(element);\n\t\treturn parts;\n\t}\n\t/**\n\t* Mark an element that were created during the splitting to not get removed on conversion end even if it is empty.\n\t*/\n\t_keepEmptyElement(element) {\n\t\tthis._emptyElementsToKeep.add(element);\n\t}\n\t/**\n\t* Checks if there are any empty elements created while splitting and removes them.\n\t*\n\t* This method works recursively to re-check empty elements again after at least one element was removed in the initial call,\n\t* as some elements might have become empty after other empty elements were removed from them.\n\t*/\n\t_removeEmptyElements() {\n\t\tconst toRemove = /* @__PURE__ */ new Map();\n\t\tfor (const element of this._splitParts.keys()) if (element.isEmpty && !this._emptyElementsToKeep.has(element)) {\n\t\t\tconst children = toRemove.get(element.parent) || [];\n\t\t\tchildren.push(element);\n\t\t\tthis._splitParts.delete(element);\n\t\t\ttoRemove.set(element.parent, children);\n\t\t}\n\t\tfor (const [parent, children] of toRemove) parent._removeChildrenArray(children);\n\t\tif (toRemove.size) this._removeEmptyElements();\n\t}\n};\n/**\n* Traverses given model item and searches elements which marks marker range. Found element is removed from\n* ModelDocumentFragment but path of this element is stored in a Map which is then returned.\n*\n* @param modelItem Fragment of model.\n* @returns List of static markers.\n*/\nfunction extractMarkersFromModelFragment(modelItem, writer) {\n\tconst markerElements = /* @__PURE__ */ new Set();\n\tconst markers = /* @__PURE__ */ new Map();\n\tconst range = ModelRange._createIn(modelItem).getItems();\n\tfor (const item of range) if (item.is(\"element\", \"$marker\")) markerElements.add(item);\n\tfor (const markerElement of markerElements) {\n\t\tconst markerName = markerElement.getAttribute(\"data-name\");\n\t\tconst currentPosition = writer.createPositionBefore(markerElement);\n\t\tif (!markers.has(markerName)) markers.set(markerName, new ModelRange(currentPosition.clone()));\n\t\telse markers.get(markerName).end = currentPosition.clone();\n\t\twriter.remove(markerElement);\n\t}\n\treturn markers;\n}\n/**\n* Creates model fragment according to given context and returns position in the bottom (the deepest) element.\n*/\nfunction createContextTree(contextDefinition, writer) {\n\tlet position;\n\tfor (const item of new ModelSchemaContext(contextDefinition)) {\n\t\tconst attributes = {};\n\t\tfor (const key of item.getAttributeKeys()) attributes[key] = item.getAttribute(key);\n\t\tconst current = writer.createElement(item.name, attributes);\n\t\tif (position) writer.insert(current, position);\n\t\tposition = ModelPosition._createAt(current, 0);\n\t}\n\treturn position;\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* Basic HTML writer. It uses the native `innerHTML` property for basic conversion\n* from a document fragment to an HTML string.\n*\n* @internal\n*/\nvar BasicHtmlWriter = class {\n\t/**\n\t* Returns an HTML string created from the document fragment.\n\t*/\n\tgetHtml(fragment) {\n\t\tconst container = global.document.implementation.createHTMLDocument(\"\").createElement(\"div\");\n\t\tcontainer.appendChild(fragment);\n\t\treturn container.innerHTML;\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 engine/dataprocessor/htmldataprocessor\n*/\n/**\n* The HTML data processor class.\n* This data processor implementation uses HTML as input and output data.\n*/\nvar HtmlDataProcessor = class {\n\t/**\n\t* A DOM parser instance used to parse an HTML string to an HTML document.\n\t*/\n\tdomParser;\n\t/**\n\t* A DOM converter used to convert DOM elements to view elements.\n\t*/\n\tdomConverter;\n\t/**\n\t* A basic HTML writer instance used to convert DOM elements to an HTML string.\n\t*/\n\thtmlWriter;\n\tskipComments = true;\n\t/**\n\t* Creates a new instance of the HTML data processor class.\n\t*\n\t* @param document The view document instance.\n\t*/\n\tconstructor(document) {\n\t\tthis.domParser = new DOMParser();\n\t\tthis.domConverter = new ViewDomConverter(document, { renderingMode: \"data\" });\n\t\tthis.htmlWriter = new BasicHtmlWriter();\n\t}\n\t/**\n\t* Converts a provided {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}\n\t* to data format &ndash; in this case to an HTML string.\n\t*\n\t* @returns HTML string.\n\t*/\n\ttoData(viewFragment) {\n\t\tconst domFragment = this.domConverter.viewToDom(viewFragment);\n\t\treturn this.htmlWriter.getHtml(domFragment);\n\t}\n\t/**\n\t* Converts the provided HTML string to a view tree.\n\t*\n\t* @param data An HTML string.\n\t* @returns A converted view element.\n\t*/\n\ttoView(data) {\n\t\tconst domFragment = this._toDom(data);\n\t\treturn this.domConverter.domToView(domFragment, { skipComments: this.skipComments });\n\t}\n\t/**\n\t* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t* and not processed during the conversion from the DOM to the view elements.\n\t*\n\t* The raw data can be later accessed by a\n\t* {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t*\n\t* @param pattern Pattern matching all view elements whose content should be treated as raw data.\n\t*/\n\tregisterRawContentMatcher(pattern) {\n\t\tthis.domConverter.registerRawContentMatcher(pattern);\n\t}\n\t/**\n\t* If the processor is set to use marked fillers, it will insert `&nbsp;` fillers wrapped in `<span>` elements\n\t* (`<span data-cke-filler=\"true\">&nbsp;</span>`) instead of regular `&nbsp;` characters.\n\t*\n\t* This mode allows for a more precise handling of the block fillers (so they do not leak into the editor content) but\n\t* bloats the editor data with additional markup.\n\t*\n\t* This mode may be required by some features and will be turned on by them automatically.\n\t*\n\t* @param type Whether to use the default or the marked `&nbsp;` block fillers.\n\t*/\n\tuseFillerType(type) {\n\t\tthis.domConverter.blockFillerMode = type == \"marked\" ? \"markedNbsp\" : \"nbsp\";\n\t}\n\t/**\n\t* Converts an HTML string to its DOM representation. Returns a document fragment containing nodes parsed from\n\t* the provided data.\n\t*/\n\t_toDom(data) {\n\t\tif (!/<(?:html|body|head|meta)(?:\\s[^>]*)?>/i.test(data.trim().slice(0, 1e4))) data = `<body>${data}</body>`;\n\t\tconst document = this.domParser.parseFromString(data, \"text/html\");\n\t\tconst fragment = document.createDocumentFragment();\n\t\tconst bodyChildNodes = document.body.childNodes;\n\t\twhile (bodyChildNodes.length > 0) fragment.appendChild(bodyChildNodes[0]);\n\t\treturn fragment;\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 engine/controller/datacontroller\n*/\nconst DataControllerBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Controller for the data pipeline. The data pipeline controls how data is retrieved from the document\n* and set inside it. Hence, the controller features two methods which allow to {@link ~DataController#get get}\n* and {@link ~DataController#set set} data of the {@link ~DataController#model model}\n* using the given:\n*\n* * {@link module:engine/dataprocessor/dataprocessor~DataProcessor data processor},\n* * downcast converters,\n* * upcast converters.\n*\n* An instance of the data controller is always available in the {@link module:core/editor/editor~Editor#data `editor.data`}\n* property:\n*\n* ```ts\n* editor.data.get( { rootName: 'customRoot' } ); // -> '<p>Hello!</p>'\n* ```\n*/\nvar DataController = class extends DataControllerBase {\n\t/**\n\t* Data model.\n\t*/\n\tmodel;\n\t/**\n\t* Mapper used for the conversion. It has no permanent bindings, because these are created while getting data and\n\t* are cleared directly after the data are converted. However, the mapper is defined as a class property, because\n\t* it needs to be passed to the `DowncastDispatcher` as a conversion API.\n\t*/\n\tmapper;\n\t/**\n\t* Downcast dispatcher used by the {@link #get get method}. Downcast converters should be attached to it.\n\t*/\n\tdowncastDispatcher;\n\t/**\n\t* Upcast dispatcher used by the {@link #set set method}. Upcast converters should be attached to it.\n\t*/\n\tupcastDispatcher;\n\t/**\n\t* The view document used by the data controller.\n\t*/\n\tviewDocument;\n\t/**\n\t* Styles processor used during the conversion.\n\t*/\n\tstylesProcessor;\n\t/**\n\t* Data processor used specifically for HTML conversion.\n\t*/\n\thtmlProcessor;\n\t/**\n\t* Data processor used during the conversion.\n\t* Same instance as {@link #htmlProcessor} by default. Can be replaced at run time to handle different format, e.g. XML or Markdown.\n\t*/\n\tprocessor;\n\t/**\n\t* The view downcast writer just for data conversion purposes, i.e. to modify\n\t* the {@link #viewDocument}.\n\t*/\n\t_viewWriter;\n\t/**\n\t* Creates a data controller instance.\n\t*\n\t* @param model Data model.\n\t* @param stylesProcessor The styles processor instance.\n\t*/\n\tconstructor(model, stylesProcessor) {\n\t\tsuper();\n\t\tthis.model = model;\n\t\tthis.mapper = new Mapper();\n\t\tthis.downcastDispatcher = new DowncastDispatcher({\n\t\t\tmapper: this.mapper,\n\t\t\tschema: model.schema\n\t\t});\n\t\tthis.downcastDispatcher.on(\"insert:$text\", insertText(), { priority: \"lowest\" });\n\t\tthis.downcastDispatcher.on(\"insert\", insertAttributesAndChildren(), { priority: \"lowest\" });\n\t\tthis.upcastDispatcher = new UpcastDispatcher({ schema: model.schema });\n\t\tthis.viewDocument = new ViewDocument(stylesProcessor);\n\t\tthis.stylesProcessor = stylesProcessor;\n\t\tthis.htmlProcessor = new HtmlDataProcessor(this.viewDocument);\n\t\tthis.processor = this.htmlProcessor;\n\t\tthis._viewWriter = new ViewDowncastWriter(this.viewDocument);\n\t\tthis.upcastDispatcher.on(\"text\", convertText(), { priority: \"lowest\" });\n\t\tthis.upcastDispatcher.on(\"element\", convertToModelFragment(), { priority: \"lowest\" });\n\t\tthis.upcastDispatcher.on(\"documentFragment\", convertToModelFragment(), { priority: \"lowest\" });\n\t\tObservableMixin().prototype.decorate.call(this, \"init\");\n\t\tObservableMixin().prototype.decorate.call(this, \"set\");\n\t\tObservableMixin().prototype.decorate.call(this, \"get\");\n\t\tObservableMixin().prototype.decorate.call(this, \"toView\");\n\t\tObservableMixin().prototype.decorate.call(this, \"toModel\");\n\t\tthis.on(\"init\", () => {\n\t\t\tthis.fire(\"ready\");\n\t\t}, { priority: \"lowest\" });\n\t\tthis.on(\"ready\", () => {\n\t\t\tthis.model.enqueueChange({ isUndoable: false }, autoParagraphEmptyRoots);\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* Returns the model's data converted by downcast dispatchers attached to {@link #downcastDispatcher} and\n\t* formatted by the {@link #processor data processor}.\n\t*\n\t* A warning is logged when you try to retrieve data for a detached root, as most probably this is a mistake. A detached root should\n\t* be treated like it is removed, and you should not save its data. Note, that the detached root data is always an empty string.\n\t*\n\t* @fires get\n\t* @param options Additional configuration for the retrieved data. `DataController` provides two optional\n\t* properties: `rootName` and `trim`. Other properties of this object are specified by various editor features.\n\t* @param options.rootName Root name. Default 'main'.\n\t* @param options.trim Whether returned data should be trimmed. This option is set to `empty` by default,\n\t* which means whenever editor content is considered empty, an empty string will be returned. To turn off trimming completely\n\t* use `'none'`. In such cases the exact content will be returned (for example a `<p>&nbsp;</p>` for an empty editor).\n\t* @returns Output data.\n\t*/\n\tget(options = {}) {\n\t\tconst { rootName = \"main\", trim = \"empty\" } = options;\n\t\tif (!this._checkIfRootsExists([rootName]))\n /**\n\t\t* Cannot get data from a non-existing root. This error is thrown when\n\t\t* {@link module:engine/controller/datacontroller~DataController#get `DataController#get()` method}\n\t\t* is called with a non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t* calling {@link module:engine/controller/datacontroller~DataController#get} like:\n\t\t*\n\t\t* ```ts\n\t\t* data.get( { rootName: 'root2' } );\n\t\t* ```\n\t\t*\n\t\t* will throw this error.\n\t\t*\n\t\t* @error datacontroller-get-non-existent-root\n\t\t*/\n\t\tthrow new CKEditorError(\"datacontroller-get-non-existent-root\", this);\n\t\tconst root = this.model.document.getRoot(rootName);\n\t\tif (!root.isAttached())\n /**\n\t\t* Retrieving document data for a detached root.\n\t\t*\n\t\t* This usually indicates an error as a detached root should be considered \"removed\" and should not be included in the\n\t\t* document data.\n\t\t*\n\t\t* @error datacontroller-get-detached-root\n\t\t*/\n\t\tlogWarning(\"datacontroller-get-detached-root\", this);\n\t\tif (trim === \"empty\" && !this.model.hasContent(root, { ignoreWhitespaces: true })) return \"\";\n\t\treturn this.stringify(root, options);\n\t}\n\t/**\n\t* Returns the content of the given {@link module:engine/model/element~ModelElement model's element} or\n\t* {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment} converted by the downcast converters\n\t* attached to the {@link #downcastDispatcher} and formatted by the {@link #processor data processor}.\n\t*\n\t* @param modelElementOrFragment The element whose content will be stringified.\n\t* @param options Additional configuration passed to the conversion process.\n\t* @returns Output data.\n\t*/\n\tstringify(modelElementOrFragment, options = {}) {\n\t\tconst viewDocumentFragment = this.toView(modelElementOrFragment, options);\n\t\treturn this.processor.toData(viewDocumentFragment);\n\t}\n\t/**\n\t* Returns the content of the given {@link module:engine/model/element~ModelElement model element} or\n\t* {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment} converted by the downcast\n\t* converters attached to {@link #downcastDispatcher} into a\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment}.\n\t*\n\t* @fires toView\n\t* @param modelElementOrFragment Element or document fragment whose content will be converted.\n\t* @param options Additional configuration that will be available through the\n\t* {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#options} during the conversion process.\n\t* @returns Output view ModelDocumentFragment.\n\t*/\n\ttoView(modelElementOrFragment, options = {}) {\n\t\tconst viewDocument = this.viewDocument;\n\t\tconst viewWriter = this._viewWriter;\n\t\tthis.mapper.clearBindings();\n\t\tconst modelRange = ModelRange._createIn(modelElementOrFragment);\n\t\tconst viewDocumentFragment = new ViewDocumentFragment(viewDocument);\n\t\tthis.mapper.bindElements(modelElementOrFragment, viewDocumentFragment);\n\t\tconst markers = modelElementOrFragment.is(\"documentFragment\") ? modelElementOrFragment.markers : _getMarkersRelativeToElement(modelElementOrFragment);\n\t\tthis.downcastDispatcher.convert(modelRange, markers, viewWriter, options);\n\t\treturn viewDocumentFragment;\n\t}\n\t/**\n\t* Sets the initial input data parsed by the {@link #processor data processor} and\n\t* converted by the {@link #upcastDispatcher view-to-model converters}.\n\t* Initial data can be only set to a document whose {@link module:engine/model/document~ModelDocument#version} is equal 0.\n\t*\n\t* **Note** This method is {@link module:utils/observablemixin~Observable#decorate decorated} which is\n\t* used by e.g. collaborative editing plugin that syncs remote data on init.\n\t*\n\t* When data is passed as a string, it is initialized on the default `main` root:\n\t*\n\t* ```ts\n\t* dataController.init( '<p>Foo</p>' ); // Initializes data on the `main` root only, as no other is specified.\n\t* ```\n\t*\n\t* To initialize data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t*\n\t* ```ts\n\t* dataController.init( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Initializes data on both the `main` and `title` roots.\n\t* ```\n\t*\n\t* @fires init\n\t* @param data Input data as a string or an object containing the `rootName` - `data`\n\t* pairs to initialize data on multiple roots at once.\n\t* @returns Promise that is resolved after the data is set on the editor.\n\t*/\n\tinit(data) {\n\t\tif (this.model.document.version)\n /**\n\t\t* Cannot set initial data to a non-empty {@link module:engine/model/document~ModelDocument}.\n\t\t* Initial data should be set once, during the {@link module:core/editor/editor~Editor} initialization,\n\t\t* when the {@link module:engine/model/document~ModelDocument#version} is equal 0.\n\t\t*\n\t\t* @error datacontroller-init-document-not-empty\n\t\t*/\n\t\tthrow new CKEditorError(\"datacontroller-init-document-not-empty\", this);\n\t\tlet initialData = {};\n\t\tif (typeof data === \"string\") initialData.main = data;\n\t\telse initialData = data;\n\t\tif (!this._checkIfRootsExists(Object.keys(initialData)))\n /**\n\t\t* Cannot init data on a non-existent root. This error is thrown when\n\t\t* {@link module:engine/controller/datacontroller~DataController#init DataController#init() method}\n\t\t* is called with non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t* calling {@link module:engine/controller/datacontroller~DataController#init} like:\n\t\t*\n\t\t* ```ts\n\t\t* data.init( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t* ```\n\t\t*\n\t\t* will throw this error.\n\t\t*\n\t\t* @error datacontroller-init-non-existent-root\n\t\t*/\n\t\tthrow new CKEditorError(\"datacontroller-init-non-existent-root\", this);\n\t\tthis.model.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\tfor (const rootName of Object.keys(initialData)) {\n\t\t\t\tconst modelRoot = this.model.document.getRoot(rootName);\n\t\t\t\twriter.insert(this.parse(initialData[rootName], modelRoot), modelRoot, 0);\n\t\t\t}\n\t\t});\n\t\treturn Promise.resolve();\n\t}\n\t/**\n\t* Sets the input data parsed by the {@link #processor data processor} and\n\t* converted by the {@link #upcastDispatcher view-to-model converters}.\n\t* This method can be used any time to replace existing editor data with the new one without clearing the\n\t* {@link module:engine/model/document~ModelDocument#history document history}.\n\t*\n\t* This method also creates a batch with all the changes applied. If all you need is to parse data, use\n\t* the {@link #parse} method.\n\t*\n\t* When data is passed as a string it is set on the default `main` root:\n\t*\n\t* ```ts\n\t* dataController.set( '<p>Foo</p>' ); // Sets data on the `main` root, as no other is specified.\n\t* ```\n\t*\n\t* To set data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t*\n\t* ```ts\n\t* dataController.set( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Sets data on the `main` and `title` roots as specified.\n\t* ```\n\t*\n\t* To set the data with a preserved undo stack and add the change to the undo stack, set `{ isUndoable: true }` as a `batchType` option.\n\t*\n\t* ```ts\n\t* dataController.set( '<p>Foo</p>', { batchType: { isUndoable: true } } );\n\t* ```\n\t*\n\t* @fires set\n\t* @param data Input data as a string or an object containing the `rootName` - `data`\n\t* pairs to set data on multiple roots at once.\n\t* @param options Options for setting data.\n\t* @param options.batchType The batch type that will be used to create a batch for the changes applied by this method.\n\t* By default, the batch will be set as {@link module:engine/model/batch~Batch#isUndoable not undoable} and the undo stack will be\n\t* cleared after the new data is applied (all undo steps will be removed). If the batch type `isUndoable` flag is be set to `true`,\n\t* the undo stack will be preserved instead and not cleared when new data is applied.\n\t*/\n\tset(data, options = {}) {\n\t\tlet newData = {};\n\t\tif (typeof data === \"string\") newData.main = data;\n\t\telse newData = data;\n\t\tif (!this._checkIfRootsExists(Object.keys(newData)))\n /**\n\t\t* Cannot set data on a non-existent root. This error is thrown when the\n\t\t* {@link module:engine/controller/datacontroller~DataController#set DataController#set() method}\n\t\t* is called with non-existent root name. For example, if there is an editor instance with only the default `main` root,\n\t\t* calling {@link module:engine/controller/datacontroller~DataController#set} like:\n\t\t*\n\t\t* ```ts\n\t\t* data.set( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t* ```\n\t\t*\n\t\t* will throw this error.\n\t\t*\n\t\t* @error datacontroller-set-non-existent-root\n\t\t*/\n\t\tthrow new CKEditorError(\"datacontroller-set-non-existent-root\", this);\n\t\tthis.model.enqueueChange(options.batchType || {}, (writer) => {\n\t\t\twriter.setSelection(null);\n\t\t\twriter.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());\n\t\t\tfor (const rootName of Object.keys(newData)) {\n\t\t\t\tconst modelRoot = this.model.document.getRoot(rootName);\n\t\t\t\twriter.remove(writer.createRangeIn(modelRoot));\n\t\t\t\twriter.insert(this.parse(newData[rootName], modelRoot), modelRoot, 0);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Returns the data parsed by the {@link #processor data processor} and then converted by upcast converters\n\t* attached to the {@link #upcastDispatcher}.\n\t*\n\t* **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a\n\t* custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n\t* {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n\t* explicitly, otherwise the conversion result may be wrong.\n\t* See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t* {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*\n\t* @see #set\n\t* @param data Data to parse.\n\t* @param context Base context in which the view will be converted to the model.\n\t* See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t* @returns Parsed data.\n\t*/\n\tparse(data, context = \"$root\") {\n\t\tconst viewDocumentFragment = this.processor.toView(data);\n\t\treturn this.toModel(viewDocumentFragment, context);\n\t}\n\t/**\n\t* Returns the result of the given {@link module:engine/view/element~ViewElement view element} or\n\t* {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment} converted by the\n\t* {@link #upcastDispatcher view-to-model converters}, wrapped by {@link module:engine/model/documentfragment~ModelDocumentFragment}.\n\t*\n\t* When marker elements were converted during the conversion process, it will be set as a document fragment's\n\t* {@link module:engine/model/documentfragment~ModelDocumentFragment#markers static markers map}.\n\t*\n\t* **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a\n\t* custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n\t* {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n\t* explicitly, otherwise the conversion result may be wrong.\n\t* See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t* {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*\n\t* @fires toModel\n\t* @param viewElementOrFragment The element or document fragment whose content will be converted.\n\t* @param context Base context in which the view will be converted to the model.\n\t* See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t* @returns Output document fragment.\n\t*/\n\ttoModel(viewElementOrFragment, context = \"$root\") {\n\t\treturn this.model.change((writer) => {\n\t\t\treturn this.upcastDispatcher.convert(viewElementOrFragment, writer, context);\n\t\t});\n\t}\n\t/**\n\t* Adds the style processor normalization rules.\n\t*\n\t* You can implement your own rules as well as use one of the available processor rules:\n\t*\n\t* * background: {@link module:engine/view/styles/background~addBackgroundStylesRules}\n\t* * border: {@link module:engine/view/styles/border~addBorderStylesRules}\n\t* * margin: {@link module:engine/view/styles/margin~addMarginStylesRules}\n\t* * padding: {@link module:engine/view/styles/padding~addPaddingStylesRules}\n\t*/\n\taddStyleProcessorRules(callback) {\n\t\tcallback(this.stylesProcessor);\n\t}\n\t/**\n\t* Registers a {@link module:engine/view/matcher~MatcherPattern} on an {@link #htmlProcessor htmlProcessor}\n\t* and a {@link #processor processor} for view elements whose content should be treated as raw data\n\t* and not processed during the conversion from DOM to view elements.\n\t*\n\t* The raw data can be later accessed by the\n\t* {@link module:engine/view/element~ViewElement#getCustomProperty view element custom property}\n\t* `\"$rawContent\"`.\n\t*\n\t* @param pattern Pattern matching all view elements whose content should be treated as a raw data.\n\t*/\n\tregisterRawContentMatcher(pattern) {\n\t\tif (this.processor && this.processor !== this.htmlProcessor) this.processor.registerRawContentMatcher(pattern);\n\t\tthis.htmlProcessor.registerRawContentMatcher(pattern);\n\t}\n\t/**\n\t* Removes all event listeners set by the DataController.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Checks whether all provided root names are actually existing editor roots.\n\t*\n\t* @param rootNames Root names to check.\n\t* @returns Whether all provided root names are existing editor roots.\n\t*/\n\t_checkIfRootsExists(rootNames) {\n\t\tfor (const rootName of rootNames) if (!this.model.document.getRoot(rootName)) return false;\n\t\treturn true;\n\t}\n};\n/**\n* Helper function for downcast conversion.\n*\n* Takes a document element (element that is added to a model document) and checks which markers are inside it. If the marker is collapsed\n* at element boundary, it is considered as contained inside the element and marker range is returned. Otherwise, if the marker is\n* intersecting with the element, the intersection is returned.\n*/\nfunction _getMarkersRelativeToElement(element) {\n\tconst result = [];\n\tconst doc = element.root.document;\n\tif (!doc) return /* @__PURE__ */ new Map();\n\tconst elementRange = ModelRange._createIn(element);\n\tfor (const marker of doc.model.markers) {\n\t\tconst markerRange = marker.getRange();\n\t\tconst isMarkerCollapsed = markerRange.isCollapsed;\n\t\tconst isMarkerAtElementBoundary = markerRange.start.isEqual(elementRange.start) || markerRange.end.isEqual(elementRange.end);\n\t\tif (isMarkerCollapsed && isMarkerAtElementBoundary) result.push([marker.name, markerRange]);\n\t\telse {\n\t\t\tconst updatedMarkerRange = elementRange.getIntersection(markerRange);\n\t\t\tif (updatedMarkerRange) result.push([marker.name, updatedMarkerRange]);\n\t\t}\n\t}\n\treturn new Map(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 engine/conversion/conversion\n*/\n/**\n* A utility class that helps add converters to upcast and downcast dispatchers.\n*\n* We recommend reading the {@glink framework/deep-dive/conversion/intro editor conversion} guide first to\n* understand the core concepts of the conversion mechanisms.\n*\n* An instance of the conversion manager is available in the\n* {@link module:core/editor/editor~Editor#conversion `editor.conversion`} property\n* and by default has the following groups of dispatchers (i.e. directions of conversion):\n*\n* * `downcast` (editing and data downcasts)\n* * `editingDowncast`\n* * `dataDowncast`\n* * `upcast`\n*\n* # One-way converters\n*\n* To add a converter to a specific group, use the {@link module:engine/conversion/conversion~Conversion#for `for()`}\n* method:\n*\n* ```ts\n* // Add a converter to editing downcast and data downcast.\n* editor.conversion.for( 'downcast' ).elementToElement( config ) );\n*\n* // Add a converter to the data pipepline only:\n* editor.conversion.for( 'dataDowncast' ).elementToElement( dataConversionConfig ) );\n*\n* // And a slightly different one for the editing pipeline:\n* editor.conversion.for( 'editingDowncast' ).elementToElement( editingConversionConfig ) );\n* ```\n*\n* See {@link module:engine/conversion/conversion~Conversion#for `for()`} method documentation to learn more about\n* available conversion helpers and how to use your custom ones.\n*\n* # Two-way converters\n*\n* Besides using one-way converters via the `for()` method, you can also use other methods available in this\n* class to add two-way converters (upcast and downcast):\n*\n* * {@link module:engine/conversion/conversion~Conversion#elementToElement `elementToElement()`} &ndash;\n* Model element to view element and vice versa.\n* * {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement()`} &ndash;\n* Model attribute to view element and vice versa.\n* * {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `attributeToAttribute()`} &ndash;\n* Model attribute to view attribute and vice versa.\n*/\nvar Conversion = class {\n\t/**\n\t* Maps dispatchers group name to ConversionHelpers instances.\n\t*/\n\t_helpers = /* @__PURE__ */ new Map();\n\t_downcast;\n\t_upcast;\n\t/**\n\t* Creates a new conversion instance.\n\t*/\n\tconstructor(downcastDispatchers, upcastDispatchers) {\n\t\tthis._downcast = toArray(downcastDispatchers);\n\t\tthis._createConversionHelpers({\n\t\t\tname: \"downcast\",\n\t\t\tdispatchers: this._downcast,\n\t\t\tisDowncast: true\n\t\t});\n\t\tthis._upcast = toArray(upcastDispatchers);\n\t\tthis._createConversionHelpers({\n\t\t\tname: \"upcast\",\n\t\t\tdispatchers: this._upcast,\n\t\t\tisDowncast: false\n\t\t});\n\t}\n\t/**\n\t* Define an alias for registered dispatcher.\n\t*\n\t* ```ts\n\t* const conversion = new Conversion(\n\t* \t[ dataDowncastDispatcher, editingDowncastDispatcher ],\n\t* \tupcastDispatcher\n\t* );\n\t*\n\t* conversion.addAlias( 'dataDowncast', dataDowncastDispatcher );\n\t* ```\n\t*\n\t* @param alias An alias of a dispatcher.\n\t* @param dispatcher Dispatcher which should have an alias.\n\t*/\n\taddAlias(alias, dispatcher) {\n\t\tconst isDowncast = this._downcast.includes(dispatcher);\n\t\tif (!this._upcast.includes(dispatcher) && !isDowncast)\n /**\n\t\t* Trying to register an alias for a dispatcher that nas not been registered.\n\t\t*\n\t\t* @error conversion-add-alias-dispatcher-not-registered\n\t\t*/\n\t\tthrow new CKEditorError(\"conversion-add-alias-dispatcher-not-registered\", this);\n\t\tthis._createConversionHelpers({\n\t\t\tname: alias,\n\t\t\tdispatchers: [dispatcher],\n\t\t\tisDowncast\n\t\t});\n\t}\n\t/**\n\t* Provides a chainable API to assign converters to a conversion dispatchers group.\n\t*\n\t* If the given group name has not been registered, the\n\t* {@link module:utils/ckeditorerror~CKEditorError `conversion-for-unknown-group` error} is thrown.\n\t*\n\t* You can use conversion helpers available directly in the `for()` chain or your custom ones via\n\t* the {@link module:engine/conversion/conversionhelpers~ConversionHelpers#add `add()`} method.\n\t*\n\t* # Using built-in conversion helpers\n\t*\n\t* The `for()` chain comes with a set of conversion helpers which you can use like this:\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'downcast' )\n\t* \t.elementToElement( config1 )        // Adds an element-to-element downcast converter.\n\t* \t.attributeToElement( config2 );     // Adds an attribute-to-element downcast converter.\n\t*\n\t* editor.conversion.for( 'upcast' )\n\t* \t.elementToAttribute( config3 );     // Adds an element-to-attribute upcast converter.\n\t* ```\n\t*\n\t* Refer to the documentation of built-in conversion helpers to learn about their configuration options.\n\t*\n\t* * downcast (model-to-view) conversion helpers:\n\t*\n\t*\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`},\n\t*\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement `attributeToElement()`},\n\t*\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t*\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToElement `markerToElement()`}.\n\t*\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToHighlight `markerToHighlight()`}.\n\t*\n\t* * upcast (view-to-model) conversion helpers:\n\t*\n\t*\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToElement `elementToElement()`},\n\t*\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute `elementToAttribute()`},\n\t*\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t*\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToMarker `elementToMarker()`}.\n\t*\n\t* # Using custom conversion helpers\n\t*\n\t* If you need to implement an atypical converter, you can do so by calling:\n\t*\n\t* ```ts\n\t* editor.conversion.for( direction ).add( customHelper );\n\t* ```\n\t*\n\t* The `.add()` method takes exactly one parameter, which is a function. This function should accept one parameter that\n\t* is a dispatcher instance. The function should add an actual converter to the passed dispatcher instance.\n\t*\n\t* Example:\n\t*\n\t* ```ts\n\t* editor.conversion.for( 'upcast' ).add( dispatcher => {\n\t* \tdispatcher.on( 'element:a',  ( evt, data, conversionApi ) => {\n\t* \t\t// Do something with a view <a> element.\n\t* \t} );\n\t* } );\n\t* ```\n\t*\n\t* Refer to the documentation of {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}\n\t* and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} to learn how to write\n\t* custom converters.\n\t*\n\t* @param groupName The name of dispatchers group to add the converters to.\n\t*/\n\tfor(groupName) {\n\t\tif (!this._helpers.has(groupName))\n /**\n\t\t* Trying to add a converter to an unknown dispatchers group.\n\t\t*\n\t\t* @error conversion-for-unknown-group\n\t\t*/\n\t\tthrow new CKEditorError(\"conversion-for-unknown-group\", this);\n\t\treturn this._helpers.get(groupName);\n\t}\n\t/**\n\t* Sets up converters between the model and the view that convert a model element to a view element (and vice versa).\n\t* For example, the model `<paragraph>Foo</paragraph>` is turned into `<p>Foo</p>` in the view.\n\t*\n\t* ```ts\n\t* // A simple conversion from the `paragraph` model element to the `<p>` view element (and vice versa).\n\t* editor.conversion.elementToElement( { model: 'paragraph', view: 'p' } );\n\t*\n\t* // Override other converters by specifying a converter definition with a higher priority.\n\t* editor.conversion.elementToElement( { model: 'paragraph', view: 'div', converterPriority: 'high' } );\n\t*\n\t* // View specified as an object instead of a string.\n\t* editor.conversion.elementToElement( {\n\t* \tmodel: 'fancyParagraph',\n\t* \tview: {\n\t* \t\tname: 'p',\n\t* \t\tclasses: 'fancy'\n\t* \t}\n\t* } );\n\t*\n\t* // Use `upcastAlso` to define other view elements that should also be converted to a `paragraph` element.\n\t* editor.conversion.elementToElement( {\n\t* \tmodel: 'paragraph',\n\t* \tview: 'p',\n\t* \tupcastAlso: [\n\t* \t\t'div',\n\t* \t\t{\n\t* \t\t\t// Any element with the `display: block` style.\n\t* \t\t\tstyles: {\n\t* \t\t\t\tdisplay: 'block'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t]\n\t* } );\n\t*\n\t* // `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t* editor.conversion.elementToElement( {\n\t* \tmodel: 'heading',\n\t* \tview: 'h2',\n\t* \t// Convert \"heading-like\" paragraphs to headings.\n\t* \tupcastAlso: viewElement => {\n\t* \t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t*\n\t* \t\tif ( !fontSize ) {\n\t* \t\t\treturn null;\n\t* \t\t}\n\t*\n\t* \t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t*\n\t* \t\tif ( !match ) {\n\t* \t\t\treturn null;\n\t* \t\t}\n\t*\n\t* \t\tconst size = Number( match[ 1 ] );\n\t*\n\t* \t\tif ( size > 26 ) {\n\t* \t\t\t// Returned value can be an object with the matched properties.\n\t* \t\t\t// These properties will be \"consumed\" during the conversion.\n\t* \t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t*\n\t* \t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t* \t\t}\n\t*\n\t* \t\treturn null;\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* `definition.model` is a `String` with a model element name to convert from or to.\n\t*\n\t* @param definition The converter definition.\n\t*/\n\telementToElement(definition) {\n\t\tthis.for(\"downcast\").elementToElement(definition);\n\t\tfor (const { model, view } of _getAllUpcastDefinitions(definition)) this.for(\"upcast\").elementToElement({\n\t\t\tmodel,\n\t\t\tview,\n\t\t\tconverterPriority: definition.converterPriority\n\t\t});\n\t}\n\t/**\n\t* Sets up converters between the model and the view that convert a model attribute to a view element (and vice versa).\n\t* For example, a model text node with `\"Foo\"` as data and the `bold` attribute will be turned to `<strong>Foo</strong>` in the view.\n\t*\n\t* ```ts\n\t* // A simple conversion from the `bold=true` attribute to the `<strong>` view element (and vice versa).\n\t* editor.conversion.attributeToElement( { model: 'bold', view: 'strong' } );\n\t*\n\t* // Override other converters by specifying a converter definition with a higher priority.\n\t* editor.conversion.attributeToElement( { model: 'bold', view: 'b', converterPriority: 'high' } );\n\t*\n\t* // View specified as an object instead of a string.\n\t* editor.conversion.attributeToElement( {\n\t* \tmodel: 'bold',\n\t* \tview: {\n\t* \t\tname: 'span',\n\t* \t\tclasses: 'bold'\n\t* \t}\n\t* } );\n\t*\n\t* // Use `config.model.name` to define the conversion only from a given node type, `$text` in this case.\n\t* // The same attribute on different elements may then be handled by a different converter.\n\t* editor.conversion.attributeToElement( {\n\t* \tmodel: {\n\t* \t\tkey: 'textDecoration',\n\t* \t\tvalues: [ 'underline', 'lineThrough' ],\n\t* \t\tname: '$text'\n\t* \t},\n\t* \tview: {\n\t* \t\tunderline: {\n\t* \t\t\tname: 'span',\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'text-decoration': 'underline'\n\t* \t\t\t}\n\t* \t\t},\n\t* \t\tlineThrough: {\n\t* \t\t\tname: 'span',\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'text-decoration': 'line-through'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t}\n\t* } );\n\t*\n\t* // Use `upcastAlso` to define other view elements that should also be converted to the `bold` attribute.\n\t* editor.conversion.attributeToElement( {\n\t* \tmodel: 'bold',\n\t* \tview: 'strong',\n\t* \tupcastAlso: [\n\t* \t\t'b',\n\t* \t\t{\n\t* \t\t\tname: 'span',\n\t* \t\t\tclasses: 'bold'\n\t* \t\t},\n\t* \t\t{\n\t* \t\t\tname: 'span',\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'font-weight': 'bold'\n\t* \t\t\t}\n\t* \t\t},\n\t* \t\tviewElement => {\n\t* \t\t\tconst fontWeight = viewElement.getStyle( 'font-weight' );\n\t*\n\t* \t\t\tif ( viewElement.is( 'element', 'span' ) && fontWeight && /\\d+/.test() && Number( fontWeight ) > 500 ) {\n\t* \t\t\t\t// Returned value can be an object with the matched properties.\n\t* \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t* \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t*\n\t* \t\t\t\treturn {\n\t* \t\t\t\t\tname: true,\n\t* \t\t\t\t\tstyles: [ 'font-weight' ]\n\t* \t\t\t\t};\n\t* \t\t\t}\n\t* \t\t}\n\t* \t]\n\t* } );\n\t*\n\t* // Conversion from and to a model attribute key whose value is an enum (`fontSize=big|small`).\n\t* // `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t* editor.conversion.attributeToElement( {\n\t* \tmodel: {\n\t* \t\tkey: 'fontSize',\n\t* \t\tvalues: [ 'big', 'small' ]\n\t* \t},\n\t* \tview: {\n\t* \t\tbig: {\n\t* \t\t\tname: 'span',\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'font-size': '1.2em'\n\t* \t\t\t}\n\t* \t\t},\n\t* \t\tsmall: {\n\t* \t\t\tname: 'span',\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'font-size': '0.8em'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t},\n\t* \tupcastAlso: {\n\t* \t\tbig: viewElement => {\n\t* \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t*\n\t* \t\t\tif ( !fontSize ) {\n\t* \t\t\t\treturn null;\n\t* \t\t\t}\n\t*\n\t* \t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t*\n\t* \t\t\tif ( !match ) {\n\t* \t\t\t\treturn null;\n\t* \t\t\t}\n\t*\n\t* \t\t\tconst size = Number( match[ 1 ] );\n\t*\n\t* \t\t\tif ( viewElement.is( 'element', 'span' ) && size > 10 ) {\n\t* \t\t\t\t// Returned value can be an object with the matched properties.\n\t* \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t* \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t*\n\t* \t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t* \t\t\t}\n\t*\n\t* \t\t\treturn null;\n\t* \t\t},\n\t* \t\tsmall: viewElement => {\n\t* \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t*\n\t* \t\t\tif ( !fontSize ) {\n\t* \t\t\t\treturn null;\n\t* \t\t\t}\n\t*\n\t* \t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t*\n\t* \t\t\tif ( !match ) {\n\t* \t\t\t\treturn null;\n\t* \t\t\t}\n\t*\n\t* \t\t\tconst size = Number( match[ 1 ] );\n\t*\n\t* \t\t\tif ( viewElement.is( 'element', 'span' ) && size < 10 ) {\n\t* \t\t\t\t// Returned value can be an object with the matched properties.\n\t* \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t* \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t*\n\t* \t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t* \t\t\t}\n\t*\n\t* \t\t\treturn null;\n\t* \t\t}\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* The `definition.model` parameter specifies which model attribute should be converted from or to. It can be a `{ key, value }` object\n\t* describing the attribute key and value to convert or a `String` specifying just the attribute key (in such a case\n\t* `value` is set to `true`).\n\t*\n\t* @param definition The converter definition.\n\t*/\n\tattributeToElement(definition) {\n\t\tthis.for(\"downcast\").attributeToElement(definition);\n\t\tfor (const { model, view } of _getAllUpcastDefinitions(definition)) this.for(\"upcast\").elementToAttribute({\n\t\t\tview,\n\t\t\tmodel,\n\t\t\tconverterPriority: definition.converterPriority\n\t\t});\n\t}\n\t/**\n\t* Sets up converters between the model and the view that convert a model attribute to a view attribute (and vice versa). For example,\n\t* `<imageBlock src='foo.jpg'></imageBlock>` is converted to `<img src='foo.jpg'></img>` (the same attribute key and value).\n\t* This type of converters is intended to be used with {@link module:engine/model/element~ModelElement model element} nodes.\n\t* To convert the text attributes,\n\t* the {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement converter`}should be set up.\n\t*\n\t* ```ts\n\t* // A simple conversion from the `source` model attribute to the `src` view attribute (and vice versa).\n\t* editor.conversion.attributeToAttribute( { model: 'source', view: 'src' } );\n\t*\n\t* // Attribute values are strictly specified.\n\t* editor.conversion.attributeToAttribute( {\n\t* \tmodel: {\n\t* \t\tname: 'imageInline',\n\t* \t\tkey: 'aside',\n\t* \t\tvalues: [ 'aside' ]\n\t* \t},\n\t* \tview: {\n\t* \t\taside: {\n\t* \t\t\tname: 'img',\n\t* \t\t\tkey: 'class',\n\t* \t\t\tvalue: [ 'aside', 'half-size' ]\n\t* \t\t}\n\t* \t}\n\t* } );\n\t*\n\t* // Set the style attribute.\n\t* editor.conversion.attributeToAttribute( {\n\t* \tmodel: {\n\t* \t\tname: 'imageInline',\n\t* \t\tkey: 'aside',\n\t* \t\tvalues: [ 'aside' ]\n\t* \t},\n\t* \tview: {\n\t* \t\taside: {\n\t* \t\t\tname: 'img',\n\t* \t\t\tkey: 'style',\n\t* \t\t\tvalue: {\n\t* \t\t\t\tfloat: 'right',\n\t* \t\t\t\twidth: '50%',\n\t* \t\t\t\tmargin: '5px'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t}\n\t* } );\n\t*\n\t* // Conversion from and to a model attribute key whose value is an enum (`align=right|center`).\n\t* // Use `upcastAlso` to define other view elements that should also be converted to the `align=right` attribute.\n\t* editor.conversion.attributeToAttribute( {\n\t* \tmodel: {\n\t* \t\tkey: 'align',\n\t* \t\tvalues: [ 'right', 'center' ]\n\t* \t},\n\t* \tview: {\n\t* \t\tright: {\n\t* \t\t\tkey: 'class',\n\t* \t\t\tvalue: 'align-right'\n\t* \t\t},\n\t* \t\tcenter: {\n\t* \t\t\tkey: 'class',\n\t* \t\t\tvalue: 'align-center'\n\t* \t\t}\n\t* \t},\n\t* \tupcastAlso: {\n\t* \t\tright: {\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'text-align': 'right'\n\t* \t\t\t}\n\t* \t\t},\n\t* \t\tcenter: {\n\t* \t\t\tstyles: {\n\t* \t\t\t\t'text-align': 'center'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* The `definition.model` parameter specifies which model attribute should be converted from and to.\n\t* It can be a `{ key, [ values ], [ name ] }` object or a `String`, which will be treated like `{ key: definition.model }`.\n\t* The `key` property is the model attribute key to convert from and to.\n\t* The `values` are the possible model attribute values. If the `values` parameter is not set, the model attribute value\n\t* will be the same as the view attribute value.\n\t* If `name` is set, the conversion will be set up only for model elements with the given name.\n\t*\n\t* The `definition.view` parameter specifies which view attribute should be converted from and to.\n\t* It can be a `{ key, value, [ name ] }` object or a `String`, which will be treated like `{ key: definition.view }`.\n\t* The `key` property is the view attribute key to convert from and to.\n\t* The `value` is the view attribute value to convert from and to. If `definition.value` is not set, the view attribute value will be\n\t* the same as the model attribute value.\n\t* If `key` is `'class'`, `value` can be a `String` or an array of `String`s.\n\t* If `key` is `'style'`, `value` is an object with key-value pairs.\n\t* In other cases, `value` is a `String`.\n\t* If `name` is set, the conversion will be set up only for model elements with the given name.\n\t* If `definition.model.values` is set, `definition.view` is an object that assigns values from `definition.model.values`\n\t* to `{ key, value, [ name ] }` objects.\n\t*\n\t* `definition.upcastAlso` specifies which other matching view elements should also be upcast to the given model configuration.\n\t* If `definition.model.values` is set, `definition.upcastAlso` should be an object assigning values from `definition.model.values`\n\t* to {@link module:engine/view/matcher~MatcherPattern}s or arrays of {@link module:engine/view/matcher~MatcherPattern}s.\n\t*\n\t* **Note:** `definition.model` and `definition.view` form should be mirrored, so the same types of parameters should\n\t* be given in both parameters.\n\t*\n\t* @param definition The converter definition.\n\t* @param definition.model The model attribute to convert from and to.\n\t* @param definition.view The view attribute to convert from and to.\n\t* @param definition.upcastAlso Any view element matching `definition.upcastAlso` will also be converted to the given model attribute.\n\t* `definition.upcastAlso` is used only if `config.model.values` is specified.\n\t*/\n\tattributeToAttribute(definition) {\n\t\tthis.for(\"downcast\").attributeToAttribute(definition);\n\t\tfor (const { model, view } of _getAllUpcastDefinitions(definition)) this.for(\"upcast\").attributeToAttribute({\n\t\t\tview,\n\t\t\tmodel\n\t\t});\n\t}\n\t/**\n\t* Creates and caches conversion helpers for given dispatchers group.\n\t*\n\t* @param options Group name.\n\t* @param options.name Group name.\n\t* @param options.dispatchers Dispatchers to register.\n\t* @param options.isDowncast Whether downcast group.\n\t*/\n\t_createConversionHelpers({ name, dispatchers, isDowncast }) {\n\t\tif (this._helpers.has(name))\n /**\n\t\t* Trying to register a group name that has already been registered.\n\t\t*\n\t\t* @error conversion-group-exists\n\t\t*/\n\t\tthrow new CKEditorError(\"conversion-group-exists\", this);\n\t\tconst helpers = isDowncast ? new DowncastHelpers(dispatchers) : new UpcastHelpers(dispatchers);\n\t\tthis._helpers.set(name, helpers);\n\t}\n};\n/**\n* Helper function that creates a joint array out of an item passed in `definition.view` and items passed in\n* `definition.upcastAlso`.\n*/\nfunction* _getAllUpcastDefinitions(definition) {\n\tif (definition.model.values) for (const value of definition.model.values) {\n\t\tconst model = {\n\t\t\tkey: definition.model.key,\n\t\t\tvalue\n\t\t};\n\t\tconst view = definition.view[value];\n\t\tyield* _getUpcastDefinition(model, view, definition.upcastAlso ? definition.upcastAlso[value] : void 0);\n\t}\n\telse yield* _getUpcastDefinition(definition.model, definition.view, definition.upcastAlso);\n}\nfunction* _getUpcastDefinition(model, view, upcastAlso) {\n\tyield {\n\t\tmodel,\n\t\tview\n\t};\n\tif (upcastAlso) for (const upcastAlsoItem of toArray(upcastAlso)) yield {\n\t\tmodel,\n\t\tview: upcastAlsoItem\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 engine/dataprocessor/xmldataprocessor\n*/\n/**\n* The XML data processor class.\n* This data processor implementation uses XML as input and output data.\n* This class is needed because unlike HTML, XML allows to use any tag with any value.\n* For example, `<link>Text</link>` is a valid XML but invalid HTML.\n*/\nvar XmlDataProcessor = class {\n\t/**\n\t* A list of namespaces allowed to use in the XML input.\n\t*\n\t* For example, registering namespaces [ 'attribute', 'container' ] allows to use `<attirbute:tagName></attribute:tagName>`\n\t* and `<container:tagName></container:tagName>` input. It is mainly for debugging.\n\t*/\n\tnamespaces;\n\t/**\n\t* DOM parser instance used to parse an XML string to an XML document.\n\t*/\n\tdomParser;\n\t/**\n\t* DOM converter used to convert DOM elements to view elements.\n\t*/\n\tdomConverter;\n\t/**\n\t* A basic HTML writer instance used to convert DOM elements to an XML string.\n\t* There is no need to use a dedicated XML writer because the basic HTML writer works well in this case.\n\t*/\n\thtmlWriter;\n\tskipComments = true;\n\t/**\n\t* Creates a new instance of the XML data processor class.\n\t*\n\t* @param document The view document instance.\n\t* @param options Configuration options.\n\t* @param options.namespaces A list of namespaces allowed to use in the XML input.\n\t*/\n\tconstructor(document, options = {}) {\n\t\tthis.namespaces = options.namespaces || [];\n\t\tthis.domParser = new DOMParser();\n\t\tthis.domConverter = new ViewDomConverter(document, { renderingMode: \"data\" });\n\t\tthis.htmlWriter = new BasicHtmlWriter();\n\t}\n\t/**\n\t* Converts the provided {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}\n\t* to data format &ndash; in this case an XML string.\n\t*\n\t* @returns An XML string.\n\t*/\n\ttoData(viewFragment) {\n\t\tconst domFragment = this.domConverter.viewToDom(viewFragment);\n\t\treturn this.htmlWriter.getHtml(domFragment);\n\t}\n\t/**\n\t* Converts the provided XML string to a view tree.\n\t*\n\t* @param data An XML string.\n\t* @returns A converted view element.\n\t*/\n\ttoView(data) {\n\t\tconst domFragment = this._toDom(data);\n\t\treturn this.domConverter.domToView(domFragment, {\n\t\t\tkeepOriginalCase: true,\n\t\t\tskipComments: this.skipComments\n\t\t});\n\t}\n\t/**\n\t* Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t* and not processed during the conversion from XML to view elements.\n\t*\n\t* The raw data can be later accessed by a\n\t* {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t*\n\t* @param pattern Pattern matching all view elements whose content should be treated as raw data.\n\t*/\n\tregisterRawContentMatcher(pattern) {\n\t\tthis.domConverter.registerRawContentMatcher(pattern);\n\t}\n\t/**\n\t* If the processor is set to use marked fillers, it will insert `&nbsp;` fillers wrapped in `<span>` elements\n\t* (`<span data-cke-filler=\"true\">&nbsp;</span>`) instead of regular `&nbsp;` characters.\n\t*\n\t* This mode allows for a more precise handling of block fillers (so they do not leak into editor content) but\n\t* bloats the editor data with additional markup.\n\t*\n\t* This mode may be required by some features and will be turned on by them automatically.\n\t*\n\t* @param type Whether to use the default or the marked `&nbsp;` block fillers.\n\t*/\n\tuseFillerType(type) {\n\t\tthis.domConverter.blockFillerMode = type == \"marked\" ? \"markedNbsp\" : \"nbsp\";\n\t}\n\t/**\n\t* Converts an XML string to its DOM representation. Returns a document fragment containing nodes parsed from\n\t* the provided data.\n\t*/\n\t_toDom(data) {\n\t\tdata = `<xml ${this.namespaces.map((nsp) => `xmlns:${nsp}=\"nsp\"`).join(\" \")}>${data}</xml>`;\n\t\tconst parsedDocument = this.domParser.parseFromString(data, \"text/xml\");\n\t\tconst parserError = parsedDocument.querySelector(\"parsererror\");\n\t\tif (parserError) throw new Error(\"Parse error - \" + parserError.textContent);\n\t\tconst fragment = parsedDocument.createDocumentFragment();\n\t\tconst nodes = parsedDocument.documentElement.childNodes;\n\t\twhile (nodes.length > 0) fragment.appendChild(nodes[0]);\n\t\treturn fragment;\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* Abstract base operation class.\n*/\nvar Operation = class {\n\t/**\n\t* {@link module:engine/model/document~ModelDocument#version} on which operation can be applied. If you try to\n\t* {@link module:engine/model/model~Model#applyOperation apply} operation with different base version than the\n\t* {@link module:engine/model/document~ModelDocument#version document version} the\n\t* {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.\n\t*/\n\tbaseVersion;\n\t/**\n\t* Defines whether operation is executed on attached or detached {@link module:engine/model/item~ModelItem items}.\n\t*/\n\tisDocumentOperation;\n\t/**\n\t* {@link module:engine/model/batch~Batch Batch} to which the operation is added or `null` if the operation is not\n\t* added to any batch yet.\n\t*\n\t* Note, that a {@link #isDocumentOperation non-document operation} has this property always set to `null`, and is never added\n\t* to any batch.\n\t*/\n\tbatch;\n\t/**\n\t* Base operation constructor.\n\t*\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(baseVersion) {\n\t\tthis.baseVersion = baseVersion;\n\t\tthis.isDocumentOperation = this.baseVersion !== null;\n\t\tthis.batch = null;\n\t}\n\t/**\n\t* Checks whether the operation's parameters are correct and the operation can be correctly executed. Throws\n\t* an error if operation is not valid.\n\t*\n\t* @internal\n\t*/\n\t_validate() {}\n\t/**\n\t* Custom toJSON method to solve child-parent circular dependencies.\n\t*\n\t* @returns Clone of this object with the operation property replaced with string.\n\t*/\n\ttoJSON() {\n\t\tconst json = Object.assign({}, this);\n\t\tjson.__className = this.constructor.className;\n\t\tdelete json.batch;\n\t\tdelete json.isDocumentOperation;\n\t\treturn json;\n\t}\n\t/**\n\t* Name of the operation class used for serialization.\n\t*/\n\tstatic get className() {\n\t\treturn \"Operation\";\n\t}\n\t/**\n\t* Creates `Operation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\treturn new this(json.baseVersion);\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 engine/model/operation/utils\n*/\n/**\n* Inserts given nodes at given position.\n*\n* @internal\n* @param position Position at which nodes should be inserted.\n* @param nodes Nodes to insert.\n* @returns Range spanning over inserted elements.\n*/\nfunction _insert(position, nodes) {\n\tconst normalizedNodes = _normalizeNodes(nodes);\n\tconst offset = normalizedNodes.reduce((sum, node) => sum + node.offsetSize, 0);\n\tconst parent = position.parent;\n\t_splitNodeAtPosition(position);\n\tconst index = position.index;\n\tparent._insertChild(index, normalizedNodes);\n\t_mergeNodesAtIndex(parent, index + normalizedNodes.length);\n\t_mergeNodesAtIndex(parent, index);\n\treturn new ModelRange(position, position.getShiftedBy(offset));\n}\n/**\n* Removed nodes in given range. Only {@link module:engine/model/range~ModelRange#isFlat flat} ranges are accepted.\n*\n* @internal\n* @param range Range containing nodes to remove.\n*/\nfunction _remove(range) {\n\tif (!range.isFlat)\n /**\n\t* Trying to remove a range which starts and ends in different element.\n\t*\n\t* @error operation-utils-remove-range-not-flat\n\t*/\n\tthrow new CKEditorError(\"operation-utils-remove-range-not-flat\", this);\n\tconst parent = range.start.parent;\n\t_splitNodeAtPosition(range.start);\n\t_splitNodeAtPosition(range.end);\n\tconst removed = parent._removeChildren(range.start.index, range.end.index - range.start.index);\n\t_mergeNodesAtIndex(parent, range.start.index);\n\treturn removed;\n}\n/**\n* Moves nodes in given range to given target position. Only {@link module:engine/model/range~ModelRange#isFlat flat} ranges are accepted.\n*\n* @internal\n* @param sourceRange Range containing nodes to move.\n* @param targetPosition Position to which nodes should be moved.\n* @returns Range containing moved nodes.\n*/\nfunction _move(sourceRange, targetPosition) {\n\tif (!sourceRange.isFlat)\n /**\n\t* Trying to move a range which starts and ends in different element.\n\t*\n\t* @error operation-utils-move-range-not-flat\n\t*/\n\tthrow new CKEditorError(\"operation-utils-move-range-not-flat\", this);\n\tconst nodes = _remove(sourceRange);\n\ttargetPosition = targetPosition._getTransformedByDeletion(sourceRange.start, sourceRange.end.offset - sourceRange.start.offset);\n\treturn _insert(targetPosition, nodes);\n}\n/**\n* Sets given attribute on nodes in given range. The attributes are only set on top-level nodes of the range, not on its children.\n*\n* @internal\n* @param range Range containing nodes that should have the attribute set. Must be a flat range.\n* @param key Key of attribute to set.\n* @param value Attribute value.\n*/\nfunction _setAttribute(range, key, value) {\n\t_splitNodeAtPosition(range.start);\n\t_splitNodeAtPosition(range.end);\n\tfor (const item of range.getItems({ shallow: true })) {\n\t\tconst node = item.is(\"$textProxy\") ? item.textNode : item;\n\t\tif (value !== null) node._setAttribute(key, value);\n\t\telse node._removeAttribute(key);\n\t\t_mergeNodesAtIndex(node.parent, node.index);\n\t}\n\t_mergeNodesAtIndex(range.end.parent, range.end.index);\n}\n/**\n* Normalizes given object or an array of objects to an array of {@link module:engine/model/node~ModelNode nodes}. See\n* {@link ~ModelNodeSet NodeSet} for details on how normalization is performed.\n*\n* @internal\n* @param nodes Objects to normalize.\n* @returns Normalized nodes.\n*/\nfunction _normalizeNodes(nodes) {\n\tconst normalized = [];\n\tfunction convert(nodes) {\n\t\tif (typeof nodes == \"string\") normalized.push(new ModelText(nodes));\n\t\telse if (nodes instanceof ModelTextProxy) normalized.push(new ModelText(nodes.data, nodes.getAttributes()));\n\t\telse if (nodes instanceof ModelNode) normalized.push(nodes);\n\t\telse if (isIterable(nodes)) for (const node of nodes) convert(node);\n\t}\n\tconvert(nodes);\n\tfor (let i = 1; i < normalized.length; i++) {\n\t\tconst node = normalized[i];\n\t\tconst prev = normalized[i - 1];\n\t\tif (node instanceof ModelText && prev instanceof ModelText && _haveSameAttributes(node, prev)) {\n\t\t\tnormalized.splice(i - 1, 2, new ModelText(prev.data + node.data, prev.getAttributes()));\n\t\t\ti--;\n\t\t}\n\t}\n\treturn normalized;\n}\n/**\n* Checks if nodes before and after given index in given element are {@link module:engine/model/text~ModelText text nodes} and\n* merges them into one node if they have same attributes.\n*\n* Merging is done by removing two text nodes and inserting a new text node containing data from both merged text nodes.\n*\n* @param element Parent element of nodes to merge.\n* @param index Index between nodes to merge.\n*/\nfunction _mergeNodesAtIndex(element, index) {\n\tconst nodeBefore = element.getChild(index - 1);\n\tconst nodeAfter = element.getChild(index);\n\tif (nodeBefore && nodeAfter && nodeBefore.is(\"$text\") && nodeAfter.is(\"$text\") && _haveSameAttributes(nodeBefore, nodeAfter)) {\n\t\tconst mergedNode = new ModelText(nodeBefore.data + nodeAfter.data, nodeBefore.getAttributes());\n\t\telement._removeChildren(index - 1, 2);\n\t\telement._insertChild(index - 1, mergedNode);\n\t}\n}\n/**\n* Checks if given position is in a text node, and if so, splits the text node in two text nodes, each of them\n* containing a part of original text node.\n*\n* @param position Position at which node should be split.\n*/\nfunction _splitNodeAtPosition(position) {\n\tconst textNode = position.textNode;\n\tconst element = position.parent;\n\tif (textNode) {\n\t\tconst offsetDiff = position.offset - textNode.startOffset;\n\t\tconst index = textNode.index;\n\t\telement._removeChildren(index, 1);\n\t\tconst firstPart = new ModelText(textNode.data.substr(0, offsetDiff), textNode.getAttributes());\n\t\tconst secondPart = new ModelText(textNode.data.substr(offsetDiff), textNode.getAttributes());\n\t\telement._insertChild(index, [firstPart, secondPart]);\n\t}\n}\n/**\n* Checks whether two given nodes have same attributes.\n*\n* @param nodeA Node to check.\n* @param nodeB Node to check.\n* @returns `true` if nodes have same attributes, `false` otherwise.\n*/\nfunction _haveSameAttributes(nodeA, nodeB) {\n\tconst iteratorA = nodeA.getAttributes();\n\tconst iteratorB = nodeB.getAttributes();\n\tfor (const attr of iteratorA) {\n\t\tif (attr[1] !== nodeB.getAttribute(attr[0])) return false;\n\t\titeratorB.next();\n\t}\n\treturn iteratorB.next().done;\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 engine/model/operation/moveoperation\n*/\n/**\n* Operation to move a range of {@link module:engine/model/item~ModelItem model items}\n* to given {@link module:engine/model/position~ModelPosition target position}.\n*/\nvar MoveOperation = class MoveOperation extends Operation {\n\t/**\n\t* Position before the first {@link module:engine/model/item~ModelItem model item} to move.\n\t*/\n\tsourcePosition;\n\t/**\n\t* Offset size of moved range.\n\t*/\n\thowMany;\n\t/**\n\t* Position at which moved nodes will be inserted.\n\t*/\n\ttargetPosition;\n\t/**\n\t* Creates a move operation.\n\t*\n\t* @param sourcePosition Position before the first {@link module:engine/model/item~ModelItem model item} to move.\n\t* @param howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t* `sourcePosition` with offset shifted by `howMany`.\n\t* @param targetPosition Position at which moved nodes will be inserted.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(sourcePosition, howMany, targetPosition, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.sourcePosition = sourcePosition.clone();\n\t\tthis.sourcePosition.stickiness = \"toNext\";\n\t\tthis.howMany = howMany;\n\t\tthis.targetPosition = targetPosition.clone();\n\t\tthis.targetPosition.stickiness = \"toNone\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\tif (this.targetPosition.root.rootName == this.sourcePosition.root.rootName) return \"move\";\n\t\telse if (this.targetPosition.root.rootName == \"$graveyard\") return \"remove\";\n\t\telse if (this.sourcePosition.root.rootName == \"$graveyard\") return \"reinsert\";\n\t\treturn \"move\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn [this.sourceRange, ModelRange._createFromPositionAndShift(this.targetPosition, 0)];\n\t}\n\t/**\n\t* Returns the range that is moved by this operation. This is equal to a range starting at {@link #sourcePosition} spanning over\n\t* {@link #howMany} nodes.\n\t*/\n\tget sourceRange() {\n\t\treturn ModelRange._createFromPositionAndShift(this.sourcePosition, this.howMany);\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*/\n\tclone() {\n\t\treturn new MoveOperation(this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion);\n\t}\n\t/**\n\t* Returns the start position of the moved range after it got moved. This may be different than\n\t* {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition} in some cases, i.e. when a range is moved\n\t* inside the same parent but {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition targetPosition}\n\t* is after {@link module:engine/model/operation/moveoperation~MoveOperation#sourcePosition sourcePosition}.\n\t*\n\t* ```\n\t*  vv              vv\n\t* abcdefg ===> adefbcg\n\t*      ^          ^\n\t*      targetPos  movedRangeStart\n\t*      offset 6   offset 4\n\t*```\n\t*/\n\tgetMovedRangeStart() {\n\t\treturn this.targetPosition._getTransformedByDeletion(this.sourcePosition, this.howMany);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\tconst newTargetPosition = this.sourcePosition._getTransformedByInsertion(this.targetPosition, this.howMany);\n\t\treturn new MoveOperation(this.getMovedRangeStart(), this.howMany, newTargetPosition, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tconst sourceElement = this.sourcePosition.parent;\n\t\tconst targetElement = this.targetPosition.parent;\n\t\tconst sourceOffset = this.sourcePosition.offset;\n\t\tconst targetOffset = this.targetPosition.offset;\n\t\tif (sourceOffset + this.howMany > sourceElement.maxOffset)\n /**\n\t\t* The nodes which should be moved do not exist.\n\t\t*\n\t\t* @error move-operation-nodes-do-not-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"move-operation-nodes-do-not-exist\", this);\n\t\telse if (sourceElement === targetElement && sourceOffset < targetOffset && targetOffset < sourceOffset + this.howMany)\n /**\n\t\t* Trying to move a range of nodes into the middle of that range.\n\t\t*\n\t\t* @error move-operation-range-into-itself\n\t\t*/\n\t\tthrow new CKEditorError(\"move-operation-range-into-itself\", this);\n\t\telse if (this.sourcePosition.root == this.targetPosition.root) {\n\t\t\tif (compareArrays(this.sourcePosition.getParentPath(), this.targetPosition.getParentPath()) == \"prefix\") {\n\t\t\t\tconst i = this.sourcePosition.path.length - 1;\n\t\t\t\tif (this.targetPosition.path[i] >= sourceOffset && this.targetPosition.path[i] < sourceOffset + this.howMany)\n /**\n\t\t\t\t* Trying to move a range of nodes into one of nodes from that range.\n\t\t\t\t*\n\t\t\t\t* @error move-operation-node-into-itself\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"move-operation-node-into-itself\", this);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\t_move(this.sourceRange, this.targetPosition);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.sourcePosition = this.sourcePosition.toJSON();\n\t\tjson.targetPosition = this.targetPosition.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"MoveOperation\";\n\t}\n\t/**\n\t* Creates `MoveOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\tconst sourcePosition = ModelPosition.fromJSON(json.sourcePosition, document);\n\t\tconst targetPosition = ModelPosition.fromJSON(json.targetPosition, document);\n\t\treturn new this(sourcePosition, json.howMany, targetPosition, json.baseVersion);\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 engine/model/operation/insertoperation\n*/\n/**\n* Operation to insert one or more nodes at given position in the model.\n*/\nvar InsertOperation = class InsertOperation extends Operation {\n\t/**\n\t* Position of insertion.\n\t*\n\t* @readonly\n\t*/\n\tposition;\n\t/**\n\t* List of nodes to insert.\n\t*\n\t* @readonly\n\t*/\n\tnodes;\n\t/**\n\t* Flag deciding how the operation should be transformed. If set to `true`, nodes might get additional attributes\n\t* during operational transformation. This happens when the operation insertion position is inside of a range\n\t* where attributes have changed.\n\t*/\n\tshouldReceiveAttributes;\n\t/**\n\t* Creates an insert operation.\n\t*\n\t* @param position Position of insertion.\n\t* @param nodes The list of nodes to be inserted.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(position, nodes, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.position = position.clone();\n\t\tthis.position.stickiness = \"toNone\";\n\t\tthis.nodes = new ModelNodeList(_normalizeNodes(nodes));\n\t\tthis.shouldReceiveAttributes = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\treturn \"insert\";\n\t}\n\t/**\n\t* Total offset size of inserted nodes.\n\t*/\n\tget howMany() {\n\t\treturn this.nodes.maxOffset;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn this.position.clone();\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*/\n\tclone() {\n\t\tconst nodes = new ModelNodeList([...this.nodes].map((node) => node._clone(true)));\n\t\tconst insert = new InsertOperation(this.position, nodes, this.baseVersion);\n\t\tinsert.shouldReceiveAttributes = this.shouldReceiveAttributes;\n\t\treturn insert;\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\tconst graveyard = this.position.root.document.graveyard;\n\t\tconst gyPosition = new ModelPosition(graveyard, [0]);\n\t\treturn new MoveOperation(this.position, this.nodes.maxOffset, gyPosition, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tconst targetElement = this.position.parent;\n\t\tif (!targetElement || targetElement.maxOffset < this.position.offset)\n /**\n\t\t* Insertion position is invalid.\n\t\t*\n\t\t* @error insert-operation-position-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"insert-operation-position-invalid\", this);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\tconst originalNodes = this.nodes;\n\t\tthis.nodes = new ModelNodeList([...originalNodes].map((node) => node._clone(true)));\n\t\t_insert(this.position, originalNodes);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.position = this.position.toJSON();\n\t\tjson.nodes = this.nodes.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"InsertOperation\";\n\t}\n\t/**\n\t* Creates `InsertOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\tconst children = [];\n\t\tfor (const child of json.nodes) if (child.name) children.push(ModelElement.fromJSON(child));\n\t\telse children.push(ModelText.fromJSON(child));\n\t\tconst insert = new InsertOperation(ModelPosition.fromJSON(json.position, document), children, json.baseVersion);\n\t\tinsert.shouldReceiveAttributes = json.shouldReceiveAttributes;\n\t\treturn insert;\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 engine/model/operation/splitoperation\n*/\n/**\n* Operation to split {@link module:engine/model/element~ModelElement an element} at given\n* {@link module:engine/model/operation/splitoperation~SplitOperation#splitPosition split position} into two elements,\n* both containing a part of the element's original content.\n*/\nvar SplitOperation = class SplitOperation extends Operation {\n\t/**\n\t* Position at which an element should be split.\n\t*/\n\tsplitPosition;\n\t/**\n\t* Total offset size of elements that are in the split element after `position`.\n\t*/\n\thowMany;\n\t/**\n\t* Position at which the clone of split element (or element from graveyard) will be inserted.\n\t*/\n\tinsertionPosition;\n\t/**\n\t* Position in the graveyard root before the element which should be used as a parent of the nodes after `position`.\n\t* If it is not set, a copy of the the `position` parent will be used.\n\t*\n\t* The default behavior is to clone the split element. Element from graveyard is used during undo.\n\t*/\n\tgraveyardPosition;\n\t/**\n\t* Creates a split operation.\n\t*\n\t* @param splitPosition Position at which an element should be split.\n\t* @param howMany Total offset size of elements that are in the split element after `position`.\n\t* @param insertionPosition Position at which the clone of split element (or element from graveyard) will be inserted.\n\t* @param graveyardPosition Position in the graveyard root before the element which\n\t* should be used as a parent of the nodes after `position`. If it is not set, a copy of the the `position` parent will be used.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(splitPosition, howMany, insertionPosition, graveyardPosition, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.splitPosition = splitPosition.clone();\n\t\tthis.splitPosition.stickiness = \"toNext\";\n\t\tthis.howMany = howMany;\n\t\tthis.insertionPosition = insertionPosition;\n\t\tthis.graveyardPosition = graveyardPosition ? graveyardPosition.clone() : null;\n\t\tif (this.graveyardPosition) this.graveyardPosition.stickiness = \"toNext\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\treturn \"split\";\n\t}\n\t/**\n\t* Position inside the new clone of a split element.\n\t*\n\t* This is a position where nodes that are after the split position will be moved to.\n\t*/\n\tget moveTargetPosition() {\n\t\tconst path = this.insertionPosition.path.slice();\n\t\tpath.push(0);\n\t\treturn new ModelPosition(this.insertionPosition.root, path);\n\t}\n\t/**\n\t* Artificial range that contains all the nodes from the split element that will be moved to the new element.\n\t* The range starts at {@link #splitPosition} and ends in the same parent, at `POSITIVE_INFINITY` offset.\n\t*/\n\tget movedRange() {\n\t\tconst end = this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);\n\t\treturn new ModelRange(this.splitPosition, end);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\tconst ranges = [ModelRange._createFromPositionAndShift(this.splitPosition, 0), ModelRange._createFromPositionAndShift(this.insertionPosition, 0)];\n\t\tif (this.graveyardPosition) ranges.push(ModelRange._createFromPositionAndShift(this.graveyardPosition, 0));\n\t\treturn ranges;\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*\n\t* @returns Clone of this operation.\n\t*/\n\tclone() {\n\t\treturn new SplitOperation(this.splitPosition, this.howMany, this.insertionPosition, this.graveyardPosition, this.baseVersion);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\tconst graveyard = this.splitPosition.root.document.graveyard;\n\t\tconst graveyardPosition = new ModelPosition(graveyard, [0]);\n\t\treturn new MergeOperation(this.moveTargetPosition, this.howMany, this.splitPosition, graveyardPosition, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tconst element = this.splitPosition.parent;\n\t\tconst offset = this.splitPosition.offset;\n\t\tif (!element || element.maxOffset < offset)\n /**\n\t\t* Split position is invalid.\n\t\t*\n\t\t* @error split-operation-position-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"split-operation-position-invalid\", this);\n\t\telse if (!element.parent)\n /**\n\t\t* Cannot split root element.\n\t\t*\n\t\t* @error split-operation-split-in-root\n\t\t*/\n\t\tthrow new CKEditorError(\"split-operation-split-in-root\", this);\n\t\telse if (this.howMany !== Number.NEGATIVE_INFINITY && this.howMany != element.maxOffset - this.splitPosition.offset)\n /**\n\t\t* Split operation specifies wrong number of nodes to move.\n\t\t*\n\t\t* @error split-operation-how-many-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"split-operation-how-many-invalid\", this);\n\t\telse if (this.graveyardPosition && !this.graveyardPosition.nodeAfter)\n /**\n\t\t* Graveyard position invalid.\n\t\t*\n\t\t* @error split-operation-graveyard-position-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"split-operation-graveyard-position-invalid\", this);\n\t\tthis.howMany = this.splitPosition.parent.maxOffset - this.splitPosition.offset;\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\tconst splitElement = this.splitPosition.parent;\n\t\tif (this.graveyardPosition) _move(ModelRange._createFromPositionAndShift(this.graveyardPosition, 1), this.insertionPosition);\n\t\telse {\n\t\t\tconst newElement = splitElement._clone();\n\t\t\t_insert(this.insertionPosition, newElement);\n\t\t}\n\t\tconst sourceRange = new ModelRange(ModelPosition._createAt(splitElement, this.splitPosition.offset), ModelPosition._createAt(splitElement, splitElement.maxOffset));\n\t\t_move(sourceRange, this.moveTargetPosition);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.splitPosition = this.splitPosition.toJSON();\n\t\tjson.insertionPosition = this.insertionPosition.toJSON();\n\t\tif (this.graveyardPosition) json.graveyardPosition = this.graveyardPosition.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"SplitOperation\";\n\t}\n\t/**\n\t* Helper function that returns a default insertion position basing on given `splitPosition`. The default insertion\n\t* position is after the split element.\n\t*/\n\tstatic getInsertionPosition(splitPosition) {\n\t\tconst path = splitPosition.path.slice(0, -1);\n\t\tpath[path.length - 1]++;\n\t\treturn new ModelPosition(splitPosition.root, path, \"toPrevious\");\n\t}\n\t/**\n\t* Creates `SplitOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\tconst splitPosition = ModelPosition.fromJSON(json.splitPosition, document);\n\t\tconst insertionPosition = ModelPosition.fromJSON(json.insertionPosition, document);\n\t\tconst graveyardPosition = json.graveyardPosition ? ModelPosition.fromJSON(json.graveyardPosition, document) : null;\n\t\treturn new this(splitPosition, json.howMany, insertionPosition, graveyardPosition, json.baseVersion);\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 engine/model/operation/mergeoperation\n*/\n/**\n* Operation to merge two {@link module:engine/model/element~ModelElement elements}.\n*\n* The merged element is the parent of {@link ~MergeOperation#sourcePosition} and it is merged into the parent of\n* {@link ~MergeOperation#targetPosition}. All nodes from the merged element are moved to {@link ~MergeOperation#targetPosition}.\n*\n* The merged element is moved to the graveyard at {@link ~MergeOperation#graveyardPosition}.\n*/\nvar MergeOperation = class MergeOperation extends Operation {\n\t/**\n\t* Position inside the merged element. All nodes from that element after that position will be moved to {@link #targetPosition}.\n\t*/\n\tsourcePosition;\n\t/**\n\t* Summary offset size of nodes which will be moved from the merged element to the new parent.\n\t*/\n\thowMany;\n\t/**\n\t* Position which the nodes from the merged elements will be moved to.\n\t*/\n\ttargetPosition;\n\t/**\n\t* Position in graveyard to which the merged element will be moved.\n\t*/\n\tgraveyardPosition;\n\t/**\n\t* Creates a merge operation.\n\t*\n\t* @param sourcePosition Position inside the merged element. All nodes from that\n\t* element after that position will be moved to {@link #targetPosition}.\n\t* @param howMany Summary offset size of nodes which will be moved from the merged element to the new parent.\n\t* @param targetPosition Position which the nodes from the merged elements will be moved to.\n\t* @param graveyardPosition Position in graveyard to which the merged element will be moved.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(sourcePosition, howMany, targetPosition, graveyardPosition, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.sourcePosition = sourcePosition.clone();\n\t\tthis.sourcePosition.stickiness = \"toPrevious\";\n\t\tthis.howMany = howMany;\n\t\tthis.targetPosition = targetPosition.clone();\n\t\tthis.targetPosition.stickiness = \"toNext\";\n\t\tthis.graveyardPosition = graveyardPosition.clone();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\treturn \"merge\";\n\t}\n\t/**\n\t* Position before the merged element (which will be deleted).\n\t*/\n\tget deletionPosition() {\n\t\treturn new ModelPosition(this.sourcePosition.root, this.sourcePosition.path.slice(0, -1));\n\t}\n\t/**\n\t* Artificial range that contains all the nodes from the merged element that will be moved to {@link ~MergeOperation#sourcePosition}.\n\t* The range starts at {@link ~MergeOperation#sourcePosition} and ends in the same parent, at `POSITIVE_INFINITY` offset.\n\t*/\n\tget movedRange() {\n\t\tconst end = this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);\n\t\treturn new ModelRange(this.sourcePosition, end);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\tconst mergedElement = this.sourcePosition.parent;\n\t\treturn [\n\t\t\tModelRange._createOn(mergedElement),\n\t\t\tModelRange._createFromPositionAndShift(this.targetPosition, 0),\n\t\t\tModelRange._createFromPositionAndShift(this.graveyardPosition, 0)\n\t\t];\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*/\n\tclone() {\n\t\treturn new MergeOperation(this.sourcePosition, this.howMany, this.targetPosition, this.graveyardPosition, this.baseVersion);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\tconst targetPosition = this.targetPosition._getTransformedByMergeOperation(this);\n\t\tconst path = this.sourcePosition.path.slice(0, -1);\n\t\tconst insertionPosition = new ModelPosition(this.sourcePosition.root, path)._getTransformedByMergeOperation(this);\n\t\treturn new SplitOperation(targetPosition, this.howMany, insertionPosition, this.graveyardPosition, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tconst sourceElement = this.sourcePosition.parent;\n\t\tconst targetElement = this.targetPosition.parent;\n\t\tif (!sourceElement.parent)\n /**\n\t\t* Merge source position is invalid. The element to be merged must have a parent node.\n\t\t*\n\t\t* @error merge-operation-source-position-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"merge-operation-source-position-invalid\", this);\n\t\telse if (!targetElement.parent)\n /**\n\t\t* Merge target position is invalid. The element to be merged must have a parent node.\n\t\t*\n\t\t* @error merge-operation-target-position-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"merge-operation-target-position-invalid\", this);\n\t\telse if (this.howMany !== Number.NEGATIVE_INFINITY && this.howMany != sourceElement.maxOffset)\n /**\n\t\t* Merge operation specifies wrong number of nodes to move.\n\t\t*\n\t\t* @error merge-operation-how-many-invalid\n\t\t*/\n\t\tthrow new CKEditorError(\"merge-operation-how-many-invalid\", this);\n\t\tthis.howMany = this.sourcePosition.parent.maxOffset;\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\tconst mergedElement = this.sourcePosition.parent;\n\t\tconst sourceRange = ModelRange._createIn(mergedElement);\n\t\t_move(sourceRange, this.targetPosition);\n\t\t_move(ModelRange._createOn(mergedElement), this.graveyardPosition);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.sourcePosition = json.sourcePosition.toJSON();\n\t\tjson.targetPosition = json.targetPosition.toJSON();\n\t\tjson.graveyardPosition = json.graveyardPosition.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"MergeOperation\";\n\t}\n\t/**\n\t* Creates `MergeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\tconst sourcePosition = ModelPosition.fromJSON(json.sourcePosition, document);\n\t\tconst targetPosition = ModelPosition.fromJSON(json.targetPosition, document);\n\t\tconst graveyardPosition = ModelPosition.fromJSON(json.graveyardPosition, document);\n\t\treturn new this(sourcePosition, json.howMany, targetPosition, graveyardPosition, json.baseVersion);\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 engine/model/operation/markeroperation\n*/\nvar MarkerOperation = class MarkerOperation extends Operation {\n\t/**\n\t* Marker name.\n\t*\n\t* @readonly\n\t*/\n\tname;\n\t/**\n\t* Marker range before the change.\n\t*\n\t* @readonly\n\t*/\n\toldRange;\n\t/**\n\t* Marker range after the change.\n\t*\n\t* @readonly\n\t*/\n\tnewRange;\n\t/**\n\t* Specifies whether the marker operation affects the data produced by the data pipeline\n\t* (is persisted in the editor's data).\n\t*\n\t* @readonly\n\t*/\n\taffectsData;\n\t/**\n\t* Marker collection on which change should be executed.\n\t*/\n\t_markers;\n\t/**\n\t* @param name Marker name.\n\t* @param oldRange Marker range before the change.\n\t* @param newRange Marker range after the change.\n\t* @param markers Marker collection on which change should be executed.\n\t* @param affectsData Specifies whether the marker operation affects the data produced by the data pipeline\n\t* (is persisted in the editor's data).\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(name, oldRange, newRange, markers, affectsData, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.name = name;\n\t\tthis.oldRange = oldRange ? oldRange.clone() : null;\n\t\tthis.newRange = newRange ? newRange.clone() : null;\n\t\tthis.affectsData = affectsData;\n\t\tthis._markers = markers;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\treturn \"marker\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\tconst ranges = [];\n\t\tif (this.oldRange) ranges.push(this.oldRange.clone());\n\t\tif (this.newRange) {\n\t\t\tif (this.oldRange) ranges.push(...this.newRange.getDifference(this.oldRange));\n\t\t\telse ranges.push(this.newRange.clone());\n\t\t}\n\t\treturn ranges;\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*/\n\tclone() {\n\t\treturn new MarkerOperation(this.name, this.oldRange, this.newRange, this._markers, this.affectsData, this.baseVersion);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\treturn new MarkerOperation(this.name, this.newRange, this.oldRange, this._markers, this.affectsData, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\tif (this.newRange) this._markers._set(this.name, this.newRange, true, this.affectsData);\n\t\telse this._markers._remove(this.name);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tif (this.oldRange) json.oldRange = this.oldRange.toJSON();\n\t\tif (this.newRange) json.newRange = this.newRange.toJSON();\n\t\tdelete json._markers;\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"MarkerOperation\";\n\t}\n\t/**\n\t* Creates `MarkerOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\treturn new MarkerOperation(json.name, json.oldRange ? ModelRange.fromJSON(json.oldRange, document) : null, json.newRange ? ModelRange.fromJSON(json.newRange, document) : null, document.model.markers, json.affectsData, json.baseVersion);\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 engine/model/operation/attributeoperation\n*/\n/**\n* Operation to change nodes' attribute.\n*\n* Using this class you can add, remove or change value of the attribute.\n*/\nvar AttributeOperation = class AttributeOperation extends Operation {\n\t/**\n\t* Range on which operation should be applied.\n\t*\n\t* @readonly\n\t*/\n\trange;\n\t/**\n\t* Key of an attribute to change or remove.\n\t*\n\t* @readonly\n\t*/\n\tkey;\n\t/**\n\t* Old value of the attribute with given key or `null`, if attribute was not set before.\n\t*\n\t* @readonly\n\t*/\n\toldValue;\n\t/**\n\t* New value of the attribute with given key or `null`, if operation should remove attribute.\n\t*\n\t* @readonly\n\t*/\n\tnewValue;\n\t/**\n\t* Creates an operation that changes, removes or adds attributes.\n\t*\n\t* If only `newValue` is set, attribute will be added on a node. Note that all nodes in operation's range must not\n\t* have an attribute with the same key as the added attribute.\n\t*\n\t* If only `oldValue` is set, then attribute with given key will be removed. Note that all nodes in operation's range\n\t* must have an attribute with that key added.\n\t*\n\t* If both `newValue` and `oldValue` are set, then the operation will change the attribute value. Note that all nodes in\n\t* operation's ranges must already have an attribute with given key and `oldValue` as value\n\t*\n\t* @param range Range on which the operation should be applied. Must be a flat range.\n\t* @param key Key of an attribute to change or remove.\n\t* @param oldValue Old value of the attribute with given key or `null`, if attribute was not set before.\n\t* @param newValue New value of the attribute with given key or `null`, if operation should remove attribute.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(range, key, oldValue, newValue, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.range = range.clone();\n\t\tthis.key = key;\n\t\tthis.oldValue = oldValue === void 0 ? null : oldValue;\n\t\tthis.newValue = newValue === void 0 ? null : newValue;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\tif (this.oldValue === null) return \"addAttribute\";\n\t\telse if (this.newValue === null) return \"removeAttribute\";\n\t\telse return \"changeAttribute\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn this.range.clone();\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*/\n\tclone() {\n\t\treturn new AttributeOperation(this.range, this.key, this.oldValue, this.newValue, this.baseVersion);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\treturn new AttributeOperation(this.range, this.key, this.newValue, this.oldValue, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.range = this.range.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tif (!this.range.isFlat)\n /**\n\t\t* The range to change is not flat.\n\t\t*\n\t\t* @error attribute-operation-range-not-flat\n\t\t*/\n\t\tthrow new CKEditorError(\"attribute-operation-range-not-flat\", this);\n\t\tfor (const item of this.range.getItems({ shallow: true })) {\n\t\t\tif (this.oldValue !== null && !isEqual(item.getAttribute(this.key), this.oldValue))\n /**\n\t\t\t* Changed node has different attribute value than operation's old attribute value.\n\t\t\t*\n\t\t\t* @error attribute-operation-wrong-old-value\n\t\t\t* @param {module:engine/model/item~ModelItem} root The item element.\n\t\t\t* @param {string} key The key of the attribute.\n\t\t\t* @param {never} value The value.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"attribute-operation-wrong-old-value\", this, {\n\t\t\t\titem,\n\t\t\t\tkey: this.key,\n\t\t\t\tvalue: this.oldValue\n\t\t\t});\n\t\t\tif (this.oldValue === null && this.newValue !== null && item.hasAttribute(this.key))\n /**\n\t\t\t* The attribute with given key already exists for the given node.\n\t\t\t*\n\t\t\t* @error attribute-operation-attribute-exists\n\t\t\t* @param {module:engine/model/item~ModelItem} root The item element.\n\t\t\t* @param {string} key The key of the attribute.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"attribute-operation-attribute-exists\", this, {\n\t\t\t\tnode: item,\n\t\t\t\tkey: this.key\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\tif (!isEqual(this.oldValue, this.newValue)) _setAttribute(this.range, this.key, this.newValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"AttributeOperation\";\n\t}\n\t/**\n\t* Creates `AttributeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\treturn new AttributeOperation(ModelRange.fromJSON(json.range, document), json.key, json.oldValue, json.newValue, json.baseVersion);\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 engine/model/operation/nooperation\n*/\n/**\n* Operation which is doing nothing (\"empty operation\", \"do-nothing operation\", \"noop\"). This is an operation,\n* which when executed does not change the tree model. It still has some parameters defined for transformation purposes.\n*\n* In most cases this operation is a result of transforming operations. When transformation returns\n* {@link module:engine/model/operation/nooperation~NoOperation} it means that changes done by the transformed operation\n* have already been applied.\n*/\nvar NoOperation = class NoOperation extends Operation {\n\tget type() {\n\t\treturn \"noop\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn null;\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*/\n\tclone() {\n\t\treturn new NoOperation(this.baseVersion);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\treturn new NoOperation(this.baseVersion + 1);\n\t}\n\t/** @internal */\n\t_execute() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"NoOperation\";\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 engine/model/operation/renameoperation\n*/\n/**\n* Operation to change element's name.\n*\n* Using this class you can change element's name.\n*/\nvar RenameOperation = class RenameOperation extends Operation {\n\t/**\n\t* Position before an element to change.\n\t*/\n\tposition;\n\t/**\n\t* Current name of the element.\n\t*/\n\toldName;\n\t/**\n\t* New name for the element.\n\t*/\n\tnewName;\n\t/**\n\t* Creates an operation that changes element's name.\n\t*\n\t* @param position Position before an element to change.\n\t* @param oldName Current name of the element.\n\t* @param newName New name for the element.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(position, oldName, newName, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.position = position;\n\t\tthis.position.stickiness = \"toNext\";\n\t\tthis.oldName = oldName;\n\t\tthis.newName = newName;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\treturn \"rename\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn this.position.nodeAfter;\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*\n\t* @returns Clone of this operation.\n\t*/\n\tclone() {\n\t\treturn new RenameOperation(this.position.clone(), this.oldName, this.newName, this.baseVersion);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\treturn new RenameOperation(this.position.clone(), this.newName, this.oldName, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tconst element = this.position.nodeAfter;\n\t\tif (!(element instanceof ModelElement))\n /**\n\t\t* Given position is invalid or node after it is not instance of Element.\n\t\t*\n\t\t* @error rename-operation-wrong-position\n\t\t*/\n\t\tthrow new CKEditorError(\"rename-operation-wrong-position\", this);\n\t\telse if (this.oldName !== \"\" && element.name !== this.oldName)\n /**\n\t\t* Element to change has different name than operation's old name.\n\t\t*\n\t\t* @error rename-operation-wrong-name\n\t\t*/\n\t\tthrow new CKEditorError(\"rename-operation-wrong-name\", this);\n\t\tthis.oldName = element.name;\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\tconst element = this.position.nodeAfter;\n\t\telement.name = this.newName;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.position = this.position.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"RenameOperation\";\n\t}\n\t/**\n\t* Creates `RenameOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\treturn new RenameOperation(ModelPosition.fromJSON(json.position, document), json.oldName, json.newName, json.baseVersion);\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 engine/model/operation/rootattributeoperation\n*/\n/**\n* Operation to change root element's attribute. Using this class you can add, remove or change value of the attribute.\n*\n* This operation is needed, because root elements can't be changed through\n* {@link module:engine/model/operation/attributeoperation~AttributeOperation}.\n* It is because {@link module:engine/model/operation/attributeoperation~AttributeOperation}\n* requires a range to change and root element can't\n* be a part of range because every {@link module:engine/model/position~ModelPosition} has to be inside a root.\n* {@link module:engine/model/position~ModelPosition} can't be created before a root element.\n*/\nvar RootAttributeOperation = class RootAttributeOperation extends Operation {\n\t/**\n\t* Root element to change.\n\t*/\n\troot;\n\t/**\n\t* Key of an attribute to change or remove.\n\t*/\n\tkey;\n\t/**\n\t* Old value of the attribute with given key or `null`, if attribute was not set before.\n\t*\n\t* @readonly\n\t*/\n\toldValue;\n\t/**\n\t* New value of the attribute with given key or `null`, if operation should remove attribute.\n\t*\n\t* @readonly\n\t*/\n\tnewValue;\n\t/**\n\t* Creates an operation that changes, removes or adds attributes on root element.\n\t*\n\t* @see module:engine/model/operation/attributeoperation~AttributeOperation\n\t* @param root Root element to change.\n\t* @param key Key of an attribute to change or remove.\n\t* @param oldValue Old value of the attribute with given key or `null`, if attribute was not set before.\n\t* @param newValue New value of the attribute with given key or `null`, if operation should remove attribute.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t* can be applied or `null` if the operation operates on detached (non-document) tree.\n\t*/\n\tconstructor(root, key, oldValue, newValue, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.root = root;\n\t\tthis.key = key;\n\t\tthis.oldValue = oldValue === void 0 ? null : oldValue;\n\t\tthis.newValue = newValue === void 0 ? null : newValue;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\tif (this.oldValue === null) return \"addRootAttribute\";\n\t\telse if (this.newValue === null) return \"removeRootAttribute\";\n\t\telse return \"changeRootAttribute\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn this.root;\n\t}\n\t/**\n\t* Creates and returns an operation that has the same parameters as this operation.\n\t*\n\t* @returns Clone of this operation.\n\t*/\n\tclone() {\n\t\treturn new RootAttributeOperation(this.root, this.key, this.oldValue, this.newValue, this.baseVersion);\n\t}\n\t/**\n\t* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t*/\n\tgetReversed() {\n\t\treturn new RootAttributeOperation(this.root, this.key, this.newValue, this.oldValue, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tif (this.root != this.root.root || this.root.is(\"documentFragment\"))\n /**\n\t\t* The element to change is not a root element.\n\t\t*\n\t\t* @error rootattribute-operation-not-a-root\n\t\t* @param {module:engine/model/rootelement~ModelRootElement} root The root element.\n\t\t* @param {string} key The key of the attribute.\n\t\t*/\n\t\tthrow new CKEditorError(\"rootattribute-operation-not-a-root\", this, {\n\t\t\troot: this.root,\n\t\t\tkey: this.key\n\t\t});\n\t\tif (this.oldValue !== null && !isEqual(this.root.getAttribute(this.key), this.oldValue))\n /**\n\t\t* The attribute which should be removed does not exist for the given node.\n\t\t*\n\t\t* @error rootattribute-operation-wrong-old-value\n\t\t* @param {module:engine/model/rootelement~ModelRootElement} root The root element.\n\t\t* @param {string} key The key of the attribute.\n\t\t*/\n\t\tthrow new CKEditorError(\"rootattribute-operation-wrong-old-value\", this, {\n\t\t\troot: this.root,\n\t\t\tkey: this.key\n\t\t});\n\t\tif (this.oldValue === null && this.newValue !== null && this.root.hasAttribute(this.key))\n /**\n\t\t* The attribute with given key already exists for the given node.\n\t\t*\n\t\t* @error rootattribute-operation-attribute-exists\n\t\t* @param {module:engine/model/rootelement~ModelRootElement} root The root element.\n\t\t* @param {string} key The key of the attribute.\n\t\t*/\n\t\tthrow new CKEditorError(\"rootattribute-operation-attribute-exists\", this, {\n\t\t\troot: this.root,\n\t\t\tkey: this.key\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\tif (this.newValue !== null) this.root._setAttribute(this.key, this.newValue);\n\t\telse this.root._removeAttribute(this.key);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.root = this.root.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"RootAttributeOperation\";\n\t}\n\t/**\n\t* Creates `RootAttributeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\tif (!document.getRoot(json.root))\n /**\n\t\t* Cannot create RootAttributeOperation for document. Root with the specified name does not exist.\n\t\t*\n\t\t* @error rootattribute-operation-fromjson-no-root\n\t\t* @param {string} rootName The root name.\n\t\t*/\n\t\tthrow new CKEditorError(\"rootattribute-operation-fromjson-no-root\", this, { rootName: json.root });\n\t\treturn new RootAttributeOperation(document.getRoot(json.root), json.key, json.oldValue, json.newValue, json.baseVersion);\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 engine/model/operation/rootoperation\n*/\n/**\n* Operation that creates (or attaches) or detaches a root element.\n*/\nvar RootOperation = class RootOperation extends Operation {\n\t/**\n\t* Root name to create or detach.\n\t*/\n\trootName;\n\t/**\n\t* Root element name.\n\t*/\n\telementName;\n\t/**\n\t* Specifies whether the operation adds (`true`) or detaches the root (`false`).\n\t*/\n\tisAdd;\n\t/**\n\t* Document which owns the root.\n\t*/\n\t_document;\n\t/**\n\t* Creates an operation that creates or removes a root element.\n\t*\n\t* @param rootName Root name to create or detach.\n\t* @param elementName Root element name.\n\t* @param isAdd Specifies whether the operation adds (`true`) or detaches the root (`false`).\n\t* @param document Document which owns the root.\n\t* @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation can be applied.\n\t*/\n\tconstructor(rootName, elementName, isAdd, document, baseVersion) {\n\t\tsuper(baseVersion);\n\t\tthis.rootName = rootName;\n\t\tthis.elementName = elementName;\n\t\tthis.isAdd = isAdd;\n\t\tthis._document = document;\n\t\tif (!this._document.getRoot(this.rootName)) {\n\t\t\tconst root = this._document.createRoot(this.elementName, this.rootName);\n\t\t\troot._isAttached = false;\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\treturn this.isAdd ? \"addRoot\" : \"detachRoot\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn this._document.getRoot(this.rootName);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tclone() {\n\t\treturn new RootOperation(this.rootName, this.elementName, this.isAdd, this._document, this.baseVersion);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tgetReversed() {\n\t\treturn new RootOperation(this.rootName, this.elementName, !this.isAdd, this._document, this.baseVersion + 1);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_execute() {\n\t\tthis._document.getRoot(this.rootName)._isAttached = this.isAdd;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tdelete json._document;\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"RootOperation\";\n\t}\n\t/**\n\t* Creates `RootOperation` object from deserialized object, i.e. from parsed JSON string.\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\treturn new RootOperation(json.rootName, json.elementName, json.isAdd, document, json.baseVersion);\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 engine/model/operation/operationfactory\n*/\nconst operations = {};\noperations[AttributeOperation.className] = AttributeOperation;\noperations[InsertOperation.className] = InsertOperation;\noperations[MarkerOperation.className] = MarkerOperation;\noperations[MoveOperation.className] = MoveOperation;\noperations[NoOperation.className] = NoOperation;\noperations[Operation.className] = Operation;\noperations[RenameOperation.className] = RenameOperation;\noperations[RootAttributeOperation.className] = RootAttributeOperation;\noperations[RootOperation.className] = RootOperation;\noperations[SplitOperation.className] = SplitOperation;\noperations[MergeOperation.className] = MergeOperation;\n/**\n* A factory class for creating operations.\n*/\nvar OperationFactory = class {\n\t/**\n\t* Creates an operation instance from a JSON object (parsed JSON string).\n\t*\n\t* @param json Deserialized JSON object.\n\t* @param document Document on which this operation will be applied.\n\t*/\n\tstatic fromJSON(json, document) {\n\t\treturn operations[json.__className].fromJSON(json, document);\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 engine/model/operation/transform\n*/\nconst transformations = /* @__PURE__ */ new Map();\n/**\n* Sets a transformation function to be be used to transform instances of class `OperationA` by instances of class `OperationB`.\n*\n* The `transformationFunction` is passed three parameters:\n*\n* * `a` - operation to be transformed, an instance of `OperationA`,\n* * `b` - operation to be transformed by, an instance of `OperationB`,\n* * {@link module:engine/model/operation/transform~TransformationContext `context`} - object with additional information about\n* transformation context.\n*\n* The `transformationFunction` should return transformation result, which is an array with one or multiple\n* {@link module:engine/model/operation/operation~Operation operation} instances.\n*\n* @param transformationFunction Function to use for transforming.\n*/\nfunction setTransformation(OperationA, OperationB, transformationFunction) {\n\tlet aGroup = transformations.get(OperationA);\n\tif (!aGroup) {\n\t\taGroup = /* @__PURE__ */ new Map();\n\t\ttransformations.set(OperationA, aGroup);\n\t}\n\taGroup.set(OperationB, transformationFunction);\n}\n/**\n* Returns a previously set transformation function for transforming an instance of `OperationA` by an instance of `OperationB`.\n*\n* If no transformation was set for given pair of operations, {@link module:engine/model/operation/transform~noUpdateTransformation}\n* is returned. This means that if no transformation was set, the `OperationA` instance will not change when transformed\n* by the `OperationB` instance.\n*\n* @returns Function set to transform an instance of `OperationA` by an instance of `OperationB`.\n*/\nfunction getTransformation(OperationA, OperationB) {\n\tconst aGroup = transformations.get(OperationA);\n\tif (aGroup && aGroup.has(OperationB)) return aGroup.get(OperationB);\n\treturn noUpdateTransformation;\n}\n/**\n* A transformation function that only clones operation to transform, without changing it.\n*/\nfunction noUpdateTransformation(a) {\n\treturn [a];\n}\n/**\n* Transforms operation `a` by operation `b`.\n*\n* @param a Operation to be transformed.\n* @param b Operation to transform by.\n* @param context Transformation context for this transformation.\n* @returns Transformation result.\n* @internal\n*/\nfunction transform(a, b, context = {}) {\n\tconst transformationFunction = getTransformation(a.constructor, b.constructor);\n\ttry {\n\t\ta = a.clone();\n\t\treturn transformationFunction(a, b, context);\n\t} catch (e) {\n\t\tthrow e;\n\t}\n}\n/**\n* Performs a transformation of two sets of operations - `operationsA` and `operationsB`. The transformation is two-way -\n* both transformed `operationsA` and transformed `operationsB` are returned.\n*\n* Note, that the first operation in each set should base on the same document state (\n* {@link module:engine/model/document~ModelDocument#version document version}).\n*\n* It is assumed that `operationsA` are \"more important\" during conflict resolution between two operations.\n*\n* New copies of both passed arrays and operations inside them are returned. Passed arguments are not altered.\n*\n* Base versions of the transformed operations sets are updated accordingly. For example, assume that base versions are `4`\n* and there are `3` operations in `operationsA` and `5` operations in `operationsB`. Then:\n*\n* * transformed `operationsA` will start from base version `9` (`4` base version + `5` operations B),\n* * transformed `operationsB` will start from base version `7` (`4` base version + `3` operations A).\n*\n* If no operation was broken into two during transformation, then both sets will end up with an operation that bases on version `11`:\n*\n* * transformed `operationsA` start from `9` and there are `3` of them, so the last will have `baseVersion` equal to `11`,\n* * transformed `operationsB` start from `7` and there are `5` of them, so the last will have `baseVersion` equal to `11`.\n*\n* @param operationsA\n* @param operationsB\n* @param options Additional transformation options.\n* @param options.document Document which the operations change.\n* @param options.useRelations Whether during transformation relations should be used (used during undo for better conflict resolution).\n* @param options.padWithNoOps Whether additional {@link module:engine/model/operation/nooperation~NoOperation}s\n* should be added to the transformation results to force the same last base version for both transformed sets (in case\n* if some operations got broken into multiple operations during transformation).\n* @param options.forceWeakRemove If set to `false`, remove operation will be always stronger than move operation,\n* so the removed nodes won't end up back in the document root. When set to `true`, context data will be used.\n* @returns Transformation result.\n*/\nfunction transformOperationSets(operationsA, operationsB, options) {\n\toperationsA = operationsA.slice();\n\toperationsB = operationsB.slice();\n\tconst contextFactory = new ContextFactory(options.document, options.useRelations, options.forceWeakRemove);\n\tcontextFactory.setOriginalOperations(operationsA);\n\tcontextFactory.setOriginalOperations(operationsB);\n\tconst originalOperations = contextFactory.originalOperations;\n\tif (operationsA.length == 0 || operationsB.length == 0) return {\n\t\toperationsA,\n\t\toperationsB,\n\t\toriginalOperations\n\t};\n\tconst nextTransformIndex = /* @__PURE__ */ new WeakMap();\n\tfor (const op of operationsA) nextTransformIndex.set(op, 0);\n\tconst data = {\n\t\tnextBaseVersionA: operationsA[operationsA.length - 1].baseVersion + 1,\n\t\tnextBaseVersionB: operationsB[operationsB.length - 1].baseVersion + 1,\n\t\toriginalOperationsACount: operationsA.length,\n\t\toriginalOperationsBCount: operationsB.length\n\t};\n\tlet i = 0;\n\twhile (i < operationsA.length) {\n\t\tconst opA = operationsA[i];\n\t\tconst indexB = nextTransformIndex.get(opA);\n\t\tif (indexB == operationsB.length) {\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tconst opB = operationsB[indexB];\n\t\tconst newOpsA = transform(opA, opB, contextFactory.getContext(opA, opB, true));\n\t\tconst newOpsB = transform(opB, opA, contextFactory.getContext(opB, opA, false));\n\t\tcontextFactory.updateRelation(opA, opB);\n\t\tcontextFactory.setOriginalOperations(newOpsA, opA);\n\t\tcontextFactory.setOriginalOperations(newOpsB, opB);\n\t\tfor (const newOpA of newOpsA) nextTransformIndex.set(newOpA, indexB + newOpsB.length);\n\t\toperationsA.splice(i, 1, ...newOpsA);\n\t\toperationsB.splice(indexB, 1, ...newOpsB);\n\t}\n\thandlePartialMarkerOperations(operationsA);\n\thandlePartialMarkerOperations(operationsB);\n\tif (options.padWithNoOps) {\n\t\tconst brokenOperationsACount = operationsA.length - data.originalOperationsACount;\n\t\tconst brokenOperationsBCount = operationsB.length - data.originalOperationsBCount;\n\t\tpadWithNoOps(operationsA, brokenOperationsBCount - brokenOperationsACount);\n\t\tpadWithNoOps(operationsB, brokenOperationsACount - brokenOperationsBCount);\n\t}\n\tupdateBaseVersions(operationsA, data.nextBaseVersionB);\n\tupdateBaseVersions(operationsB, data.nextBaseVersionA);\n\treturn {\n\t\toperationsA,\n\t\toperationsB,\n\t\toriginalOperations\n\t};\n}\n/**\n* Gathers additional data about operations processed during transformation. Can be used to obtain contextual information\n* about two operations that are about to be transformed. This contextual information can be used for better conflict resolution.\n*/\nvar ContextFactory = class {\n\toriginalOperations;\n\t_history;\n\t_useRelations;\n\t_forceWeakRemove;\n\t_relations;\n\t/**\n\t* Creates `ContextFactory` instance.\n\t*\n\t* @param document Document which the operations change.\n\t* @param useRelations Whether during transformation relations should be used (used during undo for\n\t* better conflict resolution).\n\t* @param forceWeakRemove If set to `false`, remove operation will be always stronger than move operation,\n\t* so the removed nodes won't end up back in the document root. When set to `true`, context data will be used.\n\t*/\n\tconstructor(document, useRelations, forceWeakRemove = false) {\n\t\tthis.originalOperations = /* @__PURE__ */ new Map();\n\t\tthis._history = document.history;\n\t\tthis._useRelations = useRelations;\n\t\tthis._forceWeakRemove = !!forceWeakRemove;\n\t\tthis._relations = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* Sets \"original operation\" for given operations.\n\t*\n\t* During transformation process, operations are cloned, then changed, then processed again, sometimes broken into two\n\t* or multiple operations. When gathering additional data it is important that all operations can be somehow linked\n\t* so a cloned and transformed \"version\" still kept track of the data assigned earlier to it.\n\t*\n\t* The original operation object will be used as such an universal linking id. Throughout the transformation process\n\t* all cloned operations will refer to \"the original operation\" when storing and reading additional data.\n\t*\n\t* If `takeFrom` is not set, each operation from `operations` array will be assigned itself as \"the original operation\".\n\t* This should be used as an initialization step.\n\t*\n\t* If `takeFrom` is set, each operation from `operations` will be assigned the same original operation as assigned\n\t* for `takeFrom` operation. This should be used to update original operations. It should be used in a way that\n\t* `operations` are the result of `takeFrom` transformation to ensure proper \"original operation propagation\".\n\t*/\n\tsetOriginalOperations(operations, takeFrom = null) {\n\t\tconst originalOperation = takeFrom ? this.originalOperations.get(takeFrom) : null;\n\t\tfor (const operation of operations) this.originalOperations.set(operation, originalOperation || operation);\n\t}\n\t/**\n\t* Saves a relation between operations `opA` and `opB`.\n\t*\n\t* Relations are then later used to help solve conflicts when operations are transformed.\n\t*/\n\tupdateRelation(opA, opB) {\n\t\tif (opA instanceof MoveOperation) {\n\t\t\tif (opB instanceof MergeOperation) {\n\t\t\t\tif (opA.targetPosition.isEqual(opB.sourcePosition) || opB.movedRange.containsPosition(opA.targetPosition)) this._setRelation(opA, opB, \"insertAtSource\");\n\t\t\t\telse if (opA.targetPosition.isEqual(opB.deletionPosition)) this._setRelation(opA, opB, \"insertBetween\");\n\t\t\t\telse if (opA.targetPosition.isAfter(opB.sourcePosition)) this._setRelation(opA, opB, \"moveTargetAfter\");\n\t\t\t\telse if (opA.howMany > 1 && opA.sourcePosition.isEqual(opB.deletionPosition)) this._setRelation(opA, opB, \"firstToMoveMerged\");\n\t\t\t\telse if (opA.howMany > 1 && opA.sourcePosition.getShiftedBy(opA.howMany - 1).isEqual(opB.deletionPosition)) this._setRelation(opA, opB, \"lastToMoveMerged\");\n\t\t\t} else if (opB instanceof MoveOperation) {\n\t\t\t\tif (opA.targetPosition.isEqual(opB.sourcePosition) || opA.targetPosition.isBefore(opB.sourcePosition)) this._setRelation(opA, opB, \"insertBefore\");\n\t\t\t\telse this._setRelation(opA, opB, \"insertAfter\");\n\t\t\t}\n\t\t} else if (opA instanceof SplitOperation) {\n\t\t\tif (opB instanceof MergeOperation) {\n\t\t\t\tif (opA.splitPosition.isBefore(opB.sourcePosition)) this._setRelation(opA, opB, \"splitBefore\");\n\t\t\t} else if (opB instanceof MoveOperation) {\n\t\t\t\tif (opA.splitPosition.isEqual(opB.sourcePosition) || opA.splitPosition.isBefore(opB.sourcePosition)) this._setRelation(opA, opB, \"splitBefore\");\n\t\t\t\telse {\n\t\t\t\t\tconst range = ModelRange._createFromPositionAndShift(opB.sourcePosition, opB.howMany);\n\t\t\t\t\tif (opA.splitPosition.hasSameParentAs(opB.sourcePosition) && range.containsPosition(opA.splitPosition)) {\n\t\t\t\t\t\tconst howMany = range.end.offset - opA.splitPosition.offset;\n\t\t\t\t\t\tconst offset = opA.splitPosition.offset - range.start.offset;\n\t\t\t\t\t\tthis._setRelation(opA, opB, {\n\t\t\t\t\t\t\thowMany,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (opA instanceof MergeOperation) {\n\t\t\tif (opB instanceof MergeOperation) {\n\t\t\t\tif (!opA.targetPosition.isEqual(opB.sourcePosition)) this._setRelation(opA, opB, \"mergeTargetNotMoved\");\n\t\t\t\tif (opA.sourcePosition.isEqual(opB.targetPosition)) this._setRelation(opA, opB, \"mergeSourceNotMoved\");\n\t\t\t\tif (opA.sourcePosition.isEqual(opB.sourcePosition)) this._setRelation(opA, opB, \"mergeSameElement\");\n\t\t\t} else if (opB instanceof SplitOperation) {\n\t\t\t\tif (opA.sourcePosition.isEqual(opB.splitPosition)) this._setRelation(opA, opB, \"splitAtSource\");\n\t\t\t} else if (opB instanceof MoveOperation && opB.howMany > 0) {\n\t\t\t\tif (opA.sourcePosition.isEqual(opB.sourcePosition.getShiftedBy(opB.howMany))) this._setRelation(opA, opB, \"mergeSourceAffected\");\n\t\t\t\tif (opA.targetPosition.isEqual(opB.sourcePosition)) this._setRelation(opA, opB, \"mergeTargetWasBefore\");\n\t\t\t}\n\t\t} else if (opA instanceof MarkerOperation) {\n\t\t\tconst markerRange = opA.newRange;\n\t\t\tif (!markerRange) return;\n\t\t\tif (opB instanceof MergeOperation) {\n\t\t\t\tconst wasInLeftElement = markerRange.start.isEqual(opB.targetPosition);\n\t\t\t\tconst wasStartBeforeMergedElement = markerRange.start.isEqual(opB.deletionPosition);\n\t\t\t\tconst wasEndBeforeMergedElement = markerRange.end.isEqual(opB.deletionPosition);\n\t\t\t\tconst wasInRightElement = markerRange.end.isEqual(opB.sourcePosition);\n\t\t\t\tif (wasInLeftElement || wasStartBeforeMergedElement || wasEndBeforeMergedElement || wasInRightElement) this._setRelation(opA, opB, {\n\t\t\t\t\twasInLeftElement,\n\t\t\t\t\twasStartBeforeMergedElement,\n\t\t\t\t\twasEndBeforeMergedElement,\n\t\t\t\t\twasInRightElement\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Evaluates and returns contextual information about two given operations `opA` and `opB` which are about to be transformed.\n\t*/\n\tgetContext(opA, opB, aIsStrong) {\n\t\treturn {\n\t\t\taIsStrong,\n\t\t\taWasUndone: this._wasUndone(opA),\n\t\t\tbWasUndone: this._wasUndone(opB),\n\t\t\tabRelation: this._useRelations ? this._getRelation(opA, opB) : null,\n\t\t\tbaRelation: this._useRelations ? this._getRelation(opB, opA) : null,\n\t\t\tforceWeakRemove: this._forceWeakRemove\n\t\t};\n\t}\n\t/**\n\t* Returns whether given operation `op` has already been undone.\n\t*\n\t* Information whether an operation was undone gives more context when making a decision when two operations are in conflict.\n\t*/\n\t_wasUndone(op) {\n\t\tconst originalOp = this.originalOperations.get(op);\n\t\treturn originalOp.wasUndone || this._history.isUndoneOperation(originalOp);\n\t}\n\t/**\n\t* Returns a relation between `opA` and an operation which is undone by `opB`. This can be `String` value if a relation\n\t* was set earlier or `null` if there was no relation between those operations.\n\t*\n\t* This is a little tricky to understand, so let's compare it to `ContextFactory#_wasUndone`.\n\t*\n\t* When `wasUndone( opB )` is used, we check if the `opB` has already been undone. It is obvious, that the\n\t* undoing operation must happen after the undone operation. So, essentially, we have `opB`, we take document history,\n\t* we look forward in the future and ask if in that future `opB` was undone.\n\t*\n\t* Relations is a backward process to `wasUndone()`.\n\t*\n\t* Long story short - using relations is asking what happened in the past. Looking back. This time we have an undoing\n\t* operation `opB` which has undone some other operation. When there is a transformation `opA` x `opB` and there is\n\t* a conflict to solve and `opB` is an undoing operation, we can look back in the history and see what was a relation\n\t* between `opA` and the operation which `opB` undone. Basing on that relation from the past, we can now make\n\t* a better decision when resolving a conflict between two operations, because we know more about the context of\n\t* those two operations.\n\t*\n\t* This is why this function does not return a relation directly between `opA` and `opB` because we need to look\n\t* back to search for a meaningful contextual information.\n\t*/\n\t_getRelation(opA, opB) {\n\t\tconst origB = this.originalOperations.get(opB);\n\t\tconst undoneB = this._history.getUndoneOperation(origB);\n\t\tif (!undoneB) return null;\n\t\tconst origA = this.originalOperations.get(opA);\n\t\tconst relationsA = this._relations.get(origA);\n\t\tif (relationsA) return relationsA.get(undoneB) || null;\n\t\treturn null;\n\t}\n\t/**\n\t* Helper function for `ContextFactory#updateRelations`.\n\t*/\n\t_setRelation(opA, opB, relation) {\n\t\tconst origA = this.originalOperations.get(opA);\n\t\tconst origB = this.originalOperations.get(opB);\n\t\tlet relationsA = this._relations.get(origA);\n\t\tif (!relationsA) {\n\t\t\trelationsA = /* @__PURE__ */ new Map();\n\t\t\tthis._relations.set(origA, relationsA);\n\t\t}\n\t\trelationsA.set(origB, relation);\n\t}\n};\n/**\n* An utility function that updates {@link module:engine/model/operation/operation~Operation#baseVersion base versions}\n* of passed operations.\n*\n* The function simply sets `baseVersion` as a base version of the first passed operation and then increments it for\n* each following operation in `operations`.\n*\n* @param operations Operations to update.\n* @param baseVersion Base version to set for the first operation in `operations`.\n*/\nfunction updateBaseVersions(operations, baseVersion) {\n\tfor (const operation of operations) operation.baseVersion = baseVersion++;\n}\n/**\n* Adds `howMany` instances of {@link module:engine/model/operation/nooperation~NoOperation} to `operations` set.\n*/\nfunction padWithNoOps(operations, howMany) {\n\tfor (let i = 0; i < howMany; i++) operations.push(new NoOperation(0));\n}\n/**\n* Transformed operations set may include marker operations which were broken into multiple marker operations during transformation.\n* It represents marker range being broken into multiple pieces as the transformation was processed. Each partial marker operation is\n* a piece of the original marker range.\n*\n* These partial marker operations (\"marker range pieces\") should be \"glued\" together if, after transformations, the ranges ended up\n* next to each other.\n*\n* If the ranges did not end up next to each other, then partial marker operations should be discarded, as the marker range cannot\n* be broken into two pieces.\n*\n* There is always one \"reference\" marker operation (the original operation) and there may be some partial marker operations. Partial\n* marker operations have base version set to `-1`. If the `operations` set includes partial marker operations, then they are always\n* after the original marker operation.\n*\n* See also `MarkerOperation` x `MoveOperation` transformation.\n* See also https://github.com/ckeditor/ckeditor5/pull/17071.\n*/\nfunction handlePartialMarkerOperations(operations) {\n\tconst markerOps = /* @__PURE__ */ new Map();\n\tfor (let i = 0; i < operations.length; i++) {\n\t\tconst op = operations[i];\n\t\tif (!(op instanceof MarkerOperation)) continue;\n\t\tif (op.baseVersion !== -1) markerOps.set(op.name, {\n\t\t\top,\n\t\t\tranges: op.newRange ? [op.newRange] : []\n\t\t});\n\t\telse {\n\t\t\t/* v8 ignore next -- @preserve */\n\t\t\tif (op.newRange) {\n\t\t\t\tconst partialRanges = markerOps.get(op.name).ranges;\n\t\t\t\tif (!partialRanges[0].containsRange(op.newRange, true)) partialRanges.push(op.newRange);\n\t\t\t}\n\t\t\toperations.splice(i, 1);\n\t\t\ti--;\n\t\t}\n\t}\n\tfor (const { op, ranges } of markerOps.values()) if (ranges.length) op.newRange = ModelRange._createFromRanges(ranges);\n\telse op.newRange = null;\n}\nsetTransformation(AttributeOperation, AttributeOperation, (a, b, context) => {\n\tif (a.key === b.key && a.range.start.hasSameParentAs(b.range.start)) {\n\t\tconst operations = a.range.getDifference(b.range).map((range) => {\n\t\t\treturn new AttributeOperation(range, a.key, a.oldValue, a.newValue, 0);\n\t\t});\n\t\tconst common = a.range.getIntersection(b.range);\n\t\tif (common) {\n\t\t\tif (context.aIsStrong) operations.push(new AttributeOperation(common, b.key, b.newValue, a.newValue, 0));\n\t\t}\n\t\tif (operations.length == 0) return [new NoOperation(0)];\n\t\treturn operations;\n\t} else return [a];\n});\nsetTransformation(AttributeOperation, InsertOperation, (a, b) => {\n\tif (a.range.start.hasSameParentAs(b.position) && a.range.containsPosition(b.position)) {\n\t\tconst result = a.range._getTransformedByInsertion(b.position, b.howMany, !b.shouldReceiveAttributes).map((r) => {\n\t\t\treturn new AttributeOperation(r, a.key, a.oldValue, a.newValue, a.baseVersion);\n\t\t});\n\t\tif (b.shouldReceiveAttributes) {\n\t\t\tconst op = _getComplementaryAttributeOperations(b, a.key, a.oldValue);\n\t\t\tif (op) result.unshift(op);\n\t\t}\n\t\treturn result;\n\t}\n\ta.range = a.range._getTransformedByInsertion(b.position, b.howMany, false)[0];\n\treturn [a];\n});\n/**\n* Helper function for `AttributeOperation` x `InsertOperation` (and reverse) transformation.\n*\n* For given `insertOperation` it checks the inserted node if it has an attribute `key` set to a value different\n* than `newValue`. If so, it generates an `AttributeOperation` which changes the value of `key` attribute to `newValue`.\n*/\nfunction _getComplementaryAttributeOperations(insertOperation, key, newValue) {\n\tconst insertValue = insertOperation.nodes.getNode(0).getAttribute(key);\n\tif (insertValue == newValue) return null;\n\tconst range = new ModelRange(insertOperation.position, insertOperation.position.getShiftedBy(insertOperation.howMany));\n\treturn new AttributeOperation(range, key, insertValue, newValue, 0);\n}\nsetTransformation(AttributeOperation, MergeOperation, (a, b) => {\n\tconst ranges = [];\n\tif (a.range.start.hasSameParentAs(b.deletionPosition)) {\n\t\tif (a.range.containsPosition(b.deletionPosition) || a.range.start.isEqual(b.deletionPosition)) ranges.push(ModelRange._createFromPositionAndShift(b.graveyardPosition, 1));\n\t}\n\tconst range = a.range._getTransformedByMergeOperation(b);\n\tif (!range.isCollapsed) ranges.push(range);\n\treturn ranges.map((range) => {\n\t\treturn new AttributeOperation(range, a.key, a.oldValue, a.newValue, a.baseVersion);\n\t});\n});\nsetTransformation(AttributeOperation, MoveOperation, (a, b) => {\n\treturn _breakRangeByMoveOperation(a.range, b).map((range) => new AttributeOperation(range, a.key, a.oldValue, a.newValue, a.baseVersion));\n});\n/**\n* Helper function for `AttributeOperation` x `MoveOperation` transformation.\n*\n* Takes the passed `range` and transforms it by move operation `moveOp` in a specific way. Only top-level nodes of `range`\n* are considered to be in the range. If move operation moves nodes deep from inside of the range, those nodes won't\n* be included in the result. In other words, top-level nodes of the ranges from the result are exactly the same as\n* top-level nodes of the original `range`.\n*\n* This is important for `AttributeOperation` because, for its range, it changes only the top-level nodes. So we need to\n* track only how those nodes have been affected by `MoveOperation`.\n*/\nfunction _breakRangeByMoveOperation(range, moveOp) {\n\tconst moveRange = ModelRange._createFromPositionAndShift(moveOp.sourcePosition, moveOp.howMany);\n\tlet common = null;\n\tlet difference = [];\n\tif (moveRange.containsRange(range, true)) common = range;\n\telse if (range.start.hasSameParentAs(moveRange.start)) {\n\t\tdifference = range.getDifference(moveRange);\n\t\tcommon = range.getIntersection(moveRange);\n\t} else difference = [range];\n\tconst result = [];\n\tfor (let diff of difference) {\n\t\tdiff = diff._getTransformedByDeletion(moveOp.sourcePosition, moveOp.howMany);\n\t\tconst targetPosition = moveOp.getMovedRangeStart();\n\t\tconst spread = diff.start.hasSameParentAs(targetPosition);\n\t\tconst diffs = diff._getTransformedByInsertion(targetPosition, moveOp.howMany, spread);\n\t\tresult.push(...diffs);\n\t}\n\tif (common) result.push(common._getTransformedByMove(moveOp.sourcePosition, moveOp.targetPosition, moveOp.howMany, false)[0]);\n\treturn result;\n}\nsetTransformation(AttributeOperation, SplitOperation, (a, b) => {\n\tif (a.range.end.isEqual(b.insertionPosition)) {\n\t\tif (!b.graveyardPosition) a.range.end.offset++;\n\t\treturn [a];\n\t}\n\tif (a.range.start.hasSameParentAs(b.splitPosition) && a.range.containsPosition(b.splitPosition)) {\n\t\tconst secondPart = a.clone();\n\t\tsecondPart.range = new ModelRange(b.moveTargetPosition.clone(), a.range.end._getCombined(b.splitPosition, b.moveTargetPosition));\n\t\ta.range.end = b.splitPosition.clone();\n\t\ta.range.end.stickiness = \"toPrevious\";\n\t\treturn [a, secondPart];\n\t}\n\ta.range = a.range._getTransformedBySplitOperation(b);\n\treturn [a];\n});\nsetTransformation(InsertOperation, AttributeOperation, (a, b) => {\n\tconst result = [a];\n\tif (a.shouldReceiveAttributes && a.position.hasSameParentAs(b.range.start) && b.range.containsPosition(a.position)) {\n\t\tconst op = _getComplementaryAttributeOperations(a, b.key, b.newValue);\n\t\tif (op) result.push(op);\n\t}\n\treturn result;\n});\nsetTransformation(InsertOperation, InsertOperation, (a, b, context) => {\n\tif (a.position.isEqual(b.position) && context.aIsStrong) return [a];\n\ta.position = a.position._getTransformedByInsertOperation(b);\n\treturn [a];\n});\nsetTransformation(InsertOperation, MoveOperation, (a, b) => {\n\ta.position = a.position._getTransformedByMoveOperation(b);\n\treturn [a];\n});\nsetTransformation(InsertOperation, SplitOperation, (a, b) => {\n\ta.position = a.position._getTransformedBySplitOperation(b);\n\treturn [a];\n});\nsetTransformation(InsertOperation, MergeOperation, (a, b) => {\n\ta.position = a.position._getTransformedByMergeOperation(b);\n\treturn [a];\n});\nsetTransformation(MarkerOperation, InsertOperation, (a, b) => {\n\tif (a.oldRange) a.oldRange = a.oldRange._getTransformedByInsertOperation(b)[0];\n\tif (a.newRange) a.newRange = a.newRange._getTransformedByInsertOperation(b)[0];\n\treturn [a];\n});\nsetTransformation(MarkerOperation, MarkerOperation, (a, b, context) => {\n\tif (a.name == b.name) {\n\t\tif (context.aIsStrong) a.oldRange = b.newRange ? b.newRange.clone() : null;\n\t\telse return [new NoOperation(0)];\n\t}\n\treturn [a];\n});\nsetTransformation(MarkerOperation, MergeOperation, (a, b) => {\n\tif (a.oldRange) a.oldRange = a.oldRange._getTransformedByMergeOperation(b);\n\tif (a.newRange) a.newRange = a.newRange._getTransformedByMergeOperation(b);\n\treturn [a];\n});\nsetTransformation(MarkerOperation, MoveOperation, (a, b) => {\n\tconst result = [a];\n\tif (a.oldRange) a.oldRange = ModelRange._createFromRanges(a.oldRange._getTransformedByMoveOperation(b));\n\tif (a.newRange) {\n\t\tconst ranges = a.newRange._getTransformedByMoveOperation(b);\n\t\ta.newRange = ranges[0];\n\t\tfor (let i = 1; i < ranges.length; i++) {\n\t\t\tconst op = a.clone();\n\t\t\top.oldRange = null;\n\t\t\top.newRange = ranges[i];\n\t\t\top.baseVersion = -1;\n\t\t\tresult.push(op);\n\t\t}\n\t}\n\treturn result;\n});\nsetTransformation(MarkerOperation, SplitOperation, (a, b, context) => {\n\tif (a.oldRange) a.oldRange = a.oldRange._getTransformedBySplitOperation(b);\n\tif (a.newRange) {\n\t\tif (context.abRelation) {\n\t\t\tconst aNewRange = a.newRange._getTransformedBySplitOperation(b);\n\t\t\tif (a.newRange.start.isEqual(b.splitPosition)) {\n\t\t\t\tif (context.abRelation.wasStartBeforeMergedElement) a.newRange.start = ModelPosition._createAt(b.insertionPosition);\n\t\t\t\telse if (context.abRelation.wasInLeftElement) a.newRange.start = ModelPosition._createAt(a.newRange.start);\n\t\t\t\telse a.newRange.start = ModelPosition._createAt(b.moveTargetPosition);\n\t\t\t} else a.newRange.start = aNewRange.start;\n\t\t\tif (a.newRange.end.isEqual(b.splitPosition)) {\n\t\t\t\tif (a.newRange.end.isEqual(b.splitPosition) && context.abRelation.wasEndBeforeMergedElement) a.newRange.end = ModelPosition._createAt(b.insertionPosition);\n\t\t\t\telse if (context.abRelation.wasInRightElement) a.newRange.end = ModelPosition._createAt(b.moveTargetPosition);\n\t\t\t\telse a.newRange.end = ModelPosition._createAt(a.newRange.end);\n\t\t\t} else a.newRange.end = aNewRange.end;\n\t\t\treturn [a];\n\t\t}\n\t\ta.newRange = a.newRange._getTransformedBySplitOperation(b);\n\t}\n\treturn [a];\n});\nsetTransformation(MergeOperation, InsertOperation, (a, b) => {\n\tif (a.sourcePosition.hasSameParentAs(b.position)) a.howMany += b.howMany;\n\ta.sourcePosition = a.sourcePosition._getTransformedByInsertOperation(b);\n\ta.targetPosition = a.targetPosition._getTransformedByInsertOperation(b);\n\treturn [a];\n});\nsetTransformation(MergeOperation, MergeOperation, (a, b, context) => {\n\tif (a.sourcePosition.isEqual(b.sourcePosition) && a.targetPosition.isEqual(b.targetPosition)) {\n\t\tif (!context.bWasUndone) return [new NoOperation(0)];\n\t\telse {\n\t\t\tconst path = b.graveyardPosition.path.slice();\n\t\t\tpath.push(0);\n\t\t\ta.sourcePosition = new ModelPosition(b.graveyardPosition.root, path);\n\t\t\ta.howMany = 0;\n\t\t\treturn [a];\n\t\t}\n\t}\n\tif (a.sourcePosition.isEqual(b.sourcePosition) && !a.targetPosition.isEqual(b.targetPosition) && !context.bWasUndone && context.abRelation != \"splitAtSource\") {\n\t\tconst aToGraveyard = a.targetPosition.root.rootName == \"$graveyard\";\n\t\tconst bToGraveyard = b.targetPosition.root.rootName == \"$graveyard\";\n\t\tif (bToGraveyard && !aToGraveyard || !(aToGraveyard && !bToGraveyard) && context.aIsStrong) {\n\t\t\tconst sourcePosition = b.targetPosition._getTransformedByMergeOperation(b);\n\t\t\tconst targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n\t\t\treturn [new MoveOperation(sourcePosition, a.howMany, targetPosition, 0)];\n\t\t} else return [new NoOperation(0)];\n\t}\n\tif (a.sourcePosition.hasSameParentAs(b.targetPosition)) a.howMany += b.howMany;\n\ta.sourcePosition = a.sourcePosition._getTransformedByMergeOperation(b);\n\ta.targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n\tif (!a.graveyardPosition.isEqual(b.graveyardPosition) || !context.aIsStrong) a.graveyardPosition = a.graveyardPosition._getTransformedByMergeOperation(b);\n\treturn [a];\n});\nsetTransformation(MergeOperation, MoveOperation, (a, b, context) => {\n\tconst removedRange = ModelRange._createFromPositionAndShift(b.sourcePosition, b.howMany);\n\tif (b.type == \"remove\" && !context.bWasUndone) {\n\t\tif (a.deletionPosition.hasSameParentAs(b.sourcePosition) && removedRange.containsPosition(a.sourcePosition)) return [new NoOperation(0)];\n\t}\n\tif (b.sourcePosition.getShiftedBy(b.howMany).isEqual(a.sourcePosition)) a.sourcePosition.stickiness = \"toNone\";\n\telse if (b.targetPosition.isEqual(a.sourcePosition) && context.abRelation == \"mergeSourceAffected\") a.sourcePosition.stickiness = \"toNext\";\n\telse if (b.sourcePosition.isEqual(a.targetPosition)) {\n\t\ta.targetPosition.stickiness = \"toNone\";\n\t\ta.howMany -= b.howMany;\n\t} else if (b.targetPosition.isEqual(a.targetPosition) && context.abRelation == \"mergeTargetWasBefore\") {\n\t\ta.targetPosition.stickiness = \"toPrevious\";\n\t\ta.howMany += b.howMany;\n\t} else {\n\t\tif (a.sourcePosition.hasSameParentAs(b.targetPosition)) a.howMany += b.howMany;\n\t\tif (a.sourcePosition.hasSameParentAs(b.sourcePosition)) a.howMany -= b.howMany;\n\t}\n\ta.sourcePosition = a.sourcePosition._getTransformedByMoveOperation(b);\n\ta.targetPosition = a.targetPosition._getTransformedByMoveOperation(b);\n\ta.sourcePosition.stickiness = \"toPrevious\";\n\ta.targetPosition.stickiness = \"toNext\";\n\tif (!a.graveyardPosition.isEqual(b.targetPosition)) a.graveyardPosition = a.graveyardPosition._getTransformedByMoveOperation(b);\n\treturn [a];\n});\nsetTransformation(MergeOperation, SplitOperation, (a, b, context) => {\n\tif (b.graveyardPosition) {\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedByDeletion(b.graveyardPosition, 1);\n\t\tif (a.deletionPosition.isEqual(b.graveyardPosition)) a.howMany = b.howMany;\n\t}\n\tif (a.targetPosition.isEqual(b.splitPosition)) {\n\t\tif (b.graveyardPosition && a.deletionPosition.isEqual(b.graveyardPosition) || context.abRelation == \"mergeTargetNotMoved\") {\n\t\t\ta.sourcePosition = a.sourcePosition._getTransformedBySplitOperation(b);\n\t\t\treturn [a];\n\t\t}\n\t}\n\tif (a.sourcePosition.isEqual(b.splitPosition)) {\n\t\tif (context.abRelation == \"mergeSourceNotMoved\") {\n\t\t\ta.howMany = 0;\n\t\t\ta.targetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n\t\t\treturn [a];\n\t\t}\n\t\tif (context.abRelation == \"mergeSameElement\" || a.sourcePosition.offset > 0) {\n\t\t\ta.sourcePosition = b.moveTargetPosition.clone();\n\t\t\ta.targetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n\t\t\treturn [a];\n\t\t}\n\t}\n\tif (a.sourcePosition.hasSameParentAs(b.splitPosition)) a.howMany = b.splitPosition.offset;\n\ta.sourcePosition = a.sourcePosition._getTransformedBySplitOperation(b);\n\ta.targetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n\treturn [a];\n});\nsetTransformation(MoveOperation, InsertOperation, (a, b) => {\n\tconst transformed = ModelRange._createFromPositionAndShift(a.sourcePosition, a.howMany)._getTransformedByInsertOperation(b, false)[0];\n\ta.sourcePosition = transformed.start;\n\ta.howMany = transformed.end.offset - transformed.start.offset;\n\tif (!a.targetPosition.isEqual(b.position)) a.targetPosition = a.targetPosition._getTransformedByInsertOperation(b);\n\treturn [a];\n});\nsetTransformation(MoveOperation, MoveOperation, (a, b, context) => {\n\tconst rangeA = ModelRange._createFromPositionAndShift(a.sourcePosition, a.howMany);\n\tconst rangeB = ModelRange._createFromPositionAndShift(b.sourcePosition, b.howMany);\n\tlet aIsStrong = context.aIsStrong;\n\tlet insertBefore = !context.aIsStrong;\n\tif (context.abRelation == \"insertBefore\" || context.baRelation == \"insertAfter\") insertBefore = true;\n\telse if (context.abRelation == \"insertAfter\" || context.baRelation == \"insertBefore\") insertBefore = false;\n\tlet newTargetPosition;\n\tif (a.targetPosition.isEqual(b.targetPosition) && insertBefore) newTargetPosition = a.targetPosition._getTransformedByDeletion(b.sourcePosition, b.howMany);\n\telse newTargetPosition = a.targetPosition._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n\tif (_moveTargetIntoMovedRange(a, b) && _moveTargetIntoMovedRange(b, a)) return [b.getReversed()];\n\tif (rangeA.containsPosition(b.targetPosition) && rangeA.containsRange(rangeB, true)) {\n\t\trangeA.start = rangeA.start._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n\t\trangeA.end = rangeA.end._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n\t\treturn _makeMoveOperationsFromRanges([rangeA], newTargetPosition);\n\t}\n\tif (rangeB.containsPosition(a.targetPosition) && rangeB.containsRange(rangeA, true)) {\n\t\trangeA.start = rangeA.start._getCombined(b.sourcePosition, b.getMovedRangeStart());\n\t\trangeA.end = rangeA.end._getCombined(b.sourcePosition, b.getMovedRangeStart());\n\t\treturn _makeMoveOperationsFromRanges([rangeA], newTargetPosition);\n\t}\n\tconst aCompB = compareArrays(a.sourcePosition.getParentPath(), b.sourcePosition.getParentPath());\n\tif (aCompB == \"prefix\" || aCompB == \"extension\") {\n\t\trangeA.start = rangeA.start._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n\t\trangeA.end = rangeA.end._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n\t\treturn _makeMoveOperationsFromRanges([rangeA], newTargetPosition);\n\t}\n\tif (a.type == \"remove\" && b.type != \"remove\" && !context.aWasUndone && !context.forceWeakRemove) aIsStrong = true;\n\telse if (a.type != \"remove\" && b.type == \"remove\" && !context.bWasUndone && !context.forceWeakRemove) aIsStrong = false;\n\tconst ranges = [];\n\tconst difference = rangeA.getDifference(rangeB);\n\tfor (const range of difference) {\n\t\trange.start = range.start._getTransformedByDeletion(b.sourcePosition, b.howMany);\n\t\trange.end = range.end._getTransformedByDeletion(b.sourcePosition, b.howMany);\n\t\tconst shouldSpread = compareArrays(range.start.getParentPath(), b.getMovedRangeStart().getParentPath()) == \"same\";\n\t\tconst newRanges = range._getTransformedByInsertion(b.getMovedRangeStart(), b.howMany, shouldSpread);\n\t\tranges.push(...newRanges);\n\t}\n\tconst common = rangeA.getIntersection(rangeB);\n\tif (common !== null && aIsStrong) {\n\t\tcommon.start = common.start._getCombined(b.sourcePosition, b.getMovedRangeStart());\n\t\tcommon.end = common.end._getCombined(b.sourcePosition, b.getMovedRangeStart());\n\t\tif (ranges.length === 0) ranges.push(common);\n\t\telse if (ranges.length == 1) {\n\t\t\tif (rangeB.start.isBefore(rangeA.start) || rangeB.start.isEqual(rangeA.start)) ranges.unshift(common);\n\t\t\telse ranges.push(common);\n\t\t} else ranges.splice(1, 0, common);\n\t}\n\tif (ranges.length === 0) return [new NoOperation(a.baseVersion)];\n\treturn _makeMoveOperationsFromRanges(ranges, newTargetPosition);\n});\nsetTransformation(MoveOperation, SplitOperation, (a, b, context) => {\n\tlet newTargetPosition = a.targetPosition.clone();\n\tif (!a.targetPosition.isEqual(b.insertionPosition) || !b.graveyardPosition || context.abRelation == \"moveTargetAfter\") newTargetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n\tif (a.sourcePosition.isEqual(b.insertionPosition) && context.abRelation == \"firstToMoveMerged\") {\n\t\ta.howMany++;\n\t\ta.targetPosition = newTargetPosition;\n\t\treturn [a];\n\t}\n\tconst moveRange = ModelRange._createFromPositionAndShift(a.sourcePosition, a.howMany);\n\tif (moveRange.end.isEqual(b.insertionPosition)) {\n\t\tif (!b.graveyardPosition || context.abRelation == \"lastToMoveMerged\") a.howMany++;\n\t\ta.targetPosition = newTargetPosition;\n\t\treturn [a];\n\t}\n\tif (moveRange.start.hasSameParentAs(b.splitPosition) && moveRange.containsPosition(b.splitPosition)) {\n\t\tlet rightRange = new ModelRange(b.splitPosition, moveRange.end);\n\t\trightRange = rightRange._getTransformedBySplitOperation(b);\n\t\treturn _makeMoveOperationsFromRanges([new ModelRange(moveRange.start, b.splitPosition), rightRange], newTargetPosition);\n\t}\n\tif (a.targetPosition.isEqual(b.splitPosition) && context.abRelation == \"insertAtSource\") newTargetPosition = b.moveTargetPosition;\n\tif (a.targetPosition.isEqual(b.insertionPosition) && context.abRelation == \"insertBetween\") newTargetPosition = a.targetPosition;\n\tconst ranges = [moveRange._getTransformedBySplitOperation(b)];\n\tif (b.graveyardPosition) {\n\t\tconst movesGraveyardElement = moveRange.start.isEqual(b.graveyardPosition) || moveRange.containsPosition(b.graveyardPosition);\n\t\tif (a.howMany > 1 && movesGraveyardElement && !context.aWasUndone) ranges.push(ModelRange._createFromPositionAndShift(b.insertionPosition, 1));\n\t}\n\treturn _makeMoveOperationsFromRanges(ranges, newTargetPosition);\n});\nsetTransformation(MoveOperation, MergeOperation, (a, b, context) => {\n\tconst movedRange = ModelRange._createFromPositionAndShift(a.sourcePosition, a.howMany);\n\tif (b.deletionPosition.hasSameParentAs(a.sourcePosition) && movedRange.containsPosition(b.sourcePosition)) {\n\t\tif (a.type == \"remove\" && !context.forceWeakRemove) {\n\t\t\tif (!context.aWasUndone) {\n\t\t\t\tconst results = [];\n\t\t\t\tlet gyMoveSource = b.graveyardPosition.clone();\n\t\t\t\tlet splitNodesMoveSource = b.targetPosition._getTransformedByMergeOperation(b);\n\t\t\t\tconst aTarget = a.targetPosition.getTransformedByOperation(b);\n\t\t\t\tif (a.howMany > 1) {\n\t\t\t\t\tresults.push(new MoveOperation(a.sourcePosition, a.howMany - 1, aTarget, 0));\n\t\t\t\t\tgyMoveSource = gyMoveSource._getTransformedByMove(a.sourcePosition, aTarget, a.howMany - 1);\n\t\t\t\t\tsplitNodesMoveSource = splitNodesMoveSource._getTransformedByMove(a.sourcePosition, aTarget, a.howMany - 1);\n\t\t\t\t}\n\t\t\t\tconst gyMoveTarget = b.deletionPosition._getCombined(a.sourcePosition, aTarget);\n\t\t\t\tconst gyMove = new MoveOperation(gyMoveSource, 1, gyMoveTarget, 0);\n\t\t\t\tconst splitNodesMoveTargetPath = gyMove.getMovedRangeStart().path.slice();\n\t\t\t\tsplitNodesMoveTargetPath.push(0);\n\t\t\t\tconst splitNodesMoveTarget = new ModelPosition(gyMove.targetPosition.root, splitNodesMoveTargetPath);\n\t\t\t\tsplitNodesMoveSource = splitNodesMoveSource._getTransformedByMove(gyMoveSource, gyMoveTarget, 1);\n\t\t\t\tconst splitNodesMove = new MoveOperation(splitNodesMoveSource, b.howMany, splitNodesMoveTarget, 0);\n\t\t\t\tresults.push(gyMove);\n\t\t\t\tresults.push(splitNodesMove);\n\t\t\t\treturn results;\n\t\t\t}\n\t\t} else if (a.howMany == 1) {\n\t\t\tif (!context.bWasUndone) return [new NoOperation(0)];\n\t\t\telse {\n\t\t\t\ta.sourcePosition = b.graveyardPosition.clone();\n\t\t\t\ta.targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n\t\t\t\treturn [a];\n\t\t\t}\n\t\t}\n\t}\n\tconst transformed = ModelRange._createFromPositionAndShift(a.sourcePosition, a.howMany)._getTransformedByMergeOperation(b);\n\ta.sourcePosition = transformed.start;\n\ta.howMany = transformed.end.offset - transformed.start.offset;\n\ta.targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n\treturn [a];\n});\nsetTransformation(RenameOperation, InsertOperation, (a, b) => {\n\ta.position = a.position._getTransformedByInsertOperation(b);\n\treturn [a];\n});\nsetTransformation(RenameOperation, MergeOperation, (a, b) => {\n\tif (a.position.isEqual(b.deletionPosition)) {\n\t\ta.position = b.graveyardPosition.clone();\n\t\ta.position.stickiness = \"toNext\";\n\t\treturn [a];\n\t}\n\ta.position = a.position._getTransformedByMergeOperation(b);\n\treturn [a];\n});\nsetTransformation(RenameOperation, MoveOperation, (a, b) => {\n\ta.position = a.position._getTransformedByMoveOperation(b);\n\treturn [a];\n});\nsetTransformation(RenameOperation, RenameOperation, (a, b, context) => {\n\tif (a.position.isEqual(b.position)) {\n\t\tif (context.aIsStrong) a.oldName = b.newName;\n\t\telse return [new NoOperation(0)];\n\t}\n\treturn [a];\n});\nsetTransformation(RenameOperation, SplitOperation, (a, b) => {\n\tconst renamePath = a.position.path;\n\tconst splitPath = b.splitPosition.getParentPath();\n\tif (compareArrays(renamePath, splitPath) == \"same\" && !b.graveyardPosition) return [a, new RenameOperation(a.position.getShiftedBy(1), a.oldName, a.newName, 0)];\n\ta.position = a.position._getTransformedBySplitOperation(b);\n\treturn [a];\n});\nsetTransformation(RootAttributeOperation, RootAttributeOperation, (a, b, context) => {\n\tif (a.root === b.root && a.key === b.key) {\n\t\tif (!context.aIsStrong) return [new NoOperation(0)];\n\t\telse a.oldValue = b.newValue;\n\t}\n\treturn [a];\n});\nsetTransformation(RootOperation, RootOperation, (a, b) => {\n\tif (a.rootName === b.rootName && a.isAdd === b.isAdd) return [new NoOperation(0)];\n\treturn [a];\n});\nsetTransformation(SplitOperation, InsertOperation, (a, b) => {\n\tif (a.splitPosition.hasSameParentAs(b.position) && a.splitPosition.offset < b.position.offset) a.howMany += b.howMany;\n\ta.splitPosition = a.splitPosition._getTransformedByInsertOperation(b);\n\ta.insertionPosition = a.insertionPosition._getTransformedByInsertOperation(b);\n\treturn [a];\n});\nsetTransformation(SplitOperation, MergeOperation, (a, b, context) => {\n\tif (!a.graveyardPosition && !context.bWasUndone && a.splitPosition.hasSameParentAs(b.sourcePosition)) {\n\t\tconst splitPath = b.graveyardPosition.path.slice();\n\t\tsplitPath.push(0);\n\t\tconst splitPosition = new ModelPosition(b.graveyardPosition.root, splitPath);\n\t\tconst insertionPosition = SplitOperation.getInsertionPosition(new ModelPosition(b.graveyardPosition.root, splitPath));\n\t\tconst additionalSplit = new SplitOperation(splitPosition, 0, insertionPosition, null, 0);\n\t\ta.splitPosition = a.splitPosition._getTransformedByMergeOperation(b);\n\t\ta.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n\t\ta.graveyardPosition = additionalSplit.insertionPosition.clone();\n\t\ta.graveyardPosition.stickiness = \"toNext\";\n\t\treturn [additionalSplit, a];\n\t}\n\tif (a.splitPosition.hasSameParentAs(b.deletionPosition) && !a.splitPosition.isAfter(b.deletionPosition)) a.howMany--;\n\tif (a.splitPosition.hasSameParentAs(b.targetPosition)) a.howMany += b.howMany;\n\ta.splitPosition = a.splitPosition._getTransformedByMergeOperation(b);\n\ta.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n\tif (a.graveyardPosition) a.graveyardPosition = a.graveyardPosition._getTransformedByMergeOperation(b);\n\treturn [a];\n});\nsetTransformation(SplitOperation, MoveOperation, (a, b, context) => {\n\tconst rangeToMove = ModelRange._createFromPositionAndShift(b.sourcePosition, b.howMany);\n\tif (a.graveyardPosition) {\n\t\tconst gyElementMoved = rangeToMove.start.isEqual(a.graveyardPosition) || rangeToMove.containsPosition(a.graveyardPosition);\n\t\tif (!context.bWasUndone && gyElementMoved) {\n\t\t\tconst sourcePosition = a.splitPosition._getTransformedByMoveOperation(b);\n\t\t\tconst newParentPosition = a.graveyardPosition._getTransformedByMoveOperation(b);\n\t\t\tconst newTargetPath = newParentPosition.path.slice();\n\t\t\tnewTargetPath.push(0);\n\t\t\tconst newTargetPosition = new ModelPosition(newParentPosition.root, newTargetPath);\n\t\t\treturn [new MoveOperation(sourcePosition, a.howMany, newTargetPosition, 0)];\n\t\t}\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedByMoveOperation(b);\n\t}\n\tconst splitAtTarget = a.splitPosition.isEqual(b.targetPosition);\n\tif (splitAtTarget && (context.baRelation == \"insertAtSource\" || context.abRelation == \"splitBefore\")) {\n\t\ta.howMany += b.howMany;\n\t\ta.splitPosition = a.splitPosition._getTransformedByDeletion(b.sourcePosition, b.howMany);\n\t\ta.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n\t\treturn [a];\n\t}\n\tif (splitAtTarget && context.abRelation && context.abRelation.howMany) {\n\t\tconst { howMany, offset } = context.abRelation;\n\t\ta.howMany += howMany;\n\t\ta.splitPosition = a.splitPosition.getShiftedBy(offset);\n\t\treturn [a];\n\t}\n\tif (a.splitPosition.hasSameParentAs(b.sourcePosition) && rangeToMove.containsPosition(a.splitPosition)) {\n\t\tconst howManyRemoved = b.howMany - (a.splitPosition.offset - b.sourcePosition.offset);\n\t\ta.howMany -= howManyRemoved;\n\t\tif (a.splitPosition.hasSameParentAs(b.targetPosition) && a.splitPosition.offset < b.targetPosition.offset) a.howMany += b.howMany;\n\t\ta.splitPosition = b.sourcePosition.clone();\n\t\ta.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n\t\treturn [a];\n\t}\n\tif (!b.sourcePosition.isEqual(b.targetPosition)) {\n\t\tif (a.splitPosition.hasSameParentAs(b.sourcePosition) && a.splitPosition.offset <= b.sourcePosition.offset) a.howMany -= b.howMany;\n\t\tif (a.splitPosition.hasSameParentAs(b.targetPosition) && a.splitPosition.offset < b.targetPosition.offset) a.howMany += b.howMany;\n\t}\n\ta.splitPosition.stickiness = \"toNone\";\n\ta.splitPosition = a.splitPosition._getTransformedByMoveOperation(b);\n\ta.splitPosition.stickiness = \"toNext\";\n\tif (a.graveyardPosition) a.insertionPosition = a.insertionPosition._getTransformedByMoveOperation(b);\n\telse a.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n\treturn [a];\n});\nsetTransformation(SplitOperation, SplitOperation, (a, b, context) => {\n\tif (a.splitPosition.isEqual(b.splitPosition)) {\n\t\tif (!a.graveyardPosition && !b.graveyardPosition) return [new NoOperation(0)];\n\t\tif (a.graveyardPosition && b.graveyardPosition && a.graveyardPosition.isEqual(b.graveyardPosition)) return [new NoOperation(0)];\n\t\tif (context.abRelation == \"splitBefore\") {\n\t\t\ta.howMany = 0;\n\t\t\ta.graveyardPosition = a.graveyardPosition._getTransformedBySplitOperation(b);\n\t\t\treturn [a];\n\t\t}\n\t}\n\tif (a.graveyardPosition && b.graveyardPosition && a.graveyardPosition.isEqual(b.graveyardPosition)) {\n\t\tconst aInGraveyard = a.splitPosition.root.rootName == \"$graveyard\";\n\t\tconst bInGraveyard = b.splitPosition.root.rootName == \"$graveyard\";\n\t\tif (bInGraveyard && !aInGraveyard || !(aInGraveyard && !bInGraveyard) && context.aIsStrong) {\n\t\t\tconst result = [];\n\t\t\tif (b.howMany) result.push(new MoveOperation(b.moveTargetPosition, b.howMany, b.splitPosition, 0));\n\t\t\tif (a.howMany) result.push(new MoveOperation(a.splitPosition, a.howMany, a.moveTargetPosition, 0));\n\t\t\treturn result;\n\t\t} else return [new NoOperation(0)];\n\t}\n\tif (a.graveyardPosition) a.graveyardPosition = a.graveyardPosition._getTransformedBySplitOperation(b);\n\tif (a.splitPosition.isEqual(b.insertionPosition) && context.abRelation == \"splitBefore\") {\n\t\ta.howMany++;\n\t\treturn [a];\n\t}\n\tif (b.splitPosition.isEqual(a.insertionPosition) && context.baRelation == \"splitBefore\") {\n\t\tconst newPositionPath = b.insertionPosition.path.slice();\n\t\tnewPositionPath.push(0);\n\t\tconst newPosition = new ModelPosition(b.insertionPosition.root, newPositionPath);\n\t\treturn [a, new MoveOperation(a.insertionPosition, 1, newPosition, 0)];\n\t}\n\tif (a.splitPosition.hasSameParentAs(b.splitPosition) && a.splitPosition.offset < b.splitPosition.offset) a.howMany -= b.howMany;\n\ta.splitPosition = a.splitPosition._getTransformedBySplitOperation(b);\n\ta.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n\treturn [a];\n});\n/**\n* Checks whether `MoveOperation` `targetPosition` is inside a node from the moved range of the other `MoveOperation`.\n*/\nfunction _moveTargetIntoMovedRange(a, b) {\n\treturn a.targetPosition._getTransformedByDeletion(b.sourcePosition, b.howMany) === null;\n}\n/**\n* Helper function for `MoveOperation` x `MoveOperation` transformation. Converts given ranges and target position to\n* move operations and returns them.\n*\n* Ranges and target position will be transformed on-the-fly when generating operations.\n*\n* Given `ranges` should be in the order of how they were in the original transformed operation.\n*\n* Given `targetPosition` is the target position of the first range from `ranges`.\n*/\nfunction _makeMoveOperationsFromRanges(ranges, targetPosition) {\n\tconst operations = [];\n\tfor (let i = 0; i < ranges.length; i++) {\n\t\tconst range = ranges[i];\n\t\tconst op = new MoveOperation(range.start, range.end.offset - range.start.offset, targetPosition, 0);\n\t\toperations.push(op);\n\t\tfor (let j = i + 1; j < ranges.length; j++) ranges[j] = ranges[j]._getTransformedByMove(op.sourcePosition, op.targetPosition, op.howMany)[0];\n\t\ttargetPosition = targetPosition._getTransformedByMove(op.sourcePosition, op.targetPosition, op.howMany);\n\t}\n\treturn operations;\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 engine/model/liveposition\n*/\nconst ModelLivePositionBase = /* #__PURE__ */ EmitterMixin(ModelPosition);\n/**\n* `ModelLivePosition` is a type of {@link module:engine/model/position~ModelPosition Position}\n* that updates itself as {@link module:engine/model/document~ModelDocument document}\n* is changed through operations. It may be used as a bookmark.\n*\n* **Note:** Contrary to {@link module:engine/model/position~ModelPosition}, `ModelLivePosition` works only in roots that are\n* {@link module:engine/model/rootelement~ModelRootElement}.\n* If {@link module:engine/model/documentfragment~ModelDocumentFragment} is passed, error will be thrown.\n*\n* **Note:** Be very careful when dealing with `ModelLivePosition`. Each `ModelLivePosition` instance bind events that might\n* have to be unbound.\n* Use {@link module:engine/model/liveposition~ModelLivePosition#detach} whenever you don't need `ModelLivePosition` anymore.\n*/\nvar ModelLivePosition = class extends ModelLivePositionBase {\n\t/**\n\t* Creates a live position.\n\t*\n\t* @see module:engine/model/position~ModelPosition\n\t*/\n\tconstructor(root, path, stickiness = \"toNone\", model) {\n\t\tsuper(root, path, stickiness);\n\t\tconst boundModel = model || (this.root.is(\"rootElement\") ? this.root.document.model : null);\n\t\tif (!boundModel)\n /**\n\t\t* LivePosition's root has to be an instance of ModelRootElement or have a reference to a model instance.\n\t\t*\n\t\t* @error model-liveposition-no-model-reference\n\t\t*/\n\t\tthrow new CKEditorError(\"model-liveposition-no-model-reference\", root);\n\t\tbindWithModel.call(this, boundModel);\n\t}\n\t/**\n\t* Unbinds all events previously bound by `ModelLivePosition`. Use it whenever you don't need `ModelLivePosition` instance\n\t* anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was\n\t* referring to it).\n\t*/\n\tdetach() {\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Creates a {@link module:engine/model/position~ModelPosition position instance}, which is equal to this live position.\n\t*/\n\ttoPosition() {\n\t\treturn new ModelPosition(this.root, this.path.slice(), this.stickiness);\n\t}\n\t/**\n\t* Creates a `ModelLivePosition` instance that is equal to position.\n\t*/\n\tstatic fromPosition(position, stickiness) {\n\t\treturn new this(position.root, position.path.slice(), stickiness ? stickiness : position.stickiness);\n\t}\n\t/**\n\t* Creates a `ModelLivePosition` for a position rooted in\n\t* a {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n\t*\n\t* Document fragment does not belong to a document, so the live position is bound to the provided `model` and keeps\n\t* itself in sync with every operation applied to that fragment (e.g. while editing clipboard content).\n\t*\n\t* @internal\n\t*/\n\tstatic _fromPositionInDocumentFragment(position, model, stickiness) {\n\t\treturn new this(position.root, position.path.slice(), stickiness ? stickiness : position.stickiness, model);\n\t}\n};\nModelLivePosition.prototype.is = function(type) {\n\treturn type === \"livePosition\" || type === \"model:livePosition\" || type == \"position\" || type === \"model:position\";\n};\n/**\n* Binds this `ModelLivePosition` to the given model, so the position updates itself on every operation applied to it.\n*/\nfunction bindWithModel(model) {\n\tconst isDetached = !this.root.is(\"rootElement\");\n\tthis.listenTo(model, \"applyOperation\", (event, args) => {\n\t\tconst operation = args[0];\n\t\tif (!isDetached && !operation.isDocumentOperation) return;\n\t\ttransform$1.call(this, operation);\n\t}, { priority: \"low\" });\n}\n/**\n* Updates this position accordingly to the updates applied to the model. Bases on change events.\n*/\nfunction transform$1(operation) {\n\tconst result = this.getTransformedByOperation(operation);\n\tif (!this.isEqual(result)) {\n\t\tconst oldPosition = this.toPosition();\n\t\tthis.path = result.path;\n\t\tthis.root = result.root;\n\t\tthis.fire(\"change\", oldPosition);\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 engine/model/batch\n*/\n/**\n* A batch instance groups model changes ({@link module:engine/model/operation/operation~Operation operations}). All operations\n* grouped in a single batch can be reverted together, so you can also think about a batch as of a single undo step. If you want\n* to extend a given undo step, you can add more changes to the batch using {@link module:engine/model/model~Model#enqueueChange}:\n*\n* ```ts\n* model.enqueueChange( batch, writer => {\n* \twriter.insertText( 'foo', paragraph, 'end' );\n* } );\n* ```\n*\n* @see module:engine/model/model~Model#enqueueChange\n* @see module:engine/model/model~Model#change\n*/\nvar Batch = class {\n\t/**\n\t* An array of operations that compose this batch.\n\t*/\n\toperations;\n\t/**\n\t* Whether the batch can be undone through the undo feature.\n\t*/\n\tisUndoable;\n\t/**\n\t* Whether the batch includes operations created locally (`true`) or operations created on other, remote editors (`false`).\n\t*/\n\tisLocal;\n\t/**\n\t* Whether the batch was created by the undo feature and undoes other operations.\n\t*/\n\tisUndo;\n\t/**\n\t* Whether the batch includes operations connected with typing.\n\t*/\n\tisTyping;\n\t/**\n\t* Creates a batch instance.\n\t*\n\t* @see module:engine/model/model~Model#enqueueChange\n\t* @see module:engine/model/model~Model#change\n\t* @param type A set of flags that specify the type of the batch. Batch type can alter how some of the features work\n\t* when encountering a given `Batch` instance (for example, when a feature listens to applied operations).\n\t*/\n\tconstructor(type = {}) {\n\t\tif (typeof type === \"string\") {\n\t\t\ttype = type === \"transparent\" ? { isUndoable: false } : {};\n\t\t\t/**\n\t\t\t* The string value for a `type` property of the `Batch` constructor has been deprecated and will be removed in the near future.\n\t\t\t* Please refer to the {@link module:engine/model/batch~Batch#constructor `Batch` constructor API documentation} for more\n\t\t\t* information.\n\t\t\t*\n\t\t\t* @error batch-constructor-deprecated-string-type\n\t\t\t*/\n\t\t\tlogWarning(\"batch-constructor-deprecated-string-type\");\n\t\t}\n\t\tconst { isUndoable = true, isLocal = true, isUndo = false, isTyping = false } = type;\n\t\tthis.operations = [];\n\t\tthis.isUndoable = isUndoable;\n\t\tthis.isLocal = isLocal;\n\t\tthis.isUndo = isUndo;\n\t\tthis.isTyping = isTyping;\n\t}\n\t/**\n\t* Returns the base version of this batch, which is equal to the base version of the first operation in the batch.\n\t* If there are no operations in the batch or neither operation has the base version set, it returns `null`.\n\t*/\n\tget baseVersion() {\n\t\tfor (const op of this.operations) if (op.baseVersion !== null) return op.baseVersion;\n\t\treturn null;\n\t}\n\t/**\n\t* Adds an operation to the batch instance.\n\t*\n\t* @param operation An operation to add.\n\t* @returns The added operation.\n\t*/\n\taddOperation(operation) {\n\t\tif (operation.isDocumentOperation) {\n\t\t\toperation.batch = this;\n\t\t\tthis.operations.push(operation);\n\t\t}\n\t\treturn operation;\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 engine/model/differ\n*/\n/**\n* Calculates the difference between two model states.\n*\n* Receives operations that are to be applied on the model document. Marks parts of the model document tree which\n* are changed and saves the state of these elements before the change. Then, it compares saved elements with the\n* changed elements, after all changes are applied on the model document. Calculates the diff between saved\n* elements and new ones and returns a change set.\n*/\nvar Differ = class Differ {\n\t/**\n\t* Priority of the {@link ~Differ#_elementState element states}. States on higher indexes of the array can overwrite states on the lower\n\t* indexes.\n\t*/\n\tstatic _statesPriority = [\n\t\tvoid 0,\n\t\t\"refresh\",\n\t\t\"rename\",\n\t\t\"move\"\n\t];\n\t/**\n\t* Reference to the model's marker collection.\n\t*/\n\t_markerCollection;\n\t/**\n\t* A map that stores changes that happened in a given element.\n\t*\n\t* The keys of the map are references to the model elements.\n\t* The values of the map are arrays with changes that were done on this element.\n\t*/\n\t_changesInElement = /* @__PURE__ */ new Map();\n\t/**\n\t* Stores a snapshot for these model nodes that might have changed.\n\t*\n\t* This complements {@link ~Differ#_elementChildrenSnapshots `_elementChildrenSnapshots`}.\n\t*\n\t* See also {@link ~DifferSnapshot}.\n\t*/\n\t_elementsSnapshots = /* @__PURE__ */ new Map();\n\t/**\n\t* For each element or document fragment inside which there was a change, it stores a snapshot of the child nodes list (an array\n\t* of children snapshots that represent the state in the element / fragment before any change has happened).\n\t*\n\t* This complements {@link ~Differ#_elementsSnapshots `_elementsSnapshots`}.\n\t*\n\t* See also {@link ~DifferSnapshot}.\n\t*/\n\t_elementChildrenSnapshots = /* @__PURE__ */ new Map();\n\t/**\n\t* Keeps the state for a given element, describing how the element was changed so far. It is used to evaluate the `action` property\n\t* of diff items returned by {@link ~Differ#getChanges}.\n\t*\n\t* Possible values, in the order from the lowest priority to the highest priority:\n\t*\n\t* * `'refresh'` - element was refreshed,\n\t* * `'rename'` - element was renamed,\n\t* * `'move'` - element was moved (or, usually, removed, that is moved to the graveyard).\n\t*\n\t* Element that was refreshed, may change its state to `'rename'` if it was later renamed, or to `'move'` if it was removed.\n\t* But the element cannot change its state from `'move'` to `'rename'`, or from `'rename'` to `'refresh'`.\n\t*\n\t* Only already existing elements are registered in `_elementState`. If a new element was inserted as a result of a buffered operation,\n\t* it is not be registered in `_elementState`.\n\t*/\n\t_elementState = /* @__PURE__ */ new Map();\n\t/**\n\t* A map that stores all changed markers.\n\t*\n\t* The keys of the map are marker names.\n\t*\n\t* The values of the map are objects with the following properties:\n\t*\n\t* * `oldMarkerData`,\n\t* * `newMarkerData`.\n\t*/\n\t_changedMarkers = /* @__PURE__ */ new Map();\n\t/**\n\t* A map that stores all roots that have been changed.\n\t*\n\t* The keys are the names of the roots while value represents the changes.\n\t*/\n\t_changedRoots = /* @__PURE__ */ new Map();\n\t/**\n\t* Stores the number of changes that were processed. Used to order the changes chronologically. It is important\n\t* when changes are sorted.\n\t*/\n\t_changeCount = 0;\n\t/**\n\t* For efficiency purposes, `Differ` stores the change set returned by the differ after {@link #getChanges} call.\n\t* Cache is reset each time a new operation is buffered. If the cache has not been reset, {@link #getChanges} will\n\t* return the cached value instead of calculating it again.\n\t*\n\t* This property stores those changes that did not take place in graveyard root.\n\t*/\n\t_cachedChanges = null;\n\t/**\n\t* For efficiency purposes, `Differ` stores the change set returned by the differ after the {@link #getChanges} call.\n\t* The cache is reset each time a new operation is buffered. If the cache has not been reset, {@link #getChanges} will\n\t* return the cached value instead of calculating it again.\n\t*\n\t* This property stores all changes evaluated by `Differ`, including those that took place in the graveyard.\n\t*/\n\t_cachedChangesWithGraveyard = null;\n\t/**\n\t* Set of model items that were marked to get refreshed in {@link #_refreshItem}.\n\t*/\n\t_refreshedItems = /* @__PURE__ */ new Set();\n\t/**\n\t* Creates a `Differ` instance.\n\t*\n\t* @param markerCollection Model's marker collection.\n\t*/\n\tconstructor(markerCollection) {\n\t\tthis._markerCollection = markerCollection;\n\t}\n\t/**\n\t* Informs whether there are any changes buffered in `Differ`.\n\t*/\n\tget isEmpty() {\n\t\treturn this._changesInElement.size == 0 && this._changedMarkers.size == 0 && this._changedRoots.size == 0;\n\t}\n\t/**\n\t* Buffers the given operation. **An operation has to be buffered before it is executed.**\n\t*\n\t* @param operationToBuffer An operation to buffer.\n\t*/\n\tbufferOperation(operationToBuffer) {\n\t\tconst operation = operationToBuffer;\n\t\tswitch (operation.type) {\n\t\t\tcase \"insert\":\n\t\t\t\tif (this._isInInsertedElement(operation.position.parent)) return;\n\t\t\t\tthis._markInsert(operation.position.parent, operation.position.offset, operation.nodes.maxOffset);\n\t\t\t\tbreak;\n\t\t\tcase \"addAttribute\":\n\t\t\tcase \"removeAttribute\":\n\t\t\tcase \"changeAttribute\":\n\t\t\t\tfor (const item of operation.range.getItems({ shallow: true })) {\n\t\t\t\t\tif (this._isInInsertedElement(item.parent)) continue;\n\t\t\t\t\tthis._markAttribute(item);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\tcase \"move\":\n\t\t\tcase \"reinsert\": {\n\t\t\t\tif (operation.sourcePosition.isEqual(operation.targetPosition) || operation.sourcePosition.getShiftedBy(operation.howMany).isEqual(operation.targetPosition)) return;\n\t\t\t\tconst sourceParentInserted = this._isInInsertedElement(operation.sourcePosition.parent);\n\t\t\t\tconst targetParentInserted = this._isInInsertedElement(operation.targetPosition.parent);\n\t\t\t\tif (!sourceParentInserted) this._markRemove(operation.sourcePosition.parent, operation.sourcePosition.offset, operation.howMany);\n\t\t\t\tif (!targetParentInserted) this._markInsert(operation.targetPosition.parent, operation.getMovedRangeStart().offset, operation.howMany);\n\t\t\t\tconst range = ModelRange._createFromPositionAndShift(operation.sourcePosition, operation.howMany);\n\t\t\t\tfor (const node of range.getItems({ shallow: true })) this._setElementState(node, \"move\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"rename\": {\n\t\t\t\tif (this._isInInsertedElement(operation.position.parent)) return;\n\t\t\t\tthis._markRemove(operation.position.parent, operation.position.offset, 1);\n\t\t\t\tthis._markInsert(operation.position.parent, operation.position.offset, 1);\n\t\t\t\tconst range = ModelRange._createFromPositionAndShift(operation.position, 1);\n\t\t\t\tfor (const marker of this._markerCollection.getMarkersIntersectingRange(range)) {\n\t\t\t\t\tconst markerData = marker.getData();\n\t\t\t\t\tthis.bufferMarkerChange(marker.name, markerData, markerData);\n\t\t\t\t}\n\t\t\t\tthis._setElementState(operation.position.nodeAfter, \"rename\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"split\": {\n\t\t\t\tconst splitElement = operation.splitPosition.parent;\n\t\t\t\tif (!this._isInInsertedElement(splitElement)) {\n\t\t\t\t\tthis._markRemove(splitElement, operation.splitPosition.offset, operation.howMany);\n\t\t\t\t\tconst range = ModelRange._createFromPositionAndShift(operation.splitPosition, operation.howMany);\n\t\t\t\t\tfor (const node of range.getItems({ shallow: true })) this._setElementState(node, \"move\");\n\t\t\t\t}\n\t\t\t\tif (!this._isInInsertedElement(operation.insertionPosition.parent)) this._markInsert(operation.insertionPosition.parent, operation.insertionPosition.offset, 1);\n\t\t\t\tif (operation.graveyardPosition) {\n\t\t\t\t\tthis._markRemove(operation.graveyardPosition.parent, operation.graveyardPosition.offset, 1);\n\t\t\t\t\tthis._setElementState(operation.graveyardPosition.nodeAfter, \"move\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"merge\": {\n\t\t\t\tconst mergedElement = operation.sourcePosition.parent;\n\t\t\t\tif (!this._isInInsertedElement(mergedElement.parent)) this._markRemove(mergedElement.parent, mergedElement.startOffset, 1);\n\t\t\t\tconst graveyardParent = operation.graveyardPosition.parent;\n\t\t\t\tthis._markInsert(graveyardParent, operation.graveyardPosition.offset, 1);\n\t\t\t\tthis._setElementState(mergedElement, \"move\");\n\t\t\t\tconst mergedIntoElement = operation.targetPosition.parent;\n\t\t\t\tif (!this._isInInsertedElement(mergedIntoElement)) {\n\t\t\t\t\tthis._markInsert(mergedIntoElement, operation.targetPosition.offset, mergedElement.maxOffset);\n\t\t\t\t\tconst range = ModelRange._createFromPositionAndShift(operation.sourcePosition, operation.howMany);\n\t\t\t\t\tfor (const node of range.getItems({ shallow: true })) this._setElementState(node, \"move\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"detachRoot\":\n\t\t\tcase \"addRoot\": {\n\t\t\t\tconst root = operation.affectedSelectable;\n\t\t\t\tif (!root._isLoaded) return;\n\t\t\t\tif (root.isAttached() == operation.isAdd) return;\n\t\t\t\tthis._bufferRootStateChange(operation.rootName, operation.isAdd);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"addRootAttribute\":\n\t\t\tcase \"removeRootAttribute\":\n\t\t\tcase \"changeRootAttribute\": {\n\t\t\t\tif (!operation.root._isLoaded) return;\n\t\t\t\tconst rootName = operation.root.rootName;\n\t\t\t\tthis._bufferRootAttributeChange(rootName, operation.key, operation.oldValue, operation.newValue);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tthis._cachedChanges = null;\n\t}\n\t/**\n\t* Buffers a marker change.\n\t*\n\t* @param markerName The name of the marker that changed.\n\t* @param oldMarkerData Marker data before the change.\n\t* @param newMarkerData Marker data after the change.\n\t*/\n\tbufferMarkerChange(markerName, oldMarkerData, newMarkerData) {\n\t\tif (oldMarkerData.range && oldMarkerData.range.root.is(\"rootElement\") && !oldMarkerData.range.root._isLoaded) oldMarkerData.range = null;\n\t\tif (newMarkerData.range && newMarkerData.range.root.is(\"rootElement\") && !newMarkerData.range.root._isLoaded) newMarkerData.range = null;\n\t\tlet buffered = this._changedMarkers.get(markerName);\n\t\tif (!buffered) {\n\t\t\tbuffered = {\n\t\t\t\tnewMarkerData,\n\t\t\t\toldMarkerData\n\t\t\t};\n\t\t\tthis._changedMarkers.set(markerName, buffered);\n\t\t} else buffered.newMarkerData = newMarkerData;\n\t\tif (buffered.oldMarkerData.range == null && newMarkerData.range == null) this._changedMarkers.delete(markerName);\n\t}\n\t/**\n\t* Returns all markers that should be removed as a result of buffered changes.\n\t*\n\t* @returns Markers to remove. Each array item is an object containing the `name` and `range` properties.\n\t*/\n\tgetMarkersToRemove() {\n\t\tconst result = [];\n\t\tfor (const [name, change] of this._changedMarkers) if (change.oldMarkerData.range != null) result.push({\n\t\t\tname,\n\t\t\trange: change.oldMarkerData.range\n\t\t});\n\t\treturn result;\n\t}\n\t/**\n\t* Returns all markers which should be added as a result of buffered changes.\n\t*\n\t* @returns Markers to add. Each array item is an object containing the `name` and `range` properties.\n\t*/\n\tgetMarkersToAdd() {\n\t\tconst result = [];\n\t\tfor (const [name, change] of this._changedMarkers) if (change.newMarkerData.range != null) result.push({\n\t\t\tname,\n\t\t\trange: change.newMarkerData.range\n\t\t});\n\t\treturn result;\n\t}\n\t/**\n\t* Returns all markers which changed.\n\t*/\n\tgetChangedMarkers() {\n\t\treturn Array.from(this._changedMarkers).map(([name, change]) => ({\n\t\t\tname,\n\t\t\tdata: {\n\t\t\t\toldRange: change.oldMarkerData.range,\n\t\t\t\tnewRange: change.newMarkerData.range\n\t\t\t}\n\t\t}));\n\t}\n\t/**\n\t* Checks whether some of the buffered changes affect the editor data.\n\t*\n\t* Types of changes which affect the editor data:\n\t*\n\t* * model structure changes,\n\t* * attribute changes,\n\t* * a root is added or detached,\n\t* * changes of markers which were defined as `affectsData`,\n\t* * changes of markers' `affectsData` property.\n\t*/\n\thasDataChanges() {\n\t\tif (this.getChanges().length) return true;\n\t\tif (this._changedRoots.size > 0) return true;\n\t\tfor (const { newMarkerData, oldMarkerData } of this._changedMarkers.values()) {\n\t\t\tif (newMarkerData.affectsData !== oldMarkerData.affectsData) return true;\n\t\t\tif (newMarkerData.affectsData) {\n\t\t\t\tconst markerAdded = newMarkerData.range && !oldMarkerData.range;\n\t\t\t\tconst markerRemoved = !newMarkerData.range && oldMarkerData.range;\n\t\t\t\tconst markerChanged = newMarkerData.range && oldMarkerData.range && !newMarkerData.range.isEqual(oldMarkerData.range);\n\t\t\t\tif (markerAdded || markerRemoved || markerChanged) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Calculates the diff between the old model tree state (the state before the first buffered operations since the last {@link #reset}\n\t* call) and the new model tree state (actual one). It should be called after all buffered operations are executed.\n\t*\n\t* The diff set is returned as an array of {@link module:engine/model/differ~DifferItem diff items}, each describing a change done\n\t* on the model. The items are sorted by the position on which the change happened. If a position\n\t* {@link module:engine/model/position~ModelPosition#isBefore is before} another one, it will be on an earlier index in the diff set.\n\t*\n\t* **Note**: Elements inside inserted element will not have a separate diff item, only the top most element change will be reported.\n\t*\n\t* Because calculating the diff is a costly operation, the result is cached. If no new operation was buffered since the\n\t* previous {@link #getChanges} call, the next call will return the cached value.\n\t*\n\t* @param options Additional options.\n\t* @param options.includeChangesInGraveyard If set to `true`, also changes that happened\n\t* in the graveyard root will be returned. By default, changes in the graveyard root are not returned.\n\t* @returns Diff between the old and the new model tree state.\n\t*/\n\tgetChanges(options = {}) {\n\t\tif (this._cachedChanges) {\n\t\t\tif (options.includeChangesInGraveyard) return this._cachedChangesWithGraveyard.slice();\n\t\t\telse return this._cachedChanges.slice();\n\t\t}\n\t\tlet diffSet = [];\n\t\tfor (const element of this._changesInElement.keys()) {\n\t\t\tconst changes = this._changesInElement.get(element).sort((a, b) => {\n\t\t\t\tif (a.offset === b.offset) {\n\t\t\t\t\tif (a.type != b.type) return a.type == \"remove\" ? -1 : 1;\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn a.offset < b.offset ? -1 : 1;\n\t\t\t});\n\t\t\tconst childrenBefore = this._elementChildrenSnapshots.get(element);\n\t\t\tconst childrenAfter = _getChildrenSnapshots(element.getChildren());\n\t\t\tconst diffInstructions = _generateDiffInstructionsFromChanges(childrenBefore.length, changes);\n\t\t\tlet i = 0;\n\t\t\tlet j = 0;\n\t\t\tfor (const instruction of diffInstructions) if (instruction === \"i\") {\n\t\t\t\tconst action = this._getDiffActionForNode(childrenAfter[i].node, \"insert\");\n\t\t\t\tconst childSnapshotBefore = this._elementsSnapshots.get(childrenAfter[i].node);\n\t\t\t\tconst diffItem = this._getInsertDiff(element, i, action, childrenAfter[i], childSnapshotBefore);\n\t\t\t\tdiffSet.push(diffItem);\n\t\t\t\ti++;\n\t\t\t} else if (instruction === \"r\") {\n\t\t\t\tconst action = this._getDiffActionForNode(childrenBefore[j].node, \"remove\");\n\t\t\t\tconst diffItem = this._getRemoveDiff(element, i, action, childrenBefore[j]);\n\t\t\t\tdiffSet.push(diffItem);\n\t\t\t\tj++;\n\t\t\t} else if (instruction === \"a\") {\n\t\t\t\tconst beforeAttributes = childrenBefore[j].attributes;\n\t\t\t\tconst afterAttributes = childrenAfter[i].attributes;\n\t\t\t\tlet range;\n\t\t\t\tif (childrenAfter[i].name == \"$text\") range = new ModelRange(ModelPosition._createAt(element, i), ModelPosition._createAt(element, i + 1));\n\t\t\t\telse {\n\t\t\t\t\tconst index = element.offsetToIndex(i);\n\t\t\t\t\trange = new ModelRange(ModelPosition._createAt(element, i), ModelPosition._createAt(element.getChild(index), 0));\n\t\t\t\t}\n\t\t\t\tconst diffItems = this._getAttributesDiff(range, beforeAttributes, afterAttributes);\n\t\t\t\tdiffSet.push(...diffItems);\n\t\t\t\ti++;\n\t\t\t\tj++;\n\t\t\t} else {\n\t\t\t\ti++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tdiffSet.sort((a, b) => {\n\t\t\tif (a.position.root != b.position.root) return a.position.root.rootName < b.position.root.rootName ? -1 : 1;\n\t\t\tif (a.position.isEqual(b.position)) return a.changeCount - b.changeCount;\n\t\t\treturn a.position.isBefore(b.position) ? -1 : 1;\n\t\t});\n\t\tfor (let i = 1, prevIndex = 0; i < diffSet.length; i++) {\n\t\t\tconst prevDiff = diffSet[prevIndex];\n\t\t\tconst thisDiff = diffSet[i];\n\t\t\tconst isConsecutiveTextRemove = prevDiff.type == \"remove\" && thisDiff.type == \"remove\" && prevDiff.name == \"$text\" && thisDiff.name == \"$text\" && prevDiff.position.isEqual(thisDiff.position);\n\t\t\tconst isConsecutiveTextAdd = prevDiff.type == \"insert\" && thisDiff.type == \"insert\" && prevDiff.name == \"$text\" && thisDiff.name == \"$text\" && prevDiff.position.parent == thisDiff.position.parent && prevDiff.position.offset + prevDiff.length == thisDiff.position.offset;\n\t\t\tconst isConsecutiveAttributeChange = prevDiff.type == \"attribute\" && thisDiff.type == \"attribute\" && prevDiff.position.parent == thisDiff.position.parent && prevDiff.range.isFlat && thisDiff.range.isFlat && prevDiff.position.offset + prevDiff.length == thisDiff.position.offset && prevDiff.attributeKey == thisDiff.attributeKey && prevDiff.attributeOldValue == thisDiff.attributeOldValue && prevDiff.attributeNewValue == thisDiff.attributeNewValue;\n\t\t\tif (isConsecutiveTextRemove || isConsecutiveTextAdd || isConsecutiveAttributeChange) {\n\t\t\t\tprevDiff.length++;\n\t\t\t\tif (isConsecutiveAttributeChange) prevDiff.range.end = prevDiff.range.end.getShiftedBy(1);\n\t\t\t\tdiffSet[i] = null;\n\t\t\t} else prevIndex = i;\n\t\t}\n\t\tdiffSet = diffSet.filter((v) => v);\n\t\tfor (const item of diffSet) {\n\t\t\tdelete item.changeCount;\n\t\t\tif (item.type == \"attribute\") {\n\t\t\t\tdelete item.position;\n\t\t\t\tdelete item.length;\n\t\t\t}\n\t\t}\n\t\tthis._changeCount = 0;\n\t\tthis._cachedChangesWithGraveyard = diffSet;\n\t\tthis._cachedChanges = diffSet.filter(_changesInGraveyardFilter);\n\t\tif (options.includeChangesInGraveyard) return this._cachedChangesWithGraveyard.slice();\n\t\telse return this._cachedChanges.slice();\n\t}\n\t/**\n\t* Returns all roots that have changed (either were attached, or detached, or their attributes changed).\n\t*\n\t* @returns Diff between the old and the new roots state.\n\t*/\n\tgetChangedRoots() {\n\t\treturn Array.from(this._changedRoots.values()).map((diffItem) => {\n\t\t\tconst entry = { ...diffItem };\n\t\t\tif (entry.state !== void 0) delete entry.attributes;\n\t\t\treturn entry;\n\t\t});\n\t}\n\t/**\n\t* Returns a set of model items that were marked to get refreshed.\n\t*/\n\tgetRefreshedItems() {\n\t\treturn new Set(this._refreshedItems);\n\t}\n\t/**\n\t* Resets `Differ`. Removes all buffered changes.\n\t*/\n\treset() {\n\t\tthis._changesInElement.clear();\n\t\tthis._elementChildrenSnapshots.clear();\n\t\tthis._elementsSnapshots.clear();\n\t\tthis._elementState.clear();\n\t\tthis._changedMarkers.clear();\n\t\tthis._changedRoots.clear();\n\t\tthis._refreshedItems.clear();\n\t\tthis._cachedChanges = null;\n\t}\n\t/**\n\t* Marks the given `item` in differ to be \"refreshed\". It means that the item will be marked as removed and inserted\n\t* in the differ changes set, so it will be effectively re-converted when the differ changes are handled by a dispatcher.\n\t*\n\t* @internal\n\t* @param item Item to refresh.\n\t*/\n\t_refreshItem(item) {\n\t\tif (this._isInInsertedElement(item.parent)) return;\n\t\tthis._markRemove(item.parent, item.startOffset, item.offsetSize);\n\t\tthis._markInsert(item.parent, item.startOffset, item.offsetSize);\n\t\tthis._refreshedItems.add(item);\n\t\tthis._setElementState(item, \"refresh\");\n\t\tconst range = ModelRange._createOn(item);\n\t\tfor (const marker of this._markerCollection.getMarkersIntersectingRange(range)) {\n\t\t\tconst markerData = marker.getData();\n\t\t\tthis.bufferMarkerChange(marker.name, markerData, markerData);\n\t\t}\n\t\tthis._cachedChanges = null;\n\t}\n\t/**\n\t* Buffers all the data related to given root like it was all just added to the editor.\n\t*\n\t* Following changes are buffered:\n\t*\n\t* * root is attached,\n\t* * all root content is inserted,\n\t* * all root attributes are added,\n\t* * all markers inside the root are added.\n\t*\n\t* @internal\n\t*/\n\t_bufferRootLoad(root) {\n\t\tif (!root.isAttached()) return;\n\t\tthis._bufferRootStateChange(root.rootName, true);\n\t\tthis._markInsert(root, 0, root.maxOffset);\n\t\tfor (const key of root.getAttributeKeys()) this._bufferRootAttributeChange(root.rootName, key, null, root.getAttribute(key));\n\t\tfor (const marker of this._markerCollection) if (marker.getRange().root == root) {\n\t\t\tconst markerData = marker.getData();\n\t\t\tthis.bufferMarkerChange(marker.name, {\n\t\t\t\t...markerData,\n\t\t\t\trange: null\n\t\t\t}, markerData);\n\t\t}\n\t}\n\t/**\n\t* Buffers the root state change after the root was attached or detached\n\t*/\n\t_bufferRootStateChange(rootName, isAttached) {\n\t\tif (!this._changedRoots.has(rootName)) {\n\t\t\tthis._changedRoots.set(rootName, {\n\t\t\t\tname: rootName,\n\t\t\t\tstate: isAttached ? \"attached\" : \"detached\"\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst diffItem = this._changedRoots.get(rootName);\n\t\tif (diffItem.state !== void 0) {\n\t\t\tdelete diffItem.state;\n\t\t\tif (diffItem.attributes === void 0) this._changedRoots.delete(rootName);\n\t\t} else diffItem.state = isAttached ? \"attached\" : \"detached\";\n\t}\n\t/**\n\t* Buffers a root attribute change.\n\t*/\n\t_bufferRootAttributeChange(rootName, key, oldValue, newValue) {\n\t\tconst diffItem = this._changedRoots.get(rootName) || { name: rootName };\n\t\tconst attrs = diffItem.attributes || {};\n\t\tif (attrs[key]) {\n\t\t\tconst attrEntry = attrs[key];\n\t\t\tif (newValue === attrEntry.oldValue) delete attrs[key];\n\t\t\telse attrEntry.newValue = newValue;\n\t\t} else attrs[key] = {\n\t\t\toldValue,\n\t\t\tnewValue\n\t\t};\n\t\tif (Object.entries(attrs).length === 0) {\n\t\t\tdelete diffItem.attributes;\n\t\t\tif (diffItem.state === void 0) this._changedRoots.delete(rootName);\n\t\t} else {\n\t\t\tdiffItem.attributes = attrs;\n\t\t\tthis._changedRoots.set(rootName, diffItem);\n\t\t}\n\t}\n\t/**\n\t* Saves and handles an insert change.\n\t*/\n\t_markInsert(parent, offset, howMany) {\n\t\tif (parent.root.is(\"rootElement\") && !parent.root._isLoaded) return;\n\t\tconst changeItem = {\n\t\t\ttype: \"insert\",\n\t\t\toffset,\n\t\t\thowMany,\n\t\t\tcount: this._changeCount++\n\t\t};\n\t\tthis._markChange(parent, changeItem);\n\t}\n\t/**\n\t* Saves and handles a remove change.\n\t*/\n\t_markRemove(parent, offset, howMany) {\n\t\tif (parent.root.is(\"rootElement\") && !parent.root._isLoaded) return;\n\t\tconst changeItem = {\n\t\t\ttype: \"remove\",\n\t\t\toffset,\n\t\t\thowMany,\n\t\t\tcount: this._changeCount++\n\t\t};\n\t\tthis._markChange(parent, changeItem);\n\t\tthis._removeAllNestedChanges(parent, offset, howMany);\n\t}\n\t/**\n\t* Saves and handles an attribute change.\n\t*/\n\t_markAttribute(item) {\n\t\tif (item.root.is(\"rootElement\") && !item.root._isLoaded) return;\n\t\tconst changeItem = {\n\t\t\ttype: \"attribute\",\n\t\t\toffset: item.startOffset,\n\t\t\thowMany: item.offsetSize,\n\t\t\tcount: this._changeCount++\n\t\t};\n\t\tthis._markChange(item.parent, changeItem);\n\t}\n\t/**\n\t* Saves and handles a model change.\n\t*/\n\t_markChange(parent, changeItem) {\n\t\tthis._makeSnapshots(parent);\n\t\tconst changes = this._getChangesForElement(parent);\n\t\tthis._handleChange(changeItem, changes);\n\t\tchanges.push(changeItem);\n\t\tfor (let i = 0; i < changes.length; i++) if (changes[i].howMany < 1) {\n\t\t\tchanges.splice(i, 1);\n\t\t\ti--;\n\t\t}\n\t}\n\t/**\n\t* Tries to set given state for given item.\n\t*\n\t* This method does simple validation (it sets the state only for model elements, not for text proxy nodes). It also follows state\n\t* setting rules, that is, `'refresh'` cannot overwrite `'rename'`, and `'rename'` cannot overwrite `'move'`.\n\t*/\n\t_setElementState(node, state) {\n\t\tif (!node.is(\"element\")) return;\n\t\tconst currentStatePriority = Differ._statesPriority.indexOf(this._elementState.get(node));\n\t\tif (Differ._statesPriority.indexOf(state) > currentStatePriority) this._elementState.set(node, state);\n\t}\n\t/**\n\t* Returns a value for {@link ~DifferItemAction `action`} property for diff items returned by {@link ~Differ#getChanges}.\n\t* This method aims to return `'rename'` or `'refresh'` when it should, and `diffItemType` (\"default action\") in all other cases.\n\t*\n\t* It bases on a few factors:\n\t*\n\t* * for text nodes, the method always returns `diffItemType`,\n\t* * for newly inserted element, the method returns `diffItemType`,\n\t* * if {@link ~Differ#_elementState element state} was not recorded, the method returns `diffItemType`,\n\t* * if state was recorded, and it was `'move'` (default action), the method returns `diffItemType`,\n\t* * finally, if state was `'refresh'` or `'rename'`, the method returns the state value.\n\t*/\n\t_getDiffActionForNode(node, diffItemType) {\n\t\tif (!node.is(\"element\")) return diffItemType;\n\t\tif (!this._elementsSnapshots.has(node)) return diffItemType;\n\t\tconst state = this._elementState.get(node);\n\t\tif (!state || state == \"move\") return diffItemType;\n\t\treturn state;\n\t}\n\t/**\n\t* Gets an array of changes that have already been saved for a given element.\n\t*/\n\t_getChangesForElement(element) {\n\t\tlet changes;\n\t\tif (this._changesInElement.has(element)) changes = this._changesInElement.get(element);\n\t\telse {\n\t\t\tchanges = [];\n\t\t\tthis._changesInElement.set(element, changes);\n\t\t}\n\t\treturn changes;\n\t}\n\t/**\n\t* Creates and saves a snapshot for all children of the given element.\n\t*/\n\t_makeSnapshots(element) {\n\t\tif (this._elementChildrenSnapshots.has(element)) return;\n\t\tconst childrenSnapshots = _getChildrenSnapshots(element.getChildren());\n\t\tthis._elementChildrenSnapshots.set(element, childrenSnapshots);\n\t\tfor (const snapshot of childrenSnapshots) this._elementsSnapshots.set(snapshot.node, snapshot);\n\t}\n\t/**\n\t* For a given newly saved change, compares it with a change already done on the element and modifies the incoming\n\t* change and/or the old change.\n\t*\n\t* @param inc Incoming (new) change.\n\t* @param changes An array containing all the changes done on that element.\n\t*/\n\t_handleChange(inc, changes) {\n\t\tinc.nodesToHandle = inc.howMany;\n\t\tfor (const old of changes) {\n\t\t\tconst incEnd = inc.offset + inc.howMany;\n\t\t\tconst oldEnd = old.offset + old.howMany;\n\t\t\tif (inc.type == \"insert\") {\n\t\t\t\tif (old.type == \"insert\") {\n\t\t\t\t\tif (inc.offset <= old.offset) old.offset += inc.howMany;\n\t\t\t\t\telse if (inc.offset < oldEnd) {\n\t\t\t\t\t\told.howMany += inc.nodesToHandle;\n\t\t\t\t\t\tinc.nodesToHandle = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (old.type == \"remove\") {\n\t\t\t\t\tif (inc.offset < old.offset) old.offset += inc.howMany;\n\t\t\t\t}\n\t\t\t\tif (old.type == \"attribute\") {\n\t\t\t\t\tif (inc.offset <= old.offset) old.offset += inc.howMany;\n\t\t\t\t\telse if (inc.offset < oldEnd) {\n\t\t\t\t\t\tconst howMany = old.howMany;\n\t\t\t\t\t\told.howMany = inc.offset - old.offset;\n\t\t\t\t\t\tchanges.unshift({\n\t\t\t\t\t\t\ttype: \"attribute\",\n\t\t\t\t\t\t\toffset: incEnd,\n\t\t\t\t\t\t\thowMany: howMany - old.howMany,\n\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (inc.type == \"remove\") {\n\t\t\t\tif (old.type == \"insert\") {\n\t\t\t\t\tif (incEnd <= old.offset) old.offset -= inc.howMany;\n\t\t\t\t\telse if (incEnd <= oldEnd) {\n\t\t\t\t\t\tif (inc.offset < old.offset) {\n\t\t\t\t\t\t\tconst intersectionLength = incEnd - old.offset;\n\t\t\t\t\t\t\told.offset = inc.offset;\n\t\t\t\t\t\t\told.howMany -= intersectionLength;\n\t\t\t\t\t\t\tinc.nodesToHandle -= intersectionLength;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\told.howMany -= inc.nodesToHandle;\n\t\t\t\t\t\t\tinc.nodesToHandle = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (inc.offset <= old.offset) {\n\t\t\t\t\t\tinc.nodesToHandle -= old.howMany;\n\t\t\t\t\t\told.howMany = 0;\n\t\t\t\t\t} else if (inc.offset < oldEnd) {\n\t\t\t\t\t\tconst intersectionLength = oldEnd - inc.offset;\n\t\t\t\t\t\told.howMany -= intersectionLength;\n\t\t\t\t\t\tinc.nodesToHandle -= intersectionLength;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (old.type == \"remove\") {\n\t\t\t\t\tif (incEnd <= old.offset) old.offset -= inc.howMany;\n\t\t\t\t\telse if (inc.offset < old.offset) {\n\t\t\t\t\t\tinc.nodesToHandle += old.howMany;\n\t\t\t\t\t\told.howMany = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (old.type == \"attribute\") {\n\t\t\t\t\tif (incEnd <= old.offset) old.offset -= inc.howMany;\n\t\t\t\t\telse if (inc.offset < old.offset) {\n\t\t\t\t\t\tconst intersectionLength = incEnd - old.offset;\n\t\t\t\t\t\told.offset = inc.offset;\n\t\t\t\t\t\told.howMany -= intersectionLength;\n\t\t\t\t\t} else if (inc.offset < oldEnd) {\n\t\t\t\t\t\tif (incEnd <= oldEnd) {\n\t\t\t\t\t\t\tconst howMany = old.howMany;\n\t\t\t\t\t\t\told.howMany = inc.offset - old.offset;\n\t\t\t\t\t\t\tconst howManyAfter = howMany - old.howMany - inc.nodesToHandle;\n\t\t\t\t\t\t\tchanges.unshift({\n\t\t\t\t\t\t\t\ttype: \"attribute\",\n\t\t\t\t\t\t\t\toffset: inc.offset,\n\t\t\t\t\t\t\t\thowMany: howManyAfter,\n\t\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else old.howMany -= oldEnd - inc.offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (inc.type == \"attribute\") {\n\t\t\t\tif (old.type == \"insert\") {\n\t\t\t\t\tif (inc.offset < old.offset && incEnd > old.offset) {\n\t\t\t\t\t\tif (incEnd > oldEnd) {\n\t\t\t\t\t\t\tconst attributePart = {\n\t\t\t\t\t\t\t\ttype: \"attribute\",\n\t\t\t\t\t\t\t\toffset: oldEnd,\n\t\t\t\t\t\t\t\thowMany: incEnd - oldEnd,\n\t\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tthis._handleChange(attributePart, changes);\n\t\t\t\t\t\t\tchanges.push(attributePart);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinc.nodesToHandle = old.offset - inc.offset;\n\t\t\t\t\t\tinc.howMany = inc.nodesToHandle;\n\t\t\t\t\t} else if (inc.offset >= old.offset && inc.offset < oldEnd) {\n\t\t\t\t\t\tif (incEnd > oldEnd) {\n\t\t\t\t\t\t\tinc.nodesToHandle = incEnd - oldEnd;\n\t\t\t\t\t\t\tinc.offset = oldEnd;\n\t\t\t\t\t\t} else inc.nodesToHandle = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (old.type == \"remove\") {\n\t\t\t\t\tif (inc.offset < old.offset && incEnd > old.offset) {\n\t\t\t\t\t\tconst attributePart = {\n\t\t\t\t\t\t\ttype: \"attribute\",\n\t\t\t\t\t\t\toffset: old.offset,\n\t\t\t\t\t\t\thowMany: incEnd - old.offset,\n\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis._handleChange(attributePart, changes);\n\t\t\t\t\t\tchanges.push(attributePart);\n\t\t\t\t\t\tinc.nodesToHandle = old.offset - inc.offset;\n\t\t\t\t\t\tinc.howMany = inc.nodesToHandle;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (old.type == \"attribute\") {\n\t\t\t\t\tif (inc.offset >= old.offset && incEnd <= oldEnd) {\n\t\t\t\t\t\tinc.nodesToHandle = 0;\n\t\t\t\t\t\tinc.howMany = 0;\n\t\t\t\t\t\tinc.offset = 0;\n\t\t\t\t\t} else if (inc.offset <= old.offset && incEnd >= oldEnd) old.howMany = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinc.howMany = inc.nodesToHandle;\n\t\tdelete inc.nodesToHandle;\n\t}\n\t/**\n\t* Returns an object with a single insert change description.\n\t*\n\t* @param parent The element in which the change happened.\n\t* @param offset The offset at which change happened.\n\t* @param action Further specifies what kind of action led to generating this change.\n\t* @param elementSnapshot Snapshot of the inserted node after changes.\n\t* @param elementSnapshotBefore Snapshot of the inserted node before changes.\n\t* @returns The diff item.\n\t*/\n\t_getInsertDiff(parent, offset, action, elementSnapshot, elementSnapshotBefore) {\n\t\tconst diffItem = {\n\t\t\ttype: \"insert\",\n\t\t\tposition: ModelPosition._createAt(parent, offset),\n\t\t\tname: elementSnapshot.name,\n\t\t\tattributes: new Map(elementSnapshot.attributes),\n\t\t\tlength: 1,\n\t\t\tchangeCount: this._changeCount++,\n\t\t\taction\n\t\t};\n\t\tif (action != \"insert\" && elementSnapshotBefore) diffItem.before = {\n\t\t\tname: elementSnapshotBefore.name,\n\t\t\tattributes: new Map(elementSnapshotBefore.attributes)\n\t\t};\n\t\treturn diffItem;\n\t}\n\t/**\n\t* Returns an object with a single remove change description.\n\t*\n\t* @param parent The element in which change happened.\n\t* @param offset The offset at which change happened.\n\t* @param action Further specifies what kind of action led to generating this change.\n\t* @param elementSnapshot The snapshot of the removed node before changes.\n\t* @returns The diff item.\n\t*/\n\t_getRemoveDiff(parent, offset, action, elementSnapshot) {\n\t\treturn {\n\t\t\ttype: \"remove\",\n\t\t\taction,\n\t\t\tposition: ModelPosition._createAt(parent, offset),\n\t\t\tname: elementSnapshot.name,\n\t\t\tattributes: new Map(elementSnapshot.attributes),\n\t\t\tlength: 1,\n\t\t\tchangeCount: this._changeCount++\n\t\t};\n\t}\n\t/**\n\t* Returns an array of objects where each one is a single attribute change description.\n\t*\n\t* @param range The range where the change happened.\n\t* @param oldAttributes A map, map iterator or compatible object that contains attributes before the change.\n\t* @param newAttributes A map, map iterator or compatible object that contains attributes after the change.\n\t* @returns An array containing one or more diff items.\n\t*/\n\t_getAttributesDiff(range, oldAttributes, newAttributes) {\n\t\tconst diffs = [];\n\t\tnewAttributes = new Map(newAttributes);\n\t\tfor (const [key, oldValue] of oldAttributes) {\n\t\t\tconst newValue = newAttributes.has(key) ? newAttributes.get(key) : null;\n\t\t\tif (newValue !== oldValue) diffs.push({\n\t\t\t\ttype: \"attribute\",\n\t\t\t\tposition: range.start,\n\t\t\t\trange: range.clone(),\n\t\t\t\tlength: 1,\n\t\t\t\tattributeKey: key,\n\t\t\t\tattributeOldValue: oldValue,\n\t\t\t\tattributeNewValue: newValue,\n\t\t\t\tchangeCount: this._changeCount++\n\t\t\t});\n\t\t\tnewAttributes.delete(key);\n\t\t}\n\t\tfor (const [key, newValue] of newAttributes) diffs.push({\n\t\t\ttype: \"attribute\",\n\t\t\tposition: range.start,\n\t\t\trange: range.clone(),\n\t\t\tlength: 1,\n\t\t\tattributeKey: key,\n\t\t\tattributeOldValue: null,\n\t\t\tattributeNewValue: newValue,\n\t\t\tchangeCount: this._changeCount++\n\t\t});\n\t\treturn diffs;\n\t}\n\t/**\n\t* Checks whether given element or any of its parents is an element that is buffered as an inserted element.\n\t*/\n\t_isInInsertedElement(element) {\n\t\tconst parent = element.parent;\n\t\tif (!parent) return false;\n\t\tconst changes = this._changesInElement.get(parent);\n\t\tconst offset = element.startOffset;\n\t\tif (changes) {\n\t\t\tfor (const change of changes) if (change.type == \"insert\" && offset >= change.offset && offset < change.offset + change.howMany) return true;\n\t\t}\n\t\treturn this._isInInsertedElement(parent);\n\t}\n\t/**\n\t* Removes deeply all buffered changes that are registered in elements from range specified by `parent`, `offset`\n\t* and `howMany`.\n\t*/\n\t_removeAllNestedChanges(parent, offset, howMany) {\n\t\tconst range = new ModelRange(ModelPosition._createAt(parent, offset), ModelPosition._createAt(parent, offset + howMany));\n\t\tfor (const item of range.getItems({ shallow: true })) if (item.is(\"element\")) {\n\t\t\tthis._changesInElement.delete(item);\n\t\t\tthis._removeAllNestedChanges(item, 0, item.maxOffset);\n\t\t}\n\t}\n};\n/**\n* Returns a snapshot for the specified child node. Text node snapshots have the `name` property set to `$text`.\n*/\nfunction _getSingleNodeSnapshot(node) {\n\treturn {\n\t\tnode,\n\t\tname: node.is(\"$text\") ? \"$text\" : node.name,\n\t\tattributes: new Map(node.getAttributes())\n\t};\n}\n/**\n* Returns an array that is a copy of passed child list with the exception that text nodes are split to one or more\n* objects, each representing one character and attributes set on that character.\n*/\nfunction _getChildrenSnapshots(children) {\n\tconst snapshots = [];\n\tfor (const child of children) if (child.is(\"$text\")) for (let i = 0; i < child.data.length; ++i) snapshots.push(_getSingleNodeSnapshot(child));\n\telse snapshots.push(_getSingleNodeSnapshot(child));\n\treturn snapshots;\n}\n/**\n* Generates array of diff instructions for given changes set.\n*\n* Generated actions are:\n*\n* - 'e' for 'equal' - when item at that position did not change,\n* - 'i' for 'insert' - when item at that position was inserted,\n* - 'r' for 'remove' - when item at that position was removed,\n* - 'a' for 'attribute' - when item at that position has it attributes changed.\n*\n* Example (assume that uppercase letters have bold attribute, compare with function code):\n*\n* children before:\tfooBAR\n* children after:\tfoxybAR\n*\n* changes: type: remove, offset: 1, howMany: 1\n*\t\t\ttype: insert, offset: 2, howMany: 2\n*\t\t\ttype: attribute, offset: 4, howMany: 1\n*\n* Expected actions: equal (f), remove (o), equal (o), insert (x), insert (y), attribute (b), equal (A), equal (R)\n*\n* Steps taken by the script:\n*\n* 1. change = \"type: remove, offset: 1, howMany: 1\"; offset = 0; oldChildrenHandled = 0\n*    1.1 between this change and the beginning is one not-changed node, fill with one equal action, one old child has been handled\n*    1.2 this change removes one node, add one remove action\n*    1.3 change last visited `offset` to 1\n*    1.4 since an old child has been removed, one more old child has been handled\n*    1.5 actions at this point are: equal, remove\n*\n* 2. change = \"type: insert, offset: 2, howMany: 2\"; offset = 1; oldChildrenHandled = 2\n*    2.1 between this change and previous change is one not-changed node, add equal action, another one old children has been handled\n*    2.2 this change inserts two nodes, add two insert actions\n*    2.3 change last visited offset to the end of the inserted range, that is 4\n*    2.4 actions at this point are: equal, remove, equal, insert, insert\n*\n* 3. change = \"type: attribute, offset: 4, howMany: 1\"; offset = 4, oldChildrenHandled = 3\n*    3.1 between this change and previous change are no not-changed nodes\n*    3.2 this change changes one node, add one attribute action\n*    3.3 change last visited `offset` to the end of change range, that is 5\n*    3.4 since an old child has been changed, one more old child has been handled\n*    3.5 actions at this point are: equal, remove, equal, insert, insert, attribute\n*\n* 4. after loop oldChildrenHandled = 4, oldChildrenLength = 6 (fooBAR is 6 characters)\n*    4.1 fill up with two equal actions\n*\n* The result actions are: equal, remove, equal, insert, insert, attribute, equal, equal.\n*/\nfunction _generateDiffInstructionsFromChanges(oldChildrenLength, changes) {\n\tconst diff = [];\n\tlet offset = 0;\n\tlet oldChildrenHandled = 0;\n\tfor (const change of changes) {\n\t\tif (change.offset > offset) {\n\t\t\tfor (let i = 0; i < change.offset - offset; i++) diff.push(\"e\");\n\t\t\toldChildrenHandled += change.offset - offset;\n\t\t}\n\t\tif (change.type == \"insert\") {\n\t\t\tfor (let i = 0; i < change.howMany; i++) diff.push(\"i\");\n\t\t\toffset = change.offset + change.howMany;\n\t\t} else if (change.type == \"remove\") {\n\t\t\tfor (let i = 0; i < change.howMany; i++) diff.push(\"r\");\n\t\t\toffset = change.offset;\n\t\t\toldChildrenHandled += change.howMany;\n\t\t} else {\n\t\t\tif (change.howMany > 1500) for (let i = 0; i < change.howMany; i++) diff.push(\"a\");\n\t\t\telse diff.push(...\"a\".repeat(change.howMany).split(\"\"));\n\t\t\toffset = change.offset + change.howMany;\n\t\t\toldChildrenHandled += change.howMany;\n\t\t}\n\t}\n\tif (oldChildrenHandled < oldChildrenLength) for (let i = 0; i < oldChildrenLength - oldChildrenHandled - offset; i++) diff.push(\"e\");\n\treturn diff;\n}\n/**\n* Filter callback for `Array.filter` that filters out change entries that are in graveyard.\n*/\nfunction _changesInGraveyardFilter(entry) {\n\tconst posInGy = \"position\" in entry && entry.position.root.rootName == \"$graveyard\";\n\tconst rangeInGy = \"range\" in entry && entry.range.root.rootName == \"$graveyard\";\n\treturn !posInGy && !rangeInGy;\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* `History` keeps the track of all the operations applied to the {@link module:engine/model/document~ModelDocument document}.\n*/\nvar History = class {\n\t/**\n\t* Operations added to the history.\n\t*/\n\t_operations = [];\n\t/**\n\t* Holds an information which {@link module:engine/model/operation/operation~Operation operation} undoes which\n\t* {@link module:engine/model/operation/operation~Operation operation}.\n\t*\n\t* Keys of the map are \"undoing operations\", that is operations that undone some other operations. For each key, the\n\t* value is an operation that has been undone by the \"undoing operation\".\n\t*/\n\t_undoPairs = /* @__PURE__ */ new Map();\n\t/**\n\t* Holds all undone operations.\n\t*/\n\t_undoneOperations = /* @__PURE__ */ new Set();\n\t/**\n\t* A map that allows retrieving the operations fast based on the given base version.\n\t*/\n\t_baseVersionToOperationIndex = /* @__PURE__ */ new Map();\n\t/**\n\t* The history version.\n\t*/\n\t_version = 0;\n\t/**\n\t* The gap pairs kept in the <from,to> format.\n\t*\n\t* Anytime the `history.version` is set to a version larger than `history.version + 1`,\n\t* a new <lastHistoryVersion, newHistoryVersion> entry is added to the map.\n\t*/\n\t_gaps = /* @__PURE__ */ new Map();\n\t/**\n\t* The version of the last operation in the history.\n\t*\n\t* The history version is incremented automatically when a new operation is added to the history.\n\t* Setting the version manually should be done only in rare circumstances when a gap is planned\n\t* between history versions. When doing so, a gap will be created and the history will accept adding\n\t* an operation with base version equal to the new history version.\n\t*/\n\tget version() {\n\t\treturn this._version;\n\t}\n\tset version(version) {\n\t\tif (this._operations.length && version > this._version + 1) this._gaps.set(this._version, version);\n\t\tthis._version = version;\n\t}\n\t/**\n\t* The last history operation.\n\t*/\n\tget lastOperation() {\n\t\treturn this._operations[this._operations.length - 1];\n\t}\n\t/**\n\t* Adds an operation to the history and increments the history version.\n\t*\n\t* The operation's base version should be equal to the history version. Otherwise an error is thrown.\n\t*/\n\taddOperation(operation) {\n\t\tif (operation.baseVersion !== this.version)\n /**\n\t\t* Only operations with matching versions can be added to the history.\n\t\t*\n\t\t* @error model-document-history-addoperation-incorrect-version\n\t\t* @param {module:engine/model/operation/operation~Operation} operation The current operation.\n\t\t* @param {number} historyVersion The current document history version.\n\t\t*/\n\t\tthrow new CKEditorError(\"model-document-history-addoperation-incorrect-version\", this, {\n\t\t\toperation,\n\t\t\thistoryVersion: this.version\n\t\t});\n\t\tthis._operations.push(operation);\n\t\tthis._version++;\n\t\tthis._baseVersionToOperationIndex.set(operation.baseVersion, this._operations.length - 1);\n\t}\n\t/**\n\t* Returns operations from the given range of operation base versions that were added to the history.\n\t*\n\t* Note that there may be gaps in operations base versions.\n\t*\n\t* @param fromBaseVersion Base version from which operations should be returned (inclusive).\n\t* @param toBaseVersion Base version up to which operations should be returned (exclusive).\n\t* @returns History operations for the given range, in chronological order.\n\t*/\n\tgetOperations(fromBaseVersion, toBaseVersion = this.version) {\n\t\tif (!this._operations.length) return [];\n\t\tconst firstOperation = this._operations[0];\n\t\tif (fromBaseVersion === void 0) fromBaseVersion = firstOperation.baseVersion;\n\t\tlet inclusiveTo = toBaseVersion - 1;\n\t\tfor (const [gapFrom, gapTo] of this._gaps) {\n\t\t\tif (fromBaseVersion > gapFrom && fromBaseVersion < gapTo) fromBaseVersion = gapTo;\n\t\t\tif (inclusiveTo > gapFrom && inclusiveTo < gapTo) inclusiveTo = gapFrom - 1;\n\t\t}\n\t\tif (inclusiveTo < firstOperation.baseVersion || fromBaseVersion > this.lastOperation.baseVersion) return [];\n\t\tlet fromIndex = this._baseVersionToOperationIndex.get(fromBaseVersion);\n\t\tif (fromIndex === void 0) fromIndex = 0;\n\t\tlet toIndex = this._baseVersionToOperationIndex.get(inclusiveTo);\n\t\tif (toIndex === void 0) toIndex = this._operations.length - 1;\n\t\treturn this._operations.slice(fromIndex, toIndex + 1);\n\t}\n\t/**\n\t* Returns operation from the history that bases on given `baseVersion`.\n\t*\n\t* @param baseVersion Base version of the operation to get.\n\t* @returns Operation with given base version or `undefined` if there is no such operation in history.\n\t*/\n\tgetOperation(baseVersion) {\n\t\tconst operationIndex = this._baseVersionToOperationIndex.get(baseVersion);\n\t\tif (operationIndex === void 0) return;\n\t\treturn this._operations[operationIndex];\n\t}\n\t/**\n\t* Marks in history that one operation is an operation that is undoing the other operation. By marking operation this way,\n\t* history is keeping more context information about operations, which helps in operational transformation.\n\t*\n\t* @param undoneOperation Operation which is undone by `undoingOperation`.\n\t* @param undoingOperation Operation which undoes `undoneOperation`.\n\t*/\n\tsetOperationAsUndone(undoneOperation, undoingOperation) {\n\t\tthis._undoPairs.set(undoingOperation, undoneOperation);\n\t\tthis._undoneOperations.add(undoneOperation);\n\t}\n\t/**\n\t* Checks whether given `operation` is undoing any other operation.\n\t*\n\t* @param operation Operation to check.\n\t* @returns `true` if given `operation` is undoing any other operation, `false` otherwise.\n\t*/\n\tisUndoingOperation(operation) {\n\t\treturn this._undoPairs.has(operation);\n\t}\n\t/**\n\t* Checks whether given `operation` has been undone by any other operation.\n\t*\n\t* @param operation Operation to check.\n\t* @returns `true` if given `operation` has been undone any other operation, `false` otherwise.\n\t*/\n\tisUndoneOperation(operation) {\n\t\treturn this._undoneOperations.has(operation);\n\t}\n\t/**\n\t* For given `undoingOperation`, returns the operation which has been undone by it.\n\t*\n\t* @returns Operation that has been undone by given `undoingOperation` or `undefined`\n\t* if given `undoingOperation` is not undoing any other operation.\n\t*/\n\tgetUndoneOperation(undoingOperation) {\n\t\treturn this._undoPairs.get(undoingOperation);\n\t}\n\t/**\n\t* Resets the history of operations.\n\t*/\n\treset() {\n\t\tthis._version = 0;\n\t\tthis._undoPairs = /* @__PURE__ */ new Map();\n\t\tthis._operations = [];\n\t\tthis._undoneOperations = /* @__PURE__ */ new Set();\n\t\tthis._gaps = /* @__PURE__ */ new Map();\n\t\tthis._baseVersionToOperationIndex = /* @__PURE__ */ new Map();\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 engine/model/rootelement\n*/\n/**\n* Type of {@link module:engine/model/element~ModelElement} that is a root of a model tree.\n*/\nvar ModelRootElement = class extends ModelElement {\n\t/**\n\t* Unique root name used to identify this root element by {@link module:engine/model/document~ModelDocument}.\n\t*/\n\trootName;\n\t/**\n\t* Document that is an owner of this root.\n\t*/\n\t_document;\n\t/**\n\t* @internal\n\t*/\n\t_isAttached = true;\n\t/**\n\t* Informs if the root element is loaded (default).\n\t*\n\t* @internal\n\t*/\n\t_isLoaded = true;\n\t/**\n\t* Creates root element.\n\t*\n\t* @param document Document that is an owner of this root.\n\t* @param name Node name.\n\t* @param rootName Unique root name used to identify this root element by {@link module:engine/model/document~ModelDocument}.\n\t*/\n\tconstructor(document, name, rootName = \"main\") {\n\t\tsuper(name);\n\t\tthis._document = document;\n\t\tthis.rootName = rootName;\n\t}\n\t/**\n\t* {@link module:engine/model/document~ModelDocument Document} that owns this root element.\n\t*/\n\tget document() {\n\t\treturn this._document;\n\t}\n\t/**\n\t* Informs if the root element is currently attached to the document, or not.\n\t*\n\t* A detached root is equivalent to being removed and cannot contain any children or markers.\n\t*\n\t* By default, a newly added root is attached. It can be detached using\n\t* {@link module:engine/model/writer~ModelWriter#detachRoot `Writer#detachRoot`}. A detached root can be re-attached again using\n\t* {@link module:engine/model/writer~ModelWriter#addRoot `Writer#addRoot`}.\n\t*/\n\tisAttached() {\n\t\treturn this._isAttached;\n\t}\n\t/**\n\t* Converts `RootElement` instance to `string` containing its name.\n\t*\n\t* @returns `RootElement` instance converted to `string`.\n\t*/\n\ttoJSON() {\n\t\treturn this.rootName;\n\t}\n};\nModelRootElement.prototype.is = function(type, name) {\n\tif (!name) return type === \"rootElement\" || type === \"model:rootElement\" || type === \"element\" || type === \"model:element\" || type === \"node\" || type === \"model:node\";\n\treturn name === this.name && (type === \"rootElement\" || type === \"model:rootElement\" || type === \"element\" || type === \"model: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 engine/model/document\n*/\nconst graveyardName = \"$graveyard\";\nconst ModelDocumentBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Data model's document. It contains the model's structure, its selection and the history of changes.\n*\n* Read more about working with the model in\n* {@glink framework/architecture/editing-engine#model introduction to the the editing engine's architecture}.\n*\n* Usually, the document contains just one {@link module:engine/model/document~ModelDocument#roots root element}, so\n* you can retrieve it by just calling {@link module:engine/model/document~ModelDocument#getRoot} without specifying its name:\n*\n* ```ts\n* model.document.getRoot(); // -> returns the main root\n* ```\n*\n* However, the document may contain multiple roots – e.g. when the editor has multiple editable areas\n* (e.g. a title and a body of a message).\n*/\nvar ModelDocument = class extends ModelDocumentBase {\n\t/**\n\t* The {@link module:engine/model/model~Model model} that the document is a part of.\n\t*/\n\tmodel;\n\t/**\n\t* The document's history.\n\t*/\n\thistory;\n\t/**\n\t* The selection in this document.\n\t*/\n\tselection;\n\t/**\n\t* A list of roots that are owned and managed by this document. Use {@link #createRoot}, {@link #getRoot} and\n\t* {@link #getRootNames} to manipulate it.\n\t*/\n\troots;\n\t/**\n\t* The model differ object. Its role is to buffer changes done on the model document and then calculate a diff of those changes.\n\t*/\n\tdiffer;\n\t/**\n\t* Defines whether the document is in a read-only mode.\n\t*\n\t* The user should not be able to change the data of a document that is read-only.\n\t*\n\t* @readonly\n\t*/\n\tisReadOnly;\n\t/**\n\t* Post-fixer callbacks registered to the model document.\n\t*/\n\t_postFixers;\n\t/**\n\t* A flag that indicates whether the selection has changed since last change block.\n\t*/\n\t_hasSelectionChangedFromTheLastChangeBlock;\n\t/**\n\t* Creates an empty document instance with no {@link #roots} (other than\n\t* the {@link #graveyard graveyard root}).\n\t*/\n\tconstructor(model) {\n\t\tsuper();\n\t\tthis.model = model;\n\t\tthis.history = new History();\n\t\tthis.selection = new ModelDocumentSelection(this);\n\t\tthis.roots = new Collection({ idProperty: \"rootName\" });\n\t\tthis.differ = new Differ(model.markers);\n\t\tthis.isReadOnly = false;\n\t\tthis._postFixers = /* @__PURE__ */ new Set();\n\t\tthis._hasSelectionChangedFromTheLastChangeBlock = false;\n\t\tthis.createRoot(\"$root\", graveyardName);\n\t\tthis.listenTo(model, \"applyOperation\", (evt, args) => {\n\t\t\tconst operation = args[0];\n\t\t\tif (operation.isDocumentOperation) this.differ.bufferOperation(operation);\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(model, \"applyOperation\", (evt, args) => {\n\t\t\tconst operation = args[0];\n\t\t\tif (operation.isDocumentOperation) this.history.addOperation(operation);\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(this.selection, \"change\", () => {\n\t\t\tthis._hasSelectionChangedFromTheLastChangeBlock = true;\n\t\t});\n\t\tthis.listenTo(model.markers, \"update\", (evt, marker, oldRange, newRange, oldMarkerData) => {\n\t\t\tconst newMarkerData = {\n\t\t\t\t...marker.getData(),\n\t\t\t\trange: newRange\n\t\t\t};\n\t\t\tthis.differ.bufferMarkerChange(marker.name, oldMarkerData, newMarkerData);\n\t\t\tif (oldRange === null) marker.on(\"change\", (evt, oldRange) => {\n\t\t\t\tconst markerData = marker.getData();\n\t\t\t\tthis.differ.bufferMarkerChange(marker.name, {\n\t\t\t\t\t...markerData,\n\t\t\t\t\trange: oldRange\n\t\t\t\t}, markerData);\n\t\t\t});\n\t\t});\n\t\tthis.registerPostFixer((writer) => {\n\t\t\tlet result = false;\n\t\t\tfor (const root of this.roots) if (!root.isAttached() && !root.isEmpty) {\n\t\t\t\twriter.remove(writer.createRangeIn(root));\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\tfor (const marker of this.model.markers) if (!marker.getRange().root.isAttached()) {\n\t\t\t\twriter.removeMarker(marker);\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\t}\n\t/**\n\t* The document version. Every applied operation increases the version number. It is used to\n\t* ensure that operations are applied on a proper document version.\n\t*\n\t* This property is equal to {@link module:engine/model/history~History#version `model.Document#history#version`}.\n\t*\n\t* If the {@link module:engine/model/operation/operation~Operation#baseVersion base version} does not match the document version,\n\t* a {@link module:utils/ckeditorerror~CKEditorError model-document-applyoperation-wrong-version} error is thrown.\n\t*/\n\tget version() {\n\t\treturn this.history.version;\n\t}\n\tset version(version) {\n\t\tthis.history.version = version;\n\t}\n\t/**\n\t* The graveyard tree root. A document always has a graveyard root that stores removed nodes.\n\t*/\n\tget graveyard() {\n\t\treturn this.getRoot(graveyardName);\n\t}\n\t/**\n\t* Creates a new root.\n\t*\n\t* **Note:** do not use this method after the editor has been initialized! If you want to dynamically add a root, use\n\t* {@link module:engine/model/writer~ModelWriter#addRoot `model.Writer#addRoot`} instead.\n\t*\n\t* **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root\n\t* {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element\n\t* name explicitly so the created root matches the schema the features expect.\n\t* See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t* {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*\n\t* @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined\n\t* (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.\n\t* @param rootName A unique root name.\n\t* @returns The created root.\n\t*/\n\tcreateRoot(elementName = \"$root\", rootName = \"main\") {\n\t\tif (this.roots.get(rootName))\n /**\n\t\t* A root with the specified name already exists.\n\t\t*\n\t\t* @error model-document-createroot-name-exists\n\t\t*/\n\t\tthrow new CKEditorError(\"model-document-createroot-name-exists\", this, { name: rootName });\n\t\tconst root = new ModelRootElement(this, elementName, rootName);\n\t\tthis.roots.add(root);\n\t\treturn root;\n\t}\n\t/**\n\t* Removes all event listeners set by the document instance.\n\t*/\n\tdestroy() {\n\t\tthis.selection.destroy();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Returns a root by its name.\n\t*\n\t* Detached roots are returned by this method. This is to be able to operate on the detached root (for example, to be able to create\n\t* a position inside such a root for undo feature purposes).\n\t*\n\t* @param name The root name of the root to return.\n\t* @returns The root registered under a given name or `null` when there is no root with the given name.\n\t*/\n\tgetRoot(name = \"main\") {\n\t\treturn this.roots.get(name);\n\t}\n\t/**\n\t* Returns an array with names of all roots added to the document (except the {@link #graveyard graveyard root}).\n\t*\n\t* Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate\n\t* on the document data know which roots are still a part of the document and should be processed.\n\t*\n\t* @param includeDetached Specified whether detached roots should be returned as well.\n\t*/\n\tgetRootNames(includeDetached = false) {\n\t\treturn this.getRoots(includeDetached).map((root) => root.rootName);\n\t}\n\t/**\n\t* Returns an array with all roots added to the document (except the {@link #graveyard graveyard root}).\n\t*\n\t* Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate\n\t* on the document data know which roots are still a part of the document and should be processed.\n\t*\n\t* @param includeDetached Specified whether detached roots should be returned as well.\n\t*/\n\tgetRoots(includeDetached = false) {\n\t\treturn this.roots.filter((root) => root != this.graveyard && (includeDetached || root.isAttached()) && root._isLoaded);\n\t}\n\t/**\n\t* Used to register a post-fixer callback. A post-fixer mechanism guarantees that the features\n\t* will operate on a correct model state.\n\t*\n\t* An execution of a feature may lead to an incorrect document tree state. The callbacks are used to fix the document tree after\n\t* it has changed. Post-fixers are fired just after all changes from the outermost change block were applied but\n\t* before the {@link module:engine/model/document~ModelDocument#event:change change event} is fired. If a post-fixer callback made\n\t* a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should\n\t* not be fixed in the new document tree state.\n\t*\n\t* As a parameter, a post-fixer callback receives a {@link module:engine/model/writer~ModelWriter writer} instance connected with the\n\t* executed changes block. Thanks to that, all changes done by the callback will be added to the same\n\t* {@link module:engine/model/batch~Batch batch} (and undo step) as the original changes. This makes post-fixer changes transparent\n\t* for the user.\n\t*\n\t* An example of a post-fixer is a callback that checks if all the data were removed from the editor. If so, the\n\t* callback should add an empty paragraph so that the editor is never empty:\n\t*\n\t* ```ts\n\t* document.registerPostFixer( writer => {\n\t* \tconst changes = document.differ.getChanges();\n\t*\n\t* \t// Check if the changes lead to an empty root in the editor.\n\t* \tfor ( const entry of changes ) {\n\t* \t\tif ( entry.type == 'remove' && entry.position.root.isEmpty ) {\n\t* \t\t\twriter.insertElement( 'paragraph', entry.position.root, 0 );\n\t*\n\t* \t\t\t// It is fine to return early, even if multiple roots would need to be fixed.\n\t* \t\t\t// All post-fixers will be fired again, so if there are more empty roots, those will be fixed, too.\n\t* \t\t\treturn true;\n\t* \t\t}\n\t* \t}\n\t*\n\t* \treturn false;\n\t* } );\n\t* ```\n\t*/\n\tregisterPostFixer(postFixer) {\n\t\tthis._postFixers.add(postFixer);\n\t}\n\t/**\n\t* A custom `toJSON()` method to solve child-parent circular dependencies.\n\t*\n\t* @returns A clone of this object with the document property changed to a string.\n\t*/\n\ttoJSON() {\n\t\tconst json = clone(this);\n\t\tjson.selection = \"[engine.model.DocumentSelection]\";\n\t\tjson.model = \"[engine.model.Model]\";\n\t\treturn json;\n\t}\n\t/**\n\t* Check if there were any changes done on document, and if so, call post-fixers,\n\t* fire `change` event for features and conversion and then reset the differ.\n\t* Fire `change:data` event when at least one operation or buffered marker changes the data.\n\t*\n\t* @internal\n\t* @fires change\n\t* @fires change:data\n\t* @param writer The writer on which post-fixers will be called.\n\t*/\n\t_handleChangeBlock(writer) {\n\t\tif (this._hasDocumentChangedFromTheLastChangeBlock()) {\n\t\t\tthis._callPostFixers(writer);\n\t\t\tthis.selection.refresh();\n\t\t\tif (this.differ.hasDataChanges()) this.fire(\"change:data\", writer.batch);\n\t\t\telse this.fire(\"change\", writer.batch);\n\t\t\tthis.selection.refresh();\n\t\t\tthis.differ.reset();\n\t\t}\n\t\tthis._hasSelectionChangedFromTheLastChangeBlock = false;\n\t}\n\t/**\n\t* Returns whether there is a buffered change or if the selection has changed from the last\n\t* {@link module:engine/model/model~Model#enqueueChange `enqueueChange()` block}\n\t* or {@link module:engine/model/model~Model#change `change()` block}.\n\t*\n\t* @returns Returns `true` if document has changed from the last `change()` or `enqueueChange()` block.\n\t*/\n\t_hasDocumentChangedFromTheLastChangeBlock() {\n\t\treturn !this.differ.isEmpty || this._hasSelectionChangedFromTheLastChangeBlock;\n\t}\n\t/**\n\t* Returns the default root for this document which is either the first root that was added to the document using\n\t* {@link #createRoot} or the {@link #graveyard graveyard root} if no other roots were created.\n\t*\n\t* @returns The default root for this document.\n\t*/\n\t_getDefaultRoot() {\n\t\tconst roots = this.getRoots();\n\t\treturn roots.length ? roots[0] : this.graveyard;\n\t}\n\t/**\n\t* Returns the default range for this selection. The default range is a collapsed range that starts and ends\n\t* at the beginning of this selection's document {@link #_getDefaultRoot default root}.\n\t*\n\t* @internal\n\t*/\n\t_getDefaultRange() {\n\t\tconst defaultRoot = this._getDefaultRoot();\n\t\tconst model = this.model;\n\t\tconst schema = model.schema;\n\t\tconst position = model.createPositionFromPath(defaultRoot, [0]);\n\t\treturn schema.getNearestSelectionRange(position) || model.createRange(position);\n\t}\n\t/**\n\t* Checks whether a given {@link module:engine/model/range~ModelRange range} is a valid range for\n\t* the {@link #selection document's selection}.\n\t*\n\t* @internal\n\t* @param range A range to check.\n\t* @returns `true` if `range` is valid, `false` otherwise.\n\t*/\n\t_validateSelectionRange(range) {\n\t\treturn range.start.isValid() && range.end.isValid() && validateTextNodePosition(range.start) && validateTextNodePosition(range.end);\n\t}\n\t/**\n\t* Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.\n\t*\n\t* @param writer The writer on which post-fixer callbacks will be called.\n\t*/\n\t_callPostFixers(writer) {\n\t\tlet wasFixed = false;\n\t\tdo\n\t\t\tfor (const callback of this._postFixers) {\n\t\t\t\tthis.selection.refresh();\n\t\t\t\twasFixed = callback(writer);\n\t\t\t\tif (wasFixed) break;\n\t\t\t}\n\t\twhile (wasFixed);\n\t}\n};\n/**\n* Checks whether given range boundary position is valid for document selection, meaning that is not between\n* unicode surrogate pairs or base character and combining marks.\n*/\nfunction validateTextNodePosition(rangeBoundary) {\n\tconst textNode = rangeBoundary.textNode;\n\tif (textNode) {\n\t\tconst data = textNode.data;\n\t\tconst offset = rangeBoundary.offset - textNode.startOffset;\n\t\treturn !isInsideSurrogatePair(data, offset) && !isInsideCombinedSymbol(data, offset);\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 engine/model/markercollection\n*/\nconst MarkerCollectionBase = /* #__PURE__ */ EmitterMixin();\nconst MarkerBase = /* #__PURE__ */ EmitterMixin(ModelTypeCheckable);\n/**\n* The collection of all {@link module:engine/model/markercollection~Marker markers} attached to the document.\n* It lets you {@link module:engine/model/markercollection~MarkerCollection#get get} markers or track them using\n* {@link module:engine/model/markercollection~MarkerCollection#event:update} event.\n*\n* To create, change or remove makers use {@link module:engine/model/writer~ModelWriter model writers'} methods:\n* {@link module:engine/model/writer~ModelWriter#addMarker} or {@link module:engine/model/writer~ModelWriter#removeMarker}. Since\n* the writer is the only proper way to change the data model it is not possible to change markers directly using this\n* collection. All markers created by the writer will be automatically added to this collection.\n*\n* By default there is one marker collection available as {@link module:engine/model/model~Model#markers model property}.\n*\n* @see module:engine/model/markercollection~Marker\n*/\nvar MarkerCollection = class extends MarkerCollectionBase {\n\t/**\n\t* Stores {@link ~Marker markers} added to the collection.\n\t*/\n\t_markers = /* @__PURE__ */ new Map();\n\t/**\n\t* Iterable interface.\n\t*\n\t* Iterates over all {@link ~Marker markers} added to the collection.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this._markers.values();\n\t}\n\t/**\n\t* Checks if given {@link ~Marker marker} or marker name is in the collection.\n\t*\n\t* @param markerOrName Name of marker or marker instance to check.\n\t* @returns `true` if marker is in the collection, `false` otherwise.\n\t*/\n\thas(markerOrName) {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\t\treturn this._markers.has(markerName);\n\t}\n\t/**\n\t* Returns {@link ~Marker marker} with given `markerName`.\n\t*\n\t* @param markerName Name of marker to get.\n\t* @returns Marker with given name or `null` if such marker was\n\t* not added to the collection.\n\t*/\n\tget(markerName) {\n\t\treturn this._markers.get(markerName) || null;\n\t}\n\t/**\n\t* Creates and adds a {@link ~Marker marker} to the `MarkerCollection` with given name on given\n\t* {@link module:engine/model/range~ModelRange range}.\n\t*\n\t* If `MarkerCollection` already had a marker with given name (or {@link ~Marker marker} was passed), the marker in\n\t* collection is updated and {@link module:engine/model/markercollection~MarkerCollection#event:update} event is fired\n\t* but only if there was a change (marker range or {@link module:engine/model/markercollection~Marker#managedUsingOperations}\n\t* flag has changed.\n\t*\n\t* @internal\n\t* @fires update\n\t* @param markerOrName Name of marker to set or marker instance to update.\n\t* @param range Marker range.\n\t* @param managedUsingOperations Specifies whether the marker is managed using operations.\n\t* @param affectsData Specifies whether the marker affects the data produced by the data pipeline\n\t* (is persisted in the editor's data).\n\t* @returns `Marker` instance which was added or updated.\n\t*/\n\t_set(markerOrName, range, managedUsingOperations = false, affectsData = false) {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\t\tif (markerName.includes(\",\"))\n /**\n\t\t* Marker name cannot contain the \",\" character.\n\t\t*\n\t\t* @error markercollection-incorrect-marker-name\n\t\t*/\n\t\tthrow new CKEditorError(\"markercollection-incorrect-marker-name\", this);\n\t\tconst oldMarker = this._markers.get(markerName);\n\t\tif (oldMarker) {\n\t\t\tconst oldMarkerData = oldMarker.getData();\n\t\t\tconst oldRange = oldMarker.getRange();\n\t\t\tlet hasChanged = false;\n\t\t\tif (!oldRange.isEqual(range)) {\n\t\t\t\toldMarker._attachLiveRange(ModelLiveRange.fromRange(range));\n\t\t\t\thasChanged = true;\n\t\t\t}\n\t\t\tif (managedUsingOperations != oldMarker.managedUsingOperations) {\n\t\t\t\toldMarker._managedUsingOperations = managedUsingOperations;\n\t\t\t\thasChanged = true;\n\t\t\t}\n\t\t\tif (typeof affectsData === \"boolean\" && affectsData != oldMarker.affectsData) {\n\t\t\t\toldMarker._affectsData = affectsData;\n\t\t\t\thasChanged = true;\n\t\t\t}\n\t\t\tif (hasChanged) this.fire(`update:${markerName}`, oldMarker, oldRange, range, oldMarkerData);\n\t\t\treturn oldMarker;\n\t\t}\n\t\tconst liveRange = ModelLiveRange.fromRange(range);\n\t\tconst marker = new Marker(markerName, liveRange, managedUsingOperations, affectsData);\n\t\tthis._markers.set(markerName, marker);\n\t\tthis.fire(`update:${markerName}`, marker, null, range, {\n\t\t\t...marker.getData(),\n\t\t\trange: null\n\t\t});\n\t\treturn marker;\n\t}\n\t/**\n\t* Removes given {@link ~Marker marker} or a marker with given name from the `MarkerCollection`.\n\t*\n\t* @internal\n\t* @fires update\n\t* @param markerOrName Marker or name of a marker to remove.\n\t* @returns `true` if marker was found and removed, `false` otherwise.\n\t*/\n\t_remove(markerOrName) {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\t\tconst oldMarker = this._markers.get(markerName);\n\t\tif (oldMarker) {\n\t\t\tthis._markers.delete(markerName);\n\t\t\tthis.fire(`update:${markerName}`, oldMarker, oldMarker.getRange(), null, oldMarker.getData());\n\t\t\tthis._destroyMarker(oldMarker);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Fires an {@link module:engine/model/markercollection~MarkerCollection#event:update} event for the given {@link ~Marker marker}\n\t* but does not change the marker. Useful to force {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher downcast\n\t* conversion} for the marker.\n\t*\n\t* @internal\n\t* @fires update\n\t* @param markerOrName Marker or name of a marker to refresh.\n\t*/\n\t_refresh(markerOrName) {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\t\tconst marker = this._markers.get(markerName);\n\t\tif (!marker)\n /**\n\t\t* Marker with provided name does not exists.\n\t\t*\n\t\t* @error markercollection-refresh-marker-not-exists\n\t\t*/\n\t\tthrow new CKEditorError(\"markercollection-refresh-marker-not-exists\", this);\n\t\tconst range = marker.getRange();\n\t\tthis.fire(`update:${markerName}`, marker, range, range, marker.getData());\n\t}\n\t/**\n\t* Returns iterator that iterates over all markers, which ranges\n\t* contain given {@link module:engine/model/position~ModelPosition position}.\n\t*/\n\t*getMarkersAtPosition(position) {\n\t\tfor (const marker of this) if (marker.getRange().containsPosition(position)) yield marker;\n\t}\n\t/**\n\t* Returns iterator that iterates over all markers, which intersects with given {@link module:engine/model/range~ModelRange range}.\n\t*/\n\t*getMarkersIntersectingRange(range) {\n\t\tfor (const marker of this) if (marker.getRange().getIntersection(range) !== null) yield marker;\n\t}\n\t/**\n\t* Destroys marker collection and all markers inside it.\n\t*/\n\tdestroy() {\n\t\tfor (const marker of this._markers.values()) this._destroyMarker(marker);\n\t\tthis._markers.clear();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Iterates over all markers that starts with given `prefix`.\n\t*\n\t* ```ts\n\t* const markerFooA = markersCollection._set( 'foo:a', rangeFooA );\n\t* const markerFooB = markersCollection._set( 'foo:b', rangeFooB );\n\t* const markerBarA = markersCollection._set( 'bar:a', rangeBarA );\n\t* const markerFooBarA = markersCollection._set( 'foobar:a', rangeFooBarA );\n\t* Array.from( markersCollection.getMarkersGroup( 'foo' ) ); // [ markerFooA, markerFooB ]\n\t* Array.from( markersCollection.getMarkersGroup( 'a' ) ); // []\n\t* ```\n\t*/\n\t*getMarkersGroup(prefix) {\n\t\tfor (const marker of this._markers.values()) if (marker.name.startsWith(prefix + \":\")) yield marker;\n\t}\n\t/**\n\t* Destroys the marker.\n\t*/\n\t_destroyMarker(marker) {\n\t\tmarker.stopListening();\n\t\tmarker._detachLiveRange();\n\t}\n};\n/**\n* `Marker` is a continuous part of the model (like a range), is named and represents some kind of information about the\n* marked part of the model document. In contrary to {@link module:engine/model/node~ModelNode nodes}, which are building blocks of\n* the model document tree, markers are not stored directly in the document tree but in the\n* {@link module:engine/model/model~Model#markers model markers' collection}. Still, they are document data, by giving\n* additional meaning to the part of a model document between marker start and marker end.\n*\n* In this sense, markers are similar to adding and converting attributes on nodes. The difference is that attribute is\n* connected with a given node (e.g. a character is bold no matter if it gets moved or content around it changes).\n* Markers on the other hand are continuous ranges and are characterized by their start and end position. This means that\n* any character in the marker is marked by the marker. For example, if a character is moved outside of marker it stops being\n* \"special\" and the marker is shrunk. Similarly, when a character is moved into the marker from other place in document\n* model, it starts being \"special\" and the marker is enlarged.\n*\n* Another upside of markers is that finding marked part of document is fast and easy. Using attributes to mark some nodes\n* and then trying to find that part of document would require traversing whole document tree. Marker gives instant access\n* to the range which it is marking at the moment.\n*\n* Markers are built from a name and a range.\n*\n* Range of the marker is updated automatically when document changes, using\n* {@link module:engine/model/liverange~ModelLiveRange live range} mechanism.\n*\n* Name is used to group and identify markers. Names have to be unique, but markers can be grouped by\n* using common prefixes, separated with `:`, for example: `user:john` or `search:3`. That's useful in term of creating\n* namespaces for custom elements (e.g. comments, highlights). You can use this prefixes in\n* {@link module:engine/model/markercollection~MarkerCollection#event:update} listeners to listen on changes in a group of markers.\n* For instance: `model.markers.on( 'update:user', callback );` will be called whenever any `user:*` markers changes.\n*\n* There are two types of markers.\n*\n* 1. Markers managed directly, without using operations. They are added directly by {@link module:engine/model/writer~ModelWriter}\n* to the {@link module:engine/model/markercollection~MarkerCollection} without any additional mechanism. They can be used\n* as bookmarks or visual markers. They are great for showing results of the find, or select link when the focus is in the input.\n*\n* 1. Markers managed using operations. These markers are also stored in {@link module:engine/model/markercollection~MarkerCollection}\n* but changes in these markers is managed the same way all other changes in the model structure - using operations.\n* Therefore, they are handled in the undo stack and synchronized between clients if the collaboration plugin is enabled.\n* This type of markers is useful for solutions like spell checking or comments.\n*\n* Both type of them should be added / updated by {@link module:engine/model/writer~ModelWriter#addMarker}\n* and removed by {@link module:engine/model/writer~ModelWriter#removeMarker} methods.\n*\n* ```ts\n* model.change( ( writer ) => {\n* \tconst marker = writer.addMarker( name, { range, usingOperation: true } );\n*\n* \t// ...\n*\n* \twriter.removeMarker( marker );\n* } );\n* ```\n*\n* See {@link module:engine/model/writer~ModelWriter} to find more examples.\n*\n* Since markers need to track change in the document, for efficiency reasons, it is best to create and keep as little\n* markers as possible and remove them as soon as they are not needed anymore.\n*\n* Markers can be downcasted and upcasted.\n*\n* Markers downcast happens on {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker} and\n* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:removeMarker} events.\n* Use {@link module:engine/conversion/downcasthelpers downcast converters} or attach a custom converter to mentioned events.\n* For {@link module:engine/controller/datacontroller~DataController data pipeline}, marker should be downcasted to an element.\n* Then, it can be upcasted back to a marker. Again, use {@link module:engine/conversion/upcasthelpers upcast converters} or\n* attach a custom converter to {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element}.\n*\n* `Marker` instances are created and destroyed only by {@link ~MarkerCollection MarkerCollection}.\n*/\nvar Marker = class extends MarkerBase {\n\t/**\n\t* Marker's name.\n\t*/\n\tname;\n\t/**\n\t* Flag indicates if the marker is managed using operations or not.\n\t*\n\t* @internal\n\t*/\n\t_managedUsingOperations;\n\t/**\n\t* Specifies whether the marker affects the data produced by the data pipeline\n\t* (is persisted in the editor's data).\n\t*\n\t* @internal\n\t*/\n\t_affectsData;\n\t/**\n\t* Range marked by the marker.\n\t*/\n\t_liveRange;\n\t/**\n\t* Creates a marker instance.\n\t*\n\t* @param name Marker name.\n\t* @param liveRange Range marked by the marker.\n\t* @param managedUsingOperations Specifies whether the marker is managed using operations.\n\t* @param affectsData Specifies whether the marker affects the data produced by the data pipeline (is persisted in the editor's data).\n\t*/\n\tconstructor(name, liveRange, managedUsingOperations, affectsData) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis._liveRange = this._attachLiveRange(liveRange);\n\t\tthis._managedUsingOperations = managedUsingOperations;\n\t\tthis._affectsData = affectsData;\n\t}\n\t/**\n\t* A value indicating if the marker is managed using operations.\n\t* See {@link ~Marker marker class description} to learn more about marker types.\n\t* See {@link module:engine/model/writer~ModelWriter#addMarker}.\n\t*/\n\tget managedUsingOperations() {\n\t\tif (!this._liveRange) throw new CKEditorError(\"marker-destroyed\", this);\n\t\treturn this._managedUsingOperations;\n\t}\n\t/**\n\t* A value indicating if the marker changes the data.\n\t*/\n\tget affectsData() {\n\t\tif (!this._liveRange) throw new CKEditorError(\"marker-destroyed\", this);\n\t\treturn this._affectsData;\n\t}\n\t/**\n\t* Returns the marker data (properties defining the marker).\n\t*/\n\tgetData() {\n\t\treturn {\n\t\t\trange: this.getRange(),\n\t\t\taffectsData: this.affectsData,\n\t\t\tmanagedUsingOperations: this.managedUsingOperations\n\t\t};\n\t}\n\t/**\n\t* Returns current marker start position.\n\t*/\n\tgetStart() {\n\t\tif (!this._liveRange) throw new CKEditorError(\"marker-destroyed\", this);\n\t\treturn this._liveRange.start.clone();\n\t}\n\t/**\n\t* Returns current marker end position.\n\t*/\n\tgetEnd() {\n\t\tif (!this._liveRange) throw new CKEditorError(\"marker-destroyed\", this);\n\t\treturn this._liveRange.end.clone();\n\t}\n\t/**\n\t* Returns a range that represents the current state of the marker.\n\t*\n\t* Keep in mind that returned value is a {@link module:engine/model/range~ModelRange Range}, not a\n\t* {@link module:engine/model/liverange~ModelLiveRange ModelLiveRange}. This means that it is up-to-date and relevant only\n\t* until next model document change. Do not store values returned by this method. Instead, store {@link ~Marker#name}\n\t* and get `Marker` instance from {@link module:engine/model/markercollection~MarkerCollection MarkerCollection} every\n\t* time there is a need to read marker properties. This will guarantee that the marker has not been removed and\n\t* that it's data is up-to-date.\n\t*/\n\tgetRange() {\n\t\tif (!this._liveRange) throw new CKEditorError(\"marker-destroyed\", this);\n\t\treturn this._liveRange.toRange();\n\t}\n\t/**\n\t* Converts `Marker` to plain object and returns it.\n\t*\n\t* @returns `Marker` converted to plain object.\n\t*/\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\trange: this._liveRange?.toJSON(),\n\t\t\tusingOperations: this._managedUsingOperations,\n\t\t\taffectsData: this._affectsData\n\t\t};\n\t}\n\t/**\n\t* Binds new live range to the marker and detach the old one if is attached.\n\t*\n\t* @internal\n\t* @param liveRange Live range to attach\n\t* @returns Attached live range.\n\t*/\n\t_attachLiveRange(liveRange) {\n\t\tif (this._liveRange) this._detachLiveRange();\n\t\tliveRange.delegate(\"change:range\").to(this);\n\t\tliveRange.delegate(\"change:content\").to(this);\n\t\tthis._liveRange = liveRange;\n\t\treturn liveRange;\n\t}\n\t/**\n\t* Unbinds and destroys currently attached live range.\n\t*\n\t* @internal\n\t*/\n\t_detachLiveRange() {\n\t\tthis._liveRange.stopDelegating(\"change:range\", this);\n\t\tthis._liveRange.stopDelegating(\"change:content\", this);\n\t\tthis._liveRange.detach();\n\t\tthis._liveRange = null;\n\t}\n};\nMarker.prototype.is = function(type) {\n\treturn type === \"marker\" || type === \"model:marker\";\n};\n/**\n* Cannot use a {@link module:engine/model/markercollection~MarkerCollection#destroy destroyed marker} instance.\n*\n* @error marker-destroyed\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 engine/model/operation/detachoperation\n*/\n/**\n* Operation to permanently remove node from detached root.\n* Note this operation is only a local operation and won't be send to the other clients.\n*\n* @internal\n*/\nvar DetachOperation = class extends Operation {\n\t/**\n\t* Position before the first {@link module:engine/model/item~ModelItem model item} to detach.\n\t*/\n\tsourcePosition;\n\t/**\n\t* Offset size of moved range.\n\t*/\n\thowMany;\n\t/**\n\t* Creates an insert operation.\n\t*\n\t* @param sourcePosition Position before the first {@link module:engine/model/item~ModelItem model item} to move.\n\t* @param howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t* `sourcePosition` with offset shifted by `howMany`.\n\t*/\n\tconstructor(sourcePosition, howMany) {\n\t\tsuper(null);\n\t\tthis.sourcePosition = sourcePosition.clone();\n\t\tthis.howMany = howMany;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget type() {\n\t\treturn \"detach\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget affectedSelectable() {\n\t\treturn null;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\t\tjson.sourcePosition = this.sourcePosition.toJSON();\n\t\treturn json;\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_validate() {\n\t\tif (this.sourcePosition.root.document)\n /**\n\t\t* Cannot detach document node.\n\t\t*\n\t\t* @error detach-operation-on-document-node\n\t\t*/\n\t\tthrow new CKEditorError(\"detach-operation-on-document-node\", this);\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\t_execute() {\n\t\t_remove(ModelRange._createFromPositionAndShift(this.sourcePosition, this.howMany));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get className() {\n\t\treturn \"DetachOperation\";\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 engine/model/documentfragment\n*/\n/**\n* ModelDocumentFragment represents a part of model which does not have a common root but its top-level nodes\n* can be seen as siblings. In other words, it is a detached part of model tree, without a root.\n*\n* ModelDocumentFragment has own {@link module:engine/model/markercollection~MarkerCollection}. Markers from this collection\n* will be set to the {@link module:engine/model/model~Model#markers model markers} by a\n* {@link module:engine/model/writer~ModelWriter#insert} function.\n*/\nvar ModelDocumentFragment = class ModelDocumentFragment extends ModelTypeCheckable {\n\t/**\n\t* ModelDocumentFragment static markers map. This is a list of names and {@link module:engine/model/range~ModelRange ranges}\n\t* which will be set as Markers to {@link module:engine/model/model~Model#markers model markers collection}\n\t* when ModelDocumentFragment will be inserted to the document.\n\t*/\n\tmarkers = /* @__PURE__ */ new Map();\n\t/**\n\t* List of nodes contained inside the document fragment.\n\t*/\n\t_children = new ModelNodeList();\n\t/**\n\t* Creates an empty `ModelDocumentFragment`.\n\t*\n\t* **Note:** Constructor of this class shouldn't be used directly in the code.\n\t* Use the {@link module:engine/model/writer~ModelWriter#createDocumentFragment} method instead.\n\t*\n\t* @internal\n\t* @param children Nodes to be contained inside the `ModelDocumentFragment`.\n\t*/\n\tconstructor(children) {\n\t\tsuper();\n\t\tif (children) this._insertChild(0, children);\n\t}\n\t/**\n\t* Returns an iterator that iterates over all nodes contained inside this document fragment.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this.getChildren();\n\t}\n\t/**\n\t* Number of this document fragment's children.\n\t*/\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\t/**\n\t* Sum of {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all of this document fragment's children.\n\t*/\n\tget maxOffset() {\n\t\treturn this._children.maxOffset;\n\t}\n\t/**\n\t* Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t*/\n\tget isEmpty() {\n\t\treturn this.childCount === 0;\n\t}\n\t/**\n\t* Artificial next sibling. Returns `null`. Added for compatibility reasons.\n\t*/\n\tget nextSibling() {\n\t\treturn null;\n\t}\n\t/**\n\t* Artificial previous sibling. Returns `null`. Added for compatibility reasons.\n\t*/\n\tget previousSibling() {\n\t\treturn null;\n\t}\n\t/**\n\t* Artificial root of `ModelDocumentFragment`. Returns itself. Added for compatibility reasons.\n\t*/\n\tget root() {\n\t\treturn this;\n\t}\n\t/**\n\t* Artificial parent of `ModelDocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t*/\n\tget parent() {\n\t\treturn null;\n\t}\n\t/**\n\t* Artificial owner of `ModelDocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t*/\n\tget document() {\n\t\treturn null;\n\t}\n\t/**\n\t* Returns `false` as `ModelDocumentFragment` by definition is not attached to a document. Added for compatibility reasons.\n\t*/\n\tisAttached() {\n\t\treturn false;\n\t}\n\t/**\n\t* Returns empty array. Added for compatibility reasons.\n\t*/\n\tgetAncestors() {\n\t\treturn [];\n\t}\n\t/**\n\t* Gets the child at the given index. Returns `null` if incorrect index was passed.\n\t*\n\t* @param index Index in this document fragment.\n\t* @returns Child node.\n\t*/\n\tgetChild(index) {\n\t\treturn this._children.getNode(index);\n\t}\n\t/**\n\t* Gets the child at the given offset. Returns `null` if incorrect index was passed.\n\t*\n\t* @param offset Offset in this document fragment.\n\t* @returns Child node.\n\t*/\n\tgetChildAtOffset(offset) {\n\t\treturn this._children.getNodeAtOffset(offset);\n\t}\n\t/**\n\t* Returns an iterator that iterates over all of this document fragment's children.\n\t*/\n\tgetChildren() {\n\t\treturn this._children[Symbol.iterator]();\n\t}\n\t/**\n\t* Returns an index of the given child node. Returns `null` if given node is not a child of this document fragment.\n\t*\n\t* @param node Child node to look for.\n\t* @returns Child node's index.\n\t*/\n\tgetChildIndex(node) {\n\t\treturn this._children.getNodeIndex(node);\n\t}\n\t/**\n\t* Returns the starting offset of given child. Starting offset is equal to the sum of\n\t* {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t* given node is not a child of this document fragment.\n\t*\n\t* @param node Child node to look for.\n\t* @returns Child node's starting offset.\n\t*/\n\tgetChildStartOffset(node) {\n\t\treturn this._children.getNodeStartOffset(node);\n\t}\n\t/**\n\t* Returns path to a `ModelDocumentFragment`, which is an empty array. Added for compatibility reasons.\n\t*/\n\tgetPath() {\n\t\treturn [];\n\t}\n\t/**\n\t* Returns a descendant node by its path relative to this element.\n\t*\n\t* ```ts\n\t* // <this>a<b>c</b></this>\n\t* this.getNodeByPath( [ 0 ] );     // -> \"a\"\n\t* this.getNodeByPath( [ 1 ] );     // -> <b>\n\t* this.getNodeByPath( [ 1, 0 ] );  // -> \"c\"\n\t* ```\n\t*\n\t* @param relativePath Path of the node to find, relative to this element.\n\t*/\n\tgetNodeByPath(relativePath) {\n\t\tlet node = this;\n\t\tfor (const offset of relativePath) node = node.getChildAtOffset(offset);\n\t\treturn node;\n\t}\n\t/**\n\t* Converts offset \"position\" to index \"position\".\n\t*\n\t* Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t* too high, returns index after last child.\n\t*\n\t* ```ts\n\t* const textNode = new Text( 'foo' );\n\t* const pElement = new Element( 'p' );\n\t* const docFrag = new ModelDocumentFragment( [ textNode, pElement ] );\n\t* docFrag.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t* docFrag.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t* docFrag.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t* docFrag.offsetToIndex( 2 ); // Returns 0.\n\t* docFrag.offsetToIndex( 3 ); // Returns 1.\n\t* docFrag.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t* ```\n\t*\n\t* @param offset Offset to look for.\n\t* @returns Index of a node that occupies given offset.\n\t*/\n\toffsetToIndex(offset) {\n\t\treturn this._children.offsetToIndex(offset);\n\t}\n\t/**\n\t* Converts `ModelDocumentFragment` instance to plain object and returns it.\n\t* Takes care of converting all of this document fragment's children.\n\t*\n\t* @returns `ModelDocumentFragment` instance converted to plain object.\n\t*/\n\ttoJSON() {\n\t\tconst json = [];\n\t\tfor (const node of this._children) json.push(node.toJSON());\n\t\treturn json;\n\t}\n\t/**\n\t* Creates a `ModelDocumentFragment` instance from given plain object (i.e. parsed JSON string).\n\t* Converts `ModelDocumentFragment` children to proper nodes.\n\t*\n\t* @param json Plain object to be converted to `ModelDocumentFragment`.\n\t* @returns `ModelDocumentFragment` instance created using given plain object.\n\t*/\n\tstatic fromJSON(json) {\n\t\tconst children = [];\n\t\tfor (const child of json) if (child.name) children.push(ModelElement.fromJSON(child));\n\t\telse children.push(ModelText.fromJSON(child));\n\t\treturn new ModelDocumentFragment(children);\n\t}\n\t/**\n\t* {@link #_insertChild Inserts} one or more nodes at the end of this document fragment.\n\t*\n\t* @internal\n\t* @param items Items to be inserted.\n\t*/\n\t_appendChild(items) {\n\t\tthis._insertChild(this.childCount, items);\n\t}\n\t/**\n\t* Inserts one or more nodes at the given index and sets {@link module:engine/model/node~ModelNode#parent parent} of these nodes\n\t* to this document fragment.\n\t*\n\t* @internal\n\t* @param index Index at which nodes should be inserted.\n\t* @param items Items to be inserted.\n\t*/\n\t_insertChild(index, items) {\n\t\tconst nodes = normalize(items);\n\t\tfor (const node of nodes) {\n\t\t\tif (node.parent !== null) node._remove();\n\t\t\tnode.parent = this;\n\t\t}\n\t\tthis._children._insertNodes(index, nodes);\n\t}\n\t/**\n\t* Removes one or more nodes starting at the given index\n\t* and sets {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t*\n\t* @internal\n\t* @param index Index of the first node to remove.\n\t* @param howMany Number of nodes to remove.\n\t* @returns Array containing removed nodes.\n\t*/\n\t_removeChildren(index, howMany = 1) {\n\t\tconst nodes = this._children._removeNodes(index, howMany);\n\t\tfor (const node of nodes) node.parent = null;\n\t\treturn nodes;\n\t}\n\t/**\n\t* Removes children nodes provided as an array and sets\n\t* the {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t*\n\t* These nodes do not need to be direct siblings.\n\t*\n\t* This method is faster than removing nodes one by one, as it recalculates offsets only once.\n\t*\n\t* @internal\n\t* @param nodes Array of nodes.\n\t*/\n\t_removeChildrenArray(nodes) {\n\t\tthis._children._removeNodesArray(nodes);\n\t\tfor (const node of nodes) node.parent = null;\n\t}\n};\nModelDocumentFragment.prototype.is = function(type) {\n\treturn type === \"documentFragment\" || type === \"model:documentFragment\";\n};\n/**\n* Converts strings to Text and non-iterables to arrays.\n*/\nfunction normalize(nodes) {\n\tif (typeof nodes == \"string\") return [new ModelText(nodes)];\n\tif (!isIterable(nodes)) nodes = [nodes];\n\treturn Array.from(nodes).map((node) => {\n\t\tif (typeof node == \"string\") return new ModelText(node);\n\t\tif (node instanceof ModelTextProxy) return new ModelText(node.data, node.getAttributes());\n\t\treturn node;\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 engine/model/writer\n*/\n/**\n* The model can only be modified by using the writer. It should be used whenever you want to create a node, modify\n* child nodes, attributes or text, set the selection's position and its attributes.\n*\n* The instance of the writer is only available in the {@link module:engine/model/model~Model#change `change()`} or\n* {@link module:engine/model/model~Model#enqueueChange `enqueueChange()`}.\n*\n* ```ts\n* model.change( writer => {\n* \twriter.insertText( 'foo', paragraph, 'end' );\n* } );\n* ```\n*\n* Note that the writer should never be stored and used outside of the `change()` and\n* `enqueueChange()` blocks.\n*\n* Note that writer's methods do not check the {@link module:engine/model/schema~ModelSchema}. It is possible\n* to create incorrect model structures by using the writer. Read more about in\n* {@glink framework/deep-dive/schema#who-checks-the-schema \"Who checks the schema?\"}.\n*\n* @see module:engine/model/model~Model#change\n* @see module:engine/model/model~Model#enqueueChange\n*/\nvar ModelWriter = class {\n\t/**\n\t* Instance of the model on which this writer operates.\n\t*/\n\tmodel;\n\t/**\n\t* The batch to which this writer will add changes.\n\t*/\n\tbatch;\n\t/**\n\t* Creates a writer instance.\n\t*\n\t* **Note:** It is not recommended to use it directly. Use {@link module:engine/model/model~Model#change `Model#change()`} or\n\t* {@link module:engine/model/model~Model#enqueueChange `Model#enqueueChange()`} instead.\n\t*\n\t* @internal\n\t*/\n\tconstructor(model, batch) {\n\t\tthis.model = model;\n\t\tthis.batch = batch;\n\t}\n\t/**\n\t* Creates a new {@link module:engine/model/text~ModelText text node}.\n\t*\n\t* ```ts\n\t* writer.createText( 'foo' );\n\t* writer.createText( 'foo', { bold: true } );\n\t* ```\n\t*\n\t* @param data Text data.\n\t* @param attributes Text attributes.\n\t* @returns {module:engine/model/text~ModelText} Created text node.\n\t*/\n\tcreateText(data, attributes) {\n\t\treturn new ModelText(data, attributes);\n\t}\n\t/**\n\t* Creates a new {@link module:engine/model/element~ModelElement element}.\n\t*\n\t* ```ts\n\t* writer.createElement( 'paragraph' );\n\t* writer.createElement( 'paragraph', { alignment: 'center' } );\n\t* ```\n\t*\n\t* @param name Name of the element.\n\t* @param attributes Elements attributes.\n\t* @returns Created element.\n\t*/\n\tcreateElement(name, attributes) {\n\t\treturn new ModelElement(name, attributes);\n\t}\n\t/**\n\t* Creates a new {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n\t*\n\t* @returns Created document fragment.\n\t*/\n\tcreateDocumentFragment() {\n\t\treturn new ModelDocumentFragment();\n\t}\n\t/**\n\t* Creates a copy of the element and returns it. Created element has the same name and attributes as the original element.\n\t* If clone is deep, the original element's children are also cloned. If not, then empty element is returned.\n\t*\n\t* @param element The element to clone.\n\t* @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t* element will be cloned without any child.\n\t*/\n\tcloneElement(element, deep = true) {\n\t\treturn element._clone(deep);\n\t}\n\t/**\n\t* Inserts item on given position.\n\t*\n\t* ```ts\n\t* const paragraph = writer.createElement( 'paragraph' );\n\t* writer.insert( paragraph, position );\n\t* ```\n\t*\n\t* Instead of using position you can use parent and offset:\n\t*\n\t* ```ts\n\t* const text = writer.createText( 'foo' );\n\t* writer.insert( text, paragraph, 5 );\n\t* ```\n\t*\n\t* You can also use `end` instead of the offset to insert at the end:\n\t*\n\t* ```ts\n\t* const text = writer.createText( 'foo' );\n\t* writer.insert( text, paragraph, 'end' );\n\t* ```\n\t*\n\t* Or insert before or after another element:\n\t*\n\t* ```ts\n\t* const paragraph = writer.createElement( 'paragraph' );\n\t* writer.insert( paragraph, anotherParagraph, 'after' );\n\t* ```\n\t*\n\t* These parameters works the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t*\n\t* Note that if the item already has parent it will be removed from the previous parent.\n\t*\n\t* Note that you cannot re-insert a node from a document to a different document or a document fragment. In this case,\n\t* `model-writer-insert-forbidden-move` is thrown.\n\t*\n\t* If you want to move {@link module:engine/model/range~ModelRange range} instead of an\n\t* {@link module:engine/model/item~ModelItem item} use {@link module:engine/model/writer~ModelWriter#move `Writer#move()`}.\n\t*\n\t* **Note:** For a paste-like content insertion mechanism see\n\t* {@link module:engine/model/model~Model#insertContent `model.insertContent()`}.\n\t*\n\t* @param item Item or document fragment to insert.\n\t* @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\tinsert(item, itemOrPosition, offset = 0) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (item instanceof ModelText && item.data == \"\") return;\n\t\tconst position = ModelPosition._createAt(itemOrPosition, offset);\n\t\tif (item.parent) {\n\t\t\tif (isSameTree(item.root, position.root)) {\n\t\t\t\tthis.move(ModelRange._createOn(item), position);\n\t\t\t\treturn;\n\t\t\t} else if (item.root.document)\n /**\n\t\t\t* Cannot move a node from a document to a different tree.\n\t\t\t* It is forbidden to move a node that was already in a document outside of it.\n\t\t\t*\n\t\t\t* @error model-writer-insert-forbidden-move\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"model-writer-insert-forbidden-move\", this);\n\t\t\telse this.remove(item);\n\t\t}\n\t\tconst version = position.root.document ? position.root.document.version : null;\n\t\tconst children = item instanceof ModelDocumentFragment ? item._removeChildren(0, item.childCount) : item;\n\t\tconst insert = new InsertOperation(position, children, version);\n\t\tif (item instanceof ModelText) insert.shouldReceiveAttributes = true;\n\t\tthis.batch.addOperation(insert);\n\t\tthis.model.applyOperation(insert);\n\t\tif (item instanceof ModelDocumentFragment) for (const [markerName, markerRange] of item.markers) {\n\t\t\tconst rangeRootPosition = ModelPosition._createAt(markerRange.root, 0);\n\t\t\tconst options = {\n\t\t\t\trange: new ModelRange(markerRange.start._getCombined(rangeRootPosition, position), markerRange.end._getCombined(rangeRootPosition, position)),\n\t\t\t\tusingOperation: true,\n\t\t\t\taffectsData: true\n\t\t\t};\n\t\t\tif (this.model.markers.has(markerName)) this.updateMarker(markerName, options);\n\t\t\telse this.addMarker(markerName, options);\n\t\t}\n\t}\n\tinsertText(text, attributes, itemOrPosition, offset) {\n\t\tif (attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement || attributes instanceof ModelPosition) this.insert(this.createText(text), attributes, itemOrPosition);\n\t\telse this.insert(this.createText(text, attributes), itemOrPosition, offset);\n\t}\n\tinsertElement(name, attributes, itemOrPositionOrOffset, offset) {\n\t\tif (attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement || attributes instanceof ModelPosition) this.insert(this.createElement(name), attributes, itemOrPositionOrOffset);\n\t\telse this.insert(this.createElement(name, attributes), itemOrPositionOrOffset, offset);\n\t}\n\t/**\n\t* Inserts item at the end of the given parent.\n\t*\n\t* ```ts\n\t* const paragraph = writer.createElement( 'paragraph' );\n\t* writer.append( paragraph, root );\n\t* ```\n\t*\n\t* Note that if the item already has parent it will be removed from the previous parent.\n\t*\n\t* If you want to move {@link module:engine/model/range~ModelRange range} instead of an\n\t* {@link module:engine/model/item~ModelItem item} use {@link module:engine/model/writer~ModelWriter#move `Writer#move()`}.\n\t*\n\t* @param item Item or document fragment to insert.\n\t*/\n\tappend(item, parent) {\n\t\tthis.insert(item, parent, \"end\");\n\t}\n\tappendText(text, attributes, parent) {\n\t\tif (attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement) this.insert(this.createText(text), attributes, \"end\");\n\t\telse this.insert(this.createText(text, attributes), parent, \"end\");\n\t}\n\tappendElement(name, attributes, parent) {\n\t\tif (attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement) this.insert(this.createElement(name), attributes, \"end\");\n\t\telse this.insert(this.createElement(name, attributes), parent, \"end\");\n\t}\n\t/**\n\t* Sets value of the attribute with given key on a {@link module:engine/model/item~ModelItem model item}\n\t* or on a {@link module:engine/model/range~ModelRange range}.\n\t*\n\t* @param key Attribute key.\n\t* @param value Attribute new value.\n\t* @param itemOrRange Model item or range on which the attribute will be set.\n\t*/\n\tsetAttribute(key, value, itemOrRange) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (itemOrRange instanceof ModelRange) {\n\t\t\tconst ranges = itemOrRange.getMinimalFlatRanges();\n\t\t\tfor (const range of ranges) setAttributeOnRange(this, key, value, range);\n\t\t} else setAttributeOnItem(this, key, value, itemOrRange);\n\t}\n\t/**\n\t* Sets values of attributes on a {@link module:engine/model/item~ModelItem model item}\n\t* or on a {@link module:engine/model/range~ModelRange range}.\n\t*\n\t* ```ts\n\t* writer.setAttributes( {\n\t* \tbold: true,\n\t* \titalic: true\n\t* }, range );\n\t* ```\n\t*\n\t* @param attributes Attributes keys and values.\n\t* @param itemOrRange Model item or range on which the attributes will be set.\n\t*/\n\tsetAttributes(attributes, itemOrRange) {\n\t\tfor (const [key, val] of toMap(attributes)) this.setAttribute(key, val, itemOrRange);\n\t}\n\t/**\n\t* Removes an attribute with given key from a {@link module:engine/model/item~ModelItem model item}\n\t* or from a {@link module:engine/model/range~ModelRange range}.\n\t*\n\t* @param key Attribute key.\n\t* @param itemOrRange Model item or range from which the attribute will be removed.\n\t*/\n\tremoveAttribute(key, itemOrRange) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (itemOrRange instanceof ModelRange) {\n\t\t\tconst ranges = itemOrRange.getMinimalFlatRanges();\n\t\t\tfor (const range of ranges) setAttributeOnRange(this, key, null, range);\n\t\t} else setAttributeOnItem(this, key, null, itemOrRange);\n\t}\n\t/**\n\t* Removes all attributes from all elements in the range or from the given item.\n\t*\n\t* @param itemOrRange Model item or range from which all attributes will be removed.\n\t*/\n\tclearAttributes(itemOrRange) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tconst removeAttributesFromItem = (item) => {\n\t\t\tfor (const attribute of item.getAttributeKeys()) this.removeAttribute(attribute, item);\n\t\t};\n\t\tif (!(itemOrRange instanceof ModelRange)) removeAttributesFromItem(itemOrRange);\n\t\telse for (const item of itemOrRange.getItems()) removeAttributesFromItem(item);\n\t}\n\t/**\n\t* Moves all items in the source range to the target position.\n\t*\n\t* ```ts\n\t* writer.move( sourceRange, targetPosition );\n\t* ```\n\t*\n\t* Instead of the target position you can use parent and offset or define that range should be moved to the end\n\t* or before or after chosen item:\n\t*\n\t* ```ts\n\t* // Moves all items in the range to the paragraph at offset 5:\n\t* writer.move( sourceRange, paragraph, 5 );\n\t* // Moves all items in the range to the end of a blockquote:\n\t* writer.move( sourceRange, blockquote, 'end' );\n\t* // Moves all items in the range to a position after an image:\n\t* writer.move( sourceRange, image, 'after' );\n\t* ```\n\t*\n\t* These parameters work the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t*\n\t* Note that items can be moved only within the same tree. It means that you can move items within the same root\n\t* (element or document fragment) or between {@link module:engine/model/document~ModelDocument#roots documents roots},\n\t* but you cannot move items from document fragment to the document or from one detached element to another. Use\n\t* {@link module:engine/model/writer~ModelWriter#insert} in such cases.\n\t*\n\t* @param range Source range.\n\t* @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\tmove(range, itemOrPosition, offset) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (!(range instanceof ModelRange))\n /**\n\t\t* Invalid range to move.\n\t\t*\n\t\t* @error writer-move-invalid-range\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-move-invalid-range\", this);\n\t\tif (!range.isFlat)\n /**\n\t\t* Range to move is not flat.\n\t\t*\n\t\t* @error writer-move-range-not-flat\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-move-range-not-flat\", this);\n\t\tconst position = ModelPosition._createAt(itemOrPosition, offset);\n\t\tif (position.isEqual(range.start)) return;\n\t\tthis._addOperationForAffectedMarkers(\"move\", range);\n\t\tif (!isSameTree(range.root, position.root))\n /**\n\t\t* Range is going to be moved within not the same document. Please use\n\t\t* {@link module:engine/model/writer~ModelWriter#insert insert} instead.\n\t\t*\n\t\t* @error writer-move-different-document\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-move-different-document\", this);\n\t\tconst version = range.root.document ? range.root.document.version : null;\n\t\tconst operation = new MoveOperation(range.start, range.end.offset - range.start.offset, position, version);\n\t\tthis.batch.addOperation(operation);\n\t\tthis.model.applyOperation(operation);\n\t}\n\t/**\n\t* Removes given model {@link module:engine/model/item~ModelItem item} or {@link module:engine/model/range~ModelRange range}.\n\t*\n\t* @param itemOrRange Model item or range to remove.\n\t*/\n\tremove(itemOrRange) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tconst ranges = (itemOrRange instanceof ModelRange ? itemOrRange : ModelRange._createOn(itemOrRange)).getMinimalFlatRanges().reverse();\n\t\tfor (const flat of ranges) {\n\t\t\tthis._addOperationForAffectedMarkers(\"move\", flat);\n\t\t\tapplyRemoveOperation(flat.start, flat.end.offset - flat.start.offset, this.batch, this.model);\n\t\t}\n\t}\n\t/**\n\t* Merges two siblings at the given position.\n\t*\n\t* Node before and after the position have to be an element. Otherwise `writer-merge-no-element-before` or\n\t* `writer-merge-no-element-after` error will be thrown.\n\t*\n\t* @param position Position between merged elements.\n\t*/\n\tmerge(position) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tconst nodeBefore = position.nodeBefore;\n\t\tconst nodeAfter = position.nodeAfter;\n\t\tthis._addOperationForAffectedMarkers(\"merge\", position);\n\t\tif (!(nodeBefore instanceof ModelElement))\n /**\n\t\t* Node before merge position must be an element.\n\t\t*\n\t\t* @error writer-merge-no-element-before\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-merge-no-element-before\", this);\n\t\tif (!(nodeAfter instanceof ModelElement))\n /**\n\t\t* Node after merge position must be an element.\n\t\t*\n\t\t* @error writer-merge-no-element-after\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-merge-no-element-after\", this);\n\t\tif (!position.root.document) this._mergeDetached(position);\n\t\telse this._merge(position);\n\t}\n\t/**\n\t* Shortcut for {@link module:engine/model/model~Model#createPositionFromPath `Model#createPositionFromPath()`}.\n\t*\n\t* @param root Root of the position.\n\t* @param path Position path. See {@link module:engine/model/position~ModelPosition#path}.\n\t* @param stickiness Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t*/\n\tcreatePositionFromPath(root, path, stickiness) {\n\t\treturn this.model.createPositionFromPath(root, path, stickiness);\n\t}\n\t/**\n\t* Shortcut for {@link module:engine/model/model~Model#createPositionAt `Model#createPositionAt()`}.\n\t*\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\tcreatePositionAt(itemOrPosition, offset) {\n\t\treturn this.model.createPositionAt(itemOrPosition, offset);\n\t}\n\t/**\n\t* Shortcut for {@link module:engine/model/model~Model#createPositionAfter `Model#createPositionAfter()`}.\n\t*\n\t* @param item Item after which the position should be placed.\n\t*/\n\tcreatePositionAfter(item) {\n\t\treturn this.model.createPositionAfter(item);\n\t}\n\t/**\n\t* Shortcut for {@link module:engine/model/model~Model#createPositionBefore `Model#createPositionBefore()`}.\n\t*\n\t* @param item Item after which the position should be placed.\n\t*/\n\tcreatePositionBefore(item) {\n\t\treturn this.model.createPositionBefore(item);\n\t}\n\t/**\n\t* Shortcut for {@link module:engine/model/model~Model#createRange `Model#createRange()`}.\n\t*\n\t* @param start Start position.\n\t* @param end End position. If not set, range will be collapsed at `start` position.\n\t*/\n\tcreateRange(start, end) {\n\t\treturn this.model.createRange(start, end);\n\t}\n\t/**\n\t* Shortcut for {@link module:engine/model/model~Model#createRangeIn `Model#createRangeIn()`}.\n\t*\n\t* @param element Element which is a parent for the range.\n\t*/\n\tcreateRangeIn(element) {\n\t\treturn this.model.createRangeIn(element);\n\t}\n\t/**\n\t* Shortcut for {@link module:engine/model/model~Model#createRangeOn `Model#createRangeOn()`}.\n\t*\n\t* @param element Element which is a parent for the range.\n\t*/\n\tcreateRangeOn(element) {\n\t\treturn this.model.createRangeOn(element);\n\t}\n\tcreateSelection(...args) {\n\t\treturn this.model.createSelection(...args);\n\t}\n\t/**\n\t* Performs merge action in a detached tree.\n\t*\n\t* @param position Position between merged elements.\n\t*/\n\t_mergeDetached(position) {\n\t\tconst nodeBefore = position.nodeBefore;\n\t\tconst nodeAfter = position.nodeAfter;\n\t\tthis.move(ModelRange._createIn(nodeAfter), ModelPosition._createAt(nodeBefore, \"end\"));\n\t\tthis.remove(nodeAfter);\n\t}\n\t/**\n\t* Performs merge action in a non-detached tree.\n\t*\n\t* @param position Position between merged elements.\n\t*/\n\t_merge(position) {\n\t\tconst targetPosition = ModelPosition._createAt(position.nodeBefore, \"end\");\n\t\tconst sourcePosition = ModelPosition._createAt(position.nodeAfter, 0);\n\t\tconst graveyard = position.root.document.graveyard;\n\t\tconst graveyardPosition = new ModelPosition(graveyard, [0]);\n\t\tconst version = position.root.document.version;\n\t\tconst merge = new MergeOperation(sourcePosition, position.nodeAfter.maxOffset, targetPosition, graveyardPosition, version);\n\t\tthis.batch.addOperation(merge);\n\t\tthis.model.applyOperation(merge);\n\t}\n\t/**\n\t* Renames the given element.\n\t*\n\t* @param element The element to rename.\n\t* @param newName New element name.\n\t*/\n\trename(element, newName) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (!(element instanceof ModelElement))\n /**\n\t\t* Trying to rename an object which is not an instance of Element.\n\t\t*\n\t\t* @error writer-rename-not-element-instance\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-rename-not-element-instance\", this);\n\t\tconst version = element.root.document ? element.root.document.version : null;\n\t\tconst renameOperation = new RenameOperation(ModelPosition._createBefore(element), element.name, newName, version);\n\t\tthis.batch.addOperation(renameOperation);\n\t\tthis.model.applyOperation(renameOperation);\n\t}\n\t/**\n\t* Splits elements starting from the given position and going to the top of the model tree as long as given\n\t* `limitElement` is reached. When `limitElement` is not defined then only the parent of the given position will be split.\n\t*\n\t* The element needs to have a parent. It cannot be a root element nor a document fragment.\n\t* The `writer-split-element-no-parent` error will be thrown if you try to split an element with no parent.\n\t*\n\t* @param position Position of split.\n\t* @param limitElement Stop splitting when this element will be reached.\n\t* @returns Split result with properties:\n\t* * `position` - Position between split elements.\n\t* * `range` - Range that stars from the end of the first split element and ends at the beginning of the first copy element.\n\t*/\n\tsplit(position, limitElement) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tlet splitElement = position.parent;\n\t\tif (!splitElement.parent)\n /**\n\t\t* Element with no parent cannot be split.\n\t\t*\n\t\t* @error writer-split-element-no-parent\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-split-element-no-parent\", this);\n\t\tif (!limitElement) limitElement = splitElement.parent;\n\t\tif (!position.parent.getAncestors({ includeSelf: true }).includes(limitElement))\n /**\n\t\t* Limit element is not a position ancestor.\n\t\t*\n\t\t* @error writer-split-invalid-limit-element\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-split-invalid-limit-element\", this);\n\t\tlet firstSplitElement;\n\t\tlet firstCopyElement;\n\t\tdo {\n\t\t\tconst version = splitElement.root.document ? splitElement.root.document.version : null;\n\t\t\tconst howMany = splitElement.maxOffset - position.offset;\n\t\t\tconst insertionPosition = SplitOperation.getInsertionPosition(position);\n\t\t\tconst split = new SplitOperation(position, howMany, insertionPosition, null, version);\n\t\t\tthis.batch.addOperation(split);\n\t\t\tthis.model.applyOperation(split);\n\t\t\tif (!firstSplitElement && !firstCopyElement) {\n\t\t\t\tfirstSplitElement = splitElement;\n\t\t\t\tfirstCopyElement = position.parent.nextSibling;\n\t\t\t}\n\t\t\tposition = this.createPositionAfter(position.parent);\n\t\t\tsplitElement = position.parent;\n\t\t} while (splitElement !== limitElement);\n\t\treturn {\n\t\t\tposition,\n\t\t\trange: new ModelRange(ModelPosition._createAt(firstSplitElement, \"end\"), ModelPosition._createAt(firstCopyElement, 0))\n\t\t};\n\t}\n\t/**\n\t* Wraps the given range with the given element or with a new element (if a string was passed).\n\t*\n\t* **Note:** range to wrap should be a \"flat range\" (see {@link module:engine/model/range~ModelRange#isFlat `Range#isFlat`}).\n\t* If not, an error will be thrown.\n\t*\n\t* @param range Range to wrap.\n\t* @param elementOrString Element or name of element to wrap the range with.\n\t*/\n\twrap(range, elementOrString) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (!range.isFlat)\n /**\n\t\t* Range to wrap is not flat.\n\t\t*\n\t\t* @error writer-wrap-range-not-flat\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-wrap-range-not-flat\", this);\n\t\tconst element = elementOrString instanceof ModelElement ? elementOrString : new ModelElement(elementOrString);\n\t\tif (element.childCount > 0)\n /**\n\t\t* Element to wrap with is not empty.\n\t\t*\n\t\t* @error writer-wrap-element-not-empty\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-wrap-element-not-empty\", this);\n\t\tif (element.parent !== null)\n /**\n\t\t* Element to wrap with is already attached to a tree model.\n\t\t*\n\t\t* @error writer-wrap-element-attached\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-wrap-element-attached\", this);\n\t\tthis.insert(element, range.start);\n\t\tconst shiftedRange = new ModelRange(range.start.getShiftedBy(1), range.end.getShiftedBy(1));\n\t\tthis.move(shiftedRange, ModelPosition._createAt(element, 0));\n\t}\n\t/**\n\t* Unwraps children of the given element – all its children are moved before it and then the element is removed.\n\t* Throws error if you try to unwrap an element which does not have a parent.\n\t*\n\t* @param element Element to unwrap.\n\t*/\n\tunwrap(element) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (element.parent === null)\n /**\n\t\t* Trying to unwrap an element which has no parent.\n\t\t*\n\t\t* @error writer-unwrap-element-no-parent\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-unwrap-element-no-parent\", this);\n\t\tthis.move(ModelRange._createIn(element), this.createPositionAfter(element));\n\t\tthis.remove(element);\n\t}\n\t/**\n\t* Adds a {@link module:engine/model/markercollection~Marker marker}. Marker is a named range, which tracks\n\t* changes in the document and updates its range automatically, when model tree changes.\n\t*\n\t* As the first parameter you can set marker name.\n\t*\n\t* The required `options.usingOperation` parameter lets you decide if the marker should be managed by operations or not. See\n\t* {@link module:engine/model/markercollection~Marker marker class description} to learn about the difference between\n\t* markers managed by operations and not-managed by operations.\n\t*\n\t* The `options.affectsData` parameter, which defaults to `false`, allows you to define if a marker affects the data. It should be\n\t* `true` when the marker change changes the data returned by the\n\t* {@link module:core/editor/editor~Editor#getData `editor.getData()`} method.\n\t* When set to `true` it fires the {@link module:engine/model/document~ModelDocument#event:change:data `change:data`} event.\n\t* When set to `false` it fires the {@link module:engine/model/document~ModelDocument#event:change `change`} event.\n\t*\n\t* Create marker directly base on marker's name:\n\t*\n\t* ```ts\n\t* addMarker( markerName, { range, usingOperation: false } );\n\t* ```\n\t*\n\t* Create marker using operation:\n\t*\n\t* ```ts\n\t* addMarker( markerName, { range, usingOperation: true } );\n\t* ```\n\t*\n\t* Create marker that affects the editor data:\n\t*\n\t* ```ts\n\t* addMarker( markerName, { range, usingOperation: false, affectsData: true } );\n\t* ```\n\t*\n\t* Note: For efficiency reasons, it's best to create and keep as little markers as possible.\n\t*\n\t* @see module:engine/model/markercollection~Marker\n\t* @param name Name of a marker to create - must be unique.\n\t* @param options.usingOperation Flag indicating that the marker should be added by MarkerOperation.\n\t* See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.\n\t* @param options.range Marker range.\n\t* @param options.affectsData Flag indicating that the marker changes the editor data.\n\t* @returns Marker that was set.\n\t*/\n\taddMarker(name, options) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (!options || typeof options.usingOperation != \"boolean\")\n /**\n\t\t* The `options.usingOperation` parameter is required when adding a new marker.\n\t\t*\n\t\t* @error writer-addmarker-no-usingoperation\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-addmarker-no-usingoperation\", this);\n\t\tconst usingOperation = options.usingOperation;\n\t\tconst range = options.range;\n\t\tconst affectsData = options.affectsData === void 0 ? false : options.affectsData;\n\t\tif (this.model.markers.has(name))\n /**\n\t\t* Marker with provided name already exists.\n\t\t*\n\t\t* @error writer-addmarker-marker-exists\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-addmarker-marker-exists\", this);\n\t\tif (!range)\n /**\n\t\t* Range parameter is required when adding a new marker.\n\t\t*\n\t\t* @error writer-addmarker-no-range\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-addmarker-no-range\", this);\n\t\tif (!usingOperation) return this.model.markers._set(name, range, usingOperation, affectsData);\n\t\tapplyMarkerOperation(this, name, null, range, affectsData);\n\t\treturn this.model.markers.get(name);\n\t}\n\t/**\n\t* Adds, updates or refreshes a {@link module:engine/model/markercollection~Marker marker}. Marker is a named range, which tracks\n\t* changes in the document and updates its range automatically, when model tree changes. Still, it is possible to change the\n\t* marker's range directly using this method.\n\t*\n\t* As the first parameter you can set marker name or instance. If none of them is provided, new marker, with a unique\n\t* name is created and returned.\n\t*\n\t* **Note**: If you want to change the {@link module:engine/view/element~ViewElement view element}\n\t* of the marker while its data in the model\n\t* remains the same, use the dedicated {@link module:engine/controller/editingcontroller~EditingController#reconvertMarker} method.\n\t*\n\t* The `options.usingOperation` parameter lets you change if the marker should be managed by operations or not. See\n\t* {@link module:engine/model/markercollection~Marker marker class description} to learn about the difference between\n\t* markers managed by operations and not-managed by operations. It is possible to change this option for an existing marker.\n\t*\n\t* The `options.affectsData` parameter, which defaults to `false`, allows you to define if a marker affects the data. It should be\n\t* `true` when the marker change changes the data returned by\n\t* the {@link module:core/editor/editor~Editor#getData `editor.getData()`} method.\n\t* When set to `true` it fires the {@link module:engine/model/document~ModelDocument#event:change:data `change:data`} event.\n\t* When set to `false` it fires the {@link module:engine/model/document~ModelDocument#event:change `change`} event.\n\t*\n\t* Update marker directly base on marker's name:\n\t*\n\t* ```ts\n\t* updateMarker( markerName, { range } );\n\t* ```\n\t*\n\t* Update marker using operation:\n\t*\n\t* ```ts\n\t* updateMarker( marker, { range, usingOperation: true } );\n\t* updateMarker( markerName, { range, usingOperation: true } );\n\t* ```\n\t*\n\t* Change marker's option (start using operations to manage it):\n\t*\n\t* ```ts\n\t* updateMarker( marker, { usingOperation: true } );\n\t* ```\n\t*\n\t* Change marker's option (inform the engine, that the marker does not affect the data anymore):\n\t*\n\t* ```ts\n\t* updateMarker( markerName, { affectsData: false } );\n\t* ```\n\t*\n\t* @see module:engine/model/markercollection~Marker\n\t* @param markerOrName Name of a marker to update, or a marker instance.\n\t* @param options If options object is not defined then marker will be refreshed by triggering\n\t* downcast conversion for this marker with the same data.\n\t* @param options.range Marker range to update.\n\t* @param options.usingOperation Flag indicated whether the marker should be added by MarkerOperation.\n\t* See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.\n\t* @param options.affectsData Flag indicating that the marker changes the editor data.\n\t*/\n\tupdateMarker(markerOrName, options) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tconst markerName = typeof markerOrName == \"string\" ? markerOrName : markerOrName.name;\n\t\tconst currentMarker = this.model.markers.get(markerName);\n\t\tif (!currentMarker)\n /**\n\t\t* Marker with provided name does not exist and will not be updated.\n\t\t*\n\t\t* @error writer-updatemarker-marker-not-exists\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-updatemarker-marker-not-exists\", this);\n\t\tif (!options) {\n\t\t\t/**\n\t\t\t* The usage of `writer.updateMarker()` only to reconvert (refresh) a\n\t\t\t* {@link module:engine/model/markercollection~Marker model marker} was deprecated and may not work in the future.\n\t\t\t* Please update your code to use\n\t\t\t* {@link module:engine/controller/editingcontroller~EditingController#reconvertMarker `editor.editing.reconvertMarker()`}\n\t\t\t* instead.\n\t\t\t*\n\t\t\t* @error writer-updatemarker-reconvert-using-editingcontroller\n\t\t\t* @param markerName The name of the updated marker.\n\t\t\t*/\n\t\t\tlogWarning(\"writer-updatemarker-reconvert-using-editingcontroller\", { markerName });\n\t\t\tthis.model.markers._refresh(currentMarker);\n\t\t\treturn;\n\t\t}\n\t\tconst hasUsingOperationDefined = typeof options.usingOperation == \"boolean\";\n\t\tconst affectsDataDefined = typeof options.affectsData == \"boolean\";\n\t\tconst affectsData = affectsDataDefined ? options.affectsData : currentMarker.affectsData;\n\t\tif (!hasUsingOperationDefined && !options.range && !affectsDataDefined)\n /**\n\t\t* One of the options is required - provide range, usingOperations or affectsData.\n\t\t*\n\t\t* @error writer-updatemarker-wrong-options\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-updatemarker-wrong-options\", this);\n\t\tconst currentRange = currentMarker.getRange();\n\t\tconst updatedRange = options.range ? options.range : currentRange;\n\t\tif (hasUsingOperationDefined && options.usingOperation !== currentMarker.managedUsingOperations) {\n\t\t\tif (options.usingOperation) applyMarkerOperation(this, markerName, null, updatedRange, affectsData);\n\t\t\telse {\n\t\t\t\tapplyMarkerOperation(this, markerName, currentRange, null, affectsData);\n\t\t\t\tthis.model.markers._set(markerName, updatedRange, void 0, affectsData);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (currentMarker.managedUsingOperations) applyMarkerOperation(this, markerName, currentRange, updatedRange, affectsData);\n\t\telse this.model.markers._set(markerName, updatedRange, void 0, affectsData);\n\t}\n\t/**\n\t* Removes given {@link module:engine/model/markercollection~Marker marker} or marker with given name.\n\t* The marker is removed accordingly to how it has been created, so if the marker was created using operation,\n\t* it will be destroyed using operation.\n\t*\n\t* @param markerOrName Marker or marker name to remove.\n\t*/\n\tremoveMarker(markerOrName) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tconst name = typeof markerOrName == \"string\" ? markerOrName : markerOrName.name;\n\t\tif (!this.model.markers.has(name))\n /**\n\t\t* Trying to remove marker which does not exist.\n\t\t*\n\t\t* @error writer-removemarker-no-marker\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-removemarker-no-marker\", this);\n\t\tconst marker = this.model.markers.get(name);\n\t\tif (!marker.managedUsingOperations) {\n\t\t\tthis.model.markers._remove(name);\n\t\t\treturn;\n\t\t}\n\t\tconst oldRange = marker.getRange();\n\t\tapplyMarkerOperation(this, name, oldRange, null, marker.affectsData);\n\t}\n\t/**\n\t* Adds a new root to the document (or re-attaches a {@link #detachRoot detached root}).\n\t*\n\t* Throws an error, if trying to add a root that is already added and attached.\n\t*\n\t* **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root\n\t* {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element\n\t* name explicitly so the added root matches the schema the features expect.\n\t* See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t* {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*\n\t* @param rootName Name of the added root.\n\t* @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined\n\t* (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.\n\t* @returns The added root element.\n\t*/\n\taddRoot(rootName, elementName = \"$root\") {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tconst root = this.model.document.getRoot(rootName);\n\t\tif (root && root.isAttached())\n /**\n\t\t* Root with provided name already exists and is attached.\n\t\t*\n\t\t* @error writer-addroot-root-exists\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-addroot-root-exists\", this);\n\t\tconst document = this.model.document;\n\t\tconst operation = new RootOperation(rootName, elementName, true, document, document.version);\n\t\tthis.batch.addOperation(operation);\n\t\tthis.model.applyOperation(operation);\n\t\treturn this.model.document.getRoot(rootName);\n\t}\n\t/**\n\t* Detaches the root from the document.\n\t*\n\t* All content and markers are removed from the root upon detaching. New content and new markers cannot be added to the root, as long\n\t* as it is detached.\n\t*\n\t* A root cannot be fully removed from the document, it can be only detached. A root is permanently removed only after you\n\t* re-initialize the editor and do not specify the root in the initial data.\n\t*\n\t* A detached root can be re-attached using {@link #addRoot}.\n\t*\n\t* Throws an error if the root does not exist or the root is already detached.\n\t*\n\t* @param rootOrName Name of the detached root.\n\t*/\n\tdetachRoot(rootOrName) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tconst root = typeof rootOrName == \"string\" ? this.model.document.getRoot(rootOrName) : rootOrName;\n\t\tif (!root || !root.isAttached())\n /**\n\t\t* Root with provided name does not exist or is already detached.\n\t\t*\n\t\t* @error writer-detachroot-no-root\n\t\t*/\n\t\tthrow new CKEditorError(\"writer-detachroot-no-root\", this);\n\t\tfor (const marker of this.model.markers) if (marker.getRange().root === root) this.removeMarker(marker);\n\t\tfor (const key of root.getAttributeKeys()) this.removeAttribute(key, root);\n\t\tthis.remove(this.createRangeIn(root));\n\t\tconst document = this.model.document;\n\t\tconst operation = new RootOperation(root.rootName, root.name, false, document, document.version);\n\t\tthis.batch.addOperation(operation);\n\t\tthis.model.applyOperation(operation);\n\t}\n\tsetSelection(...args) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tthis.model.document.selection._setTo(...args);\n\t}\n\t/**\n\t* Moves {@link module:engine/model/documentselection~ModelDocumentSelection#focus} to the specified location.\n\t*\n\t* The location can be specified in the same form as\n\t* {@link #createPositionAt `writer.createPositionAt()`} parameters.\n\t*\n\t* @param itemOrPosition\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\tsetSelectionFocus(itemOrPosition, offset) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tthis.model.document.selection._setFocus(itemOrPosition, offset);\n\t}\n\tsetSelectionAttribute(keyOrObjectOrIterable, value) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (typeof keyOrObjectOrIterable === \"string\") this._setSelectionAttribute(keyOrObjectOrIterable, value);\n\t\telse for (const [key, value] of toMap(keyOrObjectOrIterable)) this._setSelectionAttribute(key, value);\n\t}\n\t/**\n\t* Removes attribute(s) with given key(s) from the selection.\n\t*\n\t* Remove one attribute:\n\t*\n\t* ```ts\n\t* writer.removeSelectionAttribute( 'italic' );\n\t* ```\n\t*\n\t* Remove multiple attributes:\n\t*\n\t* ```ts\n\t* writer.removeSelectionAttribute( [ 'italic', 'bold' ] );\n\t* ```\n\t*\n\t* @param keyOrIterableOfKeys Key of the attribute to remove or an iterable of attribute keys to remove.\n\t*/\n\tremoveSelectionAttribute(keyOrIterableOfKeys) {\n\t\tthis._assertWriterUsedCorrectly();\n\t\tif (typeof keyOrIterableOfKeys === \"string\") this._removeSelectionAttribute(keyOrIterableOfKeys);\n\t\telse for (const key of keyOrIterableOfKeys) this._removeSelectionAttribute(key);\n\t}\n\t/**\n\t* Temporarily changes the {@link module:engine/model/documentselection~ModelDocumentSelection#isGravityOverridden gravity}\n\t* of the selection from left to right.\n\t*\n\t* The gravity defines from which direction the selection inherits its attributes. If it's the default left gravity,\n\t* then the selection (after being moved by the user) inherits attributes from its left-hand side.\n\t* This method allows to temporarily override this behavior by forcing the gravity to the right.\n\t*\n\t* For the following model fragment:\n\t*\n\t* ```xml\n\t* <$text bold=\"true\" linkHref=\"url\">bar[]</$text><$text bold=\"true\">biz</$text>\n\t* ```\n\t*\n\t* * Default gravity: selection will have the `bold` and `linkHref` attributes.\n\t* * Overridden gravity: selection will have `bold` attribute.\n\t*\n\t* **Note**: It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry\n\t* of the process.\n\t*\n\t* @returns The unique id which allows restoring the gravity.\n\t*/\n\toverrideSelectionGravity() {\n\t\treturn this.model.document.selection._overrideGravity();\n\t}\n\t/**\n\t* Restores {@link ~ModelWriter#overrideSelectionGravity} gravity to default.\n\t*\n\t* Restoring the gravity is only possible using the unique identifier returned by\n\t* {@link ~ModelWriter#overrideSelectionGravity}. Note that the gravity remains overridden as long as won't be restored\n\t* the same number of times it was overridden.\n\t*\n\t* @param uid The unique id returned by {@link ~ModelWriter#overrideSelectionGravity}.\n\t*/\n\trestoreSelectionGravity(uid) {\n\t\tthis.model.document.selection._restoreGravity(uid);\n\t}\n\t/**\n\t* @param key Key of the attribute to remove.\n\t* @param value Attribute value.\n\t*/\n\t_setSelectionAttribute(key, value) {\n\t\tconst selection = this.model.document.selection;\n\t\tif (selection.isCollapsed && selection.anchor.parent.isEmpty) {\n\t\t\tconst storeKey = ModelDocumentSelection._getStoreAttributeKey(key);\n\t\t\tthis.setAttribute(storeKey, value, selection.anchor.parent);\n\t\t}\n\t\tselection._setAttribute(key, value);\n\t}\n\t/**\n\t* @param key Key of the attribute to remove.\n\t*/\n\t_removeSelectionAttribute(key) {\n\t\tconst selection = this.model.document.selection;\n\t\tif (selection.isCollapsed && selection.anchor.parent.isEmpty) {\n\t\t\tconst storeKey = ModelDocumentSelection._getStoreAttributeKey(key);\n\t\t\tthis.removeAttribute(storeKey, selection.anchor.parent);\n\t\t}\n\t\tselection._removeAttribute(key);\n\t}\n\t/**\n\t* Throws `writer-detached-writer-tries-to-modify-model` error when the writer is used outside of the `change()` block.\n\t*/\n\t_assertWriterUsedCorrectly() {\n\t\t/**\n\t\t* Trying to use a writer outside a {@link module:engine/model/model~Model#change `change()`} or\n\t\t* {@link module:engine/model/model~Model#enqueueChange `enqueueChange()`} blocks.\n\t\t*\n\t\t* The writer can only be used inside these blocks which ensures that the model\n\t\t* can only be changed during such \"sessions\".\n\t\t*\n\t\t* @error writer-incorrect-use\n\t\t*/\n\t\tif (this.model._currentWriter !== this) throw new CKEditorError(\"writer-incorrect-use\", this);\n\t}\n\t/**\n\t* For given action `type` and `positionOrRange` where the action happens, this function finds all affected markers\n\t* and applies a marker operation with the new marker range equal to the current range. Thanks to this, the marker range\n\t* can be later correctly processed during undo.\n\t*\n\t* Exposed so that code applying operations directly to the model can reproduce the same marker bookkeeping.\n\t*\n\t* @internal\n\t* @param type Writer action type.\n\t* @param positionOrRange Position or range where the writer action happens.\n\t*/\n\t_addOperationForAffectedMarkers(type, positionOrRange) {\n\t\tfor (const marker of this.model.markers) {\n\t\t\tif (!marker.managedUsingOperations) continue;\n\t\t\tconst markerRange = marker.getRange();\n\t\t\tlet isAffected;\n\t\t\tif (type === \"move\") {\n\t\t\t\tconst range = positionOrRange;\n\t\t\t\tisAffected = range.containsPosition(markerRange.start) || range.start.isEqual(markerRange.start) || range.containsPosition(markerRange.end) || range.end.isEqual(markerRange.end);\n\t\t\t} else {\n\t\t\t\tconst position = positionOrRange;\n\t\t\t\tconst elementBefore = position.nodeBefore;\n\t\t\t\tconst elementAfter = position.nodeAfter;\n\t\t\t\tconst affectedInLeftElement = markerRange.start.parent == elementBefore && markerRange.start.isAtEnd;\n\t\t\t\tconst affectedInRightElement = markerRange.end.parent == elementAfter && markerRange.end.offset == 0;\n\t\t\t\tconst affectedAfterLeftElement = markerRange.end.nodeAfter == elementAfter;\n\t\t\t\tconst affectedBeforeRightElement = markerRange.start.nodeAfter == elementAfter;\n\t\t\t\tisAffected = affectedInLeftElement || affectedInRightElement || affectedAfterLeftElement || affectedBeforeRightElement;\n\t\t\t}\n\t\t\tif (isAffected) this.updateMarker(marker.name, { range: markerRange });\n\t\t}\n\t}\n};\n/**\n* Sets given attribute to each node in given range. When attribute value is null then attribute will be removed.\n*\n* Because attribute operation needs to have the same attribute value on the whole range, this function splits\n* the range into smaller parts.\n*\n* Given `range` must be flat.\n*/\nfunction setAttributeOnRange(writer, key, value, range) {\n\tconst model = writer.model;\n\tconst doc = model.document;\n\tlet lastSplitPosition = range.start;\n\tlet position;\n\tlet valueBefore;\n\tlet valueAfter;\n\tfor (const val of range.getWalker({ shallow: true })) {\n\t\tvalueAfter = val.item.getAttribute(key);\n\t\tif (position && valueBefore != valueAfter) {\n\t\t\tif (valueBefore != value) addOperation();\n\t\t\tlastSplitPosition = position;\n\t\t}\n\t\tposition = val.nextPosition;\n\t\tvalueBefore = valueAfter;\n\t}\n\tif (position instanceof ModelPosition && position != lastSplitPosition && valueBefore != value) addOperation();\n\tfunction addOperation() {\n\t\tconst range = new ModelRange(lastSplitPosition, position);\n\t\tconst version = range.root.document ? doc.version : null;\n\t\tconst operation = new AttributeOperation(range, key, valueBefore, value, version);\n\t\twriter.batch.addOperation(operation);\n\t\tmodel.applyOperation(operation);\n\t}\n}\n/**\n* Sets given attribute to the given node. When attribute value is null then attribute will be removed.\n*/\nfunction setAttributeOnItem(writer, key, value, item) {\n\tconst model = writer.model;\n\tconst doc = model.document;\n\tconst previousValue = item.getAttribute(key);\n\tlet range, operation;\n\tif (previousValue != value) {\n\t\tif (item.root === item) {\n\t\t\tconst version = item.document ? doc.version : null;\n\t\t\toperation = new RootAttributeOperation(item, key, previousValue, value, version);\n\t\t} else {\n\t\t\trange = new ModelRange(ModelPosition._createBefore(item), writer.createPositionAfter(item));\n\t\t\tconst version = range.root.document ? doc.version : null;\n\t\t\toperation = new AttributeOperation(range, key, previousValue, value, version);\n\t\t}\n\t\twriter.batch.addOperation(operation);\n\t\tmodel.applyOperation(operation);\n\t}\n}\n/**\n* Creates and applies marker operation to {@link module:engine/model/operation/operation~Operation operation}.\n*/\nfunction applyMarkerOperation(writer, name, oldRange, newRange, affectsData) {\n\tconst model = writer.model;\n\tconst doc = model.document;\n\tconst operation = new MarkerOperation(name, oldRange, newRange, model.markers, !!affectsData, doc.version);\n\twriter.batch.addOperation(operation);\n\tmodel.applyOperation(operation);\n}\n/**\n* Creates `MoveOperation` or `DetachOperation` that removes `howMany` nodes starting from `position`.\n* The operation will be applied on given model instance and added to given operation instance.\n*\n* @param position Position from which nodes are removed.\n* @param howMany Number of nodes to remove.\n* @param batch Batch to which the operation will be added.\n* @param model Model instance on which operation will be applied.\n*/\nfunction applyRemoveOperation(position, howMany, batch, model) {\n\tlet operation;\n\tif (position.root.document) {\n\t\tconst doc = model.document;\n\t\tconst graveyardPosition = new ModelPosition(doc.graveyard, [0]);\n\t\toperation = new MoveOperation(position, howMany, graveyardPosition, doc.version);\n\t} else operation = new DetachOperation(position, howMany);\n\tbatch.addOperation(operation);\n\tmodel.applyOperation(operation);\n}\n/**\n* Returns `true` if both root elements are the same element or both are documents root elements.\n*\n* Elements in the same tree can be moved (for instance you can move element form one documents root to another, or\n* within the same document fragment), but when element supposed to be moved from document fragment to the document, or\n* to another document it should be removed and inserted to avoid problems with OT. This is because features like undo or\n* collaboration may track changes on the document but ignore changes on detached fragments and should not get\n* unexpected `move` operation.\n*/\nfunction isSameTree(rootA, rootB) {\n\tif (rootA === rootB) return true;\n\tif (rootA instanceof ModelRootElement && rootB instanceof ModelRootElement) 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 engine/model/utils/selection-post-fixer\n*/\n/**\n* Injects selection post-fixer to the model.\n*\n* The role of the selection post-fixer is to ensure that the selection is in a correct place\n* after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n*\n* The correct position means that:\n*\n* * All collapsed selection ranges are in a place where the {@link module:engine/model/schema~ModelSchema}\n* allows a `$text`.\n* * None of the selection's non-collapsed ranges crosses a {@link module:engine/model/schema~ModelSchema#isLimit limit element}\n* boundary (a range must be rooted within one limit element).\n* * Only {@link module:engine/model/schema~ModelSchema#isSelectable selectable elements} can be selected from the outside\n* (e.g. `[<paragraph>foo</paragraph>]` is invalid). This rule applies independently to both selection ends, so this\n* selection is correct: `<paragraph>f[oo</paragraph><imageBlock></imageBlock>]`.\n*\n* If the position is not correct, the post-fixer will automatically correct it.\n*\n* ## Fixing a non-collapsed selection\n*\n* See as an example a selection that starts in a P1 element and ends inside the text of a TD element\n* (`[` and `]` are range boundaries and `(l)` denotes an element defined as `isLimit=true`):\n*\n* ```\n* root\n*  |- element P1\n*  |   |- \"foo\"                                      root\n*  |- element TABLE (l)                   P1         TABLE             P2\n*  |   |- element TR (l)                 f o[o     TR      TR         b a r\n*  |   |   |- element TD (l)                       TD      TD\n*  |   |       |- \"aaa\"                          a]a a    b b b\n*  |   |- element TR (l)\n*  |   |   |- element TD (l)                           ||\n*  |   |       |- \"bbb\"                                ||\n*  |- element P2                                       VV\n*  |   |- \"bar\"\n*                                                    root\n*                                         P1         TABLE]            P2\n*                                        f o[o     TR      TR         b a r\n*                                                  TD      TD\n*                                                a a a    b b b\n* ```\n*\n* In the example above, the TABLE, TR and TD are defined as `isLimit=true` in the schema. The range which is not contained within\n* a single limit element must be expanded to select the outermost limit element. The range end is inside the text node of the TD element.\n* As the TD element is a child of the TR and TABLE elements, where both are defined as `isLimit=true` in the schema, the range must be\n* expanded to select the whole TABLE element.\n*\n* **Note** If the selection contains multiple ranges, the method returns a minimal set of ranges that are not intersecting after expanding\n* them to select `isLimit=true` elements.\n*\n* @internal\n*/\nfunction injectSelectionPostFixer(model) {\n\tmodel.document.registerPostFixer((writer) => selectionPostFixer(writer, model));\n}\n/**\n* The selection post-fixer.\n*/\nfunction selectionPostFixer(writer, model) {\n\tconst selection = model.document.selection;\n\tconst schema = model.schema;\n\tconst ranges = [];\n\tlet wasFixed = false;\n\tfor (const modelRange of selection.getRanges()) {\n\t\tconst correctedRange = tryFixingRange(modelRange, schema);\n\t\tif (correctedRange && !correctedRange.isEqual(modelRange)) {\n\t\t\tranges.push(correctedRange);\n\t\t\twasFixed = true;\n\t\t} else ranges.push(modelRange);\n\t}\n\tif (wasFixed) writer.setSelection(mergeIntersectingRanges(ranges), { backward: selection.isBackward });\n\treturn false;\n}\n/**\n* Tries fixing a range if it's incorrect.\n*\n* **Note:** This helper is used by the selection post-fixer and to fix the `beforeinput` target ranges.\n*\n* @returns Returns fixed range or null if range is valid.\n* @internal\n*/\nfunction tryFixingRange(range, schema) {\n\tif (range.isCollapsed) return tryFixingCollapsedRange(range, schema);\n\treturn tryFixingNonCollapsedRage(range, schema);\n}\n/**\n* Tries to fix collapsed ranges.\n*\n* * Fixes situation when a range is in a place where $text is not allowed\n*\n* @param range Collapsed range to fix.\n* @returns Returns fixed range or null if range is valid.\n*/\nfunction tryFixingCollapsedRange(range, schema) {\n\tconst originalPosition = range.start;\n\tconst nearestSelectionRange = schema.getNearestSelectionRange(originalPosition);\n\tif (!nearestSelectionRange) {\n\t\tconst ancestorObject = originalPosition.getAncestors().reverse().find((item) => schema.isObject(item));\n\t\tif (ancestorObject) return ModelRange._createOn(ancestorObject);\n\t\treturn null;\n\t}\n\tif (!nearestSelectionRange.isCollapsed) return nearestSelectionRange;\n\tconst fixedPosition = nearestSelectionRange.start;\n\tif (originalPosition.isEqual(fixedPosition)) return null;\n\treturn new ModelRange(fixedPosition);\n}\n/**\n* Tries to fix an expanded range.\n*\n* @param range Expanded range to fix.\n* @returns Returns fixed range or null if range is valid.\n*/\nfunction tryFixingNonCollapsedRage(range, schema) {\n\tconst { start, end } = range;\n\tconst isTextAllowedOnStart = schema.checkChild(start, \"$text\");\n\tconst isTextAllowedOnEnd = schema.checkChild(end, \"$text\");\n\tconst startLimitElement = schema.getLimitElement(start);\n\tconst endLimitElement = schema.getLimitElement(end);\n\tif (startLimitElement === endLimitElement) {\n\t\tif (isTextAllowedOnStart && isTextAllowedOnEnd) return null;\n\t\tif (checkSelectionOnNonLimitElements(start, end, schema)) {\n\t\t\tconst fixedStart = start.nodeAfter && schema.isSelectable(start.nodeAfter) ? null : schema.getNearestSelectionRange(start, \"forward\");\n\t\t\tconst fixedEnd = end.nodeBefore && schema.isSelectable(end.nodeBefore) ? null : schema.getNearestSelectionRange(end, \"backward\");\n\t\t\tconst rangeStart = fixedStart ? fixedStart.start : start;\n\t\t\tconst rangeEnd = fixedEnd ? fixedEnd.end : end;\n\t\t\treturn new ModelRange(rangeStart, rangeEnd);\n\t\t}\n\t}\n\tconst isStartInLimit = startLimitElement && !startLimitElement.is(\"rootElement\");\n\tconst isEndInLimit = endLimitElement && !endLimitElement.is(\"rootElement\");\n\tif (isStartInLimit || isEndInLimit) {\n\t\tconst bothInSameParent = start.nodeAfter && end.nodeBefore && start.nodeAfter.parent === end.nodeBefore.parent;\n\t\tconst expandStart = isStartInLimit && (!bothInSameParent || !isSelectable(start.nodeAfter, schema));\n\t\tconst expandEnd = isEndInLimit && (!bothInSameParent || !isSelectable(end.nodeBefore, schema));\n\t\tlet fixedStart = start;\n\t\tlet fixedEnd = end;\n\t\tif (expandStart) fixedStart = ModelPosition._createBefore(findOutermostLimitAncestor(startLimitElement, schema));\n\t\tif (expandEnd) fixedEnd = ModelPosition._createAfter(findOutermostLimitAncestor(endLimitElement, schema));\n\t\treturn new ModelRange(fixedStart, fixedEnd);\n\t}\n\treturn null;\n}\n/**\n* Finds the outer-most ancestor.\n*/\nfunction findOutermostLimitAncestor(startingNode, schema) {\n\tlet isLimitNode = startingNode;\n\tlet parent = isLimitNode;\n\twhile (schema.isLimit(parent) && parent.parent) {\n\t\tisLimitNode = parent;\n\t\tparent = parent.parent;\n\t}\n\treturn isLimitNode;\n}\n/**\n* Checks whether any of range boundaries is placed around non-limit elements.\n*/\nfunction checkSelectionOnNonLimitElements(start, end, schema) {\n\tconst startIsOnBlock = start.nodeAfter && !schema.isLimit(start.nodeAfter) || schema.checkChild(start, \"$text\");\n\tconst endIsOnBlock = end.nodeBefore && !schema.isLimit(end.nodeBefore) || schema.checkChild(end, \"$text\");\n\treturn startIsOnBlock || endIsOnBlock;\n}\n/**\n* Returns a minimal non-intersecting array of ranges without duplicates.\n*\n* @param ranges Ranges to merge.\n* @returns Array of unique and non-intersecting ranges.\n* @internal\n*/\nfunction mergeIntersectingRanges(ranges) {\n\tconst rangesToMerge = [...ranges];\n\tconst rangeIndexesToRemove = /* @__PURE__ */ new Set();\n\tlet currentRangeIndex = 1;\n\twhile (currentRangeIndex < rangesToMerge.length) {\n\t\tconst currentRange = rangesToMerge[currentRangeIndex];\n\t\tconst previousRanges = rangesToMerge.slice(0, currentRangeIndex);\n\t\tfor (const [previousRangeIndex, previousRange] of previousRanges.entries()) {\n\t\t\tif (rangeIndexesToRemove.has(previousRangeIndex)) continue;\n\t\t\tif (currentRange.isEqual(previousRange)) rangeIndexesToRemove.add(previousRangeIndex);\n\t\t\telse if (currentRange.isIntersecting(previousRange)) {\n\t\t\t\trangeIndexesToRemove.add(previousRangeIndex);\n\t\t\t\trangeIndexesToRemove.add(currentRangeIndex);\n\t\t\t\tconst mergedRange = currentRange.getJoined(previousRange);\n\t\t\t\trangesToMerge.push(mergedRange);\n\t\t\t}\n\t\t}\n\t\tcurrentRangeIndex++;\n\t}\n\treturn rangesToMerge.filter((_, index) => !rangeIndexesToRemove.has(index));\n}\n/**\n* Checks if node exists and if it's a selectable.\n*/\nfunction isSelectable(node, schema) {\n\treturn node && schema.isSelectable(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 engine/model/utils/deletecontent\n*/\n/**\n* Deletes content of the selection and merge siblings. The resulting selection is always collapsed.\n*\n* **Note:** Use {@link module:engine/model/model~Model#deleteContent} instead of this function.\n* This function is only exposed to be reusable in algorithms\n* which change the {@link module:engine/model/model~Model#deleteContent}\n* method's behavior.\n*\n* @param model The model in context of which the insertion should be performed.\n* @param selection Selection of which the content should be deleted.\n* @param options.leaveUnmerged Whether to merge elements after removing the content of the selection.\n*\n* For example `<heading>x[x</heading><paragraph>y]y</paragraph>` will become:\n*\n* * `<heading>x^y</heading>` with the option disabled (`leaveUnmerged == false`)\n* * `<heading>x^</heading><paragraph>y</paragraph>` with enabled (`leaveUnmerged == true`).\n*\n* Note: {@link module:engine/model/schema~ModelSchema#isObject object} and {@link module:engine/model/schema~ModelSchema#isLimit limit}\n* elements will not be merged.\n*\n* @param options.doNotResetEntireContent Whether to skip replacing the entire content with a\n* paragraph when the entire content was selected.\n*\n* For example `<heading>[x</heading><paragraph>y]</paragraph>` will become:\n*\n* * `<paragraph>^</paragraph>` with the option disabled (`doNotResetEntireContent == false`)\n* * `<heading>^</heading>` with enabled (`doNotResetEntireContent == true`).\n*\n* @param options.doNotAutoparagraph Whether to create a paragraph if after content deletion selection is moved\n* to a place where text cannot be inserted.\n*\n* For example `<paragraph>x</paragraph>[<imageBlock src=\"foo.jpg\"></imageBlock>]` will become:\n*\n* * `<paragraph>x</paragraph><paragraph>[]</paragraph>` with the option disabled (`doNotAutoparagraph == false`)\n* * `<paragraph>x</paragraph>[]` with the option enabled (`doNotAutoparagraph == true`).\n*\n* If you use this option you need to make sure to handle invalid selections yourself or leave\n* them to the selection post-fixer (may not always work).\n*\n* **Note:** If there is no valid position for the selection, the paragraph will always be created:\n*\n* `[<imageBlock src=\"foo.jpg\"></imageBlock>]` -> `<paragraph>[]</paragraph>`.\n*\n* @param options.doNotFixSelection Whether given selection-to-remove should be fixed if it ends at the beginning of an element.\n*\n* By default, `deleteContent()` will fix selection before performing a deletion, so that the selection does not end at the beginning of\n* an element. For example, selection `<heading>[Heading</heading><paragraph>]Some text.</paragraph>` will be treated as it was\n* `<heading>[Heading]</heading><paragraph>Some text.</paragraph>`. As a result, the elements will not get merged.\n*\n* If selection is as in example, visually, the next element (paragraph) is not selected and it may be confusing for the user that\n* the elements got merged. Selection is set up like this by browsers when a user triple-clicks on some text.\n*\n* However, in some cases, it is expected to remove content exactly as selected in the selection, without any fixing. In these cases,\n* this flag can be set to `true`, which will prevent fixing the selection.\n*\n* @internal\n*/\nfunction deleteContent(model, selection, options = {}) {\n\tif (selection.isCollapsed) return;\n\tconst selRange = selection.getFirstRange();\n\tif (selRange.root.rootName == \"$graveyard\") return;\n\tconst schema = model.schema;\n\tconst documentSelection = model.document.selection;\n\tconst selectionIsDocumentSelection = isRelatedToDocumentSelection(selection, documentSelection, selRange);\n\tconst selectionAttributes = Array.from(documentSelection.getAttributes());\n\tconst selectionParentWasEmpty = !!documentSelection.getFirstRange()?.start.parent.isEmpty;\n\tmodel.change((writer) => {\n\t\tif (!options.doNotResetEntireContent && shouldEntireContentBeReplacedWithParagraph(schema, selection)) {\n\t\t\treplaceEntireContentWithParagraph(writer, selection);\n\t\t\treturn;\n\t\t}\n\t\tconst attributesForAutoparagraph = {};\n\t\tif (!options.doNotAutoparagraph) {\n\t\t\tconst selectedElement = selection.getSelectedElement();\n\t\t\tif (selectedElement) Object.assign(attributesForAutoparagraph, schema.getAttributesWithProperty(selectedElement, \"copyOnReplace\", true));\n\t\t}\n\t\tlet startPosition, endPosition;\n\t\tif (selRange.root instanceof ModelDocumentFragment) {\n\t\t\tstartPosition = ModelLivePosition._fromPositionInDocumentFragment(selRange.start, model, \"toPrevious\");\n\t\t\tendPosition = ModelLivePosition._fromPositionInDocumentFragment(selRange.end, model, \"toNext\");\n\t\t} else if (!options.doNotFixSelection) [startPosition, endPosition] = getLivePositionsForSelectedBlocks(selRange);\n\t\telse {\n\t\t\tstartPosition = ModelLivePosition.fromPosition(selRange.start, \"toPrevious\");\n\t\t\tendPosition = ModelLivePosition.fromPosition(selRange.end, \"toNext\");\n\t\t}\n\t\tif (!startPosition.isTouching(endPosition)) writer.remove(writer.createRange(startPosition, endPosition));\n\t\tif (!options.leaveUnmerged) {\n\t\t\tmergeBranches(writer, startPosition, endPosition);\n\t\t\tschema.removeDisallowedAttributes(startPosition.parent.getChildren(), writer);\n\t\t}\n\t\tcollapseSelectionAt(writer, selection, startPosition);\n\t\tif (!options.doNotAutoparagraph && shouldAutoparagraph(schema, startPosition)) insertParagraph(writer, startPosition, selection, attributesForAutoparagraph);\n\t\tif (selectionIsDocumentSelection) restoreSelectionAttributesOnEmptyParent(writer, selectionAttributes, selectionParentWasEmpty);\n\t\tstartPosition.detach();\n\t\tendPosition.detach();\n\t});\n}\n/**\n* Returns the live positions for the range adjusted to span only blocks selected from the user perspective. Example:\n*\n* ```\n* <heading1>[foo</heading1>\n* <paragraph>bar</paragraph>\n* <heading1>]abc</heading1>  <-- this block is not considered as selected\n* ```\n*\n* This is the same behavior as in Selection#getSelectedBlocks() \"special case\".\n*/\nfunction getLivePositionsForSelectedBlocks(range) {\n\tconst model = range.root.document.model;\n\tconst startPosition = range.start;\n\tlet endPosition = range.end;\n\tif (model.hasContent(range, { ignoreMarkers: true })) {\n\t\tconst endBlock = getParentBlock(endPosition);\n\t\tif (endBlock && endPosition.isTouching(model.createPositionAt(endBlock, 0))) {\n\t\t\tconst selection = model.createSelection(range);\n\t\t\tmodel.modifySelection(selection, { direction: \"backward\" });\n\t\t\tconst newEndPosition = selection.getLastPosition();\n\t\t\tconst skippedRange = model.createRange(newEndPosition, endPosition);\n\t\t\tif (!model.hasContent(skippedRange, { ignoreMarkers: true })) endPosition = newEndPosition;\n\t\t}\n\t}\n\treturn [ModelLivePosition.fromPosition(startPosition, \"toPrevious\"), ModelLivePosition.fromPosition(endPosition, \"toNext\")];\n}\n/**\n* Finds the lowest element in position's ancestors which is a block.\n* Returns null if a limit element is encountered before reaching a block element.\n*/\nfunction getParentBlock(position) {\n\tconst element = position.parent;\n\tconst schema = element.root.document.model.schema;\n\tconst ancestors = element.getAncestors({\n\t\tparentFirst: true,\n\t\tincludeSelf: true\n\t});\n\tfor (const element of ancestors) {\n\t\tif (schema.isLimit(element)) return null;\n\t\tif (schema.isBlock(element)) return element;\n\t}\n}\n/**\n* This function is a result of reaching the Ballmer's peak for just the right amount of time.\n* Even I had troubles documenting it after a while and after reading it again I couldn't believe that it really works.\n*/\nfunction mergeBranches(writer, startPosition, endPosition) {\n\tconst model = writer.model;\n\tif (!checkShouldMerge(writer.model.schema, startPosition, endPosition)) return;\n\tconst [startAncestor, endAncestor] = getAncestorsJustBelowCommonAncestor(startPosition, endPosition);\n\tif (!startAncestor || !endAncestor) return;\n\tif (!model.hasContent(startAncestor, { ignoreMarkers: true }) && model.hasContent(endAncestor, { ignoreMarkers: true })) mergeBranchesRight(writer, startPosition, endPosition, startAncestor.parent);\n\telse mergeBranchesLeft(writer, startPosition, endPosition, startAncestor.parent);\n}\n/**\n* Merging blocks to the left (properties of the left block are preserved).\n* Simple example:\n*\n* ```\n* <heading1>foo[</heading1>    ->  <heading1>foo[bar</heading1>]\n* <paragraph>]bar</paragraph>  ->              --^\n* ```\n*\n* Nested example:\n*\n* ```\n* <blockQuote>                     ->  <blockQuote>\n*     <heading1>foo[</heading1>    ->      <heading1>foo[bar</heading1>\n* </blockQuote>                    ->  </blockQuote>]    ^\n* <blockBlock>                     ->                    |\n*     <paragraph>]bar</paragraph>  ->                 ---\n* </blockBlock>                    ->\n* ```\n*/\nfunction mergeBranchesLeft(writer, startPosition, endPosition, commonAncestor) {\n\tconst startElement = startPosition.parent;\n\tconst endElement = endPosition.parent;\n\tif (startElement == commonAncestor || endElement == commonAncestor) return;\n\tstartPosition = writer.createPositionAfter(startElement);\n\tendPosition = writer.createPositionBefore(endElement);\n\tif (!endPosition.isEqual(startPosition)) writer.insert(endElement, startPosition);\n\twriter.merge(startPosition);\n\twhile (endPosition.parent.isEmpty) {\n\t\tconst parentToRemove = endPosition.parent;\n\t\tendPosition = writer.createPositionBefore(parentToRemove);\n\t\twriter.remove(parentToRemove);\n\t}\n\tif (!checkShouldMerge(writer.model.schema, startPosition, endPosition)) return;\n\tmergeBranchesLeft(writer, startPosition, endPosition, commonAncestor);\n}\n/**\n* Merging blocks to the right (properties of the right block are preserved).\n* Simple example:\n*\n* ```\n* <heading1>foo[</heading1>    ->            --v\n* <paragraph>]bar</paragraph>  ->  [<paragraph>foo]bar</paragraph>\n* ```\n*\n* Nested example:\n*\n* ```\n* <blockQuote>                     ->\n*     <heading1>foo[</heading1>    ->              ---\n* </blockQuote>                    ->                 |\n* <blockBlock>                     ->  [<blockBlock>  v\n*     <paragraph>]bar</paragraph>  ->      <paragraph>foo]bar</paragraph>\n* </blockBlock>                    ->  </blockBlock>\n* ```\n*/\nfunction mergeBranchesRight(writer, startPosition, endPosition, commonAncestor) {\n\tconst startElement = startPosition.parent;\n\tconst endElement = endPosition.parent;\n\tif (startElement == commonAncestor || endElement == commonAncestor) return;\n\tstartPosition = writer.createPositionAfter(startElement);\n\tendPosition = writer.createPositionBefore(endElement);\n\tif (!endPosition.isEqual(startPosition)) writer.insert(startElement, endPosition);\n\twhile (startPosition.parent.isEmpty) {\n\t\tconst parentToRemove = startPosition.parent;\n\t\tstartPosition = writer.createPositionBefore(parentToRemove);\n\t\twriter.remove(parentToRemove);\n\t}\n\tendPosition = writer.createPositionBefore(endElement);\n\tmergeRight(writer, endPosition);\n\tif (!checkShouldMerge(writer.model.schema, startPosition, endPosition)) return;\n\tmergeBranchesRight(writer, startPosition, endPosition, commonAncestor);\n}\n/**\n* There is no right merge operation so we need to simulate it.\n*/\nfunction mergeRight(writer, position) {\n\tconst startElement = position.nodeBefore;\n\tconst endElement = position.nodeAfter;\n\tif (startElement.name != endElement.name) writer.rename(startElement, endElement.name);\n\twriter.clearAttributes(startElement);\n\twriter.setAttributes(Object.fromEntries(endElement.getAttributes()), startElement);\n\twriter.merge(position);\n}\n/**\n* Verifies if merging is needed and possible. It's not needed if both positions are in the same element\n* and it's not possible if some element is a limit or the range crosses a limit element.\n*/\nfunction checkShouldMerge(schema, startPosition, endPosition) {\n\tconst startElement = startPosition.parent;\n\tconst endElement = endPosition.parent;\n\tif (startElement == endElement) return false;\n\tif (schema.isLimit(startElement) || schema.isLimit(endElement)) return false;\n\treturn isCrossingLimitElement(startPosition, endPosition, schema);\n}\n/**\n* Returns the elements that are the ancestors of the provided positions that are direct children of the common ancestor.\n*/\nfunction getAncestorsJustBelowCommonAncestor(positionA, positionB) {\n\tconst ancestorsA = positionA.getAncestors();\n\tconst ancestorsB = positionB.getAncestors();\n\tlet i = 0;\n\twhile (ancestorsA[i] && ancestorsA[i] == ancestorsB[i]) i++;\n\treturn [ancestorsA[i], ancestorsB[i]];\n}\nfunction shouldAutoparagraph(schema, position) {\n\tconst isTextAllowed = schema.checkChild(position, \"$text\");\n\tconst isParagraphAllowed = schema.checkChild(position, \"paragraph\");\n\treturn !isTextAllowed && isParagraphAllowed;\n}\n/**\n* Check if parents of two positions can be merged by checking if there are no limit/object\n* boundaries between those two positions.\n*\n* E.g. in <bQ><p>x[]</p></bQ><widget><caption>{}</caption></widget>\n* we'll check <p>, <bQ>, <widget> and <caption>.\n* Usually, widget and caption are marked as objects/limits in the schema, so in this case merging will be blocked.\n*/\nfunction isCrossingLimitElement(leftPos, rightPos, schema) {\n\tconst rangeToCheck = new ModelRange(leftPos, rightPos);\n\tfor (const value of rangeToCheck.getWalker()) if (schema.isLimit(value.item)) return false;\n\treturn true;\n}\nfunction insertParagraph(writer, position, selection, attributes = {}) {\n\tconst paragraph = writer.createElement(\"paragraph\");\n\twriter.model.schema.setAllowedAttributes(paragraph, attributes, writer);\n\twriter.insert(paragraph, position);\n\tcollapseSelectionAt(writer, selection, writer.createPositionAt(paragraph, 0));\n}\nfunction replaceEntireContentWithParagraph(writer, selection) {\n\tconst limitElement = writer.model.schema.getLimitElement(selection);\n\twriter.remove(writer.createRangeIn(limitElement));\n\tinsertParagraph(writer, writer.createPositionAt(limitElement, 0), selection);\n}\n/**\n* We want to replace the entire content with a paragraph when:\n* * the entire content is selected,\n* * selection contains at least two elements,\n* * whether the paragraph is allowed in schema in the common ancestor.\n*/\nfunction shouldEntireContentBeReplacedWithParagraph(schema, selection) {\n\tconst limitElement = schema.getLimitElement(selection);\n\tif (!selection.containsEntireContent(limitElement)) return false;\n\tconst range = selection.getFirstRange();\n\tif (range.start.parent == range.end.parent) return false;\n\treturn schema.checkChild(limitElement, \"paragraph\");\n}\n/**\n* Helper function that sets the selection. Depending whether given `selection` is a document selection or not,\n* uses a different method to set it.\n*/\nfunction collapseSelectionAt(writer, selection, positionOrRange) {\n\tif (selection instanceof ModelDocumentSelection) writer.setSelection(positionOrRange);\n\telse selection.setTo(positionOrRange);\n}\n/**\n* Restores the document selection attributes after a deletion that leaves the selection in an empty parent block.\n* This preserves the pre-delete formatting (e.g. bold, italic) so that subsequent typing continues in the same style.\n*\n* Attributes are only restored when:\n* - There were attributes on the selection before the deletion.\n* - The deletion left the document selection's parent block empty.\n* - The parent block was **not** already empty before the deletion — this ensures that attributes are not\n*   re-applied when `deleteContent()` was called on a completely unrelated block.\n*/\nfunction restoreSelectionAttributesOnEmptyParent(writer, selectionAttributes, selectionParentWasEmpty) {\n\tif (!selectionAttributes.length) return;\n\tconst documentSelection = writer.model.document.selection;\n\tif (!documentSelection.anchor.parent.isEmpty) return;\n\tif (selectionParentWasEmpty) return;\n\tfor (const [key, value] of selectionAttributes) if (writer.model.schema.getAttributeProperties(key).isFormatting && writer.model.schema.checkAttributeInSelection(documentSelection, key)) writer.setSelectionAttribute(key, value);\n}\n/**\n* Checks whether the provided selection is related to the document selection.\n*\n* Returns `true` when:\n* - the selection is a `DocumentSelection` instance, or\n* - the document selection is collapsed and sits at the start or end of the given range, or\n* - the document selection is not collapsed and its range intersects the given range.\n*/\nfunction isRelatedToDocumentSelection(selection, documentSelection, selRange) {\n\tif (selection instanceof ModelDocumentSelection) return true;\n\tif (documentSelection.isCollapsed) {\n\t\tconst position = documentSelection.getFirstPosition();\n\t\treturn position.isEqual(selRange.start) || position.isEqual(selRange.end);\n\t}\n\treturn !!documentSelection.getFirstRange()?.isIntersecting(selRange);\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* Gets a clone of the selected content.\n*\n* For example, for the following selection:\n*\n* ```html\n* <p>x</p><quote><p>y</p><h>fir[st</h></quote><p>se]cond</p><p>z</p>\n* ```\n*\n* It will return a document fragment with such a content:\n*\n* ```html\n* <quote><h>st</h></quote><p>se</p>\n* ```\n*\n* @param model The model in context of which the selection modification should be performed.\n* @param selection The selection of which content will be returned.\n* @internal\n*/\nfunction getSelectedContent(model, selection) {\n\treturn model.change((writer) => {\n\t\tconst frag = writer.createDocumentFragment();\n\t\tconst range = selection.getFirstRange();\n\t\tif (!range || range.isCollapsed) return frag;\n\t\tconst root = range.start.root;\n\t\tconst commonPath = range.start.getCommonPath(range.end);\n\t\tconst commonParent = root.getNodeByPath(commonPath);\n\t\tlet flatSubtreeRange;\n\t\tif (range.start.parent == range.end.parent) flatSubtreeRange = range;\n\t\telse flatSubtreeRange = writer.createRange(writer.createPositionAt(commonParent, range.start.path[commonPath.length]), writer.createPositionAt(commonParent, range.end.path[commonPath.length] + 1));\n\t\tconst howMany = flatSubtreeRange.end.offset - flatSubtreeRange.start.offset;\n\t\tfor (const item of flatSubtreeRange.getItems({ shallow: true })) if (item.is(\"$textProxy\")) writer.appendText(item.data, item.getAttributes(), frag);\n\t\telse writer.append(writer.cloneElement(item, true), frag);\n\t\tif (flatSubtreeRange != range) {\n\t\t\tconst newRange = range._getTransformedByMove(flatSubtreeRange.start, writer.createPositionAt(frag, 0), howMany)[0];\n\t\t\tconst leftExcessRange = writer.createRange(writer.createPositionAt(frag, 0), newRange.start);\n\t\t\tremoveRangeContent(writer.createRange(newRange.end, writer.createPositionAt(frag, \"end\")), writer);\n\t\t\tremoveRangeContent(leftExcessRange, writer);\n\t\t}\n\t\treturn frag;\n\t});\n}\nfunction removeRangeContent(range, writer) {\n\tconst parentsToCheck = [];\n\tArray.from(range.getItems({ direction: \"backward\" })).map((item) => writer.createRangeOn(item)).filter((itemRange) => {\n\t\treturn (itemRange.start.isAfter(range.start) || itemRange.start.isEqual(range.start)) && (itemRange.end.isBefore(range.end) || itemRange.end.isEqual(range.end));\n\t}).forEach((itemRange) => {\n\t\tparentsToCheck.push(itemRange.start.parent);\n\t\twriter.remove(itemRange);\n\t});\n\tparentsToCheck.forEach((parentToCheck) => {\n\t\tlet parent = parentToCheck;\n\t\twhile (parent.parent && parent.isEmpty) {\n\t\t\tconst removeRange = writer.createRangeOn(parent);\n\t\t\tparent = parent.parent;\n\t\t\twriter.remove(removeRange);\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 engine/model/utils/insertcontent\n*/\n/**\n* Inserts content into the editor (specified selection) as one would expect the paste functionality to work.\n*\n* It takes care of removing the selected content, splitting elements (if needed), inserting elements and merging elements appropriately.\n*\n* Some examples:\n*\n* ```html\n* <p>x^</p> + <p>y</p> => <p>x</p><p>y</p> => <p>xy[]</p>\n* <p>x^y</p> + <p>z</p> => <p>x</p>^<p>y</p> + <p>z</p> => <p>x</p><p>z</p><p>y</p> => <p>xz[]y</p>\n* <p>x^y</p> + <img /> => <p>x</p>^<p>y</p> + <img /> => <p>x</p><img /><p>y</p>\n* <p>x</p><p>^</p><p>z</p> + <p>y</p> => <p>x</p><p>y[]</p><p>z</p> (no merging)\n* <p>x</p>[<img />]<p>z</p> + <p>y</p> => <p>x</p>^<p>z</p> + <p>y</p> => <p>x</p><p>y[]</p><p>z</p>\n* ```\n*\n* If an instance of {@link module:engine/model/selection~ModelSelection} is passed as `selectable` it will be modified\n* to the insertion selection (equal to a range to be selected after insertion).\n*\n* If `selectable` is not passed, the content will be inserted using the current selection of the model document.\n*\n* **Note:** Use {@link module:engine/model/model~Model#insertContent} instead of this function.\n* This function is only exposed to be reusable in algorithms which change the {@link module:engine/model/model~Model#insertContent}\n* method's behavior.\n*\n* @param model The model in context of which the insertion should be performed.\n* @param content The content to insert.\n* @param selectable Selection into which the content should be inserted.\n* @returns Range which contains all the performed changes. This is a range that, if removed,\n* would return the model to the state before the insertion. If no changes were preformed by `insertContent`, returns a range collapsed\n* at the insertion position.\n* @internal\n*/\nfunction insertContent(model, content, selectable) {\n\treturn model.change((writer) => {\n\t\tconst selection = selectable ? selectable : model.document.selection;\n\t\tif (!selection.isCollapsed) model.deleteContent(selection, { doNotAutoparagraph: true });\n\t\tconst insertion = new Insertion(model, writer, selection.anchor);\n\t\tconst fakeMarkerElements = [];\n\t\tlet nodesToInsert;\n\t\tif (content.is(\"documentFragment\")) {\n\t\t\tif (content.markers.size) {\n\t\t\t\tconst markersPosition = [];\n\t\t\t\tfor (const [name, range] of content.markers) {\n\t\t\t\t\tconst { start, end } = range;\n\t\t\t\t\tconst isCollapsed = start.isEqual(end);\n\t\t\t\t\tmarkersPosition.push({\n\t\t\t\t\t\tposition: start,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tisCollapsed\n\t\t\t\t\t}, {\n\t\t\t\t\t\tposition: end,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tisCollapsed\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tmarkersPosition.sort(({ position: posA }, { position: posB }) => posA.isBefore(posB) ? 1 : -1);\n\t\t\t\tfor (const { position, name, isCollapsed } of markersPosition) {\n\t\t\t\t\tlet fakeElement = null;\n\t\t\t\t\tlet collapsed = null;\n\t\t\t\t\tconst isAtBeginning = position.parent === content && position.isAtStart;\n\t\t\t\t\tconst isAtEnd = position.parent === content && position.isAtEnd;\n\t\t\t\t\tif (!isAtBeginning && !isAtEnd) {\n\t\t\t\t\t\tfakeElement = writer.createElement(\"$marker\");\n\t\t\t\t\t\twriter.insert(fakeElement, position);\n\t\t\t\t\t} else if (isCollapsed) collapsed = isAtBeginning ? \"start\" : \"end\";\n\t\t\t\t\tfakeMarkerElements.push({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\telement: fakeElement,\n\t\t\t\t\t\tcollapsed\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tnodesToInsert = content.getChildren();\n\t\t} else nodesToInsert = [content];\n\t\tinsertion.handleNodes(nodesToInsert);\n\t\tlet newRange = insertion.getSelectionRange();\n\t\tif (content.is(\"documentFragment\") && fakeMarkerElements.length) {\n\t\t\tconst selectionLiveRange = newRange ? ModelLiveRange.fromRange(newRange) : null;\n\t\t\tconst markersData = {};\n\t\t\tfor (let i = fakeMarkerElements.length - 1; i >= 0; i--) {\n\t\t\t\tconst { name, element, collapsed } = fakeMarkerElements[i];\n\t\t\t\tconst isStartBoundary = !markersData[name];\n\t\t\t\tif (isStartBoundary) markersData[name] = [];\n\t\t\t\tif (element) {\n\t\t\t\t\tconst elementPosition = writer.createPositionAt(element, \"before\");\n\t\t\t\t\tmarkersData[name].push(elementPosition);\n\t\t\t\t\twriter.remove(element);\n\t\t\t\t} else {\n\t\t\t\t\tconst rangeOnInsertion = insertion.getAffectedRange();\n\t\t\t\t\tif (!rangeOnInsertion) {\n\t\t\t\t\t\tif (collapsed) markersData[name].push(insertion.position);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (collapsed) markersData[name].push(rangeOnInsertion[collapsed]);\n\t\t\t\t\telse markersData[name].push(isStartBoundary ? rangeOnInsertion.start : rangeOnInsertion.end);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const [name, [start, end]] of Object.entries(markersData)) if (start && end && start.root === end.root && start.root.document && !writer.model.markers.has(name)) writer.addMarker(name, {\n\t\t\t\tusingOperation: true,\n\t\t\t\taffectsData: true,\n\t\t\t\trange: new ModelRange(start, end)\n\t\t\t});\n\t\t\tif (selectionLiveRange) {\n\t\t\t\tnewRange = selectionLiveRange.toRange();\n\t\t\t\tselectionLiveRange.detach();\n\t\t\t}\n\t\t}\n\t\tif (newRange) {\n\t\t\tif (selection instanceof ModelDocumentSelection) writer.setSelection(newRange);\n\t\t\telse selection.setTo(newRange);\n\t\t}\n\t\tconst affectedRange = insertion.getAffectedRange() || model.createRange(selection.anchor);\n\t\tinsertion.destroy();\n\t\treturn affectedRange;\n\t});\n}\n/**\n* Utility class for performing content insertion.\n*/\nvar Insertion = class {\n\t/**\n\t* The model in context of which the insertion should be performed.\n\t*/\n\tmodel;\n\t/**\n\t* Batch to which operations will be added.\n\t*/\n\twriter;\n\t/**\n\t* The position at which (or near which) the next node will be inserted.\n\t*/\n\tposition;\n\t/**\n\t* Elements with which the inserted elements can be merged.\n\t*\n\t* ```html\n\t* <p>x^</p><p>y</p> + <p>z</p> (can merge to <p>x</p>)\n\t* <p>x</p><p>^y</p> + <p>z</p> (can merge to <p>y</p>)\n\t* <p>x^y</p> + <p>z</p> (can merge to <p>xy</p> which will be split during the action,\n\t* \t\t\t\t\t\tso both its pieces will be added to this set)\n\t* ```\n\t*/\n\tcanMergeWith;\n\t/**\n\t* Schema of the model.\n\t*/\n\tschema;\n\t/**\n\t* The temporary ModelDocumentFragment used for grouping multiple nodes for single insert operation.\n\t*/\n\t_documentFragment;\n\t/**\n\t* The current position in the temporary ModelDocumentFragment.\n\t*/\n\t_documentFragmentPosition;\n\t/**\n\t* The reference to the first inserted node.\n\t*/\n\t_firstNode = null;\n\t/**\n\t* The reference to the last inserted node.\n\t*/\n\t_lastNode = null;\n\t/**\n\t* The reference to the last auto paragraph node.\n\t*/\n\t_lastAutoParagraph = null;\n\t/**\n\t* The array of nodes that should be cleaned of not allowed attributes and sub-nodes.\n\t*/\n\t_filterAttributesAndChildrenOf = [];\n\t/**\n\t* Beginning of the affected range. See {@link module:engine/model/utils/insertcontent~Insertion#getAffectedRange}.\n\t*/\n\t_affectedStart = null;\n\t/**\n\t* End of the affected range. See {@link module:engine/model/utils/insertcontent~Insertion#getAffectedRange}.\n\t*/\n\t_affectedEnd = null;\n\t_nodeToSelect = null;\n\tconstructor(model, writer, position) {\n\t\tthis.model = model;\n\t\tthis.writer = writer;\n\t\tthis.position = position;\n\t\tthis.canMergeWith = /* @__PURE__ */ new Set([this.position.parent]);\n\t\tthis.schema = model.schema;\n\t\tthis._documentFragment = writer.createDocumentFragment();\n\t\tthis._documentFragmentPosition = writer.createPositionAt(this._documentFragment, 0);\n\t}\n\t/**\n\t* Handles insertion of a set of nodes.\n\t*\n\t* @param nodes Nodes to insert.\n\t*/\n\thandleNodes(nodes) {\n\t\tfor (const node of Array.from(nodes)) if (node.offsetSize > 0) this._handleNode(node);\n\t\tthis._insertPartialFragment();\n\t\tif (this._lastAutoParagraph) this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph);\n\t\tthis._mergeOnRight();\n\t\tthis.schema.removeDisallowedAttributes(this._filterAttributesAndChildrenOf, this.writer);\n\t\tif (this.model._config?.get(\"experimentalFlags.modelInsertContentDeepSchemaVerification\") !== false) this._removeDisallowedChildren(this._filterAttributesAndChildrenOf);\n\t\tthis._filterAttributesAndChildrenOf = [];\n\t}\n\t/**\n\t* Removes disallowed children from nodes that were inserted or modified during insertion.\n\t*/\n\t_removeDisallowedChildren(nodes) {\n\t\tconst nodesArray = Array.from(nodes);\n\t\tfor (const node of nodesArray) {\n\t\t\tif (!node.is(\"element\")) continue;\n\t\t\tconst remove = [];\n\t\t\tconst unwrap = [];\n\t\t\tconst walker = this.writer.createRangeIn(node).getWalker({ ignoreElementEnd: true });\n\t\t\tfor (const { item } of walker) {\n\t\t\t\tconst itemParent = item.parent;\n\t\t\t\tif (!this.schema.checkChild(itemParent, item)) {\n\t\t\t\t\tif (item.is(\"element\") && !this.schema.isObject(item)) {\n\t\t\t\t\t\tunwrap.push(item);\n\t\t\t\t\t\tnodesArray.push(itemParent);\n\t\t\t\t\t} else remove.push(item);\n\t\t\t\t\twalker.jumpTo(this.writer.createPositionAfter(item));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const item of unwrap) this.writer.unwrap(item);\n\t\t\tfor (const item of remove) this.writer.remove(item);\n\t\t}\n\t}\n\t/**\n\t* Updates the last node after the auto paragraphing.\n\t*\n\t* @param node The last auto paragraphing node.\n\t*/\n\t_updateLastNodeFromAutoParagraph(node) {\n\t\tconst positionAfterLastNode = this.writer.createPositionAfter(this._lastNode);\n\t\tconst positionAfterNode = this.writer.createPositionAfter(node);\n\t\tif (positionAfterNode.isAfter(positionAfterLastNode)) {\n\t\t\tthis._lastNode = node;\n\t\t\t/* v8 ignore if -- @preserve */\n\t\t\tif (this.position.parent != node || !this.position.isAtEnd) throw new CKEditorError(\"insertcontent-invalid-insertion-position\", this);\n\t\t\tthis.position = positionAfterNode;\n\t\t\tthis._setAffectedBoundaries(this.position);\n\t\t}\n\t}\n\t/**\n\t* Returns range to be selected after insertion.\n\t* Returns `null` if there is no valid range to select after insertion.\n\t*/\n\tgetSelectionRange() {\n\t\tif (this._nodeToSelect) return ModelRange._createOn(this._nodeToSelect);\n\t\treturn this.model.schema.getNearestSelectionRange(this.position);\n\t}\n\t/**\n\t* Returns a range which contains all the performed changes. This is a range that, if removed, would return the model to the state\n\t* before the insertion. Returns `null` if no changes were done.\n\t*/\n\tgetAffectedRange() {\n\t\tif (!this._affectedStart) return null;\n\t\treturn new ModelRange(this._affectedStart, this._affectedEnd);\n\t}\n\t/**\n\t* Destroys `Insertion` instance.\n\t*/\n\tdestroy() {\n\t\tif (this._affectedStart) this._affectedStart.detach();\n\t\tif (this._affectedEnd) this._affectedEnd.detach();\n\t}\n\t/**\n\t* Handles insertion of a single node.\n\t*/\n\t_handleNode(node) {\n\t\tif (!this._checkAndSplitToAllowedPosition(node)) {\n\t\t\tif (!this.schema.isObject(node)) this._handleDisallowedNode(node);\n\t\t\treturn;\n\t\t}\n\t\tnode = this._appendToFragment(node);\n\t\tif (!this._firstNode) this._firstNode = node;\n\t\tthis._lastNode = node;\n\t}\n\t/**\n\t* Inserts the temporary ModelDocumentFragment into the model.\n\t*/\n\t_insertPartialFragment() {\n\t\tif (this._documentFragment.isEmpty) return;\n\t\tconst livePosition = ModelLivePosition.fromPosition(this.position, \"toNext\");\n\t\tthis._setAffectedBoundaries(this.position);\n\t\tif (this._documentFragment.getChild(0) == this._firstNode) {\n\t\t\tthis.writer.insert(this._firstNode, this.position);\n\t\t\tthis._mergeOnLeft();\n\t\t\tthis.position = livePosition.toPosition();\n\t\t}\n\t\tif (!this._documentFragment.isEmpty) this.writer.insert(this._documentFragment, this.position);\n\t\tthis._documentFragmentPosition = this.writer.createPositionAt(this._documentFragment, 0);\n\t\tthis.position = livePosition.toPosition();\n\t\tlivePosition.detach();\n\t}\n\t/**\n\t* @param node The disallowed node which needs to be handled.\n\t*/\n\t_handleDisallowedNode(node) {\n\t\tif (node.is(\"element\")) this.handleNodes(node.getChildren());\n\t}\n\t/**\n\t* Append a node to the temporary ModelDocumentFragment.\n\t*\n\t* @param node The node to insert.\n\t*/\n\t_appendToFragment(node) {\n\t\t/* v8 ignore if -- @preserve */\n\t\tif (!this.schema.checkChild(this.position, node))\n /**\n\t\t* Given node cannot be inserted on the given position.\n\t\t*\n\t\t* @error insertcontent-wrong-position\n\t\t* @param {module:engine/model/node~ModelNode} node Node to insert.\n\t\t* @param {module:engine/model/position~ModelPosition} position Position to insert the node at.\n\t\t*/\n\t\tthrow new CKEditorError(\"insertcontent-wrong-position\", this, {\n\t\t\tnode,\n\t\t\tposition: this.position\n\t\t});\n\t\tthis.writer.insert(node, this._documentFragmentPosition);\n\t\tthis._documentFragmentPosition = this._documentFragmentPosition.getShiftedBy(node.offsetSize);\n\t\tif (!node.parent) node = this._documentFragmentPosition.nodeBefore;\n\t\tif (this.schema.isObject(node) && !this.schema.checkChild(this.position, \"$text\")) this._nodeToSelect = node;\n\t\telse this._nodeToSelect = null;\n\t\tthis._filterAttributesAndChildrenOf.push(node);\n\t\treturn node;\n\t}\n\t/**\n\t* Sets `_affectedStart` and `_affectedEnd` to the given `position`. Should be used before a change is done during insertion process to\n\t* mark the affected range.\n\t*\n\t* This method is used before inserting a node or splitting a parent node. `_affectedStart` and `_affectedEnd` are also changed\n\t* during merging, but the logic there is more complicated so it is left out of this function.\n\t*/\n\t_setAffectedBoundaries(position) {\n\t\tif (!this._affectedStart) this._affectedStart = ModelLivePosition.fromPosition(position, \"toPrevious\");\n\t\tif (!this._affectedEnd || this._affectedEnd.isBefore(position)) {\n\t\t\tif (this._affectedEnd) this._affectedEnd.detach();\n\t\t\tthis._affectedEnd = ModelLivePosition.fromPosition(position, \"toNext\");\n\t\t}\n\t}\n\t/**\n\t* Merges the previous sibling of the first node if it should be merged.\n\t*\n\t* After the content was inserted we may try to merge it with its siblings.\n\t* This should happen only if the selection was in those elements initially.\n\t*/\n\t_mergeOnLeft() {\n\t\tconst node = this._firstNode;\n\t\tif (!(node instanceof ModelElement)) return;\n\t\tif (!this._canMergeLeft(node)) return;\n\t\tconst mergePosLeft = ModelLivePosition._createBefore(node);\n\t\tmergePosLeft.stickiness = \"toNext\";\n\t\tconst livePosition = ModelLivePosition.fromPosition(this.position, \"toNext\");\n\t\tif (this._affectedStart.isEqual(mergePosLeft)) {\n\t\t\tthis._affectedStart.detach();\n\t\t\tthis._affectedStart = ModelLivePosition._createAt(mergePosLeft.nodeBefore, \"end\", \"toPrevious\");\n\t\t}\n\t\tif (this._firstNode === this._lastNode) {\n\t\t\tthis._firstNode = mergePosLeft.nodeBefore;\n\t\t\tthis._lastNode = mergePosLeft.nodeBefore;\n\t\t}\n\t\tthis.writer.merge(mergePosLeft);\n\t\tif (mergePosLeft.isEqual(this._affectedEnd) && this._firstNode === this._lastNode) {\n\t\t\tthis._affectedEnd.detach();\n\t\t\tthis._affectedEnd = ModelLivePosition._createAt(mergePosLeft.nodeBefore, \"end\", \"toNext\");\n\t\t}\n\t\tthis.position = livePosition.toPosition();\n\t\tlivePosition.detach();\n\t\tthis._filterAttributesAndChildrenOf.push(this.position.parent);\n\t\tmergePosLeft.detach();\n\t}\n\t/**\n\t* Merges the next sibling of the last node if it should be merged.\n\t*\n\t* After the content was inserted we may try to merge it with its siblings.\n\t* This should happen only if the selection was in those elements initially.\n\t*/\n\t_mergeOnRight() {\n\t\tconst node = this._lastNode;\n\t\tif (!(node instanceof ModelElement)) return;\n\t\tif (!this._canMergeRight(node)) return;\n\t\tconst mergePosRight = ModelLivePosition._createAfter(node);\n\t\tmergePosRight.stickiness = \"toNext\";\n\t\t/* v8 ignore if -- @preserve */\n\t\tif (!this.position.isEqual(mergePosRight))\n /**\n\t\t* An internal error occurred when merging inserted content with its siblings.\n\t\t* The insertion position should equal the merge position.\n\t\t*\n\t\t* If you encountered this error, report it back to the CKEditor 5 team\n\t\t* with as many details as possible regarding the content being inserted and the insertion position.\n\t\t*\n\t\t* @error insertcontent-invalid-insertion-position\n\t\t*/\n\t\tthrow new CKEditorError(\"insertcontent-invalid-insertion-position\", this);\n\t\tthis.position = ModelPosition._createAt(mergePosRight.nodeBefore, \"end\");\n\t\tconst livePosition = ModelLivePosition.fromPosition(this.position, \"toPrevious\");\n\t\tif (this._affectedEnd.isEqual(mergePosRight)) {\n\t\t\tthis._affectedEnd.detach();\n\t\t\tthis._affectedEnd = ModelLivePosition._createAt(mergePosRight.nodeBefore, \"end\", \"toNext\");\n\t\t}\n\t\tif (this._firstNode === this._lastNode) {\n\t\t\tthis._firstNode = mergePosRight.nodeBefore;\n\t\t\tthis._lastNode = mergePosRight.nodeBefore;\n\t\t}\n\t\tthis.writer.merge(mergePosRight);\n\t\tif (mergePosRight.getShiftedBy(-1).isEqual(this._affectedStart) && this._firstNode === this._lastNode) {\n\t\t\tthis._affectedStart.detach();\n\t\t\tthis._affectedStart = ModelLivePosition._createAt(mergePosRight.nodeBefore, 0, \"toPrevious\");\n\t\t}\n\t\tthis.position = livePosition.toPosition();\n\t\tlivePosition.detach();\n\t\tthis._filterAttributesAndChildrenOf.push(this.position.parent);\n\t\tmergePosRight.detach();\n\t}\n\t/**\n\t* Checks whether specified node can be merged with previous sibling element.\n\t*\n\t* @param node The node which could potentially be merged.\n\t*/\n\t_canMergeLeft(node) {\n\t\tconst previousSibling = node.previousSibling;\n\t\treturn previousSibling instanceof ModelElement && this.canMergeWith.has(previousSibling) && this.model.schema.checkMerge(previousSibling, node);\n\t}\n\t/**\n\t* Checks whether specified node can be merged with next sibling element.\n\t*\n\t* @param node The node which could potentially be merged.\n\t*/\n\t_canMergeRight(node) {\n\t\tconst nextSibling = node.nextSibling;\n\t\treturn nextSibling instanceof ModelElement && this.canMergeWith.has(nextSibling) && this.model.schema.checkMerge(node, nextSibling);\n\t}\n\t/**\n\t* Inserts a paragraph and moves the insertion position into it.\n\t*/\n\t_insertAutoParagraph() {\n\t\tthis._insertPartialFragment();\n\t\tconst paragraph = this.writer.createElement(\"paragraph\");\n\t\tthis.writer.insert(paragraph, this.position);\n\t\tthis._setAffectedBoundaries(this.position);\n\t\tthis._lastAutoParagraph = paragraph;\n\t\tthis.position = this.writer.createPositionAt(paragraph, 0);\n\t}\n\t/**\n\t* @returns Whether an allowed position was found.\n\t* `false` is returned if the node isn't allowed at any position up in the tree, `true` if was.\n\t*/\n\t_checkAndSplitToAllowedPosition(node) {\n\t\tconst allowedIn = this._getAllowedIn(this.position.parent, node);\n\t\tif (!allowedIn) return false;\n\t\tif (allowedIn != this.position.parent) this._insertPartialFragment();\n\t\twhile (allowedIn != this.position.parent) if (this.position.isAtStart) {\n\t\t\tconst parent = this.position.parent;\n\t\t\tthis.position = this.writer.createPositionBefore(parent);\n\t\t\tif (parent.isEmpty && parent.parent === allowedIn) this.writer.remove(parent);\n\t\t} else if (this.position.isAtEnd) this.position = this.writer.createPositionAfter(this.position.parent);\n\t\telse {\n\t\t\tconst tempPos = this.writer.createPositionAfter(this.position.parent);\n\t\t\tthis._setAffectedBoundaries(this.position);\n\t\t\tthis.writer.split(this.position);\n\t\t\tthis.position = tempPos;\n\t\t\tthis.canMergeWith.add(this.position.nodeAfter);\n\t\t}\n\t\tif (!this.schema.checkChild(this.position.parent, node)) this._insertAutoParagraph();\n\t\treturn true;\n\t}\n\t/**\n\t* Gets the element in which the given node is allowed. It checks the passed element and all its ancestors.\n\t*\n\t* It also verifies if auto-paragraphing could help.\n\t*\n\t* @param contextElement The element in which context the node should be checked.\n\t* @param childNode The node to check.\n\t*/\n\t_getAllowedIn(contextElement, childNode) {\n\t\tconst context = this.schema.createContext(contextElement);\n\t\tif (this.schema.checkChild(context, childNode)) return contextElement;\n\t\tif (this.schema.checkChild(context, \"paragraph\") && this.schema.checkChild(context.push(\"paragraph\"), childNode)) return contextElement;\n\t\tif (this.schema.isLimit(contextElement)) return null;\n\t\treturn this._getAllowedIn(contextElement.parent, childNode);\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* Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.\n*\n* **Note:** Use {@link module:engine/model/model~Model#insertObject} instead of this function.\n* This function is only exposed to be reusable in algorithms which change the {@link module:engine/model/model~Model#insertObject}\n* method's behavior.\n*\n* **Note**: For more documentation and examples, see {@link module:engine/model/model~Model#insertObject}.\n*\n* @param model The model in context of which the insertion should be performed.\n* @param object An object to be inserted into the model document.\n* @param selectable A selectable where the content should be inserted. If not specified, the current\n* {@link module:engine/model/document~ModelDocument#selection document selection} will be used instead.\n* @param options Additional options.\n* @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to\n* `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).\n* * When `'auto'`, the algorithm will decide whether to insert the object before or after `selectable` to avoid content splitting.\n* * When `'before'`, the closest position before `selectable` will be used that will not result in content splitting.\n* * When `'after'`, the closest position after `selectable` will be used that will not result in content splitting.\n*\n* Note that this option works only for block objects. Inline objects are inserted into text and do not split blocks.\n* @param options.setSelection An option that, when set, moves the\n* {@link module:engine/model/document~ModelDocument#selection document selection} after inserting the object.\n* * When `'on'`, the document selection will be set on the inserted object.\n* * When `'after'`, the document selection will move to the closest text node after the inserted object. If there is no\n* such text node, a paragraph will be created and the document selection will be moved inside it.\n* @returns A range which contains all the performed changes. This is a range that, if removed,\n* would return the model to the state before the insertion. If no changes were preformed by `insertObject()`, returns a range collapsed\n* at the insertion position.\n*/\nfunction insertObject(model, object, selectable, options = {}) {\n\tif (!model.schema.isObject(object))\n /**\n\t* Tried to insert an element with {@link module:engine/model/utils/insertobject insertObject()} function\n\t* that is not defined as an object in schema.\n\t* See {@link module:engine/model/schema~ModelSchemaItemDefinition#isObject `SchemaItemDefinition`}.\n\t* If you want to insert content that is not an object you might want to use\n\t* {@link module:engine/model/utils/insertcontent insertContent()} function.\n\t* @error insertobject-element-not-an-object\n\t*/\n\tthrow new CKEditorError(\"insertobject-element-not-an-object\", model, { object });\n\tconst originalSelection = selectable ? selectable : model.document.selection;\n\tlet insertionSelection = originalSelection;\n\tif (options.findOptimalPosition && model.schema.isBlock(object)) insertionSelection = model.createSelection(model.schema.findOptimalInsertionRange(originalSelection, options.findOptimalPosition));\n\tconst firstSelectedBlock = first(originalSelection.getSelectedBlocks());\n\tconst attributesToCopy = {};\n\tif (firstSelectedBlock) Object.assign(attributesToCopy, model.schema.getAttributesWithProperty(firstSelectedBlock, \"copyOnReplace\", true));\n\treturn model.change((writer) => {\n\t\tif (!insertionSelection.isCollapsed) model.deleteContent(insertionSelection, { doNotAutoparagraph: true });\n\t\tlet elementToInsert = object;\n\t\tconst insertionPositionParent = insertionSelection.anchor.parent;\n\t\tconst context = model.schema.createContext(insertionPositionParent);\n\t\tif (!model.schema.checkChild(context, object) && model.schema.checkChild(context, \"paragraph\") && model.schema.checkChild(context.push(\"paragraph\"), object)) {\n\t\t\telementToInsert = writer.createElement(\"paragraph\");\n\t\t\twriter.insert(object, elementToInsert);\n\t\t}\n\t\tmodel.schema.setAllowedAttributes(elementToInsert, attributesToCopy, writer);\n\t\tconst affectedRange = model.insertContent(elementToInsert, insertionSelection);\n\t\tif (affectedRange.isCollapsed) return affectedRange;\n\t\tif (options.setSelection) updateSelection(writer, object, options.setSelection, attributesToCopy);\n\t\treturn affectedRange;\n\t});\n}\n/**\n* Updates document selection based on given `place` parameter in relation to `contextElement` element.\n*\n* @param writer An instance of the model writer.\n* @param contextElement An element to set the attributes on.\n* @param place The place where selection should be set in relation to the `contextElement` element.\n* Value `on` will set selection on the passed `contextElement`. Value `after` will set selection after `contextElement`.\n* @param attributes Attributes keys and values to set on a paragraph that this function can create when\n* `place` parameter is equal to `after` but there is no element with `$text` node to set selection in.\n*/\nfunction updateSelection(writer, contextElement, place, paragraphAttributes) {\n\tconst model = writer.model;\n\tif (place == \"on\") {\n\t\twriter.setSelection(contextElement, \"on\");\n\t\treturn;\n\t}\n\tif (place != \"after\")\n /**\n\t* The unsupported `options.setSelection` parameter was passed\n\t* to the {@link module:engine/model/utils/insertobject insertObject()} function.\n\t* Check the {@link module:engine/model/utils/insertobject insertObject()} API documentation for allowed\n\t* `options.setSelection` parameter values.\n\t*\n\t* @error insertobject-invalid-place-parameter-value\n\t*/\n\tthrow new CKEditorError(\"insertobject-invalid-place-parameter-value\", model);\n\tlet nextElement = contextElement.nextSibling;\n\tif (model.schema.isInline(contextElement)) {\n\t\twriter.setSelection(contextElement, \"after\");\n\t\treturn;\n\t}\n\tif (!(nextElement && model.schema.checkChild(nextElement, \"$text\")) && model.schema.checkChild(contextElement.parent, \"paragraph\")) {\n\t\tnextElement = writer.createElement(\"paragraph\");\n\t\tmodel.schema.setAllowedAttributes(nextElement, paragraphAttributes, writer);\n\t\tmodel.insertContent(nextElement, writer.createPositionAfter(contextElement));\n\t}\n\tif (nextElement) writer.setSelection(nextElement, 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 engine/model/utils/modifyselection\n*/\nconst wordBoundaryCharacters = \" ,.?!:;\\\"-()\";\n/**\n* Modifies the selection. Currently, the supported modifications are:\n*\n* * Extending. The selection focus is moved in the specified `options.direction` with a step specified in `options.unit`.\n* Possible values for `unit` are:\n*  * `'character'` (default) - moves selection by one user-perceived character. In most cases this means moving by one\n*  character in `String` sense. However, unicode also defines \"combing marks\". These are special symbols, that combines\n*  with a symbol before it (\"base character\") to create one user-perceived character. For example, `q̣̇` is a normal\n*  letter `q` with two \"combining marks\": upper dot (`Ux0307`) and lower dot (`Ux0323`). For most actions, i.e. extending\n*  selection by one position, it is correct to include both \"base character\" and all of it's \"combining marks\". That is\n*  why `'character'` value is most natural and common method of modifying selection.\n*  * `'codePoint'` - moves selection by one unicode code point. In contrary to, `'character'` unit, this will insert\n*  selection between \"base character\" and \"combining mark\", because \"combining marks\" have their own unicode code points.\n*  However, for technical reasons, unicode code points with values above `UxFFFF` are represented in native `String` by\n*  two characters, called \"surrogate pairs\". Halves of \"surrogate pairs\" have a meaning only when placed next to each other.\n*  For example `𨭎` is represented in `String` by `\\uD862\\uDF4E`. Both `\\uD862` and `\\uDF4E` do not have any meaning\n*  outside the pair (are rendered as ? when alone). Position between them would be incorrect. In this case, selection\n*  extension will include whole \"surrogate pair\".\n*  * `'word'` - moves selection by a whole word.\n*\n* **Note:** if you extend a forward selection in a backward direction you will in fact shrink it.\n*\n* **Note:** Use {@link module:engine/model/model~Model#modifySelection} instead of this function.\n* This function is only exposed to be reusable in algorithms\n* which change the {@link module:engine/model/model~Model#modifySelection}\n* method's behavior.\n*\n* @param model The model in context of which the selection modification should be performed.\n* @param selection The selection to modify.\n* @param options.direction The direction in which the selection should be modified. Default 'forward'.\n* @param options.unit The unit by which selection should be modified. Default 'character'.\n* @param options.treatEmojiAsSingleUnit Whether multi-characer emoji sequences should be handled as single unit.\n* @internal\n*/\nfunction modifySelection(model, selection, options = {}) {\n\tconst schema = model.schema;\n\tconst isForward = options.direction != \"backward\";\n\tconst unit = options.unit ? options.unit : \"character\";\n\tconst treatEmojiAsSingleUnit = !!options.treatEmojiAsSingleUnit;\n\tconst focus = selection.focus;\n\tconst walker = new ModelTreeWalker({\n\t\tboundaries: getSearchRange(focus, isForward),\n\t\tsingleCharacters: true,\n\t\tdirection: isForward ? \"forward\" : \"backward\"\n\t});\n\tconst data = {\n\t\twalker,\n\t\tschema,\n\t\tisForward,\n\t\tunit,\n\t\ttreatEmojiAsSingleUnit\n\t};\n\tlet next;\n\twhile (next = walker.next()) {\n\t\tif (next.done) return;\n\t\tconst position = tryExtendingTo(data, next.value);\n\t\tif (position) {\n\t\t\tif (selection instanceof ModelDocumentSelection) model.change((writer) => {\n\t\t\t\twriter.setSelectionFocus(position);\n\t\t\t});\n\t\t\telse selection.setFocus(position);\n\t\t\treturn;\n\t\t}\n\t}\n}\n/**\n* Checks whether the selection can be extended to the the walker's next value (next position).\n*/\nfunction tryExtendingTo(data, value) {\n\tconst { isForward, walker, unit, schema, treatEmojiAsSingleUnit } = data;\n\tconst { type, item, nextPosition } = value;\n\tif (type == \"text\") {\n\t\tif (data.unit === \"word\") return getCorrectWordBreakPosition(walker, isForward);\n\t\treturn getCorrectPosition(walker, unit, treatEmojiAsSingleUnit);\n\t}\n\tif (type == (isForward ? \"elementStart\" : \"elementEnd\")) {\n\t\tif (schema.isSelectable(item)) return ModelPosition._createAt(item, isForward ? \"after\" : \"before\");\n\t\tif (schema.checkChild(nextPosition, \"$text\")) return nextPosition;\n\t} else {\n\t\tif (schema.isLimit(item)) {\n\t\t\twalker.skip(() => true);\n\t\t\treturn;\n\t\t}\n\t\tif (schema.checkChild(nextPosition, \"$text\")) return nextPosition;\n\t}\n}\n/**\n* Finds a correct position by walking in a text node and checking whether selection can be extended to given position\n* or should be extended further.\n*/\nfunction getCorrectPosition(walker, unit, treatEmojiAsSingleUnit) {\n\tconst textNode = walker.position.textNode;\n\tif (textNode) {\n\t\tconst data = textNode.data;\n\t\tlet offset = walker.position.offset - textNode.startOffset;\n\t\twhile (isInsideSurrogatePair(data, offset) || unit == \"character\" && isInsideCombinedSymbol(data, offset) || treatEmojiAsSingleUnit && isInsideEmojiSequence(data, offset)) {\n\t\t\twalker.next();\n\t\t\toffset = walker.position.offset - textNode.startOffset;\n\t\t}\n\t}\n\treturn walker.position;\n}\n/**\n* Finds a correct position of a word break by walking in a text node and checking whether selection can be extended to given position\n* or should be extended further.\n*/\nfunction getCorrectWordBreakPosition(walker, isForward) {\n\tlet textNode = walker.position.textNode;\n\tif (!textNode) textNode = isForward ? walker.position.nodeAfter : walker.position.nodeBefore;\n\twhile (textNode && textNode.is(\"$text\")) {\n\t\tconst offset = walker.position.offset - textNode.startOffset;\n\t\tif (isAtNodeBoundary(textNode, offset, isForward)) textNode = isForward ? walker.position.nodeAfter : walker.position.nodeBefore;\n\t\telse if (isAtWordBoundary(textNode.data, offset, isForward)) break;\n\t\telse walker.next();\n\t}\n\treturn walker.position;\n}\nfunction getSearchRange(start, isForward) {\n\tconst root = start.root;\n\tconst searchEnd = ModelPosition._createAt(root, isForward ? \"end\" : 0);\n\tif (isForward) return new ModelRange(start, searchEnd);\n\telse return new ModelRange(searchEnd, start);\n}\n/**\n* Checks if selection is on word boundary.\n*/\nfunction isAtWordBoundary(data, offset, isForward) {\n\tconst offsetToCheck = offset + (isForward ? 0 : -1);\n\treturn wordBoundaryCharacters.includes(data.charAt(offsetToCheck));\n}\n/**\n* Checks if selection is on node boundary.\n*/\nfunction isAtNodeBoundary(textNode, offset, isForward) {\n\treturn offset === (isForward ? textNode.offsetSize : 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 engine/model/model\n*/\nconst ModelBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Editor's data model. Read about the model in the\n* {@glink framework/architecture/editing-engine engine architecture} guide.\n*/\nvar Model = class extends ModelBase {\n\t/**\n\t* Model's marker collection.\n\t*/\n\tmarkers;\n\t/**\n\t* Model's document.\n\t*/\n\tdocument;\n\t/**\n\t* Model's schema.\n\t*/\n\tschema;\n\t/**\n\t* Stores all configurations specific to editor instance.\n\t*\n\t* @internal\n\t*/\n\t_config;\n\t/**\n\t* All callbacks added by {@link module:engine/model/model~Model#change} or\n\t* {@link module:engine/model/model~Model#enqueueChange} methods waiting to be executed.\n\t*/\n\t_pendingChanges;\n\t/**\n\t* The last created and currently used writer instance.\n\t*/\n\t_currentWriter;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.markers = new MarkerCollection();\n\t\tthis.document = new ModelDocument(this);\n\t\tthis.schema = new ModelSchema();\n\t\tthis._config = config;\n\t\tthis._pendingChanges = [];\n\t\tthis._currentWriter = null;\n\t\t[\n\t\t\t\"deleteContent\",\n\t\t\t\"modifySelection\",\n\t\t\t\"getSelectedContent\",\n\t\t\t\"applyOperation\"\n\t\t].forEach((methodName) => this.decorate(methodName));\n\t\tthis.on(\"applyOperation\", (evt, args) => {\n\t\t\targs[0]._validate();\n\t\t}, { priority: \"highest\" });\n\t\tthis.schema.register(\"$root\", { isLimit: true });\n\t\tthis.schema.register(\"$inlineRoot\", {\n\t\t\tallowContentOf: \"$block\",\n\t\t\tallowAttributesOf: \"$root\",\n\t\t\tisLimit: true\n\t\t});\n\t\tthis.schema.register(\"$container\", { allowIn: [\"$root\", \"$container\"] });\n\t\tthis.schema.register(\"$block\", {\n\t\t\tallowIn: [\"$root\", \"$container\"],\n\t\t\tisBlock: true\n\t\t});\n\t\tthis.schema.register(\"$blockObject\", {\n\t\t\tallowWhere: \"$block\",\n\t\t\tisBlock: true,\n\t\t\tisObject: true\n\t\t});\n\t\tthis.schema.register(\"$inlineObject\", {\n\t\t\tallowWhere: \"$text\",\n\t\t\tallowAttributesOf: \"$text\",\n\t\t\tisInline: true,\n\t\t\tisObject: true\n\t\t});\n\t\tthis.schema.register(\"$text\", {\n\t\t\tallowIn: \"$block\",\n\t\t\tisInline: true,\n\t\t\tisContent: true\n\t\t});\n\t\tthis.schema.register(\"$clipboardHolder\", {\n\t\t\tallowContentOf: [\"$root\", \"$inlineRoot\"],\n\t\t\tallowChildren: \"$text\",\n\t\t\tisLimit: true\n\t\t});\n\t\tthis.schema.register(\"$documentFragment\", {\n\t\t\tallowContentOf: [\"$root\", \"$inlineRoot\"],\n\t\t\tallowChildren: \"$text\",\n\t\t\tisLimit: true\n\t\t});\n\t\tthis.schema.register(\"$marker\");\n\t\tthis.schema.addChildCheck(() => true, \"$marker\");\n\t\tinjectSelectionPostFixer(this);\n\t\tthis.document.registerPostFixer(autoParagraphEmptyRoots);\n\t\tthis.on(\"insertContent\", (evt, [content, selectable]) => {\n\t\t\tevt.return = insertContent(this, content, selectable);\n\t\t});\n\t\tthis.on(\"insertObject\", (evt, [element, selection, options]) => {\n\t\t\tevt.return = insertObject(this, element, selection, options);\n\t\t});\n\t\tthis.on(\"canEditAt\", (evt) => {\n\t\t\tconst canEditAt = !this.document.isReadOnly;\n\t\t\tevt.return = canEditAt;\n\t\t\tif (!canEditAt) evt.stop();\n\t\t});\n\t}\n\t/**\n\t* The `change()` method is the primary way of changing the model. You should use it to modify all document nodes\n\t* (including detached nodes – i.e. nodes not added to the {@link module:engine/model/model~Model#document model document}),\n\t* the {@link module:engine/model/document~ModelDocument#selection document's selection}, and\n\t* {@link module:engine/model/model~Model#markers model markers}.\n\t*\n\t* ```ts\n\t* model.change( writer => {\n\t* \twriter.insertText( 'foo', paragraph, 'end' );\n\t* } );\n\t* ```\n\t*\n\t* All changes inside the change block use the same {@link module:engine/model/batch~Batch} so they are combined\n\t* into a single undo step.\n\t*\n\t* ```ts\n\t* model.change( writer => {\n\t* \twriter.insertText( 'foo', paragraph, 'end' ); // foo.\n\t*\n\t* \tmodel.change( writer => {\n\t* \t\twriter.insertText( 'bar', paragraph, 'end' ); // foobar.\n\t* \t} );\n\t*\n\t* \twriter.insertText( 'bom', paragraph, 'end' ); // foobarbom.\n\t* } );\n\t* ```\n\t*\n\t* The callback of the `change()` block is executed synchronously.\n\t*\n\t* You can also return a value from the change block.\n\t*\n\t* ```ts\n\t* const img = model.change( writer => {\n\t* \treturn writer.createElement( 'img' );\n\t* } );\n\t* ```\n\t*\n\t* @see #enqueueChange\n\t* @typeParam TReturn The return type of the provided callback.\n\t* @param callback Callback function which may modify the model.\n\t*/\n\tchange(callback) {\n\t\ttry {\n\t\t\tif (this._pendingChanges.length === 0) {\n\t\t\t\tthis._pendingChanges.push({\n\t\t\t\t\tbatch: new Batch(),\n\t\t\t\t\tcallback\n\t\t\t\t});\n\t\t\t\treturn this._runPendingChanges()[0];\n\t\t\t} else return callback(this._currentWriter);\n\t\t} catch (err) {\n\t\t\tCKEditorError.rethrowUnexpectedError(err, this);\n\t\t}\n\t}\n\tenqueueChange(batchOrType, callback) {\n\t\ttry {\n\t\t\tif (!batchOrType) batchOrType = new Batch();\n\t\t\telse if (typeof batchOrType === \"function\") {\n\t\t\t\tcallback = batchOrType;\n\t\t\t\tbatchOrType = new Batch();\n\t\t\t} else if (!(batchOrType instanceof Batch)) batchOrType = new Batch(batchOrType);\n\t\t\tthis._pendingChanges.push({\n\t\t\t\tbatch: batchOrType,\n\t\t\t\tcallback\n\t\t\t});\n\t\t\tif (this._pendingChanges.length == 1) this._runPendingChanges();\n\t\t} catch (err) {\n\t\t\tCKEditorError.rethrowUnexpectedError(err, this);\n\t\t}\n\t}\n\t/**\n\t* {@link module:utils/observablemixin~Observable#decorate Decorated} function for applying\n\t* {@link module:engine/model/operation/operation~Operation operations} to the model.\n\t*\n\t* This is a low-level way of changing the model. It is exposed for very specific use cases (like the undo feature).\n\t* Normally, to modify the model, you will want to use {@link module:engine/model/writer~ModelWriter `Writer`}.\n\t* See also {@glink framework/architecture/editing-engine#changing-the-model Changing the model} section\n\t* of the {@glink framework/architecture/editing-engine Editing architecture} guide.\n\t*\n\t* @param operation The operation to apply.\n\t*/\n\tapplyOperation(operation) {\n\t\toperation._execute();\n\t}\n\t/**\n\t* Inserts content at the position in the editor specified by the selection, as one would expect the paste\n\t* functionality to work.\n\t*\n\t* **Note**: If you want to insert an {@glink framework/deep-dive/schema#object-elements object element}\n\t* (e.g. a {@link module:widget/utils~toWidget widget}), see {@link #insertObject} instead.\n\t*\n\t* This is a high-level method. It takes the {@link #schema schema} into consideration when inserting\n\t* the content, clears the given selection's content before inserting nodes and moves the selection\n\t* to its target position at the end of the process.\n\t* It can split elements, merge them, wrap bare text nodes with paragraphs, etc. &ndash; just like the\n\t* pasting feature should do.\n\t*\n\t* For lower-level methods see {@link module:engine/model/writer~ModelWriter `Writer`}.\n\t*\n\t* This method, unlike {@link module:engine/model/writer~ModelWriter `Writer`}'s methods, does not have to be used\n\t* inside a {@link #change `change()` block}.\n\t*\n\t* # Conversion and schema\n\t*\n\t* Inserting elements and text nodes into the model is not enough to make CKEditor 5 render that content\n\t* to the user. CKEditor 5 implements a model-view-controller architecture and what `model.insertContent()` does\n\t* is only adding nodes to the model. Additionally, you need to define\n\t* {@glink framework/architecture/editing-engine#conversion converters} between the model and view\n\t* and define those nodes in the {@glink framework/architecture/editing-engine#schema schema}.\n\t*\n\t* So, while this method may seem similar to CKEditor 4 `editor.insertHtml()` (in fact, both methods\n\t* are used for paste-like content insertion), the CKEditor 5 method cannot be use to insert arbitrary HTML\n\t* unless converters are defined for all elements and attributes in that HTML.\n\t*\n\t* # Examples\n\t*\n\t* Using `insertContent()` with a manually created model structure:\n\t*\n\t* ```ts\n\t* // Let's create a document fragment containing such content as:\n\t* //\n\t* // <paragraph>foo</paragraph>\n\t* // <blockQuote>\n\t* //    <paragraph>bar</paragraph>\n\t* // </blockQuote>\n\t* const docFrag = editor.model.change( writer => {\n\t* \tconst p1 = writer.createElement( 'paragraph' );\n\t* \tconst p2 = writer.createElement( 'paragraph' );\n\t* \tconst blockQuote = writer.createElement( 'blockQuote' );\n\t* \tconst docFrag = writer.createDocumentFragment();\n\t*\n\t* \twriter.append( p1, docFrag );\n\t* \twriter.append( blockQuote, docFrag );\n\t* \twriter.append( p2, blockQuote );\n\t* \twriter.insertText( 'foo', p1 );\n\t* \twriter.insertText( 'bar', p2 );\n\t*\n\t* \treturn docFrag;\n\t* } );\n\t*\n\t* // insertContent() does not have to be used in a change() block. It can, though,\n\t* // so this code could be moved to the callback defined above.\n\t* editor.model.insertContent( docFrag );\n\t* ```\n\t*\n\t* Using `insertContent()` with an HTML string converted to a model document fragment (similar to the pasting mechanism):\n\t*\n\t* ```ts\n\t* // You can create your own HtmlDataProcessor instance or use editor.data.processor\n\t* // if you have not overridden the default one (which is the HtmlDataProcessor instance).\n\t* const htmlDP = new HtmlDataProcessor( viewDocument );\n\t*\n\t* // Convert an HTML string to a view document fragment:\n\t* const viewFragment = htmlDP.toView( htmlString );\n\t*\n\t* // Convert the view document fragment to a model document fragment\n\t* // in the context of $root. This conversion takes the schema into\n\t* // account so if, for example, the view document fragment contained a bare text node,\n\t* // this text node cannot be a child of $root, so it will be automatically\n\t* // wrapped with a <paragraph>. You can define the context yourself (in the second parameter),\n\t* // and e.g. convert the content like it would happen in a <paragraph>.\n\t* // Note: The clipboard feature uses a custom context called $clipboardHolder\n\t* // which has a loosened schema.\n\t* const modelFragment = editor.data.toModel( viewFragment );\n\t*\n\t* editor.model.insertContent( modelFragment );\n\t* ```\n\t*\n\t* By default this method will use the document selection but it can also be used with a position, range or selection instance.\n\t*\n\t* ```ts\n\t* // Insert text at the current document selection position.\n\t* editor.model.change( writer => {\n\t* \teditor.model.insertContent( writer.createText( 'x' ) );\n\t* } );\n\t*\n\t* // Insert text at a given position - the document selection will not be modified.\n\t* editor.model.change( writer => {\n\t* \teditor.model.insertContent( writer.createText( 'x' ), doc.getRoot(), 2 );\n\t*\n\t* \t// Which is a shorthand for:\n\t* \teditor.model.insertContent( writer.createText( 'x' ), writer.createPositionAt( doc.getRoot(), 2 ) );\n\t* } );\n\t* ```\n\t*\n\t* If you want the document selection to be moved to the inserted content, use the\n\t* {@link module:engine/model/writer~ModelWriter#setSelection `setSelection()`} method of the writer after inserting\n\t* the content:\n\t*\n\t* ```ts\n\t* editor.model.change( writer => {\n\t* \tconst paragraph = writer.createElement( 'paragraph' );\n\t*\n\t* \t// Insert an empty paragraph at the beginning of the root.\n\t* \teditor.model.insertContent( paragraph, writer.createPositionAt( editor.model.document.getRoot(), 0 ) );\n\t*\n\t* \t// Move the document selection to the inserted paragraph.\n\t* \twriter.setSelection( paragraph, 'in' );\n\t* } );\n\t* ```\n\t*\n\t* If an instance of the {@link module:engine/model/selection~ModelSelection model selection} is passed as `selectable`,\n\t* the new content will be inserted at the passed selection (instead of document selection):\n\t*\n\t* ```ts\n\t* editor.model.change( writer => {\n\t* \t// Create a selection in a paragraph that will be used as a place of insertion.\n\t* \tconst selection = writer.createSelection( paragraph, 'in' );\n\t*\n\t* \t// Insert the new text at the created selection.\n\t* \teditor.model.insertContent( writer.createText( 'x' ), selection );\n\t*\n\t* \t// insertContent() modifies the passed selection instance so it can be used to set the document selection.\n\t* \t// Note: This is not necessary when you passed the document selection to insertContent().\n\t* \twriter.setSelection( selection );\n\t* } );\n\t* ```\n\t*\n\t* @fires insertContent\n\t* @param content The content to insert.\n\t* @param selectable The selection into which the content should be inserted.\n\t* If not provided the current model document selection will be used.\n\t* @param placeOrOffset To be used when a model item was passed as `selectable`.\n\t* This param defines a position in relation to that item.\n\t* at the insertion position.\n\t*/\n\tinsertContent(content, selectable, placeOrOffset, ...rest) {\n\t\tconst selection = normalizeSelectable(selectable, placeOrOffset);\n\t\treturn this.fire(\"insertContent\", [\n\t\t\tcontent,\n\t\t\tselection,\n\t\t\tplaceOrOffset,\n\t\t\t...rest\n\t\t]);\n\t}\n\t/**\n\t* Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.\n\t*\n\t* This is a high-level API:\n\t* * It takes the {@link #schema schema} into consideration,\n\t* * It clears the content of passed `selectable` before inserting,\n\t* * It can move the selection at the end of the process,\n\t* * It will copy the selected block's attributes to preserve them upon insertion,\n\t* * It can split elements or wrap inline objects with paragraphs if they are not allowed in target position,\n\t* * etc.\n\t*\n\t* # Notes\n\t*\n\t* * If you want to insert a non-object content, see {@link #insertContent} instead.\n\t* * For lower-level API, see {@link module:engine/model/writer~ModelWriter `Writer`}.\n\t* * Unlike {@link module:engine/model/writer~ModelWriter `Writer`}, this method does not have to be used inside\n\t* a {@link #change `change()` block}.\n\t* * Inserting object into the model is not enough to make CKEditor 5 render that content to the user.\n\t* CKEditor 5 implements a model-view-controller architecture and what `model.insertObject()` does\n\t* is only adding nodes to the model. Additionally, you need to define\n\t* {@glink framework/architecture/editing-engine#conversion converters} between the model and view\n\t* and define those nodes in the {@glink framework/architecture/editing-engine#schema schema}.\n\t*\n\t* # Examples\n\t*\n\t* Use the following code to insert an object at the current selection and keep the selection on the inserted element:\n\t*\n\t* ```ts\n\t* const rawHtmlEmbedElement = writer.createElement( 'rawHtml' );\n\t*\n\t* model.insertObject( rawHtmlEmbedElement, null, null, {\n\t* \tsetSelection: 'on'\n\t* } );\n\t* ```\n\t*\n\t* Use the following code to insert an object at the current selection and nudge the selection after the inserted object:\n\t*\n\t* ```ts\n\t* const pageBreakElement = writer.createElement( 'pageBreak' );\n\t*\n\t* model.insertObject( pageBreakElement, null, null, {\n\t* \tsetSelection: 'after'\n\t* } );\n\t* ```\n\t*\n\t* Use the following code to insert an object at the current selection and avoid splitting the content (non-destructive insertion):\n\t*\n\t* ```ts\n\t* const tableElement = writer.createElement( 'table' );\n\t*\n\t* model.insertObject( tableElement, null, null, {\n\t* \tfindOptimalPosition: 'auto'\n\t* } );\n\t* ```\n\t*\n\t* Use the following code to insert an object at the specific range (also: replace the content of the range):\n\t*\n\t* ```ts\n\t* const tableElement = writer.createElement( 'table' );\n\t* const range = model.createRangeOn( model.document.getRoot().getChild( 1 ) );\n\t*\n\t* model.insertObject( tableElement, range );\n\t* ```\n\t*\n\t* @param element An object to be inserted into the model document.\n\t* @param selectable A selectable where the content should be inserted. If not specified, the current\n\t* {@link module:engine/model/document~ModelDocument#selection document selection} will be used instead.\n\t* @param placeOrOffset Specifies the exact place or offset for the insertion to take place, relative to `selectable`.\n\t* @param options Additional options.\n\t* @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to\n\t* `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).\n\t* * When `'auto'`, the algorithm will decide whether to insert the object before or after `selectable` to avoid content splitting.\n\t* * When `'before'`, the closest position before `selectable` will be used that will not result in content splitting.\n\t* * When `'after'`, the closest position after `selectable` will be used that will not result in content splitting.\n\t*\n\t* Note that this option only works for block objects. Inline objects are inserted into text and do not split blocks.\n\t* @param options.setSelection An option that, when set, moves the\n\t* {@link module:engine/model/document~ModelDocument#selection document selection} after inserting the object.\n\t* * When `'on'`, the document selection will be set on the inserted object.\n\t* * When `'after'`, the document selection will move to the closest text node after the inserted object. If there is no\n\t* such text node, a paragraph will be created and the document selection will be moved inside it.\n\t* at the insertion position.\n\t*/\n\tinsertObject(element, selectable, placeOrOffset, options, ...rest) {\n\t\tconst selection = normalizeSelectable(selectable, placeOrOffset);\n\t\treturn this.fire(\"insertObject\", [\n\t\t\telement,\n\t\t\tselection,\n\t\t\toptions,\n\t\t\toptions,\n\t\t\t...rest\n\t\t]);\n\t}\n\t/**\n\t* Deletes content of the selection and merge siblings. The resulting selection is always collapsed.\n\t*\n\t* **Note:** For the sake of predictability, the resulting selection should always be collapsed.\n\t* In cases where a feature wants to modify deleting behavior so selection isn't collapsed\n\t* (e.g. a table feature may want to keep row selection after pressing <kbd>Backspace</kbd>),\n\t* then that behavior should be implemented in the view's listener. At the same time, the table feature\n\t* will need to modify this method's behavior too, e.g. to \"delete contents and then collapse\n\t* the selection inside the last selected cell\" or \"delete the row and collapse selection somewhere near\".\n\t* That needs to be done in order to ensure that other features which use `deleteContent()` will work well with tables.\n\t*\n\t* @fires deleteContent\n\t* @param selection Selection of which the content should be deleted.\n\t* @param options.leaveUnmerged Whether to merge elements after removing the content of the selection.\n\t*\n\t* For example `<heading1>x[x</heading1><paragraph>y]y</paragraph>` will become:\n\t*\n\t* * `<heading1>x^y</heading1>` with the option disabled (`leaveUnmerged == false`)\n\t* * `<heading1>x^</heading1><paragraph>y</paragraph>` with enabled (`leaveUnmerged == true`).\n\t*\n\t* Note: {@link module:engine/model/schema~ModelSchema#isObject object} and {@link module:engine/model/schema~ModelSchema#isLimit limit}\n\t* elements will not be merged.\n\t*\n\t* @param options.doNotResetEntireContent Whether to skip replacing the entire content with a\n\t* paragraph when the entire content was selected.\n\t*\n\t* For example `<heading1>[x</heading1><paragraph>y]</paragraph>` will become:\n\t*\n\t* * `<paragraph>^</paragraph>` with the option disabled (`doNotResetEntireContent == false`)\n\t* * `<heading1>^</heading1>` with enabled (`doNotResetEntireContent == true`)\n\t*\n\t* @param options.doNotAutoparagraph Whether to create a paragraph if after content deletion selection is moved\n\t* to a place where text cannot be inserted.\n\t*\n\t* For example `<paragraph>x</paragraph>[<imageBlock src=\"foo.jpg\"></imageBlock>]` will become:\n\t*\n\t* * `<paragraph>x</paragraph><paragraph>[]</paragraph>` with the option disabled (`doNotAutoparagraph == false`)\n\t* * `<paragraph>x[]</paragraph>` with the option enabled (`doNotAutoparagraph == true`).\n\t*\n\t* **Note:** if there is no valid position for the selection, the paragraph will always be created:\n\t*\n\t* `[<imageBlock src=\"foo.jpg\"></imageBlock>]` -> `<paragraph>[]</paragraph>`.\n\t*\n\t* @param options.direction The direction in which the content is being consumed.\n\t* Deleting backward corresponds to using the <kbd>Backspace</kbd> key, while deleting content forward corresponds to\n\t* the <kbd>Shift</kbd>+<kbd>Backspace</kbd> keystroke.\n\t*/\n\tdeleteContent(selection, options) {\n\t\tdeleteContent(this, selection, options);\n\t}\n\t/**\n\t* Modifies the selection. Currently, the supported modifications are:\n\t*\n\t* * Extending. The selection focus is moved in the specified `options.direction` with a step specified in `options.unit`.\n\t* Possible values for `unit` are:\n\t*  * `'character'` (default) - moves selection by one user-perceived character. In most cases this means moving by one\n\t*  character in `String` sense. However, unicode also defines \"combing marks\". These are special symbols, that combines\n\t*  with a symbol before it (\"base character\") to create one user-perceived character. For example, `q̣̇` is a normal\n\t*  letter `q` with two \"combining marks\": upper dot (`Ux0307`) and lower dot (`Ux0323`). For most actions, i.e. extending\n\t*  selection by one position, it is correct to include both \"base character\" and all of it's \"combining marks\". That is\n\t*  why `'character'` value is most natural and common method of modifying selection.\n\t*  * `'codePoint'` - moves selection by one unicode code point. In contrary to, `'character'` unit, this will insert\n\t*  selection between \"base character\" and \"combining mark\", because \"combining marks\" have their own unicode code points.\n\t*  However, for technical reasons, unicode code points with values above `UxFFFF` are represented in native `String` by\n\t*  two characters, called \"surrogate pairs\". Halves of \"surrogate pairs\" have a meaning only when placed next to each other.\n\t*  For example `𨭎` is represented in `String` by `\\uD862\\uDF4E`. Both `\\uD862` and `\\uDF4E` do not have any meaning\n\t*  outside the pair (are rendered as ? when alone). Position between them would be incorrect. In this case, selection\n\t*  extension will include whole \"surrogate pair\".\n\t*  * `'word'` - moves selection by a whole word.\n\t*\n\t* **Note:** if you extend a forward selection in a backward direction you will in fact shrink it.\n\t*\n\t* @fires modifySelection\n\t* @param selection The selection to modify.\n\t* @param options.direction The direction in which the selection should be modified.\n\t* @param options.unit The unit by which selection should be modified.\n\t* @param options.treatEmojiAsSingleUnit Whether multi-characer emoji sequences should be handled as single unit.\n\t*/\n\tmodifySelection(selection, options) {\n\t\tmodifySelection(this, selection, options);\n\t}\n\t/**\n\t* Gets a clone of the selected content.\n\t*\n\t* For example, for the following selection:\n\t*\n\t* ```html\n\t* <paragraph>x</paragraph>\n\t* <blockQuote>\n\t* \t<paragraph>y</paragraph>\n\t* \t<heading1>fir[st</heading1>\n\t* </blockQuote>\n\t* <paragraph>se]cond</paragraph>\n\t* <paragraph>z</paragraph>\n\t* ```\n\t*\n\t* It will return a document fragment with such a content:\n\t*\n\t* ```html\n\t* <blockQuote>\n\t* \t<heading1>st</heading1>\n\t* </blockQuote>\n\t* <paragraph>se</paragraph>\n\t* ```\n\t*\n\t* @fires getSelectedContent\n\t* @param selection The selection of which content will be returned.\n\t*/\n\tgetSelectedContent(selection) {\n\t\treturn getSelectedContent(this, selection);\n\t}\n\t/**\n\t* Checks whether given `subject` has any meaningful content.\n\t*\n\t* Meaningful content is:\n\t*\n\t* * any text node (`options.ignoreWhitespaces` allows controlling whether this text node must also contain\n\t* any non-whitespace characters),\n\t* * or any {@link module:engine/model/schema~ModelSchema#isContent content element},\n\t* * or any {@link module:engine/model/markercollection~Marker marker} which\n\t* {@link module:engine/model/markercollection~Marker#_affectsData affects data}.\n\t*\n\t* This means that a range containing an empty `<paragraph></paragraph>` is not considered to have a meaningful content.\n\t* However, a range containing an `<imageBlock></imageBlock>` (which would normally be marked in the schema as an object element)\n\t* is considered non-empty.\n\t*\n\t* @param subject Subject to check if includes meaningful content. Could be a model range, an element, a document fragment, or a\n\t* selection.\n\t* @param options.ignoreWhitespaces Whether text node with whitespaces only should be considered empty.\n\t* @param options.ignoreMarkers Whether markers should be ignored.\n\t*/\n\thasContent(subject, options = {}) {\n\t\tlet ranges;\n\t\tif (subject.is(\"selection\")) ranges = Array.from(subject.getRanges());\n\t\telse if (subject.is(\"range\")) ranges = [subject];\n\t\telse ranges = [ModelRange._createIn(subject)];\n\t\tfor (const range of ranges) if (this._rangeHasContent(range, options)) return true;\n\t\treturn false;\n\t}\n\t/**\n\t* Checks whether given range has any meaningful content.\n\t*\n\t* Helper method for {@link #hasContent}.\n\t*/\n\t_rangeHasContent(range, options) {\n\t\tif (range.isCollapsed) return false;\n\t\tconst { ignoreWhitespaces = false, ignoreMarkers = false } = options;\n\t\tif (!ignoreMarkers) {\n\t\t\tfor (const intersectingMarker of this.markers.getMarkersIntersectingRange(range)) if (intersectingMarker.affectsData) return true;\n\t\t}\n\t\tfor (const item of range.getItems()) if (this.schema.isContent(item)) {\n\t\t\tif (item.is(\"$textProxy\")) {\n\t\t\t\tif (!ignoreWhitespaces) return true;\n\t\t\t\telse if (item.data.search(/\\S/) !== -1) return true;\n\t\t\t} else return true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Check whether given selectable is at a place in the model where it can be edited (returns `true`) or not (returns `false`).\n\t*\n\t* Should be used instead of {@link module:core/editor/editor~Editor#isReadOnly} to check whether a user action can happen at\n\t* given selectable. It may be decorated and used differently in different environment (e.g. multi-root editor can disable\n\t* a particular root).\n\t*\n\t* This method is decorated. Although this method accepts any parameter of `Selectable` type, the\n\t* {@link ~Model#event:canEditAt `canEditAt` event} is fired with `selectable` normalized to an instance of\n\t* {@link module:engine/model/selection~ModelSelection} or {@link module:engine/model/documentselection~ModelDocumentSelection}\n\t*\n\t* @fires canEditAt\n\t*/\n\tcanEditAt(selectable) {\n\t\tconst selection = normalizeSelectable(selectable);\n\t\treturn this.fire(\"canEditAt\", [selection]);\n\t}\n\t/**\n\t* Creates a position from the given root and path in that root.\n\t*\n\t* Note: This method is also available as\n\t* {@link module:engine/model/writer~ModelWriter#createPositionFromPath `Writer#createPositionFromPath()`}.\n\t*\n\t* @param root Root of the position.\n\t* @param path Position path. See {@link module:engine/model/position~ModelPosition#path}.\n\t* @param stickiness Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t*/\n\tcreatePositionFromPath(root, path, stickiness) {\n\t\treturn new ModelPosition(root, path, stickiness);\n\t}\n\t/**\n\t* Creates position at the given location. The location can be specified as:\n\t*\n\t* * a {@link module:engine/model/position~ModelPosition position},\n\t* * a parent element and offset in that element,\n\t* * a parent element and `'end'` (the position will be set at the end of that element),\n\t* * a {@link module:engine/model/item~ModelItem model item} and `'before'` or `'after'`\n\t* (the position will be set before or after the given model item).\n\t*\n\t* This method is a shortcut to other factory methods such as:\n\t*\n\t* * {@link module:engine/model/model~Model#createPositionBefore `createPositionBefore()`},\n\t* * {@link module:engine/model/model~Model#createPositionAfter `createPositionAfter()`}.\n\t*\n\t* Note: This method is also available as\n\t* {@link module:engine/model/writer~ModelWriter#createPositionAt `Writer#createPositionAt()`},\n\t*\n\t* @param itemOrPosition\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t*/\n\tcreatePositionAt(itemOrPosition, offset) {\n\t\treturn ModelPosition._createAt(itemOrPosition, offset);\n\t}\n\t/**\n\t* Creates a new position after the given {@link module:engine/model/item~ModelItem model item}.\n\t*\n\t* Note: This method is also available as\n\t* {@link module:engine/model/writer~ModelWriter#createPositionAfter `Writer#createPositionAfter()`}.\n\t*\n\t* @param item Item after which the position should be placed.\n\t*/\n\tcreatePositionAfter(item) {\n\t\treturn ModelPosition._createAfter(item);\n\t}\n\t/**\n\t* Creates a new position before the given {@link module:engine/model/item~ModelItem model item}.\n\t*\n\t* Note: This method is also available as\n\t* {@link module:engine/model/writer~ModelWriter#createPositionBefore `Writer#createPositionBefore()`}.\n\t*\n\t* @param item Item before which the position should be placed.\n\t*/\n\tcreatePositionBefore(item) {\n\t\treturn ModelPosition._createBefore(item);\n\t}\n\t/**\n\t* Creates a range spanning from the `start` position to the `end` position.\n\t*\n\t* Note: This method is also available as\n\t* {@link module:engine/model/writer~ModelWriter#createRange `Writer#createRange()`}:\n\t*\n\t* ```ts\n\t* model.change( writer => {\n\t* \tconst range = writer.createRange( start, end );\n\t* } );\n\t* ```\n\t*\n\t* @param start Start position.\n\t* @param end End position. If not set, the range will be collapsed to the `start` position.\n\t*/\n\tcreateRange(start, end) {\n\t\treturn new ModelRange(start, end);\n\t}\n\t/**\n\t* Creates a range inside the given element which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* Note: This method is also available as\n\t* {@link module:engine/model/writer~ModelWriter#createRangeIn `Writer#createRangeIn()`}:\n\t*\n\t* ```ts\n\t* model.change( writer => {\n\t* \tconst range = writer.createRangeIn( paragraph );\n\t* } );\n\t* ```\n\t*\n\t* @param element Element which is a parent for the range.\n\t*/\n\tcreateRangeIn(element) {\n\t\treturn ModelRange._createIn(element);\n\t}\n\t/**\n\t* Creates a range that starts before the given {@link module:engine/model/item~ModelItem model item} and ends after it.\n\t*\n\t* Note: This method is also available on `writer` instance as\n\t* {@link module:engine/model/writer~ModelWriter#createRangeOn `Writer.createRangeOn()`}:\n\t*\n\t* ```ts\n\t* model.change( writer => {\n\t* \tconst range = writer.createRangeOn( paragraph );\n\t* } );\n\t* ```\n\t*\n\t* @param item\n\t*/\n\tcreateRangeOn(item) {\n\t\treturn ModelRange._createOn(item);\n\t}\n\tcreateSelection(...args) {\n\t\treturn new ModelSelection(...args);\n\t}\n\t/**\n\t* Creates a {@link module:engine/model/batch~Batch} instance.\n\t*\n\t* **Note:** In most cases creating a batch instance is not necessary as they are created when using:\n\t*\n\t* * {@link #change `change()`},\n\t* * {@link #enqueueChange `enqueueChange()`}.\n\t*\n\t* @param type {@link module:engine/model/batch~Batch#constructor The type} of the batch.\n\t*/\n\tcreateBatch(type) {\n\t\treturn new Batch(type);\n\t}\n\t/**\n\t* Creates an operation instance from a JSON object (parsed JSON string).\n\t*\n\t* This is an alias for {@link module:engine/model/operation/operationfactory~OperationFactory.fromJSON `OperationFactory.fromJSON()`}.\n\t*\n\t* @param json Deserialized JSON object.\n\t*/\n\tcreateOperationFromJSON(json) {\n\t\treturn OperationFactory.fromJSON(json, this.document);\n\t}\n\t/**\n\t* Removes all events listeners set by model instance and destroys {@link module:engine/model/document~ModelDocument}.\n\t*/\n\tdestroy() {\n\t\tthis.document.destroy();\n\t\tthis.markers.destroy();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Common part of {@link module:engine/model/model~Model#change} and {@link module:engine/model/model~Model#enqueueChange}\n\t* which calls callbacks and returns array of values returned by these callbacks.\n\t*/\n\t_runPendingChanges() {\n\t\tconst ret = [];\n\t\tthis.fire(\"_beforeChanges\");\n\t\ttry {\n\t\t\twhile (this._pendingChanges.length) {\n\t\t\t\tconst currentBatch = this._pendingChanges[0].batch;\n\t\t\t\tthis._currentWriter = new ModelWriter(this, currentBatch);\n\t\t\t\tconst callbackReturnValue = this._pendingChanges[0].callback(this._currentWriter);\n\t\t\t\tret.push(callbackReturnValue);\n\t\t\t\tthis.document._handleChangeBlock(this._currentWriter);\n\t\t\t\tthis._pendingChanges.shift();\n\t\t\t\tthis._currentWriter = null;\n\t\t\t}\n\t\t} finally {\n\t\t\tthis._pendingChanges.length = 0;\n\t\t\tthis._currentWriter = null;\n\t\t\tthis.fire(\"_afterChanges\");\n\t\t}\n\t\treturn ret;\n\t}\n};\n/**\n* Normalizes a selectable to a Selection or ModelDocumentSelection.\n*/\nfunction normalizeSelectable(selectable, placeOrOffset) {\n\tif (!selectable) return;\n\tif (selectable instanceof ModelSelection || selectable instanceof ModelDocumentSelection) return selectable;\n\tif (selectable instanceof ModelNode) {\n\t\tif (placeOrOffset || placeOrOffset === 0) return new ModelSelection(selectable, placeOrOffset);\n\t\telse if (selectable.is(\"rootElement\")) return new ModelSelection(selectable, \"in\");\n\t\telse return new ModelSelection(selectable, \"on\");\n\t}\n\treturn new ModelSelection(selectable);\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 engine/view/observer/clickobserver\n*/\n/**\n* {@link module:engine/view/document~ViewDocument#event:click Click} event observer.\n*\n* Note that this observer is not available by default. To make it available it needs to be added to\n* {@link module:engine/view/view~EditingView view controller} by a {@link module:engine/view/view~EditingView#addObserver} method.\n*/\nvar ClickObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = \"click\";\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tthis.fire(domEvent.type, domEvent);\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 engine/view/observer/mouseobserver\n*/\n/**\n* Mouse events observer.\n*\n* Note that this observer is not available by default. To make it available it needs to be added to\n* {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n*/\nvar MouseObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = [\n\t\t\"mousedown\",\n\t\t\"mouseup\",\n\t\t\"mouseover\",\n\t\t\"mouseout\"\n\t];\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tthis.fire(domEvent.type, domEvent);\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 engine/view/observer/touchobserver\n*/\n/**\n* Touch events observer.\n*\n* Note that this observer is not available by default. To make it available it needs to be added to\n* {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n*/\nvar TouchObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = [\n\t\t\"touchstart\",\n\t\t\"touchend\",\n\t\t\"touchmove\"\n\t];\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tthis.fire(domEvent.type, domEvent);\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 engine/view/observer/pointerobserver\n*/\n/**\n* Pointer events observer.\n*\n* Note that this observer is not available by default. To make it available it needs to be added to\n* {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n*/\nvar PointerObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = [\n\t\t\"pointerdown\",\n\t\t\"pointerup\",\n\t\t\"pointermove\"\n\t];\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tthis.fire(domEvent.type, domEvent);\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 engine/view/upcastwriter\n*/\n/**\n* View upcast writer. It provides a set of methods used to manipulate non-semantic view trees.\n*\n* It should be used only while working on a non-semantic view\n* (e.g. a view created from HTML string on paste).\n* To manipulate a view which was or is being downcasted from the the model use the\n* {@link module:engine/view/downcastwriter~ViewDowncastWriter downcast writer}.\n*\n* Read more about changing the view in the {@glink framework/architecture/editing-engine#changing-the-view Changing the view}\n* section of the {@glink framework/architecture/editing-engine Editing engine architecture} guide.\n*\n* Unlike `ViewDowncastWriter`, which is available in the {@link module:engine/view/view~EditingView#change `View#change()`} block,\n* `ViewUpcastWriter` can be created wherever you need it:\n*\n* ```ts\n* const writer = new ViewUpcastWriter( viewDocument );\n* const text = writer.createText( 'foo!' );\n*\n* writer.appendChild( text, someViewElement );\n* ```\n*/\nvar ViewUpcastWriter = class {\n\t/**\n\t* The view document instance in which this upcast writer operates.\n\t*/\n\tdocument;\n\t/**\n\t* @param document The view document instance in which this upcast writer operates.\n\t*/\n\tconstructor(document) {\n\t\tthis.document = document;\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/documentfragment~ViewDocumentFragment} instance.\n\t*\n\t* @param children A list of nodes to be inserted into the created document fragment.\n\t* @returns The created document fragment.\n\t*/\n\tcreateDocumentFragment(children) {\n\t\treturn new ViewDocumentFragment(this.document, children);\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/element~ViewElement} instance.\n\t*\n\t* Attributes can be passed in various formats:\n\t*\n\t* ```ts\n\t* upcastWriter.createElement( 'div', { class: 'editor', contentEditable: 'true' } ); // object\n\t* upcastWriter.createElement( 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t* upcastWriter.createElement( 'div', mapOfAttributes ); // map\n\t* ```\n\t*\n\t* @param name Node name.\n\t* @param attrs Collection of attributes.\n\t* @param children A list of nodes to be inserted into created element.\n\t* @returns Created element.\n\t*/\n\tcreateElement(name, attrs, children) {\n\t\treturn new ViewElement(this.document, name, attrs, children);\n\t}\n\t/**\n\t* Creates a new {@link module:engine/view/text~ViewText} instance.\n\t*\n\t* @param data The text's data.\n\t* @returns The created text node.\n\t*/\n\tcreateText(data) {\n\t\treturn new ViewText(this.document, data);\n\t}\n\t/**\n\t* Clones the provided element.\n\t*\n\t* @see module:engine/view/element~ViewElement#_clone\n\t* @param element Element to be cloned.\n\t* @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t* element will be cloned without any children.\n\t* @returns Clone of this element.\n\t*/\n\tclone(element, deep = false) {\n\t\treturn element._clone(deep);\n\t}\n\t/**\n\t* Appends a child node or a list of child nodes at the end of this node\n\t* and sets the parent of these nodes to this element.\n\t*\n\t* @see module:engine/view/element~ViewElement#_appendChild\n\t* @param items Items to be inserted.\n\t* @param element Element to which items will be appended.\n\t* @returns Number of appended nodes.\n\t*/\n\tappendChild(items, element) {\n\t\treturn element._appendChild(items);\n\t}\n\t/**\n\t* Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t* this element.\n\t*\n\t* @see module:engine/view/element~ViewElement#_insertChild\n\t* @param index Offset at which nodes should be inserted.\n\t* @param items Items to be inserted.\n\t* @param element Element to which items will be inserted.\n\t* @returns Number of inserted nodes.\n\t*/\n\tinsertChild(index, items, element) {\n\t\treturn element._insertChild(index, items);\n\t}\n\t/**\n\t* Removes the given number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t*\n\t* @see module:engine/view/element~ViewElement#_removeChildren\n\t* @param index Offset from which nodes will be removed.\n\t* @param howMany Number of nodes to remove.\n\t* @param element Element which children will be removed.\n\t* @returns The array containing removed nodes.\n\t*/\n\tremoveChildren(index, howMany, element) {\n\t\treturn element._removeChildren(index, howMany);\n\t}\n\t/**\n\t* Removes given element from the view structure. Will not have effect on detached elements.\n\t*\n\t* @param element Element which will be removed.\n\t* @returns The array containing removed nodes.\n\t*/\n\tremove(element) {\n\t\tconst parent = element.parent;\n\t\tif (parent) return this.removeChildren(parent.getChildIndex(element), 1, parent);\n\t\treturn [];\n\t}\n\t/**\n\t* Replaces given element with the new one in the view structure. Will not have effect on detached elements.\n\t*\n\t* @param oldElement Element which will be replaced.\n\t* @param newElement Element which will be inserted in the place of the old element.\n\t* @returns Whether old element was successfully replaced.\n\t*/\n\treplace(oldElement, newElement) {\n\t\tconst parent = oldElement.parent;\n\t\tif (parent) {\n\t\t\tconst index = parent.getChildIndex(oldElement);\n\t\t\tthis.removeChildren(index, 1, parent);\n\t\t\tthis.insertChild(index, newElement, parent);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Removes given element from view structure and places its children in its position.\n\t* It does nothing if element has no parent.\n\t*\n\t* @param element Element to unwrap.\n\t*/\n\tunwrapElement(element) {\n\t\tconst parent = element.parent;\n\t\tif (parent) {\n\t\t\tconst index = parent.getChildIndex(element);\n\t\t\tthis.remove(element);\n\t\t\tthis.insertChild(index, element.getChildren(), parent);\n\t\t}\n\t}\n\t/**\n\t* Renames element by creating a copy of a given element but with its name changed and then moving contents of the\n\t* old element to the new one.\n\t*\n\t* Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n\t*\n\t* @param newName New element name.\n\t* @param  element Element to be renamed.\n\t* @returns New element or null if the old element was not replaced (happens for detached elements).\n\t*/\n\trename(newName, element) {\n\t\tconst newElement = new ViewElement(this.document, newName, element.getAttributes(), element.getChildren());\n\t\treturn this.replace(element, newElement) ? newElement : null;\n\t}\n\t/**\n\t* Adds or overwrites element's attribute with a specified key and value.\n\t*\n\t* ```ts\n\t* writer.setAttribute( 'href', 'http://ckeditor.com', linkElement );\n\t* ```\n\t*\n\t* @see module:engine/view/element~ViewElement#_setAttribute\n\t* @param key Attribute key.\n\t* @param value Attribute value.\n\t* @param element Element for which attribute will be set.\n\t*/\n\tsetAttribute(key, value, element) {\n\t\telement._setAttribute(key, value);\n\t}\n\t/**\n\t* Removes attribute from the element.\n\t*\n\t* ```ts\n\t* writer.removeAttribute( 'href', linkElement );\n\t* ```\n\t*\n\t* @see module:engine/view/element~ViewElement#_removeAttribute\n\t* @param key Attribute key.\n\t* @param element Element from which attribute will be removed.\n\t*/\n\tremoveAttribute(key, element) {\n\t\telement._removeAttribute(key);\n\t}\n\t/**\n\t* Adds specified class to the element.\n\t*\n\t* ```ts\n\t* writer.addClass( 'foo', linkElement );\n\t* writer.addClass( [ 'foo', 'bar' ], linkElement );\n\t* ```\n\t*\n\t* @see module:engine/view/element~ViewElement#_addClass\n\t* @param className Single class name or array of class names which will be added.\n\t* @param element Element for which class will be added.\n\t*/\n\taddClass(className, element) {\n\t\telement._addClass(className);\n\t}\n\t/**\n\t* Removes specified class from the element.\n\t*\n\t* ```ts\n\t* writer.removeClass( 'foo', linkElement );\n\t* writer.removeClass( [ 'foo', 'bar' ], linkElement );\n\t* ```\n\t*\n\t* @see module:engine/view/element~ViewElement#_removeClass\n\t* @param className Single class name or array of class names which will be removed.\n\t* @param element Element from which class will be removed.\n\t*/\n\tremoveClass(className, element) {\n\t\telement._removeClass(className);\n\t}\n\tsetStyle(property, valueOrElement, element) {\n\t\tif (isPlainObject(property) && element === void 0) valueOrElement._setStyle(property);\n\t\telse element._setStyle(property, valueOrElement);\n\t}\n\t/**\n\t* Removes specified style from the element.\n\t*\n\t* ```ts\n\t* writer.removeStyle( 'color', element );  // Removes 'color' style.\n\t* writer.removeStyle( [ 'color', 'border-top' ], element ); // Removes both 'color' and 'border-top' styles.\n\t* ```\n\t*\n\t* **Note**: This method can work with normalized style names if\n\t* {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t* See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t*\n\t* @see module:engine/view/element~ViewElement#_removeStyle\n\t* @param property Style property name or names to be removed.\n\t* @param element Element from which style will be removed.\n\t*/\n\tremoveStyle(property, element) {\n\t\telement._removeStyle(property);\n\t}\n\t/**\n\t* Sets a custom property on element. Unlike attributes, custom properties are not rendered to the DOM,\n\t* so they can be used to add special data to elements.\n\t*\n\t* @see module:engine/view/element~ViewElement#_setCustomProperty\n\t* @param key Custom property name/key.\n\t* @param value Custom property value to be stored.\n\t* @param element Element for which custom property will be set.\n\t*/\n\tsetCustomProperty(key, value, element) {\n\t\telement._setCustomProperty(key, value);\n\t}\n\t/**\n\t* Removes a custom property stored under the given key.\n\t*\n\t* @see module:engine/view/element~ViewElement#_removeCustomProperty\n\t* @param key Name/key of the custom property to be removed.\n\t* @param element Element from which the custom property will be removed.\n\t* @returns Returns true if property was removed.\n\t*/\n\tremoveCustomProperty(key, element) {\n\t\treturn element._removeCustomProperty(key);\n\t}\n\t/**\n\t* Creates position at the given location. The location can be specified as:\n\t*\n\t* * a {@link module:engine/view/position~ViewPosition position},\n\t* * parent element and offset (offset defaults to `0`),\n\t* * parent element and `'end'` (sets position at the end of that element),\n\t* * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t*\n\t* This method is a shortcut to other constructors such as:\n\t*\n\t* * {@link #createPositionBefore},\n\t* * {@link #createPositionAfter},\n\t*\n\t* @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t*/\n\tcreatePositionAt(itemOrPosition, offset) {\n\t\treturn ViewPosition._createAt(itemOrPosition, offset);\n\t}\n\t/**\n\t* Creates a new position after given view item.\n\t*\n\t* @param item View item after which the position should be located.\n\t*/\n\tcreatePositionAfter(item) {\n\t\treturn ViewPosition._createAfter(item);\n\t}\n\t/**\n\t* Creates a new position before given view item.\n\t*\n\t* @param item View item before which the position should be located.\n\t*/\n\tcreatePositionBefore(item) {\n\t\treturn ViewPosition._createBefore(item);\n\t}\n\t/**\n\t* Creates a range spanning from `start` position to `end` position.\n\t*\n\t* **Note:** This factory method creates it's own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t*\n\t* @param start Start position.\n\t* @param end End position. If not set, range will be collapsed at `start` position.\n\t*/\n\tcreateRange(start, end) {\n\t\treturn new ViewRange(start, end);\n\t}\n\t/**\n\t* Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t*/\n\tcreateRangeOn(item) {\n\t\treturn ViewRange._createOn(item);\n\t}\n\t/**\n\t* Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t* that element and ends after the last child of that element.\n\t*\n\t* @param element Element which is a parent for the range.\n\t*/\n\tcreateRangeIn(element) {\n\t\treturn ViewRange._createIn(element);\n\t}\n\tcreateSelection(...args) {\n\t\treturn new ViewSelection(...args);\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*/\nconst HEX_COLOR_REGEXP = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;\nconst RGB_COLOR_REGEXP = /^rgb\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\\)$/i;\nconst RGBA_COLOR_REGEXP = /^rgba\\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;\nconst HSL_COLOR_REGEXP = /^hsl\\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\\.?[0-9]+)?\\)$/i;\nconst HSLA_COLOR_REGEXP = /^hsla\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;\nconst CSS_SHORTHAND_VALUE_REGEXP = /\\w+\\((?:[^()]|\\([^()]*\\))*\\)|\\S+/gi;\nconst COLOR_NAMES = /* @__PURE__ */ new Set([\n\t\"black\",\n\t\"silver\",\n\t\"gray\",\n\t\"white\",\n\t\"maroon\",\n\t\"red\",\n\t\"purple\",\n\t\"fuchsia\",\n\t\"green\",\n\t\"lime\",\n\t\"olive\",\n\t\"yellow\",\n\t\"navy\",\n\t\"blue\",\n\t\"teal\",\n\t\"aqua\",\n\t\"orange\",\n\t\"aliceblue\",\n\t\"antiquewhite\",\n\t\"aquamarine\",\n\t\"azure\",\n\t\"beige\",\n\t\"bisque\",\n\t\"blanchedalmond\",\n\t\"blueviolet\",\n\t\"brown\",\n\t\"burlywood\",\n\t\"cadetblue\",\n\t\"chartreuse\",\n\t\"chocolate\",\n\t\"coral\",\n\t\"cornflowerblue\",\n\t\"cornsilk\",\n\t\"crimson\",\n\t\"cyan\",\n\t\"darkblue\",\n\t\"darkcyan\",\n\t\"darkgoldenrod\",\n\t\"darkgray\",\n\t\"darkgreen\",\n\t\"darkgrey\",\n\t\"darkkhaki\",\n\t\"darkmagenta\",\n\t\"darkolivegreen\",\n\t\"darkorange\",\n\t\"darkorchid\",\n\t\"darkred\",\n\t\"darksalmon\",\n\t\"darkseagreen\",\n\t\"darkslateblue\",\n\t\"darkslategray\",\n\t\"darkslategrey\",\n\t\"darkturquoise\",\n\t\"darkviolet\",\n\t\"deeppink\",\n\t\"deepskyblue\",\n\t\"dimgray\",\n\t\"dimgrey\",\n\t\"dodgerblue\",\n\t\"firebrick\",\n\t\"floralwhite\",\n\t\"forestgreen\",\n\t\"gainsboro\",\n\t\"ghostwhite\",\n\t\"gold\",\n\t\"goldenrod\",\n\t\"greenyellow\",\n\t\"grey\",\n\t\"honeydew\",\n\t\"hotpink\",\n\t\"indianred\",\n\t\"indigo\",\n\t\"ivory\",\n\t\"khaki\",\n\t\"lavender\",\n\t\"lavenderblush\",\n\t\"lawngreen\",\n\t\"lemonchiffon\",\n\t\"lightblue\",\n\t\"lightcoral\",\n\t\"lightcyan\",\n\t\"lightgoldenrodyellow\",\n\t\"lightgray\",\n\t\"lightgreen\",\n\t\"lightgrey\",\n\t\"lightpink\",\n\t\"lightsalmon\",\n\t\"lightseagreen\",\n\t\"lightskyblue\",\n\t\"lightslategray\",\n\t\"lightslategrey\",\n\t\"lightsteelblue\",\n\t\"lightyellow\",\n\t\"limegreen\",\n\t\"linen\",\n\t\"magenta\",\n\t\"mediumaquamarine\",\n\t\"mediumblue\",\n\t\"mediumorchid\",\n\t\"mediumpurple\",\n\t\"mediumseagreen\",\n\t\"mediumslateblue\",\n\t\"mediumspringgreen\",\n\t\"mediumturquoise\",\n\t\"mediumvioletred\",\n\t\"midnightblue\",\n\t\"mintcream\",\n\t\"mistyrose\",\n\t\"moccasin\",\n\t\"navajowhite\",\n\t\"oldlace\",\n\t\"olivedrab\",\n\t\"orangered\",\n\t\"orchid\",\n\t\"palegoldenrod\",\n\t\"palegreen\",\n\t\"paleturquoise\",\n\t\"palevioletred\",\n\t\"papayawhip\",\n\t\"peachpuff\",\n\t\"peru\",\n\t\"pink\",\n\t\"plum\",\n\t\"powderblue\",\n\t\"rosybrown\",\n\t\"royalblue\",\n\t\"saddlebrown\",\n\t\"salmon\",\n\t\"sandybrown\",\n\t\"seagreen\",\n\t\"seashell\",\n\t\"sienna\",\n\t\"skyblue\",\n\t\"slateblue\",\n\t\"slategray\",\n\t\"slategrey\",\n\t\"snow\",\n\t\"springgreen\",\n\t\"steelblue\",\n\t\"tan\",\n\t\"thistle\",\n\t\"tomato\",\n\t\"turquoise\",\n\t\"violet\",\n\t\"wheat\",\n\t\"whitesmoke\",\n\t\"yellowgreen\",\n\t\"activeborder\",\n\t\"activecaption\",\n\t\"appworkspace\",\n\t\"background\",\n\t\"buttonface\",\n\t\"buttonhighlight\",\n\t\"buttonshadow\",\n\t\"buttontext\",\n\t\"captiontext\",\n\t\"graytext\",\n\t\"highlight\",\n\t\"highlighttext\",\n\t\"inactiveborder\",\n\t\"inactivecaption\",\n\t\"inactivecaptiontext\",\n\t\"infobackground\",\n\t\"infotext\",\n\t\"menu\",\n\t\"menutext\",\n\t\"scrollbar\",\n\t\"threeddarkshadow\",\n\t\"threedface\",\n\t\"threedhighlight\",\n\t\"threedlightshadow\",\n\t\"threedshadow\",\n\t\"window\",\n\t\"windowframe\",\n\t\"windowtext\",\n\t\"rebeccapurple\",\n\t\"currentcolor\",\n\t\"transparent\"\n]);\n/**\n* Checks if string contains [color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) CSS value.\n*\n* ```ts\n* isColorStyleValue( '#f00' );\t\t\t\t\t\t// true\n* isColorStyleValue( '#AA00BB33' );\t\t\t\t// true\n* isColorStyleValue( 'rgb(0, 0, 250)' );\t\t\t// true\n* isColorStyleValue( 'hsla(240, 100%, 50%, .7)' );\t// true\n* isColorStyleValue( 'deepskyblue' );\t\t\t\t// true\n* ```\n*\n* **Note**: It does not support CSS Level 4 whitespace syntax, system colors and radius values for HSL colors.\n*/\nfunction isColorStyleValue(string) {\n\tif (string.startsWith(\"#\")) return HEX_COLOR_REGEXP.test(string);\n\tif (string.startsWith(\"rgb\")) return RGB_COLOR_REGEXP.test(string) || RGBA_COLOR_REGEXP.test(string);\n\tif (string.startsWith(\"hsl\")) return HSL_COLOR_REGEXP.test(string) || HSLA_COLOR_REGEXP.test(string);\n\treturn COLOR_NAMES.has(string.toLowerCase());\n}\nconst lineStyleValues = [\n\t\"none\",\n\t\"hidden\",\n\t\"dotted\",\n\t\"dashed\",\n\t\"solid\",\n\t\"double\",\n\t\"groove\",\n\t\"ridge\",\n\t\"inset\",\n\t\"outset\"\n];\n/**\n* Checks if string contains [line style](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style) CSS value.\n*/\nfunction isLineStyleValue(string) {\n\treturn lineStyleValues.includes(string);\n}\nconst lengthRegExp = /^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;\n/**\n* Checks if string contains [length](https://developer.mozilla.org/en-US/docs/Web/CSS/length) CSS value.\n*/\nfunction isLengthStyleValue(string) {\n\treturn lengthRegExp.test(string);\n}\nconst PERCENTAGE_VALUE_REGEXP = /^[+-]?[0-9]*([.][0-9]+)?%$/;\n/**\n* Checks if string contains [percentage](https://developer.mozilla.org/en-US/docs/Web/CSS/percentage) CSS value.\n*/\nfunction isPercentageStyleValue(string) {\n\treturn PERCENTAGE_VALUE_REGEXP.test(string);\n}\nconst sizeValues = [\n\t\"auto\",\n\t\"cover\",\n\t\"contain\"\n];\n/**\n* Checks if a string is a valid CSS `background-size` value token.\n*/\nfunction isSizeStyleValue(value) {\n\treturn sizeValues.includes(value) || isLengthStyleValue(value) || isPercentageStyleValue(value);\n}\nconst repeatValues = [\n\t\"repeat-x\",\n\t\"repeat-y\",\n\t\"repeat\",\n\t\"space\",\n\t\"round\",\n\t\"no-repeat\"\n];\n/**\n* Checks if string contains [background repeat](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) CSS value.\n*/\nfunction isRepeatStyleValue(string) {\n\treturn repeatValues.includes(string);\n}\nconst positionValues = [\n\t\"center\",\n\t\"top\",\n\t\"bottom\",\n\t\"left\",\n\t\"right\"\n];\n/**\n* Checks if string contains [background position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) CSS value.\n*/\nfunction isPositionStyleValue(string) {\n\treturn positionValues.includes(string);\n}\nconst attachmentValues = [\n\t\"fixed\",\n\t\"scroll\",\n\t\"local\"\n];\n/**\n* Checks if string contains [background attachment](https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment) CSS value.\n*/\nfunction isAttachmentStyleValue(string) {\n\treturn attachmentValues.includes(string);\n}\nconst originValues = [\n\t\"border-box\",\n\t\"padding-box\",\n\t\"content-box\"\n];\n/**\n* Checks if string contains [background origin](https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin) CSS value.\n*/\nfunction isOriginStyleValue(string) {\n\treturn originValues.includes(string);\n}\nconst clipValues = [\n\t\"border-box\",\n\t\"padding-box\",\n\t\"content-box\",\n\t\"text\"\n];\n/**\n* Checks if string contains [background clip](https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip) CSS value.\n*/\nfunction isClipStyleValue(string) {\n\treturn clipValues.includes(string);\n}\nconst urlRegExp = /^url\\(/;\n/**\n* Checks if string contains [URL](https://developer.mozilla.org/en-US/docs/Web/CSS/url) CSS value.\n*/\nfunction isURLStyleValue(string) {\n\treturn urlRegExp.test(string);\n}\n/**\n* Parses box sides as individual values.\n*/\nfunction getBoxSidesStyleValues(value = \"\") {\n\tif (value === \"\") return {\n\t\ttop: void 0,\n\t\tright: void 0,\n\t\tbottom: void 0,\n\t\tleft: void 0\n\t};\n\tconst values = getShorthandStylesValues(value);\n\tconst top = values[0];\n\tconst bottom = values[2] || top;\n\tconst right = values[1] || top;\n\treturn {\n\t\ttop,\n\t\tbottom,\n\t\tright,\n\t\tleft: values[3] || right\n\t};\n}\n/**\n* Default reducer for CSS properties that concerns edges of a box\n* [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notations:\n*\n* ```ts\n* stylesProcessor.setReducer( 'padding', getBoxSidesStyleValueReducer( 'padding' ) );\n* ```\n*/\nfunction getBoxSidesStyleValueReducer(styleShorthand) {\n\treturn (value) => {\n\t\tconst { top, right, bottom, left } = value;\n\t\tconst reduced = [];\n\t\tif (![\n\t\t\ttop,\n\t\t\tright,\n\t\t\tleft,\n\t\t\tbottom\n\t\t].every((value) => !!value)) {\n\t\t\tif (top) reduced.push([styleShorthand + \"-top\", top]);\n\t\t\tif (right) reduced.push([styleShorthand + \"-right\", right]);\n\t\t\tif (bottom) reduced.push([styleShorthand + \"-bottom\", bottom]);\n\t\t\tif (left) reduced.push([styleShorthand + \"-left\", left]);\n\t\t} else reduced.push([styleShorthand, getBoxSidesStyleShorthandValue(value)]);\n\t\treturn reduced;\n\t};\n}\n/**\n* Returns a [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notation\n* of a CSS property value.\n*\n* ```ts\n* getBoxSidesStyleShorthandValue( { top: '1px', right: '1px', bottom: '2px', left: '1px' } );\n* // will return '1px 1px 2px'\n* ```\n*/\nfunction getBoxSidesStyleShorthandValue({ top, right, bottom, left }) {\n\tconst out = [];\n\tif (left !== right) out.push(top, right, bottom, left);\n\telse if (bottom !== top) out.push(top, right, bottom);\n\telse if (right !== top) out.push(top, right);\n\telse out.push(top);\n\treturn out.join(\" \");\n}\n/**\n* Creates a normalizer for a [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) 1-to-4 value.\n*\n* ```ts\n* stylesProcessor.setNormalizer( 'margin', getPositionStyleShorthandNormalizer( 'margin' ) );\n* ```\n*/\nfunction getPositionStyleShorthandNormalizer(shorthand) {\n\treturn (value) => {\n\t\treturn {\n\t\t\tpath: shorthand,\n\t\t\tvalue: getBoxSidesStyleValues(value)\n\t\t};\n\t};\n}\n/**\n* Parses parts of a 1-to-4 value notation - handles some CSS values with spaces (like RGB()).\n*\n* ```ts\n* getShorthandStylesValues( 'red blue RGB(0, 0, 0)');\n* // will return [ 'red', 'blue', 'RGB(0, 0, 0)' ]\n* ```\n*/\nfunction getShorthandStylesValues(string) {\n\tconst matches = string.trim().slice(0, 1500).matchAll(CSS_SHORTHAND_VALUE_REGEXP);\n\treturn Array.from(matches).map((i) => i[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 engine/view/styles/background\n*/\n/**\n* CSS initial values for background longhand properties.\n*/\nconst BACKGROUND_INITIAL_ARRAY_VALUES = {\n\timage: \"none\",\n\trepeat: \"repeat\",\n\tposition: \"0% 0%\",\n\tsize: \"auto\",\n\torigin: \"padding-box\",\n\tclip: \"border-box\",\n\tattachment: \"scroll\"\n};\n/**\n* CSS function names that represent image values in the `background` shorthand.\n*/\nconst IMAGE_FUNCTIONS = [\n\t\"linear-gradient\",\n\t\"repeating-linear-gradient\",\n\t\"radial-gradient\",\n\t\"repeating-radial-gradient\",\n\t\"conic-gradient\",\n\t\"repeating-conic-gradient\",\n\t\"url\"\n];\n/**\n* Adds background CSS styles processing rules to the given `StylesProcessor`.\n*\n* Registers normalizers for the `background` shorthand and its longhand properties,\n* reducers that serialize them back to CSS strings, and the relation mapping between them.\n*\n* ```ts\n* editor.data.addStyleProcessorRules( addBackgroundStylesRules );\n* ```\n*\n* @param stylesProcessor The styles processor instance to register rules on.\n*/\nfunction addBackgroundStylesRules(stylesProcessor) {\n\tstylesProcessor.setNormalizer(\"background-color\", getBackgroundColorNormalizer());\n\tfor (const property in BACKGROUND_INITIAL_ARRAY_VALUES) {\n\t\tstylesProcessor.setNormalizer(`background-${property}`, getBackgroundArrayPropertyNormalizer(`background.${property}`));\n\t\tstylesProcessor.setReducer(`background-${property}`, getBackgroundArrayPropertyReducer(`background-${property}`));\n\t}\n\tstylesProcessor.setNormalizer(\"background\", getBackgroundNormalizer());\n\tstylesProcessor.setReducer(\"background\", getBackgroundReducer());\n\tstylesProcessor.setStyleRelation(\"background\", [\n\t\t\"background-color\",\n\t\t\"background-image\",\n\t\t\"background-repeat\",\n\t\t\"background-position\",\n\t\t\"background-size\",\n\t\t\"background-attachment\",\n\t\t\"background-origin\",\n\t\t\"background-clip\"\n\t]);\n}\n/**\n* Returns a normalizer for the `background` shorthand property.\n*\n* Parses the raw CSS value into comma-separated layers and merges them into\n* a structured `Background` object stored under the `background` path.\n*/\nfunction getBackgroundNormalizer() {\n\treturn (value) => {\n\t\tconst layers = parseBackgroundIntoLayers(value);\n\t\tif (!layers.length) layers.push({\n\t\t\t...getDefaultBackgroundLayer(),\n\t\t\tcolor: value\n\t\t});\n\t\treturn {\n\t\t\tpath: \"background\",\n\t\t\tvalue: normalizeBackgroundLayers(layers)\n\t\t};\n\t};\n}\n/**\n* Returns a normalizer for the `background-color` longhand property.\n*\n* Stores the raw color value directly under the `background.color` path.\n*/\nfunction getBackgroundColorNormalizer() {\n\treturn (value) => ({\n\t\tpath: \"background.color\",\n\t\tvalue\n\t});\n}\n/**\n* Returns a normalizer for a comma-separated background array longhand property\n* (e.g. `background-image`, `background-repeat`, `background-position`, `background-attachment`).\n*\n* Splits the raw value by top-level commas and stores the resulting array under the given path.\n*\n* @param path The target style path, e.g. `'background.image'`.\n*/\nfunction getBackgroundArrayPropertyNormalizer(path) {\n\treturn (value) => ({\n\t\tpath,\n\t\tvalue: splitByTopLevelCommas(value)\n\t});\n}\n/**\n* Returns a reducer for a comma-separated background array longhand property\n* (e.g. `background-image`, `background-repeat`, `background-position`, `background-attachment`).\n*\n* Serializes an array of per-layer values back into a comma-separated CSS string.\n*\n* @param property The CSS property name to output, e.g. `'background-image'`.\n*/\nfunction getBackgroundArrayPropertyReducer(property) {\n\treturn (value) => {\n\t\treturn [[property, value.join(\", \")]];\n\t};\n}\n/**\n* Returns a reducer for the `background` property. Depending on which longhand properties are present, it either:\n*\n* * Serializes into a concise `background` shorthand if all required longhand properties are present and non-empty, or\n* * Serializes into individual longhand properties for those that have defined values.\n*\n* This prevents overwriting external stylesheet rules with default values that were not explicitly set in the model.\n* For example, if only `background-color` is defined in the model, we emit just `background-color` rather than\n* the full `background` shorthand, which would reset all other sub-properties to their initial values.\n*/\nfunction getBackgroundReducer() {\n\treturn (value) => {\n\t\tconst background = value;\n\t\tif (Object.keys(BACKGROUND_INITIAL_ARRAY_VALUES).every((key) => {\n\t\t\tconst value = background[key];\n\t\t\treturn value !== void 0 && (!Array.isArray(value) || value.length > 0);\n\t\t})) return serializeToShorthandBackground(background);\n\t\treturn serializeToLonghandBackground(background);\n\t};\n}\n/**\n* Serializes a structured `Background` object into a concise CSS `background` shorthand string.\n*/\nfunction serializeToShorthandBackground(background) {\n\tconst result = [];\n\tconst shorthand = extractBackgroundLayers(background).map((layer) => serializeBackgroundLayer(layer).trim()).filter(Boolean).join(\", \");\n\tif (shorthand) result.push([\"background\", shorthand]);\n\treturn result;\n}\n/**\n* Serializes a structured `Background` object into individual CSS longhand properties for those that have defined values.\n* Each longhand property is serialized into a comma-separated string of per-layer values.\n*\n* This is used when not all required longhand properties are present, to avoid emitting default values for missing properties\n* and potentially overwriting external stylesheet rules.\n*/\nfunction serializeToLonghandBackground(background) {\n\tconst result = [];\n\tfor (const key in BACKGROUND_INITIAL_ARRAY_VALUES) {\n\t\tconst value = background[key];\n\t\tif (Array.isArray(value)) result.push([`background-${key}`, value.join(\", \")]);\n\t}\n\tif (background.color !== void 0) result.push([\"background-color\", background.color]);\n\treturn result;\n}\n/**\n* Serializes a single `BackgroundLayer` into a CSS background layer string.\n* Properties equal to their CSS initial values are omitted.\n*\n* @param layer A single background layer to serialize.\n* @returns A space-separated CSS string for the layer, or an empty string if no parts are present.\n*/\nfunction serializeBackgroundLayer(layer) {\n\tconst parts = [];\n\tif (layer.image && layer.image !== BACKGROUND_INITIAL_ARRAY_VALUES.image) parts.push(layer.image);\n\tconst positionStr = layer.position.join(\" \");\n\tconst isPositionDefault = !positionStr || positionStr === BACKGROUND_INITIAL_ARRAY_VALUES.position;\n\tif (!isPositionDefault) parts.push(positionStr);\n\tconst sizeStr = layer.size.join(\" \");\n\tif (!(!sizeStr || sizeStr === BACKGROUND_INITIAL_ARRAY_VALUES.size)) {\n\t\tif (isPositionDefault) parts.push(\"0% 0%\");\n\t\tparts.push(\"/\", sizeStr);\n\t}\n\tconst repeatStr = layer.repeat.join(\" \");\n\tif (repeatStr && repeatStr !== BACKGROUND_INITIAL_ARRAY_VALUES.repeat) parts.push(repeatStr);\n\tif (layer.attachment && layer.attachment !== BACKGROUND_INITIAL_ARRAY_VALUES.attachment) parts.push(layer.attachment);\n\tconst isOriginDefault = layer.origin === BACKGROUND_INITIAL_ARRAY_VALUES.origin;\n\tconst isClipDefault = layer.clip === BACKGROUND_INITIAL_ARRAY_VALUES.clip;\n\tif (!isOriginDefault || !isClipDefault) {\n\t\tparts.push(layer.origin);\n\t\tif (layer.clip !== layer.origin) parts.push(layer.clip);\n\t}\n\tif (layer.color) parts.push(layer.color);\n\treturn parts.join(\" \");\n}\n/**\n* Splits a structured `Background` object into an array of individual `BackgroundLayer` objects.\n*\n* The number of layers is determined by the longest array among the longhand properties.\n* The `color` value, if present, is always assigned to the last layer (per CSS spec).\n*\n* @param background The structured background object to split.\n* @returns An array of per-layer background objects.\n*\n* @example\n* // Input: { image: [ 'url(a.png)', 'url(b.png)' ], repeat: [ 'no-repeat', 'repeat' ], color: 'blue' }\n* // Output: [\n* //   { image: 'url(a.png)', repeat: [ 'no-repeat' ] },\n* //   { image: 'url(b.png)', repeat: [ 'repeat' ], color: 'blue' }\n* // ]\n*/\nfunction extractBackgroundLayers(background) {\n\tconst layerCount = getTotalBackgroundLayers(background);\n\tconst layers = Array.from({ length: layerCount }, (_, i) => {\n\t\tconst layer = getDefaultBackgroundLayer();\n\t\tif (background.image?.[i]) layer.image = background.image[i];\n\t\tif (background.position?.[i]) layer.position = background.position[i].split(\" \");\n\t\tif (background.size?.[i]) layer.size = background.size[i].split(\" \");\n\t\tif (background.repeat?.[i]) layer.repeat = background.repeat[i].split(\" \");\n\t\tif (background.attachment?.[i]) layer.attachment = background.attachment[i];\n\t\tif (background.origin?.[i]) layer.origin = background.origin[i];\n\t\tif (background.clip?.[i]) layer.clip = background.clip[i];\n\t\treturn layer;\n\t});\n\tif (background.color) layers.at(-1).color = background.color;\n\treturn layers;\n}\n/**\n* Determines the total number of background layers based on the longest array among the longhand properties in the `Background` object.\n*\n* @param background The structured background object to analyze.\n* @returns The total number of layers, which is the maximum length among the longhand property arrays.\n*/\nfunction getTotalBackgroundLayers(background) {\n\tlet layersCount = 0;\n\tfor (const value of Object.values(background)) if (Array.isArray(value) && value.length > layersCount) layersCount = value.length;\n\treturn layersCount;\n}\n/**\n* Merges an array of `BackgroundLayer` objects into a single structured `Background` object,\n* storing each longhand property as an array of per-layer values.\n*\n* Each input layer always has all properties defined (via `getDefaultBackgroundLayer`),\n* so the resulting arrays are fully populated for every layer.\n*\n* @param layers An array of parsed background layers.\n* @returns A merged `Background` object.\n*\n* @example\n* // Input: [ { image: 'url(a.png)', repeat: [ 'no-repeat' ], position: [ '0%', '0%' ], ... }, { image: 'none', color: 'red', ... } ]\n* // Output: {\n* //   image: [ 'url(a.png)', 'none' ],\n* //   position: [ '0% 0%', '0% 0%' ],\n* //   repeat: [ 'no-repeat', 'repeat' ],\n* //   ...\n* //   color: 'red'\n* // }\n*/\nfunction normalizeBackgroundLayers(layers) {\n\tconst background = {\n\t\timage: [],\n\t\tposition: [],\n\t\tsize: [],\n\t\trepeat: [],\n\t\tattachment: [],\n\t\torigin: [],\n\t\tclip: []\n\t};\n\tfor (const layer of layers) {\n\t\tbackground.position.push(layer.position.join(\" \"));\n\t\tbackground.size.push(layer.size.join(\" \"));\n\t\tbackground.repeat.push(layer.repeat.join(\" \"));\n\t\tbackground.image.push(layer.image);\n\t\tbackground.attachment.push(layer.attachment);\n\t\tbackground.origin.push(layer.origin);\n\t\tbackground.clip.push(layer.clip);\n\t}\n\tif (layers.at(-1)?.color) background.color = layers.at(-1).color;\n\treturn background;\n}\n/**\n* Parses a raw CSS `background` value and splits it into an array of `BackgroundLayer` objects,\n* one per comma-separated layer.\n*\n* The CSS `background` shorthand syntax is:\n* `background: [ <bg-layer> , ]* <final-bg-layer>`\n*\n* Commas inside function calls (e.g. `rgba()`, `linear-gradient()`) are correctly ignored\n* during splitting.\n*\n* @param value The raw CSS background value string.\n* @returns An array of parsed background layers.\n*\n* @example\n* splitBackgroundIntoLayers( 'url(a.png) no-repeat, red' );\n* // → [ { image: 'url(a.png)', repeat: [ 'no-repeat' ] }, { color: 'red' } ]\n*/\nfunction parseBackgroundIntoLayers(value) {\n\treturn splitByTopLevelCommas(value).map(parseBackgroundLayer).filter((obj) => obj !== null);\n}\n/**\n* Parses a single CSS background layer string into a structured `BackgroundLayer` object.\n*\n* First extracts any image function (gradient or `url()`), then classifies the remaining\n* space-separated tokens as repeat, position, attachment, or color values.\n*\n* @param layer A single (non-comma-separated) background layer string.\n* @returns A structured background layer object. If no valid properties were found, returns `null`.\n*\n* @example\n* parseBackgroundLayer( 'url(bg.png) top left no-repeat fixed' );\n* // → { image: 'url(bg.png)', position: [ 'top', 'left' ], repeat: [ 'no-repeat' ], attachment: 'fixed' }\n*/\nfunction parseBackgroundLayer(layer) {\n\tconst background = {};\n\tconst { value: valueWithoutImage, image } = extractBackgroundImage(layer);\n\tconst parts = getShorthandStylesValues(valueWithoutImage);\n\tif (image) background.image = image;\n\tfor (let i = 0; i < parts.length; i++) {\n\t\tconst part = parts[i];\n\t\tif (part === \"/\") {\n\t\t\tbackground.size = [];\n\t\t\twhile (i + 1 < parts.length && isSizeStyleValue(parts[i + 1])) background.size.push(parts[++i]);\n\t\t} else if (isRepeatStyleValue(part)) {\n\t\t\tbackground.repeat ||= [];\n\t\t\tbackground.repeat.push(part);\n\t\t} else if (isPositionStyleValue(part) || isPercentageStyleValue(part)) {\n\t\t\tbackground.position ||= [];\n\t\t\tbackground.position.push(part);\n\t\t\tif (i + 1 < parts.length && isPercentageStyleValue(part) && isPercentageStyleValue(parts[i + 1])) background.position.push(parts[++i]);\n\t\t} else if (isAttachmentStyleValue(part)) background.attachment = part;\n\t\telse if (isClipStyleValue(part)) {\n\t\t\tif (isOriginStyleValue(part) && !background.origin) {\n\t\t\t\tbackground.origin = part;\n\t\t\t\tbackground.clip = part;\n\t\t\t} else background.clip = part;\n\t\t} else if (isColorStyleValue(part)) background.color = part;\n\t}\n\tif (isEmpty(background)) return null;\n\treturn {\n\t\t...getDefaultBackgroundLayer(),\n\t\t...background\n\t};\n}\n/**\n* Returns a `BackgroundLayer` object with all properties set to their CSS initial values.\n*\n* Used as the base when parsing the `background` shorthand so that every property of a parsed\n* layer always has a defined value.\n*\n* @returns A background layer with default values.\n*/\nfunction getDefaultBackgroundLayer() {\n\treturn {\n\t\tattachment: BACKGROUND_INITIAL_ARRAY_VALUES.attachment,\n\t\timage: BACKGROUND_INITIAL_ARRAY_VALUES.image,\n\t\torigin: BACKGROUND_INITIAL_ARRAY_VALUES.origin,\n\t\tclip: BACKGROUND_INITIAL_ARRAY_VALUES.clip,\n\t\tposition: BACKGROUND_INITIAL_ARRAY_VALUES.position.split(\" \"),\n\t\trepeat: BACKGROUND_INITIAL_ARRAY_VALUES.repeat.split(\" \"),\n\t\tsize: BACKGROUND_INITIAL_ARRAY_VALUES.size.split(\" \")\n\t};\n}\n/**\n* Extracts the first CSS image function (`linear-gradient`, `url`, etc.) from a raw CSS value string\n* and returns it separately along with the remaining string with the image function removed.\n*\n* Handles arbitrarily nested parentheses correctly (e.g. `rgba()` inside a gradient).\n* Only one image function is extracted per call — the caller is responsible for looping\n* if multiple image functions may be present.\n*\n* @param value The raw CSS value string to process.\n* @returns An object with `value` (the string with the image function removed) and\n*          `image` (the extracted function string, or `null` if none was found).\n*\n* @example\n* extractBackgroundImage( 'linear-gradient(red, blue) no-repeat' );\n* // → { value: ' no-repeat', image: 'linear-gradient(red, blue)' }\n*/\nfunction extractBackgroundImage(value) {\n\tfor (const imageFunction of IMAGE_FUNCTIONS) {\n\t\tconst prefix = imageFunction + \"(\";\n\t\tconst firstIndex = value.indexOf(prefix);\n\t\tif (firstIndex < 0) continue;\n\t\tlet acc = imageFunction;\n\t\tlet nesting = 0;\n\t\tfor (let i = firstIndex + imageFunction.length; i < value.length; i++) {\n\t\t\tconst char = value[i];\n\t\t\tif (char === \"(\") nesting++;\n\t\t\telse if (char === \")\") nesting--;\n\t\t\tacc += char;\n\t\t\tif (nesting === 0) return {\n\t\t\t\tvalue: value.slice(0, firstIndex) + value.slice(i + 1),\n\t\t\t\timage: acc\n\t\t\t};\n\t\t}\n\t}\n\tif (value.includes(\"none\")) return {\n\t\tvalue: value.replace(\"none\", \"\"),\n\t\timage: \"none\"\n\t};\n\treturn {\n\t\tvalue,\n\t\timage: null\n\t};\n}\n/**\n* Splits a CSS value string by commas that are at the top level (i.e. not inside parentheses).\n*\n* This is necessary because commas appear both as layer separators in the `background` shorthand\n* and as argument separators inside functions like `rgba()` or `linear-gradient()`.\n*\n* @param value The CSS value string to split.\n* @returns An array of trimmed top-level comma-separated segments.\n*\n* @example\n* splitByTopLevelCommas( 'linear-gradient(red, blue), center' );\n* // → [ 'linear-gradient(red, blue)', 'center' ]\n*/\nfunction splitByTopLevelCommas(value) {\n\tconst parts = [];\n\tlet current = \"\";\n\tlet nesting = 0;\n\tfor (const char of value) {\n\t\tif (char === \"(\") nesting++;\n\t\telse if (char === \")\") nesting--;\n\t\telse if (char === \",\" && nesting === 0) {\n\t\t\tparts.push(current.trim());\n\t\t\tcurrent = \"\";\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\tif (current.trim()) parts.push(current.trim());\n\treturn parts;\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* Adds a border CSS styles processing rules.\n*\n* ```ts\n* editor.data.addStyleProcessorRules( addBorderStylesRules );\n* ```\n*\n* This rules merges all [border](https://developer.mozilla.org/en-US/docs/Web/CSS/border) styles notation shorthands:\n*\n* - border\n* - border-top\n* - border-right\n* - border-bottom\n* - border-left\n* - border-color\n* - border-style\n* - border-width\n*\n* and all corresponding longhand forms (like `border-top-color`, `border-top-style`, etc).\n*\n* It does not handle other shorthands (like `border-radius` or `border-image`).\n*/\nfunction addBorderStylesRules(stylesProcessor) {\n\tstylesProcessor.setNormalizer(\"border\", getBorderNormalizer());\n\tstylesProcessor.setNormalizer(\"border-top\", getBorderPositionNormalizer(\"top\"));\n\tstylesProcessor.setNormalizer(\"border-right\", getBorderPositionNormalizer(\"right\"));\n\tstylesProcessor.setNormalizer(\"border-bottom\", getBorderPositionNormalizer(\"bottom\"));\n\tstylesProcessor.setNormalizer(\"border-left\", getBorderPositionNormalizer(\"left\"));\n\tstylesProcessor.setNormalizer(\"border-color\", getBorderPropertyNormalizer(\"color\"));\n\tstylesProcessor.setNormalizer(\"border-width\", getBorderPropertyNormalizer(\"width\"));\n\tstylesProcessor.setNormalizer(\"border-style\", getBorderPropertyNormalizer(\"style\"));\n\tstylesProcessor.setNormalizer(\"border-top-color\", getBorderPropertyPositionNormalizer(\"color\", \"top\"));\n\tstylesProcessor.setNormalizer(\"border-top-style\", getBorderPropertyPositionNormalizer(\"style\", \"top\"));\n\tstylesProcessor.setNormalizer(\"border-top-width\", getBorderPropertyPositionNormalizer(\"width\", \"top\"));\n\tstylesProcessor.setNormalizer(\"border-right-color\", getBorderPropertyPositionNormalizer(\"color\", \"right\"));\n\tstylesProcessor.setNormalizer(\"border-right-style\", getBorderPropertyPositionNormalizer(\"style\", \"right\"));\n\tstylesProcessor.setNormalizer(\"border-right-width\", getBorderPropertyPositionNormalizer(\"width\", \"right\"));\n\tstylesProcessor.setNormalizer(\"border-bottom-color\", getBorderPropertyPositionNormalizer(\"color\", \"bottom\"));\n\tstylesProcessor.setNormalizer(\"border-bottom-style\", getBorderPropertyPositionNormalizer(\"style\", \"bottom\"));\n\tstylesProcessor.setNormalizer(\"border-bottom-width\", getBorderPropertyPositionNormalizer(\"width\", \"bottom\"));\n\tstylesProcessor.setNormalizer(\"border-left-color\", getBorderPropertyPositionNormalizer(\"color\", \"left\"));\n\tstylesProcessor.setNormalizer(\"border-left-style\", getBorderPropertyPositionNormalizer(\"style\", \"left\"));\n\tstylesProcessor.setNormalizer(\"border-left-width\", getBorderPropertyPositionNormalizer(\"width\", \"left\"));\n\tstylesProcessor.setExtractor(\"border-top\", getBorderPositionExtractor(\"top\"));\n\tstylesProcessor.setExtractor(\"border-right\", getBorderPositionExtractor(\"right\"));\n\tstylesProcessor.setExtractor(\"border-bottom\", getBorderPositionExtractor(\"bottom\"));\n\tstylesProcessor.setExtractor(\"border-left\", getBorderPositionExtractor(\"left\"));\n\tstylesProcessor.setExtractor(\"border-top-color\", \"border.color.top\");\n\tstylesProcessor.setExtractor(\"border-right-color\", \"border.color.right\");\n\tstylesProcessor.setExtractor(\"border-bottom-color\", \"border.color.bottom\");\n\tstylesProcessor.setExtractor(\"border-left-color\", \"border.color.left\");\n\tstylesProcessor.setExtractor(\"border-top-width\", \"border.width.top\");\n\tstylesProcessor.setExtractor(\"border-right-width\", \"border.width.right\");\n\tstylesProcessor.setExtractor(\"border-bottom-width\", \"border.width.bottom\");\n\tstylesProcessor.setExtractor(\"border-left-width\", \"border.width.left\");\n\tstylesProcessor.setExtractor(\"border-top-style\", \"border.style.top\");\n\tstylesProcessor.setExtractor(\"border-right-style\", \"border.style.right\");\n\tstylesProcessor.setExtractor(\"border-bottom-style\", \"border.style.bottom\");\n\tstylesProcessor.setExtractor(\"border-left-style\", \"border.style.left\");\n\tstylesProcessor.setReducer(\"border-color\", getBoxSidesStyleValueReducer(\"border-color\"));\n\tstylesProcessor.setReducer(\"border-style\", getBoxSidesStyleValueReducer(\"border-style\"));\n\tstylesProcessor.setReducer(\"border-width\", getBoxSidesStyleValueReducer(\"border-width\"));\n\tstylesProcessor.setReducer(\"border-top\", getBorderPositionReducer(\"top\"));\n\tstylesProcessor.setReducer(\"border-right\", getBorderPositionReducer(\"right\"));\n\tstylesProcessor.setReducer(\"border-bottom\", getBorderPositionReducer(\"bottom\"));\n\tstylesProcessor.setReducer(\"border-left\", getBorderPositionReducer(\"left\"));\n\tstylesProcessor.setReducer(\"border\", getBorderReducer());\n\tstylesProcessor.setStyleRelation(\"border\", [\n\t\t\"border-color\",\n\t\t\"border-style\",\n\t\t\"border-width\",\n\t\t\"border-top\",\n\t\t\"border-right\",\n\t\t\"border-bottom\",\n\t\t\"border-left\",\n\t\t\"border-top-color\",\n\t\t\"border-right-color\",\n\t\t\"border-bottom-color\",\n\t\t\"border-left-color\",\n\t\t\"border-top-style\",\n\t\t\"border-right-style\",\n\t\t\"border-bottom-style\",\n\t\t\"border-left-style\",\n\t\t\"border-top-width\",\n\t\t\"border-right-width\",\n\t\t\"border-bottom-width\",\n\t\t\"border-left-width\"\n\t]);\n\tstylesProcessor.setStyleRelation(\"border-color\", [\n\t\t\"border-top-color\",\n\t\t\"border-right-color\",\n\t\t\"border-bottom-color\",\n\t\t\"border-left-color\"\n\t]);\n\tstylesProcessor.setStyleRelation(\"border-style\", [\n\t\t\"border-top-style\",\n\t\t\"border-right-style\",\n\t\t\"border-bottom-style\",\n\t\t\"border-left-style\"\n\t]);\n\tstylesProcessor.setStyleRelation(\"border-width\", [\n\t\t\"border-top-width\",\n\t\t\"border-right-width\",\n\t\t\"border-bottom-width\",\n\t\t\"border-left-width\"\n\t]);\n\tstylesProcessor.setStyleRelation(\"border-top\", [\n\t\t\"border-top-color\",\n\t\t\"border-top-style\",\n\t\t\"border-top-width\"\n\t]);\n\tstylesProcessor.setStyleRelation(\"border-right\", [\n\t\t\"border-right-color\",\n\t\t\"border-right-style\",\n\t\t\"border-right-width\"\n\t]);\n\tstylesProcessor.setStyleRelation(\"border-bottom\", [\n\t\t\"border-bottom-color\",\n\t\t\"border-bottom-style\",\n\t\t\"border-bottom-width\"\n\t]);\n\tstylesProcessor.setStyleRelation(\"border-left\", [\n\t\t\"border-left-color\",\n\t\t\"border-left-style\",\n\t\t\"border-left-width\"\n\t]);\n}\nfunction getBorderNormalizer() {\n\treturn (value) => {\n\t\tconst { color, style, width } = normalizeBorderShorthand(value);\n\t\treturn {\n\t\t\tpath: \"border\",\n\t\t\tvalue: {\n\t\t\t\tcolor: getBoxSidesStyleValues(color),\n\t\t\t\tstyle: getBoxSidesStyleValues(style),\n\t\t\t\twidth: getBoxSidesStyleValues(width)\n\t\t\t}\n\t\t};\n\t};\n}\nfunction getBorderPositionNormalizer(side) {\n\treturn (value) => {\n\t\tconst { color, style, width } = normalizeBorderShorthand(value);\n\t\tconst border = {};\n\t\tif (color !== void 0) border.color = { [side]: color };\n\t\tif (style !== void 0) border.style = { [side]: style };\n\t\tif (width !== void 0) border.width = { [side]: width };\n\t\treturn {\n\t\t\tpath: \"border\",\n\t\t\tvalue: border\n\t\t};\n\t};\n}\nfunction getBorderPropertyNormalizer(propertyName) {\n\treturn (value) => {\n\t\treturn {\n\t\t\tpath: \"border\",\n\t\t\tvalue: toBorderPropertyShorthand(value, propertyName)\n\t\t};\n\t};\n}\nfunction toBorderPropertyShorthand(value, property) {\n\treturn { [property]: getBoxSidesStyleValues(value) };\n}\nfunction getBorderPropertyPositionNormalizer(property, side) {\n\treturn (value) => {\n\t\treturn {\n\t\t\tpath: \"border\",\n\t\t\tvalue: { [property]: { [side]: value } }\n\t\t};\n\t};\n}\nfunction getBorderPositionExtractor(which) {\n\treturn (name, styles) => {\n\t\tif (styles.border) return extractBorderPosition(styles.border, which);\n\t};\n}\nfunction extractBorderPosition(border, which) {\n\tconst value = {};\n\tif (border.width && border.width[which]) value.width = border.width[which];\n\tif (border.style && border.style[which]) value.style = border.style[which];\n\tif (border.color && border.color[which]) value.color = border.color[which];\n\treturn value;\n}\nfunction normalizeBorderShorthand(string) {\n\tconst result = {};\n\tconst parts = getShorthandStylesValues(string);\n\tfor (const part of parts) if (isLengthStyleValue(part) || /thin|medium|thick/.test(part)) result.width = part;\n\telse if (isLineStyleValue(part)) result.style = part;\n\telse result.color = part;\n\treturn result;\n}\n/**\n* The border reducer factory.\n*\n* It tries to produce the most optimal output for the specified styles.\n*\n* For a border style:\n*\n* ```css\n* style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n* ```\n*\n* It will produce: `border-style: solid`.\n* For a border style and color:\n*\n* ```css\n* color: {top: \"#ff0\", bottom: \"#ff0\", right: \"#ff0\", left: \"#ff0\"}\n* style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n* ```\n*\n* It will produce: `border-color: #ff0; border-style: solid`.\n* If all border parameters are specified:\n*\n* ```css\n* color: {top: \"#ff0\", bottom: \"#ff0\", right: \"#ff0\", left: \"#ff0\"}\n* style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n* width: {top: \"2px\", bottom: \"2px\", right: \"2px\", left: \"2px\"}\n* ```\n*\n* It will combine everything into a single property: `border: 2px solid #ff0`.\n*\n* The definitions are merged only if all border selectors have the same values.\n*/\nfunction getBorderReducer() {\n\treturn (value) => {\n\t\tconst topStyles = extractBorderPosition(value, \"top\");\n\t\tconst rightStyles = extractBorderPosition(value, \"right\");\n\t\tconst bottomStyles = extractBorderPosition(value, \"bottom\");\n\t\tconst leftStyles = extractBorderPosition(value, \"left\");\n\t\tconst borderStyles = [\n\t\t\ttopStyles,\n\t\t\trightStyles,\n\t\t\tbottomStyles,\n\t\t\tleftStyles\n\t\t];\n\t\tconst borderStylesByType = {\n\t\t\twidth: getReducedStyleValueForType(borderStyles, \"width\"),\n\t\t\tstyle: getReducedStyleValueForType(borderStyles, \"style\"),\n\t\t\tcolor: getReducedStyleValueForType(borderStyles, \"color\")\n\t\t};\n\t\tconst reducedBorderStyle = reduceBorderPosition(borderStylesByType, \"all\");\n\t\tif (reducedBorderStyle.length) return reducedBorderStyle;\n\t\treturn [\n\t\t\t...Object.entries(borderStylesByType).reduce((reducedStyleTypes, [type, value]) => {\n\t\t\t\tif (value) {\n\t\t\t\t\treducedStyleTypes.push([`border-${type}`, value]);\n\t\t\t\t\tborderStyles.forEach((style) => delete style[type]);\n\t\t\t\t}\n\t\t\t\treturn reducedStyleTypes;\n\t\t\t}, []),\n\t\t\t...reduceBorderPosition(topStyles, \"top\"),\n\t\t\t...reduceBorderPosition(rightStyles, \"right\"),\n\t\t\t...reduceBorderPosition(bottomStyles, \"bottom\"),\n\t\t\t...reduceBorderPosition(leftStyles, \"left\")\n\t\t];\n\t};\n\t/**\n\t* @param styles The array of objects with `style`, `color`, `width` properties.\n\t*/\n\tfunction getReducedStyleValueForType(styles, type) {\n\t\treturn styles.map((style) => style[type]).reduce((result, style) => result == style ? result : null);\n\t}\n}\nfunction getBorderPositionReducer(which) {\n\treturn (value) => reduceBorderPosition(value, which);\n}\n/**\n* Returns an array with reduced border styles depending on the specified values.\n*\n* If all border properties (width, style, color) are specified, the returned selector will be\n* merged into a group: `border-*: [width] [style] [color]`.\n*\n* Otherwise, the specific definitions will be returned: `border-(width|style|color)-*: [value]`.\n*\n* @param value Styles if defined.\n* @param which The border position.\n*/\nfunction reduceBorderPosition(value, which) {\n\tconst borderTypes = [];\n\tif (value && value.width) borderTypes.push(\"width\");\n\tif (value && value.style) borderTypes.push(\"style\");\n\tif (value && value.color) borderTypes.push(\"color\");\n\tif (borderTypes.length == 3) {\n\t\tconst borderValue = borderTypes.map((item) => value[item]).join(\" \");\n\t\treturn [which == \"all\" ? [\"border\", borderValue] : [`border-${which}`, borderValue]];\n\t}\n\tif (which == \"all\") return [];\n\treturn borderTypes.map((type) => {\n\t\treturn [`border-${which}-${type}`, value[type]];\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* Adds a margin CSS styles processing rules.\n*\n* ```ts\n* editor.data.addStyleProcessorRules( addMarginStylesRules );\n* ```\n*/\nfunction addMarginStylesRules(stylesProcessor) {\n\tstylesProcessor.setNormalizer(\"margin\", getPositionStyleShorthandNormalizer(\"margin\"));\n\tstylesProcessor.setNormalizer(\"margin-top\", (value) => ({\n\t\tpath: \"margin.top\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setNormalizer(\"margin-right\", (value) => ({\n\t\tpath: \"margin.right\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setNormalizer(\"margin-bottom\", (value) => ({\n\t\tpath: \"margin.bottom\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setNormalizer(\"margin-left\", (value) => ({\n\t\tpath: \"margin.left\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setReducer(\"margin\", getBoxSidesStyleValueReducer(\"margin\"));\n\tstylesProcessor.setStyleRelation(\"margin\", [\n\t\t\"margin-top\",\n\t\t\"margin-right\",\n\t\t\"margin-bottom\",\n\t\t\"margin-left\"\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* Adds a padding CSS styles processing rules.\n*\n* ```ts\n* editor.data.addStyleProcessorRules( addPaddingStylesRules );\n* ```\n*/\nfunction addPaddingStylesRules(stylesProcessor) {\n\tstylesProcessor.setNormalizer(\"padding\", getPositionStyleShorthandNormalizer(\"padding\"));\n\tstylesProcessor.setNormalizer(\"padding-top\", (value) => ({\n\t\tpath: \"padding.top\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setNormalizer(\"padding-right\", (value) => ({\n\t\tpath: \"padding.right\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setNormalizer(\"padding-bottom\", (value) => ({\n\t\tpath: \"padding.bottom\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setNormalizer(\"padding-left\", (value) => ({\n\t\tpath: \"padding.left\",\n\t\tvalue\n\t}));\n\tstylesProcessor.setReducer(\"padding\", getBoxSidesStyleValueReducer(\"padding\"));\n\tstylesProcessor.setStyleRelation(\"padding\", [\n\t\t\"padding-top\",\n\t\t\"padding-right\",\n\t\t\"padding-bottom\",\n\t\t\"padding-left\"\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 engine/dev-utils/view\n*/\n/**\n* Collection of methods for manipulating the {@link module:engine/view/view view} for testing purposes.\n*/\nconst ELEMENT_RANGE_START_TOKEN = \"[\";\nconst ELEMENT_RANGE_END_TOKEN = \"]\";\nconst TEXT_RANGE_START_TOKEN = \"{\";\nconst TEXT_RANGE_END_TOKEN = \"}\";\nconst allowedTypes = {\n\t\"container\": ViewContainerElement,\n\t\"attribute\": ViewAttributeElement,\n\t\"empty\": ViewEmptyElement,\n\t\"ui\": ViewUIElement,\n\t\"raw\": ViewRawElement\n};\nconst domConverterStub = { setContentOf: (node, html) => {\n\tnode.innerHTML = html;\n} };\n/**\n* Writes the content of the {@link module:engine/view/document~ViewDocument document} to an HTML-like string.\n*\n* @param view The view to stringify.\n* @param options.withoutSelection Whether to write the selection. When set to `true`, the selection will\n* not be included in the returned string.\n* @param options.rootName The name of the root from which the data should be stringified. If not provided,\n* the default `main` name will be used.\n* @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n* instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n* @param options.showPriority When set to `true`, the attribute element's priority will be printed\n* (`<span view-priority=\"12\">`, `<b view-priority=\"10\">`).\n* @param options.renderUIElements When set to `true`, the inner content of each\n* {@link module:engine/view/uielement~ViewUIElement} will be printed.\n* @param options.renderRawElements When set to `true`, the inner content of each\n* {@link module:engine/view/rawelement~ViewRawElement} will be printed.\n* @param options.domConverter When set to an actual {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n* instance, it lets the conversion go through exactly the same flow the editing view is going through,\n* i.e. with view data filtering. Otherwise the simple stub is used.\n* @returns The stringified data.\n*/\nconst _getViewData = /* #__PURE__ */ (() => {\n\tconst getViewData = function(view, options = {}) {\n\t\tif (!(view instanceof EditingView)) throw new TypeError(\"View needs to be an instance of module:engine/view/view~EditingView.\");\n\t\tconst document = view.document;\n\t\tconst withoutSelection = !!options.withoutSelection;\n\t\tconst rootName = options.rootName || \"main\";\n\t\tconst root = document.getRoot(rootName);\n\t\tconst stringifyOptions = {\n\t\t\tshowType: options.showType,\n\t\t\tshowPriority: options.showPriority,\n\t\t\trenderUIElements: options.renderUIElements,\n\t\t\trenderRawElements: options.renderRawElements,\n\t\t\tignoreRoot: true,\n\t\t\tdomConverter: options.domConverter,\n\t\t\tskipListItemIds: options.skipListItemIds\n\t\t};\n\t\treturn withoutSelection ? getViewData._stringify(root, null, stringifyOptions) : getViewData._stringify(root, document.selection, stringifyOptions);\n\t};\n\tgetViewData._stringify = _stringifyView;\n\treturn getViewData;\n})();\n/**\n* Sets the content of a view {@link module:engine/view/document~ViewDocument document} provided as an HTML-like string.\n*\n* @param data An HTML-like string to write into the document.\n* @param options.rootName The root name where _parseViewd data will be stored. If not provided,\n* the default `main` name will be used.\n*/\nconst _setViewData = /* #__PURE__ */ (() => {\n\tconst setViewData = function(view, data, options = {}) {\n\t\tif (!(view instanceof EditingView)) throw new TypeError(\"View needs to be an instance of module:engine/view/view~EditingView.\");\n\t\tconst document = view.document;\n\t\tconst rootName = options.rootName || \"main\";\n\t\tconst root = document.getRoot(rootName);\n\t\tview.change((writer) => {\n\t\t\tconst result = setViewData._parse(data, { rootElement: root });\n\t\t\tif (result.view && result.selection) writer.setSelection(result.selection);\n\t\t});\n\t};\n\tsetViewData._parse = _parseView;\n\treturn setViewData;\n})();\n/**\n* Converts view elements to HTML-like string representation.\n*\n* A root element can be provided as {@link module:engine/view/text~ViewText text}:\n*\n* ```ts\n* const text = downcastWriter.createText( 'foobar' );\n* stringify( text ); // 'foobar'\n* ```\n*\n* or as an {@link module:engine/view/element~ViewElement element}:\n*\n* ```ts\n* const element = downcastWriter.createElement( 'p', null, downcastWriter.createText( 'foobar' ) );\n* stringify( element ); // '<p>foobar</p>'\n* ```\n*\n* or as a {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}:\n*\n* ```ts\n* const text = downcastWriter.createText( 'foobar' );\n* const b = downcastWriter.createElement( 'b', { name: 'test' }, text );\n* const p = downcastWriter.createElement( 'p', { style: 'color:red;' } );\n* const fragment = downcastWriter.createDocumentFragment( [ p, b ] );\n*\n* stringify( fragment ); // '<p style=\"color:red;\"></p><b name=\"test\">foobar</b>'\n* ```\n*\n* Additionally, a {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance can be provided.\n* Ranges from the selection will then be included in the output data.\n* If a range position is placed inside the element node, it will be represented with `[` and `]`:\n*\n* ```ts\n* const text = downcastWriter.createText( 'foobar' );\n* const b = downcastWriter.createElement( 'b', null, text );\n* const p = downcastWriter.createElement( 'p', null, b );\n* const selection = downcastWriter.createSelection(\n* \tdowncastWriter.createRangeIn( p )\n* );\n*\n* stringify( p, selection ); // '<p>[<b>foobar</b>]</p>'\n* ```\n*\n* If a range is placed inside the text node, it will be represented with `{` and `}`:\n*\n* ```ts\n* const text = downcastWriter.createText( 'foobar' );\n* const b = downcastWriter.createElement( 'b', null, text );\n* const p = downcastWriter.createElement( 'p', null, b );\n* const selection = downcastWriter.createSelection(\n* \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 1 ), downcastWriter.createPositionAt( text, 5 ) )\n* );\n*\n* stringify( p, selection ); // '<p><b>f{ooba}r</b></p>'\n* ```\n*\n* ** Note: **\n* It is possible to unify selection markers to `[` and `]` for both (inside and outside text)\n* by setting the `sameSelectionCharacters=true` option. It is mainly used when the view stringify option is used by\n* model utilities.\n*\n* Multiple ranges are supported:\n*\n* ```ts\n* const text = downcastWriter.createText( 'foobar' );\n* const selection = downcastWriter.createSelection( [\n* \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 0 ), downcastWriter.createPositionAt( text, 1 ) ),\n* \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 3 ), downcastWriter.createPositionAt( text, 5 ) )\n* ] );\n*\n* stringify( text, selection ); // '{f}oo{ba}r'\n* ```\n*\n* A {@link module:engine/view/range~ViewRange range} or {@link module:engine/view/position~ViewPosition position} instance can be provided\n* instead of the {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance. If a range instance\n* is provided, it will be converted to a selection containing this range. If a position instance is provided, it will\n* be converted to a selection containing one range collapsed at this position.\n*\n* ```ts\n* const text = downcastWriter.createText( 'foobar' );\n* const range = downcastWriter.createRange( downcastWriter.createPositionAt( text, 0 ), downcastWriter.createPositionAt( text, 1 ) );\n* const position = downcastWriter.createPositionAt( text, 3 );\n*\n* stringify( text, range ); // '{f}oobar'\n* stringify( text, position ); // 'foo{}bar'\n* ```\n*\n* An additional `options` object can be provided.\n* If `options.showType` is set to `true`, element's types will be\n* presented for {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements},\n* {@link module:engine/view/containerelement~ViewContainerElement container elements}\n* {@link module:engine/view/emptyelement~ViewEmptyElement empty elements}\n* and {@link module:engine/view/uielement~ViewUIElement UI elements}:\n*\n* ```ts\n* const attribute = downcastWriter.createAttributeElement( 'b' );\n* const container = downcastWriter.createContainerElement( 'p' );\n* const empty = downcastWriter.createEmptyElement( 'img' );\n* const ui = downcastWriter.createUIElement( 'span' );\n* getData( attribute, null, { showType: true } ); // '<attribute:b></attribute:b>'\n* getData( container, null, { showType: true } ); // '<container:p></container:p>'\n* getData( empty, null, { showType: true } ); // '<empty:img></empty:img>'\n* getData( ui, null, { showType: true } ); // '<ui:span></ui:span>'\n* ```\n*\n* If `options.showPriority` is set to `true`, a priority will be displayed for all\n* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements}.\n*\n* ```ts\n* const attribute = downcastWriter.createAttributeElement( 'b' );\n* attribute._priority = 20;\n* getData( attribute, null, { showPriority: true } ); // <b view-priority=\"20\"></b>\n* ```\n*\n* If `options.showAttributeElementId` is set to `true`, the attribute element's id will be displayed for all\n* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that have it set.\n*\n* ```ts\n* const attribute = downcastWriter.createAttributeElement( 'span' );\n* attribute._id = 'marker:foo';\n* getData( attribute, null, { showAttributeElementId: true } ); // <span view-id=\"marker:foo\"></span>\n* ```\n*\n* @param node The node to stringify.\n* @param selectionOrPositionOrRange A selection instance whose ranges will be included in the returned string data.\n* If a range instance is provided, it will be converted to a selection containing this range. If a position instance\n* is provided, it will be converted to a selection containing one range collapsed at this position.\n* @param options An object with additional options.\n* @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n* instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n* @param options.showPriority When set to `true`,  the attribute element's priority will be printed\n* (`<span view-priority=\"12\">`, `<b view-priority=\"10\">`).\n* @param options.showAttributeElementId When set to `true`, attribute element's id will be printed\n* (`<span id=\"marker:foo\">`).\n* @param options.ignoreRoot When set to `true`, the root's element opening and closing will not be printed.\n* Mainly used by the `getData` function to ignore the {@link module:engine/view/document~ViewDocument document's} root element.\n* @param options.sameSelectionCharacters When set to `true`, the selection inside the text will be marked as\n*  `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both will be marked as `[` and `]` only.\n* @param options.renderUIElements When set to `true`, the inner content of each\n* {@link module:engine/view/uielement~ViewUIElement} will be printed.\n* @param options.renderRawElements When set to `true`, the inner content of each\n* {@link module:engine/view/rawelement~ViewRawElement} will be printed.\n* @param options.domConverter When set to an actual {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n* instance, it lets the conversion go through exactly the same flow the editing view is going through,\n* i.e. with view data filtering. Otherwise the simple stub is used.\n* @returns An HTML-like string representing the view.\n*/\nfunction _stringifyView(node, selectionOrPositionOrRange = null, options = {}) {\n\tlet selection;\n\tif (selectionOrPositionOrRange instanceof ViewPosition || selectionOrPositionOrRange instanceof ViewRange) selection = new ViewDocumentSelection(selectionOrPositionOrRange);\n\telse selection = selectionOrPositionOrRange;\n\treturn new ViewStringify(node, selection, options).stringify();\n}\n/**\n* Parses an HTML-like string and returns a view tree.\n* A simple string will be converted to a {@link module:engine/view/text~ViewText text} node:\n*\n* ```ts\n* _parseView( 'foobar' ); // Returns an instance of text.\n* ```\n*\n* {@link module:engine/view/element~ViewElement Elements} will be _parseViewd with attributes as children:\n*\n* ```ts\n* _parseView( '<b name=\"baz\">foobar</b>' ); // Returns an instance of element with the `baz` attribute and a text child node.\n* ```\n*\n* Multiple nodes provided on root level will be converted to a\n* {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}:\n*\n* ```ts\n* _parseView( '<b>foo</b><i>bar</i>' ); // Returns a document fragment with two child elements.\n* ```\n*\n* The method can _parseView multiple {@link module:engine/view/range~ViewRange ranges} provided in string data and return a\n* {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance containing these ranges. Ranges placed inside\n* {@link module:engine/view/text~ViewText text} nodes should be marked using `{` and `}` brackets:\n*\n* ```ts\n* const { text, selection } = _parseView( 'f{ooba}r' );\n* ```\n*\n* Ranges placed outside text nodes should be marked using `[` and `]` brackets:\n*\n* ```ts\n* const { root, selection } = _parseView( '<p>[<b>foobar</b>]</p>' );\n* ```\n*\n* ** Note: **\n* It is possible to unify selection markers to `[` and `]` for both (inside and outside text)\n* by setting `sameSelectionCharacters=true` option. It is mainly used when the view _parseView option is used by model utilities.\n*\n* Sometimes there is a need for defining the order of ranges inside the created selection. This can be achieved by providing\n* the range order array as an additional parameter:\n*\n* ```ts\n* const { root, selection } = _parseView( '{fo}ob{ar}{ba}z', { order: [ 2, 3, 1 ] } );\n* ```\n*\n* In the example above, the first range (`{fo}`) will be added to the selection as the second one, the second range (`{ar}`) will be\n* added as the third and the third range (`{ba}`) will be added as the first one.\n*\n* If the selection's last range should be added as a backward one\n* (so the {@link module:engine/view/documentselection~ViewDocumentSelection#anchor selection anchor} is represented\n* by the `end` position and {@link module:engine/view/documentselection~ViewDocumentSelection#focus selection focus} is\n* represented by the `start` position), use the `lastRangeBackward` flag:\n*\n* ```ts\n* const { root, selection } = _parseView( `{foo}bar{baz}`, { lastRangeBackward: true } );\n* ```\n*\n* Some more examples and edge cases:\n*\n* ```ts\n* // Returns an empty document fragment.\n* _parseView( '' );\n*\n* // Returns an empty document fragment and a collapsed selection.\n* const { root, selection } = _parseView( '[]' );\n*\n* // Returns an element and a selection that is placed inside the document fragment containing that element.\n* const { root, selection } = _parseView( '[<a></a>]' );\n* ```\n*\n* @param data An HTML-like string to be parsed.\n* @param options.order An array with the order of parsed ranges added to the returned\n* {@link module:engine/view/documentselection~ViewDocumentSelection Selection} instance. Each element should represent the\n* desired position of each range in the selection instance. For example: `[2, 3, 1]` means that the first range will be\n* placed as the second, the second as the third and the third as the first.\n* @param options.lastRangeBackward If set to `true`, the last range will be added as backward to the returned\n* {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance.\n* @param options.rootElement The default root to use when parsing elements.\n* When set to `null`, the root element will be created automatically. If set to\n* {@link module:engine/view/element~ViewElement Element} or\n* {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment},\n* this node will be used as the root for all parsed nodes.\n* @param options.sameSelectionCharacters When set to `false`, the selection inside the text should be marked using\n* `{` and `}` and the selection outside the ext using `[` and `]`. When set to `true`, both should be marked with `[` and `]` only.\n* @returns Returns the parsed view node or an object with two fields: `view` and `selection` when selection ranges were included in the\n* data to parse.\n*/\nfunction _parseView(data, options = {}) {\n\tconst viewDocument = new ViewDocument(new StylesProcessor());\n\toptions.order = options.order || [];\n\tconst rangeParser = new RangeParser({ sameSelectionCharacters: options.sameSelectionCharacters });\n\tconst processor = new XmlDataProcessor(viewDocument, { namespaces: Object.keys(allowedTypes) });\n\tif (options.inlineObjectElements) processor.domConverter.inlineObjectElements.push(...options.inlineObjectElements);\n\tlet view = processor.toView(data);\n\tview = _convertViewElements(view);\n\tif (options.rootElement) {\n\t\tconst root = options.rootElement;\n\t\tconst nodes = view._removeChildren(0, view.childCount);\n\t\troot._removeChildren(0, root.childCount);\n\t\troot._appendChild(nodes);\n\t\tview = root;\n\t}\n\tconst ranges = rangeParser._parseView(view, options.order);\n\tif (view.is(\"documentFragment\") && view.childCount === 1) view = view.getChild(0);\n\tif (ranges.length) {\n\t\tconst selection = new ViewDocumentSelection(ranges, { backward: !!options.lastRangeBackward });\n\t\treturn {\n\t\t\tview,\n\t\t\tselection\n\t\t};\n\t}\n\tif (view.parent) view._remove();\n\treturn view;\n}\n/**\n* Private helper class used for converting ranges represented as text inside view {@link module:engine/view/text~ViewText text nodes}.\n*/\nvar RangeParser = class {\n\tsameSelectionCharacters;\n\t_positions;\n\t/**\n\t* Creates a range parser instance.\n\t*\n\t* @param options The range parser configuration.\n\t* @param options.sameSelectionCharacters When set to `true`, the selection inside the text is marked as\n\t* `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both are marked as `[` and `]`.\n\t*/\n\tconstructor(options) {\n\t\tthis.sameSelectionCharacters = !!options.sameSelectionCharacters;\n\t}\n\t/**\n\t* Parses the view and returns ranges represented inside {@link module:engine/view/text~ViewText text nodes}.\n\t* The method will remove all occurrences of `{`, `}`, `[` and `]` from found text nodes. If a text node is empty after\n\t* the process, it will be removed, too.\n\t*\n\t* @param node The starting node.\n\t* @param order The order of ranges. Each element should represent the desired position of the range after\n\t* sorting. For example: `[2, 3, 1]` means that the first range will be placed as the second, the second as the third and the third\n\t* as the first.\n\t* @returns An array with ranges found.\n\t*/\n\t_parseView(node, order) {\n\t\tthis._positions = [];\n\t\tthis._getPositions(node);\n\t\tlet ranges = this._createRanges();\n\t\tif (order.length) {\n\t\t\tif (order.length != ranges.length) throw new Error(`Parse error - there are ${ranges.length} ranges found, but ranges order array contains ${order.length} elements.`);\n\t\t\tranges = this._sortRanges(ranges, order);\n\t\t}\n\t\treturn ranges;\n\t}\n\t/**\n\t* Gathers positions of brackets inside the view tree starting from the provided node. The method will remove all occurrences of\n\t* `{`, `}`, `[` and `]` from found text nodes. If a text node is empty after the process, it will be removed, too.\n\t*\n\t* @param node Staring node.\n\t*/\n\t_getPositions(node) {\n\t\tif (node.is(\"documentFragment\") || node.is(\"element\")) {\n\t\t\tconst children = [...node.getChildren()];\n\t\t\tfor (const child of children) this._getPositions(child);\n\t\t}\n\t\tif (node.is(\"$text\")) {\n\t\t\tconst regexp = new RegExp(`[${TEXT_RANGE_START_TOKEN}${TEXT_RANGE_END_TOKEN}\\\\${ELEMENT_RANGE_END_TOKEN}\\\\${ELEMENT_RANGE_START_TOKEN}]`, \"g\");\n\t\t\tlet text = node.data;\n\t\t\tlet match;\n\t\t\tlet offset = 0;\n\t\t\tconst brackets = [];\n\t\t\twhile (match = regexp.exec(text)) {\n\t\t\t\tconst index = match.index;\n\t\t\t\tconst bracket = match[0];\n\t\t\t\tbrackets.push({\n\t\t\t\t\tbracket,\n\t\t\t\t\ttextOffset: index - offset\n\t\t\t\t});\n\t\t\t\toffset++;\n\t\t\t}\n\t\t\ttext = text.replace(regexp, \"\");\n\t\t\tnode._data = text;\n\t\t\tconst index = node.index;\n\t\t\tconst parent = node.parent;\n\t\t\tif (!text) node._remove();\n\t\t\tfor (const item of brackets) if (text) {\n\t\t\t\tif (this.sameSelectionCharacters || !this.sameSelectionCharacters && (item.bracket == TEXT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN)) this._positions.push({\n\t\t\t\t\tbracket: item.bracket,\n\t\t\t\t\tposition: new ViewPosition(node, item.textOffset)\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tif (!this.sameSelectionCharacters && item.textOffset !== 0 && item.textOffset !== text.length) throw new Error(`Parse error - range delimiter '${item.bracket}' is placed inside text node.`);\n\t\t\t\t\tconst offset = item.textOffset === 0 ? index : index + 1;\n\t\t\t\t\tthis._positions.push({\n\t\t\t\t\t\tbracket: item.bracket,\n\t\t\t\t\t\tposition: new ViewPosition(parent, offset)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!this.sameSelectionCharacters && item.bracket == TEXT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN) throw new Error(`Parse error - text range delimiter '${item.bracket}' is placed inside empty text node. `);\n\t\t\t\tthis._positions.push({\n\t\t\t\t\tbracket: item.bracket,\n\t\t\t\t\tposition: new ViewPosition(parent, index)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Sorts ranges in a given order. Range order should be an array and each element should represent the desired position\n\t* of the range after sorting.\n\t* For example: `[2, 3, 1]` means that the first range will be placed as the second, the second as the third and the third\n\t* as the first.\n\t*\n\t* @param ranges Ranges to sort.\n\t* @param rangesOrder An array with new range order.\n\t* @returns Sorted ranges array.\n\t*/\n\t_sortRanges(ranges, rangesOrder) {\n\t\tconst sortedRanges = [];\n\t\tlet index = 0;\n\t\tfor (const newPosition of rangesOrder) {\n\t\t\tif (ranges[newPosition - 1] === void 0) throw new Error(\"Parse error - provided ranges order is invalid.\");\n\t\t\tsortedRanges[newPosition - 1] = ranges[index];\n\t\t\tindex++;\n\t\t}\n\t\treturn sortedRanges;\n\t}\n\t/**\n\t* Uses all found bracket positions to create ranges from them.\n\t*/\n\t_createRanges() {\n\t\tconst ranges = [];\n\t\tlet range = null;\n\t\tfor (const item of this._positions) {\n\t\t\tif (!range && (item.bracket == ELEMENT_RANGE_END_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN)) throw new Error(`Parse error - end of range was found '${item.bracket}' but range was not started before.`);\n\t\t\tif (range && (item.bracket == ELEMENT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_START_TOKEN)) throw new Error(`Parse error - start of range was found '${item.bracket}' but one range is already started.`);\n\t\t\tif (item.bracket == ELEMENT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_START_TOKEN) range = new ViewRange(item.position, item.position);\n\t\t\telse {\n\t\t\t\trange.end = item.position;\n\t\t\t\tranges.push(range);\n\t\t\t\trange = null;\n\t\t\t}\n\t\t}\n\t\tif (range !== null) throw new Error(\"Parse error - range was started but no end delimiter was found.\");\n\t\treturn ranges;\n\t}\n};\n/**\n* Private helper class used for converting the view tree to a string.\n*/\nvar ViewStringify = class {\n\troot;\n\tselection;\n\tranges;\n\tshowType;\n\tshowPriority;\n\tshowAttributeElementId;\n\tignoreRoot;\n\tsameSelectionCharacters;\n\trenderUIElements;\n\trenderRawElements;\n\tdomConverter;\n\tskipListItemIds;\n\t/**\n\t* Creates a view stringify instance.\n\t*\n\t* @param selection A selection whose ranges should also be converted to a string.\n\t* @param options An options object.\n\t* @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n\t* instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n\t* @param options.showPriority When set to `true`, the attribute element's priority will be printed.\n\t* @param options.ignoreRoot When set to `true`, the root's element opening and closing tag will not\n\t* be outputted.\n\t* @param options.sameSelectionCharacters When set to `true`, the selection inside the text is marked as\n\t* `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both are marked as `[` and `]`.\n\t* @param options.renderUIElements When set to `true`, the inner content of each\n\t* {@link module:engine/view/uielement~ViewUIElement} will be printed.\n\t* @param options.renderRawElements When set to `true`, the inner content of each\n\t* @param options.domConverter When set to an actual {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n\t* instance, it lets the conversion go through exactly the same flow the editing view is going through,\n\t* i.e. with view data filtering. Otherwise the simple stub is used.\n\t* {@link module:engine/view/rawelement~ViewRawElement} will be printed.\n\t* @param options.skipListItemIds When set to `true`, `<li>` elements will not have `listItemId` attribute. By default it's hidden\n\t* because it's randomly generated and hard to verify properly, while bringing little value.\n\t*/\n\tconstructor(root, selection, options) {\n\t\tthis.root = root;\n\t\tthis.selection = selection;\n\t\tthis.ranges = [];\n\t\tif (selection) this.ranges = [...selection.getRanges()];\n\t\tthis.showType = !!options.showType;\n\t\tthis.showPriority = !!options.showPriority;\n\t\tthis.showAttributeElementId = !!options.showAttributeElementId;\n\t\tthis.ignoreRoot = !!options.ignoreRoot;\n\t\tthis.sameSelectionCharacters = !!options.sameSelectionCharacters;\n\t\tthis.renderUIElements = !!options.renderUIElements;\n\t\tthis.renderRawElements = !!options.renderRawElements;\n\t\tthis.domConverter = options.domConverter || domConverterStub;\n\t\tthis.skipListItemIds = options.skipListItemIds !== void 0 ? !!options.skipListItemIds : true;\n\t}\n\t/**\n\t* Converts the view to a string.\n\t*\n\t* @returns String representation of the view elements.\n\t*/\n\tstringify() {\n\t\tlet result = \"\";\n\t\tthis._walkView(this.root, (chunk) => {\n\t\t\tresult += chunk;\n\t\t});\n\t\tif (this.skipListItemIds) result = result.replaceAll(/ data-list-item-id=\"[^\"]+\"/g, \"\");\n\t\treturn result;\n\t}\n\t/**\n\t* Executes a simple walker that iterates over all elements in the view tree starting from the root element.\n\t* Calls the `callback` with parsed chunks of string data.\n\t*/\n\t_walkView(root, callback) {\n\t\tconst ignore = this.ignoreRoot && this.root === root;\n\t\tif (root.is(\"element\") || root.is(\"documentFragment\")) {\n\t\t\tif (root.is(\"element\") && !ignore) callback(this._stringifyElementOpen(root));\n\t\t\tif (this.renderUIElements && root.is(\"uiElement\")) callback(root.render(document, this.domConverter).innerHTML);\n\t\t\telse if (this.renderRawElements && root.is(\"rawElement\")) {\n\t\t\t\tconst rawContentContainer = document.createElement(\"div\");\n\t\t\t\troot.render(rawContentContainer, this.domConverter);\n\t\t\t\tcallback(rawContentContainer.innerHTML);\n\t\t\t} else {\n\t\t\t\tlet offset = 0;\n\t\t\t\tcallback(this._stringifyElementRanges(root, offset));\n\t\t\t\tfor (const child of root.getChildren()) {\n\t\t\t\t\tthis._walkView(child, callback);\n\t\t\t\t\toffset++;\n\t\t\t\t\tcallback(this._stringifyElementRanges(root, offset));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (root.is(\"element\") && !ignore) callback(this._stringifyElementClose(root));\n\t\t}\n\t\tif (root.is(\"$text\")) callback(this._stringifyTextRanges(root));\n\t}\n\t/**\n\t* Checks if a given {@link module:engine/view/element~ViewElement element} has\n\t* a {@link module:engine/view/range~ViewRange#start range start}\n\t* or a {@link module:engine/view/range~ViewRange#start range end} placed at a given offset and returns its string representation.\n\t*/\n\t_stringifyElementRanges(element, offset) {\n\t\tlet start = \"\";\n\t\tlet end = \"\";\n\t\tlet collapsed = \"\";\n\t\tfor (const range of this.ranges) {\n\t\t\tif (range.start.parent == element && range.start.offset === offset) {\n\t\t\t\tif (range.isCollapsed) collapsed += \"[]\";\n\t\t\t\telse start += ELEMENT_RANGE_START_TOKEN;\n\t\t\t}\n\t\t\tif (range.end.parent === element && range.end.offset === offset && !range.isCollapsed) end += ELEMENT_RANGE_END_TOKEN;\n\t\t}\n\t\treturn end + collapsed + start;\n\t}\n\t/**\n\t* Checks if a given {@link module:engine/view/element~ViewElement Text node} has a\n\t* {@link module:engine/view/range~ViewRange#start range start} or a\n\t* {@link module:engine/view/range~ViewRange#start range end} placed somewhere inside. Returns a string representation of text\n\t* with range delimiters placed inside.\n\t*/\n\t_stringifyTextRanges(node) {\n\t\tconst length = node.data.length;\n\t\tconst data = node.data.split(\"\");\n\t\tlet rangeStartToken, rangeEndToken;\n\t\tif (this.sameSelectionCharacters) {\n\t\t\trangeStartToken = ELEMENT_RANGE_START_TOKEN;\n\t\t\trangeEndToken = ELEMENT_RANGE_END_TOKEN;\n\t\t} else {\n\t\t\trangeStartToken = TEXT_RANGE_START_TOKEN;\n\t\t\trangeEndToken = TEXT_RANGE_END_TOKEN;\n\t\t}\n\t\tdata[length] = \"\";\n\t\tconst result = data.map((letter) => {\n\t\t\treturn {\n\t\t\t\tletter,\n\t\t\t\tstart: \"\",\n\t\t\t\tend: \"\",\n\t\t\t\tcollapsed: \"\"\n\t\t\t};\n\t\t});\n\t\tfor (const range of this.ranges) {\n\t\t\tconst start = range.start;\n\t\t\tconst end = range.end;\n\t\t\tif (start.parent == node && start.offset >= 0 && start.offset <= length) {\n\t\t\t\tif (range.isCollapsed) result[end.offset].collapsed += rangeStartToken + rangeEndToken;\n\t\t\t\telse result[start.offset].start += rangeStartToken;\n\t\t\t}\n\t\t\tif (end.parent == node && end.offset >= 0 && end.offset <= length && !range.isCollapsed) result[end.offset].end += rangeEndToken;\n\t\t}\n\t\treturn result.map((item) => item.end + item.collapsed + item.start + item.letter).join(\"\");\n\t}\n\t/**\n\t* Converts the passed {@link module:engine/view/element~ViewElement element} to an opening tag.\n\t*\n\t* Depending on the current configuration, the opening tag can be simple (`<a>`), contain a type prefix (`<container:p>`,\n\t* `<attribute:a>` or `<empty:img>`), contain priority information ( `<attribute:a view-priority=\"20\">` ),\n\t* or contain element id ( `<attribute:span view-id=\"foo\">` ). Element attributes will also be included\n\t* (`<a href=\"https://ckeditor.com\" name=\"foobar\">`).\n\t*/\n\t_stringifyElementOpen(element) {\n\t\tconst priority = this._stringifyElementPriority(element);\n\t\tconst id = this._stringifyElementId(element);\n\t\treturn `<${[\n\t\t\t[this._stringifyElementType(element), element.name].filter((i) => i !== \"\").join(\":\"),\n\t\t\tpriority,\n\t\t\tid,\n\t\t\tthis._stringifyElementAttributes(element)\n\t\t].filter((i) => i !== \"\").join(\" \")}>`;\n\t}\n\t/**\n\t* Converts the passed {@link module:engine/view/element~ViewElement element} to a closing tag.\n\t* Depending on the current configuration, the closing tag can be simple (`</a>`) or contain a type prefix (`</container:p>`,\n\t* `</attribute:a>` or `</empty:img>`).\n\t*/\n\t_stringifyElementClose(element) {\n\t\treturn `</${[this._stringifyElementType(element), element.name].filter((i) => i !== \"\").join(\":\")}>`;\n\t}\n\t/**\n\t* Converts the passed {@link module:engine/view/element~ViewElement element's} type to its string representation\n\t*\n\t* Returns:\n\t* * 'attribute' for {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements},\n\t* * 'container' for {@link module:engine/view/containerelement~ViewContainerElement container elements},\n\t* * 'empty' for {@link module:engine/view/emptyelement~ViewEmptyElement empty elements},\n\t* * 'ui' for {@link module:engine/view/uielement~ViewUIElement UI elements},\n\t* * 'raw' for {@link module:engine/view/rawelement~ViewRawElement raw elements},\n\t* * an empty string when the current configuration is preventing showing elements' types.\n\t*/\n\t_stringifyElementType(element) {\n\t\tif (this.showType) {\n\t\t\tfor (const type in allowedTypes) if (element instanceof allowedTypes[type]) return type;\n\t\t}\n\t\treturn \"\";\n\t}\n\t/**\n\t* Converts the passed {@link module:engine/view/element~ViewElement element} to its priority representation.\n\t*\n\t* The priority string representation will be returned when the passed element is an instance of\n\t* {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} and the current configuration allows to show the\n\t* priority. Otherwise returns an empty string.\n\t*/\n\t_stringifyElementPriority(element) {\n\t\tif (this.showPriority && element.is(\"attributeElement\")) return `view-priority=\"${element.priority}\"`;\n\t\treturn \"\";\n\t}\n\t/**\n\t* Converts the passed {@link module:engine/view/element~ViewElement element} to its id representation.\n\t*\n\t* The id string representation will be returned when the passed element is an instance of\n\t* {@link module:engine/view/attributeelement~ViewAttributeElement attribute element}, the element has an id\n\t* and the current configuration allows to show the id. Otherwise returns an empty string.\n\t*/\n\t_stringifyElementId(element) {\n\t\tif (this.showAttributeElementId && element.is(\"attributeElement\") && element.id) return `view-id=\"${element.id}\"`;\n\t\treturn \"\";\n\t}\n\t/**\n\t* Converts the passed {@link module:engine/view/element~ViewElement element} attributes to their string representation.\n\t* If an element has no attributes, an empty string is returned.\n\t*/\n\t_stringifyElementAttributes(element) {\n\t\tconst attributes = [];\n\t\tconst keys = [...element.getAttributeKeys()].sort();\n\t\tfor (const attribute of keys) {\n\t\t\tlet attributeValue;\n\t\t\tif (attribute === \"class\") attributeValue = [...element.getClassNames()].sort().join(\" \");\n\t\t\telse if (attribute === \"style\") attributeValue = [...element.getStyleNames()].sort().map((style) => `${style}:${element.getStyle(style).replace(/\"/g, \"&quot;\")}`).join(\";\");\n\t\t\telse attributeValue = element.getAttribute(attribute);\n\t\t\tattributes.push(`${attribute}=\"${attributeValue}\"`);\n\t\t}\n\t\treturn attributes.join(\" \");\n\t}\n};\n/**\n* Converts {@link module:engine/view/element~ViewElement elements} to\n* {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements},\n* {@link module:engine/view/containerelement~ViewContainerElement container elements},\n* {@link module:engine/view/emptyelement~ViewEmptyElement empty elements} or\n* {@link module:engine/view/uielement~ViewUIElement UI elements}.\n* It converts the whole tree starting from the `rootNode`. The conversion is based on element names.\n* See the `_convertElement` method for more details.\n*\n* @param rootNode The root node to convert.\n* @returns The root node of converted elements.\n*/\nfunction _convertViewElements(rootNode) {\n\tif (rootNode.is(\"element\") || rootNode.is(\"documentFragment\")) {\n\t\tconst convertedElement = rootNode.is(\"documentFragment\") ? new ViewDocumentFragment(rootNode.document) : _convertElement(rootNode.document, rootNode);\n\t\tfor (const child of [...rootNode.getChildren()]) {\n\t\t\tif (convertedElement.is(\"emptyElement\")) throw new Error(\"Parse error - cannot parse inside ViewEmptyElement.\");\n\t\t\telse if (convertedElement.is(\"uiElement\")) throw new Error(\"Parse error - cannot parse inside UIElement.\");\n\t\t\telse if (convertedElement.is(\"rawElement\")) throw new Error(\"Parse error - cannot parse inside RawElement.\");\n\t\t\tconvertedElement._appendChild(_convertViewElements(child));\n\t\t}\n\t\treturn convertedElement;\n\t}\n\treturn rootNode;\n}\n/**\n* Converts an {@link module:engine/view/element~ViewElement element} to\n* {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n* {@link module:engine/view/containerelement~ViewContainerElement container element},\n* {@link module:engine/view/emptyelement~ViewEmptyElement empty element} or\n* {@link module:engine/view/uielement~ViewUIElement UI element}.\n* If the element's name is in the format of `attribute:b`, it will be converted to\n* an {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} with a priority of 11.\n* Additionally, attribute elements may have specified priority (for example `view-priority=\"11\"`) and/or\n* id (for example `view-id=\"foo\"`).\n* If the element's name is in the format of `container:p`, it will be converted to\n* a {@link module:engine/view/containerelement~ViewContainerElement container element}.\n* If the element's name is in the format of `empty:img`, it will be converted to\n* an {@link module:engine/view/emptyelement~ViewEmptyElement empty element}.\n* If the element's name is in the format of `ui:span`, it will be converted to\n* a {@link module:engine/view/uielement~ViewUIElement UI element}.\n* If the element's name does not contain any additional information, a {@link module:engine/view/element~ViewElement view Element} will be\n* returned.\n*\n* @param viewElement A view element to convert.\n* @returns A tree view element converted according to its name.\n*/\nfunction _convertElement(viewDocument, viewElement) {\n\tconst info = _convertElementNameAndInfo(viewElement);\n\tconst ElementConstructor = allowedTypes[info.type];\n\tconst newElement = ElementConstructor ? new ElementConstructor(viewDocument, info.name) : new ViewElement(viewDocument, info.name);\n\tif (newElement.is(\"attributeElement\")) {\n\t\tif (info.priority !== null) newElement._priority = info.priority;\n\t\tif (info.id !== null) newElement._id = info.id;\n\t}\n\tfor (const attributeKey of viewElement.getAttributeKeys()) newElement._setAttribute(attributeKey, viewElement.getAttribute(attributeKey));\n\treturn newElement;\n}\n/**\n* Converts the `view-priority` attribute and the {@link module:engine/view/element~ViewElement#name element's name} information needed for\n* creating {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n* {@link module:engine/view/containerelement~ViewContainerElement container element},\n* {@link module:engine/view/emptyelement~ViewEmptyElement empty element} or\n* {@link module:engine/view/uielement~ViewUIElement UI element}.\n* The name can be provided in two formats: as a simple element's name (`div`), or as a type and name (`container:div`,\n* `attribute:span`, `empty:img`, `ui:span`);\n*\n* @param viewElement The element whose name should be converted.\n* @returns An object with parsed information:\n* * `name` The parsed name of the element.\n* * `type` The parsed type of the element. It can be `attribute`, `container` or `empty`.\n* * `priority` The parsed priority of the element.\n*/\nfunction _convertElementNameAndInfo(viewElement) {\n\tconst parts = viewElement.name.split(\":\");\n\tconst priority = _convertPriority(viewElement.getAttribute(\"view-priority\"));\n\tconst id = viewElement.hasAttribute(\"view-id\") ? viewElement.getAttribute(\"view-id\") : null;\n\tviewElement._removeAttribute(\"view-priority\");\n\tviewElement._removeAttribute(\"view-id\");\n\tif (parts.length == 1) return {\n\t\tname: parts[0],\n\t\ttype: priority !== null ? \"attribute\" : null,\n\t\tpriority,\n\t\tid\n\t};\n\tconst type = _convertType(parts[0]);\n\tif (type) return {\n\t\tname: parts[1],\n\t\ttype,\n\t\tpriority,\n\t\tid\n\t};\n\tthrow new Error(`Parse error - cannot parse element's name: ${viewElement.name}.`);\n}\n/**\n* Checks if the element's type is allowed. Returns `attribute`, `container`, `empty` or `null`.\n*/\nfunction _convertType(type) {\n\treturn type in allowedTypes ? type : null;\n}\n/**\n* Checks if a given priority is allowed. Returns null if the priority cannot be converted.\n*/\nfunction _convertPriority(priorityString) {\n\tconst priority = parseInt(priorityString, 10);\n\tif (!isNaN(priority)) return priority;\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 engine/dev-utils/model\n*/\n/**\n* Collection of methods for manipulating the {@link module:engine/model/model model} for testing purposes.\n*/\n/**\n* Writes the content of a model {@link module:engine/model/document~ModelDocument document} to an HTML-like string.\n*\n* ```ts\n* getData( editor.model ); // -> '<paragraph>Foo![]</paragraph>'\n* ```\n*\n* **Note:** A {@link module:engine/model/text~ModelText text} node that contains attributes will be represented as:\n*\n* ```xml\n* <$text attribute=\"value\">Text data</$text>\n* ```\n*\n* **Note:** Using this tool in production-grade code is not recommended. It was designed for development, prototyping,\n* debugging and testing.\n*\n* @param options.withoutSelection Whether to write the selection. When set to `true`, the selection will\n* not be included in the returned string.\n* @param options.rootName The name of the root from which the data should be stringified. If not provided,\n* the default `main` name will be used.\n* @param options.convertMarkers Whether to include markers in the returned string.\n* @returns The stringified data.\n*/\nconst _getModelData = /* #__PURE__ */ (() => {\n\tconst getModelData = function(model, options = {}) {\n\t\tif (!(model instanceof Model)) throw new TypeError(\"Model needs to be an instance of module:engine/model/model~Model.\");\n\t\tconst rootName = options.rootName || \"main\";\n\t\tconst root = model.document.getRoot(rootName);\n\t\treturn getModelData._stringify(root, options.withoutSelection ? null : model.document.selection, options.convertMarkers ? model.markers : null);\n\t};\n\tgetModelData._stringify = _stringifyModel;\n\treturn getModelData;\n})();\n/**\n* Sets the content of a model {@link module:engine/model/document~ModelDocument document} provided as an HTML-like string.\n*\n* ```ts\n* setData( editor.model, '<paragraph>Foo![]</paragraph>' );\n* ```\n*\n* **Note:** Remember to register elements in the {@link module:engine/model/model~Model#schema model's schema} before\n* trying to use them.\n*\n* **Note:** To create a {@link module:engine/model/text~ModelText text} node that contains attributes use:\n*\n* ```xml\n* <$text attribute=\"value\">Text data</$text>\n* ```\n*\n* **Note:** Using this tool in production-grade code is not recommended. It was designed for development, prototyping,\n* debugging and testing.\n*\n* @param data HTML-like string to write into the document.\n* @param options.rootName Root name where parsed data will be stored. If not provided, the default `main`\n* name will be used.\n* @param options.selectionAttributes A list of attributes which will be passed to the selection.\n* @param options.lastRangeBackward If set to `true`, the last range will be added as backward.\n* @param options.batchType Batch type used for inserting elements. See {@link module:engine/model/batch~Batch#constructor}.\n*/\nconst _setModelData = /* #__PURE__ */ (() => {\n\tconst setModelData = function(model, data, options = {}) {\n\t\tif (!(model instanceof Model)) throw new TypeError(\"Model needs to be an instance of module:engine/model/model~Model.\");\n\t\tlet modelDocumentFragment;\n\t\tlet selection = null;\n\t\tconst modelRoot = model.document.getRoot(options.rootName || \"main\");\n\t\tconst parsedResult = setModelData._parse(data, model.schema, {\n\t\t\tlastRangeBackward: options.lastRangeBackward,\n\t\t\tselectionAttributes: options.selectionAttributes,\n\t\t\tcontext: [modelRoot.name],\n\t\t\tinlineObjectElements: options.inlineObjectElements\n\t\t});\n\t\tif (\"model\" in parsedResult) {\n\t\t\tmodelDocumentFragment = parsedResult.model;\n\t\t\tselection = parsedResult.selection;\n\t\t} else modelDocumentFragment = parsedResult;\n\t\tif (options.batchType !== void 0) model.enqueueChange(options.batchType, writeToModel);\n\t\telse model.change(writeToModel);\n\t\tfunction writeToModel(writer) {\n\t\t\twriter.remove(writer.createRangeIn(modelRoot));\n\t\t\twriter.insert(modelDocumentFragment, modelRoot);\n\t\t\twriter.setSelection(null);\n\t\t\twriter.removeSelectionAttribute(model.document.selection.getAttributeKeys());\n\t\t\tif (selection) {\n\t\t\t\tconst ranges = [];\n\t\t\t\tfor (const range of selection.getRanges()) {\n\t\t\t\t\tconst start = new ModelPosition(modelRoot, range.start.path);\n\t\t\t\t\tconst end = new ModelPosition(modelRoot, range.end.path);\n\t\t\t\t\tranges.push(new ModelRange(start, end));\n\t\t\t\t}\n\t\t\t\twriter.setSelection(ranges, { backward: selection.isBackward });\n\t\t\t\tif (options.selectionAttributes) writer.setSelectionAttribute(selection.getAttributes());\n\t\t\t}\n\t\t}\n\t};\n\tsetModelData._parse = _parseModel;\n\treturn setModelData;\n})();\n/**\n* Converts model nodes to HTML-like string representation.\n*\n* **Note:** A {@link module:engine/model/text~ModelText text} node that contains attributes will be represented as:\n*\n* ```xml\n* <$text attribute=\"value\">Text data</$text>\n* ```\n*\n* @param node A node to stringify.\n* @param selectionOrPositionOrRange A selection instance whose ranges will be included in the returned string data.\n* If a range instance is provided, it will be converted to a selection containing this range. If a position instance\n* is provided, it will be converted to a selection containing one range collapsed at this position.\n* @param markers Markers to include.\n* @returns An HTML-like string representing the model.\n*/\nfunction _stringifyModel(node, selectionOrPositionOrRange = null, markers = null) {\n\tconst model = new Model();\n\tconst mapper = new Mapper();\n\tlet selection = null;\n\tlet range;\n\tif (node instanceof ModelRootElement || node instanceof ModelDocumentFragment) range = model.createRangeIn(node);\n\telse if (!node.parent) {\n\t\tconst fragment = new ModelDocumentFragment(node);\n\t\trange = model.createRangeIn(fragment);\n\t} else range = new ModelRange(model.createPositionBefore(node), model.createPositionAfter(node));\n\tif (selectionOrPositionOrRange instanceof ModelSelection) selection = selectionOrPositionOrRange;\n\telse if (selectionOrPositionOrRange instanceof ModelDocumentSelection) selection = selectionOrPositionOrRange;\n\telse if (selectionOrPositionOrRange instanceof ModelRange) selection = new ModelSelection(selectionOrPositionOrRange);\n\telse if (selectionOrPositionOrRange instanceof ModelPosition) selection = new ModelSelection(selectionOrPositionOrRange);\n\tconst stylesProcessor = new StylesProcessor();\n\tconst view = new EditingView(stylesProcessor);\n\tconst viewDocument = view.document;\n\tconst viewRoot = new ViewRootEditableElement(viewDocument, \"div\");\n\tviewRoot.rootName = \"main\";\n\tviewDocument.roots.add(viewRoot);\n\tconst downcastDispatcher = new DowncastDispatcher({\n\t\tmapper,\n\t\tschema: model.schema\n\t});\n\tmapper.bindElements(node.root, viewRoot);\n\tdowncastDispatcher.on(\"insert:$text\", insertText());\n\tdowncastDispatcher.on(\"insert\", insertAttributesAndChildren(), { priority: \"lowest\" });\n\tdowncastDispatcher.on(\"attribute\", (evt, data, conversionApi) => {\n\t\tif (data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection || data.item.is(\"$textProxy\")) wrap((modelAttributeValue, { writer }) => {\n\t\t\treturn writer.createAttributeElement(\"model-text-with-attributes\", { [data.attributeKey]: stringifyAttributeValue(modelAttributeValue) });\n\t\t})(evt, data, conversionApi);\n\t});\n\tdowncastDispatcher.on(\"insert\", insertElement((modelItem) => {\n\t\tconst attributes = convertAttributes(modelItem.getAttributes(), stringifyAttributeValue);\n\t\treturn new ViewContainerElement(viewDocument, modelItem.name, attributes);\n\t}));\n\tdowncastDispatcher.on(\"selection\", convertRangeSelection());\n\tdowncastDispatcher.on(\"selection\", convertCollapsedSelection());\n\tdowncastDispatcher.on(\"addMarker\", insertUIElement((data, { writer }) => {\n\t\tconst name = data.markerName + \":\" + (data.isOpening ? \"start\" : \"end\");\n\t\treturn writer.createUIElement(name);\n\t}));\n\tconst markersMap = /* @__PURE__ */ new Map();\n\tif (markers) for (const marker of Array.from(markers).sort((a, b) => a.name < b.name ? 1 : -1)) markersMap.set(marker.name, marker.getRange());\n\tconst writer = view._writer;\n\tdowncastDispatcher.convert(range, markersMap, writer);\n\tif (selection) downcastDispatcher.convertSelection(selection, markers || model.markers, writer);\n\tlet data = _stringifyView(viewRoot, viewDocument.selection, { sameSelectionCharacters: true });\n\tdata = data.substr(5, data.length - 11);\n\tview.destroy();\n\treturn data.replace(/* @__PURE__ */ new RegExp(\"model-text-with-attributes\", \"g\"), \"$text\");\n}\n/**\n* Parses an HTML-like string and returns the model {@link module:engine/model/rootelement~ModelRootElement rootElement}.\n*\n* **Note:** To create a {@link module:engine/model/text~ModelText text} node that contains attributes use:\n*\n* ```xml\n* <$text attribute=\"value\">Text data</$text>\n* ```\n*\n* **Note:** The default `options.context` value is `'$root'`, which only matches the generic root. When the editor\n* uses a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n* {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n* explicitly, otherwise the conversion result may be wrong.\n* See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n* {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n*\n* @param data HTML-like string to be parsed.\n* @param schema A schema instance used by converters for element validation.\n* @param options Additional configuration.\n* @param options.selectionAttributes A list of attributes which will be passed to the selection.\n* @param options.lastRangeBackward If set to `true`, the last range will be added as backward.\n* @param options.context The conversion context. If not provided, the default `'$root'` will be used.\n* @returns Returns the parsed model node or an object with two fields: `model` and `selection`,\n* when selection ranges were included in the data to parse.\n*/\nfunction _parseModel(data, schema, options = {}) {\n\tconst mapper = new Mapper();\n\tdata = data.replace(/* @__PURE__ */ new RegExp(\"\\\\$text\", \"g\"), \"model-text-with-attributes\");\n\tconst parsedResult = _parseView(data, {\n\t\tsameSelectionCharacters: true,\n\t\tlastRangeBackward: !!options.lastRangeBackward,\n\t\tinlineObjectElements: options.inlineObjectElements\n\t});\n\tlet viewDocumentFragment;\n\tlet viewSelection = null;\n\tlet selection = null;\n\tif (\"view\" in parsedResult && \"selection\" in parsedResult) {\n\t\tviewDocumentFragment = parsedResult.view;\n\t\tviewSelection = parsedResult.selection;\n\t} else viewDocumentFragment = parsedResult;\n\tconst modelController = new Model();\n\tconst upcastDispatcher = new UpcastDispatcher({ schema });\n\tupcastDispatcher.on(\"documentFragment\", convertToModelFragment$1(mapper));\n\tupcastDispatcher.on(\"element:model-text-with-attributes\", convertToModelText());\n\tupcastDispatcher.on(\"element\", convertToModelElement(mapper));\n\tupcastDispatcher.on(\"text\", convertToModelText());\n\tlet model = modelController.change((writer) => upcastDispatcher.convert(viewDocumentFragment.root, writer, options.context || \"$root\"));\n\tmapper.bindElements(model, viewDocumentFragment.root);\n\tif (model.childCount == 1) model = model.getChild(0);\n\tif (viewSelection) {\n\t\tconst ranges = [];\n\t\tfor (const viewRange of viewSelection.getRanges()) ranges.push(mapper.toModelRange(viewRange));\n\t\tselection = new ModelSelection(ranges, { backward: viewSelection.isBackward });\n\t\tfor (const [key, value] of toMap(options.selectionAttributes || [])) selection.setAttribute(key, value);\n\t}\n\tif (selection) return {\n\t\tmodel,\n\t\tselection\n\t};\n\treturn model;\n}\nfunction convertToModelFragment$1(mapper) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst childrenResult = conversionApi.convertChildren(data.viewItem, data.modelCursor);\n\t\tmapper.bindElements(data.modelCursor.parent, data.viewItem);\n\t\tObject.assign(data, childrenResult);\n\t\tevt.stop();\n\t};\n}\nfunction convertToModelElement(mapper) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst elementName = data.viewItem.name;\n\t\tif (!conversionApi.schema.checkChild(data.modelCursor, elementName)) throw new Error(`Element '${elementName}' was not allowed in given position.`);\n\t\tconst attributes = convertAttributes(data.viewItem.getAttributes(), parseAttributeValue);\n\t\tconst element = conversionApi.writer.createElement(data.viewItem.name, attributes);\n\t\tconversionApi.writer.insert(element, data.modelCursor);\n\t\tmapper.bindElements(element, data.viewItem);\n\t\tconversionApi.convertChildren(data.viewItem, element);\n\t\tdata.modelRange = ModelRange._createOn(element);\n\t\tdata.modelCursor = data.modelRange.end;\n\t\tevt.stop();\n\t};\n}\nfunction convertToModelText() {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!conversionApi.schema.checkChild(data.modelCursor, \"$text\")) throw new Error(\"Text was not allowed in given position.\");\n\t\tlet node;\n\t\tif (data.viewItem.is(\"element\")) {\n\t\t\tconst attributes = convertAttributes(data.viewItem.getAttributes(), parseAttributeValue);\n\t\t\tconst viewText = data.viewItem.getChild(0);\n\t\t\tnode = conversionApi.writer.createText(viewText.data, attributes);\n\t\t} else node = conversionApi.writer.createText(data.viewItem.data);\n\t\tconversionApi.writer.insert(node, data.modelCursor);\n\t\tdata.modelRange = ModelRange._createFromPositionAndShift(data.modelCursor, node.offsetSize);\n\t\tdata.modelCursor = data.modelRange.end;\n\t\tevt.stop();\n\t};\n}\nfunction parseAttributeValue(attribute) {\n\ttry {\n\t\treturn JSON.parse(attribute);\n\t} catch {\n\t\treturn attribute;\n\t}\n}\nfunction stringifyAttributeValue(data) {\n\tif (isPlainObject(data)) return JSON.stringify(data);\n\treturn data;\n}\nfunction* convertAttributes(attributes, converter) {\n\tfor (const [key, value] of attributes) yield [key, converter(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* Note: This package is used only internally for debugging purposes and should not be used\n* in other environments. It uses a few special methods not existing in the default\n* building process. That is also why there are no tests for this file.\n*\n* @module engine/dev-utils/utils\n*/\n/**\n* Helper function, converts a map to the 'key1=\"value1\" key2=\"value1\"' format.\n*\n* @param map Map to convert.\n* @returns Converted map.\n* @internal\n*/\nfunction convertMapToTags(map) {\n\tlet string = \"\";\n\tfor (const entry of map) string += ` ${entry[0]}=${JSON.stringify(entry[1])}`;\n\treturn string;\n}\n/**\n* Helper function, converts a map to the `{\"key1\":\"value1\",\"key2\":\"value2\"}` format.\n*\n* @param map Map to convert.\n* @returns Converted map.\n* @internal\n*/\nfunction convertMapToStringifiedObject(map) {\n\tconst obj = {};\n\tfor (const entry of map) obj[entry[0]] = entry[1];\n\treturn JSON.stringify(obj);\n}\nconst treeDump = Symbol(\"_treeDump\");\nconst maxTreeDumpLength = 20;\n/**\n* Helper function that stores the `document` state for a given `version`.\n*\n* @internal\n*/\nfunction dumpTrees(document, version) {\n\tconsole.log(document, version);\n\tlet string = \"\";\n\tfor (const root of document.roots) string += root.printTree() + \"\\n\";\n\tdocument[treeDump][version] = string.substr(0, string.length - 1);\n\tconst overflow = document[treeDump].length - maxTreeDumpLength;\n\tif (overflow > 0) document[treeDump][overflow - 1] = null;\n}\n/**\n* Helper function that initializes document dumping.\n*\n* @internal\n*/\nfunction initDocumentDumping(document) {\n\tdocument[treeDump] = [];\n}\n/**\n* Helper function that logs document for the given version.\n*\n* @internal\n*/\nfunction logDocument(document, version) {\n\tconsole.log(\"--------------------\");\n\tif (document[treeDump][version]) console.log(document[treeDump][version]);\n\telse console.log(\"Tree log unavailable for given version: \" + version);\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 engine/dev-utils/operationreplayer\n*/\n/**\n* Operation replayer is a development tool created for easy replaying of operations on the document from stringified operations.\n*\n* @internal\n*/\nvar OperationReplayer = class {\n\t_model;\n\t_logSeparator;\n\t_operationsToReplay;\n\t/**\n\t* @param model Data model.\n\t* @param logSeparator Separator between operations.\n\t* @param stringifiedOperations Operations to replay.\n\t*/\n\tconstructor(model, logSeparator, stringifiedOperations) {\n\t\tthis._model = model;\n\t\tthis._logSeparator = logSeparator;\n\t\tthis.setStringifiedOperations(stringifiedOperations);\n\t}\n\t/**\n\t* Parses the given string containing stringified operations and sets parsed operations as operations to replay.\n\t*\n\t* @param stringifiedOperations Stringified operations to replay.\n\t*/\n\tsetStringifiedOperations(stringifiedOperations) {\n\t\tif (stringifiedOperations === \"\") {\n\t\t\tthis._operationsToReplay = [];\n\t\t\treturn;\n\t\t}\n\t\tthis._operationsToReplay = stringifiedOperations.split(this._logSeparator).map((stringifiedOperation) => JSON.parse(stringifiedOperation));\n\t}\n\t/**\n\t* Returns operations to replay.\n\t*/\n\tgetOperationsToReplay() {\n\t\treturn this._operationsToReplay;\n\t}\n\t/**\n\t* Applies all operations with a delay between actions.\n\t*\n\t* @param timeInterval Time between applying operations.\n\t*/\n\tplay(timeInterval = 1e3) {\n\t\tconst operationReplayer = this;\n\t\treturn new Promise((res, rej) => {\n\t\t\tplay();\n\t\t\tfunction play() {\n\t\t\t\toperationReplayer.applyNextOperation().then((isFinished) => {\n\t\t\t\t\tif (isFinished) return res();\n\t\t\t\t\tsetTimeout(play, timeInterval);\n\t\t\t\t}).catch((err) => {\n\t\t\t\t\trej(err);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Applies `numberOfOperations` operations, beginning after the last applied operation (or first, if no operations were applied).\n\t*\n\t* @param numberOfOperations The number of operations to apply.\n\t*/\n\tapplyOperations(numberOfOperations) {\n\t\tif (numberOfOperations <= 0) return;\n\t\treturn this.applyNextOperation().then((isFinished) => {\n\t\t\tif (!isFinished) return this.applyOperations(numberOfOperations - 1);\n\t\t});\n\t}\n\t/**\n\t* Applies all operations to replay at once.\n\t*/\n\tapplyAllOperations() {\n\t\treturn this.applyNextOperation().then((isFinished) => {\n\t\t\tif (!isFinished) return this.applyAllOperations();\n\t\t});\n\t}\n\t/**\n\t* Applies the next operation to replay. Returns a promise with the `isFinished` parameter that is `true` if the last\n\t* operation in the replayer has been applied, `false` otherwise.\n\t*/\n\tapplyNextOperation() {\n\t\tconst model = this._model;\n\t\treturn new Promise((res) => {\n\t\t\tmodel.enqueueChange((writer) => {\n\t\t\t\tconst operationJson = this._operationsToReplay.shift();\n\t\t\t\tif (!operationJson) return res(true);\n\t\t\t\tconst operation = OperationFactory.fromJSON(operationJson, model.document);\n\t\t\t\twriter.batch.addOperation(operation);\n\t\t\t\tmodel.applyOperation(operation);\n\t\t\t\tres(false);\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\nexport { AttributeOperation, Batch, BubblingEmitterMixin, BubblingEventInfo, ClickObserver, CompositionObserver, Conversion, ConversionHelpers, DataController, Differ, DomEventObserver, DowncastDispatcher, DowncastHelpers, EditingController, EditingView, FakeSelectionObserver, FocusObserver, History, HtmlDataProcessor, InputObserver, InsertOperation, KeyObserver, Mapper, Marker, MarkerCollection, MarkerOperation, Matcher, MergeOperation, Model, ModelConsumable, ModelDocument, ModelDocumentFragment, ModelDocumentSelection, ModelElement, ModelLivePosition, ModelLiveRange, ModelNode, ModelNodeList, ModelPosition, ModelRange, ModelRootElement, ModelSchema, ModelSchemaContext, ModelSelection, ModelText, ModelTextProxy, ModelTreeWalker, ModelTypeCheckable, ModelWriter, MouseObserver, MoveOperation, MutationObserver, NoOperation, Observer, Operation, OperationFactory, PointerObserver, RenameOperation, RootAttributeOperation, RootOperation, SelectionObserver, SplitOperation, StylesMap, StylesProcessor, TabObserver, TouchObserver, UpcastDispatcher, UpcastHelpers, ViewUpcastWriter as UpcastWriter, ViewUpcastWriter, ViewAttributeElement, ViewConsumable, ViewContainerElement, ViewDataTransfer, ViewDocument, ViewDocumentDomEventData, ViewDocumentFragment, ViewDocumentSelection, ViewDomConverter, ViewDowncastWriter, ViewEditableElement, ViewElement, ViewEmptyElement, ViewNode, ViewPosition, ViewRange, ViewRawElement, ViewRenderer, ViewRootEditableElement, ViewSelection, ViewText, ViewTextProxy, ViewTokenList, ViewTreeWalker, ViewTypeCheckable, ViewUIElement, XmlDataProcessor, BasicHtmlWriter as _DataProcessorBasicHtmlWriter, DetachOperation as _DetachOperation, MapperCache as _MapperCache, OperationReplayer as _OperationReplayer, BR_FILLER as _VIEW_BR_FILLER, INLINE_FILLER as _VIEW_INLINE_FILLER, INLINE_FILLER_LENGTH as _VIEW_INLINE_FILLER_LENGTH, MARKED_NBSP_FILLER as _VIEW_MARKED_NBSP_FILLER, NBSP_FILLER as _VIEW_NBSP_FILLER, ViewElementConsumables as _ViewElementConversionConsumables, autoParagraphEmptyRoots as _autoParagraphEmptyModelRoots, convertMapToStringifiedObject as _convertMapToStringifiedObject, convertMapToTags as _convertMapToTags, deleteContent as _deleteModelContent, cleanSelection as _downcastCleanSelection, convertCollapsedSelection as _downcastConvertCollapsedSelection, convertRangeSelection as _downcastConvertRangeSelection, createViewElementFromDowncastHighlightDescriptor as _downcastCreateViewElementFromDowncastHighlightDescriptor, insertAttributesAndChildren as _downcastInsertAttributesAndChildren, insertElement as _downcastInsertElement, insertStructure as _downcastInsertStructure, insertText as _downcastInsertText, insertUIElement as _downcastInsertUIElement, remove as _downcastRemove, wrap as _downcastWrap, dumpTrees as _dumpTrees, getDataWithoutFiller as _getDataWithoutViewFiller, _getModelData, getNodeAfterPosition as _getModelNodeAfterPosition, getNodeBeforePosition as _getModelNodeBeforePosition, getTextNodeAtPosition as _getModelTextNodeAtPosition, getSelectedContent as _getSelectedModelContent, _getViewData, initDocumentDumping as _initDocumentDumping, injectSelectionPostFixer as _injectModelSelectionPostFixer, injectQuirksHandling as _injectViewQuirksHandling, injectUiElementHandling as _injectViewUIElementHandling, _insert as _insertIntoModelNodeList, insertContent as _insertModelContent, insertObject as _insertModelObject, isInlineFiller as _isInlineViewFiller, isParagraphable as _isParagraphableModelNode, isPatternMatched as _isViewPatternMatched, logDocument as _logDocument, mergeIntersectingRanges as _mergeIntersectingModelRanges, modifySelection as _modifyModelSelection, _move as _moveInModelNodeList, normalizeConsumables as _normalizeConversionConsumables, _normalizeNodes as _normalizeInModelNodeList, transform as _operationTransform, _parseModel, _parseView, _remove as _removeFromModelNodeList, _setAttribute as _setAttributeInModelNodeList, _setModelData, _setViewData, startsWithFiller as _startsWithViewFiller, _stringifyModel, _stringifyView, tryFixingRange as _tryFixingModelRange, convertSelectionChange as _upcastConvertSelectionChange, convertText as _upcastConvertText, convertToModelFragment as _upcastConvertToModelFragment, wrapInParagraph as _wrapInModelParagraph, addBackgroundStylesRules, addBorderStylesRules, addMarginStylesRules, addPaddingStylesRules, disableViewPlaceholder, enableViewPlaceholder, getBoxSidesStyleShorthandValue, getBoxSidesStyleValueReducer, getBoxSidesStyleValues, getPositionStyleShorthandNormalizer, getShorthandStylesValues, getViewFillerOffset, hideViewPlaceholder, isAttachmentStyleValue, isColorStyleValue, isLengthStyleValue, isLineStyleValue, isPercentageStyleValue, isPositionStyleValue, isRepeatStyleValue, isURLStyleValue, needsViewPlaceholder, showViewPlaceholder, transformOperationSets };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module engine/view/placeholder\n */\n\nimport { type ViewDocument } from './document.js';\nimport { type ViewDowncastWriter } from './downcastwriter.js';\nimport { type ViewEditableElement } from './editableelement.js';\nimport { type ViewElement } from './element.js';\nimport { type EditingView } from './view.js';\n\nimport { logWarning, type ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\n\n// Each document stores information about its placeholder elements and check functions.\nconst documentPlaceholders = new WeakMap<ViewDocument, Map<ViewElement, PlaceholderConfig>>();\n\nlet hasDisplayedPlaceholderDeprecationWarning = false;\n\n/**\n * A helper that enables a placeholder on the provided view element (also updates its visibility).\n * The placeholder is a CSS pseudo–element (with a text content) attached to the element.\n *\n * To change the placeholder text, change value of the `placeholder` property in the provided `element`.\n *\n * To disable the placeholder, use {@link module:engine/view/placeholder~disableViewPlaceholder `disableViewPlaceholder()`} helper.\n *\n * @param options Configuration options of the placeholder.\n * @param options.view Editing view instance.\n * @param options.element Element that will gain a placeholder. See `options.isDirectHost` to learn more.\n * @param options.isDirectHost If set `false`, the placeholder will not be enabled directly\n * in the passed `element` but in one of its children (selected automatically, i.e. a first empty child element).\n * Useful when attaching placeholders to elements that can host other elements (not just text), for instance,\n * editable root elements.\n * @param options.text Placeholder text. It's **deprecated** and will be removed soon. Use\n * {@link module:engine/view/placeholder~PlaceholderableViewElement#placeholder `options.element.placeholder`} instead.\n * @param options.keepOnFocus If set `true`, the placeholder stay visible when the host element is focused.\n */\nexport function enableViewPlaceholder( { view, element, text, isDirectHost = true, keepOnFocus = false }: {\n\tview: EditingView;\n\telement: PlaceholderableViewElement | ViewEditableElement;\n\tisDirectHost?: boolean;\n\ttext?: string;\n\tkeepOnFocus?: boolean;\n} ): void {\n\tconst doc = view.document;\n\n\t// Use a single post fixer per—document to update all placeholders.\n\tif ( !documentPlaceholders.has( doc ) ) {\n\t\tdocumentPlaceholders.set( doc, new Map() );\n\n\t\t// If a post-fixer callback makes a change, it should return `true` so other post–fixers\n\t\t// can re–evaluate the document again.\n\t\tdoc.registerPostFixer( writer => updateDocumentPlaceholders( documentPlaceholders.get( doc )!, writer ) );\n\n\t\t// Update placeholders on isComposing state change since rendering is disabled while in composition mode.\n\t\tdoc.on<ObservableChangeEvent>( 'change:isComposing', () => {\n\t\t\tview.change( writer => updateDocumentPlaceholders( documentPlaceholders.get( doc )!, writer ) );\n\t\t}, { priority: 'high' } );\n\t}\n\n\tif ( element.is( 'editableElement' ) ) {\n\t\telement.on( 'change:placeholder', ( evtInfo, evt, text ) => setPlaceholder( text ) );\n\t}\n\n\tif ( element.placeholder ) {\n\t\tsetPlaceholder( element.placeholder );\n\t} else if ( text ) {\n\t\tsetPlaceholder( text );\n\t}\n\n\tif ( text ) {\n\t\tshowViewPlaceholderTextDeprecationWarning();\n\t}\n\n\tfunction setPlaceholder( text: string ) {\n\t\tconst config = {\n\t\t\ttext,\n\t\t\tisDirectHost,\n\t\t\tkeepOnFocus,\n\t\t\thostElement: isDirectHost ? element : null\n\t\t};\n\n\t\t// Store information about the element placeholder under its document.\n\t\tdocumentPlaceholders.get( doc )!.set( element, config );\n\n\t\t// Update the placeholders right away.\n\t\tview.change( writer => updateDocumentPlaceholders( [ [ element, config ] ], writer ) );\n\t}\n}\n\n/**\n * Disables the placeholder functionality from a given element.\n *\n * See {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} to learn more.\n */\nexport function disableViewPlaceholder( view: EditingView, element: ViewElement ): void {\n\tconst doc = element.document;\n\n\tif ( !documentPlaceholders.has( doc ) ) {\n\t\treturn;\n\t}\n\n\tview.change( writer => {\n\t\tconst placeholders = documentPlaceholders.get( doc )!;\n\t\tconst config = placeholders.get( element )!;\n\n\t\twriter.removeAttribute( 'data-placeholder', config.hostElement! );\n\t\thideViewPlaceholder( writer, config.hostElement! );\n\n\t\tplaceholders.delete( element );\n\t} );\n}\n\n/**\n * Shows a placeholder in the provided element by changing related attributes and CSS classes.\n *\n * **Note**: This helper will not update the placeholder visibility nor manage the\n * it in any way in the future. What it does is a one–time state change of an element. Use\n * {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} and\n * {@link module:engine/view/placeholder~disableViewPlaceholder `disableViewPlaceholder()`} for full\n * placeholder functionality.\n *\n * **Note**: This helper will blindly show the placeholder directly in the root editable element if\n * one is passed, which could result in a visual clash if the editable element has some children\n * (for instance, an empty paragraph). Use {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`}\n * in that case or make sure the correct element is passed to the helper.\n *\n * @returns `true`, if any changes were made to the `element`.\n */\nexport function showViewPlaceholder( writer: ViewDowncastWriter, element: ViewElement ): boolean {\n\tif ( !element.hasClass( 'ck-placeholder' ) ) {\n\t\twriter.addClass( 'ck-placeholder', element );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Hides a placeholder in the element by changing related attributes and CSS classes.\n *\n * **Note**: This helper will not update the placeholder visibility nor manage the\n * it in any way in the future. What it does is a one–time state change of an element. Use\n * {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} and\n * {@link module:engine/view/placeholder~disableViewPlaceholder `disableViewPlaceholder()`} for full\n * placeholder functionality.\n *\n * @returns `true`, if any changes were made to the `element`.\n */\nexport function hideViewPlaceholder( writer: ViewDowncastWriter, element: ViewElement ): boolean {\n\tif ( element.hasClass( 'ck-placeholder' ) ) {\n\t\twriter.removeClass( 'ck-placeholder', element );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Checks if a placeholder should be displayed in the element.\n *\n * **Note**: This helper will blindly check the possibility of showing a placeholder directly in the\n * root editable element if one is passed, which may not be the expected result. If an element can\n * host other elements (not just text), most likely one of its children should be checked instead\n * because it will be the final host for the placeholder. Use\n * {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`} in that case or make\n * sure the correct element is passed to the helper.\n *\n * @param element Element that holds the placeholder.\n * @param keepOnFocus Focusing the element will keep the placeholder visible.\n */\nexport function needsViewPlaceholder( element: ViewElement, keepOnFocus: boolean ): boolean {\n\tif ( !element.isAttached() ) {\n\t\treturn false;\n\t}\n\n\tif ( hasContent( element ) ) {\n\t\treturn false;\n\t}\n\n\tconst doc = element.document;\n\tconst viewSelection = doc.selection;\n\tconst selectionAnchor = viewSelection.anchor;\n\n\tif ( doc.isComposing && selectionAnchor && selectionAnchor.parent === element ) {\n\t\treturn false;\n\t}\n\n\t// Skip the focus check and make the placeholder visible already regardless of document focus state.\n\tif ( keepOnFocus ) {\n\t\treturn true;\n\t}\n\n\t// If the document is blurred.\n\tif ( !doc.isFocused ) {\n\t\treturn true;\n\t}\n\n\t// If document is focused and the element is empty but the selection is not anchored inside it.\n\treturn !!selectionAnchor && selectionAnchor.parent !== element;\n}\n\n/**\n * Anything but uiElement(s) counts as content.\n */\nfunction hasContent( element: ViewElement ): boolean {\n\tfor ( const child of element.getChildren() ) {\n\t\tif ( !child.is( 'uiElement' ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Updates all placeholders associated with a document in a post–fixer callback.\n *\n * @returns True if any changes were made to the view document.\n */\nfunction updateDocumentPlaceholders(\n\tplaceholders: Iterable<[ ViewElement, PlaceholderConfig ]>,\n\twriter: ViewDowncastWriter\n): boolean {\n\tconst directHostElements: Array<ViewElement> = [];\n\tlet wasViewModified = false;\n\n\t// First set placeholders on the direct hosts.\n\tfor ( const [ element, config ] of placeholders ) {\n\t\tif ( config.isDirectHost ) {\n\t\t\tdirectHostElements.push( element );\n\n\t\t\tif ( updatePlaceholder( writer, element, config ) ) {\n\t\t\t\twasViewModified = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Then set placeholders on the indirect hosts but only on those that does not already have an direct host placeholder.\n\tfor ( const [ element, config ] of placeholders ) {\n\t\tif ( config.isDirectHost ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst hostElement = getChildPlaceholderHostSubstitute( element );\n\n\t\t// If host element changed, remove the placeholder from the previous one.\n\t\t// This can happen when user replaces the first child element of the parent element\n\t\t// with new one, but the previous one is still in the view tree.\n\t\t// See:\n\t\t// https://github.com/ckeditor/ckeditor5/issues/14354\n\t\t// https://github.com/ckeditor/ckeditor5/issues/18149\n\t\tif ( hostElement !== config.hostElement && config.hostElement ) {\n\t\t\twriter.removeAttribute( 'data-placeholder', config.hostElement );\n\t\t\thideViewPlaceholder( writer, config.hostElement );\n\n\t\t\tconfig.hostElement = null;\n\t\t\twasViewModified = true;\n\t\t}\n\n\t\t// When not a direct host, it could happen that there is no child element\n\t\t// capable of displaying a placeholder.\n\t\tif ( !hostElement ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Don't override placeholder if the host element already has some direct placeholder.\n\t\tif ( directHostElements.includes( hostElement ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Update the host element (used for setting and removing the placeholder).\n\t\tconfig.hostElement = hostElement;\n\n\t\tif ( updatePlaceholder( writer, element, config ) ) {\n\t\t\twasViewModified = true;\n\t\t}\n\t}\n\n\treturn wasViewModified;\n}\n\n/**\n * Updates a single placeholder in a post–fixer callback.\n *\n * @returns True if any changes were made to the view document.\n */\nfunction updatePlaceholder( writer: ViewDowncastWriter, element: ViewElement, config: PlaceholderConfig ) {\n\tconst { text, isDirectHost, hostElement } = config;\n\n\tlet wasViewModified = false;\n\n\t// This may be necessary when updating the placeholder text to something else.\n\tif ( hostElement!.getAttribute( 'data-placeholder' ) !== text ) {\n\t\twriter.setAttribute( 'data-placeholder', text, hostElement! );\n\t\twasViewModified = true;\n\t}\n\n\t// If the host element is not a direct host then placeholder is needed only when there is only one element.\n\tconst isOnlyChild = isDirectHost || element.childCount == 1;\n\n\tif ( isOnlyChild && needsViewPlaceholder( hostElement!, config.keepOnFocus ) ) {\n\t\tif ( showViewPlaceholder( writer, hostElement! ) ) {\n\t\t\twasViewModified = true;\n\t\t}\n\t} else if ( hideViewPlaceholder( writer, hostElement! ) ) {\n\t\twasViewModified = true;\n\t}\n\n\treturn wasViewModified;\n}\n\n/**\n * Gets a child element capable of displaying a placeholder if a parent element can host more\n * than just text (for instance, when it is a root editable element). The child element\n * can then be used in other placeholder helpers as a substitute of its parent.\n */\nfunction getChildPlaceholderHostSubstitute( parent: ViewElement ): ViewElement | null {\n\tif ( parent.childCount ) {\n\t\tconst firstChild = parent.getChild( 0 )!;\n\n\t\tif ( firstChild.is( 'element' ) && !firstChild.is( 'uiElement' ) && !firstChild.is( 'attributeElement' ) ) {\n\t\t\treturn firstChild;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * Displays a deprecation warning message in the console, but only once per page load.\n */\nfunction showViewPlaceholderTextDeprecationWarning() {\n\tif ( !hasDisplayedPlaceholderDeprecationWarning ) {\n\t\t/**\n\t\t * The \"text\" option in the {@link module:engine/view/placeholder~enableViewPlaceholder `enableViewPlaceholder()`}\n\t\t * function is deprecated and will be removed soon.\n\t\t *\n\t\t * See the `#view-element-placeholder` section in the `Update to v39.x` section in the\n\t\t * {@glink updating/guides/updating-from-older-versions updating from older versions} guide\n\t\t * for more information on how to apply this change.\n\t\t *\n\t\t * @error enableViewPlaceholder-deprecated-text-option\n\t\t */\n\t\tlogWarning( 'enableViewPlaceholder-deprecated-text-option' );\n\t}\n\n\thasDisplayedPlaceholderDeprecationWarning = true;\n}\n\n/**\n * Configuration of the placeholder.\n */\ninterface PlaceholderConfig {\n\ttext: string;\n\tisDirectHost: boolean;\n\tkeepOnFocus: boolean;\n\thostElement: ViewElement | null;\n}\n\n/**\n * Element that could have a placeholder.\n */\nexport interface PlaceholderableViewElement extends ViewElement {\n\n\t/**\n\t * The text of element's placeholder.\n\t */\n\tplaceholder?: string;\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/**\n * @module engine/view/typecheckable\n */\n\nimport { type ViewAttributeElement } from './attributeelement.js';\nimport { type ViewContainerElement } from './containerelement.js';\nimport { type ViewDocumentFragment } from './documentfragment.js';\nimport { type ViewDocumentSelection } from './documentselection.js';\nimport { type ViewEditableElement } from './editableelement.js';\nimport { type ViewElement } from './element.js';\nimport { type ViewEmptyElement } from './emptyelement.js';\nimport { type ViewNode } from './node.js';\nimport { type ViewPosition } from './position.js';\nimport { type ViewRange } from './range.js';\nimport { type ViewRawElement } from './rawelement.js';\nimport { type ViewRootEditableElement } from './rooteditableelement.js';\nimport { type ViewSelection } from './selection.js';\nimport { type ViewText } from './text.js';\nimport { type ViewTextProxy } from './textproxy.js';\nimport { type ViewUIElement } from './uielement.js';\n\nexport abstract class ViewTypeCheckable {\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/node~ViewNode} or its subclass.\n\t *\n\t * This method is useful when processing view objects that are of unknown type. For example, a function\n\t * may return a {@link module:engine/view/documentfragment~ViewDocumentFragment} or a {@link module:engine/view/node~ViewNode}\n\t * that can be either a text node or an element. This method can be used to check what kind of object is returned.\n\t *\n\t * ```ts\n\t * someObject.is( 'element' ); // -> true if this is an element\n\t * someObject.is( 'node' ); // -> true if this is a node (a text node or an element)\n\t * someObject.is( 'documentFragment' ); // -> true if this is a document fragment\n\t * ```\n\t *\n\t * Since this method is also available on a range of model objects, you can prefix the type of the object with\n\t * `model:` or `view:` to check, for example, if this is the model's or view's element:\n\t *\n\t * ```ts\n\t * viewElement.is( 'view:element' ); // -> true\n\t * viewElement.is( 'model:element' ); // -> false\n\t * ```\n\t *\n\t * By using this method it is also possible to check a name of an element:\n\t *\n\t * ```ts\n\t * imgElement.is( 'element', 'img' ); // -> true\n\t * imgElement.is( 'view:element', 'img' ); // -> same as above, but more precise\n\t * ```\n\t * @label NODE\n\t */\n\tpublic is( type: 'node' | 'view:node' ): this is (\n\t\tViewNode |\n\t\tViewText |\n\t\tViewElement |\n\t\tViewAttributeElement |\n\t\tViewContainerElement |\n\t\tViewEditableElement |\n\t\tViewEmptyElement |\n\t\tViewRawElement |\n\t\tViewRootEditableElement |\n\t\tViewUIElement\n\t);\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/element~ViewElement} or its subclass.\n\t *\n\t * ```ts\n\t * element.is( 'element' ); // -> true\n\t * element.is( 'node' ); // -> true\n\t * element.is( 'view:element' ); // -> true\n\t * element.is( 'view:node' ); // -> true\n\t *\n\t * element.is( 'model:element' ); // -> false\n\t * element.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is an element, you can also check its\n\t * {@link module:engine/view/element~ViewElement#name name}:\n\t *\n\t * ```ts\n\t * element.is( 'element', 'img' ); // -> true if this is an <img> element\n\t * text.is( 'element', 'img' ); -> false\n\t * ```\n\t *\n\t * @label ELEMENT\n\t */\n\tpublic is( type: 'element' | 'view:element' ): this is (\n\t\tViewElement |\n\t\tViewAttributeElement |\n\t\tViewContainerElement |\n\t\tViewEditableElement |\n\t\tViewEmptyElement |\n\t\tViewRawElement |\n\t\tViewRootEditableElement |\n\t\tViewUIElement\n\t);\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/attributeelement~ViewAttributeElement}.\n\t *\n\t * ```ts\n\t * attributeElement.is( 'attributeElement' ); // -> true\n\t * attributeElement.is( 'element' ); // -> true\n\t * attributeElement.is( 'node' ); // -> true\n\t * attributeElement.is( 'view:attributeElement' ); // -> true\n\t * attributeElement.is( 'view:element' ); // -> true\n\t * attributeElement.is( 'view:node' ); // -> true\n\t *\n\t * attributeElement.is( 'model:element' ); // -> false\n\t * attributeElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is an attribute element, you can also check its\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement#name name}:\n\t *\n\t * ```ts\n\t * attributeElement.is( 'element', 'b' ); // -> true if this is a bold element\n\t * attributeElement.is( 'attributeElement', 'b' ); // -> same as above\n\t * text.is( 'element', 'b' ); -> false\n\t * ```\n\t *\n\t * @label ATTRIBUTE_ELEMENT\n\t */\n\tpublic is( type: 'attributeElement' | 'view:attributeElement' ): this is ViewAttributeElement;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/containerelement~ViewContainerElement} or its subclass.\n\t *\n\t * ```ts\n\t * containerElement.is( 'containerElement' ); // -> true\n\t * containerElement.is( 'element' ); // -> true\n\t * containerElement.is( 'node' ); // -> true\n\t * containerElement.is( 'view:containerElement' ); // -> true\n\t * containerElement.is( 'view:element' ); // -> true\n\t * containerElement.is( 'view:node' ); // -> true\n\t *\n\t * containerElement.is( 'model:element' ); // -> false\n\t * containerElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is a container element, you can also check its\n\t * {@link module:engine/view/containerelement~ViewContainerElement#name name}:\n\t *\n\t * ```ts\n\t * containerElement.is( 'element', 'div' ); // -> true if this is a div container element\n\t * containerElement.is( 'contaienrElement', 'div' ); // -> same as above\n\t * text.is( 'element', 'div' ); -> false\n\t * ```\n\t *\n\t * @label CONTAINER_ELEMENT\n\t */\n\tpublic is( type: 'containerElement' | 'view:containerElement' ):\n\t\tthis is ViewContainerElement | ViewEditableElement | ViewRootEditableElement;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/editableelement~ViewEditableElement} or its subclass.\n\t *\n\t * ```ts\n\t * editableElement.is( 'editableElement' ); // -> true\n\t * editableElement.is( 'element' ); // -> true\n\t * editableElement.is( 'node' ); // -> true\n\t * editableElement.is( 'view:editableElement' ); // -> true\n\t * editableElement.is( 'view:element' ); // -> true\n\t * editableElement.is( 'view:node' ); // -> true\n\t *\n\t * editableElement.is( 'model:element' ); // -> false\n\t * editableElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is an editbale element, you can also check its\n\t * {@link module:engine/view/editableelement~ViewEditableElement#name name}:\n\t *\n\t * ```ts\n\t * editableElement.is( 'element', 'div' ); // -> true if this is a div element\n\t * editableElement.is( 'editableElement', 'div' ); // -> same as above\n\t * text.is( 'element', 'div' ); -> false\n\t * ```\n\t *\n\t * @label EDITABLE_ELEMENT\n\t */\n\tpublic is( type: 'editableElement' | 'view:editableElement' ): this is ViewEditableElement | ViewRootEditableElement;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/emptyelement~ViewEmptyElement}.\n\t *\n\t * ```ts\n\t * emptyElement.is( 'emptyElement' ); // -> true\n\t * emptyElement.is( 'element' ); // -> true\n\t * emptyElement.is( 'node' ); // -> true\n\t * emptyElement.is( 'view:emptyElement' ); // -> true\n\t * emptyElement.is( 'view:element' ); // -> true\n\t * emptyElement.is( 'view:node' ); // -> true\n\t *\n\t * emptyElement.is( 'model:element' ); // -> false\n\t * emptyElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is an empty element, you can also check its\n\t * {@link module:engine/view/emptyelement~ViewEmptyElement#name name}:\n\t *\n\t * ```ts\n\t * emptyElement.is( 'element', 'img' ); // -> true if this is a img element\n\t * emptyElement.is( 'emptyElement', 'img' ); // -> same as above\n\t * text.is( 'element', 'img' ); -> false\n\t * ```\n\t *\n\t * @label EMPTY_ELEMENT\n\t */\n\tpublic is( type: 'emptyElement' | 'view:emptyElement' ): this is ViewEmptyElement;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/rawelement~ViewRawElement}.\n\t *\n\t * ```ts\n\t * rawElement.is( 'rawElement' ); // -> true\n\t * rawElement.is( 'element' ); // -> true\n\t * rawElement.is( 'node' ); // -> true\n\t * rawElement.is( 'view:rawElement' ); // -> true\n\t * rawElement.is( 'view:element' ); // -> true\n\t * rawElement.is( 'view:node' ); // -> true\n\t *\n\t * rawElement.is( 'model:element' ); // -> false\n\t * rawElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is a raw element, you can also check its\n\t * {@link module:engine/view/rawelement~ViewRawElement#name name}:\n\t *\n\t * ```ts\n\t * rawElement.is( 'img' ); // -> true if this is an img element\n\t * rawElement.is( 'rawElement', 'img' ); // -> same as above\n\t * text.is( 'img' ); -> false\n\t * ```\n\t *\n\t * @label RAW_ELEMENT\n\t */\n\tpublic is( type: 'rawElement' | 'view:rawElement' ): this is ViewRawElement;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/rooteditableelement~ViewRootEditableElement}.\n\t *\n\t * ```ts\n\t * rootEditableElement.is( 'rootElement' ); // -> true\n\t * rootEditableElement.is( 'editableElement' ); // -> true\n\t * rootEditableElement.is( 'element' ); // -> true\n\t * rootEditableElement.is( 'node' ); // -> true\n\t * rootEditableElement.is( 'view:editableElement' ); // -> true\n\t * rootEditableElement.is( 'view:element' ); // -> true\n\t * rootEditableElement.is( 'view:node' ); // -> true\n\t *\n\t * rootEditableElement.is( 'model:element' ); // -> false\n\t * rootEditableElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is a root editable element, you can also check its\n\t * {@link module:engine/view/rooteditableelement~ViewRootEditableElement#name name}:\n\t *\n\t * ```ts\n\t * rootEditableElement.is( 'element', 'div' ); // -> true if this is a div root editable element\n\t * rootEditableElement.is( 'rootElement', 'div' ); // -> same as above\n\t * text.is( 'element', 'div' ); -> false\n\t * ```\n\t *\n\t * @label ROOT_ELEMENT\n\t */\n\tpublic is( type: 'rootElement' | 'view:rootElement' ): this is ViewRootEditableElement;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/uielement~ViewUIElement}.\n\t *\n\t * ```ts\n\t * uiElement.is( 'uiElement' ); // -> true\n\t * uiElement.is( 'element' ); // -> true\n\t * uiElement.is( 'node' ); // -> true\n\t * uiElement.is( 'view:uiElement' ); // -> true\n\t * uiElement.is( 'view:element' ); // -> true\n\t * uiElement.is( 'view:node' ); // -> true\n\t *\n\t * uiElement.is( 'model:element' ); // -> false\n\t * uiElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is an ui element, you can also check its\n\t * {@link module:engine/view/uielement~ViewUIElement#name name}:\n\t *\n\t * ```ts\n\t * uiElement.is( 'element', 'span' ); // -> true if this is a span ui element\n\t * uiElement.is( 'uiElement', 'span' ); // -> same as above\n\t * text.is( 'element', 'span' ); -> false\n\t * ```\n\t *\n\t * @label UI_ELEMENT\n\t */\n\tpublic is( type: 'uiElement' | 'view:uiElement' ): this is ViewUIElement;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/text~ViewText}.\n\t *\n\t * ```ts\n\t * text.is( '$text' ); // -> true\n\t * text.is( 'node' ); // -> true\n\t * text.is( 'view:$text' ); // -> true\n\t * text.is( 'view:node' ); // -> true\n\t *\n\t * text.is( 'model:$text' ); // -> false\n\t * text.is( 'element' ); // -> false\n\t * text.is( 'range' ); // -> false\n\t * ```\n\t *\n\t * @label TEXT\n\t */\n\tpublic is( type: '$text' | 'view:$text' ): this is ViewText;\n\n\t/**\n\t * hecks whether this object is of type {@link module:engine/view/documentfragment~ViewDocumentFragment}.\n\t *\n\t * ```ts\n\t * docFrag.is( 'documentFragment' ); // -> true\n\t * docFrag.is( 'view:documentFragment' ); // -> true\n\t *\n\t * docFrag.is( 'model:documentFragment' ); // -> false\n\t * docFrag.is( 'element' ); // -> false\n\t * docFrag.is( 'node' ); // -> false\n\t * ```\n\t *\n\t * @label DOCUMENT_FRAGMENT\n\t */\n\tpublic is( type: 'documentFragment' | 'view:documentFragment' ): this is ViewDocumentFragment;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/textproxy~ViewTextProxy}.\n\t *\n\t * ```ts\n\t * textProxy.is( '$textProxy' ); // -> true\n\t * textProxy.is( 'view:$textProxy' ); // -> true\n\t *\n\t * textProxy.is( 'model:$textProxy' ); // -> false\n\t * textProxy.is( 'element' ); // -> false\n\t * textProxy.is( 'range' ); // -> false\n\t * ```\n\t *\n\t * **Note:** Until version 20.0.0 this method wasn't accepting `'$textProxy'` type. The legacy `'textProxy'` type is still\n\t * accepted for backward compatibility.\n\t *\n\t * @label TEXT_PROXY\n\t */\n\tpublic is( type: '$textProxy' | 'view:$textProxy' ): this is ViewTextProxy;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/position~ViewPosition}.\n\t *\n\t * ```ts\n\t * position.is( 'position' ); // -> true\n\t * position.is( 'view:position' ); // -> true\n\t *\n\t * position.is( 'model:position' ); // -> false\n\t * position.is( 'element' ); // -> false\n\t * position.is( 'range' ); // -> false\n\t * ```\n\t *\n\t * @label POSITION\n\t */\n\tpublic is( type: 'position' | 'view:position' ): this is ViewPosition;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/range~ViewRange}.\n\t *\n\t * ```ts\n\t * range.is( 'range' ); // -> true\n\t * range.is( 'view:range' ); // -> true\n\t *\n\t * range.is( 'model:range' ); // -> false\n\t * range.is( 'element' ); // -> false\n\t * range.is( 'selection' ); // -> false\n\t * ```\n\t *\n\t * @label RANGE\n\t */\n\tpublic is( type: 'range' | 'view:range' ): this is ViewRange;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/selection~ViewSelection} or\n\t * {@link module:engine/view/documentselection~ViewDocumentSelection}.\n\t *\n\t * ```ts\n\t * selection.is( 'selection' ); // -> true\n\t * selection.is( 'view:selection' ); // -> true\n\t *\n\t * selection.is( 'model:selection' ); // -> false\n\t * selection.is( 'element' ); // -> false\n\t * selection.is( 'range' ); // -> false\n\t * ```\n\t *\n\t * @label SELECTION\n\t */\n\tpublic is( type: 'selection' | 'view:selection' ): this is ViewSelection | ViewDocumentSelection;\n\n\t/**\n\t * Checks whether this object is of type {@link module:engine/view/documentselection~ViewDocumentSelection}.\n\t *\n\t * ```ts\n\t * `docSelection.is( 'selection' ); // -> true\n\t * docSelection.is( 'documentSelection' ); // -> true\n\t * docSelection.is( 'view:selection' ); // -> true\n\t * docSelection.is( 'view:documentSelection' ); // -> true\n\t *\n\t * docSelection.is( 'model:documentSelection' ); // -> false\n\t * docSelection.is( 'element' ); // -> false\n\t * docSelection.is( 'node' ); // -> false\n\t * ```\n\t *\n\t * @label DOCUMENT_SELECTION\n\t */\n\tpublic is( type: 'documentSelection' | 'view:documentSelection' ): this is ViewDocumentSelection;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/element~ViewElement} or its subclass and has the specified `name`.\n\t *\n\t * @label ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'element' | 'view:element', name: N ): this is (\n\t\tViewElement |\n\t\tViewAttributeElement |\n\t\tViewContainerElement |\n\t\tViewEditableElement |\n\t\tViewEmptyElement |\n\t\tViewRawElement |\n\t\tViewRootEditableElement |\n\t\tViewUIElement\n\t) & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/attributeelement~ViewAttributeElement} and has the specified `name`.\n\t *\n\t * @label ATTRIBUTE_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'attributeElement' | 'view:attributeElement', name: N ): this is ViewAttributeElement & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/containerelement~ViewContainerElement}\n\t * or its subclass and has the specified `name`.\n\t *\n\t * @label CONTAINER_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'containerElement' | 'view:containerElement', name: N ): this is (\n\t\tViewContainerElement |\n\t\tViewEditableElement |\n\t\tViewRootEditableElement\n\t) & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/editableelement~ViewEditableElement}\n\t * or its subclass and has the specified `name`.\n\t *\n\t * @label EDITABLE_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'editableElement' | 'view:editableElement', name: N ): this is (\n\t\tViewEditableElement |\n\t\tViewRootEditableElement\n\t) & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/emptyelement~ViewEmptyElement} has the specified `name`.\n\t *\n\t * @label EMPTY_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'emptyElement' | 'view:emptyElement', name: N ): this is ViewEmptyElement & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/rawelement~ViewRawElement} and has the specified `name`.\n\t *\n\t * @label RAW_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'rawElement' | 'view:rawElement', name: N ): this is ViewRawElement & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/rooteditableelement~ViewRootEditableElement}\n\t * and has the specified `name`.\n\t *\n\t * @label ROOT_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'rootElement' | 'view:rootElement', name: N ): this is ViewRootEditableElement & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/view/uielement~ViewUIElement} and has the specified `name`.\n\t *\n\t * @label UI_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'uiElement' | 'view:uiElement', name: N ): this is ViewUIElement & { name: N };\n\n\t/* v8 ignore next -- @preserve */\n\tpublic is(): boolean {\n\t\t// There are a lot of overloads above.\n\t\t// Overriding method in derived classes remove them and only `is( type: string ): boolean` is visible which we don't want.\n\t\t// One option would be to copy them all to all classes, but that's ugly.\n\t\t// It's best when TypeScript compiler doesn't see those overloads, except the one in the top base class.\n\t\t// To overload a method, but not let the compiler see it, do after class definition:\n\t\t// `MyClass.prototype.is = function( type: string ) {...}`\n\t\tthrow new Error( 'is() method is abstract' );\n\t}\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/**\n * @module engine/view/node\n */\n\nimport { ViewTypeCheckable } from './typecheckable.js';\n\nimport {\n\tCKEditorError,\n\tEmitterMixin,\n\tcompareArrays,\n\ttype EmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { ViewDocument, ViewDocumentChangeType } from './document.js';\nimport { type ViewDocumentFragment } from './documentfragment.js';\nimport { type ViewElement } from './element.js';\n\nconst ViewNodeBase: EmitterMixinConstructor<typeof ViewTypeCheckable> = /* #__PURE__ */ EmitterMixin( ViewTypeCheckable );\n\n/**\n * Abstract view node class.\n *\n * This is an abstract class. Its constructor should not be used directly.\n * Use the {@link module:engine/view/downcastwriter~ViewDowncastWriter} or {@link module:engine/view/upcastwriter~ViewUpcastWriter}\n * to create new instances of view nodes.\n */\nexport abstract class ViewNode extends ViewNodeBase {\n\t/**\n\t * The document instance to which this node belongs.\n\t */\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Parent element. Null by default. Set by {@link module:engine/view/element~ViewElement#_insertChild}.\n\t */\n\tpublic readonly parent: ViewElement | ViewDocumentFragment | null;\n\n\t/**\n\t * Creates a tree view node.\n\t *\n\t * @param document The document instance to which this node belongs.\n\t */\n\tprotected constructor( document: ViewDocument ) {\n\t\tsuper();\n\n\t\tthis.document = document;\n\t\tthis.parent = null;\n\t}\n\n\t/**\n\t * Index of the node in the parent element or null if the node has no parent.\n\t *\n\t * Accessing this property throws an error if this node's parent element does not contain it.\n\t * This means that view tree got broken.\n\t */\n\tpublic get index(): number | null {\n\t\tlet pos;\n\n\t\tif ( !this.parent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// No parent or child doesn't exist in parent's children.\n\t\tif ( ( pos = this.parent.getChildIndex( this ) ) == -1 ) {\n\t\t\t/**\n\t\t\t * The node's parent does not contain this node. It means that the document tree is corrupted.\n\t\t\t *\n\t\t\t * @error view-node-not-found-in-parent\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-node-not-found-in-parent', this );\n\t\t}\n\n\t\treturn pos;\n\t}\n\n\t/**\n\t * Node's next sibling, or `null` if it is the last child.\n\t */\n\tpublic get nextSibling(): ViewNode | null {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent!.getChild( index + 1 ) ) || null;\n\t}\n\n\t/**\n\t * Node's previous sibling, or `null` if it is the first child.\n\t */\n\tpublic get previousSibling(): ViewNode | null {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent!.getChild( index - 1 ) ) || null;\n\t}\n\n\t/**\n\t * Top-most ancestor of the node. If the node has no parent it is the root itself.\n\t */\n\tpublic get root(): ViewElement | ViewDocumentFragment {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n\t\tlet root: ViewNode | ViewDocumentFragment = this;\n\n\t\twhile ( root.parent ) {\n\t\t\troot = root.parent;\n\t\t}\n\n\t\treturn root as any;\n\t}\n\n\t/**\n\t * Returns true if the node is in a tree rooted in the document (is a descendant of one of its roots).\n\t */\n\tpublic isAttached(): boolean {\n\t\treturn this.root.is( 'rootElement' );\n\t}\n\n\t/**\n\t * Gets a path to the node. The path is an array containing indices of consecutive ancestors of this node,\n\t * beginning from {@link module:engine/view/node~ViewNode#root root}, down to this node's index.\n\t *\n\t * ```ts\n\t * const abc = downcastWriter.createText( 'abc' );\n\t * const foo = downcastWriter.createText( 'foo' );\n\t * const h1 = downcastWriter.createElement( 'h1', null, downcastWriter.createText( 'header' ) );\n\t * const p = downcastWriter.createElement( 'p', null, [ abc, foo ] );\n\t * const div = downcastWriter.createElement( 'div', null, [ h1, p ] );\n\t * foo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t * h1.getPath(); // Returns [ 0 ].\n\t * div.getPath(); // Returns [].\n\t * ```\n\t *\n\t * @returns The path.\n\t */\n\tpublic getPath(): Array<number> {\n\t\tconst path = [];\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n\t\tlet node: ViewNode | ViewDocumentFragment = this;\n\n\t\twhile ( node.parent ) {\n\t\t\tpath.unshift( node.index! );\n\t\t\tnode = node.parent;\n\t\t}\n\n\t\treturn path;\n\t}\n\n\t/**\n\t * Returns ancestors array of this node.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this node will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from node's parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */\n\tpublic getAncestors( options: { includeSelf?: boolean; parentFirst?: boolean } = {} ): Array<ViewNode | ViewDocumentFragment> {\n\t\tconst ancestors: Array<ViewNode | ViewDocumentFragment> = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/element~ViewElement} or {@link module:engine/view/documentfragment~ViewDocumentFragment}\n\t * which is a common ancestor of both nodes.\n\t *\n\t * @param node The second node.\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` both nodes will be considered \"ancestors\" too.\n\t * Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t */\n\tpublic getCommonAncestor( node: ViewNode, options: { includeSelf?: boolean } = {} ): ViewElement | ViewDocumentFragment | null {\n\t\tconst ancestorsA = this.getAncestors( options );\n\t\tconst ancestorsB = node.getAncestors( options );\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ] as ( ViewElement | ViewDocumentFragment );\n\t}\n\n\t/**\n\t * Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/view/documentfragment~ViewDocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */\n\tpublic isBefore( node: ViewNode ): boolean {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst thisPath = this.getPath();\n\t\tconst nodePath = node.getPath();\n\n\t\tconst result = compareArrays( thisPath, nodePath );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'prefix':\n\t\t\t\treturn true;\n\n\t\t\tcase 'extension':\n\t\t\t\treturn false;\n\n\t\t\tdefault:\n\t\t\t\treturn thisPath[ result as number ] < nodePath[ result as number ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/view/documentfragment~ViewDocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */\n\tpublic isAfter( node: ViewNode ): boolean {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// In other cases, just check if the `node` is before, and return the opposite.\n\t\treturn !this.isBefore( node );\n\t}\n\n\t/**\n\t * Removes node from parent.\n\t *\n\t * @internal\n\t */\n\tpublic _remove(): void {\n\t\tthis.parent!._removeChildren( this.index! );\n\t}\n\n\t/**\n\t * @internal\n\t * @param type Type of the change.\n\t * @param node Changed node.\n\t * @param data Additional data.\n\t * @fires change\n\t */\n\tpublic _fireChange( type: ViewDocumentChangeType, node: ViewNode, data?: { index: number } ): void {\n\t\tthis.fire( `change:${ type }`, node, data );\n\n\t\tif ( this.parent ) {\n\t\t\tthis.parent._fireChange( type, node, data );\n\t\t}\n\t}\n\n\t/**\n\t * Converts `ViewNode` to plain object and returns it.\n\t *\n\t * @returns `ViewNode` converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\tconst json: any = {\n\t\t\tpath: this.getPath(),\n\t\t\ttype: 'Node'\n\t\t};\n\n\t\tif ( this !== this.root as any && this.root.is( 'rootElement' ) ) {\n\t\t\tjson.root = this.root.toJSON();\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Clones this node.\n\t *\n\t * @internal\n\t * @returns Clone of this node.\n\t */\n\tpublic abstract _clone( deep?: boolean ): ViewNode;\n\n\t/**\n\t * Checks if provided node is similar to this node.\n\t *\n\t * @returns True if nodes are similar.\n\t */\n\tpublic abstract isSimilar( other: ViewNode ): boolean;\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewNode.prototype.is = function( type: string ): boolean {\n\treturn type === 'node' || type === 'view:node';\n} as any;\n\n/**\n * Fired when list of {@link module:engine/view/element~ViewElement elements} children, attributes or text changes.\n *\n * Change event is bubbled – it is fired on all ancestors.\n *\n * All change events as the first parameter receive the node that has changed (the node for which children, attributes or text changed).\n *\n * If `change:children` event is fired, there is an additional second parameter, which is an object with additional data related to change.\n *\n * @eventName ~ViewNode#change\n * @eventName ~ViewNode#change:children\n * @eventName ~ViewNode#change:attributes\n * @eventName ~ViewNode#change:text\n */\nexport type ViewNodeChangeEvent = {\n\tname: 'change' | `change:${ ViewDocumentChangeType }`;\n\targs: [ changedNode: ViewNode, data?: { index: number } ];\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/**\n * @module engine/view/text\n */\n\nimport { ViewNode } from './node.js';\n\nimport { type ViewDocument } from './document.js';\n\n/**\n * Tree view text node.\n *\n * The constructor of this class should not be used directly. To create a new text node instance\n * use the {@link module:engine/view/downcastwriter~ViewDowncastWriter#createText `ViewDowncastWriter#createText()`}\n * method when working on data downcasted from the model or the\n * {@link module:engine/view/upcastwriter~ViewUpcastWriter#createText `ViewUpcastWriter#createText()`}\n * method when working on non-semantic views.\n */\nexport class ViewText extends ViewNode {\n\t/**\n\t * The text content.\n\t *\n\t * Setting the data fires the {@link module:engine/view/node~ViewNode#event:change:text change event}.\n\t */\n\tprivate _textData: string;\n\n\t/**\n\t * Creates a tree view text node.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#createText\n\t * @internal\n\t * @param document The document instance to which this text node belongs.\n\t * @param data The text's data.\n\t */\n\tconstructor( document: ViewDocument, data: string ) {\n\t\tsuper( document );\n\n\t\tthis._textData = data;\n\t}\n\n\t/**\n\t * The text content.\n\t */\n\tpublic get data(): string {\n\t\treturn this._textData;\n\t}\n\n\t/**\n\t * The `_data` property is controlled by a getter and a setter.\n\t *\n\t * The getter is required when using the addition assignment operator on protected property:\n\t *\n\t * ```ts\n\t * const foo = downcastWriter.createText( 'foo' );\n\t * const bar = downcastWriter.createText( 'bar' );\n\t *\n\t * foo._data += bar.data;   // executes: `foo._data = foo._data + bar.data`\n\t * console.log( foo.data ); // prints: 'foobar'\n\t * ```\n\t *\n\t * If the protected getter didn't exist, `foo._data` will return `undefined` and result of the merge will be invalid.\n\t *\n\t * The setter sets data and fires the {@link module:engine/view/node~ViewNode#event:change:text change event}.\n\t *\n\t * @internal\n\t */\n\tpublic get _data(): string {\n\t\treturn this.data;\n\t}\n\n\tpublic set _data( data: string ) {\n\t\tthis._fireChange( 'text', this );\n\n\t\tthis._textData = data;\n\t}\n\n\t/**\n\t * Checks if this text node is similar to other text node.\n\t * Both nodes should have the same data to be considered as similar.\n\t *\n\t * @param otherNode Node to check if it is same as this node.\n\t */\n\tpublic isSimilar( otherNode: ViewNode ): boolean {\n\t\tif ( !( otherNode instanceof ViewText ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this === otherNode || this.data === otherNode.data;\n\t}\n\n\t/**\n\t * Converts `ViewText` instance to plain object and returns it.\n\t *\n\t * @returns `ViewText` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.type = 'Text';\n\t\tjson.data = this.data;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Clones this node.\n\t *\n\t * @internal\n\t * @returns Text node that is a clone of this node.\n\t */\n\tpublic _clone(): ViewText {\n\t\treturn new ViewText( this.document, this.data );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewText: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logExtended(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewText: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewText.prototype.is = function( type: string ): boolean {\n\treturn type === '$text' || type === 'view:$text' ||\n\t\t// This are legacy values kept for backward compatibility.\n\t\ttype === 'text' || type === 'view:text' ||\n\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\ttype === 'node' || type === 'view:node';\n} as any;\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/**\n * @module engine/view/textproxy\n */\n\nimport { ViewTypeCheckable } from './typecheckable.js';\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewDocument } from './document.js';\nimport { type ViewDocumentFragment } from './documentfragment.js';\nimport { type ViewElement } from './element.js';\nimport { type ViewNode } from './node.js';\nimport { type ViewText } from './text.js';\n\n/**\n * ViewTextProxy is a wrapper for substring of {@link module:engine/view/text~ViewText}. Instance of this class is created by\n * {@link module:engine/view/treewalker~ViewTreeWalker} when only a part of {@link module:engine/view/text~ViewText} needs to be returned.\n *\n * `ViewTextProxy` has an API similar to {@link module:engine/view/text~ViewText Text} and allows to do most of the common tasks performed\n * on view nodes.\n *\n * **Note:** Some `ViewTextProxy` instances may represent whole text node, not just a part of it.\n * See {@link module:engine/view/textproxy~ViewTextProxy#isPartial}.\n *\n * **Note:** `ViewTextProxy` is a readonly interface.\n *\n * **Note:** `ViewTextProxy` instances are created on the fly basing\n * on the current state of parent {@link module:engine/view/text~ViewText}.\n * Because of this it is highly unrecommended to store references to `TextProxy instances because they might get\n * invalidated due to operations on Document. Also ViewTextProxy is not a {@link module:engine/view/node~ViewNode} so it cannot be\n * inserted as a child of {@link module:engine/view/element~ViewElement}.\n *\n * `ViewTextProxy` instances are created by {@link module:engine/view/treewalker~ViewTreeWalker view tree walker}.\n * You should not need to create an instance of this class by your own.\n */\nexport class ViewTextProxy extends ViewTypeCheckable {\n\t/**\n\t * Reference to the {@link module:engine/view/text~ViewText} element which ViewTextProxy is a substring.\n\t */\n\tpublic readonly textNode: ViewText;\n\n\t/**\n\t * Text data represented by this text proxy.\n\t */\n\tpublic readonly data: string;\n\n\t/**\n\t * Offset in the `textNode` where this `ViewTextProxy` instance starts.\n\t */\n\tpublic readonly offsetInText: number;\n\n\t/**\n\t * Creates a text proxy.\n\t *\n\t * @internal\n\t * @param textNode Text node which part is represented by this text proxy.\n\t * @param offsetInText Offset in {@link module:engine/view/textproxy~ViewTextProxy#textNode text node}\n\t * from which the text proxy starts.\n\t * @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t */\n\tconstructor( textNode: ViewText, offsetInText: number, length: number ) {\n\t\tsuper();\n\n\t\tthis.textNode = textNode;\n\n\t\tif ( offsetInText < 0 || offsetInText > textNode.data.length ) {\n\t\t\t/**\n\t\t\t * Given offsetInText value is incorrect.\n\t\t\t *\n\t\t\t * @error view-textproxy-wrong-offsetintext\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-textproxy-wrong-offsetintext', this );\n\t\t}\n\n\t\tif ( length < 0 || offsetInText + length > textNode.data.length ) {\n\t\t\t/**\n\t\t\t * Given length value is incorrect.\n\t\t\t *\n\t\t\t * @error view-textproxy-wrong-length\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-textproxy-wrong-length', this );\n\t\t}\n\n\t\tthis.data = textNode.data.substring( offsetInText, offsetInText + length );\n\t\tthis.offsetInText = offsetInText;\n\t}\n\n\t/**\n\t * Offset size of this node.\n\t */\n\tpublic get offsetSize(): number {\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Flag indicating whether `ViewTextProxy` instance covers only part of the original {@link module:engine/view/text~ViewText text node}\n\t * (`true`) or the whole text node (`false`).\n\t *\n\t * This is `false` when text proxy starts at the very beginning of {@link module:engine/view/textproxy~ViewTextProxy#textNode textNode}\n\t * ({@link module:engine/view/textproxy~ViewTextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t * text node size.\n\t */\n\tpublic get isPartial(): boolean {\n\t\treturn this.data.length !== this.textNode.data.length;\n\t}\n\n\t/**\n\t * Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t */\n\tpublic get parent(): ViewElement | ViewDocumentFragment | null {\n\t\treturn this.textNode.parent;\n\t}\n\n\t/**\n\t * Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t */\n\tpublic get root(): ViewNode | ViewDocumentFragment {\n\t\treturn this.textNode.root;\n\t}\n\n\t/**\n\t * {@link module:engine/view/document~ViewDocument View document} that owns this text proxy, or `null` if the text proxy is inside\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}.\n\t */\n\tpublic get document(): ViewDocument | null {\n\t\treturn this.textNode.document;\n\t}\n\n\t/**\n\t * Returns ancestors array of this text proxy.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true`, textNode will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from text proxy parent to\n\t * root element, otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */\n\tpublic getAncestors( options: {\n\t\tincludeSelf?: boolean;\n\t\tparentFirst?: boolean;\n\t} = {} ): Array<ViewText | ViewElement | ViewDocumentFragment> {\n\t\tconst ancestors: Array<ViewText | ViewElement | ViewDocumentFragment> = [];\n\t\tlet parent: ViewText | ViewElement | ViewDocumentFragment | null = options.includeSelf ? this.textNode : this.parent;\n\n\t\twhile ( parent !== null ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewTextProxy: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logExtended(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ViewTextProxy: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewTextProxy.prototype.is = function( type: string ): boolean {\n\treturn type === '$textProxy' || type === 'view:$textProxy' ||\n\t\t// This are legacy values kept for backward compatibility.\n\t\ttype === 'textProxy' || type === 'view:textProxy';\n} as any;\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/**\n * @module engine/conversion/viewconsumable\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport type { ViewElement, ViewNormalizedConsumables } from '../view/element.js';\nimport { type ViewNode } from '../view/node.js';\nimport { type ViewText } from '../view/text.js';\nimport { type ViewDocumentFragment } from '../view/documentfragment.js';\nimport type { Match } from '../view/matcher.js';\n\n/**\n * Class used for handling consumption of view {@link module:engine/view/element~ViewElement elements},\n * {@link module:engine/view/text~ViewText text nodes} and\n * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragments}.\n * Element's name and its parts (attributes, classes and styles) can be consumed separately. Consuming an element's name\n * does not consume its attributes, classes and styles.\n * To add items for consumption use {@link module:engine/conversion/viewconsumable~ViewConsumable#add add method}.\n * To test items use {@link module:engine/conversion/viewconsumable~ViewConsumable#test test method}.\n * To consume items use {@link module:engine/conversion/viewconsumable~ViewConsumable#consume consume method}.\n * To revert already consumed items use {@link module:engine/conversion/viewconsumable~ViewConsumable#revert revert method}.\n *\n * ```ts\n * viewConsumable.add( element, { name: true } ); // Adds element's name as ready to be consumed.\n * viewConsumable.add( textNode ); // Adds text node for consumption.\n * viewConsumable.add( docFragment ); // Adds document fragment for consumption.\n * viewConsumable.test( element, { name: true }  ); // Tests if element's name can be consumed.\n * viewConsumable.test( textNode ); // Tests if text node can be consumed.\n * viewConsumable.test( docFragment ); // Tests if document fragment can be consumed.\n * viewConsumable.consume( element, { name: true }  ); // Consume element's name.\n * viewConsumable.consume( textNode ); // Consume text node.\n * viewConsumable.consume( docFragment ); // Consume document fragment.\n * viewConsumable.revert( element, { name: true }  ); // Revert already consumed element's name.\n * viewConsumable.revert( textNode ); // Revert already consumed text node.\n * viewConsumable.revert( docFragment ); // Revert already consumed document fragment.\n * ```\n */\nexport class ViewConsumable {\n\t/**\n\t * Map of consumable elements. If {@link module:engine/view/element~ViewElement element} is used as a key,\n\t * {@link module:engine/conversion/viewconsumable~ViewElementConsumables ViewElementConsumables} instance is stored as value.\n\t * For {@link module:engine/view/text~ViewText text nodes} and\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragments} boolean value is stored as value.\n\t */\n\tprivate _consumables = new Map<ViewNode | ViewDocumentFragment, ViewElementConsumables | boolean>();\n\n\t/**\n\t * Adds view {@link module:engine/view/element~ViewElement element}, {@link module:engine/view/text~ViewText text node} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment} as ready to be consumed.\n\t *\n\t * ```ts\n\t * viewConsumable.add( p, { name: true } ); // Adds element's name to consume.\n\t * viewConsumable.add( p, { attributes: 'name' } ); // Adds element's attribute.\n\t * viewConsumable.add( p, { classes: 'foobar' } ); // Adds element's class.\n\t * viewConsumable.add( p, { styles: 'color' } ); // Adds element's style\n\t * viewConsumable.add( p, { attributes: 'name', styles: 'color' } ); // Adds attribute and style.\n\t * viewConsumable.add( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be provided.\n\t * viewConsumable.add( textNode ); // Adds text node to consume.\n\t * viewConsumable.add( docFragment ); // Adds document fragment to consume.\n\t * ```\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t * attribute is provided - it should be handled separately by providing actual style/class.\n\t *\n\t * ```ts\n\t * viewConsumable.add( p, { attributes: 'style' } ); // This call will throw an exception.\n\t * viewConsumable.add( p, { styles: 'color' } ); // This is properly handled style.\n\t * ```\n\t *\n\t * @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t * @param consumables.name If set to true element's name will be included.\n\t * @param consumables.attributes Attribute name or array of attribute names.\n\t * @param consumables.classes Class name or array of class names.\n\t * @param consumables.styles Style name or array of style names.\n\t */\n\tpublic add(\n\t\telement: ViewText | ViewElement | ViewDocumentFragment,\n\t\tconsumables?: Consumables | ViewNormalizedConsumables\n\t): void {\n\t\tlet elementConsumables: ViewElementConsumables;\n\n\t\t// For text nodes and document fragments just mark them as consumable.\n\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\tthis._consumables.set( element, true );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// For elements create new ViewElementConsumables or update already existing one.\n\t\tif ( !this._consumables.has( element ) ) {\n\t\t\telementConsumables = new ViewElementConsumables( element );\n\t\t\tthis._consumables.set( element, elementConsumables );\n\t\t} else {\n\t\t\telementConsumables = this._consumables.get( element ) as ViewElementConsumables;\n\t\t}\n\n\t\telementConsumables.add( consumables ? normalizeConsumables( consumables ) : element._getConsumables() );\n\t}\n\n\t/**\n\t * Tests if {@link module:engine/view/element~ViewElement view element}, {@link module:engine/view/text~ViewText text node} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment} can be consumed.\n\t * It returns `true` when all items included in method's call can be consumed. Returns `false` when\n\t * first already consumed item is found and `null` when first non-consumable item is found.\n\t *\n\t * ```ts\n\t * viewConsumable.test( p, { name: true } ); // Tests element's name.\n\t * viewConsumable.test( p, { attributes: 'name' } ); // Tests attribute.\n\t * viewConsumable.test( p, { classes: 'foobar' } ); // Tests class.\n\t * viewConsumable.test( p, { styles: 'color' } ); // Tests style.\n\t * viewConsumable.test( p, { attributes: 'name', styles: 'color' } ); // Tests attribute and style.\n\t * viewConsumable.test( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be tested.\n\t * viewConsumable.test( textNode ); // Tests text node.\n\t * viewConsumable.test( docFragment ); // Tests document fragment.\n\t * ```\n\t *\n\t * Testing classes and styles as attribute will test if all added classes/styles can be consumed.\n\t *\n\t * ```ts\n\t * viewConsumable.test( p, { attributes: 'class' } ); // Tests if all added classes can be consumed.\n\t * viewConsumable.test( p, { attributes: 'style' } ); // Tests if all added styles can be consumed.\n\t * ```\n\t *\n\t * @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t * @param consumables.name If set to true element's name will be included.\n\t * @param consumables.attributes Attribute name or array of attribute names.\n\t * @param consumables.classes Class name or array of class names.\n\t * @param consumables.styles Style name or array of style names.\n\t * @returns Returns `true` when all items included in method's call can be consumed. Returns `false`\n\t * when first already consumed item is found and `null` when first non-consumable item is found.\n\t */\n\tpublic test( element: ViewNode | ViewDocumentFragment, consumables?: Consumables | Match ): boolean | null {\n\t\tconst elementConsumables = this._consumables.get( element );\n\n\t\tif ( elementConsumables === undefined ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For text nodes and document fragments return stored boolean value.\n\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\treturn elementConsumables as boolean;\n\t\t}\n\n\t\t// For elements test consumables object.\n\t\treturn ( elementConsumables as ViewElementConsumables ).test( normalizeConsumables( consumables! ) );\n\t}\n\n\t/**\n\t * Consumes {@link module:engine/view/element~ViewElement view element}, {@link module:engine/view/text~ViewText text node} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}.\n\t * It returns `true` when all items included in method's call can be consumed, otherwise returns `false`.\n\t *\n\t * ```ts\n\t * viewConsumable.consume( p, { name: true } ); // Consumes element's name.\n\t * viewConsumable.consume( p, { attributes: 'name' } ); // Consumes element's attribute.\n\t * viewConsumable.consume( p, { classes: 'foobar' } ); // Consumes element's class.\n\t * viewConsumable.consume( p, { styles: 'color' } ); // Consumes element's style.\n\t * viewConsumable.consume( p, { attributes: 'name', styles: 'color' } ); // Consumes attribute and style.\n\t * viewConsumable.consume( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be consumed.\n\t * viewConsumable.consume( textNode ); // Consumes text node.\n\t * viewConsumable.consume( docFragment ); // Consumes document fragment.\n\t * ```\n\t *\n\t * Consuming classes and styles as attribute will test if all added classes/styles can be consumed.\n\t *\n\t * ```ts\n\t * viewConsumable.consume( p, { attributes: 'class' } ); // Consume only if all added classes can be consumed.\n\t * viewConsumable.consume( p, { attributes: 'style' } ); // Consume only if all added styles can be consumed.\n\t * ```\n\t *\n\t * @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t * @param consumables.name If set to true element's name will be included.\n\t * @param consumables.attributes Attribute name or array of attribute names.\n\t * @param consumables.classes Class name or array of class names.\n\t * @param consumables.styles Style name or array of style names.\n\t * @returns Returns `true` when all items included in method's call can be consumed,\n\t * otherwise returns `false`.\n\t */\n\tpublic consume( element: ViewNode | ViewDocumentFragment, consumables?: Consumables | Match ): boolean {\n\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\tif ( !this.test( element, consumables ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// For text nodes and document fragments set value to false.\n\t\t\tthis._consumables.set( element, false );\n\n\t\t\treturn true;\n\t\t}\n\n\t\t// For elements - consume consumables object.\n\t\tconst elementConsumables = this._consumables.get( element );\n\n\t\tif ( elementConsumables === undefined ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ( elementConsumables as ViewElementConsumables ).consume( normalizeConsumables( consumables! ) );\n\t}\n\n\t/**\n\t * Reverts {@link module:engine/view/element~ViewElement view element}, {@link module:engine/view/text~ViewText text node} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment} so they can be consumed once again.\n\t * Method does not revert items that were never previously added for consumption, even if they are included in\n\t * method's call.\n\t *\n\t * ```ts\n\t * viewConsumable.revert( p, { name: true } ); // Reverts element's name.\n\t * viewConsumable.revert( p, { attributes: 'name' } ); // Reverts element's attribute.\n\t * viewConsumable.revert( p, { classes: 'foobar' } ); // Reverts element's class.\n\t * viewConsumable.revert( p, { styles: 'color' } ); // Reverts element's style.\n\t * viewConsumable.revert( p, { attributes: 'name', styles: 'color' } ); // Reverts attribute and style.\n\t * viewConsumable.revert( p, { classes: [ 'baz', 'bar' ] } ); // Multiple names can be reverted.\n\t * viewConsumable.revert( textNode ); // Reverts text node.\n\t * viewConsumable.revert( docFragment ); // Reverts document fragment.\n\t * ```\n\t *\n\t * Reverting classes and styles as attribute will revert all classes/styles that were previously added for\n\t * consumption.\n\t *\n\t * ```ts\n\t * viewConsumable.revert( p, { attributes: 'class' } ); // Reverts all classes added for consumption.\n\t * viewConsumable.revert( p, { attributes: 'style' } ); // Reverts all styles added for consumption.\n\t * ```\n\t *\n\t * @param consumables Used only if first parameter is {@link module:engine/view/element~ViewElement view element} instance.\n\t * @param consumables.name If set to true element's name will be included.\n\t * @param consumables.attributes Attribute name or array of attribute names.\n\t * @param consumables.classes Class name or array of class names.\n\t * @param consumables.styles Style name or array of style names.\n\t */\n\tpublic revert( element: ViewNode, consumables: Consumables | Match ): void {\n\t\tconst elementConsumables = this._consumables.get( element );\n\n\t\tif ( elementConsumables !== undefined ) {\n\t\t\tif ( element.is( '$text' ) || element.is( 'documentFragment' ) ) {\n\t\t\t\t// For text nodes and document fragments - set consumable to true.\n\t\t\t\tthis._consumables.set( element, true );\n\t\t\t} else {\n\t\t\t\t// For elements - revert items from consumables object.\n\t\t\t\t( elementConsumables as ViewElementConsumables ).revert( normalizeConsumables( consumables ) );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Creates {@link module:engine/conversion/viewconsumable~ViewConsumable ViewConsumable} instance from\n\t * {@link module:engine/view/node~ViewNode node} or {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}.\n\t * Instance will contain all elements, child nodes, attributes, styles and classes added for consumption.\n\t *\n\t * @param from View node or document fragment from which `ViewConsumable` will be created.\n\t * @param instance If provided, given `ViewConsumable` instance will be used\n\t * to add all consumables. It will be returned instead of a new instance.\n\t */\n\tpublic static createFrom( from: ViewNode | ViewDocumentFragment, instance?: ViewConsumable ): ViewConsumable {\n\t\tif ( !instance ) {\n\t\t\tinstance = new ViewConsumable();\n\t\t}\n\n\t\tif ( from.is( '$text' ) ) {\n\t\t\tinstance.add( from );\n\t\t} else {\n\t\t\t/* v8 ignore next -- @preserve */\n\t\t\tif ( from.is( 'element' ) || from.is( 'documentFragment' ) ) {\n\t\t\t\tinstance.add( from );\n\n\t\t\t\tfor ( const child of from.getChildren() ) {\n\t\t\t\t\tViewConsumable.createFrom( child, instance );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn instance;\n\t}\n}\n\n/**\n * Object describing all features of a view element that could be consumed and converted individually.\n * This is a non-normalized form of {@link module:engine/view/element~ViewNormalizedConsumables} generated from the view Element.\n *\n * Example element:\n *\n * ```html\n * <a class=\"foo bar\" style=\"color: red; margin: 5px\" href=\"https://ckeditor.com\" rel=\"nofollow noreferrer\" target=\"_blank\">\n * ```\n *\n * The `Consumables` would include:\n *\n * ```json\n * {\n * \tname: true,\n * \tclasses: [ \"foo\", \"bar\" ],\n * \tstyles: [ \"color\", \"margin\" ]\n * }\n * ```\n *\n * You could convert a `Consumable` into a {@link module:engine/view/element~ViewNormalizedConsumables}\n * using the {@link module:engine/conversion/viewconsumable~normalizeConsumables} helper.\n */\nexport interface Consumables {\n\n\t/**\n\t * If set to `true` element's name will be included in a consumable.\n\t * Depending on the usage context it would be added as consumable, tested for being available for consume or consumed.\n\t */\n\tname?: boolean;\n\n\t/**\n\t * Attribute name or array of attribute names.\n\t */\n\tattributes?: string | Array<string>;\n\n\t/**\n\t * Class name or array of class names.\n\t */\n\tclasses?: string | Array<string>;\n\n\t/**\n\t * Style name or array of style names.\n\t */\n\tstyles?: string | Array<string>;\n}\n\n/**\n * This is a private helper-class for {@link module:engine/conversion/viewconsumable~ViewConsumable}.\n * It represents and manipulates consumable parts of a single {@link module:engine/view/element~ViewElement}.\n *\n * @internal\n */\nexport class ViewElementConsumables {\n\tpublic readonly element: ViewElement;\n\n\t/**\n\t * Flag indicating if name of the element can be consumed.\n\t */\n\tprivate _canConsumeName: boolean | null = null;\n\n\t/**\n\t * A map of element's consumables.\n\t * * For plain attributes the value is a boolean indicating whether the attribute is available to consume.\n\t * * For token based attributes (like class list and style) the value is a map of tokens to booleans\n\t * indicating whether the token is available to consume on the given attribute.\n\t */\n\tprivate readonly _attributes = new Map<string, boolean | Map<string, boolean>>();\n\n\t/**\n\t * Creates ViewElementConsumables instance.\n\t *\n\t * @param from View element from which `ViewElementConsumables` is being created.\n\t */\n\tconstructor( from: ViewElement ) {\n\t\tthis.element = from;\n\t}\n\n\t/**\n\t * Adds consumable parts of the {@link module:engine/view/element~ViewElement view element}.\n\t * Element's name itself can be marked to be consumed (when element's name is consumed its attributes, classes and\n\t * styles still could be consumed):\n\t *\n\t * ```ts\n\t * consumables.add( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.add( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color'] ] } );\n\t * consumables.add( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t * ```\n\t *\n\t * Note: This method accepts only {@link module:engine/view/element~ViewNormalizedConsumables}.\n\t * You can use {@link module:engine/conversion/viewconsumable~normalizeConsumables} helper to convert from\n\t * {@link module:engine/conversion/viewconsumable~Consumables} to `ViewNormalizedConsumables`.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t * attribute is provided - it should be handled separately by providing `style` and `class` in consumables object.\n\t *\n\t * @param consumables Object describing which parts of the element can be consumed.\n\t */\n\tpublic add( consumables: ViewNormalizedConsumables ): void {\n\t\tif ( consumables.name ) {\n\t\t\tthis._canConsumeName = true;\n\t\t}\n\n\t\tfor ( const [ name, token ] of consumables.attributes ) {\n\t\t\tif ( token ) {\n\t\t\t\tlet attributeTokens = this._attributes.get( name );\n\n\t\t\t\tif ( !attributeTokens || typeof attributeTokens == 'boolean' ) {\n\t\t\t\t\tattributeTokens = new Map<string, boolean>();\n\t\t\t\t\tthis._attributes.set( name, attributeTokens );\n\t\t\t\t}\n\n\t\t\t\tattributeTokens.set( token, true );\n\t\t\t}\n\t\t\telse if ( name == 'style' || name == 'class' ) {\n\t\t\t\t/**\n\t\t\t\t * Class and style attributes should be handled separately in\n\t\t\t\t * {@link module:engine/conversion/viewconsumable~ViewConsumable#add `ViewConsumable#add()`}.\n\t\t\t\t *\n\t\t\t\t * What you have done is trying to use:\n\t\t\t\t *\n\t\t\t\t * ```ts\n\t\t\t\t * consumables.add( { attributes: [ 'class', 'style' ] } );\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * While each class and style should be registered separately:\n\t\t\t\t *\n\t\t\t\t * ```ts\n\t\t\t\t * consumables.add( { classes: 'some-class', styles: 'font-weight' } );\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * @error viewconsumable-invalid-attribute\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'viewconsumable-invalid-attribute', this );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._attributes.set( name, true );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Tests if parts of the {@link module:engine/view/element~ViewElement view element} can be consumed.\n\t *\n\t * Element's name can be tested:\n\t *\n\t * ```ts\n\t * consumables.test( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.test( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color' ] ] } );\n\t * consumables.test( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t * ```\n\t *\n\t * @param consumables Object describing which parts of the element should be tested.\n\t * @returns `true` when all tested items can be consumed, `null` when even one of the items\n\t * was never marked for consumption and `false` when even one of the items was already consumed.\n\t */\n\tpublic test( consumables: ViewNormalizedConsumables ): boolean | null {\n\t\t// Check if name can be consumed.\n\t\tif ( consumables.name && !this._canConsumeName ) {\n\t\t\treturn this._canConsumeName;\n\t\t}\n\n\t\tfor ( const [ name, token ] of consumables.attributes ) {\n\t\t\tconst value = this._attributes.get( name );\n\n\t\t\t// Return null if attribute is not found.\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Already consumed.\n\t\t\tif ( value === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Simple attribute is not consumed so continue to next attribute.\n\t\t\tif ( value === true ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !token ) {\n\t\t\t\t// Tokenized attribute but token is not specified so check if all tokens are not consumed.\n\t\t\t\tfor ( const tokenValue of value.values() ) {\n\t\t\t\t\t// Already consumed token.\n\t\t\t\t\tif ( !tokenValue ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst tokenValue = value.get( token );\n\n\t\t\t\t// Return null if token is not found.\n\t\t\t\tif ( tokenValue === undefined ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Already consumed.\n\t\t\t\tif ( !tokenValue ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return true only if all can be consumed.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Tests if parts of the {@link module:engine/view/element~ViewElement view element} can be consumed and consumes them if available.\n\t * It returns `true` when all items included in method's call can be consumed, otherwise returns `false`.\n\t *\n\t * Element's name can be consumed:\n\t *\n\t * ```ts\n\t * consumables.consume( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.consume( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color' ] ] } );\n\t * consumables.consume( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t * ```\n\t *\n\t * @param consumables Object describing which parts of the element should be consumed.\n\t * @returns `true` when all tested items can be consumed and `false` when even one of the items could not be consumed.\n\t */\n\tpublic consume( consumables: ViewNormalizedConsumables ): boolean {\n\t\tif ( !this.test( consumables ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( consumables.name ) {\n\t\t\tthis._canConsumeName = false;\n\t\t}\n\n\t\tfor ( const [ name, token ] of consumables.attributes ) {\n\t\t\t// `value` must be set, because `this.test()` returned `true`.\n\t\t\tconst value = this._attributes.get( name )!;\n\n\t\t\t// Plain (not tokenized) not-consumed attribute.\n\t\t\tif ( typeof value == 'boolean' ) {\n\t\t\t\t// Use Element API to collect related attributes.\n\t\t\t\tfor ( const [ toConsume ] of this.element._getConsumables( name, token ).attributes ) {\n\t\t\t\t\tthis._attributes.set( toConsume, false );\n\t\t\t\t}\n\t\t\t} else if ( !token ) {\n\t\t\t\t// Tokenized attribute but token is not specified so consume all tokens.\n\t\t\t\tfor ( const token of value.keys() ) {\n\t\t\t\t\tvalue.set( token, false );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Use Element API to collect related attribute tokens.\n\t\t\t\tfor ( const [ , toConsume ] of this.element._getConsumables( name, token ).attributes ) {\n\t\t\t\t\tvalue.set( toConsume!, false );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Revert already consumed parts of {@link module:engine/view/element~ViewElement view Element}, so they can be consumed once again.\n\t * Element's name can be reverted:\n\t *\n\t * ```ts\n\t * consumables.revert( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.revert( { attributes: [ [ 'title' ], [ 'class', 'foo' ], [ 'style', 'color' ] ] } );\n\t * consumables.revert( { attributes: [ [ 'title' ], [ 'name' ], [ 'class', 'foo' ], [ 'class', 'bar' ] ] } );\n\t * ```\n\t *\n\t * @param consumables Object describing which parts of the element should be reverted.\n\t */\n\tpublic revert( consumables: ViewNormalizedConsumables ): void {\n\t\tif ( consumables.name ) {\n\t\t\tthis._canConsumeName = true;\n\t\t}\n\n\t\tfor ( const [ name, token ] of consumables.attributes ) {\n\t\t\tconst value = this._attributes.get( name );\n\n\t\t\t// Plain consumed attribute.\n\t\t\tif ( value === false ) {\n\t\t\t\tthis._attributes.set( name, true );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Unknown attribute or not consumed.\n\t\t\tif ( value === undefined || value === true ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !token ) {\n\t\t\t\t// Tokenized attribute but token is not specified so revert all tokens.\n\t\t\t\tfor ( const token of value.keys() ) {\n\t\t\t\t\tvalue.set( token, true );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst tokenValue = value.get( token );\n\n\t\t\t\tif ( tokenValue === false ) {\n\t\t\t\t\tvalue.set( token, true );\n\t\t\t\t}\n\n\t\t\t\t// Note that revert of consumed related styles is not handled.\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Normalizes a {@link module:engine/conversion/viewconsumable~Consumables} or {@link module:engine/view/matcher~Match}\n * to a {@link module:engine/view/element~ViewNormalizedConsumables}.\n *\n * @internal\n */\nexport function normalizeConsumables( consumables: Consumables | Match ): ViewNormalizedConsumables {\n\tconst attributes: Array<[string, string?]> = [];\n\n\tif ( 'attributes' in consumables && consumables.attributes ) {\n\t\tnormalizeConsumablePart( attributes, consumables.attributes );\n\t}\n\n\tif ( 'classes' in consumables && consumables.classes ) {\n\t\tnormalizeConsumablePart( attributes, consumables.classes, 'class' );\n\t}\n\n\tif ( 'styles' in consumables && consumables.styles ) {\n\t\tnormalizeConsumablePart( attributes, consumables.styles, 'style' );\n\t}\n\n\treturn {\n\t\tname: consumables.name || false,\n\t\tattributes\n\t};\n}\n\n/**\n * Normalizes a list of consumable attributes to a common tuple format.\n */\nfunction normalizeConsumablePart(\n\tattributes: Array<[string, string?]>,\n\titems: string | Array<string> | Array<[string, string?]>,\n\tprefix?: string\n) {\n\tif ( typeof items == 'string' ) {\n\t\tattributes.push( prefix ? [ prefix, items ] : [ items ] );\n\n\t\treturn;\n\t}\n\n\tfor ( const item of items ) {\n\t\tif ( Array.isArray( item ) ) {\n\t\t\tattributes.push( item );\n\t\t} else {\n\t\t\tattributes.push( prefix ? [ prefix, item ] : [ item ] );\n\t\t}\n\t}\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/**\n * @module engine/view/matcher\n */\n\nimport { type ViewElement } from './element.js';\nimport { logWarning } from '@ckeditor/ckeditor5-utils';\nimport { normalizeConsumables, type Consumables } from '../conversion/viewconsumable.js';\n\n/**\n * View matcher class.\n * Instance of this class can be used to find {@link module:engine/view/element~ViewElement elements} that match given pattern.\n */\nexport class Matcher {\n\tprivate readonly _patterns: Array<MatcherFunctionPattern | MatcherObjectPattern> = [];\n\n\t/**\n\t * Creates new instance of Matcher.\n\t *\n\t * @param pattern Match patterns. See {@link module:engine/view/matcher~Matcher#add add method} for more information.\n\t */\n\tconstructor( ...pattern: Array<MatcherPattern> ) {\n\t\tthis.add( ...pattern );\n\t}\n\n\t/**\n\t * Adds pattern or patterns to matcher instance.\n\t *\n\t * ```ts\n\t * // String.\n\t * matcher.add( 'div' );\n\t *\n\t * // Regular expression.\n\t * matcher.add( /^\\w/ );\n\t *\n\t * // Single class.\n\t * matcher.add( {\n\t * \tclasses: 'foobar'\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/view/matcher~MatcherPattern} for more examples.\n\t *\n\t * Multiple patterns can be added in one call:\n\t *\n\t * ```ts\n\t * matcher.add( 'div', { classes: 'foobar' } );\n\t * ```\n\t *\n\t * @param pattern Object describing pattern details. If string or regular expression\n\t * is provided it will be used to match element's name. Pattern can be also provided in a form\n\t * of a function - then this function will be called with each {@link module:engine/view/element~ViewElement element} as a parameter.\n\t * Function's return value will be stored under `match` key of the object returned from\n\t * {@link module:engine/view/matcher~Matcher#match match} or {@link module:engine/view/matcher~Matcher#matchAll matchAll} methods.\n\t */\n\tpublic add( ...pattern: Array<MatcherPattern> ): void {\n\t\tfor ( let item of pattern ) {\n\t\t\t// String or RegExp pattern is used as element's name.\n\t\t\tif ( typeof item == 'string' || item instanceof RegExp ) {\n\t\t\t\titem = { name: item };\n\t\t\t}\n\n\t\t\tthis._patterns.push( item );\n\t\t}\n\t}\n\n\t/**\n\t * Matches elements for currently stored patterns. Returns match information about first found\n\t * {@link module:engine/view/element~ViewElement element}, otherwise returns `null`.\n\t *\n\t * Example of returned object:\n\t *\n\t * ```ts\n\t * {\n\t * \telement: <instance of found element>,\n\t * \tpattern: <pattern used to match found element>,\n\t * \tmatch: {\n\t * \t\tname: true,\n\t * \t\tattributes: [\n\t * \t\t\t[ 'title' ],\n\t * \t\t\t[ 'href' ],\n\t * \t\t\t[ 'class', 'foo' ],\n\t * \t\t\t[ 'style', 'color' ],\n\t * \t\t\t[ 'style', 'position' ]\n\t * \t\t]\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * You could use the `match` field from the above returned object as an input for the\n\t * {@link module:engine/conversion/viewconsumable~ViewConsumable#test `ViewConsumable#test()`} and\n\t * {@link module:engine/conversion/viewconsumable~ViewConsumable#consume `ViewConsumable#consume()`} methods.\n\t *\n\t * @see module:engine/view/matcher~Matcher#add\n\t * @see module:engine/view/matcher~Matcher#matchAll\n\t * @param element View element to match against stored patterns.\n\t * @returns The match information about found element or `null`.\n\t */\n\tpublic match( ...element: Array<ViewElement> ): MatchResult | null {\n\t\tfor ( const singleElement of element ) {\n\t\t\tfor ( const pattern of this._patterns ) {\n\t\t\t\tconst match = this._isElementMatching( singleElement, pattern );\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\telement: singleElement,\n\t\t\t\t\t\tpattern,\n\t\t\t\t\t\tmatch\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Matches elements for currently stored patterns. Returns array of match information with all found\n\t * {@link module:engine/view/element~ViewElement elements}. If no element is found - returns `null`.\n\t *\n\t * @see module:engine/view/matcher~Matcher#add\n\t * @see module:engine/view/matcher~Matcher#match\n\t * @param element View element to match against stored patterns.\n\t * @returns Array with match information about found elements or `null`. For more information\n\t * see {@link module:engine/view/matcher~Matcher#match match method} description.\n\t */\n\tpublic matchAll( ...element: Array<ViewElement> ): Array<MatchResult> | null {\n\t\tconst results: Array<MatchResult> = [];\n\n\t\tfor ( const singleElement of element ) {\n\t\t\tfor ( const pattern of this._patterns ) {\n\t\t\t\tconst match = this._isElementMatching( singleElement, pattern );\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\tresults.push( {\n\t\t\t\t\t\telement: singleElement,\n\t\t\t\t\t\tpattern,\n\t\t\t\t\t\tmatch\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn results.length > 0 ? results : null;\n\t}\n\n\t/**\n\t * Returns the name of the element to match if there is exactly one pattern added to the matcher instance\n\t * and it matches element name defined by `string` (not `RegExp`). Otherwise, returns `null`.\n\t *\n\t * @returns Element name trying to match.\n\t */\n\tpublic getElementName(): string | null {\n\t\tif ( this._patterns.length !== 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst pattern = this._patterns[ 0 ];\n\t\tconst name = pattern.name;\n\n\t\treturn ( typeof pattern != 'function' && name && !( name instanceof RegExp ) ) ? name : null;\n\t}\n\n\t/**\n\t * Returns match information if {@link module:engine/view/element~ViewElement element} is matching provided pattern.\n\t * If element cannot be matched to provided pattern - returns `null`.\n\t *\n\t * @returns Returns object with match information or null if element is not matching.\n\t */\n\tprivate _isElementMatching( element: ViewElement, pattern: MatcherFunctionPattern | MatcherObjectPattern ): Match | null {\n\t\t// If pattern is provided as function - return result of that function;\n\t\tif ( typeof pattern == 'function' ) {\n\t\t\tconst match = pattern( element );\n\n\t\t\t// In some places we use Matcher with callback pattern that returns boolean.\n\t\t\tif ( !match || typeof match != 'object' ) {\n\t\t\t\treturn match;\n\t\t\t}\n\n\t\t\treturn normalizeConsumables( match );\n\t\t}\n\n\t\tconst match: Match = {};\n\n\t\t// Check element's name.\n\t\tif ( pattern.name ) {\n\t\t\tmatch.name = matchName( pattern.name, element.name );\n\n\t\t\tif ( !match.name ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tconst attributesMatch: Array<[ string, string? ]> = [];\n\n\t\t// Check element's attributes.\n\t\tif ( pattern.attributes && !matchAttributes( pattern.attributes, element, attributesMatch ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Check element's classes.\n\t\tif ( pattern.classes && !matchClasses( pattern.classes, element, attributesMatch ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Check element's styles.\n\t\tif ( pattern.styles && !matchStyles( pattern.styles, element, attributesMatch ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Note the `attributesMatch` array is populated by the above calls.\n\t\tif ( attributesMatch.length ) {\n\t\t\tmatch.attributes = attributesMatch;\n\t\t}\n\n\t\treturn match;\n\t}\n}\n\n/**\n * Returns true if the given `item` matches the pattern.\n *\n * @internal\n * @param pattern A pattern representing a key/value we want to match.\n * @param item An actual item key/value (e.g. `'src'`, `'background-color'`, `'ck-widget'`) we're testing against pattern.\n */\nexport function isPatternMatched(\n\tpattern: true | string | RegExp,\n\titem: string\n): unknown {\n\treturn pattern === true ||\n\t\tpattern === item ||\n\t\tpattern instanceof RegExp && !!String( item ).match( pattern );\n}\n\n/**\n * Checks if name can be matched by provided pattern.\n *\n * @returns Returns `true` if name can be matched, `false` otherwise.\n */\nfunction matchName( pattern: string | RegExp, name: string ): boolean {\n\t// If pattern is provided as RegExp - test against this regexp.\n\tif ( pattern instanceof RegExp ) {\n\t\treturn !!name.match( pattern );\n\t}\n\n\treturn pattern === name;\n}\n\n/**\n * Bring all the possible pattern forms to an array of tuples where first item is a key, second is a value,\n * and third optional is a token value.\n *\n * Examples:\n *\n * Boolean pattern value:\n *\n * ```ts\n * true\n * ```\n *\n * to\n *\n * ```ts\n * [ [ true, true ] ]\n * ```\n *\n * Textual pattern value:\n *\n * ```ts\n * 'attribute-name-or-class-or-style'\n * ```\n *\n * to\n *\n * ```ts\n * [ [ 'attribute-name-or-class-or-style', true ] ]\n * ```\n *\n * Regular expression:\n *\n * ```ts\n * /^data-.*$/\n * ```\n *\n * to\n *\n * ```ts\n * [ [ /^data-.*$/, true ] ]\n * ```\n *\n * Objects (plain or with `key` and `value` specified explicitly):\n *\n * ```ts\n * {\n * \tsrc: /^https:.*$/\n * }\n * ```\n *\n * or\n *\n * ```ts\n * [ {\n * \tkey: 'src',\n * \tvalue: /^https:.*$/\n * } ]\n * ```\n *\n * to:\n *\n * ```ts\n * [ [ 'src', /^https:.*$/ ] ]\n * ```\n *\n * @returns Returns an array of objects or null if provided patterns were not in an expected form.\n */\nfunction normalizePatterns( patterns: MatchPropertyPatterns, prefix?: string ): Array<NormalizedPropertyPattern> {\n\tif ( Array.isArray( patterns ) ) {\n\t\treturn patterns.map( pattern => {\n\t\t\tif ( typeof pattern !== 'object' || pattern instanceof RegExp ) {\n\t\t\t\treturn prefix ?\n\t\t\t\t\t[ prefix, pattern, true ] :\n\t\t\t\t\t[ pattern, true ];\n\t\t\t}\n\n\t\t\tif ( pattern.key === undefined || pattern.value === undefined ) {\n\t\t\t\t// Documented at the end of matcher.js.\n\t\t\t\tlogWarning( 'matcher-pattern-missing-key-or-value', pattern );\n\t\t\t}\n\n\t\t\treturn prefix ?\n\t\t\t\t[ prefix, pattern.key, pattern.value ] :\n\t\t\t\t[ pattern.key, pattern.value ];\n\t\t} );\n\t}\n\n\tif ( typeof patterns !== 'object' || patterns instanceof RegExp ) {\n\t\treturn [\n\t\t\tprefix ?\n\t\t\t\t[ prefix, patterns, true ] :\n\t\t\t\t[ patterns, true ]\n\t\t];\n\t}\n\n\t// Below we do what Object.entries() does, but faster\n\tconst normalizedPatterns: Array<NormalizedPropertyPattern> = [];\n\n\tfor ( const key in patterns ) {\n\t\t// Replace with Object.hasOwn() when we upgrade to es2022.\n\t\tif ( Object.prototype.hasOwnProperty.call( patterns, key ) ) {\n\t\t\tnormalizedPatterns.push(\n\t\t\t\tprefix ?\n\t\t\t\t\t[ prefix, key, patterns[ key ] ] :\n\t\t\t\t\t[ key, patterns[ key ] ]\n\t\t\t);\n\t\t}\n\t}\n\n\treturn normalizedPatterns;\n}\n\n/**\n * Checks if attributes of provided element can be matched against provided patterns.\n *\n * @param patterns Object with information about attributes to match. Each key of the object will be\n * used as attribute name. Value of each key can be a string or regular expression to match against attribute value.\n * @param  element Element which attributes will be tested.\n * @param match An array to populate with matching tuples.\n * @returns Returns array with matched attribute names or `null` if no attributes were matched.\n */\nfunction matchAttributes(\n\tpatterns: MatchAttributePatterns,\n\telement: ViewElement,\n\tmatch: Array<[ string, string? ]>\n): boolean {\n\tlet excludeAttributes;\n\n\t// `style` and `class` attribute keys are deprecated. Only allow them in object pattern\n\t// for backward compatibility.\n\tif ( typeof patterns === 'object' && !( patterns instanceof RegExp ) && !Array.isArray( patterns ) ) {\n\t\tif ( patterns.style !== undefined ) {\n\t\t\t// Documented at the end of matcher.js.\n\t\t\tlogWarning( 'matcher-pattern-deprecated-attributes-style-key', patterns );\n\t\t}\n\t\tif ( patterns.class !== undefined ) {\n\t\t\t// Documented at the end of matcher.js.\n\t\t\tlogWarning( 'matcher-pattern-deprecated-attributes-class-key', patterns );\n\t\t}\n\t} else {\n\t\texcludeAttributes = [ 'class', 'style' ];\n\t}\n\n\treturn element._collectAttributesMatch( normalizePatterns( patterns ), match, excludeAttributes );\n}\n\n/**\n * Checks if classes of provided element can be matched against provided patterns.\n *\n * @param patterns Array of strings or regular expressions to match against element's classes.\n * @param element Element which classes will be tested.\n * @param match An array to populate with matching tuples.\n * @returns Returns array with matched class names or `null` if no classes were matched.\n */\nfunction matchClasses(\n\tpatterns: MatchClassPatterns,\n\telement: ViewElement,\n\tmatch: Array<[ string, string? ]>\n): boolean {\n\treturn element._collectAttributesMatch( normalizePatterns( patterns, 'class' ), match );\n}\n\n/**\n * Checks if styles of provided element can be matched against provided patterns.\n *\n * @param patterns Object with information about styles to match. Each key of the object will be\n * used as style name. Value of each key can be a string or regular expression to match against style value.\n * @param element Element which styles will be tested.\n * @param match An array to populate with matching tuples.\n * @returns Returns array with matched style names or `null` if no styles were matched.\n */\nfunction matchStyles(\n\tpatterns: MatchStylePatterns,\n\telement: ViewElement,\n\tmatch: Array<[ string, string? ]>\n): boolean {\n\treturn element._collectAttributesMatch( normalizePatterns( patterns, 'style' ), match );\n}\n\n/**\n * An entity that is a valid pattern recognized by a matcher. `MatcherPattern` is used by {@link ~Matcher} to recognize\n * if a view element fits in a group of view elements described by the pattern.\n *\n * `MatcherPattern` can be given as a `String`, a `RegExp`, an `Object` or a `Function`.\n *\n * If `MatcherPattern` is given as a `String` or `RegExp`, it will match any view element that has a matching name:\n *\n * ```ts\n * // Match any element with name equal to 'div'.\n * const pattern = 'div';\n *\n * // Match any element which name starts on 'p'.\n * const pattern = /^p/;\n * ```\n *\n * If `MatcherPattern` is given as an `Object`, all the object's properties will be matched with view element properties.\n * If the view element does not meet all of the object's pattern properties, the match will not happen.\n * Available `Object` matching properties:\n *\n * Matching view element:\n *\n * ```ts\n * // Match view element's name using String:\n * const pattern = { name: 'p' };\n *\n * // or by providing RegExp:\n * const pattern = { name: /^(ul|ol)$/ };\n *\n * // The name can also be skipped to match any view element with matching attributes:\n * const pattern = {\n * \tattributes: {\n * \t\t'title': true\n * \t}\n * };\n * ```\n *\n * Matching view element attributes:\n *\n * ```ts\n * // Match view element with any attribute value.\n * const pattern = {\n * \tname: 'p',\n * \tattributes: true\n * };\n *\n * // Match view element which has matching attributes (String).\n * const pattern = {\n * \tname: 'figure',\n * \tattributes: 'title' // Match title attribute (can be empty).\n * };\n *\n * // Match view element which has matching attributes (RegExp).\n * const pattern = {\n * \tname: 'figure',\n * \tattributes: /^data-.*$/ // Match attributes starting with `data-` e.g. `data-foo` with any value (can be empty).\n * };\n *\n * // Match view element which has matching attributes (Object).\n * const pattern = {\n * \tname: 'figure',\n * \tattributes: {\n * \t\ttitle: 'foobar',           // Match `title` attribute with 'foobar' value.\n * \t\talt: true,                 // Match `alt` attribute with any value (can be empty).\n * \t\t'data-type': /^(jpg|png)$/ // Match `data-type` attribute with `jpg` or `png` value.\n * \t}\n * };\n *\n * // Match view element which has matching attributes (Array).\n * const pattern = {\n * \tname: 'figure',\n * \tattributes: [\n * \t\t'title',    // Match `title` attribute (can be empty).\n * \t\t/^data-*$/ // Match attributes starting with `data-` e.g. `data-foo` with any value (can be empty).\n * \t]\n * };\n *\n * // Match view element which has matching attributes (key-value pairs).\n * const pattern = {\n * \tname: 'input',\n * \tattributes: [\n * \t\t{\n * \t\t\tkey: 'type',                     // Match `type` as an attribute key.\n * \t\t\tvalue: /^(text|number|date)$/\t // Match `text`, `number` or `date` values.\n * \t\t},\n * \t\t{\n * \t\t\tkey: /^data-.*$/,                // Match attributes starting with `data-` e.g. `data-foo`.\n * \t\t\tvalue: true                      // Match any value (can be empty).\n * \t\t}\n * \t]\n * };\n * ```\n *\n * Matching view element styles:\n *\n * ```ts\n * // Match view element with any style.\n * const pattern = {\n * \tname: 'p',\n * \tstyles: true\n * };\n *\n * // Match view element which has matching styles (String).\n * const pattern = {\n * \tname: 'p',\n * \tstyles: 'color' // Match attributes with `color` style.\n * };\n *\n * // Match view element which has matching styles (RegExp).\n * const pattern = {\n * \tname: 'p',\n * \tstyles: /^border.*$/ // Match view element with any border style.\n * };\n *\n * // Match view element which has matching styles (Object).\n * const pattern = {\n * \tname: 'p',\n * \tstyles: {\n * \t\tcolor: /rgb\\((\\d{1,3}), (\\d{1,3}), (\\d{1,3})\\)/, // Match `color` in RGB format only.\n * \t\t'font-weight': 600,                              // Match `font-weight` only if it's `600`.\n * \t\t'text-decoration': true                          // Match any text decoration.\n * \t}\n * };\n *\n * // Match view element which has matching styles (Array).\n * const pattern = {\n * \tname: 'p',\n * \tstyles: [\n * \t\t'color',      // Match `color` with any value.\n * \t\t/^border.*$/ // Match all border properties.\n * \t]\n * };\n *\n * // Match view element which has matching styles (key-value pairs).\n * const pattern = {\n * \tname: 'p',\n * \tstyles: [\n * \t\t{\n * \t\t\tkey: 'color',                                  \t\t// Match `color` as an property key.\n * \t\t\tvalue: /rgb\\((\\d{1,3}), (\\d{1,3}), (\\d{1,3})\\)/\t\t// Match RGB format only.\n * \t\t},\n * \t\t{\n * \t\t\tkey: /^border.*$/, // Match any border style.\n * \t\t\tvalue: true        // Match any value.\n * \t\t}\n * \t]\n * };\n * ```\n *\n * Matching view element classes:\n *\n * ```ts\n * // Match view element with any class.\n * const pattern = {\n * \tname: 'p',\n * \tclasses: true\n * };\n *\n * // Match view element which has matching class (String).\n * const pattern = {\n * \tname: 'p',\n * \tclasses: 'highlighted' // Match `highlighted` class.\n * };\n *\n * // Match view element which has matching classes (RegExp).\n * const pattern = {\n * \tname: 'figure',\n * \tclasses: /^image-side-(left|right)$/ // Match `image-side-left` or `image-side-right` class.\n * };\n *\n * // Match view element which has matching classes (Object).\n * const pattern = {\n * \tname: 'p',\n * \tclasses: {\n * \t\thighlighted: true, // Match `highlighted` class.\n * \t\tmarker: true       // Match `marker` class.\n * \t}\n * };\n *\n * // Match view element which has matching classes (Array).\n * const pattern = {\n * \tname: 'figure',\n * \tclasses: [\n * \t\t'image',                    // Match `image` class.\n * \t\t/^image-side-(left|right)$/ // Match `image-side-left` or `image-side-right` class.\n * \t]\n * };\n *\n * // Match view element which has matching classes (key-value pairs).\n * const pattern = {\n * \tname: 'figure',\n * \tclasses: [\n * \t\t{\n * \t\t\tkey: 'image', // Match `image` class.\n * \t\t\tvalue: true\n * \t\t},\n * \t\t{\n * \t\t\tkey: /^image-side-(left|right)$/, // Match `image-side-left` or `image-side-right` class.\n * \t\t\tvalue: true\n * \t\t}\n * \t]\n * };\n * ```\n *\n * Pattern can combine multiple properties allowing for more complex view element matching:\n *\n * ```ts\n * const pattern = {\n * \tname: 'span',\n * \tattributes: [ 'title' ],\n * \tstyles: {\n * \t\t'font-weight': 'bold'\n * \t},\n * \tclasses: 'highlighted'\n * };\n * ```\n *\n * If `MatcherPattern` is given as a `Function`, the function takes a view element as a first and only parameter and\n * the function should decide whether that element matches. If so, it should return what part of the view element has been matched.\n * Otherwise, the function should return `null`. The returned result will be included in `match` property of the object\n * returned by {@link ~Matcher#match} call.\n *\n * ```ts\n * // Match an empty <div> element.\n * const pattern = element => {\n * \tif ( element.name == 'div' && element.childCount > 0 ) {\n * \t\t// Return which part of the element was matched.\n * \t\treturn { name: true };\n * \t}\n *\n * \treturn null;\n * };\n *\n * // Match a <p> element with big font (\"heading-like\" element).\n * const pattern = element => {\n * \tif ( element.name == 'p' ) {\n * \t\tconst fontSize = element.getStyle( 'font-size' );\n * \t\tconst size = fontSize.match( /(\\d+)/px );\n *\n * \t\tif ( size && Number( size[ 1 ] ) > 26 ) {\n * \t\t\treturn { name: true, styles: [ 'font-size' ] };\n * \t\t}\n * \t}\n *\n * \treturn null;\n * };\n * ```\n *\n * `MatcherPattern` is defined in a way that it is a superset of {@link module:engine/view/elementdefinition~ViewElementDefinition},\n * that is, every `ElementDefinition` also can be used as a `MatcherPattern`.\n */\nexport type MatcherPattern = string | RegExp | MatcherFunctionPattern | MatcherObjectPattern;\n\n/**\n * A function describing `MatcherPattern`. See {@link ~MatcherPattern} for examples and other options.\n */\nexport type MatcherFunctionPattern = ( element: ViewElement ) => Match | Consumables | null;\n\n/**\n * An object describing `MatcherPattern`. See {@link ~MatcherPattern} for examples and other options.\n */\nexport interface MatcherObjectPattern {\n\n\t/**\n\t * View element name to match.\n\t */\n\tname?: string | RegExp;\n\n\t/**\n\t * View element's classes to match.\n\t */\n\tclasses?: MatchClassPatterns;\n\n\t/**\n\t * View element's styles to match.\n\t */\n\tstyles?: MatchStylePatterns;\n\n\t/**\n\t * View element's attributes to match.\n\t */\n\tattributes?: MatchAttributePatterns;\n}\n\n/**\n * An object representing matched element parts.\n */\nexport interface Match {\n\n\t/**\n\t * True if name of the element was matched.\n\t */\n\tname?: boolean;\n\n\t/**\n\t * Array of matching tuples: attribute name, and optional token for tokenized attributes.\n\t * Note that there could be multiple entries for the same attribute with different tokens (class names or style properties).\n\t */\n\tattributes?: Array<[string, string?]>;\n}\n\n/**\n * The result of {@link ~Matcher#match}.\n */\nexport interface MatchResult {\n\n\t/**\n\t * Matched view element.\n\t */\n\telement: ViewElement;\n\n\t/**\n\t * Pattern that was used to find matched element.\n\t */\n\tpattern: MatcherFunctionPattern | MatcherObjectPattern;\n\n\t/**\n\t * An object representing matched element parts.\n\t */\n\tmatch: Match;\n}\n\nexport type MatchPropertyPatterns<ValuePattern = string | RegExp> =\n\ttrue |\n\tstring |\n\tRegExp |\n\tRecord<string, true | ValuePattern> |\n\tArray<string | RegExp | { key: string | RegExp; value: true | ValuePattern }>;\n\nexport type MatchAttributePatterns = MatchPropertyPatterns;\nexport type MatchStylePatterns = MatchPropertyPatterns;\nexport type MatchClassPatterns = MatchPropertyPatterns<never>;\n\n/**\n * @internal\n */\nexport type NormalizedPropertyPattern = [\n\ttrue | string | RegExp,\n\ttrue | string | RegExp,\n\t( true | string | RegExp )?\n];\n\n/**\n * The key-value matcher pattern is missing key or value. Both must be present.\n * Refer the documentation: {@link module:engine/view/matcher~MatcherPattern}.\n *\n * @param pattern Pattern with missing properties.\n * @error matcher-pattern-missing-key-or-value\n */\n\n/**\n * The key-value matcher pattern for `attributes` option is using deprecated `style` key.\n *\n * Use `styles` matcher pattern option instead:\n *\n * ```ts\n * // Instead of:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2',\n * \t\tstyle: /^border.*$/\n * \t}\n * }\n *\n * // Use:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2'\n * \t},\n * \tstyles: /^border.*$/\n * }\n * ```\n *\n * Refer to the `#update-to-ckeditor-5-v2910` section in the `Update to v29.x` section in the\n * {@glink updating/guides/updating-from-older-versions updating from older versions} guide\n * and {@link module:engine/view/matcher~MatcherPattern} documentation.\n *\n * @param pattern Pattern with missing properties.\n * @error matcher-pattern-deprecated-attributes-style-key\n */\n\n/**\n * The key-value matcher pattern for `attributes` option is using deprecated `class` key.\n *\n * Use `classes` matcher pattern option instead:\n *\n * ```ts\n * // Instead of:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2',\n * \t\tclass: 'foobar'\n * \t}\n * }\n *\n * // Use:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2'\n * \t},\n * \tclasses: 'foobar'\n * }\n * ```\n *\n * Refer to the `#update-to-ckeditor-5-v2910` paragraph in the Update to v29.x guide in the\n * {@glink updating/guides/updating-from-older-versions updating from older versions} guide\n * and the {@link module:engine/view/matcher~MatcherPattern} documentation.\n *\n * @param pattern Pattern with missing properties.\n * @error matcher-pattern-deprecated-attributes-class-key\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/**\n * @module engine/view/stylesmap\n */\n\nimport { get, isObject, merge, set } from 'es-toolkit/compat';\nimport type { ViewElementAttributeValue } from './element.js';\nimport { type ArrayOrItem, toArray } from '@ckeditor/ckeditor5-utils';\nimport { isPatternMatched } from './matcher.js';\n\n/**\n * Styles map. Allows handling (adding, removing, retrieving) a set of style rules (usually, of an element).\n */\nexport class StylesMap implements ViewElementAttributeValue {\n\t/**\n\t * Keeps an internal representation of styles map. Normalized styles are kept as object tree to allow unified modification and\n\t * value access model using lodash's get, set, unset, etc methods.\n\t *\n\t * When no style processor rules are defined it acts as simple key-value storage.\n\t */\n\tprivate _styles: Styles;\n\n\t/**\n\t * Cached list of style names for faster access.\n\t */\n\tprivate _cachedStyleNames: Array<string> | null = null;\n\n\t/**\n\t * Cached list of expanded style names for faster access.\n\t */\n\tprivate _cachedExpandedStyleNames: Array<string> | null = null;\n\n\t/**\n\t * An instance of the {@link module:engine/view/stylesmap~StylesProcessor}.\n\t */\n\tprivate readonly _styleProcessor: StylesProcessor;\n\n\t/**\n\t * Creates Styles instance.\n\t */\n\tconstructor( styleProcessor: StylesProcessor ) {\n\t\tthis._styles = {};\n\t\tthis._styleProcessor = styleProcessor;\n\t}\n\n\t/**\n\t * Returns true if style map has no styles set.\n\t */\n\tpublic get isEmpty(): boolean {\n\t\tconst entries = Object.entries( this._styles );\n\n\t\treturn !entries.length;\n\t}\n\n\t/**\n\t * Number of styles defined.\n\t */\n\tpublic get size(): number {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn this.getStyleNames().length;\n\t}\n\n\t/**\n\t * Set styles map to a new value.\n\t *\n\t * ```ts\n\t * styles.setTo( 'border:1px solid blue;margin-top:1px;' );\n\t * ```\n\t */\n\tpublic setTo( inlineStyle: string ): this {\n\t\tthis.clear();\n\n\t\tconst parsedStyles = parseInlineStyles( inlineStyle );\n\n\t\tfor ( const [ key, value ] of parsedStyles ) {\n\t\t\tthis._styleProcessor.toNormalizedForm( key, value, this._styles );\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Checks if a given style is set.\n\t *\n\t * ```ts\n\t * styles.setTo( 'margin-left:1px;' );\n\t *\n\t * styles.has( 'margin-left' );    // -> true\n\t * styles.has( 'padding' );        // -> false\n\t * ```\n\t *\n\t * **Note**: This check supports normalized style names.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t *\n\t * styles.setTo( 'margin:2px;' );\n\t *\n\t * styles.has( 'margin' );         // -> true\n\t * styles.has( 'margin-top' );     // -> true\n\t * styles.has( 'margin-left' );    // -> true\n\t *\n\t * styles.remove( 'margin-top' );\n\t *\n\t * styles.has( 'margin' );         // -> false\n\t * styles.has( 'margin-top' );     // -> false\n\t * styles.has( 'margin-left' );    // -> true\n\t * ```\n\t *\n\t * @param name Style name.\n\t */\n\tpublic has( name: string ): boolean {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst styles = this._styleProcessor.getReducedForm( name, this._styles );\n\n\t\tconst propertyDescriptor = styles.find( ( [ property ] ) => property === name );\n\n\t\t// Only return a value if it is set;\n\t\treturn Array.isArray( propertyDescriptor );\n\t}\n\n\t/**\n\t * Sets a given style.\n\t *\n\t * Can insert one by one:\n\t *\n\t * ```ts\n\t * styles.set( 'color', 'blue' );\n\t * styles.set( 'margin-right', '1em' );\n\t * ```\n\t *\n\t * ***Note**:* This method uses {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules\n\t * enabled style processor rules} to normalize passed values.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t *\n\t * styles.set( 'margin', '2px' );\n\t * ```\n\t *\n\t * The above code will set margin to:\n\t *\n\t * ```ts\n\t * styles.getNormalized( 'margin' );\n\t * // -> { top: '2px', right: '2px', bottom: '2px', left: '2px' }\n\t * ```\n\t *\n\t * Which makes it possible to retrieve a \"sub-value\":\n\t *\n\t * ```ts\n\t * styles.get( 'margin-left' );       // -> '2px'\n\t * ```\n\t *\n\t * Or modify it:\n\t *\n\t * ```ts\n\t * styles.remove( 'margin-left' );\n\t *\n\t * styles.getNormalized( 'margin' );  // -> { top: '1px', bottom: '1px', right: '1px' }\n\t * styles.toString();                 // -> 'margin-bottom:1px;margin-right:1px;margin-top:1px;'\n\t * ```\n\t *\n\t * This method also allows to set normalized values directly (if a particular styles processor rule was enabled):\n\t *\n\t * ```ts\n\t * styles.set( 'border-color', { top: 'blue' } );\n\t * styles.set( 'margin', { right: '2em' } );\n\t *\n\t * styles.toString();                 // -> 'border-color-top:blue;margin-right:2em;'\n\t * ```\n\t *\n\t * @label KEY_VALUE\n\t * @param name Style property name.\n\t * @param value Value to set.\n\t */\n\tpublic set( name: string, value: StyleValue ): void;\n\n\t/**\n\t * Sets many styles at once:\n\t *\n\t * ```ts\n\t * styles.set( {\n\t * \tcolor: 'blue',\n\t * \t'margin-right': '1em'\n\t * } );\n\t * ```\n\t *\n\t * It is equivalent to:\n\t *\n\t * ```ts\n\t * styles.set( 'color', 'blue' );\n\t * styles.set( 'margin-right', '1em' );\n\t * ```\n\t *\n\t * See {@link #set:KEY_VALUE}\n\t *\n\t * @label CONFIG_OBJECT\n\t */\n\tpublic set( styles: Styles ): void;\n\n\tpublic set( nameOrObject: string | Styles, valueOrObject?: StyleValue ): void {\n\t\tthis._cachedStyleNames = null;\n\t\tthis._cachedExpandedStyleNames = null;\n\n\t\tif ( isObject( nameOrObject ) ) {\n\t\t\tfor ( const [ key, value ] of Object.entries( nameOrObject ) ) {\n\t\t\t\tthis._styleProcessor.toNormalizedForm( key, value, this._styles );\n\t\t\t}\n\t\t} else {\n\t\t\tthis._styleProcessor.toNormalizedForm( nameOrObject, valueOrObject!, this._styles );\n\t\t}\n\t}\n\n\t/**\n\t * Removes given style.\n\t *\n\t * ```ts\n\t * styles.setTo( 'background:#f00;margin-right:2px;' );\n\t *\n\t * styles.remove( 'background' );\n\t *\n\t * styles.toString();   // -> 'margin-right:2px;'\n\t * ```\n\t *\n\t * ***Note**:* This method uses {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules\n\t * enabled style processor rules} to normalize passed values.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t *\n\t * styles.setTo( 'margin:1px' );\n\t *\n\t * styles.remove( 'margin-top' );\n\t * styles.remove( 'margin-right' );\n\t *\n\t * styles.toString(); // -> 'margin-bottom:1px;margin-left:1px;'\n\t * ```\n\t *\n\t * @param names Style name or an array of names.\n\t */\n\tpublic remove( names: ArrayOrItem<string> ): void {\n\t\tconst normalizedStylesToRemove = {};\n\n\t\tfor ( const name of toArray( names ) ) {\n\t\t\t// First, try the easy path, when the path reflects normalized styles structure.\n\t\t\tconst path = toPath( name );\n\t\t\tconst pathValue = get( this._styles, path );\n\n\t\t\tif ( pathValue ) {\n\t\t\t\tappendStyleValue( normalizedStylesToRemove, path, pathValue );\n\t\t\t} else {\n\t\t\t\t// Easy path did not work, so try to get the value from the styles map.\n\t\t\t\tconst value = this.getAsString( name );\n\n\t\t\t\tif ( value !== undefined ) {\n\t\t\t\t\tthis._styleProcessor.toNormalizedForm( name, value, normalizedStylesToRemove );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( Object.keys( normalizedStylesToRemove ).length ) {\n\t\t\tremoveStyles( this._styles, normalizedStylesToRemove );\n\n\t\t\tthis._cachedStyleNames = null;\n\t\t\tthis._cachedExpandedStyleNames = null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns a normalized style object or a single value.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t *\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px 2px 3em;' );\n\t *\n\t * styles.getNormalized( 'margin' );\n\t * // will log:\n\t * // {\n\t * //     top: '1px',\n\t * //     right: '2px',\n\t * //     bottom: '3em',\n\t * //     left: '2px'     // normalized value from margin shorthand\n\t * // }\n\t *\n\t * styles.getNormalized( 'margin-left' ); // -> '2px'\n\t * ```\n\t *\n\t * **Note**: This method will only return normalized styles if a style processor was defined.\n\t *\n\t * @param name Style name.\n\t */\n\tpublic getNormalized( name?: string ): StyleValue | undefined {\n\t\treturn this._styleProcessor.getNormalized( name, this._styles );\n\t}\n\n\t/**\n\t * Returns a normalized style string. Styles are sorted by name.\n\t *\n\t * ```ts\n\t * styles.set( 'margin' , '1px' );\n\t * styles.set( 'background', '#f00' );\n\t *\n\t * styles.toString(); // -> 'background:#f00;margin:1px;'\n\t * ```\n\t *\n\t * **Note**: This method supports normalized styles if defined.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t *\n\t * styles.set( 'margin' , '1px' );\n\t * styles.set( 'background', '#f00' );\n\t * styles.remove( 'margin-top' );\n\t * styles.remove( 'margin-right' );\n\t *\n\t * styles.toString(); // -> 'background:#f00;margin-bottom:1px;margin-left:1px;'\n\t * ```\n\t */\n\tpublic toString(): string {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn this.getStylesEntries()\n\t\t\t.map( arr => arr.join( ':' ) )\n\t\t\t.sort()\n\t\t\t.join( ';' ) + ';';\n\t}\n\n\t/**\n\t * Returns property as a value string or undefined if property is not set.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t *\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t * styles.set( 'margin-bottom', '3em' );\n\t *\n\t * styles.getAsString( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t * ```\n\t *\n\t * Note, however, that all sub-values must be set for the longhand property name to return a value:\n\t *\n\t * ```ts\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t * styles.remove( 'margin-bottom' );\n\t *\n\t * styles.getAsString( 'margin' ); // -> undefined\n\t * ```\n\t *\n\t * In the above scenario, it is not possible to return a `margin` value, so `undefined` is returned.\n\t * Instead, you should use:\n\t *\n\t * ```ts\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t * styles.remove( 'margin-bottom' );\n\t *\n\t * for ( const styleName of styles.getStyleNames() ) {\n\t * \tconsole.log( styleName, styles.getAsString( styleName ) );\n\t * }\n\t * // 'margin-top', '1px'\n\t * // 'margin-right', '1px'\n\t * // 'margin-left', '1px'\n\t * ```\n\t *\n\t * In general, it is recommend to iterate over style names like in the example above. This way, you will always get all\n\t * the currently set style values. So, if all the 4 margin values would be set\n\t * the for-of loop above would yield only `'margin'`, `'1px'`:\n\t *\n\t * ```ts\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t *\n\t * for ( const styleName of styles.getStyleNames() ) {\n\t * \tconsole.log( styleName, styles.getAsString( styleName ) );\n\t * }\n\t * // 'margin', '1px'\n\t * ```\n\t *\n\t * **Note**: To get a normalized version of a longhand property use the {@link #getNormalized `#getNormalized()`} method.\n\t */\n\tpublic getAsString( propertyName: string ): string | undefined {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._styles[ propertyName ] && !isObject( this._styles[ propertyName ] ) ) {\n\t\t\t// Try return styles set directly - values that are not parsed.\n\t\t\treturn this._styles[ propertyName ] as string;\n\t\t}\n\n\t\tconst styles = this._styleProcessor.getReducedForm( propertyName, this._styles );\n\n\t\tconst propertyDescriptor = styles.find( ( [ property ] ) => property === propertyName );\n\n\t\t// Only return a value if it is set;\n\t\tif ( Array.isArray( propertyDescriptor ) ) {\n\t\t\treturn propertyDescriptor[ 1 ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns all style properties names as they would appear when using {@link #toString `#toString()`}.\n\t *\n\t * When `expand` is set to true and there's a shorthand style property set, it will also return all equivalent styles:\n\t *\n\t * ```ts\n\t * stylesMap.setTo( 'margin: 1em' )\n\t * ```\n\t *\n\t * will be expanded to:\n\t *\n\t * ```ts\n\t * [ 'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ]\n\t * ```\n\t *\n\t * @param expand Expand shorthand style properties and all return equivalent style representations.\n\t */\n\tpublic getStyleNames( expand = false ): Array<string> {\n\t\tif ( this.isEmpty ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( expand ) {\n\t\t\tthis._cachedExpandedStyleNames ||= this._styleProcessor.getStyleNames( this._styles );\n\n\t\t\treturn this._cachedExpandedStyleNames;\n\t\t}\n\n\t\tthis._cachedStyleNames ||= this.getStylesEntries().map( ( [ key ] ) => key );\n\n\t\treturn this._cachedStyleNames;\n\t}\n\n\t/**\n\t * Alias for {@link #getStyleNames}.\n\t */\n\tpublic keys(): Array<string> {\n\t\treturn this.getStyleNames();\n\t}\n\n\t/**\n\t * Removes all styles.\n\t */\n\tpublic clear(): void {\n\t\tthis._styles = {};\n\t\tthis._cachedStyleNames = null;\n\t\tthis._cachedExpandedStyleNames = null;\n\t}\n\n\t/**\n\t * Returns `true` if both attributes have the same styles.\n\t */\n\tpublic isSimilar( other: StylesMap ): boolean {\n\t\tif ( this.size !== other.size ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const property of this.getStyleNames() ) {\n\t\t\tif ( !other.has( property ) || other.getAsString( property ) !== this.getAsString( property ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns normalized styles entries for further processing.\n\t */\n\tpublic getStylesEntries(): Array<StylePropertyDescriptor> {\n\t\tconst parsed: Array<StylePropertyDescriptor> = [];\n\n\t\tconst keys = Object.keys( this._styles );\n\n\t\tfor ( const key of keys ) {\n\t\t\tparsed.push( ...this._styleProcessor.getReducedForm( key, this._styles ) );\n\t\t}\n\n\t\treturn parsed;\n\t}\n\n\t/**\n\t * Clones the attribute value.\n\t *\n\t * @internal\n\t */\n\tpublic _clone(): this {\n\t\tconst clone = new ( this.constructor as any )( this._styleProcessor );\n\n\t\tclone.set( this.getNormalized() );\n\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Used by the {@link module:engine/view/matcher~Matcher Matcher} to collect matching styles.\n\t *\n\t * @internal\n\t * @param tokenPattern The matched style name pattern.\n\t * @param valuePattern The matched style value pattern.\n\t * @returns An array of matching tokens (style names).\n\t */\n\tpublic _getTokensMatch(\n\t\ttokenPattern: true | string | RegExp,\n\t\tvaluePattern: true | string | RegExp\n\t): Array<string> | undefined {\n\t\tconst match: Array<string> = [];\n\n\t\tfor ( const styleName of this.getStyleNames( true ) ) {\n\t\t\tif ( isPatternMatched( tokenPattern, styleName ) ) {\n\t\t\t\tif ( valuePattern === true ) {\n\t\t\t\t\tmatch.push( styleName );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// For now, the reducers are not returning the full tree of properties.\n\t\t\t\t// Casting to string preserves the old behavior until the root cause is fixed.\n\t\t\t\t// More can be found in https://github.com/ckeditor/ckeditor5/issues/10399.\n\t\t\t\tconst value = this.getAsString( styleName );\n\n\t\t\t\tif ( isPatternMatched( valuePattern, value! ) ) {\n\t\t\t\t\tmatch.push( styleName );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn match.length ? match : undefined;\n\t}\n\n\t/**\n\t * Returns a list of consumables for the attribute. This includes related styles.\n\t *\n\t * Could be filtered by the given style name.\n\t *\n\t * @internal\n\t */\n\tpublic _getConsumables( name?: string ): Array<string> {\n\t\tconst result = [];\n\n\t\tif ( name ) {\n\t\t\tresult.push( name );\n\n\t\t\tfor ( const relatedName of this._styleProcessor.getRelatedStyles( name ) ) {\n\t\t\t\tresult.push( relatedName );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor ( const name of this.getStyleNames() ) {\n\t\t\t\tfor ( const relatedName of this._styleProcessor.getRelatedStyles( name ) ) {\n\t\t\t\t\tresult.push( relatedName );\n\t\t\t\t}\n\n\t\t\t\tresult.push( name );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_canMergeAttributesFrom} to verify if the given attribute can be merged without\n\t * conflicts into the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t *\n\t * @internal\n\t */\n\tpublic _canMergeFrom( other: StylesMap ): boolean {\n\t\tfor ( const key of other.getStyleNames() ) {\n\t\t\tif ( this.has( key ) && this.getAsString( key ) !== other.getAsString( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_mergeAttributesFrom} to merge a given attribute into the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t *\n\t * @internal\n\t */\n\tpublic _mergeFrom( other: StylesMap ): void {\n\t\tfor ( const prop of other.getStyleNames() ) {\n\t\t\tif ( !this.has( prop ) ) {\n\t\t\t\tthis.set( prop, other.getAsString( prop )! );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_canSubtractAttributesOf} to verify if the given attribute can be fully\n\t * subtracted from the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t *\n\t * @internal\n\t */\n\tpublic _isMatching( other: StylesMap ): boolean {\n\t\tfor ( const key of other.getStyleNames() ) {\n\t\t\tif ( !this.has( key ) || this.getAsString( key ) !== other.getAsString( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}\n\n/**\n * Style processor is responsible for writing and reading a normalized styles object.\n */\nexport class StylesProcessor {\n\tprivate readonly _normalizers: Map<string, StylesNormalizer>;\n\tprivate readonly _extractors: Map<string, StylesExtractor>;\n\tprivate readonly _reducers: Map<string, StylesReducer>;\n\tprivate readonly _consumables: Map<string, Array<string>>;\n\n\t/**\n\t * Creates StylesProcessor instance.\n\t *\n\t * @internal\n\t */\n\tconstructor() {\n\t\tthis._normalizers = new Map();\n\t\tthis._extractors = new Map();\n\t\tthis._reducers = new Map();\n\t\tthis._consumables = new Map();\n\t}\n\n\t/**\n\t * Parse style string value to a normalized object and appends it to styles object.\n\t *\n\t * ```ts\n\t * const styles = {};\n\t *\n\t * stylesProcessor.toNormalizedForm( 'margin', '1px', styles );\n\t *\n\t * // styles will consist: { margin: { top: '1px', right: '1px', bottom: '1px', left: '1px; } }\n\t * ```\n\t *\n\t * **Note**: To define normalizer callbacks use {@link #setNormalizer}.\n\t *\n\t * @param name Name of style property.\n\t * @param propertyValue Value of style property.\n\t * @param styles Object holding normalized styles.\n\t */\n\tpublic toNormalizedForm( name: string, propertyValue: StyleValue, styles: Styles ): void {\n\t\tif ( isObject( propertyValue ) ) {\n\t\t\tappendStyleValue( styles, toPath( name ), propertyValue );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._normalizers.has( name ) ) {\n\t\t\tconst normalizer = this._normalizers.get( name )!;\n\n\t\t\tconst { path, value } = normalizer( propertyValue );\n\n\t\t\tappendStyleValue( styles, path, value );\n\t\t} else {\n\t\t\tappendStyleValue( styles, name, propertyValue );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a normalized version of a style property.\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tmargin: { top: '1px', right: '1px', bottom: '1px', left: '1px; },\n\t * \tbackground: { color: '#f00' }\n\t * };\n\t *\n\t * stylesProcessor.getNormalized( 'background' );\n\t * // will return: { color: '#f00' }\n\t *\n\t * stylesProcessor.getNormalized( 'margin-top' );\n\t * // will return: '1px'\n\t * ```\n\t *\n\t * **Note**: In some cases extracting single value requires defining an extractor callback {@link #setExtractor}.\n\t *\n\t * @param name Name of style property.\n\t * @param styles Object holding normalized styles.\n\t */\n\tpublic getNormalized( name: string | undefined, styles: Styles ): StyleValue | undefined {\n\t\tif ( !name ) {\n\t\t\treturn merge( {}, styles );\n\t\t}\n\n\t\t// Might be empty string.\n\t\tif ( styles[ name ] !== undefined ) {\n\t\t\treturn styles[ name ];\n\t\t}\n\n\t\tif ( this._extractors.has( name ) ) {\n\t\t\tconst extractor = this._extractors.get( name )!;\n\n\t\t\tif ( typeof extractor === 'string' ) {\n\t\t\t\treturn get( styles, extractor );\n\t\t\t}\n\n\t\t\tconst value = extractor( name, styles );\n\n\t\t\tif ( value ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\n\t\treturn get( styles, toPath( name ) );\n\t}\n\n\t/**\n\t * Returns a reduced form of style property form normalized object.\n\t *\n\t * For default margin reducer, the below code:\n\t *\n\t * ```ts\n\t * stylesProcessor.getReducedForm( 'margin', {\n\t * \tmargin: { top: '1px', right: '1px', bottom: '2px', left: '1px; }\n\t * } );\n\t * ```\n\t *\n\t * will return:\n\t *\n\t * ```ts\n\t * [\n\t * \t[ 'margin', '1px 1px 2px' ]\n\t * ]\n\t * ```\n\t *\n\t * because it might be represented as a shorthand 'margin' value. However if one of margin long hand values is missing it should return:\n\t *\n\t * ```ts\n\t * [\n\t * \t[ 'margin-top', '1px' ],\n\t * \t[ 'margin-right', '1px' ],\n\t * \t[ 'margin-bottom', '2px' ]\n\t * \t// the 'left' value is missing - cannot use 'margin' shorthand.\n\t * ]\n\t * ```\n\t *\n\t * **Note**: To define reducer callbacks use {@link #setReducer}.\n\t *\n\t * @param name Name of style property.\n\t */\n\tpublic getReducedForm( name: string, styles: Styles ): Array<StylePropertyDescriptor> {\n\t\tconst normalizedValue = this.getNormalized( name, styles );\n\n\t\t// Might be empty string.\n\t\tif ( normalizedValue === undefined ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( this._reducers.has( name ) ) {\n\t\t\tconst reducer = this._reducers.get( name )!;\n\n\t\t\treturn reducer( normalizedValue );\n\t\t}\n\n\t\treturn [ [ name, normalizedValue as string ] ];\n\t}\n\n\t/**\n\t * Return all style properties. Also expand shorthand properties (e.g. `margin`, `background`) if respective extractor is available.\n\t *\n\t * @param styles Object holding normalized styles.\n\t */\n\tpublic getStyleNames( styles: Styles ): Array<string> {\n\t\tconst styleNamesKeysSet = new Set<string>();\n\n\t\t// Find all extractable styles that have a value.\n\t\tfor ( const name of this._consumables.keys() ) {\n\t\t\tconst style = this.getNormalized( name, styles );\n\n\t\t\tif ( style && ( typeof style != 'object' || Object.keys( style ).length ) ) {\n\t\t\t\tstyleNamesKeysSet.add( name );\n\t\t\t}\n\t\t}\n\n\t\t// For simple styles (for example `color`) we don't have a map of those styles\n\t\t// but they are 1 to 1 with normalized object keys.\n\t\tfor ( const name of Object.keys( styles ) ) {\n\t\t\tstyleNamesKeysSet.add( name );\n\t\t}\n\n\t\treturn Array.from( styleNamesKeysSet );\n\t}\n\n\t/**\n\t * Returns related style names.\n\t *\n\t * ```ts\n\t * stylesProcessor.getRelatedStyles( 'margin' );\n\t * // will return: [ 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ];\n\t *\n\t * stylesProcessor.getRelatedStyles( 'margin-top' );\n\t * // will return: [ 'margin' ];\n\t * ```\n\t *\n\t * **Note**: To define new style relations load an existing style processor or use\n\t * {@link module:engine/view/stylesmap~StylesProcessor#setStyleRelation `StylesProcessor.setStyleRelation()`}.\n\t */\n\tpublic getRelatedStyles( name: string ): Array<string> {\n\t\treturn this._consumables.get( name ) || [];\n\t}\n\n\t/**\n\t * Adds a normalizer method for a style property.\n\t *\n\t * A normalizer returns describing how the value should be normalized.\n\t *\n\t * For instance 'margin' style is a shorthand for four margin values:\n\t *\n\t * - 'margin-top'\n\t * - 'margin-right'\n\t * - 'margin-bottom'\n\t * - 'margin-left'\n\t *\n\t * and can be written in various ways if some values are equal to others. For instance `'margin: 1px 2em;'` is a shorthand for\n\t * `'margin-top: 1px;margin-right: 2em;margin-bottom: 1px;margin-left: 2em'`.\n\t *\n\t * A normalizer should parse various margin notations as a single object:\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tmargin: {\n\t * \t\ttop: '1px',\n\t * \t\tright: '2em',\n\t * \t\tbottom: '1px',\n\t * \t\tleft: '2em'\n\t * \t}\n\t * };\n\t * ```\n\t *\n\t * Thus a normalizer for 'margin' style should return an object defining style path and value to store:\n\t *\n\t * ```ts\n\t * const returnValue = {\n\t * \tpath: 'margin',\n\t * \tvalue: {\n\t * \t\ttop: '1px',\n\t * \t\tright: '2em',\n\t * \t\tbottom: '1px',\n\t * \t\tleft: '2em'\n\t * \t}\n\t * };\n\t * ```\n\t *\n\t * Additionally to fully support all margin notations there should be also defined 4 normalizers for longhand margin notations. Below\n\t * is an example for 'margin-top' style property normalizer:\n\t *\n\t * ```ts\n\t * stylesProcessor.setNormalizer( 'margin-top', valueString => {\n\t * \treturn {\n\t * \t\tpath: 'margin.top',\n\t * \t\tvalue: valueString\n\t * \t}\n\t * } );\n\t * ```\n\t */\n\tpublic setNormalizer( name: string, callback: StylesNormalizer ): void {\n\t\tthis._normalizers.set( name, callback );\n\t}\n\n\t/**\n\t * Adds a extractor callback for a style property.\n\t *\n\t * Most normalized style values are stored as one level objects. It is assumed that `'margin-top'` style will be stored as:\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tmargin: {\n\t * \t\ttop: 'value'\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * However, some styles can have conflicting notations and thus it might be harder to extract a style value from shorthand. For instance\n\t * the 'border-top-style' can be defined using `'border-top:solid'`, `'border-style:solid none none none'` or by `'border:solid'`\n\t * shorthands. The default border styles processors stores styles as:\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tborder: {\n\t * \t\tstyle: {\n\t * \t\t\ttop: 'solid'\n\t * \t\t}\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * as it is better to modify border style independently from other values. On the other part the output of the border might be\n\t * desired as `border-top`, `border-left`, etc notation.\n\t *\n\t * In the above example an extractor should return a side border value that combines style, color and width:\n\t *\n\t * ```ts\n\t * styleProcessor.setExtractor( 'border-top', styles => {\n\t * \treturn {\n\t * \t\tcolor: styles.border.color.top,\n\t * \t\tstyle: styles.border.style.top,\n\t * \t\twidth: styles.border.width.top\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * @param callbackOrPath Callback that return a requested value or path string for single values.\n\t */\n\tpublic setExtractor( name: string, callbackOrPath: StylesExtractor ): void {\n\t\tthis._extractors.set( name, callbackOrPath );\n\t}\n\n\t/**\n\t * Adds a reducer callback for a style property.\n\t *\n\t * Reducer returns a minimal notation for given style name. For longhand properties it is not required to write a reducer as\n\t * by default the direct value from style path is taken.\n\t *\n\t * For shorthand styles a reducer should return minimal style notation either by returning single name-value tuple or multiple tuples\n\t * if a shorthand cannot be used. For instance for a margin shorthand a reducer might return:\n\t *\n\t * ```ts\n\t * const marginShortHandTuple = [\n\t * \t[ 'margin', '1px 1px 2px' ]\n\t * ];\n\t * ```\n\t *\n\t * or a longhand tuples for defined values:\n\t *\n\t * ```ts\n\t * // Considering margin.bottom and margin.left are undefined.\n\t * const marginLonghandsTuples = [\n\t * \t[ 'margin-top', '1px' ],\n\t * \t[ 'margin-right', '1px' ]\n\t * ];\n\t * ```\n\t *\n\t * A reducer obtains a normalized style value:\n\t *\n\t * ```ts\n\t * // Simplified reducer that always outputs 4 values which are always present:\n\t * stylesProcessor.setReducer( 'margin', margin => {\n\t * \treturn [\n\t * \t\t[ 'margin', `${ margin.top } ${ margin.right } ${ margin.bottom } ${ margin.left }` ]\n\t * \t]\n\t * } );\n\t * ```\n\t */\n\tpublic setReducer( name: string, callback: StylesReducer ): void {\n\t\tthis._reducers.set( name, callback );\n\t}\n\n\t/**\n\t * Defines a style shorthand relation to other style notations.\n\t *\n\t * ```ts\n\t * stylesProcessor.setStyleRelation( 'margin', [\n\t * \t'margin-top',\n\t * \t'margin-right',\n\t * \t'margin-bottom',\n\t * \t'margin-left'\n\t * ] );\n\t * ```\n\t *\n\t * This enables expanding of style names for shorthands. For instance, if defined,\n\t * {@link module:engine/conversion/viewconsumable~ViewConsumable view consumable} items are automatically created\n\t * for long-hand margin style notation alongside the `'margin'` item.\n\t *\n\t * This means that when an element being converted has a style `margin`, a converter for `margin-left` will work just\n\t * fine since the view consumable will contain a consumable `margin-left` item (thanks to the relation) and\n\t * `element.getStyle( 'margin-left' )` will work as well assuming that the style processor was correctly configured.\n\t * However, once `margin-left` is consumed, `margin` will not be consumable anymore.\n\t */\n\tpublic setStyleRelation( shorthandName: string, styleNames: Array<string> ): void {\n\t\tthis._mapStyleNames( shorthandName, styleNames );\n\n\t\tfor ( const alsoName of styleNames ) {\n\t\t\tthis._mapStyleNames( alsoName, [ shorthandName ] );\n\t\t}\n\t}\n\n\t/**\n\t * Set two-way binding of style names.\n\t */\n\tprivate _mapStyleNames( name: string, styleNames: Array<string> ) {\n\t\tif ( !this._consumables.has( name ) ) {\n\t\t\tthis._consumables.set( name, [] );\n\t\t}\n\n\t\tthis._consumables.get( name )!.push( ...styleNames );\n\t}\n}\n\n/**\n * Parses inline styles and puts property - value pairs into styles map.\n *\n * @param stylesString Styles to parse.\n * @returns Map of parsed properties and values.\n */\nfunction parseInlineStyles( stylesString: string ): Map<string, string> {\n\t// `null` if no quote was found in input string or last found quote was a closing quote. See below.\n\tlet quoteType = null;\n\tlet propertyNameStart = 0;\n\tlet propertyValueStart = 0;\n\tlet propertyName = null;\n\n\tconst stylesMap = new Map();\n\n\t// Do not set anything if input string is empty.\n\tif ( stylesString === '' ) {\n\t\treturn stylesMap;\n\t}\n\n\t// Fix inline styles that do not end with `;` so they are compatible with algorithm below.\n\tif ( stylesString.charAt( stylesString.length - 1 ) != ';' ) {\n\t\tstylesString = stylesString + ';';\n\t}\n\n\t// Seek the whole string for \"special characters\".\n\tfor ( let i = 0; i < stylesString.length; i++ ) {\n\t\tconst char = stylesString.charAt( i );\n\n\t\tif ( quoteType === null ) {\n\t\t\t// No quote found yet or last found quote was a closing quote.\n\t\t\tswitch ( char ) {\n\t\t\t\tcase ':':\n\t\t\t\t\t// Most of time colon means that property name just ended.\n\t\t\t\t\t// Sometimes however `:` is found inside property value (for example in background image url).\n\t\t\t\t\tif ( !propertyName ) {\n\t\t\t\t\t\t// Treat this as end of property only if property name is not already saved.\n\t\t\t\t\t\t// Save property name.\n\t\t\t\t\t\tpropertyName = stylesString.substr( propertyNameStart, i - propertyNameStart );\n\t\t\t\t\t\t// Save this point as the start of property value.\n\t\t\t\t\t\tpropertyValueStart = i + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\'':\n\t\t\t\t\t// Opening quote found (this is an opening quote, because `quoteType` is `null`).\n\t\t\t\t\tquoteType = char;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ';': {\n\t\t\t\t\t// Property value just ended.\n\t\t\t\t\t// Use previously stored property value start to obtain property value.\n\t\t\t\t\tconst propertyValue = stylesString.substr( propertyValueStart, i - propertyValueStart );\n\n\t\t\t\t\tif ( propertyName ) {\n\t\t\t\t\t\t// Save parsed part.\n\t\t\t\t\t\tstylesMap.set( propertyName.trim(), propertyValue.trim() );\n\t\t\t\t\t}\n\n\t\t\t\t\tpropertyName = null;\n\n\t\t\t\t\t// Save this point as property name start. Property name starts immediately after previous property value ends.\n\t\t\t\t\tpropertyNameStart = i + 1;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( char === quoteType ) {\n\t\t\t// If a quote char is found and it is a closing quote, mark this fact by `null`-ing `quoteType`.\n\t\t\tquoteType = null;\n\t\t}\n\t}\n\n\treturn stylesMap;\n}\n\n/**\n * Return lodash compatible path from style name.\n */\nfunction toPath( name: string ): string {\n\treturn name.replace( '-', '.' );\n}\n\n/**\n * Appends style definition to the styles object.\n */\nfunction appendStyleValue( stylesObject: Styles, nameOrPath: string, valueOrObject: StyleValue ) {\n\tlet valueToSet = valueOrObject;\n\n\t// We don't want to merge it with existing value when it's array. It's because some styles can be defined\n\t// as array of layers (e.g. background-image) and in such case we want to override whole array instead of merging it with existing one.\n\tif ( isObject( valueOrObject ) && !Array.isArray( valueOrObject ) ) {\n\t\tvalueToSet = merge( {}, get( stylesObject, nameOrPath ), valueOrObject );\n\t}\n\n\tset( stylesObject, nameOrPath, valueToSet );\n}\n\n/**\n * Modifies the `styles` deeply nested object by removing properties defined in `toRemove`.\n */\nfunction removeStyles( styles: Styles, toRemove: Styles ) {\n\tfor ( const key of Object.keys( toRemove ) ) {\n\t\tif (\n\t\t\tstyles[ key ] !== null &&\n\t\t\t!Array.isArray( styles[ key ] ) &&\n\t\t\ttypeof styles[ key ] == 'object' &&\n\t\t\ttypeof toRemove[ key ] == 'object'\n\t\t) {\n\t\t\tremoveStyles( styles[ key ] as Styles, toRemove[ key ] as Styles );\n\n\t\t\tif ( !Object.keys( styles[ key ] ).length ) {\n\t\t\t\tdelete styles[ key ];\n\t\t\t}\n\t\t} else {\n\t\t\tdelete styles[ key ];\n\t\t}\n\t}\n}\n\n/**\n * A CSS style property descriptor that contains tuple of two strings:\n *\n * - first string describes property name\n * - second string describes property value\n *\n * ```ts\n * const marginDescriptor = [ 'margin', '2px 3em' ];\n * const marginTopDescriptor = [ 'margin-top', '2px' ];\n * ```\n */\nexport type StylePropertyDescriptor = [ name: string, value: string ];\n\n/**\n * An object describing values associated with the sides of a box, for instance margins, paddings,\n * border widths, border colors, etc.\n *\n * ```ts\n * const margin = {\n * \ttop: '1px',\n * \tright: '3px',\n * \tbottom: '3px',\n * \tleft: '7px'\n * };\n *\n * const borderColor = {\n * \ttop: 'red',\n * \tright: 'blue',\n * \tbottom: 'blue',\n * \tleft: 'red'\n * };\n * ```\n */\nexport type BoxStyleSides = {\n\n\t/**\n\t * Top side value.\n\t */\n\ttop: undefined | string;\n\n\t/**\n\t * Left side value.\n\t */\n\tleft: undefined | string;\n\n\t/**\n\t * Right side value.\n\t */\n\tright: undefined | string;\n\n\t/**\n\t * Bottom side value.\n\t */\n\tbottom: undefined | string;\n};\n\n/**\n * Object holding styles as key-value pairs.\n */\nexport interface Styles {\n\t[ name: string ]: StyleValue;\n}\n\n/**\n * The value of style.\n */\nexport type StyleValue = string | Array<string> | Styles | BoxStyleSides;\n\n/**\n * A normalizer method for a style property.\n *\n * @see ~StylesProcessor#setNormalizer\n */\nexport type StylesNormalizer = ( name: string ) => { path: string; value: StyleValue };\n\n/**\n * An extractor callback for a style property or path string for single values.\n *\n * @see ~StylesProcessor#setExtractor\n */\nexport type StylesExtractor = string | ( ( name: string, styles: Styles ) => StyleValue | undefined );\n\n/**\n * A reducer callback for a style property.\n *\n * @see ~StylesProcessor#setReducer\n */\nexport type StylesReducer = ( value: StyleValue ) => Array<StylePropertyDescriptor>;\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/**\n * @module engine/view/tokenlist\n */\n\nimport { type ArrayOrItem, toArray } from '@ckeditor/ckeditor5-utils';\nimport type { ViewElementAttributeValue } from './element.js';\n\n/**\n * Token list. Allows handling (adding, removing, retrieving) a set of tokens (for example class names).\n */\nexport class ViewTokenList implements ViewElementAttributeValue {\n\t/**\n\t * The set of tokens.\n\t */\n\tprivate _set = new Set<string>();\n\n\t/**\n\t * Returns true if token list has no tokens set.\n\t */\n\tpublic get isEmpty(): boolean {\n\t\treturn this._set.size == 0;\n\t}\n\n\t/**\n\t * Number of tokens.\n\t */\n\tpublic get size(): number {\n\t\treturn this._set.size;\n\t}\n\n\t/**\n\t * Checks if a given token is set.\n\t */\n\tpublic has( name: string ): boolean {\n\t\treturn this._set.has( name );\n\t}\n\n\t/**\n\t * Returns all tokens.\n\t */\n\tpublic keys(): Array<string> {\n\t\treturn Array.from( this._set.keys() );\n\t}\n\n\t/**\n\t * Resets the value to the given one.\n\t */\n\tpublic setTo( value: string ): this {\n\t\tthis.clear();\n\n\t\tfor ( const token of value.split( /\\s+/ ) ) {\n\t\t\tif ( token ) {\n\t\t\t\tthis._set.add( token );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a given token without affecting other tokens.\n\t */\n\tpublic set( tokens: ArrayOrItem<string> ): void {\n\t\tfor ( const token of toArray( tokens ) ) {\n\t\t\tif ( token ) {\n\t\t\t\tthis._set.add( token );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes given token.\n\t */\n\tpublic remove( tokens: ArrayOrItem<string> ): void {\n\t\tfor ( const token of toArray( tokens ) ) {\n\t\t\tthis._set.delete( token );\n\t\t}\n\t}\n\n\t/**\n\t * Removes all tokens.\n\t */\n\tpublic clear(): void {\n\t\tthis._set.clear();\n\t}\n\n\t/**\n\t * Returns a normalized tokens string.\n\t */\n\tpublic toString(): string {\n\t\treturn Array.from( this._set ).join( ' ' );\n\t}\n\n\t/**\n\t * Returns `true` if both attributes have the same tokens.\n\t */\n\tpublic isSimilar( other: ViewTokenList ): boolean {\n\t\tif ( this.size !== other.size ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const token of this.keys() ) {\n\t\t\tif ( !other.has( token ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Clones the attribute value.\n\t *\n\t * @internal\n\t */\n\tpublic _clone(): this {\n\t\tconst clone = new ( this.constructor as any )();\n\n\t\tclone._set = new Set( this._set );\n\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Used by the {@link module:engine/view/matcher~Matcher Matcher} to collect matching attribute tokens.\n\t *\n\t * @internal\n\t * @param tokenPattern The matched token name pattern.\n\t * @returns An array of matching tokens.\n\t */\n\tpublic _getTokensMatch(\n\t\ttokenPattern: true | string | RegExp\n\t): Array<string> | undefined {\n\t\tconst match: Array<string> = [];\n\n\t\tif ( tokenPattern === true ) {\n\t\t\tfor ( const token of this._set.keys() ) {\n\t\t\t\tmatch.push( token );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t}\n\n\t\tif ( typeof tokenPattern == 'string' ) {\n\t\t\tfor ( const token of tokenPattern.split( /\\s+/ ) ) {\n\t\t\t\tif ( this._set.has( token ) ) {\n\t\t\t\t\tmatch.push( token );\n\t\t\t\t} else {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn match;\n\t\t}\n\n\t\tfor ( const token of this._set.keys() ) {\n\t\t\tif ( token.match( tokenPattern ) ) {\n\t\t\t\tmatch.push( token );\n\t\t\t}\n\t\t}\n\n\t\treturn match.length ? match : undefined;\n\t}\n\n\t/**\n\t * Returns a list of consumables for the attribute.\n\t *\n\t * Could be filtered by the given token name.\n\t *\n\t * @internal\n\t */\n\tpublic _getConsumables( name?: string ): Array<string> {\n\t\treturn name ? [ name ] : this.keys();\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_canMergeAttributesFrom} to verify if the given attribute\n\t * can be merged without conflicts into the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while downcasting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other `AttributeElement`.\n\t *\n\t * @internal\n\t */\n\tpublic _canMergeFrom(): boolean {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_mergeAttributesFrom} to merge a given attribute into the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t *\n\t * @internal\n\t */\n\tpublic _mergeFrom( other: ViewTokenList ): void {\n\t\tfor ( const token of other._set.keys() ) {\n\t\t\tif ( !this._set.has( token ) ) {\n\t\t\t\tthis._set.add( token );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_canSubtractAttributesOf} to verify if the given attribute\n\t * can be fully subtracted from the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t *\n\t * @internal\n\t */\n\tpublic _isMatching( other: ViewTokenList ): boolean {\n\t\tfor ( const name of other._set.keys() ) {\n\t\t\tif ( !this._set.has( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\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/**\n * @module engine/view/element\n */\n\nimport { ViewNode } from './node.js';\nimport { ViewText } from './text.js';\nimport { ViewTextProxy } from './textproxy.js';\nimport { type ArrayOrItem, isIterable, toMap } from '@ckeditor/ckeditor5-utils';\nimport { Matcher, isPatternMatched, type MatcherPattern, type NormalizedPropertyPattern } from './matcher.js';\nimport { StylesMap, type Styles, type StyleValue } from './stylesmap.js';\n\nimport { type ViewDocument } from './document.js';\nimport { type ViewItem } from './item.js';\nimport { ViewTokenList } from './tokenlist.js';\n\n// @if CK_DEBUG_ENGINE // import { convertMapToTags } from '../dev-utils/utils.js';\n\n/**\n * View element.\n *\n * The editing engine does not define a fixed semantics of its elements (it is \"DTD-free\").\n * This is why the type of the {@link module:engine/view/element~ViewElement} need to\n * be defined by the feature developer. When creating an element you should use one of the following methods:\n *\n * * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement `downcastWriter#createContainerElement()`}\n * in order to create a {@link module:engine/view/containerelement~ViewContainerElement},\n * * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement `downcastWriter#createAttributeElement()`}\n * in order to create a {@link module:engine/view/attributeelement~ViewAttributeElement},\n * * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`}\n * in order to create a {@link module:engine/view/emptyelement~ViewEmptyElement}.\n * * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `downcastWriter#createUIElement()`}\n * in order to create a {@link module:engine/view/uielement~ViewUIElement}.\n * * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEditableElement `downcastWriter#createEditableElement()`}\n * in order to create a {@link module:engine/view/editableelement~ViewEditableElement}.\n *\n * Note that for view elements which are not created from the model, like elements from mutations, paste or\n * {@link module:engine/controller/datacontroller~DataController#set data.set} it is not possible to define the type of the element.\n * In such cases the {@link module:engine/view/upcastwriter~ViewUpcastWriter#createElement `UpcastWriter#createElement()`} method\n * should be used to create generic view elements.\n */\nexport class ViewElement extends ViewNode {\n\t/**\n\t * Name of the element.\n\t */\n\tpublic readonly name: string;\n\n\t/**\n\t * A list of attribute names that should be rendered in the editing pipeline even though filtering mechanisms\n\t * implemented in the {@link module:engine/view/domconverter~ViewDomConverter} (for instance,\n\t * {@link module:engine/view/domconverter~ViewDomConverter#shouldRenderAttribute}) would filter them out.\n\t *\n\t * These attributes can be specified as an option when the element is created by\n\t * the {@link module:engine/view/downcastwriter~ViewDowncastWriter}. To check whether an unsafe an attribute should\n\t * be permitted, use the {@link #shouldRenderUnsafeAttribute} method.\n\t *\n\t * @internal\n\t */\n\tpublic readonly _unsafeAttributesToRender: Array<string> = [];\n\n\t/**\n\t * Map of attributes, where attributes names are keys and attributes values are values.\n\t */\n\tprivate readonly _attrs: Map<string, string | ViewElementAttributeValue>;\n\n\t/**\n\t * Array of child nodes.\n\t */\n\tprivate readonly _children: Array<ViewNode>;\n\n\t/**\n\t * Map of custom properties.\n\t * Custom properties can be added to element instance, will be cloned but not rendered into DOM.\n\t */\n\tprivate readonly _customProperties = new Map<string | symbol, unknown>();\n\n\t/**\n\t * Set of classes associated with element instance.\n\t *\n\t * Note that this is just an alias for `this._attrs.get( 'class' );`\n\t */\n\tprivate get _classes(): ViewTokenList | undefined {\n\t\treturn this._attrs.get( 'class' ) as ViewTokenList | undefined;\n\t}\n\n\t/**\n\t * Normalized styles.\n\t *\n\t * Note that this is just an alias for `this._attrs.get( 'style' );`\n\t */\n\tprivate get _styles(): StylesMap | undefined {\n\t\treturn this._attrs.get( 'style' ) as StylesMap | undefined;\n\t}\n\n\t/**\n\t * Creates a view element.\n\t *\n\t * Attributes can be passed in various formats:\n\t *\n\t * ```ts\n\t * new Element( viewDocument, 'div', { class: 'editor', contentEditable: 'true' } ); // object\n\t * new Element( viewDocument, 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t * new Element( viewDocument, 'div', mapOfAttributes ); // map\n\t * ```\n\t *\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string,\n\t\tattrs?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t) {\n\t\tsuper( document );\n\n\t\tthis.name = name;\n\n\t\tthis._attrs = this._parseAttributes( attrs );\n\t\tthis._children = [];\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Number of element's children.\n\t */\n\tpublic get childCount(): number {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t */\n\tpublic get isEmpty(): boolean {\n\t\treturn this._children.length === 0;\n\t}\n\n\t/**\n\t * Gets child at the given index.\n\t *\n\t * @param index Index of child.\n\t * @returns Child node.\n\t */\n\tpublic getChild( index: number ): ViewNode | undefined {\n\t\treturn this._children[ index ];\n\t}\n\n\t/**\n\t * Gets index of the given child node. Returns `-1` if child node is not found.\n\t *\n\t * @param node Child node.\n\t * @returns Index of the child node.\n\t */\n\tpublic getChildIndex( node: ViewNode ): number {\n\t\treturn this._children.indexOf( node );\n\t}\n\n\t/**\n\t * Gets child nodes iterator.\n\t *\n\t * @returns Child nodes iterator.\n\t */\n\tpublic getChildren(): IterableIterator<ViewNode> {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an iterator that contains the keys for attributes. Order of inserting attributes is not preserved.\n\t *\n\t * @returns Keys for attributes.\n\t */\n\tpublic* getAttributeKeys(): IterableIterator<string> {\n\t\t// This is yielded in this specific order to maintain backward compatibility of data.\n\t\t// Otherwise, we could simply just have the `for` loop only inside this method.\n\n\t\tif ( this._classes ) {\n\t\t\tyield 'class';\n\t\t}\n\n\t\tif ( this._styles ) {\n\t\t\tyield 'style';\n\t\t}\n\n\t\tfor ( const key of this._attrs.keys() ) {\n\t\t\tif ( key != 'class' && key != 'style' ) {\n\t\t\t\tyield key;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this element's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */\n\tpublic* getAttributes(): IterableIterator<[ string, string ]> {\n\t\tfor ( const [ name, value ] of this._attrs.entries() ) {\n\t\t\tyield [ name, String( value ) ];\n\t\t}\n\t}\n\n\t/**\n\t * Gets attribute by key. If attribute is not present - returns undefined.\n\t *\n\t * @param key Attribute key.\n\t * @returns Attribute value.\n\t */\n\tpublic getAttribute( key: string ): string | undefined {\n\t\treturn this._attrs.has( key ) ? String( this._attrs.get( key ) ) : undefined;\n\t}\n\n\t/**\n\t * Returns a boolean indicating whether an attribute with the specified key exists in the element.\n\t *\n\t * @param key Attribute key.\n\t * @returns `true` if attribute with the specified key exists in the element, `false` otherwise.\n\t */\n\tpublic hasAttribute( key: string, token?: string ): boolean {\n\t\tif ( !this._attrs.has( key ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( token !== undefined ) {\n\t\t\tif ( usesStylesMap( this.name, key ) || usesTokenList( this.name, key ) ) {\n\t\t\t\treturn ( this._attrs.get( key ) as ViewElementAttributeValue ).has( token );\n\t\t\t} else {\n\t\t\t\treturn this._attrs.get( key ) === token;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if this element is similar to other element.\n\t * Both elements should have the same name and attributes to be considered as similar. Two similar elements\n\t * can contain different set of children nodes.\n\t */\n\tpublic isSimilar( otherElement: ViewItem ): boolean {\n\t\tif ( !( otherElement instanceof ViewElement ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If exactly the same Element is provided - return true immediately.\n\t\tif ( this === otherElement ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check element name.\n\t\tif ( this.name != otherElement.name ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check number of attributes, classes and styles.\n\t\tif ( this._attrs.size !== otherElement._attrs.size ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if attributes are the same.\n\t\tfor ( const [ key, value ] of this._attrs ) {\n\t\t\tconst otherValue = otherElement._attrs.get( key );\n\n\t\t\tif ( otherValue === undefined ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( typeof value == 'string' || typeof otherValue == 'string' ) {\n\t\t\t\tif ( otherValue !== value ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( !value.isSimilar( otherValue ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns true if class is present.\n\t * If more then one class is provided - returns true only when all classes are present.\n\t *\n\t * ```ts\n\t * element.hasClass( 'foo' ); // Returns true if 'foo' class is present.\n\t * element.hasClass( 'foo', 'bar' ); // Returns true if 'foo' and 'bar' classes are both present.\n\t * ```\n\t */\n\tpublic hasClass( ...className: Array<string> ): boolean {\n\t\tfor ( const name of className ) {\n\t\t\tif ( !this._classes || !this._classes.has( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns iterator that contains all class names.\n\t */\n\tpublic getClassNames(): IterableIterator<string> {\n\t\tconst array = this._classes ? this._classes.keys() : [];\n\n\t\t// This is overcomplicated because we need to be backward compatible for use cases when iterator is expected.\n\t\tconst iterator = array[ Symbol.iterator ]();\n\n\t\treturn Object.assign( array, {\n\t\t\tnext: iterator.next.bind( iterator )\n\t\t} );\n\t}\n\n\t/**\n\t * Returns style value for the given property name.\n\t * If the style does not exist `undefined` is returned.\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#getAsString `StylesMap#getAsString()`} for details.\n\t *\n\t * For an element with style set to `'margin:1px'`:\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginStylesRules );\n\t *\n\t * const element = view.change( writer => {\n\t * \tconst element = writer.createElement();\n\t * \twriter.setStyle( 'margin', '1px' );\n\t * \twriter.setStyle( 'margin-bottom', '3em' );\n\t *\n\t * \treturn element;\n\t * } );\n\t *\n\t * element.getStyle( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t * ```\n\t */\n\tpublic getStyle( property: string ): string | undefined {\n\t\treturn this._styles && this._styles.getAsString( property );\n\t}\n\n\t/**\n\t * Returns a normalized style object or single style value.\n\t *\n\t * For an element with style set to: margin:1px 2px 3em;\n\t *\n\t * ```ts\n\t * element.getNormalizedStyle( 'margin' ) );\n\t * ```\n\t *\n\t * will return:\n\t *\n\t * ```ts\n\t * {\n\t * \ttop: '1px',\n\t * \tright: '2px',\n\t * \tbottom: '3em',\n\t * \tleft: '2px'    // a normalized value from margin shorthand\n\t * }\n\t * ```\n\t *\n\t * and reading for single style value:\n\t *\n\t * ```ts\n\t * styles.getNormalizedStyle( 'margin-left' );\n\t * ```\n\t *\n\t * Will return a `2px` string.\n\t *\n\t * **Note**: This method will return normalized values only if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#getNormalized `StylesMap#getNormalized()`} for details.\n\t *\n\t * @param property Name of CSS property\n\t */\n\tpublic getNormalizedStyle( property: string ): StyleValue | undefined {\n\t\treturn this._styles && this._styles.getNormalized( property );\n\t}\n\n\t/**\n\t * Returns an array that contains all style names.\n\t *\n\t * @param expand Expand shorthand style properties and return all equivalent style representations.\n\t */\n\tpublic getStyleNames( expand?: boolean ): Array<string> {\n\t\treturn this._styles ? this._styles.getStyleNames( expand ) : [];\n\t}\n\n\t/**\n\t * Returns true if style keys are present.\n\t * If more then one style property is provided - returns true only when all properties are present.\n\t *\n\t * ```ts\n\t * element.hasStyle( 'color' ); // Returns true if 'border-top' style is present.\n\t * element.hasStyle( 'color', 'border-top' ); // Returns true if 'color' and 'border-top' styles are both present.\n\t * ```\n\t */\n\tpublic hasStyle( ...property: Array<string> ): boolean {\n\t\tfor ( const name of property ) {\n\t\t\tif ( !this._styles || !this._styles.has( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns ancestor element that match specified pattern.\n\t * Provided patterns should be compatible with {@link module:engine/view/matcher~Matcher Matcher} as it is used internally.\n\t *\n\t * @see module:engine/view/matcher~Matcher\n\t * @param patterns Patterns used to match correct ancestor. See {@link module:engine/view/matcher~Matcher}.\n\t * @returns Found element or `null` if no matching ancestor was found.\n\t */\n\tpublic findAncestor( ...patterns: Array<MatcherPattern | ( ( element: ViewElement ) => boolean )> ): ViewElement | null {\n\t\tconst matcher = new Matcher( ...patterns as any );\n\t\tlet parent = this.parent;\n\n\t\twhile ( parent && !parent.is( 'documentFragment' ) ) {\n\t\t\tif ( matcher.match( parent ) ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns the custom property value for the given key.\n\t */\n\tpublic getCustomProperty( key: string | symbol ): unknown {\n\t\treturn this._customProperties.get( key );\n\t}\n\n\t/**\n\t * Returns an iterator which iterates over this element's custom properties.\n\t * Iterator provides `[ key, value ]` pairs for each stored property.\n\t */\n\tpublic* getCustomProperties(): IterableIterator<[ string | symbol, unknown ]> {\n\t\tyield* this._customProperties.entries();\n\t}\n\n\t/**\n\t * Returns identity string based on element's name, styles, classes and other attributes.\n\t * Two elements that {@link #isSimilar are similar} will have same identity string.\n\t * It has the following format:\n\t *\n\t * ```ts\n\t * 'name class=\"class1,class2\" style=\"style1:value1;style2:value2\" attr1=\"val1\" attr2=\"val2\"'\n\t * ```\n \t *\n\t * For example:\n\t *\n\t * ```ts\n\t * const element = writer.createContainerElement( 'foo', {\n\t * \tbanana: '10',\n\t * \tapple: '20',\n\t * \tstyle: 'color: red; border-color: white;',\n\t * \tclass: 'baz'\n\t * } );\n\t *\n\t * // returns 'foo class=\"baz\" style=\"border-color:white;color:red\" apple=\"20\" banana=\"10\"'\n\t * element.getIdentity();\n\t * ```\n\t *\n\t * **Note**: Classes, styles and other attributes are sorted alphabetically.\n\t */\n\tpublic getIdentity(): string {\n\t\tconst classes = this._classes ? this._classes.keys().sort().join( ',' ) : '';\n\t\tconst styles = this._styles && String( this._styles );\n\t\tconst attributes = Array.from( this._attrs )\n\t\t\t.filter( ( [ key ] ) => key != 'style' && key != 'class' )\n\t\t\t.map( i => `${ i[ 0 ] }=\"${ i[ 1 ] }\"` )\n\t\t\t.sort().join( ' ' );\n\n\t\treturn this.name +\n\t\t\t( classes == '' ? '' : ` class=\"${ classes }\"` ) +\n\t\t\t( !styles ? '' : ` style=\"${ styles }\"` ) +\n\t\t\t( attributes == '' ? '' : ` ${ attributes }` );\n\t}\n\n\t/**\n\t * Decides whether an unsafe attribute is whitelisted and should be rendered in the editing pipeline even though filtering mechanisms\n\t * like {@link module:engine/view/domconverter~ViewDomConverter#shouldRenderAttribute} say it should not.\n\t *\n\t * Unsafe attribute names can be specified when creating an element via {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t *\n\t * @param attributeName The name of the attribute to be checked.\n\t */\n\tpublic shouldRenderUnsafeAttribute( attributeName: string ): boolean {\n\t\treturn this._unsafeAttributesToRender.includes( attributeName );\n\t}\n\n\t/**\n\t * Converts `ViewElement` to plain object and returns it.\n\t *\n\t * @returns `ViewElement` converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.name = this.name;\n\t\tjson.type = 'Element';\n\n\t\tif ( this._attrs.size ) {\n\t\t\tjson.attributes = Object.fromEntries( this.getAttributes() );\n\t\t}\n\n\t\tif ( this._children.length > 0 ) {\n\t\t\tjson.children = [];\n\n\t\t\tfor ( const node of this._children ) {\n\t\t\t\tjson.children.push( node.toJSON() );\n\t\t\t}\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Clones provided element.\n\t *\n\t * @internal\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns Clone of this element.\n\t */\n\tpublic _clone( deep = false ): this {\n\t\tconst childrenClone: Array<ViewNode> = [];\n\n\t\tif ( deep ) {\n\t\t\tfor ( const child of this.getChildren() ) {\n\t\t\t\tchildrenClone.push( child._clone( deep ) );\n\t\t\t}\n\t\t}\n\n\t\t// ViewContainerElement and ViewAttributeElement should be also cloned properly.\n\t\tconst cloned = new ( this.constructor as any )( this.document, this.name, this._attrs, childrenClone );\n\n\t\t// Clone custom properties.\n\t\tcloned._customProperties = new Map( this._customProperties );\n\n\t\t// Clone filler offset method.\n\t\t// We can't define this method in a prototype because it's behavior which\n\t\t// is changed by e.g. toWidget() function from ckeditor5-widget. Perhaps this should be one of custom props.\n\t\tcloned.getFillerOffset = this.getFillerOffset;\n\n\t\t// Clone unsafe attributes list.\n\t\tcloned._unsafeAttributesToRender = this._unsafeAttributesToRender;\n\n\t\treturn cloned;\n\t}\n\n\t/**\n\t * {@link module:engine/view/element~ViewElement#_insertChild Insert} a child node or a list of child nodes at the end of this node\n\t * and sets the parent of these nodes to this element.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#insert\n\t * @internal\n\t * @param items Items to be inserted.\n\t * @fires change\n\t * @returns Number of appended nodes.\n\t */\n\tpublic _appendChild( items: ViewItem | string | Iterable<ViewItem | string> ): number {\n\t\treturn this._insertChild( this.childCount, items );\n\t}\n\n\t/**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this element.\n\t *\n\t * @internal\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#insert\n\t * @param index Position where nodes should be inserted.\n\t * @param items Items to be inserted.\n\t * @fires change\n\t * @returns Number of inserted nodes.\n\t */\n\tpublic _insertChild( index: number, items: ViewItem | string | Iterable<ViewItem | string> ): number {\n\t\tthis._fireChange( 'children', this, { index } );\n\t\tlet count = 0;\n\n\t\tconst nodes = normalize( this.document, items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\t( node as any ).parent = this;\n\t\t\t( node as any ).document = this.document;\n\n\t\t\tthis._children.splice( index, 0, node );\n\t\t\tindex++;\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t/**\n\t * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#remove\n\t * @internal\n\t * @param index Number of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @fires change\n\t * @returns The array of removed nodes.\n\t */\n\tpublic _removeChildren( index: number, howMany: number = 1 ): Array<ViewNode> {\n\t\tthis._fireChange( 'children', this, { index } );\n\n\t\tfor ( let i = index; i < index + howMany; i++ ) {\n\t\t\t( this._children[ i ] as any ).parent = null;\n\t\t}\n\n\t\treturn this._children.splice( index, howMany );\n\t}\n\n\t/**\n\t * Adds or overwrite attribute with a specified key and value.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#setAttribute\n\t * @internal\n\t * @param key Attribute key.\n\t * @param value Attribute value.\n\t * @param overwrite Whether tokenized attribute should override the attribute value or just add a token.\n\t * @fires change\n\t */\n\tpublic _setAttribute( key: string, value: unknown, overwrite = true ): void {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tif ( usesStylesMap( this.name, key ) || usesTokenList( this.name, key ) ) {\n\t\t\tlet currentValue = this._attrs.get( key ) as ViewElementAttributeValue | undefined;\n\n\t\t\tif ( !currentValue ) {\n\t\t\t\tcurrentValue = usesStylesMap( this.name, key ) ?\n\t\t\t\t\tnew StylesMap( this.document.stylesProcessor ) :\n\t\t\t\t\tnew ViewTokenList();\n\n\t\t\t\tthis._attrs.set( key, currentValue );\n\t\t\t}\n\n\t\t\tif ( overwrite ) {\n\t\t\t\t// If reset is set then value have to be a string to tokenize.\n\t\t\t\tcurrentValue.setTo( String( value ) );\n\t\t\t}\n\t\t\telse if ( usesStylesMap( this.name, key ) ) {\n\t\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\t\tcurrentValue.set( value[ 0 ], value[ 1 ] );\n\t\t\t\t} else {\n\t\t\t\t\tcurrentValue.set( value as Styles );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse { // TokenList.\n\t\t\t\tcurrentValue.set( typeof value == 'string' ? value.split( /\\s+/ ) : value as Array<string> );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._attrs.set( key, String( value ) );\n\t\t}\n\t}\n\n\t/**\n\t * Removes attribute from the element.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#removeAttribute\n\t * @internal\n\t * @param key Attribute key.\n\t * @param tokens Attribute value tokens to remove. The whole attribute is removed if not specified.\n\t * @returns Returns true if an attribute existed and has been removed.\n\t * @fires change\n\t */\n\tpublic _removeAttribute( key: string, tokens?: ArrayOrItem<string> ): boolean {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tif ( tokens !== undefined && ( usesStylesMap( this.name, key ) || usesTokenList( this.name, key ) ) ) {\n\t\t\tconst currentValue = this._attrs.get( key ) as ViewElementAttributeValue | undefined;\n\n\t\t\tif ( !currentValue ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( usesTokenList( this.name, key ) && typeof tokens == 'string' ) {\n\t\t\t\ttokens = tokens.split( /\\s+/ );\n\t\t\t}\n\n\t\t\tcurrentValue.remove( tokens );\n\n\t\t\tif ( currentValue.isEmpty ) {\n\t\t\t\treturn this._attrs.delete( key );\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._attrs.delete( key );\n\t}\n\n\t/**\n\t * Adds specified class.\n\t *\n\t * ```ts\n\t * element._addClass( 'foo' ); // Adds 'foo' class.\n\t * element._addClass( [ 'foo', 'bar' ] ); // Adds 'foo' and 'bar' classes.\n\t * ```\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#addClass\n\t * @internal\n\t * @fires change\n\t */\n\tpublic _addClass( className: ArrayOrItem<string> ): void {\n\t\tthis._setAttribute( 'class', className, false );\n\t}\n\n\t/**\n\t * Removes specified class.\n\t *\n\t * ```ts\n\t * element._removeClass( 'foo' );  // Removes 'foo' class.\n\t * element._removeClass( [ 'foo', 'bar' ] ); // Removes both 'foo' and 'bar' classes.\n\t * ```\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#removeClass\n\t * @internal\n\t * @fires change\n\t */\n\tpublic _removeClass( className: ArrayOrItem<string> ): void {\n\t\tthis._removeAttribute( 'class', className );\n\t}\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t * ```ts\n\t * element._setStyle( 'color', 'red' );\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#setStyle\n\t * @label KEY_VALUE\n\t * @internal\n\t * @param property Property name.\n\t * @param value Value to set.\n\t * @fires change\n\t */\n\tpublic _setStyle( property: string, value: StyleValue ): void;\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t * ```ts\n\t * element._setStyle( {\n\t * \tcolor: 'red',\n\t * \tposition: 'fixed'\n\t * } );\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#setStyle\n\t * @label OBJECT\n\t * @internal\n\t * @param properties Object with key - value pairs.\n\t * @fires change\n\t */\n\tpublic _setStyle( properties: Record<string, StyleValue> ): void;\n\n\tpublic _setStyle( property: string | Record<string, StyleValue>, value?: StyleValue ): void {\n\t\tif ( typeof property != 'string' ) {\n\t\t\tthis._setAttribute( 'style', property, false );\n\t\t} else {\n\t\t\tthis._setAttribute( 'style', [ property, value! ], false );\n\t\t}\n\t}\n\n\t/**\n\t * Removes specified style.\n\t *\n\t * ```ts\n\t * element._removeStyle( 'color' );  // Removes 'color' style.\n\t * element._removeStyle( [ 'color', 'border-top' ] ); // Removes both 'color' and 'border-top' styles.\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#removeStyle\n\t * @internal\n\t * @fires change\n\t */\n\tpublic _removeStyle( property: ArrayOrItem<string> ): void {\n\t\tthis._removeAttribute( 'style', property );\n\t}\n\n\t/**\n\t * Used by the {@link module:engine/view/matcher~Matcher Matcher} to collect matching attribute tuples\n\t * (attribute name and optional token).\n\t *\n\t * Normalized patterns can be used in following ways:\n\t * - to match any attribute name with any or no value:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ true, true ]\n\t * ]\n\t * ```\n\t *\n\t * - to match a specific attribute with any value:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ 'required', true ]\n\t * ]\n\t * ```\n\t *\n\t * - to match an attribute name with a RegExp with any value:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ /h[1-6]/, true ]\n\t * ]\n\t * ```\n\t *\n\t * \t- to match a specific attribute with the exact value:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ 'rel', 'nofollow' ]\n\t * ]\n\t * ```\n\t *\n\t * \t- to match a specific attribute with a value matching a RegExp:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ 'src', /^https/ ]\n\t * ]\n\t * ```\n\t *\n\t * \t- to match an attribute name with a RegExp and the exact value:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ /^data-property-/, 'foobar' ],\n\t * ]\n\t * ```\n\t *\n\t * \t- to match an attribute name with a RegExp and match a value with another RegExp:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ /^data-property-/, /^foo/ ]\n\t * ]\n\t * ```\n\t *\n\t * \t- to match a specific style property with the value matching a RegExp:\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ 'style', 'font-size', /px$/ ]\n\t * ]\n\t * ```\n\t *\n\t * \t- to match a specific class (class attribute is tokenized so it matches tokens individually):\n\t *\n\t * ```ts\n\t * patterns: [\n\t * \t[ 'class', 'foo' ]\n\t * ]\n\t * ```\n\t *\n\t * @internal\n\t * @param patterns An array of normalized patterns (tuples of 2 or 3 items depending on if tokenized attribute value match is needed).\n\t * @param match An array to populate with matching tuples.\n\t * @param exclude Array of attribute names to exclude from match.\n\t * @returns `true` if element matches all patterns. The matching tuples are pushed to the `match` array.\n\t */\n\tpublic _collectAttributesMatch(\n\t\tpatterns: Array<NormalizedPropertyPattern>,\n\t\tmatch: Array<[ string, string? ]>,\n\t\texclude?: Array<string>\n\t): boolean {\n\t\tfor ( const [ keyPattern, tokenPattern, valuePattern ] of patterns ) {\n\t\t\tlet hasKey = false;\n\t\t\tlet hasValue = false;\n\n\t\t\tfor ( const [ key, value ] of this._attrs ) {\n\t\t\t\tif ( exclude && exclude.includes( key ) || !isPatternMatched( keyPattern, key ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\thasKey = true;\n\n\t\t\t\tif ( typeof value == 'string' ) {\n\t\t\t\t\tif ( isPatternMatched( tokenPattern, value ) ) {\n\t\t\t\t\t\tmatch.push( [ key ] );\n\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( !( keyPattern instanceof RegExp ) ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst tokenMatch = value._getTokensMatch( tokenPattern, valuePattern || true );\n\n\t\t\t\t\tif ( tokenMatch ) {\n\t\t\t\t\t\thasValue = true;\n\n\t\t\t\t\t\tfor ( const tokenMatchItem of tokenMatch ) {\n\t\t\t\t\t\t\tmatch.push( [ key, tokenMatchItem ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( !( keyPattern instanceof RegExp ) ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !hasKey || !hasValue ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Used by the {@link module:engine/conversion/viewconsumable~ViewConsumable} to collect the\n\t * {@link module:engine/view/element~ViewNormalizedConsumables} for the element.\n\t *\n\t * When `key` and `token` parameters are provided the output is filtered for the specified attribute and it's tokens and related tokens.\n\t *\n\t * @internal\n\t * @param key Attribute name.\n\t * @param token Reference token to collect all related tokens.\n\t */\n\tpublic _getConsumables( key?: string, token?: string ): ViewNormalizedConsumables {\n\t\tconst attributes: Array<[string, string?]> = [];\n\n\t\tif ( key ) {\n\t\t\tconst value = this._attrs.get( key );\n\n\t\t\tif ( value !== undefined ) {\n\t\t\t\tif ( typeof value == 'string' ) {\n\t\t\t\t\tattributes.push( [ key ] );\n\t\t\t\t} else {\n\t\t\t\t\tfor ( const prop of value._getConsumables( token ) ) {\n\t\t\t\t\t\tattributes.push( [ key, prop ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( const [ key, value ] of this._attrs ) {\n\t\t\t\tif ( typeof value == 'string' ) {\n\t\t\t\t\tattributes.push( [ key ] );\n\t\t\t\t} else {\n\t\t\t\t\tfor ( const prop of value._getConsumables() ) {\n\t\t\t\t\t\tattributes.push( [ key, prop ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tname: !key,\n\t\t\tattributes\n\t\t};\n\t}\n\n\t/**\n\t * Verify if the given element can be merged without conflicts into the element.\n\t *\n\t * Note that this method is extended by the {@link module:engine/view/attributeelement~ViewAttributeElement} implementation.\n\t *\n\t * This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t *\n\t * @internal\n\t * @returns Returns `true` if elements can be merged.\n\t */\n\tpublic _canMergeAttributesFrom( otherElement: ViewElement ): boolean {\n\t\tif ( this.name != otherElement.name ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const [ key, otherValue ] of otherElement._attrs ) {\n\t\t\tconst value = this._attrs.get( key );\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( typeof value == 'string' || typeof otherValue == 'string' ) {\n\t\t\t\tif ( value !== otherValue ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( !value._canMergeFrom( otherValue ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Merges attributes of a given element into the element.\n\t * This includes also tokenized attributes like style and class.\n\t *\n\t * Note that you should make sure there are no conflicts before merging (see {@link #_canMergeAttributesFrom}).\n\t *\n\t * This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t *\n\t * @internal\n\t */\n\tpublic _mergeAttributesFrom( otherElement: ViewElement ): void {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\t// Move all attributes/classes/styles from wrapper to wrapped ViewAttributeElement.\n\t\tfor ( const [ key, otherValue ] of otherElement._attrs ) {\n\t\t\tconst value = this._attrs.get( key );\n\n\t\t\tif ( value === undefined || typeof value == 'string' || typeof otherValue == 'string' ) {\n\t\t\t\tthis._setAttribute( key, otherValue );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue._mergeFrom( otherValue );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Verify if the given element attributes can be fully subtracted from the element.\n\t *\n\t * Note that this method is extended by the {@link module:engine/view/attributeelement~ViewAttributeElement} implementation.\n\t *\n\t * This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t *\n\t * @internal\n\t * @returns Returns `true` if elements attributes can be fully subtracted.\n\t */\n\tpublic _canSubtractAttributesOf( otherElement: ViewElement ): boolean {\n\t\tif ( this.name != otherElement.name ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const [ key, otherValue ] of otherElement._attrs ) {\n\t\t\tconst value = this._attrs.get( key );\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( typeof value == 'string' || typeof otherValue == 'string' ) {\n\t\t\t\tif ( value !== otherValue ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( !value._isMatching( otherValue ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Removes (subtracts) corresponding attributes of the given element from the element.\n\t * This includes also tokenized attributes like style and class.\n\t * All attributes, classes and styles from given element should be present inside the element being unwrapped.\n\t *\n\t * Note that you should make sure all attributes could be subtracted before subtracting them (see {@link #_canSubtractAttributesOf}).\n\t *\n\t * This method is used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t *\n\t * @internal\n\t */\n\tpublic _subtractAttributesOf( otherElement: ViewElement ): void {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tfor ( const [ key, otherValue ] of otherElement._attrs ) {\n\t\t\tconst value = this._attrs.get( key )!;\n\n\t\t\tif ( typeof value == 'string' || typeof otherValue == 'string' ) {\n\t\t\t\tthis._attrs.delete( key );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue.remove( otherValue.keys() );\n\n\t\t\t\tif ( value.isEmpty ) {\n\t\t\t\t\tthis._attrs.delete( key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets a custom property. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#setCustomProperty\n\t * @internal\n\t */\n\tpublic _setCustomProperty( key: string | symbol, value: unknown ): void {\n\t\tthis._customProperties.set( key, value );\n\t}\n\n\t/**\n\t * Removes the custom property stored under the given key.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#removeCustomProperty\n\t * @internal\n\t * @returns Returns true if property was removed.\n\t */\n\tpublic _removeCustomProperty( key: string | symbol ): boolean {\n\t\treturn this._customProperties.delete( key );\n\t}\n\n\t/**\n\t * Parses attributes provided to the element constructor before they are applied to an element. If attributes are passed\n\t * as an object (instead of `Iterable`), the object is transformed to the map. Attributes with `null` value are removed.\n\t * Attributes with non-`String` value are converted to `String`.\n\t *\n\t * @param attrs Attributes to parse.\n\t * @returns Parsed attributes.\n\t */\n\tprivate _parseAttributes( attrs?: ViewElementAttributes ) {\n\t\tconst attrsMap = toMap( attrs );\n\n\t\tfor ( const [ key, value ] of attrsMap ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tattrsMap.delete( key );\n\t\t\t}\n\t\t\telse if ( usesStylesMap( this.name, key ) ) {\n\t\t\t\t// This is either an element clone so we need to clone styles map, or a new instance which requires value to be parsed.\n\t\t\t\tconst newValue = value instanceof StylesMap ?\n\t\t\t\t\tvalue._clone() :\n\t\t\t\t\tnew StylesMap( this.document.stylesProcessor ).setTo( String( value ) );\n\n\t\t\t\tattrsMap.set( key, newValue );\n\t\t\t}\n\t\t\telse if ( usesTokenList( this.name, key ) ) {\n\t\t\t\t// This is either an element clone so we need to clone token list, or a new instance which requires value to be parsed.\n\t\t\t\tconst newValue = value instanceof ViewTokenList ?\n\t\t\t\t\tvalue._clone() :\n\t\t\t\t\tnew ViewTokenList().setTo( String( value ) );\n\n\t\t\t\tattrsMap.set( key, newValue );\n\t\t\t}\n\t\t\telse if ( typeof value != 'string' ) {\n\t\t\t\tattrsMap.set( key, String( value ) );\n\t\t\t}\n\t\t}\n\n\t\treturn attrsMap as Map<string, string | ViewElementAttributeValue>;\n\t}\n\n\t/**\n\t * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n\t */\n\tpublic getFillerOffset?(): number | null;\n\n\t// @if CK_DEBUG_ENGINE // public printTree( level = 0 ): string {\n\t// @if CK_DEBUG_ENGINE // \tlet string = '';\n\n\t// @if CK_DEBUG_ENGINE // \tstring += '\\t'.repeat( level ) + `<${ this.name }${ convertMapToTags( this.getAttributes() ) }>`;\n\n\t// @if CK_DEBUG_ENGINE // \tfor ( const child of this.getChildren() as any ) {\n\t// @if CK_DEBUG_ENGINE // \t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += '\\n' + '\\t'.repeat( level + 1 ) + child.data;\n\t// @if CK_DEBUG_ENGINE // \t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += '\\n' + child.printTree( level + 1 );\n\t// @if CK_DEBUG_ENGINE // \t\t}\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tif ( this.childCount ) {\n\t// @if CK_DEBUG_ENGINE // \t\tstring += '\\n' + '\\t'.repeat( level );\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tstring += `</${ this.name }>`;\n\n\t// @if CK_DEBUG_ENGINE // \treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logTree(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewElement.prototype.is = function( this: ViewElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'element' || type === 'view:element' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && ( type === 'element' || type === 'view:element' );\n\t}\n} as any;\n\n/**\n * Common interface for a {@link module:engine/view/tokenlist~ViewTokenList} and {@link module:engine/view/stylesmap~StylesMap}.\n */\nexport interface ViewElementAttributeValue {\n\n\t/**\n\t * Returns `true` if attribute has no value set.\n\t */\n\tget isEmpty(): boolean;\n\n\t/**\n\t * Number of tokens (styles, classes or other tokens) defined.\n\t */\n\tget size(): number;\n\n\t/**\n\t * Checks if a given token (style, class, token) is set.\n\t */\n\thas( name: string ): boolean;\n\n\t/**\n\t * Returns all tokens (styles, classes, other tokens).\n\t */\n\tkeys(): Array<string>;\n\n\t/**\n\t * Resets the value to the given one.\n\t */\n\tsetTo( value: string ): this;\n\n\t/**\n\t * Sets a given style property and value.\n\t */\n\tset( name: string, value: StyleValue ): void;\n\n\t/**\n\t * Sets a given token (for style also a record of properties).\n\t */\n\tset( stylesOrTokens: Styles | ArrayOrItem<string> ): void;\n\n\t/**\n\t * Removes given token (style, class, other token).\n\t */\n\tremove( tokens: ArrayOrItem<string> ): void;\n\n\t/**\n\t * Removes all tokens.\n\t */\n\tclear(): void;\n\n\t/**\n\t * Returns a normalized tokens string (styles, classes, etc.).\n\t */\n\ttoString(): string;\n\n\t/**\n\t * Returns `true` if both attributes have the same content.\n\t */\n\tisSimilar( other: this ): boolean;\n\n\t/**\n\t * Clones the attribute value.\n\t */\n\t_clone(): this;\n\n\t/**\n\t * Used by the {@link module:engine/view/matcher~Matcher Matcher} to collect matching attribute tokens.\n\t *\n\t * @param tokenPattern The matched token name pattern.\n\t * @param valuePattern The matched token value pattern.\n\t * @returns An array of matching tokens.\n\t */\n\t_getTokensMatch(\n\t\ttokenPattern: true | string | RegExp,\n\t\tvaluePattern?: true | string | RegExp\n\t): Array<string> | undefined;\n\n\t/**\n\t * Returns a list of consumables for the attribute. This includes related tokens\n\t * (for example other forms of notation of the same style property).\n\t *\n\t * Could be filtered by the given token name (class name, style property, etc.).\n\t */\n\t_getConsumables( name?: string ): Array<string>;\n\n\t/**\n\t * Used by {@link ~ViewElement#_canMergeAttributesFrom} to verify if the given attribute can be merged without\n\t * conflicts into the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t */\n\t_canMergeFrom( other: this ): boolean;\n\n\t/**\n\t * Used by {@link ~ViewElement#_mergeAttributesFrom} to merge a given attribute into the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to merge it with other ViewAttributeElement.\n\t */\n\t_mergeFrom( other: this ): void;\n\n\t/**\n\t * Used by {@link ~ViewElement#_canSubtractAttributesOf} to verify if the given attribute can be fully subtracted from the attribute.\n\t *\n\t * This method is indirectly used by the {@link module:engine/view/downcastwriter~ViewDowncastWriter} while down-casting\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement} to unwrap the ViewAttributeElement.\n\t */\n\t_isMatching( other: this ): boolean;\n}\n\n/**\n * Collection of attributes.\n */\nexport type ViewElementAttributes = Record<string, unknown> | Iterable<[ string, unknown ]> | null;\n\n/**\n * Object describing all features of a view element that could be consumed and converted individually.\n * This is a normalized form of {@link module:engine/conversion/viewconsumable~Consumables} generated from the view Element.\n *\n * Example element:\n *\n * ```html\n * <a class=\"foo bar\" style=\"color: red; margin: 5px\" href=\"https://ckeditor.com\" rel=\"nofollow noreferrer\" target=\"_blank\">\n * ```\n *\n * The `ViewNormalizedConsumables` would include:\n *\n * ```json\n * {\n * \tname: true,\n * \tattributes: [\n * \t\t[ \"class\", \"foo\" ],\n * \t\t[ \"class\", \"bar\" ],\n * \t\t[ \"style\", \"color\" ],\n * \t\t[ \"style\", \"margin-top\" ],\n * \t\t[ \"style\", \"margin-right\" ],\n * \t\t[ \"style\", \"margin-bottom\" ],\n * \t\t[ \"style\", \"margin-left\" ],\n\t\t[ \"style\", \"margin\" ],\n * \t\t[ \"href\" ],\n * \t\t[ \"rel\", \"nofollow\" ],\n * \t\t[ \"rel\", \"noreferrer\" ],\n * \t\t[ \"target\" ]\n * \t]\n * }\n * ```\n */\nexport interface ViewNormalizedConsumables {\n\n\t/**\n\t * If set to `true` element's name will be included in a consumable.\n\t * Depending on the usage context it would be added as consumable, tested for being available for consume or consumed.\n\t */\n\tname: boolean;\n\n\t/**\n\t * Array of tuples - an attribute name, and optional token for tokenized attributes.\n\t * Note that there could be multiple entries for the same attribute with different tokens (class names or style properties).\n\t */\n\tattributes: Array<[string, string?]>;\n}\n\n/**\n * Converts strings to Text and non-iterables to arrays.\n */\nfunction normalize( document: ViewDocument, nodes: string | ViewItem | Iterable<string | ViewItem> ): Array<ViewNode> {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new ViewText( document, nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\tconst normalizedNodes: Array<ViewNode> = [];\n\n\tfor ( const node of nodes ) {\n\t\tif ( typeof node == 'string' ) {\n\t\t\tnormalizedNodes.push( new ViewText( document, node ) );\n\t\t} else if ( node instanceof ViewTextProxy ) {\n\t\t\tnormalizedNodes.push( new ViewText( document, node.data ) );\n\t\t} else {\n\t\t\tnormalizedNodes.push( node );\n\t\t}\n\t}\n\n\treturn normalizedNodes;\n}\n\n/**\n * Returns `true` if an attribute on a given element should be handled as a TokenList.\n */\nfunction usesTokenList( elementName: string, key: string ): boolean {\n\treturn key == 'class' || elementName == 'a' && key == 'rel';\n}\n\n/**\n * Returns `true` if an attribute on a given element should be handled as a StylesMap.\n */\nfunction usesStylesMap( elementName: string, key: string ): boolean {\n\treturn key == 'style';\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/**\n * @module engine/view/containerelement\n */\n\nimport { ViewElement, type ViewElementAttributes } from './element.js';\nimport { type ViewDocument } from './document.js';\nimport { type ViewNode } from './node.js';\n\n/**\n * Containers are elements which define document structure. They define boundaries for\n * {@link module:engine/view/attributeelement~ViewAttributeElement attributes}.\n * They are mostly used for block elements like `<p>` or `<div>`.\n *\n * Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n * types (container element, {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n * {@link module:engine/view/emptyelement~ViewEmptyElement empty element}, etc) when developing a feature.\n *\n * The container element should be your default choice when writing a converter, unless:\n *\n * * this element represents a model text attribute (then use {@link module:engine/view/attributeelement~ViewAttributeElement}),\n * * this is an empty element like `<img>` (then use {@link module:engine/view/emptyelement~ViewEmptyElement}),\n * * this is a root element,\n * * this is a nested editable element (then use  {@link module:engine/view/editableelement~ViewEditableElement}).\n *\n * To create a new container element instance use the\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement `ViewDowncastWriter#createContainerElement()`}\n * method.\n */\nexport class ViewContainerElement extends ViewElement {\n\t/**\n\t * Creates a container element.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement\n\t * @see module:engine/view/element~ViewElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string,\n\t\tattrs?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t) {\n\t\tsuper( document, name, attrs, children );\n\n\t\tthis.getFillerOffset = getViewFillerOffset;\n\t}\n\n\t/**\n\t * Converts `ViewContainerElement` instance to plain object and returns it.\n\t *\n\t * @returns `ViewContainerElement` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.type = 'ContainerElement';\n\n\t\treturn json;\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewContainerElement.prototype.is = function( this: ViewContainerElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && (\n\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'element' || type === 'view:element'\n\t\t);\n\t}\n} as any;\n\n/**\n * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n *\n * @returns Block filler offset or `null` if block filler is not needed.\n */\nexport function getViewFillerOffset( this: ViewContainerElement ): number | null {\n\tconst children = [ ...this.getChildren() ];\n\tlet lastChild: ViewNode | undefined = children[ this.childCount - 1 ];\n\n\t// Block filler is required after a `<br>` if it's the last element in its container.\n\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1422.\n\tif ( lastChild && lastChild.is( 'element', 'br' ) ) {\n\t\treturn this.childCount;\n\t}\n\n\t// Check if there is a `<br>` inside an attribute element at the end of container.\n\twhile ( lastChild && lastChild.is( 'attributeElement' ) ) {\n\t\tlastChild = lastChild.getChild( lastChild.childCount - 1 );\n\n\t\tif ( lastChild && lastChild.is( 'element', 'br' ) ) {\n\t\t\treturn this.childCount;\n\t\t}\n\t}\n\n\tfor ( const child of children ) {\n\t\t// If there's any non-UI element – don't render the bogus.\n\t\tif ( !child.is( 'uiElement' ) ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t// If there are only UI elements – render the bogus at the end of the element.\n\treturn this.childCount;\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/**\n * @module engine/view/editableelement\n */\n\nimport { ViewContainerElement } from './containerelement.js';\nimport { ObservableMixin, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\nimport type { ViewSelectionChangeEvent } from './selection.js';\nimport type { ViewElementAttributes } from './element.js';\nimport { type ViewDocument } from './document.js';\nimport { type ViewNode } from './node.js';\n\nconst ViewEditableElementBase: ObservableMixinConstructor<typeof ViewContainerElement> =\n\t/* #__PURE__ */ ObservableMixin( ViewContainerElement );\n\n/**\n * Editable element which can be a {@link module:engine/view/rooteditableelement~ViewRootEditableElement root}\n * or nested editable area in the editor.\n *\n * Editable is automatically read-only when its {@link module:engine/view/document~ViewDocument Document} is read-only.\n *\n * The constructor of this class shouldn't be used directly. To create new `ViewEditableElement` use the\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEditableElement `downcastWriter#createEditableElement()`} method.\n */\nexport class ViewEditableElement extends ViewEditableElementBase {\n\t/**\n\t * Whether the editable is in read-write or read-only mode.\n\t *\n\t * @observable\n\t */\n\tdeclare public isReadOnly: boolean;\n\n\t/**\n\t * Whether the editable is focused.\n\t *\n\t * This property updates when {@link module:engine/view/document~ViewDocument#isFocused document.isFocused} or view\n\t * selection is changed.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isFocused: boolean;\n\n\t/**\n\t * Placeholder of editable element.\n\t *\n\t * ```ts\n\t * editor.editing.view.document.getRoot( 'main' ).placeholder = 'New placeholder';\n\t * ```\n\t *\n\t * @observable\n\t */\n\tdeclare public placeholder?: string;\n\n\t/**\n\t * Creates an editable element.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#createEditableElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attributes Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t) {\n\t\tsuper( document, name, attributes, children );\n\n\t\tthis.set( 'isReadOnly', false );\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'placeholder', undefined );\n\n\t\tthis.bind( 'isReadOnly' ).to( document );\n\n\t\tthis.bind( 'isFocused' ).to(\n\t\t\tdocument,\n\t\t\t'isFocused',\n\t\t\tisFocused => isFocused && document.selection.editableElement == this\n\t\t);\n\n\t\t// Update focus state based on selection changes.\n\t\tthis.listenTo<ViewSelectionChangeEvent>( document.selection, 'change', () => {\n\t\t\tthis.isFocused = document.isFocused && document.selection.editableElement == this;\n\t\t} );\n\t}\n\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Converts `ViewEditableElement` instance to plain object and returns it.\n\t *\n\t * @returns `ViewEditableElement` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.type = 'EditableElement';\n\t\tjson.isReadOnly = this.isReadOnly;\n\t\tjson.isFocused = this.isFocused;\n\n\t\treturn json;\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewEditableElement.prototype.is = function( this: ViewEditableElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'editableElement' || type === 'view:editableElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && (\n\t\t\ttype === 'editableElement' || type === 'view:editableElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\ttype === 'element' || type === 'view:element'\n\t\t);\n\t}\n} as any;\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/**\n * @module engine/view/rooteditableelement\n */\n\nimport { ViewEditableElement } from './editableelement.js';\n\nimport { type ViewDocument } from './document.js';\n\nconst rootNameSymbol = Symbol( 'rootName' );\n\n/**\n * Class representing a single root in the data view. A root can be either\n * {@link ~ViewRootEditableElement#isReadOnly editable or read-only},\n * but in both cases it is called \"an editable\". Roots can contain other {@link module:engine/view/editableelement~ViewEditableElement\n * editable elements} making them \"nested editables\".\n */\nexport class ViewRootEditableElement extends ViewEditableElement {\n\t/**\n\t * Creates root editable element.\n\t *\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string\n\t) {\n\t\tsuper( document, name );\n\n\t\tthis.rootName = 'main';\n\t}\n\n\t/**\n\t * Name of this root inside {@link module:engine/view/document~ViewDocument} that is an owner of this root. If no\n\t * other name is set, `main` name is used.\n\t *\n\t * @readonly\n\t */\n\tpublic get rootName(): string {\n\t\treturn this.getCustomProperty( rootNameSymbol ) as string;\n\t}\n\n\tpublic set rootName( rootName: string ) {\n\t\tthis._setCustomProperty( rootNameSymbol, rootName );\n\t}\n\n\t/**\n\t * Converts `ViewRootEditableElement` instance to string and returns it.\n\t *\n\t * @returns `ViewRootEditableElement` instance converted to string.\n\t */\n\tpublic override toJSON(): unknown {\n\t\treturn this.rootName;\n\t}\n\n\t/**\n\t * Overrides old element name and sets new one.\n\t * This is needed because view roots are created before they are attached to the DOM.\n\t * The name of the root element is temporary at this stage. It has to be changed when the\n\t * view root element is attached to the DOM element.\n\t *\n\t * @internal\n\t * @param name The new name of element.\n\t */\n\tpublic set _name( name: string ) {\n\t\t( this as any ).name = name;\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewRootEditableElement.prototype.is = function( this: ViewRootEditableElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'rootElement' || type === 'view:rootElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'editableElement' || type === 'view:editableElement' ||\n\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && (\n\t\t\ttype === 'rootElement' || type === 'view:rootElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'editableElement' || type === 'view:editableElement' ||\n\t\t\ttype === 'containerElement' || type === 'view:containerElement' ||\n\t\t\ttype === 'element' || type === 'view:element'\n\t\t);\n\t}\n} as any;\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/**\n * @module engine/view/treewalker\n */\n\nimport { type ViewElement } from './element.js';\nimport { type ViewText } from './text.js';\nimport { ViewTextProxy } from './textproxy.js';\nimport { ViewPosition } from './position.js';\nimport { type ViewItem } from './item.js';\nimport { type ViewDocumentFragment } from './documentfragment.js';\nimport { type ViewRange } from './range.js';\nimport { type ViewNode } from './node.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */\nexport class ViewTreeWalker implements IterableIterator<ViewTreeWalkerValue> {\n\t/**\n\t * Walking direction. Defaults `'forward'`.\n\t */\n\tpublic readonly direction: ViewTreeWalkerDirection;\n\n\t/**\n\t * Iterator boundaries.\n\t *\n\t * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t * on the start of boundary, then `{ done: true }` is returned.\n\t *\n\t * If boundaries are not defined they are set before first and after last child of the root node.\n\t */\n\tpublic readonly boundaries: ViewRange | null;\n\n\t/**\n\t * Flag indicating whether all characters from {@link module:engine/view/text~ViewText} should be returned as one\n\t * {@link module:engine/view/text~ViewText} or one by one as {@link module:engine/view/textproxy~ViewTextProxy}.\n\t */\n\tpublic readonly singleCharacters: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t * iterated node will not be returned along with `elementEnd` tag.\n\t */\n\tpublic readonly shallow: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should ignore `elementEnd` tags. If set to `true`, walker will not\n\t * return a parent node of the start position. Each {@link module:engine/view/element~ViewElement} will be returned once.\n\t * When set to `false` each element might be returned twice: for `'elementStart'` and `'elementEnd'`.\n\t */\n\tpublic readonly ignoreElementEnd: boolean;\n\n\t/**\n\t * Iterator position. If start position is not defined then position depends on {@link #direction}. If direction is\n\t * `'forward'` position starts form the beginning, when direction is `'backward'` position starts from the end.\n\t */\n\tprivate _position: ViewPosition;\n\n\t/**\n\t * Start boundary parent.\n\t */\n\tprivate readonly _boundaryStartParent: ViewNode | ViewDocumentFragment | null;\n\n\t/**\n\t * End boundary parent.\n\t */\n\tprivate readonly _boundaryEndParent: ViewNode | ViewDocumentFragment | null;\n\n\t/**\n\t * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t *\n\t * @param options Object with configuration.\n\t */\n\tconstructor( options: ViewTreeWalkerOptions = {} ) {\n\t\tif ( !options.boundaries && !options.startPosition ) {\n\t\t\t/**\n\t\t\t * Neither boundaries nor starting position have been defined.\n\t\t\t *\n\t\t\t * @error view-tree-walker-no-start-position\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-tree-walker-no-start-position',\n\t\t\t\tnull\n\t\t\t);\n\t\t}\n\n\t\tif ( options.direction && options.direction != 'forward' && options.direction != 'backward' ) {\n\t\t\t/**\n\t\t\t * Only `backward` and `forward` direction allowed.\n\t\t\t *\n\t\t\t * @error view-tree-walker-unknown-direction\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-tree-walker-unknown-direction', options.startPosition, { direction: options.direction } );\n\t\t}\n\n\t\tthis.boundaries = options.boundaries || null;\n\n\t\tif ( options.startPosition ) {\n\t\t\tthis._position = ViewPosition._createAt( options.startPosition );\n\t\t} else {\n\t\t\tthis._position = ViewPosition._createAt( options.boundaries![ options.direction == 'backward' ? 'end' : 'start' ] );\n\t\t}\n\n\t\tthis.direction = options.direction || 'forward';\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\t\tthis.shallow = !!options.shallow;\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\t}\n\n\t/**\n\t * Iterable interface.\n\t */\n\tpublic [ Symbol.iterator ](): IterableIterator<ViewTreeWalkerValue> {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Iterator position. If start position is not defined then position depends on {@link #direction}. If direction is\n\t * `'forward'` position starts form the beginning, when direction is `'backward'` position starts from the end.\n\t */\n\tpublic get position(): ViewPosition {\n\t\treturn this._position;\n\t}\n\n\t/**\n\t * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * walker.skip( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t * walker.skip( value => true ); // Move the position to the end: <p>{}foo</p> -> <p>foo</p>[]\n\t * walker.skip( value => false ); // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/view/treewalker~ViewTreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t */\n\tpublic skip( skip: ( value: ViewTreeWalkerValue ) => boolean ): void {\n\t\tlet nextResult: IteratorResult<ViewTreeWalkerValue>;\n\t\tlet prevPosition: ViewPosition;\n\n\t\tdo {\n\t\t\tprevPosition = this.position;\n\t\t\tnextResult = this.next();\n\t\t} while ( !nextResult.done && skip( nextResult.value ) );\n\n\t\tif ( !nextResult.done ) {\n\t\t\tthis._position = prevPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Moves tree walker {@link #position} to provided `position`. Tree walker will\n\t * continue traversing from that position.\n\t *\n\t * Note: in contrary to {@link ~ViewTreeWalker#skip}, this method does not iterate over the nodes along the way.\n\t * It simply sets the current tree walker position to a new one.\n\t * From the performance standpoint, it is better to use {@link ~ViewTreeWalker#jumpTo} rather than {@link ~ViewTreeWalker#skip}.\n\t *\n\t * If the provided position is before the start boundary, the position will be\n\t * set to the start boundary. If the provided position is after the end boundary,\n\t * the position will be set to the end boundary.\n\t * This is done to prevent the treewalker from traversing outside the boundaries.\n\t *\n\t * @param position Position to jump to.\n\t */\n\tpublic jumpTo( position: ViewPosition ): void {\n\t\tif ( this._boundaryStartParent && position.isBefore( this.boundaries!.start ) ) {\n\t\t\tposition = this.boundaries!.start;\n\t\t} else if ( this._boundaryEndParent && position.isAfter( this.boundaries!.end ) ) {\n\t\t\tposition = this.boundaries!.end;\n\t\t}\n\n\t\tthis._position = position.clone();\n\t}\n\n\t/**\n\t * Gets the next tree walker's value.\n\t *\n\t * @returns Object implementing iterator interface, returning\n\t * information about taken step.\n\t */\n\tpublic next(): IteratorResult<ViewTreeWalkerValue, undefined> {\n\t\tif ( this.direction == 'forward' ) {\n\t\t\treturn this._next();\n\t\t} else {\n\t\t\treturn this._previous();\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step forward in view. Moves the {@link #position} to the next position and returns the encountered value.\n\t */\n\tprivate _next(): IteratorResult<ViewTreeWalkerValue, undefined> {\n\t\tlet position = this.position.clone();\n\t\tconst previousPosition = this.position;\n\t\tconst parent = position.parent;\n\n\t\t// We are at the end of the root.\n\t\tif ( parent.parent === null && position.offset === ( parent as any ).childCount ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent === this._boundaryEndParent && position.offset == this.boundaries!.end.offset ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// Get node just after current position.\n\t\tlet node;\n\n\t\t// Text is a specific parent because it contains string instead of child nodes.\n\t\tif ( parent && parent.is( 'view:$text' ) ) {\n\t\t\tif ( position.isAtEnd ) {\n\t\t\t\t// Prevent returning \"elementEnd\" for Text node. Skip that value and return the next walker step.\n\t\t\t\tthis._position = ViewPosition._createAfter( parent );\n\n\t\t\t\treturn this._next();\n\t\t\t}\n\n\t\t\tnode = parent.data[ position.offset ];\n\t\t} else {\n\t\t\tnode = ( parent as ViewElement | ViewDocumentFragment ).getChild( position.offset );\n\t\t}\n\n\t\tif ( typeof node == 'string' ) {\n\t\t\tlet textLength;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\ttextLength = 1;\n\t\t\t} else {\n\t\t\t\t// Check if text stick out of walker range.\n\t\t\t\tconst endOffset = parent === this._boundaryEndParent ? this.boundaries!.end.offset : ( parent as ViewText ).data.length;\n\n\t\t\t\ttextLength = endOffset - position.offset;\n\t\t\t}\n\n\t\t\tconst textProxy = new ViewTextProxy( parent as ViewText, position.offset, textLength );\n\n\t\t\tposition.offset += textLength;\n\t\t\tthis._position = position;\n\n\t\t\treturn this._formatReturnValue( 'text', textProxy, previousPosition, position, textLength );\n\t\t}\n\n\t\tif ( node && node.is( 'view:element' ) ) {\n\t\t\tif ( !this.shallow ) {\n\t\t\t\tposition = new ViewPosition( node, 0 );\n\t\t\t} else {\n\t\t\t\t// We are past the walker boundaries.\n\t\t\t\tif ( this.boundaries && this.boundaries.end.isBefore( position ) ) {\n\t\t\t\t\treturn { done: true, value: undefined };\n\t\t\t\t}\n\n\t\t\t\tposition.offset++;\n\t\t\t}\n\n\t\t\tthis._position = position;\n\n\t\t\treturn this._formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t}\n\n\t\tif ( node && node.is( 'view:$text' ) ) {\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tposition = new ViewPosition( node, 0 );\n\t\t\t\tthis._position = position;\n\n\t\t\t\treturn this._next();\n\t\t\t}\n\n\t\t\tlet charactersCount = node.data.length;\n\t\t\tlet item;\n\n\t\t\t// If text stick out of walker range, we need to cut it and wrap in ViewTextProxy.\n\t\t\tif ( node == this._boundaryEndParent ) {\n\t\t\t\tcharactersCount = this.boundaries!.end.offset;\n\t\t\t\titem = new ViewTextProxy( node, 0, charactersCount );\n\t\t\t\tposition = ViewPosition._createAfter( item );\n\t\t\t} else {\n\t\t\t\titem = new ViewTextProxy( node, 0, node.data.length );\n\t\t\t\t// If not just keep moving forward.\n\t\t\t\tposition.offset++;\n\t\t\t}\n\n\t\t\tthis._position = position;\n\n\t\t\treturn this._formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t}\n\n\t\t// `node` is not set, we reached the end of current `parent`.\n\t\tposition = ViewPosition._createAfter( parent as any );\n\t\tthis._position = position;\n\n\t\tif ( this.ignoreElementEnd ) {\n\t\t\treturn this._next();\n\t\t}\n\n\t\treturn this._formatReturnValue( 'elementEnd', parent as any, previousPosition, position );\n\t}\n\n\t/**\n\t * Makes a step backward in view. Moves the {@link #position} to the previous position and returns the encountered value.\n\t */\n\tprivate _previous(): IteratorResult<ViewTreeWalkerValue, undefined> {\n\t\tlet position = this.position.clone();\n\t\tconst previousPosition = this.position;\n\t\tconst parent = position.parent;\n\n\t\t// We are at the beginning of the root.\n\t\tif ( parent.parent === null && position.offset === 0 ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent == this._boundaryStartParent && position.offset == this.boundaries!.start.offset ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// Get node just before current position.\n\t\tlet node;\n\n\t\t// Text {@link module:engine/view/text~ViewText} element is a specific parent because contains string instead of child nodes.\n\t\tif ( parent.is( 'view:$text' ) ) {\n\t\t\tif ( position.isAtStart ) {\n\t\t\t\t// Prevent returning \"elementStart\" for Text node. Skip that value and return the next walker step.\n\t\t\t\tthis._position = ViewPosition._createBefore( parent );\n\n\t\t\t\treturn this._previous();\n\t\t\t}\n\n\t\t\tnode = parent.data[ position.offset - 1 ];\n\t\t} else {\n\t\t\tnode = ( parent as ViewElement | ViewDocumentFragment ).getChild( position.offset - 1 );\n\t\t}\n\n\t\tif ( typeof node == 'string' ) {\n\t\t\tlet textLength;\n\n\t\t\tif ( !this.singleCharacters ) {\n\t\t\t\t// Check if text stick out of walker range.\n\t\t\t\tconst startOffset = parent === this._boundaryStartParent ? this.boundaries!.start.offset : 0;\n\n\t\t\t\ttextLength = position.offset - startOffset;\n\t\t\t} else {\n\t\t\t\ttextLength = 1;\n\t\t\t}\n\n\t\t\tposition.offset -= textLength;\n\n\t\t\tconst textProxy = new ViewTextProxy( parent as ViewText, position.offset, textLength );\n\n\t\t\tthis._position = position;\n\n\t\t\treturn this._formatReturnValue( 'text', textProxy, previousPosition, position, textLength );\n\t\t}\n\n\t\tif ( node && node.is( 'view:element' ) ) {\n\t\t\tif ( this.shallow ) {\n\t\t\t\tposition.offset--;\n\t\t\t\tthis._position = position;\n\n\t\t\t\treturn this._formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t\t}\n\n\t\t\tposition = new ViewPosition( node, node.childCount );\n\t\t\tthis._position = position;\n\n\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\treturn this._previous();\n\t\t\t}\n\n\t\t\treturn this._formatReturnValue( 'elementEnd', node, previousPosition, position );\n\t\t}\n\n\t\tif ( node && node.is( 'view:$text' ) ) {\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tposition = new ViewPosition( node, node.data.length );\n\t\t\t\tthis._position = position;\n\n\t\t\t\treturn this._previous();\n\t\t\t}\n\n\t\t\tlet charactersCount = node.data.length;\n\t\t\tlet item;\n\n\t\t\t// If text stick out of walker range, we need to cut it and wrap in ViewTextProxy.\n\t\t\tif ( node == this._boundaryStartParent ) {\n\t\t\t\tconst offset = this.boundaries!.start.offset;\n\n\t\t\t\titem = new ViewTextProxy( node, offset, node.data.length - offset );\n\t\t\t\tcharactersCount = item.data.length;\n\t\t\t\tposition = ViewPosition._createBefore( item );\n\t\t\t} else {\n\t\t\t\titem = new ViewTextProxy( node, 0, node.data.length );\n\t\t\t\t// If not just keep moving backward.\n\t\t\t\tposition.offset--;\n\t\t\t}\n\n\t\t\tthis._position = position;\n\n\t\t\treturn this._formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t}\n\n\t\t// `node` is not set, we reached the beginning of current `parent`.\n\t\tposition = ViewPosition._createBefore( parent as any );\n\t\tthis._position = position;\n\n\t\treturn this._formatReturnValue( 'elementStart', parent as ViewElement, previousPosition, position, 1 );\n\t}\n\n\t/**\n\t * Format returned data and adjust `previousPosition` and `nextPosition` if\n\t * reach the bound of the {@link module:engine/view/text~ViewText}.\n\t *\n\t * @param type Type of step.\n\t * @param item Item between old and new position.\n\t * @param previousPosition Previous position of iterator.\n\t * @param nextPosition Next position of iterator.\n\t * @param length Length of the item.\n\t */\n\tprivate _formatReturnValue(\n\t\ttype: ViewTreeWalkerValueType,\n\t\titem: ViewItem,\n\t\tpreviousPosition: ViewPosition,\n\t\tnextPosition: ViewPosition,\n\t\tlength?: number\n\t): IteratorYieldResult<ViewTreeWalkerValue> {\n\t\t// Text is a specific parent, because contains string instead of children.\n\t\t// Walker doesn't enter to the Text except situations when walker is iterating over every single character,\n\t\t// or the bound starts/ends inside the Text. So when the position is at the beginning or at the end of the Text\n\t\t// we move it just before or just after Text.\n\t\tif ( item.is( 'view:$textProxy' ) ) {\n\t\t\t// Position is at the end of Text.\n\t\t\tif ( item.offsetInText + item.data.length == item.textNode.data.length ) {\n\t\t\t\tif ( this.direction == 'forward' && !( this.boundaries && this.boundaries.end.isEqual( this.position ) ) ) {\n\t\t\t\t\tnextPosition = ViewPosition._createAfter( item.textNode );\n\t\t\t\t\t// When we change nextPosition of returned value we need also update walker current position.\n\t\t\t\t\tthis._position = nextPosition;\n\t\t\t\t} else {\n\t\t\t\t\tpreviousPosition = ViewPosition._createAfter( item.textNode );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Position is at the begining ot the text.\n\t\t\tif ( item.offsetInText === 0 ) {\n\t\t\t\tif ( this.direction == 'backward' && !( this.boundaries && this.boundaries.start.isEqual( this.position ) ) ) {\n\t\t\t\t\tnextPosition = ViewPosition._createBefore( item.textNode );\n\t\t\t\t\t// When we change nextPosition of returned value we need also update walker current position.\n\t\t\t\t\tthis._position = nextPosition;\n\t\t\t\t} else {\n\t\t\t\t\tpreviousPosition = ViewPosition._createBefore( item.textNode );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tdone: false,\n\t\t\tvalue: {\n\t\t\t\ttype,\n\t\t\t\titem,\n\t\t\t\tpreviousPosition,\n\t\t\t\tnextPosition,\n\t\t\t\tlength\n\t\t\t}\n\t\t};\n\t}\n}\n\n/**\n * Type of the step made by {@link module:engine/view/treewalker~ViewTreeWalker}.\n * Possible values: `'elementStart'` if walker is at the beginning of a node, `'elementEnd'` if walker is at the end\n * of node, or `'text'` if walker traversed over single and multiple characters.\n * For {@link module:engine/view/text~ViewText} `elementStart` and `elementEnd` is not returned.\n */\nexport type ViewTreeWalkerValueType = 'elementStart' | 'elementEnd' | 'text';\n\n/**\n * Object returned by {@link module:engine/view/treewalker~ViewTreeWalker} when traversing tree view.\n */\nexport interface ViewTreeWalkerValue {\n\n\t/**\n\t * Type of the step made by {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t */\n\ttype: ViewTreeWalkerValueType;\n\n\t/**\n\t * Item between the old and the new positions of the tree walker.\n\t */\n\titem: ViewItem;\n\n\t/**\n\t * Previous position of the iterator.\n\t * * Forward iteration: For `'elementEnd'` it is the last position inside the element. For all other types it is the\n\t * position before the item.\n\t * * Backward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n\t * the position after item.\n\t * * If the position is at the beginning or at the end of the {@link module:engine/view/text~ViewText} it is always moved from the\n\t * inside of the text to its parent just before or just after that text.\n\t */\n\tpreviousPosition: ViewPosition;\n\n\t/**\n\t * Next position of the iterator.\n\t * * Forward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n\t * the position after the item.\n\t * * Backward iteration: For `'elementEnd'` it is last position inside element. For all other types it is the position\n\t * before the item.\n\t * * If the position is at the beginning or at the end of the {@link module:engine/view/text~ViewText} it is always moved from the\n\t * inside of the text to its parent just before or just after that text.\n\t */\n\tnextPosition: ViewPosition;\n\n\t/**\n\t * Length of the item. For `'elementStart'` it is `1`. For `'text'` it is\n\t * the length of that text. For `'elementEnd'` it is `undefined`.\n\t */\n\tlength?: number;\n}\n\n/**\n * Tree walking direction.\n */\nexport type ViewTreeWalkerDirection = 'forward' | 'backward';\n\n/**\n * The configuration of {@link ~ViewTreeWalker}.\n */\nexport interface ViewTreeWalkerOptions {\n\n\t/**\n\t * Walking direction.\n\t *\n\t * @default 'forward'\n\t */\n\tdirection?: ViewTreeWalkerDirection;\n\n\t/**\n\t * Range to define boundaries of the iterator.\n\t */\n\tboundaries?: ViewRange | null;\n\n\t/**\n\t * Starting position.\n\t */\n\tstartPosition?: ViewPosition;\n\n\t/**\n\t * Flag indicating whether all characters from\n\t * {@link module:engine/view/text~ViewText} should be returned as one\n\t * {@link module:engine/view/text~ViewText} (`false`) or one by one as\n\t * {@link module:engine/view/textproxy~ViewTextProxy} (`true`).\n\t */\n\tsingleCharacters?: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should enter elements or not. If the\n\t * iterator is shallow child nodes of any iterated node will not be returned along with `elementEnd` tag.\n\t */\n\tshallow?: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should ignore `elementEnd`\n\t * tags. If the option is true walker will not return a parent node of start position. If this option is `true`\n\t * each {@link module:engine/view/element~ViewElement} will be returned once, while if the option is `false` they might be returned\n\t * twice: for `'elementStart'` and `'elementEnd'`.\n\t */\n\tignoreElementEnd?: boolean;\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/**\n * @module engine/view/position\n */\n\nimport { ViewTypeCheckable } from './typecheckable.js';\n\nimport { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';\n\nimport { ViewEditableElement } from './editableelement.js';\n\nimport { type ViewDocumentFragment } from './documentfragment.js';\nimport { type ViewElement } from './element.js';\nimport { type ViewItem } from './item.js';\nimport { type ViewNode } from './node.js';\nimport { ViewTreeWalker, type ViewTreeWalkerValue, type ViewTreeWalkerOptions } from './treewalker.js';\n\n/**\n * Position in the view tree. Position is represented by its parent node and an offset in this parent.\n *\n * In order to create a new position instance use the `createPosition*()` factory methods available in:\n *\n * * {@link module:engine/view/view~EditingView}\n * * {@link module:engine/view/downcastwriter~ViewDowncastWriter}\n * * {@link module:engine/view/upcastwriter~ViewUpcastWriter}\n */\nexport class ViewPosition extends ViewTypeCheckable {\n\t/**\n\t * Position parent.\n\t */\n\tpublic readonly parent: ViewNode | ViewDocumentFragment;\n\n\t/**\n\t * Position offset.\n\t */\n\tpublic offset: number;\n\n\t/**\n\t * Creates a position.\n\t *\n\t * @param parent Position parent.\n\t * @param offset Position offset.\n\t */\n\tconstructor( parent: ViewNode | ViewDocumentFragment, offset: number ) {\n\t\tsuper();\n\n\t\tthis.parent = parent;\n\t\tthis.offset = offset;\n\t}\n\n\t/**\n\t * Node directly after the position. Equals `null` when there is no node after position or position is located\n\t * inside text node.\n\t */\n\tpublic get nodeAfter(): ViewNode | null {\n\t\tif ( this.parent.is( '$text' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn ( this.parent as ViewElement ).getChild( this.offset ) || null;\n\t}\n\n\t/**\n\t * Node directly before the position. Equals `null` when there is no node before position or position is located\n\t * inside text node.\n\t */\n\tpublic get nodeBefore(): ViewNode | null {\n\t\tif ( this.parent.is( '$text' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn ( this.parent as ViewElement ).getChild( this.offset - 1 ) || null;\n\t}\n\n\t/**\n\t * Is `true` if position is at the beginning of its {@link module:engine/view/position~ViewPosition#parent parent}, `false` otherwise.\n\t */\n\tpublic get isAtStart(): boolean {\n\t\treturn this.offset === 0;\n\t}\n\n\t/**\n\t * Is `true` if position is at the end of its {@link module:engine/view/position~ViewPosition#parent parent}, `false` otherwise.\n\t */\n\tpublic get isAtEnd(): boolean {\n\t\tconst endOffset = this.parent.is( '$text' ) ? this.parent.data.length : ( this.parent as any ).childCount;\n\n\t\treturn this.offset === endOffset;\n\t}\n\n\t/**\n\t * Position's root, that is the root of the position's parent element.\n\t */\n\tpublic get root(): ViewNode | ViewDocumentFragment {\n\t\treturn this.parent.root;\n\t}\n\n\t/**\n\t * {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement} instance that contains this position, or `null` if\n\t * position is not inside an editable element.\n\t */\n\tpublic get editableElement(): ViewEditableElement | null {\n\t\tlet editable = this.parent;\n\n\t\twhile ( !( editable instanceof ViewEditableElement ) ) {\n\t\t\tif ( editable.parent ) {\n\t\t\t\teditable = editable.parent;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn editable;\n\t}\n\n\t/**\n\t * Returns a new instance of Position with offset incremented by `shift` value.\n\t *\n\t * @param shift How position offset should get changed. Accepts negative values.\n\t * @returns Shifted position.\n\t */\n\tpublic getShiftedBy( shift: number ): ViewPosition {\n\t\tconst shifted = ViewPosition._createAt( this );\n\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\treturn shifted;\n\t}\n\n\t/**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * getLastMatchingPosition( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t * getLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } ); // <p>foo[]</p> -> <p>{}foo</p>\n\t * getLastMatchingPosition( value => false ); // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/view/treewalker~ViewTreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t * @returns The position after the last item which matches the `skip` callback test.\n\t */\n\tpublic getLastMatchingPosition( skip: ( value: ViewTreeWalkerValue ) => boolean, options: ViewTreeWalkerOptions = {} ): ViewPosition {\n\t\toptions.startPosition = this;\n\n\t\tconst treeWalker = new ViewTreeWalker( options );\n\t\ttreeWalker.skip( skip );\n\n\t\treturn treeWalker.position;\n\t}\n\n\t/**\n\t * Returns ancestors array of this position, that is this position's parent and it's ancestors.\n\t *\n\t * @returns Array with ancestors.\n\t */\n\tpublic getAncestors(): Array<ViewNode | ViewDocumentFragment> {\n\t\tif ( this.parent.is( 'documentFragment' ) ) {\n\t\t\treturn [ this.parent ];\n\t\t} else {\n\t\t\treturn this.parent.getAncestors( { includeSelf: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/node~ViewNode} or {@link module:engine/view/documentfragment~ViewDocumentFragment}\n\t * which is a common ancestor of both positions.\n\t */\n\tpublic getCommonAncestor( position: ViewPosition ): ViewNode | ViewDocumentFragment | null {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Checks whether this position equals given position.\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if positions are same.\n\t */\n\tpublic isEqual( otherPosition: ViewPosition ): boolean {\n\t\treturn ( this.parent == otherPosition.parent && this.offset == otherPosition.offset );\n\t}\n\n\t/**\n\t * Checks whether this position is located before given position. When method returns `false` it does not mean that\n\t * this position is after give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~ViewPosition#isAfter\n\t * @see module:engine/view/position~ViewPosition#compareWith\n\t * @param otherPosition Position to compare with.\n\t * @returns Returns `true` if this position is before given position.\n\t */\n\tpublic isBefore( otherPosition: ViewPosition ): boolean {\n\t\treturn this.compareWith( otherPosition ) == 'before';\n\t}\n\n\t/**\n\t * Checks whether this position is located after given position. When method returns `false` it does not mean that\n\t * this position is before give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~ViewPosition#isBefore\n\t * @see module:engine/view/position~ViewPosition#compareWith\n\t * @param otherPosition Position to compare with.\n\t * @returns Returns `true` if this position is after given position.\n\t */\n\tpublic isAfter( otherPosition: ViewPosition ): boolean {\n\t\treturn this.compareWith( otherPosition ) == 'after';\n\t}\n\n\t/**\n\t * Checks whether this position is before, after or in same position that other position. Two positions may be also\n\t * different when they are located in separate roots.\n\t *\n\t * @param otherPosition Position to compare with.\n\t */\n\tpublic compareWith( otherPosition: ViewPosition ): ViewPositionRelation {\n\t\tif ( this.root !== otherPosition.root ) {\n\t\t\treturn 'different';\n\t\t}\n\n\t\tif ( this.isEqual( otherPosition ) ) {\n\t\t\treturn 'same';\n\t\t}\n\n\t\t// Get path from root to position's parent element.\n\t\tconst thisPath = this.parent.is( 'node' ) ? this.parent.getPath() : [];\n\t\tconst otherPath = otherPosition.parent.is( 'node' ) ? otherPosition.parent.getPath() : [];\n\n\t\t// Add the positions' offsets to the parents offsets.\n\t\tthisPath.push( this.offset );\n\t\totherPath.push( otherPosition.offset );\n\n\t\t// Compare both path arrays to find common ancestor.\n\t\tconst result = compareArrays( thisPath, otherPath );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'prefix':\n\t\t\t\treturn 'before';\n\n\t\t\tcase 'extension':\n\t\t\t\treturn 'after';\n\n\t\t\tdefault:\n\t\t\t\t// Cast to number to avoid having 'same' as a type of `result`.\n\t\t\t\treturn thisPath[ result as number ] < otherPath[ result as number ] ? 'before' : 'after';\n\t\t}\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker} instance with this positions as a start position.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}\n\t */\n\tpublic getWalker( options: ViewTreeWalkerOptions = {} ): ViewTreeWalker {\n\t\toptions.startPosition = this;\n\n\t\treturn new ViewTreeWalker( options );\n\t}\n\n\t/**\n\t * Clones this position.\n\t */\n\tpublic clone(): ViewPosition {\n\t\treturn new ViewPosition( this.parent, this.offset );\n\t}\n\n\t/**\n\t * Converts `ViewPosition` instance to plain object and returns it.\n\t *\n\t * @returns `ViewPosition` instance converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn {\n\t\t\tparent: this.parent.toJSON(),\n\t\t\toffset: this.offset\n\t\t};\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~ViewPosition position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link module:engine/view/position~ViewPosition._createBefore},\n\t * * {@link module:engine/view/position~ViewPosition._createAfter}.\n\t *\n\t * @internal\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t */\n\tpublic static _createAt( itemOrPosition: ViewItem | ViewPosition, offset?: ViewPositionOffset ): ViewPosition {\n\t\tif ( itemOrPosition instanceof ViewPosition ) {\n\t\t\treturn new this( itemOrPosition.parent, itemOrPosition.offset );\n\t\t} else {\n\t\t\tconst node = itemOrPosition;\n\n\t\t\tif ( offset == 'end' ) {\n\t\t\t\toffset = node.is( '$text' ) ? node.data.length : ( node as any ).childCount;\n\t\t\t} else if ( offset == 'before' ) {\n\t\t\t\treturn this._createBefore( node );\n\t\t\t} else if ( offset == 'after' ) {\n\t\t\t\treturn this._createAfter( node );\n\t\t\t} else if ( offset !== 0 && !offset ) {\n\t\t\t\t/**\n\t\t\t\t * {@link module:engine/view/view~EditingView#createPositionAt `View#createPositionAt()`}\n\t\t\t\t * requires the offset to be specified when the first parameter is a view item.\n\t\t\t\t *\n\t\t\t\t * @error view-createpositionat-offset-required\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-createpositionat-offset-required', node );\n\t\t\t}\n\n\t\t\treturn new ViewPosition( node as any, offset as number );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @internal\n\t * @param item View item after which the position should be located.\n\t */\n\tpublic static _createAfter( item: ViewItem ): ViewPosition {\n\t\t// ViewTextProxy is not a instance of Node so we need do handle it in specific way.\n\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\treturn new ViewPosition( item.textNode, item.offsetInText + item.data.length );\n\t\t}\n\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You cannot make a position after a root.\n\t\t\t *\n\t\t\t * @error view-position-after-root\n\t\t\t * @param {module:engine/view/node~ViewNode} root A root item.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-position-after-root', item, { root: item } );\n\t\t}\n\n\t\treturn new ViewPosition( item.parent, ( item.index as number ) + 1 );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @internal\n\t * @param item View item before which the position should be located.\n\t */\n\tpublic static _createBefore( item: ViewItem ): ViewPosition {\n\t\t// ViewTextProxy is not a instance of Node so we need do handle it in specific way.\n\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\treturn new ViewPosition( item.textNode, item.offsetInText );\n\t\t}\n\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You cannot make a position before a root.\n\t\t\t *\n\t\t\t * @error view-position-before-root\n\t\t\t * @param {module:engine/view/node~ViewNode} root A root item.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-position-before-root', item, { root: item } );\n\t\t}\n\n\t\treturn new ViewPosition( item.parent, item.index as number );\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewPosition.prototype.is = function( type: string ): boolean {\n\treturn type === 'position' || type === 'view:position';\n} as any;\n\n/**\n * A flag indicating whether this position is `'before'` or `'after'` or `'same'` as given position.\n * If positions are in different roots `'different'` flag is returned.\n */\nexport type ViewPositionRelation = 'before' | 'after' | 'same' | 'different';\n\n/**\n * Offset or one of the flags.\n */\nexport type ViewPositionOffset = number | 'before' | 'after' | 'end';\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/**\n * @module engine/view/range\n */\n\nimport { ViewTypeCheckable } from './typecheckable.js';\nimport { ViewPosition } from './position.js';\n\nimport { type ViewDocumentFragment } from './documentfragment.js';\nimport { type ViewElement } from './element.js';\nimport { type ViewItem } from './item.js';\nimport { type ViewNode } from './node.js';\nimport { ViewTreeWalker, type ViewTreeWalkerValue, type ViewTreeWalkerOptions } from './treewalker.js';\n\n/**\n * Range in the view tree. A range is represented by its start and end {@link module:engine/view/position~ViewPosition positions}.\n *\n * In order to create a new position instance use the `createPosition*()` factory methods available in:\n *\n * * {@link module:engine/view/view~EditingView}\n * * {@link module:engine/view/downcastwriter~ViewDowncastWriter}\n * * {@link module:engine/view/upcastwriter~ViewUpcastWriter}\n */\nexport class ViewRange extends ViewTypeCheckable implements Iterable<ViewTreeWalkerValue> {\n\t/**\n\t * Start position.\n\t */\n\tpublic readonly start: ViewPosition;\n\n\t/**\n\t * End position.\n\t */\n\tpublic readonly end: ViewPosition;\n\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** Constructor creates it's own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at the `start` position.\n\t */\n\tconstructor( start: ViewPosition, end: ViewPosition | null = null ) {\n\t\tsuper();\n\n\t\tthis.start = start.clone();\n\t\tthis.end = end ? end.clone() : start.clone();\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link module:engine/view/item~ViewItem view items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/view/position~ViewPosition positions},\n\t * grouped as {@link module:engine/view/treewalker~ViewTreeWalkerValue}.\n\t *\n\t * This iterator uses {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker} with `boundaries` set to this range and\n\t * `ignoreElementEnd` option\n\t * set to `true`.\n\t */\n\tpublic* [ Symbol.iterator ](): IterableIterator<ViewTreeWalkerValue> {\n\t\tyield* new ViewTreeWalker( { boundaries: this, ignoreElementEnd: true } );\n\t}\n\n\t/**\n\t * Returns whether the range is collapsed, that is it start and end positions are equal.\n\t */\n\tpublic get isCollapsed(): boolean {\n\t\treturn this.start.isEqual( this.end );\n\t}\n\n\t/**\n\t * Returns whether this range is flat, that is if {@link module:engine/view/range~ViewRange#start start} position and\n\t * {@link module:engine/view/range~ViewRange#end end} position are in the same\n\t * {@link module:engine/view/position~ViewPosition#parent parent}.\n\t */\n\tpublic get isFlat(): boolean {\n\t\treturn this.start.parent === this.end.parent;\n\t}\n\n\t/**\n\t * Range root element.\n\t */\n\tpublic get root(): ViewNode | ViewDocumentFragment {\n\t\treturn this.start.root;\n\t}\n\n\t/**\n\t * Creates a maximal range that has the same content as this range but is expanded in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t * ```html\n\t * <p>Foo</p><p><b>{Bar}</b></p> -> <p>Foo</p>[<p><b>Bar</b>]</p>\n\t * <p><b>foo</b>{bar}<span></span></p> -> <p><b>foo[</b>bar<span></span>]</p>\n\t * ```\n\t *\n\t * Note that in the sample above:\n\t *\n\t * - `<p>` have type of {@link module:engine/view/containerelement~ViewContainerElement},\n\t * - `<b>` have type of {@link module:engine/view/attributeelement~ViewAttributeElement},\n\t * - `<span>` have type of {@link module:engine/view/uielement~ViewUIElement}.\n\t *\n\t * @returns Enlarged range.\n\t */\n\tpublic getEnlarged(): ViewRange {\n\t\tlet start = this.start.getLastMatchingPosition( enlargeTrimSkip, { direction: 'backward' } );\n\t\tlet end = this.end.getLastMatchingPosition( enlargeTrimSkip );\n\n\t\t// Fix positions, in case if they are in Text node.\n\t\tif ( start.parent.is( '$text' ) && start.isAtStart ) {\n\t\t\tstart = ViewPosition._createBefore( start.parent );\n\t\t}\n\n\t\tif ( end.parent.is( '$text' ) && end.isAtEnd ) {\n\t\t\tend = ViewPosition._createAfter( end.parent );\n\t\t}\n\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Creates a minimum range that has the same content as this range but is trimmed in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t * ```html\n\t * <p>Foo</p>[<p><b>Bar</b>]</p> -> <p>Foo</p><p><b>{Bar}</b></p>\n\t * <p><b>foo[</b>bar<span></span>]</p> -> <p><b>foo</b>{bar}<span></span></p>\n\t * ```\n\t *\n\t * Note that in the sample above:\n\t *\n\t * - `<p>` have type of {@link module:engine/view/containerelement~ViewContainerElement},\n\t * - `<b>` have type of {@link module:engine/view/attributeelement~ViewAttributeElement},\n\t * - `<span>` have type of {@link module:engine/view/uielement~ViewUIElement}.\n\t *\n\t * @returns Shrunk range.\n\t */\n\tpublic getTrimmed(): ViewRange {\n\t\tlet start = this.start.getLastMatchingPosition( enlargeTrimSkip );\n\n\t\tif ( start.isAfter( this.end ) || start.isEqual( this.end ) ) {\n\t\t\treturn new ViewRange( start, start );\n\t\t}\n\n\t\tlet end = this.end.getLastMatchingPosition( enlargeTrimSkip, { direction: 'backward' } );\n\t\tconst nodeAfterStart = start.nodeAfter;\n\t\tconst nodeBeforeEnd = end.nodeBefore;\n\n\t\t// Because TreeWalker prefers positions next to text node, we need to move them manually into these text nodes.\n\t\tif ( nodeAfterStart && nodeAfterStart.is( '$text' ) ) {\n\t\t\tstart = new ViewPosition( nodeAfterStart, 0 );\n\t\t}\n\n\t\tif ( nodeBeforeEnd && nodeBeforeEnd.is( '$text' ) ) {\n\t\t\tend = new ViewPosition( nodeBeforeEnd, nodeBeforeEnd.data.length );\n\t\t}\n\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Two ranges are equal if their start and end positions are equal.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns `true` if ranges are equal, `false` otherwise\n\t */\n\tpublic isEqual( otherRange: ViewRange ): boolean {\n\t\treturn this == otherRange || ( this.start.isEqual( otherRange.start ) && this.end.isEqual( otherRange.end ) );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/view/position~ViewPosition position}.\n\t *\n\t * @param position Position to check.\n\t * @returns `true` if given {@link module:engine/view/position~ViewPosition position} is contained in this range, `false` otherwise.\n\t */\n\tpublic containsPosition( position: ViewPosition ): boolean {\n\t\treturn position.isAfter( this.start ) && position.isBefore( this.end );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/view/range~ViewRange range}.\n\t *\n\t * @param otherRange Range to check.\n\t * @param loose Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t * start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t * even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t * @returns `true` if given {@link module:engine/view/range~ViewRange range} boundaries are contained by this range, `false`\n\t * otherwise.\n\t */\n\tpublic containsRange( otherRange: ViewRange, loose: boolean = false ): boolean {\n\t\tif ( otherRange.isCollapsed ) {\n\t\t\tloose = false;\n\t\t}\n\n\t\tconst containsStart = this.containsPosition( otherRange.start ) || ( loose && this.start.isEqual( otherRange.start ) );\n\t\tconst containsEnd = this.containsPosition( otherRange.end ) || ( loose && this.end.isEqual( otherRange.end ) );\n\n\t\treturn containsStart && containsEnd;\n\t}\n\n\t/**\n\t * Computes which part(s) of this {@link module:engine/view/range~ViewRange range} is not a part of given\n\t * {@link module:engine/view/range~ViewRange range}.\n\t * Returned array contains zero, one or two {@link module:engine/view/range~ViewRange ranges}.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let foo = downcastWriter.createText( 'foo' );\n\t * let img = downcastWriter.createContainerElement( 'img' );\n\t * let bar = downcastWriter.createText( 'bar' );\n\t * let p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t * let range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t * let otherRange = view.createRange( // \"oo\", img, \"ba\" are in range.\n\t * \tview.createPositionAt( foo, 1 ),\n\t * \tview.createPositionAt( bar, 2 )\n\t * );\n\t * let transformed = range.getDifference( otherRange );\n\t * // transformed array has no ranges because `otherRange` contains `range`\n\t *\n\t * otherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has one range: from ( p, 2 ) to ( bar, 1 )\n\t *\n\t * otherRange = view.createRange( view.createPositionAt( p, 1 ), view.createPositionAt( p, 2 ) ); // img is in range.\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has two ranges: from ( foo, 1 ) to ( p, 1 ) and from ( p, 2 ) to ( bar, 1 )\n\t * ```\n\t *\n\t * @param otherRange Range to differentiate against.\n\t * @returns The difference between ranges.\n\t */\n\tpublic getDifference( otherRange: ViewRange ): Array<ViewRange> {\n\t\tconst ranges: Array<ViewRange> = [];\n\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect.\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the start to the middle of this range.\n\t\t\t\tranges.push( new ViewRange( this.start, otherRange.start ) );\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the middle of this range to the end.\n\t\t\t\tranges.push( new ViewRange( otherRange.end, this.end ) );\n\t\t\t}\n\t\t} else {\n\t\t\t// Ranges do not intersect, return the original range.\n\t\t\tranges.push( this.clone() );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an intersection of this {@link module:engine/view/range~ViewRange range}\n\t * and given {@link module:engine/view/range~ViewRange range}.\n\t * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let foo = downcastWriter.createText( 'foo' );\n\t * let img = downcastWriter.createContainerElement( 'img' );\n\t * let bar = downcastWriter.createText( 'bar' );\n\t * let p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t * let range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t * let otherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t * let transformed = range.getIntersection( otherRange ); // range from ( foo, 1 ) to ( p, 2 ).\n\t *\n\t * otherRange = view.createRange( view.createPositionAt( bar, 1 ), view.createPositionAt( bar, 3 ); \"ar\" is in range.\n\t * transformed = range.getIntersection( otherRange ); // null - no common part.\n\t * ```\n\t *\n\t * @param otherRange Range to check for intersection.\n\t * @returns A common part of given ranges or `null` if ranges have no common part.\n\t */\n\tpublic getIntersection( otherRange: ViewRange ): ViewRange | null {\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect, so a common range will be returned.\n\t\t\t// At most, it will be same as this range.\n\t\t\tlet commonRangeStart = this.start;\n\t\t\tlet commonRangeEnd = this.end;\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means thaNt we have to\n\t\t\t\t// shrink common range to the given range start.\n\t\t\t\tcommonRangeStart = otherRange.start;\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// shrink common range to the given range end.\n\t\t\t\tcommonRangeEnd = otherRange.end;\n\t\t\t}\n\n\t\t\treturn new ViewRange( commonRangeStart, commonRangeEnd );\n\t\t}\n\n\t\t// Ranges do not intersect, so they do not have common part.\n\t\treturn null;\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/view/treewalker~ViewTreeWalker TreeWalker} instance with this range as a boundary.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t */\n\tpublic getWalker( options: ViewTreeWalkerOptions = {} ): ViewTreeWalker {\n\t\toptions.boundaries = this;\n\n\t\treturn new ViewTreeWalker( options );\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/node~ViewNode} or {@link module:engine/view/documentfragment~ViewDocumentFragment}\n\t * which is a common ancestor of range's both ends (in which the entire range is contained).\n\t */\n\tpublic getCommonAncestor(): ViewNode | ViewDocumentFragment | null {\n\t\treturn this.start.getCommonAncestor( this.end );\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/view/element~ViewElement Element} contained by the range.\n\t * The element will be returned when it is the **only** node within the range and **fully–contained**\n\t * at the same time.\n\t */\n\tpublic getContainedElement(): ViewElement | null {\n\t\tif ( this.isCollapsed ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet nodeAfterStart = this.start.nodeAfter;\n\t\tlet nodeBeforeEnd = this.end.nodeBefore;\n\n\t\t// Handle the situation when the range position is at the beginning / at the end of a text node.\n\t\t// In such situation `.nodeAfter` and `.nodeBefore` are `null` but the range still might be spanning\n\t\t// over one element.\n\t\t//\n\t\t// <p>Foo{<span class=\"widget\"></span>}bar</p> vs <p>Foo[<span class=\"widget\"></span>]bar</p>\n\t\t//\n\t\t// These are basically the same range, only the difference is if the range position is at\n\t\t// at the end/at the beginning of a text node or just before/just after the text node.\n\t\t//\n\t\tif ( this.start.parent.is( '$text' ) && this.start.isAtEnd && this.start.parent.nextSibling ) {\n\t\t\tnodeAfterStart = this.start.parent.nextSibling;\n\t\t}\n\n\t\tif ( this.end.parent.is( '$text' ) && this.end.isAtStart && this.end.parent.previousSibling ) {\n\t\t\tnodeBeforeEnd = this.end.parent.previousSibling;\n\t\t}\n\n\t\tif ( nodeAfterStart && nodeAfterStart.is( 'element' ) && nodeAfterStart === nodeBeforeEnd ) {\n\t\t\treturn nodeAfterStart;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Clones this range.\n\t */\n\tpublic clone(): ViewRange {\n\t\treturn new ViewRange( this.start, this.end );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/view/item~ViewItem view items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~ViewTreeWalker} with `boundaries` set to this range\n\t * and `ignoreElementEnd` option set to `true`. However it returns only {@link module:engine/view/item~ViewItem items},\n\t * not {@link module:engine/view/treewalker~ViewTreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~ViewTreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t */\n\tpublic* getItems( options: ViewTreeWalkerOptions = {} ): IterableIterator<ViewItem> {\n\t\toptions.boundaries = this;\n\t\toptions.ignoreElementEnd = true;\n\n\t\tconst treeWalker = new ViewTreeWalker( options );\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.item;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/view/position~ViewPosition positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~ViewTreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/view/position~ViewPosition positions}, not {@link module:engine/view/treewalker~ViewTreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~ViewTreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~ViewTreeWalker}.\n\t */\n\tpublic* getPositions( options: ViewTreeWalkerOptions = {} ): IterableIterator<ViewPosition> {\n\t\toptions.boundaries = this;\n\n\t\tconst treeWalker = new ViewTreeWalker( options );\n\n\t\tyield treeWalker.position;\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.nextPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Checks and returns whether this range intersects with the given range.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns True if ranges intersect.\n\t */\n\tpublic isIntersecting( otherRange: ViewRange ): boolean {\n\t\treturn this.start.isBefore( otherRange.end ) && this.end.isAfter( otherRange.start );\n\t}\n\n\t/**\n\t * Converts `ViewRange` instance to plain object and returns it.\n\t *\n\t * @returns `ViewRange` instance converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn {\n\t\t\tstart: this.start.toJSON(),\n\t\t\tend: this.end.toJSON()\n\t\t};\n\t}\n\n\t/**\n\t * Creates a range from the given parents and offsets.\n\t *\n\t * @internal\n\t * @param startElement Start position parent element.\n\t * @param startOffset Start position offset.\n\t * @param endElement End position parent element.\n\t * @param endOffset End position offset.\n\t * @returns Created range.\n\t */\n\tpublic static _createFromParentsAndOffsets(\n\t\tstartElement: ViewElement | ViewDocumentFragment,\n\t\tstartOffset: number,\n\t\tendElement: ViewElement | ViewDocumentFragment,\n\t\tendOffset: number\n\t): ViewRange {\n\t\treturn new this(\n\t\t\tnew ViewPosition( startElement, startOffset ),\n\t\t\tnew ViewPosition( endElement, endOffset )\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new range, spreading from specified {@link module:engine/view/position~ViewPosition position} to a position moved by\n\t * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t *\n\t * @internal\n\t * @param position Beginning of the range.\n\t * @param shift How long the range should be.\n\t */\n\tpublic static _createFromPositionAndShift( position: ViewPosition, shift: number ): ViewRange {\n\t\tconst start = position;\n\t\tconst end = position.getShiftedBy( shift );\n\n\t\treturn shift > 0 ? new this( start, end ) : new this( end, start );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @internal\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic static _createIn( element: ViewElement | ViewDocumentFragment ): ViewRange {\n\t\treturn this._createFromParentsAndOffsets( element, 0, element, element.childCount );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t *\n\t * @internal\n\t */\n\tpublic static _createOn( item: ViewItem ): ViewRange {\n\t\tconst size = item.is( '$textProxy' ) ? item.offsetSize : 1;\n\n\t\treturn this._createFromPositionAndShift( ViewPosition._createBefore( item ), size );\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewRange.prototype.is = function( type: string ): boolean {\n\treturn type === 'range' || type === 'view:range';\n} as any;\n\n/**\n * Function used by getEnlarged and getTrimmed methods.\n */\nfunction enlargeTrimSkip( value: ViewTreeWalkerValue ): boolean {\n\tif ( value.item.is( 'attributeElement' ) || value.item.is( 'uiElement' ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\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/**\n * @module engine/view/selection\n */\n\nimport { ViewTypeCheckable } from './typecheckable.js';\nimport { ViewRange } from './range.js';\nimport { ViewPosition, type ViewPositionOffset } from './position.js';\nimport { ViewNode } from './node.js';\nimport { ViewDocumentSelection } from './documentselection.js';\n\nimport {\n\tCKEditorError,\n\tEmitterMixin,\n\tcount,\n\tisIterable,\n\ttype EmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewElement } from './element.js';\nimport { type ViewItem } from './item.js';\nimport { type ViewEditableElement } from './editableelement.js';\n\nconst ViewSelectionBase: EmitterMixinConstructor<typeof ViewTypeCheckable> = /* #__PURE__ */ EmitterMixin( ViewTypeCheckable );\n\n/**\n * Class representing an arbirtary selection in the view.\n * See also {@link module:engine/view/documentselection~ViewDocumentSelection}.\n *\n * New selection instances can be created via the constructor or one these methods:\n *\n * * {@link module:engine/view/view~EditingView#createSelection `View#createSelection()`},\n * * {@link module:engine/view/upcastwriter~ViewUpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n *\n * A selection can consist of {@link module:engine/view/range~ViewRange ranges} that can be set by using\n * the {@link module:engine/view/selection~ViewSelection#setTo `Selection#setTo()`} method.\n */\nexport class ViewSelection extends ViewSelectionBase {\n\t/**\n\t * Stores all ranges that are selected.\n\t */\n\tprivate _ranges: Array<ViewRange>;\n\n\t/**\n\t * Specifies whether the last added range was added as a backward or forward range.\n\t */\n\tprivate _lastRangeBackward: boolean;\n\n\t/**\n\t * Specifies whether selection instance is fake.\n\t */\n\tprivate _isFake: boolean;\n\n\t/**\n\t * Fake selection's label.\n\t */\n\tprivate _fakeSelectionLabel: string;\n\n\t/**\n\t * Creates new selection instance.\n\t *\n\t * **Note**: The selection constructor is available as a factory method:\n\t *\n\t * * {@link module:engine/view/view~EditingView#createSelection `View#createSelection()`},\n\t * * {@link module:engine/view/upcastwriter~ViewUpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = writer.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = writer.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * const selection = writer.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = writer.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the document selection.\n\t * const selection = writer.createSelection( editor.editing.view.document.selection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * const selection = writer.createSelection( position );\n\t *\n\t * // Creates collapsed selection at the position of given item and offset.\n\t * const paragraph = writer.createContainerElement( 'paragraph' );\n\t * const selection = writer.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = writer.createSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = writer.createSelection( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * @internal\n\t */\n\tconstructor(\n\t\t...args: [] | [\n\t\t\tselectable: ViewNode,\n\t\t\tplaceOrOffset: ViewPlaceOrOffset,\n\t\t\toptions?: ViewSelectionOptions\n\t\t] | [\n\t\t\tselectable?: Exclude<ViewSelectable, ViewNode>,\n\t\t\toptions?: ViewSelectionOptions\n\t\t]\n\t) {\n\t\tsuper();\n\n\t\tthis._ranges = [];\n\t\tthis._lastRangeBackward = false;\n\t\tthis._isFake = false;\n\t\tthis._fakeSelectionLabel = '';\n\n\t\tif ( args.length ) {\n\t\t\tthis.setTo( ...args );\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if selection instance is marked as `fake`.\n\t *\n\t * @see #setTo\n\t */\n\tpublic get isFake(): boolean {\n\t\treturn this._isFake;\n\t}\n\n\t/**\n\t * Returns fake selection label.\n\t *\n\t * @see #setTo\n\t */\n\tpublic get fakeSelectionLabel(): string {\n\t\treturn this._fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t * {@link #focus focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t * It may be a bit unintuitive when there are multiple ranges in selection.\n\t *\n\t * @see #focus\n\t */\n\tpublic get anchor(): ViewPosition | null {\n\t\tif ( !this._ranges.length ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\t\tconst anchor = this._lastRangeBackward ? range.end : range.start;\n\n\t\treturn anchor.clone();\n\t}\n\n\t/**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * @see #anchor\n\t */\n\tpublic get focus(): ViewPosition | null {\n\t\tif ( !this._ranges.length ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\t\tconst focus = this._lastRangeBackward ? range.start : range.end;\n\n\t\treturn focus.clone();\n\t}\n\n\t/**\n\t * Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t */\n\tpublic get isCollapsed(): boolean {\n\t\treturn this.rangeCount === 1 && this._ranges[ 0 ].isCollapsed;\n\t}\n\n\t/**\n\t * Returns number of ranges in selection.\n\t */\n\tpublic get rangeCount(): number {\n\t\treturn this._ranges.length;\n\t}\n\n\t/**\n\t * Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t */\n\tpublic get isBackward(): boolean {\n\t\treturn !this.isCollapsed && this._lastRangeBackward;\n\t}\n\n\t/**\n\t * {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement} instance that contains this selection, or `null`\n\t * if the selection is not inside an editable element.\n\t */\n\tpublic get editableElement(): ViewEditableElement | null {\n\t\tif ( this.anchor ) {\n\t\t\treturn this.anchor.editableElement;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns an iterable that contains copies of all ranges added to the selection.\n\t */\n\tpublic* getRanges(): IterableIterator<ViewRange> {\n\t\tfor ( const range of this._ranges ) {\n\t\t\tyield range.clone();\n\t\t}\n\t}\n\n\t/**\n\t * Returns copy of the first range in the selection. First range is the one which\n\t * {@link module:engine/view/range~ViewRange#start start} position\n\t * {@link module:engine/view/position~ViewPosition#isBefore is before} start\n\t * position of all other ranges (not to confuse with the first range added to the selection).\n\t * Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getFirstRange(): ViewRange | null {\n\t\tlet first = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !first || range.start.isBefore( first.start ) ) {\n\t\t\t\tfirst = range;\n\t\t\t}\n\t\t}\n\n\t\treturn first ? first.clone() : null;\n\t}\n\n\t/**\n\t * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~ViewRange#end end}\n\t * position {@link module:engine/view/position~ViewPosition#isAfter is after} end position of all other ranges (not to confuse\n\t * with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getLastRange(): ViewRange | null {\n\t\tlet last = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !last || range.end.isAfter( last.end ) ) {\n\t\t\t\tlast = range;\n\t\t\t}\n\t\t}\n\n\t\treturn last ? last.clone() : null;\n\t}\n\n\t/**\n\t * Returns copy of the first position in the selection. First position is the position that\n\t * {@link module:engine/view/position~ViewPosition#isBefore is before} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getFirstPosition(): ViewPosition | null {\n\t\tconst firstRange = this.getFirstRange();\n\n\t\treturn firstRange ? firstRange.start.clone() : null;\n\t}\n\n\t/**\n\t * Returns copy of the last position in the selection. Last position is the position that\n\t * {@link module:engine/view/position~ViewPosition#isAfter is after} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getLastPosition(): ViewPosition | null {\n\t\tconst lastRange = this.getLastRange();\n\n\t\treturn lastRange ? lastRange.end.clone() : null;\n\t}\n\n\t/**\n\t * Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t * same number of ranges and all ranges from one selection equal to a range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are equal, `false` otherwise.\n\t */\n\tpublic isEqual( otherSelection: ViewSelection | ViewDocumentSelection ): boolean {\n\t\tif ( this.isFake != otherSelection.isFake ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.isFake && this.fakeSelectionLabel != otherSelection.fakeSelectionLabel ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.rangeCount != otherSelection.rangeCount ) {\n\t\t\treturn false;\n\t\t} else if ( this.rangeCount === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( !this.anchor!.isEqual( otherSelection.anchor! ) || !this.focus!.isEqual( otherSelection.focus! ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const thisRange of this._ranges ) {\n\t\t\tlet found = false;\n\n\t\t\tfor ( const otherRange of ( otherSelection as any )._ranges ) {\n\t\t\t\tif ( thisRange.isEqual( otherRange ) ) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !found ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t * number of ranges, and all {@link module:engine/view/range~ViewRange#getTrimmed trimmed} ranges from one selection are\n\t * equal to any trimmed range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are similar, `false` otherwise.\n\t */\n\tpublic isSimilar( otherSelection: ViewSelection | ViewDocumentSelection ): boolean {\n\t\tif ( this.isBackward != otherSelection.isBackward ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst numOfRangesA = count( this.getRanges() );\n\t\tconst numOfRangesB = count( otherSelection.getRanges() );\n\n\t\t// If selections have different number of ranges, they cannot be similar.\n\t\tif ( numOfRangesA != numOfRangesB ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If both selections have no ranges, they are similar.\n\t\tif ( numOfRangesA == 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check if each range in one selection has a similar range in other selection.\n\t\tfor ( let rangeA of this.getRanges() ) {\n\t\t\trangeA = rangeA.getTrimmed();\n\n\t\t\tlet found = false;\n\n\t\t\tfor ( let rangeB of otherSelection.getRanges() ) {\n\t\t\t\trangeB = rangeB.getTrimmed();\n\n\t\t\t\tif ( rangeA.start.isEqual( rangeB.start ) && rangeA.end.isEqual( rangeB.end ) ) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For `rangeA`, neither range in `otherSelection` was similar. So selections are not similar.\n\t\t\tif ( !found ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// There were no ranges that weren't matched. Selections are similar.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/view/element~ViewElement Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */\n\tpublic getSelectedElement(): ViewElement | null {\n\t\tif ( this.rangeCount !== 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.getFirstRange()!.getContainedElement();\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/view/selection~ViewSelectable selectable}.\n\t *\n\t * ```ts\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * selection.setTo( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * selection.setTo( range );\n\t *\n\t * // Sets selection to the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * selection.setTo( otherSelection );\n\t *\n\t * // Sets selection to contents of ViewDocumentSelection.\n\t * selection.setTo( editor.editing.view.document.selection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPositionAt( root, path );\n\t * selection.setTo( position );\n\t *\n\t * // Sets collapsed selection at the position of given item and offset.\n\t * selection.setTo( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'on' );\n\t *\n\t * // Clears selection. Removes all ranges.\n\t * selection.setTo( null );\n\t * ```\n\t *\n\t * `Selection#setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * selection.setTo( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * selection.setTo( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * @fires change\n\t */\n\tpublic setTo(\n\t\t...args: [\n\t\t\tselectable: ViewNode,\n\t\t\tplaceOrOffset: ViewPlaceOrOffset,\n\t\t\toptions?: ViewSelectionOptions\n\t\t] | [\n\t\t\tselectable?: Exclude<ViewSelectable, ViewNode>,\n\t\t\toptions?: ViewSelectionOptions\n\t\t]\n\t): void {\n\t\tlet [ selectable, placeOrOffset, options ] = args;\n\n\t\tif ( typeof placeOrOffset == 'object' ) {\n\t\t\toptions = placeOrOffset;\n\t\t\tplaceOrOffset = undefined;\n\t\t}\n\n\t\tif ( selectable === null ) {\n\t\t\tthis._setRanges( [] );\n\t\t\tthis._setFakeOptions( options );\n\t\t} else if ( selectable instanceof ViewSelection || selectable instanceof ViewDocumentSelection ) {\n\t\t\tthis._setRanges( selectable.getRanges(), selectable.isBackward );\n\t\t\tthis._setFakeOptions( { fake: selectable.isFake, label: selectable.fakeSelectionLabel } );\n\t\t} else if ( selectable instanceof ViewRange ) {\n\t\t\tthis._setRanges( [ selectable ], options && options.backward );\n\t\t\tthis._setFakeOptions( options );\n\t\t} else if ( selectable instanceof ViewPosition ) {\n\t\t\tthis._setRanges( [ new ViewRange( selectable ) ] );\n\t\t\tthis._setFakeOptions( options );\n\t\t} else if ( selectable instanceof ViewNode ) {\n\t\t\tconst backward = !!options && !!options.backward;\n\t\t\tlet range;\n\n\t\t\tif ( placeOrOffset === undefined ) {\n\t\t\t\t/**\n\t\t\t\t * selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t\t *\n\t\t\t\t * @error view-selection-setto-required-second-parameter\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-selection-setto-required-second-parameter', this );\n\t\t\t} else if ( placeOrOffset == 'in' ) {\n\t\t\t\trange = ViewRange._createIn( selectable as ViewElement );\n\t\t\t} else if ( placeOrOffset == 'on' ) {\n\t\t\t\trange = ViewRange._createOn( selectable );\n\t\t\t} else {\n\t\t\t\trange = new ViewRange( ViewPosition._createAt( selectable, placeOrOffset ) );\n\t\t\t}\n\n\t\t\tthis._setRanges( [ range ], backward );\n\t\t\tthis._setFakeOptions( options );\n\t\t} else if ( isIterable( selectable ) ) {\n\t\t\t// We assume that the selectable is an iterable of ranges.\n\t\t\t// Array.from() is used to prevent setting ranges to the old iterable\n\t\t\tthis._setRanges( selectable, options && options.backward );\n\t\t\tthis._setFakeOptions( options );\n\t\t} else {\n\t\t\t/**\n\t\t\t * Cannot set selection to given place.\n\t\t\t *\n\t\t\t * @error view-selection-setto-not-selectable\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-selection-setto-not-selectable', this );\n\t\t}\n\n\t\tthis.fire<ViewSelectionChangeEvent>( 'change' );\n\t}\n\n\t/**\n\t * Moves {@link #focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/view/view~EditingView#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @fires change\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t */\n\tpublic setFocus( itemOrPosition: ViewItem | ViewPosition, offset?: ViewPositionOffset ): void {\n\t\tif ( this.anchor === null ) {\n\t\t\t/**\n\t\t\t * Cannot set selection focus if there are no ranges in selection.\n\t\t\t *\n\t\t\t * @error view-selection-setfocus-no-ranges\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-selection-setfocus-no-ranges', this );\n\t\t}\n\n\t\tconst newFocus = ViewPosition._createAt( itemOrPosition, offset );\n\n\t\tif ( newFocus.compareWith( this.focus! ) == 'same' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst anchor = this.anchor;\n\n\t\tthis._ranges.pop();\n\n\t\tif ( newFocus.compareWith( anchor ) == 'before' ) {\n\t\t\tthis._addRange( new ViewRange( newFocus, anchor ), true );\n\t\t} else {\n\t\t\tthis._addRange( new ViewRange( anchor, newFocus ) );\n\t\t}\n\n\t\tthis.fire<ViewSelectionChangeEvent>( 'change' );\n\t}\n\n\t/**\n\t * Converts `ViewSelection` instance to plain object and returns it.\n\t *\n\t * @returns `ViewSelection` instance converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\tconst json: any = {\n\t\t\tranges: Array.from( this.getRanges() ).map( range => range.toJSON() )\n\t\t};\n\n\t\tif ( this.isBackward ) {\n\t\t\tjson.isBackward = true;\n\t\t}\n\n\t\tif ( this.isFake ) {\n\t\t\tjson.isFake = true;\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t * is treated like the last added range and is used to set {@link #anchor anchor} and {@link #focus focus}.\n\t * Accepts a flag describing in which way the selection is made.\n\t *\n\t * @param newRanges Iterable object of ranges to set.\n\t * @param isLastBackward Flag describing if last added range was selected forward - from start to end\n\t * (`false`) or backward - from end to start (`true`). Defaults to `false`.\n\t */\n\tprivate _setRanges( newRanges: Iterable<ViewRange>, isLastBackward: boolean = false ) {\n\t\t// New ranges should be copied to prevent removing them by setting them to `[]` first.\n\t\t// Only applies to situations when selection is set to the same selection or same selection's ranges.\n\t\tnewRanges = Array.from( newRanges );\n\n\t\tthis._ranges = [];\n\n\t\tfor ( const range of newRanges ) {\n\t\t\tthis._addRange( range );\n\t\t}\n\n\t\tthis._lastRangeBackward = !!isLastBackward;\n\t}\n\n\t/**\n\t * Sets this selection instance to be marked as `fake`. A fake selection does not render as browser native selection\n\t * over selected elements and is hidden to the user. This way, no native selection UI artifacts are displayed to\n\t * the user and selection over elements can be represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM (and be\n\t * properly handled by screen readers).\n\t */\n\tprivate _setFakeOptions( options: ViewSelectionOptions = {} ) {\n\t\tthis._isFake = !!options.fake;\n\t\tthis._fakeSelectionLabel = options.fake ? options.label || '' : '';\n\t}\n\n\t/**\n\t * Adds a range to the selection. Added range is copied. This means that passed range is not saved in the\n\t * selection instance and you can safely operate on it.\n\t *\n\t * Accepts a flag describing in which way the selection is made - passed range might be selected from\n\t * {@link module:engine/view/range~ViewRange#start start} to {@link module:engine/view/range~ViewRange#end end}\n\t * or from {@link module:engine/view/range~ViewRange#end end} to {@link module:engine/view/range~ViewRange#start start}.\n\t * The flag is used to set {@link #anchor anchor} and {@link #focus focus} properties.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t * with ranges already stored in Selection instance.\n\t */\n\tprivate _addRange( range: ViewRange, isBackward: boolean = false ): void {\n\t\tif ( !( range instanceof ViewRange ) ) {\n\t\t\t/**\n\t\t\t * Selection range set to an object that is not an instance of {@link module:engine/view/range~ViewRange}.\n\t\t\t *\n\t\t\t * @error view-selection-add-range-not-range\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-selection-add-range-not-range',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tthis._pushRange( range );\n\t\tthis._lastRangeBackward = !!isBackward;\n\t}\n\n\t/**\n\t * Adds range to selection - creates copy of given range so it can be safely used and modified.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t * with ranges already stored in selection instance.\n\t */\n\tprivate _pushRange( range: ViewRange ): void {\n\t\tfor ( const storedRange of this._ranges ) {\n\t\t\tif ( range.isIntersecting( storedRange ) ) {\n\t\t\t\t/**\n\t\t\t\t * Trying to add a range that intersects with another range from selection.\n\t\t\t\t *\n\t\t\t\t * @error view-selection-range-intersects\n\t\t\t\t * @param {module:engine/view/range~ViewRange} addedRange Range that was added to the selection.\n\t\t\t\t * @param {module:engine/view/range~ViewRange} intersectingRange Range from selection that intersects with `addedRange`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'view-selection-range-intersects',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ addedRange: range, intersectingRange: storedRange }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis._ranges.push( new ViewRange( range.start, range.end ) );\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewSelection.prototype.is = function( type: string ): boolean {\n\treturn type === 'selection' || type === 'view:selection';\n} as any;\n\n/**\n * Additional options for {@link ~ViewSelection}.\n */\nexport interface ViewSelectionOptions {\n\n\t/**\n\t * Sets this selection instance to be backward.\n\t */\n\tbackward?: boolean;\n\n\t/**\n\t * Sets this selection instance to be marked as `fake`.\n\t */\n\tfake?: boolean;\n\n\t/**\n\t * Label for the fake selection.\n\t */\n\tlabel?: string;\n}\n\n/**\n * The place or offset of the selection.\n */\nexport type ViewPlaceOrOffset = number | 'before' | 'end' | 'after' | 'on' | 'in';\n\n/**\n * Fired whenever selection ranges are changed through {@link ~ViewSelection Selection API}.\n *\n * @eventName ~ViewSelection#change\n */\nexport type ViewSelectionChangeEvent = {\n\tname: 'change';\n\targs: [];\n};\n\n/**\n * An entity that is used to set selection.\n *\n * See also {@link module:engine/view/selection~ViewSelection#setTo}\n */\nexport type ViewSelectable = ViewSelection | ViewDocumentSelection | ViewPosition | Iterable<ViewRange> | ViewRange | ViewNode | null;\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/**\n * @module engine/view/documentselection\n */\n\nimport { ViewTypeCheckable } from './typecheckable.js';\nimport {\n\tViewSelection,\n\ttype ViewPlaceOrOffset,\n\ttype ViewSelectable,\n\ttype ViewSelectionOptions,\n\ttype ViewSelectionChangeEvent\n} from './selection.js';\n\nimport { EmitterMixin, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewEditableElement } from './editableelement.js';\nimport { type ViewElement } from './element.js';\nimport { type ViewNode } from './node.js';\nimport { type ViewItem } from './item.js';\nimport type { ViewPosition, ViewPositionOffset } from './position.js';\nimport { type ViewRange } from './range.js';\n\nconst ViewDocumentSelectionBase: EmitterMixinConstructor<typeof ViewTypeCheckable> = /* #__PURE__ */ EmitterMixin( ViewTypeCheckable );\n\n/**\n * Class representing the document selection in the view.\n *\n * Its instance is available in {@link module:engine/view/document~ViewDocument#selection `Document#selection`}.\n *\n * It is similar to {@link module:engine/view/selection~ViewSelection} but\n * it has a read-only API and can be modified only by the writer available in\n * the {@link module:engine/view/view~EditingView#change `View#change()`} block\n * (so via {@link module:engine/view/downcastwriter~ViewDowncastWriter#setSelection `ViewDowncastWriter#setSelection()`}).\n */\nexport class ViewDocumentSelection extends ViewDocumentSelectionBase {\n\t/**\n\t * Selection is used internally (`ViewDocumentSelection` is a proxy to that selection).\n\t */\n\tprivate readonly _selection: ViewSelection;\n\n\t/**\n\t * Creates new ViewDocumentSelection instance.\n\t *\n\t * ```ts\n\t * // Creates collapsed selection at the position of given item and offset.\n\t * const paragraph = writer.createContainerElement( 'paragraph' );\n\t * const selection = new ViewDocumentSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = new ViewDocumentSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = new ViewDocumentSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = new ViewDocumentSelection( element, 'in', { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = new ViewDocumentSelection( element, 'in', { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #constructor:SELECTABLE `constructor( selectable, options )`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic constructor( selectable: ViewNode, placeOrOffset: ViewPlaceOrOffset, options?: ViewSelectionOptions );\n\n\t/**\n\t * Creates new ViewDocumentSelection instance.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = new ViewDocumentSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = new ViewDocumentSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t * const selection = new ViewDocumentSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = new ViewDocumentSelection( otherSelection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionAt( root, offset );\n\t * const selection = new ViewDocumentSelection( position );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = new ViewDocumentSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = new ViewDocumentSelection( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #constructor:NODE_OFFSET `constructor( node, placeOrOffset, options )`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic constructor( selectable?: Exclude<ViewSelectable, ViewNode>, options?: ViewSelectionOptions );\n\n\tconstructor( ...args: ConstructorParameters<typeof ViewSelection> ) {\n\t\tsuper();\n\n\t\tthis._selection = new ViewSelection();\n\n\t\t// Delegate change event to be fired on ViewDocumentSelection instance.\n\t\tthis._selection.delegate( 'change' ).to( this );\n\n\t\t// Set selection data.\n\t\tif ( args.length ) {\n\t\t\tthis._selection.setTo( ...args );\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if selection instance is marked as `fake`.\n\t *\n\t * @see #_setTo\n\t */\n\tpublic get isFake(): boolean {\n\t\treturn this._selection.isFake;\n\t}\n\n\t/**\n\t * Returns fake selection label.\n\t *\n\t * @see #_setTo\n\t */\n\tpublic get fakeSelectionLabel(): string {\n\t\treturn this._selection.fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t * {@link #focus focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t * It may be a bit unintuitive when there are multiple ranges in selection.\n\t *\n\t * @see #focus\n\t */\n\tpublic get anchor(): ViewPosition | null {\n\t\treturn this._selection.anchor;\n\t}\n\n\t/**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * @see #anchor\n\t */\n\tpublic get focus(): ViewPosition | null {\n\t\treturn this._selection.focus;\n\t}\n\n\t/**\n\t * Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t */\n\tpublic get isCollapsed(): boolean {\n\t\treturn this._selection.isCollapsed;\n\t}\n\n\t/**\n\t * Returns number of ranges in selection.\n\t */\n\tpublic get rangeCount(): number {\n\t\treturn this._selection.rangeCount;\n\t}\n\n\t/**\n\t * Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t */\n\tpublic get isBackward(): boolean {\n\t\treturn this._selection.isBackward;\n\t}\n\n\t/**\n\t * {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement} instance that contains this selection, or `null`\n\t * if the selection is not inside an editable element.\n\t */\n\tpublic get editableElement(): ViewEditableElement | null {\n\t\treturn this._selection.editableElement;\n\t}\n\n\t/**\n\t * Used for the compatibility with the {@link module:engine/view/selection~ViewSelection#isEqual} method.\n\t *\n\t * @internal\n\t */\n\tpublic get _ranges(): Array<ViewRange> {\n\t\treturn ( this._selection as any )._ranges;\n\t}\n\n\t/**\n\t * Returns an iterable that contains copies of all ranges added to the selection.\n\t */\n\tpublic* getRanges(): IterableIterator<ViewRange> {\n\t\tyield* this._selection.getRanges();\n\t}\n\n\t/**\n\t * Returns copy of the first range in the selection. First range is the one which\n\t * {@link module:engine/view/range~ViewRange#start start} position\n\t * {@link module:engine/view/position~ViewPosition#isBefore is before} start\n\t * position of all other ranges (not to confuse with the first range added to the selection).\n\t * Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getFirstRange(): ViewRange | null {\n\t\treturn this._selection.getFirstRange();\n\t}\n\n\t/**\n\t * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~ViewRange#end end}\n\t * position {@link module:engine/view/position~ViewPosition#isAfter is after} end position of all other ranges (not to confuse\n\t * with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getLastRange(): ViewRange | null {\n\t\treturn this._selection.getLastRange();\n\t}\n\n\t/**\n\t * Returns copy of the first position in the selection. First position is the position that\n\t * {@link module:engine/view/position~ViewPosition#isBefore is before} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getFirstPosition(): ViewPosition | null {\n\t\treturn this._selection.getFirstPosition();\n\t}\n\n\t/**\n\t * Returns copy of the last position in the selection. Last position is the position that\n\t * {@link module:engine/view/position~ViewPosition#isAfter is after} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */\n\tpublic getLastPosition(): ViewPosition | null {\n\t\treturn this._selection.getLastPosition();\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/view/element~ViewElement Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */\n\tpublic getSelectedElement(): ViewElement | null {\n\t\treturn this._selection.getSelectedElement();\n\t}\n\n\t/**\n\t * Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t * same number of ranges and all ranges from one selection equal to a range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are equal, `false` otherwise.\n\t */\n\tpublic isEqual( otherSelection: ViewSelection | ViewDocumentSelection ): boolean {\n\t\treturn this._selection.isEqual( otherSelection );\n\t}\n\n\t/**\n\t * Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t * number of ranges, and all {@link module:engine/view/range~ViewRange#getTrimmed trimmed} ranges from one selection are\n\t * equal to any trimmed range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are similar, `false` otherwise.\n\t */\n\tpublic isSimilar( otherSelection: ViewSelection | ViewDocumentSelection ): boolean {\n\t\treturn this._selection.isSimilar( otherSelection );\n\t}\n\n\t/**\n\t * Converts `ViewDocumentSelection` instance to plain object and returns it.\n\t *\n\t * @returns `ViewDocumentSelection` instance converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn this._selection.toJSON();\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/view/selection~ViewSelectable selectable}.\n\t *\n\t * ```ts\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * documentSelection._setTo( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t * documentSelection._setTo( range );\n\t *\n\t * // Sets selection to the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * documentSelection._setTo( otherSelection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPositionAt( root, offset );\n\t * documentSelection._setTo( position );\n\t *\n\t * // Sets collapsed selection at the position of given item and offset.\n\t * documentSelection._setTo( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * documentSelection._setTo( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * documentSelection._setTo( paragraph, 'on' );\n\t *\n\t * // Clears selection. Removes all ranges.\n\t * documentSelection._setTo( null );\n\t * ```\n\t *\n\t * `Selection#_setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * documentSelection._setTo( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to des cribe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * documentSelection._setTo( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * @internal\n\t * @fires change\n\t */\n\tpublic _setTo( ...args: Parameters<ViewSelection[ 'setTo' ]> ): void {\n\t\tthis._selection.setTo( ...args );\n\t}\n\n\t/**\n\t * Moves {@link #focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/view/view~EditingView#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @internal\n\t * @fires change\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t */\n\tpublic _setFocus( itemOrPosition: ViewItem | ViewPosition, offset?: ViewPositionOffset ): void {\n\t\tthis._selection.setFocus( itemOrPosition, offset );\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewDocumentSelection.prototype.is = function( type: string ): boolean {\n\treturn type === 'selection' ||\n\t\ttype == 'documentSelection' ||\n\t\ttype == 'view:selection' ||\n\t\ttype == 'view:documentSelection';\n} as any;\n\n/**\n * Fired whenever selection ranges are changed through {@link ~ViewDocumentSelection Selection API}.\n *\n * @eventName ~ViewDocumentSelection#change\n */\nexport type ViewDocumentSelectionChangeEvent = ViewSelectionChangeEvent;\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/**\n * @module engine/view/observer/bubblingeventinfo\n */\n\nimport { EventInfo } from '@ckeditor/ckeditor5-utils';\nimport { type ViewDocument } from '../document.js';\nimport { type ViewNode } from '../node.js';\nimport { type ViewRange } from '../range.js';\n\n/**\n * The event object passed to bubbling event callbacks. It is used to provide information about the event as well as a tool to\n * manipulate it.\n */\nexport class BubblingEventInfo<TName extends string = string, TReturn = unknown> extends EventInfo<TName, TReturn> {\n\t/**\n\t * The view range that the bubbling should start from.\n\t */\n\tpublic readonly startRange: ViewRange;\n\n\t/**\n\t * The current event phase.\n\t */\n\tprivate _eventPhase: BubblingEventPhase;\n\n\t/**\n\t * The current bubbling target.\n\t */\n\tprivate _currentTarget: ViewDocument | ViewNode | null;\n\n\t/**\n\t * @param source The emitter.\n\t * @param name The event name.\n\t * @param startRange The view range that the bubbling should start from.\n\t */\n\tconstructor( source: object, name: TName, startRange: ViewRange ) {\n\t\tsuper( source, name );\n\n\t\tthis.startRange = startRange;\n\t\tthis._eventPhase = 'none';\n\t\tthis._currentTarget = null;\n\t}\n\n\t/**\n\t * The current event phase.\n\t */\n\tpublic get eventPhase(): BubblingEventPhase {\n\t\treturn this._eventPhase;\n\t}\n\n\t/**\n\t * The current bubbling target.\n\t */\n\tpublic get currentTarget(): ViewDocument | ViewNode | null {\n\t\treturn this._currentTarget;\n\t}\n}\n\n/**\n * The phase the event is in.\n */\nexport type BubblingEventPhase = 'none' | 'capturing' | 'atTarget' | 'bubbling';\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/**\n * @module engine/view/observer/bubblingemittermixin\n */\n\nimport {\n\tCKEditorError,\n\tEmitterMixin,\n\tEventInfo,\n\ttoArray,\n\ttype ArrayOrItem,\n\ttype Emitter,\n\ttype GetEventInfo,\n\ttype GetNameOrEventInfo,\n\ttype BaseEvent,\n\ttype CallbackOptions,\n\ttype Constructor,\n\ttype Mixed\n} from '@ckeditor/ckeditor5-utils';\n\nimport { BubblingEventInfo, type BubblingEventPhase } from './bubblingeventinfo.js';\nimport { type ViewDocument } from '../document.js';\nimport { type ViewNode } from '../node.js';\nimport { type ViewRange } from '../range.js';\nimport { type ViewElement } from '../element.js';\nimport { type ViewDocumentSelection } from '../documentselection.js';\n\nconst bubblingEmitterSymbol = Symbol( 'bubblingEmitter' );\nconst callbackMapSymbol = Symbol( 'bubblingCallbacks' );\nconst contextsSymbol = Symbol( 'bubblingContexts' );\n\n/**\n * Constructor returned by {@link ~BubblingEmitterMixin}. Use it to name a mixin base class before extending it.\n *\n * ```ts\n * const MyBubblingEmitterBase: BubblingEmitterMixinConstructor<typeof BaseClass> = BubblingEmitterMixin( BaseClass );\n *\n * class MyBubblingEmitter extends MyBubblingEmitterBase {}\n * ```\n */\nexport type BubblingEmitterMixinConstructor<Base extends Constructor<Emitter>> = Mixed<Base, BubblingEmitter>;\n\n/**\n * Bubbling emitter mixin for the view document as described in the {@link ~BubblingEmitter} interface.\n *\n * This function creates a class that inherits from the provided `base` and implements `Emitter` interface.\n * The base class must implement {@link module:utils/emittermixin~Emitter} interface.\n *\n * ```ts\n * class BaseClass extends EmitterMixin() {\n * \t// ...\n * }\n *\n * class MyClass extends BubblingEmitterMixin( BaseClass ) {\n * \t// This class derives from `BaseClass` and implements the `BubblingEmitter` interface.\n * }\n * ```\n */\nexport function BubblingEmitterMixin<Base extends Constructor<Emitter>>( base: Base ): BubblingEmitterMixinConstructor<Base> {\n\tabstract class Mixin extends base implements BubblingEmitter {\n\t\tpublic abstract get selection(): ViewDocumentSelection;\n\n\t\tpublic override fire<TEvent extends BaseEvent>(\n\t\t\teventOrInfo: GetNameOrEventInfo<TEvent>,\n\t\t\t...eventArgs: TEvent[ 'args' ]\n\t\t): GetEventInfo<TEvent>[ 'return' ] {\n\t\t\ttry {\n\t\t\t\tconst eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo( this, eventOrInfo );\n\t\t\t\tconst bubblingEmitter = getBubblingEmitter( this );\n\t\t\t\tconst customContexts = getCustomContexts( this );\n\n\t\t\t\tupdateEventInfo( eventInfo, 'capturing', this );\n\n\t\t\t\t// The capture phase of the event.\n\t\t\t\tif ( fireListenerFor( bubblingEmitter, '$capture', eventInfo, ...eventArgs ) ) {\n\t\t\t\t\treturn eventInfo.return;\n\t\t\t\t}\n\n\t\t\t\tconst startRange = ( eventInfo as BubblingEventInfo ).startRange || this.selection.getFirstRange();\n\t\t\t\tconst selectedElement = startRange ? startRange.getContainedElement() : null;\n\t\t\t\tconst isCustomContext = selectedElement ? hasMatchingCustomContext( customContexts, selectedElement ) : false;\n\n\t\t\t\tlet node: ViewNode | null = selectedElement || getDeeperRangeParent( startRange );\n\n\t\t\t\tupdateEventInfo( eventInfo, 'atTarget', node );\n\n\t\t\t\t// For the not yet bubbling event trigger for $text node if selection can be there and it's not a custom context selected.\n\t\t\t\tif ( !isCustomContext ) {\n\t\t\t\t\tif ( fireListenerFor( bubblingEmitter, '$text', eventInfo, ...eventArgs ) ) {\n\t\t\t\t\t\treturn eventInfo.return;\n\t\t\t\t\t}\n\n\t\t\t\t\tupdateEventInfo( eventInfo, 'bubbling', node );\n\t\t\t\t}\n\n\t\t\t\twhile ( node ) {\n\t\t\t\t\tif ( node.is( 'element' ) && fireListenerFor( bubblingEmitter, node, eventInfo, ...eventArgs ) ) {\n\t\t\t\t\t\treturn eventInfo.return;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.parent as ViewNode;\n\n\t\t\t\t\tupdateEventInfo( eventInfo, 'bubbling', node );\n\t\t\t\t}\n\n\t\t\t\tupdateEventInfo( eventInfo, 'bubbling', this );\n\n\t\t\t\t// Document context.\n\t\t\t\tfireListenerFor( bubblingEmitter, '$document', eventInfo, ...eventArgs );\n\n\t\t\t\treturn eventInfo.return;\n\t\t\t} catch ( err: any ) {\n\t\t\t\t// @if CK_DEBUG // throw err;\n\t\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t\t}\n\t\t}\n\n\t\tpublic _addEventListener(\n\t\t\tthis: ViewDocument,\n\t\t\tevent: string,\n\t\t\tcallback: ( ev: EventInfo, ...args: Array<any> ) => void,\n\t\t\toptions: BubblingCallbackOptions\n\t\t) {\n\t\t\tconst contexts = toArray( options.context || '$document' );\n\t\t\tconst bubblingEmitter = getBubblingEmitter( this );\n\t\t\tconst callbacksMap = getCallbackMap( this );\n\n\t\t\tfor ( const context of contexts ) {\n\t\t\t\tif ( typeof context == 'function' ) {\n\t\t\t\t\tgetCustomContexts( this ).add( context );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Wrap callback with current target match.\n\t\t\tconst wrappedCallback = wrapCallback( this, contexts, callback );\n\n\t\t\t// Store for later removing of listeners.\n\t\t\tcallbacksMap.set( callback, wrappedCallback );\n\n\t\t\t// Listen for the event.\n\t\t\tthis.listenTo<BubblingInternalEvent>( bubblingEmitter, event, wrappedCallback, options );\n\t\t}\n\n\t\tpublic _removeEventListener( this: ViewDocument, event: string, callback: Function ): void {\n\t\t\tconst bubblingEmitter = getBubblingEmitter( this );\n\t\t\tconst callbacksMap = getCallbackMap( this );\n\t\t\tconst wrappedCallback = callbacksMap.get( callback );\n\n\t\t\tif ( wrappedCallback ) {\n\t\t\t\tcallbacksMap.delete( callback );\n\t\t\t\tthis.stopListening( bubblingEmitter, event, wrappedCallback );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn Mixin as any;\n}\n\n/**\n * Update the event info bubbling fields.\n *\n * @param eventInfo The event info object to update.\n * @param eventPhase The current event phase.\n * @param currentTarget The current bubbling target.\n */\nfunction updateEventInfo(\n\teventInfo: EventInfo,\n\teventPhase: BubblingEventPhase,\n\tcurrentTarget: unknown\n) {\n\tif ( eventInfo instanceof BubblingEventInfo ) {\n\t\t( eventInfo as any )._eventPhase = eventPhase;\n\t\t( eventInfo as any )._currentTarget = currentTarget;\n\t}\n}\n\n/**\n * Fires the listener for the specified context. Returns `true` if event was stopped.\n *\n * @param eventInfo The `EventInfo` object.\n * @param eventArgs Additional arguments to be passed to the callbacks.\n * @returns True if event stop was called.\n */\nfunction fireListenerFor(\n\temitter: Emitter,\n\tcurrentTarget: string | ViewElement,\n\teventInfo: EventInfo,\n\t...eventArgs: Array<unknown>\n) {\n\temitter.fire<BubblingInternalEvent>( eventInfo, {\n\t\tcurrentTarget,\n\t\teventArgs\n\t} );\n\n\t// Similar to DOM Event#stopImmediatePropagation() this does not fire events\n\t// for other contexts on the same node.\n\tif ( eventInfo.stop.called ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Returns an event callback wrapped with context check condition.\n */\nfunction wrapCallback(\n\temitter: Emitter,\n\tcontexts: Array<string | BubblingEventContextFunction>,\n\tcallback: ( ev: EventInfo, ...args: Array<any> ) => void\n) {\n\treturn function( event: EventInfo, data: BubblingEventInternalData ) {\n\t\tconst { currentTarget, eventArgs } = data;\n\n\t\t// Quick path for string based context ($capture, $text, $document).\n\t\tif ( typeof currentTarget == 'string' ) {\n\t\t\tif ( contexts.includes( currentTarget ) ) {\n\t\t\t\tcallback.call( emitter, event, ...eventArgs );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// The current target is a view element.\n\n\t\t// Special case for the root element as it could be handled ac $root context.\n\t\t// Note that it could also be matched later by custom context.\n\t\tif ( currentTarget.is( 'rootElement' ) && contexts.includes( '$root' ) ) {\n\t\t\tcallback.call( emitter, event, ...eventArgs );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if it is a context for this element name.\n\t\tif ( contexts.includes( currentTarget.name ) ) {\n\t\t\tcallback.call( emitter, event, ...eventArgs );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if dynamic context matches.\n\t\tfor ( const context of contexts ) {\n\t\t\tif ( typeof context == 'function' && context( currentTarget ) ) {\n\t\t\t\tcallback.call( emitter, event, ...eventArgs );\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Returns bubbling emitter for the source (emitter).\n */\nfunction getBubblingEmitter( source: { [ x: string ]: any; [ bubblingEmitterSymbol ]?: Emitter } ) {\n\tif ( !source[ bubblingEmitterSymbol ] ) {\n\t\tsource[ bubblingEmitterSymbol ] = new ( EmitterMixin() )();\n\t}\n\n\treturn source[ bubblingEmitterSymbol ];\n}\n\n/**\n * Returns map of callbacks (original to wrapped one).\n */\nfunction getCallbackMap( source: { [ x: string ]: any; [ callbackMapSymbol ]?: Map<any, any> } ) {\n\tif ( !source[ callbackMapSymbol ] ) {\n\t\tsource[ callbackMapSymbol ] = new Map();\n\t}\n\n\treturn source[ callbackMapSymbol ];\n}\n\n/**\n * Returns the set of registered custom contexts.\n */\nfunction getCustomContexts( source: { [ x: string ]: any; [ contextsSymbol ]?: Set<any> } ) {\n\tif ( !source[ contextsSymbol ] ) {\n\t\tsource[ contextsSymbol ] = new Set();\n\t}\n\n\treturn source[ contextsSymbol ];\n}\n\n/**\n * Returns true if any of custom context match the given element.\n */\nfunction hasMatchingCustomContext( customContexts: Set<any>, element: ViewElement ) {\n\tfor ( const context of customContexts ) {\n\t\tif ( context( element ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Returns the deeper parent element for the range.\n */\nfunction getDeeperRangeParent( range: ViewRange ): ViewNode | null {\n\tif ( !range ) {\n\t\treturn null;\n\t}\n\n\tconst startParent = range.start.parent as ViewElement;\n\tconst endParent = range.end.parent as ViewElement;\n\n\tconst startPath = startParent.getPath();\n\tconst endPath = endParent.getPath();\n\n\treturn startPath.length > endPath.length ? startParent : endParent;\n}\n\n/**\n * Bubbling emitter for the view document.\n *\n * Bubbling emitter is triggering events in the context of specified {@link module:engine/view/element~ViewElement view element} name,\n * predefined `'$text'`, `'$root'`, `'$document'` and `'$capture'` contexts, and context matchers provided as a function.\n *\n * Before bubbling starts, listeners for `'$capture'` context are triggered. Then the bubbling starts from the deeper selection\n * position (by firing event on the `'$text'` context) and propagates the view document tree up to the `'$root'` and finally\n * the listeners at `'$document'` context are fired (this is the default context).\n *\n * Examples:\n *\n * ```ts\n * // Listeners registered in the context of the view element names:\n * this.listenTo( viewDocument, 'enter', ( evt, data ) => {\n * \t// ...\n * }, { context: 'blockquote' } );\n *\n * this.listenTo( viewDocument, 'enter', ( evt, data ) => {\n * \t// ...\n * }, { context: 'li' } );\n *\n * // Listeners registered in the context of the '$text' and '$root' nodes.\n * this.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n * \t// ...\n * }, { context: '$text', priority: 'high' } );\n *\n * this.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n * \t// ...\n * }, { context: '$root' } );\n *\n * // Listeners registered in the context of custom callback function.\n * this.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n * \t// ...\n * }, { context: isWidget } );\n *\n * this.listenTo( view.document, 'arrowKey', ( evt, data ) => {\n * \t// ...\n * }, { context: isWidget, priority: 'high' } );\n * ```\n *\n * Example flow for selection in text:\n *\n * ```xml\n * <blockquote><p>Foo[]bar</p></blockquote>\n * ```\n *\n * Fired events on contexts:\n * 1. `'$capture'`\n * 2. `'$text'`\n * 3. `'p'`\n * 4. `'blockquote'`\n * 5. `'$root'`\n * 6. `'$document'`\n *\n * Example flow for selection on element (i.e., Widget):\n *\n * ```xml\n * <blockquote><p>Foo[<widget/>]bar</p></blockquote>\n * ```\n *\n * Fired events on contexts:\n * 1. `'$capture'`\n * 2. *widget* (custom matcher)\n * 3. `'p'`\n * 4. `'blockquote'`\n * 5. `'$root'`\n * 6. `'$document'`\n *\n * There could be multiple listeners registered for the same context and at different priority levels:\n *\n * ```html\n * <p>Foo[]bar</p>\n * ```\n *\n * 1. `'$capture'` at priorities:\n *    1. `'highest'`\n *    2. `'high'`\n *    3. `'normal'`\n *    4. `'low'`\n *    5. `'lowest'`\n * 2. `'$text'` at priorities:\n *    1. `'highest'`\n *    2. `'high'`\n *    3. `'normal'`\n *    4. `'low'`\n *    5. `'lowest'`\n * 3. `'p'` at priorities:\n *    1. `'highest'`\n *    2. `'high'`\n *    3. `'normal'`\n *    4. `'low'`\n *    5. `'lowest'`\n * 4. `'$root'` at priorities:\n *    1. `'highest'`\n *    2. `'high'`\n *    3. `'normal'`\n *    4. `'low'`\n *    5. `'lowest'`\n * 5. `'$document'` at priorities:\n *    1. `'highest'`\n *    2. `'high'`\n *    3. `'normal'`\n *    4. `'low'`\n *    5. `'lowest'`\n */\nexport type BubblingEmitter = Emitter;\n\n/**\n * A context matcher function.\n *\n * Should return true for nodes that that match the custom context.\n */\nexport type BubblingEventContextFunction = ( node: ViewNode ) => boolean;\n\n/**\n * Helper type that allows describing bubbling event. Extends `TEvent` so that:\n *\n * * the event is called with {@link module:engine/view/observer/bubblingeventinfo~BubblingEventInfo}`\n * instead of {@link module:utils/eventinfo~EventInfo}, and\n * * {@link ~BubblingCallbackOptions} can be specified as additional options.\n *\n * @typeParam TEvent The event description to extend.\n */\nexport type BubblingEvent<TEvent extends BaseEvent> = TEvent & {\n\teventInfo: BubblingEventInfo<TEvent[ 'name' ], ( TEvent extends { return: infer TReturn } ? TReturn : unknown )>;\n\tcallbackOptions: BubblingCallbackOptions;\n};\n\n/**\n * Additional options for registering a callback.\n */\nexport interface BubblingCallbackOptions extends CallbackOptions {\n\n\t/**\n\t * Specifies the context in which the event should be triggered to call the callback.\n\t *\n\t * @see ~BubblingEmitter\n\t */\n\tcontext?: ArrayOrItem<string | BubblingEventContextFunction>;\n}\n\n/**\n * Internal emitter event type.\n */\ntype BubblingInternalEvent = {\n\tname: string;\n\targs: [ data: BubblingEventInternalData ];\n};\n\n/**\n * Internal emitter data type.\n */\ntype BubblingEventInternalData = {\n\tcurrentTarget: string | ViewElement;\n\teventArgs: Array<unknown>;\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/**\n * @module engine/view/document\n */\n\nimport { ViewDocumentSelection } from './documentselection.js';\nimport { BubblingEmitterMixin, type BubblingEmitterMixinConstructor } from './observer/bubblingemittermixin.js';\n\nimport { Collection, ObservableMixin, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport type { StylesProcessor } from './stylesmap.js';\nimport { type ViewRootEditableElement } from './rooteditableelement.js';\nimport { type ViewDowncastWriter } from './downcastwriter.js';\n\n// @if CK_DEBUG_ENGINE // import { logDocument } from '../dev-utils/utils.js';\n\nconst ViewDocumentBase: BubblingEmitterMixinConstructor<ObservableMixinConstructor> =\n\t/* #__PURE__ */ BubblingEmitterMixin( /* #__PURE__ */ ObservableMixin() );\n\n/**\n * Document class creates an abstract layer over the content editable area, contains a tree of view elements and\n * {@link module:engine/view/documentselection~ViewDocumentSelection view selection} associated with this document.\n */\nexport class ViewDocument extends ViewDocumentBase {\n\t/**\n\t * Selection done on this document.\n\t */\n\tpublic readonly selection: ViewDocumentSelection;\n\n\t/**\n\t * Roots of the view tree. Collection of the {@link module:engine/view/element~ViewElement view elements}.\n\t *\n\t * View roots are created as a result of binding between {@link module:engine/view/document~ViewDocument#roots} and\n\t * {@link module:engine/model/document~ModelDocument#roots} and this is handled by\n\t * {@link module:engine/controller/editingcontroller~EditingController}, so to create view root we need to create\n\t * model root using {@link module:engine/model/document~ModelDocument#createRoot}.\n\t */\n\tpublic readonly roots: Collection<ViewRootEditableElement>;\n\n\t/**\n\t * The styles processor instance used by this document when normalizing styles.\n\t */\n\tpublic readonly stylesProcessor: StylesProcessor;\n\n\t/**\n\t * Defines whether document is in read-only mode.\n\t *\n\t * When document is read-ony then all roots are read-only as well and caret placed inside this root is hidden.\n\t *\n\t * @observable\n\t */\n\tdeclare public isReadOnly: boolean;\n\n\t/**\n\t * True if document is focused.\n\t *\n\t * This property is updated by the {@link module:engine/view/observer/focusobserver~FocusObserver}.\n\t * If the {@link module:engine/view/observer/focusobserver~FocusObserver} is disabled this property will not change.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isFocused: boolean;\n\n\t/**\n\t * `true` while the user is making a selection in the document (e.g. holding the mouse button and moving the cursor).\n\t * When they stop selecting, the property goes back to `false`.\n\t *\n\t * This property is updated by the {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isSelecting: boolean;\n\n\t/**\n\t * True if composition is in progress inside the document.\n\t *\n\t * This property is updated by the {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n\t * If the {@link module:engine/view/observer/compositionobserver~CompositionObserver} is disabled this property will not change.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isComposing: boolean;\n\n\t/**\n\t * Post-fixer callbacks registered to the view document.\n\t */\n\tprivate readonly _postFixers = new Set<ViewDocumentPostFixer>();\n\n\t/**\n\t * Creates a Document instance.\n\t *\n\t * @param stylesProcessor The styles processor instance.\n\t */\n\tconstructor( stylesProcessor: StylesProcessor ) {\n\t\tsuper();\n\n\t\tthis.selection = new ViewDocumentSelection();\n\t\tthis.roots = new Collection( { idProperty: 'rootName' } );\n\t\tthis.stylesProcessor = stylesProcessor;\n\n\t\tthis.set( 'isReadOnly', false );\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'isSelecting', false );\n\t\tthis.set( 'isComposing', false );\n\t}\n\n\t/**\n\t * Gets a {@link module:engine/view/document~ViewDocument#roots view root element} with the specified name. If the name is not\n\t * specific \"main\" root is returned.\n\t *\n\t * @param name Name of the root.\n\t * @returns The view root element with the specified name or null when there is no root of given name.\n\t */\n\tpublic getRoot( name: string = 'main' ): ViewRootEditableElement | null {\n\t\treturn this.roots.get( name );\n\t}\n\n\t/**\n\t * Returns an array with all roots added to the document.\n\t */\n\tpublic getRoots(): Array<ViewRootEditableElement> {\n\t\treturn Array.from( this.roots );\n\t}\n\n\t/**\n\t * Allows registering post-fixer callbacks. A post-fixers mechanism allows to update the view tree just before it is rendered\n\t * to the DOM.\n\t *\n\t * Post-fixers are executed right after all changes from the outermost change block were applied but\n\t * before the {@link module:engine/view/view~EditingView#event:render render event} is fired. If a post-fixer callback made\n\t * a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should\n\t * not be fixed in the new document tree state.\n\t *\n\t * View post-fixers are useful when you want to apply some fixes whenever the view structure changes. Keep in mind that\n\t * changes executed in a view post-fixer should not break model-view mapping.\n\t *\n\t * The types of changes which should be safe:\n\t *\n\t * * adding or removing attribute from elements,\n\t * * changes inside of {@link module:engine/view/uielement~ViewUIElement UI elements},\n\t * * {@link module:engine/controller/editingcontroller~EditingController#reconvertItem marking some of the model elements to be\n\t * re-converted}.\n\t *\n\t * Try to avoid changes which touch view structure:\n\t *\n\t * * you should not add or remove nor wrap or unwrap any view elements,\n\t * * you should not change the editor data model in a view post-fixer.\n\t *\n\t * As a parameter, a post-fixer callback receives a {@link module:engine/view/downcastwriter~ViewDowncastWriter downcast writer}.\n\t *\n\t * Typically, a post-fixer will look like this:\n\t *\n\t * ```ts\n\t * editor.editing.view.document.registerPostFixer( writer => {\n\t * \tif ( checkSomeCondition() ) {\n\t * \t\twriter.doSomething();\n\t *\n\t * \t\t// Let other post-fixers know that something changed.\n\t * \t\treturn true;\n\t * \t}\n\t *\n\t * \treturn false;\n\t * } );\n\t * ```\n\t *\n\t * Note that nothing happens right after you register a post-fixer (e.g. execute such a code in the console).\n\t * That is because adding a post-fixer does not execute it.\n\t * The post-fixer will be executed as soon as any change in the document needs to cause its rendering.\n\t * If you want to re-render the editor's view after registering the post-fixer then you should do it manually by calling\n\t * {@link module:engine/view/view~EditingView#forceRender `view.forceRender()`}.\n\t *\n\t * If you need to register a callback which is executed when DOM elements are already updated,\n\t * use {@link module:engine/view/view~EditingView#event:render render event}.\n\t */\n\tpublic registerPostFixer( postFixer: ViewDocumentPostFixer ): void {\n\t\tthis._postFixers.add( postFixer );\n\t}\n\n\t/**\n\t * Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t */\n\tpublic destroy(): void {\n\t\tthis.roots.forEach( root => root.destroy() );\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.\n\t *\n\t * @internal\n\t */\n\tpublic _callPostFixers( writer: ViewDowncastWriter ): void {\n\t\tlet wasFixed = false;\n\n\t\tdo {\n\t\t\tfor ( const callback of this._postFixers ) {\n\t\t\t\twasFixed = callback( writer );\n\n\t\t\t\tif ( wasFixed ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ( wasFixed );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public log( version: any ): void {\n\t// @if CK_DEBUG_ENGINE // \tlogDocument( this, version );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n/**\n * Document PostFixer.\n *\n * @see module:engine/view/document~ViewDocument#registerPostFixer\n */\nexport type ViewDocumentPostFixer = ( writer: ViewDowncastWriter ) => boolean;\n\n/**\n * Enum representing type of the change.\n *\n * Possible values:\n *\n * * `children` - for child list changes,\n * * `attributes` - for element attributes changes,\n * * `text` - for text nodes changes.\n */\nexport type ViewDocumentChangeType = 'children' | 'attributes' | 'text';\n\n/**\n * Event fired whenever document content layout changes. It is fired whenever content is\n * {@link module:engine/view/view~EditingView#event:render rendered}, but should be also fired by observers in case of\n * other actions which may change layout, for instance when image loads.\n *\n * @eventName ~ViewDocument#layoutChanged\n */\nexport type ViewDocumentLayoutChangedEvent = {\n\tname: 'layoutChanged';\n\targs: [];\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/**\n * @module engine/view/attributeelement\n */\n\nimport { ViewElement, type ViewElementAttributes } from './element.js';\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewDocumentFragment } from './documentfragment.js';\nimport { type ViewDocument } from './document.js';\nimport { type ViewNode } from './node.js';\n\n// Default attribute priority.\nconst DEFAULT_PRIORITY = 10;\n\n/**\n * Attribute elements are used to represent formatting elements in the view (think – `<b>`, `<span style=\"font-size: 2em\">`, etc.).\n * Most often they are created when downcasting model text attributes.\n *\n * Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n * types (container element, {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n * {@link module:engine/view/emptyelement~ViewEmptyElement empty element}, etc) when developing a feature.\n *\n * To create a new attribute element instance use the\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement `ViewDowncastWriter#createAttributeElement()`} method.\n */\nexport class ViewAttributeElement extends ViewElement {\n\tpublic static readonly DEFAULT_PRIORITY: number = DEFAULT_PRIORITY;\n\n\t/**\n\t * Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t *\n\t * @internal\n\t * @readonly\n\t */\n\tpublic _priority: number = DEFAULT_PRIORITY;\n\n\t/**\n\t * Element identifier. If set, it is used by {@link module:engine/view/element~ViewElement#isSimilar},\n\t * and then two elements are considered similar if, and only if they have the same `_id`.\n\t *\n\t * @internal\n\t * @readonly\n\t */\n\tpublic _id: string | number | null = null;\n\n\t/**\n\t * Keeps all the attribute elements that have the same {@link module:engine/view/attributeelement~ViewAttributeElement#id ids}\n\t * and still exist in the view tree.\n\t *\n\t * This property is managed by {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t */\n\tprivate readonly _clonesGroup: Set<ViewAttributeElement> | null = null;\n\n\t/**\n\t * Creates an attribute element.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement\n\t * @see module:engine/view/element~ViewElement\n\t * @protected\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string,\n\t\tattrs?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t) {\n\t\tsuper( document, name, attrs, children );\n\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~ViewDowncastWriter}.\n\t */\n\tpublic get priority(): number {\n\t\treturn this._priority;\n\t}\n\n\t/**\n\t * Element identifier. If set, it is used by {@link module:engine/view/element~ViewElement#isSimilar},\n\t * and then two elements are considered similar if, and only if they have the same `id`.\n\t */\n\tpublic get id(): string | number | null {\n\t\treturn this._id;\n\t}\n\n\t/**\n\t * Returns all {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that has the\n\t * same {@link module:engine/view/attributeelement~ViewAttributeElement#id id} and are in the view tree (were not removed).\n\t *\n\t * Note: If this element has been removed from the tree, returned set will not include it.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError attribute-element-get-elements-with-same-id-no-id}\n\t * if this element has no `id`.\n\t *\n\t * @returns Set containing all the attribute elements\n\t * with the same `id` that were added and not removed from the view tree.\n\t */\n\tpublic getElementsWithSameId(): Set<ViewAttributeElement> {\n\t\tif ( this.id === null ) {\n\t\t\t/**\n\t\t\t * Cannot get elements with the same id for an attribute element without id.\n\t\t\t *\n\t\t\t * @error attribute-element-get-elements-with-same-id-no-id\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'attribute-element-get-elements-with-same-id-no-id',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\treturn new Set( this._clonesGroup );\n\t}\n\n\t/**\n\t * Checks if this element is similar to other element.\n\t *\n\t * If none of elements has set {@link module:engine/view/attributeelement~ViewAttributeElement#id}, then both elements\n\t * should have the same name, attributes and priority to be considered as similar. Two similar elements can contain\n\t * different set of children nodes.\n\t *\n\t * If at least one element has {@link module:engine/view/attributeelement~ViewAttributeElement#id} set, then both\n\t * elements have to have the same {@link module:engine/view/attributeelement~ViewAttributeElement#id} value to be\n\t * considered similar.\n\t *\n\t * Similarity is important for {@link module:engine/view/downcastwriter~ViewDowncastWriter}. For example:\n\t *\n\t * * two following similar elements can be merged together into one, longer element,\n\t * * {@link module:engine/view/downcastwriter~ViewDowncastWriter#unwrap} checks similarity of passed element and processed element to\n\t * decide whether processed element should be unwrapped,\n\t * * etc.\n\t */\n\tpublic override isSimilar( otherElement: ViewElement ): boolean {\n\t\t// If any element has an `id` set, just compare the ids.\n\t\tif ( this.id !== null || ( otherElement as any ).id !== null ) {\n\t\t\treturn this.id === ( otherElement as any ).id;\n\t\t}\n\n\t\treturn super.isSimilar( otherElement ) && this.priority == ( otherElement as any ).priority;\n\t}\n\n\t/**\n\t * Converts `ViewAttributeElement` instance to plain object and returns it.\n\t *\n\t * @returns `ViewAttributeElement` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.type = 'AttributeElement';\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Clones provided element with priority.\n\t *\n\t * @internal\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns Clone of this element.\n\t */\n\tpublic override _clone( deep: boolean = false ): this {\n\t\tconst cloned = super._clone( deep );\n\n\t\t// Clone priority too.\n\t\tcloned._priority = this._priority;\n\n\t\t// And id too.\n\t\tcloned._id = this._id;\n\n\t\treturn cloned;\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_mergeAttributesFrom} to verify if the given element can be merged without\n\t * conflicts into this element.\n\t *\n\t * @internal\n\t */\n\tpublic override _canMergeAttributesFrom( otherElement: ViewAttributeElement ): boolean {\n\t\t// Can't merge if any of elements have an id or a difference of priority.\n\t\tif ( this.id !== null || otherElement.id !== null || this.priority !== otherElement.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn super._canMergeAttributesFrom( otherElement );\n\t}\n\n\t/**\n\t * Used by {@link module:engine/view/element~ViewElement#_subtractAttributesOf} to verify if the given element attributes\n\t * can be fully subtracted from this element.\n\t *\n\t * @internal\n\t */\n\tpublic override _canSubtractAttributesOf( otherElement: ViewAttributeElement ): boolean {\n\t\t// Can't subtract if any of elements have an id or a difference of priority.\n\t\tif ( this.id !== null || otherElement.id !== null || this.priority !== otherElement.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn super._canSubtractAttributesOf( otherElement );\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewAttributeElement.prototype.is = function( this: ViewAttributeElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'attributeElement' || type === 'view:attributeElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && (\n\t\t\ttype === 'attributeElement' || type === 'view:attributeElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'element' || type === 'view:element'\n\t\t);\n\t}\n} as any;\n\n/**\n * Returns block {@link module:engine/view/filler~Filler filler} offset or `null` if block filler is not needed.\n *\n * @returns Block filler offset or `null` if block filler is not needed.\n */\nfunction getFillerOffset( this: ViewAttributeElement ): number | null {\n\t// <b>foo</b> does not need filler.\n\tif ( nonUiChildrenCount( this ) ) {\n\t\treturn null;\n\t}\n\n\tlet element = this.parent;\n\n\t// <p><b></b></p> needs filler -> <p><b><br></b></p>\n\twhile ( element && element.is( 'attributeElement' ) ) {\n\t\tif ( nonUiChildrenCount( element ) > 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\telement = element.parent;\n\t}\n\n\tif ( !element || nonUiChildrenCount( element ) > 1 ) {\n\t\treturn null;\n\t}\n\n\t// Render block filler at the end of element (after all ui elements).\n\treturn this.childCount;\n}\n\n/**\n * Returns total count of children that are not {@link module:engine/view/uielement~ViewUIElement UIElements}.\n */\nfunction nonUiChildrenCount( element: ViewElement | ViewDocumentFragment ): number {\n\treturn Array.from( element.getChildren() ).filter( element => !element.is( 'uiElement' ) ).length;\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/**\n * @module engine/view/emptyelement\n */\n\nimport { ViewElement, type ViewElementAttributes } from './element.js';\nimport { ViewNode } from './node.js';\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewDocument } from './document.js';\nimport { type ViewItem } from './item.js';\n\n/**\n * Empty element class. It is used to represent elements that cannot contain any child nodes (for example `<img>` elements).\n *\n * To create a new empty element use the\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`} method.\n */\nexport class ViewEmptyElement extends ViewElement {\n\t/**\n\t * Creates new instance of ViewEmptyElement.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` when third parameter is passed,\n\t * to inform that usage of ViewEmptyElement is incorrect (adding child nodes to ViewEmptyElement is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attributes Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t) {\n\t\tsuper( document, name, attributes, children );\n\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Converts `ViewEmptyElement` instance to plain object and returns it.\n\t *\n\t * @returns `ViewEmptyElement` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.type = 'EmptyElement';\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Overrides {@link module:engine/view/element~ViewElement#_insertChild} method.\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` to prevent\n\t * adding any child nodes to ViewEmptyElement.\n\t *\n\t * @internal\n\t */\n\tpublic override _insertChild( index: number, items: ViewItem | Iterable<ViewItem> ): number {\n\t\tif ( items && ( items instanceof ViewNode || Array.from( items as Iterable<ViewItem> ).length > 0 ) ) {\n\t\t\t/**\n\t\t\t * Cannot add children to {@link module:engine/view/emptyelement~ViewEmptyElement}.\n\t\t\t *\n\t\t\t * @error view-emptyelement-cannot-add\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-emptyelement-cannot-add',\n\t\t\t\t[ this, items ]\n\t\t\t);\n\t\t}\n\n\t\treturn 0;\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewEmptyElement.prototype.is = function( this: ViewEmptyElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'emptyElement' || type === 'view:emptyElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && (\n\t\t\ttype === 'emptyElement' || type === 'view:emptyElement' ||\n\t\t\ttype === 'element' || type === 'view:element'\n\t\t);\n\t}\n} as any;\n\n/**\n * Returns `null` because block filler is not needed for ViewEmptyElements.\n */\nfunction getFillerOffset() {\n\treturn null;\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/**\n * @module engine/view/uielement\n */\n\nimport { ViewElement, type ViewElementAttributes } from './element.js';\nimport { ViewNode } from './node.js';\nimport { CKEditorError, keyCodes } from '@ckeditor/ckeditor5-utils';\n\nimport { type EditingView } from './view.js';\nimport { type ViewDocument } from './document.js';\nimport { type ViewDomConverter } from './domconverter.js';\nimport { type ViewItem } from './item.js';\nimport type { ViewDocumentArrowKeyEvent } from './observer/arrowkeysobserver.js';\nimport type { ViewDocumentKeyEventData } from './observer/keyobserver.js';\n\ntype DomDocument = globalThis.Document;\ntype DomElement = globalThis.HTMLElement;\n\n/**\n * UI element class. It should be used to represent editing UI which needs to be injected into the editing view\n * If possible, you should keep your UI outside the editing view. However, if that is not possible,\n * UI elements can be used.\n *\n * How a UI element is rendered is in your control (you pass a callback to\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `downcastWriter#createUIElement()`}).\n * The editor will ignore your UI element – the selection cannot be placed in it, it is skipped (invisible) when\n * the user modifies the selection by using arrow keys and the editor does not listen to any mutations which\n * happen inside your UI elements.\n *\n * The limitation is that you cannot convert a model element to a UI element. UI elements need to be\n * created for {@link module:engine/model/markercollection~Marker markers} or as additinal elements\n * inside normal {@link module:engine/view/containerelement~ViewContainerElement container elements}.\n *\n * To create a new UI element use the\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `downcastWriter#createUIElement()`} method.\n */\nexport class ViewUIElement extends ViewElement {\n\t/**\n\t * Creates new instance of UIElement.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` when third parameter is passed,\n\t * to inform that usage of UIElement is incorrect (adding child nodes to UIElement is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string,\n\t\tattrs?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t) {\n\t\tsuper( document, name, attrs, children );\n\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Overrides {@link module:engine/view/element~ViewElement#_insertChild} method.\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` to prevent adding any child nodes\n\t * to UIElement.\n\t *\n\t * @internal\n\t */\n\tpublic override _insertChild( index: number, items: ViewItem | Iterable<ViewItem> ): number {\n\t\tif ( items && ( items instanceof ViewNode || Array.from( items as Iterable<ViewItem> ).length > 0 ) ) {\n\t\t\t/**\n\t\t\t * Cannot add children to {@link module:engine/view/uielement~ViewUIElement}.\n\t\t\t *\n\t\t\t * @error view-uielement-cannot-add\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-uielement-cannot-add', [ this, items ] );\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Renders this {@link module:engine/view/uielement~ViewUIElement} to DOM. This method is called by\n\t * {@link module:engine/view/domconverter~ViewDomConverter}.\n\t * Do not use inheritance to create custom rendering method, replace `render()` method instead:\n\t *\n\t * ```ts\n\t * const myUIElement = downcastWriter.createUIElement( 'span' );\n\t * myUIElement.render = function( domDocument, domConverter ) {\n\t * \tconst domElement = this.toDomElement( domDocument );\n\t *\n\t * \tdomConverter.setContentOf( domElement, '<b>this is ui element</b>' );\n\t *\n\t * \treturn domElement;\n\t * };\n\t * ```\n\t *\n\t * If changes in your UI element should trigger some editor UI update you should call\n\t * the {@link module:ui/editorui/editorui~EditorUI#update `editor.ui.update()`} method\n\t * after rendering your UI element.\n\t *\n\t * @param domConverter Instance of the ViewDomConverter used to optimize the output.\n\t */\n\tpublic render(\n\t\tdomDocument: DomDocument,\n\t\tdomConverter: ViewDomConverter // eslint-disable-line @typescript-eslint/no-unused-vars\n\t): DomElement {\n\t\t// Provide basic, default output.\n\t\treturn this.toDomElement( domDocument );\n\t}\n\n\t/**\n\t * Creates DOM element based on this view UIElement.\n\t * Note that each time this method is called new DOM element is created.\n\t */\n\tpublic toDomElement( domDocument: DomDocument ): DomElement {\n\t\tconst domElement = domDocument.createElement( this.name );\n\n\t\tfor ( const key of this.getAttributeKeys() ) {\n\t\t\tdomElement.setAttribute( key, this.getAttribute( key )! );\n\t\t}\n\n\t\treturn domElement;\n\t}\n\n\t/**\n\t * Converts `ViewUIElement` instance to plain object and returns it.\n\t *\n\t * @returns `ViewUIElement` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.type = 'UIElement';\n\n\t\treturn json;\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewUIElement.prototype.is = function( this: ViewUIElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'uiElement' || type === 'view:uiElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && (\n\t\t\ttype === 'uiElement' || type === 'view:uiElement' ||\n\t\t\ttype === 'element' || type === 'view:element'\n\t\t);\n\t}\n} as any;\n\n/**\n * This function injects UI element handling to the given {@link module:engine/view/document~ViewDocument document}.\n *\n * A callback is added to {@link module:engine/view/document~ViewDocument#event:keydown document keydown event}.\n * The callback handles the situation when right arrow key is pressed and selection is collapsed before a UI element.\n * Without this handler, it would be impossible to \"jump over\" UI element using right arrow key.\n *\n * @param view View controller to which the quirks handling will be injected.\n * @internal\n */\nexport function injectUiElementHandling( view: EditingView ): void {\n\tview.document.on<ViewDocumentArrowKeyEvent>( 'arrowKey', ( evt, data ) =>\n\t\tjumpOverUiElement( evt, data, view.domConverter ), { priority: 'low' } );\n}\n\n/**\n * Returns `null` because block filler is not needed for UIElements.\n */\nfunction getFillerOffset() {\n\treturn null;\n}\n\n/**\n * Selection cannot be placed in a `UIElement`. Whenever it is placed there, it is moved before it. This\n * causes a situation when it is impossible to jump over `UIElement` using right arrow key, because the selection\n * ends up in ui element (in DOM) and is moved back to the left. This handler fixes this situation.\n */\nfunction jumpOverUiElement( evt: unknown, data: ViewDocumentKeyEventData, domConverter: ViewDomConverter ) {\n\tif ( data.keyCode == keyCodes.arrowright ) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView!.getSelection()!;\n\t\tconst domSelectionCollapsed = domSelection.rangeCount == 1 && domSelection.getRangeAt( 0 ).collapsed;\n\n\t\t// Jump over UI element if selection is collapsed or shift key is pressed. These are the cases when selection would extend.\n\t\tif ( domSelectionCollapsed || data.shiftKey ) {\n\t\t\tconst domParent = domSelection.focusNode!;\n\t\t\tconst domOffset = domSelection.focusOffset;\n\n\t\t\tconst viewPosition = domConverter.domPositionToView( domParent, domOffset );\n\n\t\t\t// In case if dom element is not converted to view or is not mapped or something. Happens for example in some tests.\n\t\t\tif ( viewPosition === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Skip all following ui elements.\n\t\t\tlet jumpedOverAnyUiElement = false;\n\n\t\t\tconst nextViewPosition = viewPosition.getLastMatchingPosition( value => {\n\t\t\t\tif ( value.item.is( 'uiElement' ) ) {\n\t\t\t\t\t// Remember that there was at least one ui element.\n\t\t\t\t\tjumpedOverAnyUiElement = true;\n\t\t\t\t}\n\n\t\t\t\t// Jump over ui elements, jump over empty attribute elements, move up from inside of attribute element.\n\t\t\t\tif ( value.item.is( 'uiElement' ) || value.item.is( 'attributeElement' ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Don't jump over text or don't get out of container element.\n\t\t\t\treturn false;\n\t\t\t} );\n\n\t\t\t// If anything has been skipped, fix position.\n\t\t\t// This `if` could be possibly omitted but maybe it is better not to mess with DOM selection if not needed.\n\t\t\tif ( jumpedOverAnyUiElement ) {\n\t\t\t\tconst newDomPosition = domConverter.viewPositionToDom( nextViewPosition )!;\n\n\t\t\t\tif ( domSelectionCollapsed ) {\n\t\t\t\t\t// Selection was collapsed, so collapse it at further position.\n\t\t\t\t\tdomSelection.collapse( newDomPosition.parent, newDomPosition.offset );\n\t\t\t\t} else {\n\t\t\t\t\t// Selection was not collapse, so extend it instead of collapsing.\n\t\t\t\t\tdomSelection.extend( newDomPosition.parent, newDomPosition.offset );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\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/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/**\n * @module engine/view/rawelement\n */\n\nimport { ViewElement, type ViewElementAttributes } from './element.js';\nimport { ViewNode } from './node.js';\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewDocument } from './document.js';\nimport { type ViewDomConverter } from './domconverter.js';\nimport { type ViewItem } from './item.js';\n\ntype DomElement = globalThis.HTMLElement;\n\n/**\n * The raw element class.\n *\n * The raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n * even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n * in the editor content without, for instance, worrying about compatibility with other editor features.\n * Raw elements are a perfect tool for integration with external frameworks and data sources.\n *\n * Unlike {@link module:engine/view/uielement~ViewUIElement UI elements}, raw elements act like real editor\n * content (similar to {@link module:engine/view/containerelement~ViewContainerElement} or\n * {@link module:engine/view/emptyelement~ViewEmptyElement}), they are considered by the editor selection and\n * {@link module:widget/utils~toWidget they can work as widgets}.\n *\n * To create a new raw element, use the\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createRawElement `downcastWriter#createRawElement()`} method.\n */\nexport class ViewRawElement extends ViewElement {\n\t/**\n\t * Creates a new instance of a raw element.\n\t *\n\t * Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} when the `children`\n\t * parameter is passed to inform that the usage of `ViewRawElement` is incorrect (adding child nodes to `ViewRawElement` is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#createRawElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\tname: string,\n\t\tattrs?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t) {\n\t\tsuper( document, name, attrs, children );\n\n\t\t// Returns `null` because filler is not needed for raw elements.\n\t\tthis.getFillerOffset = getFillerOffset;\n\t}\n\n\t/**\n\t * Converts `ViewRawElement` instance to plain object and returns it.\n\t *\n\t * @returns `ViewRawElement` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.type = 'RawElement';\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Overrides the {@link module:engine/view/element~ViewElement#_insertChild} method.\n\t * Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} to prevent\n\t * adding any child nodes to a raw element.\n\t *\n\t * @internal\n\t */\n\tpublic override _insertChild( index: number, items: ViewItem | Iterable<ViewItem> ): number {\n\t\tif ( items && ( items instanceof ViewNode || Array.from( items as Iterable<ViewItem> ).length > 0 ) ) {\n\t\t\t/**\n\t\t\t * Cannot add children to a {@link module:engine/view/rawelement~ViewRawElement} instance.\n\t\t\t *\n\t\t\t * @error view-rawelement-cannot-add\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-rawelement-cannot-add',\n\t\t\t\t[ this, items ]\n\t\t\t);\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\t/**\n\t * This allows rendering the children of a {@link module:engine/view/rawelement~ViewRawElement} on the DOM level.\n\t * This method is called by the {@link module:engine/view/domconverter~ViewDomConverter} with the raw DOM element\n\t * passed as an argument, leaving the number and shape of the children up to the integrator.\n\t *\n\t * This method **must be defined** for the raw element to work:\n\t *\n\t * ```ts\n\t * const myRawElement = downcastWriter.createRawElement( 'div' );\n\t *\n\t * myRawElement.render = function( domElement, domConverter ) {\n\t * \tdomConverter.setContentOf( domElement, '<b>This is the raw content of myRawElement.</b>' );\n\t * };\n\t * ```\n\t *\n\t * @param domElement The native DOM element representing the raw view element.\n\t * @param domConverter Instance of the ViewDomConverter used to optimize the output.\n\t */\n\tpublic render( domElement: DomElement, domConverter: ViewDomConverter ): void {}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewRawElement.prototype.is = function( this: ViewRawElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'rawElement' || type === 'view:rawElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === this.name || type === 'view:' + this.name ||\n\t\t\ttype === 'element' || type === 'view:element' ||\n\t\t\ttype === 'node' || type === 'view:node';\n\t} else {\n\t\treturn name === this.name && (\n\t\t\ttype === 'rawElement' || type === 'view:rawElement' ||\n\t\t\ttype === 'element' || type === 'view:element'\n\t\t);\n\t}\n} as any;\n\n/**\n * Returns `null` because block filler is not needed for raw elements.\n */\nfunction getFillerOffset() {\n\treturn null;\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/**\n * @module engine/view/documentfragment\n */\n\nimport { ViewTypeCheckable } from './typecheckable.js';\nimport { ViewText } from './text.js';\nimport { ViewTextProxy } from './textproxy.js';\n\nimport { EmitterMixin, isIterable, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport type { ViewDocument, ViewDocumentChangeType } from './document.js';\n\nimport { type ViewItem } from './item.js';\nimport { type ViewNode } from './node.js';\n\nconst ViewDocumentFragmentBase: EmitterMixinConstructor<typeof ViewTypeCheckable> = /* #__PURE__ */ EmitterMixin( ViewTypeCheckable );\n\n/**\n * Document fragment.\n *\n * To create a new document fragment instance use the\n * {@link module:engine/view/upcastwriter~ViewUpcastWriter#createDocumentFragment `ViewUpcastWriter#createDocumentFragment()`}\n * method.\n */\nexport class ViewDocumentFragment extends ViewDocumentFragmentBase implements Iterable<ViewNode> {\n\t/**\n\t * The document to which this document fragment belongs.\n\t */\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Array of child nodes.\n\t */\n\tprivate readonly _children: Array<ViewNode> = [];\n\n\t/**\n\t * Map of custom properties.\n\t * Custom properties can be added to document fragment instance.\n\t */\n\tprivate readonly _customProperties = new Map<string | symbol, unknown>();\n\n\t/**\n\t * Creates new DocumentFragment instance.\n\t *\n\t * @internal\n\t * @param document The document to which this document fragment belongs.\n\t * @param children A list of nodes to be inserted into the created document fragment.\n\t */\n\tconstructor( document: ViewDocument, children?: ViewNode | Iterable<ViewNode> ) {\n\t\tsuper();\n\n\t\tthis.document = document;\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over nodes added to this document fragment.\n\t */\n\tpublic [ Symbol.iterator ](): Iterator<ViewNode> {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Number of child nodes in this document fragment.\n\t */\n\tpublic get childCount(): number {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t */\n\tpublic get isEmpty(): boolean {\n\t\treturn this.childCount === 0;\n\t}\n\n\t/**\n\t * Artificial root of `DocumentFragment`. Returns itself. Added for compatibility reasons.\n\t */\n\tpublic get root(): this {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Artificial parent of `DocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t */\n\tpublic get parent(): null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Artificial element name. Returns `undefined`. Added for compatibility reasons.\n\t */\n\tpublic get name(): undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Artificial element getFillerOffset. Returns `undefined`. Added for compatibility reasons.\n\t */\n\tpublic get getFillerOffset(): undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Returns the custom property value for the given key.\n\t */\n\tpublic getCustomProperty( key: string | symbol ): unknown {\n\t\treturn this._customProperties.get( key );\n\t}\n\n\t/**\n\t * Returns an iterator which iterates over this document fragment's custom properties.\n\t * Iterator provides `[ key, value ]` pairs for each stored property.\n\t */\n\tpublic* getCustomProperties(): Iterable<[ string | symbol, unknown ]> {\n\t\tyield* this._customProperties.entries();\n\t}\n\n\t/**\n\t * Converts `ViewDocumentFragment` instance to plain object and returns it.\n\t * Takes care of converting all of this document fragment's children.\n\t *\n\t * @returns `ViewDocumentFragment` instance converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\tconst json = [];\n\n\t\tfor ( const node of this._children ) {\n\t\t\tjson.push( node.toJSON() );\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment#_insertChild Insert} a child node or a list of child nodes at the end\n\t * and sets the parent of these nodes to this fragment.\n\t *\n\t * @internal\n\t * @param items Items to be inserted.\n\t * @returns Number of appended nodes.\n\t */\n\tpublic _appendChild( items: ViewItem | string | Iterable<ViewItem | string> ): number {\n\t\treturn this._insertChild( this.childCount, items );\n\t}\n\n\t/**\n\t * Gets child at the given index.\n\t *\n\t * @param index Index of child.\n\t * @returns Child node.\n\t */\n\tpublic getChild( index: number ): ViewNode {\n\t\treturn this._children[ index ];\n\t}\n\n\t/**\n\t * Gets index of the given child node. Returns `-1` if child node is not found.\n\t *\n\t * @param node Child node.\n\t * @returns Index of the child node.\n\t */\n\tpublic getChildIndex( node: ViewNode ): number {\n\t\treturn this._children.indexOf( node );\n\t}\n\n\t/**\n\t * Gets child nodes iterator.\n\t *\n\t * @returns Child nodes iterator.\n\t */\n\tpublic getChildren(): IterableIterator<ViewNode> {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this fragment.\n\t *\n\t * @internal\n\t * @param index Position where nodes should be inserted.\n\t * @param items Items to be inserted.\n\t * @returns Number of inserted nodes.\n\t */\n\tpublic _insertChild( index: number, items: ViewItem | string | Iterable<ViewItem | string> ): number {\n\t\tthis._fireChange( 'children', this, { index } );\n\t\tlet count = 0;\n\n\t\tconst nodes = normalize( this.document, items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\t( node as any ).parent = this;\n\n\t\t\tthis._children.splice( index, 0, node );\n\t\t\tindex++;\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t/**\n\t * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @internal\n\t * @param index Number of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns The array of removed nodes.\n\t */\n\tpublic _removeChildren( index: number, howMany: number = 1 ): Array<ViewNode> {\n\t\tthis._fireChange( 'children', this, { index } );\n\n\t\tfor ( let i = index; i < index + howMany; i++ ) {\n\t\t\t( this._children[ i ] as any ).parent = null;\n\t\t}\n\n\t\treturn this._children.splice( index, howMany );\n\t}\n\n\t/**\n\t * @internal\n\t * @param type Type of the change.\n\t * @param node Changed node.\n\t * @param data Additional data.\n\t * @fires module:engine/view/node~ViewNode#event:change\n\t */\n\tpublic _fireChange( type: ViewDocumentChangeType, node: ViewNode | ViewDocumentFragment, data?: { index: number } ): void {\n\t\tthis.fire( `change:${ type }`, node, data );\n\t}\n\n\t/**\n\t * Sets a custom property. They can be used to add special data to elements.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#setCustomProperty\n\t * @internal\n\t */\n\tpublic _setCustomProperty( key: string | symbol, value: unknown ): void {\n\t\tthis._customProperties.set( key, value );\n\t}\n\n\t/**\n\t * Removes the custom property stored under the given key.\n\t *\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#removeCustomProperty\n\t * @internal\n\t * @returns Returns true if property was removed.\n\t */\n\tpublic _removeCustomProperty( key: string | symbol ): boolean {\n\t\treturn this._customProperties.delete( key );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public printTree(): string {\n\t// @if CK_DEBUG_ENGINE // \tlet string = 'ViewDocumentFragment: [';\n\n\t// @if CK_DEBUG_ENGINE // \tfor ( const child of this.getChildren() as any ) {\n\t// @if CK_DEBUG_ENGINE // \t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += '\\n' + '\\t'.repeat( 1 ) + child.data;\n\t// @if CK_DEBUG_ENGINE // \t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += '\\n' + child.printTree( 1 );\n\t// @if CK_DEBUG_ENGINE // \t\t}\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tstring += '\\n]';\n\n\t// @if CK_DEBUG_ENGINE // \treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logTree(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nViewDocumentFragment.prototype.is = function( type: string ): boolean {\n\treturn type === 'documentFragment' || type === 'view:documentFragment';\n} as any;\n\n/**\n * Converts strings to Text and non-iterables to arrays.\n */\nfunction normalize( document: ViewDocument, nodes: ViewItem | string | Iterable<ViewItem | string> ): Array<ViewNode> {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new ViewText( document, nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\tif ( typeof node == 'string' ) {\n\t\t\t\treturn new ViewText( document, node );\n\t\t\t}\n\n\t\t\tif ( node instanceof ViewTextProxy ) {\n\t\t\t\treturn new ViewText( document, node.data );\n\t\t\t}\n\n\t\t\treturn node;\n\t\t} );\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/**\n * @module engine/view/downcastwriter\n */\n\nimport { ViewPosition, type ViewPositionOffset } from './position.js';\nimport { ViewRange } from './range.js';\nimport {\n\tViewSelection,\n\ttype ViewPlaceOrOffset,\n\ttype ViewSelectable,\n\ttype ViewSelectionOptions\n} from './selection.js';\nimport { ViewContainerElement } from './containerelement.js';\nimport { ViewAttributeElement } from './attributeelement.js';\nimport { ViewEmptyElement } from './emptyelement.js';\nimport { ViewUIElement } from './uielement.js';\nimport { ViewRawElement } from './rawelement.js';\nimport { CKEditorError, isIterable, type ArrayOrItem } from '@ckeditor/ckeditor5-utils';\nimport { ViewDocumentFragment } from './documentfragment.js';\nimport { ViewText } from './text.js';\nimport { ViewEditableElement } from './editableelement.js';\nimport { isPlainObject } from 'es-toolkit/compat';\n\nimport { type ViewDocument } from './document.js';\nimport { type ViewNode } from './node.js';\nimport type { ViewElement, ViewElementAttributes } from './element.js';\nimport { type ViewDomConverter } from './domconverter.js';\nimport { type ViewItem } from './item.js';\nimport type { DowncastSlotFilter } from '../conversion/downcasthelpers.js';\nimport type { StyleValue } from './stylesmap.js';\n\ntype DomDocument = globalThis.Document;\ntype DomElement = globalThis.HTMLElement;\n\n/**\n * View downcast writer.\n *\n * It provides a set of methods used to manipulate view nodes.\n *\n * Do not create an instance of this writer manually. To modify a view structure, use\n * the {@link module:engine/view/view~EditingView#change `View#change()`} block.\n *\n * The `ViewDowncastWriter` is designed to work with semantic views which are the views that were/are being downcasted from the model.\n * To work with ordinary views (e.g. parsed from a pasted content) use the\n * {@link module:engine/view/upcastwriter~ViewUpcastWriter upcast writer}.\n *\n * Read more about changing the view in the {@glink framework/architecture/editing-engine#changing-the-view Changing the view}\n * section of the {@glink framework/architecture/editing-engine Editing engine architecture} guide.\n */\nexport class ViewDowncastWriter {\n\t/**\n\t * The view document instance in which this writer operates.\n\t */\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Holds references to the attribute groups that share the same {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t * The keys are `id`s, the values are `Set`s holding {@link module:engine/view/attributeelement~ViewAttributeElement}s.\n\t */\n\tprivate readonly _cloneGroups = new Map<string | number, Set<ViewAttributeElement>>();\n\n\t/**\n\t * The slot factory used by the `elementToStructure` downcast helper.\n\t */\n\tprivate _slotFactory: ( ( writer: ViewDowncastWriter, modeOrFilter: 'children' | DowncastSlotFilter ) => ViewElement ) | null = null;\n\n\t/**\n\t * @param document The view document instance.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * Sets {@link module:engine/view/documentselection~ViewDocumentSelection selection's} ranges and direction to the\n\t * specified location based on the given {@link module:engine/view/selection~ViewSelectable selectable}.\n\t *\n\t * Usage:\n\t *\n\t * ```ts\n\t * // Sets collapsed selection at the position of given item and offset.\n\t * const paragraph = writer.createContainerElement( 'p' );\n\t * writer.setSelection( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * writer.setSelection( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on the {@link module:engine/view/item~ViewItem item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * writer.setSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `ViewDowncastWriter#setSelection()` allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * writer.setSelection( element, 'in', { backward: true } );\n\t *\n\t * // Sets selection as fake.\n\t * // Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * // This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * // represented in other way, for example by applying proper CSS class.\n\t * writer.setSelection( element, 'in', { fake: true } );\n\t *\n\t * // Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * // (and be  properly handled by screen readers).\n\t * writer.setSelection( element, 'in', { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #setSelection:SELECTABLE `setSelection( selectable, options )`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic setSelection( selectable: ViewNode, placeOrOffset: ViewPlaceOrOffset, options?: ViewSelectionOptions ): void;\n\n\t/**\n\t * Sets {@link module:engine/view/documentselection~ViewDocumentSelection selection's} ranges and direction to the\n\t * specified location based on the given {@link module:engine/view/selection~ViewSelectable selectable}.\n\t *\n\t * Usage:\n\t *\n\t * ```ts\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * writer.setSelection( range );\n\t *\n\t * // Sets backward selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * writer.setSelection( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t * writer.setSelection( range );\n\t *\n\t * // Sets selection to the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * writer.setSelection( otherSelection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * writer.setSelection( position );\n\t *\n\t * // Removes all ranges.\n\t * writer.setSelection( null );\n\t * ```\n\t *\n\t * `ViewDowncastWriter#setSelection()` allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * writer.setSelection( range, { backward: true } );\n\t *\n\t * // Sets selection as fake.\n\t * // Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * // This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * // represented in other way, for example by applying proper CSS class.\n\t * writer.setSelection( range, { fake: true } );\n\t *\n\t * // Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * // (and be  properly handled by screen readers).\n\t * writer.setSelection( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #setSelection:NODE_OFFSET `setSelection( node, placeOrOffset, options )`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic setSelection( selectable: Exclude<ViewSelectable, ViewNode>, options?: ViewSelectionOptions ): void;\n\n\tpublic setSelection( ...args: Parameters<ViewSelection[ 'setTo' ]> ): void {\n\t\tthis.document.selection._setTo( ...args );\n\t}\n\n\t/**\n\t * Moves {@link module:engine/view/documentselection~ViewDocumentSelection#focus selection's focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/view/view~EditingView#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @param itemOrPosition\n\t * @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t */\n\tpublic setSelectionFocus( itemOrPosition: ViewItem | ViewPosition, offset?: ViewPositionOffset ): void {\n\t\tthis.document.selection._setFocus( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/documentfragment~ViewDocumentFragment} instance.\n\t *\n\t * @param children A list of nodes to be inserted into the created document fragment.\n\t * @returns The created document fragment.\n\t */\n\tpublic createDocumentFragment( children?: ViewNode | Iterable<ViewNode> ): ViewDocumentFragment {\n\t\treturn new ViewDocumentFragment( this.document, children );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/text~ViewText text node}.\n\t *\n\t * ```ts\n\t * writer.createText( 'foo' );\n\t * ```\n\t *\n\t * @param data The text's data.\n\t * @returns The created text node.\n\t */\n\tpublic createText( data: string ): ViewText {\n\t\treturn new ViewText( this.document, data );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/attributeelement~ViewAttributeElement}.\n\t *\n\t * ```ts\n\t * writer.createAttributeElement( 'strong' );\n\t * writer.createAttributeElement( 'a', { href: 'foo.bar' } );\n\t *\n\t * // Make `<a>` element contain other attributes element so the `<a>` element is not broken.\n\t * writer.createAttributeElement( 'a', { href: 'foo.bar' }, { priority: 5 } );\n\t *\n\t * // Set `id` of a marker element so it is not joined or merged with \"normal\" elements.\n\t * writer.createAttributeElement( 'span', { class: 'my-marker' }, { id: 'marker:my' } );\n\t * ```\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Element's attributes.\n\t * @param options Element's options.\n\t * @param options.priority Element's {@link module:engine/view/attributeelement~ViewAttributeElement#priority priority}.\n\t * @param options.id Element's {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */\n\tpublic createAttributeElement(\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\toptions: {\n\t\t\tpriority?: number;\n\t\t\tid?: number | string;\n\t\t\trenderUnsafeAttributes?: Array<string>;\n\t\t} = {}\n\t): ViewAttributeElement {\n\t\tconst attributeElement = new ViewAttributeElement( this.document, name, attributes );\n\n\t\tif ( typeof options.priority === 'number' ) {\n\t\t\tattributeElement._priority = options.priority;\n\t\t}\n\n\t\tif ( options.id ) {\n\t\t\tattributeElement._id = options.id;\n\t\t}\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\tattributeElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn attributeElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/containerelement~ViewContainerElement}.\n\t *\n\t * ```ts\n\t * writer.createContainerElement( 'p' );\n\t *\n\t * // Create element with custom attributes.\n\t * writer.createContainerElement( 'div', { id: 'foo-bar', 'data-baz': '123' } );\n\t *\n\t * // Create element with custom styles.\n\t * writer.createContainerElement( 'p', { style: 'font-weight: bold; padding-bottom: 10px' } );\n\t *\n\t * // Create element with custom classes.\n\t * writer.createContainerElement( 'p', { class: 'foo bar baz' } );\n\t *\n\t * // Create element with specific options.\n\t * writer.createContainerElement( 'span', { class: 'placeholder' }, { renderUnsafeAttributes: [ 'foo' ] } );\n\t * ```\n\t *\n\t * @label WITHOUT_CHILDREN\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */\n\tpublic createContainerElement(\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\toptions?: { renderUnsafeAttributes?: Array<string> }\n\t): ViewContainerElement;\n\n\t/**\n\t * Creates a new {@link module:engine/view/containerelement~ViewContainerElement} with children.\n\t *\n\t * ```ts\n\t * // Create element with children.\n\t * writer.createContainerElement( 'figure', { class: 'image' }, [\n\t * \twriter.createEmptyElement( 'img' ),\n\t * \twriter.createContainerElement( 'figcaption' )\n\t * ] );\n\t *\n\t * // Create element with specific options.\n\t * writer.createContainerElement( 'figure', { class: 'image' }, [\n\t * \twriter.createEmptyElement( 'img' ),\n\t * \twriter.createContainerElement( 'figcaption' )\n\t * ], { renderUnsafeAttributes: [ 'foo' ] } );\n\t * ```\n\t *\n\t * @label WITH_CHILDREN\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @param children A node or a list of nodes to be inserted into the created element.\n\t * If no children were specified, element's `options` can be passed in this argument.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */\n\tpublic createContainerElement(\n\t\tname: string,\n\t\tattributes: ViewElementAttributes,\n\t\tchildren: ViewNode | Iterable<ViewNode>,\n\t\toptions?: { renderUnsafeAttributes?: Array<string> }\n\t): ViewContainerElement;\n\n\tpublic createContainerElement(\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\tchildrenOrOptions: ViewNode | Iterable<ViewNode> | { renderUnsafeAttributes?: Array<string> } = {},\n\t\toptions: { renderUnsafeAttributes?: Array<string> } = {}\n\t): ViewContainerElement {\n\t\tlet children: ViewNode | Iterable<ViewNode> | undefined = undefined;\n\n\t\tif ( isContainerOptions( childrenOrOptions ) ) {\n\t\t\toptions = childrenOrOptions;\n\t\t} else {\n\t\t\tchildren = childrenOrOptions;\n\t\t}\n\n\t\tconst containerElement = new ViewContainerElement( this.document, name, attributes, children );\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\tcontainerElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn containerElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/editableelement~ViewEditableElement}.\n\t *\n\t * ```ts\n\t * writer.createEditableElement( 'div' );\n\t * writer.createEditableElement( 'div', { id: 'foo-1234' } );\n\t * ```\n\t *\n\t * Note: The editable element is to be used in the editing pipeline. Usually, together with\n\t * {@link module:widget/utils~toWidgetEditable `toWidgetEditable()`}.\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */\n\tpublic createEditableElement(\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\toptions: {\n\t\t\trenderUnsafeAttributes?: Array<string>;\n\t\t} = {}\n\t): ViewEditableElement {\n\t\tconst editableElement = new ViewEditableElement( this.document, name, attributes );\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\teditableElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn editableElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/emptyelement~ViewEmptyElement}.\n\t *\n\t * ```ts\n\t * writer.createEmptyElement( 'img' );\n\t * writer.createEmptyElement( 'img', { id: 'foo-1234' } );\n\t * ```\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */\n\tpublic createEmptyElement(\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\toptions: {\n\t\t\trenderUnsafeAttributes?: Array<string>;\n\t\t} = {}\n\t): ViewEmptyElement {\n\t\tconst emptyElement = new ViewEmptyElement( this.document, name, attributes );\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\temptyElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn emptyElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/uielement~ViewUIElement}.\n\t *\n\t * ```ts\n\t * writer.createUIElement( 'span' );\n\t * writer.createUIElement( 'span', { id: 'foo-1234' } );\n\t * ```\n\t *\n\t * A custom render function can be provided as the third parameter:\n\t *\n\t * ```ts\n\t * writer.createUIElement( 'span', null, function( domDocument ) {\n\t * \tconst domElement = this.toDomElement( domDocument );\n\t * \tdomElement.innerHTML = '<b>this is ui element</b>';\n\t *\n\t * \treturn domElement;\n\t * } );\n\t * ```\n\t *\n\t * Unlike {@link #createRawElement raw elements}, UI elements are by no means editor content, for instance,\n\t * they are ignored by the editor selection system.\n\t *\n\t * You should not use UI elements as data containers. Check out {@link #createRawElement} instead.\n\t *\n\t * @param name The name of the element.\n\t * @param attributes Element attributes.\n\t * @param renderFunction A custom render function.\n\t * @returns The created element.\n\t */\n\tpublic createUIElement(\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\trenderFunction?: ( this: ViewUIElement, domDocument: DomDocument, domConverter: ViewDomConverter ) => DomElement\n\t): ViewUIElement {\n\t\tconst uiElement = new ViewUIElement( this.document, name, attributes );\n\n\t\tif ( renderFunction ) {\n\t\t\tuiElement.render = renderFunction;\n\t\t}\n\n\t\treturn uiElement;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/rawelement~ViewRawElement}.\n\t *\n\t * ```ts\n\t * writer.createRawElement( 'span', { id: 'foo-1234' }, function( domElement ) {\n\t * \tdomElement.innerHTML = '<b>This is the raw content of the raw element.</b>';\n\t * } );\n\t * ```\n\t *\n\t * Raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n\t * even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n\t * in the editor content without, for instance, worrying about compatibility with other editor features.\n\t * Raw elements are a perfect tool for integration with external frameworks and data sources.\n\t *\n\t * Unlike {@link #createUIElement UI elements}, raw elements act like \"real\" editor content (similar to\n\t * {@link module:engine/view/containerelement~ViewContainerElement} or {@link module:engine/view/emptyelement~ViewEmptyElement}),\n\t * and they are considered by the editor selection.\n\t *\n\t * You should not use raw elements to render the UI in the editor content. Check out {@link #createUIElement `#createUIElement()`}\n\t * instead.\n\t *\n\t * @param name The name of the element.\n\t * @param attributes Element attributes.\n\t * @param renderFunction A custom render function.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns The created element.\n\t */\n\tpublic createRawElement(\n\t\tname: string,\n\t\tattributes?: ViewElementAttributes,\n\t\trenderFunction?: ( domElement: DomElement, domConverter: ViewDomConverter ) => void,\n\t\toptions: {\n\t\t\trenderUnsafeAttributes?: Array<string>;\n\t\t} = {}\n\t): ViewRawElement {\n\t\tconst rawElement = new ViewRawElement( this.document, name, attributes );\n\n\t\tif ( renderFunction ) {\n\t\t\trawElement.render = renderFunction;\n\t\t}\n\n\t\tif ( options.renderUnsafeAttributes ) {\n\t\t\trawElement._unsafeAttributesToRender.push( ...options.renderUnsafeAttributes );\n\t\t}\n\n\t\treturn rawElement;\n\t}\n\n\t/**\n\t * Adds or overwrites the element's attribute with a specified key and value.\n\t *\n\t * ```ts\n\t * writer.setAttribute( 'href', 'http://ckeditor.com', linkElement );\n\t * ```\n\t *\n\t * @param key The attribute key.\n\t * @param value The attribute value.\n\t * @param element The element to set an attribute on.\n\t */\n\tpublic setAttribute( key: string, value: unknown, element: ViewElement ): void;\n\n\t/**\n\t * Adds or overwrites the element's attribute with a specified key and value.\n\t * Note that for tokenized attributes it allows the `reset` parameter to specify if the previous\n\t * attribute value should be overwritten or a new token (class name, style property) should be added.\n\t *\n\t * ```ts\n\t * writer.setAttribute( 'href', 'http://ckeditor.com', linkElement );\n\t * writer.setAttribute( 'class', 'foo', false, element );\n\t * ```\n\t *\n\t * @param key The attribute key.\n\t * @param value The attribute value.\n\t * @param overwrite Whether tokenized attribute should overwrite the attribute value or just add a token.\n\t * @param element The element to set an attribute on.\n\t */\n\tpublic setAttribute( key: string, value: unknown, overwrite: boolean, element: ViewElement ): void;\n\n\tpublic setAttribute(\n\t\tkey: string,\n\t\tvalue: unknown,\n\t\telementOrOverwrite: ViewElement | boolean,\n\t\telement?: ViewElement\n\t): void {\n\t\tif ( element !== undefined ) {\n\t\t\telement._setAttribute( key, value, elementOrOverwrite as boolean );\n\t\t} else {\n\t\t\t( elementOrOverwrite as ViewElement )._setAttribute( key, value );\n\t\t}\n\t}\n\n\t/**\n\t * Removes attribute from the element.\n\t *\n\t * ```ts\n\t * writer.removeAttribute( 'href', linkElement );\n\t * ```\n\t *\n\t * @param key Attribute key.\n\t * @param element The element to remove an attribute of.\n\t */\n\tpublic removeAttribute( key: string, element: ViewElement ): void;\n\n\t/**\n\t * Removes specified tokens from an attribute value (for example class names, style properties).\n\t * If resulting attribute become empty, the whole attribute is removed.\n\t *\n\t * ```ts\n\t * writer.removeAttribute( 'class', 'foo', linkElement );\n\t * ```\n\t *\n\t * @param key Attribute key.\n\t * @param tokens Tokens to partly remove from attribute value. For example class names or style property names.\n\t * @param element The element to remove an attribute of.\n\t */\n\tpublic removeAttribute( key: string, tokens: ArrayOrItem<string>, element: ViewElement ): void;\n\n\tpublic removeAttribute( key: string, elementOrTokens: ViewElement | ArrayOrItem<string>, element?: ViewElement ): void {\n\t\tif ( element !== undefined ) {\n\t\t\telement._removeAttribute( key, elementOrTokens as ArrayOrItem<string> );\n\t\t} else {\n\t\t\t( elementOrTokens as ViewElement )._removeAttribute( key );\n\t\t}\n\t}\n\n\t/**\n\t * Adds specified class to the element.\n\t *\n\t * ```ts\n\t * writer.addClass( 'foo', linkElement );\n\t * writer.addClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t */\n\tpublic addClass( className: string | Array<string>, element: ViewElement ): void {\n\t\telement._addClass( className );\n\t}\n\n\t/**\n\t * Removes specified class from the element.\n\t *\n\t * ```ts\n\t * writer.removeClass( 'foo', linkElement );\n\t * writer.removeClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t */\n\tpublic removeClass( className: string | Array<string>, element: ViewElement ): void {\n\t\telement._removeClass( className );\n\t}\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t * ```ts\n\t * writer.setStyle( 'color', 'red', element );\n\t * ```\n\t *\n\t * **Note**: The passed style can be normalized if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @label KEY_VALUE\n\t * @param property Property name.\n\t * @param value Value to set.\n\t * @param element Element to set styles on.\n\t */\n\tpublic setStyle( property: string, value: StyleValue, element: ViewElement ): void;\n\n\t/**\n\t * Adds many styles to the element.\n\t *\n\t * ```ts\n\t * writer.setStyle( {\n\t * \tcolor: 'red',\n\t * \tposition: 'fixed'\n\t * }, element );\n\t * ```\n\t *\n\t * **Note**: The passed style can be normalized if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @label OBJECT\n\t * @param property Object with key - value pairs.\n\t * @param element Element to set styles on.\n\t */\n\tpublic setStyle( property: Record<string, StyleValue>, element: ViewElement ): void;\n\n\tpublic setStyle(\n\t\tproperty: string | Record<string, StyleValue>,\n\t\tvalue: StyleValue | ViewElement,\n\t\telement?: ViewElement\n\t): void\n\t{\n\t\tif ( isPlainObject( property ) && element === undefined ) {\n\t\t\t( value as ViewElement )._setStyle( property as Record<string, StyleValue> );\n\t\t} else {\n\t\t\telement!._setStyle( property as string, value as StyleValue );\n\t\t}\n\t}\n\n\t/**\n\t * Removes specified style from the element.\n\t *\n\t * ```ts\n\t * writer.removeStyle( 'color', element ); // Removes 'color' style.\n\t * writer.removeStyle( [ 'color', 'border-top' ], element ); // Removes both 'color' and 'border-top' styles.\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t */\n\tpublic removeStyle( property: string | Array<string>, element: ViewElement ): void {\n\t\telement._removeStyle( property );\n\t}\n\n\t/**\n\t * Sets a custom property on element. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t */\n\tpublic setCustomProperty( key: string | symbol, value: unknown, element: ViewElement | ViewDocumentFragment ): void {\n\t\telement._setCustomProperty( key, value );\n\t}\n\n\t/**\n\t * Removes a custom property stored under the given key.\n\t *\n\t * @returns Returns true if property was removed.\n\t */\n\tpublic removeCustomProperty( key: string | symbol, element: ViewElement | ViewDocumentFragment ): boolean {\n\t\treturn element._removeCustomProperty( key );\n\t}\n\n\t/**\n\t * Breaks attribute elements at the provided position or at the boundaries of a provided range. It breaks attribute elements\n\t * up to their first ancestor that is a container element.\n\t *\n\t * In following examples `<p>` is a container, `<b>` and `<u>` are attribute elements:\n\t *\n\t * ```html\n\t * <p>foo<b><u>bar{}</u></b></p> -> <p>foo<b><u>bar</u></b>[]</p>\n\t * <p>foo<b><u>{}bar</u></b></p> -> <p>foo{}<b><u>bar</u></b></p>\n\t * <p>foo<b><u>b{}ar</u></b></p> -> <p>foo<b><u>b</u></b>[]<b><u>ar</u></b></p>\n\t * <p><b>fo{o</b><u>ba}r</u></p> -> <p><b>fo</b><b>o</b><u>ba</u><u>r</u></b></p>\n\t * ```\n\t *\n\t * **Note:** {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment} is treated like a container.\n\t *\n\t * **Note:** The difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes breakAttributes()} and\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that are ancestors of a given `position`,\n\t * up to the first encountered {@link module:engine/view/containerelement~ViewContainerElement container element}.\n\t * `breakContainer()` assumes that a given `position` is directly in the container element and breaks that container element.\n\t *\n\t * Throws the `view-writer-invalid-range-container` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when the {@link module:engine/view/range~ViewRange#start start}\n\t * and {@link module:engine/view/range~ViewRange#end end} positions of a passed range are not placed inside same parent container.\n\t *\n\t * Throws the `view-writer-cannot-break-empty-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when trying to break attributes inside an {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElement}.\n\t *\n\t * Throws the `view-writer-cannot-break-ui-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when trying to break attributes inside a {@link module:engine/view/uielement~ViewUIElement UIElement}.\n\t *\n\t * @see module:engine/view/attributeelement~ViewAttributeElement\n\t * @see module:engine/view/containerelement~ViewContainerElement\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#breakContainer\n\t * @param positionOrRange The position where to break attribute elements.\n\t * @returns The new position or range, after breaking the attribute elements.\n\t */\n\tpublic breakAttributes( positionOrRange: ViewPosition | ViewRange ): ViewPosition | ViewRange {\n\t\tif ( positionOrRange instanceof ViewPosition ) {\n\t\t\treturn this._breakAttributes( positionOrRange );\n\t\t} else {\n\t\t\treturn this._breakAttributesRange( positionOrRange );\n\t\t}\n\t}\n\n\t/**\n\t * Breaks a {@link module:engine/view/containerelement~ViewContainerElement container view element} into two, at the given position.\n\t * The position has to be directly inside the container element and cannot be in the root. It does not break the conrainer view element\n\t * if the position is at the beginning or at the end of its parent element.\n\t *\n\t * ```html\n\t * <p>foo^bar</p> -> <p>foo</p><p>bar</p>\n\t * <div><p>foo</p>^<p>bar</p></div> -> <div><p>foo</p></div><div><p>bar</p></div>\n\t * <p>^foobar</p> -> ^<p>foobar</p>\n\t * <p>foobar^</p> -> <p>foobar</p>^\n\t * ```\n\t *\n\t * **Note:** The difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes breakAttributes()} and\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that are ancestors of a given `position`,\n\t * up to the first encountered {@link module:engine/view/containerelement~ViewContainerElement container element}.\n\t * `breakContainer()` assumes that the given `position` is directly in the container element and breaks that container element.\n\t *\n\t * @see module:engine/view/attributeelement~ViewAttributeElement\n\t * @see module:engine/view/containerelement~ViewContainerElement\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes\n\t * @param position The position where to break the element.\n\t * @returns The position between broken elements. If an element has not been broken,\n\t * the returned position is placed either before or after it.\n\t */\n\tpublic breakContainer( position: ViewPosition ): ViewPosition {\n\t\tconst element = position.parent;\n\n\t\tif ( !( element.is( 'containerElement' ) ) ) {\n\t\t\t/**\n\t\t\t * Trying to break an element which is not a container element.\n\t\t\t *\n\t\t\t * @error view-writer-break-non-container-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-break-non-container-element', this.document );\n\t\t}\n\n\t\tif ( !element.parent ) {\n\t\t\t/**\n\t\t\t * Trying to break root element.\n\t\t\t *\n\t\t\t * @error view-writer-break-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-break-root', this.document );\n\t\t}\n\n\t\tif ( position.isAtStart ) {\n\t\t\treturn ViewPosition._createBefore( element );\n\t\t} else if ( !position.isAtEnd ) {\n\t\t\tconst newElement = element._clone( false );\n\n\t\t\tthis.insert( ViewPosition._createAfter( element ), newElement as any );\n\n\t\t\tconst sourceRange = new ViewRange( position, ViewPosition._createAt( element, 'end' ) );\n\t\t\tconst targetPosition = new ViewPosition( newElement, 0 );\n\n\t\t\tthis.move( sourceRange, targetPosition );\n\t\t}\n\n\t\treturn ViewPosition._createAfter( element );\n\t}\n\n\t/**\n\t * Merges {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements}. It also merges text nodes if needed.\n\t * Only {@link module:engine/view/attributeelement~ViewAttributeElement#isSimilar similar} attribute elements can be merged.\n\t *\n\t * In following examples `<p>` is a container and `<b>` is an attribute element:\n\t *\n\t * ```html\n\t * <p>foo[]bar</p> -> <p>foo{}bar</p>\n\t * <p><b>foo</b>[]<b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t * <p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p> -> <p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p>\n\t * ```\n\t *\n\t * It will also take care about empty attributes when merging:\n\t *\n\t * ```html\n\t * <p><b>[]</b></p> -> <p>[]</p>\n\t * <p><b>foo</b><i>[]</i><b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t * ```\n\t *\n\t * **Note:** Difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeAttributes mergeAttributes} and\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} or\n\t * {@link module:engine/view/text~ViewText text nodes} while `mergeContainer` merges two\n\t * {@link module:engine/view/containerelement~ViewContainerElement container elements}.\n\t *\n\t * @see module:engine/view/attributeelement~ViewAttributeElement\n\t * @see module:engine/view/containerelement~ViewContainerElement\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#mergeContainers\n\t * @param position Merge position.\n\t * @returns Position after merge.\n\t */\n\tpublic mergeAttributes( position: ViewPosition ): ViewPosition {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\n\t\t// When inside text node - nothing to merge.\n\t\tif ( positionParent.is( '$text' ) ) {\n\t\t\treturn position;\n\t\t}\n\n\t\t// When inside empty attribute - remove it.\n\t\tif ( positionParent.is( 'attributeElement' ) && positionParent.childCount === 0 ) {\n\t\t\tconst parent = positionParent.parent;\n\t\t\tconst offset = positionParent.index;\n\n\t\t\tpositionParent._remove();\n\t\t\tthis._removeFromClonedElementsGroup( positionParent );\n\n\t\t\treturn this.mergeAttributes( new ViewPosition( parent!, offset! ) );\n\t\t}\n\n\t\tconst nodeBefore = ( positionParent as ViewElement ).getChild( positionOffset - 1 );\n\t\tconst nodeAfter = ( positionParent as ViewElement ).getChild( positionOffset );\n\n\t\t// Position should be placed between two nodes.\n\t\tif ( !nodeBefore || !nodeAfter ) {\n\t\t\treturn position;\n\t\t}\n\n\t\t// When position is between two text nodes.\n\t\tif ( nodeBefore.is( '$text' ) && nodeAfter.is( '$text' ) ) {\n\t\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t\t}\n\t\t// When position is between two same attribute elements.\n\t\telse if ( nodeBefore.is( 'attributeElement' ) && nodeAfter.is( 'attributeElement' ) && nodeBefore.isSimilar( nodeAfter ) ) {\n\t\t\t// Move all children nodes from node placed after selection and remove that node.\n\t\t\tconst count = nodeBefore.childCount;\n\t\t\tnodeBefore._appendChild( nodeAfter.getChildren() );\n\n\t\t\tnodeAfter._remove();\n\t\t\tthis._removeFromClonedElementsGroup( nodeAfter );\n\n\t\t\t// New position is located inside the first node, before new nodes.\n\t\t\t// Call this method recursively to merge again if needed.\n\t\t\treturn this.mergeAttributes( new ViewPosition( nodeBefore, count ) );\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * Merges two {@link module:engine/view/containerelement~ViewContainerElement container elements} that are\n\t * before and after given position. Precisely, the element after the position is removed and it's contents are\n\t * moved to element before the position.\n\t *\n\t * ```html\n\t * <p>foo</p>^<p>bar</p> -> <p>foo^bar</p>\n\t * <div>foo</div>^<p>bar</p> -> <div>foo^bar</div>\n\t * ```\n\t *\n\t * **Note:** Difference between {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeAttributes mergeAttributes} and\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} or\n\t * {@link module:engine/view/text~ViewText text nodes} while `mergeContainer` merges two\n\t * {@link module:engine/view/containerelement~ViewContainerElement container elements}.\n\t *\n\t * @see module:engine/view/attributeelement~ViewAttributeElement\n\t * @see module:engine/view/containerelement~ViewContainerElement\n\t * @see module:engine/view/downcastwriter~ViewDowncastWriter#mergeAttributes\n\t * @param position Merge position.\n\t * @returns Position after merge.\n\t */\n\tpublic mergeContainers( position: ViewPosition ): ViewPosition {\n\t\tconst prev = position.nodeBefore;\n\t\tconst next = position.nodeAfter;\n\n\t\tif ( !prev || !next || !prev.is( 'containerElement' ) || !next.is( 'containerElement' ) ) {\n\t\t\t/**\n\t\t\t * Element before and after given position cannot be merged.\n\t\t\t *\n\t\t\t * @error view-writer-merge-containers-invalid-position\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-merge-containers-invalid-position', this.document );\n\t\t}\n\n\t\tconst lastChild = prev.getChild( prev.childCount - 1 );\n\t\tconst newPosition = lastChild instanceof ViewText ?\n\t\t\tViewPosition._createAt( lastChild, 'end' ) :\n\t\t\tViewPosition._createAt( prev, 'end' );\n\n\t\tthis.move( ViewRange._createIn( next ), ViewPosition._createAt( prev, 'end' ) );\n\t\tthis.remove( ViewRange._createOn( next ) );\n\n\t\treturn newPosition;\n\t}\n\n\t/**\n\t * Inserts a node or nodes at specified position. Takes care about breaking attributes before insertion\n\t * and merging them afterwards.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n\t * contains instances that are not {@link module:engine/view/text~ViewText Texts},\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElements},\n\t * {@link module:engine/view/containerelement~ViewContainerElement ViewContainerElements},\n\t * {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElements},\n\t * {@link module:engine/view/rawelement~ViewRawElement RawElements} or\n\t * {@link module:engine/view/uielement~ViewUIElement UIElements}.\n\t *\n\t * @param position Insertion position.\n\t * @param nodes Node or nodes to insert.\n\t * @returns Range around inserted nodes.\n\t */\n\tpublic insert( position: ViewPosition, nodes: ViewNode | Iterable<ViewNode> ): ViewRange {\n\t\tnodes = isIterable( nodes ) ? [ ...nodes ] : [ nodes ];\n\n\t\t// Check if nodes to insert are instances of ViewAttributeElements, ViewContainerElements, ViewEmptyElements, UIElements or Text.\n\t\tvalidateNodesToInsert( nodes, this.document );\n\n\t\t// Group nodes in batches of nodes that require or do not require breaking an ViewAttributeElements.\n\t\tconst nodeGroups = (\n\t\t\tnodes as Array<ViewNode>\n\t\t).reduce( ( groups: Array<{ breakAttributes: boolean; nodes: Array<ViewNode> }>, node ) => {\n\t\t\tconst lastGroup = groups[ groups.length - 1 ];\n\n\t\t\t// Break attributes on nodes that do exist in the model tree so they can have attributes, other elements\n\t\t\t// can't have an attribute in model and won't get wrapped with an ViewAttributeElement while down-casted.\n\t\t\tconst breakAttributes = !node.is( 'uiElement' );\n\n\t\t\tif ( !lastGroup || lastGroup.breakAttributes != breakAttributes ) {\n\t\t\t\tgroups.push( {\n\t\t\t\t\tbreakAttributes,\n\t\t\t\t\tnodes: [ node ]\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tlastGroup.nodes.push( node );\n\t\t\t}\n\n\t\t\treturn groups;\n\t\t}, [] );\n\n\t\t// Insert nodes in batches.\n\t\tlet start = null;\n\t\tlet end = position;\n\n\t\tfor ( const { nodes, breakAttributes } of nodeGroups ) {\n\t\t\tconst range = this._insertNodes( end, nodes, breakAttributes );\n\n\t\t\tif ( !start ) {\n\t\t\t\tstart = range.start;\n\t\t\t}\n\n\t\t\tend = range.end;\n\t\t}\n\n\t\t// When no nodes were inserted - return collapsed range.\n\t\tif ( !start ) {\n\t\t\treturn new ViewRange( position );\n\t\t}\n\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Removes provided range from the container.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t * positions are not placed inside same parent container.\n\t *\n\t * @param rangeOrItem Range to remove from container\n\t * or an {@link module:engine/view/item~ViewItem item} to remove. If range is provided, after removing, it will be updated\n\t * to a collapsed range showing the new position.\n\t * @returns Document fragment containing removed nodes.\n\t */\n\tpublic remove( rangeOrItem: ViewRange | ViewItem ): ViewDocumentFragment {\n\t\tconst range = rangeOrItem instanceof ViewRange ? rangeOrItem : ViewRange._createOn( rangeOrItem );\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// If range is collapsed - nothing to remove.\n\t\tif ( range.isCollapsed ) {\n\t\t\treturn new ViewDocumentFragment( this.document );\n\t\t}\n\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent as ViewElement;\n\n\t\tconst count = breakEnd.offset - breakStart.offset;\n\n\t\t// Remove nodes in range.\n\t\tconst removed = parentContainer._removeChildren( breakStart.offset, count );\n\n\t\tfor ( const node of removed ) {\n\t\t\tthis._removeFromClonedElementsGroup( node );\n\t\t}\n\n\t\t// Merge after removing.\n\t\tconst mergePosition = this.mergeAttributes( breakStart );\n\t\t( range as any ).start = mergePosition;\n\t\t( range as any ).end = mergePosition.clone();\n\n\t\t// Return removed nodes.\n\t\treturn new ViewDocumentFragment( this.document, removed );\n\t}\n\n\t/**\n\t * Removes matching elements from given range.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t * positions are not placed inside same parent container.\n\t *\n\t * @param range Range to clear.\n\t * @param element Element to remove.\n\t */\n\tpublic clear( range: ViewRange, element: ViewElement ): void {\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// Create walker on given range.\n\t\t// We walk backward because when we remove element during walk it modifies range end position.\n\t\tconst walker = range.getWalker( {\n\t\t\tdirection: 'backward',\n\t\t\tignoreElementEnd: true\n\t\t} );\n\n\t\t// Let's walk.\n\t\tfor ( const current of walker ) {\n\t\t\tconst item = current.item;\n\t\t\tlet rangeToRemove;\n\n\t\t\t// When current item matches to the given element.\n\t\t\tif ( item.is( 'element' ) && element.isSimilar( item ) ) {\n\t\t\t\t// Create range on this element.\n\t\t\t\trangeToRemove = ViewRange._createOn( item );\n\t\t\t\t// When range starts inside Text or TextProxy element.\n\t\t\t} else if ( !current.nextPosition.isAfter( range.start ) && item.is( '$textProxy' ) ) {\n\t\t\t\t// We need to check if parent of this text matches to given element.\n\t\t\t\tconst parentElement = item.getAncestors().find( ancestor => {\n\t\t\t\t\treturn ancestor.is( 'element' ) && element.isSimilar( ancestor );\n\t\t\t\t} );\n\n\t\t\t\t// If it is then create range inside this element.\n\t\t\t\tif ( parentElement ) {\n\t\t\t\t\trangeToRemove = ViewRange._createIn( parentElement as ViewElement );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we have found element to remove.\n\t\t\tif ( rangeToRemove ) {\n\t\t\t\t// We need to check if element range stick out of the given range and truncate if it is.\n\t\t\t\tif ( rangeToRemove.end.isAfter( range.end ) ) {\n\t\t\t\t\t( rangeToRemove as any ).end = range.end;\n\t\t\t\t}\n\n\t\t\t\tif ( rangeToRemove.start.isBefore( range.start ) ) {\n\t\t\t\t\t( rangeToRemove as any ).start = range.start;\n\t\t\t\t}\n\n\t\t\t\t// At the end we remove range with found element.\n\t\t\t\tthis.remove( rangeToRemove );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Moves nodes from provided range to target position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t * positions are not placed inside same parent container.\n\t *\n\t * @param sourceRange Range containing nodes to move.\n\t * @param targetPosition Position to insert.\n\t * @returns Range in target container. Inserted nodes are placed between\n\t * {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end} positions.\n\t */\n\tpublic move( sourceRange: ViewRange, targetPosition: ViewPosition ): ViewRange {\n\t\tlet nodes;\n\n\t\tif ( targetPosition.isAfter( sourceRange.end ) ) {\n\t\t\ttargetPosition = this._breakAttributes( targetPosition, true );\n\n\t\t\tconst parent = targetPosition.parent as ViewElement;\n\t\t\tconst countBefore = parent.childCount;\n\n\t\t\tsourceRange = this._breakAttributesRange( sourceRange, true );\n\n\t\t\tnodes = this.remove( sourceRange );\n\n\t\t\ttargetPosition.offset += ( parent.childCount - countBefore );\n\t\t} else {\n\t\t\tnodes = this.remove( sourceRange );\n\t\t}\n\n\t\treturn this.insert( targetPosition, nodes );\n\t}\n\n\t/**\n\t * Wraps elements within range with provided {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t * If a collapsed range is provided, it will be wrapped only if it is equal to view selection.\n\t *\n\t * If a collapsed range was passed and is same as selection, the selection\n\t * will be moved to the inside of the wrapped attribute element.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-invalid-range-container`\n\t * when {@link module:engine/view/range~ViewRange#start}\n\t * and {@link module:engine/view/range~ViewRange#end} positions are not placed inside same parent container.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-nonselection-collapsed-range` when passed range\n\t * is collapsed and different than view selection.\n\t *\n\t * @param range Range to wrap.\n\t * @param attribute Attribute element to use as wrapper.\n\t * @returns range Range after wrapping, spanning over wrapping attribute element.\n\t */\n\tpublic wrap( range: ViewRange, attribute: ViewAttributeElement ): ViewRange {\n\t\tif ( !( attribute instanceof ViewAttributeElement ) ) {\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-writer-wrap-invalid-attribute',\n\t\t\t\tthis.document\n\t\t\t);\n\t\t}\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\tif ( !range.isCollapsed ) {\n\t\t\t// Non-collapsed range. Wrap it with the attribute element.\n\t\t\treturn this._wrapRange( range, attribute );\n\t\t} else {\n\t\t\t// Collapsed range. Wrap position.\n\t\t\tlet position = range.start;\n\n\t\t\tif ( position.parent.is( 'element' ) && !_hasNonUiChildren( position.parent ) ) {\n\t\t\t\tposition = position.getLastMatchingPosition( value => value.item.is( 'uiElement' ) );\n\t\t\t}\n\n\t\t\tposition = this._wrapPosition( position, attribute );\n\t\t\tconst viewSelection = this.document.selection;\n\n\t\t\t// If wrapping position is equal to view selection, move view selection inside wrapping attribute element.\n\t\t\tif ( viewSelection.isCollapsed && viewSelection.getFirstPosition()!.isEqual( range.start ) ) {\n\t\t\t\tthis.setSelection( position );\n\t\t\t}\n\n\t\t\treturn new ViewRange( position );\n\t\t}\n\t}\n\n\t/**\n\t * Unwraps nodes within provided range from attribute element.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~ViewRange#start start} and {@link module:engine/view/range~ViewRange#end end}\n\t * positions are not placed inside same parent container.\n\t */\n\tpublic unwrap( range: ViewRange, attribute: ViewAttributeElement ): ViewRange {\n\t\tif ( !( attribute instanceof ViewAttributeElement ) ) {\n\t\t\t/**\n\t\t\t * The `attribute` passed to {@link module:engine/view/downcastwriter~ViewDowncastWriter#unwrap `ViewDowncastWriter#unwrap()`}\n\t\t\t * must be an instance of {@link module:engine/view/attributeelement~ViewAttributeElement `AttributeElement`}.\n\t\t\t *\n\t\t\t * @error view-writer-unwrap-invalid-attribute\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-writer-unwrap-invalid-attribute',\n\t\t\t\tthis.document\n\t\t\t);\n\t\t}\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// If range is collapsed - nothing to unwrap.\n\t\tif ( range.isCollapsed ) {\n\t\t\treturn range;\n\t\t}\n\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent as ViewElement;\n\n\t\t// Unwrap children located between break points.\n\t\tconst newRange = this._unwrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t\t// Merge attributes at the both ends and return a new range.\n\t\tconst start = this.mergeAttributes( newRange.start );\n\n\t\t// If start position was merged - move end position back.\n\t\tif ( !start.isEqual( newRange.start ) ) {\n\t\t\tnewRange.end.offset--;\n\t\t}\n\n\t\tconst end = this.mergeAttributes( newRange.end );\n\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Renames element by creating a copy of renamed element but with changed name and then moving contents of the\n\t * old element to the new one. Keep in mind that this will invalidate all {@link module:engine/view/position~ViewPosition positions}\n\t * which has renamed element as {@link module:engine/view/position~ViewPosition#parent a parent}.\n\t *\n\t * New element has to be created because `Element#tagName` property in DOM is readonly.\n\t *\n\t * Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n\t *\n\t * @param newName New name for element.\n\t * @param viewElement Element to be renamed.\n\t * @returns Element created due to rename.\n\t */\n\tpublic rename( newName: string, viewElement: ViewContainerElement ): ViewContainerElement {\n\t\tconst newElement = new ViewContainerElement( this.document, newName, viewElement.getAttributes() );\n\n\t\tthis.insert( ViewPosition._createAfter( viewElement ), newElement );\n\t\tthis.move( ViewRange._createIn( viewElement ), ViewPosition._createAt( newElement, 0 ) );\n\t\tthis.remove( ViewRange._createOn( viewElement ) );\n\n\t\treturn newElement;\n\t}\n\n\t/**\n\t * Cleans up memory by removing obsolete cloned elements group from the writer.\n\t *\n\t * Should be used whenever all {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements}\n\t * with the same {@link module:engine/view/attributeelement~ViewAttributeElement#id id} are going to be removed from the view and\n\t * the group will no longer be needed.\n\t *\n\t * Cloned elements group are not removed automatically in case if the group is still needed after all its elements\n\t * were removed from the view.\n\t *\n\t * Keep in mind that group names are equal to the `id` property of the attribute element.\n\t *\n\t * @param groupName Name of the group to clear.\n\t */\n\tpublic clearClonedElementsGroup( groupName: string ): void {\n\t\tthis._cloneGroups.delete( groupName );\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~ViewPosition position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t */\n\tpublic createPositionAt( itemOrPosition: ViewItem | ViewPosition, offset?: ViewPositionOffset ): ViewPosition {\n\t\treturn ViewPosition._createAt( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @param item View item after which the position should be located.\n\t */\n\tpublic createPositionAfter( item: ViewItem ): ViewPosition {\n\t\treturn ViewPosition._createAfter( item );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @param item View item before which the position should be located.\n\t */\n\tpublic createPositionBefore( item: ViewItem ): ViewPosition {\n\t\treturn ViewPosition._createBefore( item );\n\t}\n\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates its own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */\n\tpublic createRange( start: ViewPosition, end?: ViewPosition | null ): ViewRange {\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t */\n\tpublic createRangeOn( item: ViewItem ): ViewRange {\n\t\treturn ViewRange._createOn( item );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic createRangeIn( element: ViewElement | ViewDocumentFragment ): ViewRange {\n\t\treturn ViewRange._createIn( element );\n\t}\n\n\t/**\n\t * Creates new {@link module:engine/view/selection~ViewSelection} instance.\n\t *\n\t * ```ts\n\t * // Creates collapsed selection at the position of given item and offset.\n\t * const paragraph = writer.createContainerElement( 'p' );\n\t * const selection = writer.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = writer.createSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( element, 'in', { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = writer.createSelection( element, 'in', { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:SELECTABLE `createSelection( selectable, options )`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic createSelection( selectable: ViewNode, placeOrOffset: ViewPlaceOrOffset, options?: ViewSelectionOptions ): ViewSelection;\n\n\t/**\n\t * Creates new {@link module:engine/view/selection~ViewSelection} instance.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = writer.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = writer.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * const selection = writer.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = writer.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the document selection.\n\t * const selection = writer.createSelection( editor.editing.view.document.selection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * const selection = writer.createSelection( position );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = writer.createSelection( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:NODE_OFFSET `createSelection( node, placeOrOffset, options )`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic createSelection( selectable?: Exclude<ViewSelectable, ViewNode>, option?: ViewSelectionOptions ): ViewSelection;\n\n\tpublic createSelection( ...args: ConstructorParameters<typeof ViewSelection> ): ViewSelection {\n\t\treturn new ViewSelection( ...args );\n\t}\n\n\t/**\n\t * Creates placeholders for child elements of the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `elementToStructure()`} conversion helper.\n\t *\n\t * ```ts\n\t * const viewSlot = conversionApi.writer.createSlot();\n\t * const viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t *\n\t * conversionApi.writer.insert( viewPosition, viewSlot );\n\t * ```\n\t *\n\t * It could be filtered down to a specific subset of children (only `<foo>` model elements in this case):\n\t *\n\t * ```ts\n\t * const viewSlot = conversionApi.writer.createSlot( node => node.is( 'element', 'foo' ) );\n\t * const viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t *\n\t * conversionApi.writer.insert( viewPosition, viewSlot );\n\t * ```\n\t *\n\t * While providing a filtered slot, make sure to provide slots for all child nodes. A single node cannot be downcasted into\n\t * multiple slots.\n\t *\n\t * **Note**: You should not change the order of nodes. View elements should be in the same order as model nodes.\n\t *\n\t * @param modeOrFilter The filter for child nodes.\n\t * @returns The slot element to be placed in to the view structure while processing\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure `elementToStructure()`}.\n\t */\n\tpublic createSlot( modeOrFilter: 'children' | DowncastSlotFilter = 'children' ): ViewElement {\n\t\tif ( !this._slotFactory ) {\n\t\t\t/**\n\t\t\t * The `createSlot()` method is only allowed inside the `elementToStructure` downcast helper callback.\n\t\t\t *\n\t\t\t * @error view-writer-invalid-create-slot-context\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-invalid-create-slot-context', this.document );\n\t\t}\n\n\t\treturn this._slotFactory( this, modeOrFilter );\n\t}\n\n\t/**\n\t * Registers a slot factory.\n\t *\n\t * @internal\n\t * @param slotFactory The slot factory.\n\t */\n\tpublic _registerSlotFactory(\n\t\tslotFactory: ( writer: ViewDowncastWriter, modeOrFilter: 'children' | DowncastSlotFilter ) => ViewElement\n\t): void {\n\t\tthis._slotFactory = slotFactory;\n\t}\n\n\t/**\n\t * Clears the registered slot factory.\n\t *\n\t * @internal\n\t */\n\tpublic _clearSlotFactory(): void {\n\t\tthis._slotFactory = null;\n\t}\n\n\t/**\n\t * Inserts a node or nodes at the specified position. Takes care of breaking attributes before insertion\n\t * and merging them afterwards if requested by the breakAttributes param.\n\t *\n\t * @param position Insertion position.\n\t * @param nodes Node or nodes to insert.\n\t * @param breakAttributes Whether attributes should be broken.\n\t * @returns Range around inserted nodes.\n\t */\n\tprivate _insertNodes( position: ViewPosition, nodes: Iterable<ViewNode>, breakAttributes: boolean ): ViewRange {\n\t\tlet parentElement;\n\n\t\t// Break attributes on nodes that do exist in the model tree so they can have attributes, other elements\n\t\t// can't have an attribute in model and won't get wrapped with an ViewAttributeElement while down-casted.\n\t\tif ( breakAttributes ) {\n\t\t\tparentElement = getParentContainer( position );\n\t\t} else {\n\t\t\tparentElement = position.parent.is( '$text' ) ? position.parent.parent : position.parent;\n\t\t}\n\n\t\tif ( !parentElement ) {\n\t\t\t/**\n\t\t\t * Position's parent container cannot be found.\n\t\t\t *\n\t\t\t * @error view-writer-invalid-position-container\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'view-writer-invalid-position-container',\n\t\t\t\tthis.document\n\t\t\t);\n\t\t}\n\n\t\tlet insertionPosition;\n\n\t\tif ( breakAttributes ) {\n\t\t\tinsertionPosition = this._breakAttributes( position, true );\n\t\t} else {\n\t\t\tinsertionPosition = position.parent.is( '$text' ) ? breakTextNode( position ) : position;\n\t\t}\n\n\t\tconst length = ( parentElement as ViewElement | ViewDocumentFragment )._insertChild( insertionPosition.offset, nodes );\n\n\t\tfor ( const node of nodes ) {\n\t\t\tthis._addToClonedElementsGroup( node );\n\t\t}\n\n\t\tconst endPosition = insertionPosition.getShiftedBy( length );\n\t\tconst start = this.mergeAttributes( insertionPosition );\n\n\t\t// If start position was merged - move end position.\n\t\tif ( !start.isEqual( insertionPosition ) ) {\n\t\t\tendPosition.offset--;\n\t\t}\n\n\t\tconst end = this.mergeAttributes( endPosition );\n\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Wraps children with provided `wrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be wrapped.\n\t */\n\tprivate _wrapChildren( parent: ViewElement, startOffset: number, endOffset: number, wrapElement: ViewAttributeElement ) {\n\t\tlet i = startOffset;\n\t\tconst wrapPositions: Array<ViewPosition> = [];\n\n\t\twhile ( i < endOffset ) {\n\t\t\tconst child = parent.getChild( i )!;\n\t\t\tconst isText = child.is( '$text' );\n\t\t\tconst isAttribute = child.is( 'attributeElement' );\n\n\t\t\t//\n\t\t\t// (In all examples, assume that `wrapElement` is `<span class=\"foo\">` element.)\n\t\t\t//\n\t\t\t// Check if `wrapElement` can be joined with the wrapped element. One of requirements is having same name.\n\t\t\t// If possible, join elements.\n\t\t\t//\n\t\t\t// <p><span class=\"bar\">abc</span></p>  -->  <p><span class=\"foo bar\">abc</span></p>\n\t\t\t//\n\t\t\tif ( isAttribute && child._canMergeAttributesFrom( wrapElement ) ) {\n\t\t\t\tchild._mergeAttributesFrom( wrapElement );\n\t\t\t\twrapPositions.push( new ViewPosition( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// Wrap the child if it is not an attribute element or if it is an attribute element that should be inside\n\t\t\t// `wrapElement` (due to priority).\n\t\t\t//\n\t\t\t// <p>abc</p>                   -->  <p><span class=\"foo\">abc</span></p>\n\t\t\t// <p><strong>abc</strong></p>  -->  <p><span class=\"foo\"><strong>abc</strong></span></p>\n\t\t\telse if ( isText || !isAttribute || shouldABeOutsideB( wrapElement, child ) ) {\n\t\t\t\t// Clone attribute.\n\t\t\t\tconst newAttribute = wrapElement._clone();\n\n\t\t\t\t// Wrap current node with new attribute.\n\t\t\t\tchild._remove();\n\t\t\t\tnewAttribute._appendChild( child );\n\n\t\t\t\tparent._insertChild( i, newAttribute );\n\t\t\t\tthis._addToClonedElementsGroup( newAttribute );\n\n\t\t\t\twrapPositions.push( new ViewPosition( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// If other nested attribute is found and it wasn't wrapped (see above), continue wrapping inside it.\n\t\t\t//\n\t\t\t// <p><a href=\"foo.html\">abc</a></p>  -->  <p><a href=\"foo.html\"><span class=\"foo\">abc</span></a></p>\n\t\t\t//\n\t\t\telse /* if ( isAttribute ) */ {\n\t\t\t\tthis._wrapChildren( child, 0, child.childCount, wrapElement );\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each wrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of wrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn ViewRange._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Unwraps children from provided `unwrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be unwrapped.\n\t */\n\tprivate _unwrapChildren( parent: ViewElement, startOffset: number, endOffset: number, unwrapElement: ViewAttributeElement ) {\n\t\tlet i = startOffset;\n\t\tconst unwrapPositions: Array<ViewPosition> = [];\n\n\t\t// Iterate over each element between provided offsets inside parent.\n\t\t// We don't use tree walker or range iterator because we will be removing and merging potentially multiple nodes,\n\t\t// so it could get messy. It is safer to it manually in this case.\n\t\twhile ( i < endOffset ) {\n\t\t\tconst child = parent.getChild( i )!;\n\n\t\t\t// Skip all text nodes. There should be no container element's here either.\n\t\t\tif ( !child.is( 'attributeElement' ) ) {\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// (In all examples, assume that `unwrapElement` is `<span class=\"foo\">` element.)\n\t\t\t//\n\t\t\t// If the child is similar to the given attribute element, unwrap it - it will be completely removed.\n\t\t\t//\n\t\t\t// <p><span class=\"foo\">abc</span>xyz</p>  -->  <p>abcxyz</p>\n\t\t\t//\n\t\t\tif ( child.isSimilar( unwrapElement ) ) {\n\t\t\t\tconst unwrapped = child.getChildren();\n\t\t\t\tconst count = child.childCount;\n\n\t\t\t\t// Replace wrapper element with its children\n\t\t\t\tchild._remove();\n\t\t\t\tparent._insertChild( i, unwrapped );\n\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\n\t\t\t\t// Save start and end position of moved items.\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew ViewPosition( parent, i ),\n\t\t\t\t\tnew ViewPosition( parent, i + count )\n\t\t\t\t);\n\n\t\t\t\t// Skip elements that were unwrapped. Assuming there won't be another element to unwrap in child elements.\n\t\t\t\ti += count;\n\t\t\t\tendOffset += count - 1;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If the child is not similar but is an attribute element, try partial unwrapping - remove the same attributes/styles/classes.\n\t\t\t// Partial unwrapping will happen only if the elements have the same name.\n\t\t\t//\n\t\t\t// <p><span class=\"foo bar\">abc</span>xyz</p>  -->  <p><span class=\"bar\">abc</span>xyz</p>\n\t\t\t// <p><i class=\"foo\">abc</i>xyz</p>            -->  <p><i class=\"foo\">abc</i>xyz</p>\n\t\t\t//\n\t\t\tif ( child._canSubtractAttributesOf( unwrapElement ) ) {\n\t\t\t\tchild._subtractAttributesOf( unwrapElement );\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew ViewPosition( parent, i ),\n\t\t\t\t\tnew ViewPosition( parent, i + 1 )\n\t\t\t\t);\n\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If other nested attribute is found, look through it's children for elements to unwrap.\n\t\t\t//\n\t\t\t// <p><i><span class=\"foo\">abc</span></i><p>  -->  <p><i>abc</i><p>\n\t\t\t//\n\t\t\tthis._unwrapChildren( child, 0, child.childCount, unwrapElement );\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each unwrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of unwrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset || position.offset == endOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn ViewRange._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Helper function for `view.writer.wrap`. Wraps range with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t *\n\t * @returns New range after wrapping, spanning over wrapping attribute element.\n\t */\n\tprivate _wrapRange( range: ViewRange, attribute: ViewAttributeElement ): ViewRange {\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent as ViewElement;\n\n\t\t// Wrap all children with attribute.\n\t\tconst newRange = this._wrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t\t// Merge attributes at the both ends and return a new range.\n\t\tconst start = this.mergeAttributes( newRange.start );\n\n\t\t// If start position was merged - move end position back.\n\t\tif ( !start.isEqual( newRange.start ) ) {\n\t\t\tnewRange.end.offset--;\n\t\t}\n\t\tconst end = this.mergeAttributes( newRange.end );\n\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Helper function for {@link #wrap}. Wraps position with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement}.\n\t *\n\t * @returns New position after wrapping.\n\t */\n\tprivate _wrapPosition( position: ViewPosition, attribute: ViewAttributeElement ): ViewPosition {\n\t\t// Return same position when trying to wrap with attribute similar to position parent.\n\t\tif ( attribute.isSimilar( position.parent as any ) ) {\n\t\t\treturn movePositionToTextNode( position.clone() );\n\t\t}\n\n\t\t// When position is inside text node - break it and place new position between two text nodes.\n\t\tif ( position.parent.is( '$text' ) ) {\n\t\t\tposition = breakTextNode( position );\n\t\t}\n\n\t\t// Create fake element that will represent position, and will not be merged with other attributes.\n\t\tconst fakeElement = this.createAttributeElement( '_wrapPosition-fake-element' );\n\t\t( fakeElement as any )._priority = Number.POSITIVE_INFINITY;\n\t\tfakeElement.isSimilar = () => false;\n\n\t\t// Insert fake element in position location.\n\t\t( position.parent as ViewElement )._insertChild( position.offset, fakeElement );\n\n\t\t// Range around inserted fake attribute element.\n\t\tconst wrapRange = new ViewRange( position, position.getShiftedBy( 1 ) );\n\n\t\t// Wrap fake element with attribute (it will also merge if possible).\n\t\tthis.wrap( wrapRange, attribute );\n\n\t\t// Remove fake element and place new position there.\n\t\tconst newPosition = new ViewPosition( fakeElement.parent!, fakeElement.index! );\n\t\tfakeElement._remove();\n\n\t\t// If position is placed between text nodes - merge them and return position inside.\n\t\tconst nodeBefore = newPosition.nodeBefore;\n\t\tconst nodeAfter = newPosition.nodeAfter;\n\n\t\tif ( nodeBefore && nodeBefore.is( 'view:$text' ) && nodeAfter && nodeAfter.is( 'view:$text' ) ) {\n\t\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t\t}\n\n\t\t// If position is next to text node - move position inside.\n\t\treturn movePositionToTextNode( newPosition );\n\t}\n\n\t/**\n\t * Helper function used by other `ViewDowncastWriter` methods. Breaks attribute elements at the boundaries of given range.\n\t *\n\t * @param range Range which `start` and `end` positions will be used to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New range with located at break positions.\n\t */\n\tprivate _breakAttributesRange( range: ViewRange, forceSplitText: boolean = false ) {\n\t\tconst rangeStart = range.start;\n\t\tconst rangeEnd = range.end;\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// Break at the collapsed position. Return new collapsed range.\n\t\tif ( range.isCollapsed ) {\n\t\t\tconst position = this._breakAttributes( range.start, forceSplitText );\n\n\t\t\treturn new ViewRange( position, position );\n\t\t}\n\n\t\tconst breakEnd = this._breakAttributes( rangeEnd, forceSplitText );\n\t\tconst count = ( breakEnd.parent as ViewElement ).childCount;\n\t\tconst breakStart = this._breakAttributes( rangeStart, forceSplitText );\n\n\t\t// Calculate new break end offset.\n\t\tbreakEnd.offset += ( breakEnd.parent as ViewElement ).childCount - count;\n\n\t\treturn new ViewRange( breakStart, breakEnd );\n\t}\n\n\t/**\n\t * Helper function used by other `ViewDowncastWriter` methods. Breaks attribute elements at given position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n\t * is placed inside {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n\t * is placed inside {@link module:engine/view/uielement~ViewUIElement UIElement}.\n\t *\n\t * @param position Position where to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New position after breaking the attributes.\n\t */\n\tprivate _breakAttributes( position: ViewPosition, forceSplitText: boolean = false ): ViewPosition {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\n\t\t// If position is placed inside ViewEmptyElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'emptyElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break an `EmptyElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes `ViewDowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-empty-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-empty-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside UIElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'uiElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `UIElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes `ViewDowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-ui-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-ui-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside RawElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'rawElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `RawElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#breakAttributes `ViewDowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-raw-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-raw-element', this.document );\n\t\t}\n\n\t\t// There are no attributes to break and text nodes breaking is not forced.\n\t\tif ( !forceSplitText && positionParent.is( '$text' ) && isContainerOrFragment( positionParent.parent! ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Position's parent is container, so no attributes to break.\n\t\tif ( isContainerOrFragment( positionParent ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Break text and start again in new position.\n\t\tif ( positionParent.is( '$text' ) ) {\n\t\t\treturn this._breakAttributes( breakTextNode( position ), forceSplitText );\n\t\t}\n\n\t\tconst length = ( positionParent as any ).childCount;\n\n\t\t// <p>foo<b><u>bar{}</u></b></p>\n\t\t// <p>foo<b><u>bar</u>[]</b></p>\n\t\t// <p>foo<b><u>bar</u></b>[]</p>\n\t\tif ( positionOffset == length ) {\n\t\t\tconst newPosition = new ViewPosition( positionParent.parent as any, ( positionParent as any ).index + 1 );\n\n\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t} else {\n\t\t\t// <p>foo<b><u>{}bar</u></b></p>\n\t\t\t// <p>foo<b>[]<u>bar</u></b></p>\n\t\t\t// <p>foo{}<b><u>bar</u></b></p>\n\t\t\tif ( positionOffset === 0 ) {\n\t\t\t\tconst newPosition = new ViewPosition( positionParent.parent as ViewElement, ( positionParent as any ).index );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t\t// <p>foo<b><u>b{}ar</u></b></p>\n\t\t\t// <p>foo<b><u>b[]ar</u></b></p>\n\t\t\t// <p>foo<b><u>b</u>[]<u>ar</u></b></p>\n\t\t\t// <p>foo<b><u>b</u></b>[]<b><u>ar</u></b></p>\n\t\t\telse {\n\t\t\t\tconst offsetAfter = ( positionParent as any ).index + 1;\n\n\t\t\t\t// Break element.\n\t\t\t\tconst clonedNode = ( positionParent as any )._clone();\n\n\t\t\t\t// Insert cloned node to position's parent node.\n\t\t\t\t( positionParent.parent as any )._insertChild( offsetAfter, clonedNode );\n\t\t\t\tthis._addToClonedElementsGroup( clonedNode );\n\n\t\t\t\t// Get nodes to move.\n\t\t\t\tconst count = ( positionParent as any ).childCount - positionOffset;\n\t\t\t\tconst nodesToMove = ( positionParent as any )._removeChildren( positionOffset, count );\n\n\t\t\t\t// Move nodes to cloned node.\n\t\t\t\tclonedNode._appendChild( nodesToMove );\n\n\t\t\t\t// Create new position to work on.\n\t\t\t\tconst newPosition = new ViewPosition( ( positionParent as any ).parent, offsetAfter );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information that an {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} was\n\t * added to the tree. Saves the reference to the group in the given element and updates the group, so other elements\n\t * from the group now keep a reference to the given attribute element.\n\t *\n\t * The clones group can be obtained using {@link module:engine/view/attributeelement~ViewAttributeElement#getElementsWithSameId}.\n\t *\n\t * Does nothing if added element has no {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t *\n\t * @param element Attribute element to save.\n\t */\n\tprivate _addToClonedElementsGroup( element: ViewNode ): void {\n\t\t// Add only if the element is in document tree.\n\t\tif ( !element.root.is( 'rootElement' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Traverse the element's children recursively to find other attribute elements that also might got inserted.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._addToClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = ( element as any ).id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\tgroup = new Set();\n\t\t\tthis._cloneGroups.set( id, group );\n\t\t}\n\n\t\tgroup.add( element as ViewAttributeElement );\n\t\t( element as any )._clonesGroup = group;\n\t}\n\n\t/**\n\t * Removes all the information about the given {@link module:engine/view/attributeelement~ViewAttributeElement attribute element}\n\t * from its clones group.\n\t *\n\t * Keep in mind, that the element will still keep a reference to the group (but the group will not keep a reference to it).\n\t * This allows to reference the whole group even if the element was already removed from the tree.\n\t *\n\t * Does nothing if the element has no {@link module:engine/view/attributeelement~ViewAttributeElement#id id}.\n\t *\n\t * @param element Attribute element to remove.\n\t */\n\tprivate _removeFromClonedElementsGroup( element: ViewNode ) {\n\t\t// Traverse the element's children recursively to find other attribute elements that also got removed.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = ( element as any ).id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\treturn;\n\t\t}\n\n\t\tgroup.delete( element as ViewAttributeElement );\n\t\t// Not removing group from element on purpose!\n\t\t// If other parts of code have reference to this element, they will be able to get references to other elements from the group.\n\t}\n}\n\n// Helper function for `view.writer.wrap`. Checks if given element has any children that are not ui elements.\nfunction _hasNonUiChildren( parent: ViewElement ): boolean {\n\treturn Array.from( parent.getChildren() ).some( child => !child.is( 'uiElement' ) );\n}\n\n/**\n * The `attribute` passed to {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#wrap()`}\n * must be an instance of {@link module:engine/view/attributeelement~ViewAttributeElement `AttributeElement`}.\n *\n * @error view-writer-wrap-invalid-attribute\n */\n\n/**\n * Returns first parent container of specified {@link module:engine/view/position~ViewPosition Position}.\n * Position's parent node is checked as first, then next parents are checked.\n * Note that {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment} is treated like a container.\n *\n * @param position Position used as a start point to locate parent container.\n * @returns Parent container element or `undefined` if container is not found.\n */\nfunction getParentContainer( position: ViewPosition ): ViewContainerElement | ViewDocumentFragment | undefined {\n\tlet parent = position.parent;\n\n\twhile ( !isContainerOrFragment( parent ) ) {\n\t\tif ( !parent ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tparent = parent.parent as any;\n\t}\n\n\treturn ( parent as ViewContainerElement | ViewDocumentFragment );\n}\n\n/**\n * Checks if first {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement} provided to the function\n * can be wrapped outside second element. It is done by comparing elements'\n * {@link module:engine/view/attributeelement~ViewAttributeElement#priority priorities}, if both have same priority\n * {@link module:engine/view/element~ViewElement#getIdentity identities} are compared.\n */\nfunction shouldABeOutsideB( a: ViewAttributeElement, b: ViewAttributeElement ): boolean {\n\tif ( a.priority < b.priority ) {\n\t\treturn true;\n\t} else if ( a.priority > b.priority ) {\n\t\treturn false;\n\t}\n\n\t// When priorities are equal and names are different - use identities.\n\treturn a.getIdentity() < b.getIdentity();\n}\n\n/**\n * Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n * specified position.\n *\n * ```html\n * <p>foo[]</p>  ->  <p>foo{}</p>\n * <p>[]foo</p>  ->  <p>{}foo</p>\n * ```\n *\n * @returns Position located inside text node or same position if there is no text nodes\n * before or after position location.\n */\nfunction movePositionToTextNode( position: ViewPosition ): ViewPosition {\n\tconst nodeBefore = position.nodeBefore;\n\n\tif ( nodeBefore && nodeBefore.is( '$text' ) ) {\n\t\treturn new ViewPosition( nodeBefore, nodeBefore.data.length );\n\t}\n\n\tconst nodeAfter = position.nodeAfter;\n\n\tif ( nodeAfter && nodeAfter.is( '$text' ) ) {\n\t\treturn new ViewPosition( nodeAfter, 0 );\n\t}\n\n\treturn position;\n}\n\n/**\n * Breaks text node into two text nodes when possible.\n *\n * ```html\n * <p>foo{}bar</p> -> <p>foo[]bar</p>\n * <p>{}foobar</p> -> <p>[]foobar</p>\n * <p>foobar{}</p> -> <p>foobar[]</p>\n * ```\n *\n * @param position Position that need to be placed inside text node.\n * @returns New position after breaking text node.\n */\nfunction breakTextNode( position: ViewPosition ): ViewPosition {\n\tif ( position.offset == ( position.parent as ViewText ).data.length ) {\n\t\treturn new ViewPosition( position.parent.parent as any, ( position.parent as ViewText ).index! + 1 );\n\t}\n\n\tif ( position.offset === 0 ) {\n\t\treturn new ViewPosition( position.parent.parent as any, ( position.parent as ViewText ).index! );\n\t}\n\n\t// Get part of the text that need to be moved.\n\tconst textToMove = ( position.parent as ViewText ).data.slice( position.offset );\n\n\t// Leave rest of the text in position's parent.\n\t( position.parent as ViewText )._data = ( position.parent as ViewText ).data.slice( 0, position.offset );\n\n\t// Insert new text node after position's parent text node.\n\t( position.parent.parent as any )._insertChild(\n\t\t( position.parent as ViewText ).index! + 1,\n\t\tnew ViewText( position.root.document, textToMove )\n\t);\n\n\t// Return new position between two newly created text nodes.\n\treturn new ViewPosition( position.parent.parent as any, ( position.parent as ViewText ).index! + 1 );\n}\n\n/**\n * Merges two text nodes into first node. Removes second node and returns merge position.\n *\n * @param t1 First text node to merge. Data from second text node will be moved at the end of this text node.\n * @param t2 Second text node to merge. This node will be removed after merging.\n * @returns Position after merging text nodes.\n */\nfunction mergeTextNodes( t1: ViewText, t2: ViewText ): ViewPosition {\n\t// Merge text data into first text node and remove second one.\n\tconst nodeBeforeLength = t1.data.length;\n\tt1._data += t2.data;\n\tt2._remove();\n\n\treturn new ViewPosition( t1, nodeBeforeLength );\n}\n\nconst validNodesToInsert = [ ViewText, ViewAttributeElement, ViewContainerElement, ViewEmptyElement, ViewRawElement, ViewUIElement ];\n\n/**\n * Checks if provided nodes are valid to insert.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n * contains instances that are not supported ones (see error description for valid ones.\n */\nfunction validateNodesToInsert( nodes: Iterable<ViewNode>, errorContext: ViewDocument ): void {\n\tfor ( const node of nodes ) {\n\t\tif ( !validNodesToInsert.some( validNode => node instanceof validNode ) ) {\n\t\t\t/**\n\t\t\t * One of the nodes to be inserted is of an invalid type.\n\t\t\t *\n\t\t\t * Nodes to be inserted with {@link module:engine/view/downcastwriter~ViewDowncastWriter#insert `ViewDowncastWriter#insert()`}\n\t\t\t * should be of the following types:\n\t\t\t *\n\t\t\t * * {@link module:engine/view/attributeelement~ViewAttributeElement ViewAttributeElement},\n\t\t\t * * {@link module:engine/view/containerelement~ViewContainerElement ViewContainerElement},\n\t\t\t * * {@link module:engine/view/emptyelement~ViewEmptyElement ViewEmptyElement},\n\t\t\t * * {@link module:engine/view/uielement~ViewUIElement UIElement},\n\t\t\t * * {@link module:engine/view/rawelement~ViewRawElement RawElement},\n\t\t\t * * {@link module:engine/view/text~ViewText Text}.\n\t\t\t *\n\t\t\t * @error view-writer-insert-invalid-node-type\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-insert-invalid-node-type', errorContext );\n\t\t}\n\n\t\tif ( !node.is( '$text' ) ) {\n\t\t\tvalidateNodesToInsert( ( node as ViewElement ).getChildren(), errorContext );\n\t\t}\n\t}\n}\n\n/**\n * Checks if node is ViewContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n *\n * @returns Returns `true` if node is instance of ViewContainerElement or DocumentFragment.\n */\nfunction isContainerOrFragment( node: ViewNode | ViewDocumentFragment ): boolean {\n\treturn node && ( node.is( 'containerElement' ) || node.is( 'documentFragment' ) );\n}\n\n/**\n * Checks if {@link module:engine/view/range~ViewRange#start range start} and {@link module:engine/view/range~ViewRange#end range end}\n * are placed inside same {@link module:engine/view/containerelement~ViewContainerElement container element}.\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n */\nfunction validateRangeContainer( range: ViewRange, errorContext: ViewDocument ) {\n\tconst startContainer = getParentContainer( range.start );\n\tconst endContainer = getParentContainer( range.end );\n\n\tif ( !startContainer || !endContainer || startContainer !== endContainer ) {\n\t\t/**\n\t\t * The container of the given range is invalid.\n\t\t *\n\t\t * This may happen if {@link module:engine/view/range~ViewRange#start range start} and\n\t\t * {@link module:engine/view/range~ViewRange#end range end} positions are not placed inside the same container element or\n\t\t * a parent container for these positions cannot be found.\n\t\t *\n\t\t * Methods like {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#remove()`},\n\t\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#clean()`},\n\t\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#wrap()`},\n\t\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#wrap `ViewDowncastWriter#unwrap()`} need to be called\n\t\t * on a range that has its start and end positions located in the same container element. Both positions can be\n\t\t * nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same.\n\t\t *\n\t\t * @error view-writer-invalid-range-container\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-invalid-range-container', errorContext );\n\t}\n}\n\n/**\n * Checks if the provided argument is a plain object that can be used as options for container element.\n */\nfunction isContainerOptions(\n\tchildrenOrOptions: ViewNode | Iterable<ViewNode> | { renderUnsafeAttributes?: Array<string> }\n): childrenOrOptions is { renderUnsafeAttributes?: Array<string> } {\n\treturn isPlainObject( childrenOrOptions );\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/**\n * Set of utilities related to handling block and inline fillers.\n *\n * Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all\n * empty elements which should be selectable with elements or characters called \"fillers\". Unfortunately there is no one\n * universal filler, this is why two types are uses:\n *\n * * Block filler is an element which fill block elements, like `<p>`. CKEditor uses `<br>` as a block filler during the editing,\n * as browsers do natively. So instead of an empty `<p>` there will be `<p><br></p>`. The advantage of block filler is that\n * it is transparent for the selection, so when the caret is before the `<br>` and user presses right arrow he will be\n * moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it cannot be used\n * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `<br>` filler} can be replaced with any other\n * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or\n * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.\n *\n * * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty\n * `<b>` surrendered by text: `foo<b></b>bar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width\n * spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined\n * {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to\n * avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not\n * transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional\n * code is needed to handle the caret.\n *\n * Both inline and block fillers are handled by the {@link module:engine/view/renderer~ViewRenderer renderer} and are not present in the\n * view.\n *\n * @module engine/view/filler\n */\n\nimport { keyCodes, isText, type KeystrokeInfo } from '@ckeditor/ckeditor5-utils';\nimport { type EditingView } from './view.js';\nimport { type ViewDocumentDomEventData } from './observer/domeventdata.js';\nimport type { ViewDocumentArrowKeyEvent } from './observer/arrowkeysobserver.js';\n\n/**\n * Non-breaking space filler creator. This function creates the `&nbsp;` text node.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n * @internal\n */\nexport const NBSP_FILLER = ( domDocument: Document ): Text => domDocument.createTextNode( '\\u00A0' );\n\n/**\n * Marked non-breaking space filler creator. This function creates the `<span data-cke-filler=\"true\">&nbsp;</span>` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n * @internal\n */\nexport const MARKED_NBSP_FILLER = ( domDocument: Document ): HTMLSpanElement => {\n\tconst span = domDocument.createElement( 'span' );\n\tspan.dataset.ckeFiller = 'true';\n\tspan.innerText = '\\u00A0';\n\n\treturn span;\n};\n\n/**\n * `<br>` filler creator. This function creates the `<br data-cke-filler=\"true\">` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @internal\n */\nexport const BR_FILLER = ( domDocument: Document ): HTMLBRElement => {\n\tconst fillerBr = domDocument.createElement( 'br' );\n\tfillerBr.dataset.ckeFiller = 'true';\n\n\treturn fillerBr;\n};\n\n/**\n * Length of the {@link module:engine/view/filler~INLINE_FILLER INLINE_FILLER}.\n *\n * @internal\n */\nexport const INLINE_FILLER_LENGTH = 7;\n\n/**\n * Inline filler which is a sequence of the word joiners.\n *\n * @internal\n */\nexport const INLINE_FILLER: string = '\\u2060'.repeat( INLINE_FILLER_LENGTH );\n\n/**\n * Checks if the node is a text node which starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * startsWithFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * startsWithFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // true\n * startsWithFiller( document.createTextNode( 'foo' ) ); // false\n * startsWithFiller( document.createElement( 'p' ) ); // false\n * ```\n *\n * @param domNode DOM node.\n * @returns True if the text node starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n * @internal\n */\nexport function startsWithFiller( domNode: Node | string ): boolean {\n\tif ( typeof domNode == 'string' ) {\n\t\treturn domNode.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER;\n\t}\n\n\treturn isText( domNode ) && ( domNode.data.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER );\n}\n\n/**\n * Checks if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * isInlineFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * isInlineFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // false\n * ```\n *\n * @param domText DOM text node.\n * @returns True if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n * @internal\n */\nexport function isInlineFiller( domText: Text ): boolean {\n\treturn domText.data.length == INLINE_FILLER_LENGTH && startsWithFiller( domText );\n}\n\n/**\n * Get string data from the text node, removing an {@link module:engine/view/filler~INLINE_FILLER inline filler} from it,\n * if text node contains it.\n *\n * ```ts\n * getDataWithoutFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ) == 'foo' // true\n * getDataWithoutFiller( document.createTextNode( 'foo' ) ) == 'foo' // true\n * ```\n *\n * @param domText DOM text node, possible with inline filler.\n * @returns Data without filler.\n * @internal\n */\nexport function getDataWithoutFiller( domText: Text | string ): string {\n\tconst data = typeof domText == 'string' ? domText : domText.data;\n\n\tif ( startsWithFiller( domText ) ) {\n\t\treturn data.slice( INLINE_FILLER_LENGTH );\n\t}\n\n\treturn data;\n}\n\n/**\n * Assign key observer which move cursor from the end of the inline filler to the beginning of it when\n * the left arrow is pressed, so the filler does not break navigation.\n *\n * @param view View controller instance we should inject quirks handling on.\n * @internal\n */\nexport function injectQuirksHandling( view: EditingView ): void {\n\tview.document.on<ViewDocumentArrowKeyEvent>( 'arrowKey', jumpOverInlineFiller, { priority: 'low' } );\n}\n\n/**\n * Move cursor from the end of the inline filler to the beginning of it when, so the filler does not break navigation.\n */\nfunction jumpOverInlineFiller( evt: unknown, data: ViewDocumentDomEventData & KeystrokeInfo ) {\n\tif ( data.keyCode == keyCodes.arrowleft ) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView!.getSelection()!;\n\n\t\tif ( domSelection.rangeCount == 1 && domSelection.getRangeAt( 0 ).collapsed ) {\n\t\t\tconst domParent = domSelection.getRangeAt( 0 ).startContainer;\n\t\t\tconst domOffset = domSelection.getRangeAt( 0 ).startOffset;\n\n\t\t\tif ( startsWithFiller( domParent ) && domOffset <= INLINE_FILLER_LENGTH ) {\n\t\t\t\tdomSelection.collapse( domParent, 0 );\n\t\t\t}\n\t\t}\n\t}\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/**\n * @module engine/view/renderer\n */\n\nimport { ViewText } from './text.js';\nimport { ViewPosition } from './position.js';\nimport { INLINE_FILLER, INLINE_FILLER_LENGTH, startsWithFiller, isInlineFiller } from './filler.js';\n\nimport {\n\tCKEditorError,\n\tObservableMixin,\n\tdiff,\n\tenv,\n\tfastDiff,\n\tinsertAt,\n\tisComment,\n\tisNode,\n\tisText,\n\tremove,\n\tindexOf,\n\ttype DiffResult,\n\ttype ObservableChangeEvent,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { ViewDocumentChangeType } from './document.js';\nimport { type ViewDocumentSelection } from './documentselection.js';\nimport { type ViewDomConverter } from './domconverter.js';\nimport { type ViewElement } from './element.js';\nimport { type ViewNode } from './node.js';\n\n// @if CK_DEBUG_TYPING // import { _buildLogMessage } from '../dev-utils/utils.js';\n\ntype DomText = globalThis.Text;\ntype DomNode = globalThis.Node;\ntype DomDocument = globalThis.Document;\ntype DomElement = globalThis.HTMLElement;\ntype DomSelection = globalThis.Selection;\n\nconst ViewRendererBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Renderer is responsible for updating the DOM structure and the DOM selection based on\n * the {@link module:engine/view/renderer~ViewRenderer#markToSync information about updated view nodes}.\n * In other words, it renders the view to the DOM.\n *\n * Its main responsibility is to make only the necessary, minimal changes to the DOM. However, unlike in many\n * virtual DOM implementations, the primary reason for doing minimal changes is not the performance but ensuring\n * that native editing features such as text composition, autocompletion, spell checking, selection's x-index are\n * affected as little as possible.\n *\n * Renderer uses {@link module:engine/view/domconverter~ViewDomConverter} to transform view nodes and positions\n * to and from the DOM.\n */\nexport class ViewRenderer extends ViewRendererBase {\n\t/**\n\t * Set of DOM Documents instances.\n\t */\n\tpublic readonly domDocuments: Set<DomDocument> = new Set();\n\n\t/**\n\t * Converter instance.\n\t */\n\tpublic readonly domConverter: ViewDomConverter;\n\n\t/**\n\t * Set of nodes which attributes changed and may need to be rendered.\n\t */\n\tpublic readonly markedAttributes: Set<ViewElement> = new Set();\n\n\t/**\n\t * Set of elements which child lists changed and may need to be rendered.\n\t */\n\tpublic readonly markedChildren: Set<ViewElement> = new Set();\n\n\t/**\n\t * Set of text nodes which text data changed and may need to be rendered.\n\t */\n\tpublic readonly markedTexts: Set<ViewNode> = new Set();\n\n\t/**\n\t * View selection. Renderer updates DOM selection based on the view selection.\n\t */\n\tpublic readonly selection: ViewDocumentSelection;\n\n\t/**\n\t * Indicates if the view document is focused and selection can be rendered. Selection will not be rendered if\n\t * this is set to `false`.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isFocused: boolean;\n\n\t/**\n\t * Indicates whether the user is making a selection in the document (e.g. holding the mouse button and moving the cursor).\n\t * When they stop selecting, the property goes back to `false`.\n\t *\n\t * Note: In some browsers, the renderer will stop rendering the selection and inline fillers while the user is making\n\t * a selection to avoid glitches in DOM selection\n\t * (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isSelecting: boolean;\n\n\t/**\n\t * True if composition is in progress inside the document.\n\t *\n\t * This property is bound to the {@link module:engine/view/document~ViewDocument#isComposing `Document#isComposing`} property.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isComposing: boolean;\n\n\t/**\n\t * The text node in which the inline filler was rendered.\n\t */\n\tprivate _inlineFiller: DomText | null = null;\n\n\t/**\n\t * DOM element containing fake selection.\n\t */\n\tprivate _fakeSelectionContainer: DomElement | null = null;\n\n\t/**\n\t * Creates a renderer instance.\n\t *\n\t * @param domConverter Converter instance.\n\t * @param selection View selection.\n\t */\n\tconstructor( domConverter: ViewDomConverter, selection: ViewDocumentSelection ) {\n\t\tsuper();\n\n\t\tthis.domConverter = domConverter;\n\t\tthis.selection = selection;\n\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'isSelecting', false );\n\t\tthis.set( 'isComposing', false );\n\n\t\t// Rendering the selection and inline filler manipulation should be postponed in (non-Android) Blink until the user finishes\n\t\t// creating the selection in DOM to avoid accidental selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\t// When the user stops selecting, all pending changes should be rendered ASAP, though.\n\t\tif ( env.isBlink && !env.isAndroid ) {\n\t\t\tthis.on<ObservableChangeEvent>( 'change:isSelecting', () => {\n\t\t\t\tif ( !this.isSelecting ) {\n\t\t\t\t\tthis.render();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Marks a view node to be updated in the DOM by {@link #render `render()`}.\n\t *\n\t * Note that only view nodes whose parents have corresponding DOM elements need to be marked to be synchronized.\n\t *\n\t * @see #markedAttributes\n\t * @see #markedChildren\n\t * @see #markedTexts\n\t *\n\t * @param type Type of the change.\n\t * @param node ViewNode to be marked.\n\t */\n\tpublic markToSync( type: ViewDocumentChangeType, node: ViewNode ): void {\n\t\tif ( type === 'text' ) {\n\t\t\tif ( this.domConverter.mapViewToDom( node.parent! ) ) {\n\t\t\t\tthis.markedTexts.add( node );\n\t\t\t}\n\t\t} else {\n\t\t\t// If the node has no DOM element it is not rendered yet,\n\t\t\t// its children/attributes do not need to be marked to be sync.\n\t\t\tif ( !this.domConverter.mapViewToDom( node as ViewElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( type === 'attributes' ) {\n\t\t\t\tthis.markedAttributes.add( node as ViewElement );\n\t\t\t} else if ( type === 'children' ) {\n\t\t\t\tthis.markedChildren.add( node as ViewElement );\n\t\t\t} else {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\t\tconst unreachable: never = type;\n\n\t\t\t\t/**\n\t\t\t\t * Unknown type passed to Renderer.markToSync.\n\t\t\t\t *\n\t\t\t\t * @error view-renderer-unknown-type\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-renderer-unknown-type', this );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Renders all buffered changes ({@link #markedAttributes}, {@link #markedChildren} and {@link #markedTexts}) and\n\t * the current view selection (if needed) to the DOM by applying a minimal set of changes to it.\n\t *\n\t * Renderer tries not to break the text composition (e.g. IME) and x-index of the selection,\n\t * so it does as little as it is needed to update the DOM.\n\t *\n\t * Renderer also handles {@link module:engine/view/filler fillers}. Especially, it checks if the inline filler is needed\n\t * at the selection position and adds or removes it. To prevent breaking text composition inline filler will not be\n\t * removed as long as the selection is in the text node which needed it at first.\n\t */\n\tpublic render(): void {\n\t\t// Ignore rendering while in the composition mode. Composition events are not cancellable and browser will modify the DOM tree.\n\t\t// All marked elements, attributes, etc. will wait until next render after the composition ends.\n\t\t// On Android composition events are immediately applied to the model, so we don't need to skip rendering,\n\t\t// and we should not do it because the difference between view and DOM could lead to position mapping problems.\n\t\tif ( this.isComposing && !env.isAndroid ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cRendering aborted while isComposing.',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'%cRendering',\n\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold'\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tlet inlineFillerPosition: ViewPosition | null = null;\n\t\tconst isInlineFillerRenderingPossible = env.isBlink && !env.isAndroid ? !this.isSelecting : true;\n\n\t\t// Refresh mappings.\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildrenMappings( element );\n\t\t}\n\n\t\t// Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t// DOM selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\t// There was inline filler rendered in the DOM but it's not\n\t\t\t// at the selection position any more, so we can remove it\n\t\t\t// (cause even if it's needed, it must be placed in another location).\n\t\t\tif ( this._inlineFiller && !this._isSelectionInInlineFiller() ) {\n\t\t\t\tthis._removeInlineFiller();\n\t\t\t}\n\n\t\t\t// If we've got the filler, let's try to guess its position in the view.\n\t\t\tif ( this._inlineFiller ) {\n\t\t\t\tinlineFillerPosition = this._getInlineFillerPosition();\n\t\t\t}\n\t\t\t// Otherwise, if it's needed, create it at the selection position.\n\t\t\telse if ( this._needsInlineFillerAtSelection() ) {\n\t\t\t\tinlineFillerPosition = this.selection.getFirstPosition()!;\n\n\t\t\t\t// Do not use `markToSync` so it will be added even if the parent is already added.\n\t\t\t\tthis.markedChildren.add( inlineFillerPosition.parent as ViewElement );\n\t\t\t}\n\t\t}\n\t\t// Make sure the inline filler has any parent, so it can be mapped to view position by ViewDomConverter.\n\t\telse if ( this._inlineFiller && this._inlineFiller.parentNode ) {\n\t\t\t// While the user is making selection, preserve the inline filler at its original position.\n\t\t\tinlineFillerPosition = this.domConverter.domPositionToView( this._inlineFiller )!;\n\n\t\t\t// While down-casting the document selection attributes, all existing empty\n\t\t\t// attribute elements (for selection position) are removed from the view and DOM,\n\t\t\t// so make sure that we were able to map filler position.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/12026\n\t\t\tif ( inlineFillerPosition && inlineFillerPosition.parent.is( '$text' ) ) {\n\t\t\t\t// The inline filler position is expected to be before the text node.\n\t\t\t\tinlineFillerPosition = ViewPosition._createBefore( inlineFillerPosition.parent );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const element of this.markedAttributes ) {\n\t\t\tthis._updateAttrs( element );\n\t\t}\n\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildren( element, { inlineFillerPosition } );\n\t\t}\n\n\t\tfor ( const node of this.markedTexts ) {\n\t\t\tif ( !this.markedChildren.has( node.parent as ViewElement ) && this.domConverter.mapViewToDom( node.parent as ViewElement ) ) {\n\t\t\t\tthis._updateText( node as ViewText, { inlineFillerPosition } );\n\t\t\t}\n\t\t}\n\n\t\t// * Check whether the inline filler is required and where it really is in the DOM.\n\t\t//   At this point in most cases it will be in the DOM, but there are exceptions.\n\t\t//   For example, if the inline filler was deep in the created DOM structure, it will not be created.\n\t\t//   Similarly, if it was removed at the beginning of this function and then neither text nor children were updated,\n\t\t//   it will not be present. Fix those and similar scenarios.\n\t\t// * Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t//   DOM selection collapsing\n\t\t//   (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\tif ( inlineFillerPosition ) {\n\t\t\t\tconst fillerDomPosition = this.domConverter.viewPositionToDom( inlineFillerPosition )!;\n\t\t\t\tconst domDocument = fillerDomPosition.parent.ownerDocument!;\n\n\t\t\t\tif ( !startsWithFiller( fillerDomPosition.parent ) ) {\n\t\t\t\t\t// Filler has not been created at filler position. Create it now.\n\t\t\t\t\tthis._inlineFiller = addInlineFiller( domDocument, fillerDomPosition.parent, fillerDomPosition.offset );\n\t\t\t\t} else {\n\t\t\t\t\t// Filler has been found, save it.\n\t\t\t\t\tthis._inlineFiller = fillerDomPosition.parent as DomText;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no filler needed.\n\t\t\t\tthis._inlineFiller = null;\n\t\t\t}\n\t\t}\n\n\t\t// First focus the new editing host, then update the selection.\n\t\t// Otherwise, FF may throw an error (https://github.com/ckeditor/ckeditor5/issues/721).\n\t\tthis._updateFocus();\n\t\tthis._updateSelection();\n\n\t\tthis.domConverter._clearTemporaryCustomProperties();\n\n\t\tthis.markedTexts.clear();\n\t\tthis.markedAttributes.clear();\n\t\tthis.markedChildren.clear();\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Updates mappings of view element's children.\n\t *\n\t * Children that were replaced in the view structure by similar elements (same tag name) are treated as 'replaced'.\n\t * This means that their mappings can be updated so the new view elements are mapped to the existing DOM elements.\n\t * Thanks to that these elements do not need to be re-rendered completely.\n\t *\n\t * @param viewElement The view element whose children mappings will be updated.\n\t */\n\tprivate _updateChildrenMappings( viewElement: ViewElement ): void {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM and there is no need to process it.\n\t\t\treturn;\n\t\t}\n\n\t\t// Removing nodes from the DOM as we iterate can cause `actualDomChildren`\n\t\t// (which is a live-updating `NodeList`) to get out of sync with the\n\t\t// indices that we compute as we iterate over `actions`.\n\t\t// This would produce incorrect element mappings.\n\t\t//\n\t\t// Converting live list to an array to make the list static.\n\t\tconst actualDomChildren = Array.from(\n\t\t\tdomElement.childNodes\n\t\t);\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, { withChildren: false } )\n\t\t);\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\t\tconst actions = this._findUpdateActions( diff, actualDomChildren, expectedDomChildren, areSimilarElements );\n\n\t\tif ( actions.indexOf( 'update' ) !== -1 ) {\n\t\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\t\tfor ( const action of actions ) {\n\t\t\t\tif ( action === 'update' ) {\n\t\t\t\t\tconst insertIndex = counter.equal + counter.insert;\n\t\t\t\t\tconst deleteIndex = counter.equal + counter.delete;\n\t\t\t\t\tconst viewChild = viewElement.getChild( insertIndex );\n\n\t\t\t\t\t// UIElement and RawElement are special cases. Their children are not stored in a view.\n\t\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/799.\n\t\t\t\t\t// so we cannot use them with replacing flow (since they use view children during rendering\n\t\t\t\t\t// which will always result in rendering empty elements).\n\t\t\t\t\tif ( viewChild && !viewChild.is( 'uiElement' ) && !viewChild.is( 'rawElement' ) ) {\n\t\t\t\t\t\tthis._updateElementMappings( viewChild as ViewElement, actualDomChildren[ deleteIndex ] as DomElement );\n\t\t\t\t\t}\n\n\t\t\t\t\tremove( expectedDomChildren[ insertIndex ] );\n\t\t\t\t\tcounter.equal++;\n\t\t\t\t} else {\n\t\t\t\t\tcounter[ action ]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Updates mappings of a given view element.\n\t *\n\t * @param viewElement The view element whose mappings will be updated.\n\t * @param domElement The DOM element representing the given view element.\n\t */\n\tprivate _updateElementMappings( viewElement: ViewElement, domElement: DomElement ): void {\n\t\t// Remap 'DomConverter' bindings.\n\t\tthis.domConverter.unbindDomElement( domElement );\n\t\tthis.domConverter.bindElements( domElement, viewElement );\n\n\t\t// View element may have children which needs to be updated, but are not marked, mark them to update.\n\t\tthis.markedChildren.add( viewElement );\n\n\t\t// Because we replace new view element mapping with the existing one, the corresponding DOM element\n\t\t// will not be rerendered. The new view element may have different attributes than the previous one.\n\t\t// Since its corresponding DOM element will not be rerendered, new attributes will not be added\n\t\t// to the DOM, so we need to mark it here to make sure its attributes gets updated.\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1427 for more detailed case study.\n\t\t// Also there are cases where replaced element is removed from the view structure and then has\n\t\t// its attributes changed or removed. In such cases the element will not be present in `markedAttributes`\n\t\t// and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.\n\t\t// To prevent such situations we always mark reused element to have its attributes rerenderd.\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1560.\n\t\tthis.markedAttributes.add( viewElement );\n\t}\n\n\t/**\n\t * Gets the position of the inline filler based on the current selection.\n\t * Here, we assume that we know that the filler is needed and\n\t * {@link #_isSelectionInInlineFiller is at the selection position}, and, since it is needed,\n\t * it is somewhere at the selection position.\n\t *\n\t * Note: The filler position cannot be restored based on the filler's DOM text node, because\n\t * when this method is called (before rendering), the bindings will often be broken. View-to-DOM\n\t * bindings are only dependable after rendering.\n\t */\n\tprivate _getInlineFillerPosition(): ViewPosition {\n\t\tconst firstPos = this.selection.getFirstPosition()!;\n\n\t\tif ( firstPos.parent.is( '$text' ) ) {\n\t\t\treturn ViewPosition._createBefore( firstPos.parent );\n\t\t} else {\n\t\t\treturn firstPos;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the selection has not left the inline filler's text node.\n\t * If it is `true`, it means that the filler had been added for a reason and the selection did not\n\t * leave the filler's text node. For example, the user can be in the middle of a composition so it should not be touched.\n\t *\n\t * @returns `true` if the inline filler and selection are in the same place.\n\t */\n\tprivate _isSelectionInInlineFiller(): boolean {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Note, we can't check if selection's position equals position of the\n\t\t// this._inlineFiller node, because of #663. We may not be able to calculate\n\t\t// the filler's position in the view at this stage.\n\t\t// Instead, we check it the other way – whether selection is anchored in\n\t\t// that text node or next to it.\n\n\t\t// Possible options are:\n\t\t// \"FILLER{}\"\n\t\t// \"FILLERadded-text{}\"\n\t\tconst selectionPosition = this.selection.getFirstPosition()!;\n\t\tconst position = this.domConverter.viewPositionToDom( selectionPosition );\n\n\t\tif ( position && isText( position.parent ) && startsWithFiller( position.parent ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Removes the inline filler.\n\t */\n\tprivate _removeInlineFiller(): void {\n\t\tconst domFillerNode = this._inlineFiller!;\n\n\t\t// Something weird happened and the stored node doesn't contain the filler's text.\n\t\tif ( !startsWithFiller( domFillerNode ) ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'Inline filler node: ' +\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`%c${ _escapeTextNodeData( domFillerNode.data ) }%c (${ domFillerNode.data.length })`,\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t''\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t/**\n\t\t\t * The inline filler node was lost. Most likely, something overwrote the filler text node\n\t\t\t * in the DOM.\n\t\t\t *\n\t\t\t * @error view-renderer-filler-was-lost\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-renderer-filler-was-lost', this );\n\t\t}\n\n\t\tif ( isInlineFiller( domFillerNode ) ) {\n\t\t\tdomFillerNode.remove();\n\t\t} else {\n\t\t\tdomFillerNode.data = domFillerNode.data.substr( INLINE_FILLER_LENGTH );\n\t\t}\n\n\t\tthis._inlineFiller = null;\n\t}\n\n\t/**\n\t * Checks if the inline {@link module:engine/view/filler filler} should be added.\n\t *\n\t * @returns `true` if the inline filler should be added.\n\t */\n\tprivate _needsInlineFillerAtSelection(): boolean {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectionPosition = this.selection.getFirstPosition()!;\n\t\tconst selectionParent = selectionPosition.parent;\n\t\tconst selectionOffset = selectionPosition.offset;\n\n\t\t// If there is no DOM root we do not care about fillers.\n\t\tif ( !this.domConverter.mapViewToDom( selectionParent.root ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !( selectionParent.is( 'element' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Prevent adding inline filler inside elements with contenteditable=false.\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/1170\n\t\tif ( !isEditable( selectionParent ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst nodeBefore = selectionPosition.nodeBefore;\n\t\tconst nodeAfter = selectionPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof ViewText || nodeAfter instanceof ViewText ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We have block filler, we do not need inline one.\n\t\tif ( selectionOffset === selectionParent.getFillerOffset!() && ( !nodeBefore || !nodeBefore.is( 'element', 'br' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Do not use inline filler while typing outside inline elements on Android.\n\t\t// The deleteContentBackward would remove part of the inline filler instead of removing last letter in a link.\n\t\tif ( env.isAndroid && ( nodeBefore || nodeAfter ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if text needs to be updated and possibly updates it.\n\t *\n\t * @param viewText View text to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */\n\tprivate _updateText( viewText: ViewText, options: { inlineFillerPosition?: ViewPosition | null } ) {\n\t\tconst domText = this.domConverter.findCorrespondingDomText( viewText )!;\n\t\tconst newDomText = this.domConverter.viewToDom( viewText );\n\n\t\tlet expectedText = newDomText.data;\n\t\tconst filler = options.inlineFillerPosition;\n\n\t\tif ( filler && filler.parent == viewText.parent && filler.offset == viewText.index ) {\n\t\t\texpectedText = INLINE_FILLER + expectedText;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'%cUpdate text',\n\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: normal'\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tthis._updateTextNode( domText, expectedText );\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Checks if attribute list needs to be updated and possibly updates it.\n\t *\n\t * @param viewElement The view element to update.\n\t */\n\tprivate _updateAttrs( viewElement: ViewElement ): void {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that 'viewElement' is outdated as its mapping was updated\n\t\t\t// in 'this._updateChildrenMappings()'. There is no need to process it as new view element which\n\t\t\t// replaced old 'viewElement' mapping was also added to 'this.markedAttributes'\n\t\t\t// in 'this._updateChildrenMappings()' so it will be processed separately.\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove attributes from DOM elements if they do not exist in the view.\n\t\t//\n\t\t// Note: It is important to first remove DOM attributes and then set new ones, because some view attributes may be renamed\n\t\t// as they are set on DOM (due to unsafe attributes handling). If we set the view attribute first, and then remove\n\t\t// non-existing DOM attributes, then we would remove the attribute that we just set.\n\t\t//\n\t\t// Note: The domElement.attributes is a live collection, so we need to convert it to an array to avoid issues.\n\t\tfor ( const domAttr of Array.from( ( domElement as DomElement ).attributes ) ) {\n\t\t\tconst key = domAttr.name;\n\n\t\t\t// All other attributes not present in the DOM should be removed.\n\t\t\tif ( !viewElement.hasAttribute( key ) ) {\n\t\t\t\tthis.domConverter.removeDomElementAttribute( domElement as DomElement, key );\n\t\t\t}\n\t\t}\n\n\t\t// Add or overwrite attributes.\n\t\tfor ( const key of viewElement.getAttributeKeys() ) {\n\t\t\tthis.domConverter.setDomElementAttribute( domElement as DomElement, key, viewElement.getAttribute( key )!, viewElement );\n\t\t}\n\t}\n\n\t/**\n\t * Checks if elements child list needs to be updated and possibly updates it.\n\t *\n\t * Note that on Android, to reduce the risk of composition breaks, it tries to update data of an existing\n\t * child text nodes instead of replacing them completely.\n\t *\n\t * @param viewElement View element to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */\n\tprivate _updateChildren( viewElement: ViewElement, options: { inlineFillerPosition: ViewPosition | null } ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM.\n\t\t\t// There is no need to process it. It will be processed when re-inserted.\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'%cUpdate children',\n\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: normal'\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t// IME on Android inserts a new text node while typing after a link\n\t\t// instead of updating an existing text node that follows the link.\n\t\t// We must normalize those text nodes so the diff won't get confused.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/12574.\n\t\tif ( env.isAndroid ) {\n\t\t\tlet previousDomNode = null;\n\n\t\t\tfor ( const domNode of Array.from( domElement.childNodes ) ) {\n\t\t\t\tif ( previousDomNode && isText( previousDomNode ) && isText( domNode ) ) {\n\t\t\t\t\tdomElement.normalize();\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tpreviousDomNode = domNode;\n\t\t\t}\n\t\t}\n\n\t\tconst inlineFillerPosition = options.inlineFillerPosition;\n\t\tconst actualDomChildren = domElement.childNodes;\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, { bind: true } )\n\t\t);\n\n\t\t// Inline filler element has to be created as it is present in the DOM, but not in the view. It is required\n\t\t// during diffing so text nodes could be compared correctly and also during rendering to maintain\n\t\t// proper order and indexes while updating the DOM.\n\t\tif ( inlineFillerPosition && inlineFillerPosition.parent === viewElement ) {\n\t\t\taddInlineFiller( ( domElement as DomElement ).ownerDocument, expectedDomChildren, inlineFillerPosition.offset );\n\t\t}\n\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\n\t\t// We need to make sure that we update the existing text node and not replace it with another one.\n\t\t// The composition and different \"language\" browser extensions are fragile to text node being completely replaced.\n\t\tconst actions = this._findUpdateActions( diff, actualDomChildren, expectedDomChildren, areTextNodes );\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping && actions.every( a => a == 'equal' ) ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'%cNothing to update.',\n\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tlet i = 0;\n\t\tconst nodesToUnbind: Set<DomNode> = new Set();\n\n\t\t// Handle deletions first.\n\t\t// This is to prevent a situation where an element that already exists in `actualDomChildren` is inserted at a different\n\t\t// index in `actualDomChildren`. Since `actualDomChildren` is a `NodeList`, this works like move, not like an insert,\n\t\t// and it disrupts the whole algorithm. See https://github.com/ckeditor/ckeditor5/issues/6367.\n\t\t//\n\t\t// It doesn't matter in what order we remove or add nodes, as long as we remove and add correct nodes at correct indexes.\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'delete' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING //\tconst node = actualDomChildren[ i ];\n\t\t\t\t// @if CK_DEBUG_TYPING // \tif ( isText( node ) ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t'%cRemove text node' +\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: ` +\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t`%c${ _escapeTextNodeData( node.data ) }%c (${ node.data.length })`,\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\tthis.isComposing ? 'color: red; font-weight: bold' : '',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t'color: blue', ''\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // \t} else {\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t'%cRemove element' +\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: `,\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\tthis.isComposing ? 'color: red; font-weight: bold' : '',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\tnode\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // \t}\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tnodesToUnbind.add( actualDomChildren[ i ] as DomElement );\n\t\t\t\tremove( actualDomChildren[ i ] );\n\t\t\t} else if ( action === 'equal' || action === 'update' ) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\ti = 0;\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING //\tconst node = expectedDomChildren[ i ];\n\t\t\t\t// @if CK_DEBUG_TYPING //\tif ( isText( node ) ) {\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\t'%cInsert text node' +\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: ` +\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\t`%c${ _escapeTextNodeData( node.data ) }%c (${ node.data.length })`,\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\tthis.isComposing ? 'color: red; font-weight: bold' : '',\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\t'color: blue',\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\t''\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t) );\n\t\t\t\t// @if CK_DEBUG_TYPING //\t} else {\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\t'%cInsert element:',\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\t'font-weight: normal',\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t\tnode\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t) );\n\t\t\t\t// @if CK_DEBUG_TYPING //\t}\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tinsertAt( domElement as DomElement, i, expectedDomChildren[ i ] );\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// Update the existing text node data.\n\t\t\telse if ( action === 'update' ) {\n\t\t\t\tthis._updateTextNode( actualDomChildren[ i ] as DomText, ( expectedDomChildren[ i ] as DomText ).data );\n\t\t\t\ti++;\n\t\t\t} else if ( action === 'equal' ) {\n\t\t\t\t// Force updating text nodes inside elements which did not change and do not need to be re-rendered.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1125.\n\t\t\t\t// Do it here (not in the loop above) because only after insertions the `i` index is correct.\n\t\t\t\tthis._markDescendantTextToSync( this.domConverter.domToView( expectedDomChildren[ i ] ) as any );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\t// Unbind removed nodes. When node does not have a parent it means that it was removed from DOM tree during\n\t\t// comparison with the expected DOM. We don't need to check child nodes, because if child node was reinserted,\n\t\t// it was moved to DOM tree out of the removed node.\n\t\tfor ( const node of nodesToUnbind ) {\n\t\t\tif ( !node.parentNode ) {\n\t\t\t\tthis.domConverter.unbindDomElement( node as DomElement );\n\t\t\t}\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Shorthand for diffing two arrays or node lists of DOM nodes.\n\t *\n\t * @param actualDomChildren Actual DOM children\n\t * @param expectedDomChildren Expected DOM children.\n\t * @returns The list of actions based on the {@link module:utils/diff~diff} function.\n\t */\n\tprivate _diffNodeLists( actualDomChildren: Array<DomNode> | NodeList, expectedDomChildren: Array<DomNode> | NodeList ) {\n\t\tactualDomChildren = filterOutFakeSelectionContainer( actualDomChildren, this._fakeSelectionContainer );\n\n\t\treturn diff( actualDomChildren, expectedDomChildren, sameNodes.bind( null, this.domConverter ) );\n\t}\n\n\t/**\n\t * Finds DOM nodes that were replaced with the similar nodes (same tag name) in the view. All nodes are compared\n\t * within one `insert`/`delete` action group, for example:\n\t *\n\t * ```\n\t * Actual DOM:\t\t<p><b>Foo</b>Bar<i>Baz</i><b>Bax</b></p>\n\t * Expected DOM:\t<p>Bar<b>123</b><i>Baz</i><b>456</b></p>\n\t * Input actions:\t[ insert, insert, delete, delete, equal, insert, delete ]\n\t * Output actions:\t[ insert, replace, delete, equal, replace ]\n\t * ```\n\t *\n\t * @param actions Actions array which is a result of the {@link module:utils/diff~diff} function.\n\t * @param actualDom Actual DOM children\n\t * @param expectedDom Expected DOM children.\n\t * @param comparator A comparator function that should return `true` if the given node should be reused\n\t * (either by the update of a text node data or an element children list for similar elements).\n\t * @returns Actions array modified with the `update` actions.\n\t */\n\tprivate _findUpdateActions(\n\t\tactions: Array<DiffResult>,\n\t\tactualDom: Array<DomNode> | NodeList,\n\t\texpectedDom: Array<DomNode>,\n\t\tcomparator: ( a: DomNode, b: DomNode ) => boolean\n\t): Array<DiffResult | 'update'> {\n\t\t// If there is no both 'insert' and 'delete' actions, no need to check for replaced elements.\n\t\tif ( actions.indexOf( 'insert' ) === -1 || actions.indexOf( 'delete' ) === -1 ) {\n\t\t\treturn actions;\n\t\t}\n\n\t\tlet newActions: Array<DiffResult | 'update'> = [];\n\t\tlet actualSlice = [];\n\t\tlet expectedSlice = [];\n\n\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\texpectedSlice.push( expectedDom[ counter.equal + counter.insert ] );\n\t\t\t} else if ( action === 'delete' ) {\n\t\t\t\tactualSlice.push( actualDom[ counter.equal + counter.delete ] );\n\t\t\t} else { // equal\n\t\t\t\tnewActions = newActions.concat(\n\t\t\t\t\tdiff( actualSlice, expectedSlice, comparator )\n\t\t\t\t\t\t.map( action => action === 'equal' ? 'update' : action )\n\t\t\t\t);\n\n\t\t\t\tnewActions.push( 'equal' );\n\n\t\t\t\t// Reset stored elements on 'equal'.\n\t\t\t\tactualSlice = [];\n\t\t\t\texpectedSlice = [];\n\t\t\t}\n\t\t\tcounter[ action ]++;\n\t\t}\n\n\t\treturn newActions.concat(\n\t\t\tdiff( actualSlice, expectedSlice, comparator )\n\t\t\t\t.map( action => action === 'equal' ? 'update' : action )\n\t\t);\n\t}\n\n\t/**\n\t * Checks if text needs to be updated and possibly updates it by removing and inserting only parts\n\t * of the data from the existing text node to reduce impact on the IME composition.\n\t *\n\t * @param domText DOM text node to update.\n\t * @param expectedText The expected data of a text node.\n\t */\n\tprivate _updateTextNode( domText: DomText, expectedText: string ): void {\n\t\tconst actualText = domText.data;\n\n\t\tif ( actualText == expectedText ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cText node does not need update:%c ' +\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`${ _escapeTextNodeData( actualText ) }%c (${ actualText.length })`,\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t''\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Our approach to interleaving space character with NBSP might differ with the one implemented by the browser.\n\t\t// Avoid modifying the text node in the DOM if only NBSPs and spaces are interchanged.\n\t\t// We should avoid DOM modifications while composing to avoid breakage of composition.\n\t\t// See: https://github.com/ckeditor/ckeditor5/issues/13994.\n\t\tif ( env.isAndroid && this.isComposing && actualText.replace( /\\u00A0/g, ' ' ) == expectedText.replace( /\\u00A0/g, ' ' ) ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cText node ignore NBSP changes while composing: ' +\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`%c${ _escapeTextNodeData( actualText ) }%c (${ actualText.length }) -> ` +\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`%c${ _escapeTextNodeData( expectedText ) }%c (${ expectedText.length })`,\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t''\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'%cUpdate text node' +\n\t\t// @if CK_DEBUG_TYPING // \t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: ` +\n\t\t// @if CK_DEBUG_TYPING // \t\t`%c${ _escapeTextNodeData( actualText ) }%c (${ actualText.length }) -> ` +\n\t\t// @if CK_DEBUG_TYPING // \t\t`%c${ _escapeTextNodeData( expectedText ) }%c (${ expectedText.length })`,\n\t\t// @if CK_DEBUG_TYPING // \t\tthis.isComposing ? 'color: red; font-weight: bold' : '',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t// @if CK_DEBUG_TYPING // \t\t'',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t// @if CK_DEBUG_TYPING // \t\t''\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tthis._updateTextNodeInternal( domText, expectedText );\n\t}\n\n\t/**\n\t * Part of the `_updateTextNode` method extracted for easier testing.\n\t */\n\tprivate _updateTextNodeInternal( domText: DomText, expectedText: string ): void {\n\t\tconst actions = fastDiff( domText.data, expectedText );\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action.type === 'insert' ) {\n\t\t\t\tdomText.insertData( action.index, action.values.join( '' ) );\n\t\t\t} else { // 'delete'\n\t\t\t\tdomText.deleteData( action.index, action.howMany );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Marks text nodes to be synchronized.\n\t *\n\t * If a text node is passed, it will be marked. If an element is passed, all descendant text nodes inside it will be marked.\n\t *\n\t * @param viewNode View node to sync.\n\t */\n\tprivate _markDescendantTextToSync( viewNode: ViewNode | undefined ): void {\n\t\tif ( !viewNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tthis.markedTexts.add( viewNode );\n\t\t} else if ( viewNode.is( 'element' ) ) {\n\t\t\tfor ( const child of viewNode.getChildren() ) {\n\t\t\t\tthis._markDescendantTextToSync( child );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the selection needs to be updated and possibly updates it.\n\t */\n\tprivate _updateSelection(): void {\n\t\t// Block updating DOM selection in (non-Android) Blink while the user is selecting to prevent accidental selection collapsing.\n\t\t// Note: Structural changes in DOM must trigger selection rendering, though. Nodes the selection was anchored\n\t\t// to, may disappear in DOM which would break the selection (e.g. in real-time collaboration scenarios).\n\t\t// https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723\n\t\tif ( env.isBlink && !env.isAndroid && this.isSelecting && !this.markedChildren.size ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is no selection - remove DOM and fake selections.\n\t\tif ( this.selection.rangeCount === 0 ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'Update DOM selection: remove all ranges'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis._removeDomSelection();\n\t\t\tthis._removeFakeSelection();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst domEditable = this.domConverter.mapViewToDom( this.selection.editableElement! );\n\n\t\t// Do not update DOM selection if there is no focus, or there is no DOM element corresponding to selection's editable element.\n\t\tif ( !this.isFocused || !domEditable ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'Skip updating DOM selection:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`isFocused: ${ this.isFocused }, hasDomEditable: ${ !!domEditable }`\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t// But if there was a fake selection, and it is not fake anymore - remove it as it can map to no longer existing widget.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/18123.\n\t\t\tif ( !this.selection.isFake && this._fakeSelectionContainer && this._fakeSelectionContainer.isConnected ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'Remove fake selection (not focused editable)'\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tthis._removeFakeSelection();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'Update DOM selection'\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t// Render fake selection - create the fake selection container (if needed) and move DOM selection to it.\n\t\tif ( this.selection.isFake ) {\n\t\t\tthis._updateFakeSelection( domEditable );\n\t\t}\n\t\t// There was a fake selection so remove it and update the DOM selection.\n\t\t// This is especially important on Android because otherwise IME will try to compose over the fake selection container.\n\t\telse if ( this._fakeSelectionContainer && this._fakeSelectionContainer.isConnected ) {\n\t\t\tthis._removeFakeSelection();\n\t\t\tthis._updateDomSelection( domEditable );\n\t\t}\n\t\t// Update the DOM selection in case of a plain selection change (no fake selection is involved).\n\t\t// On non-Android the whole rendering is disabled in composition mode (including DOM selection update),\n\t\t// but updating DOM selection should be also disabled on Android if in the middle of the composition\n\t\t// (to not interrupt it).\n\t\telse if ( !( this.isComposing && env.isAndroid ) ) {\n\t\t\tthis._updateDomSelection( domEditable );\n\t\t}\n\t}\n\n\t/**\n\t * Updates the fake selection.\n\t *\n\t * @param domEditable A valid DOM editable where the fake selection container should be added.\n\t */\n\tprivate _updateFakeSelection( domEditable: DomElement ): void {\n\t\tconst domDocument = domEditable.ownerDocument;\n\n\t\tif ( !this._fakeSelectionContainer ) {\n\t\t\tthis._fakeSelectionContainer = createFakeSelectionContainer( domDocument );\n\t\t}\n\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\t// Bind fake selection container with the current selection *position*.\n\t\tthis.domConverter.bindFakeSelection( container, this.selection );\n\n\t\tif ( !this._fakeSelectionNeedsUpdate( domEditable ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !container.parentElement || container.parentElement != domEditable ) {\n\t\t\tdomEditable.appendChild( container );\n\t\t}\n\n\t\tcontainer.textContent = this.selection.fakeSelectionLabel || '\\u00A0';\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'Set DOM fake selection'\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tconst domSelection = domDocument.getSelection()!;\n\t\tconst domRange = domDocument.createRange();\n\n\t\tdomSelection.removeAllRanges();\n\t\tdomRange.selectNodeContents( container );\n\t\tdomSelection.addRange( domRange );\n\t}\n\n\t/**\n\t * Updates the DOM selection.\n\t *\n\t * @param domEditable A valid DOM editable where the DOM selection should be rendered.\n\t */\n\tprivate _updateDomSelection( domEditable: DomElement ) {\n\t\tconst domSelection = domEditable.ownerDocument.defaultView!.getSelection()!;\n\n\t\t// Let's check whether DOM selection needs updating at all.\n\t\tif ( !this._domSelectionNeedsUpdate( domSelection ) ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cDOM selection is already correct',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic;'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Multi-range selection is not available in most browsers, and, at least in Chrome, trying to\n\t\t// set such selection, that is not continuous, throws an error. Because of that, we will just use anchor\n\t\t// and focus of view selection.\n\t\t// Since we are not supporting multi-range selection, we also do not need to check if proper editable is\n\t\t// selected. If there is any editable selected, it is okay (editable is taken from selection anchor).\n\t\tconst anchor = this.domConverter.viewPositionToDom( this.selection.anchor! )!;\n\t\tconst focus = this.domConverter.viewPositionToDom( this.selection.focus! )!;\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t'Update DOM selection:',\n\t\t// @if CK_DEBUG_TYPING // \t\tanchor,\n\t\t// @if CK_DEBUG_TYPING // \t\tfocus\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tdomSelection.setBaseAndExtent( anchor.parent, anchor.offset, focus.parent, focus.offset );\n\n\t\t// Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n\t\tif ( env.isGecko ) {\n\t\t\tfixGeckoSelectionAfterBr( focus, domSelection );\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether a given DOM selection needs to be updated.\n\t *\n\t * @param domSelection The DOM selection to check.\n\t */\n\tprivate _domSelectionNeedsUpdate( domSelection: Selection ): boolean {\n\t\tif ( !this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\t// Current DOM selection is in incorrect position. We need to update it.\n\t\t\treturn true;\n\t\t}\n\n\t\tconst oldViewSelection = domSelection && this.domConverter.domSelectionToView( domSelection );\n\n\t\tif ( oldViewSelection && this.selection.isEqual( oldViewSelection ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If selection is not collapsed, it does not need to be updated if it is similar.\n\t\tif ( !this.selection.isCollapsed && this.selection.isSimilar( oldViewSelection ) ) {\n\t\t\t// Selection did not changed and is correct, do not update.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Selections are not similar.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether the fake selection needs to be updated.\n\t *\n\t * @param domEditable A valid DOM editable where a new fake selection container should be added.\n\t */\n\tprivate _fakeSelectionNeedsUpdate( domEditable: DomElement ): boolean {\n\t\tconst container = this._fakeSelectionContainer;\n\t\tconst domSelection = domEditable.ownerDocument.getSelection()!;\n\n\t\t// Fake selection needs to be updated if there's no fake selection container, or the container currently sits\n\t\t// in a different root.\n\t\tif ( !container || container.parentElement !== domEditable ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Make sure that the selection actually is within the fake selection.\n\t\tif ( domSelection.anchorNode !== container && !container.contains( domSelection.anchorNode ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn container.textContent !== this.selection.fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Removes the DOM selection.\n\t */\n\tprivate _removeDomSelection(): void {\n\t\tfor ( const doc of this.domDocuments ) {\n\t\t\tconst domSelection = doc.getSelection()!;\n\n\t\t\tif ( domSelection.rangeCount ) {\n\t\t\t\tconst activeDomElement = doc.activeElement!;\n\t\t\t\tconst viewElement = this.domConverter.mapDomToView( activeDomElement as DomElement );\n\n\t\t\t\tif ( activeDomElement && viewElement ) {\n\t\t\t\t\tdomSelection.removeAllRanges();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes the fake selection.\n\t */\n\tprivate _removeFakeSelection(): void {\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\tif ( container ) {\n\t\t\tcontainer.remove();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if focus needs to be updated and possibly updates it.\n\t */\n\tprivate _updateFocus(): void {\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'Renderer',\n\t\t// @if CK_DEBUG_TYPING // \t\t`update focus: ${ this.isFocused ? 'focused' : 'not focused' }`\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tif ( this.isFocused ) {\n\t\t\tconst editable = this.selection.editableElement;\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'Renderer',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'focus editable:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t{ editable }\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tif ( editable ) {\n\t\t\t\tthis.domConverter.focus( editable );\n\t\t\t}\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n}\n\n/**\n * Checks if provided element is editable.\n */\nfunction isEditable( element: ViewElement ): boolean {\n\tif ( element.getAttribute( 'contenteditable' ) == 'false' ) {\n\t\treturn false;\n\t}\n\n\tconst parent = element.findAncestor( element => element.hasAttribute( 'contenteditable' ) );\n\n\treturn !parent || parent.getAttribute( 'contenteditable' ) == 'true';\n}\n\n/**\n * Adds inline filler at a given position.\n *\n * The position can be given as an array of DOM nodes and an offset in that array,\n * or a DOM parent element and an offset in that element.\n *\n * @returns The DOM text node that contains an inline filler.\n */\nfunction addInlineFiller( domDocument: DomDocument, domParentOrArray: DomNode | Array<DomNode>, offset: number ): DomText {\n\tconst childNodes = domParentOrArray instanceof Array ? domParentOrArray : domParentOrArray.childNodes;\n\tconst nodeAfterFiller = childNodes[ offset ];\n\n\tif ( isText( nodeAfterFiller ) ) {\n\t\tnodeAfterFiller.data = INLINE_FILLER + nodeAfterFiller.data;\n\n\t\treturn nodeAfterFiller;\n\t} else {\n\t\tconst fillerNode = domDocument.createTextNode( INLINE_FILLER );\n\n\t\tif ( Array.isArray( domParentOrArray ) ) {\n\t\t\t( childNodes as Array<DomNode> ).splice( offset, 0, fillerNode );\n\t\t} else {\n\t\t\tinsertAt( domParentOrArray as DomElement, offset, fillerNode );\n\t\t}\n\n\t\treturn fillerNode;\n\t}\n}\n\n/**\n * Whether two DOM nodes should be considered as similar.\n * Nodes are considered similar if they have the same tag name.\n */\nfunction areSimilarElements( node1: DomNode, node2: DomNode ): boolean {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\t!isText( node1 ) && !isText( node2 ) &&\n\t\t!isComment( node1 ) && !isComment( node2 ) &&\n\t\t( node1 as DomElement ).tagName.toLowerCase() === ( node2 as DomElement ).tagName.toLowerCase();\n}\n\n/**\n * Whether two DOM nodes are text nodes.\n */\nfunction areTextNodes( node1: DomNode, node2: DomNode ): boolean {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\tisText( node1 ) && isText( node2 );\n}\n\n/**\n * Whether two dom nodes should be considered as the same.\n * Two nodes which are considered the same are:\n *\n * * Text nodes with the same text.\n * * Element nodes represented by the same object.\n * * Two block filler elements.\n *\n * @param blockFillerMode Block filler mode, see {@link module:engine/view/domconverter~ViewDomConverter#blockFillerMode}.\n */\nfunction sameNodes( domConverter: ViewDomConverter, actualDomChild: DomNode, expectedDomChild: DomNode ): boolean {\n\t// Elements.\n\tif ( actualDomChild === expectedDomChild ) {\n\t\treturn true;\n\t}\n\t// Texts.\n\telse if ( isText( actualDomChild ) && isText( expectedDomChild ) ) {\n\t\treturn actualDomChild.data === expectedDomChild.data;\n\t}\n\t// Block fillers.\n\telse if ( domConverter.isBlockFiller( actualDomChild ) &&\n\t\tdomConverter.isBlockFiller( expectedDomChild ) ) {\n\t\treturn true;\n\t}\n\n\t// Not matching types.\n\treturn false;\n}\n\n/**\n * The following is a Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n * When the native DOM selection is at the end of the block and preceded by <br /> e.g.\n *\n * ```html\n * <p>foo<br/>[]</p>\n * ```\n *\n * which happens a lot when using the soft line break, the browser fails to (visually) move the\n * caret to the new line. A quick fix is as simple as force–refreshing the selection with the same range.\n */\nfunction fixGeckoSelectionAfterBr( focus: ReturnType<ViewDomConverter[ 'viewPositionToDom' ]>, domSelection: DomSelection ) {\n\tlet parent = focus!.parent;\n\tlet offset = focus!.offset;\n\n\tif ( isText( parent ) && isInlineFiller( parent ) ) {\n\t\toffset = indexOf( parent ) + 1;\n\t\tparent = parent.parentNode!;\n\t}\n\n\t// This fix works only when the focus point is at the very end of an element.\n\t// There is no point in running it in cases unrelated to the browser bug.\n\tif ( parent.nodeType != Node.ELEMENT_NODE || offset != parent.childNodes.length - 1 ) {\n\t\treturn;\n\t}\n\n\tconst childAtOffset = parent.childNodes[ offset ];\n\n\t// To stay on the safe side, the fix being as specific as possible, it targets only the\n\t// selection which is at the very end of the element and preceded by <br />.\n\tif ( childAtOffset && ( childAtOffset as DomElement ).tagName == 'BR' ) {\n\t\tdomSelection.addRange( domSelection.getRangeAt( 0 ) );\n\t}\n}\n\nfunction filterOutFakeSelectionContainer( domChildList: Array<DomNode> | NodeList, fakeSelectionContainer: DomElement | null ) {\n\tconst childList = Array.from( domChildList );\n\n\tif ( childList.length == 0 || !fakeSelectionContainer ) {\n\t\treturn childList;\n\t}\n\n\tconst last = childList[ childList.length - 1 ];\n\n\tif ( last == fakeSelectionContainer ) {\n\t\tchildList.pop();\n\t}\n\n\treturn childList;\n}\n\n/**\n * Creates a fake selection container for a given document.\n */\nfunction createFakeSelectionContainer( domDocument: DomDocument ): DomElement {\n\tconst container = domDocument.createElement( 'div' );\n\n\tcontainer.className = 'ck-fake-selection-container';\n\n\tObject.assign( container.style, {\n\t\tposition: 'fixed',\n\t\ttop: 0,\n\t\tleft: '-9999px',\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/752.\n\t\twidth: '42px'\n\t} );\n\n\t// Fill it with a text node so we can update it later.\n\tcontainer.textContent = '\\u00A0';\n\n\treturn container;\n}\n\n// @if CK_DEBUG_TYPING // function _escapeTextNodeData( text ) {\n// @if CK_DEBUG_TYPING // \tconst escapedText = text\n// @if CK_DEBUG_TYPING // \t\t.replace( /&/g, '&amp;' )\n// @if CK_DEBUG_TYPING // \t\t.replace( /\\u00A0/g, '&nbsp;' )\n// @if CK_DEBUG_TYPING // \t\t.replace( /\\u2060/g, '&NoBreak;' );\n// @if CK_DEBUG_TYPING //\n// @if CK_DEBUG_TYPING // \treturn `\"${ escapedText }\"`;\n// @if CK_DEBUG_TYPING // }\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/**\n * @module engine/view/domconverter\n */\n\nimport { ViewText } from './text.js';\nimport { ViewElement } from './element.js';\nimport { ViewUIElement } from './uielement.js';\nimport { ViewPosition } from './position.js';\nimport { ViewRange } from './range.js';\nimport { ViewSelection } from './selection.js';\nimport { ViewDocumentFragment } from './documentfragment.js';\nimport { ViewTreeWalker } from './treewalker.js';\nimport { Matcher, type MatcherPattern } from './matcher.js';\nimport {\n\tBR_FILLER, INLINE_FILLER_LENGTH, NBSP_FILLER, MARKED_NBSP_FILLER,\n\tgetDataWithoutFiller, isInlineFiller, startsWithFiller\n} from './filler.js';\n\nimport {\n\tglobal,\n\tlogWarning,\n\tindexOf,\n\tgetAncestors,\n\tisText,\n\tisComment,\n\tisValidAttributeName,\n\tfirst,\n\tenv\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewNode } from './node.js';\nimport { type ViewDocument } from './document.js';\nimport { type ViewDocumentSelection } from './documentselection.js';\nimport { type ViewEditableElement } from './editableelement.js';\nimport { type ViewTextProxy } from './textproxy.js';\nimport { type ViewRawElement } from './rawelement.js';\n\n// @if CK_DEBUG_TYPING // import { _buildLogMessage } from '../dev-utils/utils.js';\n\ntype DomNode = globalThis.Node;\ntype DomElement = globalThis.HTMLElement;\ntype DomDocument = globalThis.Document;\ntype DomDocumentFragment = globalThis.DocumentFragment;\ntype DomComment = globalThis.Comment;\ntype DomRange = globalThis.Range;\ntype DomText = globalThis.Text;\ntype DomSelection = globalThis.Selection;\n\nconst BR_FILLER_REF = BR_FILLER( global.document ); // eslint-disable-line new-cap\nconst NBSP_FILLER_REF = NBSP_FILLER( global.document ); // eslint-disable-line new-cap\nconst MARKED_NBSP_FILLER_REF = MARKED_NBSP_FILLER( global.document ); // eslint-disable-line new-cap\nconst UNSAFE_ATTRIBUTE_NAME_PREFIX = 'data-ck-unsafe-attribute-';\nconst UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';\n\n/**\n * `ViewDomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles\n * {@link module:engine/view/domconverter~ViewDomConverter#bindElements bindings} between these nodes.\n *\n * An instance of the DOM converter is available under\n * {@link module:engine/view/view~EditingView#domConverter `editor.editing.view.domConverter`}.\n *\n * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~ViewRenderer}), does not keep the\n * state of a tree nor keeps the synchronization between the tree view and\n * the DOM tree (use {@link module:engine/view/document~ViewDocument}).\n *\n * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.\n * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.\n */\nexport class ViewDomConverter {\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.\n\t */\n\tpublic readonly renderingMode: 'data' | 'editing';\n\n\t/**\n\t * The mode of a block filler used by the DOM converter.\n\t */\n\tpublic blockFillerMode: ViewBlockFillerMode;\n\n\t/**\n\t * Elements which are considered pre-formatted elements.\n\t */\n\tpublic readonly preElements: Array<string>;\n\n\t/**\n\t * Elements which are considered block elements (and hence should be filled with a\n\t * {@link #isBlockFiller block filler}).\n\t *\n\t * Whether an element is considered a block element also affects handling of trailing whitespaces.\n\t *\n\t * You can extend this array if you introduce support for block elements which are not yet recognized here.\n\t */\n\tpublic readonly blockElements: Array<string>;\n\n\t/**\n\t * A list of elements that exist inline (in text) but their inner structure cannot be edited because\n\t * of the way they are rendered by the browser. They are mostly HTML form elements but there are other\n\t * elements such as `<img>` or `<iframe>` that also have non-editable children or no children whatsoever.\n\t *\n\t * Whether an element is considered an inline object has an impact on white space rendering (trimming)\n\t * around (and inside of it). In short, white spaces in text nodes next to inline objects are not trimmed.\n\t *\n\t * You can extend this array if you introduce support for inline object elements which are not yet recognized here.\n\t */\n\tpublic readonly inlineObjectElements: Array<string>;\n\n\t/**\n\t * A list of elements which may affect the editing experience. To avoid this, those elements are replaced with\n\t * `<span data-ck-unsafe-element=\"[element name]\"></span>` while rendering in the editing mode.\n\t */\n\tpublic readonly unsafeElements: Array<string>;\n\n\t/**\n\t * The DOM Document used by `ViewDomConverter` to create DOM nodes.\n\t */\n\tprivate readonly _domDocument: DomDocument;\n\n\t/**\n\t * The DOM-to-view mapping.\n\t */\n\tprivate readonly _domToViewMapping = new WeakMap<DomElement | DomDocumentFragment, ViewElement | ViewDocumentFragment>();\n\n\t/**\n\t * The view-to-DOM mapping.\n\t */\n\tprivate readonly _viewToDomMapping = new WeakMap<ViewElement | ViewDocumentFragment, DomElement | DomDocumentFragment>();\n\n\t/**\n\t * Holds the mapping between fake selection containers and corresponding view selections.\n\t */\n\tprivate readonly _fakeSelectionMapping = new WeakMap<DomElement, ViewSelection>();\n\n\t/**\n\t * Matcher for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM nodes to view elements.\n\t */\n\tprivate readonly _rawContentElementMatcher = new Matcher();\n\n\t/**\n\t * Matcher for inline object view elements. This is an extension of a simple {@link #inlineObjectElements} array of element names.\n\t */\n\tprivate readonly _inlineObjectElementMatcher = new Matcher();\n\n\t/**\n\t * Set of elements with temporary custom properties that require clearing after render.\n\t */\n\tprivate readonly _elementsWithTemporaryCustomProperties = new Set<ViewElement | ViewDocumentFragment>();\n\n\t/**\n\t * Creates a DOM converter.\n\t *\n\t * @param document The view document instance.\n\t * @param options An object with configuration options.\n\t * @param options.blockFillerMode The type of the block filler to use.\n\t * Default value depends on the options.renderingMode:\n\t *  'nbsp' when options.renderingMode == 'data',\n\t *  'br' when options.renderingMode == 'editing'.\n\t * @param options.renderingMode Whether to leave the View-to-DOM conversion result unchanged\n\t * or improve editing experience by filtering out interactive data.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\t{ blockFillerMode, renderingMode = 'editing' }: {\n\t\t\tblockFillerMode?: ViewBlockFillerMode;\n\t\t\trenderingMode?: 'data' | 'editing';\n\t\t} = {}\n\t) {\n\t\tthis.document = document;\n\t\tthis.renderingMode = renderingMode;\n\t\tthis.blockFillerMode = blockFillerMode || ( renderingMode === 'editing' ? 'br' : 'nbsp' );\n\t\tthis.preElements = [ 'pre', 'textarea' ];\n\t\tthis.blockElements = [\n\t\t\t'address', 'article', 'aside', 'blockquote', 'caption', 'center', 'dd', 'details', 'dir', 'div',\n\t\t\t'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header',\n\t\t\t'hgroup', 'legend', 'li', 'main', 'menu', 'nav', 'ol', 'p', 'pre', 'section', 'summary', 'table', 'tbody',\n\t\t\t'td', 'tfoot', 'th', 'thead', 'tr', 'ul'\n\t\t];\n\t\tthis.inlineObjectElements = [\n\t\t\t'object', 'iframe', 'input', 'button', 'textarea', 'select', 'option', 'video', 'embed', 'audio', 'img', 'canvas'\n\t\t];\n\t\tthis.unsafeElements = [ 'script', 'style' ];\n\n\t\tthis._domDocument = this.renderingMode === 'editing' ? global.document : global.document.implementation.createHTMLDocument( '' );\n\t}\n\n\t/**\n\t * The DOM Document used by `ViewDomConverter` to create DOM nodes.\n\t */\n\tpublic get domDocument(): DomDocument {\n\t\treturn this._domDocument;\n\t}\n\n\t/**\n\t * Binds a given DOM element that represents fake selection to a **position** of a\n\t * {@link module:engine/view/documentselection~ViewDocumentSelection document selection}.\n\t * Document selection copy is stored and can be retrieved by the\n\t * {@link module:engine/view/domconverter~ViewDomConverter#fakeSelectionToView} method.\n\t */\n\tpublic bindFakeSelection( domElement: DomElement, viewDocumentSelection: ViewDocumentSelection ): void {\n\t\tthis._fakeSelectionMapping.set( domElement, new ViewSelection( viewDocumentSelection ) );\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/selection~ViewSelection view selection} instance corresponding to a given\n\t * DOM element that represents fake selection. Returns `undefined` if binding to the given DOM element does not exist.\n\t */\n\tpublic fakeSelectionToView( domElement: DomElement ): ViewSelection | undefined {\n\t\treturn this._fakeSelectionMapping.get( domElement );\n\t}\n\n\t/**\n\t * Binds DOM and view elements, so it will be possible to get corresponding elements using\n\t * {@link module:engine/view/domconverter~ViewDomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~ViewDomConverter#mapViewToDom}.\n\t *\n\t * @param domElement The DOM element to bind.\n\t * @param viewElement The view element to bind.\n\t */\n\tpublic bindElements( domElement: DomElement, viewElement: ViewElement ): void {\n\t\tthis._domToViewMapping.set( domElement, viewElement );\n\t\tthis._viewToDomMapping.set( viewElement, domElement );\n\t}\n\n\t/**\n\t * Unbinds a given DOM element from the view element it was bound to. Unbinding is deep, meaning that all children of\n\t * the DOM element will be unbound too.\n\t *\n\t * @param domElement The DOM element to unbind.\n\t */\n\tpublic unbindDomElement( domElement: DomElement ): void {\n\t\tconst viewElement = this._domToViewMapping.get( domElement );\n\n\t\tif ( viewElement ) {\n\t\t\tthis._domToViewMapping.delete( domElement );\n\t\t\tthis._viewToDomMapping.delete( viewElement );\n\n\t\t\tfor ( const child of domElement.children ) {\n\t\t\t\tthis.unbindDomElement( child as DomElement );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Binds DOM and view document fragments, so it will be possible to get corresponding document fragments using\n\t * {@link module:engine/view/domconverter~ViewDomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~ViewDomConverter#mapViewToDom}.\n\t *\n\t * @param domFragment The DOM document fragment to bind.\n\t * @param viewFragment The view document fragment to bind.\n\t */\n\tpublic bindDocumentFragments( domFragment: DomDocumentFragment, viewFragment: ViewDocumentFragment ): void {\n\t\tthis._domToViewMapping.set( domFragment, viewFragment );\n\t\tthis._viewToDomMapping.set( viewFragment, domFragment );\n\t}\n\n\t/**\n\t * Decides whether a given pair of attribute key and value should be passed further down the pipeline.\n\t *\n\t * @param elementName Element name in lower case.\n\t */\n\tpublic shouldRenderAttribute( attributeKey: string, attributeValue: string, elementName: string ): boolean {\n\t\tif ( this.renderingMode === 'data' ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tattributeKey = attributeKey.toLowerCase();\n\n\t\tif ( attributeKey.startsWith( 'on' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( attributeKey === 'srcdoc' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (\n\t\t\telementName === 'img' &&\n\t\t\t( attributeKey === 'src' || attributeKey === 'srcset' )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( elementName === 'source' && attributeKey === 'srcset' ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// eslint-disable-next-line no-control-regex\n\t\tattributeValue = attributeValue.replace( /[\\s\\u0000-\\u0020]+/g, '' );\n\n\t\tif ( attributeValue.match( /^javascript:/i ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Block all data: URIs except known-safe binary image, audio and video formats. Such a payload is\n\t\t// decoded by an image decoder or a media player, so it cannot execute a script - not even when\n\t\t// loaded in an iframe, embed or object element. Any XML-based or text-based MIME type (text/xml,\n\t\t// application/xml, application/xhtml+xml, text/xsl, image/svg+xml, text/html, etc.) can.\n\t\t//\n\t\t// The subtype must end at a parameter (`;`) or at the data itself (`,`) - a prefix match would let\n\t\t// `data:image/png+xml` through, and the HTML specification treats every `+xml` subtype as XML.\n\t\tif ( attributeValue.match( /^data:/i ) ) {\n\t\t\tconst isImage = attributeValue.match(\n\t\t\t\t/^data:image\\/(png|jpeg|jpg|gif|webp|avif|bmp|x-icon|vnd\\.microsoft\\.icon|apng|tiff|heic|heif|jxl)($|[;,])/i\n\t\t\t);\n\n\t\t\tconst isMedia = attributeValue.match(\n\t\t\t\t/^data:(audio|video)\\/(mp4|mpeg|mp3|ogg|webm|wav|x-wav|aac|flac|quicktime|3gpp)($|[;,])/i\n\t\t\t);\n\n\t\t\tif ( !isImage && !isMedia ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Set `domElement`'s content using provided `html` argument. Apply necessary filtering for the editing pipeline.\n\t *\n\t * @param domElement DOM element that should have `html` set as its content.\n\t * @param html Textual representation of the HTML that will be set on `domElement`.\n\t */\n\tpublic setContentOf( domElement: DomElement, html: string ): void {\n\t\t// For data pipeline we pass the HTML as-is.\n\t\tif ( this.renderingMode === 'data' ) {\n\t\t\tdomElement.innerHTML = html;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst document = new DOMParser().parseFromString( html, 'text/html' );\n\t\tconst fragment = document.createDocumentFragment();\n\t\tconst bodyChildNodes = document.body.childNodes;\n\n\t\twhile ( bodyChildNodes.length > 0 ) {\n\t\t\tfragment.appendChild( bodyChildNodes[ 0 ] );\n\t\t}\n\n\t\tconst treeWalker = document.createTreeWalker( fragment, NodeFilter.SHOW_ELEMENT );\n\t\tconst nodes: Array<DomElement> = [];\n\n\t\tlet currentNode;\n\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( currentNode = treeWalker.nextNode() ) {\n\t\t\tnodes.push( currentNode as DomElement );\n\t\t}\n\n\t\tfor ( const currentNode of nodes ) {\n\t\t\t// Go through nodes to remove those that are prohibited in editing pipeline.\n\t\t\tfor ( const attributeName of currentNode.getAttributeNames() ) {\n\t\t\t\tthis.setDomElementAttribute( currentNode, attributeName, currentNode.getAttribute( attributeName )! );\n\t\t\t}\n\n\t\t\tconst elementName = currentNode.tagName.toLowerCase();\n\n\t\t\t// There are certain nodes, that should be renamed to <span> in editing pipeline.\n\t\t\tif ( this._shouldRenameElement( elementName ) ) {\n\t\t\t\t_logUnsafeElement( elementName );\n\n\t\t\t\tcurrentNode.replaceWith( this._createReplacementDomElement( elementName, currentNode ) );\n\t\t\t}\n\t\t}\n\n\t\t// Empty the target element.\n\t\twhile ( domElement.firstChild ) {\n\t\t\tdomElement.firstChild.remove();\n\t\t}\n\n\t\tdomElement.append( fragment );\n\t}\n\n\tpublic viewToDom(\n\t\tviewNode: ViewText,\n\t\toptions?: { bind?: boolean; withChildren?: boolean }\n\t): DomText;\n\n\tpublic viewToDom(\n\t\tviewNode: ViewElement,\n\t\toptions?: { bind?: boolean; withChildren?: boolean }\n\t): DomElement;\n\n\tpublic viewToDom(\n\t\tviewNode: ViewNode,\n\t\toptions?: { bind?: boolean; withChildren?: boolean }\n\t): DomNode;\n\n\tpublic viewToDom(\n\t\tviewNode: ViewDocumentFragment,\n\t\toptions?: { bind?: boolean; withChildren?: boolean }\n\t): DomDocumentFragment;\n\n\t/**\n\t * Converts the view to the DOM. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments the method will return corresponding items.\n\t *\n\t * @param viewNode View node or document fragment to transform.\n\t * @param options Conversion options.\n\t * @param options.bind Determines whether new elements will be bound.\n\t * @param options.withChildren If `false`, node's and document fragment's children will not be converted.\n\t * @returns Converted node or DocumentFragment.\n\t */\n\tpublic viewToDom(\n\t\tviewNode: ViewNode | ViewDocumentFragment,\n\t\toptions: { bind?: boolean; withChildren?: boolean } = {}\n\t): DomNode | DomDocumentFragment {\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tconst textData = this._processDataFromViewText( viewNode );\n\n\t\t\treturn this._domDocument.createTextNode( textData );\n\t\t} else {\n\t\t\tconst viewElementOrFragment = viewNode as ViewElement | ViewDocumentFragment;\n\n\t\t\tif ( this.mapViewToDom( viewElementOrFragment ) ) {\n\t\t\t\t// Do not reuse element that is marked to not reuse (for example an IMG element\n\t\t\t\t// so it can immediately display a placeholder background instead of waiting for the new src to load).\n\t\t\t\tif ( viewElementOrFragment.getCustomProperty( 'editingPipeline:doNotReuseOnce' ) ) {\n\t\t\t\t\tthis._elementsWithTemporaryCustomProperties.add( viewElementOrFragment );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.mapViewToDom( viewElementOrFragment )!;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet domElement: DomElement | DomDocumentFragment | DomComment;\n\n\t\t\tif ( viewElementOrFragment.is( 'documentFragment' ) ) {\n\t\t\t\t// Create DOM document fragment.\n\t\t\t\tdomElement = this._domDocument.createDocumentFragment();\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindDocumentFragments( domElement, viewElementOrFragment );\n\t\t\t\t}\n\t\t\t} else if ( viewElementOrFragment.is( 'uiElement' ) ) {\n\t\t\t\tif ( viewElementOrFragment.name === '$comment' ) {\n\t\t\t\t\tdomElement = this._domDocument.createComment( viewElementOrFragment.getCustomProperty( '$rawContent' ) as string );\n\t\t\t\t} else {\n\t\t\t\t\t// UIElement has its own render() method (see https://github.com/ckeditor/ckeditor5/issues/799).\n\t\t\t\t\tdomElement = viewElementOrFragment.render( this._domDocument, this );\n\t\t\t\t}\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domElement as DomElement, viewElementOrFragment );\n\t\t\t\t}\n\n\t\t\t\treturn domElement;\n\t\t\t} else {\n\t\t\t\t// Create DOM element.\n\t\t\t\tif ( this._shouldRenameElement( viewElementOrFragment.name ) ) {\n\t\t\t\t\t_logUnsafeElement( viewElementOrFragment.name );\n\n\t\t\t\t\tdomElement = this._createReplacementDomElement( viewElementOrFragment.name );\n\t\t\t\t} else if ( viewElementOrFragment.hasAttribute( 'xmlns' ) ) {\n\t\t\t\t\tdomElement = this._domDocument.createElementNS(\n\t\t\t\t\t\tviewElementOrFragment.getAttribute( 'xmlns' )!,\n\t\t\t\t\t\tviewElementOrFragment.name\n\t\t\t\t\t) as HTMLElement;\n\t\t\t\t} else {\n\t\t\t\t\tdomElement = this._domDocument.createElement( viewElementOrFragment.name );\n\t\t\t\t}\n\n\t\t\t\t// RawElement take care of their children in RawElement#render() method which can be customized\n\t\t\t\t// (see https://github.com/ckeditor/ckeditor5/issues/4469).\n\t\t\t\tif ( viewElementOrFragment.is( 'rawElement' ) ) {\n\t\t\t\t\tviewElementOrFragment.render( domElement, this );\n\t\t\t\t}\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domElement, viewElementOrFragment );\n\t\t\t\t}\n\n\t\t\t\t// Copy element's attributes.\n\t\t\t\tfor ( const key of viewElementOrFragment.getAttributeKeys() ) {\n\t\t\t\t\tthis.setDomElementAttribute(\n\t\t\t\t\t\tdomElement,\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\tviewElementOrFragment.getAttribute( key )!,\n\t\t\t\t\t\tviewElementOrFragment\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( options.withChildren !== false ) {\n\t\t\t\tfor ( const child of this.viewChildrenToDom( viewElementOrFragment, options ) ) {\n\t\t\t\t\tif ( domElement instanceof HTMLTemplateElement ) {\n\t\t\t\t\t\tdomElement.content.appendChild( child );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdomElement.appendChild( child );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn domElement;\n\t\t}\n\t}\n\n\t/**\n\t * Sets the attribute on a DOM element.\n\t *\n\t * **Note**: To remove the attribute, use {@link #removeDomElementAttribute}.\n\t *\n\t * @param domElement The DOM element the attribute should be set on.\n\t * @param key The name of the attribute.\n\t * @param value The value of the attribute.\n\t * @param relatedViewElement The view element related to the `domElement` (if there is any).\n\t * It helps decide whether the attribute set is unsafe. For instance, view elements created via the\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter} methods can allow certain attributes\n\t * that would normally be filtered out.\n\t */\n\tpublic setDomElementAttribute( domElement: DomElement, key: string, value: string, relatedViewElement?: ViewElement ): void {\n\t\tconst shouldRenderAttribute = this.shouldRenderAttribute( key, value, domElement.tagName.toLowerCase() ) ||\n\t\t\trelatedViewElement && relatedViewElement.shouldRenderUnsafeAttribute( key );\n\n\t\tif ( !shouldRenderAttribute ) {\n\t\t\tlogWarning( 'domconverter-unsafe-attribute-detected', { domElement, key, value } );\n\t\t}\n\n\t\tif ( !isValidAttributeName( key ) ) {\n\t\t\t/**\n\t\t\t * Invalid attribute name was ignored during rendering.\n\t\t\t *\n\t\t\t * @error domconverter-invalid-attribute-detected\n\t\t\t */\n\t\t\tlogWarning( 'domconverter-invalid-attribute-detected', { domElement, key, value } );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// The old value was safe but the new value is unsafe.\n\t\tif ( domElement.hasAttribute( key ) && !shouldRenderAttribute ) {\n\t\t\tdomElement.removeAttribute( key );\n\t\t}\n\t\t// The old value was unsafe (but prefixed) but the new value will be safe (will be unprefixed).\n\t\telse if ( domElement.hasAttribute( UNSAFE_ATTRIBUTE_NAME_PREFIX + key ) && shouldRenderAttribute ) {\n\t\t\tdomElement.removeAttribute( UNSAFE_ATTRIBUTE_NAME_PREFIX + key );\n\t\t}\n\n\t\t// If the attribute should not be rendered, rename it (instead of removing) to give developers some idea of what\n\t\t// is going on (https://github.com/ckeditor/ckeditor5/issues/10801).\n\t\tdomElement.setAttribute( shouldRenderAttribute ? key : UNSAFE_ATTRIBUTE_NAME_PREFIX + key, value );\n\t}\n\n\t/**\n\t * Removes an attribute from a DOM element.\n\t *\n\t * **Note**: To set the attribute, use {@link #setDomElementAttribute}.\n\t *\n\t * @param domElement The DOM element the attribute should be removed from.\n\t * @param key The name of the attribute.\n\t */\n\tpublic removeDomElementAttribute( domElement: DomElement, key: string ): void {\n\t\t// See #_createReplacementDomElement() to learn what this is.\n\t\tif ( key == UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdomElement.removeAttribute( key );\n\n\t\t// See setDomElementAttribute() to learn what this is.\n\t\tdomElement.removeAttribute( UNSAFE_ATTRIBUTE_NAME_PREFIX + key );\n\t}\n\n\t/**\n\t * Converts children of the view element to DOM using the\n\t * {@link module:engine/view/domconverter~ViewDomConverter#viewToDom} method.\n\t * Additionally, this method adds block {@link module:engine/view/filler filler} to the list of children, if needed.\n\t *\n\t * @param viewElement Parent view element.\n\t * @param options See {@link module:engine/view/domconverter~ViewDomConverter#viewToDom} options parameter.\n\t * @returns DOM nodes.\n\t */\n\tpublic* viewChildrenToDom(\n\t\tviewElement: ViewElement | ViewDocumentFragment,\n\t\toptions: { bind?: boolean; withChildren?: boolean } = {}\n\t): IterableIterator<Node> {\n\t\tconst fillerPositionOffset = viewElement.getFillerOffset && viewElement.getFillerOffset();\n\t\tlet offset = 0;\n\n\t\tfor ( const childView of viewElement.getChildren() ) {\n\t\t\tif ( fillerPositionOffset === offset ) {\n\t\t\t\tyield this._getBlockFiller();\n\t\t\t}\n\n\t\t\tconst transparentRendering = childView.is( 'element' ) &&\n\t\t\t\t!!childView.getCustomProperty( 'dataPipeline:transparentRendering' ) &&\n\t\t\t\t!first( childView.getAttributes() );\n\n\t\t\tif ( transparentRendering && this.renderingMode == 'data' ) {\n\t\t\t\t// `RawElement` doesn't have #children defined, so they need to be temporarily rendered\n\t\t\t\t// and extracted directly.\n\t\t\t\tif ( childView.is( 'rawElement' ) ) {\n\t\t\t\t\tconst tempElement = this._domDocument.createElement( childView.name );\n\n\t\t\t\t\tchildView.render( tempElement, this );\n\n\t\t\t\t\tyield* [ ...tempElement.childNodes ];\n\t\t\t\t} else {\n\t\t\t\t\tyield* this.viewChildrenToDom( childView, options );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( transparentRendering ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The `dataPipeline:transparentRendering` flag is supported only in the data pipeline.\n\t\t\t\t\t *\n\t\t\t\t\t * @error domconverter-transparent-rendering-unsupported-in-editing-pipeline\n\t\t\t\t\t */\n\t\t\t\t\tlogWarning( 'domconverter-transparent-rendering-unsupported-in-editing-pipeline', { viewElement: childView } );\n\t\t\t\t}\n\n\t\t\t\tyield this.viewToDom( childView, options );\n\t\t\t}\n\n\t\t\toffset++;\n\t\t}\n\n\t\tif ( fillerPositionOffset === offset ) {\n\t\t\tyield this._getBlockFiller();\n\t\t}\n\t}\n\n\t/**\n\t * Converts view {@link module:engine/view/range~ViewRange} to DOM range.\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t *\n\t * @param viewRange View range.\n\t * @returns DOM range.\n\t */\n\tpublic viewRangeToDom( viewRange: ViewRange ): DomRange {\n\t\tconst domStart = this.viewPositionToDom( viewRange.start )!;\n\t\tconst domEnd = this.viewPositionToDom( viewRange.end )!;\n\n\t\tconst domRange = this._domDocument.createRange();\n\t\tdomRange.setStart( domStart.parent, domStart.offset );\n\t\tdomRange.setEnd( domEnd.parent, domEnd.offset );\n\n\t\treturn domRange;\n\t}\n\n\t/**\n\t * Converts view {@link module:engine/view/position~ViewPosition} to DOM parent and offset.\n\t *\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t * If the converted position is directly before inline filler it is moved inside the filler.\n\t *\n\t * @param viewPosition View position.\n\t * @returns DOM position or `null` if view position could not be converted to DOM.\n\t * DOM position has two properties:\n\t * * `parent` - DOM position parent.\n\t * * `offset` - DOM position offset.\n\t */\n\tpublic viewPositionToDom( viewPosition: ViewPosition ): { parent: DomNode; offset: number } | null {\n\t\tconst viewParent = viewPosition.parent;\n\n\t\tif ( viewParent.is( '$text' ) ) {\n\t\t\tconst domParent = this.findCorrespondingDomText( viewParent );\n\n\t\t\tif ( !domParent ) {\n\t\t\t\t// Position is in a view text node that has not been rendered to DOM yet.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tlet offset = viewPosition.offset;\n\n\t\t\tif ( startsWithFiller( domParent ) ) {\n\t\t\t\toffset += INLINE_FILLER_LENGTH;\n\t\t\t}\n\n\t\t\t// In case someone uses outdated view position, but DOM text node was already changed while typing.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/18648.\n\t\t\t// Note that when checking Renderer#_isSelectionInInlineFiller() this might be other element\n\t\t\t// than a text node as it is triggered before applying view changes to the DOM.\n\t\t\tif ( domParent.data && offset > domParent.data.length ) {\n\t\t\t\toffset = domParent.data.length;\n\t\t\t}\n\n\t\t\treturn { parent: domParent, offset };\n\t\t} else {\n\t\t\t// viewParent is instance of ViewElement.\n\t\t\tlet domParent, domBefore, domAfter;\n\n\t\t\tif ( viewPosition.offset === 0 ) {\n\t\t\t\tdomParent = this.mapViewToDom( viewParent as ViewElement );\n\n\t\t\t\tif ( !domParent ) {\n\t\t\t\t\t// Position is in a view element that has not been rendered to DOM yet.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tdomAfter = domParent.childNodes[ 0 ];\n\t\t\t} else {\n\t\t\t\tconst nodeBefore = viewPosition.nodeBefore!;\n\n\t\t\t\tdomBefore = nodeBefore.is( '$text' ) ?\n\t\t\t\t\tthis.findCorrespondingDomText( nodeBefore ) :\n\t\t\t\t\tthis.mapViewToDom( nodeBefore as ViewElement );\n\n\t\t\t\tif ( !domBefore ) {\n\t\t\t\t\t// Position is after a view element that has not been rendered to DOM yet.\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tdomParent = domBefore.parentNode;\n\t\t\t\tdomAfter = domBefore.nextSibling;\n\t\t\t}\n\n\t\t\t// If there is an inline filler at position return position inside the filler. We should never return\n\t\t\t// the position before the inline filler.\n\t\t\tif ( isText( domAfter ) && startsWithFiller( domAfter ) ) {\n\t\t\t\treturn { parent: domAfter, offset: INLINE_FILLER_LENGTH };\n\t\t\t}\n\n\t\t\tconst offset = domBefore ? indexOf( domBefore ) + 1 : 0;\n\n\t\t\treturn { parent: domParent!, offset };\n\t\t}\n\t}\n\n\t/**\n\t * Converts DOM to view. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments function will return corresponding items. For\n\t * {@link module:engine/view/filler fillers} `null` will be returned.\n\t * For all DOM elements rendered by {@link module:engine/view/uielement~ViewUIElement} that UIElement will be returned.\n\t *\n\t * @param domNode DOM node or document fragment to transform.\n\t * @param options Conversion options.\n\t * @param options.bind Determines whether new elements will be bound. False by default.\n\t * @param options.withChildren If `true`, node's and document fragment's children will be converted too. True by default.\n\t * @param options.keepOriginalCase If `false`, node's tag name will be converted to lower case. False by default.\n\t * @param options.skipComments If `false`, comment nodes will be converted to `$comment`\n\t * {@link module:engine/view/uielement~ViewUIElement view UI elements}. False by default.\n\t * @returns Converted node or document fragment or `null` if DOM node is a {@link module:engine/view/filler filler}\n\t * or the given node is an empty text node.\n\t */\n\tpublic domToView(\n\t\tdomNode: DomNode,\n\t\toptions: {\n\t\t\tbind?: boolean;\n\t\t\twithChildren?: boolean;\n\t\t\tkeepOriginalCase?: boolean;\n\t\t\tskipComments?: boolean;\n\t\t} = {}\n\t): ViewNode | ViewDocumentFragment | null {\n\t\tconst inlineNodes: Array<ViewNode> = [];\n\t\tconst generator = this._domToView( domNode, options, inlineNodes );\n\n\t\t// Get the first yielded value or a returned value.\n\t\tconst node = generator.next().value;\n\n\t\tif ( !node ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Trigger children handling.\n\t\tgenerator.next();\n\n\t\t// Whitespace cleaning.\n\t\tthis._processDomInlineNodes( null, inlineNodes, options );\n\n\t\t// This was a single block filler so just remove it.\n\t\tif ( this.blockFillerMode == 'br' && isViewBrFiller( node ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Text not got trimmed to an empty string so there is no result node.\n\t\tif ( node.is( '$text' ) && node.data.length == 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Converts children of the DOM element to view nodes using\n\t * the {@link module:engine/view/domconverter~ViewDomConverter#domToView} method.\n\t * Additionally this method omits block {@link module:engine/view/filler filler}, if it exists in the DOM parent.\n\t *\n\t * @param domElement Parent DOM element.\n\t * @param options See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.\n\t * @param inlineNodes An array that will be populated with inline nodes. It's used internally for whitespace processing.\n\t * @returns View nodes.\n\t */\n\tpublic* domChildrenToView(\n\t\tdomElement: DomElement,\n\t\toptions: Parameters<ViewDomConverter[ 'domToView' ]>[ 1 ] = {},\n\t\tinlineNodes: Array<ViewNode> = []\n\t): IterableIterator<ViewNode> {\n\t\t// Get child nodes from content document fragment if element is template\n\t\tlet childNodes: Array<ChildNode>;\n\n\t\tif ( domElement instanceof HTMLTemplateElement ) {\n\t\t\tchildNodes = [ ...domElement.content.childNodes ];\n\t\t} else {\n\t\t\tchildNodes = [ ...domElement.childNodes ];\n\t\t}\n\n\t\tfor ( let i = 0; i < childNodes.length; i++ ) {\n\t\t\tconst domChild = childNodes[ i ];\n\t\t\tconst generator = this._domToView( domChild, options, inlineNodes );\n\n\t\t\t// Get the first yielded value or a returned value.\n\t\t\tconst viewChild = generator.next().value as ViewNode | null;\n\n\t\t\tif ( viewChild !== null ) {\n\t\t\t\t// Whitespace cleaning before entering a block element (between block elements).\n\t\t\t\tif ( this._isBlockViewElement( viewChild ) ) {\n\t\t\t\t\tthis._processDomInlineNodes( domElement, inlineNodes, options );\n\t\t\t\t}\n\n\t\t\t\t// Yield only if this is not a block filler.\n\t\t\t\tif ( !( this.blockFillerMode == 'br' && isViewBrFiller( viewChild ) ) ) {\n\t\t\t\t\tyield viewChild;\n\t\t\t\t}\n\n\t\t\t\t// Trigger children handling.\n\t\t\t\tgenerator.next();\n\t\t\t}\n\t\t}\n\n\t\t// Whitespace cleaning before leaving a block element (content of block element).\n\t\tthis._processDomInlineNodes( domElement, inlineNodes, options );\n\t}\n\n\t/**\n\t * Converts DOM selection to view {@link module:engine/view/selection~ViewSelection}.\n\t * Ranges which cannot be converted will be omitted.\n\t *\n\t * @param domSelection DOM selection.\n\t * @returns View selection.\n\t */\n\tpublic domSelectionToView( domSelection: DomSelection ): ViewSelection {\n\t\t// See: https://github.com/ckeditor/ckeditor5/issues/9635.\n\t\tif ( isGeckoRestrictedDomSelection( domSelection ) ) {\n\t\t\treturn new ViewSelection( [] );\n\t\t}\n\n\t\t// DOM selection might be placed in fake selection container.\n\t\t// If container contains fake selection - return corresponding view selection.\n\t\tif ( domSelection.rangeCount === 1 ) {\n\t\t\tlet container: Node | null = domSelection.getRangeAt( 0 ).startContainer;\n\n\t\t\t// The DOM selection might be moved to the text node inside the fake selection container.\n\t\t\tif ( isText( container ) ) {\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t}\n\n\t\t\tconst viewSelection = this.fakeSelectionToView( container as DomElement );\n\n\t\t\tif ( viewSelection ) {\n\t\t\t\treturn viewSelection;\n\t\t\t}\n\t\t}\n\n\t\tconst isBackward = this.isDomSelectionBackward( domSelection );\n\n\t\tconst viewRanges: Array<ViewRange> = [];\n\n\t\tfor ( let i = 0; i < domSelection.rangeCount; i++ ) {\n\t\t\t// DOM Range have correct start and end, no matter what is the DOM Selection direction. So we don't have to fix anything.\n\t\t\tconst domRange = domSelection.getRangeAt( i );\n\t\t\tconst viewRange = this.domRangeToView( domRange );\n\n\t\t\tif ( viewRange ) {\n\t\t\t\tviewRanges.push( viewRange );\n\t\t\t}\n\t\t}\n\n\t\treturn new ViewSelection( viewRanges, { backward: isBackward } );\n\t}\n\n\t/**\n\t * Converts DOM Range to view {@link module:engine/view/range~ViewRange}.\n\t * If the start or end position cannot be converted `null` is returned.\n\t *\n\t * @param domRange DOM range.\n\t * @returns View range.\n\t */\n\tpublic domRangeToView( domRange: DomRange | StaticRange ): ViewRange | null {\n\t\tconst viewStart = this.domPositionToView( domRange.startContainer, domRange.startOffset );\n\t\tconst viewEnd = this.domPositionToView( domRange.endContainer, domRange.endOffset );\n\n\t\tif ( viewStart && viewEnd ) {\n\t\t\treturn new ViewRange( viewStart, viewEnd );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Converts DOM parent and offset to view {@link module:engine/view/position~ViewPosition}.\n\t *\n\t * If the position is inside a {@link module:engine/view/filler filler} which has no corresponding view node,\n\t * position of the filler will be converted and returned.\n\t *\n\t * If the position is inside DOM element rendered by {@link module:engine/view/uielement~ViewUIElement}\n\t * that position will be converted to view position before that UIElement.\n\t *\n\t * If structures are too different and it is not possible to find corresponding position then `null` will be returned.\n\t *\n\t * @param domParent DOM position parent.\n\t * @param domOffset DOM position offset. You can skip it when converting the inline filler node.\n\t * @returns View position.\n\t */\n\tpublic domPositionToView( domParent: DomNode, domOffset: number = 0 ): ViewPosition | null {\n\t\tif ( this.isBlockFiller( domParent ) ) {\n\t\t\treturn this.domPositionToView( domParent.parentNode!, indexOf( domParent ) );\n\t\t}\n\n\t\t// If position is somewhere inside UIElement or a RawElement - return position before that element.\n\t\tconst viewElement = this.mapDomToView( domParent as DomElement );\n\n\t\tif ( viewElement && ( viewElement.is( 'uiElement' ) || viewElement.is( 'rawElement' ) ) ) {\n\t\t\treturn ViewPosition._createBefore( viewElement );\n\t\t}\n\n\t\tif ( isText( domParent ) ) {\n\t\t\tif ( isInlineFiller( domParent ) ) {\n\t\t\t\treturn this.domPositionToView( domParent.parentNode!, indexOf( domParent ) );\n\t\t\t}\n\n\t\t\tconst viewParent = this.findCorrespondingViewText( domParent );\n\t\t\tlet offset = domOffset;\n\n\t\t\tif ( !viewParent ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( startsWithFiller( domParent ) ) {\n\t\t\t\toffset -= INLINE_FILLER_LENGTH;\n\t\t\t\toffset = offset < 0 ? 0 : offset;\n\t\t\t}\n\n\t\t\treturn new ViewPosition( viewParent, offset );\n\t\t}\n\t\t// domParent instanceof HTMLElement.\n\t\telse {\n\t\t\tif ( domOffset === 0 ) {\n\t\t\t\tconst viewParent = this.mapDomToView( domParent as DomElement );\n\n\t\t\t\tif ( viewParent ) {\n\t\t\t\t\treturn new ViewPosition( viewParent, 0 );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst domBefore = domParent.childNodes[ domOffset - 1 ];\n\n\t\t\t\t// Jump over an inline filler (and also on Firefox jump over a block filler while pressing backspace in an empty paragraph).\n\t\t\t\tif ( isText( domBefore ) && isInlineFiller( domBefore ) || domBefore && this.isBlockFiller( domBefore ) ) {\n\t\t\t\t\treturn this.domPositionToView( domBefore.parentNode!, indexOf( domBefore ) );\n\t\t\t\t}\n\n\t\t\t\tconst viewBefore = isText( domBefore ) ?\n\t\t\t\t\tthis.findCorrespondingViewText( domBefore ) :\n\t\t\t\t\tthis.mapDomToView( domBefore as DomElement );\n\n\t\t\t\t// TODO #663\n\t\t\t\tif ( viewBefore && viewBefore.parent ) {\n\t\t\t\t\treturn new ViewPosition( viewBefore.parent, viewBefore.index! + 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns corresponding view {@link module:engine/view/element~ViewElement Element} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment} for provided DOM element or\n\t * document fragment. If there is no view item {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}\n\t * to the given DOM - `undefined` is returned.\n\t *\n\t * For all DOM elements rendered by a {@link module:engine/view/uielement~ViewUIElement} or\n\t * a {@link module:engine/view/rawelement~ViewRawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * @param domElementOrDocumentFragment DOM element or document fragment.\n\t * @returns Corresponding view element, document fragment or `undefined` if no element was bound.\n\t */\n\tpublic mapDomToView( domElementOrDocumentFragment: DomElement | DomDocumentFragment ): ViewElement | ViewDocumentFragment | undefined {\n\t\tconst hostElement = this.getHostViewElement( domElementOrDocumentFragment );\n\n\t\treturn hostElement || this._domToViewMapping.get( domElementOrDocumentFragment );\n\t}\n\n\t/**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a\n\t * {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * For all text nodes rendered by a {@link module:engine/view/uielement~ViewUIElement} or\n\t * a {@link module:engine/view/rawelement~ViewRawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * Note that for the block or inline {@link module:engine/view/filler filler} this method returns `null`.\n\t *\n\t * @param domText DOM text node.\n\t * @returns Corresponding view text node or `null`, if it was not possible to find a corresponding node.\n\t */\n\tpublic findCorrespondingViewText( domText: DomText ): ViewText | ViewUIElement | ViewRawElement | null {\n\t\tif ( isInlineFiller( domText ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// If DOM text was rendered by a UIElement or a RawElement - return this parent element.\n\t\tconst hostElement = this.getHostViewElement( domText );\n\n\t\tif ( hostElement ) {\n\t\t\treturn hostElement;\n\t\t}\n\n\t\tconst previousSibling = domText.previousSibling;\n\n\t\t// Try to use previous sibling to find the corresponding text node.\n\t\tif ( previousSibling ) {\n\t\t\tif ( !( this.isElement( previousSibling ) ) ) {\n\t\t\t\t// The previous is text or comment.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst viewElement = this.mapDomToView( previousSibling );\n\n\t\t\tif ( viewElement ) {\n\t\t\t\tconst nextSibling = ( viewElement as ViewElement ).nextSibling;\n\n\t\t\t\t// It might be filler which has no corresponding view node.\n\t\t\t\tif ( nextSibling instanceof ViewText ) {\n\t\t\t\t\treturn nextSibling;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Try to use parent to find the corresponding text node.\n\t\telse {\n\t\t\tconst viewElement = this.mapDomToView( domText.parentNode as ( DomElement | DomDocumentFragment ) );\n\n\t\t\tif ( viewElement ) {\n\t\t\t\tconst firstChild = ( viewElement as ViewElement ).getChild( 0 );\n\n\t\t\t\t// It might be filler which has no corresponding view node.\n\t\t\t\tif ( firstChild instanceof ViewText ) {\n\t\t\t\t\treturn firstChild;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns corresponding DOM item for provided {@link module:engine/view/element~ViewElement Element} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment}.\n\t * To find a corresponding text for {@link module:engine/view/text~ViewText view Text instance}\n\t * use {@link #findCorrespondingDomText}.\n\t *\n\t * @label ELEMENT\n\t * @param element View element or document fragment.\n\t * @returns Corresponding DOM node or document fragment.\n\t */\n\tpublic mapViewToDom( element: ViewElement ): DomElement | undefined;\n\n\t/**\n\t * Returns corresponding DOM item for provided {@link module:engine/view/element~ViewElement Element} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment}.\n\t * To find a corresponding text for {@link module:engine/view/text~ViewText view Text instance}\n\t * use {@link #findCorrespondingDomText}.\n\t *\n\t * @label DOCUMENT_FRAGMENT\n\t * @param documentFragment View element or document fragment.\n\t * @returns Corresponding DOM node or document fragment.\n\t */\n\tpublic mapViewToDom( documentFragment: ViewDocumentFragment ): DomDocumentFragment | undefined;\n\n\t/**\n\t * Returns corresponding DOM item for provided {@link module:engine/view/element~ViewElement Element} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment}.\n\t * To find a corresponding text for {@link module:engine/view/text~ViewText view Text instance}\n\t * use {@link #findCorrespondingDomText}.\n\t *\n\t * @label DOCUMENT_FRAGMENT_OR_ELEMENT\n\t * @param documentFragmentOrElement View element or document fragment.\n\t * @returns Corresponding DOM node or document fragment.\n\t */\n\tpublic mapViewToDom( documentFragmentOrElement: ViewElement | ViewDocumentFragment ): DomElement | DomDocumentFragment | undefined;\n\n\tpublic mapViewToDom( documentFragmentOrElement: ViewElement | ViewDocumentFragment ): DomElement | DomDocumentFragment | undefined {\n\t\treturn this._viewToDomMapping.get( documentFragmentOrElement );\n\t}\n\n\t/**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a\n\t * {@link module:engine/view/domconverter~ViewDomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * @param viewText View text node.\n\t * @returns Corresponding DOM text node or `null`, if it was not possible to find a corresponding node.\n\t */\n\tpublic findCorrespondingDomText( viewText: ViewText ): DomText | null {\n\t\tconst previousSibling = viewText.previousSibling;\n\n\t\t// Try to use previous sibling to find the corresponding text node.\n\t\tif ( previousSibling && this.mapViewToDom( previousSibling as ViewElement ) ) {\n\t\t\treturn this.mapViewToDom( previousSibling as ViewElement )!.nextSibling as DomText;\n\t\t}\n\n\t\t// If this is a first node, try to use parent to find the corresponding text node.\n\t\tif ( !previousSibling && viewText.parent && this.mapViewToDom( viewText.parent ) ) {\n\t\t\treturn this.mapViewToDom( viewText.parent )!.childNodes[ 0 ] as DomText;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Focuses DOM editable that is corresponding to provided {@link module:engine/view/editableelement~ViewEditableElement}.\n\t */\n\tpublic focus( viewEditable: ViewEditableElement ): void {\n\t\tconst domEditable = this.mapViewToDom( viewEditable );\n\n\t\tif ( !domEditable || domEditable.ownerDocument.activeElement === domEditable ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'ViewDomConverter',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cDOM editable is already active or does not exist',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'ViewDomConverter',\n\t\t// @if CK_DEBUG_TYPING // \t\t'Focus DOM editable:',\n\t\t// @if CK_DEBUG_TYPING // \t\t{ domEditable }\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t// Save the scrollX and scrollY positions before the focus.\n\t\tconst { scrollX, scrollY } = global.window;\n\t\tconst scrollPositions: Array<[ number, number ]> = [];\n\n\t\t// Save all scrollLeft and scrollTop values starting from domEditable up to\n\t\t// document#documentElement.\n\t\tforEachDomElementAncestor( domEditable, node => {\n\t\t\tconst { scrollLeft, scrollTop } = ( node as DomElement );\n\n\t\t\tscrollPositions.push( [ scrollLeft, scrollTop ] );\n\t\t} );\n\n\t\tdomEditable.focus( { preventScroll: true } );\n\n\t\t// Restore scrollLeft and scrollTop values starting from domEditable up to\n\t\t// document#documentElement.\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/951\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/957\n\t\tforEachDomElementAncestor( domEditable, node => {\n\t\t\tconst [ scrollLeft, scrollTop ] = scrollPositions.shift() as [ number, number ];\n\n\t\t\tnode.scrollLeft = scrollLeft;\n\t\t\tnode.scrollTop = scrollTop;\n\t\t} );\n\n\t\t// Restore the scrollX and scrollY positions after the focus.\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/951\n\t\tglobal.window.scrollTo( scrollX, scrollY );\n\t}\n\n\t/**\n\t * Remove DOM selection from blurred editable, so it won't interfere with clicking on dropdowns (especially on iOS).\n\t *\n\t * @internal\n\t */\n\tpublic _clearDomSelection(): void {\n\t\tconst domEditable = this.mapViewToDom( this.document.selection.editableElement! );\n\n\t\tif ( !domEditable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if DOM selection is inside editor editable element.\n\t\tconst domSelection = domEditable.ownerDocument.defaultView!.getSelection()!;\n\t\tconst newViewSelection = this.domSelectionToView( domSelection );\n\t\tconst selectionInEditable = newViewSelection && newViewSelection.rangeCount > 0;\n\n\t\tif ( selectionInEditable ) {\n\t\t\tdomSelection.removeAllRanges();\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when `node.nodeType` equals `Node.ELEMENT_NODE`.\n\t *\n\t * @param node Node to check.\n\t */\n\tpublic isElement( node: DomNode ): node is DomElement {\n\t\treturn node && node.nodeType == Node.ELEMENT_NODE;\n\t}\n\n\t/**\n\t * Returns `true` when `node.nodeType` equals `Node.DOCUMENT_FRAGMENT_NODE`.\n\t *\n\t * @param node Node to check.\n\t */\n\tpublic isDocumentFragment( node: DomNode ): node is DomDocumentFragment {\n\t\treturn node && node.nodeType == Node.DOCUMENT_FRAGMENT_NODE;\n\t}\n\n\t/**\n\t * Checks if the node is an instance of the block filler for this DOM converter.\n\t *\n\t * ```ts\n\t * const converter = new ViewDomConverter( viewDocument, { blockFillerMode: 'br' } );\n\t *\n\t * converter.isBlockFiller( BR_FILLER( document ) ); // true\n\t * converter.isBlockFiller( NBSP_FILLER( document ) ); // false\n\t * ```\n\t *\n\t * **Note:**: For the `'nbsp'` mode the method also checks context of a node so it cannot be a detached node.\n\t *\n\t * **Note:** A special case in the `'nbsp'` mode exists where the `<br>` in `<p><br></p>` is treated as a block filler.\n\t *\n\t * @param domNode DOM node to check.\n\t * @returns True if a node is considered a block filler for given mode.\n\t */\n\tpublic isBlockFiller( domNode: DomNode ): boolean {\n\t\tif ( this.blockFillerMode == 'br' ) {\n\t\t\treturn domNode.isEqualNode( BR_FILLER_REF );\n\t\t}\n\n\t\t// Special case for <p><br></p> in which <br> should be treated as filler even when we are not in the 'br' mode.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/5564.\n\t\tif ( isOnlyBrInBlock( domNode as DomElement, this.blockElements ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If not in 'br' mode, try recognizing both marked and regular nbsp block fillers.\n\t\treturn domNode.isEqualNode( MARKED_NBSP_FILLER_REF ) || isNbspBlockFiller( domNode, this.blockElements );\n\t}\n\n\t/**\n\t * Returns `true` if given selection is a backward selection, that is, if it's `focus` is before `anchor`.\n\t *\n\t * @param selection Selection instance to check.\n\t */\n\tpublic isDomSelectionBackward( selection: DomSelection ): boolean {\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Since it takes multiple lines of code to check whether a \"DOM Position\" is before/after another \"DOM Position\",\n\t\t// we will use the fact that range will collapse if it's end is before it's start.\n\t\tconst range = this._domDocument.createRange();\n\n\t\ttry {\n\t\t\trange.setStart( selection.anchorNode!, selection.anchorOffset );\n\t\t\trange.setEnd( selection.focusNode!, selection.focusOffset );\n\t\t} catch {\n\t\t\t// Safari sometimes gives us a selection that makes Range.set{Start,End} throw.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/12375.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst backward = range.collapsed;\n\n\t\trange.detach();\n\n\t\treturn backward;\n\t}\n\n\t/**\n\t * Returns a parent {@link module:engine/view/uielement~ViewUIElement} or {@link module:engine/view/rawelement~ViewRawElement}\n\t * that hosts the provided DOM node. Returns `null` if there is no such parent.\n\t */\n\tpublic getHostViewElement( domNode: DomNode ): ViewUIElement | ViewRawElement | null {\n\t\tconst ancestors = getAncestors( domNode );\n\n\t\t// Remove domNode from the list.\n\t\tancestors.pop();\n\n\t\twhile ( ancestors.length ) {\n\t\t\tconst domNode = ancestors.pop();\n\t\t\tconst viewNode = this._domToViewMapping.get( domNode as DomElement );\n\n\t\t\tif ( viewNode && ( viewNode.is( 'uiElement' ) || viewNode.is( 'rawElement' ) ) ) {\n\t\t\t\treturn viewNode;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Checks if the given selection's boundaries are at correct places.\n\t *\n\t * The following places are considered as incorrect for selection boundaries:\n\t *\n\t * * before or in the middle of an inline filler sequence,\n\t * * inside a DOM element which represents {@link module:engine/view/uielement~ViewUIElement a view UI element},\n\t * * inside a DOM element which represents {@link module:engine/view/rawelement~ViewRawElement a view raw element}.\n\t *\n\t * @param domSelection The DOM selection object to be checked.\n\t * @returns `true` if the given selection is at a correct place, `false` otherwise.\n\t */\n\tpublic isDomSelectionCorrect( domSelection: DomSelection ): boolean {\n\t\treturn this._isDomSelectionPositionCorrect( domSelection.anchorNode!, domSelection.anchorOffset ) &&\n\t\t\tthis._isDomSelectionPositionCorrect( domSelection.focusNode!, domSelection.focusOffset );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM nodes to view elements.\n\t *\n\t * This is affecting how {@link module:engine/view/domconverter~ViewDomConverter#domToView} and\n\t * {@link module:engine/view/domconverter~ViewDomConverter#domChildrenToView} process DOM nodes.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching a view element whose content should\n\t * be treated as raw data.\n\t */\n\tpublic registerRawContentMatcher( pattern: MatcherPattern ): void {\n\t\tthis._rawContentElementMatcher.add( pattern );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for inline object view elements.\n\t *\n\t * This is affecting how {@link module:engine/view/domconverter~ViewDomConverter#domToView} and\n\t * {@link module:engine/view/domconverter~ViewDomConverter#domChildrenToView} process DOM nodes.\n\t *\n\t * This is an extension of a simple {@link #inlineObjectElements} array of element names.\n\t *\n\t * @param pattern Pattern matching a view element which should be treated as an inline object.\n\t */\n\tpublic registerInlineObjectMatcher( pattern: MatcherPattern ): void {\n\t\tthis._inlineObjectElementMatcher.add( pattern );\n\t}\n\n\t/**\n\t * Clear temporary custom properties.\n\t *\n\t * @internal\n\t */\n\tpublic _clearTemporaryCustomProperties(): void {\n\t\tfor ( const element of this._elementsWithTemporaryCustomProperties ) {\n\t\t\telement._removeCustomProperty( 'editingPipeline:doNotReuseOnce' );\n\t\t}\n\n\t\tthis._elementsWithTemporaryCustomProperties.clear();\n\t}\n\n\t/**\n\t * Returns the block {@link module:engine/view/filler filler} node based on the current {@link #blockFillerMode} setting.\n\t */\n\tprivate _getBlockFiller(): DomNode {\n\t\tswitch ( this.blockFillerMode ) {\n\t\t\tcase 'nbsp':\n\t\t\t\treturn NBSP_FILLER( this._domDocument ); // eslint-disable-line new-cap\n\t\t\tcase 'markedNbsp':\n\t\t\t\treturn MARKED_NBSP_FILLER( this._domDocument ); // eslint-disable-line new-cap\n\t\t\tcase 'br':\n\t\t\t\treturn BR_FILLER( this._domDocument ); // eslint-disable-line new-cap\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given DOM position is a correct place for selection boundary. See {@link #isDomSelectionCorrect}.\n\t *\n\t * @param domParent Position parent.\n\t * @param offset Position offset.\n\t * @returns `true` if given position is at a correct place for selection boundary, `false` otherwise.\n\t */\n\tprivate _isDomSelectionPositionCorrect( domParent: DomNode, offset: number ): boolean {\n\t\t// If selection is before or in the middle of inline filler string, it is incorrect.\n\t\tif ( isText( domParent ) && startsWithFiller( domParent ) && offset < INLINE_FILLER_LENGTH ) {\n\t\t\t// Selection in a text node, at wrong position (before or in the middle of filler).\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.isElement( domParent ) && startsWithFiller( domParent.childNodes[ offset ] ) ) {\n\t\t\t// Selection in an element node, before filler text node.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst viewParent = this.mapDomToView( domParent as DomElement );\n\n\t\t// The position is incorrect when anchored inside a UIElement or a RawElement.\n\t\t// Note: In case of UIElement and RawElement, mapDomToView() returns a parent element for any DOM child\n\t\t// so there's no need to perform any additional checks.\n\t\tif ( viewParent && ( viewParent.is( 'uiElement' ) || viewParent.is( 'rawElement' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Internal generator for {@link #domToView}. Also used by {@link #domChildrenToView}.\n\t * Separates DOM nodes conversion from whitespaces processing.\n\t *\n\t * @param domNode DOM node or document fragment to transform.\n\t * @param inlineNodes An array of recently encountered inline nodes truncated to the block element boundaries.\n\t * Used later to process whitespaces.\n\t */\n\tprivate* _domToView(\n\t\tdomNode: DomNode,\n\t\toptions: {\n\t\t\tbind?: boolean;\n\t\t\twithChildren?: boolean;\n\t\t\tkeepOriginalCase?: boolean;\n\t\t\tskipComments?: boolean;\n\t\t},\n\t\tinlineNodes: Array<ViewNode>\n\t): IterableIterator<ViewNode | ViewDocumentFragment | null> {\n\t\t// Special case for <p><br></p> in which <br> should be treated as filler even when we are not in the 'br' mode.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/5564.\n\t\tif ( this.blockFillerMode != 'br' && isOnlyBrInBlock( domNode as DomElement, this.blockElements ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// When node is inside a UIElement or a RawElement return that parent as it's view representation.\n\t\tconst hostElement = this.getHostViewElement( domNode );\n\n\t\tif ( hostElement ) {\n\t\t\treturn hostElement;\n\t\t}\n\n\t\tif ( isComment( domNode ) && options.skipComments ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( isText( domNode ) ) {\n\t\t\tif ( isInlineFiller( domNode ) ) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tconst textData = domNode.data;\n\n\t\t\t\tif ( textData === '' ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst textNode = new ViewText( this.document, textData );\n\n\t\t\t\tinlineNodes.push( textNode );\n\n\t\t\t\treturn textNode;\n\t\t\t}\n\t\t} else {\n\t\t\tlet viewElement = this.mapDomToView( domNode as ( DomElement | DomDocumentFragment ) );\n\n\t\t\tif ( viewElement ) {\n\t\t\t\tif ( this._isInlineObjectElement( viewElement ) ) {\n\t\t\t\t\tinlineNodes.push( viewElement );\n\t\t\t\t}\n\n\t\t\t\treturn viewElement;\n\t\t\t}\n\n\t\t\tif ( this.isDocumentFragment( domNode ) ) {\n\t\t\t\t// Create view document fragment.\n\t\t\t\tviewElement = new ViewDocumentFragment( this.document );\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindDocumentFragments( domNode, viewElement );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Create view element.\n\t\t\t\tviewElement = this._createViewElement( domNode, options );\n\n\t\t\t\tif ( options.bind ) {\n\t\t\t\t\tthis.bindElements( domNode as DomElement, viewElement );\n\t\t\t\t}\n\n\t\t\t\t// Copy element's attributes.\n\t\t\t\tconst attrs = ( domNode as DomElement ).attributes;\n\n\t\t\t\tif ( attrs ) {\n\t\t\t\t\tfor ( let l = attrs.length, i = 0; i < l; i++ ) {\n\t\t\t\t\t\tviewElement._setAttribute( attrs[ i ].name, attrs[ i ].value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Treat this element's content as a raw data if it was registered as such.\n\t\t\t\tif ( this._isViewElementWithRawContent( viewElement, options ) ) {\n\t\t\t\t\tviewElement._setCustomProperty( '$rawContent', ( domNode as DomElement ).innerHTML );\n\n\t\t\t\t\tif ( !this._isBlockViewElement( viewElement ) ) {\n\t\t\t\t\t\tinlineNodes.push( viewElement );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn viewElement;\n\t\t\t\t}\n\n\t\t\t\t// Comment node is also treated as an element with raw data.\n\t\t\t\tif ( isComment( domNode ) ) {\n\t\t\t\t\tviewElement._setCustomProperty( '$rawContent', domNode.data );\n\n\t\t\t\t\treturn viewElement;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Yield the element first so the flow of nested inline nodes is not reversed inside elements.\n\t\t\tyield viewElement;\n\n\t\t\tconst nestedInlineNodes: Array<ViewNode> = [];\n\n\t\t\tif ( options.withChildren !== false ) {\n\t\t\t\tfor ( const child of this.domChildrenToView( domNode as DomElement, options, nestedInlineNodes ) ) {\n\t\t\t\t\tviewElement._appendChild( child );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if this is an inline object after processing child nodes so matcher\n\t\t\t// for inline objects can verify if the element is empty.\n\t\t\tif ( this._isInlineObjectElement( viewElement ) ) {\n\t\t\t\tinlineNodes.push( viewElement );\n\n\t\t\t\t// Inline object content should be handled as a flow-root.\n\t\t\t\tthis._processDomInlineNodes( null, nestedInlineNodes, options );\n\t\t\t} else {\n\t\t\t\t// It's an inline element that is not an object (like <b>, <i>) or a block element.\n\t\t\t\tfor ( const inlineNode of nestedInlineNodes ) {\n\t\t\t\t\tinlineNodes.push( inlineNode );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Internal helper that walks the list of inline view nodes already generated from DOM nodes\n\t * and handles whitespaces and NBSPs.\n\t *\n\t * @param domParent The DOM parent of the given inline nodes. This should be a document fragment or\n\t * a block element to whitespace processing start cleaning.\n\t * @param inlineNodes An array of recently encountered inline nodes truncated to the block element boundaries.\n\t */\n\tprivate _processDomInlineNodes(\n\t\tdomParent: DomElement | null,\n\t\tinlineNodes: Array<ViewNode>,\n\t\toptions: { withChildren?: boolean }\n\t): void {\n\t\tif ( !inlineNodes.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Process text nodes only after reaching a block or document fragment,\n\t\t// do not alter whitespaces while processing an inline element like <b> or <i>.\n\t\tif ( domParent && !this.isDocumentFragment( domParent ) && !this._isBlockDomElement( domParent ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet prevNodeEndsWithSpace = false;\n\n\t\tfor ( let i = 0; i < inlineNodes.length; i++ ) {\n\t\t\tconst node = inlineNodes[ i ];\n\n\t\t\tif ( !node.is( '$text' ) ) {\n\t\t\t\tprevNodeEndsWithSpace = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet data: string;\n\t\t\tlet nodeEndsWithSpace: boolean = false;\n\n\t\t\tif ( this._isPreFormatted( node ) ) {\n\t\t\t\tdata = getDataWithoutFiller( node.data );\n\t\t\t} else {\n\t\t\t\t// Change all consecutive whitespace characters (from the [ \\n\\t\\r] set –\n\t\t\t\t// see https://github.com/ckeditor/ckeditor5-engine/issues/822#issuecomment-311670249) to a single space character.\n\t\t\t\t// That's how multiple whitespaces are treated when rendered, so we normalize those whitespaces.\n\t\t\t\t// We're replacing 1+ (and not 2+) to also normalize singular \\n\\t\\r characters.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/822.\n\t\t\t\tdata = node.data.replace( /[ \\n\\t\\r]{1,}/g, ' ' );\n\t\t\t\tnodeEndsWithSpace = /[^\\S\\u00A0]/.test( data.charAt( data.length - 1 ) );\n\n\t\t\t\tconst prevNode = i > 0 ? inlineNodes[ i - 1 ] : null;\n\t\t\t\tconst nextNode = i + 1 < inlineNodes.length ? inlineNodes[ i + 1 ] : null;\n\n\t\t\t\tconst shouldLeftTrim = !prevNode || prevNode.is( 'element' ) && prevNode.name == 'br' || prevNodeEndsWithSpace;\n\t\t\t\tconst shouldRightTrim = nextNode ? false : !startsWithFiller( node.data );\n\n\t\t\t\t// Do not try to clear whitespaces if this is flat mapping for the purpose of mutation observer and differ in rendering.\n\t\t\t\tif ( options.withChildren !== false ) {\n\t\t\t\t\t// If the previous dom text node does not exist or it ends by whitespace character, remove space character from the\n\t\t\t\t\t// beginning of this text node. Such space character is treated as a whitespace.\n\t\t\t\t\tif ( shouldLeftTrim ) {\n\t\t\t\t\t\tdata = data.replace( /^ /, '' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the next text node does not exist remove space character from the end of this text node.\n\t\t\t\t\tif ( shouldRightTrim ) {\n\t\t\t\t\t\tdata = data.replace( / $/, '' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// At the beginning and end of a block element, Firefox inserts normal space + <br> instead of non-breaking space.\n\t\t\t\t// This means that the text node starts/end with normal space instead of non-breaking space.\n\t\t\t\t// This causes a problem because the normal space would be removed in `.replace` calls above. To prevent that,\n\t\t\t\t// the inline filler is removed only after the data is initially processed (by the `.replace` above).\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/692.\n\t\t\t\tdata = getDataWithoutFiller( data );\n\n\t\t\t\t// Block filler handling.\n\t\t\t\tif ( this.blockFillerMode != 'br' && node.parent ) {\n\t\t\t\t\tif ( isViewMarkedNbspFiller( node.parent, data ) ) {\n\t\t\t\t\t\tdata = '';\n\n\t\t\t\t\t\t// Mark block element as it has a block filler and remove the `<span data-cke-filler=\"true\">` element.\n\t\t\t\t\t\tif ( node.parent.parent ) {\n\t\t\t\t\t\t\tnode.parent.parent._setCustomProperty( '$hasBlockFiller', true );\n\t\t\t\t\t\t\tnode.parent._remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if ( isViewNbspFiller( node.parent, data, this.blockElements ) ) {\n\t\t\t\t\t\tdata = '';\n\t\t\t\t\t\tnode.parent._setCustomProperty( '$hasBlockFiller', true );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// At this point we should have removed all whitespaces from DOM text data.\n\t\t\t\t//\n\t\t\t\t// Now, We will reverse the process that happens in `_processDataFromViewText`.\n\t\t\t\t//\n\t\t\t\t// We have to change &nbsp; chars, that were in DOM text data because of rendering reasons, to spaces.\n\t\t\t\t// First, change all ` \\u00A0` pairs (space + &nbsp;) to two spaces. DOM converter changes two spaces from model/view to\n\t\t\t\t// ` \\u00A0` to ensure proper rendering. Since here we convert back, we recognize those pairs and change them back to `  `.\n\t\t\t\tdata = data.replace( / \\u00A0/g, '  ' );\n\n\t\t\t\tconst isNextNodeInlineObjectElement = nextNode && nextNode.is( 'element' ) && nextNode.name != 'br';\n\t\t\t\tconst isNextNodeStartingWithSpace = nextNode && nextNode.is( '$text' ) && nextNode.data.charAt( 0 ) == ' ';\n\n\t\t\t\t// Then, let's change the last nbsp to a space.\n\t\t\t\tif ( /[ \\u00A0]\\u00A0$/.test( data ) || !nextNode || isNextNodeInlineObjectElement || isNextNodeStartingWithSpace ) {\n\t\t\t\t\tdata = data.replace( /\\u00A0$/, ' ' );\n\t\t\t\t}\n\n\t\t\t\t// Then, change &nbsp; character that is at the beginning of the text node to space character.\n\t\t\t\t// We do that replacement only if this is the first node or the previous node ends on whitespace character.\n\t\t\t\tif ( shouldLeftTrim || prevNode && prevNode.is( 'element' ) && prevNode.name != 'br' ) {\n\t\t\t\t\tdata = data.replace( /^\\u00A0/, ' ' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point, all whitespaces should be removed and all &nbsp; created for rendering reasons should be\n\t\t\t// changed to normal space. All left &nbsp; are &nbsp; inserted intentionally.\n\n\t\t\tif ( data.length == 0 && node.parent ) {\n\t\t\t\tnode._remove();\n\t\t\t\tinlineNodes.splice( i, 1 );\n\t\t\t\ti--;\n\t\t\t} else {\n\t\t\t\tnode._data = data;\n\t\t\t\tprevNodeEndsWithSpace = nodeEndsWithSpace;\n\t\t\t}\n\t\t}\n\n\t\tinlineNodes.length = 0;\n\t}\n\n\t/**\n\t * Takes text data from a given {@link module:engine/view/text~ViewText#data} and processes it so\n\t * it is correctly displayed in the DOM.\n\t *\n\t * Following changes are done:\n\t *\n\t * * a space at the beginning is changed to `&nbsp;` if this is the first text node in its container\n\t * element or if a previous text node ends with a space character,\n\t * * space at the end of the text node is changed to `&nbsp;` if there are two spaces at the end of a node or if next node\n\t * starts with a space or if it is the last text node in its container,\n\t * * remaining spaces are replaced to a chain of spaces and `&nbsp;` (e.g. `'x   x'` becomes `'x &nbsp; x'`).\n\t *\n\t * Content of {@link #preElements} is not processed.\n\t *\n\t * @param node View text node to process.\n\t * @returns Processed text data.\n\t */\n\tprivate _processDataFromViewText( node: ViewText | ViewTextProxy ): string {\n\t\tlet data = node.data;\n\n\t\t// If the currently processed view text node is preformatted, we should not change whitespaces.\n\t\tif ( this._isPreFormatted( node ) ) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// 1. Replace the first space with a nbsp if the previous node ends with a space or there is no previous node\n\t\t// (container element boundary).\n\t\tif ( data.charAt( 0 ) == ' ' ) {\n\t\t\tconst prevNode = this._getTouchingInlineViewNode( node as ViewText, false );\n\t\t\tconst prevEndsWithSpace = prevNode && prevNode.is( '$textProxy' ) && this._nodeEndsWithSpace( prevNode as ViewTextProxy );\n\n\t\t\tif ( prevEndsWithSpace || !prevNode ) {\n\t\t\t\tdata = '\\u00A0' + data.substr( 1 );\n\t\t\t}\n\t\t}\n\n\t\t// 2. Replace the last space with nbsp if there are two spaces at the end or if the next node starts with space or there is no\n\t\t// next node (container element boundary).\n\t\t//\n\t\t// Keep in mind that Firefox prefers $nbsp; before tag, not inside it:\n\t\t//\n\t\t// Foo <span>&nbsp;bar</span>  <-- bad.\n\t\t// Foo&nbsp;<span> bar</span>  <-- good.\n\t\t//\n\t\t// More here: https://github.com/ckeditor/ckeditor5-engine/issues/1747.\n\t\tif ( data.charAt( data.length - 1 ) == ' ' ) {\n\t\t\tconst nextNode = this._getTouchingInlineViewNode( node as ViewText, true );\n\t\t\tconst nextStartsWithSpace = nextNode && nextNode.is( '$textProxy' ) && nextNode.data.charAt( 0 ) == ' ';\n\n\t\t\tif ( data.charAt( data.length - 2 ) == ' ' || !nextNode || nextStartsWithSpace ) {\n\t\t\t\tdata = data.substr( 0, data.length - 1 ) + '\\u00A0';\n\t\t\t}\n\t\t}\n\n\t\t// 3. Create space+nbsp pairs.\n\t\treturn data.replace( / {2}/g, ' \\u00A0' );\n\t}\n\n\t/**\n\t * Checks whether given node ends with a space character after changing appropriate space characters to `&nbsp;`s.\n\t *\n\t * @param  node Node to check.\n\t * @returns `true` if given `node` ends with space, `false` otherwise.\n\t */\n\tprivate _nodeEndsWithSpace( node: ViewTextProxy ): boolean {\n\t\tif ( this._isPreFormatted( node ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst data = this._processDataFromViewText( node );\n\n\t\treturn data.charAt( data.length - 1 ) == ' ';\n\t}\n\n\t/**\n\t * Checks whether given text contains preformatted white space. This is the case if\n\t * * any of node ancestors has a name which is in `preElements` array, or\n\t * * the closest ancestor that has the `white-space` CSS property sets it to a value that preserves spaces\n\t *\n\t * @param node Node to check\n\t * @returns `true` if given node contains preformatted white space, `false` otherwise.\n\t */\n\tprivate _isPreFormatted( node: ViewText | ViewTextProxy ): boolean {\n\t\tif ( _hasViewParentOfType( node, this.preElements ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor ( const ancestor of node.getAncestors( { parentFirst: true } ) ) {\n\t\t\tif ( !ancestor.is( 'element' ) || !ancestor.hasStyle( 'white-space' ) || ancestor.getStyle( 'white-space' ) === 'inherit' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If the node contains the `white-space` property with a value that does not preserve spaces, it will take\n\t\t\t// precedence over any white-space settings its ancestors contain, so no further parent checking needs to\n\t\t\t// be done.\n\t\t\treturn [ 'pre', 'pre-wrap', 'break-spaces' ].includes( ancestor.getStyle( 'white-space' )! );\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Helper function. For given {@link module:engine/view/text~ViewText view text node}, it finds previous or next sibling\n\t * that is contained in the same container element. If there is no such sibling, `null` is returned.\n\t *\n\t * @param node Reference node.\n\t * @returns Touching text node, an inline object\n\t * or `null` if there is no next or previous touching text node.\n\t */\n\tprivate _getTouchingInlineViewNode( node: ViewText, getNext: boolean ): ViewElement | ViewTextProxy | null {\n\t\tconst treeWalker = new ViewTreeWalker( {\n\t\t\tstartPosition: getNext ? ViewPosition._createAfter( node ) : ViewPosition._createBefore( node ),\n\t\t\tdirection: getNext ? 'forward' : 'backward'\n\t\t} );\n\n\t\tfor ( const { item } of treeWalker ) {\n\t\t\t// Found a text node in the same container element.\n\t\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\t// Found a transparent element, skip it and continue inside it.\n\t\t\telse if ( item.is( 'element' ) && item.getCustomProperty( 'dataPipeline:transparentRendering' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// <br> found – it works like a block boundary, so do not scan further.\n\t\t\telse if ( item.is( 'element', 'br' ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Found an inline object (for example an image).\n\t\t\telse if ( this._isInlineObjectElement( item ) ) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\t// ViewContainerElement is found on a way to next ViewText node, so given `node` was first/last\n\t\t\t// text node in its container element.\n\t\t\t// The ol, ul, and li elements are rendered as an attribute element so we should check list of known block elements.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/18960.\n\t\t\telse if ( item.is( 'containerElement' ) || this._isBlockViewElement( item ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns `true` if a DOM node belongs to {@link #blockElements}. `false` otherwise.\n\t */\n\tprivate _isBlockDomElement( node: DomNode ): boolean {\n\t\treturn this.isElement( node ) && this.blockElements.includes( node.tagName.toLowerCase() );\n\t}\n\n\t/**\n\t * Returns `true` if a view node belongs to {@link #blockElements}. `false` otherwise.\n\t */\n\tprivate _isBlockViewElement( node: ViewNode ): boolean {\n\t\treturn node.is( 'element' ) && this.blockElements.includes( node.name );\n\t}\n\n\t/**\n\t * Returns `true` if a DOM node belongs to {@link #inlineObjectElements}. `false` otherwise.\n\t */\n\tprivate _isInlineObjectElement( node: ViewNode | ViewTextProxy | ViewDocumentFragment ): node is ViewElement {\n\t\tif ( !node.is( 'element' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn node.name == 'br' ||\n\t\t\tthis.inlineObjectElements.includes( node.name ) ||\n\t\t\t!!this._inlineObjectElementMatcher.match( node );\n\t}\n\n\t/**\n\t * Creates view element basing on the node type.\n\t *\n\t * @param node DOM node to check.\n\t * @param options Conversion options. See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.\n\t */\n\tprivate _createViewElement( node: DomNode, options: { keepOriginalCase?: boolean } ): ViewElement {\n\t\tif ( isComment( node ) ) {\n\t\t\treturn new ViewUIElement( this.document, '$comment' );\n\t\t}\n\n\t\tconst viewName = options.keepOriginalCase ? ( node as DomElement ).tagName : ( node as DomElement ).tagName.toLowerCase();\n\n\t\treturn new ViewElement( this.document, viewName );\n\t}\n\n\t/**\n\t * Checks if view element's content should be treated as a raw data.\n\t *\n\t * @param viewElement View element to check.\n\t * @param options Conversion options. See {@link module:engine/view/domconverter~ViewDomConverter#domToView} options parameter.\n\t */\n\tprivate _isViewElementWithRawContent( viewElement: ViewElement | ViewDocumentFragment, options: { withChildren?: boolean } ): boolean {\n\t\treturn options.withChildren !== false && viewElement.is( 'element' ) && !!this._rawContentElementMatcher.match( viewElement );\n\t}\n\n\t/**\n\t * Checks whether a given element name should be renamed in a current rendering mode.\n\t *\n\t * @param elementName The name of view element.\n\t */\n\tprivate _shouldRenameElement( elementName: string ): boolean {\n\t\tconst name = elementName.toLowerCase();\n\n\t\treturn this.renderingMode === 'editing' && this.unsafeElements.includes( name );\n\t}\n\n\t/**\n\t * Return a <span> element with a special attribute holding the name of the original element.\n\t * Optionally, copy all the attributes of the original element if that element is provided.\n\t *\n\t * @param elementName The name of view element.\n\t * @param originalDomElement The original DOM element to copy attributes and content from.\n\t */\n\tprivate _createReplacementDomElement( elementName: string, originalDomElement?: DomElement ): DomElement {\n\t\tconst newDomElement = this._domDocument.createElement( 'span' );\n\n\t\t// Mark the span replacing a script as hidden.\n\t\tnewDomElement.setAttribute( UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE, elementName );\n\n\t\tif ( originalDomElement ) {\n\t\t\twhile ( originalDomElement.firstChild ) {\n\t\t\t\tnewDomElement.appendChild( originalDomElement.firstChild );\n\t\t\t}\n\n\t\t\tfor ( const attributeName of originalDomElement.getAttributeNames() ) {\n\t\t\t\tnewDomElement.setAttribute( attributeName, originalDomElement.getAttribute( attributeName )! );\n\t\t\t}\n\t\t}\n\n\t\treturn newDomElement;\n\t}\n}\n\n/**\n * Helper function.\n * Used to check if given native `Element` or `Text` node has parent with tag name from `types` array.\n *\n * @returns`true` if such parent exists or `false` if it does not.\n */\nfunction _hasViewParentOfType( node: ViewNode | ViewTextProxy, types: ReadonlyArray<string> ) {\n\treturn node.getAncestors().some( parent => parent.is( 'element' ) && types.includes( parent.name ) );\n}\n\n/**\n * A helper that executes given callback for each DOM node's ancestor, starting from the given node\n * and ending in document#documentElement.\n *\n * @param callback A callback to be executed for each ancestor.\n */\nfunction forEachDomElementAncestor( element: DomElement, callback: ( node: DomElement ) => void ) {\n\tlet node: DomElement | null = element;\n\n\twhile ( node ) {\n\t\tcallback( node );\n\t\tnode = node.parentElement;\n\t}\n}\n\n/**\n * Checks if given DOM node is a nbsp block filler.\n *\n * A &nbsp; is a block filler only if it is a single child of a block element.\n *\n * @param domNode DOM node.\n */\nfunction isNbspBlockFiller( domNode: DomNode, blockElements: ReadonlyArray<string> ): boolean {\n\tconst isNBSP = domNode.isEqualNode( NBSP_FILLER_REF );\n\n\treturn isNBSP && hasBlockParent( domNode, blockElements ) && ( domNode as DomElement ).parentNode!.childNodes.length === 1;\n}\n\n/**\n * Checks if domNode has block parent.\n *\n * @param domNode DOM node.\n */\nfunction hasBlockParent( domNode: DomNode, blockElements: ReadonlyArray<string> ): boolean {\n\tconst parent = domNode.parentNode;\n\n\treturn !!parent && !!( parent as DomElement ).tagName && blockElements.includes( ( parent as DomElement ).tagName.toLowerCase() );\n}\n\n/**\n * Checks if given view node is a nbsp block filler.\n *\n * A &nbsp; is a block filler only if it is a single child of a block element.\n */\nfunction isViewNbspFiller( parent: ViewNode | ViewDocumentFragment, data: string, blockElements: Array<string> ): boolean {\n\treturn (\n\t\tdata == '\\u00A0' &&\n\t\tparent &&\n\t\tparent.is( 'element' ) &&\n\t\tparent.childCount == 1 &&\n\t\tblockElements.includes( parent.name )\n\t);\n}\n\n/**\n * Checks if given view node is a marked-nbsp block filler.\n *\n * A &nbsp; is a block filler only if it is wrapped in `<span data-cke-filler=\"true\">` element.\n */\nfunction isViewMarkedNbspFiller( parent: ViewNode | ViewDocumentFragment, data: string ): boolean {\n\treturn (\n\t\tdata == '\\u00A0' &&\n\t\tparent &&\n\t\tparent.is( 'element', 'span' ) &&\n\t\tparent.childCount == 1 &&\n\t\tparent.hasAttribute( 'data-cke-filler' )\n\t);\n}\n\n/**\n * Checks if given view node is a br block filler.\n *\n * A <br> is a block filler only if it has data-cke-filler attribute set.\n */\nfunction isViewBrFiller( node: ViewNode ): boolean {\n\treturn (\n\t\tnode.is( 'element', 'br' ) &&\n\t\tnode.hasAttribute( 'data-cke-filler' )\n\t);\n}\n\n/**\n * Special case for `<p><br></p>` in which `<br>` should be treated as filler even when we are not in the 'br' mode.\n */\nfunction isOnlyBrInBlock( domNode: DomElement, blockElements: Array<string> ): boolean {\n\t// See https://github.com/ckeditor/ckeditor5/issues/5564.\n\treturn (\n\t\tdomNode.tagName === 'BR' &&\n\t\thasBlockParent( domNode, blockElements ) &&\n\t\tdomNode.parentNode!.childNodes.length === 1\n\t);\n}\n\n/**\n * Log to console the information about element that was replaced.\n * Check UNSAFE_ELEMENTS for all recognized unsafe elements.\n *\n * @param elementName The name of the view element.\n */\nfunction _logUnsafeElement( elementName: string ): void {\n\tif ( elementName === 'script' ) {\n\t\tlogWarning( 'domconverter-unsafe-script-element-detected' );\n\t}\n\n\tif ( elementName === 'style' ) {\n\t\tlogWarning( 'domconverter-unsafe-style-element-detected' );\n\t}\n}\n\n/**\n * In certain cases, Firefox mysteriously assigns so called \"restricted objects\" to native DOM Range properties.\n * Any attempt at accessing restricted object's properties causes errors.\n * See: https://github.com/ckeditor/ckeditor5/issues/9635.\n */\nfunction isGeckoRestrictedDomSelection( domSelection: DomSelection ): boolean {\n\tif ( !env.isGecko ) {\n\t\treturn false;\n\t}\n\n\tif ( !domSelection.rangeCount ) {\n\t\treturn false;\n\t}\n\n\tconst container = domSelection.getRangeAt( 0 ).startContainer;\n\n\ttry {\n\t\tObject.prototype.toString.call( container );\n\t} catch {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Enum representing the type of the block filler.\n *\n * Possible values:\n *\n * * `br` &ndash; For the `<br data-cke-filler=\"true\">` block filler used in the editing view.\n * * `nbsp` &ndash; For the `&nbsp;` block fillers used in the data.\n * * `markedNbsp` &ndash; For the `&nbsp;` block fillers wrapped in `<span>` elements: `<span data-cke-filler=\"true\">&nbsp;</span>`\n * used in the data.\n */\nexport type ViewBlockFillerMode = 'br' | 'nbsp' | 'markedNbsp';\n\n/**\n * While rendering the editor content, the {@link module:engine/view/domconverter~ViewDomConverter} detected a `<script>` element that may\n * disrupt the editing experience. To avoid this, the `<script>` element was replaced with `<span data-ck-unsafe-element=\"script\"></span>`.\n *\n * @error domconverter-unsafe-script-element-detected\n */\n\n/**\n * While rendering the editor content, the\n * {@link module:engine/view/domconverter~ViewDomConverter} detected a `<style>` element that may affect\n * the editing experience. To avoid this, the `<style>` element was replaced with `<span data-ck-unsafe-element=\"style\"></span>`.\n *\n * @error domconverter-unsafe-style-element-detected\n */\n\n/**\n * The {@link module:engine/view/domconverter~ViewDomConverter} detected an interactive attribute in the\n * {@glink framework/architecture/editing-engine#editing-pipeline editing pipeline}. For the best\n * editing experience, the attribute was renamed to `data-ck-unsafe-attribute-[original attribute name]`.\n *\n * If you are the author of the plugin that generated this attribute and you want it to be preserved\n * in the editing pipeline, you can configure this when creating the element\n * using {@link module:engine/view/downcastwriter~ViewDowncastWriter} during the\n * {@glink framework/architecture/editing-engine#conversion model–view conversion}. Methods such as\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createContainerElement},\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement}, or\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createEmptyElement}\n * accept an option that will disable filtering of specific attributes:\n *\n * ```ts\n * const paragraph = writer.createContainerElement( 'p',\n * \t{\n * \t\tclass: 'clickable-paragraph',\n * \t\tonclick: 'alert( \"Paragraph clicked!\" )'\n * \t},\n * \t{\n * \t\t// Make sure the \"onclick\" attribute will pass through.\n * \t\trenderUnsafeAttributes: [ 'onclick' ]\n * \t}\n * );\n * ```\n *\n * @error domconverter-unsafe-attribute-detected\n * @param {HTMLElement} domElement The DOM element the attribute was set on.\n * @param {string} key The original name of the attribute\n * @param {string} value The value of the original attribute\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/**\n * @module engine/view/observer/observer\n */\n\nimport { DomEmitterMixin, type DomEmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewDocument } from '../document.js';\nimport { type EditingView } from '../view.js';\n\nconst ObserverBase: DomEmitterMixinConstructor = /* #__PURE__ */ DomEmitterMixin();\n\n/**\n * Abstract base observer class. Observers are classes which listen to DOM events, do the preliminary\n * processing and fire events on the {@link module:engine/view/document~ViewDocument} objects.\n * Observers can also add features to the view, for instance by updating its status or marking elements\n * which need a refresh on DOM events.\n */\nexport abstract class Observer extends ObserverBase {\n\t/**\n\t * An instance of the view controller.\n\t */\n\tpublic readonly view: EditingView;\n\n\t/**\n\t * A reference to the {@link module:engine/view/document~ViewDocument} object.\n\t */\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * The state of the observer. If it is disabled, no events will be fired.\n\t */\n\tprivate _isEnabled: boolean = false;\n\n\t/**\n\t * Creates an instance of the observer.\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper();\n\n\t\tthis.view = view;\n\t\tthis.document = view.document;\n\t}\n\n\t/**\n\t * The state of the observer. If it is disabled, no events will be fired.\n\t */\n\tpublic get isEnabled(): boolean {\n\t\treturn this._isEnabled;\n\t}\n\n\t/**\n\t * Enables the observer. This method is called when the observer is registered to the\n\t * {@link module:engine/view/view~EditingView} and after {@link module:engine/view/view~EditingView#forceRender rendering}\n\t * (all observers are {@link #disable disabled} before rendering).\n\t *\n\t * A typical use case for disabling observers is that mutation observers need to be disabled for the rendering.\n\t * However, a child class may not need to be disabled, so it can implement an empty method.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#disable\n\t */\n\tpublic enable(): void {\n\t\tthis._isEnabled = true;\n\t}\n\n\t/**\n\t * Disables the observer. This method is called before\n\t * {@link module:engine/view/view~EditingView#forceRender rendering} to prevent firing events during rendering.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#enable\n\t */\n\tpublic disable(): void {\n\t\tthis._isEnabled = false;\n\t}\n\n\t/**\n\t * Disables and destroys the observer, among others removes event listeners created by the observer.\n\t */\n\tpublic destroy(): void {\n\t\tthis.disable();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Checks whether a given DOM event should be ignored (should not be turned into a synthetic view document event).\n\t *\n\t * Currently, an event will be ignored only if its target or any of its ancestors has the `data-cke-ignore-events` attribute.\n\t * This attribute can be used inside the structures generated by\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createUIElement `ViewDowncastWriter#createUIElement()`} to ignore events\n\t * fired within a UI that should be excluded from CKEditor 5's realms.\n\t *\n\t * @param domTarget The DOM event target to check (usually an element, sometimes a text node and\n\t * potentially sometimes a document, too).\n\t * @returns Whether this event should be ignored by the observer.\n\t */\n\tpublic checkShouldIgnoreEventFromTarget( domTarget: Node | null ): boolean {\n\t\tif ( domTarget && domTarget.nodeType === 3 ) {\n\t\t\tdomTarget = domTarget.parentNode as any;\n\t\t}\n\n\t\tif ( !domTarget || domTarget.nodeType !== 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ( domTarget as any ).matches( '[data-cke-ignore-events], [data-cke-ignore-events] *' );\n\t}\n\n\t/**\n\t * Starts observing given DOM element.\n\t *\n\t * @param domElement DOM element to observe.\n\t * @param name The name of the related root element.\n\t */\n\tpublic abstract observe( domElement: HTMLElement, name: string ): void;\n\n\t/**\n\t * Stops observing given DOM element.\n\t */\n\tpublic abstract stopObserving( domElement: HTMLElement ): void;\n}\n\n/**\n * The constructor of {@link ~Observer} subclass.\n */\nexport type ObserverConstructor = new ( view: EditingView ) => Observer;\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/**\n * @module engine/view/observer/domeventdata\n */\n\nimport { extend } from 'es-toolkit/compat';\n\nimport { type ViewDocument } from '../document.js';\nimport { type ViewElement } from '../element.js';\nimport { type EditingView } from '../view.js';\n\n/**\n * Information about a DOM event in context of the {@link module:engine/view/document~ViewDocument}.\n * It wraps the native event, which usually should not be used as the wrapper contains\n * additional data (like key code for keyboard events).\n *\n * @typeParam TEvent The type of DOM Event that this class represents.\n */\nexport class ViewDocumentDomEventData<TEvent extends Event = Event> {\n\t/**\n\t * Instance of the view controller.\n\t */\n\tpublic readonly view: EditingView;\n\n\t/**\n\t * The instance of the document.\n\t */\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * The DOM event.\n\t */\n\tpublic readonly domEvent: TEvent;\n\n\t/**\n\t * The DOM target.\n\t */\n\tpublic readonly domTarget: HTMLElement;\n\n\t/**\n\t * @param view The instance of the view controller.\n\t * @param domEvent The DOM event.\n\t * @param additionalData Additional properties that the instance should contain.\n\t */\n\tconstructor( view: EditingView, domEvent: TEvent, additionalData?: object ) {\n\t\tthis.view = view;\n\t\tthis.document = view.document;\n\t\tthis.domEvent = domEvent;\n\t\tthis.domTarget = domEvent.target as any;\n\n\t\textend( this, additionalData );\n\t}\n\n\t/**\n\t * The tree view element representing the target.\n\t */\n\tpublic get target(): ViewElement {\n\t\treturn this.view.domConverter.mapDomToView( this.domTarget ) as ViewElement;\n\t}\n\n\t/**\n\t * Prevents the native's event default action.\n\t */\n\tpublic preventDefault(): void {\n\t\tthis.domEvent.preventDefault();\n\t}\n\n\t/**\n\t * Stops native event propagation.\n\t */\n\tpublic stopPropagation(): void {\n\t\tthis.domEvent.stopPropagation();\n\t}\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/**\n * @module engine/view/observer/domeventobserver\n */\n\nimport { Observer } from './observer.js';\nimport { ViewDocumentDomEventData } from './domeventdata.js';\n\nimport type { EventInfo } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Base class for DOM event observers. This class handles\n * {@link module:engine/view/observer/observer~Observer#observe adding} listeners to DOM elements,\n * {@link module:engine/view/observer/observer~Observer#disable disabling} and\n * {@link module:engine/view/observer/observer~Observer#enable re-enabling} events.\n * Child class needs to define\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#domEventType DOM event type} and\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#onDomEvent callback}.\n *\n * For instance:\n *\n * ```ts\n * class ClickObserver extends DomEventObserver<'click'> {\n * \t// It can also be defined as a normal property in the constructor.\n * \tget domEventType(): 'click' {\n * \t\treturn 'click';\n * \t}\n *\n * \tonDomEvent( domEvent: MouseEvent ): void {\n * \t\tthis.fire( 'click', domEvent );\n * \t}\n * }\n * ```\n *\n * @typeParam EventType DOM Event type name or an union of those.\n * @typeParam AdditionalData Additional data passed along with the event.\n */\n\nexport abstract class DomEventObserver<\n\tEventType extends keyof HTMLElementEventMap,\n\tAdditionalData extends object = object\n> extends Observer {\n\t/**\n\t * Type of the DOM event the observer should listen to. Array of types can be defined\n\t * if the observer should listen to multiple DOM events.\n\t */\n\tpublic abstract get domEventType(): EventType | ReadonlyArray<EventType>;\n\n\t/**\n\t * If set to `true` DOM events will be listened on the capturing phase.\n\t * Default value is `false`.\n\t */\n\tpublic useCapture: boolean = false;\n\n\t/**\n\t * If set to `true`, indicates that the function specified by listener will never call `preventDefault()`.\n\t * Default value is `false`.\n\t */\n\tpublic usePassive: boolean = false;\n\n\t/**\n\t * Callback which should be called when the DOM event occurred. Note that the callback will not be called if\n\t * observer {@link #isEnabled is not enabled}.\n\t *\n\t * @see #domEventType\n\t */\n\tpublic abstract onDomEvent( event: HTMLElementEventMap[ EventType ] ): void;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override observe( domElement: HTMLElement ): void {\n\t\tconst types = typeof this.domEventType == 'string' ? [ this.domEventType ] : this.domEventType;\n\n\t\ttypes.forEach( type => {\n\t\t\tthis.listenTo( domElement, type, ( eventInfo, domEvent ) => {\n\t\t\t\tif ( this.isEnabled && !this.checkShouldIgnoreEventFromTarget( domEvent.target as any ) ) {\n\t\t\t\t\tthis.onDomEvent( domEvent );\n\t\t\t\t}\n\t\t\t}, { useCapture: this.useCapture, usePassive: this.usePassive } );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override stopObserving( domElement: HTMLElement ): void {\n\t\tthis.stopListening( domElement );\n\t}\n\n\t/**\n\t * Calls `Document#fire()` if observer {@link #isEnabled is enabled}.\n\t *\n\t * @see module:utils/emittermixin~Emitter#fire\n\t * @param eventType The event type (name).\n\t * @param domEvent The DOM event.\n\t * @param additionalData The additional data which should extend the\n\t * {@link module:engine/view/observer/domeventdata~ViewDocumentDomEventData event data} object.\n\t */\n\tpublic override fire( eventType: string | EventInfo, domEvent: Event, additionalData?: AdditionalData ): void {\n\t\tif ( this.isEnabled ) {\n\t\t\tthis.document.fire( eventType, new ViewDocumentDomEventData( this.view, domEvent, additionalData ) );\n\t\t}\n\t}\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/**\n * @module engine/view/observer/keyobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\nimport type { BubblingEvent } from './bubblingemittermixin.js';\nimport { getCode, type KeystrokeInfo } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Observer for events connected with pressing keyboard keys.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n */\nexport class KeyObserver extends DomEventObserver<'keydown' | 'keyup', KeystrokeInfo & { keystroke: number }> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = [ 'keydown', 'keyup' ] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvt: KeyboardEvent ): void {\n\t\tconst data = {\n\t\t\tkeyCode: domEvt.keyCode,\n\n\t\t\taltKey: domEvt.altKey,\n\t\t\tctrlKey: domEvt.ctrlKey,\n\t\t\tshiftKey: domEvt.shiftKey,\n\t\t\tmetaKey: domEvt.metaKey,\n\n\t\t\tget keystroke() {\n\t\t\t\treturn getCode( this );\n\t\t\t}\n\t\t};\n\n\t\tthis.fire( domEvt.type, domEvt, data );\n\t}\n}\n\n/**\n * Fired when a key has been pressed.\n *\n * Introduced by {@link module:engine/view/observer/keyobserver~KeyObserver}.\n *\n * Note that because {@link module:engine/view/observer/keyobserver~KeyObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/keyobserver~KeyObserver\n * @eventName module:engine/view/document~ViewDocument#keydown\n */\nexport type ViewDocumentKeyDownEvent = BubblingEvent<{\n\tname: 'keydown';\n\targs: [ data: ViewDocumentKeyEventData ];\n}>;\n\n/**\n * Fired when a key has been released.\n *\n * Introduced by {@link module:engine/view/observer/keyobserver~KeyObserver}.\n *\n * Note that because {@link module:engine/view/observer/keyobserver~KeyObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/keyobserver~KeyObserver\n * @eventName module:engine/view/document~ViewDocument#keyup\n */\nexport type ViewDocumentKeyUpEvent = BubblingEvent<{\n\tname: 'keyup';\n\targs: [ data: ViewDocumentKeyEventData ];\n}>;\n\n/**\n * The value of both events - {@link ~ViewDocumentKeyDownEvent} and {@link ~ViewDocumentKeyUpEvent}.\n */\nexport interface ViewDocumentKeyEventData extends ViewDocumentDomEventData<KeyboardEvent>, KeystrokeInfo {\n\n\t/**\n\t * Code of the whole keystroke. See {@link module:utils/keyboard~getCode}.\n\t */\n\tkeystroke: number;\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/**\n * @module engine/view/observer/fakeselectionobserver\n */\n\nimport { Observer } from './observer.js';\nimport type { ViewDocumentArrowKeyEvent } from './arrowkeysobserver.js';\nimport { ViewSelection } from '../selection.js';\nimport { type EditingView } from '../view.js';\nimport type {\n\tViewDocumentObserverSelectionChangeEvent,\n\tViewDocumentObserverSelectionChangeDoneEvent,\n\tViewDocumentObserverSelectionEventData\n} from './selectionobserver.js';\nimport { keyCodes } from '@ckeditor/ckeditor5-utils';\nimport { debounce } from 'es-toolkit/compat';\n\n/**\n * Fake selection observer class. If view selection is fake it is placed in dummy DOM container. This observer listens\n * on {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and handles moving\n * fake view selection to the correct place if arrow keys are pressed.\n * Fires {@link module:engine/view/document~ViewDocument#event:selectionChange selectionChange event} simulating natural behaviour of\n * {@link module:engine/view/observer/selectionobserver~SelectionObserver SelectionObserver}.\n */\nexport class FakeSelectionObserver extends Observer {\n\t/**\n\t * Fires debounced event `selectionChangeDone`. It uses `es-toolkit#debounce` method to delay function call.\n\t */\n\tprivate readonly _fireSelectionChangeDoneDebounced: ReturnType<\n\t\ttypeof debounce<( data: ViewDocumentObserverSelectionEventData ) => void>\n\t>;\n\n\t/**\n\t * Creates new FakeSelectionObserver instance.\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tthis._fireSelectionChangeDoneDebounced = debounce( data => {\n\t\t\tthis.document.fire<ViewDocumentObserverSelectionChangeDoneEvent>( 'selectionChangeDone', data );\n\t\t}, 200 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override observe(): void {\n\t\tconst document = this.document;\n\n\t\tdocument.on<ViewDocumentArrowKeyEvent>( 'arrowKey', ( eventInfo, data ) => {\n\t\t\tconst selection = document.selection;\n\n\t\t\tif ( selection.isFake && this.isEnabled ) {\n\t\t\t\t// Prevents default key down handling - no selection change will occur.\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\t\t}, { context: '$capture' } );\n\n\t\tdocument.on<ViewDocumentArrowKeyEvent>( 'arrowKey', ( eventInfo, data ) => {\n\t\t\tconst selection = document.selection;\n\n\t\t\tif ( selection.isFake && this.isEnabled ) {\n\t\t\t\tthis._handleSelectionMove( data.keyCode );\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override stopObserving(): void {}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t}\n\n\t/**\n\t * Handles collapsing view selection according to given key code. If left or up key is provided - new selection will be\n\t * collapsed to left. If right or down key is pressed - new selection will be collapsed to right.\n\t *\n\t * This method fires {@link module:engine/view/document~ViewDocument#event:selectionChange} and\n\t * {@link module:engine/view/document~ViewDocument#event:selectionChangeDone} events imitating behaviour of\n\t * {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n\t */\n\tprivate _handleSelectionMove( keyCode: number ): void {\n\t\tconst selection = this.document.selection;\n\t\tconst newSelection = new ViewSelection( selection.getRanges(), { backward: selection.isBackward, fake: false } );\n\n\t\t// Left or up arrow pressed - move selection to start.\n\t\tif ( keyCode == keyCodes.arrowleft || keyCode == keyCodes.arrowup ) {\n\t\t\tnewSelection.setTo( newSelection.getFirstPosition() );\n\t\t}\n\n\t\t// Right or down arrow pressed - move selection to end.\n\t\tif ( keyCode == keyCodes.arrowright || keyCode == keyCodes.arrowdown ) {\n\t\t\tnewSelection.setTo( newSelection.getLastPosition() );\n\t\t}\n\n\t\tconst data = {\n\t\t\toldSelection: selection,\n\t\t\tnewSelection,\n\t\t\tdomSelection: null\n\t\t};\n\n\t\t// Fire dummy selection change event.\n\t\tthis.document.fire<ViewDocumentObserverSelectionChangeEvent>( 'selectionChange', data );\n\n\t\t// Call` #_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n\t\t// This function is debounced what means that `selectionChangeDone` event will be fired only when\n\t\t// defined int the function time will elapse since the last time the function was called.\n\t\t// So `selectionChangeDone` will be fired when selection will stop changing.\n\t\tthis._fireSelectionChangeDoneDebounced( data );\n\t}\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/**\n * @module engine/view/observer/mutationobserver\n */\n\nimport { Observer } from './observer.js';\nimport { startsWithFiller } from '../filler.js';\nimport { isEqualWith } from 'es-toolkit/compat';\n\nimport { type ViewDomConverter } from '../domconverter.js';\nimport { type EditingView } from '../view.js';\nimport { type ViewElement } from '../element.js';\nimport { type ViewNode } from '../node.js';\nimport { type ViewText } from '../text.js';\nimport type { ViewDocumentChangeType } from '../document.js';\n\n// @if CK_DEBUG_TYPING // import { _debouncedLine, _buildLogMessage } from '../../dev-utils/utils.js';\n\n/**\n * Mutation observer's role is to watch for any DOM changes inside the editor that weren't\n * done by the editor's {@link module:engine/view/renderer~ViewRenderer} itself and reverting these changes.\n *\n * It does this by observing all mutations in the DOM, marking related view elements as changed and calling\n * {@link module:engine/view/renderer~ViewRenderer#render}. Because all mutated nodes are marked as\n * \"to be rendered\" and the {@link module:engine/view/renderer~ViewRenderer#render `render()`} method is called,\n * all changes are reverted in the DOM (the DOM is synced with the editor's view structure).\n *\n * Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n */\nexport class MutationObserver extends Observer {\n\t/**\n\t * Reference to the {@link module:engine/view/view~EditingView#domConverter}.\n\t */\n\tpublic readonly domConverter: ViewDomConverter;\n\n\t/**\n\t * Native mutation observer config.\n\t */\n\tprivate readonly _config: MutationObserverInit;\n\n\t/**\n\t * Observed DOM elements.\n\t */\n\tprivate readonly _domElements: Set<HTMLElement>;\n\n\t/**\n\t * Native mutation observer.\n\t */\n\tprivate _mutationObserver: InstanceType<typeof window.MutationObserver>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tthis._config = {\n\t\t\tchildList: true,\n\t\t\tcharacterData: true,\n\t\t\tsubtree: true\n\t\t};\n\n\t\tthis.domConverter = view.domConverter;\n\n\t\tthis._domElements = new Set();\n\t\tthis._mutationObserver = new window.MutationObserver( this._onMutations.bind( this ) );\n\t}\n\n\t/**\n\t * Synchronously handles mutations and empties the queue.\n\t */\n\tpublic flush(): void {\n\t\tthis._onMutations( this._mutationObserver.takeRecords() );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic observe( domElement: HTMLElement ): void {\n\t\tthis._domElements.add( domElement );\n\n\t\tif ( this.isEnabled ) {\n\t\t\tthis._mutationObserver.observe( domElement, this._config );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override stopObserving( domElement: HTMLElement ): void {\n\t\tthis._domElements.delete( domElement );\n\n\t\tif ( this.isEnabled ) {\n\t\t\t// Unfortunately, it is not possible to stop observing particular DOM element.\n\t\t\t// In order to stop observing one of multiple DOM elements, we need to re-connect the mutation observer.\n\t\t\tthis._mutationObserver.disconnect();\n\n\t\t\tfor ( const domElement of this._domElements ) {\n\t\t\t\tthis._mutationObserver.observe( domElement, this._config );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override enable(): void {\n\t\tsuper.enable();\n\n\t\tfor ( const domElement of this._domElements ) {\n\t\t\tthis._mutationObserver.observe( domElement, this._config );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override disable(): void {\n\t\tsuper.disable();\n\n\t\tthis._mutationObserver.disconnect();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis._mutationObserver.disconnect();\n\t}\n\n\t/**\n\t * Handles mutations. Mark view elements to sync and call render.\n\t *\n\t * @param domMutations Array of native mutations.\n\t */\n\tprivate _onMutations( domMutations: Array<MutationRecord> ) {\n\t\t// As a result of this.flush() we can have an empty collection.\n\t\tif ( domMutations.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domConverter = this.domConverter;\n\n\t\t// Use map and set for deduplication.\n\t\tconst mutatedTextNodes = new Set<ViewText>();\n\t\tconst elementsWithMutatedChildren = new Set<ViewElement>();\n\n\t\t// Handle `childList` mutations first, so we will be able to check if the `characterData` mutation is in the\n\t\t// element with changed structure anyway.\n\t\tfor ( const mutation of domMutations ) {\n\t\t\tconst element = domConverter.mapDomToView( mutation.target as HTMLElement );\n\n\t\t\tif ( !element ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Do not collect mutations from UIElements and RawElements.\n\t\t\tif ( element.is( 'uiElement' ) || element.is( 'rawElement' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( mutation.type === 'childList' && !this._isBogusBrMutation( mutation ) ) {\n\t\t\t\telementsWithMutatedChildren.add( element as ViewElement );\n\t\t\t}\n\t\t}\n\n\t\t// Handle `characterData` mutations later, when we have the full list of nodes which changed structure.\n\t\tfor ( const mutation of domMutations ) {\n\t\t\tconst element = domConverter.mapDomToView( mutation.target as HTMLElement );\n\n\t\t\t// Do not collect mutations from UIElements and RawElements.\n\t\t\tif ( element && ( element.is( 'uiElement' ) || element.is( 'rawElement' ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( mutation.type === 'characterData' ) {\n\t\t\t\tconst text = domConverter.findCorrespondingViewText( mutation.target as Text ) as ViewText;\n\n\t\t\t\tif ( text && !elementsWithMutatedChildren.has( text.parent as ViewElement ) ) {\n\t\t\t\t\tmutatedTextNodes.add( text );\n\t\t\t\t}\n\t\t\t\t// When we added first letter to the text node which had only inline filler, for the DOM it is mutation\n\t\t\t\t// on text, but for the view, where filler text node did not exist, new text node was created, so we\n\t\t\t\t// need to handle it as a 'children' mutation instead of 'text'.\n\t\t\t\telse if ( !text && startsWithFiller( mutation.target ) ) {\n\t\t\t\t\telementsWithMutatedChildren.add(\n\t\t\t\t\t\tdomConverter.mapDomToView( mutation.target.parentNode as HTMLElement ) as ViewElement\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now we build the list of mutations to mark elements. We did not do it earlier to avoid marking the\n\t\t// same node multiple times in case of duplication.\n\n\t\tconst mutations: Array<ObserverMutationData> = [];\n\n\t\tfor ( const textNode of mutatedTextNodes ) {\n\t\t\tmutations.push( { type: 'text', node: textNode } );\n\t\t}\n\n\t\tfor ( const viewElement of elementsWithMutatedChildren ) {\n\t\t\tconst domElement = domConverter.mapViewToDom( viewElement )!;\n\t\t\tconst viewChildren = Array.from( viewElement.getChildren() );\n\t\t\tconst newViewChildren = Array.from( domConverter.domChildrenToView( domElement, { withChildren: false } ) );\n\n\t\t\t// It may happen that as a result of many changes (sth was inserted and then removed),\n\t\t\t// both elements haven't really changed. #1031\n\t\t\tif ( !isEqualWith( viewChildren, newViewChildren, sameNodes ) ) {\n\t\t\t\tmutations.push( { type: 'children', node: viewElement } );\n\t\t\t}\n\t\t}\n\n\t\t// In case only non-relevant mutations were recorded it skips the event and force render.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/5600.\n\t\tif ( mutations.length ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \t_debouncedLine();\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'MutationObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cMutations detected',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis.document.fire<ViewDocumentMutationsEvent>( 'mutations', { mutations } );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}\n\t}\n\n\t/**\n\t * Checks if mutation was generated by the browser inserting bogus br on the end of the block element.\n\t * Such mutations are generated while pressing space or performing native spellchecker correction\n\t * on the end of the block element in Firefox browser.\n\t *\n\t * @param mutation Native mutation object.\n\t */\n\tprivate _isBogusBrMutation( mutation: MutationRecord ) {\n\t\tlet addedNode = null;\n\n\t\t// Check if mutation added only one node on the end of its parent.\n\t\tif ( mutation.nextSibling === null && mutation.removedNodes.length === 0 && mutation.addedNodes.length == 1 ) {\n\t\t\taddedNode = this.domConverter.domToView( mutation.addedNodes[ 0 ], {\n\t\t\t\twithChildren: false\n\t\t\t} );\n\t\t}\n\n\t\treturn addedNode && addedNode.is( 'element', 'br' );\n\t}\n}\n\nfunction sameNodes( child1: ViewNode, child2: ViewNode ) {\n\t// First level of comparison (array of children vs array of children) – use the es-toolkit's default behavior.\n\tif ( Array.isArray( child1 ) ) {\n\t\treturn;\n\t}\n\n\t// Elements.\n\tif ( child1 === child2 ) {\n\t\treturn true;\n\t}\n\t// Texts.\n\telse if ( child1.is( '$text' ) && child2.is( '$text' ) ) {\n\t\treturn child1.data === child2.data;\n\t}\n\n\t// Not matching types.\n\treturn false;\n}\n\n/**\n * Event fired on DOM mutations detected.\n *\n * This event is introduced by {@link module:engine/view/observer/mutationobserver~MutationObserver} and available\n * by default in all editor instances (attached by {@link module:engine/view/view~EditingView}).\n *\n * @eventName module:engine/view/document~ViewDocument#mutations\n * @param data Event data containing detailed information about the event.\n */\nexport type ViewDocumentMutationsEvent = {\n\tname: 'mutations';\n\targs: [ data: ViewDocumentMutationEventData ];\n};\n\n/**\n * The value of {@link ~ViewDocumentMutationsEvent}.\n */\nexport type ViewDocumentMutationEventData = {\n\tmutations: Array<ObserverMutationData>;\n};\n\n/**\n * A single entry in {@link ~ViewDocumentMutationEventData} mutations array.\n */\nexport type ObserverMutationData = {\n\n\t/**\n\t * Type of mutation detected.\n\t */\n\ttype: ViewDocumentChangeType;\n\n\t/**\n\t * The view node related to the detected mutation.\n\t */\n\tnode: ViewNode;\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/**\n * @module engine/view/observer/focusobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\nimport { type EditingView } from '../view.js';\nimport type { ViewDocumentInputEvent } from './inputobserver.js';\n\n// @if CK_DEBUG_TYPING // import { _debouncedLine, _buildLogMessage } from '../../dev-utils/utils.js';\n\n/**\n * {@link module:engine/view/document~ViewDocument#event:focus Focus}\n * and {@link module:engine/view/document~ViewDocument#event:blur blur} events observer.\n * Focus observer handle also {@link module:engine/view/rooteditableelement~ViewRootEditableElement#isFocused isFocused} property of the\n * {@link module:engine/view/rooteditableelement~ViewRootEditableElement root elements}.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n */\nexport class FocusObserver extends DomEventObserver<'focus' | 'blur'> {\n\t/**\n\t * Identifier of the timeout currently used by focus listener to delay rendering execution.\n\t */\n\tprivate _renderTimeoutId: ReturnType<typeof setTimeout> | null = null;\n\n\t/**\n\t * Set to `true` if the document is in the process of setting the focus.\n\t *\n\t * The flag is used to indicate that setting the focus is in progress.\n\t */\n\tprivate _isFocusChanging: boolean = false;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = [ 'focus', 'blur' ] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tthis.useCapture = true;\n\t\tconst document = this.document;\n\n\t\tdocument.on<ViewDocumentFocusEvent>( 'focus', () => this._handleFocus() );\n\t\tdocument.on<ViewDocumentBlurEvent>( 'blur', ( evt, data ) => this._handleBlur( data ) );\n\n\t\t// Focus the editor in cases where browser dispatches `beforeinput` event to a not-focused editable element.\n\t\t// This is flushed by the beforeinput listener in the `InsertTextObserver`.\n\t\t// Note that focus is set only if the document is not focused yet.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/14702.\n\t\tdocument.on<ViewDocumentInputEvent>( 'beforeinput', () => {\n\t\t\tif ( !document.isFocused ) {\n\t\t\t\tthis._handleFocus();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Finishes setting the document focus state.\n\t */\n\tpublic flush(): void {\n\t\tif ( this._isFocusChanging ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \t_debouncedLine();\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'FocusObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'flush focus'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis._isFocusChanging = false;\n\t\t\tthis.document.isFocused = true;\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: FocusEvent ): void {\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \t_debouncedLine();\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'FocusObserver',\n\t\t// @if CK_DEBUG_TYPING // \t\t`${ domEvent.type } event`\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'FocusObserver',\n\t\t// @if CK_DEBUG_TYPING // \t\t'DOM target:',\n\t\t// @if CK_DEBUG_TYPING // \t\t{ target: domEvent.target, relatedTarget: domEvent.relatedTarget }\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // \tconst domSelection = window.getSelection();\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'FocusObserver',\n\t\t// @if CK_DEBUG_TYPING // \t\t'DOM Selection:',\n\t\t// @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.anchorNode, offset: domSelection!.anchorOffset },\n\t\t// @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.focusNode, offset: domSelection!.focusOffset }\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tthis.fire( domEvent.type, domEvent );\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._clearTimeout();\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * The `focus` event handler.\n\t */\n\tprivate _handleFocus(): void {\n\t\tthis._clearTimeout();\n\t\tthis._isFocusChanging = true;\n\n\t\t// Unfortunately native `selectionchange` event is fired asynchronously.\n\t\t// We need to wait until `SelectionObserver` handle the event and then render. Otherwise rendering will\n\t\t// overwrite new DOM selection with selection from the view.\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/795 for more details.\n\t\t// Long timeout is needed to solve #676 and https://github.com/ckeditor/ckeditor5-engine/issues/1157 issues.\n\t\t//\n\t\t// Using `view.change()` instead of `view.forceRender()` to prevent double rendering\n\t\t// in a situation where `selectionchange` already caused selection change.\n\t\tthis._renderTimeoutId = setTimeout( () => {\n\t\t\tthis._renderTimeoutId = null;\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'FocusObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'flush on timeout'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis.flush();\n\t\t\tthis.view.change( () => {} );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}, 50 );\n\t}\n\n\t/**\n\t * The `blur` event handler.\n\t */\n\tprivate _handleBlur( data: ViewDocumentDomEventData<FocusEvent> ): void {\n\t\tconst selectedEditable = this.document.selection.editableElement;\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'FocusObserver',\n\t\t// @if CK_DEBUG_TYPING // \t\t'selectedEditable:',\n\t\t// @if CK_DEBUG_TYPING // \t\t{ selectedEditable }\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tif ( selectedEditable === null || selectedEditable === data.target ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'FocusObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'document no longer focused'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis.document.isFocused = false;\n\t\t\tthis._isFocusChanging = false;\n\n\t\t\t// Re-render the document to update view elements\n\t\t\t// (changing document.isFocused already marked view as changed since last rendering).\n\t\t\tthis.view.change( () => {} );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}\n\t}\n\n\t/**\n\t * Clears timeout.\n\t */\n\tprivate _clearTimeout(): void {\n\t\tif ( this._renderTimeoutId ) {\n\t\t\tclearTimeout( this._renderTimeoutId );\n\t\t\tthis._renderTimeoutId = null;\n\t\t}\n\t}\n}\n\n/**\n * Fired when one of the editables gets focus.\n *\n * Introduced by {@link module:engine/view/observer/focusobserver~FocusObserver}.\n *\n * Note that because {@link module:engine/view/observer/focusobserver~FocusObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/focusobserver~FocusObserver\n * @eventName module:engine/view/document~ViewDocument#focus\n * @param data Event data.\n */\nexport type ViewDocumentFocusEvent = {\n\tname: 'focus';\n\targs: [ data: ViewDocumentDomEventData<FocusEvent> ];\n};\n\n/**\n * Fired when one of the editables loses focus.\n *\n * Introduced by {@link module:engine/view/observer/focusobserver~FocusObserver}.\n *\n * Note that because {@link module:engine/view/observer/focusobserver~FocusObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/focusobserver~FocusObserver\n * @eventName module:engine/view/document~ViewDocument#blur\n * @param data Event data.\n */\nexport type ViewDocumentBlurEvent = {\n\tname: 'blur';\n\targs: [ data: ViewDocumentDomEventData<FocusEvent> ];\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/**\n * @module engine/view/observer/selectionobserver\n */\n\nimport { Observer } from './observer.js';\nimport { MutationObserver } from './mutationobserver.js';\nimport { FocusObserver } from './focusobserver.js';\nimport { env, type ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\nimport { debounce } from 'es-toolkit/compat';\n\nimport type { EditingView } from '../view.js';\nimport type { ViewDocumentSelection } from '../documentselection.js';\nimport type { ViewDomConverter } from '../domconverter.js';\nimport type { ViewSelection } from '../selection.js';\nimport type { ViewDocumentCompositionStartEvent } from './compositionobserver.js';\n\n// @if CK_DEBUG_TYPING // import { _debouncedLine, _buildLogMessage } from '../../dev-utils/utils.js';\n\ntype DomSelection = globalThis.Selection;\n\n/**\n * Selection observer class observes selection changes in the document. If a selection changes on the document this\n * observer checks if the DOM selection is different from the {@link module:engine/view/document~ViewDocument#selection view selection}.\n * The selection observer fires {@link module:engine/view/document~ViewDocument#event:selectionChange} event only if\n * a selection change was the only change in the document and the DOM selection is different from the view selection.\n *\n * This observer also manages the {@link module:engine/view/document~ViewDocument#isSelecting} property of the view document.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n */\nexport class SelectionObserver extends Observer {\n\t/**\n\t * Instance of the mutation observer. Selection observer calls\n\t * {@link module:engine/view/observer/mutationobserver~MutationObserver#flush} to ensure that the mutations will be handled\n\t * before the {@link module:engine/view/document~ViewDocument#event:selectionChange} event is fired.\n\t */\n\tpublic readonly mutationObserver: MutationObserver;\n\n\t/**\n\t * Instance of the focus observer. Focus observer calls\n\t * {@link module:engine/view/observer/focusobserver~FocusObserver#flush} to mark the latest focus change as complete.\n\t */\n\tpublic readonly focusObserver: FocusObserver;\n\n\t/**\n\t * Reference to the view {@link module:engine/view/documentselection~ViewDocumentSelection} object used to compare\n\t * new selection with it.\n\t */\n\tpublic readonly selection: ViewDocumentSelection;\n\n\t/**\n\t * Reference to the {@link module:engine/view/view~EditingView#domConverter}.\n\t */\n\tpublic readonly domConverter: ViewDomConverter;\n\n\t/**\n\t * A set of documents which have added `selectionchange` listener to avoid adding a listener twice to the same\n\t * document.\n\t */\n\tprivate readonly _documents = new WeakSet<Document>();\n\n\t/**\n\t * Fires debounced event `selectionChangeDone`. It uses `es-toolkit#debounce` method to delay function call.\n\t */\n\tprivate readonly _fireSelectionChangeDoneDebounced: ReturnType<\n\t\ttypeof debounce<( data: ViewDocumentObserverSelectionEventData ) => void>\n\t>;\n\n\t/**\n\t * When called, starts clearing the {@link #_loopbackCounter} counter in time intervals. When the number of selection\n\t * changes exceeds a certain limit within the interval of time, the observer will not fire `selectionChange` but warn about\n\t * possible infinite selection loop.\n\t */\n\tprivate readonly _clearInfiniteLoopInterval: ReturnType<typeof setInterval>;\n\n\t/**\n\t * Unlocks the `isSelecting` state of the view document in case the selection observer did not record this fact\n\t * correctly (for whatever reason). It is a safeguard (paranoid check), that returns document to the normal state\n\t * after a certain period of time (debounced, postponed by each selectionchange event).\n\t */\n\tprivate readonly _documentIsSelectingInactivityTimeoutDebounced: ReturnType<typeof debounce<() => boolean>>;\n\n\t/**\n\t * Private property to check if the code does not enter infinite loop.\n\t */\n\tprivate _loopbackCounter = 0;\n\n\t/**\n\t * A set of DOM documents that have a pending selection change.\n\t * Pending selection change is recorded while selection change event is detected on non focused editable.\n\t */\n\tprivate _pendingSelectionChange = new Set<Document>();\n\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tthis.mutationObserver = view.getObserver( MutationObserver );\n\t\tthis.focusObserver = view.getObserver( FocusObserver );\n\t\tthis.selection = this.document.selection;\n\t\tthis.domConverter = view.domConverter;\n\n\t\tthis._fireSelectionChangeDoneDebounced = debounce( data => {\n\t\t\tthis.document.fire<ViewDocumentObserverSelectionChangeDoneEvent>( 'selectionChangeDone', data );\n\t\t}, 200 );\n\n\t\tthis._clearInfiniteLoopInterval = setInterval( () => this._clearInfiniteLoop(), 1000 );\n\n\t\tthis._documentIsSelectingInactivityTimeoutDebounced = debounce( () => ( this.document.isSelecting = false ), 5000 );\n\n\t\tthis.view.document.on<ObservableChangeEvent<boolean>>( 'change:isFocused', ( evt, name, isFocused ) => {\n\t\t\tif ( isFocused && this._pendingSelectionChange.size ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'Flush pending selection change'\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\t// Iterate over a copy of set because it is modified in selection change handler.\n\t\t\t\tfor ( const domDocument of Array.from( this._pendingSelectionChange ) ) {\n\t\t\t\t\tthis._handleSelectionChange( domDocument );\n\t\t\t\t}\n\n\t\t\t\tthis._pendingSelectionChange.clear();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override observe( domElement: HTMLElement ): void {\n\t\tconst domDocument = domElement.ownerDocument;\n\n\t\tconst startDocumentIsSelecting = () => {\n\t\t\tthis.document.isSelecting = true;\n\n\t\t\t// Let's activate the safety timeout each time the document enters the \"is selecting\" state.\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced();\n\t\t};\n\n\t\tconst endDocumentIsSelecting = () => {\n\t\t\tif ( !this.document.isSelecting ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure that model selection is up-to-date at the end of selecting process.\n\t\t\t// Sometimes `selectionchange` events could arrive after the `mouseup` event and that selection could be already outdated.\n\t\t\tthis._handleSelectionChange( domDocument );\n\n\t\t\tthis.document.isSelecting = false;\n\n\t\t\t// The safety timeout can be canceled when the document leaves the \"is selecting\" state.\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced.cancel();\n\t\t};\n\n\t\t// The document has the \"is selecting\" state while the user keeps making (extending) the selection\n\t\t// (e.g. by holding the mouse button and moving the cursor). The state resets when they either released\n\t\t// the mouse button or interrupted the process by pressing or releasing any key.\n\t\tthis.listenTo( domElement, 'selectstart', startDocumentIsSelecting, { priority: 'highest' } );\n\n\t\tthis.listenTo( domElement, 'keydown', endDocumentIsSelecting, { priority: 'highest', useCapture: true } );\n\t\tthis.listenTo( domElement, 'keyup', endDocumentIsSelecting, { priority: 'highest', useCapture: true } );\n\n\t\t// Add document-wide listeners only once. This method could be called for multiple editing roots.\n\t\tif ( this._documents.has( domDocument ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// This listener is using capture mode to make sure that selection is upcasted before any other\n\t\t// handler would like to check it and update (for example table multi cell selection).\n\t\tthis.listenTo( domDocument, 'mouseup', endDocumentIsSelecting, { priority: 'highest', useCapture: true } );\n\n\t\tthis.listenTo( domDocument, 'selectionchange', () => {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \t_debouncedLine();\n\t\t\t// @if CK_DEBUG_TYPING // \tconst domSelection = domDocument.defaultView!.getSelection();\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'selectionchange'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'DOM Selection:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.anchorNode, offset: domSelection!.anchorOffset },\n\t\t\t// @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.focusNode, offset: domSelection!.focusOffset }\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t// The Renderer is disabled while composing on non-android browsers, so we can't update the view selection\n\t\t\t// because the DOM and view tree drifted apart. Position mapping could fail because of it.\n\t\t\tif ( this.document.isComposing && !env.isAndroid ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t\t// @if CK_DEBUG_TYPING //\t\t'Selection change ignored (isComposing)'\n\t\t\t\t// @if CK_DEBUG_TYPING //\t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._handleSelectionChange( domDocument );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t// Defer the safety timeout when the selection changes (e.g. the user keeps extending the selection\n\t\t\t// using their mouse).\n\t\t\tthis._documentIsSelectingInactivityTimeoutDebounced();\n\t\t} );\n\n\t\t// Update the model ViewDocumentSelection just after the Renderer and the SelectionObserver are locked.\n\t\t// We do this synchronously (without waiting for the `selectionchange` DOM event) as browser updates\n\t\t// the DOM selection (but not visually) to span the text that is under composition and could be replaced.\n\t\tthis.listenTo<ViewDocumentCompositionStartEvent>( this.view.document, 'compositionstart', () => {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconst domSelection = domDocument.defaultView!.getSelection();\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'update selection on compositionstart'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'DOM Selection:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.anchorNode, offset: domSelection!.anchorOffset },\n\t\t\t// @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.focusNode, offset: domSelection!.focusOffset }\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis._handleSelectionChange( domDocument );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}, { priority: 'lowest' } );\n\n\t\tthis._documents.add( domDocument );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override stopObserving( domElement: HTMLElement ): void {\n\t\tthis.stopListening( domElement );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tclearInterval( this._clearInfiniteLoopInterval );\n\t\tthis._fireSelectionChangeDoneDebounced.cancel();\n\t\tthis._documentIsSelectingInactivityTimeoutDebounced.cancel();\n\t}\n\n\t/* v8 ignore next 6 -- @preserve */\n\tprivate _reportInfiniteLoop() {\n\t// @if CK_DEBUG //\t\tthrow new Error(\n\t// @if CK_DEBUG //\t\t\t'Selection change observer detected an infinite rendering loop.\\n\\n' +\n\t// @if CK_DEBUG //\t \t\t'⚠️⚠️ Report this error on https://github.com/ckeditor/ckeditor5/issues/11658.'\n\t// @if CK_DEBUG //\t\t);\n\t}\n\n\t/**\n\t * Selection change listener. {@link module:engine/view/observer/mutationobserver~MutationObserver#flush Flush} mutations, check if\n\t * a selection changes and fires {@link module:engine/view/document~ViewDocument#event:selectionChange} event on every change\n\t * and {@link module:engine/view/document~ViewDocument#event:selectionChangeDone} when a selection stop changing.\n\t *\n\t * @param domDocument DOM document.\n\t */\n\tprivate _handleSelectionChange( domDocument: Document ) {\n\t\tif ( !this.isEnabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domSelection = domDocument.defaultView!.getSelection()!;\n\n\t\tif ( this.checkShouldIgnoreEventFromTarget( domSelection.anchorNode! ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure the mutation event will be before selection event on all browsers.\n\t\tthis.mutationObserver.flush();\n\n\t\tconst newViewSelection = this.domConverter.domSelectionToView( domSelection );\n\n\t\t// Do not convert selection change if the new view selection has no ranges in it.\n\t\t//\n\t\t// It means that the DOM selection is in some way incorrect. Ranges that were in the DOM selection could not be\n\t\t// converted to the view. This happens when the DOM selection was moved outside of the editable element.\n\t\tif ( newViewSelection.rangeCount == 0 ) {\n\t\t\tthis.view.hasDomSelection = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.view.hasDomSelection = true;\n\n\t\t// Mark the latest focus change as complete (we got new selection after the focus so the selection is in the focused element).\n\t\tthis.focusObserver.flush();\n\n\t\t// Ignore selection change as the editable is not focused. Note that in read-only mode, we have to update\n\t\t// the model selection as there won't be any focus change to flush the pending selection changes.\n\t\tif ( !this.view.document.isFocused && !this.view.document.isReadOnly ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'Ignore selection change while editable is not focused'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis._pendingSelectionChange.add( domDocument );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pendingSelectionChange.delete( domDocument );\n\n\t\tif ( this.selection.isEqual( newViewSelection ) && this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure we are not in the infinite loop (https://github.com/ckeditor/ckeditor5-engine/issues/400).\n\t\t// This counter is reset each second. 60 selection changes in 1 second is enough high number\n\t\t// to be very difficult (impossible) to achieve using just keyboard keys (during normal editor use).\n\t\tif ( ++this._loopbackCounter > 60 ) {\n\t\t\t// Selection change observer detected an infinite rendering loop.\n\t\t\t// Most probably you try to put the selection in the position which is not allowed\n\t\t\t// by the browser and browser fixes it automatically what causes `selectionchange` event on\n\t\t\t// which a loopback through a model tries to re-render the wrong selection and again.\n\t\t\tthis._reportInfiniteLoop();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !isSelectionWithinRootElements( newViewSelection ) ) {\n\t\t\t// Occasionally, such as when removing markers during a focus change, the selection may end up inside a view element\n\t\t\t// whose parent has already been detached from the DOM. In most cases this is harmless, but if the selectionchange\n\t\t\t// event fires before the view is fully synchronized with the DOM converter, some elements in the selection may become orphans.\n\t\t\t// This can result in the view being out of sync with the actual DOM structure.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/18744\n\t\t\tthis.view.forceRender();\n\t\t} else if ( this.selection.isSimilar( newViewSelection ) ) {\n\t\t\t// If selection was equal and we are at this point of algorithm, it means that it was incorrect.\n\t\t\t// Just re-render it, no need to fire any events, etc.\n\t\t\tthis.view.forceRender();\n\t\t} else {\n\t\t\tconst data: ViewDocumentObserverSelectionEventData = {\n\t\t\t\toldSelection: this.selection,\n\t\t\t\tnewSelection: newViewSelection,\n\t\t\t\tdomSelection\n\t\t\t};\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'SelectionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'Fire selection change:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\tnewViewSelection.getFirstRange()\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t// Prepare data for new selection and fire appropriate events.\n\t\t\tthis.document.fire<ViewDocumentObserverSelectionChangeEvent>( 'selectionChange', data );\n\n\t\t\t// Call `#_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n\t\t\t// This function is debounced what means that `selectionChangeDone` event will be fired only when\n\t\t\t// defined int the function time will elapse since the last time the function was called.\n\t\t\t// So `selectionChangeDone` will be fired when selection will stop changing.\n\t\t\tthis._fireSelectionChangeDoneDebounced( data );\n\t\t}\n\t}\n\n\t/**\n\t * Clears `SelectionObserver` internal properties connected with preventing infinite loop.\n\t */\n\tprivate _clearInfiniteLoop(): void {\n\t\tthis._loopbackCounter = 0;\n\t}\n}\n\n/**\n * Checks if all roots of the selection's range boundaries are root elements.\n * Returns true if the selection is fully contained within root elements (not orphaned).\n *\n * @param selection The view selection to check.\n * @returns True if all range boundaries are within root elements, false otherwise.\n */\nfunction isSelectionWithinRootElements( selection: ViewSelection ): boolean {\n\treturn Array\n\t\t.from( selection.getRanges() )\n\t\t.flatMap( range => [ range.start.root, range.end.root ] )\n\t\t.every( root => root && root.is( 'rootElement' ) );\n}\n\n/**\n * The value of {@link ~ViewDocumentObserverSelectionChangeEvent} and {@link ~ViewDocumentObserverSelectionChangeDoneEvent} events.\n */\nexport type ViewDocumentObserverSelectionEventData = {\n\n\t/**\n\t * Old View selection which is {@link module:engine/view/document~ViewDocument#selection}.\n\t */\n\toldSelection: ViewDocumentSelection;\n\n\t/**\n\t * New View selection which is converted DOM selection.\n\t */\n\tnewSelection: ViewSelection;\n\n\t/**\n\t * Native DOM selection.\n\t */\n\tdomSelection: DomSelection | null;\n};\n\n/**\n * Fired when a selection has changed. This event is fired only when the selection change was the only change that happened\n * in the document, and the old selection is different then the new selection.\n *\n * Introduced by {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n *\n * Note that because {@link module:engine/view/observer/selectionobserver~SelectionObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/selectionobserver~SelectionObserver\n * @eventName module:engine/view/document~ViewDocument#selectionChange\n */\nexport type ViewDocumentObserverSelectionChangeEvent = {\n\tname: 'selectionChange';\n\targs: [ ViewDocumentObserverSelectionEventData ];\n};\n\n/**\n * Fired when selection stops changing.\n *\n * Introduced by {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n *\n * Note that because {@link module:engine/view/observer/selectionobserver~SelectionObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/selectionobserver~SelectionObserver\n * @eventName module:engine/view/document~ViewDocument#selectionChangeDone\n */\nexport type ViewDocumentObserverSelectionChangeDoneEvent = {\n\tname: 'selectionChangeDone';\n\targs: [ ViewDocumentObserverSelectionEventData ];\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/**\n * @module engine/view/observer/compositionobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type EditingView } from '../view.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\n\n// @if CK_DEBUG_TYPING // import { _debouncedLine, _buildLogMessage } from '../../dev-utils/utils.js';\n\n/**\n * {@link module:engine/view/document~ViewDocument#event:compositionstart Compositionstart},\n * {@link module:engine/view/document~ViewDocument#event:compositionupdate compositionupdate} and\n * {@link module:engine/view/document~ViewDocument#event:compositionend compositionend} events observer.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n */\nexport class CompositionObserver extends DomEventObserver<'compositionstart' | 'compositionupdate' | 'compositionend'> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = [ 'compositionstart', 'compositionupdate', 'compositionend' ] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tconst document = this.document;\n\n\t\tdocument.on<ViewDocumentCompositionStartEvent>( 'compositionstart', () => {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'CompositionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%c┌───────────────────────────── isComposing = true ─────────────────────────────┐',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\tdocument.isComposing = true;\n\t\t} );\n\n\t\tdocument.on<ViewDocumentCompositionEndEvent>( 'compositionend', () => {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'CompositionObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%c└───────────────────────────── isComposing = false ─────────────────────────────┘',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\tdocument.isComposing = false;\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: CompositionEvent ): void {\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \t_debouncedLine();\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'CompositionObserver',\n\t\t// @if CK_DEBUG_TYPING // \t\t`${ domEvent.type }`\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tthis.fire( domEvent.type, domEvent, {\n\t\t\tdata: domEvent.data\n\t\t} );\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n}\n\nexport interface ViewDocumentCompositionEventData extends ViewDocumentDomEventData<CompositionEvent> {\n\tdata: string | null;\n}\n\n/**\n * Fired when composition starts inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @eventName module:engine/view/document~ViewDocument#compositionstart\n * @param data Event data.\n */\nexport type ViewDocumentCompositionStartEvent = {\n\tname: 'compositionstart';\n\targs: [ data: ViewDocumentCompositionEventData ];\n};\n\n/**\n * Fired when composition is updated inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @eventName module:engine/view/document~ViewDocument#compositionupdate\n * @param data Event data.\n */\nexport type ViewDocumentCompositionUpdateEvent = {\n\tname: 'compositionupdate';\n\targs: [ data: ViewDocumentCompositionEventData ];\n};\n\n/**\n * Fired when composition ends inside one of the editables.\n *\n * Introduced by {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n *\n * Note that because {@link module:engine/view/observer/compositionobserver~CompositionObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @see module:engine/view/observer/compositionobserver~CompositionObserver\n * @eventName module:engine/view/document~ViewDocument#compositionend\n * @param data Event data.\n */\nexport type ViewDocumentCompositionEndEvent = {\n\tname: 'compositionend';\n\targs: [ data: ViewDocumentCompositionEventData ];\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/**\n * @module engine/view/datatransfer\n */\n\ntype DomDataTransfer = globalThis.DataTransfer;\n\n/**\n * A facade over the native [`DataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n */\nexport class ViewDataTransfer {\n\t/**\n\t * The array of files created from the native `DataTransfer#files` or `DataTransfer#items`.\n\t */\n\tprivate _files: Array<File> | null;\n\n\t/**\n\t * The native DataTransfer object.\n\t */\n\tprivate _native: DomDataTransfer;\n\n\t/**\n\t * @param nativeDataTransfer The native [`DataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n\t * @param options.cacheFiles Whether `files` list should be initialized in the constructor.\n\t */\n\tconstructor( nativeDataTransfer: DomDataTransfer, options: { cacheFiles?: boolean } = {} ) {\n\t\t// We should store references to the File instances in case someone would like to process this files\n\t\t// outside the event handler. Files are stored only for `drop` and `paste` events because they are not usable\n\t\t// in other events and are generating a huge delay on Firefox while dragging.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/13366.\n\t\tthis._files = options.cacheFiles ? getFiles( nativeDataTransfer ) : null;\n\n\t\tthis._native = nativeDataTransfer;\n\t}\n\n\t/**\n\t * The array of files created from the native `DataTransfer#files` or `DataTransfer#items`.\n\t */\n\tpublic get files(): Array<File> {\n\t\tif ( !this._files ) {\n\t\t\tthis._files = getFiles( this._native );\n\t\t}\n\n\t\treturn this._files;\n\t}\n\n\t/**\n\t * Returns an array of available native content types.\n\t */\n\tpublic get types(): ReadonlyArray<string> {\n\t\treturn this._native.types;\n\t}\n\n\t/**\n\t * Gets the data from the data transfer by its MIME type.\n\t *\n\t * ```ts\n\t * dataTransfer.getData( 'text/plain' );\n\t * ```\n\t *\n\t * @param type The MIME type. E.g. `text/html` or `text/plain`.\n\t */\n\tpublic getData( type: string ): string {\n\t\treturn this._native.getData( type );\n\t}\n\n\t/**\n\t * Sets the data in the data transfer.\n\t *\n\t * @param type The MIME type. E.g. `text/html` or `text/plain`.\n\t */\n\tpublic setData( type: string, data: string ): void {\n\t\tthis._native.setData( type, data );\n\t}\n\n\t/**\n\t * The effect that is allowed for a drag operation.\n\t */\n\tpublic set effectAllowed( value: ViewEffectAllowed ) {\n\t\tthis._native.effectAllowed = value;\n\t}\n\n\tpublic get effectAllowed(): ViewEffectAllowed {\n\t\treturn this._native.effectAllowed;\n\t}\n\n\t/**\n\t * The actual drop effect.\n\t */\n\tpublic set dropEffect( value: ViewDropEffect ) {\n\t\tthis._native.dropEffect = value;\n\t}\n\n\tpublic get dropEffect(): ViewDropEffect {\n\t\treturn this._native.dropEffect;\n\t}\n\n\t/**\n\t * Set a preview image of the dragged content.\n\t */\n\tpublic setDragImage( image: Element, x: number, y: number ): void {\n\t\tthis._native.setDragImage( image, x, y );\n\t}\n\n\t/**\n\t * Whether the dragging operation was canceled.\n\t */\n\tpublic get isCanceled(): boolean {\n\t\treturn this._native.dropEffect == 'none' || !!( this._native as any ).mozUserCancelled;\n\t}\n}\n\n/**\n * The effect that is allowed for a drag operation.\n */\nexport type ViewEffectAllowed = DomDataTransfer[ 'effectAllowed' ];\n\n/**\n * The actual drop effect.\n */\nexport type ViewDropEffect = DomDataTransfer[ 'dropEffect' ];\n\nfunction getFiles( nativeDataTransfer: DomDataTransfer ): Array<File> {\n\t// DataTransfer.files and items are array-like and might not have an iterable interface.\n\tconst files = Array.from( nativeDataTransfer.files || [] );\n\tconst items = Array.from( nativeDataTransfer.items || [] );\n\n\tif ( files.length ) {\n\t\treturn files;\n\t}\n\n\t// Chrome has empty DataTransfer.files, but allows getting files through the items interface.\n\treturn items\n\t\t.filter( item => item.kind === 'file' )\n\t\t.map( item => item.getAsFile()! );\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/**\n * @module engine/view/observer/inputobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\nimport { type ViewRange } from '../range.js';\nimport { ViewDataTransfer } from '../datatransfer.js';\nimport { env, isText, indexOf } from '@ckeditor/ckeditor5-utils';\nimport { INLINE_FILLER_LENGTH, startsWithFiller } from '../filler.js';\n\n// @if CK_DEBUG_TYPING // import { _debouncedLine, _buildLogMessage } from '../../dev-utils/utils.js';\n\n/**\n * Observer for events connected with data input.\n *\n * **Note**: This observer is attached by {@link module:engine/view/view~EditingView} and available by default in all\n * editor instances.\n */\nexport class InputObserver extends DomEventObserver<'beforeinput'> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = 'beforeinput' as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: InputEvent ): void {\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \t_debouncedLine();\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'InputObserver',\n\t\t// @if CK_DEBUG_TYPING // \t\t`${ domEvent.type }: ${ domEvent.inputType } - ${ domEvent.isComposing ? 'is' : 'not' } composing`,\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tconst domTargetRanges = domEvent.getTargetRanges();\n\t\tconst view = this.view;\n\t\tconst viewDocument = view.document;\n\n\t\tlet dataTransfer: ViewDataTransfer | null = null;\n\t\tlet data: string | null = null;\n\t\tlet targetRanges: Array<ViewRange> = [];\n\n\t\tif ( domEvent.dataTransfer ) {\n\t\t\tdataTransfer = new ViewDataTransfer( domEvent.dataTransfer );\n\t\t}\n\n\t\tif ( domEvent.data !== null ) {\n\t\t\tdata = domEvent.data;\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'InputObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`%cevent data: %c${ JSON.stringify( data ) }`,\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue;'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t} else if ( dataTransfer ) {\n\t\t\tdata = dataTransfer.getData( 'text/plain' );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'InputObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`%cevent data transfer: %c${ JSON.stringify( data ) }`,\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue;'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}\n\n\t\t// If the editor selection is fake (an object is selected), the DOM range does not make sense because it is anchored\n\t\t// in the fake selection container.\n\t\tif ( viewDocument.selection.isFake ) {\n\t\t\t// Future-proof: in case of multi-range fake selections being possible.\n\t\t\ttargetRanges = Array.from( viewDocument.selection.getRanges() );\n\n\t\t\t// Do not allow typing inside a fake selection container, we will handle it manually.\n\t\t\tdomEvent.preventDefault();\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'InputObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cusing fake selection:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t// @if CK_DEBUG_TYPING // \t\ttargetRanges,\n\t\t\t// @if CK_DEBUG_TYPING // \t\tviewDocument.selection.isFake ? 'fake view selection' : 'fake DOM parent'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t} else if ( domTargetRanges.length ) {\n\t\t\ttargetRanges = domTargetRanges.map( domRange => {\n\t\t\t\t// Sometimes browser provides range that starts before editable node.\n\t\t\t\t// We try to fall back to collapsed range at the valid end position.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/14411.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/14050.\n\t\t\t\tlet viewStart = view.domConverter.domPositionToView( domRange.startContainer, domRange.startOffset );\n\t\t\t\tconst viewEnd = view.domConverter.domPositionToView( domRange.endContainer, domRange.endOffset );\n\n\t\t\t\t// When text replacement is enabled and browser tries to replace double space with dot, and space,\n\t\t\t\t// but the first space is no longer where browser put it (it was moved to an attribute element),\n\t\t\t\t// then we must extend the target range so it does not include a part of an inline filler.\n\t\t\t\tif ( viewStart && startsWithFiller( domRange.startContainer ) && domRange.startOffset < INLINE_FILLER_LENGTH ) {\n\t\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'InputObserver',\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cTarget range starts in an inline filler - adjusting it',\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\t\tdomEvent.preventDefault();\n\n\t\t\t\t\tlet count = INLINE_FILLER_LENGTH - domRange.startOffset;\n\n\t\t\t\t\tviewStart = viewStart.getLastMatchingPosition( value => {\n\t\t\t\t\t\t// Ignore attribute and UI elements but stop on container elements.\n\t\t\t\t\t\tif ( value.item.is( 'attributeElement' ) || value.item.is( 'uiElement' ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Skip as many characters as inline filler was overlapped.\n\t\t\t\t\t\tif ( value.item.is( '$textProxy' ) && count-- ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}, { direction: 'backward', singleCharacters: true } );\n\t\t\t\t}\n\n\t\t\t\t// Check if there is no an inline filler just after the target range.\n\t\t\t\tif ( isFollowedByInlineFiller( domRange.endContainer, domRange.endOffset ) ) {\n\t\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'InputObserver',\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cTarget range ends just before an inline filler - prevent default behavior',\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\t\t\tdomEvent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tif ( viewStart ) {\n\t\t\t\t\treturn view.createRange( viewStart, viewEnd );\n\t\t\t\t} else if ( viewEnd ) {\n\t\t\t\t\treturn view.createRange( viewEnd );\n\t\t\t\t}\n\t\t\t} ).filter( ( range ): range is ViewRange => !!range );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'InputObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cusing target ranges:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t// @if CK_DEBUG_TYPING // \t\ttargetRanges\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}\n\t\t// For Android devices we use a fallback to the current DOM selection, Android modifies it according\n\t\t// to the expected target ranges of input event.\n\t\telse if ( env.isAndroid ) {\n\t\t\tconst domSelection = ( domEvent.target as HTMLElement ).ownerDocument.defaultView!.getSelection()!;\n\n\t\t\ttargetRanges = Array.from( view.domConverter.domSelectionToView( domSelection ).getRanges() );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'InputObserver',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cusing selection ranges:',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t// @if CK_DEBUG_TYPING // \t\ttargetRanges\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t}\n\n\t\t// Android sometimes fires insertCompositionText with a new-line character at the end of the data\n\t\t// instead of firing insertParagraph beforeInput event.\n\t\t// Fire the correct type of beforeInput event and ignore the replaced fragment of text because\n\t\t// it wants to replace \"test\" with \"test\\n\".\n\t\t// https://github.com/ckeditor/ckeditor5/issues/12368.\n\t\tif ( env.isAndroid && domEvent.inputType == 'insertCompositionText' && data && data.endsWith( '\\n' ) ) {\n\t\t\tthis.fire( domEvent.type, domEvent, {\n\t\t\t\tinputType: 'insertParagraph',\n\t\t\t\ttargetRanges: [ view.createRange( targetRanges[ 0 ].end ) ]\n\t\t\t} );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Normalize the insertText data that includes new-line characters.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/2045.\n\t\tif ( [ 'insertText', 'insertReplacementText' ].includes( domEvent.inputType ) && data && data.includes( '\\n' ) ) {\n\t\t\t// There might be a single new-line or double for new paragraph, but we translate\n\t\t\t// it to paragraphs as it is our default action for enter handling.\n\t\t\tconst parts = data.split( /\\n{1,2}/g );\n\n\t\t\tlet partTargetRanges = targetRanges;\n\n\t\t\t// Handle all parts on our side as we rely on paragraph inserting and synchronously updated view selection.\n\t\t\tdomEvent.preventDefault();\n\n\t\t\tfor ( let i = 0; i < parts.length; i++ ) {\n\t\t\t\tconst dataPart = parts[ i ];\n\n\t\t\t\tif ( dataPart != '' ) {\n\t\t\t\t\tthis.fire( domEvent.type, domEvent, {\n\t\t\t\t\t\tdata: dataPart,\n\t\t\t\t\t\tdataTransfer,\n\t\t\t\t\t\ttargetRanges: partTargetRanges,\n\t\t\t\t\t\tinputType: domEvent.inputType,\n\t\t\t\t\t\tisComposing: domEvent.isComposing\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Use the result view selection so following events will be added one after another.\n\t\t\t\t\tpartTargetRanges = [ viewDocument.selection.getFirstRange()! ];\n\t\t\t\t}\n\n\t\t\t\tif ( i + 1 < parts.length ) {\n\t\t\t\t\tthis.fire( domEvent.type, domEvent, {\n\t\t\t\t\t\tinputType: 'insertParagraph',\n\t\t\t\t\t\ttargetRanges: partTargetRanges\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Use the result view selection so following events will be added one after another.\n\t\t\t\t\tpartTargetRanges = [ viewDocument.selection.getFirstRange()! ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Fire the normalized beforeInput event.\n\t\tthis.fire( domEvent.type, domEvent, {\n\t\t\tdata,\n\t\t\tdataTransfer,\n\t\t\ttargetRanges,\n\t\t\tinputType: domEvent.inputType,\n\t\t\tisComposing: domEvent.isComposing\n\t\t} );\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n}\n\n/**\n * Returns `true` if there is an inline filler just after the position in DOM.\n * It walks up the DOM tree if the offset is at the end of the node.\n */\nfunction isFollowedByInlineFiller( node: Node, offset: number ): boolean {\n\twhile ( node.parentNode ) {\n\t\tif ( isText( node ) ) {\n\t\t\tif ( offset != node.data.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( offset != node.childNodes.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\toffset = indexOf( node ) + 1;\n\t\tnode = node.parentNode;\n\n\t\tif ( offset < node.childNodes.length && startsWithFiller( node.childNodes[ offset ] ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Fired before the web browser inputs, deletes, or formats some data.\n *\n * This event is introduced by {@link module:engine/view/observer/inputobserver~InputObserver} and available\n * by default in all editor instances (attached by {@link module:engine/view/view~EditingView}).\n *\n * @see module:engine/view/observer/inputobserver~InputObserver\n * @eventName module:engine/view/document~ViewDocument#beforeinput\n * @param data Event data containing detailed information about the event.\n */\nexport type ViewDocumentInputEvent = {\n\tname: 'beforeinput';\n\targs: [ data: ViewDocumentInputEventData ];\n};\n\n/**\n * The value of the {@link ~ViewDocumentInputEvent} event.\n */\nexport interface ViewDocumentInputEventData extends ViewDocumentDomEventData<InputEvent> {\n\n\t/**\n\t * The type of the input event (e.g. \"insertText\" or \"deleteWordBackward\"). Corresponds to native `InputEvent#inputType`.\n\t */\n\treadonly inputType: string;\n\n\t/**\n\t * A unified text data passed along with the input event. Depending on:\n\t *\n\t * * the web browser and input events implementation (for instance [Level 1](https://www.w3.org/TR/input-events-1/) or\n\t * [Level 2](https://www.w3.org/TR/input-events-2/)),\n\t * * {@link module:engine/view/observer/inputobserver~ViewDocumentInputEventData#inputType input type}\n\t *\n\t * text data is sometimes passed in the `data` and sometimes in the `dataTransfer` property.\n\t *\n\t * * If `InputEvent#data` was set, this property reflects its value.\n\t * * If `InputEvent#data` is unavailable, this property contains the `'text/plain'` data from\n\t * {@link module:engine/view/observer/inputobserver~ViewDocumentInputEventData#dataTransfer}.\n\t * * If the event ({@link module:engine/view/observer/inputobserver~ViewDocumentInputEventData#inputType input type})\n\t * provides no data whatsoever, this property is `null`.\n\t */\n\treadonly data: string | null;\n\n\t/**\n\t * The data transfer instance of the input event. Corresponds to native `InputEvent#dataTransfer`.\n\t *\n\t * The value is `null` when no `dataTransfer` was passed along with the input event.\n\t */\n\treadonly dataTransfer: ViewDataTransfer;\n\n\t/**\n\t * A flag indicating that the `beforeinput` event was fired during composition.\n\t *\n\t * Corresponds to the\n\t * {@link module:engine/view/document~ViewDocument#event:compositionstart},\n\t * {@link module:engine/view/document~ViewDocument#event:compositionupdate},\n\t * and {@link module:engine/view/document~ViewDocument#event:compositionend } trio.\n\t */\n\treadonly isComposing: boolean;\n\n\t/**\n\t * Editing {@link module:engine/view/range~ViewRange view ranges} corresponding to DOM ranges provided by the web browser\n\t * (as returned by `InputEvent#getTargetRanges()`).\n\t */\n\treadonly targetRanges: Array<ViewRange>;\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/**\n * @module engine/view/observer/arrowkeysobserver\n */\n\nimport { Observer } from './observer.js';\nimport { BubblingEventInfo } from './bubblingeventinfo.js';\nimport { type EditingView } from '../view.js';\nimport type { ViewDocumentKeyEventData, ViewDocumentKeyDownEvent } from './keyobserver.js';\nimport type { BubblingEvent } from './bubblingemittermixin.js';\n\nimport { isArrowKeyCode } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Arrow keys observer introduces the {@link module:engine/view/document~ViewDocument#event:arrowKey `Document#arrowKey`} event.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~EditingView} and is available by default.\n */\nexport class ArrowKeysObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tthis.document.on<ViewDocumentKeyDownEvent>( 'keydown', ( event, data ) => {\n\t\t\tif ( this.isEnabled && isArrowKeyCode( data.keyCode ) ) {\n\t\t\t\tconst eventInfo = new BubblingEventInfo( this.document, 'arrowKey', this.document.selection.getFirstRange()! );\n\n\t\t\t\tthis.document.fire<ViewDocumentArrowKeyEvent>( eventInfo, data );\n\n\t\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\t\tevent.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override observe(): void {}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override stopObserving(): void {}\n}\n\n/**\n * Event fired when the user presses an arrow keys.\n *\n * Introduced by {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver}.\n *\n * Note that because {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver} is attached by the\n * {@link module:engine/view/view~EditingView} this event is available by default.\n *\n * @eventName module:engine/view/document~ViewDocument#arrowKey\n * @param data\n */\n\nexport type ViewDocumentArrowKeyEvent = BubblingEvent<{\n\tname: 'arrowKey';\n\targs: [ data: ViewDocumentKeyEventData ];\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/**\n * @module engine/view/observer/tabobserver\n */\n\nimport { type EditingView } from '../view.js';\nimport { Observer } from './observer.js';\nimport { BubblingEventInfo } from './bubblingeventinfo.js';\nimport type { ViewDocumentKeyEventData, ViewDocumentKeyDownEvent } from './keyobserver.js';\nimport type { BubblingEvent } from './bubblingemittermixin.js';\n\nimport { keyCodes } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Tab observer introduces the {@link module:engine/view/document~ViewDocument#event:tab `Document#tab`} event.\n *\n * Note that because {@link module:engine/view/observer/tabobserver~TabObserver} is attached by the\n * {@link module:engine/view/view~EditingView}, this event is available by default.\n */\nexport class TabObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tconst doc = this.document;\n\n\t\tdoc.on<ViewDocumentKeyDownEvent>( 'keydown', ( evt, data ) => {\n\t\t\tif (\n\t\t\t\t!this.isEnabled ||\n\t\t\t\tdata.keyCode != keyCodes.tab ||\n\t\t\t\tdata.ctrlKey\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst event = new BubblingEventInfo( doc, 'tab', doc.selection.getFirstRange()! );\n\n\t\t\tdoc.fire<ViewDocumentTabEvent>( event, data );\n\n\t\t\tif ( event.stop.called ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override observe(): void {}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override stopObserving(): void {}\n}\n\n/**\n * Event fired when the user presses a tab key.\n *\n * Introduced by {@link module:engine/view/observer/tabobserver~TabObserver}.\n *\n * Note that because {@link module:engine/view/observer/tabobserver~TabObserver} is attached by the\n * {@link module:engine/view/view~EditingView}, this event is available by default.\n *\n * @eventName module:engine/view/document~ViewDocument#tab\n * @param data\n */\nexport type ViewDocumentTabEvent = BubblingEvent<{\n\tname: 'tab';\n\targs: [ data: ViewDocumentKeyEventData ];\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/**\n * @module engine/view/view\n */\n\nimport { ViewDocument, type ViewDocumentLayoutChangedEvent } from './document.js';\nimport { ViewDowncastWriter } from './downcastwriter.js';\nimport { ViewRenderer } from './renderer.js';\nimport { ViewDomConverter } from './domconverter.js';\nimport { ViewPosition, type ViewPositionOffset } from './position.js';\nimport { ViewRange } from './range.js';\nimport {\n\tViewSelection,\n\ttype ViewPlaceOrOffset,\n\ttype ViewSelectable,\n\ttype ViewSelectionOptions\n} from './selection.js';\n\nimport type { Observer, ObserverConstructor } from './observer/observer.js';\nimport type { ViewDocumentSelectionChangeEvent } from './documentselection.js';\nimport type { ViewDocumentFragment } from './documentfragment.js';\nimport type { StylesProcessor } from './stylesmap.js';\nimport { type ViewElement } from './element.js';\nimport type { ViewNode, ViewNodeChangeEvent } from './node.js';\nimport { type ViewItem } from './item.js';\n\nimport { KeyObserver } from './observer/keyobserver.js';\nimport { FakeSelectionObserver } from './observer/fakeselectionobserver.js';\nimport { MutationObserver, type ViewDocumentMutationsEvent } from './observer/mutationobserver.js';\nimport { SelectionObserver } from './observer/selectionobserver.js';\nimport { FocusObserver, type ViewDocumentBlurEvent } from './observer/focusobserver.js';\nimport { CompositionObserver } from './observer/compositionobserver.js';\nimport { InputObserver } from './observer/inputobserver.js';\nimport { ArrowKeysObserver } from './observer/arrowkeysobserver.js';\nimport { TabObserver } from './observer/tabobserver.js';\n\nimport {\n\tCKEditorError,\n\tenv,\n\tObservableMixin,\n\tscrollViewportToShowTarget,\n\ttype ObservableChangeEvent,\n\ttype IfTrue,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\nimport { injectUiElementHandling } from './uielement.js';\nimport { injectQuirksHandling } from './filler.js';\n\nimport { cloneDeep } from 'es-toolkit/compat';\n\n// type IfTrue<T> = T extends true ? true : never;\ntype DomRange = globalThis.Range;\n\nconst EditingViewBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Editor's view controller class. Its main responsibility is DOM - View management for editing purposes, to provide\n * abstraction over the DOM structure and events and hide all browsers quirks.\n *\n * View controller renders view document to DOM whenever view structure changes. To determine when view can be rendered,\n * all changes need to be done using the {@link module:engine/view/view~EditingView#change} method, using\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter}:\n *\n * ```ts\n * view.change( writer => {\n * \twriter.insert( position, writer.createText( 'foo' ) );\n * } );\n * ```\n *\n * View controller also register {@link module:engine/view/observer/observer~Observer observers} which observes changes\n * on DOM and fire events on the {@link module:engine/view/document~ViewDocument Document}.\n * Note that the following observers are added by the class constructor and are always available:\n *\n * * {@link module:engine/view/observer/selectionobserver~SelectionObserver},\n * * {@link module:engine/view/observer/focusobserver~FocusObserver},\n * * {@link module:engine/view/observer/keyobserver~KeyObserver},\n * * {@link module:engine/view/observer/fakeselectionobserver~FakeSelectionObserver}.\n * * {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n * * {@link module:engine/view/observer/inputobserver~InputObserver}.\n * * {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver}.\n * * {@link module:engine/view/observer/tabobserver~TabObserver}.\n *\n * This class also {@link module:engine/view/view~EditingView#attachDomRoot binds the DOM and the view elements}.\n *\n * If you do not need full a DOM - view management, and only want to transform a tree of view elements to a tree of DOM\n * elements you do not need this controller. You can use the {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n * instead.\n */\nexport class EditingView extends EditingViewBase {\n\t/**\n\t * Instance of the {@link module:engine/view/document~ViewDocument} associated with this view controller.\n\t */\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Instance of the {@link module:engine/view/domconverter~ViewDomConverter domConverter} used by\n\t * {@link module:engine/view/view~EditingView#_renderer renderer}\n\t * and {@link module:engine/view/observer/observer~Observer observers}.\n\t */\n\tpublic readonly domConverter: ViewDomConverter;\n\n\t/**\n\t * Roots of the DOM tree. Map on the `HTMLElement`s with roots names as keys.\n\t */\n\tpublic readonly domRoots: Map<string, HTMLElement> = new Map();\n\n\t/**\n\t * Used to prevent calling {@link #forceRender} and {@link #change} during rendering view to the DOM.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public isRenderingInProgress: boolean;\n\n\t/**\n\t * Informs whether the DOM selection is inside any of the DOM roots managed by the view.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public hasDomSelection: boolean;\n\n\t/**\n\t * Instance of the {@link module:engine/view/renderer~ViewRenderer renderer}.\n\t */\n\tprivate readonly _renderer: ViewRenderer;\n\n\t/**\n\t * A DOM root attributes cache. It saves the initial values of DOM root attributes before the DOM element\n\t * is {@link module:engine/view/view~EditingView#attachDomRoot attached} to the view so later on, when\n\t * the view is destroyed ({@link module:engine/view/view~EditingView#detachDomRoot}), they can be easily restored.\n\t * This way, the DOM element can go back to the (clean) state as if the editing view never used it.\n\t */\n\tprivate readonly _initialDomRootAttributes: WeakMap<HTMLElement, Record<string, string>> = new WeakMap();\n\n\t/**\n\t * Map of registered {@link module:engine/view/observer/observer~Observer observers}.\n\t */\n\tprivate readonly _observers: Map<ObserverConstructor, Observer> = new Map();\n\n\t/**\n\t * ViewDowncastWriter instance used in {@link #change change method} callbacks.\n\t */\n\tprivate readonly _writer: ViewDowncastWriter;\n\n\t/**\n\t * Is set to `true` when {@link #change view changes} are currently in progress.\n\t */\n\tprivate _ongoingChange: boolean = false;\n\n\t/**\n\t * Used to prevent calling {@link #forceRender} and {@link #change} during rendering view to the DOM.\n\t */\n\tprivate _postFixersInProgress: boolean = false;\n\n\t/**\n\t * Internal flag to temporary disable rendering. See the usage in the {@link #_disableRendering}.\n\t */\n\tprivate _renderingDisabled: boolean = false;\n\n\t/**\n\t * Internal flag that disables rendering when there are no changes since the last rendering.\n\t * It stores information about changed selection and changed elements from attached document roots.\n\t */\n\tprivate _hasChangedSinceTheLastRendering: boolean = false;\n\n\t/**\n\t * @param stylesProcessor The styles processor instance.\n\t */\n\tconstructor( stylesProcessor: StylesProcessor ) {\n\t\tsuper();\n\n\t\tthis.document = new ViewDocument( stylesProcessor );\n\t\tthis.domConverter = new ViewDomConverter( this.document );\n\n\t\tthis.set( 'isRenderingInProgress', false );\n\t\tthis.set( 'hasDomSelection', false );\n\n\t\tthis._renderer = new ViewRenderer( this.domConverter, this.document.selection );\n\t\tthis._renderer.bind( 'isFocused', 'isSelecting', 'isComposing' )\n\t\t\t.to( this.document, 'isFocused', 'isSelecting', 'isComposing' );\n\n\t\tthis._writer = new ViewDowncastWriter( this.document );\n\n\t\t// Add default observers.\n\t\t// Make sure that this list matches AlwaysRegisteredViewObservers type.\n\t\tthis.addObserver( MutationObserver );\n\t\tthis.addObserver( FocusObserver );\n\t\tthis.addObserver( SelectionObserver );\n\t\tthis.addObserver( KeyObserver );\n\t\tthis.addObserver( FakeSelectionObserver );\n\t\tthis.addObserver( CompositionObserver );\n\t\tthis.addObserver( ArrowKeysObserver );\n\t\tthis.addObserver( InputObserver );\n\t\tthis.addObserver( TabObserver );\n\n\t\t// Inject quirks handlers.\n\t\tinjectQuirksHandling( this );\n\t\tinjectUiElementHandling( this );\n\n\t\t// Use 'normal' priority so that rendering is performed as first when using that priority.\n\t\tthis.on<ViewRenderEvent>( 'render', () => {\n\t\t\tthis._render();\n\n\t\t\t// Informs that layout has changed after render.\n\t\t\tthis.document.fire<ViewDocumentLayoutChangedEvent>( 'layoutChanged' );\n\n\t\t\t// Reset the `_hasChangedSinceTheLastRendering` flag after rendering.\n\t\t\tthis._hasChangedSinceTheLastRendering = false;\n\t\t} );\n\n\t\t// Listen to the document selection changes directly.\n\t\tthis.listenTo<ViewDocumentSelectionChangeEvent>( this.document.selection, 'change', () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t} );\n\n\t\t// Trigger re-render if only the focus changed.\n\t\tthis.listenTo<ObservableChangeEvent>( this.document, 'change:isFocused', () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t} );\n\n\t\t// Remove ranges from DOM selection if editor is blurred.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/5753.\n\t\tif ( env.isiOS ) {\n\t\t\tthis.listenTo<ViewDocumentBlurEvent>( this.document, 'blur', ( evt, data ) => {\n\t\t\t\tconst relatedViewElement = this.domConverter.mapDomToView( data.domEvent.relatedTarget as HTMLElement );\n\n\t\t\t\t// Do not modify DOM selection if focus is moved to other editable of the same editor.\n\t\t\t\tif ( !relatedViewElement ) {\n\t\t\t\t\tthis.domConverter._clearDomSelection();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Listen to external content mutations (directly in the DOM) and mark them to get verified by the renderer.\n\t\tthis.listenTo<ViewDocumentMutationsEvent>( this.document, 'mutations', ( evt, { mutations } ) => {\n\t\t\tmutations.forEach( mutation => this._renderer.markToSync( mutation.type, mutation.node ) );\n\t\t}, { priority: 'low' } );\n\n\t\t// After all mutated nodes were marked to sync we can trigger view to DOM synchronization\n\t\t// to make sure the DOM structure matches the view.\n\t\tthis.listenTo<ViewDocumentMutationsEvent>( this.document, 'mutations', () => {\n\t\t\tthis.forceRender();\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Attaches a DOM root element to the view element and enable all observers on that element.\n\t * Also {@link module:engine/view/renderer~ViewRenderer#markToSync mark element} to be synchronized\n\t * with the view what means that all child nodes will be removed and replaced with content of the view root.\n\t *\n\t * This method also will change view element name as the same as tag name of given dom root.\n\t * Name is always transformed to lower case.\n\t *\n\t * **Note:** Use {@link #detachDomRoot `detachDomRoot()`} to revert this action.\n\t *\n\t * @param domRoot DOM root element.\n\t * @param name Name of the root.\n\t */\n\tpublic attachDomRoot( domRoot: HTMLElement, name: string = 'main' ): void {\n\t\tconst viewRoot = this.document.getRoot( name )!;\n\n\t\t// Set view root name the same as DOM root tag name.\n\t\tviewRoot._name = domRoot.tagName.toLowerCase();\n\n\t\tconst initialDomRootAttributes: Record<string, string> = {};\n\n\t\t// 1. Copy and cache the attributes to remember the state of the element before attaching.\n\t\t//    The cached attributes will be restored in detachDomRoot() so the element goes to the\n\t\t//    clean state as if the editing view never used it.\n\t\t// 2. Apply the attributes using the view writer, so they all go under the control of the engine.\n\t\t//    The editing view takes over the attribute management completely because various\n\t\t//    features (e.g. addPlaceholder()) require dynamic changes of those attributes and they\n\t\t//    cannot be managed by the engine and the UI library at the same time.\n\t\tfor ( const { name, value } of Array.from( domRoot.attributes ) ) {\n\t\t\tinitialDomRootAttributes[ name ] = value;\n\n\t\t\t// Do not use writer.setAttribute() for the class attribute. The EditableUIView class\n\t\t\t// and its descendants could have already set some using the writer.addClass() on the view\n\t\t\t// document root. They haven't been rendered yet so they are not present in the DOM root.\n\t\t\t// Using writer.setAttribute( 'class', ... ) would override them completely.\n\t\t\tif ( name === 'class' ) {\n\t\t\t\tthis._writer.addClass( value.split( ' ' ), viewRoot );\n\t\t\t} else {\n\t\t\t\t// There is a chance that some attributes have already been set on the view root before attaching\n\t\t\t\t// the DOM root and should be preserved. This is a similar case to the \"class\" attribute except\n\t\t\t\t// this time there is no workaround using a some low-level API.\n\t\t\t\tif ( !viewRoot.hasAttribute( name ) ) {\n\t\t\t\t\tthis._writer.setAttribute( name, value, viewRoot );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._initialDomRootAttributes.set( domRoot, initialDomRootAttributes );\n\n\t\tconst updateContenteditableAttribute = () => {\n\t\t\tthis._writer.setAttribute( 'contenteditable', ( !viewRoot.isReadOnly ).toString(), viewRoot );\n\n\t\t\tif ( viewRoot.isReadOnly ) {\n\t\t\t\tthis._writer.addClass( 'ck-read-only', viewRoot );\n\t\t\t} else {\n\t\t\t\tthis._writer.removeClass( 'ck-read-only', viewRoot );\n\t\t\t}\n\t\t};\n\n\t\t// Set initial value.\n\t\tupdateContenteditableAttribute();\n\n\t\tthis.domRoots.set( name, domRoot );\n\t\tthis.domConverter.bindElements( domRoot, viewRoot );\n\t\tthis._renderer.markToSync( 'children', viewRoot );\n\t\tthis._renderer.markToSync( 'attributes', viewRoot );\n\t\tthis._renderer.domDocuments.add( domRoot.ownerDocument );\n\n\t\tviewRoot.on<ViewNodeChangeEvent>( 'change:children', ( evt, node ) => this._renderer.markToSync( 'children', node ) );\n\t\tviewRoot.on<ViewNodeChangeEvent>( 'change:attributes', ( evt, node ) => this._renderer.markToSync( 'attributes', node ) );\n\t\tviewRoot.on<ViewNodeChangeEvent>( 'change:text', ( evt, node ) => this._renderer.markToSync( 'text', node ) );\n\t\tviewRoot.on<ObservableChangeEvent>( 'change:isReadOnly', () => this.change( updateContenteditableAttribute ) );\n\n\t\tviewRoot.on( 'change', () => {\n\t\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\t} );\n\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.observe( domRoot, name );\n\t\t}\n\t}\n\n\t/**\n\t * Detaches a DOM root element from the view element and restores its attributes to the state before\n\t * {@link #attachDomRoot `attachDomRoot()`}.\n\t *\n\t * @param name Name of the root to detach.\n\t */\n\tpublic detachDomRoot( name: string ): void {\n\t\tconst domRoot = this.domRoots.get( name )!;\n\n\t\t// Remove all root attributes so the DOM element is \"bare\".\n\t\tArray.from( domRoot.attributes ).forEach( ( { name } ) => domRoot.removeAttribute( name ) );\n\n\t\tconst initialDomRootAttributes = this._initialDomRootAttributes.get( domRoot );\n\n\t\t// Revert all view root attributes back to the state before attachDomRoot was called.\n\t\tfor ( const attribute in initialDomRootAttributes ) {\n\t\t\tdomRoot.setAttribute( attribute, initialDomRootAttributes[ attribute ] );\n\t\t}\n\n\t\tthis.domRoots.delete( name );\n\t\tthis.domConverter.unbindDomElement( domRoot );\n\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.stopObserving( domRoot );\n\t\t}\n\t}\n\n\t/**\n\t * Gets DOM root element.\n\t *\n\t * @param name  Name of the root.\n\t * @returns DOM root element instance.\n\t */\n\tpublic getDomRoot( name: string = 'main' ): HTMLElement | undefined {\n\t\treturn this.domRoots.get( name );\n\t}\n\n\t/**\n\t * Creates observer of the given type if not yet created, {@link module:engine/view/observer/observer~Observer#enable enables} it\n\t * and {@link module:engine/view/observer/observer~Observer#observe attaches} to all existing and future\n\t * {@link #domRoots DOM roots}.\n\t *\n\t * Note: Observers are recognized by their constructor (classes). A single observer will be instantiated and used only\n\t * when registered for the first time. This means that features and other components can register a single observer\n\t * multiple times without caring whether it has been already added or not.\n\t *\n\t * @param ObserverConstructor The constructor of an observer to add.\n\t * Should create an instance inheriting from {@link module:engine/view/observer/observer~Observer}.\n\t * @returns Added observer instance.\n\t */\n\tpublic addObserver( ObserverConstructor: ObserverConstructor ): Observer {\n\t\tlet observer = this._observers.get( ObserverConstructor );\n\n\t\tif ( observer ) {\n\t\t\treturn observer;\n\t\t}\n\n\t\tobserver = new ObserverConstructor( this );\n\n\t\tthis._observers.set( ObserverConstructor, observer );\n\n\t\tfor ( const [ name, domElement ] of this.domRoots ) {\n\t\t\tobserver.observe( domElement, name );\n\t\t}\n\n\t\tobserver.enable();\n\n\t\treturn observer;\n\t}\n\n\tpublic getObserver<T extends ObserverConstructor>( ObserverConstructor: T ):\n\tT extends AlwaysRegisteredViewObservers ? InstanceType<T> : InstanceType<T> | undefined;\n\n\t/**\n\t * Returns observer of the given type or `undefined` if such observer has not been added yet.\n\t *\n\t * @param ObserverConstructor The constructor of an observer to get.\n\t * @returns Observer instance or undefined.\n\t */\n\tpublic getObserver<T extends ObserverConstructor>( ObserverConstructor: T ): InstanceType<T> | undefined {\n\t\treturn this._observers.get( ObserverConstructor ) as ( InstanceType<T> | undefined );\n\t}\n\n\t/**\n\t * Disables all added observers.\n\t */\n\tpublic disableObservers(): void {\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.disable();\n\t\t}\n\t}\n\n\t/**\n\t * Enables all added observers.\n\t */\n\tpublic enableObservers(): void {\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.enable();\n\t\t}\n\t}\n\n\t/**\n\t * Scrolls the page viewport and {@link #domRoots} with their ancestors to reveal the\n\t * caret, **if not already visible to the user**.\n\t *\n\t * **Note**: Calling this method fires the {@link module:engine/view/view~ViewScrollToTheSelectionEvent} event that\n\t * allows custom behaviors.\n\t *\n\t * @param options Additional configuration of the scrolling behavior.\n\t * @param options.viewportOffset A distance between the DOM selection and the viewport boundary to be maintained\n\t * while scrolling to the selection (default is 20px). Setting this value to `0` will reveal the selection precisely at\n\t * the viewport boundary.\n\t * @param options.ancestorOffset A distance between the DOM selection and scrollable DOM root ancestor(s) to be maintained\n\t * while scrolling to the selection (default is 20px). Setting this value to `0` will reveal the selection precisely at\n\t * the scrollable ancestor(s) boundary.\n\t * @param options.alignToTop When set `true`, the DOM selection will be aligned to the top of the viewport if not already visible\n\t * (see `forceScroll` to learn more).\n\t * @param options.forceScroll When set `true`, the DOM selection will be aligned to the top of the viewport and scrollable ancestors\n\t * whether it is already visible or not. This option will only work when `alignToTop` is `true`.\n\t */\n\tpublic scrollToTheSelection<T extends boolean, U extends IfTrue<T>>( {\n\t\talignToTop,\n\t\tforceScroll,\n\t\tviewportOffset = 20,\n\t\tancestorOffset = 20\n\t}: {\n\t\treadonly viewportOffset?: number | { top: number; bottom: number; left: number; right: number };\n\t\treadonly ancestorOffset?: number;\n\t\treadonly alignToTop?: T;\n\t\treadonly forceScroll?: U;\n\t} = {} ): void {\n\t\tconst range = this.document.selection.getFirstRange();\n\n\t\tif ( !range ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clone to make sure properties like `viewportOffset` are not mutated in the event listeners.\n\t\tconst originalArgs = cloneDeep( { alignToTop, forceScroll, viewportOffset, ancestorOffset } );\n\n\t\tif ( typeof viewportOffset === 'number' ) {\n\t\t\tviewportOffset = {\n\t\t\t\ttop: viewportOffset,\n\t\t\t\tbottom: viewportOffset,\n\t\t\t\tleft: viewportOffset,\n\t\t\t\tright: viewportOffset\n\t\t\t};\n\t\t}\n\n\t\tconst options = {\n\t\t\ttarget: this.domConverter.viewRangeToDom( range ),\n\t\t\tviewportOffset,\n\t\t\tancestorOffset,\n\t\t\talignToTop,\n\t\t\tforceScroll\n\t\t};\n\n\t\tthis.fire<ViewScrollToTheSelectionEvent>( 'scrollToTheSelection', options, originalArgs );\n\n\t\tscrollViewportToShowTarget( options );\n\t}\n\n\t/**\n\t * It will focus DOM element representing {@link module:engine/view/editableelement~ViewEditableElement ViewEditableElement}\n\t * that is currently having selection inside.\n\t */\n\tpublic focus(): void {\n\t\tif ( !this.document.isFocused ) {\n\t\t\tconst editable = this.document.selection.editableElement;\n\n\t\t\tif ( editable ) {\n\t\t\t\tthis.domConverter.focus( editable );\n\t\t\t\tthis.forceRender();\n\t\t\t} else {\n\t\t\t\t// Before focusing view document, selection should be placed inside one of the view's editables.\n\t\t\t\t// Normally its selection will be converted from model document (which have default selection), but\n\t\t\t\t// when using view document on its own, we need to manually place selection before focusing it.\n\t\t\t\t//\n\t\t\t\t// @if CK_DEBUG // console.warn( 'There is no selection in any editable to focus.' );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The `change()` method is the primary way of changing the view. You should use it to modify any node in the view tree.\n\t * It makes sure that after all changes are made the view is rendered to the DOM (assuming that the view will be changed\n\t * inside the callback). It prevents situations when the DOM is updated when the view state is not yet correct. It allows\n\t * to nest calls one inside another and still performs a single rendering after all those changes are made.\n\t * It also returns the return value of its callback.\n\t *\n\t * ```ts\n\t * const text = view.change( writer => {\n\t * \tconst newText = writer.createText( 'foo' );\n\t * \twriter.insert( position1, newText );\n\t *\n\t * \tview.change( writer => {\n\t * \t\twriter.insert( position2, writer.createText( 'bar' ) );\n\t * \t} );\n\t *\n\t * \twriter.remove( range );\n\t *\n\t * \treturn newText;\n\t * } );\n\t * ```\n\t *\n\t * When the outermost change block is done and rendering to the DOM is over the\n\t * {@link module:engine/view/view~EditingView#event:render `View#render`} event is fired.\n\t *\n\t * This method throws a `applying-view-changes-on-rendering` error when\n\t * the change block is used after rendering to the DOM has started.\n\t *\n\t * @param callback Callback function which may modify the view.\n\t * @returns Value returned by the callback.\n\t */\n\tpublic change<TReturn>( callback: ( writer: ViewDowncastWriter ) => TReturn ): TReturn {\n\t\tif ( this.isRenderingInProgress || this._postFixersInProgress ) {\n\t\t\t/**\n\t\t\t * Thrown when there is an attempt to make changes to the view tree when it is in incorrect state. This may\n\t\t\t * cause some unexpected behaviour and inconsistency between the DOM and the view.\n\t\t\t * This may be caused by:\n\t\t\t *\n\t\t\t * * calling {@link module:engine/view/view~EditingView#change} or {@link module:engine/view/view~EditingView#forceRender}\n\t\t\t * during rendering process,\n\t\t\t * * calling {@link module:engine/view/view~EditingView#change} or {@link module:engine/view/view~EditingView#forceRender}\n\t\t\t * inside of {@link module:engine/view/document~ViewDocument#registerPostFixer post-fixer function}.\n\t\t\t *\n\t\t\t * @error cannot-change-view-tree\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'cannot-change-view-tree',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\ttry {\n\t\t\t// Recursive call to view.change() method - execute listener immediately.\n\t\t\tif ( this._ongoingChange ) {\n\t\t\t\treturn callback( this._writer );\n\t\t\t}\n\n\t\t\t// This lock will assure that all recursive calls to view.change() will end up in same block - one \"render\"\n\t\t\t// event for all nested calls.\n\t\t\tthis._ongoingChange = true;\n\t\t\tconst callbackResult = callback( this._writer );\n\t\t\tthis._ongoingChange = false;\n\n\t\t\t// This lock is used by editing controller to render changes from outer most model.change() once. As plugins might call\n\t\t\t// view.change() inside model.change() block - this will ensures that postfixers and rendering are called once after all\n\t\t\t// changes. Also, we don't need to render anything if there're no changes since last rendering.\n\t\t\tif ( !this._renderingDisabled && this._hasChangedSinceTheLastRendering ) {\n\t\t\t\tthis._postFixersInProgress = true;\n\t\t\t\tthis.document._callPostFixers( this._writer );\n\t\t\t\tthis._postFixersInProgress = false;\n\n\t\t\t\tthis.fire<ViewRenderEvent>( 'render' );\n\t\t\t}\n\n\t\t\treturn callbackResult;\n\t\t} catch ( err: any ) {\n\t\t\t// @if CK_DEBUG // throw err;\n\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t}\n\t}\n\n\t/**\n\t * Forces rendering {@link module:engine/view/document~ViewDocument view document} to DOM. If any view changes are\n\t * currently in progress, rendering will start after all {@link #change change blocks} are processed.\n\t *\n\t * Note that this method is dedicated for special cases. All view changes should be wrapped in the {@link #change}\n\t * block and the view will automatically check whether it needs to render DOM or not.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `applying-view-changes-on-rendering` when\n\t * trying to re-render when rendering to DOM has already started.\n\t */\n\tpublic forceRender(): void {\n\t\tthis._hasChangedSinceTheLastRendering = true;\n\t\tthis.getObserver( FocusObserver ).flush();\n\t\tthis.change( () => {} );\n\t}\n\n\t/**\n\t * Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t */\n\tpublic destroy(): void {\n\t\tfor ( const observer of this._observers.values() ) {\n\t\t\tobserver.destroy();\n\t\t}\n\n\t\tthis.document.destroy();\n\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~ViewPosition position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t */\n\tpublic createPositionAt( itemOrPosition: ViewItem | ViewPosition, offset?: ViewPositionOffset ): ViewPosition {\n\t\treturn ViewPosition._createAt( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @param item View item after which the position should be located.\n\t */\n\tpublic createPositionAfter( item: ViewItem ): ViewPosition {\n\t\treturn ViewPosition._createAfter( item );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @param item View item before which the position should be located.\n\t */\n\tpublic createPositionBefore( item: ViewItem ): ViewPosition {\n\t\treturn ViewPosition._createBefore( item );\n\t}\n\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates it's own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */\n\tpublic createRange( start: ViewPosition, end?: ViewPosition | null ): ViewRange {\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t */\n\tpublic createRangeOn( item: ViewItem ): ViewRange {\n\t\treturn ViewRange._createOn( item );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic createRangeIn( element: ViewElement | ViewDocumentFragment ): ViewRange {\n\t\treturn ViewRange._createIn( element );\n\t}\n\n\t/**\n\t * Creates new {@link module:engine/view/selection~ViewSelection} instance.\n\t *\n\t * ```ts\n\t * // Creates collapsed selection at the position of given item and offset.\n\t * const paragraph = view.createContainerElement( 'paragraph' );\n\t * const selection = view.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = view.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = view.createSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection`'s factory method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = view.createSelection( paragraph, 'in', { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = view.createSelection( element, 'in', { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:SELECTABLE `createSelection( selectable, options )`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic createSelection( selectable: ViewNode, placeOrOffset: ViewPlaceOrOffset, options?: ViewSelectionOptions ): ViewSelection;\n\n\t/**\n\t * Creates new {@link module:engine/view/selection~ViewSelection} instance.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = view.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = view.createRange( start, end );\n\t * const selection = view.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ view.createRange( start1, end2 ), view.createRange( star2, end2 ) ];\n\t * const selection = view.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * const otherSelection = view.createSelection();\n\t * const selection = view.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the document selection.\n\t * const selection = view.createSelection( editor.editing.view.document.selection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = view.createPositionFromPath( root, path );\n\t * const selection = view.createSelection( position );\n\t * ```\n\t *\n\t * `Selection`'s factory method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = view.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = view.createSelection( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:NODE_OFFSET `createSelection( node, placeOrOffset, options )`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic createSelection( selectable?: Exclude<ViewSelectable, ViewNode>, options?: ViewSelectionOptions ): ViewSelection;\n\n\tpublic createSelection( ...args: ConstructorParameters<typeof ViewSelection> ): ViewSelection {\n\t\treturn new ViewSelection( ...args );\n\t}\n\n\t/**\n\t * Disables or enables rendering. If the flag is set to `true` then the rendering will be disabled.\n\t * If the flag is set to `false` and if there was some change in the meantime, then the rendering action will be performed.\n\t *\n\t * @internal\n\t * @param flag A flag indicates whether the rendering should be disabled.\n\t */\n\tpublic _disableRendering( flag: boolean ): void {\n\t\tthis._renderingDisabled = flag;\n\n\t\tif ( flag == false ) {\n\t\t\t// Render when you stop blocking rendering.\n\t\t\tthis.change( () => {} );\n\t\t}\n\t}\n\n\t/**\n\t * Renders all changes. In order to avoid triggering the observers (e.g. selection) all observers are disabled\n\t * before rendering and re-enabled after that.\n\t */\n\tprivate _render(): void {\n\t\tthis.isRenderingInProgress = true;\n\t\tthis.disableObservers();\n\t\tthis._renderer.render();\n\t\tthis.enableObservers();\n\t\tthis.isRenderingInProgress = false;\n\t}\n}\n\n/**\n * Fired after a topmost {@link module:engine/view/view~EditingView#change change block} and all\n * {@link module:engine/view/document~ViewDocument#registerPostFixer post-fixers} are executed.\n *\n * Actual rendering is performed as a first listener on 'normal' priority.\n *\n * ```ts\n * view.on( 'render', () => {\n * \t// Rendering to the DOM is complete.\n * } );\n * ```\n *\n * This event is useful when you want to update interface elements after the rendering, e.g. position of the\n * balloon panel. If you wants to change view structure use\n * {@link module:engine/view/document~ViewDocument#registerPostFixer post-fixers}.\n *\n * @eventName ~EditingView#render\n */\nexport type ViewRenderEvent = {\n\tname: 'render';\n\targs: [];\n};\n\n/**\n * An event fired at the moment of {@link module:engine/view/view~EditingView#scrollToTheSelection} being called. It\n * carries two objects in its payload (`args`):\n *\n * * The first argument is the {@link module:engine/view/view~ViewScrollToTheSelectionEventData object containing data} that gets\n *   passed down to the {@link module:utils/dom/scroll~scrollViewportToShowTarget} helper. If some event listener modifies it, it can\n *   adjust the behavior of the scrolling (e.g. include additional `viewportOffset`).\n * * The second argument corresponds to the original arguments passed to {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n *   It allows listeners to re-execute the `scrollViewportToShowTarget()` method with its original arguments if there is such a need,\n *   for instance, if the integration requires re–scrolling after certain interaction.\n *\n * @eventName ~EditingView#scrollToTheSelection\n */\nexport type ViewScrollToTheSelectionEvent = {\n\tname: 'scrollToTheSelection';\n\targs: [\n\t\tViewScrollToTheSelectionEventData,\n\t\tParameters<EditingView[ 'scrollToTheSelection' ]>[ 0 ]\n\t];\n};\n\n/**\n * An object passed down to the {@link module:utils/dom/scroll~scrollViewportToShowTarget} helper while calling\n * {@link module:engine/view/view~EditingView#scrollToTheSelection}.\n */\nexport type ViewScrollToTheSelectionEventData = {\n\ttarget: DomRange;\n\tviewportOffset: { top: number; bottom: number; left: number; right: number };\n\tancestorOffset: number;\n\talignToTop?: boolean;\n\tforceScroll?: boolean;\n};\n\n/**\n * Observers that are always registered.\n */\nexport type AlwaysRegisteredViewObservers =\n\t| typeof MutationObserver\n\t| typeof FocusObserver\n\t| typeof SelectionObserver\n\t| typeof KeyObserver\n\t| typeof FakeSelectionObserver\n\t| typeof CompositionObserver\n\t| typeof ArrowKeysObserver\n\t| typeof InputObserver\n\t| typeof TabObserver;\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/**\n * @module engine/model/typecheckable\n */\n\nimport type { Marker } from './markercollection.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelDocumentSelection } from './documentselection.js';\nimport { type ModelElement } from './element.js';\nimport { type ModelLivePosition } from './liveposition.js';\nimport { type ModelLiveRange } from './liverange.js';\nimport { type ModelNode } from './node.js';\nimport { type ModelPosition } from './position.js';\nimport { type ModelRange } from './range.js';\nimport { type ModelRootElement } from './rootelement.js';\nimport { type ModelSelection } from './selection.js';\nimport { type ModelText } from './text.js';\nimport { type ModelTextProxy } from './textproxy.js';\n\nexport abstract class ModelTypeCheckable {\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/node~ModelNode} or its subclass.\n\t *\n\t * This method is useful when processing model objects that are of unknown type. For example, a function\n\t * may return a {@link module:engine/model/documentfragment~ModelDocumentFragment} or a {@link module:engine/model/node~ModelNode}\n\t * that can be either a text node or an element. This method can be used to check what kind of object is returned.\n\t *\n\t * ```ts\n\t * someObject.is( 'element' ); // -> true if this is an element\n\t * someObject.is( 'node' ); // -> true if this is a node (a text node or an element)\n\t * someObject.is( 'documentFragment' ); // -> true if this is a document fragment\n\t * ```\n\t *\n\t * Since this method is also available on a range of view objects, you can prefix the type of the object with\n\t * `model:` or `view:` to check, for example, if this is the model's or view's element:\n\t *\n\t * ```ts\n\t * modelElement.is( 'model:element' ); // -> true\n\t * modelElement.is( 'view:element' ); // -> false\n\t * ```\n\t *\n\t * By using this method it is also possible to check a name of an element:\n\t *\n\t * ```ts\n\t * imageElement.is( 'element', 'imageBlock' ); // -> true\n\t * imageElement.is( 'element', 'imageBlock' ); // -> same as above\n\t * imageElement.is( 'model:element', 'imageBlock' ); // -> same as above, but more precise\n\t * ```\n\t *\n\t * @label NODE\n\t */\n\tpublic is( type: 'node' | 'model:node' ): this is ModelNode | ModelElement | ModelText | ModelRootElement;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/element~ModelElement} or its subclass.\n\t *\n\t * ```ts\n\t * element.is( 'element' ); // -> true\n\t * element.is( 'node' ); // -> true\n\t * element.is( 'model:element' ); // -> true\n\t * element.is( 'model:node' ); // -> true\n\t *\n\t * element.is( 'view:element' ); // -> false\n\t * element.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is an element, you can also check its\n\t * {@link module:engine/model/element~ModelElement#name name}:\n\t *\n\t * ```ts\n\t * element.is( 'element', 'imageBlock' ); // -> true if this is an <imageBlock> element\n\t * text.is( 'element', 'imageBlock' ); -> false\n\t * ```\n\t *\n\t * @label ELEMENT\n\t */\n\tpublic is( type: 'element' | 'model:element' ): this is ModelElement | ModelRootElement;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/rootelement~ModelRootElement}.\n\t *\n\t * ```ts\n\t * rootElement.is( 'rootElement' ); // -> true\n\t * rootElement.is( 'element' ); // -> true\n\t * rootElement.is( 'node' ); // -> true\n\t * rootElement.is( 'model:rootElement' ); // -> true\n\t * rootElement.is( 'model:element' ); // -> true\n\t * rootElement.is( 'model:node' ); // -> true\n\t *\n\t * rootElement.is( 'view:element' ); // -> false\n\t * rootElement.is( 'documentFragment' ); // -> false\n\t * ```\n\t *\n\t * Assuming that the object being checked is an element, you can also check its\n\t * {@link module:engine/model/element~ModelElement#name name}:\n\t *\n\t * ```ts\n\t * rootElement.is( 'rootElement', '$root' ); // -> same as above\n\t * ```\n\t *\n\t * @label ROOT_ELEMENT\n\t */\n\tpublic is( type: 'rootElement' | 'model:rootElement' ): this is ModelRootElement;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/text~ModelText}.\n\t *\n\t * ```ts\n\t * text.is( '$text' ); // -> true\n\t * text.is( 'node' ); // -> true\n\t * text.is( 'model:$text' ); // -> true\n\t * text.is( 'model:node' ); // -> true\n\t *\n\t * text.is( 'view:$text' ); // -> false\n\t * text.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * **Note:** Until version 20.0.0 this method wasn't accepting `'$text'` type. The legacy `'text'` type is still\n\t * accepted for backward compatibility.\n\t *\n\t * @label TEXT\n\t */\n\tpublic is( type: '$text' | 'model:$text' ): this is ModelText;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/position~ModelPosition} or its subclass.\n\t *\n\t * ```ts\n\t * position.is( 'position' ); // -> true\n\t * position.is( 'model:position' ); // -> true\n\t *\n\t * position.is( 'view:position' ); // -> false\n\t * position.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * @label POSITION\n\t */\n\tpublic is( type: 'position' | 'model:position' ): this is ModelPosition | ModelLivePosition;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/liveposition~ModelLivePosition}.\n\t *\n\t * ```ts\n\t * livePosition.is( 'position' ); // -> true\n\t * livePosition.is( 'model:position' ); // -> true\n\t * livePosition.is( 'liveposition' ); // -> true\n\t * livePosition.is( 'model:livePosition' ); // -> true\n\t *\n\t * livePosition.is( 'view:position' ); // -> false\n\t * livePosition.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * @label LIVE_POSITION\n\t */\n\tpublic is( type: 'livePosition' | 'model:livePosition' ): this is ModelLivePosition;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/range~ModelRange} or its subclass.\n\t *\n\t * ```ts\n\t * range.is( 'range' ); // -> true\n\t * range.is( 'model:range' ); // -> true\n\t *\n\t * range.is( 'view:range' ); // -> false\n\t * range.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * @label RANGE\n\t */\n\tpublic is( type: 'range' | 'model:range' ): this is ModelRange | ModelLiveRange;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/liverange~ModelLiveRange}.\n\t *\n\t * ```ts\n\t * liveRange.is( 'range' ); // -> true\n\t * liveRange.is( 'model:range' ); // -> true\n\t * liveRange.is( 'liveRange' ); // -> true\n\t * liveRange.is( 'model:liveRange' ); // -> true\n\t *\n\t * liveRange.is( 'view:range' ); // -> false\n\t * liveRange.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * @label LIVE_RANGE\n\t */\n\tpublic is( type: 'liveRange' | 'model:liveRange' ): this is ModelLiveRange;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/documentfragment~ModelDocumentFragment}.\n\t *\n\t * ```ts\n\t * docFrag.is( 'documentFragment' ); // -> true\n\t * docFrag.is( 'model:documentFragment' ); // -> true\n\t *\n\t * docFrag.is( 'view:documentFragment' ); // -> false\n\t * docFrag.is( 'element' ); // -> false\n\t * docFrag.is( 'node' ); // -> false\n\t * ```\n\t *\n\t * @label DOCUMENT_FRAGMENT\n\t */\n\tpublic is( type: 'documentFragment' | 'model:documentFragment' ): this is ModelDocumentFragment;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/selection~ModelSelection}\n\t * or {@link module:engine/model/documentselection~ModelDocumentSelection}.\n\t *\n\t * ```ts\n\t * selection.is( 'selection' ); // -> true\n\t * selection.is( 'model:selection' ); // -> true\n\t *\n\t * selection.is( 'view:selection' ); // -> false\n\t * selection.is( 'range' ); // -> false\n\t * ```\n\t *\n\t * @label SELECTION\n\t */\n\tpublic is( type: 'selection' | 'model:selection' ): this is ModelSelection | ModelDocumentSelection;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/documentselection~ModelDocumentSelection}.\n\t *\n\t * ```ts\n\t * selection.is( 'selection' ); // -> true\n\t * selection.is( 'documentSelection' ); // -> true\n\t * selection.is( 'model:selection' ); // -> true\n\t * selection.is( 'model:documentSelection' ); // -> true\n\t *\n\t * selection.is( 'view:selection' ); // -> false\n\t * selection.is( 'element' ); // -> false\n\t * selection.is( 'node' ); // -> false\n\t * ```\n\t *\n\t * @label DOCUMENT_SELECTION\n\t */\n\tpublic is( type: 'documentSelection' | 'model:documentSelection' ): this is ModelDocumentSelection;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/markercollection~Marker}.\n\t *\n\t * ```ts\n\t * marker.is( 'marker' ); // -> true\n\t * marker.is( 'model:marker' ); // -> true\n\t *\n\t * marker.is( 'view:element' ); // -> false\n\t * marker.is( 'documentSelection' ); // -> false\n\t * ```\n\t *\n\t * @label MARKER\n\t */\n\tpublic is( type: 'marker' | 'model:marker' ): this is Marker;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/textproxy~ModelTextProxy}.\n\t *\n\t * ```ts\n\t * textProxy.is( '$textProxy' ); // -> true\n\t * textProxy.is( 'model:$textProxy' ); // -> true\n\t *\n\t * textProxy.is( 'view:$textProxy' ); // -> false\n\t * textProxy.is( 'range' ); // -> false\n\t * ```\n\t *\n\t * **Note:** Until version 20.0.0 this method wasn't accepting `'$textProxy'` type. The legacy `'textProxt'` type is still\n\t * accepted for backward compatibility.\n\t *\n\t * @label TEXT_PROXY\n\t */\n\tpublic is( type: '$textProxy' | 'model:$textProxy' ): this is ModelTextProxy;\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/element~ModelElement} or its subclass and has the specified `name`.\n\t *\n\t * ```ts\n\t * element.is( 'element', 'imageBlock' ); // -> true if this is an <imageBlock> element\n\t * text.is( 'element', 'imageBlock' ); -> false\n\t * ```\n\t *\n\t * @label ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'element' | 'model:element', name: N ): this is ( ModelElement | ModelRootElement ) & { name: N };\n\n\t/**\n\t * Checks whether the object is of type {@link module:engine/model/rootelement~ModelRootElement} and has the specified `name`.\n\t *\n\t * ```ts\n\t * rootElement.is( 'rootElement', '$root' );\n\t * ```\n\t *\n\t * @label ROOT_ELEMENT_NAME\n\t */\n\tpublic is<N extends string>( type: 'rootElement' | 'model:rootElement', name: N ): this is ModelRootElement & { name: N };\n\n\t/* v8 ignore next -- @preserve */\n\tpublic is(): boolean {\n\t\t// There are a lot of overloads above.\n\t\t// Overriding method in derived classes remove them and only `is( type: string ): boolean` is visible which we don't want.\n\t\t// One option would be to copy them all to all classes, but that's ugly.\n\t\t// It's best when TypeScript compiler doesn't see those overloads, except the one in the top base class.\n\t\t// To overload a method, but not let the compiler see it, do after class definition:\n\t\t// `MyClass.prototype.is = function( type: string ) {...}`\n\t\tthrow new Error( 'is() method is abstract' );\n\t}\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/**\n * @module engine/model/textproxy\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelElement } from './element.js';\nimport { type ModelNode } from './node.js';\nimport { type ModelText } from './text.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\n// @if CK_DEBUG_ENGINE // import { convertMapToStringifiedObject } from '../dev-utils/utils.js';\n\n/**\n * `ModelTextProxy` represents a part of {@link module:engine/model/text~ModelText text node}.\n *\n * Since {@link module:engine/model/position~ModelPosition positions} can be placed between characters of a text node,\n * {@link module:engine/model/range~ModelRange ranges} may contain only parts of text nodes.\n * When {@link module:engine/model/range~ModelRange#getItems getting items}\n * contained in such range, we need to represent a part of that text node, since returning the whole text node would be incorrect.\n * `ModelTextProxy` solves this issue.\n *\n * `ModelTextProxy` has an API similar to {@link module:engine/model/text~ModelText Text} and allows to do\n * most of the common tasks performed on model nodes.\n *\n * **Note:** Some `ModelTextProxy` instances may represent whole text node, not just a part of it.\n * See {@link module:engine/model/textproxy~ModelTextProxy#isPartial}.\n *\n * **Note:** `ModelTextProxy` is not an instance of {@link module:engine/model/node~ModelNode node}. Keep this in mind when using it as a\n * parameter of methods.\n *\n * **Note:** `ModelTextProxy` is a readonly interface. If you want to perform changes on model data represented by a `ModelTextProxy`\n * use {@link module:engine/model/writer~ModelWriter model writer API}.\n *\n * **Note:** `ModelTextProxy` instances are created on the fly, basing on the current state of model. Because of this, it is\n * highly unrecommended to store references to `ModelTextProxy` instances. `ModelTextProxy` instances are not refreshed when\n * model changes, so they might get invalidated. Instead, consider creating {@link module:engine/model/liveposition~ModelLivePosition live\n * position}.\n *\n * `ModelTextProxy` instances are created by {@link module:engine/model/treewalker~ModelTreeWalker model tree walker}.\n * You should not need to create an instance of this class by your own.\n */\nexport class ModelTextProxy extends ModelTypeCheckable {\n\t/**\n\t * Text node which part is represented by this text proxy.\n\t */\n\tpublic readonly textNode: ModelText;\n\n\t/**\n\t * Text data represented by this text proxy.\n\t */\n\tpublic readonly data: string;\n\n\t/**\n\t * Offset in {@link module:engine/model/textproxy~ModelTextProxy#textNode text node} from which the text proxy starts.\n\t */\n\tpublic readonly offsetInText: number;\n\n\t/**\n\t * Creates a text proxy.\n\t *\n\t * @internal\n\t * @param textNode Text node which part is represented by this text proxy.\n\t * @param offsetInText Offset in {@link module:engine/model/textproxy~ModelTextProxy#textNode text node} from which the text proxy\n\t * starts.\n\t * @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t */\n\tconstructor( textNode: ModelText, offsetInText: number, length: number ) {\n\t\tsuper();\n\n\t\tthis.textNode = textNode;\n\n\t\tif ( offsetInText < 0 || offsetInText > textNode.offsetSize ) {\n\t\t\t/**\n\t\t\t * Given `offsetInText` value is incorrect.\n\t\t\t *\n\t\t\t * @error model-textproxy-wrong-offsetintext\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-textproxy-wrong-offsetintext', this );\n\t\t}\n\n\t\tif ( length < 0 || offsetInText + length > textNode.offsetSize ) {\n\t\t\t/**\n\t\t\t * Given `length` value is incorrect.\n\t\t\t *\n\t\t\t * @error model-textproxy-wrong-length\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-textproxy-wrong-length', this );\n\t\t}\n\t\tthis.data = textNode.data.substring( offsetInText, offsetInText + length );\n\n\t\tthis.offsetInText = offsetInText;\n\t}\n\n\t/**\n\t * Offset at which this text proxy starts in it's parent.\n\t *\n\t * @see module:engine/model/node~ModelNode#startOffset\n\t */\n\tpublic get startOffset(): number | null {\n\t\treturn this.textNode.startOffset !== null ? this.textNode.startOffset + this.offsetInText : null;\n\t}\n\n\t/**\n\t * Offset size of this text proxy. Equal to the number of characters represented by the text proxy.\n\t *\n\t * @see module:engine/model/node~ModelNode#offsetSize\n\t */\n\tpublic get offsetSize(): number {\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Offset at which this text proxy ends in it's parent.\n\t *\n\t * @see module:engine/model/node~ModelNode#endOffset\n\t */\n\tpublic get endOffset(): number | null {\n\t\treturn this.startOffset !== null ? this.startOffset + this.offsetSize : null;\n\t}\n\n\t/**\n\t * Flag indicating whether `ModelTextProxy` instance covers only part of the original\n\t * {@link module:engine/model/text~ModelText text node} (`true`) or the whole text node (`false`).\n\t *\n\t * This is `false` when text proxy starts at the very beginning of\n\t * {@link module:engine/model/textproxy~ModelTextProxy#textNode textNode}\n\t * ({@link module:engine/model/textproxy~ModelTextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t * text node size.\n\t */\n\tpublic get isPartial(): boolean {\n\t\treturn this.offsetSize !== this.textNode.offsetSize;\n\t}\n\n\t/**\n\t * Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t */\n\tpublic get parent(): ModelElement | ModelDocumentFragment | null {\n\t\treturn this.textNode.parent;\n\t}\n\n\t/**\n\t * Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t */\n\tpublic get root(): ModelNode | ModelDocumentFragment {\n\t\treturn this.textNode.root;\n\t}\n\n\t/**\n\t * Gets path to this text proxy.\n\t *\n\t * @see module:engine/model/node~ModelNode#getPath\n\t */\n\tpublic getPath(): Array<number> {\n\t\tconst path = this.textNode.getPath();\n\n\t\tif ( path.length > 0 ) {\n\t\t\tpath[ path.length - 1 ] += this.offsetInText;\n\t\t}\n\n\t\treturn path;\n\t}\n\n\t/**\n\t * Returns ancestors array of this text proxy.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this text proxy will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from text proxy parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */\n\tpublic getAncestors( options: {\n\t\tincludeSelf?: boolean;\n\t\tparentFirst?: boolean;\n\t} = {} ): Array<ModelTextProxy | ModelElement | ModelDocumentFragment> {\n\t\tconst ancestors: Array<ModelTextProxy | ModelElement | ModelDocumentFragment> = [];\n\t\tlet parent: ModelTextProxy | ModelElement | ModelDocumentFragment | null = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t/**\n\t * Checks if this text proxy has an attribute for given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on text proxy, `false` otherwise.\n\t */\n\tpublic hasAttribute( key: string ): boolean {\n\t\treturn this.textNode.hasAttribute( key );\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on text proxy.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */\n\tpublic getAttribute( key: string ): unknown {\n\t\treturn this.textNode.getAttribute( key );\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attributes. Attributes are returned as arrays containing two\n\t * items. First one is attribute key and second is attribute value.\n\t *\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */\n\tpublic getAttributes(): IterableIterator<[ string, unknown ]> {\n\t\treturn this.textNode.getAttributes();\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attribute keys.\n\t */\n\tpublic getAttributeKeys(): IterableIterator<string> {\n\t\treturn this.textNode.getAttributeKeys();\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelTextProxy: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logExtended(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( `ModelTextProxy: ${ this }, ` +\n\t// @if CK_DEBUG_ENGINE // \t\t`attrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelTextProxy.prototype.is = function( type: string ): boolean {\n\treturn type === '$textProxy' || type === 'model:$textProxy' ||\n\t\t// This are legacy values kept for backward compatibility.\n\t\ttype === 'textProxy' || type === 'model:textProxy';\n} as any;\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/**\n * @module engine/model/treewalker\n */\n\nimport { type ModelElement } from './element.js';\nimport {\n\tModelPosition,\n\tgetTextNodeAtPosition,\n\tgetNodeAfterPosition,\n\tgetNodeBeforePosition\n} from './position.js';\nimport { ModelTextProxy } from './textproxy.js';\n\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelItem } from './item.js';\nimport { type ModelRange } from './range.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */\nexport class ModelTreeWalker implements Iterable<ModelTreeWalkerValue> {\n\t/**\n\t * Walking direction. Defaults `'forward'`.\n\t */\n\tpublic readonly direction: ModelTreeWalkerDirection;\n\n\t/**\n\t * Iterator boundaries.\n\t *\n\t * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t * on the start of boundary, then `{ done: true }` is returned.\n\t *\n\t * If boundaries are not defined they are set before first and after last child of the root node.\n\t */\n\tpublic readonly boundaries: ModelRange | null;\n\n\t/**\n\t * Flag indicating whether all consecutive characters with the same attributes should be\n\t * returned as one {@link module:engine/model/textproxy~ModelTextProxy} (`true`) or one by one (`false`).\n\t */\n\tpublic readonly singleCharacters: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t * iterated node will not be returned along with `elementEnd` tag.\n\t */\n\tpublic readonly shallow: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should ignore `elementEnd` tags. If the option is true walker will not\n\t * return a parent node of the start position. If this option is `true` each {@link module:engine/model/element~ModelElement} will\n\t * be returned once, while if the option is `false` they might be returned twice:\n\t * for `'elementStart'` and `'elementEnd'`.\n\t */\n\tpublic readonly ignoreElementEnd: boolean;\n\n\t/**\n\t * Iterator position. This is always static position, even if the initial position was a\n\t * {@link module:engine/model/liveposition~ModelLivePosition live position}. If start position is not defined then position depends\n\t * on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t * is `'backward'` position starts from the end.\n\t */\n\tprivate _position: ModelPosition;\n\n\t/**\n\t * Start boundary cached for optimization purposes.\n\t */\n\tprivate _boundaryStartParent: ModelElement | ModelDocumentFragment | null;\n\n\t/**\n\t * End boundary cached for optimization purposes.\n\t */\n\tprivate _boundaryEndParent: ModelElement | ModelDocumentFragment | null;\n\n\t/**\n\t * Parent of the most recently visited node. Cached for optimization purposes.\n\t */\n\tprivate _visitedParent: ModelElement | ModelDocumentFragment;\n\n\t/**\n\t * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t *\n\t * @param options Object with configuration.\n\t */\n\tconstructor( options: ModelTreeWalkerOptions ) {\n\t\tif ( !options || ( !options.boundaries && !options.startPosition ) ) {\n\t\t\t/**\n\t\t\t * Neither boundaries nor starting position of a `TreeWalker` have been defined.\n\t\t\t *\n\t\t\t * @error model-tree-walker-no-start-position\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-tree-walker-no-start-position',\n\t\t\t\tnull\n\t\t\t);\n\t\t}\n\n\t\tconst direction = options.direction || 'forward';\n\n\t\tif ( direction != 'forward' && direction != 'backward' ) {\n\t\t\t/**\n\t\t\t * Only `backward` and `forward` direction allowed.\n\t\t\t *\n\t\t\t * @error model-tree-walker-unknown-direction\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-tree-walker-unknown-direction', options, { direction } );\n\t\t}\n\n\t\tthis.direction = direction;\n\t\tthis.boundaries = options.boundaries || null;\n\n\t\tif ( options.startPosition ) {\n\t\t\tthis._position = options.startPosition.clone();\n\t\t} else {\n\t\t\tthis._position = ModelPosition._createAt( this.boundaries![ this.direction == 'backward' ? 'end' : 'start' ] );\n\t\t}\n\n\t\t// Reset position stickiness in case it was set to other value, as the stickiness is kept after cloning.\n\t\tthis.position.stickiness = 'toNone';\n\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\t\tthis.shallow = !!options.shallow;\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\t\tthis._visitedParent = this.position.parent;\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * @returns {Iterable.<module:engine/model/treewalker~ModelTreeWalkerValue>}\n\t */\n\tpublic [ Symbol.iterator ](): IterableIterator<ModelTreeWalkerValue> {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Iterator position. This is always static position, even if the initial position was a\n\t * {@link module:engine/model/liveposition~ModelLivePosition live position}. If start position is not defined then position depends\n\t * on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t * is `'backward'` position starts from the end.\n\t */\n\tpublic get position(): ModelPosition {\n\t\treturn this._position;\n\t}\n\n\t/**\n\t * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * walker.skip( value => value.type == 'text' ); // <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t * walker.skip( () => true ); // Move the position to the end: <paragraph>[]foo</paragraph> -> <paragraph>foo</paragraph>[]\n\t * walker.skip( () => false ); // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/model/treewalker~ModelTreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t */\n\tpublic skip( skip: ( value: ModelTreeWalkerValue ) => boolean ): void {\n\t\tlet done, value, prevPosition, prevVisitedParent;\n\n\t\tdo {\n\t\t\tprevPosition = this.position;\n\t\t\tprevVisitedParent = this._visitedParent;\n\n\t\t\t( { done, value } = this.next() );\n\t\t} while ( !done && skip( value ) );\n\n\t\tif ( !done ) {\n\t\t\tthis._position = prevPosition;\n\t\t\tthis._visitedParent = prevVisitedParent;\n\t\t}\n\t}\n\n\t/**\n\t * Moves tree walker {@link #position} to provided `position`. Tree walker will\n\t * continue traversing from that position.\n\t *\n\t * Note: in contrary to {@link ~ModelTreeWalker#skip}, this method does not iterate over the nodes along the way.\n\t * It simply sets the current tree walker position to a new one.\n\t * From the performance standpoint, it is better to use {@link ~ModelTreeWalker#jumpTo} rather than {@link ~ModelTreeWalker#skip}.\n\t *\n\t * If the provided position is before the start boundary, the position will be\n\t * set to the start boundary. If the provided position is after the end boundary,\n\t * the position will be set to the end boundary.\n\t * This is done to prevent the treewalker from traversing outside the boundaries.\n\t *\n\t * @param position Position to jump to.\n\t */\n\tpublic jumpTo( position: ModelPosition ): void {\n\t\tif ( this._boundaryStartParent && position.isBefore( this.boundaries!.start ) ) {\n\t\t\tposition = this.boundaries!.start;\n\t\t} else if ( this._boundaryEndParent && position.isAfter( this.boundaries!.end ) ) {\n\t\t\tposition = this.boundaries!.end;\n\t\t}\n\n\t\tthis._position = position.clone();\n\t\tthis._visitedParent = position.parent;\n\t}\n\n\t/**\n\t * Gets the next tree walker's value.\n\t */\n\tpublic next(): IteratorResult<ModelTreeWalkerValue> {\n\t\tif ( this.direction == 'forward' ) {\n\t\t\treturn this._next();\n\t\t} else {\n\t\t\treturn this._previous();\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step forward in model. Moves the {@link #position} to the next position and returns the encountered value.\n\t */\n\tprivate _next(): IteratorResult<ModelTreeWalkerValue> {\n\t\tconst previousPosition = this.position;\n\t\tconst position = this.position.clone();\n\t\tconst parent = this._visitedParent;\n\n\t\t// We are at the end of the root.\n\t\tif ( parent.parent === null && position.offset === parent.maxOffset ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent === this._boundaryEndParent && position.offset == this.boundaries!.end.offset ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// Get node just after the current position.\n\t\t// Use a highly optimized version instead of checking the text node first and then getting the node after.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/6582.\n\t\tconst textNodeAtPosition = getTextNodeAtPosition( position, parent );\n\t\tconst node = textNodeAtPosition || getNodeAfterPosition( position, parent, textNodeAtPosition );\n\n\t\tif ( node && node.is( 'model:element' ) ) {\n\t\t\tif ( !this.shallow ) {\n\t\t\t\t// Manual operations on path internals for optimization purposes. Here and in the rest of the method.\n\t\t\t\t( position.path as Array<number> ).push( 0 );\n\t\t\t\tthis._visitedParent = node;\n\t\t\t} else {\n\t\t\t\t// We are past the walker boundaries.\n\t\t\t\tif ( this.boundaries && this.boundaries.end.isBefore( position ) ) {\n\t\t\t\t\treturn { done: true, value: undefined };\n\t\t\t\t}\n\n\t\t\t\tposition.offset++;\n\t\t\t}\n\n\t\t\tthis._position = position;\n\n\t\t\treturn formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t}\n\n\t\tif ( node && node.is( 'model:$text' ) ) {\n\t\t\tlet charactersCount;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tcharactersCount = 1;\n\t\t\t} else {\n\t\t\t\tlet offset = node.endOffset!;\n\n\t\t\t\tif ( this._boundaryEndParent == parent && this.boundaries!.end.offset < offset ) {\n\t\t\t\t\toffset = this.boundaries!.end.offset;\n\t\t\t\t}\n\n\t\t\t\tcharactersCount = offset - position.offset;\n\t\t\t}\n\n\t\t\tconst offsetInTextNode = position.offset - node.startOffset!;\n\t\t\tconst item = new ModelTextProxy( node, offsetInTextNode, charactersCount );\n\n\t\t\tposition.offset += charactersCount;\n\t\t\tthis._position = position;\n\n\t\t\treturn formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t}\n\n\t\t// `node` is not set, we reached the end of current `parent`.\n\t\t( position.path as Array<number> ).pop();\n\t\tposition.offset++;\n\t\tthis._position = position;\n\t\tthis._visitedParent = parent.parent!;\n\n\t\tif ( this.ignoreElementEnd ) {\n\t\t\treturn this._next();\n\t\t}\n\n\t\treturn formatReturnValue( 'elementEnd', parent as ModelElement, previousPosition, position );\n\t}\n\n\t/**\n\t * Makes a step backward in model. Moves the {@link #position} to the previous position and returns the encountered value.\n\t */\n\tprivate _previous(): IteratorResult<ModelTreeWalkerValue> {\n\t\tconst previousPosition = this.position;\n\t\tconst position = this.position.clone();\n\t\tconst parent = this._visitedParent;\n\n\t\t// We are at the beginning of the root.\n\t\tif ( parent.parent === null && position.offset === 0 ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent == this._boundaryStartParent && position.offset == this.boundaries!.start.offset ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// Get node just before the current position.\n\t\t// Use a highly optimized version instead of checking the text node first and then getting the node before.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/6582.\n\t\tconst positionParent = position.parent;\n\t\tconst textNodeAtPosition = getTextNodeAtPosition( position, positionParent );\n\t\tconst node = textNodeAtPosition || getNodeBeforePosition( position, positionParent, textNodeAtPosition );\n\n\t\tif ( node && node.is( 'model:element' ) ) {\n\t\t\tposition.offset--;\n\n\t\t\tif ( this.shallow ) {\n\t\t\t\tthis._position = position;\n\n\t\t\t\treturn formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t\t}\n\n\t\t\t( position.path as Array<number> ).push( node.maxOffset );\n\t\t\tthis._position = position;\n\t\t\tthis._visitedParent = node;\n\n\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\treturn this._previous();\n\t\t\t}\n\n\t\t\treturn formatReturnValue( 'elementEnd', node, previousPosition, position );\n\t\t}\n\n\t\tif ( node && node.is( 'model:$text' ) ) {\n\t\t\tlet charactersCount;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tcharactersCount = 1;\n\t\t\t} else {\n\t\t\t\tlet offset = node.startOffset!;\n\n\t\t\t\tif ( this._boundaryStartParent == parent && this.boundaries!.start.offset > offset ) {\n\t\t\t\t\toffset = this.boundaries!.start.offset;\n\t\t\t\t}\n\n\t\t\t\tcharactersCount = position.offset - offset;\n\t\t\t}\n\n\t\t\tconst offsetInTextNode = position.offset - node.startOffset!;\n\t\t\tconst item = new ModelTextProxy( node, offsetInTextNode - charactersCount, charactersCount );\n\n\t\t\tposition.offset -= charactersCount;\n\t\t\tthis._position = position;\n\n\t\t\treturn formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t}\n\n\t\t// `node` is not set, we reached the beginning of current `parent`.\n\t\t( position.path as Array<number> ).pop();\n\t\tthis._position = position;\n\t\tthis._visitedParent = parent.parent!;\n\n\t\treturn formatReturnValue( 'elementStart', parent as ModelElement, previousPosition, position, 1 );\n\t}\n}\n\nfunction formatReturnValue(\n\ttype: ModelTreeWalkerValueType,\n\titem: ModelItem,\n\tpreviousPosition: ModelPosition,\n\tnextPosition: ModelPosition,\n\tlength?: number\n): IteratorYieldResult<ModelTreeWalkerValue> {\n\treturn {\n\t\tdone: false,\n\t\tvalue: {\n\t\t\ttype,\n\t\t\titem,\n\t\t\tpreviousPosition,\n\t\t\tnextPosition,\n\t\t\tlength\n\t\t}\n\t};\n}\n\n/**\n * Type of the step made by {@link module:engine/model/treewalker~ModelTreeWalker}.\n * Possible values: `'elementStart'` if walker is at the beginning of a node, `'elementEnd'` if walker is at the end of node,\n * or `'text'` if walker traversed over text.\n */\nexport type ModelTreeWalkerValueType = 'elementStart' | 'elementEnd' | 'text';\n\n/**\n * Object returned by {@link module:engine/model/treewalker~ModelTreeWalker} when traversing tree model.\n */\nexport interface ModelTreeWalkerValue {\n\ttype: ModelTreeWalkerValueType;\n\n\t/**\n\t * Item between old and new positions of {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t */\n\titem: ModelItem;\n\n\t/**\n\t * Previous position of the iterator.\n\t * * Forward iteration: For `'elementEnd'` it is the last position inside the element. For all other types it is the\n\t * position before the item.\n\t * * Backward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n\t * the position after item.\n\t */\n\tpreviousPosition: ModelPosition;\n\n\t/**\n\t * Next position of the iterator.\n\t * * Forward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n\t * the position after the item.\n\t * * Backward iteration: For `'elementEnd'` it is last position inside element. For all other types it is the position\n\t * before the item.\n\t */\n\tnextPosition: ModelPosition;\n\n\t/**\n\t * Length of the item. For `'elementStart'` it is 1. For `'text'` it is the length of the text. For `'elementEnd'` it is `undefined`.\n\t */\n\tlength?: number;\n}\n\n/**\n * Tree walking direction.\n */\nexport type ModelTreeWalkerDirection = 'forward' | 'backward';\n\n/**\n * The configuration of TreeWalker.\n *\n * All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n */\nexport interface ModelTreeWalkerOptions {\n\n\t/**\n\t * Walking direction.\n\t *\n\t * @default 'forward'\n\t */\n\tdirection?: ModelTreeWalkerDirection;\n\n\t/**\n\t * Range to define boundaries of the iterator.\n\t */\n\tboundaries?: ModelRange | null;\n\n\t/**\n\t * Starting position.\n\t */\n\tstartPosition?: ModelPosition;\n\n\t/**\n\t * Flag indicating whether all consecutive characters with the same attributes\n\t * should be returned one by one as multiple {@link module:engine/model/textproxy~ModelTextProxy} (`true`) objects or as one\n\t * {@link module:engine/model/textproxy~ModelTextProxy} (`false`).\n\t */\n\tsingleCharacters?: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should enter elements or not. If the\n\t * iterator is shallow child nodes of any iterated node will not be returned along with `elementEnd` tag.\n\t */\n\tshallow?: boolean;\n\n\t/**\n\t * Flag indicating whether iterator should ignore `elementEnd` tags.\n\t * If the option is true walker will not return a parent node of start position. If this option is `true`\n\t * each {@link module:engine/model/element~ModelElement} will be returned once, while if the option is `false` they might be returned\n\t * twice: for `'elementStart'` and `'elementEnd'`.\n\t */\n\tignoreElementEnd?: boolean;\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/**\n * @module engine/model/position\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\nimport { ModelTreeWalker, type ModelTreeWalkerOptions, type ModelTreeWalkerValue } from './treewalker.js';\n\nimport { type ModelDocument } from './document.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelElement } from './element.js';\nimport { type DetachOperation } from './operation/detachoperation.js';\nimport { type InsertOperation } from './operation/insertoperation.js';\nimport { type ModelItem } from './item.js';\nimport { type MergeOperation } from './operation/mergeoperation.js';\nimport { type MoveOperation } from './operation/moveoperation.js';\nimport { type ModelNode } from './node.js';\nimport { type Operation } from './operation/operation.js';\nimport { type SplitOperation } from './operation/splitoperation.js';\nimport { type ModelText } from './text.js';\n\nimport { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Represents a position in the model tree.\n *\n * A position is represented by its {@link module:engine/model/position~ModelPosition#root} and\n * a {@link module:engine/model/position~ModelPosition#path} in that root.\n *\n * You can create position instances via its constructor or the `createPosition*()` factory methods of\n * {@link module:engine/model/model~Model} and {@link module:engine/model/writer~ModelWriter}.\n *\n * **Note:** Position is based on offsets, not indexes. This means that a position between two text nodes\n * `foo` and `bar` has offset `3`, not `1`. See {@link module:engine/model/position~ModelPosition#path} for more information.\n *\n * Since a position in the model is represented by a {@link module:engine/model/position~ModelPosition#root position root} and\n * {@link module:engine/model/position~ModelPosition#path position path} it is possible to create positions placed in non-existing places.\n * This requirement is important for operational transformation algorithms.\n *\n * Also, {@link module:engine/model/operation/operation~Operation operations}\n * kept in the {@link module:engine/model/document~ModelDocument#history document history}\n * are storing positions (and ranges) which were correct when those operations were applied, but may not be correct\n * after the document has changed.\n *\n * When changes are applied to the model, it may also happen that {@link module:engine/model/position~ModelPosition#parent position parent}\n * will change even if position path has not changed. Keep in mind, that if a position leads to non-existing element,\n * {@link module:engine/model/position~ModelPosition#parent} and some other properties and methods will throw errors.\n *\n * In most cases, position with wrong path is caused by an error in code, but it is sometimes needed, as described above.\n */\nexport class ModelPosition extends ModelTypeCheckable {\n\t/**\n\t * Root of the position path.\n\t */\n\tpublic readonly root: ModelElement | ModelDocumentFragment;\n\n\t/**\n\t * Position of the node in the tree. **Path contains offsets, not indexes.**\n\t *\n\t * Position can be placed before, after or in a {@link module:engine/model/node~ModelNode node} if that node has\n\t * {@link module:engine/model/node~ModelNode#offsetSize} greater than `1`. Items in position path are\n\t * {@link module:engine/model/node~ModelNode#startOffset starting offsets} of position ancestors, starting from direct root children,\n\t * down to the position offset in it's parent.\n\t *\n\t * ```\n\t * ROOT\n\t *  |- P            before: [ 0 ]         after: [ 1 ]\n\t *  |- UL           before: [ 1 ]         after: [ 2 ]\n\t *     |- LI        before: [ 1, 0 ]      after: [ 1, 1 ]\n\t *     |  |- foo    before: [ 1, 0, 0 ]   after: [ 1, 0, 3 ]\n\t *     |- LI        before: [ 1, 1 ]      after: [ 1, 2 ]\n\t *        |- bar    before: [ 1, 1, 0 ]   after: [ 1, 1, 3 ]\n\t * ```\n\t *\n\t * `foo` and `bar` are representing {@link module:engine/model/text~ModelText text nodes}. Since text nodes has offset size\n\t * greater than `1` you can place position offset between their start and end:\n\t *\n\t * ```\n\t * ROOT\n\t *  |- P\n\t *  |- UL\n\t *     |- LI\n\t *     |  |- f^o|o  ^ has path: [ 1, 0, 1 ]   | has path: [ 1, 0, 2 ]\n\t *     |- LI\n\t *        |- b^a|r  ^ has path: [ 1, 1, 1 ]   | has path: [ 1, 1, 2 ]\n\t * ```\n\t */\n\tpublic readonly path: ReadonlyArray<number>;\n\n\t/**\n\t * Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t */\n\tpublic stickiness: ModelPositionStickiness;\n\n\t/**\n\t * Creates a position.\n\t *\n\t * @param root Root of the position.\n\t * @param path Position path. See {@link module:engine/model/position~ModelPosition#path}.\n\t * @param stickiness Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t */\n\tconstructor(\n\t\troot: ModelElement | ModelDocumentFragment,\n\t\tpath: ReadonlyArray<number>,\n\t\tstickiness: ModelPositionStickiness = 'toNone'\n\t) {\n\t\tsuper();\n\n\t\tif ( !root.is( 'element' ) && !root.is( 'documentFragment' ) ) {\n\t\t\t/**\n\t\t\t * Position root is invalid.\n\t\t\t *\n\t\t\t * Positions can only be anchored in elements or document fragments.\n\t\t\t *\n\t\t\t * @error model-position-root-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-root-invalid',\n\t\t\t\troot\n\t\t\t);\n\t\t}\n\n\t\tif ( !Array.isArray( path ) || path.length === 0 ) {\n\t\t\t/**\n\t\t\t * Position path must be an array with at least one item.\n\t\t\t *\n\t\t\t * @error model-position-path-incorrect-format\n\t\t\t * @param {Array.<number>} path A path to the position.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-path-incorrect-format',\n\t\t\t\troot,\n\t\t\t\t{ path }\n\t\t\t);\n\t\t}\n\n\t\t// Normalize the root and path when element (not root) is passed.\n\t\tif ( root.is( 'rootElement' ) ) {\n\t\t\tpath = path.slice();\n\t\t} else {\n\t\t\tpath = [ ...root.getPath(), ...path ];\n\t\t\troot = root.root as any;\n\t\t}\n\n\t\tthis.root = root;\n\t\tthis.path = path;\n\t\tthis.stickiness = stickiness;\n\t}\n\n\t/**\n\t * Offset at which this position is located in its {@link module:engine/model/position~ModelPosition#parent parent}. It is equal\n\t * to the last item in position {@link module:engine/model/position~ModelPosition#path path}.\n\t *\n\t * @type {Number}\n\t */\n\tpublic get offset(): number {\n\t\treturn this.path[ this.path.length - 1 ];\n\t}\n\n\tpublic set offset( newOffset: number ) {\n\t\t( this.path as Array<number> )[ this.path.length - 1 ] = newOffset;\n\t}\n\n\t/**\n\t * Parent element of this position.\n\t *\n\t * Keep in mind that `parent` value is calculated when the property is accessed.\n\t * If {@link module:engine/model/position~ModelPosition#path position path}\n\t * leads to a non-existing element, `parent` property will throw error.\n\t *\n\t * Also it is a good idea to cache `parent` property if it is used frequently in an algorithm (i.e. in a long loop).\n\t */\n\tpublic get parent(): ModelElement | ModelDocumentFragment {\n\t\tlet parent: any = this.root;\n\n\t\tfor ( let i = 0; i < this.path.length - 1; i++ ) {\n\t\t\tparent = parent.getChildAtOffset( this.path[ i ] );\n\n\t\t\tif ( !parent ) {\n\t\t\t\t/**\n\t\t\t\t * The position's path is incorrect. This means that a position does not point to\n\t\t\t\t * a correct place in the tree and hence, some of its methods and getters cannot work correctly.\n\t\t\t\t *\n\t\t\t\t * **Note**: Unlike DOM and view positions, in the model, the\n\t\t\t\t * {@link module:engine/model/position~ModelPosition#parent position's parent} is always an element or a document fragment.\n\t\t\t\t * The last offset in the\n\t\t\t\t * {@link module:engine/model/position~ModelPosition#path position's path} is the point in this element\n\t\t\t\t * where this position points.\n\t\t\t\t *\n\t\t\t\t * Read more about model positions and offsets in\n\t\t\t\t * the {@glink framework/architecture/editing-engine#indexes-and-offsets Editing engine architecture} guide.\n\t\t\t\t *\n\t\t\t\t * @error model-position-path-incorrect\n\t\t\t\t * @param {module:engine/model/position~ModelPosition} position The incorrect position.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-position-path-incorrect', this, { position: this } );\n\t\t\t}\n\t\t}\n\n\t\tif ( parent.is( '$text' ) ) {\n\t\t\tthrow new CKEditorError( 'model-position-path-incorrect', this, { position: this } );\n\t\t}\n\n\t\treturn parent;\n\t}\n\n\t/**\n\t * Position {@link module:engine/model/position~ModelPosition#offset offset} converted to an index in position's parent node. It is\n\t * equal to the {@link module:engine/model/node~ModelNode#index index} of a node after this position. If position is placed\n\t * in text node, position index is equal to the index of that text node.\n\t */\n\tpublic get index(): number {\n\t\treturn this.parent.offsetToIndex( this.offset );\n\t}\n\n\t/**\n\t * Returns {@link module:engine/model/text~ModelText text node} instance in which this position is placed or `null` if this\n\t * position is not in a text node.\n\t */\n\tpublic get textNode(): ModelText | null {\n\t\treturn getTextNodeAtPosition( this, this.parent );\n\t}\n\n\t/**\n\t * Node directly after this position. Returns `null` if this position is at the end of its parent, or if it is in a text node.\n\t */\n\tpublic get nodeAfter(): ModelNode | null {\n\t\t// Cache the parent and reuse for performance reasons.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.\n\t\tconst parent = this.parent;\n\n\t\treturn getNodeAfterPosition( this, parent, getTextNodeAtPosition( this, parent ) );\n\t}\n\n\t/**\n\t * Node directly before this position. Returns `null` if this position is at the start of its parent, or if it is in a text node.\n\t */\n\tpublic get nodeBefore(): ModelNode | null {\n\t\t// Cache the parent and reuse for performance reasons.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.\n\t\tconst parent = this.parent;\n\n\t\treturn getNodeBeforePosition( this, parent, getTextNodeAtPosition( this, parent ) );\n\t}\n\n\t/**\n\t * Is `true` if position is at the beginning of its {@link module:engine/model/position~ModelPosition#parent parent}, `false` otherwise.\n\t */\n\tpublic get isAtStart(): boolean {\n\t\treturn this.offset === 0;\n\t}\n\n\t/**\n\t * Is `true` if position is at the end of its {@link module:engine/model/position~ModelPosition#parent parent}, `false` otherwise.\n\t */\n\tpublic get isAtEnd(): boolean {\n\t\treturn this.offset == this.parent.maxOffset;\n\t}\n\n\t/**\n\t * Checks whether the position is valid in current model tree, that is whether it points to an existing place in the model.\n\t */\n\tpublic isValid(): boolean {\n\t\tif ( this.offset < 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet parent: any = this.root;\n\n\t\tfor ( let i = 0; i < this.path.length - 1; i++ ) {\n\t\t\tparent = parent.getChildAtOffset( this.path[ i ] );\n\n\t\t\tif ( !parent ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn this.offset <= parent.maxOffset;\n\t}\n\n\t/**\n\t * Checks whether this position is before or after given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t */\n\tpublic compareWith( otherPosition: ModelPosition ): ModelPositionRelation {\n\t\tif ( this.root != otherPosition.root ) {\n\t\t\treturn 'different';\n\t\t}\n\n\t\tconst result = compareArrays( this.path, otherPosition.path );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'same':\n\t\t\t\treturn 'same';\n\n\t\t\tcase 'prefix':\n\t\t\t\treturn 'before';\n\n\t\t\tcase 'extension':\n\t\t\t\treturn 'after';\n\n\t\t\tdefault:\n\t\t\t\treturn this.path[ result ] < otherPosition.path[ result ] ? 'before' : 'after';\n\t\t}\n\t}\n\n\t/**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/model/treewalker~ModelTreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * getLastMatchingPosition( value => value.type == 'text' );\n\t * // <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t *\n\t * getLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } );\n\t * // <paragraph>foo[]</paragraph> -> <paragraph>[]foo</paragraph>\n\t *\n\t * getLastMatchingPosition( value => false );\n\t * // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/model/treewalker~ModelTreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t *\n\t * @returns The position after the last item which matches the `skip` callback test.\n\t */\n\tpublic getLastMatchingPosition(\n\t\tskip: ( value: ModelTreeWalkerValue ) => boolean,\n\t\toptions: ModelTreeWalkerOptions = {}\n\t): ModelPosition {\n\t\toptions.startPosition = this;\n\n\t\tconst treeWalker = new ModelTreeWalker( options );\n\t\ttreeWalker.skip( skip );\n\n\t\treturn treeWalker.position;\n\t}\n\n\t/**\n\t * Returns a path to this position's parent. Parent path is equal to position\n\t * {@link module:engine/model/position~ModelPosition#path path} but without the last item.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @returns Path to the parent.\n\t */\n\tpublic getParentPath(): Array<number> {\n\t\treturn this.path.slice( 0, -1 );\n\t}\n\n\t/**\n\t * Returns ancestors array of this position, that is this position's parent and its ancestors.\n\t *\n\t * @returns Array with ancestors.\n\t */\n\tpublic getAncestors(): Array<ModelElement | ModelDocumentFragment> {\n\t\tconst parent = this.parent;\n\n\t\tif ( parent.is( 'documentFragment' ) ) {\n\t\t\treturn [ parent ];\n\t\t} else {\n\t\t\treturn parent.getAncestors( { includeSelf: true } ) as any;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the parent element of the given name. Returns null if the position is not inside the desired parent.\n\t *\n\t * @param parentName The name of the parent element to find.\n\t */\n\tpublic findAncestor( parentName: string ): ModelElement | null {\n\t\tconst parent = this.parent;\n\n\t\tif ( parent.is( 'element' ) ) {\n\t\t\treturn parent.findAncestor( parentName, { includeSelf: true } );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns the slice of two position {@link #path paths} which is identical. The {@link #root roots}\n\t * of these two paths must be identical.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param position The second position.\n\t * @returns The common path.\n\t */\n\tpublic getCommonPath( position: ModelPosition ): Array<number> {\n\t\tif ( this.root != position.root ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// We find on which tree-level start and end have the lowest common ancestor\n\t\tconst cmp = compareArrays( this.path, position.path );\n\t\t// If comparison returned string it means that arrays are same.\n\t\tconst diffAt = ( typeof cmp == 'string' ) ? Math.min( this.path.length, position.path.length ) : cmp;\n\n\t\treturn this.path.slice( 0, diffAt );\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~ModelElement} or {@link module:engine/model/documentfragment~ModelDocumentFragment}\n\t * which is a common ancestor of both positions. The {@link #root roots} of these two positions must be identical.\n\t *\n\t * @param position The second position.\n\t */\n\tpublic getCommonAncestor( position: ModelPosition ): ModelElement | ModelDocumentFragment | null {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Returns a new instance of `Position`, that has same {@link #parent parent} but it's offset\n\t * is shifted by `shift` value (can be a negative value).\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param shift Offset shift. Can be a negative value.\n\t * @returns Shifted position.\n\t */\n\tpublic getShiftedBy( shift: number ): ModelPosition {\n\t\tconst shifted = this.clone();\n\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\treturn shifted;\n\t}\n\n\t/**\n\t * Checks whether this position is after given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @see module:engine/model/position~ModelPosition#isBefore\n\t * @param  otherPosition Position to compare with.\n\t * @returns True if this position is after given position.\n\t */\n\tpublic isAfter( otherPosition: ModelPosition ): boolean {\n\t\treturn this.compareWith( otherPosition ) == 'after';\n\t}\n\n\t/**\n\t * Checks whether this position is before given position.\n\t *\n\t * **Note:** watch out when using negation of the value returned by this method, because the negation will also\n\t * be `true` if positions are in different roots and you might not expect this. You should probably use\n\t * `a.isAfter( b ) || a.isEqual( b )` or `!a.isBefore( p ) && a.root == b.root` in most scenarios. If your\n\t * condition uses multiple `isAfter` and `isBefore` checks, build them so they do not use negated values, i.e.:\n\t *\n\t * ```ts\n\t * if ( a.isBefore( b ) && c.isAfter( d ) ) {\n\t * \t// do A.\n\t * } else {\n\t * \t// do B.\n\t * }\n\t * ```\n\t *\n\t * or, if you have only one if-branch:\n\t *\n\t * ```ts\n\t * if ( !( a.isBefore( b ) && c.isAfter( d ) ) {\n\t * \t// do B.\n\t * }\n\t * ```\n\t *\n\t * rather than:\n\t *\n\t * ```ts\n\t * if ( !a.isBefore( b ) || && !c.isAfter( d ) ) {\n\t * \t// do B.\n\t * } else {\n\t * \t// do A.\n\t * }\n\t * ```\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if this position is before given position.\n\t */\n\tpublic isBefore( otherPosition: ModelPosition ): boolean {\n\t\treturn this.compareWith( otherPosition ) == 'before';\n\t}\n\n\t/**\n\t * Checks whether this position is equal to given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if positions are same.\n\t */\n\tpublic isEqual( otherPosition: ModelPosition ): boolean {\n\t\treturn this.compareWith( otherPosition ) == 'same';\n\t}\n\n\t/**\n\t * Checks whether this position is touching given position. Positions touch when there are no text nodes\n\t * or empty nodes in a range between them. Technically, those positions are not equal but in many cases\n\t * they are very similar or even indistinguishable.\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if positions touch.\n\t */\n\tpublic isTouching( otherPosition: ModelPosition ): boolean {\n\t\tif ( this.root !== otherPosition.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst commonLevel = Math.min( this.path.length, otherPosition.path.length );\n\n\t\tfor ( let level = 0; level < commonLevel; level++ ) {\n\t\t\tconst diff = this.path[ level ] - otherPosition.path[ level ];\n\n\t\t\t// Positions are spread by a node, so they are not touching.\n\t\t\tif ( diff < -1 || diff > 1 ) {\n\t\t\t\treturn false;\n\t\t\t} else if ( diff === 1 ) {\n\t\t\t\t// `otherPosition` is on the left.\n\t\t\t\t// `this` is on the right.\n\t\t\t\treturn checkTouchingBranch( otherPosition, this, level );\n\t\t\t} else if ( diff === -1 ) {\n\t\t\t\t// `this` is on the left.\n\t\t\t\t// `otherPosition` is on the right.\n\t\t\t\treturn checkTouchingBranch( this, otherPosition, level );\n\t\t\t}\n\t\t\t// `diff === 0`.\n\t\t\t// Positions are inside the same element on this level, compare deeper.\n\t\t}\n\n\t\t// If we ended up here, it means that positions paths have the same beginning.\n\t\t// If the paths have the same length, then it means that they are identical, so the positions are same.\n\t\tif ( this.path.length === otherPosition.path.length ) {\n\t\t\treturn true;\n\t\t}\n\t\t// If positions have different length of paths, then the common part is the same.\n\t\t// In this case, the \"shorter\" position is on the left, the \"longer\" position is on the right.\n\t\t//\n\t\t// If the positions are touching, the \"longer\" position must have only zeroes. For example:\n\t\t// [ 1, 2 ] vs [ 1, 2, 0 ]\n\t\t// [ 1, 2 ] vs [ 1, 2, 0, 0, 0 ]\n\t\telse if ( this.path.length > otherPosition.path.length ) {\n\t\t\treturn checkOnlyZeroes( this.path, commonLevel );\n\t\t} else {\n\t\t\treturn checkOnlyZeroes( otherPosition.path, commonLevel );\n\t\t}\n\t}\n\n\t/**\n\t * Checks if two positions are in the same parent.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param position Position to compare with.\n\t * @returns `true` if positions have the same parent, `false` otherwise.\n\t */\n\tpublic hasSameParentAs( position: ModelPosition ): boolean {\n\t\tif ( this.root !== position.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst thisParentPath = this.getParentPath();\n\t\tconst posParentPath = position.getParentPath();\n\n\t\treturn compareArrays( thisParentPath, posParentPath ) == 'same';\n\t}\n\n\t/**\n\t * Returns a copy of this position that is transformed by given `operation`.\n\t *\n\t * The new position's parameters are updated accordingly to the effect of the `operation`.\n\t *\n\t * For example, if `n` nodes are inserted before the position, the returned position {@link ~ModelPosition#offset} will be\n\t * increased by `n`. If the position was in a merged element, it will be accordingly moved to the new element, etc.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param operation Operation to transform by.\n\t * @returns Transformed position.\n\t */\n\tpublic getTransformedByOperation( operation: Operation ): ModelPosition {\n\t\tlet result;\n\n\t\tswitch ( operation.type ) {\n\t\t\tcase 'insert':\n\t\t\t\tresult = this._getTransformedByInsertOperation( operation as InsertOperation );\n\t\t\t\tbreak;\n\t\t\tcase 'move':\n\t\t\tcase 'remove':\n\t\t\tcase 'reinsert':\n\t\t\t\tresult = this._getTransformedByMoveOperation( operation as MoveOperation );\n\t\t\t\tbreak;\n\t\t\tcase 'split':\n\t\t\t\tresult = this._getTransformedBySplitOperation( operation as SplitOperation );\n\t\t\t\tbreak;\n\t\t\tcase 'merge':\n\t\t\t\tresult = this._getTransformedByMergeOperation( operation as MergeOperation );\n\t\t\t\tbreak;\n\t\t\tcase 'detach':\n\t\t\t\tresult = this._getTransformedByDetachOperation( operation as DetachOperation );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tresult = ModelPosition._createAt( this );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by a detach operation.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByDetachOperation( operation: DetachOperation ): ModelPosition {\n\t\treturn this._getTransformedByDeletion( operation.sourcePosition, operation.howMany ) ||\n\t\t\tModelPosition._createAt( operation.sourcePosition );\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by an insert operation.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByInsertOperation( operation: InsertOperation ): ModelPosition {\n\t\treturn this._getTransformedByInsertion( operation.position, operation.howMany );\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by a move operation.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByMoveOperation( operation: MoveOperation ): ModelPosition {\n\t\treturn this._getTransformedByMove( operation.sourcePosition, operation.targetPosition, operation.howMany );\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by a split operation.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedBySplitOperation( operation: SplitOperation ): ModelPosition {\n\t\tconst movedRange = operation.movedRange;\n\n\t\tconst isContained = movedRange.containsPosition( this ) ||\n\t\t\t( movedRange.start.isEqual( this ) && this.stickiness == 'toNext' );\n\n\t\tif ( isContained ) {\n\t\t\treturn this._getCombined( operation.splitPosition, operation.moveTargetPosition );\n\t\t} else {\n\t\t\tif ( operation.graveyardPosition ) {\n\t\t\t\treturn this._getTransformedByMove( operation.graveyardPosition, operation.insertionPosition, 1 );\n\t\t\t} else {\n\t\t\t\treturn this._getTransformedByInsertion( operation.insertionPosition, 1 );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a copy of this position transformed by merge operation.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByMergeOperation( operation: MergeOperation ): ModelPosition {\n\t\tconst movedRange = operation.movedRange;\n\t\tconst isContained = movedRange.containsPosition( this ) || movedRange.start.isEqual( this );\n\n\t\tlet pos;\n\n\t\tif ( isContained ) {\n\t\t\tpos = this._getCombined( operation.sourcePosition, operation.targetPosition );\n\n\t\t\tif ( operation.sourcePosition.isBefore( operation.targetPosition ) ) {\n\t\t\t\t// Above happens during OT when the merged element is moved before the merged-to element.\n\t\t\t\tpos = pos._getTransformedByDeletion( operation.deletionPosition, 1 )!;\n\t\t\t}\n\t\t} else if ( this.isEqual( operation.deletionPosition ) ) {\n\t\t\tpos = ModelPosition._createAt( operation.deletionPosition );\n\t\t} else {\n\t\t\tpos = this._getTransformedByMove( operation.deletionPosition, operation.graveyardPosition, 1 );\n\t\t}\n\n\t\treturn pos;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by removing `howMany` nodes starting from `deletePosition`.\n\t * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.\n\t *\n\t * @internal\n\t * @param deletePosition Position before the first removed node.\n\t * @param howMany How many nodes are removed.\n\t * @returns Transformed position or `null`.\n\t */\n\tpublic _getTransformedByDeletion( deletePosition: ModelPosition, howMany: number ): ModelPosition | null {\n\t\tconst transformed = ModelPosition._createAt( this );\n\n\t\t// This position can't be affected if deletion was in a different root.\n\t\tif ( this.root != deletePosition.root ) {\n\t\t\treturn transformed;\n\t\t}\n\n\t\tif ( compareArrays( deletePosition.getParentPath(), this.getParentPath() ) == 'same' ) {\n\t\t\t// If nodes are removed from the node that is pointed by this position...\n\t\t\tif ( deletePosition.offset < this.offset ) {\n\t\t\t\t// And are removed from before an offset of that position...\n\t\t\t\tif ( deletePosition.offset + howMany > this.offset ) {\n\t\t\t\t\t// Position is in removed range, it's no longer in the tree.\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t// Decrement the offset accordingly.\n\t\t\t\t\ttransformed.offset -= howMany;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( compareArrays( deletePosition.getParentPath(), this.getParentPath() ) == 'prefix' ) {\n\t\t\t// If nodes are removed from a node that is on a path to this position...\n\t\t\tconst i = deletePosition.path.length - 1;\n\n\t\t\tif ( deletePosition.offset <= this.path[ i ] ) {\n\t\t\t\t// And are removed from before next node of that path...\n\t\t\t\tif ( deletePosition.offset + howMany > this.path[ i ] ) {\n\t\t\t\t\t// If the next node of that path is removed return null\n\t\t\t\t\t// because the node containing this position got removed.\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, decrement index on that path.\n\t\t\t\t\t( transformed.path as Array<number> )[ i ] -= howMany;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn transformed;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by inserting `howMany` nodes at `insertPosition`.\n\t *\n\t * @internal\n\t * @param insertPosition Position where nodes are inserted.\n\t * @param howMany How many nodes are inserted.\n\t * @returns Transformed position.\n\t */\n\tpublic _getTransformedByInsertion( insertPosition: ModelPosition, howMany: number ): ModelPosition {\n\t\tconst transformed = ModelPosition._createAt( this );\n\n\t\t// This position can't be affected if insertion was in a different root.\n\t\tif ( this.root != insertPosition.root ) {\n\t\t\treturn transformed;\n\t\t}\n\n\t\tif ( compareArrays( insertPosition.getParentPath(), this.getParentPath() ) == 'same' ) {\n\t\t\t// If nodes are inserted in the node that is pointed by this position...\n\t\t\tif ( insertPosition.offset < this.offset || ( insertPosition.offset == this.offset && this.stickiness != 'toPrevious' ) ) {\n\t\t\t\t// And are inserted before an offset of that position...\n\t\t\t\t// \"Push\" this positions offset.\n\t\t\t\ttransformed.offset += howMany;\n\t\t\t}\n\t\t} else if ( compareArrays( insertPosition.getParentPath(), this.getParentPath() ) == 'prefix' ) {\n\t\t\t// If nodes are inserted in a node that is on a path to this position...\n\t\t\tconst i = insertPosition.path.length - 1;\n\n\t\t\tif ( insertPosition.offset <= this.path[ i ] ) {\n\t\t\t\t// And are inserted before next node of that path...\n\t\t\t\t// \"Push\" the index on that path.\n\t\t\t\t( transformed.path as Array<number> )[ i ] += howMany;\n\t\t\t}\n\t\t}\n\n\t\treturn transformed;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @internal\n\t * @param sourcePosition Position before the first element to move.\n\t * @param targetPosition Position where moved elements will be inserted.\n\t * @param howMany How many consecutive nodes to move, starting from `sourcePosition`.\n\t * @returns Transformed position.\n\t */\n\tpublic _getTransformedByMove( sourcePosition: ModelPosition, targetPosition: ModelPosition, howMany: number ): ModelPosition {\n\t\t// Update target position, as it could be affected by nodes removal.\n\t\ttargetPosition = targetPosition._getTransformedByDeletion( sourcePosition, howMany )!;\n\n\t\tif ( sourcePosition.isEqual( targetPosition ) ) {\n\t\t\t// If `targetPosition` is equal to `sourcePosition` this isn't really any move. Just return position as it is.\n\t\t\treturn ModelPosition._createAt( this );\n\t\t}\n\n\t\t// Moving a range removes nodes from their original position. We acknowledge this by proper transformation.\n\t\tconst transformed = this._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\tconst isMoved = transformed === null ||\n\t\t\t( sourcePosition.isEqual( this ) && this.stickiness == 'toNext' ) ||\n\t\t\t( sourcePosition.getShiftedBy( howMany ).isEqual( this ) && this.stickiness == 'toPrevious' );\n\n\t\tif ( isMoved ) {\n\t\t\t// This position is inside moved range (or sticks to it).\n\t\t\t// In this case, we calculate a combination of this position, move source position and target position.\n\t\t\treturn this._getCombined( sourcePosition, targetPosition );\n\t\t} else {\n\t\t\t// This position is not inside a removed range.\n\t\t\t//\n\t\t\t// In next step, we simply reflect inserting `howMany` nodes, which might further affect the position.\n\t\t\treturn transformed._getTransformedByInsertion( targetPosition, howMany );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a new position that is a combination of this position and given positions.\n\t *\n\t * The combined position is a copy of this position transformed by moving a range starting at `source` position\n\t * to the `target` position. It is expected that this position is inside the moved range.\n\t *\n\t * Example:\n\t *\n\t * ```ts\n\t * let original = model.createPositionFromPath( root, [ 2, 3, 1 ] );\n\t * let source = model.createPositionFromPath( root, [ 2, 2 ] );\n\t * let target = model.createPositionFromPath( otherRoot, [ 1, 1, 3 ] );\n\t * original._getCombined( source, target ); // path is [ 1, 1, 4, 1 ], root is `otherRoot`\n\t * ```\n\t *\n\t * Explanation:\n\t *\n\t * We have a position `[ 2, 3, 1 ]` and move some nodes from `[ 2, 2 ]` to `[ 1, 1, 3 ]`. The original position\n\t * was inside moved nodes and now should point to the new place. The moved nodes will be after\n\t * positions `[ 1, 1, 3 ]`, `[ 1, 1, 4 ]`, `[ 1, 1, 5 ]`. Since our position was in the second moved node,\n\t * the transformed position will be in a sub-tree of a node at `[ 1, 1, 4 ]`. Looking at original path, we\n\t * took care of `[ 2, 3 ]` part of it. Now we have to add the rest of the original path to the transformed path.\n\t * Finally, the transformed position will point to `[ 1, 1, 4, 1 ]`.\n\t *\n\t * @internal\n\t * @param source Beginning of the moved range.\n\t * @param target Position where the range is moved.\n\t * @returns Combined position.\n\t */\n\tpublic _getCombined( source: ModelPosition, target: ModelPosition ): ModelPosition {\n\t\tconst i = source.path.length - 1;\n\n\t\t// The first part of a path to combined position is a path to the place where nodes were moved.\n\t\tconst combined = ModelPosition._createAt( target );\n\t\tcombined.stickiness = this.stickiness;\n\n\t\t// Then we have to update the rest of the path.\n\n\t\t// Fix the offset because this position might be after `from` position and we have to reflect that.\n\t\tcombined.offset = combined.offset + this.path[ i ] - source.offset;\n\n\t\t// Then, add the rest of the path.\n\t\t// If this position is at the same level as `from` position nothing will get added.\n\t\t( combined as any ).path = [ ...combined.path, ...this.path.slice( i + 1 ) ];\n\n\t\treturn combined;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn {\n\t\t\troot: this.root.toJSON(),\n\t\t\tpath: Array.from( this.path ),\n\t\t\tstickiness: this.stickiness\n\t\t};\n\t}\n\n\t/**\n\t * Returns a new position that is equal to current position.\n\t */\n\tpublic clone(): this {\n\t\treturn new ( this.constructor as any )( this.root, this.path, this.stickiness );\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/model/position~ModelPosition position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/model/item~ModelItem model item} and `'before'` or `'after'` (sets position before or after given model item).\n\t *\n\t * This method is a shortcut to other factory methods such as:\n\t *\n\t * * {@link module:engine/model/position~ModelPosition._createBefore},\n\t * * {@link module:engine/model/position~ModelPosition._createAfter}.\n\t *\n\t * @internal\n\t * @param offset Offset or one of the flags. Used only when the first parameter\n\t * is a {@link module:engine/model/item~ModelItem model item}.\n\t * @param stickiness Position stickiness. Used only when the first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic static _createAt(\n\t\titemOrPosition: ModelItem | ModelPosition | ModelDocumentFragment,\n\t\toffset?: ModelPositionOffset,\n\t\tstickiness: ModelPositionStickiness = 'toNone'\n\t): ModelPosition {\n\t\tif ( itemOrPosition.is( 'model:position' ) ) {\n\t\t\treturn new ModelPosition( itemOrPosition.root, itemOrPosition.path, itemOrPosition.stickiness );\n\t\t} else {\n\t\t\tconst node = itemOrPosition;\n\n\t\t\tif ( offset == 'end' ) {\n\t\t\t\toffset = ( node as any ).maxOffset;\n\t\t\t} else if ( offset == 'before' ) {\n\t\t\t\treturn this._createBefore( node, stickiness );\n\t\t\t} else if ( offset == 'after' ) {\n\t\t\t\treturn this._createAfter( node, stickiness );\n\t\t\t} else if ( offset !== 0 && !offset ) {\n\t\t\t\t/**\n\t\t\t\t * {@link module:engine/model/model~Model#createPositionAt `Model#createPositionAt()`}\n\t\t\t\t * requires the offset to be specified when the first parameter is a model item.\n\t\t\t\t *\n\t\t\t\t * @error model-createpositionat-offset-required\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-createpositionat-offset-required', [ this, itemOrPosition ] );\n\t\t\t}\n\n\t\t\tif ( !node.is( 'element' ) && !node.is( 'documentFragment' ) ) {\n\t\t\t\t/**\n\t\t\t\t * Position parent have to be a model element or model document fragment.\n\t\t\t\t *\n\t\t\t\t * @error model-position-parent-incorrect\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'model-position-parent-incorrect',\n\t\t\t\t\t[ this, itemOrPosition ]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst path = node.getPath();\n\n\t\t\tpath.push( offset as any );\n\n\t\t\treturn new this( node.root as any, path, stickiness );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new position, after given {@link module:engine/model/item~ModelItem model item}.\n\t *\n\t * @internal\n\t * @param item Item after which the position should be placed.\n\t * @param stickiness Position stickiness.\n\t */\n\tpublic static _createAfter( item: ModelItem | ModelDocumentFragment, stickiness?: ModelPositionStickiness ): ModelPosition {\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You cannot make a position after a root element.\n\t\t\t *\n\t\t\t * @error model-position-after-root\n\t\t\t * @param {module:engine/model/rootelement~ModelRootElement} root The root element..\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-after-root',\n\t\t\t\t[ this, item ],\n\t\t\t\t{ root: item }\n\t\t\t);\n\t\t}\n\n\t\treturn this._createAt( item.parent, item.endOffset!, stickiness );\n\t}\n\n\t/**\n\t * Creates a new position, before the given {@link module:engine/model/item~ModelItem model item}.\n\t *\n\t * @internal\n\t * @param item Item before which the position should be placed.\n\t * @param stickiness Position stickiness.\n\t */\n\tpublic static _createBefore( item: ModelItem | ModelDocumentFragment, stickiness?: ModelPositionStickiness ): ModelPosition {\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You cannot make a position before a root element.\n\t\t\t *\n\t\t\t * @error model-position-before-root\n\t\t\t * @param {module:engine/model/rootelement~ModelRootElement} root The root element..\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-before-root',\n\t\t\t\titem,\n\t\t\t\t{ root: item }\n\t\t\t);\n\t\t}\n\n\t\treturn this._createAt( item.parent, item.startOffset!, stickiness );\n\t}\n\n\t/**\n\t * Creates a `Position` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param json Plain object to be converted to `Position`.\n\t * @param doc Document object that will be position owner.\n\t * @returns `Position` instance created using given plain object.\n\t */\n\tpublic static fromJSON( json: any, doc: ModelDocument ): ModelPosition {\n\t\tif ( json.root === '$graveyard' ) {\n\t\t\tconst pos = new ModelPosition( doc.graveyard, json.path );\n\t\t\tpos.stickiness = json.stickiness;\n\n\t\t\treturn pos;\n\t\t}\n\n\t\tif ( !doc.getRoot( json.root ) ) {\n\t\t\t/**\n\t\t\t * Cannot create position for document. Root with specified name does not exist.\n\t\t\t *\n\t\t\t * @error model-position-fromjson-no-root\n\t\t\t * @param {string} rootName The root name.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-fromjson-no-root',\n\t\t\t\tdoc,\n\t\t\t\t{ rootName: json.root }\n\t\t\t);\n\t\t}\n\n\t\treturn new ModelPosition( doc.getRoot( json.root )!, json.path, json.stickiness );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `${ this.root } [ ${ this.path.join( ', ' ) } ]`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelPosition: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelPosition.prototype.is = function( type: string ): boolean {\n\treturn type === 'position' || type === 'model:position';\n} as any;\n\n/**\n * A flag indicating whether this position is `'before'` or `'after'` or `'same'` as given position.\n * If positions are in different roots `'different'` flag is returned.\n */\nexport type ModelPositionRelation = 'before' | 'after' | 'same' | 'different';\n\n/**\n * Offset or one of the flags.\n */\nexport type ModelPositionOffset = number | 'before' | 'after' | 'end';\n\n/**\n * Represents how position is \"sticking\" with neighbour nodes. Used to define how position should be transformed (moved)\n * in edge cases. Possible values: `'toNone'`, `'toNext'`, `'toPrevious'`.\n *\n * Examples:\n *\n * ```\n * Insert. Position is at | and nodes are inserted at the same position, marked as ^:\n *\n * - sticks to none:           <p>f^|oo</p>  ->  <p>fbar|oo</p>\n * - sticks to next node:      <p>f^|oo</p>  ->  <p>fbar|oo</p>\n * - sticks to previous node:  <p>f|^oo</p>  ->  <p>f|baroo</p>\n * ```\n *\n *\n * Move. Position is at | and range [oo] is moved to position ^:\n *\n * ```\n * - sticks to none:           <p>f|[oo]</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>\n * - sticks to none:           <p>f[oo]|</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>\n *\n * - sticks to next node:      <p>f|[oo]</p><p>b^ar</p>  ->  <p>f</p><p>b|ooar</p>\n * - sticks to next node:      <p>f[oo]|</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>\n *\n * - sticks to previous node:  <p>f|[oo]</p><p>b^ar</p>  ->  <p>f|</p><p>booar</p>\n * - sticks to previous node:  <p>f[oo]|</p><p>b^ar</p>  ->  <p>f</p><p>boo|ar</p>\n * ```\n */\nexport type ModelPositionStickiness = 'toNone' | 'toNext' | 'toPrevious';\n\n/**\n * Returns a text node at the given position.\n *\n * This is a helper function optimized to reuse the position parent instance for performance reasons.\n *\n * Normally, you should use {@link module:engine/model/position~ModelPosition#textNode `Position#textNode`}.\n * If you start hitting performance issues with {@link module:engine/model/position~ModelPosition#parent `Position#parent`}\n * check if your algorithm does not access it multiple times (which can happen directly or indirectly via other position properties).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/6579.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getNodeAfterPosition}\n * * {@link module:engine/model/position~getNodeBeforePosition}\n *\n * @param position\n * @param positionParent The parent of the given position.\n * @internal\n */\nexport function getTextNodeAtPosition( position: ModelPosition, positionParent: ModelElement | ModelDocumentFragment ): ModelText | null {\n\tconst node = positionParent.getChildAtOffset( position.offset );\n\n\tif ( node && node.is( '$text' ) && node.startOffset! < position.offset ) {\n\t\treturn node;\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the node after the given position.\n *\n * This is a helper function optimized to reuse the position parent instance and the calculation of the text node at the\n * specific position for performance reasons.\n *\n * Normally, you should use {@link module:engine/model/position~ModelPosition#nodeAfter `Position#nodeAfter`}.\n * If you start hitting performance issues with {@link module:engine/model/position~ModelPosition#parent `Position#parent`} and/or\n * {@link module:engine/model/position~ModelPosition#textNode `Position#textNode`}\n * check if your algorithm does not access those properties multiple times\n * (which can happen directly or indirectly via other position properties).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getTextNodeAtPosition}\n * * {@link module:engine/model/position~getNodeBeforePosition}\n *\n * @param position Position to check.\n * @param positionParent The parent of the given position.\n * @param textNode Text node at the given position.\n * @internal\n */\nexport function getNodeAfterPosition(\n\tposition: ModelPosition,\n\tpositionParent: ModelElement | ModelDocumentFragment,\n\ttextNode: ModelText | null\n): ModelNode | null {\n\tif ( textNode !== null ) {\n\t\treturn null;\n\t}\n\n\treturn positionParent.getChildAtOffset( position.offset );\n}\n\n/**\n * Returns the node before the given position.\n *\n * Refer to {@link module:engine/model/position~getNodeBeforePosition} for documentation on when to use this util method.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getTextNodeAtPosition}\n * * {@link module:engine/model/position~getNodeAfterPosition}\n *\n * @param position Position to check.\n * @param positionParent The parent of the given position.\n * @param textNode Text node at the given position.\n * @internal\n */\nexport function getNodeBeforePosition(\n\tposition: ModelPosition,\n\tpositionParent: ModelElement | ModelDocumentFragment,\n\ttextNode: ModelText | null\n): ModelNode | null {\n\tif ( textNode !== null ) {\n\t\treturn null;\n\t}\n\n\treturn positionParent.getChild( positionParent.offsetToIndex( position.offset ) - 1 );\n}\n\n/**\n * This is a helper function for `Position#isTouching()`.\n *\n * It checks whether to given positions are touching, considering that they have the same root and paths\n * until given level, and at given level they differ by 1 (so they are branching at `level` point).\n *\n * The exact requirements for touching positions are described in `Position#isTouching()` and also\n * in the body of this function.\n *\n * @param left Position \"on the left\" (it is before `right`).\n * @param right Position \"on the right\" (it is after `left`).\n * @param level Level on which the positions are different.\n */\nfunction checkTouchingBranch( left: ModelPosition, right: ModelPosition, level: number ): boolean {\n\tif ( level + 1 === left.path.length ) {\n\t\t// Left position does not have any more entries after the point where the positions differ.\n\t\t// [ 2 ] vs [ 3 ]\n\t\t// [ 2 ] vs [ 3, 0, 0 ]\n\t\t// The positions are spread by node at [ 2 ].\n\t\treturn false;\n\t}\n\n\tif ( !checkOnlyZeroes( right.path, level + 1 ) ) {\n\t\t// Right position does not have only zeroes, so we have situation like:\n\t\t// [ 2, maxOffset ] vs [ 3, 1 ]\n\t\t// [ 2, maxOffset ] vs [ 3, 1, 0, 0 ]\n\t\t// The positions are spread by node at [ 3, 0 ].\n\t\treturn false;\n\t}\n\n\tif ( !checkOnlyMaxOffset( left, level + 1 ) ) {\n\t\t// Left position does not have only max offsets, so we have situation like:\n\t\t// [ 2, 4 ] vs [ 3 ]\n\t\t// [ 2, 4 ] vs [ 3, 0, 0 ]\n\t\t// The positions are spread by node at [ 2, 5 ].\n\t\treturn false;\n\t}\n\n\t// Left position has only max offsets and right position has only zeroes or nothing.\n\t// [ 2, maxOffset ] vs [ 3 ]\n\t// [ 2, maxOffset, maxOffset ] vs [ 3, 0 ]\n\t// There are not elements between positions. The positions are touching.\n\treturn true;\n}\n\n/**\n * Checks whether for given array, starting from given index until the end of the array, all items are `0`s.\n *\n * This is a helper function for `Position#isTouching()`.\n */\nfunction checkOnlyZeroes( arr: ReadonlyArray<number>, idx: number ): boolean {\n\twhile ( idx < arr.length ) {\n\t\tif ( arr[ idx ] !== 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tidx++;\n\t}\n\n\treturn true;\n}\n\n/**\n * Checks whether for given position, starting from given path level, whether the position is at the end of\n * its parent and whether each element on the path to the position is also at at the end of its parent.\n *\n * This is a helper function for `Position#isTouching()`.\n */\nfunction checkOnlyMaxOffset( pos: ModelPosition, level: number ): boolean {\n\tlet parent = pos.parent;\n\tlet idx = pos.path.length - 1;\n\tlet add = 0;\n\n\twhile ( idx >= level ) {\n\t\tif ( pos.path[ idx ] + add !== parent.maxOffset ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// After the first check, we \"go up\", and check whether the position's parent-parent is the last element.\n\t\t// However, we need to add 1 to the value in the path to \"simulate\" moving the path after the parent.\n\t\t// It happens just once.\n\t\tadd = 1;\n\t\tidx--;\n\t\tparent = parent.parent!;\n\t}\n\n\treturn true;\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/**\n * @module engine/model/range\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\nimport { ModelPosition } from './position.js';\nimport { ModelTreeWalker, type ModelTreeWalkerOptions, type ModelTreeWalkerValue } from './treewalker.js';\n\nimport { type ModelDocument } from './document.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelElement } from './element.js';\nimport { type InsertOperation } from './operation/insertoperation.js';\nimport { type ModelItem } from './item.js';\nimport { type MergeOperation } from './operation/mergeoperation.js';\nimport { type MoveOperation } from './operation/moveoperation.js';\nimport { type Operation } from './operation/operation.js';\nimport { type SplitOperation } from './operation/splitoperation.js';\nimport { type DetachOperation } from './operation/detachoperation.js';\n\nimport { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Represents a range in the model tree.\n *\n * A range is defined by its {@link module:engine/model/range~ModelRange#start} and {@link module:engine/model/range~ModelRange#end}\n * positions.\n *\n * You can create range instances via its constructor or the `createRange*()` factory methods of\n * {@link module:engine/model/model~Model} and {@link module:engine/model/writer~ModelWriter}.\n */\nexport class ModelRange extends ModelTypeCheckable implements Iterable<ModelTreeWalkerValue> {\n\t/**\n\t * Start position.\n\t */\n\tpublic readonly start: ModelPosition;\n\n\t/**\n\t * End position.\n\t */\n\tpublic readonly end: ModelPosition;\n\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * @param start The start position.\n\t * @param end The end position. If not set, the range will be collapsed at the `start` position.\n\t */\n\tconstructor( start: ModelPosition, end?: ModelPosition | null ) {\n\t\tsuper();\n\n\t\tthis.start = ModelPosition._createAt( start );\n\t\tthis.end = end ? ModelPosition._createAt( end ) : ModelPosition._createAt( start );\n\n\t\t// If the range is collapsed, treat in a similar way as a position and set its boundaries stickiness to 'toNone'.\n\t\t// In other case, make the boundaries stick to the \"inside\" of the range.\n\t\tthis.start.stickiness = this.isCollapsed ? 'toNone' : 'toNext';\n\t\tthis.end.stickiness = this.isCollapsed ? 'toNone' : 'toPrevious';\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link module:engine/model/item~ModelItem items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/model/position~ModelPosition positions},\n\t * grouped as {@link module:engine/model/treewalker~ModelTreeWalkerValue}.\n\t * It iterates over all {@link module:engine/model/textproxy~ModelTextProxy text contents} that are inside the range\n\t * and all the {@link module:engine/model/element~ModelElement}s that are entered into when iterating over this range.\n\t *\n\t * This iterator uses {@link module:engine/model/treewalker~ModelTreeWalker} with `boundaries` set to this range\n\t * and `ignoreElementEnd` option set to `true`.\n\t */\n\tpublic* [ Symbol.iterator ](): IterableIterator<ModelTreeWalkerValue> {\n\t\tyield* new ModelTreeWalker( { boundaries: this, ignoreElementEnd: true } );\n\t}\n\n\t/**\n\t * Describes whether the range is collapsed, that is if {@link #start} and\n\t * {@link #end} positions are equal.\n\t */\n\tpublic get isCollapsed(): boolean {\n\t\treturn this.start.isEqual( this.end );\n\t}\n\n\t/**\n\t * Describes whether this range is flat, that is if {@link #start} position and\n\t * {@link #end} position are in the same {@link module:engine/model/position~ModelPosition#parent}.\n\t */\n\tpublic get isFlat(): boolean {\n\t\tconst startParentPath = this.start.getParentPath();\n\t\tconst endParentPath = this.end.getParentPath();\n\n\t\treturn compareArrays( startParentPath, endParentPath ) == 'same';\n\t}\n\n\t/**\n\t * Range root element.\n\t */\n\tpublic get root(): ModelElement | ModelDocumentFragment {\n\t\treturn this.start.root;\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/model/position~ModelPosition position}.\n\t *\n\t * @param position Position to check.\n\t * @returns `true` if given {@link module:engine/model/position~ModelPosition position} is contained\n\t * in this range,`false` otherwise.\n\t */\n\tpublic containsPosition( position: ModelPosition ): boolean {\n\t\treturn position.isAfter( this.start ) && position.isBefore( this.end );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/model/range~ModelRange range}.\n\t *\n\t * @param otherRange Range to check.\n\t * @param loose Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t * start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t * even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t * @returns {Boolean} `true` if given {@link module:engine/model/range~ModelRange range} boundaries are contained by this range,\n\t * `false` otherwise.\n\t */\n\tpublic containsRange( otherRange: ModelRange, loose: boolean = false ): boolean {\n\t\tif ( otherRange.isCollapsed ) {\n\t\t\tloose = false;\n\t\t}\n\n\t\tconst containsStart = this.containsPosition( otherRange.start ) || ( loose && this.start.isEqual( otherRange.start ) );\n\t\tconst containsEnd = this.containsPosition( otherRange.end ) || ( loose && this.end.isEqual( otherRange.end ) );\n\n\t\treturn containsStart && containsEnd;\n\t}\n\n\t/**\n\t * Checks whether given {@link module:engine/model/item~ModelItem} is inside this range.\n\t */\n\tpublic containsItem( item: ModelItem ): boolean {\n\t\tconst pos = ModelPosition._createBefore( item );\n\n\t\treturn this.containsPosition( pos ) || this.start.isEqual( pos );\n\t}\n\n\t/**\n\t * Two ranges are equal if their {@link #start} and {@link #end} positions are equal.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns `true` if ranges are equal, `false` otherwise.\n\t */\n\tpublic isEqual( otherRange: ModelRange ): boolean {\n\t\treturn this.start.isEqual( otherRange.start ) && this.end.isEqual( otherRange.end );\n\t}\n\n\t/**\n\t * Checks and returns whether this range intersects with given range.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns `true` if ranges intersect, `false` otherwise.\n\t */\n\tpublic isIntersecting( otherRange: ModelRange ): boolean {\n\t\treturn this.start.isBefore( otherRange.end ) && this.end.isAfter( otherRange.start );\n\t}\n\n\t/**\n\t * Computes which part(s) of this {@link module:engine/model/range~ModelRange range} is not a part of given\n\t * {@link module:engine/model/range~ModelRange range}.\n\t * Returned array contains zero, one or two {@link module:engine/model/range~ModelRange ranges}.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t * let transformed = range.getDifference( otherRange );\n\t * // transformed array has no ranges because `otherRange` contains `range`\n\t *\n\t * otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 3 ] ) );\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has one range: from [ 3 ] to [ 4, 0, 1 ]\n\t *\n\t * otherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 4 ] ) );\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has two ranges: from [ 2, 7 ] to [ 3 ] and from [ 4 ] to [ 4, 0, 1 ]\n\t * ```\n\t *\n\t * @param otherRange Range to differentiate against.\n\t * @returns The difference between ranges.\n\t */\n\tpublic getDifference( otherRange: ModelRange ): Array<ModelRange> {\n\t\tconst ranges = [];\n\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect.\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the start to the middle of this range.\n\t\t\t\tranges.push( new ModelRange( this.start, otherRange.start ) );\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the middle of this range to the end.\n\t\t\t\tranges.push( new ModelRange( otherRange.end, this.end ) );\n\t\t\t}\n\t\t} else {\n\t\t\t// Ranges do not intersect, return the original range.\n\t\t\tranges.push( new ModelRange( this.start, this.end ) );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an intersection of this {@link module:engine/model/range~ModelRange range} and given\n\t * {@link module:engine/model/range~ModelRange range}.\n\t * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 2 ] ) );\n\t * let transformed = range.getIntersection( otherRange ); // null - ranges have no common part\n\t *\n\t * otherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t * transformed = range.getIntersection( otherRange ); // range from [ 3 ] to [ 4, 0, 1 ]\n\t * ```\n\t *\n\t * @param otherRange Range to check for intersection.\n\t * @returns A common part of given ranges or `null` if ranges have no common part.\n\t */\n\tpublic getIntersection( otherRange: ModelRange ): ModelRange | null {\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect, so a common range will be returned.\n\t\t\t// At most, it will be same as this range.\n\t\t\tlet commonRangeStart = this.start;\n\t\t\tlet commonRangeEnd = this.end;\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means thaNt we have to\n\t\t\t\t// shrink common range to the given range start.\n\t\t\t\tcommonRangeStart = otherRange.start;\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// shrink common range to the given range end.\n\t\t\t\tcommonRangeEnd = otherRange.end;\n\t\t\t}\n\n\t\t\treturn new ModelRange( commonRangeStart, commonRangeEnd );\n\t\t}\n\n\t\t// Ranges do not intersect, so they do not have common part.\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns a range created by joining this {@link module:engine/model/range~ModelRange range} with the given\n\t * {@link module:engine/model/range~ModelRange range}.\n\t * If ranges have no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let otherRange = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 1 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 2 ] )\n \t * );\n\t * let transformed = range.getJoined( otherRange ); // null - ranges have no common part\n\t *\n\t * otherRange = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 3 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 5 ] )\n\t * );\n\t * transformed = range.getJoined( otherRange ); // range from [ 2, 7 ] to [ 5 ]\n\t * ```\n\t *\n\t * @param otherRange Range to be joined.\n\t * @param loose Whether the intersection check is loose or strict. If the check is strict (`false`),\n\t * ranges are tested for intersection or whether start/end positions are equal. If the check is loose (`true`),\n\t * compared range is also checked if it's {@link module:engine/model/position~ModelPosition#isTouching touching} current range.\n\t * @returns A sum of given ranges or `null` if ranges have no common part.\n\t */\n\tpublic getJoined( otherRange: ModelRange, loose: boolean = false ): ModelRange | null {\n\t\tlet shouldJoin = this.isIntersecting( otherRange );\n\n\t\tif ( !shouldJoin ) {\n\t\t\tif ( this.start.isBefore( otherRange.start ) ) {\n\t\t\t\tshouldJoin = loose ? this.end.isTouching( otherRange.start ) : this.end.isEqual( otherRange.start );\n\t\t\t} else {\n\t\t\t\tshouldJoin = loose ? otherRange.end.isTouching( this.start ) : otherRange.end.isEqual( this.start );\n\t\t\t}\n\t\t}\n\n\t\tif ( !shouldJoin ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet startPosition = this.start;\n\t\tlet endPosition = this.end;\n\n\t\tif ( otherRange.start.isBefore( startPosition ) ) {\n\t\t\tstartPosition = otherRange.start;\n\t\t}\n\n\t\tif ( otherRange.end.isAfter( endPosition ) ) {\n\t\t\tendPosition = otherRange.end;\n\t\t}\n\n\t\treturn new ModelRange( startPosition, endPosition );\n\t}\n\n\t/**\n\t * Computes and returns the smallest set of {@link #isFlat flat} ranges, that covers this range in whole.\n\t *\n\t * See an example of a model structure (`[` and `]` are range boundaries):\n\t *\n\t * ```\n\t * root                                                            root\n\t *  |- element DIV                         DIV             P2              P3             DIV\n\t *  |   |- element H                   H        P1        f o o           b a r       H         P4\n\t *  |   |   |- \"fir[st\"             fir[st     lorem                               se]cond     ipsum\n\t *  |   |- element P1\n\t *  |   |   |- \"lorem\"                                              ||\n\t *  |- element P2                                                   ||\n\t *  |   |- \"foo\"                                                    VV\n\t *  |- element P3\n\t *  |   |- \"bar\"                                                   root\n\t *  |- element DIV                         DIV             [P2             P3]             DIV\n\t *  |   |- element H                   H       [P1]       f o o           b a r        H         P4\n\t *  |   |   |- \"se]cond\"            fir[st]    lorem                               [se]cond     ipsum\n\t *  |   |- element P4\n\t *  |   |   |- \"ipsum\"\n\t * ```\n\t *\n\t * As it can be seen, letters contained in the range are: `stloremfoobarse`, spread across different parents.\n\t * We are looking for minimal set of flat ranges that contains the same nodes.\n\t *\n\t * Minimal flat ranges for above range `( [ 0, 0, 3 ], [ 3, 0, 2 ] )` will be:\n\t *\n\t * ```\n\t * ( [ 0, 0, 3 ], [ 0, 0, 5 ] ) = \"st\"\n\t * ( [ 0, 1 ], [ 0, 2 ] ) = element P1 (\"lorem\")\n\t * ( [ 1 ], [ 3 ] ) = element P2, element P3 (\"foobar\")\n\t * ( [ 3, 0, 0 ], [ 3, 0, 2 ] ) = \"se\"\n\t * ```\n\t *\n\t * **Note:** if an {@link module:engine/model/element~ModelElement element} is not wholly contained in this range, it won't be returned\n\t * in any of the returned flat ranges. See in the example how `H` elements at the beginning and at the end of the range\n\t * were omitted. Only their parts that were wholly in the range were returned.\n\t *\n\t * **Note:** this method is not returning flat ranges that contain no nodes.\n\t *\n\t * @returns Array of flat ranges covering this range.\n\t */\n\tpublic getMinimalFlatRanges(): Array<ModelRange> {\n\t\tconst ranges = [];\n\t\tconst diffAt = this.start.getCommonPath( this.end ).length;\n\n\t\tconst pos = ModelPosition._createAt( this.start );\n\t\tlet posParent = pos.parent;\n\n\t\t// Go up.\n\t\twhile ( pos.path.length > diffAt + 1 ) {\n\t\t\tconst howMany = posParent.maxOffset - pos.offset;\n\n\t\t\tif ( howMany !== 0 ) {\n\t\t\t\tranges.push( new ModelRange( pos, pos.getShiftedBy( howMany ) ) );\n\t\t\t}\n\n\t\t\t( pos as any ).path = pos.path.slice( 0, -1 );\n\t\t\tpos.offset++;\n\t\t\tposParent = posParent.parent!;\n\t\t}\n\n\t\t// Go down.\n\t\twhile ( pos.path.length <= this.end.path.length ) {\n\t\t\tconst offset = this.end.path[ pos.path.length - 1 ];\n\t\t\tconst howMany = offset - pos.offset;\n\n\t\t\tif ( howMany !== 0 ) {\n\t\t\t\tranges.push( new ModelRange( pos, pos.getShiftedBy( howMany ) ) );\n\t\t\t}\n\n\t\t\tpos.offset = offset;\n\t\t\t( pos.path as Array<number> ).push( 0 );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/model/treewalker~ModelTreeWalker TreeWalker} instance with this range as a boundary.\n\t *\n\t * For example, to iterate over all items in the entire document root:\n\t *\n\t * ```ts\n\t * // Create a range spanning over the entire root content:\n\t * const range = editor.model.createRangeIn( editor.model.document.getRoot() );\n\t *\n\t * // Iterate over all items in this range:\n\t * for ( const value of range.getWalker() ) {\n\t * \tconsole.log( value.item );\n\t * }\n\t * ```\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t */\n\tpublic getWalker( options: ModelTreeWalkerOptions = {} ): ModelTreeWalker {\n\t\toptions.boundaries = this;\n\n\t\treturn new ModelTreeWalker( options );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/model/item~ModelItem items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~ModelTreeWalker} with `boundaries` set to this range and\n\t * `ignoreElementEnd` option set to `true`. However it returns only {@link module:engine/model/item~ModelItem model items},\n\t * not {@link module:engine/model/treewalker~ModelTreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~ModelTreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t */\n\tpublic* getItems( options: ModelTreeWalkerOptions = {} ): IterableIterator<ModelItem> {\n\t\toptions.boundaries = this;\n\t\toptions.ignoreElementEnd = true;\n\n\t\tconst treeWalker = new ModelTreeWalker( options );\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.item;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/model/position~ModelPosition positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~ModelTreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/model/position~ModelPosition positions}, not {@link module:engine/model/treewalker~ModelTreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~ModelTreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~ModelTreeWalker}.\n\t */\n\tpublic* getPositions( options: ModelTreeWalkerOptions = {} ): IterableIterator<ModelPosition> {\n\t\toptions.boundaries = this;\n\n\t\tconst treeWalker = new ModelTreeWalker( options );\n\n\t\tyield treeWalker.position;\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.nextPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Returns a range that is a result of transforming this range by given `operation`.\n\t *\n\t * **Note:** transformation may break one range into multiple ranges (for example, when a part of the range is\n\t * moved to a different part of document tree). For this reason, an array is returned by this method and it\n\t * may contain one or more `Range` instances.\n\t *\n\t * @param operation Operation to transform range by.\n\t * @returns Range which is the result of transformation.\n\t */\n\tpublic getTransformedByOperation( operation: Operation ): Array<ModelRange> {\n\t\tswitch ( operation.type ) {\n\t\t\tcase 'insert':\n\t\t\t\treturn this._getTransformedByInsertOperation( operation as InsertOperation );\n\t\t\tcase 'move':\n\t\t\tcase 'remove':\n\t\t\tcase 'reinsert':\n\t\t\t\treturn this._getTransformedByMoveOperation( operation as MoveOperation );\n\t\t\tcase 'split':\n\t\t\t\treturn [ this._getTransformedBySplitOperation( operation as SplitOperation ) ];\n\t\t\tcase 'merge':\n\t\t\t\treturn [ this._getTransformedByMergeOperation( operation as MergeOperation ) ];\n\t\t\tcase 'detach':\n\t\t\t\treturn this._getTransformedByDetachOperation( operation as DetachOperation );\n\t\t}\n\n\t\treturn [ new ModelRange( this.start, this.end ) ];\n\t}\n\n\t/**\n\t * Returns a range that is a result of transforming this range by multiple `operations`.\n\t *\n\t * @see module:engine/model/range~ModelRange#getTransformedByOperation\n\t * @param operations Operations to transform the range by.\n\t * @returns Range which is the result of transformation.\n\t */\n\tpublic getTransformedByOperations( operations: Iterable<Operation> ): Array<ModelRange> {\n\t\tconst ranges = [ new ModelRange( this.start, this.end ) ];\n\n\t\tfor ( const operation of operations ) {\n\t\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\t\tconst result = ranges[ i ].getTransformedByOperation( operation );\n\n\t\t\t\tranges.splice( i, 1, ...result );\n\t\t\t\ti += result.length - 1;\n\t\t\t}\n\t\t}\n\n\t\t// It may happen that a range is split into two, and then the part of second \"piece\" is moved into first\n\t\t// \"piece\". In this case we will have incorrect third range, which should not be included in the result --\n\t\t// because it is already included in the first \"piece\". In this loop we are looking for all such ranges that\n\t\t// are inside other ranges and we simply remove them.\n\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\tconst range = ranges[ i ];\n\n\t\t\tfor ( let j = i + 1; j < ranges.length; j++ ) {\n\t\t\t\tconst next = ranges[ j ];\n\n\t\t\t\tif ( range.containsRange( next ) || next.containsRange( range ) || range.isEqual( next ) ) {\n\t\t\t\t\tranges.splice( j, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~ModelElement} or {@link module:engine/model/documentfragment~ModelDocumentFragment}\n\t * which is a common ancestor of the range's both ends (in which the entire range is contained).\n\t */\n\tpublic getCommonAncestor(): ModelElement | ModelDocumentFragment | null {\n\t\treturn this.start.getCommonAncestor( this.end );\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~ModelElement Element} contained by the range.\n\t * The element will be returned when it is the **only** node within the range and **fully–contained**\n\t * at the same time.\n\t */\n\tpublic getContainedElement(): ModelElement | null {\n\t\tif ( this.isCollapsed ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst nodeAfterStart = this.start.nodeAfter;\n\t\tconst nodeBeforeEnd = this.end.nodeBefore;\n\n\t\tif ( nodeAfterStart && nodeAfterStart.is( 'element' ) && nodeAfterStart === nodeBeforeEnd ) {\n\t\t\treturn nodeAfterStart;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Converts `Range` to plain object and returns it.\n\t *\n\t * @returns `Range` converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn {\n\t\t\tstart: this.start.toJSON(),\n\t\t\tend: this.end.toJSON()\n\t\t};\n\t}\n\n\t/**\n\t * Returns a new range that is equal to current range.\n\t */\n\tpublic clone(): this {\n\t\treturn new ( this.constructor as any )( this.start, this.end );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by insert operation.\n\t *\n\t * One or more ranges may be returned as a result of this transformation.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByInsertOperation( operation: InsertOperation, spread: boolean = false ): Array<ModelRange> {\n\t\treturn this._getTransformedByInsertion( operation.position, operation.howMany, spread );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by move operation.\n\t *\n\t * One or more ranges may be returned as a result of this transformation.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByMoveOperation( operation: MoveOperation, spread: boolean = false ): Array<ModelRange> {\n\t\tconst sourcePosition = operation.sourcePosition;\n\t\tconst howMany = operation.howMany;\n\t\tconst targetPosition = operation.targetPosition;\n\n\t\treturn this._getTransformedByMove( sourcePosition, targetPosition, howMany, spread );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by split operation.\n\t *\n\t * Always one range is returned. The transformation is done in a way to not break the range.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedBySplitOperation( operation: SplitOperation ): ModelRange {\n\t\tconst start = this.start._getTransformedBySplitOperation( operation );\n\t\tlet end = this.end._getTransformedBySplitOperation( operation );\n\n\t\tif ( this.end.isEqual( operation.insertionPosition ) ) {\n\t\t\tend = this.end.getShiftedBy( 1 );\n\t\t}\n\n\t\t// Below may happen when range contains graveyard element used by split operation.\n\t\tif ( start.root != end.root ) {\n\t\t\t// End position was next to the moved graveyard element and was moved with it.\n\t\t\t// Fix it by using old `end` which has proper `root`.\n\t\t\tend = this.end.getShiftedBy( -1 );\n\t\t}\n\n\t\treturn new ModelRange( start, end );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by merge operation.\n\t *\n\t * Always one range is returned. The transformation is done in a way to not break the range.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByMergeOperation( operation: MergeOperation ): ModelRange {\n\t\t// Special case when the marker is set on \"the closing tag\" of an element. Marker can be set like that during\n\t\t// transformations, especially when a content of a few block elements were removed. For example:\n\t\t//\n\t\t// {} is the transformed range, [] is the removed range.\n\t\t// <p>F[o{o</p><p>B}ar</p><p>Xy]z</p>\n\t\t//\n\t\t// <p>Fo{o</p><p>B}ar</p><p>z</p>\n\t\t// <p>F{</p><p>B}ar</p><p>z</p>\n\t\t// <p>F{</p>}<p>z</p>\n\t\t// <p>F{}z</p>\n\t\t//\n\t\tif ( this.start.isEqual( operation.targetPosition ) && this.end.isEqual( operation.deletionPosition ) ) {\n\t\t\treturn new ModelRange( this.start );\n\t\t}\n\n\t\tlet start = this.start._getTransformedByMergeOperation( operation );\n\t\tlet end = this.end._getTransformedByMergeOperation( operation );\n\n\t\tif ( start.root != end.root ) {\n\t\t\t// This happens when the end position was next to the merged (deleted) element.\n\t\t\t// Then, the end position was moved to the graveyard root. In this case we need to fix\n\t\t\t// the range cause its boundaries would be in different roots.\n\t\t\tend = this.end.getShiftedBy( -1 );\n\t\t}\n\n\t\tif ( start.isAfter( end ) ) {\n\t\t\t// This happens in three following cases:\n\t\t\t//\n\t\t\t// Case 1: Merge operation source position is before the target position (due to some transformations, OT, etc.)\n\t\t\t//         This means that start can be moved before the end of the range.\n\t\t\t//\n\t\t\t// Before: <p>a{a</p><p>b}b</p><p>cc</p>\n\t\t\t// Merge:  <p>b}b</p><p>cca{a</p>\n\t\t\t// Fix:    <p>{b}b</p><p>ccaa</p>\n\t\t\t//\n\t\t\t// Case 2: Range start is before merged node but not directly.\n\t\t\t//         Result should include all nodes that were in the original range.\n\t\t\t//\n\t\t\t// Before: <p>aa</p>{<p>cc</p><p>b}b</p>\n\t\t\t// Merge:  <p>aab}b</p>{<p>cc</p>\n\t\t\t// Fix:    <p>aa{bb</p><p>cc</p>}\n\t\t\t//\n\t\t\t//         The range is expanded by an additional `b` letter but it is better than dropping the whole `cc` paragraph.\n\t\t\t//\n\t\t\t// Case 3: Range start is directly before merged node.\n\t\t\t//         Resulting range should include only nodes from the merged element:\n\t\t\t//\n\t\t\t// Before: <p>aa</p>{<p>b}b</p><p>cc</p>\n\t\t\t// Merge:  <p>aab}b</p>{<p>cc</p>\n\t\t\t// Fix:    <p>aa{b}b</p><p>cc</p>\n\t\t\t//\n\n\t\t\tif ( operation.sourcePosition.isBefore( operation.targetPosition ) ) {\n\t\t\t\t// Case 1.\n\t\t\t\tstart = ModelPosition._createAt( end );\n\t\t\t\tstart.offset = 0;\n\t\t\t} else {\n\t\t\t\tif ( !operation.deletionPosition.isEqual( start ) ) {\n\t\t\t\t\t// Case 2.\n\t\t\t\t\tend = operation.deletionPosition;\n\t\t\t\t}\n\n\t\t\t\t// In both case 2 and 3 start is at the end of the merge-to element.\n\t\t\t\tstart = operation.targetPosition;\n\t\t\t}\n\n\t\t\treturn new ModelRange( start, end );\n\t\t}\n\n\t\treturn new ModelRange( start, end );\n\t}\n\n\t/**\n\t * Returns a result of transforming a copy of this range by detach operation.\n\t *\n\t * If the range is completely removed, an empty array is returned.\n\t *\n\t * @internal\n\t */\n\tpublic _getTransformedByDetachOperation( operation: DetachOperation ): Array<ModelRange> {\n\t\tconst result = this._getTransformedByDeletion( operation.sourcePosition, operation.howMany );\n\n\t\treturn result ? [ result ] : [];\n\t}\n\n\t/**\n\t * Returns an array containing one or two {@link module:engine/model/range~ModelRange ranges} that are a result of transforming this\n\t * {@link module:engine/model/range~ModelRange range} by inserting `howMany` nodes at `insertPosition`. Two\n\t * {@link module:engine/model/range~ModelRange ranges} are returned if the insertion was inside this\n\t * {@link module:engine/model/range~ModelRange range} and `spread` is set to `true`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 1 ] ), 2 );\n\t * // transformed array has one range from [ 4, 7 ] to [ 6, 0, 1 ]\n\t *\n\t * transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 4, 0, 0 ] ), 4 );\n\t * // transformed array has one range from [ 2, 7 ] to [ 4, 0, 5 ]\n\t *\n\t * transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4 );\n\t * // transformed array has one range, which is equal to original range\n\t *\n\t * transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4, true );\n\t * // transformed array has two ranges: from [ 2, 7 ] to [ 3, 2 ] and from [ 3, 6 ] to [ 4, 0, 1 ]\n\t * ```\n\t *\n\t * @internal\n\t * @param insertPosition Position where nodes are inserted.\n\t * @param howMany How many nodes are inserted.\n\t * @param spread Flag indicating whether this range should be spread if insertion\n\t * was inside the range. Defaults to `false`.\n\t * @returns Result of the transformation.\n\t */\n\tpublic _getTransformedByInsertion( insertPosition: ModelPosition, howMany: number, spread: boolean = false ): Array<ModelRange> {\n\t\tif ( spread && this.containsPosition( insertPosition ) ) {\n\t\t\t// Range has to be spread. The first part is from original start to the spread point.\n\t\t\t// The other part is from spread point to the original end, but transformed by\n\t\t\t// insertion to reflect insertion changes.\n\n\t\t\treturn [\n\t\t\t\tnew ModelRange( this.start, insertPosition ),\n\t\t\t\tnew ModelRange(\n\t\t\t\t\tinsertPosition.getShiftedBy( howMany ),\n\t\t\t\t\tthis.end._getTransformedByInsertion( insertPosition, howMany )\n\t\t\t\t)\n\t\t\t];\n\t\t} else {\n\t\t\tconst range = new ModelRange( this.start, this.end );\n\n\t\t\t( range as any ).start = range.start._getTransformedByInsertion( insertPosition, howMany );\n\t\t\t( range as any ).end = range.end._getTransformedByInsertion( insertPosition, howMany );\n\n\t\t\treturn [ range ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array containing {@link module:engine/model/range~ModelRange ranges} that are a result of transforming this\n\t * {@link module:engine/model/range~ModelRange range} by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @internal\n\t * @param sourcePosition Position from which nodes are moved.\n\t * @param targetPosition Position to where nodes are moved.\n\t * @param howMany How many nodes are moved.\n\t * @param spread Whether the range should be spread if the move points inside the range.\n\t * @returns  Result of the transformation.\n\t */\n\tpublic _getTransformedByMove(\n\t\tsourcePosition: ModelPosition,\n\t\ttargetPosition: ModelPosition,\n\t\thowMany: number,\n\t\tspread: boolean = false\n\t): Array<ModelRange> {\n\t\t// Special case for transforming a collapsed range. Just transform it like a position.\n\t\tif ( this.isCollapsed ) {\n\t\t\tconst newPos = this.start._getTransformedByMove( sourcePosition, targetPosition, howMany );\n\n\t\t\treturn [ new ModelRange( newPos ) ];\n\t\t}\n\n\t\t// Special case for transformation when a part of the range is moved towards the range.\n\t\t//\n\t\t// Examples:\n\t\t//\n\t\t// <div><p>ab</p><p>c[d</p></div><p>e]f</p> --> <div><p>ab</p></div><p>c[d</p><p>e]f</p>\n\t\t// <p>e[f</p><div><p>a]b</p><p>cd</p></div> --> <p>e[f</p><p>a]b</p><div><p>cd</p></div>\n\t\t//\n\t\t// Without this special condition, the default algorithm leaves an \"artifact\" range from one of `differenceSet` parts:\n\t\t//\n\t\t// <div><p>ab</p><p>c[d</p></div><p>e]f</p> --> <div><p>ab</p>{</div>}<p>c[d</p><p>e]f</p>\n\t\t//\n\t\t// This special case is applied only if the range is to be kept together (not spread).\n\t\tconst moveRange = ModelRange._createFromPositionAndShift( sourcePosition, howMany );\n\t\tconst insertPosition = targetPosition._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\tif ( this.containsPosition( targetPosition ) && !spread ) {\n\t\t\tif ( moveRange.containsPosition( this.start ) || moveRange.containsPosition( this.end ) ) {\n\t\t\t\tconst start = this.start._getTransformedByMove( sourcePosition, targetPosition, howMany );\n\t\t\t\tconst end = this.end._getTransformedByMove( sourcePosition, targetPosition, howMany );\n\n\t\t\t\treturn [ new ModelRange( start, end ) ];\n\t\t\t}\n\t\t}\n\n\t\t// Default algorithm.\n\t\tlet result: Array<ModelRange>;\n\n\t\tconst differenceSet = this.getDifference( moveRange );\n\t\tlet difference = null;\n\n\t\tconst common = this.getIntersection( moveRange );\n\n\t\tif ( differenceSet.length == 1 ) {\n\t\t\t// `moveRange` and this range may intersect but may be separate.\n\t\t\tdifference = new ModelRange(\n\t\t\t\tdifferenceSet[ 0 ].start._getTransformedByDeletion( sourcePosition, howMany )!,\n\t\t\t\tdifferenceSet[ 0 ].end._getTransformedByDeletion( sourcePosition, howMany )!\n\t\t\t);\n\t\t} else if ( differenceSet.length == 2 ) {\n\t\t\t// `moveRange` is inside this range.\n\t\t\tdifference = new ModelRange(\n\t\t\t\tthis.start,\n\t\t\t\tthis.end._getTransformedByDeletion( sourcePosition, howMany )\n\t\t\t);\n\t\t} // else, `moveRange` contains this range.\n\n\t\tif ( difference ) {\n\t\t\tresult = difference._getTransformedByInsertion( insertPosition!, howMany, common !== null || spread );\n\t\t} else {\n\t\t\tresult = [];\n\t\t}\n\n\t\tif ( common ) {\n\t\t\tconst transformedCommon = new ModelRange(\n\t\t\t\tcommon.start._getCombined( moveRange.start, insertPosition! ),\n\t\t\t\tcommon.end._getCombined( moveRange.start, insertPosition! )\n\t\t\t);\n\n\t\t\tif ( result.length == 2 ) {\n\t\t\t\tresult.splice( 1, 0, transformedCommon );\n\t\t\t} else {\n\t\t\t\tresult.push( transformedCommon );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns a copy of this range that is transformed by deletion of `howMany` nodes from `deletePosition`.\n\t *\n\t * If the deleted range is intersecting with the transformed range, the transformed range will be shrank.\n\t *\n\t * If the deleted range contains transformed range, `null` will be returned.\n\t *\n\t * @internal\n\t * @param deletePosition Position from which nodes are removed.\n\t * @param howMany How many nodes are removed.\n\t * @returns Result of the transformation.\n\t */\n\tpublic _getTransformedByDeletion( deletePosition: ModelPosition, howMany: number ): ModelRange | null {\n\t\tlet newStart = this.start._getTransformedByDeletion( deletePosition, howMany );\n\t\tlet newEnd = this.end._getTransformedByDeletion( deletePosition, howMany );\n\n\t\tif ( newStart == null && newEnd == null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( newStart == null ) {\n\t\t\tnewStart = deletePosition;\n\t\t}\n\n\t\tif ( newEnd == null ) {\n\t\t\tnewEnd = deletePosition;\n\t\t}\n\n\t\treturn new ModelRange( newStart, newEnd );\n\t}\n\n\t/**\n\t * Creates a new range, spreading from specified {@link module:engine/model/position~ModelPosition position} to a position moved by\n\t * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t *\n\t * @internal\n\t * @param position Beginning of the range.\n\t * @param shift How long the range should be.\n\t */\n\tpublic static _createFromPositionAndShift( position: ModelPosition, shift: number ): ModelRange {\n\t\tconst start = position;\n\t\tconst end = position.getShiftedBy( shift );\n\n\t\treturn shift > 0 ? new this( start, end ) : new this( end, start );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @internal\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic static _createIn( element: ModelElement | ModelDocumentFragment ): ModelRange {\n\t\treturn new this( ModelPosition._createAt( element, 0 ), ModelPosition._createAt( element, element.maxOffset ) );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/model/item~ModelItem model item} and ends after it.\n\t *\n\t * @internal\n\t */\n\tpublic static _createOn( item: ModelItem ): ModelRange {\n\t\treturn this._createFromPositionAndShift( ModelPosition._createBefore( item ), item.offsetSize );\n\t}\n\n\t/**\n\t * Combines all ranges from the passed array into a one range. At least one range has to be passed.\n\t * Passed ranges must not have common parts.\n\t *\n\t * The first range from the array is a reference range. If other ranges start or end on the exactly same position where\n\t * the reference range, they get combined into one range.\n\t *\n\t * ```\n\t * [  ][]  [    ][ ][             ][ ][]  [  ]  // Passed ranges, shown sorted\n\t * [    ]                                       // The result of the function if the first range was a reference range.\n\t *         [                           ]        // The result of the function if the third-to-seventh range was a reference range.\n\t *                                        [  ]  // The result of the function if the last range was a reference range.\n\t * ```\n\t *\n\t * @internal\n\t * @param ranges Ranges to combine.\n\t * @returns Combined range.\n\t */\n\tpublic static _createFromRanges( ranges: Array<ModelRange> ): ModelRange {\n\t\tif ( ranges.length === 0 ) {\n\t\t\t/**\n\t\t\t * At least one range has to be passed to\n\t\t\t * {@link module:engine/model/range~ModelRange._createFromRanges `Range._createFromRanges()`}.\n\t\t\t *\n\t\t\t * @error range-create-from-ranges-empty-array\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'range-create-from-ranges-empty-array',\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if ( ranges.length == 1 ) {\n\t\t\treturn ranges[ 0 ].clone();\n\t\t}\n\n\t\t// 1. Set the first range in `ranges` array as a reference range.\n\t\t// If we are going to return just a one range, one of the ranges need to be the reference one.\n\t\t// Other ranges will be stuck to that range, if possible.\n\t\tconst ref = ranges[ 0 ];\n\n\t\t// 2. Sort all the ranges, so it's easier to process them.\n\t\tranges.sort( ( a, b ) => {\n\t\t\treturn a.start.isAfter( b.start ) ? 1 : -1;\n\t\t} );\n\n\t\t// 3. Check at which index the reference range is now.\n\t\tconst refIndex = ranges.indexOf( ref );\n\n\t\t// 4. At this moment we don't need the original range.\n\t\t// We are going to modify the result, and we need to return a new instance of Range.\n\t\t// We have to create a copy of the reference range.\n\t\tconst result = new this( ref.start, ref.end );\n\n\t\t// 5. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\tfor ( let i = refIndex - 1; i >= 0; i-- ) {\n\t\t\tif ( ranges[ i ].end.isEqual( result.start ) ) {\n\t\t\t\t( result as any ).start = ModelPosition._createAt( ranges[ i ].start );\n\t\t\t} else {\n\t\t\t\t// If ranges are not starting/ending at the same position there is no point in looking further.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// 6. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\tfor ( let i = refIndex + 1; i < ranges.length; i++ ) {\n\t\t\tif ( ranges[ i ].start.isEqual( result.end ) ) {\n\t\t\t\t( result as any ).end = ModelPosition._createAt( ranges[ i ].end );\n\t\t\t} else {\n\t\t\t\t// If ranges are not starting/ending at the same position there is no point in looking further.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates a `Range` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param json Plain object to be converted to `Range`.\n\t * @param doc Document object that will be range owner.\n\t * @returns `Range` instance created using given plain object.\n\t */\n\tpublic static fromJSON( json: any, doc: ModelDocument ): ModelRange {\n\t\treturn new this( ModelPosition.fromJSON( json.start, doc ), ModelPosition.fromJSON( json.end, doc ) );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `${ this.root } [ ${ this.start.path.join( ', ' ) } ] - [ ${ this.end.path.join( ', ' ) } ]`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelPosition: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelRange.prototype.is = function( type: string ): boolean {\n\treturn type === 'range' || type === 'model:range';\n} as any;\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/**\n * @module engine/conversion/mapper\n */\n\nimport { ModelPosition } from '../model/position.js';\nimport { ModelRange } from '../model/range.js';\n\nimport { ViewPosition } from '../view/position.js';\nimport { ViewRange } from '../view/range.js';\n\nimport { CKEditorError, EmitterMixin, type GetCallback, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport { type ViewDocumentFragment } from '../view/documentfragment.js';\nimport { type ViewElement } from '../view/element.js';\nimport { type ViewText } from '../view/text.js';\nimport { type ModelElement } from '../model/element.js';\nimport { type ModelDocumentFragment } from '../model/documentfragment.js';\nimport type { ViewNode, ViewNodeChangeEvent } from '../view/node.js';\n\nconst MapperBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\nconst MapperCacheBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * Maps elements, positions and markers between the {@link module:engine/view/document~ViewDocument view} and\n * the {@link module:engine/model/model model}.\n *\n * The instance of the Mapper used for the editing pipeline is available in\n * {@link module:engine/controller/editingcontroller~EditingController#mapper `editor.editing.mapper`}.\n *\n * Mapper uses bound elements to find corresponding elements and positions, so, to get proper results,\n * all model elements should be {@link module:engine/conversion/mapper~Mapper#bindElements bound}.\n *\n * To map the complex model to/from view relations, you may provide custom callbacks for the\n * {@link module:engine/conversion/mapper~Mapper#event:modelToViewPosition modelToViewPosition event} and\n * {@link module:engine/conversion/mapper~Mapper#event:viewToModelPosition viewToModelPosition event} that are fired whenever\n * a position mapping request occurs.\n * Those events are fired by the {@link module:engine/conversion/mapper~Mapper#toViewPosition toViewPosition}\n * and {@link module:engine/conversion/mapper~Mapper#toModelPosition toModelPosition} methods. `Mapper` adds its own default callbacks\n * with `'lowest'` priority. To override default `Mapper` mapping, add custom callback with higher priority and\n * stop the event.\n */\nexport class Mapper extends MapperBase {\n\t/**\n\t * Model element to view element mapping.\n\t */\n\tprivate _modelToViewMapping = new WeakMap<ModelElement | ModelDocumentFragment, ViewElement | ViewDocumentFragment>();\n\n\t/**\n\t * View element to model element mapping.\n\t */\n\tprivate _viewToModelMapping = new WeakMap<ViewElement | ViewDocumentFragment, ModelElement | ModelDocumentFragment>();\n\n\t/**\n\t * A map containing callbacks between view element names and functions evaluating length of view elements\n\t * in model.\n\t */\n\tprivate _viewToModelLengthCallbacks = new Map<string, ( element: ViewElement ) => number>();\n\n\t/**\n\t * Model marker name to view elements mapping.\n\t *\n\t * Keys are `String`s while values are `Set`s with {@link module:engine/view/element~ViewElement view elements}.\n\t * One marker (name) can be mapped to multiple elements.\n\t */\n\tprivate _markerNameToElements = new Map<string, Set<ViewElement>>();\n\n\t/**\n\t * View element to model marker names mapping.\n\t *\n\t * This is reverse to {@link ~Mapper#_markerNameToElements} map.\n\t */\n\tprivate _elementToMarkerNames = new Map<ViewElement, Set<string>>();\n\n\t/**\n\t * The map of removed view elements with their current root (used for deferred unbinding).\n\t */\n\tprivate _deferredBindingRemovals = new Map<ViewElement, ViewElement | ViewDocumentFragment>();\n\n\t/**\n\t * Stores marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t * has been removed, moved or renamed).\n\t */\n\tprivate _unboundMarkerNames = new Set<string>();\n\n\t/**\n\t * Manages dynamic cache for the `Mapper` to improve the performance.\n\t */\n\tprivate _cache: MapperCache = new MapperCache();\n\n\t/**\n\t * Creates an instance of the mapper.\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\t// Default mapper algorithm for mapping model position to view position.\n\t\tthis.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', ( evt, data ) => {\n\t\t\tif ( data.viewPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewContainer = this._modelToViewMapping.get( data.modelPosition.parent as ModelElement );\n\n\t\t\tif ( !viewContainer ) {\n\t\t\t\t/**\n\t\t\t\t * A model position could not be mapped to the view because the parent of the model position\n\t\t\t\t * does not have a mapped view element (might have not been converted yet or it has no converter).\n\t\t\t\t *\n\t\t\t\t * Make sure that the model element is correctly converted to the view.\n\t\t\t\t *\n\t\t\t\t * @error mapping-model-position-view-parent-not-found\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'mapping-model-position-view-parent-not-found', this, { modelPosition: data.modelPosition } );\n\t\t\t}\n\n\t\t\tdata.viewPosition = this.findPositionIn( viewContainer, data.modelPosition.offset );\n\t\t}, { priority: 'low' } );\n\n\t\t// Default mapper algorithm for mapping view position to model position.\n\t\tthis.on<MapperViewToModelPositionEvent>( 'viewToModelPosition', ( evt, data ) => {\n\t\t\tif ( data.modelPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewBlock = this.findMappedViewAncestor( data.viewPosition );\n\t\t\tconst modelParent = this._viewToModelMapping.get( viewBlock );\n\t\t\tconst modelOffset = this._toModelOffset( data.viewPosition.parent as ViewElement, data.viewPosition.offset, viewBlock );\n\n\t\t\tdata.modelPosition = ModelPosition._createAt( modelParent!, modelOffset );\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Marks model and view elements as corresponding. Corresponding elements can be retrieved by using\n\t * the {@link module:engine/conversion/mapper~Mapper#toModelElement toModelElement} and\n\t * {@link module:engine/conversion/mapper~Mapper#toViewElement toViewElement} methods.\n\t * The information that elements are bound is also used to translate positions.\n\t *\n\t * @param modelElement Model element.\n\t * @param viewElement View element.\n\t */\n\tpublic bindElements(\n\t\tmodelElement: ModelElement | ModelDocumentFragment,\n\t\tviewElement: ViewElement | ViewDocumentFragment\n\t): void {\n\t\tthis._modelToViewMapping.set( modelElement, viewElement );\n\t\tthis._viewToModelMapping.set( viewElement, modelElement );\n\t}\n\n\t/**\n\t * Unbinds the given {@link module:engine/view/element~ViewElement view element} from the map.\n\t *\n\t * **Note:** view-to-model binding will be removed, if it existed. However, corresponding model-to-view binding\n\t * will be removed only if model element is still bound to the passed `viewElement`.\n\t *\n\t * This behavior allows for re-binding model element to another view element without fear of losing the new binding\n\t * when the previously bound view element is unbound.\n\t *\n\t * @param viewElement View element to unbind.\n\t * @param options The options object.\n\t * @param options.defer Controls whether the binding should be removed immediately or deferred until a\n\t * {@link #flushDeferredBindings `flushDeferredBindings()`} call.\n\t */\n\tpublic unbindViewElement(\n\t\tviewElement: ViewElement,\n\t\toptions: { defer?: boolean } = {}\n\t): void {\n\t\tconst modelElement = this.toModelElement( viewElement )!;\n\n\t\tif ( this._elementToMarkerNames.has( viewElement ) ) {\n\t\t\tfor ( const markerName of this._elementToMarkerNames.get( viewElement )! ) {\n\t\t\t\tthis._unboundMarkerNames.add( markerName );\n\t\t\t}\n\t\t}\n\n\t\tif ( options.defer ) {\n\t\t\tthis._deferredBindingRemovals.set( viewElement, viewElement.root );\n\t\t} else {\n\t\t\tconst wasFound = this._viewToModelMapping.delete( viewElement );\n\n\t\t\tif ( wasFound ) {\n\t\t\t\t// Stop tracking after the element is no longer mapped. We want to track all mapped elements and only mapped elements.\n\t\t\t\tthis._cache.stopTracking( viewElement );\n\t\t\t}\n\n\t\t\tif ( this._modelToViewMapping.get( modelElement ) == viewElement ) {\n\t\t\t\tthis._modelToViewMapping.delete( modelElement );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Unbinds the given {@link module:engine/model/element~ModelElement model element} from the map.\n\t *\n\t * **Note:** the model-to-view binding will be removed, if it existed. However, the corresponding view-to-model binding\n\t * will be removed only if the view element is still bound to the passed `modelElement`.\n\t *\n\t * This behavior lets for re-binding view element to another model element without fear of losing the new binding\n\t * when the previously bound model element is unbound.\n\t *\n\t * @param modelElement Model element to unbind.\n\t */\n\tpublic unbindModelElement( modelElement: ModelElement ): void {\n\t\tconst viewElement = this.toViewElement( modelElement )!;\n\n\t\tthis._modelToViewMapping.delete( modelElement );\n\n\t\tif ( this._viewToModelMapping.get( viewElement ) == modelElement ) {\n\t\t\tconst wasFound = this._viewToModelMapping.delete( viewElement );\n\n\t\t\t/* v8 ignore next 4 -- @preserve */\n\t\t\tif ( wasFound ) {\n\t\t\t\t// Stop tracking after the element is no longer mapped. We want to track all mapped elements and only mapped elements.\n\t\t\t\tthis._cache.stopTracking( viewElement );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Binds the given marker name with the given {@link module:engine/view/element~ViewElement view element}. The element\n\t * will be added to the current set of elements bound with the given marker name.\n\t *\n\t * @param element Element to bind.\n\t * @param name Marker name.\n\t */\n\tpublic bindElementToMarker( element: ViewElement, name: string ): void {\n\t\tconst elements = this._markerNameToElements.get( name ) || new Set();\n\t\telements.add( element );\n\n\t\tconst names = this._elementToMarkerNames.get( element ) || new Set();\n\t\tnames.add( name );\n\n\t\tthis._markerNameToElements.set( name, elements );\n\t\tthis._elementToMarkerNames.set( element, names );\n\t}\n\n\t/**\n\t * Unbinds an element from given marker name.\n\t *\n\t * @param element Element to unbind.\n\t * @param name Marker name.\n\t */\n\tpublic unbindElementFromMarkerName( element: ViewElement, name: string ): void {\n\t\tconst nameToElements = this._markerNameToElements.get( name );\n\n\t\tif ( nameToElements ) {\n\t\t\tnameToElements.delete( element );\n\n\t\t\tif ( nameToElements.size == 0 ) {\n\t\t\t\tthis._markerNameToElements.delete( name );\n\t\t\t}\n\t\t}\n\n\t\tconst elementToNames = this._elementToMarkerNames.get( element );\n\n\t\tif ( elementToNames ) {\n\t\t\telementToNames.delete( name );\n\n\t\t\tif ( elementToNames.size == 0 ) {\n\t\t\t\tthis._elementToMarkerNames.delete( element );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns all marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t * has been removed, moved or renamed) since the last flush. After returning, the marker names list is cleared.\n\t */\n\tpublic flushUnboundMarkerNames(): Array<string> {\n\t\tconst markerNames = Array.from( this._unboundMarkerNames );\n\n\t\tthis._unboundMarkerNames.clear();\n\n\t\treturn markerNames;\n\t}\n\n\t/**\n\t * Unbinds all deferred binding removals of view elements that in the meantime were not re-attached to some root or document fragment.\n\t *\n\t * See: {@link #unbindViewElement `unbindViewElement()`}.\n\t */\n\tpublic flushDeferredBindings(): void {\n\t\tfor ( const [ viewElement, root ] of this._deferredBindingRemovals ) {\n\t\t\t// Unbind it only if it wasn't re-attached to some root or document fragment.\n\t\t\tif ( viewElement.root == root ) {\n\t\t\t\tthis.unbindViewElement( viewElement );\n\t\t\t}\n\t\t}\n\n\t\tthis._deferredBindingRemovals = new Map();\n\t}\n\n\t/**\n\t * Removes all model to view and view to model bindings.\n\t */\n\tpublic clearBindings(): void {\n\t\tthis._modelToViewMapping = new WeakMap();\n\t\tthis._viewToModelMapping = new WeakMap();\n\t\tthis._markerNameToElements = new Map();\n\t\tthis._elementToMarkerNames = new Map();\n\t\tthis._unboundMarkerNames = new Set();\n\t\tthis._deferredBindingRemovals = new Map();\n\t}\n\n\t/**\n\t * Gets the corresponding model element.\n\t *\n\t * **Note:** {@link module:engine/view/uielement~ViewUIElement} does not have corresponding element in model.\n\t *\n\t * @label ELEMENT\n\t * @param viewElement View element.\n\t * @returns Corresponding model element or `undefined` if not found.\n\t */\n\tpublic toModelElement( viewElement: ViewElement ): ModelElement | undefined;\n\n\t/**\n\t * Gets the corresponding model document fragment.\n\t *\n\t * @label DOCUMENT_FRAGMENT\n\t * @param viewDocumentFragment View document fragment.\n\t * @returns Corresponding model document fragment or `undefined` if not found.\n\t */\n\tpublic toModelElement( viewDocumentFragment: ViewDocumentFragment ): ModelDocumentFragment | undefined;\n\n\tpublic toModelElement( viewElement: ViewElement | ViewDocumentFragment ): ModelElement | ModelDocumentFragment | undefined {\n\t\treturn this._viewToModelMapping.get( viewElement );\n\t}\n\n\t/**\n\t * Gets the corresponding view element.\n\t *\n\t * @label ELEMENT\n\t * @param modelElement Model element.\n\t * @returns Corresponding view element or `undefined` if not found.\n\t */\n\tpublic toViewElement( modelElement: ModelElement ): ViewElement | undefined;\n\n\t/**\n\t * Gets the corresponding view document fragment.\n\t *\n\t * @label DOCUMENT_FRAGMENT\n\t * @param modelDocumentFragment Model document fragment.\n\t * @returns Corresponding view document fragment or `undefined` if not found.\n\t */\n\tpublic toViewElement( modelDocumentFragment: ModelDocumentFragment ): ViewDocumentFragment | undefined;\n\n\tpublic toViewElement( modelElement: ModelElement | ModelDocumentFragment ): ViewElement | ViewDocumentFragment | undefined {\n\t\treturn this._modelToViewMapping.get( modelElement );\n\t}\n\n\t/**\n\t * Gets the corresponding model range.\n\t *\n\t * @param viewRange View range.\n\t * @returns Corresponding model range.\n\t */\n\tpublic toModelRange( viewRange: ViewRange ): ModelRange {\n\t\treturn new ModelRange( this.toModelPosition( viewRange.start ), this.toModelPosition( viewRange.end ) );\n\t}\n\n\t/**\n\t * Gets the corresponding view range.\n\t *\n\t * @param modelRange Model range.\n\t * @returns Corresponding view range.\n\t */\n\tpublic toViewRange( modelRange: ModelRange ): ViewRange {\n\t\treturn new ViewRange( this.toViewPosition( modelRange.start ), this.toViewPosition( modelRange.end ) );\n\t}\n\n\t/**\n\t * Gets the corresponding model position.\n\t *\n\t * @fires viewToModelPosition\n\t * @param viewPosition View position.\n\t * @returns Corresponding model position.\n\t */\n\tpublic toModelPosition( viewPosition: ViewPosition ): ModelPosition {\n\t\tconst data: MapperViewToModelPositionEventData = {\n\t\t\tviewPosition,\n\t\t\tmapper: this\n\t\t};\n\n\t\tthis.fire<MapperViewToModelPositionEvent>( 'viewToModelPosition', data );\n\n\t\treturn data.modelPosition!;\n\t}\n\n\t/**\n\t * Gets the corresponding view position.\n\t *\n\t * @fires modelToViewPosition\n\t * @param modelPosition Model position.\n\t * @param options Additional options for position mapping process.\n\t * @param options.isPhantom Should be set to `true` if the model position to map is pointing to a place\n\t * in model tree which no longer exists. For example, it could be an end of a removed model range.\n\t * @returns Corresponding view position.\n\t */\n\tpublic toViewPosition(\n\t\tmodelPosition: ModelPosition,\n\t\toptions: { isPhantom?: boolean } = {}\n\t): ViewPosition {\n\t\tconst data: MapperModelToViewPositionEventData = {\n\t\t\tmodelPosition,\n\t\t\tmapper: this,\n\t\t\tisPhantom: options.isPhantom\n\t\t};\n\n\t\tthis.fire<MapperModelToViewPositionEvent>( 'modelToViewPosition', data );\n\n\t\treturn data.viewPosition!;\n\t}\n\n\t/**\n\t * Gets all view elements bound to the given marker name.\n\t *\n\t * @param name Marker name.\n\t * @returns View elements bound with the given marker name or `null`\n\t * if no elements are bound to the given marker name.\n\t */\n\tpublic markerNameToElements( name: string ): Set<ViewElement> | null {\n\t\tconst boundElements = this._markerNameToElements.get( name );\n\n\t\tif ( !boundElements ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst elements = new Set<ViewElement>();\n\n\t\tfor ( const element of boundElements ) {\n\t\t\tif ( element.is( 'attributeElement' ) ) {\n\t\t\t\tfor ( const clone of element.getElementsWithSameId() ) {\n\t\t\t\t\telements.add( clone );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telements.add( element );\n\t\t\t}\n\t\t}\n\n\t\treturn elements;\n\t}\n\n\t/**\n\t * **This method is deprecated and will be removed in one of the future CKEditor 5 releases.**\n\t *\n\t * **Using this method will turn off `Mapper` caching system and may degrade performance when operating on bigger documents.**\n\t *\n\t * Registers a callback that evaluates the length in the model of a view element with the given name.\n\t *\n\t * The callback is fired with one argument, which is a view element instance. The callback is expected to return\n\t * a number representing the length of the view element in the model.\n\t *\n\t * ```ts\n\t * // List item in view may contain nested list, which have other list items. In model though,\n\t * // the lists are represented by flat structure. Because of those differences, length of list view element\n\t * // may be greater than one. In the callback it's checked how many nested list items are in evaluated list item.\n\t *\n\t * function getViewListItemLength( element ) {\n\t * \tlet length = 1;\n\t *\n\t * \tfor ( let child of element.getChildren() ) {\n\t * \t\tif ( child.name == 'ul' || child.name == 'ol' ) {\n\t * \t\t\tfor ( let item of child.getChildren() ) {\n\t * \t\t\t\tlength += getViewListItemLength( item );\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t *\n\t * \treturn length;\n\t * }\n\t *\n\t * mapper.registerViewToModelLength( 'li', getViewListItemLength );\n\t * ```\n\t *\n\t * @param viewElementName Name of view element for which callback is registered.\n\t * @param lengthCallback Function return a length of view element instance in model.\n\t * @deprecated\n\t */\n\tpublic registerViewToModelLength(\n\t\tviewElementName: string,\n\t\tlengthCallback: ( element: ViewElement ) => number\n\t): void {\n\t\tthis._viewToModelLengthCallbacks.set( viewElementName, lengthCallback );\n\t}\n\n\t/**\n\t * For the given `viewPosition`, finds and returns the closest ancestor of this position that has a mapping to\n\t * the model.\n\t *\n\t * @param viewPosition Position for which a mapped ancestor should be found.\n\t */\n\tpublic findMappedViewAncestor( viewPosition: ViewPosition ): ViewElement {\n\t\tlet parent: any = viewPosition.parent;\n\n\t\twhile ( !this._viewToModelMapping.has( parent ) ) {\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn parent;\n\t}\n\n\t/**\n\t * Calculates model offset based on the view position and the block element.\n\t *\n\t * Example:\n\t *\n\t * ```html\n\t * <p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, p ) -> 5\n\t * ```\n\t *\n\t * Is a sum of:\n\t *\n\t * ```html\n\t * <p>foo|<b>bar</b></p> // _toModelOffset( p, 3, p ) -> 3\n\t * <p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, b ) -> 2\n\t * ```\n\t *\n\t * @param viewParent Position parent.\n\t * @param viewOffset Position offset.\n\t * @param viewBlock Block used as a base to calculate offset.\n\t * @returns Offset in the model.\n\t */\n\tprivate _toModelOffset(\n\t\tviewParent: ViewElement,\n\t\tviewOffset: number,\n\t\tviewBlock: ViewElement | ViewDocumentFragment\n\t): number {\n\t\tif ( viewBlock != viewParent ) {\n\t\t\t// See example.\n\t\t\tconst offsetToParentStart = this._toModelOffset( viewParent.parent as any, viewParent.index!, viewBlock );\n\t\t\tconst offsetInParent = this._toModelOffset( viewParent, viewOffset, viewParent );\n\n\t\t\treturn offsetToParentStart + offsetInParent;\n\t\t}\n\n\t\t// viewBlock == viewParent, so we need to calculate the offset in the parent element.\n\n\t\t// If the position is a text it is simple (\"ba|r\" -> 2).\n\t\tif ( viewParent.is( '$text' ) ) {\n\t\t\treturn viewOffset;\n\t\t}\n\n\t\t// If the position is in an element we need to sum lengths of siblings ( <b> bar </b> foo | -> 3 + 3 = 6 ).\n\t\tlet modelOffset = 0;\n\n\t\tfor ( let i = 0; i < viewOffset; i++ ) {\n\t\t\tmodelOffset += this.getModelLength( viewParent.getChild( i ) as any );\n\t\t}\n\n\t\treturn modelOffset;\n\t}\n\n\t/**\n\t * Gets the length of the view element in the model.\n\t *\n\t * The length is calculated as follows:\n\t * * if a {@link #registerViewToModelLength length mapping callback} is provided for the given `viewNode`, it is used to\n\t * evaluate the model length (`viewNode` is used as first and only parameter passed to the callback),\n\t * * length of a {@link module:engine/view/text~ViewText text node} is equal to the length of its\n\t * {@link module:engine/view/text~ViewText#data data},\n\t * * length of a {@link module:engine/view/uielement~ViewUIElement ui element} is equal to 0,\n\t * * length of a mapped {@link module:engine/view/element~ViewElement element} is equal to 1,\n\t * * length of a non-mapped {@link module:engine/view/element~ViewElement element} is equal to the length of its children.\n\t *\n\t * Examples:\n\t *\n\t * ```\n\t * foo                          -> 3 // Text length is equal to its data length.\n\t * <p>foo</p>                   -> 1 // Length of an element which is mapped is by default equal to 1.\n\t * <b>foo</b>                   -> 3 // Length of an element which is not mapped is a length of its children.\n\t * <div><p>x</p><p>y</p></div>  -> 2 // Assuming that <div> is not mapped and <p> are mapped.\n\t * ```\n\t *\n\t * @param viewNode View node.\n\t * @returns Length of the node in the tree model.\n\t */\n\tpublic getModelLength( viewNode: ViewNode | ViewDocumentFragment ): number {\n\t\tconst stack = [ viewNode ];\n\t\tlet len = 0;\n\n\t\twhile ( stack.length > 0 ) {\n\t\t\tconst node = stack.pop()!;\n\n\t\t\tconst callback = ( node as any ).name &&\n\t\t\t\tthis._viewToModelLengthCallbacks.size > 0 &&\n\t\t\t\tthis._viewToModelLengthCallbacks.get( ( node as any ).name );\n\n\t\t\tif ( callback ) {\n\t\t\t\tlen += callback( node as ViewElement );\n\t\t\t} else if ( this._viewToModelMapping.has( node as ViewElement ) ) {\n\t\t\t\tlen += 1;\n\t\t\t} else if ( node.is( '$text' ) ) {\n\t\t\t\tlen += node.data.length;\n\t\t\t} else if ( node.is( 'uiElement' ) ) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tfor ( const child of ( node as ViewElement ).getChildren() ) {\n\t\t\t\t\tstack.push( child );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn len;\n\t}\n\n\t/**\n\t * Finds the position in a view element or view document fragment node (or in its children) with the expected model offset.\n\t *\n\t * If the passed `viewContainer` is bound to model, `Mapper` will use caching mechanism to improve performance.\n\t *\n\t * @param viewContainer Tree view element in which we are looking for the position.\n\t * @param modelOffset Expected offset.\n\t * @returns Found position.\n\t */\n\tpublic findPositionIn( viewContainer: ViewElement | ViewDocumentFragment, modelOffset: number ): ViewPosition {\n\t\tif ( modelOffset === 0 ) {\n\t\t\t// Quickly return if asked for a position at the beginning of the container. No need to fire complex mechanisms to find it.\n\t\t\treturn this._moveViewPositionToTextNode( new ViewPosition( viewContainer, 0 ) );\n\t\t}\n\n\t\t// Use cache only if there are no custom view-to-model length callbacks and only for bound elements.\n\t\t// View-to-model length callbacks are deprecated and should be removed in one of the following releases.\n\t\t// Then it will be possible to simplify some logic inside `Mapper`.\n\t\t// Note: we could consider requiring `viewContainer` to be a mapped item.\n\t\tconst useCache = this._viewToModelLengthCallbacks.size == 0 && this._viewToModelMapping.has( viewContainer );\n\n\t\tif ( useCache ) {\n\t\t\tconst cacheItem = this._cache.getClosest( viewContainer, modelOffset );\n\n\t\t\treturn this._findPositionStartingFrom( cacheItem.viewPosition, cacheItem.modelOffset, modelOffset, viewContainer, true );\n\t\t} else {\n\t\t\treturn this._findPositionStartingFrom( new ViewPosition( viewContainer, 0 ), 0, modelOffset, viewContainer, false );\n\t\t}\n\t}\n\n\t/**\n\t * Performs most of the logic for `Mapper#findPositionIn()`.\n\t *\n\t * It allows to start looking for the requested model offset from a given starting position, to enable caching. Using the cache,\n\t * you can set the starting point and skip all the calculations that were already previously done.\n\t *\n\t * This method uses recursion to find positions inside deep structures. Example:\n\t *\n\t * ```\n\t * <p>fo<b>bar</b>bom</p>  -> target offset: 4\n\t * <p>|fo<b>bar</b>bom</p> -> target offset: 4, traversed offset: 0\n\t * <p>fo|<b>bar</b>bom</p> -> target offset: 4, traversed offset: 2\n\t * <p>fo<b>bar</b>|bom</p> -> target offset: 4, traversed offset: 5 -> we are too far, look recursively in <b>.\n\t *\n\t * <p>fo<b>|bar</b>bom</p> -> target offset: 4, traversed offset: 2\n\t * <p>fo<b>bar|</b>bom</p> -> target offset: 4, traversed offset: 5 -> we are too far, look inside \"bar\".\n\t *\n\t * <p>fo<b>ba|r</b>bom</p> -> target offset: 4, traversed offset: 2 -> position is inside text node at offset 4-2 = 2.\n\t * ```\n\t *\n\t * @param startViewPosition View position to start looking from.\n\t * @param startModelOffset Model offset related to `startViewPosition`.\n\t * @param targetModelOffset Target model offset to find.\n\t * @param viewContainer Mapped ancestor of `startViewPosition`. `startModelOffset` is the offset inside a model element or model\n\t * document fragment mapped to `viewContainer`.\n\t * @param useCache Whether `Mapper` should cache positions while traversing the view tree looking for `expectedModelOffset`.\n\t * @returns View position mapped to `targetModelOffset`.\n\t */\n\tprivate _findPositionStartingFrom(\n\t\tstartViewPosition: ViewPosition,\n\t\tstartModelOffset: number,\n\t\ttargetModelOffset: number,\n\t\tviewContainer: ViewElement | ViewDocumentFragment,\n\t\tuseCache: boolean\n\t): ViewPosition {\n\t\tlet viewParent = startViewPosition.parent as ViewElement | ViewText | ViewDocumentFragment;\n\t\tlet viewOffset = startViewPosition.offset;\n\n\t\t// In the text node it is simple: the offset in the model equals the offset in the text.\n\t\tif ( viewParent.is( '$text' ) ) {\n\t\t\treturn new ViewPosition( viewParent, targetModelOffset - startModelOffset );\n\t\t}\n\n\t\t// Last scanned view node.\n\t\tlet viewNode: ViewNode | undefined;\n\t\t// Total model offset of the view nodes that were visited so far.\n\t\tlet traversedModelOffset = startModelOffset;\n\t\t// Model length of the last traversed view node.\n\t\tlet lastLength = 0;\n\n\t\twhile ( traversedModelOffset < targetModelOffset ) {\n\t\t\tviewNode = viewParent.getChild( viewOffset );\n\n\t\t\tif ( !viewNode ) {\n\t\t\t\t// If we still haven't reached the model offset, but we reached end of this `viewParent`, then we need to \"leave\" this\n\t\t\t\t// element and \"go up\", looking further for the target model offset. This can happen when cached model offset is \"deeper\"\n\t\t\t\t// but target model offset is \"higher\" in the view tree.\n\t\t\t\t//\n\t\t\t\t// Example: `<p>Foo<strong><em>Bar</em>^Baz</strong>Xyz</p>`\n\t\t\t\t//\n\t\t\t\t// Consider `^` is last cached position, when the `targetModelOffset` is `12`. In such case, we need to \"go up\" from\n\t\t\t\t// `<strong>` and continue traversing in `<p>`.\n\t\t\t\t//\n\t\t\t\tif ( viewParent == viewContainer ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * A model position could not be mapped to the view because specified model offset was too big and could not be\n\t\t\t\t\t * found inside the mapped view element or view document fragment.\n\t\t\t\t\t *\n\t\t\t\t\t * @error mapping-model-offset-not-found\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'mapping-model-offset-not-found', this, { modelOffset: targetModelOffset, viewContainer } );\n\t\t\t\t} else {\n\t\t\t\t\tviewOffset = viewParent.parent!.getChildIndex( viewParent as ViewElement ) + 1;\n\t\t\t\t\tviewParent = viewParent.parent!;\n\n\t\t\t\t\t// Cache view position after stepping out of the view element to make sure that all visited view positions are cached.\n\t\t\t\t\t// Otherwise, cache invalidation may work incorrectly.\n\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\tthis._cache.save( viewParent, viewOffset, viewContainer, traversedModelOffset );\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( useCache ) {\n\t\t\t\tlastLength = this._getModelLengthAndCache( viewNode, viewContainer, traversedModelOffset );\n\t\t\t} else {\n\t\t\t\tlastLength = this.getModelLength( viewNode );\n\t\t\t}\n\n\t\t\ttraversedModelOffset += lastLength;\n\t\t\tviewOffset++;\n\t\t}\n\n\t\tlet viewPosition = new ViewPosition( viewParent, viewOffset );\n\n\t\tif ( useCache ) {\n\t\t\t// Make sure to hoist view position and save cache for all view positions along the way that have the same `modelOffset`.\n\t\t\t//\n\t\t\t// Consider example view:\n\t\t\t//\n\t\t\t// <p>Foo<strong><i>bar<em>xyz</em></i></strong>abc</p>\n\t\t\t//\n\t\t\t// Lets assume that we looked for model offset `9`, starting  from `6` (as it was previously cached value).\n\t\t\t// In this case we will only traverse over `<em>xyz</em>` and cache view positions after \"xyz\" and after `</em>`.\n\t\t\t// After stepping over `<em>xyz</em>`, we will stop processing this view, as we will reach target model offset `9`.\n\t\t\t//\n\t\t\t// However, position before `</strong>` and before `abc` are also valid positions for model offset `9`.\n\t\t\t// Additionally, `Mapper` is supposed to return \"hoisted\" view positions, that is, we prefer positions that are closer to\n\t\t\t// the mapped `viewContainer`. If a position is nested inside attribute elements, it should be \"moved up\" if possible.\n\t\t\t//\n\t\t\t// As we hoist the view position, we need to make sure that all view positions valid for model offset `9` are cached.\n\t\t\t// This is necessary for cache invalidation to work correctly.\n\t\t\t//\n\t\t\t// To hoist a view position, we \"go up\" as long as the position is at the end of a non-mapped view element. We also cache\n\t\t\t// all necessary values. See example:\n\t\t\t//\n\t\t\t// <p>Foo<strong><i>bar<em>xyz</em>^</i></strong>abc</p>\n\t\t\t// <p>Foo<strong><i>bar<em>xyz</em></i>^</strong>abc</p>\n\t\t\t// <p>Foo<strong><i>bar<em>xyz</em></i></strong>^abc</p>\n\t\t\t//\n\t\t\twhile ( viewPosition.isAtEnd && viewPosition.parent !== viewContainer && viewPosition.parent.parent ) {\n\t\t\t\tconst cacheViewParent: ViewElement | ViewDocumentFragment = viewPosition.parent.parent;\n\t\t\t\tconst cacheViewOffset: number = cacheViewParent.getChildIndex( viewPosition.parent ) + 1;\n\n\t\t\t\tthis._cache.save( cacheViewParent, cacheViewOffset, viewContainer, traversedModelOffset );\n\n\t\t\t\tviewPosition = new ViewPosition( cacheViewParent, cacheViewOffset );\n\t\t\t}\n\t\t}\n\n\t\tif ( traversedModelOffset == targetModelOffset ) {\n\t\t\t// If it equals we found the position.\n\t\t\t//\n\t\t\t// Try moving view position into a text node if possible, as the editor engine prefers positions inside view text nodes.\n\t\t\t//\n\t\t\t// <p>Foo<strong><i>bar<em>xyz</em></i></strong>[]abc</p>    -->     <p>Foo<strong><i>bar<em>xyz</em></i></strong>{}abc</p>\n\t\t\t//\n\t\t\treturn this._moveViewPositionToTextNode( viewPosition );\n\t\t} else {\n\t\t\t// If it is higher we overstepped with the last traversed view node.\n\t\t\t// We need to \"enter\" it, and look for the view position / model offset inside the last visited view node.\n\t\t\treturn this._findPositionStartingFrom(\n\t\t\t\tnew ViewPosition( viewNode!, 0 ),\n\t\t\t\ttraversedModelOffset - lastLength,\n\t\t\t\ttargetModelOffset,\n\t\t\t\tviewContainer,\n\t\t\t\tuseCache\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the length of the view element in the model and updates cache values after each view item it visits.\n\t *\n\t * See also {@link #getModelLength}.\n\t *\n\t * @param viewNode View node.\n\t * @param viewContainer Ancestor of `viewNode` that is a mapped view element.\n\t * @param modelOffset Model offset at which the `viewNode` starts.\n\t * @returns Length of the node in the tree model.\n\t */\n\tprivate _getModelLengthAndCache( viewNode: ViewNode, viewContainer: ViewElement | ViewDocumentFragment, modelOffset: number ): number {\n\t\tlet len = 0;\n\n\t\tif ( this._viewToModelMapping.has( viewNode as ViewElement ) ) {\n\t\t\tlen = 1;\n\t\t} else if ( viewNode.is( '$text' ) ) {\n\t\t\tlen = viewNode.data.length;\n\t\t} else if ( !viewNode.is( 'uiElement' ) ) {\n\t\t\tfor ( const child of ( viewNode as ViewElement ).getChildren() ) {\n\t\t\t\tlen += this._getModelLengthAndCache( child, viewContainer, modelOffset + len );\n\t\t\t}\n\t\t}\n\n\t\tthis._cache.save( viewNode.parent!, viewNode.index! + 1, viewContainer, modelOffset + len );\n\n\t\treturn len;\n\t}\n\n\t/**\n\t * Because we prefer positions in the text nodes over positions next to text nodes, if the view position was next to a text node,\n\t * it moves it into the text node instead.\n\t *\n\t * ```\n\t * <p>[]<b>foo</b></p> -> <p>[]<b>foo</b></p> // do not touch if position is not directly next to text\n\t * <p>foo[]<b>foo</b></p> -> <p>foo{}<b>foo</b></p> // move to text node\n\t * <p><b>[]foo</b></p> -> <p><b>{}foo</b></p> // move to text node\n\t * ```\n\t *\n\t * @param viewPosition Position potentially next to the text node.\n\t * @returns Position in the text node if possible.\n\t */\n\tprivate _moveViewPositionToTextNode( viewPosition: ViewPosition ): ViewPosition {\n\t\t// If the position is just after a text node, put it at the end of that text node.\n\t\t// If the position is just before a text node, put it at the beginning of that text node.\n\t\tconst nodeBefore = viewPosition.nodeBefore;\n\t\tconst nodeAfter = viewPosition.nodeAfter;\n\n\t\tif ( nodeBefore && nodeBefore.is( 'view:$text' ) ) {\n\t\t\treturn new ViewPosition( nodeBefore, nodeBefore.data.length );\n\t\t} else if ( nodeAfter && nodeAfter.is( 'view:$text' ) ) {\n\t\t\treturn new ViewPosition( nodeAfter, 0 );\n\t\t}\n\n\t\t// Otherwise, just return the given position.\n\t\treturn viewPosition;\n\t}\n}\n\n/**\n * Cache mechanism for {@link module:engine/conversion/mapper~Mapper Mapper}.\n *\n * `MapperCache` improves performance for model-to-view position mapping, which is the main `Mapper` task. Asking for a mapping is much\n * more frequent than actually performing changes, and even if the change happens, we can still partially keep the cache. This makes\n * caching a useful strategy for `Mapper`.\n *\n * `MapperCache` will store some data for view elements or view document fragments that are mapped by the `Mapper`. These view items\n * are \"tracked\" by the `MapperCache`. For such view items, we will keep entries of model offsets inside their mapped counterpart. For\n * the cached model offsets, we will keep a view position that is inside the tracked item. This allows us to either get the mapping\n * instantly, or at least in less steps than when calculating it from the beginning.\n *\n * Important problem related to caching is invalidating the cache. The cache must be invalidated each time the tracked view item changes.\n * Additionally, we should invalidate as small part of the cache as possible. Since all the logic is encapsulated inside `MapperCache`,\n * the `MapperCache` listens to view items {@link module:engine/view/node~ViewNodeChangeEvent `change` event} and reacts to it.\n * Then, it invalidates just the part of the cache that is \"after\" the changed part of the view.\n *\n * As mentioned, `MapperCache` currently is used only for model-to-view position mapping as it was much bigger problem than view-to-model\n * mapping. However, it should be possible to use it also for view-to-model.\n *\n * The main assumptions regarding `MapperCache` are:\n *\n * * it is an internal tool, used by `Mapper`, transparent to the outside (no additional effort when developing a plugin or a converter),\n * * it stores all the necessary data internally, which makes it easier to disable or debug,\n * * it is optimized for initial downcast process (long insertions), which is crucial for editor init and data save,\n * * it does not save all possible positions mapping for memory considerations, although it is a possible improvement, which may increase\n *   performance, as well as simplify some parts of the `MapperCache` logic.\n *\n * @internal\n */\nexport class MapperCache extends MapperCacheBase {\n\t/**\n\t * For every view element or document fragment tracked by `MapperCache`, it holds currently cached data, or more precisely,\n\t * model offset to view position mappings. See also `MappingCache` and `CacheItem`.\n\t *\n\t * If an item is tracked by `MapperCache` it has an entry in this structure, so this structure can be used to check which items\n\t * are tracked by `MapperCache`. When an item is no longer tracked, it is removed from this structure.\n\t *\n\t * Although `MappingCache` and `CacheItem` structures allows for caching any model offsets and view positions, we only cache\n\t * values for model offsets that are after a view node. So, in essence, positions inside text nodes are not cached. However, it takes\n\t * from one to at most a few steps, to get from a cached position to a position that is inside a view text node.\n\t *\n\t * Additionally, only one item per `modelOffset` is cached. There can be several view positions that map to the same `modelOffset`.\n\t * Only the first save for `modelOffset` is stored.\n\t */\n\tprivate _cachedMapping = new WeakMap<ViewElement | ViewDocumentFragment, MappingCache>();\n\n\t/**\n\t * When `MapperCache` {@link ~MapperCache#save saves} view position -> model offset mapping, a `CacheItem` is inserted into certain\n\t * `MappingCache#cacheList` at some index. Additionally, we store that index with the view node that is before the cached view position.\n\t *\n\t * This allows to quickly get a cache list item related to certain view node, and hence, for fast cache invalidation.\n\t *\n\t * For example, consider view: `<p>Some <strong>bold</strong> text.</p>`, where `<p>` is a view element tracked by `MapperCache`.\n\t * If all `<p>` children were visited by `MapperCache`, then `<p>` cache list would have four items, related to following model offsets:\n\t * `0`, `5`, `9`, `15`. Then, view node `\"Some \"` would have index `1`, `<strong>` index `2`, and `\" text.\" index `3`.\n\t *\n\t * Note that the index related with a node is always greater than `0`. The first item in cache list is always for model offset `0`\n\t * (and view offset `0`), and it is not related to any node.\n\t */\n\tprivate _nodeToCacheListIndex = new WeakMap<ViewNode, number>();\n\n\t/**\n\t * Callback fired whenever there is a direct or indirect children change in tracked view element or tracked view document fragment.\n\t *\n\t * This is specified as a property to make it easier to set as an event callback and to later turn off that event.\n\t */\n\tprivate _invalidateOnChildrenChangeCallback: GetCallback<ViewNodeChangeEvent> = ( evt, viewNode, data ) => {\n\t\t// View element or document fragment changed its children at `data.index`. Clear all cache starting from before that index.\n\t\tthis._clearCacheInsideParent( viewNode as ViewElement | ViewDocumentFragment, data!.index );\n\t};\n\n\t/**\n\t * Callback fired whenever a view text node directly or indirectly inside a tracked view element or tracked view document fragment\n\t * changes its text data.\n\t *\n\t * This is specified as a property to make it easier to set as an event callback and to later turn off that event.\n\t */\n\tprivate _invalidateOnTextChangeCallback: GetCallback<ViewNodeChangeEvent> = ( evt, viewNode ) => {\n\t\t// It is enough to validate starting from \"after the text node\", because the first cache entry that we might want to invalidate\n\t\t// is the position after this text node.\n\t\t//\n\t\t// For example - assume following view and following view positions cached (marked by `^`): `<p>Foo^<strong>bar^</strong>^abc^</p>`.\n\t\t//\n\t\t// If we change text \"bar\", we only need to invalidate cached positions after it. Cached positions before the text are not changed.\n\t\t//\n\t\tthis._clearCacheAfter( viewNode );\n\t};\n\n\t/**\n\t * Saves cache for given view position mapping <-> model offset mapping. The view position should be after a node (i.e. it cannot\n\t * be the first position inside its parent, or in other words, `viewOffset` must be greater than `0`).\n\t *\n\t * Note, that if `modelOffset` for given `viewContainer` was already saved, the stored view position (i.e. parent+offset) will not\n\t * be overwritten. However, it is important to still save it, as we still store additional data related to cached view positions.\n\t *\n\t * @param viewParent View position parent.\n\t * @param viewOffset View position offset. Must be greater than `0`.\n\t * @param viewContainer Tracked view position ascendant (it may be the direct parent of the view position).\n\t * @param modelOffset Model offset in the model element or document fragment which is mapped to `viewContainer`.\n\t */\n\tpublic save(\n\t\tviewParent: ViewElement | ViewDocumentFragment,\n\t\tviewOffset: number,\n\t\tviewContainer: ViewElement | ViewDocumentFragment,\n\t\tmodelOffset: number\n\t): void {\n\t\t// Get current cache for the tracked ancestor.\n\t\tconst cache = this._cachedMapping.get( viewContainer )!;\n\t\t// See if there is already a cache defined for `modelOffset`.\n\t\tconst cacheItem = cache.cacheMap.get( modelOffset );\n\n\t\tif ( cacheItem ) {\n\t\t\t// We already cached this offset. Don't overwrite the cache.\n\t\t\t// However, we still need to set a proper entry in `_nodeToCacheListIndex`. We can figure it out based on existing `cacheItem`.\n\t\t\t//\n\t\t\t// We have a `cacheItem` for the `modelOffset`, so we can get a `viewPosition` from there. Before that view position, there\n\t\t\t// must be a node. That node must have an index set. This will be the index we will want to use.\n\t\t\t// Since we expect `viewOffset` to be greater than 0, then in almost all cases `modelOffset` will be greater than 0 as well.\n\t\t\t// As a result, we can expect `cacheItem.viewPosition.nodeBefore` to be set.\n\t\t\t//\n\t\t\t// However, in an edge case, were the tracked element contains a 0-model-length view element as the first child (UI element or\n\t\t\t// an empty attribute element), then `modelOffset` will be 0, and `cacheItem.viewPosition` will be before any view node.\n\t\t\t// In such edge case, `cacheItem.viewPosition.nodeBefore` is `undefined`, so we set index to `0`.\n\t\t\t//\n\t\t\tconst viewChild = viewParent.getChild( viewOffset - 1 )!;\n\t\t\tconst index = cacheItem.viewPosition.nodeBefore ? this._nodeToCacheListIndex.get( cacheItem.viewPosition.nodeBefore )! : 0;\n\n\t\t\tthis._nodeToCacheListIndex.set( viewChild, index );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewPosition = new ViewPosition( viewParent, viewOffset );\n\t\tconst newCacheItem = { viewPosition, modelOffset };\n\n\t\t// Extend the valid cache range.\n\t\tcache.maxModelOffset = modelOffset > cache.maxModelOffset ? modelOffset : cache.maxModelOffset;\n\n\t\t// Save the new cache item to the `cacheMap`.\n\t\tcache.cacheMap.set( modelOffset, newCacheItem );\n\n\t\t// Save the new cache item to the `cacheList`.\n\t\tlet i = cache.cacheList.length - 1;\n\n\t\t// Mostly, we cache elements at the end of `cacheList` and the loop does not execute even once. But when we recursively visit nodes\n\t\t// in `Mapper#_findPositionIn()`, then we will first cache the parent, and then it's children, and they will not be added at the\n\t\t// end of `cacheList`. This is why we need to find correct index to insert them.\n\t\twhile ( i >= 0 && cache.cacheList[ i ].modelOffset > modelOffset ) {\n\t\t\ti--;\n\t\t}\n\n\t\tcache.cacheList.splice( i + 1, 0, newCacheItem );\n\n\t\tif ( viewOffset > 0 ) {\n\t\t\tconst viewChild = viewParent.getChild( viewOffset - 1 )!;\n\t\t\t// There was an idea to also cache `viewContainer` here but, it could lead to wrong results. If we wanted to cache\n\t\t\t// `viewContainer`, we probably would need to clear `this._nodeToCacheListIndex` when cache is cleared.\n\t\t\t// Also, there was no gain from caching this value, the results were almost the same (statistical error).\n\t\t\tthis._nodeToCacheListIndex.set( viewChild, i + 1 );\n\t\t}\n\t}\n\n\t/**\n\t * For given `modelOffset` inside a model element mapped to given `viewContainer`, it returns the closest saved cache item\n\t * (view position and related model offset) to the requested one.\n\t *\n\t * It can be exactly the requested mapping, or it can be mapping that is the closest starting point to look for the requested mapping.\n\t *\n\t * `viewContainer` must be a view element or document fragment that is mapped by the {@link ~Mapper Mapper}.\n\t *\n\t * If `viewContainer` is not yet tracked by the `MapperCache`, it will be automatically tracked after calling this method.\n\t *\n\t * Note: this method will automatically \"hoist\" cached positions, i.e. it will return a position that is closest to the tracked element.\n\t *\n\t * For example, if `<p>` is tracked element, and `^` is cached position:\n\t *\n\t * ```\n\t * <p>This is <strong>some <em>heavily <u>formatted</u>^</em></strong> text.</p>\n\t * ```\n\t *\n\t * If this position would be returned, instead, a position directly in `<p>` would be returned:\n\t *\n\t * ```\n\t * <p>This is <strong>some <em>heavily <u>formatted</u></em></strong>^ text.</p>\n\t * ```\n\t *\n\t * Note, that `modelOffset` for both positions is the same.\n\t *\n\t * @param viewContainer Tracked view element or document fragment, which cache will be used.\n\t * @param modelOffset Model offset in a model element or document fragment, which is mapped to `viewContainer`.\n\t */\n\tpublic getClosest( viewContainer: ViewElement | ViewDocumentFragment, modelOffset: number ): CacheItem {\n\t\tconst cache = this._cachedMapping.get( viewContainer );\n\t\tlet result: CacheItem;\n\n\t\tif ( cache ) {\n\t\t\tif ( modelOffset > cache.maxModelOffset ) {\n\t\t\t\tresult = cache.cacheList[ cache.cacheList.length - 1 ];\n\t\t\t} else {\n\t\t\t\tconst cacheItem = cache.cacheMap.get( modelOffset );\n\n\t\t\t\tif ( cacheItem ) {\n\t\t\t\t\tresult = cacheItem;\n\t\t\t\t} else {\n\t\t\t\t\tresult = this._findInCacheList( cache.cacheList, modelOffset );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tresult = this.startTracking( viewContainer );\n\t\t}\n\n\t\treturn {\n\t\t\tmodelOffset: result.modelOffset,\n\t\t\tviewPosition: result.viewPosition.clone()\n\t\t};\n\t}\n\n\t/**\n\t * Starts tracking given `viewContainer`, which must be mapped to a model element or model document fragment.\n\t *\n\t * Note, that this method is automatically called by\n\t * {@link module:engine/conversion/mapper~MapperCache#getClosest `MapperCache#getClosest()`} and there is no need to call it manually.\n\t *\n\t * This method initializes the cache for `viewContainer` and adds callbacks for\n\t * {@link module:engine/view/node~ViewNodeChangeEvent `change` event} fired by `viewContainer`. `MapperCache` listens to `change` event\n\t * on the tracked elements to invalidate the stored cache.\n\t */\n\tpublic startTracking( viewContainer: ViewElement | ViewDocumentFragment ): CacheItem {\n\t\tconst viewPosition = new ViewPosition( viewContainer, 0 );\n\t\tconst initialCacheItem = { viewPosition, modelOffset: 0 };\n\t\tconst initialCache: MappingCache = {\n\t\t\tmaxModelOffset: 0,\n\t\t\tcacheList: [ initialCacheItem ],\n\t\t\tcacheMap: new Map( [ [ 0, initialCacheItem ] ] )\n\t\t};\n\n\t\tthis._cachedMapping.set( viewContainer, initialCache );\n\n\t\t// Listen to changes in tracked view containers in order to invalidate the cache.\n\t\t//\n\t\t// Possible performance improvement. This event bubbles, so if there are multiple tracked (mapped) elements that are ancestors\n\t\t// then this will be unnecessarily fired for each ancestor. This could be rewritten to listen only to roots and document fragments.\n\t\tviewContainer.on<ViewNodeChangeEvent>( 'change:children', this._invalidateOnChildrenChangeCallback );\n\t\tviewContainer.on<ViewNodeChangeEvent>( 'change:text', this._invalidateOnTextChangeCallback );\n\n\t\treturn initialCacheItem;\n\t}\n\n\t/**\n\t * Stops tracking given `viewContainer`.\n\t *\n\t * It removes the cached data and stops listening to {@link module:engine/view/node~ViewNodeChangeEvent `change` event} on the\n\t * `viewContainer`.\n\t */\n\tpublic stopTracking( viewContainer: ViewElement | ViewDocumentFragment ): void {\n\t\tviewContainer.off( 'change:children', this._invalidateOnChildrenChangeCallback );\n\t\tviewContainer.off( 'change:text', this._invalidateOnTextChangeCallback );\n\n\t\tthis._cachedMapping.delete( viewContainer );\n\t}\n\n\t/**\n\t * Invalidates cache inside `viewParent`, starting from given `index` in that parent.\n\t *\n\t * This method may clear a bit more cache than just what was saved after given `index`, but it is guaranteed that at least it\n\t * will invalidate everything after `index`.\n\t */\n\tprivate _clearCacheInsideParent( viewParent: ViewElement | ViewDocumentFragment, index: number ) {\n\t\tif ( index == 0 ) {\n\t\t\t// Change at the beginning of the parent.\n\t\t\tif ( this._cachedMapping.has( viewParent ) ) {\n\t\t\t\t// If this is a tracked element, clear all cache.\n\t\t\t\tthis._clearCacheAll( viewParent );\n\t\t\t} else {\n\t\t\t\t// If this is not a tracked element, remove cache starting from before this element.\n\t\t\t\t// Since it is not a tracked element, it has to have a parent.\n\t\t\t\tthis._clearCacheInsideParent( ( viewParent as ViewElement ).parent!, ( viewParent as ViewElement ).index! );\n\t\t\t}\n\t\t} else {\n\t\t\t// Change in the middle of the parent. Get a view node that's before the change.\n\t\t\tconst lastValidNode = viewParent.getChild( index - 1 )!;\n\n\t\t\t// Then, clear all cache after this view node.\n\t\t\t//\n\t\t\tthis._clearCacheAfter( lastValidNode );\n\t\t}\n\t}\n\n\t/**\n\t * Clears all the cache for given tracked `viewContainer`.\n\t */\n\tprivate _clearCacheAll( viewContainer: ViewElement | ViewDocumentFragment ) {\n\t\tconst cache = this._cachedMapping.get( viewContainer )!;\n\n\t\t// TODO: Should clear `_nodeToCacheListIndex` too?\n\t\tif ( cache.maxModelOffset > 0 ) {\n\t\t\tcache.maxModelOffset = 0;\n\t\t\tcache.cacheList.length = 1;\n\t\t\tcache.cacheMap.clear();\n\t\t\tcache.cacheMap.set( 0, cache.cacheList[ 0 ] );\n\t\t}\n\t}\n\n\t/**\n\t * Clears all the stored cache that is after given `viewNode`. The `viewNode` can be any node that is inside a tracked view element\n\t * or view document fragment.\n\t *\n\t * In reality, this function may clear a bit more cache than just \"starting after\" `viewNode`, but it is guaranteed that at least\n\t * all cache after `viewNode` is invalidated.\n\t */\n\tprivate _clearCacheAfter( viewNode: ViewNode ): void {\n\t\t// To quickly invalidate the cache, we base on the cache list index stored with the node. See docs for `this._nodeToCacheListIndex`.\n\t\tconst cacheListIndex = this._nodeToCacheListIndex.get( viewNode );\n\n\t\t// If there is no index stored, it means that this `viewNode` has not been cached yet.\n\t\tif ( cacheListIndex === undefined ) {\n\t\t\t// If the node is not cached, maybe it's parent is. We will try to invalidate the cache using the parent.\n\t\t\tconst viewParent = viewNode.parent as ViewElement;\n\n\t\t\t// If the parent is a non-tracked element, try clearing the cache starting from the position before it.\n\t\t\t//\n\t\t\t// For example: `<p>Abc<strong>def<em>ghi</em></strong></p>`.\n\t\t\t//\n\t\t\t// If `viewNode` is `<em>` in this case, and it was not cached yet, we will try to clear cache starting from before `<strong>`.\n\t\t\t//\n\t\t\t// If the parent is a tracked element, then it means there's no cache to clear (nothing after the element is cached).\n\t\t\t// In this case, there's nothing to do. We assume that there are no \"holes\" in caching in direct children of tracked element\n\t\t\t// (that is if some children is cached, then its previous sibling is cached too, and we would not end up inside this `if`).\n\t\t\t//\n\t\t\t// TODO: Most probably this `if` could be removed altogether, after recent changes in Mapper.\n\t\t\t// TODO: Now we cache all items one after another, so there aren't any \"holes\" anywhere, not only on top-level.\n\t\t\t//\n\t\t\tif ( !this._cachedMapping.has( viewParent ) ) {\n\t\t\t\tthis._clearCacheInsideParent( viewParent.parent!, viewParent.index! );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tlet viewContainer = viewNode.parent!;\n\n\t\twhile ( !this._cachedMapping.has( viewContainer ) ) {\n\t\t\tviewContainer = viewContainer.parent!;\n\t\t}\n\n\t\tthis._clearCacheFromCacheIndex( viewContainer, cacheListIndex );\n\t}\n\n\t/**\n\t * Clears all the cache in the cache list related to given `viewContainer`, starting from `index` (inclusive).\n\t */\n\tprivate _clearCacheFromCacheIndex( viewContainer: ViewElement | ViewDocumentFragment, index: number ) {\n\t\tif ( index === 0 ) {\n\t\t\t// Don't remove the first entry in the cache (this entry is always a mapping between view offset 0 <-> model offset 0,\n\t\t\t// and it is a default value that is always expected to be in the cache list).\n\t\t\t//\n\t\t\t// The cache mechanism may ask to clear from index `0` in a case where a 0-model-length view element (UI element or empty\n\t\t\t// attribute element) was at the beginning of tracked element. In such scenario, the view element is mapped through\n\t\t\t// `nodeToCacheListIndex` to index `0`.\n\t\t\tindex = 1;\n\t\t}\n\n\t\t// Cache is always available here because we initialize it just before adding a listener that fires `_clearCacheFromIndex()`.\n\t\tconst cache = this._cachedMapping.get( viewContainer )!;\n\t\tconst cacheItem = cache.cacheList[ index - 1 ];\n\n\t\tif ( !cacheItem ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcache.maxModelOffset = cacheItem.modelOffset;\n\n\t\t// Remove from cache all `CacheItem`s that are \"after\" the index to clear from.\n\t\tconst clearedItems = cache.cacheList.splice( index );\n\n\t\t// For each removed item, make sure to also remove it from `cacheMap` and clear related entry in `_nodeToCacheListIndex`.\n\t\tfor ( const item of clearedItems ) {\n\t\t\tcache.cacheMap.delete( item.modelOffset );\n\n\t\t\tconst viewNode = item.viewPosition.nodeBefore!;\n\t\t\tthis._nodeToCacheListIndex.delete( viewNode );\n\t\t}\n\t}\n\n\t/**\n\t * Finds a cache item in the given cache list, which `modelOffset` is closest (but smaller or equal) to given `offset`.\n\t *\n\t * Since `cacheList` is a sorted array, this uses binary search to retrieve the item quickly.\n\t */\n\tprivate _findInCacheList( cacheList: Array<CacheItem>, offset: number ): CacheItem {\n\t\tlet start = 0;\n\t\tlet end = cacheList.length - 1;\n\t\tlet index = ( end - start ) >> 1;\n\t\tlet item = cacheList[ index ];\n\n\t\twhile ( start < end ) {\n\t\t\tif ( item.modelOffset < offset ) {\n\t\t\t\tstart = index + 1;\n\t\t\t} else {\n\t\t\t\tend = index - 1;\n\t\t\t}\n\n\t\t\tindex = start + ( ( end - start ) >> 1 );\n\t\t\titem = cacheList[ index ];\n\t\t}\n\n\t\treturn item.modelOffset <= offset ? item : cacheList[ index - 1 ];\n\t}\n}\n\n/**\n * Fired for each model-to-view position mapping request. The purpose of this event is to enable custom model-to-view position\n * mapping. Callbacks added to this event take {@link module:engine/model/position~ModelPosition model position} and are expected to\n * calculate the {@link module:engine/view/position~ViewPosition view position}. The calculated view position should be added as\n * a `viewPosition` value in the `data` object that is passed as one of parameters to the event callback.\n *\n * ```ts\n * // Assume that \"captionedImage\" model element is converted to <img> and following <span> elements in view,\n * // and the model element is bound to <img> element. Force mapping model positions inside \"captionedImage\" to that\n * // <span> element.\n * mapper.on( 'modelToViewPosition', ( evt, data ) => {\n * \tconst positionParent = modelPosition.parent;\n *\n * \tif ( positionParent.name == 'captionedImage' ) {\n * \t\tconst viewImg = data.mapper.toViewElement( positionParent );\n * \t\tconst viewCaption = viewImg.nextSibling; // The <span> element.\n *\n * \t\tdata.viewPosition = new ViewPosition( viewCaption, modelPosition.offset );\n *\n * \t\t// Stop the event if other callbacks should not modify calculated value.\n * \t\tevt.stop();\n * \t}\n * } );\n * ```\n *\n * **Note:** keep in mind that sometimes a \"phantom\" model position is being converted. A \"phantom\" model position is\n * a position that points to a nonexistent place in model. Such a position might still be valid for conversion, though\n * (it would point to a correct place in the view when converted). One example of such a situation is when a range is\n * removed from the model, there may be a need to map the range's end (which is no longer a valid model position). To\n * handle such situations, check the `data.isPhantom` flag:\n *\n * ```ts\n * // Assume that there is a \"customElement\" model element and whenever the position is before it,\n * // we want to move it to the inside of the view element bound to \"customElement\".\n * mapper.on( 'modelToViewPosition', ( evt, data ) => {\n * \tif ( data.isPhantom ) {\n * \t\treturn;\n * \t}\n *\n * \t// Below line might crash for phantom position that does not exist in model.\n * \tconst sibling = data.modelPosition.nodeBefore;\n *\n * \t// Check if this is the element we are interested in.\n * \tif ( !sibling.is( 'element', 'customElement' ) ) {\n * \t\treturn;\n * \t}\n *\n * \tconst viewElement = data.mapper.toViewElement( sibling );\n *\n * \tdata.viewPosition = new ViewPosition( sibling, 0 );\n *\n * \tevt.stop();\n * } );\n * ```\n *\n * **Note:** the default mapping callback is provided with a `low` priority setting and does not cancel the event, so it is possible to\n * attach a custom callback after a default callback and also use `data.viewPosition` calculated by the default callback\n * (for example to fix it).\n *\n * **Note:** the default mapping callback will not fire if `data.viewPosition` is already set.\n *\n * **Note:** these callbacks are called **very often**. For efficiency reasons, it is advised to use them only when position\n * mapping between the given model and view elements is unsolvable by using just elements mapping and default algorithm.\n * Also, the condition that checks if a special case scenario happened should be as simple as possible.\n *\n * @eventName ~Mapper#modelToViewPosition\n */\nexport type MapperModelToViewPositionEvent = {\n\tname: 'modelToViewPosition';\n\targs: [ MapperModelToViewPositionEventData ];\n};\n\n/**\n * Data pipeline object that can store and pass data between callbacks. The callback should add\n * the `viewPosition` value to that object with calculated the {@link module:engine/view/position~ViewPosition view position}.\n */\nexport type MapperModelToViewPositionEventData = {\n\n\t/**\n\t * Mapper instance that fired the event.\n\t */\n\tmapper: Mapper;\n\n\t/**\n\t * The model position.\n\t */\n\tmodelPosition: ModelPosition;\n\n\t/**\n\t * The callback should add the `viewPosition` value to that object with calculated the\n\t * {@link module:engine/view/position~ViewPosition view position}.\n\t */\n\tviewPosition?: ViewPosition;\n\n\t/**\n\t * Should be set to `true` if the model position to map is pointing to a place\n\t * in model tree which no longer exists. For example, it could be an end of a removed model range.\n\t */\n\tisPhantom?: boolean;\n};\n\n/**\n * Fired for each view-to-model position mapping request. See {@link module:engine/conversion/mapper~Mapper#event:modelToViewPosition}.\n *\n * ```ts\n * // See example in `modelToViewPosition` event description.\n * // This custom mapping will map positions from <span> element next to <img> to the \"captionedImage\" element.\n * mapper.on( 'viewToModelPosition', ( evt, data ) => {\n * \tconst positionParent = viewPosition.parent;\n *\n * \tif ( positionParent.hasClass( 'image-caption' ) ) {\n * \t\tconst viewImg = positionParent.previousSibling;\n * \t\tconst modelImg = data.mapper.toModelElement( viewImg );\n *\n * \t\tdata.modelPosition = new ModelPosition( modelImg, viewPosition.offset );\n * \t\tevt.stop();\n * \t}\n * } );\n * ```\n *\n * **Note:** the default mapping callback is provided with a `low` priority setting and does not cancel the event, so it is possible to\n * attach a custom callback after the default callback and also use `data.modelPosition` calculated by the default callback\n * (for example to fix it).\n *\n * **Note:** the default mapping callback will not fire if `data.modelPosition` is already set.\n *\n * **Note:** these callbacks are called **very often**. For efficiency reasons, it is advised to use them only when position\n * mapping between the given model and view elements is unsolvable by using just elements mapping and default algorithm.\n * Also, the condition that checks if special case scenario happened should be as simple as possible.\n *\n * @eventName ~Mapper#viewToModelPosition\n */\nexport type MapperViewToModelPositionEvent = {\n\tname: 'viewToModelPosition';\n\targs: [ MapperViewToModelPositionEventData ];\n};\n\n/**\n * Data pipeline object that can store and pass data between callbacks. The callback should add\n * `modelPosition` value to that object with calculated {@link module:engine/model/position~ModelPosition model position}.\n */\nexport type MapperViewToModelPositionEventData = {\n\n\t/**\n\t * Mapper instance that fired the event.\n\t */\n\tmapper: Mapper;\n\n\t/**\n\t * The callback should add `modelPosition` value to that object with calculated\n\t * {@link module:engine/model/position~ModelPosition model position}.\n\t */\n\tmodelPosition?: ModelPosition;\n\n\t/**\n\t * The view position.\n\t */\n\tviewPosition: ViewPosition;\n};\n\n/**\n * Holds cache data for model to view mappings for a view element or view document fragment.\n *\n * {@link ~MapperCache MapperCache} keeps a `MappingCache` item for each tracked view element or document fragment (which essentially means\n * one `MappingCache` for each model element or a model document fragment).\n */\ntype MappingCache = {\n\n\t/**\n\t * Maximum model offset for which this item holds a valid cache.\n\t *\n\t * If there is a request for mapping for a model offset above this value, the view position needs to be calculated.\n\t */\n\tmaxModelOffset: number;\n\n\t/**\n\t * List of cached {@link ~CacheItem cache items} for this mapped view/model element. The list is sorted by\n\t * {@link ~CacheItem#modelOffset `CacheItem#modelOffset`} values. This makes it faster to search for the closest mapped model offset.\n\t *\n\t * For example, if the cache stores values for model offsets: `0`, `20` and `33`, and there is a mapping request for offset `26`,\n\t * we can quickly find cached value for offset `20` and continue calculating offset from there.\n\t *\n\t * Note, that there is only one entry in `cacheList` for given `modelOffset` value.\n\t */\n\tcacheList: Array<CacheItem>;\n\n\t/**\n\t * Map of cached {@link ~CacheItem cache items} for this mapped view/model element. The keys are `modelOffset`s\n\t * (as defined in `CacheItem`) and values are the `CacheItem` objects.\n\t *\n\t * This is a different representation of `cacheList`, and it is used for different purposes. Since it is a map, it is very fast to\n\t * retrieve data for exact `modelOffset`s which were already cached before. But a sorted list is better for finding the closest item\n\t * if exact item is not found. Also, it is faster to clear \"all entries after model offset X\" for `cacheList`.\n\t */\n\tcacheMap: Map<number, CacheItem>;\n};\n\n/**\n * Informs that given `viewPosition` corresponds to given `modelOffset` (with the assumption that the model offset is in a model element\n * mapped to the `viewPosition` parent or its ancestor).\n *\n * For example, for model `<paragraph>Some <$text bold=true>bold</$text> text</paragraph>` and view `<p>Some <strong>bold</strong> text</p>`\n * and assuming `<paragraph>` and `<p>` are mapped, following example `CacheItem`s are possible:\n *\n * * `viewPosition` = `<p>`, 1; `modelOffset` = 5\n * * `viewPosition` = `<strong>, 1; `modelOffset` = 9\n * * `viewPosition` = `<p>`, 2; `modelOffset` = 9\n * * `viewPosition` = `<p>`, 3; `modelOffset` = 14\n */\ntype CacheItem = {\n\tviewPosition: ViewPosition;\n\tmodelOffset: number;\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/**\n * @module engine/conversion/modelconsumable\n */\n\nimport { ModelTextProxy } from '../model/textproxy.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport { type ModelItem } from '../model/item.js';\nimport { type ModelSelection } from '../model/selection.js';\nimport { type ModelDocumentSelection } from '../model/documentselection.js';\nimport { type ModelRange } from '../model/range.js';\n\n/**\n * Manages a list of consumable values for the {@link module:engine/model/item~ModelItem model items}.\n *\n * Consumables are various aspects of the model. A model item can be broken down into separate, single properties that might be\n * taken into consideration when converting that item.\n *\n * `ModelConsumable` is used by {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} while analyzing the changed\n * parts of {@link module:engine/model/document~ModelDocument the document}. The added / changed / removed model items are broken down\n * into singular properties (the item itself and its attributes). All those parts are saved in `ModelConsumable`. Then,\n * during conversion, when the given part of a model item is converted (i.e. the view element has been inserted into the view,\n * but without attributes), the consumable value is removed from `ModelConsumable`.\n *\n * For model items, `ModelConsumable` stores consumable values of one of following types: `insert`, `addattribute:<attributeKey>`,\n * `changeattributes:<attributeKey>`, `removeattributes:<attributeKey>`.\n *\n * In most cases, it is enough to let th {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}\n * gather consumable values, so there is no need to use\n * the {@link module:engine/conversion/modelconsumable~ModelConsumable#add add method} directly.\n * However, it is important to understand how consumable values can be\n * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed}.\n * See {@link module:engine/conversion/downcasthelpers default downcast converters} for more information.\n *\n * Keep in mind that one conversion event may have multiple callbacks (converters) attached to it. Each of those is\n * able to convert one or more parts of the model. However, when one of those callbacks actually converts\n * something, the others should not, because they would duplicate the results. Using `ModelConsumable` helps to avoid\n * this situation, because callbacks should only convert these values that were not yet consumed from `ModelConsumable`.\n *\n * Consuming multiple values in a single callback:\n *\n * ```ts\n * // Converter for custom `imageBlock` element that might have a `caption` element inside which changes\n * // how the image is displayed in the view:\n * //\n * // Model:\n * //\n * // [imageBlock]\n * //   └─ [caption]\n * //       └─ foo\n * //\n * // View:\n * //\n * // <figure>\n * //   ├─ <img />\n * //   └─ <caption>\n * //       └─ foo\n * modelConversionDispatcher.on( 'insert:imageBlock', ( evt, data, conversionApi ) => {\n * \t// First, consume the `imageBlock` element.\n * \tconversionApi.consumable.consume( data.item, 'insert' );\n *\n * \t// Just create normal image element for the view.\n * \t// Maybe it will be \"decorated\" later.\n * \tconst viewImage = new ViewElement( 'img' );\n * \tconst insertPosition = conversionApi.mapper.toViewPosition( data.range.start );\n * \tconst viewWriter = conversionApi.writer;\n *\n * \t// Check if the `imageBlock` element has children.\n * \tif ( data.item.childCount > 0 ) {\n * \t\tconst modelCaption = data.item.getChild( 0 );\n *\n * \t\t// `modelCaption` insertion change is consumed from consumable values.\n * \t\t// It will not be converted by other converters, but it's children (probably some text) will be.\n * \t\t// Through mapping, converters for text will know where to insert contents of `modelCaption`.\n * \t\tif ( conversionApi.consumable.consume( modelCaption, 'insert' ) ) {\n * \t\t\tconst viewCaption = new ViewElement( 'figcaption' );\n *\n * \t\t\tconst viewImageHolder = new ViewElement( 'figure', null, [ viewImage, viewCaption ] );\n *\n * \t\t\tconversionApi.mapper.bindElements( modelCaption, viewCaption );\n * \t\t\tconversionApi.mapper.bindElements( data.item, viewImageHolder );\n * \t\t\tviewWriter.insert( insertPosition, viewImageHolder );\n * \t\t}\n * \t} else {\n * \t\tconversionApi.mapper.bindElements( data.item, viewImage );\n * \t\tviewWriter.insert( insertPosition, viewImage );\n * \t}\n *\n * \tevt.stop();\n * } );\n * ```\n */\nexport class ModelConsumable {\n\t/**\n\t * Contains list of consumable values.\n\t */\n\tprivate _consumable = new Map<any, Map<string, boolean>>();\n\n\t/**\n\t * For each {@link module:engine/model/textproxy~ModelTextProxy} added to `ModelConsumable`, this registry holds a parent\n\t * of that `ModelTextProxy` and the start and end indices of that `ModelTextProxy`. This allows identification of the `ModelTextProxy`\n\t * instances that point to the same part of the model but are different instances. Each distinct `ModelTextProxy`\n\t * is given a unique `Symbol` which is then registered as consumable. This process is transparent for the `ModelConsumable`\n\t * API user because whenever `ModelTextProxy` is added, tested, consumed or reverted, the internal mechanisms of\n\t * `ModelConsumable` translate `ModelTextProxy` to that unique `Symbol`.\n\t */\n\tprivate _textProxyRegistry = new Map<number | null, Map<number | null, Map<unknown, symbol>>>();\n\n\t/**\n\t * Adds a consumable value to the consumables list and links it with a given model item.\n\t *\n\t * ```ts\n\t * modelConsumable.add( modelElement, 'insert' ); // Add `modelElement` insertion change to consumable values.\n\t * modelConsumable.add( modelElement, 'addAttribute:bold' ); // Add `bold` attribute insertion on `modelElement` change.\n\t * modelConsumable.add( modelElement, 'removeAttribute:bold' ); // Add `bold` attribute removal on `modelElement` change.\n\t * modelConsumable.add( modelSelection, 'selection' ); // Add `modelSelection` to consumable values.\n\t * modelConsumable.add( modelRange, 'range' ); // Add `modelRange` to consumable values.\n\t * ```\n\t *\n\t * @param item Model item, range or selection that has the consumable.\n\t * @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t */\n\tpublic add(\n\t\titem: ModelItem | ModelSelection | ModelDocumentSelection | ModelRange,\n\t\ttype: string\n\t): void {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof ModelTextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item ) as any;\n\t\t}\n\n\t\tif ( !this._consumable.has( item ) ) {\n\t\t\tthis._consumable.set( item, new Map() );\n\t\t}\n\n\t\tthis._consumable.get( item )!.set( type, true );\n\t}\n\n\t/**\n\t * Removes a given consumable value from a given model item.\n\t *\n\t * ```ts\n\t * modelConsumable.consume( modelElement, 'insert' ); // Remove `modelElement` insertion change from consumable values.\n\t * modelConsumable.consume( modelElement, 'addAttribute:bold' ); // Remove `bold` attribute insertion on `modelElement` change.\n\t * modelConsumable.consume( modelElement, 'removeAttribute:bold' ); // Remove `bold` attribute removal on `modelElement` change.\n\t * modelConsumable.consume( modelSelection, 'selection' ); // Remove `modelSelection` from consumable values.\n\t * modelConsumable.consume( modelRange, 'range' ); // Remove 'modelRange' from consumable values.\n\t * ```\n\t *\n\t * @param item Model item, range or selection from which consumable will be consumed.\n\t * @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t * @returns `true` if consumable value was available and was consumed, `false` otherwise.\n\t */\n\tpublic consume(\n\t\titem: ModelItem | ModelSelection | ModelDocumentSelection | ModelRange,\n\t\ttype: string\n\t): boolean {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof ModelTextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item ) as any;\n\t\t}\n\n\t\tif ( this.test( item, type ) ) {\n\t\t\tthis._consumable.get( item )!.set( type, false );\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Tests whether there is a consumable value of a given type connected with a given model item.\n\t *\n\t * ```ts\n\t * modelConsumable.test( modelElement, 'insert' ); // Check for `modelElement` insertion change.\n\t * modelConsumable.test( modelElement, 'addAttribute:bold' ); // Check for `bold` attribute insertion on `modelElement` change.\n\t * modelConsumable.test( modelElement, 'removeAttribute:bold' ); // Check for `bold` attribute removal on `modelElement` change.\n\t * modelConsumable.test( modelSelection, 'selection' ); // Check if `modelSelection` is consumable.\n\t * modelConsumable.test( modelRange, 'range' ); // Check if `modelRange` is consumable.\n\t * ```\n\t *\n\t * @param item Model item, range or selection to be tested.\n\t * @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t * @returns `null` if such consumable was never added, `false` if the consumable values was\n\t * already consumed or `true` if it was added and not consumed yet.\n\t */\n\tpublic test(\n\t\titem: ModelItem | ModelSelection | ModelDocumentSelection | ModelRange,\n\t\ttype: string\n\t): boolean | null {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof ModelTextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item ) as any;\n\t\t}\n\n\t\tconst itemConsumables = this._consumable.get( item );\n\n\t\tif ( itemConsumables === undefined ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst value = itemConsumables.get( type );\n\n\t\tif ( value === undefined ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Reverts consuming of a consumable value.\n\t *\n\t * ```ts\n\t * modelConsumable.revert( modelElement, 'insert' ); // Revert consuming `modelElement` insertion change.\n\t * modelConsumable.revert( modelElement, 'addAttribute:bold' ); // Revert consuming `bold` attribute insert from `modelElement`.\n\t * modelConsumable.revert( modelElement, 'removeAttribute:bold' ); // Revert consuming `bold` attribute remove from `modelElement`.\n\t * modelConsumable.revert( modelSelection, 'selection' ); // Revert consuming `modelSelection`.\n\t * modelConsumable.revert( modelRange, 'range' ); // Revert consuming `modelRange`.\n\t * ```\n\t *\n\t * @param item Model item, range or selection to be reverted.\n\t * @param type Consumable type.\n\t * @returns `true` if consumable has been reversed, `false` otherwise. `null` if the consumable has\n\t * never been added.\n\t */\n\tpublic revert(\n\t\titem: ModelItem | ModelSelection | ModelDocumentSelection | ModelRange,\n\t\ttype: string\n\t): boolean | null {\n\t\ttype = _normalizeConsumableType( type );\n\n\t\tif ( item instanceof ModelTextProxy ) {\n\t\t\titem = this._getSymbolForTextProxy( item ) as any;\n\t\t}\n\n\t\tconst test = this.test( item, type );\n\n\t\tif ( test === false ) {\n\t\t\tthis._consumable.get( item )!.set( type, true );\n\n\t\t\treturn true;\n\t\t} else if ( test === true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Verifies if all events from the specified group were consumed.\n\t *\n\t * @param eventGroup The events group to verify.\n\t */\n\tpublic verifyAllConsumed( eventGroup: string ): void {\n\t\tconst items = [];\n\n\t\tfor ( const [ item, consumables ] of this._consumable ) {\n\t\t\tfor ( const [ event, canConsume ] of consumables ) {\n\t\t\t\tconst eventPrefix = event.split( ':' )[ 0 ];\n\n\t\t\t\tif ( canConsume && eventGroup == eventPrefix ) {\n\t\t\t\t\titems.push( {\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\titem: item.name || item.description\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( items.length ) {\n\t\t\t/**\n\t\t\t * Some of the {@link module:engine/model/item~ModelItem model items} were not consumed while downcasting the model to view.\n\t\t\t *\n\t\t\t * This might be the effect of:\n\t\t\t *\n\t\t\t * * A missing converter for some model elements. Make sure that you registered downcast converters for all model elements.\n\t\t\t * * A custom converter that does not consume converted items. Make sure that you\n\t\t\t * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} all model elements that you converted\n\t\t\t * from the model to the view.\n\t\t\t * * A custom converter that called `event.stop()`. When providing a custom converter, keep in mind that you should not stop\n\t\t\t * the event. If you stop it then the default converter at the `lowest` priority will not trigger the conversion of this node's\n\t\t\t * attributes and child nodes.\n\t\t\t *\n\t\t\t * @error conversion-model-consumable-not-consumed\n\t\t\t * @param {Array.<module:engine/model/item~ModelItem>} items Items that were not consumed.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-model-consumable-not-consumed', null, { items } );\n\t\t}\n\t}\n\n\t/**\n\t * Gets a unique symbol for the passed {@link module:engine/model/textproxy~ModelTextProxy} instance.\n\t * All `ModelTextProxy` instances that have same parent, same start index and same end index will get the same symbol.\n\t *\n\t * Used internally to correctly consume `ModelTextProxy` instances.\n\t *\n\t * @internal\n\t * @param textProxy `ModelTextProxy` instance to get a symbol for.\n\t * @returns Symbol representing all equal instances of `ModelTextProxy`.\n\t */\n\tpublic _getSymbolForTextProxy( textProxy: ModelTextProxy ): symbol {\n\t\tlet symbol = null;\n\n\t\tconst startMap = this._textProxyRegistry.get( textProxy.startOffset );\n\n\t\tif ( startMap ) {\n\t\t\tconst endMap = startMap.get( textProxy.endOffset );\n\n\t\t\tif ( endMap ) {\n\t\t\t\tsymbol = endMap.get( textProxy.parent );\n\t\t\t}\n\t\t}\n\n\t\tif ( !symbol ) {\n\t\t\tsymbol = this._addSymbolForTextProxy( textProxy );\n\t\t}\n\n\t\treturn symbol;\n\t}\n\n\t/**\n\t * Adds a symbol for the given {@link module:engine/model/textproxy~ModelTextProxy} instance.\n\t *\n\t * Used internally to correctly consume `ModelTextProxy` instances.\n\t *\n\t * @param textProxy Text proxy instance.\n\t * @returns Symbol generated for given `ModelTextProxy`.\n\t */\n\tprivate _addSymbolForTextProxy( textProxy: ModelTextProxy ): symbol {\n\t\tconst start = textProxy.startOffset;\n\t\tconst end = textProxy.endOffset;\n\t\tconst parent = textProxy.parent;\n\n\t\tconst symbol = Symbol( '$textProxy:' + textProxy.data );\n\t\tlet startMap: Map<number | null, Map<unknown, symbol>> | undefined;\n\t\tlet endMap: Map<unknown, symbol> | undefined;\n\n\t\tstartMap = this._textProxyRegistry.get( start );\n\n\t\tif ( !startMap ) {\n\t\t\tstartMap = new Map();\n\t\t\tthis._textProxyRegistry.set( start, startMap );\n\t\t}\n\n\t\tendMap = startMap.get( end );\n\n\t\tif ( !endMap ) {\n\t\t\tendMap = new Map();\n\t\t\tstartMap.set( end, endMap );\n\t\t}\n\n\t\tendMap.set( parent, symbol );\n\n\t\treturn symbol;\n\t}\n}\n\n/**\n * Returns a normalized consumable type name from the given string. A normalized consumable type name is a string that has\n * at most one colon, for example: `insert` or `addMarker:highlight`. If a string to normalize has more \"parts\" (more colons),\n * the further parts are dropped, for example: `addattribute:bold:$text` -> `addattributes:bold`.\n *\n * @param type Consumable type.\n * @returns Normalized consumable type.\n */\nfunction _normalizeConsumableType( type: string ) {\n\tconst parts = type.split( ':' );\n\n\t// For inserts allow passing event name, it's stored in the context of a specified element so the element name is not needed.\n\tif ( parts[ 0 ] == 'insert' ) {\n\t\treturn parts[ 0 ];\n\t}\n\n\t// Markers are identified by the whole name (otherwise we would consume the whole markers group).\n\tif ( parts[ 0 ] == 'addMarker' || parts[ 0 ] == 'removeMarker' ) {\n\t\treturn type;\n\t}\n\n\treturn parts.length > 1 ? parts[ 0 ] + ':' + parts[ 1 ] : parts[ 0 ];\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/**\n * @module engine/conversion/comparemarkers\n */\n\nimport type { ModelRange } from '../model/range.js';\n\n/**\n * Sorts markers so the downcast result is deterministic regardless of the order\n * markers were added to the marker collection.\n *\n * The sort key is the marker's range, ordered \"right-to-left\" through the document so that\n * a marker's opening boundary is processed *after* any markers nested inside it. This way\n * the outer marker wraps the inner ones at conversion time.\n *\n * Cases (positions shown as `0123456789`, sort result top-to-bottom):\n *\n * 1. Non-overlapping ranges — sorted by position, last range first:\n *\n *        a: [--]               →   c, b, a\n *        b:     [--]\n *        c:        [--]\n *\n * 2. Adjacent ranges (end === start) — treated as non-overlapping:\n *\n *        first:  [---]         →   third, second, first\n *        second:    [---]\n *        third:        [---]\n *\n * 3. Nested ranges (same start, different ends) — inner first, outer last:\n *\n *        shorter: [-]          →   shorter, longer\n *        longer:  [---]\n *\n * 4. Partially overlapping ranges — sorted by start position:\n *\n *        earlier: [---]        →   later, earlier\n *        later:     [---]\n *\n * 5. Identical ranges — fall back to reverse name comparison:\n *\n *        alpha:   [---]        →   charlie, bravo, alpha\n *        bravo:   [---]\n *        charlie: [---]\n *\n * @internal\n */\nexport function compareMarkersForDowncast(\n\t[ name1, range1 ]: readonly [ string, ModelRange ],\n\t[ name2, range2 ]: readonly [ string, ModelRange ]\n): number {\n\tif ( range1.end.compareWith( range2.start ) !== 'after' ) {\n\t\t// m1.end <= m2.start -- m1 is entirely <= m2.\n\t\treturn 1;\n\t} else if ( range1.start.compareWith( range2.end ) !== 'before' ) {\n\t\t// m1.start >= m2.end -- m1 is entirely >= m2.\n\t\treturn -1;\n\t} else {\n\t\t// They overlap, so use their start positions as the primary sort key and\n\t\t// end positions as the secondary sort key.\n\t\tswitch ( range1.start.compareWith( range2.start ) ) {\n\t\t\tcase 'before':\n\t\t\t\treturn 1;\n\t\t\tcase 'after':\n\t\t\t\treturn -1;\n\t\t\tdefault:\n\t\t\t\tswitch ( range1.end.compareWith( range2.end ) ) {\n\t\t\t\t\tcase 'before':\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\tcase 'after':\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn name2.localeCompare( name1 );\n\t\t\t\t}\n\t\t}\n\t}\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/**\n * @module engine/conversion/downcastdispatcher\n */\n\nimport { ModelConsumable } from './modelconsumable.js';\nimport { compareMarkersForDowncast } from './comparemarkers.js';\nimport { ModelRange } from '../model/range.js';\n\nimport { EmitterMixin, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport type { Differ, DifferItem, DifferItemReinsert } from '../model/differ.js';\nimport type { MarkerCollection, Marker } from '../model/markercollection.js';\nimport type { ModelTreeWalkerValue } from '../model/treewalker.js';\nimport { type ModelDocumentSelection } from '../model/documentselection.js';\nimport { type ViewDowncastWriter } from '../view/downcastwriter.js';\nimport { type ModelRootElement } from '../model/rootelement.js';\nimport { type ModelElement } from '../model/element.js';\nimport { type ModelItem } from '../model/item.js';\nimport { type Mapper } from './mapper.js';\nimport { type ModelPosition } from '../model/position.js';\nimport { type ModelSchema } from '../model/schema.js';\nimport { type ModelSelection } from '../model/selection.js';\nimport { type ViewElement } from '../view/element.js';\n\nconst DowncastDispatcherBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * The downcast dispatcher is a central point of downcasting (conversion from the model to the view), which is a process of reacting\n * to changes in the model and firing a set of events. The callbacks listening to these events are called converters. The\n * converters' role is to convert the model changes to changes in view (for example, adding view nodes or\n * changing attributes on view elements).\n *\n * During the conversion process, downcast dispatcher fires events basing on the state of the model and prepares\n * data for these events. It is important to understand that the events are connected with the changes done on the model,\n * for example: \"a node has been inserted\" or \"an attribute has changed\". This is in contrary to upcasting (a view-to-model conversion)\n * where you convert the view state (view nodes) to a model tree.\n *\n * The events are prepared basing on a diff created by the {@link module:engine/model/differ~Differ Differ}, which buffers them\n * and then passes to the downcast dispatcher as a diff between the old model state and the new model state.\n *\n * Note that because the changes are converted, there is a need to have a mapping between the model structure and the view structure.\n * To map positions and elements during the downcast (a model-to-view conversion), use {@link module:engine/conversion/mapper~Mapper}.\n *\n * Downcast dispatcher fires the following events for model tree changes:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`} &ndash;\n * If a range of nodes was inserted to the model tree.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove `remove`} &ndash;\n * If a range of nodes was removed from the model tree.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`} &ndash;\n * If an attribute was added, changed or removed from a model node.\n *\n * For {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`}\n * and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`},\n * the downcast dispatcher generates {@link module:engine/conversion/modelconsumable~ModelConsumable consumables}.\n * These are used to have control over which changes have already been consumed. It is useful when some converters\n * overwrite others or convert multiple changes (for example, it converts an insertion of an element and also converts that\n * element's attributes during the insertion).\n *\n * Additionally, downcast dispatcher fires events for {@link module:engine/model/markercollection~Marker marker} changes:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`} &ndash; If a marker was added.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:removeMarker `removeMarker`} &ndash; If a marker was\n * removed.\n *\n * Note that changing a marker is done through removing the marker from the old range and adding it to the new range,\n * so both of these events are fired.\n *\n * Finally, a downcast dispatcher also handles firing events for the {@link module:engine/model/selection model selection}\n * conversion:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:selection `selection`}\n * &ndash; Converts the selection from the model to the view.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`}\n * &ndash; Fired for every selection attribute.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`}\n * &ndash; Fired for every marker that contains a selection.\n *\n * Unlike the model tree and the markers, the events for selection are not fired for changes but for a selection state.\n *\n * When providing custom listeners for a downcast dispatcher, remember to check whether a given change has not been\n * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} yet.\n *\n * When providing custom listeners for a downcast dispatcher, keep in mind that you **should not** stop the event. If you stop it,\n * then the default converter at the `lowest` priority will not trigger the conversion of this node's attributes and child nodes.\n *\n * When providing custom listeners for a downcast dispatcher, remember to use the provided\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter view downcast writer} to apply changes to the view document.\n *\n * You can read more about conversion in the following guide:\n *\n * * {@glink framework/deep-dive/conversion/downcast Downcast conversion}\n *\n * An example of a custom converter for the downcast dispatcher:\n *\n * ```ts\n * // You will convert inserting a \"paragraph\" model element into the model.\n * downcastDispatcher.on( 'insert:paragraph', ( evt, data, conversionApi ) => {\n * \t// Remember to check whether the change has not been consumed yet and consume it.\n * \tif ( !conversionApi.consumable.consume( data.item, 'insert' ) ) {\n * \t\treturn;\n * \t}\n *\n * \t// Translate the position in the model to a position in the view.\n * \tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n *\n * \t// Create a <p> element that will be inserted into the view at the `viewPosition`.\n * \tconst viewElement = conversionApi.writer.createContainerElement( 'p' );\n *\n * \t// Bind the newly created view element to the model element so positions will map accordingly in the future.\n * \tconversionApi.mapper.bindElements( data.item, viewElement );\n *\n * \t// Add the newly created view element to the view.\n * \tconversionApi.writer.insert( viewPosition, viewElement );\n * } );\n * ```\n */\nexport class DowncastDispatcher extends DowncastDispatcherBase {\n\t/**\n\t * A template for an interface passed by the dispatcher to the event callbacks.\n\t *\n\t * @internal\n\t */\n\tpublic readonly _conversionApi: Pick<DowncastConversionApi, 'dispatcher' | 'mapper' | 'schema'>;\n\n\t/**\n\t * A map of already fired events for a given `ModelConsumable`.\n\t */\n\tprivate readonly _firedEventsMap: WeakMap<DowncastConversionApi, Map<unknown, Set<string>>>;\n\n\t/**\n\t * Creates a downcast dispatcher instance.\n\t *\n\t * @see module:engine/conversion/downcastdispatcher~DowncastConversionApi\n\t *\n\t * @param conversionApi Additional properties for an interface that will be passed to events fired\n\t * by the downcast dispatcher.\n\t */\n\tconstructor( conversionApi: Pick<DowncastConversionApi, 'mapper' | 'schema'> ) {\n\t\tsuper();\n\n\t\tthis._conversionApi = { dispatcher: this, ...conversionApi };\n\t\tthis._firedEventsMap = new WeakMap();\n\t}\n\n\t/**\n\t * Converts changes buffered in the given {@link module:engine/model/differ~Differ model differ}\n\t * and fires conversion events based on it.\n\t *\n\t * @fires insert\n\t * @fires remove\n\t * @fires attribute\n\t * @fires addMarker\n\t * @fires removeMarker\n\t * @fires reduceChanges\n\t * @param differ The differ object with buffered changes.\n\t * @param markers Markers related to the model fragment to convert.\n\t * @param writer The view writer that should be used to modify the view document.\n\t */\n\tpublic convertChanges(\n\t\tdiffer: Differ,\n\t\tmarkers: MarkerCollection,\n\t\twriter: ViewDowncastWriter\n\t): void {\n\t\tconst refreshedItems = differ.getRefreshedItems();\n\t\tconst conversionApi = this._createConversionApi( writer, refreshedItems );\n\n\t\t// Before the view is updated, remove markers which have changed.\n\t\tfor ( const change of differ.getMarkersToRemove() ) {\n\t\t\tthis._convertMarkerRemove( change.name, change.range, conversionApi );\n\t\t}\n\n\t\t// Let features modify the change list (for example to allow reconversion).\n\t\tconst changes = this._reduceChanges( differ.getChanges(), refreshedItems );\n\n\t\t// Convert changes that happened on model tree.\n\t\tfor ( const entry of changes ) {\n\t\t\tif ( entry.type === 'insert' ) {\n\t\t\t\tthis._convertInsert( ModelRange._createFromPositionAndShift( entry.position, entry.length ), conversionApi );\n\t\t\t} else if ( entry.type === 'reinsert' ) {\n\t\t\t\tthis._convertReinsert( ModelRange._createFromPositionAndShift( entry.position, entry.length ), conversionApi );\n\t\t\t} else if ( entry.type === 'remove' ) {\n\t\t\t\tthis._convertRemove( entry.position, entry.length, entry.name, conversionApi );\n\t\t\t} else {\n\t\t\t\t// Defaults to 'attribute' change.\n\t\t\t\tthis._convertAttribute( entry.range, entry.attributeKey, entry.attributeOldValue, entry.attributeNewValue, conversionApi );\n\t\t\t}\n\t\t}\n\n\t\t// Remove mappings for all removed view elements.\n\t\t// Remove these mappings as soon as they are not needed (https://github.com/ckeditor/ckeditor5/issues/15411).\n\t\tconversionApi.mapper.flushDeferredBindings();\n\n\t\tfor ( const markerName of conversionApi.mapper.flushUnboundMarkerNames() ) {\n\t\t\tconst markerRange = markers.get( markerName )!.getRange();\n\n\t\t\tthis._convertMarkerRemove( markerName, markerRange, conversionApi );\n\t\t\tthis._convertMarkerAdd( markerName, markerRange, conversionApi );\n\t\t}\n\n\t\t// Sort markers so the downcast result is deterministic regardless of the order\n\t\t// markers were added to the collection.\n\t\t//\n\t\t// \"Reverse DOM order\" = markers ending later in the document come first, so each\n\t\t// marker's opening boundary is processed after any markers nested inside it.\n\t\t// For overlapping ranges this is best-effort (start position wins, then end position).\n\t\t//\n\t\t// Example: replacing \"old\" with \"new\" creates two adjacent markers (delete + insert).\n\t\t// With `markerToElement`, each boundary is a self-closing tag, so the processing\n\t\t// order directly controls where they land at the shared boundary point:\n\t\t//\n\t\t//   Sorted (reverse DOM order):  <DEL-START/>old<DEL-END/><INS-START/>new<INS-END/>\n\t\t//   Insertion order (legacy):    <DEL-START/>old<INS-START/><DEL-END/>new<INS-END/>\n\t\tconst markersToAdd = differ.getMarkersToAdd()\n\t\t\t.sort( ( a, b ) => compareMarkersForDowncast( [ a.name, a.range ], [ b.name, b.range ] ) );\n\n\t\t// After the view is updated, convert markers which have changed.\n\t\tfor ( const change of markersToAdd ) {\n\t\t\tthis._convertMarkerAdd( change.name, change.range, conversionApi );\n\t\t}\n\n\t\t// Verify if all insert consumables were consumed.\n\t\tconversionApi.consumable.verifyAllConsumed( 'insert' );\n\t}\n\n\t/**\n\t * Starts a conversion of a model range and the provided markers.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @fires addMarker\n\t * @param range The inserted range.\n\t * @param markers The map of markers that should be down-casted.\n\t * @param writer The view writer that should be used to modify the view document.\n\t * @param options Optional options object passed to `convertionApi.options`.\n\t */\n\tpublic convert(\n\t\trange: ModelRange,\n\t\tmarkers: Map<string, ModelRange>,\n\t\twriter: ViewDowncastWriter,\n\t\toptions: DowncastConversionApi[ 'options' ] = {}\n\t): void {\n\t\tconst conversionApi = this._createConversionApi( writer, undefined, options );\n\n\t\tthis._convertInsert( range, conversionApi );\n\n\t\t// Sort markers in reverse DOM order for deterministic downcast output.\n\t\t// See the analogous sort in `convertChanges()` for a detailed rationale and examples.\n\t\tfor ( const [ name, range ] of Array.from( markers ).sort( compareMarkersForDowncast ) ) {\n\t\t\tthis._convertMarkerAdd( name, range, conversionApi );\n\t\t}\n\n\t\t// Verify if all insert consumables were consumed.\n\t\tconversionApi.consumable.verifyAllConsumed( 'insert' );\n\t}\n\n\t/**\n\t * Starts the model selection conversion.\n\t *\n\t * Fires events for a given {@link module:engine/model/selection~ModelSelection selection} to start the selection conversion.\n\t *\n\t * @fires selection\n\t * @fires addMarker\n\t * @fires attribute\n\t * @param selection The selection to convert.\n\t * @param markers Markers connected with the converted model.\n\t * @param writer View writer that should be used to modify the view document.\n\t */\n\tpublic convertSelection(\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\tmarkers: MarkerCollection,\n\t\twriter: ViewDowncastWriter\n\t): void {\n\t\tconst conversionApi = this._createConversionApi( writer );\n\n\t\t// First perform a clean-up at the current position of the selection.\n\t\tthis.fire<DowncastCleanSelectionEvent>( 'cleanSelection', { selection }, conversionApi );\n\n\t\t// Don't convert selection if it is in a model root that does not have a view root (for now this is only the graveyard root).\n\t\tconst modelRoot = selection.getFirstPosition()!.root as ModelRootElement;\n\n\t\tif ( !conversionApi.mapper.toViewElement( modelRoot ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Now, perform actual selection conversion.\n\t\tconst markersAtSelection = Array.from( markers.getMarkersAtPosition( selection.getFirstPosition()! ) );\n\n\t\tthis._addConsumablesForSelection( conversionApi.consumable, selection, markersAtSelection );\n\n\t\tthis.fire<DowncastSelectionEvent>( 'selection', { selection }, conversionApi );\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const marker of markersAtSelection ) {\n\t\t\t// Do not fire event if the marker has been consumed.\n\t\t\tif ( conversionApi.consumable.test( selection, 'addMarker:' + marker.name ) ) {\n\t\t\t\tconst markerRange = marker.getRange();\n\n\t\t\t\tif ( !shouldMarkerChangeBeConverted( selection.getFirstPosition()!, marker, conversionApi.mapper ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst data = {\n\t\t\t\t\titem: selection,\n\t\t\t\t\tmarkerName: marker.name,\n\t\t\t\t\tmarkerRange\n\t\t\t\t};\n\n\t\t\t\tthis.fire<DowncastAddMarkerEvent>( `addMarker:${ marker.name }`, data, conversionApi );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of selection.getAttributeKeys() ) {\n\t\t\t// Do not fire event if the attribute has been consumed.\n\t\t\tif ( conversionApi.consumable.test( selection, 'attribute:' + key ) ) {\n\t\t\t\tconst data = {\n\t\t\t\t\titem: selection,\n\t\t\t\t\trange: selection.getFirstRange()!,\n\t\t\t\t\tattributeKey: key,\n\t\t\t\t\tattributeOldValue: null,\n\t\t\t\t\tattributeNewValue: selection.getAttribute( key )\n\t\t\t\t};\n\n\t\t\t\tthis.fire<DowncastAttributeEvent>( `attribute:${ key }:$text`, data, conversionApi );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Fires insertion conversion of a range of nodes.\n\t *\n\t * For each node in the range, {@link #event:insert `insert` event is fired}. For each attribute on each node,\n\t * {@link #event:attribute `attribute` event is fired}.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @param range The inserted range.\n\t * @param conversionApi The conversion API object.\n\t * @param options.doNotAddConsumables Whether the ModelConsumable should not get populated\n\t * for items in the provided range.\n\t */\n\tprivate _convertInsert(\n\t\trange: ModelRange,\n\t\tconversionApi: DowncastConversionApi,\n\t\toptions: { doNotAddConsumables?: boolean } = {}\n\t): void {\n\t\tif ( !options.doNotAddConsumables ) {\n\t\t\t// Collect a list of things that can be consumed, consisting of nodes and their attributes.\n\t\t\tthis._addConsumablesForInsert( conversionApi.consumable, range );\n\t\t}\n\n\t\t// Fire a separate insert event for each node and text fragment contained in the range.\n\t\tfor ( const data of range.getWalker( { shallow: true } ) ) {\n\t\t\tthis._testAndFire( 'insert', walkerValueToEventData( data ), conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Fires conversion of a single node removal. Fires {@link #event:remove remove event} with provided data.\n\t *\n\t * @param position Position from which node was removed.\n\t * @param length Offset size of removed node.\n\t * @param name Name of removed node.\n\t * @param conversionApi The conversion API object.\n\t */\n\tprivate _convertRemove(\n\t\tposition: ModelPosition,\n\t\tlength: number,\n\t\tname: string,\n\t\tconversionApi: DowncastConversionApi\n\t): void {\n\t\tthis.fire<DowncastRemoveEvent>( `remove:${ name }`, { position, length }, conversionApi );\n\t}\n\n\t/**\n\t * Starts a conversion of an attribute change on a given `range`.\n\t *\n\t * For each node in the given `range`, {@link #event:attribute attribute event} is fired with the passed data.\n\t *\n\t * @fires attribute\n\t * @param range Changed range.\n\t * @param key Key of the attribute that has changed.\n\t * @param oldValue Attribute value before the change or `null` if the attribute has not been set before.\n\t * @param newValue New attribute value or `null` if the attribute has been removed.\n\t * @param conversionApi The conversion API object.\n\t */\n\tprivate _convertAttribute(\n\t\trange: ModelRange,\n\t\tkey: string,\n\t\toldValue: unknown,\n\t\tnewValue: unknown,\n\t\tconversionApi: DowncastConversionApi\n\t): void {\n\t\t// Create a list with attributes to consume.\n\t\tthis._addConsumablesForRange( conversionApi.consumable, range, `attribute:${ key }` );\n\n\t\t// Create a separate attribute event for each node in the range.\n\t\tfor ( const value of range ) {\n\t\t\tconst data = {\n\t\t\t\titem: value.item,\n\t\t\t\trange: ModelRange._createFromPositionAndShift( value.previousPosition, value.length! ),\n\t\t\t\tattributeKey: key,\n\t\t\t\tattributeOldValue: oldValue,\n\t\t\t\tattributeNewValue: newValue\n\t\t\t};\n\n\t\t\tthis._testAndFire( `attribute:${ key }`, data, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Fires re-insertion conversion (with a `reconversion` flag passed to `remove` and `insert` events)\n\t * of a range of elements (only elements on the range depth, without children).\n\t *\n\t * For each node in the range on its depth (without children), {@link #event:insert `insert` event} is fired.\n\t * For each attribute on each node, {@link #event:attribute `attribute` event} is fired.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @param range The range to reinsert.\n\t * @param conversionApi The conversion API object.\n\t */\n\tprivate _convertReinsert( range: ModelRange, conversionApi: DowncastConversionApi ): void {\n\t\t// Convert the elements - without converting children.\n\t\tconst walkerValues = Array.from( range.getWalker( { shallow: true } ) );\n\n\t\t// Collect a list of things that can be consumed, consisting of nodes and their attributes.\n\t\tthis._addConsumablesForInsert( conversionApi.consumable, walkerValues );\n\n\t\t// Fire a separate insert event for each node and text fragment contained shallowly in the range.\n\t\tfor ( const data of walkerValues.map( walkerValueToEventData ) ) {\n\t\t\t// For backward compatibility and handlers that does not recognize reconversion.\n\t\t\tthis.fire<DowncastRemoveEvent>(\n\t\t\t\t`remove:${ data.item.is( 'element' ) ? data.item.name : '$text' }`,\n\t\t\t\t{ position: data.range.start, length: data.item.offsetSize, reconversion: true },\n\t\t\t\tconversionApi\n\t\t\t);\n\n\t\t\t// Reinsert the view element.\n\t\t\tthis._testAndFire( 'insert', { ...data, reconversion: true }, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Converts the added marker. Fires the {@link #event:addMarker `addMarker`} event for each item\n\t * in the marker's range. If the range is collapsed, a single event is dispatched. See the event description for more details.\n\t *\n\t * @fires addMarker\n\t * @param markerName Marker name.\n\t * @param markerRange The marker range.\n\t * @param conversionApi The conversion API object.\n\t */\n\tprivate _convertMarkerAdd(\n\t\tmarkerName: string,\n\t\tmarkerRange: ModelRange,\n\t\tconversionApi: DowncastConversionApi\n\t): void {\n\t\t// Do not convert if range is in graveyard.\n\t\tif ( markerRange.root.rootName == '$graveyard' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In markers' case, event name == consumable name.\n\t\tconst eventName = `addMarker:${ markerName }` as const;\n\n\t\t//\n\t\t// First, fire an event for the whole marker.\n\t\t//\n\t\tconversionApi.consumable.add( markerRange, eventName );\n\n\t\tthis.fire<DowncastAddMarkerEvent>( eventName, { markerName, markerRange }, conversionApi );\n\n\t\t//\n\t\t// Do not fire events for each item inside the range if the range got consumed.\n\t\t// Also consume the whole marker consumable if it wasn't consumed.\n\t\t//\n\t\tif ( !conversionApi.consumable.consume( markerRange, eventName ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t// Then, fire an event for each item inside the marker range.\n\t\t//\n\t\tthis._addConsumablesForRange( conversionApi.consumable, markerRange, eventName );\n\n\t\tfor ( const item of markerRange.getItems() ) {\n\t\t\t// Do not fire event for already consumed items.\n\t\t\tif ( !conversionApi.consumable.test( item, eventName ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst data = { item, range: ModelRange._createOn( item ), markerName, markerRange };\n\n\t\t\tthis.fire<DowncastAddMarkerEvent>( eventName, data, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Fires the conversion of the marker removal. Fires the {@link #event:removeMarker `removeMarker`} event with the provided data.\n\t *\n\t * @fires removeMarker\n\t * @param markerName Marker name.\n\t * @param markerRange The marker range.\n\t * @param conversionApi The conversion API object.\n\t */\n\tprivate _convertMarkerRemove( markerName: string, markerRange: ModelRange, conversionApi: DowncastConversionApi ) {\n\t\t// Do not convert if range is in graveyard.\n\t\tif ( markerRange.root.rootName == '$graveyard' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fire<DowncastRemoveMarkerEvent>( `removeMarker:${ markerName }`, { markerName, markerRange }, conversionApi );\n\t}\n\n\t/**\n\t * Fires the reduction of changes buffered in the {@link module:engine/model/differ~Differ `Differ`}.\n\t *\n\t * Features can replace selected {@link module:engine/model/differ~DifferItem `DifferItem`}s with `reinsert` entries to trigger\n\t * reconversion. The {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `DowncastHelpers.elementToStructure()`} is using this event to trigger reconversion.\n\t *\n\t * @fires reduceChanges\n\t */\n\tprivate _reduceChanges(\n\t\tchanges: Iterable<DifferItem>,\n\t\trefreshedItems: Set<ModelItem>\n\t): Iterable<DifferItem | DifferItemReinsert> {\n\t\tconst data: {\n\t\t\tchanges: Iterable<DifferItem | DifferItemReinsert>;\n\t\t\trefreshedItems: Set<ModelItem>;\n\t\t} = {\n\t\t\tchanges,\n\t\t\trefreshedItems\n\t\t};\n\n\t\tthis.fire<DowncastReduceChangesEvent>( 'reduceChanges', data );\n\n\t\treturn data.changes;\n\t}\n\n\t/**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume from a given range,\n\t * assuming that the range has just been inserted to the model.\n\t *\n\t * @param consumable The consumable.\n\t * @param walkerValues The walker values for the inserted range.\n\t * @returns The values to consume.\n\t */\n\tprivate _addConsumablesForInsert(\n\t\tconsumable: ModelConsumable,\n\t\twalkerValues: Iterable<ModelTreeWalkerValue>\n\t): ModelConsumable {\n\t\tfor ( const value of walkerValues ) {\n\t\t\tconst item = value.item;\n\n\t\t\t// Add consumable if it wasn't there yet.\n\t\t\tif ( consumable.test( item, 'insert' ) === null ) {\n\t\t\t\tconsumable.add( item, 'insert' );\n\n\t\t\t\tfor ( const key of item.getAttributeKeys() ) {\n\t\t\t\t\tconsumable.add( item, 'attribute:' + key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn consumable;\n\t}\n\n\t/**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume for a given range.\n\t *\n\t * @param consumable The consumable.\n\t * @param range The affected range.\n\t * @param type Consumable type.\n\t * @returns The values to consume.\n\t */\n\tprivate _addConsumablesForRange(\n\t\tconsumable: ModelConsumable,\n\t\trange: ModelRange,\n\t\ttype: string\n\t): ModelConsumable {\n\t\tfor ( const item of range.getItems() ) {\n\t\t\tconsumable.add( item, type );\n\t\t}\n\n\t\treturn consumable;\n\t}\n\n\t/**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with selection consumable values.\n\t *\n\t * @param consumable The consumable.\n\t * @param selection The selection to create the consumable from.\n\t * @param markers Markers that contain the selection.\n\t * @returns The values to consume.\n\t */\n\tprivate _addConsumablesForSelection(\n\t\tconsumable: ModelConsumable,\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\tmarkers: Iterable<Marker>\n\t): ModelConsumable {\n\t\tconsumable.add( selection, 'selection' );\n\n\t\tfor ( const marker of markers ) {\n\t\t\tconsumable.add( selection, 'addMarker:' + marker.name );\n\t\t}\n\n\t\tfor ( const key of selection.getAttributeKeys() ) {\n\t\t\tconsumable.add( selection, 'attribute:' + key );\n\t\t}\n\n\t\treturn consumable;\n\t}\n\n\t/**\n\t * Tests whether given event wasn't already fired and if so, fires it.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @param type Event type.\n\t * @param data Event data.\n\t * @param conversionApi The conversion API object.\n\t */\n\tprivate _testAndFire<TType extends 'insert' | 'attribute'>(\n\t\ttype: TType | `${ TType }:${ string }`,\n\t\tdata: DowncastDispatcherEventMap[ TType ],\n\t\tconversionApi: DowncastConversionApi\n\t): void {\n\t\tconst eventName = getEventName( type, data );\n\t\tconst itemKey = data.item.is( '$textProxy' ) ? conversionApi.consumable._getSymbolForTextProxy( data.item ) : data.item;\n\n\t\tconst eventsFiredForConversion = this._firedEventsMap.get( conversionApi )!;\n\t\tconst eventsFiredForItem = eventsFiredForConversion.get( itemKey );\n\n\t\tif ( !eventsFiredForItem ) {\n\t\t\teventsFiredForConversion.set( itemKey, new Set( [ eventName ] ) );\n\t\t} else if ( !eventsFiredForItem.has( eventName ) ) {\n\t\t\teventsFiredForItem.add( eventName );\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.fire<DowncastEvent<TType>>( eventName, data, conversionApi );\n\t}\n\n\t/**\n\t * Fires not already fired events for setting attributes on just inserted item.\n\t *\n\t * @param item The model item to convert attributes for.\n\t * @param conversionApi The conversion API object.\n\t */\n\tprivate _testAndFireAddAttributes(\n\t\titem: ModelItem,\n\t\tconversionApi: DowncastConversionApi\n\t): void {\n\t\tconst data: DowncastDispatcherEventMap[ 'attribute' ] = {\n\t\t\titem,\n\t\t\trange: ModelRange._createOn( item )\n\t\t} as any;\n\n\t\tfor ( const key of data.item.getAttributeKeys() ) {\n\t\t\tdata.attributeKey = key;\n\t\t\tdata.attributeOldValue = null;\n\t\t\tdata.attributeNewValue = data.item.getAttribute( key );\n\n\t\t\tthis._testAndFire( `attribute:${ key }`, data, conversionApi );\n\t\t}\n\t}\n\n\t/**\n\t * Builds an instance of the {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi} from a template and a given\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter `ViewDowncastWriter`} and options object.\n\t *\n\t * @param writer View writer that should be used to modify the view document.\n\t * @param refreshedItems A set of model elements that should not reuse their\n\t * previous view representations.\n\t * @param options Optional options passed to `convertionApi.options`.\n\t * @return The conversion API object.\n\t */\n\tprivate _createConversionApi(\n\t\twriter: ViewDowncastWriter,\n\t\trefreshedItems: Set<ModelItem> = new Set(),\n\t\toptions: DowncastConversionApi[ 'options' ] = {}\n\t): DowncastConversionApi {\n\t\tconst conversionApi: DowncastConversionApi = {\n\t\t\t...this._conversionApi,\n\t\t\tconsumable: new ModelConsumable(),\n\t\t\twriter,\n\t\t\toptions,\n\t\t\tconvertItem: item => this._convertInsert( ModelRange._createOn( item ), conversionApi ),\n\t\t\tconvertChildren: element => this._convertInsert(\n\t\t\t\tModelRange._createIn( element ),\n\t\t\t\tconversionApi,\n\t\t\t\t{ doNotAddConsumables: true }\n\t\t\t),\n\t\t\tconvertAttributes: item => this._testAndFireAddAttributes( item, conversionApi ),\n\t\t\tcanReuseView: viewElement => !refreshedItems.has( conversionApi.mapper.toModelElement( viewElement )! )\n\t\t};\n\n\t\tthis._firedEventsMap.set( conversionApi, new Map() );\n\n\t\treturn conversionApi;\n\t}\n}\n\n/**\n * Fired to enable reducing (transforming) changes buffered in the {@link module:engine/model/differ~Differ `Differ`} before\n * {@link ~DowncastDispatcher#convertChanges `convertChanges()`} will fire any conversion events.\n *\n * For instance, a feature can replace selected {@link module:engine/model/differ~DifferItem `DifferItem`}s with a `reinsert` entry\n * to trigger reconversion of an element when e.g. its attribute has changes.\n * The {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `DowncastHelpers.elementToStructure()`} helper is using this event to trigger reconversion of an element when the element,\n * its attributes or direct children changed.\n *\n * @eventName ~DowncastDispatcher#reduceChanges\n */\nexport type DowncastReduceChangesEvent = {\n\tname: 'reduceChanges';\n\targs: [ data: DowncastReduceChangesEventData ];\n};\n\nexport type DowncastReduceChangesEventData = {\n\n\t/**\n\t * A buffered changes to get reduced.\n\t */\n\tchanges: Iterable<DifferItem | DifferItemReinsert>;\n\n\t/**\n\t * Set of items marked for rebuild without reusing view nodes.\n\t */\n\trefreshedItems: Set<ModelItem>;\n};\n\nexport type DowncastDispatcherEventMap<TItem = ModelItem> = {\n\tinsert: {\n\t\titem: TItem;\n\t\trange: ModelRange;\n\t\treconversion?: boolean;\n\t};\n\tremove: {\n\t\tposition: ModelPosition;\n\t\tlength: number;\n\t\treconversion?: boolean;\n\t};\n\tattribute: {\n\t\titem: TItem;\n\t\trange: ModelRange;\n\t\tattributeKey: string;\n\t\tattributeOldValue: unknown;\n\t\tattributeNewValue: unknown;\n\t};\n\tcleanSelection: {\n\t\tselection: ModelSelection | ModelDocumentSelection;\n\t};\n\tselection: {\n\t\tselection: ModelSelection | ModelDocumentSelection;\n\t};\n\taddMarker: {\n\t\titem?: ModelItem | ModelSelection | ModelDocumentSelection;\n\t\trange?: ModelRange;\n\t\tmarkerRange: ModelRange;\n\t\tmarkerName: string;\n\t};\n\tremoveMarker: {\n\t\tmarkerRange: ModelRange;\n\t\tmarkerName: string;\n\t};\n};\n\nexport type DowncastEvent<TName extends keyof DowncastDispatcherEventMap<TItem>, TItem = ModelItem> = {\n\tname: TName | `${ TName }:${ string }`;\n\targs: [ data: DowncastDispatcherEventMap<TItem>[ TName ], conversionApi: DowncastConversionApi ];\n};\n\n/**\n * Fired for inserted nodes.\n *\n * `insert` is a namespace for a class of events. Names of actually called events follow this pattern:\n * `insert:name`. `name` is either `'$text'`, when {@link module:engine/model/text~ModelText a text node} has been inserted,\n * or {@link module:engine/model/element~ModelElement#name name} of inserted element.\n *\n * This way, the listeners can either listen to a general `insert` event or specific event (for example `insert:paragraph`).\n *\n * @eventName ~DowncastDispatcher#insert\n * @param {Object} data Additional information about the change.\n * @param {module:engine/model/item~ModelItem} data.item The inserted item.\n * @param {module:engine/model/range~ModelRange} data.range Range spanning over inserted item.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n * to be used by callback, passed in the `DowncastDispatcher` constructor.\n */\nexport type DowncastInsertEvent<TItem extends ModelItem = ModelItem> = DowncastEvent<'insert', TItem>;\n\n/**\n * Fired for removed nodes.\n *\n * `remove` is a namespace for a class of events. Names of actually called events follow this pattern:\n * `remove:name`. `name` is either `'$text'`, when a {@link module:engine/model/text~ModelText a text node} has been removed,\n * or the {@link module:engine/model/element~ModelElement#name name} of removed element.\n *\n * This way, listeners can either listen to a general `remove` event or specific event (for example `remove:paragraph`).\n *\n * @eventName ~DowncastDispatcher#remove\n * @param {Object} data Additional information about the change.\n * @param {module:engine/model/position~ModelPosition} data.position Position from which the node has been removed.\n * @param {Number} data.length Offset size of the removed node.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n * to be used by callback, passed in `DowncastDispatcher` constructor.\n */\nexport type DowncastRemoveEvent = DowncastEvent<'remove'>;\n\n/**\n * Fired in the following cases:\n *\n * * when an attribute has been added, changed, or removed from a node,\n * * when a node with an attribute is inserted,\n * * when a collapsed model selection attribute is converted.\n *\n * `attribute` is a namespace for a class of events. Names of actually called events follow this pattern:\n * `attribute:attributeKey:name`. `attributeKey` is the key of added/changed/removed attribute.\n * `name` is either `'$text'` if change was on {@link module:engine/model/text~ModelText a text node},\n * or the {@link module:engine/model/element~ModelElement#name name} of element which attribute has changed.\n *\n * This way listeners can either listen to a general `attribute:bold` event or specific event (for example `attribute:src:imageBlock`).\n *\n * @eventName ~DowncastDispatcher#attribute\n * @param {Object} data Additional information about the change.\n * @param {module:engine/model/item~ModelItem|module:engine/model/documentselection~ModelDocumentSelection} data.item Changed item\n * or converted selection.\n * @param {module:engine/model/range~ModelRange} data.range Range spanning over changed item or selection range.\n * @param {String} data.attributeKey Attribute key.\n * @param {*} data.attributeOldValue Attribute value before the change. This is `null` when selection attribute is converted.\n * @param {*} data.attributeNewValue New attribute value.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n * to be used by callback, passed in `DowncastDispatcher` constructor.\n */\nexport type DowncastAttributeEvent<TItem = ModelItem | ModelSelection | ModelDocumentSelection> = DowncastEvent<'attribute', TItem>;\n\n/**\n * Fired for {@link module:engine/model/selection~ModelSelection selection} changes.\n *\n * @eventName ~DowncastDispatcher#selection\n * @param {module:engine/model/selection~ModelSelection} selection Selection that is converted.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n * to be used by callback, passed in `DowncastDispatcher` constructor.\n */\nexport type DowncastSelectionEvent = DowncastEvent<'selection'>;\n\n/**\n * Fired at the beginning of selection conversion, before\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:selection selection} events.\n *\n * Should be used to clean up the view state at the current selection position, before the selection is moved to another place.\n *\n * @eventName ~DowncastDispatcher#cleanSelection\n * @param {module:engine/model/selection~ModelSelection} selection Selection that is converted.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n * to be used by callback, passed in `DowncastDispatcher` constructor.\n */\nexport type DowncastCleanSelectionEvent = DowncastEvent<'cleanSelection'>;\n\n/**\n * Fired when a new marker is added to the model. Also fired when a collapsed model selection that is inside a marker is converted.\n *\n * `addMarker` is a namespace for a class of events. Names of actually called events follow this pattern:\n * `addMarker:markerName`. By specifying certain marker names, you can make the events even more gradual. For example,\n * if markers are named `foo:abc`, `foo:bar`, then it is possible to listen to `addMarker:foo` or `addMarker:foo:abc` and\n * `addMarker:foo:bar` events.\n *\n * If the marker range is not collapsed:\n *\n * * the event is fired for each item in the marker range one by one,\n * * `conversionApi.consumable` includes each item of the marker range and the consumable value is same as the event name.\n *\n * If the marker range is collapsed:\n *\n * * there is only one event,\n * * `conversionApi.consumable` includes marker range with the event name.\n *\n * If the selection inside a marker is converted:\n *\n * * there is only one event,\n * * `conversionApi.consumable` includes the selection instance with the event name.\n *\n * @eventName ~DowncastDispatcher#addMarker\n * @param {Object} data Additional information about the change.\n * @param {module:engine/model/item~ModelItem|module:engine/model/selection~ModelSelection} data.item Item inside the new marker or\n * the selection that is being converted.\n * @param {module:engine/model/range~ModelRange} [data.range] Range spanning over converted item. Available only in marker conversion, if\n * the marker range was not collapsed.\n * @param {module:engine/model/range~ModelRange} data.markerRange Marker range.\n * @param {String} data.markerName Marker name.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n * to be used by callback, passed in `DowncastDispatcher` constructor.\n */\nexport type DowncastAddMarkerEvent = DowncastEvent<'addMarker'>;\n\n/**\n * Fired when a marker is removed from the model.\n *\n * `removeMarker` is a namespace for a class of events. Names of actually called events follow this pattern:\n * `removeMarker:markerName`. By specifying certain marker names, you can make the events even more gradual. For example,\n * if markers are named `foo:abc`, `foo:bar`, then it is possible to listen to `removeMarker:foo` or `removeMarker:foo:abc` and\n * `removeMarker:foo:bar` events.\n *\n * @eventName ~DowncastDispatcher#removeMarker\n * @param {Object} data Additional information about the change.\n * @param {module:engine/model/range~ModelRange} data.markerRange Marker range.\n * @param {String} data.markerName Marker name.\n * @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi Conversion interface\n * to be used by callback, passed in `DowncastDispatcher` constructor.\n */\nexport type DowncastRemoveMarkerEvent = DowncastEvent<'removeMarker'>;\n\n/**\n * Helper function, checks whether change of `marker` at `modelPosition` should be converted. Marker changes are not\n * converted if they happen inside an element with custom conversion method.\n */\nfunction shouldMarkerChangeBeConverted(\n\tmodelPosition: ModelPosition,\n\tmarker: Marker,\n\tmapper: Mapper\n): boolean {\n\tconst range = marker.getRange();\n\tconst ancestors = Array.from( modelPosition.getAncestors() );\n\tancestors.shift(); // Remove root element. It cannot be passed to `model.Range#containsItem`.\n\tancestors.reverse();\n\n\tconst hasCustomHandling = ( ancestors as Array<ModelElement> ).some( element => {\n\t\tif ( range.containsItem( element ) ) {\n\t\t\tconst viewElement = mapper.toViewElement( element )!;\n\n\t\t\treturn !!viewElement.getCustomProperty( 'addHighlight' );\n\t\t}\n\t} );\n\n\treturn !hasCustomHandling;\n}\n\nfunction getEventName<TType extends string>( type: TType, data: { item: ModelItem | ModelSelection | ModelDocumentSelection } ) {\n\tconst name = data.item.is( 'element' ) ? data.item.name : '$text';\n\n\treturn `${ type }:${ name }` as const;\n}\n\nfunction walkerValueToEventData( value: ModelTreeWalkerValue ) {\n\treturn {\n\t\titem: value.item,\n\t\trange: ModelRange._createFromPositionAndShift( value.previousPosition, value.length! )\n\t};\n}\n\n/**\n * Conversion interface that is registered for given {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}\n * and is passed as one of parameters when {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher dispatcher}\n * fires its events.\n */\nexport interface DowncastConversionApi {\n\n\t/**\n\t * The {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} instance.\n\t */\n\tdispatcher: DowncastDispatcher;\n\n\t/**\n\t * Stores the information about what parts of a processed model item are still waiting to be handled. After a piece of a model item was\n\t * converted, an appropriate consumable value should be {@link module:engine/conversion/modelconsumable~ModelConsumable#consume\n\t * consumed}.\n\t */\n\tconsumable: ModelConsumable;\n\n\t/**\n\t * The {@link module:engine/conversion/mapper~Mapper} instance.\n\t */\n\tmapper: Mapper;\n\n\t/**\n\t * The {@link module:engine/model/schema~ModelSchema} instance set for the model that is downcast.\n\t */\n\tschema: ModelSchema;\n\n\t/**\n\t * The {@link module:engine/view/downcastwriter~ViewDowncastWriter} instance used to manipulate the data during conversion.\n\t */\n\twriter: ViewDowncastWriter;\n\n\t/**\n\t * An object with an additional configuration which can be used during the conversion process.\n\t * Available only for data downcast conversion.\n\t */\n\toptions: Record<string, unknown>;\n\n\t/**\n\t * Triggers conversion of a specified item.\n\t * This conversion is triggered within (as a separate process of) the parent conversion.\n\t *\n\t * @param item The model item to trigger nested insert conversion on.\n\t */\n\tconvertItem( item: ModelItem ): void;\n\n\t/**\n\t * Triggers conversion of children of a specified element.\n\t *\n\t * @param element The model element to trigger children insert conversion on.\n\t */\n\tconvertChildren( element: ModelElement ): void;\n\n\t/**\n\t * Triggers conversion of attributes of a specified item.\n\t *\n\t * @param item The model item to trigger attribute conversion on.\n\t */\n\tconvertAttributes( item: ModelItem ): void;\n\tcanReuseView( element: ViewElement ): boolean;\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/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/**\n * @module engine/model/node\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\n\nimport { type ModelDocument } from './document.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelElement } from './element.js';\n\nimport { compareArrays, toMap } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Model node. Most basic structure of model tree.\n *\n * This is an abstract class that is a base for other classes representing different nodes in model.\n *\n * **Note:** If a node is detached from the model tree, you can manipulate it using it's API.\n * However, it is **very important** that nodes already attached to model tree should be only changed through\n * {@link module:engine/model/writer~ModelWriter Writer API}.\n *\n * Changes done by `Node` methods, like {@link module:engine/model/element~ModelElement#_insertChild _insertChild} or\n * {@link module:engine/model/node~ModelNode#_setAttribute _setAttribute}\n * do not generate {@link module:engine/model/operation/operation~Operation operations}\n * which are essential for correct editor work if you modify nodes in {@link module:engine/model/document~ModelDocument document} root.\n *\n * The flow of working on `Node` (and classes that inherits from it) is as such:\n * 1. You can create a `Node` instance, modify it using it's API.\n * 2. Add `Node` to the model using `Batch` API.\n * 3. Change `Node` that was already added to the model using `Batch` API.\n *\n * Similarly, you cannot use `Batch` API on a node that has not been added to the model tree, with the exception\n * of {@link module:engine/model/writer~ModelWriter#insert inserting} that node to the model tree.\n *\n * Be aware that using {@link module:engine/model/writer~ModelWriter#remove remove from Batch API} does not allow to use `Node` API because\n * the information about `Node` is still kept in model document.\n *\n * In case of {@link module:engine/model/element~ModelElement element node}, adding and removing children also counts as changing a node and\n * follows same rules.\n */\nexport abstract class ModelNode extends ModelTypeCheckable {\n\t/**\n\t * Parent of this node. It could be {@link module:engine/model/element~ModelElement}\n\t * or {@link module:engine/model/documentfragment~ModelDocumentFragment}.\n\t * Equals to `null` if the node has no parent.\n\t */\n\tpublic readonly parent: ModelElement | ModelDocumentFragment | null = null;\n\n\t/**\n\t * Unique root name used to identify this root element by {@link module:engine/model/document~ModelDocument}.\n\t */\n\tdeclare public readonly rootName: string | undefined;\n\n\t/**\n\t * Attributes set on this node.\n\t */\n\tprivate _attrs: Map<string, unknown>;\n\n\t/**\n\t * Index of this node in its parent or `null` if the node has no parent.\n\t *\n\t * @internal\n\t */\n\tpublic _index: number | null = null;\n\n\t/**\n\t * Offset at which this node starts in its parent or `null` if the node has no parent.\n\t *\n\t * @internal\n\t */\n\tpublic _startOffset: number | null = null;\n\n\t/**\n\t * Creates a model node.\n\t *\n\t * This is an abstract class, so this constructor should not be used directly.\n\t *\n\t * @param attrs Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */\n\tconstructor( attrs?: ModelNodeAttributes ) {\n\t\tsuper();\n\n\t\tthis._attrs = toMap( attrs! );\n\t}\n\n\t/**\n\t * {@link module:engine/model/document~ModelDocument Document} that owns this root element.\n\t */\n\tpublic get document(): ModelDocument | null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Index of this node in its parent or `null` if the node has no parent.\n\t */\n\tpublic get index(): number | null {\n\t\treturn this._index;\n\t}\n\n\t/**\n\t * Offset at which this node starts in its parent. It is equal to the sum of {@link #offsetSize offsetSize}\n\t * of all its previous siblings. Equals to `null` if node has no parent.\n\t */\n\tpublic get startOffset(): number | null {\n\t\treturn this._startOffset;\n\t}\n\n\t/**\n\t * Offset size of this node.\n\t *\n\t * Represents how much \"offset space\" is occupied by the node in its parent. It is important for\n\t * {@link module:engine/model/position~ModelPosition position}. When node has `offsetSize` greater\n\t * than `1`, position can be placed between that node start and end. `offsetSize` greater than `1` is for\n\t * nodes that represents more than one entity, i.e. a {@link module:engine/model/text~ModelText text node}.\n\t */\n\tpublic get offsetSize(): number {\n\t\treturn 1;\n\t}\n\n\t/**\n\t * Offset at which this node ends in its parent. It is equal to the sum of this node's\n\t * {@link module:engine/model/node~ModelNode#startOffset start offset} and {@link #offsetSize offset size}.\n\t * Equals to `null` if the node has no parent.\n\t */\n\tpublic get endOffset(): number | null {\n\t\tif ( this.startOffset === null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.startOffset + this.offsetSize;\n\t}\n\n\t/**\n\t * Node's next sibling or `null` if the node is a last child of it's parent or if the node has no parent.\n\t */\n\tpublic get nextSibling(): ModelNode | null {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent!.getChild( index + 1 ) ) || null;\n\t}\n\n\t/**\n\t * Node's previous sibling or `null` if the node is a first child of it's parent or if the node has no parent.\n\t */\n\tpublic get previousSibling(): ModelNode | null {\n\t\tconst index = this.index;\n\n\t\treturn ( index !== null && this.parent!.getChild( index - 1 ) ) || null;\n\t}\n\n\t/**\n\t * The top-most ancestor of the node. If node has no parent it is the root itself. If the node is a part\n\t * of {@link module:engine/model/documentfragment~ModelDocumentFragment}, it's `root` is equal to that `DocumentFragment`.\n\t */\n\tpublic get root(): ModelNode | ModelDocumentFragment {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n\t\tlet root: ModelNode | ModelDocumentFragment = this;\n\n\t\twhile ( root.parent ) {\n\t\t\troot = root.parent;\n\t\t}\n\n\t\treturn root;\n\t}\n\n\t/**\n\t * Returns `true` if the node is inside a document root that is attached to the document.\n\t */\n\tpublic isAttached(): boolean {\n\t\t// If the node has no parent it means that it is a root.\n\t\t// But this is not a `RootElement`, so it means that it is not attached.\n\t\t//\n\t\t// If this is not the root, check if this element's root is attached.\n\t\treturn this.parent === null ? false : this.root.isAttached();\n\t}\n\n\t/**\n\t * Gets path to the node. The path is an array containing starting offsets of consecutive ancestors of this node,\n\t * beginning from {@link module:engine/model/node~ModelNode#root root}, down to this node's starting offset. The path can be used to\n\t * create {@link module:engine/model/position~ModelPosition Position} instance.\n\t *\n\t * ```ts\n\t * const abc = new Text( 'abc' );\n\t * const foo = new Text( 'foo' );\n\t * const h1 = new ModelElement( 'h1', null, new Text( 'header' ) );\n\t * const p = new ModelElement( 'p', null, [ abc, foo ] );\n\t * const div = new ModelElement( 'div', null, [ h1, p ] );\n\t * foo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t * h1.getPath(); // Returns [ 0 ].\n\t * div.getPath(); // Returns [].\n\t * ```\n\t */\n\tpublic getPath(): Array<number> {\n\t\tconst path = [];\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n\t\tlet node: ModelNode | ModelDocumentFragment = this;\n\n\t\twhile ( node.parent ) {\n\t\t\tpath.unshift( node.startOffset! );\n\t\t\tnode = node.parent;\n\t\t}\n\n\t\treturn path;\n\t}\n\n\t/**\n\t * Returns ancestors array of this node.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this node will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from node's parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */\n\tpublic getAncestors( options: { includeSelf?: boolean; parentFirst?: boolean } = {} ): Array<ModelNode | ModelDocumentFragment> {\n\t\tconst ancestors: Array<ModelNode | ModelDocumentFragment> = [];\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tancestors[ options.parentFirst ? 'push' : 'unshift' ]( parent );\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn ancestors;\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/model/element~ModelElement} or {@link module:engine/model/documentfragment~ModelDocumentFragment}\n\t * which is a common ancestor of both nodes.\n\t *\n\t * @param node The second node.\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` both nodes will be considered \"ancestors\" too.\n\t * Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t */\n\tpublic getCommonAncestor( node: ModelNode, options: { includeSelf?: boolean } = {} ): ModelElement | ModelDocumentFragment | null {\n\t\tconst ancestorsA = this.getAncestors( options );\n\t\tconst ancestorsB = node.getAncestors( options );\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ] as ( ModelElement | ModelDocumentFragment );\n\t}\n\n\t/**\n\t * Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/model/documentfragment~ModelDocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */\n\tpublic isBefore( node: ModelNode ): boolean {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst thisPath = this.getPath();\n\t\tconst nodePath = node.getPath();\n\n\t\tconst result = compareArrays( thisPath, nodePath );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'prefix':\n\t\t\t\treturn true;\n\n\t\t\tcase 'extension':\n\t\t\t\treturn false;\n\n\t\t\tdefault:\n\t\t\t\treturn thisPath[ result as number ] < nodePath[ result as number ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/model/documentfragment~ModelDocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */\n\tpublic isAfter( node: ModelNode ): boolean {\n\t\t// Given node is not before this node if they are same.\n\t\tif ( this == node ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return `false` if it is impossible to compare nodes.\n\t\tif ( this.root !== node.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// In other cases, just check if the `node` is before, and return the opposite.\n\t\treturn !this.isBefore( node );\n\t}\n\n\t/**\n\t * Checks if the node has an attribute with given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on node, `false` otherwise.\n\t */\n\tpublic hasAttribute( key: string ): boolean {\n\t\treturn this._attrs.has( key );\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on node.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */\n\tpublic getAttribute( key: string ): unknown {\n\t\treturn this._attrs.get( key );\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */\n\tpublic getAttributes(): IterableIterator<[ string, unknown ]> {\n\t\treturn this._attrs.entries();\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this node's attribute keys.\n\t */\n\tpublic getAttributeKeys(): IterableIterator<string> {\n\t\treturn this._attrs.keys();\n\t}\n\n\t/**\n\t * Converts `Node` to plain object and returns it.\n\t *\n\t * @returns `Node` converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\tconst json: any = {};\n\n\t\t// Serializes attributes to the object.\n\t\t// attributes = { a: 'foo', b: 1, c: true }.\n\t\tif ( this._attrs.size ) {\n\t\t\tjson.attributes = Array.from( this._attrs ).reduce( ( result, attr ) => {\n\t\t\t\tresult[ attr[ 0 ] ] = attr[ 1 ];\n\n\t\t\t\treturn result;\n\t\t\t}, {} as any );\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a copy of this node, that is a node with exactly same attributes, and returns it.\n\t *\n\t * @internal\n\t * @returns Node with same attributes as this node.\n\t */\n\tpublic _clone( _deep?: boolean ): ModelNode {\n\t\treturn new ( this.constructor as any )( this._attrs );\n\t}\n\n\t/**\n\t * Removes this node from its parent.\n\t *\n\t * @internal\n\t * @see module:engine/model/writer~ModelWriter#remove\n\t */\n\tpublic _remove(): void {\n\t\tthis.parent!._removeChildren( this.index! );\n\t}\n\n\t/**\n\t * Sets attribute on the node. If attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#setAttribute\n\t * @internal\n\t * @param key Key of attribute to set.\n\t * @param value Attribute value.\n\t */\n\tpublic _setAttribute( key: string, value: unknown ): void {\n\t\tthis._attrs.set( key, value );\n\t}\n\n\t/**\n\t * Removes all attributes from the node and sets given attributes.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#setAttributes\n\t * @internal\n\t * @param attrs Attributes to set. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */\n\tpublic _setAttributesTo( attrs: ModelNodeAttributes ): void {\n\t\tthis._attrs = toMap( attrs );\n\t}\n\n\t/**\n\t * Removes an attribute with given key from the node.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#removeAttribute\n\t * @internal\n\t * @param key Key of attribute to remove.\n\t * @returns `true` if the attribute was set on the element, `false` otherwise.\n\t */\n\tpublic _removeAttribute( key: string ): boolean {\n\t\treturn this._attrs.delete( key );\n\t}\n\n\t/**\n\t * Removes all attributes from the node.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#clearAttributes\n\t * @internal\n\t */\n\tpublic _clearAttributes(): void {\n\t\tthis._attrs.clear();\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelNode.prototype.is = function( type: string ): boolean {\n\treturn type === 'node' || type === 'model:node';\n} as any;\n\n/**\n * Represents a set of model node attributes, accepted as either a plain object\n * with string keys or an iterable of `[ key, value ]` pairs (e.g., a `Map`).\n *\n * See {@link module:utils/tomap~toMap} for more details and examples.\n */\nexport type ModelNodeAttributes = Record<string, unknown> | Iterable<[ string, unknown ]>;\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/**\n * @module engine/model/selection\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\nimport { ModelNode } from './node.js';\nimport { ModelPosition, type ModelPositionOffset } from './position.js';\nimport { ModelRange } from './range.js';\n\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelDocumentSelection } from './documentselection.js';\nimport { type ModelElement } from './element.js';\nimport { type ModelItem } from './item.js';\n\nimport { CKEditorError, EmitterMixin, isIterable, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nconst ModelSelectionBase: EmitterMixinConstructor<typeof ModelTypeCheckable> = /* #__PURE__ */ EmitterMixin( ModelTypeCheckable );\n\n/**\n * Selection is a set of {@link module:engine/model/range~ModelRange ranges}. It has a direction specified by its\n * {@link module:engine/model/selection~ModelSelection#anchor anchor} and {@link module:engine/model/selection~ModelSelection#focus focus}\n * (it can be {@link module:engine/model/selection~ModelSelection#isBackward forward or backward}).\n * Additionally, selection may have its own attributes (think – whether text typed in in this selection\n * should have those attributes – e.g. whether you type a bolded text).\n */\nexport class ModelSelection extends ModelSelectionBase {\n\t/**\n\t * Specifies whether the last added range was added as a backward or forward range.\n\t */\n\tprivate _lastRangeBackward: boolean = false;\n\n\t/**\n\t * List of attributes set on current selection.\n\t */\n\tprotected _attrs: Map<string, unknown> = new Map();\n\n\t/** @internal */\n\tpublic _ranges: Array<ModelRange> = [];\n\n\t/**\n\t * Creates a new selection instance based on the given {@link module:engine/model/selection~ModelSelectable selectable}\n\t * or creates an empty selection if no arguments were passed.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = writer.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = writer.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * const selection = writer.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = writer.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the given document selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const documentSelection = model.document.selection;\n\t * const selection = writer.createSelection( documentSelection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * const selection = writer.createSelection( position );\n\t *\n\t * // Creates selection at the given offset in the given element.\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * const selection = writer.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/model/item~ModelItem item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = writer.createSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * Selection's constructor allow passing additional options (`'backward'`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * @internal\n\t */\n\tconstructor(\n\t\t...args: [] |\n\t\t[\n\t\t\tselectable: ModelNode,\n\t\t\tplaceOrOffset: ModelPlaceOrOffset,\n\t\t\toptions?: { backward?: boolean }\n\t\t] |\n\t\t[\n\t\t\tselectable?: Exclude<ModelSelectable, ModelNode>,\n\t\t\toptions?: { backward?: boolean }\n\t\t]\n\t) {\n\t\tsuper();\n\n\t\tif ( args.length ) {\n\t\t\tthis.setTo( ...args );\n\t\t}\n\t}\n\n\t/**\n\t * Selection anchor. Anchor is the position from which the selection was started. If a user is making a selection\n\t * by dragging the mouse, the anchor is where the user pressed the mouse button (the beginning of the selection).\n\t *\n\t * Anchor and {@link #focus} define the direction of the selection, which is important\n\t * when expanding/shrinking selection. The focus moves, while the anchor should remain in the same place.\n\t *\n\t * Anchor is always set to the {@link module:engine/model/range~ModelRange#start start} or\n\t * {@link module:engine/model/range~ModelRange#end end} position of the last of selection's ranges. Whether it is\n\t * the `start` or `end` depends on the specified `options.backward`. See the {@link #setTo `setTo()`} method.\n\t *\n\t * May be set to `null` if there are no ranges in the selection.\n\t *\n\t * @see #focus\n\t */\n\tpublic get anchor(): ModelPosition | null {\n\t\tif ( this._ranges.length > 0 ) {\n\t\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\n\t\t\treturn this._lastRangeBackward ? range.end : range.start;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Selection focus. Focus is the position where the selection ends. If a user is making a selection\n\t * by dragging the mouse, the focus is where the mouse cursor is.\n\t *\n\t * May be set to `null` if there are no ranges in the selection.\n\t *\n\t * @see #anchor\n\t */\n\tpublic get focus(): ModelPosition | null {\n\t\tif ( this._ranges.length > 0 ) {\n\t\t\tconst range = this._ranges[ this._ranges.length - 1 ];\n\n\t\t\treturn this._lastRangeBackward ? range.start : range.end;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Whether the selection is collapsed. Selection is collapsed when there is exactly one range in it\n\t * and it is collapsed.\n\t */\n\tpublic get isCollapsed(): boolean {\n\t\tconst length = this._ranges.length;\n\n\t\tif ( length === 1 ) {\n\t\t\treturn this._ranges[ 0 ].isCollapsed;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the number of ranges in the selection.\n\t */\n\tpublic get rangeCount(): number {\n\t\treturn this._ranges.length;\n\t}\n\n\t/**\n\t * Specifies whether the selection's {@link #focus} precedes the selection's {@link #anchor}.\n\t */\n\tpublic get isBackward(): boolean {\n\t\treturn !this.isCollapsed && this._lastRangeBackward;\n\t}\n\n\t/**\n\t * Checks whether this selection is equal to the given selection. Selections are equal if they have the same directions,\n\t * the same number of ranges and all ranges from one selection equal to ranges from the another selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are equal, `false` otherwise.\n\t */\n\tpublic isEqual( otherSelection: ModelSelection | ModelDocumentSelection ): boolean {\n\t\tif ( this.rangeCount != otherSelection.rangeCount ) {\n\t\t\treturn false;\n\t\t} else if ( this.rangeCount === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( !this.anchor!.isEqual( otherSelection.anchor! ) || !this.focus!.isEqual( otherSelection.focus! ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const thisRange of this._ranges ) {\n\t\t\tlet found = false;\n\n\t\t\tfor ( const otherRange of otherSelection._ranges ) {\n\t\t\t\tif ( thisRange.isEqual( otherRange ) ) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !found ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns an iterable object that iterates over copies of selection ranges.\n\t */\n\tpublic* getRanges(): IterableIterator<ModelRange> {\n\t\tfor ( const range of this._ranges ) {\n\t\t\tyield new ModelRange( range.start, range.end );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a copy of the first range in the selection.\n\t * First range is the one which {@link module:engine/model/range~ModelRange#start start} position\n\t * {@link module:engine/model/position~ModelPosition#isBefore is before} start position of all other ranges\n\t * (not to confuse with the first range added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getFirstRange(): ModelRange | null {\n\t\tlet first = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !first || range.start.isBefore( first.start ) ) {\n\t\t\t\tfirst = range;\n\t\t\t}\n\t\t}\n\n\t\treturn first ? new ModelRange( first.start, first.end ) : null;\n\t}\n\n\t/**\n\t * Returns a copy of the last range in the selection.\n\t * Last range is the one which {@link module:engine/model/range~ModelRange#end end} position\n\t * {@link module:engine/model/position~ModelPosition#isAfter is after} end position of all other\n\t * ranges (not to confuse with the range most recently added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getLastRange(): ModelRange | null {\n\t\tlet last = null;\n\n\t\tfor ( const range of this._ranges ) {\n\t\t\tif ( !last || range.end.isAfter( last.end ) ) {\n\t\t\t\tlast = range;\n\t\t\t}\n\t\t}\n\n\t\treturn last ? new ModelRange( last.start, last.end ) : null;\n\t}\n\n\t/**\n\t * Returns the first position in the selection.\n\t * First position is the position that {@link module:engine/model/position~ModelPosition#isBefore is before}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getFirstPosition(): ModelPosition | null {\n\t\tconst first = this.getFirstRange();\n\n\t\treturn first ? first.start.clone() : null;\n\t}\n\n\t/**\n\t * Returns the last position in the selection.\n\t * Last position is the position that {@link module:engine/model/position~ModelPosition#isAfter is after}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getLastPosition(): ModelPosition | null {\n\t\tconst lastRange = this.getLastRange();\n\n\t\treturn lastRange ? lastRange.end.clone() : null;\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/model/selection~ModelSelectable selectable}.\n\t *\n\t * ```ts\n\t * // Removes all selection's ranges.\n\t * selection.setTo( null );\n\t *\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * selection.setTo( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * selection.setTo( ranges );\n\t *\n\t * // Sets selection to other selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const otherSelection = writer.createSelection();\n\t * selection.setTo( otherSelection );\n\t *\n\t * // Sets selection to the given document selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const documentSelection = new ModelDocumentSelection( doc );\n\t * selection.setTo( documentSelection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * selection.setTo( position );\n\t *\n\t * // Sets collapsed selection at the position of the given node and an offset.\n\t * selection.setTo( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the first child of\n \t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on an {@link module:engine/model/item~ModelItem item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection#setTo()` method allows passing additional options (`backward`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t */\n\tpublic setTo(\n\t\t...args: [\n\t\t\tselectable: ModelNode,\n\t\t\tplaceOrOffset: ModelPlaceOrOffset,\n\t\t\toptions?: { backward?: boolean }\n\t\t] | [\n\t\t\tselectable?: Exclude<ModelSelectable, ModelNode>,\n\t\t\toptions?: { backward?: boolean }\n\t\t]\n\t): void {\n\t\tlet [ selectable, placeOrOffset, options ] = args;\n\n\t\tif ( typeof placeOrOffset == 'object' ) {\n\t\t\toptions = placeOrOffset;\n\t\t\tplaceOrOffset = undefined;\n\t\t}\n\n\t\tif ( selectable === null ) {\n\t\t\tthis._setRanges( [] );\n\t\t} else if ( selectable instanceof ModelSelection ) {\n\t\t\tthis._setRanges( selectable.getRanges(), selectable.isBackward );\n\t\t} else if ( selectable && typeof ( selectable as any ).getRanges == 'function' ) {\n\t\t\t// We assume that the selectable is a ModelDocumentSelection.\n\t\t\t// It can't be imported here, because it would lead to circular imports.\n\t\t\tthis._setRanges( ( selectable as ModelDocumentSelection ).getRanges(), ( selectable as ModelDocumentSelection ).isBackward );\n\t\t} else if ( selectable instanceof ModelRange ) {\n\t\t\tthis._setRanges( [ selectable ], !!options && !!options.backward );\n\t\t} else if ( selectable instanceof ModelPosition ) {\n\t\t\tthis._setRanges( [ new ModelRange( selectable ) ] );\n\t\t} else if ( selectable instanceof ModelNode ) {\n\t\t\tconst backward = !!options && !!options.backward;\n\t\t\tlet range;\n\n\t\t\tif ( placeOrOffset == 'in' ) {\n\t\t\t\trange = ModelRange._createIn( selectable as ModelElement );\n\t\t\t} else if ( placeOrOffset == 'on' ) {\n\t\t\t\trange = ModelRange._createOn( selectable );\n\t\t\t} else if ( placeOrOffset !== undefined ) {\n\t\t\t\trange = new ModelRange( ModelPosition._createAt( selectable, placeOrOffset ) );\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-setto-required-second-parameter\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-selection-setto-required-second-parameter', [ this, selectable ] );\n\t\t\t}\n\n\t\t\tthis._setRanges( [ range ], backward );\n\t\t} else if ( isIterable( selectable ) ) {\n\t\t\t// We assume that the selectable is an iterable of ranges.\n\t\t\tthis._setRanges( selectable, options && !!options.backward );\n\t\t} else {\n\t\t\t/**\n\t\t\t * Cannot set the selection to the given place.\n\t\t\t *\n\t\t\t * Invalid parameters were specified when setting the selection. Common issues:\n\t\t\t *\n\t\t\t * * A {@link module:engine/model/textproxy~ModelTextProxy} instance was passed instead of\n\t\t\t * a real {@link module:engine/model/text~ModelText}.\n\t\t\t * * View nodes were passed instead of model nodes.\n\t\t\t * * `null`/`undefined` was passed.\n\t\t\t *\n\t\t\t * @error model-selection-setto-not-selectable\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-selection-setto-not-selectable', [ this, selectable ] );\n\t\t}\n\t}\n\n\t/**\n\t * Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t * is treated like the last added range and is used to set {@link module:engine/model/selection~ModelSelection#anchor} and\n\t * {@link module:engine/model/selection~ModelSelection#focus}. Accepts a flag describing in which direction the selection is made.\n\t *\n\t * @fires change:range\n\t * @param newRanges Ranges to set.\n\t * @param isLastBackward Flag describing if last added range was selected forward - from start to end (`false`)\n\t * or backward - from end to start (`true`).\n\t */\n\tprotected _setRanges( newRanges: Iterable<ModelRange>, isLastBackward: boolean = false ): void {\n\t\tconst ranges = Array.from( newRanges );\n\n\t\t// Check whether there is any range in new ranges set that is different than all already added ranges.\n\t\tconst anyNewRange = ranges.some( newRange => {\n\t\t\tif ( !( newRange instanceof ModelRange ) ) {\n\t\t\t\t/**\n\t\t\t\t * Selection range set to an object that is not an instance of {@link module:engine/model/range~ModelRange}.\n\t\t\t\t *\n\t\t\t\t * Only {@link module:engine/model/range~ModelRange} instances can be used to set a selection.\n\t\t\t\t * Common mistakes leading to this error are:\n\t\t\t\t *\n\t\t\t\t * * using DOM `Range` object,\n\t\t\t\t * * incorrect CKEditor 5 installation with multiple `ckeditor5-engine` packages having different versions.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-set-ranges-not-range\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'model-selection-set-ranges-not-range',\n\t\t\t\t\t[ this, newRanges ]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn this._ranges.every( oldRange => {\n\t\t\t\treturn !oldRange.isEqual( newRange );\n\t\t\t} );\n\t\t} );\n\n\t\t// Don't do anything if nothing changed.\n\t\tif ( ranges.length === this._ranges.length && !anyNewRange ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._replaceAllRanges( ranges );\n\n\t\tthis._lastRangeBackward = !!isLastBackward;\n\n\t\tthis.fire<ModelSelectionChangeRangeEvent>( 'change:range', { directChange: true } );\n\t}\n\n\t/**\n\t * Moves {@link module:engine/model/selection~ModelSelection#focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/model/writer~ModelWriter#createPositionAt writer.createPositionAt()} parameters.\n\t *\n\t * @fires change:range\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic setFocus( itemOrPosition: ModelItem | ModelPosition, offset?: ModelPositionOffset ): void {\n\t\tif ( this.anchor === null ) {\n\t\t\t/**\n\t\t\t * Cannot set selection focus if there are no ranges in selection.\n\t\t\t *\n\t\t\t * @error model-selection-setfocus-no-ranges\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-selection-setfocus-no-ranges', [ this, itemOrPosition ] );\n\t\t}\n\n\t\tconst newFocus = ModelPosition._createAt( itemOrPosition, offset );\n\n\t\tif ( newFocus.compareWith( this.focus! ) == 'same' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst anchor = this.anchor;\n\n\t\tif ( this._ranges.length ) {\n\t\t\tthis._popRange();\n\t\t}\n\n\t\tif ( newFocus.compareWith( anchor ) == 'before' ) {\n\t\t\tthis._pushRange( new ModelRange( newFocus, anchor ) );\n\t\t\tthis._lastRangeBackward = true;\n\t\t} else {\n\t\t\tthis._pushRange( new ModelRange( anchor, newFocus ) );\n\t\t\tthis._lastRangeBackward = false;\n\t\t}\n\n\t\tthis.fire<ModelSelectionChangeRangeEvent>( 'change:range', { directChange: true } );\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */\n\tpublic getAttribute( key: string ): unknown {\n\t\treturn this._attrs.get( key );\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */\n\tpublic getAttributes(): IterableIterator<[ string, unknown ]> {\n\t\treturn this._attrs.entries();\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attribute keys.\n\t */\n\tpublic getAttributeKeys(): IterableIterator<string> {\n\t\treturn this._attrs.keys();\n\t}\n\n\t/**\n\t * Checks if the selection has an attribute for given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on selection, `false` otherwise.\n\t */\n\tpublic hasAttribute( key: string ): boolean {\n\t\treturn this._attrs.has( key );\n\t}\n\n\t/**\n\t * Removes an attribute with given key from the selection.\n\t *\n\t * If given attribute was set on the selection, fires the {@link #event:change:range} event with\n\t * removed attribute key.\n\t *\n\t * @fires change:attribute\n\t * @param key Key of attribute to remove.\n\t */\n\tpublic removeAttribute( key: string ): void {\n\t\tif ( this.hasAttribute( key ) ) {\n\t\t\tthis._attrs.delete( key );\n\n\t\t\tthis.fire<ModelSelectionChangeAttributeEvent>( 'change:attribute', { attributeKeys: [ key ], directChange: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * If the attribute value has changed, fires the {@link #event:change:range} event with\n\t * the attribute key.\n\t *\n\t * @fires change:attribute\n\t * @param key Key of attribute to set.\n\t * @param value Attribute value.\n\t */\n\tpublic setAttribute( key: string, value: unknown ): void {\n\t\tif ( this.getAttribute( key ) !== value ) {\n\t\t\tthis._attrs.set( key, value );\n\n\t\t\tthis.fire<ModelSelectionChangeAttributeEvent>( 'change:attribute', { attributeKeys: [ key ], directChange: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/model/element~ModelElement Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */\n\tpublic getSelectedElement(): ModelElement | null {\n\t\tif ( this.rangeCount !== 1 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.getFirstRange()!.getContainedElement();\n\t}\n\n\t/**\n\t * Gets elements of type {@link module:engine/model/schema~ModelSchema#isBlock \"block\"} touched by the selection.\n\t *\n\t * This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t *\n\t * **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t * but will not return blocks nested in other blocks.\n\t *\n\t * In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t *\n\t * ```xml\n\t * <paragraph>[a</paragraph>\n\t * <blockQuote>\n\t * \t<paragraph>b</paragraph>\n\t * </blockQuote>\n\t * <paragraph>c]d</paragraph>\n\t * ```\n\t *\n\t * In this case the paragraph will also be returned, despite the collapsed selection:\n\t *\n\t * ```xml\n\t * <paragraph>[]a</paragraph>\n\t * ```\n\t *\n\t * In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t *\n\t * ```xml\n\t * [<blockA></blockA>\n\t * <blockB>\n\t * \t<blockC></blockC>\n\t * \t<blockD></blockD>\n\t * </blockB>\n\t * <blockE></blockE>]\n\t * ```\n\t *\n\t * If the selection is inside a block all the inner blocks (A & B) are returned:\n\t *\n\t * ```xml\n\t * <block>\n\t * \t<blockA>[a</blockA>\n\t * \t<blockB>b]</blockB>\n\t * </block>\n\t * ```\n\t *\n\t * **Special case**: Selection ignores first and/or last blocks if nothing (from user perspective) is selected in them.\n\t *\n\t * ```xml\n\t * // Selection ends and the beginning of the last block.\n\t * <paragraph>[a</paragraph>\n\t * <paragraph>b</paragraph>\n\t * <paragraph>]c</paragraph> // This block will not be returned\n\t *\n\t * // Selection begins at the end of the first block.\n\t * <paragraph>a[</paragraph> // This block will not be returned\n\t * <paragraph>b</paragraph>\n\t * <paragraph>c]</paragraph>\n\t *\n\t * // Selection begings at the end of the first block and ends at the beginning of the last block.\n\t * <paragraph>a[</paragraph> // This block will not be returned\n\t * <paragraph>b</paragraph>\n\t * <paragraph>]c</paragraph> // This block will not be returned\n\t * ```\n\t */\n\tpublic* getSelectedBlocks(): IterableIterator<ModelElement> {\n\t\tconst visited = new WeakSet<ModelNode | ModelDocumentFragment>();\n\n\t\tfor ( const range of this.getRanges() ) {\n\t\t\t// Get start block of range in case of a collapsed range.\n\t\t\tconst startBlock = getParentBlock( range.start, visited );\n\n\t\t\tif ( isStartBlockSelected( startBlock, range ) ) {\n\t\t\t\tyield startBlock as any;\n\t\t\t}\n\n\t\t\tconst treewalker = range.getWalker();\n\n\t\t\tfor ( const value of treewalker ) {\n\t\t\t\tconst block = value.item;\n\n\t\t\t\tif ( value.type == 'elementEnd' && isUnvisitedTopBlock( block as any, visited, range ) ) {\n\t\t\t\t\tyield block as ModelElement;\n\t\t\t\t}\n\t\t\t\t// If element is block, we can skip its children and jump to the end of it.\n\t\t\t\telse if (\n\t\t\t\t\tvalue.type == 'elementStart' &&\n\t\t\t\t\tblock.is( 'model:element' ) &&\n\t\t\t\t\tblock.root.document!.model.schema.isBlock( block )\n\t\t\t\t) {\n\t\t\t\t\ttreewalker.jumpTo( ModelPosition._createAt( block, 'end' ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst endBlock = getParentBlock( range.end, visited );\n\n\t\t\tif ( isEndBlockSelected( endBlock, range ) ) {\n\t\t\t\tyield endBlock as any;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t * at a position {@link module:engine/model/position~ModelPosition#isTouching touching} the element's start and ends at position\n\t * touching the element's end.\n\t *\n\t * By default, this method will check whether the entire content of the selection's current root is selected.\n\t * Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t */\n\tpublic containsEntireContent( element: ModelElement = this.anchor!.root as ModelElement ): boolean {\n\t\tconst limitStartPosition = ModelPosition._createAt( element, 0 );\n\t\tconst limitEndPosition = ModelPosition._createAt( element, 'end' );\n\n\t\treturn limitStartPosition.isTouching( this.getFirstPosition()! ) &&\n\t\t\tlimitEndPosition.isTouching( this.getLastPosition()! );\n\t}\n\n\t/**\n\t * Converts `Selection` to plain object and returns it.\n\t *\n\t * @returns `Selection` converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\tconst json: any = {\n\t\t\tranges: Array.from( this.getRanges() ).map( range => range.toJSON() )\n\t\t};\n\n\t\tconst attributes = Object.fromEntries( this.getAttributes() );\n\n\t\tif ( Object.keys( attributes ).length ) {\n\t\t\tjson.attributes = attributes;\n\t\t}\n\n\t\tif ( this.isBackward ) {\n\t\t\tjson.isBackward = true;\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Adds given range to internal {@link #_ranges ranges array}. Throws an error\n\t * if given range is intersecting with any range that is already stored in this selection.\n\t */\n\tprotected _pushRange( range: ModelRange ): void {\n\t\tthis._checkRange( range );\n\t\tthis._ranges.push( new ModelRange( range.start, range.end ) );\n\t}\n\n\t/**\n\t * Checks if given range intersects with ranges that are already in the selection. Throws an error if it does.\n\t */\n\tprotected _checkRange( range: ModelRange ): void {\n\t\tfor ( let i = 0; i < this._ranges.length; i++ ) {\n\t\t\tif ( range.isIntersecting( this._ranges[ i ] ) ) {\n\t\t\t\t/**\n\t\t\t\t * Trying to add a range that intersects with another range in the selection.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-range-intersects\n\t\t\t\t * @param {module:engine/model/range~ModelRange} addedRange Range that was added to the selection.\n\t\t\t\t * @param {module:engine/model/range~ModelRange} intersectingRange Range in the selection that intersects with `addedRange`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'model-selection-range-intersects',\n\t\t\t\t\t[ this, range ],\n\t\t\t\t\t{ addedRange: range, intersectingRange: this._ranges[ i ] }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Replaces all the ranges by the given ones.\n\t * Uses {@link #_popRange _popRange} and {@link #_pushRange _pushRange} to ensure proper ranges removal and addition.\n\t */\n\tprotected _replaceAllRanges( ranges: Array<ModelRange> ): void {\n\t\tthis._removeAllRanges();\n\n\t\tfor ( const range of ranges ) {\n\t\t\tthis._pushRange( range );\n\t\t}\n\t}\n\n\t/**\n\t * Deletes ranges from internal range array. Uses {@link #_popRange _popRange} to\n\t * ensure proper ranges removal.\n\t */\n\tprotected _removeAllRanges(): void {\n\t\twhile ( this._ranges.length > 0 ) {\n\t\t\tthis._popRange();\n\t\t}\n\t}\n\n\t/**\n\t * Removes most recently added range from the selection.\n\t */\n\tprotected _popRange(): void {\n\t\tthis._ranges.pop();\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelSelection.prototype.is = function( type: string ): boolean {\n\treturn type === 'selection' || type === 'model:selection';\n} as any;\n\n/**\n * Describes one of the events: `change:range` or `change:attribute`.\n */\nexport type ModelSelectionChangeEvent = {\n\tname: 'change' | 'change:range' | 'change:attribute';\n\targs: [ {\n\t\tdirectChange: boolean;\n\t\tattributeKeys?: Array<string>;\n\t} ];\n};\n\n/**\n * Fired when selection range(s) changed.\n *\n * @eventName ~ModelSelection#change:range\n * @param directChange In case of {@link module:engine/model/selection~ModelSelection} class it is always set\n * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n * The {@link module:engine/model/documentselection~ModelDocumentSelection}, however, may change because its position\n * was directly changed through the {@link module:engine/model/writer~ModelWriter writer} or because its position was\n * changed because the structure of the model has been changed (which means an indirect change).\n * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n * which mean that they are not updated once the document changes.\n */\nexport type ModelSelectionChangeRangeEvent = {\n\tname: 'change' | 'change:range';\n\targs: [ {\n\t\tdirectChange: boolean;\n\t} ];\n};\n\n/**\n * Fired when selection attribute changed.\n *\n * @eventName ~ModelSelection#change:attribute\n * @param directChange In case of {@link module:engine/model/selection~ModelSelection} class it is always set\n * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n * The {@link module:engine/model/documentselection~ModelDocumentSelection}, however, may change because its attributes\n * were directly changed through the {@link module:engine/model/writer~ModelWriter writer} or because its position was\n * changed in the model and its attributes were refreshed (which means an indirect change).\n * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n * which mean that they are not updated once the document changes.\n * @param attributeKeys Array containing keys of attributes that changed.\n */\nexport type ModelSelectionChangeAttributeEvent = {\n\tname: 'change' | 'change:attribute';\n\targs: [ {\n\t\tdirectChange: boolean;\n\t\tattributeKeys: Array<string>;\n\t} ];\n};\n\n/**\n * Checks whether the given element extends $block in the schema and has a parent (is not a root).\n * Marks it as already visited.\n */\nfunction isUnvisitedBlock( element: ModelNode | ModelDocumentFragment, visited: WeakSet<ModelNode | ModelDocumentFragment> ) {\n\tif ( visited.has( element ) ) {\n\t\treturn false;\n\t}\n\n\tvisited.add( element );\n\n\treturn element.root.document!.model.schema.isBlock( element ) && !!element.parent;\n}\n\n/**\n * Checks if the given element is a $block was not previously visited and is a top block in a range.\n */\nfunction isUnvisitedTopBlock( element: ModelElement, visited: WeakSet<ModelNode | ModelDocumentFragment>, range: ModelRange ) {\n\treturn isUnvisitedBlock( element, visited ) && isTopBlockInRange( element, range );\n}\n\n/**\n * Finds the lowest element in position's ancestors which is a block.\n * It will search until first ancestor that is a limit element.\n * Marks all ancestors as already visited to not include any of them later on.\n */\nfunction getParentBlock( position: ModelPosition, visited: WeakSet<ModelNode | ModelDocumentFragment> ) {\n\tconst element = position.parent;\n\tconst schema = element.root.document!.model.schema;\n\n\tconst ancestors = position.parent.getAncestors( { parentFirst: true, includeSelf: true } );\n\n\tlet hasParentLimit = false;\n\n\tconst block = ancestors.find( ( element ): element is ModelElement => {\n\t\t// Stop searching after first parent node that is limit element.\n\t\tif ( hasParentLimit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\thasParentLimit = schema.isLimit( element );\n\n\t\treturn !hasParentLimit && isUnvisitedBlock( element, visited );\n\t} );\n\n\t// Mark all ancestors of this position's parent, because find() might've stopped early and\n\t// the found block may be a child of another block.\n\tancestors.forEach( element => visited.add( element ) );\n\n\treturn block;\n}\n\n/**\n * Checks if the blocks is not nested in other block inside a range.\n */\nfunction isTopBlockInRange( block: ModelNode, range: ModelRange ) {\n\tconst parentBlock = findAncestorBlock( block );\n\n\tif ( !parentBlock ) {\n\t\treturn true;\n\t}\n\n\t// Add loose flag to check as parentRange can be equal to range.\n\tconst isParentInRange = range.containsRange( ModelRange._createOn( parentBlock ), true );\n\n\treturn !isParentInRange;\n}\n\n/**\n * If a selection starts at the end of a block, that block is not returned as from the user's perspective this block wasn't selected.\n * See [#11585](https://github.com/ckeditor/ckeditor5/issues/11585) for more details.\n *\n * ```xml\n * <paragraph>a[</paragraph> // This block will not be returned\n * <paragraph>b</paragraph>\n * <paragraph>c]</paragraph>\n * ```\n *\n * Collapsed selection is not affected by it:\n *\n * ```xml\n * <paragraph>a[]</paragraph> // This block will be returned\n * ```\n */\nfunction isStartBlockSelected( startBlock: ModelElement | undefined, range: ModelRange ): boolean {\n\tif ( !startBlock ) {\n\t\treturn false;\n\t}\n\n\tif ( range.isCollapsed || startBlock.isEmpty ) {\n\t\treturn true;\n\t}\n\n\tif ( range.start.isTouching( ModelPosition._createAt( startBlock, startBlock.maxOffset ) ) ) {\n\t\treturn false;\n\t}\n\n\treturn isTopBlockInRange( startBlock, range );\n}\n\n/**\n * If a selection ends at the beginning of a block, that block is not returned as from the user's perspective this block wasn't selected.\n * See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n *\n * ```xml\n * <paragraph>[a</paragraph>\n * <paragraph>b</paragraph>\n * <paragraph>]c</paragraph> // this block will not be returned\n * ```\n *\n * Collapsed selection is not affected by it:\n *\n * ```xml\n * <paragraph>[]a</paragraph> // this block will be returned\n * ```\n */\nfunction isEndBlockSelected( endBlock: ModelElement | undefined, range: ModelRange ): boolean {\n\tif ( !endBlock ) {\n\t\treturn false;\n\t}\n\n\tif ( range.isCollapsed || endBlock.isEmpty ) {\n\t\treturn true;\n\t}\n\n\tif ( range.end.isTouching( ModelPosition._createAt( endBlock, 0 ) ) ) {\n\t\treturn false;\n\t}\n\n\treturn isTopBlockInRange( endBlock, range );\n}\n\n/**\n * Returns first ancestor block of a node.\n */\nfunction findAncestorBlock( node: ModelNode | ModelDocumentFragment ) {\n\tconst schema = node.root.document!.model.schema;\n\n\tlet parent = node.parent;\n\n\twhile ( parent ) {\n\t\tif ( schema.isBlock( parent ) ) {\n\t\t\treturn parent as ModelElement;\n\t\t}\n\n\t\tparent = parent.parent;\n\t}\n}\n\n/**\n * An entity that is used to set selection.\n *\n * See also {@link module:engine/model/selection~ModelSelection#setTo}.\n */\nexport type ModelSelectable =\n\t| ModelSelection\n\t| ModelDocumentSelection\n\t| ModelPosition\n\t| ModelRange\n\t| ModelNode\n\t| Iterable<ModelRange> | null;\n\n/**\n * The place or offset of the selection.\n */\nexport type ModelPlaceOrOffset = number | 'before' | 'end' | 'after' | 'on' | 'in';\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/**\n * @module engine/model/liverange\n */\n\nimport { ModelRange } from './range.js';\n\nimport type { Model, ModelApplyOperationEvent } from './model.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelElement } from './element.js';\nimport { type ModelItem } from './item.js';\nimport { type MergeOperation } from './operation/mergeoperation.js';\nimport { type MoveOperation } from './operation/moveoperation.js';\nimport { type Operation } from './operation/operation.js';\nimport { type ModelPosition } from './position.js';\nimport { CKEditorError, EmitterMixin, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\nimport type { DetachOperation } from './operation/detachoperation.js';\n\nconst ModelLiveRangeBase: EmitterMixinConstructor<typeof ModelRange> = /* #__PURE__ */ EmitterMixin( ModelRange );\n\n/**\n * `ModelLiveRange` is a type of {@link module:engine/model/range~ModelRange Range}\n * that updates itself as {@link module:engine/model/document~ModelDocument document}\n * is changed through operations. It may be used as a bookmark.\n *\n * **Note:** Be very careful when dealing with `ModelLiveRange`. Each `ModelLiveRange` instance bind events that might\n * have to be unbound. Use {@link module:engine/model/liverange~ModelLiveRange#detach detach} whenever you don't need\n * `ModelLiveRange` anymore.\n */\nexport class ModelLiveRange extends ModelLiveRangeBase {\n\t/**\n\t * Creates a live range.\n\t *\n\t * @see module:engine/model/range~ModelRange\n\t */\n\tconstructor( start: ModelPosition, end?: ModelPosition | null, model?: Model ) {\n\t\tsuper( start, end );\n\n\t\tconst root = this.root;\n\t\tconst boundModel = model || ( root.is( 'rootElement' ) ? root.document!.model : null );\n\n\t\tif ( !boundModel ) {\n\t\t\t/**\n\t\t\t * LiveRange's root has to be an instance of ModelRootElement or have a reference to a model instance.\n\t\t\t *\n\t\t\t * @error model-liverange-no-model-reference\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-liverange-no-model-reference', root );\n\t\t}\n\n\t\tbindWithModel.call( this, boundModel );\n\t}\n\n\t/**\n\t * Unbinds all events previously bound by `ModelLiveRange`. Use it whenever you don't need `ModelLiveRange` instance\n\t * anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was\n\t * referring to it).\n\t */\n\tpublic detach(): void {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/model/range~ModelRange range instance} that is equal to this live range.\n\t */\n\tpublic toRange(): ModelRange {\n\t\treturn new ModelRange( this.start, this.end );\n\t}\n\n\t/**\n\t * Creates a `ModelLiveRange` instance that is equal to the given range.\n\t */\n\tpublic static fromRange( range: ModelRange ): ModelLiveRange {\n\t\treturn new ModelLiveRange( range.start, range.end );\n\t}\n\n\t/**\n\t * Creates a `ModelLiveRange` for a range rooted in\n\t * a {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n\t *\n\t * Document fragment does not belong to a document, so the live range is bound to the provided `model` and keeps\n\t * itself in sync with every operation applied to that fragment (e.g. while editing clipboard content).\n\t *\n\t * @internal\n\t */\n\tpublic static _fromRangeInDocumentFragment( range: ModelRange, model: Model ): ModelLiveRange {\n\t\treturn new this( range.start, range.end, model );\n\t}\n\n\t/**\n\t * @see module:engine/model/range~ModelRange._createIn\n\t * @internal\n\t */\n\n\tdeclare public static readonly _createIn: ( element: ModelElement | ModelDocumentFragment ) => ModelLiveRange;\n\n\t/**\n\t * @see module:engine/model/range~ModelRange._createOn\n\t * @internal\n\t */\n\n\tdeclare public static readonly _createOn: ( element: ModelItem | ModelDocumentFragment ) => ModelLiveRange;\n\n\t/**\n\t * @see module:engine/model/range~ModelRange._createFromPositionAndShift\n\t * @internal\n\t */\n\n\tdeclare public static readonly _createFromPositionAndShift: ( position: ModelPosition, shift: number ) => ModelLiveRange;\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelLiveRange.prototype.is = function( type: string ): boolean {\n\treturn type === 'liveRange' || type === 'model:liveRange' ||\n\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\ttype == 'range' || type === 'model:range';\n} as any;\n\n/**\n * Fired when `ModelLiveRange` instance boundaries have changed due to changes in the\n * {@link module:engine/model/document~ModelDocument document}.\n *\n * @eventName ~ModelLiveRange#change:range\n * @param oldRange Range with start and end position equal to start and end position of this live\n * range before it got changed.\n * @param data Object with additional information about the change.\n * @param data.deletionPosition Source position for remove and merge changes.\n * Available if the range was moved to the graveyard root, `null` otherwise.\n */\nexport type ModelLiveRangeChangeRangeEvent = {\n\tname: 'change' | 'change:range';\n\targs: [ range: ModelRange, data: { deletionPosition: ModelPosition | null } ];\n};\n\n/**\n * Fired when `ModelLiveRange` instance was entirely removed from the document fragment.\n *\n * @eventName ~ModelLiveRange#change:drop\n * @param range Collapsed range with start and end position equal to the source position of the detach operation.\n * @param data Object with additional information about the change.\n * @param data.deletionPosition Source position for detach changes.\n */\nexport type ModelLiveRangeChangeDropEvent = {\n\tname: 'change' | 'change:drop';\n\targs: [ range: ModelRange, data: { deletionPosition: ModelPosition } ];\n};\n\n/**\n * Fired when `ModelLiveRange` instance boundaries have not changed after\n * a change in {@link module:engine/model/document~ModelDocument document}\n * but the change took place inside the range, effectively changing its content.\n *\n * @eventName ~ModelLiveRange#change:content\n * @param range Range with start and end position equal to start and end position of\n * change range.\n * @param data Object with additional information about the change.\n * @param data.deletionPosition Due to the nature of this event, this property is always set to `null`. It is passed\n * for compatibility with the {@link module:engine/model/liverange~ModelLiveRange#event:change:range} event.\n */\nexport type ModelLiveRangeChangeContentEvent = {\n\tname: 'change' | 'change:content';\n\targs: [ range: ModelRange, data: { deletionPosition: null } ];\n};\n\n/**\n * Describes `change:range` or `change:content` event.\n *\n * @eventName ~ModelLiveRange#change\n */\nexport type ModelLiveRangeChangeEvent = {\n\tname: 'change' | 'change:range' | 'change:content';\n\targs: [ range: ModelRange, data: { deletionPosition: ModelPosition | null } ];\n};\n\n/**\n * Binds this `ModelLiveRange` to the given model, so the range updates itself on every operation applied to it.\n */\nfunction bindWithModel( this: ModelLiveRange, model: Model ) {\n\t// A range rooted in a document fragment is updated only by operations applied to that fragment. Those are\n\t// not document operations (the fragment is not a document), so - unlike a range rooted in a document root - the\n\t// `isDocumentOperation` check should be skipped.\n\tconst isDetached = !this.root.is( 'rootElement' );\n\n\tthis.listenTo<ModelApplyOperationEvent>(\n\t\tmodel,\n\t\t'applyOperation',\n\t\t( event, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\tif ( !isDetached && !operation.isDocumentOperation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttransform.call( this, operation );\n\t\t},\n\t\t{ priority: 'low' }\n\t);\n}\n\n/**\n * Updates this range accordingly to the updates applied to the model. Bases on change events.\n */\nfunction transform( this: ModelLiveRange, operation: Operation ) {\n\t// Transform the range by the operation. Join the result ranges if needed.\n\tconst ranges = this.getTransformedByOperation( operation );\n\n\t// Handle detach operation where the range is entirely dropped (e.g. in ModelDocumentFragment).\n\tif ( ranges.length === 0 ) {\n\t\tconst deletionPosition = ( operation as DetachOperation ).sourcePosition;\n\n\t\t( this as any ).start = deletionPosition;\n\t\t( this as any ).end = deletionPosition;\n\n\t\tthis.fire<ModelLiveRangeChangeDropEvent>( 'change:drop', this.toRange(), { deletionPosition } );\n\n\t\treturn;\n\t}\n\n\tconst result = ModelRange._createFromRanges( ranges );\n\n\tconst boundariesChanged = !result.isEqual( this );\n\tconst contentChanged = doesOperationChangeRangeContent( this, operation );\n\n\tlet deletionPosition = null;\n\n\tif ( boundariesChanged ) {\n\t\t// If range boundaries have changed, fire `change:range` event.\n\t\t//\n\t\tif ( result.root.rootName == '$graveyard' ) {\n\t\t\t// If the range was moved to the graveyard root, set `deletionPosition`.\n\t\t\tif ( operation.type == 'remove' ) {\n\t\t\t\tdeletionPosition = ( operation as MoveOperation ).sourcePosition;\n\t\t\t} else {\n\t\t\t\t// Merge operation.\n\t\t\t\tdeletionPosition = ( operation as MergeOperation ).deletionPosition;\n\t\t\t}\n\t\t}\n\n\t\tconst oldRange = this.toRange();\n\n\t\t( this as any ).start = result.start;\n\t\t( this as any ).end = result.end;\n\n\t\tthis.fire<ModelLiveRangeChangeRangeEvent>( 'change:range', oldRange, { deletionPosition } );\n\t} else if ( contentChanged ) {\n\t\t// If range boundaries have not changed, but there was change inside the range, fire `change:content` event.\n\t\tthis.fire<ModelLiveRangeChangeContentEvent>( 'change:content', this.toRange(), { deletionPosition } );\n\t}\n}\n\n/**\n * Checks whether given operation changes something inside the range (even if it does not change boundaries).\n */\nfunction doesOperationChangeRangeContent( range: ModelRange, operation: any ) {\n\tswitch ( operation.type ) {\n\t\tcase 'insert':\n\t\t\treturn range.containsPosition( operation.position );\n\t\tcase 'move':\n\t\tcase 'remove':\n\t\tcase 'reinsert':\n\t\tcase 'merge':\n\t\t\treturn range.containsPosition( operation.sourcePosition ) ||\n\t\t\t\trange.start.isEqual( operation.sourcePosition ) ||\n\t\t\t\trange.containsPosition( operation.targetPosition );\n\t\tcase 'split':\n\t\t\treturn range.containsPosition( operation.splitPosition ) || range.containsPosition( operation.insertionPosition );\n\t}\n\n\treturn false;\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/**\n * @module engine/model/text\n */\n\nimport { ModelNode, type ModelNodeAttributes } from './node.js';\n\n// @if CK_DEBUG_ENGINE // import { convertMapToStringifiedObject } from '../dev-utils/utils.js';\n\n/**\n * Model text node. Type of {@link module:engine/model/node~ModelNode node} that\n * contains {@link module:engine/model/text~ModelText#data text data}.\n *\n * **Important:** see {@link module:engine/model/node~ModelNode} to read about restrictions using `Text` and `Node` API.\n *\n * **Note:** keep in mind that `Text` instances might indirectly got removed from model tree when model is changed.\n * This happens when {@link module:engine/model/writer~ModelWriter model writer} is used to change model and the text node is merged with\n * another text node. Then, both text nodes are removed and a new text node is inserted into the model. Because of\n * this behavior, keeping references to `Text` is not recommended. Instead, consider creating\n * {@link module:engine/model/liveposition~ModelLivePosition live position} placed before the text node.\n */\nexport class ModelText extends ModelNode {\n\t/**\n\t * Text data contained in this text node.\n\t *\n\t * @internal\n\t */\n\tpublic _data: string;\n\n\t/**\n\t * Creates a text node.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~ModelWriter#createText} method instead.\n\t *\n\t * @internal\n\t * @param data Node's text.\n\t * @param attrs Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */\n\tconstructor( data?: string, attrs?: ModelNodeAttributes ) {\n\t\tsuper( attrs );\n\t\tthis._data = data || '';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override get offsetSize(): number {\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * Returns a text data contained in the node.\n\t */\n\tpublic get data(): string {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * Converts `Text` instance to plain object and returns it.\n\t *\n\t * @returns`Text` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.data = this.data;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a copy of this text node and returns it. Created text node has same text data and attributes as original text node.\n\t *\n\t * @internal\n\t * @returns `Text` instance created using given plain object.\n\t */\n\tpublic override _clone(): ModelText {\n\t\treturn new ModelText( this.data, this.getAttributes() );\n\t}\n\n\t/**\n\t * Creates a `Text` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param json Plain object to be converted to `Text`.\n\t * @returns `Text` instance created using given plain object.\n\t */\n\tpublic static fromJSON( json: any ): ModelText {\n\t\treturn new ModelText( json.data, json.attributes );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `#${ this.data }`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logExtended(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( `ModelText: ${ this }, attrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelText: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelText.prototype.is = function( type: string ): boolean {\n\treturn type === '$text' || type === 'model:$text' ||\n\t\t// This are legacy values kept for backward compatibility.\n\t\ttype === 'text' || type === 'model:text' ||\n\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\ttype === 'node' || type === 'model:node';\n} as any;\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/**\n * @module engine/model/documentselection\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\nimport { ModelLiveRange } from './liverange.js';\nimport {\n\tModelSelection,\n\ttype ModelSelectionChangeAttributeEvent,\n\ttype ModelSelectionChangeRangeEvent\n} from './selection.js';\nimport { ModelText } from './text.js';\n\nimport type { ModelDocumentChangeEvent, ModelDocument } from './document.js';\nimport type { Model, ModelApplyOperationEvent } from './model.js';\nimport type { Marker, MarkerCollectionUpdateEvent } from './markercollection.js';\nimport { type Batch } from './batch.js';\nimport { type ModelElement } from './element.js';\nimport { type ModelItem } from './item.js';\nimport { type ModelNode } from './node.js';\nimport type { ModelPosition, ModelPositionOffset } from './position.js';\nimport { type ModelRange } from './range.js';\nimport { type ModelSchema } from './schema.js';\n\nimport {\n\tCKEditorError,\n\tCollection,\n\tEmitterMixin,\n\ttoMap,\n\tuid,\n\ttype EmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nconst storePrefix = 'selection:';\n\nconst ModelDocumentSelectionBase: EmitterMixinConstructor<typeof ModelTypeCheckable> = /* #__PURE__ */ EmitterMixin( ModelTypeCheckable );\n\n/**\n * `ModelDocumentSelection` is a special selection which is used as the\n * {@link module:engine/model/document~ModelDocument#selection document's selection}.\n * There can be only one instance of `ModelDocumentSelection` per document.\n *\n * Document selection can only be changed by using the {@link module:engine/model/writer~ModelWriter} instance\n * inside the {@link module:engine/model/model~Model#change `change()`} block, as it provides a secure way to modify model.\n *\n * `ModelDocumentSelection` is automatically updated upon changes in the {@link module:engine/model/document~ModelDocument document}\n * to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n *\n * Differences between {@link module:engine/model/selection~ModelSelection} and `ModelDocumentSelection` are:\n * * there is always a range in `ModelDocumentSelection` - even if no ranges were added there is a \"default range\"\n * present in the selection,\n * * ranges added to this selection updates automatically when the document changes,\n * * attributes of `ModelDocumentSelection` are updated automatically according to selection ranges.\n *\n * Since `ModelDocumentSelection` uses {@link module:engine/model/liverange~ModelLiveRange live ranges}\n * and is updated when {@link module:engine/model/document~ModelDocument document}\n * changes, it cannot be set on {@link module:engine/model/node~ModelNode nodes}\n * that are inside {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n * If you need to represent a selection in document fragment,\n * use {@link module:engine/model/selection~ModelSelection Selection class} instead.\n */\nexport class ModelDocumentSelection extends ModelDocumentSelectionBase {\n\t/**\n\t * Selection used internally by that class (`ModelDocumentSelection` is a proxy to that selection).\n\t */\n\tprivate _selection: LiveSelection;\n\n\t/**\n\t * Creates an empty live selection for given {@link module:engine/model/document~ModelDocument}.\n\t *\n\t * @param doc Document which owns this selection.\n\t */\n\tconstructor( doc: ModelDocument ) {\n\t\tsuper();\n\n\t\tthis._selection = new LiveSelection( doc );\n\n\t\tthis._selection.delegate( 'change:range' ).to( this );\n\t\tthis._selection.delegate( 'change:attribute' ).to( this );\n\t\tthis._selection.delegate( 'change:marker' ).to( this );\n\t}\n\n\t/**\n\t * Describes whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t */\n\tpublic get isCollapsed(): boolean {\n\t\treturn this._selection.isCollapsed;\n\t}\n\n\t/**\n\t * Selection anchor. Anchor may be described as a position where the most recent part of the selection starts.\n\t * Together with {@link #focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always {@link module:engine/model/range~ModelRange#start start} or\n\t * {@link module:engine/model/range~ModelRange#end end} position of the most recently added range.\n\t *\n\t * Is set to `null` if there are no ranges in selection.\n\t *\n\t * @see #focus\n\t */\n\tpublic get anchor(): ModelPosition | null {\n\t\treturn this._selection.anchor;\n\t}\n\n\t/**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * Is set to `null` if there are no ranges in selection.\n\t *\n\t * @see #anchor\n\t */\n\tpublic get focus(): ModelPosition | null {\n\t\treturn this._selection.focus;\n\t}\n\n\t/**\n\t * Number of ranges in selection.\n\t */\n\tpublic get rangeCount(): number {\n\t\treturn this._selection.rangeCount;\n\t}\n\n\t/**\n\t * Describes whether `Documentselection` has own range(s) set, or if it is defaulted to\n\t * {@link module:engine/model/document~ModelDocument#_getDefaultRange document's default range}.\n\t */\n\tpublic get hasOwnRange(): boolean {\n\t\treturn this._selection.hasOwnRange;\n\t}\n\n\t/**\n\t * Specifies whether the {@link #focus}\n\t * precedes {@link #anchor}.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tpublic get isBackward(): boolean {\n\t\treturn this._selection.isBackward;\n\t}\n\n\t/**\n\t * Describes whether the gravity is overridden (using {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}) or not.\n\t *\n\t * Note that the gravity remains overridden as long as will not be restored the same number of times as it was overridden.\n\t */\n\tpublic get isGravityOverridden(): boolean {\n\t\treturn this._selection.isGravityOverridden;\n\t}\n\n\t/**\n\t * A collection of selection {@link module:engine/model/markercollection~Marker markers}.\n\t * Marker is a selection marker when selection range is inside the marker range.\n\t *\n\t * **Note**: Only markers from {@link ~ModelDocumentSelection#observeMarkers observed markers groups} are collected.\n\t */\n\tpublic get markers(): Collection<Marker> {\n\t\treturn this._selection.markers;\n\t}\n\n\t/**\n\t * Used for the compatibility with the {@link module:engine/model/selection~ModelSelection#isEqual} method.\n\t *\n\t * @internal\n\t */\n\tpublic get _ranges(): Array<ModelRange> {\n\t\treturn this._selection._ranges;\n\t}\n\n\t/**\n\t * Returns an iterable that iterates over copies of selection ranges.\n\t */\n\tpublic getRanges(): IterableIterator<ModelRange> {\n\t\treturn this._selection.getRanges();\n\t}\n\n\t/**\n\t * Returns the first position in the selection.\n\t * First position is the position that {@link module:engine/model/position~ModelPosition#isBefore is before}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getFirstPosition(): ModelPosition | null {\n\t\treturn this._selection.getFirstPosition();\n\t}\n\n\t/**\n\t * Returns the last position in the selection.\n\t * Last position is the position that {@link module:engine/model/position~ModelPosition#isAfter is after}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getLastPosition(): ModelPosition | null {\n\t\treturn this._selection.getLastPosition();\n\t}\n\n\t/**\n\t * Returns a copy of the first range in the selection.\n\t * First range is the one which {@link module:engine/model/range~ModelRange#start start} position\n\t * {@link module:engine/model/position~ModelPosition#isBefore is before} start position of all other ranges\n\t * (not to confuse with the first range added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getFirstRange(): ModelRange | null {\n\t\treturn this._selection.getFirstRange();\n\t}\n\n\t/**\n\t * Returns a copy of the last range in the selection.\n\t * Last range is the one which {@link module:engine/model/range~ModelRange#end end} position\n\t * {@link module:engine/model/position~ModelPosition#isAfter is after} end position of all\n\t * other ranges (not to confuse with the range most recently added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */\n\tpublic getLastRange(): ModelRange | null {\n\t\treturn this._selection.getLastRange();\n\t}\n\n\t/**\n\t * Gets elements of type {@link module:engine/model/schema~ModelSchema#isBlock \"block\"} touched by the selection.\n\t *\n\t * This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t *\n\t * **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t * but will not return blocks nested in other blocks.\n\t *\n\t * In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t *\n\t * ```\n\t * <paragraph>[a</paragraph>\n\t * <blockQuote>\n\t * \t<paragraph>b</paragraph>\n\t * </blockQuote>\n\t * <paragraph>c]d</paragraph>\n\t * ```\n\t *\n\t * In this case the paragraph will also be returned, despite the collapsed selection:\n\t *\n\t * ```\n\t * <paragraph>[]a</paragraph>\n\t * ```\n\t *\n\t * In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t *\n\t * ```\n\t * [<blockA></blockA>\n\t * <blockB>\n\t * \t<blockC></blockC>\n\t * \t<blockD></blockD>\n\t * </blockB>\n\t * <blockE></blockE>]\n\t * ```\n\t *\n\t * If the selection is inside a block all the inner blocks (A & B) are returned:\n\t *\n\t * ```\n\t * <block>\n\t * \t<blockA>[a</blockA>\n\t * \t<blockB>b]</blockB>\n\t * </block>\n\t * ```\n\t *\n\t * **Special case**: If a selection ends at the beginning of a block, that block is not returned as from user perspective\n\t * this block wasn't selected. See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n\t *\n\t * ```\n\t * <paragraph>[a</paragraph>\n\t * <paragraph>b</paragraph>\n\t * <paragraph>]c</paragraph> // this block will not be returned\n\t * ```\n\t */\n\tpublic getSelectedBlocks(): IterableIterator<ModelElement> {\n\t\treturn this._selection.getSelectedBlocks();\n\t}\n\n\t/**\n\t * Returns the selected element. {@link module:engine/model/element~ModelElement Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */\n\tpublic getSelectedElement(): ModelElement | null {\n\t\treturn this._selection.getSelectedElement();\n\t}\n\n\t/**\n\t * Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t * at a position {@link module:engine/model/position~ModelPosition#isTouching touching} the element's start and ends at position\n\t * touching the element's end.\n\t *\n\t * By default, this method will check whether the entire content of the selection's current root is selected.\n\t * Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t */\n\tpublic containsEntireContent( element: ModelElement ): boolean {\n\t\treturn this._selection.containsEntireContent( element );\n\t}\n\n\t/**\n\t * Unbinds all events previously bound by document selection.\n\t */\n\tpublic destroy(): void {\n\t\tthis._selection.destroy();\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attribute keys.\n\t */\n\tpublic getAttributeKeys(): IterableIterator<string> {\n\t\treturn this._selection.getAttributeKeys();\n\t}\n\n\t/**\n\t * Returns iterable that iterates over this selection's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */\n\tpublic getAttributes(): IterableIterator<[ string, unknown ]> {\n\t\treturn this._selection.getAttributes();\n\t}\n\n\t/**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */\n\tpublic getAttribute( key: string ): unknown {\n\t\treturn this._selection.getAttribute( key );\n\t}\n\n\t/**\n\t * Checks if the selection has an attribute for given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on selection, `false` otherwise.\n\t */\n\tpublic hasAttribute( key: string ): boolean {\n\t\treturn this._selection.hasAttribute( key );\n\t}\n\n\t/**\n\t * Refreshes selection attributes and markers according to the current position in the model.\n\t */\n\tpublic refresh(): void {\n\t\tthis._selection.updateMarkers();\n\t\tthis._selection._updateAttributes( false );\n\t}\n\n\t/**\n\t * Registers a marker group prefix or a marker name to be collected in the\n\t * {@link ~ModelDocumentSelection#markers selection markers collection}.\n\t *\n\t * See also {@link module:engine/model/markercollection~MarkerCollection#getMarkersGroup `MarkerCollection#getMarkersGroup()`}.\n\t *\n\t * @param prefixOrName The marker group prefix or marker name.\n\t */\n\tpublic observeMarkers( prefixOrName: string ): void {\n\t\tthis._selection.observeMarkers( prefixOrName );\n\t}\n\n\t/**\n\t * Converts `DocumentSelection` to plain object and returns it.\n\t *\n\t * @returns `DocumentSelection` converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn this._selection.toJSON();\n\t}\n\n\t/**\n\t * Moves {@link module:engine/model/documentselection~ModelDocumentSelection#focus} to the specified location.\n\t * Should be used only within the {@link module:engine/model/writer~ModelWriter#setSelectionFocus} method.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/model/writer~ModelWriter#createPositionAt writer.createPositionAt()} parameters.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#setSelectionFocus\n\t * @internal\n\t * @param offset Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic _setFocus( itemOrPosition: ModelItem | ModelPosition, offset?: ModelPositionOffset ): void {\n\t\tthis._selection.setFocus( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/model/selection~ModelSelectable selectable}.\n\t * Should be used only within the {@link module:engine/model/writer~ModelWriter#setSelection} method.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#setSelection\n\t * @internal\n\t */\n\tpublic _setTo( ...args: Parameters<ModelSelection[ 'setTo' ]> ): void {\n\t\tthis._selection.setTo( ...args );\n\t}\n\n\t/**\n\t * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t * Should be used only within the {@link module:engine/model/writer~ModelWriter#setSelectionAttribute} method.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#setSelectionAttribute\n\t * @internal\n\t * @param key Key of the attribute to set.\n\t * @param value Attribute value.\n\t */\n\tpublic _setAttribute( key: string, value: unknown ): void {\n\t\tthis._selection.setAttribute( key, value );\n\t}\n\n\t/**\n\t * Removes an attribute with given key from the selection.\n\t * If the given attribute was set on the selection, fires the {@link module:engine/model/selection~ModelSelection#event:change:range}\n\t * event with removed attribute key.\n\t * Should be used only within the {@link module:engine/model/writer~ModelWriter#removeSelectionAttribute} method.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#removeSelectionAttribute\n\t * @internal\n\t * @param key Key of the attribute to remove.\n\t */\n\tpublic _removeAttribute( key: string ): void {\n\t\tthis._selection.removeAttribute( key );\n\t}\n\n\t/**\n\t * Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t *\n\t * @internal\n\t */\n\tpublic _getStoredAttributes(): Iterable<[ string, unknown ]> {\n\t\treturn this._selection.getStoredAttributes();\n\t}\n\n\t/**\n\t * Temporarily changes the gravity of the selection from the left to the right.\n\t *\n\t * The gravity defines from which direction the selection inherits its attributes. If it's the default left\n\t * gravity, the selection (after being moved by the the user) inherits attributes from its left hand side.\n\t * This method allows to temporarily override this behavior by forcing the gravity to the right.\n\t *\n\t * It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry\n\t * of the process.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#overrideSelectionGravity\n\t * @internal\n\t * @returns The unique id which allows restoring the gravity.\n\t */\n\tpublic _overrideGravity(): string {\n\t\treturn this._selection.overrideGravity();\n\t}\n\n\t/**\n\t * Restores the {@link ~ModelDocumentSelection#_overrideGravity overridden gravity}.\n\t *\n\t * Restoring the gravity is only possible using the unique identifier returned by\n\t * {@link ~ModelDocumentSelection#_overrideGravity}. Note that the gravity remains overridden as long as won't be restored\n\t * the same number of times it was overridden.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#restoreSelectionGravity\n\t * @internal\n\t * @param uid The unique id returned by {@link #_overrideGravity}.\n\t */\n\tpublic _restoreGravity( uid: string ): void {\n\t\tthis._selection.restoreGravity( uid );\n\t}\n\n\t/**\n\t * Generates and returns an attribute key for selection attributes store, basing on original attribute key.\n\t *\n\t * @internal\n\t * @param key Attribute key to convert.\n\t * @returns Converted attribute key, applicable for selection store.\n\t */\n\tpublic static _getStoreAttributeKey( key: string ): string {\n\t\treturn storePrefix + key;\n\t}\n\n\t/**\n\t * Checks whether the given attribute key is an attribute stored on an element.\n\t *\n\t * @internal\n\t */\n\tpublic static _isStoreAttributeKey( key: string ): boolean {\n\t\treturn key.startsWith( storePrefix );\n\t}\n\n\t/**\n\t * Drop selection attribute key prefix.\n\t *\n\t * @internal\n\t */\n\tpublic static _dropStoreAttributeKeyPrefix( key: string ): string {\n\t\tif ( key.startsWith( storePrefix ) ) {\n\t\t\treturn key.substring( storePrefix.length );\n\t\t}\n\n\t\treturn key;\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelDocumentSelection.prototype.is = function( type: string ): boolean {\n\treturn type === 'selection' ||\n\t\ttype == 'model:selection' ||\n\t\ttype == 'documentSelection' ||\n\t\ttype == 'model:documentSelection';\n} as any;\n\n/**\n * Fired when selection range(s) changed.\n *\n * @eventName ~ModelDocumentSelection#change:range\n * @param directChange In case of {@link module:engine/model/selection~ModelSelection} class it is always set\n * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n * The {@link module:engine/model/documentselection~ModelDocumentSelection}, however, may change because its position\n * was directly changed through the {@link module:engine/model/writer~ModelWriter writer} or because its position was\n * changed because the structure of the model has been changed (which means an indirect change).\n * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n * which mean that they are not updated once the document changes.\n */\nexport type ModelDocumentSelectionChangeRangeEvent = ModelSelectionChangeRangeEvent;\n\n/**\n * Fired when selection attribute changed.\n *\n * @eventName ~ModelDocumentSelection#change:attribute\n * @param directChange In case of {@link module:engine/model/selection~ModelSelection} class it is always set\n * to `true` which indicates that the selection change was caused by a direct use of selection's API.\n * The {@link module:engine/model/documentselection~ModelDocumentSelection}, however, may change because its attributes\n * were directly changed through the {@link module:engine/model/writer~ModelWriter writer} or because its position was\n * changed in the model and its attributes were refreshed (which means an indirect change).\n * The indirect change does not occur in case of normal (detached) selections because they are \"static\" (as \"not live\")\n * which mean that they are not updated once the document changes.\n * @param attributeKeys Array containing keys of attributes that changed.\n*/\nexport type ModelDocumentSelectionChangeAttributeEvent = ModelSelectionChangeAttributeEvent;\n\n/**\n * Fired when selection marker(s) changed.\n *\n * @eventName ~ModelDocumentSelection#change:marker\n * @param directChange This is always set to `false` in case of `change:marker` event as there is no possibility\n * to change markers directly through {@link module:engine/model/documentselection~ModelDocumentSelection} API.\n * See also {@link module:engine/model/documentselection~ModelDocumentSelection#event:change:range} and\n * {@link module:engine/model/documentselection~ModelDocumentSelection#event:change:attribute}.\n * @param oldMarkers Markers in which the selection was before the change.\n */\nexport type ModelDocumentSelectionChangeMarkerEvent = {\n\tname: 'change:marker';\n\targs: [ {\n\t\tdirectChange: boolean;\n\t\toldMarkers: Array<Marker>;\n\t} ];\n};\n\n/**\n * Fired when selection range(s), attribute(s) or marker(s) changed.\n *\n * @eventName ~ModelDocumentSelection#change\n * @param directChange This is always set to `false` in case of `change:marker` event as there is no possibility\n * to change markers directly through {@link module:engine/model/documentselection~ModelDocumentSelection} API.\n * See also {@link module:engine/model/documentselection~ModelDocumentSelection#event:change:range} and\n * {@link module:engine/model/documentselection~ModelDocumentSelection#event:change:attribute}.\n * @param attributeKeys Array containing keys of attributes that changed.\n * @param oldMarkers Markers in which the selection was before the change.\n */\nexport type ModelDocumentSelectionChangeEvent = {\n\tname: 'change' | 'change:attribute' | 'change:marker' | 'change:range';\n\targs: [ {\n\t\tdirectChange: boolean;\n\t\tattributeKeys?: Array<string>;\n\t\toldMarkers?: Array<Marker>;\n\t} ];\n};\n\n/**\n * `LiveSelection` is used internally by {@link module:engine/model/documentselection~ModelDocumentSelection}\n * and shouldn't be used directly.\n *\n * `LiveSelection` is automatically updated upon changes in the {@link module:engine/model/document~ModelDocument document}\n * to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n *\n * Differences between {@link module:engine/model/selection~ModelSelection} and `LiveSelection` are:\n * * there is always a range in `LiveSelection` - even if no ranges were added there is a \"default range\"\n * present in the selection,\n * * ranges added to this selection updates automatically when the document changes,\n * * attributes of `LiveSelection` are updated automatically according to selection ranges.\n */\nclass LiveSelection extends ModelSelection {\n\t/**\n\t * List of selection markers.\n\t * Marker is a selection marker when selection range is inside the marker range.\n\t */\n\tpublic markers: Collection<Marker> = new Collection( { idProperty: 'name' } );\n\n\t/**\n\t * Document which owns this selection.\n\t */\n\tprivate _model: Model;\n\n\t/**\n\t * Document which owns this selection.\n\t */\n\tprivate _document: ModelDocument;\n\n\t/**\n\t * Stores selection ranges.\n\t *\n\t * @internal\n\t */\n\tpublic declare _ranges: Array<ModelLiveRange>;\n\n\t/**\n\t * Keeps mapping of attribute name to priority with which the attribute got modified (added/changed/removed)\n\t * last time. Possible values of priority are: `'low'` and `'normal'`.\n\t *\n\t * Priorities are used by internal `LiveSelection` mechanisms. All attributes set using `LiveSelection`\n\t * attributes API are set with `'normal'` priority.\n\t */\n\tprivate _attributePriority: Map<string, 'low' | 'normal'> = new Map();\n\n\t/**\n\t * Position to which the selection should be set if the last selection range was moved to the graveyard.\n\t */\n\tprivate _selectionRestorePosition: ModelPosition | null = null;\n\n\t/**\n\t * Flag that informs whether the selection ranges have changed. It is changed on true when `LiveRange#change:range` event is fired.\n\t */\n\tprivate _hasChangedRange: boolean = false;\n\n\t/**\n\t * Each overriding gravity adds an UID to the set and each removal removes it.\n\t * Gravity is overridden when there's at least one UID in the set.\n\t * Gravity is restored when the set is empty.\n\t * This is to prevent conflicts when gravity is overridden by more than one feature at the same time.\n\t */\n\tprivate _overriddenGravityRegister: Set<string> = new Set();\n\n\t/**\n\t * Prefixes of marker names that should affect `LiveSelection#markers` collection.\n\t */\n\tprivate _observedMarkers: Set<string> = new Set();\n\n\t/**\n\t * Creates an empty live selection for given {@link module:engine/model/document~ModelDocument}.\n\t *\n\t * @param doc Document which owns this selection.\n\t */\n\tconstructor( doc: ModelDocument ) {\n\t\tsuper();\n\n\t\tthis._model = doc.model;\n\t\tthis._document = doc;\n\n\t\t// Ensure selection is correct after each operation.\n\t\tthis.listenTo<ModelApplyOperationEvent>( this._model, 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\tif ( !operation.isDocumentOperation || operation.type == 'marker' || operation.type == 'rename' || operation.type == 'noop' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Fix selection if the last range was removed from it and we have a position to which we can restore the selection.\n\t\t\tif ( this._ranges.length == 0 && this._selectionRestorePosition ) {\n\t\t\t\tthis._fixGraveyardSelection( this._selectionRestorePosition );\n\t\t\t}\n\n\t\t\t// \"Forget\" the restore position even if it was not \"used\".\n\t\t\tthis._selectionRestorePosition = null;\n\n\t\t\tif ( this._hasChangedRange ) {\n\t\t\t\tthis._hasChangedRange = false;\n\t\t\t\tthis.fire<ModelDocumentSelectionChangeRangeEvent>( 'change:range', { directChange: false } );\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Ensure selection is correct and up to date after each range change.\n\t\tthis.on<ModelDocumentSelectionChangeRangeEvent>( 'change:range', () => {\n\t\t\tthis._validateSelectionRanges( this.getRanges() );\n\t\t} );\n\n\t\t// Update markers data stored by the selection after each marker change.\n\t\t// This handles only marker changes done through marker operations (not model tree changes).\n\t\tthis.listenTo<MarkerCollectionUpdateEvent>( this._model.markers, 'update', ( evt, marker, oldRange, newRange ) => {\n\t\t\tthis._updateMarker( marker, newRange );\n\t\t} );\n\n\t\t// Ensure selection is up to date after each change block.\n\t\tthis.listenTo<ModelDocumentChangeEvent>( this._document, 'change', ( evt, batch ) => {\n\t\t\tclearAttributesStoredInElement( this._model, batch );\n\t\t} );\n\t}\n\n\tpublic override get isCollapsed(): boolean {\n\t\tconst length = this._ranges.length;\n\n\t\treturn length === 0 ? this._document._getDefaultRange().isCollapsed : super.isCollapsed;\n\t}\n\n\tpublic override get anchor(): ModelPosition {\n\t\treturn super.anchor || this._document._getDefaultRange().start;\n\t}\n\n\tpublic override get focus(): ModelPosition {\n\t\treturn super.focus || this._document._getDefaultRange().end;\n\t}\n\n\tpublic override get rangeCount(): number {\n\t\treturn this._ranges.length ? this._ranges.length : 1;\n\t}\n\n\t/**\n\t * Describes whether `LiveSelection` has own range(s) set, or if it is defaulted to\n\t * {@link module:engine/model/document~ModelDocument#_getDefaultRange document's default range}.\n\t */\n\tpublic get hasOwnRange(): boolean {\n\t\treturn this._ranges.length > 0;\n\t}\n\n\t/**\n\t * When set to `true` then selection attributes on node before the caret won't be taken\n\t * into consideration while updating selection attributes.\n\t */\n\tpublic get isGravityOverridden(): boolean {\n\t\treturn !!this._overriddenGravityRegister.size;\n\t}\n\n\t/**\n\t * Unbinds all events previously bound by live selection.\n\t */\n\tpublic destroy(): void {\n\t\tfor ( let i = 0; i < this._ranges.length; i++ ) {\n\t\t\tthis._ranges[ i ].detach();\n\t\t}\n\n\t\tthis.stopListening();\n\t}\n\n\tpublic override* getRanges(): IterableIterator<ModelRange> {\n\t\tif ( this._ranges.length ) {\n\t\t\tyield* super.getRanges();\n\t\t} else {\n\t\t\tyield this._document._getDefaultRange();\n\t\t}\n\t}\n\n\tpublic override getFirstRange(): ModelRange {\n\t\treturn super.getFirstRange() || this._document._getDefaultRange();\n\t}\n\n\tpublic override getLastRange(): ModelRange {\n\t\treturn super.getLastRange() || this._document._getDefaultRange();\n\t}\n\n\tpublic override setTo( ...args: Parameters<ModelSelection[ 'setTo' ]> ) {\n\t\tsuper.setTo( ...args );\n\t\tthis._updateAttributes( true );\n\t\tthis.updateMarkers();\n\t}\n\n\tpublic override setFocus( itemOrPosition: ModelItem | ModelPosition, offset?: ModelPositionOffset ): void {\n\t\tsuper.setFocus( itemOrPosition, offset );\n\t\tthis._updateAttributes( true );\n\t\tthis.updateMarkers();\n\t}\n\n\tpublic override setAttribute( key: string, value: unknown ): void {\n\t\tif ( this._setAttribute( key, value ) ) {\n\t\t\t// Fire event with exact data.\n\t\t\tconst attributeKeys = [ key ];\n\t\t\tthis.fire<ModelDocumentSelectionChangeAttributeEvent>( 'change:attribute', { attributeKeys, directChange: true } );\n\t\t}\n\t}\n\n\tpublic override removeAttribute( key: string ): void {\n\t\tif ( this._removeAttribute( key ) ) {\n\t\t\t// Fire event with exact data.\n\t\t\tconst attributeKeys = [ key ];\n\t\t\tthis.fire<ModelDocumentSelectionChangeAttributeEvent>( 'change:attribute', { attributeKeys, directChange: true } );\n\t\t}\n\t}\n\n\tpublic overrideGravity(): string {\n\t\tconst overrideUid = uid();\n\n\t\t// Remember that another overriding has been requested. It will need to be removed\n\t\t// before the gravity is to be restored.\n\t\tthis._overriddenGravityRegister.add( overrideUid );\n\n\t\tif ( this._overriddenGravityRegister.size === 1 ) {\n\t\t\tthis._updateAttributes( true );\n\t\t}\n\n\t\treturn overrideUid;\n\t}\n\n\tpublic restoreGravity( uid: string ): void {\n\t\tif ( !this._overriddenGravityRegister.has( uid ) ) {\n\t\t\t/**\n\t\t\t * Restoring gravity for an unknown UID is not possible. Make sure you are using a correct\n\t\t\t * UID obtained from the {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity} to restore.\n\t\t\t *\n\t\t\t * @error document-selection-gravity-wrong-restore\n\t\t\t * @param {string} uid The unique identifier returned by\n\t\t\t * {@link module:engine/model/documentselection~ModelDocumentSelection#_overrideGravity}.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'document-selection-gravity-wrong-restore',\n\t\t\t\tthis,\n\t\t\t\t{ uid }\n\t\t\t);\n\t\t}\n\n\t\tthis._overriddenGravityRegister.delete( uid );\n\n\t\t// Restore gravity only when all overriding have been restored.\n\t\tif ( !this.isGravityOverridden ) {\n\t\t\tthis._updateAttributes( true );\n\t\t}\n\t}\n\n\tpublic observeMarkers( prefixOrName: string ): void {\n\t\tthis._observedMarkers.add( prefixOrName );\n\t\tthis.updateMarkers();\n\t}\n\n\tprotected override _replaceAllRanges( ranges: Array<ModelRange> ): void {\n\t\tthis._validateSelectionRanges( ranges );\n\n\t\tsuper._replaceAllRanges( ranges );\n\t}\n\n\tprotected override _popRange(): void {\n\t\tthis._ranges.pop()!.detach();\n\t}\n\n\tprotected override _pushRange( range: ModelRange ): void {\n\t\tconst liveRange = this._prepareRange( range );\n\n\t\t// `undefined` is returned when given `range` is in graveyard root.\n\t\tif ( liveRange ) {\n\t\t\tthis._ranges.push( liveRange );\n\t\t}\n\t}\n\n\t/**\n\t * Converts `LiveSelection` to plain object and returns it.\n\t *\n\t * @returns `LiveSelection` converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tif ( this.markers.length ) {\n\t\t\tjson.markers = this.markers.map( marker => marker.toJSON() );\n\t\t}\n\n\t\treturn json;\n\t}\n\n\tprivate _validateSelectionRanges( ranges: Iterable<ModelRange> ) {\n\t\tfor ( const range of ranges ) {\n\t\t\tif ( !this._document._validateSelectionRange( range ) ) {\n\t\t\t\t/**\n\t\t\t\t * Range from {@link module:engine/model/documentselection~ModelDocumentSelection document selection}\n\t\t\t\t * starts or ends at incorrect position.\n\t\t\t\t *\n\t\t\t\t * @error document-selection-wrong-position\n\t\t\t\t * @param {module:engine/model/range~ModelRange} range The invalid range.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'document-selection-wrong-position',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ range }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Prepares given range to be added to selection. Checks if it is correct,\n\t * converts it to {@link module:engine/model/liverange~ModelLiveRange ModelLiveRange}\n\t * and sets listeners listening to the range's change event.\n\t */\n\tprivate _prepareRange( range: ModelRange ): ModelLiveRange | undefined {\n\t\tthis._checkRange( range );\n\n\t\tif ( range.root == this._document.graveyard ) {\n\t\t\t// @if CK_DEBUG // console.warn( 'Trying to add a Range that is in the graveyard root. Range rejected.' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst liveRange = ModelLiveRange.fromRange( range );\n\n\t\t// If selection range is moved to the graveyard remove it from the selection object.\n\t\t// Also, save some data that can be used to restore selection later, on `Model#applyOperation` event.\n\t\tliveRange.on( 'change:range', ( evt, oldRange, data ) => {\n\t\t\tthis._hasChangedRange = true;\n\n\t\t\tif ( liveRange.root == this._document.graveyard ) {\n\t\t\t\tthis._selectionRestorePosition = data.deletionPosition;\n\n\t\t\t\tconst index = this._ranges.indexOf( liveRange );\n\t\t\t\tthis._ranges.splice( index, 1 );\n\t\t\t\tliveRange.detach();\n\t\t\t}\n\t\t} );\n\n\t\treturn liveRange;\n\t}\n\n\tpublic updateMarkers(): void {\n\t\tif ( !this._observedMarkers.size ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst markers = [];\n\t\tlet changed = false;\n\n\t\tfor ( const marker of this._model.markers ) {\n\t\t\tconst markerGroup = marker.name.split( ':', 1 )[ 0 ];\n\n\t\t\tif ( !this._observedMarkers.has( markerGroup ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst markerRange = marker.getRange();\n\n\t\t\tfor ( const selectionRange of this.getRanges() ) {\n\t\t\t\tif ( markerRange.containsRange( selectionRange, !selectionRange.isCollapsed ) ) {\n\t\t\t\t\tmarkers.push( marker );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst oldMarkers = Array.from( this.markers );\n\n\t\tfor ( const marker of markers ) {\n\t\t\tif ( !this.markers.has( marker ) ) {\n\t\t\t\tthis.markers.add( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\tfor ( const marker of Array.from( this.markers ) ) {\n\t\t\tif ( !markers.includes( marker ) ) {\n\t\t\t\tthis.markers.remove( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( changed ) {\n\t\t\tthis.fire<ModelDocumentSelectionChangeMarkerEvent>( 'change:marker', { oldMarkers, directChange: false } );\n\t\t}\n\t}\n\n\tprivate _updateMarker( marker: Marker, markerRange: ModelRange | null ): void {\n\t\tconst markerGroup = marker.name.split( ':', 1 )[ 0 ];\n\n\t\tif ( !this._observedMarkers.has( markerGroup ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet changed = false;\n\n\t\tconst oldMarkers = Array.from( this.markers );\n\t\tconst hasMarker = this.markers.has( marker );\n\n\t\tif ( !markerRange ) {\n\t\t\tif ( hasMarker ) {\n\t\t\t\tthis.markers.remove( marker );\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t} else {\n\t\t\tlet contained = false;\n\n\t\t\tfor ( const selectionRange of this.getRanges() ) {\n\t\t\t\tif ( markerRange.containsRange( selectionRange, !selectionRange.isCollapsed ) ) {\n\t\t\t\t\tcontained = true;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( contained && !hasMarker ) {\n\t\t\t\tthis.markers.add( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t} else if ( !contained && hasMarker ) {\n\t\t\t\tthis.markers.remove( marker );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( changed ) {\n\t\t\tthis.fire<ModelDocumentSelectionChangeMarkerEvent>( 'change:marker', { oldMarkers, directChange: false } );\n\t\t}\n\t}\n\n\t/**\n\t * Updates this selection attributes according to its ranges and the {@link module:engine/model/document~ModelDocument model document}.\n\t */\n\tpublic _updateAttributes( clearAll: boolean ): void {\n\t\tconst newAttributes = toMap( this._getSurroundingAttributes() );\n\t\tconst oldAttributes = toMap( this.getAttributes() );\n\n\t\tif ( clearAll ) {\n\t\t\t// If `clearAll` remove all attributes and reset priorities.\n\t\t\tthis._attributePriority = new Map();\n\t\t\tthis._attrs = new Map();\n\t\t} else {\n\t\t\t// If not, remove only attributes added with `low` priority.\n\t\t\tfor ( const [ key, priority ] of this._attributePriority ) {\n\t\t\t\tif ( priority == 'low' ) {\n\t\t\t\t\tthis._attrs.delete( key );\n\t\t\t\t\tthis._attributePriority.delete( key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._setAttributesTo( newAttributes );\n\n\t\t// Let's evaluate which attributes really changed.\n\t\tconst changed = [];\n\n\t\t// First, loop through all attributes that are set on selection right now.\n\t\t// Check which of them are different than old attributes.\n\t\tfor ( const [ newKey, newValue ] of this.getAttributes() ) {\n\t\t\tif ( !oldAttributes.has( newKey ) || oldAttributes.get( newKey ) !== newValue ) {\n\t\t\t\tchanged.push( newKey );\n\t\t\t}\n\t\t}\n\n\t\t// Then, check which of old attributes got removed.\n\t\tfor ( const [ oldKey ] of oldAttributes ) {\n\t\t\tif ( !this.hasAttribute( oldKey ) ) {\n\t\t\t\tchanged.push( oldKey );\n\t\t\t}\n\t\t}\n\n\t\t// Fire event with exact data (fire only if anything changed).\n\t\tif ( changed.length > 0 ) {\n\t\t\tthis.fire<ModelDocumentSelectionChangeAttributeEvent>( 'change:attribute', { attributeKeys: changed, directChange: false } );\n\t\t}\n\t}\n\n\t/**\n\t * Internal method for setting `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t * parameter).\n\t */\n\tprivate _setAttribute( key: string, value: unknown, directChange: boolean = true ): boolean {\n\t\tconst priority = directChange ? 'normal' : 'low';\n\n\t\tif ( priority == 'low' && this._attributePriority.get( key ) == 'normal' ) {\n\t\t\t// Priority too low.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst oldValue = super.getAttribute( key );\n\n\t\t// Don't do anything if value has not changed.\n\t\tif ( oldValue === value ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._attrs.set( key, value );\n\n\t\t// Update priorities map.\n\t\tthis._attributePriority.set( key, priority );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Internal method for removing `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t * parameter).\n\t *\n\t * NOTE: Even if attribute is not present in the selection but is provided to this method, it's priority will\n\t * be changed according to `directChange` parameter.\n\t */\n\tprivate _removeAttribute( key: string, directChange: boolean = true ): boolean {\n\t\tconst priority = directChange ? 'normal' : 'low';\n\n\t\tif ( priority == 'low' && this._attributePriority.get( key ) == 'normal' ) {\n\t\t\t// Priority too low.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Update priorities map.\n\t\tthis._attributePriority.set( key, priority );\n\n\t\t// Don't do anything if value has not changed.\n\t\tif ( !super.hasAttribute( key ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._attrs.delete( key );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Internal method for setting multiple `LiveSelection` attributes. Supports attribute priorities (through\n\t * `directChange` parameter).\n\t */\n\tprivate _setAttributesTo( attrs: Map<string, unknown> ): Set<string> {\n\t\tconst changed = new Set<string>();\n\n\t\tfor ( const [ oldKey, oldValue ] of this.getAttributes() ) {\n\t\t\t// Do not remove attribute if attribute with same key and value is about to be set.\n\t\t\tif ( attrs.get( oldKey ) === oldValue ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// All rest attributes will be removed so changed attributes won't change .\n\t\t\tthis._removeAttribute( oldKey, false );\n\t\t}\n\n\t\tfor ( const [ key, value ] of attrs ) {\n\t\t\t// Attribute may not be set because of attributes or because same key/value is already added.\n\t\t\tconst gotAdded = this._setAttribute( key, value, false );\n\n\t\t\tif ( gotAdded ) {\n\t\t\t\tchanged.add( key );\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t}\n\n\t/**\n\t * Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t */\n\tpublic* getStoredAttributes(): IterableIterator<[ string, unknown ]> {\n\t\tconst selectionParent = this.getFirstPosition()!.parent as ModelElement;\n\n\t\tif ( this.isCollapsed && selectionParent.isEmpty ) {\n\t\t\tfor ( const key of selectionParent.getAttributeKeys() ) {\n\t\t\t\tif ( key.startsWith( storePrefix ) ) {\n\t\t\t\t\tconst realKey = key.substr( storePrefix.length );\n\n\t\t\t\t\tyield [ realKey, selectionParent.getAttribute( key ) ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks model text nodes that are closest to the selection's first position and returns attributes of first\n\t * found element. If there are no text nodes in selection's first position parent, it returns selection\n\t * attributes stored in that parent.\n\t */\n\tprivate _getSurroundingAttributes(): Iterable<[ string, unknown ]> | null {\n\t\tconst position = this.getFirstPosition()!;\n\t\tconst schema = this._model.schema;\n\n\t\tif ( position.root.rootName == '$graveyard' ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet attrs: Iterable<[string, unknown]> | null = null;\n\n\t\tif ( !this.isCollapsed ) {\n\t\t\t// 1. If selection is a range...\n\t\t\tconst range = this.getFirstRange();\n\n\t\t\t// ...look for a first character node in that range and take attributes from it.\n\t\t\tfor ( const value of range ) {\n\t\t\t\t// If the item is an object, we don't want to get attributes from its children...\n\t\t\t\tif ( value.item.is( 'element' ) && schema.isObject( value.item ) ) {\n\t\t\t\t\t// ...but collect attributes from inline object.\n\t\t\t\t\tattrs = getTextAttributes( value.item, schema );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( value.type == 'text' ) {\n\t\t\t\t\tattrs = value.item.getAttributes();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// 2. If the selection is a caret or the range does not contain a character node...\n\n\t\t\tconst nodeBefore = position.textNode ? position.textNode : position.nodeBefore;\n\t\t\tconst nodeAfter = position.textNode ? position.textNode : position.nodeAfter;\n\n\t\t\t// When gravity is overridden then don't take node before into consideration.\n\t\t\tif ( !this.isGravityOverridden ) {\n\t\t\t\t// ...look at the node before caret and take attributes from it if it is a character node.\n\t\t\t\tattrs = getTextAttributes( nodeBefore, schema );\n\t\t\t}\n\n\t\t\t// 3. If not, look at the node after caret...\n\t\t\tif ( !attrs ) {\n\t\t\t\tattrs = getTextAttributes( nodeAfter, schema );\n\t\t\t}\n\n\t\t\t// 4. If not, try to find the first character on the left, that is in the same node.\n\t\t\t// When gravity is overridden then don't take node before into consideration.\n\t\t\tif ( !this.isGravityOverridden && !attrs ) {\n\t\t\t\tattrs = getTextAttributes( nodeBefore, schema, 'backward' );\n\t\t\t}\n\n\t\t\t// 5. If not found, try to find the first character on the right, that is in the same node.\n\t\t\tif ( !attrs ) {\n\t\t\t\tattrs = getTextAttributes( nodeAfter, schema, 'forward' );\n\t\t\t}\n\n\t\t\t// 6. If not found, selection should retrieve attributes from parent.\n\t\t\tif ( !attrs ) {\n\t\t\t\tattrs = this.getStoredAttributes();\n\t\t\t}\n\t\t}\n\n\t\treturn attrs;\n\t}\n\n\t/**\n\t * Fixes the selection after all its ranges got removed.\n\t * @param deletionPosition Position where the deletion happened.\n\t */\n\tprivate _fixGraveyardSelection( deletionPosition: ModelPosition ): void {\n\t\t// Find a range that is a correct selection range and is closest to the position where the deletion happened.\n\t\tconst selectionRange = this._model.schema.getNearestSelectionRange( deletionPosition );\n\n\t\t// If nearest valid selection range has been found - add it in the place of old range.\n\t\tif ( selectionRange ) {\n\t\t\t// Check the range, convert it to live range, bind events, etc.\n\t\t\tthis._pushRange( selectionRange );\n\t\t}\n\t\t// If nearest valid selection range cannot be found don't add any range. Selection will be set to the default range.\n\t}\n}\n\n/**\n * Helper function for {@link module:engine/model/liveselection~LiveSelection#_updateAttributes}.\n *\n * It checks if the passed model node is a text node and, if so, returns its attributes.\n * If not, it checks if item is an inline element and does the same. Otherwise, it returns `null`.\n */\nfunction getTextAttributes(\n\tstartNode: ModelNode | null,\n\tschema: ModelSchema,\n\tscan: 'self' | 'backward' | 'forward' = 'self'\n): Iterable<[string, unknown]> | null {\n\tif ( !startNode ) {\n\t\treturn null;\n\t}\n\n\tfor ( const node of siblingNodes( startNode, scan ) ) {\n\t\tif ( !node ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( node instanceof ModelText ) {\n\t\t\treturn node.getAttributes();\n\t\t}\n\n\t\tif ( !schema.isInline( node ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst isObject = schema.isObject( node );\n\t\tconst attributes: Array<[string, unknown]> = [];\n\n\t\t// Collect all attributes that can be applied to the text node.\n\t\tfor ( const [ key, value ] of node.getAttributes() ) {\n\t\t\tif (\n\t\t\t\tschema.checkAttribute( '$text', key ) &&\n\t\t\t\t( !isObject || schema.getAttributeProperties( key ).copyFromObject !== false )\n\t\t\t) {\n\t\t\t\tattributes.push( [ key, value ] );\n\t\t\t}\n\t\t}\n\n\t\treturn attributes;\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns sibling nodes from the given start node.\n */\nfunction* siblingNodes( startNode: ModelNode, scan: 'self' | 'backward' | 'forward' ) {\n\tif ( scan == 'self' ) {\n\t\tyield startNode;\n\t}\n\telse {\n\t\tlet node: ModelNode | null = startNode;\n\n\t\twhile ( node ) {\n\t\t\tnode = scan == 'backward' ?\n\t\t\t\tnode.previousSibling :\n\t\t\t\tnode.nextSibling;\n\n\t\t\tyield node;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * Removes selection attributes from element which is not empty anymore.\n */\nfunction clearAttributesStoredInElement( model: Model, batch: Batch ) {\n\tconst differ = model.document.differ;\n\n\tfor ( const entry of differ.getChanges() ) {\n\t\tif ( entry.type != 'insert' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst changeParent = entry.position.parent as ModelElement;\n\t\tconst isNoLongerEmpty = entry.length === changeParent.maxOffset;\n\n\t\tif ( isNoLongerEmpty ) {\n\t\t\tmodel.enqueueChange( batch, writer => {\n\t\t\t\tconst storedAttributes = Array.from( changeParent.getAttributeKeys() )\n\t\t\t\t\t.filter( key => key.startsWith( storePrefix ) );\n\n\t\t\t\tfor ( const key of storedAttributes ) {\n\t\t\t\t\twriter.removeAttribute( key, changeParent );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module engine/model/nodelist\n */\n\nimport { ModelNode } from './node.js';\n\nimport { CKEditorError, spliceArray } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Provides an interface to operate on a list of {@link module:engine/model/node~ModelNode nodes}. `NodeList` is used internally\n * in classes like {@link module:engine/model/element~ModelElement Element}\n * or {@link module:engine/model/documentfragment~ModelDocumentFragment ModelDocumentFragment}.\n */\nexport class ModelNodeList implements Iterable<ModelNode> {\n\t/**\n\t * Nodes contained in this node list.\n\t */\n\tprivate _nodes: Array<ModelNode> = [];\n\n\t/**\n\t * This array maps numbers (offsets) to node that is placed at that offset.\n\t *\n\t * This array is similar to `_nodes` with the difference that one node may occupy multiple consecutive items in the array.\n\t *\n\t * This array is needed to quickly retrieve a node that is placed at given offset.\n\t */\n\tprivate _offsetToNode: Array<ModelNode> = [];\n\n\t/**\n\t * Creates a node list.\n\t *\n\t * @internal\n\t * @param nodes Nodes contained in this node list.\n\t */\n\tconstructor( nodes?: Iterable<ModelNode> ) {\n\t\tif ( nodes ) {\n\t\t\tthis._insertNodes( 0, nodes );\n\t\t}\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all nodes contained inside this node list.\n\t */\n\tpublic [ Symbol.iterator ](): IterableIterator<ModelNode> {\n\t\treturn this._nodes[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Number of nodes contained inside this node list.\n\t */\n\tpublic get length(): number {\n\t\treturn this._nodes.length;\n\t}\n\n\t/**\n\t * Sum of {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all nodes contained inside this node list.\n\t */\n\tpublic get maxOffset(): number {\n\t\treturn this._offsetToNode.length;\n\t}\n\n\t/**\n\t * Gets the node at the given index. Returns `null` if incorrect index was passed.\n\t */\n\tpublic getNode( index: number ): ModelNode | null {\n\t\treturn this._nodes[ index ] || null;\n\t}\n\n\t/**\n\t * Gets the node at the given offset. Returns `null` if incorrect offset was passed.\n\t */\n\tpublic getNodeAtOffset( offset: number ): ModelNode | null {\n\t\treturn this._offsetToNode[ offset ] || null;\n\t}\n\n\t/**\n\t * Returns an index of the given node or `null` if given node does not have a parent.\n\t *\n\t * This is an alias to {@link module:engine/model/node~ModelNode#index}.\n\t */\n\tpublic getNodeIndex( node: ModelNode ): number | null {\n\t\treturn node.index;\n\t}\n\n\t/**\n\t * Returns the offset at which given node is placed in its parent or `null` if given node does not have a parent.\n\t *\n\t * This is an alias to {@link module:engine/model/node~ModelNode#startOffset}.\n\t */\n\tpublic getNodeStartOffset( node: ModelNode ): number | null {\n\t\treturn node.startOffset;\n\t}\n\n\t/**\n\t * Converts index to offset in node list.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `model-nodelist-index-out-of-bounds` if given index is less\n\t * than `0` or more than {@link #length}.\n\t */\n\tpublic indexToOffset( index: number ): number {\n\t\tif ( index == this._nodes.length ) {\n\t\t\treturn this.maxOffset;\n\t\t}\n\n\t\tconst node = this._nodes[ index ];\n\n\t\tif ( !node ) {\n\t\t\t/**\n\t\t\t * Given index cannot be found in the node list.\n\t\t\t *\n\t\t\t * @error model-nodelist-index-out-of-bounds\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-nodelist-index-out-of-bounds', this );\n\t\t}\n\n\t\treturn this.getNodeStartOffset( node )!;\n\t}\n\n\t/**\n\t * Converts offset in node list to index.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `model-nodelist-offset-out-of-bounds` if given offset is less\n\t * than `0` or more than {@link #maxOffset}.\n\t */\n\tpublic offsetToIndex( offset: number ): number {\n\t\tif ( offset == this._offsetToNode.length ) {\n\t\t\treturn this._nodes.length;\n\t\t}\n\n\t\tconst node = this._offsetToNode[ offset ];\n\n\t\tif ( !node ) {\n\t\t\t/**\n\t\t\t * Given offset cannot be found in the node list.\n\t\t\t *\n\t\t\t * @error model-nodelist-offset-out-of-bounds\n\t\t\t * @param {number} offset The offset value.\n\t\t\t * @param {module:engine/model/nodelist~ModelNodeList} nodeList Stringified node list.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-nodelist-offset-out-of-bounds',\n\t\t\t\tthis,\n\t\t\t\t{\n\t\t\t\t\toffset,\n\t\t\t\t\tnodeList: this\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\treturn this.getNodeIndex( node )!;\n\t}\n\n\t/**\n\t * Inserts given nodes at given index.\n\t *\n\t * @internal\n\t * @param index Index at which nodes should be inserted.\n\t * @param nodes Nodes to be inserted.\n\t */\n\tpublic _insertNodes( index: number, nodes: Iterable<ModelNode> ): void {\n\t\tconst nodesArray: Array<ModelNode> = [];\n\n\t\t// Validation.\n\t\tfor ( const node of nodes ) {\n\t\t\tif ( !( node instanceof ModelNode ) ) {\n\t\t\t\t/**\n\t\t\t\t * Trying to insert an object which is not a Node instance.\n\t\t\t\t *\n\t\t\t\t * @error model-nodelist-insertnodes-not-node\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'model-nodelist-insertnodes-not-node', this );\n\t\t\t}\n\n\t\t\tnodesArray.push( node );\n\t\t}\n\n\t\tlet offset = this.indexToOffset( index );\n\n\t\t// Splice nodes array and offsets array into the nodelist.\n\t\tspliceArray( this._nodes, nodesArray, index );\n\t\tspliceArray( this._offsetToNode, makeOffsetsArray( nodesArray ), offset );\n\n\t\t// Refresh indexes and offsets for nodes inside this node list. We need to do this for all inserted nodes and all nodes after them.\n\t\tfor ( let i = index; i < this._nodes.length; i++ ) {\n\t\t\tthis._nodes[ i ]._index = i;\n\t\t\tthis._nodes[ i ]._startOffset = offset;\n\n\t\t\toffset += this._nodes[ i ].offsetSize;\n\t\t}\n\t}\n\n\t/**\n\t * Removes one or more nodes starting at the given index.\n\t *\n\t * @internal\n\t * @param indexStart Index of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns Array containing removed nodes.\n\t */\n\tpublic _removeNodes( indexStart: number, howMany: number = 1 ): Array<ModelNode> {\n\t\tif ( howMany == 0 ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Remove nodes from this nodelist.\n\t\tlet offset = this.indexToOffset( indexStart );\n\t\tconst nodes = this._nodes.splice( indexStart, howMany );\n\t\tconst lastNode = nodes[ nodes.length - 1 ];\n\t\tconst removedOffsetSum = lastNode.startOffset! + lastNode.offsetSize - offset;\n\t\tthis._offsetToNode.splice( offset, removedOffsetSum );\n\n\t\t// Reset index and start offset properties for the removed nodes -- they do not have a parent anymore.\n\t\tfor ( const node of nodes ) {\n\t\t\tnode._index = null;\n\t\t\tnode._startOffset = null;\n\t\t}\n\n\t\tfor ( let i = indexStart; i < this._nodes.length; i++ ) {\n\t\t\tthis._nodes[ i ]._index = i;\n\t\t\tthis._nodes[ i ]._startOffset = offset;\n\n\t\t\toffset += this._nodes[ i ].offsetSize;\n\t\t}\n\n\t\treturn nodes;\n\t}\n\n\t/**\n\t * Removes children nodes provided as an array. These nodes do not need to be direct siblings.\n\t *\n\t * This method is faster than removing nodes one by one, as it recalculates offsets only once.\n\t *\n\t * @internal\n\t * @param nodes Array of nodes.\n\t */\n\tpublic _removeNodesArray( nodes: Array<ModelNode> ): void {\n\t\tif ( nodes.length == 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const node of nodes ) {\n\t\t\tnode._index = null;\n\t\t\tnode._startOffset = null;\n\t\t}\n\n\t\tthis._nodes = this._nodes.filter( node => node.index !== null );\n\t\tthis._offsetToNode = this._offsetToNode.filter( node => node.index !== null );\n\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0; i < this._nodes.length; i++ ) {\n\t\t\tthis._nodes[ i ]._index = i;\n\t\t\tthis._nodes[ i ]._startOffset = offset;\n\n\t\t\toffset += this._nodes[ i ].offsetSize;\n\t\t}\n\t}\n\n\t/**\n\t * Converts `NodeList` instance to an array containing nodes that were inserted in the node list. Nodes\n\t * are also converted to their plain object representation.\n\t *\n\t * @returns `NodeList` instance converted to `Array`.\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn this._nodes.map( node => node.toJSON() );\n\t}\n}\n\n/**\n * Creates an array of nodes in the format as in {@link module:engine/model/nodelist~ModelNodeList#_offsetToNode}, i.e. one node will\n * occupy multiple items if its offset size is greater than one.\n */\nfunction makeOffsetsArray( nodes: Array<ModelNode> ): Array<ModelNode> {\n\tconst offsets = [];\n\tlet index = 0;\n\n\tfor ( const node of nodes ) {\n\t\tfor ( let i = 0; i < node.offsetSize; i++ ) {\n\t\t\toffsets[ index++ ] = node;\n\t\t}\n\t}\n\n\treturn offsets;\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/**\n * @module engine/model/element\n */\n\nimport { ModelNode, type ModelNodeAttributes } from './node.js';\nimport { ModelNodeList } from './nodelist.js';\nimport { ModelText } from './text.js';\nimport { ModelTextProxy } from './textproxy.js';\n\nimport { type ModelItem } from './item.js';\n\nimport { isIterable } from '@ckeditor/ckeditor5-utils';\n\n// @if CK_DEBUG_ENGINE // import { convertMapToStringifiedObject, convertMapToTags } from '../dev-utils/utils.js';\n\n/**\n * Model element. Type of {@link module:engine/model/node~ModelNode node} that has a\n * {@link module:engine/model/element~ModelElement#name name} and {@link module:engine/model/element~ModelElement#getChildren child nodes}.\n *\n * **Important**: see {@link module:engine/model/node~ModelNode} to read about restrictions using `Element` and `Node` API.\n */\nexport class ModelElement extends ModelNode {\n\t/**\n\t * Element name.\n\t */\n\tpublic readonly name: string;\n\n\t/**\n\t * List of children nodes.\n\t */\n\tprivate readonly _children: ModelNodeList = new ModelNodeList();\n\n\t/**\n\t * Creates a model element.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~ModelWriter#createElement} method instead.\n\t *\n\t * @internal\n\t * @param name Element's name.\n\t * @param attrs Element's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t * @param children One or more nodes to be inserted as children of created element.\n\t */\n\tconstructor(\n\t\tname: string,\n\t\tattrs?: ModelNodeAttributes,\n\t\tchildren?: string | ModelItem | Iterable<string | ModelItem>\n\t) {\n\t\tsuper( attrs );\n\n\t\tthis.name = name;\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Number of this element's children.\n\t */\n\tpublic get childCount(): number {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Sum of {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all of this element's children.\n\t */\n\tpublic get maxOffset(): number {\n\t\treturn this._children.maxOffset;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t */\n\tpublic get isEmpty(): boolean {\n\t\treturn this.childCount === 0;\n\t}\n\n\t/**\n\t * Gets the child at the given index. Returns `null` if incorrect index was passed.\n\t *\n\t * @param index Index in this element.\n\t * @returns Child node.\n\t */\n\tpublic getChild( index: number ): ModelNode | null {\n\t\treturn this._children.getNode( index );\n\t}\n\n\t/**\n\t * Gets the child at the given offset. Returns `null` if incorrect index was passed.\n\t *\n\t * @param offset Offset in this element.\n\t * @returns Child node.\n\t */\n\tpublic getChildAtOffset( offset: number ): ModelNode | null {\n\t\treturn this._children.getNodeAtOffset( offset );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all of this element's children.\n\t */\n\tpublic getChildren(): IterableIterator<ModelNode> {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an index of the given child node. Returns `null` if given node is not a child of this element.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's index in this element.\n\t */\n\tpublic getChildIndex( node: ModelNode ): number | null {\n\t\treturn this._children.getNodeIndex( node );\n\t}\n\n\t/**\n\t * Returns the starting offset of given child. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t * given node is not a child of this element.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's starting offset.\n\t */\n\tpublic getChildStartOffset( node: ModelNode ): number | null {\n\t\treturn this._children.getNodeStartOffset( node );\n\t}\n\n\t/**\n\t * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t * too high, returns {@link module:engine/model/element~ModelElement#getChildIndex index after last child}.\n\t *\n\t * ```ts\n\t * const textNode = new Text( 'foo' );\n\t * const pElement = new Element( 'p' );\n\t * const divElement = new Element( [ textNode, pElement ] );\n\t * divElement.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t * divElement.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t * divElement.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t * divElement.offsetToIndex( 2 ); // Returns 0.\n\t * divElement.offsetToIndex( 3 ); // Returns 1.\n\t * divElement.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t * ```\n\t */\n\tpublic offsetToIndex( offset: number ): number {\n\t\treturn this._children.offsetToIndex( offset );\n\t}\n\n\t/**\n\t * Returns a descendant node by its path relative to this element.\n\t *\n\t * ```ts\n\t * // <this>a<b>c</b></this>\n\t * this.getNodeByPath( [ 0 ] );     // -> \"a\"\n\t * this.getNodeByPath( [ 1 ] );     // -> <b>\n\t * this.getNodeByPath( [ 1, 0 ] );  // -> \"c\"\n\t * ```\n\t *\n\t * @param relativePath Path of the node to find, relative to this element.\n\t */\n\tpublic getNodeByPath( relativePath: Array<number> ): ModelNode {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n\t\tlet node: ModelNode = this;\n\n\t\tfor ( const offset of relativePath ) {\n\t\t\tnode = ( node as ModelElement ).getChildAtOffset( offset )!;\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Returns the parent element of the given name. Returns null if the element is not inside the desired parent.\n\t *\n\t * @param parentName The name of the parent element to find.\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this node will be also included while searching.\n\t */\n\tpublic findAncestor( parentName: string, options: { includeSelf?: boolean } = {} ): ModelElement | null {\n\t\tlet parent = options.includeSelf ? this : this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tif ( parent.name === parentName ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Converts `Element` instance to plain object and returns it. Takes care of converting all of this element's children.\n\t *\n\t * @returns `Element` instance converted to plain object.\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.name = this.name;\n\n\t\tif ( this._children.length > 0 ) {\n\t\t\tjson.children = [];\n\n\t\t\tfor ( const node of this._children ) {\n\t\t\t\tjson.children.push( node.toJSON() );\n\t\t\t}\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a copy of this element and returns it. Created element has the same name and attributes as the original element.\n\t * If clone is deep, the original element's children are also cloned. If not, then empty element is returned.\n\t *\n\t * @internal\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any child.\n\t */\n\tpublic override _clone( deep = false ): ModelElement {\n\t\tconst children = deep ? cloneNodes( this._children ) : undefined;\n\n\t\treturn new ModelElement( this.name, this.getAttributes(), children );\n\t}\n\n\t/**\n\t * {@link module:engine/model/element~ModelElement#_insertChild Inserts} one or more nodes at the end of this element.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#append\n\t * @internal\n\t * @param nodes Nodes to be inserted.\n\t */\n\tpublic _appendChild( nodes: string | ModelItem | Iterable<string | ModelItem> ): void {\n\t\tthis._insertChild( this.childCount, nodes );\n\t}\n\n\t/**\n\t * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~ModelNode#parent parent} of these nodes\n\t * to this element.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#insert\n\t * @internal\n\t * @param index Index at which nodes should be inserted.\n\t * @param items Items to be inserted.\n\t */\n\tpublic _insertChild( index: number, items: string | ModelItem | Iterable<string | ModelItem> ): void {\n\t\tconst nodes = normalize( items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\t( node as any ).parent = this;\n\t\t}\n\n\t\tthis._children._insertNodes( index, nodes );\n\t}\n\n\t/**\n\t * Removes one or more nodes starting at the given index and sets\n\t * {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t *\n\t * @see module:engine/model/writer~ModelWriter#remove\n\t * @internal\n\t * @param index Index of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns Array containing removed nodes.\n\t */\n\tpublic _removeChildren( index: number, howMany: number = 1 ): Array<ModelNode> {\n\t\tconst nodes = this._children._removeNodes( index, howMany );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t( node as any ).parent = null;\n\t\t}\n\n\t\treturn nodes;\n\t}\n\n\t/**\n\t * Removes children nodes provided as an array and sets\n\t * the {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t *\n\t * These nodes do not need to be direct siblings.\n\t *\n\t * This method is faster than removing nodes one by one, as it recalculates offsets only once.\n\t *\n\t * @internal\n\t * @param nodes Array of nodes.\n\t */\n\tpublic _removeChildrenArray( nodes: Array<ModelNode> ): void {\n\t\tthis._children._removeNodesArray( nodes );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t( node as any ).parent = null;\n\t\t}\n\t}\n\n\t/**\n\t * Creates an `Element` instance from given plain object (i.e. parsed JSON string).\n\t * Converts `Element` children to proper nodes.\n\t *\n\t * @param json Plain object to be converted to `Element`.\n\t * @returns `Element` instance created using given plain object.\n\t */\n\tpublic static fromJSON( json: any ): ModelElement {\n\t\tlet children: Array<ModelNode> | undefined;\n\n\t\tif ( json.children ) {\n\t\t\tchildren = [];\n\n\t\t\tfor ( const child of json.children ) {\n\t\t\t\tif ( child.name ) {\n\t\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\t\tchildren.push( ModelElement.fromJSON( child ) );\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\t\tchildren.push( ModelText.fromJSON( child ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ModelElement( json.name, json.attributes, children );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `<${ this.rootName || this.name }>`;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelElement: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logExtended(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( `ModelElement: ${ this }, ${ this.childCount } children,\n\t// @if CK_DEBUG_ENGINE // \tattrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logAll(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( '--------------------' );\n\n\t// @if CK_DEBUG_ENGINE // \tthis.logExtended();\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'List of children:' );\n\n\t// @if CK_DEBUG_ENGINE // \tfor ( const child of this.getChildren() as any ) {\n\t// @if CK_DEBUG_ENGINE // \t\tchild.log();\n\t// @if CK_DEBUG_ENGINE // \t}\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public printTree( level = 0 ): string {\n\t// @if CK_DEBUG_ENGINE // \tlet string = '';\n\n\t// @if CK_DEBUG_ENGINE // \tstring += '\\t'.repeat( level );\n\t// @if CK_DEBUG_ENGINE // \tstring += `<${ this.rootName || this.name }${ convertMapToTags( this.getAttributes() ) }>`;\n\n\t// @if CK_DEBUG_ENGINE // \tfor ( const child of this.getChildren() as any ) {\n\t// @if CK_DEBUG_ENGINE // \t\tstring += '\\n';\n\n\t// @if CK_DEBUG_ENGINE // \t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\tconst textAttrs = convertMapToTags( child._attrs );\n\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += '\\t'.repeat( level + 1 );\n\n\t// @if CK_DEBUG_ENGINE // \t\t\tif ( textAttrs !== '' ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\t\tstring += `<$text${ textAttrs }>` + child.data + '</$text>';\n\t// @if CK_DEBUG_ENGINE // \t\t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\t\tstring += child.data;\n\t// @if CK_DEBUG_ENGINE // \t\t\t}\n\t// @if CK_DEBUG_ENGINE // \t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += child.printTree( level + 1 );\n\t// @if CK_DEBUG_ENGINE // \t\t}\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tif ( this.childCount ) {\n\t// @if CK_DEBUG_ENGINE // \t\tstring += '\\n' + '\\t'.repeat( level );\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tstring += `</${ this.rootName || this.name }>`;\n\n\t// @if CK_DEBUG_ENGINE // \treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logTree(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelElement.prototype.is = function( this: ModelElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'element' || type === 'model:element' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'node' || type === 'model:node';\n\t}\n\n\treturn name === this.name && ( type === 'element' || type === 'model:element' );\n} as any;\n\n/**\n * Converts strings to Text and non-iterables to arrays.\n */\nfunction normalize( nodes: string | ModelItem | Iterable<string | ModelItem> ): Array<ModelNode> {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new ModelText( nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\tconst normalizedNodes: Array<ModelNode> = [];\n\n\tfor ( const node of nodes ) {\n\t\tif ( typeof node == 'string' ) {\n\t\t\tnormalizedNodes.push( new ModelText( node ) );\n\t\t} else if ( node instanceof ModelTextProxy ) {\n\t\t\tnormalizedNodes.push( new ModelText( node.data, node.getAttributes() ) );\n\t\t} else {\n\t\t\tnormalizedNodes.push( node );\n\t\t}\n\t}\n\n\treturn normalizedNodes;\n}\n\nfunction cloneNodes( nodes: ModelNodeList ): Array<ModelNode> {\n\tconst clonedNodes: Array<ModelNode> = [];\n\n\tfor ( const node of nodes ) {\n\t\tclonedNodes.push( node._clone( true ) );\n\t}\n\n\treturn clonedNodes;\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/**\n * @module engine/conversion/conversionhelpers\n */\n\n/**\n * Base class for conversion helpers.\n */\nexport class ConversionHelpers<TDispatcher> {\n\tprivate readonly _dispatchers: Array<TDispatcher>;\n\n\t/**\n\t * Creates a conversion helpers instance.\n\t */\n\tconstructor( dispatchers: Array<TDispatcher> ) {\n\t\tthis._dispatchers = dispatchers;\n\t}\n\n\t/**\n\t * Registers a conversion helper.\n\t *\n\t * **Note**: See full usage example in the `{@link module:engine/conversion/conversion~Conversion#for conversion.for()}`\n\t * method description.\n\t *\n\t * @param conversionHelper The function to be called on event.\n\t */\n\tpublic add( conversionHelper: ( dispatcher: TDispatcher ) => void ): this {\n\t\tfor ( const dispatcher of this._dispatchers ) {\n\t\t\tconversionHelper( dispatcher );\n\t\t}\n\n\t\treturn this;\n\t}\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/**\n * Contains downcast (model-to-view) converters for {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}.\n *\n * @module engine/conversion/downcasthelpers\n */\n\nimport { ModelRange } from '../model/range.js';\nimport { ModelSelection } from '../model/selection.js';\nimport { ModelDocumentSelection } from '../model/documentselection.js';\nimport { ModelElement } from '../model/element.js';\nimport { ModelPosition } from '../model/position.js';\n\nimport { ViewAttributeElement } from '../view/attributeelement.js';\nimport { ConversionHelpers } from './conversionhelpers.js';\n\nimport type {\n\tDowncastDispatcher,\n\tDowncastConversionApi,\n\tDowncastInsertEvent,\n\tDowncastAddMarkerEvent,\n\tDowncastAttributeEvent,\n\tDowncastReduceChangesEvent,\n\tDowncastRemoveMarkerEvent\n} from './downcastdispatcher.js';\nimport { type ModelConsumable } from './modelconsumable.js';\nimport type { DifferItem, DifferItemReinsert } from '../model/differ.js';\nimport { type ModelNode } from '../model/node.js';\nimport { type ModelItem } from '../model/item.js';\nimport { type ModelTextProxy } from '../model/textproxy.js';\nimport { type ModelText } from '../model/text.js';\n\nimport { type ViewDowncastWriter } from '../view/downcastwriter.js';\nimport { type ViewElementDefinition } from '../view/elementdefinition.js';\nimport { type ViewDocumentFragment } from '../view/documentfragment.js';\nimport { type ViewUIElement } from '../view/uielement.js';\nimport { type ViewElement } from '../view/element.js';\nimport { type ViewNode } from '../view/node.js';\nimport { type ViewPosition } from '../view/position.js';\nimport { type ViewRange } from '../view/range.js';\nimport { StylesMap } from '../view/stylesmap.js';\nimport type {\n\tMapper,\n\tMapperModelToViewPositionEvent\n} from './mapper.js';\n\nimport {\n\tCKEditorError,\n\ttoArray,\n\ttype ArrayOrItem,\n\ttype EventInfo,\n\ttype PriorityString\n} from '@ckeditor/ckeditor5-utils';\n\nimport { cloneDeep } from 'es-toolkit/compat';\n\n/**\n * Downcast conversion helper functions.\n *\n * Learn more about {@glink framework/deep-dive/conversion/downcast downcast helpers}.\n *\n * @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n */\nexport class DowncastHelpers extends ConversionHelpers<DowncastDispatcher> {\n\t/**\n\t * Model element to view element conversion helper.\n\t *\n\t * This conversion results in creating a view element. For example, model `<paragraph>Foo</paragraph>` becomes `<p>Foo</p>` in the view.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'paragraph',\n\t * \tview: 'p'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'paragraph',\n\t * \tview: 'div',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'fancyParagraph',\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'fancy'\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'heading',\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * The element-to-element conversion supports the reconversion mechanism. It can be enabled by using either the `attributes` or\n\t * the `children` props on a model description. You will find a couple examples below.\n\t *\n\t * In order to reconvert an element if any of its direct children have been added or removed, use the `children` property on a `model`\n\t * description. For example, this model:\n\t *\n\t * ```xml\n\t * <box>\n\t * \t<paragraph>Some text.</paragraph>\n\t * </box>\n\t * ```\n\t *\n\t * will be converted into this structure in the view:\n\t *\n\t * ```html\n\t * <div class=\"box\" data-type=\"single\">\n\t * \t<p>Some text.</p>\n\t * </div>\n\t * ```\n\t *\n\t * But if more items were inserted in the model:\n\t *\n\t * ```xml\n\t * <box>\n\t * \t<paragraph>Some text.</paragraph>\n\t * \t<paragraph>Other item.</paragraph>\n\t * </box>\n\t * ```\n\t *\n\t * it will be converted into this structure in the view (note the element `data-type` change):\n\t *\n\t * ```html\n\t * <div class=\"box\" data-type=\"multiple\">\n\t * \t<p>Some text.</p>\n\t * \t<p>Other item.</p>\n\t * </div>\n\t * ```\n\t *\n\t * Such a converter would look like this (note that the `paragraph` elements are converted separately):\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: {\n\t * \t\tname: 'box',\n\t * \t\tchildren: true\n\t * \t},\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createContainerElement( 'div', {\n\t * \t\t\tclass: 'box',\n\t * \t\t\t'data-type': modelElement.childCount == 1 ? 'single' : 'multiple'\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * In order to reconvert element if any of its attributes have been updated, use the `attributes` property on a `model`\n\t * description. For example, this model:\n\t *\n\t * ```xml\n\t * <heading level=\"2\">Some text.</heading>\n\t * ```\n\t *\n\t * will be converted into this structure in the view:\n\t *\n\t * ```html\n\t * <h2>Some text.</h2>\n\t * ```\n\t *\n\t * But if the `heading` element's `level` attribute has been updated to `3` for example, then\n\t * it will be converted into this structure in the view:\n\t *\n\t * ```html\n\t * <h3>Some text.</h3>\n\t * ```\n\t *\n\t * Such a converter would look as follows:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: {\n\t * \t\tname: 'heading',\n\t * \t\tattributes: 'level'\n\t * \t},\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * You can read more about the element-to-element conversion in the\n\t * {@glink framework/deep-dive/conversion/downcast downcast conversion} guide.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The description or a name of the model element to convert.\n\t * @param config.view A view element definition or a function that takes the model element and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as parameters and returns a view container element.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic elementToElement( config: {\n\t\tmodel: string | {\n\t\t\tname: string;\n\t\t\tattributes?: string | Array<string>;\n\t\t\tchildren?: boolean;\n\t\t};\n\t\tview: ViewElementDefinition | DowncastElementCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( downcastElementToElement( config ) );\n\t}\n\n\t/**\n\t * The model element to view structure (several elements) conversion helper.\n\t *\n\t * This conversion results in creating a view structure with one or more slots defined for the child nodes.\n\t * For example, a model `<table>` may become this structure in the view:\n\t *\n\t * ```html\n\t * <figure class=\"table\">\n\t * \t<table>\n\t * \t\t<tbody>${ slot for table rows }</tbody>\n\t * \t</table>\n\t * </figure>\n\t * ```\n\t *\n\t * The children of the model's `<table>` element will be inserted into the `<tbody>` element.\n\t * If the `elementToElement()` helper was used, the children would be inserted into the `<figure>`.\n\t *\n\t * Imagine a table feature where for this model structure:\n\t *\n\t * ```xml\n\t * <table headingRows=\"1\">\n\t * \t<tableRow> ... table cells 1 ... </tableRow>\n\t * \t<tableRow> ... table cells 2 ... </tableRow>\n\t * \t<tableRow> ... table cells 3 ... </tableRow>\n\t * \t<caption>Caption text</caption>\n\t * </table>\n\t * ```\n\t *\n\t * we want to generate this view structure:\n\t *\n\t * ```html\n\t * <figure class=\"table\">\n\t * \t<table>\n\t * \t\t<thead>\n\t * \t\t\t<tr> ... table cells 1 ... </tr>\n\t * \t\t</thead>\n\t * \t\t<tbody>\n\t * \t\t\t<tr> ... table cells 2 ... </tr>\n\t * \t\t\t<tr> ... table cells 3 ... </tr>\n\t * \t\t</tbody>\n\t * \t</table>\n\t * \t<figcaption>Caption text</figcaption>\n\t * </figure>\n\t * ```\n\t *\n\t * The converter has to take the `headingRows` attribute into consideration when allocating the `<tableRow>` elements\n\t * into the `<tbody>` and `<thead>` elements. Hence, we need two slots and need to define proper filter callbacks for them.\n\t *\n\t * Additionally, all elements other than `<tableRow>` should be placed outside the `<table>` tag.\n\t * In the example above, this will handle the table caption.\n\t *\n\t * Such a converter would look like this:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToStructure( {\n\t * \tmodel: {\n\t * \t\tname: 'table',\n\t * \t\tattributes: [ 'headingRows' ]\n\t * \t},\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\tconst figureElement = writer.createContainerElement( 'figure', { class: 'table' } );\n\t * \t\tconst tableElement = writer.createContainerElement( 'table' );\n\t *\n\t * \t\twriter.insert( writer.createPositionAt( figureElement, 0 ), tableElement );\n\t *\n\t * \t\tconst headingRows = modelElement.getAttribute( 'headingRows' ) || 0;\n\t *\n\t * \t\tif ( headingRows > 0 ) {\n\t * \t\t\tconst tableHead = writer.createContainerElement( 'thead' );\n\t *\n\t * \t\t\tconst headSlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index < headingRows );\n\t *\n\t * \t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableHead );\n\t * \t\t\twriter.insert( writer.createPositionAt( tableHead, 0 ), headSlot );\n\t * \t\t}\n\t *\n\t * \t\tif ( headingRows < tableUtils.getRows( table ) ) {\n\t * \t\t\tconst tableBody = writer.createContainerElement( 'tbody' );\n\t *\n\t * \t\t\tconst bodySlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index >= headingRows );\n\t *\n\t * \t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableBody );\n\t * \t\t\twriter.insert( writer.createPositionAt( tableBody, 0 ), bodySlot );\n\t * \t\t}\n\t *\n\t * \t\tconst restSlot = writer.createSlot( node => !node.is( 'element', 'tableRow' ) );\n\t *\n\t * \t\twriter.insert( writer.createPositionAt( figureElement, 'end' ), restSlot );\n\t *\n\t * \t\treturn figureElement;\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Note: The children of a model element that's being converted must be allocated in the same order in the view\n\t * in which they are placed in the model.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n \t * @param config.model The description or a name of the model element to convert.\n\t * @param config.view A function that takes the model element and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters\n\t * and returns a view container element with slots for model child nodes to be converted into.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic elementToStructure( config: {\n\t\tmodel: string | {\n\t\t\tname: string;\n\t\t\tattributes?: string | Array<string>;\n\t\t};\n\t\tview: DowncastStructureCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( downcastElementToStructure( config ) );\n\t}\n\n\t/**\n\t * Model attribute to view element conversion helper.\n\t *\n\t * This conversion results in wrapping view nodes with a view attribute element. For example, a model text node with\n\t * `\"Foo\"` as data and the `bold` attribute becomes `<strong>Foo</strong>` in the view.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: 'strong'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: 'b',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'invert',\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: [ 'font-light', 'bg-dark' ]\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'fontSize',\n\t * \t\tvalues: [ 'big', 'small' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tbig: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '1.2em'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tsmall: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '0.8em'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: ( modelAttributeValue, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createAttributeElement( 'span', {\n\t * \t\t\tstyle: 'font-weight:' + modelAttributeValue\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'color',\n\t * \t\tname: '$text'\n\t * \t},\n\t * \tview: ( modelAttributeValue, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createAttributeElement( 'span', {\n\t * \t\t\tstyle: 'color:' + modelAttributeValue\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n\t * of `String`s with possible values if the model attribute is an enumerable.\n\t * @param config.view A view element definition or a function\n\t * that takes the model attribute value and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters and returns a view\n\t * attribute element. If `config.model.values` is given, `config.view` should be an object assigning values from `config.model.values`\n\t * to view element definitions or functions.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic attributeToElement<TValues extends string>(\n\t\tconfig: {\n\t\t\tmodel: string | {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t};\n\t\t\tview: ViewElementDefinition | DowncastAttributeElementCreatorFunction;\n\t\t\tconverterPriority?: PriorityString;\n\t\t} | {\n\t\t\tmodel: {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t\tvalues: Array<TValues>;\n\t\t\t};\n\t\t\tview: Record<TValues, ViewElementDefinition | DowncastAttributeElementCreatorFunction>;\n\t\t\tconverterPriority?: PriorityString;\n\t\t}\n\t): this {\n\t\treturn this.add( downcastAttributeToElement( config ) );\n\t}\n\n\t/**\n\t * Model attribute to view attribute conversion helper.\n\t *\n\t * This conversion results in adding an attribute to a view node, basing on an attribute from a model node. For example,\n\t * `<imageInline src='foo.jpg'></imageInline>` is converted to `<img src='foo.jpg'></img>`.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'source',\n\t * \tview: 'src'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'source',\n\t * \tview: 'href',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'imageInline',\n\t * \t\tkey: 'source'\n\t * \t},\n\t * \tview: 'src'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'styled',\n\t * \t\tvalues: [ 'dark', 'light' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tdark: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: [ 'styled', 'styled-dark' ]\n\t * \t\t},\n\t * \t\tlight: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: [ 'styled', 'styled-light' ]\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'styled',\n\t * \tview: modelAttributeValue => ( {\n\t * \t\tkey: 'class',\n\t * \t\tvalue: 'styled-' + modelAttributeValue\n\t * \t} )\n\t * } );\n\t * ```\n\t *\n\t * **Note**: Downcasting to a style property requires providing `value` as an object:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'lineHeight',\n\t * \tview: modelAttributeValue => ( {\n\t * \t\tkey: 'style',\n\t * \t\tvalue: {\n\t * \t\t\t'line-height': modelAttributeValue,\n\t * \t\t\t'border-bottom': '1px dotted #ba2'\n\t * \t\t}\n\t * \t} )\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n\t * the attribute key, possible values and, optionally, an element name to convert from.\n\t * @param config.view A view attribute key, or a `{ key, value }` object or a function that takes the model attribute value and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as parameters and returns a `{ key, value }` object. If the `key` is `'class'`, the `value` can be a `String` or an\n\t * array of `String`s. If the `key` is `'style'`, the `value` is an object with key-value pairs. In other cases, `value` is a `String`.\n\t * If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n\t * `{ key, value }` objects or a functions.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic attributeToAttribute<TValues extends string>(\n\t\tconfig: {\n\t\t\tmodel: string | {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t};\n\t\t\tview: string | DowncastAttributeDescriptor | DowncastAttributeCreatorFunction;\n\t\t\tconverterPriority?: PriorityString;\n\t\t} | {\n\t\t\tmodel: {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t\tvalues?: Array<TValues>;\n\t\t\t};\n\t\t\tview: Record<TValues, DowncastAttributeDescriptor | DowncastAttributeCreatorFunction>;\n\t\t\tconverterPriority?: PriorityString;\n\t\t}\n\t): this {\n\t\treturn this.add( downcastAttributeToAttribute( config ) );\n\t}\n\n\t/**\n\t * Model marker to view element conversion helper.\n\t *\n\t * **Note**: This method should be used mainly for editing the downcast and it is recommended\n\t * to use the {@link #markerToData `#markerToData()`} helper instead.\n\t *\n\t * This helper may produce invalid HTML code (e.g. a span between table cells).\n\t * It should only be used when you are sure that the produced HTML will be semantically correct.\n\t *\n\t * This conversion results in creating a view element on the boundaries of the converted marker. If the converted marker\n\t * is collapsed, only one element is created. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>`\n\t * becomes `<p>F<span data-marker=\"search\"></span>oo b<span data-marker=\"search\"></span>ar</p>` in the view.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: 'marker-search'\n\t * } );\n\t *\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: 'search-result',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tattributes: {\n\t * \t\t\t'data-marker': 'search'\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: ( markerData, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createUIElement( 'span', {\n\t * \t\t\t'data-marker': 'search',\n\t * \t\t\t'data-start': markerData.isOpening\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * If a function is passed as the `config.view` parameter, it will be used to generate both boundary elements. The function\n\t * receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as a parameters and should return an instance of the\n\t * {@link module:engine/view/uielement~ViewUIElement view UI element}. The `data` object and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi `conversionApi`} are passed from\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}. Additionally,\n\t * the `data.isOpening` parameter is passed, which is set to `true` for the marker start boundary element, and `false` for\n\t * the marker end boundary element.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The name of the model marker (or model marker group) to convert.\n\t * @param config.view A view element definition or a function that takes the model marker data and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as a parameters\n\t * and returns a view UI element.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic markerToElement( config: {\n\t\tmodel: string;\n\t\tview: ViewElementDefinition | DowncastMarkerElementCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( downcastMarkerToElement( config ) );\n\t}\n\n\t/**\n\t * Model marker to highlight conversion helper.\n\t *\n\t * This conversion results in creating a highlight on view nodes. For this kind of conversion,\n\t * the {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor} should be provided.\n\t *\n\t * For text nodes, a `<span>` {@link module:engine/view/attributeelement~ViewAttributeElement} is created and it wraps all text nodes\n\t * in the converted marker range. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>` becomes\n\t * `<p>F<span class=\"comment\">oo b</span>ar</p>` in the view.\n\t *\n\t * {@link module:engine/view/containerelement~ViewContainerElement} may provide a custom way of handling highlight. Most often,\n\t * the element itself is given classes and attributes described in the highlight descriptor (instead of being wrapped in `<span>`).\n\t * For example, a model marker set like this:\n\t * `[<imageInline src=\"foo.jpg\"></imageInline>]` becomes `<img src=\"foo.jpg\" class=\"comment\"></img>` in the view.\n\t *\n\t * For container elements, the conversion is two-step. While the converter processes the highlight descriptor and passes it\n\t * to a container element, it is the container element instance itself that applies values from the highlight descriptor.\n\t * So, in a sense, the converter takes care of stating what should be applied on what, while the element decides how to apply that.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).markerToHighlight( { model: 'comment', view: { classes: 'comment' } } );\n\t *\n\t * editor.conversion.for( 'downcast' ).markerToHighlight( {\n\t * \tmodel: 'comment',\n\t * \tview: { classes: 'comment' },\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).markerToHighlight( {\n\t * \tmodel: 'comment',\n\t * \tview: ( data, conversionApi ) => {\n\t * \t\t// Assuming that the marker name is in a form of comment:commentType:commentId.\n\t * \t\tconst [ , commentType, commentId ] = data.markerName.split( ':' );\n\t *\n\t * \t\treturn {\n\t * \t\t\tclasses: [ 'comment', 'comment-' + commentType ],\n\t * \t\t\tattributes: { 'data-comment-id': commentId }\n\t * \t\t};\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * If a function is passed as the `config.view` parameter, it will be used to generate the highlight descriptor. The function\n\t * receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as the parameters and should return a\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor highlight descriptor}.\n\t * The `data` object properties are passed from {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The name of the model marker (or model marker group) to convert.\n\t * @param config.view A highlight descriptor that will be used for highlighting or a function that takes the model marker data and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as a parameters\n\t * and returns a highlight descriptor.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic markerToHighlight( config: {\n\t\tmodel: string;\n\t\tview: DowncastHighlightDescriptor | DowncastHighlightDescriptorCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( downcastMarkerToHighlight( config ) );\n\t}\n\n\t/**\n\t * Model marker converter for data downcast.\n\t *\n\t * This conversion creates a representation for model marker boundaries in the view:\n\t *\n\t * * If the marker boundary is before or after a model element, a view attribute is set on a corresponding view element.\n\t * * In other cases, a view element with the specified tag name is inserted at the corresponding view position.\n\t *\n\t * Typically, the marker names use the `group:uniqueId:otherData` convention. For example: `comment:e34zfk9k2n459df53sjl34:zx32c`.\n\t * The default configuration for this conversion is that the first part is the `group` part and the rest of\n\t * the marker name becomes the `name` part.\n\t *\n\t * Tag and attribute names and values are generated from the marker name:\n\t *\n\t * * The templates for attributes are `data-[group]-start-before=\"[name]\"`, `data-[group]-start-after=\"[name]\"`,\n\t * `data-[group]-end-before=\"[name]\"` and `data-[group]-end-after=\"[name]\"`.\n\t * * The templates for view elements are `<[group]-start name=\"[name]\">` and `<[group]-end name=\"[name]\">`.\n\t *\n\t * Attributes mark whether the given marker's start or end boundary is before or after the given element.\n\t * The `data-[group]-start-before` and `data-[group]-end-after` attributes are favored.\n\t * The other two are used when the former two cannot be used.\n\t *\n\t * The conversion configuration can take a function that will generate different group and name parts.\n\t * If such a function is set as the `config.view` parameter, it is passed a marker name and it is expected to return an object with two\n\t * properties: `group` and `name`. If the function returns a falsy value, the conversion will not take place.\n\t *\n\t * Basic usage:\n\t *\n\t * ```ts\n\t * // Using the default conversion.\n\t * // In this case, all markers with names starting with 'comment:' will be converted.\n\t * // The `group` parameter will be set to `comment`.\n\t * // The `name` parameter will be the rest of the marker name (without the `:`).\n\t * editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t * \tmodel: 'comment'\n\t * } );\n\t * ```\n\t *\n\t * An example of a view that may be generated by this conversion (assuming a marker with the name `comment:commentId:uid` marked\n\t * by `[]`):\n\t *\n\t * ```\n\t * // Model:\n\t * <paragraph>Foo[bar</paragraph>\n\t * <imageBlock src=\"abc.jpg\"></imageBlock>]\n\t *\n\t * // View:\n\t * <p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t * <figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t * ```\n\t *\n\t * In the example above, the comment starts before \"bar\" and ends after the image.\n\t *\n\t * If the `name` part is empty, the following view may be generated:\n\t *\n\t * ```html\n\t * <p>Foo <myMarker-start></myMarker-start>bar</p>\n\t * <figure data-myMarker-end-after=\"\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t * ```\n\t *\n\t * **Note:** A situation where some markers have the `name` part and some do not, is incorrect and should be avoided.\n\t *\n\t * Examples where `data-group-start-after` and `data-group-end-before` are used:\n\t *\n\t * ```\n\t * // Model:\n\t * <blockQuote>[]<paragraph>Foo</paragraph></blockQuote>\n\t *\n\t * // View:\n\t * <blockquote><p data-group-end-before=\"name\" data-group-start-before=\"name\">Foo</p></blockquote>\n\t * ```\n\t *\n\t * Similarly, when a marker is collapsed after the last element:\n\t *\n\t * ```\n\t * // Model:\n\t * <blockQuote><paragraph>Foo</paragraph>[]</blockQuote>\n\t *\n\t * // View:\n\t * <blockquote><p data-group-end-after=\"name\" data-group-start-after=\"name\">Foo</p></blockquote>\n\t * ```\n\t *\n\t * When there are multiple markers from the same group stored in the same attribute of the same element, their\n\t * name parts are put together in the attribute value, for example: `data-group-start-before=\"name1,name2,name3\"`.\n\t *\n\t * Other examples of usage:\n\t *\n\t * ```ts\n\t * // Using a custom function which is the same as the default conversion:\n\t * editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t * \tmodel: 'comment',\n\t * \tview: markerName => ( {\n\t * \t\tgroup: 'comment',\n\t * \t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t * \t} )\n\t * } );\n\t *\n\t * // Using the converter priority:\n\t * editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t * \tmodel: 'comment',\n\t * \tview: markerName => ( {\n\t * \t\tgroup: 'comment',\n\t * \t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t * \t} ),\n\t * \tconverterPriority: 'high'\n\t * } );\n\t * ```\n\t *\n\t * This kind of conversion is useful for saving data into the database, so it should be used in the data conversion pipeline.\n\t *\n\t * See the {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} API guide to learn how to\n\t * add a converter to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The name of the model marker (or the model marker group) to convert.\n\t * @param config.view A function that takes the model marker name and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as the parameters\n\t * and returns an object with the `group` and `name` properties.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic markerToData( config: {\n\t\tmodel: string;\n\t\tview?: DowncastMarkerDataCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( downcastMarkerToData( config ) );\n\t}\n}\n\n/**\n * Function factory that creates a default downcast converter for text insertion changes.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n * ```ts\n * modelDispatcher.on( 'insert:$text', insertText() );\n * ```\n *\n * @returns Insert text event converter.\n * @internal\n */\nexport function insertText() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: { item: ModelText | ModelTextProxy; range: ModelRange },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n\t\tconst viewText = viewWriter.createText( data.item.data );\n\n\t\tviewWriter.insert( viewPosition, viewText );\n\t};\n}\n\n/**\n * Function factory that creates a default downcast converter for triggering attributes and children conversion.\n *\n * @returns The converter.\n * @internal\n */\nexport function insertAttributesAndChildren() {\n\treturn (\n\t\tevt: unknown,\n\t\tdata: { item: ModelItem; reconversion?: boolean },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tconversionApi.convertAttributes( data.item );\n\n\t\t// Start converting children of the current item.\n\t\t// In case of reconversion children were already re-inserted or converted separately.\n\t\tif ( !data.reconversion && data.item.is( 'element' ) && !data.item.isEmpty ) {\n\t\t\tconversionApi.convertChildren( data.item );\n\t\t}\n\t};\n}\n\n/**\n * Function factory that creates a default downcast converter for node remove changes.\n *\n * ```ts\n * modelDispatcher.on( 'remove', remove() );\n * ```\n *\n * @returns Remove event converter.\n * @internal\n */\nexport function remove() {\n\treturn (\n\t\tevt: unknown,\n\t\tdata: { position: ModelPosition; length: number; reconversion?: boolean },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\t// Ignore reconversion related remove as it is handled in the `insert` of reconversion.\n\t\tif ( data.reconversion ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find the view range start position by mapping the model position at which the remove happened.\n\t\tconst viewStart = conversionApi.mapper.toViewPosition( data.position );\n\n\t\tconst modelEnd = data.position.getShiftedBy( data.length );\n\t\tconst viewEnd = conversionApi.mapper.toViewPosition( modelEnd, { isPhantom: true } );\n\n\t\tconst viewRange = conversionApi.writer.createRange( viewStart, viewEnd );\n\n\t\t// Trim the range to remove in case some UI elements are on the view range boundaries.\n\t\tremoveRangeAndUnbind( viewRange.getTrimmed(), conversionApi );\n\t};\n}\n\n/**\n * Creates a `<span>` {@link module:engine/view/attributeelement~ViewAttributeElement view attribute element} from the information\n * provided by the {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor highlight descriptor} object. If the priority\n * is not provided in the descriptor, the default priority will be used.\n *\n * @internal\n */\nexport function createViewElementFromDowncastHighlightDescriptor(\n\twriter: ViewDowncastWriter,\n\tdescriptor: DowncastHighlightDescriptor\n): ViewAttributeElement {\n\tconst viewElement = writer.createAttributeElement( 'span', descriptor.attributes );\n\n\tif ( descriptor.classes ) {\n\t\tviewElement._addClass( descriptor.classes );\n\t}\n\n\tif ( typeof descriptor.priority === 'number' ) {\n\t\t( viewElement as any )._priority = descriptor.priority;\n\t}\n\n\t( viewElement as any )._id = descriptor.id;\n\n\treturn viewElement;\n}\n\n/**\n * Function factory that creates a converter which converts a non-collapsed\n * {@link module:engine/model/selection~ModelSelection model selection}\n * to a {@link module:engine/view/documentselection~ViewDocumentSelection view selection}. The converter consumes appropriate\n * value from the `consumable` object and maps model positions from the selection to view positions.\n *\n * ```ts\n * modelDispatcher.on( 'selection', convertRangeSelection() );\n * ```\n *\n * @returns Selection converter.\n * @internal\n */\nexport function convertRangeSelection() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: { selection: ModelSelection | ModelDocumentSelection },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tconst selection = data.selection;\n\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( selection, 'selection' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewRanges: Array<ViewRange> = [];\n\n\t\tfor ( const range of selection.getRanges() ) {\n\t\t\tviewRanges.push( conversionApi.mapper.toViewRange( range ) );\n\t\t}\n\n\t\tconversionApi.writer.setSelection( viewRanges, { backward: selection.isBackward } );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts a collapsed\n * {@link module:engine/model/selection~ModelSelection model selection} to\n * a {@link module:engine/view/documentselection~ViewDocumentSelection view selection}. The converter consumes appropriate\n * value from the `consumable` object, maps the model selection position to the view position and breaks\n * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} at the selection position.\n *\n * ```ts\n * modelDispatcher.on( 'selection', convertCollapsedSelection() );\n * ```\n *\n * An example of the view state before and after converting the collapsed selection:\n *\n * ```\n *    <p><strong>f^oo<strong>bar</p>\n * -> <p><strong>f</strong>^<strong>oo</strong>bar</p>\n * ```\n *\n * By breaking attribute elements like `<strong>`, the selection is in a correct element. Then, when the selection attribute is\n * converted, broken attributes might be merged again, or the position where the selection is may be wrapped\n * with different, appropriate attribute elements.\n *\n * See also {@link module:engine/conversion/downcasthelpers~cleanSelection} which does a clean-up\n * by merging attributes.\n *\n * @returns Selection converter.\n * @internal\n */\nexport function convertCollapsedSelection() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: { selection: ModelSelection | ModelDocumentSelection },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tconst selection = data.selection;\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( selection, 'selection' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst modelPosition = selection.getFirstPosition()!;\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition( modelPosition );\n\t\tconst brokenPosition = viewWriter.breakAttributes( viewPosition );\n\n\t\tviewWriter.setSelection( brokenPosition );\n\t};\n}\n\n/**\n * Function factory that creates a converter which cleans artifacts after the previous\n * {@link module:engine/model/selection~ModelSelection model selection} conversion. It removes all empty\n * {@link module:engine/view/attributeelement~ViewAttributeElement view attribute elements} and merges\n * sibling attributes at all start and end positions of all ranges.\n *\n * ```\n *    <p><strong>^</strong></p>\n * -> <p>^</p>\n *\n *    <p><strong>foo</strong>^<strong>bar</strong>bar</p>\n * -> <p><strong>foo^bar<strong>bar</p>\n *\n *    <p><strong>foo</strong><em>^</em><strong>bar</strong>bar</p>\n * -> <p><strong>foo^bar<strong>bar</p>\n * ```\n *\n * This listener should be assigned before any converter for the new selection:\n *\n * ```ts\n * modelDispatcher.on( 'cleanSelection', cleanSelection() );\n * ```\n *\n * See {@link module:engine/conversion/downcasthelpers~convertCollapsedSelection}\n * which does the opposite by breaking attributes in the selection position.\n *\n * @returns Selection converter.\n * @internal\n */\nexport function cleanSelection() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: unknown,\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewSelection = viewWriter.document.selection;\n\n\t\tfor ( const range of viewSelection.getRanges() ) {\n\t\t\t// Not collapsed selection should not have artifacts.\n\t\t\tif ( range.isCollapsed ) {\n\t\t\t\t// Position might be in the node removed by the view writer.\n\t\t\t\tif ( ( range.end.parent as ViewNode ).isAttached() ) {\n\t\t\t\t\tconversionApi.writer.mergeAttributes( range.start );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tviewWriter.setSelection( null );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n * It can also be used to convert selection attributes. In that case, an empty attribute element will be created and the\n * selection will be put inside it.\n *\n * Attributes from the model are converted to a view element that will be wrapping these view nodes that are bound to\n * model elements having the given attribute. This is useful for attributes like `bold` that may be set on text nodes in the model\n * but are represented as an element in the view:\n *\n * ```\n * [paragraph]              MODEL ====> VIEW        <p>\n * \t|- a {bold: true}                             |- <b>\n * \t|- b {bold: true}                             |   |- ab\n * \t|- c                                          |- c\n * \t```\n *\n * Passed `Function` will be provided with the attribute value and then all the parameters of the\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute` event}.\n * It is expected that the function returns an {@link module:engine/view/element~ViewElement}.\n * The result of the function will be the wrapping element.\n * When the provided `Function` does not return any element, no conversion will take place.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n * ```ts\n * modelDispatcher.on( 'attribute:bold', wrap( ( modelAttributeValue, { writer } ) => {\n * \treturn writer.createAttributeElement( 'strong' );\n * } );\n * ```\n *\n * @internal\n * @param elementCreator Function returning a view element that will be used for wrapping.\n * @returns Set/change attribute converter.\n */\nexport function wrap( elementCreator: DowncastAttributeElementCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: {\n\t\t\titem: ModelItem | ModelSelection | ModelDocumentSelection;\n\t\t\trange: ModelRange;\n\t\t\tattributeKey: string;\n\t\t\tattributeOldValue: unknown;\n\t\t\tattributeNewValue: unknown;\n\t\t},\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Recreate current wrapping node. It will be used to unwrap view range if the attribute value has changed\n\t\t// or the attribute was removed.\n\t\tconst oldViewElement = elementCreator( data.attributeOldValue, conversionApi, data );\n\n\t\t// Create node to wrap with.\n\t\tconst newViewElement = elementCreator( data.attributeNewValue, conversionApi, data );\n\n\t\tif ( !oldViewElement && !newViewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( data.item, evt.name );\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewSelection = viewWriter.document.selection;\n\n\t\tif ( data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection ) {\n\t\t\t// Selection attribute conversion.\n\t\t\tviewWriter.wrap( viewSelection.getFirstRange()!, newViewElement! );\n\t\t} else {\n\t\t\t// Node attribute conversion.\n\t\t\tlet viewRange = conversionApi.mapper.toViewRange( data.range );\n\n\t\t\t// First, unwrap the range from current wrapper.\n\t\t\tif ( data.attributeOldValue !== null && oldViewElement ) {\n\t\t\t\tviewRange = viewWriter.unwrap( viewRange, oldViewElement );\n\t\t\t}\n\n\t\t\tif ( data.attributeNewValue !== null && newViewElement ) {\n\t\t\t\tviewWriter.wrap( viewRange, newViewElement );\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts node insertion changes from the model to the view.\n * The function passed will be provided with all the parameters of the dispatcher's\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert` event}.\n * It is expected that the function returns an {@link module:engine/view/element~ViewElement}.\n * The result of the function will be inserted into the view.\n *\n * The converter automatically consumes the corresponding value from the consumables list and binds the model and view elements.\n *\n * ```ts\n * downcastDispatcher.on(\n * \t'insert:myElem',\n * \tinsertElement( ( modelItem, { writer } ) => {\n * \t\tconst text = writer.createText( 'myText' );\n * \t\tconst myElem = writer.createElement( 'myElem', { myAttr: 'my-' + modelItem.getAttribute( 'myAttr' ) }, text );\n *\n * \t\t// Do something fancy with `myElem` using `modelItem` or other parameters.\n *\n * \t\treturn myElem;\n * \t}\n * ) );\n * ```\n *\n * @internal\n * @param  elementCreator Function returning a view element, which will be inserted.\n * @param consumer Function defining element consumption process.\n * By default this function just consume passed item insertion.\n * @returns Insert element event converter.\n */\nexport function insertElement( elementCreator: DowncastElementCreatorFunction, consumer: ConsumerFunction = defaultConsumer ) {\n\treturn (\n\t\tevt: unknown,\n\t\tdata: { item: ModelElement; range: ModelRange; reconversion?: boolean },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tif ( !consumer( data.item, conversionApi.consumable, { preflight: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewElement = elementCreator( data.item, conversionApi, data );\n\n\t\tif ( !viewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Consume an element insertion and all present attributes that are specified as a reconversion triggers.\n\t\tconsumer( data.item, conversionApi.consumable );\n\n\t\tconst viewPosition = data.reconversion && removeElementAndUnbind( data.item, conversionApi ) ||\n\t\t\tconversionApi.mapper.toViewPosition( data.range.start );\n\n\t\tconversionApi.mapper.bindElements( data.item, viewElement );\n\t\tconversionApi.writer.insert( viewPosition, viewElement );\n\n\t\t// Convert attributes before converting children.\n\t\tconversionApi.convertAttributes( data.item );\n\n\t\t// Convert children or reinsert previous view elements.\n\t\treinsertOrConvertNodes( viewElement, data.item.getChildren(), conversionApi, { reconversion: data.reconversion } );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts a single model node insertion to a view structure.\n *\n * It is expected that the passed element creator function returns an {@link module:engine/view/element~ViewElement} with attached slots\n * created with `writer.createSlot()` to indicate where child nodes should be converted.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n *\n * @internal\n * @param elementCreator Function returning a view structure, which will be inserted.\n * @param consumer A callback that is expected to consume all the consumables\n * that were used by the element creator.\n * @returns Insert element event converter.\n*/\nexport function insertStructure( elementCreator: DowncastStructureCreatorFunction, consumer: ConsumerFunction ) {\n\treturn (\n\t\tevt: unknown,\n\t\tdata: { item: ModelElement; range: ModelRange; reconversion?: boolean },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tif ( !consumer( data.item, conversionApi.consumable, { preflight: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst slotsMap = new Map<ViewElement, Array<ModelNode>>();\n\n\t\tconversionApi.writer._registerSlotFactory( createSlotFactory( data.item, slotsMap, conversionApi ) );\n\n\t\t// View creation.\n\t\tconst viewElement = elementCreator( data.item, conversionApi, data );\n\n\t\tconversionApi.writer._clearSlotFactory();\n\n\t\tif ( !viewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if all children are covered by slots and there is no child that landed in multiple slots.\n\t\tvalidateSlotsChildren( data.item, slotsMap, conversionApi );\n\n\t\t// Consume an element insertion and all present attributes that are specified as a reconversion triggers.\n\t\tconsumer( data.item, conversionApi.consumable );\n\n\t\tconst viewPosition = data.reconversion && removeElementAndUnbind( data.item, conversionApi ) ||\n\t\t\tconversionApi.mapper.toViewPosition( data.range.start );\n\n\t\tconversionApi.mapper.bindElements( data.item, viewElement );\n\t\tconversionApi.writer.insert( viewPosition, viewElement );\n\n\t\t// Convert attributes before converting children.\n\t\tconversionApi.convertAttributes( data.item );\n\n\t\t// Fill view slots with previous view elements or create new ones.\n\t\tfillSlots( viewElement, slotsMap, conversionApi, { reconversion: data.reconversion } );\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts marker adding change to the\n * {@link module:engine/view/uielement~ViewUIElement view UI element}.\n *\n * The view UI element that will be added to the view depends on the passed parameter. See {@link ~insertElement}.\n * In case of a non-collapsed range, the UI element will not wrap nodes but separate elements will be placed at the beginning\n * and at the end of the range.\n *\n * This converter binds created UI elements with the marker name using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n *\n * @internal\n * @param elementCreator A view UI element or a function returning the view element that will be inserted.\n * @returns Insert element event converter.\n */\nexport function insertUIElement( elementCreator: DowncastMarkerElementCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: {\n\t\t\tmarkerRange: ModelRange;\n\t\t\tmarkerName: string;\n\t\t\tisOpening?: boolean;\n\t\t},\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\t// Create two view elements. One will be inserted at the beginning of marker, one at the end.\n\t\t// If marker is collapsed, only \"opening\" element will be inserted.\n\t\tdata.isOpening = true;\n\t\tconst viewStartElement = elementCreator( data, conversionApi );\n\n\t\tdata.isOpening = false;\n\t\tconst viewEndElement = elementCreator( data, conversionApi );\n\n\t\tif ( !viewStartElement || !viewEndElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { markerRange, markerName } = data;\n\n\t\t// Marker that is collapsed has consumable build differently that non-collapsed one.\n\t\t// For more information see `addMarker` event description.\n\t\t// If marker's range is collapsed - check if it can be consumed.\n\t\tif ( markerRange.isCollapsed && !conversionApi.consumable.consume( markerRange, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If marker's range is not collapsed - consume all items inside.\n\t\tfor ( const value of markerRange ) {\n\t\t\tif ( !conversionApi.consumable.consume( value.item, evt.name ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst mapper = conversionApi.mapper;\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\tviewWriter.setCustomProperty( 'markerBoundaryType', 'start', viewStartElement );\n\t\tviewWriter.setCustomProperty( 'markerBoundaryName', markerName, viewStartElement );\n\n\t\tviewWriter.setCustomProperty( 'markerBoundaryType', 'end', viewEndElement );\n\t\tviewWriter.setCustomProperty( 'markerBoundaryName', markerName, viewEndElement );\n\n\t\t// Returns the current model position of the given boundary UIElement for an already-inserted marker.\n\t\tconst getBoundaryModelPosition = ( name: string, type: 'start' | 'end' ): ModelPosition | null => {\n\t\t\tconst elements = mapper.markerNameToElements( name );\n\n\t\t\tif ( elements ) {\n\t\t\t\tfor ( const el of elements ) {\n\t\t\t\t\tif ( el.getCustomProperty( 'markerBoundaryType' ) === type ) {\n\t\t\t\t\t\treturn mapper.toModelPosition( viewWriter.createPositionBefore( el ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\n\t\t// End elements close inner-first: [outer:start] [inner:start] foo [inner:end] [outer:end]\n\t\t// Walk forward from the end boundary, skipping inner markers' end elements and stopping before outer ones.\n\t\t// Tie-breaker for identical ranges: inner markers sort after ours.\n\t\tif ( !markerRange.isCollapsed ) {\n\t\t\tconst endViewPosition = mapper.toViewPosition( markerRange.end ).getLastMatchingPosition( ( { item } ) => {\n\t\t\t\tif ( !item.is( 'uiElement' ) || item.getCustomProperty( 'markerBoundaryType' ) !== 'end' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst existingName = item.getCustomProperty( 'markerBoundaryName' ) as string;\n\t\t\t\tconst existingStartPos = getBoundaryModelPosition( existingName, 'start' );\n\n\t\t\t\tif ( !existingStartPos ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst cmp = existingStartPos.compareWith( markerRange.start );\n\n\t\t\t\t// Identical range — inner markers have a name that sorts after ours.\n\t\t\t\t// [*new*:start]|[old:start] ... [old:end] [*new*:end]  -> (old > new) -> skip (return true)\n\t\t\t\t//                               ^^^^^^^^^\n\t\t\t\t// [old:start]|[*new*:start] ... [*new*:end] [old:end]  -> (old < new) -> stop (return false)\n\t\t\t\t//                                           ^^^^^^^^^\n\t\t\t\tif ( cmp === 'same' ) {\n\t\t\t\t\treturn existingName.localeCompare( markerName ) > 0;\n\t\t\t\t}\n\n\t\t\t\t// Skip inner markers (start is after ours), stop before outer ones.\n\t\t\t\t// [*new*:start] ... [old:start] ... [old:end] [*new*:end] -> skip (return true)\n\t\t\t\t//                                   ^^^^^^^^^\n\t\t\t\t// [old:start] ... [*new*:start] ... [*new*:end] [old:end] -> stop (return false)\n\t\t\t\t//                                               ^^^^^^^^^\n\t\t\t\treturn cmp === 'after';\n\t\t\t} );\n\n\t\t\tviewWriter.insert( endViewPosition, viewEndElement );\n\t\t\tmapper.bindElementToMarker( viewEndElement, markerName );\n\t\t}\n\n\t\t// Start elements open outer-first: [outer:start] [inner:start] foo [inner:end] [outer:end]\n\t\t// Walk forward from the start boundary, skipping:\n\t\t// 1. End UIElements (they must remain after all start elements).\n\t\t// 2. Start UIElements of outer markers (end is after ours, using `viewEndElement` as reference).\n\t\t// Note: Collapsed markers land after non-collapsed starts.\n\t\tconst startViewPosition = mapper.toViewPosition( markerRange.start ).getLastMatchingPosition( ( { item } ) => {\n\t\t\tif ( !item.is( 'uiElement' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst boundaryType = item.getCustomProperty( 'markerBoundaryType' );\n\n\t\t\t// Non-boundary UIElement — not part of the marker system, stop before it.\n\t\t\t// [*new*:start] [?:ui] ... -> stop (return false)\n\t\t\t//               ^^^^^^\n\t\t\tif ( !boundaryType ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Stray end element → skip unconditionally.\n\t\t\t// [old:end] [*new*:start] ... -> skip (return true)\n\t\t\t// ^^^^^^^^^\n\t\t\tif ( boundaryType === 'end' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst existingName = item.getCustomProperty( 'markerBoundaryName' ) as string;\n\t\t\tconst existingEndPos = getBoundaryModelPosition( existingName, 'end' );\n\n\t\t\t// The existing marker we just encountered is collapsed.\n\t\t\t// We need to decide where to place our new marker's start element relative to it.\n\t\t\t//\n\t\t\t// 1. If our new marker is a RANGE (non-collapsed):\n\t\t\t//    Ranges must wrap points at the same position. We must insert our start BEFORE the old point.\n\t\t\t//    [old:collapsed] ... [*new*:end] -> stop here (return false)\n\t\t\t//    ^^^^^^^^^^^^^^^\n\t\t\t//\n\t\t\t// 2. If our new marker is ALSO COLLAPSED:\n\t\t\t//    Both are points at the same position. We preserve creation order (new goes after old).\n\t\t\t//    [old:collapsed] [*new*:collapsed] -> skip the old one (return true)\n\t\t\t//    ^^^^^^^^^^^^^^^\n\t\t\t//\n\t\t\t// We intentionally do NOT sort by name here. `compareMarkersForDowncast` treats two collapsed\n\t\t\t// markers at the same position as non-overlapping (range.end === range.start is not 'after'),\n\t\t\t// so it unconditionally returns 1 — preserving insertion order without a name-based tiebreaker.\n\t\t\t// This boundary-walker must stay consistent with that. Sorting by name would also break features\n\t\t\t// like HTML comments whose marker names contain random UIDs.\n\t\t\t//\n\t\t\t// Sorting by name would also make the algorithm non-deterministic: many features (e.g. comments)\n\t\t\t// use collapsed markers with random UID-based names, so the insertion order of their view elements would\n\t\t\t// differ between runs.\n\t\t\tif ( !existingEndPos ) {\n\t\t\t\treturn markerRange.isCollapsed;\n\t\t\t}\n\n\t\t\t// Our marker is collapsed — it always lands after any non-collapsed start.\n\t\t\t// [old:start] [*new*:collapsed] ... [old:end] -> skip (return true)\n\t\t\t// ^^^^^^^^^^^\n\t\t\tif ( markerRange.isCollapsed ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst cmp = existingEndPos.compareWith( markerRange.end );\n\n\t\t\t// Identical range — outer markers have a name that sorts before ours.\n\t\t\t// [old:start] [*new*:start] ... [*new*:end]|[old:end] -> (old < new) -> skip (return true)\n\t\t\t// ^^^^^^^^^^^\n\t\t\t// [*new*:start] [old:start] ... [old:end]|[*new*:end] -> (old > new) -> stop (return false)\n\t\t\t//               ^^^^^^^^^^^\n\t\t\tif ( cmp === 'same' ) {\n\t\t\t\treturn existingName.localeCompare( markerName ) < 0;\n\t\t\t}\n\n\t\t\t// Skip outer markers (end is after ours), stop before inner ones.\n\t\t\t// [old:start] [*new*:start] ... [*new*:end] ... [old:end] -> skip (return true)\n\t\t\t// ^^^^^^^^^^^\n\t\t\t// [*new*:start] [old:start] ... [old:end] ... [*new*:end] -> stop (return false)\n\t\t\t//               ^^^^^^^^^^^\n\t\t\treturn cmp === 'after';\n\t\t} );\n\n\t\tviewWriter.insert( startViewPosition, viewStartElement );\n\t\tmapper.bindElementToMarker( viewStartElement, markerName );\n\n\t\tevt.stop();\n\t};\n}\n\n/**\n * Removes given view range content and unbinds removed elements.\n */\nfunction removeRangeAndUnbind( viewRange: ViewRange, conversionApi: DowncastConversionApi ) {\n\tconst removed = conversionApi.writer.remove( viewRange );\n\n\t// After the range is removed, unbind all view elements from the model.\n\t// Range inside view document fragment is used to unbind deeply.\n\tfor ( const child of conversionApi.writer.createRangeIn( removed ).getItems() ) {\n\t\tconversionApi.mapper.unbindViewElement( child as ViewElement, { defer: true } );\n\t}\n\n\treturn viewRange.start;\n}\n\n/**\n * Removes view element for given model element and unbinds removed view elements.\n */\nfunction removeElementAndUnbind( modelElement: ModelElement, conversionApi: DowncastConversionApi ) {\n\tconst viewElement = conversionApi.mapper.toViewElement( modelElement );\n\n\treturn viewElement && removeRangeAndUnbind( conversionApi.writer.createRangeOn( viewElement ), conversionApi );\n}\n\n/**\n * Function factory that returns a default downcast converter for removing a {@link module:engine/view/uielement~ViewUIElement UI element}\n * based on marker remove change.\n *\n * This converter unbinds elements from the marker name.\n *\n * @returns Removed UI element converter.\n */\nfunction removeUIElement() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: { markerName: string },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tconst elements = conversionApi.mapper.markerNameToElements( data.markerName );\n\n\t\tif ( !elements ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const element of elements ) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName( element, data.markerName );\n\t\t\tconversionApi.writer.clear( conversionApi.writer.createRangeOn( element ), element );\n\t\t}\n\n\t\tconversionApi.writer.clearClonedElementsGroup( data.markerName );\n\n\t\tevt.stop();\n\t};\n}\n\n/**\n * Function factory that creates a default converter for model markers.\n *\n * See {@link DowncastHelpers#markerToData} for more information what type of view is generated.\n *\n * This converter binds created UI elements and affected view elements with the marker name\n * using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n *\n * @returns Add marker converter.\n */\nfunction insertMarkerData( viewCreator: DowncastMarkerDataCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: {\n\t\t\tmarkerName: string;\n\t\t\tmarkerRange: ModelRange;\n\t\t},\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tconst viewMarkerData = viewCreator( data.markerName, conversionApi );\n\n\t\tif ( !viewMarkerData ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst markerRange = data.markerRange;\n\n\t\tif ( !conversionApi.consumable.consume( markerRange, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Adding closing data first to keep the proper order in the view.\n\t\thandleMarkerBoundary( markerRange, false, conversionApi, data, viewMarkerData );\n\t\thandleMarkerBoundary( markerRange, true, conversionApi, data, viewMarkerData );\n\n\t\tevt.stop();\n\t};\n}\n\n/**\n * Helper function for `insertMarkerData()` that marks a marker boundary at the beginning or end of given `range`.\n */\nfunction handleMarkerBoundary(\n\trange: ModelRange,\n\tisStart: boolean,\n\tconversionApi: DowncastConversionApi,\n\tdata: { markerName: string },\n\tviewMarkerData: { name: string; group: string }\n): void {\n\tconst modelPosition = isStart ? range.start : range.end;\n\tconst elementAfter = modelPosition.nodeAfter && modelPosition.nodeAfter.is( 'element' ) ? modelPosition.nodeAfter : null;\n\tconst elementBefore = modelPosition.nodeBefore && modelPosition.nodeBefore.is( 'element' ) ? modelPosition.nodeBefore : null;\n\n\tif ( elementAfter || elementBefore ) {\n\t\tlet modelElement;\n\t\tlet isBefore;\n\n\t\t// If possible, we want to add `data-group-start-before` and `data-group-end-after` attributes.\n\t\tif ( isStart && elementAfter || !isStart && !elementBefore ) {\n\t\t\t// [<elementAfter>...</elementAfter> -> <elementAfter data-group-start-before=\"...\">...</elementAfter>\n\t\t\t// <parent>]<elementAfter> -> <parent><elementAfter data-group-end-before=\"...\">\n\t\t\tmodelElement = elementAfter;\n\t\t\tisBefore = true;\n\t\t} else {\n\t\t\t// <elementBefore>...</elementBefore>] -> <elementBefore data-group-end-after=\"...\">...</elementBefore>\n\t\t\t// </elementBefore>[</parent> -> </elementBefore data-group-start-after=\"...\"></parent>\n\t\t\tmodelElement = elementBefore;\n\t\t\tisBefore = false;\n\t\t}\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( modelElement! );\n\n\t\t// In rare circumstances, the model element may be not mapped to any view element and that would cause an error.\n\t\t// One of those situations is a soft break inside code block.\n\t\tif ( viewElement ) {\n\t\t\tinsertMarkerAsAttribute( viewElement, isStart, isBefore, conversionApi, data, viewMarkerData );\n\n\t\t\treturn;\n\t\t}\n\t}\n\n\tconst viewPosition = conversionApi.mapper.toViewPosition( modelPosition );\n\n\tinsertMarkerAsElement( viewPosition, isStart, conversionApi, data, viewMarkerData );\n}\n\n/**\n * Helper function for `insertMarkerData()` that marks a marker boundary in the view as an attribute on a view element.\n */\nfunction insertMarkerAsAttribute(\n\tviewElement: ViewElement,\n\tisStart: boolean,\n\tisBefore: boolean,\n\tconversionApi: DowncastConversionApi,\n\tdata: { markerName: string },\n\tviewMarkerData: { name: string; group: string }\n) {\n\tconst attributeName = `data-${ viewMarkerData.group }-${ isStart ? 'start' : 'end' }-${ isBefore ? 'before' : 'after' }`;\n\n\tconst markerNames = viewElement.hasAttribute( attributeName ) ? viewElement.getAttribute( attributeName )!.split( ',' ) : [];\n\n\t// Adding marker name at the beginning to have the same order in the attribute as there is with marker elements.\n\tmarkerNames.unshift( viewMarkerData.name );\n\n\tconversionApi.writer.setAttribute( attributeName, markerNames.join( ',' ), viewElement );\n\tconversionApi.mapper.bindElementToMarker( viewElement, data.markerName );\n}\n\n/**\n * Helper function for `insertMarkerData()` that marks a marker boundary in the view as a separate view ui element.\n */\nfunction insertMarkerAsElement(\n\tposition: ViewPosition,\n\tisStart: boolean,\n\tconversionApi: DowncastConversionApi,\n\tdata: { markerName: string },\n\tviewMarkerData: { name: string; group: string }\n) {\n\tconst viewElementName = `${ viewMarkerData.group }-${ isStart ? 'start' : 'end' }`;\n\n\tconst attrs = viewMarkerData.name ? { 'name': viewMarkerData.name } : null;\n\tconst viewElement = conversionApi.writer.createUIElement( viewElementName, attrs );\n\n\tconversionApi.writer.insert( position, viewElement );\n\tconversionApi.mapper.bindElementToMarker( viewElement, data.markerName );\n}\n\n/**\n * Function factory that creates a converter for removing a model marker data added by the {@link #insertMarkerData} converter.\n *\n * @returns Remove marker converter.\n */\nfunction removeMarkerData( viewCreator: DowncastMarkerDataCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: { markerName: string },\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tconst viewData = viewCreator( data.markerName, conversionApi );\n\n\t\tif ( !viewData ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elements = conversionApi.mapper.markerNameToElements( data.markerName );\n\n\t\tif ( !elements ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const element of elements ) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName( element, data.markerName );\n\n\t\t\tif ( element.is( 'containerElement' ) ) {\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-start-before`, element );\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-start-after`, element );\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-end-before`, element );\n\t\t\t\tremoveMarkerFromAttribute( `data-${ viewData.group }-end-after`, element );\n\t\t\t} else {\n\t\t\t\tconversionApi.writer.clear( conversionApi.writer.createRangeOn( element ), element );\n\t\t\t}\n\t\t}\n\n\t\tconversionApi.writer.clearClonedElementsGroup( data.markerName );\n\n\t\tevt.stop();\n\n\t\tfunction removeMarkerFromAttribute( attributeName: string, element: ViewElement ): void {\n\t\t\tif ( element.hasAttribute( attributeName ) ) {\n\t\t\t\tconst markerNames = new Set( element.getAttribute( attributeName )!.split( ',' ) );\n\n\t\t\t\tmarkerNames.delete( viewData!.name );\n\n\t\t\t\tif ( markerNames.size == 0 ) {\n\t\t\t\t\tconversionApi.writer.removeAttribute( attributeName, element );\n\t\t\t\t} else {\n\t\t\t\t\tconversionApi.writer.setAttribute( attributeName, Array.from( markerNames ).join( ',' ), element );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n *\n * Attributes from the model are converted to the view element attributes in the view. You may provide a custom function to generate\n * a key-value attribute pair to add/change/remove. If not provided, model attributes will be converted to view element\n * attributes on a one-to-one basis.\n *\n * *Note:** The provided attribute creator should always return the same `key` for a given attribute from the model.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n * ```ts\n * modelDispatcher.on( 'attribute:customAttr:myElem', changeAttribute( ( value, data ) => {\n * \t// Change attribute key from `customAttr` to `class` in the view.\n * \tconst key = 'class';\n * \tlet value = data.attributeNewValue;\n *\n * \t// Force attribute value to 'empty' if the model element is empty.\n * \tif ( data.item.childCount === 0 ) {\n * \t\tvalue = 'empty';\n * \t}\n *\n * \t// Return the key-value pair.\n * \treturn { key, value };\n * } ) );\n * ```\n *\n * @param attributeCreator Function returning an object with two properties: `key` and `value`, which\n * represent the attribute key and attribute value to be set on a {@link module:engine/view/element~ViewElement view element}.\n * The function is passed the model attribute value as the first parameter and additional data about the change as the second parameter.\n * @returns Set/change attribute converter.\n */\nfunction changeAttribute( attributeCreator: DowncastAttributeCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: {\n\t\t\titem: ModelElement;\n\t\t\trange: ModelRange;\n\t\t\tattributeKey: string;\n\t\t\tattributeOldValue: unknown;\n\t\t\tattributeNewValue: unknown;\n\t\t},\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst oldAttribute = attributeCreator( data.attributeOldValue, conversionApi, data );\n\t\tconst newAttribute = attributeCreator( data.attributeNewValue, conversionApi, data );\n\n\t\tif ( !oldAttribute && !newAttribute ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( data.item, evt.name );\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item );\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\t// If model item cannot be mapped to a view element, it means item is not an `Element` instance but a `ModelTextProxy` node.\n\t\t// Only elements can have attributes in a view so do not proceed for anything else.\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1587.\n\t\tif ( !viewElement ) {\n\t\t\t/**\n\t\t\t * This error occurs when a {@link module:engine/model/textproxy~ModelTextProxy text node's} attribute is to be downcasted\n\t\t\t * by an {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `Attribute to Attribute converter`}.\n\t\t\t * In most cases it is caused by converters misconfiguration when only \"generic\" converter is defined:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\t * \tmodel: 'attribute-name',\n\t\t\t * \tview: 'attribute-name'\n\t\t\t * } ) );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * and given attribute is used on text node, for example:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * model.change( writer => {\n\t\t\t * \twriter.insertText( 'Foo', { 'attribute-name': 'bar' }, parent, 0 );\n\t\t\t * } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * In such cases, to convert the same attribute for both {@link module:engine/model/element~ModelElement}\n\t\t\t * and {@link module:engine/model/textproxy~ModelTextProxy `Text`} nodes, text specific\n\t\t\t * {@link module:engine/conversion/conversion~Conversion#attributeToElement `Attribute to Element converter`}\n\t\t\t * with higher {@link module:utils/priorities~PriorityString priority} must also be defined:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\t * \tmodel: {\n\t\t\t * \t\tkey: 'attribute-name',\n\t\t\t * \t\tname: '$text'\n\t\t\t * \t},\n\t\t\t * \tview: ( value, { writer } ) => {\n\t\t\t * \t\treturn writer.createAttributeElement( 'span', { 'attribute-name': value } );\n\t\t\t * \t},\n\t\t\t * \tconverterPriority: 'high'\n\t\t\t * } ) );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @error conversion-attribute-to-attribute-on-text\n\t\t\t * @param {object} data The conversion data.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-attribute-to-attribute-on-text', conversionApi.dispatcher, data );\n\t\t}\n\n\t\t// First remove the old attribute if there was one.\n\t\tif ( data.attributeOldValue !== null && oldAttribute ) {\n\t\t\tlet value = oldAttribute.value;\n\n\t\t\tif ( oldAttribute.key == 'style' ) {\n\t\t\t\tif ( typeof oldAttribute.value == 'string' ) {\n\t\t\t\t\tvalue = new StylesMap( viewWriter.document.stylesProcessor )\n\t\t\t\t\t\t.setTo( oldAttribute.value )\n\t\t\t\t\t\t.getStylesEntries()\n\t\t\t\t\t\t.map( ( [ key ] ) => key );\n\t\t\t\t} else {\n\t\t\t\t\tvalue = Object.keys( oldAttribute.value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tviewWriter.removeAttribute( oldAttribute.key, value as ArrayOrItem<string>, viewElement );\n\t\t}\n\n\t\t// Then set the new attribute.\n\t\tif ( data.attributeNewValue !== null && newAttribute ) {\n\t\t\tlet value = newAttribute.value;\n\n\t\t\tif ( newAttribute.key == 'style' && typeof newAttribute.value == 'string' ) {\n\t\t\t\tvalue = Object.fromEntries(\n\t\t\t\t\tnew StylesMap( viewWriter.document.stylesProcessor )\n\t\t\t\t\t\t.setTo( newAttribute.value )\n\t\t\t\t\t\t.getStylesEntries()\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tviewWriter.setAttribute( newAttribute.key, value, false, viewElement );\n\t\t}\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts the text inside marker's range. The converter wraps the text with\n * {@link module:engine/view/attributeelement~ViewAttributeElement} created from the provided descriptor.\n * See {link module:engine/conversion/downcasthelpers~createViewElementFromDowncastHighlightDescriptor}.\n *\n * It can also be used to convert the selection that is inside a marker. In that case, an empty attribute element will be\n * created and the selection will be put inside it.\n *\n * If the highlight descriptor does not provide the `priority` property, `10` will be used.\n *\n * If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n *\n * This converter binds the created {@link module:engine/view/attributeelement~ViewAttributeElement attribute elemens} with the marker name\n * using the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n */\nfunction highlightText( highlightDescriptor: DowncastHighlightDescriptor | DowncastHighlightDescriptorCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: {\n\t\t\titem?: ModelItem | ModelSelection | ModelDocumentSelection;\n\t\t\trange?: ModelRange;\n\t\t\tmarkerRange: ModelRange;\n\t\t\tmarkerName: string;\n\t\t},\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tif ( !data.item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !( data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection ) && !data.item.is( '$textProxy' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst descriptor = prepareDescriptor( highlightDescriptor, data, conversionApi );\n\n\t\tif ( !descriptor ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewElement = createViewElementFromDowncastHighlightDescriptor( viewWriter, descriptor );\n\t\tconst viewSelection = viewWriter.document.selection;\n\n\t\tif ( data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection ) {\n\t\t\tviewWriter.wrap( viewSelection.getFirstRange()!, viewElement );\n\t\t} else {\n\t\t\tconst viewRange = conversionApi.mapper.toViewRange( data.range! );\n\t\t\tconst rangeAfterWrap = viewWriter.wrap( viewRange, viewElement );\n\n\t\t\tfor ( const element of rangeAfterWrap.getItems() ) {\n\t\t\t\tif ( element.is( 'attributeElement' ) && element.isSimilar( viewElement ) ) {\n\t\t\t\t\tconversionApi.mapper.bindElementToMarker( element, data.markerName );\n\n\t\t\t\t\t// One attribute element is enough, because all of them are bound together by the view writer.\n\t\t\t\t\t// Mapper uses this binding to get all the elements no matter how many of them are registered in the mapper.\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Converter function factory. It creates a function which applies the marker's highlight to an element inside the marker's range.\n *\n * The converter checks if an element has the `addHighlight` function stored as a\n * {@link module:engine/view/element~ViewElement#_setCustomProperty custom property} and, if so, uses it to apply the highlight.\n * In such case the converter will consume all element's children, assuming that they were handled by the element itself.\n *\n * When the `addHighlight` custom property is not present, the element is not converted in any special way.\n * This means that converters will proceed to convert the element's child nodes.\n *\n * If the highlight descriptor does not provide the `priority` property, `10` will be used.\n *\n * If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n *\n * This converter binds altered {@link module:engine/view/containerelement~ViewContainerElement container elements}\n * with the marker name using the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n */\nfunction highlightElement( highlightDescriptor: DowncastHighlightDescriptor | DowncastHighlightDescriptorCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: {\n\t\t\titem?: ModelItem | ModelSelection | ModelDocumentSelection;\n\t\t\tmarkerName: string;\n\t\t\tmarkerRange: ModelRange;\n\t\t},\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\tif ( !data.item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !( data.item instanceof ModelElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst descriptor = prepareDescriptor( highlightDescriptor, data, conversionApi );\n\n\t\tif ( !descriptor ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item );\n\n\t\tif ( viewElement && viewElement.getCustomProperty( 'addHighlight' ) ) {\n\t\t\t// Consume element itself.\n\t\t\tconversionApi.consumable.consume( data.item, evt.name );\n\n\t\t\t// Consume all children nodes.\n\t\t\tfor ( const value of ModelRange._createIn( data.item ) ) {\n\t\t\t\tconversionApi.consumable.consume( value.item, evt.name );\n\t\t\t}\n\n\t\t\tconst addHighlightCallback = viewElement.getCustomProperty( 'addHighlight' ) as DowncastAddHighlightCallback;\n\n\t\t\taddHighlightCallback( viewElement, descriptor, conversionApi.writer );\n\n\t\t\tconversionApi.mapper.bindElementToMarker( viewElement, data.markerName );\n\t\t}\n\t};\n}\n\n/**\n * Function factory that creates a converter which converts the removing model marker to the view.\n *\n * Both text nodes and elements are handled by this converter but they are handled a bit differently.\n *\n * Text nodes are unwrapped using the {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} created from the\n * provided highlight descriptor. See {link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor}.\n *\n * For elements, the converter checks if an element has the `removeHighlight` function stored as a\n * {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}. If so, it uses it to remove the highlight.\n * In such case, the children of that element will not be converted.\n *\n * When `removeHighlight` is not present, the element is not converted in any special way.\n * The converter will proceed to convert the element's child nodes instead.\n *\n * If the highlight descriptor does not provide the `priority` property, `10` will be used.\n *\n * If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n *\n * This converter unbinds elements from the marker name.\n */\nfunction removeHighlight( highlightDescriptor: DowncastHighlightDescriptor | DowncastHighlightDescriptorCreatorFunction ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: {\n\t\t\tmarkerName: string;\n\t\t\tmarkerRange: ModelRange;\n\t\t},\n\t\tconversionApi: DowncastConversionApi\n\t): void => {\n\t\t// This conversion makes sense only for non-collapsed range.\n\t\tif ( data.markerRange.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst descriptor = prepareDescriptor( highlightDescriptor, data, conversionApi );\n\n\t\tif ( !descriptor ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// View element that will be used to unwrap `AttributeElement`s.\n\t\tconst viewHighlightElement = createViewElementFromDowncastHighlightDescriptor( conversionApi.writer, descriptor );\n\n\t\t// Get all elements bound with given marker name.\n\t\tconst elements = conversionApi.mapper.markerNameToElements( data.markerName );\n\n\t\tif ( !elements ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const element of elements ) {\n\t\t\tconversionApi.mapper.unbindElementFromMarkerName( element, data.markerName );\n\n\t\t\tif ( element.is( 'attributeElement' ) ) {\n\t\t\t\tconversionApi.writer.unwrap( conversionApi.writer.createRangeOn( element ), viewHighlightElement );\n\t\t\t} else {\n\t\t\t\t// if element.is( 'containerElement' ).\n\t\t\t\tconst removeHighlightCallback = element.getCustomProperty( 'removeHighlight' ) as DowncastRemoveHighlightCallback;\n\n\t\t\t\tremoveHighlightCallback( element, descriptor.id!, conversionApi.writer );\n\t\t\t}\n\t\t}\n\n\t\tconversionApi.writer.clearClonedElementsGroup( data.markerName );\n\n\t\tevt.stop();\n\t};\n}\n\n/**\n * Model element to view element conversion helper.\n *\n * See {@link ~DowncastHelpers#elementToElement `.elementToElement()` downcast helper} for examples and config params description.\n *\n * @param config Conversion configuration.\n * @param config.model The description or a name of the model element to convert.\n * @param config.model.attributes List of attributes triggering element reconversion.\n * @param config.model.children Should reconvert element if the list of model child nodes changed.\n * @returns Conversion helper.\n */\nfunction downcastElementToElement( config: {\n\tmodel: string | {\n\t\tname: string;\n\t\tattributes?: string | Array<string>;\n\t\tchildren?: boolean;\n\t};\n\tview: ViewElementDefinition | DowncastElementCreatorFunction;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconst model = normalizeModelElementConfig( config.model );\n\tconst view = normalizeToElementConfig( config.view, 'container' );\n\n\t// Trigger reconversion on children list change if element is a subject to any reconversion.\n\t// This is required to be able to trigger Differ#refreshItem() on a direct child of the reconverted element.\n\tif ( model.attributes.length ) {\n\t\tmodel.children = true;\n\t}\n\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>(\n\t\t\t`insert:${ model.name }`,\n\t\t\tinsertElement( view, createConsumer( model ) ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\n\t\tif ( model.children || model.attributes.length ) {\n\t\t\tdispatcher.on<DowncastReduceChangesEvent>( 'reduceChanges', createChangeReducer( model ), { priority: 'low' } );\n\t\t}\n\t};\n}\n\n/**\n * Model element to view structure conversion helper.\n *\n * See {@link ~DowncastHelpers#elementToStructure `.elementToStructure()` downcast helper} for examples and config params description.\n *\n * @param config Conversion configuration.\n * @returns Conversion helper.\n */\nfunction downcastElementToStructure(\n\tconfig: {\n\t\tmodel: string | {\n\t\t\tname: string;\n\t\t\tattributes?: string | Array<string>;\n\t\t};\n\t\tview: DowncastStructureCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t}\n) {\n\tconst model = normalizeModelElementConfig( config.model );\n\tconst view = normalizeToElementConfig( config.view, 'container' );\n\n\t// Trigger reconversion on children list change because it always needs to use slots to put children in proper places.\n\t// This is required to be able to trigger Differ#refreshItem() on a direct child of the reconverted element.\n\tmodel.children = true;\n\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tif ( dispatcher._conversionApi.schema.checkChild( model.name, '$text' ) ) {\n\t\t\t/**\n\t\t\t * This error occurs when a {@link module:engine/model/element~ModelElement model element} is downcasted\n\t\t\t * via {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure} helper but the element was\n\t\t\t * allowed to host `$text` by the {@link module:engine/model/schema~ModelSchema model schema}.\n\t\t\t *\n\t\t\t * For instance, this may be the result of `myElement` allowing the content of\n\t\t\t * {@glink framework/deep-dive/schema#generic-items `$block`} in its schema definition:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * // Element definition in schema.\n\t\t\t * schema.register( 'myElement', {\n\t\t\t * \tallowContentOf: '$block',\n\t\t\t *\n\t\t\t * \t// ...\n\t\t\t * } );\n\t\t\t *\n\t\t\t * // ...\n\t\t\t *\n\t\t\t * // Conversion of myElement with the use of elementToStructure().\n\t\t\t * editor.conversion.for( 'downcast' ).elementToStructure( {\n\t\t\t * \tmodel: 'myElement',\n\t\t\t * \tview: ( modelElement, { writer } ) => {\n\t\t\t * \t\t// ...\n\t\t\t * \t}\n\t\t\t * } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * In such case, {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`} helper\n\t\t\t * can be used instead to get around this problem:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t\t\t * \tmodel: 'myElement',\n\t\t\t * \tview: ( modelElement, { writer } ) => {\n\t\t\t * \t\t// ...\n\t\t\t * \t}\n\t\t\t * } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @error conversion-element-to-structure-disallowed-text\n\t\t\t * @param {string} elementName The name of the element the structure is to be created for.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-element-to-structure-disallowed-text', dispatcher, { elementName: model.name } );\n\t\t}\n\n\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>(\n\t\t\t`insert:${ model.name }`,\n\t\t\tinsertStructure( view, createConsumer( model ) ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\n\t\tdispatcher.on<DowncastReduceChangesEvent>( 'reduceChanges', createChangeReducer( model ), { priority: 'low' } );\n\t};\n}\n\n/**\n * Model attribute to view element conversion helper.\n *\n * See {@link ~DowncastHelpers#attributeToElement `.attributeToElement()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n * of `String`s with possible values if the model attribute is an enumerable.\n * @param config.view A view element definition or a function that takes the model attribute value and\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter view downcast writer} as parameters and returns a view attribute element.\n * If `config.model.values` is given, `config.view` should be an object assigning values from `config.model.values` to view element\n * definitions or functions.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */\nfunction downcastAttributeToElement( config: {\n\tmodel: string | {\n\t\tkey: string;\n\t\tname?: string;\n\t\tvalues?: Array<string>;\n\t};\n\tview:\n\t\t| ViewElementDefinition\n\t\t| DowncastAttributeElementCreatorFunction\n\t\t| Record<string, ViewElementDefinition | DowncastAttributeElementCreatorFunction>;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconfig = cloneDeep( config );\n\n\tlet model = config.model;\n\n\tif ( typeof model == 'string' ) {\n\t\tmodel = { key: model };\n\t}\n\n\tlet eventName = `attribute:${ model.key }` as const;\n\n\tif ( model.name ) {\n\t\teventName += ':' + model.name;\n\t}\n\n\tif ( model.values ) {\n\t\tfor ( const modelValue of model.values ) {\n\t\t\t( config.view as any )[ modelValue ] = normalizeToElementConfig( ( config.view as any )[ modelValue ], 'attribute' );\n\t\t}\n\t} else {\n\t\tconfig.view = normalizeToElementConfig( config.view as any, 'attribute' );\n\t}\n\n\tconst elementCreator = getFromAttributeCreator<DowncastAttributeElementCreatorFunction>( config );\n\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tdispatcher.on<DowncastAttributeEvent>(\n\t\t\teventName,\n\t\t\twrap( elementCreator ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t};\n}\n\n/**\n * Model attribute to view attribute conversion helper.\n *\n * See {@link ~DowncastHelpers#attributeToAttribute `.attributeToAttribute()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n * the attribute key, possible values and, optionally, an element name to convert from.\n * @param config.view A view attribute key, or a `{ key, value }` object or a function that takes the model attribute value and returns\n * a `{ key, value }` object.\n * If `key` is `'class'`, `value` can be a `String` or an array of `String`s. If `key` is `'style'`, `value` is an object with\n * key-value pairs. In other cases, `value` is a `String`.\n * If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n * `{ key, value }` objects or a functions.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */\nfunction downcastAttributeToAttribute( config: {\n\tmodel: string | {\n\t\tkey: string;\n\t\tname?: string;\n\t\tvalues?: Array<string>;\n\t};\n\tview:\n\t\t| string\n\t\t| DowncastAttributeDescriptor\n\t\t| DowncastAttributeCreatorFunction\n\t\t| Record<string, DowncastAttributeDescriptor | DowncastAttributeCreatorFunction>;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconfig = cloneDeep( config );\n\n\tlet model = config.model;\n\n\tif ( typeof model == 'string' ) {\n\t\tmodel = { key: model };\n\t}\n\n\tlet eventName = `attribute:${ model.key }` as const;\n\n\tif ( model.name ) {\n\t\teventName += ':' + model.name;\n\t}\n\n\tif ( model.values ) {\n\t\tfor ( const modelValue of model.values ) {\n\t\t\t( config.view as any )[ modelValue ] = normalizeToAttributeConfig( ( config.view as any )[ modelValue ] );\n\t\t}\n\t} else {\n\t\tconfig.view = normalizeToAttributeConfig( config.view );\n\t}\n\n\tconst elementCreator = getFromAttributeCreator<DowncastAttributeCreatorFunction>( config );\n\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>(\n\t\t\teventName,\n\t\t\tchangeAttribute( elementCreator ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t};\n}\n\n/**\n * Model marker to view element conversion helper.\n *\n * See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The name of the model marker (or model marker group) to convert.\n * @param config.view A view element definition or a function that takes the model marker data as a parameter and returns a view UI element.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */\nfunction downcastMarkerToElement( config: {\n\tmodel: string;\n\tview: ViewElementDefinition | DowncastMarkerElementCreatorFunction;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconst view = normalizeToElementConfig( config.view, 'ui' );\n\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tdispatcher.on<DowncastAddMarkerEvent>(\n\t\t\t`addMarker:${ config.model }`,\n\t\t\tinsertUIElement( view ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t\tdispatcher.on<DowncastRemoveMarkerEvent>(\n\t\t\t`removeMarker:${ config.model }`,\n\t\t\tremoveUIElement(),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t};\n}\n\n/**\n * Model marker to view data conversion helper.\n *\n * See {@link ~DowncastHelpers#markerToData `markerToData()` downcast helper} to learn more.\n *\n * @returns Conversion helper.\n */\nfunction downcastMarkerToData( config: {\n\tmodel: string;\n\tview?: DowncastMarkerDataCreatorFunction;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconfig = cloneDeep( config );\n\n\tconst group = config.model;\n\tlet view = config.view;\n\n\t// Default conversion.\n\tif ( !view ) {\n\t\tview = markerName => ( {\n\t\t\tgroup,\n\t\t\tname: markerName.substr( config.model.length + 1 )\n\t\t} );\n\t}\n\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tdispatcher.on<DowncastAddMarkerEvent>(\n\t\t\t`addMarker:${ group }`,\n\t\t\tinsertMarkerData( view! ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t\tdispatcher.on<DowncastRemoveMarkerEvent>(\n\t\t\t`removeMarker:${ group }`,\n\t\t\tremoveMarkerData( view! ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t};\n}\n\n/**\n * Model marker to highlight conversion helper.\n *\n * See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The name of the model marker (or model marker group) to convert.\n * @param config.view A highlight descriptor that will be used for highlighting or a function that takes\n * the model marker data as a parameter and returns a highlight descriptor.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */\nfunction downcastMarkerToHighlight( config: {\n\tmodel: string;\n\tview: DowncastHighlightDescriptor | DowncastHighlightDescriptorCreatorFunction;\n\tconverterPriority?: PriorityString;\n} ) {\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tdispatcher.on<DowncastAddMarkerEvent>(\n\t\t\t`addMarker:${ config.model }`,\n\t\t\thighlightText( config.view ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t\tdispatcher.on<DowncastAddMarkerEvent>(\n\t\t\t`addMarker:${ config.model }`,\n\t\t\thighlightElement( config.view ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t\tdispatcher.on<DowncastRemoveMarkerEvent>(\n\t\t\t`removeMarker:${ config.model }`,\n\t\t\tremoveHighlight( config.view ),\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t};\n}\n\n/**\n * Takes `config.model`, and converts it to an object with normalized structure.\n *\n * @param model Model configuration or element name.\n */\nfunction normalizeModelElementConfig( model: string | {\n\tname: string;\n\tattributes?: ArrayOrItem<string>;\n\tchildren?: boolean;\n} ): NormalizedModelElementConfig {\n\tif ( typeof model == 'string' ) {\n\t\tmodel = { name: model };\n\t}\n\n\treturn {\n\t\tname: model.name,\n\t\tattributes: model.attributes ? toArray( model.attributes ) : [],\n\t\tchildren: !!model.children\n\t};\n}\n\ninterface NormalizedModelElementConfig {\n\tname: string;\n\n\t/**\n\t * List of attributes that should trigger reconversion.\n\t */\n\tattributes: Array<string>;\n\n\t/**\n\t * Whether children insertion/deletion should trigger reconversion.\n\t */\n\tchildren: boolean;\n}\n\n/**\n * Takes `config.view`, and if it is an {@link module:engine/view/elementdefinition~ViewElementDefinition}, converts it\n * to a function (because lower level converters accept only element creator functions).\n *\n * @param view View configuration.\n * @param viewElementType View element type to create.\n * @returns Element creator function to use in lower level converters.\n */\nfunction normalizeToElementConfig<T extends Function>(\n\tview: ViewElementDefinition | T,\n\tviewElementType: 'container' | 'attribute' | 'ui'\n): T {\n\tif ( typeof view == 'function' ) {\n\t\t// If `view` is already a function, don't do anything.\n\t\treturn view as any;\n\t}\n\n\treturn ( ( modelData: unknown, conversionApi: DowncastConversionApi ) =>\n\t\tcreateViewElementFromDefinition( view, conversionApi, viewElementType ) ) as any;\n}\n\n/**\n * Creates a view element instance from the provided {@link module:engine/view/elementdefinition~ViewElementDefinition} and class.\n */\nfunction createViewElementFromDefinition(\n\tviewElementDefinition: ViewElementDefinition,\n\tconversionApi: DowncastConversionApi,\n\tviewElementType: 'container' | 'attribute' | 'ui'\n): ViewElement {\n\tif ( typeof viewElementDefinition == 'string' ) {\n\t\t// If `viewElementDefinition` is given as a `String`, normalize it to an object with `name` property.\n\t\tviewElementDefinition = { name: viewElementDefinition };\n\t}\n\n\tlet element: ViewElement;\n\tconst viewWriter = conversionApi.writer;\n\tconst attributes = Object.assign( {}, viewElementDefinition.attributes );\n\n\tif ( viewElementType == 'container' ) {\n\t\telement = viewWriter.createContainerElement( viewElementDefinition.name, attributes );\n\t} else if ( viewElementType == 'attribute' ) {\n\t\tconst options = {\n\t\t\tpriority: viewElementDefinition.priority || ViewAttributeElement.DEFAULT_PRIORITY\n\t\t};\n\n\t\telement = viewWriter.createAttributeElement( viewElementDefinition.name, attributes, options );\n\t} else {\n\t\t// 'ui'.\n\t\telement = viewWriter.createUIElement( viewElementDefinition.name, attributes );\n\t}\n\n\tif ( viewElementDefinition.styles ) {\n\t\tconst keys = Object.keys( viewElementDefinition.styles );\n\n\t\tfor ( const key of keys ) {\n\t\t\tviewWriter.setStyle( key, viewElementDefinition.styles[ key ], element );\n\t\t}\n\t}\n\n\tif ( viewElementDefinition.classes ) {\n\t\tconst classes = viewElementDefinition.classes;\n\n\t\tif ( typeof classes == 'string' ) {\n\t\t\tviewWriter.addClass( classes, element );\n\t\t} else {\n\t\t\tfor ( const className of classes ) {\n\t\t\t\tviewWriter.addClass( className, element );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn element;\n}\n\nfunction getFromAttributeCreator<T extends DowncastAttributeElementCreatorFunction | DowncastAttributeCreatorFunction>( config: any ): T {\n\tif ( config.model.values ) {\n\t\treturn ( ( modelAttributeValue: any, conversionApi: DowncastConversionApi, data: any ) => {\n\t\t\tconst view = config.view[ modelAttributeValue ];\n\n\t\t\tif ( view ) {\n\t\t\t\treturn view( modelAttributeValue, conversionApi, data );\n\t\t\t}\n\n\t\t\treturn null;\n\t\t} ) as any;\n\t} else {\n\t\treturn config.view;\n\t}\n}\n\n/**\n * Takes the configuration, adds default parameters if they do not exist and normalizes other parameters to be used in downcast converters\n * for generating a view attribute.\n *\n * @param view View configuration.\n */\nfunction normalizeToAttributeConfig( view: any ): DowncastAttributeCreatorFunction {\n\tif ( typeof view == 'string' ) {\n\t\treturn modelAttributeValue => ( { key: view, value: modelAttributeValue as string } );\n\t} else if ( typeof view == 'object' ) {\n\t\t// { key, value, ... }\n\t\tif ( view.value ) {\n\t\t\treturn () => view;\n\t\t}\n\t\t// { key, ... }\n\t\telse {\n\t\t\treturn modelAttributeValue => ( { key: view.key, value: modelAttributeValue as string } );\n\t\t}\n\t} else {\n\t\t// function.\n\t\treturn view;\n\t}\n}\n\n/**\n * Helper function for `highlight`. Prepares the actual descriptor object using value passed to the converter.\n */\nfunction prepareDescriptor(\n\thighlightDescriptor: DowncastHighlightDescriptor | DowncastHighlightDescriptorCreatorFunction,\n\tdata: {\n\t\tmarkerName: string;\n\t\tmarkerRange: ModelRange;\n\t},\n\tconversionApi: DowncastConversionApi\n): DowncastHighlightDescriptor | null {\n\t// If passed descriptor is a creator function, call it. If not, just use passed value.\n\tconst descriptor = typeof highlightDescriptor == 'function' ?\n\t\thighlightDescriptor( data, conversionApi ) :\n\t\t{ ...highlightDescriptor };\n\n\tif ( !descriptor ) {\n\t\treturn null;\n\t}\n\n\t// Apply default descriptor priority.\n\tif ( !descriptor.priority ) {\n\t\tdescriptor.priority = 10;\n\t}\n\n\t// Default descriptor id is marker name.\n\tif ( !descriptor.id ) {\n\t\tdescriptor.id = data.markerName;\n\t}\n\n\treturn descriptor;\n}\n\n/**\n * Creates a function that checks a single differ diff item whether it should trigger reconversion.\n *\n * @param model A normalized `config.model` converter configuration.\n * @param model.name The name of element.\n * @param model.attributes The list of attribute names that should trigger reconversion.\n * @param model.children Whether the child list change should trigger reconversion.\n */\nfunction createChangeReducerCallback( model: NormalizedModelElementConfig ) {\n\treturn ( node: ModelNode, change: DifferItem | DifferItemReinsert ): boolean => {\n\t\tif ( !node.is( 'element', model.name ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( change.type == 'attribute' ) {\n\t\t\tif ( model.attributes.includes( change.attributeKey ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\t/* v8 ignore else: This is always true because otherwise it would not register a reducer callback. -- @preserve */\n\t\t\tif ( model.children ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n}\n\n/**\n * Creates a `reduceChanges` event handler for reconversion.\n *\n * @param model A normalized `config.model` converter configuration.\n * @param model.name The name of element.\n * @param model.attributes The list of attribute names that should trigger reconversion.\n * @param model.children Whether the child list change should trigger reconversion.\n */\nfunction createChangeReducer( model: NormalizedModelElementConfig ) {\n\tconst shouldReplace = createChangeReducerCallback( model );\n\n\treturn (\n\t\tevt: unknown,\n\t\tdata: {\n\t\t\tchanges: Iterable<DifferItem | DifferItemReinsert>;\n\t\t\treconvertedElements?: Set<ModelNode>;\n\t\t\trefreshedItems: Set<ModelItem>;\n\t\t}\n\t) => {\n\t\tconst reducedChanges: Array<DifferItem | DifferItemReinsert> = [];\n\n\t\tif ( !data.reconvertedElements ) {\n\t\t\tdata.reconvertedElements = new Set();\n\t\t}\n\n\t\tfor ( const change of data.changes ) {\n\t\t\t// For attribute use node affected by the change.\n\t\t\t// For insert or remove use parent element because we need to check if it's added/removed child.\n\t\t\tconst node = change.type == 'attribute' ? change.range.start.nodeAfter : change.position.parent as ModelNode;\n\n\t\t\tif ( !node || !shouldReplace( node, change ) || change.type == 'reinsert' ) {\n\t\t\t\treducedChanges.push( change );\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Force to not-reuse view elements renamed in model.\n\t\t\tif ( change.type == 'insert' && change.action == 'rename' ) {\n\t\t\t\tdata.refreshedItems.add( change.position.nodeAfter! );\n\t\t\t}\n\n\t\t\t// If it's already marked for reconversion, so skip this change, otherwise add the diff items.\n\t\t\tif ( !data.reconvertedElements.has( node ) ) {\n\t\t\t\tdata.reconvertedElements.add( node );\n\n\t\t\t\tconst position = ModelPosition._createBefore( node );\n\t\t\t\tlet changeIndex = reducedChanges.length;\n\n\t\t\t\t// We need to insert remove+reinsert before any other change on and inside the re-converted element.\n\t\t\t\t// This is important because otherwise we would remove element that had already been modified by the previous change.\n\t\t\t\t// Note that there could be some element removed before the re-converted element, so we must not break this behavior.\n\t\t\t\tfor ( let i = reducedChanges.length - 1; i >= 0; i-- ) {\n\t\t\t\t\tconst change = reducedChanges[ i ];\n\t\t\t\t\tconst changePosition = change.type == 'attribute' ? change.range.start : change.position;\n\t\t\t\t\tconst positionRelation = changePosition.compareWith( position );\n\n\t\t\t\t\tif ( positionRelation == 'before' || change.type == 'remove' && positionRelation == 'same' ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tchangeIndex = i;\n\t\t\t\t}\n\n\t\t\t\treducedChanges.splice( changeIndex, 0, {\n\t\t\t\t\ttype: 'reinsert',\n\t\t\t\t\tname: ( node as ModelElement ).name,\n\t\t\t\t\tposition,\n\t\t\t\t\tlength: 1\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tdata.changes = reducedChanges;\n\t};\n}\n\n/**\n * Creates a function that checks if an element and its watched attributes can be consumed and consumes them.\n *\n * @param model A normalized `config.model` converter configuration.\n * @param model.name The name of element.\n * @param model.attributes The list of attribute names that should trigger reconversion.\n * @param model.children Whether the child list change should trigger reconversion.\n */\nfunction createConsumer( model: NormalizedModelElementConfig ): ConsumerFunction {\n\treturn ( node, consumable, options = {} ) => {\n\t\tconst events = [ 'insert' ];\n\n\t\t// Collect all set attributes that are triggering conversion.\n\t\tfor ( const attributeName of model.attributes ) {\n\t\t\tif ( node.hasAttribute( attributeName ) ) {\n\t\t\t\tevents.push( `attribute:${ attributeName }` );\n\t\t\t}\n\t\t}\n\n\t\tif ( !events.every( event => consumable.test( node, event ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !options.preflight ) {\n\t\t\tevents.forEach( event => consumable.consume( node, event ) );\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\n/**\n * Creates a function that creates view slots.\n *\n * @returns Function exposed by the writer as `createSlot()`.\n */\nfunction createSlotFactory( element: ModelElement, slotsMap: Map<ViewElement, Array<ModelNode>>, conversionApi: DowncastConversionApi ) {\n\treturn ( writer: ViewDowncastWriter, modeOrFilter: 'children' | DowncastSlotFilter ) => {\n\t\tconst slot = writer.createContainerElement( '$slot' );\n\n\t\tlet children: Array<ModelNode> | null;\n\n\t\tif ( modeOrFilter === 'children' ) {\n\t\t\tchildren = Array.from( element.getChildren() );\n\t\t} else if ( typeof modeOrFilter == 'function' ) {\n\t\t\tchildren = Array.from( element.getChildren() ).filter( element => modeOrFilter( element ) );\n\t\t} else {\n\t\t\t/**\n\t\t\t * Unknown slot mode was provided to `writer.createSlot()` in the downcast converter.\n\t\t\t *\n\t\t\t * @error conversion-slot-mode-unknown\n\t\t\t * @param {never} modeOrFilter The specified mode or filter.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-slot-mode-unknown', conversionApi.dispatcher, { modeOrFilter } );\n\t\t}\n\n\t\tslotsMap.set( slot, children );\n\n\t\treturn slot;\n\t};\n}\n\n/**\n * Checks if all children are covered by slots and there is no child that landed in multiple slots.\n */\nfunction validateSlotsChildren(\n\telement: ModelElement,\n\tslotsMap: Map<ViewElement, Array<ModelNode>>,\n\tconversionApi: DowncastConversionApi\n) {\n\tconst childrenInSlots = Array.from( slotsMap.values() ).flat();\n\tconst uniqueChildrenInSlots = new Set( childrenInSlots );\n\n\tif ( uniqueChildrenInSlots.size != childrenInSlots.length ) {\n\t\t/**\n\t\t * Filters provided to `writer.createSlot()` overlap (at least two filters accept the same child element).\n\t\t *\n\t\t * @error conversion-slot-filter-overlap\n\t\t * @param {module:engine/model/element~ModelElement} element The element of which children would not be properly\n\t\t * allocated to multiple slots.\n\t\t */\n\t\tthrow new CKEditorError( 'conversion-slot-filter-overlap', conversionApi.dispatcher, { element } );\n\t}\n\n\tif ( uniqueChildrenInSlots.size != element.childCount ) {\n\t\t/**\n\t\t * Filters provided to `writer.createSlot()` are incomplete and exclude at least one children element (one of\n\t\t * the children elements would not be assigned to any of the slots).\n\t\t *\n\t\t * @error conversion-slot-filter-incomplete\n\t\t * @param {module:engine/model/element~ModelElement} element The element of which children would not be properly\n\t\t * allocated to multiple slots.\n\t\t */\n\t\tthrow new CKEditorError( 'conversion-slot-filter-incomplete', conversionApi.dispatcher, { element } );\n\t}\n}\n\n/**\n * Fill slots with appropriate view elements.\n */\nfunction fillSlots(\n\tviewElement: ViewElement,\n\tslotsMap: Map<ViewElement, Array<ModelNode>>,\n\tconversionApi: DowncastConversionApi,\n\toptions: { reconversion?: boolean }\n): void {\n\t// Set temporary position mapping to redirect child view elements into a proper slots.\n\tconversionApi.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', toViewPositionMapping, { priority: 'highest' } );\n\n\tlet currentSlot: ViewElement | null = null;\n\tlet currentSlotNodes: Array<ModelNode> | null = null;\n\n\t// Fill slots with nested view nodes.\n\tfor ( [ currentSlot, currentSlotNodes ] of slotsMap ) {\n\t\treinsertOrConvertNodes( viewElement, currentSlotNodes, conversionApi, options );\n\n\t\tconversionApi.writer.setCustomProperty( '$structureSlotParent', true, currentSlot!.parent! );\n\t\tconversionApi.writer.move(\n\t\t\tconversionApi.writer.createRangeIn( currentSlot ),\n\t\t\tconversionApi.writer.createPositionBefore( currentSlot )\n\t\t);\n\t\tconversionApi.writer.remove( currentSlot );\n\t}\n\n\tconversionApi.mapper.off( 'modelToViewPosition', toViewPositionMapping );\n\n\tfunction toViewPositionMapping( evt: unknown, data: {\n\t\tmapper: Mapper;\n\t\tmodelPosition: ModelPosition;\n\t\tviewPosition?: ViewPosition;\n\t\tisPhantom?: boolean;\n\t} ) {\n\t\tconst element = data.modelPosition.nodeAfter!;\n\n\t\t// Find the proper offset within the slot.\n\t\tconst index = currentSlotNodes!.indexOf( element );\n\n\t\tif ( index < 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdata.viewPosition = data.mapper.findPositionIn( currentSlot!, index );\n\t}\n}\n\n/**\n * Inserts view representation of `nodes` into the `viewElement` either by bringing back just removed view nodes\n * or by triggering conversion for them.\n */\nfunction reinsertOrConvertNodes(\n\tviewElement: ViewElement,\n\tmodelNodes: Iterable<ModelNode>,\n\tconversionApi: DowncastConversionApi,\n\toptions: { reconversion?: boolean }\n) {\n\t// Fill with nested view nodes.\n\tfor ( const modelChildNode of modelNodes ) {\n\t\t// Try reinserting the view node for the specified model node...\n\t\tif ( !reinsertNode( viewElement.root, modelChildNode, conversionApi, options ) ) {\n\t\t\t// ...or else convert the model element to the view.\n\t\t\tconversionApi.convertItem( modelChildNode );\n\t\t}\n\t}\n}\n\n/**\n * Checks if the view for the given model element could be reused and reinserts it to the view.\n *\n * @returns `false` if view element can't be reused.\n */\nfunction reinsertNode(\n\tviewRoot: ViewElement | ViewDocumentFragment,\n\tmodelNode: ModelNode,\n\tconversionApi: DowncastConversionApi,\n\toptions: { reconversion?: boolean }\n): boolean {\n\tconst { writer, mapper } = conversionApi;\n\n\t// Don't reinsert if this is not a reconversion...\n\tif ( !options.reconversion ) {\n\t\treturn false;\n\t}\n\n\tconst viewChildNode = mapper.toViewElement( modelNode as ModelElement );\n\n\t// ...or there is no view to reinsert or it was already inserted to the view structure...\n\tif ( !viewChildNode || viewChildNode.root == viewRoot ) {\n\t\treturn false;\n\t}\n\n\t// ...or it was strictly marked as not to be reused.\n\tif ( !conversionApi.canReuseView( viewChildNode ) ) {\n\t\treturn false;\n\t}\n\n\t// Otherwise reinsert the view node.\n\twriter.move(\n\t\twriter.createRangeOn( viewChildNode ),\n\t\tmapper.toViewPosition( ModelPosition._createBefore( modelNode ) )\n\t);\n\n\treturn true;\n}\n\n/**\n * The default consumer for insert events.\n *\n * @param item Model item.\n * @param consumable The model consumable.\n * @param options.preflight Whether should consume or just check if can be consumed.\n */\nfunction defaultConsumer(\n\titem: ModelItem,\n\tconsumable: ModelConsumable,\n\t{ preflight }: { preflight?: boolean } = {}\n): boolean | null {\n\tif ( preflight ) {\n\t\treturn consumable.test( item, 'insert' );\n\t} else {\n\t\treturn consumable.consume( item, 'insert' );\n\t}\n}\n\n/**\n * An object describing how the marker highlight should be represented in the view.\n *\n * Each text node contained in a highlighted range will be wrapped in a `<span>`\n * {@link module:engine/view/attributeelement~ViewAttributeElement view attribute element} with CSS class(es), attributes and a priority\n * described by this object.\n *\n * Additionally, each {@link module:engine/view/containerelement~ViewContainerElement container element} can handle displaying the highlight\n * separately by providing the `addHighlight` and `removeHighlight` custom properties. In this case:\n *\n *  * The `DowncastHighlightDescriptor` object is passed to the `addHighlight` function upon conversion and\n *  should be used to apply the highlight to the element.\n *  * The descriptor `id` is passed to the `removeHighlight` function upon conversion and should be used to remove the highlight with the\n *  given ID from the element.\n */\nexport interface DowncastHighlightDescriptor {\n\n\t/**\n\t * A CSS class or an array of classes to set. If the descriptor is used to\n\t * create an {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} over text nodes,\n\t * these classes will be set on that attribute element. If the descriptor is applied to an element, usually these\n\t * classes will be set on that element, however, this depends on how the element converts the descriptor.\n\t */\n\tclasses: string | Array<string>;\n\n\t/**\n\t * Descriptor identifier. If not provided, it defaults to the converted marker's name.\n\t */\n\tid?: string;\n\n\t/**\n\t * Descriptor priority. If not provided, it defaults to `10`. If the descriptor is used to create\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement attribute element}, it will be that element's\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement#priority priority}. If the descriptor is applied to an element,\n\t * the priority will be used to determine which descriptor is more important.\n\t */\n\tpriority?: number;\n\n\t/**\n\t * Attributes to set. If the descriptor is used to create\n\t * an {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} over text nodes, these attributes will be set\n\t * on that attribute element. If the descriptor is applied to an element, usually these attributes will be set on that element, however,\n\t * this depends on how the element converts the descriptor.\n\t */\n\tattributes?: Record<string, string>;\n}\n\n/**\n * A filtering function used to choose model child nodes to be downcasted into the specific view\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createSlot \"slot\"} while executing the\n * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure `elementToStructure()`} converter.\n *\n * @callback module:engine/conversion/downcasthelpers~DowncastSlotFilter\n *\n * @param node A model node.\n * @returns Whether the provided model node should be downcasted into this slot.\n *\n * @see module:engine/view/downcastwriter~ViewDowncastWriter#createSlot\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n * @see module:engine/conversion/downcasthelpers~insertStructure\n */\nexport type DowncastSlotFilter = ( node: ModelNode ) => boolean;\n\n/**\n * A view element creator function that takes the model element and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi\n * downcast conversion API} as parameters and returns a view container element.\n *\n * @callback module:engine/conversion/downcasthelpers~DowncastElementCreatorFunction\n *\n * @param element The model element to be converted to the view structure.\n * @param conversionApi The conversion interface.\n * @param data Additional information about the change (same as for\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`} event).\n * @param data.item Inserted item.\n * @param data.range Range spanning over inserted item.\n * @returns The view element.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement\n * @see module:engine/conversion/downcasthelpers~insertElement\n */\nexport type DowncastElementCreatorFunction = (\n\telement: ModelElement,\n\tconversionApi: DowncastConversionApi,\n\tdata: {\n\t\titem: ModelItem;\n\t\trange: ModelRange;\n\t}\n) => ViewElement | null;\n\n/**\n * A function that takes the model element and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast\n * conversion API} as parameters and returns a view container element with slots for model child nodes to be converted into.\n *\n * @callback module:engine/conversion/downcasthelpers~DowncastStructureCreatorFunction\n *\n * @param element The model element to be converted to the view structure.\n * @param conversionApi The conversion interface.\n * @param data Additional information about the change (same as for\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`} event).\n * @param data.item Inserted item.\n * @param data.range Range spanning over inserted item.\n * @returns The view structure with slots for model child nodes.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n * @see module:engine/conversion/downcasthelpers~insertStructure\n */\nexport type DowncastStructureCreatorFunction = DowncastElementCreatorFunction;\n\n/**\n * A view element creator function that takes the model attribute value and\n * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters and returns a view\n * attribute element.\n *\n * @callback module:engine/conversion/downcasthelpers~DowncastAttributeElementCreatorFunction\n *\n * @param attributeValue The model attribute value to be converted to the view attribute element.\n * @param conversionApi The conversion interface.\n * @param data Additional information about the change (same as for\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`} event).\n * @param data.item Changed item or converted selection.\n * @param data.range Range spanning over changed item or selection range.\n * @param data.attributeKey Attribute key.\n * @param data.attributeOldValue Attribute value before the change. This is `null` when selection attribute is converted.\n * @param data.attributeNewValue New attribute value.\n * @returns The view attribute element.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement\n * @see module:engine/conversion/downcasthelpers~wrap\n */\nexport type DowncastAttributeElementCreatorFunction = (\n\tattributeValue: any,\n\tconversionApi: DowncastConversionApi,\n\tdata: {\n\t\titem: ModelItem | ModelSelection | ModelDocumentSelection;\n\t\trange: ModelRange;\n\t\tattributeKey: string;\n\t\tattributeOldValue: unknown;\n\t\tattributeNewValue: unknown;\n\t}\n) => ViewAttributeElement | null;\n\n/**\n * A function that takes the model attribute value and\n * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n * as parameters.\n *\n * @callback module:engine/conversion/downcasthelpers~DowncastAttributeCreatorFunction\n *\n * @param attributeValue The model attribute value to be converted to the view attribute element.\n * @param conversionApi The conversion interface.\n * @param data Additional information about the change (same as for\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`} event).\n * @param data.item Changed item or converted selection.\n * @param data.range Range spanning over changed item or selection range.\n * @param data.attributeKey Attribute key.\n * @param data.attributeOldValue Attribute value before the change. This is `null` when selection attribute is converted.\n * @param data.attributeNewValue New attribute value.\n * @returns A `{ key, value }` object. If `key` is `'class'`, `value` can be a `String` or an\n * array of `String`s. If `key` is `'style'`, `value` is an object with key-value pairs. In other cases, `value` is a `String`.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToAttribute\n */\nexport type DowncastAttributeCreatorFunction = (\n\tattributeValue: unknown,\n\tconversionApi: DowncastConversionApi,\n\tdata: {\n\t\titem: ModelItem;\n\t\trange: ModelRange;\n\t\tattributeKey: string;\n\t\tattributeOldValue: unknown;\n\t\tattributeNewValue: unknown;\n\t}\n) => DowncastAttributeDescriptor | null;\n\nexport type DowncastAttributeDescriptor = {\n\tkey: 'class';\n\tvalue: string | Array<string>;\n} | {\n\tkey: 'style';\n\tvalue: Record<string, string>;\n} | {\n\tkey: Exclude<string, 'class' | 'style'>;\n\tvalue: string;\n};\n\nexport type DowncastMarkerElementCreatorFunction = (\n\tdata: {\n\t\tmarkerRange: ModelRange;\n\t\tmarkerName: string;\n\t\tisOpening?: boolean;\n\t},\n\tconversionApi: DowncastConversionApi\n) => ViewUIElement | null;\n\nexport type DowncastHighlightDescriptorCreatorFunction = (\n\tdata: {\n\t\tmarkerRange: ModelRange;\n\t\tmarkerName: string;\n\t},\n\tconversionApi: DowncastConversionApi\n) => DowncastHighlightDescriptor | null;\n\nexport type DowncastAddHighlightCallback = (\n\tviewElement: ViewElement,\n\tdescriptor: DowncastHighlightDescriptor,\n\twriter: ViewDowncastWriter\n) => void;\n\nexport type DowncastRemoveHighlightCallback = (\n\tviewElement: ViewElement,\n\tid: string,\n\twriter: ViewDowncastWriter\n) => void;\n\nexport type DowncastMarkerDataCreatorFunction = (\n\tmarkerName: string,\n\tconversionApi: DowncastConversionApi\n) => { name: string; group: string } | null;\n\n/**\n * A function that is expected to consume all the consumables that were used by the element creator.\n *\n * @callback module:engine/conversion/downcasthelpers~ConsumerFunction\n *\n * @internal\n * @param element The model element to be converted to the view structure.\n * @param consumable The `ModelConsumable` same as in\n * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#consumable `DowncastConversionApi.consumable`}.\n * @param options.preflight Whether should consume or just check if can be consumed.\n * @returns `true` if all consumable values were available and were consumed, `false` otherwise.\n *\n * @see module:engine/conversion/downcasthelpers~insertStructure\n */\nexport type ConsumerFunction = (\n\telement: ModelElement,\n\tconsumable: ModelConsumable,\n\toptions?: { preflight?: boolean }\n) => boolean | null;\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/**\n * @module engine/model/utils/autoparagraphing\n */\n\nimport { type ModelNode } from '../node.js';\nimport { type ModelPosition } from '../position.js';\nimport { type ModelSchema } from '../schema.js';\nimport { type ModelWriter } from '../writer.js';\n\n/**\n * Fixes all empty roots.\n *\n * @internal\n * @param writer The model writer.\n * @returns `true` if any change has been applied, `false` otherwise.\n */\nexport function autoParagraphEmptyRoots( writer: ModelWriter ): boolean {\n\tconst { schema, document } = writer.model;\n\n\tfor ( const root of document.getRoots() ) {\n\t\tif ( root.isEmpty && !schema.checkChild( root, '$text' ) ) {\n\t\t\t// If paragraph element is allowed in the root, create paragraph element.\n\t\t\tif ( schema.checkChild( root, 'paragraph' ) ) {\n\t\t\t\twriter.insertElement( 'paragraph', root );\n\n\t\t\t\t// Other roots will get fixed in the next post-fixer round. Those will be triggered\n\t\t\t\t// in the same batch no matter if this method was triggered by the post-fixing or not\n\t\t\t\t// (the above insertElement call will trigger the post-fixers).\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Checks if the given node wrapped with a paragraph would be accepted by the schema in the given position.\n *\n * @internal\n * @param position The position at which to check.\n * @param nodeOrType The child node or child type to check.\n * @param schema A schema instance used for element validation.\n */\nexport function isParagraphable(\n\tposition: ModelPosition,\n\tnodeOrType: ModelNode | string,\n\tschema: ModelSchema\n): boolean {\n\tconst context = schema.createContext( position );\n\n\t// When paragraph is allowed in this context...\n\tif ( !schema.checkChild( context, 'paragraph' ) ) {\n\t\treturn false;\n\t}\n\n\t// And a node would be allowed in this paragraph...\n\tif ( !schema.checkChild( context.push( 'paragraph' ), nodeOrType ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Inserts a new paragraph at the given position and returns a position inside that paragraph.\n *\n * @internal\n * @param position The position where a paragraph should be inserted.\n * @param writer The model writer.\n * @returns  Position inside the created paragraph.\n */\nexport function wrapInParagraph( position: ModelPosition, writer: ModelWriter ): ModelPosition {\n\tconst paragraph = writer.createElement( 'paragraph' );\n\n\twriter.insert( paragraph, position );\n\n\treturn writer.createPositionAt( paragraph, 0 );\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/**\n * Contains the {@link module:engine/view/view view} to {@link module:engine/model/model model} converters for\n * {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}.\n *\n * @module engine/conversion/upcasthelpers\n */\n\nimport { Matcher, type MatchClassPatterns, type MatcherPattern, type MatchPropertyPatterns } from '../view/matcher.js';\nimport { ConversionHelpers } from './conversionhelpers.js';\n\nimport type { UpcastDispatcher, UpcastElementEvent, UpcastConversionApi, UpcastConversionData } from './upcastdispatcher.js';\nimport { type ModelElement } from '../model/element.js';\nimport { type ModelRange } from '../model/range.js';\nimport { type ModelPosition } from '../model/position.js';\nimport type { ViewDocumentFragment, ViewElement, ViewText } from '../index.js';\nimport { type Mapper } from './mapper.js';\nimport { type Model } from '../model/model.js';\nimport { type ViewSelection } from '../view/selection.js';\nimport { type ViewDocumentSelection } from '../view/documentselection.js';\nimport { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing.js';\n\nimport { priorities, type EventInfo, type PriorityString } from '@ckeditor/ckeditor5-utils';\n\nimport { cloneDeep } from 'es-toolkit/compat';\n\n/**\n * Upcast conversion helper functions.\n *\n * Learn more about {@glink framework/deep-dive/conversion/upcast upcast helpers}.\n *\n * @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n */\nexport class UpcastHelpers extends ConversionHelpers<UpcastDispatcher> {\n\t/**\n\t * View element to model element conversion helper.\n\t *\n\t * This conversion results in creating a model element. For example,\n\t * view `<p>Foo</p>` becomes `<paragraph>Foo</paragraph>` in the model.\n\t *\n\t * Keep in mind that the element will be inserted only if it is allowed\n\t * by {@link module:engine/model/schema~ModelSchema schema} configuration.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: 'p',\n\t * \tmodel: 'paragraph'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: 'p',\n\t * \tmodel: 'paragraph',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'fancy'\n\t * \t},\n\t * \tmodel: 'fancyParagraph'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'heading'\n\t * \t},\n\t * \tmodel: ( viewElement, conversionApi ) => {\n\t * \t\tconst modelWriter = conversionApi.writer;\n\t *\n\t * \t\treturn modelWriter.createElement( 'heading', { level: viewElement.getAttribute( 'data-level' ) } );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Pattern matching all view elements which should be converted. If not set, the converter\n\t * will fire for every view element.\n\t * @param config.model Name of the model element, a model element instance or a function that takes a view element\n\t * and {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API}\n\t * and returns a model element. The model element will be inserted in the model.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic elementToElement( config: {\n\t\tview: MatcherPattern;\n\t\tmodel: string | UpcastElementCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( upcastElementToElement( config ) );\n\t}\n\n\t/**\n\t * View element to model attribute conversion helper.\n\t *\n\t * This conversion results in setting an attribute on a model node. For example, view `<strong>Foo</strong>` becomes\n\t * `Foo` {@link module:engine/model/text~ModelText model text node} with `bold` attribute set to `true`.\n\t *\n\t * This helper is meant to set a model attribute on all the elements that are inside the converted element:\n\t *\n\t * ```\n\t * <strong>Foo</strong>   -->   <strong><p>Foo</p></strong>   -->   <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t * ```\n\t *\n\t * Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t * Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text. See\n\t * {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute} for comparison.\n\t *\n\t * Keep in mind that the attribute will be set only if it is allowed by\n\t * {@link module:engine/model/schema~ModelSchema schema} configuration.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: 'strong',\n\t * \tmodel: 'bold'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: 'strong',\n\t * \tmodel: 'bold',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: 'bold'\n\t * \t},\n\t * \tmodel: 'bold'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: [ 'styled', 'styled-dark' ]\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'styled',\n\t * \t\tvalue: 'dark'\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tstyles: {\n\t * \t\t\t'font-size': /[\\s\\S]+/\n\t * \t\t}\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'fontSize',\n\t * \t\tvalue: ( viewElement, conversionApi ) => {\n\t * \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t * \t\t\tconst value = fontSize.substr( 0, fontSize.length - 2 );\n\t *\n\t * \t\t\tif ( value <= 10 ) {\n\t * \t\t\t\treturn 'small';\n\t * \t\t\t} else if ( value > 12 ) {\n\t * \t\t\t\treturn 'big';\n\t * \t\t\t}\n\t *\n\t * \t\t\treturn null;\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Pattern matching all view elements which should be converted.\n\t * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n\t * the model attribute. `value` property may be set as a function that takes a view element and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t * If `String` is given, the model attribute value will be set to `true`.\n\t * @param config.converterPriority Converter priority. Defaults to `low`.\n\t */\n\tpublic elementToAttribute( config: {\n\t\tview: MatcherPattern;\n\t\tmodel: string | {\n\t\t\tkey: string;\n\t\t\tvalue?: unknown;\n\t\t};\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( upcastElementToAttribute( config ) );\n\t}\n\n\t/**\n\t * View attribute to model attribute conversion helper.\n\t *\n\t * This conversion results in setting an attribute on a model node. For example, view `<img src=\"foo.jpg\"></img>` becomes\n\t * `<imageBlock source=\"foo.jpg\"></imageBlock>` in the model.\n\t *\n\t * This helper is meant to convert view attributes from view elements which got converted to the model, so the view attribute\n\t * is set only on the corresponding model node:\n\t *\n\t * ```\n\t * <div class=\"dark\"><div>foo</div></div>    -->    <div dark=\"true\"><div>foo</div></div>\n\t * ```\n\t *\n\t * Above, `class=\"dark\"` attribute is added only to the `<div>` elements that has it. This is in contrast to\n\t * {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute} which sets attributes for\n\t * all the children in the model:\n\t *\n\t * ```\n\t * <strong>Foo</strong>   -->   <strong><p>Foo</p></strong>   -->   <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t * ```\n\t *\n\t * Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t * Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text.\n\t *\n\t * Keep in mind that the attribute will be set only if it is allowed by\n\t * {@link module:engine/model/schema~ModelSchema schema} configuration.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: 'src',\n\t * \tmodel: 'source'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: { key: 'src' },\n\t * \tmodel: 'source'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: { key: 'src' },\n\t * \tmodel: 'source',\n\t * \tconverterPriority: 'normal'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tkey: 'data-style',\n\t * \t\tvalue: /[\\s\\S]+/\n\t * \t},\n\t * \tmodel: 'styled'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'img',\n\t * \t\tkey: 'class',\n\t * \t\tvalue: 'styled-dark'\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'styled',\n\t * \t\tvalue: 'dark'\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tkey: 'class',\n\t * \t\tvalue: /styled-[\\S]+/\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'styled'\n\t * \t\tvalue: ( viewElement, conversionApi ) => {\n\t * \t\t\tconst regexp = /styled-([\\S]+)/;\n\t * \t\t\tconst match = viewElement.getAttribute( 'class' ).match( regexp );\n\t *\n\t * \t\t\treturn match[ 1 ];\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Converting styles works a bit differently as it requires `view.styles` to be an object and by default\n\t * a model attribute will be set to `true` by such a converter. You can set the model attribute to any value by providing the `value`\n\t * callback that returns the desired value.\n\t *\n\t * ```ts\n\t * // Default conversion of font-weight style will result in setting bold attribute to true.\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tstyles: {\n\t * \t\t\t'font-weight': 'bold'\n\t * \t\t}\n\t * \t},\n\t * \tmodel: 'bold'\n\t * } );\n\t *\n\t * // This converter will pass any style value to the `lineHeight` model attribute.\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tstyles: {\n\t * \t\t\t'line-height': /[\\s\\S]+/\n\t * \t\t}\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'lineHeight',\n\t * \t\tvalue: ( viewElement, conversionApi ) => viewElement.getStyle( 'line-height' )\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Specifies which view attribute will be converted. If a `String` is passed,\n\t * attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n\t * specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n\t * property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n\t * a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n\t * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n\t * the model attribute. `value` property may be set as a function that takes a view element and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t * If `String` is given, the model attribute value will be same as view attribute value.\n\t * @param config.converterPriority Converter priority. Defaults to `low`.\n\t */\n\tpublic attributeToAttribute( config: {\n\t\tview: string | {\n\t\t\tkey: string;\n\t\t\tvalue?: string | RegExp | Array<string> | Record<string, string> | Record<string, RegExp> | ( ( value: unknown ) => boolean );\n\t\t\tname?: string;\n\t\t} | {\n\t\t\tname?: string | RegExp;\n\t\t\tstyles?: MatchPropertyPatterns;\n\t\t\tclasses?: MatchClassPatterns;\n\t\t\tattributes?: MatchPropertyPatterns;\n\t\t};\n\t\tmodel: string | {\n\t\t\tkey: string;\n\t\t\tvalue: unknown |\n\t\t\t\t( ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => unknown );\n\t\t};\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( upcastAttributeToAttribute( config ) );\n\t}\n\n\t/**\n\t * View element to model marker conversion helper.\n\t *\n\t * This conversion results in creating a model marker. For example, if the marker was stored in a view as an element:\n\t * `<p>Fo<span data-marker=\"comment\" data-comment-id=\"7\"></span>o</p><p>B<span data-marker=\"comment\" data-comment-id=\"7\"></span>ar</p>`,\n\t * after the conversion is done, the marker will be available in\n\t * {@link module:engine/model/model~Model#markers model document markers}.\n\t *\n\t * **Note**: When this helper is used in the data upcast in combination with\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} in the data downcast,\n\t * then invalid HTML code (e.g. a span between table cells) may be produced by the latter converter.\n\t *\n\t * In most of the cases, the {@link #dataToMarker} should be used instead.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: 'marker-search',\n\t * \tmodel: 'search'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: 'marker-search',\n\t * \tmodel: 'search',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: 'marker-search',\n\t * \tmodel: ( viewElement, conversionApi ) => 'comment:' + viewElement.getAttribute( 'data-comment-id' )\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tattributes: {\n\t * \t\t\t'data-marker': 'search'\n\t * \t\t}\n\t * \t},\n\t * \tmodel: 'search'\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Pattern matching all view elements which should be converted.\n\t * @param config.model Name of the model marker, or a function that takes a view element and returns\n\t * a model marker name.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic elementToMarker( config: {\n\t\tview: MatcherPattern;\n\t\tmodel: string | UpcastMarkerFromElementCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( upcastElementToMarker( config ) );\n\t}\n\n\t/**\n\t * View-to-model marker conversion helper.\n\t *\n\t * Converts view data created by {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`}\n\t * back to a model marker.\n\t *\n\t * This converter looks for specific view elements and view attributes that mark marker boundaries. See\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} to learn what view data\n\t * is expected by this converter.\n\t *\n\t * The `config.view` property is equal to the marker group name to convert.\n\t *\n\t * By default, this converter creates markers with the `group:name` name convention (to match the default `markerToData` conversion).\n\t *\n\t * The conversion configuration can take a function that will generate a marker name.\n\t * If such function is set as the `config.model` parameter, it is passed the `name` part from the view element or attribute and it is\n\t * expected to return a string with the marker name.\n\t *\n\t * Basic usage:\n\t *\n\t * ```ts\n\t * // Using the default conversion.\n\t * // In this case, all markers from the `comment` group will be converted.\n\t * // The conversion will look for `<comment-start>` and `<comment-end>` tags and\n\t * // `data-comment-start-before`, `data-comment-start-after`,\n\t * // `data-comment-end-before` and `data-comment-end-after` attributes.\n\t * editor.conversion.for( 'upcast' ).dataToMarker( {\n\t * \tview: 'comment'\n\t * } );\n\t * ```\n\t *\n\t * An example of a model that may be generated by this conversion:\n\t *\n\t * ```\n\t * // View:\n\t * <p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t * <figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t *\n\t * // Model:\n\t * <paragraph>Foo[bar</paragraph>\n\t * <imageBlock src=\"abc.jpg\"></imageBlock>]\n\t * ```\n\t *\n\t * Where `[]` are boundaries of a marker that will receive the `comment:commentId:uid` name.\n\t *\n\t * Other examples of usage:\n\t *\n\t * ```ts\n\t * // Using a custom function which is the same as the default conversion:\n\t * editor.conversion.for( 'upcast' ).dataToMarker( {\n\t * \tview: 'comment',\n\t * \tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t * } );\n\t *\n\t * // Using the converter priority:\n\t * editor.conversion.for( 'upcast' ).dataToMarker( {\n\t * \tview: 'comment',\n\t * \tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t * \tconverterPriority: 'high'\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view The marker group name to convert.\n\t * @param config.model A function that takes the `name` part from the view element or attribute and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the marker name.\n\t * @param config.converterPriority Converter priority.\n\t */\n\tpublic dataToMarker( config: {\n\t\tview: string;\n\t\tmodel?: UpcastMarkerFromAttributeCreatorFunction;\n\t\tconverterPriority?: PriorityString;\n\t} ): this {\n\t\treturn this.add( upcastDataToMarker( config ) );\n\t}\n}\n\n/**\n * Function factory, creates a converter that converts\n * {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment}\n * or all children of {@link module:engine/view/element~ViewElement} into\n * {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment}.\n * This is the \"entry-point\" converter for upcast (view to model conversion). This converter starts the conversion of all children\n * of passed view document fragment. Those children {@link module:engine/view/node~ViewNode view nodes} are then\n * handled by other converters.\n *\n * This also a \"default\", last resort converter for all view elements that has not been converted by other converters.\n * When a view element is being converted to the model but it does not have converter specified, that view element\n * will be converted to {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment} and returned.\n *\n * @returns Universal converter for view {@link module:engine/view/documentfragment~ViewDocumentFragment fragments} and\n * {@link module:engine/view/element~ViewElement elements} that returns\n * {@link module:engine/model/documentfragment~ModelDocumentFragment model fragment} with children of converted view item.\n *\n * @internal\n */\nexport function convertToModelFragment() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewElement | ViewDocumentFragment>,\n\t\tconversionApi: UpcastConversionApi\n\t): void => {\n\t\t// Second argument in `consumable.consume` is discarded for ViewDocumentFragment but is needed for ViewElement.\n\t\tif ( !data.modelRange && conversionApi.consumable.consume( data.viewItem, { name: true } ) ) {\n\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\n\t\t\tdata.modelRange = modelRange;\n\t\t\tdata.modelCursor = modelCursor;\n\t\t}\n\t};\n}\n\n/**\n * Function factory, creates a converter that converts\n * {@link module:engine/view/text~ViewText} to {@link module:engine/model/text~ModelText}.\n *\n * @returns {@link module:engine/view/text~ViewText View text} converter.\n * @internal\n */\nexport function convertText() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewText>,\n\t\t{ schema, consumable, writer }: UpcastConversionApi\n\t): void => {\n\t\tlet position = data.modelCursor;\n\n\t\t// When node is already converted then do nothing.\n\t\tif ( !consumable.test( data.viewItem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !schema.checkChild( position, '$text' ) ) {\n\t\t\tif ( !isParagraphable( position, '$text', schema ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Do not auto-paragraph whitespaces.\n\t\t\tif ( data.viewItem.data.trim().length == 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tposition = wrapInParagraph( position, writer );\n\t\t}\n\n\t\tconsumable.consume( data.viewItem );\n\n\t\tconst text = writer.createText( data.viewItem.data );\n\n\t\twriter.insert( text, position );\n\n\t\tdata.modelRange = writer.createRange(\n\t\t\tposition,\n\t\t\tposition.getShiftedBy( text.offsetSize )\n\t\t);\n\t\tdata.modelCursor = data.modelRange.end;\n\t};\n}\n\n/**\n * Function factory, creates a callback function which converts a {@link module:engine/view/selection~ViewSelection\n * view selection} taken from the {@link module:engine/view/document~ViewDocument#event:selectionChange} event\n * and sets in on the {@link module:engine/model/document~ModelDocument#selection model}.\n *\n * **Note**: because there is no view selection change dispatcher nor any other advanced view selection to model\n * conversion mechanism, the callback should be set directly on view document.\n *\n * ```ts\n * view.document.on( 'selectionChange', convertSelectionChange( modelDocument, mapper ) );\n * ```\n *\n * @param model Data model.\n * @param mapper Conversion mapper.\n * @returns {@link module:engine/view/document~ViewDocument#event:selectionChange} callback function.\n * @internal\n */\nexport function convertSelectionChange( model: Model, mapper: Mapper ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: { newSelection: ViewSelection | ViewDocumentSelection }\n\t): void => {\n\t\tconst viewSelection = data.newSelection;\n\n\t\tconst ranges: Array<ModelRange> = [];\n\n\t\tfor ( const viewRange of viewSelection.getRanges() ) {\n\t\t\tranges.push( mapper.toModelRange( viewRange ) );\n\t\t}\n\n\t\tconst modelSelection = model.createSelection( ranges, { backward: viewSelection.isBackward } );\n\n\t\tif ( !modelSelection.isEqual( model.document.selection ) ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( modelSelection );\n\t\t\t} );\n\t\t}\n\t};\n}\n\n/**\n * View element to model element conversion helper.\n *\n * See {@link ~UpcastHelpers#elementToElement `.elementToElement()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Pattern matching all view elements which should be converted. If not\n * set, the converter will fire for every view element.\n * @param config.model Name of the model element, a model element\n * instance or a function that takes a view element and returns a model element. The model element will be inserted in the model.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */\nfunction upcastElementToElement( config: {\n\tview: MatcherPattern;\n\tmodel: string | UpcastElementCreatorFunction;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconfig = cloneDeep( config );\n\n\tconst converter = prepareToElementConverter( config );\n\n\tconst elementName = getViewElementNameFromConfig( config.view );\n\tconst eventName = elementName ? `element:${ elementName }` as const : 'element';\n\n\treturn ( dispatcher: UpcastDispatcher ) => {\n\t\tdispatcher.on<UpcastElementEvent>( eventName, converter, { priority: config.converterPriority || 'normal' } );\n\t};\n}\n\n/**\n * View element to model attribute conversion helper.\n *\n * See {@link ~UpcastHelpers#elementToAttribute `.elementToAttribute()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Pattern matching all view elements which should be converted.\n * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n * the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n * If `String` is given, the model attribute value will be set to `true`.\n * @param config.converterPriority Converter priority. Defaults to `low`.\n * @returns Conversion helper.\n */\nfunction upcastElementToAttribute( config: {\n\tview: MatcherPattern;\n\tmodel: string | {\n\t\tkey: string;\n\t\tvalue?: unknown | UpcastAttributeCreatorFunction;\n\t};\n\tconverterPriority?: PriorityString;\n} ) {\n\tconfig = cloneDeep( config );\n\n\tnormalizeModelAttributeConfig( config );\n\n\tconst converter = prepareToAttributeConverter( config as any, false );\n\n\tconst elementName = getViewElementNameFromConfig( config.view );\n\tconst eventName = elementName ? `element:${ elementName }` as const : 'element';\n\n\treturn ( dispatcher: UpcastDispatcher ) => {\n\t\tdispatcher.on<UpcastElementEvent>( eventName, converter, { priority: config.converterPriority || 'low' } );\n\t};\n}\n\n/**\n * View attribute to model attribute conversion helper.\n *\n * See {@link ~UpcastHelpers#attributeToAttribute `.attributeToAttribute()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Specifies which view attribute will be converted. If a `String` is passed,\n * attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n * specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n * property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n * a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n * the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n * If `String` is given, the model attribute value will be same as view attribute value.\n * @param config.converterPriority Converter priority. Defaults to `low`.\n * @returns Conversion helper.\n */\nfunction upcastAttributeToAttribute( config: {\n\tview: string | {\n\t\tkey?: string;\n\t\tvalue?: string | RegExp | Array<string> | Record<string, string> | Record<string, RegExp> | ( ( value: unknown ) => boolean );\n\t\tname?: string | RegExp;\n\t\tstyles?: MatchPropertyPatterns;\n\t\tclasses?: MatchClassPatterns;\n\t\tattributes?: MatchPropertyPatterns;\n\t};\n\tmodel: string | {\n\t\tkey: string;\n\t\tvalue: unknown |\n\t\t\t( ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => unknown );\n\t};\n\tconverterPriority?: PriorityString;\n} ) {\n\tconfig = cloneDeep( config );\n\n\tlet viewKey: string | null = null;\n\n\tif ( typeof config.view == 'string' || config.view.key ) {\n\t\tviewKey = normalizeViewAttributeKeyValueConfig( config );\n\t}\n\n\tnormalizeModelAttributeConfig( config, viewKey );\n\n\tconst converter = prepareToAttributeConverter( config as any, true );\n\n\treturn ( dispatcher: UpcastDispatcher ) => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element', converter, { priority: config.converterPriority || 'low' } );\n\t};\n}\n\n/**\n * View element to model marker conversion helper.\n *\n * See {@link ~UpcastHelpers#elementToMarker `.elementToMarker()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Pattern matching all view elements which should be converted.\n * @param config.model Name of the model marker, or a function that takes a view element and returns\n * a model marker name.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */\nfunction upcastElementToMarker( config: {\n\tview: MatcherPattern;\n\tmodel: string | UpcastMarkerFromElementCreatorFunction;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconst model = normalizeElementToMarkerModelConfig( config.model );\n\n\treturn upcastElementToElement( { ...config, model } );\n}\n\n/**\n * View data to model marker conversion helper.\n *\n * See {@link ~UpcastHelpers#dataToMarker} to learn more.\n *\n * @returns Conversion helper.\n */\nfunction upcastDataToMarker( config: {\n\tview: string;\n\tmodel?: UpcastMarkerFromAttributeCreatorFunction;\n\tconverterPriority?: PriorityString;\n} ) {\n\tconfig = cloneDeep( config );\n\n\t// Default conversion.\n\tif ( !config.model ) {\n\t\tconfig.model = name => {\n\t\t\treturn name ? config.view + ':' + name : config.view;\n\t\t};\n\t}\n\n\tconst normalizedConfig = {\n\t\tview: config.view,\n\t\tmodel: config.model!\n\t};\n\n\tconst converterStart = prepareToElementConverter( normalizeDataToMarkerConfig( normalizedConfig, 'start' ) );\n\tconst converterEnd = prepareToElementConverter( normalizeDataToMarkerConfig( normalizedConfig, 'end' ) );\n\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>(\n\t\t\t`element:${ config.view }-start`,\n\t\t\tconverterStart,\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\t\tdispatcher.on<UpcastElementEvent>(\n\t\t\t`element:${ config.view }-end`,\n\t\t\tconverterEnd,\n\t\t\t{ priority: config.converterPriority || 'normal' }\n\t\t);\n\n\t\t// Below is a hack that is needed to properly handle `converterPriority` for both elements and attributes.\n\t\t// Attribute conversion needs to be performed *after* element conversion.\n\t\t// This converter handles both element conversion and attribute conversion, which means that if a single\n\t\t// `config.converterPriority` is used, it will lead to problems. For example, if the `'high'` priority is used,\n\t\t// the attribute conversion will be performed before a lot of element upcast converters.\n\t\t// On the other hand, we want to support `config.converterPriority` and converter overwriting.\n\t\t//\n\t\t// To make it work, we need to do some extra processing for priority for attribute converter.\n\t\t// Priority `'low'` value should be the base value and then we will change it depending on `config.converterPriority` value.\n\t\t//\n\t\t// This hack probably would not be needed if attributes are upcasted separately.\n\t\t//\n\t\tconst basePriority = priorities.low;\n\t\tconst maxPriority = priorities.highest;\n\t\tconst priorityFactor = priorities.get( config.converterPriority ) / maxPriority; // Number in range [ -1, 1 ].\n\n\t\tdispatcher.on<UpcastElementEvent>(\n\t\t\t'element',\n\t\t\tupcastAttributeToMarker( normalizedConfig ),\n\t\t\t{ priority: basePriority + priorityFactor }\n\t\t);\n\t};\n}\n\n/**\n * Function factory, returns a callback function which converts view attributes to a model marker.\n *\n * The converter looks for elements with `data-group-start-before`, `data-group-start-after`, `data-group-end-before`\n * and `data-group-end-after` attributes and inserts `$marker` model elements before/after those elements.\n * `group` part is specified in `config.view`.\n *\n * @returns Marker converter.\n */\nfunction upcastAttributeToMarker( config: {\n\tview: string;\n\tmodel: UpcastMarkerFromAttributeCreatorFunction;\n} ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewElement>,\n\t\tconversionApi: UpcastConversionApi\n\t) => {\n\t\tconst attrName = `data-${ config.view }`;\n\n\t\t// Check if any attribute for the given view item can be consumed before changing the conversion data\n\t\t// and consuming view items with these attributes.\n\t\tif (\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-end-after' } ) &&\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-start-after' } ) &&\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-end-before' } ) &&\n\t\t\t!conversionApi.consumable.test( data.viewItem, { attributes: attrName + '-start-before' } )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// This converter wants to add a model element, marking a marker, before/after an element (or maybe even group of elements).\n\t\t// To do that, we can use `data.modelRange` which is set on an element (or a group of elements) that has been upcasted.\n\t\t// But, if the processed view element has not been upcasted yet (it does not have been converted), we need to\n\t\t// fire conversion for its children first, then we will have `data.modelRange` available.\n\t\tif ( !data.modelRange ) {\n\t\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-end-after' } ) ) {\n\t\t\taddMarkerElements( data.modelRange!.end, data.viewItem.getAttribute( attrName + '-end-after' )!.split( ',' ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-start-after' } ) ) {\n\t\t\taddMarkerElements( data.modelRange!.end, data.viewItem.getAttribute( attrName + '-start-after' )!.split( ',' ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-end-before' } ) ) {\n\t\t\taddMarkerElements( data.modelRange!.start, data.viewItem.getAttribute( attrName + '-end-before' )!.split( ',' ) );\n\t\t}\n\n\t\tif ( conversionApi.consumable.consume( data.viewItem, { attributes: attrName + '-start-before' } ) ) {\n\t\t\taddMarkerElements( data.modelRange!.start, data.viewItem.getAttribute( attrName + '-start-before' )!.split( ',' ) );\n\t\t}\n\n\t\tfunction addMarkerElements( position: ModelPosition, markerViewNames: Array<string> ): void {\n\t\t\tfor ( const markerViewName of markerViewNames ) {\n\t\t\t\tconst markerName = config.model( markerViewName, conversionApi );\n\t\t\t\tconst element = conversionApi.writer.createElement( '$marker', { 'data-name': markerName } );\n\n\t\t\t\tconversionApi.writer.insert( element, position );\n\n\t\t\t\tif ( data.modelCursor.isEqual( position ) ) {\n\t\t\t\t\tdata.modelCursor = data.modelCursor.getShiftedBy( 1 );\n\t\t\t\t} else {\n\t\t\t\t\tdata.modelCursor = data.modelCursor._getTransformedByInsertion( position, 1 );\n\t\t\t\t}\n\n\t\t\t\tdata.modelRange = data.modelRange!._getTransformedByInsertion( position, 1 )[ 0 ];\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Helper function for from-view-element conversion. Checks if `config.view` directly specifies converted view element's name\n * and if so, returns it.\n *\n * @param config Conversion view config.\n * @returns View element name or `null` if name is not directly set.\n */\nfunction getViewElementNameFromConfig( viewConfig: any ): string | null {\n\tif ( typeof viewConfig == 'string' ) {\n\t\treturn viewConfig;\n\t}\n\n\tif ( typeof viewConfig == 'object' && typeof viewConfig.name == 'string' ) {\n\t\treturn viewConfig.name;\n\t}\n\n\treturn null;\n}\n\n/**\n * Helper for to-model-element conversion. Takes a config object and returns a proper converter function.\n *\n * @param config Conversion configuration.\n * @returns View to model converter.\n */\nfunction prepareToElementConverter( config: {\n\tview: MatcherPattern;\n\tmodel: string | UpcastElementCreatorFunction;\n} ) {\n\tconst matcher = new Matcher( config.view );\n\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewElement>,\n\t\tconversionApi: UpcastConversionApi\n\t): void => {\n\t\tconst matcherResult = matcher.match( data.viewItem );\n\n\t\tif ( !matcherResult ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst match = matcherResult.match;\n\n\t\t// Force consuming element's name.\n\t\tmatch.name = true;\n\n\t\tif ( !conversionApi.consumable.test( data.viewItem, match ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelElement = getModelElement( config.model, data.viewItem, conversionApi );\n\n\t\tif ( !modelElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.safeInsert( modelElement, data.modelCursor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( data.viewItem, match );\n\t\tconversionApi.convertChildren( data.viewItem, modelElement );\n\t\tconversionApi.updateConversionResult( modelElement, data );\n\t};\n}\n\n/**\n * Helper function for upcasting-to-element converter. Takes the model configuration, the converted view element\n * and a writer instance and returns a model element instance to be inserted in the model.\n *\n * @param model Model conversion configuration.\n * @param input The converted view node.\n * @param conversionApi The upcast conversion API.\n */\nfunction getModelElement(\n\tmodel: string | UpcastElementCreatorFunction,\n\tinput: ViewElement,\n\tconversionApi: UpcastConversionApi\n): ModelElement | null {\n\tif ( model instanceof Function ) {\n\t\treturn model( input, conversionApi );\n\t} else {\n\t\treturn conversionApi.writer.createElement( model );\n\t}\n}\n\n/**\n * Helper function view-attribute-to-model-attribute helper. Normalizes `config.view` which was set as `String` or\n * as an `Object` with `key`, `value` and `name` properties. Normalized `config.view` has is compatible with\n * {@link module:engine/view/matcher~MatcherPattern}.\n *\n * @param config Conversion config.\n * @returns Key of the converted view attribute.\n */\nfunction normalizeViewAttributeKeyValueConfig( config: any ) {\n\tif ( typeof config.view == 'string' ) {\n\t\tconfig.view = { key: config.view };\n\t}\n\n\tconst key: string = config.view.key;\n\tconst value = typeof config.view.value == 'undefined' ? /[\\s\\S]*/ : config.view.value;\n\tlet normalized: MatcherPattern;\n\n\tif ( key == 'class' || key == 'style' ) {\n\t\tconst keyName = key == 'class' ? 'classes' : 'styles';\n\n\t\tnormalized = {\n\t\t\t[ keyName ]: value\n\t\t};\n\t} else {\n\t\tnormalized = {\n\t\t\tattributes: {\n\t\t\t\t[ key ]: value\n\t\t\t}\n\t\t};\n\t}\n\n\tif ( config.view.name ) {\n\t\tnormalized.name = config.view.name;\n\t}\n\n\tconfig.view = normalized;\n\n\treturn key;\n}\n\n/**\n * Helper function that normalizes `config.model` in from-model-attribute conversion. `config.model` can be set\n * as a `String`, an `Object` with only `key` property or an `Object` with `key` and `value` properties. Normalized\n * `config.model` is an `Object` with `key` and `value` properties.\n *\n * @param config Conversion config.\n * @param viewAttributeKeyToCopy Key of the converted view attribute. If it is set, model attribute value\n * will be equal to view attribute value.\n */\nfunction normalizeModelAttributeConfig( config: any, viewAttributeKeyToCopy: string | null = null ) {\n\tconst defaultModelValue = viewAttributeKeyToCopy === null ? true :\n\t\t( viewElement: ViewElement ) => viewElement.getAttribute( viewAttributeKeyToCopy );\n\n\tconst key = typeof config.model != 'object' ? config.model : config.model.key;\n\tconst value = typeof config.model != 'object' || typeof config.model.value == 'undefined' ? defaultModelValue : config.model.value;\n\n\tconfig.model = { key, value };\n}\n\n/**\n * Helper for to-model-attribute conversion. Takes the model attribute name and conversion configuration and returns\n * a proper converter function.\n *\n * @param config Conversion configuration. It is possible to provide multiple configurations in an array.\n * @param shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n * on all elements in the range.\n */\nfunction prepareToAttributeConverter(\n\tconfig: {\n\t\tview: MatcherPattern;\n\t\tmodel: {\n\t\t\tkey: string;\n\t\t\tvalue: UpcastAttributeCreatorFunction | unknown;\n\t\t};\n\t},\n\tshallow: boolean\n) {\n\tconst matcher = new Matcher( config.view );\n\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewElement>,\n\t\tconversionApi: UpcastConversionApi\n\t): void => {\n\t\t// Converting an attribute of an element that has not been converted to anything does not make sense\n\t\t// because there will be nowhere to set that attribute on. At this stage, the element should've already\n\t\t// been converted (https://github.com/ckeditor/ckeditor5/issues/11000).\n\t\tif ( !data.modelRange && shallow ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst match = matcher.match( data.viewItem );\n\n\t\t// If there is no match, this callback should not do anything.\n\t\tif ( !match ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( onlyViewNameIsDefined( config.view, data.viewItem ) ) {\n\t\t\tmatch.match.name = true;\n\t\t} else {\n\t\t\t// Do not test `name` consumable because it could get consumed already while upcasting some other attribute\n\t\t\t// on the same element (for example <span class=\"big\" style=\"color: red\">foo</span>).\n\t\t\tdelete match.match.name;\n\t\t}\n\n\t\t// Try to consume appropriate values from consumable values list.\n\t\tif ( !conversionApi.consumable.test( data.viewItem, match.match ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelKey = config.model.key;\n\t\tconst modelValue: unknown = typeof config.model.value == 'function' ?\n\t\t\tconfig.model.value( data.viewItem, conversionApi, data ) : config.model.value;\n\n\t\t// Do not convert if attribute building function returned falsy value.\n\t\tif ( modelValue === null || modelValue === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Since we are converting to attribute we need a range on which we will set the attribute.\n\t\t// If the range is not created yet, let's create it by converting children of the current node first.\n\t\tif ( !data.modelRange ) {\n\t\t\t// Convert children and set conversion result as a current data.\n\t\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t\t}\n\n\t\t// Set attribute on current `output`. `Schema` is checked inside this helper function.\n\t\tconst attributeWasSet = setAttributeOn( data.modelRange!, { key: modelKey, value: modelValue }, shallow, conversionApi );\n\n\t\t// It may happen that a converter will try to set an attribute that is not allowed in the given context.\n\t\t// In such a situation we cannot consume the attribute. See: https://github.com/ckeditor/ckeditor5/pull/9249#issuecomment-815658459.\n\t\tif ( attributeWasSet ) {\n\t\t\t// Verify if the element itself wasn't consumed yet. It could be consumed already while upcasting some other attribute\n\t\t\t// on the same element (for example <span class=\"big\" style=\"color: red\">foo</span>).\n\t\t\t// We need to consume it so other features (especially GHS) won't try to convert it.\n\t\t\t// Note that it's not tested by the other element-to-attribute converters whether an element was consumed before\n\t\t\t// (in case of converters that the element itself is just a context and not the primary information to convert).\n\t\t\tif ( conversionApi.consumable.test( data.viewItem, { name: true } ) ) {\n\t\t\t\tmatch.match.name = true;\n\t\t\t}\n\n\t\t\tconversionApi.consumable.consume( data.viewItem, match.match );\n\t\t}\n\t};\n}\n\n/**\n * Helper function that checks if element name should be consumed in attribute converters.\n *\n * @param viewConfig Conversion view config.\n */\nfunction onlyViewNameIsDefined( viewConfig: any, viewItem: ViewElement ): boolean {\n\t// https://github.com/ckeditor/ckeditor5-engine/issues/1786\n\tconst configToTest = typeof viewConfig == 'function' ? viewConfig( viewItem ) : viewConfig;\n\n\tif ( typeof configToTest == 'object' && !getViewElementNameFromConfig( configToTest ) ) {\n\t\treturn false;\n\t}\n\n\treturn !configToTest.classes && !configToTest.attributes && !configToTest.styles;\n}\n\n/**\n * Helper function for to-model-attribute converter. Sets model attribute on given range.\n * Checks {@link module:engine/model/schema~ModelSchema} to ensure proper model structure.\n *\n * If any node on the given range has already defined an attribute with the same name, its value will not be updated.\n *\n * @param modelRange Model range on which attribute should be set.\n * @param modelAttribute Model attribute to set.\n * @param conversionApi Conversion API.\n * @param shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n * on all elements in the range.\n * @returns `true` if attribute was set on at least one node from given `modelRange`.\n */\nfunction setAttributeOn(\n\tmodelRange: ModelRange,\n\tmodelAttribute: {\n\t\tkey: string;\n\t\tvalue: unknown;\n\t},\n\tshallow: boolean,\n\tconversionApi: UpcastConversionApi\n): boolean {\n\tlet result = false;\n\n\t// Set attribute on each item in range according to Schema.\n\tfor ( const node of Array.from( modelRange.getItems( { shallow } ) ) ) {\n\t\t// Skip if not allowed.\n\t\tif ( !conversionApi.schema.checkAttribute( node, modelAttribute.key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Mark the node as consumed even if the attribute will not be updated because it's in a valid context (schema)\n\t\t// and would be converted if the attribute wouldn't be present. See https://github.com/ckeditor/ckeditor5/issues/8921.\n\t\tresult = true;\n\n\t\t// Do not override the attribute if it's already present.\n\t\tif ( node.hasAttribute( modelAttribute.key ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversionApi.writer.setAttribute( modelAttribute.key, modelAttribute.value, node );\n\t}\n\n\treturn result;\n}\n\n/**\n * Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastElementToMarker()`\n * function and converts it to a format that is supported by `upcastElementToElement()` function.\n */\nfunction normalizeElementToMarkerModelConfig( model: string | UpcastMarkerFromElementCreatorFunction ): UpcastElementCreatorFunction {\n\treturn ( viewElement, conversionApi ) => {\n\t\tconst markerName = typeof model == 'string' ? model : model( viewElement, conversionApi );\n\n\t\treturn conversionApi.writer.createElement( '$marker', { 'data-name': markerName } );\n\t};\n}\n\n/**\n * Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastDataToMarker()`\n * function and converts it to a format that is supported by `upcastElementToElement()` function.\n */\nfunction normalizeDataToMarkerConfig(\n\tconfig: {\n\t\tview: string;\n\t\tmodel: UpcastMarkerFromAttributeCreatorFunction;\n\t},\n\ttype: string\n) {\n\tconst elementCreatorFunction: UpcastElementCreatorFunction = ( viewElement, conversionApi ) => {\n\t\tconst viewName = viewElement.getAttribute( 'name' )!;\n\t\tconst markerName = config.model( viewName, conversionApi );\n\n\t\treturn conversionApi.writer.createElement( '$marker', { 'data-name': markerName } );\n\t};\n\n\treturn {\n\t\t// Upcast <markerGroup-start> and <markerGroup-end> elements.\n\t\tview: `${ config.view }-${ type }`,\n\t\tmodel: elementCreatorFunction\n\t};\n}\n\nexport type UpcastElementCreatorFunction = (\n\tviewElement: ViewElement,\n\tconversionApi: UpcastConversionApi\n) => ModelElement | null;\n\nexport type UpcastAttributeCreatorFunction = (\n\tmodelElement: ModelElement,\n\tconversionApi: UpcastConversionApi\n) => unknown;\n\nexport type UpcastMarkerFromElementCreatorFunction = (\n\tviewElement: ViewElement,\n\tconversionApi: UpcastConversionApi\n) => string;\n\nexport type UpcastMarkerFromAttributeCreatorFunction = (\n\tattributeValue: string,\n\tconversionApi: UpcastConversionApi\n) => string;\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/**\n * @module engine/controller/editingcontroller\n */\n\nimport {\n\tCKEditorError,\n\tObservableMixin,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { ViewRootEditableElement } from '../view/rooteditableelement.js';\nimport { EditingView } from '../view/view.js';\nimport { Mapper } from '../conversion/mapper.js';\nimport {\n\tDowncastDispatcher,\n\ttype DowncastInsertEvent,\n\ttype DowncastRemoveEvent,\n\ttype DowncastSelectionEvent,\n\ttype DowncastCleanSelectionEvent\n} from '../conversion/downcastdispatcher.js';\nimport {\n\tcleanSelection,\n\tconvertCollapsedSelection,\n\tconvertRangeSelection,\n\tinsertAttributesAndChildren,\n\tinsertText,\n\tremove\n} from '../conversion/downcasthelpers.js';\n\nimport { convertSelectionChange } from '../conversion/upcasthelpers.js';\n\nimport type { Model, AfterChangesEvent, BeforeChangesEvent } from '../model/model.js';\nimport { type ModelItem } from '../model/item.js';\nimport { type ModelText } from '../model/text.js';\nimport { type ModelTextProxy } from '../model/textproxy.js';\nimport type { ModelDocumentChangeEvent } from '../model/document.js';\nimport type { Marker } from '../model/markercollection.js';\nimport type { StylesProcessor } from '../view/stylesmap.js';\nimport type { ViewDocumentObserverSelectionChangeEvent } from '../view/observer/selectionobserver.js';\n\n// @if CK_DEBUG_ENGINE // import { dumpTrees, initDocumentDumping } from '../dev-utils/utils.js';\n\nconst EditingControllerBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * A controller for the editing pipeline. The editing pipeline controls the {@link ~EditingController#model model} rendering,\n * including selection handling. It also creates the {@link ~EditingController#view view} which builds a\n * browser-independent virtualization over the DOM elements. The editing controller also attaches default converters.\n */\nexport class EditingController extends EditingControllerBase {\n\t/**\n\t * Editor model.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * Editing view controller.\n\t */\n\tpublic readonly view: EditingView;\n\n\t/**\n\t * A mapper that describes the model-view binding.\n\t */\n\tpublic readonly mapper: Mapper;\n\n\t/**\n\t * Downcast dispatcher that converts changes from the model to the {@link #view editing view}.\n\t */\n\tpublic readonly downcastDispatcher: DowncastDispatcher;\n\n\t/**\n\t * Creates an editing controller instance.\n\t *\n\t * @param model Editing model.\n\t * @param stylesProcessor The styles processor instance.\n\t */\n\tconstructor( model: Model, stylesProcessor: StylesProcessor ) {\n\t\tsuper();\n\n\t\tthis.model = model;\n\t\tthis.view = new EditingView( stylesProcessor );\n\t\tthis.mapper = new Mapper();\n\n\t\tthis.downcastDispatcher = new DowncastDispatcher( {\n\t\t\tmapper: this.mapper,\n\t\t\tschema: model.schema\n\t\t} );\n\n\t\tconst doc = this.model.document;\n\t\tconst selection = doc.selection;\n\t\tconst markers = this.model.markers;\n\n\t\t// When plugins listen on model changes (on selection change, post fixers, etc.) and change the view as a result of\n\t\t// the model's change, they might trigger view rendering before the conversion is completed (e.g. before the selection\n\t\t// is converted). We disable rendering for the length of the outermost model change() block to prevent that.\n\t\t//\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1528\n\t\tthis.listenTo<BeforeChangesEvent>( this.model, '_beforeChanges', () => {\n\t\t\tthis.view._disableRendering( true );\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.listenTo<AfterChangesEvent>( this.model, '_afterChanges', () => {\n\t\t\tthis.view._disableRendering( false );\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Whenever model document is changed, convert those changes to the view (using model.Document#differ).\n\t\t// Do it on 'low' priority, so changes are converted after other listeners did their job.\n\t\t// Also convert model selection.\n\t\tthis.listenTo<ModelDocumentChangeEvent>( doc, 'change', () => {\n\t\t\tthis.view.change( writer => {\n\t\t\t\tthis.downcastDispatcher.convertChanges( doc.differ, markers, writer );\n\t\t\t\tthis.downcastDispatcher.convertSelection( selection, markers, writer );\n\t\t\t} );\n\t\t}, { priority: 'low' } );\n\n\t\t// Convert selection from the view to the model when it changes in the view.\n\t\tthis.listenTo<ViewDocumentObserverSelectionChangeEvent>( this.view.document, 'selectionChange',\n\t\t\tconvertSelectionChange( this.model, this.mapper )\n\t\t);\n\n\t\t// Attach default model converters.\n\t\tthis.downcastDispatcher.on<DowncastInsertEvent<ModelText | ModelTextProxy>>( 'insert:$text', insertText(), { priority: 'lowest' } );\n\t\tthis.downcastDispatcher.on<DowncastInsertEvent>( 'insert', insertAttributesAndChildren(), { priority: 'lowest' } );\n\t\tthis.downcastDispatcher.on<DowncastRemoveEvent>( 'remove', remove(), { priority: 'low' } );\n\n\t\t// Attach default model selection converters.\n\t\tthis.downcastDispatcher.on<DowncastCleanSelectionEvent>( 'cleanSelection', cleanSelection() );\n\t\tthis.downcastDispatcher.on<DowncastSelectionEvent>( 'selection', convertRangeSelection(), { priority: 'low' } );\n\t\tthis.downcastDispatcher.on<DowncastSelectionEvent>( 'selection', convertCollapsedSelection(), { priority: 'low' } );\n\n\t\t// Binds {@link module:engine/view/document~ViewDocument#roots view roots collection} to\n\t\t// {@link module:engine/model/document~ModelDocument#roots model roots collection} so creating\n\t\t// model root automatically creates corresponding view root.\n\t\tthis.view.document.roots.bindTo( this.model.document.roots ).using( root => {\n\t\t\t// $graveyard is a special root that has no reflection in the view.\n\t\t\tif ( root.rootName == '$graveyard' ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst viewRoot = new ViewRootEditableElement( this.view.document, root.name );\n\n\t\t\tviewRoot.rootName = root.rootName;\n\t\t\tthis.mapper.bindElements( root, viewRoot );\n\n\t\t\treturn viewRoot;\n\t\t} );\n\n\t\t// @if CK_DEBUG_ENGINE // initDocumentDumping( this.model.document );\n\t\t// @if CK_DEBUG_ENGINE // initDocumentDumping( this.view.document );\n\n\t\t// @if CK_DEBUG_ENGINE // dumpTrees( this.model.document, this.model.document.version );\n\t\t// @if CK_DEBUG_ENGINE // dumpTrees( this.view.document, this.model.document.version );\n\n\t\t// @if CK_DEBUG_ENGINE // this.model.document.on( 'change', () => {\n\t\t// @if CK_DEBUG_ENGINE //\tdumpTrees( this.view.document, this.model.document.version );\n\t\t// @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Removes all event listeners attached to the `EditingController`. Destroys all objects created\n\t * by `EditingController` that need to be destroyed.\n\t */\n\tpublic destroy(): void {\n\t\tthis.view.destroy();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Calling this method will refresh the marker by triggering the downcast conversion for it.\n\t *\n\t * Reconverting the marker is useful when you want to change its {@link module:engine/view/element~ViewElement view element}\n\t * without changing any marker data. For instance:\n\t *\n\t * ```ts\n\t * let isCommentActive = false;\n\t *\n\t * model.conversion.markerToHighlight( {\n\t * \tmodel: 'comment',\n\t * \tview: data => {\n\t * \t\tconst classes = [ 'comment-marker' ];\n\t *\n\t * \t\tif ( isCommentActive ) {\n\t * \t\t\tclasses.push( 'comment-marker--active' );\n\t * \t\t}\n\t *\n\t * \t\treturn { classes };\n\t * \t}\n\t * } );\n\t *\n\t * // ...\n\t *\n\t * // Change the property that indicates if marker is displayed as active or not.\n\t * isCommentActive = true;\n\t *\n\t * // Reconverting will downcast and synchronize the marker with the new isCommentActive state value.\n\t * editor.editing.reconvertMarker( 'comment' );\n\t * ```\n\t *\n\t * **Note**: If you want to reconvert a model item, use {@link #reconvertItem} instead.\n\t *\n\t * @param markerOrName Name of a marker to update, or a marker instance.\n\t */\n\tpublic reconvertMarker( markerOrName: Marker | string ): void {\n\t\tconst markerName = typeof markerOrName == 'string' ? markerOrName : markerOrName.name;\n\t\tconst currentMarker = this.model.markers.get( markerName );\n\n\t\tif ( !currentMarker ) {\n\t\t\t/**\n\t\t\t * The marker with the provided name does not exist and cannot be reconverted.\n\t\t\t *\n\t\t\t * @error editingcontroller-reconvertmarker-marker-not-exist\n\t\t\t * @param {string} markerName The name of the reconverted marker.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editingcontroller-reconvertmarker-marker-not-exist', this, { markerName } );\n\t\t}\n\n\t\tthis.model.change( () => {\n\t\t\tthis.model.markers._refresh( currentMarker );\n\t\t} );\n\t}\n\n\t/**\n\t * Calling this method will downcast a model item on demand (by requesting a refresh in the {@link module:engine/model/differ~Differ}).\n\t *\n\t * You can use it if you want the view representation of a specific item updated as a response to external modifications. For instance,\n\t * when the view structure depends not only on the associated model data but also on some external state.\n\t *\n\t * **Note**: If you want to reconvert a model marker, use {@link #reconvertMarker} instead.\n\t *\n\t * @param item Item to refresh.\n\t */\n\tpublic reconvertItem( item: ModelItem ): void {\n\t\tthis.model.change( () => {\n\t\t\tthis.model.document.differ._refreshItem( item );\n\t\t} );\n\t}\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/**\n * @module engine/model/schema\n */\n\nimport { ModelElement } from './element.js';\nimport { ModelPosition } from './position.js';\nimport { ModelRange } from './range.js';\nimport { ModelText } from './text.js';\nimport { ModelTreeWalker } from './treewalker.js';\n\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelDocumentSelection } from './documentselection.js';\nimport { type ModelItem } from './item.js';\nimport { type ModelNode } from './node.js';\nimport { type ModelSelection } from './selection.js';\nimport { type ModelWriter } from './writer.js';\n\nimport {\n\tCKEditorError,\n\tfirst,\n\tObservableMixin,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nconst ModelSchemaBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * The model's schema. It defines the allowed and disallowed structures of nodes as well as nodes' attributes.\n * The schema is usually defined by the features and based on them, the editing framework and features\n * make decisions on how to change and process the model.\n *\n * The instance of schema is available in {@link module:engine/model/model~Model#schema `editor.model.schema`}.\n *\n * Read more about the schema in:\n *\n * * The {@glink framework/architecture/editing-engine#schema schema section} of the\n * {@glink framework/architecture/editing-engine Introduction to the Editing engine architecture} guide.\n * * The {@glink framework/deep-dive/schema Schema deep-dive} guide.\n */\nexport class ModelSchema extends ModelSchemaBase {\n\tprivate readonly _sourceDefinitions: Record<string, Array<ModelSchemaItemDefinition>> = {};\n\n\t/**\n\t * A dictionary containing attribute properties.\n\t */\n\tprivate readonly _attributeProperties: Record<string, ModelAttributeProperties> = Object.create( null );\n\n\t/**\n\t * Stores additional callbacks registered for schema items, which are evaluated when {@link ~ModelSchema#checkChild} is called.\n\t *\n\t * Keys are schema item names for which the callbacks are registered. Values are arrays with the callbacks.\n\t *\n\t * Some checks are added under {@link ~ModelSchema#_genericCheckSymbol} key, these are\n\t * evaluated for every {@link ~ModelSchema#checkChild} call.\n\t */\n\tprivate readonly _customChildChecks: Map<string | symbol, Array<ModelSchemaChildCheckCallback>> = new Map();\n\n\t/**\n\t * Stores additional callbacks registered for attribute names, which are evaluated when {@link ~ModelSchema#checkAttribute} is called.\n\t *\n\t * Keys are schema attribute names for which the callbacks are registered. Values are arrays with the callbacks.\n\t *\n\t * Some checks are added under {@link ~ModelSchema#_genericCheckSymbol} key, these are evaluated for every\n\t * {@link ~ModelSchema#checkAttribute} call.\n\t */\n\tprivate readonly _customAttributeChecks: Map<string | symbol, Array<ModelSchemaAttributeCheckCallback>> = new Map();\n\n\tprivate readonly _genericCheckSymbol = Symbol( '$generic' );\n\n\tprivate _compiledDefinitions?: Record<string, ModelSchemaCompiledItemDefinition> | null;\n\n\t/**\n\t * Creates a schema instance.\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.decorate( 'checkChild' );\n\t\tthis.decorate( 'checkAttribute' );\n\n\t\tthis.on( 'checkAttribute', ( evt, args ) => {\n\t\t\targs[ 0 ] = new ModelSchemaContext( args[ 0 ] );\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.on( 'checkChild', ( evt, args ) => {\n\t\t\targs[ 0 ] = new ModelSchemaContext( args[ 0 ] );\n\t\t\targs[ 1 ] = this.getDefinition( args[ 1 ] );\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Registers a schema item. Can only be called once for every item name.\n\t *\n\t * ```ts\n\t * schema.register( 'paragraph', {\n\t * \tinheritAllFrom: '$block'\n\t * } );\n\t * ```\n\t */\n\tpublic register( itemName: string, definition?: ModelSchemaItemDefinition ): void {\n\t\tif ( this._sourceDefinitions[ itemName ] ) {\n\t\t\t/**\n\t\t\t * A single item cannot be registered twice in the schema.\n\t\t\t *\n\t\t\t * This situation may happen when:\n\t\t\t *\n\t\t\t * * Two or more plugins called {@link module:engine/model/schema~ModelSchema#register `register()`} with the same name.\n\t\t\t * This will usually mean that there is a collision between plugins which try to use the same element in the model.\n\t\t\t * Unfortunately, the only way to solve this is by modifying one of these plugins to use a unique model element name.\n\t\t\t * * A single plugin was loaded twice. This happens when it is installed by npm/yarn in two versions\n\t\t\t * and usually means one or more of the following issues:\n\t\t\t *     * a version mismatch (two of your dependencies require two different versions of this plugin),\n\t\t\t *     * incorrect imports (this plugin is somehow imported twice in a way which confuses webpack),\n\t\t\t *     * mess in `node_modules/` (`rm -rf node_modules/` may help).\n\t\t\t *\n\t\t\t * **Note:** Check the logged `itemName` to better understand which plugin was duplicated/conflicting.\n\t\t\t *\n\t\t\t * @param itemName The name of the model element that is being registered twice.\n\t\t\t * @error schema-cannot-register-item-twice\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'schema-cannot-register-item-twice',\n\t\t\t\tthis,\n\t\t\t\t{\n\t\t\t\t\titemName\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis._sourceDefinitions[ itemName ] = [\n\t\t\tObject.assign( {}, definition )\n\t\t];\n\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t * Extends a {@link #register registered} item's definition.\n\t *\n\t * Extending properties such as `allowIn` will add more items to the existing properties,\n\t * while redefining properties such as `isBlock` will override the previously defined ones.\n\t *\n\t * ```ts\n\t * schema.register( 'foo', {\n\t * \tallowIn: '$root',\n\t * \tisBlock: true;\n\t * } );\n\t * schema.extend( 'foo', {\n\t * \tallowIn: 'blockQuote',\n\t * \tisBlock: false\n\t * } );\n\t *\n\t * schema.getDefinition( 'foo' );\n\t * //\t{\n\t * //\t\tallowIn: [ '$root', 'blockQuote' ],\n\t * // \t\tisBlock: false\n\t * //\t}\n\t * ```\n\t */\n\tpublic extend( itemName: string, definition: ModelSchemaItemDefinition ): void {\n\t\tif ( !this._sourceDefinitions[ itemName ] ) {\n\t\t\t/**\n\t\t\t * Cannot extend an item which was not registered yet.\n\t\t\t *\n\t\t\t * This error happens when a plugin tries to extend the schema definition of an item which was not\n\t\t\t * {@link module:engine/model/schema~ModelSchema#register registered} yet.\n\t\t\t *\n\t\t\t * @param itemName The name of the model element which is being extended.\n\t\t\t * @error schema-cannot-extend-missing-item\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'schema-cannot-extend-missing-item', this, {\n\t\t\t\titemName\n\t\t\t} );\n\t\t}\n\n\t\tthis._sourceDefinitions[ itemName ].push( Object.assign( {}, definition ) );\n\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t * Returns data of all registered items.\n\t *\n\t * This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t * checking a list of all block elements, etc).\n\t * Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t * in other cases.\n\t */\n\tpublic getDefinitions(): Record<string, ModelSchemaCompiledItemDefinition> {\n\t\tif ( !this._compiledDefinitions ) {\n\t\t\tthis._compile();\n\t\t}\n\n\t\treturn this._compiledDefinitions!;\n\t}\n\n\t/**\n\t * Returns a definition of the given item or `undefined` if an item is not registered.\n\t *\n\t * This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t * checking a list of all block elements, etc).\n\t * Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t * in other cases.\n\t */\n\tpublic getDefinition(\n\t\titem: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem\n\t): ModelSchemaCompiledItemDefinition | undefined {\n\t\tlet itemName: string;\n\n\t\tif ( typeof item == 'string' ) {\n\t\t\titemName = item;\n\t\t} else if ( 'is' in item && ( item.is( '$text' ) || item.is( '$textProxy' ) ) ) {\n\t\t\titemName = '$text';\n\t\t}\n\t\t// Element or module:engine/model/schema~ModelSchemaContextItem.\n\t\telse {\n\t\t\titemName = ( item as any ).name;\n\t\t}\n\n\t\treturn this.getDefinitions()[ itemName ];\n\t}\n\n\t/**\n\t * Returns `true` if the given item is registered in the schema.\n\t *\n\t * ```ts\n\t * schema.isRegistered( 'paragraph' ); // -> true\n\t * schema.isRegistered( editor.model.document.getRoot() ); // -> true\n\t * schema.isRegistered( 'foo' ); // -> false\n\t * ```\n\t */\n\tpublic isRegistered( item: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem ): boolean {\n\t\treturn !!this.getDefinition( item );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * a block by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isBlock` property.\n\t *\n\t * ```ts\n\t * schema.isBlock( 'paragraph' ); // -> true\n\t * schema.isBlock( '$root' ); // -> false\n\t *\n\t * const paragraphElement = writer.createElement( 'paragraph' );\n\t * schema.isBlock( paragraphElement ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#block-elements Block elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */\n\tpublic isBlock( item: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem ): boolean {\n\t\tconst def = this.getDefinition( item );\n\n\t\treturn !!( def && def.isBlock );\n\t}\n\n\t/**\n\t * Returns `true` if the given item should be treated as a limit element.\n\t *\n\t * It considers an item to be a limit element if its\n\t * {@link module:engine/model/schema~ModelSchemaItemDefinition}'s\n\t * {@link module:engine/model/schema~ModelSchemaItemDefinition#isLimit `isLimit`} or\n\t * {@link module:engine/model/schema~ModelSchemaItemDefinition#isObject `isObject`} property\n\t * was set to `true`.\n\t *\n\t * ```ts\n\t * schema.isLimit( 'paragraph' ); // -> false\n\t * schema.isLimit( '$root' ); // -> true\n\t * schema.isLimit( editor.model.document.getRoot() ); // -> true\n\t * schema.isLimit( 'imageBlock' ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#limit-elements Limit elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */\n\tpublic isLimit( item: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem ): boolean {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!( def.isLimit || def.isObject );\n\t}\n\n\t/**\n\t * Returns `true` if the given item should be treated as an object element.\n\t *\n\t * It considers an item to be an object element if its\n\t * {@link module:engine/model/schema~ModelSchemaItemDefinition}'s\n\t * {@link module:engine/model/schema~ModelSchemaItemDefinition#isObject `isObject`} property\n\t * was set to `true`.\n\t *\n\t * ```ts\n\t * schema.isObject( 'paragraph' ); // -> false\n\t * schema.isObject( 'imageBlock' ); // -> true\n\t *\n\t * const imageElement = writer.createElement( 'imageBlock' );\n\t * schema.isObject( imageElement ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#object-elements Object elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */\n\tpublic isObject( item: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem ): boolean {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Note: Check out the implementation of #isLimit(), #isSelectable(), and #isContent()\n\t\t// to understand why these three constitute an object.\n\t\treturn !!( def.isObject || ( def.isLimit && def.isSelectable && def.isContent ) );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * an inline element by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isInline` property.\n\t *\n\t * ```ts\n\t * schema.isInline( 'paragraph' ); // -> false\n\t * schema.isInline( 'softBreak' ); // -> true\n\t *\n\t * const text = writer.createText( 'foo' );\n\t * schema.isInline( text ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#inline-elements Inline elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */\n\tpublic isInline( item: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem ): boolean {\n\t\tconst def = this.getDefinition( item );\n\n\t\treturn !!( def && def.isInline );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * a selectable element by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isSelectable` property.\n\t *\n\t * ```ts\n\t * schema.isSelectable( 'paragraph' ); // -> false\n\t * schema.isSelectable( 'heading1' ); // -> false\n\t * schema.isSelectable( 'imageBlock' ); // -> true\n\t * schema.isSelectable( 'tableCell' ); // -> true\n\t *\n\t * const text = writer.createText( 'foo' );\n\t * schema.isSelectable( text ); // -> false\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#selectable-elements Selectable elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */\n\tpublic isSelectable( item: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem ): boolean {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!( def.isSelectable || def.isObject );\n\t}\n\n\t/**\n\t * Returns `true` if the given item is defined to be\n\t * a content by the {@link module:engine/model/schema~ModelSchemaItemDefinition}'s `isContent` property.\n\t *\n\t * ```ts\n\t * schema.isContent( 'paragraph' ); // -> false\n\t * schema.isContent( 'heading1' ); // -> false\n\t * schema.isContent( 'imageBlock' ); // -> true\n\t * schema.isContent( 'horizontalLine' ); // -> true\n\t *\n\t * const text = writer.createText( 'foo' );\n\t * schema.isContent( text ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#content-elements Content elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */\n\tpublic isContent( item: string | ModelItem | ModelDocumentFragment | ModelSchemaContextItem ): boolean {\n\t\tconst def = this.getDefinition( item );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!( def.isContent || def.isObject );\n\t}\n\n\t/**\n\t * Checks whether the given node can be a child of the given context.\n\t *\n\t * ```ts\n\t * schema.checkChild( model.document.getRoot(), paragraph ); // -> false\n\t *\n\t * schema.register( 'paragraph', {\n\t * \tallowIn: '$root'\n\t * } );\n\t *\n\t * schema.checkChild( model.document.getRoot(), paragraph ); // -> true\n\t * ```\n\t *\n\t * Both {@link module:engine/model/schema~ModelSchema#addChildCheck callback checks} and declarative rules (added when\n\t * {@link module:engine/model/schema~ModelSchema#register registering} and\n\t * {@link module:engine/model/schema~ModelSchema#extend extending} items)\n\t * are evaluated when this method is called.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * Note that when verifying whether the given node can be a child of the given context, the schema also verifies the entire\n\t * context &ndash; from its root to its last element. Therefore, it is possible for `checkChild()` to return `false` even though\n\t * the `context` last element can contain the checked child. It happens if one of the `context` elements does not allow its child.\n\t * When `context` is verified, {@link module:engine/model/schema~ModelSchema#addChildCheck custom checks} are considered as well.\n\t *\n\t * @fires checkChild\n\t * @param context The context in which the child will be checked.\n\t * @param def The child to check.\n\t */\n\tpublic checkChild( context: ModelSchemaContextDefinition, def: string | ModelNode | ModelDocumentFragment ): boolean {\n\t\t// Note: `context` and `def` are already normalized here to `ModelSchemaContext` and `ModelSchemaCompiledItemDefinition`.\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._checkContextMatch( context as ModelSchemaContext, def as unknown as ModelSchemaCompiledItemDefinition );\n\t}\n\n\t/**\n\t * Checks whether the given attribute can be applied in the given context (on the last item of the context).\n\t *\n\t * ```ts\n\t * schema.checkAttribute( textNode, 'bold' ); // -> false\n\t *\n\t * schema.extend( '$text', {\n\t * \tallowAttributes: 'bold'\n\t * } );\n\t *\n\t * schema.checkAttribute( textNode, 'bold' ); // -> true\n\t * ```\n\t *\n\t * Both {@link module:engine/model/schema~ModelSchema#addAttributeCheck callback checks} and declarative rules (added when\n\t * {@link module:engine/model/schema~ModelSchema#register registering} and\n\t * {@link module:engine/model/schema~ModelSchema#extend extending} items)\n\t * are evaluated when this method is called.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * @fires checkAttribute\n\t * @param context The context in which the attribute will be checked.\n\t * @param attributeName Name of attribute to check in the given context.\n\t */\n\tpublic checkAttribute( context: ModelSchemaContextDefinition, attributeName: string ): boolean {\n\t\t// Note: `context` is already normalized here to `ModelSchemaContext`.\n\t\tconst def = this.getDefinition( ( context as ModelSchemaContext ).last );\n\n\t\tif ( !def ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// First, check all attribute checks declared as callbacks.\n\t\t// Note that `_evaluateAttributeChecks()` will return `undefined` if neither child check was applicable (no decision was made).\n\t\tconst isAllowed = this._evaluateAttributeChecks( context as ModelSchemaContext, attributeName );\n\n\t\t// If the decision was not made inside attribute check callbacks, then use declarative rules.\n\t\treturn isAllowed !== undefined ? isAllowed : def.allowAttributes.includes( attributeName );\n\t}\n\n\tpublic checkMerge( position: ModelPosition ): boolean;\n\tpublic checkMerge( baseElement: ModelElement, elementToMerge: ModelElement ): boolean;\n\n\t/**\n\t * Checks whether the given element (`elementToMerge`) can be merged with the specified base element (`positionOrBaseElement`).\n\t *\n\t * In other words &ndash; both elements are not a limit elements and whether `elementToMerge`'s children\n\t * {@link #checkChild are allowed} in the `positionOrBaseElement`.\n\t *\n\t * This check ensures that elements merged with {@link module:engine/model/writer~ModelWriter#merge `Writer#merge()`}\n\t * will be valid.\n\t *\n\t * Instead of elements, you can pass the instance of the {@link module:engine/model/position~ModelPosition} class as the\n\t * `positionOrBaseElement`. It means that the elements before and after the position will be checked whether they can be merged.\n\t *\n\t * @param positionOrBaseElement The position or base element to which the `elementToMerge` will be merged.\n\t * @param elementToMerge The element to merge. Required if `positionOrBaseElement` is an element.\n\t */\n\tpublic checkMerge( positionOrBaseElement: ModelPosition | ModelElement, elementToMerge?: ModelElement ): boolean {\n\t\tif ( positionOrBaseElement instanceof ModelPosition ) {\n\t\t\tconst nodeBefore = positionOrBaseElement.nodeBefore;\n\t\t\tconst nodeAfter = positionOrBaseElement.nodeAfter;\n\n\t\t\tif ( !( nodeBefore instanceof ModelElement ) ) {\n\t\t\t\t/**\n\t\t\t\t * The node before the merge position must be an element.\n\t\t\t\t *\n\t\t\t\t * @error schema-check-merge-no-element-before\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'schema-check-merge-no-element-before',\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( !( nodeAfter instanceof ModelElement ) ) {\n\t\t\t\t/**\n\t\t\t\t * The node after the merge position must be an element.\n\t\t\t\t *\n\t\t\t\t * @error schema-check-merge-no-element-after\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'schema-check-merge-no-element-after',\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn this.checkMerge( nodeBefore, nodeAfter );\n\t\t}\n\n\t\tif ( this.isLimit( positionOrBaseElement ) || this.isLimit( elementToMerge! ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const child of elementToMerge!.getChildren() ) {\n\t\t\tif ( !this.checkChild( positionOrBaseElement, child ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Allows registering a callback to the {@link #checkChild} method calls.\n\t *\n\t * Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t * by using the declarative API of {@link module:engine/model/schema~ModelSchemaItemDefinition}.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * For example, by using this method you can disallow elements in specific contexts:\n\t *\n\t * ```ts\n\t * // Disallow `heading1` inside a `blockQuote` that is inside a table.\n\t * schema.addChildCheck( ( context, childDefinition ) => {\n\t * \tif ( context.endsWith( 'tableCell blockQuote' ) ) {\n\t * \t\treturn false;\n\t * \t}\n\t * }, 'heading1' );\n\t * ```\n\t *\n\t * You can skip the optional `itemName` parameter to evaluate the callback for every `checkChild()` call.\n\t *\n\t * ```ts\n\t * // Inside specific custom element, allow only children, which allows for a specific attribute.\n\t * schema.addChildCheck( ( context, childDefinition ) => {\n\t * \tif ( context.endsWith( 'myElement' ) ) {\n\t * \t\treturn childDefinition.allowAttributes.includes( 'myAttribute' );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Please note that the generic callbacks may affect the editor performance and should be avoided if possible.\n\t *\n\t * When one of the callbacks makes a decision (returns `true` or `false`) the processing is finished and other callbacks are not fired.\n\t * Callbacks are fired in the order they were added, however generic callbacks are fired before callbacks added for a specified item.\n\t *\n\t * You can also use `checkChild` event, if you need even better control. The result from the example above could also be\n\t * achieved with following event callback:\n\t *\n\t * ```ts\n\t * schema.on( 'checkChild', ( evt, args ) => {\n\t * \tconst context = args[ 0 ];\n\t * \tconst childDefinition = args[ 1 ];\n\t *\n\t * \tif ( context.endsWith( 'myElement' ) ) {\n\t * \t\t// Prevent next listeners from being called.\n\t * \t\tevt.stop();\n\t * \t\t// Set the `checkChild()` return value.\n\t * \t\tevt.return = childDefinition.allowAttributes.includes( 'myAttribute' );\n\t * \t}\n\t * }, { priority: 'high' } );\n\t * ```\n\t *\n\t * Note that the callback checks and declarative rules checks are processed on `normal` priority.\n\t *\n\t * Adding callbacks this way can also negatively impact editor performance.\n\t *\n\t * @param callback The callback to be called. It is called with two parameters:\n\t * {@link module:engine/model/schema~ModelSchemaContext} (context) instance and\n\t * {@link module:engine/model/schema~ModelSchemaCompiledItemDefinition} (definition). The callback may return `true/false` to\n\t * override `checkChild()`'s return value. If it does not return a boolean value, the default algorithm (or other callbacks) will define\n\t * `checkChild()`'s return value.\n\t * @param itemName Name of the schema item for which the callback is registered. If specified, the callback will be run only for\n\t * `checkChild()` calls which `def` parameter matches the `itemName`. Otherwise, the callback will run for every `checkChild` call.\n\t */\n\tpublic addChildCheck( callback: ModelSchemaChildCheckCallback, itemName?: string ): void {\n\t\tconst key = itemName !== undefined ? itemName : this._genericCheckSymbol;\n\n\t\tconst checks = this._customChildChecks.get( key ) || [];\n\t\tchecks.push( callback );\n\n\t\tthis._customChildChecks.set( key, checks );\n\t}\n\n\t/**\n\t * Allows registering a callback to the {@link #checkAttribute} method calls.\n\t *\n\t * Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t * by using the declarative API of {@link module:engine/model/schema~ModelSchemaItemDefinition}.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * For example, by using this method you can disallow setting attributes on nodes in specific contexts:\n\t *\n\t * ```ts\n\t * // Disallow setting `bold` on text inside `heading1` element:\n\t * schema.addAttributeCheck( context => {\n\t * \tif ( context.endsWith( 'heading1 $text' ) ) {\n\t * \t\treturn false;\n\t * \t}\n\t * }, 'bold' );\n\t * ```\n\t *\n\t * You can skip the optional `attributeName` parameter to evaluate the callback for every `checkAttribute()` call.\n\t *\n\t * ```ts\n\t * // Disallow formatting attributes on text inside custom `myTitle` element:\n\t * schema.addAttributeCheck( ( context, attributeName ) => {\n\t * \tif ( context.endsWith( 'myTitle $text' ) && schema.getAttributeProperties( attributeName ).isFormatting ) {\n\t * \t\treturn false;\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Please note that the generic callbacks may affect the editor performance and should be avoided if possible.\n\t *\n\t * When one of the callbacks makes a decision (returns `true` or `false`) the processing is finished and other callbacks are not fired.\n\t * Callbacks are fired in the order they were added, however generic callbacks are fired before callbacks added for a specified item.\n\t *\n\t * You can also use {@link #event:checkAttribute} event, if you need even better control. The result from the example above could also\n\t * be achieved with following event callback:\n\t *\n\t * ```ts\n\t * schema.on( 'checkAttribute', ( evt, args ) => {\n\t * \tconst context = args[ 0 ];\n\t * \tconst attributeName = args[ 1 ];\n\t *\n\t * \tif ( context.endsWith( 'myTitle $text' ) && schema.getAttributeProperties( attributeName ).isFormatting ) {\n\t * \t\t// Prevent next listeners from being called.\n\t * \t\tevt.stop();\n\t * \t\t// Set the `checkAttribute()` return value.\n\t * \t\tevt.return = false;\n\t * \t}\n\t * }, { priority: 'high' } );\n\t * ```\n\t *\n\t * Note that the callback checks and declarative rules checks are processed on `normal` priority.\n\t *\n\t * Adding callbacks this way can also negatively impact editor performance.\n\t *\n\t * @param callback The callback to be called. It is called with two parameters:\n\t * {@link module:engine/model/schema~ModelSchemaContext `context`} and attribute name. The callback may return `true` or `false`, to\n\t * override `checkAttribute()`'s return value. If it does not return a boolean value, the default algorithm (or other callbacks)\n\t * will define `checkAttribute()`'s return value.\n\t * @param attributeName Name of the attribute for which the callback is registered. If specified, the callback will be run only for\n\t * `checkAttribute()` calls with matching `attributeName`. Otherwise, the callback will run for every `checkAttribute()` call.\n\t */\n\tpublic addAttributeCheck( callback: ModelSchemaAttributeCheckCallback, attributeName?: string ): void {\n\t\tconst key = attributeName !== undefined ? attributeName : this._genericCheckSymbol;\n\n\t\tconst checks = this._customAttributeChecks.get( key ) || [];\n\t\tchecks.push( callback );\n\n\t\tthis._customAttributeChecks.set( key, checks );\n\t}\n\n\t/**\n\t * This method allows assigning additional metadata to the model attributes. For example,\n\t * {@link module:engine/model/schema~ModelAttributeProperties `AttributeProperties#isFormatting` property} is\n\t * used to mark formatting attributes (like `bold` or `italic`).\n\t *\n\t * ```ts\n\t * // Mark bold as a formatting attribute.\n\t * schema.setAttributeProperties( 'bold', {\n\t * \tisFormatting: true\n\t * } );\n\t *\n\t * // Override code not to be considered a formatting markup.\n\t * schema.setAttributeProperties( 'code', {\n\t * \tisFormatting: false\n\t * } );\n\t * ```\n\t *\n\t * Properties are not limited to members defined in the\n\t * {@link module:engine/model/schema~ModelAttributeProperties `AttributeProperties` type} and you can also use custom properties:\n\t *\n\t * ```ts\n\t * schema.setAttributeProperties( 'blockQuote', {\n\t * \tcustomProperty: 'value'\n\t * } );\n\t * ```\n\t *\n\t * Subsequent calls with the same attribute will extend its custom properties:\n\t *\n\t * ```ts\n\t * schema.setAttributeProperties( 'blockQuote', {\n\t * \tone: 1\n\t * } );\n\t *\n\t * schema.setAttributeProperties( 'blockQuote', {\n\t * \ttwo: 2\n\t * } );\n\t *\n\t * console.log( schema.getAttributeProperties( 'blockQuote' ) );\n\t * // Logs: { one: 1, two: 2 }\n\t * ```\n\t *\n\t * @param attributeName A name of the attribute to receive the properties.\n\t * @param properties A dictionary of properties.\n\t */\n\tpublic setAttributeProperties( attributeName: string, properties: ModelAttributeProperties ): void {\n\t\tthis._attributeProperties[ attributeName ] = Object.assign( this.getAttributeProperties( attributeName ), properties );\n\t}\n\n\t/**\n\t * Returns properties associated with a given model attribute. See {@link #setAttributeProperties `setAttributeProperties()`}.\n\t *\n\t * @param attributeName A name of the attribute.\n\t */\n\tpublic getAttributeProperties( attributeName: string ): ModelAttributeProperties {\n\t\treturn this._attributeProperties[ attributeName ] || Object.create( null );\n\t}\n\n\t/**\n\t * Returns the lowest {@link module:engine/model/schema~ModelSchema#isLimit limit element} containing the entire\n\t * selection/range/position or the root otherwise.\n\t *\n\t * @param selectionOrRangeOrPosition The selection/range/position to check.\n\t * @returns The lowest limit element containing the entire `selectionOrRangeOrPosition`.\n\t */\n\tpublic getLimitElement(\n\t\tselectionOrRangeOrPosition: ModelSelection | ModelDocumentSelection | ModelRange | ModelPosition\n\t): ModelElement {\n\t\tlet element: ModelElement;\n\n\t\tif ( selectionOrRangeOrPosition instanceof ModelPosition ) {\n\t\t\telement = selectionOrRangeOrPosition.parent as ModelElement;\n\t\t} else {\n\t\t\tconst ranges = selectionOrRangeOrPosition instanceof ModelRange ?\n\t\t\t\t[ selectionOrRangeOrPosition ] :\n\t\t\t\tArray.from( selectionOrRangeOrPosition.getRanges() );\n\n\t\t\t// Find the common ancestor for all selection's ranges.\n\t\t\telement = ranges\n\t\t\t\t.reduce<ModelElement | null>( ( element, range ) => {\n\t\t\t\t\tconst rangeCommonAncestor = range.getCommonAncestor() as ( ModelElement | null );\n\n\t\t\t\t\tif ( !element ) {\n\t\t\t\t\t\treturn rangeCommonAncestor;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element.getCommonAncestor( rangeCommonAncestor as ModelElement, { includeSelf: true } ) as ModelElement;\n\t\t\t\t}, null )!;\n\t\t}\n\n\t\twhile ( !this.isLimit( element ) ) {\n\t\t\tif ( element.parent ) {\n\t\t\t\telement = element.parent as ModelElement;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn element;\n\t}\n\n\t/**\n\t * Checks whether the attribute is allowed in selection:\n\t *\n\t * * if the selection is not collapsed, then checks if the attribute is allowed on any of nodes in that range,\n\t * * if the selection is collapsed, then checks if on the selection position there's a text with the\n\t * specified attribute allowed.\n\t *\n\t * @param selection Selection which will be checked.\n\t * @param attribute The name of the attribute to check.\n\t */\n\tpublic checkAttributeInSelection( selection: ModelSelection | ModelDocumentSelection, attribute: string ): boolean {\n\t\tif ( selection.isCollapsed ) {\n\t\t\tconst firstPosition = selection.getFirstPosition()!;\n\t\t\tconst context = [\n\t\t\t\t...firstPosition.getAncestors() as Array<ModelElement>,\n\t\t\t\tnew ModelText( '', selection.getAttributes() )\n\t\t\t];\n\n\t\t\t// Check whether schema allows for a text with the attribute in the selection.\n\t\t\treturn this.checkAttribute( context, attribute );\n\t\t} else {\n\t\t\tconst ranges = selection.getRanges();\n\n\t\t\t// For all ranges, check nodes in them until you find a node that is allowed to have the attribute.\n\t\t\tfor ( const range of ranges ) {\n\t\t\t\tfor ( const value of range ) {\n\t\t\t\t\tif ( this.checkAttribute( value.item, attribute ) ) {\n\t\t\t\t\t\t// If we found a node that is allowed to have the attribute, return true.\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we haven't found such node, return false.\n\t\treturn false;\n\t}\n\n\t/**\n\t * Transforms the given set of ranges into a set of ranges where the given attribute is allowed (and can be applied).\n\t *\n\t * @param ranges Ranges to be validated.\n\t * @param attribute The name of the attribute to check.\n\t * @param options Optional configuration.\n\t * @param options.includeEmptyRanges When `true`, empty ranges that allow the attribute are also included\n\t * in the returned ranges.\n\t * @returns Ranges in which the attribute is allowed.\n\t */\n\tpublic* getValidRanges(\n\t\tranges: Iterable<ModelRange>,\n\t\tattribute: string,\n\t\toptions: { includeEmptyRanges?: boolean } = {}\n\t): IterableIterator<ModelRange> {\n\t\tranges = convertToMinimalFlatRanges( ranges );\n\n\t\tfor ( const range of ranges ) {\n\t\t\tyield* this._getValidRangesForRange( range, attribute, options );\n\t\t}\n\t}\n\n\t/**\n\t * Basing on given `position`, finds and returns a {@link module:engine/model/range~ModelRange range} which is\n\t * nearest to that `position` and is a correct range for selection.\n\t *\n\t * The correct selection range might be collapsed when it is located in a position where the text node can be placed.\n\t * Non-collapsed range is returned when selection can be placed around element marked as an \"object\" in\n\t * the {@link module:engine/model/schema~ModelSchema schema}.\n\t *\n\t * Direction of searching for the nearest correct selection range can be specified as:\n\t *\n\t * * `both` - searching will be performed in both ways,\n\t * * `forward` - searching will be performed only forward,\n\t * * `backward` - searching will be performed only backward.\n\t *\n\t * When valid selection range cannot be found, `null` is returned.\n\t *\n\t * @param position Reference position where new selection range should be looked for.\n\t * @param direction Search direction.\n\t * @returns Nearest selection range or `null` if one cannot be found.\n\t */\n\tpublic getNearestSelectionRange( position: ModelPosition, direction: 'both' | 'forward' | 'backward' = 'both' ): ModelRange | null {\n\t\tif ( position.root.rootName == '$graveyard' ) {\n\t\t\t// No valid selection range in the graveyard.\n\t\t\t// This is important when getting the document selection default range.\n\t\t\treturn null;\n\t\t}\n\n\t\t// Return collapsed range if provided position is valid.\n\t\tif ( this.checkChild( position, '$text' ) ) {\n\t\t\treturn new ModelRange( position );\n\t\t}\n\n\t\tlet backwardWalker, forwardWalker;\n\n\t\t// Never leave a limit element.\n\t\tconst limitElement = ( position.getAncestors() as Array<ModelElement> ).reverse().find( item => this.isLimit( item ) ) ||\n\t\t\tposition.root as ModelElement;\n\n\t\tif ( direction == 'both' || direction == 'backward' ) {\n\t\t\tbackwardWalker = new ModelTreeWalker( {\n\t\t\t\tboundaries: ModelRange._createIn( limitElement ),\n\t\t\t\tstartPosition: position,\n\t\t\t\tdirection: 'backward'\n\t\t\t} );\n\t\t}\n\n\t\tif ( direction == 'both' || direction == 'forward' ) {\n\t\t\tforwardWalker = new ModelTreeWalker( {\n\t\t\t\tboundaries: ModelRange._createIn( limitElement ),\n\t\t\t\tstartPosition: position\n\t\t\t} );\n\t\t}\n\n\t\tfor ( const data of combineWalkers( backwardWalker, forwardWalker ) ) {\n\t\t\tconst type = ( data.walker == backwardWalker ? 'elementEnd' : 'elementStart' );\n\t\t\tconst value = data.value;\n\n\t\t\tif ( value.type == type && this.isObject( value.item ) ) {\n\t\t\t\treturn ModelRange._createOn( value.item );\n\t\t\t}\n\n\t\t\tif ( this.checkChild( value.nextPosition, '$text' ) ) {\n\t\t\t\treturn new ModelRange( value.nextPosition );\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Tries to find position ancestors that allow to insert a given node.\n\t * It starts searching from the given position and goes node by node to the top of the model tree\n\t * as long as a {@link module:engine/model/schema~ModelSchema#isLimit limit element}, an\n\t * {@link module:engine/model/schema~ModelSchema#isObject object element} or a topmost ancestor is not reached.\n\t *\n\t * @param position The position that the search will start from.\n\t * @param node The node for which an allowed parent should be found or its name.\n\t * @returns Allowed parent or null if nothing was found.\n\t */\n\tpublic findAllowedParent( position: ModelPosition, node: ModelNode | string ): ModelElement | null {\n\t\tlet parent = position.parent as ( ModelElement | null );\n\n\t\twhile ( parent ) {\n\t\t\tif ( this.checkChild( parent, node ) ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\t// Do not split limit elements.\n\t\t\tif ( this.isLimit( parent ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tparent = parent.parent as ( ModelElement | null );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Sets attributes allowed by the schema on a given node.\n\t *\n\t * @param node A node to set attributes on.\n\t * @param attributes Attributes keys and values.\n\t * @param writer An instance of the model writer.\n\t */\n\tpublic setAllowedAttributes(\n\t\tnode: ModelNode,\n\t\tattributes: Record<string, unknown>,\n\t\twriter: ModelWriter\n\t): void {\n\t\tconst model = writer.model;\n\n\t\tfor ( const [ attributeName, attributeValue ] of Object.entries( attributes ) ) {\n\t\t\tif ( model.schema.checkAttribute( node, attributeName ) ) {\n\t\t\t\twriter.setAttribute( attributeName, attributeValue, node );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes attributes disallowed by the schema.\n\t *\n\t * @param nodes Nodes that will be filtered.\n\t */\n\tpublic removeDisallowedAttributes( nodes: Iterable<ModelNode>, writer: ModelWriter ): void {\n\t\tfor ( const node of nodes ) {\n\t\t\t// When node is a `Text` it has no children, so just filter it out.\n\t\t\tif ( node.is( '$text' ) ) {\n\t\t\t\tremoveDisallowedAttributeFromNode( this, node, writer );\n\t\t\t}\n\t\t\t// In a case of `Element` iterates through positions between nodes inside this element\n\t\t\t// and filter out node before the current position, or position parent when position\n\t\t\t// is at start of an element. Using positions prevent from omitting merged nodes\n\t\t\t// see https://github.com/ckeditor/ckeditor5-engine/issues/1789.\n\t\t\telse {\n\t\t\t\tconst rangeInNode = ModelRange._createIn( node as ModelElement );\n\t\t\t\tconst positionsInRange = rangeInNode.getPositions();\n\n\t\t\t\tfor ( const position of positionsInRange ) {\n\t\t\t\t\tconst item = position.nodeBefore || position.parent;\n\n\t\t\t\t\tremoveDisallowedAttributeFromNode( this, item as any, writer );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets attributes of a node that have a given property.\n\t *\n\t * @param node Node to get attributes from.\n\t * @param propertyName Name of the property that attribute must have to return it.\n\t * @param propertyValue Desired value of the property that we want to check.\n\t * When `undefined` attributes will be returned if they have set a given property no matter what the value is. If specified it will\n\t * return attributes which given property's value is equal to this parameter.\n\t * @returns Object with attributes' names as key and attributes' values as value.\n\t */\n\tpublic getAttributesWithProperty( node: ModelNode, propertyName: string, propertyValue: unknown ): Record<string, unknown> {\n\t\tconst attributes: Record<string, unknown> = {};\n\n\t\tfor ( const [ attributeName, attributeValue ] of node.getAttributes() ) {\n\t\t\tconst attributeProperties = this.getAttributeProperties( attributeName );\n\n\t\t\tif ( attributeProperties[ propertyName ] === undefined ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( propertyValue === undefined || propertyValue === attributeProperties[ propertyName ] ) {\n\t\t\t\tattributes[ attributeName ] = attributeValue;\n\t\t\t}\n\t\t}\n\n\t\treturn attributes;\n\t}\n\n\t/**\n\t * Creates an instance of the schema context.\n\t */\n\tpublic createContext( context: ModelSchemaContextDefinition ): ModelSchemaContext {\n\t\treturn new ModelSchemaContext( context );\n\t}\n\n\tprivate _clearCache(): void {\n\t\tthis._compiledDefinitions = null;\n\t}\n\n\tprivate _compile(): void {\n\t\tconst definitions: Record<string, ModelSchemaCompiledItemDefinitionInternal> = {};\n\t\tconst sourceRules = this._sourceDefinitions;\n\t\tconst itemNames = Object.keys( sourceRules );\n\n\t\tfor ( const itemName of itemNames ) {\n\t\t\tdefinitions[ itemName ] = compileBaseItemRule( sourceRules[ itemName ], itemName );\n\t\t}\n\n\t\tconst items = Object.values( definitions );\n\n\t\t// Sometimes features add rules (allows, disallows) for items that has not been registered yet. We allow that, to make it easier\n\t\t// to put the schema together. However, sometimes these items are never registered. To prevent operating\n\t\t// removeUnregisteredEntries( definitions, items );\n\n\t\t// 1. Propagate `childItem.allowIn` to `parentItem.allowChildren` and vice versa, so that these properties are completely mirrored\n\t\t// for all children and parents. Do the same for `disallowIn` and `disallowChildren`.\n\t\tfor ( const item of items ) {\n\t\t\tpropagateAllowIn( definitions, item );\n\t\t\tpropagateAllowChildren( definitions, item );\n\t\t\tpropagateDisallowIn( definitions, item );\n\t\t\tpropagateDisallowChildren( definitions, item );\n\t\t}\n\n\t\t// 2. Remove from `allowIn` and `allowChildren` these items which where disallowed by `disallowIn` and `disallowChildren`.\n\t\t// Do the same for attributes. Now we have a clear situation where which item/attribute is allowed. Inheritance is in next steps.\n\t\tfor ( const item of items ) {\n\t\t\tresolveDisallows( definitions, item );\n\t\t}\n\n\t\t// 3. Compile `item.allowContentOf` property. For each entry in `allowContentOf`, we want to take `allowChildren` and rewrite\n\t\t// them into `item.allowChildren`. `item.disallowChildren` is used to filter out some entries. This way \"own rules\" have higher\n\t\t// priority than \"inherited rules\". Mirroring from step 1. is maintained.\n\t\tfor ( const item of items ) {\n\t\t\tcompileAllowContentOf( definitions, item );\n\t\t}\n\n\t\t// 4. Compile `item.allowWhere` property. For each entry in `allowWhere`, we want to take `allowIn` and rewrite them into\n\t\t// `item.allowIn`. `item.disallowIn` is used to filter out some entries. This way \"own rules\" have higher priority than\n\t\t// \"inherited rules\". Mirroring from step 1. is maintained.\n\t\tfor ( const item of items ) {\n\t\t\tcompileAllowWhere( definitions, item );\n\t\t}\n\n\t\t// 5. Compile `item.allowAttributesOf`. For each entry in `allowAttributesOf`, we want to take `allowAttributes` and rewrite them\n\t\t// into `item.allowAttributes`. `item.disallowAttributes` is used to filter out some entries. This way \"own rules\" have higher\n\t\t// priority than \"inherited rules\".\n\t\tfor ( const item of items ) {\n\t\t\tcompileAllowAttributesOf( definitions, item );\n\t\t}\n\n\t\t// 6. Compile `item.inheritTypesFrom` property. For each entry in `inheritTypesFrom`, we want to take `is*` properties and\n\t\t// set them on `item` (if they are not set yet).\n\t\tfor ( const item of items ) {\n\t\t\tcompileInheritPropertiesFrom( definitions, item );\n\t\t}\n\n\t\t// Compile final definitions. Unnecessary properties are removed and some additional cleaning is applied.\n\t\tthis._compiledDefinitions = compileDefinitions( definitions );\n\t}\n\n\tprivate _checkContextMatch( context: ModelSchemaContext, def: ModelSchemaCompiledItemDefinition ): boolean {\n\t\tconst parentItem = context.last;\n\n\t\t// First, check all child checks declared as callbacks.\n\t\t// Note that `_evaluateChildChecks()` will return `undefined` if neither child check was applicable (no decision was made).\n\t\tlet isAllowed = this._evaluateChildChecks( context, def );\n\n\t\t// If the decision was not made inside child check callbacks, then use declarative rules.\n\t\tisAllowed = isAllowed !== undefined ? isAllowed : def.allowIn.includes( parentItem.name );\n\n\t\t// If the item is not allowed in the `context`, return `false`.\n\t\tif ( !isAllowed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the item is allowed, recursively verify the rest of the `context`.\n\t\tconst parentItemDefinition = this.getDefinition( parentItem );\n\t\tconst parentContext = context.trimLast();\n\n\t\t// One of the items in the original `context` did not have a definition specified. In this case, the whole context is disallowed.\n\t\tif ( !parentItemDefinition ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Whole `context` was verified and passed checks.\n\t\tif ( parentContext.length == 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Verify \"truncated\" parent context. The last item of the original context is now the definition to check.\n\t\treturn this._checkContextMatch( parentContext, parentItemDefinition );\n\t}\n\n\t/**\n\t * Calls child check callbacks to decide whether `def` is allowed in `context`. It uses both generic and specific (defined for `def`\n\t * item) callbacks. If neither callback makes a decision, `undefined` is returned.\n\t *\n\t * Note that the first callback that makes a decision \"wins\", i.e., if any callback returns `true` or `false`, then the processing\n\t * is over and that result is returned.\n\t */\n\tprivate _evaluateChildChecks( context: ModelSchemaContext, def: ModelSchemaCompiledItemDefinition ): boolean | undefined {\n\t\tconst genericChecks = this._customChildChecks.get( this._genericCheckSymbol ) || [];\n\t\tconst childChecks = this._customChildChecks.get( def.name ) || [];\n\n\t\tfor ( const check of [ ...genericChecks, ...childChecks ] ) {\n\t\t\tconst result = check( context, def );\n\n\t\t\tif ( result !== undefined ) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calls attribute check callbacks to decide whether `attributeName` can be set on the last element of `context`. It uses both\n\t * generic and specific (defined for `attributeName`) callbacks. If neither callback makes a decision, `undefined` is returned.\n\t *\n\t * Note that the first callback that makes a decision \"wins\", i.e., if any callback returns `true` or `false`, then the processing\n\t * is over and that result is returned.\n\t */\n\tprivate _evaluateAttributeChecks( context: ModelSchemaContext, attributeName: string ): boolean | undefined {\n\t\tconst genericChecks = this._customAttributeChecks.get( this._genericCheckSymbol ) || [];\n\t\tconst childChecks = this._customAttributeChecks.get( attributeName ) || [];\n\n\t\tfor ( const check of [ ...genericChecks, ...childChecks ] ) {\n\t\t\tconst result = check( context, attributeName );\n\n\t\t\tif ( result !== undefined ) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Takes a flat range and an attribute name. Traverses the range recursively and deeply to find and return all ranges\n\t * inside the given range on which the attribute can be applied.\n\t *\n\t * This is a helper function for {@link ~ModelSchema#getValidRanges}.\n\t *\n\t * @param range The range to process.\n\t * @param attribute The name of the attribute to check.\n\t * @returns Ranges in which the attribute is allowed.\n\t */\n\tprivate* _getValidRangesForRange(\n\t\trange: ModelRange,\n\t\tattribute: string,\n\t\toptions: { includeEmptyRanges?: boolean }\n\t): Iterable<ModelRange> {\n\t\tlet start = range.start;\n\t\tlet end = range.start;\n\n\t\tfor ( const item of range.getItems( { shallow: true } ) ) {\n\t\t\tif ( item.is( 'element' ) ) {\n\t\t\t\tif ( options.includeEmptyRanges && item.isEmpty ) {\n\t\t\t\t\t// In empty block check if it accepts text with the given attribute.\n\t\t\t\t\tconst context = this.createContext( item );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.checkChild( context, '$text' ) &&\n\t\t\t\t\t\tthis.checkAttribute( context.push( '$text' ), attribute )\n\t\t\t\t\t) {\n\t\t\t\t\t\tyield ModelRange._createIn( item );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tyield* this._getValidRangesForRange( ModelRange._createIn( item ), attribute, options );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !this.checkAttribute( item, attribute ) ) {\n\t\t\t\tif ( !start.isEqual( end ) ) {\n\t\t\t\t\tyield new ModelRange( start, end );\n\t\t\t\t}\n\n\t\t\t\tstart = ModelPosition._createAfter( item );\n\t\t\t}\n\n\t\t\tend = ModelPosition._createAfter( item );\n\t\t}\n\n\t\tif ( !start.isEqual( end ) ) {\n\t\t\tyield new ModelRange( start, end );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a model range which is optimal (in terms of UX) for inserting a widget block.\n\t *\n\t * For instance, if a selection is in the middle of a paragraph, the collapsed range before this paragraph\n\t * will be returned so that it is not split. If the selection is at the end of a paragraph,\n\t * the collapsed range after this paragraph will be returned.\n\t *\n\t * Note: If the selection is placed in an empty block, the range in that block will be returned. If that range\n\t * is then passed to {@link module:engine/model/model~Model#insertContent}, the block will be fully replaced\n\t * by the inserted widget block.\n\t *\n\t * @internal\n\t * @param selection The selection based on which the insertion position should be calculated.\n\t * @param place The place where to look for optimal insertion range.\n\t * The `auto` value will determine itself the best position for insertion.\n\t * The `before` value will try to find a position before selection.\n\t * The `after` value will try to find a position after selection.\n\t * @returns The optimal range.\n\t */\n\tpublic findOptimalInsertionRange(\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\tplace?: 'auto' | 'before' | 'after'\n\t): ModelRange {\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\tif ( selectedElement && this.isObject( selectedElement ) && !this.isInline( selectedElement ) ) {\n\t\t\tif ( place == 'before' || place == 'after' ) {\n\t\t\t\treturn new ModelRange( ModelPosition._createAt( selectedElement, place ) );\n\t\t\t}\n\n\t\t\treturn ModelRange._createOn( selectedElement );\n\t\t}\n\n\t\tconst firstBlock = first( selection.getSelectedBlocks() );\n\n\t\t// There are no block elements within ancestors (in the current limit element).\n\t\tif ( !firstBlock ) {\n\t\t\treturn new ModelRange( selection.focus! );\n\t\t}\n\n\t\t// If inserting into an empty block – return position in that block. It will get\n\t\t// replaced with the image by insertContent(). #42.\n\t\tif ( firstBlock.isEmpty ) {\n\t\t\treturn new ModelRange( ModelPosition._createAt( firstBlock, 0 ) );\n\t\t}\n\n\t\tconst positionAfter = ModelPosition._createAfter( firstBlock );\n\n\t\t// If selection is at the end of the block - return position after the block.\n\t\tif ( selection.focus!.isTouching( positionAfter ) ) {\n\t\t\treturn new ModelRange( positionAfter );\n\t\t}\n\n\t\t// Otherwise, return position before the block.\n\t\treturn new ModelRange( ModelPosition._createBefore( firstBlock ) );\n\t}\n}\n\n/**\n * Event fired when the {@link ~ModelSchema#checkChild} method is called. It allows plugging in\n * additional behavior, for example implementing rules which cannot be defined using the declarative\n * {@link module:engine/model/schema~ModelSchemaItemDefinition} interface.\n *\n * **Note:** The {@link ~ModelSchema#addChildCheck} method is a more handy way to register callbacks. Internally,\n * it registers a listener to this event but comes with a simpler API and it is the recommended choice\n * in most of the cases.\n *\n * The {@link ~ModelSchema#checkChild} method fires an event because it is\n * {@link module:utils/observablemixin~Observable#decorate decorated} with it. Thanks to that you can\n * use this event in various ways, but the most important use case is overriding standard behavior of the\n * `checkChild()` method. Let's see a typical listener template:\n *\n * ```ts\n * schema.on( 'checkChild', ( evt, args ) => {\n * \tconst context = args[ 0 ];\n * \tconst childDefinition = args[ 1 ];\n * }, { priority: 'high' } );\n * ```\n *\n * The listener is added with a `high` priority to be executed before the default method is really called. The `args` callback\n * parameter contains arguments passed to `checkChild( context, child )`. However, the `context` parameter is already\n * normalized to a {@link module:engine/model/schema~ModelSchemaContext} instance and `child` to a\n * {@link module:engine/model/schema~ModelSchemaCompiledItemDefinition} instance, so you do not have to worry about\n * the various ways how `context` and `child` may be passed to `checkChild()`.\n *\n * **Note:** `childDefinition` may be `undefined` if `checkChild()` was called with a non-registered element.\n *\n * So, in order to implement a rule \"disallow `heading1` in `blockQuote`\", you can add such a listener:\n *\n * ```ts\n * schema.on( 'checkChild', ( evt, args ) => {\n * \tconst context = args[ 0 ];\n * \tconst childDefinition = args[ 1 ];\n *\n * \tif ( context.endsWith( 'blockQuote' ) && childDefinition && childDefinition.name == 'heading1' ) {\n * \t\t// Prevent next listeners from being called.\n * \t\tevt.stop();\n * \t\t// Set the checkChild()'s return value.\n * \t\tevt.return = false;\n * \t}\n * }, { priority: 'high' } );\n * ```\n *\n * Allowing elements in specific contexts will be a far less common use case, because it is normally handled by the\n * `allowIn` rule from {@link module:engine/model/schema~ModelSchemaItemDefinition}. But if you have a complex scenario\n * where `listItem` should be allowed only in element `foo` which must be in element `bar`, then this would be the way:\n *\n * ```ts\n * schema.on( 'checkChild', ( evt, args ) => {\n * \tconst context = args[ 0 ];\n * \tconst childDefinition = args[ 1 ];\n *\n * \tif ( context.endsWith( 'bar foo' ) && childDefinition.name == 'listItem' ) {\n * \t\t// Prevent next listeners from being called.\n * \t\tevt.stop();\n * \t\t// Set the checkChild()'s return value.\n * \t\tevt.return = true;\n * \t}\n * }, { priority: 'high' } );\n * ```\n *\n * @eventName ~ModelSchema#checkChild\n * @param args The `checkChild()`'s arguments.\n */\nexport type ModelSchemaCheckChildEvent = {\n\tname: 'checkChild';\n\targs: [ [ context: ModelSchemaContext, def: ModelSchemaCompiledItemDefinition ] ];\n};\n\n/**\n * Event fired when the {@link ~ModelSchema#checkAttribute} method is called. It allows plugging in\n * additional behavior, for example implementing rules which cannot be defined using the declarative\n * {@link module:engine/model/schema~ModelSchemaItemDefinition} interface.\n *\n * **Note:** The {@link ~ModelSchema#addAttributeCheck} method is a more handy way to register callbacks. Internally,\n * it registers a listener to this event but comes with a simpler API and it is the recommended choice\n * in most of the cases.\n *\n * The {@link ~ModelSchema#checkAttribute} method fires an event because it is\n * {@link module:utils/observablemixin~Observable#decorate decorated} with it. Thanks to that you can\n * use this event in various ways, but the most important use case is overriding the standard behavior of the\n * `checkAttribute()` method. Let's see a typical listener template:\n *\n * ```ts\n * schema.on( 'checkAttribute', ( evt, args ) => {\n * \tconst context = args[ 0 ];\n * \tconst attributeName = args[ 1 ];\n * }, { priority: 'high' } );\n * ```\n *\n * The listener is added with a `high` priority to be executed before the default method is really called. The `args` callback\n * parameter contains arguments passed to `checkAttribute( context, attributeName )`. However, the `context` parameter is already\n * normalized to a {@link module:engine/model/schema~ModelSchemaContext} instance, so you do not have to worry about\n * the various ways how `context` may be passed to `checkAttribute()`.\n *\n * So, in order to implement a rule \"disallow `bold` in a text which is in a `heading1`, you can add such a listener:\n *\n * ```ts\n * schema.on( 'checkAttribute', ( evt, args ) => {\n * \tconst context = args[ 0 ];\n * \tconst attributeName = args[ 1 ];\n *\n * \tif ( context.endsWith( 'heading1 $text' ) && attributeName == 'bold' ) {\n * \t\t// Prevent next listeners from being called.\n * \t\tevt.stop();\n * \t\t// Set the checkAttribute()'s return value.\n * \t\tevt.return = false;\n * \t}\n * }, { priority: 'high' } );\n * ```\n *\n * Allowing attributes in specific contexts will be a far less common use case, because it is normally handled by the\n * `allowAttributes` rule from {@link module:engine/model/schema~ModelSchemaItemDefinition}. But if you have a complex scenario\n * where `bold` should be allowed only in element `foo` which must be in element `bar`, then this would be the way:\n *\n * ```ts\n * schema.on( 'checkAttribute', ( evt, args ) => {\n * \tconst context = args[ 0 ];\n * \tconst attributeName = args[ 1 ];\n *\n * \tif ( context.endsWith( 'bar foo $text' ) && attributeName == 'bold' ) {\n * \t\t// Prevent next listeners from being called.\n * \t\tevt.stop();\n * \t\t// Set the checkAttribute()'s return value.\n * \t\tevt.return = true;\n * \t}\n * }, { priority: 'high' } );\n * ```\n *\n * @eventName ~ModelSchema#checkAttribute\n * @param args The `checkAttribute()`'s arguments.\n */\nexport type ModelSchemaCheckAttributeEvent = {\n\tname: 'checkAttribute';\n\targs: [ [ context: ModelSchemaContext, attributeName: string ] ];\n};\n\n/**\n * A definition of a {@link module:engine/model/schema~ModelSchema schema} item.\n *\n * You can define the following rules:\n *\n * * {@link ~ModelSchemaItemDefinition#allowIn `allowIn`} &ndash; Defines in which other items this item will be allowed.\n * * {@link ~ModelSchemaItemDefinition#allowChildren `allowChildren`} &ndash; Defines which other items are allowed inside this item.\n * * {@link ~ModelSchemaItemDefinition#allowAttributes `allowAttributes`} &ndash; Defines allowed attributes of the given item.\n * * {@link ~ModelSchemaItemDefinition#disallowIn `disallowIn`} &ndash; Defines in which other items this item will be disallowed.\n * * {@link ~ModelSchemaItemDefinition#disallowChildren `disallowChildren`} &ndash; Defines which other items are\n * disallowed inside this item.\n * * {@link ~ModelSchemaItemDefinition#disallowAttributes `disallowAttributes`} &ndash; Defines disallowed attributes of the given item.\n * * {@link ~ModelSchemaItemDefinition#allowContentOf `allowContentOf`} &ndash; Makes this item allow children that are also allowed in the\n * specified items. This acknowledges disallow rules.\n * * {@link ~ModelSchemaItemDefinition#allowWhere `allowWhere`} &ndash; Makes this item allowed where the specified items are allowed. This\n * acknowledges disallow rules.\n * * {@link ~ModelSchemaItemDefinition#allowAttributesOf `allowAttributesOf`} &ndash; Inherits attributes from other items.\n * This acknowledges disallow rules.\n * * {@link ~ModelSchemaItemDefinition#inheritTypesFrom `inheritTypesFrom`} &ndash; Inherits `is*` properties of other items.\n * * {@link ~ModelSchemaItemDefinition#inheritAllFrom `inheritAllFrom`} &ndash;\n * A shorthand for `allowContentOf`, `allowWhere`, `allowAttributesOf`, `inheritTypesFrom`.\n *\n * # The `is*` properties\n *\n * There are a couple commonly used `is*` properties. Their role is to assign additional semantics to schema items.\n *\n * * {@link ~ModelSchemaItemDefinition#isBlock `isBlock`} &ndash; Whether this item is paragraph-like.\n * Generally speaking, content is usually made out of blocks like paragraphs, list items, images, headings, etc.\n * * {@link ~ModelSchemaItemDefinition#isInline `isInline`} &ndash; Whether an item is \"text-like\" and should be treated as an inline node.\n * Examples of inline elements: `$text`, `softBreak` (`<br>`), etc.\n * * {@link ~ModelSchemaItemDefinition#isLimit `isLimit`} &ndash; It can be understood as whether this element\n * should not be split by <kbd>Enter</kbd>. Examples of limit elements: `$root`, table cell, image caption, etc.\n * In other words, all actions that happen inside a limit element are limited to its content.\n * All objects are treated as limit elements, too.\n * * {@link ~ModelSchemaItemDefinition#isObject `isObject`} &ndash; Whether an item is \"self-contained\" and should be treated as a whole.\n * Examples of object elements: `imageBlock`, `table`, `video`, etc. An object is also a limit, so\n * {@link module:engine/model/schema~ModelSchema#isLimit `isLimit()`} returns `true` for object elements automatically.\n *\n * Read more about the meaning of these types in the\n * {@glink framework/deep-dive/schema#defining-additional-semantics dedicated section of the Schema deep-dive} guide.\n *\n * # Generic items\n *\n * There are several generic items (classes of elements) available: `$root`, `$container`, `$block`, `$blockObject`,\n * `$inlineObject`, and `$text`. They are defined as follows:\n *\n * ```ts\n * schema.register( '$root', {\n * \tisLimit: true\n * } );\n *\n * schema.register( '$container', {\n * \tallowIn: [ '$root', '$container' ]\n * } );\n *\n * schema.register( '$block', {\n * \tallowIn: [ '$root', '$container' ],\n * \tisBlock: true\n * } );\n *\n * schema.register( '$blockObject', {\n * \tallowWhere: '$block',\n * \tisBlock: true,\n * \tisObject: true\n * } );\n *\n * schema.register( '$inlineObject', {\n * \tallowWhere: '$text',\n * \tallowAttributesOf: '$text',\n * \tisInline: true,\n * \tisObject: true\n * } );\n *\n * schema.register( '$text', {\n * \tallowIn: '$block',\n * \tisInline: true,\n * \tisContent: true\n * } );\n * ```\n *\n * They reflect typical editor content that is contained within one root, consists of several blocks\n * (paragraphs, lists items, headings, images) which, in turn, may contain text inside.\n *\n * By inheriting from the generic items you can define new items which will get extended by other editor features.\n * Read more about generic types in the {@glink framework/deep-dive/schema Schema deep-dive} guide.\n *\n * # Example definitions\n *\n * Allow `paragraph` in roots and block quotes:\n *\n * ```ts\n * schema.register( 'paragraph', {\n * \tallowIn: [ '$root', 'blockQuote' ],\n * \tisBlock: true\n * } );\n * ```\n *\n * Allow `paragraph` everywhere where `$block` is allowed (i.e. in `$root`):\n *\n * ```ts\n * schema.register( 'paragraph', {\n * \tallowWhere: '$block',\n * \tisBlock: true\n * } );\n * ```\n *\n * Allow `paragraph` inside a `$root` and allow `$text` as a `paragraph` child:\n *\n * ```ts\n * schema.register( 'paragraph', {\n * \tallowIn: '$root',\n * \tallowChildren: '$text',\n * \tisBlock: true\n * } );\n * ```\n *\n * The previous rule can be written in a shorter form using inheritance:\n *\n * ```ts\n * schema.register( 'paragraph', {\n * \tinheritAllFrom: '$block'\n * } );\n * ```\n *\n * Make `imageBlock` a block object, which is allowed everywhere where `$block` is.\n * Also, allow `src` and `alt` attributes in it:\n *\n * ```ts\n * schema.register( 'imageBlock', {\n * \tinheritAllFrom: '$blockObject',\n * \tallowAttributes: [ 'src', 'alt' ],\n * } );\n * ```\n *\n * Make `caption` allowed in `imageBlock` and make it allow all the content of `$block`s (usually, `$text`).\n * Also, mark it as a limit element so it cannot be split:\n *\n * ```ts\n * schema.register( 'caption', {\n * \tallowIn: 'imageBlock',\n * \tallowContentOf: '$block',\n * \tisLimit: true\n * } );\n * ```\n *\n * Register `inlineImage` as a kind of an inline object but disallow it inside captions:\n *\n * ```ts\n * schema.register( 'imageInline', {\n * \tinheritAllFrom: '$inlineObject',\n * \tdisallowIn: [ 'caption' ]\n * } );\n * ```\n *\n * Make `listItem` inherit all from `$block` but also allow additional attributes:\n *\n * ```ts\n * schema.register( 'listItem', {\n * \tinheritAllFrom: '$block',\n * \tallowAttributes: [ 'listType', 'listIndent' ]\n * } );\n * ```\n *\n * Which translates to:\n *\n * ```ts\n * schema.register( 'listItem', {\n * \tallowWhere: '$block',\n * \tallowContentOf: '$block',\n * \tallowAttributesOf: '$block',\n * \tinheritTypesFrom: '$block',\n * \tallowAttributes: [ 'listType', 'listIndent' ]\n * } );\n * ```\n *\n * # Tips\n *\n * * Check schema definitions of existing features to see how they are defined.\n * * If you want to publish your feature so other developers can use it, try to use\n * generic items as much as possible.\n * * Keep your model clean. Limit it to the actual data and store information in a normalized way.\n * * Remember about defining the `is*` properties. They do not affect the allowed structures, but they can\n * affect how the editor features treat your elements.\n */\nexport interface ModelSchemaItemDefinition {\n\n\t/**\n\t * Defines in which other items this item will be allowed.\n\t */\n\tallowIn?: string | Array<string>;\n\n\t/**\n\t * Defines which other items are allowed inside this item.\n\t */\n\tallowChildren?: string | Array<string>;\n\n\t/**\n\t * Defines allowed attributes of the given item.\n\t */\n\tallowAttributes?: string | Array<string>;\n\n\t/**\n\t * Defines in which other items this item will be disallowed. Takes precedence over allow rules.\n\t */\n\tdisallowIn?: string | Array<string>;\n\n\t/**\n\t * Defines which other items are disallowed inside this item. Takes precedence over allow rules.\n\t */\n\tdisallowChildren?: string | Array<string>;\n\n\t/**\n\t * Defines disallowed attributes for this item. Takes precedence over allow rules.\n\t */\n\tdisallowAttributes?: string | Array<string>;\n\n\t/**\n\t * Inherits \"allowed children\" from other items.\n\t *\n\t * Note that the item's \"own\" rules take precedence over \"inherited\" rules and can overwrite them.\n\t */\n\tallowContentOf?: string | Array<string>;\n\n\t/**\n\t * Inherits \"allowed in\" from other items.\n\t *\n\t * Note that the item's \"own\" rules take precedence over \"inherited\" rules and can overwrite them.\n\t */\n\tallowWhere?: string | Array<string>;\n\n\t/**\n\t * Inherits \"allowed attributes\" from other items.\n\t *\n\t * Note that the item's \"own\" rules take precedence over \"inherited\" rules and can overwrite them.\n\t */\n\tallowAttributesOf?: string | Array<string>;\n\n\t/**\n\t * Inherits `is*` properties of other items.\n\t *\n\t * Note that the item's \"own\" rules take precedence over \"inherited\" rules and can overwrite them.\n\t */\n\tinheritTypesFrom?: string | Array<string>;\n\n\t/**\n\t * A shorthand for `allowContentOf`, `allowWhere`, `allowAttributesOf`, `inheritTypesFrom`.\n\t *\n\t * Note that the item's \"own\" rules take precedence over \"inherited\" rules and can overwrite them.\n\t */\n\tinheritAllFrom?: string;\n\n\t/**\n\t * Whether this item is paragraph-like. Generally speaking, content is usually made out of blocks\n\t * like paragraphs, list items, images, headings, etc. All these elements are marked as blocks. A block\n\t * should not allow another block inside. Note: There is also the `$block` generic item which has `isBlock` set to `true`.\n\t * Most block type items will inherit from `$block` (through `inheritAllFrom`).\n\t *\n\t * Read more about the block elements in the\n\t * {@glink framework/deep-dive/schema#block-elements Block elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide.\n\t */\n\tisBlock?: boolean;\n\n\t/**\n\t * Whether an item is \"text-like\" and should be treated as an inline node. Examples of inline elements:\n\t * `$text`, `softBreak` (`<br>`), etc.\n\t *\n\t * Read more about the inline elements in the\n\t * {@glink framework/deep-dive/schema#inline-elements Inline elements section} of the Schema deep-dive guide.\n\t */\n\tisInline?: boolean;\n\n\t/**\n\t * It can be understood as whether this element should not be split by <kbd>Enter</kbd>.\n\t * Examples of limit elements: `$root`, table cell, image caption, etc. In other words, all actions that happen inside\n\t * a limit element are limited to its content.\n\t *\n\t * Read more about the limit elements in the\n\t * {@glink framework/deep-dive/schema#limit-elements Limit elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide.\n\t */\n\tisLimit?: boolean;\n\n\t/**\n\t * Whether an item is \"self-contained\" and should be treated as a whole. Examples of object elements:\n\t * `imageBlock`, `table`, `video`, etc.\n\t *\n\t * **Note:** An object is also a limit, so\n\t * {@link module:engine/model/schema~ModelSchema#isLimit `isLimit()`} returns `true` for object elements automatically.\n\t *\n\t * Read more about the object elements in the\n\t * {@glink framework/deep-dive/schema#object-elements Object elements section} of the Schema deep-dive guide.\n\t */\n\tisObject?: boolean;\n\n\t/**\n\t * `true` when an element should be selectable as a whole by the user.\n\t * Examples of selectable elements: `imageBlock`, `table`, `tableCell`, etc.\n\t *\n\t * **Note:** An object is also a selectable element, so\n\t * {@link module:engine/model/schema~ModelSchema#isSelectable `isSelectable()`} returns `true` for object elements automatically.\n\t *\n\t * Read more about selectable elements in the\n\t * {@glink framework/deep-dive/schema#selectable-elements Selectable elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide.\n\t */\n\tisSelectable?: boolean;\n\n\t/**\n\t * An item is a content when it always finds its way to the editor data output regardless of the number and type of its descendants.\n\t * Examples of content elements: `$text`, `imageBlock`, `table`, etc. (but not `paragraph`, `heading1` or `tableCell`).\n\t *\n\t * **Note:** An object is also a content element, so\n\t * {@link module:engine/model/schema~ModelSchema#isContent `isContent()`} returns `true` for object elements automatically.\n\t *\n\t * Read more about content elements in the\n\t * {@glink framework/deep-dive/schema#content-elements Content elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide.\n\t */\n\tisContent?: boolean;\n}\n\n/**\n * A simplified version of {@link module:engine/model/schema~ModelSchemaItemDefinition} after\n * compilation by the {@link module:engine/model/schema~ModelSchema schema}.\n * Rules fed to the schema by {@link module:engine/model/schema~ModelSchema#register}\n * and {@link module:engine/model/schema~ModelSchema#extend} methods are defined in the\n * {@link module:engine/model/schema~ModelSchemaItemDefinition} format.\n * Later on, they are compiled to `ModelSchemaCompiledItemDefinition` so when you use e.g.\n * the {@link module:engine/model/schema~ModelSchema#getDefinition} method you get the compiled version.\n *\n * The compiled version contains only the following properties:\n *\n * * The `name` property,\n * * The `is*` properties,\n * * The `allowIn` array,\n * * The `allowChildren` array,\n * * The `allowAttributes` array.\n */\nexport interface ModelSchemaCompiledItemDefinition {\n\tname: string;\n\n\tisBlock: boolean;\n\tisContent: boolean;\n\tisInline: boolean;\n\tisLimit: boolean;\n\tisObject: boolean;\n\tisSelectable: boolean;\n\n\tallowIn: Array<string>;\n\tallowChildren: Array<string>;\n\tallowAttributes: Array<string>;\n}\n\ninterface ModelSchemaCompiledItemDefinitionInternal {\n\tname: string;\n\n\t// We need to distinguish `false` from `undefined` to allow inheritance.\n\tisBlock?: boolean;\n\tisContent?: boolean;\n\tisInline?: boolean;\n\tisLimit?: boolean;\n\tisObject?: boolean;\n\tisSelectable?: boolean;\n\n\tallowIn: Set<string>;\n\tallowChildren: Set<string>;\n\tallowAttributes: Set<string>;\n\n\tdisallowIn: Set<string>;\n\tdisallowChildren: Set<string>;\n\tdisallowAttributes: Set<string>;\n\n\tallowAttributesOf: Set<string>;\n\tallowContentOf: Set<string>;\n\tallowWhere: Set<string>;\n\n\tinheritTypesFrom: Set<string>;\n}\n\ntype TypeNames = Array<'isBlock' | 'isContent' | 'isInline' | 'isLimit' | 'isObject' | 'isSelectable'>;\n\n/**\n * A schema context &ndash; a list of ancestors of a given position in the document.\n *\n * Considering such position:\n *\n * ```xml\n * <$root>\n * \t<blockQuote>\n * \t\t<paragraph>\n * \t\t\t^\n * \t\t</paragraph>\n * \t</blockQuote>\n * </$root>\n * ```\n *\n * The context of this position is its {@link module:engine/model/position~ModelPosition#getAncestors lists of ancestors}:\n *\n *\t\t[ rootElement, blockQuoteElement, paragraphElement ]\n *\n * Contexts are used in the {@link module:engine/model/schema~ModelSchema#event:checkChild `Schema#checkChild`} and\n * {@link module:engine/model/schema~ModelSchema#event:checkAttribute `Schema#checkAttribute`} events as a definition\n * of a place in the document where the check occurs. The context instances are created based on the first arguments\n * of the {@link module:engine/model/schema~ModelSchema#checkChild `Schema#checkChild()`} and\n * {@link module:engine/model/schema~ModelSchema#checkAttribute `Schema#checkAttribute()`} methods so when\n * using these methods you need to use {@link module:engine/model/schema~ModelSchemaContextDefinition}s.\n */\nexport class ModelSchemaContext implements Iterable<ModelSchemaContextItem> {\n\tprivate _items!: Array<ModelSchemaContextItem>;\n\n\t/**\n\t * Creates an instance of the context.\n\t */\n\tconstructor( context: ModelSchemaContextDefinition ) {\n\t\tif ( context instanceof ModelSchemaContext ) {\n\t\t\treturn context;\n\t\t}\n\n\t\tlet items: Array<string | ModelItem | ModelDocumentFragment>;\n\n\t\tif ( typeof context == 'string' ) {\n\t\t\titems = [ context ];\n\t\t} else if ( !Array.isArray( context ) ) {\n\t\t\t// `context` is item or position.\n\t\t\t// Position#getAncestors() doesn't accept any parameters but it works just fine here.\n\t\t\titems = context.getAncestors( { includeSelf: true } );\n\t\t} else {\n\t\t\titems = context;\n\t\t}\n\n\t\tthis._items = items.map( mapContextItem );\n\t}\n\n\t/**\n\t * The number of items.\n\t */\n\tpublic get length(): number {\n\t\treturn this._items.length;\n\t}\n\n\t/**\n\t * The last item (the lowest node).\n\t */\n\tpublic get last(): ModelSchemaContextItem {\n\t\treturn this._items[ this._items.length - 1 ]!;\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all context items.\n\t */\n\tpublic [ Symbol.iterator ](): IterableIterator<ModelSchemaContextItem> {\n\t\treturn this._items[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns a new schema context instance with an additional item.\n\t *\n\t * Item can be added as:\n\t *\n\t * ```ts\n\t * const context = new ModelSchemaContext( [ '$root' ] );\n\t *\n\t * // An element.\n\t * const fooElement = writer.createElement( 'fooElement' );\n\t * const newContext = context.push( fooElement ); // [ '$root', 'fooElement' ]\n\t *\n\t * // A text node.\n\t * const text = writer.createText( 'foobar' );\n\t * const newContext = context.push( text ); // [ '$root', '$text' ]\n\t *\n\t * // A string (element name).\n\t * const newContext = context.push( 'barElement' ); // [ '$root', 'barElement' ]\n\t * ```\n\t *\n\t * **Note** {@link module:engine/model/node~ModelNode} that is already in the model tree will be added as the only item\n\t * (without ancestors).\n\t *\n\t * @param item An item that will be added to the current context.\n\t * @returns A new schema context instance with an additional item.\n\t */\n\tpublic push( item: string | ModelNode ): ModelSchemaContext {\n\t\tconst ctx = new ModelSchemaContext( [ item ] );\n\n\t\tctx._items = [ ...this._items, ...ctx._items ];\n\n\t\treturn ctx;\n\t}\n\n\t/**\n\t * Returns a new schema context that is based on this context but has the last item removed.\n\t *\n\t * ```ts\n\t * const ctxParagraph = new ModelSchemaContext( [ '$root', 'blockQuote', 'paragraph' ] );\n\t * const ctxBlockQuote = ctxParagraph.trimLast(); // Items in `ctxBlockQuote` are: `$root` an `blockQuote`.\n\t * const ctxRoot = ctxBlockQuote.trimLast(); // Items in `ctxRoot` are: `$root`.\n\t * ```\n\t *\n\t * @returns A new reduced schema context instance.\n\t */\n\tpublic trimLast(): ModelSchemaContext {\n\t\tconst ctx = new ModelSchemaContext( [] );\n\n\t\tctx._items = this._items.slice( 0, -1 );\n\n\t\treturn ctx;\n\t}\n\n\t/**\n\t * Gets an item on the given index.\n\t */\n\tpublic getItem( index: number ): ModelSchemaContextItem {\n\t\treturn this._items[ index ];\n\t}\n\n\t/**\n\t * Returns the names of items.\n\t */\n\tpublic* getNames(): IterableIterator<string> {\n\t\tyield* this._items.map( item => item.name );\n\t}\n\n\t/**\n\t * Checks whether the context ends with the given nodes.\n\t *\n\t * ```ts\n\t * const ctx = new ModelSchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t *\n\t * ctx.endsWith( '$text' ); // -> true\n\t * ctx.endsWith( 'paragraph $text' ); // -> true\n\t * ctx.endsWith( '$root' ); // -> false\n\t * ctx.endsWith( 'paragraph' ); // -> false\n\t * ```\n\t */\n\tpublic endsWith( query: string ): boolean {\n\t\treturn Array.from( this.getNames() ).join( ' ' ).endsWith( query );\n\t}\n\n\t/**\n\t * Checks whether the context starts with the given nodes.\n\t *\n\t * ```ts\n\t * const ctx = new ModelSchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t *\n\t * ctx.endsWith( '$root' ); // -> true\n\t * ctx.endsWith( '$root paragraph' ); // -> true\n\t * ctx.endsWith( '$text' ); // -> false\n\t * ctx.endsWith( 'paragraph' ); // -> false\n\t * ```\n\t */\n\tpublic startsWith( query: string ): boolean {\n\t\treturn Array.from( this.getNames() ).join( ' ' ).startsWith( query );\n\t}\n}\n\n/**\n * The definition of a {@link module:engine/model/schema~ModelSchemaContext schema context}.\n *\n * Contexts can be created in multiple ways:\n *\n * * By defining a **node** – in this cases this node and all its ancestors will be used.\n * * By defining a **position** in the document – in this case all its ancestors will be used.\n * * By defining an **array of nodes** – in this case this array defines the entire context.\n * * By defining a **name of node** - in this case node will be \"mocked\". It is not recommended because context\n * will be unrealistic (e.g. attributes of these nodes are not specified). However, at times this may be the only\n * way to define the context (e.g. when checking some hypothetical situation).\n * * By defining an **array of node names** (potentially, mixed with real nodes) – The same as **name of node**\n * but it is possible to create a path.\n * * By defining a {@link module:engine/model/schema~ModelSchemaContext} instance - in this case the same instance as provided\n * will be returned.\n *\n * Examples of context definitions passed to the {@link module:engine/model/schema~ModelSchema#checkChild `Schema#checkChild()`}\n * method:\n *\n * ```ts\n * // Assuming that we have a $root > blockQuote > paragraph structure, the following code\n * // will check node 'foo' in the following context:\n * // [ rootElement, blockQuoteElement, paragraphElement ]\n * const contextDefinition = paragraphElement;\n * const childToCheck = 'foo';\n * schema.checkChild( contextDefinition, childToCheck );\n *\n * // Also check in [ rootElement, blockQuoteElement, paragraphElement ].\n * schema.checkChild( model.createPositionAt( paragraphElement, 0 ), 'foo' );\n *\n * // Check in [ rootElement, paragraphElement ].\n * schema.checkChild( [ rootElement, paragraphElement ], 'foo' );\n *\n * // Check only fakeParagraphElement.\n * schema.checkChild( 'paragraph', 'foo' );\n *\n * // Check in [ fakeRootElement, fakeBarElement, paragraphElement ].\n * schema.checkChild( [ '$root', 'bar', paragraphElement ], 'foo' );\n * ```\n *\n * All these `checkChild()` calls will fire {@link module:engine/model/schema~ModelSchema#event:checkChild `Schema#checkChild`}\n * events in which `args[ 0 ]` is an instance of the context. Therefore, you can write a listener like this:\n *\n * ```ts\n * schema.on( 'checkChild', ( evt, args ) => {\n * \tconst ctx = args[ 0 ];\n *\n * \tconsole.log( Array.from( ctx.getNames() ) );\n * } );\n * ```\n *\n * Which will log the following:\n *\n * ```ts\n * [ '$root', 'blockQuote', 'paragraph' ]\n * [ '$root', 'paragraph' ]\n * [ '$root', 'bar', 'paragraph' ]\n * ```\n *\n * Note: When using the {@link module:engine/model/schema~ModelSchema#checkAttribute `Schema#checkAttribute()`} method\n * you may want to check whether a text node may have an attribute. A {@link module:engine/model/text~ModelText} is a\n * correct way to define a context so you can do this:\n *\n * ```ts\n * schema.checkAttribute( textNode, 'bold' );\n * ```\n *\n * But sometimes you want to check whether a text at a given position might've had some attribute,\n * in which case you can create a context by mixing in an array of elements with a `'$text'` string:\n *\n * ```ts\n * // Check in [ rootElement, paragraphElement, textNode ].\n * schema.checkChild( [ ...positionInParagraph.getAncestors(), '$text' ], 'bold' );\n * ```\n */\nexport type ModelSchemaContextDefinition = ModelItem | ModelPosition | ModelSchemaContext | string | Array<string | ModelItem>;\n\n/**\n * An item of the {@link module:engine/model/schema~ModelSchemaContext schema context}.\n *\n * It contains 3 properties:\n *\n * * `name` – the name of this item,\n * * `* getAttributeKeys()` – a generator of keys of item attributes,\n * * `getAttribute( keyName )` – a method to get attribute values.\n *\n * The context item interface is a highly simplified version of {@link module:engine/model/node~ModelNode} and its role\n * is to expose only the information which schema checks are able to provide (which is the name of the node and\n * node's attributes).\n *\n * ```ts\n * schema.on( 'checkChild', ( evt, args ) => {\n * \tconst ctx = args[ 0 ];\n * \tconst firstItem = ctx.getItem( 0 );\n *\n * \tconsole.log( firstItem.name ); // -> '$root'\n * \tconsole.log( firstItem.getAttribute( 'foo' ) ); // -> 'bar'\n * \tconsole.log( Array.from( firstItem.getAttributeKeys() ) ); // -> [ 'foo', 'faa' ]\n * } );\n * ```\n */\nexport interface ModelSchemaContextItem {\n\tname: string;\n\tgetAttributeKeys(): Generator<string>;\n\tgetAttribute( keyName: string ): unknown;\n}\n\n/**\n * A structure containing additional metadata describing the attribute.\n *\n * See {@link module:engine/model/schema~ModelSchema#setAttributeProperties `Schema#setAttributeProperties()`} for usage examples.\n */\nexport interface ModelAttributeProperties {\n\n\t/**\n\t * Indicates that the attribute should be considered as a visual formatting, like `bold`, `italic` or\n\t * `fontSize` rather than semantic attribute (such as `src`, `listType`, etc.). For example, it is used by the \"Remove format\" feature.\n\t */\n\tisFormatting?: boolean;\n\n\t/**\n\t * Indicates that given text attribute should be copied to the next block when enter is pressed.\n\t */\n\tcopyOnEnter?: boolean;\n\n\t/**\n\t * Indicates that given attribute should be preserved while replacing the element.\n\t */\n\tcopyOnReplace?: boolean;\n\n\t/**\n\t * Indicates that given text attribute should be copied from an inline object to the next inserted inline content.\n\t *\n\t * @default true\n\t */\n\tcopyFromObject?: boolean;\n\n\t/**\n\t * Defines the mapping of all possible block alignments for a specific model element.\n\t * It is used by features that need to determine whether an element can be aligned,\n\t * and apply the alignment if possible.\n\t */\n\tblockAlignment?:\n\t\t| ModelBlockAlignmentAttributesMapping\n\t\t| ( ( element: ModelElement ) => ModelBlockAlignmentAttributesMapping );\n\n\t[ name: string ]: unknown;\n}\n\n/**\n * Defines the mapping of block alignment options for a model element attribute.\n *\n * Each key represents a logical alignment name (e.g. `'left'`, `'center'`, `'right'`, `'justify'`),\n * and the corresponding value describes how that alignment is represented in the model — including\n * the actual attribute value and whether it should be treated as the default alignment for the element.\n *\n * Used by features that need to determine whether a model element supports block alignment\n * and how to apply it. Can be provided as a static object or as a function receiving the element\n * and returning the mapping dynamically, via {@link ~ModelAttributeProperties#blockAlignment}.\n */\nexport type ModelBlockAlignmentAttributesMapping = Record<string, {\n\tisDefault?: boolean;\n\tvalue: string;\n}>;\n\nexport type ModelSchemaAttributeCheckCallback = ( context: ModelSchemaContext, attributeName: string ) => boolean | undefined;\n\nexport type ModelSchemaChildCheckCallback = (\n\tcontext: ModelSchemaContext,\n\tdefinition: ModelSchemaCompiledItemDefinition\n) => boolean | undefined;\n\nfunction compileBaseItemRule(\n\tsourceItemRules: Array<ModelSchemaItemDefinition>,\n\titemName: string\n): ModelSchemaCompiledItemDefinitionInternal {\n\tconst itemRule: ModelSchemaCompiledItemDefinitionInternal = {\n\t\tname: itemName,\n\n\t\tallowIn: new Set<string>(),\n\t\tallowChildren: new Set<string>(),\n\t\tdisallowIn: new Set<string>(),\n\t\tdisallowChildren: new Set<string>(),\n\n\t\tallowContentOf: new Set<string>(),\n\t\tallowWhere: new Set<string>(),\n\n\t\tallowAttributes: new Set<string>(),\n\t\tdisallowAttributes: new Set<string>(),\n\n\t\tallowAttributesOf: new Set<string>(),\n\n\t\tinheritTypesFrom: new Set<string>()\n\t};\n\n\tcopyTypes( sourceItemRules, itemRule );\n\n\tcopyProperty( sourceItemRules, itemRule, 'allowIn' );\n\tcopyProperty( sourceItemRules, itemRule, 'allowChildren' );\n\tcopyProperty( sourceItemRules, itemRule, 'disallowIn' );\n\tcopyProperty( sourceItemRules, itemRule, 'disallowChildren' );\n\n\tcopyProperty( sourceItemRules, itemRule, 'allowContentOf' );\n\tcopyProperty( sourceItemRules, itemRule, 'allowWhere' );\n\n\tcopyProperty( sourceItemRules, itemRule, 'allowAttributes' );\n\tcopyProperty( sourceItemRules, itemRule, 'disallowAttributes' );\n\n\tcopyProperty( sourceItemRules, itemRule, 'allowAttributesOf' );\n\n\tcopyProperty( sourceItemRules, itemRule, 'inheritTypesFrom' );\n\n\tresolveInheritAll( sourceItemRules, itemRule );\n\n\treturn itemRule;\n}\n\nfunction propagateAllowIn(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const parentName of item.allowIn ) {\n\t\tconst parentItem = definitions[ parentName ];\n\n\t\tif ( parentItem ) {\n\t\t\tparentItem.allowChildren.add( item.name );\n\t\t} else {\n\t\t\titem.allowIn.delete( parentName );\n\t\t}\n\t}\n}\n\nfunction propagateAllowChildren(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const childName of item.allowChildren ) {\n\t\tconst childItem = definitions[ childName ];\n\n\t\tif ( childItem ) {\n\t\t\tchildItem.allowIn.add( item.name );\n\t\t} else {\n\t\t\titem.allowChildren.delete( childName );\n\t\t}\n\t}\n}\n\nfunction propagateDisallowIn(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const parentName of item.disallowIn ) {\n\t\tconst parentItem = definitions[ parentName ];\n\n\t\tif ( parentItem ) {\n\t\t\tparentItem.disallowChildren.add( item.name );\n\t\t} else {\n\t\t\titem.disallowIn.delete( parentName );\n\t\t}\n\t}\n}\n\nfunction propagateDisallowChildren(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const childName of item.disallowChildren ) {\n\t\tconst childItem = definitions[ childName ];\n\n\t\tif ( childItem ) {\n\t\t\tchildItem.disallowIn.add( item.name );\n\t\t} else {\n\t\t\titem.disallowChildren.delete( childName );\n\t\t}\n\t}\n}\n\nfunction resolveDisallows(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const childName of item.disallowChildren ) {\n\t\titem.allowChildren.delete( childName );\n\t}\n\n\tfor ( const parentName of item.disallowIn ) {\n\t\titem.allowIn.delete( parentName );\n\t}\n\n\tfor ( const attributeName of item.disallowAttributes ) {\n\t\titem.allowAttributes.delete( attributeName );\n\t}\n}\n\nfunction compileAllowContentOf(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const allowContentOfItemName of item.allowContentOf ) {\n\t\tconst baseItem = definitions[ allowContentOfItemName ];\n\n\t\tif ( !baseItem ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Copy `disallowChildren` to propagate this \"knowledge\" down the inheritance chain. The inheritance may involve multiple items and\n\t\t// if this is not propagated, then items down the chain may start to allow for items that were disallowed by previous base items.\n\t\t//\n\t\t// The scenarios were it is important involves multiple inherits both on parent items side and on the child items side.\n\t\tbaseItem.disallowChildren.forEach( childName => {\n\t\t\t// Own item's rules takes precedence before inherited.\n\t\t\t// If the item directly allows for given child, ignore that base item disallowed that child.\n\t\t\tif ( item.allowChildren.has( childName ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titem.disallowChildren.add( childName );\n\t\t\tdefinitions[ childName ].disallowIn.add( item.name );\n\t\t} );\n\n\t\t// Copy `allowChildren` from the base item to allow for the same items.\n\t\tbaseItem.allowChildren.forEach( childName => {\n\t\t\t// Own item's rules takes precedence before inherited.\n\t\t\t// Also, `item.disallowChildren` might get some new items during inheritance process.\n\t\t\tif ( item.disallowChildren.has( childName ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titem.allowChildren.add( childName );\n\t\t\tdefinitions[ childName ].allowIn.add( item.name );\n\t\t} );\n\t}\n}\n\nfunction compileAllowWhere(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const allowWhereItemName of item.allowWhere ) {\n\t\tconst baseItem = definitions[ allowWhereItemName ];\n\n\t\tif ( !baseItem ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Copy `disallowIn` to propagate this \"knowledge\" down the inheritance chain. The inheritance may involve multiple items and\n\t\t// if this is not propagated, then items down the chain may start to be allowed in items in which they were disallowed previously.\n\t\t//\n\t\t// The scenarios were it is important involves multiple inherits both on parent items side and on the child items side.\n\t\tbaseItem.disallowIn.forEach( parentName => {\n\t\t\t// Own item's rules takes precedence before inherited.\n\t\t\t// If the item is directly allowed in given parent, ignore that base item was disallowed in it.\n\t\t\tif ( item.allowIn.has( parentName ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titem.disallowIn.add( parentName );\n\t\t\tdefinitions[ parentName ].disallowChildren.add( item.name );\n\t\t} );\n\n\t\t// Copy `allowIn` from the base item to allow item in same parents.\n\t\tbaseItem.allowIn.forEach( parentName => {\n\t\t\t// Own item's rules takes precedence before inherited.\n\t\t\t// Also, `item.disallowIn` might get some new items during inheritance process.\n\t\t\tif ( item.disallowIn.has( parentName ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titem.allowIn.add( parentName );\n\t\t\tdefinitions[ parentName ].allowChildren.add( item.name );\n\t\t} );\n\t}\n}\n\nfunction compileDefinitions( definitions: Record<string, ModelSchemaCompiledItemDefinitionInternal> ) {\n\tconst finalDefinitions: Record<string, ModelSchemaCompiledItemDefinition> = {};\n\n\tfor ( const item of Object.values( definitions ) ) {\n\t\tfinalDefinitions[ item.name ] = {\n\t\t\tname: item.name,\n\n\t\t\t// `is*` properties may not be set - convert `undefined` to `false`.\n\t\t\tisBlock: !!item.isBlock,\n\t\t\tisContent: !!item.isContent,\n\t\t\tisInline: !!item.isInline,\n\t\t\tisLimit: !!item.isLimit,\n\t\t\tisObject: !!item.isObject,\n\t\t\tisSelectable: !!item.isSelectable,\n\n\t\t\t// Filter out non-existing items.\n\t\t\tallowIn: Array.from( item.allowIn ).filter( name => !!definitions[ name ] ),\n\t\t\tallowChildren: Array.from( item.allowChildren ).filter( name => !!definitions[ name ] ),\n\t\t\tallowAttributes: Array.from( item.allowAttributes )\n\t\t};\n\t}\n\n\treturn finalDefinitions;\n}\n\nfunction compileAllowAttributesOf(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const allowAttributeOfItemName of item.allowAttributesOf ) {\n\t\tconst baseItem = definitions[ allowAttributeOfItemName ];\n\n\t\tif ( !baseItem ) {\n\t\t\treturn;\n\t\t}\n\n\t\tbaseItem.allowAttributes.forEach( attributeName => {\n\t\t\tif ( item.disallowAttributes.has( attributeName ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titem.allowAttributes.add( attributeName );\n\t\t} );\n\t}\n}\n\nfunction compileInheritPropertiesFrom(\n\tdefinitions: Record<string, ModelSchemaCompiledItemDefinitionInternal>,\n\titem: ModelSchemaCompiledItemDefinitionInternal\n) {\n\tfor ( const inheritPropertiesOfItemName of item.inheritTypesFrom! ) {\n\t\tconst inheritFrom = definitions[ inheritPropertiesOfItemName ];\n\n\t\tif ( inheritFrom ) {\n\t\t\tconst typeNames = Object.keys( inheritFrom ).filter( name => name.startsWith( 'is' ) ) as TypeNames;\n\n\t\t\tfor ( const name of typeNames ) {\n\t\t\t\tif ( !( name in item ) ) {\n\t\t\t\t\titem[ name ] = inheritFrom[ name ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction copyTypes( sourceItemRules: Array<ModelSchemaItemDefinition>, itemRule: ModelSchemaCompiledItemDefinitionInternal ) {\n\tfor ( const sourceItemRule of sourceItemRules ) {\n\t\tconst typeNames = Object.keys( sourceItemRule ).filter( name => name.startsWith( 'is' ) ) as TypeNames;\n\n\t\tfor ( const name of typeNames ) {\n\t\t\titemRule[ name ] = !!sourceItemRule[ name ];\n\t\t}\n\t}\n}\n\nfunction copyProperty(\n\tsourceItemRules: Array<ModelSchemaItemDefinition>,\n\titemRule: ModelSchemaCompiledItemDefinitionInternal,\n\tpropertyName:\n\t\t'allowIn' |\n\t\t'allowChildren' |\n\t\t'disallowIn' |\n\t\t'disallowChildren' |\n\t\t'allowWhere' |\n\t\t'allowContentOf' |\n\t\t'allowAttributes' |\n\t\t'disallowAttributes' |\n\t\t'allowAttributesOf' |\n\t\t'inheritTypesFrom'\n) {\n\tfor ( const sourceItemRule of sourceItemRules ) {\n\t\tlet value = sourceItemRule[ propertyName ];\n\n\t\t// `value` can be a string, an array or undefined.\n\t\t// Convert a string to an array with one item, then handle an array. Skip undefined this way.\n\t\tif ( typeof value == 'string' ) {\n\t\t\tvalue = [ value ];\n\t\t}\n\n\t\tif ( Array.isArray( value ) ) {\n\t\t\tvalue.forEach( singleValue => itemRule[ propertyName ].add( singleValue ) );\n\t\t}\n\t}\n}\n\nfunction resolveInheritAll( sourceItemRules: Array<ModelSchemaItemDefinition>, itemRule: ModelSchemaCompiledItemDefinitionInternal ) {\n\tfor ( const sourceItemRule of sourceItemRules ) {\n\t\tconst inheritFrom = sourceItemRule.inheritAllFrom;\n\n\t\tif ( inheritFrom ) {\n\t\t\titemRule.allowContentOf.add( inheritFrom );\n\t\t\titemRule.allowWhere.add( inheritFrom );\n\t\t\titemRule.allowAttributesOf.add( inheritFrom );\n\t\t\titemRule.inheritTypesFrom.add( inheritFrom );\n\t\t}\n\t}\n}\n\nfunction mapContextItem( ctxItem: string | ModelItem | ModelDocumentFragment ): ModelSchemaContextItem {\n\tif ( typeof ctxItem == 'string' || ctxItem.is( 'documentFragment' ) ) {\n\t\treturn {\n\t\t\tname: typeof ctxItem == 'string' ? ctxItem : '$documentFragment',\n\n\t\t\t* getAttributeKeys() {},\n\n\t\t\tgetAttribute() {}\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\t// '$text' means text nodes and text proxies.\n\t\t\tname: ctxItem.is( 'element' ) ? ctxItem.name : '$text',\n\n\t\t\t* getAttributeKeys() {\n\t\t\t\tyield* ctxItem.getAttributeKeys();\n\t\t\t},\n\n\t\t\tgetAttribute( key ) {\n\t\t\t\treturn ctxItem.getAttribute( key );\n\t\t\t}\n\t\t};\n\t}\n}\n\n/**\n * Generator function returning values from provided walkers, switching between them at each iteration. If only one walker\n * is provided it will return data only from that walker.\n *\n * @param backward Walker iterating in backward direction.\n * @param forward Walker iterating in forward direction.\n * @returns Object returned at each iteration contains `value` and `walker` (informing which walker returned\n * given value) fields.\n */\nfunction* combineWalkers( backward: ModelTreeWalker | undefined, forward: ModelTreeWalker | undefined ) {\n\tlet done = false;\n\n\twhile ( !done ) {\n\t\tdone = true;\n\n\t\tif ( backward ) {\n\t\t\tconst step = backward.next();\n\n\t\t\tif ( !step.done ) {\n\t\t\t\tdone = false;\n\t\t\t\tyield {\n\t\t\t\t\twalker: backward,\n\t\t\t\t\tvalue: step.value\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( forward ) {\n\t\t\tconst step = forward.next();\n\n\t\t\tif ( !step.done ) {\n\t\t\t\tdone = false;\n\t\t\t\tyield {\n\t\t\t\t\twalker: forward,\n\t\t\t\t\tvalue: step.value\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Takes an array of non-intersecting ranges. For each of them gets minimal flat ranges covering that range and returns\n * all those minimal flat ranges.\n *\n * @param ranges Ranges to process.\n * @returns Minimal flat ranges of given `ranges`.\n */\nfunction* convertToMinimalFlatRanges( ranges: Iterable<ModelRange> ): Iterable<ModelRange> {\n\tfor ( const range of ranges ) {\n\t\tyield* range.getMinimalFlatRanges();\n\t}\n}\n\nfunction removeDisallowedAttributeFromNode( schema: ModelSchema, node: ModelNode, writer: ModelWriter ) {\n\tfor ( const attribute of node.getAttributeKeys() ) {\n\t\tif ( !schema.checkAttribute( node, attribute ) ) {\n\t\t\twriter.removeAttribute( attribute, node );\n\t\t}\n\t}\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/**\n * @module engine/conversion/upcastdispatcher\n */\n\nimport { ViewConsumable } from './viewconsumable.js';\nimport { ModelRange } from '../model/range.js';\nimport { ModelPosition } from '../model/position.js';\nimport { type ModelElement } from '../model/element.js';\nimport { type ModelNode } from '../model/node.js';\nimport { type ViewElement } from '../view/element.js';\nimport { type ViewText } from '../view/text.js';\nimport { type ViewDocumentFragment } from '../view/documentfragment.js';\nimport { type ModelDocumentFragment } from '../model/documentfragment.js';\nimport type { ModelSchema, ModelSchemaContextDefinition } from '../model/schema.js';\nimport { ModelSchemaContext } from '../model/schema.js'; // eslint-disable-line no-duplicate-imports\nimport { type ModelWriter } from '../model/writer.js';\nimport { isParagraphable, wrapInParagraph } from '../model/utils/autoparagraphing.js';\n\nimport { type ViewItem } from '../view/item.js';\n\nimport { CKEditorError, EmitterMixin, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nconst UpcastDispatcherBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * Upcast dispatcher is a central point of the view-to-model conversion, which is a process of\n * converting a given {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment} or\n * {@link module:engine/view/element~ViewElement view element} into a correct model structure.\n *\n * During the conversion process, the dispatcher fires events for all {@link module:engine/view/node~ViewNode view nodes}\n * from the converted view document fragment.\n * Special callbacks called \"converters\" should listen to these events in order to convert the view nodes.\n *\n * The second parameter of the callback is the `data` object with the following properties:\n *\n * * `data.viewItem` contains a {@link module:engine/view/node~ViewNode view node} or a\n * {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment}\n * that is converted at the moment and might be handled by the callback.\n * * `data.modelRange` is used to point to the result\n * of the current conversion (e.g. the element that is being inserted)\n * and is always a {@link module:engine/model/range~ModelRange} when the conversion succeeds.\n * * `data.modelCursor` is a {@link module:engine/model/position~ModelPosition position} on which the converter should insert\n * the newly created items.\n *\n * The third parameter of the callback is an instance of {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi}\n * which provides additional tools for converters.\n *\n * You can read more about conversion in the {@glink framework/deep-dive/conversion/upcast Upcast conversion} guide.\n *\n * Examples of event-based converters:\n *\n * ```ts\n * // A converter for links (<a>).\n * editor.data.upcastDispatcher.on( 'element:a', ( evt, data, conversionApi ) => {\n * \tif ( conversionApi.consumable.consume( data.viewItem, { name: true, attributes: [ 'href' ] } ) ) {\n * \t\t// The <a> element is inline and is represented by an attribute in the model.\n * \t\t// This is why you need to convert only children.\n * \t\tconst { modelRange } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n *\n * \t\tfor ( let item of modelRange.getItems() ) {\n * \t\t\tif ( conversionApi.schema.checkAttribute( item, 'linkHref' ) ) {\n * \t\t\t\tconversionApi.writer.setAttribute( 'linkHref', data.viewItem.getAttribute( 'href' ), item );\n * \t\t\t}\n * \t\t}\n * \t}\n * } );\n *\n * // Convert <p> element's font-size style.\n * // Note: You should use a low-priority observer in order to ensure that\n * // it is executed after the element-to-element converter.\n * editor.data.upcastDispatcher.on( 'element:p', ( evt, data, conversionApi ) => {\n * \tconst { consumable, schema, writer } = conversionApi;\n *\n * \tif ( !consumable.consume( data.viewItem, { style: 'font-size' } ) ) {\n * \t\treturn;\n * \t}\n *\n * \tconst fontSize = data.viewItem.getStyle( 'font-size' );\n *\n * \t// Do not go for the model element after data.modelCursor because it might happen\n * \t// that a single view element was converted to multiple model elements. Get all of them.\n * \tfor ( const item of data.modelRange.getItems( { shallow: true } ) ) {\n * \t\tif ( schema.checkAttribute( item, 'fontSize' ) ) {\n * \t\t\twriter.setAttribute( 'fontSize', fontSize, item );\n * \t\t}\n * \t}\n * }, { priority: 'low' } );\n *\n * // Convert all elements which have no custom converter into a paragraph (autoparagraphing).\n * editor.data.upcastDispatcher.on( 'element', ( evt, data, conversionApi ) => {\n * \t// Check if an element can be converted.\n * \tif ( !conversionApi.consumable.test( data.viewItem, { name: data.viewItem.name } ) ) {\n * \t\t// When an element is already consumed by higher priority converters, do nothing.\n * \t\treturn;\n * \t}\n *\n * \tconst paragraph = conversionApi.writer.createElement( 'paragraph' );\n *\n * \t// Try to safely insert a paragraph at the model cursor - it will find an allowed parent for the current element.\n * \tif ( !conversionApi.safeInsert( paragraph, data.modelCursor ) ) {\n * \t\t// When an element was not inserted, it means that you cannot insert a paragraph at this position.\n * \t\treturn;\n * \t}\n *\n * \t// Consume the inserted element.\n * \tconversionApi.consumable.consume( data.viewItem, { name: data.viewItem.name } ) );\n *\n * \t// Convert the children to a paragraph.\n * \tconst { modelRange } = conversionApi.convertChildren( data.viewItem,  paragraph ) );\n *\n * \t// Update `modelRange` and `modelCursor` in the `data` as a conversion result.\n * \tconversionApi.updateConversionResult( paragraph, data );\n * }, { priority: 'low' } );\n * ```\n *\n * @fires viewCleanup\n * @fires element\n * @fires text\n * @fires documentFragment\n */\nexport class UpcastDispatcher extends UpcastDispatcherBase {\n\t/**\n\t * An interface passed by the dispatcher to the event callbacks.\n\t */\n\tpublic conversionApi: UpcastConversionApi;\n\n\t/**\n\t * The list of elements that were created during splitting.\n\t *\n\t * After the conversion process, the list is cleared.\n\t */\n\tprivate _splitParts = new Map<ModelElement, Array<ModelElement>>();\n\n\t/**\n\t * The list of cursor parent elements that were created during splitting.\n\t *\n\t * After the conversion process the list is cleared.\n\t */\n\tprivate _cursorParents = new Map<ModelNode, ModelElement | ModelDocumentFragment>();\n\n\t/**\n\t * The position in the temporary structure where the converted content is inserted. The structure reflects the context of\n\t * the target position where the content will be inserted. This property is built based on the context parameter of the\n\t * convert method.\n\t */\n\tprivate _modelCursor: ModelPosition | null = null;\n\n\t/**\n\t * The list of elements that were created during the splitting but should not get removed on conversion end even if they are empty.\n\t *\n\t * The list is cleared after the conversion process.\n\t */\n\tprivate _emptyElementsToKeep = new Set<ModelElement>();\n\n\t/**\n\t * Creates an upcast dispatcher that operates using the passed API.\n\t *\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi\n\t * @param conversionApi Additional properties for an interface that will be passed to events fired\n\t * by the upcast dispatcher.\n\t */\n\tconstructor( conversionApi: Pick<UpcastConversionApi, 'schema'> ) {\n\t\tsuper();\n\n\t\tthis.conversionApi = {\n\t\t\t...conversionApi,\n\t\t\tconsumable: null as any,\n\t\t\twriter: null as any,\n\t\t\tstore: null,\n\t\t\tconvertItem: ( viewItem, modelCursor ) => this._convertItem( viewItem, modelCursor ),\n\t\t\tconvertChildren: ( viewElement, positionOrElement ) => this._convertChildren( viewElement, positionOrElement ),\n\t\t\tsafeInsert: ( modelNode, position ) => this._safeInsert( modelNode, position ),\n\t\t\tupdateConversionResult: ( modelElement, data ) => this._updateConversionResult( modelElement, data ),\n\t\t\t// Advanced API - use only if custom position handling is needed.\n\t\t\tsplitToAllowedParent: ( modelNode, modelCursor ) => this._splitToAllowedParent( modelNode, modelCursor ),\n\t\t\tgetSplitParts: modelElement => this._getSplitParts( modelElement ),\n\t\t\tkeepEmptyElement: modelElement => this._keepEmptyElement( modelElement )\n\t\t};\n\t}\n\n\t/**\n\t * Starts the conversion process. The entry point for the conversion.\n\t *\n\t * **Note:** The default `context` value is `[ '$root' ]`, which only matches the generic root. When the editor uses\n\t * a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n\t * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n\t * explicitly, otherwise the conversion result may be wrong.\n\t * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t *\n\t * @fires element\n\t * @fires text\n\t * @fires documentFragment\n\t * @param viewElement The part of the view to be converted.\n\t * @param writer An instance of the model writer.\n\t * @param context Elements will be converted according to this context.\n\t * @returns Model data that is the result of the conversion process\n\t * wrapped in `DocumentFragment`. Converted marker elements will be set as the document fragment's\n\t * {@link module:engine/model/documentfragment~ModelDocumentFragment#markers static markers map}.\n\t */\n\tpublic convert(\n\t\tviewElement: ViewElement | ViewDocumentFragment,\n\t\twriter: ModelWriter,\n\t\tcontext: ModelSchemaContextDefinition = [ '$root' ]\n\t): ModelDocumentFragment {\n\t\tthis.fire<UpcastViewCleanupEvent>( 'viewCleanup', viewElement );\n\n\t\t// Create context tree and set position in the top element.\n\t\t// Items will be converted according to this position.\n\t\tthis._modelCursor = createContextTree( context, writer )!;\n\n\t\t// Store writer in conversion as a conversion API\n\t\t// to be sure that conversion process will use the same batch.\n\t\tthis.conversionApi.writer = writer;\n\n\t\t// Create consumable values list for conversion process.\n\t\tthis.conversionApi.consumable = ViewConsumable.createFrom( viewElement );\n\n\t\t// Custom data stored by converter for conversion process.\n\t\tthis.conversionApi.store = {};\n\n\t\t// Do the conversion.\n\t\tconst { modelRange } = this._convertItem( viewElement, this._modelCursor );\n\n\t\t// Conversion result is always a document fragment so let's create it.\n\t\tconst documentFragment = writer.createDocumentFragment();\n\n\t\t// When there is a conversion result.\n\t\tif ( modelRange ) {\n\t\t\t// Remove all empty elements that were created while splitting.\n\t\t\tthis._removeEmptyElements();\n\n\t\t\t// Move all items that were converted in context tree to the document fragment.\n\t\t\tconst parent = this._modelCursor.parent;\n\t\t\tconst children = parent._removeChildren( 0, parent.childCount );\n\n\t\t\tdocumentFragment._insertChild( 0, children );\n\n\t\t\t// Extract temporary markers elements from model and set as static markers collection.\n\t\t\t( documentFragment as any ).markers = extractMarkersFromModelFragment( documentFragment, writer );\n\t\t}\n\n\t\t// Clear context position.\n\t\tthis._modelCursor = null;\n\n\t\t// Clear split elements & parents lists.\n\t\tthis._splitParts.clear();\n\t\tthis._cursorParents.clear();\n\t\tthis._emptyElementsToKeep.clear();\n\n\t\t// Clear conversion API.\n\t\t( this.conversionApi as any ).writer = null;\n\t\tthis.conversionApi.store = null;\n\n\t\t// Return fragment as conversion result.\n\t\treturn documentFragment;\n\t}\n\n\t/**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertItem\n\t */\n\tprivate _convertItem( viewItem: ViewItem | ViewDocumentFragment, modelCursor: ModelPosition ): {\n\t\tmodelRange: ModelRange | null;\n\t\tmodelCursor: ModelPosition;\n\t} {\n\t\tconst data: UpcastConversionData = { viewItem, modelCursor, modelRange: null };\n\n\t\tif ( viewItem.is( 'element' ) ) {\n\t\t\tthis.fire<UpcastElementEvent>(\n\t\t\t\t`element:${ viewItem.name }`,\n\t\t\t\tdata as UpcastConversionData<ViewElement>,\n\t\t\t\tthis.conversionApi\n\t\t\t);\n\t\t} else if ( viewItem.is( '$text' ) ) {\n\t\t\tthis.fire<UpcastTextEvent>(\n\t\t\t\t'text',\n\t\t\t\tdata as UpcastConversionData<ViewText>,\n\t\t\t\tthis.conversionApi\n\t\t\t);\n\t\t} else {\n\t\t\tthis.fire<UpcastDocumentFragmentEvent>(\n\t\t\t\t'documentFragment',\n\t\t\t\tdata as UpcastConversionData<ViewDocumentFragment>,\n\t\t\t\tthis.conversionApi\n\t\t\t);\n\t\t}\n\n\t\t// Handle incorrect conversion result.\n\t\tif ( data.modelRange && !( data.modelRange instanceof ModelRange ) ) {\n\t\t\t/**\n\t\t\t * Incorrect conversion result was dropped.\n\t\t\t *\n\t\t\t * {@link module:engine/model/range~ModelRange Model range} should be a conversion result.\n\t\t\t *\n\t\t\t * @error view-conversion-dispatcher-incorrect-result\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-conversion-dispatcher-incorrect-result', this );\n\t\t}\n\n\t\treturn { modelRange: data.modelRange, modelCursor: data.modelCursor };\n\t}\n\n\t/**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertChildren\n\t */\n\tprivate _convertChildren(\n\t\tviewItem: ViewElement | ViewDocumentFragment,\n\t\telementOrModelCursor: ModelPosition | ModelElement\n\t): {\n\t\t\tmodelRange: ModelRange;\n\t\t\tmodelCursor: ModelPosition;\n\t\t} {\n\t\tlet nextModelCursor = elementOrModelCursor.is( 'position' ) ?\n\t\t\telementOrModelCursor : ModelPosition._createAt( elementOrModelCursor, 0 );\n\n\t\tconst modelRange = new ModelRange( nextModelCursor );\n\n\t\tfor ( const viewChild of Array.from( viewItem.getChildren() ) ) {\n\t\t\tconst result = this._convertItem( viewChild, nextModelCursor );\n\n\t\t\tif ( result.modelRange instanceof ModelRange ) {\n\t\t\t\t( modelRange as any ).end = result.modelRange.end;\n\t\t\t\tnextModelCursor = result.modelCursor;\n\t\t\t}\n\t\t}\n\n\t\treturn { modelRange, modelCursor: nextModelCursor };\n\t}\n\n\t/**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#safeInsert\n\t */\n\tprivate _safeInsert(\n\t\tmodelNode: ModelNode,\n\t\tposition: ModelPosition\n\t): boolean {\n\t\t// Find allowed parent for element that we are going to insert.\n\t\t// If current parent does not allow to insert element but one of the ancestors does\n\t\t// then split nodes to allowed parent.\n\t\tconst splitResult = this._splitToAllowedParent( modelNode, position );\n\n\t\t// When there is no split result it means that we can't insert element to model tree, so let's skip it.\n\t\tif ( !splitResult ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Insert element on allowed position.\n\t\tthis.conversionApi.writer.insert( modelNode, splitResult.position );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#updateConversionResult\n\t */\n\tprivate _updateConversionResult( modelElement: ModelElement, data: UpcastConversionData ): void {\n\t\tconst parts = this._getSplitParts( modelElement );\n\n\t\tconst writer = this.conversionApi.writer!;\n\n\t\t// Set conversion result range - only if not set already.\n\t\tif ( !data.modelRange ) {\n\t\t\tdata.modelRange = writer.createRange(\n\t\t\t\twriter.createPositionBefore( modelElement ),\n\t\t\t\twriter.createPositionAfter( parts[ parts.length - 1 ] )\n\t\t\t);\n\t\t}\n\n\t\tconst savedCursorParent = this._cursorParents.get( modelElement );\n\n\t\t// Now we need to check where the `modelCursor` should be.\n\t\tif ( savedCursorParent ) {\n\t\t\t// If we split parent to insert our element then we want to continue conversion in the new part of the split parent.\n\t\t\t//\n\t\t\t// before: <allowed><notAllowed>foo[]</notAllowed></allowed>\n\t\t\t// after:  <allowed><notAllowed>foo</notAllowed> <converted></converted> <notAllowed>[]</notAllowed></allowed>\n\n\t\t\tdata.modelCursor = writer.createPositionAt( savedCursorParent, 0 );\n\t\t} else {\n\t\t\t// Otherwise just continue after inserted element.\n\n\t\t\tdata.modelCursor = data.modelRange.end;\n\t\t}\n\t}\n\n\t/**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#splitToAllowedParent\n\t */\n\tprivate _splitToAllowedParent( node: ModelNode, modelCursor: ModelPosition ): {\n\t\tposition: ModelPosition;\n\t\tcursorParent?: ModelElement | ModelDocumentFragment;\n\t} | null {\n\t\tconst { schema, writer } = this.conversionApi;\n\n\t\t// Try to find allowed parent.\n\t\tlet allowedParent = schema.findAllowedParent( modelCursor, node );\n\n\t\tif ( allowedParent ) {\n\t\t\t// When current position parent allows to insert node then return this position.\n\t\t\tif ( allowedParent === modelCursor.parent ) {\n\t\t\t\treturn { position: modelCursor };\n\t\t\t}\n\n\t\t\t// When allowed parent is in context tree (it's outside the converted tree).\n\t\t\tif ( this._modelCursor!.parent.getAncestors().includes( allowedParent ) ) {\n\t\t\t\tallowedParent = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( !allowedParent ) {\n\t\t\t// Check if the node wrapped with a paragraph would be accepted by the schema.\n\t\t\tif ( !isParagraphable( modelCursor, node, schema ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tposition: wrapInParagraph( modelCursor, writer! )\n\t\t\t};\n\t\t}\n\n\t\t// Split element to allowed parent.\n\t\tconst splitResult = this.conversionApi.writer!.split( modelCursor, allowedParent );\n\n\t\t// Using the range returned by `model.Writer#split`, we will pair original elements with their split parts.\n\t\t//\n\t\t// The range returned from the writer spans \"over the split\" or, precisely saying, from the end of the original element (the one\n\t\t// that got split) to the beginning of the other part of that element:\n\t\t//\n\t\t// <limit><a><b><c>X[]Y</c></b><a></limit> ->\n\t\t// <limit><a><b><c>X[</c></b></a><a><b><c>]Y</c></b></a>\n\t\t//\n\t\t// After the split there cannot be any full node between the positions in `splitRange`. The positions are touching.\n\t\t// Also, because of how splitting works, it is easy to notice, that \"closing tags\" are in the reverse order than \"opening tags\".\n\t\t// Also, since we split all those elements, each of them has to have the other part.\n\t\t//\n\t\t// With those observations in mind, we will pair the original elements with their split parts by saving \"closing tags\" and matching\n\t\t// them with \"opening tags\" in the reverse order. For that we can use a stack.\n\t\tconst stack: Array<ModelElement> = [];\n\n\t\tfor ( const treeWalkerValue of splitResult.range.getWalker() ) {\n\t\t\tif ( treeWalkerValue.type == 'elementEnd' ) {\n\t\t\t\tstack.push( treeWalkerValue.item as ModelElement );\n\t\t\t} else {\n\t\t\t\t// There should not be any text nodes after the element is split, so the only other value is `elementStart`.\n\t\t\t\tconst originalPart = stack.pop();\n\t\t\t\tconst splitPart = treeWalkerValue.item as ModelElement;\n\n\t\t\t\tthis._registerSplitPair( originalPart!, splitPart );\n\t\t\t}\n\t\t}\n\n\t\tconst cursorParent = splitResult.range.end.parent;\n\t\tthis._cursorParents.set( node, cursorParent );\n\n\t\treturn {\n\t\t\tposition: splitResult.position,\n\t\t\tcursorParent\n\t\t};\n\t}\n\n\t/**\n\t * Registers that a `splitPart` element is a split part of the `originalPart` element.\n\t *\n\t * The data set by this method is used by {@link #_getSplitParts} and {@link #_removeEmptyElements}.\n\t */\n\tprivate _registerSplitPair( originalPart: ModelElement, splitPart: ModelElement ): void {\n\t\tif ( !this._splitParts.has( originalPart ) ) {\n\t\t\tthis._splitParts.set( originalPart, [ originalPart ] );\n\t\t}\n\n\t\tconst list = this._splitParts.get( originalPart )!;\n\n\t\tthis._splitParts.set( splitPart, list );\n\t\tlist.push( splitPart );\n\t}\n\n\t/**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#getSplitParts\n\t */\n\tprivate _getSplitParts( element: ModelElement ): Array<ModelElement> {\n\t\tlet parts: Array<ModelElement>;\n\n\t\tif ( !this._splitParts.has( element ) ) {\n\t\t\tparts = [ element ];\n\t\t} else {\n\t\t\tparts = this._splitParts.get( element )!;\n\t\t}\n\n\t\treturn parts;\n\t}\n\n\t/**\n\t * Mark an element that were created during the splitting to not get removed on conversion end even if it is empty.\n\t */\n\tprivate _keepEmptyElement( element: ModelElement ): void {\n\t\tthis._emptyElementsToKeep.add( element );\n\t}\n\n\t/**\n\t * Checks if there are any empty elements created while splitting and removes them.\n\t *\n\t * This method works recursively to re-check empty elements again after at least one element was removed in the initial call,\n\t * as some elements might have become empty after other empty elements were removed from them.\n\t */\n\tprivate _removeEmptyElements(): void {\n\t\t// For every parent, prepare an array of children (empty elements) to remove from it.\n\t\t// Then, in next step, we will remove all children together, which is faster than removing them one by one.\n\t\tconst toRemove = new Map<ModelElement | ModelDocumentFragment, Array<ModelElement>>();\n\n\t\tfor ( const element of this._splitParts.keys() ) {\n\t\t\tif ( element.isEmpty && !this._emptyElementsToKeep.has( element ) ) {\n\t\t\t\tconst children = toRemove.get( element.parent! ) || [];\n\n\t\t\t\tchildren.push( element );\n\t\t\t\tthis._splitParts.delete( element );\n\n\t\t\t\ttoRemove.set( element.parent!, children );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const [ parent, children ] of toRemove ) {\n\t\t\tparent._removeChildrenArray( children );\n\t\t}\n\n\t\tif ( toRemove.size ) {\n\t\t\tthis._removeEmptyElements();\n\t\t}\n\t}\n}\n\n/**\n * Fired before the first conversion event, at the beginning of the upcast (view-to-model conversion) process.\n *\n * @eventName ~UpcastDispatcher#viewCleanup\n * @param viewItem A part of the view to be converted.\n */\nexport type UpcastViewCleanupEvent = {\n\tname: 'viewCleanup';\n\targs: [ ViewElement | ViewDocumentFragment ];\n};\n\nexport type UpcastEvent<TName extends string, TItem extends ViewItem | ViewDocumentFragment> = {\n\tname: TName | `${ TName }:${ string }`;\n\targs: [ data: UpcastConversionData<TItem>, conversionApi: UpcastConversionApi ];\n};\n\n/**\n * Conversion data.\n *\n * **Note:** Keep in mind that this object is shared by reference between all conversion callbacks that will be called.\n * This means that callbacks can override values if needed, and these values will be available in other callbacks.\n */\nexport interface UpcastConversionData<TItem extends ViewItem | ViewDocumentFragment = ViewItem | ViewDocumentFragment> {\n\n\t/**\n\t * The converted item.\n\t */\n\tviewItem: TItem;\n\n\t/**\n\t * The position where the converter should start changes.\n\t * Change this value for the next converter to tell where the conversion should continue.\n\t */\n\tmodelCursor: ModelPosition;\n\n\t/**\n\t * The current state of conversion result. Every change to\n\t * the converted element should be reflected by setting or modifying this property.\n\t */\n\tmodelRange: ModelRange | null;\n}\n\n/**\n * Fired when an {@link module:engine/view/element~ViewElement} is converted.\n *\n * `element` is a namespace event for a class of events. Names of actually called events follow the pattern of\n * `element:<elementName>` where `elementName` is the name of the converted element. This way listeners may listen to\n * a conversion of all or just specific elements.\n *\n * @eventName ~UpcastDispatcher#element\n * @param data The conversion data. Keep in mind that this object is shared by reference between all callbacks\n * that will be called. This means that callbacks can override values if needed, and these values\n * will be available in other callbacks.\n * @param conversionApi Conversion utilities to be used by the callback.\n */\nexport type UpcastElementEvent = UpcastEvent<'element', ViewElement>;\n\n/**\n * Fired when a {@link module:engine/view/text~ViewText} is converted.\n *\n * @eventName ~UpcastDispatcher#text\n * @see ~UpcastDispatcher#event:element\n */\nexport type UpcastTextEvent = UpcastEvent<'text', ViewText>;\n\n/**\n * Fired when a {@link module:engine/view/documentfragment~ViewDocumentFragment} is converted.\n *\n * @eventName ~UpcastDispatcher#documentFragment\n * @see ~UpcastDispatcher#event:element\n */\nexport type UpcastDocumentFragmentEvent = UpcastEvent<'documentFragment', ViewDocumentFragment>;\n\n/**\n * Traverses given model item and searches elements which marks marker range. Found element is removed from\n * ModelDocumentFragment but path of this element is stored in a Map which is then returned.\n *\n * @param modelItem Fragment of model.\n * @returns List of static markers.\n */\nfunction extractMarkersFromModelFragment( modelItem: ModelDocumentFragment, writer: ModelWriter ): Map<string, ModelRange> {\n\tconst markerElements = new Set<ModelElement>();\n\tconst markers = new Map<string, ModelRange>();\n\n\t// Create ModelTreeWalker.\n\tconst range = ModelRange._createIn( modelItem ).getItems();\n\n\t// Walk through ModelDocumentFragment and collect marker elements.\n\tfor ( const item of range ) {\n\t\t// Check if current element is a marker.\n\t\tif ( item.is( 'element', '$marker' ) ) {\n\t\t\tmarkerElements.add( item );\n\t\t}\n\t}\n\n\t// Walk through collected marker elements store its path and remove its from the ModelDocumentFragment.\n\tfor ( const markerElement of markerElements ) {\n\t\tconst markerName = markerElement.getAttribute( 'data-name' ) as string;\n\t\tconst currentPosition = writer.createPositionBefore( markerElement );\n\n\t\t// When marker of given name is not stored it means that we have found the beginning of the range.\n\t\tif ( !markers.has( markerName ) ) {\n\t\t\tmarkers.set( markerName, new ModelRange( currentPosition.clone() ) );\n\t\t// Otherwise is means that we have found end of the marker range.\n\t\t} else {\n\t\t\t( markers.get( markerName ) as any ).end = currentPosition.clone();\n\t\t}\n\n\t\t// Remove marker element from ModelDocumentFragment.\n\t\twriter.remove( markerElement );\n\t}\n\n\treturn markers;\n}\n\n/**\n * Creates model fragment according to given context and returns position in the bottom (the deepest) element.\n */\nfunction createContextTree(\n\tcontextDefinition: ModelSchemaContextDefinition,\n\twriter: ModelWriter\n): ModelPosition | undefined {\n\tlet position: ModelPosition | undefined;\n\n\tfor ( const item of new ModelSchemaContext( contextDefinition ) ) {\n\t\tconst attributes: Record<string, unknown> = {};\n\n\t\tfor ( const key of item.getAttributeKeys() ) {\n\t\t\tattributes[ key ] = item.getAttribute( key );\n\t\t}\n\n\t\tconst current = writer.createElement( item.name, attributes );\n\n\t\tif ( position ) {\n\t\t\twriter.insert( current, position );\n\t\t}\n\n\t\tposition = ModelPosition._createAt( current, 0 );\n\t}\n\n\treturn position;\n}\n\n/**\n * A set of conversion utilities available as the third parameter of the\n * {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher upcast dispatcher}'s events.\n */\nexport interface UpcastConversionApi {\n\n\t/**\n\t * Stores information about what parts of the processed view item are still waiting to be handled. After a piece of view item\n\t * was converted, an appropriate consumable value should be\n\t * {@link module:engine/conversion/viewconsumable~ViewConsumable#consume consumed}.\n\t */\n\tconsumable: ViewConsumable;\n\n\t/**\n\t * The model's schema instance.\n\t */\n\tschema: ModelSchema;\n\n\t/**\n\t * The {@link module:engine/model/writer~ModelWriter} instance used to manipulate the data during conversion.\n\t */\n\twriter: ModelWriter;\n\n\t/**\n\t * Custom data stored by converters for the conversion process. Custom properties of this object can be defined and use to\n\t * pass parameters between converters.\n\t *\n\t * The difference between this property and the `data` parameter of\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element} is that the `data` parameters allow you\n\t * to pass parameters within a single event and `store` within the whole conversion.\n\t */\n\tstore: unknown;\n\n\t/**\n\t * Starts the conversion of a given item by firing an appropriate event.\n\t *\n\t * Every fired event is passed (as the first parameter) an object with the `modelRange` property. Every event may set and/or\n\t * modify that property. When all callbacks are done, the final value of the `modelRange` property is returned by this method.\n\t * The `modelRange` must be a {@link module:engine/model/range~ModelRange model range} or `null` (as set by default).\n\t *\n\t * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n\t * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:text\n\t * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:documentFragment\n\t * @param viewItem Item to convert.\n\t * @param modelCursor The conversion position.\n\t * @returns The conversion result:\n\t * * `result.modelRange` The model range containing the result of the item conversion,\n\t * created and modified by callbacks attached to the fired event, or `null` if the conversion result was incorrect.\n\t * * `result.modelCursor` The position where the conversion should be continued.\n\t */\n\tconvertItem( viewItem: ViewItem, modelCursor: ModelPosition ): {\n\t\tmodelRange: ModelRange | null;\n\t\tmodelCursor: ModelPosition;\n\t};\n\n\t/**\n\t * Starts the conversion of all children of a given item by firing appropriate events for all the children.\n\t *\n\t * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n\t * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:text\n\t * @fires module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:documentFragment\n\t * @param viewElement An element whose children should be converted.\n\t * @param positionOrElement A position or an element of\n\t * the conversion.\n\t * @returns The conversion result:\n\t * * `result.modelRange` The model range containing the results of the conversion of all children\n\t * of the given item. When no child was converted, the range is collapsed.\n\t * * `result.modelCursor` The position where the conversion should be continued.\n\t */\n\tconvertChildren( viewElement: ViewElement | ViewDocumentFragment, positionOrElement: ModelPosition | ModelElement ): {\n\t\tmodelRange: ModelRange | null;\n\t\tmodelCursor: ModelPosition;\n\t};\n\n\t/**\n\t * Safely inserts an element to the document, checking the\n\t * {@link module:engine/model/schema~ModelSchema schema} to find an allowed parent\n\t * for an element that you are going to insert, starting from the given position. If the current parent does not allow to insert\n\t * the element but one of the ancestors does, then splits the nodes to allowed parent.\n\t *\n\t * If the schema allows to insert the node in a given position, nothing is split.\n\t *\n\t * If it was not possible to find an allowed parent, `false` is returned and nothing is split.\n\t *\n\t * Otherwise, ancestors are split.\n\t *\n\t * For instance, if `<imageBlock>` is not allowed in `<paragraph>` but is allowed in `$root`:\n\t *\n\t * ```\n\t * <paragraph>foo[]bar</paragraph>\n\t *\n\t * -> safe insert for `<imageBlock>` will split ->\n\t *\n\t * <paragraph>foo</paragraph>[]<paragraph>bar</paragraph>\n\t *```\n\t *\n\t * Example usage:\n\t *\n\t * ```\n\t * const myElement = conversionApi.writer.createElement( 'myElement' );\n\t *\n\t * if ( !conversionApi.safeInsert( myElement, data.modelCursor ) ) {\n\t * \treturn;\n\t * }\n\t *```\n\t *\n\t * The split result is saved and {@link #updateConversionResult} should be used to update the\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionData conversion data}.\n\t *\n\t * @param modelNode The node to insert.\n\t * @param position The position where an element is going to be inserted.\n\t * @returns The split result. If it was not possible to find an allowed position, `false` is returned.\n\t */\n\tsafeInsert( modelNode: ModelNode, position: ModelPosition ): boolean;\n\n\t/**\n\t * Updates the conversion result and sets a proper {@link module:engine/conversion/upcastdispatcher~UpcastConversionData#modelRange} and\n\t * the next {@link module:engine/conversion/upcastdispatcher~UpcastConversionData#modelCursor} after the conversion.\n\t * Used together with {@link #safeInsert}, it enables you to easily convert elements without worrying if the node was split\n\t * during the conversion of its children.\n\t *\n\t * A usage example in converter code:\n\t *\n\t * ```ts\n\t * const myElement = conversionApi.writer.createElement( 'myElement' );\n\t *\n\t * if ( !conversionApi.safeInsert( myElement, data.modelCursor ) ) {\n\t * \treturn;\n\t * }\n\t *\n\t * // Children conversion may split `myElement`.\n\t * conversionApi.convertChildren( data.viewItem, myElement );\n\t *\n\t * conversionApi.updateConversionResult( myElement, data );\n\t * ```\n\t */\n\tupdateConversionResult( modelElement: ModelElement, data: UpcastConversionData ): void;\n\n\t/**\n\t * Checks the {@link module:engine/model/schema~ModelSchema schema} to find an allowed parent for an element\n\t * that is going to be inserted starting from the given position. If the current parent does not allow\n\t * inserting an element but one of the ancestors does, the method splits nodes to allowed parent.\n\t *\n\t * If the schema allows inserting the node in the given position, nothing is split and an object with that position is returned.\n\t *\n\t * If it was not possible to find an allowed parent, `null` is returned and nothing is split.\n\t *\n\t * Otherwise, ancestors are split and an object with a position and the copy of the split element is returned.\n\t *\n\t * For instance, if `<imageBlock>` is not allowed in `<paragraph>` but is allowed in `$root`:\n\t *\n\t * ```\n\t * <paragraph>foo[]bar</paragraph>\n\t *\n\t * -> split for `<imageBlock>` ->\n\t *\n\t * <paragraph>foo</paragraph>[]<paragraph>bar</paragraph>\n\t * ```\n\t *\n\t * In the example above, the position between `<paragraph>` elements will be returned as `position` and the second `paragraph`\n\t * as `cursorParent`.\n\t *\n\t * **Note:** This is an advanced method. For most cases {@link #safeInsert} and {@link #updateConversionResult} should be used.\n\t *\n\t * @param modelNode The node to insert.\n\t * @param modelCursor The position where the element is going to be inserted.\n\t * @returns The split result. If it was not possible to find an allowed position, `null` is returned.\n\t * * `position` The position between split elements.\n\t * * `cursorParent` The element inside which the cursor should be placed to\n\t * continue the conversion. When the element is not defined it means that there was no split.\n\t */\n\tsplitToAllowedParent( modelNode: ModelNode, modelCursor: ModelPosition ): {\n\t\tposition: ModelPosition;\n\t\tcursorParent?: ModelElement | ModelDocumentFragment;\n\t} | null;\n\n\t/**\n\t * Returns all the split parts of the given `element` that were created during upcasting through using {@link #splitToAllowedParent}.\n\t * It enables you to easily track these elements and continue processing them after they are split during the conversion of their\n\t * children.\n\t *\n\t * ```\n\t * <paragraph>Foo<imageBlock />bar<imageBlock />baz</paragraph> ->\n\t * <paragraph>Foo</paragraph><imageBlock /><paragraph>bar</paragraph><imageBlock /><paragraph>baz</paragraph>\n\t * ```\n\t *\n\t * For a reference to any of above paragraphs, the function will return all three paragraphs (the original element included),\n\t * sorted in the order of their creation (the original element is the first one).\n\t *\n\t * If the given `element` was not split, an array with a single element is returned.\n\t *\n\t * A usage example in the converter code:\n\t *\n\t * ```ts\n\t * const myElement = conversionApi.writer.createElement( 'myElement' );\n\t *\n\t * // Children conversion may split `myElement`.\n\t * conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\t *\n\t * const splitParts = conversionApi.getSplitParts( myElement );\n\t * const lastSplitPart = splitParts[ splitParts.length - 1 ];\n\t *\n\t * // Setting `data.modelRange` basing on split parts:\n\t * data.modelRange = conversionApi.writer.createRange(\n\t * \tconversionApi.writer.createPositionBefore( myElement ),\n\t * \tconversionApi.writer.createPositionAfter( lastSplitPart )\n\t * );\n\t *\n\t * // Setting `data.modelCursor` to continue after the last split element:\n\t * data.modelCursor = conversionApi.writer.createPositionAfter( lastSplitPart );\n\t * ```\n\t *\n\t * **Tip:** If you are unable to get a reference to the original element (for example because the code is split into multiple converters\n\t * or even classes) but it has already been converted, you may want to check the first element in `data.modelRange`. This is a common\n\t * situation if an attribute converter is separated from an element converter.\n\t *\n\t * **Note:** This is an advanced method. For most cases {@link #safeInsert} and {@link #updateConversionResult} should be used.\n\t */\n\tgetSplitParts( modelElement: ModelElement ): Array<ModelElement>;\n\n\t/**\n\t * Mark an element that was created during splitting to not get removed on conversion end even if it is empty.\n\t *\n\t * **Note:** This is an advanced method. For most cases you will not need to keep the split empty element.\n\t */\n\tkeepEmptyElement( modelElement: ModelElement ): void;\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/**\n * @module engine/dataprocessor/basichtmlwriter\n */\n\nimport { type DataProcessorHtmlWriter } from './htmlwriter.js';\nimport { global } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Basic HTML writer. It uses the native `innerHTML` property for basic conversion\n * from a document fragment to an HTML string.\n *\n * @internal\n */\nexport class BasicHtmlWriter implements DataProcessorHtmlWriter {\n\t/**\n\t * Returns an HTML string created from the document fragment.\n\t */\n\tpublic getHtml( fragment: DocumentFragment ): string {\n\t\tconst doc = global.document.implementation.createHTMLDocument( '' );\n\t\tconst container = doc.createElement( 'div' );\n\n\t\tcontainer.appendChild( fragment );\n\n\t\treturn container.innerHTML;\n\t}\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/**\n * @module engine/dataprocessor/htmldataprocessor\n */\n\nimport { BasicHtmlWriter } from './basichtmlwriter.js';\nimport { ViewDomConverter } from '../view/domconverter.js';\n\nimport { type DataProcessor } from './dataprocessor.js';\nimport { type DataProcessorHtmlWriter } from './htmlwriter.js';\nimport { type ViewDocument } from '../view/document.js';\nimport { type ViewDocumentFragment } from '../view/documentfragment.js';\nimport type { MatcherPattern } from '../view/matcher.js';\n\n/**\n * The HTML data processor class.\n * This data processor implementation uses HTML as input and output data.\n */\nexport class HtmlDataProcessor implements DataProcessor {\n\t/**\n\t * A DOM parser instance used to parse an HTML string to an HTML document.\n\t */\n\tpublic domParser: DOMParser;\n\n\t/**\n\t * A DOM converter used to convert DOM elements to view elements.\n\t */\n\tpublic domConverter: ViewDomConverter;\n\n\t/**\n\t * A basic HTML writer instance used to convert DOM elements to an HTML string.\n\t */\n\tpublic htmlWriter: DataProcessorHtmlWriter;\n\n\tpublic skipComments: boolean = true;\n\n\t/**\n\t * Creates a new instance of the HTML data processor class.\n\t *\n\t * @param document The view document instance.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.domParser = new DOMParser();\n\t\tthis.domConverter = new ViewDomConverter( document, { renderingMode: 'data' } );\n\t\tthis.htmlWriter = new BasicHtmlWriter();\n\t}\n\n\t/**\n\t * Converts a provided {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}\n\t * to data format &ndash; in this case to an HTML string.\n\t *\n\t * @returns HTML string.\n\t */\n\tpublic toData( viewFragment: ViewDocumentFragment ): string {\n\t\t// Convert view DocumentFragment to DOM DocumentFragment.\n\t\tconst domFragment = this.domConverter.viewToDom( viewFragment );\n\n\t\t// Convert DOM DocumentFragment to HTML output.\n\t\treturn this.htmlWriter.getHtml( domFragment );\n\t}\n\n\t/**\n\t * Converts the provided HTML string to a view tree.\n\t *\n\t * @param data An HTML string.\n\t * @returns A converted view element.\n\t */\n\tpublic toView( data: string ): ViewDocumentFragment {\n\t\t// Convert input HTML data to DOM DocumentFragment.\n\t\tconst domFragment = this._toDom( data );\n\n\t\t// Convert DOM DocumentFragment to view DocumentFragment.\n\t\treturn this.domConverter.domToView( domFragment, { skipComments: this.skipComments } ) as ViewDocumentFragment;\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from the DOM to the view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching all view elements whose content should be treated as raw data.\n\t */\n\tpublic registerRawContentMatcher( pattern: MatcherPattern ): void {\n\t\tthis.domConverter.registerRawContentMatcher( pattern );\n\t}\n\n\t/**\n\t * If the processor is set to use marked fillers, it will insert `&nbsp;` fillers wrapped in `<span>` elements\n\t * (`<span data-cke-filler=\"true\">&nbsp;</span>`) instead of regular `&nbsp;` characters.\n\t *\n\t * This mode allows for a more precise handling of the block fillers (so they do not leak into the editor content) but\n\t * bloats the editor data with additional markup.\n\t *\n\t * This mode may be required by some features and will be turned on by them automatically.\n\t *\n\t * @param type Whether to use the default or the marked `&nbsp;` block fillers.\n\t */\n\tpublic useFillerType( type: 'default' | 'marked' ): void {\n\t\tthis.domConverter.blockFillerMode = type == 'marked' ? 'markedNbsp' : 'nbsp';\n\t}\n\n\t/**\n\t * Converts an HTML string to its DOM representation. Returns a document fragment containing nodes parsed from\n\t * the provided data.\n\t */\n\tprotected _toDom( data: string ): DocumentFragment {\n\t\t// Wrap data with a <body> tag so leading non-layout nodes (like <script>, <style>, HTML comment)\n\t\t// will be preserved in the body collection.\n\t\t// Do it only for data that is not a full HTML document.\n\t\tif ( !/<(?:html|body|head|meta)(?:\\s[^>]*)?>/i.test( data.trim().slice( 0, 10_000 ) ) ) {\n\t\t\tdata = `<body>${ data }</body>`;\n\t\t}\n\n\t\tconst document = this.domParser.parseFromString( data, 'text/html' );\n\t\tconst fragment = document.createDocumentFragment();\n\t\tconst bodyChildNodes = document.body.childNodes;\n\n\t\twhile ( bodyChildNodes.length > 0 ) {\n\t\t\tfragment.appendChild( bodyChildNodes[ 0 ] );\n\t\t}\n\n\t\treturn fragment;\n\t}\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/**\n * @module engine/controller/datacontroller\n */\n\nimport {\n\tCKEditorError,\n\tEmitterMixin,\n\tObservableMixin,\n\tlogWarning,\n\ttype EmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { Mapper } from '../conversion/mapper.js';\n\nimport { DowncastDispatcher, type DowncastInsertEvent } from '../conversion/downcastdispatcher.js';\nimport { insertAttributesAndChildren, insertText } from '../conversion/downcasthelpers.js';\n\nimport {\n\tUpcastDispatcher,\n\ttype UpcastDocumentFragmentEvent,\n\ttype UpcastElementEvent,\n\ttype UpcastTextEvent\n} from '../conversion/upcastdispatcher.js';\nimport { convertText, convertToModelFragment } from '../conversion/upcasthelpers.js';\n\nimport { ViewDocumentFragment } from '../view/documentfragment.js';\nimport { ViewDocument } from '../view/document.js';\nimport { ViewDowncastWriter } from '../view/downcastwriter.js';\nimport { type ViewElement } from '../view/element.js';\nimport type { StylesProcessor } from '../view/stylesmap.js';\nimport type { MatcherPattern } from '../view/matcher.js';\n\nimport { ModelRange } from '../model/range.js';\nimport { type Model } from '../model/model.js';\nimport { type ModelText } from '../model/text.js';\nimport { type ModelElement } from '../model/element.js';\nimport { type ModelTextProxy } from '../model/textproxy.js';\nimport { type ModelDocumentFragment } from '../model/documentfragment.js';\nimport type { ModelSchemaContextDefinition } from '../model/schema.js';\nimport type { BatchType } from '../model/batch.js';\nimport { autoParagraphEmptyRoots } from '../model/utils/autoparagraphing.js';\n\nimport { HtmlDataProcessor } from '../dataprocessor/htmldataprocessor.js';\nimport { type DataProcessor } from '../dataprocessor/dataprocessor.js';\n\nconst DataControllerBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * Controller for the data pipeline. The data pipeline controls how data is retrieved from the document\n * and set inside it. Hence, the controller features two methods which allow to {@link ~DataController#get get}\n * and {@link ~DataController#set set} data of the {@link ~DataController#model model}\n * using the given:\n *\n * * {@link module:engine/dataprocessor/dataprocessor~DataProcessor data processor},\n * * downcast converters,\n * * upcast converters.\n *\n * An instance of the data controller is always available in the {@link module:core/editor/editor~Editor#data `editor.data`}\n * property:\n *\n * ```ts\n * editor.data.get( { rootName: 'customRoot' } ); // -> '<p>Hello!</p>'\n * ```\n */\nexport class DataController extends DataControllerBase {\n\t/**\n\t * Data model.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * Mapper used for the conversion. It has no permanent bindings, because these are created while getting data and\n\t * are cleared directly after the data are converted. However, the mapper is defined as a class property, because\n\t * it needs to be passed to the `DowncastDispatcher` as a conversion API.\n\t */\n\tpublic readonly mapper: Mapper;\n\n\t/**\n\t * Downcast dispatcher used by the {@link #get get method}. Downcast converters should be attached to it.\n\t */\n\tpublic readonly downcastDispatcher: DowncastDispatcher;\n\n\t/**\n\t * Upcast dispatcher used by the {@link #set set method}. Upcast converters should be attached to it.\n\t */\n\tpublic readonly upcastDispatcher: UpcastDispatcher;\n\n\t/**\n\t * The view document used by the data controller.\n\t */\n\tpublic readonly viewDocument: ViewDocument;\n\n\t/**\n\t * Styles processor used during the conversion.\n\t */\n\tpublic readonly stylesProcessor: StylesProcessor;\n\n\t/**\n\t * Data processor used specifically for HTML conversion.\n\t */\n\tpublic readonly htmlProcessor: HtmlDataProcessor;\n\n\t/**\n\t * Data processor used during the conversion.\n\t * Same instance as {@link #htmlProcessor} by default. Can be replaced at run time to handle different format, e.g. XML or Markdown.\n\t */\n\tpublic processor: DataProcessor;\n\n\t/**\n\t * The view downcast writer just for data conversion purposes, i.e. to modify\n\t * the {@link #viewDocument}.\n\t */\n\tprivate readonly _viewWriter: ViewDowncastWriter;\n\n\t/**\n\t * Creates a data controller instance.\n\t *\n\t * @param model Data model.\n\t * @param stylesProcessor The styles processor instance.\n\t */\n\tconstructor( model: Model, stylesProcessor: StylesProcessor ) {\n\t\tsuper();\n\n\t\tthis.model = model;\n\t\tthis.mapper = new Mapper();\n\n\t\tthis.downcastDispatcher = new DowncastDispatcher( {\n\t\t\tmapper: this.mapper,\n\t\t\tschema: model.schema\n\t\t} );\n\t\tthis.downcastDispatcher.on<DowncastInsertEvent<ModelText | ModelTextProxy>>( 'insert:$text', insertText(), { priority: 'lowest' } );\n\t\tthis.downcastDispatcher.on<DowncastInsertEvent>( 'insert', insertAttributesAndChildren(), { priority: 'lowest' } );\n\n\t\tthis.upcastDispatcher = new UpcastDispatcher( {\n\t\t\tschema: model.schema\n\t\t} );\n\n\t\tthis.viewDocument = new ViewDocument( stylesProcessor );\n\t\tthis.stylesProcessor = stylesProcessor;\n\t\tthis.htmlProcessor = new HtmlDataProcessor( this.viewDocument );\n\t\tthis.processor = this.htmlProcessor;\n\t\tthis._viewWriter = new ViewDowncastWriter( this.viewDocument );\n\n\t\t// Define default converters for text and elements.\n\t\t//\n\t\t// Note that if there is no default converter for the element it will be skipped, for instance `<b>foo</b>` will be\n\t\t// converted to nothing. We therefore add `convertToModelFragment` as a last converter so it converts children of that\n\t\t// element to the document fragment so `<b>foo</b>` will still be converted to `foo` even if there is no converter for `<b>`.\n\t\tthis.upcastDispatcher.on<UpcastTextEvent>( 'text', convertText(), { priority: 'lowest' } );\n\t\tthis.upcastDispatcher.on<UpcastElementEvent>( 'element', convertToModelFragment(), { priority: 'lowest' } );\n\t\tthis.upcastDispatcher.on<UpcastDocumentFragmentEvent>( 'documentFragment', convertToModelFragment(), { priority: 'lowest' } );\n\n\t\tObservableMixin().prototype.decorate.call( this, 'init' as any );\n\t\tObservableMixin().prototype.decorate.call( this, 'set' as any );\n\t\tObservableMixin().prototype.decorate.call( this, 'get' as any );\n\t\tObservableMixin().prototype.decorate.call( this, 'toView' as any );\n\t\tObservableMixin().prototype.decorate.call( this, 'toModel' as any );\n\n\t\t// Fire the `ready` event when the initialization has completed. Such low-level listener offers the possibility\n\t\t// to plug into the initialization pipeline without interrupting the initialization flow.\n\t\tthis.on<DataControllerInitEvent>( 'init', () => {\n\t\t\tthis.fire<DataControllerReadyEvent>( 'ready' );\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Fix empty roots after DataController is 'ready' (note that the init method could be decorated and stopped).\n\t\t// We need to handle this event because initial data could be empty and the post-fixer would not get triggered.\n\t\tthis.on<DataControllerReadyEvent>( 'ready', () => {\n\t\t\tthis.model.enqueueChange( { isUndoable: false }, autoParagraphEmptyRoots );\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Returns the model's data converted by downcast dispatchers attached to {@link #downcastDispatcher} and\n\t * formatted by the {@link #processor data processor}.\n\t *\n\t * A warning is logged when you try to retrieve data for a detached root, as most probably this is a mistake. A detached root should\n\t * be treated like it is removed, and you should not save its data. Note, that the detached root data is always an empty string.\n\t *\n\t * @fires get\n\t * @param options Additional configuration for the retrieved data. `DataController` provides two optional\n\t * properties: `rootName` and `trim`. Other properties of this object are specified by various editor features.\n\t * @param options.rootName Root name. Default 'main'.\n\t * @param options.trim Whether returned data should be trimmed. This option is set to `empty` by default,\n\t * which means whenever editor content is considered empty, an empty string will be returned. To turn off trimming completely\n\t * use `'none'`. In such cases the exact content will be returned (for example a `<p>&nbsp;</p>` for an empty editor).\n\t * @returns Output data.\n\t */\n\tpublic get(\n\t\toptions: {\n\t\t\trootName?: string;\n\t\t\ttrim?: 'empty' | 'none';\n\t\t\t[ key: string ]: unknown;\n\t\t} = {}\n\t): string {\n\t\tconst { rootName = 'main', trim = 'empty' } = options;\n\n\t\tif ( !this._checkIfRootsExists( [ rootName ] ) ) {\n\t\t\t/**\n\t\t\t * Cannot get data from a non-existing root. This error is thrown when\n\t\t\t * {@link module:engine/controller/datacontroller~DataController#get `DataController#get()` method}\n\t\t\t * is called with a non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t\t * calling {@link module:engine/controller/datacontroller~DataController#get} like:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * data.get( { rootName: 'root2' } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-get-non-existent-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-get-non-existent-root', this );\n\t\t}\n\n\t\tconst root = this.model.document.getRoot( rootName )!;\n\n\t\tif ( !root.isAttached() ) {\n\t\t\t/**\n\t\t\t * Retrieving document data for a detached root.\n\t\t\t *\n\t\t\t * This usually indicates an error as a detached root should be considered \"removed\" and should not be included in the\n\t\t\t * document data.\n\t\t\t *\n\t\t\t * @error datacontroller-get-detached-root\n\t\t\t */\n\t\t\tlogWarning( 'datacontroller-get-detached-root', this );\n\t\t}\n\n\t\tif ( trim === 'empty' && !this.model.hasContent( root, { ignoreWhitespaces: true } ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn this.stringify( root, options );\n\t}\n\n\t/**\n\t * Returns the content of the given {@link module:engine/model/element~ModelElement model's element} or\n\t * {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment} converted by the downcast converters\n\t * attached to the {@link #downcastDispatcher} and formatted by the {@link #processor data processor}.\n\t *\n\t * @param modelElementOrFragment The element whose content will be stringified.\n\t * @param options Additional configuration passed to the conversion process.\n\t * @returns Output data.\n\t */\n\tpublic stringify(\n\t\tmodelElementOrFragment: ModelElement | ModelDocumentFragment,\n\t\toptions: Record<string, unknown> = {}\n\t): string {\n\t\t// Model -> view.\n\t\tconst viewDocumentFragment = this.toView( modelElementOrFragment, options );\n\n\t\t// View -> data.\n\t\treturn this.processor.toData( viewDocumentFragment );\n\t}\n\n\t/**\n\t * Returns the content of the given {@link module:engine/model/element~ModelElement model element} or\n\t * {@link module:engine/model/documentfragment~ModelDocumentFragment model document fragment} converted by the downcast\n\t * converters attached to {@link #downcastDispatcher} into a\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment}.\n\t *\n\t * @fires toView\n\t * @param modelElementOrFragment Element or document fragment whose content will be converted.\n\t * @param options Additional configuration that will be available through the\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#options} during the conversion process.\n\t * @returns Output view ModelDocumentFragment.\n\t */\n\tpublic toView(\n\t\tmodelElementOrFragment: ModelElement | ModelDocumentFragment,\n\t\toptions: Record<string, unknown> = {}\n\t): ViewDocumentFragment {\n\t\tconst viewDocument = this.viewDocument;\n\t\tconst viewWriter = this._viewWriter;\n\n\t\t// Clear bindings so the call to this method returns correct results.\n\t\tthis.mapper.clearBindings();\n\n\t\t// First, convert elements.\n\t\tconst modelRange = ModelRange._createIn( modelElementOrFragment );\n\t\tconst viewDocumentFragment = new ViewDocumentFragment( viewDocument );\n\n\t\tthis.mapper.bindElements( modelElementOrFragment, viewDocumentFragment );\n\n\t\t// Prepare list of markers.\n\t\t// For document fragment, simply take the markers assigned to this document fragment.\n\t\t// For model root, all markers in that root will be taken.\n\t\t// For model element, we need to check which markers are intersecting with this element and relatively modify the markers' ranges.\n\t\t// Collapsed markers at element boundary, although considered as not intersecting with the element, will also be returned.\n\t\tconst markers = modelElementOrFragment.is( 'documentFragment' ) ?\n\t\t\tmodelElementOrFragment.markers :\n\t\t\t_getMarkersRelativeToElement( modelElementOrFragment );\n\n\t\tthis.downcastDispatcher.convert( modelRange, markers, viewWriter, options );\n\n\t\treturn viewDocumentFragment;\n\t}\n\n\t/**\n\t * Sets the initial input data parsed by the {@link #processor data processor} and\n\t * converted by the {@link #upcastDispatcher view-to-model converters}.\n\t * Initial data can be only set to a document whose {@link module:engine/model/document~ModelDocument#version} is equal 0.\n\t *\n\t * **Note** This method is {@link module:utils/observablemixin~Observable#decorate decorated} which is\n\t * used by e.g. collaborative editing plugin that syncs remote data on init.\n\t *\n\t * When data is passed as a string, it is initialized on the default `main` root:\n\t *\n\t * ```ts\n\t * dataController.init( '<p>Foo</p>' ); // Initializes data on the `main` root only, as no other is specified.\n\t * ```\n\t *\n\t * To initialize data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t *\n\t * ```ts\n\t * dataController.init( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Initializes data on both the `main` and `title` roots.\n\t * ```\n\t *\n\t * @fires init\n\t * @param data Input data as a string or an object containing the `rootName` - `data`\n\t * pairs to initialize data on multiple roots at once.\n\t * @returns Promise that is resolved after the data is set on the editor.\n\t */\n\tpublic init( data: string | Record<string, string> ): Promise<void> {\n\t\tif ( this.model.document.version ) {\n\t\t\t/**\n\t\t\t * Cannot set initial data to a non-empty {@link module:engine/model/document~ModelDocument}.\n\t\t\t * Initial data should be set once, during the {@link module:core/editor/editor~Editor} initialization,\n\t\t\t * when the {@link module:engine/model/document~ModelDocument#version} is equal 0.\n\t\t\t *\n\t\t\t * @error datacontroller-init-document-not-empty\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-init-document-not-empty', this );\n\t\t}\n\n\t\tlet initialData: Record<string, string> = {};\n\n\t\tif ( typeof data === 'string' ) {\n\t\t\tinitialData.main = data; // Default root is 'main'. To initiate data on a different root, object should be passed.\n\t\t} else {\n\t\t\tinitialData = data;\n\t\t}\n\n\t\tif ( !this._checkIfRootsExists( Object.keys( initialData ) ) ) {\n\t\t\t/**\n\t\t\t * Cannot init data on a non-existent root. This error is thrown when\n\t\t\t * {@link module:engine/controller/datacontroller~DataController#init DataController#init() method}\n\t\t\t * is called with non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t\t * calling {@link module:engine/controller/datacontroller~DataController#init} like:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * data.init( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-init-non-existent-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-init-non-existent-root', this );\n\t\t}\n\n\t\tthis.model.enqueueChange( { isUndoable: false }, writer => {\n\t\t\tfor ( const rootName of Object.keys( initialData ) ) {\n\t\t\t\tconst modelRoot = this.model.document.getRoot( rootName )!;\n\n\t\t\t\twriter.insert( this.parse( initialData[ rootName ], modelRoot ), modelRoot, 0 );\n\t\t\t}\n\t\t} );\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Sets the input data parsed by the {@link #processor data processor} and\n\t * converted by the {@link #upcastDispatcher view-to-model converters}.\n\t * This method can be used any time to replace existing editor data with the new one without clearing the\n\t * {@link module:engine/model/document~ModelDocument#history document history}.\n\t *\n\t * This method also creates a batch with all the changes applied. If all you need is to parse data, use\n\t * the {@link #parse} method.\n\t *\n\t * When data is passed as a string it is set on the default `main` root:\n\t *\n\t * ```ts\n\t * dataController.set( '<p>Foo</p>' ); // Sets data on the `main` root, as no other is specified.\n\t * ```\n\t *\n\t * To set data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t *\n\t * ```ts\n\t * dataController.set( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Sets data on the `main` and `title` roots as specified.\n\t * ```\n\t *\n\t * To set the data with a preserved undo stack and add the change to the undo stack, set `{ isUndoable: true }` as a `batchType` option.\n\t *\n\t * ```ts\n\t * dataController.set( '<p>Foo</p>', { batchType: { isUndoable: true } } );\n\t * ```\n\t *\n\t * @fires set\n\t * @param data Input data as a string or an object containing the `rootName` - `data`\n\t * pairs to set data on multiple roots at once.\n\t * @param options Options for setting data.\n\t * @param options.batchType The batch type that will be used to create a batch for the changes applied by this method.\n\t * By default, the batch will be set as {@link module:engine/model/batch~Batch#isUndoable not undoable} and the undo stack will be\n\t * cleared after the new data is applied (all undo steps will be removed). If the batch type `isUndoable` flag is be set to `true`,\n\t * the undo stack will be preserved instead and not cleared when new data is applied.\n\t */\n\tpublic set(\n\t\tdata: string | Record<string, string>,\n\t\toptions: {\n\t\t\tbatchType?: BatchType;\n\t\t\t[ key: string ]: unknown;\n\t\t} = {}\n\t): void {\n\t\tlet newData: Record<string, string> = {};\n\n\t\tif ( typeof data === 'string' ) {\n\t\t\tnewData.main = data; // The default root is 'main'. To set data on a different root, an object should be passed.\n\t\t} else {\n\t\t\tnewData = data;\n\t\t}\n\n\t\tif ( !this._checkIfRootsExists( Object.keys( newData ) ) ) {\n\t\t\t/**\n\t\t\t * Cannot set data on a non-existent root. This error is thrown when the\n\t\t\t * {@link module:engine/controller/datacontroller~DataController#set DataController#set() method}\n\t\t\t * is called with non-existent root name. For example, if there is an editor instance with only the default `main` root,\n\t\t\t * calling {@link module:engine/controller/datacontroller~DataController#set} like:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * data.set( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-set-non-existent-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'datacontroller-set-non-existent-root', this );\n\t\t}\n\n\t\tthis.model.enqueueChange( options.batchType || {}, writer => {\n\t\t\twriter.setSelection( null );\n\t\t\twriter.removeSelectionAttribute( this.model.document.selection.getAttributeKeys() );\n\n\t\t\tfor ( const rootName of Object.keys( newData ) ) {\n\t\t\t\t// Save to model.\n\t\t\t\tconst modelRoot = this.model.document.getRoot( rootName )!;\n\n\t\t\t\twriter.remove( writer.createRangeIn( modelRoot ) );\n\t\t\t\twriter.insert( this.parse( newData[ rootName ], modelRoot ), modelRoot, 0 );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the data parsed by the {@link #processor data processor} and then converted by upcast converters\n\t * attached to the {@link #upcastDispatcher}.\n\t *\n\t * **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a\n\t * custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n\t * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n\t * explicitly, otherwise the conversion result may be wrong.\n\t * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t *\n\t * @see #set\n\t * @param data Data to parse.\n\t * @param context Base context in which the view will be converted to the model.\n\t * See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t * @returns Parsed data.\n\t */\n\tpublic parse( data: string, context: ModelSchemaContextDefinition = '$root' ): ModelDocumentFragment {\n\t\t// data -> view\n\t\tconst viewDocumentFragment = this.processor.toView( data );\n\n\t\t// view -> model\n\t\treturn this.toModel( viewDocumentFragment, context );\n\t}\n\n\t/**\n\t * Returns the result of the given {@link module:engine/view/element~ViewElement view element} or\n\t * {@link module:engine/view/documentfragment~ViewDocumentFragment view document fragment} converted by the\n\t * {@link #upcastDispatcher view-to-model converters}, wrapped by {@link module:engine/model/documentfragment~ModelDocumentFragment}.\n\t *\n\t * When marker elements were converted during the conversion process, it will be set as a document fragment's\n\t * {@link module:engine/model/documentfragment~ModelDocumentFragment#markers static markers map}.\n\t *\n\t * **Note:** The default `context` value is `'$root'`, which only matches the generic root. When the editor uses a\n\t * custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n\t * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n\t * explicitly, otherwise the conversion result may be wrong.\n\t * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t *\n\t * @fires toModel\n\t * @param viewElementOrFragment The element or document fragment whose content will be converted.\n\t * @param context Base context in which the view will be converted to the model.\n\t * See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t * @returns Output document fragment.\n\t */\n\tpublic toModel(\n\t\tviewElementOrFragment: ViewElement | ViewDocumentFragment,\n\t\tcontext: ModelSchemaContextDefinition = '$root'\n\t): ModelDocumentFragment {\n\t\treturn this.model.change( writer => {\n\t\t\treturn this.upcastDispatcher.convert( viewElementOrFragment, writer, context );\n\t\t} );\n\t}\n\n\t/**\n\t * Adds the style processor normalization rules.\n\t *\n\t * You can implement your own rules as well as use one of the available processor rules:\n\t *\n\t * * background: {@link module:engine/view/styles/background~addBackgroundStylesRules}\n\t * * border: {@link module:engine/view/styles/border~addBorderStylesRules}\n\t * * margin: {@link module:engine/view/styles/margin~addMarginStylesRules}\n\t * * padding: {@link module:engine/view/styles/padding~addPaddingStylesRules}\n\t */\n\tpublic addStyleProcessorRules( callback: ( stylesProcessor: StylesProcessor ) => void ): void {\n\t\tcallback( this.stylesProcessor );\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} on an {@link #htmlProcessor htmlProcessor}\n\t * and a {@link #processor processor} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM to view elements.\n\t *\n\t * The raw data can be later accessed by the\n\t * {@link module:engine/view/element~ViewElement#getCustomProperty view element custom property}\n\t * `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching all view elements whose content should be treated as a raw data.\n\t */\n\tpublic registerRawContentMatcher( pattern: MatcherPattern ): void {\n\t\t// No need to register the pattern if both the `htmlProcessor` and `processor` are the same instances.\n\t\tif ( this.processor && this.processor !== this.htmlProcessor ) {\n\t\t\tthis.processor.registerRawContentMatcher( pattern );\n\t\t}\n\n\t\tthis.htmlProcessor.registerRawContentMatcher( pattern );\n\t}\n\n\t/**\n\t * Removes all event listeners set by the DataController.\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Checks whether all provided root names are actually existing editor roots.\n\t *\n\t * @param rootNames Root names to check.\n\t * @returns Whether all provided root names are existing editor roots.\n\t */\n\tprivate _checkIfRootsExists( rootNames: Array<string> ): boolean {\n\t\tfor ( const rootName of rootNames ) {\n\t\t\tif ( !this.model.document.getRoot( rootName ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}\n\n/**\n * Event fired once the data initialization has finished.\n *\n * @eventName ~DataController#ready\n */\nexport type DataControllerReadyEvent = {\n\tname: 'ready';\n\targs: [];\n};\n\n/**\n * An event fired after the {@link ~DataController#init `init()` method} was run. It can be {@link ~DataController#listenTo listened to} in\n * order to adjust or modify the initialization flow. However, if the `init` event is stopped or prevented,\n * the {@link ~DataController#event:ready `ready` event} should be fired manually.\n *\n * The `init` event is fired by the decorated {@link ~DataController#init} method.\n * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.\n *\n * @eventName ~DataController#init\n */\nexport type DataControllerInitEvent = {\n\tname: 'init';\n\targs: [ Parameters<DataController[ 'init' ]> ];\n\treturn: ReturnType<DataController[ 'init' ]>;\n};\n\n/**\n * An event fired after {@link ~DataController#set set() method} has been run.\n *\n * The `set` event is fired by the decorated {@link ~DataController#set} method.\n * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.\n *\n * @eventName ~DataController#set\n */\nexport type DataControllerSetEvent = {\n\tname: 'set';\n\targs: [ Parameters<DataController[ 'set' ]> ];\n\treturn: ReturnType<DataController[ 'set' ]>;\n};\n\n/**\n * Event fired after the {@link ~DataController#get get() method} has been run.\n *\n * The `get` event is fired by the decorated {@link ~DataController#get} method.\n * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.\n *\n * @eventName ~DataController#get\n */\nexport type DataControllerGetEvent = {\n\tname: 'get';\n\targs: [ Parameters<DataController[ 'get' ]> ];\n\treturn: ReturnType<DataController[ 'get' ]>;\n};\n\n/**\n * Event fired after the {@link ~DataController#toView toView() method} has been run.\n *\n * The `toView` event is fired by the decorated {@link ~DataController#toView} method.\n * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.\n *\n * @eventName ~DataController#toView\n */\nexport type DataControllerToViewEvent = {\n\tname: 'toView';\n\targs: [ Parameters<DataController[ 'toView' ]> ];\n\treturn: ReturnType<DataController[ 'toView' ]>;\n};\n\n/**\n * Event fired after the {@link ~DataController#toModel toModel() method} has been run.\n *\n * The `toModel` event is fired by the decorated {@link ~DataController#toModel} method.\n * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.\n *\n * @eventName ~DataController#toModel\n */\nexport type DataControllerToModelEvent = {\n\tname: 'toModel';\n\targs: [ Parameters<DataController[ 'toModel' ]> ];\n\treturn: ReturnType<DataController[ 'toModel' ]>;\n};\n\n/**\n * Helper function for downcast conversion.\n *\n * Takes a document element (element that is added to a model document) and checks which markers are inside it. If the marker is collapsed\n * at element boundary, it is considered as contained inside the element and marker range is returned. Otherwise, if the marker is\n * intersecting with the element, the intersection is returned.\n */\nfunction _getMarkersRelativeToElement( element: ModelElement ): Map<string, ModelRange> {\n\tconst result: Array<[ string, ModelRange ]> = [];\n\tconst doc = element.root.document;\n\n\tif ( !doc ) {\n\t\treturn new Map();\n\t}\n\n\tconst elementRange = ModelRange._createIn( element );\n\n\tfor ( const marker of doc.model.markers ) {\n\t\tconst markerRange = marker.getRange();\n\n\t\tconst isMarkerCollapsed = markerRange.isCollapsed;\n\t\tconst isMarkerAtElementBoundary = markerRange.start.isEqual( elementRange.start ) || markerRange.end.isEqual( elementRange.end );\n\n\t\tif ( isMarkerCollapsed && isMarkerAtElementBoundary ) {\n\t\t\tresult.push( [ marker.name, markerRange ] );\n\t\t} else {\n\t\t\tconst updatedMarkerRange = elementRange.getIntersection( markerRange );\n\n\t\t\tif ( updatedMarkerRange ) {\n\t\t\t\tresult.push( [ marker.name, updatedMarkerRange ] );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn new Map( result );\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/**\n * @module engine/conversion/conversion\n */\n\nimport {\n\tCKEditorError,\n\ttoArray,\n\ttype ArrayOrItem,\n\ttype PriorityString\n} from '@ckeditor/ckeditor5-utils';\n\nimport { UpcastHelpers } from './upcasthelpers.js';\nimport {\n\tDowncastHelpers,\n\ttype DowncastAttributeCreatorFunction,\n\ttype DowncastAttributeDescriptor\n} from './downcasthelpers.js';\n\nimport { type DowncastDispatcher } from './downcastdispatcher.js';\nimport { type UpcastDispatcher } from './upcastdispatcher.js';\nimport { type ViewElementDefinition } from '../view/elementdefinition.js';\nimport type { MatcherPattern } from '../view/matcher.js';\n\n/**\n * A utility class that helps add converters to upcast and downcast dispatchers.\n *\n * We recommend reading the {@glink framework/deep-dive/conversion/intro editor conversion} guide first to\n * understand the core concepts of the conversion mechanisms.\n *\n * An instance of the conversion manager is available in the\n * {@link module:core/editor/editor~Editor#conversion `editor.conversion`} property\n * and by default has the following groups of dispatchers (i.e. directions of conversion):\n *\n * * `downcast` (editing and data downcasts)\n * * `editingDowncast`\n * * `dataDowncast`\n * * `upcast`\n *\n * # One-way converters\n *\n * To add a converter to a specific group, use the {@link module:engine/conversion/conversion~Conversion#for `for()`}\n * method:\n *\n * ```ts\n * // Add a converter to editing downcast and data downcast.\n * editor.conversion.for( 'downcast' ).elementToElement( config ) );\n *\n * // Add a converter to the data pipepline only:\n * editor.conversion.for( 'dataDowncast' ).elementToElement( dataConversionConfig ) );\n *\n * // And a slightly different one for the editing pipeline:\n * editor.conversion.for( 'editingDowncast' ).elementToElement( editingConversionConfig ) );\n * ```\n *\n * See {@link module:engine/conversion/conversion~Conversion#for `for()`} method documentation to learn more about\n * available conversion helpers and how to use your custom ones.\n *\n * # Two-way converters\n *\n * Besides using one-way converters via the `for()` method, you can also use other methods available in this\n * class to add two-way converters (upcast and downcast):\n *\n * * {@link module:engine/conversion/conversion~Conversion#elementToElement `elementToElement()`} &ndash;\n * Model element to view element and vice versa.\n * * {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement()`} &ndash;\n * Model attribute to view element and vice versa.\n * * {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `attributeToAttribute()`} &ndash;\n * Model attribute to view attribute and vice versa.\n */\nexport class Conversion {\n\t/**\n\t * Maps dispatchers group name to ConversionHelpers instances.\n\t */\n\tprivate readonly _helpers = new Map<string, DowncastHelpers | UpcastHelpers>();\n\n\tprivate readonly _downcast: Array<DowncastDispatcher>;\n\tprivate readonly _upcast: Array<UpcastDispatcher>;\n\n\t/**\n\t * Creates a new conversion instance.\n\t */\n\tconstructor(\n\t\tdowncastDispatchers: ArrayOrItem<DowncastDispatcher>,\n\t\tupcastDispatchers: ArrayOrItem<UpcastDispatcher>\n\t) {\n\t\t// Define default 'downcast' & 'upcast' dispatchers groups. Those groups are always available as two-way converters needs them.\n\t\tthis._downcast = toArray( downcastDispatchers );\n\t\tthis._createConversionHelpers( { name: 'downcast', dispatchers: this._downcast, isDowncast: true } );\n\n\t\tthis._upcast = toArray( upcastDispatchers );\n\t\tthis._createConversionHelpers( { name: 'upcast', dispatchers: this._upcast, isDowncast: false } );\n\t}\n\n\tpublic addAlias(\n\t\talias: `${ string }Downcast`,\n\t\tdispatcher: DowncastDispatcher\n\t): void;\n\tpublic addAlias(\n\t\talias: `${ string }Upcast`,\n\t\tdispatcher: UpcastDispatcher\n\t): void;\n\tpublic addAlias(\n\t\talias: string,\n\t\tdispatcher: DowncastDispatcher | UpcastDispatcher\n\t): void;\n\n\t/**\n\t * Define an alias for registered dispatcher.\n\t *\n\t * ```ts\n\t * const conversion = new Conversion(\n\t * \t[ dataDowncastDispatcher, editingDowncastDispatcher ],\n\t * \tupcastDispatcher\n\t * );\n\t *\n\t * conversion.addAlias( 'dataDowncast', dataDowncastDispatcher );\n\t * ```\n\t *\n\t * @param alias An alias of a dispatcher.\n\t * @param dispatcher Dispatcher which should have an alias.\n\t */\n\tpublic addAlias(\n\t\talias: string,\n\t\tdispatcher: DowncastDispatcher | UpcastDispatcher\n\t): void {\n\t\tconst isDowncast = this._downcast.includes( dispatcher as any );\n\t\tconst isUpcast = this._upcast.includes( dispatcher as any );\n\n\t\tif ( !isUpcast && !isDowncast ) {\n\t\t\t/**\n\t\t\t * Trying to register an alias for a dispatcher that nas not been registered.\n\t\t\t *\n\t\t\t * @error conversion-add-alias-dispatcher-not-registered\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'conversion-add-alias-dispatcher-not-registered',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tthis._createConversionHelpers( { name: alias, dispatchers: [ dispatcher ], isDowncast } );\n\t}\n\n\tpublic for( groupName: 'downcast' | 'dataDowncast' | 'editingDowncast' ): DowncastHelpers;\n\tpublic for( groupName: 'upcast' ): UpcastHelpers;\n\tpublic for<T extends string>( groupName: T ): ConversionType<T>;\n\n\t/**\n\t * Provides a chainable API to assign converters to a conversion dispatchers group.\n\t *\n\t * If the given group name has not been registered, the\n\t * {@link module:utils/ckeditorerror~CKEditorError `conversion-for-unknown-group` error} is thrown.\n\t *\n\t * You can use conversion helpers available directly in the `for()` chain or your custom ones via\n\t * the {@link module:engine/conversion/conversionhelpers~ConversionHelpers#add `add()`} method.\n\t *\n\t * # Using built-in conversion helpers\n\t *\n\t * The `for()` chain comes with a set of conversion helpers which you can use like this:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' )\n\t * \t.elementToElement( config1 )        // Adds an element-to-element downcast converter.\n\t * \t.attributeToElement( config2 );     // Adds an attribute-to-element downcast converter.\n\t *\n\t * editor.conversion.for( 'upcast' )\n\t * \t.elementToAttribute( config3 );     // Adds an element-to-attribute upcast converter.\n\t * ```\n\t *\n\t * Refer to the documentation of built-in conversion helpers to learn about their configuration options.\n\t *\n\t * * downcast (model-to-view) conversion helpers:\n\t *\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`},\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement `attributeToElement()`},\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToElement `markerToElement()`}.\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToHighlight `markerToHighlight()`}.\n\t *\n\t * * upcast (view-to-model) conversion helpers:\n\t *\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToElement `elementToElement()`},\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute `elementToAttribute()`},\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToMarker `elementToMarker()`}.\n\t *\n\t * # Using custom conversion helpers\n\t *\n\t * If you need to implement an atypical converter, you can do so by calling:\n\t *\n\t * ```ts\n\t * editor.conversion.for( direction ).add( customHelper );\n\t * ```\n\t *\n\t * The `.add()` method takes exactly one parameter, which is a function. This function should accept one parameter that\n\t * is a dispatcher instance. The function should add an actual converter to the passed dispatcher instance.\n\t *\n\t * Example:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).add( dispatcher => {\n\t * \tdispatcher.on( 'element:a',  ( evt, data, conversionApi ) => {\n\t * \t\t// Do something with a view <a> element.\n\t * \t} );\n\t * } );\n\t * ```\n\t *\n\t * Refer to the documentation of {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}\n\t * and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} to learn how to write\n\t * custom converters.\n\t *\n\t * @param groupName The name of dispatchers group to add the converters to.\n\t */\n\tpublic for( groupName: string ): DowncastHelpers | UpcastHelpers {\n\t\tif ( !this._helpers.has( groupName ) ) {\n\t\t\t/**\n\t\t\t * Trying to add a converter to an unknown dispatchers group.\n\t\t\t *\n\t\t\t * @error conversion-for-unknown-group\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-for-unknown-group', this );\n\t\t}\n\n\t\treturn this._helpers.get( groupName )!;\n\t}\n\n\t/**\n\t * Sets up converters between the model and the view that convert a model element to a view element (and vice versa).\n\t * For example, the model `<paragraph>Foo</paragraph>` is turned into `<p>Foo</p>` in the view.\n\t *\n\t * ```ts\n\t * // A simple conversion from the `paragraph` model element to the `<p>` view element (and vice versa).\n\t * editor.conversion.elementToElement( { model: 'paragraph', view: 'p' } );\n\t *\n\t * // Override other converters by specifying a converter definition with a higher priority.\n\t * editor.conversion.elementToElement( { model: 'paragraph', view: 'div', converterPriority: 'high' } );\n\t *\n\t * // View specified as an object instead of a string.\n\t * editor.conversion.elementToElement( {\n\t * \tmodel: 'fancyParagraph',\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'fancy'\n\t * \t}\n\t * } );\n\t *\n\t * // Use `upcastAlso` to define other view elements that should also be converted to a `paragraph` element.\n\t * editor.conversion.elementToElement( {\n\t * \tmodel: 'paragraph',\n\t * \tview: 'p',\n\t * \tupcastAlso: [\n\t * \t\t'div',\n\t * \t\t{\n\t * \t\t\t// Any element with the `display: block` style.\n\t * \t\t\tstyles: {\n\t * \t\t\t\tdisplay: 'block'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t]\n\t * } );\n\t *\n\t * // `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t * editor.conversion.elementToElement( {\n\t * \tmodel: 'heading',\n\t * \tview: 'h2',\n\t * \t// Convert \"heading-like\" paragraphs to headings.\n\t * \tupcastAlso: viewElement => {\n\t * \t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t * \t\tif ( !fontSize ) {\n\t * \t\t\treturn null;\n\t * \t\t}\n\t *\n\t * \t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t * \t\tif ( !match ) {\n\t * \t\t\treturn null;\n\t * \t\t}\n\t *\n\t * \t\tconst size = Number( match[ 1 ] );\n\t *\n\t * \t\tif ( size > 26 ) {\n\t * \t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t * \t\t}\n\t *\n\t * \t\treturn null;\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * `definition.model` is a `String` with a model element name to convert from or to.\n\t *\n\t * @param definition The converter definition.\n\t */\n\tpublic elementToElement( definition: {\n\t\tmodel: string;\n\t\tview: ViewElementDefinition;\n\t\tupcastAlso?: ArrayOrItem<ViewElementDefinition | MatcherPattern>;\n\t\tconverterPriority?: PriorityString;\n\t} ): void {\n\t\t// Set up downcast converter.\n\t\tthis.for( 'downcast' ).elementToElement( definition );\n\n\t\t// Set up upcast converter.\n\t\tfor ( const { model, view } of _getAllUpcastDefinitions( definition ) ) {\n\t\t\tthis.for( 'upcast' )\n\t\t\t\t.elementToElement( {\n\t\t\t\t\tmodel,\n\t\t\t\t\tview,\n\t\t\t\t\tconverterPriority: definition.converterPriority\n\t\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Sets up converters between the model and the view that convert a model attribute to a view element (and vice versa).\n\t * For example, a model text node with `\"Foo\"` as data and the `bold` attribute will be turned to `<strong>Foo</strong>` in the view.\n\t *\n\t * ```ts\n\t * // A simple conversion from the `bold=true` attribute to the `<strong>` view element (and vice versa).\n\t * editor.conversion.attributeToElement( { model: 'bold', view: 'strong' } );\n\t *\n\t * // Override other converters by specifying a converter definition with a higher priority.\n\t * editor.conversion.attributeToElement( { model: 'bold', view: 'b', converterPriority: 'high' } );\n\t *\n\t * // View specified as an object instead of a string.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: 'bold'\n\t * \t}\n\t * } );\n\t *\n\t * // Use `config.model.name` to define the conversion only from a given node type, `$text` in this case.\n\t * // The same attribute on different elements may then be handled by a different converter.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'textDecoration',\n\t * \t\tvalues: [ 'underline', 'lineThrough' ],\n\t * \t\tname: '$text'\n\t * \t},\n\t * \tview: {\n\t * \t\tunderline: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-decoration': 'underline'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tlineThrough: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-decoration': 'line-through'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * // Use `upcastAlso` to define other view elements that should also be converted to the `bold` attribute.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: 'strong',\n\t * \tupcastAlso: [\n\t * \t\t'b',\n\t * \t\t{\n\t * \t\t\tname: 'span',\n\t * \t\t\tclasses: 'bold'\n\t * \t\t},\n\t * \t\t{\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-weight': 'bold'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tviewElement => {\n\t * \t\t\tconst fontWeight = viewElement.getStyle( 'font-weight' );\n\t *\n\t * \t\t\tif ( viewElement.is( 'element', 'span' ) && fontWeight && /\\d+/.test() && Number( fontWeight ) > 500 ) {\n\t * \t\t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\t\treturn {\n\t * \t\t\t\t\tname: true,\n\t * \t\t\t\t\tstyles: [ 'font-weight' ]\n\t * \t\t\t\t};\n\t * \t\t\t}\n\t * \t\t}\n\t * \t]\n\t * } );\n\t *\n\t * // Conversion from and to a model attribute key whose value is an enum (`fontSize=big|small`).\n\t * // `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'fontSize',\n\t * \t\tvalues: [ 'big', 'small' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tbig: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '1.2em'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tsmall: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '0.8em'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t},\n\t * \tupcastAlso: {\n\t * \t\tbig: viewElement => {\n\t * \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t * \t\t\tif ( !fontSize ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t * \t\t\tif ( !match ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst size = Number( match[ 1 ] );\n\t *\n\t * \t\t\tif ( viewElement.is( 'element', 'span' ) && size > 10 ) {\n\t * \t\t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t * \t\t\t}\n\t *\n\t * \t\t\treturn null;\n\t * \t\t},\n\t * \t\tsmall: viewElement => {\n\t * \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t * \t\t\tif ( !fontSize ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t * \t\t\tif ( !match ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst size = Number( match[ 1 ] );\n\t *\n\t * \t\t\tif ( viewElement.is( 'element', 'span' ) && size < 10 ) {\n\t * \t\t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t * \t\t\t}\n\t *\n\t * \t\t\treturn null;\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * The `definition.model` parameter specifies which model attribute should be converted from or to. It can be a `{ key, value }` object\n\t * describing the attribute key and value to convert or a `String` specifying just the attribute key (in such a case\n\t * `value` is set to `true`).\n\t *\n\t * @param definition The converter definition.\n\t */\n\tpublic attributeToElement<TValues extends string>(\n\t\tdefinition: {\n\t\t\tmodel: string | {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t};\n\t\t\tview: ViewElementDefinition;\n\t\t\tupcastAlso?: ArrayOrItem<MatcherPattern>;\n\t\t\tconverterPriority?: PriorityString;\n\t\t} | {\n\t\t\tmodel: {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t\tvalues: Array<TValues>;\n\t\t\t};\n\t\t\tview: Record<TValues, ViewElementDefinition>;\n\t\t\tupcastAlso?: Record<TValues, ArrayOrItem<MatcherPattern>>;\n\t\t\tconverterPriority?: PriorityString;\n\t\t}\n\t): void {\n\t\t// Set up downcast converter.\n\t\tthis.for( 'downcast' ).attributeToElement( definition );\n\n\t\t// Set up upcast converter.\n\t\tfor ( const { model, view } of _getAllUpcastDefinitions( definition ) ) {\n\t\t\tthis.for( 'upcast' )\n\t\t\t\t.elementToAttribute( {\n\t\t\t\t\tview,\n\t\t\t\t\tmodel,\n\t\t\t\t\tconverterPriority: definition.converterPriority\n\t\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Sets up converters between the model and the view that convert a model attribute to a view attribute (and vice versa). For example,\n\t * `<imageBlock src='foo.jpg'></imageBlock>` is converted to `<img src='foo.jpg'></img>` (the same attribute key and value).\n\t * This type of converters is intended to be used with {@link module:engine/model/element~ModelElement model element} nodes.\n\t * To convert the text attributes,\n\t * the {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement converter`}should be set up.\n\t *\n\t * ```ts\n\t * // A simple conversion from the `source` model attribute to the `src` view attribute (and vice versa).\n\t * editor.conversion.attributeToAttribute( { model: 'source', view: 'src' } );\n\t *\n\t * // Attribute values are strictly specified.\n\t * editor.conversion.attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'imageInline',\n\t * \t\tkey: 'aside',\n\t * \t\tvalues: [ 'aside' ]\n\t * \t},\n\t * \tview: {\n\t * \t\taside: {\n\t * \t\t\tname: 'img',\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: [ 'aside', 'half-size' ]\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * // Set the style attribute.\n\t * editor.conversion.attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'imageInline',\n\t * \t\tkey: 'aside',\n\t * \t\tvalues: [ 'aside' ]\n\t * \t},\n\t * \tview: {\n\t * \t\taside: {\n\t * \t\t\tname: 'img',\n\t * \t\t\tkey: 'style',\n\t * \t\t\tvalue: {\n\t * \t\t\t\tfloat: 'right',\n\t * \t\t\t\twidth: '50%',\n\t * \t\t\t\tmargin: '5px'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * // Conversion from and to a model attribute key whose value is an enum (`align=right|center`).\n\t * // Use `upcastAlso` to define other view elements that should also be converted to the `align=right` attribute.\n\t * editor.conversion.attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tkey: 'align',\n\t * \t\tvalues: [ 'right', 'center' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tright: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: 'align-right'\n\t * \t\t},\n\t * \t\tcenter: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: 'align-center'\n\t * \t\t}\n\t * \t},\n\t * \tupcastAlso: {\n\t * \t\tright: {\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-align': 'right'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tcenter: {\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-align': 'center'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * The `definition.model` parameter specifies which model attribute should be converted from and to.\n\t * It can be a `{ key, [ values ], [ name ] }` object or a `String`, which will be treated like `{ key: definition.model }`.\n\t * The `key` property is the model attribute key to convert from and to.\n\t * The `values` are the possible model attribute values. If the `values` parameter is not set, the model attribute value\n\t * will be the same as the view attribute value.\n\t * If `name` is set, the conversion will be set up only for model elements with the given name.\n\t *\n\t * The `definition.view` parameter specifies which view attribute should be converted from and to.\n\t * It can be a `{ key, value, [ name ] }` object or a `String`, which will be treated like `{ key: definition.view }`.\n\t * The `key` property is the view attribute key to convert from and to.\n\t * The `value` is the view attribute value to convert from and to. If `definition.value` is not set, the view attribute value will be\n\t * the same as the model attribute value.\n\t * If `key` is `'class'`, `value` can be a `String` or an array of `String`s.\n\t * If `key` is `'style'`, `value` is an object with key-value pairs.\n\t * In other cases, `value` is a `String`.\n\t * If `name` is set, the conversion will be set up only for model elements with the given name.\n\t * If `definition.model.values` is set, `definition.view` is an object that assigns values from `definition.model.values`\n\t * to `{ key, value, [ name ] }` objects.\n\t *\n\t * `definition.upcastAlso` specifies which other matching view elements should also be upcast to the given model configuration.\n\t * If `definition.model.values` is set, `definition.upcastAlso` should be an object assigning values from `definition.model.values`\n\t * to {@link module:engine/view/matcher~MatcherPattern}s or arrays of {@link module:engine/view/matcher~MatcherPattern}s.\n\t *\n\t * **Note:** `definition.model` and `definition.view` form should be mirrored, so the same types of parameters should\n\t * be given in both parameters.\n\t *\n\t * @param definition The converter definition.\n\t * @param definition.model The model attribute to convert from and to.\n\t * @param definition.view The view attribute to convert from and to.\n\t * @param definition.upcastAlso Any view element matching `definition.upcastAlso` will also be converted to the given model attribute.\n\t * `definition.upcastAlso` is used only if `config.model.values` is specified.\n\t */\n\tpublic attributeToAttribute<TValues extends string>(\n\t\tdefinition: {\n\t\t\tmodel: string | {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t};\n\t\t\tview: string | ( DowncastAttributeDescriptor & { name?: string } );\n\t\t\tupcastAlso?: ArrayOrItem<string | ( DowncastAttributeDescriptor & { name?: string } ) | DowncastAttributeCreatorFunction>;\n\t\t\tconverterPriority?: PriorityString;\n\t\t} | {\n\t\t\tmodel: {\n\t\t\t\tkey: string;\n\t\t\t\tname?: string;\n\t\t\t\tvalues: Array<TValues>;\n\t\t\t};\n\t\t\tview: Record<TValues, ( DowncastAttributeDescriptor & { name?: string } )>;\n\t\t\tupcastAlso?: Record<TValues, ( DowncastAttributeDescriptor & { name?: string } ) | DowncastAttributeCreatorFunction>;\n\t\t\tconverterPriority?: PriorityString;\n\t\t} ): void {\n\t\t// Set up downcast converter.\n\t\tthis.for( 'downcast' ).attributeToAttribute( definition );\n\n\t\t// Set up upcast converter.\n\t\tfor ( const { model, view } of _getAllUpcastDefinitions( definition ) ) {\n\t\t\tthis.for( 'upcast' )\n\t\t\t\t.attributeToAttribute( {\n\t\t\t\t\tview,\n\t\t\t\t\tmodel\n\t\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Creates and caches conversion helpers for given dispatchers group.\n\t *\n\t * @param options Group name.\n\t * @param options.name Group name.\n\t * @param options.dispatchers Dispatchers to register.\n\t * @param options.isDowncast Whether downcast group.\n\t */\n\tprivate _createConversionHelpers(\n\t\t{ name, dispatchers, isDowncast }: {\n\t\t\tname: string;\n\t\t\tdispatchers: Array<DowncastDispatcher | UpcastDispatcher>;\n\t\t\tisDowncast: boolean;\n\t\t}\n\t): void {\n\t\tif ( this._helpers.has( name ) ) {\n\t\t\t/**\n\t\t\t * Trying to register a group name that has already been registered.\n\t\t\t *\n\t\t\t * @error conversion-group-exists\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'conversion-group-exists', this );\n\t\t}\n\n\t\tconst helpers = isDowncast ?\n\t\t\tnew DowncastHelpers( dispatchers as Array<DowncastDispatcher> ) :\n\t\t\tnew UpcastHelpers( dispatchers as Array<UpcastDispatcher> );\n\n\t\tthis._helpers.set( name, helpers );\n\t}\n}\n\n/**\n * Helper function that creates a joint array out of an item passed in `definition.view` and items passed in\n * `definition.upcastAlso`.\n */\nfunction* _getAllUpcastDefinitions( definition: any ): IterableIterator<{ model: any; view: any }> {\n\tif ( definition.model.values ) {\n\t\tfor ( const value of definition.model.values ) {\n\t\t\tconst model = { key: definition.model.key, value };\n\t\t\tconst view = definition.view[ value ];\n\t\t\tconst upcastAlso = definition.upcastAlso ? definition.upcastAlso[ value ] : undefined;\n\n\t\t\tyield* _getUpcastDefinition( model, view, upcastAlso );\n\t\t}\n\t} else {\n\t\tyield* _getUpcastDefinition( definition.model, definition.view, definition.upcastAlso );\n\t}\n}\n\nfunction* _getUpcastDefinition( model: unknown, view: unknown, upcastAlso?: unknown ): any {\n\tyield { model, view };\n\n\tif ( upcastAlso ) {\n\t\tfor ( const upcastAlsoItem of toArray( upcastAlso ) ) {\n\t\t\tyield { model, view: upcastAlsoItem };\n\t\t}\n\t}\n}\n\nexport type ConversionType<T extends string> = T extends `${ string }Downcast`\n\t? DowncastHelpers\n\t: T extends `${ string }Upcast`\n\t\t? UpcastHelpers\n\t\t: DowncastHelpers | UpcastHelpers;\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/**\n * @module engine/dataprocessor/xmldataprocessor\n */\n\nimport { BasicHtmlWriter } from './basichtmlwriter.js';\nimport { ViewDomConverter } from '../view/domconverter.js';\n\nimport { type DataProcessor } from './dataprocessor.js';\nimport { type DataProcessorHtmlWriter } from './htmlwriter.js';\nimport { type ViewDocument } from '../view/document.js';\nimport { type ViewDocumentFragment } from '../view/documentfragment.js';\nimport type { MatcherPattern } from '../view/matcher.js';\n\n/**\n * The XML data processor class.\n * This data processor implementation uses XML as input and output data.\n * This class is needed because unlike HTML, XML allows to use any tag with any value.\n * For example, `<link>Text</link>` is a valid XML but invalid HTML.\n */\nexport class XmlDataProcessor implements DataProcessor {\n\t/**\n\t * A list of namespaces allowed to use in the XML input.\n\t *\n\t * For example, registering namespaces [ 'attribute', 'container' ] allows to use `<attirbute:tagName></attribute:tagName>`\n\t * and `<container:tagName></container:tagName>` input. It is mainly for debugging.\n\t */\n\tpublic namespaces: Array<string>;\n\n\t/**\n\t * DOM parser instance used to parse an XML string to an XML document.\n\t */\n\tpublic domParser: DOMParser;\n\n\t/**\n\t * DOM converter used to convert DOM elements to view elements.\n\t */\n\tpublic domConverter: ViewDomConverter;\n\n\t/**\n\t * A basic HTML writer instance used to convert DOM elements to an XML string.\n\t * There is no need to use a dedicated XML writer because the basic HTML writer works well in this case.\n\t */\n\tpublic htmlWriter: DataProcessorHtmlWriter;\n\n\tpublic skipComments: boolean = true;\n\n\t/**\n\t * Creates a new instance of the XML data processor class.\n\t *\n\t * @param document The view document instance.\n\t * @param options Configuration options.\n\t * @param options.namespaces A list of namespaces allowed to use in the XML input.\n\t */\n\tconstructor( document: ViewDocument, options: { namespaces?: Array<string> } = {} ) {\n\t\tthis.namespaces = options.namespaces || [];\n\t\tthis.domParser = new DOMParser();\n\t\tthis.domConverter = new ViewDomConverter( document, { renderingMode: 'data' } );\n\t\tthis.htmlWriter = new BasicHtmlWriter();\n\t}\n\n\t/**\n\t * Converts the provided {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}\n\t * to data format &ndash; in this case an XML string.\n\t *\n\t * @returns An XML string.\n\t */\n\tpublic toData( viewFragment: ViewDocumentFragment ): string {\n\t\t// Convert view DocumentFragment to DOM DocumentFragment.\n\t\tconst domFragment = this.domConverter.viewToDom( viewFragment );\n\n\t\t// Convert DOM DocumentFragment to XML output.\n\t\t// There is no need to use dedicated for XML serializing method because BasicHtmlWriter works well in this case.\n\t\treturn this.htmlWriter.getHtml( domFragment );\n\t}\n\n\t/**\n\t * Converts the provided XML string to a view tree.\n\t *\n\t * @param data An XML string.\n\t * @returns A converted view element.\n\t */\n\tpublic toView( data: string ): ViewDocumentFragment {\n\t\t// Convert input XML data to DOM DocumentFragment.\n\t\tconst domFragment = this._toDom( data );\n\n\t\t// Convert DOM DocumentFragment to view DocumentFragment.\n\t\treturn this.domConverter.domToView(\n\t\t\tdomFragment,\n\t\t\t{\n\t\t\t\tkeepOriginalCase: true,\n\t\t\t\tskipComments: this.skipComments\n\t\t\t}\n\t\t) as ViewDocumentFragment;\n\t}\n\n\t/**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from XML to view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~ViewElement#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching all view elements whose content should be treated as raw data.\n\t */\n\tpublic registerRawContentMatcher( pattern: MatcherPattern ): void {\n\t\tthis.domConverter.registerRawContentMatcher( pattern );\n\t}\n\n\t/**\n\t * If the processor is set to use marked fillers, it will insert `&nbsp;` fillers wrapped in `<span>` elements\n\t * (`<span data-cke-filler=\"true\">&nbsp;</span>`) instead of regular `&nbsp;` characters.\n\t *\n\t * This mode allows for a more precise handling of block fillers (so they do not leak into editor content) but\n\t * bloats the editor data with additional markup.\n\t *\n\t * This mode may be required by some features and will be turned on by them automatically.\n\t *\n\t * @param type Whether to use the default or the marked `&nbsp;` block fillers.\n\t */\n\tpublic useFillerType( type: 'default' | 'marked' ): void {\n\t\tthis.domConverter.blockFillerMode = type == 'marked' ? 'markedNbsp' : 'nbsp';\n\t}\n\n\t/**\n\t * Converts an XML string to its DOM representation. Returns a document fragment containing nodes parsed from\n\t * the provided data.\n\t */\n\tprivate _toDom( data: string ): DocumentFragment {\n\t\t// Stringify namespaces.\n\t\tconst namespaces = this.namespaces.map( nsp => `xmlns:${ nsp }=\"nsp\"` ).join( ' ' );\n\n\t\t// Wrap data into root element with optional namespace definitions.\n\t\tdata = `<xml ${ namespaces }>${ data }</xml>`;\n\n\t\tconst parsedDocument = this.domParser.parseFromString( data, 'text/xml' );\n\n\t\t// Parse validation.\n\t\tconst parserError = parsedDocument.querySelector( 'parsererror' );\n\n\t\tif ( parserError ) {\n\t\t\tthrow new Error( 'Parse error - ' + parserError.textContent );\n\t\t}\n\n\t\tconst fragment = parsedDocument.createDocumentFragment();\n\t\tconst nodes = parsedDocument.documentElement.childNodes;\n\n\t\twhile ( nodes.length > 0 ) {\n\t\t\tfragment.appendChild( nodes[ 0 ] );\n\t\t}\n\n\t\treturn fragment;\n\t}\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/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/**\n * @module engine/model/operation/operation\n */\n\nimport { type Batch } from '../batch.js';\nimport { type ModelDocument } from '../document.js';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Abstract base operation class.\n */\nexport abstract class Operation {\n\t/**\n\t * {@link module:engine/model/document~ModelDocument#version} on which operation can be applied. If you try to\n\t * {@link module:engine/model/model~Model#applyOperation apply} operation with different base version than the\n\t * {@link module:engine/model/document~ModelDocument#version document version} the\n\t * {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.\n\t */\n\tpublic baseVersion: number | null;\n\n\t/**\n\t * Defines whether operation is executed on attached or detached {@link module:engine/model/item~ModelItem items}.\n\t */\n\tpublic readonly isDocumentOperation: boolean;\n\n\t/**\n\t * {@link module:engine/model/batch~Batch Batch} to which the operation is added or `null` if the operation is not\n\t * added to any batch yet.\n\t *\n\t * Note, that a {@link #isDocumentOperation non-document operation} has this property always set to `null`, and is never added\n\t * to any batch.\n\t */\n\tpublic batch: Batch | null;\n\n\t/**\n\t * Operation type.\n\t */\n\tpublic readonly abstract type: string;\n\n\t/**\n\t * Base operation constructor.\n\t *\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( baseVersion: number | null ) {\n\t\tthis.baseVersion = baseVersion;\n\t\tthis.isDocumentOperation = this.baseVersion !== null;\n\t\tthis.batch = null;\n\t}\n\n\t/**\n\t * A selectable that will be affected by the operation after it is executed.\n\t *\n\t * The exact returned parameter differs between operation types.\n\t */\n\tpublic abstract get affectedSelectable(): ModelSelectable;\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns Clone of this operation.\n\t */\n\tpublic abstract clone(): Operation;\n\n\t/**\n\t * Creates and returns a reverse operation. Reverse operation when executed right after\n\t * the original operation will bring back tree model state to the point before the original\n\t * operation execution. In other words, it reverses changes done by the original operation.\n\t *\n\t * Keep in mind that tree model state may change since executing the original operation,\n\t * so reverse operation will be \"outdated\". In that case you will need to transform it by\n\t * all operations that were executed after the original operation.\n\t *\n\t * @returns Reversed operation.\n\t */\n\tpublic abstract getReversed(): Operation;\n\n\t/**\n\t * Executes the operation - modifications described by the operation properties will be applied to the model tree.\n\t *\n\t * @internal\n\t */\n\tpublic abstract _execute(): void;\n\n\t/**\n\t * Checks whether the operation's parameters are correct and the operation can be correctly executed. Throws\n\t * an error if operation is not valid.\n\t *\n\t * @internal\n\t */\n\tpublic _validate(): void {\n\t}\n\n\t/**\n\t * Custom toJSON method to solve child-parent circular dependencies.\n\t *\n\t * @returns Clone of this object with the operation property replaced with string.\n\t */\n\tpublic toJSON(): unknown {\n\t\t// This method creates only a shallow copy, all nested objects should be defined separately.\n\t\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1477.\n\t\tconst json: any = Object.assign( {}, this );\n\n\t\tjson.__className = ( this.constructor as any ).className;\n\n\t\t// Remove reference to the parent `Batch` to avoid circular dependencies.\n\t\tdelete json.batch;\n\n\t\t// This can be derived from `baseVersion` so we can remove it.\n\t\tdelete json.isDocumentOperation;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Name of the operation class used for serialization.\n\t */\n\tpublic static get className(): string {\n\t\treturn 'Operation';\n\t}\n\n\t/**\n\t * Creates `Operation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static fromJSON( json: any, document: ModelDocument ): Operation {\n\t\treturn new ( this as any )( json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // log() {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.toString() );\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/utils\n */\n\nimport { ModelNode } from '../node.js';\nimport { ModelRange } from '../range.js';\nimport { ModelText } from '../text.js';\nimport { ModelTextProxy } from '../textproxy.js';\n\nimport { type ModelDocumentFragment } from '../documentfragment.js';\nimport { type ModelElement } from '../element.js';\nimport { type ModelItem } from '../item.js';\nimport { type ModelNodeList } from '../nodelist.js';\nimport { type ModelPosition } from '../position.js';\n\nimport { CKEditorError, isIterable } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Inserts given nodes at given position.\n *\n * @internal\n * @param position Position at which nodes should be inserted.\n * @param nodes Nodes to insert.\n * @returns Range spanning over inserted elements.\n */\nexport function _insert( position: ModelPosition, nodes: ModelNodeSet ): ModelRange {\n\tconst normalizedNodes = _normalizeNodes( nodes );\n\n\t// We have to count offset before inserting nodes because they can get merged and we would get wrong offsets.\n\tconst offset = normalizedNodes.reduce( ( sum, node ) => sum + node.offsetSize, 0 );\n\tconst parent = position.parent;\n\n\t// Insertion might be in a text node, we should split it if that's the case.\n\t_splitNodeAtPosition( position );\n\tconst index = position.index;\n\n\t// Insert nodes at given index. After splitting we have a proper index and insertion is between nodes,\n\t// using basic `Element` API.\n\tparent._insertChild( index, normalizedNodes );\n\n\t// Merge text nodes, if possible. Merging is needed only at points where inserted nodes \"touch\" \"old\" nodes.\n\t_mergeNodesAtIndex( parent, index + normalizedNodes.length );\n\t_mergeNodesAtIndex( parent, index );\n\n\treturn new ModelRange( position, position.getShiftedBy( offset ) );\n}\n\n/**\n * Removed nodes in given range. Only {@link module:engine/model/range~ModelRange#isFlat flat} ranges are accepted.\n *\n * @internal\n * @param range Range containing nodes to remove.\n */\nexport function _remove( this: any, range: ModelRange ): Array<ModelNode> {\n\tif ( !range.isFlat ) {\n\t\t/**\n\t\t * Trying to remove a range which starts and ends in different element.\n\t\t *\n\t\t * @error operation-utils-remove-range-not-flat\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'operation-utils-remove-range-not-flat',\n\t\t\tthis\n\t\t);\n\t}\n\n\tconst parent = range.start.parent;\n\n\t// Range may be inside text nodes, we have to split them if that's the case.\n\t_splitNodeAtPosition( range.start );\n\t_splitNodeAtPosition( range.end );\n\n\t// Remove the text nodes using basic `Element` API.\n\tconst removed = parent._removeChildren( range.start.index, range.end.index - range.start.index );\n\n\t// Merge text nodes, if possible. After some nodes were removed, node before and after removed range will be\n\t// touching at the position equal to the removed range beginning. We check merging possibility there.\n\t_mergeNodesAtIndex( parent, range.start.index );\n\n\treturn removed;\n}\n\n/**\n * Moves nodes in given range to given target position. Only {@link module:engine/model/range~ModelRange#isFlat flat} ranges are accepted.\n *\n * @internal\n * @param sourceRange Range containing nodes to move.\n * @param targetPosition Position to which nodes should be moved.\n * @returns Range containing moved nodes.\n */\nexport function _move( this: any, sourceRange: ModelRange, targetPosition: ModelPosition ): ModelRange {\n\tif ( !sourceRange.isFlat ) {\n\t\t/**\n\t\t * Trying to move a range which starts and ends in different element.\n\t\t *\n\t\t * @error operation-utils-move-range-not-flat\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'operation-utils-move-range-not-flat',\n\t\t\tthis\n\t\t);\n\t}\n\n\tconst nodes = _remove( sourceRange );\n\n\t// We have to fix `targetPosition` because model changed after nodes from `sourceRange` got removed and\n\t// that change might have an impact on `targetPosition`.\n\ttargetPosition = targetPosition._getTransformedByDeletion( sourceRange.start, sourceRange.end.offset - sourceRange.start.offset )!;\n\n\treturn _insert( targetPosition, nodes );\n}\n\n/**\n * Sets given attribute on nodes in given range. The attributes are only set on top-level nodes of the range, not on its children.\n *\n * @internal\n * @param range Range containing nodes that should have the attribute set. Must be a flat range.\n * @param key Key of attribute to set.\n * @param value Attribute value.\n */\nexport function _setAttribute( range: ModelRange, key: string, value: unknown ): void {\n\t// Range might start or end in text nodes, so we have to split them.\n\t_splitNodeAtPosition( range.start );\n\t_splitNodeAtPosition( range.end );\n\n\t// Iterate over all items in the range.\n\tfor ( const item of range.getItems( { shallow: true } ) ) {\n\t\t// Iterator will return `ModelTextProxy` instances but we know that those text proxies will\n\t\t// always represent full text nodes (this is guaranteed thanks to splitting we did before).\n\t\t// So, we can operate on those text proxies' text nodes.\n\t\tconst node = item.is( '$textProxy' ) ? item.textNode : item;\n\n\t\tif ( value !== null ) {\n\t\t\tnode._setAttribute( key, value );\n\t\t} else {\n\t\t\tnode._removeAttribute( key );\n\t\t}\n\n\t\t// After attributes changing it may happen that some text nodes can be merged. Try to merge with previous node.\n\t\t_mergeNodesAtIndex( node.parent!, node.index! );\n\t}\n\n\t// Try to merge last changed node with it's previous sibling (not covered by the loop above).\n\t_mergeNodesAtIndex( range.end.parent, range.end.index );\n}\n\n/**\n * Normalizes given object or an array of objects to an array of {@link module:engine/model/node~ModelNode nodes}. See\n * {@link ~ModelNodeSet NodeSet} for details on how normalization is performed.\n *\n * @internal\n * @param nodes Objects to normalize.\n * @returns Normalized nodes.\n */\nexport function _normalizeNodes( nodes: ModelNodeSet ): Array<ModelNode> {\n\tconst normalized: Array<ModelNode> = [];\n\n\tfunction convert( nodes: ModelNodeSet ) {\n\t\tif ( typeof nodes == 'string' ) {\n\t\t\tnormalized.push( new ModelText( nodes ) );\n\t\t} else if ( nodes instanceof ModelTextProxy ) {\n\t\t\tnormalized.push( new ModelText( nodes.data, nodes.getAttributes() ) );\n\t\t} else if ( nodes instanceof ModelNode ) {\n\t\t\tnormalized.push( nodes );\n\t\t} else if ( isIterable( nodes ) ) {\n\t\t\tfor ( const node of nodes ) {\n\t\t\t\tconvert( node );\n\t\t\t}\n\t\t} else {\n\t\t\t// Skip unrecognized type.\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\tconst unreachable: never = nodes;\n\t\t}\n\t}\n\n\tconvert( nodes );\n\n\t// Merge text nodes.\n\tfor ( let i = 1; i < normalized.length; i++ ) {\n\t\tconst node = normalized[ i ];\n\t\tconst prev = normalized[ i - 1 ];\n\n\t\tif ( node instanceof ModelText && prev instanceof ModelText && _haveSameAttributes( node, prev ) ) {\n\t\t\t// Doing this instead changing `prev.data` because `data` is readonly.\n\t\t\tnormalized.splice( i - 1, 2, new ModelText( prev.data + node.data, prev.getAttributes() ) );\n\t\t\ti--;\n\t\t}\n\t}\n\n\treturn normalized;\n}\n\n/**\n * Checks if nodes before and after given index in given element are {@link module:engine/model/text~ModelText text nodes} and\n * merges them into one node if they have same attributes.\n *\n * Merging is done by removing two text nodes and inserting a new text node containing data from both merged text nodes.\n *\n * @param element Parent element of nodes to merge.\n * @param index Index between nodes to merge.\n */\nfunction _mergeNodesAtIndex( element: ModelElement | ModelDocumentFragment, index: number ) {\n\tconst nodeBefore = element.getChild( index - 1 );\n\tconst nodeAfter = element.getChild( index );\n\n\t// Check if both of those nodes are text objects with same attributes.\n\tif ( nodeBefore && nodeAfter && nodeBefore.is( '$text' ) && nodeAfter.is( '$text' ) && _haveSameAttributes( nodeBefore, nodeAfter ) ) {\n\t\t// Append text of text node after index to the before one.\n\t\tconst mergedNode = new ModelText( nodeBefore.data + nodeAfter.data, nodeBefore.getAttributes() );\n\n\t\t// Remove separate text nodes.\n\t\telement._removeChildren( index - 1, 2 );\n\n\t\t// Insert merged text node.\n\t\telement._insertChild( index - 1, mergedNode );\n\t}\n}\n\n/**\n * Checks if given position is in a text node, and if so, splits the text node in two text nodes, each of them\n * containing a part of original text node.\n *\n * @param position Position at which node should be split.\n */\nfunction _splitNodeAtPosition( position: ModelPosition ): void {\n\tconst textNode = position.textNode;\n\tconst element = position.parent;\n\n\tif ( textNode ) {\n\t\tconst offsetDiff = position.offset - textNode.startOffset!;\n\t\tconst index = textNode.index!;\n\n\t\telement._removeChildren( index, 1 );\n\n\t\tconst firstPart = new ModelText( textNode.data.substr( 0, offsetDiff ), textNode.getAttributes() );\n\t\tconst secondPart = new ModelText( textNode.data.substr( offsetDiff ), textNode.getAttributes() );\n\n\t\telement._insertChild( index, [ firstPart, secondPart ] );\n\t}\n}\n\n/**\n * Checks whether two given nodes have same attributes.\n *\n * @param nodeA Node to check.\n * @param nodeB Node to check.\n * @returns `true` if nodes have same attributes, `false` otherwise.\n */\nfunction _haveSameAttributes( nodeA: ModelNode, nodeB: ModelNode ): boolean | undefined {\n\tconst iteratorA = nodeA.getAttributes();\n\tconst iteratorB = nodeB.getAttributes();\n\n\tfor ( const attr of iteratorA ) {\n\t\tif ( attr[ 1 ] !== nodeB.getAttribute( attr[ 0 ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\titeratorB.next();\n\t}\n\n\treturn iteratorB.next().done;\n}\n\n/**\n * Value that can be normalized to an array of {@link module:engine/model/node~ModelNode nodes}.\n *\n * Non-arrays are normalized as follows:\n * * {@link module:engine/model/node~ModelNode Node} is left as is,\n * * {@link module:engine/model/textproxy~ModelTextProxy TextProxy} and `string` are normalized to\n * {@link module:engine/model/text~ModelText Text},\n * * {@link module:engine/model/nodelist~ModelNodeList NodeList} is normalized to an array containing all nodes that are in that node list,\n * * {@link module:engine/model/documentfragment~ModelDocumentFragment ModelDocumentFragment} is normalized to an array containing all of\n * it's children.\n *\n * Arrays are processed item by item like non-array values and flattened to one array. Normalization always results in\n * a flat array of {@link module:engine/model/node~ModelNode nodes}. Consecutive text nodes (or items normalized to text nodes) will be\n * merged if they have same attributes.\n */\nexport type ModelNodeSet =\n\t| ModelItem\n\t| string\n\t| ModelNodeList\n\t| ModelDocumentFragment\n\t| Iterable<ModelItem\n\t| string\n\t| ModelNodeList\n\t| ModelDocumentFragment>;\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/**\n * @module engine/model/operation/moveoperation\n */\n\nimport { Operation } from './operation.js';\nimport { ModelPosition } from '../position.js';\nimport { ModelRange } from '../range.js';\nimport { _move } from './utils.js';\nimport type { ModelSelectable } from '../selection.js';\n\nimport { CKEditorError, compareArrays } from '@ckeditor/ckeditor5-utils';\n\nimport { type ModelDocument } from '../document.js';\n\n/**\n * Operation to move a range of {@link module:engine/model/item~ModelItem model items}\n * to given {@link module:engine/model/position~ModelPosition target position}.\n */\nexport class MoveOperation extends Operation {\n\t/**\n\t * Position before the first {@link module:engine/model/item~ModelItem model item} to move.\n\t */\n\tpublic sourcePosition: ModelPosition;\n\n\t/**\n\t * Offset size of moved range.\n\t */\n\tpublic howMany: number;\n\n\t/**\n\t * Position at which moved nodes will be inserted.\n\t */\n\tpublic targetPosition: ModelPosition;\n\n\t/**\n\t * Creates a move operation.\n\t *\n\t * @param sourcePosition Position before the first {@link module:engine/model/item~ModelItem model item} to move.\n\t * @param howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t * `sourcePosition` with offset shifted by `howMany`.\n\t * @param targetPosition Position at which moved nodes will be inserted.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( sourcePosition: ModelPosition, howMany: number, targetPosition: ModelPosition, baseVersion: number | null ) {\n\t\tsuper( baseVersion );\n\n\t\tthis.sourcePosition = sourcePosition.clone();\n\t\t// `'toNext'` because `sourcePosition` is a bit like a start of the moved range.\n\t\tthis.sourcePosition.stickiness = 'toNext';\n\n\t\tthis.howMany = howMany;\n\n\t\tthis.targetPosition = targetPosition.clone();\n\t\tthis.targetPosition.stickiness = 'toNone';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'move' | 'remove' | 'reinsert' {\n\t\tif ( this.targetPosition.root.rootName == this.sourcePosition.root.rootName ) {\n\t\t\treturn 'move';\n\t\t} else if ( this.targetPosition.root.rootName == '$graveyard' ) {\n\t\t\treturn 'remove';\n\t\t} else if ( this.sourcePosition.root.rootName == '$graveyard' ) {\n\t\t\treturn 'reinsert';\n\t\t}\n\n\t\treturn 'move';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn [\n\t\t\tthis.sourceRange,\n\t\t\tModelRange._createFromPositionAndShift( this.targetPosition, 0 )\n\t\t];\n\t}\n\n\t/**\n\t * Returns the range that is moved by this operation. This is equal to a range starting at {@link #sourcePosition} spanning over\n\t * {@link #howMany} nodes.\n\t */\n\tpublic get sourceRange(): ModelRange {\n\t\treturn ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany );\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */\n\tpublic clone(): MoveOperation {\n\t\treturn new MoveOperation( this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion );\n\t}\n\n\t/**\n\t * Returns the start position of the moved range after it got moved. This may be different than\n\t * {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition} in some cases, i.e. when a range is moved\n\t * inside the same parent but {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition targetPosition}\n\t * is after {@link module:engine/model/operation/moveoperation~MoveOperation#sourcePosition sourcePosition}.\n\t *\n\t * ```\n\t *  vv              vv\n\t * abcdefg ===> adefbcg\n\t *      ^          ^\n\t *      targetPos  movedRangeStart\n\t *      offset 6   offset 4\n\t *```\n\t */\n\tpublic getMovedRangeStart(): ModelPosition {\n\t\treturn this.targetPosition._getTransformedByDeletion( this.sourcePosition, this.howMany )!;\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\tconst newTargetPosition = this.sourcePosition._getTransformedByInsertion( this.targetPosition, this.howMany );\n\n\t\treturn new MoveOperation( this.getMovedRangeStart(), this.howMany, newTargetPosition, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tconst sourceElement = this.sourcePosition.parent;\n\t\tconst targetElement = this.targetPosition.parent;\n\t\tconst sourceOffset = this.sourcePosition.offset;\n\t\tconst targetOffset = this.targetPosition.offset;\n\n\t\t// Validate whether move operation has correct parameters.\n\t\t// Validation is pretty complex but move operation is one of the core ways to manipulate the document state.\n\t\t// We expect that many errors might be connected with one of scenarios described below.\n\t\tif ( sourceOffset + this.howMany > sourceElement.maxOffset ) {\n\t\t\t/**\n\t\t\t * The nodes which should be moved do not exist.\n\t\t\t *\n\t\t\t * @error move-operation-nodes-do-not-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'move-operation-nodes-do-not-exist', this\n\t\t\t);\n\t\t} else if ( sourceElement === targetElement && sourceOffset < targetOffset && targetOffset < sourceOffset + this.howMany ) {\n\t\t\t/**\n\t\t\t * Trying to move a range of nodes into the middle of that range.\n\t\t\t *\n\t\t\t * @error move-operation-range-into-itself\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'move-operation-range-into-itself', this\n\t\t\t);\n\t\t} else if ( this.sourcePosition.root == this.targetPosition.root ) {\n\t\t\tif ( compareArrays( this.sourcePosition.getParentPath(), this.targetPosition.getParentPath() ) == 'prefix' ) {\n\t\t\t\tconst i = this.sourcePosition.path.length - 1;\n\n\t\t\t\tif ( this.targetPosition.path[ i ] >= sourceOffset && this.targetPosition.path[ i ] < sourceOffset + this.howMany ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Trying to move a range of nodes into one of nodes from that range.\n\t\t\t\t\t *\n\t\t\t\t\t * @error move-operation-node-into-itself\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t\t'move-operation-node-into-itself', this\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\t_move( this.sourceRange, this.targetPosition );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.sourcePosition = this.sourcePosition.toJSON();\n\t\tjson.targetPosition = this.targetPosition.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'MoveOperation';\n\t}\n\n\t/**\n\t * Creates `MoveOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): MoveOperation {\n\t\tconst sourcePosition = ModelPosition.fromJSON( json.sourcePosition, document );\n\t\tconst targetPosition = ModelPosition.fromJSON( json.targetPosition, document );\n\n\t\treturn new this( sourcePosition, json.howMany, targetPosition, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \tconst range = ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany );\n\n\t// @if CK_DEBUG_ENGINE // \treturn `MoveOperation( ${ this.baseVersion } ): ${ range } -> ${ this.targetPosition }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/insertoperation\n */\n\nimport { Operation } from './operation.js';\nimport { ModelPosition } from '../position.js';\nimport { ModelNodeList } from '../nodelist.js';\nimport { MoveOperation } from './moveoperation.js';\nimport { _insert, _normalizeNodes, type ModelNodeSet } from './utils.js';\nimport { ModelText } from '../text.js';\nimport { ModelElement } from '../element.js';\nimport type { ModelSelectable } from '../selection.js';\n\nimport { type ModelDocument } from '../document.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Operation to insert one or more nodes at given position in the model.\n */\nexport class InsertOperation extends Operation {\n\t/**\n\t * Position of insertion.\n\t *\n\t * @readonly\n\t */\n\tpublic position: ModelPosition;\n\n\t/**\n\t * List of nodes to insert.\n\t *\n\t * @readonly\n\t */\n\tpublic nodes: ModelNodeList;\n\n\t/**\n\t * Flag deciding how the operation should be transformed. If set to `true`, nodes might get additional attributes\n\t * during operational transformation. This happens when the operation insertion position is inside of a range\n\t * where attributes have changed.\n\t */\n\tpublic shouldReceiveAttributes: boolean;\n\n\t/**\n\t * Creates an insert operation.\n\t *\n\t * @param position Position of insertion.\n\t * @param nodes The list of nodes to be inserted.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( position: ModelPosition, nodes: ModelNodeSet, baseVersion: number | null ) {\n\t\tsuper( baseVersion );\n\n\t\tthis.position = position.clone();\n\t\tthis.position.stickiness = 'toNone';\n\t\tthis.nodes = new ModelNodeList( _normalizeNodes( nodes ) );\n\t\tthis.shouldReceiveAttributes = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'insert' {\n\t\treturn 'insert';\n\t}\n\n\t/**\n\t * Total offset size of inserted nodes.\n\t */\n\tpublic get howMany(): number {\n\t\treturn this.nodes.maxOffset;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn this.position.clone();\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */\n\tpublic clone(): InsertOperation {\n\t\tconst nodes = new ModelNodeList( [ ...this.nodes ].map( node => node._clone( true ) ) );\n\t\tconst insert = new InsertOperation( this.position, nodes, this.baseVersion );\n\n\t\tinsert.shouldReceiveAttributes = this.shouldReceiveAttributes;\n\n\t\treturn insert;\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\tconst graveyard = this.position.root.document!.graveyard;\n\t\tconst gyPosition = new ModelPosition( graveyard, [ 0 ] );\n\n\t\treturn new MoveOperation( this.position, this.nodes.maxOffset, gyPosition, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tconst targetElement = this.position.parent;\n\n\t\tif ( !targetElement || targetElement.maxOffset < this.position.offset ) {\n\t\t\t/**\n\t\t\t * Insertion position is invalid.\n\t\t\t *\n\t\t\t * @error insert-operation-position-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'insert-operation-position-invalid',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\t// What happens here is that we want original nodes be passed to writer because we want original nodes\n\t\t// to be inserted to the model. But in InsertOperation, we want to keep those nodes as they were added\n\t\t// to the operation, not modified. For example, text nodes can get merged or cropped while Elements can\n\t\t// get children. It is important that InsertOperation has the copy of original nodes in intact state.\n\t\tconst originalNodes = this.nodes;\n\t\tthis.nodes = new ModelNodeList( [ ...originalNodes ].map( node => node._clone( true ) ) );\n\n\t\t_insert( this.position, originalNodes );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.position = this.position.toJSON();\n\t\tjson.nodes = this.nodes.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'InsertOperation';\n\t}\n\n\t/**\n\t * Creates `InsertOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): InsertOperation {\n\t\tconst children = [];\n\n\t\tfor ( const child of json.nodes ) {\n\t\t\tif ( child.name ) {\n\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\tchildren.push( ModelElement.fromJSON( child ) );\n\t\t\t} else {\n\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\tchildren.push( ModelText.fromJSON( child ) );\n\t\t\t}\n\t\t}\n\n\t\tconst insert = new InsertOperation( ModelPosition.fromJSON( json.position, document ), children, json.baseVersion );\n\t\tinsert.shouldReceiveAttributes = json.shouldReceiveAttributes;\n\n\t\treturn insert;\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \tconst nodeString = this.nodes.length > 1 ? `[ ${ this.nodes.length } ]` : this.nodes.getNode( 0 );\n\n\t// @if CK_DEBUG_ENGINE // \treturn `InsertOperation( ${ this.baseVersion } ): ${ nodeString } -> ${ this.position }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/splitoperation\n */\n\nimport { Operation } from './operation.js';\nimport { MergeOperation } from './mergeoperation.js';\nimport { ModelPosition } from '../position.js';\nimport { ModelRange } from '../range.js';\nimport { _insert, _move } from './utils.js';\n\nimport { type ModelDocument } from '../document.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Operation to split {@link module:engine/model/element~ModelElement an element} at given\n * {@link module:engine/model/operation/splitoperation~SplitOperation#splitPosition split position} into two elements,\n * both containing a part of the element's original content.\n */\nexport class SplitOperation extends Operation {\n\t/**\n\t * Position at which an element should be split.\n\t */\n\tpublic splitPosition: ModelPosition;\n\n\t/**\n\t * Total offset size of elements that are in the split element after `position`.\n\t */\n\tpublic howMany: number;\n\n\t/**\n\t * Position at which the clone of split element (or element from graveyard) will be inserted.\n\t */\n\tpublic insertionPosition: ModelPosition;\n\n\t/**\n\t * Position in the graveyard root before the element which should be used as a parent of the nodes after `position`.\n\t * If it is not set, a copy of the the `position` parent will be used.\n\t *\n\t * The default behavior is to clone the split element. Element from graveyard is used during undo.\n\t */\n\tpublic graveyardPosition: ModelPosition | null;\n\n\t/**\n\t * Creates a split operation.\n\t *\n\t * @param splitPosition Position at which an element should be split.\n\t * @param howMany Total offset size of elements that are in the split element after `position`.\n\t * @param insertionPosition Position at which the clone of split element (or element from graveyard) will be inserted.\n\t * @param graveyardPosition Position in the graveyard root before the element which\n\t * should be used as a parent of the nodes after `position`. If it is not set, a copy of the the `position` parent will be used.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor(\n\t\tsplitPosition: ModelPosition,\n\t\thowMany: number,\n\t\tinsertionPosition: ModelPosition,\n\t\tgraveyardPosition: ModelPosition | null,\n\t\tbaseVersion: number | null\n\t) {\n\t\tsuper( baseVersion );\n\n\t\tthis.splitPosition = splitPosition.clone();\n\t\t// Keep position sticking to the next node. This way any new content added at the place where the element is split\n\t\t// will be left in the original element.\n\t\tthis.splitPosition.stickiness = 'toNext';\n\n\t\tthis.howMany = howMany;\n\t\tthis.insertionPosition = insertionPosition;\n\t\tthis.graveyardPosition = graveyardPosition ? graveyardPosition.clone() : null;\n\n\t\tif ( this.graveyardPosition ) {\n\t\t\tthis.graveyardPosition.stickiness = 'toNext';\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'split' {\n\t\treturn 'split';\n\t}\n\n\t/**\n\t * Position inside the new clone of a split element.\n\t *\n\t * This is a position where nodes that are after the split position will be moved to.\n\t */\n\tpublic get moveTargetPosition(): ModelPosition {\n\t\tconst path = this.insertionPosition.path.slice();\n\t\tpath.push( 0 );\n\n\t\treturn new ModelPosition( this.insertionPosition.root, path );\n\t}\n\n\t/**\n\t * Artificial range that contains all the nodes from the split element that will be moved to the new element.\n\t * The range starts at {@link #splitPosition} and ends in the same parent, at `POSITIVE_INFINITY` offset.\n\t */\n\tpublic get movedRange(): ModelRange {\n\t\tconst end = this.splitPosition.getShiftedBy( Number.POSITIVE_INFINITY );\n\n\t\treturn new ModelRange( this.splitPosition, end );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\t// These could be positions but `Selectable` type only supports `Iterable<Range>`.\n\t\tconst ranges = [\n\t\t\tModelRange._createFromPositionAndShift( this.splitPosition, 0 ),\n\t\t\tModelRange._createFromPositionAndShift( this.insertionPosition, 0 )\n\t\t];\n\n\t\tif ( this.graveyardPosition ) {\n\t\t\tranges.push( ModelRange._createFromPositionAndShift( this.graveyardPosition, 0 ) );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns Clone of this operation.\n\t */\n\tpublic clone(): SplitOperation {\n\t\treturn new SplitOperation( this.splitPosition, this.howMany, this.insertionPosition, this.graveyardPosition, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\tconst graveyard = this.splitPosition.root.document!.graveyard;\n\t\tconst graveyardPosition = new ModelPosition( graveyard, [ 0 ] );\n\n\t\treturn new MergeOperation( this.moveTargetPosition, this.howMany, this.splitPosition, graveyardPosition, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tconst element = this.splitPosition.parent;\n\t\tconst offset = this.splitPosition.offset;\n\n\t\t// Validate whether split operation has correct parameters.\n\t\tif ( !element || element.maxOffset < offset ) {\n\t\t\t/**\n\t\t\t * Split position is invalid.\n\t\t\t *\n\t\t\t * @error split-operation-position-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'split-operation-position-invalid', this );\n\t\t} else if ( !element.parent ) {\n\t\t\t/**\n\t\t\t * Cannot split root element.\n\t\t\t *\n\t\t\t * @error split-operation-split-in-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'split-operation-split-in-root', this );\n\t\t} else if ( this.howMany !== Number.NEGATIVE_INFINITY && this.howMany != element.maxOffset - this.splitPosition.offset ) {\n\t\t\t/**\n\t\t\t * Split operation specifies wrong number of nodes to move.\n\t\t\t *\n\t\t\t * @error split-operation-how-many-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'split-operation-how-many-invalid', this );\n\t\t} else if ( this.graveyardPosition && !this.graveyardPosition.nodeAfter ) {\n\t\t\t/**\n\t\t\t * Graveyard position invalid.\n\t\t\t *\n\t\t\t * @error split-operation-graveyard-position-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'split-operation-graveyard-position-invalid', this );\n\t\t}\n\n\t\tthis.howMany = this.splitPosition.parent.maxOffset - this.splitPosition.offset;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\tconst splitElement = this.splitPosition.parent;\n\n\t\tif ( this.graveyardPosition ) {\n\t\t\t_move( ModelRange._createFromPositionAndShift( this.graveyardPosition, 1 ), this.insertionPosition );\n\t\t} else {\n\t\t\tconst newElement = ( splitElement as any )._clone();\n\n\t\t\t_insert( this.insertionPosition, newElement );\n\t\t}\n\n\t\tconst sourceRange = new ModelRange(\n\t\t\tModelPosition._createAt( splitElement, this.splitPosition.offset ),\n\t\t\tModelPosition._createAt( splitElement, splitElement.maxOffset )\n\t\t);\n\n\t\t_move( sourceRange, this.moveTargetPosition );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.splitPosition = this.splitPosition.toJSON();\n\t\tjson.insertionPosition = this.insertionPosition.toJSON();\n\n\t\tif ( this.graveyardPosition ) {\n\t\t\tjson.graveyardPosition = this.graveyardPosition.toJSON();\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'SplitOperation';\n\t}\n\n\t/**\n\t * Helper function that returns a default insertion position basing on given `splitPosition`. The default insertion\n\t * position is after the split element.\n\t */\n\tpublic static getInsertionPosition( splitPosition: ModelPosition ): ModelPosition {\n\t\tconst path = splitPosition.path.slice( 0, -1 );\n\t\tpath[ path.length - 1 ]++;\n\n\t\treturn new ModelPosition( splitPosition.root, path, 'toPrevious' );\n\t}\n\n\t/**\n\t * Creates `SplitOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): SplitOperation {\n\t\tconst splitPosition = ModelPosition.fromJSON( json.splitPosition, document );\n\t\tconst insertionPosition = ModelPosition.fromJSON( json.insertionPosition, document );\n\t\tconst graveyardPosition = json.graveyardPosition ? ModelPosition.fromJSON( json.graveyardPosition, document ) : null;\n\n\t\treturn new this( splitPosition, json.howMany, insertionPosition, graveyardPosition, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `SplitOperation( ${ this.baseVersion } ): ${ this.splitPosition } ` +\n\t// @if CK_DEBUG_ENGINE // \t`( ${ this.howMany } ) -> ${ this.insertionPosition }` +\n\t// @if CK_DEBUG_ENGINE // \t`${ this.graveyardPosition ? ' with ' + this.graveyardPosition : '' }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/mergeoperation\n */\n\nimport { Operation } from './operation.js';\nimport { SplitOperation } from './splitoperation.js';\nimport { ModelPosition } from '../position.js';\nimport { ModelRange } from '../range.js';\nimport { _move } from './utils.js';\n\nimport { type ModelDocument } from '../document.js';\nimport { type ModelElement } from '../element.js';\nimport type { ModelSelectable } from '../selection.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Operation to merge two {@link module:engine/model/element~ModelElement elements}.\n *\n * The merged element is the parent of {@link ~MergeOperation#sourcePosition} and it is merged into the parent of\n * {@link ~MergeOperation#targetPosition}. All nodes from the merged element are moved to {@link ~MergeOperation#targetPosition}.\n *\n * The merged element is moved to the graveyard at {@link ~MergeOperation#graveyardPosition}.\n */\nexport class MergeOperation extends Operation {\n\t/**\n\t * Position inside the merged element. All nodes from that element after that position will be moved to {@link #targetPosition}.\n\t */\n\tpublic sourcePosition: ModelPosition;\n\n\t/**\n\t * Summary offset size of nodes which will be moved from the merged element to the new parent.\n\t */\n\tpublic howMany: number;\n\n\t/**\n\t * Position which the nodes from the merged elements will be moved to.\n\t */\n\tpublic targetPosition: ModelPosition;\n\n\t/**\n\t * Position in graveyard to which the merged element will be moved.\n\t */\n\tpublic graveyardPosition: ModelPosition;\n\n\t/**\n\t * Creates a merge operation.\n\t *\n\t * @param sourcePosition Position inside the merged element. All nodes from that\n\t * element after that position will be moved to {@link #targetPosition}.\n\t * @param howMany Summary offset size of nodes which will be moved from the merged element to the new parent.\n\t * @param targetPosition Position which the nodes from the merged elements will be moved to.\n\t * @param graveyardPosition Position in graveyard to which the merged element will be moved.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor(\n\t\tsourcePosition: ModelPosition,\n\t\thowMany: number,\n\t\ttargetPosition: ModelPosition,\n\t\tgraveyardPosition: ModelPosition,\n\t\tbaseVersion: number | null\n\t) {\n\t\tsuper( baseVersion );\n\n\t\tthis.sourcePosition = sourcePosition.clone();\n\t\t// This is, and should always remain, the first position in its parent.\n\t\tthis.sourcePosition.stickiness = 'toPrevious';\n\n\t\tthis.howMany = howMany;\n\t\tthis.targetPosition = targetPosition.clone();\n\n\t\t// Except of a rare scenario in `MergeOperation` x `MergeOperation` transformation,\n\t\t// this is, and should always remain, the last position in its parent.\n\t\tthis.targetPosition.stickiness = 'toNext';\n\t\tthis.graveyardPosition = graveyardPosition.clone();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'merge' {\n\t\treturn 'merge';\n\t}\n\n\t/**\n\t * Position before the merged element (which will be deleted).\n\t */\n\tpublic get deletionPosition(): ModelPosition {\n\t\treturn new ModelPosition( this.sourcePosition.root, this.sourcePosition.path.slice( 0, -1 ) );\n\t}\n\n\t/**\n\t * Artificial range that contains all the nodes from the merged element that will be moved to {@link ~MergeOperation#sourcePosition}.\n\t * The range starts at {@link ~MergeOperation#sourcePosition} and ends in the same parent, at `POSITIVE_INFINITY` offset.\n\t */\n\tpublic get movedRange(): ModelRange {\n\t\tconst end = this.sourcePosition.getShiftedBy( Number.POSITIVE_INFINITY );\n\n\t\treturn new ModelRange( this.sourcePosition, end );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\tconst mergedElement = this.sourcePosition.parent as ModelElement;\n\n\t\treturn [\n\t\t\tModelRange._createOn( mergedElement ),\n\n\t\t\t// These could be positions but `Selectable` type only supports `Iterable<Range>`.\n\t\t\tModelRange._createFromPositionAndShift( this.targetPosition, 0 ),\n\t\t\tModelRange._createFromPositionAndShift( this.graveyardPosition, 0 )\n\t\t];\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */\n\tpublic clone(): MergeOperation {\n\t\treturn new MergeOperation( this.sourcePosition, this.howMany, this.targetPosition, this.graveyardPosition, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\t// Positions in this method are transformed by this merge operation because the split operation bases on\n\t\t// the context after this merge operation happened (because split operation reverses it).\n\t\t// So we need to acknowledge that the merge operation happened and those positions changed a little.\n\t\tconst targetPosition = this.targetPosition._getTransformedByMergeOperation( this );\n\n\t\tconst path = this.sourcePosition.path.slice( 0, -1 );\n\t\tconst insertionPosition = new ModelPosition( this.sourcePosition.root, path )._getTransformedByMergeOperation( this );\n\n\t\treturn new SplitOperation( targetPosition, this.howMany, insertionPosition, this.graveyardPosition, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tconst sourceElement = this.sourcePosition.parent;\n\t\tconst targetElement = this.targetPosition.parent;\n\n\t\t// Validate whether merge operation has correct parameters.\n\t\tif ( !sourceElement.parent ) {\n\t\t\t/**\n\t\t\t * Merge source position is invalid. The element to be merged must have a parent node.\n\t\t\t *\n\t\t\t * @error merge-operation-source-position-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'merge-operation-source-position-invalid', this );\n\t\t} else if ( !targetElement.parent ) {\n\t\t\t/**\n\t\t\t * Merge target position is invalid. The element to be merged must have a parent node.\n\t\t\t *\n\t\t\t * @error merge-operation-target-position-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'merge-operation-target-position-invalid', this );\n\t\t} else if ( this.howMany !== Number.NEGATIVE_INFINITY && this.howMany != sourceElement.maxOffset ) {\n\t\t\t/**\n\t\t\t * Merge operation specifies wrong number of nodes to move.\n\t\t\t *\n\t\t\t * @error merge-operation-how-many-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'merge-operation-how-many-invalid', this );\n\t\t}\n\n\t\tthis.howMany = this.sourcePosition.parent.maxOffset;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\tconst mergedElement = this.sourcePosition.parent as ModelElement;\n\t\tconst sourceRange = ModelRange._createIn( mergedElement );\n\n\t\t_move( sourceRange, this.targetPosition );\n\t\t_move( ModelRange._createOn( mergedElement ), this.graveyardPosition );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.sourcePosition = json.sourcePosition.toJSON();\n\t\tjson.targetPosition = json.targetPosition.toJSON();\n\t\tjson.graveyardPosition = json.graveyardPosition.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'MergeOperation';\n\t}\n\n\t/**\n\t * Creates `MergeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): MergeOperation {\n\t\tconst sourcePosition = ModelPosition.fromJSON( json.sourcePosition, document );\n\t\tconst targetPosition = ModelPosition.fromJSON( json.targetPosition, document );\n\t\tconst graveyardPosition = ModelPosition.fromJSON( json.graveyardPosition, document );\n\n\t\treturn new this( sourcePosition, json.howMany, targetPosition, graveyardPosition, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `MergeOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE // \t\t`${ this.sourcePosition } -> ${ this.targetPosition }` +\n\t// @if CK_DEBUG_ENGINE // \t\t` ( ${ this.howMany } ), ${ this.graveyardPosition }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/markeroperation\n */\n\nimport { Operation } from './operation.js';\nimport { ModelRange } from '../range.js';\n\nimport { type ModelDocument } from '../document.js';\nimport { type MarkerCollection } from '../markercollection.js';\nimport type { ModelSelectable } from '../selection.js';\n\nexport class MarkerOperation extends Operation {\n\t/**\n\t * Marker name.\n\t *\n\t * @readonly\n\t */\n\tpublic name: string;\n\n\t/**\n\t * Marker range before the change.\n\t *\n\t * @readonly\n\t */\n\tpublic oldRange: ModelRange | null;\n\n\t/**\n\t * Marker range after the change.\n\t *\n\t * @readonly\n\t */\n\tpublic newRange: ModelRange | null;\n\n\t/**\n\t * Specifies whether the marker operation affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t *\n\t * @readonly\n\t */\n\tpublic affectsData: boolean;\n\n\t/**\n\t * Marker collection on which change should be executed.\n\t */\n\tprivate readonly _markers: MarkerCollection;\n\n\t/**\n\t * @param name Marker name.\n\t * @param oldRange Marker range before the change.\n\t * @param newRange Marker range after the change.\n\t * @param markers Marker collection on which change should be executed.\n\t * @param affectsData Specifies whether the marker operation affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor(\n\t\tname: string,\n\t\toldRange: ModelRange | null,\n\t\tnewRange: ModelRange | null,\n\t\tmarkers: MarkerCollection,\n\t\taffectsData: boolean,\n\t\tbaseVersion: number | null\n\t) {\n\t\tsuper( baseVersion );\n\n\t\tthis.name = name;\n\t\tthis.oldRange = oldRange ? oldRange.clone() : null;\n\t\tthis.newRange = newRange ? newRange.clone() : null;\n\t\tthis.affectsData = affectsData;\n\n\t\tthis._markers = markers;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'marker' {\n\t\treturn 'marker';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\tconst ranges = [];\n\n\t\tif ( this.oldRange ) {\n\t\t\tranges.push( this.oldRange.clone() );\n\t\t}\n\n\t\tif ( this.newRange ) {\n\t\t\tif ( this.oldRange ) {\n\t\t\t\tranges.push( ...this.newRange.getDifference( this.oldRange ) );\n\t\t\t} else {\n\t\t\t\tranges.push( this.newRange.clone() );\n\t\t\t}\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */\n\tpublic clone(): MarkerOperation {\n\t\treturn new MarkerOperation( this.name, this.oldRange, this.newRange, this._markers, this.affectsData, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\treturn new MarkerOperation( this.name, this.newRange, this.oldRange, this._markers, this.affectsData, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\tif ( this.newRange ) {\n\t\t\tthis._markers._set( this.name, this.newRange, true, this.affectsData );\n\t\t} else {\n\t\t\tthis._markers._remove( this.name );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tif ( this.oldRange ) {\n\t\t\tjson.oldRange = this.oldRange.toJSON();\n\t\t}\n\n\t\tif ( this.newRange ) {\n\t\t\tjson.newRange = this.newRange.toJSON();\n\t\t}\n\n\t\tdelete json._markers;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'MarkerOperation';\n\t}\n\n\t/**\n\t * Creates `MarkerOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): MarkerOperation {\n\t\treturn new MarkerOperation(\n\t\t\tjson.name,\n\t\t\tjson.oldRange ? ModelRange.fromJSON( json.oldRange, document ) : null,\n\t\t\tjson.newRange ? ModelRange.fromJSON( json.newRange, document ) : null,\n\t\t\tdocument.model.markers,\n\t\t\tjson.affectsData,\n\t\t\tjson.baseVersion\n\t\t);\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `MarkerOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE //\t\t`\"${ this.name }\": ${ this.oldRange } -> ${ this.newRange }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/attributeoperation\n */\n\nimport { Operation } from './operation.js';\nimport { _setAttribute } from './utils.js';\nimport { ModelRange } from '../range.js';\n\nimport { type ModelDocument } from '../document.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport { isEqual } from 'es-toolkit/compat';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Operation to change nodes' attribute.\n *\n * Using this class you can add, remove or change value of the attribute.\n */\nexport class AttributeOperation extends Operation {\n\t/**\n\t * Range on which operation should be applied.\n\t *\n\t * @readonly\n\t */\n\tpublic range: ModelRange;\n\n\t/**\n\t * Key of an attribute to change or remove.\n\t *\n\t * @readonly\n\t */\n\tpublic key: string;\n\n\t/**\n\t * Old value of the attribute with given key or `null`, if attribute was not set before.\n\t *\n\t * @readonly\n\t */\n\tpublic oldValue: unknown;\n\n\t/**\n\t * New value of the attribute with given key or `null`, if operation should remove attribute.\n\t *\n\t * @readonly\n\t */\n\tpublic newValue: unknown;\n\n\t/**\n\t * Creates an operation that changes, removes or adds attributes.\n\t *\n\t * If only `newValue` is set, attribute will be added on a node. Note that all nodes in operation's range must not\n\t * have an attribute with the same key as the added attribute.\n\t *\n\t * If only `oldValue` is set, then attribute with given key will be removed. Note that all nodes in operation's range\n\t * must have an attribute with that key added.\n\t *\n\t * If both `newValue` and `oldValue` are set, then the operation will change the attribute value. Note that all nodes in\n\t * operation's ranges must already have an attribute with given key and `oldValue` as value\n\t *\n\t * @param range Range on which the operation should be applied. Must be a flat range.\n\t * @param key Key of an attribute to change or remove.\n\t * @param oldValue Old value of the attribute with given key or `null`, if attribute was not set before.\n\t * @param newValue New value of the attribute with given key or `null`, if operation should remove attribute.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( range: ModelRange, key: string, oldValue: unknown, newValue: unknown, baseVersion: number | null ) {\n\t\tsuper( baseVersion );\n\n\t\tthis.range = range.clone();\n\t\tthis.key = key;\n\t\tthis.oldValue = oldValue === undefined ? null : oldValue;\n\t\tthis.newValue = newValue === undefined ? null : newValue;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'addAttribute' | 'removeAttribute' | 'changeAttribute' {\n\t\tif ( this.oldValue === null ) {\n\t\t\treturn 'addAttribute';\n\t\t} else if ( this.newValue === null ) {\n\t\t\treturn 'removeAttribute';\n\t\t} else {\n\t\t\treturn 'changeAttribute';\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn this.range.clone();\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */\n\tpublic clone(): AttributeOperation {\n\t\treturn new AttributeOperation( this.range, this.key, this.oldValue, this.newValue, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\treturn new AttributeOperation( this.range, this.key, this.newValue, this.oldValue, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.range = this.range.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tif ( !this.range.isFlat ) {\n\t\t\t/**\n\t\t\t * The range to change is not flat.\n\t\t\t *\n\t\t\t * @error attribute-operation-range-not-flat\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'attribute-operation-range-not-flat', this );\n\t\t}\n\n\t\tfor ( const item of this.range.getItems( { shallow: true } ) ) {\n\t\t\tif ( this.oldValue !== null && !isEqual( item.getAttribute( this.key ), this.oldValue ) ) {\n\t\t\t\t/**\n\t\t\t\t * Changed node has different attribute value than operation's old attribute value.\n\t\t\t\t *\n\t\t\t\t * @error attribute-operation-wrong-old-value\n\t\t\t\t * @param {module:engine/model/item~ModelItem} root The item element.\n\t\t\t\t * @param {string} key The key of the attribute.\n\t\t\t\t * @param {never} value The value.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'attribute-operation-wrong-old-value',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ item, key: this.key, value: this.oldValue }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( this.oldValue === null && this.newValue !== null && item.hasAttribute( this.key ) ) {\n\t\t\t\t/**\n\t\t\t\t * The attribute with given key already exists for the given node.\n\t\t\t\t *\n\t\t\t\t * @error attribute-operation-attribute-exists\n\t\t\t\t * @param {module:engine/model/item~ModelItem} root The item element.\n\t\t\t\t * @param {string} key The key of the attribute.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'attribute-operation-attribute-exists',\n\t\t\t\t\tthis,\n\t\t\t\t\t{ node: item, key: this.key }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\t// If value to set is same as old value, don't do anything.\n\t\tif ( !isEqual( this.oldValue, this.newValue ) ) {\n\t\t\t// Execution.\n\t\t\t_setAttribute( this.range, this.key, this.newValue );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'AttributeOperation';\n\t}\n\n\t/**\n\t * Creates `AttributeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): AttributeOperation {\n\t\treturn new AttributeOperation(\n\t\t\tModelRange.fromJSON( json.range, document ),\n\t\t\tjson.key, json.oldValue, json.newValue, json.baseVersion\n\t\t);\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `AttributeOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE // \t\t`\"${ this.key }\": ${ JSON.stringify( this.oldValue ) }` +\n\t// @if CK_DEBUG_ENGINE // \t\t` -> ${ JSON.stringify( this.newValue ) }, ${ this.range }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/nooperation\n */\n\nimport { Operation } from './operation.js';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Operation which is doing nothing (\"empty operation\", \"do-nothing operation\", \"noop\"). This is an operation,\n * which when executed does not change the tree model. It still has some parameters defined for transformation purposes.\n *\n * In most cases this operation is a result of transforming operations. When transformation returns\n * {@link module:engine/model/operation/nooperation~NoOperation} it means that changes done by the transformed operation\n * have already been applied.\n */\nexport class NoOperation extends Operation {\n\tpublic get type(): 'noop' {\n\t\treturn 'noop';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */\n\tpublic clone(): NoOperation {\n\t\treturn new NoOperation( this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\treturn new NoOperation( this.baseVersion! + 1 );\n\t}\n\n\t/** @internal */\n\tpublic _execute(): void {\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'NoOperation';\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `NoOperation( ${ this.baseVersion } )`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/renameoperation\n */\n\nimport { Operation } from './operation.js';\nimport { ModelElement } from '../element.js';\nimport { ModelPosition } from '../position.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport { type ModelDocument } from '../document.js';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Operation to change element's name.\n *\n * Using this class you can change element's name.\n */\nexport class RenameOperation extends Operation {\n\t/**\n\t * Position before an element to change.\n\t */\n\tpublic position: ModelPosition;\n\n\t/**\n\t * Current name of the element.\n\t */\n\tpublic oldName: string;\n\n\t/**\n\t * New name for the element.\n\t */\n\tpublic newName: string;\n\n\t/**\n\t * Creates an operation that changes element's name.\n\t *\n\t * @param position Position before an element to change.\n\t * @param oldName Current name of the element.\n\t * @param newName New name for the element.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor( position: ModelPosition, oldName: string, newName: string, baseVersion: number | null ) {\n\t\tsuper( baseVersion );\n\n\t\tthis.position = position;\n\t\t// This position sticks to the next node because it is a position before the node that we want to change.\n\t\tthis.position.stickiness = 'toNext';\n\n\t\tthis.oldName = oldName;\n\t\tthis.newName = newName;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'rename' {\n\t\treturn 'rename';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn this.position.nodeAfter;\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns Clone of this operation.\n\t */\n\tpublic clone(): RenameOperation {\n\t\treturn new RenameOperation( this.position.clone(), this.oldName, this.newName, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\treturn new RenameOperation( this.position.clone(), this.newName, this.oldName, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tconst element = this.position.nodeAfter;\n\n\t\tif ( !( element instanceof ModelElement ) ) {\n\t\t\t/**\n\t\t\t * Given position is invalid or node after it is not instance of Element.\n\t\t\t *\n\t\t\t * @error rename-operation-wrong-position\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'rename-operation-wrong-position',\n\t\t\t\tthis\n\t\t\t);\n\t\t} else if ( this.oldName !== '' && element.name !== this.oldName ) {\n\t\t\t/**\n\t\t\t * Element to change has different name than operation's old name.\n\t\t\t *\n\t\t\t * @error rename-operation-wrong-name\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'rename-operation-wrong-name',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tthis.oldName = element.name;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\tconst element = this.position.nodeAfter;\n\n\t\t( element as any ).name = this.newName;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.position = this.position.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'RenameOperation';\n\t}\n\n\t/**\n\t * Creates `RenameOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): RenameOperation {\n\t\treturn new RenameOperation( ModelPosition.fromJSON( json.position, document ), json.oldName, json.newName, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `RenameOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE // \t\t`${ this.position }: \"${ this.oldName }\" -> \"${ this.newName }\"`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/rootattributeoperation\n */\n\nimport { Operation } from './operation.js';\n\nimport { type ModelDocument } from '../document.js';\nimport { type ModelRootElement } from '../rootelement.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport { isEqual } from 'es-toolkit/compat';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Operation to change root element's attribute. Using this class you can add, remove or change value of the attribute.\n *\n * This operation is needed, because root elements can't be changed through\n * {@link module:engine/model/operation/attributeoperation~AttributeOperation}.\n * It is because {@link module:engine/model/operation/attributeoperation~AttributeOperation}\n * requires a range to change and root element can't\n * be a part of range because every {@link module:engine/model/position~ModelPosition} has to be inside a root.\n * {@link module:engine/model/position~ModelPosition} can't be created before a root element.\n */\nexport class RootAttributeOperation extends Operation {\n\t/**\n\t * Root element to change.\n\t */\n\tpublic readonly root: ModelRootElement;\n\n\t/**\n\t * Key of an attribute to change or remove.\n\t */\n\tpublic readonly key: string;\n\n\t/**\n\t * Old value of the attribute with given key or `null`, if attribute was not set before.\n\t *\n\t * @readonly\n\t */\n\tpublic oldValue: unknown;\n\n\t/**\n\t * New value of the attribute with given key or `null`, if operation should remove attribute.\n\t *\n\t * @readonly\n\t */\n\tpublic newValue: unknown;\n\n\t/**\n\t * Creates an operation that changes, removes or adds attributes on root element.\n\t *\n\t * @see module:engine/model/operation/attributeoperation~AttributeOperation\n\t * @param root Root element to change.\n\t * @param key Key of an attribute to change or remove.\n\t * @param oldValue Old value of the attribute with given key or `null`, if attribute was not set before.\n\t * @param newValue New value of the attribute with given key or `null`, if operation should remove attribute.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */\n\tconstructor(\n\t\troot: ModelRootElement,\n\t\tkey: string,\n\t\toldValue: unknown,\n\t\tnewValue: unknown,\n\t\tbaseVersion: number | null\n\t) {\n\t\tsuper( baseVersion );\n\n\t\tthis.root = root;\n\t\tthis.key = key;\n\t\tthis.oldValue = oldValue === undefined ? null : oldValue;\n\t\tthis.newValue = newValue === undefined ? null : newValue;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'addRootAttribute' | 'removeRootAttribute' | 'changeRootAttribute' {\n\t\tif ( this.oldValue === null ) {\n\t\t\treturn 'addRootAttribute';\n\t\t} else if ( this.newValue === null ) {\n\t\t\treturn 'removeRootAttribute';\n\t\t} else {\n\t\t\treturn 'changeRootAttribute';\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn this.root;\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns Clone of this operation.\n\t */\n\tpublic clone(): RootAttributeOperation {\n\t\treturn new RootAttributeOperation( this.root, this.key, this.oldValue, this.newValue, this.baseVersion );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */\n\tpublic getReversed(): Operation {\n\t\treturn new RootAttributeOperation( this.root, this.key, this.newValue, this.oldValue, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tif ( this.root != this.root.root || this.root.is( 'documentFragment' ) ) {\n\t\t\t/**\n\t\t\t * The element to change is not a root element.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-not-a-root\n\t\t\t * @param {module:engine/model/rootelement~ModelRootElement} root The root element.\n\t\t\t * @param {string} key The key of the attribute.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'rootattribute-operation-not-a-root',\n\t\t\t\tthis,\n\t\t\t\t{ root: this.root, key: this.key }\n\t\t\t);\n\t\t}\n\n\t\tif ( this.oldValue !== null && !isEqual( this.root.getAttribute( this.key ), this.oldValue ) ) {\n\t\t\t/**\n\t\t\t * The attribute which should be removed does not exist for the given node.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-wrong-old-value\n\t\t\t * @param {module:engine/model/rootelement~ModelRootElement} root The root element.\n\t\t\t * @param {string} key The key of the attribute.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'rootattribute-operation-wrong-old-value',\n\t\t\t\tthis,\n\t\t\t\t{ root: this.root, key: this.key }\n\t\t\t);\n\t\t}\n\n\t\tif ( this.oldValue === null && this.newValue !== null && this.root.hasAttribute( this.key ) ) {\n\t\t\t/**\n\t\t\t * The attribute with given key already exists for the given node.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-attribute-exists\n\t\t\t * @param {module:engine/model/rootelement~ModelRootElement} root The root element.\n\t\t\t * @param {string} key The key of the attribute.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'rootattribute-operation-attribute-exists',\n\t\t\t\tthis,\n\t\t\t\t{ root: this.root, key: this.key }\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _execute(): void {\n\t\tif ( this.newValue !== null ) {\n\t\t\tthis.root._setAttribute( this.key, this.newValue );\n\t\t} else {\n\t\t\tthis.root._removeAttribute( this.key );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.root = this.root.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'RootAttributeOperation';\n\t}\n\n\t/**\n\t * Creates `RootAttributeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): RootAttributeOperation {\n\t\tif ( !document.getRoot( json.root ) ) {\n\t\t\t/**\n\t\t\t * Cannot create RootAttributeOperation for document. Root with the specified name does not exist.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-fromjson-no-root\n\t\t\t * @param {string} rootName The root name.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'rootattribute-operation-fromjson-no-root', this, { rootName: json.root } );\n\t\t}\n\n\t\treturn new RootAttributeOperation( document.getRoot( json.root )!, json.key, json.oldValue, json.newValue, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `RootAttributeOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE //\t\t`\"${ this.key }\": ${ JSON.stringify( this.oldValue ) }` +\n\t// @if CK_DEBUG_ENGINE //\t\t` -> ${ JSON.stringify( this.newValue ) }, ${ this.root.rootName }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/rootoperation\n */\n\nimport { Operation } from './operation.js';\n\nimport { type ModelDocument } from '../document.js';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Operation that creates (or attaches) or detaches a root element.\n */\nexport class RootOperation extends Operation {\n\t/**\n\t * Root name to create or detach.\n\t */\n\tpublic readonly rootName: string;\n\n\t/**\n\t * Root element name.\n\t */\n\tpublic readonly elementName: string;\n\n\t/**\n\t * Specifies whether the operation adds (`true`) or detaches the root (`false`).\n\t */\n\tpublic readonly isAdd: boolean;\n\n\t/**\n\t * Document which owns the root.\n\t */\n\tprivate readonly _document: ModelDocument;\n\n\t/**\n\t * Creates an operation that creates or removes a root element.\n\t *\n\t * @param rootName Root name to create or detach.\n\t * @param elementName Root element name.\n\t * @param isAdd Specifies whether the operation adds (`true`) or detaches the root (`false`).\n\t * @param document Document which owns the root.\n\t * @param baseVersion Document {@link module:engine/model/document~ModelDocument#version} on which operation can be applied.\n\t */\n\tconstructor(\n\t\trootName: string,\n\t\telementName: string,\n\t\tisAdd: boolean,\n\t\tdocument: ModelDocument,\n\t\tbaseVersion: number\n\t) {\n\t\tsuper( baseVersion );\n\n\t\tthis.rootName = rootName;\n\t\tthis.elementName = elementName;\n\t\tthis.isAdd = isAdd;\n\t\tthis._document = document;\n\n\t\t// Make sure that the root exists ASAP, this is important for RTC.\n\t\t// If the root was dynamically added, there will be more operations that operate on/in this root.\n\t\t// These operations will require root element instance (in operation property or in position instance).\n\t\t// If the root is not created ahead of time, instantiating such operations may fail.\n\t\tif ( !this._document.getRoot( this.rootName ) ) {\n\t\t\tconst root = this._document.createRoot( this.elementName, this.rootName );\n\n\t\t\troot._isAttached = false;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override get type(): 'addRoot' | 'detachRoot' {\n\t\treturn this.isAdd ? 'addRoot' : 'detachRoot';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn this._document.getRoot( this.rootName );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override clone(): RootOperation {\n\t\treturn new RootOperation( this.rootName, this.elementName, this.isAdd, this._document, this.baseVersion! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override getReversed(): RootOperation {\n\t\treturn new RootOperation( this.rootName, this.elementName, !this.isAdd, this._document, this.baseVersion! + 1 );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override _execute(): void {\n\t\tthis._document.getRoot( this.rootName )!._isAttached = this.isAdd;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tdelete json._document;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'RootOperation';\n\t}\n\n\t/**\n\t * Creates `RootOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static override fromJSON( json: any, document: ModelDocument ): RootOperation {\n\t\treturn new RootOperation( json.rootName, json.elementName, json.isAdd, document, json.baseVersion );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn `RootOperation( ${ this.baseVersion } ): ` +\n\t// @if CK_DEBUG_ENGINE //\t\t`${ this.type } -> \"${ this.rootName }\" (${ this.elementName })`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/operation/operationfactory\n */\n\nimport { AttributeOperation } from './attributeoperation.js';\nimport { InsertOperation } from './insertoperation.js';\nimport { MarkerOperation } from './markeroperation.js';\nimport { MoveOperation } from './moveoperation.js';\nimport { NoOperation } from './nooperation.js';\nimport { Operation } from './operation.js';\nimport { RenameOperation } from './renameoperation.js';\nimport { RootAttributeOperation } from './rootattributeoperation.js';\nimport { RootOperation } from './rootoperation.js';\nimport { SplitOperation } from './splitoperation.js';\nimport { MergeOperation } from './mergeoperation.js';\n\nimport { type ModelDocument } from '../document.js';\n\nconst operations: {\n\t[ className: string ]: {\n\t\tfromJSON( json: any, document: ModelDocument ): Operation;\n\t};\n} = {};\n\noperations[ AttributeOperation.className ] = AttributeOperation;\noperations[ InsertOperation.className ] = InsertOperation;\noperations[ MarkerOperation.className ] = MarkerOperation;\noperations[ MoveOperation.className ] = MoveOperation;\noperations[ NoOperation.className ] = NoOperation;\noperations[ Operation.className ] = Operation;\noperations[ RenameOperation.className ] = RenameOperation;\noperations[ RootAttributeOperation.className ] = RootAttributeOperation;\noperations[ RootOperation.className ] = RootOperation;\noperations[ SplitOperation.className ] = SplitOperation;\noperations[ MergeOperation.className ] = MergeOperation;\n\n/**\n * A factory class for creating operations.\n */\nexport abstract class OperationFactory {\n\t/**\n\t * Creates an operation instance from a JSON object (parsed JSON string).\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */\n\tpublic static fromJSON( json: any, document: ModelDocument ): Operation {\n\t\treturn operations[ json.__className ].fromJSON( json, document );\n\t}\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/**\n * @module engine/model/operation/transform\n */\n\nimport { InsertOperation } from './insertoperation.js';\nimport { AttributeOperation } from './attributeoperation.js';\nimport { RenameOperation } from './renameoperation.js';\nimport { MarkerOperation } from './markeroperation.js';\nimport { MoveOperation } from './moveoperation.js';\nimport { RootAttributeOperation } from './rootattributeoperation.js';\nimport { RootOperation } from './rootoperation.js';\nimport { MergeOperation } from './mergeoperation.js';\nimport { SplitOperation } from './splitoperation.js';\nimport { NoOperation } from './nooperation.js';\nimport { ModelRange } from '../range.js';\nimport { ModelPosition } from '../position.js';\n\nimport { type Operation } from './operation.js';\nimport { type ModelDocument } from '../document.js';\nimport { type History } from '../history.js';\n\nimport { compareArrays } from '@ckeditor/ckeditor5-utils';\n\ntype TransformationFunction = ( a: Operation, b: Operation, context: TransformationContext ) => Array<Operation>;\n\nconst transformations = new Map<Function, Map<Function, TransformationFunction>>();\n\n/**\n * Sets a transformation function to be be used to transform instances of class `OperationA` by instances of class `OperationB`.\n *\n * The `transformationFunction` is passed three parameters:\n *\n * * `a` - operation to be transformed, an instance of `OperationA`,\n * * `b` - operation to be transformed by, an instance of `OperationB`,\n * * {@link module:engine/model/operation/transform~TransformationContext `context`} - object with additional information about\n * transformation context.\n *\n * The `transformationFunction` should return transformation result, which is an array with one or multiple\n * {@link module:engine/model/operation/operation~Operation operation} instances.\n *\n * @param transformationFunction Function to use for transforming.\n */\nfunction setTransformation<\n\tClassA extends new ( ...args: Array<any> ) => Operation,\n\tClassB extends new ( ...args: Array<any> ) => Operation\n>(\n\tOperationA: ClassA,\n\tOperationB: ClassB,\n\ttransformationFunction: ( a: InstanceType<ClassA>, b: InstanceType<ClassB>, context: TransformationContext ) => Array<Operation>\n) {\n\tlet aGroup = transformations.get( OperationA );\n\n\tif ( !aGroup ) {\n\t\taGroup = new Map();\n\t\ttransformations.set( OperationA, aGroup );\n\t}\n\n\taGroup.set( OperationB, transformationFunction as TransformationFunction );\n}\n\n/**\n * Returns a previously set transformation function for transforming an instance of `OperationA` by an instance of `OperationB`.\n *\n * If no transformation was set for given pair of operations, {@link module:engine/model/operation/transform~noUpdateTransformation}\n * is returned. This means that if no transformation was set, the `OperationA` instance will not change when transformed\n * by the `OperationB` instance.\n *\n * @returns Function set to transform an instance of `OperationA` by an instance of `OperationB`.\n */\nfunction getTransformation( OperationA: Function, OperationB: Function ): TransformationFunction {\n\tconst aGroup = transformations.get( OperationA );\n\n\tif ( aGroup && aGroup.has( OperationB ) ) {\n\t\treturn aGroup.get( OperationB )!;\n\t}\n\n\treturn noUpdateTransformation;\n}\n\n/**\n * A transformation function that only clones operation to transform, without changing it.\n */\nfunction noUpdateTransformation( a: Operation ): Array<Operation> {\n\treturn [ a ];\n}\n\n/**\n * Transforms operation `a` by operation `b`.\n *\n * @param a Operation to be transformed.\n * @param b Operation to transform by.\n * @param context Transformation context for this transformation.\n * @returns Transformation result.\n * @internal\n */\nexport function transform( a: Operation, b: Operation, context: TransformationContext = {} ): Array<Operation> {\n\tconst transformationFunction = getTransformation( a.constructor, b.constructor );\n\n\t/* eslint-disable no-useless-catch */\n\ttry {\n\t\ta = a.clone();\n\n\t\treturn transformationFunction( a, b, context );\n\t} catch ( e: any ) {\n\t\t// @if CK_DEBUG // console.warn( 'Error during operation transformation!', e.message );\n\t\t// @if CK_DEBUG // console.warn( 'Transformed operation', a );\n\t\t// @if CK_DEBUG // console.warn( 'Operation transformed by', b );\n\t\t// @if CK_DEBUG // console.warn( 'context.aIsStrong', context.aIsStrong );\n\t\t// @if CK_DEBUG // console.warn( 'context.aWasUndone', context.aWasUndone );\n\t\t// @if CK_DEBUG // console.warn( 'context.bWasUndone', context.bWasUndone );\n\t\t// @if CK_DEBUG // console.warn( 'context.abRelation', context.abRelation );\n\t\t// @if CK_DEBUG // console.warn( 'context.baRelation', context.baRelation );\n\n\t\tthrow e;\n\t}\n\t/* eslint-enable no-useless-catch */\n}\n\n/**\n * Performs a transformation of two sets of operations - `operationsA` and `operationsB`. The transformation is two-way -\n * both transformed `operationsA` and transformed `operationsB` are returned.\n *\n * Note, that the first operation in each set should base on the same document state (\n * {@link module:engine/model/document~ModelDocument#version document version}).\n *\n * It is assumed that `operationsA` are \"more important\" during conflict resolution between two operations.\n *\n * New copies of both passed arrays and operations inside them are returned. Passed arguments are not altered.\n *\n * Base versions of the transformed operations sets are updated accordingly. For example, assume that base versions are `4`\n * and there are `3` operations in `operationsA` and `5` operations in `operationsB`. Then:\n *\n * * transformed `operationsA` will start from base version `9` (`4` base version + `5` operations B),\n * * transformed `operationsB` will start from base version `7` (`4` base version + `3` operations A).\n *\n * If no operation was broken into two during transformation, then both sets will end up with an operation that bases on version `11`:\n *\n * * transformed `operationsA` start from `9` and there are `3` of them, so the last will have `baseVersion` equal to `11`,\n * * transformed `operationsB` start from `7` and there are `5` of them, so the last will have `baseVersion` equal to `11`.\n *\n * @param operationsA\n * @param operationsB\n * @param options Additional transformation options.\n * @param options.document Document which the operations change.\n * @param options.useRelations Whether during transformation relations should be used (used during undo for better conflict resolution).\n * @param options.padWithNoOps Whether additional {@link module:engine/model/operation/nooperation~NoOperation}s\n * should be added to the transformation results to force the same last base version for both transformed sets (in case\n * if some operations got broken into multiple operations during transformation).\n * @param options.forceWeakRemove If set to `false`, remove operation will be always stronger than move operation,\n * so the removed nodes won't end up back in the document root. When set to `true`, context data will be used.\n * @returns Transformation result.\n */\nexport function transformOperationSets(\n\toperationsA: Array<Operation>,\n\toperationsB: Array<Operation>,\n\toptions: {\n\t\tdocument: ModelDocument;\n\t\tuseRelations?: boolean;\n\t\tpadWithNoOps?: boolean;\n\t\tforceWeakRemove?: boolean;\n\t}\n): TransformOperationSetsResult {\n\t// Create new arrays so the originally passed arguments are not changed.\n\t// No need to clone operations, they are cloned as they are transformed.\n\toperationsA = operationsA.slice();\n\toperationsB = operationsB.slice();\n\n\tconst contextFactory = new ContextFactory( options.document, options.useRelations, options.forceWeakRemove );\n\tcontextFactory.setOriginalOperations( operationsA );\n\tcontextFactory.setOriginalOperations( operationsB );\n\n\tconst originalOperations = contextFactory.originalOperations;\n\n\t// If one of sets is empty there is simply nothing to transform, so return sets as they are.\n\tif ( operationsA.length == 0 || operationsB.length == 0 ) {\n\t\treturn { operationsA, operationsB, originalOperations };\n\t}\n\t//\n\t// Following is a description of transformation process:\n\t//\n\t// There are `operationsA` and `operationsB` to be transformed, both by both.\n\t//\n\t// So, suppose we have sets of two operations each: `operationsA` = `[ a1, a2 ]`, `operationsB` = `[ b1, b2 ]`.\n\t//\n\t// Remember, that we can only transform operations that base on the same context. We assert that `a1` and `b1` base on\n\t// the same context and we transform them. Then, we get `a1'` and `b1'`. `a2` bases on a context with `a1` -- `a2`\n\t// is an operation that followed `a1`. Similarly, `b2` bases on a context with `b1`.\n\t//\n\t// However, since `a1'` is a result of transformation by `b1`, `a1'` now also has a context with `b1`. This means that\n\t// we can safely transform `a1'` by `b2`. As we finish transforming `a1`, we also transformed all `operationsB`.\n\t// All `operationsB` also have context including `a1`. Now, we can properly transform `a2` by those operations.\n\t//\n\t// The transformation process can be visualized on a transformation diagram (\"diamond diagram\"):\n\t//\n\t//          [the initial state]\n\t//         [common for a1 and b1]\n\t//\n\t//                   *\n\t//                  / \\\n\t//                 /   \\\n\t//               b1     a1\n\t//               /       \\\n\t//              /         \\\n\t//             *           *\n\t//            / \\         / \\\n\t//           /   \\       /   \\\n\t//         b2    a1'   b1'    a2\n\t//         /       \\   /       \\\n\t//        /         \\ /         \\\n\t//       *           *           *\n\t//        \\         / \\         /\n\t//         \\       /   \\       /\n\t//        a1''   b2'   a2'   b1''\n\t//           \\   /       \\   /\n\t//            \\ /         \\ /\n\t//             *           *\n\t//              \\         /\n\t//               \\       /\n\t//              a2''   b2''\n\t//                 \\   /\n\t//                  \\ /\n\t//                   *\n\t//\n\t//           [the final state]\n\t//\n\t// The final state can be reached from the initial state by applying `a1`, `a2`, `b1''` and `b2''`, as well as by\n\t// applying `b1`, `b2`, `a1''`, `a2''`. Note how the operations get to a proper common state before each pair is\n\t// transformed.\n\t//\n\t// Another thing to consider is that an operation during transformation can be broken into multiple operations.\n\t// Suppose that `a1` * `b1` = `[ a11', a12' ]` (instead of `a1'` that we considered previously).\n\t//\n\t// In that case, we leave `a12'` for later and we continue transforming `a11'` until it is transformed by all `operationsB`\n\t// (in our case it is just `b2`). At this point, `b1` is transformed by \"whole\" `a1`, while `b2` is only transformed\n\t// by `a11'`. Similarly, `a12'` is only transformed by `b1`. This leads to a conclusion that we need to start transforming `a12'`\n\t// from the moment just after it was broken. So, `a12'` is transformed by `b2`. Now, \"the whole\" `a1` is transformed\n\t// by `operationsB`, while all `operationsB` are transformed by \"the whole\" `a1`. This means that we can continue with\n\t// following `operationsA` (in our case it is just `a2`).\n\t//\n\t// Of course, also `operationsB` can be broken. However, since we focus on transforming operation `a` to the end,\n\t// the only thing to do is to store both pieces of operation `b`, so that the next transformed operation `a` will\n\t// be transformed by both of them.\n\t//\n\t//                       *\n\t//                      / \\\n\t//                     /   \\\n\t//                    /     \\\n\t//                  b1       a1\n\t//                  /         \\\n\t//                 /           \\\n\t//                /             \\\n\t//               *               *\n\t//              / \\             / \\\n\t//             /  a11'         /   \\\n\t//            /     \\         /     \\\n\t//          b2       *      b1'      a2\n\t//          /       / \\     /         \\\n\t//         /       /  a12' /           \\\n\t//        /       /     \\ /             \\\n\t//       *       b2'     *               *\n\t//        \\     /       / \\             /\n\t//       a11'' /     b21'' \\           /\n\t//          \\ /       /     \\         /\n\t//           *       *      a2'     b1''\n\t//            \\     / \\       \\     /\n\t//          a12'' b22''\\       \\   /\n\t//              \\ /     \\       \\ /\n\t//               *      a2''     *\n\t//                \\       \\     /\n\t//                 \\       \\  b21'''\n\t//                  \\       \\ /\n\t//                a2'''      *\n\t//                    \\     /\n\t//                     \\  b22'''\n\t//                      \\ /\n\t//                       *\n\t//\n\t// Note, how `a1` is broken and transformed into `a11'` and `a12'`, while `b2'` got broken and transformed into `b21''` and `b22''`.\n\t//\n\t// Having all that on mind, here is an outline for the transformation process algorithm:\n\t//\n\t// 1. We have `operationsA` and `operationsB` array, which we dynamically update as the transformation process goes.\n\t//\n\t// 2. We take next (or first) operation from `operationsA` and check from which operation `b` we need to start transforming it.\n\t// All original `operationsA` are set to be transformed starting from the first operation `b`.\n\t//\n\t// 3. We take operations from `operationsB`, one by one, starting from the correct one, and transform operation `a`\n\t// by operation `b` (and vice versa). We update `operationsA` and `operationsB` by replacing the original operations\n\t// with the transformation results.\n\t//\n\t// 4. If operation is broken into multiple operations, we save all the new operations in the place of the\n\t// original operation.\n\t//\n\t// 5. Additionally, if operation `a` was broken, for the \"new\" operation, we remember from which operation `b` it should\n\t// be transformed by.\n\t//\n\t// 6. We continue transforming \"current\" operation `a` until it is transformed by all `operationsB`. Then, go to 2.\n\t// unless the last operation `a` was transformed.\n\t//\n\t// The actual implementation of the above algorithm is slightly different, as only one loop (while) is used.\n\t// The difference is that we have \"current\" `a` operation to transform and we store the index of the next `b` operation\n\t// to transform by. Each loop operates on two indexes then: index pointing to currently processed `a` operation and\n\t// index pointing to next `b` operation. Each loop is just one `a * b` + `b * a` transformation. After each loop\n\t// operation `b` index is updated. If all `b` operations were visited for the current `a` operation, we change\n\t// current `a` operation index to the next one.\n\t//\n\n\t// For each operation `a`, keeps information what is the index in `operationsB` from which the transformation should start.\n\tconst nextTransformIndex = new WeakMap<Operation, number>();\n\n\t// For all the original `operationsA`, set that they should be transformed starting from the first of `operationsB`.\n\tfor ( const op of operationsA ) {\n\t\tnextTransformIndex.set( op, 0 );\n\t}\n\n\t// Additional data that is used for some postprocessing after the main transformation process is done.\n\tconst data = {\n\t\tnextBaseVersionA: operationsA[ operationsA.length - 1 ].baseVersion! + 1,\n\t\tnextBaseVersionB: operationsB[ operationsB.length - 1 ].baseVersion! + 1,\n\t\toriginalOperationsACount: operationsA.length,\n\t\toriginalOperationsBCount: operationsB.length\n\t};\n\n\t// Index of currently transformed operation `a`.\n\tlet i = 0;\n\n\t// While not all `operationsA` are transformed...\n\twhile ( i < operationsA.length ) {\n\t\t// Get \"current\" operation `a`.\n\t\tconst opA = operationsA[ i ];\n\n\t\t// For the \"current\" operation `a`, get the index of the next operation `b` to transform by.\n\t\tconst indexB = nextTransformIndex.get( opA )!;\n\n\t\t// If operation `a` was already transformed by every operation `b`, change \"current\" operation `a` to the next one.\n\t\tif ( indexB == operationsB.length ) {\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst opB = operationsB[ indexB ];\n\n\t\t// Transform `a` by `b` and `b` by `a`.\n\t\tconst newOpsA = transform( opA, opB, contextFactory.getContext( opA, opB, true ) );\n\t\tconst newOpsB = transform( opB, opA, contextFactory.getContext( opB, opA, false ) );\n\t\t// As a result we get one or more `newOpsA` and one or more `newOpsB` operations.\n\n\t\t// Update contextual information about operations.\n\t\tcontextFactory.updateRelation( opA, opB );\n\n\t\tcontextFactory.setOriginalOperations( newOpsA, opA );\n\t\tcontextFactory.setOriginalOperations( newOpsB, opB );\n\n\t\t// For new `a` operations, update their index of the next operation `b` to transform them by.\n\t\t//\n\t\t// This is needed even if there was only one result (`a` was not broken) because that information is used\n\t\t// at the beginning of this loop every time.\n\t\tfor ( const newOpA of newOpsA ) {\n\t\t\t// Acknowledge, that operation `b` also might be broken into multiple operations.\n\t\t\t//\n\t\t\t// This is why we raise `indexB` not just by 1. If `newOpsB` are multiple operations, they will be\n\t\t\t// spliced in the place of `opB`. So we need to change `transformBy` accordingly, so that an operation won't\n\t\t\t// be transformed by the same operation (part of it) again.\n\t\t\tnextTransformIndex.set( newOpA, indexB + newOpsB.length );\n\t\t}\n\n\t\t// Update `operationsA` and `operationsB` with the transformed versions.\n\t\toperationsA.splice( i, 1, ...newOpsA );\n\t\toperationsB.splice( indexB, 1, ...newOpsB );\n\t}\n\n\thandlePartialMarkerOperations( operationsA );\n\thandlePartialMarkerOperations( operationsB );\n\n\tif ( options.padWithNoOps ) {\n\t\t// If no-operations padding is enabled, count how many extra `a` and `b` operations were generated.\n\t\tconst brokenOperationsACount = operationsA.length - data.originalOperationsACount;\n\t\tconst brokenOperationsBCount = operationsB.length - data.originalOperationsBCount;\n\n\t\t// Then, if that number is not the same, pad `operationsA` or `operationsB` with correct number of no-ops so\n\t\t// that the base versions are equalled.\n\t\t//\n\t\t// Note that only one array will be updated, as only one of those subtractions can be greater than zero.\n\t\tpadWithNoOps( operationsA, brokenOperationsBCount - brokenOperationsACount );\n\t\tpadWithNoOps( operationsB, brokenOperationsACount - brokenOperationsBCount );\n\t}\n\n\t// Finally, update base versions of transformed operations.\n\tupdateBaseVersions( operationsA, data.nextBaseVersionB );\n\tupdateBaseVersions( operationsB, data.nextBaseVersionA );\n\n\treturn { operationsA, operationsB, originalOperations };\n}\n\n/**\n * The result of {@link module:engine/model/operation/transform~transformOperationSets}.\n */\nexport interface TransformOperationSetsResult {\n\n\t/**\n\t * Transformed `operationsA`.\n\t */\n\toperationsA: Array<Operation>;\n\n\t/**\n\t * Transformed `operationsB`.\n\t */\n\toperationsB: Array<Operation>;\n\n\t/**\n\t * A map that links transformed operations to original operations. The keys are the transformed\n\t * operations and the values are the original operations from the input (`operationsA` and `operationsB`).\n\t */\n\toriginalOperations: Map<Operation, Operation>;\n}\n\n/**\n * Gathers additional data about operations processed during transformation. Can be used to obtain contextual information\n * about two operations that are about to be transformed. This contextual information can be used for better conflict resolution.\n */\nclass ContextFactory {\n\tpublic readonly originalOperations: Map<Operation, Operation>;\n\n\tprivate readonly _history: History;\n\tprivate readonly _useRelations?: boolean;\n\tprivate readonly _forceWeakRemove: boolean;\n\tprivate readonly _relations: Map<Operation, Map<Operation, any>>;\n\n\t/**\n\t * Creates `ContextFactory` instance.\n\t *\n\t * @param document Document which the operations change.\n\t * @param useRelations Whether during transformation relations should be used (used during undo for\n\t * better conflict resolution).\n\t * @param forceWeakRemove If set to `false`, remove operation will be always stronger than move operation,\n\t * so the removed nodes won't end up back in the document root. When set to `true`, context data will be used.\n\t */\n\tconstructor( document: ModelDocument, useRelations: boolean | undefined, forceWeakRemove = false ) {\n\t\t// For each operation that is created during transformation process, we keep a reference to the original operation\n\t\t// which it comes from. The original operation works as a kind of \"identifier\". Every contextual information\n\t\t// gathered during transformation that we want to save for given operation, is actually saved for the original operation.\n\t\t// This way no matter if operation `a` is cloned, then transformed, even breaks, we still have access to the previously\n\t\t// gathered data through original operation reference.\n\t\tthis.originalOperations = new Map();\n\n\t\t// `model.History` instance which information about undone operations will be taken from.\n\t\tthis._history = document.history;\n\n\t\t// Whether additional context should be used.\n\t\tthis._useRelations = useRelations;\n\n\t\tthis._forceWeakRemove = !!forceWeakRemove;\n\n\t\t// Relations is a double-map structure (maps in map) where for two operations we store how those operations were related\n\t\t// to each other. Those relations are evaluated during transformation process. For every transformated pair of operations\n\t\t// we keep relations between them.\n\t\tthis._relations = new Map();\n\t}\n\n\t/**\n\t * Sets \"original operation\" for given operations.\n\t *\n\t * During transformation process, operations are cloned, then changed, then processed again, sometimes broken into two\n\t * or multiple operations. When gathering additional data it is important that all operations can be somehow linked\n\t * so a cloned and transformed \"version\" still kept track of the data assigned earlier to it.\n\t *\n\t * The original operation object will be used as such an universal linking id. Throughout the transformation process\n\t * all cloned operations will refer to \"the original operation\" when storing and reading additional data.\n\t *\n\t * If `takeFrom` is not set, each operation from `operations` array will be assigned itself as \"the original operation\".\n\t * This should be used as an initialization step.\n\t *\n\t * If `takeFrom` is set, each operation from `operations` will be assigned the same original operation as assigned\n\t * for `takeFrom` operation. This should be used to update original operations. It should be used in a way that\n\t * `operations` are the result of `takeFrom` transformation to ensure proper \"original operation propagation\".\n\t */\n\tpublic setOriginalOperations( operations: Array<Operation>, takeFrom: Operation | null = null ): void {\n\t\tconst originalOperation = takeFrom ? this.originalOperations.get( takeFrom ) : null;\n\n\t\tfor ( const operation of operations ) {\n\t\t\tthis.originalOperations.set( operation, originalOperation || operation );\n\t\t}\n\t}\n\n\t/**\n\t * Saves a relation between operations `opA` and `opB`.\n\t *\n\t * Relations are then later used to help solve conflicts when operations are transformed.\n\t */\n\tpublic updateRelation( opA: Operation, opB: Operation ): void {\n\t\t// The use of relations is described in a bigger detail in transformation functions.\n\t\t//\n\t\t// In brief, this function, for specified pairs of operation types, checks how positions defined in those operations relate.\n\t\t// Then those relations are saved. For example, for two move operations, it is saved if one of those operations target\n\t\t// position is before the other operation source position. This kind of information gives contextual information when\n\t\t// transformation is used during undo. Similar checks are done for other pairs of operations.\n\t\t//\n\t\tif ( opA instanceof MoveOperation ) {\n\t\t\tif ( opB instanceof MergeOperation ) {\n\t\t\t\tif ( opA.targetPosition.isEqual( opB.sourcePosition ) || opB.movedRange.containsPosition( opA.targetPosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'insertAtSource' );\n\t\t\t\t} else if ( opA.targetPosition.isEqual( opB.deletionPosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'insertBetween' );\n\t\t\t\t} else if ( opA.targetPosition.isAfter( opB.sourcePosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'moveTargetAfter' );\n\t\t\t\t} else if ( opA.howMany > 1 && opA.sourcePosition.isEqual( opB.deletionPosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'firstToMoveMerged' );\n\t\t\t\t} else if ( opA.howMany > 1 && opA.sourcePosition.getShiftedBy( opA.howMany - 1 ).isEqual( opB.deletionPosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'lastToMoveMerged' );\n\t\t\t\t}\n\t\t\t} else if ( opB instanceof MoveOperation ) {\n\t\t\t\tif ( opA.targetPosition.isEqual( opB.sourcePosition ) || opA.targetPosition.isBefore( opB.sourcePosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'insertBefore' );\n\t\t\t\t} else {\n\t\t\t\t\tthis._setRelation( opA, opB, 'insertAfter' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( opA instanceof SplitOperation ) {\n\t\t\tif ( opB instanceof MergeOperation ) {\n\t\t\t\tif ( opA.splitPosition.isBefore( opB.sourcePosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'splitBefore' );\n\t\t\t\t}\n\t\t\t} else if ( opB instanceof MoveOperation ) {\n\t\t\t\tif ( opA.splitPosition.isEqual( opB.sourcePosition ) || opA.splitPosition.isBefore( opB.sourcePosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'splitBefore' );\n\t\t\t\t} else {\n\t\t\t\t\tconst range = ModelRange._createFromPositionAndShift( opB.sourcePosition, opB.howMany );\n\n\t\t\t\t\tif ( opA.splitPosition.hasSameParentAs( opB.sourcePosition ) && range.containsPosition( opA.splitPosition ) ) {\n\t\t\t\t\t\t// TODO: Potential bug -- we are saving offset value directly and it is not later updated during OT.\n\t\t\t\t\t\t// TODO: This may cause a bug it here was an non-undone operation that may have impacted this offset.\n\t\t\t\t\t\t// TODO: Similar error was with MarkerOperation relations, where full path was saved and never updated.\n\t\t\t\t\t\tconst howMany = range.end.offset - opA.splitPosition.offset;\n\t\t\t\t\t\tconst offset = opA.splitPosition.offset - range.start.offset;\n\n\t\t\t\t\t\tthis._setRelation( opA, opB, { howMany, offset } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( opA instanceof MergeOperation ) {\n\t\t\tif ( opB instanceof MergeOperation ) {\n\t\t\t\tif ( !opA.targetPosition.isEqual( opB.sourcePosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'mergeTargetNotMoved' );\n\t\t\t\t}\n\n\t\t\t\tif ( opA.sourcePosition.isEqual( opB.targetPosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'mergeSourceNotMoved' );\n\t\t\t\t}\n\n\t\t\t\tif ( opA.sourcePosition.isEqual( opB.sourcePosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'mergeSameElement' );\n\t\t\t\t}\n\t\t\t} else if ( opB instanceof SplitOperation ) {\n\t\t\t\tif ( opA.sourcePosition.isEqual( opB.splitPosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'splitAtSource' );\n\t\t\t\t}\n\t\t\t} else if ( opB instanceof MoveOperation && opB.howMany > 0 ) {\n\t\t\t\tif ( opA.sourcePosition.isEqual( opB.sourcePosition.getShiftedBy( opB.howMany ) ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'mergeSourceAffected' );\n\t\t\t\t}\n\n\t\t\t\tif ( opA.targetPosition.isEqual( opB.sourcePosition ) ) {\n\t\t\t\t\tthis._setRelation( opA, opB, 'mergeTargetWasBefore' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( opA instanceof MarkerOperation ) {\n\t\t\tconst markerRange = opA.newRange;\n\n\t\t\tif ( !markerRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( opB instanceof MergeOperation ) {\n\t\t\t\tconst wasInLeftElement = markerRange.start.isEqual( opB.targetPosition );\n\t\t\t\tconst wasStartBeforeMergedElement = markerRange.start.isEqual( opB.deletionPosition );\n\t\t\t\tconst wasEndBeforeMergedElement = markerRange.end.isEqual( opB.deletionPosition );\n\t\t\t\tconst wasInRightElement = markerRange.end.isEqual( opB.sourcePosition );\n\n\t\t\t\tif ( wasInLeftElement || wasStartBeforeMergedElement || wasEndBeforeMergedElement || wasInRightElement ) {\n\t\t\t\t\tthis._setRelation( opA, opB, {\n\t\t\t\t\t\twasInLeftElement,\n\t\t\t\t\t\twasStartBeforeMergedElement,\n\t\t\t\t\t\twasEndBeforeMergedElement,\n\t\t\t\t\t\twasInRightElement\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Evaluates and returns contextual information about two given operations `opA` and `opB` which are about to be transformed.\n\t */\n\tpublic getContext( opA: Operation, opB: Operation, aIsStrong: boolean ): TransformationContext {\n\t\treturn {\n\t\t\taIsStrong,\n\t\t\taWasUndone: this._wasUndone( opA ),\n\t\t\tbWasUndone: this._wasUndone( opB ),\n\t\t\tabRelation: this._useRelations ? this._getRelation( opA, opB ) : null,\n\t\t\tbaRelation: this._useRelations ? this._getRelation( opB, opA ) : null,\n\t\t\tforceWeakRemove: this._forceWeakRemove\n\t\t};\n\t}\n\n\t/**\n\t * Returns whether given operation `op` has already been undone.\n\t *\n\t * Information whether an operation was undone gives more context when making a decision when two operations are in conflict.\n\t */\n\tpublic _wasUndone( op: Operation ): boolean {\n\t\t// For `op`, get its original operation. After all, if `op` is a clone (or even transformed clone) of another\n\t\t// operation, literally `op` couldn't be undone. It was just generated. If anything, it was the operation it origins\n\t\t// from which was undone. So get that original operation.\n\t\tconst originalOp = this.originalOperations.get( op )!;\n\n\t\t// And check with the document if the original operation was undone.\n\t\treturn ( originalOp as any ).wasUndone || this._history.isUndoneOperation( originalOp );\n\t}\n\n\t/**\n\t * Returns a relation between `opA` and an operation which is undone by `opB`. This can be `String` value if a relation\n\t * was set earlier or `null` if there was no relation between those operations.\n\t *\n\t * This is a little tricky to understand, so let's compare it to `ContextFactory#_wasUndone`.\n\t *\n\t * When `wasUndone( opB )` is used, we check if the `opB` has already been undone. It is obvious, that the\n\t * undoing operation must happen after the undone operation. So, essentially, we have `opB`, we take document history,\n\t * we look forward in the future and ask if in that future `opB` was undone.\n\t *\n\t * Relations is a backward process to `wasUndone()`.\n\t *\n\t * Long story short - using relations is asking what happened in the past. Looking back. This time we have an undoing\n\t * operation `opB` which has undone some other operation. When there is a transformation `opA` x `opB` and there is\n\t * a conflict to solve and `opB` is an undoing operation, we can look back in the history and see what was a relation\n\t * between `opA` and the operation which `opB` undone. Basing on that relation from the past, we can now make\n\t * a better decision when resolving a conflict between two operations, because we know more about the context of\n\t * those two operations.\n\t *\n\t * This is why this function does not return a relation directly between `opA` and `opB` because we need to look\n\t * back to search for a meaningful contextual information.\n\t */\n\tpublic _getRelation( opA: Operation, opB: Operation ): any {\n\t\t// Get the original operation. Similarly as in `wasUndone()` it is used as an universal identifier for stored data.\n\t\tconst origB = this.originalOperations.get( opB )!;\n\t\tconst undoneB = this._history.getUndoneOperation( origB );\n\n\t\t// If `opB` is not undoing any operation, there is no relation.\n\t\tif ( !undoneB ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst origA = this.originalOperations.get( opA )!;\n\t\tconst relationsA = this._relations.get( origA );\n\n\t\t// Get all relations for `opA`, and check if there is a relation with `opB`-undone-counterpart. If so, return it.\n\t\tif ( relationsA ) {\n\t\t\treturn relationsA.get( undoneB ) || null;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Helper function for `ContextFactory#updateRelations`.\n\t */\n\tprivate _setRelation( opA: Operation, opB: Operation, relation: any ): void {\n\t\t// As always, setting is for original operations, not the clones/transformed operations.\n\t\tconst origA = this.originalOperations.get( opA )!;\n\t\tconst origB = this.originalOperations.get( opB )!;\n\n\t\tlet relationsA = this._relations.get( origA );\n\n\t\tif ( !relationsA ) {\n\t\t\trelationsA = new Map();\n\t\t\tthis._relations.set( origA, relationsA );\n\t\t}\n\n\t\trelationsA.set( origB, relation );\n\t}\n}\n\n/**\n * Holds additional contextual information about a transformed pair of operations (`a` and `b`). Those information\n * can be used for better conflict resolving.\n *\n * @internal\n */\nexport type TransformationContext = {\n\n\t/**\n\t * Whether `a` is strong operation in this transformation, or weak.\n\t */\n\taIsStrong?: boolean;\n\n\t/**\n\t * Whether `a` operation was undone.\n\t */\n\taWasUndone?: boolean;\n\n\t/**\n\t * Whether `b` operation was undone.\n\t */\n\tbWasUndone?: boolean;\n\n\t/**\n\t * The relation between `a` operation and an operation undone by `b` operation.\n\t */\n\tabRelation?: any;\n\n\t/**\n\t * The relation between `b` operation and an operation undone by `a` operation.\n\t */\n\tbaRelation?: any;\n\n\tforceWeakRemove?: boolean;\n};\n\n/**\n * An utility function that updates {@link module:engine/model/operation/operation~Operation#baseVersion base versions}\n * of passed operations.\n *\n * The function simply sets `baseVersion` as a base version of the first passed operation and then increments it for\n * each following operation in `operations`.\n *\n * @param operations Operations to update.\n * @param baseVersion Base version to set for the first operation in `operations`.\n */\nfunction updateBaseVersions( operations: ReadonlyArray<Operation>, baseVersion: number ) {\n\tfor ( const operation of operations ) {\n\t\toperation.baseVersion = baseVersion++;\n\t}\n}\n\n/**\n * Adds `howMany` instances of {@link module:engine/model/operation/nooperation~NoOperation} to `operations` set.\n */\nfunction padWithNoOps( operations: Array<Operation>, howMany: number ) {\n\tfor ( let i = 0; i < howMany; i++ ) {\n\t\toperations.push( new NoOperation( 0 ) );\n\t}\n}\n\n/**\n * Transformed operations set may include marker operations which were broken into multiple marker operations during transformation.\n * It represents marker range being broken into multiple pieces as the transformation was processed. Each partial marker operation is\n * a piece of the original marker range.\n *\n * These partial marker operations (\"marker range pieces\") should be \"glued\" together if, after transformations, the ranges ended up\n * next to each other.\n *\n * If the ranges did not end up next to each other, then partial marker operations should be discarded, as the marker range cannot\n * be broken into two pieces.\n *\n * There is always one \"reference\" marker operation (the original operation) and there may be some partial marker operations. Partial\n * marker operations have base version set to `-1`. If the `operations` set includes partial marker operations, then they are always\n * after the original marker operation.\n *\n * See also `MarkerOperation` x `MoveOperation` transformation.\n * See also https://github.com/ckeditor/ckeditor5/pull/17071.\n */\nfunction handlePartialMarkerOperations( operations: Array<Operation> ) {\n\tconst markerOps: Map<string, { op: MarkerOperation; ranges: Array<ModelRange> }> = new Map();\n\n\tfor ( let i = 0; i < operations.length; i++ ) {\n\t\tconst op = operations[ i ];\n\n\t\tif ( !( op instanceof MarkerOperation ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( op.baseVersion !== -1 ) {\n\t\t\tmarkerOps.set( op.name, {\n\t\t\t\top,\n\t\t\t\tranges: op.newRange ? [ op.newRange ] : []\n\t\t\t} );\n\t\t} else {\n\t\t\t/* v8 ignore next -- @preserve */\n\t\t\tif ( op.newRange ) {\n\t\t\t\t// `markerOps.get( op.name )` must exist because original marker operation is always before partial marker operations.\n\t\t\t\t// If the original marker operation was changed to `NoOperation`, then the partial marker operations would be changed\n\t\t\t\t// to `NoOperation` as well, so this is not a case.\n\t\t\t\tconst partialRanges = markerOps.get( op.name )!.ranges;\n\n\t\t\t\t// `refRange` is the range coming from the original operation.\n\t\t\t\tconst refRange = partialRanges[ 0 ];\n\n\t\t\t\t// Filter out ranges that are inside the reference range.\n\t\t\t\t//\n\t\t\t\t// We don't need to combine them, as the reference range already includes `op.newRange`. At the same time, the method\n\t\t\t\t// `ModelRange._createFromRanges()` (which we use later on) prohibits passing intersecting ranges and works incorrectly when\n\t\t\t\t// such array of ranges is passed.\n\t\t\t\t//\n\t\t\t\t// Note, that there cannot be a situation where these ranges intersect but are not contained.\n\t\t\t\t//\n\t\t\t\tif ( !refRange.containsRange( op.newRange, true ) ) {\n\t\t\t\t\tpartialRanges.push( op.newRange );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toperations.splice( i, 1 );\n\t\t\ti--;\n\t\t}\n\t}\n\n\tfor ( const { op, ranges } of markerOps.values() ) {\n\t\tif ( ranges.length ) {\n\t\t\top.newRange = ModelRange._createFromRanges( ranges );\n\t\t} else {\n\t\t\top.newRange = null;\n\t\t}\n\t}\n}\n\n// -----------------------\n\nsetTransformation( AttributeOperation, AttributeOperation, ( a, b, context ) => {\n\t// If operations in conflict, check if their ranges intersect and manage them properly.\n\t//\n\t// Operations can be in conflict only if:\n\t//\n\t// * their key is the same (they change the same attribute), and\n\t// * they are in the same parent (operations for ranges [ 1 ] - [ 3 ] and [ 2, 0 ] - [ 2, 5 ] change different\n\t// elements and can't be in conflict).\n\tif ( a.key === b.key && a.range.start.hasSameParentAs( b.range.start ) ) {\n\t\t// First, we want to apply change to the part of a range that has not been changed by the other operation.\n\t\tconst operations = a.range.getDifference( b.range ).map( range => {\n\t\t\treturn new AttributeOperation( range, a.key, a.oldValue, a.newValue, 0 );\n\t\t} );\n\n\t\t// Then we take care of the common part of ranges.\n\t\tconst common = a.range.getIntersection( b.range );\n\n\t\tif ( common ) {\n\t\t\t// If this operation is more important, we also want to apply change to the part of the\n\t\t\t// original range that has already been changed by the other operation. Since that range\n\t\t\t// got changed we also have to update `oldValue`.\n\t\t\tif ( context.aIsStrong ) {\n\t\t\t\toperations.push( new AttributeOperation( common, b.key, b.newValue, a.newValue, 0 ) );\n\t\t\t}\n\t\t}\n\n\t\tif ( operations.length == 0 ) {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\n\t\treturn operations;\n\t} else {\n\t\t// If operations don't conflict, simply return an array containing just a clone of this operation.\n\t\treturn [ a ];\n\t}\n} );\n\nsetTransformation( AttributeOperation, InsertOperation, ( a, b ) => {\n\t// Case 1:\n\t//\n\t// The attribute operation range includes the position where nodes were inserted.\n\t// There are two possible scenarios: the inserted nodes were text and they should receive attributes or\n\t// the inserted nodes were elements and they should not receive attributes.\n\t//\n\tif ( a.range.start.hasSameParentAs( b.position ) && a.range.containsPosition( b.position ) ) {\n\t\t// If new nodes should not receive attributes, two separated ranges will be returned.\n\t\t// Otherwise, one expanded range will be returned.\n\t\tconst range = a.range._getTransformedByInsertion( b.position, b.howMany, !b.shouldReceiveAttributes );\n\t\tconst result = range.map( r => {\n\t\t\treturn new AttributeOperation( r, a.key, a.oldValue, a.newValue, a.baseVersion );\n\t\t} );\n\n\t\tif ( b.shouldReceiveAttributes ) {\n\t\t\t// `AttributeOperation#range` includes some newly inserted text.\n\t\t\t// The operation should also change the attribute of that text. An example:\n\t\t\t//\n\t\t\t// Bold should be applied on the following range:\n\t\t\t// <p>Fo[zb]ar</p>\n\t\t\t//\n\t\t\t// In meantime, new text is typed:\n\t\t\t// <p>Fozxxbar</p>\n\t\t\t//\n\t\t\t// Bold should be applied also on the new text:\n\t\t\t// <p>Fo[zxxb]ar</p>\n\t\t\t// <p>Fo<$text bold=\"true\">zxxb</$text>ar</p>\n\t\t\t//\n\t\t\t// There is a special case to consider here to consider.\n\t\t\t//\n\t\t\t// Consider setting an attribute with multiple possible values, for example `highlight`. The inserted text might\n\t\t\t// have already an attribute value applied and the `oldValue` property of the attribute operation might be wrong:\n\t\t\t//\n\t\t\t// Attribute `highlight=\"yellow\"` should be applied on the following range:\n\t\t\t// <p>Fo[zb]ar<p>\n\t\t\t//\n\t\t\t// In meantime, character `x` with `highlight=\"red\"` is typed:\n\t\t\t// <p>Fo[z<$text highlight=\"red\">x</$text>b]ar</p>\n\t\t\t//\n\t\t\t// In this case we cannot simply apply operation changing the attribute value from `null` to `\"yellow\"` for the whole range\n\t\t\t// because that would lead to an exception (`oldValue` is incorrect for `x`).\n\t\t\t//\n\t\t\t// We also cannot break the original range as this would mess up a scenario when there are multiple following\n\t\t\t// insert operations, because then only the first inserted character is included in those ranges:\n\t\t\t// <p>Fo[z][x][b]ar</p>   -->   <p>Fo[z][x]x[b]ar</p>   -->   <p>Fo[z][x]xx[b]ar</p>\n\t\t\t//\n\t\t\t// So, the attribute range needs be expanded, no matter what attributes are set on the inserted nodes:\n\t\t\t//\n\t\t\t// <p>Fo[z<$text highlight=\"red\">x</$text>b]ar</p>      <--- Change from `null` to `yellow`, throwing an exception.\n\t\t\t//\n\t\t\t// But before that operation would be applied, we will add an additional attribute operation that will change\n\t\t\t// attributes on the inserted nodes in a way which would make the original operation correct:\n\t\t\t//\n\t\t\t// <p>Fo[z{<$text highlight=\"red\">}x</$text>b]ar</p>    <--- Change range `{}` from `red` to `null`.\n\t\t\t// <p>Fo[zxb]ar</p>                                     <--- Now change from `null` to `yellow` is completely fine.\n\t\t\t//\n\n\t\t\t// Generate complementary attribute operation. Be sure to add it before the original operation.\n\t\t\tconst op = _getComplementaryAttributeOperations( b, a.key, a.oldValue );\n\n\t\t\tif ( op ) {\n\t\t\t\tresult.unshift( op );\n\t\t\t}\n\t\t}\n\n\t\t// If nodes should not receive new attribute, we are done here.\n\t\treturn result;\n\t}\n\n\t// If insert operation is not expanding the attribute operation range, simply transform the range.\n\ta.range = a.range._getTransformedByInsertion( b.position, b.howMany, false )[ 0 ];\n\n\treturn [ a ];\n} );\n\n/**\n * Helper function for `AttributeOperation` x `InsertOperation` (and reverse) transformation.\n *\n * For given `insertOperation` it checks the inserted node if it has an attribute `key` set to a value different\n * than `newValue`. If so, it generates an `AttributeOperation` which changes the value of `key` attribute to `newValue`.\n */\nfunction _getComplementaryAttributeOperations( insertOperation: InsertOperation, key: string, newValue: unknown ) {\n\tconst nodes = insertOperation.nodes;\n\n\t// At the beginning we store the attribute value from the first node.\n\tconst insertValue = nodes.getNode( 0 )!.getAttribute( key );\n\n\tif ( insertValue == newValue ) {\n\t\treturn null;\n\t}\n\n\tconst range = new ModelRange( insertOperation.position, insertOperation.position.getShiftedBy( insertOperation.howMany ) );\n\n\treturn new AttributeOperation( range, key, insertValue, newValue, 0 );\n}\n\nsetTransformation( AttributeOperation, MergeOperation, ( a, b ) => {\n\tconst ranges = [];\n\n\t// Case 1:\n\t//\n\t// Attribute change on the merged element. In this case, the merged element was moved to the graveyard.\n\t// An additional attribute operation that will change the (re)moved element needs to be generated.\n\t//\n\tif ( a.range.start.hasSameParentAs( b.deletionPosition ) ) {\n\t\tif ( a.range.containsPosition( b.deletionPosition ) || a.range.start.isEqual( b.deletionPosition ) ) {\n\t\t\tranges.push( ModelRange._createFromPositionAndShift( b.graveyardPosition, 1 ) );\n\t\t}\n\t}\n\n\tconst range = a.range._getTransformedByMergeOperation( b );\n\n\t// Do not add empty (collapsed) ranges to the result. `range` may be collapsed if it contained only the merged element.\n\tif ( !range.isCollapsed ) {\n\t\tranges.push( range );\n\t}\n\n\t// Create `AttributeOperation`s out of the ranges.\n\treturn ranges.map( range => {\n\t\treturn new AttributeOperation( range, a.key, a.oldValue, a.newValue, a.baseVersion );\n\t} );\n} );\n\nsetTransformation( AttributeOperation, MoveOperation, ( a, b ) => {\n\tconst ranges = _breakRangeByMoveOperation( a.range, b );\n\n\t// Create `AttributeOperation`s out of the ranges.\n\treturn ranges.map( range => new AttributeOperation( range, a.key, a.oldValue, a.newValue, a.baseVersion ) );\n} );\n\n/**\n * Helper function for `AttributeOperation` x `MoveOperation` transformation.\n *\n * Takes the passed `range` and transforms it by move operation `moveOp` in a specific way. Only top-level nodes of `range`\n * are considered to be in the range. If move operation moves nodes deep from inside of the range, those nodes won't\n * be included in the result. In other words, top-level nodes of the ranges from the result are exactly the same as\n * top-level nodes of the original `range`.\n *\n * This is important for `AttributeOperation` because, for its range, it changes only the top-level nodes. So we need to\n * track only how those nodes have been affected by `MoveOperation`.\n */\nfunction _breakRangeByMoveOperation( range: ModelRange, moveOp: MoveOperation ) {\n\tconst moveRange = ModelRange._createFromPositionAndShift( moveOp.sourcePosition, moveOp.howMany );\n\n\t// We are transforming `range` (original range) by `moveRange` (range moved by move operation). As usual when it comes to\n\t// transforming a ranges, we may have a common part of the ranges and we may have a difference part (zero to two ranges).\n\tlet common = null;\n\tlet difference: Array<ModelRange> = [];\n\n\t// Let's compare the ranges.\n\tif ( moveRange.containsRange( range, true ) ) {\n\t\t// If the whole original range is moved, treat it whole as a common part. There's also no difference part.\n\t\tcommon = range;\n\t} else if ( range.start.hasSameParentAs( moveRange.start ) ) {\n\t\t// If the ranges are \"on the same level\" (in the same parent) then move operation may move exactly those nodes\n\t\t// that are changed by the attribute operation. In this case we get common part and difference part in the usual way.\n\t\tdifference = range.getDifference( moveRange );\n\t\tcommon = range.getIntersection( moveRange );\n\t} else {\n\t\t// In any other situation we assume that original range is different than move range, that is that move operation\n\t\t// moves other nodes that attribute operation change. Even if the moved range is deep inside in the original range.\n\t\t//\n\t\t// Note that this is different than in `.getIntersection` (we would get a common part in that case) and different\n\t\t// than `.getDifference` (we would get two ranges).\n\t\tdifference = [ range ];\n\t}\n\n\tconst result: Array<ModelRange> = [];\n\n\t// The default behaviour of `_getTransformedByMove` might get wrong results for difference part, though, so\n\t// we do it by hand.\n\tfor ( let diff of difference ) {\n\t\t// First, transform the range by removing moved nodes. Since this is a difference, this is safe, `null` won't be returned\n\t\t// as the range is different than the moved range.\n\t\tdiff = diff._getTransformedByDeletion( moveOp.sourcePosition, moveOp.howMany )!;\n\n\t\t// Transform also `targetPosition`.\n\t\tconst targetPosition = moveOp.getMovedRangeStart();\n\n\t\t// Spread the range only if moved nodes are inserted only between the top-level nodes of the `diff` range.\n\t\tconst spread = diff.start.hasSameParentAs( targetPosition );\n\n\t\t// Transform by insertion of moved nodes.\n\t\tconst diffs = diff._getTransformedByInsertion( targetPosition, moveOp.howMany, spread );\n\n\t\tresult.push( ...diffs );\n\t}\n\n\t// Common part can be simply transformed by the move operation. This is because move operation will not target to\n\t// that common part (the operation would have to target inside its own moved range).\n\tif ( common ) {\n\t\tresult.push(\n\t\t\tcommon._getTransformedByMove( moveOp.sourcePosition, moveOp.targetPosition, moveOp.howMany, false )[ 0 ]\n\t\t);\n\t}\n\n\treturn result;\n}\n\nsetTransformation( AttributeOperation, SplitOperation, ( a, b ) => {\n\t// Case 1:\n\t//\n\t// Split node is the last node in `AttributeOperation#range`.\n\t// `AttributeOperation#range` needs to be expanded to include the new (split) node.\n\t//\n\t// Attribute `type` to be changed to `numbered` but the `listItem` is split.\n\t// <listItem type=\"bulleted\">foobar</listItem>\n\t//\n\t// After split:\n\t// <listItem type=\"bulleted\">foo</listItem><listItem type=\"bulleted\">bar</listItem>\n\t//\n\t// After attribute change:\n\t// <listItem type=\"numbered\">foo</listItem><listItem type=\"numbered\">foo</listItem>\n\t//\n\tif ( a.range.end.isEqual( b.insertionPosition ) ) {\n\t\tif ( !b.graveyardPosition ) {\n\t\t\ta.range.end.offset++;\n\t\t}\n\n\t\treturn [ a ];\n\t}\n\n\t// Case 2:\n\t//\n\t// Split position is inside `AttributeOperation#range`, at the same level, so the nodes to change are\n\t// not going to make a flat range.\n\t//\n\t// Content with range-to-change and split position:\n\t// <p>Fo[zb^a]r</p>\n\t//\n\t// After split:\n\t// <p>Fozb</p><p>ar</p>\n\t//\n\t// Make two separate ranges containing all nodes to change:\n\t// <p>Fo[zb]</p><p>[a]r</p>\n\t//\n\tif ( a.range.start.hasSameParentAs( b.splitPosition ) && a.range.containsPosition( b.splitPosition ) ) {\n\t\tconst secondPart = a.clone();\n\n\t\tsecondPart.range = new ModelRange(\n\t\t\tb.moveTargetPosition.clone(),\n\t\t\ta.range.end._getCombined( b.splitPosition, b.moveTargetPosition )\n\t\t);\n\n\t\t( a.range as any ).end = b.splitPosition.clone();\n\t\ta.range.end.stickiness = 'toPrevious';\n\n\t\treturn [ a, secondPart ];\n\t}\n\n\t// The default case.\n\t//\n\ta.range = a.range._getTransformedBySplitOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( InsertOperation, AttributeOperation, ( a, b ) => {\n\tconst result: Array<Operation> = [ a ];\n\n\t// Case 1:\n\t//\n\t// The attribute operation range includes the position where nodes were inserted.\n\t// There are two possible scenarios: the inserted nodes were text and they should receive attributes or\n\t// the inserted nodes were elements and they should not receive attributes.\n\t//\n\t// This is a mirror scenario to the one described in `AttributeOperation` x `InsertOperation` transformation,\n\t// although this case is a little less complicated. In this case we simply need to change attributes of the\n\t// inserted nodes and that's it.\n\t//\n\tif ( a.shouldReceiveAttributes && a.position.hasSameParentAs( b.range.start ) && b.range.containsPosition( a.position ) ) {\n\t\tconst op = _getComplementaryAttributeOperations( a, b.key, b.newValue );\n\n\t\tif ( op ) {\n\t\t\tresult.push( op );\n\t\t}\n\t}\n\n\t// The default case is: do nothing.\n\t// `AttributeOperation` does not change the model tree structure so `InsertOperation` does not need to be changed.\n\t//\n\treturn result;\n} );\n\nsetTransformation( InsertOperation, InsertOperation, ( a, b, context ) => {\n\t// Case 1:\n\t//\n\t// Two insert operations insert nodes at the same position. Since they are the same, it needs to be decided\n\t// what will be the order of inserted nodes. However, there is no additional information to help in that\n\t// decision. Also, when `b` will be transformed by `a`, the same order must be maintained.\n\t//\n\t// To achieve that, we will check if the operation is strong.\n\t// If it is, it won't get transformed. If it is not, it will be moved.\n\t//\n\tif ( a.position.isEqual( b.position ) && context.aIsStrong ) {\n\t\treturn [ a ];\n\t}\n\n\t// The default case.\n\t//\n\ta.position = a.position._getTransformedByInsertOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( InsertOperation, MoveOperation, ( a, b ) => {\n\t// The default case.\n\t//\n\ta.position = a.position._getTransformedByMoveOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( InsertOperation, SplitOperation, ( a, b ) => {\n\t// The default case.\n\t//\n\ta.position = a.position._getTransformedBySplitOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( InsertOperation, MergeOperation, ( a, b ) => {\n\ta.position = a.position._getTransformedByMergeOperation( b );\n\n\treturn [ a ];\n} );\n\n// -----------------------\n\nsetTransformation( MarkerOperation, InsertOperation, ( a, b ) => {\n\tif ( a.oldRange ) {\n\t\ta.oldRange = a.oldRange._getTransformedByInsertOperation( b )[ 0 ];\n\t}\n\n\tif ( a.newRange ) {\n\t\ta.newRange = a.newRange._getTransformedByInsertOperation( b )[ 0 ];\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( MarkerOperation, MarkerOperation, ( a, b, context ) => {\n\tif ( a.name == b.name ) {\n\t\tif ( context.aIsStrong ) {\n\t\t\ta.oldRange = b.newRange ? b.newRange.clone() : null;\n\t\t} else {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( MarkerOperation, MergeOperation, ( a, b ) => {\n\tif ( a.oldRange ) {\n\t\ta.oldRange = a.oldRange._getTransformedByMergeOperation( b );\n\t}\n\n\tif ( a.newRange ) {\n\t\ta.newRange = a.newRange._getTransformedByMergeOperation( b );\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( MarkerOperation, MoveOperation, ( a, b ) => {\n\tconst result = [ a ];\n\n\tif ( a.oldRange ) {\n\t\ta.oldRange = ModelRange._createFromRanges( a.oldRange._getTransformedByMoveOperation( b ) );\n\t}\n\n\tif ( a.newRange ) {\n\t\t// In many simple cases the marker range will be kept integral after the transformation. For example, if some nodes\n\t\t// were inserted before the range, or into the range, then the marker range is not broken into two.\n\t\t//\n\t\t// However, if some nodes are taken out of the range and moved somewhere else, or are moved into the range, then the marker\n\t\t// range is \"broken\" into two or three pieces, and these pieces must be transformed and updated separately.\n\t\t//\n\t\t// When the marker range is transformed by move operation, as a result we get an array with one (simple case) or multiple\n\t\t// (\"broken range\" case) ranges.\n\t\tconst ranges = a.newRange._getTransformedByMoveOperation( b );\n\n\t\ta.newRange = ranges[ 0 ];\n\n\t\t// If there are multiple ranges, we will create separate marker operations for each piece of the original marker range.\n\t\t// Since they will be marker operations, they will be processed through the transformation process.\n\t\t//\n\t\t// However, we cannot create multiple ranges for the same marker (for the same marker name). A marker has only one range.\n\t\t// So, we cannot really have multiple marker operations for the same marker. We will keep the track of the separate marker\n\t\t// operations to see, if after all transformations, the marker pieces are next to each other or not. If so, we will glue\n\t\t// them together to the original marker operation (`a`). If not, we will discard them. These extra operations will never\n\t\t// be executed, as they will only exist temporarily during the transformation process.\n\t\t//\n\t\t// We will call these additional marker operations \"partial marker operations\" and we will mark them with negative base version.\n\t\t//\n\t\t// See also `handlePartialMarkerOperations()`.\n\t\t// See also https://github.com/ckeditor/ckeditor5/pull/17071.\n\t\t//\n\t\tfor ( let i = 1; i < ranges.length; i++ ) {\n\t\t\tconst op = a.clone();\n\n\t\t\top.oldRange = null;\n\t\t\top.newRange = ranges[ i ];\n\t\t\top.baseVersion = -1;\n\n\t\t\tresult.push( op );\n\t\t}\n\t}\n\n\treturn result;\n} );\n\nsetTransformation( MarkerOperation, SplitOperation, ( a, b, context ) => {\n\tif ( a.oldRange ) {\n\t\ta.oldRange = a.oldRange._getTransformedBySplitOperation( b );\n\t}\n\n\tif ( a.newRange ) {\n\t\tif ( context.abRelation ) {\n\t\t\t// If we have context, it means that there was previously a merge operation which transformed this marker operation, and that\n\t\t\t// merge operation was then undone, and this split operation should reverse the marker to state before the merge operation.\n\t\t\tconst aNewRange = a.newRange._getTransformedBySplitOperation( b );\n\n\t\t\tif ( a.newRange.start.isEqual( b.splitPosition ) ) {\n\t\t\t\t// If marker range start is same as split position, we need to decide where marker start should be placed, as there\n\t\t\t\t// are three possible options.\n\t\t\t\t//\n\t\t\t\tif ( context.abRelation.wasStartBeforeMergedElement ) {\n\t\t\t\t\t// If the marker start was initially before the merged element, move it back to that place.\n\t\t\t\t\t//\n\t\t\t\t\t// <p>Foo</p>[<p>Bar]</p>  -- merge ->  <p>Foo[Bar]</p>  -- default split ->  <p>Foo</p><p>[Bar]</p>\n\t\t\t\t\t// <p>Foo</p>[<p>Bar]</p>  -- merge ->  <p>Foo[Bar]</p>  --- fixed split -->  <p>Foo</p>[<p>Bar]</p>\n\t\t\t\t\t//\n\t\t\t\t\t( a.newRange as any ).start = ModelPosition._createAt( b.insertionPosition );\n\t\t\t\t} else if ( context.abRelation.wasInLeftElement ) {\n\t\t\t\t\t// If the marker start was initially in the \"left\" element, keep the start position there.\n\t\t\t\t\t//\n\t\t\t\t\t// <p>Foo[</p><p>Bar]</p>  -- merge ->  <p>Foo[Bar]</p>  -- default split ->  <p>Foo</p><p>[Bar]</p>\n\t\t\t\t\t// <p>Foo[</p><p>Bar]</p>  -- merge ->  <p>Foo[Bar]</p>  --- fixed split -->  <p>Foo[</p><p>Bar]</p>\n\t\t\t\t\t//\n\t\t\t\t\t( a.newRange as any ).start = ModelPosition._createAt( a.newRange.start );\n\t\t\t\t} else {\n\t\t\t\t\t// Finally, the start position must have been at the beginning of the \"right\" (merged) element.\n\t\t\t\t\t// In this case, move it back to the \"right\" element.\n\t\t\t\t\t//\n\t\t\t\t\t// Note, that this what the default transformation (`_getTransformedBySplitOperation()`) does, BUT ONLY for\n\t\t\t\t\t// a non-collapsed marker. For a collapsed marker, by default, the whole marker is kept at the split position,\n\t\t\t\t\t// which would be incorrect. This is why this case is needed, and why we don't use `aNewRange.start` here.\n\t\t\t\t\t//\n\t\t\t\t\t// <p>Foo</p><p>[]Bar</p>  -- merge ->  <p>Foo[]Bar</p>  -- default split ->  <p>Foo[]</p><p>Bar</p>\n\t\t\t\t\t// <p>Foo</p><p>[]Bar</p>  -- merge ->  <p>Foo[]Bar</p>  --- fixed split -->  <p>Foo</p><p>[]Bar</p>\n\t\t\t\t\t//\n\t\t\t\t\t( a.newRange as any ).start = ModelPosition._createAt( b.moveTargetPosition );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If marker range start is not the same as split position, simply use the default transformation, as there is no\n\t\t\t\t// ambiguity in this case.\n\t\t\t\t( a.newRange as any ).start = aNewRange.start;\n\t\t\t}\n\n\t\t\tif ( a.newRange.end.isEqual( b.splitPosition ) ) {\n\t\t\t\t// If marker range end is same as split position, we need to decide where marker end should be placed, as there\n\t\t\t\t// are three possible options.\n\t\t\t\t//\n\t\t\t\tif ( a.newRange.end.isEqual( b.splitPosition ) && context.abRelation.wasEndBeforeMergedElement ) {\n\t\t\t\t\t// If the marker end was initially before the merged element, move it back to that place.\n\t\t\t\t\t//\n\t\t\t\t\t// <p>[Foo</p>]<p>Bar</p>  -- merge ->  <p>[Foo]Bar</p>  -- default split ->  <p>[Foo]</p><p>Bar</p>\n\t\t\t\t\t// <p>[Foo</p>]<p>Bar</p>  -- merge ->  <p>[Foo]Bar</p>  --- fixed split -->  <p>[Foo</p>]<p>Bar</p>\n\t\t\t\t\t//\n\t\t\t\t\t( a.newRange as any ).end = ModelPosition._createAt( b.insertionPosition );\n\t\t\t\t} else if ( context.abRelation.wasInRightElement ) {\n\t\t\t\t\t// If the marker was initially in the \"right\" element, keep the end position there.\n\t\t\t\t\t//\n\t\t\t\t\t// <p>[Foo</p><p>]Bar</p>  -- merge ->  <p>[Foo]Bar</p>  -- default split ->  <p>[Foo]</p><p>Bar</p>\n\t\t\t\t\t// <p>[Foo</p><p>]Bar</p>  -- merge ->  <p>[Foo]Bar</p>  --- fixed split -->  <p>[Foo</p><p>]Bar</p>\n\t\t\t\t\t//\n\t\t\t\t\t( a.newRange as any ).end = ModelPosition._createAt( b.moveTargetPosition );\n\t\t\t\t} else {\n\t\t\t\t\t// Finally, the end position must have been at the end of the \"left\" (merged) element.\n\t\t\t\t\t// In this case, keep it where it is.\n\t\t\t\t\t//\n\t\t\t\t\t// Note, that this is what the default transformation does, so we could use `aNewRange.end`, but this is more clear.\n\t\t\t\t\t//\n\t\t\t\t\t( a.newRange as any ).end = ModelPosition._createAt( a.newRange.end );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If marker range end is not the same as split position, simply use the default transformation, as there is no\n\t\t\t\t// ambiguity in this case.\n\t\t\t\t( a.newRange as any ).end = aNewRange.end;\n\t\t\t}\n\n\t\t\treturn [ a ];\n\t\t}\n\n\t\ta.newRange = a.newRange._getTransformedBySplitOperation( b );\n\t}\n\n\treturn [ a ];\n} );\n\n// -----------------------\n\nsetTransformation( MergeOperation, InsertOperation, ( a, b ) => {\n\tif ( a.sourcePosition.hasSameParentAs( b.position ) ) {\n\t\ta.howMany += b.howMany;\n\t}\n\n\ta.sourcePosition = a.sourcePosition._getTransformedByInsertOperation( b );\n\ta.targetPosition = a.targetPosition._getTransformedByInsertOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( MergeOperation, MergeOperation, ( a, b, context ) => {\n\t// Case 1:\n\t//\n\t// Same merge operations.\n\t//\n\t// Both operations have same source and target positions. So the element already got merged and there is\n\t// theoretically nothing to do.\n\t//\n\tif ( a.sourcePosition.isEqual( b.sourcePosition ) && a.targetPosition.isEqual( b.targetPosition ) ) {\n\t\t// There are two ways that we can provide a do-nothing operation.\n\t\t//\n\t\t// First is simply a NoOperation instance. We will use it if `b` operation was not undone.\n\t\t//\n\t\t// Second is a merge operation that has the source operation in the merged element - in the graveyard -\n\t\t// same target position and `howMany` equal to `0`. So it is basically merging an empty element from graveyard\n\t\t// which is almost the same as NoOperation.\n\t\t//\n\t\t// This way the merge operation can be later transformed by split operation\n\t\t// to provide correct undo. This will be used if `b` operation was undone (only then it is correct).\n\t\t//\n\t\tif ( !context.bWasUndone ) {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t} else {\n\t\t\tconst path = b.graveyardPosition.path.slice();\n\t\t\tpath.push( 0 );\n\n\t\t\ta.sourcePosition = new ModelPosition( b.graveyardPosition.root, path );\n\t\t\ta.howMany = 0;\n\n\t\t\treturn [ a ];\n\t\t}\n\t}\n\n\t// Case 2:\n\t//\n\t// Same merge source position but different target position.\n\t//\n\t// This can happen during collaboration. For example, if one client merged a paragraph to the previous paragraph\n\t// and the other person removed that paragraph and merged the same paragraph to something before:\n\t//\n\t// Client A:\n\t// <p>Foo</p><p>Bar</p><p>[]Xyz</p>\n\t// <p>Foo</p><p>BarXyz</p>\n\t//\n\t// Client B:\n\t// <p>Foo</p>[<p>Bar</p>]<p>Xyz</p>\n\t// <p>Foo</p><p>[]Xyz</p>\n\t// <p>FooXyz</p>\n\t//\n\t// In this case we need to decide where finally \"Xyz\" will land:\n\t//\n\t// <p>FooXyz</p>               graveyard: <p>Bar</p>\n\t// <p>Foo</p>                  graveyard: <p>BarXyz</p>\n\t//\n\t// Let's move it in a way so that a merge operation that does not target to graveyard is more important so that\n\t// nodes does not end up in the graveyard. It makes sense. Both for Client A and for Client B \"Xyz\" finally did not\n\t// end up in the graveyard (see above).\n\t//\n\t// If neither or both operations point to graveyard, then let `aIsStrong` decide.\n\t//\n\tif (\n\t\ta.sourcePosition.isEqual( b.sourcePosition ) && !a.targetPosition.isEqual( b.targetPosition ) &&\n\t\t!context.bWasUndone && context.abRelation != 'splitAtSource'\n\t) {\n\t\tconst aToGraveyard = a.targetPosition.root.rootName == '$graveyard';\n\t\tconst bToGraveyard = b.targetPosition.root.rootName == '$graveyard';\n\n\t\t// If `aIsWeak` it means that `a` points to graveyard while `b` doesn't. Don't move nodes then.\n\t\tconst aIsWeak = aToGraveyard && !bToGraveyard;\n\n\t\t// If `bIsWeak` it means that `b` points to graveyard while `a` doesn't. Force moving nodes then.\n\t\tconst bIsWeak = bToGraveyard && !aToGraveyard;\n\n\t\t// Force move if `b` is weak or neither operation is weak but `a` is stronger through `context.aIsStrong`.\n\t\tconst forceMove = bIsWeak || ( !aIsWeak && context.aIsStrong );\n\n\t\tif ( forceMove ) {\n\t\t\tconst sourcePosition = b.targetPosition._getTransformedByMergeOperation( b );\n\t\t\tconst targetPosition = a.targetPosition._getTransformedByMergeOperation( b );\n\n\t\t\treturn [ new MoveOperation( sourcePosition, a.howMany, targetPosition, 0 ) ];\n\t\t} else {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\t}\n\n\t// The default case.\n\t// TODO: Possibly, there's a missing case for same `targetPosition` but different `sourcePosition`.\n\t//\n\tif ( a.sourcePosition.hasSameParentAs( b.targetPosition ) ) {\n\t\ta.howMany += b.howMany;\n\t}\n\n\ta.sourcePosition = a.sourcePosition._getTransformedByMergeOperation( b );\n\ta.targetPosition = a.targetPosition._getTransformedByMergeOperation( b );\n\n\t// Handle positions in graveyard.\n\t// If graveyard positions are same and `a` operation is strong - do not transform.\n\tif ( !a.graveyardPosition.isEqual( b.graveyardPosition ) || !context.aIsStrong ) {\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedByMergeOperation( b );\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( MergeOperation, MoveOperation, ( a, b, context ) => {\n\t// Case 1:\n\t//\n\t// The element to merge got removed.\n\t//\n\t// Merge operation does support merging elements which are not siblings. So it would not be a problem\n\t// from technical point of view. However, if the element was removed, the intention of the user deleting it\n\t// was to have it all deleted, together with its children. From user experience point of view, moving back the\n\t// removed nodes might be unexpected. This means that in this scenario we will block the merging.\n\t//\n\t// The exception to this rule would be if the remove operation was later undone.\n\t//\n\tconst removedRange = ModelRange._createFromPositionAndShift( b.sourcePosition, b.howMany );\n\n\tif ( b.type == 'remove' && !context.bWasUndone ) {\n\t\tif ( a.deletionPosition.hasSameParentAs( b.sourcePosition ) && removedRange.containsPosition( a.sourcePosition ) ) {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\t}\n\n\t// In most cases we want `sourcePosition` to stick to previous and `targetPosition` to stick to next.\n\t// Usually, `sourcePosition` is at the beginning of the merged element and `targetPosition` is at the end of the merge-target element.\n\t//\n\t// However, `sourcePosition` and `targetPosition` may end up in the middle of an element due to some OT magic that happens during undo.\n\t// It is expected and used in `MergeOperation` x `SplitOperation` transformation.\n\t//\n\t// But when these positions are in the middle, it messes up the regular `MergeOperation` x `MoveOperation` transformation because\n\t// these positions may \"follow\" some moved elements. And we want them stick in the original elements.\n\t//\n\t// This is why we add two extra cases: (1) and (2).\n\t//\n\t// But after this `MergeOperation` is transformed by \"this\" move (which is undone), we also need to define extra cases for\n\t// the operation undoing previous move. These are (3) and (4).\n\t//\n\t// (1). Note that this case is also added to `updateRelations()` and sets `mergeSourceAffected` relation.\n\t//\n\t// [] is move operation, } is merge source position (sticks to previous by default):\n\t// <p>A[b]}c</p>  ->  <p>A}c</p>\n\t//\n\tif ( b.sourcePosition.getShiftedBy( b.howMany ).isEqual( a.sourcePosition ) ) {\n\t\ta.sourcePosition.stickiness = 'toNone';\n\t}\n\n\t// (3). This is the transformation for undoing operation of the above case.\n\t//\n\t// [] is move operation, } is merge source position (sticks to previous by default):\n\t// <p>A}c</p>  ->  <p>A[b]}c</p>  (instead of <p>A}[b]c</p>)\n\t//\n\telse if ( b.targetPosition.isEqual( a.sourcePosition ) && context.abRelation == 'mergeSourceAffected' ) {\n\t\ta.sourcePosition.stickiness = 'toNext';\n\t}\n\n\t// (2). Note that this case is also added to `updateRelations()` and sets `mergeTargetWasBefore` relation.\n\t//\n\t// [] is move operation, { is merge target position (sticks to next by default):\n\t// <p>A{[b]c</p>  ->  <p>A{c</p>\n\t//\n\telse if ( b.sourcePosition.isEqual( a.targetPosition ) ) {\n\t\ta.targetPosition.stickiness = 'toNone';\n\t\ta.howMany -= b.howMany;\n\t}\n\n\t// (4). This is the transformation for undoing operation of the above case.\n\t//\n\t// [] is move operation, { is merge target position (sticks to next by default):\n\t// <p>A{c</p>  ->  <p>A{[b]c</p>  (instead of <p>A[b]{c</p>)\n\t//\n\telse if ( b.targetPosition.isEqual( a.targetPosition ) && context.abRelation == 'mergeTargetWasBefore' ) {\n\t\ta.targetPosition.stickiness = 'toPrevious';\n\t\ta.howMany += b.howMany;\n\t}\n\n\t// The default case.\n\telse {\n\t\tif ( a.sourcePosition.hasSameParentAs( b.targetPosition ) ) {\n\t\t\ta.howMany += b.howMany;\n\t\t}\n\n\t\tif ( a.sourcePosition.hasSameParentAs( b.sourcePosition ) ) {\n\t\t\ta.howMany -= b.howMany;\n\t\t}\n\t}\n\n\ta.sourcePosition = a.sourcePosition._getTransformedByMoveOperation( b );\n\ta.targetPosition = a.targetPosition._getTransformedByMoveOperation( b );\n\n\t// After transformations are done, make sure to revert stickiness in case if (1) - (4) scenario happened.\n\ta.sourcePosition.stickiness = 'toPrevious';\n\ta.targetPosition.stickiness = 'toNext';\n\n\t// `MergeOperation` graveyard position is like `MoveOperation` target position. It is a position where element(s) will\n\t// be moved. Like in other similar cases, we need to consider the scenario when those positions are same.\n\t// Here, we will treat `MergeOperation` like it is always strong (see `InsertOperation` x `InsertOperation` for comparison).\n\t// This means that we won't transform graveyard position if it is equal to move operation target position.\n\tif ( !a.graveyardPosition.isEqual( b.targetPosition ) ) {\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedByMoveOperation( b );\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( MergeOperation, SplitOperation, ( a, b, context ) => {\n\tif ( b.graveyardPosition ) {\n\t\t// If `b` operation defines graveyard position, a node from graveyard will be moved. This means that we need to\n\t\t// transform `a.graveyardPosition` accordingly.\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedByDeletion( b.graveyardPosition, 1 )!;\n\n\t\t// This is a scenario foreseen in `MergeOperation` x `MergeOperation`, with two identical merge operations.\n\t\t//\n\t\t// So, there was `MergeOperation` x `MergeOperation` transformation earlier. Now, `a` is a merge operation which\n\t\t// source position is in graveyard. Interestingly, split operation wants to use the node to be merged by `a`. This\n\t\t// means that `b` is undoing that merge operation from earlier, which caused `a` to be in graveyard.\n\t\t//\n\t\t// If that's the case, at this point, we will only \"fix\" `a.howMany`. It was earlier set to `0` in\n\t\t// `MergeOperation` x `MergeOperation` transformation. Later transformations in this function will change other\n\t\t// properties.\n\t\t//\n\t\tif ( a.deletionPosition.isEqual( b.graveyardPosition ) ) {\n\t\t\ta.howMany = b.howMany;\n\t\t}\n\t}\n\n\t// Case 1:\n\t//\n\t// Merge operation moves nodes to the place where split happens.\n\t//\n\t// This is a classic situation when there are two paragraphs, and there is a split (enter) at the end of the first\n\t// paragraph and there is a merge (delete) at the beginning of the second paragraph:\n\t//\n\t// <p>Foo{}</p><p>[]Bar</p>.\n\t//\n\t// User A presses enter after `Foo`, while User B presses backspace before `Bar`. It is intuitive that after both operations, the\n\t// editor state should stay the same.\n\t//\n\t// State after split:\n\t// <p>Foo</p><p></p><p>[]Bar</p>\n\t//\n\t// When this happens, `Bar` should be merged to the newly created paragraph, to maintain the editor state:\n\t// <p>Foo</p><p>Bar</p>\n\t//\n\t// Another option is to merge into the original paragraph `Foo`, according to the `targetPosition`. This results in an incorrect state:\n\t// <p>FooBar</p><p></p>\n\t//\n\t// Also, consider an example where User A also writes something in the new paragraph:\n\t// <p>Foo</p><p>Xyz</p><p>[]Bar</p>\n\t//\n\t// In this case it is clear that merge should happen into `[ 1, 3 ]` not into `[ 0, 3 ]`. It first has to be transformed to `[ 1, 0 ]`,\n\t// and then transformed be insertion into `[ 1, 3 ]`.\n\t//\n\t// So, usually we want to move `targetPosition` to the new paragraph when it is same as split position. This is how it is handled\n\t// in the default transformation (`_getTransformedBySplitOperation()`). We don't need a special case for this.\n\t//\n\t// However, there are two exceptions, when we **do not** want to transform `targetPosition`, and we need a special case then.\n\t//\n\t// These exceptions happen only if undo is involved. During OT, above presented case (`<p>Foo{}</p><p>[]Bar</p>`) is the only way\n\t// how `SplitOperation#splitPosition` and `MergeOperation#targetPosition` can be the same.\n\t//\n\t// First exception is when the element to merge is in the graveyard and split operation uses it. In that case\n\t// if target position would be transformed, the merge operation would target at the source position:\n\t//\n\t// root: <p>Foo[]</p>\t\t\t\tgraveyard: <p></p>\n\t//\n\t// SplitOperation: root [ 0, 3 ] using graveyard [ 0 ] (howMany = 0)\n\t// MergeOperation: graveyard [ 0, 0 ] -> root [ 0, 3 ] (howMany = 0)\n\t//\n\t// Since split operation moves the graveyard element back to the root (to path `[ 1 ]`), the merge operation `sourcePosition` changes.\n\t// After split we have: `<p>Foo</p><p></p>`, so `sourcePosition` is `[ 1, 0 ]`. But if `targetPosition` is transformed, then it\n\t// also becomes `[ 1, 0 ]`. In this case, we want to keep the `targetPosition` as it was.\n\t//\n\t// Second exception is connected strictly with undo relations. If this `MergeOperation` was earlier transformed by\n\t// `MergeOperation` and we stored an information that earlier the target position was not affected, then here, when transforming by\n\t// `SplitOperation` we are not going to change it as well.\n\t//\n\t// For these two cases we will only transform `sourcePosition` and return early.\n\t//\n\t// Note, that earlier there was also third special case here. `targetPosition` was not transformed, if it pointed into the middle of\n\t// target element, not into its end (as usual). This can also happen only with undo involved. However, it wasn't always a correct\n\t// solution, as in some cases we actually wanted to transform `targetPosition`. Also, this case usually happens together with the second\n\t// case described above. There is only one scenario that we have in our unit tests, where this third case happened without second case.\n\t// However, this scenario went fine no matter if we transformed `targetPosition` or not. That's because this happened in the middle\n\t// of transformation process and the operation was correctly transformed later on.\n\t//\n\tif ( a.targetPosition.isEqual( b.splitPosition ) ) {\n\t\tconst mergeSplittingElement = b.graveyardPosition && a.deletionPosition.isEqual( b.graveyardPosition );\n\n\t\tif ( mergeSplittingElement || context.abRelation == 'mergeTargetNotMoved' ) {\n\t\t\ta.sourcePosition = a.sourcePosition._getTransformedBySplitOperation( b );\n\n\t\t\treturn [ a ];\n\t\t}\n\t}\n\n\t// Case 2:\n\t//\n\t// Merge source is at the same position as split position. This sometimes happen, mostly during undo.\n\t// The decision here is mostly to choose whether merge source position should stay where it is (so it will be at the end of the\n\t// split element) or should be move to the beginning of the new element.\n\t//\n\tif ( a.sourcePosition.isEqual( b.splitPosition ) ) {\n\t\t// Use context to check if `SplitOperation` is not undoing a merge operation, that didn't change the `a` operation.\n\t\t// This scenario happens the undone merge operation moved nodes at the source position of `a` operation.\n\t\t// In that case `a` operation source position should stay where it is.\n\t\tif ( context.abRelation == 'mergeSourceNotMoved' ) {\n\t\t\ta.howMany = 0;\n\t\t\ta.targetPosition = a.targetPosition._getTransformedBySplitOperation( b );\n\n\t\t\treturn [ a ];\n\t\t}\n\n\t\t// This merge operation might have been earlier transformed by a merge operation which both merged the same element.\n\t\t// See that case in `MergeOperation` x `MergeOperation` transformation. In that scenario, if the merge operation has been undone,\n\t\t// the special case is not applied.\n\t\t//\n\t\t// Now, the merge operation is transformed by the split which has undone that previous merge operation.\n\t\t// So now we are fixing situation which was skipped in `MergeOperation` x `MergeOperation` case.\n\t\t//\n\t\tif ( context.abRelation == 'mergeSameElement' || a.sourcePosition.offset > 0 ) {\n\t\t\ta.sourcePosition = b.moveTargetPosition.clone();\n\t\t\ta.targetPosition = a.targetPosition._getTransformedBySplitOperation( b );\n\n\t\t\treturn [ a ];\n\t\t}\n\t}\n\n\t// The default case.\n\t//\n\tif ( a.sourcePosition.hasSameParentAs( b.splitPosition ) ) {\n\t\ta.howMany = b.splitPosition.offset;\n\t}\n\n\ta.sourcePosition = a.sourcePosition._getTransformedBySplitOperation( b );\n\ta.targetPosition = a.targetPosition._getTransformedBySplitOperation( b );\n\n\treturn [ a ];\n} );\n\n// -----------------------\n\nsetTransformation( MoveOperation, InsertOperation, ( a, b ) => {\n\tconst moveRange = ModelRange._createFromPositionAndShift( a.sourcePosition, a.howMany );\n\tconst transformed = moveRange._getTransformedByInsertOperation( b, false )[ 0 ];\n\n\ta.sourcePosition = transformed.start;\n\ta.howMany = transformed.end.offset - transformed.start.offset;\n\n\t// See `InsertOperation` x `MoveOperation` transformation for details on this case.\n\t//\n\t// In summary, both operations point to the same place, so the order of nodes needs to be decided.\n\t// `MoveOperation` is considered weaker, so it is always transformed, unless there was a certain relation\n\t// between operations.\n\t//\n\tif ( !a.targetPosition.isEqual( b.position ) ) {\n\t\ta.targetPosition = a.targetPosition._getTransformedByInsertOperation( b );\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( MoveOperation, MoveOperation, ( a, b, context ) => {\n\t//\n\t// Setting and evaluating some variables that will be used in special cases and default algorithm.\n\t//\n\t// Create ranges from `MoveOperations` properties.\n\tconst rangeA = ModelRange._createFromPositionAndShift( a.sourcePosition, a.howMany );\n\tconst rangeB = ModelRange._createFromPositionAndShift( b.sourcePosition, b.howMany );\n\n\t// Assign `context.aIsStrong` to a different variable, because the value may change during execution of\n\t// this algorithm and we do not want to override original `context.aIsStrong` that will be used in later transformations.\n\tlet aIsStrong = context.aIsStrong;\n\n\t// This will be used to decide the order of nodes if both operations target at the same position.\n\t// By default, use strong/weak operation mechanism.\n\tlet insertBefore = !context.aIsStrong;\n\n\t// If the relation is set, then use it to decide nodes order.\n\tif ( context.abRelation == 'insertBefore' || context.baRelation == 'insertAfter' ) {\n\t\tinsertBefore = true;\n\t} else if ( context.abRelation == 'insertAfter' || context.baRelation == 'insertBefore' ) {\n\t\tinsertBefore = false;\n\t}\n\n\t// `a.targetPosition` could be affected by the `b` operation. We will transform it.\n\tlet newTargetPosition;\n\n\tif ( a.targetPosition.isEqual( b.targetPosition ) && insertBefore ) {\n\t\tnewTargetPosition = a.targetPosition._getTransformedByDeletion(\n\t\t\tb.sourcePosition,\n\t\t\tb.howMany\n\t\t);\n\t} else {\n\t\tnewTargetPosition = a.targetPosition._getTransformedByMove(\n\t\t\tb.sourcePosition,\n\t\t\tb.targetPosition,\n\t\t\tb.howMany\n\t\t);\n\t}\n\n\t//\n\t// Special case #1 + mirror.\n\t//\n\t// Special case when both move operations' target positions are inside nodes that are\n\t// being moved by the other move operation. So in other words, we move ranges into inside of each other.\n\t// This case can't be solved reasonably (on the other hand, it should not happen often).\n\tif ( _moveTargetIntoMovedRange( a, b ) && _moveTargetIntoMovedRange( b, a ) ) {\n\t\t// Instead of transforming operation, we return a reverse of the operation that we transform by.\n\t\t// So when the results of this \"transformation\" will be applied, `b` MoveOperation will get reversed.\n\t\treturn [ b.getReversed() ];\n\t}\n\t//\n\t// End of special case #1.\n\t//\n\n\t//\n\t// Special case #2.\n\t//\n\t// Check if `b` operation targets inside `rangeA`.\n\tconst bTargetsToA = rangeA.containsPosition( b.targetPosition );\n\n\t// If `b` targets to `rangeA` and `rangeA` contains `rangeB`, `b` operation has no influence on `a` operation.\n\t// You might say that operation `b` is captured inside operation `a`.\n\tif ( bTargetsToA && rangeA.containsRange( rangeB, true ) ) {\n\t\t// There is a mini-special case here, where `rangeB` is on other level than `rangeA`. That's why\n\t\t// we need to transform `a` operation anyway.\n\t\t( rangeA as any ).start = rangeA.start._getTransformedByMove( b.sourcePosition, b.targetPosition, b.howMany );\n\t\t( rangeA as any ).end = rangeA.end._getTransformedByMove( b.sourcePosition, b.targetPosition, b.howMany );\n\n\t\treturn _makeMoveOperationsFromRanges( [ rangeA ], newTargetPosition! );\n\t}\n\n\t//\n\t// Special case #2 mirror.\n\t//\n\tconst aTargetsToB = rangeB.containsPosition( a.targetPosition );\n\n\tif ( aTargetsToB && rangeB.containsRange( rangeA, true ) ) {\n\t\t// `a` operation is \"moved together\" with `b` operation.\n\t\t// Here, just move `rangeA` \"inside\" `rangeB`.\n\t\t( rangeA as any ).start = rangeA.start._getCombined( b.sourcePosition, b.getMovedRangeStart() );\n\t\t( rangeA as any ).end = rangeA.end._getCombined( b.sourcePosition, b.getMovedRangeStart() );\n\n\t\treturn _makeMoveOperationsFromRanges( [ rangeA ], newTargetPosition! );\n\t}\n\t//\n\t// End of special case #2.\n\t//\n\n\t//\n\t// Special case #3 + mirror.\n\t//\n\t// `rangeA` has a node which is an ancestor of `rangeB`. In other words, `rangeB` is inside `rangeA`\n\t// but not on the same tree level. In such case ranges have common part but we have to treat it\n\t// differently, because in such case those ranges are not really conflicting and should be treated like\n\t// two separate ranges. Also we have to discard two difference parts.\n\tconst aCompB = compareArrays( a.sourcePosition.getParentPath(), b.sourcePosition.getParentPath() );\n\n\tif ( aCompB == 'prefix' || aCompB == 'extension' ) {\n\t\t// Transform `rangeA` by `b` operation and make operation out of it, and that's all.\n\t\t// Note that this is a simplified version of default case, but here we treat the common part (whole `rangeA`)\n\t\t// like a one difference part.\n\t\t( rangeA as any ).start = rangeA.start._getTransformedByMove( b.sourcePosition, b.targetPosition, b.howMany );\n\t\t( rangeA as any ).end = rangeA.end._getTransformedByMove( b.sourcePosition, b.targetPosition, b.howMany );\n\n\t\treturn _makeMoveOperationsFromRanges( [ rangeA ], newTargetPosition! );\n\t}\n\t//\n\t// End of special case #3.\n\t//\n\n\t//\n\t// Default case - ranges are on the same level or are not connected with each other.\n\t//\n\t// Modifier for default case.\n\t// Modifies `aIsStrong` flag in certain conditions.\n\t//\n\t// If only one of operations is a remove operation, we force remove operation to be the \"stronger\" one\n\t// to provide more expected results.\n\tif ( a.type == 'remove' && b.type != 'remove' && !context.aWasUndone && !context.forceWeakRemove ) {\n\t\taIsStrong = true;\n\t} else if ( a.type != 'remove' && b.type == 'remove' && !context.bWasUndone && !context.forceWeakRemove ) {\n\t\taIsStrong = false;\n\t}\n\n\t// Handle operation's source ranges - check how `rangeA` is affected by `b` operation.\n\t// This will aggregate transformed ranges.\n\tconst ranges = [];\n\n\t// Get the \"difference part\" of `a` operation source range.\n\t// This is an array with one or two ranges. Two ranges if `rangeB` is inside `rangeA`.\n\tconst difference = rangeA.getDifference( rangeB );\n\n\tfor ( const range of difference ) {\n\t\t// Transform those ranges by `b` operation. For example if `b` moved range from before those ranges, fix those ranges.\n\t\t( range as any ).start = range.start._getTransformedByDeletion( b.sourcePosition, b.howMany );\n\t\t( range as any ).end = range.end._getTransformedByDeletion( b.sourcePosition, b.howMany );\n\n\t\t// If `b` operation targets into `rangeA` on the same level, spread `rangeA` into two ranges.\n\t\tconst shouldSpread = compareArrays( range.start.getParentPath(), b.getMovedRangeStart().getParentPath() ) == 'same';\n\t\tconst newRanges = range._getTransformedByInsertion( b.getMovedRangeStart(), b.howMany, shouldSpread );\n\n\t\tranges.push( ...newRanges );\n\t}\n\n\t// Then, we have to manage the \"common part\" of both move ranges.\n\tconst common = rangeA.getIntersection( rangeB );\n\n\tif ( common !== null && aIsStrong ) {\n\t\t// Calculate the new position of that part of original range.\n\t\t( common as any ).start = common.start._getCombined( b.sourcePosition, b.getMovedRangeStart() );\n\t\t( common as any ).end = common.end._getCombined( b.sourcePosition, b.getMovedRangeStart() );\n\n\t\t// Take care of proper range order.\n\t\t//\n\t\t// Put `common` at appropriate place. Keep in mind that we are interested in original order.\n\t\t// Basically there are only three cases: there is zero, one or two difference ranges.\n\t\t//\n\t\t// If there is zero difference ranges, just push `common` in the array.\n\t\tif ( ranges.length === 0 ) {\n\t\t\tranges.push( common );\n\t\t}\n\t\t// If there is one difference range, we need to check whether common part was before it or after it.\n\t\telse if ( ranges.length == 1 ) {\n\t\t\tif ( rangeB.start.isBefore( rangeA.start ) || rangeB.start.isEqual( rangeA.start ) ) {\n\t\t\t\tranges.unshift( common );\n\t\t\t} else {\n\t\t\t\tranges.push( common );\n\t\t\t}\n\t\t}\n\t\t// If there are more ranges (which means two), put common part between them. This is the only scenario\n\t\t// where there could be two difference ranges so we don't have to make any comparisons.\n\t\telse {\n\t\t\tranges.splice( 1, 0, common );\n\t\t}\n\t}\n\n\tif ( ranges.length === 0 ) {\n\t\t// If there are no \"source ranges\", nothing should be changed.\n\t\t// Note that this can happen only if `aIsStrong == false` and `rangeA.isEqual( rangeB )`.\n\t\treturn [ new NoOperation( a.baseVersion ) ];\n\t}\n\n\treturn _makeMoveOperationsFromRanges( ranges, newTargetPosition! );\n} );\n\nsetTransformation( MoveOperation, SplitOperation, ( a, b, context ) => {\n\tlet newTargetPosition = a.targetPosition.clone();\n\n\t// Do not transform if target position is same as split insertion position and this split comes from undo.\n\t// This should be done on relations but it is too much work for now as it would require relations working in collaboration.\n\t// We need to make a decision how we will resolve such conflict and this is less harmful way.\n\tif ( !a.targetPosition.isEqual( b.insertionPosition ) || !b.graveyardPosition || context.abRelation == 'moveTargetAfter' ) {\n\t\tnewTargetPosition = a.targetPosition._getTransformedBySplitOperation( b );\n\t}\n\n\t// Case 1:\n\t//\n\t// Split operation brings back an element that was earlier a part of the move operation (first element of the original move operation).\n\t//\n\tif ( a.sourcePosition.isEqual( b.insertionPosition ) && context.abRelation == 'firstToMoveMerged' ) {\n\t\ta.howMany++;\n\n\t\ta.targetPosition = newTargetPosition;\n\n\t\treturn [ a ];\n\t}\n\n\t// Case 2:\n\t//\n\t// Last element in the moved range got split.\n\t//\n\t// In this case the default range transformation will not work correctly as the element created by\n\t// split operation would be outside the range. The range to move needs to be fixed manually.\n\t//\n\tconst moveRange = ModelRange._createFromPositionAndShift( a.sourcePosition, a.howMany );\n\n\tif ( moveRange.end.isEqual( b.insertionPosition ) ) {\n\t\t// Do it only if this is a \"natural\" split, not a one that comes from undo.\n\t\t// If this is undo split, only `targetPosition` needs to be changed (if the move is a remove).\n\t\tif ( !b.graveyardPosition || context.abRelation == 'lastToMoveMerged' ) {\n\t\t\ta.howMany++;\n\t\t}\n\n\t\ta.targetPosition = newTargetPosition;\n\n\t\treturn [ a ];\n\t}\n\n\t// Case 3:\n\t//\n\t// Split happened between the moved nodes. In this case two ranges to move need to be generated.\n\t//\n\t// Characters `ozba` are moved to the end of paragraph `Xyz` but split happened.\n\t// <p>F[oz|ba]r</p><p>Xyz</p>\n\t//\n\t// After split:\n\t// <p>F[oz</p><p>ba]r</p><p>Xyz</p>\n\t//\n\t// Correct ranges:\n\t// <p>F[oz]</p><p>[ba]r</p><p>Xyz</p>\n\t//\n\t// After move:\n\t// <p>F</p><p>r</p><p>Xyzozba</p>\n\t//\n\tif ( moveRange.start.hasSameParentAs( b.splitPosition ) && moveRange.containsPosition( b.splitPosition ) ) {\n\t\tlet rightRange = new ModelRange( b.splitPosition, moveRange.end );\n\t\trightRange = rightRange._getTransformedBySplitOperation( b );\n\n\t\tconst ranges = [\n\t\t\tnew ModelRange( moveRange.start, b.splitPosition ),\n\t\t\trightRange\n\t\t];\n\n\t\treturn _makeMoveOperationsFromRanges( ranges, newTargetPosition );\n\t}\n\n\t// Case 4:\n\t//\n\t// Move operation targets at the split position. We need to decide if the nodes should be inserted\n\t// at the end of the split element or at the beginning of the new element.\n\t//\n\tif ( a.targetPosition.isEqual( b.splitPosition ) && context.abRelation == 'insertAtSource' ) {\n\t\tnewTargetPosition = b.moveTargetPosition;\n\t}\n\n\t// Case 5:\n\t//\n\t// Move operation targets just after the split element. We need to decide if the nodes should be inserted\n\t// between two parts of split element, or after the new element.\n\t//\n\t// Split at `|`, while move operation moves `<p>Xyz</p>` and targets at `^`:\n\t// <p>Foo|bar</p>^<p>baz</p>\n\t// <p>Foo</p>^<p>bar</p><p>baz</p> or <p>Foo</p><p>bar</p>^<p>baz</p>?\n\t//\n\t// If there is no contextual information between operations (for example, they come from collaborative\n\t// editing), we don't want to put some unrelated content (move) between parts of related content (split parts).\n\t// However, if the split is from undo, in the past, the moved content might be targeting between the\n\t// split parts, meaning that was exactly user's intention:\n\t//\n\t// <p>Foo</p>^<p>bar</p>\t\t<--- original situation, in \"past\".\n\t// <p>Foobar</p>^\t\t\t\t<--- after merge target position is transformed.\n\t// <p>Foo|bar</p>^\t\t\t\t<--- then the merge is undone, and split happens, which leads us to current situation.\n\t//\n\t// In this case it is pretty clear that the intention was to put new paragraph between those nodes,\n\t// so we need to transform accordingly. We can detect this scenario thanks to relations.\n\t//\n\tif ( a.targetPosition.isEqual( b.insertionPosition ) && context.abRelation == 'insertBetween' ) {\n\t\tnewTargetPosition = a.targetPosition;\n\t}\n\n\t// The default case.\n\t//\n\tconst transformed = moveRange._getTransformedBySplitOperation( b );\n\tconst ranges = [ transformed ];\n\n\t// Case 6:\n\t//\n\t// Moved range contains graveyard element used by split operation. Add extra move operation to the result.\n\t//\n\tif ( b.graveyardPosition ) {\n\t\tconst movesGraveyardElement = moveRange.start.isEqual( b.graveyardPosition ) || moveRange.containsPosition( b.graveyardPosition );\n\n\t\tif ( a.howMany > 1 && movesGraveyardElement && !context.aWasUndone ) {\n\t\t\tranges.push( ModelRange._createFromPositionAndShift( b.insertionPosition, 1 ) );\n\t\t}\n\t}\n\n\treturn _makeMoveOperationsFromRanges( ranges, newTargetPosition );\n} );\n\nsetTransformation( MoveOperation, MergeOperation, ( a, b, context ) => {\n\tconst movedRange = ModelRange._createFromPositionAndShift( a.sourcePosition, a.howMany );\n\n\tif ( b.deletionPosition.hasSameParentAs( a.sourcePosition ) && movedRange.containsPosition( b.sourcePosition ) ) {\n\t\tif ( a.type == 'remove' && !context.forceWeakRemove ) {\n\t\t\t// Case 1:\n\t\t\t//\n\t\t\t// The element to remove got merged.\n\t\t\t//\n\t\t\t// Merge operation does support merging elements which are not siblings. So it would not be a problem\n\t\t\t// from technical point of view. However, if the element was removed, the intention of the user\n\t\t\t// deleting it was to have it all deleted. From user experience point of view, moving back the\n\t\t\t// removed nodes might be unexpected. This means that in this scenario we will reverse merging and remove the element.\n\t\t\t//\n\t\t\tif ( !context.aWasUndone ) {\n\t\t\t\tconst results = [];\n\n\t\t\t\tlet gyMoveSource = b.graveyardPosition.clone();\n\t\t\t\tlet splitNodesMoveSource = b.targetPosition._getTransformedByMergeOperation( b );\n\n\t\t\t\t// `a.targetPosition` points to graveyard, so it was probably affected by `b` (which moved merged element to the graveyard).\n\t\t\t\tconst aTarget = a.targetPosition.getTransformedByOperation( b );\n\n\t\t\t\tif ( a.howMany > 1 ) {\n\t\t\t\t\tresults.push( new MoveOperation( a.sourcePosition, a.howMany - 1, aTarget, 0 ) );\n\n\t\t\t\t\tgyMoveSource = gyMoveSource._getTransformedByMove( a.sourcePosition, aTarget, a.howMany - 1 );\n\t\t\t\t\tsplitNodesMoveSource = splitNodesMoveSource._getTransformedByMove( a.sourcePosition, aTarget, a.howMany - 1 );\n\t\t\t\t}\n\n\t\t\t\tconst gyMoveTarget = b.deletionPosition._getCombined( a.sourcePosition, aTarget );\n\t\t\t\tconst gyMove = new MoveOperation( gyMoveSource, 1, gyMoveTarget, 0 );\n\n\t\t\t\tconst splitNodesMoveTargetPath = gyMove.getMovedRangeStart().path.slice();\n\t\t\t\tsplitNodesMoveTargetPath.push( 0 );\n\n\t\t\t\tconst splitNodesMoveTarget = new ModelPosition( gyMove.targetPosition.root, splitNodesMoveTargetPath );\n\t\t\t\tsplitNodesMoveSource = splitNodesMoveSource._getTransformedByMove( gyMoveSource, gyMoveTarget, 1 );\n\t\t\t\tconst splitNodesMove = new MoveOperation( splitNodesMoveSource, b.howMany, splitNodesMoveTarget, 0 );\n\n\t\t\t\tresults.push( gyMove );\n\t\t\t\tresults.push( splitNodesMove );\n\n\t\t\t\treturn results;\n\t\t\t}\n\t\t} else {\n\t\t\t// Case 2:\n\t\t\t//\n\t\t\t// The element to move got merged and it was the only element to move.\n\t\t\t// In this case just don't do anything, leave the node in the graveyard. Without special case\n\t\t\t// it would be a move operation that moves 0 nodes, so maybe it is better just to return no-op.\n\t\t\t//\n\t\t\tif ( a.howMany == 1 ) {\n\t\t\t\tif ( !context.bWasUndone ) {\n\t\t\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t\t\t} else {\n\t\t\t\t\ta.sourcePosition = b.graveyardPosition.clone();\n\t\t\t\t\ta.targetPosition = a.targetPosition._getTransformedByMergeOperation( b );\n\n\t\t\t\t\treturn [ a ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// The default case.\n\t//\n\tconst moveRange = ModelRange._createFromPositionAndShift( a.sourcePosition, a.howMany );\n\tconst transformed = moveRange._getTransformedByMergeOperation( b );\n\n\ta.sourcePosition = transformed.start;\n\ta.howMany = transformed.end.offset - transformed.start.offset;\n\ta.targetPosition = a.targetPosition._getTransformedByMergeOperation( b );\n\n\treturn [ a ];\n} );\n\n// -----------------------\n\nsetTransformation( RenameOperation, InsertOperation, ( a, b ) => {\n\ta.position = a.position._getTransformedByInsertOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( RenameOperation, MergeOperation, ( a, b ) => {\n\t// Case 1:\n\t//\n\t// Element to rename got merged, so it was moved to `b.graveyardPosition`.\n\t//\n\tif ( a.position.isEqual( b.deletionPosition ) ) {\n\t\ta.position = b.graveyardPosition.clone();\n\t\ta.position.stickiness = 'toNext';\n\n\t\treturn [ a ];\n\t}\n\n\ta.position = a.position._getTransformedByMergeOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( RenameOperation, MoveOperation, ( a, b ) => {\n\ta.position = a.position._getTransformedByMoveOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( RenameOperation, RenameOperation, ( a, b, context ) => {\n\tif ( a.position.isEqual( b.position ) ) {\n\t\tif ( context.aIsStrong ) {\n\t\t\ta.oldName = b.newName;\n\t\t} else {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( RenameOperation, SplitOperation, ( a, b ) => {\n\t// Case 1:\n\t//\n\t// The element to rename has been split. In this case, the new element should be also renamed.\n\t//\n\t// User decides to change the paragraph to a list item:\n\t// <paragraph>Foobar</paragraph>\n\t//\n\t// However, in meantime, split happens:\n\t// <paragraph>Foo</paragraph><paragraph>bar</paragraph>\n\t//\n\t// As a result, rename both elements:\n\t// <listItem>Foo</listItem><listItem>bar</listItem>\n\t//\n\tconst renamePath = a.position.path;\n\tconst splitPath = b.splitPosition.getParentPath();\n\n\tif ( compareArrays( renamePath, splitPath ) == 'same' && !b.graveyardPosition ) {\n\t\tconst extraRename = new RenameOperation( a.position.getShiftedBy( 1 ), a.oldName, a.newName, 0 );\n\n\t\treturn [ a, extraRename ];\n\t}\n\n\t// The default case.\n\t//\n\ta.position = a.position._getTransformedBySplitOperation( b );\n\n\treturn [ a ];\n} );\n\n// -----------------------\n\nsetTransformation( RootAttributeOperation, RootAttributeOperation, ( a, b, context ) => {\n\tif ( a.root === b.root && a.key === b.key ) {\n\t\tif ( !context.aIsStrong ) {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t} else {\n\t\t\ta.oldValue = b.newValue;\n\t\t}\n\t}\n\n\treturn [ a ];\n} );\n\n// -----------------------\n\nsetTransformation( RootOperation, RootOperation, ( a, b ) => {\n\tif ( a.rootName === b.rootName && a.isAdd === b.isAdd ) {\n\t\treturn [ new NoOperation( 0 ) ];\n\t}\n\n\treturn [ a ];\n} );\n\n// -----------------------\n\nsetTransformation( SplitOperation, InsertOperation, ( a, b ) => {\n\t// The default case.\n\t//\n\tif ( a.splitPosition.hasSameParentAs( b.position ) && a.splitPosition.offset < b.position.offset ) {\n\t\ta.howMany += b.howMany;\n\t}\n\n\ta.splitPosition = a.splitPosition._getTransformedByInsertOperation( b );\n\ta.insertionPosition = a.insertionPosition._getTransformedByInsertOperation( b );\n\n\treturn [ a ];\n} );\n\nsetTransformation( SplitOperation, MergeOperation, ( a, b, context ) => {\n\t// Case 1:\n\t//\n\t// Split element got merged. If two different elements were merged, clients will have different content.\n\t//\n\t// Example. Merge at `{}`, split at `[]`:\n\t// <heading>Foo</heading>{}<paragraph>B[]ar</paragraph>\n\t//\n\t// On merge side it will look like this:\n\t// <heading>FooB[]ar</heading>\n\t// <heading>FooB</heading><heading>ar</heading>\n\t//\n\t// On split side it will look like this:\n\t// <heading>Foo</heading>{}<paragraph>B</paragraph><paragraph>ar</paragraph>\n\t// <heading>FooB</heading><paragraph>ar</paragraph>\n\t//\n\t// Clearly, the second element is different for both clients.\n\t//\n\t// We could use the removed merge element from graveyard as a split element but then clients would have a different\n\t// model state (in graveyard), because the split side client would still have an element in graveyard (removed by merge).\n\t//\n\t// To overcome this, in `SplitOperation` x `MergeOperation` transformation we will add additional `SplitOperation`\n\t// in the graveyard, which will actually clone the merged-and-deleted element. Then, that cloned element will be\n\t// used for splitting. Example below.\n\t//\n\t// Original state:\n\t// <heading>Foo</heading>{}<paragraph>B[]ar</paragraph>\n\t//\n\t// Merge side client:\n\t//\n\t// After merge:\n\t// <heading>FooB[]ar</heading>                                 graveyard: <paragraph></paragraph>\n\t//\n\t// Extra split:\n\t// <heading>FooB[]ar</heading>                                 graveyard: <paragraph></paragraph><paragraph></paragraph>\n\t//\n\t// Use the \"cloned\" element from graveyard:\n\t// <heading>FooB</heading><paragraph>ar</paragraph>            graveyard: <paragraph></paragraph>\n\t//\n\t// Split side client:\n\t//\n\t// After split:\n\t// <heading>Foo</heading>{}<paragraph>B</paragraph><paragraph>ar</paragraph>\n\t//\n\t// After merge:\n\t// <heading>FooB</heading><paragraph>ar</paragraph>            graveyard: <paragraph></paragraph>\n\t//\n\t// This special case scenario only applies if the original split operation clones the split element.\n\t// If the original split operation has `graveyardPosition` set, it all doesn't have sense because split operation\n\t// knows exactly which element it should use. So there would be no original problem with different contents.\n\t//\n\t// Additionally, the special case applies only if the merge wasn't already undone.\n\t//\n\tif ( !a.graveyardPosition && !context.bWasUndone && a.splitPosition.hasSameParentAs( b.sourcePosition ) ) {\n\t\tconst splitPath = b.graveyardPosition.path.slice();\n\t\tsplitPath.push( 0 );\n\n\t\tconst splitPosition = new ModelPosition( b.graveyardPosition.root, splitPath );\n\t\tconst insertionPosition = SplitOperation.getInsertionPosition( new ModelPosition( b.graveyardPosition.root, splitPath ) );\n\n\t\tconst additionalSplit = new SplitOperation( splitPosition, 0, insertionPosition, null, 0 );\n\n\t\ta.splitPosition = a.splitPosition._getTransformedByMergeOperation( b );\n\t\ta.insertionPosition = SplitOperation.getInsertionPosition( a.splitPosition );\n\t\ta.graveyardPosition = additionalSplit.insertionPosition.clone();\n\t\ta.graveyardPosition.stickiness = 'toNext';\n\n\t\treturn [ additionalSplit, a ];\n\t}\n\n\t// The default case.\n\t//\n\tif ( a.splitPosition.hasSameParentAs( b.deletionPosition ) && !a.splitPosition.isAfter( b.deletionPosition ) ) {\n\t\ta.howMany--;\n\t}\n\n\tif ( a.splitPosition.hasSameParentAs( b.targetPosition ) ) {\n\t\ta.howMany += b.howMany;\n\t}\n\n\ta.splitPosition = a.splitPosition._getTransformedByMergeOperation( b );\n\ta.insertionPosition = SplitOperation.getInsertionPosition( a.splitPosition );\n\n\tif ( a.graveyardPosition ) {\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedByMergeOperation( b );\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( SplitOperation, MoveOperation, ( a, b, context ) => {\n\tconst rangeToMove = ModelRange._createFromPositionAndShift( b.sourcePosition, b.howMany );\n\n\tif ( a.graveyardPosition ) {\n\t\t// Case 1:\n\t\t//\n\t\t// Split operation graveyard node was moved. In this case move operation is stronger. Since graveyard element\n\t\t// is already moved to the correct position, we need to only move the nodes after the split position.\n\t\t// This will be done by `MoveOperation` instead of `SplitOperation`.\n\t\t//\n\t\tconst gyElementMoved = rangeToMove.start.isEqual( a.graveyardPosition ) || rangeToMove.containsPosition( a.graveyardPosition );\n\n\t\tif ( !context.bWasUndone && gyElementMoved ) {\n\t\t\tconst sourcePosition = a.splitPosition._getTransformedByMoveOperation( b );\n\n\t\t\tconst newParentPosition = a.graveyardPosition._getTransformedByMoveOperation( b );\n\t\t\tconst newTargetPath = newParentPosition.path.slice();\n\t\t\tnewTargetPath.push( 0 );\n\n\t\t\tconst newTargetPosition = new ModelPosition( newParentPosition.root, newTargetPath );\n\t\t\tconst moveOp = new MoveOperation( sourcePosition, a.howMany, newTargetPosition, 0 );\n\n\t\t\treturn [ moveOp ];\n\t\t}\n\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedByMoveOperation( b );\n\t}\n\n\t// Case 2:\n\t//\n\t// Split is at a position where nodes were moved.\n\t//\n\t// This is a scenario described in `MoveOperation` x `SplitOperation` transformation but from the\n\t// \"split operation point of view\".\n\t//\n\tconst splitAtTarget = a.splitPosition.isEqual( b.targetPosition );\n\n\tif ( splitAtTarget && ( context.baRelation == 'insertAtSource' || context.abRelation == 'splitBefore' ) ) {\n\t\ta.howMany += b.howMany;\n\t\ta.splitPosition = a.splitPosition._getTransformedByDeletion( b.sourcePosition, b.howMany )!;\n\t\ta.insertionPosition = SplitOperation.getInsertionPosition( a.splitPosition );\n\n\t\treturn [ a ];\n\t}\n\n\tif ( splitAtTarget && context.abRelation && context.abRelation.howMany ) {\n\t\tconst { howMany, offset } = context.abRelation;\n\n\t\ta.howMany += howMany;\n\t\ta.splitPosition = a.splitPosition.getShiftedBy( offset );\n\t\t// TODO: `insertionPosition` change missing?\n\n\t\treturn [ a ];\n\t}\n\n\t// Case 3:\n\t//\n\t// If the split position is inside the moved range, we need to shift the split position to a proper place.\n\t// The position cannot be moved together with moved range because that would result in splitting of an incorrect element.\n\t//\n\t// Characters `bc` should be moved to the second paragraph while split position is between them:\n\t// <paragraph>A[b|c]d</paragraph><paragraph>Xyz</paragraph>\n\t//\n\t// After move, new split position is incorrect:\n\t// <paragraph>Ad</paragraph><paragraph>Xb|cyz</paragraph>\n\t//\n\t// Correct split position:\n\t// <paragraph>A|d</paragraph><paragraph>Xbcyz</paragraph>\n\t//\n\t// After split:\n\t// <paragraph>A</paragraph><paragraph>d</paragraph><paragraph>Xbcyz</paragraph>\n\t//\n\tif ( a.splitPosition.hasSameParentAs( b.sourcePosition ) && rangeToMove.containsPosition( a.splitPosition ) ) {\n\t\tconst howManyRemoved = b.howMany - ( a.splitPosition.offset - b.sourcePosition.offset );\n\t\ta.howMany -= howManyRemoved;\n\n\t\tif ( a.splitPosition.hasSameParentAs( b.targetPosition ) && a.splitPosition.offset < b.targetPosition.offset ) {\n\t\t\ta.howMany += b.howMany;\n\t\t}\n\n\t\ta.splitPosition = b.sourcePosition.clone();\n\t\ta.insertionPosition = SplitOperation.getInsertionPosition( a.splitPosition );\n\n\t\treturn [ a ];\n\t}\n\n\t// The default case.\n\t// Don't change `howMany` if move operation does not really move anything.\n\t//\n\tif ( !b.sourcePosition.isEqual( b.targetPosition ) ) {\n\t\tif ( a.splitPosition.hasSameParentAs( b.sourcePosition ) && a.splitPosition.offset <= b.sourcePosition.offset ) {\n\t\t\ta.howMany -= b.howMany;\n\t\t}\n\n\t\tif ( a.splitPosition.hasSameParentAs( b.targetPosition ) && a.splitPosition.offset < b.targetPosition.offset ) {\n\t\t\ta.howMany += b.howMany;\n\t\t}\n\t}\n\n\t// Change position stickiness to force a correct transformation.\n\ta.splitPosition.stickiness = 'toNone';\n\ta.splitPosition = a.splitPosition._getTransformedByMoveOperation( b );\n\ta.splitPosition.stickiness = 'toNext';\n\n\tif ( a.graveyardPosition ) {\n\t\ta.insertionPosition = a.insertionPosition._getTransformedByMoveOperation( b );\n\t} else {\n\t\ta.insertionPosition = SplitOperation.getInsertionPosition( a.splitPosition );\n\t}\n\n\treturn [ a ];\n} );\n\nsetTransformation( SplitOperation, SplitOperation, ( a, b, context ) => {\n\t// Case 1:\n\t//\n\t// Split at the same position.\n\t//\n\t// If there already was a split at the same position as in `a` operation, it means that the intention\n\t// conveyed by `a` operation has already been fulfilled and `a` should not do anything (to avoid double split).\n\t//\n\t// However, there is a difference if these are new splits or splits created by undo. These have different\n\t// intentions. Also splits moving back different elements from graveyard have different intentions. They\n\t// are just different operations.\n\t//\n\t// So we cancel split operation only if it was really identical.\n\t//\n\t// Also, there is additional case, where split operations aren't identical and should not be cancelled, however the\n\t// default transformation is incorrect too.\n\t//\n\tif ( a.splitPosition.isEqual( b.splitPosition ) ) {\n\t\tif ( !a.graveyardPosition && !b.graveyardPosition ) {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\n\t\tif ( a.graveyardPosition && b.graveyardPosition && a.graveyardPosition.isEqual( b.graveyardPosition ) ) {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\n\t\t// Use context to know that the `a.splitPosition` should stay where it is.\n\t\t// This happens during undo when first a merge operation moved nodes to `a.splitPosition` and now `b` operation undoes that merge.\n\t\tif ( context.abRelation == 'splitBefore' ) {\n\t\t\t// Since split is at the same position, there are no nodes left to split.\n\t\t\ta.howMany = 0;\n\n\t\t\t// Note: there was `if ( a.graveyardPosition )` here but it was uncovered in tests and I couldn't find any scenarios for now.\n\t\t\t// That would have to be a `SplitOperation` that didn't come from undo but is transformed by operations that were undone.\n\t\t\t// It could happen if `context` is enabled in collaboration.\n\t\t\ta.graveyardPosition = a.graveyardPosition!._getTransformedBySplitOperation( b );\n\n\t\t\treturn [ a ];\n\t\t}\n\t}\n\n\t// Case 2:\n\t//\n\t// Same node is using to split different elements. This happens in undo when previously same element was merged to\n\t// two different elements. This is described in `MergeOperation` x `MergeOperation` transformation.\n\t//\n\t// In this case we will follow the same logic. We will assume that `insertionPosition` is same for both\n\t// split operations. This might not always be true but in the real cases that were experienced it was. After all,\n\t// if these splits are reverses of merge operations that were merging the same element, then the `insertionPosition`\n\t// should be same for both of those splits.\n\t//\n\t// Again, we will decide which operation is stronger by checking if split happens in graveyard or in non-graveyard root.\n\t//\n\tif ( a.graveyardPosition && b.graveyardPosition && a.graveyardPosition.isEqual( b.graveyardPosition ) ) {\n\t\tconst aInGraveyard = a.splitPosition.root.rootName == '$graveyard';\n\t\tconst bInGraveyard = b.splitPosition.root.rootName == '$graveyard';\n\n\t\t// If `aIsWeak` it means that `a` points to graveyard while `b` doesn't. Don't move nodes then.\n\t\tconst aIsWeak = aInGraveyard && !bInGraveyard;\n\n\t\t// If `bIsWeak` it means that `b` points to graveyard while `a` doesn't. Force moving nodes then.\n\t\tconst bIsWeak = bInGraveyard && !aInGraveyard;\n\n\t\t// Force move if `b` is weak or neither operation is weak but `a` is stronger through `context.aIsStrong`.\n\t\tconst forceMove = bIsWeak || ( !aIsWeak && context.aIsStrong );\n\n\t\tif ( forceMove ) {\n\t\t\tconst result = [];\n\n\t\t\t// First we need to move any nodes split by `b` back to where they were.\n\t\t\t// Do it only if `b` actually moved something.\n\t\t\tif ( b.howMany ) {\n\t\t\t\tresult.push( new MoveOperation( b.moveTargetPosition, b.howMany, b.splitPosition, 0 ) );\n\t\t\t}\n\n\t\t\t// Then we need to move nodes from `a` split position to their new element.\n\t\t\t// Do it only if `a` actually should move something.\n\t\t\tif ( a.howMany ) {\n\t\t\t\tresult.push( new MoveOperation( a.splitPosition, a.howMany, a.moveTargetPosition, 0 ) );\n\t\t\t}\n\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn [ new NoOperation( 0 ) ];\n\t\t}\n\t}\n\n\tif ( a.graveyardPosition ) {\n\t\ta.graveyardPosition = a.graveyardPosition._getTransformedBySplitOperation( b );\n\t}\n\n\t// Case 3:\n\t//\n\t// Position where operation `b` inserted a new node after split is the same as the operation `a` split position.\n\t// As in similar cases, there is ambiguity if the split should be before the new node (created by `b`) or after.\n\t//\n\tif ( a.splitPosition.isEqual( b.insertionPosition ) && context.abRelation == 'splitBefore' ) {\n\t\ta.howMany++;\n\n\t\treturn [ a ];\n\t}\n\n\t// Case 4:\n\t//\n\t// This is a mirror to the case 2. above.\n\t//\n\tif ( b.splitPosition.isEqual( a.insertionPosition ) && context.baRelation == 'splitBefore' ) {\n\t\tconst newPositionPath = b.insertionPosition.path.slice();\n\t\tnewPositionPath.push( 0 );\n\n\t\tconst newPosition = new ModelPosition( b.insertionPosition.root, newPositionPath );\n\t\tconst moveOp = new MoveOperation( a.insertionPosition, 1, newPosition, 0 );\n\n\t\treturn [ a, moveOp ];\n\t}\n\n\t// The default case.\n\t//\n\tif ( a.splitPosition.hasSameParentAs( b.splitPosition ) && a.splitPosition.offset < b.splitPosition.offset ) {\n\t\ta.howMany -= b.howMany;\n\t}\n\n\ta.splitPosition = a.splitPosition._getTransformedBySplitOperation( b );\n\ta.insertionPosition = SplitOperation.getInsertionPosition( a.splitPosition );\n\n\treturn [ a ];\n} );\n\n/**\n * Checks whether `MoveOperation` `targetPosition` is inside a node from the moved range of the other `MoveOperation`.\n */\nfunction _moveTargetIntoMovedRange( a: MoveOperation, b: MoveOperation ) {\n\treturn a.targetPosition._getTransformedByDeletion( b.sourcePosition, b.howMany ) === null;\n}\n\n/**\n * Helper function for `MoveOperation` x `MoveOperation` transformation. Converts given ranges and target position to\n * move operations and returns them.\n *\n * Ranges and target position will be transformed on-the-fly when generating operations.\n *\n * Given `ranges` should be in the order of how they were in the original transformed operation.\n *\n * Given `targetPosition` is the target position of the first range from `ranges`.\n */\nfunction _makeMoveOperationsFromRanges( ranges: Array<ModelRange>, targetPosition: ModelPosition ) {\n\t// At this moment we have some ranges and a target position, to which those ranges should be moved.\n\t// Order in `ranges` array is the go-to order of after transformation.\n\t//\n\t// We are almost done. We have `ranges` and `targetPosition` to make operations from.\n\t// Unfortunately, those operations may affect each other. Precisely, first operation after move\n\t// may affect source range and target position of second and third operation. Same with second\n\t// operation affecting third.\n\t//\n\t// We need to fix those source ranges and target positions once again, before converting `ranges` to operations.\n\tconst operations = [];\n\n\t// Keep in mind that nothing will be transformed if there is just one range in `ranges`.\n\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t// Create new operation out of a range and target position.\n\t\tconst range = ranges[ i ];\n\t\tconst op = new MoveOperation(\n\t\t\trange.start,\n\t\t\trange.end.offset - range.start.offset,\n\t\t\ttargetPosition,\n\t\t\t0\n\t\t);\n\n\t\toperations.push( op );\n\n\t\t// Transform other ranges by the generated operation.\n\t\tfor ( let j = i + 1; j < ranges.length; j++ ) {\n\t\t\t// All ranges in `ranges` array should be:\n\t\t\t//\n\t\t\t// * non-intersecting (these are part of original operation source range), and\n\t\t\t// * `targetPosition` does not target into them (opposite would mean that transformed operation targets \"inside itself\").\n\t\t\t//\n\t\t\t// This means that the transformation will be \"clean\" and always return one result.\n\t\t\tranges[ j ] = ranges[ j ]._getTransformedByMove( op.sourcePosition, op.targetPosition, op.howMany )[ 0 ];\n\t\t}\n\n\t\ttargetPosition = targetPosition._getTransformedByMove( op.sourcePosition, op.targetPosition, op.howMany );\n\t}\n\n\treturn operations;\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/**\n * @module engine/model/liveposition\n */\n\nimport { ModelPosition, type ModelPositionOffset, type ModelPositionStickiness } from './position.js';\n\nimport type { Model, ModelApplyOperationEvent } from './model.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelItem } from './item.js';\nimport { type Operation } from './operation/operation.js';\nimport { type ModelRootElement } from './rootelement.js';\n\nimport { CKEditorError, EmitterMixin, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nconst ModelLivePositionBase: EmitterMixinConstructor<typeof ModelPosition> = /* #__PURE__ */ EmitterMixin( ModelPosition );\n\n/**\n * `ModelLivePosition` is a type of {@link module:engine/model/position~ModelPosition Position}\n * that updates itself as {@link module:engine/model/document~ModelDocument document}\n * is changed through operations. It may be used as a bookmark.\n *\n * **Note:** Contrary to {@link module:engine/model/position~ModelPosition}, `ModelLivePosition` works only in roots that are\n * {@link module:engine/model/rootelement~ModelRootElement}.\n * If {@link module:engine/model/documentfragment~ModelDocumentFragment} is passed, error will be thrown.\n *\n * **Note:** Be very careful when dealing with `ModelLivePosition`. Each `ModelLivePosition` instance bind events that might\n * have to be unbound.\n * Use {@link module:engine/model/liveposition~ModelLivePosition#detach} whenever you don't need `ModelLivePosition` anymore.\n */\nexport class ModelLivePosition extends ModelLivePositionBase {\n\t/**\n\t * Root of the position path.\n\t */\n\tdeclare public readonly root: ModelRootElement;\n\n\t/**\n\t * Creates a live position.\n\t *\n\t * @see module:engine/model/position~ModelPosition\n\t */\n\tconstructor( root: ModelRootElement, path: Array<number>, stickiness: ModelPositionStickiness = 'toNone', model?: Model ) {\n\t\tsuper( root, path, stickiness );\n\n\t\tconst boundModel = model || ( this.root.is( 'rootElement' ) ? this.root.document!.model : null );\n\n\t\tif ( !boundModel ) {\n\t\t\t/**\n\t\t\t * LivePosition's root has to be an instance of ModelRootElement or have a reference to a model instance.\n\t\t\t *\n\t\t\t * @error model-liveposition-no-model-reference\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-liveposition-no-model-reference', root );\n\t\t}\n\n\t\tbindWithModel.call( this, boundModel );\n\t}\n\n\t/**\n\t * Unbinds all events previously bound by `ModelLivePosition`. Use it whenever you don't need `ModelLivePosition` instance\n\t * anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was\n\t * referring to it).\n\t */\n\tpublic detach(): void {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/model/position~ModelPosition position instance}, which is equal to this live position.\n\t */\n\tpublic toPosition(): ModelPosition {\n\t\treturn new ModelPosition( this.root, this.path.slice(), this.stickiness );\n\t}\n\n\t/**\n\t * Creates a `ModelLivePosition` instance that is equal to position.\n\t */\n\tpublic static fromPosition( position: ModelPosition, stickiness?: ModelPositionStickiness ): ModelLivePosition {\n\t\treturn new this( position.root as ModelRootElement, position.path.slice(), stickiness ? stickiness : position.stickiness );\n\t}\n\n\t/**\n\t * Creates a `ModelLivePosition` for a position rooted in\n\t * a {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n\t *\n\t * Document fragment does not belong to a document, so the live position is bound to the provided `model` and keeps\n\t * itself in sync with every operation applied to that fragment (e.g. while editing clipboard content).\n\t *\n\t * @internal\n\t */\n\tpublic static _fromPositionInDocumentFragment(\n\t\tposition: ModelPosition,\n\t\tmodel: Model,\n\t\tstickiness?: ModelPositionStickiness\n\t): ModelLivePosition {\n\t\treturn new this( position.root as ModelRootElement, position.path.slice(), stickiness ? stickiness : position.stickiness, model );\n\t}\n\n\t/**\n\t * @internal\n\t * @see module:engine/model/position~ModelPosition._createAfter\n\t */\n\tdeclare public static readonly _createAfter: (\n\t\titem: ModelItem | ModelDocumentFragment,\n\t\tstickiness?: ModelPositionStickiness\n\t) => ModelLivePosition;\n\n\t/**\n\t * @internal\n\t * @see module:engine/model/position~ModelPosition._createBefore\n\t */\n\tdeclare public static readonly _createBefore: (\n\t\titem: ModelItem | ModelDocumentFragment,\n\t\tstickiness?: ModelPositionStickiness\n\t) => ModelLivePosition;\n\n\t/**\n\t * @internal\n\t * @see module:engine/model/position~ModelPosition._createAt\n\t */\n\tdeclare public static readonly _createAt: (\n\t\titemOrPosition: ModelItem | ModelPosition | ModelDocumentFragment,\n\t\toffset?: ModelPositionOffset,\n\t\tstickiness?: ModelPositionStickiness\n\t) => ModelLivePosition;\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelLivePosition.prototype.is = function( type: string ): boolean {\n\treturn type === 'livePosition' || type === 'model:livePosition' ||\n\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\ttype == 'position' || type === 'model:position';\n} as any;\n\n/**\n * Binds this `ModelLivePosition` to the given model, so the position updates itself on every operation applied to it.\n */\nfunction bindWithModel( this: ModelLivePosition, model: Model ) {\n\t// A position rooted in a document fragment is updated only by operations applied to that fragment. Those are\n\t// not document operations (the fragment is not a document), so - unlike a position rooted in a document root - the\n\t// `isDocumentOperation` check should be skipped.\n\tconst isDetached = !this.root.is( 'rootElement' );\n\n\tthis.listenTo<ModelApplyOperationEvent>(\n\t\tmodel,\n\t\t'applyOperation',\n\t\t( event, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\tif ( !isDetached && !operation.isDocumentOperation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttransform.call( this, operation );\n\t\t},\n\t\t{ priority: 'low' }\n\t);\n}\n\n/**\n * Updates this position accordingly to the updates applied to the model. Bases on change events.\n */\nfunction transform( this: ModelLivePosition, operation: Operation ) {\n\tconst result = this.getTransformedByOperation( operation );\n\n\tif ( !this.isEqual( result ) ) {\n\t\tconst oldPosition = this.toPosition();\n\n\t\t( this as any ).path = result.path;\n\t\t( this as any ).root = result.root;\n\n\t\tthis.fire<ModelLivePositionChangeEvent>( 'change', oldPosition );\n\t}\n}\n\n/**\n * Fired when `ModelLivePosition` instance is changed due to changes on {@link module:engine/model/document~ModelDocument}.\n *\n * @eventName ~ModelLivePosition#change\n * @param oldPosition Position equal to this live position before it got changed.\n */\nexport type ModelLivePositionChangeEvent = {\n\tname: 'change';\n\targs: [ oldPosition: ModelPosition ];\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/**\n * @module engine/model/batch\n */\n\nimport { logWarning } from '@ckeditor/ckeditor5-utils';\nimport { type Operation } from './operation/operation.js';\n\n/**\n * A batch instance groups model changes ({@link module:engine/model/operation/operation~Operation operations}). All operations\n * grouped in a single batch can be reverted together, so you can also think about a batch as of a single undo step. If you want\n * to extend a given undo step, you can add more changes to the batch using {@link module:engine/model/model~Model#enqueueChange}:\n *\n * ```ts\n * model.enqueueChange( batch, writer => {\n * \twriter.insertText( 'foo', paragraph, 'end' );\n * } );\n * ```\n *\n * @see module:engine/model/model~Model#enqueueChange\n * @see module:engine/model/model~Model#change\n */\nexport class Batch implements BatchType {\n\t/**\n\t * An array of operations that compose this batch.\n\t */\n\tpublic readonly operations: Array<Operation>;\n\n\t/**\n\t * Whether the batch can be undone through the undo feature.\n\t */\n\tpublic readonly isUndoable: boolean;\n\n\t/**\n\t * Whether the batch includes operations created locally (`true`) or operations created on other, remote editors (`false`).\n\t */\n\tpublic readonly isLocal: boolean;\n\n\t/**\n\t * Whether the batch was created by the undo feature and undoes other operations.\n\t */\n\tpublic readonly isUndo: boolean;\n\n\t/**\n\t * Whether the batch includes operations connected with typing.\n\t */\n\tpublic readonly isTyping: boolean;\n\n\t/**\n\t * Creates a batch instance.\n\t *\n\t * @see module:engine/model/model~Model#enqueueChange\n\t * @see module:engine/model/model~Model#change\n\t * @param type A set of flags that specify the type of the batch. Batch type can alter how some of the features work\n\t * when encountering a given `Batch` instance (for example, when a feature listens to applied operations).\n\t */\n\tconstructor( type: BatchType = {} ) {\n\t\tif ( typeof type === 'string' ) {\n\t\t\ttype = type === 'transparent' ? { isUndoable: false } : {};\n\n\t\t\t/**\n\t\t\t * The string value for a `type` property of the `Batch` constructor has been deprecated and will be removed in the near future.\n\t\t\t * Please refer to the {@link module:engine/model/batch~Batch#constructor `Batch` constructor API documentation} for more\n\t\t\t * information.\n\t\t\t *\n\t\t\t * @error batch-constructor-deprecated-string-type\n\t\t\t */\n\t\t\tlogWarning( 'batch-constructor-deprecated-string-type' );\n\t\t}\n\n\t\tconst { isUndoable = true, isLocal = true, isUndo = false, isTyping = false } = type;\n\n\t\tthis.operations = [];\n\t\tthis.isUndoable = isUndoable;\n\t\tthis.isLocal = isLocal;\n\t\tthis.isUndo = isUndo;\n\t\tthis.isTyping = isTyping;\n\t}\n\n\t/**\n\t * Returns the base version of this batch, which is equal to the base version of the first operation in the batch.\n\t * If there are no operations in the batch or neither operation has the base version set, it returns `null`.\n\t */\n\tpublic get baseVersion(): number | null {\n\t\tfor ( const op of this.operations ) {\n\t\t\tif ( op.baseVersion !== null ) {\n\t\t\t\treturn op.baseVersion;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Adds an operation to the batch instance.\n\t *\n\t * @param operation An operation to add.\n\t * @returns The added operation.\n\t */\n\tpublic addOperation( operation: Operation ): Operation {\n\t\tif ( operation.isDocumentOperation ) {\n\t\t\t// Store only document operations in the batch.\n\t\t\t// Non-document operations are temporary and should be discarded after they are applied.\n\t\t\toperation.batch = this;\n\t\t\tthis.operations.push( operation );\n\t\t}\n\n\t\treturn operation;\n\t}\n}\n\n/**\n * A set of flags that specify the type of the batch. Batch type can alter how some of the features work\n * when encountering a given `Batch` instance (for example, when a feature listens to applied operations).\n */\nexport interface BatchType {\n\n\t/**\n\t * Whether a batch can be undone through undo feature.\n\t *\n\t * @default true\n\t */\n\tisUndoable?: boolean;\n\n\t/**\n\t * Whether a batch includes operations created locally (`true`) or operations created on\n\t * other, remote editors (`false`).\n\t *\n\t * @default true\n\t */\n\tisLocal?: boolean;\n\n\t/**\n\t * Whether a batch was created by the undo feature and undoes other operations.\n\t *\n\t * @default false\n\t */\n\tisUndo?: boolean;\n\n\t/**\n\t * Whether a batch includes operations connected with a typing action.\n\t *\n\t * @default false\n\t */\n\tisTyping?: boolean;\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/**\n * @module engine/model/differ\n */\n\nimport { ModelPosition } from './position.js';\nimport { ModelRange } from './range.js';\n\nimport type { MarkerCollection, MarkerData } from './markercollection.js';\nimport { type AttributeOperation } from './operation/attributeoperation.js';\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelElement } from './element.js';\nimport { type InsertOperation } from './operation/insertoperation.js';\nimport { type ModelItem } from './item.js';\nimport { type MergeOperation } from './operation/mergeoperation.js';\nimport { type MoveOperation } from './operation/moveoperation.js';\nimport { type ModelNode } from './node.js';\nimport { type ModelRootElement } from './rootelement.js';\nimport { type Operation } from './operation/operation.js';\nimport { type RenameOperation } from './operation/renameoperation.js';\nimport { type SplitOperation } from './operation/splitoperation.js';\nimport { type RootOperation } from './operation/rootoperation.js';\nimport { type RootAttributeOperation } from './operation/rootattributeoperation.js';\n\n/**\n * Calculates the difference between two model states.\n *\n * Receives operations that are to be applied on the model document. Marks parts of the model document tree which\n * are changed and saves the state of these elements before the change. Then, it compares saved elements with the\n * changed elements, after all changes are applied on the model document. Calculates the diff between saved\n * elements and new ones and returns a change set.\n */\nexport class Differ {\n\t/**\n\t * Priority of the {@link ~Differ#_elementState element states}. States on higher indexes of the array can overwrite states on the lower\n\t * indexes.\n\t */\n\tprivate static readonly _statesPriority = [ undefined, 'refresh', 'rename', 'move' ];\n\n\t/**\n\t * Reference to the model's marker collection.\n\t */\n\tprivate readonly _markerCollection: MarkerCollection;\n\n\t/**\n\t * A map that stores changes that happened in a given element.\n\t *\n\t * The keys of the map are references to the model elements.\n\t * The values of the map are arrays with changes that were done on this element.\n\t */\n\tprivate readonly _changesInElement: Map<ModelElement | ModelDocumentFragment, Array<ChangeItem>> = new Map();\n\n\t/**\n\t * Stores a snapshot for these model nodes that might have changed.\n\t *\n\t * This complements {@link ~Differ#_elementChildrenSnapshots `_elementChildrenSnapshots`}.\n\t *\n\t * See also {@link ~DifferSnapshot}.\n\t */\n\tprivate readonly _elementsSnapshots: Map<ModelNode, DifferSnapshot> = new Map();\n\n\t/**\n\t * For each element or document fragment inside which there was a change, it stores a snapshot of the child nodes list (an array\n\t * of children snapshots that represent the state in the element / fragment before any change has happened).\n\t *\n\t * This complements {@link ~Differ#_elementsSnapshots `_elementsSnapshots`}.\n\t *\n\t * See also {@link ~DifferSnapshot}.\n\t */\n\tprivate readonly _elementChildrenSnapshots: Map<ModelElement | ModelDocumentFragment, Array<DifferSnapshot>> = new Map();\n\n\t/**\n\t * Keeps the state for a given element, describing how the element was changed so far. It is used to evaluate the `action` property\n\t * of diff items returned by {@link ~Differ#getChanges}.\n\t *\n\t * Possible values, in the order from the lowest priority to the highest priority:\n\t *\n\t * * `'refresh'` - element was refreshed,\n\t * * `'rename'` - element was renamed,\n\t * * `'move'` - element was moved (or, usually, removed, that is moved to the graveyard).\n\t *\n\t * Element that was refreshed, may change its state to `'rename'` if it was later renamed, or to `'move'` if it was removed.\n\t * But the element cannot change its state from `'move'` to `'rename'`, or from `'rename'` to `'refresh'`.\n\t *\n\t * Only already existing elements are registered in `_elementState`. If a new element was inserted as a result of a buffered operation,\n\t * it is not be registered in `_elementState`.\n\t */\n\tprivate readonly _elementState: Map<ModelElement, 'rename' | 'refresh' | 'move'> = new Map();\n\n\t/**\n\t * A map that stores all changed markers.\n\t *\n\t * The keys of the map are marker names.\n\t *\n\t * The values of the map are objects with the following properties:\n\t *\n\t * * `oldMarkerData`,\n\t * * `newMarkerData`.\n\t */\n\tprivate readonly _changedMarkers: Map<string, { newMarkerData: MarkerData; oldMarkerData: MarkerData }> = new Map();\n\n\t/**\n\t * A map that stores all roots that have been changed.\n\t *\n\t * The keys are the names of the roots while value represents the changes.\n\t */\n\tprivate readonly _changedRoots: Map<string, DifferItemRoot> = new Map();\n\n\t/**\n\t * Stores the number of changes that were processed. Used to order the changes chronologically. It is important\n\t * when changes are sorted.\n\t */\n\tprivate _changeCount: number = 0;\n\n\t/**\n\t * For efficiency purposes, `Differ` stores the change set returned by the differ after {@link #getChanges} call.\n\t * Cache is reset each time a new operation is buffered. If the cache has not been reset, {@link #getChanges} will\n\t * return the cached value instead of calculating it again.\n\t *\n\t * This property stores those changes that did not take place in graveyard root.\n\t */\n\tprivate _cachedChanges: Array<DifferItem> | null = null;\n\n\t/**\n\t * For efficiency purposes, `Differ` stores the change set returned by the differ after the {@link #getChanges} call.\n\t * The cache is reset each time a new operation is buffered. If the cache has not been reset, {@link #getChanges} will\n\t * return the cached value instead of calculating it again.\n\t *\n\t * This property stores all changes evaluated by `Differ`, including those that took place in the graveyard.\n\t */\n\tprivate _cachedChangesWithGraveyard: Array<DifferItem> | null = null;\n\n\t/**\n\t * Set of model items that were marked to get refreshed in {@link #_refreshItem}.\n\t */\n\tprivate _refreshedItems: Set<ModelItem> = new Set();\n\n\t/**\n\t * Creates a `Differ` instance.\n\t *\n\t * @param markerCollection Model's marker collection.\n\t */\n\tconstructor( markerCollection: MarkerCollection ) {\n\t\tthis._markerCollection = markerCollection;\n\t}\n\n\t/**\n\t * Informs whether there are any changes buffered in `Differ`.\n\t */\n\tpublic get isEmpty(): boolean {\n\t\treturn this._changesInElement.size == 0 && this._changedMarkers.size == 0 && this._changedRoots.size == 0;\n\t}\n\n\t/**\n\t * Buffers the given operation. **An operation has to be buffered before it is executed.**\n\t *\n\t * @param operationToBuffer An operation to buffer.\n\t */\n\tpublic bufferOperation( operationToBuffer: Operation ): void {\n\t\t// Below we take an operation, check its type, then use its parameters in marking (private) methods.\n\t\t// The general rule is to not mark elements inside inserted element. All inserted elements are re-rendered.\n\t\t// Marking changes in them would cause a \"double\" changing then.\n\t\t//\n\t\tconst operation = operationToBuffer as (\n\t\t\tInsertOperation |\n\t\t\tAttributeOperation |\n\t\t\tMoveOperation |\n\t\t\tRenameOperation |\n\t\t\tSplitOperation |\n\t\t\tMergeOperation |\n\t\t\tRootOperation |\n\t\t\tRootAttributeOperation\n\t\t);\n\n\t\t// Note: an operation that happens inside a non-loaded root will be ignored. If the operation happens partially inside\n\t\t// a non-loaded root, that part will be ignored (this may happen for move or marker operations).\n\t\t//\n\t\tswitch ( operation.type ) {\n\t\t\tcase 'insert': {\n\t\t\t\tif ( this._isInInsertedElement( operation.position.parent ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._markInsert( operation.position.parent, operation.position.offset, operation.nodes.maxOffset );\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'addAttribute':\n\t\t\tcase 'removeAttribute':\n\t\t\tcase 'changeAttribute': {\n\t\t\t\tfor ( const item of operation.range.getItems( { shallow: true } ) ) {\n\t\t\t\t\tif ( this._isInInsertedElement( item.parent! ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._markAttribute( item );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'remove':\n\t\t\tcase 'move':\n\t\t\tcase 'reinsert': {\n\t\t\t\t// When range is moved to the same position then not mark it as a change.\n\t\t\t\t// See: https://github.com/ckeditor/ckeditor5-engine/issues/1664.\n\t\t\t\tif (\n\t\t\t\t\toperation.sourcePosition.isEqual( operation.targetPosition ) ||\n\t\t\t\t\toperation.sourcePosition.getShiftedBy( operation.howMany ).isEqual( operation.targetPosition )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst sourceParentInserted = this._isInInsertedElement( operation.sourcePosition.parent );\n\t\t\t\tconst targetParentInserted = this._isInInsertedElement( operation.targetPosition.parent );\n\n\t\t\t\tif ( !sourceParentInserted ) {\n\t\t\t\t\tthis._markRemove( operation.sourcePosition.parent, operation.sourcePosition.offset, operation.howMany );\n\t\t\t\t}\n\n\t\t\t\tif ( !targetParentInserted ) {\n\t\t\t\t\tthis._markInsert( operation.targetPosition.parent, operation.getMovedRangeStart().offset, operation.howMany );\n\t\t\t\t}\n\n\t\t\t\t// Remember -- operation is buffered before it is executed. So, it was not executed yet.\n\t\t\t\tconst range = ModelRange._createFromPositionAndShift( operation.sourcePosition, operation.howMany );\n\n\t\t\t\tfor ( const node of range.getItems( { shallow: true } ) ) {\n\t\t\t\t\tthis._setElementState( node, 'move' );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'rename': {\n\t\t\t\tif ( this._isInInsertedElement( operation.position.parent ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._markRemove( operation.position.parent, operation.position.offset, 1 );\n\t\t\t\tthis._markInsert( operation.position.parent, operation.position.offset, 1 );\n\n\t\t\t\tconst range = ModelRange._createFromPositionAndShift( operation.position, 1 );\n\n\t\t\t\tfor ( const marker of this._markerCollection.getMarkersIntersectingRange( range ) ) {\n\t\t\t\t\tconst markerData = marker.getData();\n\n\t\t\t\t\tthis.bufferMarkerChange( marker.name, markerData, markerData );\n\t\t\t\t}\n\n\t\t\t\tthis._setElementState( operation.position.nodeAfter!, 'rename' );\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'split': {\n\t\t\t\tconst splitElement = operation.splitPosition.parent;\n\n\t\t\t\t// Mark that children of the split element were removed.\n\t\t\t\tif ( !this._isInInsertedElement( splitElement ) ) {\n\t\t\t\t\tthis._markRemove( splitElement, operation.splitPosition.offset, operation.howMany );\n\n\t\t\t\t\t// Remember -- operation is buffered before it is executed. So, it was not executed yet.\n\t\t\t\t\tconst range = ModelRange._createFromPositionAndShift( operation.splitPosition, operation.howMany );\n\n\t\t\t\t\tfor ( const node of range.getItems( { shallow: true } ) ) {\n\t\t\t\t\t\tthis._setElementState( node, 'move' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Mark that the new element (split copy) was inserted.\n\t\t\t\tif ( !this._isInInsertedElement( operation.insertionPosition.parent ) ) {\n\t\t\t\t\tthis._markInsert( operation.insertionPosition.parent, operation.insertionPosition.offset, 1 );\n\t\t\t\t}\n\n\t\t\t\t// If the split took the element from the graveyard, mark that the element from the graveyard was removed.\n\t\t\t\tif ( operation.graveyardPosition ) {\n\t\t\t\t\tthis._markRemove( operation.graveyardPosition.parent, operation.graveyardPosition.offset, 1 );\n\n\t\t\t\t\tthis._setElementState( operation.graveyardPosition.nodeAfter!, 'move' );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'merge': {\n\t\t\t\t// Mark that the merged element was removed.\n\t\t\t\tconst mergedElement = operation.sourcePosition.parent as ModelElement;\n\n\t\t\t\tif ( !this._isInInsertedElement( mergedElement.parent! ) ) {\n\t\t\t\t\tthis._markRemove( mergedElement.parent!, mergedElement.startOffset!, 1 );\n\t\t\t\t}\n\n\t\t\t\t// Mark that the merged element was inserted into graveyard.\n\t\t\t\tconst graveyardParent = operation.graveyardPosition.parent;\n\n\t\t\t\tthis._markInsert( graveyardParent, operation.graveyardPosition.offset, 1 );\n\n\t\t\t\tthis._setElementState( mergedElement, 'move' );\n\n\t\t\t\t// Mark that children of merged element were inserted at new parent.\n\t\t\t\tconst mergedIntoElement = operation.targetPosition.parent;\n\n\t\t\t\tif ( !this._isInInsertedElement( mergedIntoElement ) ) {\n\t\t\t\t\tthis._markInsert( mergedIntoElement, operation.targetPosition.offset, mergedElement.maxOffset );\n\n\t\t\t\t\t// Remember -- operation is buffered before it is executed. So, it was not executed yet.\n\t\t\t\t\tconst range = ModelRange._createFromPositionAndShift( operation.sourcePosition, operation.howMany );\n\n\t\t\t\t\tfor ( const node of range.getItems( { shallow: true } ) ) {\n\t\t\t\t\t\tthis._setElementState( node, 'move' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'detachRoot':\n\t\t\tcase 'addRoot': {\n\t\t\t\tconst root = operation.affectedSelectable as ModelRootElement;\n\n\t\t\t\tif ( !root._isLoaded ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Don't buffer if the root state does not change.\n\t\t\t\tif ( root.isAttached() == operation.isAdd ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._bufferRootStateChange( operation.rootName, operation.isAdd );\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'addRootAttribute':\n\t\t\tcase 'removeRootAttribute':\n\t\t\tcase 'changeRootAttribute': {\n\t\t\t\tif ( !operation.root._isLoaded ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst rootName = operation.root.rootName;\n\n\t\t\t\tthis._bufferRootAttributeChange( rootName, operation.key, operation.oldValue, operation.newValue );\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Clear cache after each buffered operation as it is no longer valid.\n\t\tthis._cachedChanges = null;\n\t}\n\n\t/**\n\t * Buffers a marker change.\n\t *\n\t * @param markerName The name of the marker that changed.\n\t * @param oldMarkerData Marker data before the change.\n\t * @param newMarkerData Marker data after the change.\n\t */\n\tpublic bufferMarkerChange( markerName: string, oldMarkerData: MarkerData, newMarkerData: MarkerData ): void {\n\t\tif ( oldMarkerData.range && oldMarkerData.range.root.is( 'rootElement' ) && !oldMarkerData.range.root._isLoaded ) {\n\t\t\toldMarkerData.range = null;\n\t\t}\n\n\t\tif ( newMarkerData.range && newMarkerData.range.root.is( 'rootElement' ) && !newMarkerData.range.root._isLoaded ) {\n\t\t\tnewMarkerData.range = null;\n\t\t}\n\n\t\tlet buffered = this._changedMarkers.get( markerName );\n\n\t\tif ( !buffered ) {\n\t\t\tbuffered = { newMarkerData, oldMarkerData };\n\n\t\t\tthis._changedMarkers.set( markerName, buffered );\n\t\t} else {\n\t\t\tbuffered.newMarkerData = newMarkerData;\n\t\t}\n\n\t\tif ( buffered.oldMarkerData.range == null && newMarkerData.range == null ) {\n\t\t\t// The marker is going to be removed (`newMarkerData.range == null`) but it did not exist before the first buffered change\n\t\t\t// (`buffered.oldMarkerData.range == null`). In this case, do not keep the marker in buffer at all.\n\t\t\tthis._changedMarkers.delete( markerName );\n\t\t}\n\t}\n\n\t/**\n\t * Returns all markers that should be removed as a result of buffered changes.\n\t *\n\t * @returns Markers to remove. Each array item is an object containing the `name` and `range` properties.\n\t */\n\tpublic getMarkersToRemove(): Array<{ name: string; range: ModelRange }> {\n\t\tconst result = [];\n\n\t\tfor ( const [ name, change ] of this._changedMarkers ) {\n\t\t\tif ( change.oldMarkerData.range != null ) {\n\t\t\t\tresult.push( { name, range: change.oldMarkerData.range } );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns all markers which should be added as a result of buffered changes.\n\t *\n\t * @returns Markers to add. Each array item is an object containing the `name` and `range` properties.\n\t */\n\tpublic getMarkersToAdd(): Array<{ name: string; range: ModelRange }> {\n\t\tconst result = [];\n\n\t\tfor ( const [ name, change ] of this._changedMarkers ) {\n\t\t\tif ( change.newMarkerData.range != null ) {\n\t\t\t\tresult.push( { name, range: change.newMarkerData.range } );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns all markers which changed.\n\t */\n\tpublic getChangedMarkers(): Array<{\n\t\tname: string;\n\t\tdata: {\n\t\t\toldRange: ModelRange | null;\n\t\t\tnewRange: ModelRange | null;\n\t\t};\n\t}> {\n\t\treturn Array.from( this._changedMarkers ).map( ( [ name, change ] ) => (\n\t\t\t{\n\t\t\t\tname,\n\t\t\t\tdata: {\n\t\t\t\t\toldRange: change.oldMarkerData.range,\n\t\t\t\t\tnewRange: change.newMarkerData.range\n\t\t\t\t}\n\t\t\t}\n\t\t) );\n\t}\n\n\t/**\n\t * Checks whether some of the buffered changes affect the editor data.\n\t *\n\t * Types of changes which affect the editor data:\n\t *\n\t * * model structure changes,\n\t * * attribute changes,\n\t * * a root is added or detached,\n\t * * changes of markers which were defined as `affectsData`,\n\t * * changes of markers' `affectsData` property.\n\t */\n\tpublic hasDataChanges(): boolean {\n\t\tif ( this.getChanges().length ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( this._changedRoots.size > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor ( const { newMarkerData, oldMarkerData } of this._changedMarkers.values() ) {\n\t\t\tif ( newMarkerData.affectsData !== oldMarkerData.affectsData ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ( newMarkerData.affectsData ) {\n\t\t\t\tconst markerAdded = newMarkerData.range && !oldMarkerData.range;\n\t\t\t\tconst markerRemoved = !newMarkerData.range && oldMarkerData.range;\n\t\t\t\tconst markerChanged = newMarkerData.range && oldMarkerData.range && !newMarkerData.range.isEqual( oldMarkerData.range );\n\n\t\t\t\tif ( markerAdded || markerRemoved || markerChanged ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Calculates the diff between the old model tree state (the state before the first buffered operations since the last {@link #reset}\n\t * call) and the new model tree state (actual one). It should be called after all buffered operations are executed.\n\t *\n\t * The diff set is returned as an array of {@link module:engine/model/differ~DifferItem diff items}, each describing a change done\n\t * on the model. The items are sorted by the position on which the change happened. If a position\n\t * {@link module:engine/model/position~ModelPosition#isBefore is before} another one, it will be on an earlier index in the diff set.\n\t *\n\t * **Note**: Elements inside inserted element will not have a separate diff item, only the top most element change will be reported.\n\t *\n\t * Because calculating the diff is a costly operation, the result is cached. If no new operation was buffered since the\n\t * previous {@link #getChanges} call, the next call will return the cached value.\n\t *\n\t * @param options Additional options.\n\t * @param options.includeChangesInGraveyard If set to `true`, also changes that happened\n\t * in the graveyard root will be returned. By default, changes in the graveyard root are not returned.\n\t * @returns Diff between the old and the new model tree state.\n\t */\n\tpublic getChanges( options: { includeChangesInGraveyard?: boolean } = {} ): Array<DifferItem> {\n\t\t// If there are cached changes, just return them instead of calculating changes again.\n\t\tif ( this._cachedChanges ) {\n\t\t\tif ( options.includeChangesInGraveyard ) {\n\t\t\t\treturn this._cachedChangesWithGraveyard!.slice();\n\t\t\t} else {\n\t\t\t\treturn this._cachedChanges.slice();\n\t\t\t}\n\t\t}\n\n\t\t// Will contain returned results.\n\t\tlet diffSet: Array<DifferItem & DifferItemInternal> = [];\n\n\t\t// Check all changed elements/roots.\n\t\tfor ( const element of this._changesInElement.keys() ) {\n\t\t\t// Get changes inside this element/root and sort them.\n\t\t\tconst changes = this._changesInElement.get( element )!.sort( ( a, b ) => {\n\t\t\t\tif ( a.offset === b.offset ) {\n\t\t\t\t\tif ( a.type != b.type ) {\n\t\t\t\t\t\t// If there are multiple changes at the same position, \"remove\" change should be first.\n\t\t\t\t\t\t// If the order is different, for example, we would first add some nodes and then removed them\n\t\t\t\t\t\t// (instead of the nodes that we should remove).\n\t\t\t\t\t\treturn a.type == 'remove' ? -1 : 1;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn a.offset < b.offset ? -1 : 1;\n\t\t\t} );\n\n\t\t\t// Get children of this element before any change was applied on it.\n\t\t\tconst childrenBefore = this._elementChildrenSnapshots.get( element )!;\n\t\t\t// Get snapshot of current element's children.\n\t\t\tconst childrenAfter = _getChildrenSnapshots( element.getChildren() );\n\n\t\t\t// Generate diff instructions based on changes done in the element/root.\n\t\t\tconst diffInstructions = _generateDiffInstructionsFromChanges( childrenBefore.length, changes );\n\n\t\t\tlet i = 0; // Iterator in `childrenAfter` array -- iterates through current children of element.\n\t\t\tlet j = 0; // Iterator in `childrenBefore` array -- iterates through old children of element.\n\n\t\t\t// Process every action.\n\t\t\tfor ( const instruction of diffInstructions ) {\n\t\t\t\tif ( instruction === 'i' ) {\n\t\t\t\t\tconst action = this._getDiffActionForNode( childrenAfter[ i ].node, 'insert' );\n\t\t\t\t\tconst childSnapshotBefore = this._elementsSnapshots.get( childrenAfter[ i ].node );\n\t\t\t\t\tconst diffItem = this._getInsertDiff( element, i, action, childrenAfter[ i ], childSnapshotBefore );\n\n\t\t\t\t\tdiffSet.push( diffItem );\n\n\t\t\t\t\ti++;\n\t\t\t\t} else if ( instruction === 'r' ) {\n\t\t\t\t\tconst action = this._getDiffActionForNode( childrenBefore[ j ].node, 'remove' );\n\t\t\t\t\tconst diffItem = this._getRemoveDiff( element, i, action, childrenBefore[ j ] );\n\n\t\t\t\t\tdiffSet.push( diffItem );\n\n\t\t\t\t\tj++;\n\t\t\t\t} else if ( instruction === 'a' ) {\n\t\t\t\t\t// Take attributes from saved and current children.\n\t\t\t\t\tconst beforeAttributes = childrenBefore[ j ].attributes;\n\t\t\t\t\tconst afterAttributes = childrenAfter[ i ].attributes;\n\t\t\t\t\tlet range;\n\n\t\t\t\t\tif ( childrenAfter[ i ].name == '$text' ) {\n\t\t\t\t\t\trange = new ModelRange( ModelPosition._createAt( element, i ), ModelPosition._createAt( element, i + 1 ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst index = element.offsetToIndex( i );\n\t\t\t\t\t\trange = new ModelRange(\n\t\t\t\t\t\t\tModelPosition._createAt( element, i ),\n\t\t\t\t\t\t\tModelPosition._createAt( element.getChild( index )!, 0 )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Generate diff items for this change (there might be multiple attributes changed and\n\t\t\t\t\t// there is a single diff for each of them) and insert them into the diff set.\n\t\t\t\t\tconst diffItems = this._getAttributesDiff( range, beforeAttributes, afterAttributes );\n\n\t\t\t\t\tdiffSet.push( ...diffItems );\n\n\t\t\t\t\ti++;\n\t\t\t\t\tj++;\n\t\t\t\t} else {\n\t\t\t\t\t// `action` is 'equal'. Child not changed.\n\t\t\t\t\ti++;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Then, sort the changes by the position (change at position before other changes is first).\n\t\tdiffSet.sort( ( a, b ) => {\n\t\t\t// If the change is in different root, we don't care much, but we'd like to have all changes in given\n\t\t\t// root \"together\" in the array. So let's just sort them by the root name. It does not matter which root\n\t\t\t// will be processed first.\n\t\t\tif ( a.position!.root != b.position!.root ) {\n\t\t\t\treturn a.position!.root.rootName! < b.position!.root.rootName! ? -1 : 1;\n\t\t\t}\n\n\t\t\t// If change happens at the same position...\n\t\t\tif ( a.position!.isEqual( b.position! ) ) {\n\t\t\t\t// Keep chronological order of operations.\n\t\t\t\treturn a.changeCount! - b.changeCount!;\n\t\t\t}\n\n\t\t\t// If positions differ, position \"on the left\" should be earlier in the result.\n\t\t\treturn a.position!.isBefore( b.position! ) ? -1 : 1;\n\t\t} );\n\n\t\t// Glue together multiple changes (mostly on text nodes).\n\t\tfor ( let i = 1, prevIndex = 0; i < diffSet.length; i++ ) {\n\t\t\tconst prevDiff = diffSet[ prevIndex ];\n\t\t\tconst thisDiff = diffSet[ i ];\n\n\t\t\t// Glue remove changes if they happen on text on same position.\n\t\t\tconst isConsecutiveTextRemove =\n\t\t\t\tprevDiff.type == 'remove' && thisDiff.type == 'remove' &&\n\t\t\t\tprevDiff.name == '$text' && thisDiff.name == '$text' &&\n\t\t\t\tprevDiff.position.isEqual( thisDiff.position );\n\n\t\t\t// Glue insert changes if they happen on text on consecutive fragments.\n\t\t\tconst isConsecutiveTextAdd =\n\t\t\t\tprevDiff.type == 'insert' && thisDiff.type == 'insert' &&\n\t\t\t\tprevDiff.name == '$text' && thisDiff.name == '$text' &&\n\t\t\t\tprevDiff.position.parent == thisDiff.position.parent &&\n\t\t\t\tprevDiff.position.offset + prevDiff.length == thisDiff.position.offset;\n\n\t\t\t// Glue attribute changes if they happen on consecutive fragments and have same key, old value and new value.\n\t\t\tconst isConsecutiveAttributeChange =\n\t\t\t\tprevDiff.type == 'attribute' && thisDiff.type == 'attribute' &&\n\t\t\t\tprevDiff.position!.parent == thisDiff.position!.parent &&\n\t\t\t\tprevDiff.range.isFlat && thisDiff.range.isFlat &&\n\t\t\t\t( prevDiff.position!.offset + prevDiff.length! ) == thisDiff.position!.offset &&\n\t\t\t\tprevDiff.attributeKey == thisDiff.attributeKey &&\n\t\t\t\tprevDiff.attributeOldValue == thisDiff.attributeOldValue &&\n\t\t\t\tprevDiff.attributeNewValue == thisDiff.attributeNewValue;\n\n\t\t\tif ( isConsecutiveTextRemove || isConsecutiveTextAdd || isConsecutiveAttributeChange ) {\n\t\t\t\tprevDiff.length!++;\n\n\t\t\t\tif ( isConsecutiveAttributeChange ) {\n\t\t\t\t\t( prevDiff.range as any ).end = prevDiff.range.end.getShiftedBy( 1 );\n\t\t\t\t}\n\n\t\t\t\tdiffSet[ i ] = null as any;\n\t\t\t} else {\n\t\t\t\tprevIndex = i;\n\t\t\t}\n\t\t}\n\n\t\tdiffSet = diffSet.filter( v => v );\n\n\t\t// Remove `changeCount` property from diff items. It is used only for sorting and is internal thing.\n\t\tfor ( const item of diffSet ) {\n\t\t\tdelete item.changeCount;\n\n\t\t\tif ( item.type == 'attribute' ) {\n\t\t\t\tdelete item.position;\n\t\t\t\tdelete item.length;\n\t\t\t}\n\t\t}\n\n\t\tthis._changeCount = 0;\n\n\t\t// Cache changes.\n\t\tthis._cachedChangesWithGraveyard = diffSet;\n\t\tthis._cachedChanges = diffSet.filter( _changesInGraveyardFilter );\n\n\t\tif ( options.includeChangesInGraveyard ) {\n\t\t\treturn this._cachedChangesWithGraveyard.slice();\n\t\t} else {\n\t\t\treturn this._cachedChanges.slice();\n\t\t}\n\t}\n\n\t/**\n\t * Returns all roots that have changed (either were attached, or detached, or their attributes changed).\n\t *\n\t * @returns Diff between the old and the new roots state.\n\t */\n\tpublic getChangedRoots(): Array<DifferItemRoot> {\n\t\treturn Array.from( this._changedRoots.values() ).map( diffItem => {\n\t\t\tconst entry = { ...diffItem };\n\n\t\t\tif ( entry.state !== undefined ) {\n\t\t\t\t// The root was attached or detached -- do not return its attributes changes.\n\t\t\t\t// If the root was attached, it should be handled as a whole, together with its attributes, the same way as model nodes.\n\t\t\t\t// If the root was detached, its attributes should be discarded anyway.\n\t\t\t\t//\n\t\t\t\t// Keep in mind that filtering must happen on this stage (when retrieving changes). If filtering happens on-the-fly as\n\t\t\t\t// the attributes change, it may lead to incorrect situation, e.g.: detach root, change attribute, re-attach root.\n\t\t\t\t// In this case, attribute change cannot be filtered. After the root is re-attached, the attribute change must be kept.\n\t\t\t\tdelete entry.attributes;\n\t\t\t}\n\n\t\t\treturn entry;\n\t\t} );\n\t}\n\n\t/**\n\t * Returns a set of model items that were marked to get refreshed.\n\t */\n\tpublic getRefreshedItems(): Set<ModelItem> {\n\t\treturn new Set( this._refreshedItems );\n\t}\n\n\t/**\n\t * Resets `Differ`. Removes all buffered changes.\n\t */\n\tpublic reset(): void {\n\t\tthis._changesInElement.clear();\n\t\tthis._elementChildrenSnapshots.clear();\n\t\tthis._elementsSnapshots.clear();\n\t\tthis._elementState.clear();\n\t\tthis._changedMarkers.clear();\n\t\tthis._changedRoots.clear();\n\t\tthis._refreshedItems.clear();\n\t\tthis._cachedChanges = null;\n\t}\n\n\t/**\n\t * Marks the given `item` in differ to be \"refreshed\". It means that the item will be marked as removed and inserted\n\t * in the differ changes set, so it will be effectively re-converted when the differ changes are handled by a dispatcher.\n\t *\n\t * @internal\n\t * @param item Item to refresh.\n\t */\n\tpublic _refreshItem( item: ModelItem ): void {\n\t\tif ( this._isInInsertedElement( item.parent! ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._markRemove( item.parent!, item.startOffset!, item.offsetSize );\n\t\tthis._markInsert( item.parent!, item.startOffset!, item.offsetSize );\n\n\t\tthis._refreshedItems.add( item );\n\t\tthis._setElementState( item, 'refresh' );\n\n\t\tconst range = ModelRange._createOn( item );\n\n\t\tfor ( const marker of this._markerCollection.getMarkersIntersectingRange( range ) ) {\n\t\t\tconst markerData = marker.getData();\n\n\t\t\tthis.bufferMarkerChange( marker.name, markerData, markerData );\n\t\t}\n\n\t\t// Clear cache after each buffered operation as it is no longer valid.\n\t\tthis._cachedChanges = null;\n\t}\n\n\t/**\n\t * Buffers all the data related to given root like it was all just added to the editor.\n\t *\n\t * Following changes are buffered:\n\t *\n\t * * root is attached,\n\t * * all root content is inserted,\n\t * * all root attributes are added,\n\t * * all markers inside the root are added.\n\t *\n\t * @internal\n\t */\n\tpublic _bufferRootLoad( root: ModelRootElement ): void {\n\t\tif ( !root.isAttached() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._bufferRootStateChange( root.rootName, true );\n\t\tthis._markInsert( root, 0, root.maxOffset );\n\n\t\t// Buffering root attribute changes makes sense and is actually needed, even though we buffer root state change above.\n\t\t// Because the root state change is buffered, the root attributes changes are not returned by the differ.\n\t\t// But, if the root attribute is removed in the same change block, or the root is detached, then the differ results would be wrong.\n\t\t//\n\t\tfor ( const key of root.getAttributeKeys() ) {\n\t\t\tthis._bufferRootAttributeChange( root.rootName, key, null, root.getAttribute( key ) );\n\t\t}\n\n\t\tfor ( const marker of this._markerCollection ) {\n\t\t\tif ( marker.getRange().root == root ) {\n\t\t\t\tconst markerData = marker.getData();\n\n\t\t\t\tthis.bufferMarkerChange( marker.name, { ...markerData, range: null }, markerData );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Buffers the root state change after the root was attached or detached\n\t */\n\tprivate _bufferRootStateChange( rootName: string, isAttached: boolean ): void {\n\t\tif ( !this._changedRoots.has( rootName ) ) {\n\t\t\tthis._changedRoots.set( rootName, { name: rootName, state: isAttached ? 'attached' : 'detached' } );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst diffItem = this._changedRoots.get( rootName )!;\n\n\t\tif ( diffItem.state !== undefined ) {\n\t\t\t// Root `state` can only toggle between one of the values and no value. It cannot be any other way,\n\t\t\t// because if the root was originally attached it can only become detached. Then, if it is re-attached in the same batch of\n\t\t\t// changes, it gets back to \"no change\" (which means no value). Same if the root was originally detached.\n\t\t\tdelete diffItem.state;\n\n\t\t\tif ( diffItem.attributes === undefined ) {\n\t\t\t\t// If there is no `state` change and no `attributes` change, remove the entry.\n\t\t\t\tthis._changedRoots.delete( rootName );\n\t\t\t}\n\t\t} else {\n\t\t\tdiffItem.state = isAttached ? 'attached' : 'detached';\n\t\t}\n\t}\n\n\t/**\n\t * Buffers a root attribute change.\n\t */\n\tprivate _bufferRootAttributeChange( rootName: string, key: string, oldValue: unknown, newValue: unknown ): void {\n\t\tconst diffItem: DifferItemRoot = this._changedRoots.get( rootName ) || { name: rootName };\n\t\tconst attrs: Record<string, { oldValue: unknown; newValue: unknown }> = diffItem.attributes || {};\n\n\t\tif ( attrs[ key ] ) {\n\t\t\t// If this attribute or metadata was already changed earlier and is changed again, check to what value it is changed.\n\t\t\tconst attrEntry = attrs[ key ];\n\n\t\t\tif ( newValue === attrEntry.oldValue ) {\n\t\t\t\t// If it was changed back to the old value, remove the entry.\n\t\t\t\tdelete attrs[ key ];\n\t\t\t} else {\n\t\t\t\t// If it was changed to a different value, update the entry.\n\t\t\t\tattrEntry.newValue = newValue;\n\t\t\t}\n\t\t} else {\n\t\t\t// If this attribute or metadata was not set earlier, add an entry.\n\t\t\tattrs[ key ] = { oldValue, newValue };\n\t\t}\n\n\t\tif ( Object.entries( attrs ).length === 0 ) {\n\t\t\t// If attributes or metadata changes set became empty, remove it from the diff item.\n\t\t\tdelete diffItem.attributes;\n\n\t\t\tif ( diffItem.state === undefined ) {\n\t\t\t\t// If there is no `state` change and no `attributes` change, remove the entry.\n\t\t\t\tthis._changedRoots.delete( rootName );\n\t\t\t}\n\t\t} else {\n\t\t\t// Make sure that, if a new object in the structure was created, it gets set.\n\t\t\tdiffItem.attributes = attrs;\n\n\t\t\tthis._changedRoots.set( rootName, diffItem );\n\t\t}\n\t}\n\n\t/**\n\t * Saves and handles an insert change.\n\t */\n\tprivate _markInsert( parent: ModelElement | ModelDocumentFragment, offset: number, howMany: number ) {\n\t\tif ( parent.root.is( 'rootElement' ) && !parent.root._isLoaded ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst changeItem = { type: 'insert', offset, howMany, count: this._changeCount++ } as const;\n\n\t\tthis._markChange( parent, changeItem );\n\t}\n\n\t/**\n\t * Saves and handles a remove change.\n\t */\n\tprivate _markRemove( parent: ModelElement | ModelDocumentFragment, offset: number, howMany: number ) {\n\t\tif ( parent.root.is( 'rootElement' ) && !parent.root._isLoaded ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst changeItem = { type: 'remove', offset, howMany, count: this._changeCount++ } as const;\n\n\t\tthis._markChange( parent, changeItem );\n\n\t\tthis._removeAllNestedChanges( parent, offset, howMany );\n\t}\n\n\t/**\n\t * Saves and handles an attribute change.\n\t */\n\tprivate _markAttribute( item: ModelItem ): void {\n\t\tif ( item.root.is( 'rootElement' ) && !item.root._isLoaded ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst changeItem = { type: 'attribute', offset: item.startOffset!, howMany: item.offsetSize, count: this._changeCount++ } as const;\n\n\t\tthis._markChange( item.parent as ModelElement, changeItem );\n\t}\n\n\t/**\n\t * Saves and handles a model change.\n\t */\n\tprivate _markChange( parent: ModelElement | ModelDocumentFragment, changeItem: ChangeItem ): void {\n\t\t// First, make a snapshot of the parent and its children (it will be made only if it was not made before).\n\t\tthis._makeSnapshots( parent );\n\n\t\t// Then, get all changes that already were done on the element (empty array if this is the first change).\n\t\tconst changes = this._getChangesForElement( parent );\n\n\t\t// Then, look through all the changes, and transform them or the new change.\n\t\tthis._handleChange( changeItem, changes );\n\n\t\t// Add the new change.\n\t\tchanges.push( changeItem );\n\n\t\t// Remove incorrect changes. During transformation some change might be, for example, included in another.\n\t\t// In that case, the change will have `howMany` property set to `0` or less. We need to remove those changes.\n\t\tfor ( let i = 0; i < changes.length; i++ ) {\n\t\t\tif ( changes[ i ].howMany < 1 ) {\n\t\t\t\tchanges.splice( i, 1 );\n\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Tries to set given state for given item.\n\t *\n\t * This method does simple validation (it sets the state only for model elements, not for text proxy nodes). It also follows state\n\t * setting rules, that is, `'refresh'` cannot overwrite `'rename'`, and `'rename'` cannot overwrite `'move'`.\n\t */\n\tprivate _setElementState( node: ModelItem, state: 'refresh' | 'rename' | 'move' ) {\n\t\tif ( !node.is( 'element' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStatePriority = Differ._statesPriority.indexOf( this._elementState.get( node ) );\n\t\tconst newStatePriority = Differ._statesPriority.indexOf( state );\n\n\t\tif ( newStatePriority > currentStatePriority ) {\n\t\t\tthis._elementState.set( node, state );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a value for {@link ~DifferItemAction `action`} property for diff items returned by {@link ~Differ#getChanges}.\n\t * This method aims to return `'rename'` or `'refresh'` when it should, and `diffItemType` (\"default action\") in all other cases.\n\t *\n\t * It bases on a few factors:\n\t *\n\t * * for text nodes, the method always returns `diffItemType`,\n\t * * for newly inserted element, the method returns `diffItemType`,\n\t * * if {@link ~Differ#_elementState element state} was not recorded, the method returns `diffItemType`,\n\t * * if state was recorded, and it was `'move'` (default action), the method returns `diffItemType`,\n\t * * finally, if state was `'refresh'` or `'rename'`, the method returns the state value.\n\t */\n\tprivate _getDiffActionForNode( node: ModelNode, diffItemType: 'insert' | 'remove' ): DifferItemAction {\n\t\tif ( !node.is( 'element' ) ) {\n\t\t\t// Text node.\n\t\t\treturn diffItemType;\n\t\t}\n\n\t\tif ( !this._elementsSnapshots.has( node ) ) {\n\t\t\t// Newly inserted element.\n\t\t\treturn diffItemType;\n\t\t}\n\n\t\tconst state = this._elementState.get( node );\n\n\t\tif ( !state || state == 'move' ) {\n\t\t\treturn diffItemType;\n\t\t}\n\n\t\treturn state;\n\t}\n\n\t/**\n\t * Gets an array of changes that have already been saved for a given element.\n\t */\n\tprivate _getChangesForElement( element: ModelElement | ModelDocumentFragment ): Array<ChangeItem> {\n\t\tlet changes: Array<ChangeItem>;\n\n\t\tif ( this._changesInElement.has( element ) ) {\n\t\t\tchanges = this._changesInElement.get( element )!;\n\t\t} else {\n\t\t\tchanges = [];\n\n\t\t\tthis._changesInElement.set( element, changes );\n\t\t}\n\n\t\treturn changes;\n\t}\n\n\t/**\n\t * Creates and saves a snapshot for all children of the given element.\n\t */\n\tprivate _makeSnapshots( element: ModelElement | ModelDocumentFragment ): void {\n\t\tif ( this._elementChildrenSnapshots.has( element ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst childrenSnapshots = _getChildrenSnapshots( element.getChildren() );\n\n\t\tthis._elementChildrenSnapshots.set( element, childrenSnapshots );\n\n\t\tfor ( const snapshot of childrenSnapshots ) {\n\t\t\tthis._elementsSnapshots.set( snapshot.node, snapshot );\n\t\t}\n\t}\n\n\t/**\n\t * For a given newly saved change, compares it with a change already done on the element and modifies the incoming\n\t * change and/or the old change.\n\t *\n\t * @param inc Incoming (new) change.\n\t * @param changes An array containing all the changes done on that element.\n\t */\n\tprivate _handleChange( inc: ChangeItem, changes: Array<ChangeItem> ): void {\n\t\t// We need a helper variable that will store how many nodes are to be still handled for this change item.\n\t\t// `nodesToHandle` (how many nodes still need to be handled) and `howMany` (how many nodes were affected)\n\t\t// needs to be differentiated.\n\t\t//\n\t\t// This comes up when there are multiple changes that are affected by `inc` change item.\n\t\t//\n\t\t// For example: assume two insert changes: `{ offset: 2, howMany: 1 }` and `{ offset: 5, howMany: 1 }`.\n\t\t// Assume that `inc` change is remove `{ offset: 2, howMany: 2, nodesToHandle: 2 }`.\n\t\t//\n\t\t// Then, we:\n\t\t// - \"forget\" about first insert change (it is \"eaten\" by remove),\n\t\t// - because of that, at the end we will want to remove only one node (`nodesToHandle = 1`),\n\t\t// - but still we have to change offset of the second insert change from `5` to `3`!\n\t\t//\n\t\t// So, `howMany` does not change throughout items transformation and keeps information about how many nodes were affected,\n\t\t// while `nodesToHandle` means how many nodes need to be handled after the change item is transformed by other changes.\n\t\tinc.nodesToHandle = inc.howMany;\n\n\t\tfor ( const old of changes ) {\n\t\t\tconst incEnd = inc.offset + inc.howMany;\n\t\t\tconst oldEnd = old.offset + old.howMany;\n\n\t\t\tif ( inc.type == 'insert' ) {\n\t\t\t\tif ( old.type == 'insert' ) {\n\t\t\t\t\tif ( inc.offset <= old.offset ) {\n\t\t\t\t\t\told.offset += inc.howMany;\n\t\t\t\t\t} else if ( inc.offset < oldEnd ) {\n\t\t\t\t\t\told.howMany += inc.nodesToHandle;\n\t\t\t\t\t\tinc.nodesToHandle = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( old.type == 'remove' ) {\n\t\t\t\t\tif ( inc.offset < old.offset ) {\n\t\t\t\t\t\told.offset += inc.howMany;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( old.type == 'attribute' ) {\n\t\t\t\t\tif ( inc.offset <= old.offset ) {\n\t\t\t\t\t\told.offset += inc.howMany;\n\t\t\t\t\t} else if ( inc.offset < oldEnd ) {\n\t\t\t\t\t\t// This case is more complicated, because attribute change has to be split into two.\n\t\t\t\t\t\t// Example (assume that uppercase and lowercase letters mean different attributes):\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// initial state:\t\tabcxyz\n\t\t\t\t\t\t// attribute change:\taBCXYz\n\t\t\t\t\t\t// incoming insert:\t\taBCfooXYz\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Change ranges cannot intersect because each item has to be described exactly (it was either\n\t\t\t\t\t\t// not changed, inserted, removed, or its attribute was changed). That's why old attribute\n\t\t\t\t\t\t// change has to be split and both parts has to be handled separately from now on.\n\t\t\t\t\t\tconst howMany = old.howMany;\n\n\t\t\t\t\t\told.howMany = inc.offset - old.offset;\n\n\t\t\t\t\t\t// Add the second part of attribute change to the beginning of processed array so it won't\n\t\t\t\t\t\t// be processed again in this loop.\n\t\t\t\t\t\tchanges.unshift( {\n\t\t\t\t\t\t\ttype: 'attribute',\n\t\t\t\t\t\t\toffset: incEnd,\n\t\t\t\t\t\t\thowMany: howMany - old.howMany,\n\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( inc.type == 'remove' ) {\n\t\t\t\tif ( old.type == 'insert' ) {\n\t\t\t\t\tif ( incEnd <= old.offset ) {\n\t\t\t\t\t\told.offset -= inc.howMany;\n\t\t\t\t\t} else if ( incEnd <= oldEnd ) {\n\t\t\t\t\t\tif ( inc.offset < old.offset ) {\n\t\t\t\t\t\t\tconst intersectionLength = incEnd - old.offset;\n\n\t\t\t\t\t\t\told.offset = inc.offset;\n\n\t\t\t\t\t\t\told.howMany -= intersectionLength;\n\t\t\t\t\t\t\tinc.nodesToHandle -= intersectionLength;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\told.howMany -= inc.nodesToHandle;\n\t\t\t\t\t\t\tinc.nodesToHandle = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( inc.offset <= old.offset ) {\n\t\t\t\t\t\t\tinc.nodesToHandle -= old.howMany;\n\t\t\t\t\t\t\told.howMany = 0;\n\t\t\t\t\t\t} else if ( inc.offset < oldEnd ) {\n\t\t\t\t\t\t\tconst intersectionLength = oldEnd - inc.offset;\n\n\t\t\t\t\t\t\told.howMany -= intersectionLength;\n\t\t\t\t\t\t\tinc.nodesToHandle -= intersectionLength;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( old.type == 'remove' ) {\n\t\t\t\t\tif ( incEnd <= old.offset ) {\n\t\t\t\t\t\told.offset -= inc.howMany;\n\t\t\t\t\t} else if ( inc.offset < old.offset ) {\n\t\t\t\t\t\tinc.nodesToHandle += old.howMany;\n\t\t\t\t\t\told.howMany = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( old.type == 'attribute' ) {\n\t\t\t\t\tif ( incEnd <= old.offset ) {\n\t\t\t\t\t\told.offset -= inc.howMany;\n\t\t\t\t\t} else if ( inc.offset < old.offset ) {\n\t\t\t\t\t\tconst intersectionLength = incEnd - old.offset;\n\n\t\t\t\t\t\told.offset = inc.offset;\n\t\t\t\t\t\told.howMany -= intersectionLength;\n\t\t\t\t\t} else if ( inc.offset < oldEnd ) {\n\t\t\t\t\t\tif ( incEnd <= oldEnd ) {\n\t\t\t\t\t\t\t// On first sight in this case we don't need to split attribute operation into two.\n\t\t\t\t\t\t\t// However the changes set is later converted to actions (see `_generateActionsFromChanges`).\n\t\t\t\t\t\t\t// For that reason, no two changes may intersect.\n\t\t\t\t\t\t\t// So we cannot have an attribute change that \"contains\" remove change.\n\t\t\t\t\t\t\t// Attribute change needs to be split.\n\t\t\t\t\t\t\tconst howMany = old.howMany;\n\n\t\t\t\t\t\t\told.howMany = inc.offset - old.offset;\n\n\t\t\t\t\t\t\tconst howManyAfter = howMany - old.howMany - inc.nodesToHandle;\n\n\t\t\t\t\t\t\t// Add the second part of attribute change to the beginning of processed array so it won't\n\t\t\t\t\t\t\t// be processed again in this loop.\n\t\t\t\t\t\t\tchanges.unshift( {\n\t\t\t\t\t\t\t\ttype: 'attribute',\n\t\t\t\t\t\t\t\toffset: inc.offset,\n\t\t\t\t\t\t\t\thowMany: howManyAfter,\n\t\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\told.howMany -= oldEnd - inc.offset;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( inc.type == 'attribute' ) {\n\t\t\t\t// In case of attribute change, `howMany` should be kept same as `nodesToHandle`. It's not an error.\n\t\t\t\tif ( old.type == 'insert' ) {\n\t\t\t\t\tif ( inc.offset < old.offset && incEnd > old.offset ) {\n\t\t\t\t\t\tif ( incEnd > oldEnd ) {\n\t\t\t\t\t\t\t// This case is similar to a case described when incoming change was insert and old change was attribute.\n\t\t\t\t\t\t\t// See comment above.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// This time incoming change is attribute. We need to split incoming change in this case too.\n\t\t\t\t\t\t\t// However this time, the second part of the attribute change needs to be processed further\n\t\t\t\t\t\t\t// because there might be other changes that it collides with.\n\t\t\t\t\t\t\tconst attributePart = {\n\t\t\t\t\t\t\t\ttype: 'attribute',\n\t\t\t\t\t\t\t\toffset: oldEnd,\n\t\t\t\t\t\t\t\thowMany: incEnd - oldEnd,\n\t\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t\t} as const;\n\n\t\t\t\t\t\t\tthis._handleChange( attributePart, changes );\n\n\t\t\t\t\t\t\tchanges.push( attributePart );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinc.nodesToHandle = old.offset - inc.offset;\n\t\t\t\t\t\tinc.howMany = inc.nodesToHandle;\n\t\t\t\t\t} else if ( inc.offset >= old.offset && inc.offset < oldEnd ) {\n\t\t\t\t\t\tif ( incEnd > oldEnd ) {\n\t\t\t\t\t\t\tinc.nodesToHandle = incEnd - oldEnd;\n\t\t\t\t\t\t\tinc.offset = oldEnd;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinc.nodesToHandle = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( old.type == 'remove' ) {\n\t\t\t\t\t// This is a case when attribute change \"contains\" remove change.\n\t\t\t\t\t// The attribute change needs to be split into two because changes cannot intersect.\n\t\t\t\t\tif ( inc.offset < old.offset && incEnd > old.offset ) {\n\t\t\t\t\t\tconst attributePart = {\n\t\t\t\t\t\t\ttype: 'attribute',\n\t\t\t\t\t\t\toffset: old.offset,\n\t\t\t\t\t\t\thowMany: incEnd - old.offset,\n\t\t\t\t\t\t\tcount: this._changeCount++\n\t\t\t\t\t\t} as const;\n\n\t\t\t\t\t\tthis._handleChange( attributePart, changes );\n\n\t\t\t\t\t\tchanges.push( attributePart );\n\n\t\t\t\t\t\tinc.nodesToHandle = old.offset - inc.offset;\n\t\t\t\t\t\tinc.howMany = inc.nodesToHandle;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( old.type == 'attribute' ) {\n\t\t\t\t\t// There are only two conflicting scenarios possible here:\n\t\t\t\t\tif ( inc.offset >= old.offset && incEnd <= oldEnd ) {\n\t\t\t\t\t\t// `old` change includes `inc` change, or they are the same.\n\t\t\t\t\t\tinc.nodesToHandle = 0;\n\t\t\t\t\t\tinc.howMany = 0;\n\t\t\t\t\t\tinc.offset = 0;\n\t\t\t\t\t} else if ( inc.offset <= old.offset && incEnd >= oldEnd ) {\n\t\t\t\t\t\t// `inc` change includes `old` change.\n\t\t\t\t\t\told.howMany = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinc.howMany = inc.nodesToHandle;\n\t\tdelete inc.nodesToHandle;\n\t}\n\n\t/**\n\t * Returns an object with a single insert change description.\n\t *\n\t * @param parent The element in which the change happened.\n\t * @param offset The offset at which change happened.\n\t * @param action Further specifies what kind of action led to generating this change.\n\t * @param elementSnapshot Snapshot of the inserted node after changes.\n\t * @param elementSnapshotBefore Snapshot of the inserted node before changes.\n\t * @returns The diff item.\n\t */\n\tprivate _getInsertDiff(\n\t\tparent: ModelElement | ModelDocumentFragment,\n\t\toffset: number,\n\t\taction: DifferItemAction,\n\t\telementSnapshot: DifferSnapshot,\n\t\telementSnapshotBefore?: DifferSnapshot\n\t): DifferItemInsert & DifferItemInternal {\n\t\tconst diffItem: DifferItemInsert & DifferItemInternal = {\n\t\t\ttype: 'insert',\n\t\t\tposition: ModelPosition._createAt( parent, offset ),\n\t\t\tname: elementSnapshot.name,\n\t\t\tattributes: new Map( elementSnapshot.attributes ),\n\t\t\tlength: 1,\n\t\t\tchangeCount: this._changeCount++,\n\t\t\taction\n\t\t};\n\n\t\tif ( action != 'insert' && elementSnapshotBefore ) {\n\t\t\tdiffItem.before = {\n\t\t\t\tname: elementSnapshotBefore.name,\n\t\t\t\tattributes: new Map( elementSnapshotBefore.attributes )\n\t\t\t};\n\t\t}\n\n\t\treturn diffItem;\n\t}\n\n\t/**\n\t * Returns an object with a single remove change description.\n\t *\n\t * @param parent The element in which change happened.\n\t * @param offset The offset at which change happened.\n\t * @param action Further specifies what kind of action led to generating this change.\n\t * @param elementSnapshot The snapshot of the removed node before changes.\n\t * @returns The diff item.\n\t */\n\tprivate _getRemoveDiff(\n\t\tparent: ModelElement | ModelDocumentFragment,\n\t\toffset: number,\n\t\taction: DifferItemAction,\n\t\telementSnapshot: DifferSnapshot\n\t): DifferItemRemove & DifferItemInternal {\n\t\treturn {\n\t\t\ttype: 'remove',\n\t\t\taction,\n\t\t\tposition: ModelPosition._createAt( parent, offset ),\n\t\t\tname: elementSnapshot.name,\n\t\t\tattributes: new Map( elementSnapshot.attributes ),\n\t\t\tlength: 1,\n\t\t\tchangeCount: this._changeCount++\n\t\t};\n\t}\n\n\t/**\n\t * Returns an array of objects where each one is a single attribute change description.\n\t *\n\t * @param range The range where the change happened.\n\t * @param oldAttributes A map, map iterator or compatible object that contains attributes before the change.\n\t * @param newAttributes A map, map iterator or compatible object that contains attributes after the change.\n\t * @returns An array containing one or more diff items.\n\t */\n\tprivate _getAttributesDiff(\n\t\trange: ModelRange,\n\t\toldAttributes: Map<string, unknown>,\n\t\tnewAttributes: Map<string, unknown>\n\t): Array<DifferItemAttribute & DifferItemInternal> {\n\t\t// Results holder.\n\t\tconst diffs: Array<DifferItemAttribute & DifferItemInternal> = [];\n\n\t\t// Clone new attributes as we will be performing changes on this object.\n\t\tnewAttributes = new Map( newAttributes );\n\n\t\t// Look through old attributes.\n\t\tfor ( const [ key, oldValue ] of oldAttributes ) {\n\t\t\t// Check what is the new value of the attribute (or if it was removed).\n\t\t\tconst newValue = newAttributes.has( key ) ? newAttributes.get( key ) : null;\n\n\t\t\t// If values are different (or attribute was removed)...\n\t\t\tif ( newValue !== oldValue ) {\n\t\t\t\t// Add diff item.\n\t\t\t\tdiffs.push( {\n\t\t\t\t\ttype: 'attribute',\n\t\t\t\t\tposition: range.start,\n\t\t\t\t\trange: range.clone(),\n\t\t\t\t\tlength: 1,\n\t\t\t\t\tattributeKey: key,\n\t\t\t\t\tattributeOldValue: oldValue,\n\t\t\t\t\tattributeNewValue: newValue,\n\t\t\t\t\tchangeCount: this._changeCount++\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Prevent returning two diff items for the same change.\n\t\t\tnewAttributes.delete( key );\n\t\t}\n\n\t\t// Look through new attributes that weren't handled above.\n\t\tfor ( const [ key, newValue ] of newAttributes ) {\n\t\t\t// Each of them is a new attribute. Add diff item.\n\t\t\tdiffs.push( {\n\t\t\t\ttype: 'attribute',\n\t\t\t\tposition: range.start,\n\t\t\t\trange: range.clone(),\n\t\t\t\tlength: 1,\n\t\t\t\tattributeKey: key,\n\t\t\t\tattributeOldValue: null,\n\t\t\t\tattributeNewValue: newValue,\n\t\t\t\tchangeCount: this._changeCount++\n\t\t\t} );\n\t\t}\n\n\t\treturn diffs;\n\t}\n\n\t/**\n\t * Checks whether given element or any of its parents is an element that is buffered as an inserted element.\n\t */\n\tprivate _isInInsertedElement( element: ModelElement | ModelDocumentFragment ): boolean {\n\t\tconst parent = element.parent;\n\n\t\tif ( !parent ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst changes = this._changesInElement.get( parent );\n\t\tconst offset = element.startOffset;\n\n\t\tif ( changes ) {\n\t\t\tfor ( const change of changes ) {\n\t\t\t\tif ( change.type == 'insert' && offset! >= change.offset && offset! < change.offset + change.howMany ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this._isInInsertedElement( parent );\n\t}\n\n\t/**\n\t * Removes deeply all buffered changes that are registered in elements from range specified by `parent`, `offset`\n\t * and `howMany`.\n\t */\n\tprivate _removeAllNestedChanges( parent: ModelElement | ModelDocumentFragment, offset: number, howMany: number ) {\n\t\tconst range = new ModelRange( ModelPosition._createAt( parent, offset ), ModelPosition._createAt( parent, offset + howMany ) );\n\n\t\tfor ( const item of range.getItems( { shallow: true } ) ) {\n\t\t\tif ( item.is( 'element' ) ) {\n\t\t\t\tthis._changesInElement.delete( item );\n\t\t\t\tthis._removeAllNestedChanges( item, 0, item.maxOffset );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Further specifies what kind of action led to generating a change:\n *\n * * `'insert'` if element was inserted,\n * * `'remove'` if element was removed,\n * * `'rename'` if element got renamed (e.g. `writer.rename()`),\n * * `'refresh'` if element got refreshed (e.g. `model.editing.reconvertItem()`).\n */\nexport type DifferItemAction = 'insert' | 'remove' | 'rename' | 'refresh';\n\ninterface ChangeItem {\n\ttype: 'insert' | 'remove' | 'attribute';\n\toffset: number;\n\thowMany: number;\n\tcount: number;\n\tnodesToHandle?: number;\n\taction?: DifferItemAction;\n}\n\n/**\n * Returns a snapshot for the specified child node. Text node snapshots have the `name` property set to `$text`.\n */\nfunction _getSingleNodeSnapshot( node: ModelNode | ModelElement ): DifferSnapshot {\n\treturn\t{\n\t\tnode,\n\t\tname: node.is( '$text' ) ? '$text' : ( node as ModelElement ).name,\n\t\tattributes: new Map( node.getAttributes() )\n\t};\n}\n\n/**\n * Returns an array that is a copy of passed child list with the exception that text nodes are split to one or more\n * objects, each representing one character and attributes set on that character.\n */\nfunction _getChildrenSnapshots( children: Iterable<ModelNode> ): Array<DifferSnapshot> {\n\tconst snapshots: Array<DifferSnapshot> = [];\n\n\tfor ( const child of children ) {\n\t\tif ( child.is( '$text' ) ) {\n\t\t\tfor ( let i = 0; i < child.data.length; ++i ) {\n\t\t\t\tsnapshots.push( _getSingleNodeSnapshot( child ) );\n\t\t\t}\n\t\t} else {\n\t\t\tsnapshots.push( _getSingleNodeSnapshot( child ) );\n\t\t}\n\t}\n\n\treturn snapshots;\n}\n\n/**\n * Generates array of diff instructions for given changes set.\n *\n * Generated actions are:\n *\n * - 'e' for 'equal' - when item at that position did not change,\n * - 'i' for 'insert' - when item at that position was inserted,\n * - 'r' for 'remove' - when item at that position was removed,\n * - 'a' for 'attribute' - when item at that position has it attributes changed.\n *\n * Example (assume that uppercase letters have bold attribute, compare with function code):\n *\n * children before:\tfooBAR\n * children after:\tfoxybAR\n *\n * changes: type: remove, offset: 1, howMany: 1\n *\t\t\ttype: insert, offset: 2, howMany: 2\n *\t\t\ttype: attribute, offset: 4, howMany: 1\n *\n * Expected actions: equal (f), remove (o), equal (o), insert (x), insert (y), attribute (b), equal (A), equal (R)\n *\n * Steps taken by the script:\n *\n * 1. change = \"type: remove, offset: 1, howMany: 1\"; offset = 0; oldChildrenHandled = 0\n *    1.1 between this change and the beginning is one not-changed node, fill with one equal action, one old child has been handled\n *    1.2 this change removes one node, add one remove action\n *    1.3 change last visited `offset` to 1\n *    1.4 since an old child has been removed, one more old child has been handled\n *    1.5 actions at this point are: equal, remove\n *\n * 2. change = \"type: insert, offset: 2, howMany: 2\"; offset = 1; oldChildrenHandled = 2\n *    2.1 between this change and previous change is one not-changed node, add equal action, another one old children has been handled\n *    2.2 this change inserts two nodes, add two insert actions\n *    2.3 change last visited offset to the end of the inserted range, that is 4\n *    2.4 actions at this point are: equal, remove, equal, insert, insert\n *\n * 3. change = \"type: attribute, offset: 4, howMany: 1\"; offset = 4, oldChildrenHandled = 3\n *    3.1 between this change and previous change are no not-changed nodes\n *    3.2 this change changes one node, add one attribute action\n *    3.3 change last visited `offset` to the end of change range, that is 5\n *    3.4 since an old child has been changed, one more old child has been handled\n *    3.5 actions at this point are: equal, remove, equal, insert, insert, attribute\n *\n * 4. after loop oldChildrenHandled = 4, oldChildrenLength = 6 (fooBAR is 6 characters)\n *    4.1 fill up with two equal actions\n *\n * The result actions are: equal, remove, equal, insert, insert, attribute, equal, equal.\n */\nfunction _generateDiffInstructionsFromChanges( oldChildrenLength: number, changes: Array<ChangeItem> ) {\n\tconst diff: Array<string> = [];\n\n\tlet offset = 0;\n\tlet oldChildrenHandled = 0;\n\n\t// Go through all buffered changes.\n\tfor ( const change of changes ) {\n\t\t// First, fill \"holes\" between changes with \"equal\" actions.\n\t\tif ( change.offset > offset ) {\n\t\t\tfor ( let i = 0; i < change.offset - offset; i++ ) {\n\t\t\t\tdiff.push( 'e' );\n\t\t\t}\n\n\t\t\toldChildrenHandled += change.offset - offset;\n\t\t}\n\n\t\t// Then, fill up actions accordingly to change type.\n\t\tif ( change.type == 'insert' ) {\n\t\t\tfor ( let i = 0; i < change.howMany; i++ ) {\n\t\t\t\tdiff.push( 'i' );\n\t\t\t}\n\n\t\t\t// The last handled offset is after inserted range.\n\t\t\toffset = change.offset + change.howMany;\n\t\t} else if ( change.type == 'remove' ) {\n\t\t\tfor ( let i = 0; i < change.howMany; i++ ) {\n\t\t\t\tdiff.push( 'r' );\n\t\t\t}\n\n\t\t\t// The last handled offset is at the position where the nodes were removed.\n\t\t\toffset = change.offset;\n\t\t\t// We removed `howMany` old nodes, update `oldChildrenHandled`.\n\t\t\toldChildrenHandled += change.howMany;\n\t\t} else {\n\t\t\t// Total maximum amount of arguments that can be passed to `Array.prototype.push` may be limited so we need to\n\t\t\t// add them manually one by one to avoid this limit. However loop might be a bit slower than `push` method on\n\t\t\t// smaller changesets so we need to decide which method to use based on the size of the change.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/16819\n\t\t\tif ( change.howMany > 1500 ) {\n\t\t\t\tfor ( let i = 0; i < change.howMany; i++ ) {\n\t\t\t\t\tdiff.push( 'a' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdiff.push( ...'a'.repeat( change.howMany ).split( '' ) );\n\t\t\t}\n\n\t\t\t// The last handled offset is at the position after the changed range.\n\t\t\toffset = change.offset + change.howMany;\n\t\t\t// We changed `howMany` old nodes, update `oldChildrenHandled`.\n\t\t\toldChildrenHandled += change.howMany;\n\t\t}\n\t}\n\n\t// Fill \"equal\" actions at the end of actions set. Use `oldChildrenHandled` to see how many children\n\t// has not been changed / removed at the end of their parent.\n\tif ( oldChildrenHandled < oldChildrenLength ) {\n\t\tfor ( let i = 0; i < oldChildrenLength - oldChildrenHandled - offset; i++ ) {\n\t\t\tdiff.push( 'e' );\n\t\t}\n\t}\n\n\treturn diff;\n}\n\n/**\n * Filter callback for `Array.filter` that filters out change entries that are in graveyard.\n */\nfunction _changesInGraveyardFilter( entry: DifferItem ) {\n\tconst posInGy = 'position' in entry && entry.position!.root.rootName == '$graveyard';\n\tconst rangeInGy = 'range' in entry && entry.range.root.rootName == '$graveyard';\n\n\treturn !posInGy && !rangeInGy;\n}\n\n/**\n * A snapshot is representing state of a given element before the first change was applied on that element.\n *\n * @internal\n */\nexport interface DifferSnapshot {\n\n\t/**\n\t * Node for which was snapshot was made.\n\t */\n\tnode: ModelNode;\n\n\t/**\n\t * Name of the element at the time when the snapshot was made. For text node snapshots, it is set to `'$text'`.\n\t */\n\tname: string;\n\n\t/**\n\t * Attributes of the node at the time when the snapshot was made.\n\t */\n\tattributes: Map<string, unknown>;\n}\n\n/**\n * The single diff item.\n *\n * Could be one of:\n *\n * * {@link module:engine/model/differ~DifferItemInsert `DifferItemInsert`},\n * * {@link module:engine/model/differ~DifferItemRemove `DifferItemRemove`},\n * * {@link module:engine/model/differ~DifferItemAttribute `DifferItemAttribute`}.\n */\nexport type DifferItem = DifferItemInsert | DifferItemRemove | DifferItemAttribute;\n\n/**\n * A single diff item for inserted nodes.\n */\nexport interface DifferItemInsert {\n\n\t/**\n\t * The type of diff item.\n\t */\n\ttype: 'insert';\n\n\t/**\n\t * Further specifies what kind of action led to generating this change.\n\t *\n\t * The action is set in relation to the document state before any change. It means that, for example, if an element was added and\n\t * then renamed (during the same {@link module:engine/model/batch~Batch batch}), the action will be set to `'insert'`, because when\n\t * compared to the document state before changes, a new element was inserted, and the renaming does not matter from this point of view.\n\t */\n\taction: DifferItemAction;\n\n\t/**\n\t * The name of the inserted elements or `'$text'` for a text node.\n\t */\n\tname: string;\n\n\t/**\n\t * Map of attributes of the inserted element.\n\t */\n\tattributes: Map<string, unknown>;\n\n\t/**\n\t * The position where the node was inserted.\n\t */\n\tposition: ModelPosition;\n\n\t/**\n\t * The length of an inserted text node. For elements, it is always 1 as each inserted element is counted as a one.\n\t */\n\tlength: number;\n\n\t/**\n\t * Holds information about the element state before all changes happened.\n\t *\n\t * For example, when `<paragraph textAlign=\"right\">` was changed to `<codeBlock language=\"plaintext\">`,\n\t * `before.name` will be equal to `'paragraph'` and `before.attributes` map will have one entry: `'textAlign' -> 'right'`.\n\t *\n\t * The property is available only if the insertion change was due to element rename or refresh (when `action` property is `'rename'`\n\t * or `'refresh'`). As such, `before` property is never available for text node changes.\n\t */\n\tbefore?: {\n\n\t\t/**\n\t\t * The name of the inserted element before all changes.\n\t\t */\n\t\tname: string;\n\n\t\t/**\n\t\t * Map of the attributes of the inserted element before all changes.\n\t\t */\n\t\tattributes: Map<string, unknown>;\n\t};\n}\n\n/**\n * A single diff item for re-inserted nodes.\n */\nexport interface DifferItemReinsert {\n\n\t/**\n\t * The type of diff item.\n\t */\n\ttype: 'reinsert';\n\n\t/**\n\t * The name of the re-inserted elements or `'$text'` for a text node.\n\t */\n\tname: string;\n\n\t/**\n\t * The position where the node was reinserted.\n\t */\n\tposition: ModelPosition;\n\n\t/**\n\t * The length of a re-inserted text node. For elements, it is always 1 as each re-inserted element is counted as a one.\n\t */\n\tlength: number;\n}\n\n/**\n * A single diff item for removed nodes.\n */\nexport interface DifferItemRemove {\n\n\t/**\n\t * The type of diff item.\n\t */\n\ttype: 'remove';\n\n\t/**\n\t * Further specifies what kind of action led to generating this change.\n\t *\n\t * The action is set in relation to the document state before any change. It means that, for example, if an element was renamed and\n\t * then removed (during the same {@link module:engine/model/batch~Batch batch}), the action will be set to `'remove'`, because when\n\t * compared to the document state before changes, the element was removed, and it does not matter that it was also renamed at one point.\n\t */\n\taction: DifferItemAction;\n\n\t/**\n\t * The name of the removed element or `'$text'` for a text node.\n\t */\n\tname: string;\n\n\t/**\n\t * Map of attributes that were set on the item while it was removed.\n\t */\n\tattributes: Map<string, unknown>;\n\n\t/**\n\t * The position where the node was removed.\n\t */\n\tposition: ModelPosition;\n\n\t/**\n\t * The length of a removed text node. For elements, it is always 1, as each removed element is counted as a one.\n\t */\n\tlength: number;\n}\n\n/**\n * A single diff item for attribute change.\n */\nexport interface DifferItemAttribute {\n\n\t/**\n\t * The type of diff item.\n\t */\n\ttype: 'attribute';\n\n\t/**\n\t * The name of the changed attribute.\n\t */\n\tattributeKey: string;\n\n\t/**\n\t * An attribute previous value (before change).\n\t */\n\tattributeOldValue: unknown;\n\n\t/**\n\t * An attribute new value (after change).\n\t */\n\tattributeNewValue: unknown;\n\n\t/**\n\t * The range where the change happened.\n\t */\n\trange: ModelRange;\n}\n\n/**\n * A single diff item for a changed root.\n */\nexport interface DifferItemRoot {\n\n\t/**\n\t * Name of the changed root.\n\t */\n\tname: string;\n\n\t/**\n\t * Set accordingly if the root got attached or detached. Otherwise, not set.\n\t */\n\tstate?: 'attached' | 'detached';\n\n\t/**\n\t * Keeps all attribute changes that happened on the root.\n\t *\n\t * The keys are keys of the changed attributes. The values are objects containing the attribute value before the change\n\t * (`oldValue`) and after the change (`newValue`).\n\t *\n\t * Note, that if the root state changed (`state` is set), then `attributes` property will not be set. All attributes should be\n\t * handled together with the root being attached or detached.\n\t */\n\tattributes?: Record<string, { oldValue: unknown; newValue: unknown }>;\n}\n\ninterface DifferItemInternal {\n\tchangeCount?: number;\n\tposition?: ModelPosition;\n\tlength?: number;\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/**\n * @module engine/model/history\n */\n\nimport { type Operation } from './operation/operation.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\n/**\n * `History` keeps the track of all the operations applied to the {@link module:engine/model/document~ModelDocument document}.\n */\nexport class History {\n\t/**\n\t * Operations added to the history.\n\t */\n\tprivate _operations: Array<Operation> = [];\n\n\t/**\n\t * Holds an information which {@link module:engine/model/operation/operation~Operation operation} undoes which\n\t * {@link module:engine/model/operation/operation~Operation operation}.\n\t *\n\t * Keys of the map are \"undoing operations\", that is operations that undone some other operations. For each key, the\n\t * value is an operation that has been undone by the \"undoing operation\".\n\t */\n\tprivate _undoPairs: Map<Operation, Operation> = new Map();\n\n\t/**\n\t * Holds all undone operations.\n\t */\n\tprivate _undoneOperations: Set<Operation> = new Set();\n\n\t/**\n\t * A map that allows retrieving the operations fast based on the given base version.\n\t */\n\tprivate _baseVersionToOperationIndex: Map<number, number> = new Map();\n\n\t/**\n\t * The history version.\n\t */\n\tprivate _version: number = 0;\n\n\t/**\n\t * The gap pairs kept in the <from,to> format.\n\t *\n\t * Anytime the `history.version` is set to a version larger than `history.version + 1`,\n\t * a new <lastHistoryVersion, newHistoryVersion> entry is added to the map.\n\t */\n\tprivate _gaps: Map<number, number> = new Map();\n\n\t/**\n\t * The version of the last operation in the history.\n\t *\n\t * The history version is incremented automatically when a new operation is added to the history.\n\t * Setting the version manually should be done only in rare circumstances when a gap is planned\n\t * between history versions. When doing so, a gap will be created and the history will accept adding\n\t * an operation with base version equal to the new history version.\n\t */\n\tpublic get version(): number {\n\t\treturn this._version;\n\t}\n\n\tpublic set version( version: number ) {\n\t\t// Store a gap if there are some operations already in the history and the\n\t\t// new version does not increment the latest one.\n\t\tif ( this._operations.length && version > this._version + 1 ) {\n\t\t\tthis._gaps.set( this._version, version );\n\t\t}\n\n\t\tthis._version = version;\n\t}\n\n\t/**\n\t * The last history operation.\n\t */\n\tpublic get lastOperation(): Operation | undefined {\n\t\treturn this._operations[ this._operations.length - 1 ];\n\t}\n\n\t/**\n\t * Adds an operation to the history and increments the history version.\n\t *\n\t * The operation's base version should be equal to the history version. Otherwise an error is thrown.\n\t */\n\tpublic addOperation( operation: Operation ): void {\n\t\tif ( operation.baseVersion !== this.version ) {\n\t\t\t/**\n\t\t\t * Only operations with matching versions can be added to the history.\n\t\t\t *\n\t\t\t * @error model-document-history-addoperation-incorrect-version\n\t\t\t * @param {module:engine/model/operation/operation~Operation} operation The current operation.\n\t\t\t * @param {number} historyVersion The current document history version.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-document-history-addoperation-incorrect-version', this, {\n\t\t\t\toperation,\n\t\t\t\thistoryVersion: this.version\n\t\t\t} );\n\t\t}\n\n\t\tthis._operations.push( operation );\n\t\tthis._version++;\n\n\t\tthis._baseVersionToOperationIndex.set( operation.baseVersion, this._operations.length - 1 );\n\t}\n\n\t/**\n\t * Returns operations from the given range of operation base versions that were added to the history.\n\t *\n\t * Note that there may be gaps in operations base versions.\n\t *\n\t * @param fromBaseVersion Base version from which operations should be returned (inclusive).\n\t * @param toBaseVersion Base version up to which operations should be returned (exclusive).\n     * @returns History operations for the given range, in chronological order.\n\t */\n\tpublic getOperations( fromBaseVersion?: number, toBaseVersion: number = this.version ): Array<Operation> {\n\t\t// When there is no operation in the history, return an empty array.\n\t\t// After that we can be sure that `firstOperation`, `lastOperation` are not nullish.\n\t\tif ( !this._operations.length ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst firstOperation = this._operations[ 0 ];\n\n\t\tif ( fromBaseVersion === undefined ) {\n\t\t\tfromBaseVersion = firstOperation.baseVersion!;\n\t\t}\n\n\t\t// Change exclusive `toBaseVersion` to inclusive, so it will refer to the actual index.\n\t\t// Thanks to that mapping from base versions to operation indexes are possible.\n\t\tlet inclusiveTo = toBaseVersion - 1;\n\n\t\t// Check if \"from\" or \"to\" point to a gap between versions.\n\t\t// If yes, then change the incorrect position to the proper side of the gap.\n\t\t// Thanks to it, it will be possible to get index of the operation.\n\t\tfor ( const [ gapFrom, gapTo ] of this._gaps ) {\n\t\t\tif ( fromBaseVersion > gapFrom && fromBaseVersion < gapTo ) {\n\t\t\t\tfromBaseVersion = gapTo;\n\t\t\t}\n\n\t\t\tif ( inclusiveTo > gapFrom && inclusiveTo < gapTo ) {\n\t\t\t\tinclusiveTo = gapFrom - 1;\n\t\t\t}\n\t\t}\n\n\t\t// If the whole range is outside of the operation versions, then return an empty array.\n\t\tif ( inclusiveTo < firstOperation.baseVersion! || fromBaseVersion > this.lastOperation!.baseVersion! ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet fromIndex = this._baseVersionToOperationIndex.get( fromBaseVersion );\n\n\t\t// If the range starts before the first operation, then use the first operation as the range's start.\n\t\tif ( fromIndex === undefined ) {\n\t\t\tfromIndex = 0;\n\t\t}\n\n\t\tlet toIndex = this._baseVersionToOperationIndex.get( inclusiveTo );\n\n\t\t// If the range ends after the last operation, then use the last operation as the range's end.\n\t\tif ( toIndex === undefined ) {\n\t\t\ttoIndex = this._operations.length - 1;\n\t\t}\n\n\t\t// Return the part of the history operations based on the calculated start index and end index.\n\t\treturn this._operations.slice(\n\t\t\tfromIndex,\n\n\t\t\t// The `toIndex` should be included in the returned operations, so add `1`.\n\t\t\ttoIndex + 1\n\t\t);\n\t}\n\n\t/**\n\t * Returns operation from the history that bases on given `baseVersion`.\n\t *\n\t * @param baseVersion Base version of the operation to get.\n\t * @returns Operation with given base version or `undefined` if there is no such operation in history.\n\t */\n\tpublic getOperation( baseVersion: number ): Operation | undefined {\n\t\tconst operationIndex = this._baseVersionToOperationIndex.get( baseVersion );\n\n\t\tif ( operationIndex === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._operations[ operationIndex ];\n\t}\n\n\t/**\n\t * Marks in history that one operation is an operation that is undoing the other operation. By marking operation this way,\n\t * history is keeping more context information about operations, which helps in operational transformation.\n\t *\n\t * @param undoneOperation Operation which is undone by `undoingOperation`.\n\t * @param undoingOperation Operation which undoes `undoneOperation`.\n\t */\n\tpublic setOperationAsUndone( undoneOperation: Operation, undoingOperation: Operation ): void {\n\t\tthis._undoPairs.set( undoingOperation, undoneOperation );\n\t\tthis._undoneOperations.add( undoneOperation );\n\t}\n\n\t/**\n\t * Checks whether given `operation` is undoing any other operation.\n\t *\n\t * @param operation Operation to check.\n\t * @returns `true` if given `operation` is undoing any other operation, `false` otherwise.\n\t */\n\tpublic isUndoingOperation( operation: Operation ): boolean {\n\t\treturn this._undoPairs.has( operation );\n\t}\n\n\t/**\n\t * Checks whether given `operation` has been undone by any other operation.\n\t *\n\t * @param operation Operation to check.\n\t * @returns `true` if given `operation` has been undone any other operation, `false` otherwise.\n\t */\n\tpublic isUndoneOperation( operation: Operation ): boolean {\n\t\treturn this._undoneOperations.has( operation );\n\t}\n\n\t/**\n\t * For given `undoingOperation`, returns the operation which has been undone by it.\n\t *\n\t * @returns Operation that has been undone by given `undoingOperation` or `undefined`\n\t * if given `undoingOperation` is not undoing any other operation.\n\t */\n\tpublic getUndoneOperation( undoingOperation: Operation ): Operation | undefined {\n\t\treturn this._undoPairs.get( undoingOperation );\n\t}\n\n\t/**\n\t * Resets the history of operations.\n\t */\n\tpublic reset(): void {\n\t\tthis._version = 0;\n\t\tthis._undoPairs = new Map();\n\t\tthis._operations = [];\n\t\tthis._undoneOperations = new Set();\n\t\tthis._gaps = new Map();\n\t\tthis._baseVersionToOperationIndex = new Map();\n\t}\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/**\n * @module engine/model/rootelement\n */\n\nimport { ModelElement } from './element.js';\n\nimport { type ModelDocument } from './document.js';\n\n/**\n * Type of {@link module:engine/model/element~ModelElement} that is a root of a model tree.\n */\nexport class ModelRootElement extends ModelElement {\n\t/**\n\t * Unique root name used to identify this root element by {@link module:engine/model/document~ModelDocument}.\n\t */\n\tpublic override readonly rootName: string;\n\n\t/**\n\t * Document that is an owner of this root.\n\t */\n\tprivate readonly _document: ModelDocument;\n\n\t/**\n\t * @internal\n\t */\n\tpublic _isAttached = true;\n\n\t/**\n\t * Informs if the root element is loaded (default).\n\t *\n\t * @internal\n\t */\n\tpublic _isLoaded = true;\n\n\t/**\n\t * Creates root element.\n\t *\n\t * @param document Document that is an owner of this root.\n\t * @param name Node name.\n\t * @param rootName Unique root name used to identify this root element by {@link module:engine/model/document~ModelDocument}.\n\t */\n\tconstructor( document: ModelDocument, name: string, rootName: string = 'main' ) {\n\t\tsuper( name );\n\n\t\tthis._document = document;\n\t\tthis.rootName = rootName;\n\t}\n\n\t/**\n\t * {@link module:engine/model/document~ModelDocument Document} that owns this root element.\n\t */\n\tpublic override get document(): ModelDocument {\n\t\treturn this._document;\n\t}\n\n\t/**\n\t * Informs if the root element is currently attached to the document, or not.\n\t *\n\t * A detached root is equivalent to being removed and cannot contain any children or markers.\n\t *\n\t * By default, a newly added root is attached. It can be detached using\n\t * {@link module:engine/model/writer~ModelWriter#detachRoot `Writer#detachRoot`}. A detached root can be re-attached again using\n\t * {@link module:engine/model/writer~ModelWriter#addRoot `Writer#addRoot`}.\n\t */\n\tpublic override isAttached(): boolean {\n\t\treturn this._isAttached;\n\t}\n\n\t/**\n\t * Converts `RootElement` instance to `string` containing its name.\n\t *\n\t * @returns `RootElement` instance converted to `string`.\n\t */\n\tpublic override toJSON(): unknown {\n\t\treturn this.rootName;\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \treturn this.rootName;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public override log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelRootElement: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelRootElement.prototype.is = function( this: ModelRootElement, type: string, name?: string ): boolean {\n\tif ( !name ) {\n\t\treturn type === 'rootElement' || type === 'model:rootElement' ||\n\t\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\t\ttype === 'element' || type === 'model:element' ||\n\t\t\ttype === 'node' || type === 'model:node';\n\t}\n\n\treturn name === this.name && (\n\t\ttype === 'rootElement' || type === 'model:rootElement' ||\n\t\t// From super.is(). This is highly utilised method and cannot call super. See https://github.com/ckeditor/ckeditor5/issues/6529.\n\t\ttype === 'element' || type === 'model:element'\n\t);\n} as any;\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/**\n * @module engine/model/document\n */\n\nimport { Differ } from './differ.js';\nimport { ModelDocumentSelection } from './documentselection.js';\nimport { History } from './history.js';\nimport { ModelRootElement } from './rootelement.js';\n\nimport type { ModelSelectionChangeEvent } from './selection.js';\nimport type { Model, ModelApplyOperationEvent } from './model.js';\nimport type { MarkerCollectionUpdateEvent, MarkerChangeEvent } from './markercollection.js';\nimport { type Batch } from './batch.js';\nimport { type ModelPosition } from './position.js';\nimport { type ModelRange } from './range.js';\nimport { type ModelWriter } from './writer.js';\n\nimport {\n\tCKEditorError,\n\tCollection,\n\tEmitterMixin,\n\tisInsideSurrogatePair,\n\tisInsideCombinedSymbol,\n\ttype EmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { clone } from 'es-toolkit/compat';\n\n// @if CK_DEBUG_ENGINE // import { logDocument } from '../dev-utils/utils.js';\n\nconst graveyardName = '$graveyard';\n\nconst ModelDocumentBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * Data model's document. It contains the model's structure, its selection and the history of changes.\n *\n * Read more about working with the model in\n * {@glink framework/architecture/editing-engine#model introduction to the the editing engine's architecture}.\n *\n * Usually, the document contains just one {@link module:engine/model/document~ModelDocument#roots root element}, so\n * you can retrieve it by just calling {@link module:engine/model/document~ModelDocument#getRoot} without specifying its name:\n *\n * ```ts\n * model.document.getRoot(); // -> returns the main root\n * ```\n *\n * However, the document may contain multiple roots – e.g. when the editor has multiple editable areas\n * (e.g. a title and a body of a message).\n */\nexport class ModelDocument extends ModelDocumentBase {\n\t/**\n\t * The {@link module:engine/model/model~Model model} that the document is a part of.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * The document's history.\n\t */\n\tpublic readonly history: History;\n\n\t/**\n\t * The selection in this document.\n\t */\n\tpublic readonly selection: ModelDocumentSelection;\n\n\t/**\n\t * A list of roots that are owned and managed by this document. Use {@link #createRoot}, {@link #getRoot} and\n\t * {@link #getRootNames} to manipulate it.\n\t */\n\tpublic readonly roots: Collection<ModelRootElement>;\n\n\t/**\n\t * The model differ object. Its role is to buffer changes done on the model document and then calculate a diff of those changes.\n\t */\n\tpublic readonly differ: Differ;\n\n\t/**\n\t * Defines whether the document is in a read-only mode.\n\t *\n\t * The user should not be able to change the data of a document that is read-only.\n\t *\n\t * @readonly\n\t */\n\tpublic isReadOnly: boolean;\n\n\t/**\n\t * Post-fixer callbacks registered to the model document.\n\t */\n\tprivate readonly _postFixers: Set<ModelPostFixer>;\n\n\t/**\n\t * A flag that indicates whether the selection has changed since last change block.\n\t */\n\tprivate _hasSelectionChangedFromTheLastChangeBlock: boolean;\n\n\t/**\n\t * Creates an empty document instance with no {@link #roots} (other than\n\t * the {@link #graveyard graveyard root}).\n\t */\n\tconstructor( model: Model ) {\n\t\tsuper();\n\n\t\tthis.model = model;\n\t\tthis.history = new History();\n\t\tthis.selection = new ModelDocumentSelection( this );\n\t\tthis.roots = new Collection( { idProperty: 'rootName' } );\n\t\tthis.differ = new Differ( model.markers );\n\t\tthis.isReadOnly = false;\n\n\t\tthis._postFixers = new Set();\n\t\tthis._hasSelectionChangedFromTheLastChangeBlock = false;\n\n\t\t// Graveyard tree root. Document always have a graveyard root, which stores removed nodes.\n\t\tthis.createRoot( '$root', graveyardName );\n\n\t\t// Then, still before an operation is applied on model, buffer the change in differ.\n\t\tthis.listenTo<ModelApplyOperationEvent>( model, 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\tif ( operation.isDocumentOperation ) {\n\t\t\t\tthis.differ.bufferOperation( operation );\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// After the operation is applied, bump document's version and add the operation to the history.\n\t\tthis.listenTo<ModelApplyOperationEvent>( model, 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\tif ( operation.isDocumentOperation ) {\n\t\t\t\tthis.history.addOperation( operation );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\n\t\t// Listen to selection changes. If selection changed, mark it.\n\t\tthis.listenTo<ModelSelectionChangeEvent>( this.selection, 'change', () => {\n\t\t\tthis._hasSelectionChangedFromTheLastChangeBlock = true;\n\t\t} );\n\n\t\t// Buffer marker changes.\n\t\t// This is not covered in buffering operations because markers may change outside of them (when they\n\t\t// are modified using `model.markers` collection, not through `MarkerOperation`).\n\t\tthis.listenTo<MarkerCollectionUpdateEvent>( model.markers, 'update', ( evt, marker, oldRange, newRange, oldMarkerData ) => {\n\t\t\t// Copy the `newRange` to the new marker data as during the marker removal the range is not updated.\n\t\t\tconst newMarkerData = { ...marker.getData(), range: newRange };\n\n\t\t\t// Whenever marker is updated, buffer that change.\n\t\t\tthis.differ.bufferMarkerChange( marker.name, oldMarkerData, newMarkerData );\n\n\t\t\tif ( oldRange === null ) {\n\t\t\t\t// If this is a new marker, add a listener that will buffer change whenever marker changes.\n\t\t\t\tmarker.on<MarkerChangeEvent>( 'change', ( evt, oldRange ) => {\n\t\t\t\t\tconst markerData = marker.getData();\n\n\t\t\t\t\tthis.differ.bufferMarkerChange(\n\t\t\t\t\t\tmarker.name,\n\t\t\t\t\t\t{ ...markerData, range: oldRange },\n\t\t\t\t\t\tmarkerData\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// This is a solution for a problem that may occur during real-time editing. If one client detached a root and another added\n\t\t// something there at the same moment, the OT does not solve this problem currently. In such situation, the added elements would\n\t\t// stay in the detached root.\n\t\t//\n\t\t// This is incorrect, a detached root should be empty and all elements from it should be removed. To solve this, the post-fixer will\n\t\t// remove any element that is left in a detached root.\n\t\t//\n\t\t// Similarly, markers that are created at the beginning or at the end of the detached root will not be removed as well.\n\t\t//\n\t\t// The drawback of this solution over the OT solution is that the elements removed by the post-fixer will never be brought back.\n\t\t// If the root detachment gets undone (and the root is brought back), the removed elements will not be there.\n\t\tthis.registerPostFixer( writer => {\n\t\t\tlet result = false;\n\n\t\t\tfor ( const root of this.roots ) {\n\t\t\t\tif ( !root.isAttached() && !root.isEmpty ) {\n\t\t\t\t\twriter.remove( writer.createRangeIn( root ) );\n\n\t\t\t\t\tresult = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( const marker of this.model.markers ) {\n\t\t\t\tif ( !marker.getRange().root.isAttached() ) {\n\t\t\t\t\twriter.removeMarker( marker );\n\n\t\t\t\t\tresult = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t} );\n\t}\n\n\t/**\n\t * The document version. Every applied operation increases the version number. It is used to\n\t * ensure that operations are applied on a proper document version.\n\t *\n\t * This property is equal to {@link module:engine/model/history~History#version `model.Document#history#version`}.\n\t *\n\t * If the {@link module:engine/model/operation/operation~Operation#baseVersion base version} does not match the document version,\n\t * a {@link module:utils/ckeditorerror~CKEditorError model-document-applyoperation-wrong-version} error is thrown.\n\t */\n\tpublic get version(): number {\n\t\treturn this.history.version;\n\t}\n\n\tpublic set version( version: number ) {\n\t\tthis.history.version = version;\n\t}\n\n\t/**\n\t * The graveyard tree root. A document always has a graveyard root that stores removed nodes.\n\t */\n\tpublic get graveyard(): ModelRootElement {\n\t\treturn this.getRoot( graveyardName )!;\n\t}\n\n\t/**\n\t * Creates a new root.\n\t *\n\t * **Note:** do not use this method after the editor has been initialized! If you want to dynamically add a root, use\n\t * {@link module:engine/model/writer~ModelWriter#addRoot `model.Writer#addRoot`} instead.\n\t *\n\t * **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root\n\t * {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element\n\t * name explicitly so the created root matches the schema the features expect.\n\t * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t *\n\t * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined\n\t * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.\n\t * @param rootName A unique root name.\n\t * @returns The created root.\n\t */\n\tpublic createRoot( elementName: string = '$root', rootName: string = 'main' ): ModelRootElement {\n\t\tif ( this.roots.get( rootName ) ) {\n\t\t\t/**\n\t\t\t * A root with the specified name already exists.\n\t\t\t *\n\t\t\t * @error model-document-createroot-name-exists\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-document-createroot-name-exists', this, { name: rootName } );\n\t\t}\n\n\t\tconst root = new ModelRootElement( this, elementName, rootName );\n\t\tthis.roots.add( root );\n\n\t\treturn root;\n\t}\n\n\t/**\n\t * Removes all event listeners set by the document instance.\n\t */\n\tpublic destroy(): void {\n\t\tthis.selection.destroy();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Returns a root by its name.\n\t *\n\t * Detached roots are returned by this method. This is to be able to operate on the detached root (for example, to be able to create\n\t * a position inside such a root for undo feature purposes).\n\t *\n\t * @param name The root name of the root to return.\n\t * @returns The root registered under a given name or `null` when there is no root with the given name.\n\t */\n\tpublic getRoot( name: string = 'main' ): ModelRootElement | null {\n\t\treturn this.roots.get( name );\n\t}\n\n\t/**\n\t * Returns an array with names of all roots added to the document (except the {@link #graveyard graveyard root}).\n\t *\n\t * Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate\n\t * on the document data know which roots are still a part of the document and should be processed.\n\t *\n\t * @param includeDetached Specified whether detached roots should be returned as well.\n\t */\n\tpublic getRootNames( includeDetached = false ): Array<string> {\n\t\treturn this.getRoots( includeDetached ).map( root => root.rootName );\n\t}\n\n\t/**\n\t * Returns an array with all roots added to the document (except the {@link #graveyard graveyard root}).\n\t *\n\t * Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate\n\t * on the document data know which roots are still a part of the document and should be processed.\n\t *\n\t * @param includeDetached Specified whether detached roots should be returned as well.\n\t */\n\tpublic getRoots( includeDetached = false ): Array<ModelRootElement> {\n\t\treturn this.roots.filter( root => root != this.graveyard && ( includeDetached || root.isAttached() ) && root._isLoaded );\n\t}\n\n\t/**\n\t * Used to register a post-fixer callback. A post-fixer mechanism guarantees that the features\n\t * will operate on a correct model state.\n\t *\n\t * An execution of a feature may lead to an incorrect document tree state. The callbacks are used to fix the document tree after\n\t * it has changed. Post-fixers are fired just after all changes from the outermost change block were applied but\n\t * before the {@link module:engine/model/document~ModelDocument#event:change change event} is fired. If a post-fixer callback made\n\t * a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should\n\t * not be fixed in the new document tree state.\n\t *\n\t * As a parameter, a post-fixer callback receives a {@link module:engine/model/writer~ModelWriter writer} instance connected with the\n\t * executed changes block. Thanks to that, all changes done by the callback will be added to the same\n\t * {@link module:engine/model/batch~Batch batch} (and undo step) as the original changes. This makes post-fixer changes transparent\n\t * for the user.\n\t *\n\t * An example of a post-fixer is a callback that checks if all the data were removed from the editor. If so, the\n\t * callback should add an empty paragraph so that the editor is never empty:\n\t *\n\t * ```ts\n\t * document.registerPostFixer( writer => {\n\t * \tconst changes = document.differ.getChanges();\n\t *\n\t * \t// Check if the changes lead to an empty root in the editor.\n\t * \tfor ( const entry of changes ) {\n\t * \t\tif ( entry.type == 'remove' && entry.position.root.isEmpty ) {\n\t * \t\t\twriter.insertElement( 'paragraph', entry.position.root, 0 );\n\t *\n\t * \t\t\t// It is fine to return early, even if multiple roots would need to be fixed.\n\t * \t\t\t// All post-fixers will be fired again, so if there are more empty roots, those will be fixed, too.\n\t * \t\t\treturn true;\n\t * \t\t}\n\t * \t}\n\t *\n\t * \treturn false;\n\t * } );\n\t * ```\n\t */\n\tpublic registerPostFixer( postFixer: ModelPostFixer ): void {\n\t\tthis._postFixers.add( postFixer );\n\t}\n\n\t/**\n\t * A custom `toJSON()` method to solve child-parent circular dependencies.\n\t *\n\t * @returns A clone of this object with the document property changed to a string.\n\t */\n\tpublic toJSON(): unknown {\n\t\tconst json: any = clone( this );\n\n\t\t// Due to circular references we need to remove parent reference.\n\t\tjson.selection = '[engine.model.DocumentSelection]';\n\t\tjson.model = '[engine.model.Model]';\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Check if there were any changes done on document, and if so, call post-fixers,\n\t * fire `change` event for features and conversion and then reset the differ.\n\t * Fire `change:data` event when at least one operation or buffered marker changes the data.\n\t *\n\t * @internal\n\t * @fires change\n\t * @fires change:data\n\t * @param writer The writer on which post-fixers will be called.\n\t */\n\tpublic _handleChangeBlock( writer: ModelWriter ): void {\n\t\tif ( this._hasDocumentChangedFromTheLastChangeBlock() ) {\n\t\t\tthis._callPostFixers( writer );\n\n\t\t\t// Refresh selection attributes according to the final position in the model after the change.\n\t\t\tthis.selection.refresh();\n\n\t\t\tif ( this.differ.hasDataChanges() ) {\n\t\t\t\tthis.fire<ModelDocumentChangeEvent>( 'change:data', writer.batch );\n\t\t\t} else {\n\t\t\t\tthis.fire<ModelDocumentChangeEvent>( 'change', writer.batch );\n\t\t\t}\n\n\t\t\t// Theoretically, it is not necessary to refresh selection after change event because\n\t\t\t// post-fixers are the last who should change the model, but just in case...\n\t\t\tthis.selection.refresh();\n\n\t\t\tthis.differ.reset();\n\t\t}\n\n\t\tthis._hasSelectionChangedFromTheLastChangeBlock = false;\n\t}\n\n\t/**\n\t * Returns whether there is a buffered change or if the selection has changed from the last\n\t * {@link module:engine/model/model~Model#enqueueChange `enqueueChange()` block}\n\t * or {@link module:engine/model/model~Model#change `change()` block}.\n\t *\n\t * @returns Returns `true` if document has changed from the last `change()` or `enqueueChange()` block.\n\t */\n\tprotected _hasDocumentChangedFromTheLastChangeBlock(): boolean {\n\t\treturn !this.differ.isEmpty || this._hasSelectionChangedFromTheLastChangeBlock;\n\t}\n\n\t/**\n\t * Returns the default root for this document which is either the first root that was added to the document using\n\t * {@link #createRoot} or the {@link #graveyard graveyard root} if no other roots were created.\n\t *\n\t * @returns The default root for this document.\n\t */\n\tprotected _getDefaultRoot(): ModelRootElement {\n\t\tconst roots = this.getRoots();\n\n\t\treturn roots.length ? roots[ 0 ] : this.graveyard;\n\t}\n\n\t/**\n\t * Returns the default range for this selection. The default range is a collapsed range that starts and ends\n\t * at the beginning of this selection's document {@link #_getDefaultRoot default root}.\n\t *\n\t * @internal\n\t */\n\tpublic _getDefaultRange(): ModelRange {\n\t\tconst defaultRoot = this._getDefaultRoot();\n\t\tconst model = this.model;\n\t\tconst schema = model.schema;\n\n\t\t// Find the first position where the selection can be put.\n\t\tconst position = model.createPositionFromPath( defaultRoot, [ 0 ] );\n\t\tconst nearestRange = schema.getNearestSelectionRange( position );\n\n\t\t// If valid selection range is not found - return range collapsed at the beginning of the root.\n\t\treturn nearestRange || model.createRange( position );\n\t}\n\n\t/**\n\t * Checks whether a given {@link module:engine/model/range~ModelRange range} is a valid range for\n\t * the {@link #selection document's selection}.\n\t *\n\t * @internal\n\t * @param range A range to check.\n\t * @returns `true` if `range` is valid, `false` otherwise.\n\t */\n\tpublic _validateSelectionRange( range: ModelRange ): boolean {\n\t\treturn range.start.isValid() && range.end.isValid() &&\n\t\t\tvalidateTextNodePosition( range.start ) && validateTextNodePosition( range.end );\n\t}\n\n\t/**\n\t * Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.\n\t *\n\t * @param writer The writer on which post-fixer callbacks will be called.\n\t */\n\tprivate _callPostFixers( writer: ModelWriter ) {\n\t\tlet wasFixed = false;\n\n\t\tdo {\n\t\t\tfor ( const callback of this._postFixers ) {\n\t\t\t\t// Ensure selection attributes are up to date before each post-fixer.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/1673.\n\t\t\t\t//\n\t\t\t\t// It might be good to refresh the selection after each operation but at the moment it leads\n\t\t\t\t// to losing attributes for composition or and spell checking\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-typing/issues/188\n\t\t\t\tthis.selection.refresh();\n\n\t\t\t\twasFixed = callback( writer );\n\n\t\t\t\tif ( wasFixed ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ( wasFixed );\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public log( version: any = null ): void {\n\t// @if CK_DEBUG_ENGINE // \tversion = version === null ? this.version : version;\n\t// @if CK_DEBUG_ENGINE // \tlogDocument( this, version );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n/**\n * Fired after each {@link module:engine/model/model~Model#enqueueChange `enqueueChange()` block} or the outermost\n * {@link module:engine/model/model~Model#change `change()` block} was executed and the document was changed\n * during that block's execution.\n *\n * The changes which this event will cover include:\n *\n * * document structure changes,\n * * selection changes,\n * * marker changes.\n *\n * If you want to be notified about all these changes, then simply listen to this event like this:\n *\n * ```ts\n * model.document.on( 'change', () => {\n * \tconsole.log( 'The document has changed!' );\n * } );\n * ```\n *\n * If, however, you only want to be notified about the data changes, then use `change:data` event,\n * which is fired for document structure changes and marker changes (which affects the data).\n *\n * ```ts\n * model.document.on( 'change:data', () => {\n * \tconsole.log( 'The data has changed!' );\n * } );\n * ```\n *\n * @eventName ~ModelDocument#change\n * @eventName ~ModelDocument#change:data\n * @param batch The batch that was used in the executed changes block.\n */\nexport type ModelDocumentChangeEvent = {\n\tname: 'change' | 'change:data';\n\targs: [ batch: Batch ];\n};\n\n/**\n * Callback passed as an argument to the {@link module:engine/model/document~ModelDocument#registerPostFixer} method.\n */\nexport type ModelPostFixer = ( writer: ModelWriter ) => boolean;\n\n/**\n * Checks whether given range boundary position is valid for document selection, meaning that is not between\n * unicode surrogate pairs or base character and combining marks.\n */\nfunction validateTextNodePosition( rangeBoundary: ModelPosition ) {\n\tconst textNode = rangeBoundary.textNode;\n\n\tif ( textNode ) {\n\t\tconst data = textNode.data;\n\t\tconst offset = rangeBoundary.offset - textNode.startOffset!;\n\n\t\treturn !isInsideSurrogatePair( data, offset ) && !isInsideCombinedSymbol( data, offset );\n\t}\n\n\treturn true;\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/**\n * @module engine/model/markercollection\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\nimport {\n\tModelLiveRange,\n\ttype ModelLiveRangeChangeContentEvent,\n\ttype ModelLiveRangeChangeRangeEvent,\n\ttype ModelLiveRangeChangeEvent\n} from './liverange.js';\n\nimport { type ModelPosition } from './position.js';\nimport { type ModelRange } from './range.js';\n\nimport { CKEditorError, EmitterMixin, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nconst MarkerCollectionBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\nconst MarkerBase: EmitterMixinConstructor<typeof ModelTypeCheckable> = /* #__PURE__ */ EmitterMixin( ModelTypeCheckable );\n\n/**\n * The collection of all {@link module:engine/model/markercollection~Marker markers} attached to the document.\n * It lets you {@link module:engine/model/markercollection~MarkerCollection#get get} markers or track them using\n * {@link module:engine/model/markercollection~MarkerCollection#event:update} event.\n *\n * To create, change or remove makers use {@link module:engine/model/writer~ModelWriter model writers'} methods:\n * {@link module:engine/model/writer~ModelWriter#addMarker} or {@link module:engine/model/writer~ModelWriter#removeMarker}. Since\n * the writer is the only proper way to change the data model it is not possible to change markers directly using this\n * collection. All markers created by the writer will be automatically added to this collection.\n *\n * By default there is one marker collection available as {@link module:engine/model/model~Model#markers model property}.\n *\n * @see module:engine/model/markercollection~Marker\n */\nexport class MarkerCollection extends MarkerCollectionBase implements Iterable<Marker> {\n\t/**\n\t * Stores {@link ~Marker markers} added to the collection.\n\t */\n\tprivate _markers: Map<string, Marker> = new Map();\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link ~Marker markers} added to the collection.\n\t */\n\tpublic [ Symbol.iterator ](): IterableIterator<Marker> {\n\t\treturn this._markers.values();\n\t}\n\n\t/**\n\t * Checks if given {@link ~Marker marker} or marker name is in the collection.\n\t *\n\t * @param markerOrName Name of marker or marker instance to check.\n\t * @returns `true` if marker is in the collection, `false` otherwise.\n\t */\n\tpublic has( markerOrName: string | Marker ): boolean {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\n\t\treturn this._markers.has( markerName );\n\t}\n\n\t/**\n\t * Returns {@link ~Marker marker} with given `markerName`.\n\t *\n\t * @param markerName Name of marker to get.\n\t * @returns Marker with given name or `null` if such marker was\n\t * not added to the collection.\n\t */\n\tpublic get( markerName: string ): Marker | null {\n\t\treturn this._markers.get( markerName ) || null;\n\t}\n\n\t/**\n\t * Creates and adds a {@link ~Marker marker} to the `MarkerCollection` with given name on given\n\t * {@link module:engine/model/range~ModelRange range}.\n\t *\n\t * If `MarkerCollection` already had a marker with given name (or {@link ~Marker marker} was passed), the marker in\n\t * collection is updated and {@link module:engine/model/markercollection~MarkerCollection#event:update} event is fired\n\t * but only if there was a change (marker range or {@link module:engine/model/markercollection~Marker#managedUsingOperations}\n\t * flag has changed.\n\t *\n\t * @internal\n\t * @fires update\n\t * @param markerOrName Name of marker to set or marker instance to update.\n\t * @param range Marker range.\n\t * @param managedUsingOperations Specifies whether the marker is managed using operations.\n\t * @param affectsData Specifies whether the marker affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t * @returns `Marker` instance which was added or updated.\n\t */\n\tpublic _set(\n\t\tmarkerOrName: string | Marker,\n\t\trange: ModelRange,\n\t\tmanagedUsingOperations: boolean = false,\n\t\taffectsData: boolean = false\n\t): Marker {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\n\t\tif ( markerName.includes( ',' ) ) {\n\t\t\t/**\n\t\t\t * Marker name cannot contain the \",\" character.\n\t\t\t *\n\t\t\t * @error markercollection-incorrect-marker-name\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'markercollection-incorrect-marker-name', this );\n\t\t}\n\n\t\tconst oldMarker = this._markers.get( markerName );\n\n\t\tif ( oldMarker ) {\n\t\t\tconst oldMarkerData = oldMarker.getData();\n\n\t\t\tconst oldRange = oldMarker.getRange();\n\t\t\tlet hasChanged = false;\n\n\t\t\tif ( !oldRange.isEqual( range ) ) {\n\t\t\t\toldMarker._attachLiveRange( ModelLiveRange.fromRange( range ) );\n\t\t\t\thasChanged = true;\n\t\t\t}\n\n\t\t\tif ( managedUsingOperations != oldMarker.managedUsingOperations ) {\n\t\t\t\toldMarker._managedUsingOperations = managedUsingOperations;\n\t\t\t\thasChanged = true;\n\t\t\t}\n\n\t\t\tif ( typeof affectsData === 'boolean' && affectsData != oldMarker.affectsData ) {\n\t\t\t\toldMarker._affectsData = affectsData;\n\t\t\t\thasChanged = true;\n\t\t\t}\n\n\t\t\tif ( hasChanged ) {\n\t\t\t\tthis.fire<MarkerCollectionUpdateEvent>( `update:${ markerName }`, oldMarker, oldRange, range, oldMarkerData );\n\t\t\t}\n\n\t\t\treturn oldMarker;\n\t\t}\n\n\t\tconst liveRange = ModelLiveRange.fromRange( range );\n\t\tconst marker = new Marker( markerName, liveRange, managedUsingOperations, affectsData );\n\n\t\tthis._markers.set( markerName, marker );\n\t\tthis.fire<MarkerCollectionUpdateEvent>( `update:${ markerName }`, marker, null, range, { ...marker.getData(), range: null } );\n\n\t\treturn marker;\n\t}\n\n\t/**\n\t * Removes given {@link ~Marker marker} or a marker with given name from the `MarkerCollection`.\n\t *\n\t * @internal\n\t * @fires update\n\t * @param markerOrName Marker or name of a marker to remove.\n\t * @returns `true` if marker was found and removed, `false` otherwise.\n\t */\n\tpublic _remove( markerOrName: string | Marker ): boolean {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\t\tconst oldMarker = this._markers.get( markerName );\n\n\t\tif ( oldMarker ) {\n\t\t\tthis._markers.delete( markerName );\n\t\t\tthis.fire<MarkerCollectionUpdateEvent>( `update:${ markerName }`, oldMarker, oldMarker.getRange(), null, oldMarker.getData() );\n\n\t\t\tthis._destroyMarker( oldMarker );\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Fires an {@link module:engine/model/markercollection~MarkerCollection#event:update} event for the given {@link ~Marker marker}\n\t * but does not change the marker. Useful to force {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher downcast\n\t * conversion} for the marker.\n\t *\n\t * @internal\n\t * @fires update\n\t * @param markerOrName Marker or name of a marker to refresh.\n\t */\n\tpublic _refresh( markerOrName: string | Marker ): void {\n\t\tconst markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n\t\tconst marker = this._markers.get( markerName );\n\n\t\tif ( !marker ) {\n\t\t\t/**\n\t\t\t * Marker with provided name does not exists.\n\t\t\t *\n\t\t\t * @error markercollection-refresh-marker-not-exists\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'markercollection-refresh-marker-not-exists', this );\n\t\t}\n\n\t\tconst range = marker.getRange();\n\n\t\tthis.fire<MarkerCollectionUpdateEvent>( `update:${ markerName }`, marker, range, range, marker.getData() );\n\t}\n\n\t/**\n\t * Returns iterator that iterates over all markers, which ranges\n\t * contain given {@link module:engine/model/position~ModelPosition position}.\n\t */\n\tpublic* getMarkersAtPosition( position: ModelPosition ): IterableIterator<Marker> {\n\t\tfor ( const marker of this ) {\n\t\t\tif ( marker.getRange().containsPosition( position ) ) {\n\t\t\t\tyield marker;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns iterator that iterates over all markers, which intersects with given {@link module:engine/model/range~ModelRange range}.\n\t */\n\tpublic* getMarkersIntersectingRange( range: ModelRange ): Iterable<Marker> {\n\t\tfor ( const marker of this ) {\n\t\t\tif ( marker.getRange().getIntersection( range ) !== null ) {\n\t\t\t\tyield marker;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Destroys marker collection and all markers inside it.\n\t */\n\tpublic destroy(): void {\n\t\tfor ( const marker of this._markers.values() ) {\n\t\t\tthis._destroyMarker( marker );\n\t\t}\n\n\t\tthis._markers.clear();\n\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Iterates over all markers that starts with given `prefix`.\n\t *\n\t * ```ts\n\t * const markerFooA = markersCollection._set( 'foo:a', rangeFooA );\n\t * const markerFooB = markersCollection._set( 'foo:b', rangeFooB );\n\t * const markerBarA = markersCollection._set( 'bar:a', rangeBarA );\n\t * const markerFooBarA = markersCollection._set( 'foobar:a', rangeFooBarA );\n\t * Array.from( markersCollection.getMarkersGroup( 'foo' ) ); // [ markerFooA, markerFooB ]\n\t * Array.from( markersCollection.getMarkersGroup( 'a' ) ); // []\n\t * ```\n\t */\n\tpublic* getMarkersGroup( prefix: string ): IterableIterator<Marker> {\n\t\tfor ( const marker of this._markers.values() ) {\n\t\t\tif ( marker.name.startsWith( prefix + ':' ) ) {\n\t\t\t\tyield marker;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the marker.\n\t */\n\tprivate _destroyMarker( marker: Marker ): void {\n\t\tmarker.stopListening();\n\t\tmarker._detachLiveRange();\n\t}\n}\n\nexport interface MarkerData {\n\n\t/**\n\t * Marker range. `null` if the marker was removed.\n\t */\n\trange: ModelRange | null;\n\n\t/**\n\t * A property defining if the marker affects data.\n\t */\n\taffectsData: boolean;\n\n\t/**\n\t * A property defining if the marker is managed using operations.\n\t */\n\tmanagedUsingOperations: boolean;\n}\n\n/**\n * `Marker` is a continuous part of the model (like a range), is named and represents some kind of information about the\n * marked part of the model document. In contrary to {@link module:engine/model/node~ModelNode nodes}, which are building blocks of\n * the model document tree, markers are not stored directly in the document tree but in the\n * {@link module:engine/model/model~Model#markers model markers' collection}. Still, they are document data, by giving\n * additional meaning to the part of a model document between marker start and marker end.\n *\n * In this sense, markers are similar to adding and converting attributes on nodes. The difference is that attribute is\n * connected with a given node (e.g. a character is bold no matter if it gets moved or content around it changes).\n * Markers on the other hand are continuous ranges and are characterized by their start and end position. This means that\n * any character in the marker is marked by the marker. For example, if a character is moved outside of marker it stops being\n * \"special\" and the marker is shrunk. Similarly, when a character is moved into the marker from other place in document\n * model, it starts being \"special\" and the marker is enlarged.\n *\n * Another upside of markers is that finding marked part of document is fast and easy. Using attributes to mark some nodes\n * and then trying to find that part of document would require traversing whole document tree. Marker gives instant access\n * to the range which it is marking at the moment.\n *\n * Markers are built from a name and a range.\n *\n * Range of the marker is updated automatically when document changes, using\n * {@link module:engine/model/liverange~ModelLiveRange live range} mechanism.\n *\n * Name is used to group and identify markers. Names have to be unique, but markers can be grouped by\n * using common prefixes, separated with `:`, for example: `user:john` or `search:3`. That's useful in term of creating\n * namespaces for custom elements (e.g. comments, highlights). You can use this prefixes in\n * {@link module:engine/model/markercollection~MarkerCollection#event:update} listeners to listen on changes in a group of markers.\n * For instance: `model.markers.on( 'update:user', callback );` will be called whenever any `user:*` markers changes.\n *\n * There are two types of markers.\n *\n * 1. Markers managed directly, without using operations. They are added directly by {@link module:engine/model/writer~ModelWriter}\n * to the {@link module:engine/model/markercollection~MarkerCollection} without any additional mechanism. They can be used\n * as bookmarks or visual markers. They are great for showing results of the find, or select link when the focus is in the input.\n *\n * 1. Markers managed using operations. These markers are also stored in {@link module:engine/model/markercollection~MarkerCollection}\n * but changes in these markers is managed the same way all other changes in the model structure - using operations.\n * Therefore, they are handled in the undo stack and synchronized between clients if the collaboration plugin is enabled.\n * This type of markers is useful for solutions like spell checking or comments.\n *\n * Both type of them should be added / updated by {@link module:engine/model/writer~ModelWriter#addMarker}\n * and removed by {@link module:engine/model/writer~ModelWriter#removeMarker} methods.\n *\n * ```ts\n * model.change( ( writer ) => {\n * \tconst marker = writer.addMarker( name, { range, usingOperation: true } );\n *\n * \t// ...\n *\n * \twriter.removeMarker( marker );\n * } );\n * ```\n *\n * See {@link module:engine/model/writer~ModelWriter} to find more examples.\n *\n * Since markers need to track change in the document, for efficiency reasons, it is best to create and keep as little\n * markers as possible and remove them as soon as they are not needed anymore.\n *\n * Markers can be downcasted and upcasted.\n *\n * Markers downcast happens on {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker} and\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:removeMarker} events.\n * Use {@link module:engine/conversion/downcasthelpers downcast converters} or attach a custom converter to mentioned events.\n * For {@link module:engine/controller/datacontroller~DataController data pipeline}, marker should be downcasted to an element.\n * Then, it can be upcasted back to a marker. Again, use {@link module:engine/conversion/upcasthelpers upcast converters} or\n * attach a custom converter to {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element}.\n *\n * `Marker` instances are created and destroyed only by {@link ~MarkerCollection MarkerCollection}.\n */\nclass Marker extends MarkerBase {\n\t/**\n\t * Marker's name.\n\t */\n\tpublic readonly name: string;\n\n\t/**\n\t * Flag indicates if the marker is managed using operations or not.\n\t *\n\t * @internal\n\t */\n\tpublic _managedUsingOperations: boolean;\n\n\t/**\n\t * Specifies whether the marker affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t *\n\t * @internal\n\t */\n\tpublic _affectsData: boolean;\n\n\t/**\n\t * Range marked by the marker.\n\t */\n\tprivate _liveRange: ModelLiveRange | null;\n\n\t/**\n\t * Creates a marker instance.\n\t *\n\t * @param name Marker name.\n\t * @param liveRange Range marked by the marker.\n\t * @param managedUsingOperations Specifies whether the marker is managed using operations.\n\t * @param affectsData Specifies whether the marker affects the data produced by the data pipeline (is persisted in the editor's data).\n\t */\n\tconstructor(\n\t\tname: string,\n\t\tliveRange: ModelLiveRange,\n\t\tmanagedUsingOperations: boolean,\n\t\taffectsData: boolean\n\t) {\n\t\tsuper();\n\n\t\tthis.name = name;\n\t\tthis._liveRange = this._attachLiveRange( liveRange );\n\t\tthis._managedUsingOperations = managedUsingOperations;\n\t\tthis._affectsData = affectsData;\n\t}\n\n\t/**\n\t * A value indicating if the marker is managed using operations.\n\t * See {@link ~Marker marker class description} to learn more about marker types.\n\t * See {@link module:engine/model/writer~ModelWriter#addMarker}.\n\t */\n\tpublic get managedUsingOperations(): boolean {\n\t\tif ( !this._liveRange ) {\n\t\t\tthrow new CKEditorError( 'marker-destroyed', this );\n\t\t}\n\n\t\treturn this._managedUsingOperations;\n\t}\n\n\t/**\n\t * A value indicating if the marker changes the data.\n\t */\n\tpublic get affectsData(): boolean {\n\t\tif ( !this._liveRange ) {\n\t\t\tthrow new CKEditorError( 'marker-destroyed', this );\n\t\t}\n\n\t\treturn this._affectsData;\n\t}\n\n\t/**\n\t * Returns the marker data (properties defining the marker).\n\t */\n\tpublic getData(): MarkerData {\n\t\treturn {\n\t\t\trange: this.getRange(),\n\t\t\taffectsData: this.affectsData,\n\t\t\tmanagedUsingOperations: this.managedUsingOperations\n\t\t};\n\t}\n\n\t/**\n\t * Returns current marker start position.\n\t */\n\tpublic getStart(): ModelPosition {\n\t\tif ( !this._liveRange ) {\n\t\t\tthrow new CKEditorError( 'marker-destroyed', this );\n\t\t}\n\n\t\treturn this._liveRange.start.clone();\n\t}\n\n\t/**\n\t * Returns current marker end position.\n\t */\n\tpublic getEnd(): ModelPosition {\n\t\tif ( !this._liveRange ) {\n\t\t\tthrow new CKEditorError( 'marker-destroyed', this );\n\t\t}\n\n\t\treturn this._liveRange.end.clone();\n\t}\n\n\t/**\n\t * Returns a range that represents the current state of the marker.\n\t *\n\t * Keep in mind that returned value is a {@link module:engine/model/range~ModelRange Range}, not a\n\t * {@link module:engine/model/liverange~ModelLiveRange ModelLiveRange}. This means that it is up-to-date and relevant only\n\t * until next model document change. Do not store values returned by this method. Instead, store {@link ~Marker#name}\n\t * and get `Marker` instance from {@link module:engine/model/markercollection~MarkerCollection MarkerCollection} every\n\t * time there is a need to read marker properties. This will guarantee that the marker has not been removed and\n\t * that it's data is up-to-date.\n\t */\n\tpublic getRange(): ModelRange {\n\t\tif ( !this._liveRange ) {\n\t\t\tthrow new CKEditorError( 'marker-destroyed', this );\n\t\t}\n\n\t\treturn this._liveRange.toRange();\n\t}\n\n\t/**\n\t * Converts `Marker` to plain object and returns it.\n\t *\n\t * @returns `Marker` converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\trange: this._liveRange?.toJSON(),\n\t\t\tusingOperations: this._managedUsingOperations,\n\t\t\taffectsData: this._affectsData\n\t\t};\n\t}\n\n\t/**\n\t * Binds new live range to the marker and detach the old one if is attached.\n\t *\n\t * @internal\n\t * @param liveRange Live range to attach\n\t * @returns Attached live range.\n\t */\n\tpublic _attachLiveRange( liveRange: ModelLiveRange ): ModelLiveRange {\n\t\tif ( this._liveRange ) {\n\t\t\tthis._detachLiveRange();\n\t\t}\n\n\t\t// Delegating does not work with namespaces. Alternatively, we could delegate all events (using `*`).\n\t\tliveRange.delegate( 'change:range' ).to( this );\n\t\tliveRange.delegate( 'change:content' ).to( this );\n\n\t\tthis._liveRange = liveRange;\n\n\t\treturn liveRange;\n\t}\n\n\t/**\n\t * Unbinds and destroys currently attached live range.\n\t *\n\t * @internal\n\t */\n\tpublic _detachLiveRange(): void {\n\t\tthis._liveRange!.stopDelegating( 'change:range', this );\n\t\tthis._liveRange!.stopDelegating( 'change:content', this );\n\t\tthis._liveRange!.detach();\n\t\tthis._liveRange = null;\n\t}\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nMarker.prototype.is = function( type: string ): boolean {\n\treturn type === 'marker' || type === 'model:marker';\n} as any;\n\nexport { Marker };\n\n/**\n * Fired whenever {@link ~Marker#_liveRange marker range} is changed due to changes on {@link module:engine/model/document~ModelDocument}.\n * This is a delegated {@link module:engine/model/liverange~ModelLiveRange#event:change:range ModelLiveRange change:range event}.\n *\n * When marker is removed from {@link module:engine/model/markercollection~MarkerCollection MarkerCollection},\n * all event listeners listening to it should be removed. It is best to do it on\n * {@link module:engine/model/markercollection~MarkerCollection#event:update MarkerCollection update event}.\n *\n * @see module:engine/model/liverange~ModelLiveRange#event:change:range\n * @eventName ~Marker#change:range\n */\nexport type MarkerChangeRangeEvent = ModelLiveRangeChangeRangeEvent;\n\n/**\n * Fired whenever change on {@link module:engine/model/document~ModelDocument} is done inside {@link ~Marker#_liveRange marker range}.\n * This is a delegated {@link module:engine/model/liverange~ModelLiveRange#event:change:content ModelLiveRange change:content event}.\n *\n * When marker is removed from {@link module:engine/model/markercollection~MarkerCollection MarkerCollection},\n * all event listeners listening to it should be removed. It is best to do it on\n * {@link module:engine/model/markercollection~MarkerCollection#event:update MarkerCollection update event}.\n *\n * @see module:engine/model/liverange~ModelLiveRange#event:change:content\n * @eventName ~Marker#change:content\n */\nexport type MarkerCollectionChangeContentEvent = ModelLiveRangeChangeContentEvent;\n\n/**\n * Describes `change:range` or `change:content` event.\n */\nexport type MarkerChangeEvent = ModelLiveRangeChangeEvent;\n\n/**\n * Fired whenever marker is added, updated or removed from `MarkerCollection`.\n *\n * @eventName ~MarkerCollection#update\n * @param marker Updated Marker.\n * @param oldRange Marker range before the update. When is not defined it\n * means that marker is just added.\n * @param newRange Marker range after update. When is not defined it\n * means that marker is just removed.\n * @param oldMarkerData Data of the marker before the change.\n */\nexport type MarkerCollectionUpdateEvent = {\n\tname: 'update' | `update:${ string }`;\n\targs: [ marker: Marker, oldRange: ModelRange | null, newRange: ModelRange | null, oldMarkerData: MarkerData ];\n};\n\n/**\n * Cannot use a {@link module:engine/model/markercollection~MarkerCollection#destroy destroyed marker} instance.\n *\n * @error marker-destroyed\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/**\n * @module engine/model/operation/detachoperation\n */\n\nimport { Operation } from './operation.js';\nimport { ModelRange } from '../range.js';\nimport { _remove } from './utils.js';\n\nimport { type ModelPosition } from '../position.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport type { ModelSelectable } from '../selection.js';\n\n/**\n * Operation to permanently remove node from detached root.\n * Note this operation is only a local operation and won't be send to the other clients.\n *\n * @internal\n */\nexport class DetachOperation extends Operation {\n\t/**\n\t * Position before the first {@link module:engine/model/item~ModelItem model item} to detach.\n\t */\n\tpublic sourcePosition: ModelPosition;\n\n\t/**\n\t * Offset size of moved range.\n\t */\n\tpublic howMany: number;\n\n\t// This class doesn't implement those abstract methods. Let's silence the compiler.\n\tdeclare public clone: never;\n\tdeclare public getReversed: never;\n\n\t/**\n\t * Creates an insert operation.\n\t *\n\t * @param sourcePosition Position before the first {@link module:engine/model/item~ModelItem model item} to move.\n\t * @param howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t * `sourcePosition` with offset shifted by `howMany`.\n\t */\n\tconstructor( sourcePosition: ModelPosition, howMany: number ) {\n\t\tsuper( null );\n\n\t\tthis.sourcePosition = sourcePosition.clone();\n\t\tthis.howMany = howMany;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get type(): 'detach' {\n\t\treturn 'detach';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic get affectedSelectable(): ModelSelectable {\n\t\treturn null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override toJSON(): unknown {\n\t\tconst json: any = super.toJSON();\n\n\t\tjson.sourcePosition = this.sourcePosition.toJSON();\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic override _validate(): void {\n\t\tif ( this.sourcePosition.root.document ) {\n\t\t\t/**\n\t\t\t * Cannot detach document node.\n\t\t\t *\n\t\t\t * @error detach-operation-on-document-node\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'detach-operation-on-document-node', this );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic _execute(): void {\n\t\t_remove( ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get className(): string {\n\t\treturn 'DetachOperation';\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): string {\n\t// @if CK_DEBUG_ENGINE // \tconst range = ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany );\n\t// @if CK_DEBUG_ENGINE // \tconst nodes = Array.from( range.getItems() );\n\t// @if CK_DEBUG_ENGINE // \tconst nodeString = nodes.length > 1 ? `[ ${ nodes.length } ]` : nodes[ 0 ];\n\n\t// @if CK_DEBUG_ENGINE // \treturn `DetachOperation( ${ this.baseVersion } ): ${ nodeString } -> ${ range }`;\n\t// @if CK_DEBUG_ENGINE // }\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/**\n * @module engine/model/documentfragment\n */\n\nimport { ModelTypeCheckable } from './typecheckable.js';\nimport { ModelElement } from './element.js';\nimport { ModelNodeList } from './nodelist.js';\nimport { ModelText } from './text.js';\nimport { ModelTextProxy } from './textproxy.js';\n\nimport { type ModelItem } from './item.js';\nimport { type ModelNode } from './node.js';\nimport { type ModelRange } from './range.js';\n\nimport { isIterable } from '@ckeditor/ckeditor5-utils';\n\n// @if CK_DEBUG_ENGINE // import { convertMapToTags } from '../dev-utils/utils.js';\n\n/**\n * ModelDocumentFragment represents a part of model which does not have a common root but its top-level nodes\n * can be seen as siblings. In other words, it is a detached part of model tree, without a root.\n *\n * ModelDocumentFragment has own {@link module:engine/model/markercollection~MarkerCollection}. Markers from this collection\n * will be set to the {@link module:engine/model/model~Model#markers model markers} by a\n * {@link module:engine/model/writer~ModelWriter#insert} function.\n */\nexport class ModelDocumentFragment extends ModelTypeCheckable implements Iterable<ModelNode> {\n\t/**\n\t * ModelDocumentFragment static markers map. This is a list of names and {@link module:engine/model/range~ModelRange ranges}\n\t * which will be set as Markers to {@link module:engine/model/model~Model#markers model markers collection}\n\t * when ModelDocumentFragment will be inserted to the document.\n\t */\n\tpublic readonly markers: Map<string, ModelRange> = new Map();\n\n\t/**\n\t * Artificial element name. Returns `undefined`. Added for compatibility reasons.\n\t */\n\tdeclare public name?: undefined;\n\n\t/**\n\t * Artificial root name. Returns `undefined`. Added for compatibility reasons.\n\t */\n\tdeclare public rootName?: undefined;\n\n\t/**\n\t * List of nodes contained inside the document fragment.\n\t */\n\tprivate readonly _children: ModelNodeList = new ModelNodeList();\n\n\t/**\n\t * Creates an empty `ModelDocumentFragment`.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~ModelWriter#createDocumentFragment} method instead.\n\t *\n\t * @internal\n\t * @param children Nodes to be contained inside the `ModelDocumentFragment`.\n\t */\n\tconstructor( children?: ModelNode | Iterable<ModelNode> ) {\n\t\tsuper();\n\n\t\tif ( children ) {\n\t\t\tthis._insertChild( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all nodes contained inside this document fragment.\n\t */\n\tpublic [ Symbol.iterator ](): IterableIterator<ModelNode> {\n\t\treturn this.getChildren();\n\t}\n\n\t/**\n\t * Number of this document fragment's children.\n\t */\n\tpublic get childCount(): number {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Sum of {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all of this document fragment's children.\n\t */\n\tpublic get maxOffset(): number {\n\t\treturn this._children.maxOffset;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t */\n\tpublic get isEmpty(): boolean {\n\t\treturn this.childCount === 0;\n\t}\n\n\t/**\n\t * Artificial next sibling. Returns `null`. Added for compatibility reasons.\n\t */\n\tpublic get nextSibling(): null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Artificial previous sibling. Returns `null`. Added for compatibility reasons.\n\t */\n\tpublic get previousSibling(): null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Artificial root of `ModelDocumentFragment`. Returns itself. Added for compatibility reasons.\n\t */\n\tpublic get root(): ModelDocumentFragment {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Artificial parent of `ModelDocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t */\n\tpublic get parent(): null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Artificial owner of `ModelDocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t */\n\tpublic get document(): null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns `false` as `ModelDocumentFragment` by definition is not attached to a document. Added for compatibility reasons.\n\t */\n\tpublic isAttached(): false {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns empty array. Added for compatibility reasons.\n\t */\n\tpublic getAncestors(): Array<never> {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Gets the child at the given index. Returns `null` if incorrect index was passed.\n\t *\n\t * @param index Index in this document fragment.\n\t * @returns Child node.\n\t */\n\tpublic getChild( index: number ): ModelNode | null {\n\t\treturn this._children.getNode( index );\n\t}\n\n\t/**\n\t * Gets the child at the given offset. Returns `null` if incorrect index was passed.\n\t *\n\t * @param offset Offset in this document fragment.\n\t * @returns Child node.\n\t */\n\tpublic getChildAtOffset( offset: number ): ModelNode | null {\n\t\treturn this._children.getNodeAtOffset( offset );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all of this document fragment's children.\n\t */\n\tpublic getChildren(): IterableIterator<ModelNode> {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an index of the given child node. Returns `null` if given node is not a child of this document fragment.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's index.\n\t */\n\tpublic getChildIndex( node: ModelNode ): number | null {\n\t\treturn this._children.getNodeIndex( node );\n\t}\n\n\t/**\n\t * Returns the starting offset of given child. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~ModelNode#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t * given node is not a child of this document fragment.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's starting offset.\n\t */\n\tpublic getChildStartOffset( node: ModelNode ): number | null {\n\t\treturn this._children.getNodeStartOffset( node );\n\t}\n\n\t/**\n\t * Returns path to a `ModelDocumentFragment`, which is an empty array. Added for compatibility reasons.\n\t */\n\tpublic getPath(): Array<number> {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns a descendant node by its path relative to this element.\n\t *\n\t * ```ts\n\t * // <this>a<b>c</b></this>\n\t * this.getNodeByPath( [ 0 ] );     // -> \"a\"\n\t * this.getNodeByPath( [ 1 ] );     // -> <b>\n\t * this.getNodeByPath( [ 1, 0 ] );  // -> \"c\"\n\t * ```\n\t *\n\t * @param relativePath Path of the node to find, relative to this element.\n\t */\n\tpublic getNodeByPath( relativePath: Array<number> ): ModelNode | ModelDocumentFragment {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n\t\tlet node: ModelNode | ModelDocumentFragment = this;\n\n\t\tfor ( const offset of relativePath ) {\n\t\t\tnode = ( node as ModelElement | ModelDocumentFragment ).getChildAtOffset( offset )!;\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Converts offset \"position\" to index \"position\".\n\t *\n\t * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t * too high, returns index after last child.\n\t *\n\t * ```ts\n\t * const textNode = new Text( 'foo' );\n\t * const pElement = new Element( 'p' );\n\t * const docFrag = new ModelDocumentFragment( [ textNode, pElement ] );\n\t * docFrag.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t * docFrag.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t * docFrag.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t * docFrag.offsetToIndex( 2 ); // Returns 0.\n\t * docFrag.offsetToIndex( 3 ); // Returns 1.\n\t * docFrag.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t * ```\n\t *\n\t * @param offset Offset to look for.\n\t * @returns Index of a node that occupies given offset.\n\t */\n\tpublic offsetToIndex( offset: number ): number {\n\t\treturn this._children.offsetToIndex( offset );\n\t}\n\n\t/**\n\t * Converts `ModelDocumentFragment` instance to plain object and returns it.\n\t * Takes care of converting all of this document fragment's children.\n\t *\n\t * @returns `ModelDocumentFragment` instance converted to plain object.\n\t */\n\tpublic toJSON(): unknown {\n\t\tconst json = [];\n\n\t\tfor ( const node of this._children ) {\n\t\t\tjson.push( node.toJSON() );\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a `ModelDocumentFragment` instance from given plain object (i.e. parsed JSON string).\n\t * Converts `ModelDocumentFragment` children to proper nodes.\n\t *\n\t * @param json Plain object to be converted to `ModelDocumentFragment`.\n\t * @returns `ModelDocumentFragment` instance created using given plain object.\n\t */\n\tpublic static fromJSON( json: any ): ModelDocumentFragment {\n\t\tconst children = [];\n\n\t\tfor ( const child of json ) {\n\t\t\tif ( child.name ) {\n\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\tchildren.push( ModelElement.fromJSON( child ) );\n\t\t\t} else {\n\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\tchildren.push( ModelText.fromJSON( child ) );\n\t\t\t}\n\t\t}\n\n\t\treturn new ModelDocumentFragment( children );\n\t}\n\n\t/**\n\t * {@link #_insertChild Inserts} one or more nodes at the end of this document fragment.\n\t *\n\t * @internal\n\t * @param items Items to be inserted.\n\t */\n\tpublic _appendChild( items: string | ModelItem | Iterable<string | ModelItem> ): void {\n\t\tthis._insertChild( this.childCount, items );\n\t}\n\n\t/**\n\t * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~ModelNode#parent parent} of these nodes\n\t * to this document fragment.\n\t *\n\t * @internal\n\t * @param index Index at which nodes should be inserted.\n\t * @param items Items to be inserted.\n\t */\n\tpublic _insertChild( index: number, items: string | ModelItem | Iterable<string | ModelItem> ): void {\n\t\tconst nodes = normalize( items );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\t( node as any ).parent = this;\n\t\t}\n\n\t\tthis._children._insertNodes( index, nodes );\n\t}\n\n\t/**\n\t * Removes one or more nodes starting at the given index\n\t * and sets {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t *\n\t * @internal\n\t * @param index Index of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns Array containing removed nodes.\n\t */\n\tpublic _removeChildren( index: number, howMany: number = 1 ): Array<ModelNode> {\n\t\tconst nodes = this._children._removeNodes( index, howMany );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t( node as any ).parent = null;\n\t\t}\n\n\t\treturn nodes;\n\t}\n\n\t/**\n\t * Removes children nodes provided as an array and sets\n\t * the {@link module:engine/model/node~ModelNode#parent parent} of these nodes to `null`.\n\t *\n\t * These nodes do not need to be direct siblings.\n\t *\n\t * This method is faster than removing nodes one by one, as it recalculates offsets only once.\n\t *\n\t * @internal\n\t * @param nodes Array of nodes.\n\t */\n\tpublic _removeChildrenArray( nodes: Array<ModelNode> ): void {\n\t\tthis._children._removeNodesArray( nodes );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t( node as any ).parent = null;\n\t\t}\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public override toString(): 'documentFragment' {\n\t// @if CK_DEBUG_ENGINE // \treturn 'documentFragment';\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public log(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( 'ModelModelDocumentFragment: ' + this );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public printTree(): string {\n\t// @if CK_DEBUG_ENGINE // \tlet string = 'ModelModelDocumentFragment: [';\n\n\t// @if CK_DEBUG_ENGINE // \tfor ( const child of this.getChildren() as any ) {\n\t// @if CK_DEBUG_ENGINE // \t\tstring += '\\n';\n\n\t// @if CK_DEBUG_ENGINE // \t\tif ( child.is( '$text' ) ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\tconst textAttrs = convertMapToTags( child._attrs );\n\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += '\\t'.repeat( 1 );\n\n\t// @if CK_DEBUG_ENGINE // \t\t\tif ( textAttrs !== '' ) {\n\t// @if CK_DEBUG_ENGINE // \t\t\t\tstring += `<$text${ textAttrs }>` + child.data + '</$text>';\n\t// @if CK_DEBUG_ENGINE // \t\t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\t\tstring += child.data;\n\t// @if CK_DEBUG_ENGINE // \t\t\t}\n\t// @if CK_DEBUG_ENGINE // \t\t} else {\n\t// @if CK_DEBUG_ENGINE // \t\t\tstring += child.printTree( 1 );\n\t// @if CK_DEBUG_ENGINE // \t\t}\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \tstring += '\\n]';\n\n\t// @if CK_DEBUG_ENGINE // \treturn string;\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public logTree(): void {\n\t// @if CK_DEBUG_ENGINE // \tconsole.log( this.printTree() );\n\t// @if CK_DEBUG_ENGINE // }\n}\n\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nModelDocumentFragment.prototype.is = function( type: string ): boolean {\n\treturn type === 'documentFragment' || type === 'model:documentFragment';\n} as any;\n\n/**\n * Converts strings to Text and non-iterables to arrays.\n */\nfunction normalize( nodes: string | ModelItem | Iterable<string | ModelItem> ): Array<ModelNode> {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new ModelText( nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\tif ( typeof node == 'string' ) {\n\t\t\t\treturn new ModelText( node );\n\t\t\t}\n\n\t\t\tif ( node instanceof ModelTextProxy ) {\n\t\t\t\treturn new ModelText( node.data, node.getAttributes() );\n\t\t\t}\n\n\t\t\treturn node;\n\t\t} );\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/**\n * @module engine/model/writer\n */\n\nimport { AttributeOperation } from './operation/attributeoperation.js';\nimport { DetachOperation } from './operation/detachoperation.js';\nimport { InsertOperation } from './operation/insertoperation.js';\nimport { MarkerOperation } from './operation/markeroperation.js';\nimport { MergeOperation } from './operation/mergeoperation.js';\nimport { MoveOperation } from './operation/moveoperation.js';\nimport { RenameOperation } from './operation/renameoperation.js';\nimport { RootAttributeOperation } from './operation/rootattributeoperation.js';\nimport { RootOperation } from './operation/rootoperation.js';\nimport { SplitOperation } from './operation/splitoperation.js';\n\nimport { ModelDocumentFragment } from './documentfragment.js';\nimport { ModelDocumentSelection } from './documentselection.js';\nimport { ModelElement } from './element.js';\nimport { ModelPosition, type ModelPositionOffset, type ModelPositionStickiness } from './position.js';\nimport { ModelRange } from './range.js';\nimport { ModelRootElement } from './rootelement.js';\nimport { ModelText } from './text.js';\n\nimport type { Marker } from './markercollection.js';\nimport type { ModelSelection, ModelPlaceOrOffset, ModelSelectable } from './selection.js';\nimport { type Batch } from './batch.js';\nimport { type ModelItem } from './item.js';\nimport { type Model } from './model.js';\nimport type { ModelNode, ModelNodeAttributes } from './node.js';\n\nimport { CKEditorError, logWarning, toMap } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The model can only be modified by using the writer. It should be used whenever you want to create a node, modify\n * child nodes, attributes or text, set the selection's position and its attributes.\n *\n * The instance of the writer is only available in the {@link module:engine/model/model~Model#change `change()`} or\n * {@link module:engine/model/model~Model#enqueueChange `enqueueChange()`}.\n *\n * ```ts\n * model.change( writer => {\n * \twriter.insertText( 'foo', paragraph, 'end' );\n * } );\n * ```\n *\n * Note that the writer should never be stored and used outside of the `change()` and\n * `enqueueChange()` blocks.\n *\n * Note that writer's methods do not check the {@link module:engine/model/schema~ModelSchema}. It is possible\n * to create incorrect model structures by using the writer. Read more about in\n * {@glink framework/deep-dive/schema#who-checks-the-schema \"Who checks the schema?\"}.\n *\n * @see module:engine/model/model~Model#change\n * @see module:engine/model/model~Model#enqueueChange\n */\nexport class ModelWriter {\n\t/**\n\t * Instance of the model on which this writer operates.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * The batch to which this writer will add changes.\n\t */\n\tpublic readonly batch: Batch;\n\n\t/**\n\t * Creates a writer instance.\n\t *\n\t * **Note:** It is not recommended to use it directly. Use {@link module:engine/model/model~Model#change `Model#change()`} or\n\t * {@link module:engine/model/model~Model#enqueueChange `Model#enqueueChange()`} instead.\n\t *\n\t * @internal\n\t */\n\tconstructor( model: Model, batch: Batch ) {\n\t\tthis.model = model;\n\t\tthis.batch = batch;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/model/text~ModelText text node}.\n\t *\n\t * ```ts\n\t * writer.createText( 'foo' );\n\t * writer.createText( 'foo', { bold: true } );\n\t * ```\n\t *\n\t * @param data Text data.\n\t * @param attributes Text attributes.\n\t * @returns {module:engine/model/text~ModelText} Created text node.\n\t */\n\tpublic createText(\n\t\tdata: string,\n\t\tattributes?: ModelNodeAttributes\n\t): ModelText {\n\t\treturn new ModelText( data, attributes );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/model/element~ModelElement element}.\n\t *\n\t * ```ts\n\t * writer.createElement( 'paragraph' );\n\t * writer.createElement( 'paragraph', { alignment: 'center' } );\n\t * ```\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @returns Created element.\n\t */\n\tpublic createElement(\n\t\tname: string,\n\t\tattributes?: ModelNodeAttributes\n\t): ModelElement {\n\t\treturn new ModelElement( name, attributes );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/model/documentfragment~ModelDocumentFragment document fragment}.\n\t *\n\t * @returns Created document fragment.\n\t */\n\tpublic createDocumentFragment(): ModelDocumentFragment {\n\t\treturn new ModelDocumentFragment();\n\t}\n\n\t/**\n\t * Creates a copy of the element and returns it. Created element has the same name and attributes as the original element.\n\t * If clone is deep, the original element's children are also cloned. If not, then empty element is returned.\n\t *\n\t * @param element The element to clone.\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any child.\n\t */\n\tpublic cloneElement( element: ModelElement, deep: boolean = true ): ModelElement {\n\t\treturn element._clone( deep );\n\t}\n\n\t/**\n\t * Inserts item on given position.\n\t *\n\t * ```ts\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * writer.insert( paragraph, position );\n\t * ```\n\t *\n\t * Instead of using position you can use parent and offset:\n\t *\n\t * ```ts\n\t * const text = writer.createText( 'foo' );\n\t * writer.insert( text, paragraph, 5 );\n\t * ```\n\t *\n\t * You can also use `end` instead of the offset to insert at the end:\n\t *\n\t * ```ts\n\t * const text = writer.createText( 'foo' );\n\t * writer.insert( text, paragraph, 'end' );\n\t * ```\n\t *\n\t * Or insert before or after another element:\n\t *\n\t * ```ts\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * writer.insert( paragraph, anotherParagraph, 'after' );\n\t * ```\n\t *\n\t * These parameters works the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * Note that if the item already has parent it will be removed from the previous parent.\n\t *\n\t * Note that you cannot re-insert a node from a document to a different document or a document fragment. In this case,\n\t * `model-writer-insert-forbidden-move` is thrown.\n\t *\n\t * If you want to move {@link module:engine/model/range~ModelRange range} instead of an\n\t * {@link module:engine/model/item~ModelItem item} use {@link module:engine/model/writer~ModelWriter#move `Writer#move()`}.\n\t *\n\t * **Note:** For a paste-like content insertion mechanism see\n\t * {@link module:engine/model/model~Model#insertContent `model.insertContent()`}.\n\t *\n\t * @param item Item or document fragment to insert.\n\t * @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic insert(\n\t\titem: ModelItem | ModelDocumentFragment,\n\t\titemOrPosition: ModelItem | ModelDocumentFragment | ModelPosition,\n\t\toffset: ModelPositionOffset = 0\n\t): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( item instanceof ModelText && item.data == '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst position = ModelPosition._createAt( itemOrPosition, offset );\n\n\t\t// If item has a parent already.\n\t\tif ( item.parent ) {\n\t\t\t// We need to check if item is going to be inserted within the same document.\n\t\t\tif ( isSameTree( item.root, position.root ) ) {\n\t\t\t\t// If it's we just need to move it.\n\t\t\t\tthis.move( ModelRange._createOn( item ), position );\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// If it isn't the same root.\n\t\t\telse {\n\t\t\t\tif ( item.root.document ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Cannot move a node from a document to a different tree.\n\t\t\t\t\t * It is forbidden to move a node that was already in a document outside of it.\n\t\t\t\t\t *\n\t\t\t\t\t * @error model-writer-insert-forbidden-move\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t\t'model-writer-insert-forbidden-move',\n\t\t\t\t\t\tthis\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// Move between two different document fragments or from document fragment to a document is possible.\n\t\t\t\t\t// In that case, remove the item from it's original parent.\n\t\t\t\t\tthis.remove( item );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst version = position.root.document ? position.root.document.version : null;\n\n\t\tconst children = item instanceof ModelDocumentFragment ?\n\t\t\titem._removeChildren( 0, item.childCount ) :\n\t\t\titem;\n\n\t\tconst insert = new InsertOperation( position, children, version );\n\n\t\tif ( item instanceof ModelText ) {\n\t\t\tinsert.shouldReceiveAttributes = true;\n\t\t}\n\n\t\tthis.batch.addOperation( insert );\n\t\tthis.model.applyOperation( insert );\n\n\t\t// When element is a ModelDocumentFragment we need to move its markers to Document#markers.\n\t\tif ( item instanceof ModelDocumentFragment ) {\n\t\t\tfor ( const [ markerName, markerRange ] of item.markers ) {\n\t\t\t\t// We need to migrate marker range from ModelDocumentFragment to Document.\n\t\t\t\tconst rangeRootPosition = ModelPosition._createAt( markerRange.root, 0 );\n\t\t\t\tconst range = new ModelRange(\n\t\t\t\t\tmarkerRange.start._getCombined( rangeRootPosition, position ),\n\t\t\t\t\tmarkerRange.end._getCombined( rangeRootPosition, position )\n\t\t\t\t);\n\n\t\t\t\tconst options = { range, usingOperation: true, affectsData: true };\n\n\t\t\t\tif ( this.model.markers.has( markerName ) ) {\n\t\t\t\t\tthis.updateMarker( markerName, options );\n\t\t\t\t} else {\n\t\t\t\t\tthis.addMarker( markerName, options );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Creates and inserts text on given position.\n\t *\n\t * ```ts\n\t * writer.insertText( 'foo', position );\n\t * ```\n\t *\n\t * Instead of using position you can use parent and offset or define that text should be inserted at the end\n\t * or before or after other node:\n\t *\n\t * ```ts\n\t * // Inserts 'foo' in paragraph, at offset 5:\n\t * writer.insertText( 'foo', paragraph, 5 );\n\t * // Inserts 'foo' at the end of a paragraph:\n\t * writer.insertText( 'foo', paragraph, 'end' );\n\t * // Inserts 'foo' after an image:\n\t * writer.insertText( 'foo', image, 'after' );\n\t * ```\n\t *\n\t * These parameters work in the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * @label WITHOUT_ATTRIBUTES\n\t * @param text Text data.\n\t * @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic insertText(\n\t\ttext: string,\n\t\titemOrPosition?: ModelItem | ModelPosition,\n\t\toffset?: ModelPositionOffset\n\t): void;\n\n\t/**\n\t * Creates and inserts text with specified attributes on given position.\n\t *\n\t * ```ts\n\t * writer.insertText( 'foo', { bold: true }, position );\n\t * ```\n\t *\n\t * Instead of using position you can use parent and offset or define that text should be inserted at the end\n\t * or before or after other node:\n\t *\n\t * ```ts\n\t * // Inserts 'foo' in paragraph, at offset 5:\n\t * writer.insertText( 'foo', { bold: true }, paragraph, 5 );\n\t * // Inserts 'foo' at the end of a paragraph:\n\t * writer.insertText( 'foo', { bold: true }, paragraph, 'end' );\n\t * // Inserts 'foo' after an image:\n\t * writer.insertText( 'foo', { bold: true }, image, 'after' );\n\t * ```\n\t *\n\t * These parameters work in the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * @label WITH_ATTRIBUTES\n\t * @param text Text data.\n\t * @param attributes Text attributes.\n\t * @param offset Offset or one of the flags. Used only when third parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic insertText(\n\t\ttext: string,\n\t\tattributes?: ModelNodeAttributes,\n\t\titemOrPosition?: ModelItem | ModelPosition,\n\t\toffset?: ModelPositionOffset\n\t): void;\n\n\tpublic insertText(\n\t\ttext: string,\n\t\tattributes?: any, // Too complicated when not using `any`.\n\t\titemOrPosition?: any, // Too complicated when not using `any`.\n\t\toffset?: any // Too complicated when not using `any`.\n\t): void {\n\t\tif ( attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement || attributes instanceof ModelPosition ) {\n\t\t\tthis.insert( this.createText( text ), attributes, itemOrPosition );\n\t\t} else {\n\t\t\tthis.insert( this.createText( text, attributes ), itemOrPosition, offset );\n\t\t}\n\t}\n\n\t/**\n\t * Creates and inserts element on given position. You can optionally set attributes:\n\t *\n\t * ```ts\n\t * writer.insertElement( 'paragraph', position );\n\t * ```\n\t *\n\t * Instead of using position you can use parent and offset or define that text should be inserted at the end\n\t * or before or after other node:\n\t *\n\t * ```ts\n\t * // Inserts paragraph in the root at offset 5:\n\t * writer.insertElement( 'paragraph', root, 5 );\n\t * // Inserts paragraph at the end of a blockquote:\n\t * writer.insertElement( 'paragraph', blockquote, 'end' );\n\t * // Inserts after an image:\n\t * writer.insertElement( 'paragraph', image, 'after' );\n\t * ```\n\t *\n\t * These parameters works the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * @label WITHOUT_ATTRIBUTES\n\t * @param name Name of the element.\n\t * @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic insertElement(\n\t\tname: string,\n\t\titemOrPosition: ModelItem | ModelDocumentFragment | ModelPosition,\n\t\toffset?: ModelPositionOffset\n\t): void;\n\n\t/**\n\t * Creates and inserts element with specified attributes on given position.\n\t *\n\t * ```ts\n\t * writer.insertElement( 'paragraph', { alignment: 'center' }, position );\n\t * ```\n\t *\n\t * Instead of using position you can use parent and offset or define that text should be inserted at the end\n\t * or before or after other node:\n\t *\n\t * ```ts\n\t * // Inserts paragraph in the root at offset 5:\n\t * writer.insertElement( 'paragraph', { alignment: 'center' }, root, 5 );\n\t * // Inserts paragraph at the end of a blockquote:\n\t * writer.insertElement( 'paragraph', { alignment: 'center' }, blockquote, 'end' );\n\t * // Inserts after an image:\n\t * writer.insertElement( 'paragraph', { alignment: 'center' }, image, 'after' );\n\t * ```\n\t *\n\t * These parameters works the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * @label WITH_ATTRIBUTES\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @param offset Offset or one of the flags. Used only when third parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic insertElement(\n\t\tname: string,\n\t\tattributes: ModelNodeAttributes,\n\t\titemOrPosition: ModelItem | ModelDocumentFragment | ModelPosition,\n\t\toffset?: ModelPositionOffset\n\t): void;\n\n\tpublic insertElement(\n\t\tname: string,\n\t\tattributes: any, // Too complicated when not using `any`.\n\t\titemOrPositionOrOffset?: any, // Too complicated when not using `any`.\n\t\toffset?: any // Too complicated when not using `any`.\n\t): void {\n\t\tif ( attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement || attributes instanceof ModelPosition ) {\n\t\t\tthis.insert( this.createElement( name ), attributes, itemOrPositionOrOffset );\n\t\t} else {\n\t\t\tthis.insert( this.createElement( name, attributes ), itemOrPositionOrOffset, offset );\n\t\t}\n\t}\n\n\t/**\n\t * Inserts item at the end of the given parent.\n\t *\n\t * ```ts\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * writer.append( paragraph, root );\n\t * ```\n\t *\n\t * Note that if the item already has parent it will be removed from the previous parent.\n\t *\n\t * If you want to move {@link module:engine/model/range~ModelRange range} instead of an\n\t * {@link module:engine/model/item~ModelItem item} use {@link module:engine/model/writer~ModelWriter#move `Writer#move()`}.\n\t *\n\t * @param item Item or document fragment to insert.\n\t */\n\tpublic append( item: ModelItem | ModelDocumentFragment, parent: ModelElement | ModelDocumentFragment ): void {\n\t\tthis.insert( item, parent, 'end' );\n\t}\n\n\t/**\n\t * Creates text node and inserts it at the end of the parent.\n\t *\n\t * ```ts\n\t * writer.appendText( 'foo', paragraph );\n\t * ```\n\t *\n\t * @label WITHOUT_ATTRIBUTES\n\t * @param text Text data.\n\t */\n\tpublic appendText(\n\t\ttext: string,\n\t\tparent: ModelElement | ModelDocumentFragment\n\t): void;\n\n\t/**\n\t * Creates text node with specified attributes and inserts it at the end of the parent.\n\t *\n\t * ```ts\n\t * writer.appendText( 'foo', { bold: true }, paragraph );\n\t * ```\n\t *\n\t * @label WITH_ATTRIBUTES\n\t * @param text Text data.\n\t * @param attributes Text attributes.\n\t */\n\tpublic appendText(\n\t\ttext: string,\n\t\tattributes: ModelNodeAttributes,\n\t\tparent: ModelElement | ModelDocumentFragment\n\t): void;\n\n\tpublic appendText(\n\t\ttext: string,\n\t\tattributes: ModelNodeAttributes | ModelElement | ModelDocumentFragment,\n\t\tparent?: ModelElement | ModelDocumentFragment\n\t): void {\n\t\tif ( attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement ) {\n\t\t\tthis.insert( this.createText( text ), attributes, 'end' );\n\t\t} else {\n\t\t\tthis.insert( this.createText( text, attributes ), parent!, 'end' );\n\t\t}\n\t}\n\n\t/**\n\t * Creates element and inserts it at the end of the parent.\n\t *\n\t * ```ts\n\t * writer.appendElement( 'paragraph', root );\n\t * ```\n\t *\n\t * @label WITHOUT_ATTRIBUTES\n\t * @param name Name of the element.\n\t */\n\tpublic appendElement(\n\t\tname: string,\n\t\tparent: ModelElement | ModelDocumentFragment\n\t): void;\n\n\t/**\n\t * Creates element with specified attributes and inserts it at the end of the parent.\n\t *\n\t * ```ts\n\t * writer.appendElement( 'paragraph', { alignment: 'center' }, root );\n\t * ```\n\t *\n\t * @label WITH_ATTRIBUTES\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t */\n\tpublic appendElement(\n\t\tname: string,\n\t\tattributes: ModelNodeAttributes,\n\t\tparent: ModelElement | ModelDocumentFragment\n\t): void;\n\n\tpublic appendElement(\n\t\tname: string,\n\t\tattributes: ModelNodeAttributes | ModelElement | ModelDocumentFragment,\n\t\tparent?: ModelElement | ModelDocumentFragment\n\t): void {\n\t\tif ( attributes instanceof ModelDocumentFragment || attributes instanceof ModelElement ) {\n\t\t\tthis.insert( this.createElement( name ), attributes, 'end' );\n\t\t} else {\n\t\t\tthis.insert( this.createElement( name, attributes ), parent!, 'end' );\n\t\t}\n\t}\n\n\t/**\n\t * Sets value of the attribute with given key on a {@link module:engine/model/item~ModelItem model item}\n\t * or on a {@link module:engine/model/range~ModelRange range}.\n\t *\n\t * @param key Attribute key.\n\t * @param value Attribute new value.\n\t * @param itemOrRange Model item or range on which the attribute will be set.\n\t */\n\tpublic setAttribute( key: string, value: unknown, itemOrRange: ModelItem | ModelRange ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( itemOrRange instanceof ModelRange ) {\n\t\t\tconst ranges = itemOrRange.getMinimalFlatRanges();\n\n\t\t\tfor ( const range of ranges ) {\n\t\t\t\tsetAttributeOnRange( this, key, value, range );\n\t\t\t}\n\t\t} else {\n\t\t\tsetAttributeOnItem( this, key, value, itemOrRange );\n\t\t}\n\t}\n\n\t/**\n\t * Sets values of attributes on a {@link module:engine/model/item~ModelItem model item}\n\t * or on a {@link module:engine/model/range~ModelRange range}.\n\t *\n\t * ```ts\n\t * writer.setAttributes( {\n\t * \tbold: true,\n\t * \titalic: true\n\t * }, range );\n\t * ```\n\t *\n\t * @param attributes Attributes keys and values.\n\t * @param itemOrRange Model item or range on which the attributes will be set.\n\t */\n\tpublic setAttributes(\n\t\tattributes: ModelNodeAttributes,\n\t\titemOrRange: ModelItem | ModelRange\n\t): void {\n\t\tfor ( const [ key, val ] of toMap( attributes ) ) {\n\t\t\tthis.setAttribute( key, val, itemOrRange );\n\t\t}\n\t}\n\n\t/**\n\t * Removes an attribute with given key from a {@link module:engine/model/item~ModelItem model item}\n\t * or from a {@link module:engine/model/range~ModelRange range}.\n\t *\n\t * @param key Attribute key.\n\t * @param itemOrRange Model item or range from which the attribute will be removed.\n\t */\n\tpublic removeAttribute( key: string, itemOrRange: ModelItem | ModelRange ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( itemOrRange instanceof ModelRange ) {\n\t\t\tconst ranges = itemOrRange.getMinimalFlatRanges();\n\n\t\t\tfor ( const range of ranges ) {\n\t\t\t\tsetAttributeOnRange( this, key, null, range );\n\t\t\t}\n\t\t} else {\n\t\t\tsetAttributeOnItem( this, key, null, itemOrRange );\n\t\t}\n\t}\n\n\t/**\n\t * Removes all attributes from all elements in the range or from the given item.\n\t *\n\t * @param itemOrRange Model item or range from which all attributes will be removed.\n\t */\n\tpublic clearAttributes( itemOrRange: ModelItem | ModelRange ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tconst removeAttributesFromItem = ( item: ModelItem ) => {\n\t\t\tfor ( const attribute of item.getAttributeKeys() ) {\n\t\t\t\tthis.removeAttribute( attribute, item );\n\t\t\t}\n\t\t};\n\n\t\tif ( !( itemOrRange instanceof ModelRange ) ) {\n\t\t\tremoveAttributesFromItem( itemOrRange );\n\t\t} else {\n\t\t\tfor ( const item of itemOrRange.getItems() ) {\n\t\t\t\tremoveAttributesFromItem( item );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Moves all items in the source range to the target position.\n\t *\n\t * ```ts\n\t * writer.move( sourceRange, targetPosition );\n\t * ```\n\t *\n\t * Instead of the target position you can use parent and offset or define that range should be moved to the end\n\t * or before or after chosen item:\n\t *\n\t * ```ts\n\t * // Moves all items in the range to the paragraph at offset 5:\n\t * writer.move( sourceRange, paragraph, 5 );\n\t * // Moves all items in the range to the end of a blockquote:\n\t * writer.move( sourceRange, blockquote, 'end' );\n\t * // Moves all items in the range to a position after an image:\n\t * writer.move( sourceRange, image, 'after' );\n\t * ```\n\t *\n\t * These parameters work the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * Note that items can be moved only within the same tree. It means that you can move items within the same root\n\t * (element or document fragment) or between {@link module:engine/model/document~ModelDocument#roots documents roots},\n\t * but you cannot move items from document fragment to the document or from one detached element to another. Use\n\t * {@link module:engine/model/writer~ModelWriter#insert} in such cases.\n\t *\n\t * @param range Source range.\n\t * @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic move(\n\t\trange: ModelRange,\n\t\titemOrPosition: ModelItem | ModelPosition,\n\t\toffset?: ModelPositionOffset\n\t): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( !( range instanceof ModelRange ) ) {\n\t\t\t/**\n\t\t\t * Invalid range to move.\n\t\t\t *\n\t\t\t * @error writer-move-invalid-range\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-move-invalid-range', this );\n\t\t}\n\n\t\tif ( !range.isFlat ) {\n\t\t\t/**\n\t\t\t * Range to move is not flat.\n\t\t\t *\n\t\t\t * @error writer-move-range-not-flat\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-move-range-not-flat', this );\n\t\t}\n\n\t\tconst position = ModelPosition._createAt( itemOrPosition, offset );\n\n\t\t// Do not move anything if the move target is same as moved range start.\n\t\tif ( position.isEqual( range.start ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If part of the marker is removed, create additional marker operation for undo purposes.\n\t\tthis._addOperationForAffectedMarkers( 'move', range );\n\n\t\tif ( !isSameTree( range.root, position.root ) ) {\n\t\t\t/**\n\t\t\t * Range is going to be moved within not the same document. Please use\n\t\t\t * {@link module:engine/model/writer~ModelWriter#insert insert} instead.\n\t\t\t *\n\t\t\t * @error writer-move-different-document\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-move-different-document', this );\n\t\t}\n\n\t\tconst version = range.root.document ? range.root.document.version : null;\n\t\tconst operation = new MoveOperation( range.start, range.end.offset - range.start.offset, position, version );\n\n\t\tthis.batch.addOperation( operation );\n\t\tthis.model.applyOperation( operation );\n\t}\n\n\t/**\n\t * Removes given model {@link module:engine/model/item~ModelItem item} or {@link module:engine/model/range~ModelRange range}.\n\t *\n\t * @param itemOrRange Model item or range to remove.\n\t */\n\tpublic remove( itemOrRange: ModelItem | ModelRange ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tconst rangeToRemove = itemOrRange instanceof ModelRange ? itemOrRange : ModelRange._createOn( itemOrRange );\n\t\tconst ranges = rangeToRemove.getMinimalFlatRanges().reverse();\n\n\t\tfor ( const flat of ranges ) {\n\t\t\t// If part of the marker is removed, create additional marker operation for undo purposes.\n\t\t\tthis._addOperationForAffectedMarkers( 'move', flat );\n\n\t\t\tapplyRemoveOperation( flat.start, flat.end.offset - flat.start.offset, this.batch, this.model );\n\t\t}\n\t}\n\n\t/**\n\t * Merges two siblings at the given position.\n\t *\n\t * Node before and after the position have to be an element. Otherwise `writer-merge-no-element-before` or\n\t * `writer-merge-no-element-after` error will be thrown.\n\t *\n\t * @param position Position between merged elements.\n\t */\n\tpublic merge( position: ModelPosition ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tconst nodeBefore = position.nodeBefore;\n\t\tconst nodeAfter = position.nodeAfter;\n\n\t\t// If part of the marker is removed, create additional marker operation for undo purposes.\n\t\tthis._addOperationForAffectedMarkers( 'merge', position );\n\n\t\tif ( !( nodeBefore instanceof ModelElement ) ) {\n\t\t\t/**\n\t\t\t * Node before merge position must be an element.\n\t\t\t *\n\t\t\t * @error writer-merge-no-element-before\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-merge-no-element-before', this );\n\t\t}\n\n\t\tif ( !( nodeAfter instanceof ModelElement ) ) {\n\t\t\t/**\n\t\t\t * Node after merge position must be an element.\n\t\t\t *\n\t\t\t * @error writer-merge-no-element-after\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-merge-no-element-after', this );\n\t\t}\n\n\t\tif ( !position.root.document ) {\n\t\t\tthis._mergeDetached( position );\n\t\t} else {\n\t\t\tthis._merge( position );\n\t\t}\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionFromPath `Model#createPositionFromPath()`}.\n\t *\n\t * @param root Root of the position.\n\t * @param path Position path. See {@link module:engine/model/position~ModelPosition#path}.\n\t * @param stickiness Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t */\n\tpublic createPositionFromPath(\n\t\troot: ModelElement | ModelDocumentFragment,\n\t\tpath: ReadonlyArray<number>,\n\t\tstickiness?: ModelPositionStickiness\n\t): ModelPosition {\n\t\treturn this.model.createPositionFromPath( root, path, stickiness );\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionAt `Model#createPositionAt()`}.\n\t *\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic createPositionAt(\n\t\titemOrPosition: ModelItem | ModelPosition | ModelDocumentFragment,\n\t\toffset?: ModelPositionOffset\n\t): ModelPosition {\n\t\treturn this.model.createPositionAt( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionAfter `Model#createPositionAfter()`}.\n\t *\n\t * @param item Item after which the position should be placed.\n\t */\n\tpublic createPositionAfter( item: ModelItem ): ModelPosition {\n\t\treturn this.model.createPositionAfter( item );\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionBefore `Model#createPositionBefore()`}.\n\t *\n\t * @param item Item after which the position should be placed.\n\t */\n\tpublic createPositionBefore( item: ModelItem ): ModelPosition {\n\t\treturn this.model.createPositionBefore( item );\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createRange `Model#createRange()`}.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */\n\tpublic createRange( start: ModelPosition, end?: ModelPosition ): ModelRange {\n\t\treturn this.model.createRange( start, end );\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createRangeIn `Model#createRangeIn()`}.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic createRangeIn( element: ModelElement | ModelDocumentFragment ): ModelRange {\n\t\treturn this.model.createRangeIn( element );\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createRangeOn `Model#createRangeOn()`}.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic createRangeOn( element: ModelItem ): ModelRange {\n\t\treturn this.model.createRangeOn( element );\n\t}\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createSelection:NODE_OFFSET `Model#createSelection()`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic createSelection( selectable: ModelNode, placeOrOffset: ModelPlaceOrOffset, options?: { backward?: boolean } ): ModelSelection;\n\n\t/**\n\t * Shortcut for {@link module:engine/model/model~Model#createSelection:SELECTABLE `Model#createSelection()`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic createSelection( selectable?: Exclude<ModelSelectable, ModelNode>, options?: { backward?: boolean } ): ModelSelection;\n\n\tpublic createSelection( ...args: [ any?, any?, any? ] ): ModelSelection {\n\t\treturn this.model.createSelection( ...args );\n\t}\n\n\t/**\n\t * Performs merge action in a detached tree.\n\t *\n\t * @param position Position between merged elements.\n\t */\n\tprivate _mergeDetached( position: ModelPosition ): void {\n\t\tconst nodeBefore = position.nodeBefore;\n\t\tconst nodeAfter = position.nodeAfter;\n\n\t\tthis.move( ModelRange._createIn( nodeAfter as any ), ModelPosition._createAt( nodeBefore!, 'end' ) );\n\t\tthis.remove( nodeAfter! );\n\t}\n\n\t/**\n\t * Performs merge action in a non-detached tree.\n\t *\n\t * @param position Position between merged elements.\n\t */\n\tprivate _merge( position: ModelPosition ): void {\n\t\tconst targetPosition = ModelPosition._createAt( position.nodeBefore!, 'end' );\n\t\tconst sourcePosition = ModelPosition._createAt( position.nodeAfter!, 0 );\n\n\t\tconst graveyard = position.root.document!.graveyard;\n\t\tconst graveyardPosition = new ModelPosition( graveyard, [ 0 ] );\n\n\t\tconst version = position.root.document!.version;\n\n\t\tconst merge = new MergeOperation(\n\t\t\tsourcePosition,\n\t\t\t( position.nodeAfter as any ).maxOffset,\n\t\t\ttargetPosition,\n\t\t\tgraveyardPosition,\n\t\t\tversion\n\t\t);\n\n\t\tthis.batch.addOperation( merge );\n\t\tthis.model.applyOperation( merge );\n\t}\n\n\t/**\n\t * Renames the given element.\n\t *\n\t * @param element The element to rename.\n\t * @param newName New element name.\n\t */\n\tpublic rename( element: ModelElement | ModelDocumentFragment, newName: string ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( !( element instanceof ModelElement ) ) {\n\t\t\t/**\n\t\t\t * Trying to rename an object which is not an instance of Element.\n\t\t\t *\n\t\t\t * @error writer-rename-not-element-instance\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'writer-rename-not-element-instance',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tconst version = element.root.document ? element.root.document.version : null;\n\t\tconst renameOperation = new RenameOperation( ModelPosition._createBefore( element ), element.name, newName, version );\n\n\t\tthis.batch.addOperation( renameOperation );\n\t\tthis.model.applyOperation( renameOperation );\n\t}\n\n\t/**\n\t * Splits elements starting from the given position and going to the top of the model tree as long as given\n\t * `limitElement` is reached. When `limitElement` is not defined then only the parent of the given position will be split.\n\t *\n\t * The element needs to have a parent. It cannot be a root element nor a document fragment.\n\t * The `writer-split-element-no-parent` error will be thrown if you try to split an element with no parent.\n\t *\n\t * @param position Position of split.\n\t * @param limitElement Stop splitting when this element will be reached.\n\t * @returns Split result with properties:\n\t * * `position` - Position between split elements.\n\t * * `range` - Range that stars from the end of the first split element and ends at the beginning of the first copy element.\n\t */\n\tpublic split(\n\t\tposition: ModelPosition,\n\t\tlimitElement?: ModelNode | ModelDocumentFragment\n\t): { position: ModelPosition; range: ModelRange } {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tlet splitElement = position.parent;\n\n\t\tif ( !splitElement.parent ) {\n\t\t\t/**\n\t\t\t * Element with no parent cannot be split.\n\t\t\t *\n\t\t\t * @error writer-split-element-no-parent\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-split-element-no-parent', this );\n\t\t}\n\n\t\t// When limit element is not defined lets set splitElement parent as limit.\n\t\tif ( !limitElement ) {\n\t\t\tlimitElement = splitElement.parent;\n\t\t}\n\n\t\tif ( !position.parent.getAncestors( { includeSelf: true } ).includes( limitElement! ) ) {\n\t\t\t/**\n\t\t\t * Limit element is not a position ancestor.\n\t\t\t *\n\t\t\t * @error writer-split-invalid-limit-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-split-invalid-limit-element', this );\n\t\t}\n\n\t\t// We need to cache elements that will be created as a result of the first split because\n\t\t// we need to create a range from the end of the first split element to the beginning of the\n\t\t// first copy element. This should be handled by ModelLiveRange but it doesn't work on detached nodes.\n\t\tlet firstSplitElement: ModelElement | ModelDocumentFragment | undefined;\n\t\tlet firstCopyElement: ModelNode | null | undefined;\n\n\t\tdo {\n\t\t\tconst version = splitElement.root.document ? splitElement.root.document.version : null;\n\t\t\tconst howMany = splitElement.maxOffset - position.offset;\n\n\t\t\tconst insertionPosition = SplitOperation.getInsertionPosition( position );\n\t\t\tconst split = new SplitOperation( position, howMany, insertionPosition, null, version );\n\n\t\t\tthis.batch.addOperation( split );\n\t\t\tthis.model.applyOperation( split );\n\n\t\t\t// Cache result of the first split.\n\t\t\tif ( !firstSplitElement && !firstCopyElement ) {\n\t\t\t\tfirstSplitElement = splitElement;\n\t\t\t\tfirstCopyElement = position.parent.nextSibling;\n\t\t\t}\n\n\t\t\tposition = this.createPositionAfter( position.parent as any );\n\t\t\tsplitElement = position.parent;\n\t\t} while ( splitElement !== limitElement );\n\n\t\treturn {\n\t\t\tposition,\n\t\t\trange: new ModelRange( ModelPosition._createAt( firstSplitElement!, 'end' ), ModelPosition._createAt( firstCopyElement!, 0 ) )\n\t\t};\n\t}\n\n\t/**\n\t * Wraps the given range with the given element or with a new element (if a string was passed).\n\t *\n\t * **Note:** range to wrap should be a \"flat range\" (see {@link module:engine/model/range~ModelRange#isFlat `Range#isFlat`}).\n\t * If not, an error will be thrown.\n\t *\n\t * @param range Range to wrap.\n\t * @param elementOrString Element or name of element to wrap the range with.\n\t */\n\tpublic wrap( range: ModelRange, elementOrString: ModelElement | string ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( !range.isFlat ) {\n\t\t\t/**\n\t\t\t * Range to wrap is not flat.\n\t\t\t *\n\t\t\t * @error writer-wrap-range-not-flat\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-wrap-range-not-flat', this );\n\t\t}\n\n\t\tconst element = elementOrString instanceof ModelElement ? elementOrString : new ModelElement( elementOrString );\n\n\t\tif ( element.childCount > 0 ) {\n\t\t\t/**\n\t\t\t * Element to wrap with is not empty.\n\t\t\t *\n\t\t\t * @error writer-wrap-element-not-empty\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-wrap-element-not-empty', this );\n\t\t}\n\n\t\tif ( element.parent !== null ) {\n\t\t\t/**\n\t\t\t * Element to wrap with is already attached to a tree model.\n\t\t\t *\n\t\t\t * @error writer-wrap-element-attached\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-wrap-element-attached', this );\n\t\t}\n\n\t\tthis.insert( element, range.start );\n\n\t\t// Shift the range-to-wrap because we just inserted an element before that range.\n\t\tconst shiftedRange = new ModelRange( range.start.getShiftedBy( 1 ), range.end.getShiftedBy( 1 ) );\n\n\t\tthis.move( shiftedRange, ModelPosition._createAt( element, 0 ) );\n\t}\n\n\t/**\n\t * Unwraps children of the given element – all its children are moved before it and then the element is removed.\n\t * Throws error if you try to unwrap an element which does not have a parent.\n\t *\n\t * @param element Element to unwrap.\n\t */\n\tpublic unwrap( element: ModelElement ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( element.parent === null ) {\n\t\t\t/**\n\t\t\t * Trying to unwrap an element which has no parent.\n\t\t\t *\n\t\t\t * @error writer-unwrap-element-no-parent\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-unwrap-element-no-parent', this );\n\t\t}\n\n\t\tthis.move( ModelRange._createIn( element ), this.createPositionAfter( element ) );\n\t\tthis.remove( element );\n\t}\n\n\t/**\n\t * Adds a {@link module:engine/model/markercollection~Marker marker}. Marker is a named range, which tracks\n\t * changes in the document and updates its range automatically, when model tree changes.\n\t *\n\t * As the first parameter you can set marker name.\n\t *\n\t * The required `options.usingOperation` parameter lets you decide if the marker should be managed by operations or not. See\n\t * {@link module:engine/model/markercollection~Marker marker class description} to learn about the difference between\n\t * markers managed by operations and not-managed by operations.\n\t *\n\t * The `options.affectsData` parameter, which defaults to `false`, allows you to define if a marker affects the data. It should be\n\t * `true` when the marker change changes the data returned by the\n\t * {@link module:core/editor/editor~Editor#getData `editor.getData()`} method.\n\t * When set to `true` it fires the {@link module:engine/model/document~ModelDocument#event:change:data `change:data`} event.\n\t * When set to `false` it fires the {@link module:engine/model/document~ModelDocument#event:change `change`} event.\n\t *\n\t * Create marker directly base on marker's name:\n\t *\n\t * ```ts\n\t * addMarker( markerName, { range, usingOperation: false } );\n\t * ```\n\t *\n\t * Create marker using operation:\n\t *\n\t * ```ts\n\t * addMarker( markerName, { range, usingOperation: true } );\n\t * ```\n\t *\n\t * Create marker that affects the editor data:\n\t *\n\t * ```ts\n\t * addMarker( markerName, { range, usingOperation: false, affectsData: true } );\n\t * ```\n\t *\n\t * Note: For efficiency reasons, it's best to create and keep as little markers as possible.\n\t *\n\t * @see module:engine/model/markercollection~Marker\n\t * @param name Name of a marker to create - must be unique.\n\t * @param options.usingOperation Flag indicating that the marker should be added by MarkerOperation.\n\t * See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.\n\t * @param options.range Marker range.\n\t * @param options.affectsData Flag indicating that the marker changes the editor data.\n\t * @returns Marker that was set.\n\t */\n\tpublic addMarker(\n\t\tname: string,\n\t\toptions: {\n\t\t\tusingOperation: boolean;\n\t\t\taffectsData?: boolean;\n\t\t\trange: ModelRange;\n\t\t}\n\t): Marker {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( !options || typeof options.usingOperation != 'boolean' ) {\n\t\t\t/**\n\t\t\t * The `options.usingOperation` parameter is required when adding a new marker.\n\t\t\t *\n\t\t\t * @error writer-addmarker-no-usingoperation\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-addmarker-no-usingoperation', this );\n\t\t}\n\n\t\tconst usingOperation = options.usingOperation;\n\t\tconst range = options.range;\n\t\tconst affectsData = options.affectsData === undefined ? false : options.affectsData;\n\n\t\tif ( this.model.markers.has( name ) ) {\n\t\t\t/**\n\t\t\t * Marker with provided name already exists.\n\t\t\t *\n\t\t\t * @error writer-addmarker-marker-exists\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-addmarker-marker-exists', this );\n\t\t}\n\n\t\tif ( !range ) {\n\t\t\t/**\n\t\t\t * Range parameter is required when adding a new marker.\n\t\t\t *\n\t\t\t * @error writer-addmarker-no-range\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-addmarker-no-range', this );\n\t\t}\n\n\t\tif ( !usingOperation ) {\n\t\t\treturn this.model.markers._set( name, range, usingOperation, affectsData );\n\t\t}\n\n\t\tapplyMarkerOperation( this, name, null, range, affectsData );\n\n\t\treturn this.model.markers.get( name )!;\n\t}\n\n\t/**\n\t * Adds, updates or refreshes a {@link module:engine/model/markercollection~Marker marker}. Marker is a named range, which tracks\n\t * changes in the document and updates its range automatically, when model tree changes. Still, it is possible to change the\n\t * marker's range directly using this method.\n\t *\n\t * As the first parameter you can set marker name or instance. If none of them is provided, new marker, with a unique\n\t * name is created and returned.\n\t *\n\t * **Note**: If you want to change the {@link module:engine/view/element~ViewElement view element}\n\t * of the marker while its data in the model\n\t * remains the same, use the dedicated {@link module:engine/controller/editingcontroller~EditingController#reconvertMarker} method.\n\t *\n\t * The `options.usingOperation` parameter lets you change if the marker should be managed by operations or not. See\n\t * {@link module:engine/model/markercollection~Marker marker class description} to learn about the difference between\n\t * markers managed by operations and not-managed by operations. It is possible to change this option for an existing marker.\n\t *\n\t * The `options.affectsData` parameter, which defaults to `false`, allows you to define if a marker affects the data. It should be\n\t * `true` when the marker change changes the data returned by\n\t * the {@link module:core/editor/editor~Editor#getData `editor.getData()`} method.\n\t * When set to `true` it fires the {@link module:engine/model/document~ModelDocument#event:change:data `change:data`} event.\n\t * When set to `false` it fires the {@link module:engine/model/document~ModelDocument#event:change `change`} event.\n\t *\n\t * Update marker directly base on marker's name:\n\t *\n\t * ```ts\n\t * updateMarker( markerName, { range } );\n\t * ```\n\t *\n\t * Update marker using operation:\n\t *\n\t * ```ts\n\t * updateMarker( marker, { range, usingOperation: true } );\n\t * updateMarker( markerName, { range, usingOperation: true } );\n\t * ```\n\t *\n\t * Change marker's option (start using operations to manage it):\n\t *\n\t * ```ts\n\t * updateMarker( marker, { usingOperation: true } );\n\t * ```\n\t *\n\t * Change marker's option (inform the engine, that the marker does not affect the data anymore):\n\t *\n\t * ```ts\n\t * updateMarker( markerName, { affectsData: false } );\n\t * ```\n\t *\n\t * @see module:engine/model/markercollection~Marker\n\t * @param markerOrName Name of a marker to update, or a marker instance.\n\t * @param options If options object is not defined then marker will be refreshed by triggering\n\t * downcast conversion for this marker with the same data.\n\t * @param options.range Marker range to update.\n\t * @param options.usingOperation Flag indicated whether the marker should be added by MarkerOperation.\n\t * See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.\n\t * @param options.affectsData Flag indicating that the marker changes the editor data.\n\t */\n\tpublic updateMarker(\n\t\tmarkerOrName: string | Marker,\n\t\toptions?: {\n\t\t\trange?: ModelRange;\n\t\t\tusingOperation?: boolean;\n\t\t\taffectsData?: boolean;\n\t\t}\n\t): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tconst markerName = typeof markerOrName == 'string' ? markerOrName : markerOrName.name;\n\t\tconst currentMarker = this.model.markers.get( markerName );\n\n\t\tif ( !currentMarker ) {\n\t\t\t/**\n\t\t\t * Marker with provided name does not exist and will not be updated.\n\t\t\t *\n\t\t\t * @error writer-updatemarker-marker-not-exists\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-updatemarker-marker-not-exists', this );\n\t\t}\n\n\t\tif ( !options ) {\n\t\t\t/**\n\t\t\t * The usage of `writer.updateMarker()` only to reconvert (refresh) a\n\t\t\t * {@link module:engine/model/markercollection~Marker model marker} was deprecated and may not work in the future.\n\t\t\t * Please update your code to use\n\t\t\t * {@link module:engine/controller/editingcontroller~EditingController#reconvertMarker `editor.editing.reconvertMarker()`}\n\t\t\t * instead.\n\t\t\t *\n\t\t\t * @error writer-updatemarker-reconvert-using-editingcontroller\n\t\t\t * @param markerName The name of the updated marker.\n\t\t\t */\n\t\t\tlogWarning( 'writer-updatemarker-reconvert-using-editingcontroller', { markerName } );\n\n\t\t\tthis.model.markers._refresh( currentMarker );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst hasUsingOperationDefined = typeof options.usingOperation == 'boolean';\n\t\tconst affectsDataDefined = typeof options.affectsData == 'boolean';\n\n\t\t// Use previously defined marker's affectsData if the property is not provided.\n\t\tconst affectsData = affectsDataDefined ? options.affectsData : currentMarker.affectsData;\n\n\t\tif ( !hasUsingOperationDefined && !options.range && !affectsDataDefined ) {\n\t\t\t/**\n\t\t\t * One of the options is required - provide range, usingOperations or affectsData.\n\t\t\t *\n\t\t\t * @error writer-updatemarker-wrong-options\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-updatemarker-wrong-options', this );\n\t\t}\n\n\t\tconst currentRange = currentMarker.getRange();\n\t\tconst updatedRange = options.range ? options.range : currentRange;\n\n\t\tif ( hasUsingOperationDefined && options.usingOperation !== currentMarker.managedUsingOperations ) {\n\t\t\t// The marker type is changed so it's necessary to create proper operations.\n\t\t\tif ( options.usingOperation ) {\n\t\t\t\t// If marker changes to a managed one treat this as synchronizing existing marker.\n\t\t\t\t// Create `MarkerOperation` with `oldRange` set to `null`, so reverse operation will remove the marker.\n\t\t\t\tapplyMarkerOperation( this, markerName, null, updatedRange, affectsData );\n\t\t\t} else {\n\t\t\t\t// If marker changes to a marker that do not use operations then we need to create additional operation\n\t\t\t\t// that removes that marker first.\n\t\t\t\tapplyMarkerOperation( this, markerName, currentRange, null, affectsData );\n\n\t\t\t\t// Although not managed the marker itself should stay in model and its range should be preserver or changed to passed range.\n\t\t\t\tthis.model.markers._set( markerName, updatedRange, undefined, affectsData );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Marker's type doesn't change so update it accordingly.\n\t\tif ( currentMarker.managedUsingOperations ) {\n\t\t\tapplyMarkerOperation( this, markerName, currentRange, updatedRange, affectsData );\n\t\t} else {\n\t\t\tthis.model.markers._set( markerName, updatedRange, undefined, affectsData );\n\t\t}\n\t}\n\n\t/**\n\t * Removes given {@link module:engine/model/markercollection~Marker marker} or marker with given name.\n\t * The marker is removed accordingly to how it has been created, so if the marker was created using operation,\n\t * it will be destroyed using operation.\n\t *\n\t * @param markerOrName Marker or marker name to remove.\n\t */\n\tpublic removeMarker( markerOrName: string | Marker ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tconst name = typeof markerOrName == 'string' ? markerOrName : markerOrName.name;\n\n\t\tif ( !this.model.markers.has( name ) ) {\n\t\t\t/**\n\t\t\t * Trying to remove marker which does not exist.\n\t\t\t *\n\t\t\t * @error writer-removemarker-no-marker\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-removemarker-no-marker', this );\n\t\t}\n\n\t\tconst marker = this.model.markers.get( name )!;\n\n\t\tif ( !marker.managedUsingOperations ) {\n\t\t\tthis.model.markers._remove( name );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst oldRange = marker.getRange();\n\n\t\tapplyMarkerOperation( this, name, oldRange, null, marker.affectsData );\n\t}\n\n\t/**\n\t * Adds a new root to the document (or re-attaches a {@link #detachRoot detached root}).\n\t *\n\t * Throws an error, if trying to add a root that is already added and attached.\n\t *\n\t * **Note:** The default `elementName` value is `'$root'`. When the editor uses a custom root\n\t * {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the configured model element\n\t * name explicitly so the added root matches the schema the features expect.\n\t * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t *\n\t * @param rootName Name of the added root.\n\t * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined\n\t * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.\n\t * @returns The added root element.\n\t */\n\tpublic addRoot( rootName: string, elementName = '$root' ): ModelRootElement {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tconst root = this.model.document.getRoot( rootName );\n\n\t\tif ( root && root.isAttached() ) {\n\t\t\t/**\n\t\t\t * Root with provided name already exists and is attached.\n\t\t\t *\n\t\t\t * @error writer-addroot-root-exists\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-addroot-root-exists', this );\n\t\t}\n\n\t\tconst document = this.model.document;\n\t\tconst operation = new RootOperation( rootName, elementName, true, document, document.version );\n\n\t\tthis.batch.addOperation( operation );\n\t\tthis.model.applyOperation( operation );\n\n\t\treturn this.model.document.getRoot( rootName )!;\n\t}\n\n\t/**\n\t * Detaches the root from the document.\n\t *\n\t * All content and markers are removed from the root upon detaching. New content and new markers cannot be added to the root, as long\n\t * as it is detached.\n\t *\n\t * A root cannot be fully removed from the document, it can be only detached. A root is permanently removed only after you\n\t * re-initialize the editor and do not specify the root in the initial data.\n\t *\n\t * A detached root can be re-attached using {@link #addRoot}.\n\t *\n\t * Throws an error if the root does not exist or the root is already detached.\n\t *\n\t * @param rootOrName Name of the detached root.\n\t */\n\tpublic detachRoot( rootOrName: string | ModelRootElement ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tconst root = typeof rootOrName == 'string' ? this.model.document.getRoot( rootOrName ) : rootOrName;\n\n\t\tif ( !root || !root.isAttached() ) {\n\t\t\t/**\n\t\t\t * Root with provided name does not exist or is already detached.\n\t\t\t *\n\t\t\t * @error writer-detachroot-no-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'writer-detachroot-no-root', this );\n\t\t}\n\n\t\t// First, remove all markers from the root. It is better to do it before removing stuff for undo purposes.\n\t\t// However, looking through all the markers may not be the best performance wise. But there's no better solution for now.\n\t\tfor ( const marker of this.model.markers ) {\n\t\t\tif ( marker.getRange().root === root ) {\n\t\t\t\tthis.removeMarker( marker );\n\t\t\t}\n\t\t}\n\n\t\t// Remove all attributes from the root.\n\t\tfor ( const key of root.getAttributeKeys() ) {\n\t\t\tthis.removeAttribute( key, root );\n\t\t}\n\n\t\t// Remove all contents of the root.\n\t\tthis.remove( this.createRangeIn( root ) );\n\n\t\t// Finally, detach the root.\n\t\tconst document = this.model.document;\n\t\tconst operation = new RootOperation( root.rootName, root.name, false, document, document.version );\n\n\t\tthis.batch.addOperation( operation );\n\t\tthis.model.applyOperation( operation );\n\t}\n\n\t/**\n\t * Sets the document's selection (ranges and direction) to the specified location based on the given\n\t * {@link module:engine/model/selection~ModelSelectable selectable} or creates an empty selection if no arguments were passed.\n\t *\n\t * ```ts\n\t * // Sets collapsed selection at the position of the given node and an offset.\n\t * writer.setSelection( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * writer.setSelection( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on an {@link module:engine/model/item~ModelItem item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * writer.setSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Writer#setSelection()` allow passing additional options (`backward`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * writer.setSelection( element, 'in', { backward: true } );\n\t * ```\n\t *\n\t * Throws `writer-incorrect-use` error when the writer is used outside the `change()` block.\n\t *\n\t * See also: {@link #setSelection:SELECTABLE `setSelection( selectable, options )`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic setSelection( selectable: ModelNode, placeOrOffset: ModelPlaceOrOffset, options?: { backward?: boolean } ): void;\n\n\t/**\n\t * Sets the document's selection (ranges and direction) to the specified location based on the given\n\t * {@link module:engine/model/selection~ModelSelectable selectable} or creates an empty selection if no arguments were passed.\n\t *\n\t * ```ts\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * writer.setSelection( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * writer.setSelection( ranges );\n\t *\n\t * // Sets selection to other selection.\n\t * const otherSelection = writer.createSelection();\n\t * writer.setSelection( otherSelection );\n\t *\n\t * // Sets selection to the given document selection.\n\t * const documentSelection = model.document.selection;\n\t * writer.setSelection( documentSelection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPosition( root, path );\n\t * writer.setSelection( position );\n\t *\n\t * // Removes all selection's ranges.\n\t * writer.setSelection( null );\n\t * ```\n\t *\n\t * `Writer#setSelection()` allow passing additional options (`backward`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * writer.setSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * Throws `writer-incorrect-use` error when the writer is used outside the `change()` block.\n\t *\n\t * See also: {@link #setSelection:NODE_OFFSET `setSelection( node, placeOrOffset, options )`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic setSelection( selectable: Exclude<ModelSelectable, ModelNode>, options?: { backward?: boolean } ): void;\n\n\tpublic setSelection( ...args: Parameters<ModelSelection[ 'setTo' ]> ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tthis.model.document.selection._setTo( ...args );\n\t}\n\n\t/**\n\t * Moves {@link module:engine/model/documentselection~ModelDocumentSelection#focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link #createPositionAt `writer.createPositionAt()`} parameters.\n\t *\n\t * @param itemOrPosition\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic setSelectionFocus(\n\t\titemOrPosition: ModelItem | ModelPosition,\n\t\toffset?: ModelPositionOffset\n\t): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tthis.model.document.selection._setFocus( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * ```ts\n\t * writer.setSelectionAttribute( 'italic', true );\n\t * ```\n\t *\n\t * @label KEY_VALUE\n\t * @param key Key of the attribute to set.\n\t * @param value Attribute value.\n\t */\n\tpublic setSelectionAttribute( key: string, value: unknown ): void;\n\n\t/**\n\t * Sets attributes on the selection. If any attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * Using key-value object:\n\t *\n\t * ```ts\n\t * writer.setSelectionAttribute( { italic: true, bold: false } );\n\t * ```\n\t *\n\t * Using iterable object:\n\t *\n\t * ```ts\n\t * writer.setSelectionAttribute( new Map( [ [ 'italic', true ] ] ) );\n\t * ```\n\t *\n\t * @label OBJECT\n\t * @param objectOrIterable Object / iterable of key => value attribute pairs.\n\t */\n\tpublic setSelectionAttribute( objectOrIterable: ModelNodeAttributes ): void;\n\n\tpublic setSelectionAttribute(\n\t\tkeyOrObjectOrIterable: string | ModelNodeAttributes,\n\t\tvalue?: unknown\n\t): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( typeof keyOrObjectOrIterable === 'string' ) {\n\t\t\tthis._setSelectionAttribute( keyOrObjectOrIterable, value );\n\t\t} else {\n\t\t\tfor ( const [ key, value ] of toMap( keyOrObjectOrIterable ) ) {\n\t\t\t\tthis._setSelectionAttribute( key, value );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes attribute(s) with given key(s) from the selection.\n\t *\n\t * Remove one attribute:\n\t *\n\t * ```ts\n\t * writer.removeSelectionAttribute( 'italic' );\n\t * ```\n\t *\n\t * Remove multiple attributes:\n\t *\n\t * ```ts\n\t * writer.removeSelectionAttribute( [ 'italic', 'bold' ] );\n\t * ```\n\t *\n\t * @param keyOrIterableOfKeys Key of the attribute to remove or an iterable of attribute keys to remove.\n\t */\n\tpublic removeSelectionAttribute( keyOrIterableOfKeys: string | Iterable<string> ): void {\n\t\tthis._assertWriterUsedCorrectly();\n\n\t\tif ( typeof keyOrIterableOfKeys === 'string' ) {\n\t\t\tthis._removeSelectionAttribute( keyOrIterableOfKeys );\n\t\t} else {\n\t\t\tfor ( const key of keyOrIterableOfKeys ) {\n\t\t\t\tthis._removeSelectionAttribute( key );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Temporarily changes the {@link module:engine/model/documentselection~ModelDocumentSelection#isGravityOverridden gravity}\n\t * of the selection from left to right.\n\t *\n\t * The gravity defines from which direction the selection inherits its attributes. If it's the default left gravity,\n\t * then the selection (after being moved by the user) inherits attributes from its left-hand side.\n\t * This method allows to temporarily override this behavior by forcing the gravity to the right.\n\t *\n\t * For the following model fragment:\n\t *\n\t * ```xml\n\t * <$text bold=\"true\" linkHref=\"url\">bar[]</$text><$text bold=\"true\">biz</$text>\n\t * ```\n\t *\n\t * * Default gravity: selection will have the `bold` and `linkHref` attributes.\n\t * * Overridden gravity: selection will have `bold` attribute.\n\t *\n\t * **Note**: It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry\n\t * of the process.\n\t *\n\t * @returns The unique id which allows restoring the gravity.\n\t */\n\tpublic overrideSelectionGravity(): string {\n\t\treturn this.model.document.selection._overrideGravity();\n\t}\n\n\t/**\n\t * Restores {@link ~ModelWriter#overrideSelectionGravity} gravity to default.\n\t *\n\t * Restoring the gravity is only possible using the unique identifier returned by\n\t * {@link ~ModelWriter#overrideSelectionGravity}. Note that the gravity remains overridden as long as won't be restored\n\t * the same number of times it was overridden.\n\t *\n\t * @param uid The unique id returned by {@link ~ModelWriter#overrideSelectionGravity}.\n\t */\n\tpublic restoreSelectionGravity( uid: string ): void {\n\t\tthis.model.document.selection._restoreGravity( uid );\n\t}\n\n\t/**\n\t * @param key Key of the attribute to remove.\n\t * @param value Attribute value.\n\t */\n\tprivate _setSelectionAttribute( key: string, value: unknown ): void {\n\t\tconst selection = this.model.document.selection;\n\n\t\t// Store attribute in parent element if the selection is collapsed in an empty node.\n\t\tif ( selection.isCollapsed && selection.anchor!.parent.isEmpty ) {\n\t\t\tconst storeKey = ModelDocumentSelection._getStoreAttributeKey( key );\n\n\t\t\tthis.setAttribute( storeKey, value, selection.anchor!.parent as any );\n\t\t}\n\n\t\tselection._setAttribute( key, value );\n\t}\n\n\t/**\n\t * @param key Key of the attribute to remove.\n\t */\n\tprivate _removeSelectionAttribute( key: string ): void {\n\t\tconst selection = this.model.document.selection;\n\n\t\t// Remove stored attribute from parent element if the selection is collapsed in an empty node.\n\t\tif ( selection.isCollapsed && selection.anchor!.parent.isEmpty ) {\n\t\t\tconst storeKey = ModelDocumentSelection._getStoreAttributeKey( key );\n\n\t\t\tthis.removeAttribute( storeKey, selection.anchor!.parent as any );\n\t\t}\n\n\t\tselection._removeAttribute( key );\n\t}\n\n\t/**\n\t * Throws `writer-detached-writer-tries-to-modify-model` error when the writer is used outside of the `change()` block.\n\t */\n\tprivate _assertWriterUsedCorrectly(): void {\n\t\t/**\n\t\t * Trying to use a writer outside a {@link module:engine/model/model~Model#change `change()`} or\n\t\t * {@link module:engine/model/model~Model#enqueueChange `enqueueChange()`} blocks.\n\t\t *\n\t\t * The writer can only be used inside these blocks which ensures that the model\n\t\t * can only be changed during such \"sessions\".\n\t\t *\n\t\t * @error writer-incorrect-use\n\t\t */\n\t\tif ( ( this.model as any )._currentWriter !== this ) {\n\t\t\tthrow new CKEditorError( 'writer-incorrect-use', this );\n\t\t}\n\t}\n\n\t/**\n\t * For given action `type` and `positionOrRange` where the action happens, this function finds all affected markers\n\t * and applies a marker operation with the new marker range equal to the current range. Thanks to this, the marker range\n\t * can be later correctly processed during undo.\n\t *\n\t * Exposed so that code applying operations directly to the model can reproduce the same marker bookkeeping.\n\t *\n\t * @internal\n\t * @param type Writer action type.\n\t * @param positionOrRange Position or range where the writer action happens.\n\t */\n\tpublic _addOperationForAffectedMarkers(\n\t\ttype: 'move' | 'merge',\n\t\tpositionOrRange: ModelPosition | ModelRange\n\t): void {\n\t\tfor ( const marker of this.model.markers ) {\n\t\t\tif ( !marker.managedUsingOperations ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst markerRange = marker.getRange();\n\t\t\tlet isAffected;\n\n\t\t\tif ( type === 'move' ) {\n\t\t\t\tconst range = positionOrRange as ModelRange;\n\t\t\t\tisAffected =\n\t\t\t\t\trange.containsPosition( markerRange.start ) ||\n\t\t\t\t\trange.start.isEqual( markerRange.start ) ||\n\t\t\t\t\trange.containsPosition( markerRange.end ) ||\n\t\t\t\t\trange.end.isEqual( markerRange.end );\n\t\t\t} else {\n\t\t\t\t// if type === 'merge'.\n\t\t\t\tconst position = positionOrRange as ModelPosition;\n\t\t\t\tconst elementBefore = position.nodeBefore;\n\t\t\t\tconst elementAfter = position.nodeAfter;\n\n\t\t\t\t//               Start:  <p>Foo[</p><p>Bar]</p>\n\t\t\t\t//         After merge:  <p>Foo[Bar]</p>\n\t\t\t\t// After undoing split:  <p>Foo</p><p>[Bar]</p>     <-- incorrect, needs remembering for undo.\n\t\t\t\t//\n\t\t\t\tconst affectedInLeftElement = markerRange.start.parent == elementBefore && markerRange.start.isAtEnd;\n\n\t\t\t\t//               Start:  <p>[Foo</p><p>]Bar</p>\n\t\t\t\t//         After merge:  <p>[Foo]Bar</p>\n\t\t\t\t// After undoing split:  <p>[Foo]</p><p>Bar</p>     <-- incorrect, needs remembering for undo.\n\t\t\t\t//\n\t\t\t\tconst affectedInRightElement = markerRange.end.parent == elementAfter && markerRange.end.offset == 0;\n\n\t\t\t\t//               Start:  <p>[Foo</p>]<p>Bar</p>\n\t\t\t\t//         After merge:  <p>[Foo]Bar</p>\n\t\t\t\t// After undoing split:  <p>[Foo]</p><p>Bar</p>     <-- incorrect, needs remembering for undo.\n\t\t\t\t//\n\t\t\t\tconst affectedAfterLeftElement = markerRange.end.nodeAfter == elementAfter;\n\n\t\t\t\t//               Start:  <p>Foo</p>[<p>Bar]</p>\n\t\t\t\t//         After merge:  <p>Foo[Bar]</p>\n\t\t\t\t// After undoing split:  <p>Foo</p><p>[Bar]</p>     <-- incorrect, needs remembering for undo.\n\t\t\t\t//\n\t\t\t\tconst affectedBeforeRightElement = markerRange.start.nodeAfter == elementAfter;\n\n\t\t\t\tisAffected = affectedInLeftElement || affectedInRightElement || affectedAfterLeftElement || affectedBeforeRightElement;\n\t\t\t}\n\n\t\t\tif ( isAffected ) {\n\t\t\t\tthis.updateMarker( marker.name, { range: markerRange } );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Sets given attribute to each node in given range. When attribute value is null then attribute will be removed.\n *\n * Because attribute operation needs to have the same attribute value on the whole range, this function splits\n * the range into smaller parts.\n *\n * Given `range` must be flat.\n */\nfunction setAttributeOnRange( writer: ModelWriter, key: string, value: unknown, range: ModelRange ) {\n\tconst model = writer.model;\n\tconst doc = model.document;\n\n\t// Position of the last split, the beginning of the new range.\n\tlet lastSplitPosition = range.start;\n\n\t// Currently position in the scanning range. Because we need value after the position, it is not a current\n\t// position of the iterator but the previous one (we need to iterate one more time to get the value after).\n\tlet position: ModelPosition | undefined;\n\n\t// Value before the currently position.\n\tlet valueBefore: unknown;\n\n\t// Value after the currently position.\n\tlet valueAfter;\n\n\tfor ( const val of range.getWalker( { shallow: true } ) ) {\n\t\tvalueAfter = val.item.getAttribute( key );\n\n\t\t// At the first run of the iterator the position in undefined. We also do not have a valueBefore, but\n\t\t// because valueAfter may be null, valueBefore may be equal valueAfter ( undefined == null ).\n\t\tif ( position && valueBefore != valueAfter ) {\n\t\t\t// if valueBefore == value there is nothing to change, so we add operation only if these values are different.\n\t\t\tif ( valueBefore != value ) {\n\t\t\t\taddOperation();\n\t\t\t}\n\n\t\t\tlastSplitPosition = position;\n\t\t}\n\n\t\tposition = val.nextPosition;\n\t\tvalueBefore = valueAfter;\n\t}\n\n\t// Because position in the loop is not the iterator position (see let position comment), the last position in\n\t// the while loop will be last but one position in the range. We need to check the last position manually.\n\tif ( position instanceof ModelPosition && position != lastSplitPosition && valueBefore != value ) {\n\t\taddOperation();\n\t}\n\n\tfunction addOperation() {\n\t\tconst range = new ModelRange( lastSplitPosition, position );\n\t\tconst version = range.root.document ? doc.version : null;\n\t\tconst operation = new AttributeOperation( range, key, valueBefore, value, version );\n\n\t\twriter.batch.addOperation( operation );\n\t\tmodel.applyOperation( operation );\n\t}\n}\n\n/**\n * Sets given attribute to the given node. When attribute value is null then attribute will be removed.\n */\nfunction setAttributeOnItem( writer: ModelWriter, key: string, value: unknown, item: ModelItem ) {\n\tconst model = writer.model;\n\tconst doc = model.document;\n\tconst previousValue = item.getAttribute( key );\n\tlet range, operation;\n\n\tif ( previousValue != value ) {\n\t\tconst isRootChanged = item.root === item;\n\n\t\tif ( isRootChanged ) {\n\t\t\t// If we change attributes of root element, we have to use `RootAttributeOperation`.\n\t\t\tconst version = item.document ? doc.version : null;\n\n\t\t\toperation = new RootAttributeOperation( item as any, key, previousValue, value, version );\n\t\t} else {\n\t\t\trange = new ModelRange( ModelPosition._createBefore( item ), writer.createPositionAfter( item ) );\n\n\t\t\tconst version = range.root.document ? doc.version : null;\n\n\t\t\toperation = new AttributeOperation( range, key, previousValue, value, version );\n\t\t}\n\n\t\twriter.batch.addOperation( operation );\n\t\tmodel.applyOperation( operation );\n\t}\n}\n\n/**\n * Creates and applies marker operation to {@link module:engine/model/operation/operation~Operation operation}.\n */\nfunction applyMarkerOperation(\n\twriter: ModelWriter,\n\tname: string,\n\toldRange: ModelRange | null,\n\tnewRange: ModelRange | null,\n\taffectsData: boolean | undefined\n) {\n\tconst model = writer.model;\n\tconst doc = model.document;\n\n\tconst operation = new MarkerOperation( name, oldRange, newRange, model.markers, !!affectsData, doc.version );\n\n\twriter.batch.addOperation( operation );\n\tmodel.applyOperation( operation );\n}\n\n/**\n * Creates `MoveOperation` or `DetachOperation` that removes `howMany` nodes starting from `position`.\n * The operation will be applied on given model instance and added to given operation instance.\n *\n * @param position Position from which nodes are removed.\n * @param howMany Number of nodes to remove.\n * @param batch Batch to which the operation will be added.\n * @param model Model instance on which operation will be applied.\n */\nfunction applyRemoveOperation( position: ModelPosition, howMany: number, batch: Batch, model: Model ) {\n\tlet operation;\n\n\tif ( position.root.document ) {\n\t\tconst doc = model.document;\n\t\tconst graveyardPosition = new ModelPosition( doc.graveyard, [ 0 ] );\n\n\t\toperation = new MoveOperation( position, howMany, graveyardPosition, doc.version );\n\t} else {\n\t\toperation = new DetachOperation( position, howMany );\n\t}\n\n\tbatch.addOperation( operation );\n\tmodel.applyOperation( operation );\n}\n\n/**\n * Returns `true` if both root elements are the same element or both are documents root elements.\n *\n * Elements in the same tree can be moved (for instance you can move element form one documents root to another, or\n * within the same document fragment), but when element supposed to be moved from document fragment to the document, or\n * to another document it should be removed and inserted to avoid problems with OT. This is because features like undo or\n * collaboration may track changes on the document but ignore changes on detached fragments and should not get\n * unexpected `move` operation.\n */\nfunction isSameTree( rootA: ModelNode | ModelDocumentFragment, rootB: ModelNode | ModelDocumentFragment ): boolean {\n\t// If it is the same root this is the same tree.\n\tif ( rootA === rootB ) {\n\t\treturn true;\n\t}\n\n\t// If both roots are documents root it is operation within the document what we still treat as the same tree.\n\tif ( rootA instanceof ModelRootElement && rootB instanceof ModelRootElement ) {\n\t\treturn true;\n\t}\n\n\treturn false;\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/**\n * @module engine/model/utils/selection-post-fixer\n */\n\nimport { ModelPosition } from '../position.js';\nimport { ModelRange } from '../range.js';\n\nimport { type ModelDocumentFragment } from '../documentfragment.js';\nimport { type Model } from '../model.js';\nimport { type ModelNode } from '../node.js';\nimport { type ModelSchema } from '../schema.js';\nimport { type ModelWriter } from '../writer.js';\nimport { type ModelElement } from '../element.js';\n\n/**\n * Injects selection post-fixer to the model.\n *\n * The role of the selection post-fixer is to ensure that the selection is in a correct place\n * after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n *\n * The correct position means that:\n *\n * * All collapsed selection ranges are in a place where the {@link module:engine/model/schema~ModelSchema}\n * allows a `$text`.\n * * None of the selection's non-collapsed ranges crosses a {@link module:engine/model/schema~ModelSchema#isLimit limit element}\n * boundary (a range must be rooted within one limit element).\n * * Only {@link module:engine/model/schema~ModelSchema#isSelectable selectable elements} can be selected from the outside\n * (e.g. `[<paragraph>foo</paragraph>]` is invalid). This rule applies independently to both selection ends, so this\n * selection is correct: `<paragraph>f[oo</paragraph><imageBlock></imageBlock>]`.\n *\n * If the position is not correct, the post-fixer will automatically correct it.\n *\n * ## Fixing a non-collapsed selection\n *\n * See as an example a selection that starts in a P1 element and ends inside the text of a TD element\n * (`[` and `]` are range boundaries and `(l)` denotes an element defined as `isLimit=true`):\n *\n * ```\n * root\n *  |- element P1\n *  |   |- \"foo\"                                      root\n *  |- element TABLE (l)                   P1         TABLE             P2\n *  |   |- element TR (l)                 f o[o     TR      TR         b a r\n *  |   |   |- element TD (l)                       TD      TD\n *  |   |       |- \"aaa\"                          a]a a    b b b\n *  |   |- element TR (l)\n *  |   |   |- element TD (l)                           ||\n *  |   |       |- \"bbb\"                                ||\n *  |- element P2                                       VV\n *  |   |- \"bar\"\n *                                                    root\n *                                         P1         TABLE]            P2\n *                                        f o[o     TR      TR         b a r\n *                                                  TD      TD\n *                                                a a a    b b b\n * ```\n *\n * In the example above, the TABLE, TR and TD are defined as `isLimit=true` in the schema. The range which is not contained within\n * a single limit element must be expanded to select the outermost limit element. The range end is inside the text node of the TD element.\n * As the TD element is a child of the TR and TABLE elements, where both are defined as `isLimit=true` in the schema, the range must be\n * expanded to select the whole TABLE element.\n *\n * **Note** If the selection contains multiple ranges, the method returns a minimal set of ranges that are not intersecting after expanding\n * them to select `isLimit=true` elements.\n *\n * @internal\n */\nexport function injectSelectionPostFixer( model: Model ): void {\n\tmodel.document.registerPostFixer( writer => selectionPostFixer( writer, model ) );\n}\n\n/**\n * The selection post-fixer.\n */\nfunction selectionPostFixer( writer: ModelWriter, model: Model ): boolean {\n\tconst selection = model.document.selection;\n\tconst schema = model.schema;\n\n\tconst ranges = [];\n\n\tlet wasFixed = false;\n\n\tfor ( const modelRange of selection.getRanges() ) {\n\t\t// Go through all ranges in selection and try fixing each of them.\n\t\t// Those ranges might overlap but will be corrected later.\n\t\tconst correctedRange = tryFixingRange( modelRange, schema );\n\n\t\t// \"Selection fixing\" algorithms sometimes get lost. In consequence, it may happen\n\t\t// that a new range is returned but, in fact, it has the same positions as the original\n\t\t// range anyway. If this range is not discarded, a new selection will be set and that,\n\t\t// for instance, would destroy the selection attributes. Let's make sure that the post-fixer\n\t\t// actually worked first before setting a new selection.\n\t\t//\n\t\t// https://github.com/ckeditor/ckeditor5/issues/6693\n\t\tif ( correctedRange && !correctedRange.isEqual( modelRange ) ) {\n\t\t\tranges.push( correctedRange );\n\t\t\twasFixed = true;\n\t\t} else {\n\t\t\tranges.push( modelRange );\n\t\t}\n\t}\n\n\t// If any of ranges were corrected update the selection.\n\tif ( wasFixed ) {\n\t\twriter.setSelection( mergeIntersectingRanges( ranges ), { backward: selection.isBackward } );\n\t}\n\n\treturn false;\n}\n\n/**\n * Tries fixing a range if it's incorrect.\n *\n * **Note:** This helper is used by the selection post-fixer and to fix the `beforeinput` target ranges.\n *\n * @returns Returns fixed range or null if range is valid.\n * @internal\n */\nexport function tryFixingRange( range: ModelRange, schema: ModelSchema ): ModelRange | null {\n\tif ( range.isCollapsed ) {\n\t\treturn tryFixingCollapsedRange( range, schema );\n\t}\n\n\treturn tryFixingNonCollapsedRage( range, schema );\n}\n\n/**\n * Tries to fix collapsed ranges.\n *\n * * Fixes situation when a range is in a place where $text is not allowed\n *\n * @param range Collapsed range to fix.\n * @returns Returns fixed range or null if range is valid.\n */\nfunction tryFixingCollapsedRange( range: ModelRange, schema: ModelSchema ) {\n\tconst originalPosition = range.start;\n\n\tconst nearestSelectionRange = schema.getNearestSelectionRange( originalPosition );\n\n\t// This might be null, i.e. when the editor data is empty or the selection is inside a limit element\n\t// that doesn't allow text inside.\n\t// In the first case, there is no need to fix the selection range.\n\t// In the second, let's go up to the outer selectable element\n\tif ( !nearestSelectionRange ) {\n\t\tconst ancestorObject = originalPosition.getAncestors().reverse().find( ( item ): item is ModelElement => schema.isObject( item ) );\n\n\t\tif ( ancestorObject ) {\n\t\t\treturn ModelRange._createOn( ancestorObject );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( !nearestSelectionRange.isCollapsed ) {\n\t\treturn nearestSelectionRange;\n\t}\n\n\tconst fixedPosition = nearestSelectionRange.start;\n\n\t// Fixed position is the same as original - no need to return corrected range.\n\tif ( originalPosition.isEqual( fixedPosition ) ) {\n\t\treturn null;\n\t}\n\n\treturn new ModelRange( fixedPosition );\n}\n\n/**\n * Tries to fix an expanded range.\n *\n * @param range Expanded range to fix.\n * @returns Returns fixed range or null if range is valid.\n */\nfunction tryFixingNonCollapsedRage( range: ModelRange, schema: ModelSchema ) {\n\tconst { start, end } = range;\n\n\tconst isTextAllowedOnStart = schema.checkChild( start, '$text' );\n\tconst isTextAllowedOnEnd = schema.checkChild( end, '$text' );\n\n\tconst startLimitElement = schema.getLimitElement( start );\n\tconst endLimitElement = schema.getLimitElement( end );\n\n\t// Ranges which both end are inside the same limit element (or root) might needs only minor fix.\n\tif ( startLimitElement === endLimitElement ) {\n\t\t// Range is valid when both position allows to place a text:\n\t\t// - <block>f[oobarba]z</block>\n\t\t// This would be \"fixed\" by a next check but as it will be the same it's better to return null so the selection stays the same.\n\t\tif ( isTextAllowedOnStart && isTextAllowedOnEnd ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Range that is on non-limit element (or is partially) must be fixed so it is placed inside the block around $text:\n\t\t// - [<block>foo</block>]    ->    <block>[foo]</block>\n\t\t// - [<block>foo]</block>    ->    <block>[foo]</block>\n\t\t// - <block>f[oo</block>]    ->    <block>f[oo]</block>\n\t\t// - [<block>foo</block><selectable></selectable>]    ->    <block>[foo</block><selectable></selectable>]\n\t\tif ( checkSelectionOnNonLimitElements( start, end, schema ) ) {\n\t\t\tconst isStartBeforeSelectable = start.nodeAfter && schema.isSelectable( start.nodeAfter );\n\t\t\tconst fixedStart = isStartBeforeSelectable ? null : schema.getNearestSelectionRange( start, 'forward' );\n\n\t\t\tconst isEndAfterSelectable = end.nodeBefore && schema.isSelectable( end.nodeBefore );\n\t\t\tconst fixedEnd = isEndAfterSelectable ? null : schema.getNearestSelectionRange( end, 'backward' );\n\n\t\t\t// The schema.getNearestSelectionRange might return null - if that happens use original position.\n\t\t\tconst rangeStart = fixedStart ? fixedStart.start : start;\n\t\t\tconst rangeEnd = fixedEnd ? fixedEnd.end : end;\n\n\t\t\treturn new ModelRange( rangeStart, rangeEnd );\n\t\t}\n\t}\n\n\tconst isStartInLimit = startLimitElement && !startLimitElement.is( 'rootElement' );\n\tconst isEndInLimit = endLimitElement && !endLimitElement.is( 'rootElement' );\n\n\t// At this point we eliminated valid positions on text nodes so if one of range positions is placed inside a limit element\n\t// then the range crossed limit element boundaries and needs to be fixed.\n\tif ( isStartInLimit || isEndInLimit ) {\n\t\tconst bothInSameParent = ( start.nodeAfter && end.nodeBefore ) && start.nodeAfter.parent === end.nodeBefore.parent;\n\n\t\tconst expandStart = isStartInLimit && ( !bothInSameParent || !isSelectable( start.nodeAfter, schema ) );\n\t\tconst expandEnd = isEndInLimit && ( !bothInSameParent || !isSelectable( end.nodeBefore, schema ) );\n\n\t\t// Although we've already found limit element on start/end positions we must find the outer-most limit element.\n\t\t// as limit elements might be nested directly inside (ie table > tableRow > tableCell).\n\t\tlet fixedStart = start;\n\t\tlet fixedEnd = end;\n\n\t\tif ( expandStart ) {\n\t\t\tfixedStart = ModelPosition._createBefore( findOutermostLimitAncestor( startLimitElement, schema ) );\n\t\t}\n\n\t\tif ( expandEnd ) {\n\t\t\tfixedEnd = ModelPosition._createAfter( findOutermostLimitAncestor( endLimitElement, schema ) );\n\t\t}\n\n\t\treturn new ModelRange( fixedStart, fixedEnd );\n\t}\n\n\t// Range was not fixed at this point so it is valid - ie it was placed around limit element already.\n\treturn null;\n}\n\n/**\n * Finds the outer-most ancestor.\n */\nfunction findOutermostLimitAncestor( startingNode: ModelNode, schema: ModelSchema ): ModelNode {\n\tlet isLimitNode = startingNode;\n\tlet parent: ModelNode | ModelDocumentFragment = isLimitNode;\n\n\t// Find outer most isLimit block as such blocks might be nested (ie. in tables).\n\twhile ( schema.isLimit( parent ) && parent.parent ) {\n\t\tisLimitNode = parent;\n\t\tparent = parent.parent;\n\t}\n\n\treturn isLimitNode;\n}\n\n/**\n * Checks whether any of range boundaries is placed around non-limit elements.\n */\nfunction checkSelectionOnNonLimitElements( start: ModelPosition, end: ModelPosition, schema: ModelSchema ) {\n\tconst startIsOnBlock = ( start.nodeAfter && !schema.isLimit( start.nodeAfter ) ) || schema.checkChild( start, '$text' );\n\tconst endIsOnBlock = ( end.nodeBefore && !schema.isLimit( end.nodeBefore ) ) || schema.checkChild( end, '$text' );\n\n\t// We should fix such selection when one of those nodes needs fixing.\n\treturn startIsOnBlock || endIsOnBlock;\n}\n\n/**\n * Returns a minimal non-intersecting array of ranges without duplicates.\n *\n * @param ranges Ranges to merge.\n * @returns Array of unique and non-intersecting ranges.\n * @internal\n */\nexport function mergeIntersectingRanges( ranges: Array<ModelRange> ): Array<ModelRange> {\n\tconst rangesToMerge = [ ...ranges ];\n\tconst rangeIndexesToRemove = new Set();\n\tlet currentRangeIndex = 1;\n\n\twhile ( currentRangeIndex < rangesToMerge.length ) {\n\t\tconst currentRange = rangesToMerge[ currentRangeIndex ];\n\t\tconst previousRanges = rangesToMerge.slice( 0, currentRangeIndex );\n\n\t\tfor ( const [ previousRangeIndex, previousRange ] of previousRanges.entries() ) {\n\t\t\tif ( rangeIndexesToRemove.has( previousRangeIndex ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( currentRange.isEqual( previousRange ) ) {\n\t\t\t\trangeIndexesToRemove.add( previousRangeIndex );\n\t\t\t} else if ( currentRange.isIntersecting( previousRange ) ) {\n\t\t\t\trangeIndexesToRemove.add( previousRangeIndex );\n\t\t\t\trangeIndexesToRemove.add( currentRangeIndex );\n\n\t\t\t\tconst mergedRange = currentRange.getJoined( previousRange );\n\t\t\t\trangesToMerge.push( mergedRange! );\n\t\t\t}\n\t\t}\n\n\t\tcurrentRangeIndex++;\n\t}\n\n\tconst nonIntersectingRanges = rangesToMerge.filter( ( _, index ) => !rangeIndexesToRemove.has( index ) );\n\n\treturn nonIntersectingRanges;\n}\n\n/**\n * Checks if node exists and if it's a selectable.\n */\nfunction isSelectable( node: ModelNode, schema: ModelSchema ) {\n\treturn node && schema.isSelectable( node );\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/**\n * @module engine/model/utils/deletecontent\n */\n\nimport { ModelDocumentSelection } from '../documentselection.js';\nimport { ModelLivePosition } from '../liveposition.js';\nimport { ModelRange } from '../range.js';\n\nimport { ModelDocumentFragment } from '../documentfragment.js';\nimport { type ModelElement } from '../element.js';\nimport { type Model } from '../model.js';\nimport { type ModelPosition } from '../position.js';\nimport { type ModelSchema } from '../schema.js';\nimport { type ModelSelection } from '../selection.js';\nimport { type ModelWriter } from '../writer.js';\n\n/**\n * Deletes content of the selection and merge siblings. The resulting selection is always collapsed.\n *\n * **Note:** Use {@link module:engine/model/model~Model#deleteContent} instead of this function.\n * This function is only exposed to be reusable in algorithms\n * which change the {@link module:engine/model/model~Model#deleteContent}\n * method's behavior.\n *\n * @param model The model in context of which the insertion should be performed.\n * @param selection Selection of which the content should be deleted.\n * @param options.leaveUnmerged Whether to merge elements after removing the content of the selection.\n *\n * For example `<heading>x[x</heading><paragraph>y]y</paragraph>` will become:\n *\n * * `<heading>x^y</heading>` with the option disabled (`leaveUnmerged == false`)\n * * `<heading>x^</heading><paragraph>y</paragraph>` with enabled (`leaveUnmerged == true`).\n *\n * Note: {@link module:engine/model/schema~ModelSchema#isObject object} and {@link module:engine/model/schema~ModelSchema#isLimit limit}\n * elements will not be merged.\n *\n * @param options.doNotResetEntireContent Whether to skip replacing the entire content with a\n * paragraph when the entire content was selected.\n *\n * For example `<heading>[x</heading><paragraph>y]</paragraph>` will become:\n *\n * * `<paragraph>^</paragraph>` with the option disabled (`doNotResetEntireContent == false`)\n * * `<heading>^</heading>` with enabled (`doNotResetEntireContent == true`).\n *\n * @param options.doNotAutoparagraph Whether to create a paragraph if after content deletion selection is moved\n * to a place where text cannot be inserted.\n *\n * For example `<paragraph>x</paragraph>[<imageBlock src=\"foo.jpg\"></imageBlock>]` will become:\n *\n * * `<paragraph>x</paragraph><paragraph>[]</paragraph>` with the option disabled (`doNotAutoparagraph == false`)\n * * `<paragraph>x</paragraph>[]` with the option enabled (`doNotAutoparagraph == true`).\n *\n * If you use this option you need to make sure to handle invalid selections yourself or leave\n * them to the selection post-fixer (may not always work).\n *\n * **Note:** If there is no valid position for the selection, the paragraph will always be created:\n *\n * `[<imageBlock src=\"foo.jpg\"></imageBlock>]` -> `<paragraph>[]</paragraph>`.\n *\n * @param options.doNotFixSelection Whether given selection-to-remove should be fixed if it ends at the beginning of an element.\n *\n * By default, `deleteContent()` will fix selection before performing a deletion, so that the selection does not end at the beginning of\n * an element. For example, selection `<heading>[Heading</heading><paragraph>]Some text.</paragraph>` will be treated as it was\n * `<heading>[Heading]</heading><paragraph>Some text.</paragraph>`. As a result, the elements will not get merged.\n *\n * If selection is as in example, visually, the next element (paragraph) is not selected and it may be confusing for the user that\n * the elements got merged. Selection is set up like this by browsers when a user triple-clicks on some text.\n *\n * However, in some cases, it is expected to remove content exactly as selected in the selection, without any fixing. In these cases,\n * this flag can be set to `true`, which will prevent fixing the selection.\n *\n * @internal\n */\nexport function deleteContent(\n\tmodel: Model,\n\tselection: ModelSelection | ModelDocumentSelection,\n\toptions: {\n\t\tleaveUnmerged?: boolean;\n\t\tdoNotResetEntireContent?: boolean;\n\t\tdoNotAutoparagraph?: boolean;\n\t\tdoNotFixSelection?: boolean;\n\t} = {}\n): void {\n\tif ( selection.isCollapsed ) {\n\t\treturn;\n\t}\n\n\tconst selRange = selection.getFirstRange()!;\n\n\t// If the selection is already removed, don't do anything.\n\tif ( selRange.root.rootName == '$graveyard' ) {\n\t\treturn;\n\t}\n\n\tconst schema = model.schema;\n\tconst documentSelection = model.document.selection;\n\n\tconst selectionIsDocumentSelection = isRelatedToDocumentSelection( selection, documentSelection, selRange );\n\tconst selectionAttributes = Array.from( documentSelection.getAttributes() );\n\tconst selectionParentWasEmpty = !!documentSelection.getFirstRange()?.start.parent.isEmpty;\n\n\tmodel.change( writer => {\n\t\t// 1. Replace the entire content with paragraph.\n\t\t// See: https://github.com/ckeditor/ckeditor5-engine/issues/1012#issuecomment-315017594.\n\t\tif ( !options.doNotResetEntireContent && shouldEntireContentBeReplacedWithParagraph( schema, selection ) ) {\n\t\t\treplaceEntireContentWithParagraph( writer, selection );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Collect attributes to copy in case of autoparagraphing.\n\t\tconst attributesForAutoparagraph = {};\n\n\t\tif ( !options.doNotAutoparagraph ) {\n\t\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t\tif ( selectedElement ) {\n\t\t\t\tObject.assign( attributesForAutoparagraph, schema.getAttributesWithProperty( selectedElement, 'copyOnReplace', true ) );\n\t\t\t}\n\t\t}\n\n\t\t// Get the live positions for the range adjusted to span only blocks selected from the user perspective.\n\t\tlet startPosition, endPosition;\n\n\t\tif ( selRange.root instanceof ModelDocumentFragment ) {\n\t\t\tstartPosition = ModelLivePosition._fromPositionInDocumentFragment( selRange.start, model, 'toPrevious' );\n\t\t\tendPosition = ModelLivePosition._fromPositionInDocumentFragment( selRange.end, model, 'toNext' );\n\t\t} else if ( !options.doNotFixSelection ) {\n\t\t\t[ startPosition, endPosition ] = getLivePositionsForSelectedBlocks( selRange );\n\t\t} else {\n\t\t\tstartPosition = ModelLivePosition.fromPosition( selRange.start, 'toPrevious' );\n\t\t\tendPosition = ModelLivePosition.fromPosition( selRange.end, 'toNext' );\n\t\t}\n\n\t\t// 2. Remove the content if there is any.\n\t\tif ( !startPosition.isTouching( endPosition ) ) {\n\t\t\twriter.remove( writer.createRange( startPosition, endPosition ) );\n\t\t}\n\n\t\t// 3. Merge elements in the right branch to the elements in the left branch.\n\t\t// The only reasonable (in terms of data and selection correctness) case in which we need to do that is:\n\t\t//\n\t\t// <heading type=1>Fo[</heading><paragraph>]ar</paragraph> => <heading type=1>Fo^ar</heading>\n\t\t//\n\t\t// However, the algorithm supports also merging deeper structures (up to the depth of the shallower branch),\n\t\t// as it's hard to imagine what should actually be the default behavior. Usually, specific features will\n\t\t// want to override that behavior anyway.\n\t\tif ( !options.leaveUnmerged ) {\n\t\t\tmergeBranches( writer, startPosition, endPosition );\n\n\t\t\t// TMP this will be replaced with a postfixer.\n\t\t\t// We need to check and strip disallowed attributes in all nested nodes because after merge\n\t\t\t// some attributes could end up in a path where are disallowed.\n\t\t\t//\n\t\t\t// e.g. bold is disallowed for <H1>\n\t\t\t// <h1>Fo{o</h1><p>b}a<b>r</b><p> -> <h1>Fo{}a<b>r</b><h1> -> <h1>Fo{}ar<h1>.\n\t\t\tschema.removeDisallowedAttributes( startPosition.parent.getChildren(), writer );\n\t\t}\n\n\t\tcollapseSelectionAt( writer, selection, startPosition );\n\n\t\t// 4. Add a paragraph to set selection in it.\n\t\t// Check if a text is allowed in the new container. If not, try to create a new paragraph (if it's allowed here).\n\t\t// If autoparagraphing is off, we assume that you know what you do so we leave the selection wherever it was.\n\t\tif ( !options.doNotAutoparagraph && shouldAutoparagraph( schema, startPosition ) ) {\n\t\t\tinsertParagraph( writer, startPosition, selection, attributesForAutoparagraph );\n\t\t}\n\n\t\tif ( selectionIsDocumentSelection ) {\n\t\t\trestoreSelectionAttributesOnEmptyParent( writer, selectionAttributes, selectionParentWasEmpty );\n\t\t}\n\n\t\tstartPosition.detach();\n\t\tendPosition.detach();\n\t} );\n}\n\n/**\n * Returns the live positions for the range adjusted to span only blocks selected from the user perspective. Example:\n *\n * ```\n * <heading1>[foo</heading1>\n * <paragraph>bar</paragraph>\n * <heading1>]abc</heading1>  <-- this block is not considered as selected\n * ```\n *\n * This is the same behavior as in Selection#getSelectedBlocks() \"special case\".\n */\nfunction getLivePositionsForSelectedBlocks( range: ModelRange ): [ startPosition: ModelLivePosition, endPosition: ModelLivePosition ] {\n\tconst model = range.root.document!.model;\n\n\tconst startPosition = range.start;\n\tlet endPosition = range.end;\n\n\t// If the end of selection is at the start position of last block in the selection, then\n\t// shrink it to not include that trailing block. Note that this should happen only for not empty selection.\n\tif ( model.hasContent( range, { ignoreMarkers: true } ) ) {\n\t\tconst endBlock = getParentBlock( endPosition );\n\n\t\tif ( endBlock && endPosition.isTouching( model.createPositionAt( endBlock, 0 ) ) ) {\n\t\t\t// Create forward selection as a probe to find a valid position after excluding last block from the range.\n\t\t\tconst selection = model.createSelection( range );\n\n\t\t\t// Modify the forward selection in backward direction to shrink it and remove first position of following block from it.\n\t\t\t// This is how modifySelection works and here we are making use of it.\n\t\t\tmodel.modifySelection( selection, { direction: 'backward' } );\n\n\t\t\tconst newEndPosition = selection.getLastPosition()!;\n\n\t\t\t// For such a model and selection:\n\t\t\t//     <paragraph>A[</paragraph><imageBlock></imageBlock><paragraph>]B</paragraph>\n\t\t\t//\n\t\t\t// After modifySelection(), we would end up with this:\n\t\t\t//     <paragraph>A[</paragraph>]<imageBlock></imageBlock><paragraph>B</paragraph>\n\t\t\t//\n\t\t\t// So we need to check if there is no content in the skipped range (because we want to include the <imageBlock>).\n\t\t\tconst skippedRange = model.createRange( newEndPosition, endPosition );\n\n\t\t\tif ( !model.hasContent( skippedRange, { ignoreMarkers: true } ) ) {\n\t\t\t\tendPosition = newEndPosition;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [\n\t\tModelLivePosition.fromPosition( startPosition, 'toPrevious' ),\n\t\tModelLivePosition.fromPosition( endPosition, 'toNext' )\n\t];\n}\n\n/**\n * Finds the lowest element in position's ancestors which is a block.\n * Returns null if a limit element is encountered before reaching a block element.\n */\nfunction getParentBlock( position: ModelPosition ): ModelElement | null | undefined {\n\tconst element = position.parent;\n\tconst schema = element.root.document!.model.schema;\n\tconst ancestors = element.getAncestors( { parentFirst: true, includeSelf: true } );\n\n\tfor ( const element of ancestors ) {\n\t\tif ( schema.isLimit( element ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( schema.isBlock( element ) ) {\n\t\t\treturn element as ModelElement;\n\t\t}\n\t}\n}\n\n/**\n * This function is a result of reaching the Ballmer's peak for just the right amount of time.\n * Even I had troubles documenting it after a while and after reading it again I couldn't believe that it really works.\n */\nfunction mergeBranches( writer: ModelWriter, startPosition: ModelPosition, endPosition: ModelPosition ) {\n\tconst model = writer.model;\n\n\t// Verify if there is a need and possibility to merge.\n\tif ( !checkShouldMerge( writer.model.schema, startPosition, endPosition ) ) {\n\t\treturn;\n\t}\n\n\t// If the start element on the common ancestor level is empty, and the end element on the same level is not empty\n\t// then merge those to the right element so that it's properties are preserved (name, attributes).\n\t// Because of OT merging is used instead of removing elements.\n\t//\n\t// Merge left:\n\t//     <heading1>foo[</heading1>    ->  <heading1>foo[]bar</heading1>\n\t//     <paragraph>]bar</paragraph>  ->               --^\n\t//\n\t// Merge right:\n\t//     <heading1>[</heading1>       ->\n\t//     <paragraph>]bar</paragraph>  ->  <paragraph>[]bar</paragraph>\n\t//\n\t// Merge left:\n\t//     <blockQuote>                     ->  <blockQuote>\n\t//         <heading1>foo[</heading1>    ->      <heading1>foo[]bar</heading1>\n\t//         <paragraph>]bar</paragraph>  ->                   --^\n\t//     </blockQuote>                    ->  </blockQuote>\n\t//\n\t// Merge right:\n\t//     <blockQuote>                     ->  <blockQuote>\n\t//         <heading1>[</heading1>       ->\n\t//         <paragraph>]bar</paragraph>  ->      <paragraph>[]bar</paragraph>\n\t//     </blockQuote>                    ->  </blockQuote>\n\n\t// Merging should not go deeper than common ancestor.\n\tconst [ startAncestor, endAncestor ] = getAncestorsJustBelowCommonAncestor( startPosition, endPosition );\n\n\t// Branches can't be merged if one of the positions is directly inside a common ancestor.\n\t//\n\t// Example:\n\t//     <blockQuote>\n\t//         <paragraph>[foo</paragraph>]\n\t//         <table> ... </table>\n\t//     <blockQuote>\n\t//\n\tif ( !startAncestor || !endAncestor ) {\n\t\treturn;\n\t}\n\n\tif ( !model.hasContent( startAncestor, { ignoreMarkers: true } ) && model.hasContent( endAncestor, { ignoreMarkers: true } ) ) {\n\t\tmergeBranchesRight( writer, startPosition, endPosition, startAncestor.parent );\n\t} else {\n\t\tmergeBranchesLeft( writer, startPosition, endPosition, startAncestor.parent );\n\t}\n}\n\n/**\n * Merging blocks to the left (properties of the left block are preserved).\n * Simple example:\n *\n * ```\n * <heading1>foo[</heading1>    ->  <heading1>foo[bar</heading1>]\n * <paragraph>]bar</paragraph>  ->              --^\n * ```\n *\n * Nested example:\n *\n * ```\n * <blockQuote>                     ->  <blockQuote>\n *     <heading1>foo[</heading1>    ->      <heading1>foo[bar</heading1>\n * </blockQuote>                    ->  </blockQuote>]    ^\n * <blockBlock>                     ->                    |\n *     <paragraph>]bar</paragraph>  ->                 ---\n * </blockBlock>                    ->\n * ```\n */\nfunction mergeBranchesLeft(\n\twriter: ModelWriter,\n\tstartPosition: ModelPosition,\n\tendPosition: ModelPosition,\n\tcommonAncestor: ModelElement | ModelDocumentFragment | null\n) {\n\tconst startElement = startPosition.parent as ModelElement;\n\tconst endElement = endPosition.parent as ModelElement;\n\n\t// Merging reached the common ancestor element, stop here.\n\tif ( startElement == commonAncestor || endElement == commonAncestor ) {\n\t\treturn;\n\t}\n\n\t// Remember next positions to merge in next recursive step (also used as modification points pointers).\n\tstartPosition = writer.createPositionAfter( startElement );\n\tendPosition = writer.createPositionBefore( endElement );\n\n\t// Move endElement just after startElement if they aren't siblings.\n\tif ( !endPosition.isEqual( startPosition ) ) {\n\t\t//\n\t\t//     <blockQuote>                     ->  <blockQuote>\n\t\t//         <heading1>foo[</heading1>    ->      <heading1>foo</heading1>[<paragraph>bar</paragraph>\n\t\t//     </blockQuote>                    ->  </blockQuote>                ^\n\t\t//     <blockBlock>                     ->  <blockBlock>                 |\n\t\t//         <paragraph>]bar</paragraph>  ->      ]                     ---\n\t\t//     </blockBlock>                    ->  </blockBlock>\n\t\t//\n\t\twriter.insert( endElement, startPosition );\n\t}\n\n\t// Merge two siblings (nodes on sides of startPosition):\n\t//\n\t//     <blockQuote>                                             ->  <blockQuote>\n\t//         <heading1>foo</heading1>[<paragraph>bar</paragraph>  ->      <heading1>foo[bar</heading1>\n\t//     </blockQuote>                                            ->  </blockQuote>\n\t//     <blockBlock>                                             ->  <blockBlock>\n\t//         ]                                                    ->      ]\n\t//     </blockBlock>                                            ->  </blockBlock>\n\t//\n\t// Or in simple case (without moving elements in above if):\n\t//     <heading1>foo</heading1>[<paragraph>bar</paragraph>]  ->  <heading1>foo[bar</heading1>]\n\t//\n\twriter.merge( startPosition );\n\n\t// Remove empty end ancestors:\n\t//\n\t//     <blockQuote>                      ->  <blockQuote>\n\t//         <heading1>foo[bar</heading1>  ->      <heading1>foo[bar</heading1>\n\t//     </blockQuote>                     ->  </blockQuote>\n\t//     <blockBlock>                      ->\n\t//         ]                             ->  ]\n\t//     </blockBlock>                     ->\n\t//\n\twhile ( endPosition.parent.isEmpty ) {\n\t\tconst parentToRemove = endPosition.parent as ModelElement;\n\n\t\tendPosition = writer.createPositionBefore( parentToRemove );\n\n\t\twriter.remove( parentToRemove );\n\t}\n\n\t// Verify if there is a need and possibility to merge next level.\n\tif ( !checkShouldMerge( writer.model.schema, startPosition, endPosition ) ) {\n\t\treturn;\n\t}\n\n\t// Continue merging next level (blockQuote with blockBlock in the examples above if it would not be empty and got removed).\n\tmergeBranchesLeft( writer, startPosition, endPosition, commonAncestor );\n}\n\n/**\n * Merging blocks to the right (properties of the right block are preserved).\n * Simple example:\n *\n * ```\n * <heading1>foo[</heading1>    ->            --v\n * <paragraph>]bar</paragraph>  ->  [<paragraph>foo]bar</paragraph>\n * ```\n *\n * Nested example:\n *\n * ```\n * <blockQuote>                     ->\n *     <heading1>foo[</heading1>    ->              ---\n * </blockQuote>                    ->                 |\n * <blockBlock>                     ->  [<blockBlock>  v\n *     <paragraph>]bar</paragraph>  ->      <paragraph>foo]bar</paragraph>\n * </blockBlock>                    ->  </blockBlock>\n * ```\n */\nfunction mergeBranchesRight(\n\twriter: ModelWriter,\n\tstartPosition: ModelPosition,\n\tendPosition: ModelPosition,\n\tcommonAncestor: ModelElement | ModelDocumentFragment | null\n) {\n\tconst startElement = startPosition.parent as ModelElement;\n\tconst endElement = endPosition.parent as ModelElement;\n\n\t// Merging reached the common ancestor element, stop here.\n\tif ( startElement == commonAncestor || endElement == commonAncestor ) {\n\t\treturn;\n\t}\n\n\t// Remember next positions to merge in next recursive step (also used as modification points pointers).\n\tstartPosition = writer.createPositionAfter( startElement );\n\tendPosition = writer.createPositionBefore( endElement );\n\n\t// Move startElement just before endElement if they aren't siblings.\n\tif ( !endPosition.isEqual( startPosition ) ) {\n\t\t//\n\t\t//     <blockQuote>                     ->  <blockQuote>\n\t\t//         <heading1>foo[</heading1>    ->      [                   ---\n\t\t//     </blockQuote>                    ->  </blockQuote>              |\n\t\t//     <blockBlock>                     ->  <blockBlock>               v\n\t\t//         <paragraph>]bar</paragraph>  ->      <heading1>foo</heading1>]<paragraph>bar</paragraph>\n\t\t//     </blockBlock>                    ->  </blockBlock>\n\t\t//\n\t\twriter.insert( startElement, endPosition );\n\t}\n\n\t// Remove empty end ancestors:\n\t//\n\t//     <blockQuote>                                             ->\n\t//         [                                                    ->  [\n\t//     </blockQuote>                                            ->\n\t//     <blockBlock>                                             ->  <blockBlock>\n\t//         <heading1>foo</heading1>]<paragraph>bar</paragraph>  ->      <heading1>foo</heading1>]<paragraph>bar</paragraph>\n\t//     </blockBlock>                                            ->  </blockBlock>\n\t//\n\twhile ( startPosition.parent.isEmpty ) {\n\t\tconst parentToRemove = startPosition.parent as ModelElement;\n\n\t\tstartPosition = writer.createPositionBefore( parentToRemove );\n\n\t\twriter.remove( parentToRemove );\n\t}\n\n\t// Update endPosition after inserting and removing elements.\n\tendPosition = writer.createPositionBefore( endElement );\n\n\t// Merge right two siblings (nodes on sides of endPosition):\n\t//                                                              ->\n\t//     [                                                        ->  [\n\t//                                                              ->\n\t//     <blockBlock>                                             ->  <blockBlock>\n\t//         <heading1>foo</heading1>]<paragraph>bar</paragraph>  ->      <paragraph>foo]bar</paragraph>\n\t//     </blockBlock>                                            ->  </blockBlock>\n\t//\n\t// Or in simple case (without moving elements in above if):\n\t//     [<heading1>foo</heading1>]<paragraph>bar</paragraph>  ->  [<heading1>foo]bar</heading1>\n\t//\n\tmergeRight( writer, endPosition );\n\n\t// Verify if there is a need and possibility to merge next level.\n\tif ( !checkShouldMerge( writer.model.schema, startPosition, endPosition ) ) {\n\t\treturn;\n\t}\n\n\t// Continue merging next level (blockQuote with blockBlock in the examples above if it would not be empty and got removed).\n\tmergeBranchesRight( writer, startPosition, endPosition, commonAncestor );\n}\n\n/**\n * There is no right merge operation so we need to simulate it.\n */\nfunction mergeRight( writer: ModelWriter, position: ModelPosition ) {\n\tconst startElement: any = position.nodeBefore;\n\tconst endElement: any = position.nodeAfter;\n\n\tif ( startElement.name != endElement.name ) {\n\t\twriter.rename( startElement, endElement.name );\n\t}\n\n\twriter.clearAttributes( startElement );\n\twriter.setAttributes( Object.fromEntries( endElement.getAttributes() ), startElement );\n\n\twriter.merge( position );\n}\n\n/**\n * Verifies if merging is needed and possible. It's not needed if both positions are in the same element\n * and it's not possible if some element is a limit or the range crosses a limit element.\n */\nfunction checkShouldMerge( schema: ModelSchema, startPosition: ModelPosition, endPosition: ModelPosition ): boolean {\n\tconst startElement = startPosition.parent;\n\tconst endElement = endPosition.parent;\n\n\t// If both positions ended up in the same parent, then there's nothing more to merge:\n\t// <$root><p>x[</p><p>]y</p></$root> => <$root><p>xy</p>[]</$root>\n\tif ( startElement == endElement ) {\n\t\treturn false;\n\t}\n\n\t// If one of the positions is a limit element, then there's nothing to merge because we don't want to cross the limit boundaries.\n\tif ( schema.isLimit( startElement ) || schema.isLimit( endElement ) ) {\n\t\treturn false;\n\t}\n\n\t// Check if operations we'll need to do won't need to cross object or limit boundaries.\n\t// E.g., we can't merge endElement into startElement in this case:\n\t// <limit><startElement>x[</startElement></limit><endElement>]</endElement>\n\treturn isCrossingLimitElement( startPosition, endPosition, schema );\n}\n\n/**\n * Returns the elements that are the ancestors of the provided positions that are direct children of the common ancestor.\n */\nfunction getAncestorsJustBelowCommonAncestor( positionA: ModelPosition, positionB: ModelPosition ) {\n\tconst ancestorsA = positionA.getAncestors();\n\tconst ancestorsB = positionB.getAncestors();\n\n\tlet i = 0;\n\n\twhile ( ancestorsA[ i ] && ancestorsA[ i ] == ancestorsB[ i ] ) {\n\t\ti++;\n\t}\n\n\treturn [ ancestorsA[ i ], ancestorsB[ i ] ];\n}\n\nfunction shouldAutoparagraph( schema: ModelSchema, position: ModelPosition ) {\n\tconst isTextAllowed = schema.checkChild( position, '$text' );\n\tconst isParagraphAllowed = schema.checkChild( position, 'paragraph' );\n\n\treturn !isTextAllowed && isParagraphAllowed;\n}\n\n/**\n * Check if parents of two positions can be merged by checking if there are no limit/object\n * boundaries between those two positions.\n *\n * E.g. in <bQ><p>x[]</p></bQ><widget><caption>{}</caption></widget>\n * we'll check <p>, <bQ>, <widget> and <caption>.\n * Usually, widget and caption are marked as objects/limits in the schema, so in this case merging will be blocked.\n */\nfunction isCrossingLimitElement( leftPos: ModelPosition, rightPos: ModelPosition, schema: ModelSchema ) {\n\tconst rangeToCheck = new ModelRange( leftPos, rightPos );\n\n\tfor ( const value of rangeToCheck.getWalker() ) {\n\t\tif ( schema.isLimit( value.item ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nfunction insertParagraph(\n\twriter: ModelWriter,\n\tposition: ModelPosition,\n\tselection: ModelSelection | ModelDocumentSelection,\n\tattributes = {}\n) {\n\tconst paragraph = writer.createElement( 'paragraph' );\n\n\twriter.model.schema.setAllowedAttributes( paragraph, attributes, writer );\n\n\twriter.insert( paragraph, position );\n\n\tcollapseSelectionAt( writer, selection, writer.createPositionAt( paragraph, 0 ) );\n}\n\nfunction replaceEntireContentWithParagraph( writer: ModelWriter, selection: ModelSelection | ModelDocumentSelection ) {\n\tconst limitElement = writer.model.schema.getLimitElement( selection );\n\n\twriter.remove( writer.createRangeIn( limitElement ) );\n\tinsertParagraph( writer, writer.createPositionAt( limitElement, 0 ), selection );\n}\n\n/**\n * We want to replace the entire content with a paragraph when:\n * * the entire content is selected,\n * * selection contains at least two elements,\n * * whether the paragraph is allowed in schema in the common ancestor.\n */\nfunction shouldEntireContentBeReplacedWithParagraph( schema: ModelSchema, selection: ModelSelection | ModelDocumentSelection ) {\n\tconst limitElement = schema.getLimitElement( selection );\n\n\tif ( !selection.containsEntireContent( limitElement ) ) {\n\t\treturn false;\n\t}\n\n\tconst range = selection.getFirstRange()!;\n\n\tif ( range.start.parent == range.end.parent ) {\n\t\treturn false;\n\t}\n\n\treturn schema.checkChild( limitElement, 'paragraph' );\n}\n\n/**\n * Helper function that sets the selection. Depending whether given `selection` is a document selection or not,\n * uses a different method to set it.\n */\nfunction collapseSelectionAt(\n\twriter: ModelWriter,\n\tselection: ModelSelection | ModelDocumentSelection,\n\tpositionOrRange: ModelPosition | ModelRange\n) {\n\tif ( selection instanceof ModelDocumentSelection ) {\n\t\twriter.setSelection( positionOrRange );\n\t} else {\n\t\tselection.setTo( positionOrRange );\n\t}\n}\n\n/**\n * Restores the document selection attributes after a deletion that leaves the selection in an empty parent block.\n * This preserves the pre-delete formatting (e.g. bold, italic) so that subsequent typing continues in the same style.\n *\n * Attributes are only restored when:\n * - There were attributes on the selection before the deletion.\n * - The deletion left the document selection's parent block empty.\n * - The parent block was **not** already empty before the deletion — this ensures that attributes are not\n *   re-applied when `deleteContent()` was called on a completely unrelated block.\n */\nfunction restoreSelectionAttributesOnEmptyParent(\n\twriter: ModelWriter,\n\tselectionAttributes: Array<[ string, unknown ]>,\n\tselectionParentWasEmpty: boolean\n) {\n\tif ( !selectionAttributes.length ) {\n\t\treturn;\n\t}\n\n\tconst documentSelection = writer.model.document.selection;\n\n\tconst selectionParent = documentSelection.anchor!.parent as ModelElement;\n\n\tif ( !selectionParent.isEmpty ) {\n\t\treturn;\n\t}\n\n\t// Preserve attributes only when the delete operation leaves the live selection in an empty parent\n\t// that was not empty before the change. This avoids reasserting attributes on unrelated empty blocks\n\t// when deleteContent() operates on a synthetic selection somewhere else in the document.\n\tif ( selectionParentWasEmpty ) {\n\t\treturn;\n\t}\n\n\t// Setting document selection attributes here also persists them as `selection:*`\n\t// on the empty parent, so future typing keeps the pre-delete formatting.\n\tfor ( const [ key, value ] of selectionAttributes ) {\n\t\tif (\n\t\t\twriter.model.schema.getAttributeProperties( key ).isFormatting &&\n\t\t\twriter.model.schema.checkAttributeInSelection( documentSelection, key )\n\t\t) {\n\t\t\twriter.setSelectionAttribute( key, value );\n\t\t}\n\t}\n}\n\n/**\n * Checks whether the provided selection is related to the document selection.\n *\n * Returns `true` when:\n * - the selection is a `DocumentSelection` instance, or\n * - the document selection is collapsed and sits at the start or end of the given range, or\n * - the document selection is not collapsed and its range intersects the given range.\n */\nfunction isRelatedToDocumentSelection(\n\tselection: ModelSelection | ModelDocumentSelection,\n\tdocumentSelection: ModelDocumentSelection,\n\tselRange: ModelRange\n): boolean {\n\tif ( selection instanceof ModelDocumentSelection ) {\n\t\treturn true;\n\t}\n\n\tif ( documentSelection.isCollapsed ) {\n\t\tconst position = documentSelection.getFirstPosition()!;\n\n\t\treturn position.isEqual( selRange.start ) || position.isEqual( selRange.end );\n\t}\n\n\tconst docSelRange = documentSelection.getFirstRange();\n\n\treturn !!docSelRange?.isIntersecting( selRange );\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/**\n * @module engine/model/utils/getselectedcontent\n */\n\nimport { type ModelDocumentFragment } from '../documentfragment.js';\nimport { type ModelDocumentSelection } from '../documentselection.js';\nimport { type ModelElement } from '../element.js';\nimport { type Model } from '../model.js';\nimport { type ModelRange } from '../range.js';\nimport { type ModelSelection } from '../selection.js';\nimport { type ModelWriter } from '../writer.js';\n\n/**\n * Gets a clone of the selected content.\n *\n * For example, for the following selection:\n *\n * ```html\n * <p>x</p><quote><p>y</p><h>fir[st</h></quote><p>se]cond</p><p>z</p>\n * ```\n *\n * It will return a document fragment with such a content:\n *\n * ```html\n * <quote><h>st</h></quote><p>se</p>\n * ```\n *\n * @param model The model in context of which the selection modification should be performed.\n * @param selection The selection of which content will be returned.\n * @internal\n */\nexport function getSelectedContent(\n\tmodel: Model,\n\tselection: ModelSelection | ModelDocumentSelection\n): ModelDocumentFragment {\n\treturn model.change( writer => {\n\t\tconst frag = writer.createDocumentFragment();\n\t\tconst range = selection.getFirstRange();\n\n\t\tif ( !range || range.isCollapsed ) {\n\t\t\treturn frag;\n\t\t}\n\n\t\tconst root = range.start.root;\n\t\tconst commonPath = range.start.getCommonPath( range.end );\n\t\tconst commonParent = root.getNodeByPath( commonPath );\n\n\t\t// ## 1st step\n\t\t//\n\t\t// First, we'll clone a fragment represented by a minimal flat range\n\t\t// containing the original range to be cloned.\n\t\t// E.g. let's consider such a range:\n\t\t//\n\t\t// <p>x</p><quote><p>y</p><h>fir[st</h></quote><p>se]cond</p><p>z</p>\n\t\t//\n\t\t// A minimal flat range containing this one is:\n\t\t//\n\t\t// <p>x</p>[<quote><p>y</p><h>first</h></quote><p>second</p>]<p>z</p>\n\t\t//\n\t\t// We can easily clone this structure, preserving e.g. the <quote> element.\n\t\tlet flatSubtreeRange: ModelRange;\n\n\t\tif ( range.start.parent == range.end.parent ) {\n\t\t\t// The original range is flat, so take it.\n\t\t\tflatSubtreeRange = range;\n\t\t} else {\n\t\t\tflatSubtreeRange = writer.createRange(\n\t\t\t\twriter.createPositionAt( commonParent, range.start.path[ commonPath.length ] ),\n\t\t\t\twriter.createPositionAt( commonParent, range.end.path[ commonPath.length ] + 1 )\n\t\t\t);\n\t\t}\n\n\t\tconst howMany = flatSubtreeRange.end.offset - flatSubtreeRange.start.offset;\n\n\t\t// Clone the whole contents.\n\t\tfor ( const item of flatSubtreeRange.getItems( { shallow: true } ) ) {\n\t\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\t\twriter.appendText( item.data, item.getAttributes(), frag );\n\t\t\t} else {\n\t\t\t\twriter.append( writer.cloneElement( item as ModelElement, true ), frag );\n\t\t\t}\n\t\t}\n\n\t\t// ## 2nd step\n\t\t//\n\t\t// If the original range wasn't flat, then we need to remove the excess nodes from the both ends of the cloned fragment.\n\t\t//\n\t\t// For example, for the range shown in the 1st step comment, we need to remove these pieces:\n\t\t//\n\t\t// <quote>[<p>y</p>]<h>[fir]st</h></quote><p>se[cond]</p>\n\t\t//\n\t\t// So this will be the final copied content:\n\t\t//\n\t\t// <quote><h>st</h></quote><p>se</p>\n\t\t//\n\t\t// In order to do that, we remove content from these two ranges:\n\t\t//\n\t\t// [<quote><p>y</p><h>fir]st</h></quote><p>se[cond</p>]\n\t\tif ( flatSubtreeRange != range ) {\n\t\t\t// Find the position of the original range in the cloned fragment.\n\t\t\tconst newRange = range._getTransformedByMove( flatSubtreeRange.start, writer.createPositionAt( frag, 0 ), howMany )[ 0 ];\n\n\t\t\tconst leftExcessRange = writer.createRange( writer.createPositionAt( frag, 0 ), newRange.start );\n\t\t\tconst rightExcessRange = writer.createRange( newRange.end, writer.createPositionAt( frag, 'end' ) );\n\n\t\t\tremoveRangeContent( rightExcessRange, writer );\n\t\t\tremoveRangeContent( leftExcessRange, writer );\n\t\t}\n\n\t\treturn frag;\n\t} );\n}\n\n// After https://github.com/ckeditor/ckeditor5-engine/issues/690 is fixed,\n// this function will, most likely, be able to rewritten using getMinimalFlatRanges().\nfunction removeRangeContent( range: ModelRange, writer: ModelWriter ) {\n\tconst parentsToCheck: Array<ModelElement | ModelDocumentFragment> = [];\n\n\tArray.from( range.getItems( { direction: 'backward' } ) )\n\t\t// We should better store ranges because text proxies will lose integrity\n\t\t// with the text nodes when we'll start removing content.\n\t\t.map( item => writer.createRangeOn( item ) )\n\t\t// Filter only these items which are fully contained in the passed range.\n\t\t//\n\t\t// E.g. for the following range: [<quote><p>y</p><h>fir]st</h>\n\t\t// the walker will return the entire <h> element, when only the \"fir\" item inside it is fully contained.\n\t\t.filter( itemRange => {\n\t\t\t// We should be able to use Range.containsRange, but https://github.com/ckeditor/ckeditor5-engine/issues/691.\n\t\t\tconst contained =\n\t\t\t\t( itemRange.start.isAfter( range.start ) || itemRange.start.isEqual( range.start ) ) &&\n\t\t\t\t( itemRange.end.isBefore( range.end ) || itemRange.end.isEqual( range.end ) );\n\n\t\t\treturn contained;\n\t\t} )\n\t\t.forEach( itemRange => {\n\t\t\tparentsToCheck.push( itemRange.start.parent );\n\n\t\t\twriter.remove( itemRange );\n\t\t} );\n\n\t// Remove ancestors of the removed items if they turned to be empty now\n\t// (their whole content was contained in the range).\n\tparentsToCheck.forEach( parentToCheck => {\n\t\tlet parent = parentToCheck;\n\n\t\twhile ( parent.parent && parent.isEmpty ) {\n\t\t\tconst removeRange = writer.createRangeOn( parent );\n\n\t\t\tparent = parent.parent;\n\n\t\t\twriter.remove( removeRange );\n\t\t}\n\t} );\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/**\n * @module engine/model/utils/insertcontent\n */\n\nimport { ModelDocumentSelection } from '../documentselection.js';\nimport { ModelElement } from '../element.js';\nimport { ModelLivePosition } from '../liveposition.js';\nimport { ModelLiveRange } from '../liverange.js';\nimport { ModelPosition } from '../position.js';\nimport { ModelRange } from '../range.js';\n\nimport { type ModelDocumentFragment } from '../documentfragment.js';\nimport { type ModelItem } from '../item.js';\nimport { type Model } from '../model.js';\nimport { type ModelSchema } from '../schema.js';\nimport { type ModelWriter } from '../writer.js';\nimport { type ModelNode } from '../node.js';\nimport { type ModelSelection } from '../selection.js';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Inserts content into the editor (specified selection) as one would expect the paste functionality to work.\n *\n * It takes care of removing the selected content, splitting elements (if needed), inserting elements and merging elements appropriately.\n *\n * Some examples:\n *\n * ```html\n * <p>x^</p> + <p>y</p> => <p>x</p><p>y</p> => <p>xy[]</p>\n * <p>x^y</p> + <p>z</p> => <p>x</p>^<p>y</p> + <p>z</p> => <p>x</p><p>z</p><p>y</p> => <p>xz[]y</p>\n * <p>x^y</p> + <img /> => <p>x</p>^<p>y</p> + <img /> => <p>x</p><img /><p>y</p>\n * <p>x</p><p>^</p><p>z</p> + <p>y</p> => <p>x</p><p>y[]</p><p>z</p> (no merging)\n * <p>x</p>[<img />]<p>z</p> + <p>y</p> => <p>x</p>^<p>z</p> + <p>y</p> => <p>x</p><p>y[]</p><p>z</p>\n * ```\n *\n * If an instance of {@link module:engine/model/selection~ModelSelection} is passed as `selectable` it will be modified\n * to the insertion selection (equal to a range to be selected after insertion).\n *\n * If `selectable` is not passed, the content will be inserted using the current selection of the model document.\n *\n * **Note:** Use {@link module:engine/model/model~Model#insertContent} instead of this function.\n * This function is only exposed to be reusable in algorithms which change the {@link module:engine/model/model~Model#insertContent}\n * method's behavior.\n *\n * @param model The model in context of which the insertion should be performed.\n * @param content The content to insert.\n * @param selectable Selection into which the content should be inserted.\n * @returns Range which contains all the performed changes. This is a range that, if removed,\n * would return the model to the state before the insertion. If no changes were preformed by `insertContent`, returns a range collapsed\n * at the insertion position.\n * @internal\n */\nexport function insertContent(\n\tmodel: Model,\n\tcontent: ModelItem | ModelDocumentFragment,\n\tselectable?: ModelSelection | ModelDocumentSelection\n): ModelRange {\n\treturn model.change( writer => {\n\t\tconst selection: ModelSelection | ModelDocumentSelection = selectable ? selectable : model.document.selection;\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\tmodel.deleteContent( selection, { doNotAutoparagraph: true } );\n\t\t}\n\n\t\tconst insertion = new Insertion( model, writer, selection.anchor! );\n\t\tconst fakeMarkerElements = [];\n\n\t\tlet nodesToInsert: any;\n\n\t\tif ( content.is( 'documentFragment' ) ) {\n\t\t\t// If document fragment has any markers, these markers should be inserted into the model as well.\n\t\t\tif ( content.markers.size ) {\n\t\t\t\tconst markersPosition = [];\n\n\t\t\t\tfor ( const [ name, range ] of content.markers ) {\n\t\t\t\t\tconst { start, end } = range;\n\t\t\t\t\tconst isCollapsed = start.isEqual( end );\n\n\t\t\t\t\tmarkersPosition.push(\n\t\t\t\t\t\t{ position: start, name, isCollapsed },\n\t\t\t\t\t\t{ position: end, name, isCollapsed }\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Markers position is sorted backwards to ensure that the insertion of fake markers will not change\n\t\t\t\t// the position of the next markers.\n\t\t\t\tmarkersPosition.sort( ( { position: posA }, { position: posB } ) => posA.isBefore( posB ) ? 1 : -1 );\n\n\t\t\t\tfor ( const { position, name, isCollapsed } of markersPosition ) {\n\t\t\t\t\tlet fakeElement = null;\n\t\t\t\t\tlet collapsed = null;\n\t\t\t\t\tconst isAtBeginning = position.parent === content && position.isAtStart;\n\t\t\t\t\tconst isAtEnd = position.parent === content && position.isAtEnd;\n\n\t\t\t\t\t// We have two ways of handling markers. In general, we want to add temporary <$marker> model elements to\n\t\t\t\t\t// represent marker boundaries. These elements will be inserted into content together with the rest\n\t\t\t\t\t// of the document fragment. After insertion is done, positions for these elements will be read\n\t\t\t\t\t// and proper, actual markers will be created in the model and fake elements will be removed.\n\t\t\t\t\t//\n\t\t\t\t\t// However, if the <$marker> element is at the beginning or at the end of the document fragment,\n\t\t\t\t\t// it may affect how the inserted content is merged with current model, impacting the insertion\n\t\t\t\t\t// result. To avoid that, we don't add <$marker> elements at these positions. Instead, we will use\n\t\t\t\t\t// `Insertion#getAffectedRange()` to figure out new positions for these marker boundaries.\n\t\t\t\t\tif ( !isAtBeginning && !isAtEnd ) {\n\t\t\t\t\t\tfakeElement = writer.createElement( '$marker' );\n\t\t\t\t\t\twriter.insert( fakeElement, position );\n\t\t\t\t\t} else if ( isCollapsed ) {\n\t\t\t\t\t\t// Save whether the collapsed marker was at the beginning or at the end of document fragment\n\t\t\t\t\t\t// to know where to create it after the insertion is done.\n\t\t\t\t\t\tcollapsed = isAtBeginning ? 'start' as const : 'end' as const;\n\t\t\t\t\t}\n\n\t\t\t\t\tfakeMarkerElements.push( {\n\t\t\t\t\t\tname,\n\t\t\t\t\t\telement: fakeElement,\n\t\t\t\t\t\tcollapsed\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnodesToInsert = content.getChildren();\n\t\t} else {\n\t\t\tnodesToInsert = [ content ];\n\t\t}\n\n\t\tinsertion.handleNodes( nodesToInsert );\n\n\t\tlet newRange = insertion.getSelectionRange();\n\n\t\tif ( content.is( 'documentFragment' ) && fakeMarkerElements.length ) {\n\t\t\t// After insertion was done, the selection was set but the model contains fake <$marker> elements.\n\t\t\t// These <$marker> elements will be now removed. Because of that, we will need to fix the selection.\n\t\t\t// We will create a live range that will automatically be update as <$marker> elements are removed.\n\t\t\tconst selectionLiveRange = newRange ? ModelLiveRange.fromRange( newRange ) : null;\n\n\t\t\t// Marker name -> [ start position, end position ].\n\t\t\tconst markersData: Record<string, Array<ModelPosition>> = {};\n\n\t\t\t// Note: `fakeMarkerElements` are sorted backwards. However, now, we want to handle the markers\n\t\t\t// from the beginning, so that existing <$marker> elements do not affect markers positions.\n\t\t\t// This is why we iterate from the end to the start.\n\t\t\tfor ( let i = fakeMarkerElements.length - 1; i >= 0; i-- ) {\n\t\t\t\tconst { name, element, collapsed } = fakeMarkerElements[ i ];\n\t\t\t\tconst isStartBoundary = !markersData[ name ];\n\n\t\t\t\tif ( isStartBoundary ) {\n\t\t\t\t\tmarkersData[ name ] = [];\n\t\t\t\t}\n\n\t\t\t\tif ( element ) {\n\t\t\t\t\t// Read fake marker element position to learn where the marker should be created.\n\t\t\t\t\tconst elementPosition = writer.createPositionAt( element, 'before' );\n\n\t\t\t\t\tmarkersData[ name ].push( elementPosition );\n\n\t\t\t\t\twriter.remove( element );\n\t\t\t\t} else {\n\t\t\t\t\t// If the fake marker element does not exist, it means that the marker boundary was at the beginning or at the end.\n\t\t\t\t\tconst rangeOnInsertion = insertion.getAffectedRange();\n\n\t\t\t\t\tif ( !rangeOnInsertion ) {\n\t\t\t\t\t\t// If affected range is `null` it means that nothing was in the document fragment or all content was filtered out.\n\t\t\t\t\t\t// Some markers that were in the filtered content may be removed (partially or totally).\n\t\t\t\t\t\t// Let's handle only those markers that were at the beginning or at the end of the document fragment.\n\t\t\t\t\t\tif ( collapsed ) {\n\t\t\t\t\t\t\tmarkersData[ name ].push( insertion.position );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( collapsed ) {\n\t\t\t\t\t\t// If the marker was collapsed at the beginning or at the end of the document fragment,\n\t\t\t\t\t\t// put both boundaries at the beginning or at the end of inserted range (to keep the marker collapsed).\n\t\t\t\t\t\tmarkersData[ name ].push( rangeOnInsertion[ collapsed ] );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmarkersData[ name ].push( isStartBoundary ? rangeOnInsertion.start : rangeOnInsertion.end );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( const [ name, [ start, end ] ] of Object.entries( markersData ) ) {\n\t\t\t\t// For now, we ignore markers if they are included in the filtered-out content.\n\t\t\t\t// In the future implementation we will improve that case to create markers that are not filtered out completely.\n\t\t\t\tif ( start && end && start.root === end.root && start.root.document && !writer.model.markers.has( name ) ) {\n\t\t\t\t\twriter.addMarker( name, {\n\t\t\t\t\t\tusingOperation: true,\n\t\t\t\t\t\taffectsData: true,\n\t\t\t\t\t\trange: new ModelRange( start, end )\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( selectionLiveRange ) {\n\t\t\t\tnewRange = selectionLiveRange.toRange();\n\t\t\t\tselectionLiveRange.detach();\n\t\t\t}\n\t\t}\n\n\t\tif ( newRange ) {\n\t\t\tif ( selection instanceof ModelDocumentSelection ) {\n\t\t\t\twriter.setSelection( newRange );\n\t\t\t} else {\n\t\t\t\tselection.setTo( newRange );\n\t\t\t}\n\t\t} else {\n\t\t\t// A safe check for unpredictable edge cases: an insertion without a proper range to select.\n\t\t\t//\n\t\t\t// @if CK_DEBUG // console.warn( 'Cannot determine a proper selection range after insertion.' );\n\t\t}\n\n\t\tconst affectedRange = insertion.getAffectedRange() || model.createRange( selection.anchor! );\n\n\t\tinsertion.destroy();\n\n\t\treturn affectedRange;\n\t} );\n}\n\n/**\n * Utility class for performing content insertion.\n */\nclass Insertion {\n\t/**\n\t * The model in context of which the insertion should be performed.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * Batch to which operations will be added.\n\t */\n\tpublic readonly writer: ModelWriter;\n\n\t/**\n\t * The position at which (or near which) the next node will be inserted.\n\t */\n\tpublic position: ModelPosition;\n\n\t/**\n\t * Elements with which the inserted elements can be merged.\n\t *\n\t * ```html\n\t * <p>x^</p><p>y</p> + <p>z</p> (can merge to <p>x</p>)\n\t * <p>x</p><p>^y</p> + <p>z</p> (can merge to <p>y</p>)\n\t * <p>x^y</p> + <p>z</p> (can merge to <p>xy</p> which will be split during the action,\n\t * \t\t\t\t\t\tso both its pieces will be added to this set)\n\t * ```\n\t */\n\tpublic readonly canMergeWith: Set<ModelNode | ModelDocumentFragment | null>;\n\n\t/**\n\t * Schema of the model.\n\t */\n\tpublic readonly schema: ModelSchema;\n\n\t/**\n\t * The temporary ModelDocumentFragment used for grouping multiple nodes for single insert operation.\n\t */\n\tprivate readonly _documentFragment: ModelDocumentFragment;\n\n\t/**\n\t * The current position in the temporary ModelDocumentFragment.\n\t */\n\tprivate _documentFragmentPosition: ModelPosition;\n\n\t/**\n\t * The reference to the first inserted node.\n\t */\n\tprivate _firstNode: ModelNode | null = null;\n\n\t/**\n\t * The reference to the last inserted node.\n\t */\n\tprivate _lastNode: ModelNode | null = null;\n\n\t/**\n\t * The reference to the last auto paragraph node.\n\t */\n\tprivate _lastAutoParagraph: ModelElement | null = null;\n\n\t/**\n\t * The array of nodes that should be cleaned of not allowed attributes and sub-nodes.\n\t */\n\tprivate _filterAttributesAndChildrenOf: Array<ModelNode> = [];\n\n\t/**\n\t * Beginning of the affected range. See {@link module:engine/model/utils/insertcontent~Insertion#getAffectedRange}.\n\t */\n\tprivate _affectedStart: ModelLivePosition | null = null;\n\n\t/**\n\t * End of the affected range. See {@link module:engine/model/utils/insertcontent~Insertion#getAffectedRange}.\n\t */\n\tprivate _affectedEnd: ModelLivePosition | null = null;\n\n\tprivate _nodeToSelect: ModelNode | null = null;\n\n\tconstructor( model: Model, writer: ModelWriter, position: ModelPosition ) {\n\t\tthis.model = model;\n\t\tthis.writer = writer;\n\t\tthis.position = position;\n\t\tthis.canMergeWith = new Set( [ this.position.parent ] );\n\t\tthis.schema = model.schema;\n\n\t\tthis._documentFragment = writer.createDocumentFragment();\n\t\tthis._documentFragmentPosition = writer.createPositionAt( this._documentFragment, 0 );\n\t}\n\n\t/**\n\t * Handles insertion of a set of nodes.\n\t *\n\t * @param nodes Nodes to insert.\n\t */\n\tpublic handleNodes( nodes: Iterable<ModelNode> ): void {\n\t\tfor ( const node of Array.from( nodes ) ) {\n\t\t\t// Ignore empty nodes, especially empty text nodes.\n\t\t\tif ( node.offsetSize > 0 ) {\n\t\t\t\tthis._handleNode( node );\n\t\t\t}\n\t\t}\n\n\t\t// Insert nodes collected in temporary ModelDocumentFragment.\n\t\tthis._insertPartialFragment();\n\n\t\t// If there was an auto paragraph then we might need to adjust the end of insertion.\n\t\tif ( this._lastAutoParagraph ) {\n\t\t\tthis._updateLastNodeFromAutoParagraph( this._lastAutoParagraph );\n\t\t}\n\n\t\t// After the content was inserted we may try to merge it with its next sibling if the selection was in it initially.\n\t\t// Merging with the previous sibling was performed just after inserting the first node to the document.\n\t\tthis._mergeOnRight();\n\n\t\t// TMP this will become a post-fixer.\n\t\tthis.schema.removeDisallowedAttributes( this._filterAttributesAndChildrenOf, this.writer );\n\n\t\tif ( this.model._config?.get( 'experimentalFlags.modelInsertContentDeepSchemaVerification' ) !== false ) {\n\t\t\tthis._removeDisallowedChildren( this._filterAttributesAndChildrenOf );\n\t\t}\n\n\t\tthis._filterAttributesAndChildrenOf = [];\n\t}\n\n\t/**\n\t * Removes disallowed children from nodes that were inserted or modified during insertion.\n\t */\n\tprivate _removeDisallowedChildren( nodes: Iterable<ModelNode> ): void {\n\t\t// Make sure we do not modify the original iterable.\n\t\tconst nodesArray = Array.from( nodes );\n\n\t\t// Check all sub-nodes of top level inserted nodes.\n\t\t// We do it at this point so node is already in the model tree and schema checks will be correct.\n\t\tfor ( const node of nodesArray ) {\n\t\t\tif ( !node.is( 'element' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst remove = [];\n\t\t\tconst unwrap = [];\n\t\t\tconst walker = this.writer.createRangeIn( node ).getWalker( { ignoreElementEnd: true } );\n\n\t\t\tfor ( const { item } of walker ) {\n\t\t\t\tconst itemParent = item.parent as ModelElement;\n\n\t\t\t\tif ( !this.schema.checkChild( itemParent, item as ModelNode ) ) {\n\t\t\t\t\tif ( item.is( 'element' ) && !this.schema.isObject( item ) ) {\n\t\t\t\t\t\t// Unwrap non-object element.\n\t\t\t\t\t\tunwrap.push( item );\n\n\t\t\t\t\t\t// Store the parent for re-checking children after unwrap.\n\t\t\t\t\t\tnodesArray.push( itemParent );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Remove object with children, or text.\n\t\t\t\t\t\tremove.push( item );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip the whole subtree as it will be removed or processed later.\n\t\t\t\t\twalker.jumpTo( this.writer.createPositionAfter( item ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( const item of unwrap ) {\n\t\t\t\tthis.writer.unwrap( item );\n\t\t\t}\n\n\t\t\tfor ( const item of remove ) {\n\t\t\t\tthis.writer.remove( item );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Updates the last node after the auto paragraphing.\n\t *\n\t * @param node The last auto paragraphing node.\n\t */\n\tprivate _updateLastNodeFromAutoParagraph( node: ModelNode ): void {\n\t\tconst positionAfterLastNode = this.writer.createPositionAfter( this._lastNode! );\n\t\tconst positionAfterNode = this.writer.createPositionAfter( node );\n\n\t\t// If the real end was after the last auto paragraph then update relevant properties.\n\t\tif ( positionAfterNode.isAfter( positionAfterLastNode ) ) {\n\t\t\tthis._lastNode = node;\n\n\t\t\t/* v8 ignore if -- @preserve */\n\t\t\tif ( this.position.parent != node || !this.position.isAtEnd ) {\n\t\t\t\t// Algorithm's correctness check. We should never end up here but it's good to know that we did.\n\t\t\t\t// At this point the insertion position should be at the end of the last auto paragraph.\n\t\t\t\t// Note: This error is documented in other place in this file.\n\t\t\t\tthrow new CKEditorError( 'insertcontent-invalid-insertion-position', this );\n\t\t\t}\n\n\t\t\tthis.position = positionAfterNode;\n\t\t\tthis._setAffectedBoundaries( this.position );\n\t\t}\n\t}\n\n\t/**\n\t * Returns range to be selected after insertion.\n\t * Returns `null` if there is no valid range to select after insertion.\n\t */\n\tpublic getSelectionRange(): ModelRange | null {\n\t\tif ( this._nodeToSelect ) {\n\t\t\treturn ModelRange._createOn( this._nodeToSelect );\n\t\t}\n\n\t\treturn this.model.schema.getNearestSelectionRange( this.position );\n\t}\n\n\t/**\n\t * Returns a range which contains all the performed changes. This is a range that, if removed, would return the model to the state\n\t * before the insertion. Returns `null` if no changes were done.\n\t */\n\tpublic getAffectedRange(): ModelRange | null {\n\t\tif ( !this._affectedStart ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new ModelRange( this._affectedStart, this._affectedEnd );\n\t}\n\n\t/**\n\t * Destroys `Insertion` instance.\n\t */\n\tpublic destroy(): void {\n\t\tif ( this._affectedStart ) {\n\t\t\tthis._affectedStart.detach();\n\t\t}\n\n\t\tif ( this._affectedEnd ) {\n\t\t\tthis._affectedEnd.detach();\n\t\t}\n\t}\n\n\t/**\n\t * Handles insertion of a single node.\n\t */\n\tprivate _handleNode( node: ModelNode ): void {\n\t\t// Split the position.parent's branch up to a point where the node can be inserted.\n\t\t// If it isn't allowed in the whole branch, then of course don't split anything.\n\t\tif ( !this._checkAndSplitToAllowedPosition( node ) ) {\n\t\t\t// Handle element children if it's not an object (strip container).\n\t\t\tif ( !this.schema.isObject( node ) ) {\n\t\t\t\tthis._handleDisallowedNode( node );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Add node to the current temporary ModelDocumentFragment.\n\t\tnode = this._appendToFragment( node );\n\n\t\t// Store the first and last nodes for easy access for merging with sibling nodes.\n\t\tif ( !this._firstNode ) {\n\t\t\tthis._firstNode = node;\n\t\t}\n\n\t\tthis._lastNode = node;\n\t}\n\n\t/**\n\t * Inserts the temporary ModelDocumentFragment into the model.\n\t */\n\tprivate _insertPartialFragment(): void {\n\t\tif ( this._documentFragment.isEmpty ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst livePosition = ModelLivePosition.fromPosition( this.position, 'toNext' );\n\n\t\tthis._setAffectedBoundaries( this.position );\n\n\t\t// If the very first node of the whole insertion process is inserted, insert it separately for OT reasons (undo).\n\t\t// Note: there can be multiple calls to `_insertPartialFragment()` during one insertion process.\n\t\t// Note: only the very first node can be merged so we have to do separate operation only for it.\n\t\tif ( this._documentFragment.getChild( 0 ) == this._firstNode ) {\n\t\t\tthis.writer.insert( this._firstNode!, this.position );\n\n\t\t\t// We must merge the first node just after inserting it to avoid problems with OT.\n\t\t\t// (See: https://github.com/ckeditor/ckeditor5/pull/8773#issuecomment-760945652).\n\t\t\tthis._mergeOnLeft();\n\n\t\t\tthis.position = livePosition.toPosition();\n\t\t}\n\n\t\t// Insert the remaining nodes from document fragment.\n\t\tif ( !this._documentFragment.isEmpty ) {\n\t\t\tthis.writer.insert( this._documentFragment, this.position );\n\t\t}\n\n\t\tthis._documentFragmentPosition = this.writer.createPositionAt( this._documentFragment, 0 );\n\n\t\tthis.position = livePosition.toPosition();\n\t\tlivePosition.detach();\n\t}\n\n\t/**\n\t * @param node The disallowed node which needs to be handled.\n\t */\n\tprivate _handleDisallowedNode( node: ModelNode ): void {\n\t\t// If the node is an element, try inserting its children (strip the parent).\n\t\tif ( node.is( 'element' ) ) {\n\t\t\tthis.handleNodes( node.getChildren() );\n\t\t}\n\t}\n\n\t/**\n\t * Append a node to the temporary ModelDocumentFragment.\n\t *\n\t * @param node The node to insert.\n\t */\n\tprivate _appendToFragment( node: ModelNode ): ModelNode {\n\t\t/* v8 ignore if -- @preserve */\n\t\tif ( !this.schema.checkChild( this.position, node ) ) {\n\t\t\t// Algorithm's correctness check. We should never end up here but it's good to know that we did.\n\t\t\t// Note that it would often be a silent issue if we insert node in a place where it's not allowed.\n\n\t\t\t/**\n\t\t\t * Given node cannot be inserted on the given position.\n\t\t\t *\n\t\t\t * @error insertcontent-wrong-position\n\t\t\t * @param {module:engine/model/node~ModelNode} node Node to insert.\n\t\t\t * @param {module:engine/model/position~ModelPosition} position Position to insert the node at.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'insertcontent-wrong-position',\n\t\t\t\tthis,\n\t\t\t\t{ node, position: this.position }\n\t\t\t);\n\t\t}\n\n\t\tthis.writer.insert( node, this._documentFragmentPosition );\n\t\tthis._documentFragmentPosition = this._documentFragmentPosition.getShiftedBy( node.offsetSize );\n\n\t\t// In case text node was merged with already inserted text node, we need to get the actual node that is in the document.\n\t\t// This happens when there is a non-allowed object between text nodes.\n\t\tif ( !node.parent ) {\n\t\t\tnode = this._documentFragmentPosition.nodeBefore as ModelNode;\n\t\t}\n\n\t\t// The last inserted object should be selected because we can't put a collapsed selection after it.\n\t\tif ( this.schema.isObject( node ) && !this.schema.checkChild( this.position, '$text' ) ) {\n\t\t\tthis._nodeToSelect = node;\n\t\t} else {\n\t\t\tthis._nodeToSelect = null;\n\t\t}\n\n\t\tthis._filterAttributesAndChildrenOf.push( node );\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Sets `_affectedStart` and `_affectedEnd` to the given `position`. Should be used before a change is done during insertion process to\n\t * mark the affected range.\n\t *\n\t * This method is used before inserting a node or splitting a parent node. `_affectedStart` and `_affectedEnd` are also changed\n\t * during merging, but the logic there is more complicated so it is left out of this function.\n\t */\n\tprivate _setAffectedBoundaries( position: ModelPosition ): void {\n\t\t// Set affected boundaries stickiness so that those position will \"expand\" when something is inserted in between them:\n\t\t// <paragraph>Foo][bar</paragraph> -> <paragraph>Foo]xx[bar</paragraph>\n\t\t// This is why it cannot be a range but two separate positions.\n\t\tif ( !this._affectedStart ) {\n\t\t\tthis._affectedStart = ModelLivePosition.fromPosition( position, 'toPrevious' );\n\t\t}\n\n\t\t// If `_affectedEnd` is before the new boundary position, expand `_affectedEnd`. This can happen if first inserted node was\n\t\t// inserted into the parent but the next node is moved-out of that parent:\n\t\t// (1) <paragraph>Foo][</paragraph> -> <paragraph>Foo]xx[</paragraph>\n\t\t// (2) <paragraph>Foo]xx[</paragraph> -> <paragraph>Foo]xx</paragraph><widget></widget>[\n\t\tif ( !this._affectedEnd || this._affectedEnd.isBefore( position ) ) {\n\t\t\tif ( this._affectedEnd ) {\n\t\t\t\tthis._affectedEnd.detach();\n\t\t\t}\n\n\t\t\tthis._affectedEnd = ModelLivePosition.fromPosition( position, 'toNext' );\n\t\t}\n\t}\n\n\t/**\n\t * Merges the previous sibling of the first node if it should be merged.\n\t *\n\t * After the content was inserted we may try to merge it with its siblings.\n\t * This should happen only if the selection was in those elements initially.\n\t */\n\tprivate _mergeOnLeft(): void {\n\t\tconst node = this._firstNode;\n\n\t\tif ( !( node instanceof ModelElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._canMergeLeft( node ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mergePosLeft = ModelLivePosition._createBefore( node );\n\t\tmergePosLeft.stickiness = 'toNext';\n\n\t\tconst livePosition = ModelLivePosition.fromPosition( this.position, 'toNext' );\n\n\t\t// If `_affectedStart` is sames as merge position, it means that the element \"marked\" by `_affectedStart` is going to be\n\t\t// removed and its contents will be moved. This won't transform `ModelLivePosition` so `_affectedStart` needs to be moved\n\t\t// by hand to properly reflect affected range. (Due to `_affectedStart` and `_affectedEnd` stickiness, the \"range\" is\n\t\t// shown as `][`).\n\t\t//\n\t\t// Example - insert `<paragraph>Abc</paragraph><paragraph>Xyz</paragraph>` at the end of `<paragraph>Foo^</paragraph>`:\n\t\t//\n\t\t// <paragraph>Foo</paragraph><paragraph>Bar</paragraph>   -->\n\t\t// <paragraph>Foo</paragraph>]<paragraph>Abc</paragraph><paragraph>Xyz</paragraph>[<paragraph>Bar</paragraph>   -->\n\t\t// <paragraph>Foo]Abc</paragraph><paragraph>Xyz</paragraph>[<paragraph>Bar</paragraph>\n\t\t//\n\t\t// Note, that if we are here then something must have been inserted, so `_affectedStart` and `_affectedEnd` have to be set.\n\t\tif ( this._affectedStart!.isEqual( mergePosLeft ) ) {\n\t\t\tthis._affectedStart!.detach();\n\t\t\tthis._affectedStart = ModelLivePosition._createAt( mergePosLeft.nodeBefore!, 'end', 'toPrevious' );\n\t\t}\n\n\t\t// We need to update the references to the first and last nodes if they will be merged into the previous sibling node\n\t\t// because the reference would point to the removed node.\n\t\t//\n\t\t// <p>A^A</p> + <p>X</p>\n\t\t//\n\t\t// <p>A</p>^<p>A</p>\n\t\t// <p>A</p><p>X</p><p>A</p>\n\t\t// <p>AX</p><p>A</p>\n\t\t// <p>AXA</p>\n\t\tif ( this._firstNode === this._lastNode ) {\n\t\t\tthis._firstNode = mergePosLeft.nodeBefore;\n\t\t\tthis._lastNode = mergePosLeft.nodeBefore;\n\t\t}\n\n\t\tthis.writer.merge( mergePosLeft );\n\n\t\t// If only one element (the merged one) is in the \"affected range\", also move the affected range end appropriately.\n\t\t//\n\t\t// Example - insert `<paragraph>Abc</paragraph>` at the of `<paragraph>Foo^</paragraph>`:\n\t\t//\n\t\t// <paragraph>Foo</paragraph><paragraph>Bar</paragraph>   -->\n\t\t// <paragraph>Foo</paragraph>]<paragraph>Abc</paragraph>[<paragraph>Bar</paragraph>   -->\n\t\t// <paragraph>Foo]Abc</paragraph>[<paragraph>Bar</paragraph>   -->\n\t\t// <paragraph>Foo]Abc[</paragraph><paragraph>Bar</paragraph>\n\t\tif ( mergePosLeft.isEqual( this._affectedEnd! ) && this._firstNode === this._lastNode ) {\n\t\t\tthis._affectedEnd!.detach();\n\t\t\tthis._affectedEnd = ModelLivePosition._createAt( mergePosLeft.nodeBefore!, 'end', 'toNext' );\n\t\t}\n\n\t\tthis.position = livePosition.toPosition();\n\t\tlivePosition.detach();\n\n\t\t// After merge elements that were marked by _insert() to be filtered might be gone so\n\t\t// we need to mark the new container.\n\t\tthis._filterAttributesAndChildrenOf.push( this.position.parent as any );\n\n\t\tmergePosLeft.detach();\n\t}\n\n\t/**\n\t * Merges the next sibling of the last node if it should be merged.\n\t *\n\t * After the content was inserted we may try to merge it with its siblings.\n\t * This should happen only if the selection was in those elements initially.\n\t */\n\tprivate _mergeOnRight(): void {\n\t\tconst node = this._lastNode;\n\n\t\tif ( !( node instanceof ModelElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._canMergeRight( node ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mergePosRight = ModelLivePosition._createAfter( node );\n\t\tmergePosRight.stickiness = 'toNext';\n\n\t\t/* v8 ignore if -- @preserve */\n\t\tif ( !this.position.isEqual( mergePosRight ) ) {\n\t\t\t// Algorithm's correctness check. We should never end up here but it's good to know that we did.\n\t\t\t// At this point the insertion position should be after the node we'll merge. If it isn't,\n\t\t\t// it should need to be secured as in the left merge case.\n\t\t\t/**\n\t\t\t * An internal error occurred when merging inserted content with its siblings.\n\t\t\t * The insertion position should equal the merge position.\n\t\t\t *\n\t\t\t * If you encountered this error, report it back to the CKEditor 5 team\n\t\t\t * with as many details as possible regarding the content being inserted and the insertion position.\n\t\t\t *\n\t\t\t * @error insertcontent-invalid-insertion-position\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'insertcontent-invalid-insertion-position', this );\n\t\t}\n\n\t\t// Move the position to the previous node, so it isn't moved to the graveyard on merge.\n\t\t// <p>x</p>[]<p>y</p> => <p>x[]</p><p>y</p>\n\t\tthis.position = ModelPosition._createAt( mergePosRight.nodeBefore!, 'end' );\n\n\t\t// Explanation of setting position stickiness to `'toPrevious'`:\n\t\t// OK:  <p>xx[]</p> + <p>yy</p> => <p>xx[]yy</p> (when sticks to previous)\n\t\t// NOK: <p>xx[]</p> + <p>yy</p> => <p>xxyy[]</p> (when sticks to next)\n\t\tconst livePosition = ModelLivePosition.fromPosition( this.position, 'toPrevious' );\n\n\t\t// See comment in `_mergeOnLeft()` on moving `_affectedStart`.\n\t\tif ( this._affectedEnd!.isEqual( mergePosRight ) ) {\n\t\t\tthis._affectedEnd!.detach();\n\t\t\tthis._affectedEnd = ModelLivePosition._createAt( mergePosRight.nodeBefore!, 'end', 'toNext' );\n\t\t}\n\n\t\t// We need to update the references to the first and last nodes if they will be merged into the previous sibling node\n\t\t// because the reference would point to the removed node.\n\t\t//\n\t\t// <p>A^A</p> + <p>X</p>\n\t\t//\n\t\t// <p>A</p>^<p>A</p>\n\t\t// <p>A</p><p>X</p><p>A</p>\n\t\t// <p>AX</p><p>A</p>\n\t\t// <p>AXA</p>\n\t\tif ( this._firstNode === this._lastNode ) {\n\t\t\tthis._firstNode = mergePosRight.nodeBefore;\n\t\t\tthis._lastNode = mergePosRight.nodeBefore;\n\t\t}\n\n\t\tthis.writer.merge( mergePosRight );\n\n\t\t// See comment in `_mergeOnLeft()` on moving `_affectedStart`.\n\t\tif ( mergePosRight.getShiftedBy( -1 ).isEqual( this._affectedStart! ) && this._firstNode === this._lastNode ) {\n\t\t\tthis._affectedStart!.detach();\n\t\t\tthis._affectedStart = ModelLivePosition._createAt( mergePosRight.nodeBefore!, 0, 'toPrevious' );\n\t\t}\n\n\t\tthis.position = livePosition.toPosition();\n\t\tlivePosition.detach();\n\n\t\t// After merge elements that were marked by _insert() to be filtered might be gone so\n\t\t// we need to mark the new container.\n\t\tthis._filterAttributesAndChildrenOf.push( this.position.parent as any );\n\n\t\tmergePosRight.detach();\n\t}\n\n\t/**\n\t * Checks whether specified node can be merged with previous sibling element.\n\t *\n\t * @param node The node which could potentially be merged.\n\t */\n\tprivate _canMergeLeft( node: ModelElement ): boolean {\n\t\tconst previousSibling = node.previousSibling;\n\n\t\treturn ( previousSibling instanceof ModelElement ) &&\n\t\t\tthis.canMergeWith.has( previousSibling ) &&\n\t\t\tthis.model.schema.checkMerge( previousSibling, node );\n\t}\n\n\t/**\n\t * Checks whether specified node can be merged with next sibling element.\n\t *\n\t * @param node The node which could potentially be merged.\n\t */\n\tprivate _canMergeRight( node: ModelElement ): boolean {\n\t\tconst nextSibling = node.nextSibling;\n\n\t\treturn ( nextSibling instanceof ModelElement ) &&\n\t\t\tthis.canMergeWith.has( nextSibling ) &&\n\t\t\tthis.model.schema.checkMerge( node, nextSibling );\n\t}\n\n\t/**\n\t * Inserts a paragraph and moves the insertion position into it.\n\t */\n\tprivate _insertAutoParagraph(): void {\n\t\t// Insert nodes collected in temporary ModelDocumentFragment if the position parent needs change to process further nodes.\n\t\tthis._insertPartialFragment();\n\n\t\t// Insert a paragraph and move insertion position to it.\n\t\tconst paragraph = this.writer.createElement( 'paragraph' );\n\n\t\tthis.writer.insert( paragraph, this.position );\n\t\tthis._setAffectedBoundaries( this.position );\n\n\t\tthis._lastAutoParagraph = paragraph;\n\t\tthis.position = this.writer.createPositionAt( paragraph, 0 );\n\t}\n\n\t/**\n\t * @returns Whether an allowed position was found.\n\t * `false` is returned if the node isn't allowed at any position up in the tree, `true` if was.\n\t */\n\tprivate _checkAndSplitToAllowedPosition( node: ModelNode ): boolean {\n\t\tconst allowedIn = this._getAllowedIn( this.position.parent as any, node );\n\n\t\tif ( !allowedIn ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Insert nodes collected in temporary ModelDocumentFragment if the position parent needs change to process further nodes.\n\t\tif ( allowedIn != this.position.parent ) {\n\t\t\tthis._insertPartialFragment();\n\t\t}\n\n\t\twhile ( allowedIn != this.position.parent ) {\n\t\t\tif ( this.position.isAtStart ) {\n\t\t\t\t// If insertion position is at the beginning of the parent, move it out instead of splitting.\n\t\t\t\t// <p>^Foo</p> -> ^<p>Foo</p>\n\t\t\t\tconst parent: ModelElement = this.position.parent as ModelElement;\n\n\t\t\t\tthis.position = this.writer.createPositionBefore( parent );\n\n\t\t\t\t// Special case – parent is empty (<p>^</p>).\n\t\t\t\t//\n\t\t\t\t// 1. parent.isEmpty\n\t\t\t\t// We can remove the element after moving insertion position out of it.\n\t\t\t\t//\n\t\t\t\t// 2. parent.parent === allowedIn\n\t\t\t\t// However parent should remain in place when allowed element is above limit element in document tree.\n\t\t\t\t// For example there shouldn't be allowed to remove empty paragraph from tableCell, when is pasted\n\t\t\t\t// content allowed in $root.\n\t\t\t\tif ( parent.isEmpty && parent.parent === allowedIn ) {\n\t\t\t\t\tthis.writer.remove( parent );\n\t\t\t\t}\n\t\t\t} else if ( this.position.isAtEnd ) {\n\t\t\t\t// If insertion position is at the end of the parent, move it out instead of splitting.\n\t\t\t\t// <p>Foo^</p> -> <p>Foo</p>^\n\t\t\t\tthis.position = this.writer.createPositionAfter( this.position.parent as ModelElement );\n\t\t\t} else {\n\t\t\t\tconst tempPos = this.writer.createPositionAfter( this.position.parent as ModelElement );\n\n\t\t\t\tthis._setAffectedBoundaries( this.position );\n\t\t\t\tthis.writer.split( this.position );\n\n\t\t\t\tthis.position = tempPos;\n\n\t\t\t\tthis.canMergeWith.add( this.position.nodeAfter );\n\t\t\t}\n\t\t}\n\n\t\t// At this point, we split elements up to the parent in which `node` is allowed.\n\t\t// Note that `_getAllowedIn()` checks if the `node` is allowed either directly, or when auto-paragraphed.\n\t\t// So, let's check if the `node` is allowed directly. If not, we need to auto-paragraph it.\n\t\tif ( !this.schema.checkChild( this.position.parent, node ) ) {\n\t\t\tthis._insertAutoParagraph();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Gets the element in which the given node is allowed. It checks the passed element and all its ancestors.\n\t *\n\t * It also verifies if auto-paragraphing could help.\n\t *\n\t * @param contextElement The element in which context the node should be checked.\n\t * @param childNode The node to check.\n\t */\n\tprivate _getAllowedIn( contextElement: ModelElement, childNode: ModelNode ): ModelElement | null {\n\t\tconst context = this.schema.createContext( contextElement );\n\n\t\t// Check if a node can be inserted in the given context...\n\t\tif ( this.schema.checkChild( context, childNode ) ) {\n\t\t\treturn contextElement;\n\t\t}\n\n\t\t// ...or it would be accepted if a paragraph would be inserted.\n\t\tif (\n\t\t\tthis.schema.checkChild( context, 'paragraph' ) &&\n\t\t\tthis.schema.checkChild( context.push( 'paragraph' ), childNode )\n\t\t) {\n\t\t\treturn contextElement;\n\t\t}\n\n\t\t// If the child wasn't allowed in the context element and the element is a limit there's no point in\n\t\t// checking any further towards the root. This is it: the limit is unsplittable and there's nothing\n\t\t// we can do about it. Without this check, the algorithm will analyze parent of the limit and may create\n\t\t// an illusion of the child being allowed. There's no way to insert it down there, though. It results in\n\t\t// infinite loops.\n\t\tif ( this.schema.isLimit( contextElement ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this._getAllowedIn( contextElement.parent as any, childNode );\n\t}\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/**\n * @module engine/model/utils/insertobject\n */\n\nimport { type ModelDocumentSelection } from '../documentselection.js';\nimport { type ModelSelection } from '../selection.js';\n\nimport { type ModelElement } from '../element.js';\nimport { type Model } from '../model.js';\nimport { type ModelRange } from '../range.js';\nimport { type ModelWriter } from '../writer.js';\n\nimport { CKEditorError, first } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.\n *\n * **Note:** Use {@link module:engine/model/model~Model#insertObject} instead of this function.\n * This function is only exposed to be reusable in algorithms which change the {@link module:engine/model/model~Model#insertObject}\n * method's behavior.\n *\n * **Note**: For more documentation and examples, see {@link module:engine/model/model~Model#insertObject}.\n *\n * @param model The model in context of which the insertion should be performed.\n * @param object An object to be inserted into the model document.\n * @param selectable A selectable where the content should be inserted. If not specified, the current\n * {@link module:engine/model/document~ModelDocument#selection document selection} will be used instead.\n * @param options Additional options.\n * @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to\n * `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).\n * * When `'auto'`, the algorithm will decide whether to insert the object before or after `selectable` to avoid content splitting.\n * * When `'before'`, the closest position before `selectable` will be used that will not result in content splitting.\n * * When `'after'`, the closest position after `selectable` will be used that will not result in content splitting.\n *\n * Note that this option works only for block objects. Inline objects are inserted into text and do not split blocks.\n * @param options.setSelection An option that, when set, moves the\n * {@link module:engine/model/document~ModelDocument#selection document selection} after inserting the object.\n * * When `'on'`, the document selection will be set on the inserted object.\n * * When `'after'`, the document selection will move to the closest text node after the inserted object. If there is no\n * such text node, a paragraph will be created and the document selection will be moved inside it.\n * @returns A range which contains all the performed changes. This is a range that, if removed,\n * would return the model to the state before the insertion. If no changes were preformed by `insertObject()`, returns a range collapsed\n * at the insertion position.\n */\nexport function insertObject(\n\tmodel: Model,\n\tobject: ModelElement,\n\tselectable?: ModelSelection | ModelDocumentSelection | null,\n\toptions: {\n\t\tfindOptimalPosition?: 'auto' | 'before' | 'after';\n\t\tsetSelection?: 'on' | 'after';\n\t} = {}\n): ModelRange {\n\tif ( !model.schema.isObject( object ) ) {\n\t\t/**\n\t\t * Tried to insert an element with {@link module:engine/model/utils/insertobject insertObject()} function\n\t\t * that is not defined as an object in schema.\n\t\t * See {@link module:engine/model/schema~ModelSchemaItemDefinition#isObject `SchemaItemDefinition`}.\n\t\t * If you want to insert content that is not an object you might want to use\n\t\t * {@link module:engine/model/utils/insertcontent insertContent()} function.\n\t\t * @error insertobject-element-not-an-object\n\t\t */\n\t\tthrow new CKEditorError( 'insertobject-element-not-an-object', model, { object } );\n\t}\n\n\t// Normalize selectable to a selection instance.\n\tconst originalSelection: ModelSelection | ModelDocumentSelection = selectable ? selectable : model.document.selection;\n\n\t// Adjust the insertion selection.\n\tlet insertionSelection = originalSelection;\n\n\tif ( options.findOptimalPosition && model.schema.isBlock( object ) ) {\n\t\tinsertionSelection = model.createSelection(\n\t\t\tmodel.schema.findOptimalInsertionRange( originalSelection, options.findOptimalPosition )\n\t\t);\n\t}\n\n\t// Collect attributes to be copied on the inserted object.\n\tconst firstSelectedBlock = first( originalSelection.getSelectedBlocks() );\n\tconst attributesToCopy = {};\n\n\tif ( firstSelectedBlock ) {\n\t\tObject.assign( attributesToCopy, model.schema.getAttributesWithProperty( firstSelectedBlock, 'copyOnReplace', true ) );\n\t}\n\n\treturn model.change( writer => {\n\t\t// Remove the selected content to find out what the parent of the inserted object would be.\n\t\t// It would be removed inside model.insertContent() anyway.\n\t\tif ( !insertionSelection.isCollapsed ) {\n\t\t\tmodel.deleteContent( insertionSelection, { doNotAutoparagraph: true } );\n\t\t}\n\n\t\tlet elementToInsert = object;\n\t\tconst insertionPositionParent = insertionSelection.anchor!.parent as ModelElement;\n\t\tconst context = model.schema.createContext( insertionPositionParent );\n\n\t\t// Auto-paragraphing of an inline objects.\n\t\tif (\n\t\t\t!model.schema.checkChild( context, object ) &&\n\t\t\tmodel.schema.checkChild( context, 'paragraph' ) &&\n\t\t\tmodel.schema.checkChild( context.push( 'paragraph' ), object )\n\t\t) {\n\t\t\telementToInsert = writer.createElement( 'paragraph' );\n\n\t\t\twriter.insert( object, elementToInsert );\n\t\t}\n\n\t\t// Apply attributes that are allowed on the inserted object (or paragraph if autoparagraphed).\n\t\tmodel.schema.setAllowedAttributes( elementToInsert, attributesToCopy, writer );\n\n\t\t// Insert the prepared content at the optionally adjusted selection.\n\t\tconst affectedRange = model.insertContent( elementToInsert, insertionSelection );\n\n\t\t// Nothing got inserted.\n\t\tif ( affectedRange.isCollapsed ) {\n\t\t\treturn affectedRange;\n\t\t}\n\n\t\tif ( options.setSelection ) {\n\t\t\tupdateSelection( writer, object, options.setSelection, attributesToCopy );\n\t\t}\n\n\t\treturn affectedRange;\n\t} );\n}\n\n/**\n * Updates document selection based on given `place` parameter in relation to `contextElement` element.\n *\n * @param writer An instance of the model writer.\n * @param contextElement An element to set the attributes on.\n * @param place The place where selection should be set in relation to the `contextElement` element.\n * Value `on` will set selection on the passed `contextElement`. Value `after` will set selection after `contextElement`.\n * @param attributes Attributes keys and values to set on a paragraph that this function can create when\n * `place` parameter is equal to `after` but there is no element with `$text` node to set selection in.\n */\nfunction updateSelection(\n\twriter: ModelWriter,\n\tcontextElement: ModelElement,\n\tplace: 'after' | 'on',\n\tparagraphAttributes: Record<string, unknown>\n) {\n\tconst model = writer.model;\n\n\tif ( place == 'on' ) {\n\t\twriter.setSelection( contextElement, 'on' );\n\n\t\treturn;\n\t}\n\n\tif ( place != 'after' ) {\n\t\t/**\n\t\t * The unsupported `options.setSelection` parameter was passed\n\t\t * to the {@link module:engine/model/utils/insertobject insertObject()} function.\n\t\t * Check the {@link module:engine/model/utils/insertobject insertObject()} API documentation for allowed\n\t\t * `options.setSelection` parameter values.\n\t\t *\n\t\t * @error insertobject-invalid-place-parameter-value\n\t\t */\n\t\tthrow new CKEditorError( 'insertobject-invalid-place-parameter-value', model );\n\t}\n\n\tlet nextElement = contextElement.nextSibling;\n\n\tif ( model.schema.isInline( contextElement ) ) {\n\t\twriter.setSelection( contextElement, 'after' );\n\n\t\treturn;\n\t}\n\n\t// Check whether an element next to the inserted element is defined and can contain a text.\n\tconst canSetSelection = nextElement && model.schema.checkChild( nextElement, '$text' );\n\n\t// If the element is missing, but a paragraph could be inserted next to the element, let's add it.\n\tif ( !canSetSelection && model.schema.checkChild( contextElement.parent as any, 'paragraph' ) ) {\n\t\tnextElement = writer.createElement( 'paragraph' );\n\n\t\tmodel.schema.setAllowedAttributes( nextElement, paragraphAttributes, writer );\n\t\tmodel.insertContent( nextElement, writer.createPositionAfter( contextElement ) );\n\t}\n\n\t// Put the selection inside the element, at the beginning.\n\tif ( nextElement ) {\n\t\twriter.setSelection( nextElement, 0 );\n\t}\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/**\n * @module engine/model/utils/modifyselection\n */\n\nimport { ModelDocumentSelection } from '../documentselection.js';\nimport { ModelPosition } from '../position.js';\nimport { ModelRange } from '../range.js';\nimport { ModelTreeWalker, type ModelTreeWalkerValue } from '../treewalker.js';\n\nimport { type Model } from '../model.js';\nimport { type ModelSchema } from '../schema.js';\nimport { type ModelSelection } from '../selection.js';\nimport { type ModelText } from '../text.js';\nimport { type ModelNode } from '../node.js';\n\nimport { isInsideSurrogatePair, isInsideCombinedSymbol, isInsideEmojiSequence } from '@ckeditor/ckeditor5-utils';\n\nconst wordBoundaryCharacters = ' ,.?!:;\"-()';\n\n/**\n * Modifies the selection. Currently, the supported modifications are:\n *\n * * Extending. The selection focus is moved in the specified `options.direction` with a step specified in `options.unit`.\n * Possible values for `unit` are:\n *  * `'character'` (default) - moves selection by one user-perceived character. In most cases this means moving by one\n *  character in `String` sense. However, unicode also defines \"combing marks\". These are special symbols, that combines\n *  with a symbol before it (\"base character\") to create one user-perceived character. For example, `q̣̇` is a normal\n *  letter `q` with two \"combining marks\": upper dot (`Ux0307`) and lower dot (`Ux0323`). For most actions, i.e. extending\n *  selection by one position, it is correct to include both \"base character\" and all of it's \"combining marks\". That is\n *  why `'character'` value is most natural and common method of modifying selection.\n *  * `'codePoint'` - moves selection by one unicode code point. In contrary to, `'character'` unit, this will insert\n *  selection between \"base character\" and \"combining mark\", because \"combining marks\" have their own unicode code points.\n *  However, for technical reasons, unicode code points with values above `UxFFFF` are represented in native `String` by\n *  two characters, called \"surrogate pairs\". Halves of \"surrogate pairs\" have a meaning only when placed next to each other.\n *  For example `𨭎` is represented in `String` by `\\uD862\\uDF4E`. Both `\\uD862` and `\\uDF4E` do not have any meaning\n *  outside the pair (are rendered as ? when alone). Position between them would be incorrect. In this case, selection\n *  extension will include whole \"surrogate pair\".\n *  * `'word'` - moves selection by a whole word.\n *\n * **Note:** if you extend a forward selection in a backward direction you will in fact shrink it.\n *\n * **Note:** Use {@link module:engine/model/model~Model#modifySelection} instead of this function.\n * This function is only exposed to be reusable in algorithms\n * which change the {@link module:engine/model/model~Model#modifySelection}\n * method's behavior.\n *\n * @param model The model in context of which the selection modification should be performed.\n * @param selection The selection to modify.\n * @param options.direction The direction in which the selection should be modified. Default 'forward'.\n * @param options.unit The unit by which selection should be modified. Default 'character'.\n * @param options.treatEmojiAsSingleUnit Whether multi-characer emoji sequences should be handled as single unit.\n * @internal\n */\nexport function modifySelection(\n\tmodel: Model,\n\tselection: ModelSelection | ModelDocumentSelection,\n\toptions: {\n\t\tdirection?: 'forward' | 'backward';\n\t\tunit?: 'character' | 'codePoint' | 'word';\n\t\ttreatEmojiAsSingleUnit?: boolean;\n\t} = {}\n): void {\n\tconst schema = model.schema;\n\tconst isForward = options.direction != 'backward';\n\tconst unit = options.unit ? options.unit : 'character';\n\tconst treatEmojiAsSingleUnit = !!options.treatEmojiAsSingleUnit;\n\n\tconst focus = selection.focus!;\n\n\tconst walker = new ModelTreeWalker( {\n\t\tboundaries: getSearchRange( focus, isForward ),\n\t\tsingleCharacters: true,\n\t\tdirection: isForward ? 'forward' : 'backward'\n\t} );\n\n\tconst data = { walker, schema, isForward, unit, treatEmojiAsSingleUnit };\n\n\tlet next;\n\n\twhile ( ( next = walker.next() ) ) {\n\t\tif ( next.done ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst position = tryExtendingTo( data, next.value );\n\n\t\tif ( position ) {\n\t\t\tif ( selection instanceof ModelDocumentSelection ) {\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\twriter.setSelectionFocus( position );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tselection.setFocus( position );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n/**\n * Checks whether the selection can be extended to the the walker's next value (next position).\n */\nfunction tryExtendingTo(\n\tdata: {\n\t\twalker: ModelTreeWalker;\n\t\tschema: ModelSchema;\n\t\tisForward: boolean;\n\t\tunit: 'character' | 'codePoint' | 'word';\n\t\ttreatEmojiAsSingleUnit: boolean;\n\t},\n\tvalue: ModelTreeWalkerValue\n): ModelPosition | undefined {\n\tconst { isForward, walker, unit, schema, treatEmojiAsSingleUnit } = data;\n\tconst { type, item, nextPosition } = value;\n\n\t// If found text, we can certainly put the focus in it. Let's just find a correct position\n\t// based on the unit.\n\tif ( type == 'text' ) {\n\t\tif ( data.unit === 'word' ) {\n\t\t\treturn getCorrectWordBreakPosition( walker, isForward );\n\t\t}\n\n\t\treturn getCorrectPosition( walker, unit, treatEmojiAsSingleUnit );\n\t}\n\n\t// Entering an element.\n\tif ( type == ( isForward ? 'elementStart' : 'elementEnd' ) ) {\n\t\t// If it's a selectable, we can select it now.\n\t\tif ( schema.isSelectable( item ) ) {\n\t\t\treturn ModelPosition._createAt( item, isForward ? 'after' : 'before' );\n\t\t}\n\n\t\t// If text allowed on this position, extend to this place.\n\t\tif ( schema.checkChild( nextPosition, '$text' ) ) {\n\t\t\treturn nextPosition;\n\t\t}\n\t}\n\t// Leaving an element.\n\telse {\n\t\t// If leaving a limit element, stop.\n\t\tif ( schema.isLimit( item ) ) {\n\t\t\t// NOTE: Fast-forward the walker until the end.\n\t\t\twalker.skip( () => true );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If text allowed on this position, extend to this place.\n\t\tif ( schema.checkChild( nextPosition, '$text' ) ) {\n\t\t\treturn nextPosition;\n\t\t}\n\t}\n}\n\n/**\n * Finds a correct position by walking in a text node and checking whether selection can be extended to given position\n * or should be extended further.\n */\nfunction getCorrectPosition(\n\twalker: ModelTreeWalker,\n\tunit: 'character' | 'codePoint' | 'word',\n\ttreatEmojiAsSingleUnit: boolean\n): ModelPosition {\n\tconst textNode = walker.position.textNode;\n\n\tif ( textNode ) {\n\t\tconst data = textNode.data;\n\t\tlet offset = walker.position.offset - textNode.startOffset!;\n\n\t\twhile (\n\t\t\tisInsideSurrogatePair( data, offset ) ||\n\t\t\t( unit == 'character' && isInsideCombinedSymbol( data, offset ) ) ||\n\t\t\t( treatEmojiAsSingleUnit && isInsideEmojiSequence( data, offset ) )\n\t\t) {\n\t\t\twalker.next();\n\n\t\t\toffset = walker.position.offset - textNode.startOffset!;\n\t\t}\n\t}\n\n\treturn walker.position;\n}\n\n/**\n * Finds a correct position of a word break by walking in a text node and checking whether selection can be extended to given position\n * or should be extended further.\n */\nfunction getCorrectWordBreakPosition( walker: ModelTreeWalker, isForward: boolean ): ModelPosition {\n\tlet textNode: ModelNode | null = walker.position.textNode;\n\n\tif ( !textNode ) {\n\t\ttextNode = isForward ? walker.position.nodeAfter : walker.position.nodeBefore;\n\t}\n\n\twhile ( textNode && textNode.is( '$text' ) ) {\n\t\tconst offset = walker.position.offset - textNode.startOffset!;\n\n\t\t// Check of adjacent text nodes with different attributes (like BOLD).\n\t\t// Example          : 'foofoo []bar<$text bold=\"true\">bar</$text> bazbaz'\n\t\t// should expand to : 'foofoo [bar<$text bold=\"true\">bar</$text>] bazbaz'.\n\t\tif ( isAtNodeBoundary( textNode, offset, isForward ) ) {\n\t\t\ttextNode = isForward ? walker.position.nodeAfter : walker.position.nodeBefore;\n\t\t}\n\t\t// Check if this is a word boundary.\n\t\telse if ( isAtWordBoundary( textNode.data, offset, isForward ) ) {\n\t\t\tbreak;\n\t\t}\n\t\t// Maybe one more character.\n\t\telse {\n\t\t\twalker.next();\n\t\t}\n\t}\n\n\treturn walker.position;\n}\n\nfunction getSearchRange( start: ModelPosition, isForward: boolean ) {\n\tconst root = start.root;\n\tconst searchEnd = ModelPosition._createAt( root, isForward ? 'end' : 0 );\n\n\tif ( isForward ) {\n\t\treturn new ModelRange( start, searchEnd );\n\t} else {\n\t\treturn new ModelRange( searchEnd, start );\n\t}\n}\n\n/**\n * Checks if selection is on word boundary.\n */\nfunction isAtWordBoundary( data: string, offset: number, isForward: boolean ) {\n\t// The offset to check depends on direction.\n\tconst offsetToCheck = offset + ( isForward ? 0 : -1 );\n\n\treturn wordBoundaryCharacters.includes( data.charAt( offsetToCheck ) );\n}\n\n/**\n * Checks if selection is on node boundary.\n */\nfunction isAtNodeBoundary( textNode: ModelText, offset: number, isForward: boolean ) {\n\treturn offset === ( isForward ? textNode.offsetSize : 0 );\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/**\n * @module engine/model/model\n */\n\nimport { Batch, type BatchType } from './batch.js';\nimport { ModelDocument } from './document.js';\nimport { MarkerCollection } from './markercollection.js';\nimport { ModelPosition, type ModelPositionOffset, type ModelPositionStickiness } from './position.js';\nimport { ModelRange } from './range.js';\nimport { ModelSelection, type ModelPlaceOrOffset, type ModelSelectable } from './selection.js';\nimport { OperationFactory } from './operation/operationfactory.js';\nimport { ModelDocumentSelection } from './documentselection.js';\nimport { ModelSchema } from './schema.js';\nimport { ModelWriter } from './writer.js';\nimport { ModelNode } from './node.js';\n\nimport { autoParagraphEmptyRoots } from './utils/autoparagraphing.js';\nimport { injectSelectionPostFixer } from './utils/selection-post-fixer.js';\nimport { deleteContent } from './utils/deletecontent.js';\nimport { getSelectedContent } from './utils/getselectedcontent.js';\nimport { insertContent } from './utils/insertcontent.js';\nimport { insertObject } from './utils/insertobject.js';\nimport { modifySelection } from './utils/modifyselection.js';\n\nimport { type ModelDocumentFragment } from './documentfragment.js';\nimport { type ModelItem } from './item.js';\nimport { type ModelElement } from './element.js';\nimport { type Operation } from './operation/operation.js';\n\nimport {\n\tCKEditorError,\n\tObservableMixin,\n\ttype DecoratedMethodEvent,\n\ttype Config,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { EngineConfig } from '../engineconfig.js';\n\n// @if CK_DEBUG_ENGINE // import { dumpTrees, initDocumentDumping } from '../dev-utils/utils.js';\n// @if CK_DEBUG_ENGINE // import { OperationReplayer } from '../dev-utils/operationreplayer.js';\n\nconst ModelBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Editor's data model. Read about the model in the\n * {@glink framework/architecture/editing-engine engine architecture} guide.\n */\nexport class Model extends ModelBase {\n\t/**\n\t * Model's marker collection.\n\t */\n\tpublic readonly markers: MarkerCollection;\n\n\t/**\n\t * Model's document.\n\t */\n\tpublic readonly document: ModelDocument;\n\n\t/**\n\t * Model's schema.\n\t */\n\tpublic readonly schema: ModelSchema;\n\n\t/**\n\t * Stores all configurations specific to editor instance.\n\t *\n\t * @internal\n\t */\n\tpublic readonly _config?: Config<EngineConfig>;\n\n\t/**\n\t * All callbacks added by {@link module:engine/model/model~Model#change} or\n\t * {@link module:engine/model/model~Model#enqueueChange} methods waiting to be executed.\n\t */\n\tprivate readonly _pendingChanges: Array<{ batch: Batch; callback: ( writer: ModelWriter ) => any }>;\n\n\t/**\n\t * The last created and currently used writer instance.\n\t */\n\tprivate _currentWriter: ModelWriter | null;\n\n\t// @if CK_DEBUG_ENGINE // private _operationLogs: Array<string>;\n\t// @if CK_DEBUG_ENGINE // private _appliedOperations: Array<Operation>;\n\n\tconstructor( config?: Config<EngineConfig> ) {\n\t\tsuper();\n\n\t\tthis.markers = new MarkerCollection();\n\t\tthis.document = new ModelDocument( this );\n\t\tthis.schema = new ModelSchema();\n\n\t\tthis._config = config;\n\t\tthis._pendingChanges = [];\n\t\tthis._currentWriter = null;\n\n\t\t( [ 'deleteContent', 'modifySelection', 'getSelectedContent', 'applyOperation' ] as const )\n\t\t\t.forEach( methodName => this.decorate( methodName ) );\n\n\t\t// Adding operation validation with `highest` priority, so it is called before any other feature would like\n\t\t// to do anything with the operation. If the operation has incorrect parameters it should throw on the earliest occasion.\n\t\tthis.on<ModelApplyOperationEvent>( 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\toperation._validate();\n\t\t}, { priority: 'highest' } );\n\n\t\t// Register some default abstract entities.\n\t\tthis.schema.register( '$root', {\n\t\t\tisLimit: true\n\t\t} );\n\n\t\tthis.schema.register( '$inlineRoot', {\n\t\t\tallowContentOf: '$block',\n\t\t\tallowAttributesOf: '$root',\n\t\t\tisLimit: true\n\t\t} );\n\n\t\tthis.schema.register( '$container', {\n\t\t\tallowIn: [ '$root', '$container' ]\n\t\t} );\n\n\t\tthis.schema.register( '$block', {\n\t\t\tallowIn: [ '$root', '$container' ],\n\t\t\tisBlock: true\n\t\t} );\n\n\t\tthis.schema.register( '$blockObject', {\n\t\t\tallowWhere: '$block',\n\t\t\tisBlock: true,\n\t\t\tisObject: true\n\t\t} );\n\n\t\tthis.schema.register( '$inlineObject', {\n\t\t\tallowWhere: '$text',\n\t\t\tallowAttributesOf: '$text',\n\t\t\tisInline: true,\n\t\t\tisObject: true\n\t\t} );\n\n\t\tthis.schema.register( '$text', {\n\t\t\tallowIn: '$block',\n\t\t\tisInline: true,\n\t\t\tisContent: true\n\t\t} );\n\n\t\tthis.schema.register( '$clipboardHolder', {\n\t\t\tallowContentOf: [ '$root', '$inlineRoot' ],\n\t\t\tallowChildren: '$text',\n\t\t\tisLimit: true\n\t\t} );\n\n\t\tthis.schema.register( '$documentFragment', {\n\t\t\tallowContentOf: [ '$root', '$inlineRoot' ],\n\t\t\tallowChildren: '$text',\n\t\t\tisLimit: true\n\t\t} );\n\n\t\t// An element needed by the `upcastElementToMarker` converter.\n\t\t// This element temporarily represents a marker boundary during the conversion process and is removed\n\t\t// at the end of the conversion. `UpcastDispatcher` or at least `Conversion` class looks like a\n\t\t// better place for this registration but both know nothing about `Schema`.\n\t\tthis.schema.register( '$marker' );\n\t\tthis.schema.addChildCheck( () => true, '$marker' ); // Allow everywhere.\n\n\t\tinjectSelectionPostFixer( this );\n\n\t\t// Post-fixer which takes care of adding empty paragraph elements to the empty roots.\n\t\tthis.document.registerPostFixer( autoParagraphEmptyRoots );\n\n\t\t// The base implementation for \"decorated\" method with remapped arguments.\n\t\tthis.on<ModelInsertContentEvent>( 'insertContent', ( evt, [ content, selectable ] ) => {\n\t\t\tevt.return = insertContent( this, content, selectable );\n\t\t} );\n\n\t\t// The base implementation for \"decorated\" method with remapped arguments.\n\t\tthis.on<ModelInsertObjectEvent>( 'insertObject', ( evt, [ element, selection, options ] ) => {\n\t\t\tevt.return = insertObject( this, element, selection, options );\n\t\t} );\n\n\t\t// The base implementation for \"decorated\" method with remapped arguments.\n\t\tthis.on<ModelCanEditAtEvent>( 'canEditAt', evt => {\n\t\t\tconst canEditAt = !this.document.isReadOnly;\n\n\t\t\tevt.return = canEditAt;\n\n\t\t\tif ( !canEditAt ) {\n\t\t\t\t// Prevent further processing if the selection is at non-editable place.\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\n\t\t// @if CK_DEBUG_ENGINE // initDocumentDumping( this.document );\n\t\t// @if CK_DEBUG_ENGINE // this.on( 'applyOperation', () => {\n\t\t// @if CK_DEBUG_ENGINE // \tdumpTrees( this.document, this.document.version );\n\t\t// @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } );\n\n\t\t// @if CK_DEBUG_ENGINE // this._operationLogs = [];\n\t\t// @if CK_DEBUG_ENGINE // this._appliedOperations = [];\n\t}\n\n\t/**\n\t * The `change()` method is the primary way of changing the model. You should use it to modify all document nodes\n\t * (including detached nodes – i.e. nodes not added to the {@link module:engine/model/model~Model#document model document}),\n\t * the {@link module:engine/model/document~ModelDocument#selection document's selection}, and\n\t * {@link module:engine/model/model~Model#markers model markers}.\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \twriter.insertText( 'foo', paragraph, 'end' );\n\t * } );\n\t * ```\n\t *\n\t * All changes inside the change block use the same {@link module:engine/model/batch~Batch} so they are combined\n\t * into a single undo step.\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \twriter.insertText( 'foo', paragraph, 'end' ); // foo.\n\t *\n\t * \tmodel.change( writer => {\n\t * \t\twriter.insertText( 'bar', paragraph, 'end' ); // foobar.\n\t * \t} );\n\t *\n\t * \twriter.insertText( 'bom', paragraph, 'end' ); // foobarbom.\n\t * } );\n\t * ```\n\t *\n\t * The callback of the `change()` block is executed synchronously.\n\t *\n\t * You can also return a value from the change block.\n\t *\n\t * ```ts\n\t * const img = model.change( writer => {\n\t * \treturn writer.createElement( 'img' );\n\t * } );\n\t * ```\n\t *\n\t * @see #enqueueChange\n\t * @typeParam TReturn The return type of the provided callback.\n\t * @param callback Callback function which may modify the model.\n\t */\n\tpublic change<TReturn>( callback: ( writer: ModelWriter ) => TReturn ): TReturn {\n\t\ttry {\n\t\t\tif ( this._pendingChanges.length === 0 ) {\n\t\t\t\t// If this is the outermost block, create a new batch and start `_runPendingChanges` execution flow.\n\t\t\t\tthis._pendingChanges.push( { batch: new Batch(), callback } );\n\n\t\t\t\treturn this._runPendingChanges()[ 0 ];\n\t\t\t} else {\n\t\t\t\t// If this is not the outermost block, just execute the callback.\n\t\t\t\treturn callback( this._currentWriter! );\n\t\t\t}\n\t\t} catch ( err: any ) {\n\t\t\t// @if CK_DEBUG // throw err;\n\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t}\n\t}\n\n\t/**\n\t * The `enqueueChange()` method performs similar task as the {@link #change `change()` method}, with two major differences.\n\t *\n\t * First, the callback of `enqueueChange()` is executed when all other enqueued changes are done. It might be executed\n\t * immediately if it is not nested in any other change block, but if it is nested in another (enqueue)change block,\n\t * it will be delayed and executed after the outermost block.\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \tconsole.log( 1 );\n\t *\n\t * \tmodel.enqueueChange( writer => {\n\t * \t\tconsole.log( 2 );\n\t * \t} );\n\t *\n\t * \tconsole.log( 3 );\n\t * } ); // Will log: 1, 3, 2.\n\t * ```\n\t *\n\t * In addition to that, the changes enqueued with `enqueueChange()` will be converted separately from the changes\n\t * done in the outer `change()` block.\n\t *\n\t * By default, a new batch with the default {@link module:engine/model/batch~Batch#constructor batch type} is created.\n\t * To define the {@link module:engine/model/batch~Batch} into which you want to add your changes,\n\t * use {@link #enqueueChange:CUSTOM_BATCH `enqueueChange( batchOrType, callback )`}.\n\t *\n\t * @label DEFAULT_BATCH\n\t * @param callback Callback function which may modify the model.\n\t */\n\tpublic enqueueChange(\n\t\tcallback: ( writer: ModelWriter ) => unknown\n\t): void;\n\n\t/**\n\t * The `enqueueChange()` method performs similar task as the {@link #change `change()` method}, with two major differences.\n\t *\n\t * First, the callback of `enqueueChange()` is executed when all other enqueued changes are done. It might be executed\n\t * immediately if it is not nested in any other change block, but if it is nested in another (enqueue)change block,\n\t * it will be delayed and executed after the outermost block.\n\t *\n\t * ```ts\n\t * model.change( new Batch(), writer => {\n\t * \tconsole.log( 1 );\n\t *\n\t * \tmodel.enqueueChange( new Batch(), writer => {\n\t * \t\tconsole.log( 2 );\n\t * \t} );\n\t *\n\t * \tconsole.log( 3 );\n\t * } ); // Will log: 1, 3, 2.\n\t * ```\n\t *\n\t * In addition to that, the changes enqueued with `enqueueChange()` will be converted separately from the changes\n\t * done in the outer `change()` block.\n\t *\n\t * Second, it lets you define the {@link module:engine/model/batch~Batch} into which you want to add your changes.\n\t * If you want to use default {@link module:engine/model/batch~Batch#constructor batch type}, use\n\t * {@link #enqueueChange:DEFAULT_BATCH `enqueueChange( callback )`}.\n\t *\n\t * ```ts\n\t * model.enqueueChange( { isUndoable: false }, writer => {\n\t * \twriter.insertText( 'foo', paragraph, 'end' );\n\t * } );\n\t * ```\n\t *\n\t * When using the `enqueueChange()` block you can also add some changes to the batch you used before.\n\t *\n\t * ```ts\n\t * model.enqueueChange( batch, writer => {\n\t * \twriter.insertText( 'foo', paragraph, 'end' );\n\t * } );\n\t * ```\n\t *\n\t * In order to make a nested `enqueueChange()` create a single undo step together with the changes done in the outer `change()`\n\t * block, you can obtain the batch instance from the  {@link module:engine/model/writer~ModelWriter#batch writer} of the outer block.\n\t *\n\t * @label CUSTOM_BATCH\n\t * @param batchOrType A batch or a {@link module:engine/model/batch~Batch#constructor batch type} that should be used in the callback.\n\t * If not defined, a new batch with the default type will be created.\n\t * @param callback Callback function which may modify the model.\n\t */\n\tpublic enqueueChange(\n\t\tbatchOrType: Batch | BatchType | undefined,\n\t\tcallback: ( writer: ModelWriter ) => unknown\n\t): void;\n\n\tpublic enqueueChange(\n\t\tbatchOrType: Batch | BatchType | ( ( writer: ModelWriter ) => unknown ) | undefined,\n\t\tcallback?: ( writer: ModelWriter ) => unknown\n\t): void {\n\t\ttry {\n\t\t\tif ( !batchOrType ) {\n\t\t\t\tbatchOrType = new Batch();\n\t\t\t} else if ( typeof batchOrType === 'function' ) {\n\t\t\t\tcallback = batchOrType;\n\t\t\t\tbatchOrType = new Batch();\n\t\t\t} else if ( !( batchOrType instanceof Batch ) ) {\n\t\t\t\tbatchOrType = new Batch( batchOrType );\n\t\t\t}\n\n\t\t\tthis._pendingChanges.push( { batch: batchOrType, callback } as any );\n\n\t\t\tif ( this._pendingChanges.length == 1 ) {\n\t\t\t\tthis._runPendingChanges();\n\t\t\t}\n\t\t} catch ( err: any ) {\n\t\t\t// @if CK_DEBUG // throw err;\n\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t}\n\t}\n\n\t/**\n\t * {@link module:utils/observablemixin~Observable#decorate Decorated} function for applying\n\t * {@link module:engine/model/operation/operation~Operation operations} to the model.\n\t *\n\t * This is a low-level way of changing the model. It is exposed for very specific use cases (like the undo feature).\n\t * Normally, to modify the model, you will want to use {@link module:engine/model/writer~ModelWriter `Writer`}.\n\t * See also {@glink framework/architecture/editing-engine#changing-the-model Changing the model} section\n\t * of the {@glink framework/architecture/editing-engine Editing architecture} guide.\n\t *\n\t * @param operation The operation to apply.\n\t */\n\tpublic applyOperation( operation: Operation ): void {\n\t\t// @if CK_DEBUG_ENGINE // console.log( 'Applying ' + operation );\n\n\t\t// @if CK_DEBUG_ENGINE // this._operationLogs.push( JSON.stringify( operation ) );\n\t\t// @if CK_DEBUG_ENGINE // this._appliedOperations.push( operation );\n\n\t\toperation._execute();\n\t}\n\n\t// @if CK_DEBUG_ENGINE // public getAppliedOperation(): string {\n\t// @if CK_DEBUG_ENGINE // \tif ( !this._appliedOperations ) {\n\t// @if CK_DEBUG_ENGINE // \t\treturn '';\n\t// @if CK_DEBUG_ENGINE // \t}\n\n\t// @if CK_DEBUG_ENGINE // \treturn this._appliedOperations.map( operation => JSON.stringify( operation ) ).join( '-------' );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t// @if CK_DEBUG_ENGINE // public createReplayer( stringifiedOperations: string ): typeof OperationReplayer {\n\t// @if CK_DEBUG_ENGINE // \treturn new OperationReplayer( this, '-------', stringifiedOperations );\n\t// @if CK_DEBUG_ENGINE // }\n\n\t/**\n\t * Inserts content at the position in the editor specified by the selection, as one would expect the paste\n\t * functionality to work.\n\t *\n\t * **Note**: If you want to insert an {@glink framework/deep-dive/schema#object-elements object element}\n\t * (e.g. a {@link module:widget/utils~toWidget widget}), see {@link #insertObject} instead.\n\t *\n\t * This is a high-level method. It takes the {@link #schema schema} into consideration when inserting\n\t * the content, clears the given selection's content before inserting nodes and moves the selection\n\t * to its target position at the end of the process.\n\t * It can split elements, merge them, wrap bare text nodes with paragraphs, etc. &ndash; just like the\n\t * pasting feature should do.\n\t *\n\t * For lower-level methods see {@link module:engine/model/writer~ModelWriter `Writer`}.\n\t *\n\t * This method, unlike {@link module:engine/model/writer~ModelWriter `Writer`}'s methods, does not have to be used\n\t * inside a {@link #change `change()` block}.\n\t *\n\t * # Conversion and schema\n\t *\n\t * Inserting elements and text nodes into the model is not enough to make CKEditor 5 render that content\n\t * to the user. CKEditor 5 implements a model-view-controller architecture and what `model.insertContent()` does\n\t * is only adding nodes to the model. Additionally, you need to define\n\t * {@glink framework/architecture/editing-engine#conversion converters} between the model and view\n\t * and define those nodes in the {@glink framework/architecture/editing-engine#schema schema}.\n\t *\n\t * So, while this method may seem similar to CKEditor 4 `editor.insertHtml()` (in fact, both methods\n\t * are used for paste-like content insertion), the CKEditor 5 method cannot be use to insert arbitrary HTML\n\t * unless converters are defined for all elements and attributes in that HTML.\n\t *\n\t * # Examples\n\t *\n\t * Using `insertContent()` with a manually created model structure:\n\t *\n\t * ```ts\n\t * // Let's create a document fragment containing such content as:\n\t * //\n\t * // <paragraph>foo</paragraph>\n\t * // <blockQuote>\n\t * //    <paragraph>bar</paragraph>\n\t * // </blockQuote>\n\t * const docFrag = editor.model.change( writer => {\n\t * \tconst p1 = writer.createElement( 'paragraph' );\n\t * \tconst p2 = writer.createElement( 'paragraph' );\n\t * \tconst blockQuote = writer.createElement( 'blockQuote' );\n\t * \tconst docFrag = writer.createDocumentFragment();\n\t *\n\t * \twriter.append( p1, docFrag );\n\t * \twriter.append( blockQuote, docFrag );\n\t * \twriter.append( p2, blockQuote );\n\t * \twriter.insertText( 'foo', p1 );\n\t * \twriter.insertText( 'bar', p2 );\n\t *\n\t * \treturn docFrag;\n\t * } );\n\t *\n\t * // insertContent() does not have to be used in a change() block. It can, though,\n\t * // so this code could be moved to the callback defined above.\n\t * editor.model.insertContent( docFrag );\n\t * ```\n\t *\n\t * Using `insertContent()` with an HTML string converted to a model document fragment (similar to the pasting mechanism):\n\t *\n\t * ```ts\n\t * // You can create your own HtmlDataProcessor instance or use editor.data.processor\n\t * // if you have not overridden the default one (which is the HtmlDataProcessor instance).\n\t * const htmlDP = new HtmlDataProcessor( viewDocument );\n\t *\n\t * // Convert an HTML string to a view document fragment:\n\t * const viewFragment = htmlDP.toView( htmlString );\n\t *\n\t * // Convert the view document fragment to a model document fragment\n\t * // in the context of $root. This conversion takes the schema into\n\t * // account so if, for example, the view document fragment contained a bare text node,\n\t * // this text node cannot be a child of $root, so it will be automatically\n\t * // wrapped with a <paragraph>. You can define the context yourself (in the second parameter),\n\t * // and e.g. convert the content like it would happen in a <paragraph>.\n\t * // Note: The clipboard feature uses a custom context called $clipboardHolder\n\t * // which has a loosened schema.\n\t * const modelFragment = editor.data.toModel( viewFragment );\n\t *\n\t * editor.model.insertContent( modelFragment );\n\t * ```\n\t *\n\t * By default this method will use the document selection but it can also be used with a position, range or selection instance.\n\t *\n\t * ```ts\n\t * // Insert text at the current document selection position.\n\t * editor.model.change( writer => {\n\t * \teditor.model.insertContent( writer.createText( 'x' ) );\n\t * } );\n\t *\n\t * // Insert text at a given position - the document selection will not be modified.\n\t * editor.model.change( writer => {\n\t * \teditor.model.insertContent( writer.createText( 'x' ), doc.getRoot(), 2 );\n\t *\n\t * \t// Which is a shorthand for:\n\t * \teditor.model.insertContent( writer.createText( 'x' ), writer.createPositionAt( doc.getRoot(), 2 ) );\n\t * } );\n\t * ```\n\t *\n\t * If you want the document selection to be moved to the inserted content, use the\n\t * {@link module:engine/model/writer~ModelWriter#setSelection `setSelection()`} method of the writer after inserting\n\t * the content:\n\t *\n\t * ```ts\n\t * editor.model.change( writer => {\n\t * \tconst paragraph = writer.createElement( 'paragraph' );\n\t *\n\t * \t// Insert an empty paragraph at the beginning of the root.\n\t * \teditor.model.insertContent( paragraph, writer.createPositionAt( editor.model.document.getRoot(), 0 ) );\n\t *\n\t * \t// Move the document selection to the inserted paragraph.\n\t * \twriter.setSelection( paragraph, 'in' );\n\t * } );\n\t * ```\n\t *\n\t * If an instance of the {@link module:engine/model/selection~ModelSelection model selection} is passed as `selectable`,\n\t * the new content will be inserted at the passed selection (instead of document selection):\n\t *\n\t * ```ts\n\t * editor.model.change( writer => {\n\t * \t// Create a selection in a paragraph that will be used as a place of insertion.\n\t * \tconst selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * \t// Insert the new text at the created selection.\n\t * \teditor.model.insertContent( writer.createText( 'x' ), selection );\n\t *\n\t * \t// insertContent() modifies the passed selection instance so it can be used to set the document selection.\n\t * \t// Note: This is not necessary when you passed the document selection to insertContent().\n\t * \twriter.setSelection( selection );\n\t * } );\n\t * ```\n\t *\n\t * @fires insertContent\n\t * @param content The content to insert.\n\t * @param selectable The selection into which the content should be inserted.\n\t * If not provided the current model document selection will be used.\n\t * @param placeOrOffset To be used when a model item was passed as `selectable`.\n\t * This param defines a position in relation to that item.\n\t * at the insertion position.\n\t */\n\tpublic insertContent(\n\t\tcontent: ModelItem | ModelDocumentFragment,\n\t\tselectable?: ModelSelectable,\n\t\tplaceOrOffset?: ModelPlaceOrOffset,\n\t\t...rest: Array<unknown>\n\t): ModelRange {\n\t\tconst selection = normalizeSelectable( selectable, placeOrOffset );\n\n\t\t// Passing all call arguments so it acts like decorated method.\n\t\treturn this.fire<ModelInsertContentEvent>( 'insertContent', [ content, selection, placeOrOffset, ...rest ] )!;\n\t}\n\n\t/**\n\t * Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.\n\t *\n\t * This is a high-level API:\n\t * * It takes the {@link #schema schema} into consideration,\n\t * * It clears the content of passed `selectable` before inserting,\n\t * * It can move the selection at the end of the process,\n\t * * It will copy the selected block's attributes to preserve them upon insertion,\n\t * * It can split elements or wrap inline objects with paragraphs if they are not allowed in target position,\n\t * * etc.\n\t *\n\t * # Notes\n\t *\n\t * * If you want to insert a non-object content, see {@link #insertContent} instead.\n\t * * For lower-level API, see {@link module:engine/model/writer~ModelWriter `Writer`}.\n\t * * Unlike {@link module:engine/model/writer~ModelWriter `Writer`}, this method does not have to be used inside\n\t * a {@link #change `change()` block}.\n\t * * Inserting object into the model is not enough to make CKEditor 5 render that content to the user.\n\t * CKEditor 5 implements a model-view-controller architecture and what `model.insertObject()` does\n\t * is only adding nodes to the model. Additionally, you need to define\n\t * {@glink framework/architecture/editing-engine#conversion converters} between the model and view\n\t * and define those nodes in the {@glink framework/architecture/editing-engine#schema schema}.\n\t *\n\t * # Examples\n\t *\n\t * Use the following code to insert an object at the current selection and keep the selection on the inserted element:\n\t *\n\t * ```ts\n\t * const rawHtmlEmbedElement = writer.createElement( 'rawHtml' );\n\t *\n\t * model.insertObject( rawHtmlEmbedElement, null, null, {\n\t * \tsetSelection: 'on'\n\t * } );\n\t * ```\n\t *\n\t * Use the following code to insert an object at the current selection and nudge the selection after the inserted object:\n\t *\n\t * ```ts\n\t * const pageBreakElement = writer.createElement( 'pageBreak' );\n \t *\n\t * model.insertObject( pageBreakElement, null, null, {\n\t * \tsetSelection: 'after'\n\t * } );\n\t * ```\n\t *\n\t * Use the following code to insert an object at the current selection and avoid splitting the content (non-destructive insertion):\n\t *\n\t * ```ts\n\t * const tableElement = writer.createElement( 'table' );\n \t *\n\t * model.insertObject( tableElement, null, null, {\n\t * \tfindOptimalPosition: 'auto'\n\t * } );\n\t * ```\n\t *\n\t * Use the following code to insert an object at the specific range (also: replace the content of the range):\n\t *\n\t * ```ts\n\t * const tableElement = writer.createElement( 'table' );\n\t * const range = model.createRangeOn( model.document.getRoot().getChild( 1 ) );\n \t *\n\t * model.insertObject( tableElement, range );\n\t * ```\n\t *\n\t * @param element An object to be inserted into the model document.\n\t * @param selectable A selectable where the content should be inserted. If not specified, the current\n\t * {@link module:engine/model/document~ModelDocument#selection document selection} will be used instead.\n\t * @param placeOrOffset Specifies the exact place or offset for the insertion to take place, relative to `selectable`.\n\t * @param options Additional options.\n\t * @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to\n\t * `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).\n\t * * When `'auto'`, the algorithm will decide whether to insert the object before or after `selectable` to avoid content splitting.\n\t * * When `'before'`, the closest position before `selectable` will be used that will not result in content splitting.\n\t * * When `'after'`, the closest position after `selectable` will be used that will not result in content splitting.\n\t *\n\t * Note that this option only works for block objects. Inline objects are inserted into text and do not split blocks.\n\t * @param options.setSelection An option that, when set, moves the\n\t * {@link module:engine/model/document~ModelDocument#selection document selection} after inserting the object.\n\t * * When `'on'`, the document selection will be set on the inserted object.\n\t * * When `'after'`, the document selection will move to the closest text node after the inserted object. If there is no\n\t * such text node, a paragraph will be created and the document selection will be moved inside it.\n\t * at the insertion position.\n\t */\n\tpublic insertObject(\n\t\telement: ModelElement,\n\t\tselectable?: ModelSelectable,\n\t\tplaceOrOffset?: ModelPlaceOrOffset | null,\n\t\toptions?: {\n\t\t\tfindOptimalPosition?: 'auto' | 'before' | 'after';\n\t\t\tsetSelection?: 'on' | 'after';\n\t\t},\n\t\t...rest: Array<unknown>\n\t): ModelRange {\n\t\tconst selection = normalizeSelectable( selectable, placeOrOffset );\n\n\t\t// Note that options are fired as 2 arguments for backward compatibility with the decorated method.\n\t\t// Passing all call arguments so it acts like decorated method.\n\t\treturn this.fire<ModelInsertObjectEvent>( 'insertObject', [ element, selection, options, options, ...rest ] )!;\n\t}\n\n\t/**\n\t * Deletes content of the selection and merge siblings. The resulting selection is always collapsed.\n\t *\n\t * **Note:** For the sake of predictability, the resulting selection should always be collapsed.\n\t * In cases where a feature wants to modify deleting behavior so selection isn't collapsed\n\t * (e.g. a table feature may want to keep row selection after pressing <kbd>Backspace</kbd>),\n\t * then that behavior should be implemented in the view's listener. At the same time, the table feature\n\t * will need to modify this method's behavior too, e.g. to \"delete contents and then collapse\n\t * the selection inside the last selected cell\" or \"delete the row and collapse selection somewhere near\".\n\t * That needs to be done in order to ensure that other features which use `deleteContent()` will work well with tables.\n\t *\n\t * @fires deleteContent\n\t * @param selection Selection of which the content should be deleted.\n\t * @param options.leaveUnmerged Whether to merge elements after removing the content of the selection.\n\t *\n\t * For example `<heading1>x[x</heading1><paragraph>y]y</paragraph>` will become:\n\t *\n\t * * `<heading1>x^y</heading1>` with the option disabled (`leaveUnmerged == false`)\n\t * * `<heading1>x^</heading1><paragraph>y</paragraph>` with enabled (`leaveUnmerged == true`).\n\t *\n\t * Note: {@link module:engine/model/schema~ModelSchema#isObject object} and {@link module:engine/model/schema~ModelSchema#isLimit limit}\n\t * elements will not be merged.\n\t *\n\t * @param options.doNotResetEntireContent Whether to skip replacing the entire content with a\n\t * paragraph when the entire content was selected.\n\t *\n\t * For example `<heading1>[x</heading1><paragraph>y]</paragraph>` will become:\n\t *\n\t * * `<paragraph>^</paragraph>` with the option disabled (`doNotResetEntireContent == false`)\n\t * * `<heading1>^</heading1>` with enabled (`doNotResetEntireContent == true`)\n\t *\n\t * @param options.doNotAutoparagraph Whether to create a paragraph if after content deletion selection is moved\n\t * to a place where text cannot be inserted.\n\t *\n\t * For example `<paragraph>x</paragraph>[<imageBlock src=\"foo.jpg\"></imageBlock>]` will become:\n\t *\n\t * * `<paragraph>x</paragraph><paragraph>[]</paragraph>` with the option disabled (`doNotAutoparagraph == false`)\n\t * * `<paragraph>x[]</paragraph>` with the option enabled (`doNotAutoparagraph == true`).\n\t *\n\t * **Note:** if there is no valid position for the selection, the paragraph will always be created:\n\t *\n\t * `[<imageBlock src=\"foo.jpg\"></imageBlock>]` -> `<paragraph>[]</paragraph>`.\n\t *\n\t * @param options.direction The direction in which the content is being consumed.\n\t * Deleting backward corresponds to using the <kbd>Backspace</kbd> key, while deleting content forward corresponds to\n\t * the <kbd>Shift</kbd>+<kbd>Backspace</kbd> keystroke.\n\t */\n\tpublic deleteContent(\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\toptions?: {\n\t\t\tleaveUnmerged?: boolean;\n\t\t\tdoNotResetEntireContent?: boolean;\n\t\t\tdoNotAutoparagraph?: boolean;\n\t\t\tdirection?: 'forward' | 'backward';\n\t\t\t[ i: string ]: unknown;\n\t\t}\n\t): void {\n\t\tdeleteContent( this, selection, options );\n\t}\n\n\t/**\n\t * Modifies the selection. Currently, the supported modifications are:\n\t *\n\t * * Extending. The selection focus is moved in the specified `options.direction` with a step specified in `options.unit`.\n\t * Possible values for `unit` are:\n\t *  * `'character'` (default) - moves selection by one user-perceived character. In most cases this means moving by one\n\t *  character in `String` sense. However, unicode also defines \"combing marks\". These are special symbols, that combines\n\t *  with a symbol before it (\"base character\") to create one user-perceived character. For example, `q̣̇` is a normal\n\t *  letter `q` with two \"combining marks\": upper dot (`Ux0307`) and lower dot (`Ux0323`). For most actions, i.e. extending\n\t *  selection by one position, it is correct to include both \"base character\" and all of it's \"combining marks\". That is\n\t *  why `'character'` value is most natural and common method of modifying selection.\n\t *  * `'codePoint'` - moves selection by one unicode code point. In contrary to, `'character'` unit, this will insert\n\t *  selection between \"base character\" and \"combining mark\", because \"combining marks\" have their own unicode code points.\n\t *  However, for technical reasons, unicode code points with values above `UxFFFF` are represented in native `String` by\n\t *  two characters, called \"surrogate pairs\". Halves of \"surrogate pairs\" have a meaning only when placed next to each other.\n\t *  For example `𨭎` is represented in `String` by `\\uD862\\uDF4E`. Both `\\uD862` and `\\uDF4E` do not have any meaning\n\t *  outside the pair (are rendered as ? when alone). Position between them would be incorrect. In this case, selection\n\t *  extension will include whole \"surrogate pair\".\n\t *  * `'word'` - moves selection by a whole word.\n\t *\n\t * **Note:** if you extend a forward selection in a backward direction you will in fact shrink it.\n\t *\n\t * @fires modifySelection\n\t * @param selection The selection to modify.\n\t * @param options.direction The direction in which the selection should be modified.\n\t * @param options.unit The unit by which selection should be modified.\n\t * @param options.treatEmojiAsSingleUnit Whether multi-characer emoji sequences should be handled as single unit.\n\t */\n\tpublic modifySelection(\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\toptions?: {\n\t\t\tdirection?: 'forward' | 'backward';\n\t\t\tunit?: 'character' | 'codePoint' | 'word';\n\t\t\ttreatEmojiAsSingleUnit?: boolean;\n\t\t}\n\t): void {\n\t\tmodifySelection( this, selection, options );\n\t}\n\n\t/**\n\t * Gets a clone of the selected content.\n\t *\n\t * For example, for the following selection:\n\t *\n\t * ```html\n\t * <paragraph>x</paragraph>\n\t * <blockQuote>\n\t * \t<paragraph>y</paragraph>\n\t * \t<heading1>fir[st</heading1>\n\t * </blockQuote>\n\t * <paragraph>se]cond</paragraph>\n\t * <paragraph>z</paragraph>\n\t * ```\n\t *\n\t * It will return a document fragment with such a content:\n\t *\n\t * ```html\n\t * <blockQuote>\n\t * \t<heading1>st</heading1>\n\t * </blockQuote>\n\t * <paragraph>se</paragraph>\n\t * ```\n\t *\n\t * @fires getSelectedContent\n\t * @param selection The selection of which content will be returned.\n\t */\n\tpublic getSelectedContent( selection: ModelSelection | ModelDocumentSelection ): ModelDocumentFragment {\n\t\treturn getSelectedContent( this, selection );\n\t}\n\n\t/**\n\t * Checks whether given `subject` has any meaningful content.\n\t *\n\t * Meaningful content is:\n\t *\n\t * * any text node (`options.ignoreWhitespaces` allows controlling whether this text node must also contain\n\t * any non-whitespace characters),\n\t * * or any {@link module:engine/model/schema~ModelSchema#isContent content element},\n\t * * or any {@link module:engine/model/markercollection~Marker marker} which\n\t * {@link module:engine/model/markercollection~Marker#_affectsData affects data}.\n\t *\n\t * This means that a range containing an empty `<paragraph></paragraph>` is not considered to have a meaningful content.\n\t * However, a range containing an `<imageBlock></imageBlock>` (which would normally be marked in the schema as an object element)\n\t * is considered non-empty.\n\t *\n\t * @param subject Subject to check if includes meaningful content. Could be a model range, an element, a document fragment, or a\n\t * selection.\n\t * @param options.ignoreWhitespaces Whether text node with whitespaces only should be considered empty.\n\t * @param options.ignoreMarkers Whether markers should be ignored.\n\t */\n\tpublic hasContent(\n\t\tsubject: ModelRange | ModelElement | ModelDocumentFragment | ModelSelection | ModelDocumentSelection,\n\t\toptions: {\n\t\t\tignoreWhitespaces?: boolean;\n\t\t\tignoreMarkers?: boolean;\n\t\t} = {}\n\t): boolean {\n\t\tlet ranges: Array<ModelRange>;\n\n\t\tif ( subject.is( 'selection' ) ) {\n\t\t\tranges = Array.from( subject.getRanges() );\n\t\t} else if ( subject.is( 'range' ) ) {\n\t\t\tranges = [ subject ];\n\t\t} else {\n\t\t\tranges = [ ModelRange._createIn( subject ) ];\n\t\t}\n\n\t\tfor ( const range of ranges ) {\n\t\t\tif ( this._rangeHasContent( range, options ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Checks whether given range has any meaningful content.\n\t *\n\t * Helper method for {@link #hasContent}.\n\t */\n\tprivate _rangeHasContent( range: ModelRange, options: { ignoreWhitespaces?: boolean; ignoreMarkers?: boolean } ): boolean {\n\t\tif ( range.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst { ignoreWhitespaces = false, ignoreMarkers = false } = options;\n\n\t\t// Check if there are any markers which affects data in this given range.\n\t\tif ( !ignoreMarkers ) {\n\t\t\tfor ( const intersectingMarker of this.markers.getMarkersIntersectingRange( range ) ) {\n\t\t\t\tif ( intersectingMarker.affectsData ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( const item of range.getItems() ) {\n\t\t\tif ( this.schema.isContent( item ) ) {\n\t\t\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\t\t\tif ( !ignoreWhitespaces ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if ( item.data.search( /\\S/ ) !== -1 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Check whether given selectable is at a place in the model where it can be edited (returns `true`) or not (returns `false`).\n\t *\n\t * Should be used instead of {@link module:core/editor/editor~Editor#isReadOnly} to check whether a user action can happen at\n\t * given selectable. It may be decorated and used differently in different environment (e.g. multi-root editor can disable\n\t * a particular root).\n\t *\n\t * This method is decorated. Although this method accepts any parameter of `Selectable` type, the\n\t * {@link ~Model#event:canEditAt `canEditAt` event} is fired with `selectable` normalized to an instance of\n\t * {@link module:engine/model/selection~ModelSelection} or {@link module:engine/model/documentselection~ModelDocumentSelection}\n\t *\n\t * @fires canEditAt\n\t */\n\tpublic canEditAt( selectable: ModelSelectable ): boolean {\n\t\tconst selection = normalizeSelectable( selectable );\n\n\t\treturn this.fire<ModelCanEditAtEvent>( 'canEditAt', [ selection ] )!;\n\t}\n\n\t/**\n\t * Creates a position from the given root and path in that root.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createPositionFromPath `Writer#createPositionFromPath()`}.\n\t *\n\t * @param root Root of the position.\n\t * @param path Position path. See {@link module:engine/model/position~ModelPosition#path}.\n\t * @param stickiness Position stickiness. See {@link module:engine/model/position~ModelPositionStickiness}.\n\t */\n\tpublic createPositionFromPath(\n\t\troot: ModelElement | ModelDocumentFragment,\n\t\tpath: ReadonlyArray<number>,\n\t\tstickiness?: ModelPositionStickiness\n\t): ModelPosition {\n\t\treturn new ModelPosition( root, path, stickiness );\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/model/position~ModelPosition position},\n\t * * a parent element and offset in that element,\n\t * * a parent element and `'end'` (the position will be set at the end of that element),\n\t * * a {@link module:engine/model/item~ModelItem model item} and `'before'` or `'after'`\n\t * (the position will be set before or after the given model item).\n\t *\n\t * This method is a shortcut to other factory methods such as:\n\t *\n\t * * {@link module:engine/model/model~Model#createPositionBefore `createPositionBefore()`},\n\t * * {@link module:engine/model/model~Model#createPositionAfter `createPositionAfter()`}.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createPositionAt `Writer#createPositionAt()`},\n\t *\n\t * @param itemOrPosition\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~ModelItem model item}.\n\t */\n\tpublic createPositionAt(\n\t\titemOrPosition: ModelItem | ModelPosition | ModelDocumentFragment,\n\t\toffset?: ModelPositionOffset\n\t): ModelPosition {\n\t\treturn ModelPosition._createAt( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new position after the given {@link module:engine/model/item~ModelItem model item}.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createPositionAfter `Writer#createPositionAfter()`}.\n\t *\n\t * @param item Item after which the position should be placed.\n\t */\n\tpublic createPositionAfter( item: ModelItem ): ModelPosition {\n\t\treturn ModelPosition._createAfter( item );\n\t}\n\n\t/**\n\t * Creates a new position before the given {@link module:engine/model/item~ModelItem model item}.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createPositionBefore `Writer#createPositionBefore()`}.\n\t *\n\t * @param item Item before which the position should be placed.\n\t */\n\tpublic createPositionBefore( item: ModelItem ): ModelPosition {\n\t\treturn ModelPosition._createBefore( item );\n\t}\n\n\t/**\n\t * Creates a range spanning from the `start` position to the `end` position.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createRange `Writer#createRange()`}:\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \tconst range = writer.createRange( start, end );\n\t * } );\n\t * ```\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, the range will be collapsed to the `start` position.\n\t */\n\tpublic createRange( start: ModelPosition, end?: ModelPosition ): ModelRange {\n\t\treturn new ModelRange( start, end );\n\t}\n\n\t/**\n\t * Creates a range inside the given element which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createRangeIn `Writer#createRangeIn()`}:\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \tconst range = writer.createRangeIn( paragraph );\n\t * } );\n\t * ```\n\t *\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic createRangeIn( element: ModelElement | ModelDocumentFragment ): ModelRange {\n\t\treturn ModelRange._createIn( element );\n\t}\n\n\t/**\n\t * Creates a range that starts before the given {@link module:engine/model/item~ModelItem model item} and ends after it.\n\t *\n\t * Note: This method is also available on `writer` instance as\n\t * {@link module:engine/model/writer~ModelWriter#createRangeOn `Writer.createRangeOn()`}:\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \tconst range = writer.createRangeOn( paragraph );\n\t * } );\n\t * ```\n\t *\n\t * @param item\n\t */\n\tpublic createRangeOn( item: ModelItem ): ModelRange {\n\t\treturn ModelRange._createOn( item );\n\t}\n\n\t/**\n\t * Creates a new selection instance based on the given {@link module:engine/model/selection~ModelSelectable selectable}\n\t * or creates an empty selection if no arguments were passed.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createSelection `Writer#createSelection()`}.\n\t *\n\t * ```ts\n\t * // Creates selection at the given offset in the given element.\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * const selection = writer.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/model/element~ModelElement element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/model/item~ModelItem item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = writer.createSelection( paragraph, 'on' );\n\t *\n\t * // Additional options (`'backward'`) can be specified as the last argument.\n\t *\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( element, 'in', { backward: true } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:SELECTABLE `createSelection( selectable, options )`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic createSelection( selectable: ModelNode, placeOrOffset: ModelPlaceOrOffset, options?: { backward?: boolean } ): ModelSelection;\n\n\t/**\n\t * Creates a new selection instance based on the given {@link module:engine/model/selection~ModelSelectable selectable}\n\t * or creates an empty selection if no arguments were passed.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~ModelWriter#createSelection `Writer#createSelection()`}.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = writer.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = writer.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * const selection = writer.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * // Note: It doesn't copies selection attributes.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = writer.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the given document selection.\n\t * // Note: It doesn't copies selection attributes.\n\t * const documentSelection = model.document.selection;\n\t * const selection = writer.createSelection( documentSelection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * const selection = writer.createSelection( position );\n\t *\n\t * // Additional options (`'backward'`) can be specified as the last argument.\n\t *\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:NODE_OFFSET `createSelection( node, placeOrOffset, options )`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic createSelection( selectable?: Exclude<ModelSelectable, ModelNode>, options?: { backward?: boolean } ): ModelSelection;\n\n\tpublic createSelection( ...args: ConstructorParameters<typeof ModelSelection> ): ModelSelection {\n\t\treturn new ModelSelection( ...args );\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/model/batch~Batch} instance.\n\t *\n\t * **Note:** In most cases creating a batch instance is not necessary as they are created when using:\n\t *\n\t * * {@link #change `change()`},\n\t * * {@link #enqueueChange `enqueueChange()`}.\n\t *\n\t * @param type {@link module:engine/model/batch~Batch#constructor The type} of the batch.\n\t */\n\tpublic createBatch( type?: BatchType ): Batch {\n\t\treturn new Batch( type );\n\t}\n\n\t/**\n\t * Creates an operation instance from a JSON object (parsed JSON string).\n\t *\n\t * This is an alias for {@link module:engine/model/operation/operationfactory~OperationFactory.fromJSON `OperationFactory.fromJSON()`}.\n\t *\n\t * @param json Deserialized JSON object.\n\t */\n\tpublic createOperationFromJSON( json: unknown ): Operation {\n\t\treturn OperationFactory.fromJSON( json, this.document );\n\t}\n\n\t/**\n\t * Removes all events listeners set by model instance and destroys {@link module:engine/model/document~ModelDocument}.\n\t */\n\tpublic destroy(): void {\n\t\tthis.document.destroy();\n\t\tthis.markers.destroy();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Common part of {@link module:engine/model/model~Model#change} and {@link module:engine/model/model~Model#enqueueChange}\n\t * which calls callbacks and returns array of values returned by these callbacks.\n\t */\n\tprivate _runPendingChanges() {\n\t\tconst ret = [];\n\n\t\tthis.fire( '_beforeChanges' );\n\n\t\ttry {\n\t\t\twhile ( this._pendingChanges.length ) {\n\t\t\t\t// Create a new writer using batch instance created for this chain of changes.\n\t\t\t\tconst currentBatch = this._pendingChanges[ 0 ].batch;\n\t\t\t\tthis._currentWriter = new ModelWriter( this, currentBatch );\n\n\t\t\t\t// Execute changes callback and gather the returned value.\n\t\t\t\tconst callbackReturnValue = this._pendingChanges[ 0 ].callback( this._currentWriter );\n\t\t\t\tret.push( callbackReturnValue );\n\n\t\t\t\tthis.document._handleChangeBlock( this._currentWriter );\n\n\t\t\t\tthis._pendingChanges.shift();\n\t\t\t\tthis._currentWriter = null;\n\t\t\t}\n\t\t} finally {\n\t\t\tthis._pendingChanges.length = 0;\n\t\t\tthis._currentWriter = null;\n\n\t\t\tthis.fire( '_afterChanges' );\n\t\t}\n\n\t\treturn ret;\n\t}\n}\n\n/**\n * Normalizes a selectable to a Selection or ModelDocumentSelection.\n */\nfunction normalizeSelectable(\n\tselectable?: ModelSelectable,\n\tplaceOrOffset?: ModelPlaceOrOffset | null\n): ModelSelection | ModelDocumentSelection | undefined {\n\tif ( !selectable ) {\n\t\treturn;\n\t}\n\n\tif ( selectable instanceof ModelSelection || selectable instanceof ModelDocumentSelection ) {\n\t\treturn selectable;\n\t}\n\n\tif ( selectable instanceof ModelNode ) {\n\t\tif ( placeOrOffset || placeOrOffset === 0 ) {\n\t\t\treturn new ModelSelection( selectable, placeOrOffset );\n\t\t} else if ( selectable.is( 'rootElement' ) ) {\n\t\t\treturn new ModelSelection( selectable, 'in' );\n\t\t} else {\n\t\t\treturn new ModelSelection( selectable, 'on' );\n\t\t}\n\t}\n\n\treturn new ModelSelection( selectable );\n}\n\n/**\n * Fired when entering the outermost {@link module:engine/model/model~Model#enqueueChange} or\n * {@link module:engine/model/model~Model#change} block.\n *\n * @internal\n * @eventName ~Model#_beforeChanges\n */\nexport type BeforeChangesEvent = {\n\tname: '_beforeChanges';\n\targs: [];\n};\n\n/**\n * Fired when leaving the outermost {@link module:engine/model/model~Model#enqueueChange} or\n * {@link module:engine/model/model~Model#change} block.\n *\n * @internal\n * @eventName ~Model#_afterChanges\n */\nexport type AfterChangesEvent = {\n\tname: '_afterChanges';\n\targs: [];\n};\n\n/**\n * Fired every time any {@link module:engine/model/operation/operation~Operation operation} is applied on the model\n * using {@link ~Model#applyOperation}.\n *\n * Note that this event is suitable only for very specific use-cases. Use it if you need to listen to every single operation\n * applied on the document. However, in most cases {@link module:engine/model/document~ModelDocument#event:change} should\n * be used.\n *\n * A few callbacks are already added to this event by engine internal classes:\n *\n * * with `highest` priority operation is validated,\n * * with `normal` priority operation is executed,\n * * with `low` priority the {@link module:engine/model/document~ModelDocument} updates its version,\n * * with `low` priority {@link module:engine/model/liveposition~ModelLivePosition} and {@link module:engine/model/liverange~ModelLiveRange}\n * update themselves.\n *\n * @eventName ~Model#applyOperation\n * @param args Arguments of the `applyOperation` which is an array with a single element - applied\n * {@link module:engine/model/operation/operation~Operation operation}.\n */\nexport type ModelApplyOperationEvent = DecoratedMethodEvent<Model, 'applyOperation'>;\n\n/**\n * Event fired when {@link ~Model#insertContent} method is called.\n *\n * The {@link ~Model#insertContent default action of that method} is implemented as a\n * listener to this event so it can be fully customized by the features.\n *\n * **Note** The `selectable` parameter for the {@link ~Model#insertContent} is optional. When `undefined` value is passed the method uses\n * {@link module:engine/model/document~ModelDocument#selection document selection}.\n *\n * @eventName ~Model#insertContent\n * @param args The arguments passed to the original method.\n */\nexport type ModelInsertContentEvent = {\n\tname: 'insertContent';\n\targs: [ [\n\t\tcontent: ModelItem | ModelDocumentFragment,\n\t\tselectable?: ModelSelection | ModelDocumentSelection,\n\t\t...rest: Array<unknown>\n\t] ];\n\treturn: ModelRange;\n};\n\n/**\n * Event fired when the {@link ~Model#insertObject} method is called.\n *\n * The {@link ~Model#insertObject default action of that method} is implemented as a\n * listener to this event so it can be fully customized by the features.\n *\n * **Note** The `selectable` parameter for the {@link ~Model#insertObject} is optional. When `undefined` value is passed the method uses\n * {@link module:engine/model/document~ModelDocument#selection document selection}.\n *\n * @eventName ~Model#insertObject\n * @param args The arguments passed to the original method.\n */\nexport type ModelInsertObjectEvent = {\n\tname: 'insertObject';\n\targs: [ [\n\t\telement: ModelElement,\n\t\tselectable?: ModelSelection | ModelDocumentSelection | null,\n\t\toptions?: {\n\t\t\tfindOptimalPosition?: 'auto' | 'before' | 'after';\n\t\t\tsetSelection?: 'on' | 'after';\n\t\t},\n\t\t...rest: Array<unknown>\n\t] ];\n\treturn: ModelRange;\n};\n\n/**\n * Event fired when {@link ~Model#deleteContent} method is called.\n *\n * The {@link ~Model#deleteContent default action of that method} is implemented as a\n * listener to this event, so it can be fully customized by the features.\n *\n * @eventName ~Model#deleteContent\n * @param args The arguments passed to the original method.\n */\nexport type ModelDeleteContentEvent = DecoratedMethodEvent<Model, 'deleteContent'>;\n\n/**\n * Event fired when {@link ~Model#modifySelection} method is called.\n *\n * The {@link ~Model#modifySelection default action of that method} is implemented as a\n * listener to this event, so it can be fully customized by the features.\n *\n * @eventName ~Model#modifySelection\n * @param args The arguments passed to the original method.\n */\nexport type ModelModifySelectionEvent = DecoratedMethodEvent<Model, 'modifySelection'>;\n\n/**\n * Event fired when {@link ~Model#getSelectedContent} method is called.\n *\n * The {@link ~Model#getSelectedContent default action of that method} is implemented as a\n * listener to this event, so it can be fully customized by the features.\n *\n * @eventName ~Model#getSelectedContent\n * @param args The arguments passed to the original method.\n */\nexport type ModelGetSelectedContentEvent = DecoratedMethodEvent<Model, 'getSelectedContent'>;\n\n/**\n * Event fired when {@link ~Model#canEditAt} method is called.\n *\n * The {@link ~Model#canEditAt default action of that method} is implemented as a\n * listener to this event, so it can be fully customized by the features.\n *\n * Although the original method accepts any parameter of `Selectable` type, this event is fired with `selectable` normalized\n * to an instance of {@link module:engine/model/selection~ModelSelection} or\n * {@link module:engine/model/documentselection~ModelDocumentSelection}.\n *\n * @eventName ~Model#canEditAt\n * @param args The arguments passed to the original method.\n */\nexport type ModelCanEditAtEvent = {\n\tname: 'canEditAt';\n\targs: [ [\n\t\tselectable?: ModelSelection | ModelDocumentSelection\n\t] ];\n\treturn: boolean;\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/**\n * @module engine/view/observer/clickobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\nimport type { BubblingEvent } from './bubblingemittermixin.js';\n\n/**\n * {@link module:engine/view/document~ViewDocument#event:click Click} event observer.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~EditingView view controller} by a {@link module:engine/view/view~EditingView#addObserver} method.\n */\nexport class ClickObserver extends DomEventObserver<'click'> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = 'click' as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: MouseEvent ): void {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired when one of the editables has been clicked.\n *\n * Introduced by {@link module:engine/view/observer/clickobserver~ClickObserver}.\n *\n * Note that this event is not available by default. To make it available\n * {@link module:engine/view/observer/clickobserver~ClickObserver} needs to be added\n * to {@link module:engine/view/view~EditingView} by a {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/clickobserver~ClickObserver\n * @eventName module:engine/view/document~ViewDocument#click\n * @param data Event data.\n */\nexport type ViewDocumentClickEvent = BubblingEvent<{\n\tname: 'click';\n\targs: [ data: ViewDocumentDomEventData<MouseEvent> ];\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/**\n * @module engine/view/observer/mouseobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\n\n/**\n * Mouse events observer.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n */\nexport class MouseObserver extends DomEventObserver<'mousedown' | 'mouseup' | 'mouseover' | 'mouseout'> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = [ 'mousedown', 'mouseup', 'mouseover', 'mouseout' ] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: MouseEvent ): void {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired when the mouse button is pressed down on one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/mouseobserver~MouseObserver}.\n *\n * Note that this event is not available by default. To make it available, {@link module:engine/view/observer/mouseobserver~MouseObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/mouseobserver~MouseObserver\n * @eventName module:engine/view/document~ViewDocument#mousedown\n * @param data The event data.\n */\nexport type ViewDocumentMouseDownEvent = {\n\tname: 'mousedown';\n\targs: [ data: ViewDocumentDomEventData<MouseEvent> ];\n};\n\n/**\n * Fired when the mouse button is released over one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/mouseobserver~MouseObserver}.\n *\n * Note that this event is not available by default. To make it available, {@link module:engine/view/observer/mouseobserver~MouseObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/mouseobserver~MouseObserver\n * @eventName module:engine/view/document~ViewDocument#mouseup\n * @param  data The event data.\n */\nexport type ViewDocumentMouseUpEvent = {\n\tname: 'mouseup';\n\targs: [ data: ViewDocumentDomEventData<MouseEvent> ];\n};\n\n/**\n * Fired when the mouse is over one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/mouseobserver~MouseObserver}.\n *\n * Note that this event is not available by default. To make it available, {@link module:engine/view/observer/mouseobserver~MouseObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/mouseobserver~MouseObserver\n * @eventName module:engine/view/document~ViewDocument#mouseover\n * @param  data The event data.\n */\nexport type ViewDocumentMouseOverEvent = {\n\tname: 'mouseover';\n\targs: [ data: ViewDocumentDomEventData<MouseEvent> ];\n};\n\n/**\n * Fired when the mouse is moved out of the one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/mouseobserver~MouseObserver}.\n *\n * Note that this event is not available by default. To make it available, {@link module:engine/view/observer/mouseobserver~MouseObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/mouseobserver~MouseObserver\n * @eventName module:engine/view/document~ViewDocument#mouseout\n * @param  data The event data.\n */\nexport type ViewDocumentMouseOutEvent = {\n\tname: 'mouseout';\n\targs: [ data: ViewDocumentDomEventData<MouseEvent> ];\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/**\n * @module engine/view/observer/touchobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\n\n/**\n * Touch events observer.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n */\nexport class TouchObserver extends DomEventObserver<'touchstart' | 'touchend' | 'touchmove'> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = [ 'touchstart', 'touchend', 'touchmove' ] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: TouchEvent ): void {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired when a touch is started on one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/touchobserver~TouchObserver}.\n *\n * Note that this event is not available by default. To make it available, {@link module:engine/view/observer/touchobserver~TouchObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/touchobserver~TouchObserver\n * @eventName module:engine/view/document~ViewDocument#touchstart\n * @param data The event data.\n */\nexport type ViewDocumentTouchStartEvent = {\n\tname: 'touchstart';\n\targs: [ data: ViewDocumentDomEventData<TouchEvent> ];\n};\n\n/**\n * Fired when a touch ends on one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/touchobserver~TouchObserver}.\n *\n * Note that this event is not available by default. To make it available, {@link module:engine/view/observer/touchobserver~TouchObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/touchobserver~TouchObserver\n * @eventName module:engine/view/document~ViewDocument#touchend\n * @param data The event data.\n */\nexport type ViewDocumentTouchEndEvent = {\n\tname: 'touchend';\n\targs: [ data: ViewDocumentDomEventData<TouchEvent> ];\n};\n\n/**\n * Fired when a touch is moved on one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/touchobserver~TouchObserver}.\n *\n * Note that this event is not available by default. To make it available, {@link module:engine/view/observer/touchobserver~TouchObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/touchobserver~TouchObserver\n * @eventName module:engine/view/document~ViewDocument#touchmove\n * @param data The event data.\n */\nexport type ViewDocumentTouchMoveEvent = {\n\tname: 'touchmove';\n\targs: [ data: ViewDocumentDomEventData<TouchEvent> ];\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/**\n * @module engine/view/observer/pointerobserver\n */\n\nimport { DomEventObserver } from './domeventobserver.js';\nimport { type ViewDocumentDomEventData } from './domeventdata.js';\n\n/**\n * Pointer events observer.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n */\nexport class PointerObserver extends DomEventObserver<'pointerdown' | 'pointerup' | 'pointermove'> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = [ 'pointerdown', 'pointerup', 'pointermove' ] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: PointerEvent ): void {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired when a pointer is down on one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/pointerobserver~PointerObserver}.\n *\n * Note that this event is not available by default. To make it available,\n * {@link module:engine/view/observer/pointerobserver~PointerObserver} needs to be added to {@link module:engine/view/view~EditingView}\n * by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/pointerobserver~PointerObserver\n * @eventName module:engine/view/document~ViewDocument#pointerdown\n * @param data The event data.\n */\nexport type ViewDocumentPointerDownEvent = {\n\tname: 'pointerdown';\n\targs: [ data: ViewDocumentDomEventData<PointerEvent> ];\n};\n\n/**\n * Fired when a pointer is up on one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/pointerobserver~PointerObserver}.\n *\n * Note that this event is not available by default. To make it available,\n * {@link module:engine/view/observer/pointerobserver~PointerObserver} needs to be added to {@link module:engine/view/view~EditingView}\n * by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/pointerobserver~PointerObserver\n * @eventName module:engine/view/document~ViewDocument#pointerup\n * @param data The event data.\n */\nexport type ViewDocumentPointerUpEvent = {\n\tname: 'pointerup';\n\targs: [ data: ViewDocumentDomEventData<PointerEvent> ];\n};\n\n/**\n * Fired when a pointer is moved on one of the editing roots of the editor.\n *\n * Introduced by {@link module:engine/view/observer/pointerobserver~PointerObserver}.\n *\n * Note that this event is not available by default. To make it available,\n * {@link module:engine/view/observer/pointerobserver~PointerObserver} needs to be added to {@link module:engine/view/view~EditingView}\n * by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:engine/view/observer/pointerobserver~PointerObserver\n * @eventName module:engine/view/document~ViewDocument#pointermove\n * @param data The event data.\n */\nexport type ViewDocumentPointerMoveEvent = {\n\tname: 'pointermove';\n\targs: [ data: ViewDocumentDomEventData<PointerEvent> ];\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/**\n * @module engine/view/upcastwriter\n */\n\nimport { ViewDocumentFragment } from './documentfragment.js';\nimport { ViewElement, type ViewElementAttributes } from './element.js';\nimport { ViewText } from './text.js';\nimport { isPlainObject } from 'es-toolkit/compat';\nimport { ViewPosition, type ViewPositionOffset } from './position.js';\nimport { ViewRange } from './range.js';\nimport {\n\tViewSelection,\n\ttype ViewPlaceOrOffset,\n\ttype ViewSelectable,\n\ttype ViewSelectionOptions\n} from './selection.js';\n\nimport { type ViewDocument } from './document.js';\nimport { type ViewItem } from './item.js';\nimport { type ViewNode } from './node.js';\n\n/**\n * View upcast writer. It provides a set of methods used to manipulate non-semantic view trees.\n *\n * It should be used only while working on a non-semantic view\n * (e.g. a view created from HTML string on paste).\n * To manipulate a view which was or is being downcasted from the the model use the\n * {@link module:engine/view/downcastwriter~ViewDowncastWriter downcast writer}.\n *\n * Read more about changing the view in the {@glink framework/architecture/editing-engine#changing-the-view Changing the view}\n * section of the {@glink framework/architecture/editing-engine Editing engine architecture} guide.\n *\n * Unlike `ViewDowncastWriter`, which is available in the {@link module:engine/view/view~EditingView#change `View#change()`} block,\n * `ViewUpcastWriter` can be created wherever you need it:\n *\n * ```ts\n * const writer = new ViewUpcastWriter( viewDocument );\n * const text = writer.createText( 'foo!' );\n *\n * writer.appendChild( text, someViewElement );\n * ```\n */\nexport class ViewUpcastWriter {\n\t/**\n\t * The view document instance in which this upcast writer operates.\n\t */\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * @param document The view document instance in which this upcast writer operates.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/documentfragment~ViewDocumentFragment} instance.\n\t *\n\t * @param children A list of nodes to be inserted into the created document fragment.\n\t * @returns The created document fragment.\n\t */\n\tpublic createDocumentFragment( children?: ViewNode | Iterable<ViewNode> ): ViewDocumentFragment {\n\t\treturn new ViewDocumentFragment( this.document, children );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/element~ViewElement} instance.\n\t *\n\t * Attributes can be passed in various formats:\n\t *\n\t * ```ts\n\t * upcastWriter.createElement( 'div', { class: 'editor', contentEditable: 'true' } ); // object\n\t * upcastWriter.createElement( 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t * upcastWriter.createElement( 'div', mapOfAttributes ); // map\n\t * ```\n\t *\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t * @returns Created element.\n\t */\n\tpublic createElement(\n\t\tname: string,\n\t\tattrs?: ViewElementAttributes,\n\t\tchildren?: ViewNode | Iterable<ViewNode>\n\t): ViewElement {\n\t\treturn new ViewElement( this.document, name, attrs, children );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/text~ViewText} instance.\n\t *\n\t * @param data The text's data.\n\t * @returns The created text node.\n\t */\n\tpublic createText( data: string ): ViewText {\n\t\treturn new ViewText( this.document, data );\n\t}\n\n\t/**\n\t * Clones the provided element.\n\t *\n\t * @see module:engine/view/element~ViewElement#_clone\n\t * @param element Element to be cloned.\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns Clone of this element.\n\t */\n\tpublic clone( element: ViewElement, deep: boolean = false ): ViewElement {\n\t\treturn element._clone( deep );\n\t}\n\n\t/**\n\t * Appends a child node or a list of child nodes at the end of this node\n\t * and sets the parent of these nodes to this element.\n\t *\n\t * @see module:engine/view/element~ViewElement#_appendChild\n\t * @param items Items to be inserted.\n\t * @param element Element to which items will be appended.\n\t * @returns Number of appended nodes.\n\t */\n\tpublic appendChild( items: ViewItem | string | Iterable<ViewItem | string>, element: ViewElement | ViewDocumentFragment ): number {\n\t\treturn element._appendChild( items );\n\t}\n\n\t/**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this element.\n\t *\n\t * @see module:engine/view/element~ViewElement#_insertChild\n\t * @param index Offset at which nodes should be inserted.\n\t * @param items Items to be inserted.\n\t * @param element Element to which items will be inserted.\n\t * @returns Number of inserted nodes.\n\t */\n\tpublic insertChild( index: number, items: ViewItem | Iterable<ViewItem>, element: ViewElement | ViewDocumentFragment ): number {\n\t\treturn element._insertChild( index, items );\n\t}\n\n\t/**\n\t * Removes the given number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @see module:engine/view/element~ViewElement#_removeChildren\n\t * @param index Offset from which nodes will be removed.\n\t * @param howMany Number of nodes to remove.\n\t * @param element Element which children will be removed.\n\t * @returns The array containing removed nodes.\n\t */\n\tpublic removeChildren( index: number, howMany: number, element: ViewElement | ViewDocumentFragment ): Array<ViewNode> {\n\t\treturn element._removeChildren( index, howMany );\n\t}\n\n\t/**\n\t * Removes given element from the view structure. Will not have effect on detached elements.\n\t *\n\t * @param element Element which will be removed.\n\t * @returns The array containing removed nodes.\n\t */\n\tpublic remove( element: ViewNode ): Array<ViewNode> {\n\t\tconst parent = element.parent;\n\n\t\tif ( parent ) {\n\t\t\treturn this.removeChildren( parent.getChildIndex( element ), 1, parent );\n\t\t}\n\n\t\treturn [];\n\t}\n\n\t/**\n\t * Replaces given element with the new one in the view structure. Will not have effect on detached elements.\n\t *\n\t * @param oldElement Element which will be replaced.\n\t * @param newElement Element which will be inserted in the place of the old element.\n\t * @returns Whether old element was successfully replaced.\n\t */\n\tpublic replace( oldElement: ViewElement, newElement: ViewElement ): boolean {\n\t\tconst parent = oldElement.parent;\n\n\t\tif ( parent ) {\n\t\t\tconst index = parent.getChildIndex( oldElement )!;\n\n\t\t\tthis.removeChildren( index, 1, parent );\n\t\t\tthis.insertChild( index, newElement, parent );\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Removes given element from view structure and places its children in its position.\n\t * It does nothing if element has no parent.\n\t *\n\t * @param element Element to unwrap.\n\t */\n\tpublic unwrapElement( element: ViewElement ): void {\n\t\tconst parent = element.parent;\n\n\t\tif ( parent ) {\n\t\t\tconst index = parent.getChildIndex( element )!;\n\n\t\t\tthis.remove( element );\n\t\t\tthis.insertChild( index, element.getChildren(), parent );\n\t\t}\n\t}\n\n\t/**\n\t * Renames element by creating a copy of a given element but with its name changed and then moving contents of the\n\t * old element to the new one.\n\t *\n\t * Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n\t *\n\t * @param newName New element name.\n\t * @param  element Element to be renamed.\n\t * @returns New element or null if the old element was not replaced (happens for detached elements).\n\t */\n\tpublic rename( newName: string, element: ViewElement ): ViewElement | null {\n\t\tconst newElement = new ViewElement( this.document, newName, element.getAttributes(), element.getChildren() );\n\n\t\treturn this.replace( element, newElement ) ? newElement : null;\n\t}\n\n\t/**\n\t * Adds or overwrites element's attribute with a specified key and value.\n\t *\n\t * ```ts\n\t * writer.setAttribute( 'href', 'http://ckeditor.com', linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~ViewElement#_setAttribute\n\t * @param key Attribute key.\n\t * @param value Attribute value.\n\t * @param element Element for which attribute will be set.\n\t */\n\tpublic setAttribute( key: string, value: unknown, element: ViewElement ): void {\n\t\telement._setAttribute( key, value );\n\t}\n\n\t/**\n\t * Removes attribute from the element.\n\t *\n\t * ```ts\n\t * writer.removeAttribute( 'href', linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~ViewElement#_removeAttribute\n\t * @param key Attribute key.\n\t * @param element Element from which attribute will be removed.\n\t */\n\tpublic removeAttribute( key: string, element: ViewElement ): void {\n\t\telement._removeAttribute( key );\n\t}\n\n\t/**\n\t * Adds specified class to the element.\n\t *\n\t * ```ts\n\t * writer.addClass( 'foo', linkElement );\n\t * writer.addClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~ViewElement#_addClass\n\t * @param className Single class name or array of class names which will be added.\n\t * @param element Element for which class will be added.\n\t */\n\tpublic addClass( className: string | Array<string>, element: ViewElement ): void {\n\t\telement._addClass( className );\n\t}\n\n\t/**\n\t * Removes specified class from the element.\n\t *\n\t * ```ts\n\t * writer.removeClass( 'foo', linkElement );\n\t * writer.removeClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~ViewElement#_removeClass\n\t * @param className Single class name or array of class names which will be removed.\n\t * @param element Element from which class will be removed.\n\t */\n\tpublic removeClass( className: string | Array<string>, element: ViewElement ): void {\n\t\telement._removeClass( className );\n\t}\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t * ```ts\n\t * writer.setStyle( 'color', 'red', element );\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @see module:engine/view/element~ViewElement#_setStyle\n\t * @label KEY_VALUE\n\t * @param property Property name.\n\t * @param value Value to set.\n\t * @param element Element for which style will be added.\n\t */\n\tpublic setStyle( property: string, value: string, element: ViewElement ): void;\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t * ```ts\n\t * writer.setStyle( {\n\t * \tcolor: 'red',\n\t * \tposition: 'fixed'\n\t * }, element );\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#set `StylesMap#set()`} for details.\n\t *\n\t * @see module:engine/view/element~ViewElement#_setStyle\n\t * @label OBJECT\n\t * @param properties Object with key - value pairs.\n\t * @param element Element for which style will be added.\n\t */\n\tpublic setStyle( properties: Record<string, string>, element: ViewElement ): void;\n\n\tpublic setStyle( property: string | Record<string, string>, valueOrElement: string | ViewElement, element?: ViewElement ): void {\n\t\tif ( isPlainObject( property ) && element === undefined ) {\n\t\t\t( valueOrElement as ViewElement )._setStyle( property as Record<string, string> );\n\t\t} else {\n\t\t\telement!._setStyle( property as string, valueOrElement as string );\n\t\t}\n\t}\n\n\t/**\n\t * Removes specified style from the element.\n\t *\n\t * ```ts\n\t * writer.removeStyle( 'color', element );  // Removes 'color' style.\n\t * writer.removeStyle( [ 'color', 'border-top' ], element ); // Removes both 'color' and 'border-top' styles.\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t *\n\t * @see module:engine/view/element~ViewElement#_removeStyle\n\t * @param property Style property name or names to be removed.\n\t * @param element Element from which style will be removed.\n\t */\n\tpublic removeStyle( property: string | Array<string>, element: ViewElement ): void {\n\t\telement._removeStyle( property );\n\t}\n\n\t/**\n\t * Sets a custom property on element. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t *\n\t * @see module:engine/view/element~ViewElement#_setCustomProperty\n\t * @param key Custom property name/key.\n\t * @param value Custom property value to be stored.\n\t * @param element Element for which custom property will be set.\n\t */\n\tpublic setCustomProperty( key: string | symbol, value: unknown, element: ViewElement | ViewDocumentFragment ): void {\n\t\telement._setCustomProperty( key, value );\n\t}\n\n\t/**\n\t * Removes a custom property stored under the given key.\n\t *\n\t * @see module:engine/view/element~ViewElement#_removeCustomProperty\n\t * @param key Name/key of the custom property to be removed.\n\t * @param element Element from which the custom property will be removed.\n\t * @returns Returns true if property was removed.\n\t */\n\tpublic removeCustomProperty( key: string | symbol, element: ViewElement | ViewDocumentFragment ): boolean {\n\t\treturn element._removeCustomProperty( key );\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~ViewPosition position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~ViewItem view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~ViewItem view item}.\n\t */\n\tpublic createPositionAt( itemOrPosition: ViewItem | ViewPosition, offset?: ViewPositionOffset ): ViewPosition {\n\t\treturn ViewPosition._createAt( itemOrPosition, offset );\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @param item View item after which the position should be located.\n\t */\n\tpublic createPositionAfter( item: ViewItem ): ViewPosition {\n\t\treturn ViewPosition._createAfter( item );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @param item View item before which the position should be located.\n\t */\n\tpublic createPositionBefore( item: ViewItem ): ViewPosition {\n\t\treturn ViewPosition._createBefore( item );\n\t}\n\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates it's own {@link module:engine/view/position~ViewPosition} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */\n\tpublic createRange( start: ViewPosition, end: ViewPosition ): ViewRange {\n\t\treturn new ViewRange( start, end );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~ViewItem view item} and ends after it.\n\t */\n\tpublic createRangeOn( item: ViewItem ): ViewRange {\n\t\treturn ViewRange._createOn( item );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */\n\tpublic createRangeIn( element: ViewElement | ViewDocumentFragment ): ViewRange {\n\t\treturn ViewRange._createIn( element );\n\t}\n\n\t/**\n\t * Creates a new {@link module:engine/view/selection~ViewSelection} instance.\n\t *\n\t * ```ts\n\t * // Creates collapsed selection at the position of given item and offset.\n\t * const paragraph = writer.createContainerElement( 'paragraph' );\n\t * const selection = writer.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/view/element~ViewElement element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/view/item~ViewItem item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = writer.createSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( element, 'in', { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = writer.createSelection( element, 'in', { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:SELECTABLE `createSelection( selectable, options )`}.\n\t *\n\t * @label NODE_OFFSET\n\t */\n\tpublic createSelection( selectable: ViewNode, placeOrOffset: ViewPlaceOrOffset, options?: ViewSelectionOptions ): ViewSelection;\n\n\t/**\n\t * Creates a new {@link module:engine/view/selection~ViewSelection} instance.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = writer.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = writer.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * const selection = writer.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = writer.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the document selection.\n\t * const selection = writer.createSelection( editor.editing.view.document.selection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * const selection = writer.createSelection( position );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = writer.createSelection( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * See also: {@link #createSelection:NODE_OFFSET `createSelection( node, placeOrOffset, options )`}.\n\t *\n\t * @label SELECTABLE\n\t */\n\tpublic createSelection( selectable?: Exclude<ViewSelectable, ViewNode>, options?: ViewSelectionOptions ): ViewSelection;\n\n\tpublic createSelection( ...args: ConstructorParameters<typeof ViewSelection> ): ViewSelection {\n\t\treturn new ViewSelection( ...args );\n\t}\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/**\n * @module engine/view/styles/utils\n */\n\nimport type { BoxStyleSides, StylePropertyDescriptor, StyleValue } from '../stylesmap.js';\n\nconst HEX_COLOR_REGEXP = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;\nconst RGB_COLOR_REGEXP = /^rgb\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\\)$/i;\nconst RGBA_COLOR_REGEXP = /^rgba\\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;\nconst HSL_COLOR_REGEXP = /^hsl\\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\\.?[0-9]+)?\\)$/i;\nconst HSLA_COLOR_REGEXP = /^hsla\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;\n\n// Note: This regexp hardcodes a single level of nested () for values such as `calc( var( ...) + ...)`.\n// If this gets more complex, a proper parser should be used instead.\nconst CSS_SHORTHAND_VALUE_REGEXP = /\\w+\\((?:[^()]|\\([^()]*\\))*\\)|\\S+/gi;\n\nconst COLOR_NAMES = new Set( [\n\t// CSS Level 1\n\t'black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia',\n\t'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua',\n\t// CSS Level 2 (Revision 1)\n\t'orange',\n\t// CSS Color Module Level 3\n\t'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown',\n\t'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan',\n\t'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta',\n\t'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue',\n\t'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey',\n\t'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod',\n\t'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush',\n\t'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray',\n\t'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray',\n\t'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine',\n\t'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen',\n\t'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite',\n\t'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred',\n\t'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon',\n\t'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow',\n\t'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen',\n\t// CSS Color Module Level 3 (System Colors)\n\t'activeborder', 'activecaption', 'appworkspace', 'background', 'buttonface', 'buttonhighlight', 'buttonshadow',\n\t'buttontext', 'captiontext', 'graytext', 'highlight', 'highlighttext', 'inactiveborder', 'inactivecaption',\n\t'inactivecaptiontext', 'infobackground', 'infotext', 'menu', 'menutext', 'scrollbar', 'threeddarkshadow',\n\t'threedface', 'threedhighlight', 'threedlightshadow', 'threedshadow', 'window', 'windowframe', 'windowtext',\n\t// CSS Color Module Level 4\n\t'rebeccapurple',\n\t// Keywords\n\t'currentcolor', 'transparent'\n] );\n\n/**\n * Checks if string contains [color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) CSS value.\n *\n * ```ts\n * isColorStyleValue( '#f00' );\t\t\t\t\t\t// true\n * isColorStyleValue( '#AA00BB33' );\t\t\t\t// true\n * isColorStyleValue( 'rgb(0, 0, 250)' );\t\t\t// true\n * isColorStyleValue( 'hsla(240, 100%, 50%, .7)' );\t// true\n * isColorStyleValue( 'deepskyblue' );\t\t\t\t// true\n * ```\n *\n * **Note**: It does not support CSS Level 4 whitespace syntax, system colors and radius values for HSL colors.\n */\nexport function isColorStyleValue( string: string ): boolean {\n\t// As far as I was able to test checking some pre-conditions is faster than joining each test with ||.\n\tif ( string.startsWith( '#' ) ) {\n\t\treturn HEX_COLOR_REGEXP.test( string );\n\t}\n\n\tif ( string.startsWith( 'rgb' ) ) {\n\t\treturn RGB_COLOR_REGEXP.test( string ) || RGBA_COLOR_REGEXP.test( string );\n\t}\n\n\tif ( string.startsWith( 'hsl' ) ) {\n\t\treturn HSL_COLOR_REGEXP.test( string ) || HSLA_COLOR_REGEXP.test( string );\n\t}\n\n\t// Array check > RegExp test.\n\treturn COLOR_NAMES.has( string.toLowerCase() );\n}\n\nconst lineStyleValues = [ 'none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset' ];\n\n/**\n * Checks if string contains [line style](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style) CSS value.\n */\nexport function isLineStyleValue( string: string ): boolean {\n\treturn lineStyleValues.includes( string );\n}\n\nconst lengthRegExp = /^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;\n\n/**\n * Checks if string contains [length](https://developer.mozilla.org/en-US/docs/Web/CSS/length) CSS value.\n */\nexport function isLengthStyleValue( string: string ): boolean {\n\treturn lengthRegExp.test( string );\n}\n\nconst PERCENTAGE_VALUE_REGEXP = /^[+-]?[0-9]*([.][0-9]+)?%$/;\n\n/**\n * Checks if string contains [percentage](https://developer.mozilla.org/en-US/docs/Web/CSS/percentage) CSS value.\n */\nexport function isPercentageStyleValue( string: string ): boolean {\n\treturn PERCENTAGE_VALUE_REGEXP.test( string );\n}\n\nconst sizeValues = [ 'auto', 'cover', 'contain' ];\n\n/**\n * Checks if a string is a valid CSS `background-size` value token.\n */\nexport function isSizeStyleValue( value: string ): boolean {\n\treturn sizeValues.includes( value ) || isLengthStyleValue( value ) || isPercentageStyleValue( value );\n}\n\nconst repeatValues = [ 'repeat-x', 'repeat-y', 'repeat', 'space', 'round', 'no-repeat' ];\n\n/**\n * Checks if string contains [background repeat](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) CSS value.\n */\nexport function isRepeatStyleValue( string: string ): boolean {\n\treturn repeatValues.includes( string );\n}\n\nconst positionValues = [ 'center', 'top', 'bottom', 'left', 'right' ];\n\n/**\n * Checks if string contains [background position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) CSS value.\n */\nexport function isPositionStyleValue( string: string ): boolean {\n\treturn positionValues.includes( string );\n}\n\nconst attachmentValues = [ 'fixed', 'scroll', 'local' ];\n\n/**\n * Checks if string contains [background attachment](https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment) CSS value.\n */\nexport function isAttachmentStyleValue( string: string ): boolean {\n\treturn attachmentValues.includes( string );\n}\n\nconst originValues = [ 'border-box', 'padding-box', 'content-box' ];\n\n/**\n * Checks if string contains [background origin](https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin) CSS value.\n */\nexport function isOriginStyleValue( string: string ): boolean {\n\treturn originValues.includes( string );\n}\n\nconst clipValues = [ 'border-box', 'padding-box', 'content-box', 'text' ];\n\n/**\n * Checks if string contains [background clip](https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip) CSS value.\n */\nexport function isClipStyleValue( string: string ): boolean {\n\treturn clipValues.includes( string );\n}\n\nconst urlRegExp = /^url\\(/;\n\n/**\n * Checks if string contains [URL](https://developer.mozilla.org/en-US/docs/Web/CSS/url) CSS value.\n */\nexport function isURLStyleValue( string: string ): boolean {\n\treturn urlRegExp.test( string );\n}\n\n/**\n * Parses box sides as individual values.\n */\nexport function getBoxSidesStyleValues( value: string = '' ): BoxStyleSides {\n\tif ( value === '' ) {\n\t\treturn { top: undefined, right: undefined, bottom: undefined, left: undefined };\n\t}\n\n\tconst values = getShorthandStylesValues( value );\n\n\tconst top = values[ 0 ];\n\tconst bottom = values[ 2 ] || top;\n\tconst right = values[ 1 ] || top;\n\tconst left = values[ 3 ] || right;\n\n\treturn { top, bottom, right, left };\n}\n\n/**\n * Default reducer for CSS properties that concerns edges of a box\n * [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notations:\n *\n * ```ts\n * stylesProcessor.setReducer( 'padding', getBoxSidesStyleValueReducer( 'padding' ) );\n * ```\n */\nexport function getBoxSidesStyleValueReducer( styleShorthand: string ) {\n\treturn ( value: StyleValue ): Array<StylePropertyDescriptor> => {\n\t\tconst { top, right, bottom, left } = value as BoxStyleSides;\n\n\t\tconst reduced: Array<StylePropertyDescriptor> = [];\n\n\t\tif ( ![ top, right, left, bottom ].every( value => !!value ) ) {\n\t\t\tif ( top ) {\n\t\t\t\treduced.push( [ styleShorthand + '-top', top ] );\n\t\t\t}\n\n\t\t\tif ( right ) {\n\t\t\t\treduced.push( [ styleShorthand + '-right', right ] );\n\t\t\t}\n\n\t\t\tif ( bottom ) {\n\t\t\t\treduced.push( [ styleShorthand + '-bottom', bottom ] );\n\t\t\t}\n\n\t\t\tif ( left ) {\n\t\t\t\treduced.push( [ styleShorthand + '-left', left ] );\n\t\t\t}\n\t\t} else {\n\t\t\treduced.push( [ styleShorthand, getBoxSidesStyleShorthandValue( value as BoxStyleSides ) ] );\n\t\t}\n\n\t\treturn reduced;\n\t};\n}\n\n/**\n * Returns a [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notation\n * of a CSS property value.\n *\n * ```ts\n * getBoxSidesStyleShorthandValue( { top: '1px', right: '1px', bottom: '2px', left: '1px' } );\n * // will return '1px 1px 2px'\n * ```\n */\nexport function getBoxSidesStyleShorthandValue( { top, right, bottom, left }: BoxStyleSides ): string {\n\tconst out = [];\n\n\tif ( left !== right ) {\n\t\tout.push( top, right, bottom, left );\n\t} else if ( bottom !== top ) {\n\t\tout.push( top, right, bottom );\n\t} else if ( right !== top ) {\n\t\tout.push( top, right );\n\t} else {\n\t\tout.push( top );\n\t}\n\n\treturn out.join( ' ' );\n}\n\n/**\n * Creates a normalizer for a [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) 1-to-4 value.\n *\n * ```ts\n * stylesProcessor.setNormalizer( 'margin', getPositionStyleShorthandNormalizer( 'margin' ) );\n * ```\n */\nexport function getPositionStyleShorthandNormalizer( shorthand: string ) {\n\treturn ( value: string ): { path: string; value: BoxStyleSides } => {\n\t\treturn {\n\t\t\tpath: shorthand,\n\t\t\tvalue: getBoxSidesStyleValues( value )\n\t\t};\n\t};\n}\n\n/**\n * Parses parts of a 1-to-4 value notation - handles some CSS values with spaces (like RGB()).\n *\n * ```ts\n * getShorthandStylesValues( 'red blue RGB(0, 0, 0)');\n * // will return [ 'red', 'blue', 'RGB(0, 0, 0)' ]\n * ```\n */\nexport function getShorthandStylesValues( string: string ): Array<string> {\n\tconst matches = string.trim().slice( 0, 1500 ).matchAll( CSS_SHORTHAND_VALUE_REGEXP );\n\n\treturn Array.from( matches ).map( i => i[ 0 ] );\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/**\n * @module engine/view/styles/background\n */\n\nimport { isEmpty } from 'es-toolkit/compat';\nimport type {\n\tStylesProcessor,\n\tStylesNormalizer,\n\tStylesReducer,\n\tStyleValue,\n\tStylePropertyDescriptor\n} from '../stylesmap.js';\nimport {\n\tgetShorthandStylesValues,\n\tisAttachmentStyleValue,\n\tisClipStyleValue,\n\tisColorStyleValue,\n\tisOriginStyleValue,\n\tisPercentageStyleValue,\n\tisPositionStyleValue,\n\tisRepeatStyleValue,\n\tisSizeStyleValue\n} from './utils.js';\n\n/**\n * CSS initial values for background longhand properties.\n */\nconst BACKGROUND_INITIAL_ARRAY_VALUES = {\n\timage: 'none',\n\trepeat: 'repeat',\n\tposition: '0% 0%',\n\tsize: 'auto',\n\torigin: 'padding-box',\n\tclip: 'border-box',\n\tattachment: 'scroll'\n} as const;\n\n/**\n * CSS function names that represent image values in the `background` shorthand.\n */\nconst IMAGE_FUNCTIONS = [\n\t'linear-gradient',\n\t'repeating-linear-gradient',\n\t'radial-gradient',\n\t'repeating-radial-gradient',\n\t'conic-gradient',\n\t'repeating-conic-gradient',\n\t'url'\n] as const;\n\n/**\n * Adds background CSS styles processing rules to the given `StylesProcessor`.\n *\n * Registers normalizers for the `background` shorthand and its longhand properties,\n * reducers that serialize them back to CSS strings, and the relation mapping between them.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addBackgroundStylesRules );\n * ```\n *\n * @param stylesProcessor The styles processor instance to register rules on.\n */\nexport function addBackgroundStylesRules( stylesProcessor: StylesProcessor ): void {\n\tstylesProcessor.setNormalizer( 'background-color', getBackgroundColorNormalizer() );\n\n\tfor ( const property in BACKGROUND_INITIAL_ARRAY_VALUES ) {\n\t\tstylesProcessor.setNormalizer( `background-${ property }`, getBackgroundArrayPropertyNormalizer( `background.${ property }` ) );\n\t\tstylesProcessor.setReducer(\n\t\t\t`background-${ property }`,\n\t\t\tgetBackgroundArrayPropertyReducer( `background-${ property }` )\n\t\t);\n\t}\n\n\t// Normalized data format:\n\t// {\n\t// \tcolor: 'red',\n\t// \timage: [ 'url(img1.png)', 'url(img2.png)' ],\n\t// \tposition: [ '0% 0%', '50% 50%' ],\n\t// \trepeat: [ 'no-repeat', 'repeat' ],\n\t// \t// ...\n\t// }\n\tstylesProcessor.setNormalizer( 'background', getBackgroundNormalizer() );\n\tstylesProcessor.setReducer( 'background', getBackgroundReducer() );\n\tstylesProcessor.setStyleRelation( 'background', [\n\t\t'background-color',\n\t\t'background-image',\n\t\t'background-repeat',\n\t\t'background-position',\n\t\t'background-size',\n\t\t'background-attachment',\n\t\t'background-origin',\n\t\t'background-clip'\n\t] );\n}\n\n/**\n * Returns a normalizer for the `background` shorthand property.\n *\n * Parses the raw CSS value into comma-separated layers and merges them into\n * a structured `Background` object stored under the `background` path.\n */\nfunction getBackgroundNormalizer(): StylesNormalizer {\n\treturn value => {\n\t\tconst layers = parseBackgroundIntoLayers( value );\n\n\t\t// If for some reason, it was impossible to extract any valid layers from the input,\n\t\t// assume it's color value for a single layer background, as it's the most common use\n\t\t// case and better than losing the value completely.\n\t\tif ( !layers.length ) {\n\t\t\tlayers.push( {\n\t\t\t\t...getDefaultBackgroundLayer(),\n\t\t\t\tcolor: value\n\t\t\t} );\n\t\t}\n\n\t\tconst background = normalizeBackgroundLayers( layers );\n\n\t\treturn {\n\t\t\tpath: 'background',\n\t\t\tvalue: background as StyleValue\n\t\t};\n\t};\n}\n\n/**\n * Returns a normalizer for the `background-color` longhand property.\n *\n * Stores the raw color value directly under the `background.color` path.\n */\nfunction getBackgroundColorNormalizer(): StylesNormalizer {\n\treturn value => ( { path: 'background.color', value } );\n}\n\n/**\n * Returns a normalizer for a comma-separated background array longhand property\n * (e.g. `background-image`, `background-repeat`, `background-position`, `background-attachment`).\n *\n * Splits the raw value by top-level commas and stores the resulting array under the given path.\n *\n * @param path The target style path, e.g. `'background.image'`.\n */\nfunction getBackgroundArrayPropertyNormalizer( path: string ): StylesNormalizer {\n\treturn value => ( { path, value: splitByTopLevelCommas( value ) } );\n}\n\n/**\n * Returns a reducer for a comma-separated background array longhand property\n * (e.g. `background-image`, `background-repeat`, `background-position`, `background-attachment`).\n *\n * Serializes an array of per-layer values back into a comma-separated CSS string.\n *\n * @param property The CSS property name to output, e.g. `'background-image'`.\n */\nfunction getBackgroundArrayPropertyReducer( property: string ): StylesReducer {\n\treturn value => {\n\t\tconst serialized = ( value as Array<string> ).join( ', ' );\n\n\t\treturn [ [ property, serialized ] ];\n\t};\n}\n\n/**\n * Returns a reducer for the `background` property. Depending on which longhand properties are present, it either:\n *\n * * Serializes into a concise `background` shorthand if all required longhand properties are present and non-empty, or\n * * Serializes into individual longhand properties for those that have defined values.\n *\n * This prevents overwriting external stylesheet rules with default values that were not explicitly set in the model.\n * For example, if only `background-color` is defined in the model, we emit just `background-color` rather than\n * the full `background` shorthand, which would reset all other sub-properties to their initial values.\n */\nfunction getBackgroundReducer(): StylesReducer {\n\treturn value => {\n\t\tconst background = value as Background;\n\n\t\t// It is highly unlikely that all of these properties were set manually. If all fields are present,\n\t\t// they were most likely populated by parsing the `background` shorthand, which fills all of them\n\t\t// for every layer. In this case, we can safely serialize back to the `background` shorthand.\n\t\t// On the other hand, if some fields are missing, it means the background was created by manually\n\t\t// setting individual longhand properties (e.g., `background-origin`, `background-attachment`, etc.).\n\t\t// We should preserve that intent and serialize to longhands to prevent emitting default values\n\t\t// for the missing properties.\n\t\tconst allFieldsLayersFilled = Object.keys( BACKGROUND_INITIAL_ARRAY_VALUES ).every( key => {\n\t\t\tconst value = background[ key as keyof Background ];\n\n\t\t\treturn value !== undefined && ( !Array.isArray( value ) || value.length > 0 );\n\t\t} );\n\n\t\tif ( allFieldsLayersFilled ) {\n\t\t\treturn serializeToShorthandBackground( background );\n\t\t}\n\n\t\treturn serializeToLonghandBackground( background );\n\t};\n}\n\n/**\n * Serializes a structured `Background` object into a concise CSS `background` shorthand string.\n */\nfunction serializeToShorthandBackground( background: Background ): Array<StylePropertyDescriptor> {\n\tconst result: Array<StylePropertyDescriptor> = [];\n\tconst shorthand = extractBackgroundLayers( background )\n\t\t.map( layer => serializeBackgroundLayer( layer ).trim() )\n\t\t.filter( Boolean )\n\t\t.join( ', ' );\n\n\tif ( shorthand ) {\n\t\tresult.push( [ 'background', shorthand ] );\n\t}\n\n\treturn result;\n}\n\n/**\n * Serializes a structured `Background` object into individual CSS longhand properties for those that have defined values.\n * Each longhand property is serialized into a comma-separated string of per-layer values.\n *\n * This is used when not all required longhand properties are present, to avoid emitting default values for missing properties\n * and potentially overwriting external stylesheet rules.\n */\nfunction serializeToLonghandBackground( background: Background ): Array<StylePropertyDescriptor> {\n\tconst result: Array<StylePropertyDescriptor> = [];\n\n\tfor ( const key in BACKGROUND_INITIAL_ARRAY_VALUES ) {\n\t\tconst value = background[ key as keyof Background ]!;\n\n\t\tif ( Array.isArray( value ) ) {\n\t\t\tresult.push( [ `background-${ key }`, ( value as Array<string> ).join( ', ' ) ] );\n\t\t}\n\t}\n\n\tif ( background.color !== undefined ) {\n\t\tresult.push( [ 'background-color', background.color ] );\n\t}\n\n\treturn result;\n}\n\n/**\n * Serializes a single `BackgroundLayer` into a CSS background layer string.\n * Properties equal to their CSS initial values are omitted.\n *\n * @param layer A single background layer to serialize.\n * @returns A space-separated CSS string for the layer, or an empty string if no parts are present.\n */\nfunction serializeBackgroundLayer( layer: BackgroundLayer ): string {\n\tconst parts: Array<string> = [];\n\n\tif ( layer.image && layer.image !== BACKGROUND_INITIAL_ARRAY_VALUES.image ) {\n\t\tparts.push( layer.image );\n\t}\n\n\tconst positionStr = layer.position.join( ' ' );\n\tconst isPositionDefault = !positionStr || positionStr === BACKGROUND_INITIAL_ARRAY_VALUES.position;\n\n\tif ( !isPositionDefault ) {\n\t\tparts.push( positionStr );\n\t}\n\n\tconst sizeStr = layer.size.join( ' ' );\n\tconst isSizeDefault = !sizeStr || sizeStr === BACKGROUND_INITIAL_ARRAY_VALUES.size;\n\n\tif ( !isSizeDefault ) {\n\t\tif ( isPositionDefault ) {\n\t\t\tparts.push( '0% 0%' );\n\t\t}\n\n\t\tparts.push( '/', sizeStr );\n\t}\n\n\tconst repeatStr = layer.repeat.join( ' ' );\n\n\tif ( repeatStr && repeatStr !== BACKGROUND_INITIAL_ARRAY_VALUES.repeat ) {\n\t\tparts.push( repeatStr );\n\t}\n\n\tif ( layer.attachment && layer.attachment !== BACKGROUND_INITIAL_ARRAY_VALUES.attachment ) {\n\t\tparts.push( layer.attachment );\n\t}\n\n\tconst isOriginDefault = layer.origin === BACKGROUND_INITIAL_ARRAY_VALUES.origin;\n\tconst isClipDefault = layer.clip === BACKGROUND_INITIAL_ARRAY_VALUES.clip;\n\n\tif ( !isOriginDefault || !isClipDefault ) {\n\t\tparts.push( layer.origin );\n\n\t\tif ( layer.clip !== layer.origin ) {\n\t\t\tparts.push( layer.clip );\n\t\t}\n\t}\n\n\tif ( layer.color ) {\n\t\tparts.push( layer.color );\n\t}\n\n\treturn parts.join( ' ' );\n}\n\n/**\n * Splits a structured `Background` object into an array of individual `BackgroundLayer` objects.\n *\n * The number of layers is determined by the longest array among the longhand properties.\n * The `color` value, if present, is always assigned to the last layer (per CSS spec).\n *\n * @param background The structured background object to split.\n * @returns An array of per-layer background objects.\n *\n * @example\n * // Input: { image: [ 'url(a.png)', 'url(b.png)' ], repeat: [ 'no-repeat', 'repeat' ], color: 'blue' }\n * // Output: [\n * //   { image: 'url(a.png)', repeat: [ 'no-repeat' ] },\n * //   { image: 'url(b.png)', repeat: [ 'repeat' ], color: 'blue' }\n * // ]\n */\nfunction extractBackgroundLayers( background: Background ): Array<BackgroundLayer> {\n\tconst layerCount = getTotalBackgroundLayers( background );\n\tconst layers: Array<BackgroundLayer> = Array.from( { length: layerCount }, ( _, i ) => {\n\t\tconst layer = getDefaultBackgroundLayer();\n\n\t\tif ( background.image?.[ i ] ) {\n\t\t\tlayer.image = background.image[ i ];\n\t\t}\n\n\t\tif ( background.position?.[ i ] ) {\n\t\t\tlayer.position = background.position[ i ]!.split( ' ' );\n\t\t}\n\n\t\tif ( background.size?.[ i ] ) {\n\t\t\tlayer.size = background.size[ i ]!.split( ' ' );\n\t\t}\n\n\t\tif ( background.repeat?.[ i ] ) {\n\t\t\tlayer.repeat = background.repeat[ i ]!.split( ' ' );\n\t\t}\n\n\t\tif ( background.attachment?.[ i ] ) {\n\t\t\tlayer.attachment = background.attachment[ i ];\n\t\t}\n\n\t\tif ( background.origin?.[ i ] ) {\n\t\t\tlayer.origin = background.origin[ i ];\n\t\t}\n\n\t\tif ( background.clip?.[ i ] ) {\n\t\t\tlayer.clip = background.clip[ i ];\n\t\t}\n\n\t\treturn layer;\n\t} );\n\n\tif ( background.color ) {\n\t\t// According to standard, the last layer can contain the color definition,\n\t\t// so we set it on the last layer if it exists.\n\t\tlayers.at( -1 )!.color = background.color;\n\t}\n\n\treturn layers;\n}\n\n/**\n * Determines the total number of background layers based on the longest array among the longhand properties in the `Background` object.\n *\n * @param background The structured background object to analyze.\n * @returns The total number of layers, which is the maximum length among the longhand property arrays.\n */\nfunction getTotalBackgroundLayers( background: Background ): number {\n\tlet layersCount = 0;\n\n\tfor ( const value of Object.values( background ) ) {\n\t\tif ( Array.isArray( value ) && value.length > layersCount ) {\n\t\t\tlayersCount = value.length;\n\t\t}\n\t}\n\n\treturn layersCount;\n}\n\n/**\n * Merges an array of `BackgroundLayer` objects into a single structured `Background` object,\n * storing each longhand property as an array of per-layer values.\n *\n * Each input layer always has all properties defined (via `getDefaultBackgroundLayer`),\n * so the resulting arrays are fully populated for every layer.\n *\n * @param layers An array of parsed background layers.\n * @returns A merged `Background` object.\n *\n * @example\n * // Input: [ { image: 'url(a.png)', repeat: [ 'no-repeat' ], position: [ '0%', '0%' ], ... }, { image: 'none', color: 'red', ... } ]\n * // Output: {\n * //   image: [ 'url(a.png)', 'none' ],\n * //   position: [ '0% 0%', '0% 0%' ],\n * //   repeat: [ 'no-repeat', 'repeat' ],\n * //   ...\n * //   color: 'red'\n * // }\n */\nfunction normalizeBackgroundLayers( layers: Array<BackgroundLayer> ): Background {\n\tconst background: Background = {\n\t\timage: [],\n\t\tposition: [],\n\t\tsize: [],\n\t\trepeat: [],\n\t\tattachment: [],\n\t\torigin: [],\n\t\tclip: []\n\t};\n\n\tfor ( const layer of layers ) {\n\t\tbackground.position!.push( layer.position.join( ' ' ) );\n\t\tbackground.size!.push( layer.size.join( ' ' ) );\n\t\tbackground.repeat!.push( layer.repeat.join( ' ' ) );\n\n\t\tbackground.image!.push( layer.image );\n\t\tbackground.attachment!.push( layer.attachment );\n\t\tbackground.origin!.push( layer.origin );\n\t\tbackground.clip!.push( layer.clip );\n\t}\n\n\tif ( layers.at( -1 )?.color ) {\n\t\tbackground.color = layers.at( -1 )!.color!;\n\t}\n\n\treturn background;\n}\n\n/**\n * Parses a raw CSS `background` value and splits it into an array of `BackgroundLayer` objects,\n * one per comma-separated layer.\n *\n * The CSS `background` shorthand syntax is:\n * `background: [ <bg-layer> , ]* <final-bg-layer>`\n *\n * Commas inside function calls (e.g. `rgba()`, `linear-gradient()`) are correctly ignored\n * during splitting.\n *\n * @param value The raw CSS background value string.\n * @returns An array of parsed background layers.\n *\n * @example\n * splitBackgroundIntoLayers( 'url(a.png) no-repeat, red' );\n * // → [ { image: 'url(a.png)', repeat: [ 'no-repeat' ] }, { color: 'red' } ]\n */\nfunction parseBackgroundIntoLayers( value: string ): Array<BackgroundLayer> {\n\treturn splitByTopLevelCommas( value ).map( parseBackgroundLayer ).filter( ( obj ): obj is BackgroundLayer => obj !== null );\n}\n\n/**\n * Parses a single CSS background layer string into a structured `BackgroundLayer` object.\n *\n * First extracts any image function (gradient or `url()`), then classifies the remaining\n * space-separated tokens as repeat, position, attachment, or color values.\n *\n * @param layer A single (non-comma-separated) background layer string.\n * @returns A structured background layer object. If no valid properties were found, returns `null`.\n *\n * @example\n * parseBackgroundLayer( 'url(bg.png) top left no-repeat fixed' );\n * // → { image: 'url(bg.png)', position: [ 'top', 'left' ], repeat: [ 'no-repeat' ], attachment: 'fixed' }\n */\nfunction parseBackgroundLayer( layer: string ): BackgroundLayer | null {\n\tconst background: Partial<BackgroundLayer> = {};\n\n\tconst { value: valueWithoutImage, image } = extractBackgroundImage( layer );\n\tconst parts = getShorthandStylesValues( valueWithoutImage );\n\n\tif ( image ) {\n\t\tbackground.image = image;\n\t}\n\n\tfor ( let i = 0; i < parts.length; i++ ) {\n\t\tconst part = parts[ i ];\n\n\t\tif ( part === '/' ) {\n\t\t\tbackground.size = [];\n\n\t\t\twhile ( i + 1 < parts.length && isSizeStyleValue( parts[ i + 1 ] ) ) {\n\t\t\t\tbackground.size.push( parts[ ++i ] );\n\t\t\t}\n\t\t} else if ( isRepeatStyleValue( part ) ) {\n\t\t\tbackground.repeat ||= [];\n\t\t\tbackground.repeat.push( part );\n\t\t} else if ( isPositionStyleValue( part ) || isPercentageStyleValue( part ) ) {\n\t\t\tbackground.position ||= [];\n\t\t\tbackground.position.push( part );\n\n\t\t\t// Percentage positions can be paired (e.g. '0% 0%'), so consume the next token if it's also a percentage.\n\t\t\tif (\n\t\t\t\ti + 1 < parts.length &&\n\t\t\t\tisPercentageStyleValue( part ) &&\n\t\t\t\tisPercentageStyleValue( parts[ i + 1 ] )\n\t\t\t) {\n\t\t\t\tbackground.position.push( parts[ ++i ] );\n\t\t\t}\n\t\t} else if ( isAttachmentStyleValue( part ) ) {\n\t\t\tbackground.attachment = part;\n\t\t} else if ( isClipStyleValue( part ) ) {\n\t\t\tif ( isOriginStyleValue( part ) && !background.origin ) {\n\t\t\t\t// First box value sets both origin and clip (per CSS spec).\n\t\t\t\tbackground.origin = part;\n\t\t\t\tbackground.clip = part;\n\t\t\t} else {\n\t\t\t\t// Second box value (or 'text') sets only clip.\n\t\t\t\tbackground.clip = part;\n\t\t\t}\n\t\t} else if ( isColorStyleValue( part ) ) {\n\t\t\tbackground.color = part;\n\t\t}\n\t}\n\n\tif ( isEmpty( background ) ) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\t...getDefaultBackgroundLayer(),\n\t\t...background\n\t};\n}\n\n/**\n * Returns a `BackgroundLayer` object with all properties set to their CSS initial values.\n *\n * Used as the base when parsing the `background` shorthand so that every property of a parsed\n * layer always has a defined value.\n *\n * @returns A background layer with default values.\n */\nfunction getDefaultBackgroundLayer(): BackgroundLayer {\n\treturn {\n\t\tattachment: BACKGROUND_INITIAL_ARRAY_VALUES.attachment,\n\t\timage: BACKGROUND_INITIAL_ARRAY_VALUES.image,\n\t\torigin: BACKGROUND_INITIAL_ARRAY_VALUES.origin,\n\t\tclip: BACKGROUND_INITIAL_ARRAY_VALUES.clip,\n\t\tposition: BACKGROUND_INITIAL_ARRAY_VALUES.position.split( ' ' ),\n\t\trepeat: BACKGROUND_INITIAL_ARRAY_VALUES.repeat.split( ' ' ),\n\t\tsize: BACKGROUND_INITIAL_ARRAY_VALUES.size.split( ' ' )\n\t};\n}\n\n/**\n * Extracts the first CSS image function (`linear-gradient`, `url`, etc.) from a raw CSS value string\n * and returns it separately along with the remaining string with the image function removed.\n *\n * Handles arbitrarily nested parentheses correctly (e.g. `rgba()` inside a gradient).\n * Only one image function is extracted per call — the caller is responsible for looping\n * if multiple image functions may be present.\n *\n * @param value The raw CSS value string to process.\n * @returns An object with `value` (the string with the image function removed) and\n *          `image` (the extracted function string, or `null` if none was found).\n *\n * @example\n * extractBackgroundImage( 'linear-gradient(red, blue) no-repeat' );\n * // → { value: ' no-repeat', image: 'linear-gradient(red, blue)' }\n */\nfunction extractBackgroundImage( value: string ): { value: string; image: string | null } {\n\tfor ( const imageFunction of IMAGE_FUNCTIONS ) {\n\t\tconst prefix = imageFunction + '(';\n\t\tconst firstIndex = value.indexOf( prefix );\n\n\t\tif ( firstIndex < 0 ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet acc = imageFunction;\n\t\tlet nesting = 0;\n\n\t\tfor ( let i = firstIndex + imageFunction.length; i < value.length; i++ ) {\n\t\t\tconst char = value[ i ];\n\n\t\t\tif ( char === '(' ) {\n\t\t\t\tnesting++;\n\t\t\t} else if ( char === ')' ) {\n\t\t\t\tnesting--;\n\t\t\t}\n\n\t\t\tacc += char;\n\n\t\t\tif ( nesting === 0 ) {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: value.slice( 0, firstIndex ) + value.slice( i + 1 ),\n\t\t\t\t\timage: acc\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\t// If no image functions were found, check if the value contains 'none', which is also a valid background-image value.\n\tif ( value.includes( 'none' ) ) {\n\t\treturn {\n\t\t\tvalue: value.replace( 'none', '' ),\n\t\t\timage: 'none'\n\t\t};\n\t}\n\n\treturn {\n\t\tvalue,\n\t\timage: null\n\t};\n}\n\n/**\n * Splits a CSS value string by commas that are at the top level (i.e. not inside parentheses).\n *\n * This is necessary because commas appear both as layer separators in the `background` shorthand\n * and as argument separators inside functions like `rgba()` or `linear-gradient()`.\n *\n * @param value The CSS value string to split.\n * @returns An array of trimmed top-level comma-separated segments.\n *\n * @example\n * splitByTopLevelCommas( 'linear-gradient(red, blue), center' );\n * // → [ 'linear-gradient(red, blue)', 'center' ]\n */\nfunction splitByTopLevelCommas( value: string ): Array<string> {\n\tconst parts: Array<string> = [];\n\tlet current = '';\n\tlet nesting = 0;\n\n\tfor ( const char of value ) {\n\t\tif ( char === '(' ) {\n\t\t\tnesting++;\n\t\t} else if ( char === ')' ) {\n\t\t\tnesting--;\n\t\t} else if ( char === ',' && nesting === 0 ) {\n\t\t\tparts.push( current.trim() );\n\t\t\tcurrent = '';\n\t\t\tcontinue;\n\t\t}\n\n\t\tcurrent += char;\n\t}\n\n\tif ( current.trim() ) {\n\t\tparts.push( current.trim() );\n\t}\n\n\treturn parts;\n}\n\n/**\n * Represents a normalized, structured form of the CSS `background` property.\n * Each longhand property is stored as an array of per-layer values, and `color` is stored separately\n * as it applies to the whole background and is placed in the last layer (per CSS spec).\n *\n * All properties are optional because the object may be populated from individual longhands\n * (e.g. only `background-color` set via the `background-color` property, without the full `background`\n * shorthand). When the `background` shorthand is parsed, all arrays are fully populated for every layer.\n */\ntype Background = {\n\trepeat?: Array<string>;\n\tposition?: Array<string>;\n\tsize?: Array<string>;\n\tattachment?: Array<string>;\n\timage?: Array<string>;\n\torigin?: Array<string>;\n\tclip?: Array<string>;\n\tcolor?: string;\n};\n\n/**\n * Represents a single CSS background layer as parsed from one comma-separated segment.\n * Every property always has a defined value — properties not explicitly set in the source CSS\n * are filled with their CSS initial values via `getDefaultBackgroundLayer`.\n */\ntype BackgroundLayer = {\n\tcolor?: string;\n\tattachment: string;\n\timage: string;\n\torigin: string;\n\tclip: string;\n\trepeat: Array<string>;\n\tposition: Array<string>;\n\tsize: Array<string>;\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/**\n * @module engine/view/styles/border\n */\n\nimport type {\n\tBoxStyleSides,\n\tStylesExtractor,\n\tStylesNormalizer,\n\tStylesReducer,\n\tStylesProcessor,\n\tStyles,\n\tStyleValue,\n\tStylePropertyDescriptor\n} from '../stylesmap.js';\n\nimport {\n\tgetShorthandStylesValues,\n\tgetBoxSidesStyleValueReducer,\n\tgetBoxSidesStyleValues,\n\tisLengthStyleValue,\n\tisLineStyleValue\n} from './utils.js';\n\n/**\n * Adds a border CSS styles processing rules.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addBorderStylesRules );\n * ```\n *\n * This rules merges all [border](https://developer.mozilla.org/en-US/docs/Web/CSS/border) styles notation shorthands:\n *\n * - border\n * - border-top\n * - border-right\n * - border-bottom\n * - border-left\n * - border-color\n * - border-style\n * - border-width\n *\n * and all corresponding longhand forms (like `border-top-color`, `border-top-style`, etc).\n *\n * It does not handle other shorthands (like `border-radius` or `border-image`).\n */\nexport function addBorderStylesRules( stylesProcessor: StylesProcessor ): void {\n\t// Normalized data format:\n\t// {\n\t// \tcolor: { top: 'red', right: 'red', bottom: 'red', left: 'red' },\n\t// \tstyle: { top: 'solid', right: 'solid', bottom: 'solid', left: 'solid' },\n\t// \twidth: { top: '1px', right: '1px', bottom: '1px', left: '1px' }\n\t// }\n\tstylesProcessor.setNormalizer( 'border', getBorderNormalizer() );\n\n\t// Border-position shorthands.\n\tstylesProcessor.setNormalizer( 'border-top', getBorderPositionNormalizer( 'top' ) );\n\tstylesProcessor.setNormalizer( 'border-right', getBorderPositionNormalizer( 'right' ) );\n\tstylesProcessor.setNormalizer( 'border-bottom', getBorderPositionNormalizer( 'bottom' ) );\n\tstylesProcessor.setNormalizer( 'border-left', getBorderPositionNormalizer( 'left' ) );\n\n\t// Border-property shorthands.\n\tstylesProcessor.setNormalizer( 'border-color', getBorderPropertyNormalizer( 'color' ) );\n\tstylesProcessor.setNormalizer( 'border-width', getBorderPropertyNormalizer( 'width' ) );\n\tstylesProcessor.setNormalizer( 'border-style', getBorderPropertyNormalizer( 'style' ) );\n\n\t// Border longhands.\n\tstylesProcessor.setNormalizer( 'border-top-color', getBorderPropertyPositionNormalizer( 'color', 'top' ) );\n\tstylesProcessor.setNormalizer( 'border-top-style', getBorderPropertyPositionNormalizer( 'style', 'top' ) );\n\tstylesProcessor.setNormalizer( 'border-top-width', getBorderPropertyPositionNormalizer( 'width', 'top' ) );\n\n\tstylesProcessor.setNormalizer( 'border-right-color', getBorderPropertyPositionNormalizer( 'color', 'right' ) );\n\tstylesProcessor.setNormalizer( 'border-right-style', getBorderPropertyPositionNormalizer( 'style', 'right' ) );\n\tstylesProcessor.setNormalizer( 'border-right-width', getBorderPropertyPositionNormalizer( 'width', 'right' ) );\n\n\tstylesProcessor.setNormalizer( 'border-bottom-color', getBorderPropertyPositionNormalizer( 'color', 'bottom' ) );\n\tstylesProcessor.setNormalizer( 'border-bottom-style', getBorderPropertyPositionNormalizer( 'style', 'bottom' ) );\n\tstylesProcessor.setNormalizer( 'border-bottom-width', getBorderPropertyPositionNormalizer( 'width', 'bottom' ) );\n\n\tstylesProcessor.setNormalizer( 'border-left-color', getBorderPropertyPositionNormalizer( 'color', 'left' ) );\n\tstylesProcessor.setNormalizer( 'border-left-style', getBorderPropertyPositionNormalizer( 'style', 'left' ) );\n\tstylesProcessor.setNormalizer( 'border-left-width', getBorderPropertyPositionNormalizer( 'width', 'left' ) );\n\n\tstylesProcessor.setExtractor( 'border-top', getBorderPositionExtractor( 'top' ) );\n\tstylesProcessor.setExtractor( 'border-right', getBorderPositionExtractor( 'right' ) );\n\tstylesProcessor.setExtractor( 'border-bottom', getBorderPositionExtractor( 'bottom' ) );\n\tstylesProcessor.setExtractor( 'border-left', getBorderPositionExtractor( 'left' ) );\n\n\tstylesProcessor.setExtractor( 'border-top-color', 'border.color.top' );\n\tstylesProcessor.setExtractor( 'border-right-color', 'border.color.right' );\n\tstylesProcessor.setExtractor( 'border-bottom-color', 'border.color.bottom' );\n\tstylesProcessor.setExtractor( 'border-left-color', 'border.color.left' );\n\n\tstylesProcessor.setExtractor( 'border-top-width', 'border.width.top' );\n\tstylesProcessor.setExtractor( 'border-right-width', 'border.width.right' );\n\tstylesProcessor.setExtractor( 'border-bottom-width', 'border.width.bottom' );\n\tstylesProcessor.setExtractor( 'border-left-width', 'border.width.left' );\n\n\tstylesProcessor.setExtractor( 'border-top-style', 'border.style.top' );\n\tstylesProcessor.setExtractor( 'border-right-style', 'border.style.right' );\n\tstylesProcessor.setExtractor( 'border-bottom-style', 'border.style.bottom' );\n\tstylesProcessor.setExtractor( 'border-left-style', 'border.style.left' );\n\n\tstylesProcessor.setReducer( 'border-color', getBoxSidesStyleValueReducer( 'border-color' ) );\n\tstylesProcessor.setReducer( 'border-style', getBoxSidesStyleValueReducer( 'border-style' ) );\n\tstylesProcessor.setReducer( 'border-width', getBoxSidesStyleValueReducer( 'border-width' ) );\n\tstylesProcessor.setReducer( 'border-top', getBorderPositionReducer( 'top' ) );\n\tstylesProcessor.setReducer( 'border-right', getBorderPositionReducer( 'right' ) );\n\tstylesProcessor.setReducer( 'border-bottom', getBorderPositionReducer( 'bottom' ) );\n\tstylesProcessor.setReducer( 'border-left', getBorderPositionReducer( 'left' ) );\n\tstylesProcessor.setReducer( 'border', getBorderReducer() );\n\n\tstylesProcessor.setStyleRelation( 'border', [\n\t\t'border-color', 'border-style', 'border-width',\n\t\t'border-top', 'border-right', 'border-bottom', 'border-left',\n\t\t'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color',\n\t\t'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style',\n\t\t'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width'\n\t] );\n\n\tstylesProcessor.setStyleRelation( 'border-color', [\n\t\t'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color'\n\t] );\n\tstylesProcessor.setStyleRelation( 'border-style', [\n\t\t'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style'\n\t] );\n\tstylesProcessor.setStyleRelation( 'border-width', [\n\t\t'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width'\n\t] );\n\n\tstylesProcessor.setStyleRelation( 'border-top', [ 'border-top-color', 'border-top-style', 'border-top-width' ] );\n\tstylesProcessor.setStyleRelation( 'border-right', [ 'border-right-color', 'border-right-style', 'border-right-width' ] );\n\tstylesProcessor.setStyleRelation( 'border-bottom', [ 'border-bottom-color', 'border-bottom-style', 'border-bottom-width' ] );\n\tstylesProcessor.setStyleRelation( 'border-left', [ 'border-left-color', 'border-left-style', 'border-left-width' ] );\n}\n\nfunction getBorderNormalizer(): StylesNormalizer {\n\treturn value => {\n\t\tconst { color, style, width } = normalizeBorderShorthand( value );\n\n\t\treturn {\n\t\t\tpath: 'border',\n\t\t\tvalue: {\n\t\t\t\tcolor: getBoxSidesStyleValues( color ),\n\t\t\t\tstyle: getBoxSidesStyleValues( style ),\n\t\t\t\twidth: getBoxSidesStyleValues( width )\n\t\t\t}\n\t\t};\n\t};\n}\n\nfunction getBorderPositionNormalizer( side: string ): StylesNormalizer {\n\treturn value => {\n\t\tconst { color, style, width } = normalizeBorderShorthand( value );\n\n\t\tconst border: Record<string, StyleValue> = {};\n\n\t\tif ( color !== undefined ) {\n\t\t\tborder.color = { [ side ]: color };\n\t\t}\n\n\t\tif ( style !== undefined ) {\n\t\t\tborder.style = { [ side ]: style };\n\t\t}\n\n\t\tif ( width !== undefined ) {\n\t\t\tborder.width = { [ side ]: width };\n\t\t}\n\n\t\treturn {\n\t\t\tpath: 'border',\n\t\t\tvalue: border\n\t\t};\n\t};\n}\n\nfunction getBorderPropertyNormalizer( propertyName: string ): StylesNormalizer {\n\treturn value => {\n\t\treturn {\n\t\t\tpath: 'border',\n\t\t\tvalue: toBorderPropertyShorthand( value, propertyName )\n\t\t};\n\t};\n}\n\nfunction toBorderPropertyShorthand( value: string, property: string ): Record<string, BoxStyleSides> {\n\treturn {\n\t\t[ property ]: getBoxSidesStyleValues( value )\n\t};\n}\n\nfunction getBorderPropertyPositionNormalizer( property: string, side: keyof BoxStyleSides ): StylesNormalizer {\n\treturn value => {\n\t\treturn {\n\t\t\tpath: 'border',\n\t\t\tvalue: {\n\t\t\t\t[ property ]: {\n\t\t\t\t\t[ side ]: value\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t};\n}\n\nfunction getBorderPositionExtractor( which: string ): StylesExtractor {\n\treturn ( name, styles ) => {\n\t\tif ( styles.border ) {\n\t\t\treturn extractBorderPosition( styles.border, which );\n\t\t}\n\t};\n}\n\nfunction extractBorderPosition( border: any, which: string ) {\n\tconst value: StyleValue = {};\n\n\tif ( border.width && border.width[ which ] ) {\n\t\tvalue.width = border.width[ which ];\n\t}\n\n\tif ( border.style && border.style[ which ] ) {\n\t\tvalue.style = border.style[ which ];\n\t}\n\n\tif ( border.color && border.color[ which ] ) {\n\t\tvalue.color = border.color[ which ];\n\t}\n\n\treturn value;\n}\n\nfunction normalizeBorderShorthand( string: string ) {\n\tconst result: {\n\t\twidth?: string;\n\t\tstyle?: string;\n\t\tcolor?: string;\n\t} = {};\n\n\tconst parts = getShorthandStylesValues( string );\n\n\tfor ( const part of parts ) {\n\t\tif ( isLengthStyleValue( part ) || /thin|medium|thick/.test( part ) ) {\n\t\t\tresult.width = part;\n\t\t} else if ( isLineStyleValue( part ) ) {\n\t\t\tresult.style = part;\n\t\t} else {\n\t\t\tresult.color = part;\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * The border reducer factory.\n *\n * It tries to produce the most optimal output for the specified styles.\n *\n * For a border style:\n *\n * ```css\n * style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n * ```\n *\n * It will produce: `border-style: solid`.\n * For a border style and color:\n *\n * ```css\n * color: {top: \"#ff0\", bottom: \"#ff0\", right: \"#ff0\", left: \"#ff0\"}\n * style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n * ```\n *\n * It will produce: `border-color: #ff0; border-style: solid`.\n * If all border parameters are specified:\n *\n * ```css\n * color: {top: \"#ff0\", bottom: \"#ff0\", right: \"#ff0\", left: \"#ff0\"}\n * style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n * width: {top: \"2px\", bottom: \"2px\", right: \"2px\", left: \"2px\"}\n * ```\n *\n * It will combine everything into a single property: `border: 2px solid #ff0`.\n *\n * The definitions are merged only if all border selectors have the same values.\n */\nfunction getBorderReducer(): StylesReducer {\n\treturn value => {\n\t\tconst topStyles = extractBorderPosition( value, 'top' );\n\t\tconst rightStyles = extractBorderPosition( value, 'right' );\n\t\tconst bottomStyles = extractBorderPosition( value, 'bottom' );\n\t\tconst leftStyles = extractBorderPosition( value, 'left' );\n\n\t\tconst borderStyles = [ topStyles, rightStyles, bottomStyles, leftStyles ];\n\n\t\tconst borderStylesByType = {\n\t\t\twidth: getReducedStyleValueForType( borderStyles, 'width' ),\n\t\t\tstyle: getReducedStyleValueForType( borderStyles, 'style' ),\n\t\t\tcolor: getReducedStyleValueForType( borderStyles, 'color' )\n\t\t};\n\n\t\t// Try reducing to a single `border:` property.\n\t\tconst reducedBorderStyle = reduceBorderPosition( borderStylesByType, 'all' );\n\n\t\tif ( reducedBorderStyle.length ) {\n\t\t\treturn reducedBorderStyle;\n\t\t}\n\n\t\t// Try reducing to `border-style:`, `border-width:`, `border-color:` properties.\n\t\tconst reducedStyleTypes = Object.entries( borderStylesByType ).reduce( ( reducedStyleTypes, [ type, value ] ) => {\n\t\t\tif ( value ) {\n\t\t\t\treducedStyleTypes.push( [ `border-${ type }`, value ] );\n\n\t\t\t\t// Remove it from the full set to not include it in the most specific properties later.\n\t\t\t\tborderStyles.forEach( style => delete style[ type ] );\n\t\t\t}\n\n\t\t\treturn reducedStyleTypes;\n\t\t}, [] as Array<StylePropertyDescriptor> );\n\n\t\t// The reduced properties (by type) and all that remains that could not be reduced.\n\t\treturn [\n\t\t\t...reducedStyleTypes,\n\t\t\t...reduceBorderPosition( topStyles, 'top' ),\n\t\t\t...reduceBorderPosition( rightStyles, 'right' ),\n\t\t\t...reduceBorderPosition( bottomStyles, 'bottom' ),\n\t\t\t...reduceBorderPosition( leftStyles, 'left' )\n\t\t];\n\t};\n\n\t/**\n\t * @param styles The array of objects with `style`, `color`, `width` properties.\n\t */\n\tfunction getReducedStyleValueForType( styles: Array<Styles>, type: 'width' | 'style' | 'color' ) {\n\t\treturn styles\n\t\t\t.map( style => style[ type ] as any )\n\t\t\t.reduce( ( result, style ) => result == style ? result : null );\n\t}\n}\n\nfunction getBorderPositionReducer( which: keyof BoxStyleSides | 'all' ): StylesReducer {\n\treturn value => reduceBorderPosition( value, which );\n}\n\n/**\n * Returns an array with reduced border styles depending on the specified values.\n *\n * If all border properties (width, style, color) are specified, the returned selector will be\n * merged into a group: `border-*: [width] [style] [color]`.\n *\n * Otherwise, the specific definitions will be returned: `border-(width|style|color)-*: [value]`.\n *\n * @param value Styles if defined.\n * @param which The border position.\n */\nfunction reduceBorderPosition( value: any, which: keyof BoxStyleSides | 'all' ): Array<StylePropertyDescriptor> {\n\tconst borderTypes = [];\n\n\tif ( value && ( value.width ) ) {\n\t\tborderTypes.push( 'width' );\n\t}\n\n\tif ( value && ( value.style ) ) {\n\t\tborderTypes.push( 'style' );\n\t}\n\n\tif ( value && ( value.color ) ) {\n\t\tborderTypes.push( 'color' );\n\t}\n\n\tif ( borderTypes.length == 3 ) {\n\t\tconst borderValue = borderTypes.map( item => value[ item ] ).join( ' ' );\n\n\t\treturn [\n\t\t\twhich == 'all' ? [ 'border', borderValue ] : [ `border-${ which }`, borderValue ]\n\t\t];\n\t}\n\n\t// We are unable to reduce to a single `border:` property.\n\tif ( which == 'all' ) {\n\t\treturn [];\n\t}\n\n\treturn borderTypes.map( type => {\n\t\treturn [ `border-${ which }-${ type }`, value[ type ] as string ];\n\t} );\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/**\n * @module engine/view/styles/margin\n */\n\nimport type { StylesProcessor } from '../stylesmap.js';\nimport { getPositionStyleShorthandNormalizer, getBoxSidesStyleValueReducer } from './utils.js';\n\n/**\n * Adds a margin CSS styles processing rules.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addMarginStylesRules );\n * ```\n */\nexport function addMarginStylesRules( stylesProcessor: StylesProcessor ): void {\n\t// Normalized data format:\n\t// {\n\t// \ttop: '1px',\n\t// \tright: '2px',\n\t// \tbottom: '3px',\n\t// \tleft: '4px'\n\t// }\n\tstylesProcessor.setNormalizer( 'margin', getPositionStyleShorthandNormalizer( 'margin' ) );\n\n\tstylesProcessor.setNormalizer( 'margin-top', value => ( { path: 'margin.top', value } ) );\n\tstylesProcessor.setNormalizer( 'margin-right', value => ( { path: 'margin.right', value } ) );\n\tstylesProcessor.setNormalizer( 'margin-bottom', value => ( { path: 'margin.bottom', value } ) );\n\tstylesProcessor.setNormalizer( 'margin-left', value => ( { path: 'margin.left', value } ) );\n\n\tstylesProcessor.setReducer( 'margin', getBoxSidesStyleValueReducer( 'margin' ) );\n\n\tstylesProcessor.setStyleRelation( 'margin', [ 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ] );\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/**\n * @module engine/view/styles/padding\n */\n\nimport type { StylesProcessor } from '../stylesmap.js';\nimport { getPositionStyleShorthandNormalizer, getBoxSidesStyleValueReducer } from './utils.js';\n\n/**\n * Adds a padding CSS styles processing rules.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addPaddingStylesRules );\n * ```\n */\nexport function addPaddingStylesRules( stylesProcessor: StylesProcessor ): void {\n\t// Normalized data format:\n\t// {\n\t// \ttop: '1px',\n\t// \tright: '2px',\n\t// \tbottom: '3px',\n\t// \tleft: '4px'\n\t// }\n\tstylesProcessor.setNormalizer( 'padding', getPositionStyleShorthandNormalizer( 'padding' ) );\n\n\tstylesProcessor.setNormalizer( 'padding-top', value => ( { path: 'padding.top', value } ) );\n\tstylesProcessor.setNormalizer( 'padding-right', value => ( { path: 'padding.right', value } ) );\n\tstylesProcessor.setNormalizer( 'padding-bottom', value => ( { path: 'padding.bottom', value } ) );\n\tstylesProcessor.setNormalizer( 'padding-left', value => ( { path: 'padding.left', value } ) );\n\n\tstylesProcessor.setReducer( 'padding', getBoxSidesStyleValueReducer( 'padding' ) );\n\n\tstylesProcessor.setStyleRelation( 'padding', [ 'padding-top', 'padding-right', 'padding-bottom', 'padding-left' ] );\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/**\n * @module engine/dev-utils/view\n */\n\n/**\n * Collection of methods for manipulating the {@link module:engine/view/view view} for testing purposes.\n */\n\nimport { EditingView } from '../view/view.js';\nimport { ViewDocument } from '../view/document.js';\nimport { ViewDocumentFragment } from '../view/documentfragment.js';\nimport { XmlDataProcessor } from '../dataprocessor/xmldataprocessor.js';\nimport { ViewElement } from '../view/element.js';\nimport { ViewDocumentSelection } from '../view/documentselection.js';\nimport { ViewRange } from '../view/range.js';\nimport { ViewPosition } from '../view/position.js';\nimport { ViewAttributeElement } from '../view/attributeelement.js';\nimport { ViewContainerElement } from '../view/containerelement.js';\nimport { ViewEmptyElement } from '../view/emptyelement.js';\nimport { ViewUIElement } from '../view/uielement.js';\nimport { ViewRawElement } from '../view/rawelement.js';\nimport { StylesProcessor } from '../view/stylesmap.js';\n\nimport { type ViewNode } from '../view/node.js';\nimport { type ViewText } from '../view/text.js';\nimport { type ViewDomConverter } from '../view/domconverter.js';\n\ntype GetViewDataOptions = {\n\twithoutSelection?: boolean;\n\trootName?: string;\n\tshowType?: boolean;\n\tshowPriority?: boolean;\n\trenderUIElements?: boolean;\n\trenderRawElements?: boolean;\n\tdomConverter?: ViewDomConverter;\n\tskipListItemIds?: boolean;\n};\n\ntype GetViewData = {\n\t( view: EditingView, options?: GetViewDataOptions ): string;\n\t_stringify: typeof _stringifyView;\n};\n\ntype SetViewDataOptions = {\n\trootName?: string;\n};\n\ntype SetViewData = {\n\t( view: EditingView, data: string, options?: SetViewDataOptions ): void;\n\t_parse: typeof _parseView;\n};\n\nconst ELEMENT_RANGE_START_TOKEN = '[';\nconst ELEMENT_RANGE_END_TOKEN = ']';\nconst TEXT_RANGE_START_TOKEN = '{';\nconst TEXT_RANGE_END_TOKEN = '}';\nconst allowedTypes = {\n\t'container': ViewContainerElement,\n\t'attribute': ViewAttributeElement,\n\t'empty': ViewEmptyElement,\n\t'ui': ViewUIElement,\n\t'raw': ViewRawElement\n};\n// Returns simplified implementation of {@link module:engine/view/domconverter~ViewDomConverter#setContentOf ViewDomConverter.setContentOf}\n// method. Used to render UIElement and RawElement.\nconst domConverterStub: ViewDomConverter = {\n\tsetContentOf: ( node: any, html: string ) => {\n\t\tnode.innerHTML = html;\n\t}\n} as any;\n\n/**\n * Writes the content of the {@link module:engine/view/document~ViewDocument document} to an HTML-like string.\n *\n * @param view The view to stringify.\n * @param options.withoutSelection Whether to write the selection. When set to `true`, the selection will\n * not be included in the returned string.\n * @param options.rootName The name of the root from which the data should be stringified. If not provided,\n * the default `main` name will be used.\n * @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n * instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n * @param options.showPriority When set to `true`, the attribute element's priority will be printed\n * (`<span view-priority=\"12\">`, `<b view-priority=\"10\">`).\n * @param options.renderUIElements When set to `true`, the inner content of each\n * {@link module:engine/view/uielement~ViewUIElement} will be printed.\n * @param options.renderRawElements When set to `true`, the inner content of each\n * {@link module:engine/view/rawelement~ViewRawElement} will be printed.\n * @param options.domConverter When set to an actual {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n * instance, it lets the conversion go through exactly the same flow the editing view is going through,\n * i.e. with view data filtering. Otherwise the simple stub is used.\n * @returns The stringified data.\n */\nexport const _getViewData: GetViewData = /* #__PURE__ */ ( () => {\n\tconst getViewData = function(\n\t\tview: EditingView,\n\t\toptions: GetViewDataOptions = {}\n\t): string {\n\t\tif ( !( view instanceof EditingView ) ) {\n\t\t\tthrow new TypeError( 'View needs to be an instance of module:engine/view/view~EditingView.' );\n\t\t}\n\n\t\tconst document = view.document;\n\t\tconst withoutSelection = !!options.withoutSelection;\n\t\tconst rootName = options.rootName || 'main';\n\t\tconst root = document.getRoot( rootName )!;\n\t\tconst stringifyOptions = {\n\t\t\tshowType: options.showType,\n\t\t\tshowPriority: options.showPriority,\n\t\t\trenderUIElements: options.renderUIElements,\n\t\t\trenderRawElements: options.renderRawElements,\n\t\t\tignoreRoot: true,\n\t\t\tdomConverter: options.domConverter,\n\t\t\tskipListItemIds: options.skipListItemIds\n\t\t};\n\n\t\treturn withoutSelection ?\n\t\t\tgetViewData._stringify( root, null, stringifyOptions ) :\n\t\t\tgetViewData._stringify( root, document.selection, stringifyOptions );\n\t} as GetViewData;\n\n\t// Set stringify as getData private method - needed for testing/spying.\n\tgetViewData._stringify = _stringifyView;\n\n\treturn getViewData;\n} )();\n\n/**\n * Sets the content of a view {@link module:engine/view/document~ViewDocument document} provided as an HTML-like string.\n *\n * @param data An HTML-like string to write into the document.\n * @param options.rootName The root name where _parseViewd data will be stored. If not provided,\n * the default `main` name will be used.\n */\nexport const _setViewData: SetViewData = /* #__PURE__ */ ( () => {\n\tconst setViewData = function(\n\t\tview: EditingView,\n\t\tdata: string,\n\t\toptions: SetViewDataOptions = {}\n\t): void {\n\t\tif ( !( view instanceof EditingView ) ) {\n\t\t\tthrow new TypeError( 'View needs to be an instance of module:engine/view/view~EditingView.' );\n\t\t}\n\n\t\tconst document = view.document;\n\t\tconst rootName = options.rootName || 'main';\n\t\tconst root = document.getRoot( rootName )!;\n\n\t\tview.change( writer => {\n\t\t\tconst result: any = setViewData._parse( data, { rootElement: root } );\n\n\t\t\tif ( result.view && result.selection ) {\n\t\t\t\twriter.setSelection( result.selection );\n\t\t\t}\n\t\t} );\n\t} as SetViewData;\n\n\t// Set _parseView as _setViewData private method - needed for testing/spying.\n\tsetViewData._parse = _parseView;\n\n\treturn setViewData;\n} )();\n\n/**\n * Converts view elements to HTML-like string representation.\n *\n * A root element can be provided as {@link module:engine/view/text~ViewText text}:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * stringify( text ); // 'foobar'\n * ```\n *\n * or as an {@link module:engine/view/element~ViewElement element}:\n *\n * ```ts\n * const element = downcastWriter.createElement( 'p', null, downcastWriter.createText( 'foobar' ) );\n * stringify( element ); // '<p>foobar</p>'\n * ```\n *\n * or as a {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const b = downcastWriter.createElement( 'b', { name: 'test' }, text );\n * const p = downcastWriter.createElement( 'p', { style: 'color:red;' } );\n * const fragment = downcastWriter.createDocumentFragment( [ p, b ] );\n *\n * stringify( fragment ); // '<p style=\"color:red;\"></p><b name=\"test\">foobar</b>'\n * ```\n *\n * Additionally, a {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance can be provided.\n * Ranges from the selection will then be included in the output data.\n * If a range position is placed inside the element node, it will be represented with `[` and `]`:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const b = downcastWriter.createElement( 'b', null, text );\n * const p = downcastWriter.createElement( 'p', null, b );\n * const selection = downcastWriter.createSelection(\n * \tdowncastWriter.createRangeIn( p )\n * );\n *\n * stringify( p, selection ); // '<p>[<b>foobar</b>]</p>'\n * ```\n *\n * If a range is placed inside the text node, it will be represented with `{` and `}`:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const b = downcastWriter.createElement( 'b', null, text );\n * const p = downcastWriter.createElement( 'p', null, b );\n * const selection = downcastWriter.createSelection(\n * \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 1 ), downcastWriter.createPositionAt( text, 5 ) )\n * );\n *\n * stringify( p, selection ); // '<p><b>f{ooba}r</b></p>'\n * ```\n *\n * ** Note: **\n * It is possible to unify selection markers to `[` and `]` for both (inside and outside text)\n * by setting the `sameSelectionCharacters=true` option. It is mainly used when the view stringify option is used by\n * model utilities.\n *\n * Multiple ranges are supported:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const selection = downcastWriter.createSelection( [\n * \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 0 ), downcastWriter.createPositionAt( text, 1 ) ),\n * \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 3 ), downcastWriter.createPositionAt( text, 5 ) )\n * ] );\n *\n * stringify( text, selection ); // '{f}oo{ba}r'\n * ```\n *\n * A {@link module:engine/view/range~ViewRange range} or {@link module:engine/view/position~ViewPosition position} instance can be provided\n * instead of the {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance. If a range instance\n * is provided, it will be converted to a selection containing this range. If a position instance is provided, it will\n * be converted to a selection containing one range collapsed at this position.\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const range = downcastWriter.createRange( downcastWriter.createPositionAt( text, 0 ), downcastWriter.createPositionAt( text, 1 ) );\n * const position = downcastWriter.createPositionAt( text, 3 );\n *\n * stringify( text, range ); // '{f}oobar'\n * stringify( text, position ); // 'foo{}bar'\n * ```\n *\n * An additional `options` object can be provided.\n * If `options.showType` is set to `true`, element's types will be\n * presented for {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements},\n * {@link module:engine/view/containerelement~ViewContainerElement container elements}\n * {@link module:engine/view/emptyelement~ViewEmptyElement empty elements}\n * and {@link module:engine/view/uielement~ViewUIElement UI elements}:\n *\n * ```ts\n * const attribute = downcastWriter.createAttributeElement( 'b' );\n * const container = downcastWriter.createContainerElement( 'p' );\n * const empty = downcastWriter.createEmptyElement( 'img' );\n * const ui = downcastWriter.createUIElement( 'span' );\n * getData( attribute, null, { showType: true } ); // '<attribute:b></attribute:b>'\n * getData( container, null, { showType: true } ); // '<container:p></container:p>'\n * getData( empty, null, { showType: true } ); // '<empty:img></empty:img>'\n * getData( ui, null, { showType: true } ); // '<ui:span></ui:span>'\n * ```\n *\n * If `options.showPriority` is set to `true`, a priority will be displayed for all\n * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements}.\n *\n * ```ts\n * const attribute = downcastWriter.createAttributeElement( 'b' );\n * attribute._priority = 20;\n * getData( attribute, null, { showPriority: true } ); // <b view-priority=\"20\"></b>\n * ```\n *\n * If `options.showAttributeElementId` is set to `true`, the attribute element's id will be displayed for all\n * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements} that have it set.\n *\n * ```ts\n * const attribute = downcastWriter.createAttributeElement( 'span' );\n * attribute._id = 'marker:foo';\n * getData( attribute, null, { showAttributeElementId: true } ); // <span view-id=\"marker:foo\"></span>\n * ```\n *\n * @param node The node to stringify.\n * @param selectionOrPositionOrRange A selection instance whose ranges will be included in the returned string data.\n * If a range instance is provided, it will be converted to a selection containing this range. If a position instance\n * is provided, it will be converted to a selection containing one range collapsed at this position.\n * @param options An object with additional options.\n * @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n * instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n * @param options.showPriority When set to `true`,  the attribute element's priority will be printed\n * (`<span view-priority=\"12\">`, `<b view-priority=\"10\">`).\n * @param options.showAttributeElementId When set to `true`, attribute element's id will be printed\n * (`<span id=\"marker:foo\">`).\n * @param options.ignoreRoot When set to `true`, the root's element opening and closing will not be printed.\n * Mainly used by the `getData` function to ignore the {@link module:engine/view/document~ViewDocument document's} root element.\n * @param options.sameSelectionCharacters When set to `true`, the selection inside the text will be marked as\n *  `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both will be marked as `[` and `]` only.\n * @param options.renderUIElements When set to `true`, the inner content of each\n * {@link module:engine/view/uielement~ViewUIElement} will be printed.\n * @param options.renderRawElements When set to `true`, the inner content of each\n * {@link module:engine/view/rawelement~ViewRawElement} will be printed.\n * @param options.domConverter When set to an actual {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n * instance, it lets the conversion go through exactly the same flow the editing view is going through,\n * i.e. with view data filtering. Otherwise the simple stub is used.\n * @returns An HTML-like string representing the view.\n */\nexport function _stringifyView(\n\tnode: ViewNode | ViewDocumentFragment,\n\tselectionOrPositionOrRange: ViewDocumentSelection | ViewPosition | ViewRange | null = null,\n\toptions: {\n\t\tshowType?: boolean;\n\t\tshowPriority?: boolean;\n\t\tshowAttributeElementId?: boolean;\n\t\tignoreRoot?: boolean;\n\t\tsameSelectionCharacters?: boolean;\n\t\trenderUIElements?: boolean;\n\t\trenderRawElements?: boolean;\n\t\tdomConverter?: ViewDomConverter;\n\t\tskipListItemIds?: boolean;\n\t} = {}\n): string {\n\tlet selection;\n\n\tif (\n\t\tselectionOrPositionOrRange instanceof ViewPosition ||\n\t\tselectionOrPositionOrRange instanceof ViewRange\n\t) {\n\t\tselection = new ViewDocumentSelection( selectionOrPositionOrRange );\n\t} else {\n\t\tselection = selectionOrPositionOrRange;\n\t}\n\n\tconst viewStringify = new ViewStringify( node, selection, options );\n\n\treturn viewStringify.stringify();\n}\n\n/**\n * Parses an HTML-like string and returns a view tree.\n * A simple string will be converted to a {@link module:engine/view/text~ViewText text} node:\n *\n * ```ts\n * _parseView( 'foobar' ); // Returns an instance of text.\n * ```\n *\n * {@link module:engine/view/element~ViewElement Elements} will be _parseViewd with attributes as children:\n *\n * ```ts\n * _parseView( '<b name=\"baz\">foobar</b>' ); // Returns an instance of element with the `baz` attribute and a text child node.\n * ```\n *\n * Multiple nodes provided on root level will be converted to a\n * {@link module:engine/view/documentfragment~ViewDocumentFragment document fragment}:\n *\n * ```ts\n * _parseView( '<b>foo</b><i>bar</i>' ); // Returns a document fragment with two child elements.\n * ```\n *\n * The method can _parseView multiple {@link module:engine/view/range~ViewRange ranges} provided in string data and return a\n * {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance containing these ranges. Ranges placed inside\n * {@link module:engine/view/text~ViewText text} nodes should be marked using `{` and `}` brackets:\n *\n * ```ts\n * const { text, selection } = _parseView( 'f{ooba}r' );\n * ```\n *\n * Ranges placed outside text nodes should be marked using `[` and `]` brackets:\n *\n * ```ts\n * const { root, selection } = _parseView( '<p>[<b>foobar</b>]</p>' );\n * ```\n *\n * ** Note: **\n * It is possible to unify selection markers to `[` and `]` for both (inside and outside text)\n * by setting `sameSelectionCharacters=true` option. It is mainly used when the view _parseView option is used by model utilities.\n *\n * Sometimes there is a need for defining the order of ranges inside the created selection. This can be achieved by providing\n * the range order array as an additional parameter:\n *\n * ```ts\n * const { root, selection } = _parseView( '{fo}ob{ar}{ba}z', { order: [ 2, 3, 1 ] } );\n * ```\n *\n * In the example above, the first range (`{fo}`) will be added to the selection as the second one, the second range (`{ar}`) will be\n * added as the third and the third range (`{ba}`) will be added as the first one.\n *\n * If the selection's last range should be added as a backward one\n * (so the {@link module:engine/view/documentselection~ViewDocumentSelection#anchor selection anchor} is represented\n * by the `end` position and {@link module:engine/view/documentselection~ViewDocumentSelection#focus selection focus} is\n * represented by the `start` position), use the `lastRangeBackward` flag:\n *\n * ```ts\n * const { root, selection } = _parseView( `{foo}bar{baz}`, { lastRangeBackward: true } );\n * ```\n *\n * Some more examples and edge cases:\n *\n * ```ts\n * // Returns an empty document fragment.\n * _parseView( '' );\n *\n * // Returns an empty document fragment and a collapsed selection.\n * const { root, selection } = _parseView( '[]' );\n *\n * // Returns an element and a selection that is placed inside the document fragment containing that element.\n * const { root, selection } = _parseView( '[<a></a>]' );\n * ```\n *\n * @param data An HTML-like string to be parsed.\n * @param options.order An array with the order of parsed ranges added to the returned\n * {@link module:engine/view/documentselection~ViewDocumentSelection Selection} instance. Each element should represent the\n * desired position of each range in the selection instance. For example: `[2, 3, 1]` means that the first range will be\n * placed as the second, the second as the third and the third as the first.\n * @param options.lastRangeBackward If set to `true`, the last range will be added as backward to the returned\n * {@link module:engine/view/documentselection~ViewDocumentSelection selection} instance.\n * @param options.rootElement The default root to use when parsing elements.\n * When set to `null`, the root element will be created automatically. If set to\n * {@link module:engine/view/element~ViewElement Element} or\n * {@link module:engine/view/documentfragment~ViewDocumentFragment DocumentFragment},\n * this node will be used as the root for all parsed nodes.\n * @param options.sameSelectionCharacters When set to `false`, the selection inside the text should be marked using\n * `{` and `}` and the selection outside the ext using `[` and `]`. When set to `true`, both should be marked with `[` and `]` only.\n * @returns Returns the parsed view node or an object with two fields: `view` and `selection` when selection ranges were included in the\n * data to parse.\n */\nexport function _parseView(\n\tdata: string,\n\toptions: {\n\t\torder?: Array<number>;\n\t\tlastRangeBackward?: boolean;\n\t\trootElement?: ViewElement | ViewDocumentFragment;\n\t\tsameSelectionCharacters?: boolean;\n\t\tinlineObjectElements?: Array<string>;\n\t} = {}\n): ViewNode | ViewDocumentFragment | { view: ViewNode | ViewDocumentFragment; selection: ViewDocumentSelection } {\n\tconst viewDocument = new ViewDocument( new StylesProcessor() );\n\n\toptions.order = options.order || [];\n\tconst rangeParser = new RangeParser( {\n\t\tsameSelectionCharacters: options.sameSelectionCharacters\n\t} );\n\tconst processor = new XmlDataProcessor( viewDocument, {\n\t\tnamespaces: Object.keys( allowedTypes )\n\t} );\n\n\tif ( options.inlineObjectElements ) {\n\t\tprocessor.domConverter.inlineObjectElements.push( ...options.inlineObjectElements );\n\t}\n\n\t// Convert data to view.\n\tlet view: ViewDocumentFragment | ViewNode = processor.toView( data )!;\n\n\t// At this point we have a view tree with Elements that could have names like `attribute:b:1`. In the next step\n\t// we need to parse Element's names and convert them to ViewAttributeElements and ViewContainerElements.\n\tview = _convertViewElements( view );\n\n\t// If custom root is provided - move all nodes there.\n\tif ( options.rootElement ) {\n\t\tconst root = options.rootElement;\n\t\tconst nodes = ( view as any )._removeChildren( 0, ( view as any ).childCount );\n\n\t\troot._removeChildren( 0, root.childCount );\n\t\troot._appendChild( nodes );\n\n\t\tview = root;\n\t}\n\n\t// Parse ranges included in view text nodes.\n\tconst ranges = rangeParser._parseView( view, options.order );\n\n\t// If only one element is returned inside DocumentFragment - return that element.\n\tif ( view.is( 'documentFragment' ) && view.childCount === 1 ) {\n\t\tview = view.getChild( 0 );\n\t}\n\n\t// When ranges are present - return object containing view, and selection.\n\tif ( ranges.length ) {\n\t\tconst selection = new ViewDocumentSelection( ranges, { backward: !!options.lastRangeBackward } );\n\n\t\treturn {\n\t\t\tview,\n\t\t\tselection\n\t\t};\n\t}\n\n\t// If single element is returned without selection - remove it from parent and return detached element.\n\tif ( view.parent ) {\n\t\tview._remove();\n\t}\n\n\treturn view;\n}\n\n/**\n * Private helper class used for converting ranges represented as text inside view {@link module:engine/view/text~ViewText text nodes}.\n */\nclass RangeParser {\n\tpublic sameSelectionCharacters: boolean;\n\tprivate _positions!: Array<{ bracket: string; position: ViewPosition }>;\n\n\t/**\n\t * Creates a range parser instance.\n\t *\n\t * @param options The range parser configuration.\n\t * @param options.sameSelectionCharacters When set to `true`, the selection inside the text is marked as\n\t * `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both are marked as `[` and `]`.\n\t */\n\tconstructor( options: { sameSelectionCharacters?: boolean } ) {\n\t\tthis.sameSelectionCharacters = !!options.sameSelectionCharacters;\n\t}\n\n\t/**\n\t * Parses the view and returns ranges represented inside {@link module:engine/view/text~ViewText text nodes}.\n\t * The method will remove all occurrences of `{`, `}`, `[` and `]` from found text nodes. If a text node is empty after\n\t * the process, it will be removed, too.\n\t *\n\t * @param node The starting node.\n\t * @param order The order of ranges. Each element should represent the desired position of the range after\n\t * sorting. For example: `[2, 3, 1]` means that the first range will be placed as the second, the second as the third and the third\n\t * as the first.\n\t * @returns An array with ranges found.\n\t */\n\tpublic _parseView( node: ViewNode | ViewDocumentFragment, order: Array<number> ): Array<ViewRange> {\n\t\tthis._positions = [];\n\n\t\t// Remove all range brackets from view nodes and save their positions.\n\t\tthis._getPositions( node );\n\n\t\t// Create ranges using gathered positions.\n\t\tlet ranges = this._createRanges();\n\n\t\t// Sort ranges if needed.\n\t\tif ( order.length ) {\n\t\t\tif ( order.length != ranges.length ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Parse error - there are ${ ranges.length } ranges found, but ranges order array contains ${ order.length } elements.`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tranges = this._sortRanges( ranges, order );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Gathers positions of brackets inside the view tree starting from the provided node. The method will remove all occurrences of\n\t * `{`, `}`, `[` and `]` from found text nodes. If a text node is empty after the process, it will be removed, too.\n\t *\n\t * @param node Staring node.\n\t */\n\tprivate _getPositions( node: ViewNode | ViewDocumentFragment ): void {\n\t\tif ( node.is( 'documentFragment' ) || node.is( 'element' ) ) {\n\t\t\t// Copy elements into the array, when nodes will be removed from parent node this array will still have all the\n\t\t\t// items needed for iteration.\n\t\t\tconst children = [ ...node.getChildren() ];\n\n\t\t\tfor ( const child of children ) {\n\t\t\t\tthis._getPositions( child );\n\t\t\t}\n\t\t}\n\n\t\tif ( node.is( '$text' ) ) {\n\t\t\tconst regexp = new RegExp(\n\t\t\t\t`[${ TEXT_RANGE_START_TOKEN }${ TEXT_RANGE_END_TOKEN }\\\\${ ELEMENT_RANGE_END_TOKEN }\\\\${ ELEMENT_RANGE_START_TOKEN }]`,\n\t\t\t\t'g'\n\t\t\t);\n\t\t\tlet text = node.data;\n\t\t\tlet match;\n\t\t\tlet offset = 0;\n\t\t\tconst brackets = [];\n\n\t\t\t// Remove brackets from text and store info about offset inside text node.\n\t\t\twhile ( ( match = regexp.exec( text ) ) ) {\n\t\t\t\tconst index = match.index;\n\t\t\t\tconst bracket = match[ 0 ];\n\n\t\t\t\tbrackets.push( {\n\t\t\t\t\tbracket,\n\t\t\t\t\ttextOffset: index - offset\n\t\t\t\t} );\n\n\t\t\t\toffset++;\n\t\t\t}\n\n\t\t\ttext = text.replace( regexp, '' );\n\t\t\tnode._data = text;\n\t\t\tconst index = node.index!;\n\t\t\tconst parent = node.parent!;\n\n\t\t\t// Remove empty text nodes.\n\t\t\tif ( !text ) {\n\t\t\t\tnode._remove();\n\t\t\t}\n\n\t\t\tfor ( const item of brackets ) {\n\t\t\t\t// Non-empty text node.\n\t\t\t\tif ( text ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.sameSelectionCharacters ||\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t!this.sameSelectionCharacters &&\n\t\t\t\t\t\t\t( item.bracket == TEXT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN )\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Store information about text range delimiter.\n\t\t\t\t\t\tthis._positions.push( {\n\t\t\t\t\t\t\tbracket: item.bracket,\n\t\t\t\t\t\t\tposition: new ViewPosition( node, item.textOffset )\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Check if element range delimiter is not placed inside text node.\n\t\t\t\t\t\tif ( !this.sameSelectionCharacters && item.textOffset !== 0 && item.textOffset !== text.length ) {\n\t\t\t\t\t\t\tthrow new Error( `Parse error - range delimiter '${ item.bracket }' is placed inside text node.` );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If bracket is placed at the end of the text node - it should be positioned after it.\n\t\t\t\t\t\tconst offset = ( item.textOffset === 0 ? index : index + 1 );\n\n\t\t\t\t\t\t// Store information about element range delimiter.\n\t\t\t\t\t\tthis._positions.push( {\n\t\t\t\t\t\t\tbracket: item.bracket,\n\t\t\t\t\t\t\tposition: new ViewPosition( parent, offset )\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( !this.sameSelectionCharacters &&\n\t\t\t\t\t\titem.bracket == TEXT_RANGE_START_TOKEN ||\n\t\t\t\t\t\titem.bracket == TEXT_RANGE_END_TOKEN\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new Error( `Parse error - text range delimiter '${ item.bracket }' is placed inside empty text node. ` );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Store information about element range delimiter.\n\t\t\t\t\tthis._positions.push( {\n\t\t\t\t\t\tbracket: item.bracket,\n\t\t\t\t\t\tposition: new ViewPosition( parent, index )\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sorts ranges in a given order. Range order should be an array and each element should represent the desired position\n\t * of the range after sorting.\n\t * For example: `[2, 3, 1]` means that the first range will be placed as the second, the second as the third and the third\n\t * as the first.\n\t *\n\t * @param ranges Ranges to sort.\n\t * @param rangesOrder An array with new range order.\n\t * @returns Sorted ranges array.\n\t */\n\tprivate _sortRanges( ranges: Array<ViewRange>, rangesOrder: Array<number> ): Array<ViewRange> {\n\t\tconst sortedRanges = [];\n\t\tlet index = 0;\n\n\t\tfor ( const newPosition of rangesOrder ) {\n\t\t\tif ( ranges[ newPosition - 1 ] === undefined ) {\n\t\t\t\tthrow new Error( 'Parse error - provided ranges order is invalid.' );\n\t\t\t}\n\n\t\t\tsortedRanges[ newPosition - 1 ] = ranges[ index ];\n\t\t\tindex++;\n\t\t}\n\n\t\treturn sortedRanges;\n\t}\n\n\t/**\n\t * Uses all found bracket positions to create ranges from them.\n\t */\n\tprivate _createRanges(): Array<ViewRange> {\n\t\tconst ranges = [];\n\t\tlet range = null;\n\n\t\tfor ( const item of this._positions ) {\n\t\t\t// When end of range is found without opening.\n\t\t\tif ( !range && ( item.bracket == ELEMENT_RANGE_END_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN ) ) {\n\t\t\t\tthrow new Error( `Parse error - end of range was found '${ item.bracket }' but range was not started before.` );\n\t\t\t}\n\n\t\t\t// When second start of range is found when one is already opened - selection does not allow intersecting\n\t\t\t// ranges.\n\t\t\tif ( range && ( item.bracket == ELEMENT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_START_TOKEN ) ) {\n\t\t\t\tthrow new Error( `Parse error - start of range was found '${ item.bracket }' but one range is already started.` );\n\t\t\t}\n\n\t\t\tif ( item.bracket == ELEMENT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_START_TOKEN ) {\n\t\t\t\trange = new ViewRange( item.position, item.position );\n\t\t\t} else {\n\t\t\t\t( range as any ).end = item.position;\n\t\t\t\tranges.push( range! );\n\t\t\t\trange = null;\n\t\t\t}\n\t\t}\n\n\t\t// Check if all ranges have proper ending.\n\t\tif ( range !== null ) {\n\t\t\tthrow new Error( 'Parse error - range was started but no end delimiter was found.' );\n\t\t}\n\n\t\treturn ranges;\n\t}\n}\n\n/**\n * Private helper class used for converting the view tree to a string.\n */\nclass ViewStringify {\n\tpublic root: ViewNode | ViewDocumentFragment;\n\tpublic selection: ViewDocumentSelection | null;\n\tpublic ranges: Array<ViewRange>;\n\tpublic showType: boolean;\n\tpublic showPriority: boolean;\n\tpublic showAttributeElementId: boolean;\n\tpublic ignoreRoot: boolean;\n\tpublic sameSelectionCharacters: boolean;\n\tpublic renderUIElements: boolean;\n\tpublic renderRawElements: boolean;\n\tpublic domConverter: ViewDomConverter;\n\tpublic skipListItemIds: boolean;\n\n\t/**\n\t * Creates a view stringify instance.\n\t *\n\t * @param selection A selection whose ranges should also be converted to a string.\n\t * @param options An options object.\n\t * @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n\t * instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n\t * @param options.showPriority When set to `true`, the attribute element's priority will be printed.\n\t * @param options.ignoreRoot When set to `true`, the root's element opening and closing tag will not\n\t * be outputted.\n\t * @param options.sameSelectionCharacters When set to `true`, the selection inside the text is marked as\n\t * `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both are marked as `[` and `]`.\n\t * @param options.renderUIElements When set to `true`, the inner content of each\n\t * {@link module:engine/view/uielement~ViewUIElement} will be printed.\n\t * @param options.renderRawElements When set to `true`, the inner content of each\n\t * @param options.domConverter When set to an actual {@link module:engine/view/domconverter~ViewDomConverter ViewDomConverter}\n\t * instance, it lets the conversion go through exactly the same flow the editing view is going through,\n\t * i.e. with view data filtering. Otherwise the simple stub is used.\n\t * {@link module:engine/view/rawelement~ViewRawElement} will be printed.\n\t * @param options.skipListItemIds When set to `true`, `<li>` elements will not have `listItemId` attribute. By default it's hidden\n\t * because it's randomly generated and hard to verify properly, while bringing little value.\n\t */\n\tconstructor(\n\t\troot: ViewNode | ViewDocumentFragment,\n\t\tselection: ViewDocumentSelection | null,\n\t\toptions: {\n\t\t\tshowType?: boolean;\n\t\t\tshowPriority?: boolean;\n\t\t\tshowAttributeElementId?: boolean;\n\t\t\tignoreRoot?: boolean;\n\t\t\tsameSelectionCharacters?: boolean;\n\t\t\trenderUIElements?: boolean;\n\t\t\trenderRawElements?: boolean;\n\t\t\tdomConverter?: ViewDomConverter;\n\t\t\tskipListItemIds?: boolean;\n\t\t}\n\t) {\n\t\tthis.root = root;\n\t\tthis.selection = selection;\n\t\tthis.ranges = [];\n\n\t\tif ( selection ) {\n\t\t\tthis.ranges = [ ...selection.getRanges() ];\n\t\t}\n\n\t\tthis.showType = !!options.showType;\n\t\tthis.showPriority = !!options.showPriority;\n\t\tthis.showAttributeElementId = !!options.showAttributeElementId;\n\t\tthis.ignoreRoot = !!options.ignoreRoot;\n\t\tthis.sameSelectionCharacters = !!options.sameSelectionCharacters;\n\t\tthis.renderUIElements = !!options.renderUIElements;\n\t\tthis.renderRawElements = !!options.renderRawElements;\n\t\tthis.domConverter = options.domConverter || domConverterStub;\n\t\tthis.skipListItemIds = options.skipListItemIds !== undefined ? !!options.skipListItemIds : true;\n\t}\n\n\t/**\n\t * Converts the view to a string.\n\t *\n\t * @returns String representation of the view elements.\n\t */\n\tpublic stringify(): string {\n\t\tlet result = '';\n\t\tthis._walkView( this.root, chunk => {\n\t\t\tresult += chunk;\n\t\t} );\n\n\t\tif ( this.skipListItemIds ) {\n\t\t\tresult = result.replaceAll( / data-list-item-id=\"[^\"]+\"/g, '' );\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Executes a simple walker that iterates over all elements in the view tree starting from the root element.\n\t * Calls the `callback` with parsed chunks of string data.\n\t */\n\tprivate _walkView(\n\t\troot: ViewNode | ViewDocumentFragment,\n\t\tcallback: ( chunk: string ) => void\n\t): void {\n\t\tconst ignore = this.ignoreRoot && this.root === root;\n\n\t\tif ( root.is( 'element' ) || root.is( 'documentFragment' ) ) {\n\t\t\tif ( root.is( 'element' ) && !ignore ) {\n\t\t\t\tcallback( this._stringifyElementOpen( root ) );\n\t\t\t}\n\n\t\t\tif ( ( this.renderUIElements && root.is( 'uiElement' ) ) ) {\n\t\t\t\tcallback( root.render( document, this.domConverter ).innerHTML );\n\t\t\t} else if ( this.renderRawElements && root.is( 'rawElement' ) ) {\n\t\t\t\t// There's no DOM element for \"root\" to pass to render(). Creating\n\t\t\t\t// a surrogate container to render the children instead.\n\t\t\t\tconst rawContentContainer = document.createElement( 'div' );\n\t\t\t\troot.render( rawContentContainer, this.domConverter );\n\n\t\t\t\tcallback( rawContentContainer.innerHTML );\n\t\t\t} else {\n\t\t\t\tlet offset = 0;\n\t\t\t\tcallback( this._stringifyElementRanges( root, offset ) );\n\n\t\t\t\tfor ( const child of root.getChildren() ) {\n\t\t\t\t\tthis._walkView( child, callback );\n\t\t\t\t\toffset++;\n\t\t\t\t\tcallback( this._stringifyElementRanges( root, offset ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( root.is( 'element' ) && !ignore ) {\n\t\t\t\tcallback( this._stringifyElementClose( root ) );\n\t\t\t}\n\t\t}\n\n\t\tif ( root.is( '$text' ) ) {\n\t\t\tcallback( this._stringifyTextRanges( root ) );\n\t\t}\n\t}\n\n\t/**\n\t * Checks if a given {@link module:engine/view/element~ViewElement element} has\n\t * a {@link module:engine/view/range~ViewRange#start range start}\n\t * or a {@link module:engine/view/range~ViewRange#start range end} placed at a given offset and returns its string representation.\n\t */\n\tprivate _stringifyElementRanges( element: ViewElement | ViewDocumentFragment, offset: number ): string {\n\t\tlet start = '';\n\t\tlet end = '';\n\t\tlet collapsed = '';\n\n\t\tfor ( const range of this.ranges ) {\n\t\t\tif ( range.start.parent == element && range.start.offset === offset ) {\n\t\t\t\tif ( range.isCollapsed ) {\n\t\t\t\t\tcollapsed += ELEMENT_RANGE_START_TOKEN + ELEMENT_RANGE_END_TOKEN;\n\t\t\t\t} else {\n\t\t\t\t\tstart += ELEMENT_RANGE_START_TOKEN;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( range.end.parent === element && range.end.offset === offset && !range.isCollapsed ) {\n\t\t\t\tend += ELEMENT_RANGE_END_TOKEN;\n\t\t\t}\n\t\t}\n\n\t\treturn end + collapsed + start;\n\t}\n\n\t/**\n\t * Checks if a given {@link module:engine/view/element~ViewElement Text node} has a\n\t * {@link module:engine/view/range~ViewRange#start range start} or a\n\t * {@link module:engine/view/range~ViewRange#start range end} placed somewhere inside. Returns a string representation of text\n\t * with range delimiters placed inside.\n\t */\n\tprivate _stringifyTextRanges( node: ViewText ): string {\n\t\tconst length = node.data.length;\n\t\tconst data = node.data.split( '' );\n\t\tlet rangeStartToken, rangeEndToken;\n\n\t\tif ( this.sameSelectionCharacters ) {\n\t\t\trangeStartToken = ELEMENT_RANGE_START_TOKEN;\n\t\t\trangeEndToken = ELEMENT_RANGE_END_TOKEN;\n\t\t} else {\n\t\t\trangeStartToken = TEXT_RANGE_START_TOKEN;\n\t\t\trangeEndToken = TEXT_RANGE_END_TOKEN;\n\t\t}\n\n\t\t// Add one more element for ranges ending after last character in text.\n\t\tdata[ length ] = '';\n\n\t\t// Represent each letter as object with information about opening/closing ranges at each offset.\n\t\tconst result = data.map( letter => {\n\t\t\treturn {\n\t\t\t\tletter,\n\t\t\t\tstart: '',\n\t\t\t\tend: '',\n\t\t\t\tcollapsed: ''\n\t\t\t};\n\t\t} );\n\n\t\tfor ( const range of this.ranges ) {\n\t\t\tconst start = range.start;\n\t\t\tconst end = range.end;\n\n\t\t\tif ( start.parent == node && start.offset >= 0 && start.offset <= length ) {\n\t\t\t\tif ( range.isCollapsed ) {\n\t\t\t\t\tresult[ end.offset ].collapsed += rangeStartToken + rangeEndToken;\n\t\t\t\t} else {\n\t\t\t\t\tresult[ start.offset ].start += rangeStartToken;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( end.parent == node && end.offset >= 0 && end.offset <= length && !range.isCollapsed ) {\n\t\t\t\tresult[ end.offset ].end += rangeEndToken;\n\t\t\t}\n\t\t}\n\n\t\treturn result.map( item => item.end + item.collapsed + item.start + item.letter ).join( '' );\n\t}\n\n\t/**\n\t * Converts the passed {@link module:engine/view/element~ViewElement element} to an opening tag.\n\t *\n\t * Depending on the current configuration, the opening tag can be simple (`<a>`), contain a type prefix (`<container:p>`,\n\t * `<attribute:a>` or `<empty:img>`), contain priority information ( `<attribute:a view-priority=\"20\">` ),\n\t * or contain element id ( `<attribute:span view-id=\"foo\">` ). Element attributes will also be included\n\t * (`<a href=\"https://ckeditor.com\" name=\"foobar\">`).\n\t */\n\tprivate _stringifyElementOpen( element: ViewElement ): string {\n\t\tconst priority = this._stringifyElementPriority( element );\n\t\tconst id = this._stringifyElementId( element );\n\n\t\tconst type = this._stringifyElementType( element );\n\t\tconst name = [ type, element.name ].filter( i => i !== '' ).join( ':' );\n\t\tconst attributes = this._stringifyElementAttributes( element );\n\t\tconst parts = [ name, priority, id, attributes ];\n\n\t\treturn `<${ parts.filter( i => i !== '' ).join( ' ' ) }>`;\n\t}\n\n\t/**\n\t * Converts the passed {@link module:engine/view/element~ViewElement element} to a closing tag.\n\t * Depending on the current configuration, the closing tag can be simple (`</a>`) or contain a type prefix (`</container:p>`,\n\t * `</attribute:a>` or `</empty:img>`).\n\t */\n\tprivate _stringifyElementClose( element: ViewElement ): string {\n\t\tconst type = this._stringifyElementType( element );\n\t\tconst name = [ type, element.name ].filter( i => i !== '' ).join( ':' );\n\n\t\treturn `</${ name }>`;\n\t}\n\n\t/**\n\t * Converts the passed {@link module:engine/view/element~ViewElement element's} type to its string representation\n\t *\n\t * Returns:\n\t * * 'attribute' for {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements},\n\t * * 'container' for {@link module:engine/view/containerelement~ViewContainerElement container elements},\n\t * * 'empty' for {@link module:engine/view/emptyelement~ViewEmptyElement empty elements},\n\t * * 'ui' for {@link module:engine/view/uielement~ViewUIElement UI elements},\n\t * * 'raw' for {@link module:engine/view/rawelement~ViewRawElement raw elements},\n\t * * an empty string when the current configuration is preventing showing elements' types.\n\t */\n\tprivate _stringifyElementType( element: ViewElement ): string {\n\t\tif ( this.showType ) {\n\t\t\tfor ( const type in allowedTypes ) {\n\t\t\t\tif ( element instanceof allowedTypes[ type as keyof typeof allowedTypes ] ) {\n\t\t\t\t\treturn type;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t/**\n\t * Converts the passed {@link module:engine/view/element~ViewElement element} to its priority representation.\n\t *\n\t * The priority string representation will be returned when the passed element is an instance of\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} and the current configuration allows to show the\n\t * priority. Otherwise returns an empty string.\n\t */\n\tprivate _stringifyElementPriority( element: ViewElement ): string {\n\t\tif ( this.showPriority && element.is( 'attributeElement' ) ) {\n\t\t\treturn `view-priority=\"${ element.priority }\"`;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t/**\n\t * Converts the passed {@link module:engine/view/element~ViewElement element} to its id representation.\n\t *\n\t * The id string representation will be returned when the passed element is an instance of\n\t * {@link module:engine/view/attributeelement~ViewAttributeElement attribute element}, the element has an id\n\t * and the current configuration allows to show the id. Otherwise returns an empty string.\n\t */\n\tprivate _stringifyElementId( element: ViewElement ): string {\n\t\tif ( this.showAttributeElementId && element.is( 'attributeElement' ) && element.id ) {\n\t\t\treturn `view-id=\"${ element.id }\"`;\n\t\t}\n\n\t\treturn '';\n\t}\n\n\t/**\n\t * Converts the passed {@link module:engine/view/element~ViewElement element} attributes to their string representation.\n\t * If an element has no attributes, an empty string is returned.\n\t */\n\tprivate _stringifyElementAttributes( element: ViewElement ): string {\n\t\tconst attributes = [];\n\t\tconst keys = [ ...element.getAttributeKeys() ].sort();\n\n\t\tfor ( const attribute of keys ) {\n\t\t\tlet attributeValue;\n\n\t\t\tif ( attribute === 'class' ) {\n\t\t\t\tattributeValue = [ ...element.getClassNames() ]\n\t\t\t\t\t.sort()\n\t\t\t\t\t.join( ' ' );\n\t\t\t} else if ( attribute === 'style' ) {\n\t\t\t\tattributeValue = [ ...element.getStyleNames() ]\n\t\t\t\t\t.sort()\n\t\t\t\t\t.map( style => `${ style }:${ element.getStyle( style )!.replace( /\"/g, '&quot;' ) }` )\n\t\t\t\t\t.join( ';' );\n\t\t\t} else {\n\t\t\t\tattributeValue = element.getAttribute( attribute );\n\t\t\t}\n\n\t\t\tattributes.push( `${ attribute }=\"${ attributeValue }\"` );\n\t\t}\n\n\t\treturn attributes.join( ' ' );\n\t}\n}\n\n/**\n * Converts {@link module:engine/view/element~ViewElement elements} to\n * {@link module:engine/view/attributeelement~ViewAttributeElement attribute elements},\n * {@link module:engine/view/containerelement~ViewContainerElement container elements},\n * {@link module:engine/view/emptyelement~ViewEmptyElement empty elements} or\n * {@link module:engine/view/uielement~ViewUIElement UI elements}.\n * It converts the whole tree starting from the `rootNode`. The conversion is based on element names.\n * See the `_convertElement` method for more details.\n *\n * @param rootNode The root node to convert.\n * @returns The root node of converted elements.\n */\nfunction _convertViewElements( rootNode: ViewNode | ViewDocumentFragment ) {\n\tif ( rootNode.is( 'element' ) || rootNode.is( 'documentFragment' ) ) {\n\t\t// Convert element or leave document fragment.\n\n\t\tconst convertedElement = rootNode.is( 'documentFragment' ) ?\n\t\t\tnew ViewDocumentFragment( rootNode.document ) :\n\t\t\t_convertElement( rootNode.document, rootNode );\n\n\t\t// Convert all child nodes.\n\t\t// Cache the nodes in array. Otherwise, we would skip some nodes because during iteration we move nodes\n\t\t// from `rootNode` to `convertedElement`. This would interfere with iteration.\n\t\tfor ( const child of [ ...rootNode.getChildren() ] ) {\n\t\t\tif ( convertedElement.is( 'emptyElement' ) ) {\n\t\t\t\tthrow new Error( 'Parse error - cannot parse inside ViewEmptyElement.' );\n\t\t\t} else if ( convertedElement.is( 'uiElement' ) ) {\n\t\t\t\tthrow new Error( 'Parse error - cannot parse inside UIElement.' );\n\t\t\t} else if ( convertedElement.is( 'rawElement' ) ) {\n\t\t\t\tthrow new Error( 'Parse error - cannot parse inside RawElement.' );\n\t\t\t}\n\n\t\t\tconvertedElement._appendChild( _convertViewElements( child ) );\n\t\t}\n\n\t\treturn convertedElement;\n\t}\n\n\treturn rootNode;\n}\n\n/**\n * Converts an {@link module:engine/view/element~ViewElement element} to\n * {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n * {@link module:engine/view/containerelement~ViewContainerElement container element},\n * {@link module:engine/view/emptyelement~ViewEmptyElement empty element} or\n * {@link module:engine/view/uielement~ViewUIElement UI element}.\n * If the element's name is in the format of `attribute:b`, it will be converted to\n * an {@link module:engine/view/attributeelement~ViewAttributeElement attribute element} with a priority of 11.\n * Additionally, attribute elements may have specified priority (for example `view-priority=\"11\"`) and/or\n * id (for example `view-id=\"foo\"`).\n * If the element's name is in the format of `container:p`, it will be converted to\n * a {@link module:engine/view/containerelement~ViewContainerElement container element}.\n * If the element's name is in the format of `empty:img`, it will be converted to\n * an {@link module:engine/view/emptyelement~ViewEmptyElement empty element}.\n * If the element's name is in the format of `ui:span`, it will be converted to\n * a {@link module:engine/view/uielement~ViewUIElement UI element}.\n * If the element's name does not contain any additional information, a {@link module:engine/view/element~ViewElement view Element} will be\n * returned.\n *\n * @param viewElement A view element to convert.\n * @returns A tree view element converted according to its name.\n */\nfunction _convertElement( viewDocument: ViewDocument, viewElement: ViewElement ) {\n\tconst info = _convertElementNameAndInfo( viewElement );\n\tconst ElementConstructor = allowedTypes[ info.type! ];\n\tconst newElement = ElementConstructor ? new ElementConstructor( viewDocument, info.name ) : new ViewElement( viewDocument, info.name );\n\n\tif ( newElement.is( 'attributeElement' ) ) {\n\t\tif ( info.priority !== null ) {\n\t\t\t( newElement as any )._priority = info.priority;\n\t\t}\n\n\t\tif ( info.id !== null ) {\n\t\t\t( newElement as any )._id = info.id;\n\t\t}\n\t}\n\n\t// Move attributes.\n\tfor ( const attributeKey of viewElement.getAttributeKeys() ) {\n\t\tnewElement._setAttribute( attributeKey, viewElement.getAttribute( attributeKey )! );\n\t}\n\n\treturn newElement;\n}\n\n/**\n * Converts the `view-priority` attribute and the {@link module:engine/view/element~ViewElement#name element's name} information needed for\n * creating {@link module:engine/view/attributeelement~ViewAttributeElement attribute element},\n * {@link module:engine/view/containerelement~ViewContainerElement container element},\n * {@link module:engine/view/emptyelement~ViewEmptyElement empty element} or\n * {@link module:engine/view/uielement~ViewUIElement UI element}.\n * The name can be provided in two formats: as a simple element's name (`div`), or as a type and name (`container:div`,\n * `attribute:span`, `empty:img`, `ui:span`);\n *\n * @param viewElement The element whose name should be converted.\n * @returns An object with parsed information:\n * * `name` The parsed name of the element.\n * * `type` The parsed type of the element. It can be `attribute`, `container` or `empty`.\n * * `priority` The parsed priority of the element.\n */\nfunction _convertElementNameAndInfo( viewElement: ViewElement ) {\n\tconst parts = viewElement.name.split( ':' );\n\n\tconst priority = _convertPriority( viewElement.getAttribute( 'view-priority' )! );\n\tconst id = viewElement.hasAttribute( 'view-id' ) ? viewElement.getAttribute( 'view-id' ) : null;\n\n\tviewElement._removeAttribute( 'view-priority' );\n\tviewElement._removeAttribute( 'view-id' );\n\n\tif ( parts.length == 1 ) {\n\t\treturn {\n\t\t\tname: parts[ 0 ],\n\t\t\ttype: priority !== null ? 'attribute' : null,\n\t\t\tpriority,\n\t\t\tid\n\t\t} as const;\n\t}\n\n\t// Check if type and name: container:div.\n\tconst type = _convertType( parts[ 0 ] );\n\n\tif ( type ) {\n\t\treturn {\n\t\t\tname: parts[ 1 ],\n\t\t\ttype,\n\t\t\tpriority,\n\t\t\tid\n\t\t} as const;\n\t}\n\n\tthrow new Error( `Parse error - cannot parse element's name: ${ viewElement.name }.` );\n}\n\n/**\n * Checks if the element's type is allowed. Returns `attribute`, `container`, `empty` or `null`.\n */\nfunction _convertType( type: string ): keyof typeof allowedTypes | null {\n\treturn type in allowedTypes ? type as any : null;\n}\n\n/**\n * Checks if a given priority is allowed. Returns null if the priority cannot be converted.\n */\nfunction _convertPriority( priorityString: string ) {\n\tconst priority = parseInt( priorityString, 10 );\n\n\tif ( !isNaN( priority ) ) {\n\t\treturn priority;\n\t}\n\n\treturn null;\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/**\n * @module engine/dev-utils/model\n */\n\n/**\n * Collection of methods for manipulating the {@link module:engine/model/model model} for testing purposes.\n */\n\nimport { ModelRootElement } from '../model/rootelement.js';\nimport { Model } from '../model/model.js';\nimport { ModelRange } from '../model/range.js';\nimport { ModelPosition } from '../model/position.js';\nimport { ModelSelection } from '../model/selection.js';\nimport { ModelDocumentFragment } from '../model/documentfragment.js';\nimport { ModelDocumentSelection } from '../model/documentselection.js';\n\nimport { EditingView } from '../view/view.js';\nimport { ViewContainerElement } from '../view/containerelement.js';\nimport { ViewRootEditableElement } from '../view/rooteditableelement.js';\n\nimport { _parseView, _stringifyView } from './view.js';\n\nimport { Mapper } from '../conversion/mapper.js';\nimport {\n\tconvertCollapsedSelection,\n\tconvertRangeSelection,\n\tinsertAttributesAndChildren,\n\tinsertElement,\n\tinsertText,\n\tinsertUIElement,\n\twrap\n} from '../conversion/downcasthelpers.js';\n\nimport { StylesProcessor } from '../view/stylesmap.js';\n\nimport {\n\tDowncastDispatcher,\n\ttype DowncastAddMarkerEvent,\n\ttype DowncastAttributeEvent,\n\ttype DowncastInsertEvent,\n\ttype DowncastSelectionEvent\n} from '../conversion/downcastdispatcher.js';\nimport {\n\tUpcastDispatcher,\n\ttype UpcastDocumentFragmentEvent,\n\ttype UpcastElementEvent,\n\ttype UpcastTextEvent,\n\ttype UpcastConversionApi,\n\ttype UpcastConversionData\n} from '../conversion/upcastdispatcher.js';\nimport { type ViewDocumentSelection } from '../view/documentselection.js';\nimport type { BatchType } from '../model/batch.js';\nimport { type MarkerCollection } from '../model/markercollection.js';\nimport { type ModelText } from '../model/text.js';\nimport { type ModelTextProxy } from '../model/textproxy.js';\nimport { type ViewDowncastWriter } from '../view/downcastwriter.js';\nimport type { ModelSchema, ModelSchemaContextDefinition } from '../model/schema.js';\nimport type { ViewDocumentFragment, ViewElement } from '../index.js';\nimport { type ViewNode } from '../view/node.js';\nimport { type ViewText } from '../view/text.js';\nimport { type ModelWriter } from '../model/writer.js';\nimport { type ModelNode } from '../model/node.js';\nimport { type ModelElement } from '../model/element.js';\n\nimport { toMap, type EventInfo } from '@ckeditor/ckeditor5-utils';\n\nimport { isPlainObject } from 'es-toolkit/compat';\n\ntype GetModelDataOptions = {\n\twithoutSelection?: boolean;\n\trootName?: string;\n\tconvertMarkers?: boolean;\n};\n\ntype GetModelData = {\n\t( model: Model, options?: GetModelDataOptions ): string;\n\t_stringify: typeof _stringifyModel;\n};\n\ntype SetModelDataOptions = {\n\trootName?: string;\n\tselectionAttributes?: Record<string, unknown>;\n\tlastRangeBackward?: boolean;\n\tbatchType?: BatchType;\n\tinlineObjectElements?: Array<string>;\n};\n\ntype SetModelData = {\n\t( model: Model, data: string, options?: SetModelDataOptions ): void;\n\t_parse: typeof _parseModel;\n};\n\n/**\n * Writes the content of a model {@link module:engine/model/document~ModelDocument document} to an HTML-like string.\n *\n * ```ts\n * getData( editor.model ); // -> '<paragraph>Foo![]</paragraph>'\n * ```\n *\n * **Note:** A {@link module:engine/model/text~ModelText text} node that contains attributes will be represented as:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * **Note:** Using this tool in production-grade code is not recommended. It was designed for development, prototyping,\n * debugging and testing.\n *\n * @param options.withoutSelection Whether to write the selection. When set to `true`, the selection will\n * not be included in the returned string.\n * @param options.rootName The name of the root from which the data should be stringified. If not provided,\n * the default `main` name will be used.\n * @param options.convertMarkers Whether to include markers in the returned string.\n * @returns The stringified data.\n */\nexport const _getModelData: GetModelData = /* #__PURE__ */ ( () => {\n\tconst getModelData = function(\n\t\tmodel: Model,\n\t\toptions: GetModelDataOptions = {}\n\t): string {\n\t\tif ( !( model instanceof Model ) ) {\n\t\t\tthrow new TypeError( 'Model needs to be an instance of module:engine/model/model~Model.' );\n\t\t}\n\n\t\tconst rootName = options.rootName || 'main';\n\t\tconst root = model.document.getRoot( rootName )!;\n\n\t\treturn getModelData._stringify(\n\t\t\troot,\n\t\t\toptions.withoutSelection ? null : model.document.selection,\n\t\t\toptions.convertMarkers ? model.markers : null\n\t\t);\n\t} as GetModelData;\n\n\t// Set stringify as getData private method - needed for testing/spying.\n\tgetModelData._stringify = _stringifyModel;\n\n\treturn getModelData;\n} )();\n\n/**\n * Sets the content of a model {@link module:engine/model/document~ModelDocument document} provided as an HTML-like string.\n *\n * ```ts\n * setData( editor.model, '<paragraph>Foo![]</paragraph>' );\n * ```\n *\n * **Note:** Remember to register elements in the {@link module:engine/model/model~Model#schema model's schema} before\n * trying to use them.\n *\n * **Note:** To create a {@link module:engine/model/text~ModelText text} node that contains attributes use:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * **Note:** Using this tool in production-grade code is not recommended. It was designed for development, prototyping,\n * debugging and testing.\n *\n * @param data HTML-like string to write into the document.\n * @param options.rootName Root name where parsed data will be stored. If not provided, the default `main`\n * name will be used.\n * @param options.selectionAttributes A list of attributes which will be passed to the selection.\n * @param options.lastRangeBackward If set to `true`, the last range will be added as backward.\n * @param options.batchType Batch type used for inserting elements. See {@link module:engine/model/batch~Batch#constructor}.\n */\nexport const _setModelData: SetModelData = /* #__PURE__ */ ( () => {\n\tconst setModelData = function(\n\t\tmodel: Model,\n\t\tdata: string,\n\t\toptions: SetModelDataOptions = {}\n\t): void {\n\t\tif ( !( model instanceof Model ) ) {\n\t\t\tthrow new TypeError( 'Model needs to be an instance of module:engine/model/model~Model.' );\n\t\t}\n\n\t\tlet modelDocumentFragment: ModelNode | ModelDocumentFragment;\n\t\tlet selection: ModelSelection | null = null;\n\t\tconst modelRoot = model.document.getRoot( options.rootName || 'main' )!;\n\n\t\t// Parse data string to model.\n\t\tconst parsedResult = setModelData._parse( data, model.schema, {\n\t\t\tlastRangeBackward: options.lastRangeBackward,\n\t\t\tselectionAttributes: options.selectionAttributes,\n\t\t\tcontext: [ modelRoot.name ],\n\t\t\tinlineObjectElements: options.inlineObjectElements\n\t\t} );\n\n\t\t// Retrieve DocumentFragment and Selection from parsed model.\n\t\tif ( 'model' in parsedResult ) {\n\t\t\tmodelDocumentFragment = parsedResult.model;\n\t\t\tselection = parsedResult.selection;\n\t\t} else {\n\t\t\tmodelDocumentFragment = parsedResult;\n\t\t}\n\n\t\tif ( options.batchType !== undefined ) {\n\t\t\tmodel.enqueueChange( options.batchType, writeToModel );\n\t\t} else {\n\t\t\tmodel.change( writeToModel );\n\t\t}\n\n\t\tfunction writeToModel( writer: ModelWriter ) {\n\t\t\t// Replace existing model in document by new one.\n\t\t\twriter.remove( writer.createRangeIn( modelRoot ) );\n\t\t\twriter.insert( modelDocumentFragment, modelRoot );\n\n\t\t\t// Clean up previous document selection.\n\t\t\twriter.setSelection( null );\n\t\t\twriter.removeSelectionAttribute( model.document.selection.getAttributeKeys() );\n\n\t\t\t// Update document selection if specified.\n\t\t\tif ( selection ) {\n\t\t\t\tconst ranges: Array<ModelRange> = [];\n\n\t\t\t\tfor ( const range of selection.getRanges() ) {\n\t\t\t\t\tconst start = new ModelPosition( modelRoot, range.start.path );\n\t\t\t\t\tconst end = new ModelPosition( modelRoot, range.end.path );\n\n\t\t\t\t\tranges.push( new ModelRange( start, end ) );\n\t\t\t\t}\n\n\t\t\t\twriter.setSelection( ranges, { backward: selection.isBackward } );\n\n\t\t\t\tif ( options.selectionAttributes ) {\n\t\t\t\t\twriter.setSelectionAttribute( selection.getAttributes() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} as SetModelData;\n\n\t// Set parse as setData private method - needed for testing/spying.\n\tsetModelData._parse = _parseModel;\n\n\treturn setModelData;\n} )();\n\n/**\n * Converts model nodes to HTML-like string representation.\n *\n * **Note:** A {@link module:engine/model/text~ModelText text} node that contains attributes will be represented as:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * @param node A node to stringify.\n * @param selectionOrPositionOrRange A selection instance whose ranges will be included in the returned string data.\n * If a range instance is provided, it will be converted to a selection containing this range. If a position instance\n * is provided, it will be converted to a selection containing one range collapsed at this position.\n * @param markers Markers to include.\n * @returns An HTML-like string representing the model.\n */\nexport function _stringifyModel(\n\tnode: ModelNode | ModelDocumentFragment,\n\tselectionOrPositionOrRange: ModelSelection | ModelDocumentSelection | ModelPosition | ModelRange | null = null,\n\tmarkers: MarkerCollection | null = null\n): string {\n\tconst model = new Model();\n\tconst mapper = new Mapper();\n\tlet selection: ModelSelection | ModelDocumentSelection | null = null;\n\tlet range: ModelRange;\n\n\t// Create a range witch wraps passed node.\n\tif ( node instanceof ModelRootElement || node instanceof ModelDocumentFragment ) {\n\t\trange = model.createRangeIn( node );\n\t} else {\n\t\t// Node is detached - create new document fragment.\n\t\tif ( !node.parent ) {\n\t\t\tconst fragment = new ModelDocumentFragment( node );\n\t\t\trange = model.createRangeIn( fragment );\n\t\t} else {\n\t\t\trange = new ModelRange(\n\t\t\t\tmodel.createPositionBefore( node ),\n\t\t\t\tmodel.createPositionAfter( node )\n\t\t\t);\n\t\t}\n\t}\n\n\t// Get selection from passed selection or position or range if at least one is specified.\n\tif ( selectionOrPositionOrRange instanceof ModelSelection ) {\n\t\tselection = selectionOrPositionOrRange;\n\t} else if ( selectionOrPositionOrRange instanceof ModelDocumentSelection ) {\n\t\tselection = selectionOrPositionOrRange;\n\t} else if ( selectionOrPositionOrRange instanceof ModelRange ) {\n\t\tselection = new ModelSelection( selectionOrPositionOrRange );\n\t} else if ( selectionOrPositionOrRange instanceof ModelPosition ) {\n\t\tselection = new ModelSelection( selectionOrPositionOrRange );\n\t}\n\n\t// Set up conversion.\n\t// Create a temporary view controller.\n\tconst stylesProcessor = new StylesProcessor();\n\tconst view = new EditingView( stylesProcessor );\n\tconst viewDocument = view.document;\n\tconst viewRoot = new ViewRootEditableElement( viewDocument, 'div' );\n\n\t// Create a temporary root element in view document.\n\tviewRoot.rootName = 'main';\n\tviewDocument.roots.add( viewRoot );\n\n\t// Create and setup downcast dispatcher.\n\tconst downcastDispatcher = new DowncastDispatcher( { mapper, schema: model.schema } );\n\n\t// Bind root elements.\n\tmapper.bindElements( node.root as ModelElement | ModelDocumentFragment, viewRoot );\n\n\tdowncastDispatcher.on<DowncastInsertEvent<ModelText | ModelTextProxy>>( 'insert:$text', insertText() );\n\tdowncastDispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert', insertAttributesAndChildren(), { priority: 'lowest' } );\n\tdowncastDispatcher.on<DowncastAttributeEvent>( 'attribute', ( evt, data, conversionApi ) => {\n\t\tif ( data.item instanceof ModelSelection || data.item instanceof ModelDocumentSelection || data.item.is( '$textProxy' ) ) {\n\t\t\tconst converter = wrap( ( modelAttributeValue, { writer } ) => {\n\t\t\t\treturn writer.createAttributeElement(\n\t\t\t\t\t'model-text-with-attributes',\n\t\t\t\t\t{ [ data.attributeKey ]: stringifyAttributeValue( modelAttributeValue ) }\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tconverter( evt, data, conversionApi );\n\t\t}\n\t} );\n\tdowncastDispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert', insertElement( modelItem => {\n\t\t// Stringify object types values for properly display as an output string.\n\t\tconst attributes = convertAttributes( modelItem.getAttributes(), stringifyAttributeValue );\n\n\t\treturn new ViewContainerElement( viewDocument, modelItem.name, attributes );\n\t} ) );\n\n\tdowncastDispatcher.on<DowncastSelectionEvent>( 'selection', convertRangeSelection() );\n\tdowncastDispatcher.on<DowncastSelectionEvent>( 'selection', convertCollapsedSelection() );\n\tdowncastDispatcher.on<DowncastAddMarkerEvent>( 'addMarker', insertUIElement( ( data, { writer } ) => {\n\t\tconst name = data.markerName + ':' + ( data.isOpening ? 'start' : 'end' );\n\n\t\treturn writer.createUIElement( name );\n\t} ) );\n\n\tconst markersMap: Map<string, ModelRange> = new Map();\n\n\tif ( markers ) {\n\t\t// To provide stable results, sort markers by name.\n\t\tfor ( const marker of Array.from( markers ).sort( ( a, b ) => a.name < b.name ? 1 : -1 ) ) {\n\t\t\tmarkersMap.set( marker.name, marker.getRange() );\n\t\t}\n\t}\n\n\t// Convert model to view.\n\tconst writer: ViewDowncastWriter = ( view as any )._writer;\n\tdowncastDispatcher.convert( range, markersMap, writer );\n\n\t// Convert model selection to view selection.\n\tif ( selection ) {\n\t\tdowncastDispatcher.convertSelection( selection, markers || model.markers, writer );\n\t}\n\n\t// Parse view to data string.\n\tlet data = _stringifyView( viewRoot, viewDocument.selection, { sameSelectionCharacters: true } );\n\n\t// Removing unnecessary <div> and </div> added because `viewRoot` was also stringified alongside input data.\n\tdata = data.substr( 5, data.length - 11 );\n\n\tview.destroy();\n\n\t// Replace valid XML `model-text-with-attributes` element name to `$text`.\n\treturn data.replace( new RegExp( 'model-text-with-attributes', 'g' ), '$text' );\n}\n\n/**\n * Parses an HTML-like string and returns the model {@link module:engine/model/rootelement~ModelRootElement rootElement}.\n *\n * **Note:** To create a {@link module:engine/model/text~ModelText text} node that contains attributes use:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * **Note:** The default `options.context` value is `'$root'`, which only matches the generic root. When the editor\n * uses a custom root {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`}, pass the target\n * {@link module:engine/model/rootelement~ModelRootElement root element} (or its configured model element name)\n * explicitly, otherwise the conversion result may be wrong.\n * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n *\n * @param data HTML-like string to be parsed.\n * @param schema A schema instance used by converters for element validation.\n * @param options Additional configuration.\n * @param options.selectionAttributes A list of attributes which will be passed to the selection.\n * @param options.lastRangeBackward If set to `true`, the last range will be added as backward.\n * @param options.context The conversion context. If not provided, the default `'$root'` will be used.\n * @returns Returns the parsed model node or an object with two fields: `model` and `selection`,\n * when selection ranges were included in the data to parse.\n */\nexport function _parseModel(\n\tdata: string,\n\tschema: ModelSchema,\n\toptions: {\n\t\tselectionAttributes?: Record<string, unknown> | Iterable<[ string, unknown ]>;\n\t\tlastRangeBackward?: boolean;\n\t\tcontext?: ModelSchemaContextDefinition;\n\t\tinlineObjectElements?: Array<string>;\n\t} = {}\n): ModelNode | ModelDocumentFragment | {\n\tmodel: ModelNode | ModelDocumentFragment;\n\tselection: ModelSelection;\n} {\n\tconst mapper = new Mapper();\n\n\t// Replace not accepted by XML `$text` tag name by valid one `model-text-with-attributes`.\n\tdata = data.replace( new RegExp( '\\\\$text', 'g' ), 'model-text-with-attributes' );\n\n\t// Parse data to view using view utils.\n\tconst parsedResult = _parseView( data, {\n\t\tsameSelectionCharacters: true,\n\t\tlastRangeBackward: !!options.lastRangeBackward,\n\t\tinlineObjectElements: options.inlineObjectElements\n\t} );\n\n\t// Retrieve DocumentFragment and Selection from parsed view.\n\tlet viewDocumentFragment: ViewNode | ViewDocumentFragment;\n\tlet viewSelection: ViewDocumentSelection | null = null;\n\tlet selection: ModelSelection | null = null;\n\n\tif ( 'view' in parsedResult && 'selection' in parsedResult ) {\n\t\tviewDocumentFragment = parsedResult.view;\n\t\tviewSelection = parsedResult.selection;\n\t} else {\n\t\tviewDocumentFragment = parsedResult;\n\t}\n\n\t// Set up upcast dispatcher.\n\tconst modelController = new Model();\n\tconst upcastDispatcher = new UpcastDispatcher( { schema } );\n\n\tupcastDispatcher.on<UpcastDocumentFragmentEvent>( 'documentFragment', convertToModelFragment( mapper ) );\n\tupcastDispatcher.on<UpcastElementEvent>( 'element:model-text-with-attributes', convertToModelText() );\n\tupcastDispatcher.on<UpcastElementEvent>( 'element', convertToModelElement( mapper ) );\n\tupcastDispatcher.on<UpcastTextEvent>( 'text', convertToModelText() );\n\n\t// Convert view to model.\n\tlet model: ModelDocumentFragment | ModelNode = modelController.change(\n\t\twriter => upcastDispatcher.convert( viewDocumentFragment.root, writer, options.context || '$root' )\n\t);\n\n\tmapper.bindElements( model, viewDocumentFragment.root );\n\n\t// If root DocumentFragment contains only one element - return that element.\n\tif ( model.childCount == 1 ) {\n\t\tmodel = model.getChild( 0 )!;\n\t}\n\n\t// Convert view selection to model selection.\n\n\tif ( viewSelection ) {\n\t\tconst ranges: Array<ModelRange> = [];\n\n\t\t// Convert ranges.\n\t\tfor ( const viewRange of viewSelection.getRanges() ) {\n\t\t\tranges.push( mapper.toModelRange( viewRange ) );\n\t\t}\n\n\t\t// Create new selection.\n\t\tselection = new ModelSelection( ranges, { backward: viewSelection.isBackward } );\n\n\t\t// Set attributes to selection if specified.\n\t\tfor ( const [ key, value ] of toMap( options.selectionAttributes || [] ) ) {\n\t\t\tselection.setAttribute( key, value );\n\t\t}\n\t}\n\n\t// Return model end selection when selection was specified.\n\tif ( selection ) {\n\t\treturn { model, selection };\n\t}\n\n\t// Otherwise return model only.\n\treturn model;\n}\n\n// -- Converters view -> model -----------------------------------------------------\n\nfunction convertToModelFragment( mapper: Mapper ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewDocumentFragment>,\n\t\tconversionApi: UpcastConversionApi\n\t) => {\n\t\tconst childrenResult = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\n\t\tmapper.bindElements( data.modelCursor.parent, data.viewItem );\n\n\t\tObject.assign( data, childrenResult );\n\n\t\tevt.stop();\n\t};\n}\n\nfunction convertToModelElement( mapper: Mapper ) {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewElement>,\n\t\tconversionApi: UpcastConversionApi\n\t) => {\n\t\tconst elementName = data.viewItem.name;\n\n\t\tif ( !conversionApi.schema.checkChild( data.modelCursor, elementName ) ) {\n\t\t\tthrow new Error( `Element '${ elementName }' was not allowed in given position.` );\n\t\t}\n\n\t\t// View attribute value is a string so we want to typecast it to the original type.\n\t\t// E.g. `bold=\"true\"` - value will be parsed from string `\"true\"` to boolean `true`.\n\t\tconst attributes = convertAttributes( data.viewItem.getAttributes(), parseAttributeValue );\n\t\tconst element = conversionApi.writer.createElement( data.viewItem.name, attributes );\n\n\t\tconversionApi.writer.insert( element, data.modelCursor );\n\n\t\tmapper.bindElements( element, data.viewItem );\n\n\t\tconversionApi.convertChildren( data.viewItem, element );\n\n\t\tdata.modelRange = ModelRange._createOn( element );\n\t\tdata.modelCursor = data.modelRange.end;\n\n\t\tevt.stop();\n\t};\n}\n\nfunction convertToModelText() {\n\treturn (\n\t\tevt: EventInfo,\n\t\tdata: UpcastConversionData<ViewElement | ViewText>,\n\t\tconversionApi: UpcastConversionApi\n\t) => {\n\t\tif ( !conversionApi.schema.checkChild( data.modelCursor, '$text' ) ) {\n\t\t\tthrow new Error( 'Text was not allowed in given position.' );\n\t\t}\n\n\t\tlet node;\n\n\t\tif ( data.viewItem.is( 'element' ) ) {\n\t\t\t// View attribute value is a string so we want to typecast it to the original type.\n\t\t\t// E.g. `bold=\"true\"` - value will be parsed from string `\"true\"` to boolean `true`.\n\t\t\tconst attributes = convertAttributes( data.viewItem.getAttributes(), parseAttributeValue );\n\t\t\tconst viewText = data.viewItem.getChild( 0 ) as ViewText;\n\n\t\t\tnode = conversionApi.writer.createText( viewText.data, attributes );\n\t\t} else {\n\t\t\tnode = conversionApi.writer.createText( data.viewItem.data );\n\t\t}\n\n\t\tconversionApi.writer.insert( node, data.modelCursor );\n\n\t\tdata.modelRange = ModelRange._createFromPositionAndShift( data.modelCursor, node.offsetSize );\n\t\tdata.modelCursor = data.modelRange.end;\n\n\t\tevt.stop();\n\t};\n}\n\n// Tries to get original type of attribute value using JSON parsing:\n//\n//\t\t`'true'` => `true`\n//\t\t`'1'` => `1`\n//\t\t`'{\"x\":1,\"y\":2}'` => `{ x: 1, y: 2 }`\n//\n// Parse error means that value should be a string:\n//\n//\t\t`'foobar'` => `'foobar'`\nfunction parseAttributeValue( attribute: string ): any {\n\ttry {\n\t\treturn JSON.parse( attribute );\n\t} catch {\n\t\treturn attribute;\n\t}\n}\n\n// When value is an Object stringify it.\nfunction stringifyAttributeValue( data: any ): string {\n\tif ( isPlainObject( data ) ) {\n\t\treturn JSON.stringify( data );\n\t}\n\n\treturn data;\n}\n\n// Loop trough attributes map and converts each value by passed converter.\nfunction* convertAttributes(\n\tattributes: IterableIterator<[ string, unknown ]>,\n\tconverter: ( data: any ) => string\n): IterableIterator<[ string, string ]> {\n\tfor ( const [ key, value ] of attributes ) {\n\t\tyield [ key, converter( value ) ];\n\t}\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/**\n * Note: This package is used only internally for debugging purposes and should not be used\n * in other environments. It uses a few special methods not existing in the default\n * building process. That is also why there are no tests for this file.\n *\n * @module engine/dev-utils/utils\n */\n\n// @if CK_DEBUG_TYPING // import { debounce } from 'es-toolkit/compat';\n\n/**\n * Helper function, converts a map to the 'key1=\"value1\" key2=\"value1\"' format.\n *\n * @param map Map to convert.\n * @returns Converted map.\n * @internal\n */\nexport function convertMapToTags( map: Iterable<[ string, unknown ]> ): string {\n\tlet string = '';\n\n\tfor ( const entry of map ) {\n\t\tstring += ` ${ entry[ 0 ] }=${ JSON.stringify( entry[ 1 ] ) }`;\n\t}\n\n\treturn string;\n}\n\n/**\n * Helper function, converts a map to the `{\"key1\":\"value1\",\"key2\":\"value2\"}` format.\n *\n * @param map Map to convert.\n * @returns Converted map.\n * @internal\n */\nexport function convertMapToStringifiedObject( map: Iterable<[ string, unknown ]> ): string {\n\tconst obj: any = {};\n\n\tfor ( const entry of map ) {\n\t\tobj[ entry[ 0 ] ] = entry[ 1 ];\n\t}\n\n\treturn JSON.stringify( obj );\n}\n\nconst treeDump = Symbol( '_treeDump' );\nconst maxTreeDumpLength = 20;\n\n/**\n * Helper function that stores the `document` state for a given `version`.\n *\n * @internal\n */\nexport function dumpTrees( document: any, version: any ): void {\n\tconsole.log( document, version );\n\n\tlet string = '';\n\n\tfor ( const root of document.roots ) {\n\t\tstring += root.printTree() + '\\n';\n\t}\n\n\tdocument[ treeDump ][ version ] = string.substr( 0, string.length - 1 ); // Remove the last \"\\n\".\n\n\tconst overflow = document[ treeDump ].length - maxTreeDumpLength;\n\n\tif ( overflow > 0 ) {\n\t\tdocument[ treeDump ][ overflow - 1 ] = null;\n\t}\n}\n\n/**\n * Helper function that initializes document dumping.\n *\n * @internal\n */\nexport function initDocumentDumping( document: any ): void {\n\tdocument[ treeDump ] = [];\n}\n\n/**\n * Helper function that logs document for the given version.\n *\n * @internal\n */\nexport function logDocument( document: any, version: any ): void {\n\tconsole.log( '--------------------' );\n\n\tif ( document[ treeDump ][ version ] ) {\n\t\tconsole.log( document[ treeDump ][ version ] );\n\t} else {\n\t\tconsole.log( 'Tree log unavailable for given version: ' + version );\n\t}\n}\n\n// @if CK_DEBUG_TYPING // export const _debouncedLine = debounce( () => {\n// @if CK_DEBUG_TYPING // \tconsole.log(\n// @if CK_DEBUG_TYPING // \t\t'%c───────────────────────────────────────────────────────────────────────────────────────────────────────',\n// @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: red'\n// @if CK_DEBUG_TYPING // \t);\n// @if CK_DEBUG_TYPING // }, 300 );\n\n// @if CK_DEBUG_TYPING // export function _buildLogMessage( context, className, message = '', ...rest ) {\n// @if CK_DEBUG_TYPING // \tconst editor = _findAllEditorInstances().find( editor => (\n// @if CK_DEBUG_TYPING // \t\t_getLogNodes( editor ).includes( context )\n// @if CK_DEBUG_TYPING // \t) );\n// @if CK_DEBUG_TYPING // \tconst editorName = editor && Object.getPrototypeOf( editor ).constructor.name;\n// @if CK_DEBUG_TYPING // \tconst editorPrefix = editor ? `${ editorName }-${ editor.id.slice( -4 ) } ` : 'UNKNOWN ';\n// @if CK_DEBUG_TYPING // \treturn [\n// @if CK_DEBUG_TYPING // \t\t`%c${ editorPrefix }%c[${ className }]%c ${ message }`,\n// @if CK_DEBUG_TYPING //\t\t'font-weight: normal;',\n// @if CK_DEBUG_TYPING //\t\t'font-weight: bold; color: green',\n// @if CK_DEBUG_TYPING //\t\t'',\n// @if CK_DEBUG_TYPING // \t\t...rest\n// @if CK_DEBUG_TYPING // \t];\n// @if CK_DEBUG_TYPING // }\n\n// @if CK_DEBUG_TYPING // function _findAllEditorInstances() {\n// @if CK_DEBUG_TYPING // \tconst editors = new Set();\n// @if CK_DEBUG_TYPING // \tfor ( const domEditable of document.querySelectorAll( '.ck.ck-content.ck-editor__editable' ) ) {\n// @if CK_DEBUG_TYPING // \t\tif ( domEditable.ckeditorInstance ) {\n// @if CK_DEBUG_TYPING // \t\t\teditors.add( domEditable.ckeditorInstance );\n// @if CK_DEBUG_TYPING // \t\t}\n// @if CK_DEBUG_TYPING // \t}\n// @if CK_DEBUG_TYPING // \treturn Array.from( editors );\n// @if CK_DEBUG_TYPING // }\n\n// @if CK_DEBUG_TYPING // function _getLogNodes( editor ) {\n// @if CK_DEBUG_TYPING // \treturn [\n// @if CK_DEBUG_TYPING // \t\teditor.editing.view._renderer,\n// @if CK_DEBUG_TYPING // \t\teditor.editing.view.domConverter,\n// @if CK_DEBUG_TYPING // \t\t...editor.editing.view._observers.values(),\n// @if CK_DEBUG_TYPING // \t\teditor.plugins.get( 'Input' ),\n// @if CK_DEBUG_TYPING // \t\teditor.plugins.get( 'Input' )._typingQueue,\n// @if CK_DEBUG_TYPING // \t\teditor.plugins.get( 'WidgetTypeAround' ),\n// @if CK_DEBUG_TYPING // \t\teditor.commands.get( 'delete' ),\n// @if CK_DEBUG_TYPING // \t\teditor.commands.get( 'deleteForward' )\n// @if CK_DEBUG_TYPING // \t];\n// @if CK_DEBUG_TYPING // }\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/**\n * @module engine/dev-utils/operationreplayer\n */\n\nimport { OperationFactory } from '../model/operation/operationfactory.js';\n\nimport { type Model } from '../model/model.js';\nimport { type Operation } from '../model/operation/operation.js';\n\n/**\n * Operation replayer is a development tool created for easy replaying of operations on the document from stringified operations.\n *\n * @internal\n */\nexport class OperationReplayer {\n\tprivate _model: Model;\n\tprivate _logSeparator: string;\n\tprivate _operationsToReplay!: Array<Operation>;\n\n\t/**\n\t * @param model Data model.\n\t * @param logSeparator Separator between operations.\n\t * @param stringifiedOperations Operations to replay.\n\t */\n\tconstructor( model: Model, logSeparator: string, stringifiedOperations: string ) {\n\t\tthis._model = model;\n\t\tthis._logSeparator = logSeparator;\n\t\tthis.setStringifiedOperations( stringifiedOperations );\n\t}\n\n\t/**\n\t * Parses the given string containing stringified operations and sets parsed operations as operations to replay.\n\t *\n\t * @param stringifiedOperations Stringified operations to replay.\n\t */\n\tpublic setStringifiedOperations( stringifiedOperations: string ): void {\n\t\tif ( stringifiedOperations === '' ) {\n\t\t\tthis._operationsToReplay = [];\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._operationsToReplay = stringifiedOperations\n\t\t\t.split( this._logSeparator )\n\t\t\t.map( stringifiedOperation => JSON.parse( stringifiedOperation ) );\n\t}\n\n\t/**\n\t * Returns operations to replay.\n\t */\n\tpublic getOperationsToReplay(): Array<Operation> {\n\t\treturn this._operationsToReplay;\n\t}\n\n\t/**\n\t * Applies all operations with a delay between actions.\n\t *\n\t * @param timeInterval Time between applying operations.\n\t */\n\tpublic play( timeInterval = 1000 ): Promise<void> {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n\t\tconst operationReplayer = this;\n\n\t\treturn new Promise( ( res, rej ) => {\n\t\t\tplay();\n\n\t\t\tfunction play() {\n\t\t\t\toperationReplayer.applyNextOperation().then( isFinished => {\n\t\t\t\t\tif ( isFinished ) {\n\t\t\t\t\t\treturn res();\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout( play, timeInterval );\n\t\t\t\t} ).catch( err => {\n\t\t\t\t\trej( err );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Applies `numberOfOperations` operations, beginning after the last applied operation (or first, if no operations were applied).\n\t *\n\t * @param numberOfOperations The number of operations to apply.\n\t */\n\tpublic applyOperations( numberOfOperations: number ): Promise<void> | undefined {\n\t\tif ( numberOfOperations <= 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.applyNextOperation()\n\t\t\t.then( isFinished => {\n\t\t\t\tif ( !isFinished ) {\n\t\t\t\t\treturn this.applyOperations( numberOfOperations - 1 );\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t/**\n\t * Applies all operations to replay at once.\n\t */\n\tpublic applyAllOperations(): Promise<void> {\n\t\treturn this.applyNextOperation()\n\t\t\t.then( isFinished => {\n\t\t\t\tif ( !isFinished ) {\n\t\t\t\t\treturn this.applyAllOperations();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t/**\n\t * Applies the next operation to replay. Returns a promise with the `isFinished` parameter that is `true` if the last\n\t * operation in the replayer has been applied, `false` otherwise.\n\t */\n\tpublic applyNextOperation(): Promise<boolean> {\n\t\tconst model = this._model;\n\n\t\treturn new Promise( res => {\n\t\t\tmodel.enqueueChange( writer => {\n\t\t\t\tconst operationJson = this._operationsToReplay.shift();\n\n\t\t\t\tif ( !operationJson ) {\n\t\t\t\t\treturn res( true );\n\t\t\t\t}\n\n\t\t\t\tconst operation = OperationFactory.fromJSON( operationJson, model.document );\n\n\t\t\t\twriter.batch.addOperation( operation );\n\t\t\t\tmodel.applyOperation( operation );\n\n\t\t\t\tres( false );\n\t\t\t} );\n\t\t} );\n\t}\n}\n", "import { cloneDeepWith, isElement, isPlainObject, throttle } 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* An abstract watchdog class that handles most of the error handling process and the state of the underlying component.\n*\n* See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and how to use it.\n*\n* @internal\n*/\nvar Watchdog = class {\n\t/**\n\t* An array of crashes saved as an object with the following properties:\n\t*\n\t* * `message`: `String`,\n\t* * `stack`: `String`,\n\t* * `date`: `Number`,\n\t* * `filename`: `String | undefined`,\n\t* * `lineno`: `Number | undefined`,\n\t* * `colno`: `Number | undefined`,\n\t*/\n\tcrashes = [];\n\t/**\n\t* Specifies the state of the item watched by the watchdog. The state can be one of the following values:\n\t*\n\t* * `initializing` &ndash; Before the first initialization, and after crashes, before the item is ready.\n\t* * `ready` &ndash; A state when the user can interact with the item.\n\t* * `crashed` &ndash; A state when an error occurs. It quickly changes to `initializing` or `crashedPermanently`\n\t* depending on how many and how frequent errors have been caught recently.\n\t* * `crashedPermanently` &ndash; A state when the watchdog stops reacting to errors and keeps the item it is watching crashed,\n\t* * `destroyed` &ndash; A state when the item is manually destroyed by the user after calling `watchdog.destroy()`.\n\t*/\n\tstate = \"initializing\";\n\t/**\n\t* @see module:watchdog/watchdog~WatchdogConfig\n\t*/\n\t_crashNumberLimit;\n\t/**\n\t* Returns the result of the `Date.now()` call. It can be overridden in tests to mock time as some popular\n\t* approaches like `sinon.useFakeTimers()` do not work well with error handling.\n\t*/\n\t_now = Date.now;\n\t/**\n\t* @see module:watchdog/watchdog~WatchdogConfig\n\t*/\n\t_minimumNonErrorTimePeriod;\n\t/**\n\t* Checks if the event error comes from the underlying item and restarts the item.\n\t*/\n\t_boundErrorHandler;\n\t/**\n\t* A dictionary of event emitter listeners.\n\t*/\n\t_listeners;\n\t/**\n\t* @param {module:watchdog/watchdog~WatchdogConfig} config The watchdog plugin configuration.\n\t*/\n\tconstructor(config) {\n\t\tthis.crashes = [];\n\t\tthis._crashNumberLimit = typeof config.crashNumberLimit === \"number\" ? config.crashNumberLimit : 3;\n\t\tthis._minimumNonErrorTimePeriod = typeof config.minimumNonErrorTimePeriod === \"number\" ? config.minimumNonErrorTimePeriod : 5e3;\n\t\tthis._boundErrorHandler = (evt) => {\n\t\t\tconst error = \"error\" in evt ? evt.error : evt.reason;\n\t\t\tif (error instanceof Error) this._handleError(error, evt);\n\t\t};\n\t\tthis._listeners = {};\n\t\tif (!this._restart) throw new Error(\"The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.\");\n\t}\n\t/**\n\t* Destroys the watchdog and releases the resources.\n\t*/\n\tdestroy() {\n\t\tthis._stopErrorHandling();\n\t\tthis._listeners = {};\n\t}\n\t/**\n\t* Starts listening to a specific event name by registering a callback that will be executed\n\t* whenever an event with a given name fires.\n\t*\n\t* Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t*\n\t* @param eventName The event name.\n\t* @param callback A callback which will be added to event listeners.\n\t*/\n\ton(eventName, callback) {\n\t\tif (!this._listeners[eventName]) this._listeners[eventName] = [];\n\t\tthis._listeners[eventName].push(callback);\n\t}\n\t/**\n\t* Stops listening to the specified event name by removing the callback from event listeners.\n\t*\n\t* Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t*\n\t* @param eventName The event name.\n\t* @param callback A callback which will be removed from event listeners.\n\t*/\n\toff(eventName, callback) {\n\t\tthis._listeners[eventName] = this._listeners[eventName].filter((cb) => cb !== callback);\n\t}\n\t/**\n\t* Fires an event with a given event name and arguments.\n\t*\n\t* Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t*/\n\t_fire(eventName, ...args) {\n\t\tconst callbacks = this._listeners[eventName] || [];\n\t\tfor (const callback of callbacks) callback.apply(this, [null, ...args]);\n\t}\n\t/**\n\t* Starts error handling by attaching global error handlers.\n\t*/\n\t_startErrorHandling() {\n\t\twindow.addEventListener(\"error\", this._boundErrorHandler);\n\t\twindow.addEventListener(\"unhandledrejection\", this._boundErrorHandler);\n\t}\n\t/**\n\t* Stops error handling by detaching global error handlers.\n\t*/\n\t_stopErrorHandling() {\n\t\twindow.removeEventListener(\"error\", this._boundErrorHandler);\n\t\twindow.removeEventListener(\"unhandledrejection\", this._boundErrorHandler);\n\t}\n\t/**\n\t* Checks if an error comes from the watched item and restarts it.\n\t* It reacts to {@link module:utils/ckeditorerror~CKEditorError `CKEditorError` errors} only.\n\t*\n\t* @fires error\n\t* @param error Error.\n\t* @param evt An error event.\n\t*/\n\t_handleError(error, evt) {\n\t\tif (this._shouldReactToError(error)) {\n\t\t\tthis.crashes.push({\n\t\t\t\tmessage: error.message,\n\t\t\t\tstack: error.stack,\n\t\t\t\tfilename: evt instanceof ErrorEvent ? evt.filename : void 0,\n\t\t\t\tlineno: evt instanceof ErrorEvent ? evt.lineno : void 0,\n\t\t\t\tcolno: evt instanceof ErrorEvent ? evt.colno : void 0,\n\t\t\t\tdate: this._now()\n\t\t\t});\n\t\t\tconst causesRestart = this._shouldRestart();\n\t\t\tthis.state = \"crashed\";\n\t\t\tthis._fire(\"stateChange\");\n\t\t\tthis._fire(\"error\", {\n\t\t\t\terror,\n\t\t\t\tcausesRestart\n\t\t\t});\n\t\t\tif (causesRestart) this._restart();\n\t\t\telse {\n\t\t\t\tthis.state = \"crashedPermanently\";\n\t\t\t\tthis._fire(\"stateChange\");\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Checks whether an error should be handled by the watchdog.\n\t*\n\t* @param error An error that was caught by the error handling process.\n\t*/\n\t_shouldReactToError(error) {\n\t\treturn error.is && error.is(\"CKEditorError\") && error.context !== void 0 && error.context !== null && this.state === \"ready\" && this._isErrorComingFromThisItem(error);\n\t}\n\t/**\n\t* Checks if the watchdog should restart the underlying item.\n\t*/\n\t_shouldRestart() {\n\t\tif (this.crashes.length <= this._crashNumberLimit) return true;\n\t\treturn (this.crashes[this.crashes.length - 1].date - this.crashes[this.crashes.length - 1 - this._crashNumberLimit].date) / this._crashNumberLimit > this._minimumNonErrorTimePeriod;\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 watchdog/utils/getsubnodes\n*/\n/**\n* @internal\n*/\nfunction getSubNodes(head, excludedProperties = /* @__PURE__ */ new Set()) {\n\tconst nodes = [head];\n\tconst subNodes = /* @__PURE__ */ new Set();\n\tlet nodeIndex = 0;\n\twhile (nodes.length > nodeIndex) {\n\t\tconst node = nodes[nodeIndex++];\n\t\tif (subNodes.has(node) || !shouldNodeBeIncluded(node) || excludedProperties.has(node)) continue;\n\t\tsubNodes.add(node);\n\t\tif (Symbol.iterator in node) try {\n\t\t\tfor (const n of node) nodes.push(n);\n\t\t} catch {}\n\t\telse for (const key in node) {\n\t\t\tif (key === \"defaultValue\") continue;\n\t\t\tnodes.push(node[key]);\n\t\t}\n\t}\n\treturn subNodes;\n}\nfunction shouldNodeBeIncluded(node) {\n\tconst type = Object.prototype.toString.call(node);\n\tconst typeOfNode = typeof node;\n\treturn !(typeOfNode === \"number\" || typeOfNode === \"boolean\" || typeOfNode === \"string\" || typeOfNode === \"symbol\" || typeOfNode === \"function\" || type === \"[object Date]\" || type === \"[object RegExp]\" || type === \"[object Module]\" || node === void 0 || node === null || node._watchdogExcluded || node instanceof EventTarget || node instanceof Event);\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 watchdog/utils/areconnectedthroughproperties\n*/\n/**\n* Traverses both structures to find out whether there is a reference that is shared between both structures.\n*\n* @internal\n*/\nfunction areConnectedThroughProperties(target1, target2, excludedNodes = /* @__PURE__ */ new Set()) {\n\tif (target1 === target2 && isObject(target1)) return true;\n\tconst subNodes1 = getSubNodes(target1, excludedNodes);\n\tconst subNodes2 = getSubNodes(target2, excludedNodes);\n\tfor (const node of subNodes1) if (subNodes2.has(node)) return true;\n\treturn false;\n}\n/* v8 ignore stop -- @preserve */\nfunction isObject(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 watchdog/utils/normalizerootsconfig\n*/\n/**\n* Normalizes the editor roots configuration. It ensures that all root configurations are defined in `config.roots`\n* and that they have `initialData` defined.\n*\n* It normalizes a single-root configuration (where `config.root` is used) to a multi-root configuration\n* (where all roots are defined in `config.roots`). This is considered a standard configuration format,\n* so the editor features can always expect roots to be defined in `config.roots`.\n*\n* It also handles legacy configuration options, such as `config.initialData`, `config.placeholder`, and `config.label`.\n*\n* @internal\n*/\nfunction normalizeRootsConfig(sourceElementsOrData, config, defaultRootName) {\n\tconst mainRootConfig = config.root;\n\tconst rootsConfig = config.roots || Object.create(null);\n\tif (defaultRootName && !rootsConfig[defaultRootName]) rootsConfig[defaultRootName] = mainRootConfig || Object.create(null);\n\tconst sourceElementIsPlainObject = isPlainObject$1(sourceElementsOrData);\n\tconst legacyInitialData = getLegacyInitialData(config, sourceElementIsPlainObject, defaultRootName);\n\tconst rootNames = Array.from(/* @__PURE__ */ new Set([\n\t\t...sourceElementIsPlainObject ? Object.keys(sourceElementsOrData) : [],\n\t\t...Object.keys(rootsConfig),\n\t\t...Object.keys(legacyInitialData)\n\t]));\n\tfor (const rootName of rootNames) {\n\t\tconst rootConfig = rootsConfig[rootName] || Object.create(null);\n\t\trootConfig.initialData = \"\";\n\t\trootConfig.placeholder ??= getLegacyPlainConfigValue(config, \"placeholder\", rootName);\n\t\trootConfig.label ??= getLegacyPlainConfigValue(config, \"label\", rootName);\n\t\trootsConfig[rootName] = rootConfig;\n\t}\n\tconfig.roots = rootsConfig;\n}\n/**\n* Type guard to check if the provided value is a plain object.\n*/\nfunction isPlainObject$1(sourceElementsOrData) {\n\treturn !!sourceElementsOrData && typeof sourceElementsOrData == \"object\" && !Array.isArray(sourceElementsOrData) && !isElement$2(sourceElementsOrData);\n}\n/**\n* Retrieve legacy configuration value for `initialData` from the config.\n* Normalize single-root config so returned value is always an object with root names as keys.\n*/\nfunction getLegacyInitialData(config, sourceElementIsObject, defaultRootName) {\n\treturn sourceElementIsObject || !defaultRootName ? config.initialData || Object.create(null) : { [defaultRootName]: config.initialData };\n}\n/**\n* Retrieve legacy configuration value for `placeholder` or `label` from the config for a specific root.\n*/\nfunction getLegacyPlainConfigValue(config, key, rootName) {\n\tconst legacyValue = config[key];\n\tif (legacyValue) return typeof legacyValue == \"string\" ? legacyValue : legacyValue[rootName];\n}\n/**\n* An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n*/\nfunction isElement$2(value) {\n\treturn isElement(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 watchdog/editorwatchdog\n*/\n/**\n* A watchdog for CKEditor 5 editors.\n*\n* See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and\n* how to use it.\n*/\nvar EditorWatchdog = class extends Watchdog {\n\t/**\n\t* The current editor instance.\n\t*/\n\t_editor = null;\n\t/**\n\t* A promise associated with the life cycle of the editor (creation or destruction processes).\n\t*\n\t* It is used to prevent the initialization of the editor if the previous instance has not been destroyed yet,\n\t* and conversely, to prevent the destruction of the editor if it has not been initialized.\n\t*/\n\t_lifecyclePromise = null;\n\t/**\n\t* Throttled save method. The `save()` method is called the specified `saveInterval` after `throttledSave()` is called,\n\t* unless a new action happens in the meantime.\n\t*/\n\t_throttledSave;\n\t/**\n\t* The latest saved editor data represented as a root name -> root data object.\n\t*/\n\t_data;\n\t/**\n\t* The last document version.\n\t*/\n\t_lastDocumentVersion;\n\t/**\n\t* The editor source element or data.\n\t*/\n\t_elementOrData;\n\t/**\n\t* Stores the original DOM element for single-root editors.\n\t*/\n\t_editorAttachTo = null;\n\t/**\n\t* Specifies whether the editor is a single-root editor (e.g. ClassicEditor) or a multi-root editor (e.g. MultiRootEditor).\n\t*/\n\t_isSingleRootEditor = true;\n\t/**\n\t* Specifies whether the editor was created using config-based creator mode (without a source element or data as the first argument).\n\t*\n\t* @internal\n\t*/\n\t_isUsingConfigBasedCreator = false;\n\t/**\n\t* The latest record of the editor editable elements. Used to restart the editor.\n\t*/\n\t_editables = {};\n\t/**\n\t* The editor configuration.\n\t*/\n\t_config;\n\t_excludedProps;\n\t/**\n\t* @param Editor The editor class.\n\t* @param watchdogConfig The watchdog plugin configuration.\n\t*/\n\tconstructor(Editor, watchdogConfig = {}) {\n\t\tsuper(watchdogConfig);\n\t\tthis._throttledSave = throttle(this._save.bind(this), typeof watchdogConfig.saveInterval === \"number\" ? watchdogConfig.saveInterval : 5e3);\n\t\tif (Editor) this._creator = ((elementOrDataOrConfig, config) => {\n\t\t\tif (config === void 0) return Editor.create(elementOrDataOrConfig);\n\t\t\treturn Editor.create(elementOrDataOrConfig, config);\n\t\t});\n\t\tthis._destructor = (editor) => editor.destroy();\n\t}\n\t/**\n\t* The current editor instance.\n\t*/\n\tget editor() {\n\t\treturn this._editor;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tget _item() {\n\t\treturn this._editor;\n\t}\n\t/**\n\t* Sets the function that is responsible for the editor creation.\n\t* It expects a function that should return a promise.\n\t*\n\t* For config-based editor creation:\n\t*\n\t* ```ts\n\t* watchdog.setCreator( config => ClassicEditor.create( config ) );\n\t* ```\n\t*\n\t* For legacy editor creation (with element or data as the first argument):\n\t*\n\t* ```ts\n\t* watchdog.setCreator( ( element, config ) => ClassicEditor.create( element, config ) );\n\t* ```\n\t*/\n\tsetCreator(creator) {\n\t\tthis._creator = creator;\n\t}\n\t/**\n\t* Sets the function that is responsible for the editor destruction.\n\t* Overrides the default destruction function, which destroys only the editor instance.\n\t* It expects a function that should return a promise or `undefined`.\n\t*\n\t* ```ts\n\t* watchdog.setDestructor( editor => {\n\t* \t// Do something before the editor is destroyed.\n\t*\n\t* \treturn editor\n\t* \t\t.destroy()\n\t* \t\t.then( () => {\n\t* \t\t\t// Do something after the editor is destroyed.\n\t* \t\t} );\n\t* } );\n\t* ```\n\t*/\n\tsetDestructor(destructor) {\n\t\tthis._destructor = destructor;\n\t}\n\t/**\n\t* Restarts the editor instance. This method is called whenever an editor error occurs. It fires the `restart` event and changes\n\t* the state to `initializing`.\n\t*\n\t* @fires restart\n\t*/\n\t_restart() {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tthis.state = \"initializing\";\n\t\t\tthis._fire(\"stateChange\");\n\t\t\treturn this._destroy();\n\t\t}).catch((err) => {\n\t\t\tconsole.error(\"An error happened during the editor destroying.\", err);\n\t\t}).then(() => {\n\t\t\tif (this._isUsingConfigBasedCreator) normalizeRootsConfig(this._isSingleRootEditor ? \"\" : {}, this._config, this._isSingleRootEditor ? \"main\" : false);\n\t\t\telse normalizeRootsConfig(this._isSingleRootEditor ? this._editorAttachTo || \"\" : this._editables, this._config, this._isSingleRootEditor ? \"main\" : false);\n\t\t\tconst updatedConfig = {\n\t\t\t\t...this._config,\n\t\t\t\textraPlugins: this._config.extraPlugins || [],\n\t\t\t\t_watchdogInitialData: this._data\n\t\t\t};\n\t\t\tupdatedConfig.extraPlugins.push(EditorWatchdogInitPlugin);\n\t\t\tconst updatedRootsConfig = {};\n\t\t\tfor (const [rootName, rootData] of Object.entries(this._data.roots)) {\n\t\t\t\tconst rootConfig = updatedConfig.roots[rootName] || Object.create(null);\n\t\t\t\trootConfig.initialData = \"\";\n\t\t\t\trootConfig.modelElement = rootData.modelElement;\n\t\t\t\tif (this._isUsingConfigBasedCreator) {\n\t\t\t\t\tif (this._editables[rootName]?.isConnected) rootConfig.element = this._editables[rootName];\n\t\t\t\t\telse if (rootData.isLoaded && !rootConfig.element) Object.assign(rootConfig, getSavedRootEditableOptions(rootData.attributes));\n\t\t\t\t}\n\t\t\t\tif (rootData.isLoaded) rootConfig.lazyLoad = false;\n\t\t\t\telse delete rootConfig.modelAttributes;\n\t\t\t\tupdatedRootsConfig[rootName] = rootConfig;\n\t\t\t}\n\t\t\tupdatedConfig.roots = updatedRootsConfig;\n\t\t\tdelete updatedConfig.initialData;\n\t\t\tdelete updatedConfig.root;\n\t\t\tif (this._isUsingConfigBasedCreator) return this.create(updatedConfig, updatedConfig.context);\n\t\t\tconst elementOrData = this._isSingleRootEditor ? this._editorAttachTo || \"\" : this._editables;\n\t\t\treturn this.create(elementOrData, updatedConfig, updatedConfig.context);\n\t\t}).then(() => {\n\t\t\tthis._fire(\"restart\");\n\t\t});\n\t}\n\tcreate(elementOrDataOrConfig = this._isUsingConfigBasedCreator ? this._config : this._elementOrData, configOrContext = this._isUsingConfigBasedCreator ? void 0 : this._config, context) {\n\t\tconst isUsingConfigBasedCreator = this._detectConfigBasedCreator(elementOrDataOrConfig, configOrContext);\n\t\tconst elementOrData = isUsingConfigBasedCreator ? void 0 : elementOrDataOrConfig;\n\t\tconst config = isUsingConfigBasedCreator ? elementOrDataOrConfig : configOrContext;\n\t\tconst resolvedContext = isUsingConfigBasedCreator ? configOrContext : context;\n\t\tthis._lifecyclePromise = Promise.resolve(this._lifecyclePromise).then(() => {\n\t\t\tsuper._startErrorHandling();\n\t\t\tthis._isUsingConfigBasedCreator = isUsingConfigBasedCreator;\n\t\t\tthis._elementOrData = elementOrData;\n\t\t\tthis._config = this._cloneEditorConfiguration(config || {});\n\t\t\tthis._config.context = resolvedContext;\n\t\t\tif (isUsingConfigBasedCreator) {\n\t\t\t\tthis._editorAttachTo = null;\n\t\t\t\tconst rootsCount = this._config.roots ? Object.keys(this._config.roots).length : 0;\n\t\t\t\tconst legacyInitialData = this._config.initialData;\n\t\t\t\tconst isMultiRootFromLegacy = legacyInitialData && typeof legacyInitialData === \"object\";\n\t\t\t\tthis._isSingleRootEditor = !isMultiRootFromLegacy && rootsCount <= 1;\n\t\t\t} else {\n\t\t\t\tthis._editorAttachTo = isElement$1(elementOrData) ? elementOrData : null;\n\t\t\t\tthis._isSingleRootEditor = isElement$1(elementOrData) || typeof elementOrData == \"string\";\n\t\t\t}\n\t\t\tif (isUsingConfigBasedCreator) return this._creator(this._config);\n\t\t\treturn this._creator(elementOrData, this._config);\n\t\t}).then((editor) => {\n\t\t\tthis._editor = editor;\n\t\t\teditor.model.document.on(\"change:data\", this._throttledSave);\n\t\t\tthis._lastDocumentVersion = editor.model.document.version;\n\t\t\tthis._data = this._getData();\n\t\t\tif (!this._editorAttachTo) this._editables = this._getEditables();\n\t\t\tthis.state = \"ready\";\n\t\t\tthis._fire(\"stateChange\");\n\t\t}).finally(() => {\n\t\t\tthis._lifecyclePromise = null;\n\t\t});\n\t\treturn this._lifecyclePromise;\n\t}\n\t/**\n\t* Destroys the watchdog and the current editor instance. It fires the callback\n\t* registered in {@link #setDestructor `setDestructor()`} and uses it to destroy the editor instance.\n\t* It also sets the state to `destroyed`.\n\t*/\n\tdestroy() {\n\t\tthis._lifecyclePromise = Promise.resolve(this._lifecyclePromise).then(() => {\n\t\t\tthis.state = \"destroyed\";\n\t\t\tthis._fire(\"stateChange\");\n\t\t\tsuper.destroy();\n\t\t\treturn this._destroy();\n\t\t}).finally(() => {\n\t\t\tthis._lifecyclePromise = null;\n\t\t});\n\t\treturn this._lifecyclePromise;\n\t}\n\t_destroy() {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tthis._stopErrorHandling();\n\t\t\tthis._throttledSave.cancel();\n\t\t\tconst editor = this._editor;\n\t\t\tthis._editor = null;\n\t\t\teditor.model.document.off(\"change:data\", this._throttledSave);\n\t\t\treturn this._destructor(editor);\n\t\t});\n\t}\n\t/**\n\t* Saves the editor data, so it can be restored after the crash even if the data cannot be fetched at\n\t* the moment of the crash.\n\t*/\n\t_save() {\n\t\tconst version = this._editor.model.document.version;\n\t\ttry {\n\t\t\tthis._data = this._getData();\n\t\t\tif (!this._editorAttachTo) this._editables = this._getEditables();\n\t\t\tthis._lastDocumentVersion = version;\n\t\t} catch (err) {\n\t\t\tconsole.error(err, \"An error happened during restoring editor data. Editor will be restored from the previously saved data.\");\n\t\t}\n\t}\n\t/**\n\t* @internal\n\t*/\n\t_setExcludedProperties(props) {\n\t\tthis._excludedProps = props;\n\t}\n\t/**\n\t* Gets all data that is required to reinitialize editor instance.\n\t*/\n\t_getData() {\n\t\tconst editor = this._editor;\n\t\tconst roots = editor.model.document.roots.filter((root) => root.isAttached() && root.rootName != \"$graveyard\");\n\t\tconst { plugins } = editor;\n\t\tconst commentsRepository = plugins.has(\"CommentsRepository\") && plugins.get(\"CommentsRepository\");\n\t\tconst trackChanges = plugins.has(\"TrackChanges\") && plugins.get(\"TrackChanges\");\n\t\tconst data = {\n\t\t\troots: {},\n\t\t\tmarkers: {},\n\t\t\tcommentThreads: JSON.stringify([]),\n\t\t\tsuggestions: JSON.stringify([])\n\t\t};\n\t\troots.forEach((root) => {\n\t\t\tdata.roots[root.rootName] = {\n\t\t\t\tcontent: JSON.stringify(Array.from(root.getChildren())),\n\t\t\t\tattributes: JSON.stringify(Array.from(root.getAttributes())),\n\t\t\t\tmodelElement: root.name,\n\t\t\t\tisLoaded: root._isLoaded\n\t\t\t};\n\t\t});\n\t\tfor (const marker of editor.model.markers) {\n\t\t\tif (!marker._affectsData) continue;\n\t\t\tdata.markers[marker.name] = {\n\t\t\t\trangeJSON: marker.getRange().toJSON(),\n\t\t\t\tusingOperation: marker._managedUsingOperations,\n\t\t\t\taffectsData: marker._affectsData\n\t\t\t};\n\t\t}\n\t\tif (commentsRepository) data.commentThreads = JSON.stringify(commentsRepository.getCommentThreads({\n\t\t\ttoJSON: true,\n\t\t\tskipNotAttached: true\n\t\t}));\n\t\tif (trackChanges) data.suggestions = JSON.stringify(trackChanges.getSuggestions({\n\t\t\ttoJSON: true,\n\t\t\tskipNotAttached: true\n\t\t}));\n\t\treturn data;\n\t}\n\t/**\n\t* For each attached model root, returns its HTML editable element (if available).\n\t*/\n\t_getEditables() {\n\t\tconst editables = {};\n\t\tfor (const rootName of this.editor.model.document.getRootNames()) {\n\t\t\tconst editable = this.editor.ui.getEditableElement(rootName);\n\t\t\tif (editable) editables[rootName] = editable;\n\t\t}\n\t\treturn editables;\n\t}\n\t/**\n\t* Traverses the error context and the current editor to find out whether these structures are connected\n\t* to each other via properties.\n\t*\n\t* @internal\n\t*/\n\t_isErrorComingFromThisItem(error) {\n\t\treturn areConnectedThroughProperties(this._editor, error.context, this._excludedProps);\n\t}\n\t/**\n\t* Detects whether the `create()` call was made in config-based creator mode\n\t* (i.e., the first argument is a config object rather than a source element or data).\n\t*/\n\t_detectConfigBasedCreator(elementOrDataOrConfig, configOrContext) {\n\t\tif (typeof elementOrDataOrConfig === \"string\" || isElement$1(elementOrDataOrConfig)) return false;\n\t\tif (configOrContext && typeof configOrContext === \"object\" && !(\"destroy\" in configOrContext) && Object.keys(configOrContext).length > 0) return false;\n\t\tif (elementOrDataOrConfig && typeof elementOrDataOrConfig === \"object\") {\n\t\t\tconst values = Object.values(elementOrDataOrConfig);\n\t\t\tif (values.length > 0 && values.every((v) => typeof v === \"string\" || isElement$1(v))) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Clones the editor configuration.\n\t*/\n\t_cloneEditorConfiguration(config) {\n\t\treturn cloneDeepWith(config, (value, key) => {\n\t\t\tif (isElement$1(value)) return value;\n\t\t\tif (key === \"context\") return value;\n\t\t});\n\t}\n};\n/**\n* Internal plugin that is used to stop the default editor initialization and restoring the editor state\n* based on the `editor.config._watchdogInitialData` data.\n*/\nvar EditorWatchdogInitPlugin = class {\n\teditor;\n\t_data;\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t\tthis._data = editor.config.get(\"_watchdogInitialData\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.editor.data.on(\"init\", (evt) => {\n\t\t\tevt.stop();\n\t\t\tthis.editor.model.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\t\tthis._restoreCollaborationData();\n\t\t\t\tthis._restoreEditorData(writer);\n\t\t\t});\n\t\t\tthis.editor.data.fire(\"ready\");\n\t\t}, { priority: 999 });\n\t}\n\t/**\n\t* Creates a model node (element or text) based on provided JSON.\n\t*/\n\t_createNode(writer, jsonNode) {\n\t\tif (\"name\" in jsonNode) {\n\t\t\tconst element = writer.createElement(jsonNode.name, jsonNode.attributes);\n\t\t\tif (jsonNode.children) for (const child of jsonNode.children) element._appendChild(this._createNode(writer, child));\n\t\t\treturn element;\n\t\t} else return writer.createText(jsonNode.data, jsonNode.attributes);\n\t}\n\t/**\n\t* Restores the editor by setting the document data, roots attributes and markers.\n\t*/\n\t_restoreEditorData(writer) {\n\t\tconst editor = this.editor;\n\t\tObject.entries(this._data.roots).forEach(([rootName, { content, attributes }]) => {\n\t\t\tconst parsedNodes = JSON.parse(content);\n\t\t\tconst parsedAttributes = JSON.parse(attributes);\n\t\t\tconst rootElement = editor.model.document.getRoot(rootName);\n\t\t\tfor (const [key, value] of parsedAttributes) writer.setAttribute(key, value, rootElement);\n\t\t\tfor (const child of parsedNodes) {\n\t\t\t\tconst node = this._createNode(writer, child);\n\t\t\t\twriter.insert(node, rootElement, \"end\");\n\t\t\t}\n\t\t});\n\t\tObject.entries(this._data.markers).forEach(([markerName, markerOptions]) => {\n\t\t\tconst { document } = editor.model;\n\t\t\tconst { rangeJSON: { start, end }, ...options } = markerOptions;\n\t\t\tconst root = document.getRoot(start.root);\n\t\t\tconst startPosition = writer.createPositionFromPath(root, start.path, start.stickiness);\n\t\t\tconst endPosition = writer.createPositionFromPath(root, end.path, end.stickiness);\n\t\t\tconst range = writer.createRange(startPosition, endPosition);\n\t\t\twriter.addMarker(markerName, {\n\t\t\t\trange,\n\t\t\t\t...options\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Restores the editor collaboration data - comment threads and suggestions.\n\t*/\n\t_restoreCollaborationData() {\n\t\tconst parsedCommentThreads = JSON.parse(this._data.commentThreads);\n\t\tconst parsedSuggestions = JSON.parse(this._data.suggestions);\n\t\tif (this.editor.plugins.has(\"CommentsRepository\")) {\n\t\t\tconst commentsRepository = this.editor.plugins.get(\"CommentsRepository\");\n\t\t\tfor (const commentThread of commentsRepository.getCommentThreads()) commentsRepository._removeCommentThread({ threadId: commentThread.id });\n\t\t\tparsedCommentThreads.forEach((commentThreadData) => {\n\t\t\t\tconst channelId = this.editor.config.get(\"collaboration.channelId\");\n\t\t\t\tthis.editor.plugins.get(\"CommentsRepository\").addCommentThread({\n\t\t\t\t\tchannelId,\n\t\t\t\t\t...commentThreadData\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\tif (this.editor.plugins.has(\"TrackChangesEditing\")) {\n\t\t\tconst trackChangesEditing = this.editor.plugins.get(\"TrackChangesEditing\");\n\t\t\tfor (const suggestion of trackChangesEditing.getSuggestions()) trackChangesEditing._removeSuggestion(suggestion);\n\t\t\tparsedSuggestions.forEach((suggestionData) => {\n\t\t\t\ttrackChangesEditing.addSuggestionData(suggestionData);\n\t\t\t});\n\t\t}\n\t}\n};\n/**\n* An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n*/\nfunction isElement$1(value) {\n\treturn isElement(value);\n}\n/**\n* Reads the editable options persisted in the root's `$rootEditableOptions` model attribute and returns them as a\n* {@link module:core/editor/editorconfig~RootConfig} partial. It is used to recreate a detached editable when the\n* editor is restarted in the config-based creator mode.\n*\n* Only the known `placeholder`, `label` and `element` fields with a value are copied; their values are validated and\n* normalized later by the editor constructor. Fields are returned only when set, so merging the result does not\n* overwrite the existing restart config with `undefined`. A missing or tampered (non-object) value is dropped so it\n* cannot break the restart.\n*\n* @param serializedAttributes The root attributes serialized as a JSON string of `[ key, value ]` entries.\n*/\nfunction getSavedRootEditableOptions(serializedAttributes) {\n\tconst { $rootEditableOptions: options } = Object.fromEntries(JSON.parse(serializedAttributes));\n\tif (!options || typeof options != \"object\") return {};\n\treturn {\n\t\t...options.placeholder && { placeholder: options.placeholder },\n\t\t...options.label && { label: options.label },\n\t\t...options.element && { element: options.element }\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 watchdog/contextwatchdog\n*/\nconst mainQueueId = Symbol(\"MainQueueId\");\n/**\n* A watchdog for the {@link module:core/context~Context} class.\n*\n* See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and\n* how to use it.\n*/\nvar ContextWatchdog = class extends Watchdog {\n\t/**\n\t* A map of internal watchdogs for added items.\n\t*/\n\t_watchdogs = /* @__PURE__ */ new Map();\n\t/**\n\t* The watchdog configuration.\n\t*/\n\t_watchdogConfig;\n\t/**\n\t* The current context instance.\n\t*/\n\t_context = null;\n\t/**\n\t* Context properties (nodes/references) that are gathered during the initial context creation\n\t* and are used to distinguish the origin of an error.\n\t*/\n\t_contextProps = /* @__PURE__ */ new Set();\n\t/**\n\t* An action queue, which is used to handle async functions queuing.\n\t*/\n\t_actionQueues = new ActionQueues();\n\t/**\n\t* The configuration for the {@link module:core/context~Context}.\n\t*/\n\t_contextConfig;\n\t/**\n\t* The watched item.\n\t*/\n\t_item;\n\t/**\n\t* The context watchdog class constructor.\n\t*\n\t* ```ts\n\t* const watchdog = new ContextWatchdog( Context );\n\t*\n\t* await watchdog.create( contextConfiguration );\n\t*\n\t* await watchdog.add( item );\n\t* ```\n\t*\n\t* See the {@glink features/watchdog Watchdog feature guide} to learn more how to use this feature.\n\t*\n\t* @param Context The {@link module:core/context~Context} class.\n\t* @param watchdogConfig The watchdog configuration.\n\t*/\n\tconstructor(Context, watchdogConfig = {}) {\n\t\tsuper(watchdogConfig);\n\t\tthis._watchdogConfig = watchdogConfig;\n\t\tthis._creator = (contextConfig) => Context.create(contextConfig);\n\t\tthis._destructor = (context) => context.destroy();\n\t\tthis._actionQueues.onEmpty(() => {\n\t\t\tif (this.state === \"initializing\") {\n\t\t\t\tthis.state = \"ready\";\n\t\t\t\tthis._fire(\"stateChange\");\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Sets the function that is responsible for the context creation.\n\t* It expects a function that should return a promise (or `undefined`).\n\t*\n\t* ```ts\n\t* watchdog.setCreator( config => Context.create( config ) );\n\t* ```\n\t*/\n\tsetCreator(creator) {\n\t\tthis._creator = creator;\n\t}\n\t/**\n\t* Sets the function that is responsible for the context destruction.\n\t* Overrides the default destruction function, which destroys only the context instance.\n\t* It expects a function that should return a promise (or `undefined`).\n\t*\n\t* ```ts\n\t* watchdog.setDestructor( context => {\n\t* \t// Do something before the context is destroyed.\n\t*\n\t* \treturn context\n\t* \t\t.destroy()\n\t* \t\t.then( () => {\n\t* \t\t\t// Do something after the context is destroyed.\n\t* \t\t} );\n\t* } );\n\t* ```\n\t*/\n\tsetDestructor(destructor) {\n\t\tthis._destructor = destructor;\n\t}\n\t/**\n\t* The context instance. Keep in mind that this property might be changed when the context watchdog restarts,\n\t* so do not keep this instance internally. Always operate on the `ContextWatchdog#context` property.\n\t*/\n\tget context() {\n\t\treturn this._context;\n\t}\n\t/**\n\t* Initializes the context watchdog. Once it is created, the watchdog takes care about\n\t* recreating the context and the provided items, and starts the error handling mechanism.\n\t*\n\t* ```ts\n\t* await watchdog.create( {\n\t* \tplugins: []\n\t* } );\n\t* ```\n\t*\n\t* @param contextConfig The context configuration. See {@link module:core/context~Context}.\n\t*/\n\tcreate(contextConfig = {}) {\n\t\treturn this._actionQueues.enqueue(mainQueueId, () => {\n\t\t\tthis._contextConfig = contextConfig;\n\t\t\treturn this._create();\n\t\t});\n\t}\n\t/**\n\t* Returns an item instance with the given `itemId`.\n\t*\n\t* ```ts\n\t* const editor1 = watchdog.getItem( 'editor1' );\n\t* ```\n\t*\n\t* @param itemId The item ID.\n\t* @returns The item instance or `undefined` if an item with a given ID has not been found.\n\t*/\n\tgetItem(itemId) {\n\t\treturn this._getWatchdog(itemId)._item;\n\t}\n\t/**\n\t* Gets the state of the given item. See {@link #state} for a list of available states.\n\t*\n\t* ```ts\n\t* const editor1State = watchdog.getItemState( 'editor1' );\n\t* ```\n\t*\n\t* @param itemId Item ID.\n\t* @returns The state of the item.\n\t*/\n\tgetItemState(itemId) {\n\t\treturn this._getWatchdog(itemId).state;\n\t}\n\t/**\n\t* Adds items to the watchdog. Once created, instances of these items will be available using the {@link #getItem} method.\n\t*\n\t* Items can be passed together as an array of objects:\n\t*\n\t* ```ts\n\t* await watchdog.add( [ {\n\t* \tid: 'editor1',\n\t* \ttype: 'editor',\n\t* \tconfig: {\n\t* \t\tattachTo: document.querySelector( '#editor' ),\n\t* \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t* \t\ttoolbar: [ 'bold', 'italic', 'alignment' ]\n\t* \t},\n\t* \tcreator: config => ClassicEditor.create( config )\n\t* } ] );\n\t* ```\n\t*\n\t* Or one by one as objects:\n\t*\n\t* ```ts\n\t* await watchdog.add( {\n\t* \tid: 'editor1',\n\t* \ttype: 'editor',\n\t* \tconfig: {\n\t* \t\tattachTo: document.querySelector( '#editor' ),\n\t* \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t* \t\ttoolbar: [ 'bold', 'italic', 'alignment' ]\n\t* \t},\n\t* \tcreator: config => ClassicEditor.create( config )\n\t* } );\n\t* ```\n\t*\n\t* Then an instance can be retrieved using the {@link #getItem} method:\n\t*\n\t* ```ts\n\t* const editor1 = watchdog.getItem( 'editor1' );\n\t* ```\n\t*\n\t* Note that this method can be called multiple times, but for performance reasons it is better\n\t* to pass all items together.\n\t*\n\t* @param itemConfigurationOrItemConfigurations An item configuration object or an array of item configurations.\n\t*/\n\tadd(itemConfigurationOrItemConfigurations) {\n\t\tconst itemConfigurations = toArray(itemConfigurationOrItemConfigurations);\n\t\treturn Promise.all(itemConfigurations.map((item) => {\n\t\t\treturn this._actionQueues.enqueue(item.id, () => {\n\t\t\t\tif (this.state === \"destroyed\") throw new Error(\"Cannot add items to destroyed watchdog.\");\n\t\t\t\tif (!this._context) throw new Error(\"Context was not created yet. You should call the `ContextWatchdog#create()` method first.\");\n\t\t\t\tlet watchdog;\n\t\t\t\tif (this._watchdogs.has(item.id)) throw new Error(`Item with the given id is already added: '${item.id}'.`);\n\t\t\t\tif (item.type === \"editor\") {\n\t\t\t\t\twatchdog = new EditorWatchdog(null, this._watchdogConfig);\n\t\t\t\t\twatchdog.setCreator(item.creator);\n\t\t\t\t\twatchdog._setExcludedProperties(this._contextProps);\n\t\t\t\t\tif (item.destructor) watchdog.setDestructor(item.destructor);\n\t\t\t\t\tthis._watchdogs.set(item.id, watchdog);\n\t\t\t\t\twatchdog.on(\"error\", (evt, { error, causesRestart }) => {\n\t\t\t\t\t\tthis._fire(\"itemError\", {\n\t\t\t\t\t\t\titemId: item.id,\n\t\t\t\t\t\t\terror\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (!causesRestart) return;\n\t\t\t\t\t\tthis._actionQueues.enqueue(item.id, () => new Promise((res) => {\n\t\t\t\t\t\t\tconst rethrowRestartEventOnce = () => {\n\t\t\t\t\t\t\t\twatchdog.off(\"restart\", rethrowRestartEventOnce);\n\t\t\t\t\t\t\t\tthis._fire(\"itemRestart\", { itemId: item.id });\n\t\t\t\t\t\t\t\tres();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\twatchdog.on(\"restart\", rethrowRestartEventOnce);\n\t\t\t\t\t\t}));\n\t\t\t\t\t});\n\t\t\t\t\tif (item.sourceElementOrData !== void 0) return watchdog.create(item.sourceElementOrData, item.config, this._context);\n\t\t\t\t\treturn watchdog.create(item.config, this._context);\n\t\t\t\t} else throw new Error(`Not supported item type: '${item.type}'.`);\n\t\t\t});\n\t\t}));\n\t}\n\t/**\n\t* Removes and destroys item(s) with given ID(s).\n\t*\n\t* ```ts\n\t* await watchdog.remove( 'editor1' );\n\t* ```\n\t*\n\t* Or\n\t*\n\t* ```ts\n\t* await watchdog.remove( [ 'editor1', 'editor2' ] );\n\t* ```\n\t*\n\t* @param itemIdOrItemIds Item ID or an array of item IDs.\n\t*/\n\tremove(itemIdOrItemIds) {\n\t\tconst itemIds = toArray(itemIdOrItemIds);\n\t\treturn Promise.all(itemIds.map((itemId) => {\n\t\t\treturn this._actionQueues.enqueue(itemId, () => {\n\t\t\t\tconst watchdog = this._getWatchdog(itemId);\n\t\t\t\tthis._watchdogs.delete(itemId);\n\t\t\t\treturn watchdog.destroy();\n\t\t\t});\n\t\t}));\n\t}\n\t/**\n\t* Destroys the context watchdog and all added items.\n\t* Once the context watchdog is destroyed, new items cannot be added.\n\t*\n\t* ```ts\n\t* await watchdog.destroy();\n\t* ```\n\t*/\n\tdestroy() {\n\t\treturn this._actionQueues.enqueue(mainQueueId, () => {\n\t\t\tthis.state = \"destroyed\";\n\t\t\tthis._fire(\"stateChange\");\n\t\t\tsuper.destroy();\n\t\t\treturn this._destroy();\n\t\t});\n\t}\n\t/**\n\t* Restarts the context watchdog.\n\t*/\n\t_restart() {\n\t\treturn this._actionQueues.enqueue(mainQueueId, () => {\n\t\t\tthis.state = \"initializing\";\n\t\t\tthis._fire(\"stateChange\");\n\t\t\treturn this._destroy().catch((err) => {\n\t\t\t\tconsole.error(\"An error happened during destroying the context or items.\", err);\n\t\t\t}).then(() => this._create()).then(() => this._fire(\"restart\"));\n\t\t});\n\t}\n\t/**\n\t* Initializes the context watchdog.\n\t*/\n\t_create() {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tthis._startErrorHandling();\n\t\t\treturn this._creator(this._contextConfig);\n\t\t}).then((context) => {\n\t\t\tthis._context = context;\n\t\t\tthis._contextProps = getSubNodes(this._context);\n\t\t\treturn Promise.all(Array.from(this._watchdogs.values()).map((watchdog) => {\n\t\t\t\twatchdog._setExcludedProperties(this._contextProps);\n\t\t\t\tif (watchdog._isUsingConfigBasedCreator) return watchdog.create(void 0, this._context);\n\t\t\t\treturn watchdog.create(void 0, void 0, this._context);\n\t\t\t}));\n\t\t});\n\t}\n\t/**\n\t* Destroys the context instance and all added items.\n\t*/\n\t_destroy() {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tthis._stopErrorHandling();\n\t\t\tconst context = this._context;\n\t\t\tthis._context = null;\n\t\t\tthis._contextProps = /* @__PURE__ */ new Set();\n\t\t\treturn Promise.all(Array.from(this._watchdogs.values()).map((watchdog) => watchdog.destroy())).then(() => this._destructor(context));\n\t\t});\n\t}\n\t/**\n\t* Returns the watchdog for a given item ID.\n\t*\n\t* @param itemId Item ID.\n\t*/\n\t_getWatchdog(itemId) {\n\t\tconst watchdog = this._watchdogs.get(itemId);\n\t\tif (!watchdog) throw new Error(`Item with the given id was not registered: ${itemId}.`);\n\t\treturn watchdog;\n\t}\n\t/**\n\t* Checks whether an error comes from the context instance and not from the item instances.\n\t*\n\t* @internal\n\t*/\n\t_isErrorComingFromThisItem(error) {\n\t\tfor (const watchdog of this._watchdogs.values()) if (watchdog._isErrorComingFromThisItem(error)) return false;\n\t\treturn areConnectedThroughProperties(this._context, error.context);\n\t}\n};\n/**\n* Manager of action queues that allows queuing async functions.\n*/\nvar ActionQueues = class {\n\t_onEmptyCallbacks = [];\n\t_queues = /* @__PURE__ */ new Map();\n\t_activeActions = 0;\n\t/**\n\t* Used to register callbacks that will be run when the queue becomes empty.\n\t*\n\t* @param onEmptyCallback A callback that will be run whenever the queue becomes empty.\n\t*/\n\tonEmpty(onEmptyCallback) {\n\t\tthis._onEmptyCallbacks.push(onEmptyCallback);\n\t}\n\t/**\n\t* It adds asynchronous actions (functions) to the proper queue and runs them one by one.\n\t*\n\t* @param queueId The action queue ID.\n\t* @param action A function that should be enqueued.\n\t*/\n\tenqueue(queueId, action) {\n\t\tconst isMainAction = queueId === mainQueueId;\n\t\tthis._activeActions++;\n\t\tif (!this._queues.get(queueId)) this._queues.set(queueId, Promise.resolve());\n\t\tconst queueWithAction = (isMainAction ? Promise.all(this._queues.values()) : Promise.all([this._queues.get(mainQueueId), this._queues.get(queueId)])).then(action);\n\t\tconst nonErrorQueue = queueWithAction.catch(() => {});\n\t\tthis._queues.set(queueId, nonErrorQueue);\n\t\treturn queueWithAction.finally(() => {\n\t\t\tthis._activeActions--;\n\t\t\tif (this._queues.get(queueId) === nonErrorQueue && this._activeActions === 0) this._onEmptyCallbacks.forEach((cb) => cb());\n\t\t});\n\t}\n};\n/**\n* Transforms any value to an array. If the provided value is already an array, it is returned unchanged.\n*\n* @param elementOrArray The value to transform to an array.\n* @returns An array created from data.\n*/\nfunction toArray(elementOrArray) {\n\treturn Array.isArray(elementOrArray) ? elementOrArray : [elementOrArray];\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* A plugin that records user actions and editor state changes for debugging purposes. It tracks commands execution, model operations,\n* UI interactions, and document events. It just collects data locally, and does not send it anywhere, integrator is responsible\n* for gathering data from this plugin for further processing.\n*\n* **Important! `ActionsRecorder` is an experimental feature, and may become deprecated.**\n*\n* By default, plugin stores latest 1000 action entries. Integrator can register an `onError` callback to collect those entries\n* in case of exception. Integrator should augment this data with application specific data such as page-id or session-id,\n* depending on the application. Augmented data should be processed by the integrator, for example integrator should send it\n* to some data collecting endpoint for later analysis.\n*\n* Example:\n*\n* ```ts\n* \tClassicEditor\n* \t\t.create( {\n* \t\t\tplugins: [ ActionsRecorder, ... ],\n* \t\t\tactionsRecorder: {\n* \t\t\t\tmaxEntries: 1000, // This is the default value and could be adjusted.\n*\n* \t\t\t\tonError( error, entries ) {\n* \t\t\t\t\tconsole.error( 'ActionsRecorder - Error detected:', error );\n* \t\t\t\t\tconsole.warn( 'Actions recorded before error:', entries );\n*\n* \t\t\t\t\tthis.flushEntries();\n*\n* \t\t\t\t\t// Integrator should send and store the entries. The error is already in the last entry in serializable form.\n* \t\t\t\t}\n* \t\t\t}\n* \t\t} )\n* \t\t.then( ... )\n* \t\t.catch( ... );\n* ```\n*\n* Alternatively integrator could continuously collect actions in batches and send them to theirs endpoint for later analysis:\n*\n* ```ts\n* \tClassicEditor\n* \t\t.create( {\n* \t\t\tplugins: [ ActionsRecorder, ... ],\n* \t\t\tactionsRecorder: {\n* \t\t\t\tmaxEntries: 50, // This is the batch size.\n*\n* \t\t\t\tonMaxEntries() {\n* \t\t\t\t\tconst entries = this.getEntries();\n*\n* \t\t\t\t\tthis.flushEntries();\n*\n* \t\t\t\t\tconsole.log( 'ActionsRecorder - Batch of entries:', entries );\n*\n* \t\t\t\t\t// Integrator should send and store the entries.\n* \t\t\t\t},\n*\n* \t\t\t\tonError( error, entries ) {\n* \t\t\t\t\tconsole.error( 'ActionsRecorder - Error detected:', error );\n* \t\t\t\t\tconsole.warn( 'Actions recorded before error:', entries );\n*\n* \t\t\t\t\tthis.flushEntries();\n*\n* \t\t\t\t\t// Integrator should send and store the entries. The error is already in the last entry in serializable form.\n* \t\t\t\t}\n* \t\t\t}\n* \t\t} )\n* \t\t.then( ... )\n* \t\t.catch( ... );\n* ```\n*\n* See {@link module:watchdog/actionsrecorderconfig~ActionsRecorderConfig plugin configuration} for more details.\n*\n*/\nvar ActionsRecorder = class {\n\t/**\n\t* The editor instance.\n\t*/\n\teditor;\n\t/**\n\t* Array storing all recorded action entries with their context and state snapshots.\n\t*/\n\t_entries = [];\n\t/**\n\t* Stack tracking nested action frames to maintain call hierarchy.\n\t*/\n\t_frameStack = [];\n\t/**\n\t* Set of already reported errors used to notify only once for each error (not on every try-catch nested block).\n\t*/\n\t_errors = /* @__PURE__ */ new Set();\n\t/**\n\t* Maximum number of action entries to keep in memory.\n\t*/\n\t_maxEntries;\n\t/**\n\t* Error callback.\n\t*/\n\t_errorCallback;\n\t/**\n\t* Filter function to determine which entries should be stored.\n\t*/\n\t_filterCallback;\n\t/**\n\t* Callback triggered every time count of recorded entries reaches maxEntries.\n\t*/\n\t_maxEntriesCallback;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ActionsRecorder\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t\teditor.config.define(\"actionsRecorder.maxEntries\", 1e3);\n\t\tconst config = editor.config.get(\"actionsRecorder\");\n\t\tthis._maxEntries = config.maxEntries;\n\t\tthis._filterCallback = config.onFilter;\n\t\tthis._errorCallback = config.onError;\n\t\tthis._maxEntriesCallback = config.onMaxEntries || this._maxEntriesDefaultHandler;\n\t\tthis._tapCommands();\n\t\tthis._tapOperationApply();\n\t\tthis._tapModelMethods();\n\t\tthis._tapModelSelection();\n\t\tthis._tapComponentFactory();\n\t\tthis._tapViewDocumentEvents();\n\t}\n\t/**\n\t* Returns all recorded action entries.\n\t*/\n\tgetEntries() {\n\t\treturn this._entries.slice();\n\t}\n\t/**\n\t* Flushes all recorded entries.\n\t*/\n\tflushEntries() {\n\t\tthis._entries = [];\n\t}\n\t/**\n\t* Creates a new action frame and adds it to the recording stack.\n\t*\n\t* @param action The name/type of the action being recorded.\n\t* @param params Optional parameters associated with the event.\n\t* @returns The created call frame object.\n\t*/\n\t_enterFrame(action, params) {\n\t\tconst callFrame = {\n\t\t\ttimeStamp: (/* @__PURE__ */ new Date()).toISOString(),\n\t\t\t...this._frameStack.length && { parentEntry: this._frameStack.at(-1) },\n\t\t\taction,\n\t\t\tparams: params?.map((param) => serializeValue(param)),\n\t\t\tbefore: this._buildStateSnapshot()\n\t\t};\n\t\tif (!this._filterCallback || this._filterCallback(callFrame, this._entries)) this._entries.push(callFrame);\n\t\tthis._frameStack.push(callFrame);\n\t\treturn callFrame;\n\t}\n\t/**\n\t* Closes an action frame and records its final state and results.\n\t*\n\t* @param callFrame The call frame to close.\n\t* @param result Optional result value from the action.\n\t* @param error Optional error that occurred during the action.\n\t*/\n\t_leaveFrame(callFrame, result, error) {\n\t\tconst topFrame = this._frameStack.pop();\n\t\tif (!topFrame || topFrame !== callFrame) return;\n\t\tif (result !== void 0) topFrame.result = serializeValue(result);\n\t\tif (error) topFrame.error = serializeValue(error);\n\t\ttopFrame.after = this._buildStateSnapshot();\n\t\tif (error) this._callErrorCallback(error);\n\t\tif (this._frameStack.length == 0) this._errors.clear();\n\t\tif (this._entries.length >= this._maxEntries) this._maxEntriesCallback();\n\t}\n\t/**\n\t* Builds a snapshot of the current editor state including document version,\n\t* read-only status, focus state, and model selection.\n\t*\n\t* @returns An object containing the current editor state snapshot.\n\t*/\n\t_buildStateSnapshot() {\n\t\tconst { model, isReadOnly, editing } = this.editor;\n\t\treturn {\n\t\t\tdocumentVersion: model.document.version,\n\t\t\teditorReadOnly: isReadOnly,\n\t\t\teditorFocused: editing.view.document.isFocused,\n\t\t\tmodelSelection: serializeValue(model.document.selection)\n\t\t};\n\t}\n\t/**\n\t* Sets up recording for all editor commands, both existing and future ones.\n\t* Taps into the command execution to track when commands are run.\n\t*/\n\t_tapCommands() {\n\t\tfor (const [commandName, command] of this.editor.commands) this._tapCommand(commandName, command);\n\t\ttapObjectMethod(this.editor.commands, \"add\", { before: (callContext, [commandName, command]) => {\n\t\t\tthis._tapCommand(commandName, command);\n\t\t\treturn false;\n\t\t} });\n\t}\n\t/**\n\t* Sets up recording for model operation applications.\n\t* Tracks when operations are applied to the model document.\n\t*/\n\t_tapOperationApply() {\n\t\ttapObjectMethod(this.editor.model, \"applyOperation\", {\n\t\t\tbefore: (callContext, [operation]) => {\n\t\t\t\tif (operation.baseVersion === null) return false;\n\t\t\t\tcallContext.callFrame = this._enterFrame(\"model.applyOperation\", [operation]);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: (callContext) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame);\n\t\t\t},\n\t\t\terror: (callContext, error) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, void 0, error);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Sets up recording for key model methods like insertContent, insertObject, and deleteContent.\n\t* These methods represent high-level model manipulation operations.\n\t*/\n\t_tapModelMethods() {\n\t\tfor (const methodName of [\n\t\t\t\"insertContent\",\n\t\t\t\"insertObject\",\n\t\t\t\"deleteContent\"\n\t\t]) tapObjectMethod(this.editor.model, methodName, {\n\t\t\tbefore: (callContext, ...params) => {\n\t\t\t\tcallContext.callFrame = this._enterFrame(`model.${methodName}`, params);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: (callContext, result) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, result);\n\t\t\t},\n\t\t\terror: (callContext, error) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, void 0, error);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Sets up recording for model selection changes.\n\t* Tracks when the selection range, attributes, or markers change.\n\t*/\n\t_tapModelSelection() {\n\t\tthis._tapFireMethod(this.editor.model.document.selection, [\n\t\t\t\"change:range\",\n\t\t\t\"change:attribute\",\n\t\t\t\"change:marker\"\n\t\t], { eventSource: \"model-selection\" });\n\t}\n\t/**\n\t* Sets up recording for a specific command execution.\n\t*\n\t* @param commandName The name of the command to record.\n\t* @param command The command instance to tap into.\n\t*/\n\t_tapCommand(commandName, command) {\n\t\ttapObjectMethod(command, \"execute\", {\n\t\t\tbefore: (callContext, params) => {\n\t\t\t\tcallContext.callFrame = this._enterFrame(`commands.${commandName}:execute`, params);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: (callContext, result) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, result);\n\t\t\t},\n\t\t\terror: (callContext, error) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, void 0, error);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Sets up recording for UI component factory creation and component interactions.\n\t* Tracks when components are created and their execute events.\n\t*/\n\t_tapComponentFactory() {\n\t\ttapObjectMethod(this.editor.ui.componentFactory, \"create\", {\n\t\t\tbefore: (callContext, [componentName]) => {\n\t\t\t\tcallContext.componentName = componentName;\n\t\t\t\tcallContext.callFrame = this._enterFrame(`component-factory.create:${componentName}`);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: (callContext, componentInstance) => {\n\t\t\t\tconst executeContext = {\n\t\t\t\t\t...callContext,\n\t\t\t\t\teventSource: `component.${callContext.componentName}`\n\t\t\t\t};\n\t\t\t\tif (typeof componentInstance.fire == \"function\") this._tapFireMethod(componentInstance, [\"execute\"], executeContext);\n\t\t\t\tif (typeof componentInstance.panelView?.fire == \"function\") this._tapFireMethod(componentInstance.panelView, [\"execute\"], executeContext);\n\t\t\t\tif (typeof componentInstance.buttonView?.actionView?.fire == \"function\") this._tapFireMethod(componentInstance.buttonView.actionView, [\"execute\"], executeContext);\n\t\t\t\tthis._leaveFrame(callContext.callFrame);\n\t\t\t},\n\t\t\terror: (callContext, error) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, void 0, error);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Sets up recording for view document events like clicks, keyboard input,\n\t* selection changes, and other user interactions.\n\t*/\n\t_tapViewDocumentEvents() {\n\t\tthis._tapFireMethod(this.editor.editing.view.document, [\n\t\t\t\"click\",\n\t\t\t\"mousedown\",\n\t\t\t\"mouseup\",\n\t\t\t\"pointerdown\",\n\t\t\t\"pointerup\",\n\t\t\t\"focus\",\n\t\t\t\"blur\",\n\t\t\t\"keydown\",\n\t\t\t\"keyup\",\n\t\t\t\"selectionChange\",\n\t\t\t\"compositionstart\",\n\t\t\t\"compositionend\",\n\t\t\t\"beforeinput\",\n\t\t\t\"mutations\",\n\t\t\t\"enter\",\n\t\t\t\"delete\",\n\t\t\t\"insertText\",\n\t\t\t\"paste\",\n\t\t\t\"copy\",\n\t\t\t\"cut\",\n\t\t\t\"dragstart\",\n\t\t\t\"drop\"\n\t\t], { eventSource: \"observers\" });\n\t}\n\t/**\n\t* Sets up recording for specific events fired by an emitter object.\n\t*\n\t* @param emitter The object that fires events to be recorded.\n\t* @param eventNames Array of event names to record.\n\t* @param context Additional context to include with recorded events.\n\t*/\n\t_tapFireMethod(emitter, eventNames, context = {}) {\n\t\ttapObjectMethod(emitter, \"fire\", {\n\t\t\tbefore: (callContext, [eventInfoOrName, ...params]) => {\n\t\t\t\tconst eventName = typeof eventInfoOrName == \"string\" ? eventInfoOrName : eventInfoOrName.name;\n\t\t\t\tif (!eventNames.includes(eventName)) return false;\n\t\t\t\tcallContext.callFrame = this._enterFrame(`${callContext.eventSource}:${eventName}`, params);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: (callContext, result) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, result);\n\t\t\t},\n\t\t\terror: (callContext, error) => {\n\t\t\t\tthis._leaveFrame(callContext.callFrame, void 0, error);\n\t\t\t}\n\t\t}, context);\n\t}\n\t/**\n\t* Triggers error callback.\n\t*/\n\t_callErrorCallback(error) {\n\t\tif (!this._errorCallback || this._errors.has(error)) return;\n\t\tthis._errors.add(error);\n\t\ttry {\n\t\t\tthis._errorCallback(error, this.getEntries());\n\t\t} catch (observerError) {\n\t\t\tconsole.error(\"ActionsRecorder onError callback error:\", observerError);\n\t\t}\n\t}\n\t/**\n\t* The default handler for maxEntries callback.\n\t*/\n\t_maxEntriesDefaultHandler() {\n\t\tthis._entries.shift();\n\t}\n};\n/**\n* Creates a wrapper around a method to record its calls, results, and errors.\n*\n* @internal\n*\n* @param object The object containing the method to tap.\n* @param methodName The name of the method to tap.\n* @param tap The tap configuration with before/after/error hooks.\n* @param context Additional context to include with the method calls.\n*/\nfunction tapObjectMethod(object, methodName, tap, context = {}) {\n\tconst originalMethod = object[methodName];\n\tif (originalMethod[Symbol.for(\"Tapped method\")]) return;\n\tobject[methodName] = (...args) => {\n\t\tconst callContext = Object.assign({}, context);\n\t\tlet shouldHandle;\n\t\ttry {\n\t\t\tshouldHandle = tap.before?.(callContext, args);\n\t\t\tconst result = originalMethod.apply(object, args);\n\t\t\tif (shouldHandle) tap.after?.(callContext, result);\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tif (shouldHandle) tap.error?.(callContext, error);\n\t\t\tthrow error;\n\t\t}\n\t};\n\tobject[methodName][Symbol.for(\"Tapped method\")] = originalMethod;\n}\n/**\n* Serializes a value into a JSON-serializable format.\n*\n* @internal\n*\n* @param value The value to serialize.\n* @param visited Set of already serialized objects to avoid circular references.\n* @returns A JSON-serializable representation of the value.\n*/\nfunction serializeValue(value, visited = /* @__PURE__ */ new WeakSet()) {\n\tif (!value || [\n\t\t\"boolean\",\n\t\t\"number\",\n\t\t\"string\"\n\t].includes(typeof value)) return value;\n\tif (typeof value.toJSON == \"function\") {\n\t\tconst jsonData = value.toJSON();\n\t\tif (isPlainObject(jsonData) || Array.isArray(jsonData) || [\n\t\t\t\"string\",\n\t\t\t\"number\",\n\t\t\t\"boolean\"\n\t\t].includes(typeof jsonData)) return serializeValue(jsonData, visited);\n\t}\n\tif (value instanceof Error) return {\n\t\tname: value.name,\n\t\tmessage: value.message,\n\t\tstack: value.stack\n\t};\n\tif (isTypeCheckable(value) || typeof value != \"object\") return {\n\t\ttype: typeof value,\n\t\tconstructor: value.constructor?.name || \"unknown\",\n\t\tstring: String(value)\n\t};\n\tif (value instanceof File || value instanceof Blob || value instanceof FormData || value instanceof DataTransfer) return String(value);\n\tif (visited.has(value)) return;\n\tvisited.add(value);\n\tif (Array.isArray(value)) return value.length ? value.map((item) => serializeValue(item, visited)) : void 0;\n\tconst result = {};\n\tconst ignoreFields = [];\n\tif (value.domEvent) {\n\t\tignoreFields.push(\"domEvent\", \"domTarget\", \"view\", \"document\");\n\t\tresult.domEvent = serializeDomEvent(value.domEvent);\n\t\tresult.target = serializeValue(value.target);\n\t\tif (value.dataTransfer) result.dataTransfer = {\n\t\t\ttypes: value.dataTransfer.types,\n\t\t\thtmlData: value.dataTransfer.getData(\"text/html\"),\n\t\t\tfiles: serializeValue(value.dataTransfer.files)\n\t\t};\n\t}\n\tfor (const [key, val] of Object.entries(value)) {\n\t\tif (key.startsWith(\"_\") || ignoreFields.includes(key) || typeof val == \"function\") continue;\n\t\tconst serializedValue = serializeValue(val, visited);\n\t\tif (serializedValue !== void 0) result[key] = serializedValue;\n\t}\n\tif (Symbol.iterator in value) {\n\t\tconst items = Array.from(value[Symbol.iterator]()).map((item) => serializeValue(item, visited));\n\t\tif (items.length) result._items = items;\n\t}\n\treturn Object.keys(result).length ? result : void 0;\n}\n/**\n* Serializes a DOM event into a plain object representation.\n*\n* Extracts common properties from DOM events such as type, target information,\n* coordinates, key codes, and other relevant event data for debugging purposes.\n*\n* @param event The DOM event to serialize.\n* @returns A serialized object containing the event's key properties.\n*/\nfunction serializeDomEvent(event) {\n\tlet serialized = {\n\t\ttype: event.type,\n\t\ttarget: serializeDOMTarget(event.target)\n\t};\n\tif (event instanceof MouseEvent) serialized = {\n\t\t...serialized,\n\t\tbutton: event.button,\n\t\tbuttons: event.buttons,\n\t\tctrlKey: event.ctrlKey,\n\t\tshiftKey: event.shiftKey,\n\t\taltKey: event.altKey,\n\t\tmetaKey: event.metaKey\n\t};\n\tif (event instanceof KeyboardEvent) serialized = {\n\t\t...serialized,\n\t\tkey: event.key,\n\t\tcode: event.code,\n\t\tkeyCode: event.keyCode,\n\t\tctrlKey: event.ctrlKey,\n\t\tshiftKey: event.shiftKey,\n\t\taltKey: event.altKey,\n\t\tmetaKey: event.metaKey,\n\t\trepeat: event.repeat\n\t};\n\tif (event instanceof InputEvent) serialized = {\n\t\t...serialized,\n\t\tdata: event.data,\n\t\tinputType: event.inputType,\n\t\tisComposing: event.isComposing\n\t};\n\tif (event instanceof PointerEvent) serialized = {\n\t\t...serialized,\n\t\tisPrimary: event.isPrimary\n\t};\n\t/**\n\t* Serializes a DOM event target into a plain object representation.\n\t*\n\t* @param target The DOM event target to serialize.\n\t* @returns A serialized object containing the target's information.\n\t*/\n\tfunction serializeDOMTarget(target) {\n\t\tif (!target) return null;\n\t\tif (target instanceof Element) return {\n\t\t\ttagName: target.tagName,\n\t\t\tclassName: target.className,\n\t\t\tid: target.id\n\t\t};\n\t\tif (target instanceof Window || target instanceof Document) return { type: target.constructor.name };\n\t\treturn {};\n\t}\n\treturn serialized;\n}\n/**\n* Checks if a value is type-checkable, meaning it has an `is` method.\n*/\nfunction isTypeCheckable(value) {\n\treturn value && typeof value.is === \"function\";\n}\n/* v8 ignore stop -- @preserve */\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 { ActionsRecorder, ContextWatchdog, EditorWatchdog, Watchdog };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module watchdog/watchdog\n */\n\nimport type { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport type { EditorWatchdogRestartEvent } from './editorwatchdog.js';\nimport type { ContextWatchdogItemErrorEvent, ContextWatchdogItemRestartEvent } from './contextwatchdog.js';\n\n/**\n * An abstract watchdog class that handles most of the error handling process and the state of the underlying component.\n *\n * See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and how to use it.\n *\n * @internal\n */\nexport abstract class Watchdog {\n\t/**\n\t * An array of crashes saved as an object with the following properties:\n\t *\n\t * * `message`: `String`,\n\t * * `stack`: `String`,\n\t * * `date`: `Number`,\n\t * * `filename`: `String | undefined`,\n\t * * `lineno`: `Number | undefined`,\n\t * * `colno`: `Number | undefined`,\n\t */\n\tpublic readonly crashes: Array<{\n\t\tmessage: string;\n\t\tstack?: string;\n\t\tdate: number;\n\n\t\t// `evt.filename`, `evt.lineno` and `evt.colno` are available only in ErrorEvent events\n\t\tfilename?: string;\n\t\tlineno?: number;\n\t\tcolno?: number;\n\t}> = [];\n\n\t/**\n\t * Specifies the state of the item watched by the watchdog. The state can be one of the following values:\n\t *\n\t * * `initializing` &ndash; Before the first initialization, and after crashes, before the item is ready.\n\t * * `ready` &ndash; A state when the user can interact with the item.\n\t * * `crashed` &ndash; A state when an error occurs. It quickly changes to `initializing` or `crashedPermanently`\n\t * depending on how many and how frequent errors have been caught recently.\n\t * * `crashedPermanently` &ndash; A state when the watchdog stops reacting to errors and keeps the item it is watching crashed,\n\t * * `destroyed` &ndash; A state when the item is manually destroyed by the user after calling `watchdog.destroy()`.\n\t */\n\tpublic state: WatchdogState = 'initializing';\n\n\t/**\n\t * @see module:watchdog/watchdog~WatchdogConfig\n\t */\n\tprivate _crashNumberLimit: number;\n\n\t/**\n\t * Returns the result of the `Date.now()` call. It can be overridden in tests to mock time as some popular\n\t * approaches like `sinon.useFakeTimers()` do not work well with error handling.\n\t */\n\tprivate _now = Date.now;\n\n\t/**\n\t * @see module:watchdog/watchdog~WatchdogConfig\n\t */\n\tprivate _minimumNonErrorTimePeriod: number;\n\n\t/**\n\t * Checks if the event error comes from the underlying item and restarts the item.\n\t */\n\tprivate _boundErrorHandler: ( evt: ErrorEvent | PromiseRejectionEvent ) => void;\n\n\t/**\n\t * The method responsible for restarting the watched item.\n\t */\n\tprotected abstract _restart(): Promise<unknown>;\n\n\t/**\n\t * Traverses the error context and the watched item to find out whether the error should\n\t * be handled by the given item.\n\t *\n\t * @internal\n\t */\n\tpublic abstract _isErrorComingFromThisItem( error: CKEditorError ): boolean;\n\n\t/**\n\t * The watched item.\n\t *\n\t * @internal\n\t */\n\tpublic abstract get _item(): unknown;\n\n\t/**\n\t * A dictionary of event emitter listeners.\n\t */\n\tprivate _listeners: Record<string, Array<( ...args: any ) => void>>;\n\n\t/**\n\t * @param {module:watchdog/watchdog~WatchdogConfig} config The watchdog plugin configuration.\n\t */\n\tconstructor( config: WatchdogConfig ) {\n\t\tthis.crashes = [];\n\t\tthis._crashNumberLimit = typeof config.crashNumberLimit === 'number' ? config.crashNumberLimit : 3;\n\t\tthis._minimumNonErrorTimePeriod = typeof config.minimumNonErrorTimePeriod === 'number' ? config.minimumNonErrorTimePeriod : 5000;\n\n\t\tthis._boundErrorHandler = evt => {\n\t\t\t// `evt.error` is exposed by EventError while `evt.reason` is available in PromiseRejectionEvent.\n\t\t\tconst error = 'error' in evt ? evt.error : evt.reason;\n\n\t\t\t// Note that `evt.reason` might be everything that is in the promise rejection.\n\t\t\t// Similarly everything that is thrown lands in `evt.error`.\n\t\t\tif ( error instanceof Error ) {\n\t\t\t\tthis._handleError( error, evt );\n\t\t\t}\n\t\t};\n\n\t\tthis._listeners = {};\n\n\t\tif ( !( this as any )._restart ) {\n\t\t\tthrow new Error(\n\t\t\t\t'The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. ' +\n\t\t\t\t'Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the watchdog and releases the resources.\n\t */\n\tpublic destroy(): void {\n\t\tthis._stopErrorHandling();\n\n\t\tthis._listeners = {};\n\t}\n\n\t/**\n\t * Starts listening to a specific event name by registering a callback that will be executed\n\t * whenever an event with a given name fires.\n\t *\n\t * Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t *\n\t * @param eventName The event name.\n\t * @param callback A callback which will be added to event listeners.\n\t */\n\tpublic on<K extends keyof WatchdogEventMap>( eventName: K, callback: WatchdogEventCallback<K> ): void {\n\t\tif ( !this._listeners[ eventName ] ) {\n\t\t\tthis._listeners[ eventName ] = [];\n\t\t}\n\n\t\tthis._listeners[ eventName ].push( callback );\n\t}\n\n\t/**\n\t * Stops listening to the specified event name by removing the callback from event listeners.\n\t *\n\t * Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t *\n\t * @param eventName The event name.\n\t * @param callback A callback which will be removed from event listeners.\n\t */\n\tpublic off( eventName: keyof WatchdogEventMap, callback: unknown ): void {\n\t\tthis._listeners[ eventName ] = this._listeners[ eventName ]\n\t\t\t.filter( cb => cb !== callback );\n\t}\n\n\t/**\n\t * Fires an event with a given event name and arguments.\n\t *\n\t * Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t */\n\tprotected _fire<K extends keyof WatchdogEventMap>( eventName: K, ...args: WatchdogEventArgs<K> ): void {\n\t\tconst callbacks = this._listeners[ eventName ] || [];\n\n\t\tfor ( const callback of callbacks ) {\n\t\t\tcallback.apply( this, [ null, ...args ] );\n\t\t}\n\t}\n\n\t/**\n\t * Starts error handling by attaching global error handlers.\n\t */\n\tprotected _startErrorHandling(): void {\n\t\twindow.addEventListener( 'error', this._boundErrorHandler );\n\t\twindow.addEventListener( 'unhandledrejection', this._boundErrorHandler );\n\t}\n\n\t/**\n\t * Stops error handling by detaching global error handlers.\n\t */\n\tprotected _stopErrorHandling(): void {\n\t\twindow.removeEventListener( 'error', this._boundErrorHandler );\n\t\twindow.removeEventListener( 'unhandledrejection', this._boundErrorHandler );\n\t}\n\n\t/**\n\t * Checks if an error comes from the watched item and restarts it.\n\t * It reacts to {@link module:utils/ckeditorerror~CKEditorError `CKEditorError` errors} only.\n\t *\n\t * @fires error\n\t * @param error Error.\n\t * @param evt An error event.\n\t */\n\tprivate _handleError( error: Error, evt: ErrorEvent | PromiseRejectionEvent ): void {\n\t\t// @if CK_DEBUG // const err = error as CKEditorError;\n\t\t// @if CK_DEBUG // if ( err.is && err.is( 'CKEditorError' ) && err.context === undefined ) {\n\t\t// @if CK_DEBUG // console.warn( 'The error is missing its context and Watchdog cannot restart the proper item.' );\n\t\t// @if CK_DEBUG // }\n\n\t\tif ( this._shouldReactToError( error ) ) {\n\t\t\tthis.crashes.push( {\n\t\t\t\tmessage: error.message,\n\t\t\t\tstack: error.stack,\n\n\t\t\t\t// `evt.filename`, `evt.lineno` and `evt.colno` are available only in ErrorEvent events\n\t\t\t\tfilename: evt instanceof ErrorEvent ? evt.filename : undefined,\n\t\t\t\tlineno: evt instanceof ErrorEvent ? evt.lineno : undefined,\n\t\t\t\tcolno: evt instanceof ErrorEvent ? evt.colno : undefined,\n\t\t\t\tdate: this._now()\n\t\t\t} );\n\n\t\t\tconst causesRestart = this._shouldRestart();\n\n\t\t\tthis.state = 'crashed';\n\t\t\tthis._fire( 'stateChange' );\n\t\t\tthis._fire( 'error', { error, causesRestart } );\n\n\t\t\tif ( causesRestart ) {\n\t\t\t\tthis._restart();\n\t\t\t} else {\n\t\t\t\tthis.state = 'crashedPermanently';\n\t\t\t\tthis._fire( 'stateChange' );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether an error should be handled by the watchdog.\n\t *\n\t * @param error An error that was caught by the error handling process.\n\t */\n\tprivate _shouldReactToError( error: Error ): boolean {\n\t\treturn (\n\t\t\t( error as any ).is &&\n\t\t\t( error as any ).is( 'CKEditorError' ) &&\n\t\t\t( error as CKEditorError ).context !== undefined &&\n\n\t\t\t// In some cases the watched item should not be restarted - e.g. during the item initialization.\n\t\t\t// That's why the `null` was introduced as a correct error context which does cause restarting.\n\t\t\t( error as CKEditorError ).context !== null &&\n\n\t\t\t// Do not react to errors if the watchdog is in states other than `ready`.\n\t\t\tthis.state === 'ready' &&\n\n\t\t\tthis._isErrorComingFromThisItem( error as CKEditorError )\n\t\t);\n\t}\n\n\t/**\n\t * Checks if the watchdog should restart the underlying item.\n\t */\n\tprivate _shouldRestart(): boolean {\n\t\tif ( this.crashes.length <= this._crashNumberLimit ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst lastErrorTime = this.crashes[ this.crashes.length - 1 ].date;\n\t\tconst firstMeaningfulErrorTime = this.crashes[ this.crashes.length - 1 - this._crashNumberLimit ].date;\n\n\t\tconst averageNonErrorTimePeriod = ( lastErrorTime - firstMeaningfulErrorTime ) / this._crashNumberLimit;\n\n\t\treturn averageNonErrorTimePeriod > this._minimumNonErrorTimePeriod;\n\t}\n}\n\n/**\n * Fired when a new {@link module:utils/ckeditorerror~CKEditorError `CKEditorError`} error connected to the watchdog instance occurs\n * and the watchdog will react to it.\n *\n * ```ts\n * watchdog.on( 'error', ( evt, { error, causesRestart } ) => {\n * \tconsole.log( 'An error occurred.' );\n * } );\n * ```\n *\n * @eventName ~Watchdog#error\n */\nexport type WatchdogErrorEvent = {\n\tname: 'error';\n\targs: [ WatchdogErrorEventData ];\n};\n\n/**\n * The `error` event data.\n */\nexport type WatchdogErrorEventData = {\n\terror: Error;\n\tcausesRestart: boolean;\n};\n\n/**\n * Fired when the watchdog state changed.\n *\n * @eventName ~Watchdog#stateChange\n */\nexport type WatchdogStateChangeEvent = {\n\tname: 'stateChange';\n\targs: [];\n};\n\n/**\n * The map of watchdog events.\n */\nexport interface WatchdogEventMap {\n\tstateChange: WatchdogStateChangeEvent;\n\terror: WatchdogErrorEvent;\n\trestart: EditorWatchdogRestartEvent;\n\titemError: ContextWatchdogItemErrorEvent;\n\titemRestart: ContextWatchdogItemRestartEvent;\n}\n\n/**\n * Utility type that gets the arguments type for the given event.\n */\nexport type WatchdogEventArgs<K extends keyof WatchdogEventMap> = WatchdogEventMap[ K ][ 'args' ];\n\n/**\n * Utility type that gets the callback type for the given event.\n */\nexport type WatchdogEventCallback<K extends keyof WatchdogEventMap> = ( evt: null, ...args: WatchdogEventArgs<K> ) => void;\n\n/**\n * The watchdog plugin configuration.\n */\nexport interface WatchdogConfig {\n\n\t/**\n\t * A threshold specifying the number of watched item crashes\n\t * when the watchdog stops restarting the item in case of errors.\n\t * After this limit is reached and the time between the last errors is shorter than `minimumNonErrorTimePeriod`,\n\t * the watchdog changes its state to `crashedPermanently` and it stops restarting the item. This prevents an infinite restart loop.\n\t *\n\t * @default 3\n\t */\n\tcrashNumberLimit?: number;\n\n\t/**\n\t * An average number of milliseconds between the last watched item errors\n\t * (defaults to 5000). When the period of time between errors is lower than that and the `crashNumberLimit` is also reached,\n\t * the watchdog changes its state to `crashedPermanently` and it stops restarting the item. This prevents an infinite restart loop.\n\t *\n\t * @default 5000\n\t */\n\tminimumNonErrorTimePeriod?: number;\n\n\t/**\n\t * A minimum number of milliseconds between saving the editor data internally (defaults to 5000).\n\t * Note that for large documents this might impact the editor performance.\n\t *\n\t * @default 5000\n\t */\n\tsaveInterval?: number;\n}\n\n/**\n * Specifies the state of the item watched by the watchdog.\n */\nexport type WatchdogState = 'initializing' | 'ready' | 'crashed' | 'crashedPermanently' | 'destroyed';\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/**\n * @module watchdog/utils/getsubnodes\n */\n\n/**\n * @internal\n */\nexport function getSubNodes( head: unknown, excludedProperties: Set<unknown> = new Set() ): Set<unknown> {\n\tconst nodes = [ head ];\n\n\t// @if CK_DEBUG_WATCHDOG // const prevNodeMap = new Map();\n\n\t// Nodes are stored to prevent infinite looping.\n\tconst subNodes = new Set();\n\tlet nodeIndex = 0;\n\n\twhile ( nodes.length > nodeIndex ) {\n\t\t// Incrementing the iterator is much faster than changing size of the array with Array.prototype.shift().\n\t\tconst node = nodes[ nodeIndex++ ];\n\n\t\tif ( subNodes.has( node ) || !shouldNodeBeIncluded( node ) || excludedProperties.has( node ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tsubNodes.add( node );\n\n\t\t// Handle arrays, maps, sets, custom collections that implements `[ Symbol.iterator ]()`, etc.\n\t\tif ( Symbol.iterator in node ) {\n\t\t\t// The custom editor iterators might cause some problems if the editor is crashed.\n\t\t\ttry {\n\t\t\t\tfor ( const n of node as Iterable<unknown> ) {\n\t\t\t\t\tnodes.push( n );\n\n\t\t\t\t\t// @if CK_DEBUG_WATCHDOG // if ( !prevNodeMap.has( n ) ) {\n\t\t\t\t\t// @if CK_DEBUG_WATCHDOG // \tprevNodeMap.set( n, node );\n\t\t\t\t\t// @if CK_DEBUG_WATCHDOG // }\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// Do not log errors for broken structures\n\t\t\t\t// since we are in the error handling process already.\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( const key in node ) {\n\t\t\t\t// We share a reference via the protobuf library within the editors,\n\t\t\t\t// hence the shared value should be skipped. Although, it's not a perfect\n\t\t\t\t// solution since new places like that might occur in the future.\n\t\t\t\tif ( key === 'defaultValue' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tnodes.push( node[ key ] );\n\n\t\t\t\t// @if CK_DEBUG_WATCHDOG // if ( !prevNodeMap.has( node[ key ] ) ) {\n\t\t\t\t// @if CK_DEBUG_WATCHDOG // \tprevNodeMap.set( node[ key ], node );\n\t\t\t\t// @if CK_DEBUG_WATCHDOG // }\n\t\t\t}\n\t\t}\n\t}\n\n\t// @if CK_DEBUG_WATCHDOG // return { subNodes, prevNodeMap } as any;\n\n\treturn subNodes;\n}\n\nfunction shouldNodeBeIncluded( node: unknown ): node is Record<string, unknown> | Iterable<unknown> {\n\tconst type = Object.prototype.toString.call( node );\n\tconst typeOfNode = typeof node;\n\n\treturn !(\n\t\ttypeOfNode === 'number' ||\n\t\ttypeOfNode === 'boolean' ||\n\t\ttypeOfNode === 'string' ||\n\t\ttypeOfNode === 'symbol' ||\n\t\ttypeOfNode === 'function' ||\n\t\ttype === '[object Date]' ||\n\t\ttype === '[object RegExp]' ||\n\t\ttype === '[object Module]' ||\n\n\t\tnode === undefined ||\n\t\tnode === null ||\n\n\t\t// This flag is meant to exclude singletons shared across editor instances. So when an error is thrown in one editor,\n\t\t// the other editors connected through the reference to the same singleton are not restarted. This is a temporary workaround\n\t\t// until a better solution is found.\n\t\t// More in https://github.com/ckeditor/ckeditor5/issues/12292.\n\t\t( node as any )._watchdogExcluded ||\n\n\t\t// Skip native DOM objects, e.g. Window, nodes, events, etc.\n\t\tnode instanceof EventTarget ||\n\t\tnode instanceof Event\n\t);\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/**\n * @module watchdog/utils/areconnectedthroughproperties\n */\n\nimport { getSubNodes } from './getsubnodes.js';\n\n/**\n * Traverses both structures to find out whether there is a reference that is shared between both structures.\n *\n * @internal\n */\nexport function areConnectedThroughProperties(\n\ttarget1: unknown,\n\ttarget2: unknown,\n\texcludedNodes: Set<unknown> = new Set()\n): boolean {\n\tif ( target1 === target2 && isObject( target1 ) ) {\n\t\treturn true;\n\t}\n\n\t// @if CK_DEBUG_WATCHDOG // return checkConnectionBetweenProps( target1, target2, excludedNodes );\n\n\tconst subNodes1 = getSubNodes( target1, excludedNodes );\n\tconst subNodes2 = getSubNodes( target2, excludedNodes );\n\n\tfor ( const node of subNodes1 ) {\n\t\tif ( subNodes2.has( node ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/* v8 ignore start -- @preserve */\n// eslint-disable-next-line\nfunction checkConnectionBetweenProps( target1: unknown, target2: unknown, excludedNodes: any ) {\n\tconst { subNodes: subNodes1, prevNodeMap: prevNodeMap1 } = getSubNodes( target1, excludedNodes.subNodes ) as any;\n\tconst { subNodes: subNodes2, prevNodeMap: prevNodeMap2 } = getSubNodes( target2, excludedNodes.subNodes ) as any;\n\n\tfor ( const sharedNode of subNodes1 ) {\n\t\tif ( subNodes2.has( sharedNode ) ) {\n\t\t\tconst connection = [];\n\n\t\t\tconnection.push( sharedNode );\n\n\t\t\tlet node = prevNodeMap1.get( sharedNode );\n\n\t\t\twhile ( node && node !== target1 ) {\n\t\t\t\tconnection.push( node );\n\t\t\t\tnode = prevNodeMap1.get( node );\n\t\t\t}\n\n\t\t\tnode = prevNodeMap2.get( sharedNode );\n\n\t\t\twhile ( node && node !== target2 ) {\n\t\t\t\tconnection.unshift( node );\n\t\t\t\tnode = prevNodeMap2.get( node );\n\t\t\t}\n\n\t\t\tconsole.log( '--------' );\n\t\t\tconsole.log( { target1 } );\n\t\t\tconsole.log( { sharedNode } );\n\t\t\tconsole.log( { target2 } );\n\t\t\tconsole.log( { connection } );\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/* v8 ignore stop -- @preserve */\n\nfunction isObject( structure: unknown ): boolean {\n\treturn typeof structure === 'object' && structure !== null;\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/**\n * @module watchdog/utils/normalizerootsconfig\n */\n\nimport { isElement as _isElement } from 'es-toolkit/compat';\nimport type { EditorConfig } from '@ckeditor/ckeditor5-core';\n\n// Note: This file is a copy of core/editor/utils/normalizerootsconfig with some adjustments.\n// The main difference is that it does not use the `Config` class from `@ckeditor/ckeditor5-utils` and instead works\n// with a plain `EditorConfig` object. It also does not throw `CKEditorError` but a generic `Error` with a specific message.\n// It resolves root configuration for the editor, but does not care about real data in initialData as the watchdog does not need it.\n// It just needs to ensure that initialData is defined for all roots, so the editor features can work with it without additional checks.\n// Note that this helper modifies the provided config object.\n\n/**\n * Normalizes the editor roots configuration. It ensures that all root configurations are defined in `config.roots`\n * and that they have `initialData` defined.\n *\n * It normalizes a single-root configuration (where `config.root` is used) to a multi-root configuration\n * (where all roots are defined in `config.roots`). This is considered a standard configuration format,\n * so the editor features can always expect roots to be defined in `config.roots`.\n *\n * It also handles legacy configuration options, such as `config.initialData`, `config.placeholder`, and `config.label`.\n *\n * @internal\n */\nexport function normalizeRootsConfig(\n\tsourceElementsOrData: HTMLElement | string | Record<string, HTMLElement> | Record<string, string>,\n\tconfig: EditorConfig,\n\tdefaultRootName: string | false\n): void {\n\tconst mainRootConfig = config.root;\n\tconst rootsConfig = config.roots || Object.create( null );\n\n\t// Move `config.root` to `config.roots.main`.\n\t// This makes access to root configuration more consistent as all roots will be defined in `config.roots`.\n\tif ( defaultRootName && !rootsConfig[ defaultRootName ] ) {\n\t\trootsConfig[ defaultRootName ] = mainRootConfig || Object.create( null );\n\t}\n\n\tconst sourceElementIsPlainObject = isPlainObject( sourceElementsOrData );\n\n\t// Collect legacy configuration values for `initialData`, `placeholder`, and `label` from the config.\n\tconst legacyInitialData = getLegacyInitialData( config, sourceElementIsPlainObject, defaultRootName );\n\n\t// Collect root names. This includes root names from the source element (if it's an object),\n\t// from `config.roots`, and from legacy config. This ensures that all roots are processed in the next step.\n\tconst rootNames = Array.from( new Set( [\n\t\t...sourceElementIsPlainObject ? Object.keys( sourceElementsOrData ) : [],\n\t\t...Object.keys( rootsConfig ),\n\t\t...Object.keys( legacyInitialData )\n\t] ) );\n\n\t// Ensure that all roots have `initialData` defined. If not, try to get it from the source element or data.\n\tfor ( const rootName of rootNames ) {\n\t\tconst rootConfig = rootsConfig[ rootName ] || Object.create( null );\n\n\t\t// Watchdog does not need HTML, it uses dedicated plugin for restoring the model.\n\t\t// As watchdog uses only DOM element or map of DOM elements for sourceElementsOrData,\n\t\t// it can not use string as initial data, so it can be safely set to an empty string.\n\t\trootConfig.initialData = '';\n\n\t\t// Handle legacy `config.placeholder` and `config.label` for the root.\n\t\trootConfig.placeholder ??= getLegacyPlainConfigValue( config, 'placeholder', rootName );\n\t\trootConfig.label ??= getLegacyPlainConfigValue( config, 'label', rootName );\n\n\t\trootsConfig[ rootName ] = rootConfig;\n\t}\n\n\tconfig.roots = rootsConfig;\n}\n\n/**\n * Type guard to check if the provided value is a plain object.\n */\nfunction isPlainObject(\n\tsourceElementsOrData: HTMLElement | string | Record<string, HTMLElement> | Record<string, string>\n): sourceElementsOrData is Record<string, HTMLElement> | Record<string, string> {\n\treturn (\n\t\t!!sourceElementsOrData &&\n\t\ttypeof sourceElementsOrData == 'object' &&\n\t\t!Array.isArray( sourceElementsOrData ) &&\n\t\t!isElement( sourceElementsOrData )\n\t);\n}\n\n/**\n * Retrieve legacy configuration value for `initialData` from the config.\n * Normalize single-root config so returned value is always an object with root names as keys.\n */\nfunction getLegacyInitialData(\n\tconfig: EditorConfig,\n\tsourceElementIsObject: boolean,\n\tdefaultRootName: string | false\n): Record<string, string | undefined> {\n\treturn (\n\t\tsourceElementIsObject || !defaultRootName ?\n\t\t\tconfig.initialData || Object.create( null ) :\n\t\t\t{\n\t\t\t\t[ defaultRootName ]: config.initialData\n\t\t\t}\n\t) as Record<string, string | undefined>;\n}\n\n/**\n * Retrieve legacy configuration value for `placeholder` or `label` from the config for a specific root.\n */\nfunction getLegacyPlainConfigValue(\n\tconfig: EditorConfig,\n\tkey: 'placeholder' | 'label',\n\trootName: string\n): string | undefined {\n\tconst legacyValue = config[ key ];\n\n\tif ( legacyValue ) {\n\t\treturn typeof legacyValue == 'string' ? legacyValue : legacyValue[ rootName ];\n\t}\n}\n\n/**\n * An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n */\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\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/**\n * @module watchdog/editorwatchdog\n */\n\nimport { areConnectedThroughProperties } from './utils/areconnectedthroughproperties.js';\nimport { normalizeRootsConfig } from './utils/normalizerootsconfig.js';\nimport { Watchdog, type WatchdogConfig } from './watchdog.js';\n\nimport type {\n\tCKEditorError\n} from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tModelNode,\n\tModelText,\n\tModelElement,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport type {\n\tEditor,\n\tEditorConfig,\n\tContext,\n\tEditorReadyEvent,\n\tRootConfig\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\tthrottle,\n\tcloneDeepWith,\n\tisElement as _isElement\n} from 'es-toolkit/compat';\n\n/**\n * A watchdog for CKEditor 5 editors.\n *\n * See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and\n * how to use it.\n */\nexport class EditorWatchdog<TEditor extends Editor = Editor> extends Watchdog {\n\t/**\n\t * The current editor instance.\n\t */\n\tprivate _editor: TEditor | null = null;\n\n\t/**\n\t * A promise associated with the life cycle of the editor (creation or destruction processes).\n\t *\n\t * It is used to prevent the initialization of the editor if the previous instance has not been destroyed yet,\n\t * and conversely, to prevent the destruction of the editor if it has not been initialized.\n\t */\n\tprivate _lifecyclePromise: Promise<unknown> | null = null;\n\n\t/**\n\t * Throttled save method. The `save()` method is called the specified `saveInterval` after `throttledSave()` is called,\n\t * unless a new action happens in the meantime.\n\t */\n\tprivate _throttledSave: ReturnType<typeof throttle<() => void>>;\n\n\t/**\n\t * The latest saved editor data represented as a root name -> root data object.\n\t */\n\tprivate _data?: EditorData;\n\n\t/**\n\t * The last document version.\n\t */\n\tprivate _lastDocumentVersion?: number;\n\n\t/**\n\t * The editor source element or data.\n\t */\n\tprivate _elementOrData?: HTMLElement | string | Record<string, string> | Record<string, HTMLElement>;\n\n\t/**\n\t * Stores the original DOM element for single-root editors.\n\t */\n\tprivate _editorAttachTo: HTMLElement | null = null;\n\n\t/**\n\t * Specifies whether the editor is a single-root editor (e.g. ClassicEditor) or a multi-root editor (e.g. MultiRootEditor).\n\t */\n\tprivate _isSingleRootEditor: boolean = true;\n\n\t/**\n\t * Specifies whether the editor was created using config-based creator mode (without a source element or data as the first argument).\n\t *\n\t * @internal\n\t */\n\tpublic _isUsingConfigBasedCreator: boolean = false;\n\n\t/**\n\t * The latest record of the editor editable elements. Used to restart the editor.\n\t */\n\tprivate _editables: Record<string, HTMLElement> = {};\n\n\t/**\n\t * The editor configuration.\n\t */\n\tprivate _config?: EditorConfig;\n\n\t/**\n\t * The creation method.\n\t *\n\t * @see #setCreator\n\t */\n\tdeclare protected _creator: EditorWatchdogCreatorFunction<TEditor>;\n\n\t/**\n\t * The destruction method.\n\t *\n\t * @see #setDestructor\n\t */\n\tdeclare protected _destructor: ( editor: Editor ) => Promise<unknown>;\n\n\tprivate _excludedProps?: Set<unknown>;\n\n\t/**\n\t * @param Editor The editor class.\n\t * @param watchdogConfig The watchdog plugin configuration.\n\t */\n\tconstructor( Editor: { create( ...args: any ): Promise<TEditor> } | null, watchdogConfig: WatchdogConfig = {} ) {\n\t\tsuper( watchdogConfig );\n\n\t\t// this._editorClass = Editor;\n\n\t\tthis._throttledSave = throttle(\n\t\t\tthis._save.bind( this ),\n\t\t\ttypeof watchdogConfig.saveInterval === 'number' ? watchdogConfig.saveInterval : 5000\n\t\t);\n\n\t\t// Set default creator and destructor functions:\n\t\tif ( Editor ) {\n\t\t\tthis._creator = ( ( elementOrDataOrConfig: any, config?: EditorConfig ) => {\n\t\t\t\tif ( config === undefined ) {\n\t\t\t\t\t// Config-based mode: first argument is the config.\n\t\t\t\t\treturn Editor.create( elementOrDataOrConfig );\n\t\t\t\t}\n\n\t\t\t\t// Legacy mode: first argument is element/data, second is config.\n\t\t\t\treturn Editor.create( elementOrDataOrConfig, config );\n\t\t\t} ) as EditorWatchdogCreatorFunction<TEditor>;\n\t\t}\n\n\t\tthis._destructor = editor => editor.destroy();\n\t}\n\n\t/**\n\t * The current editor instance.\n\t */\n\tpublic get editor(): TEditor | null {\n\t\treturn this._editor;\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic get _item(): TEditor | null {\n\t\treturn this._editor;\n\t}\n\n\t/**\n\t * Sets the function that is responsible for the editor creation.\n\t * It expects a function that should return a promise.\n\t *\n\t * For config-based editor creation:\n\t *\n\t * ```ts\n\t * watchdog.setCreator( config => ClassicEditor.create( config ) );\n\t * ```\n\t *\n\t * For legacy editor creation (with element or data as the first argument):\n\t *\n\t * ```ts\n\t * watchdog.setCreator( ( element, config ) => ClassicEditor.create( element, config ) );\n\t * ```\n\t */\n\tpublic setCreator( creator: EditorWatchdogCreatorFunction<TEditor> ): void {\n\t\tthis._creator = creator;\n\t}\n\n\t/**\n\t * Sets the function that is responsible for the editor destruction.\n\t * Overrides the default destruction function, which destroys only the editor instance.\n\t * It expects a function that should return a promise or `undefined`.\n\t *\n\t * ```ts\n\t * watchdog.setDestructor( editor => {\n\t * \t// Do something before the editor is destroyed.\n\t *\n\t * \treturn editor\n\t * \t\t.destroy()\n\t * \t\t.then( () => {\n\t * \t\t\t// Do something after the editor is destroyed.\n\t * \t\t} );\n\t * } );\n\t * ```\n\t */\n\tpublic setDestructor( destructor: ( editor: Editor ) => Promise<unknown> ): void {\n\t\tthis._destructor = destructor;\n\t}\n\n\t/**\n\t * Restarts the editor instance. This method is called whenever an editor error occurs. It fires the `restart` event and changes\n\t * the state to `initializing`.\n\t *\n\t * @fires restart\n\t */\n\tprotected override _restart(): Promise<unknown> {\n\t\treturn Promise.resolve()\n\t\t\t.then( () => {\n\t\t\t\tthis.state = 'initializing';\n\t\t\t\tthis._fire( 'stateChange' );\n\n\t\t\t\treturn this._destroy();\n\t\t\t} )\n\t\t\t.catch( err => {\n\t\t\t\tconsole.error( 'An error happened during the editor destroying.', err );\n\t\t\t} )\n\t\t\t.then( () => {\n\t\t\t\t// Pre-process some data from the original editor config.\n\t\t\t\t// Our goal here is to make sure that the restarted editor will be reinitialized with correct set of roots.\n\t\t\t\t// We are not interested in any data set in config. It will be replaced anyway.\n\t\t\t\t// But we need to set them correctly to make sure that proper roots are created.\n\t\t\t\t//\n\t\t\t\t// Since a different set of roots will be created, lazy-roots and roots-attributes must be managed too.\n\n\t\t\t\tif ( this._isUsingConfigBasedCreator ) {\n\t\t\t\t\t// In config-based creator mode, normalize using an empty source to ensure `config.root` is moved\n\t\t\t\t\t// to `config.roots.main` and other legacy config properties are handled.\n\t\t\t\t\tnormalizeRootsConfig(\n\t\t\t\t\t\tthis._isSingleRootEditor ? '' : {},\n\t\t\t\t\t\tthis._config!,\n\t\t\t\t\t\tthis._isSingleRootEditor ? 'main' : false\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// Normalize the roots configuration based on the editor source element or data and the editor configuration.\n\t\t\t\t\tnormalizeRootsConfig(\n\t\t\t\t\t\tthis._isSingleRootEditor ? this._editorAttachTo || '' : this._editables,\n\t\t\t\t\t\tthis._config!,\n\t\t\t\t\t\tthis._isSingleRootEditor ? 'main' : false\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst updatedConfig: EditorConfig = {\n\t\t\t\t\t...this._config,\n\t\t\t\t\textraPlugins: this._config!.extraPlugins || [],\n\t\t\t\t\t_watchdogInitialData: this._data\n\t\t\t\t};\n\n\t\t\t\t// Add content loading plugin to the editor configuration.\n\t\t\t\t// This plugin will be responsible for loading the editor data into the editor after it is restarted.\n\t\t\t\tupdatedConfig.extraPlugins!.push( EditorWatchdogInitPlugin );\n\n\t\t\t\t// Collect existing roots configuration and update it. This will ensure that the same set of roots\n\t\t\t\t// will be created after the restart, and they will have correct lazy loading and attributes configuration.\n\t\t\t\tconst updatedRootsConfig: Record<string, RootConfig> = {};\n\n\t\t\t\tfor ( const [ rootName, rootData ] of Object.entries( this._data!.roots ) ) {\n\t\t\t\t\tconst rootConfig = updatedConfig.roots![ rootName ] || Object.create( null );\n\n\t\t\t\t\t// Delete `initialData` as it is not needed. Data will be set by the watchdog based on `_watchdogInitialData`.\n\t\t\t\t\trootConfig.initialData = '';\n\n\t\t\t\t\t// Copy root element name as it is created in the editor constructor.\n\t\t\t\t\trootConfig.modelElement = rootData.modelElement;\n\n\t\t\t\t\t// Reuse previous DOM editable.\n\t\t\t\t\tif ( this._isUsingConfigBasedCreator ) {\n\t\t\t\t\t\tif ( this._editables[ rootName ]?.isConnected ) {\n\t\t\t\t\t\t\trootConfig.element = this._editables[ rootName ];\n\t\t\t\t\t\t} else if ( rootData.isLoaded && !rootConfig.element ) {\n\t\t\t\t\t\t\tObject.assign( rootConfig, getSavedRootEditableOptions( rootData.attributes ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( rootData.isLoaded ) {\n\t\t\t\t\t\trootConfig.lazyLoad = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdelete rootConfig.modelAttributes;\n\t\t\t\t\t}\n\n\t\t\t\t\tupdatedRootsConfig[ rootName ] = rootConfig;\n\t\t\t\t}\n\n\t\t\t\tupdatedConfig.roots = updatedRootsConfig;\n\n\t\t\t\t// Delete `initialData` as it is not needed. Data will be set by the watchdog based on `_watchdogInitialData`.\n\t\t\t\tdelete updatedConfig.initialData;\n\n\t\t\t\t// Also alias for main root should not provide initial data.\n\t\t\t\t// In fact, it should not provide any data as it is only an alias for the root defined in `config.roots`\n\t\t\t\t// and it is the `config.roots` that should be used to set up the initial data for the main root.\n\t\t\t\t// This would cause a crash while normalizing conflict when left as is.\n\t\t\t\tdelete updatedConfig.root;\n\n\t\t\t\tif ( this._isUsingConfigBasedCreator ) {\n\t\t\t\t\treturn this.create( updatedConfig, updatedConfig.context );\n\t\t\t\t}\n\n\t\t\t\tconst elementOrData = this._isSingleRootEditor ?\n\t\t\t\t\tthis._editorAttachTo || '' :\n\t\t\t\t\tthis._editables;\n\n\t\t\t\treturn this.create( elementOrData, updatedConfig, updatedConfig.context );\n\t\t\t} )\n\t\t\t.then( () => {\n\t\t\t\tthis._fire( 'restart' );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Creates the editor instance and keeps it running, using the defined creator and destructor.\n\t *\n\t * @param config The editor configuration.\n\t * @param context A context for the editor.\n\t */\n\tpublic create( config: EditorConfig, context?: Context ): Promise<unknown>;\n\n\t/**\n\t * Creates the editor instance and keeps it running, using the defined creator and destructor.\n\t *\n\t * **Note**: This method signature is deprecated and will be removed in the future release.\n\t *\n\t * @deprecated\n\t * @param elementOrData The editor source element or the editor data.\n\t * @param config The editor configuration.\n\t * @param context A context for the editor.\n\t */\n\tpublic create(\n\t\telementOrData: HTMLElement | string | Record<string, string> | Record<string, HTMLElement>,\n\t\tconfig: EditorConfig,\n\t\tcontext?: Context\n\t): Promise<unknown>;\n\n\tpublic create(\n\t\telementOrDataOrConfig: HTMLElement | string | Record<string, string> | Record<string, HTMLElement> |\n\t\t\tEditorConfig | undefined = this._isUsingConfigBasedCreator ? this._config! : this._elementOrData!,\n\t\tconfigOrContext: EditorConfig | Context | undefined = this._isUsingConfigBasedCreator ? undefined : this._config!,\n\t\tcontext?: Context\n\t): Promise<unknown> {\n\t\t// Detect config-based creator mode: first argument is a config object (not an element, string, or record of strings/elements).\n\t\t// The detection is skipped during restart (when `_elementOrData` or `_config` is already set).\n\t\tconst isUsingConfigBasedCreator = this._detectConfigBasedCreator( elementOrDataOrConfig, configOrContext );\n\t\tconst elementOrData = isUsingConfigBasedCreator ?\n\t\t\tundefined :\n\t\t\telementOrDataOrConfig as typeof this._elementOrData;\n\t\tconst config = isUsingConfigBasedCreator ?\n\t\t\telementOrDataOrConfig as EditorConfig :\n\t\t\tconfigOrContext as EditorConfig | undefined;\n\t\tconst resolvedContext = isUsingConfigBasedCreator ?\n\t\t\tconfigOrContext as Context | undefined :\n\t\t\tcontext;\n\n\t\tthis._lifecyclePromise = Promise.resolve( this._lifecyclePromise )\n\t\t\t.then( () => {\n\t\t\t\tsuper._startErrorHandling();\n\n\t\t\t\tthis._isUsingConfigBasedCreator = isUsingConfigBasedCreator;\n\t\t\t\tthis._elementOrData = elementOrData;\n\n\t\t\t\t// Clone configuration because it might be shared within multiple watchdog instances. Otherwise,\n\t\t\t\t// when an error occurs in one of these editors, the watchdog will restart all of them.\n\t\t\t\tthis._config = this._cloneEditorConfiguration( config || {} );\n\n\t\t\t\tthis._config!.context = resolvedContext;\n\n\t\t\t\t// Store the original DOM element for single-root editors. We can't use editable elements as ClassicEditor\n\t\t\t\t// expects the attachment element.\n\t\t\t\tif ( isUsingConfigBasedCreator ) {\n\t\t\t\t\t// In config-based creator mode, element references are already in the config\n\t\t\t\t\t// (`config.attachTo` or `config.roots.*.element`), so there's no need to store them separately.\n\t\t\t\t\tthis._editorAttachTo = null;\n\n\t\t\t\t\t// Detect single-root vs multi-root from config. The config might use `config.root` (alias),\n\t\t\t\t\t// `config.roots`, `config.attachTo`, or legacy `config.initialData`.\n\t\t\t\t\tconst rootsCount = this._config!.roots ? Object.keys( this._config!.roots ).length : 0;\n\t\t\t\t\tconst legacyInitialData = this._config!.initialData;\n\t\t\t\t\tconst isMultiRootFromLegacy = legacyInitialData && typeof legacyInitialData === 'object';\n\n\t\t\t\t\tthis._isSingleRootEditor = !isMultiRootFromLegacy && rootsCount <= 1;\n\t\t\t\t} else {\n\t\t\t\t\tthis._editorAttachTo = isElement( elementOrData ) ? elementOrData : null;\n\t\t\t\t\tthis._isSingleRootEditor = isElement( elementOrData ) || typeof elementOrData == 'string';\n\t\t\t\t}\n\n\t\t\t\tif ( isUsingConfigBasedCreator ) {\n\t\t\t\t\treturn ( this._creator as ( config: EditorConfig ) => Promise<TEditor> )( this._config! );\n\t\t\t\t}\n\n\t\t\t\treturn ( this._creator as (\n\t\t\t\t\telementOrData: typeof this._elementOrData, config: EditorConfig\n\t\t\t\t) => Promise<TEditor> )( elementOrData, this._config! );\n\t\t\t} )\n\t\t\t.then( editor => {\n\t\t\t\tthis._editor = editor;\n\n\t\t\t\teditor.model.document.on( 'change:data', this._throttledSave );\n\n\t\t\t\tthis._lastDocumentVersion = editor.model.document.version;\n\t\t\t\tthis._data = this._getData();\n\n\t\t\t\tif ( !this._editorAttachTo ) {\n\t\t\t\t\tthis._editables = this._getEditables();\n\t\t\t\t}\n\n\t\t\t\tthis.state = 'ready';\n\t\t\t\tthis._fire( 'stateChange' );\n\t\t\t} ).finally( () => {\n\t\t\t\tthis._lifecyclePromise = null;\n\t\t\t} );\n\n\t\treturn this._lifecyclePromise;\n\t}\n\n\t/**\n\t * Destroys the watchdog and the current editor instance. It fires the callback\n\t * registered in {@link #setDestructor `setDestructor()`} and uses it to destroy the editor instance.\n\t * It also sets the state to `destroyed`.\n\t */\n\tpublic override destroy(): Promise<unknown> {\n\t\tthis._lifecyclePromise = Promise.resolve( this._lifecyclePromise )\n\t\t\t.then( () => {\n\t\t\t\tthis.state = 'destroyed';\n\t\t\t\tthis._fire( 'stateChange' );\n\n\t\t\t\tsuper.destroy();\n\n\t\t\t\treturn this._destroy();\n\t\t\t} ).finally( () => {\n\t\t\t\tthis._lifecyclePromise = null;\n\t\t\t} );\n\n\t\treturn this._lifecyclePromise;\n\t}\n\n\tprivate _destroy(): Promise<unknown> {\n\t\treturn Promise.resolve()\n\t\t\t.then( () => {\n\t\t\t\tthis._stopErrorHandling();\n\n\t\t\t\tthis._throttledSave.cancel();\n\n\t\t\t\tconst editor = this._editor;\n\n\t\t\t\tthis._editor = null;\n\n\t\t\t\t// Remove the `change:data` listener before destroying the editor.\n\t\t\t\t// Incorrectly written plugins may trigger firing `change:data` events during the editor destruction phase\n\t\t\t\t// causing the watchdog to call `editor.getData()` when some parts of editor are already destroyed.\n\t\t\t\teditor!.model.document.off( 'change:data', this._throttledSave );\n\n\t\t\t\treturn this._destructor( editor! );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Saves the editor data, so it can be restored after the crash even if the data cannot be fetched at\n\t * the moment of the crash.\n\t */\n\tprivate _save(): void {\n\t\tconst version = this._editor!.model.document.version;\n\n\t\ttry {\n\t\t\tthis._data = this._getData();\n\n\t\t\tif ( !this._editorAttachTo ) {\n\t\t\t\tthis._editables = this._getEditables();\n\t\t\t}\n\n\t\t\tthis._lastDocumentVersion = version;\n\t\t} catch ( err ) {\n\t\t\tconsole.error(\n\t\t\t\terr,\n\t\t\t\t'An error happened during restoring editor data. ' +\n\t\t\t\t'Editor will be restored from the previously saved data.'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @internal\n\t */\n\tpublic _setExcludedProperties( props: Set<unknown> ): void {\n\t\tthis._excludedProps = props;\n\t}\n\n\t/**\n\t * Gets all data that is required to reinitialize editor instance.\n\t */\n\tprivate _getData(): EditorData {\n\t\tconst editor = this._editor!;\n\t\tconst roots = editor.model.document.roots.filter( root => root.isAttached() && root.rootName != '$graveyard' );\n\n\t\tconst { plugins } = editor;\n\t\t// `as any` to avoid linking from external private repo.\n\t\tconst commentsRepository = plugins.has( 'CommentsRepository' ) && plugins.get( 'CommentsRepository' ) as any;\n\t\tconst trackChanges = plugins.has( 'TrackChanges' ) && plugins.get( 'TrackChanges' ) as any;\n\n\t\tconst data: EditorData = {\n\t\t\troots: {},\n\t\t\tmarkers: {},\n\t\t\tcommentThreads: JSON.stringify( [] ),\n\t\t\tsuggestions: JSON.stringify( [] )\n\t\t};\n\n\t\troots.forEach( root => {\n\t\t\tdata.roots[ root.rootName ] = {\n\t\t\t\tcontent: JSON.stringify( Array.from( root.getChildren() ) ),\n\t\t\t\tattributes: JSON.stringify( Array.from( root.getAttributes() ) ),\n\t\t\t\tmodelElement: root.name,\n\t\t\t\tisLoaded: root._isLoaded\n\t\t\t};\n\t\t} );\n\n\t\tfor ( const marker of editor.model.markers ) {\n\t\t\tif ( !marker._affectsData ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdata.markers[ marker.name ] = {\n\t\t\t\trangeJSON: marker.getRange().toJSON() as any,\n\t\t\t\tusingOperation: marker._managedUsingOperations,\n\t\t\t\taffectsData: marker._affectsData\n\t\t\t};\n\t\t}\n\n\t\tif ( commentsRepository ) {\n\t\t\tdata.commentThreads = JSON.stringify( commentsRepository.getCommentThreads( { toJSON: true, skipNotAttached: true } ) );\n\t\t}\n\n\t\tif ( trackChanges ) {\n\t\t\tdata.suggestions = JSON.stringify( trackChanges.getSuggestions( { toJSON: true, skipNotAttached: true } ) );\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t/**\n\t * For each attached model root, returns its HTML editable element (if available).\n\t */\n\tprivate _getEditables(): Record<string, HTMLElement> {\n\t\tconst editables: Record<string, HTMLElement> = {};\n\n\t\tfor ( const rootName of this.editor!.model.document.getRootNames() ) {\n\t\t\tconst editable = this.editor!.ui.getEditableElement( rootName );\n\n\t\t\tif ( editable ) {\n\t\t\t\teditables[ rootName ] = editable;\n\t\t\t}\n\t\t}\n\n\t\treturn editables;\n\t}\n\n\t/**\n\t * Traverses the error context and the current editor to find out whether these structures are connected\n\t * to each other via properties.\n\t *\n\t * @internal\n\t */\n\tpublic _isErrorComingFromThisItem( error: CKEditorError ): boolean {\n\t\treturn areConnectedThroughProperties( this._editor, error.context, this._excludedProps );\n\t}\n\n\t/**\n\t * Detects whether the `create()` call was made in config-based creator mode\n\t * (i.e., the first argument is a config object rather than a source element or data).\n\t */\n\tprivate _detectConfigBasedCreator(\n\t\telementOrDataOrConfig: HTMLElement | string | Record<string, string> | Record<string, HTMLElement> | EditorConfig | undefined,\n\t\tconfigOrContext: EditorConfig | Context | undefined\n\t): boolean {\n\t\t// A string or DOM element is clearly the legacy signature.\n\t\tif ( typeof elementOrDataOrConfig === 'string' || isElement( elementOrDataOrConfig ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the second argument is a plain object with keys, it's a config → legacy signature.\n\t\tif (\n\t\t\tconfigOrContext &&\n\t\t\ttypeof configOrContext === 'object' &&\n\t\t\t!( 'destroy' in configOrContext ) &&\n\t\t\tObject.keys( configOrContext ).length > 0\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the first argument is an object where all values are strings or elements, it's multi-root legacy.\n\t\tif ( elementOrDataOrConfig && typeof elementOrDataOrConfig === 'object' ) {\n\t\t\tconst values = Object.values( elementOrDataOrConfig );\n\n\t\t\tif ( values.length > 0 && values.every( v => typeof v === 'string' || isElement( v ) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise, it's config-based.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Clones the editor configuration.\n\t */\n\tprivate _cloneEditorConfiguration( config: EditorConfig ): EditorConfig {\n\t\treturn cloneDeepWith( config, ( value, key ) => {\n\t\t\t// Leave DOM references.\n\t\t\tif ( isElement( value ) ) {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tif ( key === 'context' ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Internal plugin that is used to stop the default editor initialization and restoring the editor state\n * based on the `editor.config._watchdogInitialData` data.\n */\nclass EditorWatchdogInitPlugin {\n\tpublic editor: Editor;\n\n\tprivate _data: EditorData;\n\n\tconstructor( editor: Editor ) {\n\t\tthis.editor = editor;\n\n\t\tthis._data = editor.config.get( '_watchdogInitialData' )!;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\t// Stops the default editor initialization and use the saved data to restore the editor state.\n\t\t// Some of data could not be initialize as a config properties. It is important to keep the data\n\t\t// in the same form as it was before the restarting.\n\t\tthis.editor.data.on( 'init', evt => {\n\t\t\tevt.stop();\n\n\t\t\tthis.editor.model.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\tthis._restoreCollaborationData();\n\t\t\t\tthis._restoreEditorData( writer );\n\t\t\t} );\n\n\t\t\tthis.editor.data.fire<EditorReadyEvent>( 'ready' );\n\n\t\t\t// Keep priority `'high' - 1` to be sure that RTC initialization will be first.\n\t\t}, { priority: 1000 - 1 } );\n\t}\n\n\t/**\n\t * Creates a model node (element or text) based on provided JSON.\n\t */\n\tprivate _createNode( writer: ModelWriter, jsonNode: any ): ModelText | ModelElement {\n\t\tif ( 'name' in jsonNode ) {\n\t\t\t// If child has name property, it is an Element.\n\t\t\tconst element = writer.createElement( jsonNode.name, jsonNode.attributes );\n\n\t\t\tif ( jsonNode.children ) {\n\t\t\t\tfor ( const child of jsonNode.children ) {\n\t\t\t\t\telement._appendChild( this._createNode( writer, child ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn element;\n\t\t} else {\n\t\t\t// Otherwise, it is a Text node.\n\t\t\treturn writer.createText( jsonNode.data, jsonNode.attributes );\n\t\t}\n\t}\n\n\t/**\n\t * Restores the editor by setting the document data, roots attributes and markers.\n\t */\n\tprivate _restoreEditorData( writer: ModelWriter ): void {\n\t\tconst editor = this.editor!;\n\n\t\tObject.entries( this._data!.roots ).forEach( ( [ rootName, { content, attributes } ] ) => {\n\t\t\tconst parsedNodes: Array<ModelNode | ModelElement> = JSON.parse( content );\n\t\t\tconst parsedAttributes: Array<[ string, unknown ]> = JSON.parse( attributes );\n\n\t\t\tconst rootElement = editor.model.document.getRoot( rootName )!;\n\n\t\t\tfor ( const [ key, value ] of parsedAttributes ) {\n\t\t\t\twriter.setAttribute( key, value, rootElement );\n\t\t\t}\n\n\t\t\tfor ( const child of parsedNodes ) {\n\t\t\t\tconst node = this._createNode( writer, child );\n\n\t\t\t\twriter.insert( node, rootElement, 'end' );\n\t\t\t}\n\t\t} );\n\n\t\tObject.entries( this._data!.markers ).forEach( ( [ markerName, markerOptions ] ) => {\n\t\t\tconst { document } = editor.model;\n\t\t\tconst {\n\t\t\t\trangeJSON: { start, end },\n\t\t\t\t...options\n\t\t\t} = markerOptions;\n\n\t\t\tconst root = document.getRoot( start.root )!;\n\t\t\tconst startPosition = writer.createPositionFromPath( root, start.path, start.stickiness );\n\t\t\tconst endPosition = writer.createPositionFromPath( root, end.path, end.stickiness );\n\n\t\t\tconst range = writer.createRange( startPosition, endPosition );\n\n\t\t\twriter.addMarker( markerName, {\n\t\t\t\trange,\n\t\t\t\t...options\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Restores the editor collaboration data - comment threads and suggestions.\n\t */\n\tprivate _restoreCollaborationData() {\n\t\t// `as any` to avoid linking from external private repo.\n\t\tconst parsedCommentThreads: Array<any> = JSON.parse( this._data.commentThreads );\n\t\tconst parsedSuggestions: Array<any> = JSON.parse( this._data.suggestions );\n\n\t\tif ( this.editor!.plugins.has( 'CommentsRepository' ) ) {\n\t\t\tconst commentsRepository = this.editor!.plugins.get( 'CommentsRepository' ) as any;\n\n\t\t\t// First, remove the existing comments that were created by integration plugins during initialization.\n\t\t\t// These comments may be outdated, and new instances will be created in the next step based on the saved data.\n\t\t\tfor ( const commentThread of commentsRepository.getCommentThreads() ) {\n\t\t\t\t// Use the internal API since it removes the comment thread directly and does not trigger events\n\t\t\t\t// that could cause side effects, such as removing markers.\n\t\t\t\tcommentsRepository._removeCommentThread( { threadId: commentThread.id } );\n\t\t\t}\n\n\t\t\tparsedCommentThreads.forEach( commentThreadData => {\n\t\t\t\tconst channelId = this.editor.config.get( 'collaboration.channelId' )!;\n\t\t\t\tconst commentsRepository = this.editor!.plugins.get( 'CommentsRepository' ) as any;\n\n\t\t\t\tcommentsRepository.addCommentThread( { channelId, ...commentThreadData } );\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.editor!.plugins.has( 'TrackChangesEditing' ) ) {\n\t\t\tconst trackChangesEditing = this.editor!.plugins.get( 'TrackChangesEditing' ) as any;\n\n\t\t\t// First, remove the existing suggestions that were created by integration plugins during initialization.\n\t\t\t// These suggestions may be outdated, and new instances will be created in the next step based on the saved data.\n\t\t\tfor ( const suggestion of trackChangesEditing.getSuggestions() ) {\n\t\t\t\ttrackChangesEditing._removeSuggestion( suggestion );\n\t\t\t}\n\n\t\t\tparsedSuggestions.forEach( suggestionData => {\n\t\t\t\ttrackChangesEditing.addSuggestionData( suggestionData );\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * @internal\n */\nexport type EditorData = {\n\troots: Record<string, {\n\t\tcontent: string;\n\t\tattributes: string;\n\t\tmodelElement: string;\n\t\tisLoaded: boolean;\n\t}>;\n\tmarkers: Record<string, {\n\t\trangeJSON: { start: any; end: any };\n\t\tusingOperation: boolean;\n\t\taffectsData: boolean;\n\t}>;\n\tcommentThreads: string;\n\tsuggestions: string;\n};\n\n/**\n * Fired after the watchdog restarts the error in case of a crash.\n *\n * @eventName ~EditorWatchdog#restart\n */\nexport type EditorWatchdogRestartEvent = {\n\tname: 'restart';\n\targs: [];\n\treturn: undefined;\n};\n\nexport type EditorWatchdogCreatorFunction<TEditor = Editor> =\n\t( ( config: EditorConfig ) => Promise<TEditor> ) |\n\t( ( elementOrData: HTMLElement | string | Record<string, string> | Record<string, HTMLElement> | undefined,\n\t\tconfig: EditorConfig ) => Promise<TEditor> );\n\n/**\n * An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n */\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\n}\n\n/**\n * Reads the editable options persisted in the root's `$rootEditableOptions` model attribute and returns them as a\n * {@link module:core/editor/editorconfig~RootConfig} partial. It is used to recreate a detached editable when the\n * editor is restarted in the config-based creator mode.\n *\n * Only the known `placeholder`, `label` and `element` fields with a value are copied; their values are validated and\n * normalized later by the editor constructor. Fields are returned only when set, so merging the result does not\n * overwrite the existing restart config with `undefined`. A missing or tampered (non-object) value is dropped so it\n * cannot break the restart.\n *\n * @param serializedAttributes The root attributes serialized as a JSON string of `[ key, value ]` entries.\n */\nfunction getSavedRootEditableOptions( serializedAttributes: string ): Pick<RootConfig, 'placeholder' | 'label' | 'element'> {\n\tconst { $rootEditableOptions: options } = Object.fromEntries( JSON.parse( serializedAttributes ) );\n\n\tif ( !options || typeof options != 'object' ) {\n\t\treturn {};\n\t}\n\n\treturn {\n\t\t...options.placeholder && { placeholder: options.placeholder },\n\t\t...options.label && { label: options.label },\n\t\t...options.element && { element: options.element }\n\t};\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/**\n * @module watchdog/contextwatchdog\n */\n\nimport { Watchdog, type WatchdogConfig, type WatchdogState } from './watchdog.js';\nimport { EditorWatchdog, type EditorWatchdogCreatorFunction } from './editorwatchdog.js';\nimport { areConnectedThroughProperties } from './utils/areconnectedthroughproperties.js';\nimport { getSubNodes } from './utils/getsubnodes.js';\nimport type { ArrayOrItem, CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport type { Context, Editor, EditorConfig, ContextConfig } from '@ckeditor/ckeditor5-core';\n\nconst mainQueueId = Symbol( 'MainQueueId' );\n\n/**\n * A watchdog for the {@link module:core/context~Context} class.\n *\n * See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and\n * how to use it.\n */\nexport class ContextWatchdog<TContext extends Context = Context> extends Watchdog {\n\t/**\n\t * A map of internal watchdogs for added items.\n\t */\n\tprotected _watchdogs: Map<string, EditorWatchdog> = new Map<string, EditorWatchdog>();\n\n\t/**\n\t * The watchdog configuration.\n\t */\n\tprivate readonly _watchdogConfig: WatchdogConfig;\n\n\t/**\n\t * The current context instance.\n\t */\n\tprivate _context: TContext | null = null;\n\n\t/**\n\t * Context properties (nodes/references) that are gathered during the initial context creation\n\t * and are used to distinguish the origin of an error.\n\t */\n\tprivate _contextProps = new Set<unknown>();\n\n\t/**\n\t * An action queue, which is used to handle async functions queuing.\n\t */\n\tprivate _actionQueues = new ActionQueues();\n\n\t/**\n\t * The configuration for the {@link module:core/context~Context}.\n\t */\n\tprivate _contextConfig?: ContextConfig;\n\n\t/**\n\t * The creation method.\n\t *\n\t * @see #setCreator\n\t */\n\tdeclare protected _creator: ( config: ContextConfig ) => Promise<TContext>;\n\n\t/**\n\t * The destruction method.\n\t *\n\t * @see #setDestructor\n\t */\n\tdeclare protected _destructor: ( context: Context ) => Promise<unknown>;\n\n\t/**\n\t * The watched item.\n\t */\n\tpublic _item: unknown;\n\n\t/**\n\t * The context watchdog class constructor.\n\t *\n\t * ```ts\n\t * const watchdog = new ContextWatchdog( Context );\n\t *\n\t * await watchdog.create( contextConfiguration );\n\t *\n\t * await watchdog.add( item );\n\t * ```\n\t *\n\t * See the {@glink features/watchdog Watchdog feature guide} to learn more how to use this feature.\n\t *\n\t * @param Context The {@link module:core/context~Context} class.\n\t * @param watchdogConfig The watchdog configuration.\n\t */\n\tconstructor(\n\t\tContext: { create( ...args: any ): Promise<TContext> },\n\t\twatchdogConfig: WatchdogConfig = {}\n\t) {\n\t\tsuper( watchdogConfig );\n\n\t\tthis._watchdogConfig = watchdogConfig;\n\n\t\t// Default creator and destructor.\n\t\tthis._creator = contextConfig => Context.create( contextConfig );\n\t\tthis._destructor = context => context.destroy();\n\n\t\tthis._actionQueues.onEmpty( () => {\n\t\t\tif ( this.state === 'initializing' ) {\n\t\t\t\tthis.state = 'ready';\n\t\t\t\tthis._fire( 'stateChange' );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets the function that is responsible for the context creation.\n\t * It expects a function that should return a promise (or `undefined`).\n\t *\n\t * ```ts\n\t * watchdog.setCreator( config => Context.create( config ) );\n\t * ```\n\t */\n\tpublic setCreator( creator: ( config: ContextConfig ) => Promise<TContext> ): void {\n\t\tthis._creator = creator;\n\t}\n\n\t/**\n\t * Sets the function that is responsible for the context destruction.\n\t * Overrides the default destruction function, which destroys only the context instance.\n\t * It expects a function that should return a promise (or `undefined`).\n\t *\n\t * ```ts\n\t * watchdog.setDestructor( context => {\n\t * \t// Do something before the context is destroyed.\n\t *\n\t * \treturn context\n\t * \t\t.destroy()\n\t * \t\t.then( () => {\n\t * \t\t\t// Do something after the context is destroyed.\n\t * \t\t} );\n\t * } );\n\t * ```\n\t */\n\tpublic setDestructor( destructor: ( context: Context ) => Promise<unknown> ): void {\n\t\tthis._destructor = destructor;\n\t}\n\n\t/**\n\t * The context instance. Keep in mind that this property might be changed when the context watchdog restarts,\n\t * so do not keep this instance internally. Always operate on the `ContextWatchdog#context` property.\n\t */\n\tpublic get context(): Context | null {\n\t\treturn this._context;\n\t}\n\n\t/**\n\t * Initializes the context watchdog. Once it is created, the watchdog takes care about\n\t * recreating the context and the provided items, and starts the error handling mechanism.\n\t *\n\t * ```ts\n\t * await watchdog.create( {\n\t * \tplugins: []\n\t * } );\n\t * ```\n\t *\n\t * @param contextConfig The context configuration. See {@link module:core/context~Context}.\n\t */\n\tpublic create( contextConfig: ContextConfig = {} ): Promise<unknown> {\n\t\treturn this._actionQueues.enqueue( mainQueueId, () => {\n\t\t\tthis._contextConfig = contextConfig;\n\n\t\t\treturn this._create();\n\t\t} );\n\t}\n\n\t/**\n\t * Returns an item instance with the given `itemId`.\n\t *\n\t * ```ts\n\t * const editor1 = watchdog.getItem( 'editor1' );\n\t * ```\n\t *\n\t * @param itemId The item ID.\n\t * @returns The item instance or `undefined` if an item with a given ID has not been found.\n\t */\n\tpublic getItem( itemId: string ): unknown {\n\t\tconst watchdog = this._getWatchdog( itemId );\n\n\t\treturn watchdog._item;\n\t}\n\n\t/**\n\t * Gets the state of the given item. See {@link #state} for a list of available states.\n\t *\n\t * ```ts\n\t * const editor1State = watchdog.getItemState( 'editor1' );\n\t * ```\n\t *\n\t * @param itemId Item ID.\n\t * @returns The state of the item.\n\t */\n\tpublic getItemState( itemId: string ): WatchdogState {\n\t\tconst watchdog = this._getWatchdog( itemId );\n\n\t\treturn watchdog.state;\n\t}\n\n\t/**\n\t * Adds items to the watchdog. Once created, instances of these items will be available using the {@link #getItem} method.\n\t *\n\t * Items can be passed together as an array of objects:\n\t *\n\t * ```ts\n\t * await watchdog.add( [ {\n\t * \tid: 'editor1',\n\t * \ttype: 'editor',\n\t * \tconfig: {\n\t * \t\tattachTo: document.querySelector( '#editor' ),\n\t * \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t * \t\ttoolbar: [ 'bold', 'italic', 'alignment' ]\n\t * \t},\n\t * \tcreator: config => ClassicEditor.create( config )\n\t * } ] );\n\t * ```\n\t *\n\t * Or one by one as objects:\n\t *\n\t * ```ts\n\t * await watchdog.add( {\n\t * \tid: 'editor1',\n\t * \ttype: 'editor',\n\t * \tconfig: {\n\t * \t\tattachTo: document.querySelector( '#editor' ),\n\t * \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t * \t\ttoolbar: [ 'bold', 'italic', 'alignment' ]\n\t * \t},\n\t * \tcreator: config => ClassicEditor.create( config )\n\t * } );\n\t * ```\n\t *\n\t * Then an instance can be retrieved using the {@link #getItem} method:\n\t *\n\t * ```ts\n\t * const editor1 = watchdog.getItem( 'editor1' );\n\t * ```\n\t *\n\t * Note that this method can be called multiple times, but for performance reasons it is better\n\t * to pass all items together.\n\t *\n\t * @param itemConfigurationOrItemConfigurations An item configuration object or an array of item configurations.\n\t */\n\tpublic add( itemConfigurationOrItemConfigurations: ArrayOrItem<ContextWatchdogItemConfiguration> ): Promise<unknown> {\n\t\tconst itemConfigurations = toArray( itemConfigurationOrItemConfigurations );\n\n\t\treturn Promise.all( itemConfigurations.map( item => {\n\t\t\treturn this._actionQueues.enqueue( item.id, () => {\n\t\t\t\tif ( this.state === 'destroyed' ) {\n\t\t\t\t\tthrow new Error( 'Cannot add items to destroyed watchdog.' );\n\t\t\t\t}\n\n\t\t\t\tif ( !this._context ) {\n\t\t\t\t\tthrow new Error( 'Context was not created yet. You should call the `ContextWatchdog#create()` method first.' );\n\t\t\t\t}\n\n\t\t\t\tlet watchdog: EditorWatchdog;\n\n\t\t\t\tif ( this._watchdogs.has( item.id ) ) {\n\t\t\t\t\tthrow new Error( `Item with the given id is already added: '${ item.id }'.` );\n\t\t\t\t}\n\n\t\t\t\tif ( item.type === 'editor' ) {\n\t\t\t\t\twatchdog = new EditorWatchdog( null, this._watchdogConfig );\n\t\t\t\t\twatchdog.setCreator( item.creator );\n\t\t\t\t\twatchdog._setExcludedProperties( this._contextProps );\n\n\t\t\t\t\tif ( item.destructor ) {\n\t\t\t\t\t\twatchdog.setDestructor( item.destructor );\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._watchdogs.set( item.id, watchdog );\n\n\t\t\t\t\t// Enqueue the internal watchdog errors within the main queue.\n\t\t\t\t\t// And propagate the internal `error` events as `itemError` event.\n\t\t\t\t\twatchdog.on( 'error', ( evt, { error, causesRestart } ) => {\n\t\t\t\t\t\tthis._fire( 'itemError', { itemId: item.id, error } );\n\n\t\t\t\t\t\t// Do not enqueue the item restart action if the item will not restart.\n\t\t\t\t\t\tif ( !causesRestart ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._actionQueues.enqueue( item.id, () => new Promise<void>( res => {\n\t\t\t\t\t\t\tconst rethrowRestartEventOnce = () => {\n\t\t\t\t\t\t\t\twatchdog.off( 'restart', rethrowRestartEventOnce );\n\n\t\t\t\t\t\t\t\tthis._fire( 'itemRestart', { itemId: item.id } );\n\n\t\t\t\t\t\t\t\tres();\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\twatchdog.on( 'restart', rethrowRestartEventOnce );\n\t\t\t\t\t\t} ) );\n\t\t\t\t\t} );\n\n\t\t\t\t\tif ( item.sourceElementOrData !== undefined ) {\n\t\t\t\t\t\treturn watchdog.create( item.sourceElementOrData, item.config, this._context! );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn ( watchdog.create as ( config: EditorConfig, context?: Context ) => Promise<unknown> )(\n\t\t\t\t\t\titem.config, this._context!\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error( `Not supported item type: '${ item.type }'.` );\n\t\t\t\t}\n\t\t\t} );\n\t\t} ) );\n\t}\n\n\t/**\n\t * Removes and destroys item(s) with given ID(s).\n\t *\n\t * ```ts\n\t * await watchdog.remove( 'editor1' );\n\t * ```\n\t *\n\t * Or\n\t *\n\t * ```ts\n\t * await watchdog.remove( [ 'editor1', 'editor2' ] );\n\t * ```\n\t *\n\t * @param itemIdOrItemIds Item ID or an array of item IDs.\n\t */\n\tpublic remove( itemIdOrItemIds: ArrayOrItem<string> ): Promise<unknown> {\n\t\tconst itemIds = toArray( itemIdOrItemIds );\n\n\t\treturn Promise.all( itemIds.map( itemId => {\n\t\t\treturn this._actionQueues.enqueue( itemId, () => {\n\t\t\t\tconst watchdog = this._getWatchdog( itemId );\n\n\t\t\t\tthis._watchdogs.delete( itemId );\n\n\t\t\t\treturn watchdog.destroy();\n\t\t\t} );\n\t\t} ) );\n\t}\n\n\t/**\n\t * Destroys the context watchdog and all added items.\n\t * Once the context watchdog is destroyed, new items cannot be added.\n\t *\n\t * ```ts\n\t * await watchdog.destroy();\n\t * ```\n\t */\n\tpublic override destroy(): Promise<unknown> {\n\t\treturn this._actionQueues.enqueue( mainQueueId, () => {\n\t\t\tthis.state = 'destroyed';\n\t\t\tthis._fire( 'stateChange' );\n\n\t\t\tsuper.destroy();\n\n\t\t\treturn this._destroy();\n\t\t} );\n\t}\n\n\t/**\n\t * Restarts the context watchdog.\n\t */\n\tprotected _restart(): Promise<unknown> {\n\t\treturn this._actionQueues.enqueue( mainQueueId, () => {\n\t\t\tthis.state = 'initializing';\n\t\t\tthis._fire( 'stateChange' );\n\n\t\t\treturn this._destroy()\n\t\t\t\t.catch( err => {\n\t\t\t\t\tconsole.error( 'An error happened during destroying the context or items.', err );\n\t\t\t\t} )\n\t\t\t\t.then( () => this._create() )\n\t\t\t\t.then( () => this._fire( 'restart' ) );\n\t\t} );\n\t}\n\n\t/**\n\t * Initializes the context watchdog.\n\t */\n\tprivate _create(): Promise<unknown> {\n\t\treturn Promise.resolve()\n\t\t\t.then( () => {\n\t\t\t\tthis._startErrorHandling();\n\n\t\t\t\treturn this._creator( this._contextConfig! );\n\t\t\t} )\n\t\t\t.then( context => {\n\t\t\t\tthis._context = context;\n\t\t\t\tthis._contextProps = getSubNodes( this._context );\n\n\t\t\t\treturn Promise.all(\n\t\t\t\t\tArray.from( this._watchdogs.values() )\n\t\t\t\t\t\t.map( watchdog => {\n\t\t\t\t\t\t\twatchdog._setExcludedProperties( this._contextProps );\n\n\t\t\t\t\t\t\tif ( watchdog._isUsingConfigBasedCreator ) {\n\t\t\t\t\t\t\t\treturn ( watchdog.create as ( config: EditorConfig, context?: Context ) => Promise<unknown> )(\n\t\t\t\t\t\t\t\t\tundefined as any, this._context!\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn watchdog.create(\n\t\t\t\t\t\t\t\tundefined as any, undefined as any, this._context!\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\t/**\n\t * Destroys the context instance and all added items.\n\t */\n\tprivate _destroy(): Promise<unknown> {\n\t\treturn Promise.resolve()\n\t\t\t.then( () => {\n\t\t\t\tthis._stopErrorHandling();\n\n\t\t\t\tconst context = this._context!;\n\n\t\t\t\tthis._context = null;\n\t\t\t\tthis._contextProps = new Set();\n\n\t\t\t\treturn Promise.all(\n\t\t\t\t\tArray.from( this._watchdogs.values() )\n\t\t\t\t\t\t.map( watchdog => watchdog.destroy() )\n\t\t\t\t)\n\t\t\t\t\t// Context destructor destroys each editor.\n\t\t\t\t\t.then( () => this._destructor( context ) );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Returns the watchdog for a given item ID.\n\t *\n\t * @param itemId Item ID.\n\t */\n\tprotected _getWatchdog( itemId: string ): Watchdog {\n\t\tconst watchdog = this._watchdogs.get( itemId );\n\n\t\tif ( !watchdog ) {\n\t\t\tthrow new Error( `Item with the given id was not registered: ${ itemId }.` );\n\t\t}\n\n\t\treturn watchdog;\n\t}\n\n\t/**\n\t * Checks whether an error comes from the context instance and not from the item instances.\n\t *\n\t * @internal\n\t */\n\tpublic _isErrorComingFromThisItem( error: CKEditorError ): boolean {\n\t\tfor ( const watchdog of this._watchdogs.values() ) {\n\t\t\tif ( watchdog._isErrorComingFromThisItem( error ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn areConnectedThroughProperties( this._context, error.context );\n\t}\n}\n\n/**\n * Fired after the watchdog restarts the context and the added items because of a crash.\n *\n * ```ts\n * watchdog.on( 'restart', () => {\n * \tconsole.log( 'The context has been restarted.' );\n * } );\n * ```\n *\n * @eventName ~ContextWatchdog#restart\n */\nexport type ContextWatchdogRestartEvent = {\n\tname: 'restart';\n\targs: [];\n\treturn: undefined;\n};\n\n/**\n * Fired when a new error occurred in one of the added items.\n *\n * ```ts\n * watchdog.on( 'itemError', ( evt, { error, itemId } ) => {\n * \tconsole.log( `An error occurred in an item with the '${ itemId }' ID.` );\n * } );\n * ```\n *\n * @eventName ~ContextWatchdog#itemError\n */\nexport type ContextWatchdogItemErrorEvent = {\n\tname: 'itemError';\n\targs: [ ContextWatchdogItemErrorEventData ];\n\treturn: undefined;\n};\n\n/**\n * The `itemError` event data.\n */\nexport type ContextWatchdogItemErrorEventData = {\n\titemId: string;\n\terror: Error;\n};\n\n/**\n * Fired after an item has been restarted.\n *\n * ```ts\n * \twatchdog.on( 'itemRestart', ( evt, { itemId } ) => {\n *\t\tconsole.log( 'An item with with the '${ itemId }' ID has been restarted.' );\n * \t} );\n * ```\n *\n * @eventName ~ContextWatchdog#itemRestart\n */\nexport type ContextWatchdogItemRestartEvent = {\n\tname: 'itemRestart';\n\targs: [ ContextWatchdogItemRestartEventData ];\n\treturn: undefined;\n};\n\n/**\n * The `itemRestart` event data.\n */\nexport type ContextWatchdogItemRestartEventData = {\n\titemId: string;\n};\n\n/**\n * Manager of action queues that allows queuing async functions.\n */\nclass ActionQueues {\n\tpublic _onEmptyCallbacks: Array<() => void> = [];\n\tpublic _queues = new Map<symbol | string | number, Promise<unknown>>();\n\tpublic _activeActions = 0;\n\n\t/**\n\t * Used to register callbacks that will be run when the queue becomes empty.\n\t *\n\t * @param onEmptyCallback A callback that will be run whenever the queue becomes empty.\n\t */\n\tpublic onEmpty( onEmptyCallback: () => void ): void {\n\t\tthis._onEmptyCallbacks.push( onEmptyCallback );\n\t}\n\n\t/**\n\t * It adds asynchronous actions (functions) to the proper queue and runs them one by one.\n\t *\n\t * @param queueId The action queue ID.\n\t * @param action A function that should be enqueued.\n\t */\n\tpublic enqueue( queueId: symbol | string | number, action: () => unknown ): Promise<unknown> {\n\t\tconst isMainAction = queueId === mainQueueId;\n\n\t\tthis._activeActions++;\n\n\t\tif ( !this._queues.get( queueId ) ) {\n\t\t\tthis._queues.set( queueId, Promise.resolve() );\n\t\t}\n\n\t\t// List all sources of actions that the current action needs to await for.\n\t\t// For the main action wait for all other actions.\n\t\t// For the item action wait only for the item queue and the main queue.\n\t\tconst awaitedActions = isMainAction ?\n\t\t\tPromise.all( this._queues.values() ) :\n\t\t\tPromise.all( [ this._queues.get( mainQueueId ), this._queues.get( queueId ) ] );\n\n\t\tconst queueWithAction = awaitedActions.then( action );\n\n\t\t// Catch all errors in the main queue to stack promises even if an error occurred in the past.\n\t\tconst nonErrorQueue = queueWithAction.catch( () => {} );\n\n\t\tthis._queues.set( queueId, nonErrorQueue );\n\n\t\treturn queueWithAction.finally( () => {\n\t\t\tthis._activeActions--;\n\n\t\t\tif ( this._queues.get( queueId ) === nonErrorQueue && this._activeActions === 0 ) {\n\t\t\t\tthis._onEmptyCallbacks.forEach( cb => cb() );\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Transforms any value to an array. If the provided value is already an array, it is returned unchanged.\n *\n * @param elementOrArray The value to transform to an array.\n * @returns An array created from data.\n */\nfunction toArray<T>( elementOrArray: ArrayOrItem<T> ): Array<T> {\n\treturn Array.isArray( elementOrArray ) ? elementOrArray : [ elementOrArray ];\n}\n\n/**\n * The watchdog item configuration interface.\n */\nexport interface ContextWatchdogItemConfiguration {\n\n\t/**\n\t * id A unique item identificator.\n\t */\n\tid: string;\n\n\t/**\n\t * The type of the item to create. At the moment, only `'editor'` is supported.\n\t */\n\ttype: 'editor';\n\n\t/**\n\t * A function that initializes the item (the editor). The function takes the editor configuration\n\t * and should return a promise. For example: `config => ClassicEditor.create( config )`.\n\t */\n\tcreator: EditorWatchdogCreatorFunction;\n\n\t/**\n\t * A function that destroys the item instance (the editor). The function\n\t * takes an item and should return a promise. For example: `editor => editor.destroy()`\n\t */\n\tdestructor?: ( editor: Editor ) => Promise<unknown>;\n\n\t/**\n\t * The source element or data that will be passed\n\t * as the first argument to the `Editor.create()` method.\n\t *\n\t * When not provided, the watchdog will use config-based creator mode, passing only the {@link #config}\n\t * to the editor creator.\n\t *\n\t * @deprecated\n\t */\n\tsourceElementOrData?: string | HTMLElement;\n\n\t/**\n\t * An editor configuration.\n \t */\n\tconfig: EditorConfig;\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/**\n * @module watchdog/actionsrecorder\n */\n\n/* v8 ignore start -- @preserve */\n\nimport type {\n\tCommand,\n\tEditor\n} from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tViewTypeCheckable,\n\tModelTypeCheckable\n} from '@ckeditor/ckeditor5-engine';\n\nimport type {\n\tActionsRecorderEntry,\n\tActionsRecorderEntryEditorSnapshot,\n\tActionsRecorderFilterCallback,\n\tActionsRecorderErrorCallback,\n\tActionsRecorderMaxEntriesCallback\n} from './actionsrecorderconfig.js';\n\nimport { isPlainObject } from 'es-toolkit/compat';\n\n/**\n * A plugin that records user actions and editor state changes for debugging purposes. It tracks commands execution, model operations,\n * UI interactions, and document events. It just collects data locally, and does not send it anywhere, integrator is responsible\n * for gathering data from this plugin for further processing.\n *\n * **Important! `ActionsRecorder` is an experimental feature, and may become deprecated.**\n *\n * By default, plugin stores latest 1000 action entries. Integrator can register an `onError` callback to collect those entries\n * in case of exception. Integrator should augment this data with application specific data such as page-id or session-id,\n * depending on the application. Augmented data should be processed by the integrator, for example integrator should send it\n * to some data collecting endpoint for later analysis.\n *\n * Example:\n *\n * ```ts\n * \tClassicEditor\n * \t\t.create( {\n * \t\t\tplugins: [ ActionsRecorder, ... ],\n * \t\t\tactionsRecorder: {\n * \t\t\t\tmaxEntries: 1000, // This is the default value and could be adjusted.\n *\n * \t\t\t\tonError( error, entries ) {\n * \t\t\t\t\tconsole.error( 'ActionsRecorder - Error detected:', error );\n * \t\t\t\t\tconsole.warn( 'Actions recorded before error:', entries );\n *\n * \t\t\t\t\tthis.flushEntries();\n *\n * \t\t\t\t\t// Integrator should send and store the entries. The error is already in the last entry in serializable form.\n * \t\t\t\t}\n * \t\t\t}\n * \t\t} )\n * \t\t.then( ... )\n * \t\t.catch( ... );\n * ```\n *\n * Alternatively integrator could continuously collect actions in batches and send them to theirs endpoint for later analysis:\n *\n * ```ts\n * \tClassicEditor\n * \t\t.create( {\n * \t\t\tplugins: [ ActionsRecorder, ... ],\n * \t\t\tactionsRecorder: {\n * \t\t\t\tmaxEntries: 50, // This is the batch size.\n *\n * \t\t\t\tonMaxEntries() {\n * \t\t\t\t\tconst entries = this.getEntries();\n *\n * \t\t\t\t\tthis.flushEntries();\n *\n * \t\t\t\t\tconsole.log( 'ActionsRecorder - Batch of entries:', entries );\n *\n * \t\t\t\t\t// Integrator should send and store the entries.\n * \t\t\t\t},\n *\n * \t\t\t\tonError( error, entries ) {\n * \t\t\t\t\tconsole.error( 'ActionsRecorder - Error detected:', error );\n * \t\t\t\t\tconsole.warn( 'Actions recorded before error:', entries );\n *\n * \t\t\t\t\tthis.flushEntries();\n *\n * \t\t\t\t\t// Integrator should send and store the entries. The error is already in the last entry in serializable form.\n * \t\t\t\t}\n * \t\t\t}\n * \t\t} )\n * \t\t.then( ... )\n * \t\t.catch( ... );\n * ```\n *\n * See {@link module:watchdog/actionsrecorderconfig~ActionsRecorderConfig plugin configuration} for more details.\n *\n */\nexport class ActionsRecorder {\n\t/**\n\t * The editor instance.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * Array storing all recorded action entries with their context and state snapshots.\n\t */\n\tprivate _entries: Array<ActionsRecorderEntry> = [];\n\n\t/**\n\t * Stack tracking nested action frames to maintain call hierarchy.\n\t */\n\tprivate _frameStack: Array<ActionsRecorderEntry> = [];\n\n\t/**\n\t * Set of already reported errors used to notify only once for each error (not on every try-catch nested block).\n\t */\n\tprivate _errors = new Set<Error>();\n\n\t/**\n\t * Maximum number of action entries to keep in memory.\n\t */\n\tprivate _maxEntries: number;\n\n\t/**\n\t * Error callback.\n\t */\n\tprivate _errorCallback?: ActionsRecorderErrorCallback;\n\n\t/**\n\t * Filter function to determine which entries should be stored.\n\t */\n\tprivate _filterCallback?: ActionsRecorderFilterCallback;\n\n\t/**\n\t * Callback triggered every time count of recorded entries reaches maxEntries.\n\t */\n\tprivate _maxEntriesCallback: ActionsRecorderMaxEntriesCallback;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ActionsRecorder' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic constructor( editor: Editor ) {\n\t\tthis.editor = editor;\n\n\t\teditor.config.define( 'actionsRecorder.maxEntries', 1000 );\n\n\t\tconst config = editor.config.get( 'actionsRecorder' )!;\n\n\t\tthis._maxEntries = config.maxEntries!;\n\t\tthis._filterCallback = config.onFilter;\n\t\tthis._errorCallback = config.onError;\n\t\tthis._maxEntriesCallback = config.onMaxEntries || this._maxEntriesDefaultHandler;\n\n\t\tthis._tapCommands();\n\t\tthis._tapOperationApply();\n\t\tthis._tapModelMethods();\n\t\tthis._tapModelSelection();\n\t\tthis._tapComponentFactory();\n\t\tthis._tapViewDocumentEvents();\n\t}\n\n\t/**\n\t * Returns all recorded action entries.\n\t */\n\tpublic getEntries(): Array<ActionsRecorderEntry> {\n\t\t// Return a shallow copy instead of reference as this array could be modified.\n\t\treturn this._entries.slice();\n\t}\n\n\t/**\n\t * Flushes all recorded entries.\n\t */\n\tpublic flushEntries(): void {\n\t\tthis._entries = [];\n\t}\n\n\t/**\n\t * Creates a new action frame and adds it to the recording stack.\n\t *\n\t * @param action The name/type of the action being recorded.\n\t * @param params Optional parameters associated with the event.\n\t * @returns The created call frame object.\n\t */\n\tprivate _enterFrame( action: string, params?: Array<unknown> ): ActionsRecorderEntry {\n\t\tconst callFrame: ActionsRecorderEntry = {\n\t\t\ttimeStamp: new Date().toISOString(),\n\t\t\t...this._frameStack.length && { parentEntry: this._frameStack.at( -1 ) },\n\t\t\taction,\n\t\t\tparams: params?.map( param => serializeValue( param ) ),\n\t\t\tbefore: this._buildStateSnapshot()\n\t\t};\n\n\t\t// Apply filter if configured, only add to entries if filter passes.\n\t\tif ( !this._filterCallback || this._filterCallback( callFrame, this._entries ) ) {\n\t\t\t// Add the call frame to the entries.\n\t\t\tthis._entries.push( callFrame );\n\t\t}\n\n\t\tthis._frameStack.push( callFrame );\n\n\t\treturn callFrame;\n\t}\n\n\t/**\n\t * Closes an action frame and records its final state and results.\n\t *\n\t * @param callFrame The call frame to close.\n\t * @param result Optional result value from the action.\n\t * @param error Optional error that occurred during the action.\n\t */\n\tprivate _leaveFrame( callFrame: ActionsRecorderEntry, result?: any, error?: any ): void {\n\t\tconst topFrame = this._frameStack.pop();\n\n\t\t// Handle scenario when the stack has been cleared in the meantime\n\t\t// or the callFrame is not the top frame.\n\t\tif ( !topFrame || topFrame !== callFrame ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( result !== undefined ) {\n\t\t\ttopFrame.result = serializeValue( result );\n\t\t}\n\n\t\tif ( error ) {\n\t\t\ttopFrame.error = serializeValue( error );\n\t\t}\n\n\t\ttopFrame.after = this._buildStateSnapshot();\n\n\t\tif ( error ) {\n\t\t\tthis._callErrorCallback( error );\n\t\t}\n\n\t\tif ( this._frameStack.length == 0 ) {\n\t\t\tthis._errors.clear();\n\t\t}\n\n\t\t// Enforce max entries limit after leaving the frame so that complete entry is provided.\n\t\tif ( this._entries.length >= this._maxEntries ) {\n\t\t\tthis._maxEntriesCallback();\n\t\t}\n\t}\n\n\t/**\n\t * Builds a snapshot of the current editor state including document version,\n\t * read-only status, focus state, and model selection.\n\t *\n\t * @returns An object containing the current editor state snapshot.\n\t */\n\tprivate _buildStateSnapshot(): ActionsRecorderEntryEditorSnapshot {\n\t\tconst { model, isReadOnly, editing } = this.editor;\n\n\t\treturn {\n\t\t\tdocumentVersion: model.document.version,\n\t\t\teditorReadOnly: isReadOnly,\n\t\t\teditorFocused: editing.view.document.isFocused,\n\t\t\tmodelSelection: serializeValue( model.document.selection )\n\t\t};\n\t}\n\n\t/**\n\t * Sets up recording for all editor commands, both existing and future ones.\n\t * Taps into the command execution to track when commands are run.\n\t */\n\tprivate _tapCommands() {\n\t\t// Tap already registered commands.\n\t\tfor ( const [ commandName, command ] of this.editor.commands ) {\n\t\t\tthis._tapCommand( commandName, command );\n\t\t}\n\n\t\t// Tap commands registered after the constructor was called.\n\t\ttapObjectMethod( this.editor.commands, 'add', {\n\t\t\tbefore: ( callContext, [ commandName, command ] ) => {\n\t\t\t\tthis._tapCommand( commandName, command );\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets up recording for model operation applications.\n\t * Tracks when operations are applied to the model document.\n\t */\n\tprivate _tapOperationApply() {\n\t\ttapObjectMethod( this.editor.model, 'applyOperation', {\n\t\t\tbefore: ( callContext, [ operation ] ) => {\n\t\t\t\t// Ignore operations applied to document fragments.\n\t\t\t\tif ( operation.baseVersion === null ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tcallContext.callFrame = this._enterFrame( 'model.applyOperation', [ operation ] );\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: callContext => {\n\t\t\t\tthis._leaveFrame( callContext.callFrame );\n\t\t\t},\n\t\t\terror: ( callContext, error ) => {\n\t\t\t\tthis._leaveFrame( callContext.callFrame, undefined, error );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets up recording for key model methods like insertContent, insertObject, and deleteContent.\n\t * These methods represent high-level model manipulation operations.\n\t */\n\tprivate _tapModelMethods() {\n\t\tfor ( const methodName of [ 'insertContent', 'insertObject', 'deleteContent' ] ) {\n\t\t\ttapObjectMethod( this.editor.model, methodName, {\n\t\t\t\tbefore: ( callContext, ...params ) => {\n\t\t\t\t\tcallContext.callFrame = this._enterFrame( `model.${ methodName }`, params );\n\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t\tafter: ( callContext, result ) => {\n\t\t\t\t\tthis._leaveFrame( callContext.callFrame, result );\n\t\t\t\t},\n\t\t\t\terror: ( callContext, error ) => {\n\t\t\t\t\tthis._leaveFrame( callContext.callFrame, undefined, error );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Sets up recording for model selection changes.\n\t * Tracks when the selection range, attributes, or markers change.\n\t */\n\tprivate _tapModelSelection() {\n\t\tconst events = [ 'change:range', 'change:attribute', 'change:marker' ];\n\n\t\tthis._tapFireMethod( this.editor.model.document.selection, events, {\n\t\t\teventSource: 'model-selection'\n\t\t} );\n\t}\n\n\t/**\n\t * Sets up recording for a specific command execution.\n\t *\n\t * @param commandName The name of the command to record.\n\t * @param command The command instance to tap into.\n\t */\n\tprivate _tapCommand( commandName: string, command: Command ) {\n\t\ttapObjectMethod( command, 'execute', {\n\t\t\tbefore: ( callContext, params ) => {\n\t\t\t\tcallContext.callFrame = this._enterFrame( `commands.${ commandName }:execute`, params );\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: ( callContext, result ) => {\n\t\t\t\tthis._leaveFrame( callContext.callFrame, result );\n\t\t\t},\n\t\t\terror: ( callContext, error ) => {\n\t\t\t\tthis._leaveFrame( callContext.callFrame, undefined, error );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets up recording for UI component factory creation and component interactions.\n\t * Tracks when components are created and their execute events.\n\t */\n\tprivate _tapComponentFactory() {\n\t\ttapObjectMethod( this.editor.ui.componentFactory, 'create', {\n\t\t\tbefore: ( callContext, [ componentName ] ) => {\n\t\t\t\tcallContext.componentName = componentName;\n\t\t\t\tcallContext.callFrame = this._enterFrame( `component-factory.create:${ componentName }` );\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: ( callContext, componentInstance ) => {\n\t\t\t\tconst executeContext = {\n\t\t\t\t\t...callContext,\n\t\t\t\t\teventSource: `component.${ callContext.componentName }`\n\t\t\t\t};\n\n\t\t\t\tif ( typeof componentInstance.fire == 'function' ) {\n\t\t\t\t\tthis._tapFireMethod( componentInstance, [ 'execute' ], executeContext );\n\t\t\t\t}\n\n\t\t\t\tif ( typeof componentInstance.panelView?.fire == 'function' ) {\n\t\t\t\t\tthis._tapFireMethod( componentInstance.panelView, [ 'execute' ], executeContext );\n\t\t\t\t}\n\n\t\t\t\tif ( typeof componentInstance.buttonView?.actionView?.fire == 'function' ) {\n\t\t\t\t\tthis._tapFireMethod( componentInstance.buttonView.actionView, [ 'execute' ], executeContext );\n\t\t\t\t}\n\n\t\t\t\tthis._leaveFrame( callContext.callFrame );\n\t\t\t},\n\t\t\terror: ( callContext, error ) => {\n\t\t\t\tthis._leaveFrame( callContext.callFrame, undefined, error );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets up recording for view document events like clicks, keyboard input,\n\t * selection changes, and other user interactions.\n\t */\n\tprivate _tapViewDocumentEvents() {\n\t\tconst events = [\n\t\t\t'click',\n\t\t\t'mousedown',\n\t\t\t'mouseup',\n\t\t\t'pointerdown',\n\t\t\t'pointerup',\n\t\t\t'focus',\n\t\t\t'blur',\n\n\t\t\t'keydown',\n\t\t\t'keyup',\n\t\t\t'selectionChange',\n\t\t\t'compositionstart',\n\t\t\t'compositionend',\n\t\t\t'beforeinput',\n\t\t\t'mutations',\n\t\t\t'enter',\n\t\t\t'delete',\n\t\t\t'insertText',\n\n\t\t\t'paste',\n\t\t\t'copy',\n\t\t\t'cut',\n\t\t\t'dragstart',\n\t\t\t'drop'\n\t\t];\n\n\t\tthis._tapFireMethod( this.editor.editing.view.document, events, { eventSource: 'observers' } );\n\t}\n\n\t/**\n\t * Sets up recording for specific events fired by an emitter object.\n\t *\n\t * @param emitter The object that fires events to be recorded.\n\t * @param eventNames Array of event names to record.\n\t * @param context Additional context to include with recorded events.\n\t */\n\tprivate _tapFireMethod( emitter: any, eventNames: Array<string>, context: Record<string, any> = {} ) {\n\t\ttapObjectMethod( emitter, 'fire', {\n\t\t\tbefore: ( callContext, [ eventInfoOrName, ...params ] ) => {\n\t\t\t\tconst eventName = typeof eventInfoOrName == 'string' ? eventInfoOrName : eventInfoOrName.name;\n\n\t\t\t\tif ( !eventNames.includes( eventName ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tcallContext.callFrame = this._enterFrame( `${ callContext.eventSource }:${ eventName }`, params );\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tafter: ( callContext, result ) => {\n\t\t\t\tthis._leaveFrame( callContext.callFrame, result );\n\t\t\t},\n\t\t\terror: ( callContext, error ) => {\n\t\t\t\tthis._leaveFrame( callContext.callFrame, undefined, error );\n\t\t\t}\n\t\t}, context );\n\t}\n\n\t/**\n\t * Triggers error callback.\n\t */\n\tprivate _callErrorCallback( error?: any ): void {\n\t\tif ( !this._errorCallback || this._errors.has( error ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._errors.add( error );\n\n\t\ttry {\n\t\t\t// Provide a shallow copy of entries as it might be modified before error handler serializes it.\n\t\t\tthis._errorCallback( error, this.getEntries() );\n\t\t} catch ( observerError ) {\n\t\t\t// Silently catch observer errors to prevent them from affecting the recording.\n\t\t\tconsole.error( 'ActionsRecorder onError callback error:', observerError );\n\t\t}\n\t}\n\n\t/**\n\t * The default handler for maxEntries callback.\n\t */\n\tprivate _maxEntriesDefaultHandler() {\n\t\tthis._entries.shift();\n\t}\n}\n\n/**\n * Creates a wrapper around a method to record its calls, results, and errors.\n *\n * @internal\n *\n * @param object The object containing the method to tap.\n * @param methodName The name of the method to tap.\n * @param tap The tap configuration with before/after/error hooks.\n * @param context Additional context to include with the method calls.\n */\nexport function tapObjectMethod(\n\tobject: any,\n\tmethodName: string,\n\ttap: MethodTap,\n\tcontext: Record<string, any> = {}\n): void {\n\tconst originalMethod = object[ methodName ];\n\n\tif ( originalMethod[ Symbol.for( 'Tapped method' ) ] ) {\n\t\treturn;\n\t}\n\n\tobject[ methodName ] = ( ...args: Array<any> ) => {\n\t\tconst callContext = Object.assign( {}, context );\n\t\tlet shouldHandle;\n\n\t\ttry {\n\t\t\tshouldHandle = tap.before?.( callContext, args );\n\n\t\t\tconst result = originalMethod.apply( object, args );\n\n\t\t\tif ( shouldHandle ) {\n\t\t\t\ttap.after?.( callContext, result );\n\t\t\t}\n\n\t\t\treturn result;\n\t\t} catch ( error ) {\n\t\t\tif ( shouldHandle ) {\n\t\t\t\ttap.error?.( callContext, error );\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\t};\n\n\tobject[ methodName ][ Symbol.for( 'Tapped method' ) ] = originalMethod;\n}\n\n/**\n * Represents a method tap with optional hooks for before, after, and error handling.\n */\ninterface MethodTap extends Record<string, any> {\n\n\t/**\n\t * Hook called before the original method execution.\n\t *\n\t * @param context The call context object for storing state between hooks.\n\t * @param args The arguments passed to the original method.\n\t * @returns True if the method call should be recorded, false to ignore it.\n\t */\n\tbefore?: ( context: Record<string, any>, args: Array<any> ) => boolean;\n\n\t/**\n\t * Hook called after successful method execution.\n\t *\n\t * @param context The call context object with state from the before hook.\n\t * @param result The result returned by the original method.\n\t */\n\tafter?: ( context: Record<string, any>, result: any ) => void;\n\n\t/**\n\t * Hook called when the method execution throws an error.\n\t *\n\t * @param context The call context object with state from the before hook.\n\t * @param error The error thrown by the original method.\n\t */\n\terror?: ( context: Record<string, any>, error: any ) => void;\n}\n\n/**\n * Serializes a value into a JSON-serializable format.\n *\n * @internal\n *\n * @param value The value to serialize.\n * @param visited Set of already serialized objects to avoid circular references.\n * @returns A JSON-serializable representation of the value.\n */\nexport function serializeValue( value: any, visited: WeakSet<object> = new WeakSet() ): any {\n\tif ( !value || [ 'boolean', 'number', 'string' ].includes( typeof value ) ) {\n\t\treturn value;\n\t}\n\n\tif ( typeof value.toJSON == 'function' ) {\n\t\tconst jsonData = value.toJSON();\n\n\t\t// Make sure that toJSON returns plain object, otherwise it could be just a clone with circular references.\n\t\tif ( isPlainObject( jsonData ) || Array.isArray( jsonData ) || [ 'string', 'number', 'boolean' ].includes( typeof jsonData ) ) {\n\t\t\treturn serializeValue( jsonData, visited );\n\t\t}\n\t}\n\n\tif ( value instanceof Error ) {\n\t\treturn {\n\t\t\tname: value.name,\n\t\t\tmessage: value.message,\n\t\t\tstack: value.stack\n\t\t};\n\t}\n\n\t// Most TypeCheckable should implement toJSON method so this is a fallback for other TypeCheckable objects.\n\tif ( isTypeCheckable( value ) || typeof value != 'object' ) {\n\t\treturn {\n\t\t\ttype: typeof value,\n\t\t\tconstructor: value.constructor?.name || 'unknown',\n\t\t\tstring: String( value )\n\t\t};\n\t}\n\n\tif ( value instanceof File || value instanceof Blob || value instanceof FormData || value instanceof DataTransfer ) {\n\t\treturn String( value );\n\t}\n\n\tif ( visited.has( value ) ) {\n\t\treturn;\n\t}\n\n\tvisited.add( value );\n\n\t// Arrays.\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length ? value.map( item => serializeValue( item, visited ) ) : undefined;\n\t}\n\n\t// Other objects (plain, instances of classes, or events).\n\tconst result: Record<string, any> = {};\n\tconst ignoreFields: Array<string> = [];\n\n\t// DOM event additional fields.\n\tif ( value.domEvent ) {\n\t\tignoreFields.push( 'domEvent', 'domTarget', 'view', 'document' );\n\n\t\tresult.domEvent = serializeDomEvent( value.domEvent );\n\t\tresult.target = serializeValue( value.target );\n\n\t\tif ( value.dataTransfer ) {\n\t\t\tresult.dataTransfer = {\n\t\t\t\ttypes: value.dataTransfer.types,\n\t\t\t\thtmlData: value.dataTransfer.getData( 'text/html' ),\n\t\t\t\tfiles: serializeValue( value.dataTransfer.files )\n\t\t\t};\n\t\t}\n\t}\n\n\t// Other object types.\n\tfor ( const [ key, val ] of Object.entries( value ) ) {\n\t\t// Ignore private fields, DOM events serialized above, and decorated methods.\n\t\tif ( key.startsWith( '_' ) || ignoreFields.includes( key ) || typeof val == 'function' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst serializedValue = serializeValue( val, visited );\n\n\t\tif ( serializedValue !== undefined ) {\n\t\t\tresult[ key ] = serializedValue;\n\t\t}\n\t}\n\n\tif ( Symbol.iterator in value ) {\n\t\tconst items = Array.from( value[ Symbol.iterator ]() ).map( item => serializeValue( item, visited ) );\n\n\t\tif ( items.length ) {\n\t\t\tresult._items = items;\n\t\t}\n\t}\n\n\treturn Object.keys( result ).length ? result : undefined;\n}\n\n/**\n * Serializes a DOM event into a plain object representation.\n *\n * Extracts common properties from DOM events such as type, target information,\n * coordinates, key codes, and other relevant event data for debugging purposes.\n *\n * @param event The DOM event to serialize.\n * @returns A serialized object containing the event's key properties.\n */\nfunction serializeDomEvent( event: Event ): any {\n\tlet serialized: Record<string, any> = {\n\t\ttype: event.type,\n\t\ttarget: serializeDOMTarget( event.target )\n\t};\n\n\t// Add mouse event properties.\n\tif ( event instanceof MouseEvent ) {\n\t\tserialized = {\n\t\t\t...serialized,\n\t\t\tbutton: event.button,\n\t\t\tbuttons: event.buttons,\n\t\t\tctrlKey: event.ctrlKey,\n\t\t\tshiftKey: event.shiftKey,\n\t\t\taltKey: event.altKey,\n\t\t\tmetaKey: event.metaKey\n\t\t};\n\t}\n\n\t// Add keyboard event properties.\n\tif ( event instanceof KeyboardEvent ) {\n\t\tserialized = {\n\t\t\t...serialized,\n\t\t\tkey: event.key,\n\t\t\tcode: event.code,\n\t\t\tkeyCode: event.keyCode,\n\t\t\tctrlKey: event.ctrlKey,\n\t\t\tshiftKey: event.shiftKey,\n\t\t\taltKey: event.altKey,\n\t\t\tmetaKey: event.metaKey,\n\t\t\trepeat: event.repeat\n\t\t};\n\t}\n\n\t// Add input event properties.\n\tif ( event instanceof InputEvent ) {\n\t\tserialized = {\n\t\t\t...serialized,\n\t\t\tdata: event.data,\n\t\t\tinputType: event.inputType,\n\t\t\tisComposing: event.isComposing\n\t\t};\n\t}\n\n\t// Add pointer event properties.\n\tif ( event instanceof PointerEvent ) {\n\t\tserialized = {\n\t\t\t...serialized,\n\t\t\tisPrimary: event.isPrimary\n\t\t};\n\t}\n\n\t/**\n\t * Serializes a DOM event target into a plain object representation.\n\t *\n\t * @param target The DOM event target to serialize.\n\t * @returns A serialized object containing the target's information.\n\t */\n\tfunction serializeDOMTarget( target: EventTarget | null ) {\n\t\tif ( !target ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( target instanceof Element ) {\n\t\t\treturn {\n\t\t\t\ttagName: target.tagName,\n\t\t\t\tclassName: target.className,\n\t\t\t\tid: target.id\n\t\t\t};\n\t\t}\n\n\t\tif ( target instanceof Window || target instanceof Document ) {\n\t\t\treturn {\n\t\t\t\ttype: target.constructor.name\n\t\t\t};\n\t\t}\n\n\t\treturn {};\n\t}\n\n\treturn serialized;\n}\n\n/**\n * Checks if a value is type-checkable, meaning it has an `is` method.\n */\nfunction isTypeCheckable( value: any ): value is ViewTypeCheckable & ModelTypeCheckable {\n\treturn value && typeof value.is === 'function';\n}\n\n/* v8 ignore stop -- @preserve */\n", "import { CKEditorError, Collection, Config, EmitterMixin, KeystrokeHandler, Locale, ObservableMixin, crc32, decodeLicenseKey, env, getDataFromElement, global, insertToPriorityArray, isFeatureBlockedByLicenseKey, logError, logWarning, releaseDate, setDataInElement, toArray, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { get, isElement, isFunction, isPlainObject, set } from \"es-toolkit/compat\";\nimport { Conversion, DataController, EditingController, Model, StylesProcessor } from \"@ckeditor/ckeditor5-engine\";\nimport { ContextWatchdog, EditorWatchdog } from \"@ckeditor/ckeditor5-watchdog\";\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 core/plugin\n*/\nconst PluginBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The base class for CKEditor plugin classes.\n*/\nvar Plugin = class extends PluginBase {\n\t/**\n\t* The editor instance.\n\t*\n\t* Note that most editors implement the {@link module:core/editor/editor~Editor#ui} property.\n\t* However, editors with an external UI (i.e. Bootstrap-based) or a headless editor may not have this property or\n\t* throw an error when accessing it.\n\t*\n\t* Because of above, to make plugins more universal, it is recommended to split features into:\n\t*  - The \"editing\" part that uses the {@link module:core/editor/editor~Editor} class without `ui` property.\n\t*  - The \"UI\" part that uses the {@link module:core/editor/editor~Editor} class and accesses `ui` property.\n\t*/\n\teditor;\n\t/**\n\t* Holds identifiers for {@link #forceDisabled} mechanism.\n\t*/\n\t_disableStack = /* @__PURE__ */ new Set();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper();\n\t\tthis.editor = editor;\n\t\tthis.set(\"isEnabled\", true);\n\t}\n\t/**\n\t* Disables the plugin.\n\t*\n\t* Plugin may be disabled by multiple features or algorithms (at once). When disabling a plugin, unique id should be passed\n\t* (e.g. feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the plugin.\n\t* The plugin becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t*\n\t* Disabling and enabling a plugin:\n\t*\n\t* ```ts\n\t* plugin.isEnabled; // -> true\n\t* plugin.forceDisabled( 'MyFeature' );\n\t* plugin.isEnabled; // -> false\n\t* plugin.clearForceDisabled( 'MyFeature' );\n\t* plugin.isEnabled; // -> true\n\t* ```\n\t*\n\t* Plugin disabled by multiple features:\n\t*\n\t* ```ts\n\t* plugin.forceDisabled( 'MyFeature' );\n\t* plugin.forceDisabled( 'OtherFeature' );\n\t* plugin.clearForceDisabled( 'MyFeature' );\n\t* plugin.isEnabled; // -> false\n\t* plugin.clearForceDisabled( 'OtherFeature' );\n\t* plugin.isEnabled; // -> true\n\t* ```\n\t*\n\t* Multiple disabling with the same identifier is redundant:\n\t*\n\t* ```ts\n\t* plugin.forceDisabled( 'MyFeature' );\n\t* plugin.forceDisabled( 'MyFeature' );\n\t* plugin.clearForceDisabled( 'MyFeature' );\n\t* plugin.isEnabled; // -> true\n\t* ```\n\t*\n\t* **Note:** some plugins or algorithms may have more complex logic when it comes to enabling or disabling certain plugins,\n\t* so the plugin might be still disabled after {@link #clearForceDisabled} was used.\n\t*\n\t* @param id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the plugin.\n\t*/\n\tforceDisabled(id) {\n\t\tthis._disableStack.add(id);\n\t\tif (this._disableStack.size == 1) {\n\t\t\tthis.on(\"set:isEnabled\", forceDisable$1, { priority: \"highest\" });\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\t/**\n\t* Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t*\n\t* @param id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t*/\n\tclearForceDisabled(id) {\n\t\tthis._disableStack.delete(id);\n\t\tif (this._disableStack.size == 0) {\n\t\t\tthis.off(\"set:isEnabled\", forceDisable$1);\n\t\t\tthis.isEnabled = true;\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isContextPlugin() {\n\t\treturn false;\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn false;\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn false;\n\t}\n};\n/**\n* Helper function that forces plugin to be disabled.\n*/\nfunction forceDisable$1(evt) {\n\tevt.return = false;\n\tevt.stop();\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 core/command\n*/\nconst CommandBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Base class for the CKEditor commands.\n*\n* Commands are the main way to manipulate the editor contents and state. They are mostly used by UI elements (or by other\n* commands) to make changes in the model. Commands are available in every part of the code that has access to\n* the {@link module:core/editor/editor~Editor editor} instance.\n*\n* Instances of registered commands can be retrieved from {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n* The easiest way to execute a command is through {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n*\n* By default, commands are disabled when the editor is in the {@link module:core/editor/editor~Editor#isReadOnly read-only} mode\n* but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.\n*/\nvar Command = class extends CommandBase {\n\t/**\n\t* The editor on which this command will be used.\n\t*/\n\teditor;\n\t/**\n\t* A flag indicating whether a command's `isEnabled` state should be changed depending on where the document\n\t* selection is placed.\n\t*\n\t* By default, it is set to `true`. If the document selection is placed in a\n\t* {@link module:engine/model/model~Model#canEditAt non-editable} place (such as non-editable root), the command becomes disabled.\n\t*\n\t* The flag should be changed to `false` in a concrete command's constructor if the command should not change its `isEnabled`\n\t* accordingly to the document selection.\n\t*/\n\t_isEnabledBasedOnSelection;\n\t/**\n\t* A flag indicating whether a command execution changes the editor data or not.\n\t*\n\t* @see #affectsData\n\t*/\n\t_affectsData;\n\t/**\n\t* Holds identifiers for {@link #forceDisabled} mechanism.\n\t*/\n\t_disableStack;\n\t/**\n\t* `Command` class is commonly put in `config.plugins` array.\n\t*\n\t* This property helps with better error detection.\n\t*\n\t* @internal\n\t*/\n\tstatic get _throwErrorWhenUsedAsAPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Creates a new `Command` instance.\n\t*\n\t* @param editor The editor on which this command will be used.\n\t*/\n\tconstructor(editor) {\n\t\tsuper();\n\t\tthis.editor = editor;\n\t\tthis.set(\"value\", void 0);\n\t\tthis.set(\"isEnabled\", false);\n\t\tthis._affectsData = true;\n\t\tthis._isEnabledBasedOnSelection = true;\n\t\tthis._disableStack = /* @__PURE__ */ new Set();\n\t\tthis.decorate(\"execute\");\n\t\tthis.listenTo(this.editor.model.document, \"change\", () => {\n\t\t\tthis.refresh();\n\t\t});\n\t\tthis.listenTo(editor, \"change:isReadOnly\", () => {\n\t\t\tthis.refresh();\n\t\t});\n\t\tthis.on(\"set:isEnabled\", (evt) => {\n\t\t\tif (!this.affectsData) return;\n\t\t\tconst selection = editor.model.document.selection;\n\t\t\tconst canEditAtSelection = !(selection.getFirstPosition().root.rootName == \"$graveyard\") && editor.model.canEditAt(selection);\n\t\t\tif (editor.isReadOnly || this._isEnabledBasedOnSelection && !canEditAtSelection) {\n\t\t\t\tevt.return = false;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: \"highest\" });\n\t\tthis.on(\"execute\", (evt) => {\n\t\t\tif (!this.isEnabled) evt.stop();\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* A flag indicating whether a command execution changes the editor data or not.\n\t*\n\t* Commands with `affectsData` set to `false` will not be automatically disabled in\n\t* the {@link module:core/editor/editor~Editor#isReadOnly read-only mode} and\n\t* {@glink features/read-only#related-features other editor modes} with restricted user write permissions.\n\t*\n\t* **Note:** You do not have to set it for your every command. It is `true` by default.\n\t*\n\t* @default true\n\t*/\n\tget affectsData() {\n\t\treturn this._affectsData;\n\t}\n\tset affectsData(affectsData) {\n\t\tthis._affectsData = affectsData;\n\t}\n\t/**\n\t* Refreshes the command. The command should update its {@link #isEnabled} and {@link #value} properties\n\t* in this method.\n\t*\n\t* This method is automatically called when\n\t* {@link module:engine/model/document~ModelDocument#event:change any changes are applied to the document}.\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = true;\n\t}\n\t/**\n\t* Disables the command.\n\t*\n\t* Command may be disabled by multiple features or algorithms (at once). When disabling a command, unique id should be passed\n\t* (e.g. the feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the command.\n\t* The command becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t*\n\t* Disabling and enabling a command:\n\t*\n\t* ```ts\n\t* command.isEnabled; // -> true\n\t* command.forceDisabled( 'MyFeature' );\n\t* command.isEnabled; // -> false\n\t* command.clearForceDisabled( 'MyFeature' );\n\t* command.isEnabled; // -> true\n\t* ```\n\t*\n\t* Command disabled by multiple features:\n\t*\n\t* ```ts\n\t* command.forceDisabled( 'MyFeature' );\n\t* command.forceDisabled( 'OtherFeature' );\n\t* command.clearForceDisabled( 'MyFeature' );\n\t* command.isEnabled; // -> false\n\t* command.clearForceDisabled( 'OtherFeature' );\n\t* command.isEnabled; // -> true\n\t* ```\n\t*\n\t* Multiple disabling with the same identifier is redundant:\n\t*\n\t* ```ts\n\t* command.forceDisabled( 'MyFeature' );\n\t* command.forceDisabled( 'MyFeature' );\n\t* command.clearForceDisabled( 'MyFeature' );\n\t* command.isEnabled; // -> true\n\t* ```\n\t*\n\t* **Note:** some commands or algorithms may have more complex logic when it comes to enabling or disabling certain commands,\n\t* so the command might be still disabled after {@link #clearForceDisabled} was used.\n\t*\n\t* @param id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the command.\n\t*/\n\tforceDisabled(id) {\n\t\tthis._disableStack.add(id);\n\t\tif (this._disableStack.size == 1) {\n\t\t\tthis.on(\"set:isEnabled\", forceDisable, { priority: \"highest\" });\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\t/**\n\t* Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t*\n\t* @param id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t*/\n\tclearForceDisabled(id) {\n\t\tthis._disableStack.delete(id);\n\t\tif (this._disableStack.size == 0) {\n\t\t\tthis.off(\"set:isEnabled\", forceDisable);\n\t\t\tthis.refresh();\n\t\t}\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* A command may accept parameters. They will be passed from {@link module:core/editor/editor~Editor#execute `editor.execute()`}\n\t* to the command.\n\t*\n\t* The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).\n\t* This behavior is implemented by a high priority listener to the {@link #event:execute} event.\n\t*\n\t* In order to see how to disable a command from \"outside\" see the {@link #isEnabled} documentation.\n\t*\n\t* This method may return a value, which would be forwarded all the way down to the\n\t* {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n\t*\n\t* @fires execute\n\t*/\n\texecute(...args) {}\n\t/**\n\t* Destroys the command.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n};\n/**\n* Helper function that forces command to be disabled.\n*/\nfunction forceDisable(evt) {\n\tevt.return = false;\n\tevt.stop();\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 core/multicommand\n*/\n/**\n* A CKEditor command that aggregates other commands.\n*\n* This command is used to proxy multiple commands. The multi-command is enabled when\n* at least one of its registered child commands is enabled.\n* When executing a multi-command, the first enabled command with highest priority will be executed.\n*\n* ```ts\n* const multiCommand = new MultiCommand( editor );\n*\n* const commandFoo = new Command( editor );\n* const commandBar = new Command( editor );\n*\n* // Register a child command.\n* multiCommand.registerChildCommand( commandFoo );\n* // Register a child command with a low priority.\n* multiCommand.registerChildCommand( commandBar, { priority: 'low' } );\n*\n* // Enable one of the commands.\n* commandBar.isEnabled = true;\n*\n* multiCommand.execute(); // Will execute commandBar.\n* ```\n*/\nvar MultiCommand = class extends Command {\n\t/**\n\t* Registered child commands definitions.\n\t*/\n\t_childCommandsDefinitions = [];\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {}\n\t/**\n\t* Executes the first enabled command which has the highest priority of all registered child commands.\n\t*\n\t* @returns The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t*/\n\texecute(...args) {\n\t\tconst command = this._getFirstEnabledCommand();\n\t\treturn !!command && command.execute(args);\n\t}\n\t/**\n\t* Registers a child command.\n\t*\n\t* @param options An object with configuration options.\n\t* @param options.priority Priority of a command to register.\n\t*/\n\tregisterChildCommand(command, options = {}) {\n\t\tinsertToPriorityArray(this._childCommandsDefinitions, {\n\t\t\tcommand,\n\t\t\tpriority: options.priority || \"normal\"\n\t\t});\n\t\tcommand.on(\"change:isEnabled\", () => this._checkEnabled());\n\t\tthis._checkEnabled();\n\t}\n\t/**\n\t* Checks if any of child commands is enabled.\n\t*/\n\t_checkEnabled() {\n\t\tthis.isEnabled = !!this._getFirstEnabledCommand();\n\t}\n\t/**\n\t* Returns a first enabled command with the highest priority or `undefined` if none of them is enabled.\n\t*/\n\t_getFirstEnabledCommand() {\n\t\tconst commandDefinition = this._childCommandsDefinitions.find(({ command }) => command.isEnabled);\n\t\treturn commandDefinition && commandDefinition.command;\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 core/commandcollection\n*/\n/**\n* Collection of commands. Its instance is available in {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n*/\nvar CommandCollection = class {\n\t/**\n\t* Command map.\n\t*/\n\t_commands;\n\t/**\n\t* Creates collection instance.\n\t*/\n\tconstructor() {\n\t\tthis._commands = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* Registers a new command.\n\t*\n\t* @param commandName The name of the command.\n\t*/\n\tadd(commandName, command) {\n\t\tthis._commands.set(commandName, command);\n\t}\n\t/**\n\t* Retrieves a command from the collection.\n\t*\n\t* @param commandName The name of the command.\n\t*/\n\tget(commandName) {\n\t\treturn this._commands.get(commandName);\n\t}\n\t/**\n\t* Executes a command.\n\t*\n\t* @param commandName The name of the command.\n\t* @param commandParams Command parameters.\n\t* @returns The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t*/\n\texecute(commandName, ...commandParams) {\n\t\tconst command = this.get(commandName);\n\t\tif (!command)\n /**\n\t\t* Command does not exist.\n\t\t*\n\t\t* @error commandcollection-command-not-found\n\t\t* @param {string} commandName Name of the command.\n\t\t*/\n\t\tthrow new CKEditorError(\"commandcollection-command-not-found\", this, { commandName });\n\t\treturn command.execute(...commandParams);\n\t}\n\t/**\n\t* Returns iterator of command names.\n\t*/\n\t*names() {\n\t\tyield* this._commands.keys();\n\t}\n\t/**\n\t* Returns iterator of command instances.\n\t*/\n\t*commands() {\n\t\tyield* this._commands.values();\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* Returns `[ commandName, commandInstance ]` pairs.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this._commands[Symbol.iterator]();\n\t}\n\t/**\n\t* Destroys all collection commands.\n\t*/\n\tdestroy() {\n\t\tfor (const command of this.commands()) command.destroy();\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 core/plugincollection\n*/\nconst PluginCollectionBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.\n*/\nvar PluginCollection = class extends PluginCollectionBase {\n\t_context;\n\t_plugins = /* @__PURE__ */ new Map();\n\t/**\n\t* A map of plugin constructors that can be retrieved by their names.\n\t*/\n\t_availablePlugins;\n\t/**\n\t* Map of {@link module:core/contextplugin~ContextPlugin context plugins} which can be retrieved by their constructors or instances.\n\t*/\n\t_contextPlugins;\n\t/**\n\t* Creates an instance of the plugin collection class.\n\t* Allows loading and initializing plugins and their dependencies.\n\t* Allows providing a list of already loaded plugins. These plugins will not be destroyed along with this collection.\n\t*\n\t* @param availablePlugins Plugins (constructors) which the collection will be able to use\n\t* when {@link module:core/plugincollection~PluginCollection#init} is used with the plugin names (strings, instead of constructors).\n\t* Usually, the editor will pass its built-in plugins to the collection so they can later be\n\t* used in `config.plugins` or `config.removePlugins` by names.\n\t* @param contextPlugins A list of already initialized plugins represented by a `[ PluginConstructor, pluginInstance ]` pair.\n\t*/\n\tconstructor(context, availablePlugins = [], contextPlugins = []) {\n\t\tsuper();\n\t\tthis._context = context;\n\t\tthis._availablePlugins = /* @__PURE__ */ new Map();\n\t\tfor (const PluginConstructor of availablePlugins) if (PluginConstructor.pluginName) this._availablePlugins.set(PluginConstructor.pluginName, PluginConstructor);\n\t\tthis._contextPlugins = /* @__PURE__ */ new Map();\n\t\tfor (const [PluginConstructor, pluginInstance] of contextPlugins) {\n\t\t\tthis._contextPlugins.set(PluginConstructor, pluginInstance);\n\t\t\tthis._contextPlugins.set(pluginInstance, PluginConstructor);\n\t\t\tif (PluginConstructor.pluginName) this._availablePlugins.set(PluginConstructor.pluginName, PluginConstructor);\n\t\t}\n\t}\n\t/**\n\t* Iterable interface.\n\t*\n\t* Returns `[ PluginConstructor, pluginInstance ]` pairs.\n\t*/\n\t*[Symbol.iterator]() {\n\t\tfor (const entry of this._plugins) if (typeof entry[0] == \"function\") yield entry;\n\t}\n\t/**\n\t* Gets the plugin instance by its constructor or name.\n\t*\n\t* ```ts\n\t* // Check if 'Clipboard' plugin was loaded.\n\t* if ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t* \t// Get clipboard plugin instance\n\t* \tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t*\n\t* \tthis.listenTo( clipboard, 'inputTransformation', ( evt, data ) => {\n\t* \t\t// Do something on clipboard input.\n\t* \t} );\n\t* }\n\t* ```\n\t*\n\t* **Note**: This method will throw an error if a plugin is not loaded. Use `{@link #has editor.plugins.has()}`\n\t* to check if a plugin is available.\n\t*\n\t* @param key The plugin constructor or {@link module:core/plugin~PluginStaticMembers#pluginName name}.\n\t*/\n\tget(key) {\n\t\tconst plugin = this._plugins.get(key);\n\t\tif (!plugin) {\n\t\t\tlet pluginName = key;\n\t\t\tif (typeof key == \"function\") pluginName = key.pluginName || key.name;\n\t\t\t/**\n\t\t\t* The plugin is not loaded and could not be obtained.\n\t\t\t*\n\t\t\t* Plugin classes (constructors) need to be provided to the editor and must be loaded before they can be obtained from\n\t\t\t* the plugin collection.\n\t\t\t*\n\t\t\t* **Note**: You can use `{@link module:core/plugincollection~PluginCollection#has editor.plugins.has()}`\n\t\t\t* to check if a plugin was loaded.\n\t\t\t*\n\t\t\t* @error plugincollection-plugin-not-loaded\n\t\t\t* @param {string} plugin The name of the plugin which is not loaded.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"plugincollection-plugin-not-loaded\", this._context, { plugin: pluginName });\n\t\t}\n\t\treturn plugin;\n\t}\n\t/**\n\t* Checks if a plugin is loaded.\n\t*\n\t* ```ts\n\t* // Check if the 'Clipboard' plugin was loaded.\n\t* if ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t* \t// Now use the clipboard plugin instance:\n\t* \tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t*\n\t* \t// ...\n\t* }\n\t* ```\n\t*\n\t* @param key The plugin constructor or {@link module:core/plugin~PluginStaticMembers#pluginName name}.\n\t*/\n\thas(key) {\n\t\treturn this._plugins.has(key);\n\t}\n\t/**\n\t* Initializes a set of plugins and adds them to the collection.\n\t*\n\t* @param plugins An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t* or {@link module:core/plugin~PluginStaticMembers#pluginName plugin names}.\n\t* @param pluginsToRemove Names of the plugins or plugin constructors\n\t* that should not be loaded (despite being specified in the `plugins` array).\n\t* @param pluginsSubstitutions An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t* that will be used to replace plugins of the same names that were passed in `plugins` or that are in their dependency tree.\n\t* A useful option for replacing built-in plugins while creating tests (for mocking their APIs). Plugins that will be replaced\n\t* must follow these rules:\n\t*   * The new plugin must be a class.\n\t*   * The new plugin must be named.\n\t*   * Both plugins must not depend on other plugins.\n\t* @returns A promise which gets resolved once all plugins are loaded and available in the collection.\n\t*/\n\tasync init(plugins, pluginsToRemove = [], pluginsSubstitutions = []) {\n\t\tconst that = this;\n\t\tconst context = this._context;\n\t\tfindAvailablePluginConstructors(plugins);\n\t\tvalidatePlugins(plugins);\n\t\tconst pluginConstructors = [...getPluginConstructors(plugins.filter((plugin) => !isPluginRemoved(plugin, pluginsToRemove)))];\n\t\tsubstitutePlugins(pluginConstructors, pluginsSubstitutions);\n\t\tconst pluginInstances = loadPlugins(pluginConstructors);\n\t\tawait initPlugins(pluginInstances, \"init\");\n\t\tawait initPlugins(pluginInstances, \"afterInit\");\n\t\treturn pluginInstances;\n\t\tfunction isPluginConstructor(plugin) {\n\t\t\treturn typeof plugin === \"function\";\n\t\t}\n\t\tfunction isContextPlugin(plugin) {\n\t\t\treturn isPluginConstructor(plugin) && !!plugin.isContextPlugin;\n\t\t}\n\t\tfunction isPluginRemoved(plugin, pluginsToRemove) {\n\t\t\treturn pluginsToRemove.some((removedPlugin) => {\n\t\t\t\tif (removedPlugin === plugin) return true;\n\t\t\t\tif (getPluginName(plugin) === removedPlugin) return true;\n\t\t\t\tif (getPluginName(removedPlugin) === plugin) return true;\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t\tfunction getPluginName(plugin) {\n\t\t\treturn isPluginConstructor(plugin) ? plugin.pluginName || plugin.name : plugin;\n\t\t}\n\t\tfunction findAvailablePluginConstructors(plugins, processed = /* @__PURE__ */ new Set()) {\n\t\t\tplugins.forEach((plugin) => {\n\t\t\t\tif (!isPluginConstructor(plugin)) return;\n\t\t\t\tif (processed.has(plugin)) return;\n\t\t\t\tprocessed.add(plugin);\n\t\t\t\tif (plugin.pluginName && !that._availablePlugins.has(plugin.pluginName)) that._availablePlugins.set(plugin.pluginName, plugin);\n\t\t\t\tif (plugin.requires) findAvailablePluginConstructors(plugin.requires, processed);\n\t\t\t});\n\t\t}\n\t\tfunction getPluginConstructors(plugins, processed = /* @__PURE__ */ new Set()) {\n\t\t\treturn plugins.map((plugin) => {\n\t\t\t\treturn isPluginConstructor(plugin) ? plugin : that._availablePlugins.get(plugin);\n\t\t\t}).reduce((result, plugin) => {\n\t\t\t\tif (processed.has(plugin)) return result;\n\t\t\t\tprocessed.add(plugin);\n\t\t\t\tif (plugin.requires) {\n\t\t\t\t\tvalidatePlugins(plugin.requires, plugin);\n\t\t\t\t\tgetPluginConstructors(plugin.requires, processed).forEach((plugin) => result.add(plugin));\n\t\t\t\t}\n\t\t\t\treturn result.add(plugin);\n\t\t\t}, /* @__PURE__ */ new Set());\n\t\t}\n\t\tfunction validatePlugins(plugins, parentPluginConstructor = null) {\n\t\t\tplugins.map((plugin) => {\n\t\t\t\treturn isPluginConstructor(plugin) ? plugin : that._availablePlugins.get(plugin) || plugin;\n\t\t\t}).forEach((plugin) => {\n\t\t\t\tcheckPluginConstructor(plugin);\n\t\t\t\tcheckMissingPlugin(plugin, parentPluginConstructor);\n\t\t\t\tcheckContextPlugin(plugin, parentPluginConstructor);\n\t\t\t\tcheckRemovedPlugin(plugin, parentPluginConstructor);\n\t\t\t});\n\t\t}\n\t\tfunction checkPluginConstructor(plugin) {\n\t\t\tif (typeof plugin !== \"function\") return;\n\t\t\tif (plugin._throwErrorWhenUsedAsAPlugin)\n /**\n\t\t\t* The provided class constructor is not a plugin.\n\t\t\t*\n\t\t\t* This error is usually caused by passing an editor, context, or command\n\t\t\t* constructor in the `config.plugins` array.\n\t\t\t*\n\t\t\t* @param {String} name The name of the provided constructor.\n\t\t\t* @error plugincollection-plugin-invalid-constructor\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"plugincollection-plugin-invalid-constructor\", context, { name: plugin.name });\n\t\t}\n\t\tfunction checkMissingPlugin(plugin, parentPluginConstructor) {\n\t\t\tif (isPluginConstructor(plugin)) return;\n\t\t\tif (parentPluginConstructor)\n /**\n\t\t\t* A required \"soft\" dependency was not found on the plugin list.\n\t\t\t*\n\t\t\t* When configuring the editor, either prior to building (via\n\t\t\t* {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}) or when\n\t\t\t* creating a new instance of the editor (e.g. via\n\t\t\t* {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`}), you need to provide\n\t\t\t* some of the dependencies for other plugins that you used.\n\t\t\t*\n\t\t\t* This error is thrown when one of these dependencies was not provided. The name of the missing plugin\n\t\t\t* can be found in `missingPlugin` and the plugin that required it in `requiredBy`.\n\t\t\t*\n\t\t\t* In order to resolve it, you need to import the missing plugin and add it to the\n\t\t\t* current list of plugins (`Editor.builtinPlugins` or `config.plugins`/`config.extraPlugins`).\n\t\t\t*\n\t\t\t* Soft requirements were introduced in version 26.0.0. If you happen to stumble upon this error\n\t\t\t* when upgrading to version 26.0.0, read also the `Update to v26.x` section in the\n\t\t\t* {@glink updating/guides/updating-from-older-versions updating from older versions} guide.\n\t\t\t*\n\t\t\t* @error plugincollection-soft-required\n\t\t\t* @param {string} missingPlugin The name of the required plugin.\n\t\t\t* @param {string} requiredBy The name of the plugin that requires the other plugin.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"plugincollection-soft-required\", context, {\n\t\t\t\tmissingPlugin: plugin,\n\t\t\t\trequiredBy: getPluginName(parentPluginConstructor)\n\t\t\t});\n\t\t\t/**\n\t\t\t* A plugin is not available and could not be loaded.\n\t\t\t*\n\t\t\t* Plugin classes (constructors) need to be provided to the editor before they can be loaded by name.\n\t\t\t* This is usually done in the now deprecated CKEditor 5 builds by setting\n\t\t\t* the {@link module:core/editor/editor~Editor.builtinPlugins} property.\n\t\t\t*\n\t\t\t* **If you see this warning when using one of the deprecated CKEditor 5 Builds**,\n\t\t\t* it means that you tried to enable a plugin that was not included in that build. This may be due to a typo\n\t\t\t* in the plugin name or simply because that plugin was not a part of this build.\n\t\t\t*\n\t\t\t* **Predefined builds are no longer supported and you need to\n\t\t\t* {@glink updating/nim-migration/migration-to-new-installation-methods migrate to new installation methods}**.\n\t\t\t*\n\t\t\t* **If you see this warning when using one of the editor creators directly** (not a build), then it means\n\t\t\t* that you tried loading plugins by name. However, unlike CKEditor 4, CKEditor 5 does not implement a \"plugin loader\".\n\t\t\t* This means that CKEditor 5 does not know where to load the plugin modules from. Therefore, you need to\n\t\t\t* provide each plugin through a reference (as a constructor function). Check out the examples in the\n\t\t\t* {@glink getting-started/installation/cloud/quick-start Quick start} guide.\n\t\t\t*\n\t\t\t* @error plugincollection-plugin-not-found\n\t\t\t* @param {string} plugin The name of the plugin which could not be loaded.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"plugincollection-plugin-not-found\", context, { plugin });\n\t\t}\n\t\tfunction checkContextPlugin(plugin, parentPluginConstructor) {\n\t\t\tif (!isContextPlugin(parentPluginConstructor)) return;\n\t\t\tif (isContextPlugin(plugin)) return;\n\t\t\t/**\n\t\t\t* If a plugin is a context plugin, all plugins it requires should also be context plugins\n\t\t\t* instead of plugins. In other words, if one plugin can be used in the context,\n\t\t\t* all its requirements should also be ready to be used in the context. Note that the context\n\t\t\t* provides only a part of the API provided by the editor. If one plugin needs a full\n\t\t\t* editor API, all plugins which require it are considered as plugins that need a full\n\t\t\t* editor API.\n\t\t\t*\n\t\t\t* @error plugincollection-context-required\n\t\t\t* @param {string} plugin The name of the required plugin.\n\t\t\t* @param {string} requiredBy The name of the parent plugin.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"plugincollection-context-required\", context, {\n\t\t\t\tplugin: getPluginName(plugin),\n\t\t\t\trequiredBy: getPluginName(parentPluginConstructor)\n\t\t\t});\n\t\t}\n\t\tfunction checkRemovedPlugin(plugin, parentPluginConstructor) {\n\t\t\tif (!parentPluginConstructor) return;\n\t\t\tif (!isPluginRemoved(plugin, pluginsToRemove)) return;\n\t\t\t/**\n\t\t\t* Cannot load a plugin because one of its dependencies is listed in the `removePlugins` option.\n\t\t\t*\n\t\t\t* @error plugincollection-required\n\t\t\t* @param {string} plugin The name of the required plugin.\n\t\t\t* @param {string} requiredBy The name of the parent plugin.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"plugincollection-required\", context, {\n\t\t\t\tplugin: getPluginName(plugin),\n\t\t\t\trequiredBy: getPluginName(parentPluginConstructor)\n\t\t\t});\n\t\t}\n\t\tfunction loadPlugins(pluginConstructors) {\n\t\t\treturn pluginConstructors.map((PluginConstructor) => {\n\t\t\t\tlet pluginInstance = that._contextPlugins.get(PluginConstructor);\n\t\t\t\tpluginInstance = pluginInstance || new PluginConstructor(context);\n\t\t\t\tthat._add(PluginConstructor, pluginInstance);\n\t\t\t\treturn pluginInstance;\n\t\t\t});\n\t\t}\n\t\tfunction initPlugins(pluginInstances, method) {\n\t\t\treturn pluginInstances.reduce((promise, plugin) => {\n\t\t\t\tif (!plugin[method]) return promise;\n\t\t\t\tif (that._contextPlugins.has(plugin)) return promise;\n\t\t\t\treturn promise.then(plugin[method].bind(plugin));\n\t\t\t}, Promise.resolve());\n\t\t}\n\t\t/**\n\t\t* Replaces plugin constructors with the specified set of plugins.\n\t\t*/\n\t\tfunction substitutePlugins(pluginConstructors, pluginsSubstitutions) {\n\t\t\tfor (const pluginItem of pluginsSubstitutions) {\n\t\t\t\tif (typeof pluginItem != \"function\")\n /**\n\t\t\t\t* The plugin replacing an existing plugin must be a function.\n\t\t\t\t*\n\t\t\t\t* @error plugincollection-replace-plugin-invalid-type\n\t\t\t\t* @param {never} pluginItem The plugin item.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"plugincollection-replace-plugin-invalid-type\", null, { pluginItem });\n\t\t\t\tconst pluginName = pluginItem.pluginName;\n\t\t\t\tif (!pluginName)\n /**\n\t\t\t\t* The plugin replacing an existing plugin must have a name.\n\t\t\t\t*\n\t\t\t\t* @error plugincollection-replace-plugin-missing-name\n\t\t\t\t* @param {module:core/plugin~PluginConstructor} pluginItem The plugin item.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"plugincollection-replace-plugin-missing-name\", null, { pluginItem });\n\t\t\t\tif (pluginItem.requires && pluginItem.requires.length)\n /**\n\t\t\t\t* The plugin replacing an existing plugin cannot depend on other plugins.\n\t\t\t\t*\n\t\t\t\t* @error plugincollection-plugin-for-replacing-cannot-have-dependencies\n\t\t\t\t* @param {string} pluginName The name of the plugin.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"plugincollection-plugin-for-replacing-cannot-have-dependencies\", null, { pluginName });\n\t\t\t\tconst pluginToReplace = that._availablePlugins.get(pluginName);\n\t\t\t\tif (!pluginToReplace)\n /**\n\t\t\t\t* The replaced plugin does not exist in the\n\t\t\t\t* {@link module:core/plugincollection~PluginCollection available plugins} collection.\n\t\t\t\t*\n\t\t\t\t* @error plugincollection-plugin-for-replacing-not-exist\n\t\t\t\t* @param {string} pluginName The name of the plugin.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"plugincollection-plugin-for-replacing-not-exist\", null, { pluginName });\n\t\t\t\tconst indexInPluginConstructors = pluginConstructors.indexOf(pluginToReplace);\n\t\t\t\tif (indexInPluginConstructors === -1) {\n\t\t\t\t\tif (that._contextPlugins.has(pluginToReplace)) return;\n\t\t\t\t\t/**\n\t\t\t\t\t* The replaced plugin will not be loaded so it cannot be replaced.\n\t\t\t\t\t*\n\t\t\t\t\t* @error plugincollection-plugin-for-replacing-not-loaded\n\t\t\t\t\t* @param {string} pluginName The name of the plugin.\n\t\t\t\t\t*/\n\t\t\t\t\tthrow new CKEditorError(\"plugincollection-plugin-for-replacing-not-loaded\", null, { pluginName });\n\t\t\t\t}\n\t\t\t\tif (pluginToReplace.requires && pluginToReplace.requires.length)\n /**\n\t\t\t\t* The replaced plugin cannot depend on other plugins.\n\t\t\t\t*\n\t\t\t\t* @error plugincollection-replaced-plugin-cannot-have-dependencies\n\t\t\t\t* @param {string} pluginName The name of the plugin.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"plugincollection-replaced-plugin-cannot-have-dependencies\", null, { pluginName });\n\t\t\t\tpluginConstructors.splice(indexInPluginConstructors, 1, pluginItem);\n\t\t\t\tthat._availablePlugins.set(pluginName, pluginItem);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Destroys all loaded plugins.\n\t*/\n\tdestroy() {\n\t\tconst promises = [];\n\t\tfor (const [, pluginInstance] of this) if (typeof pluginInstance.destroy == \"function\" && !this._contextPlugins.has(pluginInstance)) promises.push(pluginInstance.destroy());\n\t\treturn Promise.all(promises);\n\t}\n\t/**\n\t* Adds the plugin to the collection. Exposed mainly for testing purposes.\n\t*\n\t* @param PluginConstructor The plugin constructor.\n\t* @param plugin The instance of the plugin.\n\t*/\n\t_add(PluginConstructor, plugin) {\n\t\tthis._plugins.set(PluginConstructor, plugin);\n\t\tconst pluginName = PluginConstructor.pluginName;\n\t\tif (!pluginName) return;\n\t\tif (this._plugins.has(pluginName))\n /**\n\t\t* Two plugins with the same {@link module:core/plugin~PluginStaticMembers#pluginName} were loaded.\n\t\t* This will lead to runtime conflicts between these plugins.\n\t\t*\n\t\t* In practice, this warning usually means that new plugins were added to an existing CKEditor 5 build.\n\t\t* Plugins should always be added to a source version of the editor (`@ckeditor/ckeditor5-editor-*`),\n\t\t* not to an editor imported from one of the `@ckeditor/ckeditor5-build-*` packages.\n\t\t*\n\t\t* Check your import paths and the list of plugins passed to\n\t\t* {@link module:core/editor/editor~Editor.create `Editor.create()`}\n\t\t* or specified in {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n\t\t*\n\t\t* Predefined builds are a deprecated solution and we strongly advise\n\t\t* {@glink updating/nim-migration/migration-to-new-installation-methods migrating to new installation methods}.\n\t\t*\n\t\t* The second option is that your `node_modules/` directory contains duplicated versions of the same\n\t\t* CKEditor 5 packages. Normally, on clean installations, npm deduplicates packages in `node_modules/`, so\n\t\t* it may be enough to call `rm -rf node_modules && npm i`. However, if you installed conflicting versions\n\t\t* of some packages, their dependencies may need to be installed in more than one version which may lead to this\n\t\t* warning.\n\t\t*\n\t\t* Technically speaking, this error occurs because after adding a plugin to an existing editor build\n\t\t* the dependencies of this plugin are being duplicated.\n\t\t* They are already built into that editor build and now get added for the second time as dependencies\n\t\t* of the plugin you are installing.\n\t\t*\n\t\t* @error plugincollection-plugin-name-conflict\n\t\t* @param {string} pluginName The duplicated plugin name.\n\t\t* @param {module:core/plugin~PluginConstructor} plugin1 The first plugin constructor.\n\t\t* @param {module:core/plugin~PluginConstructor} plugin2 The second plugin constructor.\n\t\t*/\n\t\tthrow new CKEditorError(\"plugincollection-plugin-name-conflict\", null, {\n\t\t\tpluginName,\n\t\t\tplugin1: this._plugins.get(pluginName).constructor,\n\t\t\tplugin2: PluginConstructor\n\t\t});\n\t\tthis._plugins.set(pluginName, plugin);\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 core/context\n*/\n/**\n* Provides a common, higher-level environment for solutions that use multiple {@link module:core/editor/editor~Editor editors}\n* or plugins that work outside the editor. Use it instead of {@link module:core/editor/editor~Editor.create `Editor.create()`}\n* in advanced application integrations.\n*\n* All configuration options passed to a context will be used as default options for the editor instances initialized in that context.\n*\n* {@link module:core/contextplugin~ContextPlugin Context plugins} passed to a context instance will be shared among all\n* editor instances initialized in this context. These will be the same plugin instances for all the editors.\n*\n* **Note:** The context can only be initialized with {@link module:core/contextplugin~ContextPlugin context plugins}\n* (e.g. [comments](https://ckeditor.com/collaboration/comments/)). Regular {@link module:core/plugin~Plugin plugins} require an\n* editor instance to work and cannot be added to a context.\n*\n* **Note:** You can add a context plugin to an editor instance, though.\n*\n* If you are using multiple editor instances on one page and use any context plugins, create a context to share the configuration and\n* plugins among these editors. Some plugins will use the information about all existing editors to better integrate between them.\n*\n* If you are using plugins that do not require an editor to work (e.g. [comments](https://ckeditor.com/collaboration/comments/)),\n* enable and configure them using the context.\n*\n* If you are using only a single editor on each page, use {@link module:core/editor/editor~Editor.create `Editor.create()`} instead.\n* In such a case, a context instance will be created by the editor instance in a transparent way.\n*\n* See {@link ~Context.create `Context.create()`} for usage examples.\n*/\nvar Context = class {\n\t/**\n\t* Stores all the configurations specific to this context instance.\n\t*/\n\tconfig;\n\t/**\n\t* The plugins loaded and in use by this context instance.\n\t*/\n\tplugins;\n\tlocale;\n\t/**\n\t* Shorthand for {@link module:utils/locale~Locale#t}.\n\t*/\n\tt;\n\t/**\n\t* A list of editors that this context instance is injected to.\n\t*/\n\teditors;\n\t/**\n\t* The default configuration which is built into the `Context` class.\n\t*\n\t* It was used in the now deprecated CKEditor 5 builds featuring `Context` to provide the default configuration options\n\t* which are later used during the context initialization.\n\t*\n\t* ```ts\n\t* Context.defaultConfig = {\n\t* \tfoo: 1,\n\t* \tbar: 2\n\t* };\n\t*\n\t* Context\n\t* \t.create()\n\t* \t.then( context => {\n\t* \t\tcontext.config.get( 'foo' ); // -> 1\n\t* \t\tcontext.config.get( 'bar' ); // -> 2\n\t* \t} );\n\t*\n\t* // The default options can be overridden by the configuration passed to create().\n\t* Context\n\t* \t.create( { bar: 3 } )\n\t* \t.then( context => {\n\t* \t\tcontext.config.get( 'foo' ); // -> 1\n\t* \t\tcontext.config.get( 'bar' ); // -> 3\n\t* \t} );\n\t* ```\n\t*\n\t* See also {@link module:core/context~Context.builtinPlugins `Context.builtinPlugins`}\n\t* and {@link module:core/editor/editor~Editor.defaultConfig `Editor.defaultConfig`}.\n\t*/\n\tstatic defaultConfig;\n\t/**\n\t* An array of plugins built into the `Context` class.\n\t*\n\t* It was used in the now deprecated CKEditor 5 builds featuring `Context` to provide the default configuration options\n\t* which are later used during the context initialization.\n\t*\n\t* They will be automatically initialized by `Context` unless `config.plugins` is passed.\n\t*\n\t* ```ts\n\t* // Build some context plugins into the Context class first.\n\t* Context.builtinPlugins = [ FooPlugin, BarPlugin ];\n\t*\n\t* // Normally, you need to define config.plugins, but since Context.builtinPlugins was\n\t* // defined, now you can call create() without any configuration.\n\t* Context\n\t* \t.create()\n\t* \t.then( context => {\n\t* \t\tcontext.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t* \t\tcontext.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t* \t} );\n\t* ```\n\t*\n\t* See also {@link module:core/context~Context.defaultConfig `Context.defaultConfig`}\n\t* and {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n\t*/\n\tstatic builtinPlugins;\n\t/**\n\t* Reference to the editor which created the context.\n\t* Null when the context was created outside of the editor.\n\t*\n\t* It is used to destroy the context when removing the editor that has created the context.\n\t*/\n\t_contextOwner = null;\n\t/**\n\t* Creates a context instance with a given configuration.\n\t*\n\t* Usually not to be used directly. See the static {@link module:core/context~Context.create `create()`} method.\n\t*\n\t* @param config The context configuration.\n\t*/\n\tconstructor(config) {\n\t\tconst { translations, ...rest } = config || {};\n\t\tthis.config = new Config(rest, this.constructor.defaultConfig);\n\t\tconst availablePlugins = this.constructor.builtinPlugins;\n\t\tthis.config.define(\"plugins\", availablePlugins);\n\t\tthis.plugins = new PluginCollection(this, availablePlugins);\n\t\tconst languageConfig = this.config.get(\"language\") || {};\n\t\tthis.locale = new Locale({\n\t\t\tuiLanguage: typeof languageConfig === \"string\" ? languageConfig : languageConfig.ui,\n\t\t\tcontentLanguage: this.config.get(\"language.content\"),\n\t\t\ttranslations\n\t\t});\n\t\tthis.t = this.locale.t;\n\t\tthis.editors = new Collection();\n\t}\n\t/**\n\t* Loads and initializes plugins specified in the configuration.\n\t*\n\t* @returns A promise which resolves once the initialization is completed, providing an array of loaded plugins.\n\t*/\n\tinitPlugins() {\n\t\tconst plugins = this.config.get(\"plugins\") || [];\n\t\tconst substitutePlugins = this.config.get(\"substitutePlugins\") || [];\n\t\tfor (const Plugin of plugins.concat(substitutePlugins)) {\n\t\t\tif (typeof Plugin != \"function\")\n /**\n\t\t\t* Only a constructor function is allowed as a {@link module:core/contextplugin~ContextPlugin context plugin}.\n\t\t\t*\n\t\t\t* @error context-initplugins-constructor-only\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"context-initplugins-constructor-only\", null, { Plugin });\n\t\t\tif (Plugin.isContextPlugin !== true)\n /**\n\t\t\t* Only a plugin marked as a {@link module:core/contextplugin~ContextPlugin.isContextPlugin context plugin}\n\t\t\t* is allowed to be used with a context.\n\t\t\t*\n\t\t\t* @error context-initplugins-invalid-plugin\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"context-initplugins-invalid-plugin\", null, { Plugin });\n\t\t}\n\t\treturn this.plugins.init(plugins, [], substitutePlugins);\n\t}\n\t/**\n\t* Destroys the context instance and all editors used with the context,\n\t* releasing all resources used by the context.\n\t*\n\t* @returns A promise that resolves once the context instance is fully destroyed.\n\t*/\n\tdestroy() {\n\t\treturn Promise.all(Array.from(this.editors, (editor) => editor.destroy())).then(() => this.plugins.destroy());\n\t}\n\t/**\n\t* Adds a reference to the editor which is used with this context.\n\t*\n\t* When the given editor has created the context, the reference to this editor will be stored\n\t* as a {@link ~Context#_contextOwner}.\n\t*\n\t* This method should only be used by the editor.\n\t*\n\t* @internal\n\t* @param isContextOwner Stores the given editor as a context owner.\n\t*/\n\t_addEditor(editor, isContextOwner) {\n\t\tif (this._contextOwner)\n /**\n\t\t* Cannot add multiple editors to the context which is created by the editor.\n\t\t*\n\t\t* @error context-addeditor-private-context\n\t\t*/\n\t\tthrow new CKEditorError(\"context-addeditor-private-context\");\n\t\tthis.editors.add(editor);\n\t\tif (isContextOwner) this._contextOwner = editor;\n\t}\n\t/**\n\t* Removes a reference to the editor which was used with this context.\n\t* When the context was created by the given editor, the context will be destroyed.\n\t*\n\t* This method should only be used by the editor.\n\t*\n\t* @internal\n\t* @return A promise that resolves once the editor is removed from the context or when the context was destroyed.\n\t*/\n\t_removeEditor(editor) {\n\t\tif (this.editors.has(editor)) this.editors.remove(editor);\n\t\tif (this._contextOwner === editor) return this.destroy();\n\t\treturn Promise.resolve();\n\t}\n\t/**\n\t* Returns the context configuration which will be copied to the editors created using this context.\n\t*\n\t* The configuration returned by this method has the plugins configuration removed &ndash; plugins are shared with all editors\n\t* through another mechanism.\n\t*\n\t* This method should only be used by the editor.\n\t*\n\t* @internal\n\t* @returns Configuration as a plain object.\n\t*/\n\t_getEditorConfig() {\n\t\tconst result = {};\n\t\tfor (const name of this.config.names()) if (![\n\t\t\t\"plugins\",\n\t\t\t\"removePlugins\",\n\t\t\t\"extraPlugins\"\n\t\t].includes(name)) result[name] = this.config.get(name);\n\t\treturn result;\n\t}\n\t/**\n\t* Creates and initializes a new context instance.\n\t*\n\t* ```ts\n\t* const commonConfig = { ... }; // Configuration for all the plugins and editors.\n\t* const editorPlugins = [ ... ]; // Regular plugins here.\n\t*\n\t* Context\n\t* \t.create( {\n\t* \t\t// Only context plugins here.\n\t* \t\tplugins: [ ... ],\n\t*\n\t* \t\t// Configure the language for all the editors (it cannot be overwritten).\n\t* \t\tlanguage: { ... },\n\t*\n\t* \t\t// Configuration for context plugins.\n\t* \t\tcomments: { ... },\n\t* \t\t...\n\t*\n\t* \t\t// Default configuration for editor plugins.\n\t* \t\ttoolbar: { ... },\n\t* \t\timage: { ... },\n\t* \t\t...\n\t* \t} )\n\t* \t.then( context => {\n\t* \t\tconst promises = [];\n\t*\n\t* \t\tpromises.push( ClassicEditor.create(\n\t* \t\t\tdocument.getElementById( 'editor1' ),\n\t* \t\t\t{\n\t* \t\t\t\teditorPlugins,\n\t* \t\t\t\tcontext\n\t* \t\t\t}\n\t* \t\t) );\n\t*\n\t* \t\tpromises.push( ClassicEditor.create(\n\t* \t\t\tdocument.getElementById( 'editor2' ),\n\t* \t\t\t{\n\t* \t\t\t\teditorPlugins,\n\t* \t\t\t\tcontext,\n\t* \t\t\t\ttoolbar: { ... } // You can overwrite the configuration of the context.\n\t* \t\t\t}\n\t* \t\t) );\n\t*\n\t* \t\treturn Promise.all( promises );\n\t* \t} );\n\t* ```\n\t*\n\t* @param config The context configuration.\n\t* @returns A promise resolved once the context is ready. The promise resolves with the created context instance.\n\t*/\n\tstatic create(config) {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst context = new this(config);\n\t\t\tresolve(context.initPlugins().then(() => context));\n\t\t});\n\t}\n\t/**\n\t* `Context` class is commonly put in `config.plugins` array.\n\t*\n\t* This property helps with better error detection.\n\t*\n\t* @internal\n\t*/\n\tstatic get _throwErrorWhenUsedAsAPlugin() {\n\t\treturn 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 core/contextplugin\n*/\nconst ContextPluginBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The base class for {@link module:core/context~Context} plugin classes.\n*\n* A context plugin can either be initialized for an {@link module:core/editor/editor~Editor editor} or for\n* a {@link module:core/context~Context context}. In other words, it can either\n* work within one editor instance or with one or more editor instances that use a single context.\n* It is the context plugin's role to implement handling for both modes.\n*\n* There are a few rules for interaction between the editor plugins and context plugins:\n*\n* * A context plugin can require another context plugin.\n* * An {@link module:core/plugin~Plugin editor plugin} can require a context plugin.\n* * A context plugin MUST NOT require an {@link module:core/plugin~Plugin editor plugin}.\n*/\nvar ContextPlugin = class extends ContextPluginBase {\n\t/**\n\t* The context or editor instance.\n\t*/\n\tcontext;\n\t/**\n\t* Creates a new plugin instance.\n\t*/\n\tconstructor(context) {\n\t\tsuper();\n\t\tthis.context = context;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isContextPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn false;\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 core/editingkeystrokehandler\n*/\n/**\n* A keystroke handler for editor editing. Its instance is available\n* in {@link module:core/editor/editor~Editor#keystrokes} so plugins\n* can register their keystrokes.\n*\n* E.g. an undo plugin would do this:\n*\n* ```ts\n* editor.keystrokes.set( 'Ctrl+Z', 'undo' );\n* editor.keystrokes.set( 'Ctrl+Shift+Z', 'redo' );\n* editor.keystrokes.set( 'Ctrl+Y', 'redo' );\n* ```\n*/\nvar EditingKeystrokeHandler = class extends KeystrokeHandler {\n\t/**\n\t* The editor instance.\n\t*/\n\teditor;\n\t/**\n\t* Creates an instance of the keystroke handler.\n\t*/\n\tconstructor(editor) {\n\t\tsuper();\n\t\tthis.editor = editor;\n\t}\n\t/**\n\t* Registers a handler for the specified keystroke.\n\t*\n\t* The handler can be specified as a command name or a callback.\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 If a string is passed, then the keystroke will\n\t* {@link module:core/editor/editor~Editor#execute execute a command}.\n\t* If a function, then it will be called with the\n\t* {@link module:engine/view/observer/keyobserver~ViewDocumentKeyEventData key event data} object and\n\t* a `cancel()` helper to both `preventDefault()` and `stopPropagation()` of the event.\n\t* @param options Additional options.\n\t* @param options.priority The priority of the keystroke callback. The higher the priority value\n\t* the sooner the callback will be executed. Keystrokes having the same priority\n\t* are called in the order they were added.\n\t*/\n\tset(keystroke, callback, options = {}) {\n\t\tif (typeof callback == \"string\") {\n\t\t\tconst commandName = callback;\n\t\t\tcallback = (evtData, cancel) => {\n\t\t\t\tthis.editor.execute(commandName);\n\t\t\t\tcancel();\n\t\t\t};\n\t\t}\n\t\tsuper.set(keystroke, callback, options);\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 core/accessibility\n*/\nconst DEFAULT_CATEGORY_ID = \"contentEditing\";\n/**\n* @internal\n*/\nconst DEFAULT_GROUP_ID = \"common\";\n/**\n* A common namespace for various accessibility features of the editor.\n*\n* **Information about editor keystrokes**\n*\n* * The information about keystrokes available in the editor is stored in the {@link #keystrokeInfos} property.\n* * New info entries can be added using the {@link #addKeystrokeInfoCategory}, {@link #addKeystrokeInfoGroup},\n* and {@link #addKeystrokeInfos} methods.\n*/\nvar Accessibility = class {\n\t/**\n\t* Stores information about keystrokes brought by editor features for the users to interact with the editor, mainly\n\t* keystroke combinations and their accessible labels.\n\t*\n\t* This information is particularly useful for screen reader and other assistive technology users. It gets displayed\n\t* by the {@link module:ui/editorui/accessibilityhelp/accessibilityhelp~AccessibilityHelp Accessibility help} dialog.\n\t*\n\t* Keystrokes are organized in categories and groups. They can be added using ({@link #addKeystrokeInfoCategory},\n\t* {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}) methods.\n\t*\n\t* Please note that:\n\t* * two categories are always available:\n\t*   * `'contentEditing'` for keystrokes related to content creation,\n\t*   * `'navigation'` for keystrokes related to navigation in the UI and the content.\n\t* * unless specified otherwise, new keystrokes are added into the `'contentEditing'` category and the `'common'`\n\t* keystroke group within that category while using the {@link #addKeystrokeInfos} method.\n\t*/\n\tkeystrokeInfos = /* @__PURE__ */ new Map();\n\t/**\n\t* The editor instance.\n\t*/\n\t_editor;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tthis._editor = editor;\n\t\tconst isMenuBarVisible = editor.config.get(\"menuBar.isVisible\");\n\t\tconst t = editor.locale.t;\n\t\tthis.addKeystrokeInfoCategory({\n\t\t\tid: DEFAULT_CATEGORY_ID,\n\t\t\tlabel: t(\"Content editing keystrokes\"),\n\t\t\tdescription: t(\"These keyboard shortcuts allow for quick access to content editing features.\")\n\t\t});\n\t\tconst navigationKeystrokes = [\n\t\t\t{\n\t\t\t\tlabel: t(\"Close contextual balloons, dropdowns, and dialogs\"),\n\t\t\t\tkeystroke: \"Esc\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t(\"Open the accessibility help dialog\"),\n\t\t\t\tkeystroke: \"Alt+0\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t(\"Move focus between form fields (inputs, buttons, etc.)\"),\n\t\t\t\tkeystroke: [[\"Tab\"], [\"Shift+Tab\"]]\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t(\"Move focus to the toolbar, navigate between toolbars\"),\n\t\t\t\tkeystroke: \"Alt+F10\",\n\t\t\t\tmayRequireFn: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t(\"Navigate through the toolbar or menu bar\"),\n\t\t\t\tkeystroke: [\n\t\t\t\t\t[\"arrowup\"],\n\t\t\t\t\t[\"arrowright\"],\n\t\t\t\t\t[\"arrowdown\"],\n\t\t\t\t\t[\"arrowleft\"]\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t(\"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.\"),\n\t\t\t\tkeystroke: [[\"Enter\"], [\"Space\"]]\n\t\t\t}\n\t\t];\n\t\tif (isMenuBarVisible) navigationKeystrokes.push({\n\t\t\tlabel: t(\"Move focus to the menu bar, navigate between menu bars\"),\n\t\t\tkeystroke: \"Alt+F9\",\n\t\t\tmayRequireFn: true\n\t\t});\n\t\tthis.addKeystrokeInfoCategory({\n\t\t\tid: \"navigation\",\n\t\t\tlabel: t(\"User interface and content navigation keystrokes\"),\n\t\t\tdescription: t(\"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.\"),\n\t\t\tgroups: [{\n\t\t\t\tid: \"common\",\n\t\t\t\tkeystrokes: navigationKeystrokes\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* Adds a top-level category in the {@link #keystrokeInfos keystroke information database} with a label and optional description.\n\t*\n\t* Categories organize keystrokes and help users to find the right keystroke. Each category can have multiple groups\n\t* of keystrokes that narrow down the context in which the keystrokes are available. Every keystroke category comes\n\t* with a `'common'` group by default.\n\t*\n\t* By default, two categories are available:\n\t* * `'contentEditing'` for keystrokes related to content creation,\n\t* * `'navigation'` for keystrokes related to navigation in the UI and the content.\n\t*\n\t* To create a new keystroke category with new groups, use the following code:\n\t*\n\t* ```js\n\t* class MyPlugin extends Plugin {\n\t* \t// ...\n\t* \tinit() {\n\t* \t\tconst editor = this.editor;\n\t* \t\tconst t = editor.t;\n\t*\n\t* \t\t// ...\n\t*\n\t* \t\teditor.accessibility.addKeystrokeInfoCategory( {\n\t* \t\t\tid: 'myCategory',\n\t* \t\t\tlabel: t( 'My category' ),\n\t* \t\t\tdescription: t( 'My category description.' ),\n\t* \t\t\tgroups: [\n\t* \t\t\t\t{\n\t* \t\t\t\t\tid: 'myGroup',\n\t* \t\t\t\t\tlabel: t( 'My keystroke group' ),\n\t* \t\t\t\t\tkeystrokes: [\n\t* \t\t\t\t\t\t{\n\t* \t\t\t\t\t\t\tlabel: t( 'Keystroke label 1' ),\n\t* \t\t\t\t\t\t\tkeystroke: 'Ctrl+Shift+N'\n\t* \t\t\t\t\t\t},\n\t* \t\t\t\t\t\t{\n\t* \t\t\t\t\t\t\tlabel: t( 'Keystroke label 2' ),\n\t* \t\t\t\t\t\t\tkeystroke: 'Ctrl+Shift+M'\n\t* \t\t\t\t\t\t}\n\t* \t\t\t\t\t]\n\t* \t\t\t\t}\n\t* \t\t\t]\n\t* \t\t};\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}.\n\t*/\n\taddKeystrokeInfoCategory({ id, label, description, groups }) {\n\t\tthis.keystrokeInfos.set(id, {\n\t\t\tid,\n\t\t\tlabel,\n\t\t\tdescription,\n\t\t\tgroups: /* @__PURE__ */ new Map()\n\t\t});\n\t\tthis.addKeystrokeInfoGroup({\n\t\t\tcategoryId: id,\n\t\t\tid: DEFAULT_GROUP_ID\n\t\t});\n\t\tif (groups) groups.forEach((group) => {\n\t\t\tthis.addKeystrokeInfoGroup({\n\t\t\t\tcategoryId: id,\n\t\t\t\t...group\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Adds a group of keystrokes in a specific category to the {@link #keystrokeInfos keystroke information database}.\n\t*\n\t* Groups narrow down the context in which the keystrokes are available. When `categoryId` is not specified,\n\t* the group goes to the `'contentEditing'` category (default).\n\t*\n\t* To create a new group within an existing category, use the following code:\n\t*\n\t* ```js\n\t* class MyPlugin extends Plugin {\n\t* \t// ...\n\t* \tinit() {\n\t* \t\tconst editor = this.editor;\n\t* \t\tconst t = editor.t;\n\t*\n\t* \t\t// ...\n\t*\n\t* \t\teditor.accessibility.addKeystrokeInfoGroup( {\n\t* \t\t\tid: 'myGroup',\n\t* \t\t\tcategoryId: 'navigation',\n\t* \t\t\tlabel: t( 'My keystroke group' ),\n\t* \t\t\tkeystrokes: [\n\t* \t\t\t\t{\n\t* \t\t\t\t\tlabel: t( 'Keystroke label 1' ),\n\t* \t\t\t\t\tkeystroke: 'Ctrl+Shift+N'\n\t* \t\t\t\t},\n\t* \t\t\t\t{\n\t* \t\t\t\t\tlabel: t( 'Keystroke label 2' ),\n\t* \t\t\t\t\tkeystroke: 'Ctrl+Shift+M'\n\t* \t\t\t\t}\n\t* \t\t\t]\n\t* \t\t} );\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* See {@link #keystrokeInfos}, {@link #addKeystrokeInfoCategory}, and {@link #addKeystrokeInfos}.\n\t*/\n\taddKeystrokeInfoGroup({ categoryId = DEFAULT_CATEGORY_ID, id, label, keystrokes }) {\n\t\tconst category = this.keystrokeInfos.get(categoryId);\n\t\tif (!category) throw new CKEditorError(\"accessibility-unknown-keystroke-info-category\", this._editor, {\n\t\t\tgroupId: id,\n\t\t\tcategoryId\n\t\t});\n\t\tcategory.groups.set(id, {\n\t\t\tid,\n\t\t\tlabel,\n\t\t\tkeystrokes: keystrokes || []\n\t\t});\n\t}\n\t/**\n\t* Adds information about keystrokes to the {@link #keystrokeInfos keystroke information database}.\n\t*\n\t* Keystrokes without specified `groupId` or `categoryId` go to the `'common'` group in the `'contentEditing'` category (default).\n\t*\n\t* To add a keystroke brought by your plugin (using default group and category), use the following code:\n\t*\n\t* ```js\n\t* class MyPlugin extends Plugin {\n\t* \t// ...\n\t* \tinit() {\n\t* \t\tconst editor = this.editor;\n\t* \t\tconst t = editor.t;\n\t*\n\t* \t\t// ...\n\t*\n\t* \t\teditor.accessibility.addKeystrokeInfos( {\n\t* \t\t\tkeystrokes: [\n\t* \t\t\t\t{\n\t* \t\t\t\t\tlabel: t( 'Keystroke label' ),\n\t* \t\t\t\t\tkeystroke: 'CTRL+B'\n\t* \t\t\t\t}\n\t* \t\t\t]\n\t* \t\t} );\n\t* \t}\n\t* }\n\t* ```\n\t* To add a keystroke in a specific existing `'widget'` group in the default `'contentEditing'` category:\n\t*\n\t* ```js\n\t* class MyPlugin extends Plugin {\n\t* \t// ...\n\t* \tinit() {\n\t* \t\tconst editor = this.editor;\n\t* \t\tconst t = editor.t;\n\t*\n\t* \t\t// ...\n\t*\n\t* \t\teditor.accessibility.addKeystrokeInfos( {\n\t* \t\t\t// Add a keystroke to the existing \"widget\" group.\n\t* \t\t\tgroupId: 'widget',\n\t* \t\t\tkeystrokes: [\n\t* \t\t\t\t{\n\t* \t\t\t\t\tlabel: t( 'A an action on a selected widget' ),\n\t* \t\t\t\t\tkeystroke: 'Ctrl+D',\n\t* \t\t\t\t}\n\t* \t\t\t]\n\t* \t\t} );\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* To add a keystroke to another existing category (using default group):\n\t*\n\t* ```js\n\t* class MyPlugin extends Plugin {\n\t* \t// ...\n\t* \tinit() {\n\t* \t\tconst editor = this.editor;\n\t* \t\tconst t = editor.t;\n\t*\n\t* \t\t// ...\n\t*\n\t* \t\teditor.accessibility.addKeystrokeInfos( {\n\t* \t\t\t// Add keystrokes to the \"navigation\" category (one of defaults).\n\t* \t\t\tcategoryId: 'navigation',\n\t* \t\t\tkeystrokes: [\n\t* \t\t\t\t{\n\t* \t\t\t\t\tlabel: t( 'Keystroke label' ),\n\t* \t\t\t\t\tkeystroke: 'CTRL+B'\n\t* \t\t\t\t}\n\t* \t\t\t]\n\t* \t\t} );\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfoCategory}.\n\t*/\n\taddKeystrokeInfos({ categoryId = DEFAULT_CATEGORY_ID, groupId = DEFAULT_GROUP_ID, keystrokes }) {\n\t\tif (!this.keystrokeInfos.has(categoryId))\n /**\n\t\t* Cannot add keystrokes in an unknown category. Use\n\t\t* {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory}\n\t\t* to add a new category or make sure the specified category exists.\n\t\t*\n\t\t* @error accessibility-unknown-keystroke-info-category\n\t\t* @param {string} categoryId The id of the unknown keystroke category.\n\t\t* @param {module:core/accessibility~AddKeystrokeInfosData#keystrokes} keystrokes Keystroke definitions about to be added.\n\t\t*/\n\t\tthrow new CKEditorError(\"accessibility-unknown-keystroke-info-category\", this._editor, {\n\t\t\tcategoryId,\n\t\t\tkeystrokes\n\t\t});\n\t\tconst category = this.keystrokeInfos.get(categoryId);\n\t\tif (!category.groups.has(groupId))\n /**\n\t\t* Cannot add keystrokes to an unknown group.\n\t\t*\n\t\t* Use {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup}\n\t\t* to add a new group or make sure the specified group exists.\n\t\t*\n\t\t* @error accessibility-unknown-keystroke-info-group\n\t\t* @param {string} groupId The id of the unknown keystroke group.\n\t\t* @param {string} categoryId The id of category the unknown group should belong to.\n\t\t* @param {module:core/accessibility~AddKeystrokeInfosData#keystrokes} keystrokes Keystroke definitions about to be added.\n\t\t*/\n\t\tthrow new CKEditorError(\"accessibility-unknown-keystroke-info-group\", this._editor, {\n\t\t\tgroupId,\n\t\t\tcategoryId,\n\t\t\tkeystrokes\n\t\t});\n\t\tcategory.groups.get(groupId).keystrokes.push(...keystrokes);\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 core/editor/utils/editorusagedata\n*/\n/**\n* This part of the code is not executed in open-source implementations using a GPL key.\n* It only runs when a specific license key is provided. If you are uncertain whether\n* this applies to your installation, please contact our support team.\n*\n* @internal\n*/\nfunction getEditorUsageData(editor) {\n\treturn {\n\t\tsessionId: getSessionId(),\n\t\tpageSessionId: getPageSessionID(),\n\t\thostname: window.location.hostname,\n\t\tversion: globalThis.CKEDITOR_VERSION,\n\t\ttype: getEditorType(editor),\n\t\tplugins: getPluginsUsageData(editor.plugins),\n\t\tdistribution: getDistributionUsageData(),\n\t\tenv: getEnvUsageData(),\n\t\tintegration: Object.create(null),\n\t\tmenuBar: { isVisible: !!editor.config.get(\"menuBar.isVisible\") },\n\t\tlanguage: {\n\t\t\tui: editor.locale.uiLanguage,\n\t\t\tcontent: editor.locale.contentLanguage\n\t\t},\n\t\ttoolbar: {\n\t\t\tmain: getToolbarUsageData(editor.config.get(\"toolbar\")),\n\t\t\tblock: getToolbarUsageData(editor.config.get(\"blockToolbar\")),\n\t\t\tballoon: getToolbarUsageData(editor.config.get(\"balloonToolbar\"))\n\t\t}\n\t};\n}\nfunction getEditorType(editor) {\n\treturn Object.getPrototypeOf(editor).constructor.editorName;\n}\nfunction getPluginsUsageData(collection) {\n\treturn Array.from(collection).filter(([PluginConstructor]) => !!PluginConstructor.pluginName).map(([PluginConstructor]) => {\n\t\tconst { pluginName, isContextPlugin, isOfficialPlugin, isPremiumPlugin } = PluginConstructor;\n\t\treturn {\n\t\t\tisContext: !!isContextPlugin,\n\t\t\tisOfficial: !!isOfficialPlugin,\n\t\t\tisPremium: !!isPremiumPlugin,\n\t\t\tname: pluginName\n\t\t};\n\t});\n}\nfunction getToolbarUsageData(toolbarConfig) {\n\tif (!toolbarConfig) return;\n\tconst normalizedToolbar = Array.isArray(toolbarConfig) ? { items: toolbarConfig } : toolbarConfig;\n\tconst flattenToolbarConfigNames = extractToolbarConfigItemsNames(normalizedToolbar.items || []);\n\treturn {\n\t\tisMultiline: flattenToolbarConfigNames.includes(\"-\"),\n\t\tshouldNotGroupWhenFull: !!normalizedToolbar.shouldNotGroupWhenFull,\n\t\titems: stripToolbarSeparatorItems(flattenToolbarConfigNames)\n\t};\n\tfunction stripToolbarSeparatorItems(items) {\n\t\treturn items.filter((item) => item !== \"|\" && item !== \"-\");\n\t}\n\tfunction extractToolbarConfigItemsNames(items) {\n\t\treturn items.flatMap((item) => {\n\t\t\tif (typeof item === \"string\") return [item];\n\t\t\treturn extractToolbarConfigItemsNames(item.items);\n\t\t});\n\t}\n}\nfunction getDistributionUsageData() {\n\treturn { channel: window[Symbol.for(\"cke distribution\")] || \"sh\" };\n}\nfunction getEnvUsageData() {\n\tlet os = \"unknown\";\n\tlet browser = \"unknown\";\n\tif (env.isMac) os = \"mac\";\n\telse if (env.isWindows) os = \"windows\";\n\telse if (env.isiOS) os = \"ios\";\n\telse if (env.isAndroid) os = \"android\";\n\tif (env.isGecko) browser = \"gecko\";\n\telse if (env.isBlink) browser = \"blink\";\n\telse if (env.isSafari) browser = \"safari\";\n\treturn {\n\t\tos,\n\t\tbrowser\n\t};\n}\nfunction getSessionId() {\n\tif (!localStorage.getItem(\"__ckeditor-session-id\")) localStorage.setItem(\"__ckeditor-session-id\", uid());\n\treturn localStorage.getItem(\"__ckeditor-session-id\");\n}\nfunction getPageSessionID() {\n\tglobal.window.CKEDITOR_PAGE_SESSION_ID = global.window.CKEDITOR_PAGE_SESSION_ID || uid();\n\treturn global.window.CKEDITOR_PAGE_SESSION_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 core/editor/editor\n*/\nconst EditorBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The class representing a basic, generic editor.\n*\n* Check out the list of its subclasses to learn about specific editor implementations.\n*\n* All editor implementations (like {@link module:editor-classic/classiceditor~ClassicEditor} or\n* {@link module:editor-inline/inlineeditor~InlineEditor}) should extend this class. They can add their\n* own methods and properties.\n*\n* When you are implementing a plugin, this editor represents the API\n* which your plugin can expect to get when using its {@link module:core/plugin~Plugin#editor} property.\n*\n* This API should be sufficient in order to implement the \"editing\" part of your feature\n* (schema definition, conversion, commands, keystrokes, etc.).\n* It does not define the editor UI, which is available only if\n* the specific editor implements also the {@link ~Editor#ui} property\n* (as most editor implementations do).\n*/\nvar Editor = class extends EditorBase {\n\t/**\n\t* A required name of the editor class. The name should reflect the constructor name.\n\t*/\n\tstatic get editorName() {\n\t\treturn \"Editor\";\n\t}\n\t/**\n\t* A namespace for the accessibility features of the editor.\n\t*/\n\taccessibility;\n\t/**\n\t* Commands registered to the editor.\n\t*\n\t* Use the shorthand {@link #execute `editor.execute()`} method to execute commands:\n\t*\n\t* ```ts\n\t* // Execute the bold command:\n\t* editor.execute( 'bold' );\n\t*\n\t* // Check the state of the bold command:\n\t* editor.commands.get( 'bold' ).value;\n\t* ```\n\t*/\n\tcommands;\n\t/**\n\t* Stores all configurations specific to this editor instance.\n\t*\n\t* ```ts\n\t* editor.config.get( 'image.toolbar' );\n\t* // -> [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ]\n\t* ```\n\t*/\n\tconfig;\n\t/**\n\t* Conversion manager through which you can register model-to-view and view-to-model converters.\n\t*\n\t* See the {@link module:engine/conversion/conversion~Conversion} documentation to learn how to add converters.\n\t*/\n\tconversion;\n\t/**\n\t* The {@link module:engine/controller/datacontroller~DataController data controller}.\n\t* Used e.g. for setting and retrieving the editor data.\n\t*/\n\tdata;\n\t/**\n\t* The {@link module:engine/controller/editingcontroller~EditingController editing controller}.\n\t* Controls user input and rendering the content for editing.\n\t*/\n\tediting;\n\t/**\n\t* The locale instance.\n\t*/\n\tlocale;\n\t/**\n\t* The editor's model.\n\t*\n\t* The central point of the editor's abstract data model.\n\t*/\n\tmodel;\n\t/**\n\t* The plugins loaded and in use by this editor instance.\n\t*\n\t* ```ts\n\t* editor.plugins.get( 'ClipboardPipeline' ); // -> An instance of the clipboard pipeline plugin.\n\t* ```\n\t*/\n\tplugins;\n\t/**\n\t* An instance of the {@link module:core/editingkeystrokehandler~EditingKeystrokeHandler}.\n\t*\n\t* It allows setting simple keystrokes:\n\t*\n\t* ```ts\n\t* // Execute the bold command on Ctrl+E:\n\t* editor.keystrokes.set( 'Ctrl+E', 'bold' );\n\t*\n\t* // Execute your own callback:\n\t* editor.keystrokes.set( 'Ctrl+E', ( data, cancel ) => {\n\t* \tconsole.log( data.keyCode );\n\t*\n\t* \t// Prevent the default (native) action and stop the underlying keydown event\n\t* \t// so no other editor feature will interfere.\n\t* \tcancel();\n\t* } );\n\t* ```\n\t*\n\t* Note: Certain typing-oriented keystrokes (like <kbd>Backspace</kbd> or <kbd>Enter</kbd>) are handled\n\t* by a low-level mechanism and trying to listen to them via the keystroke handler will not work reliably.\n\t* To handle these specific keystrokes, see the events fired by the\n\t* {@link module:engine/view/document~ViewDocument editing view document} (`editor.editing.view.document`).\n\t*/\n\tkeystrokes;\n\t/**\n\t* Shorthand for {@link module:utils/locale~Locale#t}.\n\t*\n\t* @see module:utils/locale~Locale#t\n\t*/\n\tt;\n\t/**\n\t* The default configuration which is built into the editor class.\n\t*\n\t* It was used in the now deprecated CKEditor 5 builds to provide the default configuration options\n\t* which are later used during the editor initialization.\n\t*\n\t* ```ts\n\t* ClassicEditor.defaultConfig = {\n\t* \tfoo: 1,\n\t* \tbar: 2\n\t* };\n\t*\n\t* ClassicEditor\n\t* \t.create( sourceElement )\n\t* \t.then( editor => {\n\t* \t\teditor.config.get( 'foo' ); // -> 1\n\t* \t\teditor.config.get( 'bar' ); // -> 2\n\t* \t} );\n\t*\n\t* // The default options can be overridden by the configuration passed to create().\n\t* ClassicEditor\n\t* \t.create( { bar: 3 } )\n\t* \t.then( editor => {\n\t* \t\teditor.config.get( 'foo' ); // -> 1\n\t* \t\teditor.config.get( 'bar' ); // -> 3\n\t* \t} );\n\t* ```\n\t*\n\t* See also {@link module:core/editor/editor~Editor.builtinPlugins}.\n\t*/\n\tstatic defaultConfig;\n\t/**\n\t* An array of plugins built into this editor class.\n\t*\n\t* It is used in the now deprecated CKEditor 5 builds to provide a list of plugins which are later automatically initialized\n\t* during the editor initialization.\n\t*\n\t* They will be automatically initialized by the editor, unless listed in `config.removePlugins` and\n\t* unless `config.plugins` is passed.\n\t*\n\t* ```ts\n\t* // Build some plugins into the editor class first.\n\t* ClassicEditor.builtinPlugins = [ FooPlugin, BarPlugin ];\n\t*\n\t* // Normally, you need to define config.plugins, but since ClassicEditor.builtinPlugins was\n\t* // defined, now you can call create() without any configuration.\n\t* ClassicEditor\n\t* \t.create( sourceElement )\n\t* \t.then( editor => {\n\t* \t\teditor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t* \t\teditor.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t* \t} );\n\t*\n\t* ClassicEditor\n\t* \t.create( {\n\t* \t\t// Do not initialize these plugins (note: it is defined by a string):\n\t* \t\tremovePlugins: [ 'Foo' ]\n\t* \t} )\n\t* \t.then( editor => {\n\t* \t\teditor.plugins.get( FooPlugin ); // -> Undefined.\n\t* \t\teditor.config.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t* \t} );\n\t*\n\t* ClassicEditor\n\t* \t.create( {\n\t* \t\t// Load only this plugin. It can also be defined by a string if\n\t* \t\t// this plugin was built into the editor class.\n\t* \t\tplugins: [ FooPlugin ]\n\t* \t} )\n\t* \t.then( editor => {\n\t* \t\teditor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t* \t\teditor.config.get( BarPlugin ); // -> Undefined.\n\t* \t} );\n\t* ```\n\t*\n\t* See also {@link module:core/editor/editor~Editor.defaultConfig}.\n\t*/\n\tstatic builtinPlugins;\n\t/**\n\t* The editor context.\n\t* When it is not provided through the configuration, the editor creates it.\n\t*/\n\t_context;\n\t/**\n\t* A set of lock IDs for the {@link #isReadOnly} getter.\n\t*/\n\t_readOnlyLocks;\n\t/**\n\t* Holds attributes keys that were passed in\n\t* {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots.<rootName>.modelAttributes`}\n\t*  or {@link module:core/editor/editorconfig~EditorConfig#root `config.root.modelAttributes`}.\n\t*/\n\t_registeredRootsAttributesKeys = /* @__PURE__ */ new Set();\n\t/**\n\t* `Editor` class is commonly put in `config.plugins` array.\n\t*\n\t* This property helps with better error detection.\n\t*\n\t* @internal\n\t*/\n\tstatic get _throwErrorWhenUsedAsAPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Creates a new instance of the editor class.\n\t*\n\t* Usually, not to be used directly. See the static {@link module:core/editor/editor~Editor.create `create()`} method.\n\t*\n\t* @param config The editor configuration.\n\t*/\n\tconstructor(config = {}) {\n\t\tsuper();\n\t\tif (typeof config !== \"object\" || Array.isArray(config))\n /**\n\t\t* Editor configuration must be an object.\n\t\t*\n\t\t* A common cause of this error is passing an Editor class (for example\n\t\t* `ClassicEditor`) in the `config.plugins` array. In such case, the editor\n\t\t* constructor is called with an Editor or Context instance instead of\n\t\t* the configuration object.\n\t\t*\n\t\t* @error editor-config-invalid-type\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-config-invalid-type\");\n\t\tif (\"sanitizeHtml\" in config)\n /**\n\t\t* Configuration property `config.sanitizeHtml` was removed in CKEditor version 43.1.0 and is no longer supported.\n\t\t*\n\t\t* Please use `config.htmlEmbed.sanitizeHtml` and/or `config.mergeFields.sanitizeHtml` instead.\n\t\t*\n\t\t* @error editor-config-sanitizehtml-not-supported\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-config-sanitizehtml-not-supported\");\n\t\tconst constructor = this.constructor;\n\t\tconst { translations: defaultTranslations, ...defaultConfig } = constructor.defaultConfig || {};\n\t\tconst { translations = defaultTranslations, ...rest } = config;\n\t\tconst language = config.language || defaultConfig.language;\n\t\tthis._context = config.context || new Context({\n\t\t\tlanguage,\n\t\t\ttranslations\n\t\t});\n\t\tthis._context._addEditor(this, !config.context);\n\t\tconst availablePlugins = Array.from(constructor.builtinPlugins || []);\n\t\tthis.config = new Config(rest, defaultConfig);\n\t\tthis.config.define(\"plugins\", availablePlugins);\n\t\tthis.config.define(this._context._getEditorConfig());\n\t\tcheckLicenseKeyIsDefined(this.config);\n\t\tthis.plugins = new PluginCollection(this, availablePlugins, this._context.plugins);\n\t\tthis.locale = this._context.locale;\n\t\tthis.t = this.locale.t;\n\t\tthis._readOnlyLocks = /* @__PURE__ */ new Set();\n\t\tthis.commands = new CommandCollection();\n\t\tthis.set(\"state\", \"initializing\");\n\t\tthis.once(\"ready\", () => this.state = \"ready\", { priority: \"high\" });\n\t\tthis.once(\"destroy\", () => this.state = \"destroyed\", { priority: \"high\" });\n\t\tthis.model = new Model(this.config);\n\t\tthis.on(\"change:isReadOnly\", () => {\n\t\t\tthis.model.document.isReadOnly = this.isReadOnly;\n\t\t});\n\t\tconst stylesProcessor = new StylesProcessor();\n\t\tthis.data = new DataController(this.model, stylesProcessor);\n\t\tthis.editing = new EditingController(this.model, stylesProcessor);\n\t\tthis.editing.view.document.bind(\"isReadOnly\").to(this);\n\t\tthis.conversion = new Conversion([this.editing.downcastDispatcher, this.data.downcastDispatcher], this.data.upcastDispatcher);\n\t\tthis.conversion.addAlias(\"dataDowncast\", this.data.downcastDispatcher);\n\t\tthis.conversion.addAlias(\"editingDowncast\", this.editing.downcastDispatcher);\n\t\tthis.keystrokes = new EditingKeystrokeHandler(this);\n\t\tthis.keystrokes.listenTo(this.editing.view.document);\n\t\tthis.accessibility = new Accessibility(this);\n\t\tverifyLicenseKey(this);\n\t\tfunction checkLicenseKeyIsDefined(config) {\n\t\t\tlet licenseKey = config.get(\"licenseKey\");\n\t\t\tif (!licenseKey && window.CKEDITOR_GLOBAL_LICENSE_KEY) {\n\t\t\t\tlicenseKey = window.CKEDITOR_GLOBAL_LICENSE_KEY;\n\t\t\t\tconfig.set(\"licenseKey\", licenseKey);\n\t\t\t}\n\t\t\tif (!licenseKey)\n /**\n\t\t\t* The `licenseKey` property is missing in the editor configuration.\n\t\t\t*\n\t\t\t* * If you are using the editor in a commercial setup, please provide your license key.\n\t\t\t* * If you still need to acquire a key, please [contact us](https://ckeditor.com/contact/) or\n\t\t\t*   [create a free account with a 14 day premium features trial](https://portal.ckeditor.com/checkout?plan=free).\n\t\t\t* * If you are using the editor under a GPL license or another license from our Open Source Initiative,\n\t\t\t*   use the 'GPL' license key instead.\n\t\t\t*\n\t\t\t* ```js\n\t\t\t* ClassicEditor.create( {\n\t\t\t* \tattachTo: document.querySelector( '#editor' ),\n\t\t\t* \tlicenseKey: '<YOUR_LICENSE_KEY>', // Or 'GPL'.\n\t\t\t* \t// ... Other configuration options ...\n\t\t\t* } ) ;\n\t\t\t*\n\t\t\t* @error license-key-missing\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-missing\");\n\t\t}\n\t\tfunction verifyLicenseKey(editor) {\n\t\t\tconst licenseKey = editor.config.get(\"licenseKey\");\n\t\t\tconst distributionChannel = window[Symbol.for(\"cke distribution\")] || \"sh\";\n\t\t\tfunction blockEditor(reason, name) {\n\t\t\t\teditor.enableReadOnlyMode(Symbol(\"invalidLicense\"));\n\t\t\t\teditor._showLicenseError(reason, name);\n\t\t\t}\n\t\t\tfunction hasAllRequiredFields(licensePayload) {\n\t\t\t\treturn [\n\t\t\t\t\t\"exp\",\n\t\t\t\t\t\"jti\",\n\t\t\t\t\t\"vc\"\n\t\t\t\t].every((field) => field in licensePayload);\n\t\t\t}\n\t\t\tfunction getCrcInputData(licensePayload) {\n\t\t\t\treturn Object.getOwnPropertyNames(licensePayload).sort().filter((key) => key != \"vc\" && licensePayload[key] != null).map((key) => licensePayload[key]);\n\t\t\t}\n\t\t\tfunction checkLicensedHosts(licensedHosts) {\n\t\t\t\tconst { hostname } = new URL(window.location.href);\n\t\t\t\tif (licensedHosts.includes(hostname)) return true;\n\t\t\t\tconst segments = hostname.split(\".\");\n\t\t\t\treturn licensedHosts.filter((host) => host.includes(\"*\")).map((host) => host.split(\".\")).filter((host) => host.length <= segments.length).map((host) => Array(segments.length - host.length).fill(host[0] === \"*\" ? \"*\" : \"\").concat(host)).some((octets) => segments.every((segment, index) => octets[index] === segment || octets[index] === \"*\"));\n\t\t\t}\n\t\t\tfunction warnAboutNonProductionLicenseKey(licenseType) {\n\t\t\t\tconst capitalizedLicenseType = licenseType[0].toUpperCase() + licenseType.slice(1);\n\t\t\t\tconst article = licenseType === \"evaluation\" ? \"an\" : \"a\";\n\t\t\t\tconsole.info(`%cCKEditor 5 ${capitalizedLicenseType} License`, \"color: #ffffff; background: #743CCD; font-size: 14px; padding: 4px 8px; border-radius: 4px;\");\n\t\t\t\tconsole.warn(`⚠️ You are using ${article} ${licenseType} license of CKEditor 5${licenseType === \"trial\" ? \" which is for evaluation purposes only\" : \"\"}. For production usage, please obtain a production license at https://portal.ckeditor.com/`);\n\t\t\t}\n\t\t\tif (licenseKey == \"GPL\") {\n\t\t\t\tif (distributionChannel == \"cloud\") blockEditor(\"distributionChannel\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst licensePayload = decodeLicenseKey(licenseKey);\n\t\t\tif (!licensePayload) {\n\t\t\t\tblockEditor(\"invalid\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hasAllRequiredFields(licensePayload)) {\n\t\t\t\tblockEditor(\"invalid\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (licensePayload.distributionChannel && !toArray(licensePayload.distributionChannel).includes(distributionChannel)) {\n\t\t\t\tblockEditor(\"distributionChannel\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (crc32(getCrcInputData(licensePayload)) != licensePayload.vc.toLowerCase()) {\n\t\t\t\tblockEditor(\"invalid\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (/* @__PURE__ */ new Date(licensePayload.exp * 1e3) < releaseDate) {\n\t\t\t\tblockEditor(\"expired\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst licensedHosts = licensePayload.licensedHosts;\n\t\t\tif (licensedHosts && licensedHosts.length > 0 && !checkLicensedHosts(licensedHosts)) {\n\t\t\t\tblockEditor(\"domainLimit\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ([\"evaluation\", \"trial\"].includes(licensePayload.licenseType) && licensePayload.exp * 1e3 < Date.now()) {\n\t\t\t\tblockEditor(\"expired\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ([\n\t\t\t\t\"development\",\n\t\t\t\t\"evaluation\",\n\t\t\t\t\"trial\"\n\t\t\t].includes(licensePayload.licenseType)) {\n\t\t\t\tconst { licenseType } = licensePayload;\n\t\t\t\twindow.CKEDITOR_WARNING_SUPPRESSIONS = window.CKEDITOR_WARNING_SUPPRESSIONS || {};\n\t\t\t\tif (!window.CKEDITOR_WARNING_SUPPRESSIONS[licenseType]) {\n\t\t\t\t\twarnAboutNonProductionLicenseKey(licenseType);\n\t\t\t\t\twindow.CKEDITOR_WARNING_SUPPRESSIONS[licenseType] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (licensePayload.licenseType === \"evaluation\") {\n\t\t\t\tconst timerId = setTimeout(() => {\n\t\t\t\t\tblockEditor(\"evaluationLimit\");\n\t\t\t\t}, 6e5);\n\t\t\t\teditor.on(\"destroy\", () => {\n\t\t\t\t\tclearTimeout(timerId);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (licensePayload.usageEndpoint) editor.once(\"ready\", () => {\n\t\t\t\tconst request = {\n\t\t\t\t\trequestId: uid(),\n\t\t\t\t\trequestTime: Math.round(Date.now() / 1e3),\n\t\t\t\t\tlicense: licenseKey,\n\t\t\t\t\teditor: collectUsageData(editor)\n\t\t\t\t};\n\t\t\t\t/**\n\t\t\t\t* This part of the code is not executed in open-source implementations using a GPL key.\n\t\t\t\t* It only runs when a specific license key is provided. If you are uncertain whether\n\t\t\t\t* this applies to your installation, please contact our support team.\n\t\t\t\t*/\n\t\t\t\teditor._sendUsageRequest(licensePayload.usageEndpoint, request).then((response) => {\n\t\t\t\t\tconst { status, message } = response;\n\t\t\t\t\tif (message) console.warn(message);\n\t\t\t\t\tif (status != \"ok\") blockEditor(\"usageLimit\");\n\t\t\t\t}, () => {\n\t\t\t\t\t/**\n\t\t\t\t\t* Your license key cannot be validated due to a network issue.\n\t\t\t\t\t* Please ensure that your setup does not block requests to the validation endpoint.\n\t\t\t\t\t*\n\t\t\t\t\t* @error license-key-validation-endpoint-not-reachable\n\t\t\t\t\t* @param {string} url The URL that was attempted to be reached for validation.\n\t\t\t\t\t*/\n\t\t\t\t\tlogError(\"license-key-validation-endpoint-not-reachable\", { url: licensePayload.usageEndpoint });\n\t\t\t\t});\n\t\t\t}, { priority: \"high\" });\n\t\t}\n\t}\n\t/**\n\t* Defines whether the editor is in the read-only mode.\n\t*\n\t* In read-only mode the editor {@link #commands commands} are disabled so it is not possible\n\t* to modify the document by using them. Also, the editable element(s) become non-editable.\n\t*\n\t* In order to make the editor read-only, you need to call the {@link #enableReadOnlyMode} method:\n\t*\n\t* ```ts\n\t* editor.enableReadOnlyMode( 'feature-id' );\n\t* ```\n\t*\n\t* Later, to turn off the read-only mode, call {@link #disableReadOnlyMode}:\n\t*\n\t* ```ts\n\t* editor.disableReadOnlyMode( 'feature-id' );\n\t* ```\n\t*\n\t* @readonly\n\t* @observable\n\t*/\n\tget isReadOnly() {\n\t\treturn this._readOnlyLocks.size > 0;\n\t}\n\tset isReadOnly(value) {\n\t\t/**\n\t\t* The {@link module:core/editor/editor~Editor#isReadOnly Editor#isReadOnly} property is read-only since version `34.0.0`\n\t\t* and can be set only using {@link module:core/editor/editor~Editor#enableReadOnlyMode `Editor#enableReadOnlyMode( lockId )`} and\n\t\t* {@link module:core/editor/editor~Editor#disableReadOnlyMode `Editor#disableReadOnlyMode( lockId )`}.\n\t\t*\n\t\t* Usage before version `34.0.0`:\n\t\t*\n\t\t* ```ts\n\t\t* editor.isReadOnly = true;\n\t\t* editor.isReadOnly = false;\n\t\t* ```\n\t\t*\n\t\t* Usage since version `34.0.0`:\n\t\t*\n\t\t* ```ts\n\t\t* editor.enableReadOnlyMode( 'my-feature-id' );\n\t\t* editor.disableReadOnlyMode( 'my-feature-id' );\n\t\t* ```\n\t\t*\n\t\t* @error editor-isreadonly-has-no-setter\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-isreadonly-has-no-setter\");\n\t}\n\t/**\n\t* Turns on the read-only mode in the editor.\n\t*\n\t* Editor can be switched to or out of the read-only mode by many features, under various circumstances. The editor supports locking\n\t* mechanism for the read-only mode. It enables easy control over the read-only mode when many features wants to turn it on or off at\n\t* the same time, without conflicting with each other. It guarantees that you will not make the editor editable accidentally (which\n\t* could lead to errors).\n\t*\n\t* Each read-only mode request is identified by a unique id (also called \"lock\"). If multiple plugins requested to turn on the\n\t* read-only mode, then, the editor will become editable only after all these plugins turn the read-only mode off (using the same ids).\n\t*\n\t* Note, that you cannot force the editor to disable the read-only mode if other plugins set it.\n\t*\n\t* After the first `enableReadOnlyMode()` call, the {@link #isReadOnly `isReadOnly` property} will be set to `true`:\n\t*\n\t* ```ts\n\t* editor.isReadOnly; // `false`.\n\t* editor.enableReadOnlyMode( 'my-feature-id' );\n\t* editor.isReadOnly; // `true`.\n\t* ```\n\t*\n\t* You can turn off the read-only mode (\"clear the lock\") using the {@link #disableReadOnlyMode `disableReadOnlyMode()`} method:\n\t*\n\t* ```ts\n\t* editor.enableReadOnlyMode( 'my-feature-id' );\n\t* // ...\n\t* editor.disableReadOnlyMode( 'my-feature-id' );\n\t* editor.isReadOnly; // `false`.\n\t* ```\n\t*\n\t* All \"locks\" need to be removed to enable editing:\n\t*\n\t* ```ts\n\t* editor.enableReadOnlyMode( 'my-feature-id' );\n\t* editor.enableReadOnlyMode( 'my-other-feature-id' );\n\t* // ...\n\t* editor.disableReadOnlyMode( 'my-feature-id' );\n\t* editor.isReadOnly; // `true`.\n\t* editor.disableReadOnlyMode( 'my-other-feature-id' );\n\t* editor.isReadOnly; // `false`.\n\t* ```\n\t*\n\t* @param lockId A unique ID for setting the editor to the read-only state.\n\t*/\n\tenableReadOnlyMode(lockId) {\n\t\tif (typeof lockId !== \"string\" && typeof lockId !== \"symbol\")\n /**\n\t\t* The lock ID is missing or it is not a string or symbol.\n\t\t*\n\t\t* @error editor-read-only-lock-id-invalid\n\t\t* @param {never} lockId Lock ID.\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-read-only-lock-id-invalid\", null, { lockId });\n\t\tif (this._readOnlyLocks.has(lockId)) return;\n\t\tthis._readOnlyLocks.add(lockId);\n\t\tif (this._readOnlyLocks.size === 1) this.fire(\"change:isReadOnly\", \"isReadOnly\", true, false);\n\t}\n\t/**\n\t* Removes the read-only lock from the editor with given lock ID.\n\t*\n\t* When no lock is present on the editor anymore, then the {@link #isReadOnly `isReadOnly` property} will be set to `false`.\n\t*\n\t* @param lockId The lock ID for setting the editor to the read-only state.\n\t*/\n\tdisableReadOnlyMode(lockId) {\n\t\tif (typeof lockId !== \"string\" && typeof lockId !== \"symbol\") throw new CKEditorError(\"editor-read-only-lock-id-invalid\", null, { lockId });\n\t\tif (!this._readOnlyLocks.has(lockId)) return;\n\t\tthis._readOnlyLocks.delete(lockId);\n\t\tif (this._readOnlyLocks.size === 0) this.fire(\"change:isReadOnly\", \"isReadOnly\", false, true);\n\t}\n\t/**\n\t* Sets the data in the editor.\n\t*\n\t* ```ts\n\t* editor.setData( '<p>This is editor!</p>' );\n\t* ```\n\t*\n\t* If your editor implementation uses multiple roots, you should pass an object with keys corresponding\n\t* to the editor root names and values equal to the data that should be set in each root:\n\t*\n\t* ```ts\n\t* editor.setData( {\n\t*     header: '<p>Content for header part.</p>',\n\t*     content: '<p>Content for main part.</p>',\n\t*     footer: '<p>Content for footer part.</p>'\n\t* } );\n\t* ```\n\t*\n\t* By default the editor accepts HTML. This can be controlled by injecting a different data processor.\n\t* See the {@glink features/markdown Markdown output} guide for more details.\n\t*\n\t* @param data Input data.\n\t*/\n\tsetData(data) {\n\t\tthis.data.set(data);\n\t}\n\t/**\n\t* Gets the data from the editor.\n\t*\n\t* ```ts\n\t* editor.getData(); // -> '<p>This is editor!</p>'\n\t* ```\n\t*\n\t* If your editor implementation uses multiple roots, you should pass root name as one of the options:\n\t*\n\t* ```ts\n\t* editor.getData( { rootName: 'header' } ); // -> '<p>Content for header part.</p>'\n\t* ```\n\t*\n\t* By default, the editor outputs HTML. This can be controlled by injecting a different data processor.\n\t* See the {@glink features/markdown Markdown output} guide for more details.\n\t*\n\t* A warning is logged when you try to retrieve data for a detached root, as most probably this is a mistake. A detached root should\n\t* be treated like it is removed, and you should not save its data. Note, that the detached root data is always an empty string.\n\t*\n\t* @param options Additional configuration for the retrieved data.\n\t* Editor features may introduce more configuration options that can be set through this parameter.\n\t* @param options.rootName Root name. Defaults to `'main'`.\n\t* @param options.trim Whether returned data should be trimmed. This option is set to `'empty'` by default,\n\t* which means that whenever editor content is considered empty, an empty string is returned. To turn off trimming\n\t* use `'none'`. In such cases exact content will be returned (for example `'<p>&nbsp;</p>'` for an empty editor).\n\t* @returns Output data.\n\t*/\n\tgetData(options) {\n\t\treturn this.data.get(options);\n\t}\n\t/**\n\t* Loads and initializes plugins specified in the configuration.\n\t*\n\t* @returns A promise which resolves once the initialization is completed, providing an array of loaded plugins.\n\t*/\n\tasync initPlugins() {\n\t\tconst config = this.config;\n\t\tconst plugins = config.get(\"plugins\");\n\t\tconst removePlugins = config.get(\"removePlugins\") || [];\n\t\tconst extraPlugins = config.get(\"extraPlugins\") || [];\n\t\tconst substitutePlugins = config.get(\"substitutePlugins\") || [];\n\t\tconst loadedPlugins = await this.plugins.init(plugins.concat(extraPlugins), removePlugins, substitutePlugins);\n\t\tcheckPluginsAllowedByLicenseKey(this);\n\t\treturn loadedPlugins;\n\t\tfunction checkPluginsAllowedByLicenseKey(editor) {\n\t\t\tconst licenseKey = editor.config.get(\"licenseKey\");\n\t\t\tif (licenseKey === \"GPL\") return;\n\t\t\tconst decodedPayload = decodeLicenseKey(licenseKey);\n\t\t\tif (!decodedPayload) return;\n\t\t\tconst disallowedPlugin = [...editor.plugins].map(([pluginConstructor]) => pluginConstructor).find((pluginConstructor) => {\n\t\t\t\tif (!pluginConstructor.pluginName) return false;\n\t\t\t\tif (!pluginConstructor.licenseFeatureCode) return false;\n\t\t\t\treturn isFeatureBlockedByLicenseKey(decodedPayload, pluginConstructor.licenseFeatureCode);\n\t\t\t});\n\t\t\tif (disallowedPlugin) {\n\t\t\t\teditor.enableReadOnlyMode(Symbol(\"invalidLicense\"));\n\t\t\t\teditor._showLicenseError(\"pluginNotAllowed\", disallowedPlugin.pluginName);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Destroys the editor instance, releasing all resources used by it.\n\t*\n\t* **Note** The editor cannot be destroyed during the initialization phase so if it is called\n\t* while the editor {@link #state is being initialized}, it will wait for the editor initialization before destroying it.\n\t*\n\t* @fires destroy\n\t* @returns A promise that resolves once the editor instance is fully destroyed.\n\t*/\n\tasync destroy() {\n\t\tif (this.state == \"initializing\") await new Promise((resolve) => this.once(\"ready\", resolve));\n\t\tthis.fire(\"destroy\");\n\t\tthis.stopListening();\n\t\tthis.commands.destroy();\n\t\tawait this.plugins.destroy();\n\t\tthis.model.destroy();\n\t\tthis.data.destroy();\n\t\tthis.editing.destroy();\n\t\tthis.keystrokes.destroy();\n\t\tawait this._context._removeEditor(this);\n\t}\n\t/**\n\t* Executes the specified command with given parameters.\n\t*\n\t* Shorthand for:\n\t*\n\t* ```ts\n\t* editor.commands.get( commandName ).execute( ... );\n\t* ```\n\t*\n\t* @param commandName The name of the command to execute.\n\t* @param commandParams Command parameters.\n\t* @returns The value returned by the {@link module:core/commandcollection~CommandCollection#execute `commands.execute()`}.\n\t*/\n\texecute(commandName, ...commandParams) {\n\t\ttry {\n\t\t\treturn this.commands.execute(commandName, ...commandParams);\n\t\t} catch (err) {\n\t\t\t/* v8 ignore next -- @preserve */\n\t\t\tCKEditorError.rethrowUnexpectedError(err, this);\n\t\t}\n\t}\n\t/**\n\t* Focuses the editor.\n\t*\n\t* **Note** To explicitly focus the editing area of the editor, use the\n\t* {@link module:engine/view/view~EditingView#focus `editor.editing.view.focus()`} method of the editing view.\n\t*\n\t* Check out the {@glink framework/deep-dive/ui/focus-tracking#focus-in-the-editor-ui Focus in the editor UI} section\n\t* of the {@glink framework/deep-dive/ui/focus-tracking Deep dive into focus tracking} guide to learn more.\n\t*/\n\tfocus() {\n\t\tthis.editing.view.focus();\n\t}\n\t/**\n\t* Registers a given string as a root attribute key. Registered root attributes are added to\n\t* the {@link module:engine/model/schema~ModelSchema schema}.\n\t*\n\t* **Note:** Attributes passed in the configuration for multi-root editors\n\t* ({@link module:core/editor/editorconfig~EditorConfig#roots `config.roots.<rootName>.modelAttributes`}) or\n\t* single-root editors ({@link module:core/editor/editorconfig~EditorConfig#root `config.root.modelAttributes`})\n\t* are automatically registered when the editor is initialized. However, registering the same attribute twice\n\t* does not have any negative impact, so it is recommended to use this method in any feature that uses\n\t* root attributes.\n\t*\n\t* **Note:** Registered attributes are attached only to the generic `$root` schema element. A custom root\n\t* {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`} must opt into the `$root`\n\t* attribute chain via `allowAttributesOf: '$root'` to inherit these attributes.\n\t* See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t* {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t*/\n\tregisterRootAttribute(key) {\n\t\tif (this._registeredRootsAttributesKeys.has(key)) return;\n\t\tthis._registeredRootsAttributesKeys.add(key);\n\t\tthis.editing.model.schema.extend(\"$root\", { allowAttributes: key });\n\t}\n\t/**\n\t* Returns attributes for the specified root.\n\t* If no root name is provided, it returns attributes for the 'main' root by default.\n\t*\n\t* Note: all and only {@link ~Editor#registerRootAttribute registered} roots attributes will be returned.\n\t* If a registered root attribute is not set for a given root, `null` will be returned.\n\t*/\n\tgetRootAttributes(rootName = \"main\") {\n\t\tconst root = this.model.document.getRoot(rootName);\n\t\tif (!root)\n /**\n\t\t* The requested root does not exist. Please ensure that the provided root name\n\t\t* is correct and that the root has been properly initialized in the document.\n\t\t*\n\t\t* @error get-root-attributes-missing-root\n\t\t*/\n\t\tthrow new CKEditorError(\"get-root-attributes-missing-root\", this, { rootName });\n\t\tconst rootAttributes = {};\n\t\tfor (const key of this._registeredRootsAttributesKeys) rootAttributes[key] = root.hasAttribute(key) ? root.getAttribute(key) : null;\n\t\treturn rootAttributes;\n\t}\n\t/**\n\t* Creates and initializes a new editor instance.\n\t*\n\t* This is an abstract method. Every editor type needs to implement its own initialization logic.\n\t*\n\t* See the `create()` methods of the existing editor types to learn how to use them:\n\t*\n\t* * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}\n\t* * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}\n\t* * {@link module:editor-decoupled/decouplededitor~DecoupledEditor.create `DecoupledEditor.create()`}\n\t* * {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`}\n\t*/\n\tstatic create(...args) {\n\t\tthrow new Error(\"This is an abstract method.\");\n\t}\n\t/**\n\t* The {@link module:core/context~Context} class.\n\t*\n\t* Exposed as static editor field for easier access in editor builds.\n\t*/\n\tstatic Context = Context;\n\t/**\n\t* The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.\n\t*\n\t* Exposed as static editor field for easier access in editor builds.\n\t*/\n\tstatic EditorWatchdog = EditorWatchdog;\n\t/**\n\t* The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.\n\t*\n\t* Exposed as static editor field for easier access in editor builds.\n\t*/\n\tstatic ContextWatchdog = ContextWatchdog;\n\t_showLicenseError(reason, name) {\n\t\tsetTimeout(() => {\n\t\t\tif (reason == \"invalid\")\n /**\n\t\t\t* The license key provided is invalid. Please ensure that it is copied correctly\n\t\t\t* from the [Customer Portal](http://portal.ckeditor.com). If the issue persists,\n\t\t\t* please [contact our customer support](https://ckeditor.com/contact/).\n\t\t\t*\n\t\t\t* @error invalid-license-key\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"invalid-license-key\");\n\t\t\tif (reason == \"expired\")\n /**\n\t\t\t* Your license key has expired.\n\t\t\t*\n\t\t\t* If you used our free trial, you either need to switch to\n\t\t\t* [open-source license](https://ckeditor.com/docs/ckeditor5/latest/getting-started/licensing/license-and-legal.html), or\n\t\t\t* in case of a commercial plan, change the trial key to production key or development key.\n\t\t\t* Switching from trial, you also need to align the editor configuration to the features available in your plan.\n\t\t\t*\n\t\t\t* If you already had one of our Cloud or Custom plans, please renew your license in the\n\t\t\t* [Customer Portal](https://portal.ckeditor.com).\n\t\t\t*\n\t\t\t* @error license-key-expired\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-expired\");\n\t\t\tif (reason == \"domainLimit\")\n /**\n\t\t\t* The provided license does not allow the editor to run on this domain.\n\t\t\t* Some license keys are restricted to local test environments only.\n\t\t\t* For more details, please refer to the\n\t\t\t* {@glink getting-started/licensing/license-key-and-activation#license-key-types license key type documentation}.\n\t\t\t*\n\t\t\t* @error license-key-domain-limit\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-domain-limit\");\n\t\t\tif (reason == \"pluginNotAllowed\") {\n\t\t\t\tconst gluePluginName = name.replace(/(Editing|UI)$/, \"\");\n\t\t\t\tconst containsGluePlugin = this.plugins.has(gluePluginName);\n\t\t\t\t/**\n\t\t\t\t* The plugin you are trying to use is not permitted under your current license.\n\t\t\t\t* Please check the available features on the\n\t\t\t\t* [Customer Portal](https://portal.ckeditor.com) or\n\t\t\t\t* [contact support](https://ckeditor.com/contact/) for more information.\n\t\t\t\t*\n\t\t\t\t* @error license-key-plugin-not-allowed\n\t\t\t\t* @param {String} pluginName The plugin you tried to load.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\"license-key-plugin-not-allowed\", null, { pluginName: containsGluePlugin ? gluePluginName : name });\n\t\t\t}\n\t\t\tif (reason == \"featureNotAllowed\")\n /**\n\t\t\t* The feature you are trying to use is not permitted under your current license.\n\t\t\t* Please check the available features on the\n\t\t\t* [Customer Portal](https://portal.ckeditor.com) or\n\t\t\t* [contact support](https://ckeditor.com/contact/) for more information.\n\t\t\t*\n\t\t\t* @error license-key-feature-not-allowed\n\t\t\t* @param {String} featureName The feature you tried to use.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-feature-not-allowed\", null, { featureName: name });\n\t\t\tif (reason == \"evaluationLimit\")\n /**\n\t\t\t* You have exceeded the editor operation limit available for your evaluation license key.\n\t\t\t* Please restart the editor to continue using it.\n\t\t\t* {@glink getting-started/licensing/license-key-and-activation#license-key-types Read more about license key types}.\n\t\t\t*\n\t\t\t* @error license-key-evaluation-limit\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-evaluation-limit\");\n\t\t\tif (reason == \"trialLimit\")\n /**\n\t\t\t* You have exceeded the editor operation limit for your trial license key.\n\t\t\t* Please restart the editor to continue using it.\n\t\t\t* {@glink getting-started/licensing/license-key-and-activation#license-key-types Read more about license key types}.\n\t\t\t*\n\t\t\t* @error license-key-trial-limit\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-trial-limit\");\n\t\t\tif (reason == \"developmentLimit\")\n /**\n\t\t\t* You have exceeded the operation limit for your development license key within the editor.\n\t\t\t* Please restart the editor to continue using it.\n\t\t\t* {@glink getting-started/licensing/license-key-and-activation#license-key-types Read more about license key types}.\n\t\t\t*\n\t\t\t* @error license-key-development-limit\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-development-limit\");\n\t\t\tif (reason == \"usageLimit\")\n /**\n\t\t\t* You have reached the usage limit of your license key. This can occur in the following situations:\n\t\t\t*\n\t\t\t* * You are on a free subscription without a connected payment method and have exceeded the allowed usage threshold.\n\t\t\t* * Your account has overdue invoices and the grace period has ended.\n\t\t\t*\n\t\t\t* To extend the limit and restore access, please update the required details in the\n\t\t\t* [Customer Portal](https://portal.ckeditor.com) or\n\t\t\t* [contact our customer support](https://ckeditor.com/contact).\n\t\t\t*\n\t\t\t* @error license-key-usage-limit\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-usage-limit\");\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (reason == \"distributionChannel\")\n /**\n\t\t\t* Your license does not allow the current distribution channel.\n\t\t\t*\n\t\t\t* These are the available distribution channels:\n\t\t\t* * Self-hosted - the editor is installed via npm or from a ZIP package\n\t\t\t* * Cloud - the editor is run from CDN\n\t\t\t*\n\t\t\t* The licenses available include:\n\t\t\t* * GPL license for open-source users.\n\t\t\t* * Commercial plans (Cloud or sales-assisted).\n\t\t\t*\n\t\t\t* The relation between distribution channels and licenses works as follows:\n\t\t\t* * With the 'GPL' license key, you may use the editor installed via npm or a ZIP package (self-hosted).\n\t\t\t* * With the CKEditor Cloud plans, you may use the editor via our CDN.\n\t\t\t* * With the CKEditor Custom plans, depending on your plan details, you can use the editor via npm\n\t\t\t*   or a ZIP package (self-hosted) or Cloud (CDN).\n\t\t\t*\n\t\t\t* {@glink getting-started/licensing/usage-based-billing#key-terms Read more about distributions in the documentation}.\n\t\t\t* Please verify your installation or [contact support](https://ckeditor.com/contact/) for assistance.\n\t\t\t* Should you need to migrate your installation from npm to CDN, please refer to our\n\t\t\t* [dedicated migration guides](https://ckeditor.com/docs/ckeditor5/latest/updating/migrations/vanilla-js.html).\n\t\t\t*\n\t\t\t* @error license-key-invalid-distribution-channel\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"license-key-invalid-distribution-channel\");\n\t\t}, 0);\n\t\tthis._showLicenseError = () => {};\n\t}\n\t/**\n\t* This part of the code is _not_ executed in installations under the GPL license (with `config.licenseKey = 'GPL'`).\n\t*\n\t* It is only executed when a specific license key is provided. If you are uncertain whether\n\t* this applies to your installation, please contact our support team.\n\t*/\n\tasync _sendUsageRequest(endpoint, request) {\n\t\tconst headers = new Headers({ \"Content-Type\": \"application/json\" });\n\t\tconst response = await fetch(new URL(endpoint), {\n\t\t\tmethod: \"POST\",\n\t\t\theaders,\n\t\t\tbody: JSON.stringify(request)\n\t\t});\n\t\tif (!response.ok) throw new Error(`HTTP Response: ${response.status}`);\n\t\treturn response.json();\n\t}\n};\nfunction collectUsageData(editor) {\n\tconst collectedData = getEditorUsageData(editor);\n\tfunction setUsageData(path, value) {\n\t\tif (get(collectedData, path) !== void 0)\n /**\n\t\t* The error thrown when trying to set the usage data path that was already set.\n\t\t* Make sure that you are not setting the same path multiple times.\n\t\t*\n\t\t* @error editor-usage-data-path-already-set\n\t\t* @param {string} path The path that was already set.\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-usage-data-path-already-set\", { path });\n\t\tset(collectedData, path, value);\n\t}\n\teditor.fire(\"collectUsageData\", { setUsageData });\n\treturn collectedData;\n}\n/**\n* This error is thrown when trying to pass a `<textarea>` element to a `create()` function of an editor class.\n*\n* The only editor type which can be initialized on `<textarea>` elements is\n* the {@glink getting-started/setup/editor-types#classic-editor classic editor}.\n* This editor hides the passed element and inserts its own UI next to it. Other types of editors reuse the passed element as their root\n* editable element and therefore `<textarea>` is not appropriate for them. Use a `<div>` or another text container instead:\n*\n* ```html\n* <div id=\"editor\">\n* \t<p>Initial content.</p>\n* </div>\n* ```\n*\n* @error editor-wrong-element\n*/\n/**\n* You are running [CKEditor 5 Long-term Support Edition (LTS)](https://ckeditor.com/ckeditor-5-lts/),\n* but the provided license key does not include access to the LTS version, or the key is invalid.\n*\n* Please ensure that it is copied correctly from the [Customer Portal](http://portal.ckeditor.com/),\n* and if the issue persists, please [contact our customer support](https://ckeditor.com/contact/).\n*\n* In case you intended to use the [LTS Edition](https://ckeditor.com/ckeditor-5-lts/),\n* but have not yet made a purchase, please [contact our sales team](https://ckeditor.com/contact-sales/)\n*\n* If you did not intend to use LTS, please note that all releases in the v47.7 line are\n* for LTS subscribers only. To use a non-LTS edition, either upgrade to v48 or newer,\n* which is our standard [latest](https://ckeditor.com/docs/ckeditor5/latest/updating/guides/changelog.html)\n* release line, or stay on a version 47.6.2 or earlier.\n*\n* @error license-key-lts-not-allowed\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 core/editor/utils/attachtoform\n*/\n/**\n* Checks if the editor is initialized on a `<textarea>` element that belongs to a form. If yes, it updates the editor's element\n* content before submitting the form.\n*\n* This helper requires the {@link module:core/editor/utils/elementapimixin~ElementApi ElementApi interface}.\n*\n* @param editor Editor instance.\n*/\nfunction attachToForm(editor) {\n\tif (!isFunction(editor.updateSourceElement))\n /**\n\t* The editor passed to `attachToForm()` must implement the\n\t* {@link module:core/editor/utils/elementapimixin~ElementApi} interface.\n\t*\n\t* @error attachtoform-missing-elementapi-interface\n\t*/\n\tthrow new CKEditorError(\"attachtoform-missing-elementapi-interface\", editor);\n\tconst sourceElement = editor.sourceElement;\n\tif (isTextArea(sourceElement) && sourceElement.form) {\n\t\tlet originalSubmit;\n\t\tconst form = sourceElement.form;\n\t\tconst onSubmit = () => editor.updateSourceElement();\n\t\tif (isFunction(form.submit)) {\n\t\t\toriginalSubmit = form.submit;\n\t\t\tform.submit = () => {\n\t\t\t\tonSubmit();\n\t\t\t\toriginalSubmit.apply(form);\n\t\t\t};\n\t\t}\n\t\tform.addEventListener(\"submit\", onSubmit);\n\t\teditor.on(\"destroy\", () => {\n\t\t\tform.removeEventListener(\"submit\", onSubmit);\n\t\t\tif (originalSubmit) form.submit = originalSubmit;\n\t\t});\n\t}\n}\nfunction isTextArea(sourceElement) {\n\treturn !!sourceElement && sourceElement.tagName.toLowerCase() === \"textarea\";\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 core/editor/utils/elementapimixin\n*/\n/**\n* Implementation of the {@link module:core/editor/utils/elementapimixin~ElementApi}.\n*/\nfunction ElementApiMixin(base) {\n\tclass Mixin extends base {\n\t\tsourceElement;\n\t\tupdateSourceElement(data) {\n\t\t\tif (!this.sourceElement)\n /**\n\t\t\t* Cannot update the source element of a detached editor.\n\t\t\t*\n\t\t\t* The {@link module:core/editor/utils/elementapimixin~ElementApi#updateSourceElement `updateSourceElement()`}\n\t\t\t* method cannot be called if you did not pass an element to `Editor.create()`.\n\t\t\t*\n\t\t\t* @error editor-missing-sourceelement\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"editor-missing-sourceelement\", this);\n\t\t\tconst shouldUpdateSourceElement = this.config.get(\"updateSourceElementOnDestroy\");\n\t\t\tconst isSourceElementTextArea = this.sourceElement instanceof HTMLTextAreaElement;\n\t\t\tif (!shouldUpdateSourceElement && !isSourceElementTextArea) {\n\t\t\t\tsetDataInElement(this.sourceElement, \"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst dataToSet = typeof data === \"string\" ? data : this.data.get();\n\t\t\tsetDataInElement(this.sourceElement, dataToSet);\n\t\t}\n\t}\n\treturn Mixin;\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 core/editor/utils/securesourceelement\n*/\n/**\n* Marks the source element on which the editor was initialized. This prevents other editor instances from using this element.\n*\n* Running multiple editor instances on the same source element causes various issues and it is\n* crucial this helper is called as soon as the source element is known to prevent collisions.\n*\n* @param editor Editor instance.\n* @param sourceElement Element to bind with the editor instance.\n*/\nfunction secureSourceElement(editor, sourceElement) {\n\tif (sourceElement.ckeditorInstance)\n /**\n\t* A DOM element used to create the editor (e.g.\n\t* {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`})\n\t* has already been used to create another editor instance. Make sure each editor is\n\t* created with a unique DOM element.\n\t*\n\t* @error editor-source-element-already-used\n\t* @param {HTMLElement} element DOM element that caused the collision.\n\t*/\n\tthrow new CKEditorError(\"editor-source-element-already-used\", editor);\n\tsourceElement.ckeditorInstance = editor;\n\teditor.once(\"destroy\", () => {\n\t\tdelete sourceElement.ckeditorInstance;\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*/\nconst CONFIG_FIELDS_AS_ROOT_ATTRIBUTES = [[\"description\", \"$description\"], [\"title\", \"$title\"]];\n/**\n* Registers and initializes root attributes from the editor configuration:\n*\n* * the attributes from\n* {@link module:core/editor/editorconfig~RootConfig#modelAttributes `config.root(s).<rootName>.modelAttributes`}, and\n* * the {@link module:core/editor/editorconfig~RootConfig#description `description`} and\n* {@link module:core/editor/editorconfig~RootConfig#title `title`} fields, stored as the `$description` and `$title`\n* root attributes respectively.\n*\n* @internal\n*/\nfunction registerAndInitializeRootConfigAttributes(editor) {\n\tconst rootsConfig = editor.config.get(\"roots\");\n\tfor (const [rootName, rootConfig] of Object.entries(rootsConfig)) {\n\t\tlet modelAttributes = null;\n\t\tfor (const [configField, attributeKey] of CONFIG_FIELDS_AS_ROOT_ATTRIBUTES) {\n\t\t\tif (rootConfig[configField] == null || rootConfig.modelAttributes && attributeKey in rootConfig.modelAttributes) continue;\n\t\t\tmodelAttributes = modelAttributes || { ...rootConfig.modelAttributes };\n\t\t\tmodelAttributes[attributeKey] = rootConfig[configField];\n\t\t}\n\t\tif (modelAttributes) editor.config.set(`roots.${rootName}.modelAttributes`, modelAttributes);\n\t}\n\tconst normalizedRootsConfig = editor.config.get(\"roots\");\n\tlet hasRootAttributes = false;\n\tfor (const rootConfig of Object.values(normalizedRootsConfig)) for (const key of Object.keys(rootConfig.modelAttributes || {})) {\n\t\teditor.registerRootAttribute(key);\n\t\thasRootAttributes = true;\n\t}\n\tif (!hasRootAttributes) return;\n\teditor.data.once(\"init\", () => {\n\t\teditor.model.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\tfor (const [rootName, rootConfig] of Object.entries(normalizedRootsConfig)) {\n\t\t\t\tconst root = editor.model.document.getRoot(rootName);\n\t\t\t\tif (!root) continue;\n\t\t\t\tfor (const [key, value] of Object.entries(rootConfig.modelAttributes || {})) if (value !== null) writer.setAttribute(key, value, root);\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* Normalizes the editor roots configuration. It ensures that all root configurations are defined in `config.roots`\n* and that they have `initialData` defined.\n*\n* It normalizes a single-root configuration (where `config.root` is used) to a multi-root configuration\n* (where all roots are defined in `config.roots`). This is considered a standard configuration format,\n* so the editor features can always expect roots to be defined in `config.roots`.\n*\n* It also handles legacy configuration options, such as `config.initialData`, `config.placeholder`, and `config.label`.\n*\n* @internal\n*/\nfunction normalizeRootsConfig(sourceElementsOrData, config, defaultRootName = \"main\", separateAttachTo = false) {\n\tconst mainRootConfig = config.get(\"root\");\n\tconst rootsConfig = config.get(\"roots\") || Object.create(null);\n\tif (!isPlainObject(rootsConfig))\n /**\n\t* The {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots`} option\n\t* must be a plain object (an object literal or `Object.create( null )`). Objects with a\n\t* custom prototype (e.g. created via `Object.create( someProto )`) or class instances\n\t* are not accepted, because internal configuration processing relies on a known\n\t* prototype chain to detect nested configuration objects.\n\t*\n\t* Replace the value with a plain object before passing it to the editor:\n\t*\n\t* ```ts\n\t* // Wrong\n\t* MultiRootEditor.create( {\n\t*     roots: Object.assign( Object.create( {} ), { intro: { ... } } )\n\t* } );\n\t*\n\t* // Right\n\t* MultiRootEditor.create( {\n\t*     roots: { intro: { ... } }\n\t* } );\n\t* ```\n\t*\n\t* @error editor-create-roots-not-plain-object\n\t*/\n\tthrow new CKEditorError(\"editor-create-roots-not-plain-object\", null);\n\tif (mainRootConfig) {\n\t\tif (!defaultRootName)\n /**\n\t\t* The {@link module:core/editor/editorconfig~EditorConfig#root `config.root`} option is designed\n\t\t* for single-root editors and cannot be used with the\n\t\t* {@link module:editor-multi-root/multirooteditor~MultiRootEditor multi-root editor}.\n\t\t*\n\t\t* To configure a multi-root editor, define each root individually using\n\t\t* {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots`}:\n\t\t*\n\t\t* ```ts\n\t\t* MultiRootEditor.create( {\n\t\t* \troots: {\n\t\t* \t\theader: { initialData: '<p>Header</p>' },\n\t\t* \t\tcontent: { initialData: '<p>Content</p>' }\n\t\t* \t}\n\t\t* } );\n\t\t* ```\n\t\t*\n\t\t* @error editor-create-multi-root-with-main\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-create-multi-root-with-main\", null);\n\t\telse if (defaultRootName in rootsConfig)\n /**\n\t\t* Both {@link module:core/editor/editorconfig~EditorConfig#root `config.root`} and\n\t\t* `config.roots.main` are set, but they both configure the same default editing root,\n\t\t* which creates an ambiguity. Use one or the other:\n\t\t*\n\t\t* * {@link module:core/editor/editorconfig~EditorConfig#root `config.root`} for a single-root editor.\n\t\t* * {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots`} when defining\n\t\t* multiple roots.\n\t\t*\n\t\t* @error editor-create-roots-with-main\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-create-roots-with-main\", null);\n\t}\n\tif (defaultRootName && !rootsConfig[defaultRootName]) rootsConfig[defaultRootName] = mainRootConfig || Object.create(null);\n\tconst sourceElementIsPlainObject = isSourceElementsOrDataRecord(sourceElementsOrData);\n\tconst legacyInitialData = getLegacyInitialData(config, sourceElementIsPlainObject, defaultRootName);\n\tconst rootNames = Array.from(/* @__PURE__ */ new Set([\n\t\t...sourceElementIsPlainObject ? Object.keys(sourceElementsOrData) : [],\n\t\t...Object.keys(rootsConfig),\n\t\t...Object.keys(legacyInitialData)\n\t]));\n\tfor (const rootName of rootNames) {\n\t\tconst rootConfig = rootsConfig[rootName] || Object.create(null);\n\t\tconst sourceElementOrDataForRoot = sourceElementIsPlainObject ? sourceElementsOrData[rootName] : sourceElementsOrData;\n\t\tif (!separateAttachTo && isElement$1(sourceElementOrDataForRoot)) {\n\t\t\tif (rootConfig.element)\n /**\n\t\t\t* The root element is specified both as the first argument of the editor `create()` method\n\t\t\t* (e.g. {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`} or\n\t\t\t* {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`})\n\t\t\t* and in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t\t\t* (or `config.roots.<rootName>.element` for the\n\t\t\t* {@link module:editor-multi-root/multirooteditor~MultiRootEditor multi-root editor}).\n\t\t\t*\n\t\t\t* Passing the element as the first argument is deprecated. Remove it and use\n\t\t\t* {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t\t\t* (or `config.roots.<rootName>.element` for the multi-root editor) instead.\n\t\t\t*\n\t\t\t* @error editor-create-root-element-overspecified\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"editor-create-root-element-overspecified\", null);\n\t\t\trootConfig.element = sourceElementOrDataForRoot;\n\t\t}\n\t\tif (separateAttachTo && isElement$1(rootConfig.element)) {\n\t\t\t/**\n\t\t\t* The {@link module:editor-classic/classiceditor~ClassicEditor} cannot use an existing DOM element as\n\t\t\t* {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`} because the classic\n\t\t\t* editor replaces the source element with its own UI rather than editing inline within it. The passed\n\t\t\t* element is ignored along with its content, so any markup inside it will not be used as the editor's\n\t\t\t* initial data. Use {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`}\n\t\t\t* to specify the DOM element the editor should replace, or pass the initial data via\n\t\t\t* {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}.\n\t\t\t*\n\t\t\t* A tag name string (e.g. `'h1'`) or a\n\t\t\t* {@link module:core/editor/editorconfig~ViewRootElementDefinition view root element definition} are still\n\t\t\t* accepted - they describe the editable root element the classic editor creates inside its UI box.\n\t\t\t*\n\t\t\t* @error editor-create-root-element-not-supported\n\t\t\t*/\n\t\t\tlogWarning(\"editor-create-root-element-not-supported\");\n\t\t\trootConfig.element = void 0;\n\t\t}\n\t\tif (rootConfig.initialData === void 0) {\n\t\t\tif (legacyInitialData[rootName] === void 0) {\n\t\t\t\tconst rootConfigElement = isElement$1(rootConfig.element) ? rootConfig.element : void 0;\n\t\t\t\trootConfig.initialData = getInitialData(sourceElementOrDataForRoot || rootConfigElement || separateAttachTo && config.get(\"attachTo\") || \"\");\n\t\t\t} else if (sourceElementOrDataForRoot && !isElement$1(sourceElementOrDataForRoot))\n /**\n\t\t\t* The initial data is specified both as the first argument of the editor `create()` method\n\t\t\t* (e.g. {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`} or\n\t\t\t* {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`})\n\t\t\t* and in the deprecated {@link module:core/editor/editorconfig~EditorConfig#initialData `config.initialData`}.\n\t\t\t*\n\t\t\t* Passing initial data as the first argument is deprecated. Remove it and use\n\t\t\t* {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t\t* (or `config.roots.<rootName>.initialData` for the multi-root editor) instead.\n\t\t\t*\n\t\t\t* @error editor-create-initial-data-overspecified\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"editor-create-initial-data-overspecified\", null);\n\t\t\telse rootConfig.initialData = legacyInitialData[rootName];\n\t\t} else if (sourceElementOrDataForRoot && !isElement$1(sourceElementOrDataForRoot))\n /**\n\t\t* The initial data is specified both as the first argument of the editor `create()` method\n\t\t* (e.g. {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`} or\n\t\t* {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`})\n\t\t* and in {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t* (or `config.roots.<rootName>.initialData` for the multi-root editor).\n\t\t*\n\t\t* Passing initial data as the first argument is deprecated. Remove it and use\n\t\t* {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t* (or `config.roots.<rootName>.initialData` for the multi-root editor) instead.\n\t\t*\n\t\t* @error editor-create-root-initial-data-overspecified\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-create-root-initial-data-overspecified\", null);\n\t\telse if (legacyInitialData[rootName] !== void 0)\n /**\n\t\t* The initial data is specified both in\n\t\t* {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t* (or `config.roots.<rootName>.initialData` for the multi-root editor) and in the deprecated\n\t\t* {@link module:core/editor/editorconfig~EditorConfig#initialData `config.initialData`}.\n\t\t*\n\t\t* The `config.initialData` option is deprecated. Remove it and use\n\t\t* {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t* (or `config.roots.<rootName>.initialData` for the multi-root editor) instead.\n\t\t*\n\t\t* @error editor-create-legacy-initial-data-overspecified\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-create-legacy-initial-data-overspecified\", null);\n\t\trootConfig.placeholder ??= getLegacyPlainConfigValue(config, \"placeholder\", rootName);\n\t\trootConfig.label ??= getLegacyPlainConfigValue(config, \"label\", rootName);\n\t\trootConfig.modelElement ||= \"$root\";\n\t\trootConfig.element = normalizeViewRootElementDefinition(rootConfig.element);\n\t\trootsConfig[rootName] = rootConfig;\n\t}\n\tif (separateAttachTo && isElement$1(sourceElementsOrData)) {\n\t\tif (config.get(\"attachTo\"))\n /**\n\t\t* The element to attach the editor to is specified both as the first argument of\n\t\t* {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}\n\t\t* and in {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`}.\n\t\t*\n\t\t* Passing the element as the first argument is deprecated. Remove it and use\n\t\t* {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`} instead.\n\t\t*\n\t\t* @error editor-create-attachto-overspecified\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-create-attachto-overspecified\", null);\n\t\tconfig.set(\"attachTo\", sourceElementsOrData);\n\t}\n\tif (!separateAttachTo && config.get(\"attachTo\"))\n /**\n\t* The {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`} option is only\n\t* available for the {@link module:editor-classic/classiceditor~ClassicEditor} because it replaces the\n\t* given DOM element with its own UI. Other editor types (e.g. inline, balloon, decoupled) render inside\n\t* the root element directly, so `config.attachTo` is not applicable.\n\t*\n\t* Remove the `attachTo` option from the editor configuration and use\n\t* {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t* (or `config.roots.<rootName>.element` for the multi-root editor) to specify the DOM element instead.\n\t*\n\t* @error editor-create-attachto-ignored\n\t*/\n\tthrow new CKEditorError(\"editor-create-attachto-ignored\", null);\n\tconfig.set(\"roots\", rootsConfig);\n}\n/**\n* Normalizes the parameters passed to the editor constructor when a single root is used. It supports both of the following signatures:\n*\n* ```ts\n* new Editor( editorConfig: EditorConfig );\n* new Editor( sourceElementOrData: HTMLElement | string, editorConfig: EditorConfig );\n* ```\n*\n* @internal\n*/\nfunction normalizeSingleRootEditorConstructorParams(sourceElementOrDataOrConfig, editorConfig) {\n\tif (typeof sourceElementOrDataOrConfig === \"string\" || isElement$1(sourceElementOrDataOrConfig) || editorConfig && Object.keys(editorConfig).length) return {\n\t\tsourceElementOrData: sourceElementOrDataOrConfig,\n\t\teditorConfig\n\t};\n\telse return {\n\t\tsourceElementOrData: \"\",\n\t\teditorConfig: sourceElementOrDataOrConfig\n\t};\n}\n/**\n* Normalizes the parameters passed to the editor constructor when a multi root is used. It supports both of the following signatures:\n*\n* ```ts\n* new Editor( editorConfig: EditorConfig );\n* new Editor( sourceElementsOrData: Record<string, string> | Record<string, HTMLElement>, editorConfig: EditorConfig );\n* ```\n*\n* @internal\n*/\nfunction normalizeMultiRootEditorConstructorParams(sourceElementOrDataOrConfig, editorConfig) {\n\tif (editorConfig && Object.keys(editorConfig).length || Object.keys(sourceElementOrDataOrConfig).length == 0 || Object.values(sourceElementOrDataOrConfig).every((value) => typeof value === \"string\" || isElement$1(value))) return {\n\t\tsourceElementsOrData: sourceElementOrDataOrConfig,\n\t\teditorConfig\n\t};\n\telse return {\n\t\tsourceElementsOrData: {},\n\t\teditorConfig: sourceElementOrDataOrConfig\n\t};\n}\n/**\n* Type guard to check if the provided value is a plain object containing source elements or data.\n*/\nfunction isSourceElementsOrDataRecord(sourceElementsOrData) {\n\treturn !!sourceElementsOrData && typeof sourceElementsOrData == \"object\" && !Array.isArray(sourceElementsOrData) && !isElement$1(sourceElementsOrData);\n}\n/**\n* Retrieve data from source element or return the string data as is.\n*/\nfunction getInitialData(sourceElementOrData) {\n\treturn isElement$1(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;\n}\n/**\n* Retrieve legacy configuration value for `initialData` from the config.\n* Normalize single-root config so returned value is always an object with root names as keys.\n*/\nfunction getLegacyInitialData(config, sourceElementIsObject, defaultRootName) {\n\treturn sourceElementIsObject || !defaultRootName ? config.get(\"initialData\") || Object.create(null) : { [defaultRootName]: config.get(\"initialData\") };\n}\n/**\n* Retrieve legacy configuration value for `placeholder` or `label` from the config for a specific root.\n*/\nfunction getLegacyPlainConfigValue(config, key, rootName) {\n\tconst legacyValue = config.get(key);\n\tif (legacyValue) return typeof legacyValue == \"string\" ? legacyValue : legacyValue[rootName];\n}\n/**\n* Normalizes the value passed in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`} into a\n* canonical form (`HTMLElement` or {@link module:core/editor/editorconfig~ViewRootElementDefinition}) that the UI layer\n* can consume directly.\n*\n* Accepts:\n*\n* * an existing `HTMLElement` - returned as is, so the editor wraps it in place,\n* * a tag name string (e.g. `'h1'`) - turned into `{ name: 'h1' }`,\n* * a {@link module:core/editor/editorconfig~ViewRootElementDefinition} object - reshaped so `classes` becomes an\n* array and `attributes.class` is lifted into it.\n*\n* The `class` attribute may be passed either as the dedicated `classes` field (string or array of strings) or as a\n* `class` key inside `attributes`. They are concatenated. The `style` attribute may be passed either as the `styles`\n* object or as a `style` string inside `attributes`. When both are provided, the object form takes precedence and a\n* warning is logged.\n*\n* The `<textarea>` tag name is rejected as it cannot host a rich-text editable.\n*\n* Already used internally by {@link ~normalizeRootsConfig `normalizeRootsConfig()`} for `config.root.element` /\n* `config.roots.*.element`. Exported for callers that bypass the regular config-normalization pass, e.g.\n* {@link module:editor-multi-root/multirooteditor~MultiRootEditor#addRoot `MultiRootEditor.addRoot()`}\n* and {@link module:editor-multi-root/multirooteditor~MultiRootEditor#createEditable `MultiRootEditor.createEditable()`}.\n*\n* @internal\n*/\nfunction normalizeViewRootElementDefinition(spec) {\n\tif (spec == null) return;\n\tif (isElement$1(spec)) {\n\t\tassertAllowedTagName(spec.tagName);\n\t\treturn spec;\n\t}\n\tif (typeof spec === \"string\") {\n\t\tassertAllowedTagName(spec);\n\t\treturn { name: spec };\n\t}\n\tconst { name, classes, styles, attributes } = spec;\n\tif (name !== void 0) assertAllowedTagName(name);\n\tconst { class: attrClass, style: attrStyle, ...restAttributes } = attributes || {};\n\tconst hadAttrClass = !!attributes && \"class\" in attributes;\n\tconst hasStyles = !!styles && Object.keys(styles).length > 0;\n\tconst stylesOverrode = hasStyles && !!attrStyle;\n\tif (stylesOverrode)\n /**\n\t* Both the {@link module:core/editor/editorconfig~ViewRootElementDefinition#styles `styles`} object\n\t* and the {@link module:core/editor/editorconfig~ViewRootElementDefinition#attributes `attributes.style`}\n\t* string were provided in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}.\n\t* Provide one or the other - the object form takes precedence.\n\t*\n\t* @error editor-root-element-styles-overspecified\n\t*/\n\tlogWarning(\"editor-root-element-styles-overspecified\");\n\tconst normalizedClasses = [...tokenizeClasses(classes), ...tokenizeClasses(attrClass)];\n\tconst normalizedAttributes = { ...restAttributes };\n\tif (hadAttrClass) normalizedAttributes.class = \"\";\n\tif (stylesOverrode) normalizedAttributes.style = \"\";\n\telse if (attrStyle) normalizedAttributes.style = attrStyle;\n\treturn {\n\t\t...name !== void 0 && { name },\n\t\t...normalizedClasses.length && { classes: normalizedClasses },\n\t\t...hasStyles && { styles },\n\t\t...Object.keys(normalizedAttributes).length && { attributes: normalizedAttributes }\n\t};\n}\n/**\n* Splits a class value (string, array of strings, or `undefined`) into individual class tokens.\n* Whitespace-separated tokens within a single string are split into separate array entries and empty entries are dropped.\n*/\nfunction tokenizeClasses(value) {\n\tif (!value) return [];\n\treturn toArray(value).flatMap((token) => token.split(/\\s+/)).filter(Boolean);\n}\n/**\n* Throws when the given value cannot be used as an editable root tag name.\n*\n* Rejects values that are not a valid HTML tag name (non-strings, empty strings, names with whitespace,\n* angle brackets, slashes, or other invalid characters) with `editor-wrong-element-name`.\n*\n* Also rejects the `<textarea>` and `<input>` tags with `editor-wrong-element` - they are form fields\n* and cannot contain other HTML elements, so the editor cannot render rich-text content inside them.\n*\n* To fix the error, use a tag that can contain other elements - for example `'div'`, `'section'`, `'article'`,\n* or a heading like `'h1'`. You can also omit the `name` field to use the default `'div'`.\n*/\nfunction assertAllowedTagName(name) {\n\tif (typeof name !== \"string\" || !/^[A-Za-z][A-Za-z0-9_-]*$/.test(name))\n /**\n\t* The value supplied as the editable root tag name in\n\t* {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`} or\n\t* `config.roots.<rootName>.element` is not a valid HTML tag name.\n\t*\n\t* Valid HTML tag names start with a letter and contain only letters, digits, hyphens, or underscores\n\t* (e.g. `'div'`, `'h1'`, `'my-element'`; uppercase variants such as `'DIV'` and `'H1'` are also accepted).\n\t* Whitespace, angle brackets, slashes, empty strings, and non-string values are not allowed.\n\t*\n\t* @error editor-wrong-element-name\n\t*/\n\tthrow new CKEditorError(\"editor-wrong-element-name\", null, { name });\n\tif ([\"textarea\", \"input\"].includes(name.toLowerCase()))\n /**\n\t* The DOM tag name specified in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t* cannot be used as an editor's editable root. The `<textarea>` and `<input>` elements are form fields and\n\t* cannot contain other HTML elements, so the editor cannot render rich-text content inside them.\n\t*\n\t* To fix the error, use a tag that can contain other elements - for example `'div'`, `'section'`, `'article'`,\n\t* or a heading like `'h1'`. You can also omit the `name` field to use the default `'div'`.\n\t*\n\t* @error editor-wrong-element\n\t*/\n\tthrow new CKEditorError(\"editor-wrong-element\", null);\n}\n/**\n* An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n*/\nfunction isElement$1(value) {\n\treturn isElement(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 core/editor/utils/verifyrootelements\n*/\n/**\n* Verifies that all model root elements are registered in the schema as limit elements.\n*\n* @internal\n*/\nfunction verifyRootElements(editor) {\n\tconst schema = editor.model.schema;\n\tconst document = editor.model.document;\n\tfor (const root of document.roots) {\n\t\tif (root === document.graveyard || !root.isAttached()) continue;\n\t\tif (!schema.isLimit(root))\n /**\n\t\t* The model root element must be a {@link module:engine/model/schema~ModelSchemaItemDefinition#isLimit limit element}.\n\t\t* The element name specified in\n\t\t* {@link module:core/editor/editorconfig~RootConfig#modelElement `config.root.modelElement`}\n\t\t* (or `config.roots.<rootName>.modelElement`) must be registered in the schema\n\t\t* with `isLimit` set to `true`.\n\t\t*\n\t\t* @error editor-root-element-is-not-limit\n\t\t* @param rootName The name of the root that uses a non-limit element.\n\t\t* @param elementName The name of the model element used for the root.\n\t\t*/\n\t\tthrow new CKEditorError(\"editor-root-element-is-not-limit\", null, {\n\t\t\trootName: root.rootName,\n\t\t\telementName: root.name\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* Returns whether the model root with the given name accepts `$block` children according to the editor's schema.\n*\n* Call this once the plugin initialization phase is finished — typically during UI init or right after creating\n* a new editable — so the schema reflects any plugin-registered root types or additional content rules.\n*\n* @internal\n*/\nfunction rootAcceptsBlocks(editor, rootName) {\n\tconst root = editor.model.document.getRoot(rootName);\n\treturn editor.model.schema.checkChild(root, \"$block\");\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 core/pendingactions\n*/\n/**\n* The list of pending editor actions.\n*\n* This plugin should be used to synchronise plugins that execute long-lasting actions\n* (e.g. file upload) with the editor integration. It gives the developer who integrates the editor\n* an easy way to check if there are any actions pending whenever such information is needed.\n* All plugins that register a pending action also provide a message about the action that is ongoing\n* which can be displayed to the user. This lets them decide if they want to interrupt the action or wait.\n*\n* Adding and updating a pending action:\n*\n* ```ts\n* const pendingActions = editor.plugins.get( 'PendingActions' );\n* const action = pendingActions.add( 'Upload in progress: 0%.' );\n*\n* // You can update the message:\n* action.message = 'Upload in progress: 10%.';\n* ```\n*\n* Removing a pending action:\n*\n* ```ts\n* const pendingActions = editor.plugins.get( 'PendingActions' );\n* const action = pendingActions.add( 'Unsaved changes.' );\n*\n* pendingActions.remove( action );\n* ```\n*\n* Getting pending actions:\n*\n* ```ts\n* const pendingActions = editor.plugins.get( 'PendingActions' );\n*\n* const action1 = pendingActions.add( 'Action 1' );\n* const action2 = pendingActions.add( 'Action 2' );\n*\n* pendingActions.first; // Returns action1\n* Array.from( pendingActions ); // Returns [ action1, action2 ]\n* ```\n*\n* This plugin is used by features like {@link module:upload/filerepository~FileRepository} to register their ongoing actions\n* and by features like {@link module:autosave/autosave~Autosave} to detect whether there are any ongoing actions.\n* Read more about saving the data in the\n* {@glink getting-started/setup/getting-and-setting-data Saving and getting data} guide.\n*/\nvar PendingActions = class extends ContextPlugin {\n\t/**\n\t* A list of pending actions.\n\t*/\n\t_actions;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"PendingActions\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.set(\"hasAny\", false);\n\t\tthis._actions = new Collection({ idProperty: \"_id\" });\n\t\tthis._actions.delegate(\"add\", \"remove\").to(this);\n\t}\n\t/**\n\t* Adds an action to the list of pending actions.\n\t*\n\t* This method returns an action object with an observable message property.\n\t* The action object can be later used in the {@link #remove} method. It also allows you to change the message.\n\t*\n\t* @param message The action message.\n\t* @returns An observable object that represents a pending action.\n\t*/\n\tadd(message) {\n\t\tif (typeof message !== \"string\")\n /**\n\t\t* The message must be a string.\n\t\t*\n\t\t* @error pendingactions-add-invalid-message\n\t\t*/\n\t\tthrow new CKEditorError(\"pendingactions-add-invalid-message\", this);\n\t\tconst action = new (ObservableMixin())();\n\t\taction.set(\"message\", message);\n\t\tthis._actions.add(action);\n\t\tthis.hasAny = true;\n\t\treturn action;\n\t}\n\t/**\n\t* Removes an action from the list of pending actions.\n\t*\n\t* @param action An action object.\n\t*/\n\tremove(action) {\n\t\tthis._actions.remove(action);\n\t\tthis.hasAny = !!this._actions.length;\n\t}\n\t/**\n\t* Returns the first action from the list or null if the list is empty\n\t*\n\t* @returns The pending action object.\n\t*/\n\tget first() {\n\t\treturn this._actions.get(0);\n\t}\n\t/**\n\t* Iterable interface.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this._actions[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\nexport { Accessibility, Command, CommandCollection, Context, ContextPlugin, EditingKeystrokeHandler, Editor, ElementApiMixin, MultiCommand, PendingActions, Plugin, PluginCollection, DEFAULT_GROUP_ID as _DEFAULT_ACCESSIBILITY_GROUP_ID, getEditorUsageData as _getEditorUsageData, attachToForm, normalizeMultiRootEditorConstructorParams, normalizeRootsConfig, normalizeSingleRootEditorConstructorParams, normalizeViewRootElementDefinition, registerAndInitializeRootConfigAttributes, rootAcceptsBlocks, secureSourceElement, verifyRootElements };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module core/plugin\n */\n\n/* eslint-disable @typescript-eslint/no-invalid-void-type */\n\nimport { ObservableMixin, type ObservableSetEvent, type EventInfo, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport { type Editor } from './editor/editor.js';\n\nconst PluginBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * The base class for CKEditor plugin classes.\n */\nexport class Plugin extends PluginBase implements PluginInterface {\n\t/**\n\t * The editor instance.\n\t *\n\t * Note that most editors implement the {@link module:core/editor/editor~Editor#ui} property.\n\t * However, editors with an external UI (i.e. Bootstrap-based) or a headless editor may not have this property or\n\t * throw an error when accessing it.\n\t *\n\t * Because of above, to make plugins more universal, it is recommended to split features into:\n\t *  - The \"editing\" part that uses the {@link module:core/editor/editor~Editor} class without `ui` property.\n\t *  - The \"UI\" part that uses the {@link module:core/editor/editor~Editor} class and accesses `ui` property.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * Flag indicating whether a plugin is enabled or disabled.\n\t * A disabled plugin will not transform text.\n\t *\n\t * Plugin can be simply disabled like that:\n\t *\n\t * ```ts\n\t * // Disable the plugin so that no toolbars are visible.\n\t * editor.plugins.get( 'TextTransformation' ).isEnabled = false;\n\t * ```\n\t *\n\t * You can also use {@link #forceDisabled} method.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tpublic declare isEnabled: boolean;\n\n\t/**\n\t * Holds identifiers for {@link #forceDisabled} mechanism.\n\t */\n\tprivate _disableStack = new Set<string>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\n\t\tthis.editor = editor;\n\n\t\tthis.set( 'isEnabled', true );\n\t}\n\n\t/**\n\t * Disables the plugin.\n\t *\n\t * Plugin may be disabled by multiple features or algorithms (at once). When disabling a plugin, unique id should be passed\n\t * (e.g. feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the plugin.\n\t * The plugin becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t *\n\t * Disabling and enabling a plugin:\n\t *\n\t * ```ts\n\t * plugin.isEnabled; // -> true\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> false\n\t * plugin.clearForceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> true\n\t * ```\n\t *\n\t * Plugin disabled by multiple features:\n\t *\n\t * ```ts\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.forceDisabled( 'OtherFeature' );\n\t * plugin.clearForceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> false\n\t * plugin.clearForceDisabled( 'OtherFeature' );\n\t * plugin.isEnabled; // -> true\n\t * ```\n\t *\n\t * Multiple disabling with the same identifier is redundant:\n\t *\n\t * ```ts\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.clearForceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> true\n\t * ```\n\t *\n\t * **Note:** some plugins or algorithms may have more complex logic when it comes to enabling or disabling certain plugins,\n\t * so the plugin might be still disabled after {@link #clearForceDisabled} was used.\n\t *\n\t * @param id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the plugin.\n\t */\n\tpublic forceDisabled( id: string ): void {\n\t\tthis._disableStack.add( id );\n\n\t\tif ( this._disableStack.size == 1 ) {\n\t\t\tthis.on<ObservableSetEvent<boolean>>( 'set:isEnabled', forceDisable, { priority: 'highest' } );\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t *\n\t * @param id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t */\n\tpublic clearForceDisabled( id: string ): void {\n\t\tthis._disableStack.delete( id );\n\n\t\tif ( this._disableStack.size == 0 ) {\n\t\t\tthis.off( 'set:isEnabled', forceDisable );\n\t\t\tthis.isEnabled = true;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get isContextPlugin(): false {\n\t\treturn false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get isOfficialPlugin(): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get isPremiumPlugin(): boolean {\n\t\treturn false;\n\t}\n}\n\n/**\n * The base interface for CKEditor plugins.\n *\n * In its minimal form a plugin can be a simple function that accepts {@link module:core/editor/editor~Editor the editor}\n * as a parameter:\n *\n * ```ts\n * // A simple plugin that enables a data processor.\n * function MyPlugin( editor ) {\n * \teditor.data.processor = new MyDataProcessor();\n * }\n * ```\n *\n * In most cases however, you will want to inherit from the {@link ~Plugin} class which implements the\n * {@link module:utils/observablemixin~Observable} and is, therefore, more convenient:\n *\n * ```ts\n * class MyPlugin extends Plugin {\n * \tinit() {\n * \t\t// `listenTo()` and `editor` are available thanks to `Plugin`.\n * \t\t// By using `listenTo()` you will ensure that the listener is removed when\n * \t\t// the plugin is destroyed.\n * \t\tthis.listenTo( this.editor.data, 'ready', () => {\n * \t\t\t// Do something when the data is ready.\n * \t\t} );\n * \t}\n * }\n * ```\n *\n * The plugin class can have `pluginName` and `requires` static members. See {@link ~PluginStaticMembers} for more details.\n *\n * The plugin can also implement methods (e.g. {@link ~PluginInterface#init `init()`} or\n * {@link ~PluginInterface#destroy `destroy()`}) which, when present, will be used to properly\n * initialize and destroy the plugin.\n *\n * **Note:** When defined as a plain function, the plugin acts as a constructor and will be\n * called in parallel with other plugins' {@link ~PluginConstructor constructors}.\n * This means the code of that plugin will be executed **before** {@link ~PluginInterface#init `init()`} and\n * {@link ~PluginInterface#afterInit `afterInit()`} methods of other plugins and, for instance,\n * you cannot use it to extend other plugins' {@glink framework/architecture/editing-engine#schema schema}\n * rules as they are defined later on during the `init()` stage.\n */\nexport interface PluginInterface {\n\n\t/**\n\t * The second stage (after plugin constructor) of the plugin initialization.\n\t * Unlike the plugin constructor this method can be asynchronous.\n\t *\n\t * A plugin's `init()` method is called after its {@link ~PluginStaticMembers#requires dependencies} are initialized,\n\t * so in the same order as the constructors of these plugins.\n\t *\n\t * **Note:** This method is optional. A plugin instance does not need to have it defined.\n\t */\n\tinit?(): Promise<unknown> | null | undefined | void;\n\n\t/**\n\t * The third (and last) stage of the plugin initialization. See also {@link ~PluginConstructor} and {@link ~PluginInterface#init}.\n\t *\n\t * **Note:** This method is optional. A plugin instance does not need to have it defined.\n\t */\n\tafterInit?(): Promise<unknown> | null | undefined | void;\n\n\t/**\n\t * Destroys the plugin.\n\t *\n\t * **Note:** This method is optional. A plugin instance does not need to have it defined.\n\t */\n\tdestroy?(): Promise<unknown> | null | undefined | void;\n}\n\n/**\n * Creates a new plugin instance. This is the first step of the plugin initialization.\n * See also {@link ~PluginInterface#init} and {@link ~PluginInterface#afterInit}.\n *\n * The plugin static properties should conform to {@link ~PluginStaticMembers `PluginStaticMembers` interface}.\n *\n * A plugin is always instantiated after its {@link ~PluginStaticMembers#requires dependencies} and the\n * {@link ~PluginInterface#init} and {@link ~PluginInterface#afterInit} methods are called in the same order.\n *\n * Usually, you will want to put your plugin's initialization code in the {@link ~PluginInterface#init} method.\n * The constructor can be understood as \"before init\" and used in special cases, just like\n * {@link ~PluginInterface#afterInit} serves the special \"after init\" scenarios (e.g.the code which depends on other\n * plugins, but which does not {@link ~PluginStaticMembers#requires explicitly require} them).\n */\nexport type PluginConstructor<TContext = Editor> =\n\t( PluginClassConstructor<TContext> | PluginFunctionConstructor<TContext> ) & PluginStaticMembers<TContext>;\n\n/**\n * In most cases, you will want to inherit from the {@link ~Plugin} class which implements the\n * {@link module:utils/observablemixin~Observable} and is, therefore, more convenient:\n *\n * ```ts\n * class MyPlugin extends Plugin {\n * \tinit() {\n * \t\t// `listenTo()` and `editor` are available thanks to `Plugin`.\n * \t\t// By using `listenTo()` you will ensure that the listener is removed when\n * \t\t// the plugin is destroyed.\n * \t\tthis.listenTo( this.editor.data, 'ready', () => {\n * \t\t\t// Do something when the data is ready.\n * \t\t} );\n * \t}\n * }\n * ```\n */\nexport type PluginClassConstructor<TContext = Editor> = new ( editor: TContext ) => PluginInterface;\n\n/**\n * In its minimal form a plugin can be a simple function that accepts {@link module:core/editor/editor~Editor the editor}\n * as a parameter:\n *\n * ```ts\n * // A simple plugin that enables a data processor.\n * function MyPlugin( editor ) {\n * \teditor.data.processor = new MyDataProcessor();\n * }\n * ```\n */\nexport type PluginFunctionConstructor<TContext = Editor> = ( editor: TContext ) => void;\n\n/**\n * Static properties of a plugin.\n */\nexport interface PluginStaticMembers<TContext = Editor> {\n\n\t/**\n\t * An array of plugins required by this plugin.\n\t *\n\t * To keep the plugin class definition tight it is recommended to define this property as a static getter:\n\t *\n\t * ```ts\n\t * import { Image } from './image.js';\n\t *\n\t * export class ImageCaption {\n\t * \tstatic get requires(): PluginDependenciesOf<[ Image ]> {\n\t * \t\treturn [ Image ];\n\t * \t}\n\t * }\n\t * ```\n\t */\n\treadonly requires?: PluginDependencies<TContext>;\n\n\t/**\n\t * An optional name of the plugin. If set, the plugin will be available in\n\t * {@link module:core/plugincollection~PluginCollection#get} by its\n\t * name and its constructor. If not, then only by its constructor.\n\t *\n\t * The name should reflect the constructor name.\n\t *\n\t * To keep the plugin class definition tight, it is recommended to define this property as a static getter:\n\t *\n\t * ```ts\n\t * export class ImageCaption {\n\t * \tstatic get pluginName() {\n\t * \t\treturn 'ImageCaption';\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * Note: The native `Function.name` property could not be used to keep the plugin name because\n\t * it will be mangled during code minification.\n\t *\n\t * Naming a plugin is necessary to enable removing it through the\n\t * {@link module:core/editor/editorconfig~EditorConfig#removePlugins `config.removePlugins`} option.\n\t */\n\treadonly pluginName?: string;\n\n\t/**\n\t * A flag which defines if a plugin is allowed or not allowed to be used directly by a {@link module:core/context~Context}.\n\t */\n\treadonly isContextPlugin?: boolean;\n\n\t/**\n\t * A flag which defines if a plugin is an official CKEditor 5 plugin.\n\t *\n\t * @internal\n\t */\n\treadonly isOfficialPlugin?: boolean;\n\n\t/**\n\t * A flag which defines if a plugin is a premium CKEditor 5 plugin.\n\t *\n\t * @internal\n\t */\n\treadonly isPremiumPlugin?: boolean;\n\n\t/**\n\t * An unique id of a plugin which belongs to the free plan on commercial license.\n\t *\n\t * @internal\n\t */\n\treadonly licenseFeatureCode?: string;\n}\n\nexport type PluginDependencies<TContext = Editor> = ReadonlyArray<PluginConstructor<TContext> | string>;\n\n/**\n * Maps plugin instances and plugin names to plugin dependency constructors and literal plugin names.\n */\nexport type PluginDependenciesOf<\n\tTDependencies extends ReadonlyArray<PluginInterface | string>,\n\tTContext = Editor\n> = Readonly<{\n\t[ K in keyof TDependencies ]: TDependencies[ K ] extends string ?\n\t\tTDependencies[ K ] :\n\t\tPluginConstructor<TContext> & ( new ( context: TContext ) => TDependencies[ K ] )\n}>;\n\n/**\n * An array of loaded plugins.\n */\nexport type LoadedPlugins = Array<PluginInterface>;\n\n/**\n * Helper function that forces plugin to be disabled.\n */\nfunction forceDisable( evt: EventInfo<string, boolean> ) {\n\tevt.return = false;\n\tevt.stop();\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/**\n * @module core/command\n */\n\nimport {\n\tObservableMixin,\n\ttype EventInfo,\n\ttype ObservableChangeEvent,\n\ttype DecoratedMethodEvent,\n\ttype ObservableSetEvent,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type Editor } from './editor/editor.js';\n\nconst CommandBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Base class for the CKEditor commands.\n *\n * Commands are the main way to manipulate the editor contents and state. They are mostly used by UI elements (or by other\n * commands) to make changes in the model. Commands are available in every part of the code that has access to\n * the {@link module:core/editor/editor~Editor editor} instance.\n *\n * Instances of registered commands can be retrieved from {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n * The easiest way to execute a command is through {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n *\n * By default, commands are disabled when the editor is in the {@link module:core/editor/editor~Editor#isReadOnly read-only} mode\n * but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.\n */\nexport class Command extends CommandBase {\n\t/**\n\t * The editor on which this command will be used.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * The value of the command. A given command class should define what it represents for it.\n\t *\n\t * For example, the `'bold'` command's value indicates whether the selection starts in a bolded text.\n\t * And the value of the `'link'` command may be an object with link details.\n\t *\n\t * It is possible for a command to have no value (e.g. for stateless actions such as `'uploadImage'`).\n\t *\n\t * A given command class should control this value by overriding the {@link #refresh `refresh()`} method.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: unknown;\n\n\t/**\n\t * Flag indicating whether a command is enabled or disabled.\n\t * A disabled command will do nothing when executed.\n\t *\n\t * A given command class should control this value by overriding the {@link #refresh `refresh()`} method.\n\t *\n\t * It is possible to disable a command \"from outside\" using {@link #forceDisabled} method.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * A flag indicating whether a command's `isEnabled` state should be changed depending on where the document\n\t * selection is placed.\n\t *\n\t * By default, it is set to `true`. If the document selection is placed in a\n\t * {@link module:engine/model/model~Model#canEditAt non-editable} place (such as non-editable root), the command becomes disabled.\n\t *\n\t * The flag should be changed to `false` in a concrete command's constructor if the command should not change its `isEnabled`\n\t * accordingly to the document selection.\n\t */\n\tprotected _isEnabledBasedOnSelection: boolean;\n\n\t/**\n\t * A flag indicating whether a command execution changes the editor data or not.\n\t *\n\t * @see #affectsData\n\t */\n\tprivate _affectsData: boolean;\n\n\t/**\n\t * Holds identifiers for {@link #forceDisabled} mechanism.\n\t */\n\tprivate readonly _disableStack: Set<string>;\n\n\t/**\n\t * `Command` class is commonly put in `config.plugins` array.\n\t *\n\t * This property helps with better error detection.\n\t *\n\t * @internal\n\t */\n\tpublic static get _throwErrorWhenUsedAsAPlugin(): true {\n\t\treturn true;\n\t};\n\n\t/**\n\t * Creates a new `Command` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\n\t\tthis.editor = editor;\n\t\tthis.set( 'value', undefined );\n\t\tthis.set( 'isEnabled', false );\n\n\t\tthis._affectsData = true;\n\t\tthis._isEnabledBasedOnSelection = true;\n\t\tthis._disableStack = new Set();\n\n\t\tthis.decorate( 'execute' );\n\n\t\t// By default, every command is refreshed when changes are applied to the model.\n\t\tthis.listenTo( this.editor.model.document, 'change', () => {\n\t\t\tthis.refresh();\n\t\t} );\n\n\t\tthis.listenTo<ObservableChangeEvent<boolean>>( editor, 'change:isReadOnly', () => {\n\t\t\tthis.refresh();\n\t\t} );\n\n\t\t// By default, commands are disabled if the selection is in non-editable place or editor is in read-only mode.\n\t\tthis.on<ObservableSetEvent<boolean>>( 'set:isEnabled', evt => {\n\t\t\tif ( !this.affectsData ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selection = editor.model.document.selection;\n\t\t\tconst selectionInGraveyard = selection.getFirstPosition()!.root.rootName == '$graveyard';\n\t\t\tconst canEditAtSelection = !selectionInGraveyard && editor.model.canEditAt( selection );\n\n\t\t\t// Disable if editor is read only, or when selection is in a place which cannot be edited.\n\t\t\t//\n\t\t\t// Checking `editor.isReadOnly` is needed for all commands that have `_isEnabledBasedOnSelection == false`.\n\t\t\t// E.g. undo does not base on selection, but affects data and should be disabled when the editor is in read-only mode.\n\t\t\tif ( editor.isReadOnly || this._isEnabledBasedOnSelection && !canEditAtSelection ) {\n\t\t\t\tevt.return = false;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.on<CommandExecuteEvent>( 'execute', evt => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * A flag indicating whether a command execution changes the editor data or not.\n\t *\n\t * Commands with `affectsData` set to `false` will not be automatically disabled in\n\t * the {@link module:core/editor/editor~Editor#isReadOnly read-only mode} and\n\t * {@glink features/read-only#related-features other editor modes} with restricted user write permissions.\n\t *\n\t * **Note:** You do not have to set it for your every command. It is `true` by default.\n\t *\n\t * @default true\n\t */\n\tpublic get affectsData(): boolean {\n\t\treturn this._affectsData;\n\t}\n\n\tprotected set affectsData( affectsData: boolean ) {\n\t\tthis._affectsData = affectsData;\n\t}\n\n\t/**\n\t * Refreshes the command. The command should update its {@link #isEnabled} and {@link #value} properties\n\t * in this method.\n\t *\n\t * This method is automatically called when\n\t * {@link module:engine/model/document~ModelDocument#event:change any changes are applied to the document}.\n\t */\n\tpublic refresh(): void {\n\t\tthis.isEnabled = true;\n\t}\n\n\t/**\n\t * Disables the command.\n\t *\n\t * Command may be disabled by multiple features or algorithms (at once). When disabling a command, unique id should be passed\n\t * (e.g. the feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the command.\n\t * The command becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t *\n\t * Disabling and enabling a command:\n\t *\n\t * ```ts\n\t * command.isEnabled; // -> true\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> false\n\t * command.clearForceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> true\n\t * ```\n\t *\n\t * Command disabled by multiple features:\n\t *\n\t * ```ts\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.forceDisabled( 'OtherFeature' );\n\t * command.clearForceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> false\n\t * command.clearForceDisabled( 'OtherFeature' );\n\t * command.isEnabled; // -> true\n\t * ```\n\t *\n\t * Multiple disabling with the same identifier is redundant:\n\t *\n\t * ```ts\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.clearForceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> true\n\t * ```\n\t *\n\t * **Note:** some commands or algorithms may have more complex logic when it comes to enabling or disabling certain commands,\n\t * so the command might be still disabled after {@link #clearForceDisabled} was used.\n\t *\n\t * @param id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the command.\n\t */\n\tpublic forceDisabled( id: string ): void {\n\t\tthis._disableStack.add( id );\n\n\t\tif ( this._disableStack.size == 1 ) {\n\t\t\tthis.on<ObservableSetEvent<boolean>>( 'set:isEnabled', forceDisable, { priority: 'highest' } );\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t *\n\t * @param id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t */\n\tpublic clearForceDisabled( id: string ): void {\n\t\tthis._disableStack.delete( id );\n\n\t\tif ( this._disableStack.size == 0 ) {\n\t\t\tthis.off( 'set:isEnabled', forceDisable );\n\t\t\tthis.refresh();\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * A command may accept parameters. They will be passed from {@link module:core/editor/editor~Editor#execute `editor.execute()`}\n\t * to the command.\n\t *\n\t * The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).\n\t * This behavior is implemented by a high priority listener to the {@link #event:execute} event.\n\t *\n\t * In order to see how to disable a command from \"outside\" see the {@link #isEnabled} documentation.\n\t *\n\t * This method may return a value, which would be forwarded all the way down to the\n\t * {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n\t *\n\t * @fires execute\n\t */\n\tpublic execute( ...args: Array<unknown> ): unknown { return undefined; } // eslint-disable-line @typescript-eslint/no-unused-vars\n\n\t/**\n\t * Destroys the command.\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\t}\n}\n\n/**\n * Helper function that forces command to be disabled.\n */\nfunction forceDisable( evt: EventInfo<string, boolean> ) {\n\tevt.return = false;\n\tevt.stop();\n}\n\n/**\n * Event fired by the {@link module:core/command~Command#execute} method. The command action is a listener to this event so it's\n * possible to change/cancel the behavior of the command by listening to this event.\n *\n * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.\n *\n * **Note:** This event is fired even if command is disabled. However, it is automatically blocked\n * by a high priority listener in order to prevent command execution.\n *\n * @eventName ~Command#execute\n */\nexport type CommandExecuteEvent = DecoratedMethodEvent<Command, 'execute'>;\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/**\n * @module core/multicommand\n */\n\nimport { Command } from './command.js';\n\nimport {\n\tinsertToPriorityArray,\n\ttype PriorityString,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * A CKEditor command that aggregates other commands.\n *\n * This command is used to proxy multiple commands. The multi-command is enabled when\n * at least one of its registered child commands is enabled.\n * When executing a multi-command, the first enabled command with highest priority will be executed.\n *\n * ```ts\n * const multiCommand = new MultiCommand( editor );\n *\n * const commandFoo = new Command( editor );\n * const commandBar = new Command( editor );\n *\n * // Register a child command.\n * multiCommand.registerChildCommand( commandFoo );\n * // Register a child command with a low priority.\n * multiCommand.registerChildCommand( commandBar, { priority: 'low' } );\n *\n * // Enable one of the commands.\n * commandBar.isEnabled = true;\n *\n * multiCommand.execute(); // Will execute commandBar.\n * ```\n */\nexport class MultiCommand extends Command {\n\t/**\n\t * Registered child commands definitions.\n\t */\n\tprivate _childCommandsDefinitions: Array<{ command: Command; priority: PriorityString }> = [];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\t// Override base command refresh(): the command's state is changed when one of child commands changes states.\n\t}\n\n\t/**\n\t * Executes the first enabled command which has the highest priority of all registered child commands.\n\t *\n\t * @returns The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t */\n\tpublic override execute( ...args: Array<unknown> ): unknown {\n\t\tconst command = this._getFirstEnabledCommand();\n\n\t\treturn !!command && command.execute( args );\n\t}\n\n\t/**\n\t * Registers a child command.\n\t *\n\t * @param options An object with configuration options.\n\t * @param options.priority Priority of a command to register.\n\t */\n\tpublic registerChildCommand(\n\t\tcommand: Command,\n\t\toptions: { priority?: PriorityString } = {}\n\t): void {\n\t\tinsertToPriorityArray( this._childCommandsDefinitions, { command, priority: options.priority || 'normal' } );\n\n\t\t// Change multi-command enabled state when one of registered commands changes state.\n\t\tcommand.on<ObservableChangeEvent<boolean>>( 'change:isEnabled', () => this._checkEnabled() );\n\n\t\tthis._checkEnabled();\n\t}\n\n\t/**\n\t * Checks if any of child commands is enabled.\n\t */\n\tprivate _checkEnabled(): void {\n\t\tthis.isEnabled = !!this._getFirstEnabledCommand();\n\t}\n\n\t/**\n\t * Returns a first enabled command with the highest priority or `undefined` if none of them is enabled.\n\t */\n\tprivate _getFirstEnabledCommand(): Command | undefined {\n\t\tconst commandDefinition = this._childCommandsDefinitions.find( ( { command } ) => command.isEnabled );\n\n\t\treturn commandDefinition && commandDefinition.command;\n\t}\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/**\n * @module core/commandcollection\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport { type Command } from './command.js';\n\n/**\n * Collection of commands. Its instance is available in {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n */\nexport class CommandCollection implements Iterable<[ string, Command ]> {\n\t/**\n\t * Command map.\n\t */\n\tprivate _commands: Map<string, Command>;\n\n\t/**\n\t * Creates collection instance.\n\t */\n\tconstructor() {\n\t\tthis._commands = new Map();\n\t}\n\n\t/**\n\t * Registers a new command.\n\t *\n\t * @param commandName The name of the command.\n\t */\n\tpublic add<TName extends string>(\n\t\tcommandName: TName,\n\t\tcommand: CommandsMap[ TName ]\n\t): void {\n\t\tthis._commands.set( commandName, command );\n\t}\n\n\t/**\n\t * Retrieves a command from the collection.\n\t *\n\t * @param commandName The name of the command.\n\t */\n\tpublic get<TName extends string>( commandName: TName ): CommandsMap[ TName ] | undefined {\n\t\treturn this._commands.get( commandName );\n\t}\n\n\t/**\n\t * Executes a command.\n\t *\n\t * @param commandName The name of the command.\n\t * @param commandParams Command parameters.\n\t * @returns The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t */\n\tpublic execute<TName extends string>(\n\t\tcommandName: TName,\n\t\t...commandParams: Parameters<CommandsMap[ TName ][ 'execute' ]>\n\t): ReturnType<CommandsMap[ TName ][ 'execute' ]> {\n\t\tconst command = this.get( commandName );\n\n\t\tif ( !command ) {\n\t\t\t/**\n\t\t\t * Command does not exist.\n\t\t\t *\n\t\t\t * @error commandcollection-command-not-found\n\t\t\t * @param {string} commandName Name of the command.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'commandcollection-command-not-found', this, { commandName } );\n\t\t}\n\n\t\treturn command.execute( ...commandParams ) as any;\n\t}\n\n\t/**\n\t * Returns iterator of command names.\n\t */\n\tpublic* names(): IterableIterator<string> {\n\t\tyield* this._commands.keys();\n\t}\n\n\t/**\n\t * Returns iterator of command instances.\n\t */\n\tpublic* commands(): IterableIterator<Command> {\n\t\tyield* this._commands.values();\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Returns `[ commandName, commandInstance ]` pairs.\n\t */\n\tpublic [ Symbol.iterator ](): Iterator<[ string, Command ]> {\n\t\treturn this._commands[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Destroys all collection commands.\n\t */\n\tpublic destroy(): void {\n\t\tfor ( const command of this.commands() ) {\n\t\t\tcommand.destroy();\n\t\t}\n\t}\n}\n\n/**\n * Helper type that maps command names to their types.\n * It is meant to be extended with module augmentation.\n *\n * ```ts\n * class MyCommand extends Command {\n * \tpublic execute( parameter: A ): B {\n * \t\t// ...\n * \t}\n * }\n *\n * declare module '@ckeditor/ckeditor5-core' {\n * \tinterface CommandsMap {\n * \t\tmyCommand: MyCommand;\n * \t}\n * }\n *\n * // Returns `MyCommand | undefined`.\n * const myCommand = editor.commands.get( 'myCommand' );\n *\n * // Expects `A` type as parameter and returns `B`.\n * const value = editor.commands.execute( 'myCommand', new A() );\n * ```\n */\nexport interface CommandsMap {\n\t[ name: string ]: Command;\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/**\n * @module core/plugincollection\n */\n\nimport { CKEditorError, EmitterMixin, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\nimport type { LoadedPlugins, PluginClassConstructor, PluginConstructor, PluginInterface } from './plugin.js';\n\nconst PluginCollectionBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.\n */\nexport class PluginCollection<TContext extends object>\n\textends PluginCollectionBase\n\timplements Iterable<PluginEntry<TContext>> {\n\tprivate _context: TContext;\n\n\tprivate _plugins = new Map<PluginConstructor<TContext> | string, PluginInterface>();\n\n\t/**\n\t * A map of plugin constructors that can be retrieved by their names.\n\t */\n\tprivate _availablePlugins: Map<string, PluginConstructor<TContext>>;\n\n\t/**\n\t * Map of {@link module:core/contextplugin~ContextPlugin context plugins} which can be retrieved by their constructors or instances.\n\t */\n\tprivate _contextPlugins: Map<PluginConstructor<TContext> | PluginInterface, PluginConstructor<TContext> | PluginInterface>;\n\n\t/**\n\t * Creates an instance of the plugin collection class.\n\t * Allows loading and initializing plugins and their dependencies.\n\t * Allows providing a list of already loaded plugins. These plugins will not be destroyed along with this collection.\n\t *\n\t * @param availablePlugins Plugins (constructors) which the collection will be able to use\n\t * when {@link module:core/plugincollection~PluginCollection#init} is used with the plugin names (strings, instead of constructors).\n\t * Usually, the editor will pass its built-in plugins to the collection so they can later be\n\t * used in `config.plugins` or `config.removePlugins` by names.\n\t * @param contextPlugins A list of already initialized plugins represented by a `[ PluginConstructor, pluginInstance ]` pair.\n\t */\n\tconstructor(\n\t\tcontext: TContext,\n\t\tavailablePlugins: Iterable<PluginConstructor<TContext>> = [],\n\t\tcontextPlugins: Iterable<PluginEntry<TContext>> = []\n\t) {\n\t\tsuper();\n\n\t\tthis._context = context;\n\t\tthis._availablePlugins = new Map();\n\n\t\tfor ( const PluginConstructor of availablePlugins ) {\n\t\t\tif ( PluginConstructor.pluginName ) {\n\t\t\t\tthis._availablePlugins.set( PluginConstructor.pluginName, PluginConstructor );\n\t\t\t}\n\t\t}\n\n\t\tthis._contextPlugins = new Map();\n\n\t\tfor ( const [ PluginConstructor, pluginInstance ] of contextPlugins ) {\n\t\t\tthis._contextPlugins.set( PluginConstructor, pluginInstance );\n\t\t\tthis._contextPlugins.set( pluginInstance, PluginConstructor );\n\n\t\t\t// To make it possible to require a plugin by its name.\n\t\t\tif ( PluginConstructor.pluginName ) {\n\t\t\t\tthis._availablePlugins.set( PluginConstructor.pluginName, PluginConstructor );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Iterable interface.\n\t *\n\t * Returns `[ PluginConstructor, pluginInstance ]` pairs.\n\t */\n\tpublic* [ Symbol.iterator ](): IterableIterator<PluginEntry<TContext>> {\n\t\tfor ( const entry of this._plugins ) {\n\t\t\tif ( typeof entry[ 0 ] == 'function' ) {\n\t\t\t\tyield entry as any;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get<TConstructor extends PluginClassConstructor<TContext>>( key: TConstructor ): InstanceType<TConstructor>;\n\tpublic get<TName extends string>( key: TName ): PluginsMap[ TName ];\n\n\t/**\n\t * Gets the plugin instance by its constructor or name.\n\t *\n\t * ```ts\n\t * // Check if 'Clipboard' plugin was loaded.\n\t * if ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t * \t// Get clipboard plugin instance\n\t * \tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t *\n\t * \tthis.listenTo( clipboard, 'inputTransformation', ( evt, data ) => {\n\t * \t\t// Do something on clipboard input.\n\t * \t} );\n\t * }\n\t * ```\n\t *\n\t * **Note**: This method will throw an error if a plugin is not loaded. Use `{@link #has editor.plugins.has()}`\n\t * to check if a plugin is available.\n\t *\n\t * @param key The plugin constructor or {@link module:core/plugin~PluginStaticMembers#pluginName name}.\n\t */\n\tpublic get( key: PluginConstructor<TContext> | string ): PluginInterface {\n\t\tconst plugin = this._plugins.get( key );\n\n\t\tif ( !plugin ) {\n\t\t\tlet pluginName = key;\n\n\t\t\tif ( typeof key == 'function' ) {\n\t\t\t\tpluginName = key.pluginName || key.name;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * The plugin is not loaded and could not be obtained.\n\t\t\t *\n\t\t\t * Plugin classes (constructors) need to be provided to the editor and must be loaded before they can be obtained from\n\t\t\t * the plugin collection.\n\t\t\t *\n\t\t\t * **Note**: You can use `{@link module:core/plugincollection~PluginCollection#has editor.plugins.has()}`\n\t\t\t * to check if a plugin was loaded.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-not-loaded\n\t\t\t * @param {string} plugin The name of the plugin which is not loaded.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'plugincollection-plugin-not-loaded', this._context, { plugin: pluginName } );\n\t\t}\n\n\t\treturn plugin;\n\t}\n\n\t/**\n\t * Checks if a plugin is loaded.\n\t *\n\t * ```ts\n\t * // Check if the 'Clipboard' plugin was loaded.\n\t * if ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t * \t// Now use the clipboard plugin instance:\n\t * \tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t *\n\t * \t// ...\n\t * }\n\t * ```\n\t *\n\t * @param key The plugin constructor or {@link module:core/plugin~PluginStaticMembers#pluginName name}.\n\t */\n\tpublic has( key: PluginConstructor<TContext> | string ): boolean {\n\t\treturn this._plugins.has( key );\n\t}\n\n\t/**\n\t * Initializes a set of plugins and adds them to the collection.\n\t *\n\t * @param plugins An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t * or {@link module:core/plugin~PluginStaticMembers#pluginName plugin names}.\n\t * @param pluginsToRemove Names of the plugins or plugin constructors\n\t * that should not be loaded (despite being specified in the `plugins` array).\n\t * @param pluginsSubstitutions An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t * that will be used to replace plugins of the same names that were passed in `plugins` or that are in their dependency tree.\n\t * A useful option for replacing built-in plugins while creating tests (for mocking their APIs). Plugins that will be replaced\n\t * must follow these rules:\n\t *   * The new plugin must be a class.\n\t *   * The new plugin must be named.\n\t *   * Both plugins must not depend on other plugins.\n\t * @returns A promise which gets resolved once all plugins are loaded and available in the collection.\n\t */\n\tpublic async init(\n\t\tplugins: ReadonlyArray<PluginConstructor<TContext> | string>,\n\t\tpluginsToRemove: ReadonlyArray<PluginConstructor<TContext> | string> = [],\n\t\tpluginsSubstitutions: ReadonlyArray<PluginConstructor<TContext>> = []\n\t): Promise<LoadedPlugins> {\n\t\t// Plugin initialization procedure consists of 2 main steps:\n\t\t// 1) collecting all available plugin constructors,\n\t\t// 2) verification whether all required plugins can be instantiated.\n\t\t//\n\t\t// In the first step, all plugin constructors, available in the provided `plugins` array and inside\n\t\t// plugin's dependencies (from the `Plugin.requires` array), are recursively collected and added to the existing\n\t\t// `this._availablePlugins` map, but without any verification at the given moment. Performing the verification\n\t\t// at this point (during the plugin constructor searching) would cause false errors to occur, that some plugin\n\t\t// is missing but in fact it may be defined further in the array as the dependency of other plugin. After\n\t\t// traversing the entire dependency tree, it will be checked if all required \"top level\" plugins are available.\n\t\t//\n\t\t// In the second step, the list of plugins that have not been explicitly removed is traversed to get all the\n\t\t// plugin constructors to be instantiated in the correct order and to validate against some rules. Finally, if\n\t\t// no plugin is missing and no other error has been found, they all will be instantiated.\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias\n\t\tconst that = this;\n\t\tconst context = this._context;\n\n\t\tfindAvailablePluginConstructors( plugins );\n\n\t\tvalidatePlugins( plugins );\n\n\t\tconst pluginsToLoad = plugins.filter( plugin => !isPluginRemoved( plugin, pluginsToRemove ) );\n\n\t\tconst pluginConstructors = [ ...getPluginConstructors( pluginsToLoad ) ];\n\n\t\tsubstitutePlugins( pluginConstructors, pluginsSubstitutions );\n\n\t\tconst pluginInstances = loadPlugins( pluginConstructors );\n\n\t\tawait initPlugins( pluginInstances, 'init' );\n\t\tawait initPlugins( pluginInstances, 'afterInit' );\n\n\t\treturn pluginInstances;\n\n\t\tfunction isPluginConstructor( plugin: PluginConstructor<TContext> | string | null ): plugin is PluginConstructor<TContext> {\n\t\t\treturn typeof plugin === 'function';\n\t\t}\n\n\t\tfunction isContextPlugin(\n\t\t\tplugin: PluginConstructor<TContext> | string | null\n\t\t): plugin is PluginConstructor<TContext> & { isContextPlugin: true } {\n\t\t\treturn isPluginConstructor( plugin ) && !!plugin.isContextPlugin;\n\t\t}\n\n\t\tfunction isPluginRemoved(\n\t\t\tplugin: PluginConstructor<TContext> | string,\n\t\t\tpluginsToRemove: ReadonlyArray<PluginConstructor<TContext> | string>\n\t\t) {\n\t\t\treturn pluginsToRemove.some( removedPlugin => {\n\t\t\t\tif ( removedPlugin === plugin ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( getPluginName( plugin ) === removedPlugin ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( getPluginName( removedPlugin ) === plugin ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t}\n\n\t\tfunction getPluginName( plugin: PluginConstructor<TContext> | string ) {\n\t\t\treturn isPluginConstructor( plugin ) ?\n\t\t\t\tplugin.pluginName || plugin.name :\n\t\t\t\tplugin;\n\t\t}\n\n\t\tfunction findAvailablePluginConstructors(\n\t\t\tplugins: ReadonlyArray<PluginConstructor<TContext> | string>,\n\t\t\tprocessed = new Set<PluginConstructor<TContext>>()\n\t\t) {\n\t\t\tplugins.forEach( plugin => {\n\t\t\t\tif ( !isPluginConstructor( plugin ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( processed.has( plugin ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tprocessed.add( plugin );\n\n\t\t\t\tif ( plugin.pluginName && !that._availablePlugins.has( plugin.pluginName ) ) {\n\t\t\t\t\tthat._availablePlugins.set( plugin.pluginName, plugin );\n\t\t\t\t}\n\n\t\t\t\tif ( plugin.requires ) {\n\t\t\t\t\tfindAvailablePluginConstructors( plugin.requires, processed );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tfunction getPluginConstructors(\n\t\t\tplugins: ReadonlyArray<PluginConstructor<TContext> | string>,\n\t\t\tprocessed = new Set<PluginConstructor<TContext>>()\n\t\t) {\n\t\t\treturn plugins\n\t\t\t\t.map( plugin => {\n\t\t\t\t\treturn isPluginConstructor( plugin ) ?\n\t\t\t\t\t\tplugin :\n\t\t\t\t\t\tthat._availablePlugins.get( plugin )!;\n\t\t\t\t} )\n\t\t\t\t.reduce( ( result, plugin ) => {\n\t\t\t\t\tif ( processed.has( plugin ) ) {\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t\tprocessed.add( plugin );\n\n\t\t\t\t\tif ( plugin.requires ) {\n\t\t\t\t\t\tvalidatePlugins( plugin.requires, plugin );\n\n\t\t\t\t\t\tgetPluginConstructors( plugin.requires, processed ).forEach( plugin => result.add( plugin ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn result.add( plugin );\n\t\t\t\t}, new Set<PluginConstructor<TContext>>() );\n\t\t}\n\n\t\tfunction validatePlugins(\n\t\t\tplugins: ReadonlyArray<PluginConstructor<TContext> | string>,\n\t\t\tparentPluginConstructor: PluginConstructor<TContext> | null = null\n\t\t) {\n\t\t\tplugins\n\t\t\t\t.map( plugin => {\n\t\t\t\t\treturn isPluginConstructor( plugin ) ?\n\t\t\t\t\t\tplugin :\n\t\t\t\t\t\tthat._availablePlugins.get( plugin ) || plugin;\n\t\t\t\t} )\n\t\t\t\t.forEach( plugin => {\n\t\t\t\t\tcheckPluginConstructor( plugin );\n\t\t\t\t\tcheckMissingPlugin( plugin, parentPluginConstructor );\n\t\t\t\t\tcheckContextPlugin( plugin, parentPluginConstructor );\n\t\t\t\t\tcheckRemovedPlugin( plugin, parentPluginConstructor );\n\t\t\t\t} );\n\t\t}\n\n\t\tfunction checkPluginConstructor( plugin: PluginConstructor<TContext> | string ) {\n\t\t\tif ( typeof plugin !== 'function' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ( plugin as any )._throwErrorWhenUsedAsAPlugin ) {\n\t\t\t\t/**\n\t\t\t\t * The provided class constructor is not a plugin.\n\t\t\t\t *\n\t\t\t\t * This error is usually caused by passing an editor, context, or command\n\t\t\t\t * constructor in the `config.plugins` array.\n\t\t\t\t *\n\t\t\t\t * @param {String} name The name of the provided constructor.\n\t\t\t\t * @error plugincollection-plugin-invalid-constructor\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'plugincollection-plugin-invalid-constructor', context, { name: plugin.name } );\n\t\t\t}\n\t\t}\n\n\t\tfunction checkMissingPlugin(\n\t\t\tplugin: PluginConstructor<TContext> | string,\n\t\t\tparentPluginConstructor: PluginConstructor<TContext> | null\n\t\t) {\n\t\t\tif ( isPluginConstructor( plugin ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( parentPluginConstructor ) {\n\t\t\t\t/**\n\t\t\t\t * A required \"soft\" dependency was not found on the plugin list.\n\t\t\t\t *\n\t\t\t\t * When configuring the editor, either prior to building (via\n\t\t\t\t * {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}) or when\n\t\t\t\t * creating a new instance of the editor (e.g. via\n\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`}), you need to provide\n\t\t\t\t * some of the dependencies for other plugins that you used.\n\t\t\t\t *\n\t\t\t\t * This error is thrown when one of these dependencies was not provided. The name of the missing plugin\n\t\t\t\t * can be found in `missingPlugin` and the plugin that required it in `requiredBy`.\n\t\t\t\t *\n\t\t\t\t * In order to resolve it, you need to import the missing plugin and add it to the\n\t\t\t\t * current list of plugins (`Editor.builtinPlugins` or `config.plugins`/`config.extraPlugins`).\n\t\t\t\t *\n\t\t\t\t * Soft requirements were introduced in version 26.0.0. If you happen to stumble upon this error\n\t\t\t\t * when upgrading to version 26.0.0, read also the `Update to v26.x` section in the\n\t\t\t\t * {@glink updating/guides/updating-from-older-versions updating from older versions} guide.\n\t\t\t\t *\n\t\t\t\t * @error plugincollection-soft-required\n\t\t\t\t * @param {string} missingPlugin The name of the required plugin.\n\t\t\t\t * @param {string} requiredBy The name of the plugin that requires the other plugin.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'plugincollection-soft-required',\n\t\t\t\t\tcontext,\n\t\t\t\t\t{ missingPlugin: plugin, requiredBy: getPluginName( parentPluginConstructor ) }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * A plugin is not available and could not be loaded.\n\t\t\t *\n\t\t\t * Plugin classes (constructors) need to be provided to the editor before they can be loaded by name.\n\t\t\t * This is usually done in the now deprecated CKEditor 5 builds by setting\n\t\t\t * the {@link module:core/editor/editor~Editor.builtinPlugins} property.\n\t\t\t *\n\t\t\t * **If you see this warning when using one of the deprecated CKEditor 5 Builds**,\n\t\t\t * it means that you tried to enable a plugin that was not included in that build. This may be due to a typo\n\t\t\t * in the plugin name or simply because that plugin was not a part of this build.\n\t\t\t *\n\t\t\t * **Predefined builds are no longer supported and you need to\n\t\t\t * {@glink updating/nim-migration/migration-to-new-installation-methods migrate to new installation methods}**.\n\t\t\t *\n\t\t\t * **If you see this warning when using one of the editor creators directly** (not a build), then it means\n\t\t\t * that you tried loading plugins by name. However, unlike CKEditor 4, CKEditor 5 does not implement a \"plugin loader\".\n\t\t\t * This means that CKEditor 5 does not know where to load the plugin modules from. Therefore, you need to\n\t\t\t * provide each plugin through a reference (as a constructor function). Check out the examples in the\n\t\t\t * {@glink getting-started/installation/cloud/quick-start Quick start} guide.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-not-found\n\t\t\t * @param {string} plugin The name of the plugin which could not be loaded.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-plugin-not-found',\n\t\t\t\tcontext,\n\t\t\t\t{ plugin }\n\t\t\t);\n\t\t}\n\n\t\tfunction checkContextPlugin(\n\t\t\tplugin: PluginConstructor<TContext> | string,\n\t\t\tparentPluginConstructor: PluginConstructor<TContext> | null\n\t\t) {\n\t\t\tif ( !isContextPlugin( parentPluginConstructor ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isContextPlugin( plugin ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * If a plugin is a context plugin, all plugins it requires should also be context plugins\n\t\t\t * instead of plugins. In other words, if one plugin can be used in the context,\n\t\t\t * all its requirements should also be ready to be used in the context. Note that the context\n\t\t\t * provides only a part of the API provided by the editor. If one plugin needs a full\n\t\t\t * editor API, all plugins which require it are considered as plugins that need a full\n\t\t\t * editor API.\n\t\t\t *\n\t\t\t * @error plugincollection-context-required\n\t\t\t * @param {string} plugin The name of the required plugin.\n\t\t\t * @param {string} requiredBy The name of the parent plugin.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-context-required',\n\t\t\t\tcontext,\n\t\t\t\t{ plugin: getPluginName( plugin ), requiredBy: getPluginName( parentPluginConstructor ) }\n\t\t\t);\n\t\t}\n\n\t\tfunction checkRemovedPlugin(\n\t\t\tplugin: PluginConstructor<TContext> | string,\n\t\t\tparentPluginConstructor: PluginConstructor<TContext> | null\n\t\t) {\n\t\t\tif ( !parentPluginConstructor ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !isPluginRemoved( plugin, pluginsToRemove ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Cannot load a plugin because one of its dependencies is listed in the `removePlugins` option.\n\t\t\t *\n\t\t\t * @error plugincollection-required\n\t\t\t * @param {string} plugin The name of the required plugin.\n\t\t\t * @param {string} requiredBy The name of the parent plugin.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-required',\n\t\t\t\tcontext,\n\t\t\t\t{ plugin: getPluginName( plugin ), requiredBy: getPluginName( parentPluginConstructor ) }\n\t\t\t);\n\t\t}\n\n\t\tfunction loadPlugins( pluginConstructors: ReadonlyArray<PluginConstructor<TContext>> ) {\n\t\t\treturn pluginConstructors.map( PluginConstructor => {\n\t\t\t\tlet pluginInstance = that._contextPlugins.get( PluginConstructor ) as ( PluginInterface | undefined );\n\n\t\t\t\tpluginInstance = pluginInstance || new ( PluginConstructor as PluginClassConstructor<TContext> )( context );\n\n\t\t\t\tthat._add( PluginConstructor, pluginInstance );\n\n\t\t\t\treturn pluginInstance;\n\t\t\t} );\n\t\t}\n\n\t\tfunction initPlugins( pluginInstances: ReadonlyArray<PluginInterface>, method: 'init' | 'afterInit' ) {\n\t\t\treturn pluginInstances.reduce<Promise<unknown>>( ( promise, plugin ) => {\n\t\t\t\tif ( !plugin[ method ] ) {\n\t\t\t\t\treturn promise;\n\t\t\t\t}\n\n\t\t\t\tif ( that._contextPlugins.has( plugin ) ) {\n\t\t\t\t\treturn promise;\n\t\t\t\t}\n\n\t\t\t\treturn promise.then( plugin[ method ]!.bind( plugin ) );\n\t\t\t}, Promise.resolve() );\n\t\t}\n\n\t\t/**\n\t\t * Replaces plugin constructors with the specified set of plugins.\n\t\t */\n\t\tfunction substitutePlugins(\n\t\t\tpluginConstructors: Array<PluginConstructor<TContext>>,\n\t\t\tpluginsSubstitutions: ReadonlyArray<PluginConstructor<TContext>>\n\t\t) {\n\t\t\tfor ( const pluginItem of pluginsSubstitutions ) {\n\t\t\t\tif ( typeof pluginItem != 'function' ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The plugin replacing an existing plugin must be a function.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replace-plugin-invalid-type\n\t\t\t\t\t * @param {never} pluginItem The plugin item.\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-replace-plugin-invalid-type', null, { pluginItem } );\n\t\t\t\t}\n\n\t\t\t\tconst pluginName = pluginItem.pluginName;\n\n\t\t\t\tif ( !pluginName ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The plugin replacing an existing plugin must have a name.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replace-plugin-missing-name\n\t\t\t\t\t * @param {module:core/plugin~PluginConstructor} pluginItem The plugin item.\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-replace-plugin-missing-name', null, { pluginItem } );\n\t\t\t\t}\n\n\t\t\t\tif ( pluginItem.requires && pluginItem.requires.length ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The plugin replacing an existing plugin cannot depend on other plugins.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-cannot-have-dependencies\n\t\t\t\t\t * @param {string} pluginName The name of the plugin.\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-plugin-for-replacing-cannot-have-dependencies', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tconst pluginToReplace = that._availablePlugins.get( pluginName );\n\n\t\t\t\tif ( !pluginToReplace ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The replaced plugin does not exist in the\n\t\t\t\t\t * {@link module:core/plugincollection~PluginCollection available plugins} collection.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-not-exist\n\t\t\t\t\t * @param {string} pluginName The name of the plugin.\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-plugin-for-replacing-not-exist', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tconst indexInPluginConstructors = pluginConstructors.indexOf( pluginToReplace );\n\n\t\t\t\tif ( indexInPluginConstructors === -1 ) {\n\t\t\t\t\t// The Context feature can substitute plugins as well.\n\t\t\t\t\t// It may happen that the editor will be created with the given context, where the plugin for substitute\n\t\t\t\t\t// was already replaced. In such a case, we don't want to do it again.\n\t\t\t\t\tif ( that._contextPlugins.has( pluginToReplace ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * The replaced plugin will not be loaded so it cannot be replaced.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-not-loaded\n\t\t\t\t\t * @param {string} pluginName The name of the plugin.\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-plugin-for-replacing-not-loaded', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tif ( pluginToReplace.requires && pluginToReplace.requires.length ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The replaced plugin cannot depend on other plugins.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replaced-plugin-cannot-have-dependencies\n\t\t\t\t\t * @param {string} pluginName The name of the plugin.\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError( 'plugincollection-replaced-plugin-cannot-have-dependencies', null, { pluginName } );\n\t\t\t\t}\n\n\t\t\t\tpluginConstructors.splice( indexInPluginConstructors, 1, pluginItem );\n\t\t\t\tthat._availablePlugins.set( pluginName, pluginItem );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Destroys all loaded plugins.\n\t */\n\tpublic destroy(): Promise<unknown> {\n\t\tconst promises: Array<unknown> = [];\n\n\t\tfor ( const [ , pluginInstance ] of this ) {\n\t\t\tif ( typeof pluginInstance.destroy == 'function' && !this._contextPlugins.has( pluginInstance ) ) {\n\t\t\t\tpromises.push( pluginInstance.destroy() );\n\t\t\t}\n\t\t}\n\n\t\treturn Promise.all( promises );\n\t}\n\n\t/**\n\t * Adds the plugin to the collection. Exposed mainly for testing purposes.\n\t *\n\t * @param PluginConstructor The plugin constructor.\n\t * @param plugin The instance of the plugin.\n\t */\n\tprivate _add( PluginConstructor: PluginConstructor<TContext>, plugin: PluginInterface ) {\n\t\tthis._plugins.set( PluginConstructor, plugin );\n\n\t\tconst pluginName = PluginConstructor.pluginName;\n\n\t\tif ( !pluginName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._plugins.has( pluginName ) ) {\n\t\t\t/**\n\t\t\t * Two plugins with the same {@link module:core/plugin~PluginStaticMembers#pluginName} were loaded.\n\t\t\t * This will lead to runtime conflicts between these plugins.\n\t\t\t *\n\t\t\t * In practice, this warning usually means that new plugins were added to an existing CKEditor 5 build.\n\t\t\t * Plugins should always be added to a source version of the editor (`@ckeditor/ckeditor5-editor-*`),\n\t\t\t * not to an editor imported from one of the `@ckeditor/ckeditor5-build-*` packages.\n\t\t\t *\n\t\t\t * Check your import paths and the list of plugins passed to\n\t\t\t * {@link module:core/editor/editor~Editor.create `Editor.create()`}\n\t\t\t * or specified in {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n\t\t\t *\n\t\t\t * Predefined builds are a deprecated solution and we strongly advise\n\t\t\t * {@glink updating/nim-migration/migration-to-new-installation-methods migrating to new installation methods}.\n\t\t\t *\n\t\t\t * The second option is that your `node_modules/` directory contains duplicated versions of the same\n\t\t\t * CKEditor 5 packages. Normally, on clean installations, npm deduplicates packages in `node_modules/`, so\n\t\t\t * it may be enough to call `rm -rf node_modules && npm i`. However, if you installed conflicting versions\n\t\t\t * of some packages, their dependencies may need to be installed in more than one version which may lead to this\n\t\t\t * warning.\n\t\t\t *\n\t\t\t * Technically speaking, this error occurs because after adding a plugin to an existing editor build\n\t\t\t * the dependencies of this plugin are being duplicated.\n\t\t\t * They are already built into that editor build and now get added for the second time as dependencies\n\t\t\t * of the plugin you are installing.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-name-conflict\n\t\t\t * @param {string} pluginName The duplicated plugin name.\n\t\t\t * @param {module:core/plugin~PluginConstructor} plugin1 The first plugin constructor.\n\t\t\t * @param {module:core/plugin~PluginConstructor} plugin2 The second plugin constructor.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'plugincollection-plugin-name-conflict',\n\t\t\t\tnull,\n\t\t\t\t{ pluginName, plugin1: this._plugins.get( pluginName )!.constructor, plugin2: PluginConstructor }\n\t\t\t);\n\t\t}\n\n\t\tthis._plugins.set( pluginName, plugin );\n\t}\n}\n\n/**\n * A `[ PluginConstructor, pluginInstance ]` pair.\n */\nexport type PluginEntry<TContext> = [ PluginConstructor<TContext>, PluginInterface ];\n\n/**\n * Helper type that maps plugin names to their types.\n * It is meant to be extended with module augmentation.\n *\n * ```ts\n * class MyPlugin extends Plugin {\n * \tpublic static pluginName() {\n * \t\treturn 'MyPlugin' as const;\n * \t}\n * }\n *\n * declare module '@ckeditor/ckeditor5-core' {\n * \tinterface PluginsMap {\n * \t\t[ MyPlugin.pluginName ]: MyPlugin;\n * \t}\n * }\n *\n * // Returns `MyPlugin`.\n * const myPlugin = editor.plugins.get( 'MyPlugin' );\n * ```\n */\nexport interface PluginsMap {\n\t[ name: string ]: PluginInterface;\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/**\n * @module core/context\n */\n\nimport {\n\tConfig,\n\tCollection,\n\tCKEditorError,\n\tLocale,\n\ttype LocaleTranslate\n} from '@ckeditor/ckeditor5-utils';\n\nimport { PluginCollection } from './plugincollection.js';\nimport { type Editor } from './editor/editor.js';\nimport type { LoadedPlugins, PluginConstructor } from './plugin.js';\nimport type { EditorConfig } from './editor/editorconfig.js';\n\n/**\n * Provides a common, higher-level environment for solutions that use multiple {@link module:core/editor/editor~Editor editors}\n * or plugins that work outside the editor. Use it instead of {@link module:core/editor/editor~Editor.create `Editor.create()`}\n * in advanced application integrations.\n *\n * All configuration options passed to a context will be used as default options for the editor instances initialized in that context.\n *\n * {@link module:core/contextplugin~ContextPlugin Context plugins} passed to a context instance will be shared among all\n * editor instances initialized in this context. These will be the same plugin instances for all the editors.\n *\n * **Note:** The context can only be initialized with {@link module:core/contextplugin~ContextPlugin context plugins}\n * (e.g. [comments](https://ckeditor.com/collaboration/comments/)). Regular {@link module:core/plugin~Plugin plugins} require an\n * editor instance to work and cannot be added to a context.\n *\n * **Note:** You can add a context plugin to an editor instance, though.\n *\n * If you are using multiple editor instances on one page and use any context plugins, create a context to share the configuration and\n * plugins among these editors. Some plugins will use the information about all existing editors to better integrate between them.\n *\n * If you are using plugins that do not require an editor to work (e.g. [comments](https://ckeditor.com/collaboration/comments/)),\n * enable and configure them using the context.\n *\n * If you are using only a single editor on each page, use {@link module:core/editor/editor~Editor.create `Editor.create()`} instead.\n * In such a case, a context instance will be created by the editor instance in a transparent way.\n *\n * See {@link ~Context.create `Context.create()`} for usage examples.\n */\nexport class Context {\n\t/**\n\t * Stores all the configurations specific to this context instance.\n\t */\n\tpublic readonly config: Config<ContextConfig>;\n\n\t/**\n\t * The plugins loaded and in use by this context instance.\n\t */\n\tpublic readonly plugins: PluginCollection<Context | Editor>;\n\n\tpublic readonly locale: Locale;\n\n\t/**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t */\n\tpublic readonly t: LocaleTranslate;\n\n\t/**\n\t * A list of editors that this context instance is injected to.\n\t */\n\tpublic readonly editors: Collection<Editor>;\n\n\t/**\n\t * The default configuration which is built into the `Context` class.\n\t *\n\t * It was used in the now deprecated CKEditor 5 builds featuring `Context` to provide the default configuration options\n\t * which are later used during the context initialization.\n\t *\n\t * ```ts\n\t * Context.defaultConfig = {\n\t * \tfoo: 1,\n\t * \tbar: 2\n\t * };\n\t *\n\t * Context\n\t * \t.create()\n\t * \t.then( context => {\n\t * \t\tcontext.config.get( 'foo' ); // -> 1\n\t * \t\tcontext.config.get( 'bar' ); // -> 2\n\t * \t} );\n\t *\n\t * // The default options can be overridden by the configuration passed to create().\n\t * Context\n\t * \t.create( { bar: 3 } )\n\t * \t.then( context => {\n\t * \t\tcontext.config.get( 'foo' ); // -> 1\n\t * \t\tcontext.config.get( 'bar' ); // -> 3\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/context~Context.builtinPlugins `Context.builtinPlugins`}\n\t * and {@link module:core/editor/editor~Editor.defaultConfig `Editor.defaultConfig`}.\n\t */\n\tpublic static defaultConfig: ContextConfig;\n\n\t/**\n\t * An array of plugins built into the `Context` class.\n\t *\n\t * It was used in the now deprecated CKEditor 5 builds featuring `Context` to provide the default configuration options\n\t * which are later used during the context initialization.\n\t *\n\t * They will be automatically initialized by `Context` unless `config.plugins` is passed.\n\t *\n\t * ```ts\n\t * // Build some context plugins into the Context class first.\n\t * Context.builtinPlugins = [ FooPlugin, BarPlugin ];\n\t *\n\t * // Normally, you need to define config.plugins, but since Context.builtinPlugins was\n\t * // defined, now you can call create() without any configuration.\n\t * Context\n\t * \t.create()\n\t * \t.then( context => {\n\t * \t\tcontext.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t * \t\tcontext.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/context~Context.defaultConfig `Context.defaultConfig`}\n\t * and {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n\t */\n\tpublic static builtinPlugins: Array<PluginConstructor<Context | Editor>>;\n\n\t/**\n\t * Reference to the editor which created the context.\n\t * Null when the context was created outside of the editor.\n\t *\n\t * It is used to destroy the context when removing the editor that has created the context.\n\t */\n\tprivate _contextOwner: Editor | null = null;\n\n\t/**\n\t * Creates a context instance with a given configuration.\n\t *\n\t * Usually not to be used directly. See the static {@link module:core/context~Context.create `create()`} method.\n\t *\n\t * @param config The context configuration.\n\t */\n\tconstructor( config?: ContextConfig ) {\n\t\t// We don't pass translations to the config, because its behavior of splitting keys\n\t\t// with dots (e.g. `resize.width` => `resize: { width }`) breaks the translations.\n\t\tconst { translations, ...rest } = config || {};\n\n\t\tthis.config = new Config<ContextConfig>( rest, ( this.constructor as typeof Context ).defaultConfig );\n\n\t\tconst availablePlugins = ( this.constructor as typeof Context ).builtinPlugins;\n\n\t\tthis.config.define( 'plugins', availablePlugins );\n\n\t\tthis.plugins = new PluginCollection<Context | Editor>( this, availablePlugins );\n\n\t\tconst languageConfig = this.config.get( 'language' ) || {};\n\n\t\tthis.locale = new Locale( {\n\t\t\tuiLanguage: typeof languageConfig === 'string' ? languageConfig : languageConfig.ui,\n\t\t\tcontentLanguage: this.config.get( 'language.content' ),\n\t\t\ttranslations\n\t\t} );\n\n\t\tthis.t = this.locale.t;\n\n\t\tthis.editors = new Collection<Editor>();\n\t}\n\n\t/**\n\t * Loads and initializes plugins specified in the configuration.\n\t *\n\t * @returns A promise which resolves once the initialization is completed, providing an array of loaded plugins.\n\t */\n\tpublic initPlugins(): Promise<LoadedPlugins> {\n\t\tconst plugins = this.config.get( 'plugins' ) || [];\n\t\tconst substitutePlugins = this.config.get( 'substitutePlugins' ) || [];\n\n\t\t// Plugins for substitution should be checked as well.\n\t\tfor ( const Plugin of plugins.concat( substitutePlugins ) ) {\n\t\t\tif ( typeof Plugin != 'function' ) {\n\t\t\t\t/**\n\t\t\t\t * Only a constructor function is allowed as a {@link module:core/contextplugin~ContextPlugin context plugin}.\n\t\t\t\t *\n\t\t\t\t * @error context-initplugins-constructor-only\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'context-initplugins-constructor-only',\n\t\t\t\t\tnull,\n\t\t\t\t\t{ Plugin }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( Plugin.isContextPlugin !== true ) {\n\t\t\t\t/**\n\t\t\t\t * Only a plugin marked as a {@link module:core/contextplugin~ContextPlugin.isContextPlugin context plugin}\n\t\t\t\t * is allowed to be used with a context.\n\t\t\t\t *\n\t\t\t\t * @error context-initplugins-invalid-plugin\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'context-initplugins-invalid-plugin',\n\t\t\t\t\tnull,\n\t\t\t\t\t{ Plugin }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn this.plugins.init( plugins, [], substitutePlugins );\n\t}\n\n\t/**\n\t * Destroys the context instance and all editors used with the context,\n\t * releasing all resources used by the context.\n\t *\n\t * @returns A promise that resolves once the context instance is fully destroyed.\n\t */\n\tpublic destroy(): Promise<unknown> {\n\t\treturn Promise.all( Array.from( this.editors, editor => editor.destroy() ) )\n\t\t\t.then( () => this.plugins.destroy() );\n\t}\n\n\t/**\n\t * Adds a reference to the editor which is used with this context.\n\t *\n\t * When the given editor has created the context, the reference to this editor will be stored\n\t * as a {@link ~Context#_contextOwner}.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @internal\n\t * @param isContextOwner Stores the given editor as a context owner.\n\t */\n\tpublic _addEditor( editor: Editor, isContextOwner: boolean ): void {\n\t\tif ( this._contextOwner ) {\n\t\t\t/**\n\t\t\t * Cannot add multiple editors to the context which is created by the editor.\n\t\t\t *\n\t\t\t * @error context-addeditor-private-context\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'context-addeditor-private-context' );\n\t\t}\n\n\t\tthis.editors.add( editor );\n\n\t\tif ( isContextOwner ) {\n\t\t\tthis._contextOwner = editor;\n\t\t}\n\t}\n\n\t/**\n\t * Removes a reference to the editor which was used with this context.\n\t * When the context was created by the given editor, the context will be destroyed.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @internal\n\t * @return A promise that resolves once the editor is removed from the context or when the context was destroyed.\n\t */\n\tpublic _removeEditor( editor: Editor ): Promise<unknown> {\n\t\tif ( this.editors.has( editor ) ) {\n\t\t\tthis.editors.remove( editor );\n\t\t}\n\n\t\tif ( this._contextOwner === editor ) {\n\t\t\treturn this.destroy();\n\t\t}\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Returns the context configuration which will be copied to the editors created using this context.\n\t *\n\t * The configuration returned by this method has the plugins configuration removed &ndash; plugins are shared with all editors\n\t * through another mechanism.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @internal\n\t * @returns Configuration as a plain object.\n\t */\n\tpublic _getEditorConfig(): Partial<EditorConfig> {\n\t\tconst result: Record<string, unknown> = {};\n\n\t\tfor ( const name of this.config.names() ) {\n\t\t\tif ( ![ 'plugins', 'removePlugins', 'extraPlugins' ].includes( name ) ) {\n\t\t\t\tresult[ name ] = this.config.get( name );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates and initializes a new context instance.\n\t *\n\t * ```ts\n\t * const commonConfig = { ... }; // Configuration for all the plugins and editors.\n\t * const editorPlugins = [ ... ]; // Regular plugins here.\n\t *\n\t * Context\n\t * \t.create( {\n\t * \t\t// Only context plugins here.\n\t * \t\tplugins: [ ... ],\n\t *\n\t * \t\t// Configure the language for all the editors (it cannot be overwritten).\n\t * \t\tlanguage: { ... },\n\t *\n\t * \t\t// Configuration for context plugins.\n\t * \t\tcomments: { ... },\n\t * \t\t...\n\t *\n\t * \t\t// Default configuration for editor plugins.\n\t * \t\ttoolbar: { ... },\n\t * \t\timage: { ... },\n\t * \t\t...\n\t * \t} )\n\t * \t.then( context => {\n\t * \t\tconst promises = [];\n\t *\n\t * \t\tpromises.push( ClassicEditor.create(\n\t * \t\t\tdocument.getElementById( 'editor1' ),\n\t * \t\t\t{\n\t * \t\t\t\teditorPlugins,\n\t * \t\t\t\tcontext\n\t * \t\t\t}\n\t * \t\t) );\n\t *\n\t * \t\tpromises.push( ClassicEditor.create(\n\t * \t\t\tdocument.getElementById( 'editor2' ),\n\t * \t\t\t{\n\t * \t\t\t\teditorPlugins,\n\t * \t\t\t\tcontext,\n\t * \t\t\t\ttoolbar: { ... } // You can overwrite the configuration of the context.\n\t * \t\t\t}\n\t * \t\t) );\n\t *\n\t * \t\treturn Promise.all( promises );\n\t * \t} );\n\t * ```\n\t *\n\t * @param config The context configuration.\n\t * @returns A promise resolved once the context is ready. The promise resolves with the created context instance.\n\t */\n\tpublic static create( config?: ContextConfig ): Promise<Context> {\n\t\treturn new Promise( resolve => {\n\t\t\tconst context = new this( config );\n\n\t\t\tresolve( context.initPlugins().then( () => context ) );\n\t\t} );\n\t}\n\n\t/**\n\t * `Context` class is commonly put in `config.plugins` array.\n\t *\n\t * This property helps with better error detection.\n\t *\n\t * @internal\n\t */\n\tpublic static get _throwErrorWhenUsedAsAPlugin(): true {\n\t\treturn true;\n\t};\n}\n\n/**\n * The context configuration.\n */\nexport type ContextConfig = {\n\tplugins?: Array<PluginConstructor<Context | Editor>>;\n\tsubstitutePlugins?: Array<PluginConstructor<Context | Editor>>;\n} & Omit<EditorConfig, 'plugins' | 'substitutePlugins' | 'removePlugins' | 'extraPlugins'>;\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/**\n * @module core/contextplugin\n */\n\nimport {\n\tObservableMixin,\n\ttype Collection,\n\ttype Config,\n\ttype Locale,\n\ttype LocaleTranslate,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type Editor } from './editor/editor.js';\nimport type { EditorConfig } from './editor/editorconfig.js';\nimport { type Context } from './context.js';\nimport type { PluginDependencies, PluginInterface } from './plugin.js';\nimport { type PluginCollection } from './plugincollection.js';\n\nconst ContextPluginBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * The base class for {@link module:core/context~Context} plugin classes.\n *\n * A context plugin can either be initialized for an {@link module:core/editor/editor~Editor editor} or for\n * a {@link module:core/context~Context context}. In other words, it can either\n * work within one editor instance or with one or more editor instances that use a single context.\n * It is the context plugin's role to implement handling for both modes.\n *\n * There are a few rules for interaction between the editor plugins and context plugins:\n *\n * * A context plugin can require another context plugin.\n * * An {@link module:core/plugin~Plugin editor plugin} can require a context plugin.\n * * A context plugin MUST NOT require an {@link module:core/plugin~Plugin editor plugin}.\n */\nexport class ContextPlugin extends ContextPluginBase implements PluginInterface {\n\t/**\n\t * The context or editor instance.\n\t */\n\tpublic readonly context: ContextInterface;\n\n\t/**\n\t * Creates a new plugin instance.\n\t */\n\tconstructor( context: Context | Editor ) {\n\t\tsuper();\n\n\t\tthis.context = context as ContextInterface;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get isContextPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get isOfficialPlugin(): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get isPremiumPlugin(): boolean {\n\t\treturn false;\n\t}\n}\n\n/**\n * The common interface of {@link module:core/context~Context} and {@link module:core/editor/editor~Editor}.\n */\nexport interface ContextInterface {\n\tconfig: Config<Omit<EditorConfig, 'plugins' | 'substitutePlugins' | 'removePlugins' | 'extraPlugins'>>;\n\tplugins: PluginCollection<Context | Editor>;\n\tlocale: Locale;\n\tt: LocaleTranslate;\n\teditors?: Collection<Editor>;\n}\n\nexport type ContextPluginDependencies = PluginDependencies<Context | Editor>;\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/**\n * @module core/editingkeystrokehandler\n */\n\nimport { KeystrokeHandler, type PriorityString } from '@ckeditor/ckeditor5-utils';\n\nimport { type Editor } from './editor/editor.js';\n\n/**\n * A keystroke handler for editor editing. Its instance is available\n * in {@link module:core/editor/editor~Editor#keystrokes} so plugins\n * can register their keystrokes.\n *\n * E.g. an undo plugin would do this:\n *\n * ```ts\n * editor.keystrokes.set( 'Ctrl+Z', 'undo' );\n * editor.keystrokes.set( 'Ctrl+Shift+Z', 'redo' );\n * editor.keystrokes.set( 'Ctrl+Y', 'redo' );\n * ```\n */\nexport class EditingKeystrokeHandler extends KeystrokeHandler {\n\t/**\n\t * The editor instance.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * Creates an instance of the keystroke handler.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\t\tthis.editor = editor;\n\t}\n\n\t/**\n\t * Registers a handler for the specified keystroke.\n\t *\n\t * The handler can be specified as a command name or a callback.\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 If a string is passed, then the keystroke will\n\t * {@link module:core/editor/editor~Editor#execute execute a command}.\n\t * If a function, then it will be called with the\n\t * {@link module:engine/view/observer/keyobserver~ViewDocumentKeyEventData key event data} object and\n\t * a `cancel()` helper to both `preventDefault()` and `stopPropagation()` of the event.\n\t * @param options Additional options.\n\t * @param options.priority The priority of the keystroke callback. The higher the priority value\n\t * the sooner the callback will be executed. Keystrokes having the same priority\n\t * are called in the order they were added.\n\t */\n\tpublic override set(\n\t\tkeystroke: string | Array<string | number>,\n\t\tcallback: EditingKeystrokeCallback,\n\t\toptions: { readonly priority?: PriorityString } = {}\n\t): void {\n\t\tif ( typeof callback == 'string' ) {\n\t\t\tconst commandName = callback;\n\n\t\t\tcallback = ( evtData, cancel ) => {\n\t\t\t\tthis.editor.execute( commandName );\n\t\t\t\tcancel();\n\t\t\t};\n\t\t}\n\n\t\tsuper.set( keystroke, callback, options );\n\t}\n}\n\n/**\n * Command name or a callback to be executed when a given keystroke is pressed.\n */\nexport type EditingKeystrokeCallback = string | ( ( ev: KeyboardEvent, cancel: () => void ) => void );\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/**\n * @module core/accessibility\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport { type Editor } from './editor/editor.js';\n\nconst DEFAULT_CATEGORY_ID = 'contentEditing' as const;\n\n/**\n * @internal\n */\nexport const DEFAULT_GROUP_ID = 'common' as const;\n\n/**\n * A common namespace for various accessibility features of the editor.\n *\n * **Information about editor keystrokes**\n *\n * * The information about keystrokes available in the editor is stored in the {@link #keystrokeInfos} property.\n * * New info entries can be added using the {@link #addKeystrokeInfoCategory}, {@link #addKeystrokeInfoGroup},\n * and {@link #addKeystrokeInfos} methods.\n */\nexport class Accessibility {\n\t/**\n\t * Stores information about keystrokes brought by editor features for the users to interact with the editor, mainly\n\t * keystroke combinations and their accessible labels.\n\t *\n\t * This information is particularly useful for screen reader and other assistive technology users. It gets displayed\n\t * by the {@link module:ui/editorui/accessibilityhelp/accessibilityhelp~AccessibilityHelp Accessibility help} dialog.\n\t *\n\t * Keystrokes are organized in categories and groups. They can be added using ({@link #addKeystrokeInfoCategory},\n\t * {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}) methods.\n\t *\n\t * Please note that:\n\t * * two categories are always available:\n\t *   * `'contentEditing'` for keystrokes related to content creation,\n\t *   * `'navigation'` for keystrokes related to navigation in the UI and the content.\n\t * * unless specified otherwise, new keystrokes are added into the `'contentEditing'` category and the `'common'`\n\t * keystroke group within that category while using the {@link #addKeystrokeInfos} method.\n\t */\n\tpublic readonly keystrokeInfos: KeystrokeInfoDefinitions = new Map();\n\n\t/**\n\t * The editor instance.\n\t */\n\tprivate readonly _editor: Editor;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tthis._editor = editor;\n\t\tconst isMenuBarVisible = editor.config.get( 'menuBar.isVisible' );\n\n\t\tconst t = editor.locale.t;\n\n\t\tthis.addKeystrokeInfoCategory( {\n\t\t\tid: DEFAULT_CATEGORY_ID,\n\t\t\tlabel: t( 'Content editing keystrokes' ),\n\t\t\tdescription: t( 'These keyboard shortcuts allow for quick access to content editing features.' )\n\t\t} );\n\n\t\tconst navigationKeystrokes = [\n\t\t\t{\n\t\t\t\tlabel: t( 'Close contextual balloons, dropdowns, and dialogs' ),\n\t\t\t\tkeystroke: 'Esc'\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t( 'Open the accessibility help dialog' ),\n\t\t\t\tkeystroke: 'Alt+0'\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t( 'Move focus between form fields (inputs, buttons, etc.)' ),\n\t\t\t\tkeystroke: [ [ 'Tab' ], [ 'Shift+Tab' ] ]\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t( 'Move focus to the toolbar, navigate between toolbars' ),\n\t\t\t\tkeystroke: 'Alt+F10',\n\t\t\t\tmayRequireFn: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t( 'Navigate through the toolbar or menu bar' ),\n\t\t\t\tkeystroke: [ [ 'arrowup' ], [ 'arrowright' ], [ 'arrowdown' ], [ 'arrowleft' ] ]\n\t\t\t},\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line @stylistic/max-len\n\t\t\t\tlabel: t( 'Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.' ),\n\t\t\t\tkeystroke: [ [ 'Enter' ], [ 'Space' ] ]\n\t\t\t}\n\t\t];\n\n\t\tif ( isMenuBarVisible ) {\n\t\t\tnavigationKeystrokes.push(\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move focus to the menu bar, navigate between menu bars' ),\n\t\t\t\t\tkeystroke: 'Alt+F9',\n\t\t\t\t\tmayRequireFn: true\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis.addKeystrokeInfoCategory( {\n\t\t\tid: 'navigation',\n\t\t\tlabel: t( 'User interface and content navigation keystrokes' ),\n\t\t\tdescription: t( 'Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.' ),\n\t\t\tgroups: [\n\t\t\t\t{\n\t\t\t\t\tid: 'common',\n\t\t\t\t\tkeystrokes: navigationKeystrokes\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Adds a top-level category in the {@link #keystrokeInfos keystroke information database} with a label and optional description.\n\t *\n\t * Categories organize keystrokes and help users to find the right keystroke. Each category can have multiple groups\n\t * of keystrokes that narrow down the context in which the keystrokes are available. Every keystroke category comes\n\t * with a `'common'` group by default.\n\t *\n\t * By default, two categories are available:\n\t * * `'contentEditing'` for keystrokes related to content creation,\n\t * * `'navigation'` for keystrokes related to navigation in the UI and the content.\n\t *\n\t * To create a new keystroke category with new groups, use the following code:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfoCategory( {\n\t * \t\t\tid: 'myCategory',\n\t * \t\t\tlabel: t( 'My category' ),\n\t * \t\t\tdescription: t( 'My category description.' ),\n\t * \t\t\tgroups: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tid: 'myGroup',\n\t * \t\t\t\t\tlabel: t( 'My keystroke group' ),\n\t * \t\t\t\t\tkeystrokes: [\n\t * \t\t\t\t\t\t{\n\t * \t\t\t\t\t\t\tlabel: t( 'Keystroke label 1' ),\n\t * \t\t\t\t\t\t\tkeystroke: 'Ctrl+Shift+N'\n\t * \t\t\t\t\t\t},\n\t * \t\t\t\t\t\t{\n\t * \t\t\t\t\t\t\tlabel: t( 'Keystroke label 2' ),\n\t * \t\t\t\t\t\t\tkeystroke: 'Ctrl+Shift+M'\n\t * \t\t\t\t\t\t}\n\t * \t\t\t\t\t]\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t};\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}.\n\t */\n\tpublic addKeystrokeInfoCategory( { id, label, description, groups }: AddKeystrokeInfoCategoryData ): void {\n\t\tthis.keystrokeInfos.set( id, {\n\t\t\tid,\n\t\t\tlabel,\n\t\t\tdescription,\n\t\t\tgroups: new Map()\n\t\t} );\n\n\t\tthis.addKeystrokeInfoGroup( {\n\t\t\tcategoryId: id,\n\t\t\tid: DEFAULT_GROUP_ID\n\t\t} );\n\n\t\tif ( groups ) {\n\t\t\tgroups.forEach( group => {\n\t\t\t\tthis.addKeystrokeInfoGroup( {\n\t\t\t\t\tcategoryId: id,\n\t\t\t\t\t...group\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Adds a group of keystrokes in a specific category to the {@link #keystrokeInfos keystroke information database}.\n\t *\n\t * Groups narrow down the context in which the keystrokes are available. When `categoryId` is not specified,\n\t * the group goes to the `'contentEditing'` category (default).\n\t *\n\t * To create a new group within an existing category, use the following code:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfoGroup( {\n\t * \t\t\tid: 'myGroup',\n\t * \t\t\tcategoryId: 'navigation',\n\t * \t\t\tlabel: t( 'My keystroke group' ),\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label 1' ),\n\t * \t\t\t\t\tkeystroke: 'Ctrl+Shift+N'\n\t * \t\t\t\t},\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label 2' ),\n\t * \t\t\t\t\tkeystroke: 'Ctrl+Shift+M'\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoCategory}, and {@link #addKeystrokeInfos}.\n\t */\n\tpublic addKeystrokeInfoGroup( {\n\t\tcategoryId = DEFAULT_CATEGORY_ID,\n\t\tid,\n\t\tlabel,\n\t\tkeystrokes\n\t}: AddKeystrokeInfoGroupData ): void {\n\t\tconst category = this.keystrokeInfos.get( categoryId );\n\n\t\tif ( !category ) {\n\t\t\tthrow new CKEditorError( 'accessibility-unknown-keystroke-info-category', this._editor, { groupId: id, categoryId } );\n\t\t}\n\n\t\tcategory.groups.set( id, {\n\t\t\tid,\n\t\t\tlabel,\n\t\t\tkeystrokes: keystrokes || []\n\t\t} );\n\t}\n\n\t/**\n\t * Adds information about keystrokes to the {@link #keystrokeInfos keystroke information database}.\n\t *\n\t * Keystrokes without specified `groupId` or `categoryId` go to the `'common'` group in the `'contentEditing'` category (default).\n\t *\n\t * To add a keystroke brought by your plugin (using default group and category), use the following code:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfos( {\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label' ),\n\t * \t\t\t\t\tkeystroke: 'CTRL+B'\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t * To add a keystroke in a specific existing `'widget'` group in the default `'contentEditing'` category:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfos( {\n\t * \t\t\t// Add a keystroke to the existing \"widget\" group.\n\t * \t\t\tgroupId: 'widget',\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'A an action on a selected widget' ),\n\t * \t\t\t\t\tkeystroke: 'Ctrl+D',\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * To add a keystroke to another existing category (using default group):\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfos( {\n\t * \t\t\t// Add keystrokes to the \"navigation\" category (one of defaults).\n\t * \t\t\tcategoryId: 'navigation',\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label' ),\n\t * \t\t\t\t\tkeystroke: 'CTRL+B'\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfoCategory}.\n\t */\n\tpublic addKeystrokeInfos( {\n\t\tcategoryId = DEFAULT_CATEGORY_ID,\n\t\tgroupId = DEFAULT_GROUP_ID,\n\t\tkeystrokes\n\t}: AddKeystrokeInfosData ): void {\n\t\tif ( !this.keystrokeInfos.has( categoryId ) ) {\n\t\t\t/**\n\t\t\t * Cannot add keystrokes in an unknown category. Use\n\t\t\t * {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory}\n\t\t\t * to add a new category or make sure the specified category exists.\n\t\t\t *\n\t\t\t * @error accessibility-unknown-keystroke-info-category\n\t\t\t * @param {string} categoryId The id of the unknown keystroke category.\n\t\t\t * @param {module:core/accessibility~AddKeystrokeInfosData#keystrokes} keystrokes Keystroke definitions about to be added.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'accessibility-unknown-keystroke-info-category', this._editor, { categoryId, keystrokes } );\n\t\t}\n\n\t\tconst category = this.keystrokeInfos.get( categoryId )!;\n\n\t\tif ( !category.groups.has( groupId ) ) {\n\t\t\t/**\n\t\t\t * Cannot add keystrokes to an unknown group.\n\t\t\t *\n\t\t\t * Use {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup}\n\t\t\t * to add a new group or make sure the specified group exists.\n\t\t\t *\n\t\t\t * @error accessibility-unknown-keystroke-info-group\n\t\t\t * @param {string} groupId The id of the unknown keystroke group.\n\t\t\t * @param {string} categoryId The id of category the unknown group should belong to.\n\t\t\t * @param {module:core/accessibility~AddKeystrokeInfosData#keystrokes} keystrokes Keystroke definitions about to be added.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'accessibility-unknown-keystroke-info-group', this._editor, { groupId, categoryId, keystrokes } );\n\t\t}\n\n\t\tcategory.groups.get( groupId )!.keystrokes.push( ...keystrokes );\n\t}\n}\n\n/**\n * A description of category of keystrokes accepted by the {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory} method.\n *\n * Top-level categories organize keystrokes and help users to find the right keystroke. Each category can have multiple groups of\n * keystrokes that narrow down the context in which the keystrokes are available.\n *\n * See {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup} and\n * {@link module:core/accessibility~Accessibility#addKeystrokeInfos}.\n */\nexport interface AddKeystrokeInfoCategoryData {\n\n\t/**\n\t * The unique id of the category.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the category.\n\t */\n\tlabel: string;\n\n\t/**\n\t * The description of the category (optional).\n\t */\n\tdescription?: string;\n\n\t/**\n\t * Groups of keystrokes within the category.\n\t */\n\tgroups?: Array<AddKeystrokeInfoGroupData>;\n}\n\n/**\n * A description of keystroke group accepted by the {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup} method.\n *\n * Groups narrow down the context in which the keystrokes are available. When `categoryId` is not specified, the group goes\n * to the `'contentEditing'` category (default).\n *\n * See {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory} and\n * {@link module:core/accessibility~Accessibility#addKeystrokeInfos}.\n */\nexport interface AddKeystrokeInfoGroupData {\n\n\t/**\n\t * The category id the group belongs to.\n\t */\n\tcategoryId?: string;\n\n\t/**\n\t * The unique id of the group.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the group (optional).\n\t */\n\tlabel?: string;\n\n\t/**\n\t * Keystroke definitions within the group.\n\t */\n\tkeystrokes?: Array<KeystrokeInfoDefinition>;\n}\n\n/**\n * Description of keystrokes accepted by the {@link module:core/accessibility~Accessibility#addKeystrokeInfos} method.\n *\n * Keystrokes without specified `groupId` or `categoryId` go to the `'common'` group in the `'contentEditing'` category (default).\n *\n * See {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory} and\n * {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup}.\n */\nexport interface AddKeystrokeInfosData {\n\n\t/**\n\t * The category id the keystrokes belong to.\n\t */\n\tcategoryId?: string;\n\n\t/**\n\t * The group id the keystrokes belong to.\n\t */\n\tgroupId?: string;\n\n\t/**\n\t * An array of keystroke definitions.\n\t */\n\tkeystrokes: Array<KeystrokeInfoDefinition>;\n}\n\nexport type KeystrokeInfoDefinitions = Map<string, KeystrokeInfoCategoryDefinition>;\n\n/**\n * A category of keystrokes in {@link module:core/accessibility~Accessibility#keystrokeInfos}.\n */\nexport type KeystrokeInfoCategoryDefinition = {\n\n\t/**\n\t * The unique id of the category.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the category.\n\t */\n\tlabel: string;\n\n\t/**\n\t * The description of the category (optional).\n\t */\n\tdescription?: string;\n\n\t/**\n\t * Groups of keystrokes within the category.\n\t */\n\tgroups: Map<string, KeystrokeInfoGroupDefinition>;\n};\n\n/**\n * A group of keystrokes in {@link module:core/accessibility~Accessibility#keystrokeInfos}.\n */\nexport type KeystrokeInfoGroupDefinition = {\n\n\t/**\n\t * The unique id of the group.\n\t */\n\tid: string;\n\n\t/**\n\t * The label of the group (optional).\n\t */\n\tlabel?: string;\n\n\t/**\n\t * Keystroke definitions within the group.\n\t */\n\tkeystrokes: Array<KeystrokeInfoDefinition>;\n};\n\n/**\n * A keystroke info definition in {@link module:core/accessibility~Accessibility#keystrokeInfos}\n */\nexport interface KeystrokeInfoDefinition {\n\n\t/**\n\t * The label of the keystroke. It should briefly describe the action that the keystroke performs. It may contain HTML.\n\t */\n\tlabel: string;\n\n\t/**\n\t * The keystroke string. In its basic form, it must be a combination of {@link module:utils/keyboard#keyCodes known key names}\n\t * joined by the `+` sign, the same as the keystroke format accepted by the\n\t * {@link module:utils/keystrokehandler~KeystrokeHandler#set `KeystrokeHandler#set()`} method used to register most of the\n\t * keystroke interactions in the editor.\n\t *\n\t * * The keystroke string can represent a single keystroke, for instance: `keystroke: 'Ctrl+B'`, `keystroke: 'Shift+Enter'`,\n\t * `keystroke: 'Alt+F10'`, etc.\n\t * * The keystroke can be activated by successive press of multiple keys. For instance `keystroke: [ [ 'arrowleft', 'arrowleft' ] ]`\n\t * will indicate that a specific action will be performed by pressing <kbd>←</kbd> twice in a row.\n\t * * Keystrokes can have alternatives. For instance `keystroke: [ [ 'Ctrl+Y' ], [ 'Ctrl+Shift+Z' ] ]` will indicate that\n\t * a specific action can be performed by pressing either <kbd>Ctrl</kbd> + <kbd>Y</kbd> or\n\t * <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Z</kbd>.\n\t *\n\t * Please note that the keystrokes are automatically translated to the environment-specific form. For example, `Ctrl+A`\n\t * will be rendered as `⌘A` in the {@link module:utils/env~EnvType#isMac Mac environment}. Always use the IBM PC keyboard\n\t * syntax, for instance `Ctrl` instead of `⌘`, `Alt` instead of `⌥`, etc.\n\t */\n\tkeystroke: string | Array<string> | Array<Array<string>>;\n\n\t/**\n\t * This (optional) flag suggests that the keystroke(s) may require a function (<kbd>Fn</kbd>) key to be pressed\n\t * in order to work in the {@link module:utils/env~EnvType#isMac Mac environment}. If set `true`, an additional\n\t * information will be displayed next to the keystroke.\n\t */\n\tmayRequireFn?: boolean;\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/**\n * @module core/editor/utils/editorusagedata\n */\n\nimport { env, global, uid } from '@ckeditor/ckeditor5-utils';\n\nimport { type Editor } from '../editor.js';\nimport type { ToolbarConfig, ToolbarConfigItem } from '../editorconfig.js';\nimport { type PluginCollection } from '../../plugincollection.js';\n\n/**\n * This part of the code is not executed in open-source implementations using a GPL key.\n * It only runs when a specific license key is provided. If you are uncertain whether\n * this applies to your installation, please contact our support team.\n *\n * @internal\n */\nexport function getEditorUsageData( editor: Editor ): EditorUsageData {\n\treturn {\n\t\tsessionId: getSessionId(),\n\t\tpageSessionId: getPageSessionID(),\n\t\thostname: window.location.hostname,\n\t\tversion: globalThis.CKEDITOR_VERSION,\n\t\ttype: getEditorType( editor ),\n\t\tplugins: getPluginsUsageData( editor.plugins ),\n\t\tdistribution: getDistributionUsageData(),\n\t\tenv: getEnvUsageData(),\n\t\tintegration: Object.create( null ),\n\t\tmenuBar: {\n\t\t\tisVisible: !!editor.config.get( 'menuBar.isVisible' )\n\t\t},\n\t\tlanguage: {\n\t\t\tui: editor.locale.uiLanguage,\n\t\t\tcontent: editor.locale.contentLanguage\n\t\t},\n\t\ttoolbar: {\n\t\t\tmain: getToolbarUsageData( editor.config.get( 'toolbar' ) ),\n\t\t\tblock: getToolbarUsageData( editor.config.get( 'blockToolbar' ) ),\n\t\t\tballoon: getToolbarUsageData( editor.config.get( 'balloonToolbar' ) )\n\t\t}\n\t};\n}\n\nfunction getEditorType( editor: Editor ): `${ string }Editor` {\n\treturn Object.getPrototypeOf( editor ).constructor.editorName!;\n}\n\nfunction getPluginsUsageData( collection: PluginCollection<Editor> ): Array<PluginUsageData> {\n\treturn Array\n\t\t.from( collection )\n\t\t.filter( ( [ PluginConstructor ] ) => !!PluginConstructor.pluginName )\n\t\t.map( ( [ PluginConstructor ] ): PluginUsageData => {\n\t\t\tconst {\n\t\t\t\tpluginName,\n\t\t\t\tisContextPlugin,\n\t\t\t\tisOfficialPlugin,\n\t\t\t\tisPremiumPlugin\n\t\t\t} = PluginConstructor;\n\n\t\t\treturn {\n\t\t\t\tisContext: !!isContextPlugin,\n\t\t\t\tisOfficial: !!isOfficialPlugin,\n\t\t\t\tisPremium: !!isPremiumPlugin,\n\t\t\t\tname: pluginName!\n\t\t\t};\n\t\t} );\n}\n\nfunction getToolbarUsageData( toolbarConfig: ToolbarConfig | undefined ): ToolbarUsageData | undefined {\n\tif ( !toolbarConfig ) {\n\t\treturn undefined;\n\t}\n\n\tconst normalizedToolbar: Exclude<ToolbarConfig, Array<unknown>> =\n\t\tArray.isArray( toolbarConfig ) ?\n\t\t\t{ items: toolbarConfig } :\n\t\t\ttoolbarConfig;\n\n\tconst flattenToolbarConfigNames = extractToolbarConfigItemsNames( normalizedToolbar.items || [] );\n\tconst isMultiline = flattenToolbarConfigNames.includes( '-' );\n\n\treturn {\n\t\tisMultiline,\n\t\tshouldNotGroupWhenFull: !!normalizedToolbar.shouldNotGroupWhenFull,\n\t\titems: stripToolbarSeparatorItems( flattenToolbarConfigNames )\n\t};\n\n\tfunction stripToolbarSeparatorItems( items: Array<string> ): Array<string> {\n\t\treturn items.filter( ( item: string ) => item !== '|' && item !== '-' );\n\t}\n\n\tfunction extractToolbarConfigItemsNames( items: Array<ToolbarConfigItem> ): Array<string> {\n\t\treturn items.flatMap( item => {\n\t\t\tif ( typeof item === 'string' ) {\n\t\t\t\treturn [ item ];\n\t\t\t}\n\n\t\t\treturn extractToolbarConfigItemsNames( item.items );\n\t\t} );\n\t}\n}\n\nfunction getDistributionUsageData(): DistributionUsageData {\n\treturn {\n\t\tchannel: ( window[ Symbol.for( 'cke distribution' ) as any ] || 'sh' ) as unknown as string\n\t};\n}\n\nfunction getEnvUsageData(): EnvUsageData {\n\tlet os: EnvUsageData[ 'os' ] = 'unknown';\n\tlet browser: EnvUsageData[ 'browser' ] = 'unknown';\n\n\tif ( env.isMac ) {\n\t\tos = 'mac';\n\t} else if ( env.isWindows ) {\n\t\tos = 'windows';\n\t} else if ( env.isiOS ) {\n\t\tos = 'ios';\n\t} else if ( env.isAndroid ) {\n\t\tos = 'android';\n\t}\n\n\tif ( env.isGecko ) {\n\t\tbrowser = 'gecko';\n\t} else if ( env.isBlink ) {\n\t\tbrowser = 'blink';\n\t} else if ( env.isSafari ) {\n\t\tbrowser = 'safari';\n\t}\n\n\treturn {\n\t\tos,\n\t\tbrowser\n\t};\n}\n\nfunction getSessionId(): string {\n\tif ( !localStorage.getItem( '__ckeditor-session-id' ) ) {\n\t\tlocalStorage.setItem( '__ckeditor-session-id', uid() );\n\t}\n\n\treturn localStorage.getItem( '__ckeditor-session-id' )!;\n}\n\nfunction getPageSessionID() {\n\tglobal.window.CKEDITOR_PAGE_SESSION_ID = global.window.CKEDITOR_PAGE_SESSION_ID || uid();\n\n\treturn global.window.CKEDITOR_PAGE_SESSION_ID;\n}\n\ndeclare global {\n\tinterface Window {\n\t\tCKEDITOR_PAGE_SESSION_ID?: string;\n\t}\n}\n\n/**\n * @internal\n */\nexport type EditorUsageData = {\n\tsessionId: string;\n\tpageSessionId: string;\n\thostname: string;\n\tversion: string;\n\ttype: `${ string }Editor`;\n\tplugins: Array<PluginUsageData>;\n\ttoolbar: {\n\t\tmain?: ToolbarUsageData;\n\t\tblock?: ToolbarUsageData;\n\t\tballoon?: ToolbarUsageData;\n\t};\n\tmenuBar: {\n\t\tisVisible: boolean;\n\t};\n\tlanguage: {\n\t\tui: string;\n\t\tcontent: string;\n\t};\n\tdistribution: {\n\t\tchannel: string;\n\t};\n\tenv: EnvUsageData;\n\tintegration: {\n\t\t[integrationName: string]: IntegrationUsageData;\n\t};\n};\n\ntype IntegrationUsageData = {\n\tversion: string;\n\tframeworkVersion?: string;\n};\n\ntype DistributionUsageData = {\n\tchannel: string;\n};\n\ntype EnvUsageData = {\n\tos: 'mac' | 'windows' | 'ios' | 'android' | 'unknown';\n\tbrowser: 'safari' | 'gecko' | 'blink' | 'unknown';\n};\n\ntype ToolbarUsageData = {\n\titems: Array<string>;\n\tisMultiline: boolean;\n\tshouldNotGroupWhenFull: boolean;\n};\n\ntype PluginUsageData = {\n\tname: string;\n\tisPremium: boolean;\n\tisOfficial: boolean;\n\tisContext: boolean;\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/**\n * @module core/editor/editor\n */\n\nimport { set, get } from 'es-toolkit/compat';\n\nimport {\n\tConfig,\n\tCKEditorError,\n\tObservableMixin,\n\tlogError,\n\treleaseDate,\n\ttoArray,\n\tuid,\n\tcrc32,\n\tdecodeLicenseKey,\n\tisFeatureBlockedByLicenseKey,\n\ttype Locale,\n\ttype LocaleTranslate,\n\ttype ObservableChangeEvent,\n\ttype CRCData,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tConversion,\n\tDataController,\n\tEditingController,\n\tModel,\n\tStylesProcessor\n} from '@ckeditor/ckeditor5-engine';\n\nimport type { EditorUI } from '@ckeditor/ckeditor5-ui';\nimport { ContextWatchdog, EditorWatchdog } from '@ckeditor/ckeditor5-watchdog';\n\nimport { Context } from '../context.js';\nimport { PluginCollection } from '../plugincollection.js';\nimport { CommandCollection, type CommandsMap } from '../commandcollection.js';\nimport { EditingKeystrokeHandler } from '../editingkeystrokehandler.js';\nimport { Accessibility } from '../accessibility.js';\nimport { getEditorUsageData, type EditorUsageData } from './utils/editorusagedata.js';\n\nimport type { LoadedPlugins, PluginConstructor } from '../plugin.js';\nimport type { EditorConfig } from './editorconfig.js';\n\ndeclare global {\n\tvar CKEDITOR_GLOBAL_LICENSE_KEY: string | undefined;\n\tvar CKEDITOR_WARNING_SUPPRESSIONS: Record<string, boolean>;\n}\n\nconst EditorBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * The class representing a basic, generic editor.\n *\n * Check out the list of its subclasses to learn about specific editor implementations.\n *\n * All editor implementations (like {@link module:editor-classic/classiceditor~ClassicEditor} or\n * {@link module:editor-inline/inlineeditor~InlineEditor}) should extend this class. They can add their\n * own methods and properties.\n *\n * When you are implementing a plugin, this editor represents the API\n * which your plugin can expect to get when using its {@link module:core/plugin~Plugin#editor} property.\n *\n * This API should be sufficient in order to implement the \"editing\" part of your feature\n * (schema definition, conversion, commands, keystrokes, etc.).\n * It does not define the editor UI, which is available only if\n * the specific editor implements also the {@link ~Editor#ui} property\n * (as most editor implementations do).\n */\nexport abstract class Editor extends EditorBase {\n\t/**\n\t * A required name of the editor class. The name should reflect the constructor name.\n\t */\n\tpublic static get editorName(): `${ string }Editor` {\n\t\treturn 'Editor';\n\t}\n\n\t/**\n\t * A namespace for the accessibility features of the editor.\n\t */\n\tpublic readonly accessibility: Accessibility;\n\n\t/**\n\t * Commands registered to the editor.\n\t *\n\t * Use the shorthand {@link #execute `editor.execute()`} method to execute commands:\n\t *\n\t * ```ts\n\t * // Execute the bold command:\n\t * editor.execute( 'bold' );\n\t *\n\t * // Check the state of the bold command:\n\t * editor.commands.get( 'bold' ).value;\n\t * ```\n\t */\n\tpublic readonly commands: CommandCollection;\n\n\t/**\n\t * Stores all configurations specific to this editor instance.\n\t *\n\t * ```ts\n\t * editor.config.get( 'image.toolbar' );\n\t * // -> [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ]\n\t * ```\n\t */\n\tpublic readonly config: Config<EditorConfig>;\n\n\t/**\n\t * Conversion manager through which you can register model-to-view and view-to-model converters.\n\t *\n\t * See the {@link module:engine/conversion/conversion~Conversion} documentation to learn how to add converters.\n\t */\n\tpublic readonly conversion: Conversion;\n\n\t/**\n\t * The {@link module:engine/controller/datacontroller~DataController data controller}.\n\t * Used e.g. for setting and retrieving the editor data.\n\t */\n\tpublic readonly data: DataController;\n\n\t/**\n\t * The {@link module:engine/controller/editingcontroller~EditingController editing controller}.\n\t * Controls user input and rendering the content for editing.\n\t */\n\tpublic readonly editing: EditingController;\n\n\t/**\n\t * The locale instance.\n\t */\n\tpublic readonly locale: Locale;\n\n\t/**\n\t * The editor's model.\n\t *\n\t * The central point of the editor's abstract data model.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * The plugins loaded and in use by this editor instance.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'ClipboardPipeline' ); // -> An instance of the clipboard pipeline plugin.\n\t * ```\n\t */\n\tpublic readonly plugins: PluginCollection<Editor>;\n\n\t/**\n\t * An instance of the {@link module:core/editingkeystrokehandler~EditingKeystrokeHandler}.\n\t *\n\t * It allows setting simple keystrokes:\n\t *\n\t * ```ts\n\t * // Execute the bold command on Ctrl+E:\n\t * editor.keystrokes.set( 'Ctrl+E', 'bold' );\n\t *\n\t * // Execute your own callback:\n\t * editor.keystrokes.set( 'Ctrl+E', ( data, cancel ) => {\n\t * \tconsole.log( data.keyCode );\n\t *\n\t * \t// Prevent the default (native) action and stop the underlying keydown event\n\t * \t// so no other editor feature will interfere.\n\t * \tcancel();\n\t * } );\n\t * ```\n\t *\n\t * Note: Certain typing-oriented keystrokes (like <kbd>Backspace</kbd> or <kbd>Enter</kbd>) are handled\n\t * by a low-level mechanism and trying to listen to them via the keystroke handler will not work reliably.\n\t * To handle these specific keystrokes, see the events fired by the\n\t * {@link module:engine/view/document~ViewDocument editing view document} (`editor.editing.view.document`).\n\t */\n\tpublic readonly keystrokes: EditingKeystrokeHandler;\n\n\t/**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t *\n\t * @see module:utils/locale~Locale#t\n\t */\n\tpublic readonly t: LocaleTranslate;\n\n\tpublic declare readonly id: string;\n\n\t/**\n\t * Indicates the editor life-cycle state.\n\t *\n\t * The editor is in one of the following states:\n\t *\n\t * * `initializing` &ndash; During the editor initialization (before\n\t * {@link module:core/editor/editor~Editor.create `Editor.create()`}) finished its job.\n\t * * `ready` &ndash; After the promise returned by the {@link module:core/editor/editor~Editor.create `Editor.create()`}\n\t * method is resolved.\n\t * * `destroyed` &ndash; Once the {@link #destroy `editor.destroy()`} method was called.\n\t *\n\t * @observable\n\t */\n\tpublic declare state: 'initializing' | 'ready' | 'destroyed';\n\n\t/**\n\t * The default configuration which is built into the editor class.\n\t *\n\t * It was used in the now deprecated CKEditor 5 builds to provide the default configuration options\n\t * which are later used during the editor initialization.\n\t *\n\t * ```ts\n\t * ClassicEditor.defaultConfig = {\n\t * \tfoo: 1,\n\t * \tbar: 2\n\t * };\n\t *\n\t * ClassicEditor\n\t * \t.create( sourceElement )\n\t * \t.then( editor => {\n\t * \t\teditor.config.get( 'foo' ); // -> 1\n\t * \t\teditor.config.get( 'bar' ); // -> 2\n\t * \t} );\n\t *\n\t * // The default options can be overridden by the configuration passed to create().\n\t * ClassicEditor\n\t * \t.create( { bar: 3 } )\n\t * \t.then( editor => {\n\t * \t\teditor.config.get( 'foo' ); // -> 1\n\t * \t\teditor.config.get( 'bar' ); // -> 3\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/editor/editor~Editor.builtinPlugins}.\n\t */\n\tpublic static defaultConfig?: EditorConfig;\n\n\t/**\n\t * An array of plugins built into this editor class.\n\t *\n\t * It is used in the now deprecated CKEditor 5 builds to provide a list of plugins which are later automatically initialized\n\t * during the editor initialization.\n\t *\n\t * They will be automatically initialized by the editor, unless listed in `config.removePlugins` and\n\t * unless `config.plugins` is passed.\n\t *\n\t * ```ts\n\t * // Build some plugins into the editor class first.\n\t * ClassicEditor.builtinPlugins = [ FooPlugin, BarPlugin ];\n\t *\n\t * // Normally, you need to define config.plugins, but since ClassicEditor.builtinPlugins was\n\t * // defined, now you can call create() without any configuration.\n\t * ClassicEditor\n\t * \t.create( sourceElement )\n\t * \t.then( editor => {\n\t * \t\teditor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t * \t\teditor.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t * \t} );\n\t *\n\t * ClassicEditor\n\t * \t.create( {\n\t * \t\t// Do not initialize these plugins (note: it is defined by a string):\n\t * \t\tremovePlugins: [ 'Foo' ]\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\teditor.plugins.get( FooPlugin ); // -> Undefined.\n\t * \t\teditor.config.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t * \t} );\n\t *\n\t * ClassicEditor\n\t * \t.create( {\n\t * \t\t// Load only this plugin. It can also be defined by a string if\n\t * \t\t// this plugin was built into the editor class.\n\t * \t\tplugins: [ FooPlugin ]\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\teditor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t * \t\teditor.config.get( BarPlugin ); // -> Undefined.\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/editor/editor~Editor.defaultConfig}.\n\t */\n\tpublic static builtinPlugins?: Array<PluginConstructor<Editor>>;\n\n\t/**\n\t * The editor UI instance.\n\t */\n\tpublic abstract get ui(): EditorUI;\n\n\t/**\n\t * The editor context.\n\t * When it is not provided through the configuration, the editor creates it.\n\t */\n\tprotected readonly _context: Context;\n\n\t/**\n\t * A set of lock IDs for the {@link #isReadOnly} getter.\n\t */\n\tprotected readonly _readOnlyLocks: Set<symbol | string>;\n\n\t/**\n\t * Holds attributes keys that were passed in\n\t * {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots.<rootName>.modelAttributes`}\n\t *  or {@link module:core/editor/editorconfig~EditorConfig#root `config.root.modelAttributes`}.\n\t */\n\tprotected readonly _registeredRootsAttributesKeys: Set<string> = new Set<string>();\n\n\t/**\n\t * `Editor` class is commonly put in `config.plugins` array.\n\t *\n\t * This property helps with better error detection.\n\t *\n\t * @internal\n\t */\n\tpublic static get _throwErrorWhenUsedAsAPlugin(): true {\n\t\treturn true;\n\t};\n\n\t/**\n\t * Creates a new instance of the editor class.\n\t *\n\t * Usually, not to be used directly. See the static {@link module:core/editor/editor~Editor.create `create()`} method.\n\t *\n\t * @param config The editor configuration.\n\t */\n\tconstructor( config: EditorConfig = {} ) {\n\t\tsuper();\n\n\t\tif ( typeof config !== 'object' || Array.isArray( config ) ) {\n\t\t\t/**\n\t\t\t * Editor configuration must be an object.\n\t\t\t *\n\t\t\t * A common cause of this error is passing an Editor class (for example\n\t\t\t * `ClassicEditor`) in the `config.plugins` array. In such case, the editor\n\t\t\t * constructor is called with an Editor or Context instance instead of\n\t\t\t * the configuration object.\n\t\t\t *\n\t\t\t * @error editor-config-invalid-type\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-config-invalid-type' );\n\t\t}\n\n\t\tif ( 'sanitizeHtml' in config ) {\n\t\t\t/**\n\t\t\t * Configuration property `config.sanitizeHtml` was removed in CKEditor version 43.1.0 and is no longer supported.\n\t\t\t *\n\t\t\t * Please use `config.htmlEmbed.sanitizeHtml` and/or `config.mergeFields.sanitizeHtml` instead.\n\t\t\t *\n\t\t\t * @error editor-config-sanitizehtml-not-supported\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-config-sanitizehtml-not-supported' );\n\t\t}\n\n\t\tconst constructor = this.constructor as typeof Editor;\n\n\t\t// We don't pass translations to the config, because its behavior of splitting keys\n\t\t// with dots (e.g. `resize.width` => `resize: { width }`) breaks the translations.\n\t\tconst { translations: defaultTranslations, ...defaultConfig } = constructor.defaultConfig || {};\n\t\tconst { translations = defaultTranslations, ...rest } = config;\n\n\t\t// Prefer the language passed as the argument to the constructor instead of the constructor's `defaultConfig`, if both are set.\n\t\tconst language = config.language || defaultConfig.language;\n\n\t\tthis._context = config.context || new Context( { language, translations } );\n\t\tthis._context._addEditor( this, !config.context );\n\n\t\t// Clone the plugins to make sure that the plugin array will not be shared\n\t\t// between editors and make the watchdog feature work correctly.\n\t\tconst availablePlugins = Array.from( constructor.builtinPlugins || [] );\n\n\t\tthis.config = new Config<EditorConfig>( rest, defaultConfig );\n\t\tthis.config.define( 'plugins', availablePlugins );\n\t\tthis.config.define( this._context._getEditorConfig() );\n\n\t\tcheckLicenseKeyIsDefined( this.config );\n\n\t\tthis.plugins = new PluginCollection<Editor>( this, availablePlugins, this._context.plugins );\n\n\t\tthis.locale = this._context.locale;\n\t\tthis.t = this.locale.t;\n\n\t\tthis._readOnlyLocks = new Set();\n\n\t\tthis.commands = new CommandCollection();\n\n\t\tthis.set( 'state', 'initializing' );\n\t\tthis.once<EditorReadyEvent>( 'ready', () => ( this.state = 'ready' ), { priority: 'high' } );\n\t\tthis.once<EditorDestroyEvent>( 'destroy', () => ( this.state = 'destroyed' ), { priority: 'high' } );\n\n\t\tthis.model = new Model( this.config );\n\n\t\tthis.on( 'change:isReadOnly', () => {\n\t\t\tthis.model.document.isReadOnly = this.isReadOnly;\n\t\t} );\n\n\t\tconst stylesProcessor = new StylesProcessor();\n\n\t\tthis.data = new DataController( this.model, stylesProcessor );\n\n\t\tthis.editing = new EditingController( this.model, stylesProcessor );\n\t\tthis.editing.view.document.bind( 'isReadOnly' ).to( this );\n\n\t\tthis.conversion = new Conversion( [ this.editing.downcastDispatcher, this.data.downcastDispatcher ], this.data.upcastDispatcher );\n\t\tthis.conversion.addAlias( 'dataDowncast', this.data.downcastDispatcher );\n\t\tthis.conversion.addAlias( 'editingDowncast', this.editing.downcastDispatcher );\n\n\t\tthis.keystrokes = new EditingKeystrokeHandler( this );\n\t\tthis.keystrokes.listenTo( this.editing.view.document );\n\n\t\tthis.accessibility = new Accessibility( this );\n\n\t\tverifyLicenseKey( this );\n\n\t\t// Checks if the license key is defined and throws an error if it is not.\n\t\tfunction checkLicenseKeyIsDefined( config: Config<EditorConfig> ) {\n\t\t\tlet licenseKey = config.get( 'licenseKey' );\n\n\t\t\tif ( !licenseKey && window.CKEDITOR_GLOBAL_LICENSE_KEY ) {\n\t\t\t\tlicenseKey = window.CKEDITOR_GLOBAL_LICENSE_KEY;\n\t\t\t\tconfig.set( 'licenseKey', licenseKey );\n\t\t\t}\n\n\t\t\tif ( !licenseKey ) {\n\t\t\t\t/**\n\t\t\t\t * The `licenseKey` property is missing in the editor configuration.\n\t\t\t\t *\n\t\t\t\t * * If you are using the editor in a commercial setup, please provide your license key.\n\t\t\t\t * * If you still need to acquire a key, please [contact us](https://ckeditor.com/contact/) or\n\t\t\t\t *   [create a free account with a 14 day premium features trial](https://portal.ckeditor.com/checkout?plan=free).\n\t\t\t\t * * If you are using the editor under a GPL license or another license from our Open Source Initiative,\n\t\t\t\t *   use the 'GPL' license key instead.\n\t\t\t\t *\n\t\t\t\t * ```js\n\t\t\t\t * ClassicEditor.create( {\n\t\t\t\t * \tattachTo: document.querySelector( '#editor' ),\n\t\t\t\t * \tlicenseKey: '<YOUR_LICENSE_KEY>', // Or 'GPL'.\n\t\t\t\t * \t// ... Other configuration options ...\n\t\t\t\t * } ) ;\n\t\t\t\t *\n\t\t\t\t * @error license-key-missing\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-missing' );\n\t\t\t}\n\t\t}\n\n\t\tfunction verifyLicenseKey( editor: Editor ) {\n\t\t\tconst licenseKey = editor.config.get( 'licenseKey' )!;\n\t\t\tconst distributionChannel = ( window as any )[ Symbol.for( 'cke distribution' ) ] || 'sh';\n\n\t\t\tfunction blockEditor( reason: LicenseErrorReason, name?: string ) {\n\t\t\t\teditor.enableReadOnlyMode( Symbol( 'invalidLicense' ) );\n\t\t\t\teditor._showLicenseError( reason, name );\n\t\t\t}\n\n\t\t\tfunction hasAllRequiredFields( licensePayload: Record<string, unknown> ) {\n\t\t\t\tconst requiredFields = [ 'exp', 'jti', 'vc' ];\n\n\t\t\t\treturn requiredFields.every( field => field in licensePayload );\n\t\t\t}\n\n\t\t\tfunction getCrcInputData( licensePayload: Record<string, unknown> ): CRCData {\n\t\t\t\tconst keysToCheck = Object.getOwnPropertyNames( licensePayload ).sort();\n\n\t\t\t\tconst filteredValues = keysToCheck\n\t\t\t\t\t.filter( key => key != 'vc' && licensePayload[ key ] != null )\n\t\t\t\t\t.map( key => licensePayload[ key ] );\n\n\t\t\t\treturn filteredValues as CRCData;\n\t\t\t}\n\n\t\t\tfunction checkLicensedHosts( licensedHosts: Array<string> ): boolean {\n\t\t\t\tconst { hostname } = new URL( window.location.href );\n\n\t\t\t\tif ( licensedHosts.includes( hostname ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tconst segments = hostname.split( '.' );\n\n\t\t\t\treturn licensedHosts\n\t\t\t\t\t// Filter out hosts without wildcards.\n\t\t\t\t\t.filter( host => host.includes( '*' ) )\n\t\t\t\t\t// Split the hosts into segments.\n\t\t\t\t\t.map( host => host.split( '.' ) )\n\t\t\t\t\t// Filter out hosts that have more segments than the current hostname.\n\t\t\t\t\t.filter( host => host.length <= segments.length )\n\t\t\t\t\t// Pad the beginning of the licensed host if it's shorter than the current hostname.\n\t\t\t\t\t.map( host => Array( segments.length - host.length ).fill( host[ 0 ] === '*' ? '*' : '' ).concat( host ) )\n\t\t\t\t\t// Check if some license host matches the hostname.\n\t\t\t\t\t.some( octets => segments.every( ( segment, index ) => octets[ index ] === segment || octets[ index ] === '*' ) );\n\t\t\t}\n\n\t\t\tfunction warnAboutNonProductionLicenseKey( licenseType: string ) {\n\t\t\t\tconst capitalizedLicenseType = licenseType[ 0 ].toUpperCase() + licenseType.slice( 1 );\n\t\t\t\tconst article = licenseType === 'evaluation' ? 'an' : 'a';\n\n\t\t\t\tconsole.info(\n\t\t\t\t\t`%cCKEditor 5 ${ capitalizedLicenseType } License`,\n\t\t\t\t\t'color: #ffffff; background: #743CCD; font-size: 14px; padding: 4px 8px; border-radius: 4px;'\n\t\t\t\t);\n\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`⚠️ You are using ${ article } ${ licenseType } license of CKEditor 5` +\n\t\t\t\t\t`${ licenseType === 'trial' ? ' which is for evaluation purposes only' : '' }. ` +\n\t\t\t\t\t'For production usage, please obtain a production license at https://portal.ckeditor.com/'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( licenseKey == 'GPL' ) {\n\t\t\t\tif ( distributionChannel == 'cloud' ) {\n\t\t\t\t\tblockEditor( 'distributionChannel' );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst licensePayload = decodeLicenseKey( licenseKey );\n\n\t\t\tif ( !licensePayload ) {\n\t\t\t\tblockEditor( 'invalid' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !hasAllRequiredFields( licensePayload ) ) {\n\t\t\t\tblockEditor( 'invalid' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( licensePayload.distributionChannel && !toArray( licensePayload.distributionChannel ).includes( distributionChannel ) ) {\n\t\t\t\tblockEditor( 'distributionChannel' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( crc32( getCrcInputData( licensePayload ) ) != licensePayload.vc.toLowerCase() ) {\n\t\t\t\tblockEditor( 'invalid' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst expirationDate = new Date( licensePayload.exp * 1000 );\n\n\t\t\tif ( expirationDate < releaseDate ) {\n\t\t\t\tblockEditor( 'expired' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst licensedHosts: Array<string> | undefined = licensePayload.licensedHosts;\n\n\t\t\tif ( licensedHosts && licensedHosts.length > 0 && !checkLicensedHosts( licensedHosts ) ) {\n\t\t\t\tblockEditor( 'domainLimit' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( [ 'evaluation', 'trial' ].includes( licensePayload.licenseType ) && licensePayload.exp * 1000 < Date.now() ) {\n\t\t\t\tblockEditor( 'expired' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( [ 'development', 'evaluation', 'trial' ].includes( licensePayload.licenseType ) ) {\n\t\t\t\tconst { licenseType } = licensePayload;\n\n\t\t\t\twindow.CKEDITOR_WARNING_SUPPRESSIONS = window.CKEDITOR_WARNING_SUPPRESSIONS || {};\n\n\t\t\t\tif ( !window.CKEDITOR_WARNING_SUPPRESSIONS[ licenseType ] ) {\n\t\t\t\t\twarnAboutNonProductionLicenseKey( licenseType );\n\n\t\t\t\t\twindow.CKEDITOR_WARNING_SUPPRESSIONS[ licenseType ] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( licensePayload.licenseType === 'evaluation' ) {\n\t\t\t\tconst timerId = setTimeout( () => {\n\t\t\t\t\tblockEditor( 'evaluationLimit' );\n\t\t\t\t}, 600000 );\n\n\t\t\t\teditor.on( 'destroy', () => {\n\t\t\t\t\tclearTimeout( timerId );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( licensePayload.usageEndpoint ) {\n\t\t\t\teditor.once<EditorReadyEvent>( 'ready', () => {\n\t\t\t\t\tconst request = {\n\t\t\t\t\t\trequestId: uid(),\n\t\t\t\t\t\trequestTime: Math.round( Date.now() / 1000 ),\n\t\t\t\t\t\tlicense: licenseKey,\n\t\t\t\t\t\teditor: collectUsageData( editor )\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * This part of the code is not executed in open-source implementations using a GPL key.\n\t\t\t\t\t * It only runs when a specific license key is provided. If you are uncertain whether\n\t\t\t\t\t * this applies to your installation, please contact our support team.\n\t\t\t\t\t */\n\t\t\t\t\teditor._sendUsageRequest( licensePayload.usageEndpoint, request ).then( response => {\n\t\t\t\t\t\tconst { status, message } = response;\n\n\t\t\t\t\t\tif ( message ) {\n\t\t\t\t\t\t\tconsole.warn( message );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( status != 'ok' ) {\n\t\t\t\t\t\t\tblockEditor( 'usageLimit' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}, () => {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Your license key cannot be validated due to a network issue.\n\t\t\t\t\t\t * Please ensure that your setup does not block requests to the validation endpoint.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @error license-key-validation-endpoint-not-reachable\n\t\t\t\t\t\t * @param {string} url The URL that was attempted to be reached for validation.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tlogError( 'license-key-validation-endpoint-not-reachable', { url: licensePayload.usageEndpoint } );\n\t\t\t\t\t} );\n\t\t\t\t}, { priority: 'high' } );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Defines whether the editor is in the read-only mode.\n\t *\n\t * In read-only mode the editor {@link #commands commands} are disabled so it is not possible\n\t * to modify the document by using them. Also, the editable element(s) become non-editable.\n\t *\n\t * In order to make the editor read-only, you need to call the {@link #enableReadOnlyMode} method:\n\t *\n\t * ```ts\n\t * editor.enableReadOnlyMode( 'feature-id' );\n\t * ```\n\t *\n     * Later, to turn off the read-only mode, call {@link #disableReadOnlyMode}:\n\t *\n\t * ```ts\n\t * editor.disableReadOnlyMode( 'feature-id' );\n\t * ```\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tpublic get isReadOnly(): boolean {\n\t\treturn this._readOnlyLocks.size > 0;\n\t}\n\n\tpublic set isReadOnly( value: boolean ) {\n\t\t/**\n\t\t * The {@link module:core/editor/editor~Editor#isReadOnly Editor#isReadOnly} property is read-only since version `34.0.0`\n\t\t * and can be set only using {@link module:core/editor/editor~Editor#enableReadOnlyMode `Editor#enableReadOnlyMode( lockId )`} and\n\t\t * {@link module:core/editor/editor~Editor#disableReadOnlyMode `Editor#disableReadOnlyMode( lockId )`}.\n\t\t *\n\t\t * Usage before version `34.0.0`:\n\t\t *\n\t\t * ```ts\n\t\t * editor.isReadOnly = true;\n\t\t * editor.isReadOnly = false;\n\t\t * ```\n\t\t *\n\t\t * Usage since version `34.0.0`:\n\t\t *\n\t\t * ```ts\n\t\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t\t * editor.disableReadOnlyMode( 'my-feature-id' );\n\t\t * ```\n\t\t *\n\t\t * @error editor-isreadonly-has-no-setter\n\t\t */\n\t\tthrow new CKEditorError( 'editor-isreadonly-has-no-setter' );\n\t}\n\n\t/**\n\t * Turns on the read-only mode in the editor.\n\t *\n\t * Editor can be switched to or out of the read-only mode by many features, under various circumstances. The editor supports locking\n\t * mechanism for the read-only mode. It enables easy control over the read-only mode when many features wants to turn it on or off at\n\t * the same time, without conflicting with each other. It guarantees that you will not make the editor editable accidentally (which\n\t * could lead to errors).\n\t *\n\t * Each read-only mode request is identified by a unique id (also called \"lock\"). If multiple plugins requested to turn on the\n\t * read-only mode, then, the editor will become editable only after all these plugins turn the read-only mode off (using the same ids).\n\t *\n\t * Note, that you cannot force the editor to disable the read-only mode if other plugins set it.\n\t *\n\t * After the first `enableReadOnlyMode()` call, the {@link #isReadOnly `isReadOnly` property} will be set to `true`:\n\t *\n\t * ```ts\n\t * editor.isReadOnly; // `false`.\n\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t * editor.isReadOnly; // `true`.\n\t * ```\n\t *\n\t * You can turn off the read-only mode (\"clear the lock\") using the {@link #disableReadOnlyMode `disableReadOnlyMode()`} method:\n\t *\n\t * ```ts\n\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t * // ...\n\t * editor.disableReadOnlyMode( 'my-feature-id' );\n\t * editor.isReadOnly; // `false`.\n\t * ```\n\t *\n\t * All \"locks\" need to be removed to enable editing:\n\t *\n\t * ```ts\n\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t * editor.enableReadOnlyMode( 'my-other-feature-id' );\n\t * // ...\n\t * editor.disableReadOnlyMode( 'my-feature-id' );\n\t * editor.isReadOnly; // `true`.\n\t * editor.disableReadOnlyMode( 'my-other-feature-id' );\n\t * editor.isReadOnly; // `false`.\n\t * ```\n\t *\n\t * @param lockId A unique ID for setting the editor to the read-only state.\n\t */\n\tpublic enableReadOnlyMode( lockId: string | symbol ): void {\n\t\tif ( typeof lockId !== 'string' && typeof lockId !== 'symbol' ) {\n\t\t\t/**\n\t\t\t * The lock ID is missing or it is not a string or symbol.\n\t\t\t *\n\t\t\t * @error editor-read-only-lock-id-invalid\n\t\t\t * @param {never} lockId Lock ID.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-read-only-lock-id-invalid', null, { lockId } );\n\t\t}\n\n\t\tif ( this._readOnlyLocks.has( lockId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._readOnlyLocks.add( lockId );\n\n\t\tif ( this._readOnlyLocks.size === 1 ) {\n\t\t\t// Manually fire the `change:isReadOnly` event as only getter is provided.\n\t\t\tthis.fire<ObservableChangeEvent<boolean>>( 'change:isReadOnly', 'isReadOnly', true, false );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the read-only lock from the editor with given lock ID.\n\t *\n\t * When no lock is present on the editor anymore, then the {@link #isReadOnly `isReadOnly` property} will be set to `false`.\n\t *\n\t * @param lockId The lock ID for setting the editor to the read-only state.\n\t */\n\tpublic disableReadOnlyMode( lockId: string | symbol ): void {\n\t\tif ( typeof lockId !== 'string' && typeof lockId !== 'symbol' ) {\n\t\t\tthrow new CKEditorError( 'editor-read-only-lock-id-invalid', null, { lockId } );\n\t\t}\n\n\t\tif ( !this._readOnlyLocks.has( lockId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._readOnlyLocks.delete( lockId );\n\n\t\tif ( this._readOnlyLocks.size === 0 ) {\n\t\t\t// Manually fire the `change:isReadOnly` event as only getter is provided.\n\t\t\tthis.fire<ObservableChangeEvent<boolean>>( 'change:isReadOnly', 'isReadOnly', false, true );\n\t\t}\n\t}\n\n\t/**\n\t * Sets the data in the editor.\n\t *\n\t * ```ts\n\t * editor.setData( '<p>This is editor!</p>' );\n\t * ```\n\t *\n\t * If your editor implementation uses multiple roots, you should pass an object with keys corresponding\n\t * to the editor root names and values equal to the data that should be set in each root:\n\t *\n\t * ```ts\n\t * editor.setData( {\n\t *     header: '<p>Content for header part.</p>',\n\t *     content: '<p>Content for main part.</p>',\n\t *     footer: '<p>Content for footer part.</p>'\n\t * } );\n\t * ```\n\t *\n\t * By default the editor accepts HTML. This can be controlled by injecting a different data processor.\n\t * See the {@glink features/markdown Markdown output} guide for more details.\n\t *\n\t * @param data Input data.\n\t */\n\tpublic setData( data: string | Record<string, string> ): void {\n\t\tthis.data.set( data );\n\t}\n\n\t/**\n\t * Gets the data from the editor.\n\t *\n\t * ```ts\n\t * editor.getData(); // -> '<p>This is editor!</p>'\n\t * ```\n\t *\n\t * If your editor implementation uses multiple roots, you should pass root name as one of the options:\n\t *\n\t * ```ts\n\t * editor.getData( { rootName: 'header' } ); // -> '<p>Content for header part.</p>'\n\t * ```\n\t *\n\t * By default, the editor outputs HTML. This can be controlled by injecting a different data processor.\n\t * See the {@glink features/markdown Markdown output} guide for more details.\n\t *\n\t * A warning is logged when you try to retrieve data for a detached root, as most probably this is a mistake. A detached root should\n\t * be treated like it is removed, and you should not save its data. Note, that the detached root data is always an empty string.\n\t *\n\t * @param options Additional configuration for the retrieved data.\n\t * Editor features may introduce more configuration options that can be set through this parameter.\n\t * @param options.rootName Root name. Defaults to `'main'`.\n\t * @param options.trim Whether returned data should be trimmed. This option is set to `'empty'` by default,\n\t * which means that whenever editor content is considered empty, an empty string is returned. To turn off trimming\n\t * use `'none'`. In such cases exact content will be returned (for example `'<p>&nbsp;</p>'` for an empty editor).\n\t * @returns Output data.\n\t */\n\tpublic getData( options?: {\n\t\trootName?: string;\n\t\ttrim?: 'empty' | 'none';\n\t\t[ key: string ]: unknown;\n\t} ): string {\n\t\treturn this.data.get( options );\n\t}\n\n\t/**\n\t * Loads and initializes plugins specified in the configuration.\n\t *\n\t * @returns A promise which resolves once the initialization is completed, providing an array of loaded plugins.\n\t */\n\tpublic async initPlugins(): Promise<LoadedPlugins> {\n\t\tconst config = this.config;\n\t\tconst plugins = config.get( 'plugins' )!;\n\t\tconst removePlugins = config.get( 'removePlugins' ) || [];\n\t\tconst extraPlugins = config.get( 'extraPlugins' ) || [];\n\t\tconst substitutePlugins = config.get( 'substitutePlugins' ) || [];\n\n\t\tconst loadedPlugins = await this.plugins.init( plugins.concat( extraPlugins ), removePlugins, substitutePlugins );\n\n\t\tcheckPluginsAllowedByLicenseKey( this );\n\n\t\treturn loadedPlugins;\n\n\t\tfunction checkPluginsAllowedByLicenseKey( editor: Editor ): void {\n\t\t\tconst licenseKey = editor.config.get( 'licenseKey' )!;\n\n\t\t\tif ( licenseKey === 'GPL' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst decodedPayload = decodeLicenseKey( licenseKey );\n\n\t\t\tif ( !decodedPayload ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst disallowedPlugin = [ ...editor.plugins ]\n\t\t\t\t.map( ( [ pluginConstructor ] ) => pluginConstructor )\n\t\t\t\t.find( pluginConstructor => {\n\t\t\t\t\tif ( !pluginConstructor.pluginName ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !pluginConstructor.licenseFeatureCode ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn isFeatureBlockedByLicenseKey( decodedPayload, pluginConstructor.licenseFeatureCode );\n\t\t\t\t} );\n\n\t\t\tif ( disallowedPlugin ) {\n\t\t\t\teditor.enableReadOnlyMode( Symbol( 'invalidLicense' ) );\n\t\t\t\teditor._showLicenseError( 'pluginNotAllowed', disallowedPlugin.pluginName );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * **Note** The editor cannot be destroyed during the initialization phase so if it is called\n\t * while the editor {@link #state is being initialized}, it will wait for the editor initialization before destroying it.\n\t *\n\t * @fires destroy\n\t * @returns A promise that resolves once the editor instance is fully destroyed.\n\t */\n\tpublic async destroy(): Promise<unknown> {\n\t\tif ( this.state == 'initializing' ) {\n\t\t\tawait new Promise( resolve => this.once<EditorReadyEvent>( 'ready', resolve ) );\n\t\t}\n\n\t\tthis.fire<EditorDestroyEvent>( 'destroy' );\n\t\tthis.stopListening();\n\t\tthis.commands.destroy();\n\n\t\tawait this.plugins.destroy();\n\n\t\tthis.model.destroy();\n\t\tthis.data.destroy();\n\t\tthis.editing.destroy();\n\t\tthis.keystrokes.destroy();\n\n\t\t// Remove the editor from the context.\n\t\t// When the context was created by this editor, the context will be destroyed.\n\t\tawait this._context._removeEditor( this );\n\n\t\t// To satisfy the return type and to keep it backward compatible.\n\t\t// eslint-disable-next-line no-useless-return\n\t\treturn;\n\t}\n\n\t/**\n\t * Executes the specified command with given parameters.\n\t *\n\t * Shorthand for:\n\t *\n\t * ```ts\n\t * editor.commands.get( commandName ).execute( ... );\n\t * ```\n\t *\n\t * @param commandName The name of the command to execute.\n\t * @param commandParams Command parameters.\n\t * @returns The value returned by the {@link module:core/commandcollection~CommandCollection#execute `commands.execute()`}.\n\t */\n\tpublic execute<TName extends string>(\n\t\tcommandName: TName,\n\t\t...commandParams: Parameters<CommandsMap[ TName ][ 'execute' ]>\n\t): ReturnType<CommandsMap[ TName ][ 'execute' ]> {\n\t\ttry {\n\t\t\treturn this.commands.execute( commandName, ...commandParams );\n\t\t} catch ( err: any ) {\n\t\t\t// @if CK_DEBUG // throw err;\n\t\t\t/* v8 ignore next -- @preserve */\n\t\t\tCKEditorError.rethrowUnexpectedError( err, this );\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the editor.\n\t *\n\t * **Note** To explicitly focus the editing area of the editor, use the\n\t * {@link module:engine/view/view~EditingView#focus `editor.editing.view.focus()`} method of the editing view.\n\t *\n\t * Check out the {@glink framework/deep-dive/ui/focus-tracking#focus-in-the-editor-ui Focus in the editor UI} section\n\t * of the {@glink framework/deep-dive/ui/focus-tracking Deep dive into focus tracking} guide to learn more.\n\t */\n\tpublic focus(): void {\n\t\tthis.editing.view.focus();\n\t}\n\n\t/**\n\t * Registers a given string as a root attribute key. Registered root attributes are added to\n\t * the {@link module:engine/model/schema~ModelSchema schema}.\n\t *\n\t * **Note:** Attributes passed in the configuration for multi-root editors\n\t * ({@link module:core/editor/editorconfig~EditorConfig#roots `config.roots.<rootName>.modelAttributes`}) or\n\t * single-root editors ({@link module:core/editor/editorconfig~EditorConfig#root `config.root.modelAttributes`})\n\t * are automatically registered when the editor is initialized. However, registering the same attribute twice\n\t * does not have any negative impact, so it is recommended to use this method in any feature that uses\n\t * root attributes.\n\t *\n\t * **Note:** Registered attributes are attached only to the generic `$root` schema element. A custom root\n\t * {@link module:core/editor/editorconfig~RootConfig#modelElement `modelElement`} must opt into the `$root`\n\t * attribute chain via `allowAttributesOf: '$root'` to inherit these attributes.\n\t * See the {@glink framework/deep-dive/schema#custom-root-elements Custom root elements} section of the\n\t * {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */\n\tpublic registerRootAttribute( key: string ): void {\n\t\tif ( this._registeredRootsAttributesKeys.has( key ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._registeredRootsAttributesKeys.add( key );\n\t\tthis.editing.model.schema.extend( '$root', { allowAttributes: key } );\n\t}\n\n\t/**\n\t * Returns attributes for the specified root.\n\t * If no root name is provided, it returns attributes for the 'main' root by default.\n\t *\n\t * Note: all and only {@link ~Editor#registerRootAttribute registered} roots attributes will be returned.\n\t * If a registered root attribute is not set for a given root, `null` will be returned.\n\t */\n\tpublic getRootAttributes( rootName: string = 'main' ): EditorRootAttributes {\n\t\tconst root = this.model.document.getRoot( rootName );\n\n\t\tif ( !root ) {\n\t\t\t/**\n\t\t\t * The requested root does not exist. Please ensure that the provided root name\n\t\t\t * is correct and that the root has been properly initialized in the document.\n\t\t\t *\n\t\t\t * @error get-root-attributes-missing-root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'get-root-attributes-missing-root', this, { rootName } );\n\t\t}\n\n\t\tconst rootAttributes: EditorRootAttributes = {};\n\n\t\tfor ( const key of this._registeredRootsAttributesKeys ) {\n\t\t\trootAttributes[ key ] = root.hasAttribute( key ) ? root.getAttribute( key ) : null;\n\t\t}\n\n\t\treturn rootAttributes;\n\t}\n\n\t/**\n\t * Creates and initializes a new editor instance.\n\t *\n\t * This is an abstract method. Every editor type needs to implement its own initialization logic.\n\t *\n\t * See the `create()` methods of the existing editor types to learn how to use them:\n\t *\n\t * * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}\n\t * * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}\n\t * * {@link module:editor-decoupled/decouplededitor~DecoupledEditor.create `DecoupledEditor.create()`}\n\t * * {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`}\n\t */\n\tpublic static create( ...args: Array<unknown> ): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n\t\tthrow new Error( 'This is an abstract method.' );\n\t}\n\n\t/**\n\t * The {@link module:core/context~Context} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static Context: typeof Context = Context;\n\n\t/**\n\t * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static EditorWatchdog: typeof EditorWatchdog = EditorWatchdog;\n\n\t/**\n\t * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */\n\tpublic static ContextWatchdog: typeof ContextWatchdog = ContextWatchdog;\n\n\tprotected _showLicenseError( reason: LicenseErrorReason, name?: string ): void {\n\t\tsetTimeout( () => {\n\t\t\tif ( reason == 'invalid' ) {\n\t\t\t\t/**\n\t\t\t\t * The license key provided is invalid. Please ensure that it is copied correctly\n\t\t\t\t * from the [Customer Portal](http://portal.ckeditor.com). If the issue persists,\n\t\t\t\t * please [contact our customer support](https://ckeditor.com/contact/).\n\t\t\t\t *\n\t\t\t\t * @error invalid-license-key\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'invalid-license-key' );\n\t\t\t}\n\n\t\t\tif ( reason == 'expired' ) {\n\t\t\t\t/**\n\t\t\t\t * Your license key has expired.\n\t\t\t\t *\n\t\t\t\t * If you used our free trial, you either need to switch to\n\t\t\t\t * [open-source license](https://ckeditor.com/docs/ckeditor5/latest/getting-started/licensing/license-and-legal.html), or\n\t\t\t\t * in case of a commercial plan, change the trial key to production key or development key.\n\t\t\t\t * Switching from trial, you also need to align the editor configuration to the features available in your plan.\n\t\t\t\t *\n\t\t\t\t * If you already had one of our Cloud or Custom plans, please renew your license in the\n\t\t\t\t * [Customer Portal](https://portal.ckeditor.com).\n\t\t\t\t *\n\t\t\t\t * @error license-key-expired\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-expired' );\n\t\t\t}\n\n\t\t\tif ( reason == 'domainLimit' ) {\n\t\t\t\t/**\n\t\t\t\t * The provided license does not allow the editor to run on this domain.\n\t\t\t\t * Some license keys are restricted to local test environments only.\n\t\t\t\t * For more details, please refer to the\n\t\t\t\t * {@glink getting-started/licensing/license-key-and-activation#license-key-types license key type documentation}.\n\t\t\t\t *\n\t\t\t\t * @error license-key-domain-limit\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-domain-limit' );\n\t\t\t}\n\n\t\t\tif ( reason == 'pluginNotAllowed' ) {\n\t\t\t\t// It's safe to assume `name` exists because `pluginNotAllowed` must know a plugin name when checking the license.\n\t\t\t\tconst gluePluginName = name!.replace( /(Editing|UI)$/, '' );\n\t\t\t\tconst containsGluePlugin = this.plugins.has( gluePluginName );\n\n\t\t\t\t/**\n\t\t\t\t * The plugin you are trying to use is not permitted under your current license.\n\t\t\t\t * Please check the available features on the\n\t\t\t\t * [Customer Portal](https://portal.ckeditor.com) or\n\t\t\t\t * [contact support](https://ckeditor.com/contact/) for more information.\n\t\t\t\t *\n\t\t\t\t * @error license-key-plugin-not-allowed\n\t\t\t\t * @param {String} pluginName The plugin you tried to load.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-plugin-not-allowed', null, {\n\t\t\t\t\tpluginName: containsGluePlugin ? gluePluginName : name\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( reason == 'featureNotAllowed' ) {\n\t\t\t\t/**\n\t\t\t\t * The feature you are trying to use is not permitted under your current license.\n\t\t\t\t * Please check the available features on the\n\t\t\t\t * [Customer Portal](https://portal.ckeditor.com) or\n\t\t\t\t * [contact support](https://ckeditor.com/contact/) for more information.\n\t\t\t\t *\n\t\t\t\t * @error license-key-feature-not-allowed\n\t\t\t\t * @param {String} featureName The feature you tried to use.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-feature-not-allowed', null, { featureName: name } );\n\t\t\t}\n\n\t\t\tif ( reason == 'evaluationLimit' ) {\n\t\t\t\t/**\n\t\t\t\t * You have exceeded the editor operation limit available for your evaluation license key.\n\t\t\t\t * Please restart the editor to continue using it.\n\t\t\t\t * {@glink getting-started/licensing/license-key-and-activation#license-key-types Read more about license key types}.\n\t\t\t\t *\n\t\t\t\t * @error license-key-evaluation-limit\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-evaluation-limit' );\n\t\t\t}\n\n\t\t\tif ( reason == 'trialLimit' ) {\n\t\t\t\t/**\n\t\t\t\t * You have exceeded the editor operation limit for your trial license key.\n\t\t\t\t * Please restart the editor to continue using it.\n\t\t\t\t * {@glink getting-started/licensing/license-key-and-activation#license-key-types Read more about license key types}.\n\t\t\t\t *\n\t\t\t\t * @error license-key-trial-limit\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-trial-limit' );\n\t\t\t}\n\n\t\t\tif ( reason == 'developmentLimit' ) {\n\t\t\t\t/**\n\t\t\t\t * You have exceeded the operation limit for your development license key within the editor.\n\t\t\t\t * Please restart the editor to continue using it.\n\t\t\t\t * {@glink getting-started/licensing/license-key-and-activation#license-key-types Read more about license key types}.\n\t\t\t\t *\n\t\t\t\t * @error license-key-development-limit\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-development-limit' );\n\t\t\t}\n\n\t\t\tif ( reason == 'usageLimit' ) {\n\t\t\t\t/**\n\t\t\t\t * You have reached the usage limit of your license key. This can occur in the following situations:\n\t\t\t\t *\n\t\t\t\t * * You are on a free subscription without a connected payment method and have exceeded the allowed usage threshold.\n\t\t\t\t * * Your account has overdue invoices and the grace period has ended.\n\t\t\t\t *\n\t\t\t\t * To extend the limit and restore access, please update the required details in the\n\t\t\t\t * [Customer Portal](https://portal.ckeditor.com) or\n\t\t\t\t * [contact our customer support](https://ckeditor.com/contact).\n\t\t\t\t *\n\t\t\t\t * @error license-key-usage-limit\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-usage-limit' );\n\t\t\t}\n\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( reason == 'distributionChannel' ) {\n\t\t\t\t/**\n\t\t\t\t * Your license does not allow the current distribution channel.\n\t\t\t\t *\n\t\t\t\t * These are the available distribution channels:\n\t\t\t\t * * Self-hosted - the editor is installed via npm or from a ZIP package\n\t\t\t\t * * Cloud - the editor is run from CDN\n\t\t\t\t *\n\t\t\t\t * The licenses available include:\n\t\t\t\t * * GPL license for open-source users.\n\t\t\t\t * * Commercial plans (Cloud or sales-assisted).\n\t\t\t\t *\n\t\t\t\t * The relation between distribution channels and licenses works as follows:\n\t\t\t\t * * With the 'GPL' license key, you may use the editor installed via npm or a ZIP package (self-hosted).\n\t\t\t\t * * With the CKEditor Cloud plans, you may use the editor via our CDN.\n\t\t\t\t * * With the CKEditor Custom plans, depending on your plan details, you can use the editor via npm\n\t\t\t\t *   or a ZIP package (self-hosted) or Cloud (CDN).\n\t\t\t\t *\n\t\t\t\t * {@glink getting-started/licensing/usage-based-billing#key-terms Read more about distributions in the documentation}.\n\t\t\t\t * Please verify your installation or [contact support](https://ckeditor.com/contact/) for assistance.\n\t\t\t\t * Should you need to migrate your installation from npm to CDN, please refer to our\n\t\t\t\t * [dedicated migration guides](https://ckeditor.com/docs/ckeditor5/latest/updating/migrations/vanilla-js.html).\n\t\t\t\t *\n\t\t\t\t * @error license-key-invalid-distribution-channel\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'license-key-invalid-distribution-channel' );\n\t\t\t}\n\n\t\t\t/* v8 ignore next -- @preserve */\n\t\t\tconst unreachable: never = reason; // eslint-disable-line @typescript-eslint/no-unused-vars\n\t\t}, 0 );\n\n\t\tthis._showLicenseError = () => {};\n\t}\n\n\t/**\n\t * This part of the code is _not_ executed in installations under the GPL license (with `config.licenseKey = 'GPL'`).\n\t *\n\t * It is only executed when a specific license key is provided. If you are uncertain whether\n\t * this applies to your installation, please contact our support team.\n\t */\n\tprivate async _sendUsageRequest( endpoint: string, request: unknown ) {\n\t\tconst headers = new Headers( { 'Content-Type': 'application/json' } );\n\t\tconst response = await fetch( new URL( endpoint ), {\n\t\t\tmethod: 'POST',\n\t\t\theaders,\n\t\t\tbody: JSON.stringify( request )\n\t\t} );\n\n\t\tif ( !response.ok ) {\n\t\t\t// TODO: refine message.\n\t\t\tthrow new Error( `HTTP Response: ${ response.status }` );\n\t\t}\n\n\t\treturn response.json();\n\t}\n}\n\nfunction collectUsageData( editor: Editor ): EditorUsageData {\n\tconst collectedData = getEditorUsageData( editor );\n\n\tfunction setUsageData( path: string, value: unknown ) {\n\t\tif ( get( collectedData, path ) !== undefined ) {\n\t\t\t/**\n\t\t\t * The error thrown when trying to set the usage data path that was already set.\n\t\t\t * Make sure that you are not setting the same path multiple times.\n\t\t\t *\n\t\t\t * @error editor-usage-data-path-already-set\n\t\t\t * @param {string} path The path that was already set.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-usage-data-path-already-set', { path } );\n\t\t}\n\n\t\tset( collectedData, path, value );\n\t}\n\n\teditor.fire<EditorCollectUsageDataEvent>( 'collectUsageData', {\n\t\tsetUsageData\n\t} );\n\n\treturn collectedData;\n}\n\n/**\n * @internal\n */\nexport type LicenseErrorReason =\n\t'invalid' |\n\t'expired' |\n\t'domainLimit' |\n\t'pluginNotAllowed' |\n\t'featureNotAllowed' |\n\t'evaluationLimit' |\n\t'trialLimit' |\n\t'developmentLimit' |\n\t'usageLimit' |\n\t'distributionChannel';\n\n/**\n * Fired when the {@link module:engine/controller/datacontroller~DataController#event:ready data} and all additional\n * editor components are ready.\n *\n * Note: This event is most useful for plugin developers. When integrating the editor with your website or\n * application, you do not have to listen to `editor#ready` because when the promise returned by the static\n * {@link module:core/editor/editor~Editor.create `Editor.create()`} event is resolved, the editor is already ready.\n * In fact, since the first moment when the editor instance is available to you is inside `then()`'s callback,\n * you cannot even add a listener to the `editor#ready` event.\n *\n * See also the {@link module:core/editor/editor~Editor#state `editor.state`} property.\n *\n * @eventName ~Editor#ready\n */\nexport type EditorReadyEvent = {\n\tname: 'ready';\n\targs: [];\n};\n\n/**\n * Fired when the editor is about to collect usage data.\n *\n * This event is fired when the editor is about to collect usage data. It allows plugins to provide additional data for\n * the usage statistics. The usage data is collected by the editor and sent to the usage tracking server. All plugins are\n * expected to be ready at this point.\n *\n * @eventName ~Editor#collectUsageData\n */\nexport type EditorCollectUsageDataEvent = {\n\tname: 'collectUsageData';\n\targs: [\n\t\t{\n\t\t\tsetUsageData( path: string, value: unknown ): void;\n\t\t}\n\t];\n};\n\n/**\n * Fired when this editor instance is destroyed. The editor at this point is not usable and this event should be used to\n * perform the clean-up in any plugin.\n *\n * See also the {@link module:core/editor/editor~Editor#state `editor.state`} property.\n *\n * @eventName ~Editor#destroy\n */\nexport type EditorDestroyEvent = {\n\tname: 'destroy';\n\targs: [];\n};\n\n/**\n * Attributes set on a model root element.\n */\nexport type EditorRootAttributes = Record<string, unknown>;\n\n/**\n * This error is thrown when trying to pass a `<textarea>` element to a `create()` function of an editor class.\n *\n * The only editor type which can be initialized on `<textarea>` elements is\n * the {@glink getting-started/setup/editor-types#classic-editor classic editor}.\n * This editor hides the passed element and inserts its own UI next to it. Other types of editors reuse the passed element as their root\n * editable element and therefore `<textarea>` is not appropriate for them. Use a `<div>` or another text container instead:\n *\n * ```html\n * <div id=\"editor\">\n * \t<p>Initial content.</p>\n * </div>\n * ```\n *\n * @error editor-wrong-element\n */\n\n/**\n * You are running [CKEditor 5 Long-term Support Edition (LTS)](https://ckeditor.com/ckeditor-5-lts/),\n * but the provided license key does not include access to the LTS version, or the key is invalid.\n *\n * Please ensure that it is copied correctly from the [Customer Portal](http://portal.ckeditor.com/),\n * and if the issue persists, please [contact our customer support](https://ckeditor.com/contact/).\n *\n * In case you intended to use the [LTS Edition](https://ckeditor.com/ckeditor-5-lts/),\n * but have not yet made a purchase, please [contact our sales team](https://ckeditor.com/contact-sales/)\n *\n * If you did not intend to use LTS, please note that all releases in the v47.7 line are\n * for LTS subscribers only. To use a non-LTS edition, either upgrade to v48 or newer,\n * which is our standard [latest](https://ckeditor.com/docs/ckeditor5/latest/updating/guides/changelog.html)\n * release line, or stay on a version 47.6.2 or earlier.\n *\n * @error license-key-lts-not-allowed\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/**\n * @module core/editor/utils/attachtoform\n */\n\nimport { isFunction } from 'es-toolkit/compat';\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport type { Editor, EditorDestroyEvent } from '../editor.js';\nimport type { ElementApi } from './elementapimixin.js';\n\n/**\n * Checks if the editor is initialized on a `<textarea>` element that belongs to a form. If yes, it updates the editor's element\n * content before submitting the form.\n *\n * This helper requires the {@link module:core/editor/utils/elementapimixin~ElementApi ElementApi interface}.\n *\n * @param editor Editor instance.\n */\nexport function attachToForm( editor: Editor & ElementApi ): void {\n\tif ( !isFunction( editor.updateSourceElement ) ) {\n\t\t/**\n\t\t * The editor passed to `attachToForm()` must implement the\n\t\t * {@link module:core/editor/utils/elementapimixin~ElementApi} interface.\n\t\t *\n\t\t * @error attachtoform-missing-elementapi-interface\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'attachtoform-missing-elementapi-interface',\n\t\t\teditor\n\t\t);\n\t}\n\n\tconst sourceElement = editor.sourceElement;\n\n\t// Only when replacing a textarea which is inside of a form element.\n\tif ( isTextArea( sourceElement ) && sourceElement.form ) {\n\t\tlet originalSubmit: () => void;\n\t\tconst form = sourceElement.form;\n\t\tconst onSubmit = () => editor.updateSourceElement();\n\n\t\t// Replace the original form#submit() to call a custom submit function first.\n\t\t// Check if #submit is a function because the form might have an input named \"submit\".\n\t\tif ( isFunction( form.submit ) ) {\n\t\t\toriginalSubmit = form.submit;\n\n\t\t\tform.submit = () => {\n\t\t\t\tonSubmit();\n\t\t\t\toriginalSubmit.apply( form );\n\t\t\t};\n\t\t}\n\n\t\t// Update the replaced textarea with data before each form#submit event.\n\t\tform.addEventListener( 'submit', onSubmit );\n\n\t\t// Remove the submit listener and revert the original submit method on\n\t\t// editor#destroy.\n\t\teditor.on<EditorDestroyEvent>( 'destroy', () => {\n\t\t\tform.removeEventListener( 'submit', onSubmit );\n\n\t\t\tif ( originalSubmit ) {\n\t\t\t\tform.submit = originalSubmit;\n\t\t\t}\n\t\t} );\n\t}\n}\n\nfunction isTextArea( sourceElement: HTMLElement | undefined ): sourceElement is HTMLTextAreaElement {\n\treturn !!sourceElement && sourceElement.tagName.toLowerCase() === 'textarea';\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/**\n * @module core/editor/utils/elementapimixin\n */\n\nimport {\n\tCKEditorError,\n\tsetDataInElement,\n\ttype Constructor,\n\ttype Mixed\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type Editor } from '../editor.js';\n\n/**\n * Constructor returned by {@link ~ElementApiMixin}. Use it to name a mixin base class before extending it.\n *\n * ```ts\n * const MyElementApiBase: ElementApiMixinConstructor<typeof BaseClass> = ElementApiMixin( BaseClass );\n *\n * class MyElementApi extends MyElementApiBase {}\n * ```\n */\nexport type ElementApiMixinConstructor<Base extends Constructor<Editor>> = Mixed<Base, ElementApi>;\n\n/**\n * Implementation of the {@link module:core/editor/utils/elementapimixin~ElementApi}.\n */\nexport function ElementApiMixin<Base extends Constructor<Editor>>( base: Base ): ElementApiMixinConstructor<Base> {\n\tabstract class Mixin extends base implements ElementApi {\n\t\tpublic sourceElement: HTMLElement | undefined;\n\n\t\tpublic updateSourceElement( data?: string ): void {\n\t\t\tif ( !this.sourceElement ) {\n\t\t\t\t/**\n\t\t\t\t * Cannot update the source element of a detached editor.\n\t\t\t\t *\n\t\t\t\t * The {@link module:core/editor/utils/elementapimixin~ElementApi#updateSourceElement `updateSourceElement()`}\n\t\t\t\t * method cannot be called if you did not pass an element to `Editor.create()`.\n\t\t\t\t *\n\t\t\t\t * @error editor-missing-sourceelement\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'editor-missing-sourceelement',\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst shouldUpdateSourceElement = this.config.get( 'updateSourceElementOnDestroy' );\n\t\t\tconst isSourceElementTextArea = this.sourceElement instanceof HTMLTextAreaElement;\n\n\t\t\t// The data returned by the editor might be unsafe, so we want to prevent rendering\n\t\t\t// unsafe content inside the source element different than <textarea>, which is considered\n\t\t\t// secure. This behavior could be changed by setting the `updateSourceElementOnDestroy`\n\t\t\t// configuration option to `true`.\n\t\t\tif ( !shouldUpdateSourceElement && !isSourceElementTextArea ) {\n\t\t\t\tsetDataInElement( this.sourceElement, '' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst dataToSet = typeof data === 'string' ? data : this.data.get();\n\n\t\t\tsetDataInElement( this.sourceElement, dataToSet );\n\t\t}\n\t}\n\n\treturn Mixin as any;\n}\n\n/**\n * Interface describing an editor that replaced a DOM element (was \"initialized on an element\").\n *\n * Such an editor should provide a method to\n * {@link module:core/editor/utils/elementapimixin~ElementApi#updateSourceElement update the replaced element with the current data}.\n */\nexport interface ElementApi {\n\n\t/**\n\t * The element on which the editor has been initialized.\n\t *\n\t * @readonly\n\t */\n\tsourceElement: HTMLElement | undefined;\n\n\t/**\n\t * Updates the {@link #sourceElement editor source element}'s content with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t *\n\t * @param data Data that the {@link #sourceElement editor source element} should be updated with.\n\t */\n\tupdateSourceElement( data?: string ): void;\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/**\n * @module core/editor/utils/securesourceelement\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport type { Editor, EditorDestroyEvent } from '../editor.js';\n\n/**\n * Marks the source element on which the editor was initialized. This prevents other editor instances from using this element.\n *\n * Running multiple editor instances on the same source element causes various issues and it is\n * crucial this helper is called as soon as the source element is known to prevent collisions.\n *\n * @param editor Editor instance.\n * @param sourceElement Element to bind with the editor instance.\n */\nexport function secureSourceElement( editor: Editor, sourceElement: HTMLElement & { ckeditorInstance?: Editor } ): void {\n\tif ( sourceElement.ckeditorInstance ) {\n\t\t/**\n\t\t * A DOM element used to create the editor (e.g.\n\t\t * {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`})\n\t\t * has already been used to create another editor instance. Make sure each editor is\n\t\t * created with a unique DOM element.\n\t\t *\n\t\t * @error editor-source-element-already-used\n\t\t * @param {HTMLElement} element DOM element that caused the collision.\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'editor-source-element-already-used',\n\t\t\teditor\n\t\t);\n\t}\n\n\tsourceElement.ckeditorInstance = editor;\n\n\teditor.once<EditorDestroyEvent>( 'destroy', () => {\n\t\tdelete sourceElement.ckeditorInstance;\n\t} );\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/**\n * @module core/editor/utils/registerandinitializerootconfigattributes\n */\n\nimport type { Editor, EditorRootAttributes } from '../editor.js';\n\n// Root config fields persisted as dedicated `$`-prefixed root attributes, so they sync over real-time collaboration.\nconst CONFIG_FIELDS_AS_ROOT_ATTRIBUTES = [\n\t[ 'description', '$description' ],\n\t[ 'title', '$title' ]\n] as const;\n\n/**\n * Registers and initializes root attributes from the editor configuration:\n *\n * * the attributes from\n * {@link module:core/editor/editorconfig~RootConfig#modelAttributes `config.root(s).<rootName>.modelAttributes`}, and\n * * the {@link module:core/editor/editorconfig~RootConfig#description `description`} and\n * {@link module:core/editor/editorconfig~RootConfig#title `title`} fields, stored as the `$description` and `$title`\n * root attributes respectively.\n *\n * @internal\n */\nexport function registerAndInitializeRootConfigAttributes( editor: Editor ): void {\n\tconst rootsConfig = editor.config.get( 'roots' )!;\n\n\t// Copy `description`/`title` config into `modelAttributes` so they ship through the RTC initial-data path (like\n\t// `$rootEditableOptions`). A value already in `modelAttributes` (e.g. restored from saved attributes) wins.\n\tfor ( const [ rootName, rootConfig ] of Object.entries( rootsConfig ) ) {\n\t\tlet modelAttributes: EditorRootAttributes | null = null;\n\n\t\tfor ( const [ configField, attributeKey ] of CONFIG_FIELDS_AS_ROOT_ATTRIBUTES ) {\n\t\t\tif ( rootConfig[ configField ] == null || ( rootConfig.modelAttributes && attributeKey in rootConfig.modelAttributes ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmodelAttributes = modelAttributes || { ...rootConfig.modelAttributes };\n\t\t\tmodelAttributes[ attributeKey ] = rootConfig[ configField ];\n\t\t}\n\n\t\tif ( modelAttributes ) {\n\t\t\teditor.config.set( `roots.${ rootName }.modelAttributes`, modelAttributes );\n\t\t}\n\t}\n\n\t// Re-read the configuration so the loops below pick up the attributes injected above.\n\tconst normalizedRootsConfig = editor.config.get( 'roots' )!;\n\tlet hasRootAttributes = false;\n\n\tfor ( const rootConfig of Object.values( normalizedRootsConfig ) ) {\n\t\tfor ( const key of Object.keys( rootConfig.modelAttributes || {} ) ) {\n\t\t\teditor.registerRootAttribute( key );\n\t\t\thasRootAttributes = true;\n\t\t}\n\t}\n\n\tif ( !hasRootAttributes ) {\n\t\treturn;\n\t}\n\n\teditor.data.once( 'init', () => {\n\t\teditor.model.enqueueChange( { isUndoable: false }, writer => {\n\t\t\tfor ( const [ rootName, rootConfig ] of Object.entries( normalizedRootsConfig ) ) {\n\t\t\t\tconst root = editor.model.document.getRoot( rootName );\n\n\t\t\t\tif ( !root ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor ( const [ key, value ] of Object.entries( rootConfig.modelAttributes || {} ) ) {\n\t\t\t\t\tif ( value !== null ) {\n\t\t\t\t\t\twriter.setAttribute( key, value, root );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\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/**\n * @module core/editor/utils/normalizerootsconfig\n */\n\nimport type {\n\tEditorConfig,\n\tRootConfig,\n\tViewRootElementDefinition\n} from '../editorconfig.js';\n\nimport {\n\tCKEditorError,\n\tgetDataFromElement,\n\tlogWarning,\n\ttoArray,\n\ttype Config\n} from '@ckeditor/ckeditor5-utils';\n\nimport { isElement as _isElement, isPlainObject } from 'es-toolkit/compat';\n\n/**\n * Normalizes the editor roots configuration. It ensures that all root configurations are defined in `config.roots`\n * and that they have `initialData` defined.\n *\n * It normalizes a single-root configuration (where `config.root` is used) to a multi-root configuration\n * (where all roots are defined in `config.roots`). This is considered a standard configuration format,\n * so the editor features can always expect roots to be defined in `config.roots`.\n *\n * It also handles legacy configuration options, such as `config.initialData`, `config.placeholder`, and `config.label`.\n *\n * @internal\n */\nexport function normalizeRootsConfig(\n\tsourceElementsOrData: HTMLElement | string | Record<string, HTMLElement> | Record<string, string>,\n\tconfig: Config<EditorConfig>,\n\tdefaultRootName: string | false = 'main',\n\tseparateAttachTo: boolean = false\n): void {\n\tconst mainRootConfig = config.get( 'root' );\n\tconst rootsConfig: Record<string, RootConfig> = config.get( 'roots' ) || Object.create( null );\n\n\tif ( !isPlainObject( rootsConfig ) ) {\n\t\t/**\n\t\t * The {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots`} option\n\t\t * must be a plain object (an object literal or `Object.create( null )`). Objects with a\n\t\t * custom prototype (e.g. created via `Object.create( someProto )`) or class instances\n\t\t * are not accepted, because internal configuration processing relies on a known\n\t\t * prototype chain to detect nested configuration objects.\n\t\t *\n\t\t * Replace the value with a plain object before passing it to the editor:\n\t\t *\n\t\t * ```ts\n\t\t * // Wrong\n\t\t * MultiRootEditor.create( {\n\t\t *     roots: Object.assign( Object.create( {} ), { intro: { ... } } )\n\t\t * } );\n\t\t *\n\t\t * // Right\n\t\t * MultiRootEditor.create( {\n\t\t *     roots: { intro: { ... } }\n\t\t * } );\n\t\t * ```\n\t\t *\n\t\t * @error editor-create-roots-not-plain-object\n\t\t */\n\t\tthrow new CKEditorError( 'editor-create-roots-not-plain-object', null );\n\t}\n\n\t// Avoid mixing `config.root` and `config.roots.main`.\n\tif ( mainRootConfig ) {\n\t\tif ( !defaultRootName ) {\n\t\t\t/**\n\t\t\t * The {@link module:core/editor/editorconfig~EditorConfig#root `config.root`} option is designed\n\t\t\t * for single-root editors and cannot be used with the\n\t\t\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor multi-root editor}.\n\t\t\t *\n\t\t\t * To configure a multi-root editor, define each root individually using\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots`}:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * MultiRootEditor.create( {\n\t\t\t * \troots: {\n\t\t\t * \t\theader: { initialData: '<p>Header</p>' },\n\t\t\t * \t\tcontent: { initialData: '<p>Content</p>' }\n\t\t\t * \t}\n\t\t\t * } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @error editor-create-multi-root-with-main\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-create-multi-root-with-main', null );\n\t\t}\n\t\telse if ( defaultRootName in rootsConfig ) {\n\t\t\t/**\n\t\t\t * Both {@link module:core/editor/editorconfig~EditorConfig#root `config.root`} and\n\t\t\t * `config.roots.main` are set, but they both configure the same default editing root,\n\t\t\t * which creates an ambiguity. Use one or the other:\n\t\t\t *\n\t\t\t * * {@link module:core/editor/editorconfig~EditorConfig#root `config.root`} for a single-root editor.\n\t\t\t * * {@link module:core/editor/editorconfig~EditorConfig#roots `config.roots`} when defining\n\t\t\t * multiple roots.\n\t\t\t *\n\t\t\t * @error editor-create-roots-with-main\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-create-roots-with-main', null );\n\t\t}\n\t}\n\n\t// Move `config.root` to `config.roots.main`.\n\t// This makes access to root configuration more consistent as all roots will be defined in `config.roots`.\n\tif ( defaultRootName && !rootsConfig[ defaultRootName ] ) {\n\t\trootsConfig[ defaultRootName ] = mainRootConfig || Object.create( null );\n\t}\n\n\tconst sourceElementIsPlainObject = isSourceElementsOrDataRecord( sourceElementsOrData );\n\n\t// Collect legacy configuration values for `initialData`, `placeholder`, and `label` from the config.\n\tconst legacyInitialData = getLegacyInitialData( config, sourceElementIsPlainObject, defaultRootName );\n\n\t// Collect root names. This includes root names from the source element (if it's an object),\n\t// from `config.roots`, and from legacy config. This ensures that all roots are processed in the next step.\n\tconst rootNames = Array.from( new Set( [\n\t\t...sourceElementIsPlainObject ? Object.keys( sourceElementsOrData ) : [],\n\t\t...Object.keys( rootsConfig ),\n\t\t...Object.keys( legacyInitialData )\n\t] ) );\n\n\t// Ensure that all roots have `initialData` defined. If not, try to get it from the source element or data.\n\tfor ( const rootName of rootNames ) {\n\t\tconst rootConfig = rootsConfig[ rootName ] || Object.create( null );\n\t\tconst sourceElementOrDataForRoot = sourceElementIsPlainObject ? sourceElementsOrData[ rootName ] : sourceElementsOrData;\n\n\t\t// Assign `sourceElement` to root config if it's an element.\n\t\tif ( !separateAttachTo && isElement( sourceElementOrDataForRoot ) ) {\n\t\t\tif ( rootConfig.element ) {\n\t\t\t\t/**\n\t\t\t\t * The root element is specified both as the first argument of the editor `create()` method\n\t\t\t\t * (e.g. {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`} or\n\t\t\t\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`})\n\t\t\t\t * and in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t\t\t\t * (or `config.roots.<rootName>.element` for the\n\t\t\t\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor multi-root editor}).\n\t\t\t\t *\n\t\t\t\t * Passing the element as the first argument is deprecated. Remove it and use\n\t\t\t\t * {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t\t\t\t * (or `config.roots.<rootName>.element` for the multi-root editor) instead.\n\t\t\t\t *\n\t\t\t\t * @error editor-create-root-element-overspecified\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'editor-create-root-element-overspecified', null );\n\t\t\t}\n\n\t\t\trootConfig.element = sourceElementOrDataForRoot;\n\t\t}\n\n\t\tif ( separateAttachTo && isElement( rootConfig.element ) ) {\n\t\t\t/**\n\t\t\t * The {@link module:editor-classic/classiceditor~ClassicEditor} cannot use an existing DOM element as\n\t\t\t * {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`} because the classic\n\t\t\t * editor replaces the source element with its own UI rather than editing inline within it. The passed\n\t\t\t * element is ignored along with its content, so any markup inside it will not be used as the editor's\n\t\t\t * initial data. Use {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`}\n\t\t\t * to specify the DOM element the editor should replace, or pass the initial data via\n\t\t\t * {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}.\n\t\t\t *\n\t\t\t * A tag name string (e.g. `'h1'`) or a\n\t\t\t * {@link module:core/editor/editorconfig~ViewRootElementDefinition view root element definition} are still\n\t\t\t * accepted - they describe the editable root element the classic editor creates inside its UI box.\n\t\t\t *\n\t\t\t * @error editor-create-root-element-not-supported\n\t\t\t */\n\t\t\tlogWarning( 'editor-create-root-element-not-supported' );\n\n\t\t\t// Drop the unsupported DOM element so downstream code can read a normalized value without re-checking.\n\t\t\trootConfig.element = undefined;\n\t\t}\n\n\t\t// No dedicated initial data for the root.\n\t\tif ( rootConfig.initialData === undefined ) {\n\t\t\t// No legacy initial data for the root, either.\n\t\t\tif ( legacyInitialData[ rootName ] === undefined ) {\n\t\t\t\t// Use source element data or data itself as a string.\n\t\t\t\t// Fall back to legacy sourceElement, `rootConfig.element` (only when it is an HTMLElement)\n\t\t\t\t// or `config.attachTo` (for ClassicEditor) for data extraction.\n\t\t\t\tconst rootConfigElement = isElement( rootConfig.element ) ? rootConfig.element : undefined;\n\n\t\t\t\trootConfig.initialData = getInitialData(\n\t\t\t\t\tsourceElementOrDataForRoot || rootConfigElement || ( separateAttachTo && config.get( 'attachTo' ) ) || ''\n\t\t\t\t);\n\t\t\t}\n\t\t\t// If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.\n\t\t\telse if ( sourceElementOrDataForRoot && !isElement( sourceElementOrDataForRoot ) ) {\n\t\t\t\t/**\n\t\t\t\t * The initial data is specified both as the first argument of the editor `create()` method\n\t\t\t\t * (e.g. {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`} or\n\t\t\t\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`})\n\t\t\t\t * and in the deprecated {@link module:core/editor/editorconfig~EditorConfig#initialData `config.initialData`}.\n\t\t\t\t *\n\t\t\t\t * Passing initial data as the first argument is deprecated. Remove it and use\n\t\t\t\t * {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t\t\t * (or `config.roots.<rootName>.initialData` for the multi-root editor) instead.\n\t\t\t\t *\n\t\t\t\t * @error editor-create-initial-data-overspecified\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'editor-create-initial-data-overspecified', null );\n\t\t\t}\n\t\t\t// Use legacy `config.initialData`.\n\t\t\telse {\n\t\t\t\trootConfig.initialData = legacyInitialData[ rootName ];\n\t\t\t}\n\t\t}\n\t\t// If both `rootConfig.initialData` is set and initial data is passed as the constructor parameter, then throw.\n\t\telse if ( sourceElementOrDataForRoot && !isElement( sourceElementOrDataForRoot ) ) {\n\t\t\t/**\n\t\t\t * The initial data is specified both as the first argument of the editor `create()` method\n\t\t\t * (e.g. {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`} or\n\t\t\t * {@link module:editor-multi-root/multirooteditor~MultiRootEditor.create `MultiRootEditor.create()`})\n\t\t\t * and in {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t\t * (or `config.roots.<rootName>.initialData` for the multi-root editor).\n\t\t\t *\n\t\t\t * Passing initial data as the first argument is deprecated. Remove it and use\n\t\t\t * {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t\t * (or `config.roots.<rootName>.initialData` for the multi-root editor) instead.\n\t\t\t *\n\t\t\t * @error editor-create-root-initial-data-overspecified\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-create-root-initial-data-overspecified', null );\n\t\t}\n\t\t// If both `rootConfig.initialData` and legacy initial data are set, then throw.\n\t\telse if ( legacyInitialData[ rootName ] !== undefined ) {\n\t\t\t/**\n\t\t\t * The initial data is specified both in\n\t\t\t * {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t\t * (or `config.roots.<rootName>.initialData` for the multi-root editor) and in the deprecated\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#initialData `config.initialData`}.\n\t\t\t *\n\t\t\t * The `config.initialData` option is deprecated. Remove it and use\n\t\t\t * {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}\n\t\t\t * (or `config.roots.<rootName>.initialData` for the multi-root editor) instead.\n\t\t\t *\n\t\t\t * @error editor-create-legacy-initial-data-overspecified\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-create-legacy-initial-data-overspecified', null );\n\t\t}\n\n\t\t// Handle legacy `config.placeholder` and `config.label` for the root.\n\t\trootConfig.placeholder ??= getLegacyPlainConfigValue( config, 'placeholder', rootName );\n\t\trootConfig.label ??= getLegacyPlainConfigValue( config, 'label', rootName );\n\n\t\t// Default model element to `$root` so all callers can rely on `rootConfig.modelElement` being a string.\n\t\trootConfig.modelElement ||= '$root';\n\n\t\t// Reshape `rootConfig.element` into a canonical form (`HTMLElement` or `ViewRootElementDefinition`)\n\t\t// so downstream code can read it directly without re-running the string / flat-notation normalization.\n\t\trootConfig.element = normalizeViewRootElementDefinition( rootConfig.element );\n\n\t\trootsConfig[ rootName ] = rootConfig;\n\t}\n\n\t// The ClassicEditor has a special separate config option `attachTo`.\n\t// It is used as a source of editor data and attachment element, but not the root element.\n\tif ( separateAttachTo && isElement( sourceElementsOrData ) ) {\n\t\tif ( config.get( 'attachTo' ) ) {\n\t\t\t/**\n\t\t\t * The element to attach the editor to is specified both as the first argument of\n\t\t\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}\n\t\t\t * and in {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`}.\n\t\t\t *\n\t\t\t * Passing the element as the first argument is deprecated. Remove it and use\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`} instead.\n\t\t\t *\n\t\t\t * @error editor-create-attachto-overspecified\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-create-attachto-overspecified', null );\n\t\t}\n\n\t\tconfig.set( 'attachTo', sourceElementsOrData );\n\t}\n\n\t// The `config.attachTo` is only supported by the ClassicEditor.\n\tif ( !separateAttachTo && config.get( 'attachTo' ) ) {\n\t\t/**\n\t\t * The {@link module:core/editor/editorconfig~EditorConfig#attachTo `config.attachTo`} option is only\n\t\t * available for the {@link module:editor-classic/classiceditor~ClassicEditor} because it replaces the\n\t\t * given DOM element with its own UI. Other editor types (e.g. inline, balloon, decoupled) render inside\n\t\t * the root element directly, so `config.attachTo` is not applicable.\n\t\t *\n\t\t * Remove the `attachTo` option from the editor configuration and use\n\t\t * {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t\t * (or `config.roots.<rootName>.element` for the multi-root editor) to specify the DOM element instead.\n\t\t *\n\t\t * @error editor-create-attachto-ignored\n\t\t */\n\t\tthrow new CKEditorError( 'editor-create-attachto-ignored', null );\n\t}\n\n\tconfig.set( 'roots', rootsConfig );\n}\n\n/**\n * Normalizes the parameters passed to the editor constructor when a single root is used. It supports both of the following signatures:\n *\n * ```ts\n * new Editor( editorConfig: EditorConfig );\n * new Editor( sourceElementOrData: HTMLElement | string, editorConfig: EditorConfig );\n * ```\n *\n * @internal\n */\nexport function normalizeSingleRootEditorConstructorParams(\n\tsourceElementOrDataOrConfig: HTMLElement | string | EditorConfig,\n\teditorConfig: EditorConfig\n): { sourceElementOrData: HTMLElement | string; editorConfig: EditorConfig } {\n\tif (\n\t\ttypeof sourceElementOrDataOrConfig === 'string' ||\n\t\tisElement( sourceElementOrDataOrConfig ) ||\n\t\teditorConfig && Object.keys( editorConfig ).length\n\t) {\n\t\treturn {\n\t\t\tsourceElementOrData: sourceElementOrDataOrConfig as HTMLElement | string,\n\t\t\teditorConfig\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\tsourceElementOrData: '',\n\t\t\teditorConfig: sourceElementOrDataOrConfig as EditorConfig\n\t\t};\n\t}\n}\n\n/**\n * Normalizes the parameters passed to the editor constructor when a multi root is used. It supports both of the following signatures:\n *\n * ```ts\n * new Editor( editorConfig: EditorConfig );\n * new Editor( sourceElementsOrData: Record<string, string> | Record<string, HTMLElement>, editorConfig: EditorConfig );\n * ```\n *\n * @internal\n */\nexport function normalizeMultiRootEditorConstructorParams(\n\tsourceElementOrDataOrConfig: Record<string, string> | Record<string, HTMLElement>,\n\teditorConfig: EditorConfig\n): { sourceElementsOrData: Record<string, string> | Record<string, HTMLElement>; editorConfig: EditorConfig } {\n\tif (\n\t\teditorConfig && Object.keys( editorConfig ).length ||\n\t\tObject.keys( sourceElementOrDataOrConfig ).length == 0 ||\n\t\tObject.values( sourceElementOrDataOrConfig ).every( value => typeof value === 'string' || isElement( value ) )\n\t) {\n\t\treturn {\n\t\t\tsourceElementsOrData: sourceElementOrDataOrConfig as Record<string, string> | Record<string, HTMLElement>,\n\t\t\teditorConfig\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\tsourceElementsOrData: {},\n\t\t\teditorConfig: sourceElementOrDataOrConfig as EditorConfig\n\t\t};\n\t}\n}\n\n/**\n * Type guard to check if the provided value is a plain object containing source elements or data.\n */\nfunction isSourceElementsOrDataRecord(\n\tsourceElementsOrData: HTMLElement | string | Record<string, HTMLElement> | Record<string, string>\n): sourceElementsOrData is Record<string, HTMLElement> | Record<string, string> {\n\treturn (\n\t\t!!sourceElementsOrData &&\n\t\ttypeof sourceElementsOrData == 'object' &&\n\t\t!Array.isArray( sourceElementsOrData ) &&\n\t\t!isElement( sourceElementsOrData )\n\t);\n}\n\n/**\n * Retrieve data from source element or return the string data as is.\n */\nfunction getInitialData( sourceElementOrData: HTMLElement | string ): string {\n\treturn isElement( sourceElementOrData ) ? getDataFromElement( sourceElementOrData ) : sourceElementOrData;\n}\n\n/**\n * Retrieve legacy configuration value for `initialData` from the config.\n * Normalize single-root config so returned value is always an object with root names as keys.\n */\nfunction getLegacyInitialData(\n\tconfig: Config<EditorConfig>,\n\tsourceElementIsObject: boolean,\n\tdefaultRootName: string | false\n): Record<string, string | undefined> {\n\treturn (\n\t\tsourceElementIsObject || !defaultRootName ?\n\t\t\tconfig.get( 'initialData' ) || Object.create( null ) :\n\t\t\t{\n\t\t\t\t[ defaultRootName ]: config.get( 'initialData' )\n\t\t\t}\n\t) as Record<string, string | undefined>;\n}\n\n/**\n * Retrieve legacy configuration value for `placeholder` or `label` from the config for a specific root.\n */\nfunction getLegacyPlainConfigValue(\n\tconfig: Config<EditorConfig>,\n\tkey: 'placeholder' | 'label',\n\trootName: string\n): string | undefined {\n\tconst legacyValue = config.get( key );\n\n\tif ( legacyValue ) {\n\t\treturn typeof legacyValue == 'string' ? legacyValue : legacyValue[ rootName ];\n\t}\n}\n\n/**\n * Normalizes the value passed in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`} into a\n * canonical form (`HTMLElement` or {@link module:core/editor/editorconfig~ViewRootElementDefinition}) that the UI layer\n * can consume directly.\n *\n * Accepts:\n *\n * * an existing `HTMLElement` - returned as is, so the editor wraps it in place,\n * * a tag name string (e.g. `'h1'`) - turned into `{ name: 'h1' }`,\n * * a {@link module:core/editor/editorconfig~ViewRootElementDefinition} object - reshaped so `classes` becomes an\n * array and `attributes.class` is lifted into it.\n *\n * The `class` attribute may be passed either as the dedicated `classes` field (string or array of strings) or as a\n * `class` key inside `attributes`. They are concatenated. The `style` attribute may be passed either as the `styles`\n * object or as a `style` string inside `attributes`. When both are provided, the object form takes precedence and a\n * warning is logged.\n *\n * The `<textarea>` tag name is rejected as it cannot host a rich-text editable.\n *\n * Already used internally by {@link ~normalizeRootsConfig `normalizeRootsConfig()`} for `config.root.element` /\n * `config.roots.*.element`. Exported for callers that bypass the regular config-normalization pass, e.g.\n * {@link module:editor-multi-root/multirooteditor~MultiRootEditor#addRoot `MultiRootEditor.addRoot()`}\n * and {@link module:editor-multi-root/multirooteditor~MultiRootEditor#createEditable `MultiRootEditor.createEditable()`}.\n *\n * @internal\n */\nexport function normalizeViewRootElementDefinition(\n\tspec: HTMLElement | string | ViewRootElementDefinition | undefined\n): HTMLElement | ViewRootElementDefinition | undefined {\n\tif ( spec == null ) {\n\t\treturn undefined;\n\t}\n\n\tif ( isElement( spec ) ) {\n\t\tassertAllowedTagName( spec.tagName );\n\n\t\treturn spec;\n\t}\n\n\tif ( typeof spec === 'string' ) {\n\t\tassertAllowedTagName( spec );\n\n\t\treturn { name: spec };\n\t}\n\n\tconst { name, classes, styles, attributes } = spec;\n\n\tif ( name !== undefined ) {\n\t\tassertAllowedTagName( name );\n\t}\n\n\tconst { class: attrClass, style: attrStyle, ...restAttributes } = attributes || {};\n\tconst hadAttrClass = !!attributes && 'class' in attributes;\n\tconst hasStyles = !!styles && Object.keys( styles ).length > 0;\n\tconst stylesOverrode = hasStyles && !!attrStyle;\n\n\tif ( stylesOverrode ) {\n\t\t/**\n\t\t * Both the {@link module:core/editor/editorconfig~ViewRootElementDefinition#styles `styles`} object\n\t\t * and the {@link module:core/editor/editorconfig~ViewRootElementDefinition#attributes `attributes.style`}\n\t\t * string were provided in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}.\n\t\t * Provide one or the other - the object form takes precedence.\n\t\t *\n\t\t * @error editor-root-element-styles-overspecified\n\t\t */\n\t\tlogWarning( 'editor-root-element-styles-overspecified' );\n\t}\n\n\t// Split whitespace-separated tokens (e.g. `'foo bar'` or `[ 'a b', 'c' ]`) into individual class names so the\n\t// canonical `classes` array is \"one class per entry\". This matches how a caller would expect the array form to\n\t// behave if it were ever passed directly to per-class APIs.\n\tconst normalizedClasses: Array<string> = [\n\t\t...tokenizeClasses( classes ),\n\t\t...tokenizeClasses( attrClass )\n\t];\n\n\t// `class` and `style` are kept as empty strings (rather than stripped) when their value was lifted into `classes`\n\t// or overridden by `styles`. This way the deep-merge in `Config.set()` overwrites any stale value left from the\n\t// user-provided input, instead of preserving it.\n\tconst normalizedAttributes: Record<string, string> = { ...restAttributes };\n\n\tif ( hadAttrClass ) {\n\t\tnormalizedAttributes.class = '';\n\t}\n\n\tif ( stylesOverrode ) {\n\t\tnormalizedAttributes.style = '';\n\t} else if ( attrStyle ) {\n\t\tnormalizedAttributes.style = attrStyle;\n\t}\n\n\treturn {\n\t\t...( name !== undefined && { name } ),\n\t\t...( normalizedClasses.length && { classes: normalizedClasses } ),\n\t\t...( hasStyles && { styles } ),\n\t\t...( Object.keys( normalizedAttributes ).length && { attributes: normalizedAttributes } )\n\t};\n}\n\n/**\n * Splits a class value (string, array of strings, or `undefined`) into individual class tokens.\n * Whitespace-separated tokens within a single string are split into separate array entries and empty entries are dropped.\n */\nfunction tokenizeClasses( value: string | Array<string> | undefined ): Array<string> {\n\tif ( !value ) {\n\t\treturn [];\n\t}\n\n\treturn toArray( value ).flatMap( token => token.split( /\\s+/ ) ).filter( Boolean );\n}\n\n/**\n * Throws when the given value cannot be used as an editable root tag name.\n *\n * Rejects values that are not a valid HTML tag name (non-strings, empty strings, names with whitespace,\n * angle brackets, slashes, or other invalid characters) with `editor-wrong-element-name`.\n *\n * Also rejects the `<textarea>` and `<input>` tags with `editor-wrong-element` - they are form fields\n * and cannot contain other HTML elements, so the editor cannot render rich-text content inside them.\n *\n * To fix the error, use a tag that can contain other elements - for example `'div'`, `'section'`, `'article'`,\n * or a heading like `'h1'`. You can also omit the `name` field to use the default `'div'`.\n */\nfunction assertAllowedTagName( name: unknown ): void {\n\tif ( typeof name !== 'string' || !/^[A-Za-z][A-Za-z0-9_-]*$/.test( name ) ) {\n\t\t/**\n\t\t * The value supplied as the editable root tag name in\n\t\t * {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`} or\n\t\t * `config.roots.<rootName>.element` is not a valid HTML tag name.\n\t\t *\n\t\t * Valid HTML tag names start with a letter and contain only letters, digits, hyphens, or underscores\n\t\t * (e.g. `'div'`, `'h1'`, `'my-element'`; uppercase variants such as `'DIV'` and `'H1'` are also accepted).\n\t\t * Whitespace, angle brackets, slashes, empty strings, and non-string values are not allowed.\n\t\t *\n\t\t * @error editor-wrong-element-name\n\t\t */\n\t\tthrow new CKEditorError( 'editor-wrong-element-name', null, { name } );\n\t}\n\n\tif ( [ 'textarea', 'input' ].includes( name.toLowerCase() ) ) {\n\t\t/**\n\t\t * The DOM tag name specified in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}\n\t\t * cannot be used as an editor's editable root. The `<textarea>` and `<input>` elements are form fields and\n\t\t * cannot contain other HTML elements, so the editor cannot render rich-text content inside them.\n\t\t *\n\t\t * To fix the error, use a tag that can contain other elements - for example `'div'`, `'section'`, `'article'`,\n\t\t * or a heading like `'h1'`. You can also omit the `name` field to use the default `'div'`.\n\t\t *\n\t\t * @error editor-wrong-element\n\t\t */\n\t\tthrow new CKEditorError( 'editor-wrong-element', null );\n\t}\n}\n\n/**\n * An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n */\nfunction isElement( value: any ): value is HTMLElement {\n\treturn _isElement( value );\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/**\n * @module core/editor/utils/verifyrootelements\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\n\nimport type { Editor } from '../editor.js';\n\n/**\n * Verifies that all model root elements are registered in the schema as limit elements.\n *\n * @internal\n */\nexport function verifyRootElements( editor: Editor ): void {\n\tconst schema = editor.model.schema;\n\tconst document = editor.model.document;\n\n\t// Iterate `document.roots` directly instead of `document.getRootNames()` because the latter filters out roots\n\t// that are not loaded yet (e.g. lazy roots in the multi-root editor), which still need to be verified.\n\t// Detached roots are skipped – a detached root is equivalent to being removed, so there is no point in validating it.\n\tfor ( const root of document.roots ) {\n\t\tif ( root === document.graveyard || !root.isAttached() ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( !schema.isLimit( root ) ) {\n\t\t\t/**\n\t\t\t * The model root element must be a {@link module:engine/model/schema~ModelSchemaItemDefinition#isLimit limit element}.\n\t\t\t * The element name specified in\n\t\t\t * {@link module:core/editor/editorconfig~RootConfig#modelElement `config.root.modelElement`}\n\t\t\t * (or `config.roots.<rootName>.modelElement`) must be registered in the schema\n\t\t\t * with `isLimit` set to `true`.\n\t\t\t *\n\t\t\t * @error editor-root-element-is-not-limit\n\t\t\t * @param rootName The name of the root that uses a non-limit element.\n\t\t\t * @param elementName The name of the model element used for the root.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'editor-root-element-is-not-limit', null, {\n\t\t\t\trootName: root.rootName,\n\t\t\t\telementName: root.name\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module core/editor/utils/rootacceptsblocks\n */\n\nimport type { Editor } from '../editor.js';\n\n/**\n * Returns whether the model root with the given name accepts `$block` children according to the editor's schema.\n *\n * Call this once the plugin initialization phase is finished — typically during UI init or right after creating\n * a new editable — so the schema reflects any plugin-registered root types or additional content rules.\n *\n * @internal\n */\nexport function rootAcceptsBlocks( editor: Editor, rootName: string ): boolean {\n\tconst root = editor.model.document.getRoot( rootName )!;\n\n\treturn editor.model.schema.checkChild( root, '$block' );\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/**\n * @module core/pendingactions\n */\n\nimport { ContextPlugin } from './contextplugin.js';\n\nimport {\n\tCKEditorError,\n\tCollection,\n\tObservableMixin,\n\ttype CollectionAddEvent,\n\ttype CollectionRemoveEvent,\n\ttype Observable\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * The list of pending editor actions.\n *\n * This plugin should be used to synchronise plugins that execute long-lasting actions\n * (e.g. file upload) with the editor integration. It gives the developer who integrates the editor\n * an easy way to check if there are any actions pending whenever such information is needed.\n * All plugins that register a pending action also provide a message about the action that is ongoing\n * which can be displayed to the user. This lets them decide if they want to interrupt the action or wait.\n *\n * Adding and updating a pending action:\n *\n * ```ts\n * const pendingActions = editor.plugins.get( 'PendingActions' );\n * const action = pendingActions.add( 'Upload in progress: 0%.' );\n *\n * // You can update the message:\n * action.message = 'Upload in progress: 10%.';\n * ```\n *\n * Removing a pending action:\n *\n * ```ts\n * const pendingActions = editor.plugins.get( 'PendingActions' );\n * const action = pendingActions.add( 'Unsaved changes.' );\n *\n * pendingActions.remove( action );\n * ```\n *\n * Getting pending actions:\n *\n * ```ts\n * const pendingActions = editor.plugins.get( 'PendingActions' );\n *\n * const action1 = pendingActions.add( 'Action 1' );\n * const action2 = pendingActions.add( 'Action 2' );\n *\n * pendingActions.first; // Returns action1\n * Array.from( pendingActions ); // Returns [ action1, action2 ]\n * ```\n *\n * This plugin is used by features like {@link module:upload/filerepository~FileRepository} to register their ongoing actions\n * and by features like {@link module:autosave/autosave~Autosave} to detect whether there are any ongoing actions.\n * Read more about saving the data in the\n * {@glink getting-started/setup/getting-and-setting-data Saving and getting data} guide.\n */\nexport class PendingActions extends ContextPlugin implements Iterable<PendingAction> {\n\t/**\n\t * Defines whether there is any registered pending action.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public hasAny: boolean;\n\n\t/**\n\t * A list of pending actions.\n\t */\n\tprivate _actions!: Collection<PendingAction>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'PendingActions' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis.set( 'hasAny', false );\n\n\t\tthis._actions = new Collection( { idProperty: '_id' } );\n\t\tthis._actions.delegate( 'add', 'remove' ).to( this );\n\t}\n\n\t/**\n\t * Adds an action to the list of pending actions.\n\t *\n\t * This method returns an action object with an observable message property.\n\t * The action object can be later used in the {@link #remove} method. It also allows you to change the message.\n\t *\n\t * @param message The action message.\n\t * @returns An observable object that represents a pending action.\n\t */\n\tpublic add( message: string ): PendingAction {\n\t\tif ( typeof message !== 'string' ) {\n\t\t\t/**\n\t\t\t * The message must be a string.\n\t\t\t *\n\t\t\t * @error pendingactions-add-invalid-message\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'pendingactions-add-invalid-message', this );\n\t\t}\n\n\t\tconst action = new ( ObservableMixin() )() as PendingAction;\n\n\t\taction.set( 'message', message );\n\t\tthis._actions.add( action );\n\t\tthis.hasAny = true;\n\n\t\treturn action;\n\t}\n\n\t/**\n\t * Removes an action from the list of pending actions.\n\t *\n\t * @param action An action object.\n\t */\n\tpublic remove( action: PendingAction ): void {\n\t\tthis._actions.remove( action );\n\t\tthis.hasAny = !!this._actions.length;\n\t}\n\n\t/**\n\t * Returns the first action from the list or null if the list is empty\n\t *\n\t * @returns The pending action object.\n\t */\n\tpublic get first(): PendingAction | null {\n\t\treturn this._actions.get( 0 );\n\t}\n\n\t/**\n\t * Iterable interface.\n\t */\n\tpublic [ Symbol.iterator ](): Iterator<PendingAction> {\n\t\treturn this._actions[ Symbol.iterator ]();\n\t}\n}\n\nexport interface PendingAction extends Observable {\n\tmessage: string;\n}\n\n/**\n * Fired when an action is added to the list.\n *\n * @eventName ~PendingActions#add\n * @param action The added action.\n */\nexport type PendingActionsAddEvent = CollectionAddEvent<PendingAction>;\n\n/**\n * Fired when an action is removed from the list.\n *\n * @eventName ~PendingActions#remove\n * @param action The removed action.\n */\nexport type PendingActionsRemoveEvent = CollectionRemoveEvent<PendingAction>;\n", "var accessibility_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103z\\\"/><path d=\\\"M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17m0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar add_comment_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M4 1.5h12A3.5 3.5 0 0 1 19.5 5v8l-.005.192a3.5 3.5 0 0 1-2.927 3.262l-.062.008v1.813a1.5 1.5 0 0 1-2.193 1.33l-.371-.193-.38-.212a13.5 13.5 0 0 1-3.271-2.63l-.062-.07H4A3.5 3.5 0 0 1 .5 13V5A3.5 3.5 0 0 1 4 1.5M4 3a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h6.924a11.9 11.9 0 0 0 3.71 3.081l.372.194v-3.268L14.962 15H16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z\\\"/><path d=\\\"M9.75 5a.75.75 0 0 0-.75.75v2.5H6.5a.75.75 0 0 0 0 1.5H9v2.5a.75.75 0 0 0 1.5 0v-2.5H13a.75.75 0 0 0 0-1.5h-2.5v-2.5A.75.75 0 0 0 9.75 5\\\"/></svg>\";\n\nvar ai_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M13.903 7.617a3.35 3.35 0 0 0 1.98 1.98L19 10.752l-3.117 1.153a3.35 3.35 0 0 0-1.98 1.98l-1.154 3.117-1.153-3.116a3.35 3.35 0 0 0-1.98-1.98L6.5 10.75l3.116-1.153a3.35 3.35 0 0 0 1.98-1.98L12.75 4.5zm-9.647 4.755c.15.404.469.723.872.872l1.372.507-1.372.507c-.403.15-.722.468-.872.872L3.75 16.5l-.507-1.371a1.48 1.48 0 0 0-.872-.872L1 13.75l1.37-.507a1.48 1.48 0 0 0 .873-.872L3.75 11zM6.441 2.87c.204.55.639.985 1.19 1.189L9.5 4.75l-1.87.691A2.02 2.02 0 0 0 6.44 6.63L5.75 8.5l-.692-1.87a2.01 2.01 0 0 0-1.19-1.189L2 4.751l1.869-.692a2.02 2.02 0 0 0 1.19-1.189L5.748 1z\\\"/></svg>\";\n\nvar ai_adjust_length_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m13.749 15.5.691-1.87c.204-.55.638-.984 1.189-1.188l1.87-.692-1.87-.692A2.01 2.01 0 0 1 14.44 9.87L13.75 8l-.692 1.87c-.204.55-.638.984-1.189 1.188l-1.87.692 1.87.692c.55.204.985.638 1.189 1.188zm.5-11.5a.75.75 0 0 1 0 1.5h-11a.75.75 0 0 1 0-1.5zm-4 4a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1 0-1.5zm-3 4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1 0-1.5z\\\"/></svg>\";\n\nvar ai_ask_ai_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.773 12.536a.75.75 0 0 1 .945.498l.018.051a9 9 0 0 0 .42.964c.317.62.799 1.397 1.473 2.072.701.7 1.38 1.191 1.88 1.505a8 8 0 0 0 .746.417l.037.016.005.003a.75.75 0 0 1-.522 1.404l-.072-.027-.01-.004-.018-.008-.058-.027a10 10 0 0 1-.905-.504 12.3 12.3 0 0 1-2.143-1.715c-.82-.82-1.388-1.744-1.748-2.451a10 10 0 0 1-.5-1.145l-.026-.075-.006-.021-.003-.007v-.003l-.001-.001L1 13.25l-.715.228a.75.75 0 0 1 .488-.942M13.314.953a.75.75 0 0 1 .913-.419l.072.028.009.004.018.007.059.028q.075.034.204.1c.172.09.413.223.701.404a12.3 12.3 0 0 1 2.143 1.715c.82.82 1.387 1.744 1.748 2.45a10 10 0 0 1 .499 1.145l.026.075.007.022.003.007v.003h.001c-.002.002-.043.015-.715.228l.715-.227a.751.751 0 0 1-1.43.455l-.004-.011-.017-.052a9 9 0 0 0-.42-.964c-.317-.619-.8-1.397-1.474-2.07a10.8 10.8 0 0 0-1.88-1.507 8 8 0 0 0-.746-.417l-.036-.015-.006-.003a.75.75 0 0 1-.39-.986M11.29 6.84a3.76 3.76 0 0 0 2.22 2.22L17 10.35l-3.49 1.292a3.76 3.76 0 0 0-2.219 2.22L10 17.35l-1.292-3.49a3.76 3.76 0 0 0-2.22-2.22L3 10.35l3.49-1.291A3.76 3.76 0 0 0 8.71 6.84L10 3.35zm6.009 8.66a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M14.8 18a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M3.798 2.001a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0m-2.499 2.5a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0\\\"/></svg>\";\n\nvar ai_author_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"18\\\" height=\\\"18\\\" fill=\\\"none\\\" viewBox=\\\"0 0 18 18\\\"><path fill=\\\"currentColor\\\" d=\\\"M.471 10.832a.675.675 0 0 1 .85.448l.017.047q.022.065.07.189c.066.165.168.402.309.678.284.557.718 1.257 1.325 1.864a9.8 9.8 0 0 0 1.692 1.356 7 7 0 0 0 .671.375l.033.014.005.003a.675.675 0 0 1-.47 1.264l-.065-.025-.008-.004-.017-.007-.052-.024-.184-.09c-.155-.08-.372-.2-.631-.364a11 11 0 0 1-1.929-1.543C1.35 14.274.84 13.443.514 12.807a9 9 0 0 1-.449-1.03l-.024-.068-.006-.02-.002-.005v-.003H.032l.643-.206-.643.205a.676.676 0 0 1 .44-.848M11.758.408a.676.676 0 0 1 .822-.377l.065.025.007.003.017.007.053.025q.066.03.184.09c.154.08.371.2.63.363.52.326 1.214.829 1.929 1.544.739.738 1.249 1.57 1.573 2.206a9 9 0 0 1 .45 1.03l.023.067.006.02.003.006v.003l-.643.205.644-.205a.676.676 0 0 1-1.287.41l-.004-.01-.015-.046-.072-.19a8 8 0 0 0-.307-.678c-.284-.557-.719-1.257-1.326-1.864a9.8 9.8 0 0 0-1.691-1.355 7 7 0 0 0-.672-.375l-.033-.015-.005-.002a.675.675 0 0 1-.351-.887M9.937 5.706a3.38 3.38 0 0 0 1.996 1.997l3.142 1.162-3.142 1.162a3.38 3.38 0 0 0-1.996 1.998l-1.162 3.14-1.162-3.14a3.38 3.38 0 0 0-1.998-1.998l-3.14-1.162 3.14-1.162a3.38 3.38 0 0 0 1.998-1.997l1.162-3.141zm5.407 7.794a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0m-2.249 2.25a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0M3.194 1.35a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0M.944 3.601a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0\\\"/></svg>\";\n\nvar ai_change_tone_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M11.282 2.775a4.274 4.274 0 0 1 5.466.466 4.23 4.23 0 0 1 .47 5.443.75.75 0 0 1-.113.907.75.75 0 0 1-.913.114 4.27 4.27 0 0 1-2.846.759l-2.625 2.362a1 1 0 0 1 .015.14v4.788a.75.75 0 0 1-1.5 0v-3.59l-2.678 2.41a1.26 1.26 0 0 1-1.083.298l-1.134-.226-1.062 1.058a.75.75 0 0 1-1.059-1.063l1.06-1.056-.224-1.121c-.078-.39.035-.792.3-1.085l6.14-6.752c-.09-.983.165-1.99.761-2.83a.75.75 0 0 1 .113-.906.75.75 0 0 1 .912-.116m-6.73 11.519.164.82a1 1 0 0 1 .097.097l.834.165 6.027-5.426a4.26 4.26 0 0 1-1.665-1.658zm6.779-9.39a2.73 2.73 0 0 0 .455 3.274 2.77 2.77 0 0 0 3.294.456zm4.359-.6a2.77 2.77 0 0 0-3.294-.456l3.748 3.728a2.73 2.73 0 0 0-.454-3.272\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M4.44 1.87c.205.55.639.985 1.19 1.189l1.87.691-1.87.691c-.551.204-.985.64-1.19 1.19L3.75 7.5l-.693-1.87A2.01 2.01 0 0 0 1.87 4.442L0 3.751l1.87-.691c.55-.204.984-.64 1.188-1.19L3.75 0z\\\"/></svg>\";\n\nvar ai_chat_commands_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.739 13.009c0-.416.44-.644.749-.422l.06.05 3.297 3.232.036.039a.53.53 0 0 1 0 .666l-.036.039-3.297 3.232c-.288.283-.747.098-.803-.292l-.006-.08v-1.468c-.343.04-.898.142-1.57.404l-.189.077c-.654.276-1.15.766-1.464 1.156l-.123.16a.48.48 0 0 1-.574.163.516.516 0 0 1-.314-.56l.064-.388c.074-.426.184-.955.335-1.474.196-.676.483-1.408.906-1.854l.113-.114c.986-.957 2.195-1.094 2.816-1.094zM.773 12.536a.75.75 0 0 1 .945.498l.018.052a9 9 0 0 0 .42.964c.316.619.8 1.396 1.473 2.07.701.702 1.38 1.193 1.88 1.507a8 8 0 0 0 .746.417l.037.015.005.003a.75.75 0 0 1-.522 1.404l-.072-.027-.01-.004-.018-.008-.058-.027a10 10 0 0 1-.905-.504 12.3 12.3 0 0 1-2.143-1.715c-.82-.82-1.388-1.744-1.748-2.45a10 10 0 0 1-.5-1.145l-.026-.076-.006-.021-.003-.007v-.003H.285a.75.75 0 0 1 .488-.943M11.29 6.84a3.76 3.76 0 0 0 2.22 2.218L17 10.35l-3.49 1.291a3.76 3.76 0 0 0-2.22 2.22L10 17.35l-1.291-3.49a3.76 3.76 0 0 0-2.22-2.22l-3.49-1.29 3.49-1.292a3.76 3.76 0 0 0 2.22-2.218l1.29-3.49zM13.314.953a.75.75 0 0 1 .913-.42l.072.028.01.004.018.008.058.027q.076.035.204.1c.172.09.413.223.702.404.576.362 1.348.92 2.142 1.715.82.82 1.388 1.744 1.748 2.451a10 10 0 0 1 .5 1.145l.026.075.006.021.003.007v.003l.001.001a.75.75 0 0 1-1.43.455l-.003-.01-.018-.052-.079-.21a9 9 0 0 0-.342-.754c-.315-.62-.798-1.397-1.472-2.071a10.8 10.8 0 0 0-1.88-1.506 8 8 0 0 0-.746-.417l-.037-.016-.005-.003a.75.75 0 0 1-.391-.985M2.05 3.75a.75.75 0 1 1-.002 1.502.75.75 0 0 1 .001-1.501M4.548 1.25a.75.75 0 1 1 0 1.501.75.75 0 0 1 0-1.5\\\"/></svg>\";\n\nvar ai_continue_writing_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.591 16.502c.421 0 .762.336.762.75s-.341.75-.762.75h-5.08a.757.757 0 0 1-.761-.751c0-.414.34-.749.761-.749zm3.302-8.942c0-1.009 1.135-1.576 1.952-1.056l.158.12 4.817 4.182c.576.5.572 1.386-.008 1.882L12.996 16.8c-.823.702-2.103.127-2.103-.945V14.46H2.511a.756.756 0 0 1-.761-.75c0-.414.34-.75.761-.75h8.636c.701 0 1.27.56 1.27 1.25v1.098l4.176-3.568-4.175-3.627V9.28c0 .69-.57 1.25-1.271 1.25H2.511a.756.756 0 0 1-.761-.75c0-.414.34-.75.761-.75h8.382zm6.047-5.689c.205.55.639.986 1.19 1.19l1.869.691-1.87.691c-.55.204-.984.64-1.188 1.19l-.692 1.869-.692-1.87a2.01 2.01 0 0 0-1.188-1.189l-1.87-.691 1.87-.691c.55-.204.984-.64 1.188-1.19l.691-1.869zM7.591 5.502c.421 0 .762.336.762.75s-.34.75-.762.75h-5.08a.756.756 0 0 1-.761-.75c0-.414.34-.75.761-.75z\\\"/></svg>\";\n\nvar ai_grammar_check_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17.413 12.037 10.487 19l-3.421-3.446 1.053-1.058 2.37 2.386 5.873-5.902z\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"m12.976 12.465-1.004 1.009-.737-1.995H5.378l-1.39 3.492H2.5L7.463 3H9.05zm-7.1-2.183h4.764L8.257 4.496z\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M16.958 1.87c.203.55.634.985 1.182 1.189l1.859.691-1.86.691a2.01 2.01 0 0 0-1.181 1.19L16.27 7.5l-.689-1.87A2 2 0 0 0 14.4 4.442l-1.858-.691L14.4 3.06c.548-.204.98-.64 1.182-1.19L16.27 0z\\\"/></svg>\";\n\nvar ai_improve_writing_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M14.832 15.502a.75.75 0 0 1 .754.749.75.75 0 0 1-.755.749H7.28a.753.753 0 0 1-.756-.749c0-.414.339-.749.756-.749zm1.237-12.5a.946.946 0 0 1 .851 1.322c-.69 1.575-1.272 2.683-1.893 3.406-.563.655-1.17 1.005-1.884 1.126-.449 1.736-1.662 2.854-2.73 3.527a8.8 8.8 0 0 1-2.038.937q-.092.029-.146.042l-.042.012-.013.003H8.17l-.002.002a.76.76 0 0 1-.917-.546.75.75 0 0 1 .55-.908l.002-.001.023-.006.104-.03a7.3 7.3 0 0 0 1.673-.77c.952-.6 1.888-1.526 2.14-2.92a.97.97 0 0 1 .91-.792l.168-.014c.382-.05.694-.212 1.056-.633.377-.438.782-1.133 1.293-2.229-2.808.253-5.14 2.025-6.952 4.332-1.991 2.537-3.253 5.6-3.728 7.563a.757.757 0 0 1-.911.553.75.75 0 0 1-.559-.903c.519-2.144 1.867-5.409 4.007-8.134 2.136-2.72 5.164-5.024 9.042-4.939M4.44 1.87c.205.55.64.985 1.19 1.189l1.87.691-1.87.691c-.55.204-.985.64-1.19 1.19L3.75 7.5l-.692-1.87a2.01 2.01 0 0 0-1.19-1.189L0 3.75l1.869-.691c.55-.204.985-.64 1.19-1.19L3.748 0z\\\"/></svg>\";\n\nvar ai_other_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m16.25 0 .69 1.87c.205.55.639.984 1.19 1.188L20 3.75l-1.87.692a2.02 2.02 0 0 0-1.19 1.188l-.69 1.87-.693-1.87a2.01 2.01 0 0 0-1.188-1.188l-1.87-.692 1.87-.692c.55-.204.985-.638 1.188-1.188z\\\"/><path d=\\\"M10 1c.704 0 1.053-.003 1.474.09.445.099.635.613.426 1.019-.163.315-.523.465-.875.423C10.712 2.495 10.42 2.5 10 2.5a7.5 7.5 0 1 0 7.5 7.5c0-.26-.047-.582-.102-.89a.82.82 0 0 1 .458-.89c.456-.214 1.007.027 1.08.525.053.375.064.746.064 1.255a9 9 0 1 1-9-9\\\"/><path d=\\\"M7.05 10a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0m4.2 0a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0m4.2 0a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0\\\"/></svg>\";\n\nvar ai_quick_actions_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.718 5.12c.285.77.893 1.378 1.663 1.663l2.618.97-2.618.968a2.82 2.82 0 0 0-1.663 1.664l-.969 2.617-.969-2.617A2.82 2.82 0 0 0 4.117 8.72l-2.618-.969 2.618-.969A2.82 2.82 0 0 0 5.78 5.12l.969-2.618zm10.609 9.086a.75.75 0 0 1 0 1.492l-.078.004h-8a.75.75 0 0 1 0-1.5h8zm-.077-4.504a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5zm.002-4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5zM3.461 12.749c.136.367.425.657.791.793l1.247.46-1.247.46a1.34 1.34 0 0 0-.79.793l-.463 1.247-.46-1.246a1.34 1.34 0 0 0-.793-.793l-1.247-.46 1.247-.461a1.34 1.34 0 0 0 .792-.793L3 11.502z\\\"/></svg>\";\n\nvar ai_review_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m14.57 9.33-8.194 8.194H3.598V14.75l8.193-8.198 2.779 2.78Zm-.108-5.14a.73.73 0 0 1 .522.217l1.734 1.73a.736.736 0 0 1 0 1.043l-1.355 1.36-2.78-2.78 1.357-1.352a.74.74 0 0 1 .522-.218M4.05.19l.692 1.869c.204.55.638.985 1.189 1.189l1.87.691-1.87.692c-.55.204-.985.638-1.189 1.189L4.05 7.69l-.69-1.87a2.01 2.01 0 0 0-1.19-1.189L.3 3.94l1.87-.691c.55-.204.985-.638 1.189-1.189z\\\"/></svg>\";\n\nvar ai_translate_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M19 19h-1.486l-1.289-3.5h-5.85L8.989 19H7.501l4.957-12h1.586zm-8.13-4.7h4.76l-2.38-5.8z\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M5.648.5c.414 0 .75.337.75.751v.95h4.35a.75.75 0 0 1 0 1.5H9.486c-.337 1.817-1.254 4.38-3.062 6.917.234.25.42.434.56.563a5 5 0 0 0 .293.253h.001a.75.75 0 0 1-.857 1.231H6.42l-.003-.002-.004-.003-.01-.008-.028-.02-.092-.072a7 7 0 0 1-.317-.278 12 12 0 0 1-.472-.463c-1.345 1.606-2.094 2.28-4.376 3.584a.75.75 0 0 1-.736-1.306c2.018-.997 2.852-1.878 4.11-3.42-.546-.738-.982-1.637-1.286-2.357a19 19 0 0 1-.563-1.516l-.008-.026-.002-.007-.001-.002-.019-.076A.75.75 0 0 1 4.04 6.26l.026.072.001.004.006.02.025.078.101.297c.09.255.22.61.388 1.005.233.553.525 1.152.852 1.67C6.86 7.313 7.63 5.146 7.953 3.7H.948a.75.75 0 0 1 0-1.5h3.95v-.949A.75.75 0 0 1 5.648.5m11.293 1.37c.204.55.638.984 1.189 1.188l1.869.692-1.87.691c-.55.204-.984.638-1.188 1.189L16.25 7.5l-.692-1.87a2.01 2.01 0 0 0-1.188-1.19l-1.87-.691 1.87-.692c.55-.204.985-.638 1.188-1.189L16.25 0z\\\"/></svg>\";\n\nvar ai_chat_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.773 12.536a.75.75 0 0 1 .945.498l.018.051a9 9 0 0 0 .42.964c.317.62.799 1.397 1.473 2.072.701.7 1.38 1.191 1.88 1.505a8 8 0 0 0 .746.417l.037.016.005.003a.75.75 0 0 1-.522 1.404l-.072-.027-.01-.004-.018-.008-.058-.027a10 10 0 0 1-.905-.504 12.3 12.3 0 0 1-2.143-1.715c-.82-.82-1.388-1.744-1.748-2.451a10 10 0 0 1-.5-1.145l-.026-.075-.006-.021-.003-.007v-.003l-.001-.001L1 13.25l-.715.228a.75.75 0 0 1 .488-.942M13.314.953a.75.75 0 0 1 .913-.419l.072.028.009.004.018.007.059.028q.075.034.204.1c.172.09.413.223.701.404a12.3 12.3 0 0 1 2.143 1.715c.82.82 1.387 1.744 1.748 2.45a10 10 0 0 1 .499 1.145l.026.075.007.022.003.007v.003h.001c-.002.002-.043.015-.715.228l.715-.227a.751.751 0 0 1-1.43.455l-.004-.011-.017-.052a9 9 0 0 0-.42-.964c-.317-.619-.8-1.397-1.474-2.07a10.8 10.8 0 0 0-1.88-1.507 8 8 0 0 0-.746-.417l-.036-.015-.006-.003a.75.75 0 0 1-.39-.986M11.29 6.84a3.76 3.76 0 0 0 2.22 2.22L17 10.35l-3.49 1.292a3.76 3.76 0 0 0-2.219 2.22L10 17.35l-1.292-3.49a3.76 3.76 0 0 0-2.22-2.22L3 10.35l3.49-1.291A3.76 3.76 0 0 0 8.71 6.84L10 3.35zm6.009 8.66a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M14.8 18a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M3.798 2.001a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0m-2.499 2.5a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0\\\"/></svg>\";\n\nvar ai_history_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.942 1.87c.203.55.637.985 1.188 1.189L20 3.75l-1.87.691a2.01 2.01 0 0 0-1.188 1.19L16.249 7.5l-.691-1.87a2.01 2.01 0 0 0-1.19-1.189L12.5 3.75l1.87-.691c.55-.204.985-.639 1.189-1.19L16.249 0zm2.03 5.43c.305 0 .58.192.671.483a7 7 0 0 1 .352 2.4 9 9 0 0 1-9.361 8.809 9 9 0 0 1-7.662-4.917L4.1 12.946A7.502 7.502 0 0 0 18.5 10c0-1.017-.1-1.266-.5-2.2-.097-.224.143-.5.387-.5z\\\"/><path d=\\\"m11.5 9.999 3.195 3.196-1.06 1.06-3.536-3.536-.1-.112V5h1.5zM10.7 1q.168 0 .336.006a.703.703 0 0 1 .664.716c0 .451-.398.795-.849.785a7 7 0 0 0-.531.007c-1.015.052-1.71.309-2.623.756a7.5 7.5 0 0 0-4.17 6.125l.965-.737a.75.75 0 0 1 .979.057l.073.083a.75.75 0 0 1-.058.978l-.083.072-2.27 1.738a.75.75 0 0 1-.972-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 1.107-1.005l.074.082.531.68a9 9 0 0 1 5.32-7.218C8.519 1.259 9.453 1 10.7 1\\\"/></svg>\";\n\nvar align_bottom_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.75.75 0 0 1-.511.187.75.75 0 0 1-.511-.187M4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5z\\\"/></svg>\";\n\nvar align_center_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75\\\"/></svg>\";\n\nvar align_justify_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75\\\"/></svg>\";\n\nvar align_left_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75\\\"/></svg>\";\n\nvar align_middle_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.75 11.875a.75.75 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.75.75 0 0 1-.508.184.75.75 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75\\\"/></svg>\";\n\nvar align_right_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75m0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75\\\"/></svg>\";\n\nvar align_top_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .511-.187.75.75 0 0 1 .511.187M15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5z\\\"/></svg>\";\n\nvar arrow_down_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 .75a9.25 9.25 0 1 1 0 18.5 9.25 9.25 0 0 1 0-18.5m0 1.5a7.75 7.75 0 1 0 0 15.5 7.75 7.75 0 0 0 0-15.5m0 2.022a.75.75 0 0 1 .743.649l.007.101v8.165l2.714-2.705a.75.75 0 0 1 .977-.07l.084.072a.75.75 0 0 1 .07.976l-.072.084-3.994 3.981a.75.75 0 0 1-.975.073l-.084-.073-3.99-3.98a.75.75 0 0 1 .975-1.135l.085.072 2.71 2.706V5.022a.75.75 0 0 1 .75-.75\\\"/></svg>\";\n\nvar arrow_up_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 19.25a9.25 9.25 0 1 0 0-18.5 9.25 9.25 0 0 0 0 18.5m0-1.5a7.75 7.75 0 1 1 0-15.5 7.75 7.75 0 0 1 0 15.5m0-2.022a.75.75 0 0 0 .743-.649l.007-.101V6.813l2.714 2.705a.75.75 0 0 0 .977.07l.084-.072a.75.75 0 0 0 .07-.976l-.072-.084-3.994-3.981a.75.75 0 0 0-.975-.073l-.084.073-3.99 3.98a.75.75 0 0 0 .975 1.135l.085-.072 2.71-2.706v8.166c0 .414.336.75.75.75\\\"/></svg>\";\n\nvar bold_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.187 17H5.773q-.956 0-1.364-.415-.41-.416-.409-1.323V4.738q0-.926.419-1.332.418-.405 1.354-.406h4.68q1.035 0 1.793.124.76.124 1.36.478.512.296.906.75a3.26 3.26 0 0 1 .808 2.162q0 2.102-2.167 3.075 2.846.879 2.847 3.421a3.76 3.76 0 0 1-2.296 3.504 6 6 0 0 1-1.517.377q-.857.11-2 .11zm-.217-6.217H7v4.087h3.069q2.965 0 2.965-2.072 0-1.061-.768-1.537-.768-.478-2.296-.478M7 5.13v3.619h2.606q1.093 0 1.69-.2a1.6 1.6 0 0 0 .91-.765q.247-.4.247-.897 0-1.06-.778-1.409-.778-.348-2.375-.348z\\\"/></svg>\";\n\nvar bookmark_inline_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 14 16\\\"><path d=\\\"M2 14.436V2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v12.436a.5.5 0 0 1-.819.385l-3.862-3.2a.5.5 0 0 0-.638 0l-3.862 3.2A.5.5 0 0 1 2 14.436\\\" class=\\\"ck-icon__fill\\\"/></svg>\";\n\nvar bookmark_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.68 3.417a.24.24 0 0 0-.24.236v12.66l3.793-3.102a1.215 1.215 0 0 1 1.534 0l3.793 3.103V3.654a.24.24 0 0 0-.24-.237zM4 3.653C4 2.74 4.752 2 5.68 2h8.64c.928 0 1.68.74 1.68 1.653v13.164c0 1-1.185 1.547-1.967.908L10 14.426l-4.033 3.299c-.782.64-1.967.092-1.967-.908z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar bookmark_medium_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M4.4 2.24c-.11 0-.2.092-.2.207v11.077l3.16-2.714a.975.975 0 0 1 1.28 0l3.16 2.714V2.447a.203.203 0 0 0-.2-.207zM3 2.447C3 1.647 3.627 1 4.4 1h7.2c.773 0 1.4.648 1.4 1.447v11.518c0 .875-.988 1.354-1.64.794L8 11.873 4.64 14.76c-.652.56-1.64.081-1.64-.794z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar bookmark_small_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 14 14\\\"><path d=\\\"M4.216 2.031a.503.503 0 0 0-.489.516v9.42l2.648-2.324a.94.94 0 0 1 1.25 0l2.648 2.324v-9.42a.503.503 0 0 0-.489-.516zm-1.466.516C2.75 1.693 3.406 1 4.216 1h5.568c.81 0 1.466.693 1.466 1.547v9.42c0 .873-.965 1.351-1.602.793L7 10.436 4.352 12.76c-.637.558-1.602.08-1.602-.793z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar box_with_check_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2z\\\"/><path d=\\\"M17.483 3c.27 0 .529.107.72.296a1.007 1.007 0 0 1 0 1.429l-7.432 7.48a1 1 0 0 1-.758.294 1.02 1.02 0 0 1-.757-.295L6.31 9.381a1.01 1.01 0 0 1-.235-1.11 1 1 0 0 1 .556-.551 1.03 1.03 0 0 1 1.117.232l2.264 2.148 6.75-6.804c.191-.19.45-.296.72-.296\\\"/></svg>\";\n\nvar box_with_cross_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2zm8.554-3a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13m2.74 3.759a.81.81 0 0 0-1.148 0l-1.592 1.593-1.593-1.593a.812.812 0 1 0-1.148 1.15L11.355 7.5 9.763 9.092a.813.813 0 0 0 1.148 1.15l1.593-1.593 1.592 1.592a.812.812 0 1 0 1.148-1.15L13.652 7.5l1.592-1.592a.813.813 0 0 0 0-1.15\\\"/><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2zm8.554-3a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13m2.74 3.759a.81.81 0 0 0-1.148 0l-1.592 1.593-1.593-1.593a.812.812 0 1 0-1.148 1.15L11.355 7.5 9.763 9.092a.813.813 0 0 0 1.148 1.15l1.593-1.593 1.592 1.592a.812.812 0 1 0 1.148-1.15L13.652 7.5l1.592-1.592a.813.813 0 0 0 0-1.15Z\\\"/></svg>\";\n\nvar box_with_marker_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2z\\\"/><path d=\\\"m6.923 13.22.205-.305q-.389-.198-.436-.371-.048-.18.101-.733.124-.329.147-.521a4 4 0 0 0 0-.634q-.274-.816-.248-1.102.026-.288.416-.756L13.033.56q.708-1.194 2.8.158 2.09 1.354 1.561 2.35l-5.143 9.067q-.209.541-.46.685-.255.141-1.08.183-.335.11-.646.279a2.7 2.7 0 0 0-.46.41q-.384.348-.552.349-.126 0-.46-.2l-.27.359-1.401-.98zm-.244.364 1.379.965-.344.451H5.728z\\\"/></svg>\";\n\nvar browse_files_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17.5 9.303V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6 6 0 0 0-1.5-1.228M16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5z\\\"/><path d=\\\"M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10M15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1z\\\"/></svg>\";\n\nvar bulb_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.91 18.255a.747.747 0 0 1 .663.746.747.747 0 0 1-.664.746l-.075.004H8.382a.745.745 0 0 1-.74-.75c0-.414.331-.75.74-.75h3.452z\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M10.104 3.752c.807 0 1.59.193 2.415.548l.404.185c.913.452 1.62 1.026 2.129 1.77.578.848.852 1.85.95 2.991l.014.258c.031 1.26-.537 2.059-1.096 2.722-.562.665-1.05 1.151-1.322 1.935l-.053.161c-.204.698-.397 1.704-.504 2.314a1.34 1.34 0 0 1-1.308 1.114H8.476c-.65 0-1.196-.476-1.308-1.114a31 31 0 0 0-.354-1.743l-.15-.57c-.258-.882-.776-1.387-1.375-2.097-.596-.707-1.203-1.57-1.082-2.98l.045-.422c.126-.968.4-1.827.906-2.568.58-.851 1.422-1.478 2.533-1.956l.307-.126c.713-.274 1.401-.422 2.106-.422m0 1.5c-.492 0-1.001.102-1.582.325l-.254.104c-.927.398-1.513.87-1.894 1.43-.337.492-.551 1.106-.656 1.909l-.038.356c-.07.806.224 1.272.732 1.874.506.599 1.299 1.384 1.67 2.645l.084.307c.181.688.338 1.508.435 2.048h3.007c.112-.624.304-1.619.52-2.355l.075-.232c.394-1.127 1.12-1.852 1.594-2.413.476-.565.764-1.01.74-1.727l-.008-.147c-.084-.981-.308-1.702-.693-2.266-.334-.49-.824-.912-1.563-1.277l-.332-.152c-.688-.296-1.274-.43-1.837-.43\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M3.597 13.637a.73.73 0 0 1 1.045 0 .76.76 0 0 1 0 1.06l-1.05 1.064-.056.052a.73.73 0 0 1-.99-.052.76.76 0 0 1-.05-1.004l.05-.057zm11.761 0a.73.73 0 0 1 1.045 0l1.05 1.063.05.057c.237.294.22.73-.05 1.004a.73.73 0 0 1-.99.052l-.055-.052-1.05-1.064a.76.76 0 0 1 0-1.06M2.472 8.257c.409 0 .74.336.74.75s-.331.75-.74.75L.99 9.756l-.075-.004a.746.746 0 0 1-.664-.746c0-.388.291-.708.664-.746l.075-.004zm16.614.003a.747.747 0 0 1 .664.746.746.746 0 0 1-.664.746l-.075.004h-1.483a.745.745 0 0 1-.74-.75c0-.413.331-.75.74-.75h1.483zM3.334 2.581c.27-.274.7-.29.99-.05l.055.05 1.048 1.065a.76.76 0 0 1 0 1.061.73.73 0 0 1-1.045 0L3.334 3.642l-.05-.057a.76.76 0 0 1 .05-1.004m12.343-.051a.73.73 0 0 1 .989.051.76.76 0 0 1 .05 1.004l-.05.057-1.048 1.065a.73.73 0 0 1-1.046 0 .76.76 0 0 1 0-1.06l1.049-1.066zM10.007.251c.383 0 .698.296.736.674l.003.076.001 1.505c0 .414-.33.75-.738.75a.745.745 0 0 1-.74-.75L9.268 1l.004-.076a.745.745 0 0 1 .735-.674\\\"/></svg>\";\n\nvar bulleted_list_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75m6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75\\\"/></svg>\";\n\nvar cancel_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414z\\\"/></svg>\";\n\nvar caption_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2\\\"/><path fill-opacity=\\\".6\\\" d=\\\"M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492z\\\"/></svg>\";\n\nvar case_change_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.789 3 0 17h1.664l1.664-4.027h6.797l.227.548c.046-.172.112-.352.209-.545.217-.436.556-.609.898-.798L7.664 3H5.79Zm.938 1.758 2.777 6.715H3.949zM15.956 7.5c-1.584-.02-3.226.824-3.843 2.882l1.495.106c.904-2.082 4.594-2.13 4.375.534-3.245 1.024-4.838.117-6.082 2.62-.208.418-.17 1.57.54 2.397s2.014 1.149 3.409.85 2.24-1.386 2.24-1.386L18.205 17h1.493l-.059-1.72-.056-5.274C19.51 8.612 17.75 7.524 15.956 7.5m2.027 4.696s.641 2.453-1.528 3.27c-3.376 1.269-4.188-2.141-1.775-2.638 1.704-.352 1.873-.25 3.303-.632\\\"/></svg>\";\n\nvar check_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.972 16.615a1 1 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a1 1 0 0 1-.745.292\\\"/></svg>\";\n\nvar chevron_down_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.435 5.506a.75.75 0 0 1 1.197.899l-.067.089-6.992 8a.75.75 0 0 1-1.05.078l-.079-.078-7.008-8a.75.75 0 0 1 1.049-1.066l.08.078 6.442 7.354z\\\"/></svg>\";\n\nvar chevron_up_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.435 14.494a.75.75 0 0 0 1.197-.899l-.067-.089-6.992-8a.75.75 0 0 0-1.05-.078l-.079.078-7.008 8a.75.75 0 0 0 1.049 1.066l.08-.078 6.442-7.354z\\\"/></svg>\";\n\nvar chevron_right_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 21 21\\\"><path d=\\\"M9.064 14.666a.75.75 0 1 1-1.06-1.06L11.01 10.6 8.004 7.595a.75.75 0 1 1 1.06-1.06l3.55 3.549a.748.748 0 0 1-.136 1.168z\\\"/></svg>\";\n\nvar ckbox_image_edit_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037H5.06l5.058-5.078L6.617 9.15a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v4.354a3.5 3.5 0 0 1 1.5.049V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.147 2.147 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.642-3.11 2.13 2.13 0 0 0-1.873-.978M8.089 17.635v2.388h2.389l7.046-7.046-2.39-2.39zm11.282-6.507a.64.64 0 0 0 .139-.692.6.6 0 0 0-.139-.205l-1.49-1.488a.63.63 0 0 0-.899 0l-1.166 1.163 2.39 2.39z\\\"/></svg>\";\n\nvar close_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.538 9.44 6.362 6.362a1.503 1.503 0 1 1-2.125 2.125L9.418 11.56l-6.365 6.365A1.5 1.5 0 1 1 .93 15.803L7.295 9.44.93 3.075A1.5 1.5 0 0 1 3.052.955L9.416 7.32 15.78.955a1.5 1.5 0 0 1 2.123 2.12z\\\"/></svg>\";\n\nvar code_block_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174m2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207M16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zM5.009 15l.003 1H3v-1zm2.188-2-1.471 1H5v-1zM10 11v.095L8.668 12H7v-1zm4-2v1H7V9zm0-2v1H7V7zm-4-2v1H5V5zM6 3v1H3V3z\\\"/></svg>\";\n\nvar code_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1m-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1\\\"/></svg>\";\n\nvar cog_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.333 2 .19 2.263a6 6 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a6 6 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a6 6 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a6 6 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a6 6 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a6 6 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a6 6 0 0 1 1.46-.605L8.666 2zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466\\\"/></svg>\";\n\nvar color_palette_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 9 9 0 0 1-.372.008m-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414M9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415m4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415\\\"/></svg>\";\n\nvar color_tile_check_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0\\\" class=\\\"ck-icon__fill\\\"/><path d=\\\"M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z\\\"/></svg>\";\n\nvar comments_archive_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M14 3.5A3.5 3.5 0 0 1 17.5 7v6l-.005.192a3.5 3.5 0 0 1-2.927 3.262l-.062.008v1.813a1.5 1.5 0 0 1-2.193 1.33l-.37-.193-.38-.212a13.5 13.5 0 0 1-3.272-2.63l-.062-.07-4.729-.046a3.5 3.5 0 0 1-3.5-3.5v-6a3.5 3.5 0 0 1 3.5-3.5zM3.5 4.954a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2L8.924 15a11.9 11.9 0 0 0 3.71 3.081l.372.194v-3.268L12.962 15H14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M16.5.5h-10a3.5 3.5 0 0 0-3.162 2h1.84A2 2 0 0 1 6.5 2h10a2 2 0 0 1 2 2v8.873a3.5 3.5 0 0 0 1.495-2.681L20 10V4A3.5 3.5 0 0 0 16.5.5\\\"/><path d=\\\"M12.013 7.453a.75.75 0 0 1 .034 1.06l-3.75 4a.75.75 0 0 1-1.045.048l-2.25-2a.75.75 0 0 1 .996-1.122l1.704 1.515 3.25-3.467a.75.75 0 0 1 1.061-.034\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar content_lock_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.5 6.5a3.5 3.5 0 0 1 3.495 3.308L19 10v2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5m0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5m0-6a2 2 0 0 0-2 2v2h4v-2a2 2 0 0 0-2-2m-9.25 8a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5z\\\"/></svg>\";\n\nvar content_unlock_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.25 16a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5zm.25 5.5a3.5 3.5 0 0 1 3.143 1.959.75.75 0 0 1-1.36.636A2 2 0 0 0 13.5 10v2H19a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5m0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5\\\"/></svg>\";\n\nvar copy_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5 2.801a.7.7 0 0 0-.7.7v11.5a.8.8 0 0 1-1.6 0v-11.5a2.3 2.3 0 0 1 2.3-2.3h6.5a.8.8 0 0 1 0 1.6zm.7 3.7a2.3 2.3 0 0 1 2.3-2.3h7a2.3 2.3 0 0 1 2.3 2.3v10a2.3 2.3 0 0 1-2.3 2.3H8a2.3 2.3 0 0 1-2.3-2.3zm2.3-.7a.7.7 0 0 0-.7.7v10a.7.7 0 0 0 .7.7h7a.7.7 0 0 0 .7-.7v-10a.7.7 0 0 0-.7-.7z\\\"/></svg>\";\n\nvar document_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M2.75 1.701a.95.95 0 0 1 .95-.95h7.61l5.94 5.94V18.3a.95.95 0 0 1-.95.95H3.7a.95.95 0 0 1-.95-.95zm1.5.55v15.5h11.5v-10H11.2a.95.95 0 0 1-.95-.95v-4.55zm7.5 1.06 2.94 2.94h-2.94z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar document_with_checkmark_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M1.95.001a.95.95 0 0 0-.95.95v16.6c0 .525.425.95.95.95h5.641c.415 0 .75-.313.75-.727 0-.415-.335-.773-.75-.773H2.5v-15.5h6v4.55c0 .525.425.95.95.95H14V8.24c0 .414.342.75.757.75a.744.744 0 0 0 .743-.75v-2.3L9.56.001zm10.99 5.5L10 2.561v2.94z\\\"/><path d=\\\"M18.03 11.531a.75.75 0 0 0-1.06-1.06L12 15.44l-2.47-2.47a.75.75 0 0 0-1.06 1.06L12 17.56z\\\"/></svg>\";\n\nvar document_with_cross_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M1.95.001a.95.95 0 0 0-.95.95v16.6c0 .525.425.95.95.95h5.641c.415 0 .75-.32.75-.735a.763.763 0 0 0-.75-.765H2.5v-15.5h6v4.55c0 .525.425.95.95.95H14v1.25c0 .414.342.75.757.75a.744.744 0 0 0 .743-.75v-2.31L9.56 0zm10.99 5.5L10 2.561v2.94z\\\"/><path d=\\\"M11.47 10.47a.75.75 0 0 1 1.06 0l2.97 2.97 2.97-2.97a.75.75 0 0 1 1.06 1.061l-2.97 2.97 2.97 2.97a.75.75 0 0 1-1.06 1.06l-2.97-2.97-2.97 2.97a.75.75 0 1 1-1.06-1.06l2.97-2.97-2.97-2.97a.75.75 0 0 1 0-1.06\\\"/></svg>\";\n\nvar document_with_loupe_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><g fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\"><path d=\\\"M1 .95A.95.95 0 0 1 1.95 0h7.61l5.94 5.94v3.249A6 6 0 0 0 14 9V7H9.45a.95.95 0 0 1-.95-.95V1.5h-6V17h5.841c.191.54.457 1.044.785 1.5H1.95a.95.95 0 0 1-.95-.95zm9 1.61 2.94 2.94H10z\\\"/><path d=\\\"M12.895 17.79c.805 0 1.553-.243 2.173-.661l2.653 2.653a.75.75 0 0 0 1.06-1.061l-2.652-2.653a3.895 3.895 0 1 0-3.233 1.722m0-1.6a2.295 2.295 0 1 1 0-4.59 2.295 2.295 0 0 1 0 4.59\\\"/></g></svg>\";\n\nvar document_outline_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.587 17.028a1.88 1.88 0 0 1-1.882-1.881V1.976A1.88 1.88 0 0 1 2.587.094H17.64a1.88 1.88 0 0 1 1.881 1.882v13.17a1.88 1.88 0 0 1-1.881 1.882zm5.645-1.41h9.408a.47.47 0 0 0 .47-.471V1.976a.47.47 0 0 0-.47-.47H8.232zM6.82 1.504H2.587a.47.47 0 0 0-.47.47v13.172a.47.47 0 0 0 .47.47H6.82z\\\"/></svg>\";\n\nvar document_outline_toggle_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5 9.5a.5.5 0 0 0 .5-.5v-.5A.5.5 0 0 0 5 8H3.5a.5.5 0 0 0-.5.5V9a.5.5 0 0 0 .5.5zm.5 2.5a.5.5 0 0 1-.5.5H3.5A.5.5 0 0 1 3 12v-.5a.5.5 0 0 1 .5-.5H5a.5.5 0 0 1 .5.5zM5 6.5a.5.5 0 0 0 .5-.5v-.5A.5.5 0 0 0 5 5H3.5a.5.5 0 0 0-.5.5V6a.5.5 0 0 0 .5.5z\\\"/><path d=\\\"M2 19a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2zm6-1.5h10a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5H8zm-1.5-15H2a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h4.5z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar drag_handle_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5z\\\"/><path fill-opacity=\\\".256\\\" d=\\\"M1 1h14v14H1z\\\"/><g class=\\\"ck-icon__selected-indicator\\\"><path d=\\\"M7 0h2v1H7zM0 7h1v2H0zm15 0h1v2h-1zm-8 8h2v1H7z\\\"/><path fill-opacity=\\\".254\\\" d=\\\"M1 1h14v14H1z\\\"/></g></svg>\";\n\nvar drag_indicator_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m-7 6.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/></svg>\";\n\nvar dropbox_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.972 3.115A.75.75 0 0 1 6.374 3c.14 0 .28.037.402.115l3.229 2.059 3.228-2.057a.75.75 0 0 1 .805 0l3.629 2.31h.002a.757.757 0 0 1 0 1.264h-.002L15.034 8.37l2.633 1.678h.002a.756.756 0 0 1 0 1.262h-.002l-3.63 2.312a1 1 0 0 1-.161.076c.234.08.409.275.482.5a.75.75 0 0 1-.322.854l-3.629 2.308a.75.75 0 0 1-.805 0l-3.63-2.31a.75.75 0 0 1-.229-1.031l.076-.122h.022a.75.75 0 0 1 .32-.189.8.8 0 0 1-.19-.086l-3.63-2.312a.756.756 0 0 1 0-1.264l2.632-1.678-2.632-1.676a.757.757 0 0 1 0-1.263zm2.64 2.946L6.374 4.635 4.136 6.06l2.238 1.423L8.612 6.06Zm7.262 0-2.236-1.426-2.239 1.426 2.237 1.423zm-3.637 2.306-2.232-1.422-2.233 1.422 2.235 1.422zm-3.625 2.31L6.374 9.253l-2.238 1.426 2.238 1.424 2.238-1.424Zm7.262 0-2.236-1.425-2.239 1.426 2.237 1.424 2.238-1.424Zm-2.64 2.944-3.23-2.056-3.228 2.056a.8.8 0 0 1-.185.084.7.7 0 0 1 .185.08l3.229 2.057 3.226-2.055a.8.8 0 0 1 .18-.084.8.8 0 0 1-.178-.082Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar dropdown_arrow_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 10 10\\\"><path d=\\\"M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136z\\\"/></svg>\";\n\nvar edit_comment_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 13.598v2.777h2.778l8.194-8.193-2.78-2.78L3 13.6zm13.12-7.566a.735.735 0 0 0 0-1.044l-1.734-1.73a.735.735 0 0 0-1.044 0L11.985 4.61l2.78 2.78 1.354-1.358z\\\"/></svg>\";\n\nvar emoji_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.5 8.25a1.25 1.25 0 1 1-2.499.001A1.25 1.25 0 0 1 8.5 8.25m5.5 0a1.25 1.25 0 1 1-2.499.001A1.25 1.25 0 0 1 14 8.25m-6.873 3.838a.75.75 0 1 0-1.254.824C6.88 14.444 8.423 15.25 10 15.25c1.578 0 3.12-.805 4.127-2.338a.75.75 0 0 0-1.254-.824C12.13 13.221 11.048 13.75 10 13.75c-1.047 0-2.13-.529-2.873-1.662\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M10 19a9 9 0 1 0 0-18 9 9 0 0 0 0 18m0-1.5a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15\\\"/></svg>\";\n\nvar eraser_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053z\\\"/><path d=\\\"M4 18h5.523v-1H4zm-2 0h1v-1H2z\\\"/></svg>\";\n\nvar error_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.9 4.385a1.2 1.2 0 0 0-.44.44h.002l-5.284 9.15a1.2 1.2 0 0 0 1.04 1.8h10.564a1.2 1.2 0 0 0 1.04-1.8l-5.282-9.15a1.2 1.2 0 0 0-1.64-.44m.05 8.363a.3.3 0 0 1 .115-.023h.9a.3.3 0 0 1 .3.3v.9a.3.3 0 0 1-.3.3h-.9a.3.3 0 0 1-.3-.3v-.9a.3.3 0 0 1 .185-.277m-.185-4.723a.3.3 0 0 1 .3-.3h.9a.3.3 0 0 1 .3.3v3.4a.3.3 0 0 1-.3.3h-.9a.3.3 0 0 1-.3-.3z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar export_pdf_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19 4.5 14 0H3v6.5h1.5v-5h8v5h5V11H19zM14 2l3.3 3H14zm-1.548 16.5 1.25 1.5H3v-3h1.5v1.5zm7.374-1.657a.75.75 0 1 0-1.152-.96L17.5 17.29V13H16v4.29l-1.174-1.408a.75.75 0 1 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0z\\\"/><path d=\\\"M1.63 14.24V12.3h.88c.66 0 1.14-.15 1.46-.45s.48-.71.48-1.24c0-.52-.15-.91-.44-1.2C3.7 9.15 3.28 9 2.69 9H0v5.24zm.4-3h-.4v-1.17h.46c.3 0 .5.05.62.17.1.11.16.25.16.42 0 .16-.06.3-.19.41s-.34.16-.66.16zm5.7 3c.28 0 .6-.05.96-.14.26-.07.5-.21.73-.42.22-.2.4-.47.53-.77.12-.31.19-.75.19-1.3 0-.37-.04-.7-.13-1.02a2.3 2.3 0 0 0-.42-.84c-.19-.24-.43-.43-.72-.56C8.57 9.06 8.2 9 7.72 9h-2.4v5.24zm-.4-1.19h-.4v-2.86h.4c.43 0 .73.1.91.3s.27.59.27 1.14c0 .42-.04.73-.12.91a.76.76 0 0 1-.34.4c-.14.07-.38.11-.72.11m5.3 1.2V12.1h2.02v-1.06h-2.03v-.91H15V9h-4v5.24h1.62z\\\"/></svg>\";\n\nvar export_word_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17.826 16.843a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0z\\\"/><path d=\\\"m14 0 5 4.5v9.741a2.74 2.74 0 0 0-1.5-.617V6.5h-5v-5h-8v3H3V0zm0 2v3h3.3zM3 17.5h6.746q.15.331.391.623l.731.877H3z\\\"/><path d=\\\"M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6zM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.6.6 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43z\\\"/></svg>\";\n\nvar eye_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M10 6.002a4 4 0 1 1 0 8 4 4 0 0 1 0-8m1.2 1.2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3\\\" clip-rule=\\\"evenodd\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M10.02 3.003c1.249.032 2.49.494 3.617 1.116 1.133.625 2.2 1.44 3.109 2.235a28.6 28.6 0 0 1 2.858 2.898l.171.204.046.054.012.016.004.004v.002a.8.8 0 0 1 .11.193l.02.05q.013.045.02.09l.01.054a.7.7 0 0 1 0 .146q-.002.032-.009.065l-.017.082-.024.061q-.014.038-.03.075l-.01.019a1 1 0 0 1-.06.093l-.002-.002h-.001l.002.003h-.001l-.004.005-.012.016-.046.058-.17.21a27.5 27.5 0 0 1-2.861 2.977c-.912.811-1.981 1.635-3.12 2.252-1.132.614-2.387 1.053-3.652 1.02-1.249-.031-2.49-.493-3.618-1.115-1.133-.626-2.199-1.44-3.108-2.235a28.6 28.6 0 0 1-3.029-3.102l-.045-.055-.012-.016-.004-.004-.001-.002a1 1 0 0 1-.065-.092l-.007-.015q-.025-.045-.041-.094l-.017-.042q-.014-.044-.02-.092-.007-.026-.01-.053Q0 10.042 0 10q-.002-.033 0-.065.004-.04.013-.079l.013-.06a1 1 0 0 1 .031-.084q.011-.03.025-.058l.012-.022a1 1 0 0 1 .06-.09h.001V9.54l.004-.005.012-.016.046-.057.17-.211a27.5 27.5 0 0 1 2.86-2.977c.911-.81 1.98-1.635 3.119-2.252 1.133-.614 2.388-1.052 3.652-1.02m-.04 1.499c-.902-.023-1.89.293-2.897.84-1.002.543-1.976 1.289-2.836 2.054a26 26 0 0 0-2.103 2.112l-.014.016a.695.695 0 0 0 .007.932 27 27 0 0 0 2.105 2.064c.861.753 1.838 1.495 2.846 2.051 1.013.56 2.014.906 2.931.93.903.022 1.89-.293 2.898-.84 1.002-.544 1.977-1.288 2.837-2.054a26 26 0 0 0 2.117-2.13.695.695 0 0 0-.008-.93 27 27 0 0 0-2.104-2.064c-.862-.753-1.839-1.495-2.847-2.052-1.014-.56-2.014-.906-2.932-.93\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar eye_crossed_out_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.97 2.97a.75.75 0 0 1 1.06 0L5.56 4.5q.397-.254.807-.477c1.133-.614 2.388-1.052 3.652-1.02 1.25.032 2.492.494 3.618 1.116 1.133.625 2.2 1.44 3.109 2.235a29 29 0 0 1 2.858 2.898q.112.13.171.204l.046.055.012.015.004.004v.002q.07.091.11.193l.02.05q.013.045.02.09l.01.054a1 1 0 0 1 0 .146q-.002.033-.009.065l-.017.082-.024.061q-.014.039-.03.075l-.01.019a1 1 0 0 1-.06.093l-.003-.002.002.003h-.002l-.003.006-.012.015-.046.058-.17.21a27.5 27.5 0 0 1-2.861 2.978q-.508.452-1.072.892l1.35 1.35a.75.75 0 0 1-1.02 1.098 1 1 0 0 0-.08-.097l-13-13-.043-.039a.75.75 0 0 1 .083-.961m1.27 4.432a26 26 0 0 0-2.096 2.106l-.014.016a.695.695 0 0 0 .007.932 27 27 0 0 0 2.105 2.064c.861.753 1.838 1.495 2.846 2.051 1.013.56 2.014.906 2.931.93.612.015 1.26-.128 1.93-.39l1.14 1.14c-.984.466-2.043.776-3.109.749-1.249-.032-2.491-.494-3.618-1.116-1.132-.626-2.199-1.44-3.108-2.235a28.6 28.6 0 0 1-3.029-3.102l-.045-.055-.012-.016-.004-.004-.001-.002a1 1 0 0 1-.065-.092l-.007-.015a1 1 0 0 1-.041-.094l-.017-.042q-.014-.045-.02-.091-.007-.027-.01-.054Q0 10.042 0 10v-.064q.004-.04.013-.079l.013-.06a1 1 0 0 1 .031-.084q.011-.03.025-.058l.012-.022a1 1 0 0 1 .06-.09h.001V9.54l.004-.005.012-.016.046-.057.17-.211a27.6 27.6 0 0 1 2.788-2.913zm6.522 6.523a4 4 0 0 1-.762.077 4 4 0 0 1-3.926-4.766zM9.98 4.502c-.902-.023-1.89.293-2.897.84q-.218.117-.434.248l1.103 1.102a4 4 0 0 1 5.557 5.557l1.3 1.3c.397-.301.782-.619 1.145-.942a26 26 0 0 0 2.117-2.13.696.696 0 0 0-.008-.93 27 27 0 0 0-2.104-2.064c-.861-.753-1.84-1.495-2.847-2.052-1.014-.559-2.014-.906-2.932-.93m1.22 2.7c-.809 0-1.466.64-1.497 1.441l1.555 1.555a1.5 1.5 0 0 0-.058-2.996\\\"/></svg>\";\n\nvar facebook_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.01 2C5.59 2 2 5.59 2 10.01a8.01 8.01 0 0 0 6.775 7.914.75.75 0 0 0 .598-.17.75.75 0 0 0 .262-.565v-5.02a.75.75 0 0 0-.22-.524.75.75 0 0 0-.526-.221H7.77v-.627h1.12a.75.75 0 0 0 .525-.22c.14-.14.22-.329.22-.526V8.324c0-.466.122-1.083.524-1.48.33-.326 1.017-.6 2.332-.43v.408c-.152.012-.305.017-.457.04-.335.048-.662.136-.943.326-.313.21-.497.505-.59.804s-.107.602-.107.88v1.18a.746.746 0 0 0 .744.746h1.158l-.098.63h-1.06a.744.744 0 0 0-.744.744v5.017a.75.75 0 0 0 .26.567q.123.105.28.148a.75.75 0 0 0 .319.022A8.012 8.012 0 0 0 10.01 2m0 1.486a6.52 6.52 0 0 1 6.521 6.524c0 2.945-1.973 5.386-4.65 6.197v-3.291h.951a.75.75 0 0 0 .736-.63l.332-2.12a.74.74 0 0 0-.17-.6.75.75 0 0 0-.564-.26h-1.285V8.87c0-.252.024-.384.039-.433q.003-.011.002-.016c.016-.011.104-.055.326-.088a7 7 0 0 1 .984-.05.75.75 0 0 0 .528-.218.74.74 0 0 0 .217-.527V5.76a.75.75 0 0 0-.586-.729c-2.04-.438-3.433-.083-4.278.75-.818.807-.968 1.884-.968 2.543v.983H7.027a.74.74 0 0 0-.525.22.74.74 0 0 0-.219.526v2.119c0 .197.08.386.219.525.14.14.328.221.525.221h1.118v3.291c-2.681-.809-4.659-3.25-4.659-6.197a6.523 6.523 0 0 1 6.524-6.526\\\"/></svg>\";\n\nvar file_upload_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.146 11.22a.75.75 0 0 1 1.061 0l3.677 3.678a.75.75 0 0 1-1.06 1.06l-2.397-2.396v5.689a.75.75 0 0 1-1.5 0v-5.69L3.53 15.959a.75.75 0 0 1-1.06-1.06z\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M17.75 5.94v11.61a.95.95 0 0 1-.95.951h-6.3a.75.75 0 0 1 0-1.5h5.75v-10H11.7a.95.95 0 0 1-.95-.95V1.5h-6v8.66l-1.5 1.5V.95A.95.95 0 0 1 4.2 0h7.61zm-5.5-.439h2.94l-2.94-2.94z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar find_replace_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286z\\\"/><path d=\\\"M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306m-3.4-5.715c.562.305.742 1.106.354 1.494s-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.5 6.5 0 0 1 3.1.784\\\"/><path d=\\\"M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0m11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0\\\"/></svg>\";\n\nvar font_background_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m8.38 9.262H7.62L10 5.506zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453z\\\"/></svg>\";\n\nvar font_color_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M12.4 10.3 10 4.5l-2.4 5.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2\\\"/></svg>\";\n\nvar font_family_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973zm-2.754 2.5L8.038 4.785 5.261 11.5zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663z\\\"/></svg>\";\n\nvar font_size_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825q0-.063.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782q.003.065.003.135z\\\"/></svg>\";\n\nvar footnote_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19.832 7.469V1h-1.004q-.21.59-.778 1.03-.567.443-1.05.6v1.121a4.3 4.3 0 0 0 1.595-.936v4.654zM5.465 7.452q1.19 0 1.934.27t1.094.682q.35.405.49 1.029.08.387.08 1.398v2.021q0 2.115.095 2.68.105.556.404 1.07H7.916a3.1 3.1 0 0 1-.315-1.103q-.876.716-1.69 1.01a5 5 0 0 1-1.733.296q-1.531 0-2.355-.716-.822-.725-.823-1.846 0-.657.307-1.196.315-.547.814-.876a4 4 0 0 1 1.138-.497q.465-.118 1.4-.228 1.908-.219 2.81-.522.009-.312.009-.397 0-.926-.447-1.305-.603-.514-1.794-.514-1.111 0-1.646.379-.525.37-.779 1.322l-1.54-.202q.21-.953.69-1.533.483-.59 1.392-.902.911-.32 2.11-.32m7.048 1.034Q13.51 7.26 15.06 7.26q.858 0 1.62.343.77.334 1.26.952.5.61.78 1.475a6 6 0 0 1 .28 1.854q0 2.341-1.182 3.62t-2.837 1.278q-1.645 0-2.582-1.347v1.141h-1.461V4h1.575zm-5.044 3.625q-.858.337-2.573.574-.972.134-1.375.303a1.35 1.35 0 0 0-.622.497 1.24 1.24 0 0 0-.218.716q0 .606.472 1.01.482.405 1.4.405.912 0 1.62-.379.71-.387 1.043-1.052.253-.515.253-1.517zM14.92 8.53q-1.033 0-1.786.884-.753.875-.753 2.54 0 1.638.455 2.367.744 1.193 2.014 1.193 1.032 0 1.785-.875.753-.884.753-2.625 0-1.785-.727-2.634-.717-.85-1.741-.85\\\"/></svg>\";\n\nvar fullscreen_enter_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.5 5.75a.75.75 0 0 1 0-1.5H15a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0V6.81l-2.72 2.72a.75.75 0 0 1-1.06-1.06l2.72-2.72zm-1.97 4.72a.75.75 0 0 1 0 1.06l-2.72 2.72H8.5a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 1.5 0v1.69l2.72-2.72a.75.75 0 0 1 1.06 0\\\"/><path d=\\\"M2 0h16a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m16 1.5H2a.5.5 0 0 0-.5.5v16a.5.5 0 0 0 .5.5h16a.5.5 0 0 0 .5-.5V2a.5.5 0 0 0-.5-.5\\\"/></svg>\";\n\nvar fullscreen_leave_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.53 5.53a.75.75 0 0 0-1.06-1.06l-2.72 2.72V5.5a.75.75 0 0 0-1.5 0V9a.75.75 0 0 0 .75.75h3.5a.75.75 0 0 0 0-1.5h-1.69zM5.5 10.25a.75.75 0 0 0 0 1.5h1.69l-2.72 2.72a.75.75 0 1 0 1.06 1.06l2.72-2.72v1.69a.75.75 0 0 0 1.5 0V11a.75.75 0 0 0-.75-.75z\\\"/><path d=\\\"M0 2a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm18.5 0a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v16a.5.5 0 0 0 .5.5h16a.5.5 0 0 0 .5-.5z\\\"/></svg>\";\n\nvar google_drive_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.666 3a.74.74 0 0 0-.371.1.75.75 0 0 0-.275.267l-4.918 8.397a.74.74 0 0 0-.006.744l2.46 4.318a.75.75 0 0 0 .65.377h9.606a.75.75 0 0 0 .65-.377l2.46-4.318a.74.74 0 0 0 .002-.735l-4.688-8.392a.75.75 0 0 0-.654-.38H7.666Zm1.285 1.492h3.195l3.854 6.9h-3.1zm-1.293.742L9.223 7.97l-4.016 6.988-1.6-2.813zm2.424 4.237 1.098 1.922H8.977zM8.12 12.885h7.87l-1.61 2.825H6.494z\\\"/></svg>\";\n\nvar google_photos_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.258 3.082c0-.594.486-1.082 1.08-1.082a4.38 4.38 0 0 1 4.239 5.489c-.18.688-.633 1.245-1.109 1.767h3.468c.595 0 1.082.488 1.082 1.082a4.382 4.382 0 0 1-5.49 4.24v-.001c-.689-.18-1.246-.633-1.768-1.109v3.468c0 .595-.487 1.082-1.082 1.082a4.38 4.38 0 0 1-4.111-2.866 4.4 4.4 0 0 1-.125-2.624c.18-.689.632-1.246 1.108-1.768H3.082A1.085 1.085 0 0 1 2 9.68a4.382 4.382 0 0 1 5.49-4.238c.69.18 1.246.632 1.768 1.108zm3.164 1.32c-.435-.46-1.043-.667-1.662-.767v5.49c.619-.1 1.227-.307 1.662-.766a2.875 2.875 0 0 0 0-3.958ZM7.21 6.918a2.88 2.88 0 0 0-2.93.789c-.396.423-.569.983-.658 1.55h5.56c-.045-.295-.091-.59-.224-.859a2.88 2.88 0 0 0-1.748-1.48m9.254 3.841h-5.653l.013.1c.012.098.025.197.053.292a2.873 2.873 0 0 0 4.862 1.158 3 3 0 0 0 .398-.54v-.001q.167-.294.263-.619c.026-.092.038-.188.05-.283zm-8.872 4.86c.437.459 1.045.666 1.665.766V10.89c-1.369.222-2.456 1.314-2.456 2.747 0 .738.283 1.447.791 1.981Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar heading1_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19 9v10h-2v-8h-2V9zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1z\\\"/></svg>\";\n\nvar heading2_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1zm16.076 8.343V18.5h-6.252q.1-.94.61-1.78.507-.841 2.005-2.232 1.206-1.124 1.479-1.523.368-.552.368-1.092 0-.597-.32-.917-.321-.32-.886-.32-.559 0-.889.336t-.38 1.117l-1.778-.178q.159-1.473.997-2.114t2.095-.64q1.377 0 2.164.742t.787 1.847q0 .629-.225 1.197-.225.567-.714 1.19-.324.412-1.168 1.187-.845.774-1.07 1.028a3 3 0 0 0-.365.495z\\\"/></svg>\";\n\nvar heading3_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1zm9.989 7.53 1.726-.209q.082.66.445 1.01.36.348.876.349.552 0 .93-.42.377-.418.377-1.13 0-.672-.362-1.066a1.15 1.15 0 0 0-.882-.393q-.342 0-.819.133l.197-1.453q.723.019 1.105-.315.38-.333.38-.885 0-.47-.279-.75-.28-.278-.743-.278a1.07 1.07 0 0 0-.78.317q-.324.317-.394.927l-1.644-.28q.172-.844.517-1.348.347-.505.965-.794a3.24 3.24 0 0 1 1.387-.289q1.314 0 2.108.838.654.685.653 1.549 0 1.225-1.339 1.955.8.171 1.28.768.478.597.478 1.441 0 1.226-.895 2.088-.894.864-2.228.864-1.263 0-2.094-.727-.832-.727-.965-1.901z\\\"/></svg>\";\n\nvar heading4_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5zm0-3.44v-3.18l-2.14 3.18z\\\"/></svg>\";\n\nvar heading5_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1zm9.578 7.607 1.777-.184q.076.603.45.955a1.223 1.223 0 0 0 1.81-.101q.387-.455.387-1.368 0-.857-.384-1.286-.384-.428-1-.428-.768 0-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.7 2.7 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863q.825.864.825 2.241a3.36 3.36 0 0 1-.666 2.05q-.907 1.232-2.52 1.232-1.29 0-2.101-.692-.813-.691-.971-1.86\\\"/></svg>\";\n\nvar heading6_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1zm15.595 2.973-1.726.19q-.064-.532-.33-.787-.267-.253-.692-.253-.565 0-.956.507-.39.508-.492 2.114.667-.787 1.657-.787 1.117 0 1.914.85.797.852.797 2.197 0 1.428-.838 2.291-.838.864-2.152.864-1.41 0-2.317-1.095t-.908-3.59q0-2.558.946-3.688t2.457-1.13q1.059 0 1.755.594.694.593.885 1.723m-4.043 3.891q0 .87.4 1.343.398.473.914.473.495 0 .825-.388.33-.386.33-1.27 0-.906-.355-1.329a1.12 1.12 0 0 0-.89-.422q-.513 0-.869.403c-.356.403-.355.666-.355 1.19\\\"/></svg>\";\n\nvar history_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1\\\"/><path d=\\\"M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052zM11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z\\\"/></svg>\";\n\nvar horizontal_line_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 9h16v2H2z\\\"/></svg>\";\n\nvar html_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17 0a2 2 0 0 1 2 2v7a1 1 0 0 1 1 1v5a1 1 0 0 1-.883.993l-.118.006L19 17a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2l-.001-1.001-.116-.006A1 1 0 0 1 0 15v-5a1 1 0 0 1 .999-1L1 2a2 2 0 0 1 2-2zm.499 15.999h-15L2.5 17a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5zm-3.478-6.013-.014.014H14v.007l-1.525 1.525-1.46-1.46-.015.013V10h-1v5h1v-3.53l1.428 1.43.048.043.131-.129L14 11.421V15h1v-5h-.965zM2 10H1v5h1v-2h2v2h1v-5H4v2H2zm7 0H6v1h1v4h1v-4h1zm8 0h-1v5h3v-1h-2zm0-8.5H3a.5.5 0 0 0-.5.5l-.001 6.999h15L17.5 2a.5.5 0 0 0-.5-.5M10 7v1H4V7zm3-2v1H4V5zm-3-2v1H4V3z\\\"/></svg>\";\n\nvar image_asset_manager_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1c-.662 0-1.2.47-1.2 1.1v14.248c0 .64.533 1.152 1.185 1.152h6.623v-7.236L6.617 9.15a.694.694 0 0 0-.957-.033L1.602 13.55V2.553l14.798.003V9.7H18V2.1c0-.63-.547-1.1-1.2-1.1zm11.723 2.805a2.1 2.1 0 0 0-1.621.832 2.127 2.127 0 0 0 1.136 3.357 2.13 2.13 0 0 0 2.611-1.506 2.13 2.13 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.366-.44Z\\\"/><path d=\\\"M19.898 12.369v6.187a.844.844 0 0 1-.844.844h-8.719a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.531a.84.84 0 0 1 .597.248l.838.852h4.75c.223 0 .441.114.6.272a.84.84 0 0 1 .247.597m-1.52.654-4.377.02-1.1-1.143H11v6h7.4l-.023-4.877Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar image_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1zM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1zm-5.655 6a2.13 2.13 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7\\\"/></svg>\";\n\nvar image_upload_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a3 3 0 0 1-.414-.287 3 3 0 0 1-1.055-2.03 3 3 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.13 2.13 0 0 0-1.875-.978\\\"/><path d=\\\"M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/><path d=\\\"M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/></svg>\";\n\nvar image_url_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h7.029a5.4 5.4 0 0 1 .615-4.338l.762-1.232-2.975-2.78a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v6.023q.675.195 1.307.573l.058.033q.068.042.135.086V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.15 2.15 0 0 0-1.611.834 2.1 2.1 0 0 0-.438 1.158 2.14 2.14 0 0 0 1.277 2.096 2.132 2.132 0 0 0 2.645-3.11 2.13 2.13 0 0 0-1.873-.978\\\"/><path d=\\\"M16.63 10.294a3.003 3.003 0 0 0-4.142.887l-.117.177a.65.65 0 0 0-.096.492.66.66 0 0 0 .278.418.7.7 0 0 0 .944-.234 1.74 1.74 0 0 1 2.478-.463 1.87 1.87 0 0 1 .476 2.55.64.64 0 0 0-.071.5.65.65 0 0 0 .309.396.627.627 0 0 0 .869-.19l.027-.041a3.226 3.226 0 0 0-.956-4.492Zm-6.061 3.78-.044.066a3.23 3.23 0 0 0 .82 4.403 3.005 3.005 0 0 0 4.275-.798l.13-.197a.63.63 0 0 0 .092-.475.64.64 0 0 0-.268-.402.713.713 0 0 0-.99.26l-.018.029a1.74 1.74 0 0 1-2.477.461 1.87 1.87 0 0 1-.475-2.55l.029-.047a.65.65 0 0 0 .086-.485.66.66 0 0 0-.275-.408l-.04-.027a.61.61 0 0 0-.845.17\\\"/><path d=\\\"M15.312 13.925c.24-.36.154-.838-.19-1.067-.346-.23-.82-.124-1.059.236l-1.268 1.907c-.239.36-.153.838.192 1.067.345.23.818.123 1.057-.236z\\\"/></svg>\";\n\nvar import_export_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822zM14 5V2l3.3 3zm-3.692 12.5q.093.157.213.303L11.52 19H8v-.876a2.24 2.24 0 0 0 1.82-.624zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z\\\"/></svg>\";\n\nvar import_word_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0zm0 2v3h3.3zm-3.26 16a2.8 2.8 0 0 1-.469-.5H3V19h9.25v-.374A2.74 2.74 0 0 1 10.74 18\\\"/><path d=\\\"M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6zM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43zm4.191 6.612a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0z\\\"/></svg>\";\n\nvar indent_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5M1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z\\\"/></svg>\";\n\nvar info_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 8.251a.75.75 0 0 1 .75.75v5.5a.75.75 0 0 1-1.5 0v-5.5a.75.75 0 0 1 .75-.75m0-3.5a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-1.5 0v-.5a.75.75 0 0 1 .75-.75\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M10 .751a9.25 9.25 0 1 1 0 18.5 9.25 9.25 0 0 1 0-18.5m0 1.5a7.75 7.75 0 1 0 0 15.5 7.75 7.75 0 0 0 0-15.5\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar insert_merge_field_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><circle cx=\\\"10\\\" cy=\\\"9.8\\\" r=\\\"1.5\\\"/><path d=\\\"M13.25 2.75V2h.035a6 6 0 0 1 .363.014c.21.013.517.041.785.109.397.1.738.281 1.007.55s.429.587.524.907c.182.608.15 1.314.108 1.913l-.03.408c-.038.487-.073.93-.053 1.353.026.527.136.879.333 1.112.223.263.494.428.72.528a2 2 0 0 0 .335.117l.01.002.613.109v.628h-2.402a3.3 3.3 0 0 1-.42-.415c-.509-.601-.655-1.345-.687-2.009-.025-.527.02-1.094.059-1.592l.026-.347c.044-.621.044-1.067-.049-1.377a.63.63 0 0 0-.148-.276.64.64 0 0 0-.313-.157 3 3 0 0 0-.512-.066 6 6 0 0 0-.286-.01h-.016L13.25 3.5h-.75V2h.75z\\\"/><path d=\\\"M13.25 16.75v.75h.035a7 7 0 0 0 .363-.014 4.6 4.6 0 0 0 .785-.109c.397-.1.738-.28 1.007-.55.268-.269.429-.587.524-.907.182-.608.15-1.314.108-1.912l-.03-.41c-.038-.486-.073-.93-.053-1.352.026-.527.136-.879.333-1.112.223-.263.494-.428.72-.528a2 2 0 0 1 .335-.117l.01-.002.613-.109V9.75h-2.402a3.3 3.3 0 0 0-.42.416c-.509.6-.655 1.344-.687 2.008-.025.527.02 1.095.059 1.592l.026.347c.044.621.044 1.067-.049 1.378a.63.63 0 0 1-.148.275.64.64 0 0 1-.313.157 3 3 0 0 1-.512.066 6 6 0 0 1-.286.01l-.016.001H12.5v1.5h.75zm-6.5-14V2h-.035a6 6 0 0 0-.363.014 4.6 4.6 0 0 0-.785.109 2.13 2.13 0 0 0-1.008.55 2.1 2.1 0 0 0-.524.907c-.181.608-.15 1.314-.108 1.913l.031.408c.038.487.073.93.052 1.353-.025.527-.136.879-.333 1.112a2 2 0 0 1-.718.528 2 2 0 0 1-.337.117l-.01.002L2 9.122v.628h2.402a3.3 3.3 0 0 0 .42-.415c.509-.601.654-1.345.686-2.009.026-.527-.019-1.094-.058-1.592q-.015-.18-.026-.347c-.044-.621-.044-1.067.048-1.377a.63.63 0 0 1 .149-.276.64.64 0 0 1 .312-.157c.13-.032.323-.054.513-.066a6 6 0 0 1 .286-.01h.015L6.75 3.5h.75V2h-.75zm0 14v.75h-.035a7 7 0 0 1-.363-.014 4.6 4.6 0 0 1-.785-.109 2.13 2.13 0 0 1-1.008-.55 2.1 2.1 0 0 1-.524-.907c-.181-.608-.15-1.314-.108-1.912l.031-.41c.038-.486.073-.93.052-1.352-.025-.527-.136-.879-.333-1.112a2 2 0 0 0-.718-.528 2 2 0 0 0-.337-.117l-.01-.002L2 10.378V9.75h2.402q.218.178.42.416c.509.6.654 1.344.686 2.008.026.527-.019 1.095-.058 1.592q-.015.18-.026.347c-.044.621-.044 1.067.048 1.378a.63.63 0 0 0 .149.275.64.64 0 0 0 .312.157c.13.032.323.054.513.066a6 6 0 0 0 .286.01l.015.001H7.5v1.5h-.75z\\\"/></svg>\";\n\nvar italic_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m9.586 14.633.021.004q-.054.502.393.962.123.125.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15q.711-.106 1.005-.334.235-.182.404-.597l2.416-9.55a1.05 1.05 0 0 0-.281-.823 1.1 1.1 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195q-.564.084-.823.296-.323.263-.623.79z\\\"/></svg>\";\n\nvar legal_style_list_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".16\\\" d=\\\"M35 20a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H15.5a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M8.508 9.561q.567-.44.778-1.03h1.004V15H9.053v-4.654a4.3 4.3 0 0 1-1.595.936v-1.121q.483-.158 1.05-.6m4.525 4.204V15h-1.235v-1.235zm1.299 10.204v-6.47h-1.004q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235H15.84v1.235zm4.099 0v-6.47H20.17q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235h-1.235v1.235zM19.032 27.5v6.469h-1.237v-4.654a4.3 4.3 0 0 1-1.595.936V29.13q.483-.158 1.05-.6.568-.44.778-1.03zm2.743 5.234v1.235H20.54v-1.235zm4.357 1.335v-6.47h-1.004q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235H27.64v1.235zm4.357 0v-6.47h-1.004q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235H34.74v1.235z\\\"/></svg>\";\n\nvar line_height_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m17.975 15.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825q0-.063.002-.123l-.77.77L15 4.765 17.196 2.5l2.265 2.265-.707.707-.782-.782q.003.065.003.135zM1 15.75c0 .414.273.75.61.75h8.067a.56.56 0 0 0 .43-.22.85.85 0 0 0 .18-.53.85.85 0 0 0-.18-.53.56.56 0 0 0-.43-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53m0-12c0 .414.273.75.61.75h11.78a.56.56 0 0 0 .431-.22.85.85 0 0 0 .179-.53.85.85 0 0 0-.178-.53.56.56 0 0 0-.431-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53m0 4c0 .414.273.75.61.75h11.78a.56.56 0 0 0 .431-.22.85.85 0 0 0 .179-.53.85.85 0 0 0-.178-.53.56.56 0 0 0-.431-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53m0 4c0 .414.273.75.61.75h11.78a.56.56 0 0 0 .431-.22.85.85 0 0 0 .179-.53.85.85 0 0 0-.178-.53.56.56 0 0 0-.431-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53\\\"/></svg>\";\n\nvar link_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184\\\"/></svg>\";\n\nvar list_style_circle_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4\\\"/></svg>\";\n\nvar list_style_decimal_leading_zero_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M5.714 15.11q.935 0 1.46-.66.632-.799.632-2.627 0-1.832-.629-2.624-.527-.668-1.463-.668t-1.459.66q-.633.8-.633 2.619 0 1.854.576 2.577.577.723 1.516.723m0-1.024a.6.6 0 0 1-.398-.14q-.173-.141-.287-.565-.115-.424-.115-1.558c0-1.134.043-1.294.128-1.613q.096-.37.272-.512a.62.62 0 0 1 .4-.143.6.6 0 0 1 .398.143q.173.143.288.567t.114 1.558c0 1.134-.043 1.292-.128 1.608q-.096.37-.272.512a.62.62 0 0 1-.4.143m6.078.914V8.531H10.79q-.21.59-.778 1.03-.567.442-1.05.6v1.121a4.3 4.3 0 0 0 1.595-.936V15zm3.344 0v-1.235h-1.235V15zm-9.422 9.11q.935 0 1.46-.66.632-.799.632-2.627 0-1.833-.629-2.624-.527-.668-1.463-.668t-1.459.66q-.633.8-.633 2.619 0 1.854.576 2.577.577.723 1.516.723m0-1.024a.6.6 0 0 1-.398-.14q-.173-.142-.287-.565-.115-.424-.115-1.558c0-1.134.043-1.294.128-1.613q.096-.37.272-.512a.62.62 0 0 1 .4-.143.6.6 0 0 1 .398.143q.173.142.288.567t.114 1.558c0 1.134-.043 1.292-.128 1.608q-.096.37-.272.512a.62.62 0 0 1-.4.143m7.088.914v-1.147H10.35q.097-.167.253-.343.155-.175.74-.712t.81-.821q.338-.431.493-.824.156-.394.156-.829 0-.765-.544-1.279-.546-.514-1.499-.514-.87 0-1.45.444t-.69 1.463l1.23.124q.036-.54.264-.774t.615-.233q.391 0 .613.222t.222.635q0 .374-.255.756-.189.277-1.024 1.055-1.037.962-1.388 1.544-.352.583-.422 1.233zm2.334 0v-1.235h-1.235V24zM5.714 34.11q.935 0 1.46-.66.632-.799.632-2.627 0-1.832-.629-2.624-.527-.668-1.463-.668t-1.459.66q-.633.8-.633 2.619 0 1.854.576 2.577.577.723 1.516.723m0-1.024a.6.6 0 0 1-.398-.14q-.173-.142-.287-.565-.115-.424-.115-1.558c0-1.134.043-1.294.128-1.613q.096-.37.272-.512a.62.62 0 0 1 .4-.143.6.6 0 0 1 .398.143q.173.142.288.567t.114 1.558c0 1.134-.043 1.292-.128 1.608q-.096.37-.272.512a.62.62 0 0 1-.4.143m4.992 1.024q.924 0 1.543-.598.62-.597.62-1.446 0-.585-.332-.997a1.5 1.5 0 0 0-.886-.532q.927-.505.927-1.353 0-.598-.452-1.073-.55-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.6 1.6 0 0 0-.667.55q-.24.349-.359.933l1.139.194q.048-.422.272-.642t.54-.22q.321 0 .515.194c.194.194.193.302.193.518q0 .383-.264.613-.263.231-.764.218l-.136 1.006q.33-.092.566-.092.36 0 .611.272.25.273.25.739 0 .492-.26.782a.83.83 0 0 1-.644.29.84.84 0 0 1-.607-.242q-.25-.241-.308-.698l-1.195.145q.093.813.668 1.316t1.45.503m4.43-.11v-1.235h-1.235V34z\\\"/></svg>\";\n\nvar list_style_decimal_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M10.29 15V8.531H9.286q-.21.59-.778 1.03-.567.442-1.05.6v1.121a4.3 4.3 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15zM11.3 24v-1.147H8.848q.096-.167.252-.343.156-.175.74-.712.585-.536.81-.821.338-.431.494-.824.156-.394.156-.829 0-.765-.545-1.279t-1.499-.514q-.87 0-1.45.444t-.69 1.463l1.23.124q.036-.54.264-.774.23-.233.616-.233.39 0 .613.222t.222.635q0 .374-.255.756-.19.277-1.024 1.055-1.038.962-1.389 1.544T6.971 24zm2.333 0v-1.235h-1.235V24zM9.204 34.11q.922 0 1.542-.598.62-.597.62-1.446 0-.585-.332-.997a1.5 1.5 0 0 0-.886-.532q.928-.505.928-1.353 0-.598-.453-1.073-.549-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.6 1.6 0 0 0-.668.55q-.24.349-.358.933l1.138.194q.048-.422.272-.642t.54-.22q.322 0 .515.194c.193.194.193.302.193.518q0 .383-.263.613-.263.231-.765.218l-.136 1.006q.33-.092.567-.092.36 0 .61.272.251.273.251.739 0 .492-.261.782a.83.83 0 0 1-.644.29.84.84 0 0 1-.607-.242q-.251-.241-.307-.698l-1.196.145q.093.813.668 1.316t1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z\\\"/></svg>\";\n\nvar list_style_disc_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6\\\"/></svg>\";\n\nvar list_style_lower_latin_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M9.62 14.105q.408 0 .768-.153c.36-.153.466-.257.677-.462q.013.036.044.145.07.242.119.365h1.221a2.7 2.7 0 0 1-.222-.626q-.06-.293-.059-.908l.013-1.441q0-.804-.165-1.105-.165-.302-.569-.497-.405-.195-1.23-.195-.91 0-1.371.325-.462.325-.65 1.002l1.12.202q.114-.326.299-.455.184-.13.514-.13.488 0 .663.152.176.151.176.508v.123q-.333.14-1.2.303-.641.123-.982.288t-.53.474a1.33 1.33 0 0 0-.188.706q0 .598.415.988.416.391 1.136.391zm.368-.87a.68.68 0 0 1-.492-.189.6.6 0 0 1-.193-.448q0-.263.241-.435.159-.105.673-.215a7 7 0 0 0 .751-.19v.247q0 .443-.048.602a.77.77 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14zM10.2 25.105q.813 0 1.382-.646.57-.645.57-1.84 0-1.156-.559-1.774a1.82 1.82 0 0 0-1.41-.617q-.783 0-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592q.39.2.79.2zm-.299-.975q-.531 0-.852-.492-.23-.348-.229-1.073 0-.703.295-1.048a.93.93 0 0 1 .738-.345q.453 0 .743.354t.29 1.154q0 .751-.288 1.1t-.697.35m4.478.87v-1.235h-1.234V25zm-4.017 9.105q.9 0 1.437-.426.536-.426.725-1.261l-1.213-.207q-.092.489-.316.688a.83.83 0 0 1-.576.2.92.92 0 0 1-.75-.343q-.278-.343-.278-1.173 0-.747.274-1.066.275-.318.736-.318.348 0 .565.184t.28.55l1.216-.22q-.22-.751-.722-1.119-.504-.366-1.356-.366-1.042 0-1.653.643-.61.645-.61 1.8 0 1.143.608 1.788.609.646 1.633.646M14.633 34v-1.235h-1.235V34z\\\"/></svg>\";\n\nvar list_style_lower_roman_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11.88 8.7V7.558h-1.234V8.7zm0 5.3V9.333h-1.234V14zm2.5 0v-1.235h-1.234V14zm-4.75 4.7v-1.142H8.395V18.7zm0 5.3v-4.667H8.395V24zm2.5-5.3v-1.142h-1.234V18.7zm0 5.3v-4.667h-1.234V24zm2.501 0v-1.235h-1.235V24zM7.38 28.7v-1.142H6.145V28.7zm0 5.3v-4.667H6.145V34zm2.5-5.3v-1.142H8.646V28.7zm0 5.3v-4.667H8.646V34zm2.5-5.3v-1.142h-1.234V28.7zm0 5.3v-4.667h-1.234V34zm2.501 0v-1.235h-1.235V34z\\\"/></svg>\";\n\nvar list_style_square_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M14 27v6H8v-6zm0-9v6H8v-6zm0-9v6H8V9z\\\"/></svg>\";\n\nvar list_style_upper_latin_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15zM9.352 25q1.244-.009 1.569-.044.518-.057.872-.305.354-.249.558-.664t.205-.855q0-.558-.317-.97-.315-.414-.905-.585a1.5 1.5 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83q0-.419-.197-.754a1.65 1.65 0 0 0-.495-.539 1.7 1.7 0 0 0-.672-.266q-.375-.063-1.14-.063H7.158V25zm.142-3.88H8.46v-1.49h.747q.918 0 1.112.022.325.04.49.226.165.188.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 12 12 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05q.888 0 1.154.092.266.093.406.295a.84.84 0 0 1 .14.492q0 .342-.181.547a.8.8 0 0 1-.473.257q-.189.04-.892.04M14.88 25v-1.235h-1.234V25zm-5.018 9.11q1.037 0 1.711-.512t.965-1.567l-1.261-.4q-.163.708-.536 1.037-.375.33-.892.33-.704 0-1.143-.519-.44-.518-.44-1.74 0-1.15.447-1.665.445-.514 1.162-.514.52 0 .881.29.362.29.477.79l1.288-.307q-.22-.774-.66-1.187-.738-.698-1.92-.698-1.353 0-2.184.89-.83.89-.83 2.498 0 1.521.825 2.397.826.877 2.11.877M14.88 34v-1.235h-1.234V34z\\\"/></svg>\";\n\nvar list_style_upper_roman_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11.916 15V8.558h-1.301V15zm2.465 0v-1.235h-1.235V15zM9.665 25v-6.442h-1.3V25zm2.5 0v-6.442h-1.3V25zm2.466 0v-1.235h-1.235V25zm-7.216 9v-6.442h-1.3V34zm2.5 0v-6.442h-1.3V34zm2.501 0v-6.442h-1.3V34zm2.465 0v-1.235h-1.235V34z\\\"/></svg>\";\n\nvar list_style_arabic_indic_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M14.88 15v-1.235h-1.234V15zm0 10v-1.235h-1.234V25zm0 9v-1.235h-1.234V34z\\\"/><text x=\\\"9\\\" y=\\\"15\\\" font-family=\\\"sans-serif\\\" font-size=\\\"8\\\" font-weight=\\\"bold\\\" text-anchor=\\\"middle\\\">١</text><text x=\\\"9\\\" y=\\\"25\\\" font-family=\\\"sans-serif\\\" font-size=\\\"8\\\" font-weight=\\\"bold\\\" text-anchor=\\\"middle\\\">٢</text><text x=\\\"9\\\" y=\\\"34\\\" font-family=\\\"sans-serif\\\" font-size=\\\"8\\\" font-weight=\\\"bold\\\" text-anchor=\\\"middle\\\">٣</text></svg>\";\n\nvar local_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M4.2 3c-.584 0-1.145.23-1.557.643A2.2 2.2 0 0 0 2 5.199v8.719a2.194 2.194 0 0 0 2.2 2.195h11.624a2.194 2.194 0 0 0 2.196-2.195V7.621a2.194 2.194 0 0 0-2.195-2.2h-5.393l-1.237-2.06A.75.75 0 0 0 8.56 3zm0 1.488h3.935l1.236 2.06a.75.75 0 0 0 .64.362h5.813a.71.71 0 0 1 .707.71v6.298a.707.707 0 0 1-.707.707H4.2a.71.71 0 0 1-.71-.707V5.199a.71.71 0 0 1 .71-.71Z\\\"/></svg>\";\n\nvar loupe_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.68 13.74 4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474M13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0\\\"/></svg>\";\n\nvar low_vision_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.1 11.1 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.5.5 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304q-.387.166-.757.365l6.239 6.24-.006.005.78.78q-.582.141-1.174.215l-1.11-1.11h.011L4.55 8.197a7 7 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10 10 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a3 3 0 0 0-.124.2q-.065.116-.108.241a.5.5 0 0 0-.028.133.3.3 0 0 0 .008.072 1 1 0 0 0 .082.226q.1.2.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93m7.07.531a4.63 4.63 0 0 1 1.108 5.992l.345.344.046-.018a9.3 9.3 0 0 0 2-1.112q.385-.281.727-.613.207-.2.392-.431.109-.135.203-.286.086-.14.148-.292a1 1 0 0 0 .036-.12.3.3 0 0 0 .008-.072.5.5 0 0 0-.028-.133 1 1 0 0 0-.036-.096 2 2 0 0 0-.071-.145 3 3 0 0 0-.125-.2 4 4 0 0 0-.263-.335 5.4 5.4 0 0 0-.53-.523 8 8 0 0 0-1.054-.768 9.8 9.8 0 0 0-1.879-.891q-.506-.178-1.027-.301m-2.85.21-.069.002a.5.5 0 0 0-.254.097.496.496 0 0 0-.104.679.5.5 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.49.49 0 0 0 .45.287h.008a.5.5 0 0 0 .35-.158.48.48 0 0 0 .13-.335.6.6 0 0 0-.048-.219 3.4 3.4 0 0 0-.36-.723 3.44 3.44 0 0 0-2.791-1.543l-.028-.001z\\\"/></svg>\";\n\nvar magic_wand_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.346 9.422a.151.151 0 0 1 .284 0l.548 1.484a.15.15 0 0 0 .09.089l1.483.549a.151.151 0 0 1 0 .284l-1.483.548a.15.15 0 0 0-.09.09l-.548 1.483a.15.15 0 0 1-.142.1.15.15 0 0 1-.142-.1l-.549-1.483a.15.15 0 0 0-.09-.09l-1.483-.548a.15.15 0 0 1 0-.284l1.484-.549a.15.15 0 0 0 .089-.09zm.96-7.68a.151.151 0 0 1 .284 0l.549 1.483a.15.15 0 0 0 .089.09l1.483.548a.15.15 0 0 1 .072.229.15.15 0 0 1-.072.055l-1.483.549a.15.15 0 0 0-.09.09l-.548 1.482a.151.151 0 0 1-.284 0l-.549-1.483a.15.15 0 0 0-.09-.09l-1.483-.548a.151.151 0 0 1 0-.284l1.484-.549a.15.15 0 0 0 .09-.089zm-8.641 0a.151.151 0 0 1 .284 0l.549 1.483a.15.15 0 0 0 .09.09l1.482.548a.15.15 0 0 1 .072.229.15.15 0 0 1-.072.055l-1.483.549a.15.15 0 0 0-.09.09L7.95 6.267a.151.151 0 0 1-.284 0l-.549-1.483a.15.15 0 0 0-.089-.09l-1.483-.548a.151.151 0 0 1 0-.284l1.483-.549a.15.15 0 0 0 .09-.089l.548-1.483zm7.055 6.204a.85.85 0 0 0 .25-.591.82.82 0 0 0-.241-.588l-1.943-1.938a.8.8 0 0 0-.588-.241.84.84 0 0 0-.591.25l-1.545 1.539 3.115 3.115z\\\"/><path d=\\\"M1.19 15.636a.96.96 0 0 1 .281-.679l7.835-7.834 3.121 3.12-7.834 7.835a.96.96 0 0 1-1.358 0l-1.764-1.764a.96.96 0 0 1-.28-.678Zm9.22-5.391-1.121-1.12-6.479 6.478 1.121 1.121z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar marker_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.798 1.59 3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z\\\" class=\\\"ck-icon__fill\\\"/><path d=\\\"m2.556 16.727.234-.348q-.445-.226-.498-.426-.054-.206.115-.837.14-.375.169-.595a4.5 4.5 0 0 0 0-.725q-.313-.931-.284-1.26.03-.327.475-.862l6.77-9.414q.808-1.365 3.199.18 2.39 1.549 1.784 2.686l-5.877 10.36q-.237.618-.526.782-.29.163-1.232.21-.543.196-.738.318t-.526.47q-.44.397-.632.397-.143 0-.524-.226l-.31.41zm-.279.415 1.575 1.103-.392.515H1.19zm8.1-13.656-4.953 6.9L8.75 12.57l4.247-7.574q.263-.375-1.092-1.192-1.354-.819-1.528-.32zM8.244 18.5 9.59 17h9.406v1.5z\\\"/></svg>\";\n\nvar maximize_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.754 2.501a.75.75 0 0 1 .75.75v5.2a.75.75 0 1 1-1.5 0V5.06L11.98 9.086a.75.75 0 0 1-1.061-1.061L14.943 4h-3.389a.75.75 0 0 1 0-1.5zM3.25 17.504a.75.75 0 0 1-.75-.75v-5.2a.75.75 0 0 1 1.5 0v3.39l4.023-4.023a.75.75 0 1 1 1.061 1.06l-4.023 4.023H8.45a.75.75 0 0 1 0 1.5z\\\"/></svg>\";\n\nvar media_placeholder_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 64 42\\\"><path d=\\\"M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098s-4.538-.083-4.538-1.678 2.032-3.43 4.538-4.098c.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556L49 17zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.99 1.99 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17m29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155zM20.6 21.375v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616V37.53zm24.233-16.155v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615V37.53zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35z\\\"/></svg>\";\n\nvar media_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 22 20\\\"><path d=\\\"M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-14.24 1h13.008v12H4.467zm-2.208 1h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003l-.029 1h-.974zm16.448 0h1.003v1h-1.003zm-16.448 2h.974v1h-.974zm16.448 0h1.003v1h-1.003z\\\"/><path d=\\\"M8.374 6.648a.4.4 0 0 1 .395-.4.4.4 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35z\\\"/></svg>\";\n\nvar minimize_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.45 9.304a.75.75 0 0 1-.75-.75v-5.2a.75.75 0 0 1 1.5 0v3.39l4.023-4.023a.75.75 0 0 1 1.06 1.06l-4.022 4.023h3.389a.75.75 0 0 1 0 1.5zm-2.896 1.397a.75.75 0 0 1 .75.75v5.2a.75.75 0 0 1-1.5 0v-3.39L3.78 17.286a.75.75 0 1 1-1.06-1.061l4.022-4.023H3.354a.75.75 0 0 1 0-1.5z\\\"/></svg>\";\n\nvar multi_level_list_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.85 6.5a.75.75 0 0 1 0-1.5h9.5a.75.75 0 1 1 0 1.5zM3 8V2.7H.5v1h1V8zm10.42 6.185a.75.75 0 0 0 .53 1.28h3.4a.75.75 0 1 0 0-1.5h-3.4a.75.75 0 0 0-.53.22m-7.784-6.15V6.8H4.4v1.235zM9 17.865v-5.3H6.5v1h1v4.3zm2.636.035v-1.235H10.4V17.9zM3.2 17.865v-5.3H.7v1h1v4.3zm2.636.035v-1.235H4.6V17.9z\\\"/></svg>\";\n\nvar next_arrow_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382z\\\"/></svg>\";\n\nvar notification_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0m1 15H9v-2h2zm0-4H9V5h2z\\\"/></svg>\";\n\nvar numbered_list_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M3.5 3v5H2V3.7H1v-1h2.5zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001q-.073.607-.333.988-.263.381-1.244 1.312H4.3v1h-4zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75\\\"/></svg>\";\n\nvar object_center_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H6.5V12h6.997z\\\"/></svg>\";\n\nvar object_full_width_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1m-1.505.5H3.504V12h12.991z\\\"/></svg>\";\n\nvar object_inline_left_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z\\\"/></svg>\";\n\nvar object_inline_right_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z\\\"/></svg>\";\n\nvar object_inline_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z\\\"/></svg>\";\n\nvar object_left_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z\\\"/></svg>\";\n\nvar object_right_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z\\\"/></svg>\";\n\nvar object_size_custom_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.95 1.43a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h.75v6.3H.95a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-.65h1.932l1.539-1.5H5v-.95a.95.95 0 0 0-.95-.95H3.2v-6.3h.85A.95.95 0 0 0 5 5.48v-.55h10v.55a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-3.1a.95.95 0 0 0-.95-.95h-3.1a.95.95 0 0 0-.95.95v1.05H5V2.38a.95.95 0 0 0-.95-.95zm.55 3.5v-2h2v2zm0 9.3v2h2v-2zm15-11.3v2h2v-2zM8.139 20.004v-2.388l7.045-7.048 2.391 2.391-7.046 7.046zm11.421-9.101a.6.6 0 0 1-.138.206l-1.165 1.168-2.391-2.391 1.167-1.163a.6.6 0 0 1 .206-.138.6.6 0 0 1 .243-.049.63.63 0 0 1 .449.187l1.491 1.488c.059.059.108.129.138.206s.049.16.049.243a.6.6 0 0 1-.049.243\\\"/></svg>\";\n\nvar object_size_full_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 17v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15.5v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm0-2v1h-1v-1zm-19 0v1H0v-1zM14.5 2v1h-1V2zm2 0v1h-1V2zm2 0v1h-1V2zm-8 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm8 0v1h-1V2zm-10 0v1h-1V2z\\\"/><path d=\\\"M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2m0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.49.49 0 0 1-.476-.5V4c0-.276.213-.5.476-.5z\\\"/></svg>\";\n\nvar object_size_large_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z\\\"/><path d=\\\"M13 5.5H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2M13 7a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-8A.5.5 0 0 1 2 7z\\\"/></svg>\";\n\nvar object_size_medium_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1z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 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M7 11a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4A.5.5 0 0 1 2 11z\\\"/></svg>\";\n\nvar onedrive_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.223 5.001a5.28 5.28 0 0 0-4.408 2.258c-3.224.423-4.908 4.123-3.032 6.814l.004.008.002.004c.48.627 1.712 1.84 3.588 1.84h7.936c.667 0 1.32-.179 1.894-.522a3.84 3.84 0 0 0 1.381-1.46v-.005c1.13-2.16-.133-4.777-2.488-5.298-.617-1.853-2.177-3.242-4.111-3.565a5 5 0 0 0-.766-.074m-.092 1.5a3 3 0 0 1 .23.008c.077.004.154.014.231.021l.226.035a5 5 0 0 1 .45.116 3 3 0 0 1 .433.166 4 4 0 0 1 .606.348 4 4 0 0 1 .37.293 4 4 0 0 1 .33.348 3.5 3.5 0 0 1 .505.778 3 3 0 0 0-.42.117q-.123.044-.244.094l-1.49.627-2.686-1.61a4.4 4.4 0 0 0-1.002-.445c.015-.01.032-.026.047-.039a4 4 0 0 1 .4-.289 4 4 0 0 1 .424-.23 3 3 0 0 1 .219-.094q.112-.043.225-.076a4 4 0 0 1 .222-.06q.117-.029.233-.05.112-.022.228-.033.115-.011.233-.02.116-.005.23-.005m-3.8 2.193h.003c.54.001 1.111.156 1.551.428l1.783 1.07-5.867 2.471c-.535-1.29-.15-2.788 1.059-3.537l.007-.004a2.9 2.9 0 0 1 1.463-.428Zm7.974 1.33.152.008q.13.011.258.033a2 2 0 0 1 .477.145 2.2 2.2 0 0 1 .918.756q.07.1.127.2a2.3 2.3 0 0 1 .269.919c.004.081.008.165.002.248q-.006.083-.02.166l-3.507-2.102.459-.193.015-.008a2 2 0 0 1 .41-.125 2.3 2.3 0 0 1 .44-.047m-3.008 1.112 4.506 2.699a2.2 2.2 0 0 1-.338.26 2.2 2.2 0 0 1-.668.275q-.116.027-.24.04c-.081.007-.164.015-.246.015H6.373a3 3 0 0 1-.168-.004 2 2 0 0 1-.164-.016l-.154-.023q-.077-.01-.15-.026a3 3 0 0 1-.77-.3 3 3 0 0 1-.21-.133c-.012-.008-.019-.016-.03-.024z\\\"/></svg>\";\n\nvar outdated_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1\\\"/><path d=\\\"M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052zM11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z\\\"/></svg>\";\n\nvar outdent_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5m1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z\\\"/></svg>\";\n\nvar page_break_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.598.687h1.5v5h-1.5zm14.5 0h1.5v5h-1.5z\\\"/><path d=\\\"M19.598 4.187v1.5h-16v-1.5zm-16 14.569h1.5v-5h-1.5zm14.5 0h1.5v-5h-1.5z\\\"/><path d=\\\"M19.598 15.256v-1.5h-16v1.5zM5.081 9h6v2h-6zm8 0h6v2h-6zm-9.483 1L0 12.5v-5z\\\"/></svg>\";\n\nvar pagination_example_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"2 2 56 18\\\"><path d=\\\"m12.527 14.733-.514.022-.057-.057-.058-.058.006-2.44.007-2.44-.834-.023-.833-.022.023-.406.024-.405.536-.1.536-.098.25-.145.25-.145.17-.429.172-.428.399-.024.398-.023v7.08l.02.059.02.059zm17.894.016h-.457l.043-.138.043-.137.635-2.004.636-2.004.437-1.375.436-1.375.055-.196.054-.197.38-.024.378-.024.07.069.07.07-1.162 3.667-1.16 3.667zm11.733 0h-.55V9.72h-1.65v-.864h.385l.4-.086.398-.086.233-.195.232-.196.138-.386.137-.387h.827v7.229zm6.404 0h-.51V13.02h-3.143v-1.01l1.044-1.44 1.045-1.44.59-.824.592-.825h.854l.02 2.298.021 2.298h1.02v.943H49.07v1.729zM47 12.06l1.008-.022.022-1.4.021-1.401-.07.044-.07.043-.901 1.279-.901 1.278-.058.1-.059.101zM12.256 22.893l-10.53.01-.157-.038-.157-.038-.255-.12L.9 22.59v-.19l.228-.218.228-.218.16.086.16.085h20.922l.16-.085.16-.086.228.218.227.218v.189l-.294.146-.295.147z\\\"/></svg>\";\n\nvar paint_roller_cursor_default_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 31 20\\\"><mask id=\\\"a\\\" width=\\\"17\\\" height=\\\"18\\\" x=\\\"13\\\" y=\\\"1\\\" maskUnits=\\\"userSpaceOnUse\\\"><path d=\\\"M13 1h17v18H13z\\\"/><path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1z\\\"/><path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449z\\\"/></mask><path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1z\\\"/><path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449z\\\"/><path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1z\\\" mask=\\\"url(#a)\\\"/><path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449z\\\" mask=\\\"url(#a)\\\"/><mask id=\\\"b\\\" width=\\\"12\\\" height=\\\"17\\\" x=\\\"1.75\\\" y=\\\"1.165\\\" maskUnits=\\\"userSpaceOnUse\\\"><path d=\\\"M1.75 1.165h12v17h-12z\\\"/><path d=\\\"m12.25 9.96-9.5-7.795 2 12.124 2.384-2.53 2.75 4.762 1.732-1-2.75-4.763z\\\"/></mask><path d=\\\"m12.25 9.96-9.5-7.795 2 12.124 2.384-2.53 2.75 4.762 1.732-1-2.75-4.763z\\\"/><path d=\\\"m12.25 9.96-9.5-7.795 2 12.124 2.384-2.53 2.75 4.762 1.732-1-2.75-4.763z\\\" mask=\\\"url(#b)\\\"/></svg>\";\n\nvar paint_roller_cursor_text_default = \"<svg fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 31 20\\\" width=\\\"30\\\" height=\\\"20\\\">\\n  <path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1V3Z\\\" fill=\\\"#000\\\"/>\\n  <path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449V3.25Z\\\" fill=\\\"#000\\\"/>\\n  <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M26.855 2.25H27a2.5 2.5 0 0 1 2.5 2.5v1.7a3.25 3.25 0 0 1-2.79 3.216l-4.21.602a2 2 0 0 1 1 1.732v5a2 2 0 0 1-2 2H20a2 2 0 0 1-2-2v-5a2 2 0 0 1 1-1.732v-.217A3.25 3.25 0 0 1 21.129 7H15a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h10a2 2 0 0 1 1.855 1.25ZM20 10.05V11a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h1.5a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1v-.95c0-.016 0-.033.002-.05a.75.75 0 0 1 .642-.692l4.424-.632A2.25 2.25 0 0 0 28.5 6.45V4.75a1.496 1.496 0 0 0-1.5-1.5v3.2a.75.75 0 0 1-.644.742l-4.424.632A2.25 2.25 0 0 0 20 10.05ZM15 2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H15Z\\\" fill=\\\"#fff\\\"/>\\n  <path d=\\\"M2.5 2.5A.5.5 0 0 1 3 2h2.5a.5.5 0 0 1 .354.146l.646.647.646-.647A.5.5 0 0 1 7.5 2H10a.5.5 0 0 1 0 1H7.707L7 3.707V10h.5a.5.5 0 0 1 0 1H7v4.793l.707.707H10a.5.5 0 0 1 0 1H7.5a.5.5 0 0 1-.354-.146l-.646-.647-.646.647a.5.5 0 0 1-.354.146H3a.5.5 0 0 1 0-1h2.293L6 15.793V11h-.5a.5.5 0 0 1 0-1H6V3.707L5.293 3H3a.5.5 0 0 1-.5-.5Z\\\" fill=\\\"#000\\\"/>\\n  <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"m5.793 3.5-.5-.5H3a.5.5 0 0 1 0-1h2.5a.5.5 0 0 1 .354.146l.145.146.501.5.646-.646A.5.5 0 0 1 7.5 2H10a.5.5 0 0 1 0 1H7.707L7 3.707V10h.5a.5.5 0 0 1 0 1H7v4.793l.707.707H10a.5.5 0 0 1 0 1H7.5a.5.5 0 0 1-.354-.146l-.646-.647-.5.5-.146.147a.5.5 0 0 1-.354.146H3a.5.5 0 0 1 0-1h2.293L6 15.793V11h-.5a.5.5 0 0 1 0-1H6V3.707L5.793 3.5Zm-.914.5L5 4.121v4.964a1.5 1.5 0 0 0 0 2.83v3.464l-.121.121H3a1.5 1.5 0 0 0 0 3h2.5a1.5 1.5 0 0 0 1-.382 1.5 1.5 0 0 0 1 .382H10a1.5 1.5 0 0 0 0-3H8.121L8 15.379v-3.464a1.5 1.5 0 0 0 0-2.83V4.121L8.121 4H10a1.5 1.5 0 0 0 0-3H7.5a1.5 1.5 0 0 0-1 .382A1.5 1.5 0 0 0 5.5 1H3a1.5 1.5 0 1 0 0 3h1.879Z\\\" fill=\\\"#fff\\\"/>\\n</svg>\\n\";\n\nvar paint_roller_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z\\\"/><path d=\\\"M16 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 16 6.449z\\\"/></svg>\";\n\nvar paper_clip_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.514.5c1.007 0 2.056.352 2.866.96.813.611 1.449 1.539 1.449 2.69v7.8c0 .777-.382 1.457-.888 1.93-.505.474-1.195.8-1.92.82-1.473.04-2.848-1.237-2.848-2.75v-3.7a.75.75 0 0 1 1.5 0v3.7c0 .642.65 1.268 1.306 1.25.312-.008.663-.157.938-.414.274-.256.412-.562.412-.836v-7.8c0-.556-.303-1.08-.85-1.49A3.4 3.4 0 0 0 8.513 2a3.4 3.4 0 0 0-1.946.65c-.556.41-.868.934-.868 1.5v.028l-.001.013-.002.055-.006.212-.02.787c-.015.67-.034 1.605-.046 2.663-.025 2.123-.025 4.729.074 6.704.058 1.155.628 1.948 1.466 2.478.864.547 2.017.81 3.135.81 1.114 0 2.092-.265 2.789-.785.671-.5 1.152-1.286 1.213-2.503a80 80 0 0 0 .074-5.299 82 82 0 0 0-.073-2.283L14.301 7v-.086A.75.75 0 0 1 15.8 6.91v.013l.002.033.005.127c.005.11.013.273.02.48.017.413.035 1.007.048 1.725a82 82 0 0 1-.075 5.4c-.082 1.63-.758 2.843-1.815 3.631-1.032.77-2.358 1.082-3.684 1.082-1.322 0-2.774-.306-3.939-1.044-1.191-.754-2.076-1.962-2.161-3.669-.101-2.024-.101-4.67-.076-6.796.012-1.066.03-2.006.047-2.68.007-.337.015-.608.02-.794l.006-.215.002-.056v-.02c.009-1.162.663-2.082 1.477-2.683A4.9 4.9 0 0 1 8.514.5\\\"/></svg>\";\n\nvar paragraph_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5M5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1\\\"/></svg>\";\n\nvar pencil_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m7.3 17.37-.061.088a1.52 1.52 0 0 1-.934.535l-4.178.663-.806-4.153a1.5 1.5 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346zM6.07 16.512l-3.276-2.295.53 2.73zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328M8 18.5 9.375 17H19v1.5z\\\"/></svg>\";\n\nvar pen_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.126 2.268 2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568z\\\" class=\\\"ck-icon__fill\\\"/><path d=\\\"m4.5 18.088-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97q.249-.348.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005zm-.634.166-1.976.516-.026-1.918zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349M8.245 18.5 9.59 17h9.406v1.5z\\\"/></svg>\";\n\nvar pilcrow_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4\\\"/></svg>\";\n\nvar play_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 19a9 9 0 1 0 0-18 9 9 0 0 0 0 18m3.45-9.872a1 1 0 0 1 0 1.744l-4.96 2.79A1 1 0 0 1 7 12.79V7.21a1 1 0 0 1 1.49-.872z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar plus_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1\\\"/></svg>\";\n\nvar preview_merge_fields_default = \"<svg width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<circle cx=\\\"9.00037\\\" cy=\\\"9.79993\\\" r=\\\"1.5\\\"/>\\n<path d=\\\"M5.75024 2.75005C5.75019 2.00005 5.75006 2.00005 5.75006 2.00005L5.74877 2.00005L5.74647 2.00006L5.73927 2.00009L5.71503 2.0003C5.6947 2.00053 5.66619 2.00098 5.63111 2.00185C5.56123 2.0036 5.46388 2.00707 5.35241 2.01402C5.14095 2.02722 4.83482 2.05536 4.56712 2.12276C4.1703 2.22267 3.82938 2.40399 3.55967 2.67392C3.29221 2.94161 3.1311 3.26001 3.03544 3.5803C2.85401 4.18776 2.8854 4.89393 2.92747 5.49256C2.9373 5.6324 2.94792 5.76849 2.95828 5.90131C2.99629 6.38849 3.03087 6.83163 3.01038 7.25369C2.98475 7.78147 2.87469 8.13279 2.6777 8.3656C2.45517 8.6286 2.1841 8.79405 1.95875 8.89436C1.84756 8.94386 1.75282 8.97509 1.68956 8.99319C1.65813 9.00219 1.63513 9.00776 1.62253 9.01062L1.61304 9.01269L1.00024 9.12173V9.75005H3.4023C3.54579 9.63123 3.68814 9.49364 3.82278 9.33451C4.33087 8.73405 4.47638 7.99036 4.50861 7.32643C4.5342 6.79933 4.48942 6.23163 4.4502 5.73429C4.44071 5.61404 4.43155 5.49785 4.42378 5.3874C4.38011 4.76596 4.37986 4.32043 4.4727 4.00956C4.51418 3.87069 4.56668 3.78828 4.62078 3.73414C4.67264 3.68223 4.76124 3.6207 4.93336 3.57736C5.06269 3.5448 5.25656 3.52293 5.44585 3.51111C5.53475 3.50556 5.61296 3.50277 5.66854 3.50139C5.6962 3.5007 5.71789 3.50036 5.73209 3.5002L5.74748 3.50007L5.75054 3.50005L6.5003 3.5L6.50019 2L5.75006 2.00005L5.75024 2.75005Z\\\"/>\\n<path d=\\\"M5.75024 16.7501C5.75019 17.5001 5.75006 17.5001 5.75006 17.5001L5.74877 17.5001L5.74647 17.5001L5.73927 17.5L5.71503 17.4998C5.6947 17.4996 5.66619 17.4991 5.63111 17.4983C5.56123 17.4965 5.46388 17.493 5.35241 17.4861C5.14095 17.4729 4.83482 17.4448 4.56712 17.3774C4.1703 17.2774 3.82938 17.0961 3.55967 16.8262C3.29221 16.5585 3.1311 16.2401 3.03544 15.9198C2.85401 15.3124 2.8854 14.6062 2.92747 14.0076C2.9373 13.8677 2.94792 13.7316 2.95828 13.5988C2.99629 13.1116 3.03087 12.6685 3.01038 12.2464C2.98475 11.7186 2.87469 11.3673 2.6777 11.1345C2.45517 10.8715 2.1841 10.7061 1.95875 10.6058C1.84756 10.5563 1.75282 10.525 1.68956 10.5069C1.65813 10.4979 1.63513 10.4924 1.62253 10.4895L1.61304 10.4874L1.00024 10.3784V9.75005H3.4023C3.54579 9.86887 3.68814 10.0065 3.82278 10.1656C4.33087 10.7661 4.47638 11.5098 4.50861 12.1737C4.5342 12.7008 4.48942 13.2685 4.4502 13.7658C4.44071 13.8861 4.43155 14.0023 4.42378 14.1127C4.38011 14.7341 4.37986 15.1797 4.4727 15.4906C4.51418 15.6294 4.56668 15.7118 4.62078 15.766C4.67264 15.8179 4.76124 15.8794 4.93336 15.9228C5.06269 15.9553 5.25656 15.9772 5.44585 15.989C5.53475 15.9945 5.61296 15.9973 5.66854 15.9987C5.6962 15.9994 5.71789 15.9998 5.73209 15.9999L5.74748 16L5.75054 16.0001L6.5003 16.0001L6.50019 17.5001L5.75006 17.5001L5.75024 16.7501Z\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12.2514 2.00005L12.2501 2.00005L11.5 2L11.4999 3.5L12.2496 3.50005L12.2527 3.50007L12.2681 3.5002C12.2823 3.50036 12.304 3.5007 12.3316 3.50139C12.3872 3.50277 12.4654 3.50556 12.5543 3.51111C12.7436 3.52293 12.9375 3.5448 13.0668 3.57736C13.2389 3.6207 13.3275 3.68223 13.3794 3.73414C13.4335 3.78828 13.486 3.87069 13.5275 4.00956C13.6203 4.32043 13.6201 4.76596 13.5764 5.3874C13.5686 5.49785 13.5595 5.61404 13.55 5.73429C13.5108 6.23163 13.466 6.79933 13.4916 7.32643C13.5238 7.99036 13.6693 8.73405 14.1774 9.33451C14.312 9.49364 14.4544 9.63123 14.5979 9.75005C14.4544 9.86887 14.312 10.0065 14.1774 10.1656C13.7121 10.7154 13.5509 11.3854 13.5023 12.0042C13.6011 12.0012 13.7003 11.9997 13.7999 11.9997C14.208 11.9997 14.6093 12.0247 15.0018 12.0729C15.0416 11.6402 15.1479 11.3408 15.3225 11.1345C15.545 10.8715 15.8161 10.7061 16.0414 10.6058C16.1526 10.5563 16.2474 10.525 16.3106 10.5069C16.342 10.4979 16.365 10.4924 16.3776 10.4895L16.3871 10.4874L16.9999 10.3784V9.75005V9.12173L16.3871 9.01269L16.3776 9.01062C16.365 9.00776 16.342 9.00219 16.3106 8.99319C16.2474 8.97509 16.1526 8.94386 16.0414 8.89436C15.8161 8.79405 15.545 8.6286 15.3225 8.3656C15.1255 8.13279 15.0154 7.78147 14.9898 7.25369C14.9693 6.83163 15.0039 6.38849 15.0419 5.90131C15.0523 5.76849 15.0629 5.6324 15.0727 5.49256C15.1148 4.89393 15.1462 4.18776 14.9647 3.5803C14.8691 3.26001 14.708 2.94161 14.4405 2.67392C14.1708 2.40399 13.8299 2.22267 13.433 2.12276C13.1654 2.05536 12.8592 2.02722 12.6478 2.01402C12.5363 2.00707 12.4389 2.0036 12.3691 2.00185C12.334 2.00098 12.3055 2.00053 12.2851 2.0003L12.2609 2.00009L12.2537 2.00006L12.2514 2.00005Z\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M9.00335 17.2062L9.00308 17.2065C8.7234 17.5118 8.24919 17.5327 7.94372 17.2532C7.63816 16.9735 7.61716 16.4991 7.89681 16.1935L8.45008 16.6999C7.89681 16.1935 7.89697 16.1934 7.89713 16.1932L7.89751 16.1928L7.89844 16.1918L7.90098 16.189L7.90879 16.1806L7.93517 16.1526C7.95746 16.1292 7.98914 16.0963 8.02971 16.0555C8.11079 15.9738 8.22768 15.8597 8.37644 15.724C8.6732 15.4532 9.10079 15.0927 9.62744 14.7314C10.6647 14.0198 12.1659 13.2499 13.8501 13.2499C15.5343 13.2499 17.0355 14.0198 18.0727 14.7314C18.5994 15.0927 19.027 15.4532 19.3237 15.724C19.4725 15.8597 19.5894 15.9738 19.6705 16.0555C19.711 16.0963 19.7427 16.1292 19.765 16.1526L19.7914 16.1806L19.7992 16.189L19.8017 16.1918L19.8027 16.1928L19.803 16.1932C19.8032 16.1934 19.8034 16.1935 19.2501 16.6999L19.8034 16.1935C20.083 16.4991 20.062 16.9735 19.7565 17.2532C19.4511 17.5326 18.9772 17.5118 18.6975 17.207L18.6971 17.2065L18.6968 17.2062L18.6945 17.2037L18.6783 17.1865C18.6629 17.1704 18.6386 17.1452 18.6059 17.1123C18.5404 17.0463 18.4414 16.9494 18.3127 16.8321C18.0546 16.5966 17.6814 16.282 17.2242 15.9683C16.9805 15.8012 16.7185 15.6381 16.4421 15.4883C16.7016 15.9322 16.8502 16.4487 16.8502 16.9999C16.8502 18.6567 15.5071 19.9999 13.8502 19.9999C12.1934 19.9999 10.8502 18.6567 10.8502 16.9999C10.8502 16.4486 10.9989 15.932 11.2584 15.4881C10.9819 15.6379 10.7198 15.8011 10.476 15.9683C10.0188 16.282 9.64555 16.5966 9.38746 16.8321C9.25879 16.9494 9.15975 17.0463 9.09425 17.1123C9.06153 17.1452 9.03726 17.1704 9.02192 17.1865L9.00572 17.2037L9.00335 17.2062Z\\\"/>\\n<circle cx=\\\"14.8253\\\" cy=\\\"16.1749\\\" r=\\\"1.125\\\" fill=\\\"white\\\"/>\\n</svg>\\n\";\n\nvar previous_arrow_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z\\\"/></svg>\";\n\nvar print_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15 2.5H5v4h10zm-1 1v2H6v-2z\\\"/><path d=\\\"M16 5.5a2.5 2.5 0 0 1 2.495 2.336L18.5 8v5a2.5 2.5 0 0 1-2.336 2.495L16 15.5h-1V14h1a1 1 0 0 0 .993-.883L17 13V8a1 1 0 0 0-.883-.993L16 7H4a1 1 0 0 0-.993.883L3 8v5a1 1 0 0 0 .883.993L4 14h1v1.5H4a2.5 2.5 0 0 1-2.495-2.336L1.5 13V8a2.5 2.5 0 0 1 2.336-2.495L4 5.5zM6.5 8a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1z\\\"/><path d=\\\"M15 12H5v7h10zm-1 1v5H6v-5z\\\"/><path d=\\\"M7 14h6v1H7zm0 2h6v1H7z\\\"/></svg>\";\n\nvar project_logo_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"53\\\" height=\\\"10\\\" viewBox=\\\"0 0 53 10\\\"><path fill=\\\"#1C2331\\\" d=\\\"M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z\\\"/><path fill=\\\"#AFE229\\\" d=\\\"M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z\\\"/><path fill=\\\"#771BFF\\\" d=\\\"m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z\\\"/></svg>\\n\";\n\nvar quote_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003z\\\"/></svg>\";\n\nvar redo_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.75.75 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.8.8 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032z\\\"/></svg>\";\n\nvar refresh_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.106 4.946c.272.274.27.712.033 1.016a6.1 6.1 0 0 0-1.291 3.764c0 3.375 2.722 6.111 6.08 6.111q.418 0 .822-.057l-.964-.968-.048-.054a.71.71 0 0 1 .048-.943.7.7 0 0 1 .939-.05l.053.05 1.984 1.994c.143.144.21.335.204.523a.7.7 0 0 1-.156.495l-.048.053-1.984 1.994a.7.7 0 0 1-.992 0 .71.71 0 0 1 0-.997l.645-.647a8 8 0 0 1-.504.018c-4.132 0-7.482-3.368-7.482-7.522 0-1.803.632-3.458 1.684-4.754.248-.304.701-.304.977-.026M9.057.464a.7.7 0 0 1 .992 0 .71.71 0 0 1 0 .997l-.966.97q.46-.058.938-.058c4.132 0 7.483 3.367 7.483 7.521a7.5 7.5 0 0 1-1.685 4.754c-.247.304-.7.304-.977.026-.271-.273-.27-.712-.032-1.016a6.1 6.1 0 0 0 1.29-3.764c0-3.375-2.721-6.11-6.079-6.111a6 6 0 0 0-.673.039l.701.705.049.053a.71.71 0 0 1-.049.944.7.7 0 0 1-.939.048l-.053-.048L7.073 3.53a.7.7 0 0 1-.203-.524.7.7 0 0 1 .155-.495l.048-.053z\\\"/></svg>\";\n\nvar remove_comment_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.2 7h9.2c.6 0 1 .4 1 1v9.9c0 .5-.4 1-1 1H5.2a1 1 0 0 1-1-1V8c0-.6.4-1 1-1m1 1.5c-.3 0-.5.2-.5.5v8c0 .3.2.5.5.5h.5c.2 0 .5-.2.5-.5V9c0-.3-.3-.5-.5-.5zm3.2 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.4zm3.5 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5zm-1.4-7.1H8.3L6.5 3.6H3.8c-.5 0-.7.3-.7.8s.2.7.7.7h12c.6 0 .9-.2.9-.7s-.3-.8-1-.8h-2.4z\\\"/></svg>\";\n\nvar remove_format_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.69 14.915q.08.078.36.093a.366.366 0 0 1 .345.485l-.003.01a.74.74 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.68.68 0 0 1 .644-.458q.295-.018.386-.093a.3.3 0 0 0 .072-.11L9.592 4.5H6.269q-.538-.026-.75.09-.213.117-.442.563c-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486q.002-.426-.167-.54-.168-.114-.766-.091h-3.28l-2.68 10.257q-.009.111.038.158M3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1m11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z\\\"/></svg>\";\n\nvar remove_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.2 7h9.2c.6 0 1 .4 1 1v9.9c0 .5-.4 1-1 1H5.2a1 1 0 0 1-1-1V8c0-.6.4-1 1-1m1 1.5c-.3 0-.5.2-.5.5v8c0 .3.2.5.5.5h.5c.2 0 .5-.2.5-.5V9c0-.3-.3-.5-.5-.5zm3.2 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5zm3.5 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5zm-1.4-7.1H8.3L6.5 3.6H3.8c-.5 0-.7.3-.7.8s.2.7.7.7h12c.6 0 .9-.2.9-.7s-.3-.8-1-.8h-2.4z\\\"/></svg>\";\n\nvar return_arrow_default = \"<svg viewBox=\\\"0 0 10 8\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038\\\"/></svg>\";\n\nvar revision_history_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1\\\"/><path d=\\\"M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052zM11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z\\\"/></svg>\";\n\nvar robot_pencil_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.61 2.66a1.406 1.406 0 1 0-1.407 0v.891H3.28a2.11 2.11 0 0 0-2.11 2.11v10.312a2.11 2.11 0 0 0 2.11 2.109h5.684l-.054-1.157.18-.25H3.28a.703.703 0 0 1-.703-.702V5.66c0-.389.315-.704.703-.704h11.25c.388 0 .703.315.703.704v2.484l.358-.497a2.5 2.5 0 0 1 1.048-.84V5.66a2.11 2.11 0 0 0-2.11-2.11H9.61z\\\"/><path d=\\\"M5.625 10.817c.518 0 .937-.63.937-1.407 0-.776-.42-1.406-.937-1.406s-.938.63-.938 1.406c0 .777.42 1.407.938 1.407m7.5-1.407c0 .777-.42 1.407-.938 1.407s-.937-.63-.937-1.407c0-.776.42-1.406.937-1.406s.938.63.938 1.406M.937 8.004A.937.937 0 0 0 0 8.942v1.875c0 .517.42.937.937.937zm5.191 4.506a.78.78 0 0 1 1.085.216c.272.408.907.707 1.693.707s1.421-.3 1.693-.707a.782.782 0 0 1 1.302.868c-.666 1-1.906 1.403-2.995 1.403s-2.329-.404-2.995-1.403a.78.78 0 0 1 .217-1.085Zm10.859-3.6-.622.864 2.879 2.074.622-.864a.71.71 0 0 0-.161-.99l-1.728-1.245a.71.71 0 0 0-.99.161m-5.352 11.041a.355.355 0 0 1-.449-.31l-.214-2.38 4.978-6.911 2.88 2.074-4.978 6.91z\\\"/></svg>\";\n\nvar select_all_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75m18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75m-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2z\\\"/></svg>\";\n\nvar selection_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.583.45a.95.95 0 0 0-.95.95v5.3h1.5V1.95h4.75V.45zm17.05.95a.95.95 0 0 0-.95-.95h-5.3v1.5h4.75V6.7h1.5zm0 16.1a.95.95 0 0 1-.95.95h-5.3v-1.5h4.75V12.2h1.5zm-18 0c0 .525.425.95.95.95h5.3v-1.5h-4.75V12.2h-1.5zm5-10.8a.75.75 0 1 0 0 1.5h8a.75.75 0 1 0 0-1.5zm0 4a.75.75 0 1 0 0 1.5h4a.75.75 0 1 0 0-1.5z\\\"/></svg>\";\n\nvar settings_default = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M3.734 6.375H1.75a.75.75 0 0 1 0-1.5h1.984a2.626 2.626 0 0 1 5.032 0h9.48a.75.75 0 0 1 0 1.5h-9.48a2.626 2.626 0 0 1-5.032 0Zm1.141-.75a1.375 1.375 0 1 1 2.75 0 1.375 1.375 0 0 1-2.75 0ZM16.263 14.625h1.983a.75.75 0 0 1 0 1.5h-1.983a2.626 2.626 0 0 1-5.033 0H1.75a.75.75 0 0 1 0-1.5h9.48a2.626 2.626 0 0 1 5.033 0Zm-1.142.75a1.375 1.375 0 1 1-2.75 0 1.375 1.375 0 0 1 2.75 0Z\\\"/></svg>\\n\";\n\nvar show_blocks_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m6.395 9.196 2.545-.007V6.498a.6.6 0 0 1 .598-.598h.299a.6.6 0 0 1 .598.598v6.877a.6.6 0 0 1-.598.598h-.299a.6.6 0 0 1-.598-.598v-2.691l-2.545.007v2.691a.6.6 0 0 1-.598.598h-.299a.6.6 0 0 1-.598-.598V6.505a.6.6 0 0 1 .598-.598h.299a.6.6 0 0 1 .598.598zm8.699 4.221V6.462a.56.56 0 0 0-.562-.562h-.782a1 1 0 0 0-.39.08l-1.017.43a.56.56 0 0 0-.343.517v.197c0 .4.406.67.775.519l.819-.337v6.111c0 .31.251.562.561.562h.377c.31 0 .562-.251.562-.562M0 15.417v1.5h1.5v-1.5zm18.5 0v1.5H20v-1.5zm0-3.084v1.5H20v-1.5zm0-3.083v1.5H20v-1.5zm0-3.083v1.5H20v-1.5zM0 18.5v.5a1 1 0 0 0 1 1h.5v-1.5zm3.083 0V20h1.5v-1.5zm3.084 0V20h1.5v-1.5zm3.083 0V20h1.5v-1.5zm3.083 0V20h1.5v-1.5zm3.084 0V20h1.5v-1.5zm3.083 0V20h.5a1 1 0 0 0 1-1v-.5z\\\"/><path d=\\\"M0 1a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v3.583h-1.5V1.5h-17v12.333H0z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar show_changes_off_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.23 2.93a.88.88 0 0 1 1.248 0l1.47 1.468q.298-.186.605-.353c1.066-.58 2.247-.992 3.438-.961 1.176.03 2.344.464 3.405 1.05 1.066.588 2.069 1.355 2.925 2.104a27 27 0 0 1 2.852 2.918l.043.052.011.016.005.004a.7.7 0 0 1 .103.183l.018.047.02.083.01.05.002.078-.003.062-.01.06q-.005.038-.016.077l-.02.06-.03.07-.01.016-.056.087-.002-.001.002.002h-.002l-.003.006-.011.014-.044.054-.161.2a26 26 0 0 1-2.693 2.803q-.414.367-.868.73l1.256 1.256a.881.881 0 0 1-.785 1.49.87.87 0 0 0-.25-.55L3.444 3.872a.9.9 0 0 0-.465-.245.88.88 0 0 1 .252-.698m1.19 4.413A25 25 0 0 0 2.58 9.204l-.013.016a.654.654 0 0 0 .006.876c.484.53 1.173 1.236 1.98 1.943.812.708 1.73 1.407 2.679 1.93.954.527 1.896.853 2.76.876.52.013 1.07-.094 1.635-.298l1.082 1.082c-.877.395-1.812.651-2.754.626-1.176-.03-2.345-.464-3.406-1.05-1.066-.587-2.068-1.354-2.924-2.103a27 27 0 0 1-2.851-2.918l-.044-.052-.01-.014-.005-.004v-.002a1 1 0 0 1-.06-.087l-.008-.014q-.022-.044-.038-.089l-.016-.04-.02-.086q-.005-.024-.007-.05-.006-.039-.003-.075v-.06q.004-.038.012-.076l.012-.056q.013-.041.03-.08l.023-.054.012-.02.055-.086h.002l-.002-.001.003-.005.012-.015.043-.054.16-.2A26 26 0 0 1 3.42 6.343zm6.057 6.058q-.247.035-.506.035a3.765 3.765 0 0 1-3.73-4.27zm-.524-8.906c-.85-.021-1.779.276-2.727.79l-.25.142L8.011 6.46a3.77 3.77 0 0 1 1.96-.555 3.765 3.765 0 0 1 3.766 3.764 3.77 3.77 0 0 1-.558 1.96l1.272 1.271c.323-.25.637-.513.936-.778a25 25 0 0 0 1.977-1.988l.015-.016a.655.655 0 0 0-.006-.878 26 26 0 0 0-1.981-1.941c-.81-.708-1.73-1.407-2.679-1.932-.954-.526-1.896-.852-2.76-.874m1.148 2.541a1.41 1.41 0 0 0-1.384 1.132l1.662 1.662a1.412 1.412 0 0 0-.278-2.794\\\"/></svg>\";\n\nvar show_changes_on_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><g fill-rule=\\\"evenodd\\\"><path d=\\\"M9.972 5.906a3.765 3.765 0 1 1 0 7.53 3.765 3.765 0 0 1 0-7.53m1.13 1.13a1.412 1.412 0 1 0 0 2.823 1.412 1.412 0 0 0 0-2.824\\\"/><path d=\\\"M9.99 3.084c1.177.03 2.345.465 3.406 1.05 1.066.588 2.07 1.355 2.925 2.105a27 27 0 0 1 2.852 2.917q.027.036.043.053l.011.015.004.003v.002q.068.084.103.183l.019.047.019.083.01.05a.7.7 0 0 1 0 .139q-.002.031-.01.06l-.016.078q-.009.029-.022.058-.012.035-.028.07l-.01.018-.056.087-.002-.002v.004l-.004.005-.012.015-.042.054-.161.198a26 26 0 0 1-2.694 2.803c-.856.762-1.863 1.537-2.933 2.117-1.066.58-2.247.992-3.438.962-1.176-.03-2.345-.465-3.406-1.05-1.066-.59-2.07-1.355-2.924-2.103a27 27 0 0 1-2.851-2.92l-.044-.052-.011-.015-.003-.004v-.001a1 1 0 0 1-.062-.088l-.006-.013-.039-.088-.016-.042q-.013-.043-.02-.086-.006-.025-.008-.05L.56 9.669v-.06q.005-.036.013-.075l.012-.056.03-.08.023-.054.012-.022.055-.083v.001h.001v-.002l.005-.005.01-.015.044-.054q.055-.071.16-.198a26 26 0 0 1 2.692-2.801c.858-.764 1.864-1.54 2.935-2.12 1.066-.58 2.247-.99 3.438-.961m-.037 1.411c-.85-.022-1.779.276-2.727.79-.943.511-1.859 1.214-2.67 1.934A24 24 0 0 0 2.58 9.207l-.014.015a.654.654 0 0 0 .007.877c.484.53 1.173 1.235 1.98 1.943.813.709 1.73 1.406 2.68 1.93.953.527 1.894.853 2.759.875.849.021 1.778-.276 2.727-.79.943-.512 1.86-1.212 2.67-1.933a25 25 0 0 0 1.977-1.989l.015-.016a.654.654 0 0 0-.007-.875 26 26 0 0 0-1.98-1.943c-.812-.71-1.73-1.407-2.68-1.932-.953-.525-1.894-.853-2.759-.874\\\"/></g></svg>\";\n\nvar source_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.5 0 5 4.5v15.003h-16V0zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692z\\\"/><path d=\\\"M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0\\\"/></svg>\";\n\nvar sparkle_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.288 1.496c.244-.661 1.18-.661 1.424 0l1.513 4.09a3.7 3.7 0 0 0 2.188 2.188l4.091 1.514c.661.244.66 1.18 0 1.424l-4.09 1.513a3.7 3.7 0 0 0-2.189 2.19l-1.513 4.09c-.244.66-1.18.66-1.424 0l-1.513-4.09a3.7 3.7 0 0 0-2.19-2.19l-4.09-1.513c-.66-.244-.66-1.18 0-1.424l4.09-1.514a3.7 3.7 0 0 0 2.189-2.188zM9.168 6.1A5.2 5.2 0 0 1 6.1 9.167L3.851 10l2.25.832a5.2 5.2 0 0 1 3.066 3.067L10 16.148l.832-2.25a5.2 5.2 0 0 1 3.066-3.066L16.147 10l-2.25-.833a5.2 5.2 0 0 1-3.065-3.066L10 3.852z\\\"/></svg>\";\n\nvar special_characters_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.27 7.27 0 0 1 2.703 3.454 7.13 7.13 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.87.87 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.6 5.6 0 0 0 2.492-2.371 5.46 5.46 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.7 5.7 0 0 0 10 4.206 5.7 5.7 0 0 0 6.419 5.46 5.53 5.53 0 0 0 4.46 8.663a5.46 5.46 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.88.88 0 0 1-.614-.25.85.85 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.13 7.13 0 0 1 .199-4.352 7.27 7.27 0 0 1 2.703-3.455A7.5 7.5 0 0 1 10 2.5\\\"/></svg>\";\n\nvar stop_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.778C2 2.796 2.796 2 3.778 2h12.444C17.204 2 18 2.796 18 3.778v12.444c0 .982-.796 1.778-1.778 1.778H3.778A1.78 1.78 0 0 1 2 16.222z\\\"/></svg>\";\n\nvar strikethrough_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6M6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z\\\"/><path d=\\\"M3 10.5V9h14v1.5z\\\"/></svg>\";\n\nvar submit_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.875 4.419a.75.75 0 0 0-1.5 0v7.25H6.818l2.33-1.955a.75.75 0 0 0-.963-1.15l-3.792 3.182a.75.75 0 0 0-.17.945c.046.11.118.208.21.284l3.788 3.18a.75.75 0 1 0 .965-1.149l-2.19-1.837h7.629c.69 0 1.25-.56 1.25-1.25z\\\"/></svg>\";\n\nvar subscript_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53zm8.147 7.829h2.549q.38 0 .58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197a.62.62 0 0 1-.205-.463q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553t.405-.57.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646c.3-.289.454-.349.762-.467a3 3 0 0 1 1.081-.178q.747 0 1.274.228a1.92 1.92 0 0 1 1.004 1.032 1.98 1.98 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.584-1.008.906a3 3 0 0 0-.24.309z\\\"/></svg>\";\n\nvar superscript_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m7.184 10.353 3.818-3.819a.8.8 0 0 1 1.132 1.132l-3.82 3.818 3.82 3.818a.802.802 0 0 1-.873 1.306.8.8 0 0 1-.26-.174l-3.817-3.82-3.818 3.82a.8.8 0 0 1-1.305-.26.8.8 0 0 1 .173-.872l3.82-3.818-3.82-3.818a.8.8 0 0 1 1.132-1.132l3.818 3.82M15.68 6.88h2.549q.38 0 .58.153a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197A.62.62 0 0 1 14 7.34q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553.266-.277.405-.57.14-.291.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646t.762-.467A3 3 0 0 1 16.466 1q.747 0 1.274.228c.456.2.816.57 1.004 1.032a1.99 1.99 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.583-1.008.906-.131.146-.24.309z\\\"/></svg>\";\n\nvar table_cell_properties_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5zM2 12h5V8H2zm10-4H8v4h4zM2 2v5h5V2zm0 16h5v-5H2zM13 7h5V2h-5zM8 2v5h4V2z\\\" opacity=\\\".6\\\"/><path d=\\\"m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43zM13 6a1 1 0 0 1 1 1v3.172a2 2 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.98 1.98 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm-1 2H8v4h4z\\\"/></svg>\";\n\nvar table_column_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z\\\" opacity=\\\".6\\\"/><path d=\\\"M18 7v1H2V7zm0 5v1H2v-1z\\\" opacity=\\\".6\\\"/><path d=\\\"M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1m-2 1H8v4h4zm0 6H8v4h4zm0 6H8v4h4z\\\"/></svg>\";\n\nvar table_merge_cell_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 2h1v16H7zm5 0h1v7h-1zm6 5v1H2V7zM8 12v1H2v-1z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1m1 2v9h10V9z\\\"/></svg>\";\n\nvar table_of_contents_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 19a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v8.022a6.5 6.5 0 0 0-1.5-.709V2a.5.5 0 0 0-.5-.5H3a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h6.313c.173.534.412 1.037.709 1.5z\\\"/><path d=\\\"M9.174 14a6.5 6.5 0 0 0-.155 1H6v-1zm.848-2a6.5 6.5 0 0 0-.524 1H4v-1zm2.012-2c-.448.283-.86.62-1.224 1H6v-1zM12 4v1H4V4zm2 3V6H6v1zm1 2V8H7v1z\\\"/><path d=\\\"M20 15.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0M15.5 13a.5.5 0 0 0-.5.5V15h-1.5a.5.5 0 0 0 0 1H15v1.5a.5.5 0 0 0 1 0V16h1.5a.5.5 0 0 0 0-1H16v-1.5a.5.5 0 0 0-.5-.5\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar table_properties_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2zm4 6H8v4h4z\\\" opacity=\\\".6\\\"/><path d=\\\"m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2 2 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2z\\\"/></svg>\";\n\nvar table_row_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 2h1v16H7zm5 0h1v16h-1z\\\" opacity=\\\".6\\\"/><path d=\\\"M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1m1 2v4h4V8zm6 0v4h4V8zm6 0v4h4V8z\\\"/></svg>\";\n\nvar table_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 5.5v3h4v-3zm0 4v3h4v-3zm0 4v3h4v-3zm5 3h4v-3H8zm5 0h4v-3h-4zm4-4v-3h-4v3zm0-4v-3h-4v3zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5zm-6.5-4v-3H8v3zm0-4v-3H8v3z\\\"/></svg>\";\n\nvar table_layout_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.5 4.121C1.5 2.95 2.426 2 3.568 2h12.864c1.142 0 2.068.95 2.068 2.121V16.38c0 1.171-.926 2.121-2.068 2.121H3.568c-1.142 0-2.068-.95-2.068-2.121zm2.068-.707a.7.7 0 0 0-.69.707V6.38h14.244V4.12a.7.7 0 0 0-.69-.707zm13.554 4.38h-4.968v3.939h4.968zm0 5.353h-4.968v3.939h4.278c.381 0 .69-.317.69-.707zm-6.347 3.939V7.794H2.878v8.585c0 .39.309.707.69.707z\\\"/></svg>\";\n\nvar template_generic_default = \"<svg fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 45 45\\\">\\n    <path fill=\\\"#F0F0F0\\\" d=\\\"M2 0h41s2 0 2 2v41s0 2 -2 2h-41s-2 0 -2 -2v-41s0 -2 2 -2\\\" />\\n    <path fill=\\\"#D5D5D5\\\" d=\\\"M11 10h10s1 0 1 1v24s0 1 -1 1h-10s-1 0 -1 -1v-24s0 -1 1 -1\\\" />\\n    <path fill=\\\"#D5D5D5\\\" d=\\\"M25 10h10s1 0 1 1v10s0 1 -1 1h-10s-1 0 -1 -1v-10s0 -1 1 -1\\\" />\\n    <path fill=\\\"#D5D5D5\\\" d=\\\"M25 24h10s1 0 1 1v10s0 1 -1 1h-10s-1 0 -1 -1v-10s0 -1 1 -1\\\" />\\n</svg>\\n\";\n\nvar template_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8 0H3a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2M2.5 2a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5zM13 0h5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m0 1.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5V2a.5.5 0 0 0-.5-.5zm0 8.5h5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2m0 1.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-5a.5.5 0 0 0-.5-.5z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar text_alternative_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1zm10.453 2.61a1.89 1.89 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.9 1.9 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598M7.463 8.163a.6.6 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.63.63 0 0 0-.417-.185m6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.62.62 0 0 0-.42-.165M.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.91.91 0 0 0-.912-.912zM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516zm4.947 0h1.801v4.3h2.7v1.4h-4.5zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9zm-8.517 1.457-.614 2.059h1.262z\\\"/></svg>\";\n\nvar text_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663z\\\"/><path d=\\\"m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254z\\\"/></svg>\";\n\nvar three_horizontal_dots_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M14.5 10.001a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0m-6 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0m-6 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0\\\"/></svg>\";\n\nvar three_stars_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m5.977 2 .708 1.914A2.06 2.06 0 0 0 7.902 5.13l1.914.708-1.914.709a2.06 2.06 0 0 0-1.217 1.216l-.708 1.914-.708-1.914a2.06 2.06 0 0 0-1.216-1.216l-1.914-.709 1.914-.708a2.06 2.06 0 0 0 1.216-1.216zm6.87 3.417 1.135 3.067a3.3 3.3 0 0 0 1.95 1.95L19 11.57l-3.067 1.135a3.3 3.3 0 0 0-1.95 1.95l-1.136 3.067-1.135-3.067a3.3 3.3 0 0 0-1.95-1.95l-3.068-1.136 3.068-1.135a3.3 3.3 0 0 0 1.95-1.95zm-8.418 8.276-.534-1.443-.534 1.443c-.158.425-.493.76-.918.918L1 15.145l1.443.534c.425.157.76.492.918.917l.534 1.443.534-1.443a1.55 1.55 0 0 1 .917-.917l1.443-.534-1.443-.534a1.55 1.55 0 0 1-.917-.918\\\"/></svg>\";\n\nvar three_vertical_dots_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><circle cx=\\\"9.5\\\" cy=\\\"4.5\\\" r=\\\"1.5\\\"/><circle cx=\\\"9.5\\\" cy=\\\"10.5\\\" r=\\\"1.5\\\"/><circle cx=\\\"9.5\\\" cy=\\\"16.5\\\" r=\\\"1.5\\\"/></svg>\";\n\nvar thumb_up_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M6.05 8.609v8.38c0 1.11.903 2.01 2.017 2.01h7.553c.896 0 1.684-.588 1.936-1.445l2.361-8.041a2.012 2.012 0 0 0-1.935-2.575h-4.353l.788-2.618a2.01 2.01 0 0 0-1.294-2.485l-.698-.232a2.02 2.02 0 0 0-2.269.725l-3.72 5.098c-.25.344-.386.758-.386 1.183m1.513 8.38V8.61c0-.107.034-.21.096-.296l3.72-5.099a.505.505 0 0 1 .567-.18l.699.231a.5.5 0 0 1 .323.621l-1.177 3.912a.503.503 0 0 0 .483.647h5.708c.336 0 .578.322.484.644l-2.362 8.041a.504.504 0 0 1-.484.362H8.067a.503.503 0 0 1-.504-.503M3.328 6.937H1.714C.767 6.937 0 7.703 0 8.647v8.644C0 18.234.767 19 1.714 19h1.614c.946 0 1.714-.766 1.714-1.71V8.647c0-.943-.768-1.709-1.714-1.709m-1.815 1.71c0-.112.09-.202.201-.202h1.614c.111 0 .201.09.201.201v8.645a.2.2 0 0 1-.201.2H1.714a.2.2 0 0 1-.201-.2z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar thumb_down_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M13.95 11.89V3.51c0-1.11-.903-2.01-2.017-2.01H4.38c-.896 0-1.684.589-1.936 1.446l-2.361 8.04a2.012 2.012 0 0 0 1.935 2.576h4.353l-.788 2.618a2.01 2.01 0 0 0 1.294 2.485l.698.232a2.02 2.02 0 0 0 2.269-.725l3.72-5.099c.25-.343.386-.757.386-1.182m-1.513-8.38v8.38c0 .107-.034.21-.096.296l-3.72 5.1a.505.505 0 0 1-.567.18l-.699-.232a.5.5 0 0 1-.323-.62L8.209 12.7a.503.503 0 0 0-.483-.647H2.018a.503.503 0 0 1-.484-.643l2.362-8.042a.504.504 0 0 1 .484-.361h7.553c.278 0 .504.225.504.502m4.235 10.053h1.614c.947 0 1.714-.765 1.714-1.709V3.21c0-.944-.767-1.709-1.714-1.709h-1.614c-.946 0-1.714.765-1.714 1.709v8.644c0 .944.768 1.709 1.714 1.709m1.815-1.709c0 .111-.09.201-.201.201h-1.614a.2.2 0 0 1-.201-.2V3.208c0-.111.09-.201.201-.201h1.614a.2.2 0 0 1 .201.2z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar todo_list_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m2.315 14.705 2.224-2.24a.69.69 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.7.7 0 0 1-.112.089.65.65 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75M2.329 5.745l2.21-2.226a.69.69 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.7.7 0 0 1-.496.196.64.64 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75\\\"/></svg>\";\n\nvar track_changes_accept_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 2.28C2 1.574 2.574 1 3.272 1l11.456.001c.703 0 1.272.573 1.272 1.28v8.453l-1.5 1.464V2.465c0-.003-11-.005-11-.005V16.5h2.356q.188.34.462.62l.868.88-3.914-.001A1.274 1.274 0 0 1 2 16.719z\\\"/><path d=\\\"M14.525 18H9.293l-1.48-1.5h3.75l.332.336.344-.336H14.5v-2.207L16 12.83v3.73zm-4.819-5.362a2.84 2.84 0 0 0-1.38-.36 2.8 2.8 0 0 0-1.602.5H6.18a.635.635 0 0 1-.633-.639.64.64 0 0 1 .633-.639h3.133a.639.639 0 0 1 .393 1.138m-4.16-6.484c0-.353.292-.64.636-.64h5.682a.637.637 0 0 1 .449 1.09.64.64 0 0 1-.449.188H6.182a.636.636 0 0 1-.635-.639zm0 2.984c0-.352.292-.638.636-.638h5.682a.635.635 0 0 1 .45 1.088.64.64 0 0 1-.45.189H6.182a.636.636 0 0 1-.636-.639\\\"/><path d=\\\"m13.117 19.374 6.192-6.044a1.316 1.316 0 0 0 0-1.876 1.354 1.354 0 0 0-1.899 0l-5.515 5.382-2.63-2.666a1.3 1.3 0 0 0-.938-.393 1.32 1.32 0 0 0-.939.394 1.354 1.354 0 0 0 0 1.898l3.49 3.538a1.32 1.32 0 0 0 1.447.29 2.7 2.7 0 0 0 .792-.523\\\" style=\\\"fill:#1fb11f\\\"/></svg>\";\n\nvar track_changes_discard_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 2.28C2 1.574 2.574 1 3.272 1l11.456.001c.703 0 1.272.573 1.272 1.28v8.106l-.889.899-.611-.619V2.465c0-.003-11-.005-11-.005V16.5h6.458l-.136.138-.003.003c-.372.378-.628.85-.745 1.359l-5.802-.001A1.274 1.274 0 0 1 2 16.719zM14.338 18h-3.676q.09-.169.227-.308l1.178-1.192H14.5v-3.699l.61.618.89-.899v4.199c0 .383-.168.726-.431.96l-.457-.462z\\\"/><path d=\\\"M9.043 11.5a2.85 2.85 0 0 0 .066 1.278H6.18a.635.635 0 0 1-.632-.639.64.64 0 0 1 .633-.639h2.863Zm3.45-2.267a2.82 2.82 0 0 0-2.434.544H6.182a.636.636 0 0 1-.636-.639c0-.352.292-.638.636-.638h5.682a.635.635 0 0 1 .629.733M5.546 6.154c0-.353.292-.64.636-.64h5.682a.637.637 0 0 1 .449 1.09.64.64 0 0 1-.449.188H6.182a.636.636 0 0 1-.635-.639z\\\"/><path d=\\\"m15.11 13.42 2.348-2.374a1.32 1.32 0 0 1 1.877 0 1.354 1.354 0 0 1 0 1.9l-2.346 2.372 2.346 2.374a1.354 1.354 0 0 1 0 1.898 1.316 1.316 0 0 1-1.877 0l-2.346-2.373-2.346 2.373a1.316 1.316 0 0 1-1.877 0 1.354 1.354 0 0 1 0-1.898l2.346-2.374-2.346-2.373a1.354 1.354 0 0 1 0-1.899 1.32 1.32 0 0 1 1.877 0l2.346 2.374z\\\" style=\\\"fill:#da2020\\\"/></svg>\";\n\nvar track_changes_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.182 5.514a.643.643 0 0 0-.636.64v-.001a.636.636 0 0 0 .636.639h5.682a.64.64 0 0 0 .636-.638.637.637 0 0 0-.636-.64zm0 2.986a.642.642 0 0 0-.588.882.64.64 0 0 0 .588.395h5.682a.64.64 0 0 0 .636-.639.635.635 0 0 0-.636-.638zm-.002 3a.64.64 0 0 0 0 1.278h3.133a.64.64 0 0 0 0-1.278zm5.592 6.808.154-.23q-.292-.148-.328-.28-.037-.135.076-.551.093-.248.11-.393a3 3 0 0 0 0-.479q-.206-.614-.186-.83.02-.218.313-.57l4.465-6.207q.534-.9 2.11.118 1.576 1.021 1.177 1.772l-3.876 6.833q-.157.407-.347.515c-.128.07-.4.119-.813.139a3 3 0 0 0-.487.21q-.191.135-.347.31-.29.261-.416.262-.095 0-.346-.15l-.204.27zm-.184.274 1.039.727-.26.34h-1.496z\\\"/><path d=\\\"M3.272 1A1.28 1.28 0 0 0 2 2.28v14.439a1.276 1.276 0 0 0 1.272 1.28h6.838a2.1 2.1 0 0 1 .003-.61 4 4 0 0 1 .156-.67l.025-.069v-.008l-.042-.142H3.5V2.46s11 .002 11 .005v6.341l.627-.872c.204-.32.49-.614.873-.819V2.281c0-.707-.569-1.28-1.272-1.28zM16 9.29l-1.5 2.085V16.5h-2.708q.007.177-.007.354l-.013.075-.001.005a3 3 0 0 1-.097.312q-.04.152-.062.266a.7.7 0 0 0-.014.287.25.25 0 0 0 .068.105 1 1 0 0 0 .088.074l.017.011.016.01h.175L14.73 18c.697 0 1.271-.573 1.271-1.281v-7.43Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\n\nvar underline_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8s3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4\\\"/></svg>\";\n\nvar undo_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.75.75 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.8.8 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032z\\\"/></svg>\";\n\nvar unlink_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184m4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06z\\\"/></svg>\";\n\nvar uploadcare_image_edit_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037H5.06l5.058-5.078L6.617 9.15a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v4.354a3.5 3.5 0 0 1 1.5.049V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.147 2.147 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.642-3.11 2.13 2.13 0 0 0-1.873-.978M8.089 17.635v2.388h2.389l7.046-7.046-2.39-2.39zm11.282-6.507a.64.64 0 0 0 .139-.692.6.6 0 0 0-.139-.205l-1.49-1.488a.63.63 0 0 0-.899 0l-1.166 1.163 2.39 2.39z\\\"/></svg>\";\n\nvar uploadcare_image_upload_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 21 21\\\"><path d=\\\"M1.801 1.4C1.138 1.4.6 1.87.6 2.5v14.363c0 .64.534 1.037 1.186 1.037h9.494a3 3 0 0 1-.414-.287A3 3 0 0 1 9.81 15.59v-.007a3 3 0 0 1 .693-2.186l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L2.1 14V2.9h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.5c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.13 2.13 0 0 0-1.875-.978\\\"/><path d=\\\"M16.122 19.5a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 0 0 1.211-1.015l-3.351-3.995a.79.79 0 0 0-.996-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/><path d=\\\"M16.122 19.5a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 0 0 1.211-1.015l-3.351-3.995a.79.79 0 0 0-.996-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/></svg>\";\n\nvar uploadcare_link_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M12.748 2a4.62 4.62 0 0 0-3.174 1.362L8.02 4.915a.783.783 0 0 0 .002 1.11.786.786 0 0 0 1.11 0l1.55-1.553c1.185-1.185 3.024-1.195 4.116-.104l.851.854c1.092 1.091 1.083 2.927-.101 4.11l-1.555 1.554a.787.787 0 0 0 .557 1.34.78.78 0 0 0 .553-.23l1.554-1.552c1.758-1.757 1.838-4.597.102-6.332l-.854-.853A4.3 4.3 0 0 0 12.748 2m-.488 4.973a.78.78 0 0 0-.553.23L7.2 11.71l-.004.002a.784.784 0 0 0 1.11 1.107l.003-.002 4.504-4.505a.785.785 0 0 0-.554-1.339Zm-6.79.815a.8.8 0 0 0-.554.234L3.36 9.573c-1.757 1.758-1.836 4.597-.101 6.332l.853.852c1.736 1.734 4.572 1.655 6.33-.102l1.547-1.547.006-.008a.78.78 0 0 0 .244-.554.78.78 0 0 0-.799-.797.77.77 0 0 0-.56.248l-1.545 1.547c-1.184 1.184-3.021 1.195-4.113.104l-.854-.854c-1.091-1.091-1.083-2.927.102-4.111l1.552-1.555a.8.8 0 0 0 .233-.555.8.8 0 0 0-.06-.3.8.8 0 0 0-.173-.253s-.104-.14-.183-.185c-.051-.03-.133-.047-.37-.047Z\\\"/></svg>\";\n\nvar user_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 11 10\\\"><path d=\\\"M5.5 5C8.538 5 11 7.015 11 9.5q0 .255-.034.5H.034A4 4 0 0 1 0 9.5C0 7.015 2.462 5 5.5 5m0-5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5\\\"/></svg>\";\n\nvar pin_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.273 17.818 2 18l.182-1.273 4.363-4.363 1.091 1.09zM18 7.818c-.897.897-1.997 1.284-2.847.732l-2.971 3.632c1.205 1.205.841 2.795-.364 4l-8-8c1.205-1.205 2.795-1.569 4-.364l3.632-2.972c-.552-.85-.165-1.949.732-2.846z\\\"/></svg>\";\n\nvar warning_default = \"<svg width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 13 13\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12 6C12 9.31371 9.31371 12 6 12C2.68629 12 0 9.31371 0 6C0 2.68629 2.68629 0 6 0C9.31371 0 12 2.68629 12 6ZM5.27988 2.40003H6.71988V6.72003H5.27988V2.40003ZM6.72009 8.16003H5.28009V9.60003H6.72009V8.16003Z\\\" fill=\\\"#DB3700\\\"/>\\n</svg>\\n\";\n\nvar web_default = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M20 10.001c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10 10 4.477 10 10m-9.662 8.493a9 9 0 0 1-.676 0c-.838-1.316-1.492-2.931-1.877-4.743h4.43c-.385 1.812-1.039 3.427-1.877 4.743m1.815-.268c.671-1.327 1.184-2.84 1.497-4.475h3.98a8.52 8.52 0 0 1-5.477 4.475m6.046-5.975a8.5 8.5 0 0 0 .301-2.25 8.5 8.5 0 0 0-.301-2.25h-4.323a20.3 20.3 0 0 1 0 4.5zm-.569-6a8.52 8.52 0 0 0-5.477-4.475c.671 1.327 1.184 2.84 1.497 4.475zm-7.292-4.743c.838 1.316 1.492 2.93 1.877 4.743h-4.43c.385-1.812 1.039-3.427 1.877-4.743a9 9 0 0 1 .676 0m-2.49.268c-.672 1.327-1.185 2.84-1.498 4.475H2.37a8.52 8.52 0 0 1 5.477-4.475M1.8 7.751a8.5 8.5 0 0 0-.301 2.25c0 .779.105 1.533.301 2.25h4.323a20.3 20.3 0 0 1 0-4.5zm.569 6a8.52 8.52 0 0 0 5.477 4.475c-.671-1.327-1.184-2.84-1.497-4.475zm10.095-1.5h-4.93a18.5 18.5 0 0 1 0-4.5h4.93a18.5 18.5 0 0 1 0 4.5\\\" clip-rule=\\\"evenodd\\\"/></svg>\";\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 { ai_default as IconAI, ai_adjust_length_default as IconAIAdjustLength, ai_ask_ai_default as IconAIAskAI, ai_author_default as IconAIAuthor, ai_change_tone_default as IconAIChangeTone, ai_chat_default as IconAIChat, ai_chat_commands_default as IconAIChatCommands, ai_continue_writing_default as IconAIContinueWriting, ai_grammar_check_default as IconAIGrammarCheck, ai_history_default as IconAIHistory, ai_improve_writing_default as IconAIImproveWriting, ai_other_default as IconAIOther, ai_quick_actions_default as IconAIQuickActions, ai_review_default as IconAIReview, ai_translate_default as IconAITranslate, accessibility_default as IconAccessibility, add_comment_default as IconAddComment, align_bottom_default as IconAlignBottom, align_center_default as IconAlignCenter, align_justify_default as IconAlignJustify, align_left_default as IconAlignLeft, align_middle_default as IconAlignMiddle, align_right_default as IconAlignRight, align_top_default as IconAlignTop, arrow_down_default as IconArrowDown, arrow_up_default as IconArrowUp, bold_default as IconBold, bookmark_default as IconBookmark, bookmark_inline_default as IconBookmarkInline, bookmark_medium_default as IconBookmarkMedium, bookmark_small_default as IconBookmarkSmall, box_with_check_default as IconBoxWithCheck, box_with_cross_default as IconBoxWithCross, box_with_marker_default as IconBoxWithMarker, browse_files_default as IconBrowseFiles, bulb_default as IconBulb, bulleted_list_default as IconBulletedList, cancel_default as IconCancel, caption_default as IconCaption, case_change_default as IconCaseChange, check_default as IconCheck, chevron_down_default as IconChevronDown, chevron_right_default as IconChevronRight, chevron_up_default as IconChevronUp, ckbox_image_edit_default as IconCkboxImageEdit, close_default as IconClose, code_default as IconCode, code_block_default as IconCodeBlock, cog_default as IconCog, color_palette_default as IconColorPalette, color_tile_check_default as IconColorTileCheck, comments_archive_default as IconCommentsArchive, content_lock_default as IconContentLock, content_unlock_default as IconContentUnlock, copy_default as IconCopy, document_default as IconDocument, document_outline_default as IconDocumentOutline, document_outline_toggle_default as IconDocumentOutlineToggle, document_with_checkmark_default as IconDocumentWithCheckmark, document_with_cross_default as IconDocumentWithCross, document_with_loupe_default as IconDocumentWithLoupe, drag_handle_default as IconDragHandle, drag_indicator_default as IconDragIndicator, dropbox_default as IconDropbox, dropdown_arrow_default as IconDropdownArrow, edit_comment_default as IconEditComment, emoji_default as IconEmoji, eraser_default as IconEraser, error_default as IconError, export_pdf_default as IconExportPdf, export_word_default as IconExportWord, eye_default as IconEye, eye_crossed_out_default as IconEyeCrossedOut, facebook_default as IconFacebook, file_upload_default as IconFileUpload, find_replace_default as IconFindReplace, font_background_default as IconFontBackground, font_color_default as IconFontColor, font_family_default as IconFontFamily, font_size_default as IconFontSize, footnote_default as IconFootnote, fullscreen_enter_default as IconFullscreenEnter, fullscreen_leave_default as IconFullscreenLeave, google_drive_default as IconGoogleDrive, google_photos_default as IconGooglePhotos, heading1_default as IconHeading1, heading2_default as IconHeading2, heading3_default as IconHeading3, heading4_default as IconHeading4, heading5_default as IconHeading5, heading6_default as IconHeading6, history_default as IconHistory, horizontal_line_default as IconHorizontalLine, html_default as IconHtml, image_default as IconImage, image_asset_manager_default as IconImageAssetManager, image_upload_default as IconImageUpload, image_url_default as IconImageUrl, import_export_default as IconImportExport, import_word_default as IconImportWord, indent_default as IconIndent, info_default as IconInfo, insert_merge_field_default as IconInsertMergeField, italic_default as IconItalic, legal_style_list_default as IconLegalStyleList, line_height_default as IconLineHeight, link_default as IconLink, list_style_arabic_indic_default as IconListStyleArabicIndic, list_style_circle_default as IconListStyleCircle, list_style_decimal_default as IconListStyleDecimal, list_style_decimal_leading_zero_default as IconListStyleDecimalLeadingZero, list_style_disc_default as IconListStyleDisc, list_style_lower_latin_default as IconListStyleLowerLatin, list_style_lower_roman_default as IconListStyleLowerRoman, list_style_square_default as IconListStyleSquare, list_style_upper_latin_default as IconListStyleUpperLatin, list_style_upper_roman_default as IconListStyleUpperRoman, local_default as IconLocal, loupe_default as IconLoupe, low_vision_default as IconLowVision, magic_wand_default as IconMagicWand, marker_default as IconMarker, maximize_default as IconMaximize, media_default as IconMedia, media_placeholder_default as IconMediaPlaceholder, minimize_default as IconMinimize, multi_level_list_default as IconMultiLevelList, next_arrow_default as IconNextArrow, notification_default as IconNotification, numbered_list_default as IconNumberedList, object_center_default as IconObjectCenter, object_full_width_default as IconObjectFullWidth, object_inline_default as IconObjectInline, object_inline_left_default as IconObjectInlineLeft, object_inline_right_default as IconObjectInlineRight, object_left_default as IconObjectLeft, object_right_default as IconObjectRight, object_size_custom_default as IconObjectSizeCustom, object_size_full_default as IconObjectSizeFull, object_size_large_default as IconObjectSizeLarge, object_size_medium_default as IconObjectSizeMedium, object_size_small_default as IconObjectSizeSmall, onedrive_default as IconOneDrive, outdated_default as IconOutdated, outdent_default as IconOutdent, page_break_default as IconPageBreak, pagination_example_default as IconPaginationExample, paint_roller_default as IconPaintRoller, paint_roller_cursor_default_default as IconPaintRollerCursorDefault, paint_roller_cursor_text_default as IconPaintRollerCursorText, paper_clip_default as IconPaperClip, paragraph_default as IconParagraph, pen_default as IconPen, pencil_default as IconPencil, pilcrow_default as IconPilcrow, pin_default as IconPin, play_default as IconPlay, plus_default as IconPlus, preview_merge_fields_default as IconPreviewMergeFields, previous_arrow_default as IconPreviousArrow, print_default as IconPrint, project_logo_default as IconProjectLogo, quote_default as IconQuote, redo_default as IconRedo, refresh_default as IconRefresh, remove_default as IconRemove, remove_comment_default as IconRemoveComment, remove_format_default as IconRemoveFormat, return_arrow_default as IconReturnArrow, revision_history_default as IconRevisionHistory, robot_pencil_default as IconRobotPencil, select_all_default as IconSelectAll, selection_default as IconSelection, settings_default as IconSettings, show_blocks_default as IconShowBlocks, show_changes_off_default as IconShowChangesOff, show_changes_on_default as IconShowChangesOn, source_default as IconSource, sparkle_default as IconSparkle, special_characters_default as IconSpecialCharacters, stop_default as IconStop, strikethrough_default as IconStrikethrough, submit_default as IconSubmit, subscript_default as IconSubscript, superscript_default as IconSuperscript, table_default as IconTable, table_cell_properties_default as IconTableCellProperties, table_column_default as IconTableColumn, table_layout_default as IconTableLayout, table_merge_cell_default as IconTableMergeCell, table_of_contents_default as IconTableOfContents, table_properties_default as IconTableProperties, table_row_default as IconTableRow, template_default as IconTemplate, template_generic_default as IconTemplateGeneric, text_default as IconText, text_alternative_default as IconTextAlternative, three_horizontal_dots_default as IconThreeHorizontalDots, three_stars_default as IconThreeStars, three_vertical_dots_default as IconThreeVerticalDots, thumb_down_default as IconThumbDown, thumb_up_default as IconThumbUp, todo_list_default as IconTodoList, track_changes_default as IconTrackChanges, track_changes_accept_default as IconTrackChangesAccept, track_changes_discard_default as IconTrackChangesDiscard, underline_default as IconUnderline, undo_default as IconUndo, unlink_default as IconUnlink, uploadcare_image_edit_default as IconUploadcareImageEdit, uploadcare_image_upload_default as IconUploadcareImageUpload, uploadcare_link_default as IconUploadcareLink, user_default as IconUser, warning_default as IconWarning, web_default as IconWeb };\n//# sourceMappingURL=index.js.map", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103z\\\"/><path d=\\\"M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17m0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M4 1.5h12A3.5 3.5 0 0 1 19.5 5v8l-.005.192a3.5 3.5 0 0 1-2.927 3.262l-.062.008v1.813a1.5 1.5 0 0 1-2.193 1.33l-.371-.193-.38-.212a13.5 13.5 0 0 1-3.271-2.63l-.062-.07H4A3.5 3.5 0 0 1 .5 13V5A3.5 3.5 0 0 1 4 1.5M4 3a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h6.924a11.9 11.9 0 0 0 3.71 3.081l.372.194v-3.268L14.962 15H16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z\\\"/><path d=\\\"M9.75 5a.75.75 0 0 0-.75.75v2.5H6.5a.75.75 0 0 0 0 1.5H9v2.5a.75.75 0 0 0 1.5 0v-2.5H13a.75.75 0 0 0 0-1.5h-2.5v-2.5A.75.75 0 0 0 9.75 5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M13.903 7.617a3.35 3.35 0 0 0 1.98 1.98L19 10.752l-3.117 1.153a3.35 3.35 0 0 0-1.98 1.98l-1.154 3.117-1.153-3.116a3.35 3.35 0 0 0-1.98-1.98L6.5 10.75l3.116-1.153a3.35 3.35 0 0 0 1.98-1.98L12.75 4.5zm-9.647 4.755c.15.404.469.723.872.872l1.372.507-1.372.507c-.403.15-.722.468-.872.872L3.75 16.5l-.507-1.371a1.48 1.48 0 0 0-.872-.872L1 13.75l1.37-.507a1.48 1.48 0 0 0 .873-.872L3.75 11zM6.441 2.87c.204.55.639.985 1.19 1.189L9.5 4.75l-1.87.691A2.02 2.02 0 0 0 6.44 6.63L5.75 8.5l-.692-1.87a2.01 2.01 0 0 0-1.19-1.189L2 4.751l1.869-.692a2.02 2.02 0 0 0 1.19-1.189L5.748 1z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m13.749 15.5.691-1.87c.204-.55.638-.984 1.189-1.188l1.87-.692-1.87-.692A2.01 2.01 0 0 1 14.44 9.87L13.75 8l-.692 1.87c-.204.55-.638.984-1.189 1.188l-1.87.692 1.87.692c.55.204.985.638 1.189 1.188zm.5-11.5a.75.75 0 0 1 0 1.5h-11a.75.75 0 0 1 0-1.5zm-4 4a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1 0-1.5zm-3 4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1 0-1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.773 12.536a.75.75 0 0 1 .945.498l.018.051a9 9 0 0 0 .42.964c.317.62.799 1.397 1.473 2.072.701.7 1.38 1.191 1.88 1.505a8 8 0 0 0 .746.417l.037.016.005.003a.75.75 0 0 1-.522 1.404l-.072-.027-.01-.004-.018-.008-.058-.027a10 10 0 0 1-.905-.504 12.3 12.3 0 0 1-2.143-1.715c-.82-.82-1.388-1.744-1.748-2.451a10 10 0 0 1-.5-1.145l-.026-.075-.006-.021-.003-.007v-.003l-.001-.001L1 13.25l-.715.228a.75.75 0 0 1 .488-.942M13.314.953a.75.75 0 0 1 .913-.419l.072.028.009.004.018.007.059.028q.075.034.204.1c.172.09.413.223.701.404a12.3 12.3 0 0 1 2.143 1.715c.82.82 1.387 1.744 1.748 2.45a10 10 0 0 1 .499 1.145l.026.075.007.022.003.007v.003h.001c-.002.002-.043.015-.715.228l.715-.227a.751.751 0 0 1-1.43.455l-.004-.011-.017-.052a9 9 0 0 0-.42-.964c-.317-.619-.8-1.397-1.474-2.07a10.8 10.8 0 0 0-1.88-1.507 8 8 0 0 0-.746-.417l-.036-.015-.006-.003a.75.75 0 0 1-.39-.986M11.29 6.84a3.76 3.76 0 0 0 2.22 2.22L17 10.35l-3.49 1.292a3.76 3.76 0 0 0-2.219 2.22L10 17.35l-1.292-3.49a3.76 3.76 0 0 0-2.22-2.22L3 10.35l3.49-1.291A3.76 3.76 0 0 0 8.71 6.84L10 3.35zm6.009 8.66a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M14.8 18a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M3.798 2.001a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0m-2.499 2.5a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"18\\\" height=\\\"18\\\" fill=\\\"none\\\" viewBox=\\\"0 0 18 18\\\"><path fill=\\\"currentColor\\\" d=\\\"M.471 10.832a.675.675 0 0 1 .85.448l.017.047q.022.065.07.189c.066.165.168.402.309.678.284.557.718 1.257 1.325 1.864a9.8 9.8 0 0 0 1.692 1.356 7 7 0 0 0 .671.375l.033.014.005.003a.675.675 0 0 1-.47 1.264l-.065-.025-.008-.004-.017-.007-.052-.024-.184-.09c-.155-.08-.372-.2-.631-.364a11 11 0 0 1-1.929-1.543C1.35 14.274.84 13.443.514 12.807a9 9 0 0 1-.449-1.03l-.024-.068-.006-.02-.002-.005v-.003H.032l.643-.206-.643.205a.676.676 0 0 1 .44-.848M11.758.408a.676.676 0 0 1 .822-.377l.065.025.007.003.017.007.053.025q.066.03.184.09c.154.08.371.2.63.363.52.326 1.214.829 1.929 1.544.739.738 1.249 1.57 1.573 2.206a9 9 0 0 1 .45 1.03l.023.067.006.02.003.006v.003l-.643.205.644-.205a.676.676 0 0 1-1.287.41l-.004-.01-.015-.046-.072-.19a8 8 0 0 0-.307-.678c-.284-.557-.719-1.257-1.326-1.864a9.8 9.8 0 0 0-1.691-1.355 7 7 0 0 0-.672-.375l-.033-.015-.005-.002a.675.675 0 0 1-.351-.887M9.937 5.706a3.38 3.38 0 0 0 1.996 1.997l3.142 1.162-3.142 1.162a3.38 3.38 0 0 0-1.996 1.998l-1.162 3.14-1.162-3.14a3.38 3.38 0 0 0-1.998-1.998l-3.14-1.162 3.14-1.162a3.38 3.38 0 0 0 1.998-1.997l1.162-3.141zm5.407 7.794a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0m-2.249 2.25a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0M3.194 1.35a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0M.944 3.601a.675.675 0 1 1 1.35 0 .675.675 0 0 1-1.35 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M11.282 2.775a4.274 4.274 0 0 1 5.466.466 4.23 4.23 0 0 1 .47 5.443.75.75 0 0 1-.113.907.75.75 0 0 1-.913.114 4.27 4.27 0 0 1-2.846.759l-2.625 2.362a1 1 0 0 1 .015.14v4.788a.75.75 0 0 1-1.5 0v-3.59l-2.678 2.41a1.26 1.26 0 0 1-1.083.298l-1.134-.226-1.062 1.058a.75.75 0 0 1-1.059-1.063l1.06-1.056-.224-1.121c-.078-.39.035-.792.3-1.085l6.14-6.752c-.09-.983.165-1.99.761-2.83a.75.75 0 0 1 .113-.906.75.75 0 0 1 .912-.116m-6.73 11.519.164.82a1 1 0 0 1 .097.097l.834.165 6.027-5.426a4.26 4.26 0 0 1-1.665-1.658zm6.779-9.39a2.73 2.73 0 0 0 .455 3.274 2.77 2.77 0 0 0 3.294.456zm4.359-.6a2.77 2.77 0 0 0-3.294-.456l3.748 3.728a2.73 2.73 0 0 0-.454-3.272\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M4.44 1.87c.205.55.639.985 1.19 1.189l1.87.691-1.87.691c-.551.204-.985.64-1.19 1.19L3.75 7.5l-.693-1.87A2.01 2.01 0 0 0 1.87 4.442L0 3.751l1.87-.691c.55-.204.984-.64 1.188-1.19L3.75 0z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.739 13.009c0-.416.44-.644.749-.422l.06.05 3.297 3.232.036.039a.53.53 0 0 1 0 .666l-.036.039-3.297 3.232c-.288.283-.747.098-.803-.292l-.006-.08v-1.468c-.343.04-.898.142-1.57.404l-.189.077c-.654.276-1.15.766-1.464 1.156l-.123.16a.48.48 0 0 1-.574.163.516.516 0 0 1-.314-.56l.064-.388c.074-.426.184-.955.335-1.474.196-.676.483-1.408.906-1.854l.113-.114c.986-.957 2.195-1.094 2.816-1.094zM.773 12.536a.75.75 0 0 1 .945.498l.018.052a9 9 0 0 0 .42.964c.316.619.8 1.396 1.473 2.07.701.702 1.38 1.193 1.88 1.507a8 8 0 0 0 .746.417l.037.015.005.003a.75.75 0 0 1-.522 1.404l-.072-.027-.01-.004-.018-.008-.058-.027a10 10 0 0 1-.905-.504 12.3 12.3 0 0 1-2.143-1.715c-.82-.82-1.388-1.744-1.748-2.45a10 10 0 0 1-.5-1.145l-.026-.076-.006-.021-.003-.007v-.003H.285a.75.75 0 0 1 .488-.943M11.29 6.84a3.76 3.76 0 0 0 2.22 2.218L17 10.35l-3.49 1.291a3.76 3.76 0 0 0-2.22 2.22L10 17.35l-1.291-3.49a3.76 3.76 0 0 0-2.22-2.22l-3.49-1.29 3.49-1.292a3.76 3.76 0 0 0 2.22-2.218l1.29-3.49zM13.314.953a.75.75 0 0 1 .913-.42l.072.028.01.004.018.008.058.027q.076.035.204.1c.172.09.413.223.702.404.576.362 1.348.92 2.142 1.715.82.82 1.388 1.744 1.748 2.451a10 10 0 0 1 .5 1.145l.026.075.006.021.003.007v.003l.001.001a.75.75 0 0 1-1.43.455l-.003-.01-.018-.052-.079-.21a9 9 0 0 0-.342-.754c-.315-.62-.798-1.397-1.472-2.071a10.8 10.8 0 0 0-1.88-1.506 8 8 0 0 0-.746-.417l-.037-.016-.005-.003a.75.75 0 0 1-.391-.985M2.05 3.75a.75.75 0 1 1-.002 1.502.75.75 0 0 1 .001-1.501M4.548 1.25a.75.75 0 1 1 0 1.501.75.75 0 0 1 0-1.5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.591 16.502c.421 0 .762.336.762.75s-.341.75-.762.75h-5.08a.757.757 0 0 1-.761-.751c0-.414.34-.749.761-.749zm3.302-8.942c0-1.009 1.135-1.576 1.952-1.056l.158.12 4.817 4.182c.576.5.572 1.386-.008 1.882L12.996 16.8c-.823.702-2.103.127-2.103-.945V14.46H2.511a.756.756 0 0 1-.761-.75c0-.414.34-.75.761-.75h8.636c.701 0 1.27.56 1.27 1.25v1.098l4.176-3.568-4.175-3.627V9.28c0 .69-.57 1.25-1.271 1.25H2.511a.756.756 0 0 1-.761-.75c0-.414.34-.75.761-.75h8.382zm6.047-5.689c.205.55.639.986 1.19 1.19l1.869.691-1.87.691c-.55.204-.984.64-1.188 1.19l-.692 1.869-.692-1.87a2.01 2.01 0 0 0-1.188-1.189l-1.87-.691 1.87-.691c.55-.204.984-.64 1.188-1.19l.691-1.869zM7.591 5.502c.421 0 .762.336.762.75s-.34.75-.762.75h-5.08a.756.756 0 0 1-.761-.75c0-.414.34-.75.761-.75z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17.413 12.037 10.487 19l-3.421-3.446 1.053-1.058 2.37 2.386 5.873-5.902z\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"m12.976 12.465-1.004 1.009-.737-1.995H5.378l-1.39 3.492H2.5L7.463 3H9.05zm-7.1-2.183h4.764L8.257 4.496z\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M16.958 1.87c.203.55.634.985 1.182 1.189l1.859.691-1.86.691a2.01 2.01 0 0 0-1.181 1.19L16.27 7.5l-.689-1.87A2 2 0 0 0 14.4 4.442l-1.858-.691L14.4 3.06c.548-.204.98-.64 1.182-1.19L16.27 0z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M14.832 15.502a.75.75 0 0 1 .754.749.75.75 0 0 1-.755.749H7.28a.753.753 0 0 1-.756-.749c0-.414.339-.749.756-.749zm1.237-12.5a.946.946 0 0 1 .851 1.322c-.69 1.575-1.272 2.683-1.893 3.406-.563.655-1.17 1.005-1.884 1.126-.449 1.736-1.662 2.854-2.73 3.527a8.8 8.8 0 0 1-2.038.937q-.092.029-.146.042l-.042.012-.013.003H8.17l-.002.002a.76.76 0 0 1-.917-.546.75.75 0 0 1 .55-.908l.002-.001.023-.006.104-.03a7.3 7.3 0 0 0 1.673-.77c.952-.6 1.888-1.526 2.14-2.92a.97.97 0 0 1 .91-.792l.168-.014c.382-.05.694-.212 1.056-.633.377-.438.782-1.133 1.293-2.229-2.808.253-5.14 2.025-6.952 4.332-1.991 2.537-3.253 5.6-3.728 7.563a.757.757 0 0 1-.911.553.75.75 0 0 1-.559-.903c.519-2.144 1.867-5.409 4.007-8.134 2.136-2.72 5.164-5.024 9.042-4.939M4.44 1.87c.205.55.64.985 1.19 1.189l1.87.691-1.87.691c-.55.204-.985.64-1.19 1.19L3.75 7.5l-.692-1.87a2.01 2.01 0 0 0-1.19-1.189L0 3.75l1.869-.691c.55-.204.985-.64 1.19-1.19L3.748 0z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m16.25 0 .69 1.87c.205.55.639.984 1.19 1.188L20 3.75l-1.87.692a2.02 2.02 0 0 0-1.19 1.188l-.69 1.87-.693-1.87a2.01 2.01 0 0 0-1.188-1.188l-1.87-.692 1.87-.692c.55-.204.985-.638 1.188-1.188z\\\"/><path d=\\\"M10 1c.704 0 1.053-.003 1.474.09.445.099.635.613.426 1.019-.163.315-.523.465-.875.423C10.712 2.495 10.42 2.5 10 2.5a7.5 7.5 0 1 0 7.5 7.5c0-.26-.047-.582-.102-.89a.82.82 0 0 1 .458-.89c.456-.214 1.007.027 1.08.525.053.375.064.746.064 1.255a9 9 0 1 1-9-9\\\"/><path d=\\\"M7.05 10a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0m4.2 0a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0m4.2 0a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.718 5.12c.285.77.893 1.378 1.663 1.663l2.618.97-2.618.968a2.82 2.82 0 0 0-1.663 1.664l-.969 2.617-.969-2.617A2.82 2.82 0 0 0 4.117 8.72l-2.618-.969 2.618-.969A2.82 2.82 0 0 0 5.78 5.12l.969-2.618zm10.609 9.086a.75.75 0 0 1 0 1.492l-.078.004h-8a.75.75 0 0 1 0-1.5h8zm-.077-4.504a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5zm.002-4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5zM3.461 12.749c.136.367.425.657.791.793l1.247.46-1.247.46a1.34 1.34 0 0 0-.79.793l-.463 1.247-.46-1.246a1.34 1.34 0 0 0-.793-.793l-1.247-.46 1.247-.461a1.34 1.34 0 0 0 .792-.793L3 11.502z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m14.57 9.33-8.194 8.194H3.598V14.75l8.193-8.198 2.779 2.78Zm-.108-5.14a.73.73 0 0 1 .522.217l1.734 1.73a.736.736 0 0 1 0 1.043l-1.355 1.36-2.78-2.78 1.357-1.352a.74.74 0 0 1 .522-.218M4.05.19l.692 1.869c.204.55.638.985 1.189 1.189l1.87.691-1.87.692c-.55.204-.985.638-1.189 1.189L4.05 7.69l-.69-1.87a2.01 2.01 0 0 0-1.19-1.189L.3 3.94l1.87-.691c.55-.204.985-.638 1.189-1.189z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M19 19h-1.486l-1.289-3.5h-5.85L8.989 19H7.501l4.957-12h1.586zm-8.13-4.7h4.76l-2.38-5.8z\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M5.648.5c.414 0 .75.337.75.751v.95h4.35a.75.75 0 0 1 0 1.5H9.486c-.337 1.817-1.254 4.38-3.062 6.917.234.25.42.434.56.563a5 5 0 0 0 .293.253h.001a.75.75 0 0 1-.857 1.231H6.42l-.003-.002-.004-.003-.01-.008-.028-.02-.092-.072a7 7 0 0 1-.317-.278 12 12 0 0 1-.472-.463c-1.345 1.606-2.094 2.28-4.376 3.584a.75.75 0 0 1-.736-1.306c2.018-.997 2.852-1.878 4.11-3.42-.546-.738-.982-1.637-1.286-2.357a19 19 0 0 1-.563-1.516l-.008-.026-.002-.007-.001-.002-.019-.076A.75.75 0 0 1 4.04 6.26l.026.072.001.004.006.02.025.078.101.297c.09.255.22.61.388 1.005.233.553.525 1.152.852 1.67C6.86 7.313 7.63 5.146 7.953 3.7H.948a.75.75 0 0 1 0-1.5h3.95v-.949A.75.75 0 0 1 5.648.5m11.293 1.37c.204.55.638.984 1.189 1.188l1.869.692-1.87.691c-.55.204-.984.638-1.188 1.189L16.25 7.5l-.692-1.87a2.01 2.01 0 0 0-1.188-1.19l-1.87-.691 1.87-.692c.55-.204.985-.638 1.188-1.189L16.25 0z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.773 12.536a.75.75 0 0 1 .945.498l.018.051a9 9 0 0 0 .42.964c.317.62.799 1.397 1.473 2.072.701.7 1.38 1.191 1.88 1.505a8 8 0 0 0 .746.417l.037.016.005.003a.75.75 0 0 1-.522 1.404l-.072-.027-.01-.004-.018-.008-.058-.027a10 10 0 0 1-.905-.504 12.3 12.3 0 0 1-2.143-1.715c-.82-.82-1.388-1.744-1.748-2.451a10 10 0 0 1-.5-1.145l-.026-.075-.006-.021-.003-.007v-.003l-.001-.001L1 13.25l-.715.228a.75.75 0 0 1 .488-.942M13.314.953a.75.75 0 0 1 .913-.419l.072.028.009.004.018.007.059.028q.075.034.204.1c.172.09.413.223.701.404a12.3 12.3 0 0 1 2.143 1.715c.82.82 1.387 1.744 1.748 2.45a10 10 0 0 1 .499 1.145l.026.075.007.022.003.007v.003h.001c-.002.002-.043.015-.715.228l.715-.227a.751.751 0 0 1-1.43.455l-.004-.011-.017-.052a9 9 0 0 0-.42-.964c-.317-.619-.8-1.397-1.474-2.07a10.8 10.8 0 0 0-1.88-1.507 8 8 0 0 0-.746-.417l-.036-.015-.006-.003a.75.75 0 0 1-.39-.986M11.29 6.84a3.76 3.76 0 0 0 2.22 2.22L17 10.35l-3.49 1.292a3.76 3.76 0 0 0-2.219 2.22L10 17.35l-1.292-3.49a3.76 3.76 0 0 0-2.22-2.22L3 10.35l3.49-1.291A3.76 3.76 0 0 0 8.71 6.84L10 3.35zm6.009 8.66a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M14.8 18a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M3.798 2.001a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0m-2.499 2.5a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.942 1.87c.203.55.637.985 1.188 1.189L20 3.75l-1.87.691a2.01 2.01 0 0 0-1.188 1.19L16.249 7.5l-.691-1.87a2.01 2.01 0 0 0-1.19-1.189L12.5 3.75l1.87-.691c.55-.204.985-.639 1.189-1.19L16.249 0zm2.03 5.43c.305 0 .58.192.671.483a7 7 0 0 1 .352 2.4 9 9 0 0 1-9.361 8.809 9 9 0 0 1-7.662-4.917L4.1 12.946A7.502 7.502 0 0 0 18.5 10c0-1.017-.1-1.266-.5-2.2-.097-.224.143-.5.387-.5z\\\"/><path d=\\\"m11.5 9.999 3.195 3.196-1.06 1.06-3.536-3.536-.1-.112V5h1.5zM10.7 1q.168 0 .336.006a.703.703 0 0 1 .664.716c0 .451-.398.795-.849.785a7 7 0 0 0-.531.007c-1.015.052-1.71.309-2.623.756a7.5 7.5 0 0 0-4.17 6.125l.965-.737a.75.75 0 0 1 .979.057l.073.083a.75.75 0 0 1-.058.978l-.083.072-2.27 1.738a.75.75 0 0 1-.972-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 1.107-1.005l.074.082.531.68a9 9 0 0 1 5.32-7.218C8.519 1.259 9.453 1 10.7 1\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.75.75 0 0 1-.511.187.75.75 0 0 1-.511-.187M4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.75 11.875a.75.75 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.75.75 0 0 1-.508.184.75.75 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75m0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .511-.187.75.75 0 0 1 .511.187M15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 .75a9.25 9.25 0 1 1 0 18.5 9.25 9.25 0 0 1 0-18.5m0 1.5a7.75 7.75 0 1 0 0 15.5 7.75 7.75 0 0 0 0-15.5m0 2.022a.75.75 0 0 1 .743.649l.007.101v8.165l2.714-2.705a.75.75 0 0 1 .977-.07l.084.072a.75.75 0 0 1 .07.976l-.072.084-3.994 3.981a.75.75 0 0 1-.975.073l-.084-.073-3.99-3.98a.75.75 0 0 1 .975-1.135l.085.072 2.71 2.706V5.022a.75.75 0 0 1 .75-.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 19.25a9.25 9.25 0 1 0 0-18.5 9.25 9.25 0 0 0 0 18.5m0-1.5a7.75 7.75 0 1 1 0-15.5 7.75 7.75 0 0 1 0 15.5m0-2.022a.75.75 0 0 0 .743-.649l.007-.101V6.813l2.714 2.705a.75.75 0 0 0 .977.07l.084-.072a.75.75 0 0 0 .07-.976l-.072-.084-3.994-3.981a.75.75 0 0 0-.975-.073l-.084.073-3.99 3.98a.75.75 0 0 0 .975 1.135l.085-.072 2.71-2.706v8.166c0 .414.336.75.75.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.187 17H5.773q-.956 0-1.364-.415-.41-.416-.409-1.323V4.738q0-.926.419-1.332.418-.405 1.354-.406h4.68q1.035 0 1.793.124.76.124 1.36.478.512.296.906.75a3.26 3.26 0 0 1 .808 2.162q0 2.102-2.167 3.075 2.846.879 2.847 3.421a3.76 3.76 0 0 1-2.296 3.504 6 6 0 0 1-1.517.377q-.857.11-2 .11zm-.217-6.217H7v4.087h3.069q2.965 0 2.965-2.072 0-1.061-.768-1.537-.768-.478-2.296-.478M7 5.13v3.619h2.606q1.093 0 1.69-.2a1.6 1.6 0 0 0 .91-.765q.247-.4.247-.897 0-1.06-.778-1.409-.778-.348-2.375-.348z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 14 16\\\"><path d=\\\"M2 14.436V2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v12.436a.5.5 0 0 1-.819.385l-3.862-3.2a.5.5 0 0 0-.638 0l-3.862 3.2A.5.5 0 0 1 2 14.436\\\" class=\\\"ck-icon__fill\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.68 3.417a.24.24 0 0 0-.24.236v12.66l3.793-3.102a1.215 1.215 0 0 1 1.534 0l3.793 3.103V3.654a.24.24 0 0 0-.24-.237zM4 3.653C4 2.74 4.752 2 5.68 2h8.64c.928 0 1.68.74 1.68 1.653v13.164c0 1-1.185 1.547-1.967.908L10 14.426l-4.033 3.299c-.782.64-1.967.092-1.967-.908z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M4.4 2.24c-.11 0-.2.092-.2.207v11.077l3.16-2.714a.975.975 0 0 1 1.28 0l3.16 2.714V2.447a.203.203 0 0 0-.2-.207zM3 2.447C3 1.647 3.627 1 4.4 1h7.2c.773 0 1.4.648 1.4 1.447v11.518c0 .875-.988 1.354-1.64.794L8 11.873 4.64 14.76c-.652.56-1.64.081-1.64-.794z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 14 14\\\"><path d=\\\"M4.216 2.031a.503.503 0 0 0-.489.516v9.42l2.648-2.324a.94.94 0 0 1 1.25 0l2.648 2.324v-9.42a.503.503 0 0 0-.489-.516zm-1.466.516C2.75 1.693 3.406 1 4.216 1h5.568c.81 0 1.466.693 1.466 1.547v9.42c0 .873-.965 1.351-1.602.793L7 10.436 4.352 12.76c-.637.558-1.602.08-1.602-.793z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2z\\\"/><path d=\\\"M17.483 3c.27 0 .529.107.72.296a1.007 1.007 0 0 1 0 1.429l-7.432 7.48a1 1 0 0 1-.758.294 1.02 1.02 0 0 1-.757-.295L6.31 9.381a1.01 1.01 0 0 1-.235-1.11 1 1 0 0 1 .556-.551 1.03 1.03 0 0 1 1.117.232l2.264 2.148 6.75-6.804c.191-.19.45-.296.72-.296\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2zm8.554-3a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13m2.74 3.759a.81.81 0 0 0-1.148 0l-1.592 1.593-1.593-1.593a.812.812 0 1 0-1.148 1.15L11.355 7.5 9.763 9.092a.813.813 0 0 0 1.148 1.15l1.593-1.593 1.592 1.592a.812.812 0 1 0 1.148-1.15L13.652 7.5l1.592-1.592a.813.813 0 0 0 0-1.15\\\"/><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2zm8.554-3a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13m2.74 3.759a.81.81 0 0 0-1.148 0l-1.592 1.593-1.593-1.593a.812.812 0 1 0-1.148 1.15L11.355 7.5 9.763 9.092a.813.813 0 0 0 1.148 1.15l1.593-1.593 1.592 1.592a.812.812 0 1 0 1.148-1.15L13.652 7.5l1.592-1.592a.813.813 0 0 0 0-1.15Z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.95 4a.75.75 0 0 1 0 1.5H3a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-1.25a.75.75 0 0 1 1.5 0V17a2 2 0 0 1-2 2H3l-.204-.01A2 2 0 0 1 1 17V6a2 2 0 0 1 2-2z\\\"/><path d=\\\"m6.923 13.22.205-.305q-.389-.198-.436-.371-.048-.18.101-.733.124-.329.147-.521a4 4 0 0 0 0-.634q-.274-.816-.248-1.102.026-.288.416-.756L13.033.56q.708-1.194 2.8.158 2.09 1.354 1.561 2.35l-5.143 9.067q-.209.541-.46.685-.255.141-1.08.183-.335.11-.646.279a2.7 2.7 0 0 0-.46.41q-.384.348-.552.349-.126 0-.46-.2l-.27.359-1.401-.98zm-.244.364 1.379.965-.344.451H5.728z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17.5 9.303V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6 6 0 0 0-1.5-1.228M16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5z\\\"/><path d=\\\"M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10M15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.91 18.255a.747.747 0 0 1 .663.746.747.747 0 0 1-.664.746l-.075.004H8.382a.745.745 0 0 1-.74-.75c0-.414.331-.75.74-.75h3.452z\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M10.104 3.752c.807 0 1.59.193 2.415.548l.404.185c.913.452 1.62 1.026 2.129 1.77.578.848.852 1.85.95 2.991l.014.258c.031 1.26-.537 2.059-1.096 2.722-.562.665-1.05 1.151-1.322 1.935l-.053.161c-.204.698-.397 1.704-.504 2.314a1.34 1.34 0 0 1-1.308 1.114H8.476c-.65 0-1.196-.476-1.308-1.114a31 31 0 0 0-.354-1.743l-.15-.57c-.258-.882-.776-1.387-1.375-2.097-.596-.707-1.203-1.57-1.082-2.98l.045-.422c.126-.968.4-1.827.906-2.568.58-.851 1.422-1.478 2.533-1.956l.307-.126c.713-.274 1.401-.422 2.106-.422m0 1.5c-.492 0-1.001.102-1.582.325l-.254.104c-.927.398-1.513.87-1.894 1.43-.337.492-.551 1.106-.656 1.909l-.038.356c-.07.806.224 1.272.732 1.874.506.599 1.299 1.384 1.67 2.645l.084.307c.181.688.338 1.508.435 2.048h3.007c.112-.624.304-1.619.52-2.355l.075-.232c.394-1.127 1.12-1.852 1.594-2.413.476-.565.764-1.01.74-1.727l-.008-.147c-.084-.981-.308-1.702-.693-2.266-.334-.49-.824-.912-1.563-1.277l-.332-.152c-.688-.296-1.274-.43-1.837-.43\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M3.597 13.637a.73.73 0 0 1 1.045 0 .76.76 0 0 1 0 1.06l-1.05 1.064-.056.052a.73.73 0 0 1-.99-.052.76.76 0 0 1-.05-1.004l.05-.057zm11.761 0a.73.73 0 0 1 1.045 0l1.05 1.063.05.057c.237.294.22.73-.05 1.004a.73.73 0 0 1-.99.052l-.055-.052-1.05-1.064a.76.76 0 0 1 0-1.06M2.472 8.257c.409 0 .74.336.74.75s-.331.75-.74.75L.99 9.756l-.075-.004a.746.746 0 0 1-.664-.746c0-.388.291-.708.664-.746l.075-.004zm16.614.003a.747.747 0 0 1 .664.746.746.746 0 0 1-.664.746l-.075.004h-1.483a.745.745 0 0 1-.74-.75c0-.413.331-.75.74-.75h1.483zM3.334 2.581c.27-.274.7-.29.99-.05l.055.05 1.048 1.065a.76.76 0 0 1 0 1.061.73.73 0 0 1-1.045 0L3.334 3.642l-.05-.057a.76.76 0 0 1 .05-1.004m12.343-.051a.73.73 0 0 1 .989.051.76.76 0 0 1 .05 1.004l-.05.057-1.048 1.065a.73.73 0 0 1-1.046 0 .76.76 0 0 1 0-1.06l1.049-1.066zM10.007.251c.383 0 .698.296.736.674l.003.076.001 1.505c0 .414-.33.75-.738.75a.745.745 0 0 1-.74-.75L9.268 1l.004-.076a.745.745 0 0 1 .735-.674\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75m6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2\\\"/><path fill-opacity=\\\".6\\\" d=\\\"M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.789 3 0 17h1.664l1.664-4.027h6.797l.227.548c.046-.172.112-.352.209-.545.217-.436.556-.609.898-.798L7.664 3H5.79Zm.938 1.758 2.777 6.715H3.949zM15.956 7.5c-1.584-.02-3.226.824-3.843 2.882l1.495.106c.904-2.082 4.594-2.13 4.375.534-3.245 1.024-4.838.117-6.082 2.62-.208.418-.17 1.57.54 2.397s2.014 1.149 3.409.85 2.24-1.386 2.24-1.386L18.205 17h1.493l-.059-1.72-.056-5.274C19.51 8.612 17.75 7.524 15.956 7.5m2.027 4.696s.641 2.453-1.528 3.27c-3.376 1.269-4.188-2.141-1.775-2.638 1.704-.352 1.873-.25 3.303-.632\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.972 16.615a1 1 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a1 1 0 0 1-.745.292\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.435 5.506a.75.75 0 0 1 1.197.899l-.067.089-6.992 8a.75.75 0 0 1-1.05.078l-.079-.078-7.008-8a.75.75 0 0 1 1.049-1.066l.08.078 6.442 7.354z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.435 14.494a.75.75 0 0 0 1.197-.899l-.067-.089-6.992-8a.75.75 0 0 0-1.05-.078l-.079.078-7.008 8a.75.75 0 0 0 1.049 1.066l.08-.078 6.442-7.354z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 21 21\\\"><path d=\\\"M9.064 14.666a.75.75 0 1 1-1.06-1.06L11.01 10.6 8.004 7.595a.75.75 0 1 1 1.06-1.06l3.55 3.549a.748.748 0 0 1-.136 1.168z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037H5.06l5.058-5.078L6.617 9.15a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v4.354a3.5 3.5 0 0 1 1.5.049V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.147 2.147 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.642-3.11 2.13 2.13 0 0 0-1.873-.978M8.089 17.635v2.388h2.389l7.046-7.046-2.39-2.39zm11.282-6.507a.64.64 0 0 0 .139-.692.6.6 0 0 0-.139-.205l-1.49-1.488a.63.63 0 0 0-.899 0l-1.166 1.163 2.39 2.39z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.538 9.44 6.362 6.362a1.503 1.503 0 1 1-2.125 2.125L9.418 11.56l-6.365 6.365A1.5 1.5 0 1 1 .93 15.803L7.295 9.44.93 3.075A1.5 1.5 0 0 1 3.052.955L9.416 7.32 15.78.955a1.5 1.5 0 0 1 2.123 2.12z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174m2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207M16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zM5.009 15l.003 1H3v-1zm2.188-2-1.471 1H5v-1zM10 11v.095L8.668 12H7v-1zm4-2v1H7V9zm0-2v1H7V7zm-4-2v1H5V5zM6 3v1H3V3z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1m-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.333 2 .19 2.263a6 6 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a6 6 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a6 6 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a6 6 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a6 6 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a6 6 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a6 6 0 0 1 1.46-.605L8.666 2zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 9 9 0 0 1-.372.008m-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414M9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415m4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0\\\" class=\\\"ck-icon__fill\\\"/><path d=\\\"M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M14 3.5A3.5 3.5 0 0 1 17.5 7v6l-.005.192a3.5 3.5 0 0 1-2.927 3.262l-.062.008v1.813a1.5 1.5 0 0 1-2.193 1.33l-.37-.193-.38-.212a13.5 13.5 0 0 1-3.272-2.63l-.062-.07-4.729-.046a3.5 3.5 0 0 1-3.5-3.5v-6a3.5 3.5 0 0 1 3.5-3.5zM3.5 4.954a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2L8.924 15a11.9 11.9 0 0 0 3.71 3.081l.372.194v-3.268L12.962 15H14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M16.5.5h-10a3.5 3.5 0 0 0-3.162 2h1.84A2 2 0 0 1 6.5 2h10a2 2 0 0 1 2 2v8.873a3.5 3.5 0 0 0 1.495-2.681L20 10V4A3.5 3.5 0 0 0 16.5.5\\\"/><path d=\\\"M12.013 7.453a.75.75 0 0 1 .034 1.06l-3.75 4a.75.75 0 0 1-1.045.048l-2.25-2a.75.75 0 0 1 .996-1.122l1.704 1.515 3.25-3.467a.75.75 0 0 1 1.061-.034\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.5 6.5a3.5 3.5 0 0 1 3.495 3.308L19 10v2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5m0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5m0-6a2 2 0 0 0-2 2v2h4v-2a2 2 0 0 0-2-2m-9.25 8a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.25 16a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5zm.25 5.5a3.5 3.5 0 0 1 3.143 1.959.75.75 0 0 1-1.36.636A2 2 0 0 0 13.5 10v2H19a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5m0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5 2.801a.7.7 0 0 0-.7.7v11.5a.8.8 0 0 1-1.6 0v-11.5a2.3 2.3 0 0 1 2.3-2.3h6.5a.8.8 0 0 1 0 1.6zm.7 3.7a2.3 2.3 0 0 1 2.3-2.3h7a2.3 2.3 0 0 1 2.3 2.3v10a2.3 2.3 0 0 1-2.3 2.3H8a2.3 2.3 0 0 1-2.3-2.3zm2.3-.7a.7.7 0 0 0-.7.7v10a.7.7 0 0 0 .7.7h7a.7.7 0 0 0 .7-.7v-10a.7.7 0 0 0-.7-.7z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M2.75 1.701a.95.95 0 0 1 .95-.95h7.61l5.94 5.94V18.3a.95.95 0 0 1-.95.95H3.7a.95.95 0 0 1-.95-.95zm1.5.55v15.5h11.5v-10H11.2a.95.95 0 0 1-.95-.95v-4.55zm7.5 1.06 2.94 2.94h-2.94z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M1.95.001a.95.95 0 0 0-.95.95v16.6c0 .525.425.95.95.95h5.641c.415 0 .75-.313.75-.727 0-.415-.335-.773-.75-.773H2.5v-15.5h6v4.55c0 .525.425.95.95.95H14V8.24c0 .414.342.75.757.75a.744.744 0 0 0 .743-.75v-2.3L9.56.001zm10.99 5.5L10 2.561v2.94z\\\"/><path d=\\\"M18.03 11.531a.75.75 0 0 0-1.06-1.06L12 15.44l-2.47-2.47a.75.75 0 0 0-1.06 1.06L12 17.56z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M1.95.001a.95.95 0 0 0-.95.95v16.6c0 .525.425.95.95.95h5.641c.415 0 .75-.32.75-.735a.763.763 0 0 0-.75-.765H2.5v-15.5h6v4.55c0 .525.425.95.95.95H14v1.25c0 .414.342.75.757.75a.744.744 0 0 0 .743-.75v-2.31L9.56 0zm10.99 5.5L10 2.561v2.94z\\\"/><path d=\\\"M11.47 10.47a.75.75 0 0 1 1.06 0l2.97 2.97 2.97-2.97a.75.75 0 0 1 1.06 1.061l-2.97 2.97 2.97 2.97a.75.75 0 0 1-1.06 1.06l-2.97-2.97-2.97 2.97a.75.75 0 1 1-1.06-1.06l2.97-2.97-2.97-2.97a.75.75 0 0 1 0-1.06\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><g fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\"><path d=\\\"M1 .95A.95.95 0 0 1 1.95 0h7.61l5.94 5.94v3.249A6 6 0 0 0 14 9V7H9.45a.95.95 0 0 1-.95-.95V1.5h-6V17h5.841c.191.54.457 1.044.785 1.5H1.95a.95.95 0 0 1-.95-.95zm9 1.61 2.94 2.94H10z\\\"/><path d=\\\"M12.895 17.79c.805 0 1.553-.243 2.173-.661l2.653 2.653a.75.75 0 0 0 1.06-1.061l-2.652-2.653a3.895 3.895 0 1 0-3.233 1.722m0-1.6a2.295 2.295 0 1 1 0-4.59 2.295 2.295 0 0 1 0 4.59\\\"/></g></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.587 17.028a1.88 1.88 0 0 1-1.882-1.881V1.976A1.88 1.88 0 0 1 2.587.094H17.64a1.88 1.88 0 0 1 1.881 1.882v13.17a1.88 1.88 0 0 1-1.881 1.882zm5.645-1.41h9.408a.47.47 0 0 0 .47-.471V1.976a.47.47 0 0 0-.47-.47H8.232zM6.82 1.504H2.587a.47.47 0 0 0-.47.47v13.172a.47.47 0 0 0 .47.47H6.82z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5 9.5a.5.5 0 0 0 .5-.5v-.5A.5.5 0 0 0 5 8H3.5a.5.5 0 0 0-.5.5V9a.5.5 0 0 0 .5.5zm.5 2.5a.5.5 0 0 1-.5.5H3.5A.5.5 0 0 1 3 12v-.5a.5.5 0 0 1 .5-.5H5a.5.5 0 0 1 .5.5zM5 6.5a.5.5 0 0 0 .5-.5v-.5A.5.5 0 0 0 5 5H3.5a.5.5 0 0 0-.5.5V6a.5.5 0 0 0 .5.5z\\\"/><path d=\\\"M2 19a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2zm6-1.5h10a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5H8zm-1.5-15H2a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h4.5z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5z\\\"/><path fill-opacity=\\\".256\\\" d=\\\"M1 1h14v14H1z\\\"/><g class=\\\"ck-icon__selected-indicator\\\"><path d=\\\"M7 0h2v1H7zM0 7h1v2H0zm15 0h1v2h-1zm-8 8h2v1H7z\\\"/><path fill-opacity=\\\".254\\\" d=\\\"M1 1h14v14H1z\\\"/></g></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m-7 6.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.972 3.115A.75.75 0 0 1 6.374 3c.14 0 .28.037.402.115l3.229 2.059 3.228-2.057a.75.75 0 0 1 .805 0l3.629 2.31h.002a.757.757 0 0 1 0 1.264h-.002L15.034 8.37l2.633 1.678h.002a.756.756 0 0 1 0 1.262h-.002l-3.63 2.312a1 1 0 0 1-.161.076c.234.08.409.275.482.5a.75.75 0 0 1-.322.854l-3.629 2.308a.75.75 0 0 1-.805 0l-3.63-2.31a.75.75 0 0 1-.229-1.031l.076-.122h.022a.75.75 0 0 1 .32-.189.8.8 0 0 1-.19-.086l-3.63-2.312a.756.756 0 0 1 0-1.264l2.632-1.678-2.632-1.676a.757.757 0 0 1 0-1.263zm2.64 2.946L6.374 4.635 4.136 6.06l2.238 1.423L8.612 6.06Zm7.262 0-2.236-1.426-2.239 1.426 2.237 1.423zm-3.637 2.306-2.232-1.422-2.233 1.422 2.235 1.422zm-3.625 2.31L6.374 9.253l-2.238 1.426 2.238 1.424 2.238-1.424Zm7.262 0-2.236-1.425-2.239 1.426 2.237 1.424 2.238-1.424Zm-2.64 2.944-3.23-2.056-3.228 2.056a.8.8 0 0 1-.185.084.7.7 0 0 1 .185.08l3.229 2.057 3.226-2.055a.8.8 0 0 1 .18-.084.8.8 0 0 1-.178-.082Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 10 10\\\"><path d=\\\"M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 13.598v2.777h2.778l8.194-8.193-2.78-2.78L3 13.6zm13.12-7.566a.735.735 0 0 0 0-1.044l-1.734-1.73a.735.735 0 0 0-1.044 0L11.985 4.61l2.78 2.78 1.354-1.358z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.5 8.25a1.25 1.25 0 1 1-2.499.001A1.25 1.25 0 0 1 8.5 8.25m5.5 0a1.25 1.25 0 1 1-2.499.001A1.25 1.25 0 0 1 14 8.25m-6.873 3.838a.75.75 0 1 0-1.254.824C6.88 14.444 8.423 15.25 10 15.25c1.578 0 3.12-.805 4.127-2.338a.75.75 0 0 0-1.254-.824C12.13 13.221 11.048 13.75 10 13.75c-1.047 0-2.13-.529-2.873-1.662\\\" clip-rule=\\\"evenodd\\\"/><path d=\\\"M10 19a9 9 0 1 0 0-18 9 9 0 0 0 0 18m0-1.5a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053z\\\"/><path d=\\\"M4 18h5.523v-1H4zm-2 0h1v-1H2z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.9 4.385a1.2 1.2 0 0 0-.44.44h.002l-5.284 9.15a1.2 1.2 0 0 0 1.04 1.8h10.564a1.2 1.2 0 0 0 1.04-1.8l-5.282-9.15a1.2 1.2 0 0 0-1.64-.44m.05 8.363a.3.3 0 0 1 .115-.023h.9a.3.3 0 0 1 .3.3v.9a.3.3 0 0 1-.3.3h-.9a.3.3 0 0 1-.3-.3v-.9a.3.3 0 0 1 .185-.277m-.185-4.723a.3.3 0 0 1 .3-.3h.9a.3.3 0 0 1 .3.3v3.4a.3.3 0 0 1-.3.3h-.9a.3.3 0 0 1-.3-.3z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19 4.5 14 0H3v6.5h1.5v-5h8v5h5V11H19zM14 2l3.3 3H14zm-1.548 16.5 1.25 1.5H3v-3h1.5v1.5zm7.374-1.657a.75.75 0 1 0-1.152-.96L17.5 17.29V13H16v4.29l-1.174-1.408a.75.75 0 1 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0z\\\"/><path d=\\\"M1.63 14.24V12.3h.88c.66 0 1.14-.15 1.46-.45s.48-.71.48-1.24c0-.52-.15-.91-.44-1.2C3.7 9.15 3.28 9 2.69 9H0v5.24zm.4-3h-.4v-1.17h.46c.3 0 .5.05.62.17.1.11.16.25.16.42 0 .16-.06.3-.19.41s-.34.16-.66.16zm5.7 3c.28 0 .6-.05.96-.14.26-.07.5-.21.73-.42.22-.2.4-.47.53-.77.12-.31.19-.75.19-1.3 0-.37-.04-.7-.13-1.02a2.3 2.3 0 0 0-.42-.84c-.19-.24-.43-.43-.72-.56C8.57 9.06 8.2 9 7.72 9h-2.4v5.24zm-.4-1.19h-.4v-2.86h.4c.43 0 .73.1.91.3s.27.59.27 1.14c0 .42-.04.73-.12.91a.76.76 0 0 1-.34.4c-.14.07-.38.11-.72.11m5.3 1.2V12.1h2.02v-1.06h-2.03v-.91H15V9h-4v5.24h1.62z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17.826 16.843a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0z\\\"/><path d=\\\"m14 0 5 4.5v9.741a2.74 2.74 0 0 0-1.5-.617V6.5h-5v-5h-8v3H3V0zm0 2v3h3.3zM3 17.5h6.746q.15.331.391.623l.731.877H3z\\\"/><path d=\\\"M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6zM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.6.6 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M10 6.002a4 4 0 1 1 0 8 4 4 0 0 1 0-8m1.2 1.2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3\\\" clip-rule=\\\"evenodd\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M10.02 3.003c1.249.032 2.49.494 3.617 1.116 1.133.625 2.2 1.44 3.109 2.235a28.6 28.6 0 0 1 2.858 2.898l.171.204.046.054.012.016.004.004v.002a.8.8 0 0 1 .11.193l.02.05q.013.045.02.09l.01.054a.7.7 0 0 1 0 .146q-.002.032-.009.065l-.017.082-.024.061q-.014.038-.03.075l-.01.019a1 1 0 0 1-.06.093l-.002-.002h-.001l.002.003h-.001l-.004.005-.012.016-.046.058-.17.21a27.5 27.5 0 0 1-2.861 2.977c-.912.811-1.981 1.635-3.12 2.252-1.132.614-2.387 1.053-3.652 1.02-1.249-.031-2.49-.493-3.618-1.115-1.133-.626-2.199-1.44-3.108-2.235a28.6 28.6 0 0 1-3.029-3.102l-.045-.055-.012-.016-.004-.004-.001-.002a1 1 0 0 1-.065-.092l-.007-.015q-.025-.045-.041-.094l-.017-.042q-.014-.044-.02-.092-.007-.026-.01-.053Q0 10.042 0 10q-.002-.033 0-.065.004-.04.013-.079l.013-.06a1 1 0 0 1 .031-.084q.011-.03.025-.058l.012-.022a1 1 0 0 1 .06-.09h.001V9.54l.004-.005.012-.016.046-.057.17-.211a27.5 27.5 0 0 1 2.86-2.977c.911-.81 1.98-1.635 3.119-2.252 1.133-.614 2.388-1.052 3.652-1.02m-.04 1.499c-.902-.023-1.89.293-2.897.84-1.002.543-1.976 1.289-2.836 2.054a26 26 0 0 0-2.103 2.112l-.014.016a.695.695 0 0 0 .007.932 27 27 0 0 0 2.105 2.064c.861.753 1.838 1.495 2.846 2.051 1.013.56 2.014.906 2.931.93.903.022 1.89-.293 2.898-.84 1.002-.544 1.977-1.288 2.837-2.054a26 26 0 0 0 2.117-2.13.695.695 0 0 0-.008-.93 27 27 0 0 0-2.104-2.064c-.862-.753-1.839-1.495-2.847-2.052-1.014-.56-2.014-.906-2.932-.93\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.97 2.97a.75.75 0 0 1 1.06 0L5.56 4.5q.397-.254.807-.477c1.133-.614 2.388-1.052 3.652-1.02 1.25.032 2.492.494 3.618 1.116 1.133.625 2.2 1.44 3.109 2.235a29 29 0 0 1 2.858 2.898q.112.13.171.204l.046.055.012.015.004.004v.002q.07.091.11.193l.02.05q.013.045.02.09l.01.054a1 1 0 0 1 0 .146q-.002.033-.009.065l-.017.082-.024.061q-.014.039-.03.075l-.01.019a1 1 0 0 1-.06.093l-.003-.002.002.003h-.002l-.003.006-.012.015-.046.058-.17.21a27.5 27.5 0 0 1-2.861 2.978q-.508.452-1.072.892l1.35 1.35a.75.75 0 0 1-1.02 1.098 1 1 0 0 0-.08-.097l-13-13-.043-.039a.75.75 0 0 1 .083-.961m1.27 4.432a26 26 0 0 0-2.096 2.106l-.014.016a.695.695 0 0 0 .007.932 27 27 0 0 0 2.105 2.064c.861.753 1.838 1.495 2.846 2.051 1.013.56 2.014.906 2.931.93.612.015 1.26-.128 1.93-.39l1.14 1.14c-.984.466-2.043.776-3.109.749-1.249-.032-2.491-.494-3.618-1.116-1.132-.626-2.199-1.44-3.108-2.235a28.6 28.6 0 0 1-3.029-3.102l-.045-.055-.012-.016-.004-.004-.001-.002a1 1 0 0 1-.065-.092l-.007-.015a1 1 0 0 1-.041-.094l-.017-.042q-.014-.045-.02-.091-.007-.027-.01-.054Q0 10.042 0 10v-.064q.004-.04.013-.079l.013-.06a1 1 0 0 1 .031-.084q.011-.03.025-.058l.012-.022a1 1 0 0 1 .06-.09h.001V9.54l.004-.005.012-.016.046-.057.17-.211a27.6 27.6 0 0 1 2.788-2.913zm6.522 6.523a4 4 0 0 1-.762.077 4 4 0 0 1-3.926-4.766zM9.98 4.502c-.902-.023-1.89.293-2.897.84q-.218.117-.434.248l1.103 1.102a4 4 0 0 1 5.557 5.557l1.3 1.3c.397-.301.782-.619 1.145-.942a26 26 0 0 0 2.117-2.13.696.696 0 0 0-.008-.93 27 27 0 0 0-2.104-2.064c-.861-.753-1.84-1.495-2.847-2.052-1.014-.559-2.014-.906-2.932-.93m1.22 2.7c-.809 0-1.466.64-1.497 1.441l1.555 1.555a1.5 1.5 0 0 0-.058-2.996\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.01 2C5.59 2 2 5.59 2 10.01a8.01 8.01 0 0 0 6.775 7.914.75.75 0 0 0 .598-.17.75.75 0 0 0 .262-.565v-5.02a.75.75 0 0 0-.22-.524.75.75 0 0 0-.526-.221H7.77v-.627h1.12a.75.75 0 0 0 .525-.22c.14-.14.22-.329.22-.526V8.324c0-.466.122-1.083.524-1.48.33-.326 1.017-.6 2.332-.43v.408c-.152.012-.305.017-.457.04-.335.048-.662.136-.943.326-.313.21-.497.505-.59.804s-.107.602-.107.88v1.18a.746.746 0 0 0 .744.746h1.158l-.098.63h-1.06a.744.744 0 0 0-.744.744v5.017a.75.75 0 0 0 .26.567q.123.105.28.148a.75.75 0 0 0 .319.022A8.012 8.012 0 0 0 10.01 2m0 1.486a6.52 6.52 0 0 1 6.521 6.524c0 2.945-1.973 5.386-4.65 6.197v-3.291h.951a.75.75 0 0 0 .736-.63l.332-2.12a.74.74 0 0 0-.17-.6.75.75 0 0 0-.564-.26h-1.285V8.87c0-.252.024-.384.039-.433q.003-.011.002-.016c.016-.011.104-.055.326-.088a7 7 0 0 1 .984-.05.75.75 0 0 0 .528-.218.74.74 0 0 0 .217-.527V5.76a.75.75 0 0 0-.586-.729c-2.04-.438-3.433-.083-4.278.75-.818.807-.968 1.884-.968 2.543v.983H7.027a.74.74 0 0 0-.525.22.74.74 0 0 0-.219.526v2.119c0 .197.08.386.219.525.14.14.328.221.525.221h1.118v3.291c-2.681-.809-4.659-3.25-4.659-6.197a6.523 6.523 0 0 1 6.524-6.526\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.146 11.22a.75.75 0 0 1 1.061 0l3.677 3.678a.75.75 0 0 1-1.06 1.06l-2.397-2.396v5.689a.75.75 0 0 1-1.5 0v-5.69L3.53 15.959a.75.75 0 0 1-1.06-1.06z\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M17.75 5.94v11.61a.95.95 0 0 1-.95.951h-6.3a.75.75 0 0 1 0-1.5h5.75v-10H11.7a.95.95 0 0 1-.95-.95V1.5h-6v8.66l-1.5 1.5V.95A.95.95 0 0 1 4.2 0h7.61zm-5.5-.439h2.94l-2.94-2.94z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286z\\\"/><path d=\\\"M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306m-3.4-5.715c.562.305.742 1.106.354 1.494s-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.5 6.5 0 0 1 3.1.784\\\"/><path d=\\\"M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0m11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m8.38 9.262H7.62L10 5.506zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M12.4 10.3 10 4.5l-2.4 5.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973zm-2.754 2.5L8.038 4.785 5.261 11.5zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825q0-.063.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782q.003.065.003.135z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19.832 7.469V1h-1.004q-.21.59-.778 1.03-.567.443-1.05.6v1.121a4.3 4.3 0 0 0 1.595-.936v4.654zM5.465 7.452q1.19 0 1.934.27t1.094.682q.35.405.49 1.029.08.387.08 1.398v2.021q0 2.115.095 2.68.105.556.404 1.07H7.916a3.1 3.1 0 0 1-.315-1.103q-.876.716-1.69 1.01a5 5 0 0 1-1.733.296q-1.531 0-2.355-.716-.822-.725-.823-1.846 0-.657.307-1.196.315-.547.814-.876a4 4 0 0 1 1.138-.497q.465-.118 1.4-.228 1.908-.219 2.81-.522.009-.312.009-.397 0-.926-.447-1.305-.603-.514-1.794-.514-1.111 0-1.646.379-.525.37-.779 1.322l-1.54-.202q.21-.953.69-1.533.483-.59 1.392-.902.911-.32 2.11-.32m7.048 1.034Q13.51 7.26 15.06 7.26q.858 0 1.62.343.77.334 1.26.952.5.61.78 1.475a6 6 0 0 1 .28 1.854q0 2.341-1.182 3.62t-2.837 1.278q-1.645 0-2.582-1.347v1.141h-1.461V4h1.575zm-5.044 3.625q-.858.337-2.573.574-.972.134-1.375.303a1.35 1.35 0 0 0-.622.497 1.24 1.24 0 0 0-.218.716q0 .606.472 1.01.482.405 1.4.405.912 0 1.62-.379.71-.387 1.043-1.052.253-.515.253-1.517zM14.92 8.53q-1.033 0-1.786.884-.753.875-.753 2.54 0 1.638.455 2.367.744 1.193 2.014 1.193 1.032 0 1.785-.875.753-.884.753-2.625 0-1.785-.727-2.634-.717-.85-1.741-.85\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.5 5.75a.75.75 0 0 1 0-1.5H15a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0V6.81l-2.72 2.72a.75.75 0 0 1-1.06-1.06l2.72-2.72zm-1.97 4.72a.75.75 0 0 1 0 1.06l-2.72 2.72H8.5a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 1.5 0v1.69l2.72-2.72a.75.75 0 0 1 1.06 0\\\"/><path d=\\\"M2 0h16a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m16 1.5H2a.5.5 0 0 0-.5.5v16a.5.5 0 0 0 .5.5h16a.5.5 0 0 0 .5-.5V2a.5.5 0 0 0-.5-.5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.53 5.53a.75.75 0 0 0-1.06-1.06l-2.72 2.72V5.5a.75.75 0 0 0-1.5 0V9a.75.75 0 0 0 .75.75h3.5a.75.75 0 0 0 0-1.5h-1.69zM5.5 10.25a.75.75 0 0 0 0 1.5h1.69l-2.72 2.72a.75.75 0 1 0 1.06 1.06l2.72-2.72v1.69a.75.75 0 0 0 1.5 0V11a.75.75 0 0 0-.75-.75z\\\"/><path d=\\\"M0 2a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm18.5 0a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v16a.5.5 0 0 0 .5.5h16a.5.5 0 0 0 .5-.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.666 3a.74.74 0 0 0-.371.1.75.75 0 0 0-.275.267l-4.918 8.397a.74.74 0 0 0-.006.744l2.46 4.318a.75.75 0 0 0 .65.377h9.606a.75.75 0 0 0 .65-.377l2.46-4.318a.74.74 0 0 0 .002-.735l-4.688-8.392a.75.75 0 0 0-.654-.38H7.666Zm1.285 1.492h3.195l3.854 6.9h-3.1zm-1.293.742L9.223 7.97l-4.016 6.988-1.6-2.813zm2.424 4.237 1.098 1.922H8.977zM8.12 12.885h7.87l-1.61 2.825H6.494z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.258 3.082c0-.594.486-1.082 1.08-1.082a4.38 4.38 0 0 1 4.239 5.489c-.18.688-.633 1.245-1.109 1.767h3.468c.595 0 1.082.488 1.082 1.082a4.382 4.382 0 0 1-5.49 4.24v-.001c-.689-.18-1.246-.633-1.768-1.109v3.468c0 .595-.487 1.082-1.082 1.082a4.38 4.38 0 0 1-4.111-2.866 4.4 4.4 0 0 1-.125-2.624c.18-.689.632-1.246 1.108-1.768H3.082A1.085 1.085 0 0 1 2 9.68a4.382 4.382 0 0 1 5.49-4.238c.69.18 1.246.632 1.768 1.108zm3.164 1.32c-.435-.46-1.043-.667-1.662-.767v5.49c.619-.1 1.227-.307 1.662-.766a2.875 2.875 0 0 0 0-3.958ZM7.21 6.918a2.88 2.88 0 0 0-2.93.789c-.396.423-.569.983-.658 1.55h5.56c-.045-.295-.091-.59-.224-.859a2.88 2.88 0 0 0-1.748-1.48m9.254 3.841h-5.653l.013.1c.012.098.025.197.053.292a2.873 2.873 0 0 0 4.862 1.158 3 3 0 0 0 .398-.54v-.001q.167-.294.263-.619c.026-.092.038-.188.05-.283zm-8.872 4.86c.437.459 1.045.666 1.665.766V10.89c-1.369.222-2.456 1.314-2.456 2.747 0 .738.283 1.447.791 1.981Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19 9v10h-2v-8h-2V9zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1zm16.076 8.343V18.5h-6.252q.1-.94.61-1.78.507-.841 2.005-2.232 1.206-1.124 1.479-1.523.368-.552.368-1.092 0-.597-.32-.917-.321-.32-.886-.32-.559 0-.889.336t-.38 1.117l-1.778-.178q.159-1.473.997-2.114t2.095-.64q1.377 0 2.164.742t.787 1.847q0 .629-.225 1.197-.225.567-.714 1.19-.324.412-1.168 1.187-.845.774-1.07 1.028a3 3 0 0 0-.365.495z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1zm9.989 7.53 1.726-.209q.082.66.445 1.01.36.348.876.349.552 0 .93-.42.377-.418.377-1.13 0-.672-.362-1.066a1.15 1.15 0 0 0-.882-.393q-.342 0-.819.133l.197-1.453q.723.019 1.105-.315.38-.333.38-.885 0-.47-.279-.75-.28-.278-.743-.278a1.07 1.07 0 0 0-.78.317q-.324.317-.394.927l-1.644-.28q.172-.844.517-1.348.347-.505.965-.794a3.24 3.24 0 0 1 1.387-.289q1.314 0 2.108.838.654.685.653 1.549 0 1.225-1.339 1.955.8.171 1.28.768.478.597.478 1.441 0 1.226-.895 2.088-.894.864-2.228.864-1.263 0-2.094-.727-.832-.727-.965-1.901z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5zm0-3.44v-3.18l-2.14 3.18z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1zm9.578 7.607 1.777-.184q.076.603.45.955a1.223 1.223 0 0 0 1.81-.101q.387-.455.387-1.368 0-.857-.384-1.286-.384-.428-1-.428-.768 0-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.7 2.7 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863q.825.864.825 2.241a3.36 3.36 0 0 1-.666 2.05q-.907 1.232-2.52 1.232-1.29 0-2.101-.692-.813-.691-.971-1.86\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1zm15.595 2.973-1.726.19q-.064-.532-.33-.787-.267-.253-.692-.253-.565 0-.956.507-.39.508-.492 2.114.667-.787 1.657-.787 1.117 0 1.914.85.797.852.797 2.197 0 1.428-.838 2.291-.838.864-2.152.864-1.41 0-2.317-1.095t-.908-3.59q0-2.558.946-3.688t2.457-1.13q1.059 0 1.755.594.694.593.885 1.723m-4.043 3.891q0 .87.4 1.343.398.473.914.473.495 0 .825-.388.33-.386.33-1.27 0-.906-.355-1.329a1.12 1.12 0 0 0-.89-.422q-.513 0-.869.403c-.356.403-.355.666-.355 1.19\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1\\\"/><path d=\\\"M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052zM11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 9h16v2H2z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M17 0a2 2 0 0 1 2 2v7a1 1 0 0 1 1 1v5a1 1 0 0 1-.883.993l-.118.006L19 17a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2l-.001-1.001-.116-.006A1 1 0 0 1 0 15v-5a1 1 0 0 1 .999-1L1 2a2 2 0 0 1 2-2zm.499 15.999h-15L2.5 17a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5zm-3.478-6.013-.014.014H14v.007l-1.525 1.525-1.46-1.46-.015.013V10h-1v5h1v-3.53l1.428 1.43.048.043.131-.129L14 11.421V15h1v-5h-.965zM2 10H1v5h1v-2h2v2h1v-5H4v2H2zm7 0H6v1h1v4h1v-4h1zm8 0h-1v5h3v-1h-2zm0-8.5H3a.5.5 0 0 0-.5.5l-.001 6.999h15L17.5 2a.5.5 0 0 0-.5-.5M10 7v1H4V7zm3-2v1H4V5zm-3-2v1H4V3z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1c-.662 0-1.2.47-1.2 1.1v14.248c0 .64.533 1.152 1.185 1.152h6.623v-7.236L6.617 9.15a.694.694 0 0 0-.957-.033L1.602 13.55V2.553l14.798.003V9.7H18V2.1c0-.63-.547-1.1-1.2-1.1zm11.723 2.805a2.1 2.1 0 0 0-1.621.832 2.127 2.127 0 0 0 1.136 3.357 2.13 2.13 0 0 0 2.611-1.506 2.13 2.13 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.366-.44Z\\\"/><path d=\\\"M19.898 12.369v6.187a.844.844 0 0 1-.844.844h-8.719a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.531a.84.84 0 0 1 .597.248l.838.852h4.75c.223 0 .441.114.6.272a.84.84 0 0 1 .247.597m-1.52.654-4.377.02-1.1-1.143H11v6h7.4l-.023-4.877Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1zM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1zm-5.655 6a2.13 2.13 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a3 3 0 0 1-.414-.287 3 3 0 0 1-1.055-2.03 3 3 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.13 2.13 0 0 0-1.875-.978\\\"/><path d=\\\"M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/><path d=\\\"M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h7.029a5.4 5.4 0 0 1 .615-4.338l.762-1.232-2.975-2.78a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v6.023q.675.195 1.307.573l.058.033q.068.042.135.086V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.15 2.15 0 0 0-1.611.834 2.1 2.1 0 0 0-.438 1.158 2.14 2.14 0 0 0 1.277 2.096 2.132 2.132 0 0 0 2.645-3.11 2.13 2.13 0 0 0-1.873-.978\\\"/><path d=\\\"M16.63 10.294a3.003 3.003 0 0 0-4.142.887l-.117.177a.65.65 0 0 0-.096.492.66.66 0 0 0 .278.418.7.7 0 0 0 .944-.234 1.74 1.74 0 0 1 2.478-.463 1.87 1.87 0 0 1 .476 2.55.64.64 0 0 0-.071.5.65.65 0 0 0 .309.396.627.627 0 0 0 .869-.19l.027-.041a3.226 3.226 0 0 0-.956-4.492Zm-6.061 3.78-.044.066a3.23 3.23 0 0 0 .82 4.403 3.005 3.005 0 0 0 4.275-.798l.13-.197a.63.63 0 0 0 .092-.475.64.64 0 0 0-.268-.402.713.713 0 0 0-.99.26l-.018.029a1.74 1.74 0 0 1-2.477.461 1.87 1.87 0 0 1-.475-2.55l.029-.047a.65.65 0 0 0 .086-.485.66.66 0 0 0-.275-.408l-.04-.027a.61.61 0 0 0-.845.17\\\"/><path d=\\\"M15.312 13.925c.24-.36.154-.838-.19-1.067-.346-.23-.82-.124-1.059.236l-1.268 1.907c-.239.36-.153.838.192 1.067.345.23.818.123 1.057-.236z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822zM14 5V2l3.3 3zm-3.692 12.5q.093.157.213.303L11.52 19H8v-.876a2.24 2.24 0 0 0 1.82-.624zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0zm0 2v3h3.3zm-3.26 16a2.8 2.8 0 0 1-.469-.5H3V19h9.25v-.374A2.74 2.74 0 0 1 10.74 18\\\"/><path d=\\\"M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6zM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43zm4.191 6.612a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5M1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 8.251a.75.75 0 0 1 .75.75v5.5a.75.75 0 0 1-1.5 0v-5.5a.75.75 0 0 1 .75-.75m0-3.5a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-1.5 0v-.5a.75.75 0 0 1 .75-.75\\\"/><path fill-rule=\\\"evenodd\\\" d=\\\"M10 .751a9.25 9.25 0 1 1 0 18.5 9.25 9.25 0 0 1 0-18.5m0 1.5a7.75 7.75 0 1 0 0 15.5 7.75 7.75 0 0 0 0-15.5\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><circle cx=\\\"10\\\" cy=\\\"9.8\\\" r=\\\"1.5\\\"/><path d=\\\"M13.25 2.75V2h.035a6 6 0 0 1 .363.014c.21.013.517.041.785.109.397.1.738.281 1.007.55s.429.587.524.907c.182.608.15 1.314.108 1.913l-.03.408c-.038.487-.073.93-.053 1.353.026.527.136.879.333 1.112.223.263.494.428.72.528a2 2 0 0 0 .335.117l.01.002.613.109v.628h-2.402a3.3 3.3 0 0 1-.42-.415c-.509-.601-.655-1.345-.687-2.009-.025-.527.02-1.094.059-1.592l.026-.347c.044-.621.044-1.067-.049-1.377a.63.63 0 0 0-.148-.276.64.64 0 0 0-.313-.157 3 3 0 0 0-.512-.066 6 6 0 0 0-.286-.01h-.016L13.25 3.5h-.75V2h.75z\\\"/><path d=\\\"M13.25 16.75v.75h.035a7 7 0 0 0 .363-.014 4.6 4.6 0 0 0 .785-.109c.397-.1.738-.28 1.007-.55.268-.269.429-.587.524-.907.182-.608.15-1.314.108-1.912l-.03-.41c-.038-.486-.073-.93-.053-1.352.026-.527.136-.879.333-1.112.223-.263.494-.428.72-.528a2 2 0 0 1 .335-.117l.01-.002.613-.109V9.75h-2.402a3.3 3.3 0 0 0-.42.416c-.509.6-.655 1.344-.687 2.008-.025.527.02 1.095.059 1.592l.026.347c.044.621.044 1.067-.049 1.378a.63.63 0 0 1-.148.275.64.64 0 0 1-.313.157 3 3 0 0 1-.512.066 6 6 0 0 1-.286.01l-.016.001H12.5v1.5h.75zm-6.5-14V2h-.035a6 6 0 0 0-.363.014 4.6 4.6 0 0 0-.785.109 2.13 2.13 0 0 0-1.008.55 2.1 2.1 0 0 0-.524.907c-.181.608-.15 1.314-.108 1.913l.031.408c.038.487.073.93.052 1.353-.025.527-.136.879-.333 1.112a2 2 0 0 1-.718.528 2 2 0 0 1-.337.117l-.01.002L2 9.122v.628h2.402a3.3 3.3 0 0 0 .42-.415c.509-.601.654-1.345.686-2.009.026-.527-.019-1.094-.058-1.592q-.015-.18-.026-.347c-.044-.621-.044-1.067.048-1.377a.63.63 0 0 1 .149-.276.64.64 0 0 1 .312-.157c.13-.032.323-.054.513-.066a6 6 0 0 1 .286-.01h.015L6.75 3.5h.75V2h-.75zm0 14v.75h-.035a7 7 0 0 1-.363-.014 4.6 4.6 0 0 1-.785-.109 2.13 2.13 0 0 1-1.008-.55 2.1 2.1 0 0 1-.524-.907c-.181-.608-.15-1.314-.108-1.912l.031-.41c.038-.486.073-.93.052-1.352-.025-.527-.136-.879-.333-1.112a2 2 0 0 0-.718-.528 2 2 0 0 0-.337-.117l-.01-.002L2 10.378V9.75h2.402q.218.178.42.416c.509.6.654 1.344.686 2.008.026.527-.019 1.095-.058 1.592q-.015.18-.026.347c-.044.621-.044 1.067.048 1.378a.63.63 0 0 0 .149.275.64.64 0 0 0 .312.157c.13.032.323.054.513.066a6 6 0 0 0 .286.01l.015.001H7.5v1.5h-.75z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m9.586 14.633.021.004q-.054.502.393.962.123.125.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15q.711-.106 1.005-.334.235-.182.404-.597l2.416-9.55a1.05 1.05 0 0 0-.281-.823 1.1 1.1 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195q-.564.084-.823.296-.323.263-.623.79z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".16\\\" d=\\\"M35 20a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H15.5a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M8.508 9.561q.567-.44.778-1.03h1.004V15H9.053v-4.654a4.3 4.3 0 0 1-1.595.936v-1.121q.483-.158 1.05-.6m4.525 4.204V15h-1.235v-1.235zm1.299 10.204v-6.47h-1.004q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235H15.84v1.235zm4.099 0v-6.47H20.17q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235h-1.235v1.235zM19.032 27.5v6.469h-1.237v-4.654a4.3 4.3 0 0 1-1.595.936V29.13q.483-.158 1.05-.6.568-.44.778-1.03zm2.743 5.234v1.235H20.54v-1.235zm4.357 1.335v-6.47h-1.004q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235H27.64v1.235zm4.357 0v-6.47h-1.004q-.21.59-.778 1.03-.567.444-1.05.6v1.122a4.3 4.3 0 0 0 1.595-.936v4.654zm2.743 0v-1.235H34.74v1.235z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m17.975 15.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825q0-.063.002-.123l-.77.77L15 4.765 17.196 2.5l2.265 2.265-.707.707-.782-.782q.003.065.003.135zM1 15.75c0 .414.273.75.61.75h8.067a.56.56 0 0 0 .43-.22.85.85 0 0 0 .18-.53.85.85 0 0 0-.18-.53.56.56 0 0 0-.43-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53m0-12c0 .414.273.75.61.75h11.78a.56.56 0 0 0 .431-.22.85.85 0 0 0 .179-.53.85.85 0 0 0-.178-.53.56.56 0 0 0-.431-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53m0 4c0 .414.273.75.61.75h11.78a.56.56 0 0 0 .431-.22.85.85 0 0 0 .179-.53.85.85 0 0 0-.178-.53.56.56 0 0 0-.431-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53m0 4c0 .414.273.75.61.75h11.78a.56.56 0 0 0 .431-.22.85.85 0 0 0 .179-.53.85.85 0 0 0-.178-.53.56.56 0 0 0-.431-.22H1.609a.56.56 0 0 0-.43.22.85.85 0 0 0-.179.53\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M5.714 15.11q.935 0 1.46-.66.632-.799.632-2.627 0-1.832-.629-2.624-.527-.668-1.463-.668t-1.459.66q-.633.8-.633 2.619 0 1.854.576 2.577.577.723 1.516.723m0-1.024a.6.6 0 0 1-.398-.14q-.173-.141-.287-.565-.115-.424-.115-1.558c0-1.134.043-1.294.128-1.613q.096-.37.272-.512a.62.62 0 0 1 .4-.143.6.6 0 0 1 .398.143q.173.143.288.567t.114 1.558c0 1.134-.043 1.292-.128 1.608q-.096.37-.272.512a.62.62 0 0 1-.4.143m6.078.914V8.531H10.79q-.21.59-.778 1.03-.567.442-1.05.6v1.121a4.3 4.3 0 0 0 1.595-.936V15zm3.344 0v-1.235h-1.235V15zm-9.422 9.11q.935 0 1.46-.66.632-.799.632-2.627 0-1.833-.629-2.624-.527-.668-1.463-.668t-1.459.66q-.633.8-.633 2.619 0 1.854.576 2.577.577.723 1.516.723m0-1.024a.6.6 0 0 1-.398-.14q-.173-.142-.287-.565-.115-.424-.115-1.558c0-1.134.043-1.294.128-1.613q.096-.37.272-.512a.62.62 0 0 1 .4-.143.6.6 0 0 1 .398.143q.173.142.288.567t.114 1.558c0 1.134-.043 1.292-.128 1.608q-.096.37-.272.512a.62.62 0 0 1-.4.143m7.088.914v-1.147H10.35q.097-.167.253-.343.155-.175.74-.712t.81-.821q.338-.431.493-.824.156-.394.156-.829 0-.765-.544-1.279-.546-.514-1.499-.514-.87 0-1.45.444t-.69 1.463l1.23.124q.036-.54.264-.774t.615-.233q.391 0 .613.222t.222.635q0 .374-.255.756-.189.277-1.024 1.055-1.037.962-1.388 1.544-.352.583-.422 1.233zm2.334 0v-1.235h-1.235V24zM5.714 34.11q.935 0 1.46-.66.632-.799.632-2.627 0-1.832-.629-2.624-.527-.668-1.463-.668t-1.459.66q-.633.8-.633 2.619 0 1.854.576 2.577.577.723 1.516.723m0-1.024a.6.6 0 0 1-.398-.14q-.173-.142-.287-.565-.115-.424-.115-1.558c0-1.134.043-1.294.128-1.613q.096-.37.272-.512a.62.62 0 0 1 .4-.143.6.6 0 0 1 .398.143q.173.142.288.567t.114 1.558c0 1.134-.043 1.292-.128 1.608q-.096.37-.272.512a.62.62 0 0 1-.4.143m4.992 1.024q.924 0 1.543-.598.62-.597.62-1.446 0-.585-.332-.997a1.5 1.5 0 0 0-.886-.532q.927-.505.927-1.353 0-.598-.452-1.073-.55-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.6 1.6 0 0 0-.667.55q-.24.349-.359.933l1.139.194q.048-.422.272-.642t.54-.22q.321 0 .515.194c.194.194.193.302.193.518q0 .383-.264.613-.263.231-.764.218l-.136 1.006q.33-.092.566-.092.36 0 .611.272.25.273.25.739 0 .492-.26.782a.83.83 0 0 1-.644.29.84.84 0 0 1-.607-.242q-.25-.241-.308-.698l-1.195.145q.093.813.668 1.316t1.45.503m4.43-.11v-1.235h-1.235V34z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M10.29 15V8.531H9.286q-.21.59-.778 1.03-.567.442-1.05.6v1.121a4.3 4.3 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15zM11.3 24v-1.147H8.848q.096-.167.252-.343.156-.175.74-.712.585-.536.81-.821.338-.431.494-.824.156-.394.156-.829 0-.765-.545-1.279t-1.499-.514q-.87 0-1.45.444t-.69 1.463l1.23.124q.036-.54.264-.774.23-.233.616-.233.39 0 .613.222t.222.635q0 .374-.255.756-.19.277-1.024 1.055-1.038.962-1.389 1.544T6.971 24zm2.333 0v-1.235h-1.235V24zM9.204 34.11q.922 0 1.542-.598.62-.597.62-1.446 0-.585-.332-.997a1.5 1.5 0 0 0-.886-.532q.928-.505.928-1.353 0-.598-.453-1.073-.549-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.6 1.6 0 0 0-.668.55q-.24.349-.358.933l1.138.194q.048-.422.272-.642t.54-.22q.322 0 .515.194c.193.194.193.302.193.518q0 .383-.263.613-.263.231-.765.218l-.136 1.006q.33-.092.567-.092.36 0 .61.272.251.273.251.739 0 .492-.261.782a.83.83 0 0 1-.644.29.84.84 0 0 1-.607-.242q-.251-.241-.307-.698l-1.196.145q.093.813.668 1.316t1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6m0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M9.62 14.105q.408 0 .768-.153c.36-.153.466-.257.677-.462q.013.036.044.145.07.242.119.365h1.221a2.7 2.7 0 0 1-.222-.626q-.06-.293-.059-.908l.013-1.441q0-.804-.165-1.105-.165-.302-.569-.497-.405-.195-1.23-.195-.91 0-1.371.325-.462.325-.65 1.002l1.12.202q.114-.326.299-.455.184-.13.514-.13.488 0 .663.152.176.151.176.508v.123q-.333.14-1.2.303-.641.123-.982.288t-.53.474a1.33 1.33 0 0 0-.188.706q0 .598.415.988.416.391 1.136.391zm.368-.87a.68.68 0 0 1-.492-.189.6.6 0 0 1-.193-.448q0-.263.241-.435.159-.105.673-.215a7 7 0 0 0 .751-.19v.247q0 .443-.048.602a.77.77 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14zM10.2 25.105q.813 0 1.382-.646.57-.645.57-1.84 0-1.156-.559-1.774a1.82 1.82 0 0 0-1.41-.617q-.783 0-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592q.39.2.79.2zm-.299-.975q-.531 0-.852-.492-.23-.348-.229-1.073 0-.703.295-1.048a.93.93 0 0 1 .738-.345q.453 0 .743.354t.29 1.154q0 .751-.288 1.1t-.697.35m4.478.87v-1.235h-1.234V25zm-4.017 9.105q.9 0 1.437-.426.536-.426.725-1.261l-1.213-.207q-.092.489-.316.688a.83.83 0 0 1-.576.2.92.92 0 0 1-.75-.343q-.278-.343-.278-1.173 0-.747.274-1.066.275-.318.736-.318.348 0 .565.184t.28.55l1.216-.22q-.22-.751-.722-1.119-.504-.366-1.356-.366-1.042 0-1.653.643-.61.645-.61 1.8 0 1.143.608 1.788.609.646 1.633.646M14.633 34v-1.235h-1.235V34z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11.88 8.7V7.558h-1.234V8.7zm0 5.3V9.333h-1.234V14zm2.5 0v-1.235h-1.234V14zm-4.75 4.7v-1.142H8.395V18.7zm0 5.3v-4.667H8.395V24zm2.5-5.3v-1.142h-1.234V18.7zm0 5.3v-4.667h-1.234V24zm2.501 0v-1.235h-1.235V24zM7.38 28.7v-1.142H6.145V28.7zm0 5.3v-4.667H6.145V34zm2.5-5.3v-1.142H8.646V28.7zm0 5.3v-4.667H8.646V34zm2.5-5.3v-1.142h-1.234V28.7zm0 5.3v-4.667h-1.234V34zm2.501 0v-1.235h-1.235V34z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M14 27v6H8v-6zm0-9v6H8v-6zm0-9v6H8V9z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15zM9.352 25q1.244-.009 1.569-.044.518-.057.872-.305.354-.249.558-.664t.205-.855q0-.558-.317-.97-.315-.414-.905-.585a1.5 1.5 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83q0-.419-.197-.754a1.65 1.65 0 0 0-.495-.539 1.7 1.7 0 0 0-.672-.266q-.375-.063-1.14-.063H7.158V25zm.142-3.88H8.46v-1.49h.747q.918 0 1.112.022.325.04.49.226.165.188.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 12 12 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05q.888 0 1.154.092.266.093.406.295a.84.84 0 0 1 .14.492q0 .342-.181.547a.8.8 0 0 1-.473.257q-.189.04-.892.04M14.88 25v-1.235h-1.234V25zm-5.018 9.11q1.037 0 1.711-.512t.965-1.567l-1.261-.4q-.163.708-.536 1.037-.375.33-.892.33-.704 0-1.143-.519-.44-.518-.44-1.74 0-1.15.447-1.665.445-.514 1.162-.514.52 0 .881.29.362.29.477.79l1.288-.307q-.22-.774-.66-1.187-.738-.698-1.92-.698-1.353 0-2.184.89-.83.89-.83 2.498 0 1.521.825 2.397.826.877 2.11.877M14.88 34v-1.235h-1.234V34z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M11.916 15V8.558h-1.301V15zm2.465 0v-1.235h-1.235V15zM9.665 25v-6.442h-1.3V25zm2.5 0v-6.442h-1.3V25zm2.466 0v-1.235h-1.235V25zm-7.216 9v-6.442h-1.3V34zm2.5 0v-6.442h-1.3V34zm2.501 0v-6.442h-1.3V34zm2.465 0v-1.235h-1.235V34z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 44 44\\\"><path fill-opacity=\\\".163\\\" d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1z\\\"/><path d=\\\"M14.88 15v-1.235h-1.234V15zm0 10v-1.235h-1.234V25zm0 9v-1.235h-1.234V34z\\\"/><text x=\\\"9\\\" y=\\\"15\\\" font-family=\\\"sans-serif\\\" font-size=\\\"8\\\" font-weight=\\\"bold\\\" text-anchor=\\\"middle\\\">١</text><text x=\\\"9\\\" y=\\\"25\\\" font-family=\\\"sans-serif\\\" font-size=\\\"8\\\" font-weight=\\\"bold\\\" text-anchor=\\\"middle\\\">٢</text><text x=\\\"9\\\" y=\\\"34\\\" font-family=\\\"sans-serif\\\" font-size=\\\"8\\\" font-weight=\\\"bold\\\" text-anchor=\\\"middle\\\">٣</text></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M4.2 3c-.584 0-1.145.23-1.557.643A2.2 2.2 0 0 0 2 5.199v8.719a2.194 2.194 0 0 0 2.2 2.195h11.624a2.194 2.194 0 0 0 2.196-2.195V7.621a2.194 2.194 0 0 0-2.195-2.2h-5.393l-1.237-2.06A.75.75 0 0 0 8.56 3zm0 1.488h3.935l1.236 2.06a.75.75 0 0 0 .64.362h5.813a.71.71 0 0 1 .707.71v6.298a.707.707 0 0 1-.707.707H4.2a.71.71 0 0 1-.71-.707V5.199a.71.71 0 0 1 .71-.71Z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.68 13.74 4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474M13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.1 11.1 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.5.5 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304q-.387.166-.757.365l6.239 6.24-.006.005.78.78q-.582.141-1.174.215l-1.11-1.11h.011L4.55 8.197a7 7 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10 10 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a3 3 0 0 0-.124.2q-.065.116-.108.241a.5.5 0 0 0-.028.133.3.3 0 0 0 .008.072 1 1 0 0 0 .082.226q.1.2.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93m7.07.531a4.63 4.63 0 0 1 1.108 5.992l.345.344.046-.018a9.3 9.3 0 0 0 2-1.112q.385-.281.727-.613.207-.2.392-.431.109-.135.203-.286.086-.14.148-.292a1 1 0 0 0 .036-.12.3.3 0 0 0 .008-.072.5.5 0 0 0-.028-.133 1 1 0 0 0-.036-.096 2 2 0 0 0-.071-.145 3 3 0 0 0-.125-.2 4 4 0 0 0-.263-.335 5.4 5.4 0 0 0-.53-.523 8 8 0 0 0-1.054-.768 9.8 9.8 0 0 0-1.879-.891q-.506-.178-1.027-.301m-2.85.21-.069.002a.5.5 0 0 0-.254.097.496.496 0 0 0-.104.679.5.5 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.49.49 0 0 0 .45.287h.008a.5.5 0 0 0 .35-.158.48.48 0 0 0 .13-.335.6.6 0 0 0-.048-.219 3.4 3.4 0 0 0-.36-.723 3.44 3.44 0 0 0-2.791-1.543l-.028-.001z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.346 9.422a.151.151 0 0 1 .284 0l.548 1.484a.15.15 0 0 0 .09.089l1.483.549a.151.151 0 0 1 0 .284l-1.483.548a.15.15 0 0 0-.09.09l-.548 1.483a.15.15 0 0 1-.142.1.15.15 0 0 1-.142-.1l-.549-1.483a.15.15 0 0 0-.09-.09l-1.483-.548a.15.15 0 0 1 0-.284l1.484-.549a.15.15 0 0 0 .089-.09zm.96-7.68a.151.151 0 0 1 .284 0l.549 1.483a.15.15 0 0 0 .089.09l1.483.548a.15.15 0 0 1 .072.229.15.15 0 0 1-.072.055l-1.483.549a.15.15 0 0 0-.09.09l-.548 1.482a.151.151 0 0 1-.284 0l-.549-1.483a.15.15 0 0 0-.09-.09l-1.483-.548a.151.151 0 0 1 0-.284l1.484-.549a.15.15 0 0 0 .09-.089zm-8.641 0a.151.151 0 0 1 .284 0l.549 1.483a.15.15 0 0 0 .09.09l1.482.548a.15.15 0 0 1 .072.229.15.15 0 0 1-.072.055l-1.483.549a.15.15 0 0 0-.09.09L7.95 6.267a.151.151 0 0 1-.284 0l-.549-1.483a.15.15 0 0 0-.089-.09l-1.483-.548a.151.151 0 0 1 0-.284l1.483-.549a.15.15 0 0 0 .09-.089l.548-1.483zm7.055 6.204a.85.85 0 0 0 .25-.591.82.82 0 0 0-.241-.588l-1.943-1.938a.8.8 0 0 0-.588-.241.84.84 0 0 0-.591.25l-1.545 1.539 3.115 3.115z\\\"/><path d=\\\"M1.19 15.636a.96.96 0 0 1 .281-.679l7.835-7.834 3.121 3.12-7.834 7.835a.96.96 0 0 1-1.358 0l-1.764-1.764a.96.96 0 0 1-.28-.678Zm9.22-5.391-1.121-1.12-6.479 6.478 1.121 1.121z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.798 1.59 3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z\\\" class=\\\"ck-icon__fill\\\"/><path d=\\\"m2.556 16.727.234-.348q-.445-.226-.498-.426-.054-.206.115-.837.14-.375.169-.595a4.5 4.5 0 0 0 0-.725q-.313-.931-.284-1.26.03-.327.475-.862l6.77-9.414q.808-1.365 3.199.18 2.39 1.549 1.784 2.686l-5.877 10.36q-.237.618-.526.782-.29.163-1.232.21-.543.196-.738.318t-.526.47q-.44.397-.632.397-.143 0-.524-.226l-.31.41zm-.279.415 1.575 1.103-.392.515H1.19zm8.1-13.656-4.953 6.9L8.75 12.57l4.247-7.574q.263-.375-1.092-1.192-1.354-.819-1.528-.32zM8.244 18.5 9.59 17h9.406v1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M16.754 2.501a.75.75 0 0 1 .75.75v5.2a.75.75 0 1 1-1.5 0V5.06L11.98 9.086a.75.75 0 0 1-1.061-1.061L14.943 4h-3.389a.75.75 0 0 1 0-1.5zM3.25 17.504a.75.75 0 0 1-.75-.75v-5.2a.75.75 0 0 1 1.5 0v3.39l4.023-4.023a.75.75 0 1 1 1.061 1.06l-4.023 4.023H8.45a.75.75 0 0 1 0 1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 64 42\\\"><path d=\\\"M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098s-4.538-.083-4.538-1.678 2.032-3.43 4.538-4.098c.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556L49 17zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.99 1.99 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17m29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155zM20.6 21.375v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616V37.53zm24.233-16.155v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615V37.53zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 22 20\\\"><path d=\\\"M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-14.24 1h13.008v12H4.467zm-2.208 1h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003l-.029 1h-.974zm16.448 0h1.003v1h-1.003zm-16.448 2h.974v1h-.974zm16.448 0h1.003v1h-1.003z\\\"/><path d=\\\"M8.374 6.648a.4.4 0 0 1 .395-.4.4.4 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.45 9.304a.75.75 0 0 1-.75-.75v-5.2a.75.75 0 0 1 1.5 0v3.39l4.023-4.023a.75.75 0 0 1 1.06 1.06l-4.022 4.023h3.389a.75.75 0 0 1 0 1.5zm-2.896 1.397a.75.75 0 0 1 .75.75v5.2a.75.75 0 0 1-1.5 0v-3.39L3.78 17.286a.75.75 0 1 1-1.06-1.061l4.022-4.023H3.354a.75.75 0 0 1 0-1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7.85 6.5a.75.75 0 0 1 0-1.5h9.5a.75.75 0 1 1 0 1.5zM3 8V2.7H.5v1h1V8zm10.42 6.185a.75.75 0 0 0 .53 1.28h3.4a.75.75 0 1 0 0-1.5h-3.4a.75.75 0 0 0-.53.22m-7.784-6.15V6.8H4.4v1.235zM9 17.865v-5.3H6.5v1h1v4.3zm2.636.035v-1.235H10.4V17.9zM3.2 17.865v-5.3H.7v1h1v4.3zm2.636.035v-1.235H4.6V17.9z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0m1 15H9v-2h2zm0-4H9V5h2z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M3.5 3v5H2V3.7H1v-1h2.5zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001q-.073.607-.333.988-.263.381-1.244 1.312H4.3v1h-4zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H6.5V12h6.997z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1m-1.505.5H3.504V12h12.991z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\" opacity=\\\".5\\\"/><path d=\\\"M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.95 1.43a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h.75v6.3H.95a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-.65h1.932l1.539-1.5H5v-.95a.95.95 0 0 0-.95-.95H3.2v-6.3h.85A.95.95 0 0 0 5 5.48v-.55h10v.55a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-3.1a.95.95 0 0 0-.95-.95h-3.1a.95.95 0 0 0-.95.95v1.05H5V2.38a.95.95 0 0 0-.95-.95zm.55 3.5v-2h2v2zm0 9.3v2h2v-2zm15-11.3v2h2v-2zM8.139 20.004v-2.388l7.045-7.048 2.391 2.391-7.046 7.046zm11.421-9.101a.6.6 0 0 1-.138.206l-1.165 1.168-2.391-2.391 1.167-1.163a.6.6 0 0 1 .206-.138.6.6 0 0 1 .243-.049.63.63 0 0 1 .449.187l1.491 1.488c.059.059.108.129.138.206s.049.16.049.243a.6.6 0 0 1-.049.243\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 17v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15.5v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm0-2v1h-1v-1zm-19 0v1H0v-1zM14.5 2v1h-1V2zm2 0v1h-1V2zm2 0v1h-1V2zm-8 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm8 0v1h-1V2zm-10 0v1h-1V2z\\\"/><path d=\\\"M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2m0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.49.49 0 0 1-.476-.5V4c0-.276.213-.5.476-.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z\\\"/><path d=\\\"M13 5.5H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2M13 7a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-8A.5.5 0 0 1 2 7z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H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www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.223 5.001a5.28 5.28 0 0 0-4.408 2.258c-3.224.423-4.908 4.123-3.032 6.814l.004.008.002.004c.48.627 1.712 1.84 3.588 1.84h7.936c.667 0 1.32-.179 1.894-.522a3.84 3.84 0 0 0 1.381-1.46v-.005c1.13-2.16-.133-4.777-2.488-5.298-.617-1.853-2.177-3.242-4.111-3.565a5 5 0 0 0-.766-.074m-.092 1.5a3 3 0 0 1 .23.008c.077.004.154.014.231.021l.226.035a5 5 0 0 1 .45.116 3 3 0 0 1 .433.166 4 4 0 0 1 .606.348 4 4 0 0 1 .37.293 4 4 0 0 1 .33.348 3.5 3.5 0 0 1 .505.778 3 3 0 0 0-.42.117q-.123.044-.244.094l-1.49.627-2.686-1.61a4.4 4.4 0 0 0-1.002-.445c.015-.01.032-.026.047-.039a4 4 0 0 1 .4-.289 4 4 0 0 1 .424-.23 3 3 0 0 1 .219-.094q.112-.043.225-.076a4 4 0 0 1 .222-.06q.117-.029.233-.05.112-.022.228-.033.115-.011.233-.02.116-.005.23-.005m-3.8 2.193h.003c.54.001 1.111.156 1.551.428l1.783 1.07-5.867 2.471c-.535-1.29-.15-2.788 1.059-3.537l.007-.004a2.9 2.9 0 0 1 1.463-.428Zm7.974 1.33.152.008q.13.011.258.033a2 2 0 0 1 .477.145 2.2 2.2 0 0 1 .918.756q.07.1.127.2a2.3 2.3 0 0 1 .269.919c.004.081.008.165.002.248q-.006.083-.02.166l-3.507-2.102.459-.193.015-.008a2 2 0 0 1 .41-.125 2.3 2.3 0 0 1 .44-.047m-3.008 1.112 4.506 2.699a2.2 2.2 0 0 1-.338.26 2.2 2.2 0 0 1-.668.275q-.116.027-.24.04c-.081.007-.164.015-.246.015H6.373a3 3 0 0 1-.168-.004 2 2 0 0 1-.164-.016l-.154-.023q-.077-.01-.15-.026a3 3 0 0 1-.77-.3 3 3 0 0 1-.21-.133c-.012-.008-.019-.016-.03-.024z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1\\\"/><path d=\\\"M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052zM11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5m1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.598.687h1.5v5h-1.5zm14.5 0h1.5v5h-1.5z\\\"/><path d=\\\"M19.598 4.187v1.5h-16v-1.5zm-16 14.569h1.5v-5h-1.5zm14.5 0h1.5v-5h-1.5z\\\"/><path d=\\\"M19.598 15.256v-1.5h-16v1.5zM5.081 9h6v2h-6zm8 0h6v2h-6zm-9.483 1L0 12.5v-5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"2 2 56 18\\\"><path d=\\\"m12.527 14.733-.514.022-.057-.057-.058-.058.006-2.44.007-2.44-.834-.023-.833-.022.023-.406.024-.405.536-.1.536-.098.25-.145.25-.145.17-.429.172-.428.399-.024.398-.023v7.08l.02.059.02.059zm17.894.016h-.457l.043-.138.043-.137.635-2.004.636-2.004.437-1.375.436-1.375.055-.196.054-.197.38-.024.378-.024.07.069.07.07-1.162 3.667-1.16 3.667zm11.733 0h-.55V9.72h-1.65v-.864h.385l.4-.086.398-.086.233-.195.232-.196.138-.386.137-.387h.827v7.229zm6.404 0h-.51V13.02h-3.143v-1.01l1.044-1.44 1.045-1.44.59-.824.592-.825h.854l.02 2.298.021 2.298h1.02v.943H49.07v1.729zM47 12.06l1.008-.022.022-1.4.021-1.401-.07.044-.07.043-.901 1.279-.901 1.278-.058.1-.059.101zM12.256 22.893l-10.53.01-.157-.038-.157-.038-.255-.12L.9 22.59v-.19l.228-.218.228-.218.16.086.16.085h20.922l.16-.085.16-.086.228.218.227.218v.189l-.294.146-.295.147z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 31 20\\\"><mask id=\\\"a\\\" width=\\\"17\\\" height=\\\"18\\\" x=\\\"13\\\" y=\\\"1\\\" maskUnits=\\\"userSpaceOnUse\\\"><path d=\\\"M13 1h17v18H13z\\\"/><path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1z\\\"/><path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449z\\\"/></mask><path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1z\\\"/><path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449z\\\"/><path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1z\\\" mask=\\\"url(#a)\\\"/><path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449z\\\" mask=\\\"url(#a)\\\"/><mask id=\\\"b\\\" width=\\\"12\\\" height=\\\"17\\\" x=\\\"1.75\\\" y=\\\"1.165\\\" maskUnits=\\\"userSpaceOnUse\\\"><path d=\\\"M1.75 1.165h12v17h-12z\\\"/><path d=\\\"m12.25 9.96-9.5-7.795 2 12.124 2.384-2.53 2.75 4.762 1.732-1-2.75-4.763z\\\"/></mask><path d=\\\"m12.25 9.96-9.5-7.795 2 12.124 2.384-2.53 2.75 4.762 1.732-1-2.75-4.763z\\\"/><path d=\\\"m12.25 9.96-9.5-7.795 2 12.124 2.384-2.53 2.75 4.762 1.732-1-2.75-4.763z\\\" mask=\\\"url(#b)\\\"/></svg>\"", "\"<svg fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 31 20\\\" width=\\\"30\\\" height=\\\"20\\\">\\n  <path d=\\\"M14 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1V3Z\\\" fill=\\\"#000\\\"/>\\n  <path d=\\\"M27 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 27 6.449V3.25Z\\\" fill=\\\"#000\\\"/>\\n  <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M26.855 2.25H27a2.5 2.5 0 0 1 2.5 2.5v1.7a3.25 3.25 0 0 1-2.79 3.216l-4.21.602a2 2 0 0 1 1 1.732v5a2 2 0 0 1-2 2H20a2 2 0 0 1-2-2v-5a2 2 0 0 1 1-1.732v-.217A3.25 3.25 0 0 1 21.129 7H15a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h10a2 2 0 0 1 1.855 1.25ZM20 10.05V11a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h1.5a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1v-.95c0-.016 0-.033.002-.05a.75.75 0 0 1 .642-.692l4.424-.632A2.25 2.25 0 0 0 28.5 6.45V4.75a1.496 1.496 0 0 0-1.5-1.5v3.2a.75.75 0 0 1-.644.742l-4.424.632A2.25 2.25 0 0 0 20 10.05ZM15 2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H15Z\\\" fill=\\\"#fff\\\"/>\\n  <path d=\\\"M2.5 2.5A.5.5 0 0 1 3 2h2.5a.5.5 0 0 1 .354.146l.646.647.646-.647A.5.5 0 0 1 7.5 2H10a.5.5 0 0 1 0 1H7.707L7 3.707V10h.5a.5.5 0 0 1 0 1H7v4.793l.707.707H10a.5.5 0 0 1 0 1H7.5a.5.5 0 0 1-.354-.146l-.646-.647-.646.647a.5.5 0 0 1-.354.146H3a.5.5 0 0 1 0-1h2.293L6 15.793V11h-.5a.5.5 0 0 1 0-1H6V3.707L5.293 3H3a.5.5 0 0 1-.5-.5Z\\\" fill=\\\"#000\\\"/>\\n  <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"m5.793 3.5-.5-.5H3a.5.5 0 0 1 0-1h2.5a.5.5 0 0 1 .354.146l.145.146.501.5.646-.646A.5.5 0 0 1 7.5 2H10a.5.5 0 0 1 0 1H7.707L7 3.707V10h.5a.5.5 0 0 1 0 1H7v4.793l.707.707H10a.5.5 0 0 1 0 1H7.5a.5.5 0 0 1-.354-.146l-.646-.647-.5.5-.146.147a.5.5 0 0 1-.354.146H3a.5.5 0 0 1 0-1h2.293L6 15.793V11h-.5a.5.5 0 0 1 0-1H6V3.707L5.793 3.5Zm-.914.5L5 4.121v4.964a1.5 1.5 0 0 0 0 2.83v3.464l-.121.121H3a1.5 1.5 0 0 0 0 3h2.5a1.5 1.5 0 0 0 1-.382 1.5 1.5 0 0 0 1 .382H10a1.5 1.5 0 0 0 0-3H8.121L8 15.379v-3.464a1.5 1.5 0 0 0 0-2.83V4.121L8.121 4H10a1.5 1.5 0 0 0 0-3H7.5a1.5 1.5 0 0 0-1 .382A1.5 1.5 0 0 0 5.5 1H3a1.5 1.5 0 1 0 0 3h1.879Z\\\" fill=\\\"#fff\\\"/>\\n</svg>\\n\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z\\\"/><path d=\\\"M16 3.25a1.5 1.5 0 0 1 1.5 1.5v1.7a2.25 2.25 0 0 1-1.932 2.226l-4.424.632a.75.75 0 0 0-.644.743V11a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-.95a2.25 2.25 0 0 1 1.932-2.226l4.424-.632A.75.75 0 0 0 16 6.449z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.514.5c1.007 0 2.056.352 2.866.96.813.611 1.449 1.539 1.449 2.69v7.8c0 .777-.382 1.457-.888 1.93-.505.474-1.195.8-1.92.82-1.473.04-2.848-1.237-2.848-2.75v-3.7a.75.75 0 0 1 1.5 0v3.7c0 .642.65 1.268 1.306 1.25.312-.008.663-.157.938-.414.274-.256.412-.562.412-.836v-7.8c0-.556-.303-1.08-.85-1.49A3.4 3.4 0 0 0 8.513 2a3.4 3.4 0 0 0-1.946.65c-.556.41-.868.934-.868 1.5v.028l-.001.013-.002.055-.006.212-.02.787c-.015.67-.034 1.605-.046 2.663-.025 2.123-.025 4.729.074 6.704.058 1.155.628 1.948 1.466 2.478.864.547 2.017.81 3.135.81 1.114 0 2.092-.265 2.789-.785.671-.5 1.152-1.286 1.213-2.503a80 80 0 0 0 .074-5.299 82 82 0 0 0-.073-2.283L14.301 7v-.086A.75.75 0 0 1 15.8 6.91v.013l.002.033.005.127c.005.11.013.273.02.48.017.413.035 1.007.048 1.725a82 82 0 0 1-.075 5.4c-.082 1.63-.758 2.843-1.815 3.631-1.032.77-2.358 1.082-3.684 1.082-1.322 0-2.774-.306-3.939-1.044-1.191-.754-2.076-1.962-2.161-3.669-.101-2.024-.101-4.67-.076-6.796.012-1.066.03-2.006.047-2.68.007-.337.015-.608.02-.794l.006-.215.002-.056v-.02c.009-1.162.663-2.082 1.477-2.683A4.9 4.9 0 0 1 8.514.5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5M5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m7.3 17.37-.061.088a1.52 1.52 0 0 1-.934.535l-4.178.663-.806-4.153a1.5 1.5 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346zM6.07 16.512l-3.276-2.295.53 2.73zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328M8 18.5 9.375 17H19v1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10.126 2.268 2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568z\\\" class=\\\"ck-icon__fill\\\"/><path d=\\\"m4.5 18.088-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97q.249-.348.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005zm-.634.166-1.976.516-.026-1.918zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349M8.245 18.5 9.59 17h9.406v1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 19a9 9 0 1 0 0-18 9 9 0 0 0 0 18m3.45-9.872a1 1 0 0 1 0 1.744l-4.96 2.79A1 1 0 0 1 7 12.79V7.21a1 1 0 0 1 1.49-.872z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1\\\"/></svg>\"", "\"<svg width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<circle cx=\\\"9.00037\\\" cy=\\\"9.79993\\\" r=\\\"1.5\\\"/>\\n<path d=\\\"M5.75024 2.75005C5.75019 2.00005 5.75006 2.00005 5.75006 2.00005L5.74877 2.00005L5.74647 2.00006L5.73927 2.00009L5.71503 2.0003C5.6947 2.00053 5.66619 2.00098 5.63111 2.00185C5.56123 2.0036 5.46388 2.00707 5.35241 2.01402C5.14095 2.02722 4.83482 2.05536 4.56712 2.12276C4.1703 2.22267 3.82938 2.40399 3.55967 2.67392C3.29221 2.94161 3.1311 3.26001 3.03544 3.5803C2.85401 4.18776 2.8854 4.89393 2.92747 5.49256C2.9373 5.6324 2.94792 5.76849 2.95828 5.90131C2.99629 6.38849 3.03087 6.83163 3.01038 7.25369C2.98475 7.78147 2.87469 8.13279 2.6777 8.3656C2.45517 8.6286 2.1841 8.79405 1.95875 8.89436C1.84756 8.94386 1.75282 8.97509 1.68956 8.99319C1.65813 9.00219 1.63513 9.00776 1.62253 9.01062L1.61304 9.01269L1.00024 9.12173V9.75005H3.4023C3.54579 9.63123 3.68814 9.49364 3.82278 9.33451C4.33087 8.73405 4.47638 7.99036 4.50861 7.32643C4.5342 6.79933 4.48942 6.23163 4.4502 5.73429C4.44071 5.61404 4.43155 5.49785 4.42378 5.3874C4.38011 4.76596 4.37986 4.32043 4.4727 4.00956C4.51418 3.87069 4.56668 3.78828 4.62078 3.73414C4.67264 3.68223 4.76124 3.6207 4.93336 3.57736C5.06269 3.5448 5.25656 3.52293 5.44585 3.51111C5.53475 3.50556 5.61296 3.50277 5.66854 3.50139C5.6962 3.5007 5.71789 3.50036 5.73209 3.5002L5.74748 3.50007L5.75054 3.50005L6.5003 3.5L6.50019 2L5.75006 2.00005L5.75024 2.75005Z\\\"/>\\n<path d=\\\"M5.75024 16.7501C5.75019 17.5001 5.75006 17.5001 5.75006 17.5001L5.74877 17.5001L5.74647 17.5001L5.73927 17.5L5.71503 17.4998C5.6947 17.4996 5.66619 17.4991 5.63111 17.4983C5.56123 17.4965 5.46388 17.493 5.35241 17.4861C5.14095 17.4729 4.83482 17.4448 4.56712 17.3774C4.1703 17.2774 3.82938 17.0961 3.55967 16.8262C3.29221 16.5585 3.1311 16.2401 3.03544 15.9198C2.85401 15.3124 2.8854 14.6062 2.92747 14.0076C2.9373 13.8677 2.94792 13.7316 2.95828 13.5988C2.99629 13.1116 3.03087 12.6685 3.01038 12.2464C2.98475 11.7186 2.87469 11.3673 2.6777 11.1345C2.45517 10.8715 2.1841 10.7061 1.95875 10.6058C1.84756 10.5563 1.75282 10.525 1.68956 10.5069C1.65813 10.4979 1.63513 10.4924 1.62253 10.4895L1.61304 10.4874L1.00024 10.3784V9.75005H3.4023C3.54579 9.86887 3.68814 10.0065 3.82278 10.1656C4.33087 10.7661 4.47638 11.5098 4.50861 12.1737C4.5342 12.7008 4.48942 13.2685 4.4502 13.7658C4.44071 13.8861 4.43155 14.0023 4.42378 14.1127C4.38011 14.7341 4.37986 15.1797 4.4727 15.4906C4.51418 15.6294 4.56668 15.7118 4.62078 15.766C4.67264 15.8179 4.76124 15.8794 4.93336 15.9228C5.06269 15.9553 5.25656 15.9772 5.44585 15.989C5.53475 15.9945 5.61296 15.9973 5.66854 15.9987C5.6962 15.9994 5.71789 15.9998 5.73209 15.9999L5.74748 16L5.75054 16.0001L6.5003 16.0001L6.50019 17.5001L5.75006 17.5001L5.75024 16.7501Z\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12.2514 2.00005L12.2501 2.00005L11.5 2L11.4999 3.5L12.2496 3.50005L12.2527 3.50007L12.2681 3.5002C12.2823 3.50036 12.304 3.5007 12.3316 3.50139C12.3872 3.50277 12.4654 3.50556 12.5543 3.51111C12.7436 3.52293 12.9375 3.5448 13.0668 3.57736C13.2389 3.6207 13.3275 3.68223 13.3794 3.73414C13.4335 3.78828 13.486 3.87069 13.5275 4.00956C13.6203 4.32043 13.6201 4.76596 13.5764 5.3874C13.5686 5.49785 13.5595 5.61404 13.55 5.73429C13.5108 6.23163 13.466 6.79933 13.4916 7.32643C13.5238 7.99036 13.6693 8.73405 14.1774 9.33451C14.312 9.49364 14.4544 9.63123 14.5979 9.75005C14.4544 9.86887 14.312 10.0065 14.1774 10.1656C13.7121 10.7154 13.5509 11.3854 13.5023 12.0042C13.6011 12.0012 13.7003 11.9997 13.7999 11.9997C14.208 11.9997 14.6093 12.0247 15.0018 12.0729C15.0416 11.6402 15.1479 11.3408 15.3225 11.1345C15.545 10.8715 15.8161 10.7061 16.0414 10.6058C16.1526 10.5563 16.2474 10.525 16.3106 10.5069C16.342 10.4979 16.365 10.4924 16.3776 10.4895L16.3871 10.4874L16.9999 10.3784V9.75005V9.12173L16.3871 9.01269L16.3776 9.01062C16.365 9.00776 16.342 9.00219 16.3106 8.99319C16.2474 8.97509 16.1526 8.94386 16.0414 8.89436C15.8161 8.79405 15.545 8.6286 15.3225 8.3656C15.1255 8.13279 15.0154 7.78147 14.9898 7.25369C14.9693 6.83163 15.0039 6.38849 15.0419 5.90131C15.0523 5.76849 15.0629 5.6324 15.0727 5.49256C15.1148 4.89393 15.1462 4.18776 14.9647 3.5803C14.8691 3.26001 14.708 2.94161 14.4405 2.67392C14.1708 2.40399 13.8299 2.22267 13.433 2.12276C13.1654 2.05536 12.8592 2.02722 12.6478 2.01402C12.5363 2.00707 12.4389 2.0036 12.3691 2.00185C12.334 2.00098 12.3055 2.00053 12.2851 2.0003L12.2609 2.00009L12.2537 2.00006L12.2514 2.00005Z\\\"/>\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M9.00335 17.2062L9.00308 17.2065C8.7234 17.5118 8.24919 17.5327 7.94372 17.2532C7.63816 16.9735 7.61716 16.4991 7.89681 16.1935L8.45008 16.6999C7.89681 16.1935 7.89697 16.1934 7.89713 16.1932L7.89751 16.1928L7.89844 16.1918L7.90098 16.189L7.90879 16.1806L7.93517 16.1526C7.95746 16.1292 7.98914 16.0963 8.02971 16.0555C8.11079 15.9738 8.22768 15.8597 8.37644 15.724C8.6732 15.4532 9.10079 15.0927 9.62744 14.7314C10.6647 14.0198 12.1659 13.2499 13.8501 13.2499C15.5343 13.2499 17.0355 14.0198 18.0727 14.7314C18.5994 15.0927 19.027 15.4532 19.3237 15.724C19.4725 15.8597 19.5894 15.9738 19.6705 16.0555C19.711 16.0963 19.7427 16.1292 19.765 16.1526L19.7914 16.1806L19.7992 16.189L19.8017 16.1918L19.8027 16.1928L19.803 16.1932C19.8032 16.1934 19.8034 16.1935 19.2501 16.6999L19.8034 16.1935C20.083 16.4991 20.062 16.9735 19.7565 17.2532C19.4511 17.5326 18.9772 17.5118 18.6975 17.207L18.6971 17.2065L18.6968 17.2062L18.6945 17.2037L18.6783 17.1865C18.6629 17.1704 18.6386 17.1452 18.6059 17.1123C18.5404 17.0463 18.4414 16.9494 18.3127 16.8321C18.0546 16.5966 17.6814 16.282 17.2242 15.9683C16.9805 15.8012 16.7185 15.6381 16.4421 15.4883C16.7016 15.9322 16.8502 16.4487 16.8502 16.9999C16.8502 18.6567 15.5071 19.9999 13.8502 19.9999C12.1934 19.9999 10.8502 18.6567 10.8502 16.9999C10.8502 16.4486 10.9989 15.932 11.2584 15.4881C10.9819 15.6379 10.7198 15.8011 10.476 15.9683C10.0188 16.282 9.64555 16.5966 9.38746 16.8321C9.25879 16.9494 9.15975 17.0463 9.09425 17.1123C9.06153 17.1452 9.03726 17.1704 9.02192 17.1865L9.00572 17.2037L9.00335 17.2062Z\\\"/>\\n<circle cx=\\\"14.8253\\\" cy=\\\"16.1749\\\" r=\\\"1.125\\\" fill=\\\"white\\\"/>\\n</svg>\\n\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15 2.5H5v4h10zm-1 1v2H6v-2z\\\"/><path d=\\\"M16 5.5a2.5 2.5 0 0 1 2.495 2.336L18.5 8v5a2.5 2.5 0 0 1-2.336 2.495L16 15.5h-1V14h1a1 1 0 0 0 .993-.883L17 13V8a1 1 0 0 0-.883-.993L16 7H4a1 1 0 0 0-.993.883L3 8v5a1 1 0 0 0 .883.993L4 14h1v1.5H4a2.5 2.5 0 0 1-2.495-2.336L1.5 13V8a2.5 2.5 0 0 1 2.336-2.495L4 5.5zM6.5 8a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1z\\\"/><path d=\\\"M15 12H5v7h10zm-1 1v5H6v-5z\\\"/><path d=\\\"M7 14h6v1H7zm0 2h6v1H7z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"53\\\" height=\\\"10\\\" viewBox=\\\"0 0 53 10\\\"><path fill=\\\"#1C2331\\\" d=\\\"M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z\\\"/><path fill=\\\"#AFE229\\\" d=\\\"M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z\\\"/><path fill=\\\"#771BFF\\\" d=\\\"m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z\\\"/></svg>\\n\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.75.75 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.8.8 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.106 4.946c.272.274.27.712.033 1.016a6.1 6.1 0 0 0-1.291 3.764c0 3.375 2.722 6.111 6.08 6.111q.418 0 .822-.057l-.964-.968-.048-.054a.71.71 0 0 1 .048-.943.7.7 0 0 1 .939-.05l.053.05 1.984 1.994c.143.144.21.335.204.523a.7.7 0 0 1-.156.495l-.048.053-1.984 1.994a.7.7 0 0 1-.992 0 .71.71 0 0 1 0-.997l.645-.647a8 8 0 0 1-.504.018c-4.132 0-7.482-3.368-7.482-7.522 0-1.803.632-3.458 1.684-4.754.248-.304.701-.304.977-.026M9.057.464a.7.7 0 0 1 .992 0 .71.71 0 0 1 0 .997l-.966.97q.46-.058.938-.058c4.132 0 7.483 3.367 7.483 7.521a7.5 7.5 0 0 1-1.685 4.754c-.247.304-.7.304-.977.026-.271-.273-.27-.712-.032-1.016a6.1 6.1 0 0 0 1.29-3.764c0-3.375-2.721-6.11-6.079-6.111a6 6 0 0 0-.673.039l.701.705.049.053a.71.71 0 0 1-.049.944.7.7 0 0 1-.939.048l-.053-.048L7.073 3.53a.7.7 0 0 1-.203-.524.7.7 0 0 1 .155-.495l.048-.053z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.2 7h9.2c.6 0 1 .4 1 1v9.9c0 .5-.4 1-1 1H5.2a1 1 0 0 1-1-1V8c0-.6.4-1 1-1m1 1.5c-.3 0-.5.2-.5.5v8c0 .3.2.5.5.5h.5c.2 0 .5-.2.5-.5V9c0-.3-.3-.5-.5-.5zm3.2 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.4zm3.5 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5zm-1.4-7.1H8.3L6.5 3.6H3.8c-.5 0-.7.3-.7.8s.2.7.7.7h12c.6 0 .9-.2.9-.7s-.3-.8-1-.8h-2.4z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8.69 14.915q.08.078.36.093a.366.366 0 0 1 .345.485l-.003.01a.74.74 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.68.68 0 0 1 .644-.458q.295-.018.386-.093a.3.3 0 0 0 .072-.11L9.592 4.5H6.269q-.538-.026-.75.09-.213.117-.442.563c-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486q.002-.426-.167-.54-.168-.114-.766-.091h-3.28l-2.68 10.257q-.009.111.038.158M3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1m11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M5.2 7h9.2c.6 0 1 .4 1 1v9.9c0 .5-.4 1-1 1H5.2a1 1 0 0 1-1-1V8c0-.6.4-1 1-1m1 1.5c-.3 0-.5.2-.5.5v8c0 .3.2.5.5.5h.5c.2 0 .5-.2.5-.5V9c0-.3-.3-.5-.5-.5zm3.2 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5zm3.5 0c-.2 0-.5.2-.5.5v8c0 .3.3.5.5.5h.5c.3 0 .5-.2.5-.5V9c0-.3-.2-.5-.5-.5zm-1.4-7.1H8.3L6.5 3.6H3.8c-.5 0-.7.3-.7.8s.2.7.7.7h12c.6 0 .9-.2.9-.7s-.3-.8-1-.8h-2.4z\\\"/></svg>\"", "\"<svg viewBox=\\\"0 0 10 8\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1\\\"/><path d=\\\"M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052zM11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.61 2.66a1.406 1.406 0 1 0-1.407 0v.891H3.28a2.11 2.11 0 0 0-2.11 2.11v10.312a2.11 2.11 0 0 0 2.11 2.109h5.684l-.054-1.157.18-.25H3.28a.703.703 0 0 1-.703-.702V5.66c0-.389.315-.704.703-.704h11.25c.388 0 .703.315.703.704v2.484l.358-.497a2.5 2.5 0 0 1 1.048-.84V5.66a2.11 2.11 0 0 0-2.11-2.11H9.61z\\\"/><path d=\\\"M5.625 10.817c.518 0 .937-.63.937-1.407 0-.776-.42-1.406-.937-1.406s-.938.63-.938 1.406c0 .777.42 1.407.938 1.407m7.5-1.407c0 .777-.42 1.407-.938 1.407s-.937-.63-.937-1.407c0-.776.42-1.406.937-1.406s.938.63.938 1.406M.937 8.004A.937.937 0 0 0 0 8.942v1.875c0 .517.42.937.937.937zm5.191 4.506a.78.78 0 0 1 1.085.216c.272.408.907.707 1.693.707s1.421-.3 1.693-.707a.782.782 0 0 1 1.302.868c-.666 1-1.906 1.403-2.995 1.403s-2.329-.404-2.995-1.403a.78.78 0 0 1 .217-1.085Zm10.859-3.6-.622.864 2.879 2.074.622-.864a.71.71 0 0 0-.161-.99l-1.728-1.245a.71.71 0 0 0-.99.161m-5.352 11.041a.355.355 0 0 1-.449-.31l-.214-2.38 4.978-6.911 2.88 2.074-4.978 6.91z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75m18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75m-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.583.45a.95.95 0 0 0-.95.95v5.3h1.5V1.95h4.75V.45zm17.05.95a.95.95 0 0 0-.95-.95h-5.3v1.5h4.75V6.7h1.5zm0 16.1a.95.95 0 0 1-.95.95h-5.3v-1.5h4.75V12.2h1.5zm-18 0c0 .525.425.95.95.95h5.3v-1.5h-4.75V12.2h-1.5zm5-10.8a.75.75 0 1 0 0 1.5h8a.75.75 0 1 0 0-1.5zm0 4a.75.75 0 1 0 0 1.5h4a.75.75 0 1 0 0-1.5z\\\"/></svg>\"", "\"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M3.734 6.375H1.75a.75.75 0 0 1 0-1.5h1.984a2.626 2.626 0 0 1 5.032 0h9.48a.75.75 0 0 1 0 1.5h-9.48a2.626 2.626 0 0 1-5.032 0Zm1.141-.75a1.375 1.375 0 1 1 2.75 0 1.375 1.375 0 0 1-2.75 0ZM16.263 14.625h1.983a.75.75 0 0 1 0 1.5h-1.983a2.626 2.626 0 0 1-5.033 0H1.75a.75.75 0 0 1 0-1.5h9.48a2.626 2.626 0 0 1 5.033 0Zm-1.142.75a1.375 1.375 0 1 1-2.75 0 1.375 1.375 0 0 1 2.75 0Z\\\"/></svg>\\n\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m6.395 9.196 2.545-.007V6.498a.6.6 0 0 1 .598-.598h.299a.6.6 0 0 1 .598.598v6.877a.6.6 0 0 1-.598.598h-.299a.6.6 0 0 1-.598-.598v-2.691l-2.545.007v2.691a.6.6 0 0 1-.598.598h-.299a.6.6 0 0 1-.598-.598V6.505a.6.6 0 0 1 .598-.598h.299a.6.6 0 0 1 .598.598zm8.699 4.221V6.462a.56.56 0 0 0-.562-.562h-.782a1 1 0 0 0-.39.08l-1.017.43a.56.56 0 0 0-.343.517v.197c0 .4.406.67.775.519l.819-.337v6.111c0 .31.251.562.561.562h.377c.31 0 .562-.251.562-.562M0 15.417v1.5h1.5v-1.5zm18.5 0v1.5H20v-1.5zm0-3.084v1.5H20v-1.5zm0-3.083v1.5H20v-1.5zm0-3.083v1.5H20v-1.5zM0 18.5v.5a1 1 0 0 0 1 1h.5v-1.5zm3.083 0V20h1.5v-1.5zm3.084 0V20h1.5v-1.5zm3.083 0V20h1.5v-1.5zm3.083 0V20h1.5v-1.5zm3.084 0V20h1.5v-1.5zm3.083 0V20h.5a1 1 0 0 0 1-1v-.5z\\\"/><path d=\\\"M0 1a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v3.583h-1.5V1.5h-17v12.333H0z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.23 2.93a.88.88 0 0 1 1.248 0l1.47 1.468q.298-.186.605-.353c1.066-.58 2.247-.992 3.438-.961 1.176.03 2.344.464 3.405 1.05 1.066.588 2.069 1.355 2.925 2.104a27 27 0 0 1 2.852 2.918l.043.052.011.016.005.004a.7.7 0 0 1 .103.183l.018.047.02.083.01.05.002.078-.003.062-.01.06q-.005.038-.016.077l-.02.06-.03.07-.01.016-.056.087-.002-.001.002.002h-.002l-.003.006-.011.014-.044.054-.161.2a26 26 0 0 1-2.693 2.803q-.414.367-.868.73l1.256 1.256a.881.881 0 0 1-.785 1.49.87.87 0 0 0-.25-.55L3.444 3.872a.9.9 0 0 0-.465-.245.88.88 0 0 1 .252-.698m1.19 4.413A25 25 0 0 0 2.58 9.204l-.013.016a.654.654 0 0 0 .006.876c.484.53 1.173 1.236 1.98 1.943.812.708 1.73 1.407 2.679 1.93.954.527 1.896.853 2.76.876.52.013 1.07-.094 1.635-.298l1.082 1.082c-.877.395-1.812.651-2.754.626-1.176-.03-2.345-.464-3.406-1.05-1.066-.587-2.068-1.354-2.924-2.103a27 27 0 0 1-2.851-2.918l-.044-.052-.01-.014-.005-.004v-.002a1 1 0 0 1-.06-.087l-.008-.014q-.022-.044-.038-.089l-.016-.04-.02-.086q-.005-.024-.007-.05-.006-.039-.003-.075v-.06q.004-.038.012-.076l.012-.056q.013-.041.03-.08l.023-.054.012-.02.055-.086h.002l-.002-.001.003-.005.012-.015.043-.054.16-.2A26 26 0 0 1 3.42 6.343zm6.057 6.058q-.247.035-.506.035a3.765 3.765 0 0 1-3.73-4.27zm-.524-8.906c-.85-.021-1.779.276-2.727.79l-.25.142L8.011 6.46a3.77 3.77 0 0 1 1.96-.555 3.765 3.765 0 0 1 3.766 3.764 3.77 3.77 0 0 1-.558 1.96l1.272 1.271c.323-.25.637-.513.936-.778a25 25 0 0 0 1.977-1.988l.015-.016a.655.655 0 0 0-.006-.878 26 26 0 0 0-1.981-1.941c-.81-.708-1.73-1.407-2.679-1.932-.954-.526-1.896-.852-2.76-.874m1.148 2.541a1.41 1.41 0 0 0-1.384 1.132l1.662 1.662a1.412 1.412 0 0 0-.278-2.794\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><g fill-rule=\\\"evenodd\\\"><path d=\\\"M9.972 5.906a3.765 3.765 0 1 1 0 7.53 3.765 3.765 0 0 1 0-7.53m1.13 1.13a1.412 1.412 0 1 0 0 2.823 1.412 1.412 0 0 0 0-2.824\\\"/><path d=\\\"M9.99 3.084c1.177.03 2.345.465 3.406 1.05 1.066.588 2.07 1.355 2.925 2.105a27 27 0 0 1 2.852 2.917q.027.036.043.053l.011.015.004.003v.002q.068.084.103.183l.019.047.019.083.01.05a.7.7 0 0 1 0 .139q-.002.031-.01.06l-.016.078q-.009.029-.022.058-.012.035-.028.07l-.01.018-.056.087-.002-.002v.004l-.004.005-.012.015-.042.054-.161.198a26 26 0 0 1-2.694 2.803c-.856.762-1.863 1.537-2.933 2.117-1.066.58-2.247.992-3.438.962-1.176-.03-2.345-.465-3.406-1.05-1.066-.59-2.07-1.355-2.924-2.103a27 27 0 0 1-2.851-2.92l-.044-.052-.011-.015-.003-.004v-.001a1 1 0 0 1-.062-.088l-.006-.013-.039-.088-.016-.042q-.013-.043-.02-.086-.006-.025-.008-.05L.56 9.669v-.06q.005-.036.013-.075l.012-.056.03-.08.023-.054.012-.022.055-.083v.001h.001v-.002l.005-.005.01-.015.044-.054q.055-.071.16-.198a26 26 0 0 1 2.692-2.801c.858-.764 1.864-1.54 2.935-2.12 1.066-.58 2.247-.99 3.438-.961m-.037 1.411c-.85-.022-1.779.276-2.727.79-.943.511-1.859 1.214-2.67 1.934A24 24 0 0 0 2.58 9.207l-.014.015a.654.654 0 0 0 .007.877c.484.53 1.173 1.235 1.98 1.943.813.709 1.73 1.406 2.68 1.93.953.527 1.894.853 2.759.875.849.021 1.778-.276 2.727-.79.943-.512 1.86-1.212 2.67-1.933a25 25 0 0 0 1.977-1.989l.015-.016a.654.654 0 0 0-.007-.875 26 26 0 0 0-1.98-1.943c-.812-.71-1.73-1.407-2.68-1.932-.953-.525-1.894-.853-2.759-.874\\\"/></g></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m12.5 0 5 4.5v15.003h-16V0zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692z\\\"/><path d=\\\"M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.288 1.496c.244-.661 1.18-.661 1.424 0l1.513 4.09a3.7 3.7 0 0 0 2.188 2.188l4.091 1.514c.661.244.66 1.18 0 1.424l-4.09 1.513a3.7 3.7 0 0 0-2.189 2.19l-1.513 4.09c-.244.66-1.18.66-1.424 0l-1.513-4.09a3.7 3.7 0 0 0-2.19-2.19l-4.09-1.513c-.66-.244-.66-1.18 0-1.424l4.09-1.514a3.7 3.7 0 0 0 2.189-2.188zM9.168 6.1A5.2 5.2 0 0 1 6.1 9.167L3.851 10l2.25.832a5.2 5.2 0 0 1 3.066 3.067L10 16.148l.832-2.25a5.2 5.2 0 0 1 3.066-3.066L16.147 10l-2.25-.833a5.2 5.2 0 0 1-3.065-3.066L10 3.852z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.27 7.27 0 0 1 2.703 3.454 7.13 7.13 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.87.87 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.6 5.6 0 0 0 2.492-2.371 5.46 5.46 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.7 5.7 0 0 0 10 4.206 5.7 5.7 0 0 0 6.419 5.46 5.53 5.53 0 0 0 4.46 8.663a5.46 5.46 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.88.88 0 0 1-.614-.25.85.85 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.13 7.13 0 0 1 .199-4.352 7.27 7.27 0 0 1 2.703-3.455A7.5 7.5 0 0 1 10 2.5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 3.778C2 2.796 2.796 2 3.778 2h12.444C17.204 2 18 2.796 18 3.778v12.444c0 .982-.796 1.778-1.778 1.778H3.778A1.78 1.78 0 0 1 2 16.222z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6M6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z\\\"/><path d=\\\"M3 10.5V9h14v1.5z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M15.875 4.419a.75.75 0 0 0-1.5 0v7.25H6.818l2.33-1.955a.75.75 0 0 0-.963-1.15l-3.792 3.182a.75.75 0 0 0-.17.945c.046.11.118.208.21.284l3.788 3.18a.75.75 0 1 0 .965-1.149l-2.19-1.837h7.629c.69 0 1.25-.56 1.25-1.25z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53zm8.147 7.829h2.549q.38 0 .58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197a.62.62 0 0 1-.205-.463q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553t.405-.57.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646c.3-.289.454-.349.762-.467a3 3 0 0 1 1.081-.178q.747 0 1.274.228a1.92 1.92 0 0 1 1.004 1.032 1.98 1.98 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.584-1.008.906a3 3 0 0 0-.24.309z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m7.184 10.353 3.818-3.819a.8.8 0 0 1 1.132 1.132l-3.82 3.818 3.82 3.818a.802.802 0 0 1-.873 1.306.8.8 0 0 1-.26-.174l-3.817-3.82-3.818 3.82a.8.8 0 0 1-1.305-.26.8.8 0 0 1 .173-.872l3.82-3.818-3.82-3.818a.8.8 0 0 1 1.132-1.132l3.818 3.82M15.68 6.88h2.549q.38 0 .58.153a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197A.62.62 0 0 1 14 7.34q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553.266-.277.405-.57.14-.291.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646t.762-.467A3 3 0 0 1 16.466 1q.747 0 1.274.228c.456.2.816.57 1.004 1.032a1.99 1.99 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.583-1.008.906-.131.146-.24.309z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5zM2 12h5V8H2zm10-4H8v4h4zM2 2v5h5V2zm0 16h5v-5H2zM13 7h5V2h-5zM8 2v5h4V2z\\\" opacity=\\\".6\\\"/><path d=\\\"m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43zM13 6a1 1 0 0 1 1 1v3.172a2 2 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.98 1.98 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm-1 2H8v4h4z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z\\\" opacity=\\\".6\\\"/><path d=\\\"M18 7v1H2V7zm0 5v1H2v-1z\\\" opacity=\\\".6\\\"/><path d=\\\"M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1m-2 1H8v4h4zm0 6H8v4h4zm0 6H8v4h4z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 2h1v16H7zm5 0h1v7h-1zm6 5v1H2V7zM8 12v1H2v-1z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1m1 2v9h10V9z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 19a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v8.022a6.5 6.5 0 0 0-1.5-.709V2a.5.5 0 0 0-.5-.5H3a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h6.313c.173.534.412 1.037.709 1.5z\\\"/><path d=\\\"M9.174 14a6.5 6.5 0 0 0-.155 1H6v-1zm.848-2a6.5 6.5 0 0 0-.524 1H4v-1zm2.012-2c-.448.283-.86.62-1.224 1H6v-1zM12 4v1H4V4zm2 3V6H6v1zm1 2V8H7v1z\\\"/><path d=\\\"M20 15.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0M15.5 13a.5.5 0 0 0-.5.5V15h-1.5a.5.5 0 0 0 0 1H15v1.5a.5.5 0 0 0 1 0V16h1.5a.5.5 0 0 0 0-1H16v-1.5a.5.5 0 0 0-.5-.5\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2zm4 6H8v4h4z\\\" opacity=\\\".6\\\"/><path d=\\\"m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2 2 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 2h1v16H7zm5 0h1v16h-1z\\\" opacity=\\\".6\\\"/><path d=\\\"M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1m1 2v4h4V8zm6 0v4h4V8zm6 0v4h4V8z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 5.5v3h4v-3zm0 4v3h4v-3zm0 4v3h4v-3zm5 3h4v-3H8zm5 0h4v-3h-4zm4-4v-3h-4v3zm0-4v-3h-4v3zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5zm-6.5-4v-3H8v3zm0-4v-3H8v3z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.5 4.121C1.5 2.95 2.426 2 3.568 2h12.864c1.142 0 2.068.95 2.068 2.121V16.38c0 1.171-.926 2.121-2.068 2.121H3.568c-1.142 0-2.068-.95-2.068-2.121zm2.068-.707a.7.7 0 0 0-.69.707V6.38h14.244V4.12a.7.7 0 0 0-.69-.707zm13.554 4.38h-4.968v3.939h4.968zm0 5.353h-4.968v3.939h4.278c.381 0 .69-.317.69-.707zm-6.347 3.939V7.794H2.878v8.585c0 .39.309.707.69.707z\\\"/></svg>\"", "\"<svg fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 45 45\\\">\\n    <path fill=\\\"#F0F0F0\\\" d=\\\"M2 0h41s2 0 2 2v41s0 2 -2 2h-41s-2 0 -2 -2v-41s0 -2 2 -2\\\" />\\n    <path fill=\\\"#D5D5D5\\\" d=\\\"M11 10h10s1 0 1 1v24s0 1 -1 1h-10s-1 0 -1 -1v-24s0 -1 1 -1\\\" />\\n    <path fill=\\\"#D5D5D5\\\" d=\\\"M25 10h10s1 0 1 1v10s0 1 -1 1h-10s-1 0 -1 -1v-10s0 -1 1 -1\\\" />\\n    <path fill=\\\"#D5D5D5\\\" d=\\\"M25 24h10s1 0 1 1v10s0 1 -1 1h-10s-1 0 -1 -1v-10s0 -1 1 -1\\\" />\\n</svg>\\n\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M8 0H3a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2M2.5 2a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5zM13 0h5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m0 1.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5V2a.5.5 0 0 0-.5-.5zm0 8.5h5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2m0 1.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-5a.5.5 0 0 0-.5-.5z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1zm10.453 2.61a1.89 1.89 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.9 1.9 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598M7.463 8.163a.6.6 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.63.63 0 0 0-.417-.185m6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.62.62 0 0 0-.42-.165M.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.91.91 0 0 0-.912-.912zM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516zm4.947 0h1.801v4.3h2.7v1.4h-4.5zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9zm-8.517 1.457-.614 2.059h1.262z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663z\\\"/><path d=\\\"m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M14.5 10.001a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0m-6 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0m-6 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m5.977 2 .708 1.914A2.06 2.06 0 0 0 7.902 5.13l1.914.708-1.914.709a2.06 2.06 0 0 0-1.217 1.216l-.708 1.914-.708-1.914a2.06 2.06 0 0 0-1.216-1.216l-1.914-.709 1.914-.708a2.06 2.06 0 0 0 1.216-1.216zm6.87 3.417 1.135 3.067a3.3 3.3 0 0 0 1.95 1.95L19 11.57l-3.067 1.135a3.3 3.3 0 0 0-1.95 1.95l-1.136 3.067-1.135-3.067a3.3 3.3 0 0 0-1.95-1.95l-3.068-1.136 3.068-1.135a3.3 3.3 0 0 0 1.95-1.95zm-8.418 8.276-.534-1.443-.534 1.443c-.158.425-.493.76-.918.918L1 15.145l1.443.534c.425.157.76.492.918.917l.534 1.443.534-1.443a1.55 1.55 0 0 1 .917-.917l1.443-.534-1.443-.534a1.55 1.55 0 0 1-.917-.918\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><circle cx=\\\"9.5\\\" cy=\\\"4.5\\\" r=\\\"1.5\\\"/><circle cx=\\\"9.5\\\" cy=\\\"10.5\\\" r=\\\"1.5\\\"/><circle cx=\\\"9.5\\\" cy=\\\"16.5\\\" r=\\\"1.5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M6.05 8.609v8.38c0 1.11.903 2.01 2.017 2.01h7.553c.896 0 1.684-.588 1.936-1.445l2.361-8.041a2.012 2.012 0 0 0-1.935-2.575h-4.353l.788-2.618a2.01 2.01 0 0 0-1.294-2.485l-.698-.232a2.02 2.02 0 0 0-2.269.725l-3.72 5.098c-.25.344-.386.758-.386 1.183m1.513 8.38V8.61c0-.107.034-.21.096-.296l3.72-5.099a.505.505 0 0 1 .567-.18l.699.231a.5.5 0 0 1 .323.621l-1.177 3.912a.503.503 0 0 0 .483.647h5.708c.336 0 .578.322.484.644l-2.362 8.041a.504.504 0 0 1-.484.362H8.067a.503.503 0 0 1-.504-.503M3.328 6.937H1.714C.767 6.937 0 7.703 0 8.647v8.644C0 18.234.767 19 1.714 19h1.614c.946 0 1.714-.766 1.714-1.71V8.647c0-.943-.768-1.709-1.714-1.709m-1.815 1.71c0-.112.09-.202.201-.202h1.614c.111 0 .201.09.201.201v8.645a.2.2 0 0 1-.201.2H1.714a.2.2 0 0 1-.201-.2z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M13.95 11.89V3.51c0-1.11-.903-2.01-2.017-2.01H4.38c-.896 0-1.684.589-1.936 1.446l-2.361 8.04a2.012 2.012 0 0 0 1.935 2.576h4.353l-.788 2.618a2.01 2.01 0 0 0 1.294 2.485l.698.232a2.02 2.02 0 0 0 2.269-.725l3.72-5.099c.25-.343.386-.757.386-1.182m-1.513-8.38v8.38c0 .107-.034.21-.096.296l-3.72 5.1a.505.505 0 0 1-.567.18l-.699-.232a.5.5 0 0 1-.323-.62L8.209 12.7a.503.503 0 0 0-.483-.647H2.018a.503.503 0 0 1-.484-.643l2.362-8.042a.504.504 0 0 1 .484-.361h7.553c.278 0 .504.225.504.502m4.235 10.053h1.614c.947 0 1.714-.765 1.714-1.709V3.21c0-.944-.767-1.709-1.714-1.709h-1.614c-.946 0-1.714.765-1.714 1.709v8.644c0 .944.768 1.709 1.714 1.709m1.815-1.709c0 .111-.09.201-.201.201h-1.614a.2.2 0 0 1-.201-.2V3.208c0-.111.09-.201.201-.201h1.614a.2.2 0 0 1 .201.2z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m2.315 14.705 2.224-2.24a.69.69 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.7.7 0 0 1-.112.089.65.65 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75M2.329 5.745l2.21-2.226a.69.69 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.7.7 0 0 1-.496.196.64.64 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 2.28C2 1.574 2.574 1 3.272 1l11.456.001c.703 0 1.272.573 1.272 1.28v8.453l-1.5 1.464V2.465c0-.003-11-.005-11-.005V16.5h2.356q.188.34.462.62l.868.88-3.914-.001A1.274 1.274 0 0 1 2 16.719z\\\"/><path d=\\\"M14.525 18H9.293l-1.48-1.5h3.75l.332.336.344-.336H14.5v-2.207L16 12.83v3.73zm-4.819-5.362a2.84 2.84 0 0 0-1.38-.36 2.8 2.8 0 0 0-1.602.5H6.18a.635.635 0 0 1-.633-.639.64.64 0 0 1 .633-.639h3.133a.639.639 0 0 1 .393 1.138m-4.16-6.484c0-.353.292-.64.636-.64h5.682a.637.637 0 0 1 .449 1.09.64.64 0 0 1-.449.188H6.182a.636.636 0 0 1-.635-.639zm0 2.984c0-.352.292-.638.636-.638h5.682a.635.635 0 0 1 .45 1.088.64.64 0 0 1-.45.189H6.182a.636.636 0 0 1-.636-.639\\\"/><path d=\\\"m13.117 19.374 6.192-6.044a1.316 1.316 0 0 0 0-1.876 1.354 1.354 0 0 0-1.899 0l-5.515 5.382-2.63-2.666a1.3 1.3 0 0 0-.938-.393 1.32 1.32 0 0 0-.939.394 1.354 1.354 0 0 0 0 1.898l3.49 3.538a1.32 1.32 0 0 0 1.447.29 2.7 2.7 0 0 0 .792-.523\\\" style=\\\"fill:#1fb11f\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2 2.28C2 1.574 2.574 1 3.272 1l11.456.001c.703 0 1.272.573 1.272 1.28v8.106l-.889.899-.611-.619V2.465c0-.003-11-.005-11-.005V16.5h6.458l-.136.138-.003.003c-.372.378-.628.85-.745 1.359l-5.802-.001A1.274 1.274 0 0 1 2 16.719zM14.338 18h-3.676q.09-.169.227-.308l1.178-1.192H14.5v-3.699l.61.618.89-.899v4.199c0 .383-.168.726-.431.96l-.457-.462z\\\"/><path d=\\\"M9.043 11.5a2.85 2.85 0 0 0 .066 1.278H6.18a.635.635 0 0 1-.632-.639.64.64 0 0 1 .633-.639h2.863Zm3.45-2.267a2.82 2.82 0 0 0-2.434.544H6.182a.636.636 0 0 1-.636-.639c0-.352.292-.638.636-.638h5.682a.635.635 0 0 1 .629.733M5.546 6.154c0-.353.292-.64.636-.64h5.682a.637.637 0 0 1 .449 1.09.64.64 0 0 1-.449.188H6.182a.636.636 0 0 1-.635-.639z\\\"/><path d=\\\"m15.11 13.42 2.348-2.374a1.32 1.32 0 0 1 1.877 0 1.354 1.354 0 0 1 0 1.9l-2.346 2.372 2.346 2.374a1.354 1.354 0 0 1 0 1.898 1.316 1.316 0 0 1-1.877 0l-2.346-2.373-2.346 2.373a1.316 1.316 0 0 1-1.877 0 1.354 1.354 0 0 1 0-1.898l2.346-2.374-2.346-2.373a1.354 1.354 0 0 1 0-1.899 1.32 1.32 0 0 1 1.877 0l2.346 2.374z\\\" style=\\\"fill:#da2020\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M6.182 5.514a.643.643 0 0 0-.636.64v-.001a.636.636 0 0 0 .636.639h5.682a.64.64 0 0 0 .636-.638.637.637 0 0 0-.636-.64zm0 2.986a.642.642 0 0 0-.588.882.64.64 0 0 0 .588.395h5.682a.64.64 0 0 0 .636-.639.635.635 0 0 0-.636-.638zm-.002 3a.64.64 0 0 0 0 1.278h3.133a.64.64 0 0 0 0-1.278zm5.592 6.808.154-.23q-.292-.148-.328-.28-.037-.135.076-.551.093-.248.11-.393a3 3 0 0 0 0-.479q-.206-.614-.186-.83.02-.218.313-.57l4.465-6.207q.534-.9 2.11.118 1.576 1.021 1.177 1.772l-3.876 6.833q-.157.407-.347.515c-.128.07-.4.119-.813.139a3 3 0 0 0-.487.21q-.191.135-.347.31-.29.261-.416.262-.095 0-.346-.15l-.204.27zm-.184.274 1.039.727-.26.34h-1.496z\\\"/><path d=\\\"M3.272 1A1.28 1.28 0 0 0 2 2.28v14.439a1.276 1.276 0 0 0 1.272 1.28h6.838a2.1 2.1 0 0 1 .003-.61 4 4 0 0 1 .156-.67l.025-.069v-.008l-.042-.142H3.5V2.46s11 .002 11 .005v6.341l.627-.872c.204-.32.49-.614.873-.819V2.281c0-.707-.569-1.28-1.272-1.28zM16 9.29l-1.5 2.085V16.5h-2.708q.007.177-.007.354l-.013.075-.001.005a3 3 0 0 1-.097.312q-.04.152-.062.266a.7.7 0 0 0-.014.287.25.25 0 0 0 .068.105 1 1 0 0 0 .088.074l.017.011.016.01h.175L14.73 18c.697 0 1.271-.573 1.271-1.281v-7.43Z\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8s3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.75.75 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.8.8 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184m4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037H5.06l5.058-5.078L6.617 9.15a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v4.354a3.5 3.5 0 0 1 1.5.049V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.147 2.147 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.642-3.11 2.13 2.13 0 0 0-1.873-.978M8.089 17.635v2.388h2.389l7.046-7.046-2.39-2.39zm11.282-6.507a.64.64 0 0 0 .139-.692.6.6 0 0 0-.139-.205l-1.49-1.488a.63.63 0 0 0-.899 0l-1.166 1.163 2.39 2.39z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 21 21\\\"><path d=\\\"M1.801 1.4C1.138 1.4.6 1.87.6 2.5v14.363c0 .64.534 1.037 1.186 1.037h9.494a3 3 0 0 1-.414-.287A3 3 0 0 1 9.81 15.59v-.007a3 3 0 0 1 .693-2.186l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L2.1 14V2.9h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.5c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.13 2.13 0 0 0-1.875-.978\\\"/><path d=\\\"M16.122 19.5a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 0 0 1.211-1.015l-3.351-3.995a.79.79 0 0 0-.996-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/><path d=\\\"M16.122 19.5a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 0 0 1.211-1.015l-3.351-3.995a.79.79 0 0 0-.996-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M12.748 2a4.62 4.62 0 0 0-3.174 1.362L8.02 4.915a.783.783 0 0 0 .002 1.11.786.786 0 0 0 1.11 0l1.55-1.553c1.185-1.185 3.024-1.195 4.116-.104l.851.854c1.092 1.091 1.083 2.927-.101 4.11l-1.555 1.554a.787.787 0 0 0 .557 1.34.78.78 0 0 0 .553-.23l1.554-1.552c1.758-1.757 1.838-4.597.102-6.332l-.854-.853A4.3 4.3 0 0 0 12.748 2m-.488 4.973a.78.78 0 0 0-.553.23L7.2 11.71l-.004.002a.784.784 0 0 0 1.11 1.107l.003-.002 4.504-4.505a.785.785 0 0 0-.554-1.339Zm-6.79.815a.8.8 0 0 0-.554.234L3.36 9.573c-1.757 1.758-1.836 4.597-.101 6.332l.853.852c1.736 1.734 4.572 1.655 6.33-.102l1.547-1.547.006-.008a.78.78 0 0 0 .244-.554.78.78 0 0 0-.799-.797.77.77 0 0 0-.56.248l-1.545 1.547c-1.184 1.184-3.021 1.195-4.113.104l-.854-.854c-1.091-1.091-1.083-2.927.102-4.111l1.552-1.555a.8.8 0 0 0 .233-.555.8.8 0 0 0-.06-.3.8.8 0 0 0-.173-.253s-.104-.14-.183-.185c-.051-.03-.133-.047-.37-.047Z\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 11 10\\\"><path d=\\\"M5.5 5C8.538 5 11 7.015 11 9.5q0 .255-.034.5H.034A4 4 0 0 1 0 9.5C0 7.015 2.462 5 5.5 5m0-5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5\\\"/></svg>\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M3.273 17.818 2 18l.182-1.273 4.363-4.363 1.091 1.09zM18 7.818c-.897.897-1.997 1.284-2.847.732l-2.971 3.632c1.205 1.205.841 2.795-.364 4l-8-8c1.205-1.205 2.795-1.569 4-.364l3.632-2.972c-.552-.85-.165-1.949.732-2.846z\\\"/></svg>\"", "\"<svg width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 13 13\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M12 6C12 9.31371 9.31371 12 6 12C2.68629 12 0 9.31371 0 6C0 2.68629 2.68629 0 6 0C9.31371 0 12 2.68629 12 6ZM5.27988 2.40003H6.71988V6.72003H5.27988V2.40003ZM6.72009 8.16003H5.28009V9.60003H6.72009V8.16003Z\\\" fill=\\\"#DB3700\\\"/>\\n</svg>\\n\"", "\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path fill-rule=\\\"evenodd\\\" d=\\\"M20 10.001c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10 10 4.477 10 10m-9.662 8.493a9 9 0 0 1-.676 0c-.838-1.316-1.492-2.931-1.877-4.743h4.43c-.385 1.812-1.039 3.427-1.877 4.743m1.815-.268c.671-1.327 1.184-2.84 1.497-4.475h3.98a8.52 8.52 0 0 1-5.477 4.475m6.046-5.975a8.5 8.5 0 0 0 .301-2.25 8.5 8.5 0 0 0-.301-2.25h-4.323a20.3 20.3 0 0 1 0 4.5zm-.569-6a8.52 8.52 0 0 0-5.477-4.475c.671 1.327 1.184 2.84 1.497 4.475zm-7.292-4.743c.838 1.316 1.492 2.93 1.877 4.743h-4.43c.385-1.812 1.039-3.427 1.877-4.743a9 9 0 0 1 .676 0m-2.49.268c-.672 1.327-1.185 2.84-1.498 4.475H2.37a8.52 8.52 0 0 1 5.477-4.475M1.8 7.751a8.5 8.5 0 0 0-.301 2.25c0 .779.105 1.533.301 2.25h4.323a20.3 20.3 0 0 1 0-4.5zm.569 6a8.52 8.52 0 0 0 5.477 4.475c-.671-1.327-1.184-2.84-1.497-4.475zm10.095-1.5h-4.93a18.5 18.5 0 0 1 0-4.5h4.93a18.5 18.5 0 0 1 0 4.5\\\" clip-rule=\\\"evenodd\\\"/></svg>\"", "const colors = {\n\taliceblue: [240, 248, 255],\n\tantiquewhite: [250, 235, 215],\n\taqua: [0, 255, 255],\n\taquamarine: [127, 255, 212],\n\tazure: [240, 255, 255],\n\tbeige: [245, 245, 220],\n\tbisque: [255, 228, 196],\n\tblack: [0, 0, 0],\n\tblanchedalmond: [255, 235, 205],\n\tblue: [0, 0, 255],\n\tblueviolet: [138, 43, 226],\n\tbrown: [165, 42, 42],\n\tburlywood: [222, 184, 135],\n\tcadetblue: [95, 158, 160],\n\tchartreuse: [127, 255, 0],\n\tchocolate: [210, 105, 30],\n\tcoral: [255, 127, 80],\n\tcornflowerblue: [100, 149, 237],\n\tcornsilk: [255, 248, 220],\n\tcrimson: [220, 20, 60],\n\tcyan: [0, 255, 255],\n\tdarkblue: [0, 0, 139],\n\tdarkcyan: [0, 139, 139],\n\tdarkgoldenrod: [184, 134, 11],\n\tdarkgray: [169, 169, 169],\n\tdarkgreen: [0, 100, 0],\n\tdarkgrey: [169, 169, 169],\n\tdarkkhaki: [189, 183, 107],\n\tdarkmagenta: [139, 0, 139],\n\tdarkolivegreen: [85, 107, 47],\n\tdarkorange: [255, 140, 0],\n\tdarkorchid: [153, 50, 204],\n\tdarkred: [139, 0, 0],\n\tdarksalmon: [233, 150, 122],\n\tdarkseagreen: [143, 188, 143],\n\tdarkslateblue: [72, 61, 139],\n\tdarkslategray: [47, 79, 79],\n\tdarkslategrey: [47, 79, 79],\n\tdarkturquoise: [0, 206, 209],\n\tdarkviolet: [148, 0, 211],\n\tdeeppink: [255, 20, 147],\n\tdeepskyblue: [0, 191, 255],\n\tdimgray: [105, 105, 105],\n\tdimgrey: [105, 105, 105],\n\tdodgerblue: [30, 144, 255],\n\tfirebrick: [178, 34, 34],\n\tfloralwhite: [255, 250, 240],\n\tforestgreen: [34, 139, 34],\n\tfuchsia: [255, 0, 255],\n\tgainsboro: [220, 220, 220],\n\tghostwhite: [248, 248, 255],\n\tgold: [255, 215, 0],\n\tgoldenrod: [218, 165, 32],\n\tgray: [128, 128, 128],\n\tgreen: [0, 128, 0],\n\tgreenyellow: [173, 255, 47],\n\tgrey: [128, 128, 128],\n\thoneydew: [240, 255, 240],\n\thotpink: [255, 105, 180],\n\tindianred: [205, 92, 92],\n\tindigo: [75, 0, 130],\n\tivory: [255, 255, 240],\n\tkhaki: [240, 230, 140],\n\tlavender: [230, 230, 250],\n\tlavenderblush: [255, 240, 245],\n\tlawngreen: [124, 252, 0],\n\tlemonchiffon: [255, 250, 205],\n\tlightblue: [173, 216, 230],\n\tlightcoral: [240, 128, 128],\n\tlightcyan: [224, 255, 255],\n\tlightgoldenrodyellow: [250, 250, 210],\n\tlightgray: [211, 211, 211],\n\tlightgreen: [144, 238, 144],\n\tlightgrey: [211, 211, 211],\n\tlightpink: [255, 182, 193],\n\tlightsalmon: [255, 160, 122],\n\tlightseagreen: [32, 178, 170],\n\tlightskyblue: [135, 206, 250],\n\tlightslategray: [119, 136, 153],\n\tlightslategrey: [119, 136, 153],\n\tlightsteelblue: [176, 196, 222],\n\tlightyellow: [255, 255, 224],\n\tlime: [0, 255, 0],\n\tlimegreen: [50, 205, 50],\n\tlinen: [250, 240, 230],\n\tmagenta: [255, 0, 255],\n\tmaroon: [128, 0, 0],\n\tmediumaquamarine: [102, 205, 170],\n\tmediumblue: [0, 0, 205],\n\tmediumorchid: [186, 85, 211],\n\tmediumpurple: [147, 112, 219],\n\tmediumseagreen: [60, 179, 113],\n\tmediumslateblue: [123, 104, 238],\n\tmediumspringgreen: [0, 250, 154],\n\tmediumturquoise: [72, 209, 204],\n\tmediumvioletred: [199, 21, 133],\n\tmidnightblue: [25, 25, 112],\n\tmintcream: [245, 255, 250],\n\tmistyrose: [255, 228, 225],\n\tmoccasin: [255, 228, 181],\n\tnavajowhite: [255, 222, 173],\n\tnavy: [0, 0, 128],\n\toldlace: [253, 245, 230],\n\tolive: [128, 128, 0],\n\tolivedrab: [107, 142, 35],\n\torange: [255, 165, 0],\n\torangered: [255, 69, 0],\n\torchid: [218, 112, 214],\n\tpalegoldenrod: [238, 232, 170],\n\tpalegreen: [152, 251, 152],\n\tpaleturquoise: [175, 238, 238],\n\tpalevioletred: [219, 112, 147],\n\tpapayawhip: [255, 239, 213],\n\tpeachpuff: [255, 218, 185],\n\tperu: [205, 133, 63],\n\tpink: [255, 192, 203],\n\tplum: [221, 160, 221],\n\tpowderblue: [176, 224, 230],\n\tpurple: [128, 0, 128],\n\trebeccapurple: [102, 51, 153],\n\tred: [255, 0, 0],\n\trosybrown: [188, 143, 143],\n\troyalblue: [65, 105, 225],\n\tsaddlebrown: [139, 69, 19],\n\tsalmon: [250, 128, 114],\n\tsandybrown: [244, 164, 96],\n\tseagreen: [46, 139, 87],\n\tseashell: [255, 245, 238],\n\tsienna: [160, 82, 45],\n\tsilver: [192, 192, 192],\n\tskyblue: [135, 206, 235],\n\tslateblue: [106, 90, 205],\n\tslategray: [112, 128, 144],\n\tslategrey: [112, 128, 144],\n\tsnow: [255, 250, 250],\n\tspringgreen: [0, 255, 127],\n\tsteelblue: [70, 130, 180],\n\ttan: [210, 180, 140],\n\tteal: [0, 128, 128],\n\tthistle: [216, 191, 216],\n\ttomato: [255, 99, 71],\n\tturquoise: [64, 224, 208],\n\tviolet: [238, 130, 238],\n\twheat: [245, 222, 179],\n\twhite: [255, 255, 255],\n\twhitesmoke: [245, 245, 245],\n\tyellow: [255, 255, 0],\n\tyellowgreen: [154, 205, 50],\n}\n\nfor (const key in colors) Object.freeze(colors[key]);\nexport default Object.freeze(colors);", "/**\n * @module color-parse\n */\nimport names from 'color-name'\n\nexport default parse\n\n/**\n * Base hues\n * http://dev.w3.org/csswg/css-color/#typedef-named-hue\n */\n//FIXME: use external hue detector\nvar baseHues = {\n\tred: 0,\n\torange: 60,\n\tyellow: 120,\n\tgreen: 180,\n\tblue: 240,\n\tpurple: 300\n}\n\n/**\n * Parse color from the string passed\n *\n * @return {Object} A space indicator `space`, an array `values` and `alpha`\n */\nfunction parse(cstr) {\n\tvar m, parts = [], alpha = 1, space\n\n\t//numeric case\n\tif (typeof cstr === 'number') {\n\t\treturn { space: 'rgb', values: [cstr >>> 16, (cstr & 0x00ff00) >>> 8, cstr & 0x0000ff], alpha: 1 }\n\t}\n\tif (typeof cstr === 'number') return { space: 'rgb', values: [cstr >>> 16, (cstr & 0x00ff00) >>> 8, cstr & 0x0000ff], alpha: 1 }\n\n\tcstr = String(cstr).toLowerCase();\n\n\t//keyword\n\tif (names[cstr]) {\n\t\tparts = names[cstr].slice()\n\t\tspace = 'rgb'\n\t}\n\n\t//reserved words\n\telse if (cstr === 'transparent') {\n\t\talpha = 0\n\t\tspace = 'rgb'\n\t\tparts = [0, 0, 0]\n\t}\n\n\t//hex\n\telse if (cstr[0] === '#') {\n\t\tvar base = cstr.slice(1)\n\t\tvar size = base.length\n\t\tvar isShort = size <= 4\n\t\talpha = 1\n\n\t\tif (isShort) {\n\t\t\tparts = [\n\t\t\t\tparseInt(base[0] + base[0], 16),\n\t\t\t\tparseInt(base[1] + base[1], 16),\n\t\t\t\tparseInt(base[2] + base[2], 16)\n\t\t\t]\n\t\t\tif (size === 4) {\n\t\t\t\talpha = parseInt(base[3] + base[3], 16) / 255\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tparts = [\n\t\t\t\tparseInt(base[0] + base[1], 16),\n\t\t\t\tparseInt(base[2] + base[3], 16),\n\t\t\t\tparseInt(base[4] + base[5], 16)\n\t\t\t]\n\t\t\tif (size === 8) {\n\t\t\t\talpha = parseInt(base[6] + base[7], 16) / 255\n\t\t\t}\n\t\t}\n\n\t\tif (!parts[0]) parts[0] = 0\n\t\tif (!parts[1]) parts[1] = 0\n\t\tif (!parts[2]) parts[2] = 0\n\n\t\tspace = 'rgb'\n\t}\n\n\t// color space\n\telse if (m = /^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\\s*\\(([^\\)]*)\\)/.exec(cstr)) {\n\t\tvar name = m[1]\n\t\tspace = name.replace(/a$/, '')\n\t\tvar dims = space === 'cmyk' ? 4 : space === 'gray' ? 1 : 3\n\t\tparts = m[2].trim().split(/\\s*[,\\/]\\s*|\\s+/)\n\n\t\t// color(srgb-linear x x x) -> srgb-linear(x x x)\n\t\tif (space === 'color') space = parts.shift()\n\n\t\tparts = parts.map(function (x, i) {\n\t\t\t//<percentage>\n\t\t\tif (x[x.length - 1] === '%') {\n\t\t\t\tx = parseFloat(x) / 100\n\t\t\t\t// alpha -> 0..1\n\t\t\t\tif (i === 3) return x\n\t\t\t\t// rgb -> 0..255\n\t\t\t\tif (space === 'rgb') return x * 255\n\t\t\t\t// hsl, hwb H -> 0..100\n\t\t\t\tif (space[0] === 'h') return x * 100\n\t\t\t\t// lch, lab L -> 0..100\n\t\t\t\tif (space[0] === 'l' && !i) return x * 100\n\t\t\t\t// lab A B -> -125..125\n\t\t\t\tif (space === 'lab') return x * 125\n\t\t\t\t// lch C -> 0..150, H -> 0..360\n\t\t\t\tif (space === 'lch') return i < 2 ? x * 150 : x * 360\n\t\t\t\t// oklch/oklab L -> 0..1\n\t\t\t\tif (space[0] === 'o' && !i) return x\n\t\t\t\t// oklab A B -> -0.4..0.4\n\t\t\t\tif (space === 'oklab') return x * 0.4\n\t\t\t\t// oklch C -> 0..0.4, H -> 0..360\n\t\t\t\tif (space === 'oklch') return i < 2 ? x * 0.4 : x * 360\n\t\t\t\t// color(xxx) -> 0..1\n\t\t\t\treturn x\n\t\t\t}\n\n\t\t\t//hue\n\t\t\tif (space[i] === 'h' || (i === 2 && space[space.length - 1] === 'h')) {\n\t\t\t\t//<base-hue>\n\t\t\t\tif (baseHues[x] !== undefined) return baseHues[x]\n\t\t\t\t//<deg>\n\t\t\t\tif (x.endsWith('deg')) return parseFloat(x)\n\t\t\t\t//<turn>\n\t\t\t\tif (x.endsWith('turn')) return parseFloat(x) * 360\n\t\t\t\tif (x.endsWith('grad')) return parseFloat(x) * 360 / 400\n\t\t\t\tif (x.endsWith('rad')) return parseFloat(x) * 180 / Math.PI\n\t\t\t}\n\t\t\tif (x === 'none') return 0\n\t\t\treturn parseFloat(x)\n\t\t});\n\n\t\talpha = parts.length > dims ? parts.pop() : 1\n\t}\n\n\t//named channels case\n\telse if (/[0-9](?:\\s|\\/|,)/.test(cstr)) {\n\t\tparts = cstr.match(/([0-9]+)/g).map(function (value) {\n\t\t\treturn parseFloat(value)\n\t\t})\n\n\t\tspace = cstr.match(/([a-z])/ig)?.join('')?.toLowerCase() || 'rgb'\n\t}\n\n\treturn {\n\t\tspace,\n\t\tvalues: parts,\n\t\talpha\n\t}\n}\n", "/* MIT license */\n/* eslint-disable no-mixed-operators */\nimport cssKeywords from 'color-name';\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n//       values that give correct `typeof` results).\n//       do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\toklab: {channels: 3, labels: ['okl', 'oka', 'okb']},\n\tlch: {channels: 3, labels: 'lch'},\n\toklch: {channels: 3, labels: ['okl', 'okc', 'okh']},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']},\n};\n\nexport default convert;\n\n// LAB f(t) constant\nconst LAB_FT = (6 / 29) ** 3;\n\n// SRGB non-linear transform functions\nfunction srgbNonlinearTransform(c) {\n\tconst cc = c > 0.003_130_8\n\t\t? ((1.055 * (c ** (1 / 2.4))) - 0.055)\n\t\t: c * 12.92;\n\treturn Math.min(Math.max(0, cc), 1);\n}\n\nfunction srgbNonlinearTransformInv(c) {\n\treturn c > 0.040_45 ? (((c + 0.055) / 1.055) ** 2.4) : (c / 12.92);\n}\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tswitch (max) {\n\t\tcase min: {\n\t\t\th = 0;\n\n\t\t\tbreak;\n\t\t}\n\n\t\tcase r: {\n\t\t\th = (g - b) / delta;\n\n\t\t\tbreak;\n\t\t}\n\n\t\tcase g: {\n\t\t\th = 2 + (b - r) / delta;\n\n\t\t\tbreak;\n\t\t}\n\n\t\tcase b: {\n\t\t\th = 4 + (r - g) / delta;\n\n\t\t\tbreak;\n\t\t}\n\t// No default\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tswitch (v) {\n\t\t\tcase r: {\n\t\t\t\th = bdif - gdif;\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase g: {\n\t\t\t\th = (1 / 3) + rdif - bdif;\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase b: {\n\t\t\t\th = (2 / 3) + gdif - rdif;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t// No default\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100,\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.oklab = function (rgb) {\n\t// Assume sRGB\n\tconst r = srgbNonlinearTransformInv(rgb[0] / 255);\n\tconst g = srgbNonlinearTransformInv(rgb[1] / 255);\n\tconst b = srgbNonlinearTransformInv(rgb[2] / 255);\n\n\tconst lp = Math.cbrt(0.412_221_470_8 * r + 0.536_332_536_3 * g + 0.051_445_992_9 * b);\n\tconst mp = Math.cbrt(0.211_903_498_2 * r + 0.680_699_545_1 * g + 0.107_396_956_6 * b);\n\tconst sp = Math.cbrt(0.088_302_461_9 * r + 0.281_718_837_6 * g + 0.629_978_700_5 * b);\n\n\tconst l = 0.210_454_255_3 * lp + 0.793_617_785 * mp - 0.004_072_046_8 * sp;\n\tconst aa = 1.977_998_495_1 * lp - 2.428_592_205 * mp + 0.450_593_709_9 * sp;\n\tconst bb = 0.025_904_037_1 * lp + 0.782_771_766_2 * mp - 0.808_675_766 * sp;\n\n\treturn [l * 100, aa * 100, bb * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Number.POSITIVE_INFINITY;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\t// Assume sRGB\n\tconst r = srgbNonlinearTransformInv(rgb[0] / 255);\n\tconst g = srgbNonlinearTransformInv(rgb[1] / 255);\n\tconst b = srgbNonlinearTransformInv(rgb[2] / 255);\n\n\tconst x = (r * 0.412_456_4) + (g * 0.357_576_1) + (b * 0.180_437_5);\n\tconst y = (r * 0.212_672_9) + (g * 0.715_152_2) + (b * 0.072_175);\n\tconst z = (r * 0.019_333_9) + (g * 0.119_192) + (b * 0.950_304_1);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > LAB_FT ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > LAB_FT ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > LAB_FT ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t3;\n\tlet value;\n\n\tif (s === 0) {\n\t\tvalue = l * 255;\n\t\treturn [value, value, value];\n\t}\n\n\tconst t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tvalue = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tvalue = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tvalue = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tvalue = t1;\n\t\t}\n\n\t\trgb[i] = value * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0: {\n\t\t\treturn [v, t, p];\n\t\t}\n\n\t\tcase 1: {\n\t\t\treturn [q, v, p];\n\t\t}\n\n\t\tcase 2: {\n\t\t\treturn [p, v, t];\n\t\t}\n\n\t\tcase 3: {\n\t\t\treturn [p, q, v];\n\t\t}\n\n\t\tcase 4: {\n\t\t\treturn [t, p, v];\n\t\t}\n\n\t\tcase 5: {\n\t\t\treturn [v, p, q];\n\t\t}\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\t// eslint-disable-next-line no-bitwise\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces, default-case-last */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: { r = v;  g = n;  b = wh; break;\n\t\t}\n\n\t\tcase 1: { r = n;  g = v;  b = wh; break;\n\t\t}\n\n\t\tcase 2: { r = wh; g = v;  b = n; break;\n\t\t}\n\n\t\tcase 3: { r = wh; g = n;  b = v; break;\n\t\t}\n\n\t\tcase 4: { r = n;  g = wh; b = v; break;\n\t\t}\n\n\t\tcase 5: { r = v;  g = wh; b = n; break;\n\t\t}\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces, default-case-last */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.240_454_2) + (y * -1.537_138_5) + (z * -0.498_531_4);\n\tg = (x * -0.969_266) + (y * 1.876_010_8) + (z * 0.041_556);\n\tb = (x * 0.055_643_4) + (y * -0.204_025_9) + (z * 1.057_225_2);\n\n\t// Assume sRGB\n\tr = srgbNonlinearTransform(r);\n\tg = srgbNonlinearTransform(g);\n\tb = srgbNonlinearTransform(b);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > LAB_FT ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > LAB_FT ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > LAB_FT ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.xyz.oklab = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\n\tconst lp = Math.cbrt(0.818_933_010_1 * x + 0.361_866_742_4 * y - 0.128_859_713_7 * z);\n\tconst mp = Math.cbrt(0.032_984_543_6 * x + 0.929_311_871_5 * y + 0.036_145_638_7 * z);\n\tconst sp = Math.cbrt(0.048_200_301_8 * x + 0.264_366_269_1 * y + 0.633_851_707 * z);\n\n\tconst l = 0.210_454_255_3 * lp + 0.793_617_785 * mp - 0.004_072_046_8 * sp;\n\tconst a = 1.977_998_495_1 * lp - 2.428_592_205 * mp + 0.450_593_709_9 * sp;\n\tconst b = 0.025_904_037_1 * lp + 0.782_771_766_2 * mp - 0.808_675_766 * sp;\n\n\treturn [l * 100, a * 100, b * 100];\n};\n\nconvert.oklab.oklch = function (oklab) {\n\treturn convert.lab.lch(oklab);\n};\n\nconvert.oklab.xyz = function (oklab) {\n\tconst ll = oklab[0] / 100;\n\tconst a = oklab[1] / 100;\n\tconst b = oklab[2] / 100;\n\n\tconst l = (0.999_999_998 * ll + 0.396_337_792 * a + 0.215_803_758 * b) ** 3;\n\tconst m = (1.000_000_008 * ll - 0.105_561_342 * a - 0.063_854_175 * b) ** 3;\n\tconst s = (1.000_000_055 * ll - 0.089_484_182 * a - 1.291_485_538 * b) ** 3;\n\n\tconst x = 1.227_013_851 * l - 0.557_799_98 * m + 0.281_256_149 * s;\n\tconst y = -0.040_580_178 * l + 1.112_256_87 * m - 0.071_676_679 * s;\n\tconst z = -0.076_381_285 * l - 0.421_481_978 * m + 1.586_163_22 * s;\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.oklab.rgb = function (oklab) {\n\tconst ll = oklab[0] / 100;\n\tconst aa = oklab[1] / 100;\n\tconst bb = oklab[2] / 100;\n\n\tconst l = (ll + 0.396_337_777_4 * aa + 0.215_803_757_3 * bb) ** 3;\n\tconst m = (ll - 0.105_561_345_8 * aa - 0.063_854_172_8 * bb) ** 3;\n\tconst s = (ll - 0.089_484_177_5 * aa - 1.291_485_548 * bb) ** 3;\n\n\t// Assume sRGB\n\tconst r = srgbNonlinearTransform(4.076_741_662_1 * l - 3.307_711_591_3 * m + 0.230_969_929_2 * s);\n\tconst g = srgbNonlinearTransform(-1.268_438_004_6 * l + 2.609_757_401_1 * m - 0.341_319_396_5 * s);\n\tconst b = srgbNonlinearTransform(-0.004_196_086_3 * l - 0.703_418_614_7 * m + 1.707_614_701 * s);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.oklch.oklab = function (oklch) {\n\treturn convert.lch.lab(oklch);\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > LAB_FT ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > LAB_FT ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > LAB_FT ? z2 : (z - 16 / 116) / 7.787;\n\n\t// Illuminant D65 XYZ Tristrimulus Values\n\t// https://en.wikipedia.org/wiki/CIE_1931_color_space\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t/* eslint-disable no-bitwise */\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\t\t/* eslint-enable no-bitwise */\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\t// eslint-disable-next-line no-bitwise\n\tif (r >> 4 === g >> 4 && g >> 4 === b >> 4) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\targs = args[0];\n\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (Math.trunc(args > 50) + 1) * 0.5;\n\t/* eslint-disable no-bitwise */\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\t/* eslint-enable no-bitwise */\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\targs = args[0];\n\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\t/* eslint-disable no-bitwise */\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\t/* eslint-enable no-bitwise */\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.slice(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f\\d]{6}|[a-f\\d]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = [...colorString].map(char => char + char).join('');\n\t}\n\n\tconst integer = Number.parseInt(colorString, 16);\n\t/* eslint-disable no-bitwise */\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\t/* eslint-enable no-bitwise */\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet hue;\n\n\tconst grayscale = chroma < 1 ? min / (1 - chroma) : 0;\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else if (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else if (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2 * s * l) : (2 * s * (1 - l));\n\n\tlet f = 0;\n\tif (c < 1) {\n\t\tf = (l - 0.5 * c) / (1 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0: {\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\t}\n\n\t\tcase 1: {\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\t}\n\n\t\tcase 2: {\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\t}\n\n\t\tcase 3: {\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\t}\n\n\t\tcase 4: {\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\t}\n\n\t\tdefault: {\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t\t}\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255,\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1 - c);\n\tlet f = 0;\n\n\tif (v > 0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else if (l >= 0.5 && l < 1) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65_535) * 255, (apple[1] / 65_535) * 255, (apple[2] / 65_535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65_535, (rgb[1] / 255) * 65_535, (rgb[2] / 255) * 65_535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\t/* eslint-disable no-bitwise */\n\tconst value = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (value << 16) + (value << 8) + value;\n\t/* eslint-enable no-bitwise */\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.slice(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst value = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [value / 255 * 100];\n};\n", "import conversions from './conversions.js';\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let {length} = models, i = 0; i < length; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null,\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length > 0) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let {length} = adjacents, i = 0; i < length; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nfunction route(fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let {length} = models, i = 0; i < length; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n}\n\nexport default route;\n", "import conversions from './conversions.js';\nimport route from './route.js';\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let {length} = result, i = 0; i < length; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfor (const fromModel of models) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\tfor (const toModel of routeModels) {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t}\n}\n\nexport default convert;\n", "// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number: number, min = 0, max = 1): number => {\n  return number > max ? max : number < min ? min : number;\n};\n\nexport const round = (number: number, digits = 0, base = Math.pow(10, digits)): number => {\n  return Math.round(base * number) / base;\n};\n", "import { RgbaColor, RgbColor, HslaColor, HslColor, HsvaColor, HsvColor } from '../types';\nimport { round } from './math.js';\n\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits: Record<string, number> = {\n  grad: 360 / 400,\n  turn: 360,\n  rad: 360 / (Math.PI * 2)\n};\n\nexport const hexToHsva = (hex: string): HsvaColor => rgbaToHsva(hexToRgba(hex));\n\nexport const hexToRgba = (hex: string): RgbaColor => {\n  if (hex[0] === '#') hex = hex.substring(1);\n\n  if (hex.length < 6) {\n    return {\n      r: parseInt(hex[0] + hex[0], 16),\n      g: parseInt(hex[1] + hex[1], 16),\n      b: parseInt(hex[2] + hex[2], 16),\n      a: hex.length === 4 ? round(parseInt(hex[3] + hex[3], 16) / 255, 2) : 1\n    };\n  }\n\n  return {\n    r: parseInt(hex.substring(0, 2), 16),\n    g: parseInt(hex.substring(2, 4), 16),\n    b: parseInt(hex.substring(4, 6), 16),\n    a: hex.length === 8 ? round(parseInt(hex.substring(6, 8), 16) / 255, 2) : 1\n  };\n};\n\nexport const parseHue = (value: string, unit = 'deg'): number => {\n  return Number(value) * (angleUnits[unit] || 1);\n};\n\nexport const hslaStringToHsva = (hslString: string): HsvaColor => {\n  const matcher =\n    /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n  const match = matcher.exec(hslString);\n\n  if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n  return hslaToHsva({\n    h: parseHue(match[1], match[2]),\n    s: Number(match[3]),\n    l: Number(match[4]),\n    a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n  });\n};\n\nexport const hslStringToHsva = hslaStringToHsva;\n\nexport const hslaToHsva = ({ h, s, l, a }: HslaColor): HsvaColor => {\n  s *= (l < 50 ? l : 100 - l) / 100;\n\n  return {\n    h: h,\n    s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n    v: l + s,\n    a\n  };\n};\n\nexport const hsvaToHex = (hsva: HsvaColor): string => rgbaToHex(hsvaToRgba(hsva));\n\nexport const hsvaToHsla = ({ h, s, v, a }: HsvaColor): HslaColor => {\n  const hh = ((200 - s) * v) / 100;\n\n  return {\n    h: round(h),\n    s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n    l: round(hh / 2),\n    a: round(a, 2)\n  };\n};\n\nexport const hsvaToHsvString = (hsva: HsvaColor): string => {\n  const { h, s, v } = roundHsva(hsva);\n  return `hsv(${h}, ${s}%, ${v}%)`;\n};\n\nexport const hsvaToHsvaString = (hsva: HsvaColor): string => {\n  const { h, s, v, a } = roundHsva(hsva);\n  return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\n\nexport const hsvaToHslString = (hsva: HsvaColor): string => {\n  const { h, s, l } = hsvaToHsla(hsva);\n  return `hsl(${h}, ${s}%, ${l}%)`;\n};\n\nexport const hsvaToHslaString = (hsva: HsvaColor): string => {\n  const { h, s, l, a } = hsvaToHsla(hsva);\n  return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\n\nexport const hsvaToRgba = ({ h, s, v, a }: HsvaColor): RgbaColor => {\n  h = (h / 360) * 6;\n  s = s / 100;\n  v = v / 100;\n\n  const hh = Math.floor(h),\n    b = v * (1 - s),\n    c = v * (1 - (h - hh) * s),\n    d = v * (1 - (1 - h + hh) * s),\n    module = hh % 6;\n\n  return {\n    r: round([v, c, b, b, d, v][module] * 255),\n    g: round([d, v, v, c, b, b][module] * 255),\n    b: round([b, b, d, v, v, c][module] * 255),\n    a: round(a, 2)\n  };\n};\n\nexport const hsvaToRgbString = (hsva: HsvaColor): string => {\n  const { r, g, b } = hsvaToRgba(hsva);\n  return `rgb(${r}, ${g}, ${b})`;\n};\n\nexport const hsvaToRgbaString = (hsva: HsvaColor): string => {\n  const { r, g, b, a } = hsvaToRgba(hsva);\n  return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\n\nexport const hsvaStringToHsva = (hsvString: string): HsvaColor => {\n  const matcher =\n    /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n  const match = matcher.exec(hsvString);\n\n  if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n  return roundHsva({\n    h: parseHue(match[1], match[2]),\n    s: Number(match[3]),\n    v: Number(match[4]),\n    a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n  });\n};\n\nexport const hsvStringToHsva = hsvaStringToHsva;\n\nexport const rgbaStringToHsva = (rgbaString: string): HsvaColor => {\n  const matcher =\n    /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n  const match = matcher.exec(rgbaString);\n\n  if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n  return rgbaToHsva({\n    r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n    g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n    b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n    a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1)\n  });\n};\n\nexport const rgbStringToHsva = rgbaStringToHsva;\n\nconst format = (number: number) => {\n  const hex = number.toString(16);\n  return hex.length < 2 ? '0' + hex : hex;\n};\n\nexport const rgbaToHex = ({ r, g, b, a }: RgbaColor): string => {\n  const alphaHex = a < 1 ? format(round(a * 255)) : '';\n  return '#' + format(r) + format(g) + format(b) + alphaHex;\n};\n\nexport const rgbaToHsva = ({ r, g, b, a }: RgbaColor): HsvaColor => {\n  const max = Math.max(r, g, b);\n  const delta = max - Math.min(r, g, b);\n\n  // prettier-ignore\n  const hh = delta\n    ? max === r\n      ? (g - b) / delta\n      : max === g\n        ? 2 + (b - r) / delta\n        : 4 + (r - g) / delta\n    : 0;\n\n  return {\n    h: round(60 * (hh < 0 ? hh + 6 : hh)),\n    s: round(max ? (delta / max) * 100 : 0),\n    v: round((max / 255) * 100),\n    a\n  };\n};\n\nexport const roundHsva = (hsva: HsvaColor): HsvaColor => ({\n  h: round(hsva.h),\n  s: round(hsva.s),\n  v: round(hsva.v),\n  a: round(hsva.a, 2)\n});\n\nexport const rgbaToRgb = ({ r, g, b }: RgbaColor): RgbColor => ({ r, g, b });\n\nexport const hslaToHsl = ({ h, s, l }: HslaColor): HslColor => ({ h, s, l });\n\nexport const hsvaToHsv = (hsva: HsvaColor): HsvColor => {\n  const { h, s, v } = roundHsva(hsva);\n  return { h, s, v };\n};\n", "import { hexToRgba } from './convert.js';\nimport type { ObjectColor } from '../types';\n\nexport const equalColorObjects = (first: ObjectColor, second: ObjectColor): boolean => {\n  if (first === second) return true;\n\n  for (const prop in first) {\n    // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n    // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n    // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n    // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n    // there is or not), and then as a type TS can iterate over.\n    if (\n      (first as unknown as Record<string, number>)[prop] !==\n      (second as unknown as Record<string, number>)[prop]\n    )\n      return false;\n  }\n\n  return true;\n};\n\nexport const equalColorString = (first: string, second: string): boolean => {\n  return first.replace(/\\s/g, '') === second.replace(/\\s/g, '');\n};\n\nexport const equalHex = (first: string, second: string): boolean => {\n  if (first.toLowerCase() === second.toLowerCase()) return true;\n\n  // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n  return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n", "const cache: Record<string, HTMLTemplateElement> = {};\n\nexport const tpl = (html: string): HTMLTemplateElement => {\n  let template = cache[html];\n  if (!template) {\n    template = document.createElement('template');\n    template.innerHTML = html;\n    cache[html] = template;\n  }\n  return template;\n};\n\nexport const fire = (target: HTMLElement, type: string, detail: Record<string, unknown>): void => {\n  target.dispatchEvent(\n    new CustomEvent(type, {\n      bubbles: true,\n      detail\n    })\n  );\n};\n", "import type { HsvaColor } from '../types.js';\nimport { fire, tpl } from '../utils/dom.js';\nimport { clamp } from '../utils/math.js';\n\nexport interface Offset {\n  x: number;\n  y: number;\n}\n\nlet hasTouched = false;\n\n// Check if an event was triggered by touch\nconst isTouch = (e: Event): e is TouchEvent => 'touches' in e;\n\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isValid = (event: Event): boolean => {\n  if (hasTouched && !isTouch(event)) return false;\n  if (!hasTouched) hasTouched = isTouch(event);\n  return true;\n};\n\nconst pointerMove = (target: Slider, event: Event): void => {\n  const pointer = isTouch(event) ? event.touches[0] : (event as MouseEvent);\n  const rect = target.el.getBoundingClientRect();\n\n  fire(\n    target.el,\n    'move',\n    target.getMove({\n      x: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n      y: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height)\n    })\n  );\n};\n\nconst keyMove = (target: Slider, event: KeyboardEvent): void => {\n  // We use `keyCode` instead of `key` to reduce the size of the library.\n  const keyCode = event.keyCode;\n  // Ignore all keys except arrow ones, Page Up, Page Down, Home and End.\n  if (keyCode > 40 || (target.xy && keyCode < 37) || keyCode < 33) return;\n  // Do not scroll page by keys when color picker element has focus.\n  event.preventDefault();\n  // Send relative offset to the parent component.\n  fire(\n    target.el,\n    'move',\n    target.getMove(\n      {\n        x:\n          keyCode === 39 // Arrow Right\n            ? 0.01\n            : keyCode === 37 // Arrow Left\n            ? -0.01\n            : keyCode === 34 // Page Down\n            ? 0.05\n            : keyCode === 33 // Page Up\n            ? -0.05\n            : keyCode === 35 // End\n            ? 1\n            : keyCode === 36 // Home\n            ? -1\n            : 0,\n        y:\n          keyCode === 40 // Arrow down\n            ? 0.01\n            : keyCode === 38 // Arrow Up\n            ? -0.01\n            : 0\n      },\n      true\n    )\n  );\n};\n\nexport abstract class Slider {\n  declare nodes: HTMLElement[];\n\n  declare el: HTMLElement;\n\n  declare xy: boolean;\n\n  constructor(root: ShadowRoot, part: string, aria: string, xy: boolean) {\n    const template = tpl(\n      `<div role=\"slider\" tabindex=\"0\" part=\"${part}\" ${aria}><div part=\"${part}-pointer\"></div></div>`\n    );\n    root.appendChild(template.content.cloneNode(true));\n\n    const el = root.querySelector(`[part=${part}]`) as HTMLElement;\n    el.addEventListener('mousedown', this);\n    el.addEventListener('touchstart', this);\n    el.addEventListener('keydown', this);\n    this.el = el;\n\n    this.xy = xy;\n    this.nodes = [el.firstChild as HTMLElement, el];\n  }\n\n  set dragging(state: boolean) {\n    const toggleEvent = state ? document.addEventListener : document.removeEventListener;\n    toggleEvent(hasTouched ? 'touchmove' : 'mousemove', this);\n    toggleEvent(hasTouched ? 'touchend' : 'mouseup', this);\n  }\n\n  handleEvent(event: Event): void {\n    switch (event.type) {\n      case 'mousedown':\n      case 'touchstart':\n        event.preventDefault();\n        // event.button is 0 in mousedown for left button activation\n        if (!isValid(event) || (!hasTouched && (event as MouseEvent).button != 0)) return;\n        this.el.focus();\n        pointerMove(this, event);\n        this.dragging = true;\n        break;\n      case 'mousemove':\n      case 'touchmove':\n        event.preventDefault();\n        pointerMove(this, event);\n        break;\n      case 'mouseup':\n      case 'touchend':\n        this.dragging = false;\n        break;\n      case 'keydown':\n        keyMove(this, event as KeyboardEvent);\n        break;\n    }\n  }\n\n  abstract getMove(offset: Offset, key?: boolean): Record<string, number>;\n\n  abstract update(hsva: HsvaColor): void;\n\n  style(styles: Array<Record<string, string>>): void {\n    styles.forEach((style, i) => {\n      for (const p in style) {\n        this.nodes[i].style.setProperty(p, style[p]);\n      }\n    });\n  }\n}\n", "import { Slider, Offset } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nimport type { HsvaColor } from '../types';\n\nexport class Hue extends Slider {\n  declare h: number;\n\n  constructor(root: ShadowRoot) {\n    super(root, 'hue', 'aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"', false);\n  }\n\n  update({ h }: HsvaColor): void {\n    this.h = h;\n    this.style([\n      {\n        left: `${(h / 360) * 100}%`,\n        color: hsvaToHslString({ h, s: 100, v: 100, a: 1 })\n      }\n    ]);\n    this.el.setAttribute('aria-valuenow', `${round(h)}`);\n  }\n\n  getMove(offset: Offset, key?: boolean): Record<string, number> {\n    // Hue measured in degrees of the color circle ranging from 0 to 360\n    return { h: key ? clamp(this.h + offset.x * 360, 0, 360) : 360 * offset.x };\n  }\n}\n", "import { Slider, Offset } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nimport type { HsvaColor } from '../types';\n\nexport class Saturation extends Slider {\n  declare hsva: HsvaColor;\n\n  constructor(root: ShadowRoot) {\n    super(root, 'saturation', 'aria-label=\"Color\"', true);\n  }\n\n  update(hsva: HsvaColor): void {\n    this.hsva = hsva;\n    this.style([\n      {\n        top: `${100 - hsva.v}%`,\n        left: `${hsva.s}%`,\n        color: hsvaToHslString(hsva)\n      },\n      {\n        'background-color': hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 })\n      }\n    ]);\n    this.el.setAttribute(\n      'aria-valuetext',\n      `Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`\n    );\n  }\n\n  getMove(offset: Offset, key?: boolean): Record<string, number> {\n    // Saturation and brightness always fit into [0, 100] range\n    return {\n      s: key ? clamp(this.hsva.s + offset.x * 100, 0, 100) : offset.x * 100,\n      v: key ? clamp(this.hsva.v - offset.y * 100, 0, 100) : Math.round(100 - offset.y * 100)\n    };\n  }\n}\n", "export default `:host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}`;\n", "export default `[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}`;\n", "export default `[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}`;\n", "import { equalColorObjects } from '../utils/compare.js';\nimport { fire, tpl } from '../utils/dom.js';\nimport type { AnyColor, ColorModel, HsvaColor } from '../types';\nimport { Hue } from './hue.js';\nimport { Saturation } from './saturation.js';\nimport type { Slider } from './slider.js';\nimport css from '../styles/color-picker.js';\nimport hueCss from '../styles/hue.js';\nimport saturationCss from '../styles/saturation.js';\n\nconst $isSame = Symbol('same');\nconst $color = Symbol('color');\nconst $hsva = Symbol('hsva');\nconst $update = Symbol('update');\nconst $parts = Symbol('parts');\n\nexport const $css = Symbol('css');\nexport const $sliders = Symbol('sliders');\n\nexport type Sliders = Array<new (root: ShadowRoot) => Slider>;\n\nexport abstract class ColorPicker<C extends AnyColor> extends HTMLElement {\n  static get observedAttributes(): string[] {\n    return ['color'];\n  }\n\n  protected get [$css](): string[] {\n    return [css, hueCss, saturationCss];\n  }\n\n  protected get [$sliders](): Sliders {\n    return [Saturation, Hue];\n  }\n\n  protected abstract get colorModel(): ColorModel<C>;\n\n  private declare [$hsva]: HsvaColor;\n\n  private declare [$color]: C;\n\n  private declare [$parts]: Slider[];\n\n  get color(): C {\n    return this[$color];\n  }\n\n  set color(newColor: C) {\n    if (!this[$isSame](newColor)) {\n      const newHsva = this.colorModel.toHsva(newColor);\n      this[$update](newHsva);\n      this[$color] = newColor;\n    }\n  }\n\n  constructor() {\n    super();\n    const template = tpl(`<style>${this[$css].join('')}</style>`);\n    const root = this.attachShadow({ mode: 'open' });\n    root.appendChild(template.content.cloneNode(true));\n    root.addEventListener('move', this);\n    this[$parts] = this[$sliders].map((slider) => new slider(root));\n  }\n\n  connectedCallback(): void {\n    // A user may set a property on an _instance_ of an element,\n    // before its prototype has been connected to this class.\n    // If so, we need to run it through the proper class setter.\n    if (this.hasOwnProperty('color')) {\n      const value = this.color;\n      delete this['color' as keyof this];\n      this.color = value;\n    } else if (!this.color) {\n      this.color = this.colorModel.defaultColor;\n    }\n  }\n\n  attributeChangedCallback(_attr: string, _oldVal: string, newVal: string): void {\n    const color = this.colorModel.fromAttr(newVal);\n    if (!this[$isSame](color)) {\n      this.color = color;\n    }\n  }\n\n  handleEvent(event: CustomEvent): void {\n    // Merge the current HSV color object with updated params.\n    const oldHsva = this[$hsva];\n    const newHsva = { ...oldHsva, ...event.detail };\n    this[$update](newHsva);\n    let newColor;\n    if (\n      !equalColorObjects(newHsva, oldHsva) &&\n      !this[$isSame]((newColor = this.colorModel.fromHsva(newHsva)))\n    ) {\n      this[$color] = newColor;\n      fire(this, 'color-changed', { value: newColor });\n    }\n  }\n\n  private [$isSame](color: C): boolean {\n    return this.color && this.colorModel.equal(color, this.color);\n  }\n\n  private [$update](hsva: HsvaColor): void {\n    this[$hsva] = hsva;\n    this[$parts].forEach((part) => part.update(hsva));\n  }\n}\n", "import type { ColorModel, ColorPickerEventListener, ColorPickerEventMap } from '../types';\nimport { ColorPicker } from '../components/color-picker.js';\nimport { hexToHsva, hsvaToHex } from '../utils/convert.js';\nimport { equalHex } from '../utils/compare.js';\n\nconst colorModel: ColorModel<string> = {\n  defaultColor: '#000',\n  toHsva: hexToHsva,\n  fromHsva: ({ h, s, v }) => hsvaToHex({ h, s, v, a: 1 }),\n  equal: equalHex,\n  fromAttr: (color) => color\n};\n\nexport interface HexBase {\n  addEventListener<T extends keyof ColorPickerEventMap<string>>(\n    type: T,\n    listener: ColorPickerEventListener<ColorPickerEventMap<string>[T]>,\n    options?: boolean | AddEventListenerOptions\n  ): void;\n\n  removeEventListener<T extends keyof ColorPickerEventMap<string>>(\n    type: T,\n    listener: ColorPickerEventListener<ColorPickerEventMap<string>[T]>,\n    options?: boolean | EventListenerOptions\n  ): void;\n}\n\nexport class HexBase extends ColorPicker<string> {\n  protected get colorModel(): ColorModel<string> {\n    return colorModel;\n  }\n}\n", "import { CKEditorError, Collection, DomEmitterMixin, EmitterMixin, FocusTracker, KeystrokeHandler, ObservableMixin, Rect, ResizeObserver, createElement, delay, env, first, getAncestors, getBorderWidths, getConstrainedViewportRect, getEnvKeystrokeText, getOptimalPosition, getVisualViewportOffset, global, isIterable, isNode, isRange, isText, isVisible, logWarning, parseBase64EncodedObject, priorities, toArray, toUnit, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { cloneDeep, cloneDeepWith, debounce, escape, escapeRegExp, extend, isElement, isObject, throttle } from \"es-toolkit/compat\";\nimport { ContextPlugin, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { IconAccessibility, IconAlignLeft, IconBold, IconCancel, IconCheck, IconColorPalette, IconColorTileCheck, IconDragIndicator, IconDropdownArrow, IconEraser, IconImportExport, IconLoupe, IconNextArrow, IconParagraph, IconPilcrow, IconPlus, IconPreviousArrow, IconProjectLogo, IconText, IconThreeVerticalDots } from \"@ckeditor/ckeditor5-icons\";\nimport parse from \"color-parse\";\nimport convert from \"color-convert\";\nimport { HexBase } from \"vanilla-colorful/lib/entrypoints/hex\";\nimport { Observer } from \"@ckeditor/ckeditor5-engine\";\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 ui/viewcollection\n*/\n/**\n* Collects {@link module:ui/view~View} instances.\n*\n* ```ts\n* const parentView = new ParentView( locale );\n* const collection = new ViewCollection( locale );\n*\n* collection.setParent( parentView.element );\n*\n* const viewA = new ChildView( locale );\n* const viewB = new ChildView( locale );\n* ```\n*\n* View collection renders and manages view {@link module:ui/view~View#element elements}:\n*\n* ```ts\n* collection.add( viewA );\n* collection.add( viewB );\n*\n* console.log( parentView.element.firsChild ); // -> viewA.element\n* console.log( parentView.element.lastChild ); // -> viewB.element\n* ```\n*\n* It {@link module:ui/viewcollection~ViewCollection#delegate propagates} DOM events too:\n*\n* ```ts\n* // Delegate #click and #keydown events from viewA and viewB to the parentView.\n* collection.delegate( 'click' ).to( parentView );\n*\n* parentView.on( 'click', ( evt ) => {\n* \tconsole.log( `${ evt.source } has been clicked.` );\n* } );\n*\n* // This event will be delegated to the parentView.\n* viewB.fire( 'click' );\n* ```\n*\n* **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}\n* of a {@link module:ui/template~Template template}.\n*/\nvar ViewCollection = class extends Collection {\n\t/**\n\t* A parent element within which child views are rendered and managed in DOM.\n\t*/\n\t_parentElement;\n\t/**\n\t* Creates a new instance of the {@link module:ui/viewcollection~ViewCollection}.\n\t*\n\t* @param initialItems The initial items of the collection.\n\t*/\n\tconstructor(initialItems = []) {\n\t\tsuper(initialItems, { idProperty: \"viewUid\" });\n\t\tthis.on(\"add\", (evt, view, index) => {\n\t\t\tthis._renderViewIntoCollectionParent(view, index);\n\t\t});\n\t\tthis.on(\"remove\", (evt, view) => {\n\t\t\tif (view.element && this._parentElement) view.element.remove();\n\t\t});\n\t\tthis._parentElement = null;\n\t}\n\t/**\n\t* Destroys the view collection along with child views.\n\t* See the view {@link module:ui/view~View#destroy} method.\n\t*/\n\tdestroy() {\n\t\tthis.map((view) => view.destroy());\n\t}\n\t/**\n\t* Sets the parent HTML element of this collection. When parent is set, {@link #add adding} and\n\t* {@link #remove removing} views in the collection synchronizes their\n\t* {@link module:ui/view~View#element elements} in the parent element.\n\t*\n\t* @param elementOrDocFragment A new parent element or document fragment.\n\t*/\n\tsetParent(elementOrDocFragment) {\n\t\tthis._parentElement = elementOrDocFragment;\n\t\tfor (const view of this) this._renderViewIntoCollectionParent(view);\n\t}\n\t/**\n\t* Delegates selected events coming from within views in the collection to any\n\t* {@link module:utils/emittermixin~Emitter}.\n\t*\n\t* For the following views and collection:\n\t*\n\t* ```ts\n\t* const viewA = new View();\n\t* const viewB = new View();\n\t* const viewC = new View();\n\t*\n\t* const views = parentView.createCollection();\n\t*\n\t* views.delegate( 'eventX' ).to( viewB );\n\t* views.delegate( 'eventX', 'eventY' ).to( viewC );\n\t*\n\t* views.add( viewA );\n\t* ```\n\t*\n\t* the `eventX` is delegated (fired by) `viewB` and `viewC` along with `customData`:\n\t*\n\t* ```ts\n\t* viewA.fire( 'eventX', customData );\n\t* ```\n\t*\n\t* and `eventY` is delegated (fired by) `viewC` along with `customData`:\n\t*\n\t* ```ts\n\t* viewA.fire( 'eventY', customData );\n\t* ```\n\t*\n\t* See {@link module:utils/emittermixin~Emitter#delegate}.\n\t*\n\t* @param events {@link module:ui/view~View} event names to be delegated to another\n\t* {@link module:utils/emittermixin~Emitter}.\n\t* @returns Object with `to` property, a function which accepts the destination\n\t* of {@link module:utils/emittermixin~Emitter#delegate delegated} events.\n\t*/\n\tdelegate(...events) {\n\t\tif (!events.length || !isStringArray(events))\n /**\n\t\t* All event names must be strings.\n\t\t*\n\t\t* @error ui-viewcollection-delegate-wrong-events\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-viewcollection-delegate-wrong-events\", this);\n\t\treturn { to: (dest) => {\n\t\t\tfor (const view of this) for (const evtName of events) view.delegate(evtName).to(dest);\n\t\t\tthis.on(\"add\", (evt, view) => {\n\t\t\t\tfor (const evtName of events) view.delegate(evtName).to(dest);\n\t\t\t});\n\t\t\tthis.on(\"remove\", (evt, view) => {\n\t\t\t\tfor (const evtName of events) view.stopDelegating(evtName, dest);\n\t\t\t});\n\t\t} };\n\t}\n\t/**\n\t* This method {@link module:ui/view~View#render renders} a new view added to the collection.\n\t*\n\t* If the {@link #_parentElement parent element} of the collection is set, this method also adds\n\t* the view's {@link module:ui/view~View#element} as a child of the parent in DOM at a specified index.\n\t*\n\t* **Note**: If index is not specified, the view's element is pushed as the last child\n\t* of the parent element.\n\t*\n\t* @param view A new view added to the collection.\n\t* @param index An index the view holds in the collection. When not specified,\n\t* the view is added at the end.\n\t*/\n\t_renderViewIntoCollectionParent(view, index) {\n\t\tif (!view.isRendered) view.render();\n\t\tif (view.element && this._parentElement) this._parentElement.insertBefore(view.element, this._parentElement.children[index]);\n\t}\n\t/**\n\t* Removes a child view from the collection. If the {@link #setParent parent element} of the\n\t* collection has been set, the {@link module:ui/view~View#element element} of the view is also removed\n\t* in DOM, reflecting the order of the collection.\n\t*\n\t* See the {@link #add} method.\n\t*\n\t* @param subject The view to remove, its id or index in the collection.\n\t* @returns The removed view.\n\t*/\n\tremove(subject) {\n\t\treturn super.remove(subject);\n\t}\n};\n/**\n* Check if all entries of the array are of `String` type.\n*\n* @param arr An array to be checked.\n*/\nfunction isStringArray(arr) {\n\treturn arr.every((a) => typeof a == \"string\");\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 ui/template\n*/\nconst xhtmlNs = \"http://www.w3.org/1999/xhtml\";\nconst TemplateBase = /* #__PURE__ */ EmitterMixin();\n/**\n* A basic Template class. It renders a DOM HTML element or text from a\n* {@link module:ui/template~TemplateDefinition definition} and supports element attributes, children,\n* bindings to {@link module:utils/observablemixin~Observable observables} and DOM event propagation.\n*\n* A simple template can look like this:\n*\n* ```ts\n* const bind = Template.bind( observable, emitter );\n*\n* new Template( {\n* \ttag: 'p',\n* \tattributes: {\n* \t\tclass: 'foo',\n* \t\tstyle: {\n* \t\t\tbackgroundColor: 'yellow'\n* \t\t}\n* \t},\n* \ton: {\n* \t\tclick: bind.to( 'clicked' )\n* \t},\n* \tchildren: [\n* \t\t'A paragraph.'\n* \t]\n* } ).render();\n* ```\n*\n* and it will render the following HTML element:\n*\n* ```html\n* <p class=\"foo\" style=\"background-color: yellow;\">A paragraph.</p>\n* ```\n*\n* Additionally, the `observable` will always fire `clicked` upon clicking `<p>` in the DOM.\n*\n* See {@link module:ui/template~TemplateDefinition} to know more about templates and complex\n* template definitions.\n*/\nvar Template = class extends TemplateBase {\n\tns;\n\t/**\n\t* The tag (`tagName`) of this template, e.g. `div`. It also indicates that the template\n\t* renders to an HTML element.\n\t*/\n\ttag;\n\t/**\n\t* The text of the template. It also indicates that the template renders to a DOM text node.\n\t*/\n\ttext;\n\t/**\n\t* The attributes of the template, e.g. `{ id: [ 'ck-id' ] }`, corresponding with\n\t* the attributes of an HTML element.\n\t*\n\t* **Note**: This property only makes sense when {@link #tag} is defined.\n\t*/\n\tattributes;\n\t/**\n\t* The children of the template. They can be either:\n\t* * independent instances of {@link ~Template} (sub–templates),\n\t* * native DOM Nodes.\n\t*\n\t* **Note**: This property only makes sense when {@link #tag} is defined.\n\t*/\n\tchildren;\n\t/**\n\t* The DOM event listeners of the template.\n\t*/\n\teventListeners;\n\t/**\n\t* Indicates whether this particular Template instance has been\n\t* {@link #render rendered}.\n\t*/\n\t_isRendered;\n\t/**\n\t* The data used by the {@link #revert} method to restore a node to its original state.\n\t*\n\t* See: {@link #apply}.\n\t*/\n\t_revertData;\n\t/**\n\t* Creates an instance of the {@link ~Template} class.\n\t*\n\t* @param def The definition of the template.\n\t*/\n\tconstructor(def) {\n\t\tsuper();\n\t\tObject.assign(this, normalize(clone(def)));\n\t\tthis._isRendered = false;\n\t\tthis._revertData = null;\n\t}\n\t/**\n\t* Renders a DOM Node (an HTML element or text) out of the template.\n\t*\n\t* ```ts\n\t* const domNode = new Template( { ... } ).render();\n\t* ```\n\t*\n\t* See: {@link #apply}.\n\t*/\n\trender() {\n\t\tconst node = this._renderNode({ intoFragment: true });\n\t\tthis._isRendered = true;\n\t\treturn node;\n\t}\n\t/**\n\t* Applies the template to an existing DOM Node, either HTML element or text.\n\t*\n\t* **Note:** No new DOM nodes will be created. Applying extends:\n\t*\n\t* {@link module:ui/template~TemplateDefinition attributes},\n\t* {@link module:ui/template~TemplateDefinition event listeners}, and\n\t* `textContent` of {@link module:ui/template~TemplateDefinition children} only.\n\t*\n\t* **Note:** Existing `class` and `style` attributes are extended when a template\n\t* is applied to an HTML element, while other attributes and `textContent` are overridden.\n\t*\n\t* **Note:** The process of applying a template can be easily reverted using the\n\t* {@link module:ui/template~Template#revert} method.\n\t*\n\t* ```ts\n\t* const element = document.createElement( 'div' );\n\t* const observable = new Model( { divClass: 'my-div' } );\n\t* const emitter = Object.create( EmitterMixin );\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* new Template( {\n\t* \tattributes: {\n\t* \t\tid: 'first-div',\n\t* \t\tclass: bind.to( 'divClass' )\n\t* \t},\n\t* \ton: {\n\t* \t\tclick: bind( 'elementClicked' ) // Will be fired by the observable.\n\t* \t},\n\t* \tchildren: [\n\t* \t\t'Div text.'\n\t* \t]\n\t* } ).apply( element );\n\t*\n\t* console.log( element.outerHTML ); // -> '<div id=\"first-div\" class=\"my-div\"></div>'\n\t* ```\n\t*\n\t* @see module:ui/template~Template#render\n\t* @see module:ui/template~Template#revert\n\t* @param node Root node for the template to apply.\n\t*/\n\tapply(node) {\n\t\tthis._revertData = getEmptyRevertData();\n\t\tthis._renderNode({\n\t\t\tnode,\n\t\t\tintoFragment: false,\n\t\t\tisApplying: true,\n\t\t\trevertData: this._revertData\n\t\t});\n\t\treturn node;\n\t}\n\t/**\n\t* Reverts a template {@link module:ui/template~Template#apply applied} to a DOM node.\n\t*\n\t* @param node The root node for the template to revert. In most of the cases, it is the\n\t* same node used by {@link module:ui/template~Template#apply}.\n\t*/\n\trevert(node) {\n\t\tif (!this._revertData)\n /**\n\t\t* Attempting to revert a template which has not been applied yet.\n\t\t*\n\t\t* @error ui-template-revert-not-applied\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-template-revert-not-applied\", [this, node]);\n\t\tthis._revertTemplateFromNode(node, this._revertData);\n\t}\n\t/**\n\t* Returns an iterator which traverses the template in search of {@link module:ui/view~View}\n\t* instances and returns them one by one.\n\t*\n\t* ```ts\n\t* const viewFoo = new View();\n\t* const viewBar = new View();\n\t* const viewBaz = new View();\n\t* const template = new Template( {\n\t* \ttag: 'div',\n\t* \tchildren: [\n\t* \t\tviewFoo,\n\t* \t\t{\n\t* \t\t\ttag: 'div',\n\t* \t\t\tchildren: [\n\t* \t\t\t\tviewBar\n\t* \t\t\t]\n\t* \t\t},\n\t* \t\tviewBaz\n\t* \t]\n\t* } );\n\t*\n\t* // Logs: viewFoo, viewBar, viewBaz\n\t* for ( const view of template.getViews() ) {\n\t* \tconsole.log( view );\n\t* }\n\t* ```\n\t*/\n\t*getViews() {\n\t\tfunction* search(def) {\n\t\t\tif (def.children) {\n\t\t\t\tfor (const child of def.children) if (isView(child)) yield child;\n\t\t\t\telse if (isTemplate(child)) yield* search(child);\n\t\t\t}\n\t\t}\n\t\tyield* search(this);\n\t}\n\t/**\n\t* An entry point to the interface which binds DOM nodes to\n\t* {@link module:utils/observablemixin~Observable observables}.\n\t* There are two types of bindings:\n\t*\n\t* * HTML element attributes or text `textContent` synchronized with attributes of an\n\t* {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}\n\t* and {@link module:ui/template~BindChain#if}.\n\t*\n\t* ```ts\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* new Template( {\n\t* \tattributes: {\n\t* \t\t// Binds the element \"class\" attribute to observable#classAttribute.\n\t* \t\tclass: bind.to( 'classAttribute' )\n\t* \t}\n\t* } ).render();\n\t* ```\n\t*\n\t* * DOM events fired on HTML element propagated through\n\t* {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}.\n\t*\n\t* ```ts\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* new Template( {\n\t* \ton: {\n\t* \t\t// Will be fired by the observable.\n\t* \t\tclick: bind( 'elementClicked' )\n\t* \t}\n\t* } ).render();\n\t* ```\n\t*\n\t* Also see {@link module:ui/view~View#bindTemplate}.\n\t*\n\t* @param observable An observable which provides boundable attributes.\n\t* @param emitter An emitter that listens to observable attribute\n\t* changes or DOM Events (depending on the kind of the binding). Usually, a {@link module:ui/view~View} instance.\n\t*/\n\tstatic bind(observable, emitter) {\n\t\treturn {\n\t\t\tto(eventNameOrFunctionOrAttribute, callback) {\n\t\t\t\treturn new TemplateToBinding({\n\t\t\t\t\teventNameOrFunction: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tattribute: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tobservable,\n\t\t\t\t\temitter,\n\t\t\t\t\tcallback\n\t\t\t\t});\n\t\t\t},\n\t\t\tif(attribute, valueIfTrue, callback) {\n\t\t\t\treturn new TemplateIfBinding({\n\t\t\t\t\tobservable,\n\t\t\t\t\temitter,\n\t\t\t\t\tattribute,\n\t\t\t\t\tvalueIfTrue,\n\t\t\t\t\tcallback\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Extends an existing {@link module:ui/template~Template} instance with some additional content\n\t* from another {@link module:ui/template~TemplateDefinition}.\n\t*\n\t* ```ts\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* const template = new Template( {\n\t* \ttag: 'p',\n\t* \tattributes: {\n\t* \t\tclass: 'a',\n\t* \t\tdata-x: bind.to( 'foo' )\n\t* \t},\n\t* \tchildren: [\n\t* \t\t{\n\t* \t\t\ttag: 'span',\n\t* \t\t\tattributes: {\n\t* \t\t\t\tclass: 'b'\n\t* \t\t\t},\n\t* \t\t\tchildren: [\n\t* \t\t\t\t'Span'\n\t* \t\t\t]\n\t* \t\t}\n\t* \t]\n\t*  } );\n\t*\n\t* // Instance-level extension.\n\t* Template.extend( template, {\n\t* \tattributes: {\n\t* \t\tclass: 'b',\n\t* \t\tdata-x: bind.to( 'bar' )\n\t* \t},\n\t* \tchildren: [\n\t* \t\t{\n\t* \t\t\tattributes: {\n\t* \t\t\t\tclass: 'c'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t]\n\t* } );\n\t*\n\t* // Child extension.\n\t* Template.extend( template.children[ 0 ], {\n\t* \tattributes: {\n\t* \t\tclass: 'd'\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* the `outerHTML` of `template.render()` is:\n\t*\n\t* ```html\n\t* <p class=\"a b\" data-x=\"{ observable.foo } { observable.bar }\">\n\t* \t<span class=\"b c d\">Span</span>\n\t* </p>\n\t* ```\n\t*\n\t* @param template An existing template instance to be extended.\n\t* @param def Additional definition to be applied to a template.\n\t*/\n\tstatic extend(template, def) {\n\t\tif (template._isRendered)\n /**\n\t\t* Extending a template after rendering may not work as expected. To make sure\n\t\t* the {@link module:ui/template~Template.extend extending} works for an element,\n\t\t* make sure it happens before {@link module:ui/template~Template#render} is called.\n\t\t*\n\t\t* @error template-extend-render\n\t\t*/\n\t\tthrow new CKEditorError(\"template-extend-render\", [this, template]);\n\t\textendTemplate(template, normalize(clone(def)));\n\t}\n\t/**\n\t* Renders a DOM Node (either an HTML element or text) out of the template.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderNode(data) {\n\t\tlet isInvalid;\n\t\tif (data.node) isInvalid = this.tag && this.text;\n\t\telse isInvalid = this.tag ? this.text : !this.text;\n\t\tif (isInvalid)\n /**\n\t\t* Node definition cannot have the \"tag\" and \"text\" properties at the same time.\n\t\t* Node definition must have either \"tag\" or \"text\" when rendering a new Node.\n\t\t*\n\t\t* @error ui-template-wrong-syntax\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-template-wrong-syntax\", this);\n\t\tif (this.text) return this._renderText(data);\n\t\telse return this._renderElement(data);\n\t}\n\t/**\n\t* Renders an HTML element out of the template.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderElement(data) {\n\t\tlet node = data.node;\n\t\tif (!node) node = data.node = document.createElementNS(this.ns || xhtmlNs, this.tag);\n\t\tthis._renderAttributes(data);\n\t\tthis._renderElementChildren(data);\n\t\tthis._setUpListeners(data);\n\t\treturn node;\n\t}\n\t/**\n\t* Renders a text node out of {@link module:ui/template~Template#text}.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderText(data) {\n\t\tlet node = data.node;\n\t\tif (node) data.revertData.text = node.textContent;\n\t\telse node = data.node = document.createTextNode(\"\");\n\t\tif (hasTemplateBinding(this.text)) this._bindToObservable({\n\t\t\tschema: this.text,\n\t\t\tupdater: getTextUpdater(node),\n\t\t\tdata\n\t\t});\n\t\telse node.textContent = this.text.join(\"\");\n\t\treturn node;\n\t}\n\t/**\n\t* Renders HTML element attributes out of {@link module:ui/template~Template#attributes}.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderAttributes(data) {\n\t\tif (!this.attributes) return;\n\t\tconst node = data.node;\n\t\tconst revertData = data.revertData;\n\t\tfor (const attrName in this.attributes) {\n\t\t\tconst domAttrValue = node.getAttribute(attrName);\n\t\t\tconst attrValue = this.attributes[attrName];\n\t\t\tif (revertData) revertData.attributes[attrName] = domAttrValue;\n\t\t\tconst attrNs = isNamespaced(attrValue) ? attrValue[0].ns : null;\n\t\t\tif (hasTemplateBinding(attrValue)) {\n\t\t\t\tconst valueToBind = isNamespaced(attrValue) ? attrValue[0].value : attrValue;\n\t\t\t\tif (revertData && shouldExtend(attrName)) valueToBind.unshift(domAttrValue);\n\t\t\t\tthis._bindToObservable({\n\t\t\t\t\tschema: valueToBind,\n\t\t\t\t\tupdater: getAttributeUpdater(node, attrName, attrNs),\n\t\t\t\t\tdata\n\t\t\t\t});\n\t\t\t} else if (attrName == \"style\" && typeof attrValue[0] !== \"string\") this._renderStyleAttribute(attrValue[0], data);\n\t\t\telse {\n\t\t\t\tif (revertData && domAttrValue && shouldExtend(attrName)) attrValue.unshift(domAttrValue);\n\t\t\t\tconst value = attrValue.map((val) => val ? val.value || val : val).reduce((prev, next) => prev.concat(next), []).reduce(arrayValueReducer, \"\");\n\t\t\t\tif (!isFalsy(value)) node.setAttributeNS(attrNs, attrName, value);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Renders the `style` attribute of an HTML element based on\n\t* {@link module:ui/template~Template#attributes}.\n\t*\n\t* A style attribute is an object with static values:\n\t*\n\t* ```ts\n\t* attributes: {\n\t* \tstyle: {\n\t* \t\tcolor: 'red',\n\t* \t\t'--color': 'red'\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* or values bound to {@link module:ui/model~UIModel} properties:\n\t*\n\t* ```ts\n\t* attributes: {\n\t* \tstyle: {\n\t* \t\tcolor: bind.to( ... ),\n\t* \t\t'--color': bind.to( ... )\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* Note: The `style` attribute is rendered without setting the namespace. It does not seem to be\n\t* needed.\n\t*\n\t* @param styles Styles located in `attributes.style` of {@link module:ui/template~TemplateDefinition}.\n\t* @param data Rendering data.\n\t*/\n\t_renderStyleAttribute(styles, data) {\n\t\tconst node = data.node;\n\t\tfor (const styleName in styles) {\n\t\t\tconst styleValue = styles[styleName];\n\t\t\tif (hasTemplateBinding(styleValue)) this._bindToObservable({\n\t\t\t\tschema: [styleValue],\n\t\t\t\tupdater: getStyleUpdater(node, styleName),\n\t\t\t\tdata\n\t\t\t});\n\t\t\telse if (isCssVariable(styleName)) node.style.setProperty(styleName, styleValue);\n\t\t\telse node.style[styleName] = styleValue;\n\t\t}\n\t}\n\t/**\n\t* Recursively renders HTML element's children from {@link module:ui/template~Template#children}.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderElementChildren(data) {\n\t\tconst node = data.node;\n\t\tconst container = data.intoFragment ? document.createDocumentFragment() : node;\n\t\tconst isApplying = data.isApplying;\n\t\tlet childIndex = 0;\n\t\tfor (const child of this.children) if (isViewCollection(child)) {\n\t\t\tif (!isApplying) {\n\t\t\t\tchild.setParent(node);\n\t\t\t\tfor (const view of child) container.appendChild(view.element);\n\t\t\t}\n\t\t} else if (isView(child)) {\n\t\t\tif (!isApplying) {\n\t\t\t\tif (!child.isRendered) child.render();\n\t\t\t\tcontainer.appendChild(child.element);\n\t\t\t}\n\t\t} else if (isNode(child)) container.appendChild(child);\n\t\telse if (isApplying) {\n\t\t\tconst revertData = data.revertData;\n\t\t\tconst childRevertData = getEmptyRevertData();\n\t\t\trevertData.children.push(childRevertData);\n\t\t\tchild._renderNode({\n\t\t\t\tintoFragment: false,\n\t\t\t\tnode: container.childNodes[childIndex++],\n\t\t\t\tisApplying: true,\n\t\t\t\trevertData: childRevertData\n\t\t\t});\n\t\t} else container.appendChild(child.render());\n\t\tif (data.intoFragment) node.appendChild(container);\n\t}\n\t/**\n\t* Activates `on` event listeners from the {@link module:ui/template~TemplateDefinition}\n\t* on an HTML element.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_setUpListeners(data) {\n\t\tif (!this.eventListeners) return;\n\t\tfor (const key in this.eventListeners) {\n\t\t\tconst revertBindings = this.eventListeners[key].map((schemaItem) => {\n\t\t\t\tconst [domEvtName, domSelector] = key.split(\"@\");\n\t\t\t\treturn schemaItem.activateDomEventListener(domEvtName, domSelector, data);\n\t\t\t});\n\t\t\tif (data.revertData) data.revertData.bindings.push(revertBindings);\n\t\t}\n\t}\n\t/**\n\t* For a given {@link module:ui/template~TemplateValueSchema} containing {@link module:ui/template~TemplateBinding}\n\t* activates the binding and sets its initial value.\n\t*\n\t* Note: {@link module:ui/template~TemplateValueSchema} can be for HTML element attributes or\n\t* text node `textContent`.\n\t*\n\t* @param options Binding options.\n\t* @param options.updater A function which updates the DOM (like attribute or text).\n\t* @param options.data Rendering data.\n\t*/\n\t_bindToObservable({ schema, updater, data }) {\n\t\tconst revertData = data.revertData;\n\t\tsyncValueSchemaValue(schema, updater, data);\n\t\tconst revertBindings = schema.filter((item) => !isFalsy(item)).filter((item) => item.observable).map((templateBinding) => templateBinding.activateAttributeListener(schema, updater, data));\n\t\tif (revertData) revertData.bindings.push(revertBindings);\n\t}\n\t/**\n\t* Reverts {@link module:ui/template~RenderData#revertData template data} from a node to\n\t* return it to the original state.\n\t*\n\t* @param node A node to be reverted.\n\t* @param revertData An object that stores information about what changes have been made by\n\t* {@link #apply} to the node. See {@link module:ui/template~RenderData#revertData} for more information.\n\t*/\n\t_revertTemplateFromNode(node, revertData) {\n\t\tfor (const binding of revertData.bindings) for (const revertBinding of binding) revertBinding();\n\t\tif (revertData.text) {\n\t\t\tnode.textContent = revertData.text;\n\t\t\treturn;\n\t\t}\n\t\tconst element = node;\n\t\tfor (const attrName in revertData.attributes) {\n\t\t\tconst attrValue = revertData.attributes[attrName];\n\t\t\tif (attrValue === null) element.removeAttribute(attrName);\n\t\t\telse element.setAttribute(attrName, attrValue);\n\t\t}\n\t\tfor (let i = 0; i < revertData.children.length; ++i) this._revertTemplateFromNode(element.childNodes[i], revertData.children[i]);\n\t}\n};\n/**\n* Describes a binding created by the {@link module:ui/template~Template.bind} interface.\n*\n* @internal\n*/\nvar TemplateBinding = class {\n\t/**\n\t* The name of the {@link module:ui/template~TemplateBinding#observable observed attribute}.\n\t*/\n\tattribute;\n\t/**\n\t* An observable instance of the binding. It either:\n\t*\n\t* * provides the attribute with the value,\n\t* * or passes the event when a corresponding DOM event is fired.\n\t*/\n\tobservable;\n\t/**\n\t* An {@link module:utils/emittermixin~Emitter} used by the binding to:\n\t*\n\t* * listen to the attribute change in the {@link module:ui/template~TemplateBinding#observable},\n\t* * or listen to the event in the DOM.\n\t*/\n\temitter;\n\t/**\n\t* A custom function to process the value of the {@link module:ui/template~TemplateBinding#attribute}.\n\t*/\n\tcallback;\n\t/**\n\t* Creates an instance of the {@link module:ui/template~TemplateBinding} class.\n\t*\n\t* @param def The definition of the binding.\n\t*/\n\tconstructor(def) {\n\t\tthis.attribute = def.attribute;\n\t\tthis.observable = def.observable;\n\t\tthis.emitter = def.emitter;\n\t\tthis.callback = def.callback;\n\t}\n\t/**\n\t* Returns the value of the binding. It is the value of the {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable}. The value may be processed by the\n\t* {@link module:ui/template~TemplateBinding#callback}, if such has been passed to the binding.\n\t*\n\t* @param node A native DOM node, passed to the custom {@link module:ui/template~TemplateBinding#callback}.\n\t* @returns The value of {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable}.\n\t*/\n\tgetValue(node) {\n\t\tconst value = this.observable[this.attribute];\n\t\treturn this.callback ? this.callback(value, node) : value;\n\t}\n\t/**\n\t* Activates the listener which waits for changes of the {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable}, then updates the DOM with the aggregated\n\t* value of {@link module:ui/template~TemplateValueSchema}.\n\t*\n\t* @param schema A full schema to generate an attribute or text in the DOM.\n\t* @param updater A DOM updater function used to update the native DOM attribute or text.\n\t* @param data Rendering data.\n\t* @returns A function to sever the listener binding.\n\t*/\n\tactivateAttributeListener(schema, updater, data) {\n\t\tconst callback = () => syncValueSchemaValue(schema, updater, data);\n\t\tthis.emitter.listenTo(this.observable, `change:${this.attribute}`, callback);\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening(this.observable, `change:${this.attribute}`, callback);\n\t\t};\n\t}\n};\n/**\n* Describes either:\n*\n* * a binding to an {@link module:utils/observablemixin~Observable},\n* * or a native DOM event binding.\n*\n* It is created by the {@link module:ui/template~BindChain#to} method.\n*\n* @internal\n*/\nvar TemplateToBinding = class extends TemplateBinding {\n\teventNameOrFunction;\n\tconstructor(def) {\n\t\tsuper(def);\n\t\tthis.eventNameOrFunction = def.eventNameOrFunction;\n\t}\n\t/**\n\t* Activates the listener for the native DOM event, which when fired, is propagated by\n\t* the {@link module:ui/template~TemplateBinding#emitter}.\n\t*\n\t* @param domEvtName The name of the native DOM event.\n\t* @param domSelector The selector in the DOM to filter delegated events.\n\t* @param data Rendering data.\n\t* @returns A function to sever the listener binding.\n\t*/\n\tactivateDomEventListener(domEvtName, domSelector, data) {\n\t\tconst callback = (evt, domEvt) => {\n\t\t\tif (!domSelector || domEvt.target.matches(domSelector)) {\n\t\t\t\tif (typeof this.eventNameOrFunction == \"function\") this.eventNameOrFunction(domEvt);\n\t\t\t\telse this.observable.fire(this.eventNameOrFunction, domEvt);\n\t\t\t}\n\t\t};\n\t\tthis.emitter.listenTo(data.node, domEvtName, callback);\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening(data.node, domEvtName, callback);\n\t\t};\n\t}\n};\n/**\n* Describes a binding to {@link module:utils/observablemixin~Observable} created by the {@link module:ui/template~BindChain#if}\n* method.\n*\n* @internal\n*/\nvar TemplateIfBinding = class extends TemplateBinding {\n\t/**\n\t* The value of the DOM attribute or text to be set if the {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable} is `true`.\n\t*/\n\tvalueIfTrue;\n\tconstructor(def) {\n\t\tsuper(def);\n\t\tthis.valueIfTrue = def.valueIfTrue;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tgetValue(node) {\n\t\treturn isFalsy(super.getValue(node)) ? false : this.valueIfTrue || true;\n\t}\n};\n/**\n* Checks whether given {@link module:ui/template~TemplateValueSchema} contains a\n* {@link module:ui/template~TemplateBinding}.\n*/\nfunction hasTemplateBinding(schema) {\n\tif (!schema) return false;\n\tif (schema.value) schema = schema.value;\n\tif (Array.isArray(schema)) return schema.some(hasTemplateBinding);\n\telse if (schema instanceof TemplateBinding) return true;\n\treturn false;\n}\n/**\n* Checks whether the given name is a valid CSS variable name.\n*\n* A valid CSS variable name starts with two dashes (`--`), followed by a letter, underscore (`_`),\n* or dash (`-`), and can be followed by any combination of letters, digits, underscores, dashes,\n* or additional dashes.\n*\n* @param name The name to validate as a CSS variable.\n* @returns True if the name is a valid CSS variable, false otherwise.\n*/\nfunction isCssVariable(name) {\n\treturn /^--[a-zA-Z_-][\\w-]*$/.test(name);\n}\n/**\n* Assembles the value using {@link module:ui/template~TemplateValueSchema} and stores it in a form of\n* an Array. Each entry of the Array corresponds to one of {@link module:ui/template~TemplateValueSchema}\n* items.\n*\n* @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n*/\nfunction getValueSchemaValue(schema, node) {\n\treturn schema.map((schemaItem) => {\n\t\tif (schemaItem instanceof TemplateBinding) return schemaItem.getValue(node);\n\t\treturn schemaItem;\n\t});\n}\n/**\n* A function executed each time the bound Observable attribute changes, which updates the DOM with a value\n* constructed from {@link module:ui/template~TemplateValueSchema}.\n*\n* @param updater A function which updates the DOM (like attribute or text).\n* @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n*/\nfunction syncValueSchemaValue(schema, updater, { node }) {\n\tconst values = getValueSchemaValue(schema, node);\n\tlet value;\n\tif (schema.length == 1 && schema[0] instanceof TemplateIfBinding) value = values[0];\n\telse value = values.reduce(arrayValueReducer, \"\");\n\tif (isFalsy(value)) updater.remove();\n\telse updater.set(value);\n}\n/**\n* Returns an object consisting of `set` and `remove` functions, which\n* can be used in the context of DOM Node to set or reset `textContent`.\n* @see module:ui/view~View#_bindToObservable\n*\n* @param node DOM Node to be modified.\n*/\nfunction getTextUpdater(node) {\n\treturn {\n\t\tset(value) {\n\t\t\tnode.textContent = value;\n\t\t},\n\t\tremove() {\n\t\t\tnode.textContent = \"\";\n\t\t}\n\t};\n}\n/**\n* Returns an object consisting of `set` and `remove` functions, which\n* can be used in the context of DOM Node to set or reset an attribute.\n* @see module:ui/view~View#_bindToObservable\n*\n* @param el DOM Node to be modified.\n* @param attrName Name of the attribute to be modified.\n* @param ns Namespace to use.\n*/\nfunction getAttributeUpdater(el, attrName, ns) {\n\treturn {\n\t\tset(value) {\n\t\t\tel.setAttributeNS(ns, attrName, value);\n\t\t},\n\t\tremove() {\n\t\t\tel.removeAttributeNS(ns, attrName);\n\t\t}\n\t};\n}\n/**\n* Returns an object consisting of `set` and `remove` functions, which\n* can be used in the context of CSSStyleDeclaration to set or remove a style.\n* @see module:ui/view~View#_bindToObservable\n*\n* @param el DOM Node to be modified.\n* @param styleName Name of the style to be modified.\n*/\nfunction getStyleUpdater(el, styleName) {\n\treturn {\n\t\tset(value) {\n\t\t\tif (isCssVariable(styleName)) el.style.setProperty(styleName, value);\n\t\t\telse el.style[styleName] = value;\n\t\t},\n\t\tremove() {\n\t\t\tif (isCssVariable(styleName)) el.style.removeProperty(styleName);\n\t\t\telse el.style[styleName] = null;\n\t\t}\n\t};\n}\n/**\n* Clones definition of the template.\n*/\nfunction clone(def) {\n\treturn cloneDeepWith(def, (value) => {\n\t\tif (value && (value instanceof TemplateBinding || isTemplate(value) || isView(value) || isViewCollection(value))) return value;\n\t});\n}\n/**\n* Normalizes given {@link module:ui/template~TemplateDefinition}.\n*\n* See:\n*  * {@link normalizeAttributes}\n*  * {@link normalizeListeners}\n*  * {@link normalizePlainTextDefinition}\n*  * {@link normalizeTextDefinition}\n*\n* @param def A template definition.\n* @returns Normalized definition.\n*/\nfunction normalize(def) {\n\tif (typeof def == \"string\") def = normalizePlainTextDefinition(def);\n\telse if (def.text) normalizeTextDefinition(def);\n\tif (def.on) {\n\t\tdef.eventListeners = normalizeListeners(def.on);\n\t\tdelete def.on;\n\t}\n\tif (!def.text) {\n\t\tif (def.attributes) normalizeAttributes(def.attributes);\n\t\tconst children = [];\n\t\tif (def.children) {\n\t\t\tif (isViewCollection(def.children)) children.push(def.children);\n\t\t\telse for (const child of def.children) if (isTemplate(child) || isView(child) || isNode(child)) children.push(child);\n\t\t\telse children.push(new Template(child));\n\t\t}\n\t\tdef.children = children;\n\t}\n\treturn def;\n}\n/**\n* Normalizes \"attributes\" section of {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* attributes: {\n* \ta: 'bar',\n* \tb: {@link module:ui/template~TemplateBinding},\n* \tc: {\n* \t\tvalue: 'bar'\n* \t}\n* }\n* ```\n*\n* becomes\n*\n* ```\n* attributes: {\n* \ta: [ 'bar' ],\n* \tb: [ {@link module:ui/template~TemplateBinding} ],\n* \tc: {\n* \t\tvalue: [ 'bar' ]\n* \t}\n* }\n* ```\n*/\nfunction normalizeAttributes(attributes) {\n\tfor (const a in attributes) {\n\t\tif (attributes[a].value) attributes[a].value = toArray(attributes[a].value);\n\t\tarrayify(attributes, a);\n\t}\n}\n/**\n* Normalizes \"on\" section of {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* on: {\n* \ta: 'bar',\n* \tb: {@link module:ui/template~TemplateBinding},\n* \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n* }\n* ```\n*\n* becomes\n*\n* ```\n* on: {\n* \ta: [ 'bar' ],\n* \tb: [ {@link module:ui/template~TemplateBinding} ],\n* \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n* }\n* ```\n*\n* @returns Object containing normalized listeners.\n*/\nfunction normalizeListeners(listeners) {\n\tfor (const l in listeners) arrayify(listeners, l);\n\treturn listeners;\n}\n/**\n* Normalizes \"string\" {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* \"foo\"\n* ```\n*\n* becomes\n*\n* ```\n* { text: [ 'foo' ] },\n* ```\n*\n* @returns Normalized template definition.\n*/\nfunction normalizePlainTextDefinition(def) {\n\treturn { text: [def] };\n}\n/**\n* Normalizes text {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* children: [\n* \t{ text: 'def' },\n* \t{ text: {@link module:ui/template~TemplateBinding} }\n* ]\n* ```\n*\n* becomes\n*\n* ```\n* children: [\n* \t{ text: [ 'def' ] },\n* \t{ text: [ {@link module:ui/template~TemplateBinding} ] }\n* ]\n* ```\n*/\nfunction normalizeTextDefinition(def) {\n\tdef.text = toArray(def.text);\n}\n/**\n* Wraps an entry in Object in an Array, if not already one.\n*\n* ```\n* {\n* \tx: 'y',\n* \ta: [ 'b' ]\n* }\n* ```\n*\n* becomes\n*\n* ```\n* {\n* \tx: [ 'y' ],\n* \ta: [ 'b' ]\n* }\n* ```\n*/\nfunction arrayify(obj, key) {\n\tobj[key] = toArray(obj[key]);\n}\n/**\n* A helper which concatenates the value avoiding unwanted\n* leading white spaces.\n*/\nfunction arrayValueReducer(prev, cur) {\n\tif (isFalsy(cur)) return prev;\n\telse if (isFalsy(prev)) return cur;\n\telse return `${prev} ${cur}`;\n}\n/**\n* Extends one object defined in the following format:\n*\n* ```\n* {\n* \tkey1: [Array1],\n* \tkey2: [Array2],\n* \t...\n* \tkeyN: [ArrayN]\n* }\n* ```\n*\n* with another object of the same data format.\n*\n* @param obj Base object.\n* @param ext Object extending base.\n*/\nfunction extendObjectValueArray(obj, ext) {\n\tfor (const a in ext) if (obj[a]) obj[a].push(...ext[a]);\n\telse obj[a] = ext[a];\n}\n/**\n* A helper for {@link module:ui/template~Template#extend}. Recursively extends {@link module:ui/template~Template} instance\n* with content from {@link module:ui/template~TemplateDefinition}. See {@link module:ui/template~Template#extend} to learn more.\n*\n* @param def A template instance to be extended.\n* @param def A definition which is to extend the template instance.\n* @param Error context.\n*/\nfunction extendTemplate(template, def) {\n\tif (def.attributes) {\n\t\tif (!template.attributes) template.attributes = {};\n\t\textendObjectValueArray(template.attributes, def.attributes);\n\t}\n\tif (def.eventListeners) {\n\t\tif (!template.eventListeners) template.eventListeners = {};\n\t\textendObjectValueArray(template.eventListeners, def.eventListeners);\n\t}\n\tif (def.text) template.text.push(...def.text);\n\tif (def.children && def.children.length) {\n\t\tif (template.children.length != def.children.length)\n /**\n\t\t* The number of children in extended definition does not match.\n\t\t*\n\t\t* @error ui-template-extend-children-mismatch\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-template-extend-children-mismatch\", template);\n\t\tlet childIndex = 0;\n\t\tfor (const childDef of def.children) extendTemplate(template.children[childIndex++], childDef);\n\t}\n}\n/**\n* Checks if value is \"falsy\".\n* Note: 0 (Number) is not \"falsy\" in this context.\n*\n* @param value Value to be checked.\n*/\nfunction isFalsy(value) {\n\treturn !value && value !== 0;\n}\n/**\n* Checks if the item is an instance of {@link module:ui/view~View}\n*\n* @param value Value to be checked.\n*/\nfunction isView(item) {\n\treturn item instanceof View;\n}\n/**\n* Checks if the item is an instance of {@link module:ui/template~Template}\n*\n* @param value Value to be checked.\n*/\nfunction isTemplate(item) {\n\treturn item instanceof Template;\n}\n/**\n* Checks if the item is an instance of {@link module:ui/viewcollection~ViewCollection}\n*\n* @param value Value to be checked.\n*/\nfunction isViewCollection(item) {\n\treturn item instanceof ViewCollection;\n}\n/**\n* Checks if value array contains the one with namespace.\n*/\nfunction isNamespaced(attrValue) {\n\treturn isObject(attrValue[0]) && attrValue[0].ns;\n}\n/**\n* Creates an empty skeleton for {@link module:ui/template~Template#revert}\n* data.\n*/\nfunction getEmptyRevertData() {\n\treturn {\n\t\tchildren: [],\n\t\tbindings: [],\n\t\tattributes: {}\n\t};\n}\n/**\n* Checks whether an attribute should be extended when\n* {@link module:ui/template~Template#apply} is called.\n*\n* @param attrName Attribute name to check.\n*/\nfunction shouldExtend(attrName) {\n\treturn attrName == \"class\" || attrName == \"style\";\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 ui/view\n*/\nconst ViewBase = /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin());\n/**\n* The basic view class, which represents an HTML element created out of a\n* {@link module:ui/view~View#template}. Views are building blocks of the user interface and handle\n* interaction\n*\n* Views {@link module:ui/view~View#registerChild aggregate} children in\n* {@link module:ui/view~View#createCollection collections} and manage the life cycle of DOM\n* listeners e.g. by handling rendering and destruction.\n*\n* See the {@link module:ui/template~TemplateDefinition} syntax to learn more about shaping view\n* elements, attributes and listeners.\n*\n* ```ts\n* class SampleView extends View {\n* \tconstructor( locale ) {\n* \t\tsuper( locale );\n*\n* \t\tconst bind = this.bindTemplate;\n*\n* \t\t// Views define their interface (state) using observable attributes.\n* \t\tthis.set( 'elementClass', 'bar' );\n*\n* \t\tthis.setTemplate( {\n* \t\t\ttag: 'p',\n*\n* \t\t\t// The element of the view can be defined with its children.\n* \t\t\tchildren: [\n* \t\t\t\t'Hello',\n* \t\t\t\t{\n* \t\t\t\t\ttag: 'b',\n* \t\t\t\t\tchildren: [ 'world!' ]\n* \t\t\t\t}\n* \t\t\t],\n* \t\t\tattributes: {\n* \t\t\t\tclass: [\n* \t\t\t\t\t'foo',\n*\n* \t\t\t\t\t// Observable attributes control the state of the view in DOM.\n* \t\t\t\t\tbind.to( 'elementClass' )\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\ton: {\n* \t\t\t\t// Views listen to DOM events and propagate them.\n* \t\t\t\tclick: bind.to( 'clicked' )\n* \t\t\t}\n* \t\t} );\n* \t}\n* }\n*\n* const view = new SampleView( locale );\n*\n* view.render();\n*\n* // Append <p class=\"foo bar\">Hello<b>world</b></p> to the <body>\n* document.body.appendChild( view.element );\n*\n* // Change the class attribute to <p class=\"foo baz\">Hello<b>world</b></p>\n* view.elementClass = 'baz';\n*\n* // Respond to the \"click\" event in DOM by executing a custom action.\n* view.on( 'clicked', () => {\n* \tconsole.log( 'The view has been clicked!' );\n* } );\n* ```\n*\n* @property {TElement | null} element An HTML element of the view. `null` until {@link module:ui/view~View#render rendered}\n* from the {@link module:ui/view~View#template template}. The class-level example above illustrates typical usage. The\n* full description, fenced examples, and assignment note are in the block comment immediately above the `element` field\n* in the source.\n*/\nvar View = class extends ViewBase {\n\telement;\n\t/**\n\t* Set `true` when the view has already been {@link module:ui/view~View#render rendered}.\n\t*\n\t* @readonly\n\t*/\n\tisRendered;\n\t/**\n\t* A set of tools to localize the user interface.\n\t*\n\t* Also see {@link module:core/editor/editor~Editor#locale}.\n\t*\n\t* @readonly\n\t*/\n\tlocale;\n\t/**\n\t* Shorthand for {@link module:utils/locale~Locale#t}.\n\t*\n\t* Note: If {@link #locale} instance hasn't been passed to the view this method may not\n\t* be available.\n\t*\n\t* @see module:utils/locale~Locale#t\n\t*/\n\tt;\n\t/**\n\t* Template of this view. It provides the {@link #element} representing\n\t* the view in DOM, which is {@link #render rendered}.\n\t*/\n\ttemplate;\n\t/**\n\t* Collections registered with {@link #createCollection}.\n\t*/\n\t_viewCollections;\n\t/**\n\t* A collection of view instances, which have been added directly\n\t* into the {@link module:ui/template~Template#children}.\n\t*/\n\t_unboundChildren;\n\t/**\n\t* Cached {@link module:ui/template~BindChain bind chain} object created by the\n\t* {@link #template}. See {@link #bindTemplate}.\n\t*/\n\t_bindTemplate;\n\t/**\n\t* Creates an instance of the {@link module:ui/view~View} class.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper();\n\t\tthis.element = null;\n\t\tthis.isRendered = false;\n\t\tthis.locale = locale;\n\t\tthis.t = locale && locale.t;\n\t\tthis._viewCollections = new Collection();\n\t\tthis._unboundChildren = this.createCollection();\n\t\tthis._viewCollections.on(\"add\", (evt, collection) => {\n\t\t\tcollection.locale = locale;\n\t\t\tcollection.t = locale && locale.t;\n\t\t});\n\t\tthis.decorate(\"render\");\n\t}\n\t/**\n\t* Shorthand for {@link module:ui/template~Template.bind}, a binding\n\t* {@link module:ui/template~BindChain interface} pre–configured for the view instance.\n\t*\n\t* It provides {@link module:ui/template~BindChain#to `to()`} and\n\t* {@link module:ui/template~BindChain#if `if()`} methods that initialize bindings with\n\t* observable attributes and attach DOM listeners.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tconst bind = this.bindTemplate;\n\t*\n\t* \t\t// These {@link module:utils/observablemixin~Observable observable} attributes will control\n\t* \t\t// the state of the view in DOM.\n\t* \t\tthis.set( {\n\t* \t\t\telementClass: 'foo',\n\t* \t\t \tisEnabled: true\n\t* \t\t } );\n\t*\n\t* \t\tthis.setTemplate( {\n\t* \t\t\ttag: 'p',\n\t*\n\t* \t\t\tattributes: {\n\t* \t\t\t\t// The class HTML attribute will follow elementClass\n\t* \t\t\t\t// and isEnabled view attributes.\n\t* \t\t\t\tclass: [\n\t* \t\t\t\t\tbind.to( 'elementClass' )\n\t* \t\t\t\t\tbind.if( 'isEnabled', 'present-when-enabled' )\n\t* \t\t\t\t]\n\t* \t\t\t},\n\t*\n\t* \t\t\ton: {\n\t* \t\t\t\t// The view will fire the \"clicked\" event upon clicking <p> in DOM.\n\t* \t\t\t\tclick: bind.to( 'clicked' )\n\t* \t\t\t}\n\t* \t\t} );\n\t* \t}\n\t* }\n\t* ```\n\t*/\n\tget bindTemplate() {\n\t\tif (this._bindTemplate) return this._bindTemplate;\n\t\treturn this._bindTemplate = Template.bind(this, this);\n\t}\n\t/**\n\t* Creates a new collection of views, which can be used as\n\t* {@link module:ui/template~Template#children} of this view.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tconst child = new ChildView( locale );\n\t* \t\tthis.items = this.createCollection( [ child ] );\n\t*\n\t* \t\tthis.setTemplate( {\n\t* \t\t\ttag: 'p',\n\t*\n\t* \t\t\t// `items` collection will render here.\n\t* \t\t\tchildren: this.items\n\t* \t\t} );\n\t* \t}\n\t* }\n\t*\n\t* const view = new SampleView( locale );\n\t* view.render();\n\t*\n\t* // It will append <p><child#element></p> to the <body>.\n\t* document.body.appendChild( view.element );\n\t* ```\n\t*\n\t* @param views Initial views of the collection.\n\t* @returns A new collection of view instances.\n\t*/\n\tcreateCollection(views) {\n\t\tconst collection = new ViewCollection(views);\n\t\tthis._viewCollections.add(collection);\n\t\treturn collection;\n\t}\n\t/**\n\t* Registers a new child view under the view instance. Once registered, a child\n\t* view is managed by its parent, including {@link #render rendering}\n\t* and {@link #destroy destruction}.\n\t*\n\t* To revert this, use {@link #deregisterChild}.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tthis.childA = new SomeChildView( locale );\n\t* \t\tthis.childB = new SomeChildView( locale );\n\t*\n\t* \t\tthis.setTemplate( { tag: 'p' } );\n\t*\n\t* \t\t// Register the children.\n\t* \t\tthis.registerChild( [ this.childA, this.childB ] );\n\t* \t}\n\t*\n\t* \trender() {\n\t* \t\tsuper.render();\n\t*\n\t* \t\tthis.element.appendChild( this.childA.element );\n\t* \t\tthis.element.appendChild( this.childB.element );\n\t* \t}\n\t* }\n\t*\n\t* const view = new SampleView( locale );\n\t*\n\t* view.render();\n\t*\n\t* // Will append <p><childA#element><b></b><childB#element></p>.\n\t* document.body.appendChild( view.element );\n\t* ```\n\t*\n\t* **Note**: There's no need to add child views if they're already referenced in the\n\t* {@link #template}:\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tthis.childA = new SomeChildView( locale );\n\t* \t\tthis.childB = new SomeChildView( locale );\n\t*\n\t* \t\tthis.setTemplate( {\n\t* \t\t\ttag: 'p',\n\t*\n\t* \t\t\t// These children will be added automatically. There's no\n\t* \t\t\t// need to call {@link #registerChild} for any of them.\n\t* \t\t\tchildren: [ this.childA, this.childB ]\n\t* \t\t} );\n\t* \t}\n\t*\n\t* \t// ...\n\t* }\n\t* ```\n\t*\n\t* @param children Children views to be registered.\n\t*/\n\tregisterChild(children) {\n\t\tif (!isIterable(children)) children = [children];\n\t\tfor (const child of children) this._unboundChildren.add(child);\n\t}\n\t/**\n\t* The opposite of {@link #registerChild}. Removes a child view from this view instance.\n\t* Once removed, the child is no longer managed by its parent, e.g. it can safely\n\t* become a child of another parent view.\n\t*\n\t* @see #registerChild\n\t* @param children Child views to be removed.\n\t*/\n\tderegisterChild(children) {\n\t\tif (!isIterable(children)) children = [children];\n\t\tfor (const child of children) this._unboundChildren.remove(child);\n\t}\n\t/**\n\t* Sets the {@link #template} of the view with with given definition.\n\t*\n\t* A shorthand for:\n\t*\n\t* ```ts\n\t* view.setTemplate( definition );\n\t* ```\n\t*\n\t* @param definition Definition of view's template.\n\t*/\n\tsetTemplate(definition) {\n\t\tthis.template = new Template(definition);\n\t}\n\t/**\n\t* {@link module:ui/template~Template.extend Extends} the {@link #template} of the view with\n\t* with given definition.\n\t*\n\t* A shorthand for:\n\t*\n\t* ```ts\n\t* Template.extend( view.template, definition );\n\t* ```\n\t*\n\t* **Note**: Is requires the {@link #template} to be already set. See {@link #setTemplate}.\n\t*\n\t* @param definition Definition which extends the {@link #template}.\n\t*/\n\textendTemplate(definition) {\n\t\tTemplate.extend(this.template, definition);\n\t}\n\t/**\n\t* Recursively renders the view.\n\t*\n\t* Once the view is rendered:\n\t* * the {@link #element} becomes an HTML element out of {@link #template},\n\t* * the {@link #isRendered} flag is set `true`.\n\t*\n\t* **Note**: The children of the view:\n\t* * defined directly in the {@link #template}\n\t* * residing in collections created by the {@link #createCollection} method,\n\t* * and added by {@link #registerChild}\n\t* are also rendered in the process.\n\t*\n\t* In general, `render()` method is the right place to keep the code which refers to the\n\t* {@link #element} and should be executed at the very beginning of the view's life cycle.\n\t*\n\t* It is possible to {@link module:ui/template~Template.extend} the {@link #template} before\n\t* the view is rendered. To allow an early customization of the view (e.g. by its parent),\n\t* such references should be done in `render()`.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor() {\n\t* \t\tthis.setTemplate( {\n\t* \t\t\t// ...\n\t* \t\t} );\n\t* \t},\n\t*\n\t* \trender() {\n\t* \t\t// View#element becomes available.\n\t* \t\tsuper.render();\n\t*\n\t* \t\t// The \"scroll\" listener depends on #element.\n\t* \t\tthis.listenTo( window, 'scroll', () => {\n\t* \t\t\t// A reference to #element would render the #template and make it non-extendable.\n\t* \t\t\tif ( window.scrollY > 0 ) {\n\t* \t\t\t\tthis.element.scrollLeft = 100;\n\t* \t\t\t} else {\n\t* \t\t\t\tthis.element.scrollLeft = 0;\n\t* \t\t\t}\n\t* \t\t} );\n\t* \t}\n\t* }\n\t*\n\t* const view = new SampleView();\n\t*\n\t* // Let's customize the view before it gets rendered.\n\t* view.extendTemplate( {\n\t* \tattributes: {\n\t* \t\tclass: [\n\t* \t\t\t'additional-class'\n\t* \t\t]\n\t* \t}\n\t* } );\n\t*\n\t* // Late rendering allows customization of the view.\n\t* view.render();\n\t* ```\n\t*/\n\trender() {\n\t\tif (this.isRendered)\n /**\n\t\t* This View has already been rendered.\n\t\t*\n\t\t* @error ui-view-render-already-rendered\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-view-render-already-rendered\", this);\n\t\tif (this.template) {\n\t\t\tthis.element = this.template.render();\n\t\t\tthis.registerChild(this.template.getViews());\n\t\t}\n\t\tthis.isRendered = true;\n\t}\n\t/**\n\t* Recursively destroys the view instance and child views added by {@link #registerChild} and\n\t* residing in collections created by the {@link #createCollection}.\n\t*\n\t* Destruction disables all event listeners:\n\t* * created on the view, e.g. `view.on( 'event', () => {} )`,\n\t* * defined in the {@link #template} for DOM events.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t\tthis._viewCollections.map((c) => c.destroy());\n\t\tif (this.template && this.template._revertData) this.template.revert(this.element);\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* The politeness level of an `aria-live` announcement.\n*\n* Available keys are:\n* * `AriaLiveAnnouncerPoliteness.POLITE`,\n* * `AriaLiveAnnouncerPoliteness.ASSERTIVE`\n*\n* [Learn more](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Politeness_levels).\n*/\nconst AriaLiveAnnouncerPoliteness = {\n\tPOLITE: \"polite\",\n\tASSERTIVE: \"assertive\"\n};\n/**\n* An accessibility helper that manages all ARIA live regions associated with an editor instance. ARIA live regions announce changes\n* to the state of the editor features.\n*\n* These announcements are consumed and propagated by screen readers and give users a better understanding of the current\n* state of the editor.\n*\n* To announce a state change to an editor use the {@link #announce} method:\n*\n* ```ts\n* editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );\n* ```\n*/\nvar AriaLiveAnnouncer = class {\n\t/**\n\t* The editor instance.\n\t*/\n\teditor;\n\t/**\n\t* The view that aggregates all `aria-live` regions.\n\t*/\n\tview;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t\t/**\n\t\t* Some screen readers only look at changes in the aria-live region.\n\t\t* They might not read a region that already has content when it is added.\n\t\t* To stop this problem, make sure to set up regions for all politeness settings when the editor starts.\n\t\t*/\n\t\teditor.once(\"ready\", () => {\n\t\t\tfor (const politeness of Object.values(AriaLiveAnnouncerPoliteness)) this.announce(\"\", politeness);\n\t\t});\n\t}\n\t/**\n\t* Sets an announcement text to an aria region that is then announced by a screen reader to the user.\n\t*\n\t* If the aria region of a specified politeness does not exist, it will be created and can be re-used later.\n\t*\n\t* The default announcement politeness level is `'polite'`.\n\t*\n\t* ```ts\n\t* // Most screen readers will queue announcements from multiple aria-live regions and read them out in the order they were emitted.\n\t* editor.ui.ariaLiveAnnouncer.announce( 'Image uploaded.' );\n\t* editor.ui.ariaLiveAnnouncer.announce( 'Connection lost. Reconnecting.' );\n\t* ```\n\t*/\n\tannounce(announcement, attributes = AriaLiveAnnouncerPoliteness.POLITE) {\n\t\tconst editor = this.editor;\n\t\tif (!editor.ui.view) return;\n\t\tif (!this.view) {\n\t\t\tthis.view = new AriaLiveAnnouncerView(editor.locale);\n\t\t\teditor.ui.view.body.add(this.view);\n\t\t}\n\t\tconst { politeness, isUnsafeHTML } = typeof attributes === \"string\" ? { politeness: attributes } : attributes;\n\t\tlet politenessRegionView = this.view.regionViews.find((view) => view.politeness === politeness);\n\t\tif (!politenessRegionView) {\n\t\t\tpolitenessRegionView = new AriaLiveAnnouncerRegionView(editor, politeness);\n\t\t\tthis.view.regionViews.add(politenessRegionView);\n\t\t}\n\t\tpolitenessRegionView.announce({\n\t\t\tannouncement,\n\t\t\tisUnsafeHTML\n\t\t});\n\t}\n};\n/**\n* The view that aggregates all `aria-live` regions.\n*/\nvar AriaLiveAnnouncerView = class extends View {\n\t/**\n\t* A collection of all views that represent individual `aria-live` regions.\n\t*/\n\tregionViews;\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.regionViews = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-aria-live-announcer\"] },\n\t\t\tchildren: this.regionViews\n\t\t});\n\t}\n};\n/**\n* The view that represents a single `aria-live`.\n*/\nvar AriaLiveAnnouncerRegionView = class extends View {\n\t/**\n\t* Current politeness level of the region.\n\t*/\n\tpoliteness;\n\t/**\n\t* DOM converter used to sanitize unsafe HTML passed to {@link #announce} method.\n\t*/\n\t_domConverter;\n\t/**\n\t* Interval used to remove additions. It prevents accumulation of added nodes in region.\n\t*/\n\t_pruneAnnouncementsInterval;\n\tconstructor(editor, politeness) {\n\t\tsuper(editor.locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\t\"aria-live\": politeness,\n\t\t\t\t\"aria-relevant\": \"additions\"\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"ul\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-aria-live-region-list\"] }\n\t\t\t}]\n\t\t});\n\t\teditor.on(\"destroy\", () => {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (this._pruneAnnouncementsInterval !== null) {\n\t\t\t\tclearInterval(this._pruneAnnouncementsInterval);\n\t\t\t\tthis._pruneAnnouncementsInterval = null;\n\t\t\t}\n\t\t});\n\t\tthis.politeness = politeness;\n\t\tthis._domConverter = editor.data.htmlProcessor.domConverter;\n\t\tthis._pruneAnnouncementsInterval = setInterval(() => {\n\t\t\tif (this.element && this._listElement.firstChild) this._listElement.firstChild.remove();\n\t\t}, 5e3);\n\t}\n\t/**\n\t* Appends new announcement to region.\n\t*/\n\tannounce({ announcement, isUnsafeHTML }) {\n\t\tif (!announcement.trim().length) return;\n\t\tconst messageListItem = document.createElement(\"li\");\n\t\tif (isUnsafeHTML) this._domConverter.setContentOf(messageListItem, announcement);\n\t\telse messageListItem.innerText = announcement;\n\t\tthis._listElement.appendChild(messageListItem);\n\t}\n\t/**\n\t* Return current announcements list HTML element.\n\t*/\n\tget _listElement() {\n\t\treturn this.element.querySelector(\"ul\");\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* Handles clicking **outside** of a specified set of elements, then fires an action.\n*\n* **Note**: Actually, the action is executed upon `mousedown`, not `click`. It prevents\n* certain issues when the user keeps holding the mouse button and the UI cannot react\n* properly.\n*\n* @param options Configuration options.\n* @param options.emitter The emitter to which this behavior should be added.\n* @param options.activator Function returning a `Boolean`, to determine whether the handler is active.\n* @param options.contextElements Array of HTML elements or a callback returning an array of HTML elements\n* that determine the scope of the handler. Clicking any of them or their descendants will **not** fire the callback.\n* @param options.callback An action executed by the handler.\n* @param options.listenerOptions Additional options for the listener (like priority).\n*/\nfunction clickOutsideHandler({ emitter, activator, callback, contextElements, listenerOptions }) {\n\temitter.listenTo(document, \"mousedown\", (evt, domEvt) => {\n\t\tif (!activator()) return;\n\t\tconst path = typeof domEvt.composedPath == \"function\" ? domEvt.composedPath() : [];\n\t\tconst contextElementsList = typeof contextElements == \"function\" ? contextElements() : contextElements;\n\t\tfor (const contextElement of contextElementsList) if (contextElement.contains(domEvt.target) || path.includes(contextElement)) return;\n\t\tcallback();\n\t}, listenerOptions);\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* A mixin that brings the possibility to temporarily disable CSS transitions using\n* {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen\n* when the view is first displayed but they should work normal in other cases.\n*\n* The methods to control the CSS transitions are:\n* * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the\n* {@link module:ui/view~View#element view element}.\n* * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the\n* {@link module:ui/view~View#element view element}.\n*\n* The usage comes down to:\n*\n* ```ts\n* const MyViewWithCssTransitionDisabler = CssTransitionDisablerMixin( MyView );\n* const view = new MyViewWithCssTransitionDisabler();\n*\n* // ...\n*\n* view.disableCssTransitions();\n* view.show();\n* view.enableCssTransitions();\n* ```\n*\n* @param view View instance that should get this functionality.\n*/\nfunction CssTransitionDisablerMixin(view) {\n\tclass Mixin extends view {\n\t\tdisableCssTransitions() {\n\t\t\tthis._isCssTransitionsDisabled = true;\n\t\t}\n\t\tenableCssTransitions() {\n\t\t\tthis._isCssTransitionsDisabled = false;\n\t\t}\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tthis.set(\"_isCssTransitionsDisabled\", false);\n\t\t\tthis.initializeCssTransitionDisablerMixin();\n\t\t}\n\t\tinitializeCssTransitionDisablerMixin() {\n\t\t\tif (this.template) this.extendTemplate({ attributes: { class: [this.bindTemplate.if(\"_isCssTransitionsDisabled\", \"ck-transitions-disabled\")] } });\n\t\t}\n\t}\n\treturn Mixin;\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* A mixin that brings the possibility to observe dragging of the view element.\n* The view has to implement the {@link ~DraggableView} interface to use it:\n*\n* ```js\n* export class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {\n* \t\t// ...\n* }\n* ```\n*\n* Creating a class extending it attaches a set of mouse and touch listeners allowing to observe dragging of the view element:\n* * `mousedown` and `touchstart` on the view element - starting the dragging.\n* * `mousemove` and `touchmove` on the document - updating the view coordinates.\n* * `mouseup` and `touchend` on the document - stopping the dragging.\n*\n* The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -\n* it is up to the developer to implement it.\n*/\nfunction DraggableViewMixin(view) {\n\tclass DraggableMixin extends view {\n\t\t/**\n\t\t* A bound version of {@link #_onDrag}.\n\t\t*/\n\t\t_onDragBound = this._onDrag.bind(this);\n\t\t/**\n\t\t* A bound version of {@link #_onDragEnd}.\n\t\t*/\n\t\t_onDragEndBound = this._onDragEnd.bind(this);\n\t\t/**\n\t\t* The last coordinates of the view. It is updated on every mouse move.\n\t\t*/\n\t\t_lastDraggingCoordinates = {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\t/**\n\t\t* @inheritDoc\n\t\t*/\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tthis.on(\"render\", () => {\n\t\t\t\tthis._attachListeners();\n\t\t\t});\n\t\t\tthis.set(\"isDragging\", false);\n\t\t}\n\t\t/**\n\t\t* Attaches the listeners for the drag start.\n\t\t*/\n\t\t_attachListeners() {\n\t\t\tthis.listenTo(this.element, \"mousedown\", this._onDragStart.bind(this));\n\t\t\tthis.listenTo(this.element, \"touchstart\", this._onDragStart.bind(this));\n\t\t}\n\t\t/**\n\t\t* Attaches the listeners for the dragging and drag end.\n\t\t*/\n\t\t_attachDragListeners() {\n\t\t\tthis.listenTo(global.document, \"mouseup\", this._onDragEndBound);\n\t\t\tthis.listenTo(global.document, \"touchend\", this._onDragEndBound);\n\t\t\tthis.listenTo(global.document, \"mousemove\", this._onDragBound);\n\t\t\tthis.listenTo(global.document, \"touchmove\", this._onDragBound);\n\t\t}\n\t\t/**\n\t\t* Detaches the listeners after the drag end.\n\t\t*/\n\t\t_detachDragListeners() {\n\t\t\tthis.stopListening(global.document, \"mouseup\", this._onDragEndBound);\n\t\t\tthis.stopListening(global.document, \"touchend\", this._onDragEndBound);\n\t\t\tthis.stopListening(global.document, \"mousemove\", this._onDragBound);\n\t\t\tthis.stopListening(global.document, \"touchmove\", this._onDragBound);\n\t\t}\n\t\t/**\n\t\t* Starts the dragging listeners and sets the initial view coordinates.\n\t\t*/\n\t\t_onDragStart(evt, domEvt) {\n\t\t\tif (!this._isHandleElementPressed(domEvt)) return;\n\t\t\tthis._attachDragListeners();\n\t\t\tlet x;\n\t\t\tlet y;\n\t\t\tif (domEvt instanceof MouseEvent) {\n\t\t\t\tx = domEvt.clientX;\n\t\t\t\ty = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tx = domEvt.touches[0].clientX;\n\t\t\t\ty = domEvt.touches[0].clientY;\n\t\t\t}\n\t\t\tthis._lastDraggingCoordinates = {\n\t\t\t\tx,\n\t\t\t\ty\n\t\t\t};\n\t\t\tthis.isDragging = true;\n\t\t}\n\t\t/**\n\t\t* Updates the view coordinates and fires the `drag` event.\n\t\t*/\n\t\t_onDrag(evt, domEvt) {\n\t\t\tif (!this.isDragging) {\n\t\t\t\tthis._detachDragListeners();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet newX;\n\t\t\tlet newY;\n\t\t\tif (domEvt instanceof MouseEvent) {\n\t\t\t\tnewX = domEvt.clientX;\n\t\t\t\tnewY = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tnewX = domEvt.touches[0].clientX;\n\t\t\t\tnewY = domEvt.touches[0].clientY;\n\t\t\t}\n\t\t\tdomEvt.preventDefault();\n\t\t\tthis.fire(\"drag\", {\n\t\t\t\tdeltaX: Math.round(newX - this._lastDraggingCoordinates.x),\n\t\t\t\tdeltaY: Math.round(newY - this._lastDraggingCoordinates.y)\n\t\t\t});\n\t\t\tthis._lastDraggingCoordinates = {\n\t\t\t\tx: newX,\n\t\t\t\ty: newY\n\t\t\t};\n\t\t}\n\t\t/**\n\t\t* Stops the dragging and detaches the listeners.\n\t\t*/\n\t\t_onDragEnd() {\n\t\t\tthis._detachDragListeners();\n\t\t\tthis.isDragging = false;\n\t\t}\n\t\t/**\n\t\t* Checks if the drag handle element was pressed.\n\t\t*/\n\t\t_isHandleElementPressed(domEvt) {\n\t\t\tif (!this.dragHandleElement) return false;\n\t\t\treturn this.dragHandleElement === domEvt.target || domEvt.target instanceof HTMLElement && this.dragHandleElement.contains(domEvt.target);\n\t\t}\n\t}\n\treturn DraggableMixin;\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* A handler useful for {@link module:ui/view~View views} working as HTML forms. It intercepts a native DOM\n* `submit` event, prevents the default web browser behavior (navigation and page reload) and\n* fires the `submit` event on a view instead. Such a custom event can be then used by any\n* {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.\n*\n* ```ts\n* import { submitHandler } from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';\n*\n* // ...\n*\n* class AnyFormView extends View {\n* \tconstructor() {\n* \t\tsuper();\n*\n* \t\t// ...\n*\n* \t\tsubmitHandler( {\n* \t\t\tview: this\n* \t\t} );\n* \t}\n* }\n*\n* // ...\n*\n* const view = new AnyFormView();\n*\n* // A sample listener attached by an emitter working with the view.\n* this.listenTo( view, 'submit', () => {\n* \tsaveTheFormData();\n* \thideTheForm();\n* } );\n* ```\n*\n* @param options Configuration options.\n* @param options.view The view which DOM `submit` events should be handled.\n*/\nfunction submitHandler({ view }) {\n\tview.listenTo(view.element, \"submit\", (evt, domEvt) => {\n\t\tdomEvt.preventDefault();\n\t\tview.fire(\"submit\");\n\t}, { useCapture: 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* A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.\n*\n* @param options Configuration options.\n* @param options.keystrokeHandler Keystroke handler to register navigation with arrow keys.\n* @param options.focusTracker A focus tracker for grid elements.\n* @param options.gridItems A collection of grid items.\n* @param options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns\n* the number (e.g. for responsive grids).\n* @param options.uiLanguageDirection String of ui language direction.\n*/\nfunction addKeyboardHandlingForGrid({ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }) {\n\tconst getNumberOfColumns = typeof numberOfColumns === \"number\" ? () => numberOfColumns : numberOfColumns;\n\tkeystrokeHandler.set(\"arrowright\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\treturn uiLanguageDirection === \"rtl\" ? getLeftElementIndex(focusedElementIndex, gridItems.length) : getRightElementIndex(focusedElementIndex, gridItems.length);\n\t}));\n\tkeystrokeHandler.set(\"arrowleft\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\treturn uiLanguageDirection === \"rtl\" ? getRightElementIndex(focusedElementIndex, gridItems.length) : getLeftElementIndex(focusedElementIndex, gridItems.length);\n\t}));\n\tkeystrokeHandler.set(\"arrowup\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\tlet nextIndex = focusedElementIndex - getNumberOfColumns();\n\t\tif (nextIndex < 0) {\n\t\t\tnextIndex = focusedElementIndex + getNumberOfColumns() * Math.floor(gridItems.length / getNumberOfColumns());\n\t\t\tif (nextIndex > gridItems.length - 1) nextIndex -= getNumberOfColumns();\n\t\t}\n\t\treturn nextIndex;\n\t}));\n\tkeystrokeHandler.set(\"arrowdown\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\tlet nextIndex = focusedElementIndex + getNumberOfColumns();\n\t\tif (nextIndex > gridItems.length - 1) nextIndex = focusedElementIndex % getNumberOfColumns();\n\t\treturn nextIndex;\n\t}));\n\tfunction getGridItemFocuser(getIndexToFocus) {\n\t\treturn (evt) => {\n\t\t\tconst focusedElement = gridItems.find((item) => item.element === focusTracker.focusedElement);\n\t\t\tconst nextIndexToFocus = getIndexToFocus(gridItems.getIndex(focusedElement), gridItems);\n\t\t\tgridItems.get(nextIndexToFocus).focus();\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t};\n\t}\n\t/**\n\t* Function returning the next index.\n\t*\n\t* ```\n\t* before: [ ][x][ ]\tafter: [ ][ ][x]\n\t* index = 1            index = 2\n\t* ```\n\t*\n\t* If current index is last, function returns first index.\n\t*\n\t* ```\n\t* before: [ ][ ][x]\tafter: [x][ ][ ]\n\t* index = 2            index = 0\n\t* ```\n\t*\n\t* @param elementIndex Number of current index.\n\t* @param collectionLength A count of collection items.\n\t*/\n\tfunction getRightElementIndex(elementIndex, collectionLength) {\n\t\tif (elementIndex === collectionLength - 1) return 0;\n\t\telse return elementIndex + 1;\n\t}\n\t/**\n\t* Function returning the previous index.\n\t*\n\t* ```\n\t* before: [ ][x][ ]\tafter: [x][ ][ ]\n\t* index = 1            index = 0\n\t* ```\n\t*\n\t* If current index is first, function returns last index.\n\t*\n\t* ```\n\t* before: [x][ ][ ]\tafter: [ ][ ][x]\n\t* index = 0            index = 2\n\t* ```\n\t*\n\t* @param elementIndex Number of current index.\n\t* @param collectionLength A count of collection items.\n\t*/\n\tfunction getLeftElementIndex(elementIndex, collectionLength) {\n\t\tif (elementIndex === 0) return collectionLength - 1;\n\t\telse return elementIndex - 1;\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 ui/label/labelview\n*/\n/**\n* The label view class.\n*/\nvar LabelView = class extends View {\n\t/**\n\t* An unique id of the label. It can be used by other UI components to reference\n\t* the label, for instance, using the `aria-describedby` DOM attribute.\n\t*/\n\tid;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"text\", void 0);\n\t\tthis.set(\"for\", void 0);\n\t\tthis.id = `ck-editor__label_${uid()}`;\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"label\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-label\"],\n\t\t\t\tid: this.id,\n\t\t\t\tfor: bind.to(\"for\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"text\") }]\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 ui/editorui/accessibilityhelp/accessibilityhelpcontentview\n*/\n/**\n* The view displaying keystrokes in the Accessibility help dialog.\n*/\nvar AccessibilityHelpContentView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, keystrokes) {\n\t\tsuper(locale);\n\t\tconst t = locale.t;\n\t\tconst helpLabel = new LabelView();\n\t\thelpLabel.text = t(\"Help Contents. To close this dialog press ESC.\");\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-accessibility-help-dialog__content\"],\n\t\t\t\t\"aria-labelledby\": helpLabel.id,\n\t\t\t\trole: \"document\",\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tcreateElement(document, \"p\", {}, t(\"Below, you can find a list of keyboard shortcuts that can be used in the editor.\")),\n\t\t\t\t...this._createCategories(Array.from(keystrokes.values())),\n\t\t\t\thelpLabel\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\t/**\n\t* Creates `<section><h3>Category label</h3>...</section>` elements for each category of keystrokes.\n\t*/\n\t_createCategories(categories) {\n\t\treturn categories.map((categoryDefinition) => {\n\t\t\tconst elements = [createElement(document, \"h3\", {}, categoryDefinition.label), ...Array.from(categoryDefinition.groups.values()).map((groupDefinition) => this._createGroup(groupDefinition)).flat()];\n\t\t\tif (categoryDefinition.description) elements.splice(1, 0, createElement(document, \"p\", {}, categoryDefinition.description));\n\t\t\treturn createElement(document, \"section\", {}, elements);\n\t\t});\n\t}\n\t/**\n\t* Creates `[<h4>Optional label</h4>]<dl>...</dl>` elements for each group of keystrokes in a category.\n\t*/\n\t_createGroup(groupDefinition) {\n\t\tconst definitionAndDescriptionElements = groupDefinition.keystrokes.sort((a, b) => a.label.localeCompare(b.label)).map((keystrokeDefinition) => this._createGroupRow(keystrokeDefinition)).flat();\n\t\tconst elements = [createElement(document, \"dl\", {}, definitionAndDescriptionElements)];\n\t\tif (groupDefinition.label) elements.unshift(createElement(document, \"h4\", {}, groupDefinition.label));\n\t\treturn elements;\n\t}\n\t/**\n\t* Creates `<dt>Keystroke label</dt><dd>Keystroke definition</dd>` elements for each keystroke in a group.\n\t*/\n\t_createGroupRow(keystrokeDefinition) {\n\t\tconst t = this.locale.t;\n\t\tconst dt = createElement(document, \"dt\");\n\t\tconst dd = createElement(document, \"dd\");\n\t\tconst normalizedKeystrokeDefinition = normalizeKeystrokeDefinition(keystrokeDefinition.keystroke);\n\t\tconst keystrokeAlternativeHTMLs = [];\n\t\tfor (const keystrokeAlternative of normalizedKeystrokeDefinition) keystrokeAlternativeHTMLs.push(keystrokeAlternative.map(keystrokeToEnvKbd).join(\"\"));\n\t\tdt.innerHTML = keystrokeDefinition.label;\n\t\tdd.innerHTML = keystrokeAlternativeHTMLs.join(\", \") + (keystrokeDefinition.mayRequireFn && env.isMac ? ` ${t(\"(may require <kbd>Fn</kbd>)\")}` : \"\");\n\t\treturn [dt, dd];\n\t}\n};\nfunction keystrokeToEnvKbd(keystroke) {\n\treturn getEnvKeystrokeText(keystroke).split(\"+\").map((part) => `<kbd>${part}</kbd>`).join(\"+\");\n}\nfunction normalizeKeystrokeDefinition(definition) {\n\tif (typeof definition === \"string\") return [[definition]];\n\tif (typeof definition[0] === \"string\") return [definition];\n\treturn definition;\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 ui/icon/iconview\n*/\n/**\n* The icon view class.\n*/\nvar IconView = class IconView extends View {\n\t/**\n\t* A list of presentational attributes that can be set on the `<svg>` element and should be preserved\n\t* when the icon {@link module:ui/icon/iconview~IconView#content content} is loaded.\n\t*\n\t* See the [specification](https://www.w3.org/TR/SVG/styling.html#TermPresentationAttribute) to learn more.\n\t*/\n\tstatic presentationalAttributeNames = [\n\t\t\"alignment-baseline\",\n\t\t\"baseline-shift\",\n\t\t\"clip-path\",\n\t\t\"clip-rule\",\n\t\t\"color\",\n\t\t\"color-interpolation\",\n\t\t\"color-interpolation-filters\",\n\t\t\"color-rendering\",\n\t\t\"cursor\",\n\t\t\"direction\",\n\t\t\"display\",\n\t\t\"dominant-baseline\",\n\t\t\"fill\",\n\t\t\"fill-opacity\",\n\t\t\"fill-rule\",\n\t\t\"filter\",\n\t\t\"flood-color\",\n\t\t\"flood-opacity\",\n\t\t\"font-family\",\n\t\t\"font-size\",\n\t\t\"font-size-adjust\",\n\t\t\"font-stretch\",\n\t\t\"font-style\",\n\t\t\"font-variant\",\n\t\t\"font-weight\",\n\t\t\"image-rendering\",\n\t\t\"letter-spacing\",\n\t\t\"lighting-color\",\n\t\t\"marker-end\",\n\t\t\"marker-mid\",\n\t\t\"marker-start\",\n\t\t\"mask\",\n\t\t\"opacity\",\n\t\t\"overflow\",\n\t\t\"paint-order\",\n\t\t\"pointer-events\",\n\t\t\"shape-rendering\",\n\t\t\"stop-color\",\n\t\t\"stop-opacity\",\n\t\t\"stroke\",\n\t\t\"stroke-dasharray\",\n\t\t\"stroke-dashoffset\",\n\t\t\"stroke-linecap\",\n\t\t\"stroke-linejoin\",\n\t\t\"stroke-miterlimit\",\n\t\t\"stroke-opacity\",\n\t\t\"stroke-width\",\n\t\t\"text-anchor\",\n\t\t\"text-decoration\",\n\t\t\"text-overflow\",\n\t\t\"text-rendering\",\n\t\t\"transform\",\n\t\t\"unicode-bidi\",\n\t\t\"vector-effect\",\n\t\t\"visibility\",\n\t\t\"white-space\",\n\t\t\"word-spacing\",\n\t\t\"writing-mode\"\n\t];\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"content\", \"\");\n\t\tthis.set(\"viewBox\", \"0 0 20 20\");\n\t\tthis.set(\"fillColor\", \"\");\n\t\tthis.set(\"isColorInherited\", true);\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.setTemplate({\n\t\t\ttag: \"svg\",\n\t\t\tns: \"http://www.w3.org/2000/svg\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-icon\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value),\n\t\t\t\t\t\"ck-reset_all-excluded\",\n\t\t\t\t\tbind.if(\"isColorInherited\", \"ck-icon_inherit-color\")\n\t\t\t\t],\n\t\t\t\tviewBox: bind.to(\"viewBox\"),\n\t\t\t\t\"aria-hidden\": true\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis._updateXMLContent();\n\t\tthis._colorFillPaths();\n\t\tthis.on(\"change:content\", () => {\n\t\t\tthis._updateXMLContent();\n\t\t\tthis._colorFillPaths();\n\t\t});\n\t\tthis.on(\"change:fillColor\", () => {\n\t\t\tthis._colorFillPaths();\n\t\t});\n\t}\n\t/**\n\t* Updates the {@link #element} with the value of {@link #content}.\n\t*/\n\t_updateXMLContent() {\n\t\tif (this.content) {\n\t\t\tconst svg = new DOMParser().parseFromString(this.content.trim(), \"image/svg+xml\").querySelector(\"svg\");\n\t\t\tif (!svg)\n /**\n\t\t\t* The provided icon content is not a valid SVG.\n\t\t\t*\n\t\t\t* @error ui-iconview-invalid-svg\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"ui-iconview-invalid-svg\", this);\n\t\t\tconst viewBox = svg.getAttribute(\"viewBox\");\n\t\t\tif (viewBox) this.viewBox = viewBox;\n\t\t\tfor (const { name, value } of Array.from(svg.attributes)) if (IconView.presentationalAttributeNames.includes(name)) this.element.setAttribute(name, value);\n\t\t\twhile (this.element.firstChild) this.element.removeChild(this.element.firstChild);\n\t\t\twhile (svg.childNodes.length > 0) this.element.appendChild(svg.childNodes[0]);\n\t\t}\n\t}\n\t/**\n\t* Fills all child `path.ck-icon__fill` with the `#fillColor`.\n\t*/\n\t_colorFillPaths() {\n\t\tif (this.fillColor) this.element.querySelectorAll(\".ck-icon__fill\").forEach((path) => {\n\t\t\tpath.style.fill = this.fillColor;\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 ui/button/buttonlabelview\n*/\n/**\n* A default implementation of the button view's label. It comes with a dynamic text support\n* via {@link module:ui/button/buttonlabelview~ButtonLabelView#text} property.\n*/\nvar ButtonLabelView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set({\n\t\t\tstyle: void 0,\n\t\t\ttext: void 0,\n\t\t\tid: void 0\n\t\t});\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-button__label\"],\n\t\t\t\tstyle: bind.to(\"style\"),\n\t\t\t\tid: bind.to(\"id\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"text\") }]\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 ui/button/buttonview\n*/\n/**\n* The button view class.\n*\n* ```ts\n* const view = new ButtonView();\n*\n* view.set( {\n* \tlabel: 'A button',\n* \tkeystroke: 'Ctrl+B',\n* \ttooltip: true,\n* \twithText: true\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*/\nvar ButtonView = class extends View {\n\t/**\n\t* Collection of the child views inside of the button {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* Label of the button view. Its text is configurable using the {@link #label label attribute}.\n\t*\n\t* If not configured otherwise in the `constructor()`, by default the label is an instance\n\t* of {@link module:ui/button/buttonlabelview~ButtonLabelView}.\n\t*/\n\tlabelView;\n\t/**\n\t* The icon view of the button. Will be added to {@link #children} when the\n\t* {@link #icon icon attribute} is defined.\n\t*/\n\ticonView;\n\t/**\n\t* A view displaying the keystroke of the button next to the {@link #labelView label}.\n\t* Added to {@link #children} when the {@link #withKeystroke `withKeystroke` attribute}\n\t* is defined.\n\t*/\n\tkeystrokeView;\n\t/**\n\t* Delayed focus function for focus handling in Safari.\n\t*/\n\t_focusDelayed = null;\n\t/**\n\t* Creates an instance of the button view class.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param labelView The instance of the button's label. If not provided, an instance of\n\t* {@link module:ui/button/buttonlabelview~ButtonLabelView} is used.\n\t*/\n\tconstructor(locale, labelView = new ButtonLabelView()) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst ariaLabelUid = uid();\n\t\tthis.set(\"_ariaPressed\", false);\n\t\tthis.set(\"_ariaChecked\", false);\n\t\tthis.set(\"ariaLabel\", void 0);\n\t\tthis.set(\"ariaLabelledBy\", `ck-editor__aria-label_${ariaLabelUid}`);\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"labelStyle\", void 0);\n\t\tthis.set(\"icon\", void 0);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isOn\", false);\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.set(\"isToggleable\", false);\n\t\tthis.set(\"keystroke\", void 0);\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"role\", void 0);\n\t\tthis.set(\"tabindex\", -1);\n\t\tthis.set(\"tooltip\", false);\n\t\tthis.set(\"tooltipPosition\", \"s\");\n\t\tthis.set(\"type\", \"button\");\n\t\tthis.set(\"withText\", false);\n\t\tthis.set(\"withKeystroke\", false);\n\t\tthis.children = this.createCollection();\n\t\tthis.labelView = this._setupLabelView(labelView);\n\t\tthis.iconView = new IconView();\n\t\tthis.iconView.extendTemplate({ attributes: { class: \"ck-button__icon\" } });\n\t\tthis.iconView.bind(\"content\").to(this, \"icon\");\n\t\tthis.keystrokeView = this._createKeystrokeView();\n\t\tthis.bind(\"_tooltipString\").to(this, \"tooltip\", this, \"label\", this, \"keystroke\", this._getTooltipString.bind(this));\n\t\tconst template = {\n\t\t\ttag: \"button\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-button\",\n\t\t\t\t\tbind.to(\"class\"),\n\t\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value),\n\t\t\t\t\tbind.to(\"isOn\", (value) => value ? \"ck-on\" : \"ck-off\"),\n\t\t\t\t\tbind.if(\"withText\", \"ck-button_with-text\"),\n\t\t\t\t\tbind.if(\"withKeystroke\", \"ck-button_with-keystroke\")\n\t\t\t\t],\n\t\t\t\trole: bind.to(\"role\"),\n\t\t\t\ttype: bind.to(\"type\", (value) => value ? value : \"button\"),\n\t\t\t\ttabindex: bind.to(\"tabindex\"),\n\t\t\t\t\"aria-checked\": bind.to(\"_ariaChecked\"),\n\t\t\t\t\"aria-pressed\": bind.to(\"_ariaPressed\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\t\"aria-labelledby\": bind.to(\"ariaLabelledBy\"),\n\t\t\t\t\"aria-disabled\": bind.if(\"isEnabled\", true, (value) => !value),\n\t\t\t\t\"data-cke-tooltip-text\": bind.to(\"_tooltipString\"),\n\t\t\t\t\"data-cke-tooltip-position\": bind.to(\"tooltipPosition\")\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { click: bind.to((evt) => {\n\t\t\t\tif (this.isEnabled) this.fire(\"execute\");\n\t\t\t\telse evt.preventDefault();\n\t\t\t}) }\n\t\t};\n\t\tthis.bind(\"_ariaPressed\").to(this, \"isOn\", this, \"isToggleable\", this, \"role\", (isOn, isToggleable, role) => {\n\t\t\tif (!isToggleable || isCheckableRole(role)) return false;\n\t\t\treturn String(!!isOn);\n\t\t});\n\t\tthis.bind(\"_ariaChecked\").to(this, \"isOn\", this, \"isToggleable\", this, \"role\", (isOn, isToggleable, role) => {\n\t\t\tif (!isToggleable || !isCheckableRole(role)) return false;\n\t\t\treturn String(!!isOn);\n\t\t});\n\t\tif (env.isSafari) {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (!this._focusDelayed) this._focusDelayed = delay(() => this.focus(), 0);\n\t\t\ttemplate.on.mousedown = bind.to(() => {\n\t\t\t\tthis._focusDelayed();\n\t\t\t});\n\t\t\ttemplate.on.mouseup = bind.to(() => {\n\t\t\t\tthis._focusDelayed.cancel();\n\t\t\t});\n\t\t}\n\t\tthis.setTemplate(template);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this.icon) this.children.add(this.iconView);\n\t\tthis.on(\"change:icon\", (evt, prop, newIcon, oldIcon) => {\n\t\t\tif (newIcon && !oldIcon) this.children.add(this.iconView, 0);\n\t\t\telse if (!newIcon && oldIcon) this.children.remove(this.iconView);\n\t\t});\n\t\tthis.children.add(this.labelView);\n\t\tif (this.withKeystroke && this.keystroke) this.children.add(this.keystrokeView);\n\t}\n\t/**\n\t* Focuses the {@link #element} of the button.\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._focusDelayed) this._focusDelayed.cancel();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Binds the label view instance it with button attributes.\n\t*/\n\t_setupLabelView(labelView) {\n\t\tlabelView.bind(\"text\", \"style\", \"id\").to(this, \"label\", \"labelStyle\", \"ariaLabelledBy\");\n\t\treturn labelView;\n\t}\n\t/**\n\t* Creates a view that displays a keystroke next to a {@link #labelView label }\n\t* and binds it with button attributes.\n\t*/\n\t_createKeystrokeView() {\n\t\tconst keystrokeView = new View();\n\t\tkeystrokeView.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-button__keystroke\"] },\n\t\t\tchildren: [{ text: this.bindTemplate.to(\"keystroke\", (text) => getEnvKeystrokeText(text)) }]\n\t\t});\n\t\treturn keystrokeView;\n\t}\n\t/**\n\t* Gets the text for the tooltip from the combination of\n\t* {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.\n\t*\n\t* @see #tooltip\n\t* @see #_tooltipString\n\t* @param tooltip Button tooltip.\n\t* @param label Button label.\n\t* @param keystroke Button keystroke.\n\t*/\n\t_getTooltipString(tooltip, label, keystroke) {\n\t\tif (tooltip) {\n\t\t\tif (typeof tooltip == \"string\") return tooltip;\n\t\t\telse {\n\t\t\t\tif (keystroke) keystroke = getEnvKeystrokeText(keystroke);\n\t\t\t\tif (tooltip instanceof Function) return tooltip(label, keystroke);\n\t\t\t\telse return `${label}${keystroke ? ` (${keystroke})` : \"\"}`;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}\n};\n/**\n* Checks if `aria-checkbox` can be used with specified role.\n*/\nfunction isCheckableRole(role) {\n\tswitch (role) {\n\t\tcase \"radio\":\n\t\tcase \"checkbox\":\n\t\tcase \"option\":\n\t\tcase \"switch\":\n\t\tcase \"menuitemcheckbox\":\n\t\tcase \"menuitemradio\": return true;\n\t\tdefault: return false;\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 ui/formheader/formheaderview\n*/\n/**\n* The class component representing a form header view. It should be used in more advanced forms to\n* describe the main purpose of the form.\n*\n* By default the component contains a bolded label view that has to be set. The label is usually a short (at most 3-word) string.\n* The component can also be extended by any other elements, like: icons, dropdowns, etc.\n*\n* It is used i.a.\n* by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.\n*\n* The latter is an example, where the component has been extended by {@link module:ui/dropdown/dropdownview~DropdownView} view.\n*/\nvar FormHeaderView = class extends View {\n\t/**\n\t* A collection of header items.\n\t*/\n\tchildren;\n\t/**\n\t* The icon view instance. Defined only if icon was passed in the constructor's options.\n\t*/\n\ticonView;\n\t/**\n\t* Creates an instance of the form header class.\n\t*\n\t* @param locale The locale instance.\n\t* @param options.label A label.\n\t* @param options.class An additional class.\n\t*/\n\tconstructor(locale, options = {}) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"label\", options.label || \"\");\n\t\tthis.set(\"class\", options.class || null);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-form__header\",\n\t\t\t\tbind.to(\"class\")\n\t\t\t] },\n\t\t\tchildren: this.children\n\t\t});\n\t\tif (options.icon) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = options.icon;\n\t\t\tthis.children.add(this.iconView);\n\t\t}\n\t\tconst label = new View(locale);\n\t\tlabel.setTemplate({\n\t\t\ttag: \"h2\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-form__header__label\"],\n\t\t\t\trole: \"presentation\"\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"label\") }]\n\t\t});\n\t\tthis.children.add(label);\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 ui/focuscycler\n*/\nconst FocusCyclerBase = /* #__PURE__ */ EmitterMixin();\n/**\n* A utility class that helps cycling over {@link module:ui/focuscycler~FocusableView focusable views} in a\n* {@link module:ui/viewcollection~ViewCollection} when the focus is tracked by the\n* {@link module:utils/focustracker~FocusTracker} instance. It helps implementing keyboard\n* navigation in HTML forms, toolbars, lists and the like.\n*\n* To work properly it requires:\n* * a collection of focusable (HTML `tabindex` attribute) views that implement the `focus()` method,\n* * an associated focus tracker to determine which view is focused.\n*\n* A simple cycler setup can look like this:\n*\n* ```ts\n* const focusables = new ViewCollection<FocusableView>();\n* const focusTracker = new FocusTracker();\n*\n* // Add focusable views to the focus tracker.\n* focusTracker.add( ... );\n* ```\n*\n* Then, the cycler can be used manually:\n*\n* ```ts\n* const cycler = new FocusCycler( { focusables, focusTracker } );\n*\n* // Will focus the first focusable view in #focusables.\n* cycler.focusFirst();\n*\n* // Will log the next focusable item in #focusables.\n* console.log( cycler.next );\n* ```\n*\n* Alternatively, it can work side by side with the {@link module:utils/keystrokehandler~KeystrokeHandler}:\n*\n* ```ts\n* const keystrokeHandler = new KeystrokeHandler();\n*\n* // Activate the keystroke handler.\n* keystrokeHandler.listenTo( sourceOfEvents );\n*\n* const cycler = new FocusCycler( {\n* \tfocusables, focusTracker, keystrokeHandler,\n* \tactions: {\n* \t\t// When arrowup of arrowleft is detected by the #keystrokeHandler,\n* \t\t// focusPrevious() will be called on the cycler.\n* \t\tfocusPrevious: [ 'arrowup', 'arrowleft' ],\n* \t}\n* } );\n* ```\n*\n* Check out the {@glink framework/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\"} guide to learn more.\n*/\nvar FocusCycler = class extends FocusCyclerBase {\n\t/**\n\t* A {@link module:ui/focuscycler~FocusableView focusable views} collection that the cycler operates on.\n\t*/\n\tfocusables;\n\t/**\n\t* A focus tracker instance that the cycler uses to determine the current focus\n\t* state in {@link #focusables}.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t* which can respond to certain keystrokes and cycle the focus.\n\t*/\n\tkeystrokeHandler;\n\t/**\n\t* Actions that the cycler can take when a keystroke is pressed. Requires\n\t* `options.keystrokeHandler` to be passed and working. When an action is\n\t* performed, `preventDefault` and `stopPropagation` will be called on the event\n\t* the keystroke fired in the DOM.\n\t*\n\t* ```ts\n\t* actions: {\n\t* \t// Will call #focusPrevious() when arrowleft or arrowup is pressed.\n\t* \tfocusPrevious: [ 'arrowleft', 'arrowup' ],\n\t*\n\t* \t// Will call #focusNext() when arrowdown is pressed.\n\t* \tfocusNext: 'arrowdown'\n\t* }\n\t* ```\n\t*/\n\tactions;\n\t/**\n\t* Creates an instance of the focus cycler utility.\n\t*\n\t* @param options Configuration options.\n\t*/\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.focusables = options.focusables;\n\t\tthis.focusTracker = options.focusTracker;\n\t\tthis.keystrokeHandler = options.keystrokeHandler;\n\t\tthis.actions = options.actions;\n\t\tif (options.actions && options.keystrokeHandler) for (const methodName in options.actions) {\n\t\t\tlet actions = options.actions[methodName];\n\t\t\tif (typeof actions == \"string\") actions = [actions];\n\t\t\tfor (const keystroke of actions) options.keystrokeHandler.set(keystroke, (data, cancel) => {\n\t\t\t\tthis[methodName]();\n\t\t\t\tcancel();\n\t\t\t}, options.keystrokeHandlerOptions);\n\t\t}\n\t\tthis.on(\"forwardCycle\", () => this.focusFirst(), { priority: \"low\" });\n\t\tthis.on(\"backwardCycle\", () => this.focusLast(), { priority: \"low\" });\n\t}\n\t/**\n\t* Returns the first focusable view in {@link #focusables}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget first() {\n\t\treturn this.focusables.find(isDomFocusable) || null;\n\t}\n\t/**\n\t* Returns the last focusable view in {@link #focusables}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget last() {\n\t\treturn this.focusables.filter(isDomFocusable).slice(-1)[0] || null;\n\t}\n\t/**\n\t* Returns the next focusable view in {@link #focusables} based on {@link #current}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget next() {\n\t\treturn this._getDomFocusableItem(1);\n\t}\n\t/**\n\t* Returns the previous focusable view in {@link #focusables} based on {@link #current}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget previous() {\n\t\treturn this._getDomFocusableItem(-1);\n\t}\n\t/**\n\t* An index of the view in the {@link #focusables} which is focused according\n\t* to {@link #focusTracker}. Returns `null` when there is no such view.\n\t*/\n\tget current() {\n\t\tlet index = null;\n\t\tif (this.focusTracker.focusedElement === null) return null;\n\t\tthis.focusables.find((view, viewIndex) => {\n\t\t\tconst focused = view.element === this.focusTracker.focusedElement;\n\t\t\tif (focused) index = viewIndex;\n\t\t\treturn focused;\n\t\t});\n\t\treturn index;\n\t}\n\t/**\n\t* Focuses the {@link #first} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusFirst() {\n\t\tthis._focus(this.first, 1);\n\t}\n\t/**\n\t* Focuses the {@link #last} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusLast() {\n\t\tthis._focus(this.last, -1);\n\t}\n\t/**\n\t* Focuses the {@link #next} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusNext() {\n\t\tconst next = this.next;\n\t\tif (next && this.focusables.getIndex(next) === this.current) {\n\t\t\tthis.fire(\"forwardCycle\");\n\t\t\treturn;\n\t\t}\n\t\tif (next === this.first) this.fire(\"forwardCycle\");\n\t\telse this._focus(next, 1);\n\t}\n\t/**\n\t* Focuses the {@link #previous} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusPrevious() {\n\t\tconst previous = this.previous;\n\t\tif (previous && this.focusables.getIndex(previous) === this.current) {\n\t\t\tthis.fire(\"backwardCycle\");\n\t\t\treturn;\n\t\t}\n\t\tif (previous === this.last) this.fire(\"backwardCycle\");\n\t\telse this._focus(previous, -1);\n\t}\n\t/**\n\t* Allows for creating continuous focus cycling across multiple focus cyclers and their collections of {@link #focusables}.\n\t*\n\t* It starts listening to the {@link module:ui/focuscycler~FocusCyclerForwardCycleEvent} and\n\t* {@link module:ui/focuscycler~FocusCyclerBackwardCycleEvent} events of the chained focus cycler and engages,\n\t* whenever the user reaches the last (forwards navigation) or first (backwards navigation) focusable view\n\t* and would normally start over. Instead, the navigation continues on the higher level (flattens).\n\t*\n\t* For instance, for the following nested focus navigation structure, the focus would get stuck the moment\n\t* the AB gets focused and its focus cycler starts managing it:\n\t*\n\t*\t   ┌────────────┐   ┌──────────────────────────────────┐   ┌────────────┐\n\t*\t   │ AA         │   │ AB                               │   │ AC         │\n\t*\t   │            │   │                                  │   │            │\n\t*\t   │            │   │    ┌─────┐  ┌─────┐  ┌─────┐     │   │            │\n\t*\t   │            │   │ ┌──► ABA ├──► ABB ├──► ABC ├───┐ │   │            │\n\t*\t   │            ├───► │  └─────┘  └─────┘  └─────┘   │ │   │            │\n\t*\t   │            │   │ │                              │ │   │            │\n\t*\t   │            │   │ │                              │ │   │            │\n\t*\t   │            │   │ └──────────────────────────────┘ │   │            │\n\t*\t   │            │   │                                  │   │            │\n\t*\t   └────────────┘   └──────────────────────────────────┘   └────────────┘\n\t*\n\t* Chaining a focus tracker that manages AA, AB, and AC with the focus tracker that manages ABA, ABB, and ABC\n\t* creates a seamless navigation experience instead:\n\t*\n\t*\t   ┌────────────┐   ┌──────────────────────────────────┐   ┌────────────┐\n\t*\t   │ AA         │   │ AB                               │   │ AC         │\n\t*\t   │            │   │                                  │   │            │\n\t*\t   │            │   │    ┌─────┐  ┌─────┐  ┌─────┐     │   │            │\n\t*\t   │            │   │ ┌──► ABA ├──► ABB ├──► ABC ├──┐  │   │            │\n\t*\t┌──►            ├───┼─┘  └─────┘  └─────┘  └─────┘  └──┼───►            ├──┐\n\t*\t│  │            │   │                                  │   │            │  │\n\t*\t│  │            │   │                                  │   │            │  │\n\t*\t│  │            │   │                                  │   │            │  │\n\t*\t│  │            │   │                                  │   │            │  │\n\t*\t│  └────────────┘   └──────────────────────────────────┘   └────────────┘  │\n\t*\t│                                                                          │\n\t*\t│                                                                          │\n\t*\t└──────────────────────────────────────────────────────────────────────────┘\n\t*\n\t* See {@link #unchain} to reverse the chaining.\n\t*/\n\tchain(chainedFocusCycler) {\n\t\tconst getCurrentFocusedView = () => {\n\t\t\tif (this.current === null) return null;\n\t\t\treturn this.focusables.get(this.current);\n\t\t};\n\t\tthis.listenTo(chainedFocusCycler, \"forwardCycle\", (evt) => {\n\t\t\tconst oldCurrent = getCurrentFocusedView();\n\t\t\tthis.focusNext();\n\t\t\tif (oldCurrent !== getCurrentFocusedView()) evt.stop();\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(chainedFocusCycler, \"backwardCycle\", (evt) => {\n\t\t\tconst oldCurrent = getCurrentFocusedView();\n\t\t\tthis.focusPrevious();\n\t\t\tif (oldCurrent !== getCurrentFocusedView()) evt.stop();\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Reverses a chaining made by {@link #chain}.\n\t*/\n\tunchain(otherFocusCycler) {\n\t\tthis.stopListening(otherFocusCycler);\n\t}\n\t/**\n\t* Focuses the given view if it exists.\n\t*\n\t* @param view The view to be focused\n\t* @param direction The direction of the focus if the view has focusable children.\n\t* @returns\n\t*/\n\t_focus(view, direction) {\n\t\tif (view && this.focusTracker.focusedElement !== view.element) view.focus(direction);\n\t}\n\t/**\n\t* Returns the next or previous focusable view in {@link #focusables} with respect\n\t* to {@link #current}.\n\t*\n\t* @param step Either `1` for checking forward from {@link #current} or `-1` for checking backwards.\n\t*/\n\t_getDomFocusableItem(step) {\n\t\tconst collectionLength = this.focusables.length;\n\t\tif (!collectionLength) return null;\n\t\tconst current = this.current;\n\t\tif (current === null) return this[step === 1 ? \"first\" : \"last\"];\n\t\tlet focusableItem = this.focusables.get(current);\n\t\tlet index = (current + collectionLength + step) % collectionLength;\n\t\tdo {\n\t\t\tconst focusableItemCandidate = this.focusables.get(index);\n\t\t\tif (isDomFocusable(focusableItemCandidate)) {\n\t\t\t\tfocusableItem = focusableItemCandidate;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tindex = (index + collectionLength + step) % collectionLength;\n\t\t} while (index !== current);\n\t\treturn focusableItem;\n\t}\n};\n/**\n* Checks whether a view can be focused (has `focus()` method and is visible).\n*\n* @param view A view to be checked.\n*/\nfunction isDomFocusable(view) {\n\treturn isFocusable(view) && isVisible(view.element);\n}\n/**\n* Checks whether a view is {@link ~FocusableView}.\n*\n* @param view A view to be checked.\n*/\nfunction isFocusable(view) {\n\treturn !!(\"focus\" in view && typeof view.focus == \"function\");\n}\n/**\n* Checks whether a view is an instance of {@link ~ViewWithFocusCycler}.\n*\n* @param view A view to be checked.\n*/\nfunction isViewWithFocusCycler(view) {\n\treturn isFocusable(view) && \"focusCycler\" in view && view.focusCycler instanceof FocusCycler;\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 ui/dialog/dialogactionsview\n*/\n/**\n* A dialog actions view class. It contains button views which are used to execute dialog actions.\n*/\nvar DialogActionsView = class extends View {\n\t/**\n\t* A collection of button views.\n\t*/\n\tchildren;\n\t/**\n\t* A keystroke handler instance.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A focus cycler instance.\n\t*/\n\tfocusCycler;\n\t/**\n\t* A focus tracker instance.\n\t*/\n\t_focusTracker;\n\t/**\n\t* A collection of focusable views.\n\t*/\n\t_focusables;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this._focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-dialog__actions\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* Creates the button views based on the given definitions.\n\t* Then adds them to the {@link #children} collection and to the focus cycler.\n\t*/\n\tsetButtons(definitions) {\n\t\tfor (const definition of definitions) {\n\t\t\tconst button = new ButtonView(this.locale);\n\t\t\tlet property;\n\t\t\tbutton.on(\"execute\", () => definition.onExecute());\n\t\t\tif (definition.onCreate) definition.onCreate(button);\n\t\t\tfor (property in definition) if (property != \"onExecute\" && property != \"onCreate\") button.set(property, definition[property]);\n\t\t\tthis.children.add(button);\n\t\t}\n\t\tthis._updateFocusCyclableItems();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus(direction) {\n\t\tif (direction === -1) this.focusCycler.focusLast();\n\t\telse this.focusCycler.focusFirst();\n\t}\n\t/**\n\t* Adds all elements from the {@link #children} collection to the {@link #_focusables} collection\n\t* and to the {@link #_focusTracker} instance.\n\t*/\n\t_updateFocusCyclableItems() {\n\t\tArray.from(this.children).forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis._focusTracker.add(v.element);\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 ui/dialog/dialogcontentview\n*/\n/**\n* A dialog content view class.\n*/\nvar DialogContentView = class extends View {\n\t/**\n\t* A collection of content items.\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-dialog__content\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Removes all the child views.\n\t*/\n\treset() {\n\t\twhile (this.children.length) this.children.remove(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 ui/dialog/dialogview\n*/\n/**\n* Available dialog view positions:\n*\n* * `DialogViewPosition.SCREEN_CENTER` &ndash; A fixed position in the center of the screen.\n* * `DialogViewPosition.EDITOR_CENTER` &ndash; A dynamic position in the center of the editor editable area.\n* * `DialogViewPosition.EDITOR_TOP_SIDE` &ndash; A dynamic position at the top-right (for the left-to-right languages)\n* or top-left (for right-to-left languages) corner of the editor editable area.\n* * `DialogViewPosition.EDITOR_TOP_CENTER` &ndash; A dynamic position at the top-center of the editor editable area.\n* * `DialogViewPosition.EDITOR_BOTTOM_CENTER` &ndash; A dynamic position at the bottom-center of the editor editable area.\n* * `DialogViewPosition.EDITOR_ABOVE_CENTER` &ndash; A dynamic position centered above the editor editable area.\n* * `DialogViewPosition.EDITOR_BELOW_CENTER` &ndash; A dynamic position centered below the editor editable area.\n*\n* The position of a dialog is specified by a {@link module:ui/dialog/dialog~DialogDefinition#position `position` property} of a\n* definition passed to the {@link module:ui/dialog/dialog~Dialog#show} method.\n*/\nconst DialogViewPosition = {\n\tSCREEN_CENTER: \"screen-center\",\n\tEDITOR_CENTER: \"editor-center\",\n\tEDITOR_TOP_SIDE: \"editor-top-side\",\n\tEDITOR_TOP_CENTER: \"editor-top-center\",\n\tEDITOR_BOTTOM_CENTER: \"editor-bottom-center\",\n\tEDITOR_ABOVE_CENTER: \"editor-above-center\",\n\tEDITOR_BELOW_CENTER: \"editor-below-center\"\n};\nconst toPx$6 = /* #__PURE__ */ toUnit(\"px\");\nconst DialogViewBase = /* #__PURE__ */ DraggableViewMixin(View);\n/**\n* A dialog view class.\n*/\nvar DialogView = class DialogView extends DialogViewBase {\n\t/**\n\t* A collection of the child views inside of the dialog.\n\t* A dialog can have 3 optional parts: header, content, and actions.\n\t*/\n\tparts;\n\t/**\n\t* A header view of the dialog. It is also a drag handle of the dialog.\n\t*/\n\theaderView;\n\t/**\n\t* A close button view. It is automatically added to the header view if present.\n\t*/\n\tcloseButtonView;\n\t/**\n\t* A view with the action buttons available to the user.\n\t*/\n\tactionsView;\n\t/**\n\t* A default dialog element offset from the reference element (e.g. editor editable area).\n\t*/\n\tstatic defaultOffset = 15;\n\t/**\n\t* A view with the dialog content.\n\t*/\n\tcontentView;\n\t/**\n\t* A keystroke handler instance.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A focus tracker instance.\n\t*/\n\tfocusTracker;\n\t/**\n\t* A flag indicating if the dialog was moved manually. If so, its position\n\t* will not be updated automatically upon window resize or document scroll.\n\t*/\n\twasMoved = false;\n\t/**\n\t* A callback returning the DOM root that requested the dialog.\n\t*/\n\t_getDomRootElement;\n\t/**\n\t* A callback returning the configured editor viewport offset.\n\t*/\n\t_getViewportOffset;\n\t/**\n\t* The list of the focusable elements inside the dialog view.\n\t*/\n\t_focusables;\n\t/**\n\t* The focus cycler instance.\n\t*/\n\t_focusCycler;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, { getDomRootElement, getViewportOffset, keystrokeHandlerOptions }) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = locale.t;\n\t\tthis.set(\"className\", \"\");\n\t\tthis.set(\"ariaLabel\", t(\"Editor dialog\"));\n\t\tthis.set(\"isModal\", false);\n\t\tthis.set(\"position\", DialogViewPosition.SCREEN_CENTER);\n\t\tthis.set(\"_isVisible\", false);\n\t\tthis.set(\"_isTransparent\", false);\n\t\tthis.set(\"_top\", 0);\n\t\tthis.set(\"_left\", 0);\n\t\tthis._getDomRootElement = getDomRootElement;\n\t\tthis._getViewportOffset = getViewportOffset;\n\t\tthis.decorate(\"moveTo\");\n\t\tthis.parts = this.createCollection();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t},\n\t\t\tkeystrokeHandlerOptions\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-dialog-overlay\",\n\t\t\t\t\tbind.if(\"isModal\", \"ck-dialog-overlay__transparent\", (isModal) => !isModal),\n\t\t\t\t\tbind.if(\"_isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: {\n\t\t\t\t\ttabindex: \"-1\",\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t\"ck\",\n\t\t\t\t\t\t\"ck-dialog\",\n\t\t\t\t\t\tbind.if(\"isModal\", \"ck-dialog_modal\"),\n\t\t\t\t\t\tbind.to(\"className\")\n\t\t\t\t\t],\n\t\t\t\t\trole: \"dialog\",\n\t\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\ttop: bind.to(\"_top\", (top) => toPx$6(top)),\n\t\t\t\t\t\tleft: bind.to(\"_left\", (left) => toPx$6(left)),\n\t\t\t\t\t\tvisibility: bind.if(\"_isTransparent\", \"hidden\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tchildren: this.parts\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tif (!data.defaultPrevented) {\n\t\t\t\tthis.fire(\"close\", { source: \"escKeyPress\" });\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\tthis.on(\"drag\", (evt, { deltaX, deltaY }) => {\n\t\t\tthis.wasMoved = true;\n\t\t\tthis.moveBy(deltaX, deltaY);\n\t\t});\n\t\tthis.listenTo(global.window, \"resize\", () => {\n\t\t\tif (this._isVisible && !this.wasMoved) this.updatePosition();\n\t\t});\n\t\tthis.listenTo(global.document, \"scroll\", () => {\n\t\t\tif (this._isVisible && !this.wasMoved) this.updatePosition();\n\t\t});\n\t\tthis.on(\"change:_isVisible\", (evt, name, isVisible) => {\n\t\t\tif (isVisible) {\n\t\t\t\tthis._isTransparent = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.updatePosition();\n\t\t\t\t\tthis._isTransparent = false;\n\t\t\t\t\tthis.focus();\n\t\t\t\t}, 10);\n\t\t\t}\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* Returns the element that should be used as a drag handle.\n\t*/\n\tget dragHandleElement() {\n\t\tif (this.headerView && !this.isModal) return this.headerView.element;\n\t\telse return null;\n\t}\n\t/**\n\t* Creates the dialog parts. Which of them are created depends on the arguments passed to the method.\n\t* There are no rules regarding the dialog construction, that is, no part is mandatory.\n\t* Each part can only be created once.\n\t*\n\t* @internal\n\t*/\n\tsetupParts({ icon, title, hasCloseButton = true, content, actionButtons }) {\n\t\tif (title) {\n\t\t\tthis.headerView = new FormHeaderView(this.locale, { icon });\n\t\t\tif (hasCloseButton) {\n\t\t\t\tthis.closeButtonView = this._createCloseButton();\n\t\t\t\tthis.headerView.children.add(this.closeButtonView);\n\t\t\t}\n\t\t\tthis.headerView.label = title;\n\t\t\tthis.ariaLabel = title;\n\t\t\tthis.parts.add(this.headerView, 0);\n\t\t}\n\t\tif (content) {\n\t\t\tif (content instanceof View) content = [content];\n\t\t\tthis.contentView = new DialogContentView(this.locale);\n\t\t\tthis.contentView.children.addMany(content);\n\t\t\tthis.parts.add(this.contentView);\n\t\t}\n\t\tif (actionButtons) {\n\t\t\tthis.actionsView = new DialogActionsView(this.locale);\n\t\t\tthis.actionsView.setButtons(actionButtons);\n\t\t\tthis.parts.add(this.actionsView);\n\t\t}\n\t\tthis._updateFocusCyclableItems();\n\t}\n\t/**\n\t* Focuses the first focusable element inside the dialog.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Normalizes the passed coordinates to make sure the dialog view\n\t* is displayed within the visible viewport and moves it there.\n\t*\n\t* @internal\n\t*/\n\tmoveTo(left, top) {\n\t\tconst viewportRect = this._getViewportRect();\n\t\tconst dialogRect = this._getDialogRect();\n\t\tif (left + dialogRect.width > viewportRect.right) left = viewportRect.right - dialogRect.width;\n\t\tif (left < viewportRect.left) left = viewportRect.left;\n\t\tif (top < viewportRect.top) top = viewportRect.top;\n\t\tthis._moveTo(left, top);\n\t}\n\t/**\n\t* Moves the dialog to the specified coordinates.\n\t*/\n\t_moveTo(left, top) {\n\t\tthis._left = left;\n\t\tthis._top = top;\n\t}\n\t/**\n\t* Moves the dialog by the specified offset.\n\t*\n\t* @internal\n\t*/\n\tmoveBy(left, top) {\n\t\tthis.moveTo(this._left + left, this._top + top);\n\t}\n\t/**\n\t* Moves the dialog view to the off-screen position.\n\t* Used when there is no space to display the dialog.\n\t*/\n\t_moveOffScreen() {\n\t\tthis._moveTo(-9999, -9999);\n\t}\n\t/**\n\t* Recalculates the dialog according to the set position and viewport,\n\t* and moves it to the new position.\n\t*/\n\tupdatePosition() {\n\t\tif (!this.element || !this.element.parentNode) return;\n\t\tconst viewportRect = this._getViewportRect();\n\t\tlet configuredPosition = this.position;\n\t\tlet domRootRect = null;\n\t\tlet visibleDomRootRect = null;\n\t\tif (!this._getDomRootElement()) configuredPosition = DialogViewPosition.SCREEN_CENTER;\n\t\telse ({domRootRect, visibleDomRootRect} = this._getDomRootRects(viewportRect));\n\t\tconst defaultOffset = DialogView.defaultOffset;\n\t\tconst dialogRect = this._getDialogRect();\n\t\tif (this.position == null) return;\n\t\telse if (typeof this.position == \"function\") {\n\t\t\tconst coords = this.position(dialogRect, visibleDomRootRect, domRootRect);\n\t\t\tif (coords == null) {\n\t\t\t\tthis._moveOffScreen();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._moveTo(coords.left, coords.top);\n\t\t\treturn;\n\t\t}\n\t\tswitch (configuredPosition) {\n\t\t\tcase DialogViewPosition.EDITOR_TOP_SIDE:\n\t\t\t\tif (visibleDomRootRect) {\n\t\t\t\t\tconst leftCoordinate = this.locale.contentLanguageDirection === \"ltr\" ? visibleDomRootRect.right - dialogRect.width - defaultOffset : visibleDomRootRect.left + defaultOffset;\n\t\t\t\t\tthis.moveTo(leftCoordinate, visibleDomRootRect.top + defaultOffset);\n\t\t\t\t} else this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), Math.round(visibleDomRootRect.top + visibleDomRootRect.height / 2 - dialogRect.height / 2));\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.SCREEN_CENTER:\n\t\t\t\tthis.moveTo(Math.round((viewportRect.width - dialogRect.width) / 2), Math.round((viewportRect.height - dialogRect.height) / 2));\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_TOP_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.top + defaultOffset);\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_BOTTOM_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.bottom - dialogRect.height - defaultOffset);\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_ABOVE_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.top - dialogRect.height - defaultOffset);\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_BELOW_CENTER: if (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.bottom + defaultOffset);\n\t\t\telse this._moveOffScreen();\n\t\t}\n\t}\n\t/**\n\t* Calculates the {@link #_getDomRootElement DOM root element's} Rect and its corresponding visible DOM root Rect.\n\t*\n\t* The visible Rect is the part of the DOM root Rect that is actually visible to the user\n\t* (see {@link module:utils/dom/rect~Rect#getVisible}), and overlaps with the viewport.\n\t*\n\t* **Note**: It might be that the visible DOM root Rect is not available (root off the screen, cropped by parent elements, etc.)\n\t* but its general DOM root Rect is still available.\n\t*/\n\t_getDomRootRects(viewportRect) {\n\t\tconst domRootRect = new Rect(this._getDomRootElement());\n\t\tlet visibleDomRootRect = domRootRect.getVisible();\n\t\tif (visibleDomRootRect) visibleDomRootRect = viewportRect.getIntersection(visibleDomRootRect);\n\t\treturn {\n\t\t\tvisibleDomRootRect,\n\t\t\tdomRootRect\n\t\t};\n\t}\n\t/**\n\t* Calculates the dialog element rect.\n\t*/\n\t_getDialogRect() {\n\t\treturn new Rect(this.element.firstElementChild);\n\t}\n\t/**\n\t* Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n\t*/\n\t_getViewportRect() {\n\t\tconst viewportRect = new Rect(global.window);\n\t\tif (this.isModal) return viewportRect;\n\t\treturn getConstrainedViewportRect(this._getViewportOffset());\n\t}\n\t/**\n\t* Collects all focusable elements inside the dialog parts\n\t* and adds them to the focus tracker and focus cycler.\n\t*/\n\t_updateFocusCyclableItems() {\n\t\tconst focusables = [];\n\t\tif (this.contentView) {\n\t\t\tfor (const child of this.contentView.children) if (isFocusable(child)) focusables.push(child);\n\t\t}\n\t\tif (this.actionsView) focusables.push(this.actionsView);\n\t\tif (this.closeButtonView) focusables.push(this.closeButtonView);\n\t\tfocusables.forEach((focusable) => {\n\t\t\tthis._focusables.add(focusable);\n\t\t\tthis.focusTracker.add(focusable.element);\n\t\t\tif (isViewWithFocusCycler(focusable)) this._focusCycler.chain(focusable.focusCycler);\n\t\t});\n\t}\n\t/**\n\t* Creates the close button view that is displayed in the header view corner.\n\t*/\n\t_createCloseButton() {\n\t\tconst buttonView = new ButtonView(this.locale);\n\t\tconst t = this.locale.t;\n\t\tbuttonView.set({\n\t\t\tlabel: t(\"Close\"),\n\t\t\ttooltip: true,\n\t\t\ticon: IconCancel\n\t\t});\n\t\tbuttonView.on(\"execute\", () => this.fire(\"close\", { source: \"closeButton\" }));\n\t\treturn buttonView;\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* The dialog controller class. It is used to show and hide the {@link module:ui/dialog/dialogview~DialogView}.\n*/\nvar Dialog = class Dialog extends Plugin {\n\t/**\n\t* The currently visible dialog view instance.\n\t*/\n\tview;\n\t/**\n\t* The `Dialog` plugin instance which most recently showed the dialog.\n\t*\n\t* Only one dialog can be visible at once, even if there are many editor instances on the page.\n\t* If an editor wants to show a dialog, it should first hide the dialog that is already opened.\n\t* But only the `Dialog` instance that showed the dialog is able able to properly hide it.\n\t* This is why we need to store it in a globally available space (static property).\n\t* This way every `Dialog` plugin in every editor is able to correctly close any open dialog window.\n\t*/\n\tstatic _visibleDialogPlugin;\n\t/**\n\t* A configurable callback called when the dialog is hidden.\n\t*/\n\t_onHide;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Dialog\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tconst t = editor.t;\n\t\tthis._initShowHideListeners();\n\t\tthis._initFocusToggler();\n\t\tthis._initMultiRootIntegration();\n\t\tthis.set({\n\t\t\tid: null,\n\t\t\tisOpen: false\n\t\t});\n\t\teditor.accessibility.addKeystrokeInfos({\n\t\t\tcategoryId: \"navigation\",\n\t\t\tkeystrokes: [{\n\t\t\t\tlabel: t(\"Move focus in and out of an active dialog window\"),\n\t\t\t\tkeystroke: \"Ctrl+F6\",\n\t\t\t\tmayRequireFn: true\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (Dialog._visibleDialogPlugin === this) this._unlockBodyScroll();\n\t}\n\t/**\n\t* Initiates listeners for the `show` and `hide` events emitted by this plugin.\n\t*\n\t* We could not simply decorate the {@link #show} and {@link #hide} methods to fire events,\n\t* because they would be fired in the wrong order &ndash; first would be `show` and then `hide`\n\t* (because showing the dialog actually starts with hiding the previously visible one).\n\t* Hence, we added private methods {@link #_show} and {@link #_hide} which are called on events\n\t* in the desired sequence.\n\t*/\n\t_initShowHideListeners() {\n\t\tthis.on(\"show\", (evt, args) => {\n\t\t\tthis._show(args);\n\t\t});\n\t\tthis.on(\"show\", (evt, args) => {\n\t\t\tif (args.onShow) args.onShow(this);\n\t\t}, { priority: \"low\" });\n\t\tthis.on(\"hide\", () => {\n\t\t\tif (Dialog._visibleDialogPlugin) Dialog._visibleDialogPlugin._hide();\n\t\t});\n\t\tthis.on(\"hide\", () => {\n\t\t\tif (this._onHide) {\n\t\t\t\tthis._onHide(this);\n\t\t\t\tthis._onHide = void 0;\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Initiates keystroke handler for toggling the focus between the editor and the dialog view.\n\t*/\n\t_initFocusToggler() {\n\t\tconst editor = this.editor;\n\t\teditor.keystrokes.set(\"Ctrl+F6\", (data, cancel) => {\n\t\t\tif (!this.isOpen || this.view.isModal) return;\n\t\t\tif (this.view.focusTracker.isFocused) editor.editing.view.focus();\n\t\t\telse this.view.focus();\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Provides an integration between the root attaching and detaching and positioning of the view.\n\t*/\n\t_initMultiRootIntegration() {\n\t\tconst model = this.editor.model;\n\t\tmodel.document.on(\"change:data\", () => {\n\t\t\tif (!this.view) return;\n\t\t\tconst changedRoots = model.document.differ.getChangedRoots();\n\t\t\tfor (const changes of changedRoots) if (changes.state) this.view.updatePosition();\n\t\t});\n\t}\n\t/**\n\t* Displays a dialog window.\n\t*\n\t* This method requires a {@link ~DialogDefinition} that defines the dialog's content, title, icon, action buttons, etc.\n\t*\n\t* For example, the following definition will create a dialog with:\n\t* * A header consisting of an icon, a title, and a \"Close\" button (it is added by default).\n\t* * A content consisting of a view with a single paragraph.\n\t* * A footer consisting of two buttons: \"Yes\" and \"No\".\n\t*\n\t* ```js\n\t* // Create the view that will be used as the dialog's content.\n\t* const textView = new View( locale );\n\t*\n\t* textView.setTemplate( {\n\t* \ttag: 'div',\n\t* \tattributes: {\n\t* \t\tstyle: {\n\t* \t\t\tpadding: 'var(--ck-spacing-large)',\n\t* \t\t\twhiteSpace: 'initial',\n\t* \t\t\twidth: '100%',\n\t* \t\t\tmaxWidth: '500px'\n\t* \t\t},\n\t* \t\ttabindex: -1\n\t* \t},\n\t* \tchildren: [\n\t* \t\t'Lorem ipsum dolor sit amet...'\n\t* \t]\n\t* } );\n\t*\n\t* // Show the dialog.\n\t* editor.plugins.get( 'Dialog' ).show( {\n\t*\tid: 'myDialog',\n\t* \ticon: 'myIcon', // This should be an SVG string.\n\t* \ttitle: 'My dialog',\n\t* \tcontent: textView,\n\t* \tactionButtons: [\n\t*\t\t{\n\t*\t\t\tlabel: t( 'Yes' ),\n\t*\t\t\tclass: 'ck-button-action',\n\t*\t\t\twithText: true,\n\t*\t\t\tonExecute: () => dialog.hide()\n\t*\t\t},\n\t*\t\t{\n\t*\t\t\tlabel: t( 'No' ),\n\t*\t\t\twithText: true,\n\t*\t\t\tonExecute: () => dialog.hide()\n\t*\t\t}\n\t*\t]\n\t* } );\n\t* ```\n\t*\n\t* By specifying the {@link ~DialogDefinition#onShow} and {@link ~DialogDefinition#onHide} callbacks\n\t* it is also possible to add callbacks that will be called when the dialog is shown or hidden.\n\t*\n\t* For example, the callbacks in the following definition:\n\t* * Disable the default behavior of the <kbd>Esc</kbd> key.\n\t* * Fire a custom event when the dialog gets hidden.\n\t*\n\t* ```js\n\t* editor.plugins.get( 'Dialog' ).show( {\n\t* \t// ...\n\t* \tonShow: dialog => {\n\t* \t\tdialog.view.on( 'close', ( evt, data ) => {\n\t* \t\t\t// Only prevent the event from the \"Esc\" key - do not affect the other ways of closing the dialog.\n\t* \t\t\tif ( data.source === 'escKeyPress' ) {\n\t* \t\t\t\tevt.stop();\n\t* \t\t\t}\n\t* \t\t} );\n\t* \t},\n\t* \tonHide: dialog => {\n\t* \t\tdialog.fire( 'dialogDestroyed' );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* Internally, calling this method:\n\t* 1. Hides the currently visible dialog (if any) calling the {@link #hide} method\n\t* (fires the {@link ~DialogHideEvent hide event}).\n\t* 2. Fires the {@link ~DialogShowEvent show event} which allows for adding callbacks that customize the\n\t* behavior of the dialog.\n\t* 3. Shows the dialog.\n\t*/\n\tshow(dialogDefinition) {\n\t\tthis.hide();\n\t\tthis.fire(`show:${dialogDefinition.id}`, dialogDefinition);\n\t}\n\t/**\n\t* Handles creating the {@link module:ui/dialog/dialogview~DialogView} instance and making it visible.\n\t*/\n\t_show({ id, icon, title, hasCloseButton = true, content, actionButtons, className, isModal, position, onHide, getRootName, keystrokeHandlerOptions }) {\n\t\tconst editor = this.editor;\n\t\tthis.view = new DialogView(editor.locale, {\n\t\t\tgetDomRootElement: () => {\n\t\t\t\tconst rootName = getRootName?.() ?? this.editor.model.document.selection.anchor.root.rootName;\n\t\t\t\tif (!rootName || !editor.editing.view.domRoots.has(rootName)) return null;\n\t\t\t\treturn editor.editing.view.getDomRoot(rootName) ?? null;\n\t\t\t},\n\t\t\tgetViewportOffset: () => {\n\t\t\t\treturn editor.ui.viewportOffset;\n\t\t\t},\n\t\t\tkeystrokeHandlerOptions\n\t\t});\n\t\tconst view = this.view;\n\t\tview.on(\"close\", () => {\n\t\t\tthis.hide();\n\t\t});\n\t\teditor.ui.view.body.add(view);\n\t\teditor.keystrokes.listenTo(view.element);\n\t\tif (!position) position = isModal ? DialogViewPosition.SCREEN_CENTER : DialogViewPosition.EDITOR_CENTER;\n\t\tif (isModal) this._lockBodyScroll();\n\t\tview.set({\n\t\t\tposition,\n\t\t\t_isVisible: true,\n\t\t\tclassName,\n\t\t\tisModal\n\t\t});\n\t\tview.setupParts({\n\t\t\ticon,\n\t\t\ttitle,\n\t\t\thasCloseButton,\n\t\t\tcontent,\n\t\t\tactionButtons\n\t\t});\n\t\tthis.id = id;\n\t\tif (onHide) this._onHide = onHide;\n\t\tthis.isOpen = true;\n\t\tDialog._visibleDialogPlugin = this;\n\t}\n\t/**\n\t* Hides the dialog. This method is decorated to enable interacting on the {@link ~DialogHideEvent hide event}.\n\t*\n\t* See {@link #show}.\n\t*/\n\thide() {\n\t\tif (Dialog._visibleDialogPlugin) Dialog._visibleDialogPlugin.fire(`hide:${Dialog._visibleDialogPlugin.id}`);\n\t}\n\t/**\n\t* Destroys the {@link module:ui/dialog/dialogview~DialogView} and cleans up the stored dialog state.\n\t*/\n\t_hide() {\n\t\tif (!this.view) return;\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tif (view.isModal) this._unlockBodyScroll();\n\t\tif (view.contentView) view.contentView.reset();\n\t\teditor.ui.view.body.remove(view);\n\t\teditor.ui.focusTracker.remove(view.element);\n\t\teditor.keystrokes.stopListening(view.element);\n\t\tview.destroy();\n\t\teditor.editing.view.focus();\n\t\tthis.id = null;\n\t\tthis.isOpen = false;\n\t\tDialog._visibleDialogPlugin = null;\n\t}\n\t/**\n\t* Makes the <body> unscrollable (e.g. when the modal shows up).\n\t*/\n\t_lockBodyScroll() {\n\t\tdocument.documentElement.classList.add(\"ck-dialog-scroll-locked\");\n\t}\n\t/**\n\t* Makes the <body> scrollable again (e.g. once the modal hides).\n\t*/\n\t_unlockBodyScroll() {\n\t\tdocument.documentElement.classList.remove(\"ck-dialog-scroll-locked\");\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* Button that is used as dropdown list item entry.\n*/\nvar ListItemButtonView = class extends ButtonView {\n\t/**\n\t* Holds the view for the check icon of a button list item.\n\t*/\n\t_checkIconHolderView = new CheckIconHolderView();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, labelView = new ButtonLabelView()) {\n\t\tsuper(locale, labelView);\n\t\tthis.set({\n\t\t\thasCheckSpace: false,\n\t\t\t_hasCheck: this.isToggleable\n\t\t});\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-list-item-button\", bind.if(\"isToggleable\", \"ck-list-item-button_toggleable\")] } });\n\t\tthis.bind(\"_hasCheck\").to(this, \"hasCheckSpace\", this, \"isToggleable\", (hasCheckSpace, isToggleable) => hasCheckSpace || isToggleable);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this._hasCheck) this.children.add(this._checkIconHolderView, 0);\n\t\tthis._watchCheckIconHolderMount();\n\t}\n\t/**\n\t* Renders the check icon if the button is toggleable.\n\t*/\n\t_watchCheckIconHolderMount() {\n\t\tthis._checkIconHolderView.bind(\"isOn\").to(this, \"isOn\", (value) => this.isToggleable && value);\n\t\tthis.on(\"change:_hasCheck\", (evt, propertyName, hasCheck) => {\n\t\t\tconst { children, _checkIconHolderView } = this;\n\t\t\tif (hasCheck) children.add(_checkIconHolderView, 0);\n\t\t\telse children.remove(_checkIconHolderView);\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nvar CheckIconHolderView = class extends View {\n\t/**\n\t* Collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* The view for the check icon of the button list item.\n\t*/\n\t_checkIconView = this._createCheckIconView();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.children = this.createCollection();\n\t\tthis.set(\"isOn\", false);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tchildren: this.children,\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-list-item-button__check-holder\",\n\t\t\t\tbind.to(\"isOn\", (isOn) => isOn ? \"ck-on\" : \"ck-off\")\n\t\t\t] }\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this.isOn) this.children.add(this._checkIconView, 0);\n\t\tthis._watchCheckIconMount();\n\t}\n\t/**\n\t* Renders the check icon if the button is toggleable.\n\t*/\n\t_watchCheckIconMount() {\n\t\tthis.on(\"change:isOn\", (evt, propertyName, isOn) => {\n\t\t\tconst { children, _checkIconView } = this;\n\t\t\tif (isOn && !children.has(_checkIconView)) children.add(_checkIconView);\n\t\t\telse if (!isOn && children.has(_checkIconView)) children.remove(_checkIconView);\n\t\t});\n\t}\n\t/**\n\t* Creates a check icon view.\n\t*/\n\t_createCheckIconView() {\n\t\tconst iconView = new IconView();\n\t\ticonView.content = IconCheck;\n\t\ticonView.extendTemplate({ attributes: { class: \"ck-list-item-button__check-icon\" } });\n\t\treturn iconView;\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* A menu bar list button view. Buttons like this one execute user actions.\n*/\nvar MenuBarMenuListItemButtonView = class extends ListItemButtonView {\n\t/**\n\t* Creates an instance of the menu bar list button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-menu-bar__menu__item__button\"] } });\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 ui/editorui/accessibilityhelp/accessibilityhelp\n*/\n/**\n* A plugin that brings the accessibility help dialog to the editor available under the <kbd>Alt</kbd>+<kbd>0</kbd>\n* keystroke and via the \"Accessibility help\" toolbar button. The dialog displays a list of keystrokes that can be used\n* by the user to perform various actions in the editor.\n*\n* Keystroke information is loaded from {@link module:core/accessibility~Accessibility#keystrokeInfos}. New entries can be\n* added using the API provided by the {@link module:core/accessibility~Accessibility} class.\n*/\nvar AccessibilityHelp = class extends Plugin {\n\t/**\n\t* The view that displays the dialog content (list of keystrokes).\n\t* Created when the dialog is opened for the first time.\n\t*/\n\tcontentView = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Dialog];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AccessibilityHelp\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\teditor.ui.componentFactory.add(\"accessibilityHelp\", () => {\n\t\t\tconst button = this._createButton(ButtonView);\n\t\t\tbutton.set({\n\t\t\t\ttooltip: true,\n\t\t\t\twithText: false,\n\t\t\t\tlabel: t(\"Accessibility help\")\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:accessibilityHelp\", () => {\n\t\t\tconst button = this._createButton(MenuBarMenuListItemButtonView);\n\t\t\tbutton.label = t(\"Accessibility\");\n\t\t\treturn button;\n\t\t});\n\t\teditor.keystrokes.set(\"Alt+0\", (evt, cancel) => {\n\t\t\tthis._toggleDialog();\n\t\t\tcancel();\n\t\t});\n\t\tthis._setupRootLabels();\n\t}\n\t/**\n\t* Creates a button to show accessibility help dialog, for use either in toolbar or in menu bar.\n\t*/\n\t_createButton(ButtonClass) {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get(\"Dialog\");\n\t\tconst locale = editor.locale;\n\t\tconst view = new ButtonClass(locale);\n\t\tview.set({\n\t\t\tkeystroke: \"Alt+0\",\n\t\t\ticon: IconAccessibility,\n\t\t\tisToggleable: true\n\t\t});\n\t\tview.on(\"execute\", () => this._toggleDialog());\n\t\tview.bind(\"isOn\").to(dialog, \"id\", (id) => id === \"accessibilityHelp\");\n\t\treturn view;\n\t}\n\t/**\n\t* Injects a help text into each editing root's `aria-label` attribute allowing assistive technology users\n\t* to discover the availability of the Accessibility help dialog.\n\t*/\n\t_setupRootLabels() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst t = editor.t;\n\t\teditor.ui.on(\"ready\", () => {\n\t\t\teditingView.change((writer) => {\n\t\t\t\tfor (const root of editingView.document.roots) addAriaLabelTextToRoot(writer, root);\n\t\t\t});\n\t\t\teditor.on(\"addRoot\", (evt, modelRoot) => {\n\t\t\t\tconst viewRoot = editor.editing.view.document.getRoot(modelRoot.rootName);\n\t\t\t\teditingView.change((writer) => addAriaLabelTextToRoot(writer, viewRoot));\n\t\t\t}, { priority: \"low\" });\n\t\t});\n\t\tfunction addAriaLabelTextToRoot(writer, viewRoot) {\n\t\t\tconst newAriaLabel = [viewRoot.getAttribute(\"aria-label\"), t(\"Press %0 for help.\", [getEnvKeystrokeText(\"Alt+0\")])].filter((segment) => segment).join(\". \");\n\t\t\twriter.setAttribute(\"aria-label\", newAriaLabel, viewRoot);\n\t\t}\n\t}\n\t/**\n\t* Shows the accessibility help dialog. Also, creates {@link #contentView} on demand.\n\t*/\n\t_toggleDialog() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get(\"Dialog\");\n\t\tconst t = editor.locale.t;\n\t\tif (!this.contentView) this.contentView = new AccessibilityHelpContentView(editor.locale, editor.accessibility.keystrokeInfos);\n\t\tif (dialog.id === \"accessibilityHelp\") dialog.hide();\n\t\telse dialog.show({\n\t\t\tid: \"accessibilityHelp\",\n\t\t\tclassName: \"ck-accessibility-help-dialog\",\n\t\t\ttitle: t(\"Accessibility help\"),\n\t\t\ticon: IconAccessibility,\n\t\t\thasCloseButton: true,\n\t\t\tcontent: this.contentView\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 ui/editorui/bodycollection\n*/\n/**\n* This is a special {@link module:ui/viewcollection~ViewCollection} dedicated to elements that are detached from the DOM structure of\n* the editor, like floating panels, floating toolbars, dialogs, etc.\n*\n* The body collection is available under the {@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`} property.\n* Any plugin can add a {@link module:ui/view~View view} to this collection.\n*\n* All views added to a body collection render in a dedicated DOM container (`<div class=\"ck ck-body ...\">...</div>`). All body collection\n* containers render in a common shared (`<div class=\"ck-body-wrapper\">...</div>`) in the DOM to limit the pollution of\n* the `<body>` element. The resulting DOM structure is as follows:\n*\n* ```html\n* <body>\n* \t<!-- Content of the webpage... -->\n*\n* \t<!-- The shared wrapper for all body collection containers. -->\n* \t<div class=\"ck-body-wrapper\">\n* \t\t<!-- The container of the first body collection instance. -->\n* \t\t<div class=\"ck ck-body ...\">\n* \t\t\t<!-- View elements belonging to the first body collection -->\n* \t\t</div>\n*\n* \t\t<!-- The container of the second body collection instance. -->\n* \t\t<div class=\"ck ck-body ...\">...</div>\n*\n* \t\t<!-- More body collection containers for the rest of instances... -->\n* \t</div>\n* </body>\n* ```\n*\n* By default, the {@link module:ui/editorui/editoruiview~EditorUIView `editor.ui.view`} manages the life cycle of the\n* {@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`} collection, attaching and detaching it\n* when the editor gets created or {@link module:core/editor/editor~Editor#destroy destroyed}.\n*\n* # Custom body collection instances\n*\n* Even though most editor instances come with a built-in body collection\n* ({@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`}), you can create your own instance of this\n* class if you need to control their life cycle.\n*\n* The life cycle of a custom body collection must be handled manually by the developer using the dedicated API:\n* * A body collection will render itself automatically in the DOM as soon as you call {@link ~BodyCollection#attachToDom}.\n* * Calling {@link ~BodyCollection#detachFromDom} will remove the collection from the DOM.\n*\n* **Note**: The shared collection wrapper (`<div class=\"ck-body-wrapper\">...</div>`) gets automatically removed from DOM when the\n* last body collection is {@link ~BodyCollection#detachFromDom detached} and does not require any special handling.\n*/\nvar BodyCollection = class BodyCollection extends ViewCollection {\n\t/**\n\t* The {@link module:core/editor/editor~Editor#locale editor's locale} instance.\n\t* See the view {@link module:ui/view~View#locale locale} property.\n\t*/\n\tlocale;\n\t/**\n\t* The element holding elements of the body collection.\n\t*/\n\t_bodyCollectionContainer;\n\t/**\n\t* The wrapper element that holds all of the {@link #_bodyCollectionContainer} elements.\n\t*/\n\tstatic _bodyWrapper;\n\t/**\n\t* Creates a new instance of the {@link module:ui/editorui/bodycollection~BodyCollection}.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor editor's locale} instance.\n\t* @param initialItems The initial items of the collection.\n\t*/\n\tconstructor(locale, initialItems = []) {\n\t\tsuper(initialItems);\n\t\tthis.locale = locale;\n\t}\n\t/**\n\t* The element holding elements of the body collection.\n\t*/\n\tget bodyCollectionContainer() {\n\t\treturn this._bodyCollectionContainer;\n\t}\n\t/**\n\t* Attaches the body collection to the DOM body element. You need to execute this method to render the content of\n\t* the body collection.\n\t*/\n\tattachToDom() {\n\t\tthis._bodyCollectionContainer = new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset_all\",\n\t\t\t\t\t\"ck-body\",\n\t\t\t\t\t\"ck-rounded-corners\"\n\t\t\t\t],\n\t\t\t\tdir: this.locale.uiLanguageDirection,\n\t\t\t\trole: \"application\"\n\t\t\t},\n\t\t\tchildren: this\n\t\t}).render();\n\t\tif (!BodyCollection._bodyWrapper || !BodyCollection._bodyWrapper.isConnected) {\n\t\t\tBodyCollection._bodyWrapper = createElement(document, \"div\", { class: \"ck-body-wrapper\" });\n\t\t\tdocument.body.appendChild(BodyCollection._bodyWrapper);\n\t\t}\n\t\tBodyCollection._bodyWrapper.appendChild(this._bodyCollectionContainer);\n\t}\n\t/**\n\t* Detaches the collection from the DOM structure. Use this method when you do not need to use the body collection\n\t* anymore to clean-up the DOM structure.\n\t*/\n\tdetachFromDom() {\n\t\tsuper.destroy();\n\t\tif (this._bodyCollectionContainer) this._bodyCollectionContainer.remove();\n\t\tif (BodyCollection._bodyWrapper && !BodyCollection._bodyWrapper.childElementCount) {\n\t\t\tBodyCollection._bodyWrapper.remove();\n\t\t\tdelete BodyCollection._bodyWrapper;\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 ui/panel/balloon/balloonpanelview\n*/\nconst toPx$5 = /* #__PURE__ */ toUnit(\"px\");\nconst POSITION_OFF_SCREEN = {\n\ttop: -99999,\n\tleft: -99999,\n\tname: \"arrowless\",\n\tconfig: { withArrow: false }\n};\n/**\n* The balloon panel view class.\n*\n* A floating container which can\n* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#pin pin} to any\n* {@link module:utils/dom/position~DomOptimalPositionOptions#target target} in the DOM and remain in that position\n* e.g. when the web page is scrolled.\n*\n* The balloon panel can be used to display contextual, non-blocking UI like forms, toolbars and\n* the like in its {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#content} view\n* collection.\n*\n* There is a number of {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}\n* that the balloon can use, automatically switching from one to another when the viewport space becomes\n* scarce to keep the balloon visible to the user as long as it is possible. The balloon will also\n* accept any custom position set provided by the user compatible with the\n* {@link module:utils/dom/position~DomOptimalPositionOptions options}.\n*\n* ```ts\n* const panel = new BalloonPanelView( locale );\n* const childView = new ChildView();\n* const positions = BalloonPanelView.defaultPositions;\n*\n* panel.render();\n*\n* // Add a child view to the panel's content collection.\n* panel.content.add( childView );\n*\n* // Start pinning the panel to an element with the \"target\" id DOM.\n* // The balloon will remain pinned until unpin() is called.\n* panel.pin( {\n* \ttarget: document.querySelector( '#target' ),\n* \tpositions: [\n* \t\tpositions.northArrowSouth,\n* \t\tpositions.southArrowNorth\n* \t]\n* } );\n* ```\n*/\nvar BalloonPanelView = class BalloonPanelView extends View {\n\t/**\n\t* A collection of the child views that creates the balloon panel contents.\n\t*/\n\tcontent;\n\t/**\n\t* A callback that starts pinning the panel when {@link #isVisible} gets\n\t* `true`. Used by {@link #pin}.\n\t*\n\t* @private\n\t*/\n\t_pinWhenIsVisibleCallback;\n\t/**\n\t* An instance of resize observer used to detect if target element is still visible.\n\t*/\n\t_resizeObserver;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"top\", 0);\n\t\tthis.set(\"left\", 0);\n\t\tthis.set(\"position\", \"arrow_nw\");\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"withArrow\", true);\n\t\tthis.set(\"class\", void 0);\n\t\tthis._pinWhenIsVisibleCallback = null;\n\t\tthis._resizeObserver = null;\n\t\tthis.content = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-balloon-panel\",\n\t\t\t\t\tbind.to(\"position\", (value) => `ck-balloon-panel_${value}`),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-balloon-panel_visible\"),\n\t\t\t\t\tbind.if(\"withArrow\", \"ck-balloon-panel_with-arrow\"),\n\t\t\t\t\tbind.to(\"class\")\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to(\"top\", toPx$5),\n\t\t\t\t\tleft: bind.to(\"left\", toPx$5)\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis.hide();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Shows the panel.\n\t*\n\t* See {@link #isVisible}.\n\t*/\n\tshow() {\n\t\tthis.isVisible = true;\n\t}\n\t/**\n\t* Hides the panel.\n\t*\n\t* See {@link #isVisible}.\n\t*/\n\thide() {\n\t\tthis.isVisible = false;\n\t}\n\t/**\n\t* Attaches the panel to a specified {@link module:utils/dom/position~DomOptimalPositionOptions#target} with a\n\t* smart positioning heuristics that chooses from available positions to make sure the panel\n\t* is visible to the user i.e. within the limits of the viewport.\n\t*\n\t* This method accepts configuration {@link module:utils/dom/position~DomOptimalPositionOptions options}\n\t* to set the `target`, optional `limiter` and `positions` the balloon should choose from.\n\t*\n\t* ```ts\n\t* const panel = new BalloonPanelView( locale );\n\t* const positions = BalloonPanelView.defaultPositions;\n\t*\n\t* panel.render();\n\t*\n\t* // Attach the panel to an element with the \"target\" id DOM.\n\t* panel.attachTo( {\n\t* \ttarget: document.querySelector( '#target' ),\n\t* \tpositions: [\n\t* \t\tpositions.northArrowSouth,\n\t* \t\tpositions.southArrowNorth\n\t* \t]\n\t* } );\n\t* ```\n\t*\n\t* **Note**: Attaching the panel will also automatically {@link #show} it.\n\t*\n\t* **Note**: An attached panel will not follow its target when the window is scrolled or resized.\n\t* See the {@link #pin} method for a more permanent positioning strategy.\n\t*\n\t* @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t* Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t* @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t* provided in the options is invisible (e.g. element detached from DOM).\n\t*/\n\tattachTo(options) {\n\t\tconst target = getDomElement(options.target);\n\t\tif (target && !isVisible(target)) return false;\n\t\tthis.show();\n\t\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\t\tconst positionOptions = Object.assign({}, {\n\t\t\telement: this.element,\n\t\t\tpositions: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleWest,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.northArrowSouth,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleWest,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleEast,\n\t\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\t\tdefaultPositions.viewportStickyNorth\n\t\t\t],\n\t\t\tlimiter: global.document.body,\n\t\t\tfitInViewport: true\n\t\t}, options);\n\t\tconst optimalPosition = BalloonPanelView._getOptimalPosition(positionOptions) || POSITION_OFF_SCREEN;\n\t\tconst left = parseInt(optimalPosition.left);\n\t\tconst top = parseInt(optimalPosition.top);\n\t\tconst position = optimalPosition.name;\n\t\tconst { withArrow = true } = optimalPosition.config || {};\n\t\tthis.top = top;\n\t\tthis.left = left;\n\t\tthis.position = position;\n\t\tthis.withArrow = withArrow;\n\t\treturn true;\n\t}\n\t/**\n\t* Works the same way as the {@link #attachTo} method except that the position of the panel is\n\t* continuously updated when:\n\t*\n\t* * any ancestor of the {@link module:utils/dom/position~DomOptimalPositionOptions#target}\n\t* or {@link module:utils/dom/position~DomOptimalPositionOptions#limiter} is scrolled,\n\t* * the browser window gets resized or scrolled.\n\t*\n\t* Thanks to that, the panel always sticks to the {@link module:utils/dom/position~DomOptimalPositionOptions#target}\n\t* and is immune to the changing environment.\n\t*\n\t* ```ts\n\t* const panel = new BalloonPanelView( locale );\n\t* const positions = BalloonPanelView.defaultPositions;\n\t*\n\t* panel.render();\n\t*\n\t* // Pin the panel to an element with the \"target\" id DOM.\n\t* panel.pin( {\n\t* \ttarget: document.querySelector( '#target' ),\n\t* \tpositions: [\n\t* \t\tpositions.northArrowSouth,\n\t* \t\tpositions.southArrowNorth\n\t* \t]\n\t* } );\n\t* ```\n\t*\n\t* To leave the pinned state, use the {@link #unpin} method.\n\t*\n\t* **Note**: Pinning the panel will also automatically {@link #show} it.\n\t*\n\t* @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t* Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t*/\n\tpin(options) {\n\t\tthis.unpin();\n\t\tif (!this._startPinning(options)) return;\n\t\tthis._pinWhenIsVisibleCallback = () => {\n\t\t\tif (this.isVisible) this._startPinning(options);\n\t\t\telse this._stopPinning();\n\t\t};\n\t\tthis.listenTo(this, \"change:isVisible\", this._pinWhenIsVisibleCallback);\n\t}\n\t/**\n\t* Stops pinning the panel, as set up by {@link #pin}.\n\t*/\n\tunpin() {\n\t\tif (this._pinWhenIsVisibleCallback) {\n\t\t\tthis._stopPinning();\n\t\t\tthis.stopListening(this, \"change:isVisible\", this._pinWhenIsVisibleCallback);\n\t\t\tthis._pinWhenIsVisibleCallback = null;\n\t\t\tthis.hide();\n\t\t}\n\t}\n\t/**\n\t* Starts managing the pinned state of the panel. See {@link #pin}.\n\t*\n\t* @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t* @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t* provided in the options is invisible (e.g. element detached from DOM).\n\t*/\n\t_startPinning(options) {\n\t\tif (!this.attachTo(options)) return false;\n\t\tlet targetElement = getDomElement(options.target);\n\t\tconst limiterElement = options.limiter ? getDomElement(options.limiter) : global.document.body;\n\t\tthis.listenTo(global.document, \"scroll\", (evt, domEvt) => {\n\t\t\tconst scrollTarget = domEvt.target;\n\t\t\tconst isWithinScrollTarget = targetElement && scrollTarget.contains(targetElement);\n\t\t\tconst isLimiterWithinScrollTarget = limiterElement && scrollTarget.contains(limiterElement);\n\t\t\tif (isWithinScrollTarget || isLimiterWithinScrollTarget || !targetElement || !limiterElement) this.attachTo(options);\n\t\t}, { useCapture: true });\n\t\tthis.listenTo(global.window, \"resize\", () => {\n\t\t\tthis.attachTo(options);\n\t\t});\n\t\tif (!this._resizeObserver) {\n\t\t\tif (targetElement && isText(targetElement)) targetElement = targetElement.parentElement;\n\t\t\tif (targetElement) {\n\t\t\t\tconst checkVisibility = () => {\n\t\t\t\t\tif (!isVisible(targetElement)) this.unpin();\n\t\t\t\t};\n\t\t\t\tthis._resizeObserver = new ResizeObserver(targetElement, checkVisibility);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Stops managing the pinned state of the panel. See {@link #pin}.\n\t*/\n\t_stopPinning() {\n\t\tthis.stopListening(global.document, \"scroll\");\n\t\tthis.stopListening(global.window, \"resize\");\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t\tthis._resizeObserver = null;\n\t\t}\n\t}\n\t/**\n\t* Returns available {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n\t* {@link module:utils/dom/position~PositioningFunction positioning functions} adjusted by the specific offsets.\n\t*\n\t* @internal\n\t* @param options Options to generate positions. If not specified, this helper will simply return\n\t* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t* @param options.sideOffset A custom side offset (in pixels) of each position. If\n\t* not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowSideOffset the default value}\n\t* will be used.\n\t* @param options.heightOffset A custom height offset (in pixels) of each position. If\n\t* not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowHeightOffset the default value}\n\t* will be used.\n\t* @param options.stickyVerticalOffset A custom offset (in pixels) of the `viewportStickyNorth` positioning function.\n\t* If not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.stickyVerticalOffset the default value}\n\t* will be used.\n\t* @param options.config Additional configuration of the balloon balloon panel view.\n\t* Currently only {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#withArrow} is supported. Learn more\n\t* about {@link module:utils/dom/position~PositioningFunction positioning functions}.\n\t*/\n\tstatic generatePositions(options = {}) {\n\t\tconst { sideOffset = BalloonPanelView.arrowSideOffset, heightOffset = BalloonPanelView.arrowHeightOffset, stickyVerticalOffset = BalloonPanelView.stickyVerticalOffset, config } = options;\n\t\treturn {\n\t\t\tnorthWestArrowSouthWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - sideOffset,\n\t\t\t\tname: \"arrow_sw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_smw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_s\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_sme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_se\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\t\tname: \"arrow_sw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_smw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_s\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_sme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_se\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - sideOffset,\n\t\t\t\tname: \"arrow_sw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_smw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_s\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_sme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_se\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthWest: (targetRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - sideOffset,\n\t\t\t\tname: \"arrow_nw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_nmw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_n\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_nme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_ne\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthWest: (targetRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\t\tname: \"arrow_nw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_nmw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_n\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_nme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_ne\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthWest: (targetRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - sideOffset,\n\t\t\t\tname: \"arrow_nw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_nmw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_n\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_nme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_ne\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\twestArrowEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\t\tleft: targetRect.left - balloonRect.width - heightOffset,\n\t\t\t\tname: \"arrow_e\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\teastArrowWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\t\tleft: targetRect.right + heightOffset,\n\t\t\t\tname: \"arrow_w\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tviewportStickyNorth: (targetRect, balloonRect, viewportRect) => {\n\t\t\t\tconst boundaryRect = new Rect(global.document.body).getIntersection(viewportRect.getVisible());\n\t\t\t\tif (!boundaryRect) return null;\n\t\t\t\tconst visibleBoundaryRect = boundaryRect.getVisible();\n\t\t\t\tif (!targetRect.getIntersection(visibleBoundaryRect)) return null;\n\t\t\t\tif (!(visibleBoundaryRect.top - targetRect.top - stickyVerticalOffset < balloonRect.height && visibleBoundaryRect.bottom - targetRect.bottom < balloonRect.height)) return null;\n\t\t\t\treturn {\n\t\t\t\t\ttop: visibleBoundaryRect.top + stickyVerticalOffset,\n\t\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\t\tname: \"arrowless\",\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\twithArrow: false,\n\t\t\t\t\t\t...config\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\t/**\n\t\t* Returns the top coordinate for positions starting with `north*`.\n\t\t*\n\t\t* @param targetRect A rect of the target.\n\t\t* @param balloonRect A rect of the balloon.\n\t\t*/\n\t\tfunction getNorthTop(targetRect, balloonRect) {\n\t\t\treturn targetRect.top - balloonRect.height - heightOffset;\n\t\t}\n\t\t/**\n\t\t* Returns the top coordinate for positions starting with `south*`.\n\t\t*\n\t\t* @param targetRect A rect of the target.\n\t\t*/\n\t\tfunction getSouthTop(targetRect) {\n\t\t\treturn targetRect.bottom + heightOffset;\n\t\t}\n\t}\n\t/**\n\t* A side offset of the arrow tip from the edge of the balloon. Controlled by CSS.\n\t*\n\t* ```\n\t*\t\t ┌───────────────────────┐\n\t*\t\t │                       │\n\t*\t\t │         Balloon       │\n\t*\t\t │         Content       │\n\t*\t\t │                       │\n\t*\t\t └──+    +───────────────┘\n\t*\t\t |   \\  /\n\t*\t\t |    \\/\n\t*\t\t>┼─────┼< ─────────────────────── side offset\n\t*\n\t* ```\n\t*\n\t* @default 25\n\t*/\n\tstatic arrowSideOffset = 25;\n\t/**\n\t* A height offset of the arrow from the edge of the balloon. Controlled by CSS.\n\t*\n\t* ```\n\t*\t\t ┌───────────────────────┐\n\t*\t\t │                       │\n\t*\t\t │         Balloon       │\n\t*\t\t │         Content       │      ╱-- arrow height offset\n\t*\t\t │                       │      V\n\t*\t\t └──+    +───────────────┘ --- ─┼───────\n\t*\t\t     \\  /                       │\n\t*\t\t      \\/                        │\n\t*\t\t────────────────────────────────┼───────\n\t*\t\t                                ^\n\t*\n\t*\n\t*\t\t>┼────┼<  arrow height offset\n\t*\t\t │    │\n\t*\t\t │    ┌────────────────────────┐\n\t*\t\t │    │                        │\n\t*\t\t │   ╱                         │\n\t*\t\t │ ╱            Balloon        │\n\t*\t\t │ ╲            Content        │\n\t*\t\t │   ╲                         │\n\t*\t\t │    │                        │\n\t*\t\t │    └────────────────────────┘\n\t* ```\n\t*\n\t* @default 10\n\t*/\n\tstatic arrowHeightOffset = 10;\n\t/**\n\t* A vertical offset of the balloon panel from the edge of the viewport if sticky.\n\t* It helps in accessing toolbar buttons underneath the balloon panel.\n\t*\n\t* ```\n\t*\t\t  ┌───────────────────────────────────────────────────┐\n\t*\t\t  │                      Target                       │\n\t*\t\t  │                                                   │\n\t*\t\t  │                            /── vertical offset    │\n\t*\t\t┌─────────────────────────────V─────────────────────────┐\n\t*\t\t│ Toolbar            ┌─────────────┐                    │\n\t*\t\t├────────────────────│   Balloon   │────────────────────┤\n\t*\t\t│ │                  └─────────────┘                  │ │\n\t*\t\t│ │                                                   │ │\n\t*\t\t│ │                                                   │ │\n\t*\t\t│ │                                                   │ │\n\t*\t\t│ └───────────────────────────────────────────────────┘ │\n\t*\t\t│                        Viewport                       │\n\t*\t\t└───────────────────────────────────────────────────────┘\n\t* ```\n\t*\n\t* @default 20\n\t*/\n\tstatic stickyVerticalOffset = 20;\n\t/**\n\t* Function used to calculate the optimal position for the balloon.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\n\t/**\n\t* A default set of positioning functions used by the balloon panel view\n\t* when attaching using the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo} method.\n\t*\n\t* The available positioning functions are as follows:\n\t*\n\t* **North west**\n\t*\n\t* * `northWestArrowSouthWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouthMiddleWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t    V\n\t*\t\t    [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouth`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t         V\n\t*\t\t         [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouthMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t             V\n\t*\t\t             [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouthEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t                 V\n\t*\t\t                 [ Target ]\n\t* ```\n\t*\n\t* **North**\n\t*\n\t* * `northArrowSouthWest`\n\t*\n\t* ```\n\t*\t\t    +-----------------+\n\t*\t\t    |     Balloon     |\n\t*\t\t    +-----------------+\n\t*\t\t     V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northArrowSouthMiddleWest`\n\t*\n\t* ```\n\t*\t\t +-----------------+\n\t*\t\t |     Balloon     |\n\t*\t\t +-----------------+\n\t*\t\t     V\n\t*\t\t[ Target ]\n\t* ```\n\t* * `northArrowSouth`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t         V\n\t*\t\t    [ Target ]\n\t* ```\n\t*\n\t* * `northArrowSouthMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t             V\n\t*\t\t        [ Target ]\n\t* ```\n\t*\n\t* * `northArrowSouthEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t                V\n\t*\t\t           [ Target ]\n\t* ```\n\t*\n\t* **North east**\n\t*\n\t* * `northEastArrowSouthWest`\n\t*\n\t* ```\n\t*\t\t        +-----------------+\n\t*\t\t        |     Balloon     |\n\t*\t\t        +-----------------+\n\t*\t\t         V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouthMiddleWest`\n\t*\n\t* ```\n\t*\t\t     +-----------------+\n\t*\t\t     |     Balloon     |\n\t*\t\t     +-----------------+\n\t*\t\t         V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouth`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t         V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouthMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t             V\n\t*\t\t    [ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouthEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t*\t\t                 V\n\t*\t\t        [ Target ]\n\t* ```\n\t*\n\t* **South**\n\t*\n\t* * `southArrowNorthWest`\n\t*\n\t* ```\n\t*\t\t[ Target ]\n\t*\t\t     ^\n\t*\t\t    +-----------------+\n\t*\t\t    |     Balloon     |\n\t*\t\t    +-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorthMiddleWest`\n\t*\n\t* ```\n\t*\t\t   [ Target ]\n\t*\t\t        ^\n\t*\t\t    +-----------------+\n\t*\t\t    |     Balloon     |\n\t*\t\t    +-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorth`\n\t*\n\t* ```\n\t*\t\t    [ Target ]\n\t*\t\t         ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorthMiddleEast`\n\t*\n\t* ```\n\t*\t\t            [ Target ]\n\t*\t\t                 ^\n\t*\t\t   +-----------------+\n\t*\t\t   |     Balloon     |\n\t*\t\t   +-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorthEast`\n\t*\n\t* ```\n\t*\t\t            [ Target ]\n\t*\t\t                 ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **South west**\n\t*\n\t* * `southWestArrowNorthWest`\n\t*\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorthMiddleWest`\n\t*\n\t* ```\n\t*\t\t     [ Target ]\n\t*\t\t     ^\n\t*\t\t +-----------------+\n\t*\t\t |     Balloon     |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorth`\n\t*\n\t* ```\n\t*\t\t         [ Target ]\n\t*\t\t         ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorthMiddleEast`\n\t*\n\t* ```\n\t*\t\t              [ Target ]\n\t*\t\t              ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorthEast`\n\t*\n\t* ```\n\t*\t\t                 [ Target ]\n\t*\t\t                 ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **South east**\n\t*\n\t* * `southEastArrowNorthWest`\n\t*\n\t* ```\n\t*\t\t[ Target ]\n\t*\t\t         ^\n\t*\t\t        +-----------------+\n\t*\t\t        |     Balloon     |\n\t*\t\t        +-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorthMiddleWest`\n\t*\n\t* ```\n\t*\t\t   [ Target ]\n\t*\t\t            ^\n\t*\t\t        +-----------------+\n\t*\t\t        |     Balloon     |\n\t*\t\t        +-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorth`\n\t*\n\t* ```\n\t*\t\t[ Target ]\n\t*\t\t         ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorthMiddleEast`\n\t*\n\t* ```\n\t*\t\t     [ Target ]\n\t*\t\t              ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorthEast`\n\t*\n\t* ```\n\t*\t\t        [ Target ]\n\t*\t\t                 ^\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **West**\n\t*\n\t* * `westArrowEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|     Balloon     |>[ Target ]\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **East**\n\t*\n\t* * `eastArrowWest`\n\t*\n\t* ```\n\t*\t\t           +-----------------+\n\t*\t\t[ Target ]<|     Balloon     |\n\t*\t\t           +-----------------+\n\t* ```\n\t*\n\t* **Sticky**\n\t*\n\t* * `viewportStickyNorth`\n\t*\n\t* ```\n\t*\t\t    +---------------------------+\n\t*\t\t    |        [ Target ]         |\n\t*\t\t    |                           |\n\t*\t\t+-----------------------------------+\n\t*\t\t|   |    +-----------------+    |   |\n\t*\t\t|   |    |     Balloon     |    |   |\n\t*\t\t|   |    +-----------------+    |   |\n\t*\t\t|   |                           |   |\n\t*\t\t|   |                           |   |\n\t*\t\t|   |                           |   |\n\t*\t\t|   |                           |   |\n\t*\t\t|   +---------------------------+   |\n\t*\t\t|             Viewport              |\n\t*\t\t+-----------------------------------+\n\t* ```\n\t*\n\t* See {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo}.\n\t*\n\t* Positioning functions must be compatible with {@link module:utils/dom/position~DomPoint}.\n\t*\n\t* Default positioning functions with customized offsets can be generated using\n\t* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.generatePositions}.\n\t*\n\t* The name that the position function returns will be reflected in the balloon panel's class that\n\t* controls the placement of the \"arrow\". See {@link #position} to learn more.\n\t*/\n\tstatic defaultPositions = /* #__PURE__ */ BalloonPanelView.generatePositions();\n};\n/**\n* Returns the DOM element for given object or null, if there is none,\n* e.g. when the passed object is a Rect instance or so.\n*/\nfunction getDomElement(object) {\n\tif (isElement(object)) return object;\n\tif (isRange(object)) return object.commonAncestorContainer;\n\tif (typeof object == \"function\") return getDomElement(object());\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*/\nconst NARROW_ROOT_HEIGHT_THRESHOLD = 50;\nconst NARROW_ROOT_WIDTH_THRESHOLD = 350;\nconst BadgeBase = /* #__PURE__ */ DomEmitterMixin();\n/**\n* A helper that enables the badge feature in the editor and renders a custom view next to the bottom of the editable element\n* (editor root, source editing area, etc.) when the editor is focused.\n*\n* @private\n*/\nvar Badge = class extends BadgeBase {\n\t/**\n\t* Editor instance the helper was created for.\n\t*/\n\teditor;\n\t/**\n\t* A reference to the balloon panel hosting and positioning the badge content.\n\t*/\n\t_balloonView = null;\n\t/**\n\t* A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.\n\t*/\n\t_showBalloonThrottled = throttle(() => this._showBalloon(), 50, { leading: true });\n\t/**\n\t* A reference to the last editable element (root, source editing area, etc.) focused by the user.\n\t* Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the\n\t* right element whether the user is typing or using the UI.\n\t*/\n\t_lastFocusedEditableElement = null;\n\t/**\n\t* An additional CSS class added to the `BalloonView`.\n\t*/\n\t_balloonClass;\n\t/**\n\t* Creates a badge for a given editor. The feature is initialized on Editor#ready\n\t* event.\n\t*/\n\tconstructor(editor, options = {}) {\n\t\tsuper();\n\t\tthis.editor = editor;\n\t\tthis._balloonClass = options.balloonClass;\n\t\teditor.on(\"ready\", () => this._handleEditorReady());\n\t}\n\t/**\n\t* Destroys the badge along with its view.\n\t*/\n\tdestroy() {\n\t\tconst balloon = this._balloonView;\n\t\tif (balloon) {\n\t\t\tballoon.unpin();\n\t\t\tthis._balloonView = null;\n\t\t}\n\t\tthis._showBalloonThrottled.cancel();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Enables badge label once the editor (ui) is ready.\n\t*/\n\t_handleEditorReady() {\n\t\tconst editor = this.editor;\n\t\tif (!this._isEnabled()) return;\n\t\tif (!editor.ui.view) return;\n\t\teditor.ui.focusTracker.on(\"change:isFocused\", (evt, data, isFocused) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\t\t\tif (isFocused) this._showBalloon();\n\t\t\telse this._hideBalloon();\n\t\t});\n\t\teditor.ui.focusTracker.on(\"change:focusedElement\", (evt, data, focusedElement) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\t\t\tif (focusedElement) this._showBalloon();\n\t\t});\n\t\teditor.ui.on(\"update\", () => {\n\t\t\tthis._showBalloonThrottled();\n\t\t});\n\t}\n\t/**\n\t* Returns normalized configuration for the badge.\n\t*/\n\t_getNormalizedConfig() {\n\t\treturn {\n\t\t\tside: this.editor.locale.contentLanguageDirection === \"ltr\" ? \"right\" : \"left\",\n\t\t\tposition: \"border\",\n\t\t\tverticalOffset: 0,\n\t\t\thorizontalOffset: 5\n\t\t};\n\t}\n\t/**\n\t* Attempts to display the balloon with the badge view.\n\t*/\n\t_showBalloon() {\n\t\tconst attachOptions = this._getBalloonAttachOptions();\n\t\tif (!attachOptions) return;\n\t\tif (!this._balloonView) this._balloonView = this._createBalloonView();\n\t\tthis._balloonView.pin(attachOptions);\n\t}\n\t/**\n\t* Hides the badge balloon if already visible.\n\t*/\n\t_hideBalloon() {\n\t\tif (this._balloonView) this._balloonView.unpin();\n\t}\n\t/**\n\t* Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}\n\t* with the badge view inside ready for positioning.\n\t*/\n\t_createBalloonView() {\n\t\tconst editor = this.editor;\n\t\tconst balloon = new BalloonPanelView();\n\t\tconst view = this._createBadgeContent();\n\t\tballoon.content.add(view);\n\t\tif (this._balloonClass) balloon.class = this._balloonClass;\n\t\teditor.ui.view.body.add(balloon);\n\t\treturn balloon;\n\t}\n\t/**\n\t* Returns the options for attaching the balloon to the focused editable element.\n\t*/\n\t_getBalloonAttachOptions() {\n\t\tif (!this._lastFocusedEditableElement) return null;\n\t\tconst badgeConfig = this._getNormalizedConfig();\n\t\tconst positioningFunction = badgeConfig.side === \"right\" ? getLowerRightCornerPosition(this._lastFocusedEditableElement, badgeConfig) : getLowerLeftCornerPosition(this._lastFocusedEditableElement, badgeConfig);\n\t\treturn {\n\t\t\ttarget: this._lastFocusedEditableElement,\n\t\t\tpositions: [positioningFunction]\n\t\t};\n\t}\n\t/**\n\t* Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.\n\t*/\n\t_updateLastFocusedEditableElement() {\n\t\tconst editor = this.editor;\n\t\tconst isFocused = editor.ui.focusTracker.isFocused;\n\t\tconst focusedElement = editor.ui.focusTracker.focusedElement;\n\t\tif (!isFocused || !focusedElement) {\n\t\t\tthis._lastFocusedEditableElement = null;\n\t\t\treturn;\n\t\t}\n\t\tconst editableEditorElements = Array.from(editor.ui.getEditableElementsNames()).map((name) => {\n\t\t\treturn editor.ui.getEditableElement(name);\n\t\t});\n\t\tif (editableEditorElements.includes(focusedElement)) this._lastFocusedEditableElement = focusedElement;\n\t\telse this._lastFocusedEditableElement = editableEditorElements[0];\n\t}\n};\nfunction getLowerRightCornerPosition(focusedEditableElement, config) {\n\treturn getLowerCornerPosition(focusedEditableElement, config, (rootRect, balloonRect) => {\n\t\treturn rootRect.left + rootRect.width - balloonRect.width - config.horizontalOffset;\n\t});\n}\nfunction getLowerLeftCornerPosition(focusedEditableElement, config) {\n\treturn getLowerCornerPosition(focusedEditableElement, config, (rootRect) => rootRect.left + config.horizontalOffset);\n}\nfunction getLowerCornerPosition(focusedEditableElement, config, getBalloonLeft) {\n\treturn (visibleEditableElementRect, balloonRect) => {\n\t\tconst editableElementRect = new Rect(focusedEditableElement);\n\t\tif (editableElementRect.width < NARROW_ROOT_WIDTH_THRESHOLD || editableElementRect.height < NARROW_ROOT_HEIGHT_THRESHOLD) return null;\n\t\tlet balloonTop;\n\t\tif (config.position === \"inside\") balloonTop = editableElementRect.bottom - balloonRect.height;\n\t\telse balloonTop = editableElementRect.bottom - balloonRect.height / 2;\n\t\tballoonTop -= config.verticalOffset;\n\t\tconst balloonLeft = getBalloonLeft(editableElementRect, balloonRect);\n\t\tconst newBalloonPositionVisibleRect = visibleEditableElementRect.clone().moveTo(balloonLeft, balloonTop).getIntersection(balloonRect.clone().moveTo(balloonLeft, balloonTop)).getVisible();\n\t\tif (!newBalloonPositionVisibleRect || newBalloonPositionVisibleRect.getArea() < balloonRect.getArea()) return null;\n\t\treturn {\n\t\t\ttop: balloonTop,\n\t\t\tleft: balloonLeft,\n\t\t\tname: `position_${config.position}-side_${config.side}`,\n\t\t\tconfig: { withArrow: false }\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 ui/editorui/poweredby\n*/\nconst DEFAULT_LABEL = \"Powered by\";\n/**\n* A helper that enables the \"powered by\" feature in the editor and renders a link to the project's\n* webpage next to the bottom of the editable element (editor root, source editing area, etc.) when the editor is focused.\n*\n* @private\n*/\nvar PoweredBy = class extends Badge {\n\tconstructor(editor) {\n\t\tsuper(editor, { balloonClass: \"ck-powered-by-balloon\" });\n\t}\n\t/**\n\t* Enables \"powered by\" label.\n\t*/\n\t_isEnabled() {\n\t\tconst editor = this.editor;\n\t\tif (editor.config.get(\"ui.poweredBy.forceVisible\")) return true;\n\t\tconst licenseKey = editor.config.get(\"licenseKey\");\n\t\tif (licenseKey == \"GPL\") return true;\n\t\tconst licenseContent = parseBase64EncodedObject(licenseKey.split(\".\")[1]);\n\t\tif (!licenseContent) return true;\n\t\treturn !licenseContent.whiteLabel;\n\t}\n\t/**\n\t* Creates a \"powered by\" badge content.\n\t*/\n\t_createBadgeContent() {\n\t\treturn new PoweredByView(this.editor.locale, this._getNormalizedConfig().label);\n\t}\n\t/**\n\t* Returns the normalized configuration for the \"powered by\" badge.\n\t* It takes the user configuration into account and falls back to the default one.\n\t*/\n\t_getNormalizedConfig() {\n\t\tconst badgeConfig = super._getNormalizedConfig();\n\t\tconst userConfig = this.editor.config.get(\"ui.poweredBy\") || {};\n\t\tconst position = userConfig.position || badgeConfig.position;\n\t\tconst verticalOffset = position === \"inside\" ? 5 : badgeConfig.verticalOffset;\n\t\treturn {\n\t\t\tposition,\n\t\t\tside: userConfig.side || badgeConfig.side,\n\t\t\tlabel: userConfig.label === void 0 ? DEFAULT_LABEL : userConfig.label,\n\t\t\tverticalOffset: userConfig.verticalOffset !== void 0 ? userConfig.verticalOffset : verticalOffset,\n\t\t\thorizontalOffset: userConfig.horizontalOffset !== void 0 ? userConfig.horizontalOffset : badgeConfig.horizontalOffset,\n\t\t\tforceVisible: !!userConfig.forceVisible\n\t\t};\n\t}\n};\n/**\n* A view displaying a \"powered by\" label and project logo wrapped in a link.\n*/\nvar PoweredByView = class extends View {\n\t/**\n\t* Creates an instance of the \"powered by\" view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param label The label text.\n\t*/\n\tconstructor(locale, label) {\n\t\tsuper(locale);\n\t\tconst iconView = new IconView();\n\t\tconst bind = this.bindTemplate;\n\t\ticonView.set({\n\t\t\tcontent: IconProjectLogo,\n\t\t\tisColorInherited: false\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-powered-by\"],\n\t\t\t\t\"aria-hidden\": true\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"a\",\n\t\t\t\tattributes: {\n\t\t\t\t\thref: \"https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo\",\n\t\t\t\t\ttarget: \"_blank\",\n\t\t\t\t\ttabindex: \"-1\"\n\t\t\t\t},\n\t\t\t\tchildren: [...label ? [{\n\t\t\t\t\ttag: \"span\",\n\t\t\t\t\tattributes: { class: [\"ck\", \"ck-powered-by__label\"] },\n\t\t\t\t\tchildren: [label]\n\t\t\t\t}] : [], iconView],\n\t\t\t\ton: { dragstart: bind.to((evt) => evt.preventDefault()) }\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 ui/button/switchbuttonview\n*/\n/**\n* The switch button view class.\n*\n* ```ts\n* const view = new SwitchButtonView();\n*\n* view.set( {\n* \twithText: true,\n* \tlabel: 'Switch me!'\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*/\nvar SwitchButtonView = class extends ButtonView {\n\t/**\n\t* The toggle switch of the button.\n\t*/\n\ttoggleSwitchView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.isToggleable = true;\n\t\tthis.toggleSwitchView = this._createToggleView();\n\t\tthis.extendTemplate({ attributes: { class: \"ck-switchbutton\" } });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.toggleSwitchView);\n\t}\n\t/**\n\t* Creates a toggle child view.\n\t*/\n\t_createToggleView() {\n\t\tconst toggleSwitchView = new View();\n\t\ttoggleSwitchView.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-button__toggle\"] },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-button__toggle__inner\"] }\n\t\t\t}]\n\t\t});\n\t\treturn toggleSwitchView;\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 ui/button/filedialogbuttonview\n*/\nconst FileDialogButtonViewMixinBase = /* #__PURE__ */ FileDialogViewMixin(ButtonView);\nconst FileDialogListItemButtonViewMixinBase = /* #__PURE__ */ FileDialogViewMixin(ListItemButtonView);\n/**\n* The file dialog button view.\n*\n* This component provides a button that opens the native file selection dialog.\n* It can be used to implement the UI of a file upload feature.\n*\n* ```ts\n* const view = new FileDialogButtonView( locale );\n*\n* view.set( {\n* \tacceptedType: 'image/*',\n* \tallowMultipleFiles: true\n* \tlabel: t( 'Insert image' ),\n* \ticon: imageIcon,\n* \ttooltip: true\n* } );\n*\n* view.on( 'done', ( evt, files ) => {\n* \tfor ( const file of Array.from( files ) ) {\n* \t\tconsole.log( 'Selected file', file );\n* \t}\n* } );\n* ```\n*/\nvar FileDialogButtonView = class extends FileDialogButtonViewMixinBase {};\n/**\n* The file dialog button view used in a lists.\n*\n* This component provides a button that opens the native file selection dialog.\n* It can be used to implement the UI of a file upload feature.\n*\n* ```ts\n* const view = new FileDialogListItemButtonView( locale );\n*\n* view.set( {\n* \tacceptedType: 'image/*',\n* \tallowMultipleFiles: true\n* \tlabel: t( 'Insert image' ),\n* \ticon: imageIcon,\n* \ttooltip: true\n* } );\n*\n* view.on( 'done', ( evt, files ) => {\n* \tfor ( const file of Array.from( files ) ) {\n* \t\tconsole.log( 'Selected file', file );\n* \t}\n* } );\n* ```\n*/\nvar FileDialogListItemButtonView = class extends FileDialogListItemButtonViewMixinBase {};\n/**\n* Mixin function that enhances a base button view class with file dialog functionality. It is used\n* to create a button view class that opens the native select file dialog when clicked.\n*\n* The enhanced view includes a button and a hidden file input. When the button is clicked, the file dialog is opened.\n* The mixin adds properties and methods to the base class to handle the file selection.\n*\n* @param view The base class to be enhanced with file dialog functionality.\n* @returns A new class that extends the base class and includes the file dialog functionality.\n*/\nfunction FileDialogViewMixin(view) {\n\tclass FileDialogView extends view {\n\t\t/**\n\t\t* A hidden `<input>` view used to execute file dialog.\n\t\t*/\n\t\t_fileInputView;\n\t\t/**\n\t\t* @inheritDoc\n\t\t*/\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tthis._fileInputView = new FileInputView(this.locale);\n\t\t\tthis._fileInputView.bind(\"acceptedType\").to(this);\n\t\t\tthis._fileInputView.bind(\"allowMultipleFiles\").to(this);\n\t\t\tthis._fileInputView.delegate(\"done\").to(this);\n\t\t\tthis.on(\"execute\", () => {\n\t\t\t\tthis._fileInputView.open();\n\t\t\t});\n\t\t\tthis.extendTemplate({ attributes: { class: \"ck-file-dialog-button\" } });\n\t\t}\n\t\t/**\n\t\t* @inheritDoc\n\t\t*/\n\t\trender() {\n\t\t\tsuper.render();\n\t\t\tthis.children.add(this._fileInputView);\n\t\t}\n\t}\n\treturn FileDialogView;\n}\n/**\n* The hidden file input view class.\n*/\nvar FileInputView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"acceptedType\", void 0);\n\t\tthis.set(\"allowMultipleFiles\", false);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"input\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-hidden\"],\n\t\t\t\ttype: \"file\",\n\t\t\t\ttabindex: \"-1\",\n\t\t\t\taccept: bind.to(\"acceptedType\"),\n\t\t\t\tmultiple: bind.to(\"allowMultipleFiles\")\n\t\t\t},\n\t\t\ton: { change: bind.to(\n\t\t\t\t/* v8 ignore next -- @preserve */\n\t\t\t\t() => {\n\t\t\t\t\tif (this.element?.files?.length) this.fire(\"done\", this.element.files);\n\t\t\t\t\tthis.element.value = \"\";\n\t\t\t\t}\n\t\t\t) }\n\t\t});\n\t}\n\t/**\n\t* Opens file dialog.\n\t*/\n\topen() {\n\t\tthis.element.click();\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 ui/collapsible/collapsibleview\n*/\n/**\n* A collapsible UI component. Consists of a labeled button and a container which can be collapsed\n* by clicking the button. The collapsible container can be a host to other UI views.\n*\n* @internal\n*/\nvar CollapsibleView = class extends View {\n\t/**\n\t* The main button that, when clicked, collapses or expands the container with {@link #children}.\n\t*/\n\tbuttonView;\n\t/**\n\t* A collection of the child views that can be collapsed by clicking the {@link #buttonView}.\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the collapsible view.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param childViews An optional array of initial child views to be inserted into the collapsible.\n\t*/\n\tconstructor(locale, childViews) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isCollapsed\", false);\n\t\tthis.set(\"label\", \"\");\n\t\tthis.buttonView = this._createButtonView();\n\t\tthis.children = this.createCollection();\n\t\tthis.set(\"_collapsibleAriaLabelUid\", void 0);\n\t\tif (childViews) this.children.addMany(childViews);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-collapsible\",\n\t\t\t\tbind.if(\"isCollapsed\", \"ck-collapsible_collapsed\")\n\t\t\t] },\n\t\t\tchildren: [this.buttonView, {\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\"ck\", \"ck-collapsible__children\"],\n\t\t\t\t\trole: \"region\",\n\t\t\t\t\thidden: bind.if(\"isCollapsed\", \"hidden\"),\n\t\t\t\t\t\"aria-labelledby\": bind.to(\"_collapsibleAriaLabelUid\")\n\t\t\t\t},\n\t\t\t\tchildren: this.children\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis._collapsibleAriaLabelUid = this.buttonView.labelView.element.id;\n\t}\n\t/**\n\t* Focuses the first focusable.\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t/**\n\t* Creates the main {@link #buttonView} of the collapsible.\n\t*/\n\t_createButtonView() {\n\t\tconst buttonView = new ButtonView(this.locale);\n\t\tconst bind = buttonView.bindTemplate;\n\t\tbuttonView.set({\n\t\t\twithText: true,\n\t\t\ticon: IconDropdownArrow\n\t\t});\n\t\tbuttonView.extendTemplate({ attributes: { \"aria-expanded\": bind.to(\"isOn\", (value) => String(value)) } });\n\t\tbuttonView.bind(\"label\").to(this);\n\t\tbuttonView.bind(\"isOn\").to(this, \"isCollapsed\", (isCollapsed) => !isCollapsed);\n\t\tbuttonView.on(\"execute\", () => {\n\t\t\tthis.isCollapsed = !this.isCollapsed;\n\t\t});\n\t\treturn buttonView;\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* Returns color configuration options as defined in `editor.config.(fontColor|fontBackgroundColor).colors` or\n* `editor.config.table.(tableProperties|tableCellProperties).(background|border).colors\n* but processed to account for editor localization in the correct language.\n*\n* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n* when the user configuration is defined because the editor does not exist yet.\n*\n* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n*/\nfunction getLocalizedColorOptions(locale, options) {\n\tconst t = locale.t;\n\tconst localizedColorNames = {\n\t\tBlack: t(\"Black\"),\n\t\t\"Dim grey\": t(\"Dim grey\"),\n\t\tGrey: t(\"Grey\"),\n\t\t\"Light grey\": t(\"Light grey\"),\n\t\tWhite: t(\"White\"),\n\t\tRed: t(\"Red\"),\n\t\tOrange: t(\"Orange\"),\n\t\tYellow: t(\"Yellow\"),\n\t\t\"Light green\": t(\"Light green\"),\n\t\tGreen: t(\"Green\"),\n\t\tAquamarine: t(\"Aquamarine\"),\n\t\tTurquoise: t(\"Turquoise\"),\n\t\t\"Light blue\": t(\"Light blue\"),\n\t\tBlue: t(\"Blue\"),\n\t\tPurple: t(\"Purple\")\n\t};\n\treturn options.map((colorOption) => {\n\t\tconst label = localizedColorNames[colorOption.label];\n\t\tif (label && label != colorOption.label) colorOption.label = label;\n\t\treturn colorOption;\n\t});\n}\n/**\n* Creates a unified color definition object from color configuration options.\n* The object contains the information necessary to both render the UI and initialize the conversion.\n*/\nfunction normalizeColorOptions(options) {\n\treturn options.map(normalizeSingleColorDefinition).filter((option) => !!option);\n}\n/**\n* Creates a normalized color definition from the user-defined configuration.\n* The \"normalization\" means it will create full\n* {@link module:ui/colorgrid/colorgridview~ColorDefinition `ColorDefinition-like`}\n* object for string values, and add a `view` property, for each definition.\n*/\nfunction normalizeSingleColorDefinition(color) {\n\tif (typeof color === \"string\") return {\n\t\tmodel: color,\n\t\tlabel: color,\n\t\thasBorder: false,\n\t\tview: {\n\t\t\tname: \"span\",\n\t\t\tstyles: { color }\n\t\t}\n\t};\n\telse return {\n\t\tmodel: color.color,\n\t\tlabel: color.label || color.color,\n\t\thasBorder: color.hasBorder === void 0 ? false : color.hasBorder,\n\t\tview: {\n\t\t\tname: \"span\",\n\t\t\tstyles: { color: `${color.color}` }\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 ui/colorgrid/colortileview\n*/\n/**\n* This class represents a single color tile in the {@link module:ui/colorgrid/colorgridview~ColorGridView}.\n*/\nvar ColorTileView = class extends ButtonView {\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"color\", void 0);\n\t\tthis.set(\"hasBorder\", false);\n\t\tthis.icon = IconColorTileCheck;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tstyle: { backgroundColor: bind.to(\"color\", (color) => env.isMediaForcedColors ? null : color) },\n\t\t\tclass: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-color-grid__tile\",\n\t\t\t\tbind.if(\"hasBorder\", \"ck-color-selector__color-tile_bordered\")\n\t\t\t]\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.iconView.fillColor = \"hsl(0, 0%, 100%)\";\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 ui/colorgrid/colorgridview\n*/\n/**\n* A grid of {@link module:ui/colorgrid/colortileview~ColorTileView color tiles}.\n*/\nvar ColorGridView = class extends View {\n\t/**\n\t* A number of columns for the tiles grid.\n\t*/\n\tcolumns;\n\t/**\n\t* Collection of the child tile views.\n\t*/\n\titems;\n\t/**\n\t* Tracks information about DOM focus in the grid.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Creates an instance of a color grid containing {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t*\n\t* @fires execute\n\t* @param locale The localization services instance.\n\t* @param options Component configuration\n\t* @param options.colorDefinitions Array with definitions\n\t* required to create the {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t* @param options.columns A number of columns to display the tiles.\n\t*/\n\tconstructor(locale, options) {\n\t\tsuper(locale);\n\t\tconst colorDefinitions = options && options.colorDefinitions ? options.colorDefinitions : [];\n\t\tthis.columns = options?.columns || 5;\n\t\tconst viewStyleAttribute = { gridTemplateColumns: `repeat( ${this.columns}, 1fr)` };\n\t\tthis.set(\"selectedColor\", void 0);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.items.on(\"add\", (evt, colorTile) => {\n\t\t\tcolorTile.isOn = colorTile.color === this.selectedColor;\n\t\t});\n\t\tcolorDefinitions.forEach((color) => {\n\t\t\tconst colorTile = new ColorTileView();\n\t\t\tcolorTile.set({\n\t\t\t\tcolor: color.color,\n\t\t\t\tlabel: color.label,\n\t\t\t\ttooltip: true,\n\t\t\t\thasBorder: color.options.hasBorder\n\t\t\t});\n\t\t\tcolorTile.on(\"execute\", () => {\n\t\t\t\tthis.fire(\"execute\", {\n\t\t\t\t\tvalue: color.color,\n\t\t\t\t\thasBorder: color.options.hasBorder,\n\t\t\t\t\tlabel: color.label\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.items.add(colorTile);\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tchildren: this.items,\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-color-grid\"],\n\t\t\t\tstyle: viewStyleAttribute\n\t\t\t}\n\t\t});\n\t\tthis.on(\"change:selectedColor\", (evt, name, selectedColor) => {\n\t\t\tfor (const item of this.items) item.isOn = item.color === selectedColor;\n\t\t});\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #items}.\n\t*/\n\tfocus() {\n\t\tif (this.items.length) this.items.first.focus();\n\t}\n\t/**\n\t* Focuses the last focusable in {@link #items}.\n\t*/\n\tfocusLast() {\n\t\tif (this.items.length) this.items.last.focus();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tfor (const item of this.items) this.focusTracker.add(item.element);\n\t\tthis.items.on(\"add\", (evt, item) => {\n\t\t\tthis.focusTracker.add(item.element);\n\t\t});\n\t\tthis.items.on(\"remove\", (evt, item) => {\n\t\t\tthis.focusTracker.remove(item.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t\taddKeyboardHandlingForGrid({\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tgridItems: this.items,\n\t\t\tnumberOfColumns: this.columns,\n\t\t\tuiLanguageDirection: this.locale?.uiLanguageDirection\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\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 ui/colorpicker/utils\n*/\n/**\n* Parses and converts the color string to requested format. Handles variety of color spaces\n* like `hsl`, `hex` or `rgb`.\n*\n* @param color\n* @returns A color string.\n* @internal\n*/\nfunction convertColor(color, outputFormat) {\n\tif (!color) return \"\";\n\tconst colorObject = parseColorString(color);\n\tif (!colorObject) return \"\";\n\tif (colorObject.space === outputFormat) return color;\n\tif (!canConvertParsedColor(colorObject)) return \"\";\n\tconst toColorSpace = convert[colorObject.space][outputFormat];\n\tif (!toColorSpace) return \"\";\n\treturn formatColorOutput(toColorSpace(colorObject.space === \"hex\" ? colorObject.hexValue : colorObject.values), outputFormat);\n}\n/**\n* Converts a color string to hex format.\n*\n* @param color\n* @returns A color string.\n* @internal\n*/\nfunction convertToHex(color) {\n\tif (!color) return \"\";\n\tconst colorObject = parseColorString(color);\n\tif (!colorObject) return \"#000\";\n\tif (colorObject.space === \"hex\") return colorObject.hexValue;\n\treturn convertColor(color, \"hex\");\n}\n/**\n* Registers the custom element in the\n* [CustomElementsRegistry](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry).\n* @internal\n*/\nfunction registerCustomElement(elementName, constructor) {\n\tif (customElements.get(elementName) === void 0) customElements.define(elementName, constructor);\n}\n/**\n* Formats the passed color channels according to the requested format.\n*\n* @param values\n* @param format\n* @returns A color string.\n*/\nfunction formatColorOutput(values, format) {\n\tswitch (format) {\n\t\tcase \"hex\": return `#${values}`;\n\t\tcase \"rgb\": return `rgb(${values[0]}, ${values[1]}, ${values[2]})`;\n\t\tcase \"hsl\": return `hsl(${values[0]}, ${values[1]}%, ${values[2]}%)`;\n\t\tcase \"hwb\": return `hwb(${values[0]}, ${values[1]}, ${values[2]})`;\n\t\tcase \"lab\": return `lab(${values[0]}% ${values[1]} ${values[2]})`;\n\t\tcase \"lch\": return `lch(${values[0]}% ${values[1]} ${values[2]})`;\n\t\tdefault: return \"\";\n\t}\n}\nfunction parseColorString(colorString) {\n\tif (colorString.startsWith(\"#\")) {\n\t\tconst parsedHex = parse(colorString);\n\t\treturn {\n\t\t\tspace: \"hex\",\n\t\t\tvalues: parsedHex.values,\n\t\t\thexValue: colorString,\n\t\t\talpha: parsedHex.alpha\n\t\t};\n\t}\n\tconst parsed = parse(colorString);\n\tif (!parsed.space) return null;\n\treturn parsed;\n}\nfunction canConvertParsedColor(parsedColor) {\n\treturn Object.keys(convert).includes(parsedColor.space);\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 ui/labeledfield/labeledfieldview\n*/\n/**\n* The labeled field view class. It can be used to enhance any view with the following features:\n*\n* * a label,\n* * (optional) an error message,\n* * (optional) an info (status) text,\n*\n* all bound logically by proper DOM attributes for UX and accessibility.  It also provides an interface\n* (e.g. observable properties) that allows controlling those additional features.\n*\n* The constructor of this class requires a callback that returns a view to be labeled. The callback\n* is called with unique ids that allow binding of DOM properties:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, ( labeledFieldView, viewUid, statusUid ) => {\n* \tconst inputView = new InputTextView( labeledFieldView.locale );\n*\n* \tinputView.set( {\n* \t\tid: viewUid,\n* \t\tariaDescribedById: statusUid\n* \t} );\n*\n* \tinputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n* \tinputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n*\n* \treturn inputView;\n* } );\n*\n* labeledInputView.label = 'User name';\n* labeledInputView.infoText = 'Full name like for instance, John Doe.';\n* labeledInputView.render();\n*\n* document.body.append( labeledInputView.element );\n* ```\n*\n* See {@link module:ui/labeledfield/utils} to discover ready–to–use labeled input helpers for common\n* UI components.\n*/\nvar LabeledFieldView = class extends View {\n\t/**\n\t* The field view that gets labeled.\n\t*/\n\tfieldView;\n\t/**\n\t* The label view instance that describes the entire view.\n\t*/\n\tlabelView;\n\t/**\n\t* The status view for the {@link #fieldView}. It displays {@link #errorText} and\n\t* {@link #infoText}.\n\t*/\n\tstatusView;\n\t/**\n\t* A collection of children of the internal wrapper element. Allows inserting additional DOM elements (views) next to\n\t* the {@link #fieldView} for easy styling (e.g. positioning).\n\t*\n\t* By default, the collection contains {@link #fieldView} and {@link #labelView}.\n\t*/\n\tfieldWrapperChildren;\n\t/**\n\t* Creates an instance of the labeled field view class using a provided creator function\n\t* that provides the view to be labeled.\n\t*\n\t* @param locale The locale instance.\n\t* @param viewCreator A function that returns a {@link module:ui/view~View}\n\t* that will be labeled. The following arguments are passed to the creator function:\n\t*\n\t* * an instance of the `LabeledFieldView` to allow binding observable properties,\n\t* * an UID string that connects the {@link #labelView label} and the labeled field view in DOM,\n\t* * an UID string that connects the {@link #statusView status} and the labeled field view in DOM.\n\t*/\n\tconstructor(locale, viewCreator) {\n\t\tsuper(locale);\n\t\tconst viewUid = `ck-labeled-field-view-${uid()}`;\n\t\tconst statusUid = `ck-labeled-field-view-status-${uid()}`;\n\t\tthis.fieldView = viewCreator(this, viewUid, statusUid);\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isEmpty\", true);\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"errorText\", null);\n\t\tthis.set(\"infoText\", null);\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"placeholder\", void 0);\n\t\tthis.labelView = this._createLabelView(viewUid);\n\t\tthis.statusView = this._createStatusView(statusUid);\n\t\tthis.fieldWrapperChildren = this.createCollection([this.fieldView, this.labelView]);\n\t\tthis.bind(\"_statusText\").to(this, \"errorText\", this, \"infoText\", (errorText, infoText) => errorText || infoText);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-labeled-field-view\",\n\t\t\t\tbind.to(\"class\"),\n\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value),\n\t\t\t\tbind.if(\"isEmpty\", \"ck-labeled-field-view_empty\"),\n\t\t\t\tbind.if(\"isFocused\", \"ck-labeled-field-view_focused\"),\n\t\t\t\tbind.if(\"placeholder\", \"ck-labeled-field-view_placeholder\"),\n\t\t\t\tbind.if(\"errorText\", \"ck-error\")\n\t\t\t] },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-labeled-field-view__input-wrapper\"] },\n\t\t\t\tchildren: this.fieldWrapperChildren\n\t\t\t}, this.statusView]\n\t\t});\n\t}\n\t/**\n\t* Creates label view class instance and bind with view.\n\t*\n\t* @param id Unique id to set as labelView#for attribute.\n\t*/\n\t_createLabelView(id) {\n\t\tconst labelView = new LabelView(this.locale);\n\t\tlabelView.for = id;\n\t\tlabelView.bind(\"text\").to(this, \"label\");\n\t\treturn labelView;\n\t}\n\t/**\n\t* Creates the status view instance. It displays {@link #errorText} and {@link #infoText}\n\t* next to the {@link #fieldView}. See {@link #_statusText}.\n\t*\n\t* @param statusUid Unique id of the status, shared with the {@link #fieldView view's}\n\t* `aria-describedby` attribute.\n\t*/\n\t_createStatusView(statusUid) {\n\t\tconst statusView = new View(this.locale);\n\t\tconst bind = this.bindTemplate;\n\t\tstatusView.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-labeled-field-view__status\",\n\t\t\t\t\tbind.if(\"errorText\", \"ck-labeled-field-view__status_error\"),\n\t\t\t\t\tbind.if(\"_statusText\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\tid: statusUid,\n\t\t\t\trole: bind.if(\"errorText\", \"alert\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"_statusText\") }]\n\t\t});\n\t\treturn statusView;\n\t}\n\t/**\n\t* Focuses the {@link #fieldView}.\n\t*/\n\tfocus(direction) {\n\t\tthis.fieldView.focus(direction);\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 ui/input/inputbase\n*/\n/**\n* The base input view class.\n*/\nvar InputBase = class extends View {\n\t/**\n\t* Stores information about the editor UI focus and propagates it so various plugins and components\n\t* are unified as a focus group.\n\t*/\n\tfocusTracker;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"value\", void 0);\n\t\tthis.set(\"id\", void 0);\n\t\tthis.set(\"placeholder\", void 0);\n\t\tthis.set(\"tabIndex\", void 0);\n\t\tthis.set(\"isReadOnly\", false);\n\t\tthis.set(\"hasError\", false);\n\t\tthis.set(\"ariaDescribedById\", void 0);\n\t\tthis.set(\"ariaLabel\", void 0);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.bind(\"isFocused\").to(this.focusTracker);\n\t\tthis.set(\"isEmpty\", true);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"input\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-input\",\n\t\t\t\t\tbind.if(\"isFocused\", \"ck-input_focused\"),\n\t\t\t\t\tbind.if(\"isEmpty\", \"ck-input-text_empty\"),\n\t\t\t\t\tbind.if(\"hasError\", \"ck-error\")\n\t\t\t\t],\n\t\t\t\tid: bind.to(\"id\"),\n\t\t\t\tplaceholder: bind.to(\"placeholder\"),\n\t\t\t\ttabindex: bind.to(\"tabIndex\"),\n\t\t\t\treadonly: bind.to(\"isReadOnly\"),\n\t\t\t\t\"aria-invalid\": bind.if(\"hasError\", true),\n\t\t\t\t\"aria-describedby\": bind.to(\"ariaDescribedById\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\")\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tinput: bind.to((...args) => {\n\t\t\t\t\tthis.fire(\"input\", ...args);\n\t\t\t\t\tthis._updateIsEmpty();\n\t\t\t\t}),\n\t\t\t\tchange: bind.to(this._updateIsEmpty.bind(this))\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.element);\n\t\tthis._setDomElementValue(this.value);\n\t\tthis._updateIsEmpty();\n\t\tthis.on(\"change:value\", (evt, name, value) => {\n\t\t\tthis._setDomElementValue(value);\n\t\t\tthis._updateIsEmpty();\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t}\n\t/**\n\t* Moves the focus to the input and selects the value.\n\t*/\n\tselect() {\n\t\tthis.element.select();\n\t}\n\t/**\n\t* Focuses the input.\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\t/**\n\t* Resets the value of the input\n\t*/\n\treset() {\n\t\tthis.value = this.element.value = \"\";\n\t\tthis._updateIsEmpty();\n\t}\n\t/**\n\t* Updates the {@link #isEmpty} property value on demand.\n\t*/\n\t_updateIsEmpty() {\n\t\tthis.isEmpty = isInputElementEmpty(this.element);\n\t}\n\t/**\n\t* Sets the `value` property of the {@link #element DOM element} on demand.\n\t*/\n\t_setDomElementValue(value) {\n\t\tthis.element.value = !value && value !== 0 ? \"\" : value;\n\t}\n};\nfunction isInputElementEmpty(domElement) {\n\treturn !domElement.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* The input view class.\n*/\nvar InputView = class extends InputBase {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"inputMode\", \"text\");\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({ attributes: { inputmode: bind.to(\"inputMode\") } });\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 ui/inputtext/inputtextview\n*/\n/**\n* The text input view class.\n*/\nvar InputTextView = class extends InputView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.extendTemplate({ attributes: {\n\t\t\ttype: \"text\",\n\t\t\tclass: [\"ck-input-text\"]\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 ui/inputnumber/inputnumberview\n*/\n/**\n* The number input view class.\n*/\nvar InputNumberView = class extends InputView {\n\t/**\n\t* Creates an instance of the input number view.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param options The options of the input.\n\t* @param options.min The value of the `min` DOM attribute (the lowest accepted value).\n\t* @param options.max The value of the `max` DOM attribute (the highest accepted value).\n\t* @param options.step The value of the `step` DOM attribute.\n\t*/\n\tconstructor(locale, { min, max, step } = {}) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"min\", min);\n\t\tthis.set(\"max\", max);\n\t\tthis.set(\"step\", step);\n\t\tthis.extendTemplate({ attributes: {\n\t\t\ttype: \"number\",\n\t\t\tclass: [\"ck-input-number\"],\n\t\t\tmin: bind.to(\"min\"),\n\t\t\tmax: bind.to(\"max\"),\n\t\t\tstep: bind.to(\"step\")\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 ui/textarea/textareaview\n*/\n/**\n* The textarea view class.\n*\n* ```ts\n* const textareaView = new TextareaView();\n*\n* textareaView.minRows = 2;\n* textareaView.maxRows = 10;\n*\n* textareaView.render();\n*\n* document.body.append( textareaView.element );\n* ```\n*/\nvar TextareaView = class extends InputBase {\n\t/**\n\t* An instance of the resize observer used to detect when the view is visible or not and update\n\t* its height if any changes that affect it were made while it was invisible.\n\t*\n\t* **Note:** Created in {@link #render}.\n\t*/\n\t_resizeObserver;\n\t/**\n\t* A flag that indicates whether the {@link #_updateAutoGrowHeight} method should be called when the view becomes\n\t* visible again. See {@link #_resizeObserver}.\n\t*/\n\t_isUpdateAutoGrowHeightPending = false;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst toPx = toUnit(\"px\");\n\t\tthis.set(\"minRows\", 2);\n\t\tthis.set(\"maxRows\", 5);\n\t\tthis.set(\"_height\", null);\n\t\tthis.set(\"resize\", \"none\");\n\t\tthis._resizeObserver = null;\n\t\tthis.on(\"change:minRows\", this._validateMinMaxRows.bind(this));\n\t\tthis.on(\"change:maxRows\", this._validateMinMaxRows.bind(this));\n\t\tconst bind = this.bindTemplate;\n\t\tthis.template.tag = \"textarea\";\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-textarea\"],\n\t\t\tstyle: {\n\t\t\t\theight: bind.to(\"_height\", (height) => height ? toPx(height) : null),\n\t\t\t\tresize: bind.to(\"resize\")\n\t\t\t},\n\t\t\trows: bind.to(\"minRows\")\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tlet wasVisible = false;\n\t\tthis.on(\"input\", () => {\n\t\t\tthis._updateAutoGrowHeight(true);\n\t\t\tthis.fire(\"update\");\n\t\t});\n\t\tthis.on(\"change:value\", () => {\n\t\t\tglobal.window.requestAnimationFrame(() => {\n\t\t\t\tif (!isVisible(this.element)) {\n\t\t\t\t\tthis._isUpdateAutoGrowHeightPending = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._updateAutoGrowHeight();\n\t\t\t\tthis.fire(\"update\");\n\t\t\t});\n\t\t});\n\t\tthis._resizeObserver = new ResizeObserver(this.element, (evt) => {\n\t\t\tconst isVisible = !!evt.contentRect.width && !!evt.contentRect.height;\n\t\t\tif (!wasVisible && isVisible && this._isUpdateAutoGrowHeightPending) global.window.requestAnimationFrame(() => {\n\t\t\t\tthis._updateAutoGrowHeight();\n\t\t\t\tthis.fire(\"update\");\n\t\t\t});\n\t\t\twasVisible = isVisible;\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._resizeObserver) this._resizeObserver.destroy();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\treset() {\n\t\tsuper.reset();\n\t\tthis._updateAutoGrowHeight();\n\t\tthis.fire(\"update\");\n\t}\n\t/**\n\t* Updates the {@link #_height} of the view depending on {@link #minRows}, {@link #maxRows}, and the current content size.\n\t*\n\t* **Note**: This method overrides manual resize done by the user using a handle. It's a known bug.\n\t*/\n\t_updateAutoGrowHeight(shouldScroll) {\n\t\tconst viewElement = this.element;\n\t\tif (!viewElement.offsetParent) {\n\t\t\tthis._isUpdateAutoGrowHeightPending = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._isUpdateAutoGrowHeightPending = false;\n\t\tconst singleLineContentClone = getTextareaElementClone(viewElement, \"1\");\n\t\tconst fullTextValueClone = getTextareaElementClone(viewElement, viewElement.value);\n\t\tconst singleLineContentStyles = singleLineContentClone.ownerDocument.defaultView.getComputedStyle(singleLineContentClone);\n\t\tconst verticalPaddings = parseFloat(singleLineContentStyles.paddingTop) + parseFloat(singleLineContentStyles.paddingBottom);\n\t\tconst borders = getBorderWidths(singleLineContentClone);\n\t\tconst lineHeight = parseFloat(singleLineContentStyles.lineHeight);\n\t\tconst verticalBorder = borders.top + borders.bottom;\n\t\tconst singleLineAreaDefaultHeight = new Rect(singleLineContentClone).height;\n\t\tconst numberOfLines = Math.round((fullTextValueClone.scrollHeight - verticalPaddings) / lineHeight);\n\t\tconst maxHeight = this.maxRows * lineHeight + verticalPaddings + verticalBorder;\n\t\tconst minHeight = numberOfLines === 1 ? singleLineAreaDefaultHeight : this.minRows * lineHeight + verticalPaddings + verticalBorder;\n\t\tthis._height = Math.min(Math.max(Math.max(numberOfLines, this.minRows) * lineHeight + verticalPaddings + verticalBorder, minHeight), maxHeight);\n\t\tif (shouldScroll) viewElement.scrollTop = viewElement.scrollHeight;\n\t\tsingleLineContentClone.remove();\n\t\tfullTextValueClone.remove();\n\t}\n\t/**\n\t* Validates the {@link #minRows} and {@link #maxRows} properties and warns in the console if the configuration is incorrect.\n\t*/\n\t_validateMinMaxRows() {\n\t\tif (this.minRows > this.maxRows)\n /**\n\t\t* The minimum number of rows is greater than the maximum number of rows.\n\t\t*\n\t\t* @error ui-textarea-view-min-rows-greater-than-max-rows\n\t\t* @param {module:ui/textarea/textareaview~TextareaView} textareaView The misconfigured textarea view instance.\n\t\t* @param {number} minRows The value of `minRows` property.\n\t\t* @param {number} maxRows The value of `maxRows` property.\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-textarea-view-min-rows-greater-than-max-rows\", {\n\t\t\ttextareaView: this,\n\t\t\tminRows: this.minRows,\n\t\t\tmaxRows: this.maxRows\n\t\t});\n\t}\n};\nfunction getTextareaElementClone(element, value) {\n\tconst clone = element.cloneNode();\n\tclone.style.position = \"absolute\";\n\tclone.style.top = \"-99999px\";\n\tclone.style.left = \"-99999px\";\n\tclone.style.height = \"auto\";\n\tclone.style.overflow = \"hidden\";\n\tclone.style.width = element.ownerDocument.defaultView.getComputedStyle(element).width;\n\tclone.tabIndex = -1;\n\tclone.rows = 1;\n\tclone.value = value;\n\telement.parentNode.insertBefore(clone, element);\n\treturn clone;\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 ui/dropdown/dropdownpanelview\n*/\n/**\n* The dropdown panel view class.\n*\n* See {@link module:ui/dropdown/dropdownview~DropdownView} to learn about the common usage.\n*/\nvar DropdownPanelView = class extends View {\n\t/**\n\t* Collection of the child views in this panel.\n\t*\n\t* A common child type is the {@link module:ui/list/listview~ListView} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n\t* See {@link module:ui/dropdown/utils~addListToDropdown} and\n\t* {@link module:ui/dropdown/utils~addToolbarToDropdown} to learn more about child views of dropdowns.\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"position\", \"se\");\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-dropdown__panel\",\n\t\t\t\t\tbind.to(\"position\", (value) => `ck-dropdown__panel_${value}`),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-dropdown__panel-visible\")\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { selectstart: bind.to((evt) => {\n\t\t\t\tconst target = evt.target;\n\t\t\t\tif (target instanceof Element && target.tagName.toLocaleLowerCase() === \"input\") return;\n\t\t\t\tevt.preventDefault();\n\t\t\t}) }\n\t\t});\n\t}\n\t/**\n\t* Focuses the first view in the {@link #children} collection.\n\t*\n\t* See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t*/\n\tfocus() {\n\t\tif (this.children.length) {\n\t\t\tconst firstChild = this.children.first;\n\t\t\tif (typeof firstChild.focus === \"function\") firstChild.focus();\n\t\t\telse\n /**\n\t\t\t* The child view of a dropdown could not be focused because it is missing the `focus()` method.\n\t\t\t*\n\t\t\t* This warning appears when a dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open} and it\n\t\t\t* attempts to focus the {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children first child} of its panel\n\t\t\t* but the child does not implement the\n\t\t\t* {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface}.\n\t\t\t*\n\t\t\t* Focusing the content of a dropdown on open greatly improves the accessibility. Please make sure the view instance\n\t\t\t* provides the `focus()` method for the best user experience.\n\t\t\t*\n\t\t\t* @error ui-dropdown-panel-focus-child-missing-focus\n\t\t\t* @param {module:ui/view~View} childView Child view.\n\t\t\t* @param {module:ui/dropdown/dropdownpanelview~DropdownPanelView} dropdownPanel A parent of a child.\n\t\t\t*/\n\t\t\tlogWarning(\"ui-dropdown-panel-focus-child-missing-focus\", {\n\t\t\t\tchildView: this.children.first,\n\t\t\t\tdropdownPanel: this\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Focuses the view element or last item in view collection on opening dropdown's panel.\n\t*\n\t* See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t*/\n\tfocusLast() {\n\t\tif (this.children.length) {\n\t\t\tconst lastChild = this.children.last;\n\t\t\tif (typeof lastChild.focusLast === \"function\") lastChild.focusLast();\n\t\t\telse lastChild.focus();\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 ui/dropdown/dropdownview\n*/\n/**\n* The dropdown view class. It manages the dropdown button and dropdown panel.\n*\n* In most cases, the easiest way to create a dropdown is by using the {@link module:ui/dropdown/utils~createDropdown}\n* util:\n*\n* ```ts\n* const dropdown = createDropdown( locale );\n*\n* // Configure dropdown's button properties:\n* dropdown.buttonView.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.render();\n*\n* dropdown.panelView.element.textContent = 'Content of the panel';\n*\n* // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* If you want to add a richer content to the dropdown panel, you can use the {@link module:ui/dropdown/utils~addListToDropdown}\n* and {@link module:ui/dropdown/utils~addToolbarToDropdown} helpers. See more examples in\n* {@link module:ui/dropdown/utils~createDropdown} documentation.\n*\n* If you want to create a completely custom dropdown, then you can compose it manually:\n*\n* ```ts\n* const button = new DropdownButtonView( locale );\n* const panel = new DropdownPanelView( locale );\n* const dropdown = new DropdownView( locale, button, panel );\n*\n* button.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.render();\n*\n* panel.element.textContent = 'Content of the panel';\n*\n* // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* However, dropdown created this way will contain little behavior. You will need to implement handlers for actions\n* such as {@link module:ui/bindings/clickoutsidehandler~clickOutsideHandler clicking outside an open dropdown}\n* (which should close it) and support for arrow keys inside the panel. Therefore, unless you really know what\n* you do and you really need to do it, it is recommended to use the {@link module:ui/dropdown/utils~createDropdown} helper.\n*/\nvar DropdownView = class DropdownView extends View {\n\t/**\n\t* Button of the dropdown view. Clicking the button opens the {@link #panelView}.\n\t*/\n\tbuttonView;\n\t/**\n\t* Panel of the dropdown. It opens when the {@link #buttonView} is\n\t* {@link module:ui/button/button~Button#event:execute executed} (i.e. clicked).\n\t*\n\t* Child views can be added to the panel's `children` collection:\n\t*\n\t* ```ts\n\t* dropdown.panelView.children.add( childView );\n\t* ```\n\t*\n\t* See {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children} and\n\t* {@link module:ui/viewcollection~ViewCollection#add}.\n\t*/\n\tpanelView;\n\t/**\n\t* Tracks information about the DOM focus in the dropdown.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the dropdown:\n\t*\n\t* * <kbd>▼</kbd> opens the dropdown,\n\t* * <kbd>◀</kbd> and <kbd>Esc</kbd> closes the dropdown.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A child {@link module:ui/list/listview~ListView list view} of the dropdown located\n\t* in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t*\n\t* **Note**: Only supported when dropdown has list view added using {@link module:ui/dropdown/utils~addListToDropdown}.\n\t*/\n\tlistView;\n\t/**\n\t* A child toolbar of the dropdown located in the\n\t* {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t*\n\t* **Note**: Only supported when dropdown has a toolbar added using {@link module:ui/dropdown/utils~addToolbarToDropdown}.\n\t*/\n\ttoolbarView;\n\t/**\n\t* A child menu component of the dropdown located\n\t* in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t*\n\t* **Note**: Only supported when dropdown has a menu added using {@link module:ui/dropdown/utils~addMenuToDropdown}.\n\t*/\n\tmenuView;\n\t/**\n\t* Creates an instance of the dropdown.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale, buttonView, panelView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.buttonView = buttonView;\n\t\tthis.panelView = panelView;\n\t\tthis.set(\"isOpen\", false);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"id\", void 0);\n\t\tthis.set(\"panelPosition\", \"auto\");\n\t\tthis.panelView.bind(\"isVisible\").to(this, \"isOpen\");\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-dropdown\",\n\t\t\t\t\tbind.to(\"class\"),\n\t\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value)\n\t\t\t\t],\n\t\t\t\tid: bind.to(\"id\"),\n\t\t\t\t\"aria-describedby\": bind.to(\"ariaDescribedById\")\n\t\t\t},\n\t\t\tchildren: [buttonView, panelView]\n\t\t});\n\t\tbuttonView.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-dropdown__button\"],\n\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOpen\")\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.buttonView.element);\n\t\tthis.focusTracker.add(this.panelView.element);\n\t\tthis.listenTo(this.buttonView, \"open\", () => {\n\t\t\tthis.isOpen = !this.isOpen;\n\t\t});\n\t\tthis.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen) return;\n\t\t\tif (this.panelPosition === \"auto\") {\n\t\t\t\tconst optimalPanelPosition = DropdownView._getOptimalPosition({\n\t\t\t\t\telement: this.panelView.element,\n\t\t\t\t\ttarget: this.buttonView.element,\n\t\t\t\t\tfitInViewport: true,\n\t\t\t\t\tpositions: this._panelPositions\n\t\t\t\t});\n\t\t\t\tthis.panelView.position = optimalPanelPosition ? optimalPanelPosition.name : this._defaultPanelPositionName;\n\t\t\t} else this.panelView.position = this.panelPosition;\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tconst closeDropdown = (data, cancel) => {\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t};\n\t\tthis.keystrokes.set(\"arrowdown\", (data, cancel) => {\n\t\t\tif (this.buttonView.isEnabled && !this.isOpen) {\n\t\t\t\tthis.isOpen = true;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\tthis.keystrokes.set(\"arrowright\", (data, cancel) => {\n\t\t\tif (this.isOpen) cancel();\n\t\t});\n\t\tthis.keystrokes.set(\"arrowleft\", closeDropdown);\n\t\tthis.keystrokes.set(\"esc\", closeDropdown);\n\t}\n\t/**\n\t* Focuses the {@link #buttonView}.\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t/**\n\t* Returns {@link #panelView panel} positions to be used by the\n\t* {@link module:utils/dom/position~getOptimalPosition `getOptimalPosition()`}\n\t* utility considering the direction of the language the UI of the editor is displayed in.\n\t*/\n\tget _panelPositions() {\n\t\tconst { south, north, southEast, southWest, northEast, northWest, southMiddleEast, southMiddleWest, northMiddleEast, northMiddleWest } = DropdownView.defaultPanelPositions;\n\t\tif (this.locale.uiLanguageDirection !== \"rtl\") return [\n\t\t\tsouthEast,\n\t\t\tsouthWest,\n\t\t\tsouthMiddleEast,\n\t\t\tsouthMiddleWest,\n\t\t\tsouth,\n\t\t\tnorthEast,\n\t\t\tnorthWest,\n\t\t\tnorthMiddleEast,\n\t\t\tnorthMiddleWest,\n\t\t\tnorth\n\t\t];\n\t\telse return [\n\t\t\tsouthWest,\n\t\t\tsouthEast,\n\t\t\tsouthMiddleWest,\n\t\t\tsouthMiddleEast,\n\t\t\tsouth,\n\t\t\tnorthWest,\n\t\t\tnorthEast,\n\t\t\tnorthMiddleWest,\n\t\t\tnorthMiddleEast,\n\t\t\tnorth\n\t\t];\n\t}\n\t/**\n\t* Returns the default position of the dropdown panel based on the direction of the UI language.\n\t* It is used when the {@link #panelPosition} is set to `'auto'` and the panel has not found a\n\t* suitable position to fit into the viewport.\n\t*/\n\tget _defaultPanelPositionName() {\n\t\treturn this.locale.uiLanguageDirection === \"rtl\" ? \"sw\" : \"se\";\n\t}\n\t/**\n\t* A set of positioning functions used by the dropdown view to determine\n\t* the optimal position (i.e. fitting into the browser viewport) of its\n\t* {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel} when\n\t* {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition} is set to 'auto'`.\n\t*\n\t* The available positioning functions are as follow:\n\t*\n\t* **South**\n\t*\n\t* * `south`\n\t*\n\t* ```\n\t*\t\t\t[ Button ]\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southEast`\n\t*\n\t* ```\n\t*\t\t[ Button ]\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWest`\n\t*\n\t* ```\n\t*\t\t         [ Button ]\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southMiddleEast`\n\t*\n\t* ```\n\t*\t\t  [ Button ]\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southMiddleWest`\n\t*\n\t* ```\n\t*\t\t       [ Button ]\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **North**\n\t*\n\t* * `north`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t*\t\t    [ Button ]\n\t* ```\n\t*\n\t* * `northEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t*\t\t[ Button ]\n\t* ```\n\t*\n\t* * `northWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t*\t\t         [ Button ]\n\t* ```\n\t*\n\t* * `northMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t*\t\t  [ Button ]\n\t* ```\n\t*\n\t* * `northMiddleWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t|      Panel      |\n\t*\t\t+-----------------+\n\t*\t\t       [ Button ]\n\t* ```\n\t*\n\t* Positioning functions are compatible with {@link module:utils/dom/position~DomPoint}.\n\t*\n\t* The name that position function returns will be reflected in dropdown panel's class that\n\t* controls its placement. See {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition}\n\t* to learn more.\n\t*/\n\tstatic defaultPanelPositions = {\n\t\tsouth: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 2,\n\t\t\t\tname: \"s\"\n\t\t\t};\n\t\t},\n\t\tsouthEast: (buttonRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left,\n\t\t\t\tname: \"se\"\n\t\t\t};\n\t\t},\n\t\tsouthWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\t\tname: \"sw\"\n\t\t\t};\n\t\t},\n\t\tsouthMiddleEast: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 4,\n\t\t\t\tname: \"sme\"\n\t\t\t};\n\t\t},\n\t\tsouthMiddleWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) * 3 / 4,\n\t\t\t\tname: \"smw\"\n\t\t\t};\n\t\t},\n\t\tnorth: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 2,\n\t\t\t\tname: \"n\"\n\t\t\t};\n\t\t},\n\t\tnorthEast: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left,\n\t\t\t\tname: \"ne\"\n\t\t\t};\n\t\t},\n\t\tnorthWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\t\tname: \"nw\"\n\t\t\t};\n\t\t},\n\t\tnorthMiddleEast: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 4,\n\t\t\t\tname: \"nme\"\n\t\t\t};\n\t\t},\n\t\tnorthMiddleWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) * 3 / 4,\n\t\t\t\tname: \"nmw\"\n\t\t\t};\n\t\t}\n\t};\n\t/**\n\t* A function used to calculate the optimal position for the dropdown panel.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\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 ui/dropdown/button/dropdownbuttonview\n*/\n/**\n* The default dropdown button view class.\n*\n* ```ts\n* const view = new DropdownButtonView();\n*\n* view.set( {\n* \tlabel: 'A button',\n* \tkeystroke: 'Ctrl+B',\n* \ttooltip: true\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*\n* Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n*/\nvar DropdownButtonView = class extends ButtonView {\n\t/**\n\t* An icon that displays arrow to indicate a dropdown button.\n\t*/\n\tarrowView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.extendTemplate({ attributes: {\n\t\t\t\"aria-haspopup\": true,\n\t\t\t\"aria-expanded\": this.bindTemplate.to(\"isOn\", (value) => String(value))\n\t\t} });\n\t\tthis.delegate(\"execute\").to(this, \"open\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.arrowView);\n\t}\n\t/**\n\t* Creates a {@link module:ui/icon/iconview~IconView} instance as {@link #arrowView}.\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new IconView();\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: { class: \"ck-dropdown__arrow\" } });\n\t\treturn arrowView;\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* Represents a view for a button in a dropdown menu list item.\n*/\nvar DropdownMenuListItemButtonView = class extends ButtonView {\n\tid;\n\tconstructor(locale, id, label) {\n\t\tsuper(locale);\n\t\tthis.id = id;\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: \"menuitem\",\n\t\t\tlabel\n\t\t});\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-dropdown-menu-list__nested-menu__item__button\"] } });\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 ui/dropdown/menu/dropdownmenubuttonview\n*/\n/**\n* Represents a view for a dropdown menu button.\n*/\nvar DropdownMenuButtonView = class extends ListItemButtonView {\n\t/**\n\t* An icon that displays an arrow to indicate a direction of the menu.\n\t*/\n\tarrowView;\n\t/**\n\t* Creates an instance of the dropdown menu button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.extendTemplate({\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-dropdown-menu-list__nested-menu__button\"],\n\t\t\t\t\"aria-haspopup\": true,\n\t\t\t\t\"aria-expanded\": this.bindTemplate.to(\"isOn\", (value) => String(value)),\n\t\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOn\")\n\t\t\t},\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.arrowView);\n\t}\n\t/**\n\t* Creates the arrow view instance.\n\t*\n\t* @private\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new IconView();\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: { class: \"ck-dropdown-menu-list__nested-menu__button__arrow\" } });\n\t\treturn arrowView;\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 ui/list/listitemview\n*/\n/**\n* The list item view class.\n*/\nvar ListItemView = class extends View {\n\t/**\n\t* Collection of the child views inside of the list item {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"li\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-list__item\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\trole: \"presentation\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Focuses the list item.\n\t*/\n\tfocus() {\n\t\tif (this.children.first) this.children.first.focus();\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 ui/list/listseparatorview\n*/\n/**\n* The list separator view class.\n*/\nvar ListSeparatorView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"li\",\n\t\t\tattributes: { class: [\"ck\", \"ck-list__separator\"] }\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 ui/list/listitemgroupview\n*/\n/**\n* The list item group view class.\n*/\nvar ListItemGroupView = class extends View {\n\t/**\n\t* Label of the group view. Its text is configurable using the {@link #label label attribute}.\n\t*\n\t* If a custom label view is not passed in `ListItemGroupView` constructor, the label is an instance\n\t* of {@link module:ui/label/labelview~LabelView}.\n\t*/\n\tlabelView;\n\t/**\n\t* Collection of the child list items inside this group.\n\t*/\n\titems;\n\t/**\n\t* Collection of the child elements of the group.\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the list item group view class.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param labelView The instance of the group's label. If not provided, an instance of\n\t* {@link module:ui/label/labelview~LabelView} is used.\n\t*/\n\tconstructor(locale, labelView = new LabelView()) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst nestedList = new ListView(locale);\n\t\tthis.set({\n\t\t\tlabel: \"\",\n\t\t\tisVisible: true\n\t\t});\n\t\tthis.labelView = labelView;\n\t\tthis.labelView.bind(\"text\").to(this, \"label\");\n\t\tthis.children = this.createCollection();\n\t\tthis.children.addMany([this.labelView, nestedList]);\n\t\tnestedList.set({\n\t\t\trole: \"group\",\n\t\t\tariaLabelledBy: labelView.id\n\t\t});\n\t\tnestedList.focusTracker.destroy();\n\t\tnestedList.keystrokes.destroy();\n\t\tthis.items = nestedList.items;\n\t\tthis.setTemplate({\n\t\t\ttag: \"li\",\n\t\t\tattributes: {\n\t\t\t\trole: \"presentation\",\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-list__group\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Focuses the list item (which is not a separator).\n\t*/\n\tfocus() {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (this.items) {\n\t\t\tconst firstListItem = this.items.find((item) => !(item instanceof ListSeparatorView));\n\t\t\tif (firstListItem) firstListItem.focus();\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 ui/list/listview\n*/\n/**\n* The list view class.\n*/\nvar ListView = class extends View {\n\t/**\n\t* The collection of focusable views in the list. It is used to determine accessible navigation\n\t* between the {@link module:ui/list/listitemview~ListItemView list items} and\n\t* {@link module:ui/list/listitemgroupview~ListItemGroupView list groups}.\n\t*/\n\tfocusables;\n\t/**\n\t* Collection of the child list views.\n\t*/\n\titems;\n\t/**\n\t* Tracks information about DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Helps cycling over focusable {@link #items} in the list.\n\t*/\n\t_focusCycler;\n\t/**\n\t* A cached map of {@link module:ui/list/listitemgroupview~ListItemGroupView} to `change` event listeners for their `items`.\n\t* Used for accessibility and keyboard navigation purposes.\n\t*/\n\t_listItemGroupToChangeListeners = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.focusables = new ViewCollection();\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"arrowup\",\n\t\t\t\tfocusNext: \"arrowdown\"\n\t\t\t}\n\t\t});\n\t\tthis.set(\"ariaLabel\", void 0);\n\t\tthis.set(\"ariaLabelledBy\", void 0);\n\t\tthis.set(\"role\", void 0);\n\t\tthis.setTemplate({\n\t\t\ttag: \"ul\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-list\"\n\t\t\t\t],\n\t\t\t\trole: bind.to(\"role\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\t\"aria-labelledby\": bind.to(\"ariaLabelledBy\")\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tfor (const item of this.items) if (item instanceof ListItemGroupView) this._registerFocusableItemsGroup(item);\n\t\telse if (item instanceof ListItemView) this._registerFocusableListItem(item);\n\t\tthis.items.on(\"change\", (evt, data) => {\n\t\t\tfor (const removed of data.removed) if (removed instanceof ListItemGroupView) this._deregisterFocusableItemsGroup(removed);\n\t\t\telse if (removed instanceof ListItemView) this._deregisterFocusableListItem(removed);\n\t\t\tfor (const added of Array.from(data.added).reverse()) if (added instanceof ListItemGroupView) this._registerFocusableItemsGroup(added, data.index);\n\t\t\telse this._registerFocusableListItem(added, data.index);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #items}.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #items}.\n\t*/\n\tfocusFirst() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last focusable in {@link #items}.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\n\t}\n\t/**\n\t* Registers a list item view in the focus tracker.\n\t*\n\t* @param item The list item view to be registered.\n\t* @param index Index of the list item view in the {@link #items} collection. If not specified, the item will be added at the end.\n\t*/\n\t_registerFocusableListItem(item, index) {\n\t\tthis.focusTracker.add(item.element);\n\t\tthis.focusables.add(item, index);\n\t}\n\t/**\n\t* Removes a list item view from the focus tracker.\n\t*\n\t* @param item The list item view to be removed.\n\t*/\n\t_deregisterFocusableListItem(item) {\n\t\tthis.focusTracker.remove(item.element);\n\t\tthis.focusables.remove(item);\n\t}\n\t/**\n\t* Gets a callback that will be called when the `items` collection of a {@link module:ui/list/listitemgroupview~ListItemGroupView}\n\t* change.\n\t*\n\t* @param groupView The group view for which the callback will be created.\n\t* @returns The callback function to be used for the items `change` event listener in a group.\n\t*/\n\t_getOnGroupItemsChangeCallback(groupView) {\n\t\treturn (evt, data) => {\n\t\t\tfor (const removed of data.removed) this._deregisterFocusableListItem(removed);\n\t\t\tfor (const added of Array.from(data.added).reverse()) this._registerFocusableListItem(added, this.items.getIndex(groupView) + data.index);\n\t\t};\n\t}\n\t/**\n\t* Registers a list item group view (and its children) in the focus tracker.\n\t*\n\t* @param groupView A group view to be registered.\n\t* @param groupIndex Index of the group view in the {@link #items} collection. If not specified, the group will be added at the end.\n\t*/\n\t_registerFocusableItemsGroup(groupView, groupIndex) {\n\t\tArray.from(groupView.items).forEach((child, childIndex) => {\n\t\t\tconst registeredChildIndex = typeof groupIndex !== \"undefined\" ? groupIndex + childIndex : void 0;\n\t\t\tthis._registerFocusableListItem(child, registeredChildIndex);\n\t\t});\n\t\tconst groupItemsChangeCallback = this._getOnGroupItemsChangeCallback(groupView);\n\t\tthis._listItemGroupToChangeListeners.set(groupView, groupItemsChangeCallback);\n\t\tgroupView.items.on(\"change\", groupItemsChangeCallback);\n\t}\n\t/**\n\t* Removes a list item group view (and its children) from the focus tracker.\n\t*\n\t* @param groupView The group view to be removed.\n\t*/\n\t_deregisterFocusableItemsGroup(groupView) {\n\t\tfor (const child of groupView.items) this._deregisterFocusableListItem(child);\n\t\tgroupView.items.off(\"change\", this._listItemGroupToChangeListeners.get(groupView));\n\t\tthis._listItemGroupToChangeListeners.delete(groupView);\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* Represents a dropdown menu list view.\n*/\nvar DropdownMenuListView = class extends ListView {\n\t/**\n\t* Creates an instance of the dropdown menu list view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.role = \"menu\";\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-dropdown-menu-list\", bind.if(\"isVisible\", \"ck-hidden\", (value) => !value)] } });\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*/\nconst NESTED_PANEL_HORIZONTAL_OFFSET$1 = 5;\n/**\n* Contains every positioning function used by {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView} that\n* decides where the {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView#panelView} should be placed.\n*\n* Positioning functions:\n*\n*\t┌──────┬───────────────┐\n*\t│      │               │\n*\t└──────┤               │\n*\t       │               │\n*\t       │            ES │\n*\t       └───────────────┘\n*\n*\t┌───────────────┬──────┐\n*\t│               │      │\n*\t│               ├──────┘\n*\t│               │\n*\t│ WS            │\n*\t└───────────────┘\n*\n*\t       ┌───────────────┐\n*\t       │            EN │\n*\t       │               │\n*\t┌──────┤               │\n*\t│      │               │\n*\t└──────┴───────────────┘\n*\n*\t┌───────────────┐\n*\t│ WN            │\n*\t│               │\n*\t│               ├──────┐\n*\t│               │      │\n*\t└───────────────┴──────┘\n*/\nconst DropdownMenuPanelPositioningFunctions = {\n\teastSouth: (buttonRect) => ({\n\t\ttop: buttonRect.top,\n\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"es\"\n\t}),\n\teastNorth: (buttonRect, panelRect) => ({\n\t\ttop: buttonRect.top - panelRect.height + buttonRect.height,\n\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"en\"\n\t}),\n\twestSouth: (buttonRect, panelRect) => ({\n\t\ttop: buttonRect.top,\n\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"ws\"\n\t}),\n\twestNorth: (buttonRect, panelRect) => ({\n\t\ttop: buttonRect.top - panelRect.height + buttonRect.height,\n\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"wn\"\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* Represents a view for a single item in a dropdown menu list.\n*/\nvar DropdownMenuListItemView = class extends ListItemView {\n\t/**\n\t* The view representing either a flat item or a nested menu in a dropdown menu list item.\n\t*/\n\tchildView;\n\tconstructor(locale, parentMenuView, childView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.childView = childView;\n\t\tthis.children.add(childView);\n\t\tthis.extendTemplate({\n\t\t\tattributes: { class: [\"ck-dropdown-menu-list__nested-menu__item\"] },\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t\tif (parentMenuView) {\n\t\t\tthis.delegate(\"mouseenter\").to(parentMenuView);\n\t\t\tif (childView instanceof DropdownMenuListItemButtonView) childView.delegate(\"execute\").to(parentMenuView);\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* @internal\n*/\nconst DropdownRootMenuBehaviors = {\n\t/**\n\t* Move focus to a menu item on mouse hover. If it is a button to open a nested menu, open that menu.\n\t*/\n\ttoggleMenusAndFocusItemsOnHover(rootList) {\n\t\trootList.on(\"menu:mouseenter\", (evt) => {\n\t\t\tconst [pathLeaf] = evt.path;\n\t\t\tevt.source.focus();\n\t\t\tfor (const menuView of rootList.menus) {\n\t\t\t\tconst isListItemContainingMenu = pathLeaf instanceof DropdownMenuListItemView && pathLeaf.childView === menuView;\n\t\t\t\tmenuView.isOpen = (evt.path.includes(menuView) || isListItemContainingMenu) && menuView.isEnabled;\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Handles the following case:\n\t*\n\t* 1. Hover to open a sub-menu (A). The button has focus.\n\t* 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t* 3. Press arrow right to open the sub-menu (B).\n\t* 4. The sub-menu (A) should close (if not, there are two open menus).\n\t*/\n\tcloseMenuWhenAnotherOnTheSameLevelOpens(rootList) {\n\t\trootList.on(\"menu:change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen) return;\n\t\t\tconst evtMenu = evt.source;\n\t\t\tfor (const menuView of rootList.menus) if (evtMenu.parentMenuView === menuView.parentMenuView && evtMenu !== menuView) menuView.isOpen = false;\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nconst DropdownMenuBehaviors = {\n\t/**\n\t* Open the menu on the right arrow key press (left, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t*/\n\topenOnArrowRightKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowleft\" : \"arrowright\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled) return;\n\t\t\tif (!menuView.isOpen) menuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Opens the menu on its button click as well as enter and space keys press (if the button is focused).\n\t*/\n\topenOnButtonClick(menuView) {\n\t\tmenuView.buttonView.on(\"execute\", () => {\n\t\t\tif (menuView.isEnabled) menuView.isOpen = true;\n\t\t});\n\t},\n\t/**\n\t* Opens the menu and focuses the panel content upon pressing the Enter key.\n\t*/\n\topenAndFocusOnEnterKeyPress(menuView) {\n\t\tmenuView.keystrokes.set(\"enter\", (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element) return;\n\t\t\tmenuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Closes the menu on the left key press (right, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t*/\n\tcloseOnArrowLeftKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowright\" : \"arrowleft\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.focus();\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\tcloseOnEscKey(menuView) {\n\t\tmenuView.keystrokes.set(\"esc\", (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.focus();\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Closes the menu when its parent menu closes. This prevents from leaving orphaned open menus.\n\t*/\n\tcloseOnParentClose(menuView, parentMenuView) {\n\t\tparentMenuView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen && evt.source === parentMenuView) menuView.isOpen = false;\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* Represents the view for the dropdown menu panel.\n*/\nvar DropdownMenuNestedMenuPanelView = class extends BalloonPanelView {\n\t/**\n\t* Creates an instance of the menu panel view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\tisVisible: false,\n\t\t\tposition: \"se\",\n\t\t\tclass: null,\n\t\t\ttop: 0,\n\t\t\tleft: 0\n\t\t});\n\t\tthis.extendTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-reset\", \"ck-dropdown-menu__nested-menu__panel\"],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\ton: { selectstart: bind.to((evt) => {\n\t\t\t\tif (evt.target.tagName.toLocaleLowerCase() === \"input\") return;\n\t\t\t\tevt.preventDefault();\n\t\t\t}) }\n\t\t});\n\t}\n\t/**\n\t* Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t*\n\t* @param direction The direction to focus. Default is `1`.\n\t*/\n\tfocus(direction = 1) {\n\t\tconst { content } = this;\n\t\tif (content.length) {\n\t\t\tif (direction === 1) content.first.focus();\n\t\t\telse content.last.focus();\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 ui/dropdown/menu/dropdownmenunestedmenuview\n*/\n/**\n* Represents a nested menu view.\n*/\nvar DropdownMenuNestedMenuView = class DropdownMenuNestedMenuView extends View {\n\t/**\n\t* An array of delegated events for the dropdown menu definition controller.\n\t* These events are delegated to the dropdown menu element.\n\t*/\n\tstatic DELEGATED_EVENTS = [\n\t\t\"mouseenter\",\n\t\t\"execute\",\n\t\t\"change:isOpen\"\n\t];\n\tid;\n\t/**\n\t* Button of the menu view.\n\t*/\n\tbuttonView;\n\t/**\n\t* Panel of the menu. It hosts children of the menu.\n\t*/\n\tpanelView;\n\t/**\n\t* List of nested menu entries.\n\t*/\n\tlistView;\n\t/**\n\t* Tracks information about the DOM focus in the menu.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the menu.\n\t*/\n\tkeystrokes;\n\t_bodyCollection;\n\t/**\n\t* Creates a new instance of the DropdownMenuView class.\n\t*\n\t* @param locale\n\t* @param bodyCollection\n\t* @param id\n\t* @param label The label for the dropdown menu button.\n\t* @param parentMenuView The parent dropdown menu view, if any.\n\t*/\n\tconstructor(locale, bodyCollection, id, label, parentMenuView) {\n\t\tsuper(locale);\n\t\tthis._bodyCollection = bodyCollection;\n\t\tthis.id = id;\n\t\tthis.set({\n\t\t\tisOpen: false,\n\t\t\tisEnabled: true,\n\t\t\tpanelPosition: \"w\",\n\t\t\tclass: void 0,\n\t\t\tparentMenuView: null\n\t\t});\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.buttonView = new DropdownMenuButtonView(locale);\n\t\tthis.buttonView.delegate(\"mouseenter\").to(this);\n\t\tthis.buttonView.bind(\"isOn\", \"isEnabled\").to(this, \"isOpen\", \"isEnabled\");\n\t\tthis.buttonView.label = label;\n\t\tthis.panelView = new DropdownMenuNestedMenuPanelView(locale);\n\t\tthis.panelView.isVisible = true;\n\t\tthis.listView = new DropdownMenuListView(locale);\n\t\tthis.listView.bind(\"ariaLabel\").to(this.buttonView, \"label\");\n\t\tthis.panelView.content.add(this.listView);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-dropdown-menu-list__nested-menu\",\n\t\t\t\t\tbind.to(\"class\"),\n\t\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value)\n\t\t\t\t],\n\t\t\t\trole: \"presentation\"\n\t\t\t},\n\t\t\tchildren: [this.buttonView]\n\t\t});\n\t\tthis.parentMenuView = parentMenuView;\n\t\tif (this.parentMenuView) this._handleParentMenuView();\n\t\tthis._attachBehaviors();\n\t}\n\t/**\n\t* An array of positioning functions used to determine the position of the dropdown menu panel.\n\t* The order of the functions in the array determines the priority of the positions to be tried.\n\t* The first function that returns a valid position will be used.\n\t*\n\t* @returns {Array<PositioningFunction>} An array of positioning functions.\n\t* @internal\n\t*/\n\tget _panelPositions() {\n\t\tconst { westSouth, eastSouth, westNorth, eastNorth } = DropdownMenuPanelPositioningFunctions;\n\t\tif (this.locale.uiLanguageDirection === \"ltr\") return [\n\t\t\teastSouth,\n\t\t\teastNorth,\n\t\t\twestSouth,\n\t\t\twestNorth\n\t\t];\n\t\telse return [\n\t\t\twestSouth,\n\t\t\twestNorth,\n\t\t\teastSouth,\n\t\t\teastNorth\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.panelView.render();\n\t\tthis.focusTracker.add(this.buttonView.element);\n\t\tthis.focusTracker.add(this.panelView.element);\n\t\tthis.focusTracker.add(this.listView);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis._mountPanelOnOpen();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._removePanelFromBody();\n\t\tthis.panelView.destroy();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t_handleParentMenuView() {\n\t\tthis.delegate(...DropdownMenuNestedMenuView.DELEGATED_EVENTS).to(this.parentMenuView);\n\t\tDropdownMenuBehaviors.closeOnParentClose(this, this.parentMenuView);\n\t}\n\t/**\n\t* Attach all keyboard behaviors for the menu view.\n\t*/\n\t_attachBehaviors() {\n\t\tDropdownMenuBehaviors.openOnButtonClick(this);\n\t\tDropdownMenuBehaviors.openAndFocusOnEnterKeyPress(this);\n\t\tDropdownMenuBehaviors.openOnArrowRightKey(this);\n\t\tDropdownMenuBehaviors.closeOnEscKey(this);\n\t\tDropdownMenuBehaviors.closeOnArrowLeftKey(this);\n\t}\n\t/**\n\t* Mounts the portal view in the body when the menu is open and removes it when the menu is closed.\n\t* Binds keystrokes to the portal view when the menu is open.\n\t*/\n\t_mountPanelOnOpen() {\n\t\tconst { panelView } = this;\n\t\tthis.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (evt.source !== this) return;\n\t\t\tif (!isOpen && this._bodyCollection.has(panelView)) {\n\t\t\t\tthis._removePanelFromBody();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isOpen && !this._bodyCollection.has(panelView)) this._addPanelToBody();\n\t\t});\n\t}\n\t/**\n\t* Removes the panel view from the editor's body and removes it from the focus tracker.\n\t*/\n\t_removePanelFromBody() {\n\t\tconst { panelView, keystrokes } = this;\n\t\tif (this._bodyCollection.has(panelView)) {\n\t\t\tthis._bodyCollection.remove(panelView);\n\t\t\tkeystrokes.stopListening(panelView.element);\n\t\t}\n\t}\n\t/**\n\t* Adds the panel view to the editor's body and sets up event listeners.\n\t*/\n\t_addPanelToBody() {\n\t\tconst { panelView, buttonView, keystrokes } = this;\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (!this._bodyCollection.has(panelView)) {\n\t\t\tthis._bodyCollection.add(panelView);\n\t\t\tkeystrokes.listenTo(panelView.element);\n\t\t\tpanelView.pin({\n\t\t\t\tpositions: this._panelPositions,\n\t\t\t\tlimiter: global.document.body,\n\t\t\t\telement: panelView.element,\n\t\t\t\ttarget: buttonView.element,\n\t\t\t\tfitInViewport: true\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 ui/dropdown/menu/dropdownmenurootlistview\n*/\n/**\n* Creates and manages a multi-level menu UI structure, suitable to be used inside dropdown components.\n*\n* This class creates a menu structure based on {@link module:ui/dropdown/menu/utils~DropdownMenuDefinition declarative definition}\n* passed in the constructor.\n*\n* Below is an example of a simple definition, that describes a menu with two sub-menus (Menu 1, Menu 2) and four buttons in total (Item A,\n* Item B, Item C, Item D):\n*\n* ```js\n* [\n* \t{\n* \t\tid: 'menu_1',\n* \t\tmenu: 'Menu 1',\n* \t\tchildren: [\n* \t\t\t{ id: 'menu_1_a', label: 'Item A' },\n* \t\t\t{ id: 'menu_1_b', label: 'Item B' }\n* \t\t]\n* \t},\n* \t{\n* \t\tid: 'menu_2',\n* \t\tmenu: 'Menu 2',\n* \t\tchildren: [\n* \t\t\t{ id: 'menu_2_c', label: 'Item C' },\n* \t\t]\n* \t},\n* \t{ id: 'item_d', label: 'Item D' }\n* ]\n* ```\n*\n* The menu is build using multiple view classes. The most important are:\n*\n* * {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView `DropdownMenuNestedMenuView`} - \"menu\" - provides\n* a panel with a nested menu, and a button which opens the panel,\n* * {@link module:ui/dropdown/menu/dropdownmenulistitembuttonview~DropdownMenuListItemButtonView `DropdownMenuListItemButtonView`} -\n* \"button\" or \"leaf button\" (as opposed to buttons provided by `DropdownMenuNestedMenuView`) - should trigger some action when pressed.\n*\n* Instances of these two classes are created based on the data provided in definitions. They are assigned proper IDs and labels.\n* Other view classes build a proper DOM structure around menus and buttons.\n*\n* The `DropdownMenuNestedMenuView` instances provides panels, which may include further menus or buttons. These panels are added to\n* a `BodyCollection` view, which means they are appended outside the DOM editor and UI structure.\n*\n* When \"leaf button\" is pressed, it fires `execute` event which is delegated to `DropdownMenuRootListView` as `menu:execute` event. You\n* can listen to this event to perform an action:\n*\n* ```js\n* rootListView.on( 'menu:execute', evt => {\n* \tconsole.log( evt.source.id ); // E.g. will print 'menu_1_a' when 'Item A' is pressed.\n* } );\n* ```\n*\n* All menus and \"leaf\" buttons created from the definition can be easily accessed through {@link ~DropdownMenuRootListView#menus `menus`}\n* and {@link ~DropdownMenuRootListView#buttons `buttons`} properties.\n*\n* For performance reasons, the whole menu structure is created only when `DropdownMenuRootListView` is rendered for the first time.\n*\n* It is recommended to use this class together with {@link module:ui/dropdown/utils~addMenuToDropdown `addMenuToDropdown()` helper}.\n*/\nvar DropdownMenuRootListView = class extends DropdownMenuListView {\n\t/**\n\t* The definitions object used to create the whole menu structure.\n\t*/\n\t_definition;\n\t/**\n\t* Cached array of all menus in the dropdown menu (including nested menus).\n\t*/\n\t_cachedMenus = [];\n\t/**\n\t* Cached array of all buttons in the dropdown menu (including buttons in nested menus).\n\t*/\n\t_cachedButtons = [];\n\t/**\n\t* Editor body collection into which nested menus panels will be appended.\n\t*/\n\t_bodyCollection;\n\t/**\n\t* Creates an instance of the DropdownMenuRootListView class.\n\t*\n\t* @param locale\n\t* @param bodyCollection\n\t* @param definition The definition object used to create the menu structure.\n\t*/\n\tconstructor(locale, bodyCollection, definition) {\n\t\tsuper(locale);\n\t\tthis._bodyCollection = bodyCollection;\n\t\tthis._definition = definition;\n\t\tthis.set(\"menuPanelClass\", void 0);\n\t}\n\t/**\n\t* Returns the array of all menus in the dropdown menu (including nested menus).\n\t*/\n\tget menus() {\n\t\treturn Array.from(this._cachedMenus.values());\n\t}\n\t/**\n\t* Returns the array of all buttons in the dropdown menu (including buttons in nested menus).\n\t*\n\t* Note, that this includes only \"leaf\" buttons, as specified in the definition passed in constructor. Buttons created as a part of\n\t* the nested menus, that open nested menus when hovered or pressed, are not included.\n\t*/\n\tget buttons() {\n\t\treturn Array.from(this._cachedButtons.values());\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tthis._createStructure(this._definition, null);\n\t\tsuper.render();\n\t\tDropdownRootMenuBehaviors.toggleMenusAndFocusItemsOnHover(this);\n\t\tDropdownRootMenuBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens(this);\n\t}\n\t/**\n\t* Closes all nested menus.\n\t*/\n\tcloseMenus() {\n\t\tthis.menus.forEach((menu) => {\n\t\t\tmenu.isOpen = false;\n\t\t});\n\t}\n\t/**\n\t* Recursively creates the whole view tree structure for the dropdown menu, according to the passed `definitions`.\n\t*\n\t* @private\n\t*/\n\t_createStructure(definitions, parentMenuView) {\n\t\tconst items = [];\n\t\tfor (const def of definitions) {\n\t\t\tlet createdView;\n\t\t\tif (\"menu\" in def) {\n\t\t\t\tcreatedView = new DropdownMenuNestedMenuView(this.locale, this._bodyCollection, def.id, def.menu, parentMenuView);\n\t\t\t\tcreatedView.panelView.bind(\"class\").to(this, \"menuPanelClass\");\n\t\t\t\tif (!parentMenuView) createdView.delegate(...DropdownMenuNestedMenuView.DELEGATED_EVENTS).to(this, (name) => `menu:${name}`);\n\t\t\t\tthis._cachedMenus.push(createdView);\n\t\t\t\tthis._createStructure(def.children, createdView);\n\t\t\t} else {\n\t\t\t\tcreatedView = new DropdownMenuListItemButtonView(this.locale, def.id, def.label);\n\t\t\t\tif (!parentMenuView) createdView.delegate(\"execute\").to(this, \"menu:execute\");\n\t\t\t\tthis._cachedButtons.push(createdView);\n\t\t\t}\n\t\t\tconst listItemView = new DropdownMenuListItemView(this.locale, parentMenuView, createdView);\n\t\t\tif (!parentMenuView) listItemView.delegate(\"mouseenter\").to(this, \"menu:mouseenter\");\n\t\t\titems.push(listItemView);\n\t\t}\n\t\t(parentMenuView ? parentMenuView.listView : this).items.addMany(items);\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 ui/toolbar/toolbarseparatorview\n*/\n/**\n* The toolbar separator view class.\n*/\nvar ToolbarSeparatorView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-toolbar__separator\"] }\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 ui/toolbar/toolbarlinebreakview\n*/\n/**\n* The toolbar line break view class.\n*/\nvar ToolbarLineBreakView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-toolbar__line-break\"] }\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* A helper which executes a native `Event.preventDefault()` if the target of an event equals the\n* {@link module:ui/view~View#element element of the view}. It shortens the definition of a\n* {@link module:ui/view~View#template template}.\n*\n* ```ts\n* // In a class extending View.\n* import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';\n*\n* // ...\n*\n* this.setTemplate( {\n* \ttag: 'div',\n*\n* \ton: {\n* \t\t// Prevent the default mousedown action on this view.\n* \t\tmousedown: preventDefault( this )\n* \t}\n* } );\n* ```\n*\n* @param view View instance that defines the template.\n* @internal\n*/\nfunction preventDefault(view) {\n\treturn view.bindTemplate.to((evt) => {\n\t\tif (evt.target === view.element) evt.preventDefault();\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* Normalizes the toolbar configuration (`config.toolbar`), which:\n*\n* * may be defined as an `Array`:\n*\n* ```\n* toolbar: [ 'heading', 'bold', 'italic', 'link', ... ]\n* ```\n*\n* * or an `Object`:\n*\n* ```\n* toolbar: {\n* \titems: [ 'heading', 'bold', 'italic', 'link', ... ],\n* \tremoveItems: [ 'bold' ],\n* \t...\n* }\n* ```\n*\n* * or may not be defined at all (`undefined`)\n*\n* and returns it in the object form.\n*\n* @param config The value of `config.toolbar`.\n* @returns A normalized toolbar config object.\n*/\nfunction normalizeToolbarConfig(config) {\n\tif (Array.isArray(config)) return {\n\t\titems: config,\n\t\tremoveItems: []\n\t};\n\tconst predefinedConfigOptions = {\n\t\titems: [],\n\t\tremoveItems: []\n\t};\n\tif (!config) return predefinedConfigOptions;\n\treturn {\n\t\t...predefinedConfigOptions,\n\t\t...config\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 ui/toolbar/toolbarview\n*/\n/**\n* @internal\n*/\nconst NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (() => ({\n\talignLeft: IconAlignLeft,\n\tbold: IconBold,\n\timportExport: IconImportExport,\n\tparagraph: IconParagraph,\n\tplus: IconPlus,\n\ttext: IconText,\n\tthreeVerticalDots: IconThreeVerticalDots,\n\tpilcrow: IconPilcrow,\n\tdragIndicator: IconDragIndicator\n}))();\n/**\n* The toolbar view class.\n*/\nvar ToolbarView = class extends View {\n\t/**\n\t* A reference to the options object passed to the constructor.\n\t*/\n\toptions;\n\t/**\n\t* A collection of toolbar items (buttons, dropdowns, etc.).\n\t*/\n\titems;\n\t/**\n\t* Tracks information about the DOM focus in the toolbar.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t* to handle keyboard navigation in the toolbar.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A (child) view containing {@link #items toolbar items}.\n\t*/\n\titemsView;\n\t/**\n\t* A top–level collection aggregating building blocks of the toolbar.\n\t*\n\t*\t┌───────────────── ToolbarView ─────────────────┐\n\t*\t| ┌──────────────── #children ────────────────┐ |\n\t*\t| |   ┌──────────── #itemsView ───────────┐   | |\n\t*\t| |   | [ item1 ] [ item2 ] ... [ itemN ] |   | |\n\t*\t| |   └──────────────────────────────────-┘   | |\n\t*\t| └───────────────────────────────────────────┘ |\n\t*\t└───────────────────────────────────────────────┘\n\t*\n\t* By default, it contains the {@link #itemsView} but it can be extended with additional\n\t* UI elements when necessary.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of {@link #items} that take part in the focus cycling\n\t* (i.e. navigation using the keyboard). Usually, it contains a subset of {@link #items} with\n\t* some optional UI elements that also belong to the toolbar and should be focusable\n\t* by the user.\n\t*/\n\tfocusables;\n\t/**\n\t* Helps cycling over {@link #focusables focusable items} in the toolbar.\n\t*/\n\t_focusCycler;\n\t/**\n\t* An instance of the active toolbar behavior that shapes its look and functionality.\n\t*\n\t* See {@link module:ui/toolbar/toolbarview~ToolbarBehavior} to learn more.\n\t*/\n\t_behavior;\n\t/**\n\t* Creates an instance of the {@link module:ui/toolbar/toolbarview~ToolbarView} class.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Configuration options of the toolbar.\n\t*/\n\tconstructor(locale, options) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = this.t;\n\t\tthis.options = options || {};\n\t\tthis.set(\"ariaLabel\", t(\"Editor toolbar\"));\n\t\tthis.set(\"maxWidth\", \"auto\");\n\t\tthis.set(\"role\", \"toolbar\");\n\t\tthis.set(\"isGrouping\", !!this.options.shouldGroupWhenFull);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"isCompact\", false);\n\t\tthis.set(\"isVertical\", false);\n\t\tthis.itemsView = new ItemsView(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.children.add(this.itemsView);\n\t\tthis.focusables = this.createCollection();\n\t\tconst isRtl = locale.uiLanguageDirection === \"rtl\";\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: [isRtl ? \"arrowright\" : \"arrowleft\", \"arrowup\"],\n\t\t\t\tfocusNext: [isRtl ? \"arrowleft\" : \"arrowright\", \"arrowdown\"]\n\t\t\t}\n\t\t});\n\t\tconst classes = [\n\t\t\t\"ck\",\n\t\t\t\"ck-toolbar\",\n\t\t\tbind.to(\"class\"),\n\t\t\tbind.if(\"isCompact\", \"ck-toolbar_compact\"),\n\t\t\tbind.if(\"isGrouping\", \"ck-toolbar_grouping\"),\n\t\t\tbind.if(\"isVertical\", \"ck-toolbar_vertical\")\n\t\t];\n\t\tif (this.options.shouldGroupWhenFull && this.options.isFloating) classes.push(\"ck-toolbar_floating\");\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: classes,\n\t\t\t\trole: bind.to(\"role\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\tstyle: { maxWidth: bind.to(\"maxWidth\") },\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { mousedown: preventDefault(this) }\n\t\t});\n\t\tthis._behavior = this.options.shouldGroupWhenFull ? new DynamicGrouping(this) : new StaticLayout(this);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.element);\n\t\tfor (const item of this.items) this.focusTracker.add(item);\n\t\tthis.items.on(\"add\", (evt, item) => {\n\t\t\tthis.focusTracker.add(item);\n\t\t});\n\t\tthis.items.on(\"remove\", (evt, item) => {\n\t\t\tthis.focusTracker.remove(item);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis._behavior.render(this);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._behavior.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t\treturn super.destroy();\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #focusables}.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last focusable in {@link #focusables}.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\n\t}\n\t/**\n\t* A utility that expands the plain toolbar configuration into\n\t* {@link module:ui/toolbar/toolbarview~ToolbarView#items} using a given component factory.\n\t*\n\t* @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t* @param factory A factory producing toolbar items.\n\t* @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t* to this toolbar and all nested ones as well.\n\t*/\n\tfillFromConfig(itemsOrConfig, factory, removeItems) {\n\t\tthis.items.addMany(this._buildItemsFromConfig(itemsOrConfig, factory, removeItems));\n\t}\n\t/**\n\t* Changes the behavior of toolbar if it does not fit into the available space.\n\t*/\n\tswitchBehavior(newBehaviorType) {\n\t\tif (this._behavior.type !== newBehaviorType) {\n\t\t\tthis._behavior.destroy();\n\t\t\tthis.itemsView.children.clear();\n\t\t\tthis.focusables.clear();\n\t\t\tif (newBehaviorType === \"dynamic\") {\n\t\t\t\tthis._behavior = new DynamicGrouping(this);\n\t\t\t\tthis._behavior.render(this);\n\t\t\t\tthis._behavior.refreshItems();\n\t\t\t} else {\n\t\t\t\tthis._behavior = new StaticLayout(this);\n\t\t\t\tthis._behavior.render(this);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* A utility that expands the plain toolbar configuration into a list of view items using a given component factory.\n\t*\n\t* @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t* @param factory A factory producing toolbar items.\n\t* @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t* to this toolbar and all nested ones as well.\n\t*/\n\t_buildItemsFromConfig(itemsOrConfig, factory, removeItems) {\n\t\tconst config = normalizeToolbarConfig(itemsOrConfig);\n\t\tconst normalizedRemoveItems = removeItems || config.removeItems;\n\t\treturn this._cleanItemsConfiguration(config.items, factory, normalizedRemoveItems).map((item) => {\n\t\t\tif (isObject(item)) return this._createNestedToolbarDropdown(item, factory, normalizedRemoveItems);\n\t\t\telse if (item === \"|\") return new ToolbarSeparatorView();\n\t\t\telse if (item === \"-\") return new ToolbarLineBreakView();\n\t\t\treturn factory.create(item);\n\t\t}).filter((item) => !!item);\n\t}\n\t/**\n\t* Cleans up the {@link module:ui/toolbar/toolbarview~ToolbarView#items} of the toolbar by removing unwanted items and\n\t* duplicated (obsolete) separators or line breaks.\n\t*\n\t* @param items The toolbar items configuration.\n\t* @param factory A factory producing toolbar items.\n\t* @param removeItems An array of items names to be removed from the configuration.\n\t* @returns Items after the clean-up.\n\t*/\n\t_cleanItemsConfiguration(items, factory, removeItems) {\n\t\tconst filteredItems = items.filter((item, idx, items) => {\n\t\t\tif (item === \"|\") return true;\n\t\t\tif (removeItems.indexOf(item) !== -1) return false;\n\t\t\tif (item === \"-\") {\n\t\t\t\tif (this.options.shouldGroupWhenFull) {\n\t\t\t\t\t/**\n\t\t\t\t\t* The toolbar multiline breaks (`-` items) only work when the automatic button grouping\n\t\t\t\t\t* is disabled in the toolbar configuration.\n\t\t\t\t\t* To do this, set the `shouldNotGroupWhenFull` option to `true` in the editor configuration:\n\t\t\t\t\t*\n\t\t\t\t\t* ```ts\n\t\t\t\t\t* const config = {\n\t\t\t\t\t* \ttoolbar: {\n\t\t\t\t\t* \t\titems: [ ... ],\n\t\t\t\t\t* \t\tshouldNotGroupWhenFull: true\n\t\t\t\t\t* \t}\n\t\t\t\t\t* }\n\t\t\t\t\t* ```\n\t\t\t\t\t*\n\t\t\t\t\t* Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t\t*\n\t\t\t\t\t* @error toolbarview-line-break-ignored-when-grouping-items\n\t\t\t\t\t*/\n\t\t\t\t\tlogWarning(\"toolbarview-line-break-ignored-when-grouping-items\", items);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (!isObject(item) && !factory.has(item)) {\n\t\t\t\t/**\n\t\t\t\t* There was a problem processing the configuration of the toolbar. The item with the given\n\t\t\t\t* name does not exist so it was omitted when rendering the toolbar.\n\t\t\t\t*\n\t\t\t\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t\t* to provide a toolbar item has not been loaded or there is a typo in the\n\t\t\t\t* {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t*\n\t\t\t\t* Make sure the plugin responsible for this toolbar item is loaded and the toolbar configuration\n\t\t\t\t* is correct, e.g. {@link module:basic-styles/bold~Bold} is loaded for the `'bold'` toolbar item.\n\t\t\t\t*\n\t\t\t\t* You can use the following snippet to retrieve all available toolbar items:\n\t\t\t\t*\n\t\t\t\t* ```ts\n\t\t\t\t* Array.from( editor.ui.componentFactory.names() );\n\t\t\t\t* ```\n\t\t\t\t*\n\t\t\t\t* @error toolbarview-item-unavailable\n\t\t\t\t* @param {string} item The name of the component or nested toolbar definition.\n\t\t\t\t*/\n\t\t\t\tlogWarning(\"toolbarview-item-unavailable\", { item });\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\treturn this._cleanSeparatorsAndLineBreaks(filteredItems);\n\t}\n\t/**\n\t* Remove leading, trailing, and duplicated separators (`-` and `|`).\n\t*\n\t* @returns Toolbar items after the separator and line break clean-up.\n\t*/\n\t_cleanSeparatorsAndLineBreaks(items) {\n\t\tconst nonSeparatorPredicate = (item) => item !== \"-\" && item !== \"|\";\n\t\tconst count = items.length;\n\t\tconst firstCommandItemIndex = items.findIndex(nonSeparatorPredicate);\n\t\tif (firstCommandItemIndex === -1) return [];\n\t\tconst lastCommandItemIndex = count - items.slice().reverse().findIndex(nonSeparatorPredicate);\n\t\treturn items.slice(firstCommandItemIndex, lastCommandItemIndex).filter((name, idx, items) => {\n\t\t\tif (nonSeparatorPredicate(name)) return true;\n\t\t\treturn !(idx > 0 && items[idx - 1] === name);\n\t\t});\n\t}\n\t/**\n\t* Creates a user-defined dropdown containing a toolbar with items.\n\t*\n\t* @param definition A definition of the nested toolbar dropdown.\n\t* @param definition.label A label of the dropdown.\n\t* @param definition.icon An icon of the drop-down. One of 'bold', 'plus', 'text', 'importExport', 'alignLeft',\n\t* 'paragraph' or an SVG string. When `false` is passed, no icon will be used.\n\t* @param definition.withText When set `true`, the label of the dropdown will be visible. See\n\t* {@link module:ui/button/buttonview~ButtonView#withText} to learn more.\n\t* @param definition.tooltip A tooltip of the dropdown button. See\n\t* {@link module:ui/button/buttonview~ButtonView#tooltip} to learn more. Defaults to `true`.\n\t* @param componentFactory Component factory used to create items\n\t* of the nested toolbar.\n\t*/\n\t_createNestedToolbarDropdown(definition, componentFactory, removeItems) {\n\t\tlet { label, icon, items, tooltip = true, withText = false } = definition;\n\t\titems = this._cleanItemsConfiguration(items, componentFactory, removeItems);\n\t\tif (!items.length) return null;\n\t\tconst locale = this.locale;\n\t\tconst dropdownView = createDropdown(locale);\n\t\tif (!label)\n /**\n\t\t* A dropdown definition in the toolbar configuration is missing a text label.\n\t\t*\n\t\t* Without a label, the dropdown becomes inaccessible to users relying on assistive technologies.\n\t\t* Make sure the `label` property is set in your drop-down configuration:\n\t\t*\n\t\t* ```json\n\t\t* {\n\t\t* \tlabel: 'A human-readable label',\n\t\t* \ticon: '...',\n\t\t* \titems: [ ... ]\n\t\t* },\n\t\t* ```\n\t\t*\n\t\t* Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t*\n\t\t* @error toolbarview-nested-toolbar-dropdown-missing-label\n\t\t*/\n\t\tlogWarning(\"toolbarview-nested-toolbar-dropdown-missing-label\", definition);\n\t\tdropdownView.class = \"ck-toolbar__nested-toolbar-dropdown\";\n\t\tdropdownView.buttonView.set({\n\t\t\tlabel,\n\t\t\ttooltip,\n\t\t\twithText: !!withText\n\t\t});\n\t\tif (icon !== false) dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[icon] || icon || IconThreeVerticalDots;\n\t\telse dropdownView.buttonView.withText = true;\n\t\taddToolbarToDropdown(dropdownView, () => dropdownView.toolbarView._buildItemsFromConfig(items, componentFactory, removeItems));\n\t\treturn dropdownView;\n\t}\n};\n/**\n* An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its\n* {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n*/\nvar ItemsView = class extends View {\n\t/**\n\t* A collection of items (buttons, dropdowns, etc.).\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-toolbar__items\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n};\n/**\n* A toolbar behavior that makes it static and unresponsive to the changes of the environment.\n* At the same time, it also makes it possible to display a toolbar with a vertical layout\n* using the {@link module:ui/toolbar/toolbarview~ToolbarView#isVertical} property.\n*/\nvar StaticLayout = class {\n\t/**\n\t* Toolbar behavior type.\n\t*/\n\ttype = \"static\";\n\t/**\n\t* Creates an instance of the {@link module:ui/toolbar/toolbarview~StaticLayout} toolbar\n\t* behavior.\n\t*\n\t* @param view An instance of the toolbar that this behavior is added to.\n\t*/\n\tconstructor(view) {\n\t\tview.isGrouping = false;\n\t\tview.itemsView.children.bindTo(view.items).using((item) => item);\n\t\tview.focusables.bindTo(view.items).using((item) => isFocusable(item) ? item : null);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {}\n};\n/**\n* A toolbar behavior that makes the items respond to changes in the geometry.\n*\n* In a nutshell, it groups {@link module:ui/toolbar/toolbarview~ToolbarView#items}\n* that do not fit visually into a single row of the toolbar (due to limited space).\n* Items that do not fit are aggregated in a dropdown displayed at the end of the toolbar.\n*\n* ```\n*\t┌──────────────────────────────────────── ToolbarView ──────────────────────────────────────────┐\n*\t| ┌─────────────────────────────────────── #children ─────────────────────────────────────────┐ |\n*\t| |   ┌─────── #itemsView ────────┐ ┌──────────────────────┐ ┌── #groupedItemsDropdown ───┐   | |\n*\t| |   |       #ungroupedItems     | | ToolbarSeparatorView | |        #groupedItems       |   | |\n*\t| |   └──────────────────────────-┘ └──────────────────────┘ └────────────────────────────┘   | |\n*\t| |                                  \\---------- only when toolbar items overflow -------/    | |\n*\t| └───────────────────────────────────────────────────────────────────────────────────────────┘ |\n*\t└───────────────────────────────────────────────────────────────────────────────────────────────┘\n* ```\n*/\nvar DynamicGrouping = class {\n\t/**\n\t* Toolbar behavior type.\n\t*/\n\ttype = \"dynamic\";\n\t/**\n\t* A toolbar view this behavior belongs to.\n\t*/\n\tview;\n\t/**\n\t* A collection of toolbar children.\n\t*/\n\tviewChildren;\n\t/**\n\t* A collection of focusable toolbar elements.\n\t*/\n\tviewFocusables;\n\t/**\n\t* A view containing toolbar items.\n\t*/\n\tviewItemsView;\n\t/**\n\t* Toolbar focus tracker.\n\t*/\n\tviewFocusTracker;\n\t/**\n\t* Toolbar locale.\n\t*/\n\tviewLocale;\n\t/**\n\t* A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t* Aggregates items that fit into a single row of the toolbar and were not {@link #groupedItems grouped}\n\t* into a {@link #groupedItemsDropdown dropdown}. Items of this collection are displayed in the\n\t* {@link module:ui/toolbar/toolbarview~ToolbarView#itemsView}.\n\t*\n\t* When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped, it\n\t* matches the {@link module:ui/toolbar/toolbarview~ToolbarView#items} collection in size and order.\n\t*/\n\tungroupedItems;\n\t/**\n\t* A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t* A collection of the toolbar items that do not fit into a single row of the toolbar.\n\t* Grouped items are displayed in a dedicated {@link #groupedItemsDropdown dropdown}.\n\t*\n\t* When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped,\n\t* this collection is empty.\n\t*/\n\tgroupedItems;\n\t/**\n\t* The dropdown that aggregates {@link #groupedItems grouped items} that do not fit into a single\n\t* row of the toolbar. It is displayed on demand as the last of\n\t* {@link module:ui/toolbar/toolbarview~ToolbarView#children toolbar children} and offers another\n\t* (nested) toolbar which displays items that would normally overflow.\n\t*/\n\tgroupedItemsDropdown;\n\t/**\n\t* An instance of the resize observer that helps dynamically determine the geometry of the toolbar\n\t* and manage items that do not fit into a single row.\n\t*\n\t* **Note:** Created in {@link #_enableGroupingOnResize}.\n\t*\n\t* @readonly\n\t*/\n\tresizeObserver = null;\n\t/**\n\t* A cached value of the horizontal padding style used by {@link #_updateGrouping}\n\t* to manage the {@link module:ui/toolbar/toolbarview~ToolbarView#items} that do not fit into\n\t* a single toolbar line. This value can be reused between updates because it is unlikely that\n\t* the padding will change and re–using `Window.getComputedStyle()` is expensive.\n\t*\n\t* @readonly\n\t*/\n\tcachedPadding = null;\n\t/**\n\t* A flag indicating that an items grouping update has been queued (e.g. due to the toolbar being visible)\n\t* and should be executed immediately the next time the toolbar shows up.\n\t*\n\t* @readonly\n\t*/\n\tshouldUpdateGroupingOnNextResize = false;\n\t/**\n\t* Toolbar element.\n\t*\n\t* @readonly\n\t*/\n\tviewElement;\n\t/**\n\t* Creates an instance of the {@link module:ui/toolbar/toolbarview~DynamicGrouping} toolbar\n\t* behavior.\n\t*\n\t* @param view An instance of the toolbar that this behavior is added to.\n\t*/\n\tconstructor(view) {\n\t\tthis.view = view;\n\t\tthis.viewChildren = view.children;\n\t\tthis.viewFocusables = view.focusables;\n\t\tthis.viewItemsView = view.itemsView;\n\t\tthis.viewFocusTracker = view.focusTracker;\n\t\tthis.viewLocale = view.locale;\n\t\tthis.view.isGrouping = true;\n\t\tthis.ungroupedItems = view.createCollection();\n\t\tthis.groupedItems = view.createCollection();\n\t\tthis.groupedItemsDropdown = this._createGroupedItemsDropdown();\n\t\tview.itemsView.children.bindTo(this.ungroupedItems).using((item) => item);\n\t\tthis.ungroupedItems.on(\"change\", this._updateFocusCyclableItems.bind(this));\n\t\tview.children.on(\"change\", this._updateFocusCyclableItems.bind(this));\n\t\tview.items.on(\"change\", (evt, changeData) => {\n\t\t\tconst index = changeData.index;\n\t\t\tconst added = Array.from(changeData.added);\n\t\t\tfor (const removedItem of changeData.removed) if (index >= this.ungroupedItems.length) this.groupedItems.remove(removedItem);\n\t\t\telse this.ungroupedItems.remove(removedItem);\n\t\t\tfor (let currentIndex = index; currentIndex < index + added.length; currentIndex++) {\n\t\t\t\tconst addedItem = added[currentIndex - index];\n\t\t\t\tif (currentIndex > this.ungroupedItems.length) this.groupedItems.add(addedItem, currentIndex - this.ungroupedItems.length);\n\t\t\t\telse this.ungroupedItems.add(addedItem, currentIndex);\n\t\t\t}\n\t\t\tthis._updateGrouping();\n\t\t});\n\t}\n\t/**\n\t* Enables dynamic items grouping based on the dimensions of the toolbar.\n\t*\n\t* @param view An instance of the toolbar that this behavior is added to.\n\t*/\n\trender(view) {\n\t\tthis.viewElement = view.element;\n\t\tthis._enableGroupingOnResize();\n\t\tthis._enableGroupingOnMaxWidthChange(view);\n\t}\n\t/**\n\t* Cleans up the internals used by this behavior.\n\t*/\n\tdestroy() {\n\t\tthis.groupedItemsDropdown.destroy();\n\t\tif (this.viewChildren.length > 1) {\n\t\t\tthis.viewChildren.remove(this.groupedItemsDropdown);\n\t\t\tthis.viewChildren.remove(this.viewChildren.last);\n\t\t}\n\t\tthis.resizeObserver.destroy();\n\t}\n\t/**\n\t* Re-adds all items to the toolbar. Use when the toolbar is re-rendered and the items grouping is lost.\n\t*/\n\trefreshItems() {\n\t\tconst view = this.view;\n\t\tif (view.items.length) {\n\t\t\tfor (let currentIndex = 0; currentIndex < view.items.length; currentIndex++) {\n\t\t\t\tconst item = [...view.items][currentIndex];\n\t\t\t\tthis.ungroupedItems.add(item, currentIndex);\n\t\t\t}\n\t\t\tthis._updateGrouping();\n\t\t}\n\t}\n\t/**\n\t* When called, it will check if any of the {@link #ungroupedItems} do not fit into a single row of the toolbar,\n\t* and it will move them to the {@link #groupedItems} when it happens.\n\t*\n\t* At the same time, it will also check if there is enough space in the toolbar for the first of the\n\t* {@link #groupedItems} to be returned back to {@link #ungroupedItems} and still fit into a single row\n\t* without the toolbar wrapping.\n\t*/\n\t_updateGrouping() {\n\t\tif (!this.viewElement.ownerDocument.body.contains(this.viewElement)) return;\n\t\tif (!isVisible(this.viewElement)) {\n\t\t\tthis.shouldUpdateGroupingOnNextResize = true;\n\t\t\treturn;\n\t\t}\n\t\tconst initialGroupedItemsCount = this.groupedItems.length;\n\t\tlet wereItemsGrouped;\n\t\twhile (this._areItemsOverflowing) {\n\t\t\tthis._groupLastItem();\n\t\t\twereItemsGrouped = true;\n\t\t}\n\t\tif (!wereItemsGrouped && this.groupedItems.length) {\n\t\t\twhile (this.groupedItems.length && !this._areItemsOverflowing) this._ungroupFirstItem();\n\t\t\tif (this._areItemsOverflowing) this._groupLastItem();\n\t\t}\n\t\tif (this.groupedItems.length !== initialGroupedItemsCount) this.view.fire(\"groupedItemsUpdate\");\n\t}\n\t/**\n\t* Returns `true` when {@link module:ui/toolbar/toolbarview~ToolbarView#element} children visually overflow,\n\t* for instance if the toolbar is narrower than its members. Returns `false` otherwise.\n\t*/\n\tget _areItemsOverflowing() {\n\t\tif (!this.ungroupedItems.length) return false;\n\t\tconst element = this.viewElement;\n\t\tconst uiLanguageDirection = this.viewLocale.uiLanguageDirection;\n\t\tconst lastChildRect = new Rect(element.lastChild);\n\t\tconst toolbarRect = new Rect(element);\n\t\tif (!this.cachedPadding) {\n\t\t\tconst computedStyle = global.window.getComputedStyle(element);\n\t\t\tconst paddingProperty = uiLanguageDirection === \"ltr\" ? \"paddingRight\" : \"paddingLeft\";\n\t\t\tthis.cachedPadding = Number.parseInt(computedStyle[paddingProperty]);\n\t\t}\n\t\tif (uiLanguageDirection === \"ltr\") return lastChildRect.right > toolbarRect.right - this.cachedPadding;\n\t\telse return lastChildRect.left < toolbarRect.left + this.cachedPadding;\n\t}\n\t/**\n\t* Enables the functionality that prevents {@link #ungroupedItems} from overflowing (wrapping to the next row)\n\t* upon resize when there is little space available. Instead, the toolbar items are moved to the\n\t* {@link #groupedItems} collection and displayed in a dropdown at the end of the row (which has its own nested toolbar).\n\t*\n\t* When called, the toolbar will automatically analyze the location of its {@link #ungroupedItems} and \"group\"\n\t* them in the dropdown if necessary. It will also observe the browser window for size changes in\n\t* the future and respond to them by grouping more items or reverting already grouped back, depending\n\t* on the visual space available.\n\t*/\n\t_enableGroupingOnResize() {\n\t\tlet previousWidth;\n\t\tthis.resizeObserver = new ResizeObserver(this.viewElement, (entry) => {\n\t\t\tif (!previousWidth || previousWidth !== entry.contentRect.width || this.shouldUpdateGroupingOnNextResize) {\n\t\t\t\tthis.shouldUpdateGroupingOnNextResize = false;\n\t\t\t\tthis._updateGrouping();\n\t\t\t\tpreviousWidth = entry.contentRect.width;\n\t\t\t}\n\t\t});\n\t\tthis._updateGrouping();\n\t}\n\t/**\n\t* Enables the grouping functionality, just like {@link #_enableGroupingOnResize} but the difference is that\n\t* it listens to the changes of {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth} instead.\n\t*/\n\t_enableGroupingOnMaxWidthChange(view) {\n\t\tview.on(\"change:maxWidth\", () => {\n\t\t\tthis._updateGrouping();\n\t\t});\n\t}\n\t/**\n\t* When called, it will remove the last item from {@link #ungroupedItems} and move it back\n\t* to the {@link #groupedItems} collection.\n\t*\n\t* The opposite of {@link #_ungroupFirstItem}.\n\t*/\n\t_groupLastItem() {\n\t\tif (!this.groupedItems.length) {\n\t\t\tthis.viewChildren.add(new ToolbarSeparatorView());\n\t\t\tthis.viewChildren.add(this.groupedItemsDropdown);\n\t\t\tthis.viewFocusTracker.add(this.groupedItemsDropdown.element);\n\t\t}\n\t\tthis.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last), 0);\n\t}\n\t/**\n\t* Moves the very first item belonging to {@link #groupedItems} back\n\t* to the {@link #ungroupedItems} collection.\n\t*\n\t* The opposite of {@link #_groupLastItem}.\n\t*/\n\t_ungroupFirstItem() {\n\t\tthis.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first));\n\t\tif (!this.groupedItems.length) {\n\t\t\tthis.viewChildren.remove(this.groupedItemsDropdown);\n\t\t\tthis.viewChildren.remove(this.viewChildren.last);\n\t\t\tthis.viewFocusTracker.remove(this.groupedItemsDropdown.element);\n\t\t}\n\t}\n\t/**\n\t* Creates the {@link #groupedItemsDropdown} that hosts the members of the {@link #groupedItems}\n\t* collection when there is not enough space in the toolbar to display all items in a single row.\n\t*/\n\t_createGroupedItemsDropdown() {\n\t\tconst locale = this.viewLocale;\n\t\tconst t = locale.t;\n\t\tconst dropdown = createDropdown(locale);\n\t\tdropdown.class = \"ck-toolbar__grouped-dropdown\";\n\t\tdropdown.panelPosition = locale.uiLanguageDirection === \"ltr\" ? \"sw\" : \"se\";\n\t\taddToolbarToDropdown(dropdown, this.groupedItems);\n\t\tdropdown.buttonView.set({\n\t\t\tlabel: t(\"Show more items\"),\n\t\t\ttooltip: true,\n\t\t\ttooltipPosition: locale.uiLanguageDirection === \"rtl\" ? \"se\" : \"sw\",\n\t\t\ticon: IconThreeVerticalDots\n\t\t});\n\t\treturn dropdown;\n\t}\n\t/**\n\t* Updates the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables focus–cyclable items}\n\t* collection so it represents the up–to–date state of the UI from the perspective of the user.\n\t*\n\t* For instance, the {@link #groupedItemsDropdown} can show up and hide but when it is visible,\n\t* it must be subject to focus cycling in the toolbar.\n\t*\n\t* See the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables collection} documentation\n\t* to learn more about the purpose of this method.\n\t*/\n\t_updateFocusCyclableItems() {\n\t\tthis.viewFocusables.clear();\n\t\tthis.ungroupedItems.map((item) => {\n\t\t\tif (isFocusable(item)) this.viewFocusables.add(item);\n\t\t});\n\t\tif (this.groupedItems.length) this.viewFocusables.add(this.groupedItemsDropdown);\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 ui/dropdown/button/splitbuttonview\n*/\n/**\n* The split button view class.\n*\n* ```ts\n* const view = new SplitButtonView();\n*\n* view.set( {\n* \tlabel: 'A button',\n* \tkeystroke: 'Ctrl+B',\n* \ttooltip: true\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*\n* Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n*/\nvar SplitButtonView = class extends View {\n\t/**\n\t* Collection of the child views inside of the split button {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* A main button of split button.\n\t*/\n\tactionView;\n\t/**\n\t* A secondary button of split button that opens dropdown.\n\t*/\n\tarrowView;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the split button:\n\t*\n\t* * <kbd>▶</kbd> moves focus to arrow view when action view is focused,\n\t* * <kbd>◀</kbd> moves focus to action view when arrow view is focused.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Tracks information about DOM focus in the dropdown.\n\t*/\n\tfocusTracker;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, actionButton) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"labelStyle\", void 0);\n\t\tthis.set(\"icon\", void 0);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isOn\", false);\n\t\tthis.set(\"isToggleable\", false);\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.set(\"keystroke\", void 0);\n\t\tthis.set(\"withKeystroke\", false);\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"tabindex\", -1);\n\t\tthis.set(\"tooltip\", false);\n\t\tthis.set(\"tooltipPosition\", \"s\");\n\t\tthis.set(\"type\", \"button\");\n\t\tthis.set(\"withText\", false);\n\t\tthis.children = this.createCollection();\n\t\tthis.actionView = this._createActionView(actionButton);\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-splitbutton\",\n\t\t\t\tbind.to(\"class\"),\n\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value),\n\t\t\t\tthis.arrowView.bindTemplate.if(\"isOn\", \"ck-splitbutton_open\")\n\t\t\t] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.actionView);\n\t\tthis.children.add(this.arrowView);\n\t\tthis.focusTracker.add(this.actionView.element);\n\t\tthis.focusTracker.add(this.arrowView.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis.keystrokes.set(\"arrowright\", (evt, cancel) => {\n\t\t\tif (this.focusTracker.focusedElement === this.actionView.element) {\n\t\t\t\tthis.arrowView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\tthis.keystrokes.set(\"arrowleft\", (evt, cancel) => {\n\t\t\tif (this.focusTracker.focusedElement === this.arrowView.element) {\n\t\t\t\tthis.actionView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the {@link module:ui/button/buttonview~ButtonView#element} of the action part of split button.\n\t*/\n\tfocus() {\n\t\tthis.actionView.focus();\n\t}\n\t/**\n\t* Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #actionView} and binds it with main split button\n\t* attributes.\n\t*/\n\t_createActionView(actionButton) {\n\t\tconst actionView = actionButton || new ButtonView();\n\t\tif (!actionButton) actionView.bind(\"icon\", \"isEnabled\", \"isOn\", \"isToggleable\", \"keystroke\", \"label\", \"tabindex\", \"tooltip\", \"tooltipPosition\", \"type\", \"withText\").to(this);\n\t\tactionView.extendTemplate({ attributes: { class: \"ck-splitbutton__action\" } });\n\t\tactionView.delegate(\"execute\").to(this);\n\t\treturn actionView;\n\t}\n\t/**\n\t* Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #arrowView} and binds it with main split button\n\t* attributes.\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new ButtonView();\n\t\tconst bind = arrowView.bindTemplate;\n\t\tarrowView.icon = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-splitbutton__arrow\"],\n\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOn\"),\n\t\t\t\"aria-haspopup\": true,\n\t\t\t\"aria-expanded\": bind.to(\"isOn\", (value) => String(value))\n\t\t} });\n\t\tarrowView.bind(\"isEnabled\").to(this);\n\t\tarrowView.bind(\"label\").to(this);\n\t\tarrowView.bind(\"tooltip\").to(this);\n\t\tarrowView.delegate(\"execute\").to(this, \"open\");\n\t\treturn arrowView;\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 ui/dropdown/utils\n*/\n/**\n* A helper for creating dropdowns. It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown},\n* with a {@link module:ui/dropdown/button/dropdownbutton~DropdownButton button},\n* {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView panel} and all standard dropdown's behaviors.\n*\n* # Creating dropdowns\n*\n* By default, the default {@link module:ui/dropdown/button/dropdownbuttonview~DropdownButtonView} class is used as\n* definition of the button:\n*\n* ```ts\n* const dropdown = createDropdown( model );\n*\n* // Configure dropdown's button properties:\n* dropdown.buttonView.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.render();\n*\n* // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* You can also provide other button views (they need to implement the\n* {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface). For instance, you can use\n* {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} to create a dropdown with a split button.\n*\n* ```ts\n* const dropdown = createDropdown( locale, SplitButtonView );\n*\n* // Configure dropdown's button properties:\n* dropdown.buttonView.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.buttonView.on( 'execute', () => {\n* \t// Add the behavior of the \"action part\" of the split button.\n* \t// Split button consists of the \"action part\" and \"arrow part\".\n* \t// The arrow opens the dropdown while the action part can have some other behavior.\n* } );\n*\n* dropdown.render();\n*\n* // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* # Adding content to the dropdown's panel\n*\n* The content of the panel can be inserted directly into the `dropdown.panelView.element`:\n*\n* ```ts\n* dropdown.panelView.element.textContent = 'Content of the panel';\n* ```\n*\n* However, most of the time you will want to add there either a {@link module:ui/list/listview~ListView list of options}\n* or a list of buttons (i.e. a {@link module:ui/toolbar/toolbarview~ToolbarView toolbar}).\n* To simplify the task, you can use, respectively, {@link module:ui/dropdown/utils~addListToDropdown} or\n* {@link module:ui/dropdown/utils~addToolbarToDropdown} utils.\n*\n* @param locale The locale instance.\n* @param ButtonClassOrInstance The dropdown button view class. Needs to implement the\n* {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface.\n* @returns The dropdown view instance.\n*/\nfunction createDropdown(locale, ButtonClassOrInstance = DropdownButtonView) {\n\tconst buttonView = typeof ButtonClassOrInstance == \"function\" ? new ButtonClassOrInstance(locale) : ButtonClassOrInstance;\n\tconst panelView = new DropdownPanelView(locale);\n\tconst dropdownView = new DropdownView(locale, buttonView, panelView);\n\tbuttonView.bind(\"isEnabled\").to(dropdownView);\n\tif (buttonView instanceof SplitButtonView) buttonView.arrowView.bind(\"isOn\").to(dropdownView, \"isOpen\");\n\telse buttonView.bind(\"isOn\").to(dropdownView, \"isOpen\");\n\taddDefaultBehaviors(dropdownView);\n\treturn dropdownView;\n}\n/**\n* Adds a menu UI component to a dropdown and sets all common behaviors and interactions between the dropdown and the menu.\n*\n* Use this helper to create multi-level dropdown menus that are displayed in a toolbar.\n*\n* Internally, it creates an instance of {@link module:ui/dropdown/menu/dropdownmenurootlistview~DropdownMenuRootListView}.\n*\n* Example:\n*\n* ```ts\n* const definitions = [\n* \t{\n* \t\tid: 'menu_1',\n* \t\tmenu: 'Menu 1',\n* \t\tchildren: [\n* \t\t\t{\n* \t\t\t\tid: 'menu_1_a',\n* \t\t\t\tlabel: 'Item A'\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tid: 'menu_1_b',\n* \t\t\t\tlabel: 'Item B'\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tid: 'top_a',\n* \t\tlabel: 'Top Item A'\n* \t},\n* \t{\n* \t\tid: 'top_b',\n* \t\tlabel: 'Top Item B'\n* \t}\n* ];\n*\n* const dropdownView = createDropdown( editor.locale );\n*\n* addMenuToDropdown( dropdownView, editor.ui.view.body, definitions );\n* ```\n*\n* After using this helper, the `dropdown` will fire {@link module:ui/dropdown/dropdownview~DropdownViewEvent `execute`} event when\n* a nested menu button is pressed.\n*\n* The helper will make sure that the `dropdownMenuRootListView` is lazy loaded, i.e., the menu component structure will be initialized\n* and rendered only after the `dropdown` is opened for the first time.\n*\n* @param dropdownView A dropdown instance to which the menu component will be added.\n* @param body Body collection to which floating menu panels will be added.\n* @param definition The menu component definition.\n* @param options.ariaLabel Label used by assistive technologies to describe the top-level menu.\n*/\nfunction addMenuToDropdown(dropdownView, body, definition, options = {}) {\n\tdropdownView.menuView = new DropdownMenuRootListView(dropdownView.locale, body, definition);\n\tdropdownView.focusTracker.add(dropdownView.menuView);\n\tif (dropdownView.isOpen) addMenuToOpenDropdown(dropdownView, options);\n\telse dropdownView.once(\"change:isOpen\", () => {\n\t\taddMenuToOpenDropdown(dropdownView, options);\n\t}, { priority: \"highest\" });\n}\nfunction addMenuToOpenDropdown(dropdownView, options) {\n\tconst dropdownMenuRootListView = dropdownView.menuView;\n\tconst t = dropdownView.locale.t;\n\tdropdownMenuRootListView.delegate(\"menu:execute\").to(dropdownView, \"execute\");\n\tdropdownMenuRootListView.listenTo(dropdownView, \"change:isOpen\", (evt, name, isOpen) => {\n\t\tif (!isOpen) dropdownMenuRootListView.closeMenus();\n\t}, { priority: \"low\" });\n\tdropdownView.panelView.children.add(dropdownMenuRootListView);\n\tfor (const menu of dropdownMenuRootListView.menus) dropdownView.focusTracker.add(menu);\n\tdropdownMenuRootListView.ariaLabel = options.ariaLabel || t(\"Dropdown menu\");\n}\n/**\n* Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n*\n* ```ts\n* const buttonsCreator = () => {\n* \tconst buttons = [];\n*\n* \t// Either create a new ButtonView instance or create existing.\n* \tbuttons.push( new ButtonView() );\n* \tbuttons.push( editor.ui.componentFactory.create( 'someButton' ) );\n* };\n*\n* const dropdown = createDropdown( locale );\n*\n* addToolbarToDropdown( dropdown, buttonsCreator, { isVertical: true } );\n*\n* // Will render a vertical button dropdown labeled \"A button dropdown\"\n* // with a button group in the panel containing two buttons.\n* // Buttons inside the dropdown will be created on first dropdown panel open.\n* dropdown.render()\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* **Note:** To improve the accessibility, you can tell the dropdown to focus the first active button of the toolbar when the dropdown\n* {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}. See the documentation of `options` to learn more.\n*\n* **Note:** Toolbar view will be created on first open of the dropdown.\n*\n* See {@link module:ui/dropdown/utils~createDropdown} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n*\n* @param dropdownView A dropdown instance to which `ToolbarView` will be added.\n* @param options.enableActiveItemFocusOnDropdownOpen When set `true`, the focus will automatically move to the first\n* active {@link module:ui/toolbar/toolbarview~ToolbarView#items item} of the toolbar upon\n* {@link module:ui/dropdown/dropdownview~DropdownView#isOpen opening} the dropdown. Active items are those with the `isOn` property set\n* `true` (for instance {@link module:ui/button/buttonview~ButtonView buttons}). If no active items is found, the toolbar will be focused\n* as a whole resulting in the focus moving to its first focusable item (default behavior of\n* {@link module:ui/dropdown/dropdownview~DropdownView}).\n* @param options.ariaLabel Label used by assistive technologies to describe toolbar element.\n* @param options.maxWidth The maximum width of the toolbar element.\n* Details: {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth}.\n* @param options.class An additional CSS class added to the toolbar element.\n* @param options.isCompact When set true, makes the toolbar look compact with toolbar element.\n* @param options.isVertical Controls the orientation of toolbar items.\n*/\nfunction addToolbarToDropdown(dropdownView, buttonsOrCallback, options = {}) {\n\tdropdownView.extendTemplate({ attributes: { class: [\"ck-toolbar-dropdown\"] } });\n\tif (dropdownView.isOpen) addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options);\n\telse dropdownView.once(\"change:isOpen\", () => addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options), { priority: \"highest\" });\n\tif (options.enableActiveItemFocusOnDropdownOpen) focusChildOnDropdownOpen(dropdownView, () => dropdownView.toolbarView.items.find((item) => item.isOn));\n}\n/**\n* Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n*/\nfunction addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options) {\n\tconst locale = dropdownView.locale;\n\tconst t = locale.t;\n\tconst toolbarView = dropdownView.toolbarView = new ToolbarView(locale);\n\tconst buttons = typeof buttonsOrCallback == \"function\" ? buttonsOrCallback() : buttonsOrCallback;\n\ttoolbarView.ariaLabel = options.ariaLabel || t(\"Dropdown toolbar\");\n\tif (options.maxWidth) toolbarView.maxWidth = options.maxWidth;\n\tif (options.class) toolbarView.class = options.class;\n\tif (options.isCompact) toolbarView.isCompact = options.isCompact;\n\tif (options.isVertical) toolbarView.isVertical = true;\n\tif (buttons instanceof ViewCollection) toolbarView.items.bindTo(buttons).using((item) => item);\n\telse toolbarView.items.addMany(buttons);\n\tdropdownView.panelView.children.add(toolbarView);\n\tdropdownView.focusTracker.add(toolbarView);\n\ttoolbarView.items.delegate(\"execute\").to(dropdownView);\n}\n/**\n* Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n*\n* ```ts\n* const items = new Collection<ListDropdownItemDefinition>();\n*\n* items.add( {\n* \ttype: 'button',\n* \tmodel: new Model( {\n* \t\twithText: true,\n* \t\tlabel: 'First item',\n* \t\tlabelStyle: 'color: red'\n* \t} )\n* } );\n*\n* items.add( {\n* \t type: 'button',\n* \t model: new Model( {\n* \t\twithText: true,\n* \t\tlabel: 'Second item',\n* \t\tlabelStyle: 'color: green',\n* \t\tclass: 'foo'\n* \t} )\n* } );\n*\n* const dropdown = createDropdown( locale );\n*\n* addListToDropdown( dropdown, items );\n*\n* // Will render a dropdown with a list in the panel containing two items.\n* dropdown.render()\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* The `items` collection passed to this methods controls the presence and attributes of respective\n* {@link module:ui/list/listitemview~ListItemView list items}.\n*\n* **Note:** To improve the accessibility, when a list is added to the dropdown using this helper the dropdown will automatically attempt\n* to focus the first active item (a host to a {@link module:ui/button/buttonview~ButtonView} with\n* {@link module:ui/button/buttonview~ButtonView#isOn} set `true`) or the very first item when none are active.\n*\n* **Note:** List view will be created on first open of the dropdown.\n*\n* See {@link module:ui/dropdown/utils~createDropdown} and {@link module:list/list~List}.\n*\n* @param dropdownView A dropdown instance to which `ListVIew` will be added.\n* @param itemsOrCallback A collection of the list item definitions or a callback returning a list item definitions to populate the list.\n* @param options.ariaLabel Label used by assistive technologies to describe list element.\n* @param options.role Will be reflected by the `role` DOM attribute in `ListVIew` and used by assistive technologies.\n*/\nfunction addListToDropdown(dropdownView, itemsOrCallback, options = {}) {\n\tif (dropdownView.isOpen) addListToOpenDropdown(dropdownView, itemsOrCallback, options);\n\telse dropdownView.once(\"change:isOpen\", () => addListToOpenDropdown(dropdownView, itemsOrCallback, options), { priority: \"highest\" });\n\tfocusChildOnDropdownOpen(dropdownView, () => dropdownView.listView.items.find((item) => {\n\t\tif (item instanceof ListItemView) return item.children.first.isOn;\n\t\treturn false;\n\t}));\n}\n/**\n* Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n*/\nfunction addListToOpenDropdown(dropdownView, itemsOrCallback, options) {\n\tconst locale = dropdownView.locale;\n\tconst listView = dropdownView.listView = new ListView(locale);\n\tconst items = typeof itemsOrCallback == \"function\" ? itemsOrCallback() : itemsOrCallback;\n\tlistView.ariaLabel = options.ariaLabel;\n\tlistView.role = options.role;\n\tbindViewCollectionItemsToDefinitions(dropdownView, listView.items, items, locale);\n\tdropdownView.panelView.children.add(listView);\n\tlistView.items.delegate(\"execute\").to(dropdownView);\n}\n/**\n* A helper to be used on an existing {@link module:ui/dropdown/dropdownview~DropdownView} that focuses\n* a specific child in DOM when the dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}.\n*\n* @param dropdownView A dropdown instance to which the focus behavior will be added.\n* @param childSelectorCallback A callback executed when the dropdown gets open. It should return a {@link module:ui/view~View}\n* instance (child of {@link module:ui/dropdown/dropdownview~DropdownView#panelView}) that will get focused or a falsy value.\n* If falsy value is returned, a default behavior of the dropdown will engage focusing the first focusable child in\n* the {@link module:ui/dropdown/dropdownview~DropdownView#panelView}.\n*/\nfunction focusChildOnDropdownOpen(dropdownView, childSelectorCallback) {\n\tdropdownView.on(\"change:isOpen\", () => {\n\t\tif (!dropdownView.isOpen) return;\n\t\tconst childToFocus = childSelectorCallback();\n\t\tif (!childToFocus) return;\n\t\tif (typeof childToFocus.focus === \"function\") childToFocus.focus();\n\t\telse\n /**\n\t\t* The child view of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} is missing the `focus()` method\n\t\t* and could not be focused when the dropdown got {@link module:ui/dropdown/dropdownview~DropdownView#isOpen open}.\n\t\t*\n\t\t* Making the content of a dropdown focusable in this case greatly improves the accessibility. Please make the view instance\n\t\t* implements the {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface} for the best user\n\t\t* experience.\n\t\t*\n\t\t* @error ui-dropdown-focus-child-on-open-child-missing-focus\n\t\t* @param {module:ui/view~View} view Child to focus.\n\t\t*/\n\t\tlogWarning(\"ui-dropdown-focus-child-on-open-child-missing-focus\", { view: childToFocus });\n\t}, { priority: priorities.low - 10 });\n}\n/**\n* Add a set of default behaviors to dropdown view.\n*/\nfunction addDefaultBehaviors(dropdownView) {\n\tcloseDropdownOnClickOutside(dropdownView);\n\tcloseDropdownOnExecute(dropdownView);\n\tcloseDropdownOnBlur(dropdownView);\n\tfocusDropdownContentsOnArrows(dropdownView);\n\tfocusDropdownButtonOnClose(dropdownView);\n\tfocusDropdownPanelOnOpen(dropdownView);\n}\n/**\n* Adds a behavior to a dropdownView that closes opened dropdown when user clicks outside the dropdown.\n*/\nfunction closeDropdownOnClickOutside(dropdownView) {\n\tclickOutsideHandler({\n\t\temitter: dropdownView,\n\t\tactivator: () => dropdownView.isRendered && dropdownView.isOpen,\n\t\tcallback: () => {\n\t\t\tdropdownView.isOpen = false;\n\t\t},\n\t\tcontextElements: () => [dropdownView.element, ...getFocusTrackerTreeElements(dropdownView.focusTracker).filter((element) => !dropdownView.element.contains(element))]\n\t});\n}\n/**\n* Returns all DOM elements connected to a DropdownView's focus tracker, either directly (same DOM sub-tree)\n* or indirectly (external views registered in the focus tracker).\n*/\nfunction getFocusTrackerTreeElements(focusTracker) {\n\treturn [...focusTracker.elements, ...focusTracker.externalViews.flatMap((view) => getFocusTrackerTreeElements(view.focusTracker))];\n}\n/**\n* Adds a behavior to a dropdownView that closes the dropdown view on \"execute\" event.\n*/\nfunction closeDropdownOnExecute(dropdownView) {\n\tdropdownView.on(\"execute\", (evt) => {\n\t\tif (evt.source instanceof SwitchButtonView) return;\n\t\tdropdownView.isOpen = false;\n\t});\n}\n/**\n* Adds a behavior to a dropdown view that closes opened dropdown when it loses focus.\n*/\nfunction closeDropdownOnBlur(dropdownView) {\n\tdropdownView.focusTracker.on(\"change:isFocused\", (evt, name, isFocused) => {\n\t\tif (isFocused || !dropdownView.isOpen) return;\n\t\tdropdownView.isOpen = false;\n\t});\n}\n/**\n* Adds a behavior to a dropdownView that focuses the dropdown's panel view contents on keystrokes.\n*/\nfunction focusDropdownContentsOnArrows(dropdownView) {\n\tdropdownView.keystrokes.set(\"arrowdown\", (data, cancel) => {\n\t\tif (dropdownView.isOpen) {\n\t\t\tdropdownView.panelView.focus();\n\t\t\tcancel();\n\t\t}\n\t});\n\tdropdownView.keystrokes.set(\"arrowup\", (data, cancel) => {\n\t\tif (dropdownView.isOpen) {\n\t\t\tdropdownView.panelView.focusLast();\n\t\t\tcancel();\n\t\t}\n\t});\n}\n/**\n* Adds a behavior that focuses the #buttonView when the dropdown was closed but focus was within the #panelView element.\n* This makes sure the focus is never lost.\n*/\nfunction focusDropdownButtonOnClose(dropdownView) {\n\tdropdownView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\tif (isOpen) return;\n\t\tif (dropdownView.focusTracker.elements.some((element) => element.contains(global.document.activeElement))) dropdownView.buttonView.focus();\n\t});\n}\n/**\n* Adds a behavior that focuses the #panelView when dropdown gets open (accessibility).\n*/\nfunction focusDropdownPanelOnOpen(dropdownView) {\n\tdropdownView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\tif (!isOpen) return;\n\t\tdropdownView.panelView.focus();\n\t}, { priority: \"low\" });\n}\n/**\n* This helper populates a dropdown list with items and groups according to the\n* collection of item definitions. A permanent binding is created in this process allowing\n* dynamic management of the dropdown list content.\n*\n* @param dropdownView\n* @param listItems\n* @param definitions\n* @param locale\n*/\nfunction bindViewCollectionItemsToDefinitions(dropdownView, listItems, definitions, locale) {\n\tbindDropdownToggleableButtonsAlignment(listItems);\n\tlistItems.bindTo(definitions).using((def) => {\n\t\tif (def.type === \"separator\") return new ListSeparatorView(locale);\n\t\telse if (def.type === \"group\") {\n\t\t\tconst groupView = new ListItemGroupView(locale);\n\t\t\tgroupView.set({ label: def.label });\n\t\t\tbindViewCollectionItemsToDefinitions(dropdownView, groupView.items, def.items, locale);\n\t\t\tgroupView.items.delegate(\"execute\").to(dropdownView);\n\t\t\treturn groupView;\n\t\t} else if (def.type === \"button\" || def.type === \"switchbutton\") {\n\t\t\tconst isToggleable = def.model.role === \"menuitemcheckbox\" || def.model.role === \"menuitemradio\";\n\t\t\tconst listItemView = new ListItemView(locale);\n\t\t\tlet buttonView;\n\t\t\tif (def.type === \"button\") {\n\t\t\t\tbuttonView = new ListItemButtonView(locale, def.labelView);\n\t\t\t\tbuttonView.set({ isToggleable });\n\t\t\t} else buttonView = new SwitchButtonView(locale);\n\t\t\tbuttonView.bind(...Object.keys(def.model)).to(def.model);\n\t\t\tbuttonView.delegate(\"execute\").to(listItemView);\n\t\t\tlistItemView.children.add(buttonView);\n\t\t\treturn listItemView;\n\t\t}\n\t\treturn null;\n\t});\n}\n/**\n* Sets up alignment handling for toggleable buttons in a dropdown list.\n*\n* Buttons in dropdowns have reserved space for a check icon when they are toggleable.\n* When at least one button in the list is toggleable, all other buttons (even non-toggleable ones)\n* will have space on their left side to align with toggleable buttons.\n*\n* This function handles a special case where a new toggleable button is added (or removed) to a list\n* where previous buttons weren't toggleable. In that case, those previous buttons will\n* automatically allocate space to align with the new toggleable button.\n*\n* Example:\n* ```\n* Before adding toggleable button:\n* +----------------+\n* | Normal Button  |\n* +----------------+\n* | Another Button |\n* +----------------+\n*\n* After adding toggleable button:\n* +-------------------+\n* |    Normal Button  |\n* +-------------------+\n* |    Another Button |\n* +-------------------+\n* | ✓ Toggle Button   |\n* +-------------------+\n* ```\n*\n* @param listItems Collection of list items to observe for toggleable buttons.\n*/\nfunction bindDropdownToggleableButtonsAlignment(listItems) {\n\tlet toggleableButtonsCount = 0;\n\tconst pickListItemButtonIfPresent = (item) => {\n\t\tif (!(item instanceof ListItemView) || !(item.children.first instanceof ListItemButtonView)) return null;\n\t\treturn item.children.first;\n\t};\n\tconst pickListItemToggleableButtonIfPresent = (item) => {\n\t\tconst listItemButtonView = pickListItemButtonIfPresent(item);\n\t\tif (!listItemButtonView || !listItemButtonView.isToggleable) return null;\n\t\treturn listItemButtonView;\n\t};\n\tconst updateAllButtonsCheckSpace = (hasSpace) => {\n\t\tfor (const listItem of listItems) {\n\t\t\tconst listItemButton = pickListItemButtonIfPresent(listItem);\n\t\t\tif (listItemButton) listItemButton.hasCheckSpace = hasSpace;\n\t\t}\n\t};\n\tlistItems.on(\"change\", (evt, data) => {\n\t\tconst prevToggleable = toggleableButtonsCount > 0;\n\t\tfor (const item of data.removed) if (pickListItemToggleableButtonIfPresent(item)) toggleableButtonsCount--;\n\t\tfor (const item of data.added) {\n\t\t\tconst button = pickListItemButtonIfPresent(item);\n\t\t\tif (!button) continue;\n\t\t\tif (button.isToggleable) toggleableButtonsCount++;\n\t\t\tbutton.hasCheckSpace = toggleableButtonsCount > 0;\n\t\t}\n\t\tconst currentToggleable = toggleableButtonsCount > 0;\n\t\tif (prevToggleable !== currentToggleable) updateAllButtonsCheckSpace(currentToggleable);\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 ui/labeledfield/utils\n*/\n/**\n* A helper for creating labeled inputs.\n*\n* It creates an instance of a {@link module:ui/inputtext/inputtextview~InputTextView input text} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n*\n* The helper does the following:\n*\n* * It sets input's `id` and `ariaDescribedById` attributes.\n* * It binds input's `isReadOnly` to the labeled view.\n* * It binds input's `hasError` to the labeled view.\n* * It enables a logic that cleans up the error when user starts typing in the input.\n*\n* Usage:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, createLabeledInputText );\n* console.log( labeledInputView.fieldView ); // A text input instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n* @returns The input text view instance.\n*/\nconst createLabeledInputText = (labeledFieldView, viewUid, statusUid) => {\n\tconst inputView = new InputTextView(labeledFieldView.locale);\n\tinputView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t});\n\tinputView.bind(\"isReadOnly\").to(labeledFieldView, \"isEnabled\", (value) => !value);\n\tinputView.bind(\"hasError\").to(labeledFieldView, \"errorText\", (value) => !!value);\n\tinputView.on(\"input\", () => {\n\t\tlabeledFieldView.errorText = null;\n\t});\n\tlabeledFieldView.bind(\"isEmpty\", \"isFocused\", \"placeholder\").to(inputView);\n\treturn inputView;\n};\n/**\n* A helper for creating labeled number inputs.\n*\n* It creates an instance of a {@link module:ui/inputnumber/inputnumberview~InputNumberView input number} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n*\n* The helper does the following:\n*\n* * It sets input's `id` and `ariaDescribedById` attributes.\n* * It binds input's `isReadOnly` to the labeled view.\n* * It binds input's `hasError` to the labeled view.\n* * It enables a logic that cleans up the error when user starts typing in the input.\n*\n* Usage:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, createLabeledInputNumber );\n* console.log( labeledInputView.fieldView ); // A number input instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n* @returns The input number view instance.\n*/\nconst createLabeledInputNumber = (labeledFieldView, viewUid, statusUid) => {\n\tconst inputView = new InputNumberView(labeledFieldView.locale);\n\tinputView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid,\n\t\tinputMode: \"numeric\"\n\t});\n\tinputView.bind(\"isReadOnly\").to(labeledFieldView, \"isEnabled\", (value) => !value);\n\tinputView.bind(\"hasError\").to(labeledFieldView, \"errorText\", (value) => !!value);\n\tinputView.on(\"input\", () => {\n\t\tlabeledFieldView.errorText = null;\n\t});\n\tlabeledFieldView.bind(\"isEmpty\", \"isFocused\", \"placeholder\").to(inputView);\n\treturn inputView;\n};\n/**\n* A helper for creating labeled textarea.\n*\n* It creates an instance of a {@link module:ui/textarea/textareaview~TextareaView textarea} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n*\n* The helper does the following:\n*\n* * It sets textarea's `id` and `ariaDescribedById` attributes.\n* * It binds textarea's `isReadOnly` to the labeled view.\n* * It binds textarea's `hasError` to the labeled view.\n* * It enables a logic that cleans up the error when user starts typing in the textarea.\n*\n* Usage:\n*\n* ```ts\n* const labeledTextarea = new LabeledFieldView( locale, createLabeledTextarea );\n* console.log( labeledTextarea.fieldView ); // A textarea instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the textarea.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the textarea.\n* @returns The textarea view instance.\n*/\nconst createLabeledTextarea = (labeledFieldView, viewUid, statusUid) => {\n\tconst textareaView = new TextareaView(labeledFieldView.locale);\n\ttextareaView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t});\n\ttextareaView.bind(\"isReadOnly\").to(labeledFieldView, \"isEnabled\", (value) => !value);\n\ttextareaView.bind(\"hasError\").to(labeledFieldView, \"errorText\", (value) => !!value);\n\ttextareaView.on(\"input\", () => {\n\t\tlabeledFieldView.errorText = null;\n\t});\n\tlabeledFieldView.bind(\"isEmpty\", \"isFocused\", \"placeholder\").to(textareaView);\n\treturn textareaView;\n};\n/**\n* A helper for creating labeled dropdowns.\n*\n* It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled field view}.\n*\n* The helper does the following:\n*\n* * It sets dropdown's `id` and `ariaDescribedById` attributes.\n* * It binds input's `isEnabled` to the labeled view.\n*\n* Usage:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, createLabeledDropdown );\n* console.log( labeledInputView.fieldView ); // A dropdown instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view label} and the dropdown.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view status} and the dropdown.\n* @returns The dropdown view instance.\n*/\nconst createLabeledDropdown = (labeledFieldView, viewUid, statusUid) => {\n\tconst dropdownView = createDropdown(labeledFieldView.locale);\n\tdropdownView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t});\n\tdropdownView.bind(\"isEnabled\").to(labeledFieldView);\n\treturn dropdownView;\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 ui/colorpicker/colorpickerview\n*/\nconst waitingTime = 150;\n/**\n* A class which represents a color picker with an input field for defining custom colors.\n*/\nvar ColorPickerView = class extends View {\n\t/**\n\t* Container for a `#` sign prefix and an input for displaying and defining custom colors\n\t* in HEX format.\n\t*/\n\thexInputRow;\n\t/**\n\t* Debounced function updating the `color` property in the component\n\t* and firing the `ColorPickerColorSelectedEvent`. Executed whenever color in component\n\t* is changed by the user interaction (through the palette or input).\n\t*\n\t* @private\n\t*/\n\t_debounceColorPickerEvent;\n\t/**\n\t* A reference to the configuration of the color picker specified in the constructor.\n\t*\n\t* @private\n\t*/\n\t_config;\n\t/**\n\t* Creates a view of color picker.\n\t*\n\t* @param locale\n\t* @param config\n\t*/\n\tconstructor(locale, config = {}) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\tcolor: \"\",\n\t\t\t_hexColor: \"\"\n\t\t});\n\t\tthis.hexInputRow = this._createInputRow();\n\t\tconst children = this.createCollection();\n\t\tif (!config.hideInput) children.add(this.hexInputRow);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-color-picker\"],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tthis._config = config;\n\t\tthis._debounceColorPickerEvent = debounce((color) => {\n\t\t\tthis.set(\"color\", color);\n\t\t\tthis.fire(\"colorSelected\", { color: this.color });\n\t\t}, waitingTime, { leading: true });\n\t\tthis.on(\"set:color\", (evt, propertyName, newValue) => {\n\t\t\tevt.return = convertColor(newValue, this._config.format || \"hsl\");\n\t\t});\n\t\tthis.on(\"change:color\", () => {\n\t\t\tthis._hexColor = convertColorToCommonHexFormat(this.color);\n\t\t});\n\t\tthis.on(\"change:_hexColor\", () => {\n\t\t\tif (document.activeElement !== this.picker) this.picker.setAttribute(\"color\", this._hexColor);\n\t\t\tif (convertColorToCommonHexFormat(this.color) != convertColorToCommonHexFormat(this._hexColor)) this.color = this._hexColor;\n\t\t});\n\t}\n\t/**\n\t* Renders color picker in the view.\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tregisterCustomElement(\"hex-color-picker\", HexBase);\n\t\tthis.picker = global.document.createElement(\"hex-color-picker\");\n\t\tthis.picker.setAttribute(\"class\", \"hex-color-picker\");\n\t\tthis.picker.setAttribute(\"tabindex\", \"-1\");\n\t\tthis._createSlidersView();\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (this.element) {\n\t\t\tif (this.hexInputRow.element) this.element.insertBefore(this.picker, this.hexInputRow.element);\n\t\t\telse this.element.appendChild(this.picker);\n\t\t\tconst styleSheetForFocusedColorPicker = document.createElement(\"style\");\n\t\t\tstyleSheetForFocusedColorPicker.textContent = \"[role=\\\"slider\\\"]:focus [part$=\\\"pointer\\\"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}\";\n\t\t\tthis.picker.shadowRoot.appendChild(styleSheetForFocusedColorPicker);\n\t\t}\n\t\tthis.picker.addEventListener(\"color-changed\", (event) => {\n\t\t\tconst color = event.detail.value;\n\t\t\tthis._debounceColorPickerEvent(color);\n\t\t});\n\t}\n\t/**\n\t* Focuses the first pointer in color picker.\n\t*\n\t*/\n\tfocus() {\n\t\t/* v8 ignore next -- @preserve */\n\t\tif (!this._config.hideInput && (env.isGecko || env.isiOS || env.isSafari || env.isBlink)) this.hexInputRow.children.get(1).focus();\n\t\tthis.slidersView.first.focus();\n\t}\n\t/**\n\t* Creates collection of sliders in color picker.\n\t*\n\t* @private\n\t*/\n\t_createSlidersView() {\n\t\tconst slidersView = [...this.picker.shadowRoot.children].filter((item) => item.getAttribute(\"role\") === \"slider\").map((slider) => {\n\t\t\treturn new SliderView(slider);\n\t\t});\n\t\tthis.slidersView = this.createCollection();\n\t\tslidersView.forEach((item) => {\n\t\t\tthis.slidersView.add(item);\n\t\t});\n\t}\n\t/**\n\t* Creates input row for defining custom colors in color picker.\n\t*\n\t* @private\n\t*/\n\t_createInputRow() {\n\t\tconst colorInput = this._createColorInput();\n\t\treturn new ColorPickerInputRowView(this.locale, colorInput);\n\t}\n\t/**\n\t* Creates the input where user can type or paste the color in hex format.\n\t*\n\t* @private\n\t*/\n\t_createColorInput() {\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n\t\tconst { t } = this.locale;\n\t\tlabeledInput.set({\n\t\t\tlabel: t(\"HEX\"),\n\t\t\tclass: \"color-picker-hex-input\"\n\t\t});\n\t\tlabeledInput.fieldView.bind(\"value\").to(this, \"_hexColor\", (pickerColor) => {\n\t\t\tif (labeledInput.isFocused) return labeledInput.fieldView.value;\n\t\t\telse return pickerColor.startsWith(\"#\") ? pickerColor.substring(1) : pickerColor;\n\t\t});\n\t\tlabeledInput.fieldView.on(\"input\", () => {\n\t\t\tconst inputValue = labeledInput.fieldView.element.value;\n\t\t\tif (inputValue) {\n\t\t\t\tconst maybeHexColor = tryParseHexColor(inputValue);\n\t\t\t\tif (maybeHexColor) this._debounceColorPickerEvent(maybeHexColor);\n\t\t\t}\n\t\t});\n\t\treturn labeledInput;\n\t}\n\t/**\n\t* Validates the view and returns `false` when some fields are invalid.\n\t*/\n\tisValid() {\n\t\tconst { t } = this.locale;\n\t\tif (this._config.hideInput) return true;\n\t\tthis.resetValidationStatus();\n\t\tif (!this.hexInputRow.getParsedColor()) {\n\t\t\tthis.hexInputRow.inputView.errorText = t(\"Please enter a valid color (e.g. \\\"ff0000\\\").\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Cleans up the supplementary error and information text of input inside the {@link #hexInputRow}\n\t* bringing them back to the state when the form has been displayed for the first time.\n\t*\n\t* See {@link #isValid}.\n\t*/\n\tresetValidationStatus() {\n\t\tthis.hexInputRow.inputView.errorText = null;\n\t}\n};\nfunction convertColorToCommonHexFormat(inputColor) {\n\tlet ret = convertToHex(inputColor);\n\tif (!ret) ret = \"#000\";\n\tif (ret.length === 4) ret = \"#\" + [\n\t\tret[1],\n\t\tret[1],\n\t\tret[2],\n\t\tret[2],\n\t\tret[3],\n\t\tret[3]\n\t].join(\"\");\n\treturn ret.toLowerCase();\n}\nvar SliderView = class extends View {\n\t/**\n\t* @param element HTML element of slider in color picker.\n\t*/\n\tconstructor(element) {\n\t\tsuper();\n\t\tthis.element = element;\n\t}\n\t/**\n\t* Focuses element.\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n};\nvar HashView = class extends View {\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-picker__hash-view\"] },\n\t\t\tchildren: \"#\"\n\t\t});\n\t}\n};\nvar ColorPickerInputRowView = class extends View {\n\t/**\n\t* A collection of row items (buttons, dropdowns, etc.).\n\t*/\n\tchildren;\n\t/**\n\t* Hex input view element.\n\t*/\n\tinputView;\n\t/**\n\t* Creates an instance of the form row class.\n\t*\n\t* @param locale The locale instance.\n\t* @param inputView Hex color input element.\n\t*/\n\tconstructor(locale, inputView) {\n\t\tsuper(locale);\n\t\tthis.inputView = inputView;\n\t\tthis.children = this.createCollection([new HashView(), this.inputView]);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-picker__row\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Returns false if color input value is not in hex format.\n\t*/\n\tgetParsedColor() {\n\t\treturn tryParseHexColor(this.inputView.fieldView.element.value);\n\t}\n};\n/**\n* Trim spaces from provided color and check if hex is valid.\n*\n* @param color Unsafe color string.\n* @returns Null if provided color is not hex value.\n* @export\n* @internal\n*/\nfunction tryParseHexColor(color) {\n\tif (!color) return null;\n\tconst hashLessColor = color.trim().replace(/^#/, \"\");\n\tif (![\n\t\t3,\n\t\t4,\n\t\t6,\n\t\t8\n\t].includes(hashLessColor.length)) return null;\n\tif (!/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(hashLessColor)) return null;\n\treturn `#${hashLessColor}`;\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 DocumentColorCollectionBase = /* #__PURE__ */ ObservableMixin(Collection);\n/**\n* A collection to store document colors. It enforces colors to be unique.\n*/\nvar DocumentColorCollection = class extends DocumentColorCollectionBase {\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.set(\"isEmpty\", true);\n\t\tthis.on(\"change\", () => {\n\t\t\tthis.set(\"isEmpty\", this.length === 0);\n\t\t});\n\t}\n\t/**\n\t* Adds a color to the document color collection.\n\t*\n\t* This method ensures that no color duplicates are inserted (compared using\n\t* the color value of the {@link module:ui/colorgrid/colorgridview~ColorDefinition}).\n\t*\n\t* If the item does not have an ID, it will be automatically generated and set on the item.\n\t*\n\t* @param index The position of the item in the collection. The item is pushed to the collection when `index` is not specified.\n\t* @fires add\n\t* @fires change\n\t*/\n\tadd(item, index) {\n\t\tif (this.find((element) => element.color === item.color)) return this;\n\t\treturn super.add(item, index);\n\t}\n\t/**\n\t* Checks if an object with given colors is present in the document color collection.\n\t*/\n\thasColor(color) {\n\t\treturn !!this.find((item) => item.color === color);\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 ui/colorselector/colorgridsfragmentview\n*/\n/**\n* One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n*\n* It provides a UI that allows users to select colors from the a predefined set and from existing document colors.\n*\n* It consists of the following sub–components:\n*\n* * A \"Remove color\" button,\n* * A static {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors defined in the configuration,\n* * A dynamic {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors used in the document.\n* * If color picker is configured, the \"Color Picker\" button is visible too.\n*/\nvar ColorGridsFragmentView = class extends View {\n\t/**\n\t* A collection of the children of the table.\n\t*/\n\titems;\n\t/**\n\t* An array with objects representing colors to be displayed in the grid.\n\t*/\n\tcolorDefinitions;\n\t/**\n\t* Tracks information about the DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* The number of columns in the color grid.\n\t*/\n\tcolumns;\n\t/**\n\t* Preserves the reference to {@link module:ui/colorselector/documentcolorcollection~DocumentColorCollection} used to collect\n\t* definitions that store the document colors.\n\t*\n\t* @readonly\n\t*/\n\tdocumentColors;\n\t/**\n\t* The maximum number of colors in the document colors section.\n\t* If it equals 0, the document colors section is not added.\n\t*\n\t* @readonly\n\t*/\n\tdocumentColorsCount;\n\t/**\n\t* Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t* the default (static) color set.\n\t*\n\t* The property is loaded once the the parent dropdown is opened the first time.\n\t*\n\t* @readonly\n\t*/\n\tstaticColorsGrid;\n\t/**\n\t* Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t* the document colors. It remains undefined if the document colors feature is disabled.\n\t*\n\t* The property is loaded once the the parent dropdown is opened the first time.\n\t*\n\t* @readonly\n\t*/\n\tdocumentColorsGrid;\n\t/**\n\t* The \"Color picker\" button view.\n\t*/\n\tcolorPickerButtonView;\n\t/**\n\t* The \"Remove color\" button view.\n\t*/\n\tremoveColorButtonView;\n\t/**\n\t* A collection of views that can be focused in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusables;\n\t/**\n\t* Document color section's label.\n\t*\n\t* @readonly\n\t*/\n\t_documentColorsLabel;\n\t/**\n\t* The label of the button responsible for removing color attributes.\n\t*/\n\t_removeButtonLabel;\n\t/**\n\t* The label of the button responsible for switching to the color picker component.\n\t*/\n\t_colorPickerLabel;\n\t/**\n\t* Creates an instance of the view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Constructor options.\n\t* @param options.colors An array with definitions of colors to be displayed in the table.\n\t* @param options.columns The number of columns in the color grid.\n\t* @param options.removeButtonLabel The label of the button responsible for removing the color.\n\t* @param options.colorPickerLabel The label of the button responsible for color picker appearing.\n\t* @param options.documentColorsLabel The label for the section with the document colors.\n\t* @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t* @param options.focusTracker Tracks information about the DOM focus in the list.\n\t* @param options.focusables A collection of views that can be focused in the view.\n\t*/\n\tconstructor(locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, focusTracker, focusables }) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.items = this.createCollection();\n\t\tthis.colorDefinitions = colors;\n\t\tthis.columns = columns;\n\t\tthis.documentColors = new DocumentColorCollection();\n\t\tthis.documentColorsCount = documentColorsCount;\n\t\tthis._focusables = focusables;\n\t\tthis._removeButtonLabel = removeButtonLabel;\n\t\tthis._colorPickerLabel = colorPickerLabel;\n\t\tthis._documentColorsLabel = documentColorsLabel;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck-color-grids-fragment\", bind.if(\"isVisible\", \"ck-hidden\", (value) => !value)] },\n\t\t\tchildren: this.items\n\t\t});\n\t\tthis.removeColorButtonView = this._createRemoveColorButton();\n\t\tthis.items.add(this.removeColorButtonView);\n\t}\n\t/**\n\t* Scans through the editor model and searches for text node attributes with the given attribute name.\n\t* Found entries are set as document colors.\n\t*\n\t* All the previously stored document colors will be lost in the process.\n\t*\n\t* @param model The model used as a source to obtain the document colors.\n\t* @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t*/\n\tupdateDocumentColors(model, attributeName) {\n\t\tconst document = model.document;\n\t\tconst maxCount = this.documentColorsCount;\n\t\tthis.documentColors.clear();\n\t\tfor (const root of document.getRoots()) {\n\t\t\tconst range = model.createRangeIn(root);\n\t\t\tfor (const node of range.getItems()) if (node.is(\"$textProxy\") && node.hasAttribute(attributeName)) {\n\t\t\t\tthis._addColorToDocumentColors(node.getAttribute(attributeName));\n\t\t\t\tif (this.documentColors.length >= maxCount) return;\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Refreshes the state of the selected color in one or both {@link module:ui/colorgrid/colorgridview~ColorGridView}s\n\t* available in the {@link module:ui/colorselector/colorselectorview~ColorSelectorView}. It guarantees that the selection will\n\t* occur only in one of them.\n\t*/\n\tupdateSelectedColors() {\n\t\tconst documentColorsGrid = this.documentColorsGrid;\n\t\tconst staticColorsGrid = this.staticColorsGrid;\n\t\tconst selectedColor = this.selectedColor;\n\t\tstaticColorsGrid.selectedColor = selectedColor;\n\t\tif (documentColorsGrid) documentColorsGrid.selectedColor = selectedColor;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.staticColorsGrid = this._createStaticColorsGrid();\n\t\tthis.items.add(this.staticColorsGrid);\n\t\tif (this.documentColorsCount) {\n\t\t\tconst bind = Template.bind(this.documentColors, this.documentColors);\n\t\t\tconst label = new View(this.locale);\n\t\t\tlabel.setTemplate({\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-color-grid__label\",\n\t\t\t\t\tbind.if(\"isEmpty\", \"ck-hidden\")\n\t\t\t\t] },\n\t\t\t\tchildren: [{ text: this._documentColorsLabel }]\n\t\t\t});\n\t\t\tthis.items.add(label);\n\t\t\tthis.documentColorsGrid = this._createDocumentColorsGrid();\n\t\t\tthis.items.add(this.documentColorsGrid);\n\t\t}\n\t\tthis._createColorPickerButton();\n\t\tthis._addColorSelectorElementsToFocusTracker();\n\t}\n\t/**\n\t* Focuses the component.\n\t*/\n\tfocus() {\n\t\tthis.removeColorButtonView.focus();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Handles displaying the color picker button (if it was previously created) and making it focusable.\n\t*/\n\taddColorPickerButton() {\n\t\tif (this.colorPickerButtonView) {\n\t\t\tthis.items.add(this.colorPickerButtonView);\n\t\t\tthis.focusTracker.add(this.colorPickerButtonView.element);\n\t\t\tthis._focusables.add(this.colorPickerButtonView);\n\t\t}\n\t}\n\t/**\n\t* Adds color selector elements to focus tracker.\n\t*/\n\t_addColorSelectorElementsToFocusTracker() {\n\t\tthis.focusTracker.add(this.removeColorButtonView.element);\n\t\tthis._focusables.add(this.removeColorButtonView);\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (this.staticColorsGrid) {\n\t\t\tthis.focusTracker.add(this.staticColorsGrid.element);\n\t\t\tthis._focusables.add(this.staticColorsGrid);\n\t\t}\n\t\tif (this.documentColorsGrid) {\n\t\t\tthis.focusTracker.add(this.documentColorsGrid.element);\n\t\t\tthis._focusables.add(this.documentColorsGrid);\n\t\t}\n\t}\n\t/**\n\t* Creates the button responsible for displaying the color picker component.\n\t*/\n\t_createColorPickerButton() {\n\t\tthis.colorPickerButtonView = new ButtonView();\n\t\tthis.colorPickerButtonView.set({\n\t\t\tlabel: this._colorPickerLabel,\n\t\t\twithText: true,\n\t\t\ticon: IconColorPalette,\n\t\t\tclass: \"ck-color-selector__color-picker\"\n\t\t});\n\t\tthis.colorPickerButtonView.on(\"execute\", () => {\n\t\t\tthis.fire(\"colorPicker:show\");\n\t\t});\n\t}\n\t/**\n\t* Adds the remove color button as a child of the current view.\n\t*/\n\t_createRemoveColorButton() {\n\t\tconst buttonView = new ButtonView();\n\t\tbuttonView.set({\n\t\t\twithText: true,\n\t\t\ticon: IconEraser,\n\t\t\tlabel: this._removeButtonLabel\n\t\t});\n\t\tbuttonView.class = \"ck-color-selector__remove-color\";\n\t\tbuttonView.on(\"execute\", () => {\n\t\t\tthis.fire(\"execute\", {\n\t\t\t\tvalue: null,\n\t\t\t\tsource: \"removeColorButton\"\n\t\t\t});\n\t\t});\n\t\tbuttonView.render();\n\t\treturn buttonView;\n\t}\n\t/**\n\t* Creates a static color grid based on the editor configuration.\n\t*/\n\t_createStaticColorsGrid() {\n\t\tconst colorGrid = new ColorGridView(this.locale, {\n\t\t\tcolorDefinitions: this.colorDefinitions,\n\t\t\tcolumns: this.columns\n\t\t});\n\t\tcolorGrid.on(\"execute\", (evt, data) => {\n\t\t\tthis.fire(\"execute\", {\n\t\t\t\tvalue: data.value,\n\t\t\t\tsource: \"staticColorsGrid\"\n\t\t\t});\n\t\t});\n\t\treturn colorGrid;\n\t}\n\t/**\n\t* Creates the document colors section view and binds it to {@link #documentColors}.\n\t*/\n\t_createDocumentColorsGrid() {\n\t\tconst bind = Template.bind(this.documentColors, this.documentColors);\n\t\tconst documentColorsGrid = new ColorGridView(this.locale, { columns: this.columns });\n\t\tdocumentColorsGrid.extendTemplate({ attributes: { class: bind.if(\"isEmpty\", \"ck-hidden\") } });\n\t\tdocumentColorsGrid.items.bindTo(this.documentColors).using((colorObj) => {\n\t\t\tconst colorTile = new ColorTileView();\n\t\t\tcolorTile.set({\n\t\t\t\tcolor: colorObj.color,\n\t\t\t\thasBorder: colorObj.options?.hasBorder\n\t\t\t});\n\t\t\tif (colorObj.label) colorTile.set({\n\t\t\t\tlabel: colorObj.label,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tcolorTile.on(\"execute\", () => {\n\t\t\t\tthis.fire(\"execute\", {\n\t\t\t\t\tvalue: colorObj.color,\n\t\t\t\t\tsource: \"documentColorsGrid\"\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn colorTile;\n\t\t});\n\t\tthis.documentColors.on(\"change:isEmpty\", (evt, name, val) => {\n\t\t\tif (val) documentColorsGrid.selectedColor = null;\n\t\t});\n\t\treturn documentColorsGrid;\n\t}\n\t/**\n\t* Adds a given color to the document colors list. If possible, the method will attempt to use\n\t* data from the {@link #colorDefinitions} (label, color options).\n\t*\n\t* @param color A string that stores the value of the recently applied color.\n\t*/\n\t_addColorToDocumentColors(color) {\n\t\tconst predefinedColor = this.colorDefinitions.find((definition) => definition.color === color);\n\t\tif (!predefinedColor) this.documentColors.add({\n\t\t\tcolor,\n\t\t\tlabel: color,\n\t\t\toptions: { hasBorder: false }\n\t\t});\n\t\telse this.documentColors.add(Object.assign({}, predefinedColor));\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 ui/colorselector/colorpickerfragmentview\n*/\n/**\n* One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n*\n* It allows users to select a color from a color picker.\n*\n* It consists of the following sub–components:\n*\n* * A color picker saturation and hue sliders,\n* * A text input accepting colors in HEX format,\n* * \"Save\" and \"Cancel\" action buttons.\n*/\nvar ColorPickerFragmentView = class extends View {\n\t/**\n\t* A collection of component's children.\n\t*/\n\titems;\n\t/**\n\t* A view with saturation and hue sliders and color input.\n\t*/\n\tcolorPickerView;\n\t/**\n\t* The \"Save\" button view.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* The \"Cancel\" button view.\n\t*/\n\tcancelButtonView;\n\t/**\n\t* The action bar where are \"Save\" button and \"Cancel\" button.\n\t*/\n\tactionBarView;\n\t/**\n\t* Tracks information about the DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A collection of views that can be focused in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusables;\n\t/**\n\t* A reference to the configuration of {@link #colorPickerView}. `false` when the view was\n\t* configured without a color picker.\n\t*\n\t* @readonly\n\t*/\n\t_colorPickerViewConfig;\n\t/**\n\t* Creates an instance of the view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Constructor options.\n\t* @param options.focusTracker Tracks information about the DOM focus in the list.\n\t* @param options.focusables A collection of views that can be focused in the view.\n\t* @param options.keystrokes An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t* @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker\n\t* will not be rendered.\n\t*/\n\tconstructor(locale, { focusTracker, focusables, keystrokes, colorPickerViewConfig }) {\n\t\tsuper(locale);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.keystrokes = keystrokes;\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"selectedColor\", void 0);\n\t\tthis._focusables = focusables;\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\t\tconst bind = this.bindTemplate;\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.actionBarView = this._createActionBarView({\n\t\t\tsaveButtonView,\n\t\t\tcancelButtonView\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck-color-picker-fragment\", bind.if(\"isVisible\", \"ck-hidden\", (value) => !value)] },\n\t\t\tchildren: this.items\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tconst colorPickerView = new ColorPickerView(this.locale, { ...this._colorPickerViewConfig });\n\t\tthis.colorPickerView = colorPickerView;\n\t\tthis.colorPickerView.render();\n\t\tif (this.selectedColor) colorPickerView.color = this.selectedColor;\n\t\tthis.listenTo(this, \"change:selectedColor\", (evt, name, value) => {\n\t\t\tcolorPickerView.color = value;\n\t\t});\n\t\tthis.items.add(this.colorPickerView);\n\t\tthis.items.add(this.actionBarView);\n\t\tthis._addColorPickersElementsToFocusTracker();\n\t\tthis._stopPropagationOnArrowsKeys();\n\t\tthis._executeOnEnterPress();\n\t\tthis._executeUponColorChange();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Focuses the color picker.\n\t*/\n\tfocus() {\n\t\tthis.colorPickerView.focus();\n\t}\n\t/**\n\t* Reset validation messages.\n\t*/\n\tresetValidationStatus() {\n\t\tthis.colorPickerView.resetValidationStatus();\n\t}\n\t/**\n\t* When color picker is focused and \"enter\" is pressed it executes command.\n\t*/\n\t_executeOnEnterPress() {\n\t\tthis.keystrokes.set(\"enter\", (evt) => {\n\t\t\tif (this.isVisible && this.focusTracker.focusedElement !== this.cancelButtonView.element && this.colorPickerView.isValid()) {\n\t\t\t\tthis.fire(\"execute\", { value: this.selectedColor });\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Removes default behavior of arrow keys in dropdown.\n\t*/\n\t_stopPropagationOnArrowsKeys() {\n\t\tconst stopPropagation = (data) => data.stopPropagation();\n\t\tthis.keystrokes.set(\"arrowright\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowleft\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowup\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowdown\", stopPropagation);\n\t}\n\t/**\n\t* Adds color picker elements to focus tracker.\n\t*/\n\t_addColorPickersElementsToFocusTracker() {\n\t\tfor (const slider of this.colorPickerView.slidersView) {\n\t\t\tthis.focusTracker.add(slider.element);\n\t\t\tthis._focusables.add(slider);\n\t\t}\n\t\tconst input = this.colorPickerView.hexInputRow.children.get(1);\n\t\tif (input.element) {\n\t\t\tthis.focusTracker.add(input.element);\n\t\t\tthis._focusables.add(input);\n\t\t}\n\t\tthis.focusTracker.add(this.saveButtonView.element);\n\t\tthis._focusables.add(this.saveButtonView);\n\t\tthis.focusTracker.add(this.cancelButtonView.element);\n\t\tthis._focusables.add(this.cancelButtonView);\n\t}\n\t/**\n\t* Creates bar containing \"Save\" and \"Cancel\" buttons.\n\t*/\n\t_createActionBarView({ saveButtonView, cancelButtonView }) {\n\t\tconst actionBarRow = new View();\n\t\tconst children = this.createCollection();\n\t\tchildren.add(saveButtonView);\n\t\tchildren.add(cancelButtonView);\n\t\tactionBarRow.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-selector_action-bar\"] },\n\t\t\tchildren\n\t\t});\n\t\treturn actionBarRow;\n\t}\n\t/**\n\t* Creates \"Save\" and \"Cancel\" buttons.\n\t*/\n\t_createActionButtons() {\n\t\tconst locale = this.locale;\n\t\tconst t = locale.t;\n\t\tconst saveButtonView = new ButtonView(locale);\n\t\tconst cancelButtonView = new ButtonView(locale);\n\t\tsaveButtonView.set({\n\t\t\ticon: IconCheck,\n\t\t\tclass: \"ck-button-save\",\n\t\t\ttype: \"button\",\n\t\t\twithText: false,\n\t\t\tlabel: t(\"Accept\")\n\t\t});\n\t\tcancelButtonView.set({\n\t\t\ticon: IconCancel,\n\t\t\tclass: \"ck-button-cancel\",\n\t\t\ttype: \"button\",\n\t\t\twithText: false,\n\t\t\tlabel: t(\"Cancel\")\n\t\t});\n\t\tsaveButtonView.on(\"execute\", () => {\n\t\t\tif (this.colorPickerView.isValid()) this.fire(\"execute\", {\n\t\t\t\tsource: \"colorPickerSaveButton\",\n\t\t\t\tvalue: this.selectedColor\n\t\t\t});\n\t\t});\n\t\tcancelButtonView.on(\"execute\", () => {\n\t\t\tthis.fire(\"colorPicker:cancel\");\n\t\t});\n\t\treturn {\n\t\t\tsaveButtonView,\n\t\t\tcancelButtonView\n\t\t};\n\t}\n\t/**\n\t* Fires the `execute` event if color in color picker has been changed\n\t* by the user.\n\t*/\n\t_executeUponColorChange() {\n\t\tthis.colorPickerView.on(\"colorSelected\", (evt, data) => {\n\t\t\tthis.fire(\"execute\", {\n\t\t\t\tvalue: data.color,\n\t\t\t\tsource: \"colorPicker\"\n\t\t\t});\n\t\t\tthis.set(\"selectedColor\", data.color);\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 ui/colorselector/colorselectorview\n*/\n/**\n* The configurable color selector view class. It allows users to select colors from a predefined set of colors as well as from\n* a color picker.\n*\n* This meta-view is is made of two components (fragments):\n*\n* * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorGridsFragmentView},\n* * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView}.\n*\n* ```ts\n* const colorDefinitions = [\n* \t{ color: '#000', label: 'Black', options: { hasBorder: false } },\n* \t{ color: 'rgb(255, 255, 255)', label: 'White', options: { hasBorder: true } },\n* \t{ color: 'red', label: 'Red', options: { hasBorder: false } }\n* ];\n*\n* const selectorView = new ColorSelectorView( locale, {\n* \tcolors: colorDefinitions,\n* \tcolumns: 5,\n* \tremoveButtonLabel: 'Remove color',\n* \tdocumentColorsLabel: 'Document colors',\n* \tdocumentColorsCount: 4,\n* \tcolorPickerViewConfig: {\n* \t\tformat: 'hsl'\n* \t}\n* } );\n*\n* selectorView.appendUI();\n* selectorView.selectedColor = 'red';\n* selectorView.updateSelectedColors();\n*\n* selectorView.on<ColorSelectorExecuteEvent>( 'execute', ( evt, data ) => {\n* \tconsole.log( 'Color changed', data.value, data.source );\n* } );\n*\n* selectorView.on<ColorSelectorColorPickerShowEvent>( 'colorPicker:show', ( evt ) => {\n* \tconsole.log( 'Color picker showed up', evt );\n* } );\n*\n* selectorView.on<ColorSelectorColorPickerCancelEvent>( 'colorPicker:cancel', ( evt ) => {\n* \tconsole.log( 'Color picker cancel', evt );\n* } );\n*\n* selectorView.render();\n*\n* document.body.appendChild( selectorView.element );\n* ```\n*/\nvar ColorSelectorView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A collection of components.\n\t*/\n\titems;\n\t/**\n\t* A fragment that allows users to select colors from the a predefined set and from existing document colors.\n\t*/\n\tcolorGridsFragmentView;\n\t/**\n\t* A fragment that allows users to select a color from a color picker.\n\t*/\n\tcolorPickerFragmentView;\n\t/**\n\t* Helps cycling over focusable {@link #items} in the list.\n\t*\n\t* @readonly\n\t*/\n\t_focusCycler;\n\t/**\n\t* A collection of views that can be focused in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusables;\n\t/**\n\t* The configuration of color picker sub-component.\n\t*/\n\t_colorPickerViewConfig;\n\t/**\n\t* Creates a view to be inserted as a child of {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Constructor options.\n\t* @param options.colors An array with definitions of colors to be displayed in the table.\n\t* @param options.columns The number of columns in the color grid.\n\t* @param options.removeButtonLabel The label of the button responsible for removing the color.\n\t* @param options.colorPickerLabel The label of the button responsible for color picker appearing.\n\t* @param options.documentColorsLabel The label for the section with the document colors.\n\t* @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t* @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker will be hidden.\n\t*/\n\tconstructor(locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, colorPickerViewConfig }) {\n\t\tsuper(locale);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.colorGridsFragmentView = new ColorGridsFragmentView(locale, {\n\t\t\tcolors,\n\t\t\tcolumns,\n\t\t\tremoveButtonLabel,\n\t\t\tdocumentColorsLabel,\n\t\t\tdocumentColorsCount,\n\t\t\tcolorPickerLabel,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tfocusables: this._focusables\n\t\t});\n\t\tthis.colorPickerFragmentView = new ColorPickerFragmentView(locale, {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokes: this.keystrokes,\n\t\t\tcolorPickerViewConfig\n\t\t});\n\t\tthis.set(\"_isColorGridsFragmentVisible\", true);\n\t\tthis.set(\"_isColorPickerFragmentVisible\", false);\n\t\tthis.set(\"selectedColor\", void 0);\n\t\tthis.colorGridsFragmentView.bind(\"isVisible\").to(this, \"_isColorGridsFragmentVisible\");\n\t\tthis.colorPickerFragmentView.bind(\"isVisible\").to(this, \"_isColorPickerFragmentVisible\");\n\t\t/**\n\t\t* This is kind of bindings. Unfortunately we could not use this.bind() method because the same property\n\t\t* cannot be bound twice. So this is work around how to bind 'selectedColor' property between components.\n\t\t*/\n\t\tthis.on(\"change:selectedColor\", (evt, evtName, data) => {\n\t\t\tthis.colorGridsFragmentView.set(\"selectedColor\", data);\n\t\t\tthis.colorPickerFragmentView.set(\"selectedColor\", data);\n\t\t});\n\t\tthis.colorGridsFragmentView.on(\"change:selectedColor\", (evt, evtName, data) => {\n\t\t\tthis.set(\"selectedColor\", data);\n\t\t});\n\t\tthis.colorPickerFragmentView.on(\"change:selectedColor\", (evt, evtName, data) => {\n\t\t\tthis.set(\"selectedColor\", data);\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-selector\"] },\n\t\t\tchildren: this.items\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Renders the internals of the component on demand:\n\t* * {@link #colorPickerFragmentView},\n\t* * {@link #colorGridsFragmentView}.\n\t*\n\t* It allows for deferring component initialization to improve the performance.\n\t*\n\t* See {@link #showColorPickerFragment}, {@link #showColorGridsFragment}.\n\t*/\n\tappendUI() {\n\t\tthis._appendColorGridsFragment();\n\t\tif (this._colorPickerViewConfig) this._appendColorPickerFragment();\n\t}\n\t/**\n\t* Shows the {@link #colorPickerFragmentView} and hides the {@link #colorGridsFragmentView}.\n\t*\n\t* **Note**: It requires {@link #appendUI} to be called first.\n\t*\n\t* See {@link #showColorGridsFragment}, {@link ~ColorSelectorView#event:colorPicker:show}.\n\t*/\n\tshowColorPickerFragment() {\n\t\tif (!this.colorPickerFragmentView.colorPickerView || this._isColorPickerFragmentVisible) return;\n\t\tthis._isColorPickerFragmentVisible = true;\n\t\tthis.colorPickerFragmentView.focus();\n\t\tthis.colorPickerFragmentView.resetValidationStatus();\n\t\tthis._isColorGridsFragmentVisible = false;\n\t}\n\t/**\n\t* Shows the {@link #colorGridsFragmentView} and hides the {@link #colorPickerFragmentView}.\n\t*\n\t* See {@link #showColorPickerFragment}.\n\t*\n\t* **Note**: It requires {@link #appendUI} to be called first.\n\t*/\n\tshowColorGridsFragment() {\n\t\tif (this._isColorGridsFragmentVisible) return;\n\t\tthis._isColorGridsFragmentVisible = true;\n\t\tthis.colorGridsFragmentView.focus();\n\t\tthis._isColorPickerFragmentVisible = false;\n\t}\n\t/**\n\t* Focuses the first focusable element in {@link #items}.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last focusable element in {@link #items}.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\n\t}\n\t/**\n\t* Scans through the editor model and searches for text node attributes with the given `attributeName`.\n\t* Found entries are set as document colors in {@link #colorGridsFragmentView}.\n\t*\n\t* All the previously stored document colors will be lost in the process.\n\t*\n\t* @param model The model used as a source to obtain the document colors.\n\t* @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t*/\n\tupdateDocumentColors(model, attributeName) {\n\t\tthis.colorGridsFragmentView.updateDocumentColors(model, attributeName);\n\t}\n\t/**\n\t* Refreshes the state of the selected color in one or both grids located in {@link #colorGridsFragmentView}.\n\t*\n\t* It guarantees that the selection will occur only in one of them.\n\t*/\n\tupdateSelectedColors() {\n\t\tthis.colorGridsFragmentView.updateSelectedColors();\n\t}\n\t/**\n\t* Appends the view containing static and document color grid views.\n\t*/\n\t_appendColorGridsFragment() {\n\t\tif (this.items.length) return;\n\t\tthis.items.add(this.colorGridsFragmentView);\n\t\tthis.colorGridsFragmentView.delegate(\"execute\").to(this);\n\t\tthis.colorGridsFragmentView.delegate(\"colorPicker:show\").to(this);\n\t}\n\t/**\n\t* Appends the view with the color picker.\n\t*/\n\t_appendColorPickerFragment() {\n\t\tif (this.items.length === 2) return;\n\t\tthis.items.add(this.colorPickerFragmentView);\n\t\tif (this.colorGridsFragmentView.colorPickerButtonView) this.colorGridsFragmentView.colorPickerButtonView.on(\"execute\", () => {\n\t\t\tthis.showColorPickerFragment();\n\t\t});\n\t\tthis.colorGridsFragmentView.addColorPickerButton();\n\t\tthis.colorPickerFragmentView.delegate(\"execute\").to(this);\n\t\tthis.colorPickerFragmentView.delegate(\"colorPicker:cancel\").to(this);\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 ui/componentfactory\n*/\n/**\n* A helper class implementing the UI component ({@link module:ui/view~View view}) factory.\n*\n* It allows functions producing specific UI components to be registered under their unique names\n* in the factory. A registered component can be then instantiated by providing its name.\n* Note that the names are case insensitive.\n*\n* ```ts\n* // The editor provides localization tools for the factory.\n* const factory = new ComponentFactory( editor );\n*\n* factory.add( 'foo', locale => new FooView( locale ) );\n* factory.add( 'bar', locale => new BarView( locale ) );\n*\n* // An instance of FooView.\n* const fooInstance = factory.create( 'foo' );\n*\n* // Names are case insensitive so this is also allowed:\n* const barInstance = factory.create( 'Bar' );\n* ```\n*\n* The {@link module:core/editor/editor~Editor#locale editor locale} is passed to the factory\n* function when {@link module:ui/componentfactory~ComponentFactory#create} is called.\n*/\nvar ComponentFactory = class {\n\t/**\n\t* The editor instance that the factory belongs to.\n\t*/\n\teditor;\n\t/**\n\t* Registered component factories.\n\t*/\n\t_components = /* @__PURE__ */ new Map();\n\t/**\n\t* Creates an instance of the factory.\n\t*\n\t* @param editor The editor instance.\n\t*/\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t}\n\t/**\n\t* Returns an iterator of registered component names. Names are returned in lower case.\n\t*/\n\t*names() {\n\t\tfor (const value of this._components.values()) yield value.originalName;\n\t}\n\t/**\n\t* Registers a component factory function that will be used by the\n\t* {@link #create create} method and called with the\n\t* {@link module:core/editor/editor~Editor#locale editor locale} as an argument,\n\t* allowing localization of the {@link module:ui/view~View view}.\n\t*\n\t* @param name The name of the component.\n\t* @param callback The callback that returns the component.\n\t*/\n\tadd(name, callback) {\n\t\tthis._components.set(getNormalized(name), {\n\t\t\tcallback,\n\t\t\toriginalName: name\n\t\t});\n\t}\n\t/**\n\t* Creates an instance of a component registered in the factory under a specific name.\n\t*\n\t* When called, the {@link module:core/editor/editor~Editor#locale editor locale} is passed to\n\t* the previously {@link #add added} factory function, allowing localization of the\n\t* {@link module:ui/view~View view}.\n\t*\n\t* @param name The name of the component.\n\t* @returns The instantiated component view.\n\t*/\n\tcreate(name) {\n\t\tif (!this.has(name))\n /**\n\t\t* The required component is not registered in the component factory. Please make sure\n\t\t* the provided name is correct and the component has been correctly\n\t\t* {@link module:ui/componentfactory~ComponentFactory#add added} to the factory.\n\t\t*\n\t\t* @error componentfactory-item-missing\n\t\t* @param {string} name The name of the missing component.\n\t\t*/\n\t\tthrow new CKEditorError(\"componentfactory-item-missing\", this, { name });\n\t\treturn this._components.get(getNormalized(name)).callback(this.editor.locale);\n\t}\n\t/**\n\t* Checks if a component of a given name is registered in the factory.\n\t*\n\t* @param name The name of the component.\n\t*/\n\thas(name) {\n\t\treturn this._components.has(getNormalized(name));\n\t}\n};\n/**\n* Ensures that the component name used as the key in the internal map is in lower case.\n*/\nfunction getNormalized(name) {\n\treturn String(name).toLowerCase();\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 ui/tooltipmanager\n*/\nconst BALLOON_CLASS = \"ck-tooltip\";\nconst TooltipManagerBase = /* #__PURE__ */ DomEmitterMixin();\n/**\n* A tooltip manager class for the UI of the editor.\n*\n* **Note**: Most likely you do not have to use the `TooltipManager` API listed below in order to display tooltips. Popular\n* {@glink framework/architecture/ui-library UI components} support tooltips out-of-the-box via observable properties\n* (see {@link module:ui/button/buttonview~ButtonView#tooltip} and {@link module:ui/button/buttonview~ButtonView#tooltipPosition}).\n*\n* # Displaying tooltips\n*\n* To display a tooltip, set `data-cke-tooltip-text` attribute on any DOM element:\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'My tooltip';\n* ```\n*\n* The tooltip will show up whenever the user moves the mouse over the element or the element gets focus in DOM.\n*\n* # Positioning tooltips\n*\n* To change the position of the tooltip, use the `data-cke-tooltip-position` attribute (`s`, `se`, `sw`, `n`, `e`, or `w`):\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'Tooltip to the north';\n* domElement.dataset.ckeTooltipPosition = 'n';\n* ```\n*\n* # Disabling tooltips\n*\n* In order to disable the tooltip temporarily, use the `data-cke-tooltip-disabled` attribute:\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'Disabled. For now.';\n* domElement.dataset.ckeTooltipDisabled = 'true';\n* ```\n*\n* # Instant tooltips\n*\n* To remove the delay before showing or hiding the tooltip, use the `data-cke-tooltip-instant` attribute:\n*\n* ```ts\n* domElement.dataset.ckeTooltipInstant = 'true';\n* ```\n*\n* # Styling tooltips\n*\n* By default, the tooltip has `.ck-tooltip` class and its text inner `.ck-tooltip__text`.\n*\n* If your tooltip requires custom styling, using `data-cke-tooltip-class` attribute will add additional class to the balloon\n* displaying the tooltip:\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'Tooltip with a red text';\n* domElement.dataset.ckeTooltipClass = 'my-class';\n* ```\n*\n* ```css\n* .ck.ck-tooltip.my-class { color: red }\n* ```\n*\n* **Note**: This class is a singleton. All editor instances re-use the same instance loaded by\n* {@link module:ui/editorui/editorui~EditorUI} of the first editor.\n*/\nvar TooltipManager = class TooltipManager extends TooltipManagerBase {\n\t/**\n\t* The view rendering text of the tooltip.\n\t*/\n\ttooltipTextView;\n\t/**\n\t* The instance of the balloon panel that renders and positions the tooltip.\n\t*/\n\tballoonPanelView;\n\t/**\n\t* A set of default {@link module:utils/dom/position~PositioningFunction positioning functions} used by the `TooltipManager`\n\t* to pin tooltips in different positions.\n\t*/\n\tstatic defaultBalloonPositions = /* #__PURE__ */ BalloonPanelView.generatePositions({\n\t\theightOffset: 5,\n\t\tsideOffset: 13\n\t});\n\t/**\n\t* Stores the reference to the DOM element the tooltip is attached to. `null` when there's no tooltip\n\t* in the UI.\n\t*/\n\t_currentElementWithTooltip = null;\n\t/**\n\t* Stores the current tooltip position. `null` when there's no tooltip in the UI.\n\t*/\n\t_currentTooltipPosition = null;\n\t/**\n\t* An instance of the mutation observer that keeps track on target element attributes changes.\n\t*/\n\t_mutationObserver = null;\n\t/**\n\t* A debounced version of {@link #_pinTooltip}. Tooltips show with a delay to avoid flashing and\n\t* to improve the UX.\n\t*/\n\t_pinTooltipDebounced;\n\t/**\n\t* A debounced version of {@link #_unpinTooltip}. Tooltips hide with a delay to allow hovering of their titles.\n\t*/\n\t_unpinTooltipDebounced;\n\t_watchdogExcluded;\n\t/**\n\t* A set of editors the single tooltip manager instance must listen to.\n\t* This is mostly to handle `EditorUI#update` listeners from individual editors.\n\t*/\n\tstatic _editors = /* @__PURE__ */ new Set();\n\t/**\n\t* A reference to the `TooltipManager` instance. The class is a singleton and as such,\n\t* successive attempts at creating instances should return this instance.\n\t*/\n\tstatic _instance = null;\n\t/**\n\t* Creates an instance of the tooltip manager.\n\t*/\n\tconstructor(editor) {\n\t\tsuper();\n\t\tTooltipManager._editors.add(editor);\n\t\tif (TooltipManager._instance) return TooltipManager._instance;\n\t\tTooltipManager._instance = this;\n\t\tthis.tooltipTextView = new View(editor.locale);\n\t\tthis.tooltipTextView.set(\"text\", \"\");\n\t\tthis.tooltipTextView.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-tooltip__text\"] },\n\t\t\tchildren: [{ text: this.tooltipTextView.bindTemplate.to(\"text\") }]\n\t\t});\n\t\tthis.balloonPanelView = new BalloonPanelView(editor.locale);\n\t\tthis.balloonPanelView.class = BALLOON_CLASS;\n\t\tthis.balloonPanelView.content.add(this.tooltipTextView);\n\t\tthis._mutationObserver = createMutationObserver(() => {\n\t\t\tthis._updateTooltipPosition();\n\t\t});\n\t\tthis._pinTooltipDebounced = debounce(this._pinTooltip, 600);\n\t\tthis._unpinTooltipDebounced = debounce(this._unpinTooltip, 400);\n\t\tthis.listenTo(global.document, \"keydown\", this._onKeyDown.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"mouseenter\", this._onEnterOrFocus.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"mouseleave\", this._onLeaveOrBlur.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"focus\", this._onEnterOrFocus.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"blur\", this._onLeaveOrBlur.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"scroll\", this._onScroll.bind(this), { useCapture: true });\n\t\tthis._watchdogExcluded = true;\n\t}\n\t/**\n\t* Destroys the tooltip manager.\n\t*\n\t* **Note**: The manager singleton cannot be destroyed until all editors that use it are destroyed.\n\t*\n\t* @param editor The editor the manager was created for.\n\t*/\n\tdestroy(editor) {\n\t\tconst editorBodyViewCollection = editor.ui.view && editor.ui.view.body;\n\t\tTooltipManager._editors.delete(editor);\n\t\tthis.stopListening(editor.ui);\n\t\tif (editorBodyViewCollection && editorBodyViewCollection.has(this.balloonPanelView)) editorBodyViewCollection.remove(this.balloonPanelView);\n\t\tif (!TooltipManager._editors.size) {\n\t\t\tthis._unpinTooltip();\n\t\t\tthis.balloonPanelView.destroy();\n\t\t\tthis.stopListening();\n\t\t\tTooltipManager._instance = null;\n\t\t}\n\t}\n\t/**\n\t* Returns {@link #balloonPanelView} {@link module:utils/dom/position~PositioningFunction positioning functions} for a given position\n\t* name.\n\t*\n\t* @param position Name of the position (`s`, `se`, `sw`, `n`, `e`, or `w`).\n\t* @returns Positioning functions to be used by the {@link #balloonPanelView}.\n\t*/\n\tstatic getPositioningFunctions(position) {\n\t\tconst defaultPositions = TooltipManager.defaultBalloonPositions;\n\t\treturn {\n\t\t\ts: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest\n\t\t\t],\n\t\t\tn: [defaultPositions.northArrowSouth],\n\t\t\te: [defaultPositions.eastArrowWest],\n\t\t\tw: [defaultPositions.westArrowEast],\n\t\t\tsw: [defaultPositions.southArrowNorthEast],\n\t\t\tse: [defaultPositions.southArrowNorthWest]\n\t\t}[position];\n\t}\n\t/**\n\t* Handles hiding tooltips on `keydown` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onKeyDown(evt, domEvent) {\n\t\tif (domEvent.key === \"Escape\" && this._currentElementWithTooltip) {\n\t\t\tthis._unpinTooltip();\n\t\t\tdomEvent.stopPropagation();\n\t\t}\n\t}\n\t/**\n\t* Handles displaying tooltips on `mouseenter` and `focus` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onEnterOrFocus(evt, { target }) {\n\t\tconst elementWithTooltipAttribute = getDescendantWithTooltip(target);\n\t\tif (!elementWithTooltipAttribute) {\n\t\t\tif (evt.name === \"focus\") this._unpinTooltip();\n\t\t\treturn;\n\t\t}\n\t\tif (elementWithTooltipAttribute === this._currentElementWithTooltip) {\n\t\t\tthis._unpinTooltipDebounced.cancel();\n\t\t\treturn;\n\t\t}\n\t\tthis._unpinTooltip();\n\t\tif (evt.name === \"focus\" && !elementWithTooltipAttribute.matches(\":hover\") || elementWithTooltipAttribute.matches(\"[data-cke-tooltip-instant]\")) this._pinTooltip(elementWithTooltipAttribute, getTooltipData(elementWithTooltipAttribute));\n\t\telse this._pinTooltipDebounced(elementWithTooltipAttribute, getTooltipData(elementWithTooltipAttribute));\n\t}\n\t/**\n\t* Handles hiding tooltips on `mouseleave` and `blur` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onLeaveOrBlur(evt, { target, relatedTarget }) {\n\t\tif (evt.name === \"mouseleave\") {\n\t\t\tif (!isElement(target)) return;\n\t\t\tconst balloonElement = this.balloonPanelView.element;\n\t\t\tconst isEnteringBalloon = balloonElement && (balloonElement === relatedTarget || balloonElement.contains(relatedTarget));\n\t\t\tconst isLeavingBalloon = !isEnteringBalloon && target === balloonElement;\n\t\t\tif (isEnteringBalloon) {\n\t\t\t\tthis._unpinTooltipDebounced.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!isLeavingBalloon && this._currentElementWithTooltip && target !== this._currentElementWithTooltip) return;\n\t\t\tconst descendantWithTooltip = getDescendantWithTooltip(target);\n\t\t\tconst relatedDescendantWithTooltip = getDescendantWithTooltip(relatedTarget);\n\t\t\tif (isLeavingBalloon || descendantWithTooltip && descendantWithTooltip !== relatedDescendantWithTooltip) {\n\t\t\t\tthis._pinTooltipDebounced.cancel();\n\t\t\t\tif (this._currentElementWithTooltip && this._currentElementWithTooltip.matches(\"[data-cke-tooltip-instant]\") || descendantWithTooltip && descendantWithTooltip.matches(\"[data-cke-tooltip-instant]\")) this._unpinTooltip();\n\t\t\t\telse this._unpinTooltipDebounced();\n\t\t\t}\n\t\t} else {\n\t\t\tif (this._currentElementWithTooltip && target !== this._currentElementWithTooltip) return;\n\t\t\tthis._pinTooltipDebounced.cancel();\n\t\t\tthis._unpinTooltipDebounced();\n\t\t}\n\t}\n\t/**\n\t* Handles hiding tooltips on `scroll` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onScroll(evt, { target }) {\n\t\tif (!this._currentElementWithTooltip) return;\n\t\tif (target.contains(this.balloonPanelView.element) && target.contains(this._currentElementWithTooltip)) return;\n\t\tthis._unpinTooltip();\n\t}\n\t/**\n\t* Pins the tooltip to a specific DOM element.\n\t*\n\t* @param targetDomElement Element to be pinned to.\n\t* @param options Options for the tooltip.\n\t* @param options.text Text of the tooltip to display.\n\t* @param options.position The position of the tooltip.\n\t* @param options.cssClass Additional CSS class of the balloon with the tooltip.\n\t*/\n\t_pinTooltip(targetDomElement, { text, position, cssClass }) {\n\t\tthis._unpinTooltip();\n\t\tconst bodyViewCollection = first(TooltipManager._editors.values()).ui.view.body;\n\t\tif (!bodyViewCollection.has(this.balloonPanelView)) bodyViewCollection.add(this.balloonPanelView);\n\t\tthis.tooltipTextView.text = text;\n\t\tthis.balloonPanelView.class = [BALLOON_CLASS, cssClass].filter((className) => className).join(\" \");\n\t\tthis.balloonPanelView.pin({\n\t\t\ttarget: targetDomElement,\n\t\t\tpositions: TooltipManager.getPositioningFunctions(position)\n\t\t});\n\t\tthis._mutationObserver.attach(targetDomElement);\n\t\tfor (const editor of TooltipManager._editors) this.listenTo(editor.ui, \"update\", this._updateTooltipPosition.bind(this), { priority: \"low\" });\n\t\tthis._currentElementWithTooltip = targetDomElement;\n\t\tthis._currentTooltipPosition = position;\n\t}\n\t/**\n\t* Unpins the tooltip and cancels all queued pinning.\n\t*/\n\t_unpinTooltip() {\n\t\tthis._unpinTooltipDebounced.cancel();\n\t\tthis._pinTooltipDebounced.cancel();\n\t\tthis.balloonPanelView.unpin();\n\t\tfor (const editor of TooltipManager._editors) this.stopListening(editor.ui, \"update\");\n\t\tthis._currentElementWithTooltip = null;\n\t\tthis._currentTooltipPosition = null;\n\t\tthis.tooltipTextView.text = \"\";\n\t\tthis._mutationObserver.detach();\n\t}\n\t/**\n\t* Updates the position of the tooltip so it stays in sync with the element it is pinned to.\n\t*\n\t* Hides the tooltip when the element is no longer visible in DOM or the tooltip text was removed.\n\t*/\n\t_updateTooltipPosition() {\n\t\tif (!this._currentElementWithTooltip) return;\n\t\tconst tooltipData = getTooltipData(this._currentElementWithTooltip);\n\t\tif (!isVisible(this._currentElementWithTooltip) || !tooltipData.text) {\n\t\t\tthis._unpinTooltip();\n\t\t\treturn;\n\t\t}\n\t\tthis.balloonPanelView.pin({\n\t\t\ttarget: this._currentElementWithTooltip,\n\t\t\tpositions: TooltipManager.getPositioningFunctions(tooltipData.position)\n\t\t});\n\t}\n};\nfunction getDescendantWithTooltip(element) {\n\tif (!isElement(element)) return null;\n\treturn element.closest(\"[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])\");\n}\nfunction getTooltipData(element) {\n\treturn {\n\t\ttext: element.dataset.ckeTooltipText,\n\t\tposition: element.dataset.ckeTooltipPosition || \"s\",\n\t\tcssClass: element.dataset.ckeTooltipClass || \"\"\n\t};\n}\nfunction createMutationObserver(callback) {\n\tconst mutationObserver = new MutationObserver(() => {\n\t\tcallback();\n\t});\n\treturn {\n\t\tattach(element) {\n\t\t\tmutationObserver.observe(element, {\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: [\"data-cke-tooltip-text\", \"data-cke-tooltip-position\"]\n\t\t\t});\n\t\t},\n\t\tdetach() {\n\t\t\tmutationObserver.disconnect();\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* A helper that enables the \"evaluation badge\" feature in the editor at the bottom of the editable element\n* (editor root, source editing area, etc.) when the editor is focused.\n*\n* @private\n*/\nvar EvaluationBadge = class extends Badge {\n\tlicenseTypeMessage = {\n\t\tevaluation: \"For evaluation purposes only\",\n\t\ttrial: \"For evaluation purposes only\",\n\t\tdevelopment: \"For development purposes only\"\n\t};\n\tconstructor(editor) {\n\t\tsuper(editor, { balloonClass: \"ck-evaluation-badge-balloon\" });\n\t}\n\t/**\n\t* Enables \"evaluation badge\" label.\n\t*/\n\t_isEnabled() {\n\t\tconst licenseType = getLicenseTypeFromLicenseKey(this.editor.config.get(\"licenseKey\"));\n\t\treturn Boolean(licenseType && this.licenseTypeMessage[licenseType]);\n\t}\n\t/**\n\t* Creates the content of the \"evaluation badge\".\n\t*/\n\t_createBadgeContent() {\n\t\tconst licenseType = getLicenseTypeFromLicenseKey(this.editor.config.get(\"licenseKey\"));\n\t\treturn new EvaluationBadgeView(this.editor.locale, this.licenseTypeMessage[licenseType]);\n\t}\n\t/**\n\t* Returns the normalized configuration for the \"evaluation badge\".\n\t* It takes 'ui.poweredBy' configuration into account to determine the badge position and side.\n\t*/\n\t_getNormalizedConfig() {\n\t\tconst badgeConfig = super._getNormalizedConfig();\n\t\tconst userConfig = this.editor.config.get(\"ui.poweredBy\") || {};\n\t\treturn {\n\t\t\tposition: userConfig.position || badgeConfig.position,\n\t\t\tside: (userConfig.side || badgeConfig.side) === \"left\" ? \"right\" : \"left\",\n\t\t\tverticalOffset: badgeConfig.verticalOffset,\n\t\t\thorizontalOffset: badgeConfig.horizontalOffset\n\t\t};\n\t}\n};\n/**\n* A view displaying the \"evaluation badge\".\n*/\nvar EvaluationBadgeView = class extends View {\n\t/**\n\t* Creates an instance of the \"evaluation badge\" view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param label The label text.\n\t*/\n\tconstructor(locale, label) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-evaluation-badge\"],\n\t\t\t\t\"aria-hidden\": true\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-evaluation-badge__label\"] },\n\t\t\t\tchildren: [label]\n\t\t\t}]\n\t\t});\n\t}\n};\n/**\n* Returns the license type based on the license key.\n*/\nfunction getLicenseTypeFromLicenseKey(licenseKey) {\n\tif (licenseKey == \"GPL\") return \"GPL\";\n\tconst licenseContent = parseBase64EncodedObject(licenseKey.split(\".\")[1]);\n\tif (!licenseContent) return null;\n\treturn licenseContent.licenseType || \"production\";\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* A menu bar list item view, a child of {@link module:ui/menubar/menubarmenulistview~MenuBarMenuListView}.\n*\n* Populate this item with a {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} instance\n* or a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance to create a sub-menu.\n*/\nvar MenuBarMenuListItemView = class extends ListItemView {\n\t/**\n\t* Creates an instance of the list item view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale, parentMenuView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({\n\t\t\tattributes: { class: [\"ck-menu-bar__menu__item\"] },\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t\tthis.delegate(\"mouseenter\").to(parentMenuView);\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 ui/menubar/utils\n*/\nconst NESTED_PANEL_HORIZONTAL_OFFSET = 5;\n/**\n* Behaviors of the {@link module:ui/menubar/menubarview~MenuBarView} component.\n* @internal\n*/\nconst MenuBarBehaviors = {\n\t/**\n\t* When the bar is already open:\n\t* * Opens the menu when the user hovers over its button.\n\t* * Closes open menu when another menu's button gets hovered.\n\t*/\n\ttoggleMenusAndFocusItemsOnHover(menuBarView) {\n\t\tmenuBarView.on(\"menu:mouseenter\", (evt) => {\n\t\t\tif (!menuBarView.isFocusBorderEnabled && !menuBarView.isOpen) return;\n\t\t\tif (menuBarView.isOpen) for (const menuView of menuBarView.menus) {\n\t\t\t\tconst pathLeaf = evt.path[0];\n\t\t\t\tconst isListItemContainingMenu = pathLeaf instanceof MenuBarMenuListItemView && pathLeaf.children.first === menuView;\n\t\t\t\tmenuView.isOpen = (evt.path.includes(menuView) || isListItemContainingMenu) && menuView.isEnabled;\n\t\t\t}\n\t\t\tevt.source.focus();\n\t\t});\n\t},\n\t/**\n\t* Moves between top-level menus using the arrow left and right keys.\n\t*\n\t* If the menubar has already been open, the arrow keys move focus between top-level menu buttons and open them.\n\t* If the menubar is closed, the arrow keys only move focus between top-level menu buttons.\n\t*/\n\tfocusCycleMenusOnArrows(menuBarView) {\n\t\tconst isContentRTL = menuBarView.locale.uiLanguageDirection === \"rtl\";\n\t\tmenuBarView.on(\"menu:arrowright\", (evt) => {\n\t\t\tcycleTopLevelMenus(evt.source, isContentRTL ? -1 : 1);\n\t\t});\n\t\tmenuBarView.on(\"menu:arrowleft\", (evt) => {\n\t\t\tcycleTopLevelMenus(evt.source, isContentRTL ? 1 : -1);\n\t\t});\n\t\tfunction cycleTopLevelMenus(currentMenuView, step) {\n\t\t\tconst currentIndex = menuBarView.children.getIndex(currentMenuView);\n\t\t\tconst isCurrentMenuViewOpen = currentMenuView.isOpen;\n\t\t\tconst menusCount = menuBarView.children.length;\n\t\t\tconst menuViewToOpen = menuBarView.children.get((currentIndex + menusCount + step) % menusCount);\n\t\t\tcurrentMenuView.isOpen = false;\n\t\t\tif (isCurrentMenuViewOpen) menuViewToOpen.isOpen = true;\n\t\t\tmenuViewToOpen.buttonView.focus();\n\t\t}\n\t},\n\t/**\n\t* Closes the entire sub-menu structure when the bar is closed. This prevents sub-menus from being open if the user\n\t* closes the entire bar, and then re-opens some top-level menu.\n\t*/\n\tcloseMenusWhenTheBarCloses(menuBarView) {\n\t\tmenuBarView.on(\"change:isOpen\", () => {\n\t\t\tif (!menuBarView.isOpen) menuBarView.menus.forEach((menuView) => {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t* Handles the following case:\n\t* 1. Hover to open a sub-menu (A). The button has focus.\n\t* 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t* 3. Press arrow right to open the sub-menu (B).\n\t* 4. The sub-menu (A) should close as it would with `toggleMenusAndFocusItemsOnHover()`.\n\t*/\n\tcloseMenuWhenAnotherOnTheSameLevelOpens(menuBarView) {\n\t\tmenuBarView.on(\"menu:change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (isOpen) menuBarView.menus.filter((menuView) => {\n\t\t\t\treturn evt.source.parentMenuView === menuView.parentMenuView && evt.source !== menuView && menuView.isOpen;\n\t\t\t}).forEach((menuView) => {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t* Closes the bar when the user clicked outside of it (page body, editor root, etc.).\n\t*/\n\tcloseOnClickOutside(menuBarView) {\n\t\tclickOutsideHandler({\n\t\t\temitter: menuBarView,\n\t\t\tactivator: () => menuBarView.isOpen,\n\t\t\tcallback: () => menuBarView.close(),\n\t\t\tcontextElements: () => menuBarView.children.map((child) => child.element)\n\t\t});\n\t},\n\t/**\n\t* Tracks the keyboard focus interaction on the menu bar view. It is used to determine if the nested items\n\t* of the menu bar should render focus rings after first interaction with the keyboard.\n\t*/\n\tenableFocusHighlightOnInteraction(menuBarView) {\n\t\tlet isKeyPressed = false;\n\t\tmenuBarView.on(\"change:isOpen\", (_, evt, isOpen) => {\n\t\t\tif (!isOpen) {\n\t\t\t\tif (!isKeyPressed) menuBarView.isFocusBorderEnabled = false;\n\t\t\t\tisKeyPressed = false;\n\t\t\t}\n\t\t});\n\t\tmenuBarView.listenTo(menuBarView.element, \"keydown\", () => {\n\t\t\tisKeyPressed = true;\n\t\t}, { useCapture: true });\n\t\tmenuBarView.listenTo(menuBarView.element, \"keyup\", () => {\n\t\t\tisKeyPressed = false;\n\t\t}, { useCapture: true });\n\t\tmenuBarView.listenTo(menuBarView.element, \"focus\", () => {\n\t\t\tif (isKeyPressed) menuBarView.isFocusBorderEnabled = true;\n\t\t}, { useCapture: true });\n\t}\n};\n/**\n* Behaviors of the {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} component.\n* @internal\n*/\nconst MenuBarMenuBehaviors = {\n\t/**\n\t* If the button of the menu is focused, pressing the arrow down key should open the panel and focus it.\n\t* This is analogous to the {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t*/\n\topenAndFocusPanelOnArrowDownKey(menuView) {\n\t\tmenuView.keystrokes.set(\"arrowdown\", (data, cancel) => {\n\t\t\tif (menuView.isEnabled && menuView.focusTracker.focusedElement === menuView.buttonView.element) {\n\t\t\t\tif (!menuView.isOpen) menuView.isOpen = true;\n\t\t\t\tmenuView.panelView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Open the menu on the right arrow key press. This allows for navigating to sub-menus using the keyboard.\n\t*/\n\topenOnArrowRightKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowleft\" : \"arrowright\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled) return;\n\t\t\tif (!menuView.isOpen) menuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Opens the menu on its button click. Note that this behavior only opens but never closes the menu (unlike\n\t* {@link module:ui/dropdown/dropdownview~DropdownView}).\n\t*/\n\topenOnButtonClick(menuView) {\n\t\tmenuView.buttonView.on(\"execute\", () => {\n\t\t\tmenuView.isOpen = true;\n\t\t});\n\t},\n\t/**\n\t* Toggles the menu on its button click. This behavior is analogous to {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t*/\n\ttoggleOnButtonClick(menuView) {\n\t\tmenuView.buttonView.on(\"execute\", () => {\n\t\t\tmenuView.isOpen = !menuView.isOpen;\n\t\t});\n\t},\n\t/**\n\t* Opens the menu and focuses the panel content upon pressing the Enter key.\n\t*/\n\topenAndFocusOnEnterKeyPress(menuView) {\n\t\tmenuView.keystrokes.set(\"enter\", (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element) return;\n\t\t\tmenuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Closes the menu on the right left key press. This allows for navigating to sub-menus using the keyboard.\n\t*/\n\tcloseOnArrowLeftKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowright\" : \"arrowleft\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Closes the menu on the esc key press. This allows for navigating to sub-menus using the keyboard.\n\t*/\n\tcloseOnEscKey(menuView) {\n\t\tmenuView.keystrokes.set(\"esc\", (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Closes the menu when its parent menu also closed. This prevents from orphaned open menus when the parent menu re-opens.\n\t*/\n\tcloseOnParentClose(menuView) {\n\t\tmenuView.parentMenuView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen && evt.source === menuView.parentMenuView) menuView.isOpen = false;\n\t\t});\n\t}\n};\n/**\n* Contains every positioning function used by {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} that decides where the\n* {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} should be placed.\n*\n* Top-level menu positioning functions:\n*\n*\t┌──────┐\n*\t│      │\n*\t├──────┴────────┐\n*\t│               │\n*\t│               │\n*\t│               │\n*\t│            SE │\n*\t└───────────────┘\n*\n*\t         ┌──────┐\n*\t         │      │\n*\t┌────────┴──────┤\n*\t│               │\n*\t│               │\n*\t│               │\n*\t│ SW            │\n*\t└───────────────┘\n*\n*\t┌───────────────┐\n*\t│ NW            │\n*\t│               │\n*\t│               │\n*\t│               │\n*\t└────────┬──────┤\n*\t         │      │\n*\t         └──────┘\n*\n*\t┌───────────────┐\n*\t│            NE │\n*\t│               │\n*\t│               │\n*\t│               │\n*\t├──────┬────────┘\n*\t│      │\n*\t└──────┘\n*\n* Sub-menu positioning functions:\n*\n*\t┌──────┬───────────────┐\n*\t│      │               │\n*\t└──────┤               │\n*\t       │               │\n*\t       │            ES │\n*\t       └───────────────┘\n*\n*\t┌───────────────┬──────┐\n*\t│               │      │\n*\t│               ├──────┘\n*\t│               │\n*\t│ WS            │\n*\t└───────────────┘\n*\n*\t       ┌───────────────┐\n*\t       │            EN │\n*\t       │               │\n*\t┌──────┤               │\n*\t│      │               │\n*\t└──────┴───────────────┘\n*\n*\t┌───────────────┐\n*\t│ WN            │\n*\t│               │\n*\t│               ├──────┐\n*\t│               │      │\n*\t└───────────────┴──────┘\n*/\n/**\n* @internal\n*/\nconst MenuBarMenuViewPanelPositioningFunctions = {\n\tsouthEast: (buttonRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: \"se\"\n\t\t};\n\t},\n\tsouthWest: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: \"sw\"\n\t\t};\n\t},\n\tnorthEast: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: \"ne\"\n\t\t};\n\t},\n\tnorthWest: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: \"nw\"\n\t\t};\n\t},\n\teastSouth: (buttonRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"es\"\n\t\t};\n\t},\n\teastNorth: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"en\"\n\t\t};\n\t},\n\twestSouth: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"ws\"\n\t\t};\n\t},\n\twestNorth: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"wn\"\n\t\t};\n\t}\n};\n/**\n* The default items {@link module:core/editor/editorconfig~EditorConfig#menuBar configuration} of the\n* {@link module:ui/menubar/menubarview~MenuBarView} component. It contains names of all menu bar components\n* registered in the {@link module:ui/componentfactory~ComponentFactory component factory} (available in the project).\n*\n* **Note**: Menu bar component names provided by core editor features are prefixed with `menuBar:` in order to distinguish\n* them from components referenced by the {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}, for instance,\n* `'menuBar:bold'` is a menu bar button but `'bold'` is a toolbar button.\n*\n* Below is the preset menu bar structure (the default value of `config.menuBar.items` property):\n*\n* ```ts\n* [\n* \t{\n* \t\tmenuId: 'file',\n* \t\tlabel: 'File',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'export',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:exportPdf',\n* \t\t\t\t\t'menuBar:exportWord'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'import',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:importWord'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'revisionHistory',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:revisionHistory'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'edit',\n* \t\tlabel: 'Edit',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'undo',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:undo',\n* \t\t\t\t\t'menuBar:redo'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'selectAll',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:selectAll'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'findAndReplace',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:findAndReplace'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'view',\n* \t\tlabel: 'View',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'sourceEditingEnhanced',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:sourceEditingEnhanced'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'sourceEditing',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:sourceEditing'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'showBlocks',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:showBlocks'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'previewMergeFields',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:previewMergeFields'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'fullscreen',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:fullscreen'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'restrictedEditingException',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:restrictedEditingException'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'insert',\n* \t\tlabel: 'Insert',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertMainWidgets',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:insertImage',\n* \t\t\t\t\t'menuBar:ckbox',\n* \t\t\t\t\t'menuBar:ckfinder',\n* \t\t\t\t\t'menuBar:insertTable'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertInline',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:link',\n* \t\t\t\t\t'menuBar:insertFootnote',\n* \t\t\t\t\t'menuBar:bookmark',\n* \t\t\t\t\t'menuBar:comment',\n* \t\t\t\t\t'menuBar:insertMergeField',\n* \t\t\t\t\t'menuBar:emoji'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertMinorWidgets',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:mediaEmbed',\n* \t\t\t\t\t'menuBar:insertTemplate',\n* \t\t\t\t\t'menuBar:blockQuote',\n* \t\t\t\t\t'menuBar:codeBlock',\n* \t\t\t\t\t'menuBar:htmlEmbed'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertStructureWidgets',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:horizontalLine',\n* \t\t\t\t\t'menuBar:pageBreak',\n* \t\t\t\t\t'menuBar:tableOfContents'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'restrictedEditing',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:restrictedEditing'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'format',\n* \t\tlabel: 'Format',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'textAndFont',\n* \t\t\t\titems: [\n* \t\t\t\t\t{\n* \t\t\t\t\t\tmenuId: 'text',\n* \t\t\t\t\t\tlabel: 'Text',\n* \t\t\t\t\t\tgroups: [\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'basicStyles',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:bold',\n* \t\t\t\t\t\t\t\t\t'menuBar:italic',\n* \t\t\t\t\t\t\t\t\t'menuBar:underline',\n* \t\t\t\t\t\t\t\t\t'menuBar:strikethrough',\n* \t\t\t\t\t\t\t\t\t'menuBar:superscript',\n* \t\t\t\t\t\t\t\t\t'menuBar:subscript',\n* \t\t\t\t\t\t\t\t\t'menuBar:code'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t},\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'textPartLanguage',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:textPartLanguage'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t}\n* \t\t\t\t\t\t]\n* \t\t\t\t\t},\n* \t\t\t\t\t{\n* \t\t\t\t\t\tmenuId: 'font',\n* \t\t\t\t\t\tlabel: 'Font',\n* \t\t\t\t\t\tgroups: [\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'fontProperties',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:fontSize',\n* \t\t\t\t\t\t\t\t\t'menuBar:fontFamily'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t},\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'fontColors',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:fontColor',\n* \t\t\t\t\t\t\t\t\t'menuBar:fontBackgroundColor'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t},\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'highlight',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:highlight'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t}\n* \t\t\t\t\t\t]\n* \t\t\t\t\t},\n* \t\t\t\t\t'menuBar:heading'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'list',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:bulletedList',\n* \t\t\t\t\t'menuBar:numberedList',\n* \t\t\t\t\t'menuBar:multiLevelList',\n* \t\t\t\t\t'menuBar:todoList'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'indent',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:alignment',\n* \t\t\t\t\t'menuBar:lineHeight',\n* \t\t\t\t\t'menuBar:indent',\n* \t\t\t\t\t'menuBar:outdent'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'caseChange',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:caseChange'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'removeFormat',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:removeFormat'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'tools',\n* \t\tlabel: 'Tools',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'aiTools',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:aiAssistant',\n* \t\t\t\t\t'menuBar:aiCommands',\n* \t\t\t\t\t'menuBar:toggleAi',\n* \t\t\t\t\t'menuBar:aiQuickActions'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'tools',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:trackChanges',\n* \t\t\t\t\t'menuBar:commentsArchive'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'help',\n* \t\tlabel: 'Help',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'help',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:accessibilityHelp'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t}\n* ];\n* ```\n*\n* The menu bar can be customized using the `config.menuBar.removeItems` and `config.menuBar.addItems` properties.\n*/\nconst DefaultMenuBarItems = [\n\t{\n\t\tmenuId: \"file\",\n\t\tlabel: \"File\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"export\",\n\t\t\t\titems: [\"menuBar:exportPdf\", \"menuBar:exportWord\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"import\",\n\t\t\t\titems: [\"menuBar:importWord\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"revisionHistory\",\n\t\t\t\titems: [\"menuBar:revisionHistory\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"edit\",\n\t\tlabel: \"Edit\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"undo\",\n\t\t\t\titems: [\"menuBar:undo\", \"menuBar:redo\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"selectAll\",\n\t\t\t\titems: [\"menuBar:selectAll\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"findAndReplace\",\n\t\t\t\titems: [\"menuBar:findAndReplace\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"view\",\n\t\tlabel: \"View\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"sourceEditingEnhanced\",\n\t\t\t\titems: [\"menuBar:sourceEditingEnhanced\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"sourceEditing\",\n\t\t\t\titems: [\"menuBar:sourceEditing\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"showBlocks\",\n\t\t\t\titems: [\"menuBar:showBlocks\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"previewMergeFields\",\n\t\t\t\titems: [\"menuBar:previewMergeFields\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"fullscreen\",\n\t\t\t\titems: [\"menuBar:fullscreen\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"restrictedEditing\",\n\t\t\t\titems: [\"menuBar:restrictedEditing\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"insert\",\n\t\tlabel: \"Insert\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"insertMainWidgets\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:insertImage\",\n\t\t\t\t\t\"menuBar:ckbox\",\n\t\t\t\t\t\"menuBar:ckfinder\",\n\t\t\t\t\t\"menuBar:insertTable\",\n\t\t\t\t\t\"menuBar:insertTableLayout\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"insertInline\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:link\",\n\t\t\t\t\t\"menuBar:insertFootnote\",\n\t\t\t\t\t\"menuBar:bookmark\",\n\t\t\t\t\t\"menuBar:comment\",\n\t\t\t\t\t\"menuBar:insertMergeField\",\n\t\t\t\t\t\"menuBar:emoji\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"insertMinorWidgets\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:mediaEmbed\",\n\t\t\t\t\t\"menuBar:insertTemplate\",\n\t\t\t\t\t\"menuBar:specialCharacters\",\n\t\t\t\t\t\"menuBar:blockQuote\",\n\t\t\t\t\t\"menuBar:codeBlock\",\n\t\t\t\t\t\"menuBar:htmlEmbed\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"insertStructureWidgets\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:horizontalLine\",\n\t\t\t\t\t\"menuBar:pageBreak\",\n\t\t\t\t\t\"menuBar:tableOfContents\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"restrictedEditingException\",\n\t\t\t\titems: [\"menuBar:restrictedEditingException:inline\", \"menuBar:restrictedEditingException:block\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"format\",\n\t\tlabel: \"Format\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"textAndFont\",\n\t\t\t\titems: [\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: \"text\",\n\t\t\t\t\t\tlabel: \"Text\",\n\t\t\t\t\t\tgroups: [{\n\t\t\t\t\t\t\tgroupId: \"basicStyles\",\n\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\"menuBar:bold\",\n\t\t\t\t\t\t\t\t\"menuBar:italic\",\n\t\t\t\t\t\t\t\t\"menuBar:underline\",\n\t\t\t\t\t\t\t\t\"menuBar:strikethrough\",\n\t\t\t\t\t\t\t\t\"menuBar:superscript\",\n\t\t\t\t\t\t\t\t\"menuBar:subscript\",\n\t\t\t\t\t\t\t\t\"menuBar:code\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\tgroupId: \"textPartLanguage\",\n\t\t\t\t\t\t\titems: [\"menuBar:textPartLanguage\"]\n\t\t\t\t\t\t}]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: \"font\",\n\t\t\t\t\t\tlabel: \"Font\",\n\t\t\t\t\t\tgroups: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: \"fontProperties\",\n\t\t\t\t\t\t\t\titems: [\"menuBar:fontSize\", \"menuBar:fontFamily\"]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: \"fontColors\",\n\t\t\t\t\t\t\t\titems: [\"menuBar:fontColor\", \"menuBar:fontBackgroundColor\"]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: \"highlight\",\n\t\t\t\t\t\t\t\titems: [\"menuBar:highlight\"]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t\"menuBar:heading\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"list\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:bulletedList\",\n\t\t\t\t\t\"menuBar:numberedList\",\n\t\t\t\t\t\"menuBar:multiLevelList\",\n\t\t\t\t\t\"menuBar:todoList\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"indent\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:alignment\",\n\t\t\t\t\t\"menuBar:lineHeight\",\n\t\t\t\t\t\"menuBar:indent\",\n\t\t\t\t\t\"menuBar:outdent\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"caseChange\",\n\t\t\t\titems: [\"menuBar:caseChange\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"removeFormat\",\n\t\t\t\titems: [\"menuBar:removeFormat\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"tools\",\n\t\tlabel: \"Tools\",\n\t\tgroups: [{\n\t\t\tgroupId: \"aiTools\",\n\t\t\titems: [\n\t\t\t\t\"menuBar:aiAssistant\",\n\t\t\t\t\"menuBar:aiCommands\",\n\t\t\t\t\"menuBar:toggleAi\",\n\t\t\t\t\"menuBar:aiQuickActions\"\n\t\t\t]\n\t\t}, {\n\t\t\tgroupId: \"tools\",\n\t\t\titems: [\"menuBar:trackChanges\", \"menuBar:commentsArchive\"]\n\t\t}]\n\t},\n\t{\n\t\tmenuId: \"help\",\n\t\tlabel: \"Help\",\n\t\tgroups: [{\n\t\t\tgroupId: \"help\",\n\t\t\titems: [\"menuBar:accessibilityHelp\"]\n\t\t}]\n\t}\n];\n/**\n* Performs a cleanup and normalization of the menu bar configuration.\n*/\nfunction normalizeMenuBarConfig(config) {\n\tlet configObject;\n\tif (!(\"items\" in config) || !config.items) configObject = {\n\t\titems: cloneDeep(DefaultMenuBarItems),\n\t\taddItems: [],\n\t\tremoveItems: [],\n\t\tisVisible: true,\n\t\tisUsingDefaultConfig: true,\n\t\t...config\n\t};\n\telse configObject = {\n\t\titems: config.items,\n\t\tremoveItems: [],\n\t\taddItems: [],\n\t\tisVisible: true,\n\t\tisUsingDefaultConfig: false,\n\t\t...config\n\t};\n\treturn configObject;\n}\n/**\n* Processes a normalized menu bar config and returns a config clone with the following modifications:\n*\n* * Removed components that are not available in the component factory,\n* * Removed obsolete separators,\n* * Purged empty menus,\n* * Localized top-level menu labels.\n* @internal\n*/\nfunction processMenuBarConfig({ normalizedConfig, locale, componentFactory, extraItems }) {\n\tconst configClone = cloneDeep(normalizedConfig);\n\thandleAdditions(normalizedConfig, configClone, extraItems);\n\thandleRemovals(normalizedConfig, configClone);\n\thandleAdditions(normalizedConfig, configClone, configClone.addItems);\n\tpurgeUnavailableComponents(normalizedConfig, configClone, componentFactory);\n\tpurgeEmptyMenus(normalizedConfig, configClone);\n\tlocalizeMenuLabels(configClone, locale);\n\treturn configClone;\n}\n/**\n* Removes items from the menu bar config based on user `removeItems` configuration. Users can remove\n* individual items, groups, or entire menus. For each removed item, a warning is logged if the item\n* was not found in the configuration.\n*/\nfunction handleRemovals(originalConfig, config) {\n\tconst itemsToBeRemoved = config.removeItems;\n\tconst successfullyRemovedItems = [];\n\tconfig.items = config.items.filter(({ menuId }) => {\n\t\tif (itemsToBeRemoved.includes(menuId)) {\n\t\t\tsuccessfullyRemovedItems.push(menuId);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tmenuDefinition.groups = menuDefinition.groups.filter(({ groupId }) => {\n\t\t\tif (itemsToBeRemoved.includes(groupId)) {\n\t\t\t\tsuccessfullyRemovedItems.push(groupId);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tfor (const groupDefinition of menuDefinition.groups) groupDefinition.items = groupDefinition.items.filter((item) => {\n\t\t\tconst itemId = getIdFromGroupItem(item);\n\t\t\tif (itemsToBeRemoved.includes(itemId)) {\n\t\t\t\tsuccessfullyRemovedItems.push(itemId);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t});\n\tfor (const itemName of itemsToBeRemoved) if (!successfullyRemovedItems.includes(itemName))\n /**\n\t* There was a problem processing the configuration of the menu bar. The item with the given\n\t* name does could not be removed from the menu bar configuration.\n\t*\n\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t* to provide a menu bar item has not been loaded or there is a typo in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t*\n\t* @error menu-bar-item-could-not-be-removed\n\t* @param menuBarConfig The full configuration of the menu bar.\n\t* @param itemName The name of the item that was not removed from the menu bar.\n\t*/\n\tlogWarning(\"menu-bar-item-could-not-be-removed\", {\n\t\tmenuBarConfig: originalConfig,\n\t\titemName\n\t});\n}\n/**\n* Adds provided items to config. It allows for adding menus, groups, and items at arbitrary\n* positions in the menu bar. If the position does not exist, a warning is logged.\n*/\nfunction handleAdditions(originalConfig, config, items) {\n\tconst successFullyAddedItems = [];\n\tif (items.length == 0) return;\n\tfor (const itemToAdd of items) {\n\t\tconst relation = getRelationFromPosition(itemToAdd.position);\n\t\tconst relativeId = getRelativeIdFromPosition(itemToAdd.position);\n\t\tif (isMenuBarMenuAddition(itemToAdd)) {\n\t\t\tif (!relativeId) {\n\t\t\t\tif (relation === \"start\") {\n\t\t\t\t\tconfig.items.unshift(itemToAdd.menu);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t} else if (relation === \"end\") {\n\t\t\t\t\tconfig.items.push(itemToAdd.menu);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst topLevelMenuDefinitionIndex = config.items.findIndex((menuDefinition) => menuDefinition.menuId === relativeId);\n\t\t\t\tif (topLevelMenuDefinitionIndex != -1) {\n\t\t\t\t\tif (relation === \"before\") {\n\t\t\t\t\t\tconfig.items.splice(topLevelMenuDefinitionIndex, 0, itemToAdd.menu);\n\t\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t\t} else if (relation === \"after\") {\n\t\t\t\t\t\tconfig.items.splice(topLevelMenuDefinitionIndex + 1, 0, itemToAdd.menu);\n\t\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t\t}\n\t\t\t\t} else if (addMenuOrItemToGroup(config, itemToAdd.menu, relativeId, relation)) successFullyAddedItems.push(itemToAdd);\n\t\t\t}\n\t\t} else if (isMenuBarMenuGroupAddition(itemToAdd)) walkConfigMenus(config.items, (menuDefinition) => {\n\t\t\tif (menuDefinition.menuId === relativeId) {\n\t\t\t\tif (relation === \"start\") {\n\t\t\t\t\tmenuDefinition.groups.unshift(itemToAdd.group);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t} else if (relation === \"end\") {\n\t\t\t\t\tmenuDefinition.groups.push(itemToAdd.group);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst relativeGroupIndex = menuDefinition.groups.findIndex((group) => group.groupId === relativeId);\n\t\t\t\tif (relativeGroupIndex !== -1) {\n\t\t\t\t\tif (relation === \"before\") {\n\t\t\t\t\t\tmenuDefinition.groups.splice(relativeGroupIndex, 0, itemToAdd.group);\n\t\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t\t} else if (relation === \"after\") {\n\t\t\t\t\t\tmenuDefinition.groups.splice(relativeGroupIndex + 1, 0, itemToAdd.group);\n\t\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\telse if (addMenuOrItemToGroup(config, itemToAdd.item, relativeId, relation)) successFullyAddedItems.push(itemToAdd);\n\t}\n\tfor (const addedItemConfig of items) if (!successFullyAddedItems.includes(addedItemConfig))\n /**\n\t* There was a problem processing the configuration of the menu bar. The configured item could not be added\n\t* because the position it was supposed to be added to does not exist.\n\t*\n\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t* to provide a menu bar item has not been loaded or there is a typo in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t*\n\t* @error menu-bar-item-could-not-be-removed\n\t* @param {object} menuBarConfig The full configuration of the menu bar.\n\t* @param {object} addedItemConfig The name of the item that was not removed from the menu bar.\n\t*/\n\tlogWarning(\"menu-bar-item-could-not-be-added\", {\n\t\tmenuBarConfig: originalConfig,\n\t\taddedItemConfig\n\t});\n}\n/**\n* Handles adding a sub-menu or an item into a group. The logic is the same for both cases.\n*/\nfunction addMenuOrItemToGroup(config, itemOrMenuToAdd, relativeId, relation) {\n\tlet wasAdded = false;\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tfor (const { groupId, items: groupItems } of menuDefinition.groups) {\n\t\t\tif (wasAdded) return;\n\t\t\tif (groupId === relativeId) {\n\t\t\t\tif (relation === \"start\") {\n\t\t\t\t\tgroupItems.unshift(itemOrMenuToAdd);\n\t\t\t\t\twasAdded = true;\n\t\t\t\t} else if (relation === \"end\") {\n\t\t\t\t\tgroupItems.push(itemOrMenuToAdd);\n\t\t\t\t\twasAdded = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst relativeItemIndex = groupItems.findIndex((groupItem) => {\n\t\t\t\t\treturn getIdFromGroupItem(groupItem) === relativeId;\n\t\t\t\t});\n\t\t\t\tif (relativeItemIndex !== -1) {\n\t\t\t\t\tif (relation === \"before\") {\n\t\t\t\t\t\tgroupItems.splice(relativeItemIndex, 0, itemOrMenuToAdd);\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t} else if (relation === \"after\") {\n\t\t\t\t\t\tgroupItems.splice(relativeItemIndex + 1, 0, itemOrMenuToAdd);\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn wasAdded;\n}\n/**\n* Removes components from the menu bar configuration that are not available in the factory and would\n* not be instantiated. Warns about missing components if the menu bar configuration was specified by the user.\n*/\nfunction purgeUnavailableComponents(originalConfig, config, componentFactory) {\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tfor (const groupDefinition of menuDefinition.groups) groupDefinition.items = groupDefinition.items.filter((item) => {\n\t\t\tconst isItemUnavailable = typeof item === \"string\" && !componentFactory.has(item);\n\t\t\tif (isItemUnavailable && !config.isUsingDefaultConfig)\n /**\n\t\t\t* There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t* name does not exist so it was omitted when rendering the menu bar.\n\t\t\t*\n\t\t\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t* to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t*\n\t\t\t* Make sure the plugin responsible for this menu bar item is loaded and the menu bar configuration\n\t\t\t* is correct, e.g. {@link module:basic-styles/bold/boldui~BoldUI} is loaded for the `'menuBar:bold'`\n\t\t\t* menu bar item.\n\t\t\t*\n\t\t\t* @error menu-bar-item-unavailable\n\t\t\t* @param {object} menuBarConfig The full configuration of the menu bar.\n\t\t\t* @param {object} parentMenuConfig The config of the menu the unavailable component was defined in.\n\t\t\t* @param {string} componentName The name of the unavailable component.\n\t\t\t*/\n\t\t\tlogWarning(\"menu-bar-item-unavailable\", {\n\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\tparentMenuConfig: cloneDeep(menuDefinition),\n\t\t\t\tcomponentName: item\n\t\t\t});\n\t\t\treturn !isItemUnavailable;\n\t\t});\n\t});\n}\n/**\n* Removes empty menus from the menu bar configuration to improve the visual UX. Such menus can occur\n* when some plugins responsible for providing menu bar items have not been loaded and some part of\n* the configuration populated menus using these components exclusively.\n*/\nfunction purgeEmptyMenus(originalConfig, config) {\n\tconst isUsingDefaultConfig = config.isUsingDefaultConfig;\n\tlet wasSubMenuPurged = false;\n\tconfig.items = config.items.filter((menuDefinition) => {\n\t\tif (!menuDefinition.groups.length) {\n\t\t\twarnAboutEmptyMenu(originalConfig, menuDefinition, isUsingDefaultConfig);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\tif (!config.items.length) {\n\t\twarnAboutEmptyMenu(originalConfig, originalConfig, isUsingDefaultConfig);\n\t\treturn;\n\t}\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tmenuDefinition.groups = menuDefinition.groups.filter((groupDefinition) => {\n\t\t\tif (!groupDefinition.items.length) {\n\t\t\t\twasSubMenuPurged = true;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tfor (const groupDefinition of menuDefinition.groups) groupDefinition.items = groupDefinition.items.filter((item) => {\n\t\t\tif (isMenuDefinition(item) && !item.groups.length) {\n\t\t\t\twarnAboutEmptyMenu(originalConfig, item, isUsingDefaultConfig);\n\t\t\t\twasSubMenuPurged = true;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t});\n\tif (wasSubMenuPurged) purgeEmptyMenus(originalConfig, config);\n}\nfunction warnAboutEmptyMenu(originalConfig, emptyMenuConfig, isUsingDefaultConfig) {\n\tif (isUsingDefaultConfig) return;\n\t/**\n\t* There was a problem processing the configuration of the menu bar. One of the menus\n\t* is empty so it was omitted when rendering the menu bar.\n\t*\n\t* This warning usually shows up when some {@link module:core/plugin~Plugin plugins} responsible for\n\t* providing menu bar items have not been loaded and the\n\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration} was not updated.\n\t*\n\t* Make sure all necessary editor plugins are loaded and/or update the menu bar configuration\n\t* to account for the missing menu items.\n\t*\n\t* @error menu-bar-menu-empty\n\t* @param {object} menuBarConfig The full configuration of the menu bar.\n\t* @param {object} emptyMenuConfig The definition of the menu that has no child items.\n\t*/\n\tlogWarning(\"menu-bar-menu-empty\", {\n\t\tmenuBarConfig: originalConfig,\n\t\temptyMenuConfig\n\t});\n}\n/**\n* Localizes the user-config using pre-defined localized category labels.\n*/\nfunction localizeMenuLabels(config, locale) {\n\tconst t = locale.t;\n\tconst localizedCategoryLabels = {\n\t\t\"File\": t({\n\t\t\tstring: \"File\",\n\t\t\tid: \"MENU_BAR_MENU_FILE\"\n\t\t}),\n\t\t\"Edit\": t({\n\t\t\tstring: \"Edit\",\n\t\t\tid: \"MENU_BAR_MENU_EDIT\"\n\t\t}),\n\t\t\"View\": t({\n\t\t\tstring: \"View\",\n\t\t\tid: \"MENU_BAR_MENU_VIEW\"\n\t\t}),\n\t\t\"Insert\": t({\n\t\t\tstring: \"Insert\",\n\t\t\tid: \"MENU_BAR_MENU_INSERT\"\n\t\t}),\n\t\t\"Format\": t({\n\t\t\tstring: \"Format\",\n\t\t\tid: \"MENU_BAR_MENU_FORMAT\"\n\t\t}),\n\t\t\"Tools\": t({\n\t\t\tstring: \"Tools\",\n\t\t\tid: \"MENU_BAR_MENU_TOOLS\"\n\t\t}),\n\t\t\"Help\": t({\n\t\t\tstring: \"Help\",\n\t\t\tid: \"MENU_BAR_MENU_HELP\"\n\t\t}),\n\t\t\"Text\": t({\n\t\t\tstring: \"Text\",\n\t\t\tid: \"MENU_BAR_MENU_TEXT\"\n\t\t}),\n\t\t\"Font\": t({\n\t\t\tstring: \"Font\",\n\t\t\tid: \"MENU_BAR_MENU_FONT\"\n\t\t})\n\t};\n\twalkConfigMenus(config.items, (definition) => {\n\t\tif (definition.label in localizedCategoryLabels) definition.label = localizedCategoryLabels[definition.label];\n\t});\n}\n/**\n* Recursively visits all menu definitions in the config and calls the callback for each of them.\n*/\nfunction walkConfigMenus(definition, callback) {\n\t/* v8 ignore else -- @preserve */\n\tif (Array.isArray(definition)) for (const topLevelMenuDefinition of definition) walk(topLevelMenuDefinition);\n\tfunction walk(menuDefinition) {\n\t\tcallback(menuDefinition);\n\t\tfor (const groupDefinition of menuDefinition.groups) for (const groupItem of groupDefinition.items) if (isMenuDefinition(groupItem)) walk(groupItem);\n\t}\n}\nfunction isMenuBarMenuAddition(definition) {\n\treturn typeof definition === \"object\" && \"menu\" in definition;\n}\nfunction isMenuBarMenuGroupAddition(definition) {\n\treturn typeof definition === \"object\" && \"group\" in definition;\n}\nfunction getRelationFromPosition(position) {\n\tif (position.startsWith(\"start\")) return \"start\";\n\telse if (position.startsWith(\"end\")) return \"end\";\n\telse if (position.startsWith(\"after\")) return \"after\";\n\telse return \"before\";\n}\nfunction getRelativeIdFromPosition(position) {\n\tconst match = position.match(/^[^:]+:(.+)/);\n\tif (match) return match[1];\n\treturn null;\n}\nfunction getIdFromGroupItem(item) {\n\treturn typeof item === \"string\" ? item : item.menuId;\n}\nfunction isMenuDefinition(definition) {\n\treturn typeof definition === \"object\" && \"menuId\" in definition;\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 ui/editorui/editorui\n*/\nconst EditorUIBase = /* #__PURE__ */ ObservableMixin();\n/**\n* A class providing the minimal interface that is required to successfully bootstrap any editor UI.\n*/\nvar EditorUI = class extends EditorUIBase {\n\t/**\n\t* The editor that the UI belongs to.\n\t*/\n\teditor;\n\t/**\n\t* An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins\n\t* to register factories of specific UI components.\n\t*/\n\tcomponentFactory;\n\t/**\n\t* Stores the information about the editor UI focus and propagates it so various plugins and components\n\t* are unified as a focus group.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Manages the tooltips displayed on mouseover and focus across the UI.\n\t*/\n\ttooltipManager;\n\t/**\n\t* A helper that enables the \"powered by\" feature in the editor and renders a link to the project's webpage.\n\t*/\n\tpoweredBy;\n\t/**\n\t* A helper that enables the \"evaluation badge\" feature in the editor.\n\t*/\n\tevaluationBadge;\n\t/**\n\t* A helper that manages the content of an `aria-live` regions used by editor features to announce status changes\n\t* to screen readers.\n\t*/\n\tariaLiveAnnouncer;\n\t/**\n\t* Indicates the UI is ready. Set `true` after {@link #event:ready} event is fired.\n\t*\n\t* @readonly\n\t* @default false\n\t*/\n\tisReady = false;\n\t/**\n\t* Stores all editable elements used by the editor instance.\n\t*/\n\t_editableElementsMap = /* @__PURE__ */ new Map();\n\t/**\n\t* All available & focusable toolbars.\n\t*/\n\t_focusableToolbarDefinitions = [];\n\t/**\n\t* All additional menu bar items, groups or menus that have their default location defined.\n\t*/\n\t_extraMenuBarElements = [];\n\t/**\n\t* The last focused element to which focus should return on `Esc` press.\n\t*/\n\t_lastFocusedForeignElement = null;\n\t/**\n\t* The DOM emitter instance used for visual viewport watching.\n\t*/\n\t_domEmitter;\n\t/**\n\t* Creates an instance of the editor UI class.\n\t*\n\t* @param editor The editor instance.\n\t*/\n\tconstructor(editor) {\n\t\tsuper();\n\t\tconst editingView = editor.editing.view;\n\t\tthis.editor = editor;\n\t\tthis.componentFactory = new ComponentFactory(editor);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.tooltipManager = new TooltipManager(editor);\n\t\tthis.poweredBy = new PoweredBy(editor);\n\t\tthis.evaluationBadge = new EvaluationBadge(editor);\n\t\tthis.ariaLiveAnnouncer = new AriaLiveAnnouncer(editor);\n\t\tthis._initViewportOffset(this._readViewportOffsetFromConfig());\n\t\tthis.once(\"ready\", () => {\n\t\t\tthis._bindBodyCollectionWithFocusTracker();\n\t\t\tthis.isReady = true;\n\t\t});\n\t\tthis.listenTo(editingView.document, \"layoutChanged\", this.update.bind(this));\n\t\tthis.listenTo(editingView, \"scrollToTheSelection\", this._handleScrollToTheSelection.bind(this));\n\t\tthis._initFocusTracking();\n\t\tthis._initVisualViewportSupport();\n\t}\n\t/**\n\t* The main (outermost) DOM element of the editor UI.\n\t*\n\t* For example, in {@link module:editor-classic/classiceditor~ClassicEditor} it is a `<div>` which\n\t* wraps the editable element and the toolbar. In {@link module:editor-inline/inlineeditor~InlineEditor}\n\t* it is the editable element itself (as there is no other wrapper). However, in\n\t* {@link module:editor-decoupled/decouplededitor~DecoupledEditor} it is set to `null` because this editor does not\n\t* come with a single \"main\" HTML element (its editable element and toolbar are separate).\n\t*\n\t* This property can be understood as a shorthand for retrieving the element that a specific editor integration\n\t* considers to be its main DOM element.\n\t*/\n\tget element() {\n\t\treturn null;\n\t}\n\t/**\n\t* Fires the {@link module:ui/editorui/editorui~EditorUI#event:update `update`} event.\n\t*\n\t* This method should be called when the editor UI (e.g. positions of its balloons) needs to be updated due to\n\t* some environmental change which CKEditor 5 is not aware of (e.g. resize of a container in which it is used).\n\t*/\n\tupdate() {\n\t\tthis.fire(\"update\");\n\t}\n\t/**\n\t* Destroys the UI.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t\tthis.focusTracker.destroy();\n\t\tthis.tooltipManager.destroy(this.editor);\n\t\tthis.poweredBy.destroy();\n\t\tthis.evaluationBadge.destroy();\n\t\tfor (const domElement of this._editableElementsMap.values()) {\n\t\t\tdomElement.ckeditorInstance = null;\n\t\t\tthis.editor.keystrokes.stopListening(domElement);\n\t\t}\n\t\tthis._editableElementsMap = /* @__PURE__ */ new Map();\n\t\tthis._focusableToolbarDefinitions = [];\n\t\tif (this._domEmitter) this._domEmitter.stopListening();\n\t}\n\t/**\n\t* Stores the native DOM editable element used by the editor under a unique name.\n\t*\n\t* Also, registers the element in the editor to maintain the accessibility of the UI. When the user is editing text in a focusable\n\t* editable area, they can use the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke to navigate over editor toolbars. See {@link #addToolbar}.\n\t*\n\t* @param rootName The unique name of the editable element.\n\t* @param domElement The native DOM editable element.\n\t*/\n\tsetEditableElement(rootName, domElement) {\n\t\tthis._editableElementsMap.set(rootName, domElement);\n\t\tif (!domElement.ckeditorInstance) domElement.ckeditorInstance = this.editor;\n\t\tthis.focusTracker.add(domElement);\n\t\tconst setUpKeystrokeHandler = () => {\n\t\t\tif (this.editor.editing.view.getDomRoot(rootName)) return;\n\t\t\tthis.editor.keystrokes.listenTo(domElement);\n\t\t};\n\t\tif (this.isReady) setUpKeystrokeHandler();\n\t\telse this.once(\"ready\", setUpKeystrokeHandler);\n\t}\n\t/**\n\t* Removes the editable from the editor UI. Removes all handlers added by {@link #setEditableElement}.\n\t*\n\t* @param rootName The name of the editable element to remove.\n\t*/\n\tremoveEditableElement(rootName) {\n\t\tconst domElement = this._editableElementsMap.get(rootName);\n\t\tif (!domElement) return;\n\t\tthis._editableElementsMap.delete(rootName);\n\t\tthis.editor.keystrokes.stopListening(domElement);\n\t\tthis.focusTracker.remove(domElement);\n\t\tdomElement.ckeditorInstance = null;\n\t}\n\t/**\n\t* Returns the editable editor element with the given name or null if editable does not exist.\n\t*\n\t* @param rootName The editable name.\n\t*/\n\tgetEditableElement(rootName = \"main\") {\n\t\treturn this._editableElementsMap.get(rootName);\n\t}\n\t/**\n\t* Returns array of names of all editor editable elements.\n\t*/\n\tgetEditableElementsNames() {\n\t\treturn this._editableElementsMap.keys();\n\t}\n\t/**\n\t* Adds a toolbar to the editor UI. Used primarily to maintain the accessibility of the UI.\n\t*\n\t* Focusable toolbars can be accessed (focused) by users by pressing the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke.\n\t* Successive keystroke presses navigate over available toolbars.\n\t*\n\t* @param toolbarView A instance of the toolbar to be registered.\n\t*/\n\taddToolbar(toolbarView, options = {}) {\n\t\tif (toolbarView.isRendered) {\n\t\t\tthis.focusTracker.add(toolbarView);\n\t\t\tthis.editor.keystrokes.listenTo(toolbarView.element);\n\t\t} else toolbarView.once(\"render\", () => {\n\t\t\tthis.focusTracker.add(toolbarView);\n\t\t\tthis.editor.keystrokes.listenTo(toolbarView.element);\n\t\t});\n\t\tthis._focusableToolbarDefinitions.push({\n\t\t\ttoolbarView,\n\t\t\toptions\n\t\t});\n\t}\n\t/**\n\t* Registers an extra menu bar element, which could be a single item, a group of items, or a menu containing groups.\n\t*\n\t* ```ts\n\t* // Register a new menu bar item.\n\t* editor.ui.extendMenuBar( {\n\t*   item: 'menuBar:customFunctionButton',\n\t*   position: 'after:menuBar:bold'\n\t* } );\n\t*\n\t* // Register a new menu bar group.\n\t* editor.ui.extendMenuBar( {\n\t*   group: {\n\t*     groupId: 'customGroup',\n\t*     items: [\n\t*       'menuBar:customFunctionButton'\n\t*     ]\n\t*   },\n\t*   position: 'start:help'\n\t* } );\n\t*\n\t* // Register a new menu bar menu.\n\t* editor.ui.extendMenuBar( {\n\t*   menu: {\n\t*     menuId: 'customMenu',\n\t*     label: 'customMenu',\n\t*     groups: [\n\t*       {\n\t*         groupId: 'customGroup',\n\t*         items: [\n\t*           'menuBar:customFunctionButton'\n\t*         ]\n\t*       }\n\t*     ]\n\t*   },\n\t*   position: 'after:help'\n\t* } );\n\t* ```\n\t*/\n\textendMenuBar(config) {\n\t\tthis._extraMenuBarElements.push(config);\n\t}\n\t/**\n\t* Initializes menu bar.\n\t*/\n\tinitMenuBar(menuBarView) {\n\t\tconst menuBarViewElement = menuBarView.element;\n\t\tthis.focusTracker.add(menuBarViewElement);\n\t\tthis.editor.keystrokes.listenTo(menuBarViewElement);\n\t\tconst normalizedMenuBarConfig = normalizeMenuBarConfig(this.editor.config.get(\"menuBar\") || {});\n\t\tmenuBarView.fillFromConfig(normalizedMenuBarConfig, this.componentFactory, this._extraMenuBarElements);\n\t\tthis.editor.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tif (!menuBarViewElement.contains(this.editor.ui.focusTracker.focusedElement)) return;\n\t\t\tif (this._lastFocusedForeignElement) {\n\t\t\t\tthis._lastFocusedForeignElement.focus();\n\t\t\t\tthis._lastFocusedForeignElement = null;\n\t\t\t} else this.editor.editing.view.focus();\n\t\t\tcancel();\n\t\t});\n\t\tthis.editor.keystrokes.set(\"Alt+F9\", (data, cancel) => {\n\t\t\tif (menuBarViewElement.contains(this.editor.ui.focusTracker.focusedElement)) return;\n\t\t\tthis._saveLastFocusedForeignElement();\n\t\t\tmenuBarView.isFocusBorderEnabled = true;\n\t\t\tmenuBarView.focus();\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Returns viewport offsets object:\n\t*\n\t* ```js\n\t* {\n\t* \ttop: Number,\n\t* \tright: Number,\n\t* \tbottom: Number,\n\t* \tleft: Number\n\t* }\n\t* ```\n\t*\n\t* Only top property is currently supported.\n\t*/\n\t_readViewportOffsetFromConfig() {\n\t\tconst editor = this.editor;\n\t\tconst viewportOffsetConfig = editor.config.get(\"ui.viewportOffset\");\n\t\tif (viewportOffsetConfig) return viewportOffsetConfig;\n\t\tconst legacyOffsetConfig = editor.config.get(\"toolbar.viewportTopOffset\");\n\t\tif (legacyOffsetConfig) {\n\t\t\t/**\n\t\t\t* The {@link module:core/editor/editorconfig~EditorConfig#toolbar `EditorConfig#toolbar.viewportTopOffset`}\n\t\t\t* property has been deprecated and will be removed in the near future. Please use\n\t\t\t* {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset`} instead.\n\t\t\t*\n\t\t\t* @error editor-ui-deprecated-viewport-offset-config\n\t\t\t*/\n\t\t\tconsole.warn(\"editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead.\");\n\t\t\treturn { top: legacyOffsetConfig };\n\t\t}\n\t\treturn { top: 0 };\n\t}\n\t/**\n\t* Starts listening for <kbd>Alt</kbd> + <kbd>F10</kbd> and <kbd>Esc</kbd> keystrokes in the context of focusable\n\t* {@link #setEditableElement editable elements} and {@link #addToolbar toolbars}\n\t* to allow users navigate across the UI.\n\t*/\n\t_initFocusTracking() {\n\t\tconst editor = this.editor;\n\t\tlet candidateDefinitions;\n\t\teditor.keystrokes.set(\"Alt+F10\", (data, cancel) => {\n\t\t\tthis._saveLastFocusedForeignElement();\n\t\t\tconst currentFocusedToolbarDefinition = this._getCurrentFocusedToolbarDefinition();\n\t\t\tif (!currentFocusedToolbarDefinition || !candidateDefinitions) candidateDefinitions = this._getFocusableCandidateToolbarDefinitions();\n\t\t\tfor (let i = 0; i < candidateDefinitions.length; i++) {\n\t\t\t\tconst candidateDefinition = candidateDefinitions.shift();\n\t\t\t\tcandidateDefinitions.push(candidateDefinition);\n\t\t\t\tif (candidateDefinition !== currentFocusedToolbarDefinition && this._focusFocusableCandidateToolbar(candidateDefinition)) {\n\t\t\t\t\tif (currentFocusedToolbarDefinition && currentFocusedToolbarDefinition.options.afterBlur) currentFocusedToolbarDefinition.options.afterBlur();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcancel();\n\t\t});\n\t\teditor.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tconst focusedToolbarDef = this._getCurrentFocusedToolbarDefinition();\n\t\t\tif (!focusedToolbarDef) return;\n\t\t\tif (this._lastFocusedForeignElement) {\n\t\t\t\tthis._lastFocusedForeignElement.focus();\n\t\t\t\tthis._lastFocusedForeignElement = null;\n\t\t\t} else editor.editing.view.focus();\n\t\t\tif (focusedToolbarDef.options.afterBlur) focusedToolbarDef.options.afterBlur();\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Saves last focused element that doen not belong to editing view to restore focus on `Esc`.\n\t*/\n\t_saveLastFocusedForeignElement() {\n\t\tconst focusedElement = this.focusTracker.focusedElement;\n\t\tif (Array.from(this._editableElementsMap.values()).includes(focusedElement) && !Array.from(this.editor.editing.view.domRoots.values()).includes(focusedElement)) this._lastFocusedForeignElement = focusedElement;\n\t}\n\t/**\n\t* Returns definitions of toolbars that could potentially be focused, sorted by their importance for the user.\n\t*\n\t* Focusable toolbars candidates are either:\n\t* * already visible,\n\t* * have `beforeFocus()` set in their {@link module:ui/editorui/editorui~FocusableToolbarDefinition definition} that suggests that\n\t* they might show up when called. Keep in mind that determining whether a toolbar will show up (and become focusable) is impossible\n\t* at this stage because it depends on its implementation, that in turn depends on the editing context (selection).\n\t*\n\t* **Note**: Contextual toolbars take precedence over regular toolbars.\n\t*/\n\t_getFocusableCandidateToolbarDefinitions() {\n\t\tconst definitions = [];\n\t\tfor (const toolbarDef of this._focusableToolbarDefinitions) {\n\t\t\tconst { toolbarView, options } = toolbarDef;\n\t\t\tif (isVisible(toolbarView.element) || options.beforeFocus) definitions.push(toolbarDef);\n\t\t}\n\t\tdefinitions.sort((defA, defB) => getToolbarDefinitionWeight(defA) - getToolbarDefinitionWeight(defB));\n\t\treturn definitions;\n\t}\n\t/**\n\t* Returns a definition of the toolbar that is currently visible and focused (one of its children has focus).\n\t*\n\t* `null` is returned when no toolbar is currently focused.\n\t*/\n\t_getCurrentFocusedToolbarDefinition() {\n\t\tfor (const definition of this._focusableToolbarDefinitions) if (definition.toolbarView.element && definition.toolbarView.element.contains(this.focusTracker.focusedElement)) return definition;\n\t\treturn null;\n\t}\n\t/**\n\t* Focuses a focusable toolbar candidate using its definition.\n\t*\n\t* @param candidateToolbarDefinition A definition of the toolbar to focus.\n\t* @returns `true` when the toolbar candidate was focused. `false` otherwise.\n\t*/\n\t_focusFocusableCandidateToolbar(candidateToolbarDefinition) {\n\t\tconst { toolbarView, options: { beforeFocus } } = candidateToolbarDefinition;\n\t\tif (beforeFocus) beforeFocus();\n\t\tif (!isVisible(toolbarView.element)) return false;\n\t\ttoolbarView.focus();\n\t\treturn true;\n\t}\n\t/**\n\t* Provides an integration between {@link #viewportOffset} and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t* It allows the UI-agnostic engine method to consider user-configured viewport offsets specific for the integration.\n\t*\n\t* @param evt The `scrollToTheSelection` event info.\n\t* @param data The payload carried by the `scrollToTheSelection` event.\n\t*/\n\t_handleScrollToTheSelection(evt, data) {\n\t\tconst configuredViewportOffset = {\n\t\t\ttop: 0,\n\t\t\tbottom: 0,\n\t\t\tleft: 0,\n\t\t\tright: 0,\n\t\t\t...this.viewportOffset\n\t\t};\n\t\tdata.viewportOffset.top += configuredViewportOffset.top;\n\t\tdata.viewportOffset.bottom += configuredViewportOffset.bottom;\n\t\tdata.viewportOffset.left += configuredViewportOffset.left;\n\t\tdata.viewportOffset.right += configuredViewportOffset.right;\n\t}\n\t/**\n\t* Ensures that the focus tracker is aware of all views' DOM elements in the body collection.\n\t*/\n\t_bindBodyCollectionWithFocusTracker() {\n\t\tconst body = this.view.body;\n\t\tfor (const view of body) this.focusTracker.add(view.element);\n\t\tbody.on(\"add\", (evt, view) => {\n\t\t\tthis.focusTracker.add(view.element);\n\t\t});\n\t\tbody.on(\"remove\", (evt, view) => {\n\t\t\tthis.focusTracker.remove(view.element);\n\t\t});\n\t}\n\t/**\n\t* Set initial viewport offset and setup visualTop augmentation.\n\t*/\n\t_initViewportOffset(viewportOffsetConfig) {\n\t\tthis.on(\"set:viewportOffset\", (evt, name, value) => {\n\t\t\tconst visualTop = this._getVisualViewportTopOffset(value);\n\t\t\tif (value.visualTop !== visualTop) evt.return = {\n\t\t\t\t...value,\n\t\t\t\tvisualTop\n\t\t\t};\n\t\t});\n\t\tthis.set(\"viewportOffset\", viewportOffsetConfig);\n\t}\n\t/**\n\t* Listen to visual viewport changes and update the viewportOffset with the visualTop property\n\t* according to the visible part of it (visual viewport).\n\t*/\n\t_initVisualViewportSupport() {\n\t\tif (!global.window.visualViewport) return;\n\t\tconst updateViewport = () => {\n\t\t\tconst visualTop = this._getVisualViewportTopOffset(this.viewportOffset);\n\t\t\tif (this.viewportOffset.visualTop !== visualTop) this.viewportOffset = {\n\t\t\t\t...this.viewportOffset,\n\t\t\t\tvisualTop\n\t\t\t};\n\t\t};\n\t\tthis._domEmitter = new (DomEmitterMixin())();\n\t\tthis._domEmitter.listenTo(global.window.visualViewport, \"scroll\", updateViewport);\n\t\tthis._domEmitter.listenTo(global.window.visualViewport, \"resize\", updateViewport);\n\t}\n\t/**\n\t* Calculate the viewport top offset according to the visible part of it (visual viewport).\n\t*/\n\t_getVisualViewportTopOffset(viewportOffset) {\n\t\tconst visualViewportOffsetTop = getVisualViewportOffset().top;\n\t\tconst viewportTopOffset = viewportOffset.top || 0;\n\t\treturn visualViewportOffsetTop > viewportTopOffset ? 0 : viewportTopOffset - visualViewportOffsetTop;\n\t}\n};\n/**\n* Returns a number (weight) for a toolbar definition. Visible toolbars have a higher priority and so do\n* contextual toolbars (displayed in the context of a content, for instance, an image toolbar).\n*\n* A standard invisible toolbar is the heaviest. A visible contextual toolbar is the lightest.\n*\n* @param toolbarDef A toolbar definition to be weighted.\n*/\nfunction getToolbarDefinitionWeight(toolbarDef) {\n\tconst { toolbarView, options } = toolbarDef;\n\tlet weight = 10;\n\tif (isVisible(toolbarView.element)) weight--;\n\tif (options.isContextual) weight -= 2;\n\treturn weight;\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 ui/editorui/editoruiview\n*/\n/**\n* The editor UI view class. Base class for the editor main views.\n*/\nvar EditorUIView = class extends View {\n\t/**\n\t* Collection of the child views, detached from the DOM\n\t* structure of the editor, like panels, icons etc.\n\t*/\n\tbody;\n\t/**\n\t* Menu bar view instance. Initialized by default in:\n\t*\n\t* * balloon editor;\n\t* * decoupled editor;\n\t* * multiroot editor.\n\t*/\n\tmenuBarView;\n\t/**\n\t* Toolbar view instance. Initialized by default in:\n\t*\n\t* * classic editor;\n\t* * decoupled editor;\n\t* * inline editor;\n\t* * multiroot editor.\n\t*/\n\ttoolbar;\n\t/**\n\t* Creates an instance of the editor UI view class.\n\t*\n\t* @param locale The locale instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.body = new BodyCollection(locale);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.body.attachToDom();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis.body.detachFromDom();\n\t\treturn super.destroy();\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 ui/editorui/boxed/boxededitoruiview\n*/\n/**\n* The boxed editor UI view class. This class represents an editor interface\n* consisting of a toolbar and an editable area, enclosed within a box.\n*/\nvar BoxedEditorUIView = class extends EditorUIView {\n\t/**\n\t* Collection of the child views located in the top (`.ck-editor__top`)\n\t* area of the UI.\n\t*/\n\ttop;\n\t/**\n\t* Collection of the child views located in the main (`.ck-editor__main`)\n\t* area of the UI.\n\t*/\n\tmain;\n\t/**\n\t* Voice label of the UI.\n\t*/\n\t_voiceLabelView;\n\t/**\n\t* Creates an instance of the boxed editor UI view class.\n\t*\n\t* @param locale The locale instance..\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.top = this.createCollection();\n\t\tthis.main = this.createCollection();\n\t\tthis._voiceLabelView = this._createVoiceLabel();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-editor\",\n\t\t\t\t\t\"ck-rounded-corners\"\n\t\t\t\t],\n\t\t\t\trole: \"application\",\n\t\t\t\tdir: locale.uiLanguageDirection,\n\t\t\t\tlang: locale.uiLanguage,\n\t\t\t\t\"aria-labelledby\": this._voiceLabelView.id\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tthis._voiceLabelView,\n\t\t\t\t{\n\t\t\t\t\ttag: \"div\",\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t\"ck\",\n\t\t\t\t\t\t\t\"ck-editor__top\",\n\t\t\t\t\t\t\t\"ck-reset_all\"\n\t\t\t\t\t\t],\n\t\t\t\t\t\trole: \"presentation\"\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.top\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: \"div\",\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\"ck\", \"ck-editor__main\"],\n\t\t\t\t\t\trole: \"presentation\"\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.main\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* Creates a voice label view instance.\n\t*/\n\t_createVoiceLabel() {\n\t\tconst t = this.t;\n\t\tconst voiceLabel = new LabelView();\n\t\tvoiceLabel.text = t(\"Rich Text Editor\");\n\t\tvoiceLabel.extendTemplate({ attributes: { class: \"ck-voice-label\" } });\n\t\treturn voiceLabel;\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 ui/editableui/editableuiview\n*/\n/**\n* The editable UI view class.\n*/\nvar EditableUIView = class extends View {\n\t/**\n\t* The name of the editable UI view.\n\t*/\n\tname = null;\n\t/**\n\t* The editing view instance the editable is related to. Editable uses the editing\n\t* view to dynamically modify its certain DOM attributes after {@link #render rendering}.\n\t*\n\t* **Note**: The DOM attributes are performed by the editing view and not UI\n\t* {@link module:ui/view~View#bindTemplate template bindings} because once rendered,\n\t* the editable DOM element must remain under the full control of the engine to work properly.\n\t*/\n\t_editingView;\n\t/**\n\t* The element which is the main editable element (usually the one with `contentEditable=\"true\"`).\n\t*/\n\t_editableElement;\n\t/**\n\t* Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t* the view will not render its {@link #template}.\n\t*/\n\t_hasExternalElement;\n\t/**\n\t* Creates an instance of EditableUIView class.\n\t*\n\t* @param locale The locale instance.\n\t* @param editingView The editing view instance the editable is related to.\n\t* @param editableElement The editable element. If an existing `HTMLElement` is passed, the view applies its\n\t* template to it; otherwise the view creates a fresh element (a `<div>` by default, or one matching the given\n\t* {@link module:core/editor/editorconfig~ViewRootElementDefinition}).\n\t*/\n\tconstructor(locale, editingView, editableElement) {\n\t\tsuper(locale);\n\t\tconst { name, classes, styles, attributes } = (isElement$1(editableElement) ? void 0 : editableElement) || {};\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"isInlineRoot\", false);\n\t\tthis.setTemplate({\n\t\t\ttag: name || \"div\",\n\t\t\tattributes: {\n\t\t\t\t...attributes,\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-content\",\n\t\t\t\t\t\"ck-editor__editable\",\n\t\t\t\t\t\"ck-rounded-corners\",\n\t\t\t\t\tthis.bindTemplate.if(\"isInlineRoot\", \"ck-editor__editable_inline-root\"),\n\t\t\t\t\t...classes ? toArray(classes) : []\n\t\t\t\t],\n\t\t\t\t...styles && { style: styles },\n\t\t\t\tlang: locale.contentLanguage,\n\t\t\t\tdir: locale.contentLanguageDirection\n\t\t\t}\n\t\t});\n\t\tthis._editableElement = isElement$1(editableElement) ? editableElement : void 0;\n\t\tthis._hasExternalElement = !!this._editableElement;\n\t\tthis._editingView = editingView;\n\t}\n\t/**\n\t* Renders the view by either applying the {@link #template} to the existing\n\t* {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}\n\t* as {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement}.\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this._hasExternalElement) this.template.apply(this.element = this._editableElement);\n\t\telse this._editableElement = this.element;\n\t\tthis.on(\"change:isFocused\", () => this._updateIsFocusedClasses());\n\t\tthis._updateIsFocusedClasses();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._hasExternalElement) this.template.revert(this._editableElement);\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t* the view will not render its {@link #template}.\n\t*/\n\tget hasExternalElement() {\n\t\treturn this._hasExternalElement;\n\t}\n\t/**\n\t* Updates the `ck-focused` and `ck-blurred` CSS classes on the {@link #element} according to\n\t* the {@link #isFocused} property value using the {@link #_editingView editing view} API.\n\t*/\n\t_updateIsFocusedClasses() {\n\t\tconst editingView = this._editingView;\n\t\tif (editingView.isRenderingInProgress) updateAfterRender(this);\n\t\telse update(this);\n\t\tfunction update(view) {\n\t\t\teditingView.change((writer) => {\n\t\t\t\tconst viewRoot = editingView.document.getRoot(view.name);\n\t\t\t\twriter.addClass(view.isFocused ? \"ck-focused\" : \"ck-blurred\", viewRoot);\n\t\t\t\twriter.removeClass(view.isFocused ? \"ck-blurred\" : \"ck-focused\", viewRoot);\n\t\t\t});\n\t\t}\n\t\tfunction updateAfterRender(view) {\n\t\t\teditingView.once(\"change:isRenderingInProgress\", (evt, name, value) => {\n\t\t\t\tif (!value) update(view);\n\t\t\t\telse updateAfterRender(view);\n\t\t\t});\n\t\t}\n\t}\n};\n/**\n* An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n*/\nfunction isElement$1(value) {\n\treturn isElement(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 ui/editableui/inline/inlineeditableuiview\n*/\n/**\n* The inline editable UI class implementing an inline {@link module:ui/editableui/editableuiview~EditableUIView}.\n*/\nvar InlineEditableUIView = class extends EditableUIView {\n\t/**\n\t* The cached options object passed to the constructor.\n\t*/\n\t_options;\n\t/**\n\t* Creates an instance of the InlineEditableUIView class.\n\t*\n\t* @param locale The locale instance.\n\t* @param editingView The editing view instance the editable is related to.\n\t* @param editableElement The editable element. May be an existing `HTMLElement`, a\n\t* {@link module:core/editor/editorconfig~ViewRootElementDefinition} describing the element to create,\n\t* or `undefined` to create a default `<div>` element. See\n\t* {@link module:ui/editableui/editableuiview~EditableUIView}.\n\t* @param options Additional configuration of the view.\n\t* @param options.label The label of the editable for assistive technologies. If not provided, a default label is used or,\n\t* the existing `aria-label` attribute value from the specified `editableElement` is preserved.\n\t*/\n\tconstructor(locale, editingView, editableElement, options = {}) {\n\t\tsuper(locale, editingView, editableElement);\n\t\tthis._options = options;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\trole: \"textbox\",\n\t\t\tclass: \"ck-editor__editable_inline\"\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tconst editingView = this._editingView;\n\t\teditingView.change((writer) => {\n\t\t\tconst viewRoot = editingView.document.getRoot(this.name);\n\t\t\twriter.setAttribute(\"aria-label\", this.getEditableAriaLabel(), viewRoot);\n\t\t});\n\t}\n\t/**\n\t* Returns a normalized label for the editable view based on the environment.\n\t*/\n\tgetEditableAriaLabel() {\n\t\tconst t = this.locale.t;\n\t\tconst label = this._options.label;\n\t\tconst editableElement = this._editableElement;\n\t\tconst editableName = this.name;\n\t\tif (typeof label == \"string\") return label;\n\t\telse if (typeof label === \"object\") return label[editableName];\n\t\telse if (typeof label === \"function\") return label(this);\n\t\telse if (editableElement) {\n\t\t\tconst existingLabel = editableElement.getAttribute(\"aria-label\");\n\t\t\tif (existingLabel) return existingLabel;\n\t\t}\n\t\treturn t(\"Rich Text Editor. Editing area: %0\", editableName);\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 ui/formrow/formrowview\n*/\n/**\n* The class representing a single row in a form,\n*/\nvar FormRowView = class extends View {\n\t/**\n\t* A collection of row items (buttons, dropdowns, etc.).\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the form row class.\n\t*\n\t* @param locale The locale instance.\n\t* @param options.labelView When passed, the row gets the `group` and `aria-labelledby`\n\t* DOM attributes and gets described by the label.\n\t*/\n\tconstructor(locale, options = {}) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"class\", [\n\t\t\t\"ck\",\n\t\t\t\"ck-form__row\",\n\t\t\t...toArray(options.class || [])\n\t\t]);\n\t\tthis.children = this.createCollection();\n\t\tif (options.children) options.children.forEach((child) => this.children.add(child));\n\t\tthis.set(\"_role\", null);\n\t\tthis.set(\"_ariaLabelledBy\", null);\n\t\tif (options.labelView) this.set({\n\t\t\t_role: \"group\",\n\t\t\t_ariaLabelledBy: options.labelView.id\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: bind.to(\"class\", (classes) => classes.join(\" \")),\n\t\t\t\trole: bind.to(\"_role\"),\n\t\t\t\t\"aria-labelledby\": bind.to(\"_ariaLabelledBy\")\n\t\t\t},\n\t\t\tchildren: this.children\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 ui/iframe/iframeview\n*/\n/**\n* The iframe view class.\n*\n* ```ts\n* const iframe = new IframeView();\n*\n* iframe.render();\n* document.body.appendChild( iframe.element );\n*\n* iframe.on( 'loaded', () => {\n* \tconsole.log( 'The iframe has loaded', iframe.element.contentWindow );\n* } );\n*\n* iframe.element.src = 'https://ckeditor.com';\n* ```\n*/\nvar IframeView = class extends View {\n\t/**\n\t* Creates a new instance of the iframe view.\n\t*\n\t* @param locale The locale instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"iframe\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-reset_all\"],\n\t\t\t\tsandbox: \"allow-same-origin allow-scripts\"\n\t\t\t},\n\t\t\ton: { load: bind.to(\"loaded\") }\n\t\t});\n\t}\n\t/**\n\t* Renders the iframe's {@link #element} and returns a `Promise` for asynchronous\n\t* child `contentDocument` loading process.\n\t*\n\t* @returns A promise which resolves once the iframe `contentDocument` has\n\t* been {@link #event:loaded}.\n\t*/\n\trender() {\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.on(\"loaded\", resolve);\n\t\t\treturn super.render();\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 ui/labeledinput/labeledinputview\n*/\n/**\n* The labeled input view class.\n*/\nvar LabeledInputView = class extends View {\n\t/**\n\t* The label view.\n\t*/\n\tlabelView;\n\t/**\n\t* The input view.\n\t*/\n\tinputView;\n\t/**\n\t* The status view for the {@link #inputView}. It displays {@link #errorText} and\n\t* {@link #infoText}.\n\t*/\n\tstatusView;\n\t/**\n\t* Creates an instance of the labeled input view class.\n\t*\n\t* @param locale The locale instance.\n\t* @param InputView Constructor of the input view.\n\t*/\n\tconstructor(locale, InputView) {\n\t\tsuper(locale);\n\t\tconst inputUid = `ck-input-${uid()}`;\n\t\tconst statusUid = `ck-status-${uid()}`;\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"value\", void 0);\n\t\tthis.set(\"isReadOnly\", false);\n\t\tthis.set(\"errorText\", null);\n\t\tthis.set(\"infoText\", null);\n\t\tthis.labelView = this._createLabelView(inputUid);\n\t\tthis.inputView = this._createInputView(InputView, inputUid, statusUid);\n\t\tthis.statusView = this._createStatusView(statusUid);\n\t\tthis.bind(\"_statusText\").to(this, \"errorText\", this, \"infoText\", (errorText, infoText) => errorText || infoText);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-labeled-input\",\n\t\t\t\tbind.if(\"isReadOnly\", \"ck-disabled\")\n\t\t\t] },\n\t\t\tchildren: [\n\t\t\t\tthis.labelView,\n\t\t\t\tthis.inputView,\n\t\t\t\tthis.statusView\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* Creates label view class instance and bind with view.\n\t*\n\t* @param id Unique id to set as labelView#for attribute.\n\t*/\n\t_createLabelView(id) {\n\t\tconst labelView = new LabelView(this.locale);\n\t\tlabelView.for = id;\n\t\tlabelView.bind(\"text\").to(this, \"label\");\n\t\treturn labelView;\n\t}\n\t/**\n\t* Creates input view class instance and bind with view.\n\t*\n\t* @param InputView Input view constructor.\n\t* @param inputUid Unique id to set as inputView#id attribute.\n\t* @param statusUid Unique id of the status for the input's `aria-describedby` attribute.\n\t*/\n\t_createInputView(InputView, inputUid, statusUid) {\n\t\tconst inputView = new InputView(this.locale, statusUid);\n\t\tinputView.id = inputUid;\n\t\tinputView.ariaDescribedById = statusUid;\n\t\tinputView.bind(\"value\").to(this);\n\t\tinputView.bind(\"isReadOnly\").to(this);\n\t\tinputView.bind(\"hasError\").to(this, \"errorText\", (value) => !!value);\n\t\tinputView.on(\"input\", () => {\n\t\t\tthis.errorText = null;\n\t\t});\n\t\treturn inputView;\n\t}\n\t/**\n\t* Creates the status view instance. It displays {@link #errorText} and {@link #infoText}\n\t* next to the {@link #inputView}. See {@link #_statusText}.\n\t*\n\t* @param statusUid Unique id of the status, shared with the input's `aria-describedby` attribute.\n\t*/\n\t_createStatusView(statusUid) {\n\t\tconst statusView = new View(this.locale);\n\t\tconst bind = this.bindTemplate;\n\t\tstatusView.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-labeled-input__status\",\n\t\t\t\t\tbind.if(\"errorText\", \"ck-labeled-input__status_error\"),\n\t\t\t\t\tbind.if(\"_statusText\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\tid: statusUid,\n\t\t\t\trole: bind.if(\"errorText\", \"alert\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"_statusText\") }]\n\t\t});\n\t\treturn statusView;\n\t}\n\t/**\n\t* Moves the focus to the input and selects the value.\n\t*/\n\tselect() {\n\t\tthis.inputView.select();\n\t}\n\t/**\n\t* Focuses the input.\n\t*/\n\tfocus() {\n\t\tthis.inputView.focus();\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* A filter function that returns matching item and group names in the list view.\n*/\nfunction filterGroupAndItemNames(regExp, items) {\n\tlet totalItemsCount = 0;\n\tlet resultsCount = 0;\n\tfor (const groupView of items) {\n\t\tconst group = groupView;\n\t\tconst groupItems = group.items;\n\t\tconst isGroupLabelMatching = regExp && !!group.label.match(regExp);\n\t\tgroup.labelView.highlightText(isGroupLabelMatching ? regExp : null);\n\t\tfor (const listItemView of groupItems) {\n\t\t\tconst buttonView = listItemView.children.first;\n\t\t\tconst labelView = buttonView.labelView;\n\t\t\tif (!regExp) {\n\t\t\t\tlistItemView.isVisible = true;\n\t\t\t\tlabelView.highlightText(null);\n\t\t\t} else {\n\t\t\t\tconst isItemLabelMatching = !!buttonView.label.match(regExp);\n\t\t\t\tlabelView.highlightText(isItemLabelMatching ? regExp : null);\n\t\t\t\tlistItemView.isVisible = isGroupLabelMatching || isItemLabelMatching;\n\t\t\t}\n\t\t}\n\t\tconst visibleInGroupCount = groupItems.filter((listItemView) => listItemView.isVisible).length;\n\t\ttotalItemsCount += group.items.length;\n\t\tresultsCount += isGroupLabelMatching ? group.items.length : visibleInGroupCount;\n\t\tgroup.isVisible = isGroupLabelMatching || !!visibleInGroupCount;\n\t}\n\treturn {\n\t\tresultsCount,\n\t\ttotalItemsCount\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 ui/notification/notification\n*/\n/**\n* The Notification plugin.\n*\n* This plugin sends a few types of notifications: `success`, `info` and `warning`. The notifications need to be\n* handled and displayed by a plugin responsible for showing the UI of the notifications. Using this plugin for dispatching\n* notifications makes it possible to switch the notifications UI.\n*\n* Note that every unhandled and not stopped `warning` notification will be displayed as a system alert.\n* See {@link module:ui/notification/notification~Notification#showWarning}.\n*/\nvar Notification = class extends ContextPlugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Notification\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.on(\"show:warning\", (evt, data) => {\n\t\t\twindow.alert(data.message);\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* Shows a success notification.\n\t*\n\t* By default, it fires the {@link #event:show:success `show:success` event} with the given `data`. The event namespace can be extended\n\t* using the `data.namespace` option. For example:\n\t*\n\t* ```ts\n\t* showSuccess( 'Image is uploaded.', {\n\t* \tnamespace: 'upload:image'\n\t* } );\n\t* ```\n\t*\n\t* will fire the `show:success:upload:image` event.\n\t*\n\t* You can provide the title of the notification:\n\t*\n\t* ```ts\n\t* showSuccess( 'Image is uploaded.', {\n\t* \ttitle: 'Image upload success'\n\t* } );\n\t* ```\n\t*\n\t* @param message The content of the notification.\n\t* @param data Additional data.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\tshowSuccess(message, data = {}) {\n\t\tthis._showNotification({\n\t\t\tmessage,\n\t\t\ttype: \"success\",\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t});\n\t}\n\t/**\n\t* Shows an information notification.\n\t*\n\t* By default, it fires the {@link #event:show:info `show:info` event} with the given `data`. The event namespace can be extended\n\t* using the `data.namespace` option. For example:\n\t*\n\t* ```ts\n\t* showInfo( 'Editor is offline.', {\n\t* \tnamespace: 'editor:status'\n\t* } );\n\t* ```\n\t*\n\t* will fire the `show:info:editor:status` event.\n\t*\n\t* You can provide the title of the notification:\n\t*\n\t* ```ts\n\t* showInfo( 'Editor is offline.', {\n\t* \ttitle: 'Network information'\n\t* } );\n\t* ```\n\t*\n\t* @param message The content of the notification.\n\t* @param data Additional data.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\tshowInfo(message, data = {}) {\n\t\tthis._showNotification({\n\t\t\tmessage,\n\t\t\ttype: \"info\",\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t});\n\t}\n\t/**\n\t* Shows a warning notification.\n\t*\n\t* By default, it fires the {@link #event:show:warning `show:warning` event}\n\t* with the given `data`. The event namespace can be extended using the `data.namespace` option. For example:\n\t*\n\t* ```ts\n\t* showWarning( 'Image upload error.', {\n\t* \tnamespace: 'upload:image'\n\t* } );\n\t* ```\n\t*\n\t* will fire the `show:warning:upload:image` event.\n\t*\n\t* You can provide the title of the notification:\n\t*\n\t* ```ts\n\t* showWarning( 'Image upload error.', {\n\t* \ttitle: 'Upload failed'\n\t* } );\n\t* ```\n\t*\n\t* Note that each unhandled and not stopped `warning` notification will be displayed as a system alert.\n\t* The plugin responsible for displaying warnings should `stop()` the event to prevent displaying it as an alert:\n\t*\n\t* ```ts\n\t* notifications.on( 'show:warning', ( evt, data ) => {\n\t* \t// Do something with the data.\n\t*\n\t* \t// Stop this event to prevent displaying it as an alert.\n\t* \tevt.stop();\n\t* } );\n\t* ```\n\t*\n\t* You can attach many listeners to the same event and `stop()` this event in a listener with a low priority:\n\t*\n\t* ```ts\n\t* notifications.on( 'show:warning', ( evt, data ) => {\n\t* \t// Show the warning in the UI, but do not stop it.\n\t* } );\n\t*\n\t* notifications.on( 'show:warning', ( evt, data ) => {\n\t* \t// Log the warning to some error tracker.\n\t*\n\t* \t// Stop this event to prevent displaying it as an alert.\n\t* \tevt.stop();\n\t* }, { priority: 'low' } );\n\t* ```\n\t*\n\t* @param message The content of the notification.\n\t* @param data Additional data.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\tshowWarning(message, data = {}) {\n\t\tthis._showNotification({\n\t\t\tmessage,\n\t\t\ttype: \"warning\",\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t});\n\t}\n\t/**\n\t* Fires the `show` event with the specified type, namespace and message.\n\t*\n\t* @param data The message data.\n\t* @param data.message The content of the notification.\n\t* @param data.type The type of the message.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\t_showNotification(data) {\n\t\tconst event = data.namespace ? `show:${data.type}:${data.namespace}` : `show:${data.type}`;\n\t\tthis.fire(event, {\n\t\t\tmessage: data.message,\n\t\t\ttype: data.type,\n\t\t\ttitle: data.title || \"\"\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 ui/model\n*/\nconst UIModelBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The base MVC model class.\n*/\nvar UIModel = class extends UIModelBase {\n\t/**\n\t* Creates a new Model instance.\n\t*\n\t* @param attributes The model state attributes to be defined during the instance creation.\n\t* @param properties The (out of state) properties to be appended to the instance during creation.\n\t*/\n\tconstructor(attributes, properties) {\n\t\tsuper();\n\t\tif (properties) extend(this, properties);\n\t\tif (attributes) this.set(attributes);\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 ui/panel/balloon/contextualballoon\n*/\nconst toPx$4 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* Provides the common contextual balloon for the editor.\n*\n* The role of this plugin is to unify the contextual balloons logic, simplify views management and help\n* avoid the unnecessary complexity of handling multiple {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n* instances in the editor.\n*\n* This plugin allows for creating single or multiple panel stacks.\n*\n* Each stack may have multiple views, with the one on the top being visible. When the visible view is removed from the stack,\n* the previous view becomes visible.\n*\n* It might be useful to implement nested navigation in a balloon. For instance, a toolbar view may contain a link button.\n* When you click it, a link view (which lets you set the URL) is created and put on top of the toolbar view, so the link panel\n* is displayed. When you finish editing the link and close (remove) the link view, the toolbar view is visible again.\n*\n* However, there are cases when there are multiple independent balloons to be displayed, for instance, if the selection\n* is inside two inline comments at the same time. For such cases, you can create two independent panel stacks.\n* The contextual balloon plugin will create a navigation bar to let the users switch between these panel stacks using the \"Next\"\n* and \"Previous\" buttons.\n*\n* If there are no views in the current stack, the balloon panel will try to switch to the next stack. If there are no\n* panels in any stack, the balloon panel will be hidden.\n*\n* **Note**: To force the balloon panel to show only one view, even if there are other stacks, use the `singleViewMode=true` option\n* when {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon#add adding} a view to a panel.\n*\n* From the implementation point of view, the contextual ballon plugin is reusing a single\n* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} instance to display multiple contextual balloon\n* panels in the editor. It also creates a special {@link module:ui/panel/balloon/contextualballoon~RotatorView rotator view},\n* used to manage multiple panel stacks. Rotator view is a child of the balloon panel view and the parent of the specific\n* view you want to display. If there is more than one panel stack to be displayed, the rotator view will add a\n* navigation bar. If there is only one stack, the rotator view is transparent (it does not add any UI elements).\n*/\nvar ContextualBalloon = class extends Plugin {\n\t/**\n\t* The {@link module:utils/dom/position~DomOptimalPositionOptions#limiter position limiter}\n\t* for the {@link #view balloon}, used when no `limiter` has been passed into {@link #add}\n\t* or {@link #updatePosition}.\n\t*\n\t* By default, a function that obtains the farthest DOM\n\t* {@link module:engine/view/rooteditableelement~ViewRootEditableElement}\n\t* of the {@link module:engine/view/document~ViewDocument#selection}.\n\t*/\n\tpositionLimiter;\n\tvisibleStack;\n\t/**\n\t* The map of views and their stacks.\n\t*/\n\t_viewToStack = /* @__PURE__ */ new Map();\n\t/**\n\t* The map of IDs and stacks.\n\t*/\n\t_idToStack = /* @__PURE__ */ new Map();\n\t/**\n\t* The common balloon panel view.\n\t*/\n\t_view = null;\n\t/**\n\t* Rotator view embedded in the contextual balloon.\n\t* Displays the currently visible view in the balloon and provides navigation for switching stacks.\n\t*/\n\t_rotatorView = null;\n\t/**\n\t* Displays fake panels under the balloon panel view when multiple stacks are added to the balloon.\n\t*/\n\t_fakePanelsView = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ContextualBalloon\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.positionLimiter = () => {\n\t\t\tconst view = this.editor.editing.view;\n\t\t\tconst editableElement = view.document.selection.editableElement;\n\t\t\tif (editableElement) return view.domConverter.mapViewToDom(editableElement.root);\n\t\t\treturn null;\n\t\t};\n\t\tthis.decorate(\"getPositionOptions\");\n\t\tthis.set(\"visibleView\", null);\n\t\tthis.set(\"_numberOfStacks\", 0);\n\t\tthis.set(\"_singleViewMode\", false);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this._view) this._view.destroy();\n\t\tif (this._rotatorView) this._rotatorView.destroy();\n\t\tif (this._fakePanelsView) this._fakePanelsView.destroy();\n\t}\n\t/**\n\t* The common balloon panel view.\n\t*/\n\tget view() {\n\t\tif (!this._view) this._createPanelView();\n\t\treturn this._view;\n\t}\n\t/**\n\t* Returns `true` when the given view is in one of the stacks. Otherwise returns `false`.\n\t*/\n\thasView(view) {\n\t\treturn Array.from(this._viewToStack.keys()).includes(view);\n\t}\n\t/**\n\t* Adds a new view to the stack and makes it visible if the current stack is visible\n\t* or it is the first view in the balloon.\n\t*\n\t* @param data The configuration of the view.\n\t* @param data.stackId The ID of the stack that the view is added to. Defaults to `'main'`.\n\t* @param data.view The content of the balloon.\n\t* @param data.position Positioning options.\n\t* @param data.balloonClassName An additional CSS class added to the {@link #view balloon} when visible.\n\t* @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow. Defaults to `true`.\n\t* @param data.singleViewMode Whether the view should be the only visible view even if other stacks were added. Defaults to `false`.\n\t*/\n\tadd(data) {\n\t\tif (!this._view) this._createPanelView();\n\t\tif (this.hasView(data.view))\n /**\n\t\t* Trying to add configuration of the same view more than once.\n\t\t*\n\t\t* @error contextualballoon-add-view-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"contextualballoon-add-view-exist\", [this, data]);\n\t\tconst stackId = data.stackId || \"main\";\n\t\tif (!this._idToStack.has(stackId)) {\n\t\t\tthis._idToStack.set(stackId, /* @__PURE__ */ new Map([[data.view, data]]));\n\t\t\tthis._viewToStack.set(data.view, this._idToStack.get(stackId));\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\t\t\tif (!this._visibleStack || data.singleViewMode) this.showStack(stackId);\n\t\t\treturn;\n\t\t}\n\t\tconst stack = this._idToStack.get(stackId);\n\t\tif (data.singleViewMode) this.showStack(stackId);\n\t\tstack.set(data.view, data);\n\t\tthis._viewToStack.set(data.view, stack);\n\t\tif (stack === this._visibleStack) this._showView(data);\n\t}\n\t/**\n\t* Removes the given view from the stack. If the removed view was visible,\n\t* the view preceding it in the stack will become visible instead.\n\t* When there is no view in the stack, the next stack will be displayed.\n\t* When there are no more stacks, the balloon will hide.\n\t*\n\t* @param view A view to be removed from the balloon.\n\t*/\n\tremove(view) {\n\t\tif (!this.hasView(view))\n /**\n\t\t* Trying to remove the configuration of the view not defined in the stack.\n\t\t*\n\t\t* @error contextualballoon-remove-view-not-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"contextualballoon-remove-view-not-exist\", [this, view]);\n\t\tconst stack = this._viewToStack.get(view);\n\t\tif (this._singleViewMode && this.visibleView === view) this._singleViewMode = false;\n\t\tif (this.visibleView === view) {\n\t\t\tif (stack.size === 1) {\n\t\t\t\tif (this._idToStack.size > 1) this._showNextStack();\n\t\t\t\telse {\n\t\t\t\t\tthis.view.hide();\n\t\t\t\t\tthis.visibleView = null;\n\t\t\t\t\tthis._rotatorView.hideView();\n\t\t\t\t}\n\t\t\t} else this._showView(Array.from(stack.values())[stack.size - 2]);\n\t\t}\n\t\tif (stack.size === 1) {\n\t\t\tthis._idToStack.delete(this._getStackId(stack));\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\t\t} else stack.delete(view);\n\t\tthis._viewToStack.delete(view);\n\t}\n\t/**\n\t* Updates the position of the balloon using the position data of the first visible view in the stack.\n\t* When new position data is given, the position data of the currently visible view will be updated.\n\t*\n\t* @param position Position options.\n\t*/\n\tupdatePosition(position) {\n\t\tif (position) this._visibleStack.get(this.visibleView).position = position;\n\t\tthis.view.pin(this.getPositionOptions());\n\t\tthis._fakePanelsView.updatePosition();\n\t}\n\t/**\n\t* Returns position options of the last view in the stack.\n\t* This keeps the balloon in the same position when the view is changed.\n\t*/\n\tgetPositionOptions() {\n\t\tlet position = Array.from(this._visibleStack.values()).pop().position;\n\t\tif (position) {\n\t\t\tif (!position.limiter) position = Object.assign({}, position, { limiter: this.positionLimiter });\n\t\t\tposition = Object.assign({}, position, { viewportOffsetConfig: {\n\t\t\t\t...this.editor.ui.viewportOffset,\n\t\t\t\ttop: this.editor.ui.viewportOffset.visualTop\n\t\t\t} });\n\t\t}\n\t\treturn position;\n\t}\n\t/**\n\t* Shows the last view from the stack of a given ID.\n\t*/\n\tshowStack(id) {\n\t\tthis.visibleStack = id;\n\t\tconst stack = this._idToStack.get(id);\n\t\tif (!stack)\n /**\n\t\t* Trying to show a stack that does not exist.\n\t\t*\n\t\t* @error contextualballoon-showstack-stack-not-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"contextualballoon-showstack-stack-not-exist\", this);\n\t\tif (this._visibleStack === stack) return;\n\t\tthis._showView(Array.from(stack.values()).pop());\n\t}\n\t/**\n\t* Initializes view instances.\n\t*/\n\t_createPanelView() {\n\t\tthis._view = new BalloonPanelView(this.editor.locale);\n\t\tthis.editor.ui.view.body.add(this._view);\n\t\tthis._rotatorView = this._createRotatorView();\n\t\tthis._fakePanelsView = this._createFakePanelsView();\n\t}\n\t/**\n\t* Returns the stack of the currently visible view.\n\t*/\n\tget _visibleStack() {\n\t\treturn this._viewToStack.get(this.visibleView);\n\t}\n\t/**\n\t* Returns the ID of the given stack.\n\t*/\n\t_getStackId(stack) {\n\t\treturn Array.from(this._idToStack.entries()).find((entry) => entry[1] === stack)[0];\n\t}\n\t/**\n\t* Shows the last view from the next stack.\n\t*/\n\t_showNextStack() {\n\t\tconst stacks = Array.from(this._idToStack.values());\n\t\tlet nextIndex = stacks.indexOf(this._visibleStack) + 1;\n\t\tif (!stacks[nextIndex]) nextIndex = 0;\n\t\tthis.showStack(this._getStackId(stacks[nextIndex]));\n\t}\n\t/**\n\t* Shows the last view from the previous stack.\n\t*/\n\t_showPrevStack() {\n\t\tconst stacks = Array.from(this._idToStack.values());\n\t\tlet nextIndex = stacks.indexOf(this._visibleStack) - 1;\n\t\tif (!stacks[nextIndex]) nextIndex = stacks.length - 1;\n\t\tthis.showStack(this._getStackId(stacks[nextIndex]));\n\t}\n\t/**\n\t* Creates a rotator view.\n\t*/\n\t_createRotatorView() {\n\t\tconst view = new RotatorView(this.editor.locale);\n\t\tconst t = this.editor.locale.t;\n\t\tthis.view.content.add(view);\n\t\tview.bind(\"isNavigationVisible\").to(this, \"_numberOfStacks\", this, \"_singleViewMode\", (value, isSingleViewMode) => {\n\t\t\treturn !isSingleViewMode && value > 1;\n\t\t});\n\t\tview.on(\"change:isNavigationVisible\", () => this.updatePosition(), { priority: \"low\" });\n\t\tview.bind(\"counter\").to(this, \"visibleView\", this, \"_numberOfStacks\", (visibleView, numberOfStacks) => {\n\t\t\tif (numberOfStacks < 2) return \"\";\n\t\t\tconst current = Array.from(this._idToStack.values()).indexOf(this._visibleStack) + 1;\n\t\t\treturn t(\"%0 of %1\", [current, numberOfStacks]);\n\t\t});\n\t\tview.buttonNextView.on(\"execute\", () => {\n\t\t\tif (view.focusTracker.isFocused) this.editor.editing.view.focus();\n\t\t\tthis._showNextStack();\n\t\t});\n\t\tview.buttonPrevView.on(\"execute\", () => {\n\t\t\tif (view.focusTracker.isFocused) this.editor.editing.view.focus();\n\t\t\tthis._showPrevStack();\n\t\t});\n\t\treturn view;\n\t}\n\t/**\n\t* Creates a fake panels view.\n\t*/\n\t_createFakePanelsView() {\n\t\tconst view = new FakePanelsView(this.editor.locale, this.view);\n\t\tview.bind(\"numberOfPanels\").to(this, \"_numberOfStacks\", this, \"_singleViewMode\", (number, isSingleViewMode) => {\n\t\t\treturn !isSingleViewMode && number >= 2 ? Math.min(number - 1, 2) : 0;\n\t\t});\n\t\tview.listenTo(this.view, \"change:top\", () => view.updatePosition());\n\t\tview.listenTo(this.view, \"change:left\", () => view.updatePosition());\n\t\tthis.editor.ui.view.body.add(view);\n\t\treturn view;\n\t}\n\t/**\n\t* Sets the view as the content of the balloon and attaches the balloon using position\n\t* options of the first view.\n\t*\n\t* @param data Configuration.\n\t* @param data.view The view to show in the balloon.\n\t* @param data.balloonClassName Additional class name which will be added to the {@link #view balloon}.\n\t* @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow.\n\t*/\n\t_showView({ view, balloonClassName = \"\", withArrow = true, singleViewMode = false }) {\n\t\tthis.view.class = balloonClassName;\n\t\tthis.view.withArrow = withArrow;\n\t\tthis._rotatorView.showView(view);\n\t\tthis.visibleView = view;\n\t\tthis.view.pin(this.getPositionOptions());\n\t\tthis._fakePanelsView.updatePosition();\n\t\tif (singleViewMode) this._singleViewMode = true;\n\t}\n};\n/**\n* Rotator view is a helper class for the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon}.\n* It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.\n* See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.\n* @internal\n*/\nvar RotatorView = class extends View {\n\t/**\n\t* Used for checking if a view is focused or not.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Navigation button for switching the stack to the previous one.\n\t*/\n\tbuttonPrevView;\n\t/**\n\t* Navigation button for switching the stack to the next one.\n\t*/\n\tbuttonNextView;\n\t/**\n\t* A collection of the child views that creates the rotator content.\n\t*/\n\tcontent;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isNavigationVisible\", true);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.buttonPrevView = this._createButtonView(t(\"Previous\"), IconPreviousArrow);\n\t\tthis.buttonNextView = this._createButtonView(t(\"Next\"), IconNextArrow);\n\t\tthis.content = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-balloon-rotator\"],\n\t\t\t\t\"z-index\": \"-1\"\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: [\"ck-balloon-rotator__navigation\", bind.to(\"isNavigationVisible\", (value) => value ? \"\" : \"ck-hidden\")] },\n\t\t\t\tchildren: [\n\t\t\t\t\tthis.buttonPrevView,\n\t\t\t\t\t{\n\t\t\t\t\t\ttag: \"span\",\n\t\t\t\t\t\tattributes: { class: [\"ck-balloon-rotator__counter\"] },\n\t\t\t\t\t\tchildren: [{ text: bind.to(\"counter\") }]\n\t\t\t\t\t},\n\t\t\t\t\tthis.buttonNextView\n\t\t\t\t]\n\t\t\t}, {\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: \"ck-balloon-rotator__content\" },\n\t\t\t\tchildren: this.content\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t}\n\t/**\n\t* Shows a given view.\n\t*\n\t* @param view The view to show.\n\t*/\n\tshowView(view) {\n\t\tthis.hideView();\n\t\tthis.content.add(view);\n\t}\n\t/**\n\t* Hides the currently displayed view.\n\t*/\n\thideView() {\n\t\tthis.content.clear();\n\t}\n\t/**\n\t* Creates a navigation button view.\n\t*\n\t* @param label The button label.\n\t* @param icon The button icon.\n\t*/\n\t_createButtonView(label, icon) {\n\t\tconst view = new ButtonView(this.locale);\n\t\tview.set({\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t});\n\t\tview.extendTemplate({ on: { mousedown: view.bindTemplate.to((evt) => evt.preventDefault()) } });\n\t\treturn view;\n\t}\n};\n/**\n* Displays additional layers under the balloon when multiple stacks are added to the balloon.\n*/\nvar FakePanelsView = class extends View {\n\t/**\n\t* Collection of the child views which creates fake panel content.\n\t*/\n\tcontent;\n\t/**\n\t* Context.\n\t*/\n\t_balloonPanelView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, balloonPanelView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"top\", 0);\n\t\tthis.set(\"left\", 0);\n\t\tthis.set(\"height\", 0);\n\t\tthis.set(\"width\", 0);\n\t\tthis.set(\"numberOfPanels\", 0);\n\t\tthis.content = this.createCollection();\n\t\tthis._balloonPanelView = balloonPanelView;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-fake-panel\", bind.to(\"numberOfPanels\", (number) => number ? \"\" : \"ck-hidden\")],\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to(\"top\", toPx$4),\n\t\t\t\t\tleft: bind.to(\"left\", toPx$4),\n\t\t\t\t\twidth: bind.to(\"width\", toPx$4),\n\t\t\t\t\theight: bind.to(\"height\", toPx$4)\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t});\n\t\tthis.on(\"change:numberOfPanels\", (evt, name, next, prev) => {\n\t\t\tif (next > prev) this._addPanels(next - prev);\n\t\t\telse this._removePanels(prev - next);\n\t\t\tthis.updatePosition();\n\t\t});\n\t}\n\t_addPanels(number) {\n\t\twhile (number--) {\n\t\t\tconst view = new View();\n\t\t\tview.setTemplate({ tag: \"div\" });\n\t\t\tthis.content.add(view);\n\t\t\tthis.registerChild(view);\n\t\t}\n\t}\n\t_removePanels(number) {\n\t\twhile (number--) {\n\t\t\tconst view = this.content.last;\n\t\t\tthis.content.remove(view);\n\t\t\tthis.deregisterChild(view);\n\t\t\tview.destroy();\n\t\t}\n\t}\n\t/**\n\t* Updates coordinates of fake panels.\n\t*/\n\tupdatePosition() {\n\t\tif (this.numberOfPanels) {\n\t\t\tconst { top, left } = this._balloonPanelView;\n\t\t\tconst { width, height } = new Rect(this._balloonPanelView.element);\n\t\t\tObject.assign(this, {\n\t\t\t\ttop,\n\t\t\t\tleft,\n\t\t\t\twidth,\n\t\t\t\theight\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 ui/panel/sticky/stickypanelview\n*/\nconst toPx$3 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The sticky panel view class.\n*/\nvar StickyPanelView = class extends View {\n\t/**\n\t* Collection of the child views which creates balloon panel contents.\n\t*/\n\tcontent;\n\t/**\n\t* The panel which accepts children into {@link #content} collection.\n\t* Also an element which is positioned when {@link #isSticky}.\n\t*/\n\tcontentPanelElement;\n\t/**\n\t* A dummy element which visually fills the space as long as the\n\t* actual panel is sticky. It prevents flickering of the UI.\n\t*/\n\t_contentPanelPlaceholder;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isActive\", false);\n\t\tthis.set(\"isSticky\", false);\n\t\tthis.set(\"limiterElement\", null);\n\t\tthis.set(\"limiterBottomOffset\", 50);\n\t\tthis.set(\"viewportTopOffset\", 0);\n\t\tthis.set(\"_marginLeft\", null);\n\t\tthis.set(\"_isStickyToTheBottomOfLimiter\", false);\n\t\tthis.set(\"_stickyTopOffset\", null);\n\t\tthis.set(\"_stickyBottomOffset\", null);\n\t\tthis.content = this.createCollection();\n\t\tthis._contentPanelPlaceholder = new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-sticky-panel__placeholder\"],\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: bind.to(\"isSticky\", (isSticky) => isSticky ? \"block\" : \"none\"),\n\t\t\t\t\theight: bind.to(\"isSticky\", (isSticky) => {\n\t\t\t\t\t\treturn isSticky ? toPx$3(this._contentPanelRect.height) : null;\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}).render();\n\t\tthis.contentPanelElement = new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-sticky-panel__content\",\n\t\t\t\t\tbind.if(\"isSticky\", \"ck-sticky-panel__content_sticky\"),\n\t\t\t\t\tbind.if(\"_isStickyToTheBottomOfLimiter\", \"ck-sticky-panel__content_sticky_bottom-limit\")\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: bind.to(\"isSticky\", (isSticky) => {\n\t\t\t\t\t\treturn isSticky ? toPx$3(this._contentPanelPlaceholder.getBoundingClientRect().width) : null;\n\t\t\t\t\t}),\n\t\t\t\t\ttop: bind.to(\"_stickyTopOffset\", (value) => value ? toPx$3(value) : value),\n\t\t\t\t\tbottom: bind.to(\"_stickyBottomOffset\", (value) => value ? toPx$3(value) : value),\n\t\t\t\t\tmarginLeft: bind.to(\"_marginLeft\")\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t}).render();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-sticky-panel\"] },\n\t\t\tchildren: [this._contentPanelPlaceholder, this.contentPanelElement]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.checkIfShouldBeSticky();\n\t\tthis.listenTo(global.document, \"scroll\", () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t}, { useCapture: true });\n\t\tthis.listenTo(this, \"change:isActive\", () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t});\n\t\tif (global.window.visualViewport) {\n\t\t\tthis.listenTo(global.window.visualViewport, \"scroll\", () => {\n\t\t\t\tthis.checkIfShouldBeSticky();\n\t\t\t});\n\t\t\tthis.listenTo(global.window.visualViewport, \"resize\", () => {\n\t\t\t\tthis.checkIfShouldBeSticky();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Analyzes the environment to decide whether the panel should be sticky or not.\n\t* Then handles the positioning of the panel.\n\t*/\n\tcheckIfShouldBeSticky() {\n\t\tif (!this.limiterElement || !this.isActive) {\n\t\t\tthis._unstick();\n\t\t\treturn;\n\t\t}\n\t\tconst limiterRect = new Rect(this.limiterElement);\n\t\tlet visibleLimiterRect = limiterRect.getVisible();\n\t\tif (visibleLimiterRect) {\n\t\t\tconst windowRect = new Rect(global.window);\n\t\t\twindowRect.top += this.viewportTopOffset;\n\t\t\twindowRect.height -= this.viewportTopOffset;\n\t\t\tvisibleLimiterRect = visibleLimiterRect.getIntersection(windowRect);\n\t\t}\n\t\tconst { left: visualViewportOffsetLeft, top: visualViewportOffsetTop } = getVisualViewportOffset();\n\t\tlimiterRect.moveBy(visualViewportOffsetLeft, visualViewportOffsetTop);\n\t\tif (visibleLimiterRect) visibleLimiterRect.moveBy(visualViewportOffsetLeft, visualViewportOffsetTop);\n\t\tif (visibleLimiterRect && limiterRect.top < visibleLimiterRect.top) {\n\t\t\tif (this._contentPanelRect.height + this.limiterBottomOffset > visibleLimiterRect.height) {\n\t\t\t\tconst stickyBottomOffset = Math.max(limiterRect.bottom - visibleLimiterRect.bottom, 0) + this.limiterBottomOffset;\n\t\t\t\tif (this._contentPanelRect.height + stickyBottomOffset + 1 < limiterRect.height) this._stickToBottomOfLimiter(stickyBottomOffset);\n\t\t\t\telse this._unstick();\n\t\t\t} else if (this._contentPanelRect.height + this.limiterBottomOffset < limiterRect.height) this._stickToTopOfAncestors(visibleLimiterRect.top);\n\t\t\telse this._unstick();\n\t\t} else this._unstick();\n\t}\n\t/**\n\t* Sticks the panel at the given CSS `top` offset.\n\t*\n\t* @private\n\t* @param topOffset\n\t*/\n\t_stickToTopOfAncestors(topOffset) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = topOffset;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = toPx$3(-global.window.scrollX + getVisualViewportOffset().left);\n\t}\n\t/**\n\t* Sticks the panel at the bottom of the limiter with a given CSS `bottom` offset.\n\t*\n\t* @private\n\t* @param stickyBottomOffset\n\t*/\n\t_stickToBottomOfLimiter(stickyBottomOffset) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = true;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = stickyBottomOffset;\n\t\tthis._marginLeft = toPx$3(-global.window.scrollX + getVisualViewportOffset().left);\n\t}\n\t/**\n\t* Unsticks the panel putting it back to its original position.\n\t*\n\t* @private\n\t*/\n\t_unstick() {\n\t\tthis.isSticky = false;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = null;\n\t}\n\t/**\n\t* Returns the bounding rect of the {@link #contentPanelElement}.\n\t*\n\t* @private\n\t*/\n\tget _contentPanelRect() {\n\t\treturn new Rect(this.contentPanelElement);\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 ui/search/text/searchtextqueryview\n*/\n/**\n* A search input field for the {@link module:ui/search/text/searchtextview~SearchTextView} component.\n*\n* @internal\n* @extends module:ui/labeledfield/labeledfieldview~LabeledFieldView\n*/\nvar SearchTextQueryView = class extends LabeledFieldView {\n\t/**\n\t* The loupe icon displayed next to the {@link #fieldView}.\n\t*/\n\ticonView;\n\t/**\n\t* The button that clears and focuses the {@link #fieldView}.\n\t*/\n\tresetButtonView;\n\t/**\n\t* A reference to the view configuration.\n\t*/\n\t_viewConfig;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, config) {\n\t\tconst t = locale.t;\n\t\tconst viewConfig = Object.assign({}, {\n\t\t\tshowResetButton: true,\n\t\t\tshowIcon: true,\n\t\t\tcreator: createLabeledInputText\n\t\t}, config);\n\t\tsuper(locale, viewConfig.creator);\n\t\tthis.label = config.label;\n\t\tthis._viewConfig = viewConfig;\n\t\tif (this._viewConfig.showIcon) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = IconLoupe;\n\t\t\tthis.fieldWrapperChildren.add(this.iconView, 0);\n\t\t\tthis.extendTemplate({ attributes: { class: \"ck-search__query_with-icon\" } });\n\t\t}\n\t\tif (this._viewConfig.showResetButton) {\n\t\t\tthis.resetButtonView = new ButtonView(locale);\n\t\t\tthis.resetButtonView.set({\n\t\t\t\tlabel: t(\"Clear\"),\n\t\t\t\ticon: IconCancel,\n\t\t\t\tclass: \"ck-search__reset\",\n\t\t\t\tisVisible: false,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tthis.resetButtonView.on(\"execute\", () => {\n\t\t\t\tthis.reset();\n\t\t\t\tthis.focus();\n\t\t\t\tthis.fire(\"reset\");\n\t\t\t});\n\t\t\tthis.resetButtonView.bind(\"isVisible\").to(this.fieldView, \"isEmpty\", (isEmpty) => !isEmpty);\n\t\t\tthis.fieldWrapperChildren.add(this.resetButtonView);\n\t\t\tthis.extendTemplate({ attributes: { class: \"ck-search__query_with-reset\" } });\n\t\t}\n\t}\n\t/**\n\t* Resets the search field to its default state.\n\t*/\n\treset() {\n\t\tthis.fieldView.reset();\n\t\tif (this._viewConfig.showResetButton) this.resetButtonView.isVisible = false;\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* A view displaying an information text related to different states of {@link module:ui/search/text/searchtextview~SearchTextView}.\n*\n* @internal\n*/\nvar SearchInfoView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\tisVisible: false,\n\t\t\tprimaryText: \"\",\n\t\t\tsecondaryText: \"\"\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-search__info\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tchildren: [{ text: [bind.to(\"primaryText\")] }]\n\t\t\t}, {\n\t\t\t\ttag: \"span\",\n\t\t\t\tchildren: [{ text: [bind.to(\"secondaryText\")] }]\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* Focuses the view\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\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 ui/search/searchresultsview\n*/\n/**\n* A sub-component of {@link module:ui/search/text/searchtextview~SearchTextView}. It hosts the filtered and the information views.\n*/\nvar SearchResultsView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the view.\n\t*\n\t* @readonly\n\t*/\n\tfocusTracker;\n\t/**\n\t* The collection of the child views inside of the list item {@link #element}.\n\t*\n\t* @readonly\n\t*/\n\tchildren;\n\t/**\n\t* Provides the focus management (keyboard navigation) in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusCycler;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-search__results\"],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this.children,\n\t\t\tfocusTracker: this.focusTracker\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tfor (const child of this.children) this.focusTracker.add(child.element);\n\t}\n\t/**\n\t* Focuses the view.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the first child view.\n\t*/\n\tfocusFirst() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last child view.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\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 ui/search/text/searchtextview\n*/\n/**\n* A search component that allows filtering of an arbitrary view based on a search query\n* specified by the user in a text field.\n*\n*```ts\n* // This view must specify the `filter()` and `focus()` methods.\n* const filteredView = ...;\n*\n* const searchView = new SearchTextView( locale, {\n* \tsearchFieldLabel: 'Search list items',\n* \tfilteredView\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*/\nvar SearchTextView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the view.\n\t*\n\t* @readonly\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the keystroke handler managing user interaction and accessibility.\n\t*\n\t* @readonly\n\t*/\n\tkeystrokes;\n\t/**\n\t* A view hosting the {@link #filteredView} passed in the configuration and the {@link #infoView}.\n\t*/\n\tresultsView;\n\t/**\n\t* The view that is filtered by the search query.\n\t*/\n\tfilteredView;\n\t/**\n\t* The view that displays the information about the search results.\n\t*/\n\tinfoView;\n\t/**\n\t* The view that allows the user to enter the search query.\n\t*/\n\tqueryView;\n\t/**\n\t* Provides the focus management (keyboard navigation) between {@link #queryView} and {@link #filteredView}.\n\t*\n\t* @readonly\n\t*/\n\tfocusCycler;\n\t/**\n\t* The cached configuration object.\n\t*\n\t* @internal\n\t*/\n\t_config;\n\t/**\n\t* Creates an instance of the {@link module:ui/search/text/searchtextview~SearchTextView} class.\n\t*\n\t* @param locale The localization services instance.\n\t* @param config Configuration of the view.\n\t*/\n\tconstructor(locale, config) {\n\t\tsuper(locale);\n\t\tthis._config = config;\n\t\tthis.filteredView = config.filteredView;\n\t\tthis.queryView = this._createSearchTextQueryView();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.resultsView = new SearchResultsView(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.focusableChildren = this.createCollection([this.queryView, this.resultsView]);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"resultsCount\", 0);\n\t\tthis.set(\"totalItemsCount\", 0);\n\t\tif (config.infoView && config.infoView.instance) this.infoView = config.infoView.instance;\n\t\telse {\n\t\t\tthis.infoView = new SearchInfoView();\n\t\t\tthis._enableDefaultInfoViewBehavior();\n\t\t\tthis.on(\"render\", () => {\n\t\t\t\tthis.search(\"\");\n\t\t\t});\n\t\t}\n\t\tthis.resultsView.children.addMany([this.infoView, this.filteredView]);\n\t\tthis.focusCycler = new FocusCycler({\n\t\t\tfocusables: this.focusableChildren,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.on(\"search\", (evt, { resultsCount, totalItemsCount }) => {\n\t\t\tthis.resultsCount = resultsCount;\n\t\t\tthis.totalItemsCount = totalItemsCount;\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-search\",\n\t\t\t\t\tconfig.class || null\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.addMany([this.queryView, this.resultsView]);\n\t\tconst stopPropagation = (data) => data.stopPropagation();\n\t\tfor (const focusableChild of this.focusableChildren) this.focusTracker.add(focusableChild.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis.keystrokes.set(\"arrowright\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowleft\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowup\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowdown\", stopPropagation);\n\t}\n\t/**\n\t* Focuses the {@link #queryView}.\n\t*/\n\tfocus() {\n\t\tthis.queryView.focus();\n\t}\n\t/**\n\t* Resets the component to its initial state.\n\t*/\n\treset() {\n\t\tthis.queryView.reset();\n\t\tthis.search(\"\");\n\t\tthis.filteredView.element.scrollTo(0, 0);\n\t}\n\t/**\n\t* Searches the {@link #filteredView} for the given query.\n\t*\n\t* @internal\n\t* @param query The search query string.\n\t*/\n\tsearch(query) {\n\t\tconst regExp = query ? new RegExp(escapeRegExp(query), \"ig\") : null;\n\t\tconst filteringResults = this.filteredView.filter(regExp);\n\t\tthis.fire(\"search\", {\n\t\t\tquery,\n\t\t\t...filteringResults\n\t\t});\n\t}\n\t/**\n\t* Creates a search field view based on configured creator..\n\t*/\n\t_createSearchTextQueryView() {\n\t\tconst queryView = new SearchTextQueryView(this.locale, this._config.queryView);\n\t\tthis.listenTo(queryView.fieldView, \"input\", () => {\n\t\t\tthis.search(queryView.fieldView.element.value);\n\t\t});\n\t\tqueryView.on(\"reset\", () => this.reset());\n\t\tqueryView.bind(\"isEnabled\").to(this);\n\t\treturn queryView;\n\t}\n\t/**\n\t* Initializes the default {@link #infoView} behavior with default text labels when no custom info view\n\t* was specified in the view config.\n\t*/\n\t_enableDefaultInfoViewBehavior() {\n\t\tconst t = this.locale.t;\n\t\tconst infoView = this.infoView;\n\t\tthis.on(\"search\", (evt, data) => {\n\t\t\tif (!data.resultsCount) {\n\t\t\t\tconst defaultTextConfig = this._config.infoView && this._config.infoView.text;\n\t\t\t\tlet primaryText, secondaryText;\n\t\t\t\tif (data.totalItemsCount) {\n\t\t\t\t\tif (defaultTextConfig?.notFound) {\n\t\t\t\t\t\tprimaryText = defaultTextConfig.notFound.primary;\n\t\t\t\t\t\tsecondaryText = defaultTextConfig.notFound.secondary;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprimaryText = t(\"No results found\");\n\t\t\t\t\t\tsecondaryText = \"\";\n\t\t\t\t\t}\n\t\t\t\t} else if (defaultTextConfig?.noSearchableItems) {\n\t\t\t\t\tprimaryText = defaultTextConfig.noSearchableItems.primary;\n\t\t\t\t\tsecondaryText = defaultTextConfig.noSearchableItems.secondary;\n\t\t\t\t} else {\n\t\t\t\t\tprimaryText = t(\"No searchable items\");\n\t\t\t\t\tsecondaryText = \"\";\n\t\t\t\t}\n\t\t\t\tinfoView.set({\n\t\t\t\t\tprimaryText: normalizeInfoText(primaryText, data),\n\t\t\t\t\tsecondaryText: normalizeInfoText(secondaryText, data),\n\t\t\t\t\tisVisible: true\n\t\t\t\t});\n\t\t\t} else infoView.set({ isVisible: false });\n\t\t});\n\t\tfunction normalizeInfoText(text, { query, resultsCount, totalItemsCount }) {\n\t\t\treturn typeof text === \"function\" ? text(query, resultsCount, totalItemsCount) : text;\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 ui/autocomplete/autocompleteview\n*/\n/**\n* The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class\n* with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur\n* the component.\n*/\nvar AutocompleteView = class AutocompleteView extends SearchTextView {\n\t/**\n\t* The configuration of the autocomplete view.\n\t*/\n\t_config;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, config) {\n\t\tsuper(locale, config);\n\t\tthis._config = config;\n\t\tconst toPx = toUnit(\"px\");\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-autocomplete\"] } });\n\t\tconst bindResultsView = this.resultsView.bindTemplate;\n\t\tthis.resultsView.set(\"isVisible\", false);\n\t\tthis.resultsView.set(\"_position\", \"s\");\n\t\tthis.resultsView.set(\"_width\", 0);\n\t\tthis.resultsView.extendTemplate({ attributes: {\n\t\t\tclass: [bindResultsView.if(\"isVisible\", \"ck-hidden\", (value) => !value), bindResultsView.to(\"_position\", (value) => `ck-search__results_${value}`)],\n\t\t\tstyle: { width: bindResultsView.to(\"_width\", toPx) }\n\t\t} });\n\t\tthis.focusTracker.on(\"change:isFocused\", (evt, name, isFocused) => {\n\t\t\tthis._updateResultsVisibility();\n\t\t\tif (isFocused) this.resultsView.element.scrollTop = 0;\n\t\t\telse if (config.resetOnBlur) this.queryView.reset();\n\t\t});\n\t\tthis.on(\"search\", () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t});\n\t\tthis.keystrokes.set(\"esc\", (evt, cancel) => {\n\t\t\tif (!this.resultsView.isVisible) return;\n\t\t\tthis.queryView.focus();\n\t\t\tthis.resultsView.isVisible = false;\n\t\t\tcancel();\n\t\t});\n\t\tthis.listenTo(global.document, \"scroll\", () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t});\n\t\tthis.on(\"change:isEnabled\", () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t});\n\t\tthis.filteredView.on(\"execute\", (evt, { value }) => {\n\t\t\tthis.focus();\n\t\t\tthis.reset();\n\t\t\tthis.queryView.fieldView.value = this.queryView.fieldView.element.value = value;\n\t\t\tthis.resultsView.isVisible = false;\n\t\t});\n\t\tthis.resultsView.on(\"change:isVisible\", () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t});\n\t}\n\t/**\n\t* Updates the position of the results view on demand.\n\t*/\n\t_updateResultsViewWidthAndPosition() {\n\t\tif (!this.resultsView.isVisible) return;\n\t\tthis.resultsView._width = new Rect(this.queryView.fieldView.element).width;\n\t\tconst optimalResultsPosition = AutocompleteView._getOptimalPosition({\n\t\t\telement: this.resultsView.element,\n\t\t\ttarget: this.queryView.element,\n\t\t\tfitInViewport: true,\n\t\t\tpositions: AutocompleteView.defaultResultsPositions\n\t\t});\n\t\tthis.resultsView._position = optimalResultsPosition ? optimalResultsPosition.name : \"s\";\n\t}\n\t/**\n\t* Updates the visibility of the results view on demand.\n\t*/\n\t_updateResultsVisibility() {\n\t\tconst queryMinChars = typeof this._config.queryMinChars === \"undefined\" ? 0 : this._config.queryMinChars;\n\t\tconst queryLength = this.queryView.fieldView.element.value.length;\n\t\tthis.resultsView.isVisible = this.focusTracker.isFocused && this.isEnabled && queryLength >= queryMinChars;\n\t}\n\t/**\n\t* Positions for the autocomplete results view. Two positions are defined by default:\n\t* * `s` - below the search field,\n\t* * `n` - above the search field.\n\t*/\n\tstatic defaultResultsPositions = [((fieldRect) => {\n\t\treturn {\n\t\t\ttop: fieldRect.bottom,\n\t\t\tleft: fieldRect.left,\n\t\t\tname: \"s\"\n\t\t};\n\t}), ((fieldRect, resultsRect) => {\n\t\treturn {\n\t\t\ttop: fieldRect.top - resultsRect.height,\n\t\t\tleft: fieldRect.left,\n\t\t\tname: \"n\"\n\t\t};\n\t})];\n\t/**\n\t* A function used to calculate the optimal position for the dropdown panel.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\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 ui/highlightedtext/highlightedtextview\n*/\n/**\n* A class representing a view that displays a text which subset can be highlighted using the\n* {@link #highlightText} method.\n*/\nvar HighlightedTextView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set(\"text\", void 0);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-highlighted-text\"] }\n\t\t});\n\t\tthis.on(\"render\", () => {\n\t\t\tthis.on(\"change:text\", () => {\n\t\t\t\tthis._updateInnerHTML(escape(this.text || \"\"));\n\t\t\t});\n\t\t\tthis._updateInnerHTML(escape(this.text || \"\"));\n\t\t});\n\t}\n\t/**\n\t* Highlights view's {@link #text} according to the specified `RegExp`. If the passed RegExp is `null`, the\n\t* highlighting is removed\n\t*\n\t* @param regExp\n\t*/\n\thighlightText(regExp) {\n\t\tthis._updateInnerHTML(markText(this.text || \"\", regExp));\n\t}\n\t/**\n\t* Updates element's `innerHTML` with the passed content.\n\t*/\n\t_updateInnerHTML(newInnerHTML) {\n\t\tthis.element.innerHTML = newInnerHTML || \"\";\n\t}\n};\n/**\n* Replaces `regExp` occurrences with `<mark>` tags in a text.\n*\n* @param text A text to get marked.\n* @param regExp An optional `RegExp`. If not passed, this is a pass-through function.\n* @returns A text with `RegExp` occurrences marked by `<mark>`.\n*/\nfunction markText(text, regExp) {\n\tif (!regExp) return escape(text);\n\tconst textParts = [];\n\tlet lastMatchEnd = 0;\n\tlet matchInfo = regExp.exec(text);\n\twhile (matchInfo !== null) {\n\t\tconst curMatchStart = matchInfo.index;\n\t\tif (curMatchStart !== lastMatchEnd) textParts.push({\n\t\t\ttext: text.substring(lastMatchEnd, curMatchStart),\n\t\t\tisMatch: false\n\t\t});\n\t\ttextParts.push({\n\t\t\ttext: matchInfo[0],\n\t\t\tisMatch: true\n\t\t});\n\t\tlastMatchEnd = regExp.lastIndex;\n\t\tmatchInfo = regExp.exec(text);\n\t}\n\tif (lastMatchEnd !== text.length) textParts.push({\n\t\ttext: text.substring(lastMatchEnd),\n\t\tisMatch: false\n\t});\n\treturn textParts.map((part) => {\n\t\tpart.text = escape(part.text);\n\t\treturn part;\n\t}).map((part) => part.isMatch ? `<mark>${part.text}</mark>` : part.text).join(\"\");\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* A button label view that can highlight a text fragment.\n*/\nvar ButtonLabelWithHighlightView = class extends HighlightedTextView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set({\n\t\t\tstyle: void 0,\n\t\t\ttext: void 0,\n\t\t\tid: void 0\n\t\t});\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-button__label\"],\n\t\t\tstyle: bind.to(\"style\"),\n\t\t\tid: bind.to(\"id\")\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 ui/highlightedtext/labelwithhighlightview\n*/\n/**\n* A label view that can highlight a text fragment.\n*/\nvar LabelWithHighlightView = class extends HighlightedTextView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tid;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set(\"for\", void 0);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.id = `ck-editor__label_${uid()}`;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck\", \"ck-label\"],\n\t\t\tid: this.id,\n\t\t\tfor: bind.to(\"for\")\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 ui/spinner/spinnerview\n*/\n/**\n* The spinner view class.\n*/\nvar SpinnerView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set(\"isVisible\", false);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-spinner-container\",\n\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t] },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-spinner\"] }\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 ui/toolbar/balloon/balloontoolbar\n*/\nconst toPx$2 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The contextual toolbar.\n*\n* It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n*/\nvar BalloonToolbar = class extends Plugin {\n\t/**\n\t* The toolbar view displayed in the balloon.\n\t*/\n\ttoolbarView;\n\t/**\n\t* Tracks the focus of the {@link module:ui/editorui/editorui~EditorUI#getEditableElement editable element}\n\t* and the {@link #toolbarView}. When both are blurred then the toolbar should hide.\n\t*/\n\tfocusTracker;\n\t/**\n\t* A cached and normalized `config.balloonToolbar` object.\n\t*/\n\t_balloonConfig;\n\t/**\n\t* An instance of the resize observer that allows to respond to changes in editable's geometry\n\t* so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t*\n\t* **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#balloonToolbar configuration}.\n\t*\n\t* **Note:** Created in {@link #init}.\n\t*/\n\t_resizeObserver = null;\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* Fires `_selectionChangeDebounced` event using `es-toolkit#debounce`.\n\t*\n\t* This event is an internal plugin event which is fired 200 ms after model selection last change.\n\t* This is to makes easy test debounced action without need to use `setTimeout`.\n\t*\n\t* This function is stored as a plugin property to make possible to cancel\n\t* trailing debounced invocation on destroy.\n\t*/\n\t_fireSelectionChangeDebounced;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"BalloonToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._balloonConfig = normalizeToolbarConfig(editor.config.get(\"balloonToolbar\"));\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._trackFocusableEditableElements();\n\t\tthis.focusTracker.add(this.toolbarView);\n\t\teditor.ui.addToolbar(this.toolbarView, {\n\t\t\tbeforeFocus: () => this.show(true),\n\t\t\tafterBlur: () => this.hide(),\n\t\t\tisContextual: true\n\t\t});\n\t\tthis._balloon = editor.plugins.get(ContextualBalloon);\n\t\tthis._fireSelectionChangeDebounced = debounce(() => this.fire(\"_selectionChangeDebounced\"), 200);\n\t\tthis.decorate(\"show\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tthis.listenTo(this.focusTracker, \"change:isFocused\", (evt, name, isFocused) => {\n\t\t\tif (!isFocused && this._isToolbarVisible) this.hide();\n\t\t\telse if (isFocused) this.show();\n\t\t});\n\t\tthis.listenTo(selection, \"change:range\", (evt, data) => {\n\t\t\tif (data.directChange || selection.isCollapsed) this.hide();\n\t\t\tthis._fireSelectionChangeDebounced();\n\t\t});\n\t\tthis.listenTo(this, \"_selectionChangeDebounced\", () => {\n\t\t\tif (this.editor.editing.view.document.isFocused) this.show();\n\t\t});\n\t\tif (!this._balloonConfig.shouldNotGroupWhenFull) this.listenTo(editor, \"ready\", () => {\n\t\t\tconst editableElement = editor.ui.view.editable.element;\n\t\t\tthis._resizeObserver = new ResizeObserver(editableElement, (entry) => {\n\t\t\t\tthis.toolbarView.maxWidth = toPx$2(entry.contentRect.width * .9);\n\t\t\t});\n\t\t});\n\t\tthis.listenTo(this.toolbarView, \"groupedItemsUpdate\", () => {\n\t\t\tthis._updatePosition();\n\t\t});\n\t\teditor.ui.once(\"ready\", () => {\n\t\t\tthis.toolbarView.fillFromConfig(this._balloonConfig, this.editor.ui.componentFactory);\n\t\t});\n\t}\n\t/**\n\t* Returns whether the toolbar is visible in the ContextualBalloon.\n\t*/\n\tget _isToolbarVisible() {\n\t\treturn this._balloon.visibleView === this.toolbarView;\n\t}\n\t/**\n\t* Creates the toolbar view instance.\n\t*/\n\t_createToolbarView() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._balloonConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView(this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t});\n\t\ttoolbarView.ariaLabel = t(\"Editor contextual toolbar\");\n\t\ttoolbarView.render();\n\t\treturn toolbarView;\n\t}\n\t/**\n\t* Shows the toolbar and attaches it to the selection.\n\t*\n\t* Fires {@link #event:show} event which can be stopped to prevent the toolbar from showing up.\n\t*\n\t* @param showForCollapsedSelection When set `true`, the toolbar will show despite collapsed selection in the\n\t* editing view.\n\t*/\n\tshow(showForCollapsedSelection = false) {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst schema = editor.model.schema;\n\t\tif (this._balloon.hasView(this.toolbarView)) return;\n\t\tif (selection.isCollapsed && !showForCollapsedSelection) return;\n\t\tif (selectionContainsOnlyMultipleSelectables(selection, schema)) return;\n\t\tif (Array.from(this.toolbarView.items).every((item) => item.isEnabled !== void 0 && !item.isEnabled)) return;\n\t\tthis.listenTo(this.editor.ui, \"update\", () => {\n\t\t\tthis._updatePosition();\n\t\t});\n\t\tthis._balloon.add({\n\t\t\tview: this.toolbarView,\n\t\t\tposition: this._getBalloonPositionData(),\n\t\t\tballoonClassName: \"ck-toolbar-container\"\n\t\t});\n\t}\n\t/**\n\t* Hides the toolbar.\n\t*/\n\thide() {\n\t\tif (this._balloon.hasView(this.toolbarView)) {\n\t\t\tthis.stopListening(this.editor.ui, \"update\");\n\t\t\tthis._balloon.remove(this.toolbarView);\n\t\t}\n\t}\n\t/**\n\t* Add or remove editable elements to the focus tracker. It watches added and removed roots\n\t* and adds or removes their editable elements to the focus tracker.\n\t*/\n\t_trackFocusableEditableElements() {\n\t\tconst { editor, focusTracker } = this;\n\t\tconst { editing } = editor;\n\t\tediting.view.addObserver(class TrackEditableElements extends Observer {\n\t\t\t/**\n\t\t\t* @inheritDoc\n\t\t\t*/\n\t\t\tobserve(domElement) {\n\t\t\t\tfocusTracker.add(domElement);\n\t\t\t}\n\t\t\t/**\n\t\t\t* @inheritDoc\n\t\t\t*/\n\t\t\tstopObserving(domElement) {\n\t\t\t\tfocusTracker.remove(domElement);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Returns positioning options for the {@link #_balloon}. They control the way balloon is attached\n\t* to the selection.\n\t*/\n\t_getBalloonPositionData() {\n\t\tconst view = this.editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst viewSelection = viewDocument.selection;\n\t\tconst isBackward = viewDocument.selection.isBackward;\n\t\treturn {\n\t\t\ttarget: () => {\n\t\t\t\tconst range = isBackward ? viewSelection.getFirstRange() : viewSelection.getLastRange();\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects(view.domConverter.viewRangeToDom(range));\n\t\t\t\tif (isBackward) return rangeRects[0];\n\t\t\t\telse {\n\t\t\t\t\tif (rangeRects.length > 1 && rangeRects[rangeRects.length - 1].width === 0) rangeRects.pop();\n\t\t\t\t\treturn rangeRects[rangeRects.length - 1];\n\t\t\t\t}\n\t\t\t},\n\t\t\tpositions: this._getBalloonPositions(isBackward)\n\t\t};\n\t}\n\t/**\n\t* Updates the position of the {@link #_balloon} to make up for changes:\n\t*\n\t* * in the geometry of the selection it is attached to (e.g. the selection moved in the viewport or expanded or shrunk),\n\t* * or the geometry of the balloon toolbar itself (e.g. the toolbar has grouped or ungrouped some items and it is shorter or longer).\n\t*/\n\t_updatePosition() {\n\t\tif (this._isToolbarVisible) this._balloon.updatePosition(this._getBalloonPositionData());\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.stopListening();\n\t\tthis._fireSelectionChangeDebounced.cancel();\n\t\tthis.toolbarView.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tif (this._resizeObserver) this._resizeObserver.destroy();\n\t}\n\t/**\n\t* Returns toolbar positions for the given direction of the selection.\n\t*/\n\t_getBalloonPositions(isBackward) {\n\t\tconst positions = env.isSafari && env.isiOS ? BalloonPanelView.generatePositions({ heightOffset: Math.max(BalloonPanelView.arrowHeightOffset, Math.round(20 / global.window.visualViewport.scale)) }) : BalloonPanelView.defaultPositions;\n\t\treturn isBackward ? [\n\t\t\tpositions.northWestArrowSouth,\n\t\t\tpositions.northWestArrowSouthWest,\n\t\t\tpositions.northWestArrowSouthEast,\n\t\t\tpositions.northWestArrowSouthMiddleEast,\n\t\t\tpositions.northWestArrowSouthMiddleWest,\n\t\t\tpositions.southWestArrowNorth,\n\t\t\tpositions.southWestArrowNorthWest,\n\t\t\tpositions.southWestArrowNorthEast,\n\t\t\tpositions.southWestArrowNorthMiddleWest,\n\t\t\tpositions.southWestArrowNorthMiddleEast\n\t\t] : [\n\t\t\tpositions.southEastArrowNorth,\n\t\t\tpositions.southEastArrowNorthEast,\n\t\t\tpositions.southEastArrowNorthWest,\n\t\t\tpositions.southEastArrowNorthMiddleEast,\n\t\t\tpositions.southEastArrowNorthMiddleWest,\n\t\t\tpositions.northEastArrowSouth,\n\t\t\tpositions.northEastArrowSouthEast,\n\t\t\tpositions.northEastArrowSouthWest,\n\t\t\tpositions.northEastArrowSouthMiddleEast,\n\t\t\tpositions.northEastArrowSouthMiddleWest\n\t\t];\n\t}\n};\n/**\n* Returns \"true\" when the selection has multiple ranges and each range contains a selectable element\n* and nothing else.\n*/\nfunction selectionContainsOnlyMultipleSelectables(selection, schema) {\n\tif (selection.rangeCount === 1) return false;\n\treturn [...selection.getRanges()].every((range) => {\n\t\tconst element = range.getContainedElement();\n\t\treturn element && schema.isSelectable(element);\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 ui/toolbar/block/blockbuttonview\n*/\nconst toPx$1 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The block button view class.\n*\n* This view represents a button attached next to block element where the selection is anchored.\n*\n* See {@link module:ui/toolbar/block/blocktoolbar~BlockToolbar}.\n*/\nvar BlockButtonView = class extends ButtonView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.isVisible = false;\n\t\tthis.isToggleable = true;\n\t\tthis.set(\"top\", 0);\n\t\tthis.set(\"left\", 0);\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: \"ck-block-toolbar-button\",\n\t\t\tstyle: {\n\t\t\t\ttop: bind.to(\"top\", (val) => toPx$1(val)),\n\t\t\t\tleft: bind.to(\"left\", (val) => toPx$1(val))\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 ui/toolbar/block/blocktoolbar\n*/\nconst toPx = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The block toolbar plugin.\n*\n* This plugin provides a button positioned next to the block of content where the selection is anchored.\n* Upon clicking the button, a dropdown providing access to editor features shows up, as configured in\n* {@link module:core/editor/editorconfig~EditorConfig#blockToolbar}.\n*\n* By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~ModelSchema}\n* as `$block` for which the toolbar provides at least one option.\n*\n* By default, the button is attached so its right boundary is touching the\n* {@link module:engine/view/editableelement~ViewEditableElement}:\n*\n* ```\n*  __ |\n* |  ||  This is a block of content that the\n*  ¯¯ |  button is attached to. This is a\n*     |  block of content that the button is\n*     |  attached to.\n* ```\n*\n* The position of the button can be adjusted using the CSS `transform` property:\n*\n* ```css\n* .ck-block-toolbar-button {\n* \ttransform: translateX( -10px );\n* }\n* ```\n*\n* ```\n*  __   |\n* |  |  |  This is a block of content that the\n*  ¯¯   |  button is attached to. This is a\n*       |  block of content that the button is\n*       |  attached to.\n* ```\n*\n* **Note**: If you plan to run the editor in a right–to–left (RTL) language, keep in mind the button\n* will be attached to the **right** boundary of the editable area. In that case, make sure the\n* CSS position adjustment works properly by adding the following styles:\n*\n* ```css\n* .ck[dir=\"rtl\"] .ck-block-toolbar-button {\n* \ttransform: translateX( 10px );\n* }\n* ```\n*/\nvar BlockToolbar = class extends Plugin {\n\t/**\n\t* The toolbar view.\n\t*/\n\ttoolbarView;\n\t/**\n\t* The balloon panel view, containing the {@link #toolbarView}.\n\t*/\n\tpanelView;\n\t/**\n\t* The button view that opens the {@link #toolbarView}.\n\t*/\n\tbuttonView;\n\t/**\n\t* An instance of the resize observer that allows to respond to changes in editable's geometry\n\t* so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t*\n\t* **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#blockToolbar configuration}.\n\t*/\n\t_resizeObserver = null;\n\t/**\n\t* A cached and normalized `config.blockToolbar` object.\n\t*/\n\t_blockToolbarConfig;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"BlockToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._blockToolbarConfig = normalizeToolbarConfig(this.editor.config.get(\"blockToolbar\"));\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.panelView = this._createPanelView();\n\t\tthis.buttonView = this._createButtonView();\n\t\tclickOutsideHandler({\n\t\t\temitter: this.panelView,\n\t\t\tcontextElements: [this.panelView.element, this.buttonView.element],\n\t\t\tactivator: () => this.panelView.isVisible,\n\t\t\tcallback: () => this._hidePanel()\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst editBlockText = t(\"Click to edit block\");\n\t\tconst dragToMoveText = t(\"Drag to move\");\n\t\tconst editBlockLabel = t(\"Edit block\");\n\t\tconst isDragDropBlockToolbarPluginLoaded = editor.plugins.has(\"DragDropBlockToolbar\");\n\t\tconst label = isDragDropBlockToolbarPluginLoaded ? `${editBlockText}\\n${dragToMoveText}` : editBlockLabel;\n\t\tthis.buttonView.label = label;\n\t\tif (isDragDropBlockToolbarPluginLoaded) this.buttonView.element.dataset.ckeTooltipClass = \"ck-tooltip_multi-line\";\n\t\tthis.listenTo(editor.model.document.selection, \"change:range\", (evt, data) => {\n\t\t\tif (data.directChange) this._hidePanel();\n\t\t});\n\t\tthis.listenTo(editor.ui, \"update\", () => this._updateButton());\n\t\tthis.listenTo(editor, \"change:isReadOnly\", () => this._updateButton(), { priority: \"low\" });\n\t\tthis.listenTo(editor.ui.focusTracker, \"change:isFocused\", () => this._updateButton());\n\t\tthis.listenTo(this.buttonView, \"change:isVisible\", (evt, name, isVisible) => {\n\t\t\tif (isVisible) this.buttonView.listenTo(window, \"resize\", () => this._updateButton());\n\t\t\telse {\n\t\t\t\tthis.buttonView.stopListening(window, \"resize\");\n\t\t\t\tthis._hidePanel();\n\t\t\t}\n\t\t});\n\t\tthis._repositionButtonOnScroll();\n\t\teditor.ui.addToolbar(this.toolbarView, {\n\t\t\tbeforeFocus: () => this._showPanel(),\n\t\t\tafterBlur: () => this._hidePanel()\n\t\t});\n\t\teditor.ui.once(\"ready\", () => {\n\t\t\tthis.toolbarView.fillFromConfig(this._blockToolbarConfig, this.editor.ui.componentFactory);\n\t\t\tfor (const item of this.toolbarView.items) item.on(\"execute\", () => this._hidePanel(true), { priority: \"high\" });\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.panelView.destroy();\n\t\tthis.buttonView.destroy();\n\t\tthis.toolbarView.destroy();\n\t\tif (this._resizeObserver) this._resizeObserver.destroy();\n\t}\n\t/**\n\t* Creates the {@link #toolbarView}.\n\t*/\n\t_createToolbarView() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._blockToolbarConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView(this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t});\n\t\ttoolbarView.ariaLabel = t(\"Editor block content toolbar\");\n\t\treturn toolbarView;\n\t}\n\t/**\n\t* Creates the {@link #panelView}.\n\t*/\n\t_createPanelView() {\n\t\tconst editor = this.editor;\n\t\tconst panelView = new BalloonPanelView(editor.locale);\n\t\tpanelView.content.add(this.toolbarView);\n\t\tpanelView.class = \"ck-toolbar-container\";\n\t\teditor.ui.view.body.add(panelView);\n\t\tthis.toolbarView.keystrokes.set(\"Esc\", (evt, cancel) => {\n\t\t\tthis._hidePanel(true);\n\t\t\tcancel();\n\t\t});\n\t\treturn panelView;\n\t}\n\t/**\n\t* Creates the {@link #buttonView}.\n\t*/\n\t_createButtonView() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst buttonView = new BlockButtonView(editor.locale);\n\t\tconst iconFromConfig = this._blockToolbarConfig.icon;\n\t\tconst icon = NESTED_TOOLBAR_ICONS[iconFromConfig] || iconFromConfig || NESTED_TOOLBAR_ICONS.dragIndicator;\n\t\tbuttonView.set({\n\t\t\tlabel: t(\"Edit block\"),\n\t\t\ticon,\n\t\t\twithText: false\n\t\t});\n\t\tbuttonView.bind(\"isOn\").to(this.panelView, \"isVisible\");\n\t\tbuttonView.bind(\"tooltip\").to(this.panelView, \"isVisible\", (isVisible) => !isVisible);\n\t\tthis.listenTo(buttonView, \"execute\", () => {\n\t\t\tif (!this.panelView.isVisible) this._showPanel();\n\t\t\telse this._hidePanel(true);\n\t\t});\n\t\tthis.listenTo(buttonView, \"change:isEnabled\", (evt, name, isEnabled) => {\n\t\t\tif (!isEnabled && this.panelView.isVisible) this._hidePanel(false);\n\t\t});\n\t\teditor.ui.view.body.add(buttonView);\n\t\treturn buttonView;\n\t}\n\t/**\n\t* Shows or hides the button.\n\t* When all the conditions for displaying the button are matched, it shows the button. Hides otherwise.\n\t*/\n\t_updateButton() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tif (!editor.ui.focusTracker.isFocused) {\n\t\t\tthis._hideButton();\n\t\t\treturn;\n\t\t}\n\t\tif (!editor.model.canEditAt(editor.model.document.selection)) {\n\t\t\tthis._hideButton();\n\t\t\treturn;\n\t\t}\n\t\tconst modelTarget = Array.from(model.document.selection.getSelectedBlocks())[0];\n\t\tif (!modelTarget || Array.from(this.toolbarView.items).every((item) => !item.isEnabled)) {\n\t\t\tthis._hideButton();\n\t\t\treturn;\n\t\t}\n\t\tconst domTarget = view.domConverter.mapViewToDom(editor.editing.mapper.toViewElement(modelTarget));\n\t\tthis.buttonView.isVisible = true;\n\t\tthis._setupToolbarResize();\n\t\tthis._attachButtonToElement(domTarget);\n\t\tif (this.panelView.isVisible) this._showPanel();\n\t}\n\t/**\n\t* Hides the button.\n\t*/\n\t_hideButton() {\n\t\tthis.buttonView.isVisible = false;\n\t}\n\t/**\n\t* Shows the {@link #toolbarView} attached to the {@link #buttonView}.\n\t* If the toolbar is already visible, then it simply repositions it.\n\t*/\n\t_showPanel() {\n\t\tif (!this.buttonView.isVisible) return;\n\t\tconst wasVisible = this.panelView.isVisible;\n\t\tthis.panelView.show();\n\t\tconst editableElement = this._getSelectedEditableElement();\n\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth(editableElement);\n\t\tthis.panelView.pin({\n\t\t\ttarget: this.buttonView.element,\n\t\t\tlimiter: editableElement\n\t\t});\n\t\tif (!wasVisible) this.toolbarView.items.get(0).focus();\n\t}\n\t/**\n\t* Returns currently selected editable, based on the model selection.\n\t*/\n\t_getSelectedEditableElement() {\n\t\tconst selectedModelRootName = this.editor.model.document.selection.getFirstRange().root.rootName;\n\t\treturn this.editor.ui.getEditableElement(selectedModelRootName);\n\t}\n\t/**\n\t* Hides the {@link #toolbarView}.\n\t*\n\t* @param focusEditable When `true`, the editable will be focused after hiding the panel.\n\t*/\n\t_hidePanel(focusEditable) {\n\t\tthis.panelView.isVisible = false;\n\t\tif (focusEditable) this.editor.editing.view.focus();\n\t}\n\t/**\n\t* Repositions the button on scroll.\n\t*/\n\t_repositionButtonOnScroll() {\n\t\tconst { buttonView } = this;\n\t\tlet pendingAnimationFrame = false;\n\t\tconst repositionOnScroll = (evt, domEvt) => {\n\t\t\tif (pendingAnimationFrame) return;\n\t\t\tconst editableElement = this._getSelectedEditableElement();\n\t\t\tif (domEvt.target !== global.document && !getAncestors(editableElement).includes(domEvt.target)) return;\n\t\t\tpendingAnimationFrame = true;\n\t\t\tglobal.window.requestAnimationFrame(() => {\n\t\t\t\tthis._updateButton();\n\t\t\t\tpendingAnimationFrame = false;\n\t\t\t});\n\t\t};\n\t\tbuttonView.on(\"change:isVisible\", (evt, name, isVisible) => {\n\t\t\tif (isVisible) buttonView.listenTo(global.document, \"scroll\", repositionOnScroll, {\n\t\t\t\tuseCapture: true,\n\t\t\t\tusePassive: true\n\t\t\t});\n\t\t\telse buttonView.stopListening(global.document, \"scroll\", repositionOnScroll);\n\t\t});\n\t}\n\t/**\n\t* Attaches the {@link #buttonView} to the target block of content.\n\t*\n\t* @param targetElement Target element.\n\t*/\n\t_attachButtonToElement(targetElement) {\n\t\tconst buttonElement = this.buttonView.element;\n\t\tconst editableElement = this._getSelectedEditableElement();\n\t\tconst contentStyles = window.getComputedStyle(targetElement);\n\t\tconst editableRect = new Rect(editableElement);\n\t\tconst contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n\t\tconst contentLineHeight = parseInt(contentStyles.lineHeight, 10) || parseInt(contentStyles.fontSize, 10) * 1.2;\n\t\tconst buttonRect = new Rect(buttonElement);\n\t\tconst contentRect = new Rect(targetElement);\n\t\tlet positionLeft;\n\t\tif (this.editor.locale.uiLanguageDirection === \"ltr\") positionLeft = editableRect.left - buttonRect.width;\n\t\telse positionLeft = editableRect.right;\n\t\tconst positionTop = contentRect.top + contentPaddingTop + (contentLineHeight - buttonRect.height) / 2;\n\t\tbuttonRect.moveTo(positionLeft, positionTop);\n\t\tconst absoluteButtonRect = buttonRect.toAbsoluteRect();\n\t\tthis.buttonView.top = absoluteButtonRect.top;\n\t\tthis.buttonView.left = absoluteButtonRect.left;\n\t\tthis._clipButtonToViewport(this.buttonView, editableElement);\n\t}\n\t/**\n\t* Clips the button element to the viewport of the editable element.\n\t*\n\t* \t* If the button overflows the editable viewport, it is clipped to make it look like it's cut off by the editable scrollable region.\n\t* \t* If the button is fully hidden by the top of the editable, it is not clickable but still visible in the DOM.\n\t*\n\t* @param buttonView The button view to clip.\n\t* @param editableElement The editable element whose viewport is used for clipping.\n\t*/\n\t_clipButtonToViewport(buttonView, editableElement) {\n\t\tconst absoluteButtonRect = new Rect(buttonView.element);\n\t\tconst scrollViewportRect = new Rect(editableElement).getVisible();\n\t\tconst setButtonClipping = (...paths) => {\n\t\t\tbuttonView.element.style.clipPath = paths.length ? `polygon(${paths.join(\",\")})` : \"\";\n\t\t};\n\t\tconst markAsHidden = (isHidden) => {\n\t\t\tbuttonView.isEnabled = !isHidden;\n\t\t\tbuttonView.element.style.pointerEvents = isHidden ? \"none\" : \"\";\n\t\t};\n\t\tif (scrollViewportRect && scrollViewportRect.bottom < absoluteButtonRect.bottom) {\n\t\t\tconst delta = Math.min(absoluteButtonRect.height, absoluteButtonRect.bottom - scrollViewportRect.bottom);\n\t\t\tmarkAsHidden(delta >= absoluteButtonRect.height);\n\t\t\tsetButtonClipping(\"0 0\", \"100% 0\", `100% calc(100% - ${toPx(delta)})`, `0 calc(100% - ${toPx(delta)}`);\n\t\t} else if (scrollViewportRect && scrollViewportRect.top > absoluteButtonRect.top) {\n\t\t\tconst delta = Math.min(absoluteButtonRect.height, scrollViewportRect.top - absoluteButtonRect.top);\n\t\t\tmarkAsHidden(delta >= absoluteButtonRect.height);\n\t\t\tsetButtonClipping(`0 ${toPx(delta)}`, `100% ${toPx(delta)}`, \"100% 100%\", \"0 100%\");\n\t\t} else {\n\t\t\tmarkAsHidden(false);\n\t\t\tsetButtonClipping();\n\t\t}\n\t}\n\t/**\n\t* Creates a resize observer that observes selected editable and resizes the toolbar panel accordingly.\n\t*/\n\t_setupToolbarResize() {\n\t\tconst editableElement = this._getSelectedEditableElement();\n\t\tif (!this._blockToolbarConfig.shouldNotGroupWhenFull) {\n\t\t\tif (this._resizeObserver && this._resizeObserver.element !== editableElement) {\n\t\t\t\tthis._resizeObserver.destroy();\n\t\t\t\tthis._resizeObserver = null;\n\t\t\t}\n\t\t\tif (!this._resizeObserver) this._resizeObserver = new ResizeObserver(editableElement, () => {\n\t\t\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth(editableElement);\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Gets the {@link #toolbarView} max-width, based on given `editableElement` width plus the distance between the farthest\n\t* edge of the {@link #buttonView} and the editable.\n\t*\n\t* @returns A maximum width that toolbar can have, in pixels.\n\t*/\n\t_getToolbarMaxWidth(editableElement) {\n\t\tconst editableRect = new Rect(editableElement);\n\t\tconst buttonRect = new Rect(this.buttonView.element);\n\t\tconst offset = this.editor.locale.uiLanguageDirection === \"rtl\" ? buttonRect.left - editableRect.right + buttonRect.width : editableRect.left - buttonRect.left;\n\t\treturn toPx(editableRect.width + offset);\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 ui/menubar/menubarmenubuttonview\n*/\n/**\n* A menu {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#buttonView} class. Buttons like this one\n* open both top-level bar menus as well as sub-menus.\n*/\nvar MenuBarMenuButtonView = class extends ListItemButtonView {\n\t/**\n\t* An icon that displays an arrow to indicate a direction of the menu.\n\t*/\n\tarrowView;\n\t/**\n\t* Creates an instance of the menu bar button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.extendTemplate({\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-menu-bar__menu__button\"],\n\t\t\t\t\"aria-haspopup\": true,\n\t\t\t\t\"aria-expanded\": this.bindTemplate.to(\"isOn\", (value) => String(value)),\n\t\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOn\")\n\t\t\t},\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.arrowView);\n\t}\n\t/**\n\t* Creates the {@link #arrowView} instance.\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new IconView();\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: { class: \"ck-menu-bar__menu__button__arrow\" } });\n\t\treturn arrowView;\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* A view representing a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} of a menu.\n*/\nvar MenuBarMenuPanelView = class extends View {\n\t/**\n\t* Collection of the child views in this panel.\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the menu panel view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"position\", \"se\");\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-menu-bar__menu__panel\",\n\t\t\t\t\tbind.to(\"position\", (value) => `ck-menu-bar__menu__panel_position_${value}`),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { selectstart: bind.to((evt) => {\n\t\t\t\tif (evt.target.tagName.toLocaleLowerCase() === \"input\") return;\n\t\t\t\tevt.preventDefault();\n\t\t\t}) }\n\t\t});\n\t}\n\t/**\n\t* Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t*/\n\tfocus(direction = 1) {\n\t\tif (this.children.length) {\n\t\t\tif (direction === 1) this.children.first.focus();\n\t\t\telse this.children.last.focus();\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 ui/menubar/menubarmenuview\n*/\n/**\n* A menu view for the {@link module:ui/menubar/menubarview~MenuBarView}. Menus are building blocks of the menu bar,\n* they host other sub-menus and menu items (buttons) that users can interact with.\n*/\nvar MenuBarMenuView = class MenuBarMenuView extends View {\n\t/**\n\t* Button of the menu view.\n\t*/\n\tbuttonView;\n\t/**\n\t* Panel of the menu. It hosts children of the menu.\n\t*/\n\tpanelView;\n\t/**\n\t* Tracks information about the DOM focus in the menu.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the menu.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Creates an instance of the menu view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.buttonView = new MenuBarMenuButtonView(locale);\n\t\tthis.buttonView.delegate(\"mouseenter\").to(this);\n\t\tthis.buttonView.bind(\"isOn\", \"isEnabled\").to(this, \"isOpen\", \"isEnabled\");\n\t\tthis.panelView = new MenuBarMenuPanelView(locale);\n\t\tthis.panelView.bind(\"isVisible\").to(this, \"isOpen\");\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.set(\"isOpen\", false);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"panelPosition\", \"w\");\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"parentMenuView\", null);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-menu-bar__menu\",\n\t\t\t\tbind.to(\"class\"),\n\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value),\n\t\t\t\tbind.if(\"parentMenuView\", \"ck-menu-bar__menu_top-level\", (value) => !value)\n\t\t\t] },\n\t\t\tchildren: [this.buttonView, this.panelView]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.buttonView.element);\n\t\tthis.focusTracker.add(this.panelView.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tMenuBarMenuBehaviors.closeOnEscKey(this);\n\t\tthis._closeOnDisabled();\n\t\tthis._repositionPanelOnOpen();\n\t}\n\t/**\n\t* Attach all keyboard behaviors for the menu bar view.\n\t*\n\t* @internal\n\t*/\n\t_attachBehaviors() {\n\t\tif (!this.parentMenuView) {\n\t\t\tthis._propagateArrowKeystrokeEvents();\n\t\t\tMenuBarMenuBehaviors.openAndFocusPanelOnArrowDownKey(this);\n\t\t\tMenuBarMenuBehaviors.toggleOnButtonClick(this);\n\t\t} else {\n\t\t\tMenuBarMenuBehaviors.openOnButtonClick(this);\n\t\t\tMenuBarMenuBehaviors.openOnArrowRightKey(this);\n\t\t\tMenuBarMenuBehaviors.closeOnArrowLeftKey(this);\n\t\t\tMenuBarMenuBehaviors.openAndFocusOnEnterKeyPress(this);\n\t\t\tMenuBarMenuBehaviors.closeOnParentClose(this);\n\t\t}\n\t}\n\t/**\n\t* Fires `arrowright` and `arrowleft` events when the user pressed corresponding arrow keys.\n\t*/\n\t_propagateArrowKeystrokeEvents() {\n\t\tthis.keystrokes.set(\"arrowright\", (data, cancel) => {\n\t\t\tthis.fire(\"arrowright\");\n\t\t\tcancel();\n\t\t});\n\t\tthis.keystrokes.set(\"arrowleft\", (data, cancel) => {\n\t\t\tthis.fire(\"arrowleft\");\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Closes the menu whenever it gets disabled to avoid leaving an open panel in a non-interactive state.\n\t*/\n\t_closeOnDisabled() {\n\t\tthis.on(\"change:isEnabled\", (evt, name, isEnabled) => {\n\t\t\tif (!isEnabled) this.isOpen = false;\n\t\t});\n\t}\n\t/**\n\t* Sets the position of the panel when the menu opens. The panel is positioned\n\t* so that it optimally uses the available space in the viewport.\n\t*/\n\t_repositionPanelOnOpen() {\n\t\tthis.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen) return;\n\t\t\tconst optimalPanelPosition = MenuBarMenuView._getOptimalPosition({\n\t\t\t\telement: this.panelView.element,\n\t\t\t\ttarget: this.buttonView.element,\n\t\t\t\tfitInViewport: true,\n\t\t\t\tpositions: this._panelPositions\n\t\t\t});\n\t\t\tthis.panelView.position = optimalPanelPosition ? optimalPanelPosition.name : this._defaultMenuPositionName;\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t/**\n\t* Positioning functions for the {@link #panelView} . They change depending on the role of the menu (top-level vs sub-menu) in\n\t* the {@link module:ui/menubar/menubarview~MenuBarView menu bar} and the UI language direction.\n\t*/\n\tget _panelPositions() {\n\t\tconst { southEast, southWest, northEast, northWest, westSouth, eastSouth, westNorth, eastNorth } = MenuBarMenuViewPanelPositioningFunctions;\n\t\tif (this.locale.uiLanguageDirection === \"ltr\") {\n\t\t\tif (this.parentMenuView) return [\n\t\t\t\teastSouth,\n\t\t\t\teastNorth,\n\t\t\t\twestSouth,\n\t\t\t\twestNorth\n\t\t\t];\n\t\t\telse return [\n\t\t\t\tsouthEast,\n\t\t\t\tsouthWest,\n\t\t\t\tnorthEast,\n\t\t\t\tnorthWest\n\t\t\t];\n\t\t} else if (this.parentMenuView) return [\n\t\t\twestSouth,\n\t\t\twestNorth,\n\t\t\teastSouth,\n\t\t\teastNorth\n\t\t];\n\t\telse return [\n\t\t\tsouthWest,\n\t\t\tsouthEast,\n\t\t\tnorthWest,\n\t\t\tnorthEast\n\t\t];\n\t}\n\t/**\n\t* The default position of the panel when the menu is opened.\n\t* It is used when the optimal position cannot be calculated.\n\t*/\n\tget _defaultMenuPositionName() {\n\t\tif (this.locale.uiLanguageDirection === \"ltr\") {\n\t\t\tif (this.parentMenuView) return \"es\";\n\t\t\telse return \"se\";\n\t\t} else if (this.parentMenuView) return \"ws\";\n\t\telse return \"sw\";\n\t}\n\t/**\n\t* A function used to calculate the optimal position for the dropdown panel.\n\t*\n\t* Referenced for unit testing purposes.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\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* A list of menu bar items, a child of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView}.\n*\n* Use this class to create a list of items (options, buttons) to be displayed in a menu bar.\n*\n* To populate this list, use {@link module:ui/menubar/menubarmenulistitemview~MenuBarMenuListItemView} instances.\n*/\nvar MenuBarMenuListView = class extends ListView {\n\t/**\n\t* Creates an instance of the list view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.role = \"menu\";\n\t\tthis.items.on(\"change\", this._setItemsCheckSpace.bind(this));\n\t}\n\t/**\n\t* This method adds empty space if there is any toggleable item in the list.\n\t* It makes the list properly aligned.\n\t*/\n\t_setItemsCheckSpace() {\n\t\tconst hasAnyToggleableItem = Array.from(this.items).some((item) => {\n\t\t\tconst listButtonView = pickListButtonMenuViewIfPresent(item);\n\t\t\treturn listButtonView && listButtonView.isToggleable;\n\t\t});\n\t\tthis.items.forEach((item) => {\n\t\t\tconst listButtonView = pickListButtonMenuViewIfPresent(item);\n\t\t\tif (listButtonView) listButtonView.hasCheckSpace = hasAnyToggleableItem;\n\t\t});\n\t}\n};\n/**\n* Picks the first button menu view from the given item if present.\n*\n* @param item The item to check for a button menu view.\n* @returns The first button menu view found in the item, or `null` if not found.\n*/\nfunction pickListButtonMenuViewIfPresent(item) {\n\tif (!(item instanceof ListItemView)) return null;\n\treturn item.children.map((child) => isNestedMenuLikeView(child) ? child.buttonView : child).find((item) => item instanceof ListItemButtonView);\n}\n/**\n* Checks if the given item is a nested menu-like view. `MenuBarMenuView` imports this file\n* so to avoid circular dependencies, this function is defined in more generic way.\n*\n* @param item The item to check.\n* @returns `true` if the item is a nested menu-like view, `false` otherwise.\n*/\nfunction isNestedMenuLikeView(item) {\n\treturn typeof item === \"object\" && \"buttonView\" in item && item.buttonView instanceof ButtonView;\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* A menu bar list file dialog button view. Buttons like this one execute user actions.\n*\n* This component provides a button that opens the native file selection dialog.\n*/\nvar MenuBarMenuListItemFileDialogButtonView = class extends FileDialogListItemButtonView {\n\t/**\n\t* Creates an instance of the menu bar list button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-menu-bar__menu__item__button\"] } });\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 ui/menubar/menubarview\n*/\nconst EVENT_NAME_DELEGATES = [\n\t\"mouseenter\",\n\t\"arrowleft\",\n\t\"arrowright\",\n\t\"change:isOpen\"\n];\n/**\n* The application menu bar component. It brings a set of top-level menus (and sub-menus) that can be used\n* to organize and access a large number of buttons.\n*/\nvar MenuBarView = class extends View {\n\t/**\n\t* Collection of the child views inside the {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* A list of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instances registered in the menu bar.\n\t*\n\t* @observable\n\t*/\n\tmenus = [];\n\t/**\n\t* Creates an instance of the menu bar view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\tisOpen: false,\n\t\t\tisFocusBorderEnabled: false\n\t\t});\n\t\tthis._setupIsOpenUpdater();\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-menu-bar\",\n\t\t\t\t\tbind.if(\"isFocusBorderEnabled\", \"ck-menu-bar_focus-border-enabled\")\n\t\t\t\t],\n\t\t\t\t\"aria-label\": t(\"Editor menu bar\"),\n\t\t\t\trole: \"menubar\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* A utility that expands a plain menu bar configuration into a structure of menus (also: sub-menus)\n\t* and items using a given {@link module:ui/componentfactory~ComponentFactory component factory}.\n\t*\n\t* See the {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar} in the editor\n\t* configuration reference to learn how to configure the menu bar.\n\t*/\n\tfillFromConfig(config, componentFactory, extraItems = []) {\n\t\tconst locale = this.locale;\n\t\tconst topLevelCategoryMenuViews = processMenuBarConfig({\n\t\t\tnormalizedConfig: config,\n\t\t\tlocale,\n\t\t\tcomponentFactory,\n\t\t\textraItems\n\t\t}).items.map((menuDefinition) => this._createMenu({\n\t\t\tcomponentFactory,\n\t\t\tmenuDefinition\n\t\t}));\n\t\tthis.children.addMany(topLevelCategoryMenuViews);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tMenuBarBehaviors.toggleMenusAndFocusItemsOnHover(this);\n\t\tMenuBarBehaviors.closeMenusWhenTheBarCloses(this);\n\t\tMenuBarBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens(this);\n\t\tMenuBarBehaviors.focusCycleMenusOnArrows(this);\n\t\tMenuBarBehaviors.closeOnClickOutside(this);\n\t\tMenuBarBehaviors.enableFocusHighlightOnInteraction(this);\n\t}\n\t/**\n\t* Focuses the menu bar.\n\t*/\n\tfocus() {\n\t\tif (this.children.first) this.children.first.focus();\n\t}\n\t/**\n\t* Closes all menus in the bar.\n\t*/\n\tclose() {\n\t\tfor (const topLevelCategoryMenuView of this.children) topLevelCategoryMenuView.isOpen = false;\n\t\tthis.isOpen = false;\n\t}\n\t/**\n\t* Disables all menus in the bar.\n\t*/\n\tdisable() {\n\t\tfor (const topLevelCategoryMenuView of this.children) topLevelCategoryMenuView.isEnabled = false;\n\t}\n\t/**\n\t* Enables all menus in the bar.\n\t*/\n\tenable() {\n\t\tfor (const topLevelCategoryMenuView of this.children) topLevelCategoryMenuView.isEnabled = true;\n\t}\n\t/**\n\t* Registers a menu view in the menu bar. Every {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance must be registered\n\t* in the menu bar to be properly managed.\n\t*/\n\tregisterMenu(menuView, parentMenuView = null) {\n\t\tif (parentMenuView) {\n\t\t\tmenuView.delegate(...EVENT_NAME_DELEGATES).to(parentMenuView);\n\t\t\tmenuView.parentMenuView = parentMenuView;\n\t\t} else menuView.delegate(...EVENT_NAME_DELEGATES).to(this, (name) => \"menu:\" + name);\n\t\tmenuView._attachBehaviors();\n\t\tthis.menus.push(menuView);\n\t}\n\t/**\n\t* Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} based on the given definition.\n\t*/\n\t_createMenu({ componentFactory, menuDefinition, parentMenuView }) {\n\t\tconst locale = this.locale;\n\t\tconst menuView = new MenuBarMenuView(locale);\n\t\tthis.registerMenu(menuView, parentMenuView);\n\t\tmenuView.buttonView.set({ label: menuDefinition.label });\n\t\tmenuView.once(\"change:isOpen\", () => {\n\t\t\tconst listView = new MenuBarMenuListView(locale);\n\t\t\tlistView.ariaLabel = menuDefinition.label;\n\t\t\tmenuView.panelView.children.add(listView);\n\t\t\tlistView.items.addMany(this._createMenuItems({\n\t\t\t\tmenuDefinition,\n\t\t\t\tparentMenuView: menuView,\n\t\t\t\tcomponentFactory\n\t\t\t}));\n\t\t});\n\t\treturn menuView;\n\t}\n\t/**\n\t* Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} items based on the given definition.\n\t*/\n\t_createMenuItems({ menuDefinition, parentMenuView, componentFactory }) {\n\t\tconst locale = this.locale;\n\t\tconst items = [];\n\t\tfor (const menuGroupDefinition of menuDefinition.groups) {\n\t\t\tfor (const itemDefinition of menuGroupDefinition.items) {\n\t\t\t\tconst menuItemView = new MenuBarMenuListItemView(locale, parentMenuView);\n\t\t\t\tif (isObject(itemDefinition)) menuItemView.children.add(this._createMenu({\n\t\t\t\t\tcomponentFactory,\n\t\t\t\t\tmenuDefinition: itemDefinition,\n\t\t\t\t\tparentMenuView\n\t\t\t\t}));\n\t\t\t\telse {\n\t\t\t\t\tconst componentView = this._createMenuItemContentFromFactory({\n\t\t\t\t\t\tcomponentName: itemDefinition,\n\t\t\t\t\t\tcomponentFactory,\n\t\t\t\t\t\tparentMenuView\n\t\t\t\t\t});\n\t\t\t\t\tif (!componentView) continue;\n\t\t\t\t\tmenuItemView.children.add(componentView);\n\t\t\t\t}\n\t\t\t\titems.push(menuItemView);\n\t\t\t}\n\t\t\tif (menuGroupDefinition !== menuDefinition.groups[menuDefinition.groups.length - 1]) items.push(new ListSeparatorView(locale));\n\t\t}\n\t\treturn items;\n\t}\n\t/**\n\t* Uses the component factory to create a content of the menu item (a button or a sub-menu).\n\t*/\n\t_createMenuItemContentFromFactory({ componentName, parentMenuView, componentFactory }) {\n\t\tconst componentView = componentFactory.create(componentName);\n\t\tif (!(componentView instanceof MenuBarMenuView || componentView instanceof MenuBarMenuListItemButtonView || componentView instanceof MenuBarMenuListItemFileDialogButtonView)) {\n\t\t\t/**\n\t\t\t* Adding unsupported components to the {@link module:ui/menubar/menubarview~MenuBarView} is not possible.\n\t\t\t*\n\t\t\t* A component should be either a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} (sub-menu) or a\n\t\t\t* {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} (button).\n\t\t\t*\n\t\t\t* @error menu-bar-component-unsupported\n\t\t\t* @param {string} componentName A name of the unsupported component used in the configuration.\n\t\t\t* @param {module:ui/view~View} componentView An unsupported component view.\n\t\t\t*/\n\t\t\tlogWarning(\"menu-bar-component-unsupported\", {\n\t\t\t\tcomponentName,\n\t\t\t\tcomponentView\n\t\t\t});\n\t\t\treturn null;\n\t\t}\n\t\tthis._registerMenuTree(componentView, parentMenuView);\n\t\tcomponentView.on(\"execute\", () => {\n\t\t\tthis.close();\n\t\t});\n\t\treturn componentView;\n\t}\n\t/**\n\t* Checks component and its children recursively and calls {@link #registerMenu}\n\t* for each item that is {@link module:ui/menubar/menubarmenuview~MenuBarMenuView}.\n\t*\n\t* @internal\n\t*/\n\t_registerMenuTree(componentView, parentMenuView) {\n\t\tif (!(componentView instanceof MenuBarMenuView)) {\n\t\t\tcomponentView.delegate(\"mouseenter\").to(parentMenuView);\n\t\t\treturn;\n\t\t}\n\t\tthis.registerMenu(componentView, parentMenuView);\n\t\tconst menuBarItemsList = componentView.panelView.children.filter((child) => child instanceof MenuBarMenuListView)[0];\n\t\tif (!menuBarItemsList) {\n\t\t\tcomponentView.delegate(\"mouseenter\").to(parentMenuView);\n\t\t\treturn;\n\t\t}\n\t\tconst nonSeparatorItems = menuBarItemsList.items.filter((item) => item instanceof ListItemView);\n\t\tfor (const item of nonSeparatorItems) this._registerMenuTree(item.children.get(0), componentView);\n\t}\n\t/**\n\t* Manages the state of the {@link #isOpen} property of the menu bar. Because the state is a sum of individual\n\t* top-level menus' states, it's necessary to listen to their changes and update the state accordingly.\n\t*\n\t* Additionally, it prevents from unnecessary changes of `isOpen` when one top-level menu opens and another closes\n\t* (regardless of in which order), maintaining a stable `isOpen === true` in that situation.\n\t*/\n\t_setupIsOpenUpdater() {\n\t\tlet closeTimeout;\n\t\tthis.on(\"menu:change:isOpen\", (evt, name, isOpen) => {\n\t\t\tclearTimeout(closeTimeout);\n\t\t\tif (isOpen) this.isOpen = true;\n\t\t\telse closeTimeout = setTimeout(() => {\n\t\t\t\tthis.isOpen = Array.from(this.children).some((menuView) => menuView.isOpen);\n\t\t\t}, 0);\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\nexport { AccessibilityHelp, AccessibilityHelpContentView, AriaLiveAnnouncer, AriaLiveAnnouncerPoliteness, AriaLiveAnnouncerRegionView, AriaLiveAnnouncerView, AutocompleteView, Badge, BalloonPanelView, BalloonToolbar, BlockButtonView, BlockToolbar, BodyCollection, BoxedEditorUIView, ButtonLabelView, ButtonLabelWithHighlightView, ButtonView, CollapsibleView, CollapsibleView as _CollapsibleView, ColorGridView, ColorGridsFragmentView, ColorPickerFragmentView, ColorPickerInputRowView, ColorPickerView, ColorSelectorView, ColorTileView, ComponentFactory, ContextualBalloon, CssTransitionDisablerMixin, DefaultMenuBarItems, Dialog, DialogActionsView, DialogContentView, DialogView, DialogViewPosition, DocumentColorCollection, DraggableViewMixin, DropdownButtonView, DropdownMenuButtonView, DropdownMenuListItemButtonView, DropdownMenuListItemView, DropdownMenuListView, DropdownMenuNestedMenuPanelView, DropdownMenuNestedMenuView, DropdownMenuPanelPositioningFunctions, DropdownMenuRootListView, DropdownPanelView, DropdownView, EditableUIView, EditorUI, EditorUIView, EvaluationBadge, FileDialogButtonView, FileDialogListItemButtonView, FileDialogViewMixin, FocusCycler, FormHeaderView, FormRowView, HighlightedTextView, IconView, IframeView, InlineEditableUIView, InputBase, InputNumberView, InputTextView, InputView, ItemsView, LabelView, LabelWithHighlightView, LabeledFieldView, LabeledInputView, ListItemButtonView, ListItemGroupView, ListItemView, ListSeparatorView, ListView, MenuBarMenuButtonView, MenuBarMenuListItemButtonView, MenuBarMenuListItemFileDialogButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuPanelView, MenuBarMenuView, MenuBarView, NESTED_TOOLBAR_ICONS, Notification, PoweredBy, SearchInfoView, SearchInfoView as _SearchInfoView, SearchResultsView, SearchTextView, SliderView, SpinnerView, SplitButtonView, StickyPanelView, SwitchButtonView, Template, TextareaView, ToolbarLineBreakView, ToolbarSeparatorView, ToolbarView, TooltipManager, UIModel, UIModel as ViewModel, View, ViewCollection, CheckIconHolderView as _CheckIconHolderView, RotatorView as _ContextualBalloonRotatorView, DropdownMenuBehaviors as _DropdownMenuBehaviors, DropdownRootMenuBehaviors as _DropdownRootMenuBehaviors, MenuBarBehaviors as _MenuBarBehaviors, MenuBarMenuBehaviors as _MenuBarMenuBehaviors, MenuBarMenuViewPanelPositioningFunctions as _MenuBarMenuViewPanelPositioningFunctions, SearchTextQueryView as _SearchTextQueryView, TemplateBinding as _TemplateBinding, TemplateIfBinding as _TemplateIfBinding, TemplateToBinding as _TemplateToBinding, convertColor as _convertColor, convertToHex as _convertColorToHex, preventDefault as _preventUiViewDefault, processMenuBarConfig as _processMenuBarConfig, registerCustomElement as _registerCustomElement, tryParseHexColor as _tryNormalizeHexColor, addKeyboardHandlingForGrid, addListToDropdown, addMenuToDropdown, addToolbarToDropdown, clickOutsideHandler, createDropdown, createLabeledDropdown, createLabeledInputNumber, createLabeledInputText, createLabeledTextarea, filterGroupAndItemNames, focusChildOnDropdownOpen, getLocalizedColorOptions, isFocusable, isViewWithFocusCycler, normalizeColorOptions, normalizeMenuBarConfig, normalizeSingleColorDefinition, normalizeToolbarConfig, submitHandler };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module ui/viewcollection\n */\n\nimport {\n\tCKEditorError,\n\tCollection,\n\ttype CollectionAddEvent,\n\ttype CollectionRemoveEvent,\n\ttype EmitterMixinDelegateChain\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type View } from './view.js';\n\n/**\n * Collects {@link module:ui/view~View} instances.\n *\n * ```ts\n * const parentView = new ParentView( locale );\n * const collection = new ViewCollection( locale );\n *\n * collection.setParent( parentView.element );\n *\n * const viewA = new ChildView( locale );\n * const viewB = new ChildView( locale );\n * ```\n *\n * View collection renders and manages view {@link module:ui/view~View#element elements}:\n *\n * ```ts\n * collection.add( viewA );\n * collection.add( viewB );\n *\n * console.log( parentView.element.firsChild ); // -> viewA.element\n * console.log( parentView.element.lastChild ); // -> viewB.element\n * ```\n *\n * It {@link module:ui/viewcollection~ViewCollection#delegate propagates} DOM events too:\n *\n * ```ts\n * // Delegate #click and #keydown events from viewA and viewB to the parentView.\n * collection.delegate( 'click' ).to( parentView );\n *\n * parentView.on( 'click', ( evt ) => {\n * \tconsole.log( `${ evt.source } has been clicked.` );\n * } );\n *\n * // This event will be delegated to the parentView.\n * viewB.fire( 'click' );\n * ```\n *\n * **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}\n * of a {@link module:ui/template~Template template}.\n */\nexport class ViewCollection<TView extends View = View> extends Collection<TView> {\n\tpublic declare id?: string;\n\n\t/**\n\t * A parent element within which child views are rendered and managed in DOM.\n\t */\n\tprivate _parentElement: DocumentFragment | HTMLElement | null;\n\n\t/**\n\t * Creates a new instance of the {@link module:ui/viewcollection~ViewCollection}.\n\t *\n\t * @param initialItems The initial items of the collection.\n\t */\n\tconstructor( initialItems: Iterable<TView> = [] ) {\n\t\tsuper( initialItems, {\n\t\t\t// An #id Number attribute should be legal and not break the `ViewCollection` instance.\n\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/93\n\t\t\tidProperty: 'viewUid'\n\t\t} );\n\n\t\t// Handle {@link module:ui/view~View#element} in DOM when a new view is added to the collection.\n\t\tthis.on<CollectionAddEvent<TView>>( 'add', ( evt, view, index ) => {\n\t\t\tthis._renderViewIntoCollectionParent( view, index );\n\t\t} );\n\n\t\t// Handle {@link module:ui/view~View#element} in DOM when a view is removed from the collection.\n\t\tthis.on<CollectionRemoveEvent<TView>>( 'remove', ( evt, view ) => {\n\t\t\tif ( view.element && this._parentElement ) {\n\t\t\t\tview.element.remove();\n\t\t\t}\n\t\t} );\n\n\t\tthis._parentElement = null;\n\t}\n\n\t/**\n\t * Destroys the view collection along with child views.\n\t * See the view {@link module:ui/view~View#destroy} method.\n\t */\n\tpublic destroy(): void {\n\t\tthis.map( view => view.destroy() );\n\t}\n\n\t/**\n\t * Sets the parent HTML element of this collection. When parent is set, {@link #add adding} and\n\t * {@link #remove removing} views in the collection synchronizes their\n\t * {@link module:ui/view~View#element elements} in the parent element.\n\t *\n\t * @param elementOrDocFragment A new parent element or document fragment.\n\t */\n\tpublic setParent( elementOrDocFragment: DocumentFragment | HTMLElement ): void {\n\t\tthis._parentElement = elementOrDocFragment;\n\n\t\t// Take care of the initial collection items passed to the constructor.\n\t\tfor ( const view of this ) {\n\t\t\tthis._renderViewIntoCollectionParent( view );\n\t\t}\n\t}\n\n\t/**\n\t * Delegates selected events coming from within views in the collection to any\n\t * {@link module:utils/emittermixin~Emitter}.\n\t *\n\t * For the following views and collection:\n\t *\n\t * ```ts\n\t * const viewA = new View();\n\t * const viewB = new View();\n\t * const viewC = new View();\n\t *\n\t * const views = parentView.createCollection();\n\t *\n\t * views.delegate( 'eventX' ).to( viewB );\n\t * views.delegate( 'eventX', 'eventY' ).to( viewC );\n\t *\n\t * views.add( viewA );\n\t * ```\n\t *\n\t * the `eventX` is delegated (fired by) `viewB` and `viewC` along with `customData`:\n\t *\n\t * ```ts\n\t * viewA.fire( 'eventX', customData );\n\t * ```\n\t *\n\t * and `eventY` is delegated (fired by) `viewC` along with `customData`:\n\t *\n\t * ```ts\n\t * viewA.fire( 'eventY', customData );\n\t * ```\n\t *\n\t * See {@link module:utils/emittermixin~Emitter#delegate}.\n\t *\n\t * @param events {@link module:ui/view~View} event names to be delegated to another\n\t * {@link module:utils/emittermixin~Emitter}.\n\t * @returns Object with `to` property, a function which accepts the destination\n\t * of {@link module:utils/emittermixin~Emitter#delegate delegated} events.\n\t */\n\tpublic override delegate( ...events: Array<string> ): EmitterMixinDelegateChain {\n\t\tif ( !events.length || !isStringArray( events ) ) {\n\t\t\t/**\n\t\t\t * All event names must be strings.\n\t\t\t *\n\t\t\t * @error ui-viewcollection-delegate-wrong-events\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'ui-viewcollection-delegate-wrong-events',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\treturn {\n\t\t\tto: dest => {\n\t\t\t\t// Activate delegating on existing views in this collection.\n\t\t\t\tfor ( const view of this ) {\n\t\t\t\t\tfor ( const evtName of events ) {\n\t\t\t\t\t\tview.delegate( evtName ).to( dest );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Activate delegating on future views in this collection.\n\t\t\t\tthis.on<CollectionAddEvent<View>>( 'add', ( evt, view ) => {\n\t\t\t\t\tfor ( const evtName of events ) {\n\t\t\t\t\t\tview.delegate( evtName ).to( dest );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t// Deactivate delegating when view is removed from this collection.\n\t\t\t\tthis.on<CollectionRemoveEvent<View>>( 'remove', ( evt, view ) => {\n\t\t\t\t\tfor ( const evtName of events ) {\n\t\t\t\t\t\tview.stopDelegating( evtName, dest );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * This method {@link module:ui/view~View#render renders} a new view added to the collection.\n\t *\n\t * If the {@link #_parentElement parent element} of the collection is set, this method also adds\n\t * the view's {@link module:ui/view~View#element} as a child of the parent in DOM at a specified index.\n\t *\n\t * **Note**: If index is not specified, the view's element is pushed as the last child\n\t * of the parent element.\n\t *\n\t * @param view A new view added to the collection.\n\t * @param index An index the view holds in the collection. When not specified,\n\t * the view is added at the end.\n\t */\n\tprivate _renderViewIntoCollectionParent( view: View, index?: number ): void {\n\t\tif ( !view.isRendered ) {\n\t\t\tview.render();\n\t\t}\n\n\t\tif ( view.element && this._parentElement ) {\n\t\t\tthis._parentElement.insertBefore( view.element, this._parentElement.children[ index! ] );\n\t\t}\n\t}\n\n\t/**\n\t * Removes a child view from the collection. If the {@link #setParent parent element} of the\n\t * collection has been set, the {@link module:ui/view~View#element element} of the view is also removed\n\t * in DOM, reflecting the order of the collection.\n\t *\n\t * See the {@link #add} method.\n\t *\n\t * @param subject The view to remove, its id or index in the collection.\n\t * @returns The removed view.\n\t */\n\tpublic override remove( subject: TView | number | string ): TView {\n\t\treturn super.remove( subject );\n\t}\n}\n\n/**\n * Check if all entries of the array are of `String` type.\n *\n * @param arr An array to be checked.\n */\nfunction isStringArray( arr: Array<unknown> ): arr is Array<string> {\n\treturn arr.every( a => typeof a == 'string' );\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/**\n * @module ui/template\n */\n\nimport { View } from './view.js';\nimport { ViewCollection } from './viewcollection.js';\n\nimport {\n\tCKEditorError,\n\tEmitterMixin,\n\tisNode,\n\ttoArray,\n\ttype ArrayOrItem,\n\ttype Emitter,\n\ttype Observable,\n\ttype ObservableChangeEvent,\n\ttype EmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { isObject, cloneDeepWith } from 'es-toolkit/compat';\n\nconst xhtmlNs = 'http://www.w3.org/1999/xhtml';\n\nconst TemplateBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * A basic Template class. It renders a DOM HTML element or text from a\n * {@link module:ui/template~TemplateDefinition definition} and supports element attributes, children,\n * bindings to {@link module:utils/observablemixin~Observable observables} and DOM event propagation.\n *\n * A simple template can look like this:\n *\n * ```ts\n * const bind = Template.bind( observable, emitter );\n *\n * new Template( {\n * \ttag: 'p',\n * \tattributes: {\n * \t\tclass: 'foo',\n * \t\tstyle: {\n * \t\t\tbackgroundColor: 'yellow'\n * \t\t}\n * \t},\n * \ton: {\n * \t\tclick: bind.to( 'clicked' )\n * \t},\n * \tchildren: [\n * \t\t'A paragraph.'\n * \t]\n * } ).render();\n * ```\n *\n * and it will render the following HTML element:\n *\n * ```html\n * <p class=\"foo\" style=\"background-color: yellow;\">A paragraph.</p>\n * ```\n *\n * Additionally, the `observable` will always fire `clicked` upon clicking `<p>` in the DOM.\n *\n * See {@link module:ui/template~TemplateDefinition} to know more about templates and complex\n * template definitions.\n */\nexport class Template extends TemplateBase {\n\tpublic ns?: string;\n\n\t/**\n\t * The tag (`tagName`) of this template, e.g. `div`. It also indicates that the template\n\t * renders to an HTML element.\n\t */\n\tpublic tag?: string;\n\n\t/**\n\t * The text of the template. It also indicates that the template renders to a DOM text node.\n\t */\n\tpublic text?: Array<TemplateSimpleValue | TemplateBinding>;\n\n\t/**\n\t * The attributes of the template, e.g. `{ id: [ 'ck-id' ] }`, corresponding with\n\t * the attributes of an HTML element.\n\t *\n\t * **Note**: This property only makes sense when {@link #tag} is defined.\n\t */\n\tpublic attributes?: Record<string, AttributeValues>;\n\n\t/**\n\t * The children of the template. They can be either:\n\t * * independent instances of {@link ~Template} (sub–templates),\n\t * * native DOM Nodes.\n\t *\n\t * **Note**: This property only makes sense when {@link #tag} is defined.\n\t */\n\tpublic children?: Array<ViewCollection | View | Node | Template>;\n\n\t/**\n\t * The DOM event listeners of the template.\n\t */\n\tpublic eventListeners?: Record<string, Array<TemplateToBinding>>;\n\n\t/**\n\t * Indicates whether this particular Template instance has been\n\t * {@link #render rendered}.\n\t */\n\tprivate _isRendered: boolean;\n\n\t/**\n\t * The data used by the {@link #revert} method to restore a node to its original state.\n\t *\n\t * See: {@link #apply}.\n\t */\n\tprivate _revertData: RevertData | null;\n\n\t/**\n\t * Creates an instance of the {@link ~Template} class.\n\t *\n\t * @param def The definition of the template.\n\t */\n\tconstructor( def: TemplateDefinition ) {\n\t\tsuper();\n\n\t\tObject.assign( this, normalize( clone( def ) ) );\n\n\t\tthis._isRendered = false;\n\t\tthis._revertData = null;\n\t}\n\n\t/**\n\t * Renders a DOM Node (an HTML element or text) out of the template.\n\t *\n\t * ```ts\n\t * const domNode = new Template( { ... } ).render();\n\t * ```\n\t *\n\t * See: {@link #apply}.\n\t */\n\tpublic render(): HTMLElement | Text {\n\t\tconst node = this._renderNode( {\n\t\t\tintoFragment: true\n\t\t} as any );\n\n\t\tthis._isRendered = true;\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Applies the template to an existing DOM Node, either HTML element or text.\n\t *\n\t * **Note:** No new DOM nodes will be created. Applying extends:\n\t *\n\t * {@link module:ui/template~TemplateDefinition attributes},\n\t * {@link module:ui/template~TemplateDefinition event listeners}, and\n\t * `textContent` of {@link module:ui/template~TemplateDefinition children} only.\n\t *\n\t * **Note:** Existing `class` and `style` attributes are extended when a template\n\t * is applied to an HTML element, while other attributes and `textContent` are overridden.\n\t *\n\t * **Note:** The process of applying a template can be easily reverted using the\n\t * {@link module:ui/template~Template#revert} method.\n\t *\n\t * ```ts\n\t * const element = document.createElement( 'div' );\n\t * const observable = new Model( { divClass: 'my-div' } );\n\t * const emitter = Object.create( EmitterMixin );\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \tattributes: {\n\t * \t\tid: 'first-div',\n\t * \t\tclass: bind.to( 'divClass' )\n\t * \t},\n\t * \ton: {\n\t * \t\tclick: bind( 'elementClicked' ) // Will be fired by the observable.\n\t * \t},\n\t * \tchildren: [\n\t * \t\t'Div text.'\n\t * \t]\n\t * } ).apply( element );\n\t *\n\t * console.log( element.outerHTML ); // -> '<div id=\"first-div\" class=\"my-div\"></div>'\n\t * ```\n\t *\n\t * @see module:ui/template~Template#render\n\t * @see module:ui/template~Template#revert\n\t * @param node Root node for the template to apply.\n\t */\n\tpublic apply( node: HTMLElement | Text ): HTMLElement | Text {\n\t\tthis._revertData = getEmptyRevertData();\n\n\t\tthis._renderNode( {\n\t\t\tnode,\n\t\t\tintoFragment: false,\n\t\t\tisApplying: true,\n\t\t\trevertData: this._revertData\n\t\t} );\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Reverts a template {@link module:ui/template~Template#apply applied} to a DOM node.\n\t *\n\t * @param node The root node for the template to revert. In most of the cases, it is the\n\t * same node used by {@link module:ui/template~Template#apply}.\n\t */\n\tpublic revert( node: HTMLElement | Text ): void {\n\t\tif ( !this._revertData ) {\n\t\t\t/**\n\t\t\t * Attempting to revert a template which has not been applied yet.\n\t\t\t *\n\t\t\t * @error ui-template-revert-not-applied\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'ui-template-revert-not-applied',\n\t\t\t\t[ this, node ]\n\t\t\t);\n\t\t}\n\n\t\tthis._revertTemplateFromNode( node, this._revertData );\n\t}\n\n\t/**\n\t * Returns an iterator which traverses the template in search of {@link module:ui/view~View}\n\t * instances and returns them one by one.\n\t *\n\t * ```ts\n\t * const viewFoo = new View();\n\t * const viewBar = new View();\n\t * const viewBaz = new View();\n\t * const template = new Template( {\n\t * \ttag: 'div',\n\t * \tchildren: [\n\t * \t\tviewFoo,\n\t * \t\t{\n\t * \t\t\ttag: 'div',\n\t * \t\t\tchildren: [\n\t * \t\t\t\tviewBar\n\t * \t\t\t]\n\t * \t\t},\n\t * \t\tviewBaz\n\t * \t]\n\t * } );\n\t *\n\t * // Logs: viewFoo, viewBar, viewBaz\n\t * for ( const view of template.getViews() ) {\n\t * \tconsole.log( view );\n\t * }\n\t * ```\n\t */\n\tpublic* getViews(): IterableIterator<View> {\n\t\tfunction* search( def: Template ): Iterable<View> {\n\t\t\tif ( def.children ) {\n\t\t\t\tfor ( const child of def.children ) {\n\t\t\t\t\tif ( isView( child ) ) {\n\t\t\t\t\t\tyield child;\n\t\t\t\t\t} else if ( isTemplate( child ) ) {\n\t\t\t\t\t\tyield* search( child );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tyield* search( this );\n\t}\n\n\t/**\n\t * An entry point to the interface which binds DOM nodes to\n\t * {@link module:utils/observablemixin~Observable observables}.\n\t * There are two types of bindings:\n\t *\n\t * * HTML element attributes or text `textContent` synchronized with attributes of an\n\t * {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}\n\t * and {@link module:ui/template~BindChain#if}.\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \tattributes: {\n\t * \t\t// Binds the element \"class\" attribute to observable#classAttribute.\n\t * \t\tclass: bind.to( 'classAttribute' )\n\t * \t}\n\t * } ).render();\n\t * ```\n\t *\n\t * * DOM events fired on HTML element propagated through\n\t * {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}.\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \ton: {\n\t * \t\t// Will be fired by the observable.\n\t * \t\tclick: bind( 'elementClicked' )\n\t * \t}\n\t * } ).render();\n\t * ```\n\t *\n\t * Also see {@link module:ui/view~View#bindTemplate}.\n\t *\n\t * @param observable An observable which provides boundable attributes.\n\t * @param emitter An emitter that listens to observable attribute\n\t * changes or DOM Events (depending on the kind of the binding). Usually, a {@link module:ui/view~View} instance.\n\t */\n\tpublic static override bind<TObservable extends Observable>(\n\t\tobservable: TObservable,\n\t\temitter: Emitter\n\t): BindChain<TObservable> {\n\t\treturn {\n\t\t\tto( eventNameOrFunctionOrAttribute: any, callback?: any ) {\n\t\t\t\treturn new TemplateToBinding( {\n\t\t\t\t\teventNameOrFunction: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tattribute: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tobservable, emitter, callback\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\tif( attribute: string, valueIfTrue?: string, callback?: any ) {\n\t\t\t\treturn new TemplateIfBinding( {\n\t\t\t\t\tobservable, emitter, attribute, valueIfTrue, callback\n\t\t\t\t} );\n\t\t\t}\n\t\t} as any;\n\t}\n\n\t/**\n\t * Extends an existing {@link module:ui/template~Template} instance with some additional content\n\t * from another {@link module:ui/template~TemplateDefinition}.\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * const template = new Template( {\n\t * \ttag: 'p',\n\t * \tattributes: {\n\t * \t\tclass: 'a',\n\t * \t\tdata-x: bind.to( 'foo' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t{\n\t * \t\t\ttag: 'span',\n\t * \t\t\tattributes: {\n\t * \t\t\t\tclass: 'b'\n\t * \t\t\t},\n\t * \t\t\tchildren: [\n\t * \t\t\t\t'Span'\n\t * \t\t\t]\n\t * \t\t}\n\t * \t]\n\t *  } );\n\t *\n\t * // Instance-level extension.\n\t * Template.extend( template, {\n\t * \tattributes: {\n\t * \t\tclass: 'b',\n\t * \t\tdata-x: bind.to( 'bar' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t{\n\t * \t\t\tattributes: {\n\t * \t\t\t\tclass: 'c'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t]\n\t * } );\n\t *\n\t * // Child extension.\n\t * Template.extend( template.children[ 0 ], {\n\t * \tattributes: {\n\t * \t\tclass: 'd'\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * the `outerHTML` of `template.render()` is:\n\t *\n\t * ```html\n\t * <p class=\"a b\" data-x=\"{ observable.foo } { observable.bar }\">\n\t * \t<span class=\"b c d\">Span</span>\n\t * </p>\n\t * ```\n\t *\n\t * @param template An existing template instance to be extended.\n\t * @param def Additional definition to be applied to a template.\n\t */\n\tpublic static extend( template: Template, def: Partial<TemplateDefinition> ): void {\n\t\tif ( template._isRendered ) {\n\t\t\t/**\n\t\t\t * Extending a template after rendering may not work as expected. To make sure\n\t\t\t * the {@link module:ui/template~Template.extend extending} works for an element,\n\t\t\t * make sure it happens before {@link module:ui/template~Template#render} is called.\n\t\t\t *\n\t\t\t * @error template-extend-render\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'template-extend-render',\n\t\t\t\t[ this, template ]\n\t\t\t);\n\t\t}\n\n\t\textendTemplate( template, normalize( clone( def ) ) );\n\t}\n\n\t/**\n\t * Renders a DOM Node (either an HTML element or text) out of the template.\n\t *\n\t * @param data Rendering data.\n\t */\n\tprivate _renderNode( data: RenderData ) {\n\t\tlet isInvalid;\n\n\t\tif ( data.node ) {\n\t\t\t// When applying, a definition cannot have \"tag\" and \"text\" at the same time.\n\t\t\tisInvalid = this.tag && this.text;\n\t\t} else {\n\t\t\t// When rendering, a definition must have either \"tag\" or \"text\": XOR( this.tag, this.text ).\n\t\t\tisInvalid = this.tag ? this.text : !this.text;\n\t\t}\n\n\t\tif ( isInvalid ) {\n\t\t\t/**\n\t\t\t * Node definition cannot have the \"tag\" and \"text\" properties at the same time.\n\t\t\t * Node definition must have either \"tag\" or \"text\" when rendering a new Node.\n\t\t\t *\n\t\t\t * @error ui-template-wrong-syntax\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'ui-template-wrong-syntax',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tif ( this.text ) {\n\t\t\treturn this._renderText( data );\n\t\t} else {\n\t\t\treturn this._renderElement( data );\n\t\t}\n\t}\n\n\t/**\n\t * Renders an HTML element out of the template.\n\t *\n\t * @param data Rendering data.\n\t */\n\tprivate _renderElement( data: RenderData ) {\n\t\tlet node = data.node;\n\n\t\tif ( !node ) {\n\t\t\tnode = data.node = document.createElementNS( this.ns || xhtmlNs, this.tag! ) as any;\n\t\t}\n\n\t\tthis._renderAttributes( data );\n\t\tthis._renderElementChildren( data );\n\t\tthis._setUpListeners( data );\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Renders a text node out of {@link module:ui/template~Template#text}.\n\t *\n\t * @param data Rendering data.\n\t */\n\tprivate _renderText( data: RenderData ) {\n\t\tlet node = data.node;\n\n\t\t// Save the original textContent to revert it in #revert().\n\t\tif ( node ) {\n\t\t\tdata.revertData!.text = node.textContent;\n\t\t} else {\n\t\t\tnode = data.node = document.createTextNode( '' );\n\t\t}\n\n\t\t// Check if this Text Node is bound to Observable. Cases:\n\t\t//\n\t\t//\t\ttext: [ Template.bind( ... ).to( ... ) ]\n\t\t//\n\t\t//\t\ttext: [\n\t\t//\t\t\t'foo',\n\t\t//\t\t\tTemplate.bind( ... ).to( ... ),\n\t\t//\t\t\t...\n\t\t//\t\t]\n\t\t//\n\t\tif ( hasTemplateBinding( this.text ) ) {\n\t\t\tthis._bindToObservable( {\n\t\t\t\tschema: this.text!,\n\t\t\t\tupdater: getTextUpdater( node ),\n\t\t\t\tdata\n\t\t\t} );\n\t\t}\n\t\t// Simply set text. Cases:\n\t\t//\n\t\t//\t\ttext: [ 'all', 'are', 'static' ]\n\t\t//\n\t\t//\t\ttext: [ 'foo' ]\n\t\t//\n\t\telse {\n\t\t\tnode.textContent = this.text!.join( '' );\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Renders HTML element attributes out of {@link module:ui/template~Template#attributes}.\n\t *\n\t * @param data Rendering data.\n\t */\n\tprivate _renderAttributes( data: RenderData ) {\n\t\tif ( !this.attributes ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst node = data.node as HTMLElement;\n\t\tconst revertData = data.revertData;\n\n\t\tfor ( const attrName in this.attributes ) {\n\t\t\t// Current attribute value in DOM.\n\t\t\tconst domAttrValue = node.getAttribute( attrName );\n\n\t\t\t// The value to be set.\n\t\t\tconst attrValue = this.attributes[ attrName ];\n\n\t\t\t// Save revert data.\n\t\t\tif ( revertData ) {\n\t\t\t\trevertData.attributes[ attrName ] = domAttrValue;\n\t\t\t}\n\n\t\t\t// Detect custom namespace:\n\t\t\t//\n\t\t\t//\t\tclass: {\n\t\t\t//\t\t\tns: 'abc',\n\t\t\t//\t\t\tvalue: Template.bind( ... ).to( ... )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\tconst attrNs = isNamespaced( attrValue ) ? attrValue[ 0 ].ns : null;\n\n\t\t\t// Activate binding if one is found. Cases:\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\tTemplate.bind( ... ).to( ... )\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\t'bar',\n\t\t\t//\t\t\tTemplate.bind( ... ).to( ... ),\n\t\t\t//\t\t\t'baz'\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\t//\t\tclass: {\n\t\t\t//\t\t\tns: 'abc',\n\t\t\t//\t\t\tvalue: Template.bind( ... ).to( ... )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\tif ( hasTemplateBinding( attrValue ) ) {\n\t\t\t\t// Normalize attributes with additional data like namespace:\n\t\t\t\t//\n\t\t\t\t//\t\tclass: {\n\t\t\t\t//\t\t\tns: 'abc',\n\t\t\t\t//\t\t\tvalue: [ ... ]\n\t\t\t\t//\t\t}\n\t\t\t\t//\n\t\t\t\tconst valueToBind = isNamespaced( attrValue ) ? attrValue[ 0 ].value : attrValue;\n\n\t\t\t\t// Extend the original value of attributes like \"style\" and \"class\",\n\t\t\t\t// don't override them.\n\t\t\t\tif ( revertData && shouldExtend( attrName ) ) {\n\t\t\t\t\tvalueToBind.unshift( domAttrValue );\n\t\t\t\t}\n\n\t\t\t\tthis._bindToObservable( {\n\t\t\t\t\tschema: valueToBind,\n\t\t\t\t\tupdater: getAttributeUpdater( node, attrName, attrNs ),\n\t\t\t\t\tdata\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Style attribute could be an Object so it needs to be parsed in a specific way.\n\t\t\t//\n\t\t\t//\t\tstyle: {\n\t\t\t//\t\t\twidth: '100px',\n\t\t\t//\t\t\theight: Template.bind( ... ).to( ... )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\telse if ( attrName == 'style' && typeof attrValue[ 0 ] !== 'string' ) {\n\t\t\t\tthis._renderStyleAttribute( attrValue[ 0 ] as any, data );\n\t\t\t}\n\n\t\t\t// Otherwise simply set the static attribute:\n\t\t\t//\n\t\t\t//\t\tclass: [ 'foo' ]\n\t\t\t//\n\t\t\t//\t\tclass: [ 'all', 'are', 'static' ]\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\t{\n\t\t\t//\t\t\t\tns: 'abc',\n\t\t\t//\t\t\t\tvalue: [ 'foo' ]\n\t\t\t//\t\t\t}\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\telse {\n\t\t\t\t// Extend the original value of attributes like \"style\" and \"class\",\n\t\t\t\t// don't override them.\n\t\t\t\tif ( revertData && domAttrValue && shouldExtend( attrName ) ) {\n\t\t\t\t\tattrValue.unshift( domAttrValue as any );\n\t\t\t\t}\n\n\t\t\t\tconst value: any = attrValue\n\t\t\t\t\t// Retrieve \"values\" from:\n\t\t\t\t\t//\n\t\t\t\t\t//\t\tclass: [\n\t\t\t\t\t//\t\t\t{\n\t\t\t\t\t//\t\t\t\tns: 'abc',\n\t\t\t\t\t//\t\t\t\tvalue: [ ... ]\n\t\t\t\t\t//\t\t\t}\n\t\t\t\t\t//\t\t]\n\t\t\t\t\t//\n\t\t\t\t\t.map( ( val: any ) => val ? ( val.value || val ) : val )\n\t\t\t\t\t// Flatten the array.\n\t\t\t\t\t.reduce( ( prev, next ) => prev.concat( next ), [] )\n\t\t\t\t\t// Convert into string.\n\t\t\t\t\t.reduce( arrayValueReducer, '' );\n\n\t\t\t\tif ( !isFalsy( value ) ) {\n\t\t\t\t\tnode.setAttributeNS( attrNs, attrName, value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Renders the `style` attribute of an HTML element based on\n\t * {@link module:ui/template~Template#attributes}.\n\t *\n\t * A style attribute is an object with static values:\n\t *\n\t * ```ts\n\t * attributes: {\n\t * \tstyle: {\n\t * \t\tcolor: 'red',\n\t * \t\t'--color': 'red'\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * or values bound to {@link module:ui/model~UIModel} properties:\n\t *\n\t * ```ts\n\t * attributes: {\n\t * \tstyle: {\n\t * \t\tcolor: bind.to( ... ),\n\t * \t\t'--color': bind.to( ... )\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * Note: The `style` attribute is rendered without setting the namespace. It does not seem to be\n\t * needed.\n\t *\n\t * @param styles Styles located in `attributes.style` of {@link module:ui/template~TemplateDefinition}.\n\t * @param data Rendering data.\n\t */\n\tprivate _renderStyleAttribute( styles: Record<string, TemplateSimpleValue | TemplateBinding>, data: RenderData ) {\n\t\tconst node = data.node;\n\n\t\tfor ( const styleName in styles ) {\n\t\t\tconst styleValue = styles[ styleName ];\n\n\t\t\t// Cases:\n\t\t\t//\n\t\t\t//\t\tstyle: {\n\t\t\t//\t\t\tcolor: bind.to( 'attribute' )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\tif ( hasTemplateBinding( styleValue ) ) {\n\t\t\t\tthis._bindToObservable( {\n\t\t\t\t\tschema: [ styleValue ],\n\t\t\t\t\tupdater: getStyleUpdater( node, styleName ),\n\t\t\t\t\tdata\n\t\t\t\t} );\n\t\t\t}\n\t\t\t// Cases:\n\t\t\t//\n\t\t\t//\t\tstyle: {\n\t\t\t//\t\t\t--color: 'red'\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\telse if ( isCssVariable( styleName ) ) {\n\t\t\t\t( node as any ).style.setProperty( styleName, styleValue as string );\n\t\t\t}\n\t\t\t// Cases:\n\t\t\t//\n\t\t\t//\t\tstyle: {\n\t\t\t//\t\t\tcolor: 'red'\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\telse {\n\t\t\t\t( node as any ).style[ styleName ] = styleValue;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Recursively renders HTML element's children from {@link module:ui/template~Template#children}.\n\t *\n\t * @param data Rendering data.\n\t */\n\tprivate _renderElementChildren( data: RenderData ) {\n\t\tconst node = data.node as HTMLElement;\n\t\tconst container = data.intoFragment ? document.createDocumentFragment() : node;\n\t\tconst isApplying = data.isApplying;\n\t\tlet childIndex = 0;\n\n\t\tfor ( const child of this.children! ) {\n\t\t\tif ( isViewCollection( child ) ) {\n\t\t\t\tif ( !isApplying ) {\n\t\t\t\t\tchild.setParent( node );\n\n\t\t\t\t\t// Note: ViewCollection renders its children.\n\t\t\t\t\tfor ( const view of child ) {\n\t\t\t\t\t\tcontainer.appendChild( view.element! );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ( isView( child ) ) {\n\t\t\t\tif ( !isApplying ) {\n\t\t\t\t\tif ( !child.isRendered ) {\n\t\t\t\t\t\tchild.render();\n\t\t\t\t\t}\n\n\t\t\t\t\tcontainer.appendChild( child.element! );\n\t\t\t\t}\n\t\t\t} else if ( isNode( child ) ) {\n\t\t\t\tcontainer.appendChild( child );\n\t\t\t} else {\n\t\t\t\tif ( isApplying ) {\n\t\t\t\t\tconst revertData = data.revertData!;\n\t\t\t\t\tconst childRevertData = getEmptyRevertData();\n\n\t\t\t\t\trevertData.children.push( childRevertData );\n\n\t\t\t\t\tchild._renderNode( {\n\t\t\t\t\t\tintoFragment: false,\n\t\t\t\t\t\tnode: container.childNodes[ childIndex++ ] as any,\n\t\t\t\t\t\tisApplying: true,\n\t\t\t\t\t\trevertData: childRevertData\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.appendChild( child.render() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( data.intoFragment ) {\n\t\t\tnode.appendChild( container );\n\t\t}\n\t}\n\n\t/**\n\t * Activates `on` event listeners from the {@link module:ui/template~TemplateDefinition}\n\t * on an HTML element.\n\t *\n\t * @param data Rendering data.\n\t */\n\tprivate _setUpListeners( data: RenderData ) {\n\t\tif ( !this.eventListeners ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const key in this.eventListeners ) {\n\t\t\tconst revertBindings = this.eventListeners[ key ].map( schemaItem => {\n\t\t\t\tconst [ domEvtName, domSelector ] = key.split( '@' );\n\n\t\t\t\treturn schemaItem.activateDomEventListener( domEvtName, domSelector, data );\n\t\t\t} );\n\n\t\t\tif ( data.revertData ) {\n\t\t\t\tdata.revertData.bindings.push( revertBindings );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * For a given {@link module:ui/template~TemplateValueSchema} containing {@link module:ui/template~TemplateBinding}\n\t * activates the binding and sets its initial value.\n\t *\n\t * Note: {@link module:ui/template~TemplateValueSchema} can be for HTML element attributes or\n\t * text node `textContent`.\n\t *\n\t * @param options Binding options.\n\t * @param options.updater A function which updates the DOM (like attribute or text).\n\t * @param options.data Rendering data.\n\t */\n\tprivate _bindToObservable( { schema, updater, data }: {\n\t\tschema: Array<TemplateSimpleValue | TemplateBinding>;\n\t\tupdater: Updater;\n\t\tdata: RenderData;\n\t} ) {\n\t\tconst revertData = data.revertData;\n\n\t\t// Set initial values.\n\t\tsyncValueSchemaValue( schema, updater, data );\n\n\t\tconst revertBindings = schema\n\t\t\t// Filter \"falsy\" (false, undefined, null, '') value schema components out.\n\t\t\t.filter( item => !isFalsy( item ) )\n\t\t\t// Filter inactive bindings from schema, like static strings ('foo'), numbers (42), etc.\n\t\t\t.filter( ( item: any ): item is TemplateBinding => item.observable )\n\t\t\t// Once only the actual binding are left, let the emitter listen to observable change:attribute event.\n\t\t\t// TODO: Reduce the number of listeners attached as many bindings may listen\n\t\t\t// to the same observable attribute.\n\t\t\t.map( templateBinding => templateBinding.activateAttributeListener( schema, updater, data ) );\n\n\t\tif ( revertData ) {\n\t\t\trevertData.bindings.push( revertBindings );\n\t\t}\n\t}\n\n\t/**\n\t * Reverts {@link module:ui/template~RenderData#revertData template data} from a node to\n\t * return it to the original state.\n\t *\n\t * @param node A node to be reverted.\n\t * @param revertData An object that stores information about what changes have been made by\n\t * {@link #apply} to the node. See {@link module:ui/template~RenderData#revertData} for more information.\n\t */\n\tprivate _revertTemplateFromNode( node: HTMLElement | Text, revertData: RevertData ) {\n\t\tfor ( const binding of revertData.bindings ) {\n\t\t\t// Each binding may consist of several observable+observable#attribute.\n\t\t\t// like the following has 2:\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\t'x',\n\t\t\t//\t\t\tbind.to( 'foo' ),\n\t\t\t//\t\t\t'y',\n\t\t\t//\t\t\tbind.to( 'bar' )\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\tfor ( const revertBinding of binding ) {\n\t\t\t\trevertBinding();\n\t\t\t}\n\t\t}\n\n\t\tif ( revertData.text ) {\n\t\t\tnode.textContent = revertData.text;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst element = node as HTMLElement;\n\n\t\tfor ( const attrName in revertData.attributes ) {\n\t\t\tconst attrValue = revertData.attributes[ attrName ];\n\n\t\t\t// When the attribute has **not** been set before #apply().\n\t\t\tif ( attrValue === null ) {\n\t\t\t\telement.removeAttribute( attrName );\n\t\t\t} else {\n\t\t\t\telement.setAttribute( attrName, attrValue );\n\t\t\t}\n\t\t}\n\n\t\tfor ( let i = 0; i < revertData.children.length; ++i ) {\n\t\t\tthis._revertTemplateFromNode( element.childNodes[ i ] as any, revertData.children[ i ] );\n\t\t}\n\t}\n}\n\nexport type AttributeValues = Array<TemplateSimpleValue | TemplateBinding> |\n\t[ NamespacedValue<Array<TemplateSimpleValue | TemplateBinding>> ];\n\n/**\n * Describes a binding created by the {@link module:ui/template~Template.bind} interface.\n *\n * @internal\n */\nexport abstract class TemplateBinding {\n\t/**\n\t * The name of the {@link module:ui/template~TemplateBinding#observable observed attribute}.\n\t */\n\tpublic readonly attribute: string;\n\n\t/**\n\t * An observable instance of the binding. It either:\n\t *\n\t * * provides the attribute with the value,\n\t * * or passes the event when a corresponding DOM event is fired.\n\t */\n\tpublic readonly observable: Observable;\n\n\t/**\n\t * An {@link module:utils/emittermixin~Emitter} used by the binding to:\n\t *\n\t * * listen to the attribute change in the {@link module:ui/template~TemplateBinding#observable},\n\t * * or listen to the event in the DOM.\n\t */\n\tpublic readonly emitter: Emitter;\n\n\t/**\n\t * A custom function to process the value of the {@link module:ui/template~TemplateBinding#attribute}.\n\t */\n\tpublic readonly callback?: ( value: any, node: Node ) => TemplateSimpleValue;\n\n\t/**\n\t * Creates an instance of the {@link module:ui/template~TemplateBinding} class.\n\t *\n\t * @param def The definition of the binding.\n\t */\n\tconstructor( def: {\n\t\tattribute: string;\n\t\tobservable: Observable;\n\t\temitter: Emitter;\n\t\tcallback?: ( value: any, node: Node ) => TemplateSimpleValue;\n\t} ) {\n\t\tthis.attribute = def.attribute;\n\t\tthis.observable = def.observable;\n\t\tthis.emitter = def.emitter;\n\t\tthis.callback = def.callback;\n\t}\n\n\t/**\n\t * Returns the value of the binding. It is the value of the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}. The value may be processed by the\n\t * {@link module:ui/template~TemplateBinding#callback}, if such has been passed to the binding.\n\t *\n\t * @param node A native DOM node, passed to the custom {@link module:ui/template~TemplateBinding#callback}.\n\t * @returns The value of {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}.\n\t */\n\tpublic getValue( node: Node ): TemplateSimpleValue {\n\t\tconst value = ( this.observable as any )[ this.attribute ];\n\n\t\treturn this.callback ? this.callback( value, node ) : value;\n\t}\n\n\t/**\n\t * Activates the listener which waits for changes of the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}, then updates the DOM with the aggregated\n\t * value of {@link module:ui/template~TemplateValueSchema}.\n\t *\n\t * @param schema A full schema to generate an attribute or text in the DOM.\n\t * @param updater A DOM updater function used to update the native DOM attribute or text.\n\t * @param data Rendering data.\n\t * @returns A function to sever the listener binding.\n\t */\n\tpublic activateAttributeListener(\n\t\tschema: Array<TemplateSimpleValue | TemplateBinding>,\n\t\tupdater: Updater,\n\t\tdata: RenderData\n\t): () => void {\n\t\tconst callback = () => syncValueSchemaValue( schema, updater, data );\n\n\t\tthis.emitter.listenTo<ObservableChangeEvent>( this.observable, `change:${ this.attribute }`, callback );\n\n\t\t// Allows revert of the listener.\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening( this.observable, `change:${ this.attribute }`, callback );\n\t\t};\n\t}\n}\n\n/**\n * Describes either:\n *\n * * a binding to an {@link module:utils/observablemixin~Observable},\n * * or a native DOM event binding.\n *\n * It is created by the {@link module:ui/template~BindChain#to} method.\n *\n * @internal\n */\nexport class TemplateToBinding extends TemplateBinding {\n\tpublic readonly eventNameOrFunction: string | ( ( domEvent: Event ) => void );\n\n\tconstructor( def: ConstructorParameters<typeof TemplateBinding>[ 0 ] & {\n\t\teventNameOrFunction: string | ( ( domEvent: Event ) => void );\n\t} ) {\n\t\tsuper( def );\n\n\t\tthis.eventNameOrFunction = def.eventNameOrFunction;\n\t}\n\n\t/**\n\t * Activates the listener for the native DOM event, which when fired, is propagated by\n\t * the {@link module:ui/template~TemplateBinding#emitter}.\n\t *\n\t * @param domEvtName The name of the native DOM event.\n\t * @param domSelector The selector in the DOM to filter delegated events.\n\t * @param data Rendering data.\n\t * @returns A function to sever the listener binding.\n\t */\n\tpublic activateDomEventListener(\n\t\tdomEvtName: string,\n\t\tdomSelector: string,\n\t\tdata: { node: any }\n\t): () => void {\n\t\tconst callback = ( evt: unknown, domEvt: Event ) => {\n\t\t\tif ( !domSelector || ( domEvt.target as Element ).matches( domSelector ) ) {\n\t\t\t\tif ( typeof this.eventNameOrFunction == 'function' ) {\n\t\t\t\t\tthis.eventNameOrFunction( domEvt );\n\t\t\t\t} else {\n\t\t\t\t\tthis.observable.fire( this.eventNameOrFunction, domEvt );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.emitter.listenTo( data.node, domEvtName, callback );\n\n\t\t// Allows revert of the listener.\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening( data.node, domEvtName, callback );\n\t\t};\n\t}\n}\n\n/**\n * Describes a binding to {@link module:utils/observablemixin~Observable} created by the {@link module:ui/template~BindChain#if}\n * method.\n *\n * @internal\n */\nexport class TemplateIfBinding extends TemplateBinding {\n\t/**\n\t * The value of the DOM attribute or text to be set if the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable} is `true`.\n\t */\n\tpublic readonly valueIfTrue?: string;\n\n\tconstructor( def: ConstructorParameters<typeof TemplateBinding>[ 0 ] & {\n\t\tvalueIfTrue?: string;\n\t} ) {\n\t\tsuper( def );\n\n\t\tthis.valueIfTrue = def.valueIfTrue;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override getValue( node: Node ): TemplateSimpleValue {\n\t\tconst value = super.getValue( node );\n\n\t\treturn isFalsy( value ) ? false : ( this.valueIfTrue || true ) as any;\n\t}\n}\n\n/**\n * Checks whether given {@link module:ui/template~TemplateValueSchema} contains a\n * {@link module:ui/template~TemplateBinding}.\n */\nfunction hasTemplateBinding( schema: any ) {\n\tif ( !schema ) {\n\t\treturn false;\n\t}\n\n\t// Normalize attributes with additional data like namespace:\n\t//\n\t//\t\tclass: {\n\t//\t\t\tns: 'abc',\n\t//\t\t\tvalue: [ ... ]\n\t//\t\t}\n\t//\n\tif ( schema.value ) {\n\t\tschema = schema.value;\n\t}\n\n\tif ( Array.isArray( schema ) ) {\n\t\treturn schema.some( hasTemplateBinding );\n\t} else if ( schema instanceof TemplateBinding ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Checks whether the given name is a valid CSS variable name.\n *\n * A valid CSS variable name starts with two dashes (`--`), followed by a letter, underscore (`_`),\n * or dash (`-`), and can be followed by any combination of letters, digits, underscores, dashes,\n * or additional dashes.\n *\n * @param name The name to validate as a CSS variable.\n * @returns True if the name is a valid CSS variable, false otherwise.\n */\nfunction isCssVariable( name: string ): boolean {\n\tconst regex = /^--[a-zA-Z_-][\\w-]*$/;\n\n\treturn regex.test( name );\n}\n\n/**\n * Assembles the value using {@link module:ui/template~TemplateValueSchema} and stores it in a form of\n * an Array. Each entry of the Array corresponds to one of {@link module:ui/template~TemplateValueSchema}\n * items.\n *\n * @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n */\nfunction getValueSchemaValue( schema: Array<TemplateSimpleValue | TemplateBinding>, node: Node ) {\n\treturn schema.map( schemaItem => {\n\t\t// Process {@link module:ui/template~TemplateBinding} bindings.\n\t\tif ( schemaItem instanceof TemplateBinding ) {\n\t\t\treturn schemaItem.getValue( node );\n\t\t}\n\n\t\t// All static values like strings, numbers, and \"falsy\" values (false, null, undefined, '', etc.) just pass.\n\t\treturn schemaItem;\n\t} );\n}\n\n/**\n * A function executed each time the bound Observable attribute changes, which updates the DOM with a value\n * constructed from {@link module:ui/template~TemplateValueSchema}.\n *\n * @param updater A function which updates the DOM (like attribute or text).\n * @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n */\nfunction syncValueSchemaValue(\n\tschema: Array<TemplateSimpleValue | TemplateBinding>,\n\tupdater: Updater,\n\t{ node }: { node: Node }\n) {\n\tconst values = getValueSchemaValue( schema, node );\n\tlet value: TemplateSimpleValue;\n\n\t// Check if schema is a single Template.bind.if, like:\n\t//\n\t//\t\tclass: Template.bind.if( 'foo' )\n\t//\n\tif ( schema.length == 1 && schema[ 0 ] instanceof TemplateIfBinding ) {\n\t\tvalue = values[ 0 ];\n\t} else {\n\t\tvalue = values.reduce( arrayValueReducer, '' );\n\t}\n\n\tif ( isFalsy( value ) ) {\n\t\tupdater.remove();\n\t} else {\n\t\tupdater.set( value );\n\t}\n}\n\ninterface Updater {\n\tset( value: any ): void;\n\tremove(): void;\n}\n\n/**\n * Returns an object consisting of `set` and `remove` functions, which\n * can be used in the context of DOM Node to set or reset `textContent`.\n * @see module:ui/view~View#_bindToObservable\n *\n * @param node DOM Node to be modified.\n */\nfunction getTextUpdater( node: Node ): Updater {\n\treturn {\n\t\tset( value ) {\n\t\t\tnode.textContent = value;\n\t\t},\n\n\t\tremove() {\n\t\t\tnode.textContent = '';\n\t\t}\n\t};\n}\n\n/**\n * Returns an object consisting of `set` and `remove` functions, which\n * can be used in the context of DOM Node to set or reset an attribute.\n * @see module:ui/view~View#_bindToObservable\n *\n * @param el DOM Node to be modified.\n * @param attrName Name of the attribute to be modified.\n * @param ns Namespace to use.\n */\nfunction getAttributeUpdater( el: Element, attrName: string, ns: string | null ): Updater {\n\treturn {\n\t\tset( value ) {\n\t\t\tel.setAttributeNS( ns, attrName, value );\n\t\t},\n\n\t\tremove() {\n\t\t\tel.removeAttributeNS( ns, attrName );\n\t\t}\n\t};\n}\n\n/**\n * Returns an object consisting of `set` and `remove` functions, which\n * can be used in the context of CSSStyleDeclaration to set or remove a style.\n * @see module:ui/view~View#_bindToObservable\n *\n * @param el DOM Node to be modified.\n * @param styleName Name of the style to be modified.\n */\nfunction getStyleUpdater( el: any, styleName: string ): Updater {\n\treturn {\n\t\tset( value ) {\n\t\t\tif ( isCssVariable( styleName ) ) {\n\t\t\t\tel.style.setProperty( styleName, value );\n\t\t\t} else {\n\t\t\t\tel.style[ styleName ] = value;\n\t\t\t}\n\t\t},\n\n\t\tremove() {\n\t\t\tif ( isCssVariable( styleName ) ) {\n\t\t\t\tel.style.removeProperty( styleName );\n\t\t\t} else {\n\t\t\t\tel.style[ styleName ] = null;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Clones definition of the template.\n */\nfunction clone( def: unknown ) {\n\tconst clone = cloneDeepWith( def, value => {\n\t\t// Don't clone the `Template.bind`* bindings because of the references to Observable\n\t\t// and DomEmitterMixin instances inside, which would also be traversed and cloned by greedy\n\t\t// cloneDeepWith algorithm. There's no point in cloning Observable/DomEmitterMixins\n\t\t// along with the definition.\n\t\t//\n\t\t// Don't clone Template instances if provided as a child. They're simply #render()ed\n\t\t// and nothing should interfere.\n\t\t//\n\t\t// Also don't clone View instances if provided as a child of the Template. The template\n\t\t// instance will be extracted from the View during the normalization and there's no need\n\t\t// to clone it.\n\t\tif ( value && ( value instanceof TemplateBinding || isTemplate( value ) || isView( value ) || isViewCollection( value ) ) ) {\n\t\t\treturn value;\n\t\t}\n\t} );\n\n\treturn clone;\n}\n\n/**\n * Normalizes given {@link module:ui/template~TemplateDefinition}.\n *\n * See:\n *  * {@link normalizeAttributes}\n *  * {@link normalizeListeners}\n *  * {@link normalizePlainTextDefinition}\n *  * {@link normalizeTextDefinition}\n *\n * @param def A template definition.\n * @returns Normalized definition.\n */\nfunction normalize( def: any ) {\n\tif ( typeof def == 'string' ) {\n\t\tdef = normalizePlainTextDefinition( def );\n\t} else if ( def.text ) {\n\t\tnormalizeTextDefinition( def );\n\t}\n\n\tif ( def.on ) {\n\t\tdef.eventListeners = normalizeListeners( def.on );\n\n\t\t// Template mixes EmitterMixin, so delete #on to avoid collision.\n\t\tdelete def.on;\n\t}\n\n\tif ( !def.text ) {\n\t\tif ( def.attributes ) {\n\t\t\tnormalizeAttributes( def.attributes );\n\t\t}\n\n\t\tconst children = [];\n\n\t\tif ( def.children ) {\n\t\t\tif ( isViewCollection( def.children ) ) {\n\t\t\t\tchildren.push( def.children );\n\t\t\t} else {\n\t\t\t\tfor ( const child of def.children ) {\n\t\t\t\t\tif ( isTemplate( child ) || isView( child ) || isNode( child ) ) {\n\t\t\t\t\t\tchildren.push( child );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchildren.push( new Template( child ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdef.children = children;\n\t}\n\n\treturn def;\n}\n\n/**\n * Normalizes \"attributes\" section of {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * attributes: {\n * \ta: 'bar',\n * \tb: {@link module:ui/template~TemplateBinding},\n * \tc: {\n * \t\tvalue: 'bar'\n * \t}\n * }\n * ```\n *\n * becomes\n *\n * ```\n * attributes: {\n * \ta: [ 'bar' ],\n * \tb: [ {@link module:ui/template~TemplateBinding} ],\n * \tc: {\n * \t\tvalue: [ 'bar' ]\n * \t}\n * }\n * ```\n */\nfunction normalizeAttributes( attributes: any ) {\n\tfor ( const a in attributes ) {\n\t\tif ( attributes[ a ].value ) {\n\t\t\tattributes[ a ].value = toArray( attributes[ a ].value );\n\t\t}\n\n\t\tarrayify( attributes, a );\n\t}\n}\n\n/**\n * Normalizes \"on\" section of {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * on: {\n * \ta: 'bar',\n * \tb: {@link module:ui/template~TemplateBinding},\n * \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n * }\n * ```\n *\n * becomes\n *\n * ```\n * on: {\n * \ta: [ 'bar' ],\n * \tb: [ {@link module:ui/template~TemplateBinding} ],\n * \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n * }\n * ```\n *\n * @returns Object containing normalized listeners.\n */\nfunction normalizeListeners( listeners: any ) {\n\tfor ( const l in listeners ) {\n\t\tarrayify( listeners, l );\n\t}\n\n\treturn listeners;\n}\n\n/**\n * Normalizes \"string\" {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * \"foo\"\n * ```\n *\n * becomes\n *\n * ```\n * { text: [ 'foo' ] },\n * ```\n *\n * @returns Normalized template definition.\n */\nfunction normalizePlainTextDefinition( def: string ) {\n\treturn {\n\t\ttext: [ def ]\n\t};\n}\n\n/**\n * Normalizes text {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * children: [\n * \t{ text: 'def' },\n * \t{ text: {@link module:ui/template~TemplateBinding} }\n * ]\n * ```\n *\n * becomes\n *\n * ```\n * children: [\n * \t{ text: [ 'def' ] },\n * \t{ text: [ {@link module:ui/template~TemplateBinding} ] }\n * ]\n * ```\n */\nfunction normalizeTextDefinition( def: any ) {\n\tdef.text = toArray( def.text );\n}\n\n/**\n * Wraps an entry in Object in an Array, if not already one.\n *\n * ```\n * {\n * \tx: 'y',\n * \ta: [ 'b' ]\n * }\n * ```\n *\n * becomes\n *\n * ```\n * {\n * \tx: [ 'y' ],\n * \ta: [ 'b' ]\n * }\n * ```\n */\nfunction arrayify( obj: any, key: string ) {\n\tobj[ key ] = toArray( obj[ key ] );\n}\n\n/**\n * A helper which concatenates the value avoiding unwanted\n * leading white spaces.\n */\nfunction arrayValueReducer( prev: TemplateSimpleValue, cur: TemplateSimpleValue ) {\n\tif ( isFalsy( cur ) ) {\n\t\treturn prev;\n\t} else if ( isFalsy( prev ) ) {\n\t\treturn cur;\n\t} else {\n\t\treturn `${ prev } ${ cur }`;\n\t}\n}\n\n/**\n * Extends one object defined in the following format:\n *\n * ```\n * {\n * \tkey1: [Array1],\n * \tkey2: [Array2],\n * \t...\n * \tkeyN: [ArrayN]\n * }\n * ```\n *\n * with another object of the same data format.\n *\n * @param obj Base object.\n * @param ext Object extending base.\n */\nfunction extendObjectValueArray( obj: any, ext: any ) {\n\tfor ( const a in ext ) {\n\t\tif ( obj[ a ] ) {\n\t\t\tobj[ a ].push( ...ext[ a ] );\n\t\t} else {\n\t\t\tobj[ a ] = ext[ a ];\n\t\t}\n\t}\n}\n\n/**\n * A helper for {@link module:ui/template~Template#extend}. Recursively extends {@link module:ui/template~Template} instance\n * with content from {@link module:ui/template~TemplateDefinition}. See {@link module:ui/template~Template#extend} to learn more.\n *\n * @param def A template instance to be extended.\n * @param def A definition which is to extend the template instance.\n * @param Error context.\n */\nfunction extendTemplate( template: Template, def: any ) {\n\tif ( def.attributes ) {\n\t\tif ( !template.attributes ) {\n\t\t\ttemplate.attributes = {};\n\t\t}\n\n\t\textendObjectValueArray( template.attributes, def.attributes );\n\t}\n\n\tif ( def.eventListeners ) {\n\t\tif ( !template.eventListeners ) {\n\t\t\ttemplate.eventListeners = {};\n\t\t}\n\n\t\textendObjectValueArray( template.eventListeners, def.eventListeners );\n\t}\n\n\tif ( def.text ) {\n\t\ttemplate.text!.push( ...def.text );\n\t}\n\n\tif ( def.children && def.children.length ) {\n\t\tif ( template.children!.length != def.children.length ) {\n\t\t\t/**\n\t\t\t * The number of children in extended definition does not match.\n\t\t\t *\n\t\t\t * @error ui-template-extend-children-mismatch\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'ui-template-extend-children-mismatch',\n\t\t\t\ttemplate\n\t\t\t);\n\t\t}\n\n\t\tlet childIndex = 0;\n\n\t\tfor ( const childDef of def.children ) {\n\t\t\textendTemplate( template.children![ childIndex++ ] as any, childDef );\n\t\t}\n\t}\n}\n\n/**\n * Checks if value is \"falsy\".\n * Note: 0 (Number) is not \"falsy\" in this context.\n *\n * @param value Value to be checked.\n */\nfunction isFalsy( value: unknown ): value is FalsyValue {\n\treturn !value && value !== 0;\n}\n\n/**\n * Checks if the item is an instance of {@link module:ui/view~View}\n *\n * @param value Value to be checked.\n */\nfunction isView( item: unknown ): item is View {\n\treturn item instanceof View;\n}\n\n/**\n * Checks if the item is an instance of {@link module:ui/template~Template}\n *\n * @param value Value to be checked.\n */\nfunction isTemplate( item: unknown ): item is Template {\n\treturn item instanceof Template;\n}\n\n/**\n * Checks if the item is an instance of {@link module:ui/viewcollection~ViewCollection}\n *\n * @param value Value to be checked.\n */\nfunction isViewCollection( item: unknown ): item is ViewCollection {\n\treturn item instanceof ViewCollection;\n}\n\n/**\n * Checks if value array contains the one with namespace.\n */\nfunction isNamespaced(\n\tattrValue: AttributeValues\n): attrValue is [ NamespacedValue<Array<TemplateSimpleValue | TemplateBinding>> ] {\n\treturn isObject( attrValue[ 0 ] ) && ( attrValue[ 0 ] as any ).ns;\n}\n\n/**\n * Creates an empty skeleton for {@link module:ui/template~Template#revert}\n * data.\n */\nfunction getEmptyRevertData(): RevertData {\n\treturn {\n\t\tchildren: [],\n\t\tbindings: [],\n\t\tattributes: {}\n\t};\n}\n\n/**\n * Checks whether an attribute should be extended when\n * {@link module:ui/template~Template#apply} is called.\n *\n * @param attrName Attribute name to check.\n */\nfunction shouldExtend( attrName: string ) {\n\treturn attrName == 'class' || attrName == 'style';\n}\n\n/**\n * A definition of the {@link module:ui/template~Template}. It describes what kind of\n * node a template will render (HTML element or text), attributes of an element, DOM event\n * listeners and children.\n *\n * Also see:\n * * {@link module:ui/template~TemplateValueSchema} to learn about HTML element attributes,\n * * {@link module:ui/template~TemplateListenerSchema} to learn about DOM event listeners.\n *\n * A sample definition on an HTML element can look like this:\n *\n * ```ts\n * new Template( {\n * \ttag: 'p',\n * \tchildren: [\n * \t\t{\n * \t\t\ttag: 'span',\n * \t\t\tattributes: { ... },\n * \t\t\tchildren: [ ... ],\n * \t\t},\n * \t\t{\n * \t\t\ttext: 'static–text'\n * \t\t},\n * \t\t'also-static–text',\n * \t],\n * \tattributes: {\n * \t\tclass: {@link module:ui/template~TemplateValueSchema},\n * \t\tid: {@link module:ui/template~TemplateValueSchema},\n * \t\tstyle: {@link module:ui/template~TemplateValueSchema}\n *\n * \t\t// ...\n * \t},\n * \ton: {\n * \t\t'click': {@link module:ui/template~TemplateListenerSchema}\n *\n * \t\t// Document.querySelector format is also accepted.\n * \t\t'keyup@a.some-class': {@link module:ui/template~TemplateListenerSchema}\n *\n * \t\t// ...\n * \t}\n * } );\n * ```\n *\n * A {@link module:ui/view~View}, another {@link module:ui/template~Template} or a native DOM node\n * can also become a child of a template. When a view is passed, its {@link module:ui/view~View#element} is used:\n *\n * ```ts\n * const view = new SomeView();\n * const childTemplate = new Template( { ... } );\n * const childNode = document.createElement( 'b' );\n *\n * new Template( {\n * \ttag: 'p',\n *\n * \tchildren: [\n * \t\t// view#element will be added as a child of this <p>.\n * \t\tview,\n *\n * \t\t// The output of childTemplate.render() will be added here.\n * \t\tchildTemplate,\n *\n * \t\t// Native DOM nodes are included directly in the rendered output.\n * \t\tchildNode\n * \t]\n * } );\n * ```\n *\n * An entire {@link module:ui/viewcollection~ViewCollection} can be used as a child in the definition:\n *\n * ```ts\n * const collection = new ViewCollection();\n * collection.add( someView );\n *\n * new Template( {\n * \ttag: 'p',\n *\n * \tchildren: collection\n * } );\n * ```\n */\nexport type TemplateDefinition = string |\n\tTemplate |\n\tTemplateElementDefinition |\n\tTemplateTextDefinition;\n\nexport type TemplateElementDefinition = {\n\n\t/**\n\t * See the template {@link module:ui/template~Template#tag} property.\n\t */\n\ttag: string;\n\n\t/**\n\t * See the template {@link module:ui/template~Template#attributes} property.\n\t */\n\tattributes?: Record<string, TemplateValueSchema>;\n\n\t/**\n\t * See the template {@link module:ui/template~Template#children} property.\n\t */\n\tchildren?: Iterable<View | Node | Template | TemplateDefinition>;\n\n\t/**\n\t * See the template {@link module:ui/template~Template#eventListeners} property.\n\t */\n\ton?: Record<string, TemplateListenerSchema>;\n};\n\nexport type TemplateTextDefinition = {\n\n\t/**\n\t * See the template {@link module:ui/template~Template#text} property.\n\t */\n\ttext: ArrayOrItem<TemplateSimpleValueSchema>;\n};\n\nexport type FalsyValue = false | null | undefined | '';\n\nexport type NamespacedValue<T> = { ns: string; value: T };\n\nexport type TemplateSimpleValue = string | boolean | number | null | undefined;\n\nexport type TemplateSimpleValueSchema = TemplateSimpleValue | AttributeBinding;\n\n/**\n * Describes a value of an HTML element attribute or `textContent`. It allows combining multiple\n * data sources like static values and {@link module:utils/observablemixin~Observable} attributes.\n *\n * Also see:\n * * {@link module:ui/template~TemplateDefinition} to learn where to use it,\n * * {@link module:ui/template~Template.bind} to learn how to configure\n * {@link module:utils/observablemixin~Observable} attribute bindings,\n * * {@link module:ui/template~Template#render} to learn how to render a template,\n * * {@link module:ui/template~BindChain#to `to()`} and {@link module:ui/template~BindChain#if `if()`}\n * methods to learn more about bindings.\n *\n * Attribute values can be described in many different ways:\n *\n * ```ts\n * // Bind helper will create bindings to attributes of the observable.\n * const bind = Template.bind( observable, emitter );\n *\n * new Template( {\n * \ttag: 'p',\n * \tattributes: {\n * \t\t// A plain string schema.\n * \t\t'class': 'static-text',\n *\n * \t\t// An object schema, binds to the \"foo\" attribute of the\n * \t\t// observable and follows its value.\n * \t\t'class': bind.to( 'foo' ),\n *\n * \t\t// An array schema, combines the above.\n * \t\t'class': [\n * \t\t\t'static-text',\n * \t\t\tbind.to( 'bar', () => { ... } ),\n *\n * \t\t\t// Bindings can also be conditional.\n * \t\t\tbind.if( 'baz', 'class-when-baz-is-true' )\n * \t\t],\n *\n * \t\t// An array schema, with a custom namespace, e.g. useful for creating SVGs.\n * \t\t'class': {\n * \t\t\tns: 'http://ns.url',\n * \t\t\tvalue: [\n * \t\t\t\tbind.if( 'baz', 'value-when-true' ),\n * \t\t\t\t'static-text'\n * \t\t\t]\n * \t\t},\n *\n * \t\t// An object schema, specific for styles.\n * \t\tstyle: {\n * \t\t\tcolor: 'red',\n * \t\t\t'--color': 'red',\n * \t\t\tbackgroundColor: bind.to( 'qux', () => { ... } )\n * \t\t}\n * \t}\n * } );\n * ```\n *\n * Text nodes can also have complex values:\n *\n * ```ts\n * const bind = Template.bind( observable, emitter );\n *\n * // Will render a \"foo\" text node.\n * new Template( {\n * \ttext: 'foo'\n * } );\n *\n * // Will render a \"static text: {observable.foo}\" text node.\n * // The text of the node will be updated as the \"foo\" attribute changes.\n * new Template( {\n * \ttext: [\n * \t\t'static text: ',\n * \t\tbind.to( 'foo', () => { ... } )\n * \t]\n * } );\n * ```\n */\nexport type TemplateValueSchema = ArrayOrItem<\n\tTemplateSimpleValueSchema |\n\tNamespacedValue<TemplateSimpleValueSchema>\n> |\n\tRecord<string, TemplateSimpleValueSchema>;\n\n/**\n * Describes an event listener attached to an HTML element. Such listener can propagate DOM events\n * through an {@link module:utils/observablemixin~Observable} instance, execute custom callbacks\n * or both, if necessary.\n *\n * Also see:\n * * {@link module:ui/template~TemplateDefinition} to learn more about template definitions,\n * * {@link module:ui/template~BindChain#to `to()`} method to learn more about bindings.\n *\n * Check out different ways of attaching event listeners below:\n *\n * ```ts\n * // Bind helper will propagate events through the observable.\n * const bind = Template.bind( observable, emitter );\n *\n * new Template( {\n * \ttag: 'p',\n * \ton: {\n * \t\t// An object schema. The observable will fire the \"clicked\" event upon DOM \"click\".\n * \t\tclick: bind.to( 'clicked' )\n *\n * \t\t// An object schema. It will work for \"click\" event on \"a.foo\" children only.\n * \t\t'click@a.foo': bind.to( 'clicked' )\n *\n * \t\t// An array schema, makes the observable propagate multiple events.\n * \t\tclick: [\n * \t\t\tbind.to( 'clicked' ),\n * \t\t\tbind.to( 'executed' )\n * \t\t],\n *\n * \t\t// An array schema with a custom callback.\n * \t\t'click@a.foo': {\n * \t\t\tbind.to( 'clicked' ),\n * \t\t\tbind.to( evt => {\n * \t\t\t\tconsole.log( `${ evt.target } has been clicked!` );\n * \t\t\t} }\n * \t\t}\n * \t}\n * } );\n * ```\n */\nexport type TemplateListenerSchema = ArrayOrItem<ListenerBinding>;\n\n// `Template.bind( observable, emitter ).to( name )` is used in two different contexts:\n// - in `attribute` (or `text`) section of the `TemplateDefinition` - `name` is an observed property of the provided `observable`, or\n// - in `on` section - `name` is the event to be fired.\n//\n// In both cases, the returned type is `TemplateToBinding` which can be misleading.\n// Moreover, some forms of `to()` can be used in specific context only:\n// - `to( name, callback )` can only be used in `attribute` or `text`\n// - `to( callback )` can only be used in `on`.\n//\n// But note, that the fact it's `Template{To,If}Binding` is not relevant to the user.\n// The instances are both produced and consumed by this file only.\n// So let's invent some opaque types for outside use and only keep using `TemplateBinding` internally. They can be different for\n// `attribute` and `on` contexts.\n// To make them opaque, a non-exported symbol is used, so it's not possible to accidentally create an instance outside.\ndeclare const AttributeBindingSymbol: unique symbol; // eslint-disable-line @typescript-eslint/no-unused-vars\ndeclare const ListenerBindingSymbol: unique symbol; // eslint-disable-line @typescript-eslint/no-unused-vars\n\nexport interface AttributeBinding { _opaqueAttributeBinding: typeof AttributeBindingSymbol }\nexport interface ListenerBinding { _opaqueListenerBinding: typeof ListenerBindingSymbol }\n\n/**\n * The return value of {@link ~Template.bind `Template.bind()`}. It provides `to()` and `if()`\n * methods to create the {@link module:utils/observablemixin~Observable observable} attribute and event bindings.\n */\nexport interface BindChain<TObservable> {\n\n\t/**\n\t * Binds an {@link module:utils/observablemixin~Observable observable} to either:\n\t *\n\t * * an HTML element attribute or a text node `textContent`, so it remains in sync with the observable\n\t * attribute as it changes,\n\t * * or an HTML element DOM event, so the DOM events are propagated through an observable.\n\t *\n\t * Some common use cases of `to()` bindings are presented below:\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \ttag: 'p',\n\t * \tattributes: {\n\t * \t\t// class=\"...\" attribute gets bound to `observable#a`\n\t * \t\tclass: bind.to( 'a' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t// <p>...</p> gets bound to observable#b; always `toUpperCase()`.\n\t * \t\t{\n\t * \t\t\ttext: bind.to( 'b', ( value, node ) => value.toUpperCase() )\n\t * \t\t}\n\t * \t],\n\t * \ton: {\n\t * \t\tclick: [\n\t * \t\t\t// An observable will fire \"clicked\" upon \"click\" in the DOM.\n\t * \t\t\tbind.to( 'clicked' ),\n\t *\n\t * \t\t\t// A custom callback will be executed upon \"click\" in the DOM.\n\t * \t\t\tbind.to( () => {\n\t * \t\t\t\t...\n\t * \t\t\t} )\n\t * \t\t]\n\t * \t}\n\t * } ).render();\n\t * ```\n\t *\n\t * Learn more about using `to()` in the {@link module:ui/template~TemplateValueSchema} and\n\t * {@link module:ui/template~TemplateListenerSchema}.\n\t *\n\t * @label ATTRIBUTE\n\t * @param attribute An attribute name of {@link module:utils/observablemixin~Observable}.\n\t */\n\tto<TAttribute extends keyof TObservable & string>(\n\t\tattribute: TAttribute\n\t): AttributeBinding & ListenerBinding;\n\n\t/**\n\t * Binds an {@link module:utils/observablemixin~Observable observable} to either:\n\t *\n\t * * an HTML element attribute or a text node `textContent`, so it remains in sync with the observable\n\t * attribute as it changes,\n\t * * or an HTML element DOM event, so the DOM events are propagated through an observable.\n\t *\n\t * Some common use cases of `to()` bindings are presented below:\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \ttag: 'p',\n\t * \tattributes: {\n\t * \t\t// class=\"...\" attribute gets bound to `observable#a`\n\t * \t\tclass: bind.to( 'a' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t// <p>...</p> gets bound to observable#b; always `toUpperCase()`.\n\t * \t\t{\n\t * \t\t\ttext: bind.to( 'b', ( value, node ) => value.toUpperCase() )\n\t * \t\t}\n\t * \t],\n\t * \ton: {\n\t * \t\tclick: [\n\t * \t\t\t// An observable will fire \"clicked\" upon \"click\" in the DOM.\n\t * \t\t\tbind.to( 'clicked' ),\n\t *\n\t * \t\t\t// A custom callback will be executed upon \"click\" in the DOM.\n\t * \t\t\tbind.to( () => {\n\t * \t\t\t\t...\n\t * \t\t\t} )\n\t * \t\t]\n\t * \t}\n\t * } ).render();\n\t * ```\n\t *\n\t * Learn more about using `to()` in the {@link module:ui/template~TemplateValueSchema} and\n\t * {@link module:ui/template~TemplateListenerSchema}.\n\t *\n\t * @label ATTRIBUTE_CALLBACK\n\t * @param attribute An attribute name of {@link module:utils/observablemixin~Observable}.\n\t * @param callback Allows for processing of the value. Accepts `Node` and `value` as arguments.\n\t */\n\tto<TAttribute extends keyof TObservable & string>(\n\t\tattribute: TAttribute,\n\t\tcallback: ( value: TObservable[ TAttribute ], node: Node ) => ( TemplateSimpleValue )\n\t): AttributeBinding;\n\n\t/**\n\t * Binds an {@link module:utils/observablemixin~Observable observable} to either:\n\t *\n\t * * an HTML element attribute or a text node `textContent`, so it remains in sync with the observable\n\t * attribute as it changes,\n\t * * or an HTML element DOM event, so the DOM events are propagated through an observable.\n\t *\n\t * Some common use cases of `to()` bindings are presented below:\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \ttag: 'p',\n\t * \tattributes: {\n\t * \t\t// class=\"...\" attribute gets bound to `observable#a`\n\t * \t\tclass: bind.to( 'a' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t// <p>...</p> gets bound to observable#b; always `toUpperCase()`.\n\t * \t\t{\n\t * \t\t\ttext: bind.to( 'b', ( value, node ) => value.toUpperCase() )\n\t * \t\t}\n\t * \t],\n\t * \ton: {\n\t * \t\tclick: [\n\t * \t\t\t// An observable will fire \"clicked\" upon \"click\" in the DOM.\n\t * \t\t\tbind.to( 'clicked' ),\n\t *\n\t * \t\t\t// A custom callback will be executed upon \"click\" in the DOM.\n\t * \t\t\tbind.to( () => {\n\t * \t\t\t\t...\n\t * \t\t\t} )\n\t * \t\t]\n\t * \t}\n\t * } ).render();\n\t * ```\n\t *\n\t * Learn more about using `to()` in the {@link module:ui/template~TemplateValueSchema} and\n\t * {@link module:ui/template~TemplateListenerSchema}.\n\t *\n\t * @label EVENT\n\t * @param eventNameOrCallback A DOM event name or an event callback.\n\t */\n\tto( eventNameOrCallback: string | ( ( domEvent: Event ) => void ) ): ListenerBinding;\n\n\t/**\n\t * Binds an {@link module:utils/observablemixin~Observable observable} to an HTML element attribute or a text\n\t * node `textContent` so it remains in sync with the observable attribute as it changes.\n\t *\n\t * Unlike {@link module:ui/template~BindChain#to}, it controls the presence of the attribute or `textContent`\n\t * depending on the \"falseness\" of an {@link module:utils/observablemixin~Observable} attribute.\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \ttag: 'input',\n\t * \tattributes: {\n\t * \t\t// <input checked> when `observable#a` is not undefined/null/false/''\n\t * \t\t// <input> when `observable#a` is undefined/null/false\n\t * \t\tchecked: bind.if( 'a' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t{\n\t * \t\t\t// <input>\"b-is-not-set\"</input> when `observable#b` is undefined/null/false/''\n\t * \t\t\t// <input></input> when `observable#b` is not \"falsy\"\n\t * \t\t\ttext: bind.if( 'b', 'b-is-not-set', ( value, node ) => !value )\n\t * \t\t}\n\t * \t]\n\t * } ).render();\n\t * ```\n\t *\n\t * Learn more about using `if()` in the {@link module:ui/template~TemplateValueSchema}.\n\t *\n\t * @param attribute An attribute name of {@link module:utils/observablemixin~Observable} used in the binding.\n\t * @param valueIfTrue Value set when the {@link module:utils/observablemixin~Observable} attribute is not\n\t * undefined/null/false/'' (empty string).\n\t * @param callback Allows for processing of the value. Accepts `Node` and `value` as arguments.\n\t */\n\tif<TAttribute extends keyof TObservable & string>(\n\t\tattribute: TAttribute,\n\t\tvalueIfTrue?: unknown,\n\t\tcallback?: ( value: TObservable[ TAttribute ], node: Node ) => ( boolean | FalsyValue )\n\t): AttributeBinding;\n}\n\n/**\n * The {@link module:ui/template~Template#_renderNode} configuration.\n * @internal\n */\nexport interface RenderData {\n\n\t/**\n\t * A node which is being rendered.\n\t */\n\tnode: HTMLElement | Text;\n\n\t/**\n\t * Tells {@link module:ui/template~Template#_renderNode} to render\n\t * children into `DocumentFragment` first and then append the fragment\n\t * to the parent element. It is a speed optimization.\n\t */\n\tintoFragment: boolean;\n\n\t/**\n\t * Indicates whether the {@link #node} has been provided by {@link module:ui/template~Template#apply}.\n\t */\n\tisApplying: boolean;\n\n\t/**\n\t * An object storing the data that helps {@link module:ui/template~Template#revert}\n\t * bringing back an element to its initial state, i.e. before\n\t * {@link module:ui/template~Template#apply} was called.\n\t */\n\trevertData?: RevertData;\n}\n\ninterface RevertData {\n\ttext?: string | null;\n\tchildren: Array<RevertData>;\n\tbindings: Array<Array<() => void>>;\n\tattributes: Record<string, string | null>;\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/**\n * @module ui/view\n */\n\nimport { ViewCollection } from './viewcollection.js';\nimport { Template, type BindChain, type TemplateDefinition } from './template.js';\n\nimport {\n\tCKEditorError,\n\tCollection,\n\tDomEmitterMixin,\n\tObservableMixin,\n\tisIterable,\n\ttype CollectionAddEvent,\n\ttype DecoratedMethodEvent,\n\ttype Locale,\n\ttype LocaleTranslate,\n\ttype ObservableMixinConstructor,\n\ttype DomEmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nconst ViewBase: DomEmitterMixinConstructor<ObservableMixinConstructor> =\n\t/* #__PURE__ */ DomEmitterMixin( /* #__PURE__ */ ObservableMixin() );\n\n/**\n * The basic view class, which represents an HTML element created out of a\n * {@link module:ui/view~View#template}. Views are building blocks of the user interface and handle\n * interaction\n *\n * Views {@link module:ui/view~View#registerChild aggregate} children in\n * {@link module:ui/view~View#createCollection collections} and manage the life cycle of DOM\n * listeners e.g. by handling rendering and destruction.\n *\n * See the {@link module:ui/template~TemplateDefinition} syntax to learn more about shaping view\n * elements, attributes and listeners.\n *\n * ```ts\n * class SampleView extends View {\n * \tconstructor( locale ) {\n * \t\tsuper( locale );\n *\n * \t\tconst bind = this.bindTemplate;\n *\n * \t\t// Views define their interface (state) using observable attributes.\n * \t\tthis.set( 'elementClass', 'bar' );\n *\n * \t\tthis.setTemplate( {\n * \t\t\ttag: 'p',\n *\n * \t\t\t// The element of the view can be defined with its children.\n * \t\t\tchildren: [\n * \t\t\t\t'Hello',\n * \t\t\t\t{\n * \t\t\t\t\ttag: 'b',\n * \t\t\t\t\tchildren: [ 'world!' ]\n * \t\t\t\t}\n * \t\t\t],\n * \t\t\tattributes: {\n * \t\t\t\tclass: [\n * \t\t\t\t\t'foo',\n *\n * \t\t\t\t\t// Observable attributes control the state of the view in DOM.\n * \t\t\t\t\tbind.to( 'elementClass' )\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\ton: {\n * \t\t\t\t// Views listen to DOM events and propagate them.\n * \t\t\t\tclick: bind.to( 'clicked' )\n * \t\t\t}\n * \t\t} );\n * \t}\n * }\n *\n * const view = new SampleView( locale );\n *\n * view.render();\n *\n * // Append <p class=\"foo bar\">Hello<b>world</b></p> to the <body>\n * document.body.appendChild( view.element );\n *\n * // Change the class attribute to <p class=\"foo baz\">Hello<b>world</b></p>\n * view.elementClass = 'baz';\n *\n * // Respond to the \"click\" event in DOM by executing a custom action.\n * view.on( 'clicked', () => {\n * \tconsole.log( 'The view has been clicked!' );\n * } );\n * ```\n *\n * @property {TElement | null} element An HTML element of the view. `null` until {@link module:ui/view~View#render rendered}\n * from the {@link module:ui/view~View#template template}. The class-level example above illustrates typical usage. The\n * full description, fenced examples, and assignment note are in the block comment immediately above the `element` field\n * in the source.\n */\nexport class View<TElement extends HTMLElement = HTMLElement>\n\textends ViewBase {\n\t/*\n\t * An HTML element of the view. `null` until {@link #render rendered}\n\t * from the {@link #template}.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor() {\n\t * \t\tsuper();\n\t *\n\t * \t\t// A template instance the #element will be created from.\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p'\n\t *\n\t * \t\t\t// ...\n\t * \t\t} );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView();\n\t *\n\t * // Renders the #template.\n\t * view.render();\n\t *\n\t * // Append the HTML element of the view to <body>.\n\t * document.body.appendChild( view.element );\n\t * ```\n\t *\n\t * **Note**: The element of the view can also be assigned directly:\n\t *\n\t * ```ts\n\t * view.element = document.querySelector( '#my-container' );\n\t * ```\n\t */\n\tpublic element: TElement | null;\n\n\t/**\n\t * Set `true` when the view has already been {@link module:ui/view~View#render rendered}.\n\t *\n\t * @readonly\n\t */\n\tpublic isRendered: boolean;\n\n\t/**\n\t * A set of tools to localize the user interface.\n\t *\n\t * Also see {@link module:core/editor/editor~Editor#locale}.\n\t *\n\t * @readonly\n\t */\n\tpublic locale: Locale | undefined;\n\n\t/**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t *\n\t * Note: If {@link #locale} instance hasn't been passed to the view this method may not\n\t * be available.\n\t *\n\t * @see module:utils/locale~Locale#t\n\t */\n\tpublic t: LocaleTranslate | undefined;\n\n\t/**\n\t * Template of this view. It provides the {@link #element} representing\n\t * the view in DOM, which is {@link #render rendered}.\n\t */\n\tpublic template?: Template;\n\n\tpublic declare viewUid?: string;\n\n\t/**\n\t * Collections registered with {@link #createCollection}.\n\t */\n\tprotected _viewCollections: Collection<ViewCollection>;\n\n\t/**\n\t * A collection of view instances, which have been added directly\n\t * into the {@link module:ui/template~Template#children}.\n\t */\n\tprotected _unboundChildren: ViewCollection;\n\n\t/**\n\t * Cached {@link module:ui/template~BindChain bind chain} object created by the\n\t * {@link #template}. See {@link #bindTemplate}.\n\t */\n\tprivate _bindTemplate?: BindChain<this>;\n\n\t/**\n\t * Creates an instance of the {@link module:ui/view~View} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper();\n\n\t\tthis.element = null;\n\t\tthis.isRendered = false;\n\n\t\tthis.locale = locale;\n\t\tthis.t = locale && locale.t;\n\n\t\tthis._viewCollections = new Collection();\n\t\tthis._unboundChildren = this.createCollection();\n\n\t\t// Pass parent locale to its children.\n\t\tthis._viewCollections.on<CollectionAddEvent<View>>( 'add', ( evt, collection ) => {\n\t\t\tcollection.locale = locale;\n\t\t\tcollection.t = locale && locale.t;\n\t\t} );\n\n\t\tthis.decorate( 'render' );\n\t}\n\n\t/**\n\t * Shorthand for {@link module:ui/template~Template.bind}, a binding\n\t * {@link module:ui/template~BindChain interface} pre–configured for the view instance.\n\t *\n\t * It provides {@link module:ui/template~BindChain#to `to()`} and\n\t * {@link module:ui/template~BindChain#if `if()`} methods that initialize bindings with\n\t * observable attributes and attach DOM listeners.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tconst bind = this.bindTemplate;\n\t *\n\t * \t\t// These {@link module:utils/observablemixin~Observable observable} attributes will control\n\t * \t\t// the state of the view in DOM.\n\t * \t\tthis.set( {\n\t * \t\t\telementClass: 'foo',\n\t * \t\t \tisEnabled: true\n\t * \t\t } );\n\t *\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p',\n\t *\n\t * \t\t\tattributes: {\n\t * \t\t\t\t// The class HTML attribute will follow elementClass\n\t * \t\t\t\t// and isEnabled view attributes.\n\t * \t\t\t\tclass: [\n\t * \t\t\t\t\tbind.to( 'elementClass' )\n\t * \t\t\t\t\tbind.if( 'isEnabled', 'present-when-enabled' )\n\t * \t\t\t\t]\n\t * \t\t\t},\n\t *\n\t * \t\t\ton: {\n\t * \t\t\t\t// The view will fire the \"clicked\" event upon clicking <p> in DOM.\n\t * \t\t\t\tclick: bind.to( 'clicked' )\n\t * \t\t\t}\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t */\n\tpublic get bindTemplate(): BindChain<this> {\n\t\tif ( this._bindTemplate ) {\n\t\t\treturn this._bindTemplate;\n\t\t}\n\n\t\treturn ( this._bindTemplate = Template.bind( this, this ) );\n\t}\n\n\t/**\n\t * Creates a new collection of views, which can be used as\n\t * {@link module:ui/template~Template#children} of this view.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tconst child = new ChildView( locale );\n\t * \t\tthis.items = this.createCollection( [ child ] );\n \t *\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p',\n\t *\n\t * \t\t\t// `items` collection will render here.\n\t * \t\t\tchildren: this.items\n\t * \t\t} );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView( locale );\n\t * view.render();\n\t *\n\t * // It will append <p><child#element></p> to the <body>.\n\t * document.body.appendChild( view.element );\n\t * ```\n\t *\n\t * @param views Initial views of the collection.\n\t * @returns A new collection of view instances.\n\t */\n\tpublic createCollection<T extends View = View>( views?: Iterable<T> ): ViewCollection<T> {\n\t\tconst collection = new ViewCollection<T>( views );\n\n\t\tthis._viewCollections.add( collection );\n\n\t\treturn collection;\n\t}\n\n\t/**\n\t * Registers a new child view under the view instance. Once registered, a child\n\t * view is managed by its parent, including {@link #render rendering}\n\t * and {@link #destroy destruction}.\n\t *\n\t * To revert this, use {@link #deregisterChild}.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tthis.childA = new SomeChildView( locale );\n\t * \t\tthis.childB = new SomeChildView( locale );\n\t *\n\t * \t\tthis.setTemplate( { tag: 'p' } );\n\t *\n\t * \t\t// Register the children.\n\t * \t\tthis.registerChild( [ this.childA, this.childB ] );\n\t * \t}\n\t *\n\t * \trender() {\n\t * \t\tsuper.render();\n\t *\n\t * \t\tthis.element.appendChild( this.childA.element );\n\t * \t\tthis.element.appendChild( this.childB.element );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView( locale );\n\t *\n\t * view.render();\n\t *\n\t * // Will append <p><childA#element><b></b><childB#element></p>.\n\t * document.body.appendChild( view.element );\n\t * ```\n\t *\n\t * **Note**: There's no need to add child views if they're already referenced in the\n\t * {@link #template}:\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tthis.childA = new SomeChildView( locale );\n\t * \t\tthis.childB = new SomeChildView( locale );\n\t *\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p',\n\t *\n \t * \t\t\t// These children will be added automatically. There's no\n \t * \t\t\t// need to call {@link #registerChild} for any of them.\n\t * \t\t\tchildren: [ this.childA, this.childB ]\n\t * \t\t} );\n\t * \t}\n\t *\n\t * \t// ...\n\t * }\n\t * ```\n\t *\n\t * @param children Children views to be registered.\n\t */\n\tpublic registerChild( children: View | Iterable<View> ): void {\n\t\tif ( !isIterable( children ) ) {\n\t\t\tchildren = [ children ];\n\t\t}\n\n\t\tfor ( const child of children ) {\n\t\t\tthis._unboundChildren.add( child );\n\t\t}\n\t}\n\n\t/**\n\t * The opposite of {@link #registerChild}. Removes a child view from this view instance.\n\t * Once removed, the child is no longer managed by its parent, e.g. it can safely\n\t * become a child of another parent view.\n\t *\n\t * @see #registerChild\n\t * @param children Child views to be removed.\n\t */\n\tpublic deregisterChild( children: View | Iterable<View> ): void {\n\t\tif ( !isIterable( children ) ) {\n\t\t\tchildren = [ children ];\n\t\t}\n\n\t\tfor ( const child of children ) {\n\t\t\tthis._unboundChildren.remove( child );\n\t\t}\n\t}\n\n\t/**\n\t * Sets the {@link #template} of the view with with given definition.\n\t *\n\t * A shorthand for:\n\t *\n\t * ```ts\n\t * view.setTemplate( definition );\n\t * ```\n\t *\n\t * @param definition Definition of view's template.\n\t */\n\tpublic setTemplate( definition: TemplateDefinition ): void {\n\t\tthis.template = new Template( definition );\n\t}\n\n\t/**\n\t * {@link module:ui/template~Template.extend Extends} the {@link #template} of the view with\n\t * with given definition.\n\t *\n\t * A shorthand for:\n\t *\n\t * ```ts\n\t * Template.extend( view.template, definition );\n\t * ```\n\t *\n\t * **Note**: Is requires the {@link #template} to be already set. See {@link #setTemplate}.\n\t *\n\t * @param definition Definition which extends the {@link #template}.\n\t */\n\tpublic extendTemplate( definition: Partial<TemplateDefinition> ): void {\n\t\tTemplate.extend( this.template!, definition );\n\t}\n\n\t/**\n\t * Recursively renders the view.\n\t *\n\t * Once the view is rendered:\n\t * * the {@link #element} becomes an HTML element out of {@link #template},\n\t * * the {@link #isRendered} flag is set `true`.\n\t *\n\t * **Note**: The children of the view:\n\t * * defined directly in the {@link #template}\n\t * * residing in collections created by the {@link #createCollection} method,\n\t * * and added by {@link #registerChild}\n\t * are also rendered in the process.\n\t *\n\t * In general, `render()` method is the right place to keep the code which refers to the\n\t * {@link #element} and should be executed at the very beginning of the view's life cycle.\n\t *\n\t * It is possible to {@link module:ui/template~Template.extend} the {@link #template} before\n\t * the view is rendered. To allow an early customization of the view (e.g. by its parent),\n\t * such references should be done in `render()`.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor() {\n\t * \t\tthis.setTemplate( {\n\t * \t\t\t// ...\n\t * \t\t} );\n\t * \t},\n\t *\n\t * \trender() {\n\t * \t\t// View#element becomes available.\n\t * \t\tsuper.render();\n\t *\n\t * \t\t// The \"scroll\" listener depends on #element.\n\t * \t\tthis.listenTo( window, 'scroll', () => {\n\t * \t\t\t// A reference to #element would render the #template and make it non-extendable.\n\t * \t\t\tif ( window.scrollY > 0 ) {\n\t * \t\t\t\tthis.element.scrollLeft = 100;\n\t * \t\t\t} else {\n\t * \t\t\t\tthis.element.scrollLeft = 0;\n\t * \t\t\t}\n\t * \t\t} );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView();\n\t *\n\t * // Let's customize the view before it gets rendered.\n\t * view.extendTemplate( {\n\t * \tattributes: {\n\t * \t\tclass: [\n\t * \t\t\t'additional-class'\n\t * \t\t]\n\t * \t}\n\t * } );\n\t *\n\t * // Late rendering allows customization of the view.\n\t * view.render();\n\t * ```\n\t */\n\tpublic render(): void {\n\t\tif ( this.isRendered ) {\n\t\t\t/**\n\t\t\t * This View has already been rendered.\n\t\t\t *\n\t\t\t * @error ui-view-render-already-rendered\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'ui-view-render-already-rendered', this );\n\t\t}\n\n\t\t// Render #element of the view.\n\t\tif ( this.template ) {\n\t\t\tthis.element = this.template.render() as TElement;\n\n\t\t\t// Auto–register view children from #template.\n\t\t\tthis.registerChild( this.template.getViews() );\n\t\t}\n\n\t\tthis.isRendered = true;\n\t}\n\n\t/**\n\t * Recursively destroys the view instance and child views added by {@link #registerChild} and\n\t * residing in collections created by the {@link #createCollection}.\n\t *\n\t * Destruction disables all event listeners:\n\t * * created on the view, e.g. `view.on( 'event', () => {} )`,\n\t * * defined in the {@link #template} for DOM events.\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\n\t\tthis._viewCollections.map( c => c.destroy() );\n\n\t\t// Template isn't obligatory for views.\n\t\tif ( this.template && ( this.template as any )._revertData ) {\n\t\t\tthis.template.revert( this.element! );\n\t\t}\n\t}\n}\n\n/**\n * Event fired by the {@link module:ui/view~View#render} method. Actual rendering is executed as a listener to\n * this event with the default priority.\n *\n * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.\n *\n * @eventName ~View#render\n */\nexport type UIViewRenderEvent = DecoratedMethodEvent<View, 'render'>;\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/**\n * @module ui/arialiveannouncer\n */\n\nimport type { ViewDomConverter } from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport { type ViewCollection } from './viewcollection.js';\nimport { View } from './view.js';\n\n/**\n * The politeness level of an `aria-live` announcement.\n *\n * Available keys are:\n * * `AriaLiveAnnouncerPoliteness.POLITE`,\n * * `AriaLiveAnnouncerPoliteness.ASSERTIVE`\n *\n * [Learn more](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Politeness_levels).\n */\nexport const AriaLiveAnnouncerPoliteness = {\n\tPOLITE: 'polite',\n\tASSERTIVE: 'assertive'\n} as const;\n\n/**\n * An accessibility helper that manages all ARIA live regions associated with an editor instance. ARIA live regions announce changes\n * to the state of the editor features.\n *\n * These announcements are consumed and propagated by screen readers and give users a better understanding of the current\n * state of the editor.\n *\n * To announce a state change to an editor use the {@link #announce} method:\n *\n * ```ts\n * editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );\n * ```\n */\nexport class AriaLiveAnnouncer {\n\t/**\n\t * The editor instance.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * The view that aggregates all `aria-live` regions.\n\t */\n\tpublic view?: AriaLiveAnnouncerView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tthis.editor = editor;\n\n\t\t/**\n\t\t * Some screen readers only look at changes in the aria-live region.\n\t\t * They might not read a region that already has content when it is added.\n\t\t * To stop this problem, make sure to set up regions for all politeness settings when the editor starts.\n\t\t */\n\t\teditor.once( 'ready', () => {\n\t\t\tfor ( const politeness of Object.values( AriaLiveAnnouncerPoliteness ) ) {\n\t\t\t\tthis.announce( '', politeness );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets an announcement text to an aria region that is then announced by a screen reader to the user.\n\t *\n\t * If the aria region of a specified politeness does not exist, it will be created and can be re-used later.\n\t *\n\t * The default announcement politeness level is `'polite'`.\n\t *\n\t * ```ts\n\t * // Most screen readers will queue announcements from multiple aria-live regions and read them out in the order they were emitted.\n \t * editor.ui.ariaLiveAnnouncer.announce( 'Image uploaded.' );\n \t * editor.ui.ariaLiveAnnouncer.announce( 'Connection lost. Reconnecting.' );\n \t * ```\n\t */\n\tpublic announce(\n\t\tannouncement: string,\n\t\tattributes: AriaLiveAnnouncerPolitenessValue | AriaLiveAnnounceConfig = AriaLiveAnnouncerPoliteness.POLITE\n\t): void {\n\t\tconst editor = this.editor;\n\n\t\tif ( !editor.ui.view ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this.view ) {\n\t\t\tthis.view = new AriaLiveAnnouncerView( editor.locale );\n\t\t\teditor.ui.view.body.add( this.view );\n\t\t}\n\n\t\tconst { politeness, isUnsafeHTML }: AriaLiveAnnounceConfig = typeof attributes === 'string' ? {\n\t\t\tpoliteness: attributes\n\t\t} : attributes;\n\n\t\tlet politenessRegionView = this.view.regionViews.find( view => view.politeness === politeness );\n\n\t\tif ( !politenessRegionView ) {\n\t\t\tpolitenessRegionView = new AriaLiveAnnouncerRegionView( editor, politeness );\n\t\t\tthis.view.regionViews.add( politenessRegionView );\n\t\t}\n\n\t\tpolitenessRegionView.announce( {\n\t\t\tannouncement,\n\t\t\tisUnsafeHTML\n\t\t} );\n\t}\n}\n\n/**\n * The view that aggregates all `aria-live` regions.\n */\nexport class AriaLiveAnnouncerView extends View {\n\t/**\n\t * A collection of all views that represent individual `aria-live` regions.\n\t */\n\tpublic readonly regionViews: ViewCollection<AriaLiveAnnouncerRegionView>;\n\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.regionViews = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-aria-live-announcer'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.regionViews\n\t\t} );\n\t}\n}\n\n/**\n * The view that represents a single `aria-live`.\n */\nexport class AriaLiveAnnouncerRegionView extends View {\n\t/**\n\t * Current politeness level of the region.\n\t */\n\tpublic readonly politeness: AriaLiveAnnouncerPolitenessValue;\n\n\t/**\n\t * DOM converter used to sanitize unsafe HTML passed to {@link #announce} method.\n\t */\n\tprivate _domConverter: ViewDomConverter;\n\n\t/**\n\t * Interval used to remove additions. It prevents accumulation of added nodes in region.\n\t */\n\tprivate _pruneAnnouncementsInterval: ReturnType<typeof setInterval> | null;\n\n\tconstructor( editor: Editor, politeness: AriaLiveAnnouncerPolitenessValue ) {\n\t\tsuper( editor.locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\t'aria-live': politeness,\n\t\t\t\t'aria-relevant': 'additions'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'ul',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-aria-live-region-list'\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\teditor.on( 'destroy', () => {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( this._pruneAnnouncementsInterval !== null ) {\n\t\t\t\tclearInterval( this._pruneAnnouncementsInterval! );\n\t\t\t\tthis._pruneAnnouncementsInterval = null;\n\t\t\t}\n\t\t} );\n\n\t\tthis.politeness = politeness;\n\t\tthis._domConverter = editor.data.htmlProcessor.domConverter;\n\t\tthis._pruneAnnouncementsInterval = setInterval( () => {\n\t\t\tif ( this.element && this._listElement!.firstChild ) {\n\t\t\t\tthis._listElement!.firstChild!.remove();\n\t\t\t}\n\t\t}, 5000 );\n\t}\n\n\t/**\n\t * Appends new announcement to region.\n\t */\n\tpublic announce( { announcement, isUnsafeHTML }: AriaLiveAppendContentAttributes ): void {\n\t\tif ( !announcement.trim().length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst messageListItem = document.createElement( 'li' );\n\n\t\tif ( isUnsafeHTML ) {\n\t\t\tthis._domConverter.setContentOf( messageListItem, announcement );\n\t\t} else {\n\t\t\tmessageListItem.innerText = announcement;\n\t\t}\n\n\t\tthis._listElement!.appendChild( messageListItem );\n\t}\n\n\t/**\n\t * Return current announcements list HTML element.\n\t */\n\tprivate get _listElement(): HTMLElement | null {\n\t\treturn this.element!.querySelector( 'ul' )!;\n\t}\n}\n\nexport type AriaLiveAnnouncerPolitenessValue = typeof AriaLiveAnnouncerPoliteness[ keyof typeof AriaLiveAnnouncerPoliteness ];\n\nexport type AriaLiveAppendContentAttributes = {\n\tannouncement: string;\n\tisUnsafeHTML?: boolean;\n};\n\nexport type AriaLiveAnnounceConfig = {\n\tpoliteness: AriaLiveAnnouncerPolitenessValue;\n\tisUnsafeHTML?: boolean;\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/**\n * @module ui/bindings/clickoutsidehandler\n */\n\nimport type { CallbackOptions, DomEmitter } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Handles clicking **outside** of a specified set of elements, then fires an action.\n *\n * **Note**: Actually, the action is executed upon `mousedown`, not `click`. It prevents\n * certain issues when the user keeps holding the mouse button and the UI cannot react\n * properly.\n *\n * @param options Configuration options.\n * @param options.emitter The emitter to which this behavior should be added.\n * @param options.activator Function returning a `Boolean`, to determine whether the handler is active.\n * @param options.contextElements Array of HTML elements or a callback returning an array of HTML elements\n * that determine the scope of the handler. Clicking any of them or their descendants will **not** fire the callback.\n * @param options.callback An action executed by the handler.\n * @param options.listenerOptions Additional options for the listener (like priority).\n */\nexport function clickOutsideHandler(\n\t{ emitter, activator, callback, contextElements, listenerOptions }: {\n\t\temitter: DomEmitter;\n\t\tactivator: () => boolean;\n\t\tcontextElements: Array<Element> | ( () => Array<Element> );\n\t\tcallback: () => void;\n\t\tlistenerOptions?: CallbackOptions;\n\t}\n): void {\n\temitter.listenTo( document, 'mousedown', ( evt, domEvt ) => {\n\t\tif ( !activator() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if `composedPath` is `undefined` in case the browser does not support native shadow DOM.\n\t\t// Can be removed when all supported browsers support native shadow DOM.\n\t\tconst path = typeof domEvt.composedPath == 'function' ? domEvt.composedPath() : [];\n\n\t\tconst contextElementsList = typeof contextElements == 'function' ? contextElements() : contextElements;\n\n\t\tfor ( const contextElement of contextElementsList ) {\n\t\t\tif ( contextElement.contains( domEvt.target as Node ) || path.includes( contextElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tcallback();\n\t}, listenerOptions );\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/**\n * @module ui/bindings/csstransitiondisablermixin\n */\n\nimport type { Constructor, Mixed } from '@ckeditor/ckeditor5-utils';\n\nimport { type View } from '../view.js';\n\n/**\n * Constructor returned by {@link ~CssTransitionDisablerMixin}. Use it to name a mixin base class before extending it.\n *\n * ```ts\n * const MyCssTransitionDisablerBase: CssTransitionDisablerMixinConstructor<typeof BaseClass> =\n * \tCssTransitionDisablerMixin( BaseClass );\n *\n * class MyCssTransitionDisabler extends MyCssTransitionDisablerBase {}\n * ```\n */\nexport type CssTransitionDisablerMixinConstructor<Base extends Constructor<View>> = Mixed<Base, ViewWithCssTransitionDisabler>;\n\n/**\n * A mixin that brings the possibility to temporarily disable CSS transitions using\n * {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen\n * when the view is first displayed but they should work normal in other cases.\n *\n * The methods to control the CSS transitions are:\n * * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the\n * {@link module:ui/view~View#element view element}.\n * * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the\n * {@link module:ui/view~View#element view element}.\n *\n * The usage comes down to:\n *\n * ```ts\n * const MyViewWithCssTransitionDisabler = CssTransitionDisablerMixin( MyView );\n * const view = new MyViewWithCssTransitionDisabler();\n *\n * // ...\n *\n * view.disableCssTransitions();\n * view.show();\n * view.enableCssTransitions();\n * ```\n *\n * @param view View instance that should get this functionality.\n */\nexport function CssTransitionDisablerMixin<Base extends Constructor<View>>( view: Base ): CssTransitionDisablerMixinConstructor<Base>\n{\n\tabstract class Mixin extends view {\n\t\tdeclare public _isCssTransitionsDisabled: boolean;\n\n\t\tpublic disableCssTransitions() {\n\t\t\tthis._isCssTransitionsDisabled = true;\n\t\t}\n\n\t\tpublic enableCssTransitions() {\n\t\t\tthis._isCssTransitionsDisabled = false;\n\t\t}\n\n\t\tconstructor( ...args: Array<any> ) {\n\t\t\tsuper( ...args );\n\n\t\t\tthis.set( '_isCssTransitionsDisabled', false );\n\t\t\tthis.initializeCssTransitionDisablerMixin();\n\t\t}\n\n\t\tprotected initializeCssTransitionDisablerMixin(): void {\n\t\t\tif ( this.template ) {\n\t\t\t\tthis.extendTemplate( {\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\tthis.bindTemplate.if( '_isCssTransitionsDisabled', 'ck-transitions-disabled' )\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn Mixin as any;\n}\n\nexport declare class ViewWithCssTransitionDisabler extends View {\n\tpublic disableCssTransitions(): void;\n\tpublic enableCssTransitions(): void;\n\n\tprotected initializeCssTransitionDisablerMixin(): void;\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/**\n * @module ui/bindings/draggableviewmixin\n */\n\nimport { type View } from '../view.js';\nimport { global, type Constructor, type Mixed, type EventInfo } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Constructor returned by {@link ~DraggableViewMixin}. Use it to name a mixin base class before extending it.\n *\n * ```ts\n * const MyDraggableViewBase: DraggableViewMixinConstructor<typeof BaseClass> = DraggableViewMixin( BaseClass );\n *\n * class MyDraggableView extends MyDraggableViewBase {}\n * ```\n */\nexport type DraggableViewMixinConstructor<Base extends Constructor<View>> = Mixed<Base, DraggableView>;\n\n/**\n * A mixin that brings the possibility to observe dragging of the view element.\n * The view has to implement the {@link ~DraggableView} interface to use it:\n *\n * ```js\n * export class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {\n * \t\t// ...\n * }\n * ```\n *\n * Creating a class extending it attaches a set of mouse and touch listeners allowing to observe dragging of the view element:\n * * `mousedown` and `touchstart` on the view element - starting the dragging.\n * * `mousemove` and `touchmove` on the document - updating the view coordinates.\n * * `mouseup` and `touchend` on the document - stopping the dragging.\n *\n * The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -\n * it is up to the developer to implement it.\n */\nexport function DraggableViewMixin<Base extends Constructor<View>>( view: Base ): DraggableViewMixinConstructor<Base> {\n\tabstract class DraggableMixin extends view implements DraggableView {\n\t\t/**\n\t\t * A flag indicating whether the view is currently being dragged.\n\t\t *\n\t\t * @observable\n\t\t */\n\t\tdeclare public isDragging: boolean;\n\n\t\t/**\n\t\t * A bound version of {@link #_onDrag}.\n\t\t */\n\t\tprivate _onDragBound = this._onDrag.bind( this );\n\n\t\t/**\n\t\t * A bound version of {@link #_onDragEnd}.\n\t\t */\n\t\tprivate _onDragEndBound = this._onDragEnd.bind( this );\n\n\t\t/**\n\t\t * The last coordinates of the view. It is updated on every mouse move.\n\t\t */\n\t\tprivate _lastDraggingCoordinates: { x: number; y: number } = { x: 0, y: 0 };\n\n\t\t/**\n\t\t * @inheritDoc\n\t\t */\n\t\tconstructor( ...args: Array<any> ) {\n\t\t\tsuper( ...args );\n\n\t\t\tthis.on( 'render', () => {\n\t\t\t\tthis._attachListeners();\n\t\t\t} );\n\n\t\t\tthis.set( 'isDragging', false );\n\t\t}\n\n\t\t/**\n\t\t * Attaches the listeners for the drag start.\n\t\t */\n\t\tprivate _attachListeners() {\n\t\t\tthis.listenTo( this.element!, 'mousedown', this._onDragStart.bind( this ) );\n\t\t\tthis.listenTo( this.element!, 'touchstart', this._onDragStart.bind( this ) );\n\t\t}\n\n\t\t/**\n\t\t * Attaches the listeners for the dragging and drag end.\n\t\t */\n\t\tprivate _attachDragListeners() {\n\t\t\tthis.listenTo( global.document, 'mouseup', this._onDragEndBound );\n\t\t\tthis.listenTo( global.document, 'touchend', this._onDragEndBound );\n\t\t\tthis.listenTo( global.document, 'mousemove', this._onDragBound );\n\t\t\tthis.listenTo( global.document, 'touchmove', this._onDragBound );\n\t\t}\n\n\t\t/**\n\t\t * Detaches the listeners after the drag end.\n\t\t */\n\t\tprivate _detachDragListeners() {\n\t\t\tthis.stopListening( global.document, 'mouseup', this._onDragEndBound );\n\t\t\tthis.stopListening( global.document, 'touchend', this._onDragEndBound );\n\t\t\tthis.stopListening( global.document, 'mousemove', this._onDragBound );\n\t\t\tthis.stopListening( global.document, 'touchmove', this._onDragBound );\n\t\t}\n\n\t\t/**\n\t\t * Starts the dragging listeners and sets the initial view coordinates.\n\t\t */\n\t\tprivate _onDragStart( evt: EventInfo, domEvt: MouseEvent | TouchEvent ) {\n\t\t\tif ( !this._isHandleElementPressed( domEvt ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._attachDragListeners();\n\n\t\t\tlet x;\n\t\t\tlet y;\n\n\t\t\t// If dragging is performed with a mouse, there is only one set of coordinates available.\n\t\t\t// But when using a touch device, there may be many of them, so use the coordinates from the first touch.\n\t\t\tif ( domEvt instanceof MouseEvent ) {\n\t\t\t\tx = domEvt.clientX;\n\t\t\t\ty = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tx = domEvt.touches[ 0 ].clientX;\n\t\t\t\ty = domEvt.touches[ 0 ].clientY;\n\t\t\t}\n\n\t\t\tthis._lastDraggingCoordinates = { x, y };\n\n\t\t\tthis.isDragging = true;\n\t\t}\n\n\t\t/**\n\t\t * Updates the view coordinates and fires the `drag` event.\n\t\t */\n\t\tprivate _onDrag( evt: EventInfo, domEvt: MouseEvent | TouchEvent ) {\n\t\t\t// If dragging was stopped by some external intervention, stop listening.\n\t\t\tif ( !this.isDragging ) {\n\t\t\t\tthis._detachDragListeners();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newX;\n\t\t\tlet newY;\n\n\t\t\t// If dragging is performed with a mouse, there is only one set of coordinates available.\n\t\t\t// But when using a touch device, there may be many of them, so use the coordinates from the first touch.\n\t\t\tif ( domEvt instanceof MouseEvent ) {\n\t\t\t\tnewX = domEvt.clientX;\n\t\t\t\tnewY = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tnewX = domEvt.touches[ 0 ].clientX;\n\t\t\t\tnewY = domEvt.touches[ 0 ].clientY;\n\t\t\t}\n\n\t\t\t// Prevents selection of text while dragging on Safari.\n\t\t\tdomEvt.preventDefault();\n\n\t\t\tthis.fire<DraggableViewDragEvent>( 'drag', {\n\t\t\t\tdeltaX: Math.round( newX - this._lastDraggingCoordinates.x ),\n\t\t\t\tdeltaY: Math.round( newY - this._lastDraggingCoordinates.y )\n\t\t\t} );\n\n\t\t\tthis._lastDraggingCoordinates = { x: newX, y: newY };\n\t\t}\n\n\t\t/**\n\t\t * Stops the dragging and detaches the listeners.\n\t\t */\n\t\tprivate _onDragEnd() {\n\t\t\tthis._detachDragListeners();\n\n\t\t\tthis.isDragging = false;\n\t\t}\n\n\t\t/**\n\t\t * Checks if the drag handle element was pressed.\n\t\t */\n\t\tprivate _isHandleElementPressed( domEvt: MouseEvent | TouchEvent ) {\n\t\t\tif ( !this.dragHandleElement ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn this.dragHandleElement === domEvt.target ||\n\t\t\t\t( domEvt.target instanceof HTMLElement && this.dragHandleElement.contains( domEvt.target ) );\n\t\t}\n\n\t\tpublic abstract get dragHandleElement(): HTMLElement | null;\n\t}\n\n\treturn DraggableMixin as any;\n}\n\n/**\n * An interface that should be implemented by views that want to be draggable.\n */\nexport interface DraggableView extends View {\n\tget dragHandleElement(): HTMLElement | null;\n}\n\n/**\n * An event data object for the {@link ~DraggableView} `drag` event. Fired when the view is dragged.\n */\nexport type DraggableViewDragEvent = {\n\tname: 'drag';\n\targs: [ {\n\t\tdeltaX: number;\n\t\tdeltaY: number;\n\t} ];\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/**\n * @module ui/bindings/submithandler\n */\n\nimport { type View } from '../view.js';\n\n/**\n * A handler useful for {@link module:ui/view~View views} working as HTML forms. It intercepts a native DOM\n * `submit` event, prevents the default web browser behavior (navigation and page reload) and\n * fires the `submit` event on a view instead. Such a custom event can be then used by any\n * {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.\n *\n * ```ts\n * import { submitHandler } from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';\n *\n * // ...\n *\n * class AnyFormView extends View {\n * \tconstructor() {\n * \t\tsuper();\n *\n * \t\t// ...\n *\n * \t\tsubmitHandler( {\n * \t\t\tview: this\n * \t\t} );\n * \t}\n * }\n *\n * // ...\n *\n * const view = new AnyFormView();\n *\n * // A sample listener attached by an emitter working with the view.\n * this.listenTo( view, 'submit', () => {\n * \tsaveTheFormData();\n * \thideTheForm();\n * } );\n * ```\n *\n * @param options Configuration options.\n * @param options.view The view which DOM `submit` events should be handled.\n */\nexport function submitHandler( { view }: { view: View } ): void {\n\tview.listenTo( view.element!, 'submit', ( evt, domEvt ) => {\n\t\tdomEvt.preventDefault();\n\t\tview.fire<SubmitHandlerEvent>( 'submit' );\n\t}, { useCapture: true } );\n}\n\n/**\n * Fired by {@link module:ui/bindings/submithandler~submitHandler} helper.\n *\n * @eventName module:ui/view~View#submit\n */\nexport type SubmitHandlerEvent = {\n\tname: 'submit';\n\targs: [];\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/**\n * @module ui/bindings/addkeyboardhandlingforgrid\n */\n\nimport type { FocusTracker, KeystrokeHandler } from '@ckeditor/ckeditor5-utils';\nimport type { FocusableView } from '../focuscycler.js';\nimport { type ViewCollection } from '../viewcollection.js';\n\n/**\n * A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.\n *\n * @param options Configuration options.\n * @param options.keystrokeHandler Keystroke handler to register navigation with arrow keys.\n * @param options.focusTracker A focus tracker for grid elements.\n * @param options.gridItems A collection of grid items.\n * @param options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns\n * the number (e.g. for responsive grids).\n * @param options.uiLanguageDirection String of ui language direction.\n */\nexport function addKeyboardHandlingForGrid(\n\t{ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }: {\n\t\tkeystrokeHandler: KeystrokeHandler;\n\t\tfocusTracker: FocusTracker;\n\t\tgridItems: ViewCollection;\n\t\tnumberOfColumns: number | ( () => number );\n\t\tuiLanguageDirection?: string;\n\t}\n): void {\n\tconst getNumberOfColumns = typeof numberOfColumns === 'number' ? () => numberOfColumns : numberOfColumns;\n\n\tkeystrokeHandler.set( 'arrowright', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {\n\t\treturn uiLanguageDirection === 'rtl' ?\n\t\t\tgetLeftElementIndex( focusedElementIndex, gridItems.length ) :\n\t\t\tgetRightElementIndex( focusedElementIndex, gridItems.length );\n\t} ) );\n\n\tkeystrokeHandler.set( 'arrowleft', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {\n\t\treturn uiLanguageDirection === 'rtl' ?\n\t\t\tgetRightElementIndex( focusedElementIndex, gridItems.length ) :\n\t\t\tgetLeftElementIndex( focusedElementIndex, gridItems.length );\n\t} ) );\n\n\tkeystrokeHandler.set( 'arrowup', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {\n\t\tlet nextIndex = focusedElementIndex - getNumberOfColumns();\n\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = focusedElementIndex + getNumberOfColumns() * Math.floor( gridItems.length / getNumberOfColumns() );\n\n\t\t\tif ( nextIndex > gridItems.length - 1 ) {\n\t\t\t\tnextIndex -= getNumberOfColumns();\n\t\t\t}\n\t\t}\n\n\t\treturn nextIndex;\n\t} ) );\n\n\tkeystrokeHandler.set( 'arrowdown', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {\n\t\tlet nextIndex = focusedElementIndex + getNumberOfColumns();\n\n\t\tif ( nextIndex > gridItems.length - 1 ) {\n\t\t\tnextIndex = focusedElementIndex % getNumberOfColumns();\n\t\t}\n\n\t\treturn nextIndex;\n\t} ) );\n\n\tfunction getGridItemFocuser( getIndexToFocus: ( focusedElementIndex: number, gridItems: ViewCollection ) => number ) {\n\t\treturn ( evt: KeyboardEvent ) => {\n\t\t\tconst focusedElement = gridItems.find( item => item.element === focusTracker.focusedElement );\n\t\t\tconst focusedElementIndex = gridItems.getIndex( focusedElement! );\n\t\t\tconst nextIndexToFocus = getIndexToFocus( focusedElementIndex, gridItems );\n\n\t\t\t( gridItems.get( nextIndexToFocus ) as FocusableView ).focus();\n\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t};\n\t}\n\n\t/**\n\t * Function returning the next index.\n\t *\n\t * ```\n\t * before: [ ][x][ ]\tafter: [ ][ ][x]\n\t * index = 1            index = 2\n\t * ```\n\t *\n\t * If current index is last, function returns first index.\n\t *\n\t * ```\n\t * before: [ ][ ][x]\tafter: [x][ ][ ]\n\t * index = 2            index = 0\n\t * ```\n\t *\n\t * @param elementIndex Number of current index.\n\t * @param collectionLength A count of collection items.\n\t */\n\tfunction getRightElementIndex( elementIndex: number, collectionLength: number ) {\n\t\tif ( elementIndex === collectionLength - 1 ) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn elementIndex + 1;\n\t\t}\n\t}\n\n\t/**\n\t * Function returning the previous index.\n\t *\n\t * ```\n\t * before: [ ][x][ ]\tafter: [x][ ][ ]\n\t * index = 1            index = 0\n\t * ```\n\t *\n\t * If current index is first, function returns last index.\n\t *\n\t * ```\n\t * before: [x][ ][ ]\tafter: [ ][ ][x]\n\t * index = 0            index = 2\n\t * ```\n\t *\n\t * @param elementIndex Number of current index.\n\t * @param collectionLength A count of collection items.\n\t */\n\tfunction getLeftElementIndex( elementIndex: number, collectionLength: number ) {\n\t\tif ( elementIndex === 0 ) {\n\t\t\treturn collectionLength - 1;\n\t\t} else {\n\t\t\treturn elementIndex - 1;\n\t\t}\n\t}\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/**\n * @module ui/label/labelview\n */\n\nimport { View } from '../view.js';\n\nimport { uid, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The label view class.\n */\nexport class LabelView extends View {\n\t/**\n\t * An unique id of the label. It can be used by other UI components to reference\n\t * the label, for instance, using the `aria-describedby` DOM attribute.\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * The text of the label.\n\t *\n\t * @observable\n\t */\n\tdeclare public text: string | undefined;\n\n\t/**\n\t * The `for` attribute of the label (i.e. to pair with an `<input>` element).\n\t *\n\t * @observable\n\t */\n\tdeclare public for: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( 'text', undefined );\n\t\tthis.set( 'for', undefined );\n\n\t\tthis.id = `ck-editor__label_${ uid() }`;\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'label',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-label'\n\t\t\t\t],\n\t\t\t\tid: this.id,\n\t\t\t\tfor: bind.to( 'for' )\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: bind.to( 'text' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module ui/editorui/accessibilityhelp/accessibilityhelpcontentview\n */\n\nimport {\n\tcreateElement,\n\tenv,\n\tgetEnvKeystrokeText,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\n\nimport { View } from '../../view.js';\nimport { LabelView } from '../../label/labelview.js';\nimport type {\n\tKeystrokeInfoCategoryDefinition,\n\tKeystrokeInfoDefinition,\n\tKeystrokeInfoDefinitions,\n\tKeystrokeInfoGroupDefinition\n} from '@ckeditor/ckeditor5-core';\n\n/**\n * The view displaying keystrokes in the Accessibility help dialog.\n */\nexport class AccessibilityHelpContentView extends View<HTMLDivElement> {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, keystrokes: KeystrokeInfoDefinitions ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\t\tconst helpLabel = new LabelView();\n\n\t\thelpLabel.text = t( 'Help Contents. To close this dialog press ESC.' );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-accessibility-help-dialog__content' ],\n\t\t\t\t'aria-labelledby': helpLabel.id,\n\t\t\t\trole: 'document',\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tcreateElement( document, 'p', {}, t( 'Below, you can find a list of keyboard shortcuts that can be used in the editor.' ) ),\n\t\t\t\t...this._createCategories( Array.from( keystrokes.values() ) ),\n\t\t\t\thelpLabel\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus(): void {\n\t\tthis.element!.focus();\n\t}\n\n\t/**\n\t * Creates `<section><h3>Category label</h3>...</section>` elements for each category of keystrokes.\n\t */\n\tprivate _createCategories( categories: Array<KeystrokeInfoCategoryDefinition> ): Array<HTMLElement> {\n\t\treturn categories.map( categoryDefinition => {\n\t\t\tconst elements: Array<HTMLElement> = [\n\t\t\t\t// Category header.\n\t\t\t\tcreateElement( document, 'h3', {}, categoryDefinition.label ),\n\n\t\t\t\t// Category definitions (<dl>) and their optional headers (<h4>).\n\t\t\t\t...Array.from( categoryDefinition.groups.values() )\n\t\t\t\t\t.map( groupDefinition => this._createGroup( groupDefinition ) )\n\t\t\t\t\t.flat()\n\t\t\t];\n\n\t\t\t// Category description (<p>).\n\t\t\tif ( categoryDefinition.description ) {\n\t\t\t\telements.splice( 1, 0, createElement( document, 'p', {}, categoryDefinition.description ) );\n\t\t\t}\n\n\t\t\treturn createElement( document, 'section', {}, elements );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates `[<h4>Optional label</h4>]<dl>...</dl>` elements for each group of keystrokes in a category.\n\t */\n\tprivate _createGroup( groupDefinition: KeystrokeInfoGroupDefinition ): Array<HTMLElement> {\n\t\tconst definitionAndDescriptionElements = groupDefinition.keystrokes\n\t\t\t.sort( ( a, b ) => a.label.localeCompare( b.label ) )\n\t\t\t.map( keystrokeDefinition => this._createGroupRow( keystrokeDefinition ) )\n\t\t\t.flat();\n\n\t\tconst elements: Array<HTMLElement> = [\n\t\t\tcreateElement( document, 'dl', {}, definitionAndDescriptionElements )\n\t\t];\n\n\t\tif ( groupDefinition.label ) {\n\t\t\telements.unshift( createElement( document, 'h4', {}, groupDefinition.label ) );\n\t\t}\n\n\t\treturn elements;\n\t}\n\n\t/**\n\t * Creates `<dt>Keystroke label</dt><dd>Keystroke definition</dd>` elements for each keystroke in a group.\n\t */\n\tprivate _createGroupRow( keystrokeDefinition: KeystrokeInfoDefinition ): [ HTMLElement, HTMLElement ] {\n\t\tconst t = this.locale!.t;\n\t\tconst dt = createElement( document, 'dt' );\n\t\tconst dd = createElement( document, 'dd' );\n\t\tconst normalizedKeystrokeDefinition = normalizeKeystrokeDefinition( keystrokeDefinition.keystroke );\n\t\tconst keystrokeAlternativeHTMLs = [];\n\n\t\tfor ( const keystrokeAlternative of normalizedKeystrokeDefinition ) {\n\t\t\tkeystrokeAlternativeHTMLs.push( keystrokeAlternative.map( keystrokeToEnvKbd ).join( '' ) );\n\t\t}\n\n\t\tdt.innerHTML = keystrokeDefinition.label;\n\t\tdd.innerHTML = keystrokeAlternativeHTMLs.join( ', ' ) +\n\t\t\t( keystrokeDefinition.mayRequireFn && env.isMac ? ` ${ t( '(may require <kbd>Fn</kbd>)' ) }` : '' );\n\n\t\treturn [ dt, dd ];\n\t}\n}\n\nfunction keystrokeToEnvKbd( keystroke: string ): string {\n\treturn getEnvKeystrokeText( keystroke )\n\t\t.split( '+' )\n\t\t.map( part => `<kbd>${ part }</kbd>` )\n\t\t.join( '+' );\n}\n\nfunction normalizeKeystrokeDefinition( definition: KeystrokeInfoDefinition[ 'keystroke' ] ): Array<Array<string>> {\n\tif ( typeof definition === 'string' ) {\n\t\treturn [ [ definition ] ];\n\t}\n\n\tif ( typeof definition[ 0 ] === 'string' ) {\n\t\treturn [ definition as Array<string> ];\n\t}\n\n\treturn definition as Array<Array<string>>;\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/**\n * @module ui/icon/iconview\n */\n\nimport { View } from '../view.js';\n\nimport { CKEditorError, type ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The icon view class.\n */\nexport class IconView extends View {\n\t/**\n\t * The SVG source of the icon.\n\t *\n\t * The user must provide the entire XML string, not just the path. See the\n\t * {@glink framework/architecture/ui-library#setting-label-icon-and-tooltip UI library} guide for details.\n\t *\n\t * @observable\n\t */\n\tdeclare public content: string | undefined;\n\n\t/**\n\t * This attribute specifies the boundaries to which the\n\t * icon content should stretch.\n\t *\n\t * @observable\n\t * @default '0 0 20 20'\n\t */\n\tdeclare public viewBox: string;\n\n\t/**\n\t * The fill color of the child `path.ck-icon__fill`.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public fillColor: string;\n\n\t/**\n\t * When set true (default), all parts of the icon inherit the fill color from the CSS `color` property of the\n\t * icon's DOM parent.\n\t *\n\t * This effectively makes the icon monochromatic and allows it to change its fill color dynamically, for instance,\n\t * when a {@link module:ui/button/buttonview~ButtonView} displays an icon and it switches between different states\n\t * (pushed, hovered, etc.) the icon will follow along.\n\t *\n\t * **Note**: For the monochromatic icon to render properly, it must be made up of shapes that can be filled\n\t * with color instead of, for instance, paths with strokes. Be sure to use the *outline stroke* tool\n\t * (the name could be different in your vector graphics editor) before exporting your icon. Also, remove any\n\t * excess `fill=\"...\"` attributes that could break the color inheritance.\n\t *\n\t * **Note**: If you want to preserve the original look of your icon and disable dynamic color inheritance,\n\t * set this flag to `false`.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isColorInherited: boolean;\n\n\t/**\n\t * Controls whether the icon is visible.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * A list of presentational attributes that can be set on the `<svg>` element and should be preserved\n\t * when the icon {@link module:ui/icon/iconview~IconView#content content} is loaded.\n\t *\n\t * See the [specification](https://www.w3.org/TR/SVG/styling.html#TermPresentationAttribute) to learn more.\n\t */\n\tprivate static presentationalAttributeNames: Array<string> = [\n\t\t'alignment-baseline', 'baseline-shift', 'clip-path', 'clip-rule', 'color', 'color-interpolation',\n\t\t'color-interpolation-filters', 'color-rendering', 'cursor', 'direction', 'display', 'dominant-baseline', 'fill', 'fill-opacity',\n\t\t'fill-rule', 'filter', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style',\n\t\t'font-variant', 'font-weight', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start',\n\t\t'mask', 'opacity', 'overflow', 'paint-order', 'pointer-events', 'shape-rendering', 'stop-color', 'stop-opacity', 'stroke',\n\t\t'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width',\n\t\t'text-anchor', 'text-decoration', 'text-overflow', 'text-rendering', 'transform', 'unicode-bidi', 'vector-effect',\n\t\t'visibility', 'white-space', 'word-spacing', 'writing-mode'\n\t];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'content', '' );\n\t\tthis.set( 'viewBox', '0 0 20 20' );\n\t\tthis.set( 'fillColor', '' );\n\t\tthis.set( 'isColorInherited', true );\n\t\tthis.set( 'isVisible', true );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'svg',\n\t\t\tns: 'http://www.w3.org/2000/svg',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-icon',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value ),\n\n\t\t\t\t\t// Exclude icon internals from the CSS reset to allow rich (non-monochromatic) icons\n\t\t\t\t\t// (https://github.com/ckeditor/ckeditor5/issues/12599).\n\t\t\t\t\t'ck-reset_all-excluded',\n\n\t\t\t\t\t// The class to remove the dynamic color inheritance is toggleable\n\t\t\t\t\t// (https://github.com/ckeditor/ckeditor5/issues/12599).\n\t\t\t\t\tbind.if( 'isColorInherited', 'ck-icon_inherit-color' )\n\t\t\t\t],\n\t\t\t\tviewBox: bind.to( 'viewBox' ),\n\t\t\t\t'aria-hidden': true\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis._updateXMLContent();\n\t\tthis._colorFillPaths();\n\n\t\t// This is a hack for lack of innerHTML binding.\n\t\t// See: https://github.com/ckeditor/ckeditor5-ui/issues/99.\n\t\tthis.on<ObservableChangeEvent>( 'change:content', () => {\n\t\t\tthis._updateXMLContent();\n\t\t\tthis._colorFillPaths();\n\t\t} );\n\n\t\tthis.on<ObservableChangeEvent>( 'change:fillColor', () => {\n\t\t\tthis._colorFillPaths();\n\t\t} );\n\t}\n\n\t/**\n\t * Updates the {@link #element} with the value of {@link #content}.\n\t */\n\tprivate _updateXMLContent() {\n\t\tif ( this.content ) {\n\t\t\tconst parsed = new DOMParser().parseFromString( this.content.trim(), 'image/svg+xml' );\n\t\t\tconst svg = parsed.querySelector( 'svg' );\n\n\t\t\tif ( !svg ) {\n\t\t\t\t/**\n\t\t\t\t * The provided icon content is not a valid SVG.\n\t\t\t\t *\n\t\t\t\t * @error ui-iconview-invalid-svg\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'ui-iconview-invalid-svg', this );\n\t\t\t}\n\n\t\t\tconst viewBox = svg.getAttribute( 'viewBox' );\n\n\t\t\tif ( viewBox ) {\n\t\t\t\tthis.viewBox = viewBox;\n\t\t\t}\n\n\t\t\t// Preserve presentational attributes of the <svg> element from the source.\n\t\t\t// They can affect rendering of the entire icon (https://github.com/ckeditor/ckeditor5/issues/12597).\n\t\t\tfor ( const { name, value } of Array.from( svg.attributes ) ) {\n\t\t\t\tif ( IconView.presentationalAttributeNames.includes( name ) ) {\n\t\t\t\t\tthis.element!.setAttribute( name, value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile ( this.element!.firstChild ) {\n\t\t\t\tthis.element!.removeChild( this.element!.firstChild );\n\t\t\t}\n\n\t\t\twhile ( svg.childNodes.length > 0 ) {\n\t\t\t\tthis.element!.appendChild( svg.childNodes[ 0 ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Fills all child `path.ck-icon__fill` with the `#fillColor`.\n\t */\n\tprivate _colorFillPaths() {\n\t\tif ( this.fillColor ) {\n\t\t\tthis.element!.querySelectorAll( '.ck-icon__fill' ).forEach( path => {\n\t\t\t\t( path as HTMLElement ).style.fill = this.fillColor;\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module ui/button/buttonlabelview\n */\n\nimport { View } from '../view.js';\nimport { type ButtonLabel } from './buttonlabel.js';\n\n/**\n * A default implementation of the button view's label. It comes with a dynamic text support\n * via {@link module:ui/button/buttonlabelview~ButtonLabelView#text} property.\n */\nexport class ButtonLabelView extends View implements ButtonLabel {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public id: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public style: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public text: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.set( {\n\t\t\tstyle: undefined,\n\t\t\ttext: undefined,\n\t\t\tid: undefined\n\t\t} );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'span',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-button__label'\n\t\t\t\t],\n\t\t\t\tstyle: bind.to( 'style' ),\n\t\t\t\tid: bind.to( 'id' )\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: bind.to( 'text' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module ui/button/buttonview\n */\n\nimport { View } from '../view.js';\nimport { IconView } from '../icon/iconview.js';\n\nimport type { TemplateDefinition } from '../template.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport type { Button, ButtonExecuteEvent } from './button.js';\nimport { type ButtonLabel } from './buttonlabel.js';\nimport { ButtonLabelView } from './buttonlabelview.js';\n\nimport {\n\tenv,\n\tgetEnvKeystrokeText,\n\tuid,\n\tdelay,\n\ttype Locale,\n\ttype DelayedFunc\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * The button view class.\n *\n * ```ts\n * const view = new ButtonView();\n *\n * view.set( {\n * \tlabel: 'A button',\n * \tkeystroke: 'Ctrl+B',\n * \ttooltip: true,\n * \twithText: true\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n */\nexport class ButtonView extends View<HTMLButtonElement> implements Button {\n\t/**\n\t * Collection of the child views inside of the button {@link #element}.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * Label of the button view. Its text is configurable using the {@link #label label attribute}.\n\t *\n\t * If not configured otherwise in the `constructor()`, by default the label is an instance\n\t * of {@link module:ui/button/buttonlabelview~ButtonLabelView}.\n\t */\n\tpublic readonly labelView: ButtonLabel;\n\n\t/**\n\t * The icon view of the button. Will be added to {@link #children} when the\n\t * {@link #icon icon attribute} is defined.\n\t */\n\tpublic readonly iconView: IconView;\n\n\t/**\n\t * A view displaying the keystroke of the button next to the {@link #labelView label}.\n\t * Added to {@link #children} when the {@link #withKeystroke `withKeystroke` attribute}\n\t * is defined.\n\t */\n\tpublic readonly keystrokeView: View;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public labelStyle: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public icon: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isOn: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isToggleable: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public keystroke: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public label: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public tabindex: number;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public tooltip: Button[ 'tooltip' ];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public tooltipPosition: Button[ 'tooltipPosition' ];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public type: Button[ 'type' ];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public withText: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public withKeystroke: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public role: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public ariaLabel?: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public ariaLabelledBy: string | undefined;\n\n\t/**\n\t * Aria-pressed attribute of element. It is calculated based on {@link #isToggleable isToggleable} and {@link #role}.\n\t * It's set to true if the button is on and the role is not checkable.\n\t *\n\t * @readonly\n\t * @internal\n\t */\n\tdeclare public _ariaPressed: string | false;\n\n\t/**\n\t * Aria-checked attribute of element. It is calculated based on {@link #isToggleable isToggleable} and {@link #role}.\n\t * It's set to true if the button is on and the role is checkable.\n\t *\n\t * @readonly\n\t * @internal\n\t */\n\tdeclare public _ariaChecked: string | false;\n\n\t/**\n\t * Tooltip of the button bound to the template.\n\t *\n\t * @see #tooltip\n\t * @see module:ui/button/buttonview~ButtonView#_getTooltipString\n\t * @internal\n\t * @observable\n\t */\n\tdeclare public _tooltipString: string;\n\n\t/**\n\t * Delayed focus function for focus handling in Safari.\n\t */\n\tprivate _focusDelayed: DelayedFunc<() => void> | null = null;\n\n\t/**\n\t * Creates an instance of the button view class.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param labelView The instance of the button's label. If not provided, an instance of\n\t * {@link module:ui/button/buttonlabelview~ButtonLabelView} is used.\n\t */\n\tconstructor( locale?: Locale, labelView: ButtonLabel = new ButtonLabelView() ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\t\tconst ariaLabelUid = uid();\n\n\t\t// Implement the Button interface.\n\t\tthis.set( '_ariaPressed', false );\n\t\tthis.set( '_ariaChecked', false );\n\t\tthis.set( 'ariaLabel', undefined );\n\t\tthis.set( 'ariaLabelledBy', `ck-editor__aria-label_${ ariaLabelUid }` );\n\t\tthis.set( 'class', undefined );\n\t\tthis.set( 'labelStyle', undefined );\n\t\tthis.set( 'icon', undefined );\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'isOn', false );\n\t\tthis.set( 'isVisible', true );\n\t\tthis.set( 'isToggleable', false );\n\t\tthis.set( 'keystroke', undefined );\n\t\tthis.set( 'label', undefined );\n\t\tthis.set( 'role', undefined );\n\t\tthis.set( 'tabindex', -1 );\n\t\tthis.set( 'tooltip', false );\n\t\tthis.set( 'tooltipPosition', 's' );\n\t\tthis.set( 'type', 'button' );\n\t\tthis.set( 'withText', false );\n\t\tthis.set( 'withKeystroke', false );\n\n\t\tthis.children = this.createCollection();\n\t\tthis.labelView = this._setupLabelView( labelView );\n\n\t\tthis.iconView = new IconView();\n\t\tthis.iconView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-button__icon'\n\t\t\t}\n\t\t} );\n\t\tthis.iconView.bind( 'content' ).to( this, 'icon' );\n\n\t\tthis.keystrokeView = this._createKeystrokeView();\n\n\t\tthis.bind( '_tooltipString' ).to(\n\t\t\tthis, 'tooltip',\n\t\t\tthis, 'label',\n\t\t\tthis, 'keystroke',\n\t\t\tthis._getTooltipString.bind( this )\n\t\t);\n\n\t\tconst template: TemplateDefinition & { on: object } = {\n\t\t\ttag: 'button',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-button',\n\t\t\t\t\tbind.to( 'class' ),\n\t\t\t\t\tbind.if( 'isEnabled', 'ck-disabled', value => !value ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value ),\n\t\t\t\t\tbind.to( 'isOn', value => value ? 'ck-on' : 'ck-off' ),\n\t\t\t\t\tbind.if( 'withText', 'ck-button_with-text' ),\n\t\t\t\t\tbind.if( 'withKeystroke', 'ck-button_with-keystroke' )\n\t\t\t\t],\n\t\t\t\trole: bind.to( 'role' ),\n\t\t\t\ttype: bind.to( 'type', value => value ? value : 'button' ),\n\t\t\t\ttabindex: bind.to( 'tabindex' ),\n\t\t\t\t'aria-checked': bind.to( '_ariaChecked' ),\n\t\t\t\t'aria-pressed': bind.to( '_ariaPressed' ),\n\t\t\t\t'aria-label': bind.to( 'ariaLabel' ),\n\t\t\t\t'aria-labelledby': bind.to( 'ariaLabelledBy' ),\n\t\t\t\t'aria-disabled': bind.if( 'isEnabled', true, value => !value ),\n\t\t\t\t'data-cke-tooltip-text': bind.to( '_tooltipString' ),\n\t\t\t\t'data-cke-tooltip-position': bind.to( 'tooltipPosition' )\n\t\t\t},\n\n\t\t\tchildren: this.children,\n\n\t\t\ton: {\n\t\t\t\tclick: bind.to( evt => {\n\t\t\t\t\t// We can't make the button disabled using the disabled attribute, because it won't be focusable.\n\t\t\t\t\t// Though, shouldn't this condition be moved to the button controller?\n\t\t\t\t\tif ( this.isEnabled ) {\n\t\t\t\t\t\tthis.fire<ButtonExecuteEvent>( 'execute' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Prevent the default when button is disabled, to block e.g.\n\t\t\t\t\t\t// automatic form submitting. See ckeditor/ckeditor5-link#74.\n\t\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t};\n\n\t\tthis.bind( '_ariaPressed' ).to(\n\t\t\tthis, 'isOn', this, 'isToggleable', this, 'role',\n\t\t\t( isOn, isToggleable, role ) => {\n\t\t\t\tif ( !isToggleable || isCheckableRole( role ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn String( !!isOn );\n\t\t\t}\n\t\t);\n\n\t\tthis.bind( '_ariaChecked' ).to(\n\t\t\tthis, 'isOn', this, 'isToggleable', this, 'role',\n\t\t\t( isOn, isToggleable, role ) => {\n\t\t\t\tif ( !isToggleable || !isCheckableRole( role ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn String( !!isOn );\n\t\t\t}\n\t\t);\n\n\t\t// On Safari we have to force the focus on a button on click as it's the only browser\n\t\t// that doesn't do that automatically. See https://github.com/ckeditor/ckeditor5/issues/12115.\n\t\tif ( env.isSafari ) {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( !this._focusDelayed ) {\n\t\t\t\tthis._focusDelayed = delay( () => this.focus(), 0 );\n\t\t\t}\n\n\t\t\ttemplate.on.mousedown = bind.to( () => {\n\t\t\t\tthis._focusDelayed!();\n\t\t\t} );\n\n\t\t\ttemplate.on.mouseup = bind.to( () => {\n\t\t\t\tthis._focusDelayed!.cancel();\n\t\t\t} );\n\t\t}\n\n\t\tthis.setTemplate( template );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this.icon ) {\n\t\t\tthis.children.add( this.iconView );\n\t\t}\n\n\t\tthis.on( 'change:icon', ( evt, prop, newIcon, oldIcon ) => {\n\t\t\tif ( newIcon && !oldIcon ) {\n\t\t\t\tthis.children.add( this.iconView, 0 );\n\t\t\t} else if ( !newIcon && oldIcon ) {\n\t\t\t\tthis.children.remove( this.iconView );\n\t\t\t}\n\t\t} );\n\n\t\tthis.children.add( this.labelView );\n\n\t\tif ( this.withKeystroke && this.keystroke ) {\n\t\t\tthis.children.add( this.keystrokeView );\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the {@link #element} of the button.\n\t */\n\tpublic focus(): void {\n\t\tthis.element!.focus();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._focusDelayed ) {\n\t\t\tthis._focusDelayed.cancel();\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Binds the label view instance it with button attributes.\n\t */\n\tprivate _setupLabelView( labelView: ButtonLabelView ) {\n\t\tlabelView.bind( 'text', 'style', 'id' ).to( this, 'label', 'labelStyle', 'ariaLabelledBy' );\n\n\t\treturn labelView;\n\t}\n\n\t/**\n\t * Creates a view that displays a keystroke next to a {@link #labelView label }\n\t * and binds it with button attributes.\n\t */\n\tprivate _createKeystrokeView() {\n\t\tconst keystrokeView = new View();\n\n\t\tkeystrokeView.setTemplate( {\n\t\t\ttag: 'span',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-button__keystroke'\n\t\t\t\t]\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: this.bindTemplate.to( 'keystroke', text => getEnvKeystrokeText( text! ) )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\treturn keystrokeView;\n\t}\n\n\t/**\n\t * Gets the text for the tooltip from the combination of\n\t * {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.\n\t *\n\t * @see #tooltip\n\t * @see #_tooltipString\n\t * @param tooltip Button tooltip.\n\t * @param label Button label.\n\t * @param keystroke Button keystroke.\n\t */\n\tprivate _getTooltipString(\n\t\ttooltip: Button[ 'tooltip' ],\n\t\tlabel: string | undefined,\n\t\tkeystroke: string | undefined\n\t): string {\n\t\tif ( tooltip ) {\n\t\t\tif ( typeof tooltip == 'string' ) {\n\t\t\t\treturn tooltip;\n\t\t\t} else {\n\t\t\t\tif ( keystroke ) {\n\t\t\t\t\tkeystroke = getEnvKeystrokeText( keystroke );\n\t\t\t\t}\n\n\t\t\t\tif ( tooltip instanceof Function ) {\n\t\t\t\t\treturn tooltip( label!, keystroke );\n\t\t\t\t} else {\n\t\t\t\t\treturn `${ label }${ keystroke ? ` (${ keystroke })` : '' }`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}\n}\n\n/**\n * Checks if `aria-checkbox` can be used with specified role.\n */\nfunction isCheckableRole( role: string | undefined ) {\n\tswitch ( role ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\tcase 'option':\n\t\tcase 'switch':\n\t\tcase 'menuitemcheckbox':\n\t\tcase 'menuitemradio':\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn false;\n\t}\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/**\n * @module ui/formheader/formheaderview\n */\n\nimport { View } from '../view.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { IconView } from '../icon/iconview.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The class component representing a form header view. It should be used in more advanced forms to\n * describe the main purpose of the form.\n *\n * By default the component contains a bolded label view that has to be set. The label is usually a short (at most 3-word) string.\n * The component can also be extended by any other elements, like: icons, dropdowns, etc.\n *\n * It is used i.a.\n * by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.\n *\n * The latter is an example, where the component has been extended by {@link module:ui/dropdown/dropdownview~DropdownView} view.\n */\nexport class FormHeaderView extends View {\n\t/**\n\t * A collection of header items.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * The label of the header.\n\t *\n\t * @observable\n\t */\n\tpublic declare label: string;\n\n\t/**\n\t * An additional CSS class added to the {@link #element}.\n\t *\n\t * @observable\n\t */\n\tpublic declare class: string | null;\n\n\t/**\n\t * The icon view instance. Defined only if icon was passed in the constructor's options.\n\t */\n\tpublic readonly iconView?: IconView;\n\n\t/**\n\t * Creates an instance of the form header class.\n\t *\n\t * @param locale The locale instance.\n\t * @param options.label A label.\n\t * @param options.class An additional class.\n\t */\n\tconstructor(\n\t\tlocale: Locale | undefined,\n\t\toptions: {\n\t\t\tlabel?: string | null;\n\t\t\tclass?: string | null;\n\t\t\ticon?: string | null;\n\t\t} = {}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'label', options.label || '' );\n\t\tthis.set( 'class', options.class || null );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form__header',\n\t\t\t\t\tbind.to( 'class' )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\n\t\tif ( options.icon ) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = options.icon;\n\n\t\t\tthis.children.add( this.iconView );\n\t\t}\n\n\t\tconst label = new View( locale );\n\n\t\tlabel.setTemplate( {\n\t\t\ttag: 'h2',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form__header__label'\n\t\t\t\t],\n\t\t\t\trole: 'presentation'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{ text: bind.to( 'label' ) }\n\t\t\t]\n\t\t} );\n\n\t\tthis.children.add( label );\n\t}\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/**\n * @module ui/focuscycler\n */\n\nimport {\n\tisVisible,\n\tEmitterMixin,\n\ttype ArrayOrItem,\n\ttype FocusTracker,\n\ttype KeystrokeHandler,\n\ttype KeystrokeHandlerOptions,\n\ttype EmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type View } from './view.js';\nimport { type ViewCollection } from './viewcollection.js';\n\nconst FocusCyclerBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * A utility class that helps cycling over {@link module:ui/focuscycler~FocusableView focusable views} in a\n * {@link module:ui/viewcollection~ViewCollection} when the focus is tracked by the\n * {@link module:utils/focustracker~FocusTracker} instance. It helps implementing keyboard\n * navigation in HTML forms, toolbars, lists and the like.\n *\n * To work properly it requires:\n * * a collection of focusable (HTML `tabindex` attribute) views that implement the `focus()` method,\n * * an associated focus tracker to determine which view is focused.\n *\n * A simple cycler setup can look like this:\n *\n * ```ts\n * const focusables = new ViewCollection<FocusableView>();\n * const focusTracker = new FocusTracker();\n *\n * // Add focusable views to the focus tracker.\n * focusTracker.add( ... );\n * ```\n *\n * Then, the cycler can be used manually:\n *\n * ```ts\n * const cycler = new FocusCycler( { focusables, focusTracker } );\n *\n * // Will focus the first focusable view in #focusables.\n * cycler.focusFirst();\n *\n * // Will log the next focusable item in #focusables.\n * console.log( cycler.next );\n * ```\n *\n * Alternatively, it can work side by side with the {@link module:utils/keystrokehandler~KeystrokeHandler}:\n *\n * ```ts\n * const keystrokeHandler = new KeystrokeHandler();\n *\n * // Activate the keystroke handler.\n * keystrokeHandler.listenTo( sourceOfEvents );\n *\n * const cycler = new FocusCycler( {\n * \tfocusables, focusTracker, keystrokeHandler,\n * \tactions: {\n * \t\t// When arrowup of arrowleft is detected by the #keystrokeHandler,\n * \t\t// focusPrevious() will be called on the cycler.\n * \t\tfocusPrevious: [ 'arrowup', 'arrowleft' ],\n * \t}\n * } );\n * ```\n *\n * Check out the {@glink framework/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\"} guide to learn more.\n */\nexport class FocusCycler extends FocusCyclerBase {\n\t/**\n\t * A {@link module:ui/focuscycler~FocusableView focusable views} collection that the cycler operates on.\n\t */\n\tpublic readonly focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * A focus tracker instance that the cycler uses to determine the current focus\n\t * state in {@link #focusables}.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t * which can respond to certain keystrokes and cycle the focus.\n\t */\n\tpublic readonly keystrokeHandler?: KeystrokeHandler;\n\n\t/**\n\t * Actions that the cycler can take when a keystroke is pressed. Requires\n\t * `options.keystrokeHandler` to be passed and working. When an action is\n\t * performed, `preventDefault` and `stopPropagation` will be called on the event\n\t * the keystroke fired in the DOM.\n\t *\n\t * ```ts\n\t * actions: {\n\t * \t// Will call #focusPrevious() when arrowleft or arrowup is pressed.\n\t * \tfocusPrevious: [ 'arrowleft', 'arrowup' ],\n\t *\n\t * \t// Will call #focusNext() when arrowdown is pressed.\n\t * \tfocusNext: 'arrowdown'\n\t * }\n\t * ```\n\t */\n\tpublic readonly actions?: FocusCyclerActions;\n\n\t/**\n\t * Creates an instance of the focus cycler utility.\n\t *\n\t * @param options Configuration options.\n\t */\n\tconstructor( options: {\n\t\tfocusables: ViewCollection<FocusableView>;\n\t\tfocusTracker: FocusTracker;\n\t\tkeystrokeHandler?: KeystrokeHandler;\n\t\tkeystrokeHandlerOptions?: KeystrokeHandlerOptions;\n\t\tactions?: FocusCyclerActions;\n\t} ) {\n\t\tsuper();\n\n\t\tthis.focusables = options.focusables;\n\t\tthis.focusTracker = options.focusTracker;\n\t\tthis.keystrokeHandler = options.keystrokeHandler;\n\t\tthis.actions = options.actions;\n\n\t\tif ( options.actions && options.keystrokeHandler ) {\n\t\t\tfor ( const methodName in options.actions ) {\n\t\t\t\tlet actions = options.actions[ methodName as keyof FocusCyclerActions ]!;\n\n\t\t\t\tif ( typeof actions == 'string' ) {\n\t\t\t\t\tactions = [ actions ];\n\t\t\t\t}\n\n\t\t\t\tfor ( const keystroke of actions ) {\n\t\t\t\t\toptions.keystrokeHandler.set( keystroke, ( data, cancel ) => {\n\t\t\t\t\t\tthis[ methodName as keyof FocusCyclerActions ]();\n\t\t\t\t\t\tcancel();\n\t\t\t\t\t}, options.keystrokeHandlerOptions );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.on<FocusCyclerForwardCycleEvent>( 'forwardCycle', () => this.focusFirst(), { priority: 'low' } );\n\t\tthis.on<FocusCyclerBackwardCycleEvent>( 'backwardCycle', () => this.focusLast(), { priority: 'low' } );\n\t}\n\n\t/**\n\t * Returns the first focusable view in {@link #focusables}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic get first(): FocusableView | null {\n\t\treturn ( this.focusables.find( isDomFocusable ) || null ) as FocusableView | null;\n\t}\n\n\t/**\n\t * Returns the last focusable view in {@link #focusables}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic get last(): FocusableView | null {\n\t\treturn ( this.focusables.filter( isDomFocusable ).slice( -1 )[ 0 ] || null ) as FocusableView | null;\n\t}\n\n\t/**\n\t * Returns the next focusable view in {@link #focusables} based on {@link #current}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic get next(): FocusableView | null {\n\t\treturn this._getDomFocusableItem( 1 );\n\t}\n\n\t/**\n\t * Returns the previous focusable view in {@link #focusables} based on {@link #current}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic get previous(): FocusableView | null {\n\t\treturn this._getDomFocusableItem( -1 );\n\t}\n\n\t/**\n\t * An index of the view in the {@link #focusables} which is focused according\n\t * to {@link #focusTracker}. Returns `null` when there is no such view.\n\t */\n\tpublic get current(): number | null {\n\t\tlet index: number | null = null;\n\n\t\t// There's no focused view in the focusables.\n\t\tif ( this.focusTracker.focusedElement === null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tthis.focusables.find( ( view, viewIndex ) => {\n\t\t\tconst focused = view.element === this.focusTracker.focusedElement;\n\n\t\t\tif ( focused ) {\n\t\t\t\tindex = viewIndex;\n\t\t\t}\n\n\t\t\treturn focused;\n\t\t} );\n\n\t\treturn index;\n\t}\n\n\t/**\n\t * Focuses the {@link #first} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic focusFirst(): void {\n\t\tthis._focus( this.first, 1 );\n\t}\n\n\t/**\n\t * Focuses the {@link #last} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic focusLast(): void {\n\t\tthis._focus( this.last, -1 );\n\t}\n\n\t/**\n\t * Focuses the {@link #next} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic focusNext(): void {\n\t\tconst next = this.next;\n\n\t\t// If there's only one focusable item, we need to let the outside world know\n\t\t// that the next cycle is about to happen. This may be useful\n\t\t// e.g. if you want to move the focus to the parent focus cycler.\n\t\t// Note that the focus is not actually moved in this case.\n\t\tif ( next && this.focusables.getIndex( next ) === this.current ) {\n\t\t\tthis.fire<FocusCyclerForwardCycleEvent>( 'forwardCycle' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( next === this.first ) {\n\t\t\tthis.fire<FocusCyclerForwardCycleEvent>( 'forwardCycle' );\n\t\t} else {\n\t\t\tthis._focus( next, 1 );\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the {@link #previous} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */\n\tpublic focusPrevious(): void {\n\t\tconst previous = this.previous;\n\n\t\tif ( previous && this.focusables.getIndex( previous ) === this.current ) {\n\t\t\tthis.fire<FocusCyclerBackwardCycleEvent>( 'backwardCycle' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( previous === this.last ) {\n\t\t\tthis.fire<FocusCyclerBackwardCycleEvent>( 'backwardCycle' );\n\t\t} else {\n\t\t\tthis._focus( previous, -1 );\n\t\t}\n\t}\n\n\t/**\n\t * Allows for creating continuous focus cycling across multiple focus cyclers and their collections of {@link #focusables}.\n\t *\n\t * It starts listening to the {@link module:ui/focuscycler~FocusCyclerForwardCycleEvent} and\n\t * {@link module:ui/focuscycler~FocusCyclerBackwardCycleEvent} events of the chained focus cycler and engages,\n\t * whenever the user reaches the last (forwards navigation) or first (backwards navigation) focusable view\n\t * and would normally start over. Instead, the navigation continues on the higher level (flattens).\n\t *\n\t * For instance, for the following nested focus navigation structure, the focus would get stuck the moment\n\t * the AB gets focused and its focus cycler starts managing it:\n\t *\n\t *\t   ┌────────────┐   ┌──────────────────────────────────┐   ┌────────────┐\n\t *\t   │ AA         │   │ AB                               │   │ AC         │\n\t *\t   │            │   │                                  │   │            │\n\t *\t   │            │   │    ┌─────┐  ┌─────┐  ┌─────┐     │   │            │\n\t *\t   │            │   │ ┌──► ABA ├──► ABB ├──► ABC ├───┐ │   │            │\n\t *\t   │            ├───► │  └─────┘  └─────┘  └─────┘   │ │   │            │\n\t *\t   │            │   │ │                              │ │   │            │\n\t *\t   │            │   │ │                              │ │   │            │\n\t *\t   │            │   │ └──────────────────────────────┘ │   │            │\n\t *\t   │            │   │                                  │   │            │\n\t *\t   └────────────┘   └──────────────────────────────────┘   └────────────┘\n\t *\n\t * Chaining a focus tracker that manages AA, AB, and AC with the focus tracker that manages ABA, ABB, and ABC\n\t * creates a seamless navigation experience instead:\n\t *\n\t *\t   ┌────────────┐   ┌──────────────────────────────────┐   ┌────────────┐\n\t *\t   │ AA         │   │ AB                               │   │ AC         │\n\t *\t   │            │   │                                  │   │            │\n\t *\t   │            │   │    ┌─────┐  ┌─────┐  ┌─────┐     │   │            │\n\t *\t   │            │   │ ┌──► ABA ├──► ABB ├──► ABC ├──┐  │   │            │\n\t *\t┌──►            ├───┼─┘  └─────┘  └─────┘  └─────┘  └──┼───►            ├──┐\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  └────────────┘   └──────────────────────────────────┘   └────────────┘  │\n\t *\t│                                                                          │\n\t *\t│                                                                          │\n\t *\t└──────────────────────────────────────────────────────────────────────────┘\n\t *\n\t * See {@link #unchain} to reverse the chaining.\n\t */\n\tpublic chain( chainedFocusCycler: FocusCycler ): void {\n\t\tconst getCurrentFocusedView = () => {\n\t\t\t// This may happen when one focus cycler does not include focusables of the other (horizontal case).\n\t\t\tif ( this.current === null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn this.focusables.get( this.current );\n\t\t};\n\n\t\tthis.listenTo<FocusCyclerForwardCycleEvent>( chainedFocusCycler, 'forwardCycle', evt => {\n\t\t\tconst oldCurrent = getCurrentFocusedView();\n\n\t\t\tthis.focusNext();\n\n\t\t\t// Stop the event propagation only if an attempt at focusing the view actually moved the focus.\n\t\t\t// If not, let the otherFocusCycler handle the event.\n\t\t\tif ( oldCurrent !== getCurrentFocusedView() ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\n\t\t// The priority is critical for cycling across multiple chain levels when there's a single view at some of them only.\n\t\t}, { priority: 'low' } );\n\n\t\tthis.listenTo<FocusCyclerBackwardCycleEvent>( chainedFocusCycler, 'backwardCycle', evt => {\n\t\t\tconst oldCurrent = getCurrentFocusedView();\n\n\t\t\tthis.focusPrevious();\n\n\t\t\t// Stop the event propagation only if an attempt at focusing the view actually moved the focus.\n\t\t\t// If not, let the otherFocusCycler handle the event.\n\t\t\tif ( oldCurrent !== getCurrentFocusedView() ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\n\t\t// The priority is critical for cycling across multiple chain levels when there's a single view at some of them only.\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Reverses a chaining made by {@link #chain}.\n\t */\n\tpublic unchain( otherFocusCycler: FocusCycler ): void {\n\t\tthis.stopListening( otherFocusCycler );\n\t}\n\n\t/**\n\t * Focuses the given view if it exists.\n\t *\n\t * @param view The view to be focused\n\t * @param direction The direction of the focus if the view has focusable children.\n\t * @returns\n\t */\n\tprivate _focus( view: FocusableView | null, direction: 1 | -1 ) {\n\t\t// Don't fire focus events if the view is already focused.\n\t\t// Such attempt may occur when cycling with only one focusable item:\n\t\t// even though `focusNext()` method returns without changing focus,\n\t\t// the `forwardCycle` event is fired, triggering the `focusFirst()` method.\n\t\tif ( view && this.focusTracker.focusedElement !== view.element ) {\n\t\t\tview.focus( direction );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the next or previous focusable view in {@link #focusables} with respect\n\t * to {@link #current}.\n\t *\n\t * @param step Either `1` for checking forward from {@link #current} or `-1` for checking backwards.\n\t */\n\tprivate _getDomFocusableItem( step: 1 | -1 ): FocusableView | null {\n\t\t// Cache for speed.\n\t\tconst collectionLength = this.focusables.length;\n\n\t\tif ( !collectionLength ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst current = this.current;\n\n\t\t// Start from the beginning if no view is focused.\n\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/206\n\t\tif ( current === null ) {\n\t\t\treturn this[ step === 1 ? 'first' : 'last' ];\n\t\t}\n\n\t\t// Note: If current is the only focusable view, it will also be returned for the given step.\n\t\tlet focusableItem = this.focusables.get( current )!;\n\n\t\t// Cycle in both directions.\n\t\tlet index = ( current + collectionLength + step ) % collectionLength;\n\n\t\tdo {\n\t\t\tconst focusableItemCandidate = this.focusables.get( index )!;\n\n\t\t\tif ( isDomFocusable( focusableItemCandidate ) ) {\n\t\t\t\tfocusableItem = focusableItemCandidate;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Cycle in both directions.\n\t\t\tindex = ( index + collectionLength + step ) % collectionLength;\n\t\t} while ( index !== current );\n\n\t\treturn focusableItem;\n\t}\n}\n\n/**\n * A {@link module:ui/view~View} that can be focused (e.g. has `focus()` method).\n */\nexport type FocusableView = View & {\n\n\t/**\n\t * Focuses the view.\n\t *\n\t * @param direction This optional parameter helps improve the UX by providing additional information about the direction the focus moved\n\t * (e.g. in a complex view or a form). It is useful for views that host multiple focusable children (e.g. lists, toolbars):\n\t * * `1` indicates that the focus moved forward and, in most cases, the first child of the focused view should get focused,\n\t * * `-1` indicates that the focus moved backwards, and the last focusable child should get focused\n\t *\n\t * See {@link module:ui/focuscycler~FocusCycler#event:forwardCycle} and {@link module:ui/focuscycler~FocusCycler#event:backwardCycle}\n\t * to learn more.\n\t */\n\tfocus( direction?: 1 | -1 ): void;\n};\n\n/**\n * A {@link module:ui/view~View} that hosts one or more of focusable children being managed by a {@link module:ui/focuscycler~FocusCycler}\n * instance exposed under `focusCycler` property.\n */\nexport type ViewWithFocusCycler = FocusableView & {\n\tfocusCycler: FocusCycler;\n};\n\nexport type FocusCyclerActions = {\n\t[ key in 'focusFirst' | 'focusLast' | 'focusPrevious' | 'focusNext' ]?: ArrayOrItem<string>\n};\n\n/**\n * Fired when the focus cycler is about to move the focus from the last focusable item\n * to the first one.\n *\n * @eventName ~FocusCycler#forwardCycle\n */\nexport type FocusCyclerForwardCycleEvent = {\n\tname: 'forwardCycle';\n\targs: [];\n};\n\n/**\n * Fired when the focus cycler is about to move the focus from the first focusable item\n * to the last one.\n *\n * @eventName ~FocusCycler#backwardCycle\n */\nexport type FocusCyclerBackwardCycleEvent = {\n\tname: 'backwardCycle';\n\targs: [];\n};\n\n/**\n * Checks whether a view can be focused (has `focus()` method and is visible).\n *\n * @param view A view to be checked.\n */\nfunction isDomFocusable( view: View ) {\n\treturn isFocusable( view ) && isVisible( view.element );\n}\n\n/**\n * Checks whether a view is {@link ~FocusableView}.\n *\n * @param view A view to be checked.\n */\nexport function isFocusable( view: View ): view is FocusableView {\n\treturn !!( 'focus' in view && typeof view.focus == 'function' );\n}\n\n/**\n * Checks whether a view is an instance of {@link ~ViewWithFocusCycler}.\n *\n * @param view A view to be checked.\n */\nexport function isViewWithFocusCycler( view: View ): view is ViewWithFocusCycler {\n\treturn isFocusable( view ) && 'focusCycler' in view && view.focusCycler instanceof FocusCycler;\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/**\n * @module ui/dialog/dialogactionsview\n */\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\nimport type { Button, ButtonExecuteEvent } from '../button/button.js';\nimport { ButtonView } from '../button/buttonview.js';\nimport { View } from '../view.js';\nimport { ViewCollection } from '../viewcollection.js';\nimport { FocusCycler, type FocusableView } from '../focuscycler.js';\n\n/**\n * A dialog actions view class. It contains button views which are used to execute dialog actions.\n */\nexport class DialogActionsView extends View {\n\t/**\n\t * A collection of button views.\n\t */\n\tpublic readonly children: ViewCollection<FocusableView>;\n\n\t/**\n\t * A keystroke handler instance.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A focus cycler instance.\n\t */\n\tpublic readonly focusCycler: FocusCycler;\n\n\t/**\n\t * A focus tracker instance.\n\t */\n\tprivate readonly _focusTracker: FocusTracker;\n\n\t/**\n\t * A collection of focusable views.\n\t */\n\tprivate readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.children = this.createCollection<ButtonView>();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this._focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-dialog__actions'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * Creates the button views based on the given definitions.\n\t * Then adds them to the {@link #children} collection and to the focus cycler.\n\t */\n\tpublic setButtons( definitions: Array<DialogActionButtonDefinition> ): void {\n\t\tfor ( const definition of definitions ) {\n\t\t\tconst button = new ButtonView( this.locale );\n\n\t\t\tlet property: keyof DialogActionButtonDefinition;\n\t\t\tbutton.on<ButtonExecuteEvent>( 'execute', () => definition.onExecute() );\n\n\t\t\tif ( definition.onCreate ) {\n\t\t\t\tdefinition.onCreate( button );\n\t\t\t}\n\n\t\t\tfor ( property in definition ) {\n\t\t\t\tif ( property != 'onExecute' && property != 'onCreate' ) {\n\t\t\t\t\tbutton.set( property, definition[ property ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.children.add( button );\n\t\t}\n\n\t\tthis._updateFocusCyclableItems();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus( direction?: 1 | -1 ): void {\n\t\tif ( direction === -1 ) {\n\t\t\tthis.focusCycler.focusLast();\n\t\t} else {\n\t\t\tthis.focusCycler.focusFirst();\n\t\t}\n\t}\n\n\t/**\n\t * Adds all elements from the {@link #children} collection to the {@link #_focusables} collection\n\t * and to the {@link #_focusTracker} instance.\n\t */\n\tprivate _updateFocusCyclableItems() {\n\t\tArray.from( this.children ).forEach( v => {\n\t\t\tthis._focusables.add( v );\n\t\t\tthis._focusTracker.add( v.element! );\n\t\t} );\n\t}\n}\n\n/**\n * A dialog action button definition. It is a slightly modified version\n * of the {@link module:ui/button/button~Button} definition.\n */\nexport type DialogActionButtonDefinition =\n\tPick<Button, 'label'> &\n\tPartial<Pick<Button, 'withText' | 'class' | 'icon'>> &\n\t{\n\t\tonExecute: Function;\n\t\tonCreate?: ( button: ButtonView ) => void;\n\t};\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/**\n * @module ui/dialog/dialogcontentview\n */\n\nimport { View } from '../view.js';\nimport { type ViewCollection } from '../viewcollection.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * A dialog content view class.\n */\nexport class DialogContentView extends View {\n\t/**\n\t * A collection of content items.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor(\n\t\tlocale: Locale | undefined\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-dialog__content' ]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * Removes all the child views.\n\t */\n\tpublic reset(): void {\n\t\twhile ( this.children.length ) {\n\t\t\tthis.children.remove( 0 );\n\t\t}\n\t}\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/**\n * @module ui/dialog/dialogview\n */\n\nimport {\n\tKeystrokeHandler,\n\tFocusTracker,\n\tRect,\n\tgetConstrainedViewportRect,\n\tglobal,\n\ttoUnit,\n\ttype EventInfo,\n\ttype Locale,\n\ttype DecoratedMethodEvent,\n\ttype KeystrokeHandlerOptions\n} from '@ckeditor/ckeditor5-utils';\nimport { IconCancel } from '@ckeditor/ckeditor5-icons';\nimport { ViewCollection } from '../viewcollection.js';\nimport { View } from '../view.js';\nimport { FormHeaderView } from '../formheader/formheaderview.js';\nimport { ButtonView } from '../button/buttonview.js';\nimport { type ButtonExecuteEvent } from '../button/button.js';\nimport { FocusCycler, isViewWithFocusCycler,\n\ttype FocusableView,\n\tisFocusable\n}\n\tfrom '../focuscycler.js';\nimport {\n\tDraggableViewMixin,\n\ttype DraggableView,\n\ttype DraggableViewDragEvent,\n\ttype DraggableViewMixinConstructor\n} from '../bindings/draggableviewmixin.js';\nimport { DialogActionsView, type DialogActionButtonDefinition } from './dialogactionsview.js';\nimport { DialogContentView } from './dialogcontentview.js';\nimport { type EditorUI } from '../editorui/editorui.js';\n\nimport type { DialogPositionCallback } from './dialog.js';\n// @if CK_DEBUG_DIALOG // import { RectDrawer } from '@ckeditor/ckeditor5-utils/tests/_utils/rectdrawer.js';\n\n/**\n * Available dialog view positions:\n *\n * * `DialogViewPosition.SCREEN_CENTER` &ndash; A fixed position in the center of the screen.\n * * `DialogViewPosition.EDITOR_CENTER` &ndash; A dynamic position in the center of the editor editable area.\n * * `DialogViewPosition.EDITOR_TOP_SIDE` &ndash; A dynamic position at the top-right (for the left-to-right languages)\n * or top-left (for right-to-left languages) corner of the editor editable area.\n * * `DialogViewPosition.EDITOR_TOP_CENTER` &ndash; A dynamic position at the top-center of the editor editable area.\n * * `DialogViewPosition.EDITOR_BOTTOM_CENTER` &ndash; A dynamic position at the bottom-center of the editor editable area.\n * * `DialogViewPosition.EDITOR_ABOVE_CENTER` &ndash; A dynamic position centered above the editor editable area.\n * * `DialogViewPosition.EDITOR_BELOW_CENTER` &ndash; A dynamic position centered below the editor editable area.\n *\n * The position of a dialog is specified by a {@link module:ui/dialog/dialog~DialogDefinition#position `position` property} of a\n * definition passed to the {@link module:ui/dialog/dialog~Dialog#show} method.\n */\nexport const DialogViewPosition = {\n\tSCREEN_CENTER: 'screen-center',\n\tEDITOR_CENTER: 'editor-center',\n\tEDITOR_TOP_SIDE: 'editor-top-side',\n\tEDITOR_TOP_CENTER: 'editor-top-center',\n\tEDITOR_BOTTOM_CENTER: 'editor-bottom-center',\n\tEDITOR_ABOVE_CENTER: 'editor-above-center',\n\tEDITOR_BELOW_CENTER: 'editor-below-center'\n} as const;\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\nconst DialogViewBase: DraggableViewMixinConstructor<typeof View> = /* #__PURE__ */ DraggableViewMixin( View );\n\n/**\n * A dialog view class.\n */\nexport class DialogView extends DialogViewBase implements DraggableView {\n\t/**\n\t * A collection of the child views inside of the dialog.\n\t * A dialog can have 3 optional parts: header, content, and actions.\n\t */\n\tpublic readonly parts: ViewCollection;\n\n\t/**\n\t * A header view of the dialog. It is also a drag handle of the dialog.\n\t */\n\tpublic headerView?: FormHeaderView;\n\n\t/**\n\t * A close button view. It is automatically added to the header view if present.\n\t */\n\tpublic closeButtonView?: ButtonView;\n\n\t/**\n\t * A view with the action buttons available to the user.\n\t */\n\tpublic actionsView?: DialogActionsView;\n\n\t/**\n\t * A default dialog element offset from the reference element (e.g. editor editable area).\n\t */\n\tpublic static defaultOffset: number = 15;\n\n\t/**\n\t * A view with the dialog content.\n\t */\n\tpublic contentView?: DialogContentView;\n\n\t/**\n\t * A keystroke handler instance.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A focus tracker instance.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * A flag indicating if the dialog was moved manually. If so, its position\n\t * will not be updated automatically upon window resize or document scroll.\n\t */\n\tpublic wasMoved: boolean = false;\n\n\t/**\n\t * A flag indicating if this dialog view is a modal.\n\t *\n\t * @observable\n\t */\n\tdeclare public isModal: boolean;\n\n\t/**\n\t * A label for the view dialog element to be used by the assistive technologies.\n\t *\n\t * @observable\n\t */\n\tdeclare public ariaLabel: string;\n\n\t/**\n\t * A custom class name to be added to the dialog element.\n\t *\n\t * @observable\n\t */\n\tdeclare public className: string | undefined;\n\n\t/**\n\t * The position of the dialog view.\n\t *\n\t * If set to a function, it will be called with the DOM root Rects and the dialog Rect as arguments.\n\t * It should return the coordinates of the dialog's position.\n\t *\n\t * @observable\n\t */\n\tdeclare public position: typeof DialogViewPosition[ keyof typeof DialogViewPosition ] | DialogPositionCallback | null;\n\n\t/**\n\t * A flag indicating that the dialog should be shown. Once set to `true`, the dialog will be shown\n\t * after its position is calculated. Until then, the dialog is transparent and not visible.\n\t *\n\t * See {@link #_isTransparent} property.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _isVisible: boolean;\n\n\t/**\n\t * A flag indicating if a dialog is transparent. It is used to prevent the dialog from being visible\n\t * before its position is calculated.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _isTransparent: boolean;\n\n\t/**\n\t * The calculated dialog `top` CSS property used for positioning.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _top: number;\n\n\t/**\n\t * The calculated dialog `left` CSS property used for positioning.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public _left: number;\n\n\t/**\n\t * A callback returning the DOM root that requested the dialog.\n\t */\n\tprivate _getDomRootElement: () => HTMLElement | null;\n\n\t/**\n\t * A callback returning the configured editor viewport offset.\n\t */\n\tprivate _getViewportOffset: () => EditorUI[ 'viewportOffset' ];\n\n\t/**\n\t * The list of the focusable elements inside the dialog view.\n\t */\n\tprivate readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * The focus cycler instance.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale,\n\t\t{\n\t\t\tgetDomRootElement,\n\t\t\tgetViewportOffset,\n\t\t\tkeystrokeHandlerOptions\n\t\t}: {\n\t\t\tgetDomRootElement: () => HTMLElement | null;\n\t\t\tgetViewportOffset: () => EditorUI[ 'viewportOffset' ];\n\t\t\tkeystrokeHandlerOptions?: KeystrokeHandlerOptions;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = locale.t;\n\n\t\tthis.set( 'className', '' );\n\t\tthis.set( 'ariaLabel', t( 'Editor dialog' ) );\n\t\tthis.set( 'isModal', false );\n\t\tthis.set( 'position', DialogViewPosition.SCREEN_CENTER );\n\t\tthis.set( '_isVisible', false );\n\t\tthis.set( '_isTransparent', false );\n\t\tthis.set( '_top', 0 );\n\t\tthis.set( '_left', 0 );\n\t\tthis._getDomRootElement = getDomRootElement;\n\t\tthis._getViewportOffset = getViewportOffset;\n\n\t\tthis.decorate( 'moveTo' );\n\n\t\tthis.parts = this.createCollection();\n\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t},\n\t\t\tkeystrokeHandlerOptions\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-dialog-overlay',\n\t\t\t\t\tbind.if( 'isModal', 'ck-dialog-overlay__transparent', isModal => !isModal ),\n\t\t\t\t\tbind.if( '_isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\t// Prevent from editor losing focus when clicking on the modal overlay.\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\ttabindex: '-1',\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-dialog',\n\t\t\t\t\t\t\tbind.if( 'isModal', 'ck-dialog_modal' ),\n\t\t\t\t\t\t\tbind.to( 'className' )\n\t\t\t\t\t\t],\n\t\t\t\t\t\trole: 'dialog',\n\t\t\t\t\t\t'aria-label': bind.to( 'ariaLabel' ),\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\ttop: bind.to( '_top', top => toPx( top ) ),\n\t\t\t\t\t\t\tleft: bind.to( '_left', left => toPx( left ) ),\n\t\t\t\t\t\t\tvisibility: bind.if( '_isTransparent', 'hidden' )\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.parts\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\t// Do not react to the Esc key if the event has already been handled and defaultPrevented\n\t\t\t// by some logic of the dialog guest (child) view (https://github.com/ckeditor/ckeditor5/issues/17343).\n\t\t\tif ( !data.defaultPrevented ) {\n\t\t\t\tthis.fire<DialogViewCloseEvent>( 'close', { source: 'escKeyPress' } );\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\n\t\t// Support for dragging the modal.\n\t\tthis.on<DraggableViewDragEvent>( 'drag', ( evt: EventInfo, { deltaX, deltaY } ) => {\n\t\t\tthis.wasMoved = true;\n\t\t\tthis.moveBy( deltaX, deltaY );\n\t\t} );\n\n\t\t// Update dialog position upon window resize, if the position was not changed manually.\n\t\tthis.listenTo( global.window, 'resize', () => {\n\t\t\tif ( this._isVisible && !this.wasMoved ) {\n\t\t\t\tthis.updatePosition();\n\t\t\t}\n\t\t} );\n\n\t\t// Update dialog position upon document scroll, if the position was not changed manually.\n\t\tthis.listenTo( global.document, 'scroll', () => {\n\t\t\tif ( this._isVisible && !this.wasMoved ) {\n\t\t\t\tthis.updatePosition();\n\t\t\t}\n\t\t} );\n\n\t\tthis.on( 'change:_isVisible', ( evt, name, isVisible ) => {\n\t\t\tif ( isVisible ) {\n\t\t\t\t// Let the content render first, then apply the position. Otherwise, the calculated DOM Rects\n\t\t\t\t// will not reflect the final look of the dialog. Note that we're not using #_moveOffScreen() here because\n\t\t\t\t// it causes a violent movement of the viewport on iOS (because the dialog still keeps the DOM focus).\n\t\t\t\tthis._isTransparent = true;\n\n\t\t\t\t// FYI: RAF is too short. We need to wait a bit longer.\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\tthis.updatePosition();\n\n\t\t\t\t\tthis._isTransparent = false;\n\n\t\t\t\t\t// The view must get the focus after it gets visible. But this is only possible\n\t\t\t\t\t// after the dialog is no longer transparent.\n\t\t\t\t\tthis.focus();\n\t\t\t\t}, 10 );\n\t\t\t}\n\t\t} );\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * Returns the element that should be used as a drag handle.\n\t */\n\tpublic override get dragHandleElement(): HTMLElement | null {\n\t\t// Modals should not be draggable.\n\t\tif ( this.headerView && !this.isModal ) {\n\t\t\treturn this.headerView.element;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Creates the dialog parts. Which of them are created depends on the arguments passed to the method.\n\t * There are no rules regarding the dialog construction, that is, no part is mandatory.\n\t * Each part can only be created once.\n\t *\n\t * @internal\n\t */\n\tpublic setupParts( { icon, title, hasCloseButton = true, content, actionButtons }: {\n\t\ticon?: string;\n\t\ttitle?: string;\n\t\thasCloseButton?: boolean;\n\t\tcontent?: View | Array<View>;\n\t\tactionButtons?: Array<DialogActionButtonDefinition>;\n\t} ): void {\n\t\tif ( title ) {\n\t\t\tthis.headerView = new FormHeaderView( this.locale, { icon } );\n\n\t\t\tif ( hasCloseButton ) {\n\t\t\t\tthis.closeButtonView = this._createCloseButton();\n\t\t\t\tthis.headerView.children.add( this.closeButtonView );\n\t\t\t}\n\n\t\t\tthis.headerView.label = title;\n\t\t\tthis.ariaLabel = title;\n\t\t\tthis.parts.add( this.headerView, 0 );\n\t\t}\n\n\t\tif ( content ) {\n\t\t\t// Normalize the content specified in the arguments.\n\t\t\tif ( content instanceof View ) {\n\t\t\t\tcontent = [ content ];\n\t\t\t}\n\n\t\t\tthis.contentView = new DialogContentView( this.locale );\n\t\t\tthis.contentView.children.addMany( content );\n\t\t\tthis.parts.add( this.contentView );\n\t\t}\n\n\t\tif ( actionButtons ) {\n\t\t\tthis.actionsView = new DialogActionsView( this.locale );\n\t\t\tthis.actionsView.setButtons( actionButtons );\n\t\t\tthis.parts.add( this.actionsView );\n\t\t}\n\n\t\tthis._updateFocusCyclableItems();\n\t}\n\n\t/**\n\t * Focuses the first focusable element inside the dialog.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Normalizes the passed coordinates to make sure the dialog view\n\t * is displayed within the visible viewport and moves it there.\n\t *\n\t * @internal\n\t */\n\tpublic moveTo( left: number, top: number ): void {\n\t\tconst viewportRect = this._getViewportRect();\n\t\tconst dialogRect = this._getDialogRect();\n\n\t\t// Don't let the dialog go beyond the right edge of the viewport.\n\t\tif ( left + dialogRect.width > viewportRect.right ) {\n\t\t\tleft = viewportRect.right - dialogRect.width;\n\t\t}\n\n\t\t// Don't let the dialog go beyond the left edge of the viewport.\n\t\tif ( left < viewportRect.left ) {\n\t\t\tleft = viewportRect.left;\n\t\t}\n\n\t\t// Don't let the dialog go beyond the top edge of the viewport.\n\t\tif ( top < viewportRect.top ) {\n\t\t\ttop = viewportRect.top;\n\t\t}\n\n\t\t// Note: We don't do the same for the bottom edge to allow users to resize the window vertically\n\t\t// and let the dialog to stay put instead of covering the editing root.\n\n\t\tthis._moveTo( left, top );\n\t}\n\n\t/**\n\t * Moves the dialog to the specified coordinates.\n\t */\n\tprivate _moveTo( left: number, top: number ): void {\n\t\tthis._left = left;\n\t\tthis._top = top;\n\t}\n\n\t/**\n\t * Moves the dialog by the specified offset.\n\t *\n\t * @internal\n\t */\n\tpublic moveBy( left: number, top: number ): void {\n\t\tthis.moveTo( this._left + left, this._top + top );\n\t}\n\n\t/**\n\t * Moves the dialog view to the off-screen position.\n\t * Used when there is no space to display the dialog.\n\t */\n\tprivate _moveOffScreen(): void {\n\t\tthis._moveTo( -9999, -9999 );\n\t}\n\n\t/**\n\t * Recalculates the dialog according to the set position and viewport,\n\t * and moves it to the new position.\n\t */\n\tpublic updatePosition(): void {\n\t\tif ( !this.element || !this.element.parentNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewportRect = this._getViewportRect();\n\n\t\t// Actual position may be different from the configured one if there's no DOM root.\n\t\tlet configuredPosition = this.position;\n\t\tlet domRootRect = null;\n\t\tlet visibleDomRootRect = null;\n\n\t\tif ( !this._getDomRootElement() ) {\n\t\t\tconfiguredPosition = DialogViewPosition.SCREEN_CENTER;\n\t\t} else {\n\t\t\t( { domRootRect, visibleDomRootRect } = this._getDomRootRects( viewportRect ) );\n\t\t}\n\n\t\tconst defaultOffset = DialogView.defaultOffset;\n\t\tconst dialogRect = this._getDialogRect();\n\n\t\tif ( this.position == null ) {\n\t\t\treturn;\n\t\t} else if ( typeof this.position == 'function' ) {\n\t\t\tconst coords = this.position( dialogRect, visibleDomRootRect, domRootRect );\n\n\t\t\tif ( coords == null ) {\n\t\t\t\tthis._moveOffScreen();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._moveTo( coords.left, coords.top );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_DIALOG // RectDrawer.clear();\n\t\t// @if CK_DEBUG_DIALOG // RectDrawer.draw( viewportRect, { outlineColor: 'blue' }, 'Viewport' );\n\n\t\tswitch ( configuredPosition ) {\n\t\t\tcase DialogViewPosition.EDITOR_TOP_SIDE: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( visibleDomRootRect ) {\n\t\t\t\t\tconst leftCoordinate = this.locale!.contentLanguageDirection === 'ltr' ?\n\t\t\t\t\t\tvisibleDomRootRect.right - dialogRect.width - defaultOffset :\n\t\t\t\t\t\tvisibleDomRootRect.left + defaultOffset;\n\n\t\t\t\t\tthis.moveTo( leftCoordinate, visibleDomRootRect.top + defaultOffset );\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_CENTER: {\n\t\t\t\tif ( visibleDomRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tMath.round( visibleDomRootRect.top + visibleDomRootRect.height / 2 - dialogRect.height / 2 )\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.SCREEN_CENTER: {\n\t\t\t\tthis.moveTo(\n\t\t\t\t\tMath.round( ( viewportRect.width - dialogRect.width ) / 2 ),\n\t\t\t\t\tMath.round( ( viewportRect.height - dialogRect.height ) / 2 )\n\t\t\t\t);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_TOP_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( visibleDomRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tvisibleDomRootRect.top + defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_BOTTOM_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( visibleDomRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tvisibleDomRootRect.bottom - dialogRect.height - defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_ABOVE_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( visibleDomRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tvisibleDomRootRect.top - dialogRect.height - defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DialogViewPosition.EDITOR_BELOW_CENTER: {\n\t\t\t\t// @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n\t\t\t\t// @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n\t\t\t\t// @if CK_DEBUG_DIALOG // }\n\n\t\t\t\tif ( visibleDomRootRect ) {\n\t\t\t\t\tthis.moveTo(\n\t\t\t\t\t\tMath.round( visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2 ),\n\t\t\t\t\t\tvisibleDomRootRect.bottom + defaultOffset\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis._moveOffScreen();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the {@link #_getDomRootElement DOM root element's} Rect and its corresponding visible DOM root Rect.\n\t *\n\t * The visible Rect is the part of the DOM root Rect that is actually visible to the user\n\t * (see {@link module:utils/dom/rect~Rect#getVisible}), and overlaps with the viewport.\n\t *\n\t * **Note**: It might be that the visible DOM root Rect is not available (root off the screen, cropped by parent elements, etc.)\n\t * but its general DOM root Rect is still available.\n\t */\n\tprivate _getDomRootRects( viewportRect: Rect ): {\n\t\tvisibleDomRootRect: Rect | null;\n\t\tdomRootRect: Rect | null;\n\t} {\n\t\tconst domRootRect = new Rect( this._getDomRootElement()! );\n\t\tlet visibleDomRootRect = domRootRect.getVisible();\n\n\t\tif ( visibleDomRootRect ) {\n\t\t\tvisibleDomRootRect = viewportRect.getIntersection( visibleDomRootRect );\n\t\t}\n\n\t\treturn { visibleDomRootRect, domRootRect };\n\t}\n\n\t/**\n\t * Calculates the dialog element rect.\n\t */\n\tprivate _getDialogRect() {\n\t\treturn new Rect( this.element!.firstElementChild as HTMLElement );\n\t}\n\n\t/**\n\t * Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n\t */\n\tprivate _getViewportRect(): Rect {\n\t\tconst viewportRect = new Rect( global.window );\n\n\t\t// Modals should not be restricted by the viewport offsets as they are always displayed on top of the page.\n\t\tif ( this.isModal ) {\n\t\t\treturn viewportRect;\n\t\t}\n\n\t\treturn getConstrainedViewportRect( this._getViewportOffset() );\n\t}\n\n\t/**\n\t * Collects all focusable elements inside the dialog parts\n\t * and adds them to the focus tracker and focus cycler.\n\t */\n\tprivate _updateFocusCyclableItems() {\n\t\tconst focusables: Array<FocusableView> = [];\n\n\t\tif ( this.contentView ) {\n\t\t\tfor ( const child of this.contentView.children ) {\n\t\t\t\tif ( isFocusable( child ) ) {\n\t\t\t\t\tfocusables.push( child );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( this.actionsView ) {\n\t\t\tfocusables.push( this.actionsView );\n\t\t}\n\n\t\tif ( this.closeButtonView ) {\n\t\t\tfocusables.push( this.closeButtonView );\n\t\t}\n\n\t\tfocusables.forEach( focusable => {\n\t\t\tthis._focusables.add( focusable );\n\t\t\tthis.focusTracker.add( focusable.element! );\n\n\t\t\tif ( isViewWithFocusCycler( focusable ) ) {\n\t\t\t\tthis._focusCycler.chain( focusable.focusCycler );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the close button view that is displayed in the header view corner.\n\t */\n\tprivate _createCloseButton(): ButtonView {\n\t\tconst buttonView = new ButtonView( this.locale );\n\t\tconst t = this.locale!.t;\n\n\t\tbuttonView.set( {\n\t\t\tlabel: t( 'Close' ),\n\t\t\ttooltip: true,\n\t\t\ticon: IconCancel\n\t\t} );\n\n\t\tbuttonView.on<ButtonExecuteEvent>( 'execute', () => this.fire<DialogViewCloseEvent>( 'close', { source: 'closeButton' } ) );\n\n\t\treturn buttonView;\n\t}\n}\n\n/**\n * An event fired when the dialog is closed.\n *\n * @eventName ~DialogView#close\n */\nexport type DialogViewCloseEvent = {\n\tname: 'close';\n\targs: [ { source: 'closeButton' | 'escKeyPress' } ];\n};\n\n/**\n * An event fired when the dialog is moved.\n *\n * @eventName ~DialogView#moveTo\n */\nexport type DialogViewMoveToEvent = DecoratedMethodEvent<DialogView, 'moveTo'>;\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/**\n * @module ui/dialog/dialog\n */\n\nimport { type View } from '../view.js';\nimport { type Editor, Plugin } from '@ckeditor/ckeditor5-core';\nimport { DialogView, type DialogViewCloseEvent, DialogViewPosition } from './dialogview.js';\nimport type { DialogActionButtonDefinition } from './dialogactionsview.js';\nimport type { ModelDocumentChangeEvent } from '@ckeditor/ckeditor5-engine';\nimport type { KeystrokeHandlerOptions, Rect } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The dialog controller class. It is used to show and hide the {@link module:ui/dialog/dialogview~DialogView}.\n */\nexport class Dialog extends Plugin {\n\t/**\n\t * The name of the currently visible dialog view instance.\n\t *\n\t * @observable\n\t */\n\tdeclare public id: string | null;\n\n\t/**\n\t * The currently visible dialog view instance.\n\t */\n\tpublic view?: DialogView;\n\n\t/**\n\t * The `Dialog` plugin instance which most recently showed the dialog.\n\t *\n\t * Only one dialog can be visible at once, even if there are many editor instances on the page.\n\t * If an editor wants to show a dialog, it should first hide the dialog that is already opened.\n\t * But only the `Dialog` instance that showed the dialog is able able to properly hide it.\n\t * This is why we need to store it in a globally available space (static property).\n\t * This way every `Dialog` plugin in every editor is able to correctly close any open dialog window.\n\t */\n\tprivate static _visibleDialogPlugin: Dialog | null;\n\n\t/**\n\t * A flag indicating whether the dialog is currently visible.\n\t *\n\t * @observable\n\t */\n\tdeclare public isOpen: boolean;\n\n\t/**\n\t * A configurable callback called when the dialog is hidden.\n\t */\n\tprivate _onHide: ( ( dialog: Dialog ) => void ) | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Dialog' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tconst t = editor.t;\n\n\t\tthis._initShowHideListeners();\n\t\tthis._initFocusToggler();\n\t\tthis._initMultiRootIntegration();\n\n\t\tthis.set( {\n\t\t\tid: null,\n\t\t\tisOpen: false\n\t\t} );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tcategoryId: 'navigation',\n\t\t\tkeystrokes: [ {\n\t\t\t\tlabel: t( 'Move focus in and out of an active dialog window' ),\n\t\t\t\tkeystroke: 'Ctrl+F6',\n\t\t\t\tmayRequireFn: true\n\t\t\t} ]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tif ( Dialog._visibleDialogPlugin === this ) {\n\t\t\tthis._unlockBodyScroll();\n\t\t}\n\t}\n\n\t/**\n\t * Initiates listeners for the `show` and `hide` events emitted by this plugin.\n\t *\n\t * We could not simply decorate the {@link #show} and {@link #hide} methods to fire events,\n\t * because they would be fired in the wrong order &ndash; first would be `show` and then `hide`\n\t * (because showing the dialog actually starts with hiding the previously visible one).\n\t * Hence, we added private methods {@link #_show} and {@link #_hide} which are called on events\n\t * in the desired sequence.\n\t */\n\tprivate _initShowHideListeners() {\n\t\tthis.on<DialogShowEvent>( 'show', ( evt, args ) => {\n\t\t\tthis._show( args );\n\t\t} );\n\n\t\t// 'low' priority allows to add custom callback between `_show()` and `onShow()`.\n\t\tthis.on<DialogShowEvent>( 'show', ( evt, args ) => {\n\t\t\tif ( args.onShow ) {\n\t\t\t\targs.onShow( this );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\n\t\tthis.on<DialogHideEvent>( 'hide', () => {\n\t\t\tif ( Dialog._visibleDialogPlugin ) {\n\t\t\t\tDialog._visibleDialogPlugin._hide();\n\t\t\t}\n\t\t} );\n\n\t\t// 'low' priority allows to add custom callback between `_hide()` and `onHide()`.\n\t\tthis.on<DialogHideEvent>( 'hide', () => {\n\t\t\tif ( this._onHide ) {\n\t\t\t\tthis._onHide( this );\n\t\t\t\tthis._onHide = undefined;\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Initiates keystroke handler for toggling the focus between the editor and the dialog view.\n\t */\n\tprivate _initFocusToggler() {\n\t\tconst editor = this.editor;\n\n\t\teditor.keystrokes.set( 'Ctrl+F6', ( data, cancel ) => {\n\t\t\tif ( !this.isOpen || this.view!.isModal ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.view!.focusTracker.isFocused ) {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} else {\n\t\t\t\tthis.view!.focus();\n\t\t\t}\n\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * Provides an integration between the root attaching and detaching and positioning of the view.\n\t */\n\tprivate _initMultiRootIntegration() {\n\t\tconst model = this.editor.model;\n\n\t\tmodel.document.on<ModelDocumentChangeEvent>( 'change:data', () => {\n\t\t\tif ( !this.view ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst changedRoots = model.document.differ.getChangedRoots();\n\n\t\t\tfor ( const changes of changedRoots ) {\n\t\t\t\tif ( changes.state ) {\n\t\t\t\t\tthis.view.updatePosition();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Displays a dialog window.\n\t *\n\t * This method requires a {@link ~DialogDefinition} that defines the dialog's content, title, icon, action buttons, etc.\n\t *\n\t * For example, the following definition will create a dialog with:\n\t * * A header consisting of an icon, a title, and a \"Close\" button (it is added by default).\n\t * * A content consisting of a view with a single paragraph.\n\t * * A footer consisting of two buttons: \"Yes\" and \"No\".\n\t *\n\t * ```js\n\t * // Create the view that will be used as the dialog's content.\n\t * const textView = new View( locale );\n\t *\n\t * textView.setTemplate( {\n\t * \ttag: 'div',\n\t * \tattributes: {\n\t * \t\tstyle: {\n\t * \t\t\tpadding: 'var(--ck-spacing-large)',\n\t * \t\t\twhiteSpace: 'initial',\n\t * \t\t\twidth: '100%',\n\t * \t\t\tmaxWidth: '500px'\n\t * \t\t},\n\t * \t\ttabindex: -1\n\t * \t},\n\t * \tchildren: [\n\t * \t\t'Lorem ipsum dolor sit amet...'\n\t * \t]\n\t * } );\n\t *\n\t * // Show the dialog.\n\t * editor.plugins.get( 'Dialog' ).show( {\n\t *\tid: 'myDialog',\n\t * \ticon: 'myIcon', // This should be an SVG string.\n\t * \ttitle: 'My dialog',\n\t * \tcontent: textView,\n\t * \tactionButtons: [\n\t *\t\t{\n\t *\t\t\tlabel: t( 'Yes' ),\n\t *\t\t\tclass: 'ck-button-action',\n\t *\t\t\twithText: true,\n\t *\t\t\tonExecute: () => dialog.hide()\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tlabel: t( 'No' ),\n\t *\t\t\twithText: true,\n\t *\t\t\tonExecute: () => dialog.hide()\n\t *\t\t}\n\t *\t]\n\t * } );\n\t * ```\n\t *\n\t * By specifying the {@link ~DialogDefinition#onShow} and {@link ~DialogDefinition#onHide} callbacks\n\t * it is also possible to add callbacks that will be called when the dialog is shown or hidden.\n\t *\n\t * For example, the callbacks in the following definition:\n\t * * Disable the default behavior of the <kbd>Esc</kbd> key.\n\t * * Fire a custom event when the dialog gets hidden.\n\t *\n\t * ```js\n\t * editor.plugins.get( 'Dialog' ).show( {\n\t * \t// ...\n\t * \tonShow: dialog => {\n\t * \t\tdialog.view.on( 'close', ( evt, data ) => {\n\t * \t\t\t// Only prevent the event from the \"Esc\" key - do not affect the other ways of closing the dialog.\n\t * \t\t\tif ( data.source === 'escKeyPress' ) {\n\t * \t\t\t\tevt.stop();\n\t * \t\t\t}\n\t * \t\t} );\n\t * \t},\n\t * \tonHide: dialog => {\n\t * \t\tdialog.fire( 'dialogDestroyed' );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Internally, calling this method:\n\t * 1. Hides the currently visible dialog (if any) calling the {@link #hide} method\n\t * (fires the {@link ~DialogHideEvent hide event}).\n\t * 2. Fires the {@link ~DialogShowEvent show event} which allows for adding callbacks that customize the\n\t * behavior of the dialog.\n\t * 3. Shows the dialog.\n\t */\n\tpublic show( dialogDefinition: DialogDefinition ): void {\n\t\tthis.hide();\n\n\t\tthis.fire<DialogShowEvent>( `show:${ dialogDefinition.id }`, dialogDefinition );\n\t}\n\n\t/**\n\t * Handles creating the {@link module:ui/dialog/dialogview~DialogView} instance and making it visible.\n\t */\n\tprivate _show( {\n\t\tid,\n\t\ticon,\n\t\ttitle,\n\t\thasCloseButton = true,\n\t\tcontent,\n\t\tactionButtons,\n\t\tclassName,\n\t\tisModal,\n\t\tposition,\n\t\tonHide,\n\t\tgetRootName,\n\t\tkeystrokeHandlerOptions\n\t}: DialogDefinition ) {\n\t\tconst editor = this.editor;\n\n\t\tthis.view = new DialogView( editor.locale, {\n\t\t\tgetDomRootElement: () => {\n\t\t\t\t// Use the configured root name or the root name of the selection anchor.\n\t\t\t\tconst rootName = getRootName?.() ?? this.editor.model.document.selection.anchor!.root.rootName;\n\n\t\t\t\tif ( !rootName || !editor.editing.view.domRoots.has( rootName ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn editor.editing.view.getDomRoot( rootName ) ?? null;\n\t\t\t},\n\t\t\tgetViewportOffset: () => {\n\t\t\t\treturn editor.ui.viewportOffset;\n\t\t\t},\n\t\t\tkeystrokeHandlerOptions\n\t\t} );\n\n\t\tconst view = this.view;\n\n\t\tview.on<DialogViewCloseEvent>( 'close', () => {\n\t\t\tthis.hide();\n\t\t} );\n\n\t\teditor.ui.view.body.add( view );\n\t\teditor.keystrokes.listenTo( view.element! );\n\n\t\t// Unless the user specified a position, modals should always be centered on the screen.\n\t\t// Otherwise, let's keep dialogs centered in the editing root by default.\n\t\tif ( !position ) {\n\t\t\tposition = isModal ? DialogViewPosition.SCREEN_CENTER : DialogViewPosition.EDITOR_CENTER;\n\t\t}\n\n\t\tif ( isModal ) {\n\t\t\tthis._lockBodyScroll();\n\t\t}\n\n\t\tview.set( {\n\t\t\tposition,\n\t\t\t_isVisible: true,\n\t\t\tclassName,\n\t\t\tisModal\n\t\t} );\n\n\t\tview.setupParts( {\n\t\t\ticon,\n\t\t\ttitle,\n\t\t\thasCloseButton,\n\t\t\tcontent,\n\t\t\tactionButtons\n\t\t} );\n\n\t\tthis.id = id;\n\n\t\tif ( onHide ) {\n\t\t\tthis._onHide = onHide;\n\t\t}\n\n\t\tthis.isOpen = true;\n\t\tDialog._visibleDialogPlugin = this;\n\t}\n\n\t/**\n\t * Hides the dialog. This method is decorated to enable interacting on the {@link ~DialogHideEvent hide event}.\n\t *\n\t * See {@link #show}.\n\t */\n\tpublic hide(): void {\n\t\tif ( Dialog._visibleDialogPlugin ) {\n\t\t\tDialog._visibleDialogPlugin.fire<DialogHideEvent>( `hide:${ Dialog._visibleDialogPlugin.id }` );\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the {@link module:ui/dialog/dialogview~DialogView} and cleans up the stored dialog state.\n\t */\n\tprivate _hide(): void {\n\t\tif ( !this.view ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\n\t\tif ( view.isModal ) {\n\t\t\tthis._unlockBodyScroll();\n\t\t}\n\n\t\t// Reset the content view to prevent its children from being destroyed in the standard\n\t\t// View#destroy() (and collections) chain. If the content children were left in there,\n\t\t// they would have to be re-created by the feature using the dialog every time the dialog\n\t\t// shows up.\n\t\tif ( view.contentView ) {\n\t\t\tview.contentView.reset();\n\t\t}\n\n\t\teditor.ui.view.body.remove( view );\n\t\teditor.ui.focusTracker.remove( view.element! );\n\t\teditor.keystrokes.stopListening( view.element! );\n\n\t\tview.destroy();\n\t\teditor.editing.view.focus();\n\n\t\tthis.id = null;\n\t\tthis.isOpen = false;\n\t\tDialog._visibleDialogPlugin = null;\n\t}\n\n\t/**\n\t * Makes the <body> unscrollable (e.g. when the modal shows up).\n\t */\n\tprivate _lockBodyScroll(): void {\n\t\tdocument.documentElement.classList.add( 'ck-dialog-scroll-locked' );\n\t}\n\n\t/**\n\t * Makes the <body> scrollable again (e.g. once the modal hides).\n\t */\n\tprivate _unlockBodyScroll(): void {\n\t\tdocument.documentElement.classList.remove( 'ck-dialog-scroll-locked' );\n\t}\n}\n\n/**\n * The definition that describes a dialog window and its content. Passed to the {@link module:ui/dialog/dialog~Dialog#show} method.\n */\nexport interface DialogDefinition {\n\n\t/**\n\t * A unique identifier of the dialog. It allows for distinguishing between different dialogs and their visibility.\n\t * For instance, when open, the ID of the currently visible dialog is stored in {@link module:ui/dialog/dialog~Dialog#id}.\n\t *\n\t * The `id` is also passed along the {@link module:ui/dialog/dialog~DialogShowEvent} and {@link module:ui/dialog/dialog~DialogHideEvent}\n\t * events.\n\t */\n\tid: string;\n\n\t/**\n\t * The SVG string of an icon displayed in dialogs's header. Used only when {@link #title} is also set\n\t * and the header is displayed.\n\t *\n\t * See more in {@link module:ui/icon/iconview~IconView#content}.\n\t */\n\ticon?: string;\n\n\t/**\n\t * A title displayed in the dialogs's header. It also works as an accessible name of the dialog used by assistive technologies.\n\t *\n\t * When not set, the header is not displayed. Affects {@link #icon} and {@link #hasCloseButton}.\n\t */\n\ttitle?: string;\n\n\t/**\n\t * A flag indicating whether the dialog should have a close button in the header.\n\t * `true` by default. Works when {@link #title} is also set and the header is displayed.\n\t *\n\t * **Note**: If you hide the close button, make sure that the dialog can be closed in another way.\n\t */\n\thasCloseButton?: boolean;\n\n\t/**\n\t * The content of the dialog. It can be a single {@link module:ui/view~View} or an array of views.\n\t */\n\tcontent?: View | Array<View>;\n\n\t/**\n\t * The action buttons displayed in the dialog's footer.\n\t */\n\tactionButtons?: Array<DialogActionButtonDefinition>;\n\n\t/**\n\t * An additional CSS class set on the outermost (`.ck.ck-dialog`) container element allowing for visual customization.\n\t */\n\tclassName?: string;\n\n\t/**\n\t * When set to `true`, the dialog will become a modal, that is, it will block the UI until it is closed.\n\t */\n\tisModal?: boolean;\n\n\t/**\n\t * Available dialog positions. By default `DialogViewPosition.EDITOR_CENTER` is used for {@link #isModal non-modals}\n\t * and `DialogViewPosition.SCREEN_CENTER` for modals.\n\t *\n\t * If set to a function, it will be fed dialog and DOM root geometry as arguments and should return the coordinates of the\n\t * dialog's position.\n\t *\n\t * * Learn more about {@link module:ui/dialog/dialogview#DialogViewPosition available positions}.\n\t * * Learn more about which editor root the dialog is positioned relative to in the\n\t * {@link module:ui/dialog/dialog~DialogDefinition#getRootName} section.\n\t */\n\tposition?: typeof DialogViewPosition[ keyof typeof DialogViewPosition ] | DialogPositionCallback | null;\n\n\t/**\n\t * A callback executed whenever the dialog is about to show up that returns the DOM root name that the\n\t * dialog should be {@link #position positioned} relative to.\n\t *\n\t * If not set, the dialog will be positioned relative to the DOM root the model selection is anchored to.\n\t */\n\tgetRootName?: () => string | null;\n\n\t/**\n\t * A callback called when the dialog shows up with a `low` priority. It allows for setting up the dialog's {@link #content}.\n\t */\n\tonShow?: ( dialog: Dialog ) => void;\n\n\t/**\n\t * A callback called when the dialog hides with a `low` priority.\n\t * It allows for cleaning up (for example, resetting) the dialog's {@link #content}.\n\t */\n\tonHide?: ( dialog: Dialog ) => void;\n\n\t/**\n\t * Options that will be passed to the {@link module:utils/keystrokehandler~KeystrokeHandler keystroke handler} of the dialog view.\n\t *\n\t * See {@link module:utils/keystrokehandler~KeystrokeHandlerOptions KeystrokeHandlerOptions} to learn more about the available options.\n\t */\n\tkeystrokeHandlerOptions?: KeystrokeHandlerOptions;\n}\n\n/**\n * A callback that returns the coordinates of the dialog's position. It can be used to customize the dialog's position.\n *\n * See {@link module:ui/dialog/dialog~DialogDefinition#getRootName} for more details on which DOM root is used as a source for\n * the Rects passed as arguments.\n *\n * @param dialogRect The current `Rect` of the dialog view element.\n * @param visibleDomRootRect The visible `Rect` of the DOM root element. This rect will be unavailable when the DOM root element is off the\n * screen or cropped by overflowing parent.\n * @param domRootRect The current `Rect` of the DOM root. This rect will be unavailable, e.g. when the DOM root element is completely hidden\n * via CSS `display` property or detached from the DOM.\n * @returns The coordinates of the dialog's position or `null` if the dialog should stay hidden.\n */\nexport type DialogPositionCallback = (\n\tdialogRect: Rect,\n\tvisibleDomRootRect: Rect | null,\n\tdomRootRect: Rect | null\n) => { left: number; top: number } | null;\n\n/**\n * An event fired after {@link module:ui/dialog/dialog~Dialog#show} is called. You can use it to customize the behavior\n * of any dialog.\n *\n * ```js\n * import { DialogViewPosition } from '@ckeditor/ckeditor5-ui';\n *\n * // ...\n *\n * // Changes the position of the \"Find and Replace\" dialog.\n * editor.plugins.get( 'Dialog' ).on( 'show:findAndReplace', ( evt, data ) => {\n * \tObject.assign( data, { position: DialogViewPosition.EDITOR_BOTTOM_CENTER } );\n * }, { priority: 'high' } );\n * ```\n *\n * @eventName ~Dialog#show\n */\nexport type DialogShowEvent = {\n\tname: 'show' | `show:${ string }`;\n\targs: [ dialogDefinition: DialogDefinition ];\n};\n\n/**\n * An event fired after {@link module:ui/dialog/dialog~Dialog#hide} is called. You can use it to customize the behavior\n * of any dialog.\n *\n * ```js\n * // Logs after the \"Find and Replace\" dialog gets hidden\n * editor.plugins.get( 'Dialog' ).on( 'hide:findAndReplace', () => {\n * \tconsole.log( 'The \"Find and Replace\" dialog was hidden.' );\n * } );\n * ```\n *\n * @eventName ~Dialog#hide\n */\nexport type DialogHideEvent = {\n\tname: 'hide' | `hide:${ string }`;\n\targs: [];\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/**\n * @module ui/button/listitembuttonview\n */\n\nimport type { ObservableChangeEvent, Locale } from '@ckeditor/ckeditor5-utils';\nimport { type ButtonLabel } from './buttonlabel.js';\nimport { type ViewCollection } from '../viewcollection.js';\n\nimport { IconCheck } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView } from './buttonview.js';\nimport { ButtonLabelView } from './buttonlabelview.js';\nimport { IconView } from '../icon/iconview.js';\nimport { View } from '../view.js';\n\n/**\n * Button that is used as dropdown list item entry.\n */\nexport class ListItemButtonView extends ButtonView {\n\t/**\n\t * Indicates whether the button view has reserved space for a check holder.\n\t *\n\t * @observable\n\t */\n\tdeclare public hasCheckSpace: boolean;\n\n\t/**\n\t * The flag that indicates if the button should render a check holder.\n\t *\n\t * @internal\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _hasCheck: boolean;\n\n\t/**\n\t * Holds the view for the check icon of a button list item.\n\t */\n\tprivate readonly _checkIconHolderView = new CheckIconHolderView();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale, labelView: ButtonLabel = new ButtonLabelView() ) {\n\t\tsuper( locale, labelView );\n\n\t\tthis.set( {\n\t\t\thasCheckSpace: false,\n\t\t\t_hasCheck: this.isToggleable\n\t\t} );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-list-item-button',\n\t\t\t\t\tbind.if( 'isToggleable', 'ck-list-item-button_toggleable' )\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\n\t\tthis.bind( '_hasCheck' ).to(\n\t\t\tthis, 'hasCheckSpace',\n\t\t\tthis, 'isToggleable',\n\t\t\t( hasCheckSpace, isToggleable ) => hasCheckSpace || isToggleable\n\t\t);\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this._hasCheck ) {\n\t\t\tthis.children.add( this._checkIconHolderView, 0 );\n\t\t}\n\n\t\tthis._watchCheckIconHolderMount();\n\t}\n\n\t/**\n\t * Renders the check icon if the button is toggleable.\n\t */\n\tprivate _watchCheckIconHolderMount() {\n\t\tthis._checkIconHolderView\n\t\t\t.bind( 'isOn' )\n\t\t\t.to( this, 'isOn', value => this.isToggleable && value );\n\n\t\tthis.on<ObservableChangeEvent<boolean>>(\n\t\t\t'change:_hasCheck',\n\t\t\t( evt, propertyName, hasCheck ) => {\n\t\t\t\tconst { children, _checkIconHolderView } = this;\n\n\t\t\t\tif ( hasCheck ) {\n\t\t\t\t\tchildren.add( _checkIconHolderView, 0 );\n\t\t\t\t} else {\n\t\t\t\t\tchildren.remove( _checkIconHolderView );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n\n/**\n * @internal\n */\nexport class CheckIconHolderView extends View {\n\t/**\n\t * Collection of child views.\n\t */\n\tpublic readonly children: ViewCollection<View>;\n\n\t/**\n\t * Indicates whether the button is in the \"on\" state.\n\t */\n\tdeclare public isOn: boolean;\n\n\t/**\n\t * The view for the check icon of the button list item.\n\t */\n\tprivate readonly _checkIconView: IconView = this._createCheckIconView();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.set( 'isOn', false );\n\t\tthis.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tchildren: this.children,\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-list-item-button__check-holder',\n\t\t\t\t\tbind.to( 'isOn', isOn => isOn ? 'ck-on' : 'ck-off' )\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this.isOn ) {\n\t\t\tthis.children.add( this._checkIconView, 0 );\n\t\t}\n\n\t\tthis._watchCheckIconMount();\n\t}\n\n\t/**\n\t * Renders the check icon if the button is toggleable.\n\t */\n\tprivate _watchCheckIconMount() {\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isOn', ( evt, propertyName, isOn ) => {\n\t\t\tconst { children, _checkIconView } = this;\n\n\t\t\tif ( isOn && !children.has( _checkIconView ) ) {\n\t\t\t\tchildren.add( _checkIconView );\n\t\t\t} else if ( !isOn && children.has( _checkIconView ) ) {\n\t\t\t\tchildren.remove( _checkIconView );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a check icon view.\n\t */\n\tprivate _createCheckIconView() {\n\t\tconst iconView = new IconView();\n\n\t\ticonView.content = IconCheck;\n\t\ticonView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-list-item-button__check-icon'\n\t\t\t}\n\t\t} );\n\n\t\treturn iconView;\n\t}\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/**\n * @module ui/menubar/menubarmenulistitembuttonview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport { ListItemButtonView } from '../button/listitembuttonview.js';\n\n/**\n * A menu bar list button view. Buttons like this one execute user actions.\n */\nexport class MenuBarMenuListItemButtonView extends ListItemButtonView {\n\t/**\n\t * Creates an instance of the menu bar list button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: 'menuitem'\n\t\t} );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-menu-bar__menu__item__button' ]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/editorui/accessibilityhelp/accessibilityhelp\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { IconAccessibility } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView } from '../../button/buttonview.js';\nimport { Dialog } from '../../dialog/dialog.js';\nimport { MenuBarMenuListItemButtonView } from '../../menubar/menubarmenulistitembuttonview.js';\nimport { AccessibilityHelpContentView } from './accessibilityhelpcontentview.js';\nimport { getEnvKeystrokeText } from '@ckeditor/ckeditor5-utils';\nimport type { EditorUIReadyEvent } from '../../editorui/editorui.js';\nimport type { AddRootEvent } from '@ckeditor/ckeditor5-editor-multi-root';\nimport type { ViewDowncastWriter, ViewRootEditableElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * A plugin that brings the accessibility help dialog to the editor available under the <kbd>Alt</kbd>+<kbd>0</kbd>\n * keystroke and via the \"Accessibility help\" toolbar button. The dialog displays a list of keystrokes that can be used\n * by the user to perform various actions in the editor.\n *\n * Keystroke information is loaded from {@link module:core/accessibility~Accessibility#keystrokeInfos}. New entries can be\n * added using the API provided by the {@link module:core/accessibility~Accessibility} class.\n */\nexport class AccessibilityHelp extends Plugin {\n\t/**\n\t * The view that displays the dialog content (list of keystrokes).\n\t * Created when the dialog is opened for the first time.\n\t */\n\tpublic contentView: AccessibilityHelpContentView | null = null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Dialog ]> {\n\t\treturn [ Dialog ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AccessibilityHelp' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\n\t\teditor.ui.componentFactory.add( 'accessibilityHelp', () => {\n\t\t\tconst button = this._createButton( ButtonView );\n\n\t\t\tbutton.set( {\n\t\t\t\ttooltip: true,\n\t\t\t\twithText: false,\n\t\t\t\tlabel: t( 'Accessibility help' )\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:accessibilityHelp', () => {\n\t\t\tconst button = this._createButton( MenuBarMenuListItemButtonView );\n\n\t\t\tbutton.label = t( 'Accessibility' );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.keystrokes.set( 'Alt+0', ( evt, cancel ) => {\n\t\t\tthis._toggleDialog();\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis._setupRootLabels();\n\t}\n\n\t/**\n\t * Creates a button to show accessibility help dialog, for use either in toolbar or in menu bar.\n\t */\n\tprivate _createButton<T extends typeof ButtonView>( ButtonClass: T ): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get( 'Dialog' );\n\t\tconst locale = editor.locale;\n\t\tconst view = new ButtonClass( locale ) as InstanceType<T>;\n\n\t\tview.set( {\n\t\t\tkeystroke: 'Alt+0',\n\t\t\ticon: IconAccessibility,\n\t\t\tisToggleable: true\n\t\t} );\n\n\t\tview.on( 'execute', () => this._toggleDialog() );\n\t\tview.bind( 'isOn' ).to( dialog, 'id', id => id === 'accessibilityHelp' );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Injects a help text into each editing root's `aria-label` attribute allowing assistive technology users\n\t * to discover the availability of the Accessibility help dialog.\n\t */\n\tprivate _setupRootLabels(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.on<EditorUIReadyEvent>( 'ready', () => {\n\t\t\teditingView.change( writer => {\n\t\t\t\tfor ( const root of editingView.document.roots ) {\n\t\t\t\t\taddAriaLabelTextToRoot( writer, root );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\teditor.on<AddRootEvent>( 'addRoot', ( evt, modelRoot ) => {\n\t\t\t\tconst viewRoot = editor.editing.view.document.getRoot( modelRoot.rootName )!;\n\n\t\t\t\teditingView.change( writer => addAriaLabelTextToRoot( writer, viewRoot ) );\n\t\t\t}, { priority: 'low' } );\n\t\t} );\n\n\t\tfunction addAriaLabelTextToRoot( writer: ViewDowncastWriter, viewRoot: ViewRootEditableElement ) {\n\t\t\tconst currentAriaLabel = viewRoot.getAttribute( 'aria-label' );\n\t\t\tconst newAriaLabel = [ currentAriaLabel, t( 'Press %0 for help.', [ getEnvKeystrokeText( 'Alt+0' ) ] ) ]\n\t\t\t\t.filter( segment => segment )\n\t\t\t\t.join( '. ' );\n\n\t\t\twriter.setAttribute( 'aria-label', newAriaLabel, viewRoot );\n\t\t}\n\t}\n\n\t/**\n\t * Shows the accessibility help dialog. Also, creates {@link #contentView} on demand.\n\t */\n\tprivate _toggleDialog(): void {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get( 'Dialog' );\n\t\tconst t = editor.locale.t;\n\n\t\tif ( !this.contentView ) {\n\t\t\tthis.contentView = new AccessibilityHelpContentView( editor.locale, editor.accessibility.keystrokeInfos );\n\t\t}\n\n\t\tif ( dialog.id === 'accessibilityHelp' ) {\n\t\t\tdialog.hide();\n\t\t} else {\n\t\t\tdialog.show( {\n\t\t\t\tid: 'accessibilityHelp',\n\t\t\t\tclassName: 'ck-accessibility-help-dialog',\n\t\t\t\ttitle: t( 'Accessibility help' ),\n\t\t\t\ticon: IconAccessibility,\n\t\t\t\thasCloseButton: true,\n\t\t\t\tcontent: this.contentView\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module ui/editorui/bodycollection\n */\n\nimport { Template } from '../template.js';\nimport { ViewCollection } from '../viewcollection.js';\nimport { type View } from '../view.js';\n\nimport { createElement, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * This is a special {@link module:ui/viewcollection~ViewCollection} dedicated to elements that are detached from the DOM structure of\n * the editor, like floating panels, floating toolbars, dialogs, etc.\n *\n * The body collection is available under the {@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`} property.\n * Any plugin can add a {@link module:ui/view~View view} to this collection.\n *\n * All views added to a body collection render in a dedicated DOM container (`<div class=\"ck ck-body ...\">...</div>`). All body collection\n * containers render in a common shared (`<div class=\"ck-body-wrapper\">...</div>`) in the DOM to limit the pollution of\n * the `<body>` element. The resulting DOM structure is as follows:\n *\n * ```html\n * <body>\n * \t<!-- Content of the webpage... -->\n *\n * \t<!-- The shared wrapper for all body collection containers. -->\n * \t<div class=\"ck-body-wrapper\">\n * \t\t<!-- The container of the first body collection instance. -->\n * \t\t<div class=\"ck ck-body ...\">\n * \t\t\t<!-- View elements belonging to the first body collection -->\n * \t\t</div>\n *\n * \t\t<!-- The container of the second body collection instance. -->\n * \t\t<div class=\"ck ck-body ...\">...</div>\n *\n * \t\t<!-- More body collection containers for the rest of instances... -->\n * \t</div>\n * </body>\n * ```\n *\n * By default, the {@link module:ui/editorui/editoruiview~EditorUIView `editor.ui.view`} manages the life cycle of the\n * {@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`} collection, attaching and detaching it\n * when the editor gets created or {@link module:core/editor/editor~Editor#destroy destroyed}.\n *\n * # Custom body collection instances\n *\n * Even though most editor instances come with a built-in body collection\n * ({@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`}), you can create your own instance of this\n * class if you need to control their life cycle.\n *\n * The life cycle of a custom body collection must be handled manually by the developer using the dedicated API:\n * * A body collection will render itself automatically in the DOM as soon as you call {@link ~BodyCollection#attachToDom}.\n * * Calling {@link ~BodyCollection#detachFromDom} will remove the collection from the DOM.\n *\n * **Note**: The shared collection wrapper (`<div class=\"ck-body-wrapper\">...</div>`) gets automatically removed from DOM when the\n * last body collection is {@link ~BodyCollection#detachFromDom detached} and does not require any special handling.\n */\nexport class BodyCollection extends ViewCollection {\n\t/**\n\t * The {@link module:core/editor/editor~Editor#locale editor's locale} instance.\n\t * See the view {@link module:ui/view~View#locale locale} property.\n\t */\n\tpublic readonly locale: Locale;\n\n\t/**\n\t * The element holding elements of the body collection.\n\t */\n\tprivate _bodyCollectionContainer?: HTMLElement;\n\n\t/**\n\t * The wrapper element that holds all of the {@link #_bodyCollectionContainer} elements.\n\t */\n\tprivate static _bodyWrapper?: HTMLElement;\n\n\t/**\n\t * Creates a new instance of the {@link module:ui/editorui/bodycollection~BodyCollection}.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor editor's locale} instance.\n\t * @param initialItems The initial items of the collection.\n\t */\n\tconstructor( locale: Locale, initialItems: Iterable<View> = [] ) {\n\t\tsuper( initialItems );\n\n\t\tthis.locale = locale;\n\t}\n\n\t/**\n\t * The element holding elements of the body collection.\n\t */\n\tpublic get bodyCollectionContainer(): HTMLElement | undefined {\n\t\treturn this._bodyCollectionContainer;\n\t}\n\n\t/**\n\t * Attaches the body collection to the DOM body element. You need to execute this method to render the content of\n\t * the body collection.\n\t */\n\tpublic attachToDom(): void {\n\t\tthis._bodyCollectionContainer = new Template( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-reset_all',\n\t\t\t\t\t'ck-body',\n\t\t\t\t\t'ck-rounded-corners'\n\t\t\t\t],\n\t\t\t\tdir: this.locale.uiLanguageDirection,\n\t\t\t\trole: 'application'\n\t\t\t},\n\t\t\tchildren: this\n\t\t} ).render() as HTMLElement;\n\n\t\t// Create a shared wrapper if there were none or the previous one got disconnected from DOM.\n\t\tif ( !BodyCollection._bodyWrapper || !BodyCollection._bodyWrapper.isConnected ) {\n\t\t\tBodyCollection._bodyWrapper = createElement( document, 'div', { class: 'ck-body-wrapper' } );\n\t\t\tdocument.body.appendChild( BodyCollection._bodyWrapper );\n\t\t}\n\n\t\tBodyCollection._bodyWrapper.appendChild( this._bodyCollectionContainer );\n\t}\n\n\t/**\n\t * Detaches the collection from the DOM structure. Use this method when you do not need to use the body collection\n\t * anymore to clean-up the DOM structure.\n\t */\n\tpublic detachFromDom(): void {\n\t\tsuper.destroy();\n\n\t\tif ( this._bodyCollectionContainer ) {\n\t\t\tthis._bodyCollectionContainer.remove();\n\t\t}\n\n\t\tif ( BodyCollection._bodyWrapper && !BodyCollection._bodyWrapper.childElementCount ) {\n\t\t\tBodyCollection._bodyWrapper.remove();\n\t\t\tdelete BodyCollection._bodyWrapper;\n\t\t}\n\t}\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/**\n * @module ui/panel/balloon/balloonpanelview\n */\n\nimport { View } from '../../view.js';\nimport { type ViewCollection } from '../../viewcollection.js';\n\nimport {\n\tgetOptimalPosition,\n\tglobal,\n\tisRange,\n\ttoUnit,\n\tisVisible,\n\tisText,\n\tResizeObserver,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype DomPoint,\n\ttype DomOptimalPositionOptions,\n\tRect,\n\ttype PositioningFunction\n} from '@ckeditor/ckeditor5-utils';\n\nimport { isElement } from 'es-toolkit/compat';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\n// A static balloon panel positioning function that moves the balloon far off the viewport.\n// It is used as a fallback when there is no way to position the balloon using provided\n// positioning functions (see: `getOptimalPosition()`), for instance, when the target the\n// balloon should be attached to gets obscured by scrollable containers or the viewport.\n//\n// It prevents the balloon from being attached to the void and possible degradation of the UX.\n// At the same time, it keeps the balloon physically visible in the DOM so the focus remains\n// uninterrupted.\nconst POSITION_OFF_SCREEN: DomPoint = {\n\ttop: -99999,\n\tleft: -99999,\n\tname: 'arrowless',\n\tconfig: {\n\t\twithArrow: false\n\t}\n};\n\n/**\n * The balloon panel view class.\n *\n * A floating container which can\n * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#pin pin} to any\n * {@link module:utils/dom/position~DomOptimalPositionOptions#target target} in the DOM and remain in that position\n * e.g. when the web page is scrolled.\n *\n * The balloon panel can be used to display contextual, non-blocking UI like forms, toolbars and\n * the like in its {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#content} view\n * collection.\n *\n * There is a number of {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}\n * that the balloon can use, automatically switching from one to another when the viewport space becomes\n * scarce to keep the balloon visible to the user as long as it is possible. The balloon will also\n * accept any custom position set provided by the user compatible with the\n * {@link module:utils/dom/position~DomOptimalPositionOptions options}.\n *\n * ```ts\n * const panel = new BalloonPanelView( locale );\n * const childView = new ChildView();\n * const positions = BalloonPanelView.defaultPositions;\n *\n * panel.render();\n *\n * // Add a child view to the panel's content collection.\n * panel.content.add( childView );\n *\n * // Start pinning the panel to an element with the \"target\" id DOM.\n * // The balloon will remain pinned until unpin() is called.\n * panel.pin( {\n * \ttarget: document.querySelector( '#target' ),\n * \tpositions: [\n * \t\tpositions.northArrowSouth,\n * \t\tpositions.southArrowNorth\n * \t]\n * } );\n * ```\n */\nexport class BalloonPanelView extends View {\n\t/**\n\t * A collection of the child views that creates the balloon panel contents.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * The absolute top position of the balloon panel in pixels.\n\t *\n\t * @observable\n\t * @default 0\n\t */\n\tdeclare public top: number;\n\n\t/**\n\t * The absolute left position of the balloon panel in pixels.\n\t *\n\t * @observable\n\t * @default 0\n\t */\n\tdeclare public left: number;\n\n\t/**\n\t * The balloon panel's current position. The position name is reflected in the CSS class set\n\t * to the balloon, i.e. `.ck-balloon-panel_arrow_nw` for the \"arrow_nw\" position. The class\n\t * controls the minor aspects of the balloon's visual appearance like the placement\n\t * of an {@link #withArrow arrow}. To support a new position, an additional CSS must be created.\n\t *\n\t * Default position names correspond with\n\t * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t *\n\t * See the {@link #attachTo} and {@link #pin} methods to learn about custom balloon positions.\n\t *\n\t * @observable\n\t * @default 'arrow_nw'\n\t */\n\tdeclare public position: 'arrow_nw' | 'arrow_ne' | 'arrow_sw' | 'arrow_se';\n\n\t/**\n\t * Controls whether the balloon panel is visible or not.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Controls whether the balloon panel has an arrow. The presence of the arrow\n\t * is reflected in the `ck-balloon-panel_with-arrow` CSS class.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public withArrow: boolean;\n\n\t/**\n\t * An additional CSS class added to the {@link #element}.\n\t *\n\t * @observable\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * A callback that starts pinning the panel when {@link #isVisible} gets\n\t * `true`. Used by {@link #pin}.\n\t *\n\t * @private\n\t */\n\tprivate _pinWhenIsVisibleCallback: ( () => void ) | null;\n\n\t/**\n\t * An instance of resize observer used to detect if target element is still visible.\n\t */\n\tprivate _resizeObserver: ResizeObserver | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'top', 0 );\n\t\tthis.set( 'left', 0 );\n\t\tthis.set( 'position', 'arrow_nw' );\n\t\tthis.set( 'isVisible', false );\n\t\tthis.set( 'withArrow', true );\n\t\tthis.set( 'class', undefined );\n\n\t\tthis._pinWhenIsVisibleCallback = null;\n\t\tthis._resizeObserver = null;\n\n\t\tthis.content = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-balloon-panel',\n\t\t\t\t\tbind.to( 'position', value => `ck-balloon-panel_${ value }` ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-balloon-panel_visible' ),\n\t\t\t\t\tbind.if( 'withArrow', 'ck-balloon-panel_with-arrow' ),\n\t\t\t\t\tbind.to( 'class' )\n\t\t\t\t],\n\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to( 'top', toPx ),\n\t\t\t\t\tleft: bind.to( 'left', toPx )\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tchildren: this.content\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis.hide();\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Shows the panel.\n\t *\n\t * See {@link #isVisible}.\n\t */\n\tpublic show(): void {\n\t\tthis.isVisible = true;\n\t}\n\n\t/**\n\t * Hides the panel.\n\t *\n\t * See {@link #isVisible}.\n\t */\n\tpublic hide(): void {\n\t\tthis.isVisible = false;\n\t}\n\n\t/**\n\t * Attaches the panel to a specified {@link module:utils/dom/position~DomOptimalPositionOptions#target} with a\n\t * smart positioning heuristics that chooses from available positions to make sure the panel\n\t * is visible to the user i.e. within the limits of the viewport.\n\t *\n\t * This method accepts configuration {@link module:utils/dom/position~DomOptimalPositionOptions options}\n\t * to set the `target`, optional `limiter` and `positions` the balloon should choose from.\n\t *\n\t * ```ts\n\t * const panel = new BalloonPanelView( locale );\n\t * const positions = BalloonPanelView.defaultPositions;\n\t *\n\t * panel.render();\n\t *\n\t * // Attach the panel to an element with the \"target\" id DOM.\n\t * panel.attachTo( {\n\t * \ttarget: document.querySelector( '#target' ),\n\t * \tpositions: [\n\t * \t\tpositions.northArrowSouth,\n\t * \t\tpositions.southArrowNorth\n\t * \t]\n\t * } );\n\t * ```\n\t *\n\t * **Note**: Attaching the panel will also automatically {@link #show} it.\n\t *\n\t * **Note**: An attached panel will not follow its target when the window is scrolled or resized.\n\t * See the {@link #pin} method for a more permanent positioning strategy.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t * @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t * provided in the options is invisible (e.g. element detached from DOM).\n\t */\n\tpublic attachTo( options: Partial<DomOptimalPositionOptions> ): boolean {\n\t\tconst target = getDomElement( options.target );\n\n\t\tif ( target && !isVisible( target ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.show();\n\n\t\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\t\tconst positionOptions = Object.assign( {}, {\n\t\t\telement: this.element,\n\t\t\tpositions: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleWest,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.northArrowSouth,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleWest,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleEast,\n\t\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\t\tdefaultPositions.viewportStickyNorth\n\t\t\t],\n\t\t\tlimiter: global.document.body,\n\t\t\tfitInViewport: true\n\t\t}, options ) as DomOptimalPositionOptions;\n\n\t\tconst optimalPosition = BalloonPanelView._getOptimalPosition( positionOptions ) || POSITION_OFF_SCREEN;\n\n\t\t// Usually browsers make some problems with super accurate values like 104.345px\n\t\t// so it is better to use int values.\n\t\tconst left = parseInt( optimalPosition.left as any );\n\t\tconst top = parseInt( optimalPosition.top as any );\n\n\t\tconst position = optimalPosition.name as this[ 'position' ];\n\t\tconst config: { withArrow?: boolean } = optimalPosition.config || {};\n\t\tconst { withArrow = true } = config;\n\n\t\tthis.top = top;\n\t\tthis.left = left;\n\t\tthis.position = position;\n\t\tthis.withArrow = withArrow;\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Works the same way as the {@link #attachTo} method except that the position of the panel is\n\t * continuously updated when:\n\t *\n\t * * any ancestor of the {@link module:utils/dom/position~DomOptimalPositionOptions#target}\n\t * or {@link module:utils/dom/position~DomOptimalPositionOptions#limiter} is scrolled,\n\t * * the browser window gets resized or scrolled.\n\t *\n\t * Thanks to that, the panel always sticks to the {@link module:utils/dom/position~DomOptimalPositionOptions#target}\n\t * and is immune to the changing environment.\n\t *\n\t * ```ts\n\t * const panel = new BalloonPanelView( locale );\n\t * const positions = BalloonPanelView.defaultPositions;\n\t *\n\t * panel.render();\n\t *\n\t * // Pin the panel to an element with the \"target\" id DOM.\n\t * panel.pin( {\n\t * \ttarget: document.querySelector( '#target' ),\n\t * \tpositions: [\n\t * \t\tpositions.northArrowSouth,\n\t * \t\tpositions.southArrowNorth\n\t * \t]\n\t * } );\n\t * ```\n\t *\n\t * To leave the pinned state, use the {@link #unpin} method.\n\t *\n\t * **Note**: Pinning the panel will also automatically {@link #show} it.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t */\n\tpublic pin( options: Partial<DomOptimalPositionOptions> ): void {\n\t\tthis.unpin();\n\n\t\tif ( !this._startPinning( options ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pinWhenIsVisibleCallback = () => {\n\t\t\tif ( this.isVisible ) {\n\t\t\t\tthis._startPinning( options );\n\t\t\t} else {\n\t\t\t\tthis._stopPinning();\n\t\t\t}\n\t\t};\n\n\t\t// Control the state of the listeners depending on whether the panel is visible\n\t\t// or not.\n\t\t// TODO: Use on() (https://github.com/ckeditor/ckeditor5-utils/issues/144).\n\t\tthis.listenTo<ObservableChangeEvent>( this, 'change:isVisible', this._pinWhenIsVisibleCallback );\n\t}\n\n\t/**\n\t * Stops pinning the panel, as set up by {@link #pin}.\n\t */\n\tpublic unpin(): void {\n\t\tif ( this._pinWhenIsVisibleCallback ) {\n\t\t\t// Deactivate listeners attached by pin().\n\t\t\tthis._stopPinning();\n\n\t\t\t// Deactivate the panel pin() control logic.\n\t\t\t// TODO: Use off() (https://github.com/ckeditor/ckeditor5-utils/issues/144).\n\t\t\tthis.stopListening( this, 'change:isVisible', this._pinWhenIsVisibleCallback );\n\n\t\t\tthis._pinWhenIsVisibleCallback = null;\n\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\t/**\n\t * Starts managing the pinned state of the panel. See {@link #pin}.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t * provided in the options is invisible (e.g. element detached from DOM).\n\t */\n\tprivate _startPinning( options: Partial<DomOptimalPositionOptions> ): boolean {\n\t\tif ( !this.attachTo( options ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet targetElement = getDomElement( options.target );\n\t\tconst limiterElement = options.limiter ? getDomElement( options.limiter ) : global.document.body;\n\n\t\t// Then we need to listen on scroll event of eny element in the document.\n\t\tthis.listenTo( global.document, 'scroll', ( evt, domEvt ) => {\n\t\t\tconst scrollTarget = domEvt.target as Element;\n\n\t\t\t// The position needs to be updated if the positioning target is within the scrolled element.\n\t\t\tconst isWithinScrollTarget = targetElement && scrollTarget.contains( targetElement );\n\n\t\t\t// The position needs to be updated if the positioning limiter is within the scrolled element.\n\t\t\tconst isLimiterWithinScrollTarget = limiterElement && scrollTarget.contains( limiterElement );\n\n\t\t\t// The positioning target and/or limiter can be a Rect, object etc..\n\t\t\t// There's no way to optimize the listener then.\n\t\t\tif ( isWithinScrollTarget || isLimiterWithinScrollTarget || !targetElement || !limiterElement ) {\n\t\t\t\tthis.attachTo( options );\n\t\t\t}\n\t\t}, { useCapture: true } );\n\n\t\t// We need to listen on window resize event and update position.\n\t\tthis.listenTo( global.window, 'resize', () => {\n\t\t\tthis.attachTo( options );\n\t\t} );\n\n\t\t// Hide the panel if the target element is no longer visible.\n\t\tif ( !this._resizeObserver ) {\n\t\t\t// If the target element is a text node, we need to check the parent element.\n\t\t\t// It's because `ResizeObserver` accept only elements, not text nodes.\n\t\t\tif ( targetElement && isText( targetElement ) ) {\n\t\t\t\ttargetElement = targetElement.parentElement;\n\t\t\t}\n\n\t\t\tif ( targetElement ) {\n\t\t\t\tconst checkVisibility = () => {\n\t\t\t\t\t// If the target element is no longer visible, hide the panel.\n\t\t\t\t\tif ( !isVisible( targetElement ) ) {\n\t\t\t\t\t\tthis.unpin();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Element is being resized to 0x0 after it's parent became hidden,\n\t\t\t\t// so we need to check size in order to determine if it's visible or not.\n\t\t\t\tthis._resizeObserver = new ResizeObserver( targetElement, checkVisibility );\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Stops managing the pinned state of the panel. See {@link #pin}.\n\t */\n\tprivate _stopPinning(): void {\n\t\tthis.stopListening( global.document, 'scroll' );\n\t\tthis.stopListening( global.window, 'resize' );\n\n\t\tif ( this._resizeObserver ) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t\tthis._resizeObserver = null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns available {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n\t * {@link module:utils/dom/position~PositioningFunction positioning functions} adjusted by the specific offsets.\n\t *\n\t * @internal\n\t * @param options Options to generate positions. If not specified, this helper will simply return\n\t * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t * @param options.sideOffset A custom side offset (in pixels) of each position. If\n\t * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowSideOffset the default value}\n\t * will be used.\n\t * @param options.heightOffset A custom height offset (in pixels) of each position. If\n\t * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowHeightOffset the default value}\n\t * will be used.\n\t * @param options.stickyVerticalOffset A custom offset (in pixels) of the `viewportStickyNorth` positioning function.\n\t * If not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.stickyVerticalOffset the default value}\n\t * will be used.\n\t * @param options.config Additional configuration of the balloon balloon panel view.\n\t * Currently only {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#withArrow} is supported. Learn more\n\t * about {@link module:utils/dom/position~PositioningFunction positioning functions}.\n\t */\n\tpublic static generatePositions( options: {\n\t\tsideOffset?: number;\n\t\theightOffset?: number;\n\t\tstickyVerticalOffset?: number;\n\t\tconfig?: object;\n\t} = {} ): Record<string, PositioningFunction> {\n\t\tconst {\n\t\t\tsideOffset = BalloonPanelView.arrowSideOffset,\n\t\t\theightOffset = BalloonPanelView.arrowHeightOffset,\n\t\t\tstickyVerticalOffset = BalloonPanelView.stickyVerticalOffset,\n\t\t\tconfig\n\t\t} = options;\n\n\t\treturn {\n\t\t\t// ------- North west\n\n\t\t\tnorthWestArrowSouthWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left - sideOffset,\n\t\t\t\tname: 'arrow_sw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthWestArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\t\tname: 'arrow_smw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthWestArrowSouth: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\t\tname: 'arrow_s',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthWestArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\t\tname: 'arrow_sme',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthWestArrowSouthEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\t\tname: 'arrow_se',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- North\n\n\t\t\tnorthArrowSouthWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\t\tname: 'arrow_sw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\t\tname: 'arrow_smw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthArrowSouth: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\tname: 'arrow_s',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\t\tname: 'arrow_sme',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthArrowSouthEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\t\tname: 'arrow_se',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- North east\n\n\t\t\tnorthEastArrowSouthWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.right - sideOffset,\n\t\t\t\tname: 'arrow_sw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthEastArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.right - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\t\tname: 'arrow_smw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthEastArrowSouth: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\t\tname: 'arrow_s',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthEastArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.right - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\t\tname: 'arrow_sme',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tnorthEastArrowSouthEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getNorthTop( targetRect, balloonRect ),\n\t\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\t\tname: 'arrow_se',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- South west\n\n\t\t\tsouthWestArrowNorthWest: targetRect => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left - sideOffset,\n\t\t\t\tname: 'arrow_nw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthWestArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\t\tname: 'arrow_nmw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthWestArrowNorth: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\t\tname: 'arrow_n',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthWestArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\t\tname: 'arrow_nme',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthWestArrowNorthEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\t\tname: 'arrow_ne',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- South\n\n\t\t\tsouthArrowNorthWest: targetRect => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\t\tname: 'arrow_nw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * 0.25 ) - sideOffset,\n\t\t\t\tname: 'arrow_nmw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthArrowNorth: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\tname: 'arrow_n',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - ( balloonRect.width * 0.75 ) + sideOffset,\n\t\t\t\tname: 'arrow_nme',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthArrowNorthEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\t\tname: 'arrow_ne',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- South east\n\n\t\t\tsouthEastArrowNorthWest: targetRect => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.right - sideOffset,\n\t\t\t\tname: 'arrow_nw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthEastArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.right - ( balloonRect.width * .25 ) - sideOffset,\n\t\t\t\tname: 'arrow_nmw',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthEastArrowNorth: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\t\tname: 'arrow_n',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthEastArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.right - ( balloonRect.width * .75 ) + sideOffset,\n\t\t\t\tname: 'arrow_nme',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\tsouthEastArrowNorthEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: getSouthTop( targetRect ),\n\t\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\t\tname: 'arrow_ne',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- West\n\n\t\t\twestArrowEast: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\t\tleft: targetRect.left - balloonRect.width - heightOffset,\n\t\t\t\tname: 'arrow_e',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- East\n\n\t\t\teastArrowWest: ( targetRect, balloonRect ) => ( {\n\t\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\t\tleft: targetRect.right + heightOffset,\n\t\t\t\tname: 'arrow_w',\n\t\t\t\t...( config && { config } )\n\t\t\t} ),\n\n\t\t\t// ------- Sticky\n\n\t\t\tviewportStickyNorth: ( targetRect, balloonRect, viewportRect ) => {\n\t\t\t\t// Get the intersection of the viewport and the document body.\n\t\t\t\tconst boundaryRect = new Rect( global.document.body ).getIntersection( viewportRect.getVisible()! );\n\n\t\t\t\tif ( !boundaryRect ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Get the visible intersection of the boundary and the document body.\n\t\t\t\tconst visibleBoundaryRect = boundaryRect.getVisible()!;\n\n\t\t\t\t// Check if the target is in the boundary.\n\t\t\t\tif ( !targetRect.getIntersection( visibleBoundaryRect ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Checks if there is enough space to put the balloon on the top or bottom of the target.\n\t\t\t\t// If not, makes the balloon sticky.\n\t\t\t\tif ( !(\n\t\t\t\t\tvisibleBoundaryRect.top - targetRect.top - stickyVerticalOffset < balloonRect.height &&\n\t\t\t\t\tvisibleBoundaryRect.bottom - targetRect.bottom < balloonRect.height\n\t\t\t\t) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\ttop: visibleBoundaryRect.top + stickyVerticalOffset,\n\t\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\t\tname: 'arrowless',\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\twithArrow: false,\n\t\t\t\t\t\t...config\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Returns the top coordinate for positions starting with `north*`.\n\t\t *\n\t\t * @param targetRect A rect of the target.\n\t\t * @param balloonRect A rect of the balloon.\n\t\t */\n\t\tfunction getNorthTop( targetRect: Rect, balloonRect: Rect ) {\n\t\t\treturn targetRect.top - balloonRect.height - heightOffset;\n\t\t}\n\n\t\t/**\n\t\t * Returns the top coordinate for positions starting with `south*`.\n\t\t *\n\t\t * @param targetRect A rect of the target.\n\t\t */\n\t\tfunction getSouthTop( targetRect: Rect ) {\n\t\t\treturn targetRect.bottom + heightOffset;\n\t\t}\n\t}\n\n\t/**\n\t * A side offset of the arrow tip from the edge of the balloon. Controlled by CSS.\n\t *\n\t * ```\n\t *\t\t ┌───────────────────────┐\n\t *\t\t │                       │\n\t *\t\t │         Balloon       │\n\t *\t\t │         Content       │\n\t *\t\t │                       │\n\t *\t\t └──+    +───────────────┘\n\t *\t\t |   \\  /\n\t *\t\t |    \\/\n\t *\t\t>┼─────┼< ─────────────────────── side offset\n\t *\n\t * ```\n\t *\n\t * @default 25\n\t */\n\tpublic static arrowSideOffset = 25;\n\n\t/**\n\t * A height offset of the arrow from the edge of the balloon. Controlled by CSS.\n\t *\n\t * ```\n\t *\t\t ┌───────────────────────┐\n\t *\t\t │                       │\n\t *\t\t │         Balloon       │\n\t *\t\t │         Content       │      ╱-- arrow height offset\n\t *\t\t │                       │      V\n\t *\t\t └──+    +───────────────┘ --- ─┼───────\n\t *\t\t     \\  /                       │\n\t *\t\t      \\/                        │\n\t *\t\t────────────────────────────────┼───────\n\t *\t\t                                ^\n\t *\n\t *\n\t *\t\t>┼────┼<  arrow height offset\n\t *\t\t │    │\n\t *\t\t │    ┌────────────────────────┐\n\t *\t\t │    │                        │\n\t *\t\t │   ╱                         │\n\t *\t\t │ ╱            Balloon        │\n\t *\t\t │ ╲            Content        │\n\t *\t\t │   ╲                         │\n\t *\t\t │    │                        │\n\t *\t\t │    └────────────────────────┘\n\t * ```\n\t *\n\t * @default 10\n\t*/\n\tpublic static arrowHeightOffset = 10;\n\n\t/**\n\t * A vertical offset of the balloon panel from the edge of the viewport if sticky.\n\t * It helps in accessing toolbar buttons underneath the balloon panel.\n\t *\n\t * ```\n\t *\t\t  ┌───────────────────────────────────────────────────┐\n\t *\t\t  │                      Target                       │\n\t *\t\t  │                                                   │\n\t *\t\t  │                            /── vertical offset    │\n\t *\t\t┌─────────────────────────────V─────────────────────────┐\n\t *\t\t│ Toolbar            ┌─────────────┐                    │\n\t *\t\t├────────────────────│   Balloon   │────────────────────┤\n\t *\t\t│ │                  └─────────────┘                  │ │\n\t *\t\t│ │                                                   │ │\n\t *\t\t│ │                                                   │ │\n\t *\t\t│ │                                                   │ │\n\t *\t\t│ └───────────────────────────────────────────────────┘ │\n\t *\t\t│                        Viewport                       │\n\t *\t\t└───────────────────────────────────────────────────────┘\n\t * ```\n\t *\n\t * @default 20\n\t */\n\tpublic static stickyVerticalOffset = 20;\n\n\t/**\n\t * Function used to calculate the optimal position for the balloon.\n\t */\n\tprivate static _getOptimalPosition = getOptimalPosition;\n\n\t/**\n\t * A default set of positioning functions used by the balloon panel view\n\t * when attaching using the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo} method.\n\t *\n\t * The available positioning functions are as follows:\n\t *\n\t * **North west**\n\t *\n\t * * `northWestArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t    V\n\t *\t\t    [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t         V\n\t *\t\t         [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t             V\n\t *\t\t             [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t                 V\n\t *\t\t                 [ Target ]\n\t * ```\n\t *\n\t * **North**\n\t *\n\t * * `northArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t    +-----------------+\n\t *\t\t    |     Balloon     |\n\t *\t\t    +-----------------+\n\t *\t\t     V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t +-----------------+\n\t *\t\t |     Balloon     |\n\t *\t\t +-----------------+\n\t *\t\t     V\n\t *\t\t[ Target ]\n\t * ```\n\t * * `northArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t         V\n\t *\t\t    [ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t             V\n\t *\t\t        [ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t                V\n\t *\t\t           [ Target ]\n\t * ```\n\t *\n\t * **North east**\n\t *\n\t * * `northEastArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t        +-----------------+\n\t *\t\t        |     Balloon     |\n\t *\t\t        +-----------------+\n\t *\t\t         V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t     +-----------------+\n\t *\t\t     |     Balloon     |\n\t *\t\t     +-----------------+\n\t *\t\t         V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t         V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t             V\n\t *\t\t    [ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t                 V\n\t *\t\t        [ Target ]\n\t * ```\n\t *\n\t * **South**\n\t *\n\t * * `southArrowNorthWest`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t     ^\n\t *\t\t    +-----------------+\n\t *\t\t    |     Balloon     |\n\t *\t\t    +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t   [ Target ]\n\t *\t\t        ^\n\t *\t\t    +-----------------+\n\t *\t\t    |     Balloon     |\n\t *\t\t    +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorth`\n\t *\n\t * ```\n\t *\t\t    [ Target ]\n\t *\t\t         ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t            [ Target ]\n\t *\t\t                 ^\n\t *\t\t   +-----------------+\n\t *\t\t   |     Balloon     |\n\t *\t\t   +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t            [ Target ]\n\t *\t\t                 ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **South west**\n\t *\n\t * * `southWestArrowNorthWest`\n\t *\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t     [ Target ]\n\t *\t\t     ^\n\t *\t\t +-----------------+\n\t *\t\t |     Balloon     |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorth`\n\t *\n\t * ```\n\t *\t\t         [ Target ]\n\t *\t\t         ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t              [ Target ]\n\t *\t\t              ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t                 [ Target ]\n\t *\t\t                 ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **South east**\n\t *\n\t * * `southEastArrowNorthWest`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t         ^\n\t *\t\t        +-----------------+\n\t *\t\t        |     Balloon     |\n\t *\t\t        +-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t   [ Target ]\n\t *\t\t            ^\n\t *\t\t        +-----------------+\n\t *\t\t        |     Balloon     |\n\t *\t\t        +-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorth`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t         ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t     [ Target ]\n\t *\t\t              ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t        [ Target ]\n\t *\t\t                 ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **West**\n\t *\n\t * * `westArrowEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |>[ Target ]\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **East**\n\t *\n\t * * `eastArrowWest`\n\t *\n\t * ```\n\t *\t\t           +-----------------+\n\t *\t\t[ Target ]<|     Balloon     |\n\t *\t\t           +-----------------+\n\t * ```\n\t *\n\t * **Sticky**\n\t *\n\t * * `viewportStickyNorth`\n\t *\n\t * ```\n\t *\t\t    +---------------------------+\n\t *\t\t    |        [ Target ]         |\n\t *\t\t    |                           |\n\t *\t\t+-----------------------------------+\n\t *\t\t|   |    +-----------------+    |   |\n\t *\t\t|   |    |     Balloon     |    |   |\n\t *\t\t|   |    +-----------------+    |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   +---------------------------+   |\n\t *\t\t|             Viewport              |\n\t *\t\t+-----------------------------------+\n\t * ```\n\t *\n\t * See {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo}.\n\t *\n\t * Positioning functions must be compatible with {@link module:utils/dom/position~DomPoint}.\n\t *\n\t * Default positioning functions with customized offsets can be generated using\n\t * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.generatePositions}.\n\t *\n\t * The name that the position function returns will be reflected in the balloon panel's class that\n\t * controls the placement of the \"arrow\". See {@link #position} to learn more.\n\t */\n\tpublic static defaultPositions: Record<string, PositioningFunction> = /* #__PURE__ */ BalloonPanelView.generatePositions();\n}\n\n/**\n * Returns the DOM element for given object or null, if there is none,\n * e.g. when the passed object is a Rect instance or so.\n */\nfunction getDomElement( object: any ): HTMLElement | null {\n\tif ( isElement( object ) ) {\n\t\treturn object;\n\t}\n\n\tif ( isRange( object ) ) {\n\t\treturn object.commonAncestorContainer as any;\n\t}\n\n\tif ( typeof object == 'function' ) {\n\t\treturn getDomElement( object() );\n\t}\n\n\treturn null;\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/**\n * @module ui/badge/badge\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tRect,\n\tDomEmitterMixin,\n\ttype DomOptimalPositionOptions,\n\ttype DomEmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { type View } from '../view.js';\nimport { BalloonPanelView } from '../panel/balloon/balloonpanelview.js';\n\nimport { throttle } from 'es-toolkit/compat';\n\n// ⚠ Note, whenever changing the threshold, make sure to update the docs/support/managing-ckeditor-logo.md docs\n// as this information is also mentioned there ⚠.\nconst NARROW_ROOT_HEIGHT_THRESHOLD = 50;\nconst NARROW_ROOT_WIDTH_THRESHOLD = 350;\n\nconst BadgeBase: DomEmitterMixinConstructor = /* #__PURE__ */ DomEmitterMixin();\n\n/**\n * A helper that enables the badge feature in the editor and renders a custom view next to the bottom of the editable element\n * (editor root, source editing area, etc.) when the editor is focused.\n *\n * @private\n */\nexport abstract class Badge extends BadgeBase {\n\t/**\n\t * Editor instance the helper was created for.\n\t */\n\tprotected readonly editor: Editor;\n\n\t/**\n\t * A reference to the balloon panel hosting and positioning the badge content.\n\t */\n\tprivate _balloonView: BalloonPanelView | null = null;\n\n\t/**\n\t * A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.\n\t */\n\tprivate _showBalloonThrottled = throttle( () => this._showBalloon(), 50, { leading: true } );\n\n\t/**\n\t * A reference to the last editable element (root, source editing area, etc.) focused by the user.\n\t * Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the\n\t * right element whether the user is typing or using the UI.\n\t */\n\tprivate _lastFocusedEditableElement: HTMLElement | null = null;\n\n\t/**\n\t * An additional CSS class added to the `BalloonView`.\n\t */\n\tprivate readonly _balloonClass: string | undefined;\n\n\t/**\n\t * Creates a badge for a given editor. The feature is initialized on Editor#ready\n\t * event.\n\t */\n\tprotected constructor( editor: Editor, options: { balloonClass?: string } = {} ) {\n\t\tsuper();\n\n\t\tthis.editor = editor;\n\t\tthis._balloonClass = options.balloonClass;\n\n\t\teditor.on( 'ready', () => this._handleEditorReady() );\n\t}\n\n\t/**\n\t * Destroys the badge along with its view.\n\t */\n\tpublic destroy(): void {\n\t\tconst balloon = this._balloonView;\n\n\t\tif ( balloon ) {\n\t\t\t// Balloon gets destroyed by the body collection.\n\t\t\t// The badge view gets destroyed by the balloon.\n\t\t\tballoon.unpin();\n\t\t\tthis._balloonView = null;\n\t\t}\n\n\t\tthis._showBalloonThrottled.cancel();\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Enables badge label once the editor (ui) is ready.\n\t */\n\tprotected _handleEditorReady(): void {\n\t\tconst editor = this.editor;\n\n\t\tif ( !this._isEnabled() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// No view means no body collection to append the badge balloon to.\n\t\tif ( !editor.ui.view ) {\n\t\t\treturn;\n\t\t}\n\n\t\teditor.ui.focusTracker.on( 'change:isFocused', ( evt, data, isFocused ) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\n\t\t\tif ( isFocused ) {\n\t\t\t\tthis._showBalloon();\n\t\t\t} else {\n\t\t\t\tthis._hideBalloon();\n\t\t\t}\n\t\t} );\n\n\t\teditor.ui.focusTracker.on( 'change:focusedElement', ( evt, data, focusedElement ) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\n\t\t\tif ( focusedElement ) {\n\t\t\t\tthis._showBalloon();\n\t\t\t}\n\t\t} );\n\n\t\teditor.ui.on( 'update', () => {\n\t\t\tthis._showBalloonThrottled();\n\t\t} );\n\t}\n\n\t/**\n\t * Returns normalized configuration for the badge.\n\t */\n\tprotected _getNormalizedConfig(): BadgeConfig {\n\t\treturn {\n\t\t\tside: this.editor.locale.contentLanguageDirection === 'ltr' ? 'right' : 'left',\n\t\t\tposition: 'border',\n\t\t\tverticalOffset: 0,\n\t\t\thorizontalOffset: 5\n\t\t};\n\t}\n\n\t/**\n\t * Creates the badge content.\n\t */\n\tprotected abstract _createBadgeContent(): View<HTMLElement>;\n\n\t/**\n\t * Enables the badge feature.\n\t */\n\tprotected abstract _isEnabled(): boolean;\n\n\t/**\n\t * Attempts to display the balloon with the badge view.\n\t */\n\tprivate _showBalloon(): void {\n\t\tconst attachOptions = this._getBalloonAttachOptions();\n\n\t\tif ( !attachOptions ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._balloonView ) {\n\t\t\tthis._balloonView = this._createBalloonView();\n\t\t}\n\n\t\tthis._balloonView.pin( attachOptions );\n\t}\n\n\t/**\n\t * Hides the badge balloon if already visible.\n\t */\n\tprivate _hideBalloon(): void {\n\t\tif ( this._balloonView ) {\n\t\t\tthis._balloonView.unpin();\n\t\t}\n\t}\n\n\t/**\n\t * Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}\n\t * with the badge view inside ready for positioning.\n\t */\n\tprivate _createBalloonView(): BalloonPanelView {\n\t\tconst editor = this.editor;\n\t\tconst balloon = new BalloonPanelView();\n\t\tconst view = this._createBadgeContent();\n\n\t\tballoon.content.add( view );\n\n\t\tif ( this._balloonClass ) {\n\t\t\tballoon.class = this._balloonClass;\n\t\t}\n\n\t\teditor.ui.view.body.add( balloon );\n\n\t\treturn balloon;\n\t}\n\n\t/**\n\t * Returns the options for attaching the balloon to the focused editable element.\n\t */\n\tprivate _getBalloonAttachOptions(): Partial<DomOptimalPositionOptions> | null {\n\t\tif ( !this._lastFocusedEditableElement ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst badgeConfig = this._getNormalizedConfig();\n\n\t\tconst positioningFunction = badgeConfig.side === 'right' ?\n\t\t\tgetLowerRightCornerPosition( this._lastFocusedEditableElement, badgeConfig ) :\n\t\t\tgetLowerLeftCornerPosition( this._lastFocusedEditableElement, badgeConfig );\n\n\t\treturn {\n\t\t\ttarget: this._lastFocusedEditableElement,\n\t\t\tpositions: [ positioningFunction ]\n\t\t};\n\t}\n\n\t/**\n\t * Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.\n\t */\n\tprivate _updateLastFocusedEditableElement(): void {\n\t\tconst editor = this.editor;\n\t\tconst isFocused = editor.ui.focusTracker.isFocused;\n\t\tconst focusedElement = editor.ui.focusTracker.focusedElement! as HTMLElement;\n\n\t\tif ( !isFocused || !focusedElement ) {\n\t\t\tthis._lastFocusedEditableElement = null;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst editableEditorElements = Array.from( editor.ui.getEditableElementsNames() ).map( name => {\n\t\t\treturn editor.ui.getEditableElement( name );\n\t\t} );\n\n\t\tif ( editableEditorElements.includes( focusedElement ) ) {\n\t\t\tthis._lastFocusedEditableElement = focusedElement;\n\t\t} else {\n\t\t\t// If it's none of the editable element, then the focus is somewhere in the UI. Let's display the badge\n\t\t\t// over the first element then.\n\t\t\tthis._lastFocusedEditableElement = editableEditorElements[ 0 ]!;\n\t\t}\n\t}\n}\n\nfunction getLowerRightCornerPosition( focusedEditableElement: HTMLElement, config: BadgeConfig ) {\n\treturn getLowerCornerPosition( focusedEditableElement, config, ( rootRect, balloonRect ) => {\n\t\treturn rootRect.left + rootRect.width - balloonRect.width - config.horizontalOffset;\n\t} );\n}\n\nfunction getLowerLeftCornerPosition( focusedEditableElement: HTMLElement, config: BadgeConfig ) {\n\treturn getLowerCornerPosition( focusedEditableElement, config, rootRect => rootRect.left + config.horizontalOffset );\n}\n\nfunction getLowerCornerPosition(\n\tfocusedEditableElement: HTMLElement,\n\tconfig: BadgeConfig,\n\tgetBalloonLeft: ( visibleEditableElementRect: Rect, balloonRect: Rect ) => number\n) {\n\treturn ( visibleEditableElementRect: Rect, balloonRect: Rect ) => {\n\t\tconst editableElementRect = new Rect( focusedEditableElement );\n\n\t\tif ( editableElementRect.width < NARROW_ROOT_WIDTH_THRESHOLD || editableElementRect.height < NARROW_ROOT_HEIGHT_THRESHOLD ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet balloonTop;\n\n\t\tif ( config.position === 'inside' ) {\n\t\t\tballoonTop = editableElementRect.bottom - balloonRect.height;\n\t\t}\n\t\telse {\n\t\t\tballoonTop = editableElementRect.bottom - balloonRect.height / 2;\n\t\t}\n\n\t\tballoonTop -= config.verticalOffset;\n\n\t\tconst balloonLeft = getBalloonLeft( editableElementRect, balloonRect );\n\n\t\t// Clone the editable element rect and place it where the balloon would be placed.\n\t\t// This will allow getVisible() to work from editable element's perspective (rect source).\n\t\t// and yield a result as if the balloon was on the same (scrollable) layer as the editable element.\n\t\tconst newBalloonPositionRect = visibleEditableElementRect\n\t\t\t.clone()\n\t\t\t.moveTo( balloonLeft, balloonTop )\n\t\t\t.getIntersection( balloonRect.clone().moveTo( balloonLeft, balloonTop ) )!;\n\n\t\tconst newBalloonPositionVisibleRect = newBalloonPositionRect.getVisible();\n\n\t\tif ( !newBalloonPositionVisibleRect || newBalloonPositionVisibleRect.getArea() < balloonRect.getArea() ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn {\n\t\t\ttop: balloonTop,\n\t\t\tleft: balloonLeft,\n\t\t\tname: `position_${ config.position }-side_${ config.side }`,\n\t\t\tconfig: {\n\t\t\t\twithArrow: false\n\t\t\t}\n\t\t};\n\t};\n}\n\n/**\n * The badge configuration options.\n **/\nexport interface BadgeConfig {\n\n\t/**\n\t * The position of the badge.\n\t *\n\t * * When `'inside'`, the badge will be displayed within the boundaries of the editing area.\n\t * * When `'border'`, the basge will be displayed over the bottom border of the editing area.\n\t *\n\t * @default 'border'\n\t */\n\tposition: 'inside' | 'border';\n\n\t/**\n\t * Allows choosing the side of the editing area where the badge will be displayed.\n\t *\n\t * **Note:** If {@link module:core/editor/editorconfig~EditorConfig#language `config.language`} is set to an RTL (right-to-left)\n\t * language, the side switches to `'left'` by default.\n\t *\n\t * @default 'right'\n\t */\n\tside: 'left' | 'right';\n\n\t/**\n\t * The vertical distance the badge can be moved away from its default position.\n\t *\n\t * **Note:** If `position` is `'border'`, the offset is measured from the (vertical) center of the badge.\n\t *\n\t * @default 5\n\t */\n\tverticalOffset: number;\n\n\t/**\n\t * The horizontal distance between the side of the editing root and the nearest side of the badge.\n\t *\n\t * @default 5\n\t */\n\thorizontalOffset: number;\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/**\n * @module ui/editorui/poweredby\n */\n\nimport { IconProjectLogo } from '@ckeditor/ckeditor5-icons';\nimport { parseBase64EncodedObject, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { View } from '../view.js';\nimport { Badge } from '../badge/badge.js';\nimport { IconView } from '../icon/iconview.js';\nimport type { Editor, PoweredByConfig } from '@ckeditor/ckeditor5-core';\n\nconst DEFAULT_LABEL = 'Powered by';\n\n/**\n * A helper that enables the \"powered by\" feature in the editor and renders a link to the project's\n * webpage next to the bottom of the editable element (editor root, source editing area, etc.) when the editor is focused.\n *\n * @private\n */\nexport class PoweredBy extends Badge {\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor, { balloonClass: 'ck-powered-by-balloon' } );\n\t}\n\n\t/**\n\t * Enables \"powered by\" label.\n\t */\n\tprotected override _isEnabled(): boolean {\n\t\tconst editor = this.editor;\n\t\tconst forceVisible = editor.config.get( 'ui.poweredBy.forceVisible' );\n\n\t\tif ( forceVisible ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst licenseKey = editor.config.get( 'licenseKey' )!;\n\n\t\tif ( licenseKey == 'GPL' ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst licenseContent = parseBase64EncodedObject( licenseKey.split( '.' )[ 1 ] );\n\n\t\tif ( !licenseContent ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn !licenseContent.whiteLabel;\n\t}\n\n\t/**\n\t * Creates a \"powered by\" badge content.\n\t */\n\tprotected override _createBadgeContent(): View<HTMLElement> {\n\t\treturn new PoweredByView( this.editor.locale, this._getNormalizedConfig().label );\n\t}\n\n\t/**\n\t * Returns the normalized configuration for the \"powered by\" badge.\n\t * It takes the user configuration into account and falls back to the default one.\n\t */\n\tprotected override _getNormalizedConfig(): Required<PoweredByConfig> {\n\t\tconst badgeConfig = super._getNormalizedConfig();\n\t\tconst userConfig = this.editor.config.get( 'ui.poweredBy' ) || {};\n\t\tconst position = userConfig.position || badgeConfig.position;\n\t\tconst verticalOffset = position === 'inside' ? 5 : badgeConfig.verticalOffset;\n\n\t\treturn {\n\t\t\tposition,\n\t\t\tside: userConfig.side || badgeConfig.side,\n\t\t\tlabel: userConfig.label === undefined ? DEFAULT_LABEL : userConfig.label,\n\t\t\tverticalOffset: userConfig.verticalOffset !== undefined ? userConfig.verticalOffset : verticalOffset,\n\t\t\thorizontalOffset: userConfig.horizontalOffset !== undefined ? userConfig.horizontalOffset : badgeConfig.horizontalOffset,\n\t\t\tforceVisible: !!userConfig.forceVisible\n\t\t};\n\t}\n}\n\n/**\n * A view displaying a \"powered by\" label and project logo wrapped in a link.\n */\nclass PoweredByView extends View<HTMLDivElement> {\n\t/**\n\t * Creates an instance of the \"powered by\" view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param label The label text.\n\t */\n\tconstructor( locale: Locale, label: string | null ) {\n\t\tsuper( locale );\n\n\t\tconst iconView = new IconView();\n\t\tconst bind = this.bindTemplate;\n\n\t\ticonView.set( {\n\t\t\tcontent: IconProjectLogo,\n\t\t\tisColorInherited: false\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-powered-by' ],\n\t\t\t\t'aria-hidden': true\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\thref: 'https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&' +\n\t\t\t\t\t\t\t'utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo',\n\t\t\t\t\t\ttarget: '_blank',\n\t\t\t\t\t\ttabindex: '-1'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t...label ? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttag: 'span',\n\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\tclass: [ 'ck', 'ck-powered-by__label' ]\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tchildren: [ label ]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t] : [],\n\t\t\t\t\t\ticonView\n\t\t\t\t\t],\n\t\t\t\t\ton: {\n\t\t\t\t\t\tdragstart: bind.to( evt => evt.preventDefault() )\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module ui/button/switchbuttonview\n */\n\nimport { View } from '../view.js';\nimport { ButtonView } from './buttonview.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The switch button view class.\n *\n * ```ts\n * const view = new SwitchButtonView();\n *\n * view.set( {\n * \twithText: true,\n * \tlabel: 'Switch me!'\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n */\nexport class SwitchButtonView extends ButtonView {\n\t/**\n\t * The toggle switch of the button.\n\t */\n\tpublic readonly toggleSwitchView: View;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.isToggleable = true;\n\t\tthis.toggleSwitchView = this._createToggleView();\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-switchbutton'\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.add( this.toggleSwitchView );\n\t}\n\n\t/**\n\t * Creates a toggle child view.\n\t */\n\tprivate _createToggleView() {\n\t\tconst toggleSwitchView = new View();\n\n\t\ttoggleSwitchView.setTemplate( {\n\t\t\ttag: 'span',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-button__toggle'\n\t\t\t\t]\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'span',\n\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-button__toggle__inner'\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\treturn toggleSwitchView;\n\t}\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/**\n * @module ui/button/filedialogbuttonview\n */\n\nimport { View } from '../view.js';\nimport { ButtonView } from './buttonview.js';\nimport type { ButtonExecuteEvent } from './button.js';\n\nimport type { Constructor, Locale, Mixed } from '@ckeditor/ckeditor5-utils';\nimport { ListItemButtonView } from './listitembuttonview.js';\n\n/**\n * Constructor returned by {@link ~FileDialogViewMixin}. Use it to name a mixin base class before extending it.\n *\n * ```ts\n * const MyFileDialogViewBase: FileDialogViewMixinConstructor<typeof BaseClass> = FileDialogViewMixin( BaseClass );\n *\n * class MyFileDialogView extends MyFileDialogViewBase {}\n * ```\n */\nexport type FileDialogViewMixinConstructor<Base extends Constructor<ButtonView>> = Mixed<Base, FileDialogButtonViewBase>;\n\nconst FileDialogButtonViewMixinBase: FileDialogViewMixinConstructor<typeof ButtonView> =\n\t/* #__PURE__ */ FileDialogViewMixin( ButtonView );\n\nconst FileDialogListItemButtonViewMixinBase: FileDialogViewMixinConstructor<typeof ListItemButtonView> =\n\t/* #__PURE__ */ FileDialogViewMixin( ListItemButtonView );\n\n/**\n * The file dialog button view.\n *\n * This component provides a button that opens the native file selection dialog.\n * It can be used to implement the UI of a file upload feature.\n *\n * ```ts\n * const view = new FileDialogButtonView( locale );\n *\n * view.set( {\n * \tacceptedType: 'image/*',\n * \tallowMultipleFiles: true\n * \tlabel: t( 'Insert image' ),\n * \ticon: imageIcon,\n * \ttooltip: true\n * } );\n *\n * view.on( 'done', ( evt, files ) => {\n * \tfor ( const file of Array.from( files ) ) {\n * \t\tconsole.log( 'Selected file', file );\n * \t}\n * } );\n * ```\n */\nexport class FileDialogButtonView extends FileDialogButtonViewMixinBase {}\n\n/**\n * The file dialog button view used in a lists.\n *\n * This component provides a button that opens the native file selection dialog.\n * It can be used to implement the UI of a file upload feature.\n *\n* ```ts\n * const view = new FileDialogListItemButtonView( locale );\n *\n * view.set( {\n * \tacceptedType: 'image/*',\n * \tallowMultipleFiles: true\n * \tlabel: t( 'Insert image' ),\n * \ticon: imageIcon,\n * \ttooltip: true\n * } );\n *\n * view.on( 'done', ( evt, files ) => {\n * \tfor ( const file of Array.from( files ) ) {\n * \t\tconsole.log( 'Selected file', file );\n * \t}\n * } );\n * ```\n */\nexport class FileDialogListItemButtonView extends FileDialogListItemButtonViewMixinBase {}\n\n/**\n * Mixin function that enhances a base button view class with file dialog functionality. It is used\n * to create a button view class that opens the native select file dialog when clicked.\n *\n * The enhanced view includes a button and a hidden file input. When the button is clicked, the file dialog is opened.\n * The mixin adds properties and methods to the base class to handle the file selection.\n *\n * @param view The base class to be enhanced with file dialog functionality.\n * @returns A new class that extends the base class and includes the file dialog functionality.\n */\nexport function FileDialogViewMixin<Base extends Constructor<ButtonView>>( view: Base ): FileDialogViewMixinConstructor<Base> {\n\tabstract class FileDialogView extends view implements FileDialogButtonViewBase {\n\t\t/**\n\t\t * A hidden `<input>` view used to execute file dialog.\n\t\t */\n\t\tprivate _fileInputView: FileInputView;\n\n\t\t/**\n\t\t * Accepted file types. Can be provided in form of file extensions, media type or one of:\n\t\t * * `audio/*`,\n\t\t * * `video/*`,\n\t\t * * `image/*`.\n\t\t *\n\t\t * @observable\n\t\t */\n\t\tdeclare public acceptedType: string;\n\n\t\t/**\n\t\t * Indicates if multiple files can be selected. Defaults to `true`.\n\t\t *\n\t\t * @observable\n\t\t */\n\t\tdeclare public allowMultipleFiles: boolean;\n\n\t\t/**\n\t\t * @inheritDoc\n\t\t */\n\t\tconstructor( ...args: Array<any> ) {\n\t\t\tsuper( ...args );\n\n\t\t\tthis._fileInputView = new FileInputView( this.locale );\n\t\t\tthis._fileInputView.bind( 'acceptedType' ).to( this );\n\t\t\tthis._fileInputView.bind( 'allowMultipleFiles' ).to( this );\n\n\t\t\tthis._fileInputView.delegate( 'done' ).to( this );\n\n\t\t\tthis.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\t\tthis._fileInputView.open();\n\t\t\t} );\n\n\t\t\tthis.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-file-dialog-button'\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * @inheritDoc\n\t\t */\n\t\tpublic override render(): void {\n\t\t\tsuper.render();\n\n\t\t\tthis.children.add( this._fileInputView );\n\t\t}\n\t}\n\n\treturn FileDialogView as any;\n}\n\n/**\n * Represents the base view for a file dialog button component.\n */\nexport type FileDialogButtonViewBase = View & {\n\n\t/**\n\t * Accepted file types. Can be provided in form of file extensions, media type or one of:\n\t * * `audio/*`,\n\t * * `video/*`,\n\t * * `image/*`.\n\t *\n\t * @observable\n\t */\n\tacceptedType: string;\n\n\t/**\n\t * Indicates if multiple files can be selected. Defaults to `true`.\n\t *\n\t * @observable\n\t */\n\tallowMultipleFiles: boolean;\n};\n\n/**\n * The hidden file input view class.\n */\nclass FileInputView extends View<HTMLInputElement> {\n\t/**\n\t * Accepted file types. Can be provided in form of file extensions, media type or one of:\n\t * * `audio/*`,\n\t * * `video/*`,\n\t * * `image/*`.\n\t *\n\t * @observable\n\t */\n\tdeclare public acceptedType?: string;\n\n\t/**\n\t * Indicates if multiple files can be selected. Defaults to `false`.\n\t *\n\t * @observable\n\t */\n\tdeclare public allowMultipleFiles: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( 'acceptedType', undefined );\n\t\tthis.set( 'allowMultipleFiles', false );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'input',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-hidden'\n\t\t\t\t],\n\t\t\t\ttype: 'file',\n\t\t\t\ttabindex: '-1',\n\t\t\t\taccept: bind.to( 'acceptedType' ),\n\t\t\t\tmultiple: bind.to( 'allowMultipleFiles' )\n\t\t\t},\n\n\t\t\ton: {\n\t\t\t\t// Removing from code coverage since we cannot programmatically set input element files.\n\t\t\t\tchange: bind.to( /* v8 ignore next -- @preserve */ () => {\n\t\t\t\t\tif ( this.element?.files?.length ) {\n\t\t\t\t\t\tthis.fire<FileInputViewDoneEvent>( 'done', this.element.files );\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.element!.value = '';\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Opens file dialog.\n\t */\n\tpublic open(): void {\n\t\tthis.element!.click();\n\t}\n}\n\n/**\n * Fired when file dialog is closed with file selected.\n *\n * ```ts\n * view.on( 'done', ( evt, files ) => {\n * \tfor ( const file of files ) {\n * \t\tconsole.log( 'Selected file', file );\n * \t}\n * }\n * ```\n */\nexport type FileInputViewDoneEvent = {\n\tname: 'done';\n\targs: [ files: FileList ];\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/**\n * @module ui/collapsible/collapsibleview\n */\n\nimport { IconDropdownArrow } from '@ckeditor/ckeditor5-icons';\nimport { View } from '../view.js';\nimport { ButtonView } from '../button/buttonview.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * A collapsible UI component. Consists of a labeled button and a container which can be collapsed\n * by clicking the button. The collapsible container can be a host to other UI views.\n *\n * @internal\n */\nexport class CollapsibleView extends View {\n\t/**\n\t * `true` when the container with {@link #children} is collapsed. `false` otherwise.\n\t *\n\t * @observable\n\t */\n\tdeclare public isCollapsed: boolean;\n\n\t/**\n\t * The text label of the {@link #buttonView}.\n\t *\n\t * @observable\n\t * @default 'Show more'\n\t */\n\tdeclare public label: string;\n\n\t/**\n\t * The ID of the label inside the {@link #buttonView} that describes the collapsible\n\t * container for assistive technologies. Set after the button was {@link #render rendered}.\n\t *\n\t * @internal\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _collapsibleAriaLabelUid: string | undefined;\n\n\t/**\n\t * The main button that, when clicked, collapses or expands the container with {@link #children}.\n\t */\n\tpublic readonly buttonView: ButtonView;\n\n\t/**\n\t * A collection of the child views that can be collapsed by clicking the {@link #buttonView}.\n\t */\n\tpublic readonly children: ViewCollection<FocusableView>;\n\n\t/**\n\t * Creates an instance of the collapsible view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param childViews An optional array of initial child views to be inserted into the collapsible.\n\t */\n\tconstructor( locale: Locale, childViews?: Array<FocusableView> ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isCollapsed', false );\n\t\tthis.set( 'label', '' );\n\n\t\tthis.buttonView = this._createButtonView();\n\t\tthis.children = this.createCollection();\n\n\t\tthis.set( '_collapsibleAriaLabelUid', undefined );\n\n\t\tif ( childViews ) {\n\t\t\tthis.children.addMany( childViews );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-collapsible',\n\t\t\t\t\tbind.if( 'isCollapsed', 'ck-collapsible_collapsed' )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tthis.buttonView,\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-collapsible__children'\n\t\t\t\t\t\t],\n\t\t\t\t\t\trole: 'region',\n\t\t\t\t\t\thidden: bind.if( 'isCollapsed', 'hidden' ),\n\t\t\t\t\t\t'aria-labelledby': bind.to( '_collapsibleAriaLabelUid' )\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.children\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis._collapsibleAriaLabelUid = this.buttonView.labelView.element!.id;\n\t}\n\n\t/**\n\t * Focuses the first focusable.\n\t */\n\tpublic focus(): void {\n\t\tthis.buttonView.focus();\n\t}\n\n\t/**\n\t * Creates the main {@link #buttonView} of the collapsible.\n\t */\n\tprivate _createButtonView() {\n\t\tconst buttonView = new ButtonView( this.locale );\n\t\tconst bind = buttonView.bindTemplate;\n\n\t\tbuttonView.set( {\n\t\t\twithText: true,\n\t\t\ticon: IconDropdownArrow\n\t\t} );\n\n\t\tbuttonView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\t'aria-expanded': bind.to( 'isOn', value => String( value ) )\n\t\t\t}\n\t\t} );\n\n\t\tbuttonView.bind( 'label' ).to( this );\n\t\tbuttonView.bind( 'isOn' ).to( this, 'isCollapsed', isCollapsed => !isCollapsed );\n\n\t\tbuttonView.on( 'execute', () => {\n\t\t\tthis.isCollapsed = !this.isCollapsed;\n\t\t} );\n\n\t\treturn buttonView;\n\t}\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/**\n * @module ui/colorgrid/utils\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nexport type ColorOption = string | {\n\tcolor: string;\n\tlabel?: string;\n\thasBorder?: boolean;\n};\n\nexport interface NormalizedColorOption {\n\tmodel: string;\n\tlabel: string;\n\thasBorder: boolean;\n\tview: {\n\t\tname: string;\n\t\tstyles: {\n\t\t\tcolor: string;\n\t\t};\n\t};\n}\n\n/**\n * Returns color configuration options as defined in `editor.config.(fontColor|fontBackgroundColor).colors` or\n * `editor.config.table.(tableProperties|tableCellProperties).(background|border).colors\n * but processed to account for editor localization in the correct language.\n *\n * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n * when the user configuration is defined because the editor does not exist yet.\n *\n * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n */\nexport function getLocalizedColorOptions(\n\tlocale: Locale,\n\toptions: Array<NormalizedColorOption>\n): Array<NormalizedColorOption> {\n\tconst t = locale.t;\n\tconst localizedColorNames: Record<string, string | undefined> = {\n\t\tBlack: t( 'Black' ),\n\t\t'Dim grey': t( 'Dim grey' ),\n\t\tGrey: t( 'Grey' ),\n\t\t'Light grey': t( 'Light grey' ),\n\t\tWhite: t( 'White' ),\n\t\tRed: t( 'Red' ),\n\t\tOrange: t( 'Orange' ),\n\t\tYellow: t( 'Yellow' ),\n\t\t'Light green': t( 'Light green' ),\n\t\tGreen: t( 'Green' ),\n\t\tAquamarine: t( 'Aquamarine' ),\n\t\tTurquoise: t( 'Turquoise' ),\n\t\t'Light blue': t( 'Light blue' ),\n\t\tBlue: t( 'Blue' ),\n\t\tPurple: t( 'Purple' )\n\t};\n\n\treturn options.map( colorOption => {\n\t\tconst label = localizedColorNames[ colorOption.label ];\n\n\t\tif ( label && label != colorOption.label ) {\n\t\t\tcolorOption.label = label;\n\t\t}\n\n\t\treturn colorOption;\n\t} );\n}\n\n/**\n * Creates a unified color definition object from color configuration options.\n * The object contains the information necessary to both render the UI and initialize the conversion.\n */\nexport function normalizeColorOptions( options: Array<ColorOption> ): Array<NormalizedColorOption> {\n\treturn options\n\t\t.map( normalizeSingleColorDefinition )\n\t\t.filter( option => !!option );\n}\n\n/**\n * Creates a normalized color definition from the user-defined configuration.\n * The \"normalization\" means it will create full\n * {@link module:ui/colorgrid/colorgridview~ColorDefinition `ColorDefinition-like`}\n * object for string values, and add a `view` property, for each definition.\n */\nexport function normalizeSingleColorDefinition( color: ColorOption ): NormalizedColorOption {\n\tif ( typeof color === 'string' ) {\n\t\treturn {\n\t\t\tmodel: color,\n\t\t\tlabel: color,\n\t\t\thasBorder: false,\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tstyles: {\n\t\t\t\t\tcolor\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\tmodel: color.color,\n\t\t\tlabel: color.label || color.color,\n\t\t\thasBorder: color.hasBorder === undefined ? false : color.hasBorder,\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tstyles: {\n\t\t\t\t\tcolor: `${ color.color }`\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\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/**\n * @module ui/colorgrid/colortileview\n */\n\nimport { IconColorTileCheck } from '@ckeditor/ckeditor5-icons';\nimport { env, type Locale } from '@ckeditor/ckeditor5-utils';\nimport { ButtonView } from '../button/buttonview.js';\n\n/**\n * This class represents a single color tile in the {@link module:ui/colorgrid/colorgridview~ColorGridView}.\n */\nexport class ColorTileView extends ButtonView {\n\t/**\n\t * String representing a color shown as tile's background.\n\t */\n\tdeclare public color: string | undefined;\n\n\t/**\n\t * A flag that toggles a special CSS class responsible for displaying\n\t * a border around the button.\n\t */\n\tdeclare public hasBorder: boolean;\n\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'color', undefined );\n\t\tthis.set( 'hasBorder', false );\n\n\t\tthis.icon = IconColorTileCheck;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tstyle: {\n\t\t\t\t\t// https://github.com/ckeditor/ckeditor5/issues/14907\n\t\t\t\t\tbackgroundColor: bind.to( 'color', color => env.isMediaForcedColors ? null : color )\n\t\t\t\t},\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-grid__tile',\n\t\t\t\t\tbind.if( 'hasBorder', 'ck-color-selector__color-tile_bordered' )\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.iconView.fillColor = 'hsl(0, 0%, 100%)';\n\t}\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/**\n * @module ui/colorgrid/colorgridview\n */\n\nimport { View } from '../view.js';\nimport { ColorTileView } from './colortileview.js';\nimport { addKeyboardHandlingForGrid } from '../bindings/addkeyboardhandlingforgrid.js';\n\nimport type { ButtonExecuteEvent } from '../button/button.js';\nimport { type DropdownPanelFocusable } from '../dropdown/dropdownpanelfocusable.js';\nimport { type ViewCollection } from '../viewcollection.js';\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\ttype CollectionAddEvent,\n\ttype CollectionRemoveEvent,\n\ttype Locale,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * A grid of {@link module:ui/colorgrid/colortileview~ColorTileView color tiles}.\n */\nexport class ColorGridView extends View implements DropdownPanelFocusable {\n\t/**\n\t * A number of columns for the tiles grid.\n\t */\n\tpublic readonly columns: number;\n\n\t/**\n\t * Collection of the child tile views.\n\t */\n\tpublic readonly items: ViewCollection<ColorTileView>;\n\n\t/**\n\t * Tracks information about DOM focus in the grid.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * The color of the currently selected color tile in {@link #items}.\n\t *\n\t * @observable\n\t */\n\tdeclare public selectedColor: string | undefined | null;\n\n\t/**\n\t * Creates an instance of a color grid containing {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t *\n\t * @fires execute\n\t * @param locale The localization services instance.\n\t * @param options Component configuration\n\t * @param options.colorDefinitions Array with definitions\n\t * required to create the {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t * @param options.columns A number of columns to display the tiles.\n\t */\n\tconstructor(\n\t\tlocale?: Locale,\n\t\toptions?: {\n\t\t\tcolorDefinitions?: Array<ColorDefinition>;\n\t\t\tcolumns?: number;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst colorDefinitions = options && options.colorDefinitions ? options.colorDefinitions : [];\n\n\t\tthis.columns = options?.columns || 5;\n\n\t\tconst viewStyleAttribute = {\n\t\t\tgridTemplateColumns: `repeat( ${ this.columns }, 1fr)`\n\t\t};\n\n\t\tthis.set( 'selectedColor', undefined );\n\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\tthis.items.on<CollectionAddEvent<ColorTileView>>( 'add', ( evt, colorTile ) => {\n\t\t\tcolorTile.isOn = colorTile.color === this.selectedColor;\n\t\t} );\n\n\t\tcolorDefinitions.forEach( color => {\n\t\t\tconst colorTile = new ColorTileView();\n\n\t\t\tcolorTile.set( {\n\t\t\t\tcolor: color.color,\n\t\t\t\tlabel: color.label,\n\t\t\t\ttooltip: true,\n\t\t\t\thasBorder: color.options.hasBorder\n\t\t\t} );\n\n\t\t\tcolorTile.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\t\tthis.fire<ColorGridViewExecuteEvent>( 'execute', {\n\t\t\t\t\tvalue: color.color,\n\t\t\t\t\thasBorder: color.options.hasBorder,\n\t\t\t\t\tlabel: color.label\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tthis.items.add( colorTile );\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tchildren: this.items,\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-grid'\n\t\t\t\t],\n\t\t\t\tstyle: viewStyleAttribute\n\t\t\t}\n\t\t} );\n\n\t\tthis.on<ObservableChangeEvent<string | undefined>>( 'change:selectedColor', ( evt, name, selectedColor ) => {\n\t\t\tfor ( const item of this.items ) {\n\t\t\t\titem.isOn = item.color === selectedColor;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the first focusable in {@link #items}.\n\t */\n\tpublic focus(): void {\n\t\tif ( this.items.length ) {\n\t\t\tthis.items.first!.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the last focusable in {@link #items}.\n\t */\n\tpublic focusLast(): void {\n\t\tif ( this.items.length ) {\n\t\t\tthis.items.last!.focus();\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Items added before rendering should be known to the #focusTracker.\n\t\tfor ( const item of this.items ) {\n\t\t\tthis.focusTracker.add( item.element! );\n\t\t}\n\n\t\tthis.items.on<CollectionAddEvent<ColorTileView>>( 'add', ( evt, item ) => {\n\t\t\tthis.focusTracker.add( item.element! );\n\t\t} );\n\n\t\tthis.items.on<CollectionRemoveEvent<ColorTileView>>( 'remove', ( evt, item ) => {\n\t\t\tthis.focusTracker.remove( item.element! );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\taddKeyboardHandlingForGrid( {\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tgridItems: this.items,\n\t\t\tnumberOfColumns: this.columns,\n\t\t\tuiLanguageDirection: this.locale?.uiLanguageDirection\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n}\n\n/**\n * A color definition used to create a {@link module:ui/colorgrid/colortileview~ColorTileView}.\n *\n * ```json\n * {\n * \tcolor: 'hsl(0, 0%, 75%)',\n * \tlabel: 'Light Grey',\n * \toptions: {\n * \t\thasBorder: true\n * \t}\n * }\n * ```\n */\nexport interface ColorDefinition {\n\n\t/**\n\t * String representing a color.\n\t * It is used as value of background-color style in {@link module:ui/colorgrid/colortileview~ColorTileView}.\n\t */\n\tcolor: string;\n\n\t/**\n\t * String used as label for {@link module:ui/colorgrid/colortileview~ColorTileView}.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Additional options passed to create a {@link module:ui/colorgrid/colortileview~ColorTileView}.\n\t */\n\toptions: {\n\n\t\t/**\n\t\t * A flag that indicates if special a CSS class should be added\n\t\t * to {@link module:ui/colorgrid/colortileview~ColorTileView}, which renders a border around it.\n\t\t */\n\t\thasBorder: boolean;\n\t};\n}\n\n/**\n * Fired when the `ColorTileView` for the picked item is executed.\n *\n * @eventName ~ColorGridView#execute\n * @param data Additional information about the event.\n*/\nexport type ColorGridViewExecuteEvent = {\n\tname: 'execute';\n\targs: [ data: ColorGridViewExecuteEventData ];\n};\n\n/**\n * The data of {@link ~ColorGridViewExecuteEvent execute event}.\n */\nexport interface ColorGridViewExecuteEventData {\n\n\t/**\n\t * The value of the selected color ({@link module:ui/colorgrid/colorgridview~ColorDefinition#color `color.color`}).\n\t */\n\tvalue: string;\n\n\t/**\n\t * The `hasBorder` property of the selected color\n\t * ({@link module:ui/colorgrid/colorgridview~ColorDefinition#options `color.options.hasBorder`}).\n\t */\n\thasBorder: boolean;\n\n\t/**\n\t * The label of the selected color ({@link module:ui/colorgrid/colorgridview~ColorDefinition#label `color.label`})\n\t */\n\tlabel: string;\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/**\n * @module ui/colorpicker/utils\n */\n\nimport { default as parse } from 'color-parse';\nimport convert from 'color-convert';\nimport type {\n\tRGB, HSL, HSV, HWB, CMYK, XYZ, LAB, LCH, HEX, KEYWORD, ANSI16, ANSI256, HCG, APPLE, GRAY\n} from 'color-convert/conversions.js';\n\n/**\n * Color formats handled by color converter.\n */\nexport type ColorPickerOutputFormat = 'hex' | 'rgb' | 'hsl' | 'hwb' | 'lab' | 'lch';\n\n/**\n * Configuration of the color picker feature.\n *\n * It can be forced to apply colors in the editor in a particular format.\n *\n * @default `{\n * \tformat: 'hsl'\n * }`\n */\nexport type ColorPickerConfig = {\n\tformat?: ColorPickerOutputFormat;\n};\n\n/**\n * Configuration of the color picker view.\n *\n * It can be used to enforce a particular color format or hide the color input.\n */\nexport type ColorPickerViewConfig = ColorPickerConfig & {\n\thideInput?: boolean;\n};\n\n/**\n * Parses and converts the color string to requested format. Handles variety of color spaces\n * like `hsl`, `hex` or `rgb`.\n *\n * @param color\n * @returns A color string.\n * @internal\n */\nexport function convertColor( color: string, outputFormat: ColorPickerOutputFormat ): string {\n\tif ( !color ) {\n\t\treturn '';\n\t}\n\n\tconst colorObject = parseColorString( color );\n\n\tif ( !colorObject ) {\n\t\treturn '';\n\t}\n\n\tif ( colorObject.space === outputFormat ) {\n\t\treturn color;\n\t}\n\n\tif ( !canConvertParsedColor( colorObject ) ) {\n\t\treturn '';\n\t}\n\n\tconst fromColorSpace = ( convert as Conversion )[ colorObject.space ];\n\tconst toColorSpace = fromColorSpace[ outputFormat ];\n\n\tif ( !toColorSpace ) {\n\t\treturn '';\n\t}\n\n\tconst convertedColorChannels = toColorSpace( colorObject.space === 'hex' ? colorObject.hexValue : colorObject.values );\n\n\treturn formatColorOutput( convertedColorChannels, outputFormat );\n}\n\n/**\n * Converts a color string to hex format.\n *\n * @param color\n * @returns A color string.\n * @internal\n */\nexport function convertToHex( color: string ): string {\n\tif ( !color ) {\n\t\treturn '';\n\t}\n\n\tconst colorObject = parseColorString( color );\n\n\tif ( !colorObject ) {\n\t\treturn '#000';\n\t}\n\n\tif ( colorObject.space === 'hex' ) {\n\t\treturn colorObject.hexValue;\n\t}\n\n\treturn convertColor( color, 'hex' );\n}\n\n/**\n * Registers the custom element in the\n * [CustomElementsRegistry](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry).\n * @internal\n */\nexport function registerCustomElement( elementName: string, constructor: CustomElementConstructor ): void {\n\tif ( customElements.get( elementName ) === undefined ) {\n\t\tcustomElements.define( elementName, constructor );\n\t}\n}\n\n/**\n * Formats the passed color channels according to the requested format.\n *\n * @param values\n * @param format\n * @returns A color string.\n */\nfunction formatColorOutput( values: FormatTableColor, format: ColorPickerOutputFormat ): string {\n\tswitch ( format ) {\n\t\tcase 'hex': return `#${ values }`;\n\t\tcase 'rgb': return `rgb(${ values[ 0 ] }, ${ values[ 1 ] }, ${ values[ 2 ] })`;\n\t\tcase 'hsl': return `hsl(${ values[ 0 ] }, ${ values[ 1 ] }%, ${ values[ 2 ] }%)`;\n\t\tcase 'hwb': return `hwb(${ values[ 0 ] }, ${ values[ 1 ] }, ${ values[ 2 ] })`;\n\t\tcase 'lab': return `lab(${ values[ 0 ] }% ${ values[ 1 ] } ${ values[ 2 ] })`;\n\t\tcase 'lch': return `lch(${ values[ 0 ] }% ${ values[ 1 ] } ${ values[ 2 ] })`;\n\n\t\tdefault: return '';\n\t}\n}\n\ntype FormatTableColor = HEX | RGB | HSL | HWB | LAB | LCH;\ntype ConversionFunctionInput = RGB | HSL | HSV | HWB | CMYK | XYZ | LAB | LCH | HEX | KEYWORD | ANSI16 | ANSI256 | HCG | APPLE | GRAY;\ntype ConversionInputSpaces = typeof convert;\ntype ConversionFunction = ( value: ConversionFunctionInput ) => FormatTableColor;\ntype Conversion = Record<keyof ConversionInputSpaces, Partial<Record<ColorPickerOutputFormat, ConversionFunction>>>;\n\ntype ParserColorSpaces =\n\t'rgb' | 'hsl' | 'hsv' | 'hsb' | 'hwb' | 'cmy' | 'cmyk' | 'xyz' | 'xyy' | 'gray' | 'lab' | 'lch' | 'lchu' | 'lchv' | 'lchuv' |\n\t'luv' | 'yuv' | 'lms' | 'hex';\n\ntype ParsedColor<T extends ParserColorSpaces> = {\n\treadonly space: T;\n\treadonly alpha: number;\n\treadonly values: T extends 'cmyk' ? [ number, number, number, number ] : [ number, number, number ];\n\treadonly hexValue: T extends 'hex' ? string : never;\n};\n\ntype ConvertableParsedColor = ParsedColor<ParserColorSpaces> & {\n\treadonly space: keyof ConversionInputSpaces;\n};\n\nfunction parseColorString( colorString: string ): ParsedColor<ParserColorSpaces> | null {\n\t// Parser library treats `hex` format as belonging to `rgb` space | which messes up further conversion.\n\t// Let's parse such strings on our own.\n\tif ( colorString.startsWith( '#' ) ) {\n\t\tconst parsedHex = parse( colorString );\n\n\t\treturn {\n\t\t\tspace: 'hex',\n\t\t\tvalues: parsedHex.values as [ number, number, number ],\n\t\t\thexValue: colorString,\n\t\t\talpha: parsedHex.alpha\n\t\t};\n\t}\n\n\tconst parsed = parse( colorString );\n\n\tif ( !parsed.space ) {\n\t\treturn null;\n\t}\n\n\treturn parsed as ParsedColor<Exclude<ParserColorSpaces, 'hex'>>;\n}\n\nfunction canConvertParsedColor( parsedColor: ParsedColor<ParserColorSpaces> ): parsedColor is ConvertableParsedColor {\n\treturn Object.keys( convert ).includes( parsedColor.space );\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/**\n * @module ui/labeledfield/labeledfieldview\n */\n\nimport { View } from '../view.js';\nimport { LabelView } from '../label/labelview.js';\n\nimport type { FocusableView } from '../focuscycler.js';\nimport { type ViewCollection } from '../viewcollection.js';\n\nimport { uid, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The labeled field view class. It can be used to enhance any view with the following features:\n *\n * * a label,\n * * (optional) an error message,\n * * (optional) an info (status) text,\n *\n * all bound logically by proper DOM attributes for UX and accessibility.  It also provides an interface\n * (e.g. observable properties) that allows controlling those additional features.\n *\n * The constructor of this class requires a callback that returns a view to be labeled. The callback\n * is called with unique ids that allow binding of DOM properties:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, ( labeledFieldView, viewUid, statusUid ) => {\n * \tconst inputView = new InputTextView( labeledFieldView.locale );\n *\n * \tinputView.set( {\n * \t\tid: viewUid,\n * \t\tariaDescribedById: statusUid\n * \t} );\n *\n * \tinputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n * \tinputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n *\n * \treturn inputView;\n * } );\n *\n * labeledInputView.label = 'User name';\n * labeledInputView.infoText = 'Full name like for instance, John Doe.';\n * labeledInputView.render();\n *\n * document.body.append( labeledInputView.element );\n * ```\n *\n * See {@link module:ui/labeledfield/utils} to discover ready–to–use labeled input helpers for common\n * UI components.\n */\nexport class LabeledFieldView<TFieldView extends FocusableView = FocusableView> extends View {\n\t/**\n\t * The field view that gets labeled.\n\t */\n\tpublic readonly fieldView: TFieldView;\n\n\t/**\n\t * The label view instance that describes the entire view.\n\t */\n\tpublic readonly labelView: LabelView;\n\n\t/**\n\t * The status view for the {@link #fieldView}. It displays {@link #errorText} and\n\t * {@link #infoText}.\n\t */\n\tpublic readonly statusView: View;\n\n\t/**\n\t * A collection of children of the internal wrapper element. Allows inserting additional DOM elements (views) next to\n\t * the {@link #fieldView} for easy styling (e.g. positioning).\n\t *\n\t * By default, the collection contains {@link #fieldView} and {@link #labelView}.\n\t */\n\tpublic readonly fieldWrapperChildren: ViewCollection;\n\n\t/**\n\t * The text of the label.\n\t *\n\t * @observable\n\t */\n\tdeclare public label: string | undefined;\n\n\t/**\n\t * Controls whether the component is in read-only mode.\n\t *\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * An observable flag set to `true` when {@link #fieldView} is empty (`false` otherwise).\n\t *\n\t * @readonly\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isEmpty: boolean;\n\n\t/**\n\t * An observable flag set to `true` when {@link #fieldView} is currently focused by\n\t * the user (`false` otherwise).\n\t *\n\t * @readonly\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isFocused: boolean;\n\n\t/**\n\t * The validation error text. When set, it will be displayed\n\t * next to the {@link #fieldView} as a typical validation error message.\n\t * Set it to `null` to hide the message.\n\t *\n\t * **Note:** Setting this property to anything but `null` will automatically\n\t * make the `hasError` of the {@link #fieldView} `true`.\n\t *\n\t * @observable\n\t */\n\tdeclare public errorText: string | null;\n\n\t/**\n\t * The additional information text displayed next to the {@link #fieldView} which can\n\t * be used to inform the user about its purpose, provide help or hints.\n\t *\n\t * Set it to `null` to hide the message.\n\t *\n\t * **Note:** This text will be displayed in the same place as {@link #errorText} but the\n\t * latter always takes precedence: if the {@link #errorText} is set, it replaces\n\t * {@link #infoText}.\n\t *\n\t * @observable\n\t * @default null\n\t */\n\tdeclare public infoText: string | null;\n\n\t/**\n\t * (Optional) The additional CSS class set on the dropdown {@link #element}.\n\t *\n\t * @observable\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * The content of the `placeholder` attribute of the {@link #fieldView}.\n\t *\n\t * @observable\n\t */\n\tdeclare public placeholder: string | undefined;\n\n\t/**\n\t * The combined status text made of {@link #errorText} and {@link #infoText}.\n\t * Note that when present, {@link #errorText} always takes precedence in the\n\t * status.\n\t *\n\t * @see #errorText\n\t * @see #infoText\n\t * @see #statusView\n\t * @private\n\t * @observable\n\t */\n\tdeclare public _statusText: string | null;\n\n\t/**\n\t * Creates an instance of the labeled field view class using a provided creator function\n\t * that provides the view to be labeled.\n\t *\n\t * @param locale The locale instance.\n\t * @param viewCreator A function that returns a {@link module:ui/view~View}\n\t * that will be labeled. The following arguments are passed to the creator function:\n\t *\n\t * * an instance of the `LabeledFieldView` to allow binding observable properties,\n\t * * an UID string that connects the {@link #labelView label} and the labeled field view in DOM,\n\t * * an UID string that connects the {@link #statusView status} and the labeled field view in DOM.\n\t */\n\tconstructor(\n\t\tlocale: Locale | undefined,\n\t\tviewCreator: LabeledFieldViewCreator<TFieldView>\n\t) {\n\t\tsuper( locale );\n\n\t\tconst viewUid = `ck-labeled-field-view-${ uid() }`;\n\t\tconst statusUid = `ck-labeled-field-view-status-${ uid() }`;\n\n\t\tthis.fieldView = viewCreator( this, viewUid, statusUid );\n\n\t\tthis.set( 'label', undefined );\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'isEmpty', true );\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'errorText', null );\n\t\tthis.set( 'infoText', null );\n\t\tthis.set( 'class', undefined );\n\t\tthis.set( 'placeholder', undefined );\n\n\t\tthis.labelView = this._createLabelView( viewUid );\n\t\tthis.statusView = this._createStatusView( statusUid );\n\t\tthis.fieldWrapperChildren = this.createCollection( [ this.fieldView, this.labelView ] );\n\n\t\tthis.bind( '_statusText' ).to(\n\t\t\tthis, 'errorText',\n\t\t\tthis, 'infoText',\n\t\t\t( errorText, infoText ) => errorText || infoText\n\t\t);\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-labeled-field-view',\n\t\t\t\t\tbind.to( 'class' ),\n\t\t\t\t\tbind.if( 'isEnabled', 'ck-disabled', value => !value ),\n\t\t\t\t\tbind.if( 'isEmpty', 'ck-labeled-field-view_empty' ),\n\t\t\t\t\tbind.if( 'isFocused', 'ck-labeled-field-view_focused' ),\n\t\t\t\t\tbind.if( 'placeholder', 'ck-labeled-field-view_placeholder' ),\n\t\t\t\t\tbind.if( 'errorText', 'ck-error' )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-labeled-field-view__input-wrapper'\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.fieldWrapperChildren\n\t\t\t\t},\n\t\t\t\tthis.statusView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Creates label view class instance and bind with view.\n\t *\n\t * @param id Unique id to set as labelView#for attribute.\n\t */\n\tprivate _createLabelView( id: string ): LabelView {\n\t\tconst labelView = new LabelView( this.locale );\n\n\t\tlabelView.for = id;\n\t\tlabelView.bind( 'text' ).to( this, 'label' );\n\n\t\treturn labelView;\n\t}\n\n\t/**\n\t * Creates the status view instance. It displays {@link #errorText} and {@link #infoText}\n\t * next to the {@link #fieldView}. See {@link #_statusText}.\n\t *\n\t * @param statusUid Unique id of the status, shared with the {@link #fieldView view's}\n\t * `aria-describedby` attribute.\n\t */\n\tprivate _createStatusView( statusUid: string ): View {\n\t\tconst statusView = new View( this.locale );\n\t\tconst bind = this.bindTemplate;\n\n\t\tstatusView.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-labeled-field-view__status',\n\t\t\t\t\tbind.if( 'errorText', 'ck-labeled-field-view__status_error' ),\n\t\t\t\t\tbind.if( '_statusText', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\tid: statusUid,\n\t\t\t\trole: bind.if( 'errorText', 'alert' )\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: bind.to( '_statusText' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\treturn statusView;\n\t}\n\n\t/**\n\t * Focuses the {@link #fieldView}.\n\t */\n\tpublic focus( direction?: 1 | -1 ): void {\n\t\tthis.fieldView.focus( direction );\n\t}\n}\n\n/**\n * A creator function that returns a focusable view to be labeled by a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView}\n * instance.\n */\nexport type LabeledFieldViewCreator<TFieldView extends FocusableView> =\n\t( labeledFieldView: LabeledFieldView, viewUid: string, statusUid: string ) => TFieldView;\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/**\n * @module ui/input/inputbase\n */\n\nimport { View } from '../view.js';\n\nimport {\n\tFocusTracker,\n\ttype Locale,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * The base input view class.\n */\nexport abstract class InputBase<TElement extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement> extends View<TElement> {\n\t/**\n\t * Stores information about the editor UI focus and propagates it so various plugins and components\n\t * are unified as a focus group.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * The value of the input.\n\t *\n\t * @observable\n\t */\n\tdeclare public value: string | undefined;\n\n\t/**\n\t * The `id` attribute of the input (i.e. to pair with a `<label>` element).\n\t *\n\t * @observable\n\t */\n\tdeclare public id: string | undefined;\n\n\t/**\n\t * The `placeholder` attribute of the input.\n\t *\n\t * @observable\n\t */\n\tdeclare public placeholder: string | undefined;\n\n\t/**\n\t * The `tabindex` attribute of the input.\n\t *\n\t * @observable\n\t */\n\tdeclare public tabIndex: number | undefined;\n\n\t/**\n\t * The `aria-label` attribute of the input.\n\t *\n\t * @observable\n\t */\n\tdeclare public ariaLabel: string | undefined;\n\n\t/**\n\t * Controls whether the input view is in read-only mode.\n\t *\n\t * @observable\n\t */\n\tdeclare public isReadOnly: boolean;\n\n\t/**\n\t * Set to `true` when the field has some error. Usually controlled via\n\t * {@link module:ui/labeledinput/labeledinputview~LabeledInputView#errorText}.\n\t *\n\t * @observable\n\t */\n\tdeclare public hasError: boolean;\n\n\t/**\n\t * The `id` of the element describing this field, e.g. when it has\n\t * some error; it helps screen readers read the error text.\n\t *\n\t * @observable\n\t */\n\tdeclare public ariaDescribedById: string | undefined;\n\n\t/**\n\t * An observable flag set to `true` when the input is currently focused by the user.\n\t * Set to `false` otherwise.\n\t *\n\t * @readonly\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isFocused: boolean;\n\n\t/**\n\t * An observable flag set to `true` when the input contains no text, i.e.\n\t * when {@link #value} is `''`, `null`, or `false`.\n\t *\n\t * @readonly\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isEmpty: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( 'value', undefined );\n\t\tthis.set( 'id', undefined );\n\t\tthis.set( 'placeholder', undefined );\n\t\tthis.set( 'tabIndex', undefined );\n\t\tthis.set( 'isReadOnly', false );\n\t\tthis.set( 'hasError', false );\n\t\tthis.set( 'ariaDescribedById', undefined );\n\t\tthis.set( 'ariaLabel', undefined );\n\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.bind( 'isFocused' ).to( this.focusTracker );\n\t\tthis.set( 'isEmpty', true );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'input',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-input',\n\t\t\t\t\tbind.if( 'isFocused', 'ck-input_focused' ),\n\t\t\t\t\tbind.if( 'isEmpty', 'ck-input-text_empty' ),\n\t\t\t\t\tbind.if( 'hasError', 'ck-error' )\n\t\t\t\t],\n\t\t\t\tid: bind.to( 'id' ),\n\t\t\t\tplaceholder: bind.to( 'placeholder' ),\n\t\t\t\ttabindex: bind.to( 'tabIndex' ),\n\t\t\t\treadonly: bind.to( 'isReadOnly' ),\n\t\t\t\t'aria-invalid': bind.if( 'hasError', true ),\n\t\t\t\t'aria-describedby': bind.to( 'ariaDescribedById' ),\n\t\t\t\t'aria-label': bind.to( 'ariaLabel' )\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tinput: bind.to( ( ...args ) => {\n\t\t\t\t\tthis.fire( 'input', ...args );\n\t\t\t\t\tthis._updateIsEmpty();\n\t\t\t\t} ),\n\t\t\t\tchange: bind.to( this._updateIsEmpty.bind( this ) )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.focusTracker.add( this.element! );\n\n\t\tthis._setDomElementValue( this.value );\n\t\tthis._updateIsEmpty();\n\n\t\t// Bind `this.value` to the DOM element's value.\n\t\t// We cannot use `value` DOM attribute because removing it on Edge does not clear the DOM element's value property.\n\t\tthis.on<ObservableChangeEvent>( 'change:value', ( evt, name, value ) => {\n\t\t\tthis._setDomElementValue( value );\n\t\t\tthis._updateIsEmpty();\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t}\n\n\t/**\n\t * Moves the focus to the input and selects the value.\n\t */\n\tpublic select(): void {\n\t\tthis.element!.select();\n\t}\n\n\t/**\n\t * Focuses the input.\n\t */\n\tpublic focus(): void {\n\t\tthis.element!.focus();\n\t}\n\n\t/**\n\t * Resets the value of the input\n\t */\n\tpublic reset(): void {\n\t\tthis.value = this.element!.value = '';\n\t\tthis._updateIsEmpty();\n\t}\n\n\t/**\n\t * Updates the {@link #isEmpty} property value on demand.\n\t */\n\tprotected _updateIsEmpty(): void {\n\t\tthis.isEmpty = isInputElementEmpty( this.element! );\n\t}\n\n\t/**\n\t * Sets the `value` property of the {@link #element DOM element} on demand.\n\t */\n\tprivate _setDomElementValue( value: any ) {\n\t\tthis.element!.value = ( !value && value !== 0 ) ? '' : value;\n\t}\n}\n\nfunction isInputElementEmpty( domElement: HTMLInputElement | HTMLTextAreaElement ) {\n\treturn !domElement.value;\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/**\n * @module ui/input/inputview\n */\n\nimport { type Locale } from '@ckeditor/ckeditor5-utils';\nimport { InputBase } from './inputbase.js';\n\n/**\n * The input view class.\n */\nexport class InputView extends InputBase {\n\t/**\n\t * Corresponds to the `inputmode` DOM attribute. Can be `text`, `numeric`, `decimal`, etc.\n\t *\n\t * @observable\n\t * @default 'text'\n\t */\n\tdeclare public inputMode: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( 'inputMode', 'text' );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tinputmode: bind.to( 'inputMode' )\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Fired when the user types in the input. Corresponds to the native\n * DOM `input` event.\n *\n * @eventName ~InputView#input\n */\nexport type InputViewInputEvent = {\n\tname: 'input';\n\targs: [ InputEvent ];\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/**\n * @module ui/inputtext/inputtextview\n */\n\nimport { InputView } from '../input/inputview.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The text input view class.\n */\nexport class InputTextView extends InputView {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\ttype: 'text',\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-input-text'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/inputnumber/inputnumberview\n */\n\nimport { InputView } from '../input/inputview.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The number input view class.\n */\nexport class InputNumberView extends InputView {\n\t/**\n\t * The value of the `min` DOM attribute (the lowest accepted value) set on the {@link #element}.\n\t *\n\t * @observable\n\t * @default undefined\n\t */\n\tdeclare public min: number | undefined;\n\n\t/**\n\t * The value of the `max` DOM attribute (the highest accepted value) set on the {@link #element}.\n\t *\n\t * @observable\n\t * @default undefined\n\t */\n\tdeclare public max: number | undefined;\n\n\t/**\n\t * The value of the `step` DOM attribute set on the {@link #element}.\n\t *\n\t * @observable\n\t * @default undefined\n\t */\n\tdeclare public step: number | undefined;\n\n\t/**\n\t * Creates an instance of the input number view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options The options of the input.\n\t * @param options.min The value of the `min` DOM attribute (the lowest accepted value).\n\t * @param options.max The value of the `max` DOM attribute (the highest accepted value).\n\t * @param options.step The value of the `step` DOM attribute.\n\t */\n\tconstructor(\n\t\tlocale?: Locale,\n\t\t{ min, max, step }: {\n\t\t\tmin?: number;\n\t\t\tmax?: number;\n\t\t\tstep?: number;\n\t\t} = {}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'min', min );\n\t\tthis.set( 'max', max );\n\t\tthis.set( 'step', step );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\ttype: 'number',\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-input-number'\n\t\t\t\t],\n\t\t\t\tmin: bind.to( 'min' ),\n\t\t\t\tmax: bind.to( 'max' ),\n\t\t\t\tstep: bind.to( 'step' )\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/textarea/textareaview\n */\n\nimport { Rect, type Locale, toUnit, getBorderWidths, global, CKEditorError, isVisible, ResizeObserver } from '@ckeditor/ckeditor5-utils';\nimport { InputBase } from '../input/inputbase.js';\n\n/**\n * The textarea view class.\n *\n * ```ts\n * const textareaView = new TextareaView();\n *\n * textareaView.minRows = 2;\n * textareaView.maxRows = 10;\n *\n * textareaView.render();\n *\n * document.body.append( textareaView.element );\n * ```\n */\nexport class TextareaView extends InputBase<HTMLTextAreaElement> {\n\t/**\n\t * Specifies the visible height of a text area, in lines.\n\t *\n\t * @observable\n\t * @default 2\n\t */\n\tdeclare public minRows: number;\n\n\t/**\n\t * Specifies the maximum number of rows.\n\t *\n\t * @observable\n\t * @default 5\n\t */\n\tdeclare public maxRows: number;\n\n\t/**\n\t * Specifies the value of HTML attribute that indicates whether the user can resize the element.\n\t *\n\t * @observable\n\t * @default 'none'\n\t*/\n\tdeclare public resize: 'both' | 'horizontal' | 'vertical' | 'none';\n\n\t/**\n\t * An internal property that stores the current height of the textarea. Used for the DOM binding.\n\t *\n\t * @observable\n\t * @default null\n\t * @internal\n\t */\n\tdeclare public _height: number | null;\n\n\t/**\n\t * An instance of the resize observer used to detect when the view is visible or not and update\n\t * its height if any changes that affect it were made while it was invisible.\n\t *\n\t * **Note:** Created in {@link #render}.\n\t */\n\tprivate _resizeObserver: ResizeObserver | null;\n\n\t/**\n\t * A flag that indicates whether the {@link #_updateAutoGrowHeight} method should be called when the view becomes\n\t * visible again. See {@link #_resizeObserver}.\n\t */\n\tprivate _isUpdateAutoGrowHeightPending: boolean = false;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst toPx = toUnit( 'px' );\n\n\t\tthis.set( 'minRows', 2 );\n\t\tthis.set( 'maxRows', 5 );\n\t\tthis.set( '_height', null );\n\t\tthis.set( 'resize', 'none' );\n\t\tthis._resizeObserver = null;\n\n\t\tthis.on( 'change:minRows', this._validateMinMaxRows.bind( this ) );\n\t\tthis.on( 'change:maxRows', this._validateMinMaxRows.bind( this ) );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.template!.tag = 'textarea';\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-textarea' ],\n\t\t\t\tstyle: {\n\t\t\t\t\theight: bind.to( '_height', height => height ? toPx( height ) : null ),\n\t\t\t\t\tresize: bind.to( 'resize' )\n\t\t\t\t},\n\t\t\t\trows: bind.to( 'minRows' )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tlet wasVisible: boolean = false;\n\n\t\tthis.on( 'input', () => {\n\t\t\tthis._updateAutoGrowHeight( true );\n\t\t\tthis.fire<TextareaViewUpdateEvent>( 'update' );\n\t\t} );\n\n\t\tthis.on( 'change:value', () => {\n\t\t\t// The content needs to be updated by the browser after the value is changed. It takes a few ms.\n\t\t\tglobal.window.requestAnimationFrame( () => {\n\t\t\t\tif ( !isVisible( this.element ) ) {\n\t\t\t\t\tthis._isUpdateAutoGrowHeightPending = true;\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis._updateAutoGrowHeight();\n\t\t\t\tthis.fire<TextareaViewUpdateEvent>( 'update' );\n\t\t\t} );\n\t\t} );\n\n\t\t// It may occur that the Textarea size needs to be updated (e.g. because it's content was changed)\n\t\t// when it is not visible or detached from DOM.\n\t\t// In such case, we need to detect the moment when it becomes visible again and update its height then.\n\t\t// We're using ResizeObserver for that as it is the most reliable way to detect when the element becomes visible.\n\t\t// IntersectionObserver didn't work well with the absolute positioned containers.\n\t\tthis._resizeObserver = new ResizeObserver( this.element!, evt => {\n\t\t\tconst isVisible = !!evt.contentRect.width && !!evt.contentRect.height;\n\n\t\t\tif ( !wasVisible && isVisible && this._isUpdateAutoGrowHeightPending ) {\n\t\t\t\t// We're wrapping the auto-grow logic in RAF because otherwise there is an error thrown\n\t\t\t\t// by the browser about recursive calls to the ResizeObserver. It used to happen in unit\n\t\t\t\t// tests only, though. Since there is no risk of infinite loop here, it can stay here.\n\t\t\t\tglobal.window.requestAnimationFrame( () => {\n\t\t\t\t\tthis._updateAutoGrowHeight();\n\t\t\t\t\tthis.fire<TextareaViewUpdateEvent>( 'update' );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\twasVisible = isVisible;\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._resizeObserver ) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override reset(): void {\n\t\tsuper.reset();\n\n\t\tthis._updateAutoGrowHeight();\n\t\tthis.fire<TextareaViewUpdateEvent>( 'update' );\n\t}\n\n\t/**\n\t * Updates the {@link #_height} of the view depending on {@link #minRows}, {@link #maxRows}, and the current content size.\n\t *\n\t * **Note**: This method overrides manual resize done by the user using a handle. It's a known bug.\n\t */\n\tprivate _updateAutoGrowHeight( shouldScroll?: boolean ): void {\n\t\tconst viewElement = this.element!;\n\n\t\tif ( !viewElement.offsetParent ) {\n\t\t\tthis._isUpdateAutoGrowHeightPending = true;\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isUpdateAutoGrowHeightPending = false;\n\n\t\tconst singleLineContentClone = getTextareaElementClone( viewElement, '1' );\n\t\tconst fullTextValueClone = getTextareaElementClone( viewElement, viewElement.value );\n\t\tconst singleLineContentStyles = singleLineContentClone.ownerDocument.defaultView!.getComputedStyle( singleLineContentClone );\n\n\t\tconst verticalPaddings = parseFloat( singleLineContentStyles.paddingTop ) + parseFloat( singleLineContentStyles.paddingBottom );\n\t\tconst borders = getBorderWidths( singleLineContentClone );\n\t\tconst lineHeight = parseFloat( singleLineContentStyles.lineHeight );\n\t\tconst verticalBorder = borders.top + borders.bottom;\n\n\t\tconst singleLineAreaDefaultHeight = new Rect( singleLineContentClone ).height;\n\t\tconst numberOfLines = Math.round( ( fullTextValueClone.scrollHeight - verticalPaddings ) / lineHeight );\n\n\t\tconst maxHeight = this.maxRows * lineHeight + verticalPaddings + verticalBorder;\n\n\t\t// There's a --ck-ui-component-min-height CSS custom property that enforces min height of the component.\n\t\t// This min-height is relevant only when there's one line of text. Other than that, we can rely on line-height.\n\t\tconst minHeight = numberOfLines === 1 ? singleLineAreaDefaultHeight : this.minRows * lineHeight + verticalPaddings + verticalBorder;\n\n\t\t// The size of textarea is controlled by height style instead of rows attribute because event though it is\n\t\t// a more complex solution, it is immune to the layout textarea has been rendered in (gird, flex).\n\t\tthis._height = Math.min(\n\t\t\tMath.max(\n\t\t\t\tMath.max( numberOfLines, this.minRows ) * lineHeight + verticalPaddings + verticalBorder,\n\t\t\t\tminHeight\n\t\t\t),\n\t\t\tmaxHeight\n\t\t);\n\n\t\tif ( shouldScroll ) {\n\t\t\tviewElement.scrollTop = viewElement.scrollHeight;\n\t\t}\n\n\t\tsingleLineContentClone.remove();\n\t\tfullTextValueClone.remove();\n\t}\n\n\t/**\n\t * Validates the {@link #minRows} and {@link #maxRows} properties and warns in the console if the configuration is incorrect.\n\t */\n\tprivate _validateMinMaxRows() {\n\t\tif ( this.minRows > this.maxRows ) {\n\t\t\t/**\n\t\t\t * The minimum number of rows is greater than the maximum number of rows.\n\t\t\t *\n\t\t\t * @error ui-textarea-view-min-rows-greater-than-max-rows\n\t\t\t * @param {module:ui/textarea/textareaview~TextareaView} textareaView The misconfigured textarea view instance.\n\t\t\t * @param {number} minRows The value of `minRows` property.\n\t\t\t * @param {number} maxRows The value of `maxRows` property.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'ui-textarea-view-min-rows-greater-than-max-rows', {\n\t\t\t\ttextareaView: this,\n\t\t\t\tminRows: this.minRows,\n\t\t\t\tmaxRows: this.maxRows\n\t\t\t} );\n\t\t}\n\t}\n}\n\nfunction getTextareaElementClone( element: HTMLTextAreaElement, value: string ): HTMLTextAreaElement {\n\tconst clone = element.cloneNode() as HTMLTextAreaElement;\n\n\tclone.style.position = 'absolute';\n\tclone.style.top = '-99999px';\n\tclone.style.left = '-99999px';\n\tclone.style.height = 'auto';\n\tclone.style.overflow = 'hidden';\n\tclone.style.width = element.ownerDocument.defaultView!.getComputedStyle( element ).width;\n\tclone.tabIndex = -1;\n\tclone.rows = 1;\n\tclone.value = value;\n\n\telement.parentNode!.insertBefore( clone, element );\n\n\treturn clone;\n}\n\n/**\n * Fired every time the layout of the {@link module:ui/textarea/textareaview~TextareaView} possibly changed as a result\n * of the user input or the value change via {@link module:ui/textarea/textareaview~TextareaView#value}.\n *\n * @eventName ~TextareaView#update\n */\nexport type TextareaViewUpdateEvent = {\n\tname: 'update';\n\targs: [];\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/**\n * @module ui/dropdown/dropdownpanelview\n */\n\nimport { View } from '../view.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { type DropdownPanelFocusable } from './dropdownpanelfocusable.js';\n\nimport { logWarning, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The dropdown panel view class.\n *\n * See {@link module:ui/dropdown/dropdownview~DropdownView} to learn about the common usage.\n */\nexport class DropdownPanelView extends View implements DropdownPanelFocusable {\n\t/**\n\t * Collection of the child views in this panel.\n\t *\n\t * A common child type is the {@link module:ui/list/listview~ListView} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n\t * See {@link module:ui/dropdown/utils~addListToDropdown} and\n\t * {@link module:ui/dropdown/utils~addToolbarToDropdown} to learn more about child views of dropdowns.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * Controls whether the panel is visible.\n\t *\n\t * @observable\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * The position of the panel, relative to the parent.\n\t *\n\t * This property is reflected in the CSS class set to {@link #element} that controls\n\t * the position of the panel.\n\t *\n\t * @observable\n\t * @default 'se'\n\t */\n\tdeclare public position: PanelPosition;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isVisible', false );\n\t\tthis.set( 'position', 'se' );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-reset',\n\t\t\t\t\t'ck-dropdown__panel',\n\t\t\t\t\tbind.to( 'position', value => `ck-dropdown__panel_${ value }` ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-dropdown__panel-visible' )\n\t\t\t\t],\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children,\n\n\t\t\ton: {\n\t\t\t\t// Drag and drop in the panel should not break the selection in the editor.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/228\n\t\t\t\tselectstart: bind.to( evt => {\n\t\t\t\t\tconst target = evt.target;\n\n\t\t\t\t\tif ( target instanceof Element && target.tagName.toLocaleLowerCase() === 'input' ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the first view in the {@link #children} collection.\n\t *\n\t * See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t */\n\tpublic focus(): void {\n\t\tif ( this.children.length ) {\n\t\t\tconst firstChild: any = this.children.first;\n\n\t\t\tif ( typeof firstChild.focus === 'function' ) {\n\t\t\t\tfirstChild.focus();\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * The child view of a dropdown could not be focused because it is missing the `focus()` method.\n\t\t\t\t *\n\t\t\t\t * This warning appears when a dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open} and it\n\t\t\t\t * attempts to focus the {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children first child} of its panel\n\t\t\t\t * but the child does not implement the\n\t\t\t\t * {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface}.\n\t\t\t\t *\n\t\t\t\t * Focusing the content of a dropdown on open greatly improves the accessibility. Please make sure the view instance\n\t\t\t\t * provides the `focus()` method for the best user experience.\n\t\t\t\t *\n\t\t\t\t * @error ui-dropdown-panel-focus-child-missing-focus\n\t\t\t\t * @param {module:ui/view~View} childView Child view.\n\t\t\t\t * @param {module:ui/dropdown/dropdownpanelview~DropdownPanelView} dropdownPanel A parent of a child.\n\t\t\t\t */\n\t\t\t\tlogWarning( 'ui-dropdown-panel-focus-child-missing-focus', { childView: this.children.first, dropdownPanel: this } );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the view element or last item in view collection on opening dropdown's panel.\n\t *\n\t * See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t */\n\tpublic focusLast(): void {\n\t\tif ( this.children.length ) {\n\t\t\tconst lastChild: any = this.children.last;\n\n\t\t\tif ( typeof lastChild.focusLast === 'function' ) {\n\t\t\t\tlastChild.focusLast();\n\t\t\t} else {\n\t\t\t\tlastChild.focus();\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * The position of the panel, relative to the parent.\n */\nexport type PanelPosition = 's' | 'se' | 'sw' | 'sme' | 'smw' | 'n' | 'ne' | 'nw' | 'nme' | 'nmw';\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/**\n * @module ui/dropdown/dropdownview\n */\n\nimport { View } from '../view.js';\n\nimport type { DropdownButton, DropdownButtonOpenEvent } from './button/dropdownbutton.js';\nimport type { DropdownPanelView, PanelPosition } from './dropdownpanelview.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport { type ListView } from '../list/listview.js';\nimport { type ToolbarView } from '../toolbar/toolbarview.js';\nimport { type DropdownMenuRootListView } from './menu/dropdownmenurootlistview.js';\n\nimport {\n\tKeystrokeHandler,\n\tFocusTracker,\n\tgetOptimalPosition,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype PositioningFunction\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * The dropdown view class. It manages the dropdown button and dropdown panel.\n *\n * In most cases, the easiest way to create a dropdown is by using the {@link module:ui/dropdown/utils~createDropdown}\n * util:\n *\n * ```ts\n * const dropdown = createDropdown( locale );\n *\n * // Configure dropdown's button properties:\n * dropdown.buttonView.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.render();\n *\n * dropdown.panelView.element.textContent = 'Content of the panel';\n *\n * // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * If you want to add a richer content to the dropdown panel, you can use the {@link module:ui/dropdown/utils~addListToDropdown}\n * and {@link module:ui/dropdown/utils~addToolbarToDropdown} helpers. See more examples in\n * {@link module:ui/dropdown/utils~createDropdown} documentation.\n *\n * If you want to create a completely custom dropdown, then you can compose it manually:\n *\n * ```ts\n * const button = new DropdownButtonView( locale );\n * const panel = new DropdownPanelView( locale );\n * const dropdown = new DropdownView( locale, button, panel );\n *\n * button.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.render();\n *\n * panel.element.textContent = 'Content of the panel';\n *\n * // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * However, dropdown created this way will contain little behavior. You will need to implement handlers for actions\n * such as {@link module:ui/bindings/clickoutsidehandler~clickOutsideHandler clicking outside an open dropdown}\n * (which should close it) and support for arrow keys inside the panel. Therefore, unless you really know what\n * you do and you really need to do it, it is recommended to use the {@link module:ui/dropdown/utils~createDropdown} helper.\n */\nexport class DropdownView extends View<HTMLDivElement> {\n\t/**\n\t * Button of the dropdown view. Clicking the button opens the {@link #panelView}.\n\t */\n\tpublic readonly buttonView: DropdownButton & FocusableView;\n\n\t/**\n\t * Panel of the dropdown. It opens when the {@link #buttonView} is\n\t * {@link module:ui/button/button~Button#event:execute executed} (i.e. clicked).\n\t *\n\t * Child views can be added to the panel's `children` collection:\n\t *\n\t * ```ts\n\t * dropdown.panelView.children.add( childView );\n\t * ```\n\t *\n\t * See {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children} and\n\t * {@link module:ui/viewcollection~ViewCollection#add}.\n\t */\n\tpublic readonly panelView: DropdownPanelView;\n\n\t/**\n\t * Tracks information about the DOM focus in the dropdown.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the dropdown:\n\t *\n\t * * <kbd>▼</kbd> opens the dropdown,\n\t * * <kbd>◀</kbd> and <kbd>Esc</kbd> closes the dropdown.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A child {@link module:ui/list/listview~ListView list view} of the dropdown located\n\t * in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t *\n\t * **Note**: Only supported when dropdown has list view added using {@link module:ui/dropdown/utils~addListToDropdown}.\n\t */\n\tpublic listView?: ListView;\n\n\t/**\n\t * A child toolbar of the dropdown located in the\n\t * {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t *\n\t * **Note**: Only supported when dropdown has a toolbar added using {@link module:ui/dropdown/utils~addToolbarToDropdown}.\n\t */\n\tpublic toolbarView?: ToolbarView;\n\n\t/**\n\t * A child menu component of the dropdown located\n\t * in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t *\n\t * **Note**: Only supported when dropdown has a menu added using {@link module:ui/dropdown/utils~addMenuToDropdown}.\n\t */\n\tpublic menuView?: DropdownMenuRootListView;\n\n\t/**\n\t * Controls whether the dropdown view is open, i.e. shows or hides the {@link #panelView panel}.\n\t *\n\t * **Note**: When the dropdown gets open, it will attempt to call `focus()` on the first child of its {@link #panelView}.\n\t * See {@link module:ui/dropdown/utils~addToolbarToDropdown}, {@link module:ui/dropdown/utils~addListToDropdown}, and\n\t * {@link module:ui/dropdown/utils~focusChildOnDropdownOpen} to learn more about focus management in dropdowns.\n\t *\n\t * @observable\n\t */\n\tdeclare public isOpen: boolean;\n\n\t/**\n\t * Controls whether the dropdown is enabled, i.e. it can be clicked and execute an action.\n\t *\n\t * See {@link module:ui/button/buttonview~ButtonView#isEnabled}.\n\t *\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * (Optional) The additional CSS class set on the dropdown {@link #element}.\n\t *\n\t * @observable\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * (Optional) The `id` attribute of the dropdown (i.e. to pair with a `<label>` element).\n\t *\n\t * @observable\n\t */\n\tdeclare public id: string | undefined;\n\n\t/**\n\t * The position of the panel, relative to the dropdown.\n\t *\n\t * **Note**: When `'auto'`, the panel will use one of the remaining positions to stay\n\t * in the viewport, visible to the user. The positions correspond directly to\n\t * {@link module:ui/dropdown/dropdownview~DropdownView.defaultPanelPositions default panel positions}.\n\t *\n\t * **Note**: This value has an impact on the\n\t * {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#position} property\n\t * each time the panel becomes {@link #isOpen open}.\n\t *\n\t * @observable\n\t * @default 'auto'\n\t */\n\tdeclare public panelPosition: PanelPosition | 'auto';\n\n\t/**\n\t * @observable\n\t */\n\tdeclare public ariaDescribedById: string | undefined;\n\n\t/**\n\t * Creates an instance of the dropdown.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor(\n\t\tlocale: Locale | undefined,\n\t\tbuttonView: DropdownButton & FocusableView,\n\t\tpanelView: DropdownPanelView\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.buttonView = buttonView;\n\t\tthis.panelView = panelView;\n\n\t\tthis.set( 'isOpen', false );\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'class', undefined );\n\t\tthis.set( 'id', undefined );\n\t\tthis.set( 'panelPosition', 'auto' );\n\n\t\t// Toggle the visibility of the panel when the dropdown becomes open.\n\t\tthis.panelView.bind( 'isVisible' ).to( this, 'isOpen' );\n\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-dropdown',\n\t\t\t\t\tbind.to( 'class' ),\n\t\t\t\t\tbind.if( 'isEnabled', 'ck-disabled', value => !value )\n\t\t\t\t],\n\t\t\t\tid: bind.to( 'id' ),\n\t\t\t\t'aria-describedby': bind.to( 'ariaDescribedById' )\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tbuttonView,\n\t\t\t\tpanelView\n\t\t\t]\n\t\t} );\n\n\t\tbuttonView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-dropdown__button'\n\t\t\t\t],\n\t\t\t\t'data-cke-tooltip-disabled': bind.to( 'isOpen' )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.focusTracker.add( this.buttonView.element! );\n\t\tthis.focusTracker.add( this.panelView.element! );\n\n\t\t// Toggle the dropdown when its button has been clicked.\n\t\tthis.listenTo<DropdownButtonOpenEvent>( this.buttonView, 'open', () => {\n\t\t\tthis.isOpen = !this.isOpen;\n\t\t} );\n\n\t\t// Let the dropdown control the position of the panel. The position must\n\t\t// be updated every time the dropdown is open.\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( !isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If \"auto\", find the best position of the panel to fit into the viewport.\n\t\t\t// Otherwise, simply assign the static position.\n\t\t\tif ( this.panelPosition === 'auto' ) {\n\t\t\t\tconst optimalPanelPosition = DropdownView._getOptimalPosition( {\n\t\t\t\t\telement: this.panelView.element!,\n\t\t\t\t\ttarget: this.buttonView.element!,\n\t\t\t\t\tfitInViewport: true,\n\t\t\t\t\tpositions: this._panelPositions\n\t\t\t\t} );\n\n\t\t\t\tthis.panelView.position = (\n\t\t\t\t\toptimalPanelPosition ? optimalPanelPosition.name : this._defaultPanelPositionName\n\t\t\t\t) as PanelPosition;\n\t\t\t} else {\n\t\t\t\tthis.panelView.position = this.panelPosition;\n\t\t\t}\n\t\t} );\n\n\t\t// Listen for keystrokes coming from within #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tconst closeDropdown = ( data: unknown, cancel: () => void ) => {\n\t\t\tif ( this.isOpen ) {\n\t\t\t\tthis.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t};\n\n\t\t// Open the dropdown panel using the arrow down key, just like with return or space.\n\t\tthis.keystrokes.set( 'arrowdown', ( data, cancel ) => {\n\t\t\t// Don't open if the dropdown is disabled or already open.\n\t\t\tif ( this.buttonView.isEnabled && !this.isOpen ) {\n\t\t\t\tthis.isOpen = true;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\n\t\t// Block the right arrow key (until nested dropdowns are implemented).\n\t\tthis.keystrokes.set( 'arrowright', ( data, cancel ) => {\n\t\t\tif ( this.isOpen ) {\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\n\t\t// Close the dropdown using the arrow left/escape key.\n\t\tthis.keystrokes.set( 'arrowleft', closeDropdown );\n\t\tthis.keystrokes.set( 'esc', closeDropdown );\n\t}\n\n\t/**\n\t * Focuses the {@link #buttonView}.\n\t */\n\tpublic focus(): void {\n\t\tthis.buttonView.focus();\n\t}\n\n\t/**\n\t * Returns {@link #panelView panel} positions to be used by the\n\t * {@link module:utils/dom/position~getOptimalPosition `getOptimalPosition()`}\n\t * utility considering the direction of the language the UI of the editor is displayed in.\n\t */\n\tprivate get _panelPositions(): Array<PositioningFunction> {\n\t\tconst {\n\t\t\tsouth, north,\n\t\t\tsouthEast, southWest,\n\t\t\tnorthEast, northWest,\n\t\t\tsouthMiddleEast, southMiddleWest,\n\t\t\tnorthMiddleEast, northMiddleWest\n\t\t} = DropdownView.defaultPanelPositions;\n\n\t\tif ( this.locale!.uiLanguageDirection !== 'rtl' ) {\n\t\t\treturn [\n\t\t\t\tsouthEast, southWest, southMiddleEast, southMiddleWest, south,\n\t\t\t\tnorthEast, northWest, northMiddleEast, northMiddleWest, north\n\t\t\t];\n\t\t} else {\n\t\t\treturn [\n\t\t\t\tsouthWest, southEast, southMiddleWest, southMiddleEast, south,\n\t\t\t\tnorthWest, northEast, northMiddleWest, northMiddleEast, north\n\t\t\t];\n\t\t}\n\t}\n\n\t/**\n\t * Returns the default position of the dropdown panel based on the direction of the UI language.\n\t * It is used when the {@link #panelPosition} is set to `'auto'` and the panel has not found a\n\t * suitable position to fit into the viewport.\n\t */\n\tprivate get _defaultPanelPositionName(): PanelPosition {\n\t\treturn this.locale!.uiLanguageDirection === 'rtl' ? 'sw' : 'se';\n\t}\n\n\t/**\n\t * A set of positioning functions used by the dropdown view to determine\n\t * the optimal position (i.e. fitting into the browser viewport) of its\n\t * {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel} when\n\t * {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition} is set to 'auto'`.\n\t *\n\t * The available positioning functions are as follow:\n\t *\n\t * **South**\n\t *\n\t * * `south`\n\t *\n\t * ```\n\t *\t\t\t[ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEast`\n\t *\n\t * ```\n\t *\t\t[ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWest`\n\t *\n\t * ```\n\t *\t\t         [ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southMiddleEast`\n\t *\n\t * ```\n\t *\t\t  [ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southMiddleWest`\n\t *\n\t * ```\n\t *\t\t       [ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **North**\n\t *\n\t * * `north`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t    [ Button ]\n\t * ```\n\t *\n\t * * `northEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t[ Button ]\n\t * ```\n\t *\n\t * * `northWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t         [ Button ]\n\t * ```\n\t *\n\t * * `northMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t  [ Button ]\n\t * ```\n\t *\n\t * * `northMiddleWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t       [ Button ]\n\t * ```\n\t *\n\t * Positioning functions are compatible with {@link module:utils/dom/position~DomPoint}.\n\t *\n\t * The name that position function returns will be reflected in dropdown panel's class that\n\t * controls its placement. See {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition}\n\t * to learn more.\n\t */\n\tpublic static defaultPanelPositions: Record<string, PositioningFunction> = {\n\t\tsouth: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - ( panelRect.width - buttonRect.width ) / 2,\n\t\t\t\tname: 's'\n\t\t\t};\n\t\t},\n\t\tsouthEast: buttonRect => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left,\n\t\t\t\tname: 'se'\n\t\t\t};\n\t\t},\n\t\tsouthWest: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\t\tname: 'sw'\n\t\t\t};\n\t\t},\n\t\tsouthMiddleEast: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - ( panelRect.width - buttonRect.width ) / 4,\n\t\t\t\tname: 'sme'\n\t\t\t};\n\t\t},\n\t\tsouthMiddleWest: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - ( panelRect.width - buttonRect.width ) * 3 / 4,\n\t\t\t\tname: 'smw'\n\t\t\t};\n\t\t},\n\t\tnorth: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - ( panelRect.width - buttonRect.width ) / 2,\n\t\t\t\tname: 'n'\n\t\t\t};\n\t\t},\n\t\tnorthEast: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left,\n\t\t\t\tname: 'ne'\n\t\t\t};\n\t\t},\n\t\tnorthWest: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\t\tname: 'nw'\n\t\t\t};\n\t\t},\n\t\tnorthMiddleEast: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - ( panelRect.width - buttonRect.width ) / 4,\n\t\t\t\tname: 'nme'\n\t\t\t};\n\t\t},\n\t\tnorthMiddleWest: ( buttonRect, panelRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - ( panelRect.width - buttonRect.width ) * 3 / 4,\n\t\t\t\tname: 'nmw'\n\t\t\t};\n\t\t}\n\t};\n\n\t/**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t */\n\tprivate static _getOptimalPosition = getOptimalPosition;\n}\n\n/**\n * Fired when an item inside the dropdown is executed.\n *\n * **Note**: Only supported when dropdown was integrated with its child view using one of the helper functions:\n * {@link module:ui/dropdown/utils~addListToDropdown}, {@link module:ui/dropdown/utils~addToolbarToDropdown}, or\n * {@link module:ui/dropdown/utils~addMenuToDropdown}.\n *\n * When integrated with a list, it fires when a child of one of {@link module:ui/list/listitemview~ListItemView}s\n * fired `execute` event.\n *\n * When integrated with a toolbar, it fires when one of the buttons has been {@link module:ui/button/button~Button#event:execute executed}.\n *\n * When integrated with a nested menu, it fires when one of the menu buttons has been executed.\n *\n * In each case, the event is delegated from the component which fired it. It does not have additional parameters and `event.source` is the\n * original component.\n *\n * @eventName ~DropdownView#execute\n */\nexport type DropdownViewEvent = {\n\tname: 'execute';\n\targs: [];\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/**\n * @module ui/dropdown/button/dropdownbuttonview\n */\n\nimport { IconDropdownArrow } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView } from '../../button/buttonview.js';\nimport { type DropdownButton } from './dropdownbutton.js';\nimport { IconView } from '../../icon/iconview.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The default dropdown button view class.\n *\n * ```ts\n * const view = new DropdownButtonView();\n *\n * view.set( {\n * \tlabel: 'A button',\n * \tkeystroke: 'Ctrl+B',\n * \ttooltip: true\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n *\n * Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n */\nexport class DropdownButtonView extends ButtonView implements DropdownButton {\n\t/**\n\t * An icon that displays arrow to indicate a dropdown button.\n\t */\n\tpublic readonly arrowView: IconView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.arrowView = this._createArrowView();\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\t'aria-haspopup': true,\n\t\t\t\t'aria-expanded': this.bindTemplate.to( 'isOn', value => String( value ) )\n\t\t\t}\n\t\t} );\n\n\t\t// The DropdownButton interface expects the open event upon which will open the dropdown.\n\t\tthis.delegate( 'execute' ).to( this, 'open' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.add( this.arrowView );\n\t}\n\n\t/**\n\t * Creates a {@link module:ui/icon/iconview~IconView} instance as {@link #arrowView}.\n\t */\n\tprivate _createArrowView() {\n\t\tconst arrowView = new IconView();\n\n\t\tarrowView.content = IconDropdownArrow;\n\n\t\tarrowView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-dropdown__arrow'\n\t\t\t}\n\t\t} );\n\n\t\treturn arrowView;\n\t}\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/**\n * @module ui/dropdown/menu/dropdownmenulistitembuttonview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { ButtonView } from '../../button/buttonview.js';\n\n/**\n * Represents a view for a button in a dropdown menu list item.\n */\nexport class DropdownMenuListItemButtonView extends ButtonView {\n\tpublic readonly id: string;\n\n\tconstructor( locale: Locale, id: string, label: string ) {\n\t\tsuper( locale );\n\n\t\tthis.id = id;\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: 'menuitem',\n\t\t\tlabel\n\t\t} );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-dropdown-menu-list__nested-menu__item__button'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/dropdown/menu/dropdownmenubuttonview\n */\n\nimport { IconDropdownArrow } from '@ckeditor/ckeditor5-icons';\nimport { IconView } from '../../icon/iconview.js';\nimport { ListItemButtonView } from '../../button/listitembuttonview.js';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Represents a view for a dropdown menu button.\n */\nexport class DropdownMenuButtonView extends ListItemButtonView {\n\t/**\n\t * An icon that displays an arrow to indicate a direction of the menu.\n\t */\n\tpublic readonly arrowView: IconView;\n\n\t/**\n\t * Creates an instance of the dropdown menu button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\trole: 'menuitem'\n\t\t} );\n\n\t\tthis.arrowView = this._createArrowView();\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-dropdown-menu-list__nested-menu__button'\n\t\t\t\t],\n\t\t\t\t'aria-haspopup': true,\n\t\t\t\t'aria-expanded': this.bindTemplate.to( 'isOn', value => String( value ) ),\n\t\t\t\t'data-cke-tooltip-disabled': bind.to( 'isOn' )\n\t\t\t},\n\t\t\ton: {\n\t\t\t\t'mouseenter': bind.to( 'mouseenter' )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.add( this.arrowView );\n\t}\n\n\t/**\n\t * Creates the arrow view instance.\n\t *\n\t * @private\n\t */\n\tprivate _createArrowView() {\n\t\tconst arrowView = new IconView();\n\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-dropdown-menu-list__nested-menu__button__arrow'\n\t\t\t}\n\t\t} );\n\n\t\treturn arrowView;\n\t}\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/**\n * @module ui/list/listitemview\n */\n\nimport { View } from '../view.js';\n\nimport type { FocusableView } from '../focuscycler.js';\nimport { type ViewCollection } from '../viewcollection.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The list item view class.\n */\nexport class ListItemView extends View {\n\t/**\n\t * Collection of the child views inside of the list item {@link #element}.\n\t */\n\tpublic readonly children: ViewCollection<FocusableView>;\n\n\t/**\n\t * Controls whether the item view is visible. Visible by default, list items are hidden\n\t * using a CSS class.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isVisible', true );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'li',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-list__item',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\trole: 'presentation'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the list item.\n\t */\n\tpublic focus(): void {\n\t\tif ( this.children.first ) {\n\t\t\tthis.children.first.focus();\n\t\t}\n\t}\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/**\n * @module ui/list/listseparatorview\n */\n\nimport { View } from '../view.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The list separator view class.\n */\nexport class ListSeparatorView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'li',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-list__separator'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/list/listitemgroupview\n */\n\nimport { View } from '../view.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { ListView } from './listview.js';\nimport { type ListItemView } from './listitemview.js';\nimport { LabelView } from '../label/labelview.js';\nimport { ListSeparatorView } from './listseparatorview.js';\n\nimport { type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The list item group view class.\n */\nexport class ListItemGroupView extends View {\n\t/**\n\t * The visible label of the group.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public label: string;\n\n\t/**\n\t * Label of the group view. Its text is configurable using the {@link #label label attribute}.\n\t *\n\t * If a custom label view is not passed in `ListItemGroupView` constructor, the label is an instance\n\t * of {@link module:ui/label/labelview~LabelView}.\n\t */\n\tpublic readonly labelView: LabelView;\n\n\t/**\n\t * Collection of the child list items inside this group.\n\t */\n\tpublic readonly items: ListView[ 'items' ];\n\n\t/**\n\t * Collection of the child elements of the group.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * Controls whether the item view is visible. Visible by default, list items are hidden\n\t * using a CSS class.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Creates an instance of the list item group view class.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param labelView The instance of the group's label. If not provided, an instance of\n\t * {@link module:ui/label/labelview~LabelView} is used.\n\t */\n\tconstructor( locale?: Locale, labelView: LabelView = new LabelView() ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\t\tconst nestedList = new ListView( locale );\n\n\t\tthis.set( {\n\t\t\tlabel: '',\n\t\t\tisVisible: true\n\t\t} );\n\n\t\tthis.labelView = labelView;\n\t\tthis.labelView.bind( 'text' ).to( this, 'label' );\n\n\t\tthis.children = this.createCollection();\n\t\tthis.children.addMany( [ this.labelView, nestedList ] );\n\n\t\tnestedList.set( {\n\t\t\trole: 'group',\n\t\t\tariaLabelledBy: labelView.id\n\t\t} );\n\n\t\t// Disable focus tracking and accessible navigation in the child list.\n\t\tnestedList.focusTracker.destroy();\n\t\tnestedList.keystrokes.destroy();\n\n\t\tthis.items = nestedList.items;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'li',\n\n\t\t\tattributes: {\n\t\t\t\trole: 'presentation',\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-list__group',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t]\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the list item (which is not a separator).\n\t */\n\tpublic focus(): void {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( this.items ) {\n\t\t\tconst firstListItem = this.items.find( item => !( item instanceof ListSeparatorView ) ) as ListItemView | ListItemGroupView;\n\n\t\t\tif ( firstListItem ) {\n\t\t\t\tfirstListItem.focus();\n\t\t\t}\n\t\t}\n\t}\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/**\n * @module ui/list/listview\n */\n\nimport { View } from '../view.js';\nimport { FocusCycler, type FocusableView } from '../focuscycler.js';\n\nimport { ListItemView } from './listitemview.js';\nimport { ListItemGroupView } from './listitemgroupview.js';\nimport { type ListSeparatorView } from './listseparatorview.js';\nimport { type DropdownPanelFocusable } from '../dropdown/dropdownpanelfocusable.js';\nimport { ViewCollection } from '../viewcollection.js';\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\ttype Locale,\n\ttype GetCallback,\n\ttype CollectionChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\n/**\n * The list view class.\n */\nexport class ListView extends View<HTMLUListElement> implements DropdownPanelFocusable {\n\t/**\n\t * The collection of focusable views in the list. It is used to determine accessible navigation\n\t * between the {@link module:ui/list/listitemview~ListItemView list items} and\n\t * {@link module:ui/list/listitemgroupview~ListItemGroupView list groups}.\n\t */\n\tpublic readonly focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Collection of the child list views.\n\t */\n\tpublic readonly items: ViewCollection<ListItemView | ListItemGroupView | ListSeparatorView>;\n\n\t/**\n\t * Tracks information about DOM focus in the list.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Label used by assistive technologies to describe this list element.\n\t *\n\t * @observable\n\t */\n\tdeclare public ariaLabel: string | undefined;\n\n\t/**\n\t * (Optional) The ARIA property reflected by the `aria-ariaLabelledBy` DOM attribute used by assistive technologies.\n\t *\n\t * @observable\n\t */\n\tdeclare public ariaLabelledBy?: string | undefined;\n\n\t/**\n\t * The property reflected by the `role` DOM attribute to be used by assistive technologies.\n\t *\n\t * @observable\n\t */\n\tdeclare public role: string | undefined;\n\n\t/**\n\t * Helps cycling over focusable {@link #items} in the list.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * A cached map of {@link module:ui/list/listitemgroupview~ListItemGroupView} to `change` event listeners for their `items`.\n\t * Used for accessibility and keyboard navigation purposes.\n\t */\n\tprivate readonly _listItemGroupToChangeListeners: WeakMap<ListItemGroupView, GetCallback<ListItemsChangeEvent>> = new WeakMap();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.focusables = new ViewCollection();\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate list items backwards using the arrowup key.\n\t\t\t\tfocusPrevious: 'arrowup',\n\n\t\t\t\t// Navigate toolbar items forwards using the arrowdown key.\n\t\t\t\tfocusNext: 'arrowdown'\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( 'ariaLabel', undefined );\n\t\tthis.set( 'ariaLabelledBy', undefined );\n\t\tthis.set( 'role', undefined );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'ul',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-reset',\n\t\t\t\t\t'ck-list'\n\t\t\t\t],\n\t\t\t\trole: bind.to( 'role' ),\n\t\t\t\t'aria-label': bind.to( 'ariaLabel' ),\n\t\t\t\t'aria-labelledby': bind.to( 'ariaLabelledBy' )\n\t\t\t},\n\n\t\t\tchildren: this.items\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Items added before rendering should be known to the #focusTracker.\n\t\tfor ( const item of this.items ) {\n\t\t\tif ( item instanceof ListItemGroupView ) {\n\t\t\t\tthis._registerFocusableItemsGroup( item );\n\t\t\t} else if ( item instanceof ListItemView ) {\n\t\t\t\tthis._registerFocusableListItem( item );\n\t\t\t}\n\t\t}\n\n\t\tthis.items.on<ListItemsChangeEvent>( 'change', ( evt, data ) => {\n\t\t\tfor ( const removed of data.removed ) {\n\t\t\t\tif ( removed instanceof ListItemGroupView ) {\n\t\t\t\t\tthis._deregisterFocusableItemsGroup( removed );\n\t\t\t\t} else if ( removed instanceof ListItemView ) {\n\t\t\t\t\tthis._deregisterFocusableListItem( removed );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( const added of Array.from( data.added ).reverse() ) {\n\t\t\t\tif ( added instanceof ListItemGroupView ) {\n\t\t\t\t\tthis._registerFocusableItemsGroup( added, data.index );\n\t\t\t\t} else {\n\t\t\t\t\tthis._registerFocusableListItem( added, data.index );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the first focusable in {@link #items}.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the first focusable in {@link #items}.\n\t */\n\tpublic focusFirst(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the last focusable in {@link #items}.\n\t */\n\tpublic focusLast(): void {\n\t\tthis._focusCycler.focusLast();\n\t}\n\n\t/**\n\t * Registers a list item view in the focus tracker.\n\t *\n\t * @param item The list item view to be registered.\n\t * @param index Index of the list item view in the {@link #items} collection. If not specified, the item will be added at the end.\n\t */\n\tprivate _registerFocusableListItem( item: ListItemView, index?: number ) {\n\t\tthis.focusTracker.add( item.element! );\n\t\tthis.focusables.add( item, index );\n\t}\n\n\t/**\n\t * Removes a list item view from the focus tracker.\n\t *\n\t * @param item The list item view to be removed.\n\t */\n\tprivate _deregisterFocusableListItem( item: ListItemView ) {\n\t\tthis.focusTracker.remove( item.element! );\n\t\tthis.focusables.remove( item );\n\t}\n\n\t/**\n\t * Gets a callback that will be called when the `items` collection of a {@link module:ui/list/listitemgroupview~ListItemGroupView}\n\t * change.\n\t *\n\t * @param groupView The group view for which the callback will be created.\n\t * @returns The callback function to be used for the items `change` event listener in a group.\n\t */\n\tprivate _getOnGroupItemsChangeCallback( groupView: ListItemGroupView ): GetCallback<ListItemsChangeEvent> {\n\t\treturn ( evt, data ) => {\n\t\t\tfor ( const removed of data.removed ) {\n\t\t\t\tthis._deregisterFocusableListItem( removed );\n\t\t\t}\n\n\t\t\tfor ( const added of Array.from( data.added ).reverse() ) {\n\t\t\t\tthis._registerFocusableListItem( added, this.items.getIndex( groupView ) + data.index );\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Registers a list item group view (and its children) in the focus tracker.\n\t *\n\t * @param groupView A group view to be registered.\n\t * @param groupIndex Index of the group view in the {@link #items} collection. If not specified, the group will be added at the end.\n\t */\n\tprivate _registerFocusableItemsGroup( groupView: ListItemGroupView, groupIndex?: number ) {\n\t\tArray.from( groupView.items ).forEach( ( child, childIndex ) => {\n\t\t\tconst registeredChildIndex = typeof groupIndex !== 'undefined' ? groupIndex + childIndex : undefined;\n\n\t\t\tthis._registerFocusableListItem( child as ListItemView, registeredChildIndex );\n\t\t} );\n\n\t\tconst groupItemsChangeCallback = this._getOnGroupItemsChangeCallback( groupView );\n\n\t\t// Cache the reference to the callback in case the group is removed (see _deregisterFocusableItemsGroup()).\n\t\tthis._listItemGroupToChangeListeners.set( groupView, groupItemsChangeCallback );\n\n\t\tgroupView.items.on<ListItemsChangeEvent>( 'change', groupItemsChangeCallback );\n\t}\n\n\t/**\n\t * Removes a list item group view (and its children) from the focus tracker.\n\t *\n\t * @param groupView The group view to be removed.\n\t */\n\tprivate _deregisterFocusableItemsGroup( groupView: ListItemGroupView ) {\n\t\tfor ( const child of groupView.items ) {\n\t\t\tthis._deregisterFocusableListItem( child as ListItemView );\n\t\t}\n\n\t\tgroupView.items.off( 'change', this._listItemGroupToChangeListeners.get( groupView )! );\n\t\tthis._listItemGroupToChangeListeners.delete( groupView );\n\t}\n}\n\n// There's no support for nested groups yet.\ntype ListItemsChangeEvent = CollectionChangeEvent<ListItemView>;\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/**\n * @module ui/dropdown/menu/dropdownmenulistview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport { ListView } from '../../list/listview.js';\n\n/**\n * Represents a dropdown menu list view.\n */\nexport class DropdownMenuListView extends ListView {\n\t/**\n\t * Represents whether the dropdown menu list view is visible or not.\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Creates an instance of the dropdown menu list view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.role = 'menu';\n\t\tthis.set( 'isVisible', true );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-dropdown-menu-list',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/dropdown/menu/utils\n */\n\nimport type { PositioningFunction } from '@ckeditor/ckeditor5-utils';\n\nconst NESTED_PANEL_HORIZONTAL_OFFSET = 5;\n\n/**\n * Contains every positioning function used by {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView} that\n * decides where the {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView#panelView} should be placed.\n *\n * Positioning functions:\n *\n *\t┌──────┬───────────────┐\n *\t│      │               │\n *\t└──────┤               │\n *\t       │               │\n *\t       │            ES │\n *\t       └───────────────┘\n *\n *\t┌───────────────┬──────┐\n *\t│               │      │\n *\t│               ├──────┘\n *\t│               │\n *\t│ WS            │\n *\t└───────────────┘\n *\n *\t       ┌───────────────┐\n *\t       │            EN │\n *\t       │               │\n *\t┌──────┤               │\n *\t│      │               │\n *\t└──────┴───────────────┘\n *\n *\t┌───────────────┐\n *\t│ WN            │\n *\t│               │\n *\t│               ├──────┐\n *\t│               │      │\n *\t└───────────────┴──────┘\n */\nexport const DropdownMenuPanelPositioningFunctions: Record<string, PositioningFunction> = {\n\teastSouth: buttonRect => ( {\n\t\ttop: buttonRect.top,\n\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\tname: 'es'\n\t} ),\n\n\teastNorth: ( buttonRect, panelRect ) => ( {\n\t\ttop: buttonRect.top - panelRect.height + buttonRect.height,\n\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\tname: 'en'\n\t} ),\n\n\twestSouth: ( buttonRect, panelRect ) => ( {\n\t\ttop: buttonRect.top,\n\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\tname: 'ws'\n\t} ),\n\n\twestNorth: ( buttonRect, panelRect ) => ( {\n\t\ttop: buttonRect.top - panelRect.height + buttonRect.height,\n\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\tname: 'wn'\n\t} )\n} as const;\n\n/**\n * Represents the definition of a dropdown menu.\n */\nexport type DropdownNestedMenuDefinition = {\n\n\t/**\n\t * Unique ID for the menu.\n\t */\n\tid: string;\n\n\t/**\n\t * The menu name. It is used as a label for the button which opens the menu list.\n\t */\n\tmenu: string;\n\n\t/**\n\t * The children of the dropdown menu.\n\t */\n\tchildren: DropdownMenuDefinition;\n};\n\n/**\n * Represents the definition of a dropdown menu item.\n */\nexport type DropdownMenuButtonDefinition = {\n\n\t/**\n\t * Unique ID for the button.\n\t */\n\tid: string;\n\n\t/**\n\t * The label for the button.\n\t */\n\tlabel: string;\n};\n\n/**\n * A definition for a nestable menu component.\n *\n * The menu can be flat and include only top-level items, or it can include multiple levels of nested sub-menus.\n *\n * Example:\n *\n * ```ts\n * [\n * \t{\n * \t\tid: 'menu_1',\n * \t\tmenu: 'Menu 1',\n * \t\tchildren: [\n * \t\t\t{\n * \t\t\t\tid: 'menu_1_1',\n * \t\t\t\tmenu: 'Nested menu 1',\n * \t\t\t\tchildren: [\n * \t\t\t\t\t{\n * \t\t\t\t\t\tid: 'item_x',\n * \t\t\t\t\t\tlabel: 'Item X'\n * \t\t\t\t\t}\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tid: 'menu_1_2',\n * \t\t\t\tmenu: 'Nested menu 2',\n * \t\t\t\tchildren: [\n * \t\t\t\t\t{\n * \t\t\t\t\t\tid: 'item_y',\n * \t\t\t\t\t\tlabel: 'Item Y'\n * \t\t\t\t\t},\n * \t\t\t\t\t{\n * \t\t\t\t\t\tid: 'item_z',\n * \t\t\t\t\t\tlabel: 'Item Z'\n * \t\t\t\t\t}\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tid: 'top_a',\n * \t\tlabel: 'Top Item A'\n * \t},\n * \t{\n * \t\tid: 'top_b',\n * \t\tlabel: 'Top Item B'\n * \t}\n * ];\n * ```\n */\nexport type DropdownMenuDefinition = Array<DropdownNestedMenuDefinition | DropdownMenuButtonDefinition>;\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/**\n * @module ui/dropdown/menu/dropdownmenulistitemview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport { type DropdownMenuNestedMenuView } from './dropdownmenunestedmenuview.js';\n\nimport { ListItemView } from '../../list/listitemview.js';\nimport { DropdownMenuListItemButtonView } from './dropdownmenulistitembuttonview.js';\n\n/**\n * Represents a view for a single item in a dropdown menu list.\n */\nexport class DropdownMenuListItemView extends ListItemView {\n\t/**\n\t * The view representing either a flat item or a nested menu in a dropdown menu list item.\n\t */\n\tpublic readonly childView: DropdownMenuNestedMenuView | DropdownMenuListItemButtonView;\n\n\tconstructor(\n\t\tlocale: Locale,\n\t\tparentMenuView: DropdownMenuNestedMenuView | null,\n\t\tchildView: DropdownMenuNestedMenuView | DropdownMenuListItemButtonView\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.childView = childView;\n\t\tthis.children.add( childView );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-dropdown-menu-list__nested-menu__item'\n\t\t\t\t]\n\t\t\t},\n\t\t\ton: {\n\t\t\t\t'mouseenter': bind.to( 'mouseenter' )\n\t\t\t}\n\t\t} );\n\n\t\tif ( parentMenuView ) {\n\t\t\tthis.delegate( 'mouseenter' ).to( parentMenuView );\n\n\t\t\tif ( childView instanceof DropdownMenuListItemButtonView ) {\n\t\t\t\tchildView.delegate( 'execute' ).to( parentMenuView );\n\t\t\t}\n\t\t}\n\t}\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/**\n * @module ui/dropdown/menu/dropdownmenubehaviors\n */\n\nimport type { BaseEvent, ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\nimport { type DropdownMenuNestedMenuView } from './dropdownmenunestedmenuview.js';\nimport type { FocusableView } from '../../focuscycler.js';\n\nimport type { ButtonExecuteEvent } from '../../button/button.js';\nimport { type DropdownMenuRootListView } from './dropdownmenurootlistview.js';\n\nimport { DropdownMenuListItemView } from './dropdownmenulistitemview.js';\n\n/**\n * @internal\n */\nexport const DropdownRootMenuBehaviors = {\n\t/**\n\t * Move focus to a menu item on mouse hover. If it is a button to open a nested menu, open that menu.\n\t */\n\ttoggleMenusAndFocusItemsOnHover( rootList: DropdownMenuRootListView ): void {\n\t\trootList.on<DropdownMenuMouseEnterEvent>( 'menu:mouseenter', evt => {\n\t\t\tconst [ pathLeaf ] = evt.path;\n\n\t\t\t( evt.source as FocusableView ).focus();\n\n\t\t\tfor ( const menuView of rootList.menus ) {\n\t\t\t\tconst isListItemContainingMenu = pathLeaf instanceof DropdownMenuListItemView && pathLeaf.childView === menuView;\n\n\t\t\t\tmenuView.isOpen = ( evt.path.includes( menuView ) || isListItemContainingMenu ) && menuView.isEnabled;\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Handles the following case:\n\t *\n\t * 1. Hover to open a sub-menu (A). The button has focus.\n\t * 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t * 3. Press arrow right to open the sub-menu (B).\n\t * 4. The sub-menu (A) should close (if not, there are two open menus).\n\t */\n\tcloseMenuWhenAnotherOnTheSameLevelOpens( rootList: DropdownMenuRootListView ): void {\n\t\trootList.on<DropdownMenuChangeIsOpenEvent>( 'menu:change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( !isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst evtMenu = evt.source as DropdownMenuNestedMenuView;\n\n\t\t\tfor ( const menuView of rootList.menus ) {\n\t\t\t\tif ( evtMenu.parentMenuView === menuView.parentMenuView && evtMenu !== menuView ) {\n\t\t\t\t\tmenuView.isOpen = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n};\n\n/**\n * @internal\n */\nexport const DropdownMenuBehaviors = {\n\t/**\n\t * Open the menu on the right arrow key press (left, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t */\n\topenOnArrowRightKey( menuView: DropdownMenuNestedMenuView ): void {\n\t\tconst keystroke = menuView.locale!.uiLanguageDirection === 'rtl' ? 'arrowleft' : 'arrowright';\n\n\t\tmenuView.keystrokes.set( keystroke, ( data, cancel ) => {\n\t\t\tif ( menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !menuView.isOpen ) {\n\t\t\t\tmenuView.isOpen = true;\n\t\t\t}\n\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t} );\n\t},\n\n\t/**\n\t * Opens the menu on its button click as well as enter and space keys press (if the button is focused).\n\t */\n\topenOnButtonClick( menuView: DropdownMenuNestedMenuView ): void {\n\t\tmenuView.buttonView.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\tif ( menuView.isEnabled ) {\n\t\t\t\tmenuView.isOpen = true;\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Opens the menu and focuses the panel content upon pressing the Enter key.\n\t */\n\topenAndFocusOnEnterKeyPress( menuView: DropdownMenuNestedMenuView ): void {\n\t\tmenuView.keystrokes.set( 'enter', ( data, cancel ) => {\n\t\t\t// Engage only for Enter key press when the button is focused. The panel can contain\n\t\t\t// other UI components and features that rely on the Enter key press.\n\t\t\tif ( menuView.focusTracker.focusedElement !== menuView.buttonView.element ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmenuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu on the left key press (right, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t */\n\tcloseOnArrowLeftKey( menuView: DropdownMenuNestedMenuView ): void {\n\t\tconst keystroke = menuView.locale!.uiLanguageDirection === 'rtl' ? 'arrowright' : 'arrowleft';\n\n\t\tmenuView.keystrokes.set( keystroke, ( data, cancel ) => {\n\t\t\tif ( menuView.isOpen ) {\n\t\t\t\t// Focus first, then close the panel. Otherwise, Safari won't send blur events for detached DOM elements, leading to errors.\n\t\t\t\tmenuView.focus();\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\tcloseOnEscKey( menuView: DropdownMenuNestedMenuView ): void {\n\t\tmenuView.keystrokes.set( 'esc', ( data, cancel ) => {\n\t\t\tif ( menuView.isOpen ) {\n\t\t\t\t// Focus first, then close the panel. Otherwise, Safari won't send blur events for detached DOM elements, leading to errors.\n\t\t\t\tmenuView.focus();\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu when its parent menu closes. This prevents from leaving orphaned open menus.\n\t */\n\tcloseOnParentClose( menuView: DropdownMenuNestedMenuView, parentMenuView: DropdownMenuNestedMenuView ): void {\n\t\tparentMenuView.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\t\t// TODO: Remove checking `evt.source` if `change:isOpen` is no longer delegated.\n\t\t\tif ( !isOpen && evt.source === parentMenuView ) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t}\n\t\t} );\n\t}\n};\n\n/**\n * Represents a dropdown menu mouse enter event.\n */\ninterface DropdownMenuMouseEnterEvent extends BaseEvent {\n\n\t/**\n\t * The name of the event.\n\t */\n\tname: 'menu:mouseenter';\n}\n\n/**\n * Represents a dropdown menu change is open event.\n */\ninterface DropdownMenuChangeIsOpenEvent extends BaseEvent {\n\n\t/**\n\t * The name of the event.\n\t */\n\tname: 'menu:change:isOpen';\n\n\t/**\n\t * The arguments of the event.\n\t */\n\targs: [ name: string, value: boolean, oldValue: boolean ];\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/**\n * @module ui/dropdown/menu/dropdownmenunestedmenupanelview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport type { FocusableView } from '../../focuscycler.js';\n\nimport { BalloonPanelView } from '../../panel/balloon/balloonpanelview.js';\n\n/**\n * Represents the view for the dropdown menu panel.\n */\nexport class DropdownMenuNestedMenuPanelView extends BalloonPanelView implements FocusableView {\n\t/**\n\t * Creates an instance of the menu panel view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\tisVisible: false,\n\t\t\tposition: 'se',\n\t\t\tclass: null,\n\t\t\ttop: 0,\n\t\t\tleft: 0\n\t\t} );\n\n\t\tthis.extendTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-reset',\n\t\t\t\t\t'ck-dropdown-menu__nested-menu__panel'\n\t\t\t\t],\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\ton: {\n\t\t\t\t// Drag and drop in the panel should not break the selection in the editor.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/228\n\t\t\t\tselectstart: bind.to( evt => {\n\t\t\t\t\tif ( ( evt.target as HTMLElement ).tagName.toLocaleLowerCase() === 'input' ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t *\n\t * @param direction The direction to focus. Default is `1`.\n\t */\n\tpublic focus( direction: -1 | 1 = 1 ): void {\n\t\tconst { content } = this;\n\n\t\tif ( content.length ) {\n\t\t\tif ( direction === 1 ) {\n\t\t\t\t( content.first as FocusableView ).focus();\n\t\t\t} else {\n\t\t\t\t( content.last as FocusableView ).focus();\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * The names of the positions of the {@link module:ui/dropdown/menu/dropdownmenunestedmenupanelview~DropdownMenuNestedMenuPanelView}.\n *\n * They are reflected as CSS class suffixes on the panel view element.\n */\nexport type DropdownMenuNestedMenuPanelPosition = 'es' | 'ws' | 'en' | 'wn' | 'w' | 'e';\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/**\n * @module ui/dropdown/menu/dropdownmenunestedmenuview\n */\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\tglobal,\n\ttype PositioningFunction,\n\ttype ObservableChangeEvent,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { FocusableView } from '../../focuscycler.js';\nimport { type BodyCollection } from '../../editorui/bodycollection.js';\n\nimport { DropdownMenuButtonView } from './dropdownmenubuttonview.js';\nimport { DropdownMenuListView } from './dropdownmenulistview.js';\nimport { DropdownMenuPanelPositioningFunctions } from './utils.js';\nimport { DropdownMenuBehaviors } from './dropdownmenubehaviors.js';\n\nimport { View } from '../../view.js';\nimport { DropdownMenuNestedMenuPanelView, type DropdownMenuNestedMenuPanelPosition } from './dropdownmenunestedmenupanelview.js';\n\n/**\n * Represents a nested menu view.\n */\nexport class DropdownMenuNestedMenuView extends View implements FocusableView {\n\t/**\n\t * An array of delegated events for the dropdown menu definition controller.\n\t * These events are delegated to the dropdown menu element.\n\t */\n\t// Due to some spaghetti code we need to delegate `change:isOpen`.\n\tpublic static readonly DELEGATED_EVENTS = [\n\t\t'mouseenter', 'execute', 'change:isOpen'\n\t] as const;\n\n\tpublic readonly id: string;\n\n\t/**\n\t * Button of the menu view.\n\t */\n\tpublic readonly buttonView: DropdownMenuButtonView;\n\n\t/**\n\t * Panel of the menu. It hosts children of the menu.\n\t */\n\tpublic readonly panelView: DropdownMenuNestedMenuPanelView;\n\n\t/**\n\t * List of nested menu entries.\n\t */\n\tpublic readonly listView: DropdownMenuListView;\n\n\t/**\n\t * Tracks information about the DOM focus in the menu.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the menu.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Controls whether the menu is open, i.e. shows or hides the {@link #panelView panel}.\n\t *\n\t * @observable\n\t */\n\tdeclare public isOpen: boolean;\n\n\t/**\n\t * Controls whether the menu is enabled, i.e. its {@link #buttonView} can be clicked.\n\t *\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * (Optional) The additional CSS class set on the menu {@link #element}.\n\t *\n\t * @observable\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * The name of the position of the {@link #panelView}, relative to the menu.\n\t *\n\t * **Note**: The value is updated each time the panel gets {@link #isOpen open}.\n\t *\n\t * @observable\n\t * @default 'w'\n\t */\n\tdeclare public panelPosition: DropdownMenuNestedMenuPanelPosition;\n\n\t/**\n\t * The parent menu view of the menu. It is `null` for top-level menus.\n\t *\n\t * @observable\n\t * @default null\n\t */\n\tdeclare public readonly parentMenuView: DropdownMenuNestedMenuView | null;\n\n\tprivate _bodyCollection: BodyCollection;\n\n\t/**\n\t * Creates a new instance of the DropdownMenuView class.\n\t *\n\t * @param locale\n\t * @param bodyCollection\n\t * @param id\n\t * @param label The label for the dropdown menu button.\n\t * @param parentMenuView The parent dropdown menu view, if any.\n\t */\n\tconstructor(\n\t\tlocale: Locale, bodyCollection: BodyCollection, id: string, label: string, parentMenuView: DropdownMenuNestedMenuView | null\n\t) {\n\t\tsuper( locale );\n\n\t\tthis._bodyCollection = bodyCollection;\n\t\tthis.id = id;\n\n\t\tthis.set( {\n\t\t\tisOpen: false,\n\t\t\tisEnabled: true,\n\t\t\tpanelPosition: 'w',\n\t\t\tclass: undefined,\n\t\t\tparentMenuView: null\n\t\t} );\n\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.buttonView = new DropdownMenuButtonView( locale );\n\t\tthis.buttonView.delegate( 'mouseenter' ).to( this );\n\t\tthis.buttonView.bind( 'isOn', 'isEnabled' ).to( this, 'isOpen', 'isEnabled' );\n\t\tthis.buttonView.label = label;\n\n\t\tthis.panelView = new DropdownMenuNestedMenuPanelView( locale );\n\t\tthis.panelView.isVisible = true;\n\n\t\tthis.listView = new DropdownMenuListView( locale );\n\t\tthis.listView.bind( 'ariaLabel' ).to( this.buttonView, 'label' );\n\n\t\tthis.panelView.content.add( this.listView );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-dropdown-menu-list__nested-menu',\n\t\t\t\t\tbind.to( 'class' ),\n\t\t\t\t\tbind.if( 'isEnabled', 'ck-disabled', value => !value )\n\t\t\t\t],\n\t\t\t\trole: 'presentation'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.buttonView\n\t\t\t]\n\t\t} );\n\n\t\tthis.parentMenuView = parentMenuView;\n\n\t\tif ( this.parentMenuView ) {\n\t\t\tthis._handleParentMenuView();\n\t\t}\n\n\t\tthis._attachBehaviors();\n\t}\n\n\t/**\n\t * An array of positioning functions used to determine the position of the dropdown menu panel.\n\t * The order of the functions in the array determines the priority of the positions to be tried.\n\t * The first function that returns a valid position will be used.\n\t *\n\t * @returns {Array<PositioningFunction>} An array of positioning functions.\n\t * @internal\n\t */\n\tpublic get _panelPositions(): Array<PositioningFunction> {\n\t\tconst { westSouth, eastSouth, westNorth, eastNorth } = DropdownMenuPanelPositioningFunctions;\n\n\t\tif ( this.locale!.uiLanguageDirection === 'ltr' ) {\n\t\t\treturn [ eastSouth, eastNorth, westSouth, westNorth ];\n\t\t} else {\n\t\t\treturn [ westSouth, westNorth, eastSouth, eastNorth ];\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.panelView.render();\n\n\t\tthis.focusTracker.add( this.buttonView.element! );\n\t\tthis.focusTracker.add( this.panelView.element! );\n\t\tthis.focusTracker.add( this.listView );\n\n\t\t// Listen for keystrokes coming from within #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tthis._mountPanelOnOpen();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._removePanelFromBody();\n\t\tthis.panelView.destroy();\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus(): void {\n\t\tthis.buttonView.focus();\n\t}\n\n\tprivate _handleParentMenuView(): void {\n\t\t// Propagate events from this component to parent-menu.\n\t\tthis.delegate( ...DropdownMenuNestedMenuView.DELEGATED_EVENTS ).to( this.parentMenuView! );\n\n\t\t// Close this menu if its parent closes.\n\t\tDropdownMenuBehaviors.closeOnParentClose( this, this.parentMenuView! );\n\t}\n\n\t/**\n\t * Attach all keyboard behaviors for the menu view.\n\t */\n\tprivate _attachBehaviors(): void {\n\t\tDropdownMenuBehaviors.openOnButtonClick( this );\n\t\tDropdownMenuBehaviors.openAndFocusOnEnterKeyPress( this );\n\t\tDropdownMenuBehaviors.openOnArrowRightKey( this );\n\t\tDropdownMenuBehaviors.closeOnEscKey( this );\n\t\tDropdownMenuBehaviors.closeOnArrowLeftKey( this );\n\t}\n\n\t/**\n\t * Mounts the portal view in the body when the menu is open and removes it when the menu is closed.\n\t * Binds keystrokes to the portal view when the menu is open.\n\t */\n\tprivate _mountPanelOnOpen(): void {\n\t\tconst { panelView } = this;\n\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\t\t// Ensure that the event was triggered by this instance.\n\t\t\t// TODO: Remove checking `evt.source` if `change:isOpen` is no longer delegated.\n\t\t\tif ( evt.source !== this ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Removes the panel view from the body when the menu is closed.\n\t\t\tif ( !isOpen && this._bodyCollection.has( panelView ) ) {\n\t\t\t\tthis._removePanelFromBody();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Adds the panel view to the body when the menu is open.\n\t\t\tif ( isOpen && !this._bodyCollection.has( panelView ) ) {\n\t\t\t\tthis._addPanelToBody();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Removes the panel view from the editor's body and removes it from the focus tracker.\n\t */\n\tprivate _removePanelFromBody(): void {\n\t\tconst { panelView, keystrokes } = this;\n\n\t\tif ( this._bodyCollection.has( panelView ) ) {\n\t\t\tthis._bodyCollection.remove( panelView );\n\n\t\t\tkeystrokes.stopListening( panelView.element! );\n\t\t}\n\t}\n\n\t/**\n\t * Adds the panel view to the editor's body and sets up event listeners.\n\t */\n\tprivate _addPanelToBody() {\n\t\tconst { panelView, buttonView, keystrokes } = this;\n\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( !this._bodyCollection.has( panelView ) ) {\n\t\t\tthis._bodyCollection.add( panelView );\n\n\t\t\tkeystrokes.listenTo( panelView.element! );\n\t\t\tpanelView.pin( {\n\t\t\t\tpositions: this._panelPositions,\n\t\t\t\tlimiter: global.document.body,\n\t\t\t\telement: panelView.element!,\n\t\t\t\ttarget: buttonView.element!,\n\t\t\t\tfitInViewport: true\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module ui/dropdown/menu/dropdownmenurootlistview\n */\n\nimport { DropdownMenuListItemButtonView } from './dropdownmenulistitembuttonview.js';\nimport { DropdownMenuNestedMenuView } from './dropdownmenunestedmenuview.js';\nimport { DropdownMenuListView } from './dropdownmenulistview.js';\nimport { DropdownMenuListItemView } from './dropdownmenulistitemview.js';\nimport { DropdownRootMenuBehaviors } from './dropdownmenubehaviors.js';\n\nimport { type BodyCollection } from '../../editorui/bodycollection.js';\nimport type { DropdownMenuDefinition } from './utils.js';\n\nimport type { Locale, BaseEvent } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Creates and manages a multi-level menu UI structure, suitable to be used inside dropdown components.\n *\n * This class creates a menu structure based on {@link module:ui/dropdown/menu/utils~DropdownMenuDefinition declarative definition}\n * passed in the constructor.\n *\n * Below is an example of a simple definition, that describes a menu with two sub-menus (Menu 1, Menu 2) and four buttons in total (Item A,\n * Item B, Item C, Item D):\n *\n * ```js\n * [\n * \t{\n * \t\tid: 'menu_1',\n * \t\tmenu: 'Menu 1',\n * \t\tchildren: [\n * \t\t\t{ id: 'menu_1_a', label: 'Item A' },\n * \t\t\t{ id: 'menu_1_b', label: 'Item B' }\n * \t\t]\n * \t},\n * \t{\n * \t\tid: 'menu_2',\n * \t\tmenu: 'Menu 2',\n * \t\tchildren: [\n * \t\t\t{ id: 'menu_2_c', label: 'Item C' },\n * \t\t]\n * \t},\n * \t{ id: 'item_d', label: 'Item D' }\n * ]\n * ```\n *\n * The menu is build using multiple view classes. The most important are:\n *\n * * {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView `DropdownMenuNestedMenuView`} - \"menu\" - provides\n * a panel with a nested menu, and a button which opens the panel,\n * * {@link module:ui/dropdown/menu/dropdownmenulistitembuttonview~DropdownMenuListItemButtonView `DropdownMenuListItemButtonView`} -\n * \"button\" or \"leaf button\" (as opposed to buttons provided by `DropdownMenuNestedMenuView`) - should trigger some action when pressed.\n *\n * Instances of these two classes are created based on the data provided in definitions. They are assigned proper IDs and labels.\n * Other view classes build a proper DOM structure around menus and buttons.\n *\n * The `DropdownMenuNestedMenuView` instances provides panels, which may include further menus or buttons. These panels are added to\n * a `BodyCollection` view, which means they are appended outside the DOM editor and UI structure.\n *\n * When \"leaf button\" is pressed, it fires `execute` event which is delegated to `DropdownMenuRootListView` as `menu:execute` event. You\n * can listen to this event to perform an action:\n *\n * ```js\n * rootListView.on( 'menu:execute', evt => {\n * \tconsole.log( evt.source.id ); // E.g. will print 'menu_1_a' when 'Item A' is pressed.\n * } );\n * ```\n *\n * All menus and \"leaf\" buttons created from the definition can be easily accessed through {@link ~DropdownMenuRootListView#menus `menus`}\n * and {@link ~DropdownMenuRootListView#buttons `buttons`} properties.\n *\n * For performance reasons, the whole menu structure is created only when `DropdownMenuRootListView` is rendered for the first time.\n *\n * It is recommended to use this class together with {@link module:ui/dropdown/utils~addMenuToDropdown `addMenuToDropdown()` helper}.\n */\nexport class DropdownMenuRootListView extends DropdownMenuListView {\n\t/**\n\t * The CSS class to be applied to nested menu panels in this dropdown menu.\n\t *\n\t * It is necessary, as the panels are created in body collection, outside editor and UI structure.\n\t */\n\tdeclare public menuPanelClass: string | undefined;\n\n\t/**\n\t * The definitions object used to create the whole menu structure.\n\t */\n\tprivate readonly _definition: DropdownMenuDefinition;\n\n\t/**\n\t * Cached array of all menus in the dropdown menu (including nested menus).\n\t */\n\tprivate _cachedMenus: Array<DropdownMenuNestedMenuView> = [];\n\n\t/**\n\t * Cached array of all buttons in the dropdown menu (including buttons in nested menus).\n\t */\n\tprivate _cachedButtons: Array<DropdownMenuListItemButtonView> = [];\n\n\t/**\n\t * Editor body collection into which nested menus panels will be appended.\n\t */\n\tprivate _bodyCollection: BodyCollection;\n\n\t/**\n\t * Creates an instance of the DropdownMenuRootListView class.\n\t *\n\t * @param locale\n\t * @param bodyCollection\n\t * @param definition The definition object used to create the menu structure.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\tbodyCollection: BodyCollection,\n\t\tdefinition: DropdownMenuDefinition\n\t) {\n\t\tsuper( locale );\n\n\t\tthis._bodyCollection = bodyCollection;\n\t\tthis._definition = definition;\n\n\t\tthis.set( 'menuPanelClass', undefined );\n\t}\n\n\t/**\n\t * Returns the array of all menus in the dropdown menu (including nested menus).\n\t */\n\tpublic get menus(): Array<DropdownMenuNestedMenuView> {\n\t\treturn Array.from( this._cachedMenus.values() );\n\t}\n\n\t/**\n\t * Returns the array of all buttons in the dropdown menu (including buttons in nested menus).\n\t *\n\t * Note, that this includes only \"leaf\" buttons, as specified in the definition passed in constructor. Buttons created as a part of\n\t * the nested menus, that open nested menus when hovered or pressed, are not included.\n\t */\n\tpublic get buttons(): Array<DropdownMenuListItemButtonView> {\n\t\treturn Array.from( this._cachedButtons.values() );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tthis._createStructure( this._definition, null );\n\n\t\tsuper.render();\n\n\t\tDropdownRootMenuBehaviors.toggleMenusAndFocusItemsOnHover( this );\n\t\tDropdownRootMenuBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens( this );\n\t}\n\n\t/**\n\t * Closes all nested menus.\n\t */\n\tpublic closeMenus(): void {\n\t\tthis.menus.forEach( menu => {\n\t\t\tmenu.isOpen = false;\n\t\t} );\n\t}\n\n\t/**\n\t * Recursively creates the whole view tree structure for the dropdown menu, according to the passed `definitions`.\n\t *\n\t * @private\n\t */\n\tprivate _createStructure( definitions: DropdownMenuDefinition, parentMenuView: DropdownMenuNestedMenuView | null ): void {\n\t\tconst items: Array<DropdownMenuListItemView> = [];\n\n\t\tfor ( const def of definitions ) {\n\t\t\tlet createdView: DropdownMenuNestedMenuView | DropdownMenuListItemButtonView;\n\n\t\t\tif ( 'menu' in def ) {\n\t\t\t\tcreatedView = new DropdownMenuNestedMenuView( this.locale!, this._bodyCollection, def.id, def.menu, parentMenuView );\n\t\t\t\tcreatedView.panelView.bind( 'class' ).to( this, 'menuPanelClass' );\n\n\t\t\t\tif ( !parentMenuView ) {\n\t\t\t\t\tcreatedView.delegate( ...DropdownMenuNestedMenuView.DELEGATED_EVENTS ).to( this, ( name: string ) => `menu:${ name }` );\n\t\t\t\t}\n\n\t\t\t\tthis._cachedMenus.push( createdView );\n\t\t\t\tthis._createStructure( def.children, createdView );\n\t\t\t} else {\n\t\t\t\tcreatedView = new DropdownMenuListItemButtonView( this.locale!, def.id, def.label );\n\n\t\t\t\tif ( !parentMenuView ) {\n\t\t\t\t\tcreatedView.delegate( 'execute' ).to( this, 'menu:execute' );\n\t\t\t\t}\n\n\t\t\t\tthis._cachedButtons.push( createdView );\n\t\t\t}\n\n\t\t\tconst listItemView = new DropdownMenuListItemView( this.locale!, parentMenuView, createdView );\n\n\t\t\tif ( !parentMenuView ) {\n\t\t\t\tlistItemView.delegate( 'mouseenter' ).to( this, 'menu:mouseenter' );\n\t\t\t}\n\n\t\t\titems.push( listItemView );\n\t\t}\n\n\t\tconst targetListView = parentMenuView ? parentMenuView.listView : this;\n\n\t\ttargetListView.items.addMany( items );\n\t}\n}\n\n/**\n * Fired when one of the menu buttons is executed (through mouse click or keyboard).\n *\n * This event is a delegated `execute` event fired by the pressed button. The `event.source` is the button which was executed.\n *\n * @eventName ~DropdownMenuRootListView#menu:execute\n */\nexport interface DropdownMenuRootListViewExecuteEvent extends BaseEvent {\n\tname: 'menu:execute';\n\targs: [];\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/**\n * @module ui/toolbar/toolbarseparatorview\n */\n\nimport { View } from '../view.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The toolbar separator view class.\n */\nexport class ToolbarSeparatorView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-toolbar__separator'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/toolbar/toolbarlinebreakview\n */\n\nimport { View } from '../view.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The toolbar line break view class.\n */\nexport class ToolbarLineBreakView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-toolbar__line-break'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/bindings/preventdefault\n */\n\nimport type { ListenerBinding } from '../template.js';\nimport { type View } from '../view.js';\n\n/**\n * A helper which executes a native `Event.preventDefault()` if the target of an event equals the\n * {@link module:ui/view~View#element element of the view}. It shortens the definition of a\n * {@link module:ui/view~View#template template}.\n *\n * ```ts\n * // In a class extending View.\n * import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';\n *\n * // ...\n *\n * this.setTemplate( {\n * \ttag: 'div',\n *\n * \ton: {\n * \t\t// Prevent the default mousedown action on this view.\n * \t\tmousedown: preventDefault( this )\n * \t}\n * } );\n * ```\n *\n * @param view View instance that defines the template.\n * @internal\n */\nexport function preventDefault( view: View ): ListenerBinding {\n\treturn view.bindTemplate.to( evt => {\n\t\tif ( evt.target === view.element ) {\n\t\t\tevt.preventDefault();\n\t\t}\n\t} );\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/**\n * @module ui/toolbar/normalizetoolbarconfig\n */\n\nimport type { ToolbarConfig, ToolbarConfigItem } from '@ckeditor/ckeditor5-core';\n\n/**\n * Normalizes the toolbar configuration (`config.toolbar`), which:\n *\n * * may be defined as an `Array`:\n *\n * ```\n * toolbar: [ 'heading', 'bold', 'italic', 'link', ... ]\n * ```\n *\n * * or an `Object`:\n *\n * ```\n * toolbar: {\n * \titems: [ 'heading', 'bold', 'italic', 'link', ... ],\n * \tremoveItems: [ 'bold' ],\n * \t...\n * }\n * ```\n *\n * * or may not be defined at all (`undefined`)\n *\n * and returns it in the object form.\n *\n * @param config The value of `config.toolbar`.\n * @returns A normalized toolbar config object.\n */\nexport function normalizeToolbarConfig(\n\tconfig: ToolbarConfig | undefined\n): {\n\t\titems: Array<ToolbarConfigItem>;\n\t\tremoveItems: Array<string>;\n\t\tshouldNotGroupWhenFull?: boolean;\n\t\ticon?: string;\n\t} {\n\tif ( Array.isArray( config ) ) {\n\t\treturn {\n\t\t\titems: config,\n\t\t\tremoveItems: []\n\t\t};\n\t}\n\n\tconst predefinedConfigOptions = {\n\t\titems: [],\n\t\tremoveItems: []\n\t};\n\n\tif ( !config ) {\n\t\treturn predefinedConfigOptions;\n\t}\n\n\treturn {\n\t\t...predefinedConfigOptions,\n\t\t...config\n\t};\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/**\n * @module ui/toolbar/toolbarview\n */\n\nimport { View } from '../view.js';\nimport { FocusCycler, isFocusable, type FocusableView } from '../focuscycler.js';\nimport { ToolbarSeparatorView } from './toolbarseparatorview.js';\nimport { ToolbarLineBreakView } from './toolbarlinebreakview.js';\nimport { preventDefault } from '../bindings/preventdefault.js';\nimport { createDropdown, addToolbarToDropdown } from '../dropdown/utils.js';\nimport { normalizeToolbarConfig } from './normalizetoolbarconfig.js';\n\nimport { type ComponentFactory } from '../componentfactory.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { type DropdownView } from '../dropdown/dropdownview.js';\nimport { type DropdownPanelFocusable } from '../dropdown/dropdownpanelfocusable.js';\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\tRect,\n\tResizeObserver,\n\tglobal,\n\tisVisible,\n\tlogWarning,\n\ttype CollectionAddEvent,\n\ttype CollectionChangeEvent,\n\ttype CollectionRemoveEvent,\n\ttype Locale,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\nimport {\n\tIconAlignLeft,\n\tIconBold,\n\tIconImportExport,\n\tIconParagraph,\n\tIconPlus,\n\tIconText,\n\tIconThreeVerticalDots,\n\tIconPilcrow,\n\tIconDragIndicator\n} from '@ckeditor/ckeditor5-icons';\nimport type { ToolbarConfig, ToolbarConfigItem } from '@ckeditor/ckeditor5-core';\n\nimport { isObject } from 'es-toolkit/compat';\n\n/**\n * @internal\n */\nexport const NESTED_TOOLBAR_ICONS: Record<string, string | undefined> = /* #__PURE__ */ ( () => ( {\n\talignLeft: IconAlignLeft,\n\tbold: IconBold,\n\timportExport: IconImportExport,\n\tparagraph: IconParagraph,\n\tplus: IconPlus,\n\ttext: IconText,\n\tthreeVerticalDots: IconThreeVerticalDots,\n\tpilcrow: IconPilcrow,\n\tdragIndicator: IconDragIndicator\n} ) )();\n\n/**\n * The toolbar view class.\n */\nexport class ToolbarView extends View implements DropdownPanelFocusable {\n\t/**\n\t * A reference to the options object passed to the constructor.\n\t */\n\tpublic readonly options: ToolbarOptions;\n\n\t/**\n\t * A collection of toolbar items (buttons, dropdowns, etc.).\n\t */\n\tpublic readonly items: ViewCollection;\n\n\t/**\n\t * Tracks information about the DOM focus in the toolbar.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t * to handle keyboard navigation in the toolbar.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A (child) view containing {@link #items toolbar items}.\n\t */\n\tpublic readonly itemsView: ItemsView;\n\n\t/**\n\t * A top–level collection aggregating building blocks of the toolbar.\n\t *\n\t *\t┌───────────────── ToolbarView ─────────────────┐\n\t *\t| ┌──────────────── #children ────────────────┐ |\n\t *\t| |   ┌──────────── #itemsView ───────────┐   | |\n\t *\t| |   | [ item1 ] [ item2 ] ... [ itemN ] |   | |\n\t *\t| |   └──────────────────────────────────-┘   | |\n\t *\t| └───────────────────────────────────────────┘ |\n\t *\t└───────────────────────────────────────────────┘\n\t *\n\t * By default, it contains the {@link #itemsView} but it can be extended with additional\n\t * UI elements when necessary.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A collection of {@link #items} that take part in the focus cycling\n\t * (i.e. navigation using the keyboard). Usually, it contains a subset of {@link #items} with\n\t * some optional UI elements that also belong to the toolbar and should be focusable\n\t * by the user.\n\t */\n\tpublic readonly focusables: ViewCollection<FocusableView>;\n\n\tdeclare public locale: Locale;\n\n\t/**\n\t * The property reflected by the `role` DOM attribute to be used by assistive technologies.\n\t *\n\t * @observable\n\t * @default 'toolbar'\n\t */\n\tdeclare public role: string | undefined;\n\n\t/**\n\t * Label used by assistive technologies to describe this toolbar element.\n\t *\n\t * @observable\n\t * @default 'Editor toolbar'\n\t */\n\tdeclare public ariaLabel: string;\n\n\t/**\n\t * The maximum width of the toolbar element.\n\t *\n\t * **Note**: When set to a specific value (e.g. `'200px'`), the value will affect the behavior of the\n\t * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull}\n\t * option by changing the number of {@link #items} that will be displayed in the toolbar at a time.\n\t *\n\t * @observable\n\t * @default 'auto'\n\t */\n\tdeclare public maxWidth: string;\n\n\t/**\n\t * An additional CSS class added to the {@link #element}.\n\t *\n\t * @observable\n\t * @type {String}\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * When set true, makes the toolbar look compact with {@link #element}.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isCompact: boolean;\n\n\t/**\n\t * Controls the orientation of toolbar items. Only available when\n\t * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull dynamic items grouping}\n\t * is **disabled**.\n\t *\n\t * @observable\n\t */\n\tdeclare public isVertical: boolean;\n\n\t/**\n\t * Indicates whether the toolbar responds to changes in the geometry (e.g. window resize) by grouping excessive items or not.\n\t */\n\tdeclare public isGrouping: boolean;\n\n\t/**\n\t * Helps cycling over {@link #focusables focusable items} in the toolbar.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * An instance of the active toolbar behavior that shapes its look and functionality.\n\t *\n\t * See {@link module:ui/toolbar/toolbarview~ToolbarBehavior} to learn more.\n\t */\n\tprivate _behavior: ToolbarBehavior;\n\n\t/**\n\t * Creates an instance of the {@link module:ui/toolbar/toolbarview~ToolbarView} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param options Configuration options of the toolbar.\n\t */\n\tconstructor( locale: Locale, options?: ToolbarOptions ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = this.t!;\n\n\t\tthis.options = options || {};\n\n\t\tthis.set( 'ariaLabel', t( 'Editor toolbar' ) );\n\t\tthis.set( 'maxWidth', 'auto' );\n\t\tthis.set( 'role', 'toolbar' );\n\t\tthis.set( 'isGrouping', !!this.options.shouldGroupWhenFull );\n\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\tthis.set( 'class', undefined );\n\t\tthis.set( 'isCompact', false );\n\t\t// Static toolbar can be vertical when needed.\n\t\tthis.set( 'isVertical', false );\n\n\t\tthis.itemsView = new ItemsView( locale );\n\t\tthis.children = this.createCollection();\n\t\tthis.children.add( this.itemsView );\n\t\tthis.focusables = this.createCollection();\n\n\t\tconst isRtl = locale.uiLanguageDirection === 'rtl';\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate toolbar items backwards using the arrow[left,up] keys.\n\t\t\t\tfocusPrevious: [ isRtl ? 'arrowright' : 'arrowleft', 'arrowup' ],\n\n\t\t\t\t// Navigate toolbar items forwards using the arrow[right,down] keys.\n\t\t\t\tfocusNext: [ isRtl ? 'arrowleft' : 'arrowright', 'arrowdown' ]\n\t\t\t}\n\t\t} );\n\n\t\tconst classes = [\n\t\t\t'ck',\n\t\t\t'ck-toolbar',\n\t\t\tbind.to( 'class' ),\n\t\t\tbind.if( 'isCompact', 'ck-toolbar_compact' ),\n\n\t\t\t// To group items dynamically, the toolbar needs a dedicated CSS class. Only used for dynamic grouping.\n\t\t\tbind.if( 'isGrouping', 'ck-toolbar_grouping' ),\n\n\t\t\t// When vertical, the toolbar has an additional CSS class. Only used for static layout.\n\t\t\tbind.if( 'isVertical', 'ck-toolbar_vertical' )\n\t\t];\n\n\t\tif ( this.options.shouldGroupWhenFull && this.options.isFloating ) {\n\t\t\tclasses.push( 'ck-toolbar_floating' );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: classes,\n\t\t\t\trole: bind.to( 'role' ),\n\t\t\t\t'aria-label': bind.to( 'ariaLabel' ),\n\t\t\t\tstyle: {\n\t\t\t\t\tmaxWidth: bind.to( 'maxWidth' )\n\t\t\t\t},\n\t\t\t\ttabindex: -1\n\t\t\t},\n\n\t\t\tchildren: this.children,\n\n\t\t\ton: {\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/206\n\t\t\t\tmousedown: preventDefault( this )\n\t\t\t}\n\t\t} );\n\n\t\tthis._behavior = this.options.shouldGroupWhenFull ? new DynamicGrouping( this ) : new StaticLayout( this );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.focusTracker.add( this.element! );\n\n\t\t// Children added before rendering should be known to the #focusTracker.\n\t\tfor ( const item of this.items ) {\n\t\t\tthis.focusTracker.add( item );\n\t\t}\n\n\t\tthis.items.on<CollectionAddEvent<View>>( 'add', ( evt, item ) => {\n\t\t\tthis.focusTracker.add( item );\n\t\t} );\n\n\t\tthis.items.on<CollectionRemoveEvent<View>>( 'remove', ( evt, item ) => {\n\t\t\tthis.focusTracker.remove( item );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tthis._behavior.render( this );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._behavior.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\n\t\treturn super.destroy();\n\t}\n\n\t/**\n\t * Focuses the first focusable in {@link #focusables}.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the last focusable in {@link #focusables}.\n\t */\n\tpublic focusLast(): void {\n\t\tthis._focusCycler.focusLast();\n\t}\n\n\t/**\n\t * A utility that expands the plain toolbar configuration into\n\t * {@link module:ui/toolbar/toolbarview~ToolbarView#items} using a given component factory.\n\t *\n\t * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t * @param factory A factory producing toolbar items.\n\t * @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t * to this toolbar and all nested ones as well.\n\t */\n\tpublic fillFromConfig(\n\t\titemsOrConfig: ToolbarConfig | undefined,\n\t\tfactory: ComponentFactory,\n\t\tremoveItems?: Array<string>\n\t): void {\n\t\tthis.items.addMany( this._buildItemsFromConfig( itemsOrConfig, factory, removeItems ) );\n\t}\n\n\t/**\n\t * Changes the behavior of toolbar if it does not fit into the available space.\n\t */\n\tpublic switchBehavior( newBehaviorType: 'dynamic' | 'static' ): void {\n\t\tif ( this._behavior.type !== newBehaviorType ) {\n\t\t\tthis._behavior.destroy();\n\t\t\tthis.itemsView.children.clear();\n\t\t\tthis.focusables.clear();\n\n\t\t\tif ( newBehaviorType === 'dynamic' ) {\n\t\t\t\tthis._behavior = new DynamicGrouping( this );\n\t\t\t\tthis._behavior.render( this );\n\n\t\t\t\t( this._behavior as DynamicGrouping ).refreshItems();\n\t\t\t} else {\n\t\t\t\tthis._behavior = new StaticLayout( this );\n\t\t\t\tthis._behavior.render( this );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A utility that expands the plain toolbar configuration into a list of view items using a given component factory.\n\t *\n\t * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t * @param factory A factory producing toolbar items.\n\t * @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t * to this toolbar and all nested ones as well.\n\t */\n\tprivate _buildItemsFromConfig(\n\t\titemsOrConfig: ToolbarConfig | undefined,\n\t\tfactory: ComponentFactory,\n\t\tremoveItems?: Array<string>\n\t): Array<View> {\n\t\tconst config = normalizeToolbarConfig( itemsOrConfig );\n\t\tconst normalizedRemoveItems = removeItems || config.removeItems;\n\t\tconst itemsToAdd = this._cleanItemsConfiguration( config.items, factory, normalizedRemoveItems )\n\t\t\t.map( item => {\n\t\t\t\tif ( isObject( item ) ) {\n\t\t\t\t\treturn this._createNestedToolbarDropdown( item, factory, normalizedRemoveItems );\n\t\t\t\t} else if ( item === '|' ) {\n\t\t\t\t\treturn new ToolbarSeparatorView();\n\t\t\t\t} else if ( item === '-' ) {\n\t\t\t\t\treturn new ToolbarLineBreakView();\n\t\t\t\t}\n\n\t\t\t\treturn factory.create( item );\n\t\t\t} )\n\t\t\t.filter( ( item ): item is View => !!item );\n\n\t\treturn itemsToAdd;\n\t}\n\n\t/**\n\t * Cleans up the {@link module:ui/toolbar/toolbarview~ToolbarView#items} of the toolbar by removing unwanted items and\n\t * duplicated (obsolete) separators or line breaks.\n\t *\n\t * @param items The toolbar items configuration.\n\t * @param factory A factory producing toolbar items.\n\t * @param removeItems An array of items names to be removed from the configuration.\n\t * @returns Items after the clean-up.\n\t */\n\tprivate _cleanItemsConfiguration(\n\t\titems: Array<ToolbarConfigItem>,\n\t\tfactory: ComponentFactory,\n\t\tremoveItems: Array<string>\n\t) {\n\t\tconst filteredItems = items\n\t\t\t.filter( ( item, idx, items ) => {\n\t\t\t\tif ( item === '|' ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Items listed in `config.removeItems` should not be added to the toolbar.\n\t\t\t\tif ( removeItems.indexOf( item as any ) !== -1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( item === '-' ) {\n\t\t\t\t\t// The toolbar line breaks must not be rendered when toolbar grouping is enabled.\n\t\t\t\t\t// (https://github.com/ckeditor/ckeditor5/issues/8582)\n\t\t\t\t\tif ( this.options.shouldGroupWhenFull ) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The toolbar multiline breaks (`-` items) only work when the automatic button grouping\n\t\t\t\t\t\t * is disabled in the toolbar configuration.\n\t\t\t\t\t\t * To do this, set the `shouldNotGroupWhenFull` option to `true` in the editor configuration:\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * ```ts\n\t\t\t\t\t\t * const config = {\n\t\t\t\t\t\t * \ttoolbar: {\n\t\t\t\t\t\t * \t\titems: [ ... ],\n\t\t\t\t\t\t * \t\tshouldNotGroupWhenFull: true\n\t\t\t\t\t\t * \t}\n\t\t\t\t\t\t * }\n\t\t\t\t\t\t * ```\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @error toolbarview-line-break-ignored-when-grouping-items\n\t\t\t\t\t\t */\n\t\t\t\t\t\tlogWarning( 'toolbarview-line-break-ignored-when-grouping-items', items );\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// For the items that cannot be instantiated we are sending warning message. We also filter them out.\n\t\t\t\tif ( !isObject( item ) && !factory.has( item ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * There was a problem processing the configuration of the toolbar. The item with the given\n\t\t\t\t\t * name does not exist so it was omitted when rendering the toolbar.\n\t\t\t\t\t *\n\t\t\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t\t\t * to provide a toolbar item has not been loaded or there is a typo in the\n\t\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t\t *\n\t\t\t\t\t * Make sure the plugin responsible for this toolbar item is loaded and the toolbar configuration\n\t\t\t\t\t * is correct, e.g. {@link module:basic-styles/bold~Bold} is loaded for the `'bold'` toolbar item.\n\t\t\t\t\t *\n\t\t\t\t\t * You can use the following snippet to retrieve all available toolbar items:\n\t\t\t\t\t *\n\t\t\t\t\t * ```ts\n\t\t\t\t\t * Array.from( editor.ui.componentFactory.names() );\n\t\t\t\t\t * ```\n\t\t\t\t\t *\n\t\t\t\t\t * @error toolbarview-item-unavailable\n\t\t\t\t\t * @param {string} item The name of the component or nested toolbar definition.\n\t\t\t\t\t */\n\t\t\t\t\tlogWarning( 'toolbarview-item-unavailable', { item } );\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} );\n\n\t\treturn this._cleanSeparatorsAndLineBreaks( filteredItems );\n\t}\n\n\t/**\n\t * Remove leading, trailing, and duplicated separators (`-` and `|`).\n\t *\n\t * @returns Toolbar items after the separator and line break clean-up.\n\t */\n\tprivate _cleanSeparatorsAndLineBreaks( items: Array<ToolbarConfigItem> ) {\n\t\tconst nonSeparatorPredicate = ( item: ToolbarConfigItem ) => ( item !== '-' && item !== '|' );\n\t\tconst count = items.length;\n\n\t\t// Find an index of the first item that is not a separator.\n\t\tconst firstCommandItemIndex = items.findIndex( nonSeparatorPredicate );\n\n\t\t// Items include separators only. There is no point in displaying them.\n\t\tif ( firstCommandItemIndex === -1 ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Search from the end of the list, then convert found index back to the original direction.\n\t\tconst lastCommandItemIndex = count - items\n\t\t\t.slice()\n\t\t\t.reverse()\n\t\t\t.findIndex( nonSeparatorPredicate );\n\n\t\treturn items\n\t\t\t// Return items without the leading and trailing separators.\n\t\t\t.slice( firstCommandItemIndex, lastCommandItemIndex )\n\t\t\t// Remove duplicated separators.\n\t\t\t.filter( ( name, idx, items ) => {\n\t\t\t\t// Filter only separators.\n\t\t\t\tif ( nonSeparatorPredicate( name ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tconst isDuplicated = idx > 0 && items[ idx - 1 ] === name;\n\n\t\t\t\treturn !isDuplicated;\n\t\t\t} );\n\t}\n\n\t/**\n\t * Creates a user-defined dropdown containing a toolbar with items.\n\t *\n\t * @param definition A definition of the nested toolbar dropdown.\n\t * @param definition.label A label of the dropdown.\n\t * @param definition.icon An icon of the drop-down. One of 'bold', 'plus', 'text', 'importExport', 'alignLeft',\n\t * 'paragraph' or an SVG string. When `false` is passed, no icon will be used.\n\t * @param definition.withText When set `true`, the label of the dropdown will be visible. See\n\t * {@link module:ui/button/buttonview~ButtonView#withText} to learn more.\n\t * @param definition.tooltip A tooltip of the dropdown button. See\n\t * {@link module:ui/button/buttonview~ButtonView#tooltip} to learn more. Defaults to `true`.\n\t * @param componentFactory Component factory used to create items\n\t * of the nested toolbar.\n\t */\n\tprivate _createNestedToolbarDropdown(\n\t\tdefinition: Exclude<ToolbarConfigItem, string>,\n\t\tcomponentFactory: ComponentFactory,\n\t\tremoveItems: Array<string>\n\t) {\n\t\tlet { label, icon, items, tooltip = true, withText = false } = definition;\n\n\t\titems = this._cleanItemsConfiguration( items, componentFactory, removeItems );\n\n\t\t// There is no point in rendering a dropdown without items.\n\t\tif ( !items.length ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst locale = this.locale;\n\t\tconst dropdownView = createDropdown( locale );\n\n\t\tif ( !label ) {\n\t\t\t/**\n\t\t\t * A dropdown definition in the toolbar configuration is missing a text label.\n\t\t\t *\n\t\t\t * Without a label, the dropdown becomes inaccessible to users relying on assistive technologies.\n\t\t\t * Make sure the `label` property is set in your drop-down configuration:\n\t\t\t *\n\t\t\t * ```json\n \t\t\t * {\n \t\t\t * \tlabel: 'A human-readable label',\n\t\t\t * \ticon: '...',\n\t\t\t * \titems: [ ... ]\n \t\t\t * },\n\t\t\t * ```\n\t\t\t *\n\t\t\t * Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t *\n\t\t\t * @error toolbarview-nested-toolbar-dropdown-missing-label\n\t\t\t */\n\t\t\tlogWarning( 'toolbarview-nested-toolbar-dropdown-missing-label', definition );\n\t\t}\n\n\t\tdropdownView.class = 'ck-toolbar__nested-toolbar-dropdown';\n\t\tdropdownView.buttonView.set( {\n\t\t\tlabel,\n\t\t\ttooltip,\n\t\t\twithText: !!withText\n\t\t} );\n\n\t\t// Allow disabling icon by passing false.\n\t\tif ( icon !== false ) {\n\t\t\t// A pre-defined icon picked by name, SVG string, a fallback (default) icon.\n\t\t\tdropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[ icon! ] || icon || IconThreeVerticalDots;\n\t\t}\n\t\t// If the icon is disabled, display the label automatically.\n\t\telse {\n\t\t\tdropdownView.buttonView.withText = true;\n\t\t}\n\n\t\taddToolbarToDropdown( dropdownView, () => (\n\t\t\tdropdownView.toolbarView!._buildItemsFromConfig( items, componentFactory, removeItems )\n\t\t) );\n\n\t\treturn dropdownView;\n\t}\n}\n\n/**\n * Fired when some toolbar {@link ~ToolbarView#items} were grouped or ungrouped as a result of some change\n * in the toolbar geometry.\n *\n * **Note**: This event is always fired **once** regardless of the number of items that were be\n * grouped or ungrouped at a time.\n *\n * **Note**: This event is fired only if the items grouping functionality was enabled in\n * the first place (see {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull}).\n *\n * @eventName ~ToolbarView#groupedItemsUpdate\n */\nexport type ToolbarViewGroupedItemsUpdateEvent = {\n\tname: 'groupedItemsUpdate';\n\targs: [];\n};\n\n/**\n * An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its\n * {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n */\nexport class ItemsView extends View {\n\t/**\n\t * A collection of items (buttons, dropdowns, etc.).\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-toolbar__items'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n}\n\n/**\n * A toolbar behavior that makes it static and unresponsive to the changes of the environment.\n * At the same time, it also makes it possible to display a toolbar with a vertical layout\n * using the {@link module:ui/toolbar/toolbarview~ToolbarView#isVertical} property.\n */\nclass StaticLayout implements ToolbarBehavior {\n\t/**\n\t * Toolbar behavior type.\n\t */\n\tpublic readonly type = 'static';\n\n\t/**\n\t * Creates an instance of the {@link module:ui/toolbar/toolbarview~StaticLayout} toolbar\n\t * behavior.\n\t *\n\t * @param view An instance of the toolbar that this behavior is added to.\n\t */\n\tconstructor( view: ToolbarView ) {\n\t\tview.isGrouping = false;\n\n\t\t// 1:1 pass–through binding, all ToolbarView#items are visible.\n\t\tview.itemsView.children.bindTo( view.items ).using( item => item );\n\n\t\t// 1:1 pass–through binding, all ToolbarView#items are focusable.\n\t\tview.focusables.bindTo( view.items ).using( item => isFocusable( item ) ? item : null );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic render(): void {}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic destroy(): void {}\n}\n\n/**\n * A toolbar behavior that makes the items respond to changes in the geometry.\n *\n * In a nutshell, it groups {@link module:ui/toolbar/toolbarview~ToolbarView#items}\n * that do not fit visually into a single row of the toolbar (due to limited space).\n * Items that do not fit are aggregated in a dropdown displayed at the end of the toolbar.\n *\n * ```\n *\t┌──────────────────────────────────────── ToolbarView ──────────────────────────────────────────┐\n *\t| ┌─────────────────────────────────────── #children ─────────────────────────────────────────┐ |\n *\t| |   ┌─────── #itemsView ────────┐ ┌──────────────────────┐ ┌── #groupedItemsDropdown ───┐   | |\n *\t| |   |       #ungroupedItems     | | ToolbarSeparatorView | |        #groupedItems       |   | |\n *\t| |   └──────────────────────────-┘ └──────────────────────┘ └────────────────────────────┘   | |\n *\t| |                                  \\---------- only when toolbar items overflow -------/    | |\n *\t| └───────────────────────────────────────────────────────────────────────────────────────────┘ |\n *\t└───────────────────────────────────────────────────────────────────────────────────────────────┘\n * ```\n */\nclass DynamicGrouping implements ToolbarBehavior {\n\t/**\n\t * Toolbar behavior type.\n\t */\n\tpublic readonly type = 'dynamic';\n\n\t/**\n\t * A toolbar view this behavior belongs to.\n\t */\n\tpublic readonly view: ToolbarView;\n\n\t/**\n\t * A collection of toolbar children.\n\t */\n\tpublic readonly viewChildren: ViewCollection;\n\n\t/**\n\t * A collection of focusable toolbar elements.\n\t */\n\tpublic readonly viewFocusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * A view containing toolbar items.\n\t */\n\tpublic readonly viewItemsView: ItemsView;\n\n\t/**\n\t * Toolbar focus tracker.\n\t */\n\tpublic readonly viewFocusTracker: FocusTracker;\n\n\t/**\n\t * Toolbar locale.\n\t */\n\tpublic readonly viewLocale: Locale;\n\n\t/**\n\t * A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t * Aggregates items that fit into a single row of the toolbar and were not {@link #groupedItems grouped}\n\t * into a {@link #groupedItemsDropdown dropdown}. Items of this collection are displayed in the\n\t * {@link module:ui/toolbar/toolbarview~ToolbarView#itemsView}.\n\t *\n\t * When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped, it\n\t * matches the {@link module:ui/toolbar/toolbarview~ToolbarView#items} collection in size and order.\n\t */\n\tpublic readonly ungroupedItems: ViewCollection;\n\n\t/**\n\t * A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t * A collection of the toolbar items that do not fit into a single row of the toolbar.\n\t * Grouped items are displayed in a dedicated {@link #groupedItemsDropdown dropdown}.\n\t *\n\t * When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped,\n\t * this collection is empty.\n\t */\n\tpublic readonly groupedItems: ViewCollection;\n\n\t/**\n\t * The dropdown that aggregates {@link #groupedItems grouped items} that do not fit into a single\n\t * row of the toolbar. It is displayed on demand as the last of\n\t * {@link module:ui/toolbar/toolbarview~ToolbarView#children toolbar children} and offers another\n\t * (nested) toolbar which displays items that would normally overflow.\n\t */\n\tpublic readonly groupedItemsDropdown: DropdownView;\n\n\t/**\n\t * An instance of the resize observer that helps dynamically determine the geometry of the toolbar\n\t * and manage items that do not fit into a single row.\n\t *\n\t * **Note:** Created in {@link #_enableGroupingOnResize}.\n\t *\n\t * @readonly\n\t */\n\tpublic resizeObserver: ResizeObserver | null = null;\n\n\t/**\n\t * A cached value of the horizontal padding style used by {@link #_updateGrouping}\n\t * to manage the {@link module:ui/toolbar/toolbarview~ToolbarView#items} that do not fit into\n\t * a single toolbar line. This value can be reused between updates because it is unlikely that\n\t * the padding will change and re–using `Window.getComputedStyle()` is expensive.\n\t *\n\t * @readonly\n\t */\n\tpublic cachedPadding: number | null = null;\n\n\t/**\n\t * A flag indicating that an items grouping update has been queued (e.g. due to the toolbar being visible)\n\t * and should be executed immediately the next time the toolbar shows up.\n\t *\n\t * @readonly\n\t */\n\tpublic shouldUpdateGroupingOnNextResize: boolean = false;\n\n\t/**\n\t * Toolbar element.\n\t *\n\t * @readonly\n\t */\n\tpublic viewElement: HTMLElement | null | undefined;\n\n\t/**\n\t * Creates an instance of the {@link module:ui/toolbar/toolbarview~DynamicGrouping} toolbar\n\t * behavior.\n\t *\n\t * @param view An instance of the toolbar that this behavior is added to.\n\t */\n\tconstructor( view: ToolbarView ) {\n\t\tthis.view = view;\n\n\t\tthis.viewChildren = view.children;\n\t\tthis.viewFocusables = view.focusables;\n\t\tthis.viewItemsView = view.itemsView;\n\t\tthis.viewFocusTracker = view.focusTracker;\n\t\tthis.viewLocale = view.locale;\n\t\tthis.view.isGrouping = true;\n\n\t\tthis.ungroupedItems = view.createCollection();\n\t\tthis.groupedItems = view.createCollection();\n\t\tthis.groupedItemsDropdown = this._createGroupedItemsDropdown();\n\n\t\t// Only those items that were not grouped are visible to the user.\n\t\tview.itemsView.children.bindTo( this.ungroupedItems ).using( item => item );\n\n\t\t// Make sure all #items visible in the main space of the toolbar are \"focuscyclable\".\n\t\tthis.ungroupedItems.on<CollectionChangeEvent>( 'change', this._updateFocusCyclableItems.bind( this ) );\n\n\t\t// Make sure the #groupedItemsDropdown is also included in cycling when it appears.\n\t\tview.children.on<CollectionChangeEvent>( 'change', this._updateFocusCyclableItems.bind( this ) );\n\n\t\t// ToolbarView#items is dynamic. When an item is added or removed, it should be automatically\n\t\t// represented in either grouped or ungrouped items at the right index.\n\t\t// In other words #items == concat( #ungroupedItems, #groupedItems )\n\t\t// (in length and order).\n\t\tview.items.on<CollectionChangeEvent<View>>( 'change', ( evt, changeData ) => {\n\t\t\tconst index = changeData.index;\n\t\t\tconst added = Array.from( changeData.added );\n\n\t\t\t// Removing.\n\t\t\tfor ( const removedItem of changeData.removed ) {\n\t\t\t\tif ( index >= this.ungroupedItems.length ) {\n\t\t\t\t\tthis.groupedItems.remove( removedItem );\n\t\t\t\t} else {\n\t\t\t\t\tthis.ungroupedItems.remove( removedItem );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Adding.\n\t\t\tfor ( let currentIndex = index; currentIndex < index + added.length; currentIndex++ ) {\n\t\t\t\tconst addedItem = added[ currentIndex - index ];\n\n\t\t\t\tif ( currentIndex > this.ungroupedItems.length ) {\n\t\t\t\t\tthis.groupedItems.add( addedItem, currentIndex - this.ungroupedItems.length );\n\t\t\t\t} else {\n\t\t\t\t\tthis.ungroupedItems.add( addedItem, currentIndex );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// When new ungrouped items join in and land in #ungroupedItems, there's a chance it causes\n\t\t\t// the toolbar to overflow.\n\t\t\t// Consequently if removed from grouped or ungrouped items, there is a chance\n\t\t\t// some new space is available and we could do some ungrouping.\n\t\t\tthis._updateGrouping();\n\t\t} );\n\t}\n\n\t/**\n\t * Enables dynamic items grouping based on the dimensions of the toolbar.\n\t *\n\t * @param view An instance of the toolbar that this behavior is added to.\n\t */\n\tpublic render( view: ToolbarView ): void {\n\t\tthis.viewElement = view.element;\n\n\t\tthis._enableGroupingOnResize();\n\t\tthis._enableGroupingOnMaxWidthChange( view );\n\t}\n\n\t/**\n\t * Cleans up the internals used by this behavior.\n\t */\n\tpublic destroy(): void {\n\t\t// The dropdown may not be in ToolbarView#children at the moment of toolbar destruction\n\t\t// so let's make sure it's actually destroyed along with the toolbar.\n\t\tthis.groupedItemsDropdown.destroy();\n\n\t\t// Do not try to remove the same elements if they are already removed.\n\t\tif ( this.viewChildren.length > 1 ) {\n\t\t\tthis.viewChildren.remove( this.groupedItemsDropdown );\n\t\t\tthis.viewChildren.remove( this.viewChildren.last! );\n\t\t}\n\n\t\tthis.resizeObserver!.destroy();\n\t}\n\n\t/**\n\t * Re-adds all items to the toolbar. Use when the toolbar is re-rendered and the items grouping is lost.\n\t */\n\tpublic refreshItems(): void {\n\t\tconst view = this.view;\n\n\t\tif ( view.items.length ) {\n\t\t\tfor ( let currentIndex = 0; currentIndex < view.items.length; currentIndex++ ) {\n\t\t\t\tconst item = [ ...view.items ][ currentIndex ];\n\n\t\t\t\tthis.ungroupedItems.add( item, currentIndex );\n\t\t\t}\n\n\t\t\tthis._updateGrouping();\n\t\t}\n\t}\n\n\t/**\n\t * When called, it will check if any of the {@link #ungroupedItems} do not fit into a single row of the toolbar,\n\t * and it will move them to the {@link #groupedItems} when it happens.\n\t *\n\t * At the same time, it will also check if there is enough space in the toolbar for the first of the\n\t * {@link #groupedItems} to be returned back to {@link #ungroupedItems} and still fit into a single row\n\t * without the toolbar wrapping.\n\t */\n\tprivate _updateGrouping() {\n\t\t// Do no grouping–related geometry analysis when the toolbar is detached from visible DOM,\n\t\t// for instance before #render(), or after render but without a parent or a parent detached\n\t\t// from DOM. DOMRects won't work anyway and there will be tons of warning in the console and\n\t\t// nothing else. This happens, for instance, when the toolbar is detached from DOM and\n\t\t// some logic adds or removes its #items.\n\t\tif ( !this.viewElement!.ownerDocument.body.contains( this.viewElement! ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not update grouping when the element is invisible. Such toolbar has DOMRect filled with zeros\n\t\t// and that would cause all items to be grouped. Instead, queue the grouping so it runs next time\n\t\t// the toolbar is visible (the next ResizeObserver callback execution). This is handy because\n\t\t// the grouping could be caused by increasing the #maxWidth when the toolbar was invisible and the next\n\t\t// time it shows up, some items could actually be ungrouped (https://github.com/ckeditor/ckeditor5/issues/6575).\n\t\tif ( !isVisible( this.viewElement ) ) {\n\t\t\tthis.shouldUpdateGroupingOnNextResize = true;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember how many items were initially grouped so at the it is possible to figure out if the number\n\t\t// of grouped items has changed. If the number has changed, geometry of the toolbar has also changed.\n\t\tconst initialGroupedItemsCount = this.groupedItems.length;\n\t\tlet wereItemsGrouped;\n\n\t\t// Group #items as long as some wrap to the next row. This will happen, for instance,\n\t\t// when the toolbar is getting narrow and there is not enough space to display all items in\n\t\t// a single row.\n\t\twhile ( this._areItemsOverflowing ) {\n\t\t\tthis._groupLastItem();\n\n\t\t\twereItemsGrouped = true;\n\t\t}\n\n\t\t// If none were grouped now but there were some items already grouped before,\n\t\t// then, what the hell, maybe let's see if some of them can be ungrouped. This happens when,\n\t\t// for instance, the toolbar is stretching and there's more space in it than before.\n\t\tif ( !wereItemsGrouped && this.groupedItems.length ) {\n\t\t\t// Ungroup items as long as none are overflowing or there are none to ungroup left.\n\t\t\twhile ( this.groupedItems.length && !this._areItemsOverflowing ) {\n\t\t\t\tthis._ungroupFirstItem();\n\t\t\t}\n\n\t\t\t// If the ungrouping ended up with some item wrapping to the next row,\n\t\t\t// put it back to the group toolbar (\"undo the last ungroup\"). We don't know whether\n\t\t\t// an item will wrap or not until we ungroup it (that's a DOM/CSS thing) so this\n\t\t\t// clean–up is vital for the algorithm.\n\t\t\tif ( this._areItemsOverflowing ) {\n\t\t\t\tthis._groupLastItem();\n\t\t\t}\n\t\t}\n\n\t\tif ( this.groupedItems.length !== initialGroupedItemsCount ) {\n\t\t\tthis.view.fire<ToolbarViewGroupedItemsUpdateEvent>( 'groupedItemsUpdate' );\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when {@link module:ui/toolbar/toolbarview~ToolbarView#element} children visually overflow,\n\t * for instance if the toolbar is narrower than its members. Returns `false` otherwise.\n\t */\n\tprivate get _areItemsOverflowing() {\n\t\t// An empty toolbar cannot overflow.\n\t\tif ( !this.ungroupedItems.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst element = this.viewElement;\n\t\tconst uiLanguageDirection = this.viewLocale.uiLanguageDirection;\n\t\tconst lastChildRect = new Rect( element!.lastChild as any );\n\t\tconst toolbarRect = new Rect( element! );\n\n\t\tif ( !this.cachedPadding ) {\n\t\t\tconst computedStyle = global.window.getComputedStyle( element! );\n\t\t\tconst paddingProperty = uiLanguageDirection === 'ltr' ? 'paddingRight' : 'paddingLeft';\n\n\t\t\t// parseInt() is essential because of quirky floating point numbers logic and DOM.\n\t\t\t// If the padding turned out too big because of that, the grouped items dropdown would\n\t\t\t// always look (from the Rect perspective) like it overflows (while it's not).\n\t\t\tthis.cachedPadding = Number.parseInt( computedStyle[ paddingProperty ] );\n\t\t}\n\n\t\tif ( uiLanguageDirection === 'ltr' ) {\n\t\t\treturn lastChildRect.right > toolbarRect.right - this.cachedPadding;\n\t\t} else {\n\t\t\treturn lastChildRect.left < toolbarRect.left + this.cachedPadding;\n\t\t}\n\t}\n\n\t/**\n\t * Enables the functionality that prevents {@link #ungroupedItems} from overflowing (wrapping to the next row)\n\t * upon resize when there is little space available. Instead, the toolbar items are moved to the\n\t * {@link #groupedItems} collection and displayed in a dropdown at the end of the row (which has its own nested toolbar).\n\t *\n\t * When called, the toolbar will automatically analyze the location of its {@link #ungroupedItems} and \"group\"\n\t * them in the dropdown if necessary. It will also observe the browser window for size changes in\n\t * the future and respond to them by grouping more items or reverting already grouped back, depending\n\t * on the visual space available.\n\t */\n\tprivate _enableGroupingOnResize() {\n\t\tlet previousWidth: number | undefined;\n\n\t\t// TODO: Consider debounce.\n\t\tthis.resizeObserver = new ResizeObserver( this.viewElement!, entry => {\n\t\t\tif ( !previousWidth || previousWidth !== entry.contentRect.width || this.shouldUpdateGroupingOnNextResize ) {\n\t\t\t\tthis.shouldUpdateGroupingOnNextResize = false;\n\n\t\t\t\tthis._updateGrouping();\n\n\t\t\t\tpreviousWidth = entry.contentRect.width;\n\t\t\t}\n\t\t} );\n\n\t\tthis._updateGrouping();\n\t}\n\n\t/**\n\t * Enables the grouping functionality, just like {@link #_enableGroupingOnResize} but the difference is that\n\t * it listens to the changes of {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth} instead.\n\t */\n\tprivate _enableGroupingOnMaxWidthChange( view: View ) {\n\t\tview.on<ObservableChangeEvent>( 'change:maxWidth', () => {\n\t\t\tthis._updateGrouping();\n\t\t} );\n\t}\n\n\t/**\n\t * When called, it will remove the last item from {@link #ungroupedItems} and move it back\n\t * to the {@link #groupedItems} collection.\n\t *\n\t * The opposite of {@link #_ungroupFirstItem}.\n\t */\n\tprivate _groupLastItem() {\n\t\tif ( !this.groupedItems.length ) {\n\t\t\tthis.viewChildren.add( new ToolbarSeparatorView() );\n\t\t\tthis.viewChildren.add( this.groupedItemsDropdown );\n\t\t\tthis.viewFocusTracker.add( this.groupedItemsDropdown.element! );\n\t\t}\n\n\t\tthis.groupedItems.add( this.ungroupedItems.remove( this.ungroupedItems.last! ), 0 );\n\t}\n\n\t/**\n\t * Moves the very first item belonging to {@link #groupedItems} back\n\t * to the {@link #ungroupedItems} collection.\n\t *\n\t * The opposite of {@link #_groupLastItem}.\n\t */\n\tprivate _ungroupFirstItem() {\n\t\tthis.ungroupedItems.add( this.groupedItems.remove( this.groupedItems.first! ) );\n\n\t\tif ( !this.groupedItems.length ) {\n\t\t\tthis.viewChildren.remove( this.groupedItemsDropdown );\n\t\t\tthis.viewChildren.remove( this.viewChildren.last! );\n\t\t\tthis.viewFocusTracker.remove( this.groupedItemsDropdown.element! );\n\t\t}\n\t}\n\n\t/**\n\t * Creates the {@link #groupedItemsDropdown} that hosts the members of the {@link #groupedItems}\n\t * collection when there is not enough space in the toolbar to display all items in a single row.\n\t */\n\tprivate _createGroupedItemsDropdown() {\n\t\tconst locale = this.viewLocale;\n\t\tconst t = locale.t;\n\t\tconst dropdown = createDropdown( locale );\n\n\t\tdropdown.class = 'ck-toolbar__grouped-dropdown';\n\n\t\t// Make sure the dropdown never sticks out to the left/right. It should be under the main toolbar.\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/5608)\n\t\tdropdown.panelPosition = locale.uiLanguageDirection === 'ltr' ? 'sw' : 'se';\n\n\t\taddToolbarToDropdown( dropdown, this.groupedItems );\n\n\t\tdropdown.buttonView.set( {\n\t\t\tlabel: t( 'Show more items' ),\n\t\t\ttooltip: true,\n\t\t\ttooltipPosition: locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw',\n\t\t\ticon: IconThreeVerticalDots\n\t\t} );\n\n\t\treturn dropdown;\n\t}\n\n\t/**\n\t * Updates the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables focus–cyclable items}\n\t * collection so it represents the up–to–date state of the UI from the perspective of the user.\n\t *\n\t * For instance, the {@link #groupedItemsDropdown} can show up and hide but when it is visible,\n\t * it must be subject to focus cycling in the toolbar.\n\t *\n\t * See the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables collection} documentation\n\t * to learn more about the purpose of this method.\n\t */\n\tprivate _updateFocusCyclableItems() {\n\t\tthis.viewFocusables.clear();\n\n\t\tthis.ungroupedItems.map( item => {\n\t\t\tif ( isFocusable( item ) ) {\n\t\t\t\tthis.viewFocusables.add( item );\n\t\t\t}\n\t\t} );\n\n\t\tif ( this.groupedItems.length ) {\n\t\t\tthis.viewFocusables.add( this.groupedItemsDropdown );\n\t\t}\n\t}\n}\n\n/**\n * Options passed to the {@link module:ui/toolbar/toolbarview~ToolbarView#constructor} of the toolbar.\n */\nexport interface ToolbarOptions {\n\n\t/**\n\t * When set to `true`, the toolbar will automatically group {@link module:ui/toolbar/toolbarview~ToolbarView#items} that\n\t * would normally wrap to the next line when there is not enough space to display them in a single row, for\n\t * instance, if the parent container of the toolbar is narrow. For toolbars in absolutely positioned containers\n\t * without width restrictions also the {@link module:ui/toolbar/toolbarview~ToolbarOptions#isFloating} option is required to be `true`.\n\t *\n\t * See also: {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth}.\n\t */\n\tshouldGroupWhenFull?: boolean;\n\n\t/**\n\t * This option should be enabled for toolbars in absolutely positioned containers without width restrictions\n\t * to enable automatic {@link module:ui/toolbar/toolbarview~ToolbarView#items} grouping.\n\t * When this option is set to `true`, the items will stop wrapping to the next line\n\t * and together with {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull},\n\t * this will allow grouping them when there is not enough space in a single row.\n\t */\n\tisFloating?: boolean;\n}\n\n/**\n * A class interface defining the behavior of the {@link module:ui/toolbar/toolbarview~ToolbarView}.\n *\n * Toolbar behaviors extend its look and functionality and have an impact on the\n * {@link module:ui/toolbar/toolbarview~ToolbarView#element} template or\n * {@link module:ui/toolbar/toolbarview~ToolbarView#render rendering}. They can be enabled\n * conditionally, e.g. depending on the configuration of the toolbar.\n * @internal\n */\nexport interface ToolbarBehavior {\n\n\t/**\n\t * A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#render rendered}.\n\t * It can be used to, for example, customize the behavior of the toolbar when its\n\t * {@link module:ui/toolbar/toolbarview~ToolbarView#element} is available.\n\t *\n\t * @param view An instance of the toolbar being rendered.\n\t */\n\trender( view: ToolbarView ): void;\n\n\t/**\n\t * A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#destroy destroyed}.\n\t * It allows cleaning up after the toolbar behavior, for instance, this is the right place to detach\n\t * event listeners, free up references, etc.\n\t */\n\tdestroy(): void;\n\n\t/**\n\t * Indicates the type of the toolbar behavior. Dynamic toolbar can hide items that do not fit into the available space.\n\t * Static toolbar does not hide items and does not respond to the changes of the viewport.\n\t */\n\ttype: 'dynamic' | 'static';\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/**\n * @module ui/dropdown/button/splitbuttonview\n */\n\nimport { IconDropdownArrow } from '@ckeditor/ckeditor5-icons';\nimport {\n\tKeystrokeHandler,\n\tFocusTracker,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\nimport { View } from '../../view.js';\nimport { ButtonView } from '../../button/buttonview.js';\nimport { type ViewCollection } from '../../viewcollection.js';\nimport { type Button } from '../../button/button.js';\nimport { type DropdownButton } from './dropdownbutton.js';\nimport type { FocusableView } from '../../focuscycler.js';\n\n/**\n * The split button view class.\n *\n * ```ts\n * const view = new SplitButtonView();\n *\n * view.set( {\n * \tlabel: 'A button',\n * \tkeystroke: 'Ctrl+B',\n * \ttooltip: true\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n *\n * Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n */\nexport class SplitButtonView extends View<HTMLDivElement> implements DropdownButton {\n\t/**\n\t * Collection of the child views inside of the split button {@link #element}.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A main button of split button.\n\t */\n\tpublic readonly actionView: ButtonView;\n\n\t/**\n\t * A secondary button of split button that opens dropdown.\n\t */\n\tpublic readonly arrowView: ButtonView;\n\n\t/**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the split button:\n\t *\n\t * * <kbd>▶</kbd> moves focus to arrow view when action view is focused,\n\t * * <kbd>◀</kbd> moves focus to action view when arrow view is focused.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Tracks information about DOM focus in the dropdown.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public label: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public keystroke: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public tooltip: Button[ 'tooltip' ];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public tooltipPosition: Button[ 'tooltipPosition' ];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public type: Button[ 'type' ];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isOn: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public isToggleable: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public withText: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public withKeystroke: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public icon: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public tabindex: number;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public labelStyle: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public role: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public ariaChecked: boolean | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public ariaLabel?: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public ariaLabelledBy: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale, actionButton?: ButtonView & FocusableView ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\t// Implement the Button interface.\n\t\tthis.set( 'class', undefined );\n\t\tthis.set( 'labelStyle', undefined );\n\t\tthis.set( 'icon', undefined );\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'isOn', false );\n\t\tthis.set( 'isToggleable', false );\n\t\tthis.set( 'isVisible', true );\n\t\tthis.set( 'keystroke', undefined );\n\t\tthis.set( 'withKeystroke', false );\n\t\tthis.set( 'label', undefined );\n\t\tthis.set( 'tabindex', -1 );\n\t\tthis.set( 'tooltip', false );\n\t\tthis.set( 'tooltipPosition', 's' );\n\t\tthis.set( 'type', 'button' );\n\t\tthis.set( 'withText', false );\n\n\t\tthis.children = this.createCollection();\n\t\tthis.actionView = this._createActionView( actionButton );\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-splitbutton',\n\t\t\t\t\tbind.to( 'class' ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value ),\n\t\t\t\t\tthis.arrowView.bindTemplate.if( 'isOn', 'ck-splitbutton_open' )\n\t\t\t\t]\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.add( this.actionView );\n\t\tthis.children.add( this.arrowView );\n\n\t\tthis.focusTracker.add( this.actionView.element! );\n\t\tthis.focusTracker.add( this.arrowView.element! );\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\t// Overrides toolbar focus cycling behavior.\n\t\tthis.keystrokes.set( 'arrowright', ( evt, cancel ) => {\n\t\t\tif ( this.focusTracker.focusedElement === this.actionView.element ) {\n\t\t\t\tthis.arrowView.focus();\n\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\n\t\t// Overrides toolbar focus cycling behavior.\n\t\tthis.keystrokes.set( 'arrowleft', ( evt, cancel ) => {\n\t\t\tif ( this.focusTracker.focusedElement === this.arrowView.element ) {\n\t\t\t\tthis.actionView.focus();\n\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the {@link module:ui/button/buttonview~ButtonView#element} of the action part of split button.\n\t */\n\tpublic focus(): void {\n\t\tthis.actionView.focus();\n\t}\n\n\t/**\n\t * Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #actionView} and binds it with main split button\n\t * attributes.\n\t */\n\tprivate _createActionView( actionButton?: ButtonView & FocusableView ) {\n\t\tconst actionView = actionButton || new ButtonView();\n\n\t\tif ( !actionButton ) {\n\t\t\tactionView.bind(\n\t\t\t\t'icon',\n\t\t\t\t'isEnabled',\n\t\t\t\t'isOn',\n\t\t\t\t'isToggleable',\n\t\t\t\t'keystroke',\n\t\t\t\t'label',\n\t\t\t\t'tabindex',\n\t\t\t\t'tooltip',\n\t\t\t\t'tooltipPosition',\n\t\t\t\t'type',\n\t\t\t\t'withText'\n\t\t\t).to( this );\n\t\t}\n\n\t\tactionView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-splitbutton__action'\n\t\t\t}\n\t\t} );\n\n\t\tactionView.delegate( 'execute' ).to( this );\n\n\t\treturn actionView;\n\t}\n\n\t/**\n\t * Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #arrowView} and binds it with main split button\n\t * attributes.\n\t */\n\tprivate _createArrowView() {\n\t\tconst arrowView = new ButtonView();\n\t\tconst bind = arrowView.bindTemplate;\n\n\t\tarrowView.icon = IconDropdownArrow;\n\n\t\tarrowView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-splitbutton__arrow'\n\t\t\t\t],\n\t\t\t\t'data-cke-tooltip-disabled': bind.to( 'isOn' ),\n\t\t\t\t'aria-haspopup': true,\n\t\t\t\t'aria-expanded': bind.to( 'isOn', value => String( value ) )\n\t\t\t}\n\t\t} );\n\n\t\tarrowView.bind( 'isEnabled' ).to( this );\n\t\tarrowView.bind( 'label' ).to( this );\n\t\tarrowView.bind( 'tooltip' ).to( this );\n\n\t\tarrowView.delegate( 'execute' ).to( this, 'open' );\n\n\t\treturn arrowView;\n\t}\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/**\n * @module ui/dropdown/utils\n */\n\nimport { DropdownPanelView } from './dropdownpanelview.js';\nimport { DropdownView } from './dropdownview.js';\nimport { DropdownButtonView } from './button/dropdownbuttonview.js';\nimport { DropdownMenuRootListView } from './menu/dropdownmenurootlistview.js';\nimport { ToolbarView } from '../toolbar/toolbarview.js';\nimport { ListView } from '../list/listview.js';\nimport { ListItemView } from '../list/listitemview.js';\nimport { ListSeparatorView } from '../list/listseparatorview.js';\nimport { SplitButtonView } from './button/splitbuttonview.js';\nimport { SwitchButtonView } from '../button/switchbuttonview.js';\nimport { ViewCollection } from '../viewcollection.js';\n\nimport { clickOutsideHandler } from '../bindings/clickoutsidehandler.js';\n\nimport type { View } from '../view.js';\nimport type { ButtonExecuteEvent } from '../button/button.js';\nimport { type UIModel } from '../model.js';\nimport { type DropdownButton } from './button/dropdownbutton.js';\nimport { type ButtonView } from '../button/buttonview.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport type { FalsyValue } from '../template.js';\nimport { type BodyCollection } from '../editorui/bodycollection.js';\n\nimport {\n\tglobal,\n\tpriorities,\n\tlogWarning,\n\ttype FocusTracker,\n\ttype Collection,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype CollectionChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport { ListItemGroupView } from '../list/listitemgroupview.js';\nimport { ListItemButtonView } from '../button/listitembuttonview.js';\nimport type { DropdownMenuDefinition } from './menu/utils.js';\nimport type { ButtonLabelView } from '../button/buttonlabelview.js';\n\n/**\n * A helper for creating dropdowns. It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown},\n * with a {@link module:ui/dropdown/button/dropdownbutton~DropdownButton button},\n * {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView panel} and all standard dropdown's behaviors.\n *\n * # Creating dropdowns\n *\n * By default, the default {@link module:ui/dropdown/button/dropdownbuttonview~DropdownButtonView} class is used as\n * definition of the button:\n *\n * ```ts\n * const dropdown = createDropdown( model );\n *\n * // Configure dropdown's button properties:\n * dropdown.buttonView.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.render();\n *\n * // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * You can also provide other button views (they need to implement the\n * {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface). For instance, you can use\n * {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} to create a dropdown with a split button.\n *\n * ```ts\n * const dropdown = createDropdown( locale, SplitButtonView );\n *\n * // Configure dropdown's button properties:\n * dropdown.buttonView.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.buttonView.on( 'execute', () => {\n * \t// Add the behavior of the \"action part\" of the split button.\n * \t// Split button consists of the \"action part\" and \"arrow part\".\n * \t// The arrow opens the dropdown while the action part can have some other behavior.\n * } );\n *\n * dropdown.render();\n *\n * // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * # Adding content to the dropdown's panel\n *\n * The content of the panel can be inserted directly into the `dropdown.panelView.element`:\n *\n * ```ts\n * dropdown.panelView.element.textContent = 'Content of the panel';\n * ```\n *\n * However, most of the time you will want to add there either a {@link module:ui/list/listview~ListView list of options}\n * or a list of buttons (i.e. a {@link module:ui/toolbar/toolbarview~ToolbarView toolbar}).\n * To simplify the task, you can use, respectively, {@link module:ui/dropdown/utils~addListToDropdown} or\n * {@link module:ui/dropdown/utils~addToolbarToDropdown} utils.\n *\n * @param locale The locale instance.\n * @param ButtonClassOrInstance The dropdown button view class. Needs to implement the\n * {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface.\n * @returns The dropdown view instance.\n */\nexport function createDropdown(\n\tlocale: Locale | undefined,\n\tButtonClassOrInstance:\n\t\t( new ( locale?: Locale ) => DropdownButton & FocusableView ) | DropdownButton & FocusableView = DropdownButtonView\n): DropdownView {\n\tconst buttonView = typeof ButtonClassOrInstance == 'function' ? new ButtonClassOrInstance( locale ) : ButtonClassOrInstance;\n\n\tconst panelView = new DropdownPanelView( locale );\n\tconst dropdownView = new DropdownView( locale, buttonView, panelView );\n\n\tbuttonView.bind( 'isEnabled' ).to( dropdownView );\n\n\tif ( buttonView instanceof SplitButtonView ) {\n\t\tbuttonView.arrowView.bind( 'isOn' ).to( dropdownView, 'isOpen' );\n\t} else {\n\t\tbuttonView.bind( 'isOn' ).to( dropdownView, 'isOpen' );\n\t}\n\n\taddDefaultBehaviors( dropdownView );\n\n\treturn dropdownView;\n}\n\n/**\n * Adds a menu UI component to a dropdown and sets all common behaviors and interactions between the dropdown and the menu.\n *\n * Use this helper to create multi-level dropdown menus that are displayed in a toolbar.\n *\n * Internally, it creates an instance of {@link module:ui/dropdown/menu/dropdownmenurootlistview~DropdownMenuRootListView}.\n *\n * Example:\n *\n * ```ts\n * const definitions = [\n * \t{\n * \t\tid: 'menu_1',\n * \t\tmenu: 'Menu 1',\n * \t\tchildren: [\n * \t\t\t{\n * \t\t\t\tid: 'menu_1_a',\n * \t\t\t\tlabel: 'Item A'\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tid: 'menu_1_b',\n * \t\t\t\tlabel: 'Item B'\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tid: 'top_a',\n * \t\tlabel: 'Top Item A'\n * \t},\n * \t{\n * \t\tid: 'top_b',\n * \t\tlabel: 'Top Item B'\n * \t}\n * ];\n *\n * const dropdownView = createDropdown( editor.locale );\n *\n * addMenuToDropdown( dropdownView, editor.ui.view.body, definitions );\n * ```\n *\n * After using this helper, the `dropdown` will fire {@link module:ui/dropdown/dropdownview~DropdownViewEvent `execute`} event when\n * a nested menu button is pressed.\n *\n * The helper will make sure that the `dropdownMenuRootListView` is lazy loaded, i.e., the menu component structure will be initialized\n * and rendered only after the `dropdown` is opened for the first time.\n *\n * @param dropdownView A dropdown instance to which the menu component will be added.\n * @param body Body collection to which floating menu panels will be added.\n * @param definition The menu component definition.\n * @param options.ariaLabel Label used by assistive technologies to describe the top-level menu.\n */\nexport function addMenuToDropdown(\n\tdropdownView: DropdownView,\n\tbody: BodyCollection,\n\tdefinition: DropdownMenuDefinition,\n\toptions: {\n\t\tariaLabel?: string;\n\t} = {} ): void {\n\tdropdownView.menuView = new DropdownMenuRootListView( dropdownView.locale!, body, definition );\n\tdropdownView.focusTracker.add( dropdownView.menuView );\n\n\tif ( dropdownView.isOpen ) {\n\t\taddMenuToOpenDropdown( dropdownView, options );\n\t} else {\n\t\t// Load the UI elements only after the dropdown is opened for the first time - lazy loading.\n\t\tdropdownView.once( 'change:isOpen', () => {\n\t\t\taddMenuToOpenDropdown( dropdownView, options );\n\t\t}, { priority: 'highest' } );\n\t}\n}\n\nfunction addMenuToOpenDropdown(\n\tdropdownView: DropdownView,\n\toptions: {\n\t\tariaLabel?: string;\n\t}\n): void {\n\tconst dropdownMenuRootListView = dropdownView.menuView!;\n\tconst t = dropdownView.locale!.t;\n\n\tdropdownMenuRootListView.delegate( 'menu:execute' ).to( dropdownView, 'execute' );\n\tdropdownMenuRootListView.listenTo( dropdownView, 'change:isOpen', ( evt, name, isOpen ) => {\n\t\tif ( !isOpen ) {\n\t\t\tdropdownMenuRootListView.closeMenus();\n\t\t}\n\t}, { priority: 'low' } ); // Make sure this is fired after `focusDropdownButtonOnClose` behavior.\n\n\t// When `dropdownMenuRootListView` is added as a `panelView` child, it becomes rendered (`panelView` is rendered at this point).\n\tdropdownView.panelView.children.add( dropdownMenuRootListView );\n\n\t// Nested menu panels are added to body collection, so they are not children of the `dropdownView` from DOM perspective.\n\t// Add these panels to `dropdownView` focus tracker, so they are treated like part of the `dropdownView` for focus-related purposes.\n\tfor ( const menu of dropdownMenuRootListView.menus ) {\n\t\tdropdownView.focusTracker.add( menu );\n\t}\n\n\tdropdownMenuRootListView.ariaLabel = options.ariaLabel || t( 'Dropdown menu' );\n}\n\n/**\n * Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n *\n * ```ts\n * const buttonsCreator = () => {\n * \tconst buttons = [];\n *\n * \t// Either create a new ButtonView instance or create existing.\n * \tbuttons.push( new ButtonView() );\n * \tbuttons.push( editor.ui.componentFactory.create( 'someButton' ) );\n * };\n *\n * const dropdown = createDropdown( locale );\n *\n * addToolbarToDropdown( dropdown, buttonsCreator, { isVertical: true } );\n *\n * // Will render a vertical button dropdown labeled \"A button dropdown\"\n * // with a button group in the panel containing two buttons.\n * // Buttons inside the dropdown will be created on first dropdown panel open.\n * dropdown.render()\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * **Note:** To improve the accessibility, you can tell the dropdown to focus the first active button of the toolbar when the dropdown\n * {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}. See the documentation of `options` to learn more.\n *\n * **Note:** Toolbar view will be created on first open of the dropdown.\n *\n * See {@link module:ui/dropdown/utils~createDropdown} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n *\n * @param dropdownView A dropdown instance to which `ToolbarView` will be added.\n * @param options.enableActiveItemFocusOnDropdownOpen When set `true`, the focus will automatically move to the first\n * active {@link module:ui/toolbar/toolbarview~ToolbarView#items item} of the toolbar upon\n * {@link module:ui/dropdown/dropdownview~DropdownView#isOpen opening} the dropdown. Active items are those with the `isOn` property set\n * `true` (for instance {@link module:ui/button/buttonview~ButtonView buttons}). If no active items is found, the toolbar will be focused\n * as a whole resulting in the focus moving to its first focusable item (default behavior of\n * {@link module:ui/dropdown/dropdownview~DropdownView}).\n * @param options.ariaLabel Label used by assistive technologies to describe toolbar element.\n * @param options.maxWidth The maximum width of the toolbar element.\n * Details: {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth}.\n * @param options.class An additional CSS class added to the toolbar element.\n * @param options.isCompact When set true, makes the toolbar look compact with toolbar element.\n * @param options.isVertical Controls the orientation of toolbar items.\n */\nexport function addToolbarToDropdown(\n\tdropdownView: DropdownView,\n\tbuttonsOrCallback: Array<View> | ViewCollection | ( () => Array<View> | ViewCollection ),\n\toptions: {\n\t\tenableActiveItemFocusOnDropdownOpen?: boolean;\n\t\tariaLabel?: string;\n\t\tmaxWidth?: string;\n\t\tclass?: string;\n\t\tisCompact?: boolean;\n\t\tisVertical?: boolean;\n\t} = {}\n): void {\n\tdropdownView.extendTemplate( {\n\t\tattributes: {\n\t\t\tclass: [ 'ck-toolbar-dropdown' ]\n\t\t}\n\t} );\n\n\tif ( dropdownView.isOpen ) {\n\t\taddToolbarToOpenDropdown( dropdownView, buttonsOrCallback, options );\n\t} else {\n\t\tdropdownView.once(\n\t\t\t'change:isOpen',\n\t\t\t() => addToolbarToOpenDropdown( dropdownView, buttonsOrCallback, options ),\n\t\t\t{ priority: 'highest' }\n\t\t);\n\t}\n\n\tif ( options.enableActiveItemFocusOnDropdownOpen ) {\n\t\t// Accessibility: Focus the first active button in the toolbar when the dropdown gets open.\n\t\tfocusChildOnDropdownOpen( dropdownView, () => dropdownView.toolbarView!.items.find( ( item: any ) => item.isOn ) );\n\t}\n}\n\n/**\n * Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n */\nfunction addToolbarToOpenDropdown(\n\tdropdownView: DropdownView,\n\tbuttonsOrCallback: Array<View> | ViewCollection | ( () => Array<View> | ViewCollection ),\n\toptions: {\n\t\tariaLabel?: string;\n\t\tmaxWidth?: string;\n\t\tclass?: string;\n\t\tisCompact?: boolean;\n\t\tisVertical?: boolean;\n\t}\n): void {\n\tconst locale = dropdownView.locale!;\n\tconst t = locale.t;\n\n\tconst toolbarView = dropdownView.toolbarView = new ToolbarView( locale );\n\tconst buttons = typeof buttonsOrCallback == 'function' ? buttonsOrCallback() : buttonsOrCallback;\n\n\ttoolbarView.ariaLabel = options.ariaLabel || t( 'Dropdown toolbar' );\n\n\tif ( options.maxWidth ) {\n\t\ttoolbarView.maxWidth = options.maxWidth;\n\t}\n\n\tif ( options.class ) {\n\t\ttoolbarView.class = options.class;\n\t}\n\n\tif ( options.isCompact ) {\n\t\ttoolbarView.isCompact = options.isCompact;\n\t}\n\n\tif ( options.isVertical ) {\n\t\ttoolbarView.isVertical = true;\n\t}\n\n\tif ( buttons instanceof ViewCollection ) {\n\t\ttoolbarView.items.bindTo( buttons ).using( item => item );\n\t} else {\n\t\ttoolbarView.items.addMany( buttons );\n\t}\n\n\tdropdownView.panelView.children.add( toolbarView );\n\tdropdownView.focusTracker.add( toolbarView );\n\ttoolbarView.items.delegate( 'execute' ).to( dropdownView );\n}\n\n/**\n * Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n *\n * ```ts\n * const items = new Collection<ListDropdownItemDefinition>();\n *\n * items.add( {\n * \ttype: 'button',\n * \tmodel: new Model( {\n * \t\twithText: true,\n * \t\tlabel: 'First item',\n * \t\tlabelStyle: 'color: red'\n * \t} )\n * } );\n *\n * items.add( {\n * \t type: 'button',\n * \t model: new Model( {\n * \t\twithText: true,\n * \t\tlabel: 'Second item',\n * \t\tlabelStyle: 'color: green',\n * \t\tclass: 'foo'\n * \t} )\n * } );\n *\n * const dropdown = createDropdown( locale );\n *\n * addListToDropdown( dropdown, items );\n *\n * // Will render a dropdown with a list in the panel containing two items.\n * dropdown.render()\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * The `items` collection passed to this methods controls the presence and attributes of respective\n * {@link module:ui/list/listitemview~ListItemView list items}.\n *\n * **Note:** To improve the accessibility, when a list is added to the dropdown using this helper the dropdown will automatically attempt\n * to focus the first active item (a host to a {@link module:ui/button/buttonview~ButtonView} with\n * {@link module:ui/button/buttonview~ButtonView#isOn} set `true`) or the very first item when none are active.\n *\n * **Note:** List view will be created on first open of the dropdown.\n *\n * See {@link module:ui/dropdown/utils~createDropdown} and {@link module:list/list~List}.\n *\n * @param dropdownView A dropdown instance to which `ListVIew` will be added.\n * @param itemsOrCallback A collection of the list item definitions or a callback returning a list item definitions to populate the list.\n * @param options.ariaLabel Label used by assistive technologies to describe list element.\n * @param options.role Will be reflected by the `role` DOM attribute in `ListVIew` and used by assistive technologies.\n */\nexport function addListToDropdown(\n\tdropdownView: DropdownView,\n\titemsOrCallback: Collection<ListDropdownItemDefinition> | ( () => Collection<ListDropdownItemDefinition> ),\n\toptions: {\n\t\tariaLabel?: string;\n\t\trole?: string;\n\t} = {}\n): void {\n\tif ( dropdownView.isOpen ) {\n\t\taddListToOpenDropdown( dropdownView, itemsOrCallback, options );\n\t} else {\n\t\tdropdownView.once(\n\t\t\t'change:isOpen',\n\t\t\t() => addListToOpenDropdown( dropdownView, itemsOrCallback, options ),\n\t\t\t{ priority: 'highest' }\n\t\t);\n\t}\n\n\t// Accessibility: Focus the first active button in the list when the dropdown gets open.\n\tfocusChildOnDropdownOpen( dropdownView, () => dropdownView.listView!.items.find( item => {\n\t\tif ( item instanceof ListItemView ) {\n\t\t\treturn ( item.children.first as any ).isOn;\n\t\t}\n\n\t\treturn false;\n\t} ) );\n}\n\n/**\n * Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n */\nfunction addListToOpenDropdown(\n\tdropdownView: DropdownView,\n\titemsOrCallback: Collection<ListDropdownItemDefinition> | ( () => Collection<ListDropdownItemDefinition> ),\n\toptions: {\n\t\tariaLabel?: string;\n\t\trole?: string;\n\t}\n): void {\n\tconst locale = dropdownView.locale!;\n\tconst listView = dropdownView.listView = new ListView( locale );\n\tconst items = typeof itemsOrCallback == 'function' ? itemsOrCallback() : itemsOrCallback;\n\n\tlistView.ariaLabel = options.ariaLabel;\n\tlistView.role = options.role;\n\n\tbindViewCollectionItemsToDefinitions( dropdownView, listView.items, items, locale );\n\n\tdropdownView.panelView.children.add( listView );\n\n\tlistView.items.delegate( 'execute' ).to( dropdownView );\n}\n\n/**\n * A helper to be used on an existing {@link module:ui/dropdown/dropdownview~DropdownView} that focuses\n * a specific child in DOM when the dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}.\n *\n * @param dropdownView A dropdown instance to which the focus behavior will be added.\n * @param childSelectorCallback A callback executed when the dropdown gets open. It should return a {@link module:ui/view~View}\n * instance (child of {@link module:ui/dropdown/dropdownview~DropdownView#panelView}) that will get focused or a falsy value.\n * If falsy value is returned, a default behavior of the dropdown will engage focusing the first focusable child in\n * the {@link module:ui/dropdown/dropdownview~DropdownView#panelView}.\n */\nexport function focusChildOnDropdownOpen(\n\tdropdownView: DropdownView,\n\tchildSelectorCallback: () => View | FalsyValue\n): void {\n\tdropdownView.on<ObservableChangeEvent>( 'change:isOpen', () => {\n\t\tif ( !dropdownView.isOpen ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst childToFocus: ( View & { focus?: () => void } ) | FalsyValue = childSelectorCallback();\n\n\t\tif ( !childToFocus ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( typeof childToFocus.focus === 'function' ) {\n\t\t\tchildToFocus.focus();\n\t\t} else {\n\t\t\t/**\n\t\t\t * The child view of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} is missing the `focus()` method\n\t\t\t * and could not be focused when the dropdown got {@link module:ui/dropdown/dropdownview~DropdownView#isOpen open}.\n\t\t\t *\n\t\t\t * Making the content of a dropdown focusable in this case greatly improves the accessibility. Please make the view instance\n\t\t\t * implements the {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface} for the best user\n\t\t\t * experience.\n\t\t\t *\n\t\t\t * @error ui-dropdown-focus-child-on-open-child-missing-focus\n\t\t\t * @param {module:ui/view~View} view Child to focus.\n\t\t\t */\n\t\t\tlogWarning( 'ui-dropdown-focus-child-on-open-child-missing-focus', { view: childToFocus } );\n\t\t}\n\n\t// * Let the panel show up first (do not focus an invisible element).\n\t// * Execute after focusDropdownPanelOnOpen(). See focusDropdownPanelOnOpen() to learn more.\n\t}, { priority: priorities.low - 10 } );\n}\n\n/**\n * Add a set of default behaviors to dropdown view.\n */\nfunction addDefaultBehaviors( dropdownView: DropdownView ) {\n\tcloseDropdownOnClickOutside( dropdownView );\n\tcloseDropdownOnExecute( dropdownView );\n\tcloseDropdownOnBlur( dropdownView );\n\tfocusDropdownContentsOnArrows( dropdownView );\n\tfocusDropdownButtonOnClose( dropdownView );\n\tfocusDropdownPanelOnOpen( dropdownView );\n}\n\n/**\n * Adds a behavior to a dropdownView that closes opened dropdown when user clicks outside the dropdown.\n */\nfunction closeDropdownOnClickOutside( dropdownView: DropdownView ) {\n\tclickOutsideHandler( {\n\t\temitter: dropdownView,\n\t\tactivator: () => dropdownView.isRendered && dropdownView.isOpen,\n\t\tcallback: () => {\n\t\t\tdropdownView.isOpen = false;\n\t\t},\n\t\tcontextElements: () => [\n\t\t\tdropdownView.element!,\n\t\t\t// Include all elements connected to the dropdown's focus tracker, but exclude those that are direct children\n\t\t\t// of DropdownView#element. They would be identified as descendants of #element anyway upon clicking and would\n\t\t\t// not contribute to the logic.\n\t\t\t...getFocusTrackerTreeElements( dropdownView.focusTracker ).filter( element => !dropdownView.element!.contains( element ) )\n\t\t]\n\t} );\n}\n\n/**\n * Returns all DOM elements connected to a DropdownView's focus tracker, either directly (same DOM sub-tree)\n * or indirectly (external views registered in the focus tracker).\n */\nfunction getFocusTrackerTreeElements( focusTracker: FocusTracker ): Array<Element> {\n\treturn [\n\t\t...focusTracker.elements,\n\t\t...focusTracker.externalViews.flatMap( view => getFocusTrackerTreeElements( view.focusTracker ) )\n\t];\n}\n\n/**\n * Adds a behavior to a dropdownView that closes the dropdown view on \"execute\" event.\n */\nfunction closeDropdownOnExecute( dropdownView: DropdownView ) {\n\t// Close the dropdown when one of the list items has been executed.\n\tdropdownView.on<ButtonExecuteEvent>( 'execute', evt => {\n\t\t// Toggling a switch button view should not close the dropdown.\n\t\tif ( evt.source instanceof SwitchButtonView ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdropdownView.isOpen = false;\n\t} );\n}\n\n/**\n * Adds a behavior to a dropdown view that closes opened dropdown when it loses focus.\n */\nfunction closeDropdownOnBlur( dropdownView: DropdownView ) {\n\tdropdownView.focusTracker.on<ObservableChangeEvent<boolean>>( 'change:isFocused', ( evt, name, isFocused ) => {\n\t\tif ( isFocused || !dropdownView.isOpen ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdropdownView.isOpen = false;\n\t} );\n}\n\n/**\n * Adds a behavior to a dropdownView that focuses the dropdown's panel view contents on keystrokes.\n */\nfunction focusDropdownContentsOnArrows( dropdownView: DropdownView ) {\n\t// If the dropdown panel is already open, the arrow down key should focus the first child of the #panelView.\n\tdropdownView.keystrokes.set( 'arrowdown', ( data, cancel ) => {\n\t\tif ( dropdownView.isOpen ) {\n\t\t\tdropdownView.panelView.focus();\n\t\t\tcancel();\n\t\t}\n\t} );\n\n\t// If the dropdown panel is already open, the arrow up key should focus the last child of the #panelView.\n\tdropdownView.keystrokes.set( 'arrowup', ( data, cancel ) => {\n\t\tif ( dropdownView.isOpen ) {\n\t\t\tdropdownView.panelView.focusLast();\n\t\t\tcancel();\n\t\t}\n\t} );\n}\n\n/**\n * Adds a behavior that focuses the #buttonView when the dropdown was closed but focus was within the #panelView element.\n * This makes sure the focus is never lost.\n */\nfunction focusDropdownButtonOnClose( dropdownView: DropdownView ) {\n\tdropdownView.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\tif ( isOpen ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elements = dropdownView.focusTracker.elements;\n\n\t\t// If the dropdown was closed, move the focus back to the button (https://github.com/ckeditor/ckeditor5/issues/12125).\n\t\t// Don't touch the focus, if it moved somewhere else (e.g. moved to the editing root on #execute).\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/12178.\n\t\t// Note: Don't use the state of the DropdownView#focusTracker here. It fires #blur with the timeout.\n\t\tif ( elements.some( element => element.contains( global.document.activeElement ) ) ) {\n\t\t\tdropdownView.buttonView.focus();\n\t\t}\n\t} );\n}\n\n/**\n * Adds a behavior that focuses the #panelView when dropdown gets open (accessibility).\n */\nfunction focusDropdownPanelOnOpen( dropdownView: DropdownView ) {\n\tdropdownView.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\tif ( !isOpen ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Focus the first item in the dropdown when the dropdown opened.\n\t\tdropdownView.panelView.focus();\n\n\t// * Let the panel show up first (do not focus an invisible element).\n\t// * Also, execute before focusChildOnDropdownOpen() to make sure this helper does not break the\n\t//   focus of a specific child by kicking in too late and resetting the focus in the panel.\n\t}, { priority: 'low' } );\n}\n\n/**\n * This helper populates a dropdown list with items and groups according to the\n * collection of item definitions. A permanent binding is created in this process allowing\n * dynamic management of the dropdown list content.\n *\n * @param dropdownView\n * @param listItems\n * @param definitions\n * @param locale\n */\nfunction bindViewCollectionItemsToDefinitions(\n\tdropdownView: DropdownView,\n\tlistItems: ViewCollection,\n\tdefinitions: Collection<ListDropdownItemDefinition>,\n\tlocale: Locale\n) {\n\tbindDropdownToggleableButtonsAlignment( listItems );\n\n\tlistItems.bindTo( definitions ).using( def => {\n\t\tif ( def.type === 'separator' ) {\n\t\t\treturn new ListSeparatorView( locale );\n\t\t} else if ( def.type === 'group' ) {\n\t\t\tconst groupView = new ListItemGroupView( locale );\n\n\t\t\tgroupView.set( { label: def.label } );\n\n\t\t\tbindViewCollectionItemsToDefinitions( dropdownView, groupView.items, def.items, locale );\n\n\t\t\tgroupView.items.delegate( 'execute' ).to( dropdownView );\n\n\t\t\treturn groupView;\n\t\t} else if ( def.type === 'button' || def.type === 'switchbutton' ) {\n\t\t\tconst isToggleable = def.model.role === 'menuitemcheckbox' || def.model.role === 'menuitemradio';\n\t\t\tconst listItemView = new ListItemView( locale );\n\n\t\t\tlet buttonView: ButtonView;\n\n\t\t\tif ( def.type === 'button' ) {\n\t\t\t\tbuttonView = new ListItemButtonView( locale, def.labelView );\n\t\t\t\tbuttonView.set( {\n\t\t\t\t\tisToggleable\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tbuttonView = new SwitchButtonView( locale );\n\t\t\t}\n\n\t\t\t// Bind all model properties to the button view.\n\t\t\tbuttonView.bind( ...Object.keys( def.model ) as Array<keyof ButtonView> ).to( def.model );\n\t\t\tbuttonView.delegate( 'execute' ).to( listItemView );\n\n\t\t\tlistItemView.children.add( buttonView );\n\n\t\t\treturn listItemView;\n\t\t}\n\n\t\treturn null;\n\t} );\n}\n\n/**\n * Sets up alignment handling for toggleable buttons in a dropdown list.\n *\n * Buttons in dropdowns have reserved space for a check icon when they are toggleable.\n * When at least one button in the list is toggleable, all other buttons (even non-toggleable ones)\n * will have space on their left side to align with toggleable buttons.\n *\n * This function handles a special case where a new toggleable button is added (or removed) to a list\n * where previous buttons weren't toggleable. In that case, those previous buttons will\n * automatically allocate space to align with the new toggleable button.\n *\n * Example:\n * ```\n * Before adding toggleable button:\n * +----------------+\n * | Normal Button  |\n * +----------------+\n * | Another Button |\n * +----------------+\n *\n * After adding toggleable button:\n * +-------------------+\n * |    Normal Button  |\n * +-------------------+\n * |    Another Button |\n * +-------------------+\n * | ✓ Toggle Button   |\n * +-------------------+\n * ```\n *\n * @param listItems Collection of list items to observe for toggleable buttons.\n */\nfunction bindDropdownToggleableButtonsAlignment( listItems: ViewCollection ) {\n\t// Keep track of how many toggleable buttons are in the list.\n\tlet toggleableButtonsCount = 0;\n\n\t// Helper function that checks if a view item is a list item button.\n\tconst pickListItemButtonIfPresent = ( item: View<HTMLElement> ) => {\n\t\t// Check if the item is a ListItemView with a ListItemButtonView as its first child.\n\t\tif ( !( item instanceof ListItemView ) || !( item.children.first instanceof ListItemButtonView ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn item.children.first;\n\t};\n\n\t// Helper function that checks if a view item is a toggleable button.\n\t// Returns the button if it's toggleable - otherwise, returns null.\n\tconst pickListItemToggleableButtonIfPresent = ( item: View<HTMLElement> ) => {\n\t\tconst listItemButtonView = pickListItemButtonIfPresent( item );\n\n\t\t// Only return buttons that are configured as toggleable.\n\t\tif ( !listItemButtonView || !listItemButtonView.isToggleable ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn listItemButtonView;\n\t};\n\n\t// Updates all buttons in the list to either allocate space for check marks or not.\n\t// This ensures all buttons are properly aligned regardless of their toggleable state.\n\tconst updateAllButtonsCheckSpace = ( hasSpace: boolean ): void => {\n\t\tfor ( const listItem of listItems ) {\n\t\t\tconst listItemButton = pickListItemButtonIfPresent( listItem );\n\n\t\t\tif ( listItemButton ) {\n\t\t\t\tlistItemButton.hasCheckSpace = hasSpace;\n\t\t\t}\n\t\t}\n\t};\n\n\t// Listen for changes in the list items collection.\n\tlistItems.on<CollectionChangeEvent<FocusableView>>( 'change', ( evt, data ) => {\n\t\t// Remember the current state - whether we have any toggleable buttons.\n\t\tconst prevToggleable = toggleableButtonsCount > 0;\n\n\t\t// Process removed items - decrease count for each toggleable button removed.\n\t\tfor ( const item of data.removed ) {\n\t\t\tif ( pickListItemToggleableButtonIfPresent( item ) ) {\n\t\t\t\ttoggleableButtonsCount--;\n\t\t\t}\n\t\t}\n\n\t\t// Process added items - increase count for each toggleable button added.\n\t\tfor ( const item of data.added ) {\n\t\t\tconst button = pickListItemButtonIfPresent( item );\n\n\t\t\tif ( !button ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( button.isToggleable ) {\n\t\t\t\t// Check if the button is toggleable and increase the count.\n\t\t\t\ttoggleableButtonsCount++;\n\t\t\t}\n\n\t\t\t// Depending on the current state, set the check space for the button.\n\t\t\tbutton.hasCheckSpace = toggleableButtonsCount > 0;\n\t\t}\n\n\t\t// Check if the current state has changed.\n\t\tconst currentToggleable = toggleableButtonsCount > 0;\n\n\t\t// Only update button alignment if we've crossed the threshold between\n\t\t// having no toggleable buttons and having at least one.\n\t\tif ( prevToggleable !== currentToggleable ) {\n\t\t\tupdateAllButtonsCheckSpace( currentToggleable );\n\t\t}\n\t} );\n}\n\n/**\n * A definition of the list item used by the {@link module:ui/dropdown/utils~addListToDropdown}\n * utility.\n */\nexport type ListDropdownItemDefinition =\n\tListDropdownSeparatorDefinition |\n\tListDropdownButtonDefinition |\n\tListDropdownGroupDefinition;\n\n/**\n * A definition of the 'separator' list item.\n */\nexport type ListDropdownSeparatorDefinition = {\n\ttype: 'separator';\n};\n\n/**\n * A definition of the 'button' or 'switchbutton' list item.\n */\nexport type ListDropdownButtonDefinition = {\n\ttype: 'button' | 'switchbutton';\n\n\t/**\n\t * Model of the item. Its properties fuel the newly created list item (or its children, depending on the `type`).\n\t */\n\tmodel: UIModel;\n\n\t/**\n\t * A view that will be used as a button body in the list item.\n\t */\n\tlabelView?: ButtonLabelView;\n};\n\n/**\n * A definition of the group inside the list. A group can contain one or more list items (buttons).\n */\nexport type ListDropdownGroupDefinition = {\n\ttype: 'group';\n\n\t/**\n\t * The visible label of the group.\n\t */\n\tlabel: string;\n\n\t/**\n\t * The collection of the child list items inside this group.\n\t */\n\titems: Collection<ListDropdownButtonDefinition>;\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/**\n * @module ui/labeledfield/utils\n */\n\nimport { InputTextView } from '../inputtext/inputtextview.js';\nimport { InputNumberView } from '../inputnumber/inputnumberview.js';\nimport { TextareaView } from '../textarea/textareaview.js';\nimport { createDropdown } from '../dropdown/utils.js';\n\nimport { type DropdownView } from '../dropdown/dropdownview.js';\nimport type { InputViewInputEvent } from '../input/inputview.js';\nimport type { LabeledFieldViewCreator } from './labeledfieldview.js';\n\n/**\n * A helper for creating labeled inputs.\n *\n * It creates an instance of a {@link module:ui/inputtext/inputtextview~InputTextView input text} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n *\n * The helper does the following:\n *\n * * It sets input's `id` and `ariaDescribedById` attributes.\n * * It binds input's `isReadOnly` to the labeled view.\n * * It binds input's `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when user starts typing in the input.\n *\n * Usage:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, createLabeledInputText );\n * console.log( labeledInputView.fieldView ); // A text input instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n * @returns The input text view instance.\n */\nconst createLabeledInputText: LabeledFieldViewCreator<InputTextView> = ( labeledFieldView, viewUid, statusUid ) => {\n\tconst inputView = new InputTextView( labeledFieldView.locale );\n\n\tinputView.set( {\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t} );\n\n\tinputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n\tinputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n\n\tinputView.on<InputViewInputEvent>( 'input', () => {\n\t\t// UX: Make the error text disappear and disable the error indicator as the user\n\t\t// starts fixing the errors.\n\t\tlabeledFieldView.errorText = null;\n\t} );\n\n\tlabeledFieldView.bind( 'isEmpty', 'isFocused', 'placeholder' ).to( inputView );\n\n\treturn inputView;\n};\n\n/**\n * A helper for creating labeled number inputs.\n *\n * It creates an instance of a {@link module:ui/inputnumber/inputnumberview~InputNumberView input number} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n *\n * The helper does the following:\n *\n * * It sets input's `id` and `ariaDescribedById` attributes.\n * * It binds input's `isReadOnly` to the labeled view.\n * * It binds input's `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when user starts typing in the input.\n *\n * Usage:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, createLabeledInputNumber );\n * console.log( labeledInputView.fieldView ); // A number input instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n * @returns The input number view instance.\n */\nconst createLabeledInputNumber: LabeledFieldViewCreator<InputNumberView> = ( labeledFieldView, viewUid, statusUid ) => {\n\tconst inputView = new InputNumberView( labeledFieldView.locale );\n\n\tinputView.set( {\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid,\n\t\tinputMode: 'numeric'\n\t} );\n\n\tinputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n\tinputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n\n\tinputView.on<InputViewInputEvent>( 'input', () => {\n\t\t// UX: Make the error text disappear and disable the error indicator as the user\n\t\t// starts fixing the errors.\n\t\tlabeledFieldView.errorText = null;\n\t} );\n\n\tlabeledFieldView.bind( 'isEmpty', 'isFocused', 'placeholder' ).to( inputView );\n\n\treturn inputView;\n};\n\n/**\n * A helper for creating labeled textarea.\n *\n * It creates an instance of a {@link module:ui/textarea/textareaview~TextareaView textarea} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n *\n * The helper does the following:\n *\n * * It sets textarea's `id` and `ariaDescribedById` attributes.\n * * It binds textarea's `isReadOnly` to the labeled view.\n * * It binds textarea's `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when user starts typing in the textarea.\n *\n * Usage:\n *\n * ```ts\n * const labeledTextarea = new LabeledFieldView( locale, createLabeledTextarea );\n * console.log( labeledTextarea.fieldView ); // A textarea instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the textarea.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the textarea.\n * @returns The textarea view instance.\n */\nconst createLabeledTextarea: LabeledFieldViewCreator<TextareaView> = ( labeledFieldView, viewUid, statusUid ) => {\n\tconst textareaView = new TextareaView( labeledFieldView.locale );\n\n\ttextareaView.set( {\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t} );\n\n\ttextareaView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n\ttextareaView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n\n\ttextareaView.on<InputViewInputEvent>( 'input', () => {\n\t\t// UX: Make the error text disappear and disable the error indicator as the user\n\t\t// starts fixing the errors.\n\t\tlabeledFieldView.errorText = null;\n\t} );\n\n\tlabeledFieldView.bind( 'isEmpty', 'isFocused', 'placeholder' ).to( textareaView );\n\n\treturn textareaView;\n};\n\n/**\n * A helper for creating labeled dropdowns.\n *\n * It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled field view}.\n *\n * The helper does the following:\n *\n * * It sets dropdown's `id` and `ariaDescribedById` attributes.\n * * It binds input's `isEnabled` to the labeled view.\n *\n * Usage:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, createLabeledDropdown );\n * console.log( labeledInputView.fieldView ); // A dropdown instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view label} and the dropdown.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view status} and the dropdown.\n * @returns The dropdown view instance.\n */\nconst createLabeledDropdown: LabeledFieldViewCreator<DropdownView> = ( labeledFieldView, viewUid, statusUid ) => {\n\tconst dropdownView = createDropdown( labeledFieldView.locale );\n\n\tdropdownView.set( {\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t} );\n\n\tdropdownView.bind( 'isEnabled' ).to( labeledFieldView );\n\n\treturn dropdownView;\n};\n\nexport {\n\tcreateLabeledInputNumber,\n\tcreateLabeledInputText,\n\tcreateLabeledTextarea,\n\tcreateLabeledDropdown\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/**\n * @module ui/colorpicker/colorpickerview\n */\n\nimport { convertColor, convertToHex, registerCustomElement, type ColorPickerViewConfig } from './utils.js';\n\nimport type { HexColor } from '@ckeditor/ckeditor5-core';\nimport { type Locale, global, env } from '@ckeditor/ckeditor5-utils';\nimport { debounce } from 'es-toolkit/compat';\nimport { View } from '../view.js';\nimport { type InputTextView } from '../inputtext/inputtextview.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { LabeledFieldView } from '../labeledfield/labeledfieldview.js';\nimport { createLabeledInputText } from '../labeledfield/utils.js';\n\n// Custom export due to https://github.com/ckeditor/ckeditor5/issues/15698.\nimport { HexBase } from 'vanilla-colorful/lib/entrypoints/hex';\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'hex-color-picker': HexBase;\n\t}\n}\n\nconst waitingTime = 150;\n\n/**\n * A class which represents a color picker with an input field for defining custom colors.\n */\nexport class ColorPickerView extends View {\n\t/**\n\t * Element with saturation and hue sliders.\n\t */\n\tdeclare public picker: HexBase;\n\n\t/**\n\t * Container for a `#` sign prefix and an input for displaying and defining custom colors\n\t * in HEX format.\n\t */\n\tpublic hexInputRow: ColorPickerInputRowView;\n\n\t/**\n\t * Current color selected in the color picker. It can be set by the component itself\n\t * (through the palette or input) or from the outside (e.g. to reflect the current selection color).\n\t */\n\tdeclare public color: string;\n\n\t/**\n\t * List of slider views of the color picker.\n\t */\n\tdeclare public slidersView: ViewCollection<SliderView>;\n\n\t/**\n\t * An internal representation of a color.\n\t *\n\t * Since the picker uses a hex format, that's how we store it.\n\t *\n\t * Since this is unified color format it won't fire a change event if color is changed\n\t * from `#f00` to `#ff0000` (same value, different format).\n\t *\n\t * @observable\n\t * @private\n\t */\n\tdeclare public _hexColor: string;\n\n\t/**\n\t * Debounced function updating the `color` property in the component\n\t * and firing the `ColorPickerColorSelectedEvent`. Executed whenever color in component\n\t * is changed by the user interaction (through the palette or input).\n\t *\n\t * @private\n\t */\n\tprivate _debounceColorPickerEvent: ReturnType<typeof debounce<( arg: string ) => void>>;\n\n\t/**\n\t * A reference to the configuration of the color picker specified in the constructor.\n\t *\n\t * @private\n\t */\n\tprivate _config: ColorPickerViewConfig;\n\n\t/**\n\t * Creates a view of color picker.\n\t *\n\t * @param locale\n\t * @param config\n\t */\n\tconstructor( locale: Locale | undefined, config: ColorPickerViewConfig = {} ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\tcolor: '',\n\t\t\t_hexColor: ''\n\t\t} );\n\n\t\tthis.hexInputRow = this._createInputRow();\n\t\tconst children = this.createCollection();\n\n\t\tif ( !config.hideInput ) {\n\t\t\tchildren.add( this.hexInputRow );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-color-picker' ],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren\n\t\t} );\n\n\t\tthis._config = config;\n\n\t\tthis._debounceColorPickerEvent = debounce( ( color: string ) => {\n\t\t\t// At first, set the color internally in the component. It's converted to the configured output format.\n\t\t\tthis.set( 'color', color );\n\n\t\t\t// Then let the outside world know that the user changed the color.\n\t\t\tthis.fire<ColorPickerColorSelectedEvent>( 'colorSelected', { color: this.color } );\n\t\t}, waitingTime, {\n\t\t\tleading: true\n\t\t} );\n\n\t\t// The `color` property holds the color in the configured output format.\n\t\t// Ensure it before actually setting the value.\n\t\tthis.on( 'set:color', ( evt, propertyName, newValue ) => {\n\t\t\tevt.return = convertColor( newValue, this._config.format || 'hsl' );\n\t\t} );\n\n\t\t// The `_hexColor` property is bound to the `color` one, but requires conversion.\n\t\tthis.on( 'change:color', () => {\n\t\t\tthis._hexColor = convertColorToCommonHexFormat( this.color );\n\t\t} );\n\n\t\tthis.on( 'change:_hexColor', () => {\n\t\t\t// Update the selected color in the color picker palette when it's not focused.\n\t\t\t// It means the user typed the color in the input.\n\t\t\tif ( document.activeElement !== this.picker ) {\n\t\t\t\tthis.picker.setAttribute( 'color', this._hexColor );\n\t\t\t}\n\n\t\t\t// There has to be two way binding between properties.\n\t\t\t// Extra precaution has to be taken to trigger change back only when the color really changes.\n\t\t\tif ( convertColorToCommonHexFormat( this.color ) != convertColorToCommonHexFormat( this._hexColor ) ) {\n\t\t\t\tthis.color = this._hexColor;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Renders color picker in the view.\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Extracted to the helper to make it testable.\n\t\tregisterCustomElement( 'hex-color-picker', HexBase );\n\n\t\tthis.picker = global.document.createElement( 'hex-color-picker' );\n\t\tthis.picker.setAttribute( 'class', 'hex-color-picker' );\n\t\tthis.picker.setAttribute( 'tabindex', '-1' );\n\n\t\tthis._createSlidersView();\n\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( this.element ) {\n\t\t\tif ( this.hexInputRow.element ) {\n\t\t\t\tthis.element.insertBefore( this.picker, this.hexInputRow.element );\n\t\t\t} else {\n\t\t\t\tthis.element.appendChild( this.picker );\n\t\t\t}\n\n\t\t\t// Create custom stylesheet with a look of focused pointer in color picker and append it into the color picker shadowDom\n\t\t\tconst styleSheetForFocusedColorPicker = document.createElement( 'style' );\n\n\t\t\tstyleSheetForFocusedColorPicker.textContent = '[role=\"slider\"]:focus [part$=\"pointer\"] {' +\n\t\t\t\t'border: 1px solid #fff;' +\n\t\t\t\t'outline: 1px solid var(--ck-color-focus-border);' +\n\t\t\t\t'box-shadow: 0 0 0 2px #fff;' +\n\t\t\t\t'}';\n\t\t\tthis.picker.shadowRoot!.appendChild( styleSheetForFocusedColorPicker );\n\t\t}\n\n\t\tthis.picker.addEventListener( 'color-changed', event => {\n\t\t\tconst color = event.detail.value;\n\t\t\tthis._debounceColorPickerEvent( color );\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the first pointer in color picker.\n\t *\n\t */\n\tpublic focus(): void {\n\t\t// In some browsers we need to move the focus to the input first.\n\t\t// Otherwise, the color picker doesn't behave as expected.\n\t\t// In Chrome, after selecting the color via slider the first time,\n\t\t// the editor collapses the selection and doesn't apply the color change.\n\t\t// In FF, after selecting the color via slider, it instantly moves back to the previous color.\n\t\t// In all iOS browsers and desktop Safari, once the saturation slider is moved for the first time,\n\t\t// editor collapses the selection and doesn't apply the color change.\n\t\t// See: https://github.com/ckeditor/ckeditor5-internal/issues/3245, https://github.com/ckeditor/ckeditor5/issues/14119,\n\t\t// https://github.com/ckeditor/ckeditor5-internal/issues/3268.\n\t\t/* v8 ignore next -- @preserve */\n\t\tif ( !this._config.hideInput && ( env.isGecko || env.isiOS || env.isSafari || env.isBlink ) ) {\n\t\t\tconst input: LabeledFieldView<InputTextView> = this.hexInputRow!.children.get( 1 )! as LabeledFieldView<InputTextView>;\n\n\t\t\tinput.focus();\n\t\t}\n\n\t\tconst firstSlider = this.slidersView.first!;\n\n\t\tfirstSlider.focus();\n\t}\n\n\t/**\n\t * Creates collection of sliders in color picker.\n\t *\n\t * @private\n\t */\n\tprivate _createSlidersView(): void {\n\t\tconst colorPickersChildren = [ ...this.picker.shadowRoot!.children ] as Array<HTMLElement>;\n\t\tconst sliders = colorPickersChildren.filter( item => item.getAttribute( 'role' ) === 'slider' );\n\n\t\tconst slidersView = sliders.map( slider => {\n\t\t\tconst view = new SliderView( slider );\n\n\t\t\treturn view;\n\t\t} );\n\n\t\tthis.slidersView = this.createCollection();\n\n\t\tslidersView.forEach( item => {\n\t\t\tthis.slidersView.add( item );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates input row for defining custom colors in color picker.\n\t *\n\t * @private\n\t */\n\tprivate _createInputRow(): ColorPickerInputRowView {\n\t\tconst colorInput = this._createColorInput();\n\n\t\treturn new ColorPickerInputRowView( this.locale!, colorInput );\n\t}\n\n\t/**\n\t * Creates the input where user can type or paste the color in hex format.\n\t *\n\t * @private\n\t */\n\tprivate _createColorInput(): LabeledFieldView<InputTextView> {\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\t\tconst { t } = this.locale!;\n\n\t\tlabeledInput.set( {\n\t\t\tlabel: t( 'HEX' ),\n\t\t\tclass: 'color-picker-hex-input'\n\t\t} );\n\n\t\tlabeledInput.fieldView.bind( 'value' ).to( this, '_hexColor', pickerColor => {\n\t\t\tif ( labeledInput.isFocused ) {\n\t\t\t\t// Text field shouldn't be updated with color change if the text field is focused.\n\t\t\t\t// Imagine user typing hex code and getting the value of field changed.\n\t\t\t\treturn labeledInput.fieldView.value;\n\t\t\t} else {\n\t\t\t\treturn pickerColor.startsWith( '#' ) ? pickerColor.substring( 1 ) : pickerColor;\n\t\t\t}\n\t\t} );\n\n\t\t// Only accept valid hex colors as input.\n\t\tlabeledInput.fieldView.on( 'input', () => {\n\t\t\tconst inputValue = labeledInput.fieldView.element!.value;\n\n\t\t\tif ( inputValue ) {\n\t\t\t\tconst maybeHexColor = tryParseHexColor( inputValue );\n\n\t\t\t\tif ( maybeHexColor ) {\n\t\t\t\t\t// If so, set the color.\n\t\t\t\t\t// Otherwise, do nothing.\n\t\t\t\t\tthis._debounceColorPickerEvent( maybeHexColor );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Validates the view and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tconst { t } = this.locale!;\n\n\t\t// If the input is hidden, it's always valid, because there is no way to select\n\t\t// invalid color value using diagram color picker.\n\t\tif ( this._config.hideInput ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.resetValidationStatus();\n\n\t\t// One error per field is enough.\n\t\tif ( !this.hexInputRow.getParsedColor() ) {\n\t\t\t// Apply updated error.\n\t\t\tthis.hexInputRow.inputView.errorText = t( 'Please enter a valid color (e.g. \"ff0000\").' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of input inside the {@link #hexInputRow}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tpublic resetValidationStatus(): void {\n\t\tthis.hexInputRow.inputView.errorText = null;\n\t}\n}\n\n// Converts any color format to a unified hex format.\n//\n// @param inputColor\n// @returns An unified hex string.\nfunction convertColorToCommonHexFormat( inputColor: string ): string {\n\tlet ret = convertToHex( inputColor );\n\n\tif ( !ret ) {\n\t\tret = '#000';\n\t}\n\n\tif ( ret.length === 4 ) {\n\t\t// Unfold shortcut format.\n\t\tret = '#' + [ ret[ 1 ], ret[ 1 ], ret[ 2 ], ret[ 2 ], ret[ 3 ], ret[ 3 ] ].join( '' );\n\t}\n\n\treturn ret.toLowerCase();\n}\n\n// View abstraction over pointer in color picker.\nexport class SliderView extends View {\n\t/**\n\t * @param element HTML element of slider in color picker.\n\t */\n\tconstructor( element: HTMLElement ) {\n\t\tsuper();\n\t\tthis.element = element;\n\t}\n\n\t/**\n\t * Focuses element.\n\t */\n\tpublic focus(): void {\n\t\tthis.element!.focus();\n\t}\n}\n\n// View abstraction over the `#` character before color input.\nclass HashView extends View {\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-picker__hash-view'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: '#'\n\t\t} );\n\t}\n}\n\n// The class representing a row containing hex color input field.\n// **Note**: For now this class is private. When more use cases appear (beyond `ckeditor5-table` and `ckeditor5-image`),\n// it will become a component in `ckeditor5-ui`.\n//\n// @private\nexport class ColorPickerInputRowView extends View {\n\t/**\n\t * A collection of row items (buttons, dropdowns, etc.).\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * Hex input view element.\n\t */\n\tpublic readonly inputView: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * Creates an instance of the form row class.\n\t *\n\t * @param locale The locale instance.\n\t * @param inputView Hex color input element.\n\t */\n\tconstructor( locale: Locale, inputView: LabeledFieldView<InputTextView> ) {\n\t\tsuper( locale );\n\n\t\tthis.inputView = inputView;\n\t\tthis.children = this.createCollection( [\n\t\t\tnew HashView(),\n\t\t\tthis.inputView\n\t\t] );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-picker__row'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * Returns false if color input value is not in hex format.\n\t */\n\tpublic getParsedColor(): HexColor | null {\n\t\treturn tryParseHexColor( this.inputView.fieldView.element!.value );\n\t}\n}\n\n/**\n * An event fired whenever the color was selected through the color picker palette\n * or the color picker input.\n *\n * This even fires only when the user changes the color. It does not fire when the color\n * is changed programmatically, e.g. via\n * {@link module:ui/colorpicker/colorpickerview~ColorPickerView#color}.\n *\n * @eventName ~ColorPickerView#colorSelected\n */\nexport type ColorPickerColorSelectedEvent = {\n\tname: 'colorSelected';\n\targs: [ {\n\t\tcolor: string;\n\t} ];\n};\n\n/**\n * Trim spaces from provided color and check if hex is valid.\n *\n * @param color Unsafe color string.\n * @returns Null if provided color is not hex value.\n * @export\n * @internal\n */\nexport function tryParseHexColor<S extends string>( color: S | null | undefined ): HexColor<S> | null {\n\tif ( !color ) {\n\t\treturn null;\n\t}\n\n\tconst hashLessColor = color.trim().replace( /^#/, '' );\n\n\t// Incorrect length.\n\tif ( ![ 3, 4, 6, 8 ].includes( hashLessColor.length ) ) {\n\t\treturn null;\n\t}\n\n\t// Incorrect characters.\n\tif ( !/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test( hashLessColor ) ) {\n\t\treturn null;\n\t}\n\n\treturn `#${ hashLessColor }` as `#${ S }`;\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/**\n * @module ui/colorselector/documentcolorcollection\n */\n\nimport type { ColorDefinition } from '../colorgrid/colorgridview.js';\nimport {\n\tCollection,\n\tObservableMixin,\n\ttype CollectionAddEvent,\n\ttype CollectionRemoveEvent,\n\ttype CollectionChangeEvent,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nconst DocumentColorCollectionBase: ObservableMixinConstructor<typeof Collection<ColorDefinition>> =\n\t/* #__PURE__ */ ObservableMixin( Collection<ColorDefinition> );\n\n/**\n * A collection to store document colors. It enforces colors to be unique.\n */\nexport class DocumentColorCollection extends DocumentColorCollectionBase {\n\t/**\n\t * Indicates whether the document color collection is empty.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isEmpty: boolean;\n\n\tconstructor( options?: any ) {\n\t\tsuper( options );\n\n\t\tthis.set( 'isEmpty', true );\n\n\t\tthis.on( 'change', () => {\n\t\t\tthis.set( 'isEmpty', this.length === 0 );\n\t\t} );\n\t}\n\n\t/**\n\t * Adds a color to the document color collection.\n\t *\n\t * This method ensures that no color duplicates are inserted (compared using\n\t * the color value of the {@link module:ui/colorgrid/colorgridview~ColorDefinition}).\n\t *\n\t * If the item does not have an ID, it will be automatically generated and set on the item.\n\t *\n\t * @param index The position of the item in the collection. The item is pushed to the collection when `index` is not specified.\n\t * @fires add\n\t * @fires change\n\t */\n\tpublic override add( item: ColorDefinition, index?: number ): this {\n\t\tif ( this.find( element => element.color === item.color ) ) {\n\t\t\t// No duplicates are allowed.\n\t\t\treturn this;\n\t\t}\n\n\t\treturn super.add( item, index );\n\t}\n\n\t/**\n\t * Checks if an object with given colors is present in the document color collection.\n\t */\n\tpublic hasColor( color: string ): boolean {\n\t\treturn !!this.find( item => item.color === color );\n\t}\n}\n\n/**\n * Fired when the collection was changed due to adding or removing items.\n *\n * @eventName ~DocumentColorCollection#change\n * @param data Changed items.\n */\nexport type DocumentColorCollectionChangeEvent = CollectionChangeEvent;\n\n/**\n * Fired when an item is added to the collection.\n *\n * @eventName ~DocumentColorCollection#add\n * @param item The added item.\n * @param index An index where the addition occurred.\n */\nexport type DocumentColorCollectionAddEvent = CollectionAddEvent;\n\n/**\n * Fired when an item is removed from the collection.\n *\n * @eventName ~DocumentColorCollection#remove\n * @param item The removed item.\n * @param index Index from which item was removed.\n */\nexport type DocumentColorCollectionRemoveEvent = CollectionRemoveEvent;\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/**\n * @module ui/colorselector/colorgridsfragmentview\n */\n\nimport { View } from '../view.js';\nimport { ButtonView } from '../button/buttonview.js';\nimport { ColorGridView, type ColorDefinition } from '../colorgrid/colorgridview.js';\nimport { ColorTileView } from '../colorgrid/colortileview.js';\nimport { Template } from '../template.js';\n\nimport { DocumentColorCollection } from './documentcolorcollection.js';\n\nimport type { Model } from '@ckeditor/ckeditor5-engine';\nimport type { FocusTracker, Locale } from '@ckeditor/ckeditor5-utils';\nimport { type ViewCollection } from '../viewcollection.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport type { ColorSelectorExecuteEvent, ColorSelectorColorPickerShowEvent } from './colorselectorview.js';\n\nimport { IconEraser, IconColorPalette } from '@ckeditor/ckeditor5-icons';\n\n/**\n * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n *\n * It provides a UI that allows users to select colors from the a predefined set and from existing document colors.\n *\n * It consists of the following sub–components:\n *\n * * A \"Remove color\" button,\n * * A static {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors defined in the configuration,\n * * A dynamic {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors used in the document.\n * * If color picker is configured, the \"Color Picker\" button is visible too.\n */\nexport class ColorGridsFragmentView extends View {\n\t/**\n\t * A collection of the children of the table.\n\t */\n\tpublic readonly items: ViewCollection;\n\n\t/**\n\t * An array with objects representing colors to be displayed in the grid.\n\t */\n\tpublic colorDefinitions: Array<ColorDefinition>;\n\n\t/**\n\t * Tracks information about the DOM focus in the list.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * The number of columns in the color grid.\n\t */\n\tpublic columns: number;\n\n\t/**\n\t * Preserves the reference to {@link module:ui/colorselector/documentcolorcollection~DocumentColorCollection} used to collect\n\t * definitions that store the document colors.\n\t *\n\t * @readonly\n\t */\n\tpublic documentColors: DocumentColorCollection;\n\n\t/**\n\t * The maximum number of colors in the document colors section.\n\t * If it equals 0, the document colors section is not added.\n\t *\n\t * @readonly\n\t */\n\tpublic documentColorsCount?: number;\n\n\t/**\n\t * Keeps the value of the command associated with the table for the current selection.\n\t */\n\tdeclare public selectedColor: string;\n\n\t/**\n\t * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t * the default (static) color set.\n\t *\n\t * The property is loaded once the the parent dropdown is opened the first time.\n\t *\n\t * @readonly\n\t */\n\tpublic staticColorsGrid: ColorGridView | undefined;\n\n\t/**\n\t * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t * the document colors. It remains undefined if the document colors feature is disabled.\n\t *\n\t * The property is loaded once the the parent dropdown is opened the first time.\n\t *\n\t * @readonly\n\t */\n\tpublic documentColorsGrid: ColorGridView | undefined;\n\n\t/**\n\t * The \"Color picker\" button view.\n\t */\n\tpublic colorPickerButtonView?: ButtonView;\n\n\t/**\n\t * The \"Remove color\" button view.\n\t */\n\tpublic removeColorButtonView: ButtonView;\n\n\t/**\n\t * The property which is responsible for is component visible or not.\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Document color section's label.\n\t *\n\t * @readonly\n\t */\n\tprivate _documentColorsLabel?: string;\n\n\t/**\n\t * The label of the button responsible for removing color attributes.\n\t */\n\tprivate _removeButtonLabel: string;\n\n\t/**\n\t * The label of the button responsible for switching to the color picker component.\n\t */\n\tprivate _colorPickerLabel: string;\n\n\t/**\n\t * Creates an instance of the view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param options Constructor options.\n\t * @param options.colors An array with definitions of colors to be displayed in the table.\n\t * @param options.columns The number of columns in the color grid.\n\t * @param options.removeButtonLabel The label of the button responsible for removing the color.\n\t * @param options.colorPickerLabel The label of the button responsible for color picker appearing.\n\t * @param options.documentColorsLabel The label for the section with the document colors.\n\t * @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t * @param options.focusTracker Tracks information about the DOM focus in the list.\n\t * @param options.focusables A collection of views that can be focused in the view.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\t{\n\t\t\tcolors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount,\n\t\t\tcolorPickerLabel, focusTracker, focusables\n\t\t}: {\n\t\t\tcolors: Array<ColorDefinition>;\n\t\t\tcolumns: number;\n\t\t\tremoveButtonLabel: string;\n\t\t\tcolorPickerLabel: string;\n\t\t\tdocumentColorsLabel?: string;\n\t\t\tdocumentColorsCount?: number;\n\t\t\tfocusTracker: FocusTracker;\n\t\t\tfocusables: ViewCollection<FocusableView>;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isVisible', true );\n\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.items = this.createCollection();\n\t\tthis.colorDefinitions = colors;\n\t\tthis.columns = columns;\n\t\tthis.documentColors = new DocumentColorCollection();\n\t\tthis.documentColorsCount = documentColorsCount;\n\n\t\tthis._focusables = focusables;\n\t\tthis._removeButtonLabel = removeButtonLabel;\n\t\tthis._colorPickerLabel = colorPickerLabel;\n\t\tthis._documentColorsLabel = documentColorsLabel;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-color-grids-fragment',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t} );\n\n\t\tthis.removeColorButtonView = this._createRemoveColorButton();\n\n\t\tthis.items.add( this.removeColorButtonView );\n\t}\n\n\t/**\n\t * Scans through the editor model and searches for text node attributes with the given attribute name.\n\t * Found entries are set as document colors.\n\t *\n\t * All the previously stored document colors will be lost in the process.\n\t *\n\t * @param model The model used as a source to obtain the document colors.\n\t * @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t */\n\tpublic updateDocumentColors( model: Model, attributeName: string ): void {\n\t\tconst document = model.document;\n\t\tconst maxCount = this.documentColorsCount;\n\n\t\tthis.documentColors.clear();\n\n\t\tfor ( const root of document.getRoots() ) {\n\t\t\tconst range = model.createRangeIn( root );\n\n\t\t\tfor ( const node of range.getItems() ) {\n\t\t\t\tif ( node.is( '$textProxy' ) && node.hasAttribute( attributeName ) ) {\n\t\t\t\t\tthis._addColorToDocumentColors( node.getAttribute( attributeName ) as string );\n\n\t\t\t\t\tif ( this.documentColors.length >= maxCount! ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Refreshes the state of the selected color in one or both {@link module:ui/colorgrid/colorgridview~ColorGridView}s\n\t * available in the {@link module:ui/colorselector/colorselectorview~ColorSelectorView}. It guarantees that the selection will\n\t * occur only in one of them.\n\t */\n\tpublic updateSelectedColors(): void {\n\t\tconst documentColorsGrid = this.documentColorsGrid;\n\t\tconst staticColorsGrid = this.staticColorsGrid!;\n\t\tconst selectedColor = this.selectedColor;\n\n\t\tstaticColorsGrid.selectedColor = selectedColor;\n\n\t\tif ( documentColorsGrid ) {\n\t\t\tdocumentColorsGrid.selectedColor = selectedColor;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.staticColorsGrid = this._createStaticColorsGrid();\n\n\t\tthis.items.add( this.staticColorsGrid );\n\n\t\tif ( this.documentColorsCount ) {\n\t\t\t// Create a label for document colors.\n\t\t\tconst bind = Template.bind( this.documentColors, this.documentColors );\n\t\t\tconst label = new View( this.locale );\n\t\t\tlabel.setTemplate( {\n\t\t\t\ttag: 'span',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-color-grid__label',\n\t\t\t\t\t\tbind.if( 'isEmpty', 'ck-hidden' )\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: this._documentColorsLabel\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t} );\n\t\t\tthis.items.add( label );\n\t\t\tthis.documentColorsGrid = this._createDocumentColorsGrid();\n\n\t\t\tthis.items.add( this.documentColorsGrid );\n\t\t}\n\t\tthis._createColorPickerButton();\n\n\t\tthis._addColorSelectorElementsToFocusTracker();\n\t}\n\n\t/**\n\t * Focuses the component.\n\t */\n\tpublic focus(): void {\n\t\tthis.removeColorButtonView.focus();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Handles displaying the color picker button (if it was previously created) and making it focusable.\n\t */\n\tpublic addColorPickerButton(): void {\n\t\tif ( this.colorPickerButtonView ) {\n\t\t\tthis.items.add( this.colorPickerButtonView );\n\t\t\tthis.focusTracker.add( this.colorPickerButtonView.element! );\n\t\t\tthis._focusables.add( this.colorPickerButtonView );\n\t\t}\n\t}\n\n\t/**\n\t * Adds color selector elements to focus tracker.\n\t */\n\tprivate _addColorSelectorElementsToFocusTracker(): void {\n\t\tthis.focusTracker.add( this.removeColorButtonView.element! );\n\t\tthis._focusables.add( this.removeColorButtonView );\n\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( this.staticColorsGrid ) {\n\t\t\tthis.focusTracker.add( this.staticColorsGrid.element! );\n\t\t\tthis._focusables.add( this.staticColorsGrid );\n\t\t}\n\n\t\tif ( this.documentColorsGrid ) {\n\t\t\tthis.focusTracker.add( this.documentColorsGrid.element! );\n\t\t\tthis._focusables.add( this.documentColorsGrid );\n\t\t}\n\t}\n\n\t/**\n\t * Creates the button responsible for displaying the color picker component.\n\t */\n\tprivate _createColorPickerButton(): void {\n\t\tthis.colorPickerButtonView = new ButtonView();\n\n\t\tthis.colorPickerButtonView.set( {\n\t\t\tlabel: this._colorPickerLabel,\n\t\t\twithText: true,\n\t\t\ticon: IconColorPalette,\n\t\t\tclass: 'ck-color-selector__color-picker'\n\t\t} );\n\n\t\tthis.colorPickerButtonView.on( 'execute', () => {\n\t\t\tthis.fire<ColorSelectorColorPickerShowEvent>( 'colorPicker:show' );\n\t\t} );\n\t}\n\n\t/**\n\t * Adds the remove color button as a child of the current view.\n\t */\n\tprivate _createRemoveColorButton(): ButtonView {\n\t\tconst buttonView = new ButtonView();\n\n\t\tbuttonView.set( {\n\t\t\twithText: true,\n\t\t\ticon: IconEraser,\n\t\t\tlabel: this._removeButtonLabel\n\t\t} );\n\n\t\tbuttonView.class = 'ck-color-selector__remove-color';\n\t\tbuttonView.on( 'execute', () => {\n\t\t\tthis.fire( 'execute', {\n\t\t\t\tvalue: null,\n\t\t\t\tsource: 'removeColorButton'\n\t\t\t} );\n\t\t} );\n\n\t\tbuttonView.render();\n\n\t\treturn buttonView;\n\t}\n\n\t/**\n\t * Creates a static color grid based on the editor configuration.\n\t */\n\tprivate _createStaticColorsGrid(): ColorGridView {\n\t\tconst colorGrid = new ColorGridView( this.locale, {\n\t\t\tcolorDefinitions: this.colorDefinitions,\n\t\t\tcolumns: this.columns\n\t\t} );\n\n\t\tcolorGrid.on( 'execute', ( evt, data ) => {\n\t\t\tthis.fire<ColorSelectorExecuteEvent>( 'execute', {\n\t\t\t\tvalue: data.value,\n\t\t\t\tsource: 'staticColorsGrid'\n\t\t\t} );\n\t\t} );\n\n\t\treturn colorGrid;\n\t}\n\n\t/**\n\t * Creates the document colors section view and binds it to {@link #documentColors}.\n\t */\n\tprivate _createDocumentColorsGrid(): ColorGridView {\n\t\tconst bind = Template.bind( this.documentColors, this.documentColors );\n\t\tconst documentColorsGrid = new ColorGridView( this.locale, {\n\t\t\tcolumns: this.columns\n\t\t} );\n\n\t\tdocumentColorsGrid.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: bind.if( 'isEmpty', 'ck-hidden' )\n\t\t\t}\n\t\t} );\n\n\t\tdocumentColorsGrid.items.bindTo( this.documentColors ).using(\n\t\t\tcolorObj => {\n\t\t\t\tconst colorTile = new ColorTileView();\n\n\t\t\t\tcolorTile.set( {\n\t\t\t\t\tcolor: colorObj.color,\n\t\t\t\t\thasBorder: colorObj.options?.hasBorder\n\t\t\t\t} );\n\n\t\t\t\tif ( colorObj.label ) {\n\t\t\t\t\tcolorTile.set( {\n\t\t\t\t\t\tlabel: colorObj.label,\n\t\t\t\t\t\ttooltip: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tcolorTile.on( 'execute', () => {\n\t\t\t\t\tthis.fire<ColorSelectorExecuteEvent>( 'execute', {\n\t\t\t\t\t\tvalue: colorObj.color,\n\t\t\t\t\t\tsource: 'documentColorsGrid'\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\t\treturn colorTile;\n\t\t\t}\n\t\t);\n\n\t\t// Selected color should be cleared when document colors became empty.\n\t\tthis.documentColors.on( 'change:isEmpty', ( evt, name, val ) => {\n\t\t\tif ( val ) {\n\t\t\t\tdocumentColorsGrid.selectedColor = null;\n\t\t\t}\n\t\t} );\n\n\t\treturn documentColorsGrid;\n\t}\n\n\t/**\n\t * Adds a given color to the document colors list. If possible, the method will attempt to use\n\t * data from the {@link #colorDefinitions} (label, color options).\n\t *\n\t * @param color A string that stores the value of the recently applied color.\n\t */\n\tprivate _addColorToDocumentColors( color: string ): void {\n\t\tconst predefinedColor = this.colorDefinitions\n\t\t\t.find( definition => definition.color === color );\n\n\t\tif ( !predefinedColor ) {\n\t\t\tthis.documentColors.add( {\n\t\t\t\tcolor,\n\t\t\t\tlabel: color,\n\t\t\t\toptions: {\n\t\t\t\t\thasBorder: false\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.documentColors.add( Object.assign( {}, predefinedColor ) );\n\t\t}\n\t}\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/**\n * @module ui/colorselector/colorpickerfragmentview\n */\n\nimport { View } from '../view.js';\nimport { ButtonView } from '../button/buttonview.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport { type LabeledFieldView } from '../labeledfield/labeledfieldview.js';\nimport { type InputTextView } from '../inputtext/inputtextview.js';\nimport {\n\tColorPickerView,\n\ttype ColorPickerColorSelectedEvent\n} from '../colorpicker/colorpickerview.js';\n\nimport type { FocusTracker, KeystrokeHandler, Locale } from '@ckeditor/ckeditor5-utils';\nimport type { ColorPickerViewConfig } from '../colorpicker/utils.js';\nimport type { ColorSelectorColorPickerCancelEvent, ColorSelectorExecuteEvent } from './colorselectorview.js';\nimport { IconCancel, IconCheck } from '@ckeditor/ckeditor5-icons';\n\n/**\n * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n *\n * It allows users to select a color from a color picker.\n *\n * It consists of the following sub–components:\n *\n * * A color picker saturation and hue sliders,\n * * A text input accepting colors in HEX format,\n * * \"Save\" and \"Cancel\" action buttons.\n */\nexport class ColorPickerFragmentView extends View {\n\t/**\n\t * A collection of component's children.\n\t */\n\tpublic readonly items: ViewCollection;\n\n\t/**\n\t * A view with saturation and hue sliders and color input.\n\t */\n\tpublic colorPickerView?: ColorPickerView;\n\n\t/**\n\t * The \"Save\" button view.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * The \"Cancel\" button view.\n\t */\n\tpublic cancelButtonView: ButtonView;\n\n\t/**\n\t * The action bar where are \"Save\" button and \"Cancel\" button.\n\t */\n\tpublic actionBarView: View;\n\n\t/**\n\t * Tracks information about the DOM focus in the list.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Indicates whether the component is visible or not.\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Keeps the value of the command associated with the component for the current selection.\n\t */\n\tdeclare public selectedColor?: string;\n\n\t/**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * A reference to the configuration of {@link #colorPickerView}. `false` when the view was\n\t * configured without a color picker.\n\t *\n\t * @readonly\n\t */\n\tprivate _colorPickerViewConfig: ColorPickerViewConfig | false;\n\n\t/**\n\t * Creates an instance of the view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param options Constructor options.\n\t * @param options.focusTracker Tracks information about the DOM focus in the list.\n\t * @param options.focusables A collection of views that can be focused in the view.\n\t * @param options.keystrokes An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t * @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker\n\t * will not be rendered.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\t{\n\t\t\tfocusTracker,\n\t\t\tfocusables,\n\t\t\tkeystrokes,\n\t\t\tcolorPickerViewConfig\n\t\t}:\n\t\t{\n\t\t\tfocusTracker: FocusTracker;\n\t\t\tfocusables: ViewCollection<FocusableView>;\n\t\t\tkeystrokes: KeystrokeHandler;\n\t\t\tcolorPickerViewConfig: ColorPickerViewConfig | false;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.keystrokes = keystrokes;\n\n\t\tthis.set( 'isVisible', false );\n\t\tthis.set( 'selectedColor', undefined );\n\n\t\tthis._focusables = focusables;\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\n\t\tconst bind = this.bindTemplate;\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.actionBarView = this._createActionBarView( { saveButtonView, cancelButtonView } );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-color-picker-fragment',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tconst colorPickerView = new ColorPickerView( this.locale, {\n\t\t\t...this._colorPickerViewConfig\n\t\t} as ColorPickerViewConfig );\n\n\t\tthis.colorPickerView = colorPickerView;\n\t\tthis.colorPickerView.render();\n\n\t\tif ( this.selectedColor ) {\n\t\t\tcolorPickerView.color = this.selectedColor;\n\t\t}\n\n\t\tthis.listenTo( this, 'change:selectedColor', ( evt, name, value ) => {\n\t\t\tcolorPickerView.color = value;\n\t\t} );\n\n\t\tthis.items.add( this.colorPickerView );\n\t\tthis.items.add( this.actionBarView );\n\n\t\tthis._addColorPickersElementsToFocusTracker();\n\t\tthis._stopPropagationOnArrowsKeys();\n\t\tthis._executeOnEnterPress();\n\t\tthis._executeUponColorChange();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Focuses the color picker.\n\t */\n\tpublic focus(): void {\n\t\tthis.colorPickerView!.focus();\n\t}\n\n\t/**\n\t * Reset validation messages.\n\t */\n\tpublic resetValidationStatus(): void {\n\t\tthis.colorPickerView!.resetValidationStatus();\n\t}\n\n\t/**\n\t * When color picker is focused and \"enter\" is pressed it executes command.\n\t */\n\tprivate _executeOnEnterPress(): void {\n\t\tthis.keystrokes.set( 'enter', evt => {\n\t\t\tif ( this.isVisible && this.focusTracker.focusedElement !== this.cancelButtonView.element && this.colorPickerView!.isValid() ) {\n\t\t\t\tthis.fire( 'execute', {\n\t\t\t\t\tvalue: this.selectedColor!\n\t\t\t\t} );\n\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Removes default behavior of arrow keys in dropdown.\n\t */\n\tprivate _stopPropagationOnArrowsKeys(): void {\n\t\tconst stopPropagation = ( data: KeyboardEvent ) => data.stopPropagation();\n\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t}\n\n\t/**\n\t * Adds color picker elements to focus tracker.\n\t */\n\tprivate _addColorPickersElementsToFocusTracker(): void {\n\t\tfor ( const slider of this.colorPickerView!.slidersView ) {\n\t\t\tthis.focusTracker.add( slider.element! );\n\t\t\tthis._focusables.add( slider );\n\t\t}\n\n\t\tconst input = this.colorPickerView!.hexInputRow.children.get( 1 ) as LabeledFieldView<InputTextView>;\n\n\t\tif ( input.element! ) {\n\t\t\tthis.focusTracker.add( input.element );\n\t\t\tthis._focusables.add( input );\n\t\t}\n\n\t\tthis.focusTracker.add( this.saveButtonView.element! );\n\t\tthis._focusables.add( this.saveButtonView );\n\n\t\tthis.focusTracker.add( this.cancelButtonView.element! );\n\t\tthis._focusables.add( this.cancelButtonView );\n\t}\n\n\t/**\n\t * Creates bar containing \"Save\" and \"Cancel\" buttons.\n\t */\n\tprivate _createActionBarView( { saveButtonView, cancelButtonView }: {\n\t\tsaveButtonView: ButtonView;\n\t\tcancelButtonView: ButtonView;\n\t} ): View {\n\t\tconst actionBarRow = new View();\n\t\tconst children = this.createCollection();\n\n\t\tchildren.add( saveButtonView );\n\t\tchildren.add( cancelButtonView );\n\n\t\tactionBarRow.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-selector_action-bar'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren\n\t\t} );\n\n\t\treturn actionBarRow;\n\t}\n\n\t/**\n\t * Creates \"Save\" and \"Cancel\" buttons.\n\t */\n\tprivate _createActionButtons() {\n\t\tconst locale = this.locale;\n\t\tconst t = locale!.t;\n\t\tconst saveButtonView = new ButtonView( locale );\n\t\tconst cancelButtonView = new ButtonView( locale );\n\n\t\tsaveButtonView.set( {\n\t\t\ticon: IconCheck,\n\t\t\tclass: 'ck-button-save',\n\t\t\ttype: 'button',\n\t\t\twithText: false,\n\t\t\tlabel: t( 'Accept' )\n\t\t} );\n\n\t\tcancelButtonView.set( {\n\t\t\ticon: IconCancel,\n\t\t\tclass: 'ck-button-cancel',\n\t\t\ttype: 'button',\n\t\t\twithText: false,\n\t\t\tlabel: t( 'Cancel' )\n\t\t} );\n\n\t\tsaveButtonView.on( 'execute', () => {\n\t\t\tif ( this.colorPickerView!.isValid() ) {\n\t\t\t\tthis.fire<ColorSelectorExecuteEvent>( 'execute', {\n\t\t\t\t\tsource: 'colorPickerSaveButton',\n\t\t\t\t\tvalue: this.selectedColor!\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tcancelButtonView.on( 'execute', () => {\n\t\t\tthis.fire<ColorSelectorColorPickerCancelEvent>( 'colorPicker:cancel' );\n\t\t} );\n\n\t\treturn {\n\t\t\tsaveButtonView, cancelButtonView\n\t\t};\n\t}\n\n\t/**\n\t * Fires the `execute` event if color in color picker has been changed\n\t * by the user.\n\t */\n\tprivate _executeUponColorChange() {\n\t\tthis.colorPickerView!.on<ColorPickerColorSelectedEvent>( 'colorSelected', ( evt, data ) => {\n\t\t\tthis.fire<ColorSelectorExecuteEvent>( 'execute', {\n\t\t\t\tvalue: data.color,\n\t\t\t\tsource: 'colorPicker'\n\t\t\t} );\n\t\t\tthis.set( 'selectedColor', data.color );\n\t\t} );\n\t}\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/**\n * @module ui/colorselector/colorselectorview\n */\n\nimport { FocusCycler, type FocusableView } from '../focuscycler.js';\nimport { View } from '../view.js';\nimport { ViewCollection } from '../viewcollection.js';\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport type { ColorPickerViewConfig } from '../colorpicker/utils.js';\nimport type { ColorDefinition } from '../colorgrid/colorgridview.js';\nimport type { Model } from '@ckeditor/ckeditor5-engine';\n\nimport { ColorGridsFragmentView } from './colorgridsfragmentview.js';\nimport { ColorPickerFragmentView } from './colorpickerfragmentview.js';\n\n/**\n * The configurable color selector view class. It allows users to select colors from a predefined set of colors as well as from\n * a color picker.\n *\n * This meta-view is is made of two components (fragments):\n *\n * * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorGridsFragmentView},\n * * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView}.\n *\n * ```ts\n * const colorDefinitions = [\n * \t{ color: '#000', label: 'Black', options: { hasBorder: false } },\n * \t{ color: 'rgb(255, 255, 255)', label: 'White', options: { hasBorder: true } },\n * \t{ color: 'red', label: 'Red', options: { hasBorder: false } }\n * ];\n *\n * const selectorView = new ColorSelectorView( locale, {\n * \tcolors: colorDefinitions,\n * \tcolumns: 5,\n * \tremoveButtonLabel: 'Remove color',\n * \tdocumentColorsLabel: 'Document colors',\n * \tdocumentColorsCount: 4,\n * \tcolorPickerViewConfig: {\n * \t\tformat: 'hsl'\n * \t}\n * } );\n *\n * selectorView.appendUI();\n * selectorView.selectedColor = 'red';\n * selectorView.updateSelectedColors();\n *\n * selectorView.on<ColorSelectorExecuteEvent>( 'execute', ( evt, data ) => {\n * \tconsole.log( 'Color changed', data.value, data.source );\n * } );\n *\n * selectorView.on<ColorSelectorColorPickerShowEvent>( 'colorPicker:show', ( evt ) => {\n * \tconsole.log( 'Color picker showed up', evt );\n * } );\n *\n * selectorView.on<ColorSelectorColorPickerCancelEvent>( 'colorPicker:cancel', ( evt ) => {\n * \tconsole.log( 'Color picker cancel', evt );\n * } );\n *\n * selectorView.render();\n *\n * document.body.appendChild( selectorView.element );\n * ```\n */\nexport class ColorSelectorView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the list.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A collection of components.\n\t */\n\tpublic readonly items: ViewCollection;\n\n\t/**\n\t * A fragment that allows users to select colors from the a predefined set and from existing document colors.\n\t */\n\tpublic readonly colorGridsFragmentView: ColorGridsFragmentView;\n\n\t/**\n\t * A fragment that allows users to select a color from a color picker.\n\t */\n\tpublic readonly colorPickerFragmentView: ColorPickerFragmentView;\n\n\t/**\n\t * Keeps the value of the command associated with the component for the current selection.\n\t */\n\tdeclare public selectedColor?: string;\n\n\t/**\n\t * Reflects the visibility state of the color grids fragment.\n\t *\n\t * @internal\n\t */\n\tdeclare public _isColorGridsFragmentVisible: boolean;\n\n\t/**\n\t * Reflects the visibility state of the color picker fragment.\n\t *\n\t * @internal\n\t */\n\tdeclare public _isColorPickerFragmentVisible: boolean;\n\n\t/**\n\t * Helps cycling over focusable {@link #items} in the list.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusCycler: FocusCycler;\n\n\t/**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * The configuration of color picker sub-component.\n\t */\n\tprivate _colorPickerViewConfig: ColorPickerViewConfig | false;\n\n\t/**\n\t * Creates a view to be inserted as a child of {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param options Constructor options.\n\t * @param options.colors An array with definitions of colors to be displayed in the table.\n\t * @param options.columns The number of columns in the color grid.\n\t * @param options.removeButtonLabel The label of the button responsible for removing the color.\n\t * @param options.colorPickerLabel The label of the button responsible for color picker appearing.\n\t * @param options.documentColorsLabel The label for the section with the document colors.\n\t * @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t * @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker will be hidden.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\t{\n\t\t\tcolors,\n\t\t\tcolumns,\n\t\t\tremoveButtonLabel,\n\t\t\tdocumentColorsLabel,\n\t\t\tdocumentColorsCount,\n\t\t\tcolorPickerLabel,\n\t\t\tcolorPickerViewConfig\n\t\t}: {\n\t\t\tcolors: Array<ColorDefinition>;\n\t\t\tcolumns: number;\n\t\t\tremoveButtonLabel: string;\n\t\t\tdocumentColorsLabel?: string;\n\t\t\tdocumentColorsCount?: number;\n\t\t\tcolorPickerLabel: string;\n\t\t\tcolorPickerViewConfig: ColorPickerViewConfig | false;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\t\tthis.items = this.createCollection();\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate list items backwards using the <kbd>Shift</kbd> + <kbd>Tab</kbd> keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate list items forwards using the <kbd>Tab</kbd> key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.colorGridsFragmentView = new ColorGridsFragmentView( locale, {\n\t\t\tcolors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tfocusables: this._focusables\n\t\t} );\n\n\t\tthis.colorPickerFragmentView = new ColorPickerFragmentView( locale, {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokes: this.keystrokes,\n\t\t\tcolorPickerViewConfig\n\t\t} );\n\n\t\tthis.set( '_isColorGridsFragmentVisible', true );\n\t\tthis.set( '_isColorPickerFragmentVisible', false );\n\n\t\tthis.set( 'selectedColor', undefined );\n\n\t\tthis.colorGridsFragmentView.bind( 'isVisible' ).to( this, '_isColorGridsFragmentVisible' );\n\t\tthis.colorPickerFragmentView.bind( 'isVisible' ).to( this, '_isColorPickerFragmentVisible' );\n\n\t\t/**\n\t\t * This is kind of bindings. Unfortunately we could not use this.bind() method because the same property\n\t\t * cannot be bound twice. So this is work around how to bind 'selectedColor' property between components.\n\t\t */\n\t\tthis.on( 'change:selectedColor', ( evt, evtName, data ) => {\n\t\t\tthis.colorGridsFragmentView.set( 'selectedColor', data );\n\t\t\tthis.colorPickerFragmentView.set( 'selectedColor', data );\n\t\t} );\n\n\t\tthis.colorGridsFragmentView.on( 'change:selectedColor', ( evt, evtName, data ) => {\n\t\t\tthis.set( 'selectedColor', data );\n\t\t} );\n\n\t\tthis.colorPickerFragmentView.on( 'change:selectedColor', ( evt, evtName, data ) => {\n\t\t\tthis.set( 'selectedColor', data );\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-color-selector'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Renders the internals of the component on demand:\n\t * * {@link #colorPickerFragmentView},\n\t * * {@link #colorGridsFragmentView}.\n\t *\n\t * It allows for deferring component initialization to improve the performance.\n\t *\n\t * See {@link #showColorPickerFragment}, {@link #showColorGridsFragment}.\n\t */\n\tpublic appendUI(): void {\n\t\tthis._appendColorGridsFragment();\n\n\t\tif ( this._colorPickerViewConfig ) {\n\t\t\tthis._appendColorPickerFragment();\n\t\t}\n\t}\n\n\t/**\n\t * Shows the {@link #colorPickerFragmentView} and hides the {@link #colorGridsFragmentView}.\n\t *\n\t * **Note**: It requires {@link #appendUI} to be called first.\n\t *\n\t * See {@link #showColorGridsFragment}, {@link ~ColorSelectorView#event:colorPicker:show}.\n\t */\n\tpublic showColorPickerFragment(): void {\n\t\tif ( !this.colorPickerFragmentView.colorPickerView || this._isColorPickerFragmentVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isColorPickerFragmentVisible = true;\n\t\tthis.colorPickerFragmentView.focus();\n\t\tthis.colorPickerFragmentView.resetValidationStatus();\n\t\tthis._isColorGridsFragmentVisible = false;\n\t}\n\n\t/**\n\t * Shows the {@link #colorGridsFragmentView} and hides the {@link #colorPickerFragmentView}.\n\t *\n\t * See {@link #showColorPickerFragment}.\n\t *\n\t * **Note**: It requires {@link #appendUI} to be called first.\n\t */\n\tpublic showColorGridsFragment(): void {\n\t\tif ( this._isColorGridsFragmentVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isColorGridsFragmentVisible = true;\n\t\tthis.colorGridsFragmentView.focus();\n\t\tthis._isColorPickerFragmentVisible = false;\n\t}\n\n\t/**\n\t * Focuses the first focusable element in {@link #items}.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the last focusable element in {@link #items}.\n\t */\n\tpublic focusLast(): void {\n\t\tthis._focusCycler.focusLast();\n\t}\n\n\t/**\n\t * Scans through the editor model and searches for text node attributes with the given `attributeName`.\n\t * Found entries are set as document colors in {@link #colorGridsFragmentView}.\n\t *\n\t * All the previously stored document colors will be lost in the process.\n\t *\n\t * @param model The model used as a source to obtain the document colors.\n\t * @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t */\n\tpublic updateDocumentColors( model: Model, attributeName: string ): void {\n\t\tthis.colorGridsFragmentView.updateDocumentColors( model, attributeName );\n\t}\n\n\t/**\n\t * Refreshes the state of the selected color in one or both grids located in {@link #colorGridsFragmentView}.\n\t *\n\t * It guarantees that the selection will occur only in one of them.\n\t */\n\tpublic updateSelectedColors(): void {\n\t\tthis.colorGridsFragmentView.updateSelectedColors();\n\t}\n\n\t/**\n\t * Appends the view containing static and document color grid views.\n\t */\n\tprivate _appendColorGridsFragment(): void {\n\t\tif ( this.items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.items.add( this.colorGridsFragmentView );\n\t\tthis.colorGridsFragmentView.delegate( 'execute' ).to( this );\n\t\tthis.colorGridsFragmentView.delegate( 'colorPicker:show' ).to( this );\n\t}\n\n\t/**\n\t * Appends the view with the color picker.\n\t */\n\tprivate _appendColorPickerFragment(): void {\n\t\tif ( this.items.length === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.items.add( this.colorPickerFragmentView );\n\n\t\tif ( this.colorGridsFragmentView.colorPickerButtonView ) {\n\t\t\tthis.colorGridsFragmentView.colorPickerButtonView.on( 'execute', () => {\n\t\t\t\tthis.showColorPickerFragment();\n\t\t\t} );\n\t\t}\n\n\t\tthis.colorGridsFragmentView.addColorPickerButton();\n\t\tthis.colorPickerFragmentView.delegate( 'execute' ).to( this );\n\t\tthis.colorPickerFragmentView.delegate( 'colorPicker:cancel' ).to( this );\n\t}\n}\n\n/**\n * Fired whenever the color was changed. There are multiple sources of this event and you can distinguish them\n * using the `source` property passed along this event.\n *\n * @eventName ~ColorSelectorView#execute\n */\nexport type ColorSelectorExecuteEvent = {\n\tname: 'execute';\n\targs: [ {\n\t\tvalue: string;\n\t\tsource: 'staticColorsGrid' | 'documentColorsGrid' | 'removeColorButton' | 'colorPicker' | 'colorPickerSaveButton';\n\t} ];\n};\n\n/**\n * Fired when the user pressed the \"Cancel\" button in the\n * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView}.\n *\n * @eventName ~ColorSelectorView#colorPicker:cancel\n */\nexport type ColorSelectorColorPickerCancelEvent = {\n\tname: 'colorPicker:cancel';\n\targs: [];\n};\n\n/**\n * Fired whenever {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView} is shown.\n *\n * See {@link ~ColorSelectorView#showColorPickerFragment}.\n *\n * @eventName ~ColorSelectorView#colorPicker:show\n */\nexport type ColorSelectorColorPickerShowEvent = {\n\tname: 'colorPicker:show';\n\targs: [];\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/**\n * @module ui/componentfactory\n */\n\nimport { CKEditorError, type Locale } from '@ckeditor/ckeditor5-utils';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { type View } from './view.js';\n\n/**\n * A helper class implementing the UI component ({@link module:ui/view~View view}) factory.\n *\n * It allows functions producing specific UI components to be registered under their unique names\n * in the factory. A registered component can be then instantiated by providing its name.\n * Note that the names are case insensitive.\n *\n * ```ts\n * // The editor provides localization tools for the factory.\n * const factory = new ComponentFactory( editor );\n *\n * factory.add( 'foo', locale => new FooView( locale ) );\n * factory.add( 'bar', locale => new BarView( locale ) );\n *\n * // An instance of FooView.\n * const fooInstance = factory.create( 'foo' );\n *\n * // Names are case insensitive so this is also allowed:\n * const barInstance = factory.create( 'Bar' );\n * ```\n *\n * The {@link module:core/editor/editor~Editor#locale editor locale} is passed to the factory\n * function when {@link module:ui/componentfactory~ComponentFactory#create} is called.\n */\nexport class ComponentFactory {\n\t/**\n\t * The editor instance that the factory belongs to.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * Registered component factories.\n\t */\n\tprivate readonly _components = new Map<string, { originalName: string; callback: ( locale: Locale ) => View }>();\n\n\t/**\n\t * Creates an instance of the factory.\n\t *\n\t * @param editor The editor instance.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tthis.editor = editor;\n\t}\n\n\t/**\n\t * Returns an iterator of registered component names. Names are returned in lower case.\n\t */\n\tpublic* names(): IterableIterator<string> {\n\t\tfor ( const value of this._components.values() ) {\n\t\t\tyield value.originalName;\n\t\t}\n\t}\n\n\t/**\n\t * Registers a component factory function that will be used by the\n\t * {@link #create create} method and called with the\n\t * {@link module:core/editor/editor~Editor#locale editor locale} as an argument,\n\t * allowing localization of the {@link module:ui/view~View view}.\n\t *\n\t * @param name The name of the component.\n\t * @param callback The callback that returns the component.\n\t */\n\tpublic add( name: string, callback: ( locale: Locale ) => View ): void {\n\t\tthis._components.set( getNormalized( name ), { callback, originalName: name } );\n\t}\n\n\t/**\n\t * Creates an instance of a component registered in the factory under a specific name.\n\t *\n\t * When called, the {@link module:core/editor/editor~Editor#locale editor locale} is passed to\n\t * the previously {@link #add added} factory function, allowing localization of the\n\t * {@link module:ui/view~View view}.\n\t *\n\t * @param name The name of the component.\n\t * @returns The instantiated component view.\n\t */\n\tpublic create( name: string ): View {\n\t\tif ( !this.has( name ) ) {\n\t\t\t/**\n\t\t\t * The required component is not registered in the component factory. Please make sure\n\t\t\t * the provided name is correct and the component has been correctly\n\t\t\t * {@link module:ui/componentfactory~ComponentFactory#add added} to the factory.\n\t\t\t *\n\t\t\t * @error componentfactory-item-missing\n\t\t\t * @param {string} name The name of the missing component.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'componentfactory-item-missing',\n\t\t\t\tthis,\n\t\t\t\t{ name }\n\t\t\t);\n\t\t}\n\n\t\treturn this._components.get( getNormalized( name ) )!.callback( this.editor.locale );\n\t}\n\n\t/**\n\t * Checks if a component of a given name is registered in the factory.\n\t *\n\t * @param name The name of the component.\n\t */\n\tpublic has( name: string ): boolean {\n\t\treturn this._components.has( getNormalized( name ) );\n\t}\n}\n\n/**\n * Ensures that the component name used as the key in the internal map is in lower case.\n */\nfunction getNormalized( name: unknown ) {\n\treturn String( name ).toLowerCase();\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/**\n * @module ui/tooltipmanager\n */\n\nimport { View } from './view.js';\nimport { BalloonPanelView } from './panel/balloon/balloonpanelview.js';\nimport type { EditorUIUpdateEvent } from './editorui/editorui.js';\n\nimport {\n\tDomEmitterMixin,\n\tfirst,\n\tglobal,\n\tisVisible,\n\ttype EventInfo,\n\ttype PositioningFunction,\n\ttype DomEmitterMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { isElement, debounce } from 'es-toolkit/compat';\n\nconst BALLOON_CLASS = 'ck-tooltip';\n\nconst TooltipManagerBase: DomEmitterMixinConstructor = /* #__PURE__ */ DomEmitterMixin();\n\n/**\n * A tooltip manager class for the UI of the editor.\n *\n * **Note**: Most likely you do not have to use the `TooltipManager` API listed below in order to display tooltips. Popular\n * {@glink framework/architecture/ui-library UI components} support tooltips out-of-the-box via observable properties\n * (see {@link module:ui/button/buttonview~ButtonView#tooltip} and {@link module:ui/button/buttonview~ButtonView#tooltipPosition}).\n *\n * # Displaying tooltips\n *\n * To display a tooltip, set `data-cke-tooltip-text` attribute on any DOM element:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'My tooltip';\n * ```\n *\n * The tooltip will show up whenever the user moves the mouse over the element or the element gets focus in DOM.\n *\n * # Positioning tooltips\n *\n * To change the position of the tooltip, use the `data-cke-tooltip-position` attribute (`s`, `se`, `sw`, `n`, `e`, or `w`):\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Tooltip to the north';\n * domElement.dataset.ckeTooltipPosition = 'n';\n * ```\n *\n * # Disabling tooltips\n *\n * In order to disable the tooltip temporarily, use the `data-cke-tooltip-disabled` attribute:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Disabled. For now.';\n * domElement.dataset.ckeTooltipDisabled = 'true';\n * ```\n *\n * # Instant tooltips\n *\n * To remove the delay before showing or hiding the tooltip, use the `data-cke-tooltip-instant` attribute:\n *\n * ```ts\n * domElement.dataset.ckeTooltipInstant = 'true';\n * ```\n *\n * # Styling tooltips\n *\n * By default, the tooltip has `.ck-tooltip` class and its text inner `.ck-tooltip__text`.\n *\n * If your tooltip requires custom styling, using `data-cke-tooltip-class` attribute will add additional class to the balloon\n * displaying the tooltip:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Tooltip with a red text';\n * domElement.dataset.ckeTooltipClass = 'my-class';\n * ```\n *\n * ```css\n * .ck.ck-tooltip.my-class { color: red }\n * ```\n *\n * **Note**: This class is a singleton. All editor instances re-use the same instance loaded by\n * {@link module:ui/editorui/editorui~EditorUI} of the first editor.\n */\nexport class TooltipManager extends TooltipManagerBase {\n\t/**\n\t * The view rendering text of the tooltip.\n\t */\n\tpublic readonly tooltipTextView!: View & { text: string };\n\n\t/**\n\t * The instance of the balloon panel that renders and positions the tooltip.\n\t */\n\tpublic readonly balloonPanelView!: BalloonPanelView;\n\n\t/**\n\t * A set of default {@link module:utils/dom/position~PositioningFunction positioning functions} used by the `TooltipManager`\n\t * to pin tooltips in different positions.\n\t */\n\tpublic static defaultBalloonPositions: Record<string, PositioningFunction> = /* #__PURE__ */ BalloonPanelView.generatePositions( {\n\t\theightOffset: 5,\n\t\tsideOffset: 13\n\t} );\n\n\t/**\n\t * Stores the reference to the DOM element the tooltip is attached to. `null` when there's no tooltip\n\t * in the UI.\n\t */\n\tprivate _currentElementWithTooltip: HTMLElement | null = null;\n\n\t/**\n\t * Stores the current tooltip position. `null` when there's no tooltip in the UI.\n\t */\n\tprivate _currentTooltipPosition: TooltipPosition | null = null;\n\n\t/**\n\t * An instance of the mutation observer that keeps track on target element attributes changes.\n\t */\n\tprivate _mutationObserver: MutationObserverWrapper | null = null;\n\n\t/**\n\t * A debounced version of {@link #_pinTooltip}. Tooltips show with a delay to avoid flashing and\n\t * to improve the UX.\n\t */\n\tprivate _pinTooltipDebounced!: ReturnType<typeof debounce<( targetDomElement: HTMLElement, data: TooltipData ) => void>>;\n\n\t/**\n\t * A debounced version of {@link #_unpinTooltip}. Tooltips hide with a delay to allow hovering of their titles.\n\t */\n\tprivate _unpinTooltipDebounced!: ReturnType<typeof debounce<VoidFunction>>;\n\n\tprivate readonly _watchdogExcluded!: true;\n\n\t/**\n\t * A set of editors the single tooltip manager instance must listen to.\n\t * This is mostly to handle `EditorUI#update` listeners from individual editors.\n\t */\n\tprivate static _editors = new Set<Editor>();\n\n\t/**\n\t * A reference to the `TooltipManager` instance. The class is a singleton and as such,\n\t * successive attempts at creating instances should return this instance.\n\t */\n\tprivate static _instance: TooltipManager | null = null;\n\n\t/**\n\t * Creates an instance of the tooltip manager.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\n\t\tTooltipManager._editors.add( editor );\n\n\t\t// TooltipManager must be a singleton. Multiple instances would mean multiple tooltips attached\n\t\t// to the same DOM element with data-cke-tooltip-* attributes.\n\t\tif ( TooltipManager._instance ) {\n\t\t\treturn TooltipManager._instance;\n\t\t}\n\n\t\tTooltipManager._instance = this;\n\n\t\tthis.tooltipTextView = new View( editor.locale ) as any;\n\t\tthis.tooltipTextView.set( 'text', '' );\n\t\tthis.tooltipTextView.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-tooltip__text'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: this.tooltipTextView.bindTemplate.to( 'text' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\tthis.balloonPanelView = new BalloonPanelView( editor.locale );\n\t\tthis.balloonPanelView.class = BALLOON_CLASS;\n\t\tthis.balloonPanelView.content.add( this.tooltipTextView );\n\n\t\tthis._mutationObserver = createMutationObserver( () => {\n\t\t\tthis._updateTooltipPosition();\n\t\t} );\n\n\t\tthis._pinTooltipDebounced = debounce( this._pinTooltip, 600 );\n\t\tthis._unpinTooltipDebounced = debounce( this._unpinTooltip, 400 );\n\n\t\tthis.listenTo( global.document, 'keydown', this._onKeyDown.bind( this ), { useCapture: true } );\n\t\tthis.listenTo( global.document, 'mouseenter', this._onEnterOrFocus.bind( this ), { useCapture: true } );\n\t\tthis.listenTo( global.document, 'mouseleave', this._onLeaveOrBlur.bind( this ), { useCapture: true } );\n\n\t\tthis.listenTo( global.document, 'focus', this._onEnterOrFocus.bind( this ), { useCapture: true } );\n\t\tthis.listenTo( global.document, 'blur', this._onLeaveOrBlur.bind( this ), { useCapture: true } );\n\n\t\tthis.listenTo( global.document, 'scroll', this._onScroll.bind( this ), { useCapture: true } );\n\n\t\t// Because this class is a singleton, its only instance is shared across all editors and connects them through the reference.\n\t\t// This causes issues with the ContextWatchdog. When an error is thrown in one editor, the watchdog traverses the references\n\t\t// and (because of shared tooltip manager) figures that the error affects all editors and restarts them all.\n\t\t// This flag, excludes tooltip manager instance from the traversal and brings ContextWatchdog back to normal.\n\t\t// More in https://github.com/ckeditor/ckeditor5/issues/12292.\n\t\tthis._watchdogExcluded = true;\n\t}\n\n\t/**\n\t * Destroys the tooltip manager.\n\t *\n\t * **Note**: The manager singleton cannot be destroyed until all editors that use it are destroyed.\n\t *\n\t * @param editor The editor the manager was created for.\n\t */\n\tpublic destroy( editor: Editor ): void {\n\t\tconst editorBodyViewCollection = editor.ui.view && editor.ui.view.body;\n\n\t\tTooltipManager._editors.delete( editor );\n\t\tthis.stopListening( editor.ui );\n\n\t\t// Prevent the balloon panel from being destroyed in the EditorUI#destroy() cascade. It should be destroyed along\n\t\t// with the last editor only (https://github.com/ckeditor/ckeditor5/issues/12602).\n\t\tif ( editorBodyViewCollection && editorBodyViewCollection.has( this.balloonPanelView ) ) {\n\t\t\teditorBodyViewCollection.remove( this.balloonPanelView );\n\t\t}\n\n\t\tif ( !TooltipManager._editors.size ) {\n\t\t\tthis._unpinTooltip();\n\t\t\tthis.balloonPanelView.destroy();\n\t\t\tthis.stopListening();\n\n\t\t\tTooltipManager._instance = null;\n\t\t}\n\t}\n\n\t/**\n\t * Returns {@link #balloonPanelView} {@link module:utils/dom/position~PositioningFunction positioning functions} for a given position\n\t * name.\n\t *\n\t * @param position Name of the position (`s`, `se`, `sw`, `n`, `e`, or `w`).\n\t * @returns Positioning functions to be used by the {@link #balloonPanelView}.\n\t */\n\tpublic static getPositioningFunctions( position: TooltipPosition ): Array<PositioningFunction> {\n\t\tconst defaultPositions = TooltipManager.defaultBalloonPositions;\n\n\t\treturn {\n\t\t\t// South is most popular. We can use positioning heuristics to avoid clipping by the viewport with the sane fallback.\n\t\t\ts: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest\n\t\t\t],\n\t\t\tn: [ defaultPositions.northArrowSouth ],\n\t\t\te: [ defaultPositions.eastArrowWest ],\n\t\t\tw: [ defaultPositions.westArrowEast ],\n\t\t\tsw: [ defaultPositions.southArrowNorthEast ],\n\t\t\tse: [ defaultPositions.southArrowNorthWest ]\n\t\t}[ position ];\n\t}\n\n\t/**\n\t * Handles hiding tooltips on `keydown` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onKeyDown( evt: EventInfo, domEvent: KeyboardEvent ) {\n\t\tif ( domEvent.key === 'Escape' && this._currentElementWithTooltip ) {\n\t\t\tthis._unpinTooltip();\n\t\t\tdomEvent.stopPropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Handles displaying tooltips on `mouseenter` and `focus` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onEnterOrFocus( evt: EventInfo, { target }: any ) {\n\t\tconst elementWithTooltipAttribute = getDescendantWithTooltip( target );\n\n\t\t// Abort when there's no descendant needing tooltip.\n\t\tif ( !elementWithTooltipAttribute ) {\n\t\t\t// Unpin if element is focused, regardless of whether it contains a label or not.\n\t\t\t// It also prevents tooltips from overlapping the menu bar\n\t\t\tif ( evt.name === 'focus' ) {\n\t\t\t\tthis._unpinTooltip();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Abort to avoid flashing when, for instance:\n\t\t// * a tooltip is displayed for a focused element, then the same element gets mouseentered,\n\t\t// * a tooltip is displayed for an element via mouseenter, then the focus moves to the same element.\n\t\tif ( elementWithTooltipAttribute === this._currentElementWithTooltip ) {\n\t\t\tthis._unpinTooltipDebounced.cancel();\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._unpinTooltip();\n\n\t\t// The tooltip should be pinned immediately when the element gets focused using keyboard.\n\t\t// If it is focused using the mouse, the tooltip should be pinned after a delay to prevent flashing.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/16383\n\t\t// Also, if the element has an attribute `data-cke-tooltip-instant`, the tooltip should be pinned immediately.\n\t\t// This is useful for elements that have their content partially hidden (e.g. a long text in a small container)\n\t\t// and should show a tooltip on hover, like merge field.\n\t\tif (\n\t\t\tevt.name === 'focus' && !elementWithTooltipAttribute.matches( ':hover' ) ||\n\t\t\telementWithTooltipAttribute.matches( '[data-cke-tooltip-instant]' )\n\t\t) {\n\t\t\tthis._pinTooltip( elementWithTooltipAttribute, getTooltipData( elementWithTooltipAttribute ) );\n\t\t} else {\n\t\t\tthis._pinTooltipDebounced( elementWithTooltipAttribute, getTooltipData( elementWithTooltipAttribute ) );\n\t\t}\n\t}\n\n\t/**\n\t * Handles hiding tooltips on `mouseleave` and `blur` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onLeaveOrBlur( evt: EventInfo, { target, relatedTarget }: any ) {\n\t\tif ( evt.name === 'mouseleave' ) {\n\t\t\t// Don't act when the event does not concern a DOM element (e.g. a mouseleave out of an entire document),\n\t\t\tif ( !isElement( target ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst balloonElement = this.balloonPanelView.element;\n\t\t\tconst isEnteringBalloon = balloonElement && ( balloonElement === relatedTarget || balloonElement.contains( relatedTarget ) );\n\t\t\tconst isLeavingBalloon = !isEnteringBalloon && target === balloonElement;\n\n\t\t\t// Do not hide the tooltip when the user moves the cursor over it.\n\t\t\tif ( isEnteringBalloon ) {\n\t\t\t\tthis._unpinTooltipDebounced.cancel();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a tooltip is currently visible, don't act for a targets other than the one it is attached to.\n\t\t\t// The only exception is leaving balloon, in this scenario tooltip should be closed.\n\t\t\t// For instance, a random mouseleave far away in the page should not unpin the tooltip that was pinned because\n\t\t\t// of a previous focus. Only leaving the same element should hide the tooltip.\n\t\t\tif ( !isLeavingBalloon && this._currentElementWithTooltip && target !== this._currentElementWithTooltip ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst descendantWithTooltip = getDescendantWithTooltip( target );\n\t\t\tconst relatedDescendantWithTooltip = getDescendantWithTooltip( relatedTarget );\n\n\t\t\t// Unpin when the mouse was leaving element with a tooltip to a place which does not have or has a different tooltip.\n\t\t\t// Note that this should happen whether the tooltip is already visible or not, for instance,\n\t\t\t// it could be invisible but queued (debounced): it should get canceled.\n\t\t\tif ( isLeavingBalloon || ( descendantWithTooltip && descendantWithTooltip !== relatedDescendantWithTooltip ) ) {\n\t\t\t\tthis._pinTooltipDebounced.cancel();\n\n\t\t\t\t// If the currently visible tooltip is instant, unpin it immediately.\n\t\t\t\tif (\n\t\t\t\t\tthis._currentElementWithTooltip && this._currentElementWithTooltip.matches( '[data-cke-tooltip-instant]' ) ||\n\t\t\t\t\tdescendantWithTooltip && descendantWithTooltip.matches( '[data-cke-tooltip-instant]' )\n\t\t\t\t) {\n\t\t\t\t\tthis._unpinTooltip();\n\t\t\t\t} else {\n\t\t\t\t\tthis._unpinTooltipDebounced();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// If a tooltip is currently visible, don't act for a targets other than the one it is attached to.\n\t\t\t// For instance, a random blur in the web page should not unpin the tooltip that was pinned because of a previous mouseenter.\n\t\t\tif ( this._currentElementWithTooltip && target !== this._currentElementWithTooltip ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Note that unpinning should happen whether the tooltip is already visible or not, for instance, it could be invisible but\n\t\t\t// queued (debounced): it should get canceled (e.g. quick focus then quick blur using the keyboard).\n\t\t\tthis._pinTooltipDebounced.cancel();\n\t\t\tthis._unpinTooltipDebounced();\n\t\t}\n\t}\n\n\t/**\n\t * Handles hiding tooltips on `scroll` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _onScroll( evt: unknown, { target }: any ) {\n\t\t// No tooltip, no reason to react on scroll.\n\t\tif ( !this._currentElementWithTooltip ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When scrolling a container that has both the balloon and the current element (common ancestor), the balloon can remain\n\t\t// visible (e.g. scrolling ≤body>). Otherwise, to avoid glitches (clipping, lagging) better just hide the tooltip.\n\t\t// Also, don't do anything when scrolling an unrelated DOM element that has nothing to do with the current element and the balloon.\n\t\tif ( target.contains( this.balloonPanelView.element ) && target.contains( this._currentElementWithTooltip ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._unpinTooltip();\n\t}\n\n\t/**\n\t * Pins the tooltip to a specific DOM element.\n\t *\n\t * @param targetDomElement Element to be pinned to.\n\t * @param options Options for the tooltip.\n\t * @param options.text Text of the tooltip to display.\n\t * @param options.position The position of the tooltip.\n\t * @param options.cssClass Additional CSS class of the balloon with the tooltip.\n\t */\n\tprivate _pinTooltip(\n\t\ttargetDomElement: HTMLElement,\n\t\t{ text, position, cssClass }: TooltipData\n\t): void {\n\t\tthis._unpinTooltip();\n\n\t\t// Use the body collection of the first editor.\n\t\tconst bodyViewCollection = first( TooltipManager._editors.values() )!.ui.view.body;\n\n\t\tif ( !bodyViewCollection.has( this.balloonPanelView ) ) {\n\t\t\tbodyViewCollection.add( this.balloonPanelView );\n\t\t}\n\n\t\tthis.tooltipTextView.text = text;\n\n\t\tthis.balloonPanelView.class = [ BALLOON_CLASS, cssClass ]\n\t\t\t.filter( className => className )\n\t\t\t.join( ' ' );\n\n\t\t// Ensure that all changes to the tooltip are set before pinning it.\n\t\t// Setting class or text after pinning can cause the tooltip to be pinned in the wrong position.\n\t\t// It happens especially often when tooltip has class modified (like adding `ck-tooltip_multi-line`).\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/16365\n\t\tthis.balloonPanelView.pin( {\n\t\t\ttarget: targetDomElement,\n\t\t\tpositions: TooltipManager.getPositioningFunctions( position )\n\t\t} );\n\n\t\tthis._mutationObserver!.attach( targetDomElement );\n\n\t\t// Start responding to changes in editor UI or content layout. For instance, when collaborators change content\n\t\t// and a contextual toolbar attached to a content starts to move (and so should move the tooltip).\n\t\t// Note: Using low priority to let other listeners that position contextual toolbars etc. to react first.\n\t\tfor ( const editor of TooltipManager._editors ) {\n\t\t\tthis.listenTo<EditorUIUpdateEvent>( editor.ui, 'update', this._updateTooltipPosition.bind( this ), { priority: 'low' } );\n\t\t}\n\n\t\tthis._currentElementWithTooltip = targetDomElement;\n\t\tthis._currentTooltipPosition = position;\n\t}\n\n\t/**\n\t * Unpins the tooltip and cancels all queued pinning.\n\t */\n\tprivate _unpinTooltip() {\n\t\tthis._unpinTooltipDebounced.cancel();\n\t\tthis._pinTooltipDebounced.cancel();\n\n\t\tthis.balloonPanelView.unpin();\n\n\t\tfor ( const editor of TooltipManager._editors ) {\n\t\t\tthis.stopListening( editor.ui, 'update' );\n\t\t}\n\n\t\tthis._currentElementWithTooltip = null;\n\t\tthis._currentTooltipPosition = null;\n\t\tthis.tooltipTextView.text = '';\n\n\t\tthis._mutationObserver!.detach();\n\t}\n\n\t/**\n\t * Updates the position of the tooltip so it stays in sync with the element it is pinned to.\n\t *\n\t * Hides the tooltip when the element is no longer visible in DOM or the tooltip text was removed.\n\t */\n\tprivate _updateTooltipPosition() {\n\t\t// The tooltip might get removed by focus listener triggered by the same UI `update` event.\n\t\t// See https://github.com/ckeditor/ckeditor5/pull/16363.\n\t\tif ( !this._currentElementWithTooltip ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tooltipData = getTooltipData( this._currentElementWithTooltip );\n\n\t\t// This could happen if the tooltip was attached somewhere in a contextual content toolbar and the toolbar\n\t\t// disappeared (e.g. removed an image), or the tooltip text was removed.\n\t\tif ( !isVisible( this._currentElementWithTooltip ) || !tooltipData.text ) {\n\t\t\tthis._unpinTooltip();\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.balloonPanelView.pin( {\n\t\t\ttarget: this._currentElementWithTooltip,\n\t\t\tpositions: TooltipManager.getPositioningFunctions( tooltipData.position )\n\t\t} );\n\t}\n}\n\nexport type TooltipPosition = 's' | 'n' | 'e' | 'w' | 'sw' | 'se';\n\nfunction getDescendantWithTooltip( element: HTMLElement ) {\n\tif ( !isElement( element ) ) {\n\t\treturn null;\n\t}\n\n\treturn element.closest( '[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])' ) as HTMLElement;\n}\n\ninterface TooltipData {\n\ttext: string;\n\tposition: TooltipPosition;\n\tcssClass: string;\n}\n\nfunction getTooltipData( element: HTMLElement ): TooltipData {\n\treturn {\n\t\ttext: element.dataset.ckeTooltipText!,\n\t\tposition: ( element.dataset.ckeTooltipPosition || 's' ) as TooltipPosition,\n\t\tcssClass: element.dataset.ckeTooltipClass || ''\n\t};\n}\n\n// Creates a simple `MutationObserver` instance wrapper that observes changes in the tooltip-related attributes of the given element.\n// Used instead of the `MutationObserver` from the engine for simplicity.\nfunction createMutationObserver( callback: ( ...args: Array<any> ) => unknown ): MutationObserverWrapper {\n\tconst mutationObserver = new MutationObserver( () => {\n\t\tcallback();\n\t} );\n\n\treturn {\n\t\tattach( element ) {\n\t\t\tmutationObserver.observe( element, {\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: [ 'data-cke-tooltip-text', 'data-cke-tooltip-position' ]\n\t\t\t} );\n\t\t},\n\n\t\tdetach() {\n\t\t\tmutationObserver.disconnect();\n\t\t}\n\t};\n}\n\ninterface MutationObserverWrapper {\n\tattach: ( element: Node ) => void;\n\tdetach: () => void;\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/**\n * @module ui/editorui/evaluationbadge\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { parseBase64EncodedObject, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { View } from '../view.js';\nimport { Badge, type BadgeConfig } from '../badge/badge.js';\n\n/**\n * A helper that enables the \"evaluation badge\" feature in the editor at the bottom of the editable element\n * (editor root, source editing area, etc.) when the editor is focused.\n *\n * @private\n */\nexport class EvaluationBadge extends Badge {\n\tprivate licenseTypeMessage: Record<string, string> = {\n\t\tevaluation: 'For evaluation purposes only',\n\t\ttrial: 'For evaluation purposes only',\n\t\tdevelopment: 'For development purposes only'\n\t};\n\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor, { balloonClass: 'ck-evaluation-badge-balloon' } );\n\t}\n\n\t/**\n\t * Enables \"evaluation badge\" label.\n\t */\n\tprotected override _isEnabled(): boolean {\n\t\tconst editor = this.editor;\n\t\tconst licenseKey = editor.config.get( 'licenseKey' )!;\n\t\tconst licenseType = getLicenseTypeFromLicenseKey( licenseKey );\n\n\t\treturn Boolean( licenseType && this.licenseTypeMessage[ licenseType ] );\n\t}\n\n\t/**\n\t * Creates the content of the \"evaluation badge\".\n\t */\n\tprotected override _createBadgeContent(): View<HTMLElement> {\n\t\tconst licenseKey = this.editor.config.get( 'licenseKey' )!;\n\t\tconst licenseType = getLicenseTypeFromLicenseKey( licenseKey )!;\n\n\t\treturn new EvaluationBadgeView( this.editor.locale, this.licenseTypeMessage[ licenseType ] );\n\t}\n\n\t/**\n\t * Returns the normalized configuration for the \"evaluation badge\".\n\t * It takes 'ui.poweredBy' configuration into account to determine the badge position and side.\n\t */\n\tprotected override _getNormalizedConfig(): BadgeConfig {\n\t\tconst badgeConfig = super._getNormalizedConfig();\n\t\tconst userConfig = this.editor.config.get( 'ui.poweredBy' ) || {};\n\t\tconst position = userConfig.position || badgeConfig.position;\n\t\tconst poweredBySide = userConfig.side || badgeConfig.side;\n\n\t\treturn {\n\t\t\tposition,\n\t\t\tside: poweredBySide === 'left' ? 'right' : 'left',\n\t\t\tverticalOffset: badgeConfig.verticalOffset,\n\t\t\thorizontalOffset: badgeConfig.horizontalOffset\n\t\t};\n\t}\n}\n\n/**\n * A view displaying the \"evaluation badge\".\n */\nclass EvaluationBadgeView extends View<HTMLDivElement> {\n\t/**\n\t * Creates an instance of the \"evaluation badge\" view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param label The label text.\n\t */\n\tconstructor( locale: Locale, label: string ) {\n\t\tsuper( locale );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-evaluation-badge' ],\n\t\t\t\t'aria-hidden': true\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'span',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [ 'ck', 'ck-evaluation-badge__label' ]\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [ label ]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n}\n\n/**\n * Returns the license type based on the license key.\n */\nfunction getLicenseTypeFromLicenseKey( licenseKey: string ): string | null {\n\tif ( licenseKey == 'GPL' ) {\n\t\treturn 'GPL';\n\t}\n\n\tconst licenseContent = parseBase64EncodedObject( licenseKey.split( '.' )[ 1 ] );\n\n\tif ( !licenseContent ) {\n\t\treturn null;\n\t}\n\n\treturn licenseContent.licenseType || 'production';\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/**\n * @module ui/menubar/menubarmenulistitemview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport { ListItemView } from '../list/listitemview.js';\nimport { type MenuBarMenuView } from './menubarmenuview.js';\n\n/**\n * A menu bar list item view, a child of {@link module:ui/menubar/menubarmenulistview~MenuBarMenuListView}.\n *\n * Populate this item with a {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} instance\n * or a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance to create a sub-menu.\n */\nexport class MenuBarMenuListItemView extends ListItemView {\n\t/**\n\t * Creates an instance of the list item view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale, parentMenuView: MenuBarMenuView ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-menu-bar__menu__item'\n\t\t\t\t]\n\t\t\t},\n\t\t\ton: {\n\t\t\t\t'mouseenter': bind.to( 'mouseenter' )\n\t\t\t}\n\t\t} );\n\n\t\tthis.delegate( 'mouseenter' ).to( parentMenuView );\n\t}\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/**\n * @module ui/menubar/utils\n */\n\nimport { MenuBarMenuListItemView } from './menubarmenulistitemview.js';\nimport { type MenuBarMenuView } from './menubarmenuview.js';\nimport type {\n\tMenuBarView,\n\tMenuBarConfig,\n\tMenuBarMenuMouseEnterEvent,\n\tMenuBarMenuChangeIsOpenEvent,\n\tMenuBarMenuArrowRightEvent,\n\tMenuBarMenuArrowLeftEvent,\n\tMenuBarMenuDefinition,\n\tMenuBarConfigObject,\n\tMenuBarConfigAddedGroup,\n\tMenuBarConfigAddedMenu,\n\tMenuBarConfigAddedPosition,\n\tNormalizedMenuBarConfigObject,\n\tMenuBarConfigAddedItem\n} from './menubarview.js';\nimport { clickOutsideHandler } from '../bindings/clickoutsidehandler.js';\nimport type { ButtonExecuteEvent } from '../button/button.js';\nimport { type ComponentFactory } from '../componentfactory.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport {\n\tlogWarning,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype PositioningFunction\n} from '@ckeditor/ckeditor5-utils';\nimport { cloneDeep } from 'es-toolkit/compat';\n\nconst NESTED_PANEL_HORIZONTAL_OFFSET = 5;\n\n/**\n * Behaviors of the {@link module:ui/menubar/menubarview~MenuBarView} component.\n * @internal\n */\nexport const MenuBarBehaviors = {\n\t/**\n\t * When the bar is already open:\n\t * * Opens the menu when the user hovers over its button.\n\t * * Closes open menu when another menu's button gets hovered.\n\t */\n\ttoggleMenusAndFocusItemsOnHover( menuBarView: MenuBarView ): void {\n\t\tmenuBarView.on<MenuBarMenuMouseEnterEvent>( 'menu:mouseenter', evt => {\n\t\t\t// This behavior should be activated when one of condition is present:\n\t\t\t// 1. The user opened any submenu of menubar and hover over items in the menu bar.\n\t\t\t// 2. The user focused whole menubar using keyboard interaction and enabled focus borders and hover over items in the menu bar.\n\t\t\tif ( !menuBarView.isFocusBorderEnabled && !menuBarView.isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( menuBarView.isOpen ) {\n\t\t\t\tfor ( const menuView of menuBarView.menus ) {\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // const wasOpen = menuView.isOpen;\n\n\t\t\t\t\tconst pathLeaf = evt.path[ 0 ];\n\t\t\t\t\tconst isListItemContainingMenu = pathLeaf instanceof MenuBarMenuListItemView && pathLeaf.children.first === menuView;\n\n\t\t\t\t\tmenuView.isOpen = ( evt.path.includes( menuView ) || isListItemContainingMenu ) && menuView.isEnabled;\n\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // if ( wasOpen !== menuView.isOpen ) {\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] toggleMenusAndFocusItemsOnHover(): Toggle',\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // \tlogMenu( menuView ), 'isOpen', menuView.isOpen\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // );\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // }\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t( evt.source as FocusableView ).focus();\n\t\t} );\n\t},\n\n\t/**\n\t * Moves between top-level menus using the arrow left and right keys.\n\t *\n\t * If the menubar has already been open, the arrow keys move focus between top-level menu buttons and open them.\n\t * If the menubar is closed, the arrow keys only move focus between top-level menu buttons.\n\t */\n\tfocusCycleMenusOnArrows( menuBarView: MenuBarView ): void {\n\t\tconst isContentRTL = menuBarView.locale!.uiLanguageDirection === 'rtl';\n\n\t\tmenuBarView.on<MenuBarMenuArrowRightEvent>( 'menu:arrowright', evt => {\n\t\t\tcycleTopLevelMenus( evt.source as MenuBarMenuView, isContentRTL ? -1 : 1 );\n\t\t} );\n\n\t\tmenuBarView.on<MenuBarMenuArrowLeftEvent>( 'menu:arrowleft', evt => {\n\t\t\tcycleTopLevelMenus( evt.source as MenuBarMenuView, isContentRTL ? 1 : -1 );\n\t\t} );\n\n\t\tfunction cycleTopLevelMenus( currentMenuView: MenuBarMenuView, step: number ) {\n\t\t\tconst currentIndex = menuBarView.children.getIndex( currentMenuView );\n\t\t\tconst isCurrentMenuViewOpen = currentMenuView.isOpen;\n\t\t\tconst menusCount = menuBarView.children.length;\n\t\t\tconst menuViewToOpen = menuBarView.children.get( ( currentIndex + menusCount + step ) % menusCount )!;\n\n\t\t\tcurrentMenuView.isOpen = false;\n\n\t\t\tif ( isCurrentMenuViewOpen ) {\n\t\t\t\tmenuViewToOpen.isOpen = true;\n\t\t\t}\n\n\t\t\tmenuViewToOpen.buttonView.focus();\n\t\t}\n\t},\n\n\t/**\n\t * Closes the entire sub-menu structure when the bar is closed. This prevents sub-menus from being open if the user\n\t * closes the entire bar, and then re-opens some top-level menu.\n\t */\n\tcloseMenusWhenTheBarCloses( menuBarView: MenuBarView ): void {\n\t\tmenuBarView.on<ObservableChangeEvent<boolean>>( 'change:isOpen', () => {\n\t\t\tif ( !menuBarView.isOpen ) {\n\t\t\t\tmenuBarView.menus.forEach( menuView => {\n\t\t\t\t\tmenuView.isOpen = false;\n\n\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeMenusWhenTheBarCloses(): Closing', logMenu( menuView ) );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Handles the following case:\n\t * 1. Hover to open a sub-menu (A). The button has focus.\n\t * 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t * 3. Press arrow right to open the sub-menu (B).\n\t * 4. The sub-menu (A) should close as it would with `toggleMenusAndFocusItemsOnHover()`.\n\t */\n\tcloseMenuWhenAnotherOnTheSameLevelOpens( menuBarView: MenuBarView ): void {\n\t\tmenuBarView.on<MenuBarMenuChangeIsOpenEvent>( 'menu:change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( isOpen ) {\n\t\t\t\tmenuBarView.menus\n\t\t\t\t\t.filter( menuView => {\n\t\t\t\t\t\treturn ( evt.source as any ).parentMenuView === menuView.parentMenuView &&\n\t\t\t\t\t\t\tevt.source !== menuView &&\n\t\t\t\t\t\t\tmenuView.isOpen;\n\t\t\t\t\t} ).forEach( menuView => {\n\t\t\t\t\t\tmenuView.isOpen = false;\n\n\t\t\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeMenuWhenAnotherOpens(): Closing', logMenu( menuView ) );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the bar when the user clicked outside of it (page body, editor root, etc.).\n\t */\n\tcloseOnClickOutside( menuBarView: MenuBarView ): void {\n\t\tclickOutsideHandler( {\n\t\t\temitter: menuBarView,\n\t\t\tactivator: () => menuBarView.isOpen,\n\t\t\tcallback: () => menuBarView.close(),\n\t\t\tcontextElements: () => menuBarView.children.map( child => child.element! )\n\t\t} );\n\t},\n\n\t/**\n\t * Tracks the keyboard focus interaction on the menu bar view. It is used to determine if the nested items\n\t * of the menu bar should render focus rings after first interaction with the keyboard.\n\t */\n\tenableFocusHighlightOnInteraction( menuBarView: MenuBarView ): void {\n\t\tlet isKeyPressed: boolean = false;\n\n\t\tmenuBarView.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( _, evt, isOpen ) => {\n\t\t\tif ( !isOpen ) {\n\t\t\t\t// Keep the focus border if the menu bar was closed by a keyboard interaction (Esc key).\n\t\t\t\t// The user remains in the keyboard navigation mode and can traverse the main categories.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/16719.\n\t\t\t\tif ( !isKeyPressed ) {\n\t\t\t\t\tmenuBarView.isFocusBorderEnabled = false;\n\t\t\t\t}\n\n\t\t\t\t// Reset the flag when the menu bar is closed, menu items tend to intercept `keyup` event\n\t\t\t\t// and sometimes, after pressing `enter` on focused item, `isKeyPressed` stuck in `true` state.\n\t\t\t\tisKeyPressed = false;\n\t\t\t}\n\t\t} );\n\n\t\tmenuBarView.listenTo( menuBarView.element!, 'keydown', () => {\n\t\t\tisKeyPressed = true;\n\t\t}, { useCapture: true } );\n\n\t\tmenuBarView.listenTo( menuBarView.element!, 'keyup', () => {\n\t\t\tisKeyPressed = false;\n\t\t}, { useCapture: true } );\n\n\t\tmenuBarView.listenTo( menuBarView.element!, 'focus', () => {\n\t\t\tif ( isKeyPressed ) {\n\t\t\t\tmenuBarView.isFocusBorderEnabled = true;\n\t\t\t}\n\t\t}, { useCapture: true } );\n\t}\n};\n\n/**\n * Behaviors of the {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} component.\n * @internal\n */\nexport const MenuBarMenuBehaviors = {\n\t/**\n\t * If the button of the menu is focused, pressing the arrow down key should open the panel and focus it.\n\t * This is analogous to the {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t */\n\topenAndFocusPanelOnArrowDownKey( menuView: MenuBarMenuView ): void {\n\t\tmenuView.keystrokes.set( 'arrowdown', ( data, cancel ) => {\n\t\t\tif ( menuView.isEnabled && menuView.focusTracker.focusedElement === menuView.buttonView.element ) {\n\t\t\t\tif ( !menuView.isOpen ) {\n\t\t\t\t\tmenuView.isOpen = true;\n\t\t\t\t}\n\n\t\t\t\tmenuView.panelView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Open the menu on the right arrow key press. This allows for navigating to sub-menus using the keyboard.\n\t */\n\topenOnArrowRightKey( menuView: MenuBarMenuView ): void {\n\t\tconst keystroke = menuView.locale!.uiLanguageDirection === 'rtl' ? 'arrowleft' : 'arrowright';\n\n\t\tmenuView.keystrokes.set( keystroke, ( data, cancel ) => {\n\t\t\tif ( menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] openOnArrowRightKey(): Opening', logMenu( menuView ) );\n\n\t\t\tif ( !menuView.isOpen ) {\n\t\t\t\tmenuView.isOpen = true;\n\t\t\t}\n\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t} );\n\t},\n\n\t/**\n\t * Opens the menu on its button click. Note that this behavior only opens but never closes the menu (unlike\n\t * {@link module:ui/dropdown/dropdownview~DropdownView}).\n\t */\n\topenOnButtonClick( menuView: MenuBarMenuView ): void {\n\t\tmenuView.buttonView.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\tmenuView.isOpen = true;\n\t\t} );\n\t},\n\n\t/**\n\t * Toggles the menu on its button click. This behavior is analogous to {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t */\n\ttoggleOnButtonClick( menuView: MenuBarMenuView ): void {\n\t\tmenuView.buttonView.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\tmenuView.isOpen = !menuView.isOpen;\n\t\t} );\n\t},\n\n\t/**\n\t * Opens the menu and focuses the panel content upon pressing the Enter key.\n\t */\n\topenAndFocusOnEnterKeyPress( menuView: MenuBarMenuView ): void {\n\t\tmenuView.keystrokes.set( 'enter', ( data, cancel ) => {\n\t\t\t// Engage only for Enter key press when the button is focused. The panel can contain\n\t\t\t// other UI components and features that rely on the Enter key press.\n\t\t\tif ( menuView.focusTracker.focusedElement !== menuView.buttonView.element ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmenuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu on the right left key press. This allows for navigating to sub-menus using the keyboard.\n\t */\n\tcloseOnArrowLeftKey( menuView: MenuBarMenuView ): void {\n\t\tconst keystroke = menuView.locale!.uiLanguageDirection === 'rtl' ? 'arrowright' : 'arrowleft';\n\n\t\tmenuView.keystrokes.set( keystroke, ( data, cancel ) => {\n\t\t\tif ( menuView.isOpen ) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu on the esc key press. This allows for navigating to sub-menus using the keyboard.\n\t */\n\tcloseOnEscKey( menuView: MenuBarMenuView ): void {\n\t\tmenuView.keystrokes.set( 'esc', ( data, cancel ) => {\n\t\t\tif ( menuView.isOpen ) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Closes the menu when its parent menu also closed. This prevents from orphaned open menus when the parent menu re-opens.\n\t */\n\tcloseOnParentClose( menuView: MenuBarMenuView ): void {\n\t\tmenuView.parentMenuView!.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( !isOpen && evt.source === menuView.parentMenuView ) {\n\t\t\t\t// @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeOnParentClose(): Closing', logMenu( menuView ) );\n\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t}\n\t\t} );\n\t}\n};\n\n// @if CK_DEBUG_MENU_BAR // function logMenu( menuView: MenuBarMenuView ) {\n// @if CK_DEBUG_MENU_BAR //\treturn `\"${ menuView.buttonView.label }\"`;\n// @if CK_DEBUG_MENU_BAR // }\n\n/**\n * Contains every positioning function used by {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} that decides where the\n * {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} should be placed.\n *\n * Top-level menu positioning functions:\n *\n *\t┌──────┐\n *\t│      │\n *\t├──────┴────────┐\n *\t│               │\n *\t│               │\n *\t│               │\n *\t│            SE │\n *\t└───────────────┘\n *\n *\t         ┌──────┐\n *\t         │      │\n *\t┌────────┴──────┤\n *\t│               │\n *\t│               │\n *\t│               │\n *\t│ SW            │\n *\t└───────────────┘\n *\n *\t┌───────────────┐\n *\t│ NW            │\n *\t│               │\n *\t│               │\n *\t│               │\n *\t└────────┬──────┤\n *\t         │      │\n *\t         └──────┘\n *\n *\t┌───────────────┐\n *\t│            NE │\n *\t│               │\n *\t│               │\n *\t│               │\n *\t├──────┬────────┘\n *\t│      │\n *\t└──────┘\n *\n * Sub-menu positioning functions:\n *\n *\t┌──────┬───────────────┐\n *\t│      │               │\n *\t└──────┤               │\n *\t       │               │\n *\t       │            ES │\n *\t       └───────────────┘\n *\n *\t┌───────────────┬──────┐\n *\t│               │      │\n *\t│               ├──────┘\n *\t│               │\n *\t│ WS            │\n *\t└───────────────┘\n *\n *\t       ┌───────────────┐\n *\t       │            EN │\n *\t       │               │\n *\t┌──────┤               │\n *\t│      │               │\n *\t└──────┴───────────────┘\n *\n *\t┌───────────────┐\n *\t│ WN            │\n *\t│               │\n *\t│               ├──────┐\n *\t│               │      │\n *\t└───────────────┴──────┘\n */\n/**\n * @internal\n */\nexport const MenuBarMenuViewPanelPositioningFunctions: Record<string, PositioningFunction> = {\n\tsouthEast: buttonRect => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: 'se'\n\t\t};\n\t},\n\tsouthWest: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: 'sw'\n\t\t};\n\t},\n\tnorthEast: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: 'ne'\n\t\t};\n\t},\n\tnorthWest: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: 'nw'\n\t\t};\n\t},\n\teastSouth: buttonRect => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'es'\n\t\t};\n\t},\n\teastNorth: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'en'\n\t\t};\n\t},\n\twestSouth: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'ws'\n\t\t};\n\t},\n\twestNorth: ( buttonRect, panelRect ) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: 'wn'\n\t\t};\n\t}\n} as const;\n\n/**\n * The default items {@link module:core/editor/editorconfig~EditorConfig#menuBar configuration} of the\n * {@link module:ui/menubar/menubarview~MenuBarView} component. It contains names of all menu bar components\n * registered in the {@link module:ui/componentfactory~ComponentFactory component factory} (available in the project).\n *\n * **Note**: Menu bar component names provided by core editor features are prefixed with `menuBar:` in order to distinguish\n * them from components referenced by the {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}, for instance,\n * `'menuBar:bold'` is a menu bar button but `'bold'` is a toolbar button.\n *\n * Below is the preset menu bar structure (the default value of `config.menuBar.items` property):\n *\n * ```ts\n * [\n * \t{\n * \t\tmenuId: 'file',\n * \t\tlabel: 'File',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'export',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:exportPdf',\n * \t\t\t\t\t'menuBar:exportWord'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'import',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:importWord'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'revisionHistory',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:revisionHistory'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'edit',\n * \t\tlabel: 'Edit',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'undo',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:undo',\n * \t\t\t\t\t'menuBar:redo'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'selectAll',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:selectAll'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'findAndReplace',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:findAndReplace'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'view',\n * \t\tlabel: 'View',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'sourceEditingEnhanced',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:sourceEditingEnhanced'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'sourceEditing',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:sourceEditing'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'showBlocks',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:showBlocks'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'previewMergeFields',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:previewMergeFields'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'fullscreen',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:fullscreen'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'restrictedEditingException',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:restrictedEditingException'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'insert',\n * \t\tlabel: 'Insert',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertMainWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:insertImage',\n * \t\t\t\t\t'menuBar:ckbox',\n * \t\t\t\t\t'menuBar:ckfinder',\n * \t\t\t\t\t'menuBar:insertTable'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertInline',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:link',\n * \t\t\t\t\t'menuBar:insertFootnote',\n * \t\t\t\t\t'menuBar:bookmark',\n * \t\t\t\t\t'menuBar:comment',\n * \t\t\t\t\t'menuBar:insertMergeField',\n * \t\t\t\t\t'menuBar:emoji'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertMinorWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:mediaEmbed',\n * \t\t\t\t\t'menuBar:insertTemplate',\n * \t\t\t\t\t'menuBar:blockQuote',\n * \t\t\t\t\t'menuBar:codeBlock',\n * \t\t\t\t\t'menuBar:htmlEmbed'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertStructureWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:horizontalLine',\n * \t\t\t\t\t'menuBar:pageBreak',\n * \t\t\t\t\t'menuBar:tableOfContents'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'restrictedEditing',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:restrictedEditing'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'format',\n * \t\tlabel: 'Format',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'textAndFont',\n * \t\t\t\titems: [\n * \t\t\t\t\t{\n * \t\t\t\t\t\tmenuId: 'text',\n * \t\t\t\t\t\tlabel: 'Text',\n * \t\t\t\t\t\tgroups: [\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'basicStyles',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:bold',\n * \t\t\t\t\t\t\t\t\t'menuBar:italic',\n * \t\t\t\t\t\t\t\t\t'menuBar:underline',\n * \t\t\t\t\t\t\t\t\t'menuBar:strikethrough',\n * \t\t\t\t\t\t\t\t\t'menuBar:superscript',\n * \t\t\t\t\t\t\t\t\t'menuBar:subscript',\n * \t\t\t\t\t\t\t\t\t'menuBar:code'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'textPartLanguage',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:textPartLanguage'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t}\n * \t\t\t\t\t\t]\n * \t\t\t\t\t},\n * \t\t\t\t\t{\n * \t\t\t\t\t\tmenuId: 'font',\n * \t\t\t\t\t\tlabel: 'Font',\n * \t\t\t\t\t\tgroups: [\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'fontProperties',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:fontSize',\n * \t\t\t\t\t\t\t\t\t'menuBar:fontFamily'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'fontColors',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:fontColor',\n * \t\t\t\t\t\t\t\t\t'menuBar:fontBackgroundColor'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'highlight',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:highlight'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t}\n * \t\t\t\t\t\t]\n * \t\t\t\t\t},\n * \t\t\t\t\t'menuBar:heading'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'list',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:bulletedList',\n * \t\t\t\t\t'menuBar:numberedList',\n * \t\t\t\t\t'menuBar:multiLevelList',\n * \t\t\t\t\t'menuBar:todoList'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'indent',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:alignment',\n * \t\t\t\t\t'menuBar:lineHeight',\n * \t\t\t\t\t'menuBar:indent',\n * \t\t\t\t\t'menuBar:outdent'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'caseChange',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:caseChange'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'removeFormat',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:removeFormat'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'tools',\n * \t\tlabel: 'Tools',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'aiTools',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:aiAssistant',\n * \t\t\t\t\t'menuBar:aiCommands',\n * \t\t\t\t\t'menuBar:toggleAi',\n * \t\t\t\t\t'menuBar:aiQuickActions'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'tools',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:trackChanges',\n * \t\t\t\t\t'menuBar:commentsArchive'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'help',\n * \t\tlabel: 'Help',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'help',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:accessibilityHelp'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t}\n * ];\n * ```\n *\n * The menu bar can be customized using the `config.menuBar.removeItems` and `config.menuBar.addItems` properties.\n */\n// **NOTE: Whenever you make changes to this value, reflect it in the documentation above!**\nexport const DefaultMenuBarItems: MenuBarConfigObject[ 'items' ] = [\n\t{\n\t\tmenuId: 'file',\n\t\tlabel: 'File',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'export',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:exportPdf',\n\t\t\t\t\t'menuBar:exportWord'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'import',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:importWord'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'revisionHistory',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:revisionHistory'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'edit',\n\t\tlabel: 'Edit',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'undo',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:undo',\n\t\t\t\t\t'menuBar:redo'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'selectAll',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:selectAll'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'findAndReplace',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:findAndReplace'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'view',\n\t\tlabel: 'View',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'sourceEditingEnhanced',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:sourceEditingEnhanced'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'sourceEditing',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:sourceEditing'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'showBlocks',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:showBlocks'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'previewMergeFields',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:previewMergeFields'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'fullscreen',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:fullscreen'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'restrictedEditing',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:restrictedEditing'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'insert',\n\t\tlabel: 'Insert',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'insertMainWidgets',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:insertImage',\n\t\t\t\t\t'menuBar:ckbox',\n\t\t\t\t\t'menuBar:ckfinder',\n\t\t\t\t\t'menuBar:insertTable',\n\t\t\t\t\t'menuBar:insertTableLayout'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'insertInline',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:link',\n\t\t\t\t\t'menuBar:insertFootnote',\n\t\t\t\t\t'menuBar:bookmark',\n\t\t\t\t\t'menuBar:comment',\n\t\t\t\t\t'menuBar:insertMergeField',\n\t\t\t\t\t'menuBar:emoji'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'insertMinorWidgets',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:mediaEmbed',\n\t\t\t\t\t'menuBar:insertTemplate',\n\t\t\t\t\t'menuBar:specialCharacters',\n\t\t\t\t\t'menuBar:blockQuote',\n\t\t\t\t\t'menuBar:codeBlock',\n\t\t\t\t\t'menuBar:htmlEmbed'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'insertStructureWidgets',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:horizontalLine',\n\t\t\t\t\t'menuBar:pageBreak',\n\t\t\t\t\t'menuBar:tableOfContents'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'restrictedEditingException',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:restrictedEditingException:inline',\n\t\t\t\t\t'menuBar:restrictedEditingException:block'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'format',\n\t\tlabel: 'Format',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'textAndFont',\n\t\t\t\titems: [\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: 'text',\n\t\t\t\t\t\tlabel: 'Text',\n\t\t\t\t\t\tgroups: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'basicStyles',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:bold',\n\t\t\t\t\t\t\t\t\t'menuBar:italic',\n\t\t\t\t\t\t\t\t\t'menuBar:underline',\n\t\t\t\t\t\t\t\t\t'menuBar:strikethrough',\n\t\t\t\t\t\t\t\t\t'menuBar:superscript',\n\t\t\t\t\t\t\t\t\t'menuBar:subscript',\n\t\t\t\t\t\t\t\t\t'menuBar:code'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'textPartLanguage',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:textPartLanguage'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: 'font',\n\t\t\t\t\t\tlabel: 'Font',\n\t\t\t\t\t\tgroups: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'fontProperties',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:fontSize',\n\t\t\t\t\t\t\t\t\t'menuBar:fontFamily'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'fontColors',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:fontColor',\n\t\t\t\t\t\t\t\t\t'menuBar:fontBackgroundColor'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: 'highlight',\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t'menuBar:highlight'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t'menuBar:heading'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'list',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:bulletedList',\n\t\t\t\t\t'menuBar:numberedList',\n\t\t\t\t\t'menuBar:multiLevelList',\n\t\t\t\t\t'menuBar:todoList'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'indent',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:alignment',\n\t\t\t\t\t'menuBar:lineHeight',\n\t\t\t\t\t'menuBar:indent',\n\t\t\t\t\t'menuBar:outdent'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'caseChange',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:caseChange'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'removeFormat',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:removeFormat'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'tools',\n\t\tlabel: 'Tools',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'aiTools',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:aiAssistant',\n\t\t\t\t\t'menuBar:aiCommands',\n\t\t\t\t\t'menuBar:toggleAi',\n\t\t\t\t\t'menuBar:aiQuickActions'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: 'tools',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:trackChanges',\n\t\t\t\t\t'menuBar:commentsArchive'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: 'help',\n\t\tlabel: 'Help',\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: 'help',\n\t\t\t\titems: [\n\t\t\t\t\t'menuBar:accessibilityHelp'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}\n];\n\n/**\n * Performs a cleanup and normalization of the menu bar configuration.\n */\nexport function normalizeMenuBarConfig( config: Readonly<MenuBarConfig> ): NormalizedMenuBarConfigObject {\n\tlet configObject: NormalizedMenuBarConfigObject;\n\n\t// The integrator specified the config as an object but without items. Let's give them defaults but respect their\n\t// additions and removals.\n\tif ( !( 'items' in config ) || !config.items ) {\n\t\tconfigObject = {\n\t\t\titems: cloneDeep( DefaultMenuBarItems ) as Array<MenuBarMenuDefinition>,\n\t\t\taddItems: [],\n\t\t\tremoveItems: [],\n\t\t\tisVisible: true,\n\t\t\tisUsingDefaultConfig: true,\n\t\t\t...config\n\t\t};\n\t}\n\t// The integrator specified the config as an object and there are items there. Let's take it as it is.\n\telse {\n\t\tconfigObject = {\n\t\t\titems: config.items,\n\t\t\tremoveItems: [],\n\t\t\taddItems: [],\n\t\t\tisVisible: true,\n\t\t\tisUsingDefaultConfig: false,\n\t\t\t...config\n\t\t};\n\t}\n\n\treturn configObject;\n}\n\n/**\n * Processes a normalized menu bar config and returns a config clone with the following modifications:\n *\n * * Removed components that are not available in the component factory,\n * * Removed obsolete separators,\n * * Purged empty menus,\n * * Localized top-level menu labels.\n * @internal\n */\nexport function processMenuBarConfig( {\n\tnormalizedConfig,\n\tlocale,\n\tcomponentFactory,\n\textraItems\n}: {\n\tnormalizedConfig: NormalizedMenuBarConfigObject;\n\tlocale: Locale;\n\tcomponentFactory: ComponentFactory;\n\textraItems: Array<MenuBarConfigAddedItem | MenuBarConfigAddedGroup | MenuBarConfigAddedMenu>;\n} ): NormalizedMenuBarConfigObject {\n\tconst configClone = cloneDeep( normalizedConfig ) as NormalizedMenuBarConfigObject;\n\n\thandleAdditions( normalizedConfig, configClone, extraItems );\n\thandleRemovals( normalizedConfig, configClone );\n\thandleAdditions( normalizedConfig, configClone, configClone.addItems );\n\tpurgeUnavailableComponents( normalizedConfig, configClone, componentFactory );\n\tpurgeEmptyMenus( normalizedConfig, configClone );\n\tlocalizeMenuLabels( configClone, locale );\n\n\treturn configClone;\n}\n\n/**\n * Removes items from the menu bar config based on user `removeItems` configuration. Users can remove\n * individual items, groups, or entire menus. For each removed item, a warning is logged if the item\n * was not found in the configuration.\n */\nfunction handleRemovals(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\tconfig: NormalizedMenuBarConfigObject\n) {\n\tconst itemsToBeRemoved = config.removeItems;\n\tconst successfullyRemovedItems: Array<string> = [];\n\n\t// Remove top-level menus.\n\tconfig.items = config.items.filter( ( { menuId } ) => {\n\t\tif ( itemsToBeRemoved.includes( menuId ) ) {\n\t\t\tsuccessfullyRemovedItems.push( menuId );\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\t// Remove groups from menus.\n\t\tmenuDefinition.groups = menuDefinition.groups.filter( ( { groupId } ) => {\n\t\t\tif ( itemsToBeRemoved.includes( groupId ) ) {\n\t\t\t\tsuccessfullyRemovedItems.push( groupId );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\n\t\t// Remove sub-menus and items from groups.\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tgroupDefinition.items = groupDefinition.items.filter( item => {\n\t\t\t\tconst itemId = getIdFromGroupItem( item );\n\n\t\t\t\tif ( itemsToBeRemoved.includes( itemId ) ) {\n\t\t\t\t\tsuccessfullyRemovedItems.push( itemId );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} );\n\t\t}\n\t} );\n\n\tfor ( const itemName of itemsToBeRemoved ) {\n\t\tif ( !successfullyRemovedItems.includes( itemName ) ) {\n\t\t\t/**\n\t\t\t * There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t * name does could not be removed from the menu bar configuration.\n\t\t\t *\n\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t *\n\t\t\t * @error menu-bar-item-could-not-be-removed\n\t\t\t * @param menuBarConfig The full configuration of the menu bar.\n\t\t\t * @param itemName The name of the item that was not removed from the menu bar.\n\t\t\t */\n\t\t\tlogWarning( 'menu-bar-item-could-not-be-removed', {\n\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\titemName\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * Adds provided items to config. It allows for adding menus, groups, and items at arbitrary\n * positions in the menu bar. If the position does not exist, a warning is logged.\n */\nfunction handleAdditions(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\tconfig: NormalizedMenuBarConfigObject,\n\titems: Array<MenuBarConfigAddedItem | MenuBarConfigAddedGroup | MenuBarConfigAddedMenu>\n) {\n\tconst successFullyAddedItems: typeof items = [];\n\n\tif ( items.length == 0 ) {\n\t\treturn;\n\t}\n\n\tfor ( const itemToAdd of items ) {\n\t\tconst relation = getRelationFromPosition( itemToAdd.position );\n\t\tconst relativeId = getRelativeIdFromPosition( itemToAdd.position );\n\n\t\t// Adding a menu.\n\t\tif ( isMenuBarMenuAddition( itemToAdd ) ) {\n\t\t\tif ( !relativeId ) {\n\t\t\t\t// Adding a top-level menu at the beginning of the menu bar.\n\t\t\t\tif ( relation === 'start' ) {\n\t\t\t\t\tconfig.items.unshift( itemToAdd.menu );\n\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t}\n\t\t\t\t// Adding a top-level menu at the end of the menu bar.\n\t\t\t\telse if ( relation === 'end' ) {\n\t\t\t\t\tconfig.items.push( itemToAdd.menu );\n\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst topLevelMenuDefinitionIndex = config.items.findIndex( menuDefinition => menuDefinition.menuId === relativeId );\n\n\t\t\t\t// Adding a top-level menu somewhere between existing menu bar menus.\n\t\t\t\tif ( topLevelMenuDefinitionIndex != -1 ) {\n\t\t\t\t\tif ( relation === 'before' ) {\n\t\t\t\t\t\tconfig.items.splice( topLevelMenuDefinitionIndex, 0, itemToAdd.menu );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t} else if ( relation === 'after' ) {\n\t\t\t\t\t\tconfig.items.splice( topLevelMenuDefinitionIndex + 1, 0, itemToAdd.menu );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Adding a sub-menu to an existing items group.\n\t\t\t\telse {\n\t\t\t\t\tconst wasAdded = addMenuOrItemToGroup( config, itemToAdd.menu, relativeId, relation );\n\n\t\t\t\t\tif ( wasAdded ) {\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Adding a group.\n\t\telse if ( isMenuBarMenuGroupAddition( itemToAdd ) ) {\n\t\t\twalkConfigMenus( config.items, menuDefinition => {\n\t\t\t\tif ( menuDefinition.menuId === relativeId ) {\n\t\t\t\t\t// Add a group at the start of a menu.\n\t\t\t\t\tif ( relation === 'start' ) {\n\t\t\t\t\t\tmenuDefinition.groups.unshift( itemToAdd.group );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t\t// Add a group at the end of a menu.\n\t\t\t\t\telse if ( relation === 'end' ) {\n\t\t\t\t\t\tmenuDefinition.groups.push( itemToAdd.group );\n\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst relativeGroupIndex = menuDefinition.groups.findIndex( group => group.groupId === relativeId );\n\n\t\t\t\t\tif ( relativeGroupIndex !== -1 ) {\n\t\t\t\t\t\t// Add a group before an existing group in a menu.\n\t\t\t\t\t\tif ( relation === 'before' ) {\n\t\t\t\t\t\t\tmenuDefinition.groups.splice( relativeGroupIndex, 0, itemToAdd.group );\n\t\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add a group after an existing group in a menu.\n\t\t\t\t\t\telse if ( relation === 'after' ) {\n\t\t\t\t\t\t\tmenuDefinition.groups.splice( relativeGroupIndex + 1, 0, itemToAdd.group );\n\t\t\t\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\t// Adding an item to an existing items group.\n\t\telse {\n\t\t\tconst wasAdded = addMenuOrItemToGroup( config, itemToAdd.item, relativeId, relation );\n\n\t\t\tif ( wasAdded ) {\n\t\t\t\tsuccessFullyAddedItems.push( itemToAdd );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const addedItemConfig of items ) {\n\t\tif ( !successFullyAddedItems.includes( addedItemConfig ) ) {\n\t\t\t/**\n\t\t\t * There was a problem processing the configuration of the menu bar. The configured item could not be added\n\t\t\t * because the position it was supposed to be added to does not exist.\n\t\t\t *\n\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t *\n\t\t\t * @error menu-bar-item-could-not-be-removed\n\t\t\t * @param {object} menuBarConfig The full configuration of the menu bar.\n\t\t\t * @param {object} addedItemConfig The name of the item that was not removed from the menu bar.\n\t\t\t */\n\t\t\tlogWarning( 'menu-bar-item-could-not-be-added', {\n\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\taddedItemConfig\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * Handles adding a sub-menu or an item into a group. The logic is the same for both cases.\n */\nfunction addMenuOrItemToGroup(\n\tconfig: NormalizedMenuBarConfigObject,\n\titemOrMenuToAdd: string | MenuBarMenuDefinition,\n\trelativeId: string | null,\n\trelation: 'start' | 'end' | 'before' | 'after'\n): boolean {\n\tlet wasAdded = false;\n\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\tfor ( const { groupId, items: groupItems } of menuDefinition.groups ) {\n\t\t\t// Avoid infinite loops.\n\t\t\tif ( wasAdded ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( groupId === relativeId ) {\n\t\t\t\t// Adding an item/menu at the beginning of a group.\n\t\t\t\tif ( relation === 'start' ) {\n\t\t\t\t\tgroupItems.unshift( itemOrMenuToAdd );\n\t\t\t\t\twasAdded = true;\n\t\t\t\t}\n\t\t\t\t// Adding an item/menu at the end of a group.\n\t\t\t\telse if ( relation === 'end' ) {\n\t\t\t\t\tgroupItems.push( itemOrMenuToAdd );\n\t\t\t\t\twasAdded = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Adding an item/menu relative to an existing item/menu.\n\t\t\t\tconst relativeItemIndex = groupItems.findIndex( groupItem => {\n\t\t\t\t\treturn getIdFromGroupItem( groupItem ) === relativeId;\n\t\t\t\t} );\n\n\t\t\t\tif ( relativeItemIndex !== -1 ) {\n\t\t\t\t\tif ( relation === 'before' ) {\n\t\t\t\t\t\tgroupItems.splice( relativeItemIndex, 0, itemOrMenuToAdd );\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t} else if ( relation === 'after' ) {\n\t\t\t\t\t\tgroupItems.splice( relativeItemIndex + 1, 0, itemOrMenuToAdd );\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn wasAdded;\n}\n\n/**\n * Removes components from the menu bar configuration that are not available in the factory and would\n * not be instantiated. Warns about missing components if the menu bar configuration was specified by the user.\n */\nfunction purgeUnavailableComponents(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\tconfig: NormalizedMenuBarConfigObject,\n\tcomponentFactory: ComponentFactory\n) {\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tgroupDefinition.items = groupDefinition.items.filter( item => {\n\t\t\t\tconst isItemUnavailable = typeof item === 'string' && !componentFactory.has( item );\n\n\t\t\t\t// The default configuration contains all possible editor features. But integrators' editors rarely load\n\t\t\t\t// every possible feature. This is why we do not want to log warnings about unavailable items for the default config\n\t\t\t\t// because they would show up in almost every integration. If the configuration has been provided by\n\t\t\t\t// the integrator, on the other hand, then these warnings bring value.\n\t\t\t\tif ( isItemUnavailable && !config.isUsingDefaultConfig ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t\t\t * name does not exist so it was omitted when rendering the menu bar.\n\t\t\t\t\t *\n\t\t\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t\t\t *\n\t\t\t\t\t * Make sure the plugin responsible for this menu bar item is loaded and the menu bar configuration\n\t\t\t\t\t * is correct, e.g. {@link module:basic-styles/bold/boldui~BoldUI} is loaded for the `'menuBar:bold'`\n\t\t\t\t\t * menu bar item.\n\t\t\t\t\t *\n\t\t\t\t\t * @error menu-bar-item-unavailable\n\t\t\t\t\t * @param {object} menuBarConfig The full configuration of the menu bar.\n\t\t\t\t\t * @param {object} parentMenuConfig The config of the menu the unavailable component was defined in.\n\t\t\t\t\t * @param {string} componentName The name of the unavailable component.\n\t\t\t\t\t */\n\t\t\t\t\tlogWarning( 'menu-bar-item-unavailable', {\n\t\t\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\t\t\tparentMenuConfig: cloneDeep( menuDefinition ),\n\t\t\t\t\t\tcomponentName: item\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn !isItemUnavailable;\n\t\t\t} );\n\t\t}\n\t} );\n}\n\n/**\n * Removes empty menus from the menu bar configuration to improve the visual UX. Such menus can occur\n * when some plugins responsible for providing menu bar items have not been loaded and some part of\n * the configuration populated menus using these components exclusively.\n */\nfunction purgeEmptyMenus(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\tconfig: NormalizedMenuBarConfigObject\n) {\n\tconst isUsingDefaultConfig = config.isUsingDefaultConfig;\n\tlet wasSubMenuPurged = false;\n\n\t// Purge top-level menus.\n\tconfig.items = config.items.filter( menuDefinition => {\n\t\tif ( !menuDefinition.groups.length ) {\n\t\t\twarnAboutEmptyMenu( originalConfig, menuDefinition, isUsingDefaultConfig );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n\n\t// Warn if there were no top-level menus left in the menu bar after purging.\n\tif ( !config.items.length ) {\n\t\twarnAboutEmptyMenu( originalConfig, originalConfig, isUsingDefaultConfig );\n\n\t\treturn;\n\t}\n\n\t// Purge sub-menus and groups.\n\twalkConfigMenus( config.items, menuDefinition => {\n\t\t// Get rid of empty groups.\n\t\tmenuDefinition.groups = menuDefinition.groups.filter( groupDefinition => {\n\t\t\tif ( !groupDefinition.items.length ) {\n\t\t\t\twasSubMenuPurged = true;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\n\t\t// Get rid of empty sub-menus.\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tgroupDefinition.items = groupDefinition.items.filter( item => {\n\t\t\t\t// If no groups were left after removing empty ones.\n\t\t\t\tif ( isMenuDefinition( item ) && !item.groups.length ) {\n\t\t\t\t\twarnAboutEmptyMenu( originalConfig, item, isUsingDefaultConfig );\n\t\t\t\t\twasSubMenuPurged = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} );\n\t\t}\n\t} );\n\n\tif ( wasSubMenuPurged ) {\n\t\t// The config is walked from the root to the leaves so if anything gets removed, we need to re-run the\n\t\t// whole process because it could've affected parents.\n\t\tpurgeEmptyMenus( originalConfig, config );\n\t}\n}\n\nfunction warnAboutEmptyMenu(\n\toriginalConfig: NormalizedMenuBarConfigObject,\n\temptyMenuConfig: MenuBarMenuDefinition | NormalizedMenuBarConfigObject,\n\tisUsingDefaultConfig: boolean\n) {\n\tif ( isUsingDefaultConfig ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * There was a problem processing the configuration of the menu bar. One of the menus\n\t * is empty so it was omitted when rendering the menu bar.\n\t *\n\t * This warning usually shows up when some {@link module:core/plugin~Plugin plugins} responsible for\n\t * providing menu bar items have not been loaded and the\n\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration} was not updated.\n\t *\n\t * Make sure all necessary editor plugins are loaded and/or update the menu bar configuration\n\t * to account for the missing menu items.\n\t *\n\t * @error menu-bar-menu-empty\n\t * @param {object} menuBarConfig The full configuration of the menu bar.\n\t * @param {object} emptyMenuConfig The definition of the menu that has no child items.\n\t */\n\tlogWarning( 'menu-bar-menu-empty', {\n\t\tmenuBarConfig: originalConfig,\n\t\temptyMenuConfig\n\t} );\n}\n\n/**\n * Localizes the user-config using pre-defined localized category labels.\n */\nfunction localizeMenuLabels( config: NormalizedMenuBarConfigObject, locale: Locale ) {\n\tconst t = locale.t;\n\tconst localizedCategoryLabels: Record<string, string> = {\n\t\t// Top-level categories.\n\t\t'File': t( {\n\t\t\tstring: 'File',\n\t\t\tid: 'MENU_BAR_MENU_FILE'\n\t\t} ),\n\t\t'Edit': t( {\n\t\t\tstring: 'Edit',\n\t\t\tid: 'MENU_BAR_MENU_EDIT'\n\t\t} ),\n\t\t'View': t( {\n\t\t\tstring: 'View',\n\t\t\tid: 'MENU_BAR_MENU_VIEW'\n\t\t} ),\n\t\t'Insert': t( {\n\t\t\tstring: 'Insert',\n\t\t\tid: 'MENU_BAR_MENU_INSERT'\n\t\t} ),\n\t\t'Format': t( {\n\t\t\tstring: 'Format',\n\t\t\tid: 'MENU_BAR_MENU_FORMAT'\n\t\t} ),\n\t\t'Tools': t( {\n\t\t\tstring: 'Tools',\n\t\t\tid: 'MENU_BAR_MENU_TOOLS'\n\t\t} ),\n\t\t'Help': t( {\n\t\t\tstring: 'Help',\n\t\t\tid: 'MENU_BAR_MENU_HELP'\n\t\t} ),\n\n\t\t// Sub-menus.\n\t\t'Text': t( {\n\t\t\tstring: 'Text',\n\t\t\tid: 'MENU_BAR_MENU_TEXT'\n\t\t} ),\n\t\t'Font': t( {\n\t\t\tstring: 'Font',\n\t\t\tid: 'MENU_BAR_MENU_FONT'\n\t\t} )\n\t};\n\n\twalkConfigMenus( config.items, definition => {\n\t\tif ( definition.label in localizedCategoryLabels ) {\n\t\t\tdefinition.label = localizedCategoryLabels[ definition.label ];\n\t\t}\n\t} );\n}\n\n/**\n * Recursively visits all menu definitions in the config and calls the callback for each of them.\n */\nfunction walkConfigMenus(\n\tdefinition: NormalizedMenuBarConfigObject[ 'items' ] | MenuBarMenuDefinition,\n\tcallback: ( definition: MenuBarMenuDefinition ) => void\n) {\n\t/* v8 ignore else -- @preserve */\n\tif ( Array.isArray( definition ) ) {\n\t\tfor ( const topLevelMenuDefinition of definition ) {\n\t\t\twalk( topLevelMenuDefinition );\n\t\t}\n\t}\n\n\tfunction walk( menuDefinition: MenuBarMenuDefinition ) {\n\t\tcallback( menuDefinition );\n\n\t\tfor ( const groupDefinition of menuDefinition.groups ) {\n\t\t\tfor ( const groupItem of groupDefinition.items ) {\n\t\t\t\tif ( isMenuDefinition( groupItem ) ) {\n\t\t\t\t\twalk( groupItem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction isMenuBarMenuAddition( definition: any ): definition is MenuBarConfigAddedMenu {\n\treturn typeof definition === 'object' && 'menu' in definition;\n}\n\nfunction isMenuBarMenuGroupAddition( definition: any ): definition is MenuBarConfigAddedGroup {\n\treturn typeof definition === 'object' && 'group' in definition;\n}\n\nfunction getRelationFromPosition( position: MenuBarConfigAddedPosition ): 'start' | 'end' | 'before' | 'after' {\n\tif ( position.startsWith( 'start' ) ) {\n\t\treturn 'start';\n\t} else if ( position.startsWith( 'end' ) ) {\n\t\treturn 'end';\n\t} else if ( position.startsWith( 'after' ) ) {\n\t\treturn 'after';\n\t} else {\n\t\treturn 'before';\n\t}\n}\n\nfunction getRelativeIdFromPosition( position: MenuBarConfigAddedPosition ): string | null {\n\tconst match = position.match( /^[^:]+:(.+)/ );\n\n\tif ( match ) {\n\t\treturn match[ 1 ];\n\t}\n\n\treturn null;\n}\n\nfunction getIdFromGroupItem( item: string | MenuBarMenuDefinition ): string {\n\treturn typeof item === 'string' ? item : item.menuId;\n}\n\nfunction isMenuDefinition( definition: any ): definition is MenuBarMenuDefinition {\n\treturn typeof definition === 'object' && 'menuId' in definition;\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/**\n * @module ui/editorui/editorui\n */\n\nimport { ComponentFactory } from '../componentfactory.js';\nimport { TooltipManager } from '../tooltipmanager.js';\nimport { PoweredBy } from './poweredby.js';\nimport { EvaluationBadge } from './evaluationbadge.js';\nimport { AriaLiveAnnouncer } from '../arialiveannouncer.js';\n\nimport { type EditorUIView } from './editoruiview.js';\nimport { type ToolbarView } from '../toolbar/toolbarview.js';\nimport type { View, UIViewRenderEvent } from '../view.js';\n\nimport {\n\tObservableMixin,\n\tDomEmitterMixin,\n\tglobal,\n\tisVisible,\n\tFocusTracker,\n\tgetVisualViewportOffset,\n\ttype EventInfo,\n\ttype CollectionAddEvent,\n\ttype CollectionRemoveEvent,\n\ttype ObservableSetEvent,\n\ttype DomEmitter,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { Editor, ViewportOffsetConfig } from '@ckeditor/ckeditor5-core';\nimport type { ViewDocumentLayoutChangedEvent, ViewScrollToTheSelectionEvent } from '@ckeditor/ckeditor5-engine';\nimport type {\n\tMenuBarView,\n\tMenuBarConfigAddedGroup,\n\tMenuBarConfigAddedItem,\n\tMenuBarConfigAddedMenu\n} from '../menubar/menubarview.js';\nimport { normalizeMenuBarConfig } from '../menubar/utils.js';\n\nconst EditorUIBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * A class providing the minimal interface that is required to successfully bootstrap any editor UI.\n */\nexport abstract class EditorUI extends EditorUIBase {\n\t/**\n\t * The editor that the UI belongs to.\n\t */\n\tpublic readonly editor: Editor;\n\n\t/**\n\t * An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins\n\t * to register factories of specific UI components.\n\t */\n\tpublic readonly componentFactory: ComponentFactory;\n\n\t/**\n\t * Stores the information about the editor UI focus and propagates it so various plugins and components\n\t * are unified as a focus group.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Manages the tooltips displayed on mouseover and focus across the UI.\n\t */\n\tpublic readonly tooltipManager: TooltipManager;\n\n\t/**\n\t * A helper that enables the \"powered by\" feature in the editor and renders a link to the project's webpage.\n\t */\n\tpublic readonly poweredBy: PoweredBy;\n\n\t/**\n\t * A helper that enables the \"evaluation badge\" feature in the editor.\n\t */\n\tpublic readonly evaluationBadge: EvaluationBadge;\n\n\t/**\n\t * A helper that manages the content of an `aria-live` regions used by editor features to announce status changes\n\t * to screen readers.\n\t */\n\tpublic readonly ariaLiveAnnouncer: AriaLiveAnnouncer;\n\n\t/**\n\t * Indicates the UI is ready. Set `true` after {@link #event:ready} event is fired.\n\t *\n\t * @readonly\n\t * @default false\n\t */\n\tpublic isReady: boolean = false;\n\n\tpublic abstract get view(): EditorUIView;\n\n\t/**\n\t * Stores viewport offsets from every direction.\n\t *\n\t * Viewport offset can be used to constrain balloons or other UI elements into an element smaller than the viewport.\n\t * This can be useful if there are any other absolutely positioned elements that may interfere with editor UI.\n\t *\n\t * Example `editor.ui.viewportOffset` returns:\n\t *\n\t * ```js\n\t * {\n\t * \ttop: 50,\n\t * \tright: 50,\n\t * \tbottom: 50,\n\t * \tleft: 50,\n\t * \tvisualTop: 50\n\t * }\n\t * ```\n\t *\n\t * This property can be overriden after editor already being initialized:\n\t *\n\t * ```js\n\t * editor.ui.viewportOffset = {\n\t * \ttop: 100,\n\t * \tright: 0,\n\t * \tbottom: 0,\n\t * \tleft: 0\n\t * };\n\t * ```\n\t *\n\t * @observable\n\t */\n\tpublic declare viewportOffset: ViewportOffset;\n\n\t/**\n\t * Stores all editable elements used by the editor instance.\n\t */\n\tprivate _editableElementsMap = new Map<string, HTMLElement>();\n\n\t/**\n\t * All available & focusable toolbars.\n\t */\n\tprivate _focusableToolbarDefinitions: Array<FocusableToolbarDefinition> = [];\n\n\t/**\n\t * All additional menu bar items, groups or menus that have their default location defined.\n\t */\n\tprivate _extraMenuBarElements: Array<MenuBarConfigAddedItem | MenuBarConfigAddedGroup | MenuBarConfigAddedMenu> = [];\n\n\t/**\n\t * The last focused element to which focus should return on `Esc` press.\n\t */\n\tprivate _lastFocusedForeignElement: HTMLElement | null = null;\n\n\t/**\n\t * The DOM emitter instance used for visual viewport watching.\n\t */\n\tprivate _domEmitter?: DomEmitter;\n\n\t/**\n\t * Creates an instance of the editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper();\n\n\t\tconst editingView = editor.editing.view;\n\n\t\tthis.editor = editor;\n\t\tthis.componentFactory = new ComponentFactory( editor );\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.tooltipManager = new TooltipManager( editor );\n\t\tthis.poweredBy = new PoweredBy( editor );\n\t\tthis.evaluationBadge = new EvaluationBadge( editor );\n\t\tthis.ariaLiveAnnouncer = new AriaLiveAnnouncer( editor );\n\n\t\tthis._initViewportOffset( this._readViewportOffsetFromConfig() );\n\n\t\tthis.once<EditorUIReadyEvent>( 'ready', () => {\n\t\t\tthis._bindBodyCollectionWithFocusTracker();\n\n\t\t\tthis.isReady = true;\n\t\t} );\n\n\t\t// Informs UI components that should be refreshed after layout change.\n\t\tthis.listenTo<ViewDocumentLayoutChangedEvent>( editingView.document, 'layoutChanged', this.update.bind( this ) );\n\t\tthis.listenTo<ViewScrollToTheSelectionEvent>( editingView, 'scrollToTheSelection', this._handleScrollToTheSelection.bind( this ) );\n\n\t\tthis._initFocusTracking();\n\t\tthis._initVisualViewportSupport();\n\t}\n\n\t/**\n\t * The main (outermost) DOM element of the editor UI.\n\t *\n\t * For example, in {@link module:editor-classic/classiceditor~ClassicEditor} it is a `<div>` which\n\t * wraps the editable element and the toolbar. In {@link module:editor-inline/inlineeditor~InlineEditor}\n\t * it is the editable element itself (as there is no other wrapper). However, in\n\t * {@link module:editor-decoupled/decouplededitor~DecoupledEditor} it is set to `null` because this editor does not\n\t * come with a single \"main\" HTML element (its editable element and toolbar are separate).\n\t *\n\t * This property can be understood as a shorthand for retrieving the element that a specific editor integration\n\t * considers to be its main DOM element.\n\t */\n\tpublic get element(): HTMLElement | null {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Fires the {@link module:ui/editorui/editorui~EditorUI#event:update `update`} event.\n\t *\n\t * This method should be called when the editor UI (e.g. positions of its balloons) needs to be updated due to\n\t * some environmental change which CKEditor 5 is not aware of (e.g. resize of a container in which it is used).\n\t */\n\tpublic update(): void {\n\t\tthis.fire<EditorUIUpdateEvent>( 'update' );\n\t}\n\n\t/**\n\t * Destroys the UI.\n\t */\n\tpublic destroy(): void {\n\t\tthis.stopListening();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.tooltipManager.destroy( this.editor );\n\t\tthis.poweredBy.destroy();\n\t\tthis.evaluationBadge.destroy();\n\n\t\t// Clean–up the references to the CKEditor instance stored in the native editable DOM elements.\n\t\tfor ( const domElement of this._editableElementsMap.values() ) {\n\t\t\t( domElement as any ).ckeditorInstance = null;\n\t\t\tthis.editor.keystrokes.stopListening( domElement );\n\t\t}\n\n\t\tthis._editableElementsMap = new Map();\n\t\tthis._focusableToolbarDefinitions = [];\n\n\t\tif ( this._domEmitter ) {\n\t\t\tthis._domEmitter.stopListening();\n\t\t}\n\t}\n\n\t/**\n\t * Stores the native DOM editable element used by the editor under a unique name.\n\t *\n\t * Also, registers the element in the editor to maintain the accessibility of the UI. When the user is editing text in a focusable\n\t * editable area, they can use the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke to navigate over editor toolbars. See {@link #addToolbar}.\n\t *\n\t * @param rootName The unique name of the editable element.\n\t * @param domElement The native DOM editable element.\n\t */\n\tpublic setEditableElement( rootName: string, domElement: HTMLElement ): void {\n\t\tthis._editableElementsMap.set( rootName, domElement );\n\n\t\t// Put a reference to the CKEditor instance in the editable native DOM element.\n\t\t// It helps 3rd–party software (browser extensions, other libraries) access and recognize\n\t\t// CKEditor 5 instances (editing roots) and use their API (there is no global editor\n\t\t// instance registry).\n\t\tif ( !( domElement as any ).ckeditorInstance ) {\n\t\t\t( domElement as any ).ckeditorInstance = this.editor;\n\t\t}\n\n\t\t// Register the element, so it becomes available for Alt+F10 and Esc navigation.\n\t\tthis.focusTracker.add( domElement );\n\n\t\tconst setUpKeystrokeHandler = () => {\n\t\t\t// The editing view of the editor is already listening to keystrokes from DOM roots (see: KeyObserver).\n\t\t\t// Do not duplicate listeners.\n\t\t\tif ( this.editor.editing.view.getDomRoot( rootName ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.editor.keystrokes.listenTo( domElement );\n\t\t};\n\n\t\t// For editable elements set by features after EditorUI is ready (e.g. source editing).\n\t\tif ( this.isReady ) {\n\t\t\tsetUpKeystrokeHandler();\n\t\t}\n\t\t// For editable elements set while the editor is being created (e.g. DOM roots).\n\t\telse {\n\t\t\tthis.once<EditorUIReadyEvent>( 'ready', setUpKeystrokeHandler );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the editable from the editor UI. Removes all handlers added by {@link #setEditableElement}.\n\t *\n\t * @param rootName The name of the editable element to remove.\n\t */\n\tpublic removeEditableElement( rootName: string ): void {\n\t\tconst domElement = this._editableElementsMap.get( rootName );\n\n\t\tif ( !domElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._editableElementsMap.delete( rootName );\n\n\t\tthis.editor.keystrokes.stopListening( domElement );\n\t\tthis.focusTracker.remove( domElement );\n\n\t\t( domElement as any ).ckeditorInstance = null;\n\t}\n\n\t/**\n\t * Returns the editable editor element with the given name or null if editable does not exist.\n\t *\n\t * @param rootName The editable name.\n\t */\n\tpublic getEditableElement( rootName: string = 'main' ): HTMLElement | undefined {\n\t\treturn this._editableElementsMap.get( rootName );\n\t}\n\n\t/**\n\t * Returns array of names of all editor editable elements.\n\t */\n\tpublic getEditableElementsNames(): IterableIterator<string> {\n\t\treturn this._editableElementsMap.keys();\n\t}\n\n\t/**\n\t * Adds a toolbar to the editor UI. Used primarily to maintain the accessibility of the UI.\n\t *\n\t * Focusable toolbars can be accessed (focused) by users by pressing the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke.\n\t * Successive keystroke presses navigate over available toolbars.\n\t *\n\t * @param toolbarView A instance of the toolbar to be registered.\n\t */\n\tpublic addToolbar( toolbarView: ToolbarView, options: FocusableToolbarOptions = {} ): void {\n\t\tif ( toolbarView.isRendered ) {\n\t\t\tthis.focusTracker.add( toolbarView );\n\t\t\tthis.editor.keystrokes.listenTo( toolbarView.element! );\n\t\t} else {\n\t\t\ttoolbarView.once<UIViewRenderEvent>( 'render', () => {\n\t\t\t\tthis.focusTracker.add( toolbarView );\n\t\t\t\tthis.editor.keystrokes.listenTo( toolbarView.element! );\n\t\t\t} );\n\t\t}\n\n\t\tthis._focusableToolbarDefinitions.push( { toolbarView, options } );\n\t}\n\n\t/**\n\t * Registers an extra menu bar element, which could be a single item, a group of items, or a menu containing groups.\n\t *\n\t * ```ts\n\t * // Register a new menu bar item.\n\t * editor.ui.extendMenuBar( {\n\t *   item: 'menuBar:customFunctionButton',\n\t *   position: 'after:menuBar:bold'\n\t * } );\n\t *\n\t * // Register a new menu bar group.\n\t * editor.ui.extendMenuBar( {\n\t *   group: {\n\t *     groupId: 'customGroup',\n\t *     items: [\n\t *       'menuBar:customFunctionButton'\n\t *     ]\n\t *   },\n\t *   position: 'start:help'\n\t * } );\n\t *\n\t * // Register a new menu bar menu.\n\t * editor.ui.extendMenuBar( {\n\t *   menu: {\n\t *     menuId: 'customMenu',\n\t *     label: 'customMenu',\n\t *     groups: [\n\t *       {\n\t *         groupId: 'customGroup',\n\t *         items: [\n\t *           'menuBar:customFunctionButton'\n\t *         ]\n\t *       }\n\t *     ]\n\t *   },\n\t *   position: 'after:help'\n\t * } );\n\t * ```\n\t */\n\tpublic extendMenuBar(\n\t\tconfig: MenuBarConfigAddedItem | MenuBarConfigAddedGroup | MenuBarConfigAddedMenu\n\t): void {\n\t\tthis._extraMenuBarElements.push( config );\n\t}\n\n\t/**\n\t * Initializes menu bar.\n\t */\n\tpublic initMenuBar( menuBarView: MenuBarView ): void {\n\t\tconst menuBarViewElement = menuBarView.element!;\n\n\t\tthis.focusTracker.add( menuBarViewElement );\n\t\tthis.editor.keystrokes.listenTo( menuBarViewElement );\n\n\t\tconst normalizedMenuBarConfig = normalizeMenuBarConfig( this.editor.config.get( 'menuBar' ) || {} );\n\n\t\tmenuBarView.fillFromConfig( normalizedMenuBarConfig, this.componentFactory, this._extraMenuBarElements );\n\n\t\tthis.editor.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tif ( !menuBarViewElement.contains( this.editor.ui.focusTracker.focusedElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Bring focus back to where it came from before focusing the toolbar:\n\t\t\t// If it came from outside the engine view (e.g. source editing), move it there.\n\t\t\tif ( this._lastFocusedForeignElement ) {\n\t\t\t\tthis._lastFocusedForeignElement.focus();\n\t\t\t\tthis._lastFocusedForeignElement = null;\n\t\t\t}\n\t\t\t// Else just focus the view editing.\n\t\t\telse {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t}\n\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis.editor.keystrokes.set( 'Alt+F9', ( data, cancel ) => {\n\t\t\t// If menu bar is already focused do nothing.\n\t\t\tif ( menuBarViewElement.contains( this.editor.ui.focusTracker.focusedElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._saveLastFocusedForeignElement();\n\n\t\t\tmenuBarView.isFocusBorderEnabled = true;\n\t\t\tmenuBarView.focus();\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * Returns viewport offsets object:\n\t *\n\t * ```js\n\t * {\n\t * \ttop: Number,\n\t * \tright: Number,\n\t * \tbottom: Number,\n\t * \tleft: Number\n\t * }\n\t * ```\n\t *\n\t * Only top property is currently supported.\n\t */\n\tprivate _readViewportOffsetFromConfig() {\n\t\tconst editor = this.editor;\n\t\tconst viewportOffsetConfig = editor.config.get( 'ui.viewportOffset' );\n\n\t\tif ( viewportOffsetConfig ) {\n\t\t\treturn viewportOffsetConfig;\n\t\t}\n\n\t\t// Not present in EditorConfig type, because it's legacy. Hence the `as` expression.\n\t\tconst legacyOffsetConfig = editor.config.get( 'toolbar.viewportTopOffset' ) as number | undefined;\n\n\t\t// Fall back to deprecated toolbar config.\n\t\tif ( legacyOffsetConfig ) {\n\t\t\t/**\n\t\t\t * The {@link module:core/editor/editorconfig~EditorConfig#toolbar `EditorConfig#toolbar.viewportTopOffset`}\n\t\t\t * property has been deprecated and will be removed in the near future. Please use\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset`} instead.\n\t\t\t *\n\t\t\t * @error editor-ui-deprecated-viewport-offset-config\n\t\t\t */\n\t\t\tconsole.warn(\n\t\t\t\t'editor-ui-deprecated-viewport-offset-config: ' +\n\t\t\t\t'The `toolbar.vieportTopOffset` configuration option is deprecated. ' +\n\t\t\t\t'It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead.'\n\t\t\t);\n\n\t\t\treturn { top: legacyOffsetConfig };\n\t\t}\n\n\t\t// More keys to come in the future.\n\t\treturn { top: 0 };\n\t}\n\n\t/**\n\t * Starts listening for <kbd>Alt</kbd> + <kbd>F10</kbd> and <kbd>Esc</kbd> keystrokes in the context of focusable\n\t * {@link #setEditableElement editable elements} and {@link #addToolbar toolbars}\n\t * to allow users navigate across the UI.\n\t */\n\tprivate _initFocusTracking(): void {\n\t\tconst editor = this.editor;\n\n\t\tlet candidateDefinitions: Array<FocusableToolbarDefinition>;\n\n\t\t// Focus the next focusable toolbar on <kbd>Alt</kbd> + <kbd>F10</kbd>.\n\t\teditor.keystrokes.set( 'Alt+F10', ( data, cancel ) => {\n\t\t\tthis._saveLastFocusedForeignElement();\n\n\t\t\tconst currentFocusedToolbarDefinition = this._getCurrentFocusedToolbarDefinition();\n\n\t\t\t// * When focusing a toolbar for the first time, set the array of definitions for successive presses of Alt+F10.\n\t\t\t// This ensures, the navigation works always the same and no pair of toolbars takes over\n\t\t\t// (e.g. image and table toolbars when a selected image is inside a cell).\n\t\t\t// * It could be that the focus went to the toolbar by clicking a toolbar item (e.g. a dropdown). In this case,\n\t\t\t// there were no candidates so they must be obtained (https://github.com/ckeditor/ckeditor5/issues/12339).\n\t\t\tif ( !currentFocusedToolbarDefinition || !candidateDefinitions ) {\n\t\t\t\tcandidateDefinitions = this._getFocusableCandidateToolbarDefinitions();\n\t\t\t}\n\n\t\t\t// In a single Alt+F10 press, check all candidates but if none were focused, don't go any further.\n\t\t\t// This prevents an infinite loop.\n\t\t\tfor ( let i = 0; i < candidateDefinitions.length; i++ ) {\n\t\t\t\tconst candidateDefinition = candidateDefinitions.shift()!;\n\n\t\t\t\t// Put the first definition to the back of the array. This allows circular navigation over all toolbars\n\t\t\t\t// on successive presses of Alt+F10.\n\t\t\t\tcandidateDefinitions.push( candidateDefinition );\n\n\t\t\t\t// Don't focus the same toolbar again. If you did, this would move focus from the nth focused toolbar item back to the\n\t\t\t\t// first item as per ToolbarView#focus() if the user navigated inside the toolbar.\n\t\t\t\tif (\n\t\t\t\t\tcandidateDefinition !== currentFocusedToolbarDefinition &&\n\t\t\t\t\tthis._focusFocusableCandidateToolbar( candidateDefinition )\n\t\t\t\t) {\n\t\t\t\t\t// Clean up after a current visible toolbar when switching to the next one.\n\t\t\t\t\tif ( currentFocusedToolbarDefinition && currentFocusedToolbarDefinition.options.afterBlur ) {\n\t\t\t\t\t\tcurrentFocusedToolbarDefinition.options.afterBlur();\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Blur the focused toolbar on <kbd>Esc</kbd> and bring the focus back to its origin.\n\t\teditor.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tconst focusedToolbarDef = this._getCurrentFocusedToolbarDefinition();\n\n\t\t\tif ( !focusedToolbarDef ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Bring focus back to where it came from before focusing the toolbar:\n\t\t\t// 1. If it came from outside the engine view (e.g. source editing), move it there.\n\t\t\tif ( this._lastFocusedForeignElement ) {\n\t\t\t\tthis._lastFocusedForeignElement.focus();\n\t\t\t\tthis._lastFocusedForeignElement = null;\n\t\t\t}\n\t\t\t// 2. There are two possibilities left:\n\t\t\t//   2.1. It could be that the focus went from an editable element in the view (root or nested).\n\t\t\t//   2.2. It could be the focus went straight to the toolbar before even focusing the editing area.\n\t\t\t// In either case, just focus the view editing. The focus will land where it belongs.\n\t\t\telse {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t}\n\n\t\t\t// Clean up after the toolbar if there is anything to do there.\n\t\t\tif ( focusedToolbarDef.options.afterBlur ) {\n\t\t\t\tfocusedToolbarDef.options.afterBlur();\n\t\t\t}\n\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * Saves last focused element that doen not belong to editing view to restore focus on `Esc`.\n\t */\n\tprivate _saveLastFocusedForeignElement() {\n\t\tconst focusedElement = this.focusTracker.focusedElement as HTMLElement;\n\n\t\t// Focus moved out of a DOM element that\n\t\t// * is not a toolbar,\n\t\t// * does not belong to the editing view (e.g. source editing).\n\t\tif (\n\t\t\tArray.from( this._editableElementsMap.values() ).includes( focusedElement ) &&\n\t\t\t!Array.from( this.editor.editing.view.domRoots.values() ).includes( focusedElement )\n\t\t) {\n\t\t\tthis._lastFocusedForeignElement = focusedElement;\n\t\t}\n\t}\n\n\t/**\n\t * Returns definitions of toolbars that could potentially be focused, sorted by their importance for the user.\n\t *\n\t * Focusable toolbars candidates are either:\n\t * * already visible,\n\t * * have `beforeFocus()` set in their {@link module:ui/editorui/editorui~FocusableToolbarDefinition definition} that suggests that\n\t * they might show up when called. Keep in mind that determining whether a toolbar will show up (and become focusable) is impossible\n\t * at this stage because it depends on its implementation, that in turn depends on the editing context (selection).\n\t *\n\t * **Note**: Contextual toolbars take precedence over regular toolbars.\n\t */\n\tprivate _getFocusableCandidateToolbarDefinitions(): Array<FocusableToolbarDefinition> {\n\t\tconst definitions: Array<FocusableToolbarDefinition> = [];\n\n\t\tfor ( const toolbarDef of this._focusableToolbarDefinitions ) {\n\t\t\tconst { toolbarView, options } = toolbarDef;\n\n\t\t\tif ( isVisible( toolbarView.element ) || options.beforeFocus ) {\n\t\t\t\tdefinitions.push( toolbarDef );\n\t\t\t}\n\t\t}\n\n\t\t// Contextual and already visible toolbars have higher priority. If both are true, the toolbar will always focus first.\n\t\t// For instance, a selected widget toolbar vs inline editor toolbar: both are visible but the widget toolbar is contextual.\n\t\tdefinitions.sort( ( defA, defB ) => getToolbarDefinitionWeight( defA ) - getToolbarDefinitionWeight( defB ) );\n\n\t\treturn definitions;\n\t}\n\n\t/**\n\t * Returns a definition of the toolbar that is currently visible and focused (one of its children has focus).\n\t *\n\t * `null` is returned when no toolbar is currently focused.\n\t */\n\tprivate _getCurrentFocusedToolbarDefinition(): FocusableToolbarDefinition | null {\n\t\tfor ( const definition of this._focusableToolbarDefinitions ) {\n\t\t\tif ( definition.toolbarView.element && definition.toolbarView.element.contains( this.focusTracker.focusedElement ) ) {\n\t\t\t\treturn definition;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Focuses a focusable toolbar candidate using its definition.\n\t *\n\t * @param candidateToolbarDefinition A definition of the toolbar to focus.\n\t * @returns `true` when the toolbar candidate was focused. `false` otherwise.\n\t */\n\tprivate _focusFocusableCandidateToolbar( candidateToolbarDefinition: FocusableToolbarDefinition ): boolean {\n\t\tconst { toolbarView, options: { beforeFocus } } = candidateToolbarDefinition;\n\n\t\tif ( beforeFocus ) {\n\t\t\tbeforeFocus();\n\t\t}\n\n\t\t// If it didn't show up after beforeFocus(), it's not focusable at all.\n\t\tif ( !isVisible( toolbarView.element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttoolbarView.focus();\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Provides an integration between {@link #viewportOffset} and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t * It allows the UI-agnostic engine method to consider user-configured viewport offsets specific for the integration.\n\t *\n\t * @param evt The `scrollToTheSelection` event info.\n\t * @param data The payload carried by the `scrollToTheSelection` event.\n\t */\n\tprivate _handleScrollToTheSelection(\n\t\tevt: EventInfo<'scrollToTheSelection'>,\n\t\tdata: ViewScrollToTheSelectionEvent[ 'args' ][ 0 ]\n\t): void {\n\t\tconst configuredViewportOffset = {\n\t\t\ttop: 0,\n\t\t\tbottom: 0,\n\t\t\tleft: 0,\n\t\t\tright: 0,\n\t\t\t...this.viewportOffset\n\t\t};\n\n\t\tdata.viewportOffset.top += configuredViewportOffset.top;\n\t\tdata.viewportOffset.bottom += configuredViewportOffset.bottom;\n\t\tdata.viewportOffset.left += configuredViewportOffset.left;\n\t\tdata.viewportOffset.right += configuredViewportOffset.right;\n\t}\n\n\t/**\n\t * Ensures that the focus tracker is aware of all views' DOM elements in the body collection.\n\t */\n\tprivate _bindBodyCollectionWithFocusTracker() {\n\t\tconst body = this.view.body;\n\n\t\tfor ( const view of body ) {\n\t\t\tthis.focusTracker.add( view.element! );\n\t\t}\n\n\t\tbody.on<CollectionAddEvent<View>>( 'add', ( evt, view ) => {\n\t\t\tthis.focusTracker.add( view.element! );\n\t\t} );\n\n\t\tbody.on<CollectionRemoveEvent<View>>( 'remove', ( evt, view ) => {\n\t\t\tthis.focusTracker.remove( view.element! );\n\t\t} );\n\t}\n\n\t/**\n\t * Set initial viewport offset and setup visualTop augmentation.\n\t */\n\tprivate _initViewportOffset( viewportOffsetConfig: ViewportOffsetConfig ) {\n\t\t// Augment the viewport offset set from outside the editor with the visualTop property.\n\t\tthis.on<ObservableSetEvent<ViewportOffset>>( 'set:viewportOffset', ( evt, name, value ) => {\n\t\t\tconst visualTop = this._getVisualViewportTopOffset( value );\n\n\t\t\t// Update only if there is a change in a value, so we do not trigger\n\t\t\t// listeners to the viewportOffset observable.\n\t\t\tif ( value.visualTop !== visualTop ) {\n\t\t\t\tevt.return = { ...value, visualTop };\n\t\t\t}\n\t\t} );\n\n\t\t// Set the initial value after augmenting the setter.\n\t\tthis.set( 'viewportOffset', viewportOffsetConfig );\n\t}\n\n\t/**\n\t * Listen to visual viewport changes and update the viewportOffset with the visualTop property\n\t * according to the visible part of it (visual viewport).\n\t */\n\tprivate _initVisualViewportSupport() {\n\t\tif ( !global.window.visualViewport ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst updateViewport = () => {\n\t\t\tconst visualTop = this._getVisualViewportTopOffset( this.viewportOffset );\n\n\t\t\t// Update only if there is a change in a value, so we do not trigger\n\t\t\t// listeners to the viewportOffset observable.\n\t\t\tif ( this.viewportOffset.visualTop !== visualTop ) {\n\t\t\t\tthis.viewportOffset = { ...this.viewportOffset, visualTop };\n\t\t\t}\n\t\t};\n\n\t\t// Listen to the changes in the visual viewport to adjust the visualTop of viewport offset.\n\t\tthis._domEmitter = new ( DomEmitterMixin() )();\n\t\tthis._domEmitter.listenTo( global.window.visualViewport, 'scroll', updateViewport );\n\t\tthis._domEmitter.listenTo( global.window.visualViewport, 'resize', updateViewport );\n\t}\n\n\t/**\n\t * Calculate the viewport top offset according to the visible part of it (visual viewport).\n\t */\n\tprivate _getVisualViewportTopOffset( viewportOffset: { top?: number } ): number {\n\t\tconst visualViewportOffsetTop = getVisualViewportOffset().top;\n\t\tconst viewportTopOffset = viewportOffset.top || 0;\n\n\t\treturn visualViewportOffsetTop > viewportTopOffset ? 0 : viewportTopOffset - visualViewportOffsetTop;\n\t}\n}\n\n/**\n * Fired when the editor UI is ready.\n *\n * Fired before {@link module:engine/controller/datacontroller~DataController#event:ready}.\n *\n * @eventName ~EditorUI#ready\n */\nexport type EditorUIReadyEvent = {\n\tname: 'ready';\n\targs: [];\n};\n\n/**\n * Fired whenever the UI (all related components) should be refreshed.\n *\n * **Note:**: The event is fired after each {@link module:engine/view/document~ViewDocument#event:layoutChanged}.\n * It can also be fired manually via the {@link module:ui/editorui/editorui~EditorUI#update} method.\n *\n * @eventName ~EditorUI#update\n */\nexport type EditorUIUpdateEvent = {\n\tname: 'update';\n\targs: [];\n};\n\n/**\n * A definition of a focusable toolbar. Used by {@link module:ui/editorui/editorui~EditorUI#addToolbar}.\n */\nexport interface FocusableToolbarDefinition {\n\n\t/**\n\t * An instance of a focusable toolbar view.\n\t */\n\ttoolbarView: ToolbarView;\n\n\t/**\n\t * Options of a focusable toolbar view:\n\t *\n\t * * `isContextual`: Marks the higher priority toolbar. For example when there are 2 visible toolbars,\n\t * it allows to distinguish which toolbar should be focused first after the `alt+f10` keystroke\n\t * * `beforeFocus`: A callback executed before the `ToolbarView` gains focus upon the `Alt+F10` keystroke.\n\t * * `afterBlur`: A callback executed after `ToolbarView` loses focus upon `Esc` keystroke but before\n\t * the focus goes back to the `origin`.\n\t */\n\toptions: FocusableToolbarOptions;\n}\n\nexport interface FocusableToolbarOptions {\n\n\t/**\n\t * Set `true` if the toolbar is attached to the content of the editor. Such toolbar takes\n\t * a precedence over other toolbars when a user pressed <kbd>Alt</kbd> + <kbd>F10</kbd>.\n\t */\n\tisContextual?: boolean;\n\n\t/**\n\t * Specify a callback executed before the toolbar instance DOM element gains focus\n\t * upon the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke.\n\t */\n\tbeforeFocus?: () => void;\n\n\t/**\n\t * Specify a callback executed after the toolbar instance DOM element loses focus upon\n\t * <kbd>Esc</kbd> keystroke but before the focus goes back to the {@link ~EditorUI#setEditableElement editable element}.\n\t */\n\tafterBlur?: () => void;\n}\n\nexport interface ViewportOffset extends ViewportOffsetConfig {\n\n\t/**\n\t * The top offset of the visual viewport.\n\t *\n\t * This value is calculated based on the visual viewport position.\n\t */\n\tvisualTop?: number;\n}\n\n/**\n * Returns a number (weight) for a toolbar definition. Visible toolbars have a higher priority and so do\n * contextual toolbars (displayed in the context of a content, for instance, an image toolbar).\n *\n * A standard invisible toolbar is the heaviest. A visible contextual toolbar is the lightest.\n *\n * @param toolbarDef A toolbar definition to be weighted.\n */\nfunction getToolbarDefinitionWeight( toolbarDef: FocusableToolbarDefinition ): number {\n\tconst { toolbarView, options } = toolbarDef;\n\tlet weight = 10;\n\n\t// Prioritize already visible toolbars. They should get focused first.\n\tif ( isVisible( toolbarView.element ) ) {\n\t\tweight--;\n\t}\n\n\t// Prioritize contextual toolbars. They are displayed at the selection.\n\tif ( options.isContextual ) {\n\t\tweight -= 2;\n\t}\n\n\treturn weight;\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/**\n * @module ui/editorui/editoruiview\n */\n\nimport { View } from '../view.js';\nimport { BodyCollection } from './bodycollection.js';\nimport { type EditableUIView } from '../editableui/editableuiview.js';\n\nimport type { Locale, LocaleTranslate } from '@ckeditor/ckeditor5-utils';\n\nimport { type MenuBarView } from '../menubar/menubarview.js';\nimport { type ToolbarView } from '../toolbar/toolbarview.js';\n\n/**\n * The editor UI view class. Base class for the editor main views.\n */\nexport abstract class EditorUIView extends View {\n\t/**\n\t * Collection of the child views, detached from the DOM\n\t * structure of the editor, like panels, icons etc.\n\t */\n\tpublic readonly body: BodyCollection;\n\n\tdeclare public locale: Locale;\n\tdeclare public t: LocaleTranslate;\n\n\tpublic abstract get editable(): EditableUIView;\n\n\t/**\n\t * Menu bar view instance. Initialized by default in:\n\t *\n\t * * balloon editor;\n\t * * decoupled editor;\n\t * * multiroot editor.\n\t */\n\tpublic menuBarView?: MenuBarView;\n\n\t/**\n\t * Toolbar view instance. Initialized by default in:\n\t *\n\t * * classic editor;\n\t * * decoupled editor;\n\t * * inline editor;\n\t * * multiroot editor.\n\t */\n\tpublic toolbar?: ToolbarView;\n\n\t/**\n\t * Creates an instance of the editor UI view class.\n\t *\n\t * @param locale The locale instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.body = new BodyCollection( locale );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.body.attachToDom();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis.body.detachFromDom();\n\n\t\treturn super.destroy();\n\t}\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/**\n * @module ui/editorui/boxed/boxededitoruiview\n */\n\nimport { EditorUIView } from '../editoruiview.js';\nimport { LabelView } from '../../label/labelview.js';\nimport { type ViewCollection } from '../../viewcollection.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The boxed editor UI view class. This class represents an editor interface\n * consisting of a toolbar and an editable area, enclosed within a box.\n */\nexport abstract class BoxedEditorUIView extends EditorUIView {\n\t/**\n\t * Collection of the child views located in the top (`.ck-editor__top`)\n\t * area of the UI.\n\t */\n\tpublic readonly top: ViewCollection;\n\n\t/**\n\t * Collection of the child views located in the main (`.ck-editor__main`)\n\t * area of the UI.\n\t */\n\tpublic readonly main: ViewCollection;\n\n\t/**\n\t * Voice label of the UI.\n\t */\n\tprivate readonly _voiceLabelView: LabelView;\n\n\t/**\n\t * Creates an instance of the boxed editor UI view class.\n\t *\n\t * @param locale The locale instance..\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.top = this.createCollection();\n\t\tthis.main = this.createCollection();\n\t\tthis._voiceLabelView = this._createVoiceLabel();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-reset',\n\t\t\t\t\t'ck-editor',\n\t\t\t\t\t'ck-rounded-corners'\n\t\t\t\t],\n\t\t\t\trole: 'application',\n\t\t\t\tdir: locale.uiLanguageDirection,\n\t\t\t\tlang: locale.uiLanguage,\n\t\t\t\t'aria-labelledby': this._voiceLabelView.id\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis._voiceLabelView,\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-editor__top',\n\t\t\t\t\t\t\t'ck-reset_all'\n\t\t\t\t\t\t],\n\t\t\t\t\t\trole: 'presentation'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.top\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-editor__main'\n\t\t\t\t\t\t],\n\t\t\t\t\t\trole: 'presentation'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.main\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a voice label view instance.\n\t */\n\tprivate _createVoiceLabel() {\n\t\tconst t = this.t;\n\t\tconst voiceLabel = new LabelView();\n\n\t\tvoiceLabel.text = t( 'Rich Text Editor' );\n\n\t\tvoiceLabel.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-voice-label'\n\t\t\t}\n\t\t} );\n\n\t\treturn voiceLabel;\n\t}\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/**\n * @module ui/editableui/editableuiview\n */\n\nimport { View } from '../view.js';\n\nimport type { EditingView } from '@ckeditor/ckeditor5-engine';\nimport { toArray, type Locale, type ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\nimport type { ViewRootElementDefinition } from '@ckeditor/ckeditor5-core';\n\nimport { isElement as _isElement } from 'es-toolkit/compat';\n\n/**\n * The editable UI view class.\n */\nexport class EditableUIView extends View {\n\t/**\n\t * The name of the editable UI view.\n\t */\n\tpublic name: string | null = null;\n\n\t/**\n\t * Controls whether the editable is focused, i.e. the user is typing in it.\n\t *\n\t * @observable\n\t */\n\tdeclare public isFocused: boolean;\n\n\t/**\n\t * Whether this editable is bound to an inline root (a root that only holds inline content, with no block children).\n\t * Set by the editor's UI initialization, after plugin schema registrations have settled. When `true`, a\n\t * `ck-editor__editable_inline-root` CSS class is added to the element so themes can distinguish inline roots from\n\t * block ones; the placeholder helper also reads it to decide where to host the placeholder.\n\t *\n\t * @observable\n\t */\n\tdeclare public isInlineRoot: boolean;\n\n\t/**\n\t * The editing view instance the editable is related to. Editable uses the editing\n\t * view to dynamically modify its certain DOM attributes after {@link #render rendering}.\n\t *\n\t * **Note**: The DOM attributes are performed by the editing view and not UI\n\t * {@link module:ui/view~View#bindTemplate template bindings} because once rendered,\n\t * the editable DOM element must remain under the full control of the engine to work properly.\n\t */\n\tprotected _editingView: EditingView;\n\n\t/**\n\t * The element which is the main editable element (usually the one with `contentEditable=\"true\"`).\n\t */\n\tprotected _editableElement: HTMLElement | null | undefined;\n\n\t/**\n\t * Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t * the view will not render its {@link #template}.\n\t */\n\tprivate _hasExternalElement: boolean;\n\n\t/**\n\t * Creates an instance of EditableUIView class.\n\t *\n\t * @param locale The locale instance.\n\t * @param editingView The editing view instance the editable is related to.\n\t * @param editableElement The editable element. If an existing `HTMLElement` is passed, the view applies its\n\t * template to it; otherwise the view creates a fresh element (a `<div>` by default, or one matching the given\n\t * {@link module:core/editor/editorconfig~ViewRootElementDefinition}).\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\teditableElement?: HTMLElement | ViewRootElementDefinition\n\t) {\n\t\tsuper( locale );\n\n\t\tconst elementDefinition = isElement( editableElement ) ? undefined : editableElement;\n\t\tconst { name, classes, styles, attributes } = elementDefinition || {};\n\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'isInlineRoot', false );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: name || 'div',\n\t\t\tattributes: {\n\t\t\t\t...attributes,\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-content',\n\t\t\t\t\t'ck-editor__editable',\n\t\t\t\t\t'ck-rounded-corners',\n\t\t\t\t\tthis.bindTemplate.if( 'isInlineRoot', 'ck-editor__editable_inline-root' ),\n\t\t\t\t\t...( classes ? toArray( classes ) : [] )\n\t\t\t\t],\n\t\t\t\t...( styles && { style: styles } ),\n\t\t\t\tlang: locale.contentLanguage,\n\t\t\t\tdir: locale.contentLanguageDirection\n\t\t\t}\n\t\t} );\n\n\t\tthis._editableElement = isElement( editableElement ) ? editableElement : undefined;\n\t\tthis._hasExternalElement = !!this._editableElement;\n\t\tthis._editingView = editingView;\n\t}\n\n\t/**\n\t * Renders the view by either applying the {@link #template} to the existing\n\t * {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}\n\t * as {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement}.\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this._hasExternalElement ) {\n\t\t\tthis.template!.apply( this.element = this._editableElement! );\n\t\t} else {\n\t\t\tthis._editableElement = this.element;\n\t\t}\n\n\t\tthis.on<ObservableChangeEvent>( 'change:isFocused', () => this._updateIsFocusedClasses() );\n\t\tthis._updateIsFocusedClasses();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._hasExternalElement ) {\n\t\t\tthis.template!.revert( this._editableElement! );\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t * the view will not render its {@link #template}.\n\t */\n\tpublic get hasExternalElement(): boolean {\n\t\treturn this._hasExternalElement;\n\t}\n\n\t/**\n\t * Updates the `ck-focused` and `ck-blurred` CSS classes on the {@link #element} according to\n\t * the {@link #isFocused} property value using the {@link #_editingView editing view} API.\n\t */\n\tprivate _updateIsFocusedClasses() {\n\t\tconst editingView = this._editingView;\n\n\t\tif ( editingView.isRenderingInProgress ) {\n\t\t\tupdateAfterRender( this );\n\t\t} else {\n\t\t\tupdate( this );\n\t\t}\n\n\t\tfunction update( view: EditableUIView ) {\n\t\t\teditingView.change( writer => {\n\t\t\t\tconst viewRoot = editingView.document.getRoot( view.name! )!;\n\n\t\t\t\twriter.addClass( view.isFocused ? 'ck-focused' : 'ck-blurred', viewRoot );\n\t\t\t\twriter.removeClass( view.isFocused ? 'ck-blurred' : 'ck-focused', viewRoot );\n\t\t\t} );\n\t\t}\n\n\t\t// In a case of a multi-root editor, a callback will be attached more than once (one callback for each root).\n\t\t// While executing one callback the `isRenderingInProgress` observable is changing what causes executing another\n\t\t// callback and render is called inside the already pending render.\n\t\t// We need to be sure that callback is executed only when the value has changed from `true` to `false`.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1676.\n\t\tfunction updateAfterRender( view: EditableUIView ) {\n\t\t\teditingView.once<ObservableChangeEvent<boolean>>( 'change:isRenderingInProgress', ( evt, name, value ) => {\n\t\t\t\tif ( !value ) {\n\t\t\t\t\tupdate( view );\n\t\t\t\t} else {\n\t\t\t\t\tupdateAfterRender( view );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n */\nfunction isElement( value: any ): value is HTMLElement {\n\treturn _isElement( value );\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/**\n * @module ui/editableui/inline/inlineeditableuiview\n */\n\nimport { EditableUIView } from '../editableuiview.js';\n\nimport type { EditingView } from '@ckeditor/ckeditor5-engine';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport type { ViewRootElementDefinition } from '@ckeditor/ckeditor5-core';\n\n/**\n * The inline editable UI class implementing an inline {@link module:ui/editableui/editableuiview~EditableUIView}.\n */\nexport class InlineEditableUIView extends EditableUIView {\n\t/**\n\t * The cached options object passed to the constructor.\n\t */\n\tprivate readonly _options: InlineEditableUIViewOptions;\n\n\t/**\n\t * Creates an instance of the InlineEditableUIView class.\n\t *\n\t * @param locale The locale instance.\n\t * @param editingView The editing view instance the editable is related to.\n\t * @param editableElement The editable element. May be an existing `HTMLElement`, a\n\t * {@link module:core/editor/editorconfig~ViewRootElementDefinition} describing the element to create,\n\t * or `undefined` to create a default `<div>` element. See\n\t * {@link module:ui/editableui/editableuiview~EditableUIView}.\n\t * @param options Additional configuration of the view.\n\t * @param options.label The label of the editable for assistive technologies. If not provided, a default label is used or,\n\t * the existing `aria-label` attribute value from the specified `editableElement` is preserved.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\teditableElement?: HTMLElement | ViewRootElementDefinition,\n\t\toptions: InlineEditableUIViewOptions = {}\n\t) {\n\t\tsuper( locale, editingView, editableElement );\n\n\t\tthis._options = options;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\trole: 'textbox',\n\t\t\t\tclass: 'ck-editor__editable_inline'\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tconst editingView = this._editingView;\n\n\t\teditingView.change( writer => {\n\t\t\tconst viewRoot = editingView.document.getRoot( this.name! );\n\n\t\t\twriter.setAttribute( 'aria-label', this.getEditableAriaLabel(), viewRoot! );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns a normalized label for the editable view based on the environment.\n\t */\n\tpublic getEditableAriaLabel(): string {\n\t\tconst t = this.locale!.t;\n\t\tconst label = this._options.label;\n\t\tconst editableElement = this._editableElement;\n\t\tconst editableName = this.name!;\n\n\t\tif ( typeof label == 'string' ) {\n\t\t\treturn label;\n\t\t} else if ( typeof label === 'object' ) {\n\t\t\treturn label[ editableName ];\n\t\t} else if ( typeof label === 'function' ) {\n\t\t\treturn label( this );\n\t\t} else if ( editableElement ) {\n\t\t\tconst existingLabel = editableElement.getAttribute( 'aria-label' );\n\n\t\t\tif ( existingLabel ) {\n\t\t\t\treturn existingLabel;\n\t\t\t}\n\t\t}\n\n\t\treturn t( 'Rich Text Editor. Editing area: %0', editableName );\n\t}\n}\n\nexport type InlineEditableUIViewOptions = {\n\tlabel?: ( ( view: InlineEditableUIView ) => string ) | string | Record<string, string>;\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/**\n * @module ui/formrow/formrowview\n */\n\nimport { View } from '../view.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { type LabelView } from '../label/labelview.js';\nimport { toArray, type ArrayOrItem, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The class representing a single row in a form,\n */\nexport class FormRowView extends View {\n\t/**\n\t * An additional CSS class added to the {@link #element}.\n\t *\n\t * @observable\n\t */\n\tpublic declare class: Array<string>;\n\n\t/**\n\t * A collection of row items (buttons, dropdowns, etc.).\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * The role property reflected by the `role` DOM attribute of the {@link #element}.\n\t *\n\t * **Note**: Used only when a `labelView` is passed to constructor `options`.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tpublic declare _role: string | null;\n\n\t/**\n\t * The ARIA property reflected by the `aria-labelledby` DOM attribute of the {@link #element}.\n\t *\n\t * **Note**: Used only when a `labelView` is passed to constructor `options`.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tpublic declare _ariaLabelledBy: string | null;\n\n\t/**\n\t * Creates an instance of the form row class.\n\t *\n\t * @param locale The locale instance.\n\t * @param options.labelView When passed, the row gets the `group` and `aria-labelledby`\n\t * DOM attributes and gets described by the label.\n\t */\n\tconstructor( locale: Locale, options: { children?: Array<View>; class?: ArrayOrItem<string>; labelView?: LabelView } = {} ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'class', [\n\t\t\t'ck',\n\t\t\t'ck-form__row',\n\t\t\t...toArray( options.class || [] )\n\t\t] );\n\t\tthis.children = this.createCollection();\n\n\t\tif ( options.children ) {\n\t\t\toptions.children.forEach( child => this.children.add( child ) );\n\t\t}\n\n\t\tthis.set( '_role', null );\n\t\tthis.set( '_ariaLabelledBy', null );\n\n\t\tif ( options.labelView ) {\n\t\t\tthis.set( {\n\t\t\t\t_role: 'group',\n\t\t\t\t_ariaLabelledBy: options.labelView.id\n\t\t\t} );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: bind.to( 'class', classes => classes.join( ' ' ) ),\n\t\t\t\trole: bind.to( '_role' ),\n\t\t\t\t'aria-labelledby': bind.to( '_ariaLabelledBy' )\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\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/**\n * @module ui/iframe/iframeview\n */\n\nimport { View } from '../view.js';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The iframe view class.\n *\n * ```ts\n * const iframe = new IframeView();\n *\n * iframe.render();\n * document.body.appendChild( iframe.element );\n *\n * iframe.on( 'loaded', () => {\n * \tconsole.log( 'The iframe has loaded', iframe.element.contentWindow );\n * } );\n *\n * iframe.element.src = 'https://ckeditor.com';\n * ```\n */\nexport class IframeView extends View<HTMLIFrameElement> {\n\t/**\n\t * Creates a new instance of the iframe view.\n\t *\n\t * @param locale The locale instance.\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'iframe',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-reset_all'\n\t\t\t\t],\n\t\t\t\t// It seems that we need to allow scripts in order to be able to listen to events.\n\t\t\t\t// TODO: Research that. Perhaps the src must be set?\n\t\t\t\tsandbox: 'allow-same-origin allow-scripts'\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tload: bind.to( 'loaded' )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Renders the iframe's {@link #element} and returns a `Promise` for asynchronous\n\t * child `contentDocument` loading process.\n\t *\n\t * @returns A promise which resolves once the iframe `contentDocument` has\n\t * been {@link #event:loaded}.\n\t */\n\tpublic override render(): Promise<unknown> {\n\t\treturn new Promise( resolve => {\n\t\t\tthis.on<IframeViewLoadedEvent>( 'loaded', resolve );\n\n\t\t\treturn super.render();\n\t\t} );\n\t}\n}\n\n/**\n * Fired when the DOM iframe's `contentDocument` finished loading.\n *\n * @eventName ~IframeView#loaded\n */\nexport type IframeViewLoadedEvent = {\n\tname: 'loaded';\n\targs: [];\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/**\n * @module ui/labeledinput/labeledinputview\n */\n\nimport { View } from '../view.js';\nimport { LabelView } from '../label/labelview.js';\n\nimport type { InputView, InputViewInputEvent } from '../input/inputview.js';\n\nimport { uid, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The labeled input view class.\n */\nexport class LabeledInputView extends View {\n\t/**\n\t * The label view.\n\t */\n\tpublic readonly labelView: LabelView;\n\n\t/**\n\t * The input view.\n\t */\n\tpublic readonly inputView: InputView;\n\n\t/**\n\t * The status view for the {@link #inputView}. It displays {@link #errorText} and\n\t * {@link #infoText}.\n\t */\n\tpublic readonly statusView: View;\n\n\t/**\n\t * The text of the label.\n\t *\n\t * @observable\n\t */\n\tdeclare public label: string | undefined;\n\n\t/**\n\t * The value of the input.\n\t *\n\t * @observable\n\t */\n\tdeclare public value: string | undefined;\n\n\t/**\n\t * Controls whether the component is in read-only mode.\n\t *\n\t * @observable\n\t */\n\tdeclare public isReadOnly: boolean;\n\n\t/**\n\t * The validation error text. When set, it will be displayed\n\t * next to the {@link #inputView} as a typical validation error message.\n\t * Set it to `null` to hide the message.\n\t *\n\t * **Note:** Setting this property to anything but `null` will automatically\n\t * make the {@link module:ui/inputtext/inputtextview~InputTextView#hasError `hasError`}\n\t * of the {@link #inputView} `true`.\n\t *\n\t * **Note:** Typing in the {@link #inputView} which fires the\n\t * {@link module:ui/inputtext/inputtextview~InputTextView#event:input `input` event}\n\t * resets this property back to `null`, indicating that the input field can be re–validated.\n\t *\n\t * @observable\n\t */\n\tdeclare public errorText: string | null;\n\n\t/**\n\t * The additional information text displayed next to the {@link #inputView} which can\n\t * be used to inform the user about the purpose of the input, provide help or hints.\n\t *\n\t * Set it to `null` to hide the message.\n\t *\n\t * **Note:** This text will be displayed in the same place as {@link #errorText} but the\n\t * latter always takes precedence: if the {@link #errorText} is set, it replaces\n\t * {@link #errorText} for as long as the value of the input is invalid.\n\t *\n\t * @observable\n\t */\n\tdeclare public infoText: string | null;\n\n\t/**\n\t * The combined status text made of {@link #errorText} and {@link #infoText}.\n\t * Note that when present, {@link #errorText} always takes precedence in the\n\t * status.\n\t *\n\t * @see #errorText\n\t * @see #infoText\n\t * @see #statusView\n\t * @private\n\t * @observable\n\t */\n\tdeclare public _statusText: string | null;\n\n\t/**\n\t * Creates an instance of the labeled input view class.\n\t *\n\t * @param locale The locale instance.\n\t * @param InputView Constructor of the input view.\n\t */\n\tconstructor(\n\t\tlocale: Locale | undefined,\n\t\tInputView: new ( locale: Locale | undefined, statusUid: string ) => InputView\n\t) {\n\t\tsuper( locale );\n\n\t\tconst inputUid = `ck-input-${ uid() }`;\n\t\tconst statusUid = `ck-status-${ uid() }`;\n\n\t\tthis.set( 'label', undefined );\n\t\tthis.set( 'value', undefined );\n\t\tthis.set( 'isReadOnly', false );\n\t\tthis.set( 'errorText', null );\n\t\tthis.set( 'infoText', null );\n\n\t\tthis.labelView = this._createLabelView( inputUid );\n\t\tthis.inputView = this._createInputView( InputView, inputUid, statusUid );\n\t\tthis.statusView = this._createStatusView( statusUid );\n\n\t\tthis.bind( '_statusText' ).to(\n\t\t\tthis, 'errorText',\n\t\t\tthis, 'infoText',\n\t\t\t( errorText, infoText ) => errorText || infoText\n\t\t);\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-labeled-input',\n\t\t\t\t\tbind.if( 'isReadOnly', 'ck-disabled' )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tthis.labelView,\n\t\t\t\tthis.inputView,\n\t\t\t\tthis.statusView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Creates label view class instance and bind with view.\n\t *\n\t * @param id Unique id to set as labelView#for attribute.\n\t */\n\tprivate _createLabelView( id: string ) {\n\t\tconst labelView = new LabelView( this.locale );\n\n\t\tlabelView.for = id;\n\t\tlabelView.bind( 'text' ).to( this, 'label' );\n\n\t\treturn labelView;\n\t}\n\n\t/**\n\t * Creates input view class instance and bind with view.\n\t *\n\t * @param InputView Input view constructor.\n\t * @param inputUid Unique id to set as inputView#id attribute.\n\t * @param statusUid Unique id of the status for the input's `aria-describedby` attribute.\n\t */\n\tprivate _createInputView(\n\t\tInputView: new ( locale: Locale | undefined, statusUid: string ) => InputView,\n\t\tinputUid: string,\n\t\tstatusUid: string\n\t) {\n\t\tconst inputView = new InputView( this.locale, statusUid );\n\n\t\tinputView.id = inputUid;\n\t\tinputView.ariaDescribedById = statusUid;\n\t\tinputView.bind( 'value' ).to( this );\n\t\tinputView.bind( 'isReadOnly' ).to( this );\n\t\tinputView.bind( 'hasError' ).to( this, 'errorText', value => !!value );\n\n\t\tinputView.on<InputViewInputEvent>( 'input', () => {\n\t\t\t// UX: Make the error text disappear and disable the error indicator as the user\n\t\t\t// starts fixing the errors.\n\t\t\tthis.errorText = null;\n\t\t} );\n\n\t\treturn inputView;\n\t}\n\n\t/**\n\t * Creates the status view instance. It displays {@link #errorText} and {@link #infoText}\n\t * next to the {@link #inputView}. See {@link #_statusText}.\n\t *\n\t * @param statusUid Unique id of the status, shared with the input's `aria-describedby` attribute.\n\t */\n\tprivate _createStatusView( statusUid: string ) {\n\t\tconst statusView = new View( this.locale );\n\t\tconst bind = this.bindTemplate;\n\n\t\tstatusView.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-labeled-input__status',\n\t\t\t\t\tbind.if( 'errorText', 'ck-labeled-input__status_error' ),\n\t\t\t\t\tbind.if( '_statusText', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\tid: statusUid,\n\t\t\t\trole: bind.if( 'errorText', 'alert' )\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: bind.to( '_statusText' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\treturn statusView;\n\t}\n\n\t/**\n\t * Moves the focus to the input and selects the value.\n\t */\n\tpublic select(): void {\n\t\tthis.inputView.select();\n\t}\n\n\t/**\n\t * Focuses the input.\n\t */\n\tpublic focus(): void {\n\t\tthis.inputView.focus();\n\t}\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/**\n * @module ui/search/filtergroupanditemnames\n */\n\nimport { type ButtonView } from '../button/buttonview.js';\nimport { type ButtonLabelWithHighlightView } from '../highlightedtext/buttonlabelwithhighlightview.js';\nimport { type LabelWithHighlightView } from '../highlightedtext/labelwithhighlightview.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { type ListItemGroupView } from '../list/listitemgroupview.js';\nimport { type ListItemView } from '../list/listitemview.js';\nimport { type ListSeparatorView } from '../list/listseparatorview.js';\n\n/**\n * A filter function that returns matching item and group names in the list view.\n */\nexport function filterGroupAndItemNames(\n\tregExp: RegExp | null,\n\titems: ViewCollection<ListItemGroupView | ListItemView | ListSeparatorView>\n): {\n\t\tresultsCount: number;\n\t\ttotalItemsCount: number;\n\t} {\n\tlet totalItemsCount = 0;\n\tlet resultsCount = 0;\n\n\tfor ( const groupView of items ) {\n\t\tconst group = groupView as ListItemGroupView;\n\t\tconst groupItems = group.items as ViewCollection<ListItemView>;\n\t\tconst isGroupLabelMatching = regExp && !!group.label.match( regExp );\n\n\t\t( group.labelView as LabelWithHighlightView ).highlightText( isGroupLabelMatching ? regExp : null );\n\n\t\tfor ( const listItemView of groupItems ) {\n\t\t\tconst buttonView = listItemView.children.first as ButtonView;\n\t\t\tconst labelView = buttonView.labelView as ButtonLabelWithHighlightView;\n\n\t\t\tif ( !regExp ) {\n\t\t\t\tlistItemView.isVisible = true;\n\t\t\t\tlabelView.highlightText( null );\n\t\t\t} else {\n\t\t\t\tconst isItemLabelMatching = !!buttonView.label!.match( regExp );\n\n\t\t\t\tlabelView.highlightText( isItemLabelMatching ? regExp : null );\n\n\t\t\t\tlistItemView.isVisible = isGroupLabelMatching || isItemLabelMatching;\n\t\t\t}\n\t\t}\n\n\t\tconst visibleInGroupCount = groupItems.filter( listItemView => listItemView.isVisible ).length;\n\n\t\ttotalItemsCount += group.items.length;\n\t\tresultsCount += isGroupLabelMatching ? group.items.length : visibleInGroupCount;\n\t\tgroup.isVisible = isGroupLabelMatching || !!visibleInGroupCount;\n\t}\n\n\treturn {\n\t\tresultsCount,\n\t\ttotalItemsCount\n\t};\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/**\n * @module ui/notification/notification\n */\n\nimport { ContextPlugin } from '@ckeditor/ckeditor5-core';\n\n/**\n * The Notification plugin.\n *\n * This plugin sends a few types of notifications: `success`, `info` and `warning`. The notifications need to be\n * handled and displayed by a plugin responsible for showing the UI of the notifications. Using this plugin for dispatching\n * notifications makes it possible to switch the notifications UI.\n *\n * Note that every unhandled and not stopped `warning` notification will be displayed as a system alert.\n * See {@link module:ui/notification/notification~Notification#showWarning}.\n */\nexport class Notification extends ContextPlugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Notification' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\t// Each unhandled and not stopped `show:warning` event is displayed as a system alert.\n\t\tthis.on<NotificationShowWarningEvent>( 'show:warning', ( evt, data ) => {\n\t\t\twindow.alert( data.message ); // eslint-disable-line no-alert\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Shows a success notification.\n\t *\n\t * By default, it fires the {@link #event:show:success `show:success` event} with the given `data`. The event namespace can be extended\n\t * using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showSuccess( 'Image is uploaded.', {\n\t * \tnamespace: 'upload:image'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:success:upload:image` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showSuccess( 'Image is uploaded.', {\n\t * \ttitle: 'Image upload success'\n\t * } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tpublic showSuccess(\n\t\tmessage: string,\n\t\tdata: { namespace?: string; title?: string } = {}\n\t): void {\n\t\tthis._showNotification( {\n\t\t\tmessage,\n\t\t\ttype: 'success',\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t} );\n\t}\n\n\t/**\n\t * Shows an information notification.\n\t *\n\t * By default, it fires the {@link #event:show:info `show:info` event} with the given `data`. The event namespace can be extended\n\t * using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showInfo( 'Editor is offline.', {\n\t * \tnamespace: 'editor:status'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:info:editor:status` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showInfo( 'Editor is offline.', {\n\t * \ttitle: 'Network information'\n\t * } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tpublic showInfo(\n\t\tmessage: string,\n\t\tdata: { namespace?: string; title?: string } = {}\n\t): void {\n\t\tthis._showNotification( {\n\t\t\tmessage,\n\t\t\ttype: 'info',\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t} );\n\t}\n\n\t/**\n\t * Shows a warning notification.\n\t *\n\t * By default, it fires the {@link #event:show:warning `show:warning` event}\n\t * with the given `data`. The event namespace can be extended using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showWarning( 'Image upload error.', {\n\t * \tnamespace: 'upload:image'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:warning:upload:image` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showWarning( 'Image upload error.', {\n\t * \ttitle: 'Upload failed'\n\t * } );\n\t * ```\n\t *\n\t * Note that each unhandled and not stopped `warning` notification will be displayed as a system alert.\n\t * The plugin responsible for displaying warnings should `stop()` the event to prevent displaying it as an alert:\n\t *\n\t * ```ts\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Do something with the data.\n\t *\n\t * \t// Stop this event to prevent displaying it as an alert.\n\t * \tevt.stop();\n\t * } );\n\t * ```\n\t *\n\t * You can attach many listeners to the same event and `stop()` this event in a listener with a low priority:\n\t *\n\t * ```ts\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Show the warning in the UI, but do not stop it.\n\t * } );\n\t *\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Log the warning to some error tracker.\n\t *\n\t * \t// Stop this event to prevent displaying it as an alert.\n\t * \tevt.stop();\n\t * }, { priority: 'low' } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tpublic showWarning(\n\t\tmessage: string,\n\t\tdata: { namespace?: string; title?: string } = {}\n\t): void {\n\t\tthis._showNotification( {\n\t\t\tmessage,\n\t\t\ttype: 'warning',\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t} );\n\t}\n\n\t/**\n\t * Fires the `show` event with the specified type, namespace and message.\n\t *\n\t * @param data The message data.\n\t * @param data.message The content of the notification.\n\t * @param data.type The type of the message.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */\n\tprivate _showNotification( data: {\n\t\tmessage: string;\n\t\ttype: NotificationEventType;\n\t\tnamespace?: string;\n\t\ttitle?: string;\n\t} ): void {\n\t\tconst event = data.namespace ?\n\t\t\t`show:${ data.type }:${ data.namespace }` as const :\n\t\t\t`show:${ data.type }` as const;\n\n\t\tthis.fire<NotificationShowTypeEvent<typeof data.type>>( event, {\n\t\t\tmessage: data.message,\n\t\t\ttype: data.type,\n\t\t\ttitle: data.title || ''\n\t\t} );\n\t}\n}\n\nexport type NotificationEventType = 'success' | 'info' | 'warning';\n\n/**\n * Fired when one of the `showSuccess()`, `showInfo()`, `showWarning()` methods is called.\n *\n * @eventName ~Notification#show\n * @param data The notification data.\n */\nexport type NotificationShowEvent = {\n\tname: 'show';\n\targs: [ data: NotificationShowEventData ];\n};\n\n/**\n * Fired when the `showSuccess()` method is called.\n *\n * @eventName ~Notification#show:success\n * @param data The notification data.\n */\nexport type NotificationShowSuccessEvent = NotificationShowTypeEvent<'success'>;\n\n/**\n * Fired when the `showInfo()` method is called.\n *\n * @eventName ~Notification#show:info\n * @param data The notification data.\n */\nexport type NotificationShowInfoEvent = NotificationShowTypeEvent<'info'>;\n\n/**\n * Fired when the `showWarning()` method is called.\n *\n * When this event is not handled or stopped by `event.stop()`, the `data.message` of this event will\n * be automatically displayed as a system alert.\n *\n * @eventName ~Notification#show:warning\n * @param data The notification data.\n */\nexport type NotificationShowWarningEvent = NotificationShowTypeEvent<'warning'>;\n\nexport type NotificationShowTypeEvent<NotificationType extends NotificationEventType> = {\n\tname: `show:${ NotificationType }` | `show:${ NotificationType }:${ string }`;\n\targs: [ data: NotificationShowEventData<NotificationType> ];\n};\n\nexport type NotificationShowEventData<NotificationType extends NotificationEventType = NotificationEventType> = {\n\n\t/**\n\t * The content of the notification.\n\t */\n\tmessage: string;\n\n\t/**\n\t * The title of the notification.\n\t */\n\ttitle: string;\n\n\t/**\n\t * The type of the notification.\n\t */\n\ttype: NotificationType;\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/**\n * @module ui/model\n */\n\nimport { ObservableMixin, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\nimport { extend } from 'es-toolkit/compat';\n\nconst UIModelBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * The base MVC model class.\n */\nexport class UIModel extends UIModelBase {\n\t[ x: string ]: unknown;\n\n\t/**\n\t * Creates a new Model instance.\n\t *\n\t * @param attributes The model state attributes to be defined during the instance creation.\n\t * @param properties The (out of state) properties to be appended to the instance during creation.\n\t */\n\tconstructor( attributes?: Record<string, unknown>, properties?: Record<string, unknown> ) {\n\t\tsuper();\n\n\t\t// Extend this instance with the additional (out of state) properties.\n\t\tif ( properties ) {\n\t\t\textend( this, properties );\n\t\t}\n\n\t\t// Initialize the attributes.\n\t\tif ( attributes ) {\n\t\t\tthis.set( attributes );\n\t\t}\n\t}\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/**\n * @module ui/panel/balloon/contextualballoon\n */\n\nimport { BalloonPanelView } from './balloonpanelview.js';\nimport { View } from '../../view.js';\nimport { ButtonView } from '../../button/buttonview.js';\nimport type { ButtonExecuteEvent } from '../../button/button.js';\nimport { type ViewCollection } from '../../viewcollection.js';\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport {\n\tCKEditorError,\n\tFocusTracker,\n\tRect,\n\ttoUnit,\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\ttype DomOptimalPositionOptions,\n\ttype DecoratedMethodEvent\n} from '@ckeditor/ckeditor5-utils';\nimport { IconNextArrow, IconPreviousArrow } from '@ckeditor/ckeditor5-icons';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\n/**\n * Provides the common contextual balloon for the editor.\n *\n * The role of this plugin is to unify the contextual balloons logic, simplify views management and help\n * avoid the unnecessary complexity of handling multiple {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n * instances in the editor.\n *\n * This plugin allows for creating single or multiple panel stacks.\n *\n * Each stack may have multiple views, with the one on the top being visible. When the visible view is removed from the stack,\n * the previous view becomes visible.\n *\n * It might be useful to implement nested navigation in a balloon. For instance, a toolbar view may contain a link button.\n * When you click it, a link view (which lets you set the URL) is created and put on top of the toolbar view, so the link panel\n * is displayed. When you finish editing the link and close (remove) the link view, the toolbar view is visible again.\n *\n * However, there are cases when there are multiple independent balloons to be displayed, for instance, if the selection\n * is inside two inline comments at the same time. For such cases, you can create two independent panel stacks.\n * The contextual balloon plugin will create a navigation bar to let the users switch between these panel stacks using the \"Next\"\n * and \"Previous\" buttons.\n *\n * If there are no views in the current stack, the balloon panel will try to switch to the next stack. If there are no\n * panels in any stack, the balloon panel will be hidden.\n *\n * **Note**: To force the balloon panel to show only one view, even if there are other stacks, use the `singleViewMode=true` option\n * when {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon#add adding} a view to a panel.\n *\n * From the implementation point of view, the contextual ballon plugin is reusing a single\n * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} instance to display multiple contextual balloon\n * panels in the editor. It also creates a special {@link module:ui/panel/balloon/contextualballoon~RotatorView rotator view},\n * used to manage multiple panel stacks. Rotator view is a child of the balloon panel view and the parent of the specific\n * view you want to display. If there is more than one panel stack to be displayed, the rotator view will add a\n * navigation bar. If there is only one stack, the rotator view is transparent (it does not add any UI elements).\n */\nexport class ContextualBalloon extends Plugin {\n\t/**\n\t * The {@link module:utils/dom/position~DomOptimalPositionOptions#limiter position limiter}\n\t * for the {@link #view balloon}, used when no `limiter` has been passed into {@link #add}\n\t * or {@link #updatePosition}.\n\t *\n\t * By default, a function that obtains the farthest DOM\n\t * {@link module:engine/view/rooteditableelement~ViewRootEditableElement}\n\t * of the {@link module:engine/view/document~ViewDocument#selection}.\n\t */\n\tpublic positionLimiter: DomOptimalPositionOptions[ 'limiter' ];\n\n\tpublic visibleStack?: string;\n\n\t/**\n\t * The currently visible view or `null` when there are no views in any stack.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public visibleView: View | null;\n\n\t/**\n\t * A total number of all stacks in the balloon.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _numberOfStacks: number;\n\n\t/**\n\t * A flag that controls the single view mode.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _singleViewMode: boolean;\n\n\t/**\n\t * The map of views and their stacks.\n\t */\n\tprivate _viewToStack = new Map<View, Stack>();\n\n\t/**\n\t * The map of IDs and stacks.\n\t */\n\tprivate _idToStack = new Map<string, Stack>();\n\n\t/**\n\t * The common balloon panel view.\n\t */\n\tprivate _view: BalloonPanelView | null = null;\n\n\t/**\n\t * Rotator view embedded in the contextual balloon.\n\t * Displays the currently visible view in the balloon and provides navigation for switching stacks.\n\t */\n\tprivate _rotatorView: RotatorView | null = null;\n\n\t/**\n\t * Displays fake panels under the balloon panel view when multiple stacks are added to the balloon.\n\t */\n\tprivate _fakePanelsView: FakePanelsView | null = null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ContextualBalloon' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.positionLimiter = () => {\n\t\t\tconst view = this.editor.editing.view;\n\t\t\tconst viewDocument = view.document;\n\t\t\tconst editableElement = viewDocument.selection.editableElement;\n\n\t\t\tif ( editableElement ) {\n\t\t\t\treturn view.domConverter.mapViewToDom( editableElement.root ) as HTMLElement;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\n\t\tthis.decorate( 'getPositionOptions' );\n\n\t\tthis.set( 'visibleView', null );\n\t\tthis.set( '_numberOfStacks', 0 );\n\t\tthis.set( '_singleViewMode', false );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tif ( this._view ) {\n\t\t\tthis._view.destroy();\n\t\t}\n\n\t\tif ( this._rotatorView ) {\n\t\t\tthis._rotatorView.destroy();\n\t\t}\n\n\t\tif ( this._fakePanelsView ) {\n\t\t\tthis._fakePanelsView.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * The common balloon panel view.\n\t */\n\tpublic get view(): BalloonPanelView {\n\t\tif ( !this._view ) {\n\t\t\tthis._createPanelView();\n\t\t}\n\n\t\treturn this._view!;\n\t}\n\n\t/**\n\t * Returns `true` when the given view is in one of the stacks. Otherwise returns `false`.\n\t */\n\tpublic hasView( view: View ): boolean {\n\t\treturn Array.from( this._viewToStack.keys() ).includes( view );\n\t}\n\n\t/**\n\t * Adds a new view to the stack and makes it visible if the current stack is visible\n\t * or it is the first view in the balloon.\n\t *\n\t * @param data The configuration of the view.\n\t * @param data.stackId The ID of the stack that the view is added to. Defaults to `'main'`.\n\t * @param data.view The content of the balloon.\n\t * @param data.position Positioning options.\n\t * @param data.balloonClassName An additional CSS class added to the {@link #view balloon} when visible.\n\t * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow. Defaults to `true`.\n\t * @param data.singleViewMode Whether the view should be the only visible view even if other stacks were added. Defaults to `false`.\n\t */\n\tpublic add( data: ViewConfiguration ): void {\n\t\tif ( !this._view ) {\n\t\t\tthis._createPanelView();\n\t\t}\n\n\t\tif ( this.hasView( data.view ) ) {\n\t\t\t/**\n\t\t\t * Trying to add configuration of the same view more than once.\n\t\t\t *\n\t\t\t * @error contextualballoon-add-view-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'contextualballoon-add-view-exist',\n\t\t\t\t[ this, data ]\n\t\t\t);\n\t\t}\n\n\t\tconst stackId = data.stackId || 'main';\n\n\t\t// If new stack is added, creates it and show view from this stack.\n\t\tif ( !this._idToStack.has( stackId ) ) {\n\t\t\tthis._idToStack.set( stackId, new Map( [ [ data.view, data ] ] ) );\n\t\t\tthis._viewToStack.set( data.view, this._idToStack.get( stackId )! );\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\n\t\t\tif ( !this._visibleStack || data.singleViewMode ) {\n\t\t\t\tthis.showStack( stackId );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst stack = this._idToStack.get( stackId )!;\n\n\t\tif ( data.singleViewMode ) {\n\t\t\tthis.showStack( stackId );\n\t\t}\n\n\t\t// Add new view to the stack.\n\t\tstack.set( data.view, data );\n\t\tthis._viewToStack.set( data.view, stack );\n\n\t\t// And display it if is added to the currently visible stack.\n\t\tif ( stack === this._visibleStack ) {\n\t\t\tthis._showView( data );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given view from the stack. If the removed view was visible,\n\t * the view preceding it in the stack will become visible instead.\n\t * When there is no view in the stack, the next stack will be displayed.\n\t * When there are no more stacks, the balloon will hide.\n\t *\n\t * @param view A view to be removed from the balloon.\n\t */\n\tpublic remove( view: View ): void {\n\t\tif ( !this.hasView( view ) ) {\n\t\t\t/**\n\t\t\t * Trying to remove the configuration of the view not defined in the stack.\n\t\t\t *\n\t\t\t * @error contextualballoon-remove-view-not-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'contextualballoon-remove-view-not-exist',\n\t\t\t\t[ this, view ]\n\t\t\t);\n\t\t}\n\n\t\tconst stack = this._viewToStack.get( view )!;\n\n\t\tif ( this._singleViewMode && this.visibleView === view ) {\n\t\t\tthis._singleViewMode = false;\n\t\t}\n\n\t\t// When visible view will be removed we need to show a preceding view or next stack\n\t\t// if a view is the only view in the stack.\n\t\tif ( this.visibleView === view ) {\n\t\t\tif ( stack.size === 1 ) {\n\t\t\t\tif ( this._idToStack.size > 1 ) {\n\t\t\t\t\tthis._showNextStack();\n\t\t\t\t} else {\n\t\t\t\t\tthis.view.hide();\n\t\t\t\t\tthis.visibleView = null;\n\t\t\t\t\tthis._rotatorView!.hideView();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._showView( Array.from( stack.values() )[ stack.size - 2 ] );\n\t\t\t}\n\t\t}\n\n\t\tif ( stack.size === 1 ) {\n\t\t\tthis._idToStack.delete( this._getStackId( stack ) );\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\t\t} else {\n\t\t\tstack.delete( view );\n\t\t}\n\n\t\tthis._viewToStack.delete( view );\n\t}\n\n\t/**\n\t * Updates the position of the balloon using the position data of the first visible view in the stack.\n\t * When new position data is given, the position data of the currently visible view will be updated.\n\t *\n\t * @param position Position options.\n\t */\n\tpublic updatePosition( position?: Partial<DomOptimalPositionOptions> ): void {\n\t\tif ( position ) {\n\t\t\tthis._visibleStack.get( this.visibleView! )!.position = position;\n\t\t}\n\n\t\tthis.view.pin( this.getPositionOptions()! );\n\t\tthis._fakePanelsView!.updatePosition();\n\t}\n\n\t/**\n\t * Returns position options of the last view in the stack.\n\t * This keeps the balloon in the same position when the view is changed.\n\t */\n\tpublic getPositionOptions(): Partial<DomOptimalPositionOptions> | undefined {\n\t\tlet position = Array.from( this._visibleStack.values() ).pop()!.position;\n\n\t\tif ( position ) {\n\t\t\t// Use the default limiter if none has been specified.\n\t\t\tif ( !position.limiter ) {\n\t\t\t\t// Don't modify the original options object.\n\t\t\t\tposition = Object.assign( {}, position, {\n\t\t\t\t\tlimiter: this.positionLimiter\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Don't modify the original options object.\n\t\t\tposition = Object.assign( {}, position, {\n\t\t\t\tviewportOffsetConfig: {\n\t\t\t\t\t...this.editor.ui.viewportOffset,\n\t\t\t\t\ttop: this.editor.ui.viewportOffset.visualTop\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * Shows the last view from the stack of a given ID.\n\t */\n\tpublic showStack( id: string ): void {\n\t\tthis.visibleStack = id;\n\t\tconst stack = this._idToStack.get( id );\n\n\t\tif ( !stack ) {\n\t\t\t/**\n\t\t\t * Trying to show a stack that does not exist.\n\t\t\t *\n\t\t\t * @error contextualballoon-showstack-stack-not-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'contextualballoon-showstack-stack-not-exist',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tif ( this._visibleStack === stack ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showView( Array.from( stack.values() ).pop()! );\n\t}\n\n\t/**\n\t * Initializes view instances.\n\t */\n\tprivate _createPanelView(): void {\n\t\tthis._view = new BalloonPanelView( this.editor.locale );\n\n\t\tthis.editor.ui.view.body.add( this._view );\n\n\t\tthis._rotatorView = this._createRotatorView();\n\t\tthis._fakePanelsView = this._createFakePanelsView();\n\t}\n\n\t/**\n\t * Returns the stack of the currently visible view.\n\t */\n\tprivate get _visibleStack() {\n\t\treturn this._viewToStack.get( this.visibleView! )!;\n\t}\n\n\t/**\n\t * Returns the ID of the given stack.\n\t */\n\tprivate _getStackId( stack: Stack ) {\n\t\tconst entry = Array.from( this._idToStack.entries() ).find( entry => entry[ 1 ] === stack )!;\n\n\t\treturn entry[ 0 ];\n\t}\n\n\t/**\n\t * Shows the last view from the next stack.\n\t */\n\tprivate _showNextStack() {\n\t\tconst stacks = Array.from( this._idToStack.values() );\n\n\t\tlet nextIndex = stacks.indexOf( this._visibleStack ) + 1;\n\n\t\tif ( !stacks[ nextIndex ] ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\n\t\tthis.showStack( this._getStackId( stacks[ nextIndex ] ) );\n\t}\n\n\t/**\n\t * Shows the last view from the previous stack.\n\t */\n\tprivate _showPrevStack() {\n\t\tconst stacks = Array.from( this._idToStack.values() );\n\n\t\tlet nextIndex = stacks.indexOf( this._visibleStack ) - 1;\n\n\t\tif ( !stacks[ nextIndex ] ) {\n\t\t\tnextIndex = stacks.length - 1;\n\t\t}\n\n\t\tthis.showStack( this._getStackId( stacks[ nextIndex ] ) );\n\t}\n\n\t/**\n\t * Creates a rotator view.\n\t */\n\tprivate _createRotatorView() {\n\t\tconst view = new RotatorView( this.editor.locale );\n\t\tconst t = this.editor.locale.t;\n\n\t\tthis.view.content.add( view );\n\n\t\t// Hide navigation when there is only a one stack & not in single view mode.\n\t\tview.bind( 'isNavigationVisible' ).to( this, '_numberOfStacks', this, '_singleViewMode', ( value, isSingleViewMode ) => {\n\t\t\treturn !isSingleViewMode && value > 1;\n\t\t} );\n\n\t\t// Update balloon position after toggling navigation.\n\t\tview.on<ObservableChangeEvent>( 'change:isNavigationVisible', () => ( this.updatePosition() ), { priority: 'low' } );\n\n\t\t// Update stacks counter value.\n\t\tview.bind( 'counter' ).to( this, 'visibleView', this, '_numberOfStacks', ( visibleView, numberOfStacks ) => {\n\t\t\tif ( numberOfStacks < 2 ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst current = Array.from( this._idToStack.values() ).indexOf( this._visibleStack ) + 1;\n\n\t\t\treturn t( '%0 of %1', [ current, numberOfStacks ] );\n\t\t} );\n\n\t\tview.buttonNextView.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\t// When current view has a focus then move focus to the editable before removing it,\n\t\t\t// otherwise editor will lost focus.\n\t\t\tif ( view.focusTracker.isFocused ) {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t}\n\n\t\t\tthis._showNextStack();\n\t\t} );\n\n\t\tview.buttonPrevView.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\t// When current view has a focus then move focus to the editable before removing it,\n\t\t\t// otherwise editor will lost focus.\n\t\t\tif ( view.focusTracker.isFocused ) {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t}\n\n\t\t\tthis._showPrevStack();\n\t\t} );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Creates a fake panels view.\n\t */\n\tprivate _createFakePanelsView() {\n\t\tconst view = new FakePanelsView( this.editor.locale, this.view );\n\n\t\tview.bind( 'numberOfPanels' ).to( this, '_numberOfStacks', this, '_singleViewMode', ( number, isSingleViewMode ) => {\n\t\t\tconst showPanels = !isSingleViewMode && number >= 2;\n\n\t\t\treturn showPanels ? Math.min( number - 1, 2 ) : 0;\n\t\t} );\n\n\t\tview.listenTo<ObservableChangeEvent>( this.view, 'change:top', () => view.updatePosition() );\n\t\tview.listenTo<ObservableChangeEvent>( this.view, 'change:left', () => view.updatePosition() );\n\n\t\tthis.editor.ui.view.body.add( view );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Sets the view as the content of the balloon and attaches the balloon using position\n\t * options of the first view.\n\t *\n\t * @param data Configuration.\n\t * @param data.view The view to show in the balloon.\n\t * @param data.balloonClassName Additional class name which will be added to the {@link #view balloon}.\n\t * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow.\n\t */\n\tprivate _showView( { view, balloonClassName = '', withArrow = true, singleViewMode = false }: ViewConfiguration ) {\n\t\tthis.view.class = balloonClassName;\n\t\tthis.view.withArrow = withArrow;\n\n\t\tthis._rotatorView!.showView( view );\n\t\tthis.visibleView = view;\n\t\tthis.view.pin( this.getPositionOptions()! );\n\t\tthis._fakePanelsView!.updatePosition();\n\n\t\tif ( singleViewMode ) {\n\t\t\tthis._singleViewMode = true;\n\t\t}\n\t}\n}\n\n/**\n * An event fired when the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon} is about to get the position of the balloon.\n *\n * @eventName ~ContextualBalloon#getPositionOptions\n */\nexport type ContextualBalloonGetPositionOptionsEvent = DecoratedMethodEvent<ContextualBalloon, 'getPositionOptions'>;\n\n/**\n * The configuration of the view.\n */\nexport interface ViewConfiguration {\n\n\t/**\n\t * The ID of the stack that the view is added to.\n\t *\n\t * @default 'main'\n\t */\n\tstackId?: string;\n\n\t/**\n\t * The content of the balloon.\n\t */\n\tview: View;\n\n\t/**\n\t * Positioning options.\n\t */\n\tposition?: Partial<DomOptimalPositionOptions>;\n\n\t/**\n\t * An additional CSS class added to the {@link #view balloon} when visible.\n\t */\n\tballoonClassName?: string;\n\n\t/**\n\t * Whether the {@link #view balloon} should be rendered with an arrow.\n\t *\n\t * @default true\n\t */\n\twithArrow?: boolean;\n\n\t/**\n\t * Whether the view should be the only visible view even if other stacks were added.\n\t *\n\t * @default false\n\t */\n\tsingleViewMode?: boolean;\n}\n\ntype Stack = Map<View, ViewConfiguration>;\n\n/**\n * Rotator view is a helper class for the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon}.\n * It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.\n * See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.\n * @internal\n */\nexport class RotatorView extends View {\n\t/**\n\t * Used for checking if a view is focused or not.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Navigation button for switching the stack to the previous one.\n\t */\n\tpublic readonly buttonPrevView: ButtonView;\n\n\t/**\n\t * Navigation button for switching the stack to the next one.\n\t */\n\tpublic readonly buttonNextView: ButtonView;\n\n\t/**\n\t * A collection of the child views that creates the rotator content.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * Defines whether navigation is visible or not.\n\t *\n\t * @observable\n\t */\n\tdeclare public isNavigationVisible: boolean;\n\n\t/**\n\t * @observable\n\t */\n\tdeclare public counter: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isNavigationVisible', true );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.buttonPrevView = this._createButtonView( t( 'Previous' ), IconPreviousArrow );\n\t\tthis.buttonNextView = this._createButtonView( t( 'Next' ), IconNextArrow );\n\t\tthis.content = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-balloon-rotator'\n\t\t\t\t],\n\t\t\t\t'z-index': '-1'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck-balloon-rotator__navigation',\n\t\t\t\t\t\t\tbind.to( 'isNavigationVisible', value => value ? '' : 'ck-hidden' )\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tthis.buttonPrevView,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttag: 'span',\n\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t\t\t'ck-balloon-rotator__counter'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttext: bind.to( 'counter' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t},\n\t\t\t\t\t\tthis.buttonNextView\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-balloon-rotator__content'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.content\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.focusTracker.add( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t}\n\n\t/**\n\t * Shows a given view.\n\t *\n\t * @param view The view to show.\n\t */\n\tpublic showView( view: View ): void {\n\t\tthis.hideView();\n\t\tthis.content.add( view );\n\t}\n\n\t/**\n\t * Hides the currently displayed view.\n\t */\n\tpublic hideView(): void {\n\t\tthis.content.clear();\n\t}\n\n\t/**\n\t * Creates a navigation button view.\n\t *\n\t * @param label The button label.\n\t * @param icon The button icon.\n\t */\n\tprivate _createButtonView( label: string, icon: string ) {\n\t\tconst view = new ButtonView( this.locale );\n\n\t\tview.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\t// Keep the focus in the editor when switching stacks. Otherwise blurring the editor could hide\n\t\t// focus-sensitive views in the balloon (e.g. the balloon toolbar) and collapse the balloon.\n\t\tview.extendTemplate( {\n\t\t\ton: {\n\t\t\t\tmousedown: view.bindTemplate.to( evt => evt.preventDefault() )\n\t\t\t}\n\t\t} );\n\n\t\treturn view;\n\t}\n}\n\n/**\n * Displays additional layers under the balloon when multiple stacks are added to the balloon.\n */\nclass FakePanelsView extends View {\n\t/**\n\t * Collection of the child views which creates fake panel content.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * Fake panels top offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public top: number;\n\n\t/**\n\t * Fake panels left offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public left: number;\n\n\t/**\n\t * Fake panels height.\n\t *\n\t * @observable\n\t */\n\tdeclare public height: number;\n\n\t/**\n\t * Fake panels width.\n\t *\n\t * @observable\n\t */\n\tdeclare public width: number;\n\n\t/**\n\t * Number of rendered fake panels.\n\t *\n\t * @observable\n\t */\n\tdeclare public numberOfPanels: number;\n\n\t/**\n\t * Context.\n\t */\n\tprivate readonly _balloonPanelView: BalloonPanelView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, balloonPanelView: BalloonPanelView ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'top', 0 );\n\t\tthis.set( 'left', 0 );\n\t\tthis.set( 'height', 0 );\n\t\tthis.set( 'width', 0 );\n\t\tthis.set( 'numberOfPanels', 0 );\n\n\t\tthis.content = this.createCollection();\n\t\tthis._balloonPanelView = balloonPanelView;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-fake-panel',\n\t\t\t\t\tbind.to( 'numberOfPanels', number => number ? '' : 'ck-hidden' )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to( 'top', toPx ),\n\t\t\t\t\tleft: bind.to( 'left', toPx ),\n\t\t\t\t\twidth: bind.to( 'width', toPx ),\n\t\t\t\t\theight: bind.to( 'height', toPx )\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t} );\n\n\t\tthis.on<ObservableChangeEvent<number>>( 'change:numberOfPanels', ( evt, name, next, prev ) => {\n\t\t\tif ( next > prev ) {\n\t\t\t\tthis._addPanels( next - prev );\n\t\t\t} else {\n\t\t\t\tthis._removePanels( prev - next );\n\t\t\t}\n\n\t\t\tthis.updatePosition();\n\t\t} );\n\t}\n\n\tprivate _addPanels( number: number ) {\n\t\twhile ( number-- ) {\n\t\t\tconst view = new View();\n\n\t\t\tview.setTemplate( { tag: 'div' } );\n\n\t\t\tthis.content.add( view );\n\t\t\tthis.registerChild( view );\n\t\t}\n\t}\n\n\tprivate _removePanels( number: number ) {\n\t\twhile ( number-- ) {\n\t\t\tconst view = this.content.last!;\n\n\t\t\tthis.content.remove( view );\n\t\t\tthis.deregisterChild( view );\n\t\t\tview.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Updates coordinates of fake panels.\n\t */\n\tpublic updatePosition() {\n\t\tif ( this.numberOfPanels ) {\n\t\t\tconst { top, left } = this._balloonPanelView;\n\t\t\tconst { width, height } = new Rect( this._balloonPanelView.element! );\n\n\t\t\tObject.assign( this, { top, left, width, height } );\n\t\t}\n\t}\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/**\n * @module ui/panel/sticky/stickypanelview\n */\n\nimport { View } from '../../view.js';\nimport { Template } from '../../template.js';\n\nimport { type ViewCollection } from '../../viewcollection.js';\n\nimport {\n\ttype Locale,\n\ttype ObservableChangeEvent,\n\tRect,\n\ttoUnit,\n\tgetVisualViewportOffset,\n\tglobal\n} from '@ckeditor/ckeditor5-utils';\n\n// @if CK_DEBUG_STICKYPANEL // import {\n// @if CK_DEBUG_STICKYPANEL // \tRectDrawer,\n// @if CK_DEBUG_STICKYPANEL // \tdiagonalStylesBlack\n// @if CK_DEBUG_STICKYPANEL // } from '@ckeditor/ckeditor5-utils/tests/_utils/rectdrawer.js';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\n/**\n * The sticky panel view class.\n */\nexport class StickyPanelView extends View {\n\t/**\n\t * Collection of the child views which creates balloon panel contents.\n\t */\n\tpublic readonly content: ViewCollection;\n\n\t/**\n\t * Controls whether the sticky panel should be active.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isActive: boolean;\n\n\t/**\n\t * Controls whether the sticky panel is in the \"sticky\" state.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isSticky: boolean;\n\n\t/**\n\t * The limiter element for the sticky panel instance. Its bounding rect limits\n\t * the \"stickyness\" of the panel, i.e. when the panel reaches the bottom\n\t * edge of the limiter, it becomes sticky to that edge and does not float\n\t * off the limiter. It is mandatory for the panel to work properly and once\n\t * set, it cannot be changed.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public limiterElement: HTMLElement | null;\n\n\t/**\n\t * The offset from the bottom edge of {@link #limiterElement}\n\t * which stops the panel from stickying any further to prevent limiter's content\n\t * from being completely covered.\n\t *\n\t * @readonly\n\t * @observable\n\t * @default 50\n\t */\n\tdeclare public limiterBottomOffset: number;\n\n\t/**\n\t * The offset from the top edge of the web browser's viewport which makes the\n\t * panel become sticky. The default value is `0`, which means the panel becomes\n\t * sticky when it's upper edge touches the top of the page viewport.\n\t *\n\t * This attribute is useful when the web page has UI elements positioned to the top\n\t * either using `position: fixed` or `position: sticky`, which would cover the\n\t * sticky panel or vice–versa (depending on the `z-index` hierarchy).\n\t *\n\t * Bound to {@link module:ui/editorui/editorui~EditorUI#viewportOffset `EditorUI#viewportOffset`}.\n\t *\n\t * If {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset.top`} is defined, then\n\t * it will override the default value.\n\t *\n\t * @observable\n\t * @default 0\n\t */\n\tdeclare public viewportTopOffset: number;\n\n\t/**\n\t * The panel which accepts children into {@link #content} collection.\n\t * Also an element which is positioned when {@link #isSticky}.\n\t */\n\tpublic contentPanelElement: HTMLElement;\n\n\t/**\n\t * Controls the `margin-left` CSS style of the panel.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _marginLeft: string | null;\n\n\t/**\n\t * Set `true` if the sticky panel reached the bottom edge of the\n\t * {@link #limiterElement}.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _isStickyToTheBottomOfLimiter: boolean;\n\n\t/**\n\t * The `top` CSS position of the panel when it is sticky to the top of the viewport or scrollable\n\t * ancestors of the {@link #limiterElement}.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _stickyTopOffset: number | null;\n\n\t/**\n\t * The `bottom` CSS position of the panel when it is sticky to the bottom of the {@link #limiterElement}.\n\t *\n\t * @private\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public _stickyBottomOffset: number | null;\n\n\t/**\n\t * A dummy element which visually fills the space as long as the\n\t * actual panel is sticky. It prevents flickering of the UI.\n\t */\n\tprivate _contentPanelPlaceholder: HTMLElement;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isActive', false );\n\t\tthis.set( 'isSticky', false );\n\t\tthis.set( 'limiterElement', null );\n\t\tthis.set( 'limiterBottomOffset', 50 );\n\t\tthis.set( 'viewportTopOffset', 0 );\n\n\t\tthis.set( '_marginLeft', null );\n\t\tthis.set( '_isStickyToTheBottomOfLimiter', false );\n\n\t\tthis.set( '_stickyTopOffset', null );\n\t\tthis.set( '_stickyBottomOffset', null );\n\n\t\tthis.content = this.createCollection();\n\n\t\tthis._contentPanelPlaceholder = new Template( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-sticky-panel__placeholder'\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: bind.to( 'isSticky', isSticky => isSticky ? 'block' : 'none' ),\n\t\t\t\t\theight: bind.to( 'isSticky', isSticky => {\n\t\t\t\t\t\treturn isSticky ? toPx( this._contentPanelRect.height ) : null;\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t}\n\t\t} ).render() as HTMLElement;\n\n\t\tthis.contentPanelElement = new Template( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-sticky-panel__content',\n\t\t\t\t\t// Toggle class of the panel when \"sticky\" state changes in the view.\n\t\t\t\t\tbind.if( 'isSticky', 'ck-sticky-panel__content_sticky' ),\n\t\t\t\t\tbind.if( '_isStickyToTheBottomOfLimiter', 'ck-sticky-panel__content_sticky_bottom-limit' )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: bind.to( 'isSticky', isSticky => {\n\t\t\t\t\t\treturn isSticky ? toPx( this._contentPanelPlaceholder.getBoundingClientRect().width ) : null;\n\t\t\t\t\t} ),\n\n\t\t\t\t\ttop: bind.to( '_stickyTopOffset', value => value ? toPx( value ) : value ),\n\t\t\t\t\tbottom: bind.to( '_stickyBottomOffset', value => value ? toPx( value ) : value ),\n\n\t\t\t\t\tmarginLeft: bind.to( '_marginLeft' )\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tchildren: this.content\n\t\t} ).render() as HTMLElement;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-sticky-panel'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tthis._contentPanelPlaceholder,\n\t\t\t\tthis.contentPanelElement\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Check if the panel should go into the sticky state immediately.\n\t\tthis.checkIfShouldBeSticky();\n\n\t\t// Update sticky state of the panel as the window and ancestors are being scrolled.\n\t\tthis.listenTo( global.document, 'scroll', () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t}, { useCapture: true } );\n\n\t\t// Synchronize with `model.isActive` because sticking an inactive panel is pointless.\n\t\tthis.listenTo<ObservableChangeEvent>( this, 'change:isActive', () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t} );\n\n\t\tif ( global.window.visualViewport ) {\n\t\t\tthis.listenTo( global.window.visualViewport, 'scroll', () => {\n\t\t\t\tthis.checkIfShouldBeSticky();\n\t\t\t} );\n\n\t\t\tthis.listenTo( global.window.visualViewport, 'resize', () => {\n\t\t\t\tthis.checkIfShouldBeSticky();\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Analyzes the environment to decide whether the panel should be sticky or not.\n\t * Then handles the positioning of the panel.\n\t */\n\tpublic checkIfShouldBeSticky(): void {\n\t\t// @if CK_DEBUG_STICKYPANEL // RectDrawer.clear();\n\n\t\tif ( !this.limiterElement || !this.isActive ) {\n\t\t\tthis._unstick();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst limiterRect = new Rect( this.limiterElement );\n\t\tlet visibleLimiterRect = limiterRect.getVisible();\n\n\t\tif ( visibleLimiterRect ) {\n\t\t\tconst windowRect = new Rect( global.window );\n\n\t\t\twindowRect.top += this.viewportTopOffset;\n\t\t\twindowRect.height -= this.viewportTopOffset;\n\n\t\t\tvisibleLimiterRect = visibleLimiterRect.getIntersection( windowRect );\n\t\t}\n\n\t\tconst {\n\t\t\tleft: visualViewportOffsetLeft,\n\t\t\ttop: visualViewportOffsetTop\n\t\t} = getVisualViewportOffset();\n\n\t\tlimiterRect.moveBy( visualViewportOffsetLeft, visualViewportOffsetTop );\n\n\t\tif ( visibleLimiterRect ) {\n\t\t\tvisibleLimiterRect.moveBy( visualViewportOffsetLeft, visualViewportOffsetTop );\n\t\t}\n\n\t\t// Stick the panel only if\n\t\t// * the limiter's ancestors are intersecting with each other so that some of their rects are visible,\n\t\t// * and the limiter's top edge is above the visible ancestors' top edge.\n\t\tif ( visibleLimiterRect && limiterRect.top < visibleLimiterRect.top ) {\n\t\t\t// Check if there's a change the panel can be sticky to the bottom of the limiter.\n\t\t\tif ( this._contentPanelRect.height + this.limiterBottomOffset > visibleLimiterRect.height ) {\n\t\t\t\tconst stickyBottomOffset = Math.max( limiterRect.bottom - visibleLimiterRect.bottom, 0 ) + this.limiterBottomOffset;\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // const stickyBottomOffsetRect = new Rect( {\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \ttop: limiterRect.bottom - stickyBottomOffset, left: 0, right: 2000,\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \tbottom: limiterRect.bottom - stickyBottomOffset, width: 2000, height: 1\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // } );\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // RectDrawer.draw( stickyBottomOffsetRect,\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \t{ outlineWidth: '1px', opacity: '.8', outlineColor: 'black' },\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \t'Sticky bottom offset',\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // \t{ visualViewportOrigin: true }\n\t\t\t\t// @if CK_DEBUG_STICKYPANEL // );\n\n\t\t\t\t// Check if sticking the panel to the bottom of the limiter does not cause it to suddenly\n\t\t\t\t// move upwards if there's not enough space for it.\n\t\t\t\t// To avoid toolbar flickering we are adding 1 for potential style change (sticky has all borders set,\n\t\t\t\t// non-sticky lacks bottom border).\n\t\t\t\tif ( this._contentPanelRect.height + stickyBottomOffset + 1 < limiterRect.height ) {\n\t\t\t\t\tthis._stickToBottomOfLimiter( stickyBottomOffset );\n\t\t\t\t} else {\n\t\t\t\t\tthis._unstick();\n\t\t\t\t}\n\t\t\t} else if ( this._contentPanelRect.height + this.limiterBottomOffset < limiterRect.height ) {\n\t\t\t\tthis._stickToTopOfAncestors( visibleLimiterRect.top );\n\t\t\t} else {\n\t\t\t\tthis._unstick();\n\t\t\t}\n\t\t} else {\n\t\t\tthis._unstick();\n\t\t}\n\n\t\t// @if CK_DEBUG_STICKYPANEL // console.clear();\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( 'isSticky', this.isSticky );\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( '_isStickyToTheBottomOfLimiter', this._isStickyToTheBottomOfLimiter );\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( '_stickyTopOffset', this._stickyTopOffset );\n\t\t// @if CK_DEBUG_STICKYPANEL // console.log( '_stickyBottomOffset', this._stickyBottomOffset );\n\t\t// @if CK_DEBUG_STICKYPANEL // if ( visibleLimiterRect ) {\n\t\t// @if CK_DEBUG_STICKYPANEL // \tRectDrawer.draw( visibleLimiterRect,\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t{ ...diagonalStylesBlack,\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t\toutlineWidth: '3px', opacity: '.8', outlineColor: 'orange', outlineOffset: '-3px',\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t\tbackgroundColor: 'rgba(0, 0, 255, .2)', zIndex: 2000 },\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t'visibleLimiterRect',\n\t\t// @if CK_DEBUG_STICKYPANEL // \t\t{ visualViewportOrigin: true }\n\t\t// @if CK_DEBUG_STICKYPANEL // \t);\n\t\t// @if CK_DEBUG_STICKYPANEL // }\n\t}\n\n\t/**\n\t * Sticks the panel at the given CSS `top` offset.\n\t *\n\t * @private\n\t * @param topOffset\n\t */\n\tprivate _stickToTopOfAncestors( topOffset: number ) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = topOffset;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = toPx( -global.window.scrollX + getVisualViewportOffset().left );\n\t}\n\n\t/**\n\t * Sticks the panel at the bottom of the limiter with a given CSS `bottom` offset.\n\t *\n\t * @private\n\t * @param stickyBottomOffset\n\t */\n\tprivate _stickToBottomOfLimiter( stickyBottomOffset: number ) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = true;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = stickyBottomOffset;\n\t\tthis._marginLeft = toPx( -global.window.scrollX + getVisualViewportOffset().left );\n\t}\n\n\t/**\n\t * Unsticks the panel putting it back to its original position.\n\t *\n\t * @private\n\t */\n\tprivate _unstick() {\n\t\tthis.isSticky = false;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = null;\n\t}\n\n\t/**\n\t * Returns the bounding rect of the {@link #contentPanelElement}.\n\t *\n\t * @private\n\t */\n\tprivate get _contentPanelRect(): Rect {\n\t\treturn new Rect( this.contentPanelElement );\n\t}\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/**\n * @module ui/search/text/searchtextqueryview\n */\nimport { IconCancel, IconLoupe } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView } from '../../button/buttonview.js';\nimport { IconView } from '../../icon/iconview.js';\nimport { LabeledFieldView, type LabeledFieldViewCreator } from '../../labeledfield/labeledfieldview.js';\nimport { createLabeledInputText } from '../../labeledfield/utils.js';\nimport { type InputBase } from '../../input/inputbase.js';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * A search input field for the {@link module:ui/search/text/searchtextview~SearchTextView} component.\n *\n * @internal\n * @extends module:ui/labeledfield/labeledfieldview~LabeledFieldView\n */\nexport class SearchTextQueryView<\n\tTQueryFieldView extends InputBase<HTMLInputElement | HTMLTextAreaElement>\n> extends LabeledFieldView<TQueryFieldView> {\n\t/**\n\t * The loupe icon displayed next to the {@link #fieldView}.\n\t */\n\tpublic iconView?: IconView;\n\n\t/**\n\t * The button that clears and focuses the {@link #fieldView}.\n\t */\n\tpublic resetButtonView?: ButtonView;\n\n\t/**\n\t * A reference to the view configuration.\n\t */\n\tprivate readonly _viewConfig: SearchTextQueryViewConfig<TQueryFieldView>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, config: SearchTextQueryViewConfig<TQueryFieldView> ) {\n\t\tconst t = locale.t;\n\t\tconst viewConfig = Object.assign( {}, {\n\t\t\tshowResetButton: true,\n\t\t\tshowIcon: true,\n\t\t\tcreator: createLabeledInputText\n\t\t}, config );\n\n\t\tsuper( locale, viewConfig.creator as any );\n\n\t\tthis.label = config.label;\n\t\tthis._viewConfig = viewConfig;\n\n\t\tif ( this._viewConfig.showIcon ) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = IconLoupe;\n\t\t\tthis.fieldWrapperChildren.add( this.iconView, 0 );\n\n\t\t\tthis.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-search__query_with-icon'\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tif ( this._viewConfig.showResetButton ) {\n\t\t\tthis.resetButtonView = new ButtonView( locale );\n\t\t\tthis.resetButtonView.set( {\n\t\t\t\tlabel: t( 'Clear' ),\n\t\t\t\ticon: IconCancel,\n\t\t\t\tclass: 'ck-search__reset',\n\t\t\t\tisVisible: false,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tthis.resetButtonView.on( 'execute', () => {\n\t\t\t\tthis.reset();\n\t\t\t\tthis.focus();\n\t\t\t\tthis.fire<SearchTextQueryViewResetEvent>( 'reset' );\n\t\t\t} );\n\n\t\t\tthis.resetButtonView.bind( 'isVisible' ).to( this.fieldView, 'isEmpty', isEmpty => !isEmpty );\n\n\t\t\tthis.fieldWrapperChildren.add( this.resetButtonView );\n\n\t\t\tthis.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-search__query_with-reset'\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Resets the search field to its default state.\n\t */\n\tpublic reset(): void {\n\t\tthis.fieldView.reset();\n\n\t\tif ( this._viewConfig.showResetButton ) {\n\t\t\tthis.resetButtonView!.isVisible = false;\n\t\t}\n\t}\n}\n\n/**\n * An event fired when the field is reset using the\n * {@link module:ui/search/text/searchtextqueryview~SearchTextQueryView#resetButtonView}.\n *\n * @eventName ~SearchTextQueryView#reset\n */\nexport type SearchTextQueryViewResetEvent = {\n\tname: 'reset';\n\targs: [];\n};\n\n/**\n * The configuration of the {@link module:ui/search/text/searchtextqueryview~SearchTextQueryView} view.\n */\nexport interface SearchTextQueryViewConfig<TConfigSearchField extends InputBase<HTMLInputElement | HTMLTextAreaElement>> {\n\n\t/**\n\t * The human-readable label of the search field.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Determines whether the button that resets the search should be visible.\n\t *\n\t * @default true\n\t */\n\tshowResetButton?: boolean;\n\n\t/**\n\t * Determines whether the loupe icon should be visible.\n\t *\n\t * @default true\n\t */\n\tshowIcon?: boolean;\n\n\t/**\n\t * The function that creates the search field input view. By default, a plain\n\t * {@link module:ui/inputtext/inputtextview~InputTextView} is used for this purpose.\n\t */\n\tcreator?: LabeledFieldViewCreator<TConfigSearchField>;\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/**\n * @module ui/search/searchinfoview\n*/\n\nimport type { FocusableView } from '../focuscycler.js';\nimport { View } from '../view.js';\n\n/**\n * A view displaying an information text related to different states of {@link module:ui/search/text/searchtextview~SearchTextView}.\n *\n * @internal\n */\nexport class SearchInfoView extends View implements FocusableView {\n\t/**\n\t * Controls whether the view is visible.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Controls the primary line of text in the info.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public primaryText: string;\n\n\t/**\n\t * Controls the secondary line of text in the info.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public secondaryText: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\tisVisible: false,\n\t\t\tprimaryText: '',\n\t\t\tsecondaryText: ''\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-search__info',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'span',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( 'primaryText' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'span',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( 'secondaryText' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the view\n\t */\n\tpublic focus(): void {\n\t\tthis.element!.focus();\n\t}\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/**\n * @module ui/search/searchresultsview\n */\n\nimport { View } from '../view.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { FocusTracker, type Locale } from '@ckeditor/ckeditor5-utils';\nimport { FocusCycler, type FocusableView } from '../focuscycler.js';\n\n/**\n * A sub-component of {@link module:ui/search/text/searchtextview~SearchTextView}. It hosts the filtered and the information views.\n */\nexport class SearchResultsView extends View implements FocusableView {\n\t/**\n\t * Tracks information about the DOM focus in the view.\n\t *\n\t * @readonly\n\t */\n\tpublic focusTracker: FocusTracker;\n\n\t/**\n\t * The collection of the child views inside of the list item {@link #element}.\n\t *\n\t * @readonly\n\t */\n\tpublic children: ViewCollection<FocusableView>;\n\n\t/**\n\t * Provides the focus management (keyboard navigation) in the view.\n\t *\n\t * @readonly\n\t */\n\tprotected _focusCycler: FocusCycler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.children = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-search__results'\n\t\t\t\t],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.children,\n\t\t\tfocusTracker: this.focusTracker\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tfor ( const child of this.children ) {\n\t\t\tthis.focusTracker.add( child.element! );\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the view.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the first child view.\n\t */\n\tpublic focusFirst(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Focuses the last child view.\n\t */\n\tpublic focusLast(): void {\n\t\tthis._focusCycler.focusLast();\n\t}\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/**\n * @module ui/search/text/searchtextview\n*/\n\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\nimport { View } from '../../view.js';\nimport { SearchTextQueryView, type SearchTextQueryViewConfig } from './searchtextqueryview.js';\nimport { SearchInfoView } from '../searchinfoview.js';\nimport { SearchResultsView } from '../searchresultsview.js';\nimport { FocusCycler, type FocusableView } from '../../focuscycler.js';\nimport { escapeRegExp } from 'es-toolkit/compat';\n\nimport { type FilteredView } from '../filteredview.js';\nimport { type ViewCollection } from '../../viewcollection.js';\nimport { type InputBase } from '../../input/inputbase.js';\nimport { type InputTextView } from '../../inputtext/inputtextview.js';\n\n/**\n * A search component that allows filtering of an arbitrary view based on a search query\n * specified by the user in a text field.\n *\n *```ts\n * // This view must specify the `filter()` and `focus()` methods.\n * const filteredView = ...;\n *\n * const searchView = new SearchTextView( locale, {\n * \tsearchFieldLabel: 'Search list items',\n * \tfilteredView\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n */\nexport class SearchTextView<\n\tTQueryFieldView extends InputBase<HTMLInputElement | HTMLTextAreaElement> = InputTextView\n> extends View {\n\t/**\n\t * Tracks information about the DOM focus in the view.\n\t *\n\t * @readonly\n\t */\n\tpublic focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the keystroke handler managing user interaction and accessibility.\n\t *\n\t * @readonly\n\t */\n\tpublic keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A view hosting the {@link #filteredView} passed in the configuration and the {@link #infoView}.\n\t */\n\tpublic resultsView: SearchResultsView;\n\n\t/**\n\t * The view that is filtered by the search query.\n\t */\n\tpublic filteredView: FilteredView;\n\n\t/**\n\t * The view that displays the information about the search results.\n\t */\n\tpublic infoView: FocusableView | undefined;\n\n\t/**\n\t * The view that allows the user to enter the search query.\n\t */\n\tpublic queryView: SearchTextQueryView<TQueryFieldView>;\n\n\t/**\n\t * Controls whether the component is in read-only mode.\n\t *\n\t * @default true\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * The number of results found for the current search query. Updated upon the {@link #search} event.\n\t *\n\t * @default 0\n\t * @observable\n\t */\n\tdeclare public resultsCount: number;\n\n\t/**\n\t * The number of the items that can be searched in the {@link #filteredView}. Updated upon the {@link #search} event.\n\t *\n\t * @default 0\n\t * @observable\n\t */\n\tdeclare public totalItemsCount: number;\n\n\t/**\n\t * The collection of children of the view.\n\t *\n\t * @readonly\n\t */\n\tdeclare public readonly children: ViewCollection;\n\n\t/**\n\t * The collection of focusable children of the view. Used by the focus management logic.\n\t *\n\t * @readonly\n\t */\n\tdeclare public readonly focusableChildren: ViewCollection<FocusableView>;\n\n\tpublic declare locale: Locale;\n\n\t/**\n\t * Provides the focus management (keyboard navigation) between {@link #queryView} and {@link #filteredView}.\n\t *\n\t * @readonly\n\t */\n\tpublic focusCycler: FocusCycler;\n\n\t/**\n\t * The cached configuration object.\n\t *\n\t * @internal\n\t */\n\tprotected _config: SearchTextViewConfig<TQueryFieldView>;\n\n\t/**\n\t * Creates an instance of the {@link module:ui/search/text/searchtextview~SearchTextView} class.\n\t *\n\t * @param locale The localization services instance.\n\t * @param config Configuration of the view.\n\t */\n\tconstructor( locale: Locale, config: SearchTextViewConfig<TQueryFieldView> ) {\n\t\tsuper( locale );\n\n\t\tthis._config = config;\n\n\t\tthis.filteredView = config.filteredView;\n\t\tthis.queryView = this._createSearchTextQueryView();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.resultsView = new SearchResultsView( locale );\n\t\tthis.children = this.createCollection();\n\t\tthis.focusableChildren = this.createCollection( [ this.queryView, this.resultsView ] );\n\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'resultsCount', 0 );\n\t\tthis.set( 'totalItemsCount', 0 );\n\n\t\tif ( config.infoView && config.infoView.instance ) {\n\t\t\tthis.infoView = config.infoView.instance;\n\t\t} else {\n\t\t\tthis.infoView = new SearchInfoView();\n\t\t\tthis._enableDefaultInfoViewBehavior();\n\n\t\t\tthis.on( 'render', () => {\n\t\t\t\t// Initial search that determines if there are any searchable items\n\t\t\t\t// and displays the corresponding info text.\n\t\t\t\tthis.search( '' );\n\t\t\t} );\n\t\t}\n\n\t\tthis.resultsView.children.addMany( [ this.infoView, this.filteredView ] );\n\n\t\tthis.focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.focusableChildren,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.on<SearchTextViewSearchEvent>( 'search', ( evt, { resultsCount, totalItemsCount } ) => {\n\t\t\tthis.resultsCount = resultsCount;\n\t\t\tthis.totalItemsCount = totalItemsCount;\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-search',\n\t\t\t\t\tconfig.class || null\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.addMany( [\n\t\t\tthis.queryView,\n\t\t\tthis.resultsView\n\t\t] );\n\n\t\tconst stopPropagation = ( data: Event ) => data.stopPropagation();\n\n\t\tfor ( const focusableChild of this.focusableChildren ) {\n\t\t\tthis.focusTracker.add( focusableChild.element as HTMLElement );\n\t\t}\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element as HTMLElement );\n\n\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t// keystroke handler would take over the key management in the URL input. We need to prevent\n\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t}\n\n\t/**\n\t * Focuses the {@link #queryView}.\n\t */\n\tpublic focus(): void {\n\t\tthis.queryView.focus();\n\t}\n\n\t/**\n\t * Resets the component to its initial state.\n\t */\n\tpublic reset(): void {\n\t\tthis.queryView.reset();\n\t\tthis.search( '' );\n\t\tthis.filteredView.element!.scrollTo( 0, 0 );\n\t}\n\n\t/**\n\t * Searches the {@link #filteredView} for the given query.\n\t *\n\t * @internal\n\t * @param query The search query string.\n\t */\n\tpublic search( query: string ): void {\n\t\tconst regExp = query ? new RegExp( escapeRegExp( query ), 'ig' ) : null;\n\t\tconst filteringResults = this.filteredView.filter( regExp );\n\n\t\tthis.fire<SearchTextViewSearchEvent>( 'search', { query, ...filteringResults } );\n\t}\n\n\t/**\n\t * Creates a search field view based on configured creator..\n\t */\n\tprivate _createSearchTextQueryView(): SearchTextQueryView<TQueryFieldView> {\n\t\tconst queryView = new SearchTextQueryView<TQueryFieldView>( this.locale, this._config.queryView );\n\n\t\tthis.listenTo( queryView.fieldView, 'input', () => {\n\t\t\tthis.search( queryView.fieldView.element!.value );\n\t\t} );\n\n\t\tqueryView.on( 'reset', () => this.reset() );\n\t\tqueryView.bind( 'isEnabled' ).to( this );\n\n\t\treturn queryView;\n\t}\n\n\t/**\n\t * Initializes the default {@link #infoView} behavior with default text labels when no custom info view\n\t * was specified in the view config.\n\t */\n\tprivate _enableDefaultInfoViewBehavior(): void {\n\t\tconst t = this.locale.t;\n\t\tconst infoView = this.infoView as SearchInfoView;\n\n\t\tthis.on<SearchTextViewSearchEvent>( 'search', ( evt, data ) => {\n\t\t\tif ( !data.resultsCount ) {\n\t\t\t\tconst defaultTextConfig = this._config.infoView && this._config.infoView.text;\n\t\t\t\tlet primaryText, secondaryText;\n\n\t\t\t\tif ( data.totalItemsCount ) {\n\t\t\t\t\tif ( defaultTextConfig?.notFound ) {\n\t\t\t\t\t\tprimaryText = defaultTextConfig.notFound.primary;\n\t\t\t\t\t\tsecondaryText = defaultTextConfig.notFound.secondary;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprimaryText = t( 'No results found' );\n\t\t\t\t\t\tsecondaryText = '';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( defaultTextConfig?.noSearchableItems ) {\n\t\t\t\t\t\tprimaryText = defaultTextConfig.noSearchableItems.primary;\n\t\t\t\t\t\tsecondaryText = defaultTextConfig.noSearchableItems.secondary;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprimaryText = t( 'No searchable items' );\n\t\t\t\t\t\tsecondaryText = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tinfoView.set( {\n\t\t\t\t\tprimaryText: normalizeInfoText( primaryText, data ),\n\t\t\t\t\tsecondaryText: normalizeInfoText( secondaryText!, data ),\n\t\t\t\t\tisVisible: true\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tinfoView.set( {\n\t\t\t\t\tisVisible: false\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tfunction normalizeInfoText(\n\t\t\ttext: SearchTextViewDefaultInfoText,\n\t\t\t{ query, resultsCount, totalItemsCount }: SearchTextViewSearchEvent[ 'args' ][ 0 ]\n\t\t) {\n\t\t\treturn typeof text === 'function' ? text( query, resultsCount, totalItemsCount ) : text;\n\t\t}\n\t}\n}\n\n/**\n * The configuration of the {@link module:ui/search/text/searchtextview~SearchTextView} class.\n */\nexport interface SearchTextViewConfig<TConfigSearchField extends InputBase<HTMLInputElement | HTMLTextAreaElement>> {\n\n\t/**\n\t * The configuration of the view's query field.\n\t */\n\tqueryView: SearchTextQueryViewConfig<TConfigSearchField>;\n\n\t/**\n\t * The view that is filtered by the search query.\n\t */\n\tfilteredView: FilteredView;\n\n\t/**\n\t * The view that displays the information about the search results.\n\t */\n\tinfoView?: {\n\n\t\t/**\n\t\t * The view that displays the information about the search results. If not specified,\n\t\t * {@link module:ui/search/searchinfoview~SearchInfoView} is used.\n\t\t */\n\t\tinstance?: FocusableView;\n\n\t\t/**\n\t\t * The configuration of text labels displayed in the {@link #infoView} in different states\n\t\t * of the search component.\n\t\t *\n\t\t * **Note**: This configuration is only used when the {@link #infoView} is **not** specified.\n\t\t * In other cases, please use the {@link module:ui/search/searchview~SearchTextViewSearchEvent} to bring about\n\t\t * your own info text logic.\n\t\t */\n\t\ttext?: {\n\t\t\tnotFound?: {\n\t\t\t\tprimary: SearchTextViewDefaultInfoText;\n\t\t\t\tsecondary?: SearchTextViewDefaultInfoText;\n\t\t\t};\n\t\t\tnoSearchableItems?: {\n\t\t\t\tprimary: SearchTextViewDefaultInfoText;\n\t\t\t\tsecondary?: SearchTextViewDefaultInfoText;\n\t\t\t};\n\t\t};\n\t};\n\n\t/**\n\t * The custom CSS class name to be added to the search view element.\n\t */\n\tclass?: string;\n}\n\n/**\n * Describes value of a info text configuration in {@link module:ui/search/text/searchtextview~SearchTextViewConfig}.\n * A string or a function that returns a string with the information about the search results.\n */\nexport type SearchTextViewDefaultInfoText = string | ( ( query: string, resultsCount: number, totalItemsCount: number ) => string );\n\n/**\n * An event fired when the search query changes fired by {@link module:ui/search/text/searchtextview~SearchTextView#search}.\n *\n * @eventName ~SearchTextView#search\n */\nexport type SearchTextViewSearchEvent = {\n\tname: 'search';\n\targs: [ SearchTextViewSearchEventData ];\n};\n\nexport type SearchTextViewSearchEventData = {\n\n\t/**\n\t * The search query string.\n\t */\n\tquery: string;\n\n\t/**\n\t * The number of results found for the current search query.\n\t */\n\tresultsCount: number;\n\n\t/**\n\t * The number of the items that can be searched.\n\t */\n\ttotalItemsCount: number;\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/**\n * @module ui/autocomplete/autocompleteview\n*/\n\nimport { getOptimalPosition, type PositioningFunction, type Locale, global, toUnit, Rect } from '@ckeditor/ckeditor5-utils';\nimport { SearchTextView, type SearchTextViewConfig } from '../search/text/searchtextview.js';\nimport { type SearchResultsView } from '../search/searchresultsview.js';\nimport { type InputBase } from '../input/inputbase.js';\nimport type { FilteredViewExecuteEvent } from '../search/filteredview.js';\n\n/**\n * The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class\n * with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur\n * the component.\n */\nexport class AutocompleteView<\n\tTQueryFieldView extends InputBase<HTMLInputElement | HTMLTextAreaElement>\n> extends SearchTextView<TQueryFieldView> {\n\t/**\n\t * The configuration of the autocomplete view.\n\t */\n\tprotected override _config: AutocompleteViewConfig<TQueryFieldView>;\n\n\tdeclare public resultsView: AutocompleteResultsView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, config: AutocompleteViewConfig<TQueryFieldView> ) {\n\t\tsuper( locale, config );\n\n\t\tthis._config = config;\n\n\t\tconst toPx = toUnit( 'px' );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-autocomplete' ]\n\t\t\t}\n\t\t} );\n\n\t\tconst bindResultsView = this.resultsView.bindTemplate;\n\n\t\tthis.resultsView.set( 'isVisible', false );\n\t\tthis.resultsView.set( '_position', 's' );\n\t\tthis.resultsView.set( '_width', 0 );\n\n\t\tthis.resultsView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\tbindResultsView.if( 'isVisible', 'ck-hidden', value => !value ),\n\t\t\t\t\tbindResultsView.to( '_position', value => `ck-search__results_${ value }` )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: bindResultsView.to( '_width', toPx )\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Update the visibility of the results view when the user focuses or blurs the component.\n\t\t// This is also integration for the `resetOnBlur` configuration.\n\t\tthis.focusTracker.on( 'change:isFocused', ( evt, name, isFocused ) => {\n\t\t\tthis._updateResultsVisibility();\n\n\t\t\tif ( isFocused ) {\n\t\t\t\t// Reset the scroll position of the results view whenever the autocomplete reopens.\n\t\t\t\tthis.resultsView.element!.scrollTop = 0;\n\t\t\t} else if ( config.resetOnBlur ) {\n\t\t\t\tthis.queryView.reset();\n\t\t\t}\n\t\t} );\n\n\t\t// Update the visibility of the results view when the user types in the query field.\n\t\t// This is an integration for `queryMinChars` configuration.\n\t\t// This is an integration for search results changing length and the #resultsView requiring to be repositioned.\n\t\tthis.on( 'search', () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t} );\n\n\t\t// Hide the results view when the user presses the ESC key.\n\t\tthis.keystrokes.set( 'esc', ( evt, cancel ) => {\n\t\t\t// Let the DOM event pass through if the focus is in the query view.\n\t\t\tif ( !this.resultsView.isVisible ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Focus the query view first and only then close the results view. Otherwise, if the focus\n\t\t\t// was in the results view, it will get lost.\n\t\t\tthis.queryView.focus();\n\t\t\tthis.resultsView.isVisible = false;\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Update the position of the results view when the user scrolls the page.\n\t\t// TODO: This needs to be debounced down the road.\n\t\tthis.listenTo( global.document, 'scroll', () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t} );\n\n\t\t// Hide the results when the component becomes disabled.\n\t\tthis.on( 'change:isEnabled', () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t} );\n\n\t\t// Update the value of the query field when the user selects a result.\n\t\tthis.filteredView.on<FilteredViewExecuteEvent>( 'execute', ( evt, { value } ) => {\n\t\t\t// Focus the query view first to avoid losing the focus.\n\t\t\tthis.focus();\n\n\t\t\t// Resetting the view will ensure that the #queryView will update its empty state correctly.\n\t\t\t// This prevents bugs related to dynamic labels or auto-grow when re-setting the same value\n\t\t\t// to #queryView.fieldView.value (which does not trigger empty state change) to an\n\t\t\t// #queryView.fieldView.element that has been changed by the user.\n\t\t\tthis.reset();\n\n\t\t\t// Update the value of the query field.\n\t\t\tthis.queryView.fieldView.value = this.queryView.fieldView.element!.value = value;\n\n\t\t\t// Finally, hide the results view. The focus has been moved earlier so this is safe.\n\t\t\tthis.resultsView.isVisible = false;\n\t\t} );\n\n\t\t// Update the position and width of the results view when it becomes visible.\n\t\tthis.resultsView.on( 'change:isVisible', () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t} );\n\t}\n\n\t/**\n\t * Updates the position of the results view on demand.\n\t */\n\tprivate _updateResultsViewWidthAndPosition() {\n\t\tif ( !this.resultsView.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.resultsView._width = new Rect( this.queryView.fieldView.element! ).width;\n\n\t\tconst optimalResultsPosition = AutocompleteView._getOptimalPosition( {\n\t\t\telement: this.resultsView.element!,\n\t\t\ttarget: this.queryView.element!,\n\t\t\tfitInViewport: true,\n\t\t\tpositions: AutocompleteView.defaultResultsPositions\n\t\t} );\n\n\t\t// _getOptimalPosition will return null if there is no optimal position found (e.g. target is off the viewport).\n\t\tthis.resultsView._position = optimalResultsPosition ? optimalResultsPosition.name : 's';\n\t}\n\n\t/**\n\t * Updates the visibility of the results view on demand.\n\t */\n\tprivate _updateResultsVisibility() {\n\t\tconst queryMinChars = typeof this._config.queryMinChars === 'undefined' ? 0 : this._config.queryMinChars;\n\t\tconst queryLength = this.queryView.fieldView.element!.value.length;\n\n\t\tthis.resultsView.isVisible = this.focusTracker.isFocused && this.isEnabled && queryLength >= queryMinChars;\n\t}\n\n\t/**\n\t * Positions for the autocomplete results view. Two positions are defined by default:\n\t * * `s` - below the search field,\n\t * * `n` - above the search field.\n\t */\n\tpublic static defaultResultsPositions: Array<PositioningFunction> = [\n\t\t( fieldRect => {\n\t\t\treturn {\n\t\t\t\ttop: fieldRect.bottom,\n\t\t\t\tleft: fieldRect.left,\n\t\t\t\tname: 's'\n\t\t\t};\n\t\t} ) as PositioningFunction,\n\t\t( ( fieldRect, resultsRect ) => {\n\t\t\treturn {\n\t\t\t\ttop: fieldRect.top - resultsRect.height,\n\t\t\t\tleft: fieldRect.left,\n\t\t\t\tname: 'n'\n\t\t\t};\n\t\t} ) as PositioningFunction\n\t];\n\n\t/**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t */\n\tprivate static _getOptimalPosition = getOptimalPosition;\n}\n\n/**\n * An interface describing additional properties of the floating search results view used by the autocomplete plugin.\n */\nexport interface AutocompleteResultsView extends SearchResultsView {\n\n\t/**\n\t * Controls the visibility of the results view.\n\t *\n\t * @observable\n\t */\n\tisVisible: boolean;\n\n\t/**\n\t * Controls the position (CSS class suffix) of the results view.\n\t *\n\t * @internal\n\t*/\n\t_position?: string;\n\n\t/**\n\t * The observable property determining the CSS width of the results view.\n\t *\n\t * @internal\n\t */\n\t_width: number;\n}\n\nexport interface AutocompleteViewConfig<\n\tTConfigInputCreator extends InputBase<HTMLInputElement | HTMLTextAreaElement>\n> extends SearchTextViewConfig<TConfigInputCreator> {\n\n\t/**\n\t * When set `true`, the query view will be reset when the autocomplete view loses focus.\n\t */\n\tresetOnBlur?: boolean;\n\n\t/**\n\t * Minimum number of characters that need to be typed before the search is performed.\n\t *\n\t * @default 0\n\t */\n\tqueryMinChars?: number;\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/**\n * @module ui/highlightedtext/highlightedtextview\n */\n\nimport { View } from '../view.js';\nimport { escape } from 'es-toolkit/compat';\n\n/**\n * A class representing a view that displays a text which subset can be highlighted using the\n * {@link #highlightText} method.\n */\nexport class HighlightedTextView extends View {\n\t/**\n\t * The text that can be highlighted using the {@link #highlightText} method.\n\t *\n\t * **Note:** When this property changes, the previous highlighting is removed.\n\t *\n\t * @observable\n\t */\n\tdeclare public text: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.set( 'text', undefined );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-highlighted-text' ]\n\t\t\t}\n\t\t} );\n\n\t\tthis.on( 'render', () => {\n\t\t\t// Classic setTemplate binding for #text will not work because highlightText() replaces the\n\t\t\t// pre-rendered DOM text node new a new one (and <mark> elements).\n\t\t\tthis.on( 'change:text', () => {\n\t\t\t\tthis._updateInnerHTML( escape( this.text || '' ) );\n\t\t\t} );\n\n\t\t\tthis._updateInnerHTML( escape( this.text || '' ) );\n\t\t} );\n\t}\n\n\t/**\n\t * Highlights view's {@link #text} according to the specified `RegExp`. If the passed RegExp is `null`, the\n\t * highlighting is removed\n\t *\n\t * @param regExp\n\t */\n\tpublic highlightText( regExp: RegExp | null ): void {\n\t\tthis._updateInnerHTML( markText( this.text || '', regExp ) );\n\t}\n\n\t/**\n\t * Updates element's `innerHTML` with the passed content.\n\t */\n\tprivate _updateInnerHTML( newInnerHTML: string | undefined ) {\n\t\tthis.element!.innerHTML = newInnerHTML || '';\n\t}\n}\n\n/**\n * Replaces `regExp` occurrences with `<mark>` tags in a text.\n *\n * @param text A text to get marked.\n * @param regExp An optional `RegExp`. If not passed, this is a pass-through function.\n * @returns A text with `RegExp` occurrences marked by `<mark>`.\n */\nfunction markText( text: string, regExp?: RegExp | null ) {\n\tif ( !regExp ) {\n\t\treturn escape( text );\n\t}\n\n\tconst textParts: Array<{ text: string; isMatch: boolean }> = [];\n\tlet lastMatchEnd = 0;\n\tlet matchInfo = regExp.exec( text );\n\n\t// Iterate over all matches and create an array of text parts. The idea is to mark which parts are query matches\n\t// so that later on they can be highlighted.\n\twhile ( matchInfo !== null ) {\n\t\tconst curMatchStart = matchInfo.index;\n\t\t// Detect if there was something between last match and this one.\n\t\tif ( curMatchStart !== lastMatchEnd ) {\n\t\t\ttextParts.push( {\n\t\t\t\ttext: text.substring( lastMatchEnd, curMatchStart ),\n\t\t\t\tisMatch: false\n\t\t\t} );\n\t\t}\n\n\t\ttextParts.push( {\n\t\t\ttext: matchInfo[ 0 ],\n\t\t\tisMatch: true\n\t\t} );\n\n\t\tlastMatchEnd = regExp.lastIndex;\n\t\tmatchInfo = regExp.exec( text );\n\t}\n\n\t// Your match might not be the last part of a string. Be sure to add any plain text following the last match.\n\tif ( lastMatchEnd !== text.length ) {\n\t\ttextParts.push( {\n\t\t\ttext: text.substring( lastMatchEnd ),\n\t\t\tisMatch: false\n\t\t} );\n\t}\n\n\tconst outputHtml = textParts\n\t\t// The entire text should be escaped.\n\t\t.map( part => {\n\t\t\tpart.text = escape( part.text );\n\t\t\treturn part;\n\t\t} )\n\t\t// Only matched text should be wrapped with HTML mark element.\n\t\t.map( part => part.isMatch ? `<mark>${ part.text }</mark>` : part.text )\n\t\t.join( '' );\n\n\treturn outputHtml;\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/**\n * @module ui/highlightedtext/buttonlabelwithhighlightview\n */\n\nimport { type ButtonLabel } from '../button/buttonlabel.js';\nimport { HighlightedTextView } from './highlightedtextview.js';\n\n/**\n * A button label view that can highlight a text fragment.\n */\nexport class ButtonLabelWithHighlightView extends HighlightedTextView implements ButtonLabel {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public style: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public text: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public id: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.set( {\n\t\t\tstyle: undefined,\n\t\t\ttext: undefined,\n\t\t\tid: undefined\n\t\t} );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-button__label'\n\t\t\t\t],\n\t\t\t\tstyle: bind.to( 'style' ),\n\t\t\t\tid: bind.to( 'id' )\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/highlightedtext/labelwithhighlightview\n */\n\nimport { HighlightedTextView } from './highlightedtextview.js';\nimport { type LabelView } from '../label/labelview.js';\nimport { uid } from '@ckeditor/ckeditor5-utils';\n\n/**\n * A label view that can highlight a text fragment.\n */\nexport class LabelWithHighlightView extends HighlightedTextView implements LabelView {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public for: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.set( 'for', undefined );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.id = `ck-editor__label_${ uid() }`;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-label'\n\t\t\t\t],\n\t\t\t\tid: this.id,\n\t\t\t\tfor: bind.to( 'for' )\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/spinner/spinnerview\n */\n\nimport { View } from '../view.js';\n\n/**\n * The spinner view class.\n */\nexport class SpinnerView extends View {\n\t/**\n\t * Controls whether the spinner is visible.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.set( 'isVisible', false );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-spinner-container',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [ {\n\t\t\t\ttag: 'span',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [ 'ck', 'ck-spinner' ]\n\t\t\t\t}\n\t\t\t} ]\n\t\t} );\n\t}\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/**\n * @module ui/toolbar/balloon/balloontoolbar\n */\n\nimport { ContextualBalloon } from '../../panel/balloon/contextualballoon.js';\nimport { ToolbarView, type ToolbarViewGroupedItemsUpdateEvent } from '../toolbarview.js';\nimport { BalloonPanelView } from '../../panel/balloon/balloonpanelview.js';\nimport { normalizeToolbarConfig } from '../normalizetoolbarconfig.js';\n\nimport type {\n\tEditorUIReadyEvent,\n\tEditorUIUpdateEvent\n} from '../../editorui/editorui.js';\n\nimport { Plugin, type Editor, type EditorReadyEvent, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tFocusTracker,\n\tRect,\n\tResizeObserver,\n\tenv,\n\tglobal,\n\ttoUnit,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tObserver,\n\ttype ModelDocumentSelection,\n\ttype ModelDocumentSelectionChangeRangeEvent,\n\ttype ModelSchema\n} from '@ckeditor/ckeditor5-engine';\n\nimport { debounce } from 'es-toolkit/compat';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\n/**\n * The contextual toolbar.\n *\n * It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */\nexport class BalloonToolbar extends Plugin {\n\t/**\n\t * The toolbar view displayed in the balloon.\n\t */\n\tpublic readonly toolbarView: ToolbarView;\n\n\t/**\n\t * Tracks the focus of the {@link module:ui/editorui/editorui~EditorUI#getEditableElement editable element}\n\t * and the {@link #toolbarView}. When both are blurred then the toolbar should hide.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * A cached and normalized `config.balloonToolbar` object.\n\t */\n\tprivate _balloonConfig: ReturnType<typeof normalizeToolbarConfig>;\n\n\t/**\n\t * An instance of the resize observer that allows to respond to changes in editable's geometry\n\t * so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t *\n\t * **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t * {@link module:core/editor/editorconfig~EditorConfig#balloonToolbar configuration}.\n\t *\n\t * **Note:** Created in {@link #init}.\n\t */\n\tprivate _resizeObserver: ResizeObserver | null = null;\n\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate readonly _balloon: ContextualBalloon;\n\n\t/**\n\t * Fires `_selectionChangeDebounced` event using `es-toolkit#debounce`.\n\t *\n\t * This event is an internal plugin event which is fired 200 ms after model selection last change.\n\t * This is to makes easy test debounced action without need to use `setTimeout`.\n\t *\n\t * This function is stored as a plugin property to make possible to cancel\n\t * trailing debounced invocation on destroy.\n\t */\n\tprivate readonly _fireSelectionChangeDebounced: ReturnType<typeof debounce<() => unknown>>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BalloonToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._balloonConfig = normalizeToolbarConfig( editor.config.get( 'balloonToolbar' ) );\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t// Track focusable elements in the toolbar and the editable elements.\n\t\tthis._trackFocusableEditableElements();\n\t\tthis.focusTracker.add( this.toolbarView );\n\n\t\t// Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n\t\teditor.ui.addToolbar( this.toolbarView, {\n\t\t\tbeforeFocus: () => this.show( true ),\n\t\t\tafterBlur: () => this.hide(),\n\t\t\tisContextual: true\n\t\t} );\n\n\t\tthis._balloon = editor.plugins.get( ContextualBalloon );\n\t\tthis._fireSelectionChangeDebounced = debounce( () => this.fire( '_selectionChangeDebounced' ), 200 );\n\n\t\t// The appearance of the BalloonToolbar method is event–driven.\n\t\t// It is possible to stop the #show event and this prevent the toolbar from showing up.\n\t\tthis.decorate( 'show' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\n\t\t// Show/hide the toolbar on editable focus/blur.\n\t\tthis.listenTo<ObservableChangeEvent<boolean>>( this.focusTracker, 'change:isFocused', ( evt, name, isFocused ) => {\n\t\t\tif ( !isFocused && this._isToolbarVisible ) {\n\t\t\t\tthis.hide();\n\t\t\t} else if ( isFocused ) {\n\t\t\t\tthis.show();\n\t\t\t}\n\t\t} );\n\n\t\t// Hide the toolbar when the selection is changed by a direct change or has changed to collapsed.\n\t\tthis.listenTo<ModelDocumentSelectionChangeRangeEvent>( selection, 'change:range', ( evt, data ) => {\n\t\t\tif ( data.directChange || selection.isCollapsed ) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\n\t\t\t// Fire internal `_selectionChangeDebounced` event to use it for showing\n\t\t\t// the toolbar after the selection stops changing.\n\t\t\tthis._fireSelectionChangeDebounced();\n\t\t} );\n\n\t\t// Show the toolbar when the selection stops changing.\n\t\tthis.listenTo( this, '_selectionChangeDebounced', () => {\n\t\t\tif ( this.editor.editing.view.document.isFocused ) {\n\t\t\t\tthis.show();\n\t\t\t}\n\t\t} );\n\n\t\tif ( !this._balloonConfig.shouldNotGroupWhenFull ) {\n\t\t\tthis.listenTo<EditorReadyEvent>( editor, 'ready', () => {\n\t\t\t\tconst editableElement = editor.ui.view.editable.element!;\n\n\t\t\t\t// Set #toolbarView's max-width on the initialization and update it on the editable resize.\n\t\t\t\tthis._resizeObserver = new ResizeObserver( editableElement, entry => {\n\t\t\t\t\t// The max-width equals 90% of the editable's width for the best user experience.\n\t\t\t\t\t// The value keeps the balloon very close to the boundaries of the editable and limits the cases\n\t\t\t\t\t// when the balloon juts out from the editable element it belongs to.\n\t\t\t\t\tthis.toolbarView.maxWidth = toPx( entry.contentRect.width * .9 );\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\t// Listen to the toolbar view and whenever it changes its geometry due to some items being\n\t\t// grouped or ungrouped, update the position of the balloon because a shorter/longer toolbar\n\t\t// means the balloon could be pointing at the wrong place. Once updated, the balloon will point\n\t\t// at the right selection in the content again.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/6444\n\t\tthis.listenTo<ToolbarViewGroupedItemsUpdateEvent>( this.toolbarView, 'groupedItemsUpdate', () => {\n\t\t\tthis._updatePosition();\n\t\t} );\n\n\t\t// Creates toolbar components based on given configuration.\n\t\t// This needs to be done when all plugins are ready.\n\t\teditor.ui.once<EditorUIReadyEvent>( 'ready', () => {\n\t\t\tthis.toolbarView.fillFromConfig( this._balloonConfig, this.editor.ui.componentFactory );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns whether the toolbar is visible in the ContextualBalloon.\n\t */\n\tprivate get _isToolbarVisible(): boolean {\n\t\treturn this._balloon.visibleView === this.toolbarView;\n\t}\n\n\t/**\n\t * Creates the toolbar view instance.\n\t */\n\tprivate _createToolbarView() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._balloonConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView( this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t} );\n\n\t\ttoolbarView.ariaLabel = t( 'Editor contextual toolbar' );\n\t\ttoolbarView.render();\n\n\t\treturn toolbarView;\n\t}\n\n\t/**\n\t * Shows the toolbar and attaches it to the selection.\n\t *\n\t * Fires {@link #event:show} event which can be stopped to prevent the toolbar from showing up.\n\t *\n\t * @param showForCollapsedSelection When set `true`, the toolbar will show despite collapsed selection in the\n\t * editing view.\n\t */\n\tpublic show( showForCollapsedSelection: boolean = false ): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst schema = editor.model.schema;\n\n\t\t// Do not add the toolbar to the balloon stack twice.\n\t\tif ( this._balloon.hasView( this.toolbarView ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not show the toolbar when the selection is collapsed.\n\t\tif ( selection.isCollapsed && !showForCollapsedSelection ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not show the toolbar when there is more than one range in the selection and they fully contain selectable elements.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/6443.\n\t\tif ( selectionContainsOnlyMultipleSelectables( selection, schema ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not show the toolbar when all components inside are disabled\n\t\t// see https://github.com/ckeditor/ckeditor5-ui/issues/269.\n\t\tif ( Array.from( this.toolbarView.items ).every( ( item: any ) => item.isEnabled !== undefined && !item.isEnabled ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar position when the editor ui should be refreshed.\n\t\tthis.listenTo<EditorUIUpdateEvent>( this.editor.ui, 'update', () => {\n\t\t\tthis._updatePosition();\n\t\t} );\n\n\t\t// Add the toolbar to the common editor contextual balloon.\n\t\tthis._balloon.add( {\n\t\t\tview: this.toolbarView,\n\t\t\tposition: this._getBalloonPositionData(),\n\t\t\tballoonClassName: 'ck-toolbar-container'\n\t\t} );\n\t}\n\n\t/**\n\t * Hides the toolbar.\n\t */\n\tpublic hide(): void {\n\t\tif ( this._balloon.hasView( this.toolbarView ) ) {\n\t\t\tthis.stopListening( this.editor.ui, 'update' );\n\t\t\tthis._balloon.remove( this.toolbarView );\n\t\t}\n\t}\n\n\t/**\n\t * Add or remove editable elements to the focus tracker. It watches added and removed roots\n\t * and adds or removes their editable elements to the focus tracker.\n\t */\n\tprivate _trackFocusableEditableElements() {\n\t\tconst { editor, focusTracker } = this;\n\t\tconst { editing } = editor;\n\n\t\tediting.view.addObserver( class TrackEditableElements extends Observer {\n\t\t\t/**\n\t\t\t * @inheritDoc\n\t\t\t */\n\t\t\tpublic observe( domElement: HTMLElement ) {\n\t\t\t\tfocusTracker.add( domElement );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @inheritDoc\n\t\t\t */\n\t\t\tpublic stopObserving( domElement: HTMLElement ) {\n\t\t\t\tfocusTracker.remove( domElement );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns positioning options for the {@link #_balloon}. They control the way balloon is attached\n\t * to the selection.\n\t */\n\tprivate _getBalloonPositionData() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst viewSelection = viewDocument.selection;\n\n\t\t// Get direction of the selection.\n\t\tconst isBackward = viewDocument.selection.isBackward;\n\n\t\treturn {\n\t\t\t// Because the target for BalloonPanelView is a Rect (not DOMRange), it's geometry will stay fixed\n\t\t\t// as the window scrolls. To let the BalloonPanelView follow such Rect, is must be continuously\n\t\t\t// computed and hence, the target is defined as a function instead of a static value.\n\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/195\n\t\t\ttarget: () => {\n\t\t\t\tconst range = isBackward ? viewSelection.getFirstRange() : viewSelection.getLastRange();\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects( view.domConverter.viewRangeToDom( range! ) );\n\n\t\t\t\t// Select the proper range rect depending on the direction of the selection.\n\t\t\t\tif ( isBackward ) {\n\t\t\t\t\treturn rangeRects[ 0 ];\n\t\t\t\t} else {\n\t\t\t\t\t// Ditch the zero-width \"orphan\" rect in the next line for the forward selection if there's\n\t\t\t\t\t// another one preceding it. It is not rendered as a selection by the web browser anyway.\n\t\t\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/308\n\t\t\t\t\tif ( rangeRects.length > 1 && rangeRects[ rangeRects.length - 1 ].width === 0 ) {\n\t\t\t\t\t\trangeRects.pop();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn rangeRects[ rangeRects.length - 1 ];\n\t\t\t\t}\n\t\t\t},\n\t\t\tpositions: this._getBalloonPositions( isBackward )\n\t\t};\n\t}\n\n\t/**\n\t * Updates the position of the {@link #_balloon} to make up for changes:\n\t *\n\t * * in the geometry of the selection it is attached to (e.g. the selection moved in the viewport or expanded or shrunk),\n\t * * or the geometry of the balloon toolbar itself (e.g. the toolbar has grouped or ungrouped some items and it is shorter or longer).\n\t */\n\tprivate _updatePosition() {\n\t\tif ( this._isToolbarVisible ) {\n\t\t\tthis._balloon.updatePosition( this._getBalloonPositionData() );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.stopListening();\n\t\tthis._fireSelectionChangeDebounced.cancel();\n\t\tthis.toolbarView.destroy();\n\t\tthis.focusTracker.destroy();\n\n\t\tif ( this._resizeObserver ) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Returns toolbar positions for the given direction of the selection.\n\t */\n\tprivate _getBalloonPositions( isBackward: boolean ) {\n\t\tconst isSafariIniOS = env.isSafari && env.isiOS;\n\n\t\t// https://github.com/ckeditor/ckeditor5/issues/7707\n\t\tconst positions = isSafariIniOS ? BalloonPanelView.generatePositions( {\n\t\t\t// 20px when zoomed out. Less then 20px when zoomed in; the \"radius\" of the native selection handle gets\n\t\t\t// smaller as the user zooms in. No less than the default v-offset, though.\n\t\t\theightOffset: Math.max(\n\t\t\t\tBalloonPanelView.arrowHeightOffset,\n\t\t\t\tMath.round( 20 / global.window.visualViewport!.scale )\n\t\t\t)\n\t\t} ) : BalloonPanelView.defaultPositions;\n\n\t\treturn isBackward ? [\n\t\t\tpositions.northWestArrowSouth,\n\t\t\tpositions.northWestArrowSouthWest,\n\t\t\tpositions.northWestArrowSouthEast,\n\t\t\tpositions.northWestArrowSouthMiddleEast,\n\t\t\tpositions.northWestArrowSouthMiddleWest,\n\t\t\tpositions.southWestArrowNorth,\n\t\t\tpositions.southWestArrowNorthWest,\n\t\t\tpositions.southWestArrowNorthEast,\n\t\t\tpositions.southWestArrowNorthMiddleWest,\n\t\t\tpositions.southWestArrowNorthMiddleEast\n\t\t] : [\n\t\t\tpositions.southEastArrowNorth,\n\t\t\tpositions.southEastArrowNorthEast,\n\t\t\tpositions.southEastArrowNorthWest,\n\t\t\tpositions.southEastArrowNorthMiddleEast,\n\t\t\tpositions.southEastArrowNorthMiddleWest,\n\t\t\tpositions.northEastArrowSouth,\n\t\t\tpositions.northEastArrowSouthEast,\n\t\t\tpositions.northEastArrowSouthWest,\n\t\t\tpositions.northEastArrowSouthMiddleEast,\n\t\t\tpositions.northEastArrowSouthMiddleWest\n\t\t];\n\t}\n}\n\n/**\n * Returns \"true\" when the selection has multiple ranges and each range contains a selectable element\n * and nothing else.\n */\nfunction selectionContainsOnlyMultipleSelectables( selection: ModelDocumentSelection, schema: ModelSchema ) {\n\t// It doesn't contain multiple objects if there is only one range.\n\tif ( selection.rangeCount === 1 ) {\n\t\treturn false;\n\t}\n\n\treturn [ ...selection.getRanges() ].every( range => {\n\t\tconst element = range.getContainedElement();\n\n\t\treturn element && schema.isSelectable( element );\n\t} );\n}\n\n/**\n * This event is fired just before the toolbar shows up. Stopping this event will prevent this.\n *\n * @eventName ~BalloonToolbar#show\n */\nexport type BalloonToolbarShowEvent = {\n\tname: 'show';\n\targs: [];\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/**\n * @module ui/toolbar/block/blockbuttonview\n */\n\nimport { ButtonView } from '../../button/buttonview.js';\n\nimport { toUnit, type Locale } from '@ckeditor/ckeditor5-utils';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\n/**\n * The block button view class.\n *\n * This view represents a button attached next to block element where the selection is anchored.\n *\n * See {@link module:ui/toolbar/block/blocktoolbar~BlockToolbar}.\n */\nexport class BlockButtonView extends ButtonView {\n\t/**\n\t * Top offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public top: number;\n\n\t/**\n\t * Left offset.\n\t *\n\t * @observable\n\t */\n\tdeclare public left: number;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\t// Hide button on init.\n\t\tthis.isVisible = false;\n\n\t\tthis.isToggleable = true;\n\n\t\tthis.set( 'top', 0 );\n\t\tthis.set( 'left', 0 );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-block-toolbar-button',\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to( 'top', val => toPx( val ) ),\n\t\t\t\t\tleft: bind.to( 'left', val => toPx( val ) )\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/toolbar/block/blocktoolbar\n */\n\nimport {\n\tPlugin,\n\ttype Editor\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\ttype EventInfo,\n\tgetAncestors,\n\tglobal,\n\tRect,\n\tResizeObserver,\n\ttoUnit,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { ModelDocumentSelectionChangeRangeEvent } from '@ckeditor/ckeditor5-engine';\n\nimport { BlockButtonView } from './blockbuttonview.js';\nimport { BalloonPanelView } from '../../panel/balloon/balloonpanelview.js';\nimport { ToolbarView, NESTED_TOOLBAR_ICONS } from '../toolbarview.js';\nimport { clickOutsideHandler } from '../../bindings/clickoutsidehandler.js';\nimport { normalizeToolbarConfig } from '../normalizetoolbarconfig.js';\n\nimport { type ButtonView } from '../../button/buttonview.js';\nimport type { ButtonExecuteEvent } from '../../button/button.js';\nimport type { EditorUIReadyEvent, EditorUIUpdateEvent } from '../../editorui/editorui.js';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\n/**\n * The block toolbar plugin.\n *\n * This plugin provides a button positioned next to the block of content where the selection is anchored.\n * Upon clicking the button, a dropdown providing access to editor features shows up, as configured in\n * {@link module:core/editor/editorconfig~EditorConfig#blockToolbar}.\n *\n * By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~ModelSchema}\n * as `$block` for which the toolbar provides at least one option.\n *\n * By default, the button is attached so its right boundary is touching the\n * {@link module:engine/view/editableelement~ViewEditableElement}:\n *\n * ```\n *  __ |\n * |  ||  This is a block of content that the\n *  ¯¯ |  button is attached to. This is a\n *     |  block of content that the button is\n *     |  attached to.\n * ```\n *\n * The position of the button can be adjusted using the CSS `transform` property:\n *\n * ```css\n * .ck-block-toolbar-button {\n * \ttransform: translateX( -10px );\n * }\n * ```\n *\n * ```\n *  __   |\n * |  |  |  This is a block of content that the\n *  ¯¯   |  button is attached to. This is a\n *       |  block of content that the button is\n *       |  attached to.\n * ```\n *\n * **Note**: If you plan to run the editor in a right–to–left (RTL) language, keep in mind the button\n * will be attached to the **right** boundary of the editable area. In that case, make sure the\n * CSS position adjustment works properly by adding the following styles:\n *\n * ```css\n * .ck[dir=\"rtl\"] .ck-block-toolbar-button {\n * \ttransform: translateX( 10px );\n * }\n * ```\n */\nexport class BlockToolbar extends Plugin {\n\t/**\n\t * The toolbar view.\n\t */\n\tpublic readonly toolbarView: ToolbarView;\n\n\t/**\n\t * The balloon panel view, containing the {@link #toolbarView}.\n\t */\n\tpublic readonly panelView: BalloonPanelView;\n\n\t/**\n\t * The button view that opens the {@link #toolbarView}.\n\t */\n\tpublic readonly buttonView: BlockButtonView;\n\n\t/**\n\t * An instance of the resize observer that allows to respond to changes in editable's geometry\n\t * so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t *\n\t * **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t * {@link module:core/editor/editorconfig~EditorConfig#blockToolbar configuration}.\n\t */\n\tprivate _resizeObserver: ResizeObserver | null = null;\n\n\t/**\n\t * A cached and normalized `config.blockToolbar` object.\n\t */\n\tprivate _blockToolbarConfig: ReturnType<typeof normalizeToolbarConfig>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BlockToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._blockToolbarConfig = normalizeToolbarConfig( this.editor.config.get( 'blockToolbar' ) );\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.panelView = this._createPanelView();\n\t\tthis.buttonView = this._createButtonView();\n\n\t\t// Close the #panelView upon clicking outside of the plugin UI.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this.panelView,\n\t\t\tcontextElements: [ this.panelView.element!, this.buttonView.element! ],\n\t\t\tactivator: () => this.panelView.isVisible,\n\t\t\tcallback: () => this._hidePanel()\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tconst editBlockText = t( 'Click to edit block' );\n\t\tconst dragToMoveText = t( 'Drag to move' );\n\t\tconst editBlockLabel = t( 'Edit block' );\n\n\t\tconst isDragDropBlockToolbarPluginLoaded = editor.plugins.has( 'DragDropBlockToolbar' );\n\t\tconst label = isDragDropBlockToolbarPluginLoaded ? `${ editBlockText }\\n${ dragToMoveText }` : editBlockLabel;\n\n\t\tthis.buttonView.label = label;\n\n\t\tif ( isDragDropBlockToolbarPluginLoaded ) {\n\t\t\tthis.buttonView.element!.dataset.ckeTooltipClass = 'ck-tooltip_multi-line';\n\t\t}\n\n\t\t// Hides panel on a direct selection change.\n\t\tthis.listenTo<ModelDocumentSelectionChangeRangeEvent>( editor.model.document.selection, 'change:range', ( evt, data ) => {\n\t\t\tif ( data.directChange ) {\n\t\t\t\tthis._hidePanel();\n\t\t\t}\n\t\t} );\n\n\t\tthis.listenTo<EditorUIUpdateEvent>( editor.ui, 'update', () => this._updateButton() );\n\t\t// `low` priority is used because of https://github.com/ckeditor/ckeditor5-core/issues/133.\n\t\tthis.listenTo<ObservableChangeEvent>( editor, 'change:isReadOnly', () => this._updateButton(), { priority: 'low' } );\n\t\tthis.listenTo<ObservableChangeEvent>( editor.ui.focusTracker, 'change:isFocused', () => this._updateButton() );\n\n\t\t// Reposition button on resize.\n\t\tthis.listenTo<ObservableChangeEvent<boolean>>( this.buttonView, 'change:isVisible', ( evt, name, isVisible ) => {\n\t\t\tif ( isVisible ) {\n\t\t\t\t// Keep correct position of button and panel on window#resize.\n\t\t\t\tthis.buttonView.listenTo( window, 'resize', () => this._updateButton() );\n\t\t\t} else {\n\t\t\t\t// Stop repositioning button when is hidden.\n\t\t\t\tthis.buttonView.stopListening( window, 'resize' );\n\n\t\t\t\t// Hide the panel when the button disappears.\n\t\t\t\tthis._hidePanel();\n\t\t\t}\n\t\t} );\n\n\t\t// Reposition button on scroll.\n\t\tthis._repositionButtonOnScroll();\n\n\t\t// Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n\t\teditor.ui.addToolbar( this.toolbarView, {\n\t\t\tbeforeFocus: () => this._showPanel(),\n\t\t\tafterBlur: () => this._hidePanel()\n\t\t} );\n\n\t\t// Fills the toolbar with its items based on the configuration.\n\t\t// This needs to be done after all plugins are ready.\n\t\teditor.ui.once<EditorUIReadyEvent>( 'ready', () => {\n\t\t\tthis.toolbarView.fillFromConfig( this._blockToolbarConfig, this.editor.ui.componentFactory );\n\n\t\t\t// Hide panel before executing each button in the panel.\n\t\t\tfor ( const item of this.toolbarView.items ) {\n\t\t\t\titem.on<ButtonExecuteEvent>( 'execute', () => this._hidePanel( true ), { priority: 'high' } );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see https://github.com/ckeditor/ckeditor5/issues/1341).\n\t\tthis.panelView.destroy();\n\t\tthis.buttonView.destroy();\n\t\tthis.toolbarView.destroy();\n\n\t\tif ( this._resizeObserver ) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the {@link #toolbarView}.\n\t */\n\tprivate _createToolbarView(): ToolbarView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._blockToolbarConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView( this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t} );\n\n\t\ttoolbarView.ariaLabel = t( 'Editor block content toolbar' );\n\n\t\treturn toolbarView;\n\t}\n\n\t/**\n\t * Creates the {@link #panelView}.\n\t */\n\tprivate _createPanelView(): BalloonPanelView {\n\t\tconst editor = this.editor;\n\t\tconst panelView = new BalloonPanelView( editor.locale );\n\n\t\tpanelView.content.add( this.toolbarView );\n\t\tpanelView.class = 'ck-toolbar-container';\n\t\teditor.ui.view.body.add( panelView );\n\n\t\t// Close #panelView on `Esc` press.\n\t\tthis.toolbarView.keystrokes.set( 'Esc', ( evt, cancel ) => {\n\t\t\tthis._hidePanel( true );\n\t\t\tcancel();\n\t\t} );\n\n\t\treturn panelView;\n\t}\n\n\t/**\n\t * Creates the {@link #buttonView}.\n\t */\n\tprivate _createButtonView(): BlockButtonView {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst buttonView = new BlockButtonView( editor.locale );\n\t\tconst iconFromConfig = this._blockToolbarConfig.icon;\n\n\t\tconst icon = NESTED_TOOLBAR_ICONS[ iconFromConfig! ] || iconFromConfig || NESTED_TOOLBAR_ICONS.dragIndicator;\n\n\t\tbuttonView.set( {\n\t\t\tlabel: t( 'Edit block' ),\n\t\t\ticon,\n\t\t\twithText: false\n\t\t} );\n\n\t\t// Bind the panelView observable properties to the buttonView.\n\t\tbuttonView.bind( 'isOn' ).to( this.panelView, 'isVisible' );\n\t\tbuttonView.bind( 'tooltip' ).to( this.panelView, 'isVisible', isVisible => !isVisible );\n\n\t\t// Toggle the panelView upon buttonView#execute.\n\t\tthis.listenTo<ButtonExecuteEvent>( buttonView, 'execute', () => {\n\t\t\tif ( !this.panelView.isVisible ) {\n\t\t\t\tthis._showPanel();\n\t\t\t} else {\n\t\t\t\tthis._hidePanel( true );\n\t\t\t}\n\t\t} );\n\n\t\t// Hide the panelView when the buttonView is disabled. `isEnabled` flag might be changed when\n\t\t// user scrolls the viewport and the button is no longer visible. In such case, the panel should be hidden\n\t\t// otherwise it will be displayed in the wrong place.\n\t\tthis.listenTo<ObservableChangeEvent<boolean>>( buttonView, 'change:isEnabled', ( evt, name, isEnabled ) => {\n\t\t\tif ( !isEnabled && this.panelView.isVisible ) {\n\t\t\t\tthis._hidePanel( false );\n\t\t\t}\n\t\t} );\n\n\t\teditor.ui.view.body.add( buttonView );\n\n\t\treturn buttonView;\n\t}\n\n\t/**\n\t * Shows or hides the button.\n\t * When all the conditions for displaying the button are matched, it shows the button. Hides otherwise.\n\t */\n\tprivate _updateButton() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\n\t\t// Hides the button when the editor is not focused.\n\t\tif ( !editor.ui.focusTracker.isFocused ) {\n\t\t\tthis._hideButton();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Hides the button when the selection is in non-editable place.\n\t\tif ( !editor.model.canEditAt( editor.model.document.selection ) ) {\n\t\t\tthis._hideButton();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the first selected block, button will be attached to this element.\n\t\tconst modelTarget = Array.from( model.document.selection.getSelectedBlocks() )[ 0 ];\n\n\t\t// Hides the button when there is no enabled item in toolbar for the current block element.\n\t\tif ( !modelTarget || Array.from( this.toolbarView.items ).every( ( item: any ) => !item.isEnabled ) ) {\n\t\t\tthis._hideButton();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Get DOM target element.\n\t\tconst domTarget = view.domConverter.mapViewToDom( editor.editing.mapper.toViewElement( modelTarget )! );\n\n\t\t// Show block button.\n\t\tthis.buttonView.isVisible = true;\n\n\t\t// Make sure that the block toolbar panel is resized properly.\n\t\tthis._setupToolbarResize();\n\n\t\t// Attach block button to target DOM element.\n\t\tthis._attachButtonToElement( domTarget as any );\n\n\t\t// When panel is opened then refresh it position to be properly aligned with block button.\n\t\tif ( this.panelView.isVisible ) {\n\t\t\tthis._showPanel();\n\t\t}\n\t}\n\n\t/**\n\t * Hides the button.\n\t */\n\tprivate _hideButton() {\n\t\tthis.buttonView.isVisible = false;\n\t}\n\n\t/**\n\t * Shows the {@link #toolbarView} attached to the {@link #buttonView}.\n\t * If the toolbar is already visible, then it simply repositions it.\n\t */\n\tprivate _showPanel() {\n\t\t// Usually, the only way to show the toolbar is by pressing the block button. It makes it impossible for\n\t\t// the toolbar to show up when the button is invisible (feature does not make sense for the selection then).\n\t\t// The toolbar navigation using Alt+F10 does not access the button but shows the panel directly using this method.\n\t\t// So we need to check whether this is possible first.\n\t\tif ( !this.buttonView.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasVisible = this.panelView.isVisible;\n\n\t\t// So here's the thing: If there was no initial panelView#show() or these two were in different order, the toolbar\n\t\t// positioning will break in RTL editors. Weird, right? What you show know is that the toolbar\n\t\t// grouping works thanks to:\n\t\t//\n\t\t// * the ResizeObserver, which kicks in as soon as the toolbar shows up in DOM (becomes visible again).\n\t\t// * the observable ToolbarView#maxWidth, which triggers re-grouping when changed.\n\t\t//\n\t\t// Here are the possible scenarios:\n\t\t//\n\t\t// 1. (WRONG ❌) If the #maxWidth is set when the toolbar is invisible, it won't affect item grouping (no DOMRects, no grouping).\n\t\t//    Then, when panelView.pin() is called, the position of the toolbar will be calculated for the old\n\t\t//    items grouping state, and when finally ResizeObserver kicks in (hey, the toolbar is visible now, right?)\n\t\t//    it will group/ungroup some items and the length of the toolbar will change. But since in RTL the toolbar\n\t\t//    is attached on the right side and the positioning uses CSS \"left\", it will result in the toolbar shifting\n\t\t//    to the left and being displayed in the wrong place.\n\t\t// 2. (WRONG ❌) If the panelView.pin() is called first and #maxWidth set next, then basically the story repeats. The balloon\n\t\t//    calculates the position for the old toolbar grouping state, then the toolbar re-groups items and because\n\t\t//    it is positioned using CSS \"left\" it will move.\n\t\t// 3. (RIGHT ✅) We show the panel first (the toolbar does re-grouping but it does not matter), then the #maxWidth\n\t\t//    is set allowing the toolbar to re-group again and finally panelView.pin() does the positioning when the\n\t\t//    items grouping state is stable and final.\n\t\t//\n\t\t// https://github.com/ckeditor/ckeditor5/issues/6449, https://github.com/ckeditor/ckeditor5/issues/6575\n\t\tthis.panelView.show();\n\n\t\tconst editableElement = this._getSelectedEditableElement();\n\n\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth( editableElement );\n\n\t\tthis.panelView.pin( {\n\t\t\ttarget: this.buttonView.element!,\n\t\t\tlimiter: editableElement\n\t\t} );\n\n\t\tif ( !wasVisible ) {\n\t\t\t( this.toolbarView.items.get( 0 ) as any ).focus();\n\t\t}\n\t}\n\n\t/**\n\t * Returns currently selected editable, based on the model selection.\n\t */\n\tprivate _getSelectedEditableElement(): HTMLElement {\n\t\tconst selectedModelRootName = this.editor.model.document.selection.getFirstRange()!.root.rootName!;\n\n\t\treturn this.editor.ui.getEditableElement( selectedModelRootName )!;\n\t}\n\n\t/**\n\t * Hides the {@link #toolbarView}.\n\t *\n\t * @param focusEditable When `true`, the editable will be focused after hiding the panel.\n\t */\n\tprivate _hidePanel( focusEditable?: boolean ) {\n\t\tthis.panelView.isVisible = false;\n\n\t\tif ( focusEditable ) {\n\t\t\tthis.editor.editing.view.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Repositions the button on scroll.\n\t */\n\tprivate _repositionButtonOnScroll() {\n\t\tconst { buttonView } = this;\n\n\t\tlet pendingAnimationFrame = false;\n\n\t\t// Reposition the button on scroll, but do it only once per animation frame to avoid performance issues.\n\t\tconst repositionOnScroll = ( evt: EventInfo, domEvt: Event ) => {\n\t\t\tif ( pendingAnimationFrame ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// It makes no sense to reposition the button when the user scrolls the dropdown or any other\n\t\t\t// nested scrollable element. The button should be repositioned only when the user scrolls the\n\t\t\t// editable or any other scrollable parent of the editable. Leaving it as it is buggy on Chrome\n\t\t\t// where scrolling nested scrollables is not properly handled.\n\t\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/17067\n\t\t\tconst editableElement = this._getSelectedEditableElement();\n\n\t\t\tif (\n\t\t\t\tdomEvt.target !== global.document &&\n\t\t\t\t!getAncestors( editableElement ).includes( domEvt.target as HTMLElement )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tpendingAnimationFrame = true;\n\t\t\tglobal.window.requestAnimationFrame( () => {\n\t\t\t\tthis._updateButton();\n\t\t\t\tpendingAnimationFrame = false;\n\t\t\t} );\n\t\t};\n\n\t\t// Watch scroll event only when the button is visible, it prevents attaching the scroll event listener\n\t\t// to the document when the button is not visible.\n\t\tbuttonView.on<ObservableChangeEvent<boolean>>( 'change:isVisible', ( evt, name, isVisible ) => {\n\t\t\tif ( isVisible ) {\n\t\t\t\tbuttonView.listenTo( global.document, 'scroll', repositionOnScroll, {\n\t\t\t\t\tuseCapture: true,\n\t\t\t\t\tusePassive: true\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tbuttonView.stopListening( global.document, 'scroll', repositionOnScroll );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Attaches the {@link #buttonView} to the target block of content.\n\t *\n\t * @param targetElement Target element.\n\t */\n\tprivate _attachButtonToElement( targetElement: HTMLElement ) {\n\t\tconst buttonElement = this.buttonView.element!;\n\t\tconst editableElement = this._getSelectedEditableElement();\n\n\t\tconst contentStyles = window.getComputedStyle( targetElement );\n\n\t\tconst editableRect = new Rect( editableElement );\n\t\tconst contentPaddingTop = parseInt( contentStyles.paddingTop, 10 );\n\t\t// When line height is not an integer then treat it as \"normal\".\n\t\t// MDN says that 'normal' == ~1.2 on desktop browsers.\n\t\tconst contentLineHeight = parseInt( contentStyles.lineHeight, 10 ) || parseInt( contentStyles.fontSize, 10 ) * 1.2;\n\n\t\tconst buttonRect = new Rect( buttonElement );\n\t\tconst contentRect = new Rect( targetElement );\n\n\t\tlet positionLeft;\n\n\t\tif ( this.editor.locale.uiLanguageDirection === 'ltr' ) {\n\t\t\tpositionLeft = editableRect.left - buttonRect.width;\n\t\t} else {\n\t\t\tpositionLeft = editableRect.right;\n\t\t}\n\n\t\tconst positionTop = contentRect.top + contentPaddingTop + ( contentLineHeight - buttonRect.height ) / 2;\n\n\t\tbuttonRect.moveTo( positionLeft, positionTop );\n\n\t\tconst absoluteButtonRect = buttonRect.toAbsoluteRect();\n\n\t\tthis.buttonView.top = absoluteButtonRect.top;\n\t\tthis.buttonView.left = absoluteButtonRect.left;\n\n\t\tthis._clipButtonToViewport( this.buttonView, editableElement );\n\t}\n\n\t/**\n\t * Clips the button element to the viewport of the editable element.\n\t *\n\t * \t* If the button overflows the editable viewport, it is clipped to make it look like it's cut off by the editable scrollable region.\n\t * \t* If the button is fully hidden by the top of the editable, it is not clickable but still visible in the DOM.\n\t *\n\t * @param buttonView The button view to clip.\n\t * @param editableElement The editable element whose viewport is used for clipping.\n\t */\n\tprivate _clipButtonToViewport(\n\t\tbuttonView: ButtonView,\n\t\teditableElement: HTMLElement\n\t) {\n\t\tconst absoluteButtonRect = new Rect( buttonView.element! );\n\t\tconst scrollViewportRect = new Rect( editableElement ).getVisible();\n\n\t\t// Sets polygon clip path for the button element, if there is no argument provided, the clip path is removed.\n\t\tconst setButtonClipping = ( ...paths: Array<string> ) => {\n\t\t\tbuttonView.element!.style.clipPath = paths.length ? `polygon(${ paths.join( ',' ) })` : '';\n\t\t};\n\n\t\t// Hide the button if it's fully hidden by the top of the editable.\n\t\t// Note that the button is still visible in the DOM, but it's not clickable. It's because we don't\n\t\t// want to hide the button completely, as there are plenty of `isVisible` watchers which toggles\n\t\t// the button scroll listeners.\n\t\tconst markAsHidden = ( isHidden: boolean ) => {\n\t\t\tbuttonView.isEnabled = !isHidden;\n\t\t\tbuttonView.element!.style.pointerEvents = isHidden ? 'none' : '';\n\t\t};\n\n\t\tif ( scrollViewportRect && scrollViewportRect.bottom < absoluteButtonRect.bottom ) {\n\t\t\t// Calculate the delta between the button bottom and the editable bottom, and clip the button\n\t\t\t// to make it look like it's cut off by the editable scrollable region.\n\t\t\tconst delta = Math.min(\n\t\t\t\tabsoluteButtonRect.height,\n\t\t\t\tabsoluteButtonRect.bottom - scrollViewportRect.bottom\n\t\t\t);\n\n\t\t\tmarkAsHidden( delta >= absoluteButtonRect.height );\n\t\t\tsetButtonClipping(\n\t\t\t\t'0 0',\n\t\t\t\t'100% 0',\n\t\t\t\t`100% calc(100% - ${ toPx( delta ) })`,\n\t\t\t\t`0 calc(100% - ${ toPx( delta ) }`\n\t\t\t);\n\t\t} else if ( scrollViewportRect && scrollViewportRect.top > absoluteButtonRect.top ) {\n\t\t\t// Calculate the delta between the button top and the editable top, and clip the button\n\t\t\t// to make it look like it's cut off by the editable scrollable region.\n\t\t\tconst delta = Math.min(\n\t\t\t\tabsoluteButtonRect.height,\n\t\t\t\tscrollViewportRect.top - absoluteButtonRect.top\n\t\t\t);\n\n\t\t\tmarkAsHidden( delta >= absoluteButtonRect.height );\n\t\t\tsetButtonClipping(\n\t\t\t\t`0 ${ toPx( delta ) }`,\n\t\t\t\t`100% ${ toPx( delta ) }`,\n\t\t\t\t'100% 100%',\n\t\t\t\t'0 100%'\n\t\t\t);\n\t\t} else {\n\t\t\t// Reset the clip path if button is fully visible.\n\t\t\tmarkAsHidden( false );\n\t\t\tsetButtonClipping();\n\t\t}\n\t}\n\n\t/**\n\t * Creates a resize observer that observes selected editable and resizes the toolbar panel accordingly.\n\t */\n\tprivate _setupToolbarResize() {\n\t\tconst editableElement = this._getSelectedEditableElement();\n\n\t\t// Do this only if the automatic grouping is turned on.\n\t\tif ( !this._blockToolbarConfig.shouldNotGroupWhenFull ) {\n\t\t\t// If resize observer is attached to a different editable than currently selected editable, re-attach it.\n\t\t\tif ( this._resizeObserver && this._resizeObserver.element !== editableElement ) {\n\t\t\t\tthis._resizeObserver.destroy();\n\t\t\t\tthis._resizeObserver = null;\n\t\t\t}\n\n\t\t\tif ( !this._resizeObserver ) {\n\t\t\t\tthis._resizeObserver = new ResizeObserver( editableElement, () => {\n\t\t\t\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth( editableElement );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets the {@link #toolbarView} max-width, based on given `editableElement` width plus the distance between the farthest\n\t * edge of the {@link #buttonView} and the editable.\n\t *\n\t * @returns A maximum width that toolbar can have, in pixels.\n\t */\n\tprivate _getToolbarMaxWidth( editableElement: HTMLElement ) {\n\t\tconst editableRect = new Rect( editableElement );\n\t\tconst buttonRect = new Rect( this.buttonView.element! );\n\t\tconst isRTL = this.editor.locale.uiLanguageDirection === 'rtl';\n\t\tconst offset = isRTL ? ( buttonRect.left - editableRect.right ) + buttonRect.width : editableRect.left - buttonRect.left;\n\n\t\treturn toPx( editableRect.width + offset );\n\t}\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/**\n * @module ui/menubar/menubarmenubuttonview\n */\n\nimport { IconDropdownArrow } from '@ckeditor/ckeditor5-icons';\nimport { IconView } from '../icon/iconview.js';\nimport { ListItemButtonView } from '../button/listitembuttonview.js';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * A menu {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#buttonView} class. Buttons like this one\n * open both top-level bar menus as well as sub-menus.\n */\nexport class MenuBarMenuButtonView extends ListItemButtonView {\n\t/**\n\t * An icon that displays an arrow to indicate a direction of the menu.\n\t */\n\tpublic readonly arrowView: IconView;\n\n\t/**\n\t * Creates an instance of the menu bar button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\trole: 'menuitem'\n\t\t} );\n\n\t\tthis.arrowView = this._createArrowView();\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-menu-bar__menu__button'\n\t\t\t\t],\n\t\t\t\t'aria-haspopup': true,\n\t\t\t\t'aria-expanded': this.bindTemplate.to( 'isOn', value => String( value ) ),\n\t\t\t\t'data-cke-tooltip-disabled': bind.to( 'isOn' )\n\t\t\t},\n\t\t\ton: {\n\t\t\t\t'mouseenter': bind.to( 'mouseenter' )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.add( this.arrowView );\n\t}\n\n\t/**\n\t * Creates the {@link #arrowView} instance.\n\t */\n\tprivate _createArrowView() {\n\t\tconst arrowView = new IconView();\n\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-menu-bar__menu__button__arrow'\n\t\t\t}\n\t\t} );\n\n\t\treturn arrowView;\n\t}\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/**\n * @module ui/menubar/menubarmenupanelview\n */\n\nimport { type Locale } from '@ckeditor/ckeditor5-utils';\nimport type { FocusableView } from '../focuscycler.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { View } from '../view.js';\n\n/**\n * A view representing a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} of a menu.\n */\nexport class MenuBarMenuPanelView extends View implements FocusableView {\n\t/**\n\t * Collection of the child views in this panel.\n\t */\n\tpublic readonly children: ViewCollection<FocusableView>;\n\n\t/**\n\t * Controls whether the panel is visible.\n\t *\n\t * @observable\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * The name of the position of the panel, relative to the parent.\n\t *\n\t * This property is reflected in the CSS class suffix set to {@link #element} that controls\n\t * the position of the panel.\n\t *\n\t * @observable\n\t * @default 'se'\n\t */\n\tdeclare public position: MenuBarMenuPanelPosition;\n\n\t/**\n\t * Creates an instance of the menu panel view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( 'isVisible', false );\n\t\tthis.set( 'position', 'se' );\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-reset',\n\t\t\t\t\t'ck-menu-bar__menu__panel',\n\t\t\t\t\tbind.to( 'position', value => `ck-menu-bar__menu__panel_position_${ value }` ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children,\n\n\t\t\ton: {\n\t\t\t\t// Drag and drop in the panel should not break the selection in the editor.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-ui/issues/228\n\t\t\t\tselectstart: bind.to( evt => {\n\t\t\t\t\tif ( ( evt.target as HTMLElement ).tagName.toLocaleLowerCase() === 'input' ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t */\n\tpublic focus( direction: -1 | 1 = 1 ): void {\n\t\tif ( this.children.length ) {\n\t\t\tif ( direction === 1 ) {\n\t\t\t\tthis.children.first!.focus();\n\t\t\t} else {\n\t\t\t\tthis.children.last!.focus();\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * The names of the positions of the {@link module:ui/menubar/menubarmenupanelview~MenuBarMenuPanelView}.\n *\n * They are reflected as CSS class suffixes on the panel view element.\n */\nexport type MenuBarMenuPanelPosition = 'se' | 'sw' | 'ne' | 'nw' | 'w' | 'ws' | 'e' | 'es';\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/**\n * @module ui/menubar/menubarmenuview\n */\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\tgetOptimalPosition,\n\ttype Locale,\n\ttype PositioningFunction,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\nimport { MenuBarMenuButtonView } from './menubarmenubuttonview.js';\nimport { MenuBarMenuBehaviors, MenuBarMenuViewPanelPositioningFunctions } from './utils.js';\nimport type { FocusableView } from '../focuscycler.js';\nimport { View } from '../view.js';\nimport {\n\tMenuBarMenuPanelView,\n\ttype MenuBarMenuPanelPosition\n} from './menubarmenupanelview.js';\n\n/**\n * A menu view for the {@link module:ui/menubar/menubarview~MenuBarView}. Menus are building blocks of the menu bar,\n * they host other sub-menus and menu items (buttons) that users can interact with.\n */\nexport class MenuBarMenuView extends View implements FocusableView {\n\t/**\n\t * Button of the menu view.\n\t */\n\tpublic readonly buttonView: MenuBarMenuButtonView;\n\n\t/**\n\t * Panel of the menu. It hosts children of the menu.\n\t */\n\tpublic readonly panelView: MenuBarMenuPanelView;\n\n\t/**\n\t * Tracks information about the DOM focus in the menu.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the menu.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Controls whether the menu is open, i.e. shows or hides the {@link #panelView panel}.\n\t *\n\t * @observable\n\t */\n\tdeclare public isOpen: boolean;\n\n\t/**\n\t * Controls whether the menu is enabled, i.e. its {@link #buttonView} can be clicked.\n\t *\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * (Optional) The additional CSS class set on the menu {@link #element}.\n\t *\n\t * @observable\n\t */\n\tdeclare public class: string | undefined;\n\n\t/**\n\t * The name of the position of the {@link #panelView}, relative to the menu.\n\t *\n\t * **Note**: The value is updated each time the panel gets {@link #isOpen open}.\n\t *\n\t * @observable\n\t * @default 'w'\n\t */\n\tdeclare public panelPosition: MenuBarMenuPanelPosition;\n\n\t/**\n\t * The parent menu view of the menu. It is `null` for top-level menus.\n\t *\n\t * See {@link module:ui/menubar/menubarview~MenuBarView#registerMenu}.\n\t */\n\tdeclare public parentMenuView: MenuBarMenuView | null;\n\n\t/**\n\t * Creates an instance of the menu view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.buttonView = new MenuBarMenuButtonView( locale );\n\t\tthis.buttonView.delegate( 'mouseenter' ).to( this );\n\t\tthis.buttonView.bind( 'isOn', 'isEnabled' ).to( this, 'isOpen', 'isEnabled' );\n\n\t\tthis.panelView = new MenuBarMenuPanelView( locale );\n\t\tthis.panelView.bind( 'isVisible' ).to( this, 'isOpen' );\n\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\tthis.set( 'isOpen', false );\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'panelPosition', 'w' );\n\t\tthis.set( 'class', undefined );\n\t\tthis.set( 'parentMenuView', null );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-menu-bar__menu',\n\t\t\t\t\tbind.to( 'class' ),\n\t\t\t\t\tbind.if( 'isEnabled', 'ck-disabled', value => !value ),\n\t\t\t\t\tbind.if( 'parentMenuView', 'ck-menu-bar__menu_top-level', value => !value )\n\t\t\t\t]\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.buttonView,\n\t\t\t\tthis.panelView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.focusTracker.add( this.buttonView.element! );\n\t\tthis.focusTracker.add( this.panelView.element! );\n\n\t\t// Listen for keystrokes coming from within #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tMenuBarMenuBehaviors.closeOnEscKey( this );\n\n\t\tthis._closeOnDisabled();\n\t\tthis._repositionPanelOnOpen();\n\t}\n\n\t// For now, this method cannot be called in the render process because the `parentMenuView` may be assigned\n\t// after the rendering process.\n\t//\n\t// TODO: We should reconsider the way we handle this logic.\n\t/**\n\t * Attach all keyboard behaviors for the menu bar view.\n\t *\n\t * @internal\n\t */\n\tpublic _attachBehaviors(): void {\n\t\t// Top-level menus.\n\t\tif ( !this.parentMenuView ) {\n\t\t\tthis._propagateArrowKeystrokeEvents();\n\n\t\t\tMenuBarMenuBehaviors.openAndFocusPanelOnArrowDownKey( this );\n\t\t\tMenuBarMenuBehaviors.toggleOnButtonClick( this );\n\t\t} else {\n\t\t\tMenuBarMenuBehaviors.openOnButtonClick( this );\n\t\t\tMenuBarMenuBehaviors.openOnArrowRightKey( this );\n\t\t\tMenuBarMenuBehaviors.closeOnArrowLeftKey( this );\n\t\t\tMenuBarMenuBehaviors.openAndFocusOnEnterKeyPress( this );\n\t\t\tMenuBarMenuBehaviors.closeOnParentClose( this );\n\t\t}\n\t}\n\n\t/**\n\t * Fires `arrowright` and `arrowleft` events when the user pressed corresponding arrow keys.\n\t */\n\tprivate _propagateArrowKeystrokeEvents(): void {\n\t\tthis.keystrokes.set( 'arrowright', ( data, cancel ) => {\n\t\t\tthis.fire( 'arrowright' );\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis.keystrokes.set( 'arrowleft', ( data, cancel ) => {\n\t\t\tthis.fire( 'arrowleft' );\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * Closes the menu whenever it gets disabled to avoid leaving an open panel in a non-interactive state.\n\t */\n\tprivate _closeOnDisabled(): void {\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isEnabled', ( evt, name, isEnabled ) => {\n\t\t\tif ( !isEnabled ) {\n\t\t\t\tthis.isOpen = false;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Sets the position of the panel when the menu opens. The panel is positioned\n\t * so that it optimally uses the available space in the viewport.\n\t */\n\tprivate _repositionPanelOnOpen(): void {\n\t\t// Let the menu control the position of the panel. The position must be updated every time the menu is open.\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tif ( !isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst optimalPanelPosition = MenuBarMenuView._getOptimalPosition( {\n\t\t\t\telement: this.panelView.element!,\n\t\t\t\ttarget: this.buttonView.element!,\n\t\t\t\tfitInViewport: true,\n\t\t\t\tpositions: this._panelPositions\n\t\t\t} );\n\n\t\t\tthis.panelView.position = (\n\t\t\t\toptimalPanelPosition ? optimalPanelPosition.name : this._defaultMenuPositionName\n\t\t\t) as MenuBarMenuPanelPosition;\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus(): void {\n\t\tthis.buttonView.focus();\n\t}\n\n\t/**\n\t * Positioning functions for the {@link #panelView} . They change depending on the role of the menu (top-level vs sub-menu) in\n\t * the {@link module:ui/menubar/menubarview~MenuBarView menu bar} and the UI language direction.\n\t */\n\tpublic get _panelPositions(): Array<PositioningFunction> {\n\t\tconst {\n\t\t\tsouthEast, southWest, northEast, northWest,\n\t\t\twestSouth, eastSouth, westNorth, eastNorth\n\t\t} = MenuBarMenuViewPanelPositioningFunctions;\n\n\t\tif ( this.locale!.uiLanguageDirection === 'ltr' ) {\n\t\t\tif ( this.parentMenuView ) {\n\t\t\t\treturn [ eastSouth, eastNorth, westSouth, westNorth ];\n\t\t\t} else {\n\t\t\t\treturn [ southEast, southWest, northEast, northWest ];\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.parentMenuView ) {\n\t\t\t\treturn [ westSouth, westNorth, eastSouth, eastNorth ];\n\t\t\t} else {\n\t\t\t\treturn [ southWest, southEast, northWest, northEast ];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The default position of the panel when the menu is opened.\n\t * It is used when the optimal position cannot be calculated.\n\t */\n\tprivate get _defaultMenuPositionName(): MenuBarMenuPanelPosition {\n\t\tif ( this.locale!.uiLanguageDirection === 'ltr' ) {\n\t\t\tif ( this.parentMenuView ) {\n\t\t\t\treturn 'es';\n\t\t\t} else {\n\t\t\t\treturn 'se';\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.parentMenuView ) {\n\t\t\t\treturn 'ws';\n\t\t\t} else {\n\t\t\t\treturn 'sw';\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t *\n\t * Referenced for unit testing purposes.\n\t */\n\tprivate static _getOptimalPosition = getOptimalPosition;\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/**\n * @module ui/menubar/menubarmenulistview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport { type View } from '../view.js';\n\nimport { ListItemView } from '../list/listitemview.js';\nimport { ListView } from '../list/listview.js';\nimport { ListItemButtonView } from '../button/listitembuttonview.js';\nimport { ButtonView } from '../button/buttonview.js';\n\n/**\n * A list of menu bar items, a child of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView}.\n *\n * Use this class to create a list of items (options, buttons) to be displayed in a menu bar.\n *\n * To populate this list, use {@link module:ui/menubar/menubarmenulistitemview~MenuBarMenuListItemView} instances.\n */\nexport class MenuBarMenuListView extends ListView {\n\t/**\n\t * Creates an instance of the list view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.role = 'menu';\n\t\tthis.items.on( 'change', this._setItemsCheckSpace.bind( this ) );\n\t}\n\n\t/**\n\t * This method adds empty space if there is any toggleable item in the list.\n\t * It makes the list properly aligned.\n\t */\n\tprivate _setItemsCheckSpace() {\n\t\tconst hasAnyToggleableItem = (\n\t\t\tArray\n\t\t\t\t.from( this.items )\n\t\t\t\t.some( item => {\n\t\t\t\t\tconst listButtonView = pickListButtonMenuViewIfPresent( item );\n\n\t\t\t\t\treturn listButtonView && listButtonView.isToggleable;\n\t\t\t\t} )\n\t\t);\n\n\t\tthis.items.forEach( item => {\n\t\t\tconst listButtonView = pickListButtonMenuViewIfPresent( item );\n\n\t\t\tif ( listButtonView ) {\n\t\t\t\tlistButtonView.hasCheckSpace = hasAnyToggleableItem;\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Picks the first button menu view from the given item if present.\n *\n * @param item The item to check for a button menu view.\n * @returns The first button menu view found in the item, or `null` if not found.\n */\nfunction pickListButtonMenuViewIfPresent( item: View ) {\n\tif ( !( item instanceof ListItemView ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\titem\n\t\t\t.children\n\t\t\t.map( child => isNestedMenuLikeView( child ) ? child.buttonView : child )\n\t\t\t.find( item => item instanceof ListItemButtonView ) as ListItemButtonView | undefined\n\t);\n}\n\n/**\n * Checks if the given item is a nested menu-like view. `MenuBarMenuView` imports this file\n * so to avoid circular dependencies, this function is defined in more generic way.\n *\n * @param item The item to check.\n * @returns `true` if the item is a nested menu-like view, `false` otherwise.\n */\nfunction isNestedMenuLikeView( item: any ): item is { buttonView: ButtonView } {\n\treturn (\n\t\ttypeof item === 'object' &&\n\t\t\t'buttonView' in item &&\n\t\t\titem.buttonView instanceof ButtonView\n\t);\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/**\n * @module ui/menubar/menubarmenulistitemfiledialogbuttonview\n */\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport { FileDialogListItemButtonView } from '../button/filedialogbuttonview.js';\n\n/**\n * A menu bar list file dialog button view. Buttons like this one execute user actions.\n *\n * This component provides a button that opens the native file selection dialog.\n */\nexport class MenuBarMenuListItemFileDialogButtonView extends FileDialogListItemButtonView {\n\t/**\n\t * Creates an instance of the menu bar list button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: 'menuitem'\n\t\t} );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-menu-bar__menu__item__button' ]\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module ui/menubar/menubarview\n */\n\nimport {\n\tlogWarning,\n\ttype BaseEvent,\n\ttype Locale,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\nimport { type FocusableView } from '../focuscycler.js';\nimport { View } from '../view.js';\nimport { isObject } from 'es-toolkit/compat';\nimport { ListItemView } from '../list/listitemview.js';\nimport { ListSeparatorView } from '../list/listseparatorview.js';\nimport { type ViewCollection } from '../viewcollection.js';\nimport { type ComponentFactory } from '../componentfactory.js';\n\nimport { MenuBarMenuView } from './menubarmenuview.js';\nimport { MenuBarMenuListView } from './menubarmenulistview.js';\nimport { MenuBarMenuListItemView } from './menubarmenulistitemview.js';\nimport { MenuBarMenuListItemButtonView } from './menubarmenulistitembuttonview.js';\nimport { MenuBarMenuListItemFileDialogButtonView } from './menubarmenulistitemfiledialogbuttonview.js';\nimport {\n\tMenuBarBehaviors,\n\tprocessMenuBarConfig\n} from './utils.js';\n\nconst EVENT_NAME_DELEGATES = [ 'mouseenter', 'arrowleft', 'arrowright', 'change:isOpen' ] as const;\n\n/**\n * The application menu bar component. It brings a set of top-level menus (and sub-menus) that can be used\n * to organize and access a large number of buttons.\n */\nexport class MenuBarView extends View implements FocusableView {\n\t/**\n\t * Collection of the child views inside the {@link #element}.\n\t */\n\tpublic children: ViewCollection<MenuBarMenuView>;\n\n\t/**\n\t * Indicates whether any of top-level menus are open in the menu bar. To close\n\t * the menu bar use the {@link #close} method.\n\t *\n\t * @observable\n\t */\n\tdeclare public isOpen: boolean;\n\n\t/**\n\t * Indicates whether the menu bar has been interacted with using the keyboard.\n\t *\n\t * It is useful for showing focus outlines while hovering over the menu bar when\n\t * interaction with the keyboard was detected.\n\t *\n\t * @observable\n\t */\n\tdeclare public isFocusBorderEnabled: boolean;\n\n\t/**\n\t * A list of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instances registered in the menu bar.\n\t *\n\t * @observable\n\t */\n\tpublic menus: Array<MenuBarMenuView> = [];\n\n\t/**\n\t * Creates an instance of the menu bar view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\tisOpen: false,\n\t\t\tisFocusBorderEnabled: false\n\t\t} );\n\n\t\tthis._setupIsOpenUpdater();\n\n\t\tthis.children = this.createCollection();\n\n\t\t// @if CK_DEBUG_MENU_BAR // // Logs events in the main event bus of the component.\n\t\t// @if CK_DEBUG_MENU_BAR // this.on( 'menu', ( evt, data ) => {\n\t\t// @if CK_DEBUG_MENU_BAR // \tconsole.log( `MenuBarView:${ evt.name }`, evt.path.map( view => view.element ) );\n\t\t// @if CK_DEBUG_MENU_BAR // } );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-menu-bar',\n\t\t\t\t\tbind.if( 'isFocusBorderEnabled', 'ck-menu-bar_focus-border-enabled' )\n\t\t\t\t],\n\t\t\t\t'aria-label': t( 'Editor menu bar' ),\n\t\t\t\trole: 'menubar'\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * A utility that expands a plain menu bar configuration into a structure of menus (also: sub-menus)\n\t * and items using a given {@link module:ui/componentfactory~ComponentFactory component factory}.\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar} in the editor\n\t * configuration reference to learn how to configure the menu bar.\n\t */\n\tpublic fillFromConfig(\n\t\tconfig: NormalizedMenuBarConfigObject,\n\t\tcomponentFactory: ComponentFactory,\n\t\textraItems: Array<MenuBarConfigAddedItem | MenuBarConfigAddedGroup | MenuBarConfigAddedMenu> = []\n\t): void {\n\t\tconst locale = this.locale!;\n\t\tconst processedConfig = processMenuBarConfig( {\n\t\t\tnormalizedConfig: config,\n\t\t\tlocale,\n\t\t\tcomponentFactory,\n\t\t\textraItems\n\t\t} );\n\n\t\tconst topLevelCategoryMenuViews = processedConfig.items.map( menuDefinition => this._createMenu( {\n\t\t\tcomponentFactory,\n\t\t\tmenuDefinition\n\t\t} ) );\n\n\t\tthis.children.addMany( topLevelCategoryMenuViews );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tMenuBarBehaviors.toggleMenusAndFocusItemsOnHover( this );\n\t\tMenuBarBehaviors.closeMenusWhenTheBarCloses( this );\n\t\tMenuBarBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens( this );\n\t\tMenuBarBehaviors.focusCycleMenusOnArrows( this );\n\t\tMenuBarBehaviors.closeOnClickOutside( this );\n\t\tMenuBarBehaviors.enableFocusHighlightOnInteraction( this );\n\t}\n\n\t/**\n\t * Focuses the menu bar.\n\t */\n\tpublic focus(): void {\n\t\tif ( this.children.first ) {\n\t\t\tthis.children.first.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Closes all menus in the bar.\n\t */\n\tpublic close(): void {\n\t\tfor ( const topLevelCategoryMenuView of this.children ) {\n\t\t\ttopLevelCategoryMenuView.isOpen = false;\n\t\t}\n\n\t\t// Set isOpen synchronously to prevent deferred events (e.g. mouseenter fired by the browser\n\t\t// after DOM manipulations) from re-opening menus via `toggleMenusAndFocusItemsOnHover`.\n\t\tthis.isOpen = false;\n\t}\n\n\t/**\n\t * Disables all menus in the bar.\n\t */\n\tpublic disable(): void {\n\t\tfor ( const topLevelCategoryMenuView of this.children ) {\n\t\t\ttopLevelCategoryMenuView.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * Enables all menus in the bar.\n\t */\n\tpublic enable(): void {\n\t\tfor ( const topLevelCategoryMenuView of this.children ) {\n\t\t\ttopLevelCategoryMenuView.isEnabled = true;\n\t\t}\n\t}\n\n\t/**\n\t * Registers a menu view in the menu bar. Every {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance must be registered\n\t * in the menu bar to be properly managed.\n\t */\n\tpublic registerMenu( menuView: MenuBarMenuView, parentMenuView: MenuBarMenuView | null = null ): void {\n\t\tif ( parentMenuView ) {\n\t\t\tmenuView.delegate( ...EVENT_NAME_DELEGATES ).to( parentMenuView );\n\t\t\tmenuView.parentMenuView = parentMenuView;\n\t\t} else {\n\t\t\tmenuView.delegate( ...EVENT_NAME_DELEGATES ).to( this, name => 'menu:' + name );\n\t\t}\n\n\t\tmenuView._attachBehaviors();\n\n\t\tthis.menus.push( menuView );\n\t}\n\n\t/**\n\t * Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} based on the given definition.\n\t */\n\tprivate _createMenu( { componentFactory, menuDefinition, parentMenuView }: {\n\t\tcomponentFactory: ComponentFactory;\n\t\tmenuDefinition: MenuBarMenuDefinition;\n\t\tparentMenuView?: MenuBarMenuView;\n\t} ) {\n\t\tconst locale = this.locale!;\n\t\tconst menuView = new MenuBarMenuView( locale );\n\n\t\tthis.registerMenu( menuView, parentMenuView );\n\n\t\tmenuView.buttonView.set( {\n\t\t\tlabel: menuDefinition.label\n\t\t} );\n\n\t\t// Defer the creation of the menu structure until it gets open. This is a performance optimization\n\t\t// that shortens the time needed to create the editor.\n\t\tmenuView.once<ObservableChangeEvent<boolean>>( 'change:isOpen', () => {\n\t\t\tconst listView = new MenuBarMenuListView( locale );\n\t\t\tlistView.ariaLabel = menuDefinition.label;\n\t\t\tmenuView.panelView.children.add( listView );\n\n\t\t\tlistView.items.addMany( this._createMenuItems( { menuDefinition, parentMenuView: menuView, componentFactory } ) );\n\t\t} );\n\n\t\treturn menuView;\n\t}\n\n\t/**\n\t * Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} items based on the given definition.\n\t */\n\tprivate _createMenuItems( { menuDefinition, parentMenuView, componentFactory }: {\n\t\tmenuDefinition: MenuBarMenuDefinition;\n\t\tcomponentFactory: ComponentFactory;\n\t\tparentMenuView: MenuBarMenuView;\n\t} ): Array<MenuBarMenuListItemView | ListSeparatorView> {\n\t\tconst locale = this.locale!;\n\t\tconst items = [];\n\n\t\tfor ( const menuGroupDefinition of menuDefinition.groups ) {\n\t\t\tfor ( const itemDefinition of menuGroupDefinition.items ) {\n\t\t\t\tconst menuItemView = new MenuBarMenuListItemView( locale, parentMenuView );\n\n\t\t\t\tif ( isObject( itemDefinition ) ) {\n\t\t\t\t\tmenuItemView.children.add( this._createMenu( {\n\t\t\t\t\t\tcomponentFactory,\n\t\t\t\t\t\tmenuDefinition: itemDefinition,\n\t\t\t\t\t\tparentMenuView\n\t\t\t\t\t} ) );\n\t\t\t\t} else {\n\t\t\t\t\tconst componentView = this._createMenuItemContentFromFactory( {\n\t\t\t\t\t\tcomponentName: itemDefinition,\n\t\t\t\t\t\tcomponentFactory,\n\t\t\t\t\t\tparentMenuView\n\t\t\t\t\t} );\n\n\t\t\t\t\tif ( !componentView ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tmenuItemView.children.add( componentView );\n\t\t\t\t}\n\n\t\t\t\titems.push( menuItemView );\n\t\t\t}\n\n\t\t\t// Separate groups with a separator.\n\t\t\tif ( menuGroupDefinition !== menuDefinition.groups[ menuDefinition.groups.length - 1 ] ) {\n\t\t\t\titems.push( new ListSeparatorView( locale ) );\n\t\t\t}\n\t\t}\n\n\t\treturn items;\n\t}\n\n\t/**\n\t * Uses the component factory to create a content of the menu item (a button or a sub-menu).\n\t */\n\tprivate _createMenuItemContentFromFactory( { componentName, parentMenuView, componentFactory }: {\n\t\tcomponentName: string;\n\t\tcomponentFactory: ComponentFactory;\n\t\tparentMenuView: MenuBarMenuView;\n\t} ): MenuBarMenuView | MenuBarMenuListItemButtonView | null {\n\t\tconst componentView = componentFactory.create( componentName );\n\n\t\tif ( !(\n\t\t\tcomponentView instanceof MenuBarMenuView ||\n\t\t\tcomponentView instanceof MenuBarMenuListItemButtonView ||\n\t\t\tcomponentView instanceof MenuBarMenuListItemFileDialogButtonView\n\t\t) ) {\n\t\t\t/**\n\t\t\t * Adding unsupported components to the {@link module:ui/menubar/menubarview~MenuBarView} is not possible.\n\t\t\t *\n\t\t\t * A component should be either a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} (sub-menu) or a\n\t\t\t * {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} (button).\n\t\t\t *\n\t\t\t * @error menu-bar-component-unsupported\n\t\t\t * @param {string} componentName A name of the unsupported component used in the configuration.\n\t\t\t * @param {module:ui/view~View} componentView An unsupported component view.\n\t\t\t */\n\t\t\tlogWarning( 'menu-bar-component-unsupported', {\n\t\t\t\tcomponentName,\n\t\t\t\tcomponentView\n\t\t\t} );\n\n\t\t\treturn null;\n\t\t}\n\n\t\tthis._registerMenuTree( componentView, parentMenuView );\n\n\t\t// Close the whole menu bar when a component is executed.\n\t\tcomponentView.on( 'execute', () => {\n\t\t\tthis.close();\n\t\t} );\n\n\t\treturn componentView;\n\t}\n\n\t/**\n\t * Checks component and its children recursively and calls {@link #registerMenu}\n\t * for each item that is {@link module:ui/menubar/menubarmenuview~MenuBarMenuView}.\n\t *\n\t * @internal\n\t */\n\tprivate _registerMenuTree( componentView: MenuBarMenuView | MenuBarMenuListItemButtonView, parentMenuView: MenuBarMenuView ) {\n\t\tif ( !( componentView instanceof MenuBarMenuView ) ) {\n\t\t\tcomponentView.delegate( 'mouseenter' ).to( parentMenuView );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.registerMenu( componentView, parentMenuView );\n\n\t\tconst menuBarItemsList = componentView.panelView.children\n\t\t\t.filter( child => child instanceof MenuBarMenuListView )[ 0 ] as MenuBarMenuListView | undefined;\n\n\t\tif ( !menuBarItemsList ) {\n\t\t\tcomponentView.delegate( 'mouseenter' ).to( parentMenuView );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst nonSeparatorItems = menuBarItemsList.items.filter( item => item instanceof ListItemView ) as Array<ListItemView>;\n\n\t\tfor ( const item of nonSeparatorItems ) {\n\t\t\tthis._registerMenuTree(\n\t\t\t\titem.children.get( 0 ) as MenuBarMenuView | MenuBarMenuListItemButtonView,\n\t\t\t\tcomponentView\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Manages the state of the {@link #isOpen} property of the menu bar. Because the state is a sum of individual\n\t * top-level menus' states, it's necessary to listen to their changes and update the state accordingly.\n\t *\n\t * Additionally, it prevents from unnecessary changes of `isOpen` when one top-level menu opens and another closes\n\t * (regardless of in which order), maintaining a stable `isOpen === true` in that situation.\n\t */\n\tprivate _setupIsOpenUpdater() {\n\t\tlet closeTimeout: ReturnType<typeof setTimeout>;\n\n\t\t// TODO: This is not the prettiest approach but at least it's simple.\n\t\tthis.on<MenuBarMenuChangeIsOpenEvent>( 'menu:change:isOpen', ( evt, name, isOpen ) => {\n\t\t\tclearTimeout( closeTimeout );\n\n\t\t\tif ( isOpen ) {\n\t\t\t\tthis.isOpen = true;\n\t\t\t} else {\n\t\t\t\tcloseTimeout = setTimeout( () => {\n\t\t\t\t\tthis.isOpen = Array.from( this.children ).some( menuView => menuView.isOpen );\n\t\t\t\t}, 0 );\n\t\t\t}\n\t\t} );\n\t}\n}\n\nexport type MenuBarConfig = MenuBarConfigObject;\n\nexport type MenuBarConfigObject = {\n\titems?: Array<MenuBarMenuDefinition>;\n\tremoveItems?: Array<string>;\n\taddItems?: Array<MenuBarConfigAddedItem | MenuBarConfigAddedGroup | MenuBarConfigAddedMenu>;\n\tisVisible?: boolean;\n};\n\nexport type NormalizedMenuBarConfigObject = Required<MenuBarConfigObject> & {\n\tisUsingDefaultConfig: boolean;\n};\n\nexport type MenuBarMenuGroupDefinition = {\n\tgroupId: string;\n\titems: Array<MenuBarMenuDefinition | string>;\n};\n\nexport type MenuBarMenuDefinition = {\n\tmenuId: string;\n\tlabel: string;\n\tgroups: Array<MenuBarMenuGroupDefinition>;\n};\n\nexport type MenuBarConfigAddedPosition =\n\t`start:${ string }` | `end:${ string }` | 'start' | 'end' | `after:${ string }` | `before:${ string }`;\n\nexport type MenuBarConfigAddedItem = {\n\titem: string;\n\tposition: MenuBarConfigAddedPosition;\n};\n\nexport type MenuBarConfigAddedGroup = {\n\tgroup: MenuBarMenuGroupDefinition;\n\tposition: MenuBarConfigAddedPosition;\n};\n\nexport type MenuBarConfigAddedMenu = {\n\tmenu: MenuBarMenuDefinition;\n\tposition: MenuBarConfigAddedPosition;\n};\n\n/**\n * Any namespaced event fired by menu a {@link module:ui/menubar/menubarview~MenuBarView#menus menu view instance} of the\n * {@link module:ui/menubar/menubarview~MenuBarView menu bar}.\n */\nexport interface MenuBarMenuEvent extends BaseEvent {\n\tname: `menu:${ string }` | `menu:change:${ string }`;\n}\n\n/**\n * A `mouseenter` event originating from a {@link module:ui/menubar/menubarview~MenuBarView#menus menu view instance} of the\n * {@link module:ui/menubar/menubarview~MenuBarView menu bar}.\n */\nexport interface MenuBarMenuMouseEnterEvent extends MenuBarMenuEvent {\n\tname: 'menu:mouseenter';\n}\n\n/**\n * An `arrowleft` event originating from a {@link module:ui/menubar/menubarview~MenuBarView#menus menu view instance} of the\n * {@link module:ui/menubar/menubarview~MenuBarView menu bar}.\n */\nexport interface MenuBarMenuArrowLeftEvent extends MenuBarMenuEvent {\n\tname: 'menu:arrowleft';\n}\n\n/**\n * An `arrowright` event originating from a {@link module:ui/menubar/menubarview~MenuBarView#menus menu view instance} of the\n * {@link module:ui/menubar/menubarview~MenuBarView menu bar}.\n */\nexport interface MenuBarMenuArrowRightEvent extends MenuBarMenuEvent {\n\tname: 'menu:arrowright';\n}\n\n/**\n * A `change:isOpen` event originating from a {@link module:ui/menubar/menubarview~MenuBarView#menus menu view instance} of the\n * {@link module:ui/menubar/menubarview~MenuBarView menu bar}.\n */\nexport interface MenuBarMenuChangeIsOpenEvent extends MenuBarMenuEvent {\n\tname: 'menu:change:isOpen';\n\targs: [ name: string, value: boolean, oldValue: boolean ];\n}\n", "import { PendingActions, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { CKEditorError, Collection, ObservableMixin, logWarning, uid } from \"@ckeditor/ckeditor5-utils\";\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 upload/filereader\n*/\nconst FileReaderBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Wrapper over the native `FileReader`.\n*/\nvar FileReader = class extends FileReaderBase {\n\ttotal;\n\t/**\n\t* Instance of native FileReader.\n\t*/\n\t_reader;\n\t/**\n\t* Holds the data of an already loaded file. The file must be first loaded\n\t* by using {@link module:upload/filereader~FileReader#read `read()`}.\n\t*/\n\t_data;\n\t/**\n\t* Creates an instance of the FileReader.\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst reader = new window.FileReader();\n\t\tthis._reader = reader;\n\t\tthis._data = void 0;\n\t\tthis.set(\"loaded\", 0);\n\t\treader.onprogress = (evt) => {\n\t\t\tthis.loaded = evt.loaded;\n\t\t};\n\t}\n\t/**\n\t* Returns error that occurred during file reading.\n\t*/\n\tget error() {\n\t\treturn this._reader.error;\n\t}\n\t/**\n\t* Holds the data of an already loaded file. The file must be first loaded\n\t* by using {@link module:upload/filereader~FileReader#read `read()`}.\n\t*/\n\tget data() {\n\t\treturn this._data;\n\t}\n\t/**\n\t* Reads the provided file.\n\t*\n\t* @param file Native File object.\n\t* @returns Returns a promise that will be resolved with file's content.\n\t* The promise will be rejected in case of an error or when the reading process is aborted.\n\t*/\n\tread(file) {\n\t\tconst reader = this._reader;\n\t\tthis.total = file.size;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treader.onload = () => {\n\t\t\t\tconst result = reader.result;\n\t\t\t\tthis._data = result;\n\t\t\t\tresolve(result);\n\t\t\t};\n\t\t\treader.onerror = () => {\n\t\t\t\treject(\"error\");\n\t\t\t};\n\t\t\treader.onabort = () => {\n\t\t\t\treject(\"aborted\");\n\t\t\t};\n\t\t\tthis._reader.readAsDataURL(file);\n\t\t});\n\t}\n\t/**\n\t* Aborts file reader.\n\t*/\n\tabort() {\n\t\tthis._reader.abort();\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 upload/filerepository\n*/\nconst FileLoaderBase = /* #__PURE__ */ ObservableMixin();\n/**\n* File repository plugin. A central point for managing file upload.\n*\n* To use it, first you need an upload adapter. Upload adapter's job is to handle communication with the server\n* (sending the file and handling server's response). You can use one of the existing plugins introducing upload adapters\n* (e.g. {@link module:adapter-ckfinder/uploadadapter~CKFinderUploadAdapter}) or write your own one – see\n* the {@glink framework/deep-dive/upload-adapter Custom image upload adapter deep-dive} guide.\n*\n* Then, you can use {@link module:upload/filerepository~FileRepository#createLoader `createLoader()`} and the returned\n* {@link module:upload/filerepository~FileLoader} instance to load and upload files.\n*/\nvar FileRepository = class extends Plugin {\n\t/**\n\t* Collection of loaders associated with this repository.\n\t*/\n\tloaders = new Collection();\n\t/**\n\t* Loaders mappings used to retrieve loaders references.\n\t*/\n\t_loadersMap = /* @__PURE__ */ new Map();\n\t/**\n\t* Reference to a pending action registered in a {@link module:core/pendingactions~PendingActions} plugin\n\t* while upload is in progress. When there is no upload then value is `null`.\n\t*/\n\t_pendingAction = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FileRepository\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [PendingActions];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.loaders.on(\"change\", () => this._updatePendingAction());\n\t\tthis.set(\"uploaded\", 0);\n\t\tthis.set(\"uploadTotal\", null);\n\t\tthis.bind(\"uploadedPercent\").to(this, \"uploaded\", this, \"uploadTotal\", (uploaded, total) => {\n\t\t\treturn total ? uploaded / total * 100 : 0;\n\t\t});\n\t}\n\t/**\n\t* Returns the loader associated with specified file or promise.\n\t*\n\t* To get loader by id use `fileRepository.loaders.get( id )`.\n\t*\n\t* @param fileOrPromise Native file or promise handle.\n\t*/\n\tgetLoader(fileOrPromise) {\n\t\treturn this._loadersMap.get(fileOrPromise) || null;\n\t}\n\t/**\n\t* Creates a loader instance for the given file.\n\t*\n\t* Requires {@link #createUploadAdapter} factory to be defined.\n\t*\n\t* @param fileOrPromise Native File object or native Promise object which resolves to a File.\n\t*/\n\tcreateLoader(fileOrPromise) {\n\t\tif (!this.createUploadAdapter) {\n\t\t\t/**\n\t\t\t* You need to enable an upload adapter in order to be able to upload files.\n\t\t\t*\n\t\t\t* This warning shows up when {@link module:upload/filerepository~FileRepository} is being used\n\t\t\t* without {@link module:upload/filerepository~FileRepository#createUploadAdapter defining an upload adapter}.\n\t\t\t*\n\t\t\t* **If you see this warning when using one of the now deprecated CKEditor 5 builds**\n\t\t\t* it means that you did not configure any of the upload adapters available by default in those builds.\n\t\t\t*\n\t\t\t* Predefined builds are a deprecated solution and we strongly advise\n\t\t\t* {@glink updating/nim-migration/migration-to-new-installation-methods migrating to new installation methods}.\n\t\t\t*\n\t\t\t* See the {@glink features/images/image-upload/image-upload comprehensive \"Image upload overview\"} to learn which upload\n\t\t\t* adapters are available in the builds and how to configure them.\n\t\t\t*\n\t\t\t* Otherwise, if you see this warning, there is a chance that you enabled\n\t\t\t* a feature like {@link module:image/imageupload~ImageUpload},\n\t\t\t* or {@link module:image/imageupload/imageuploadui~ImageUploadUI} but you did not enable any upload adapter.\n\t\t\t* You can choose one of the existing upload adapters listed in the\n\t\t\t* {@glink features/images/image-upload/image-upload \"Image upload overview\"}.\n\t\t\t*\n\t\t\t* You can also implement your {@glink framework/deep-dive/upload-adapter own image upload adapter}.\n\t\t\t*\n\t\t\t* @error filerepository-no-upload-adapter\n\t\t\t*/\n\t\t\tlogWarning(\"filerepository-no-upload-adapter\");\n\t\t\treturn null;\n\t\t}\n\t\tconst loader = new FileLoader(Promise.resolve(fileOrPromise), this.createUploadAdapter);\n\t\tthis.loaders.add(loader);\n\t\tthis._loadersMap.set(fileOrPromise, loader);\n\t\tif (fileOrPromise instanceof Promise) loader.file.then((file) => {\n\t\t\tthis._loadersMap.set(file, loader);\n\t\t}).catch(() => {});\n\t\tloader.on(\"change:uploaded\", () => {\n\t\t\tlet aggregatedUploaded = 0;\n\t\t\tfor (const loader of this.loaders) aggregatedUploaded += loader.uploaded;\n\t\t\tthis.uploaded = aggregatedUploaded;\n\t\t});\n\t\tloader.on(\"change:uploadTotal\", () => {\n\t\t\tlet aggregatedTotal = 0;\n\t\t\tfor (const loader of this.loaders) if (loader.uploadTotal) aggregatedTotal += loader.uploadTotal;\n\t\t\tthis.uploadTotal = aggregatedTotal;\n\t\t});\n\t\treturn loader;\n\t}\n\t/**\n\t* Destroys the given loader.\n\t*\n\t* @param fileOrPromiseOrLoader File or Promise associated with that loader or loader itself.\n\t*/\n\tdestroyLoader(fileOrPromiseOrLoader) {\n\t\tconst loader = fileOrPromiseOrLoader instanceof FileLoader ? fileOrPromiseOrLoader : this.getLoader(fileOrPromiseOrLoader);\n\t\tloader._destroy();\n\t\tthis.loaders.remove(loader);\n\t\tthis._loadersMap.forEach((value, key) => {\n\t\t\tif (value === loader) this._loadersMap.delete(key);\n\t\t});\n\t}\n\t/**\n\t* Registers or deregisters pending action bound with upload progress.\n\t*/\n\t_updatePendingAction() {\n\t\tconst pendingActions = this.editor.plugins.get(PendingActions);\n\t\tif (this.loaders.length) {\n\t\t\tif (!this._pendingAction) {\n\t\t\t\tconst t = this.editor.t;\n\t\t\t\tconst getMessage = (value) => `${t(\"Upload in progress\")} ${parseInt(value)}%.`;\n\t\t\t\tthis._pendingAction = pendingActions.add(getMessage(this.uploadedPercent));\n\t\t\t\tthis._pendingAction.bind(\"message\").to(this, \"uploadedPercent\", getMessage);\n\t\t\t}\n\t\t} else {\n\t\t\tpendingActions.remove(this._pendingAction);\n\t\t\tthis._pendingAction = null;\n\t\t}\n\t}\n};\n/**\n* File loader class.\n*\n* It is used to control the process of reading the file and uploading it using the specified upload adapter.\n*/\nvar FileLoader = class extends FileLoaderBase {\n\t/**\n\t* Unique id of FileLoader instance.\n\t*\n\t* @readonly\n\t*/\n\tid;\n\t/**\n\t* Additional wrapper over the initial file promise passed to this loader.\n\t*/\n\t_filePromiseWrapper;\n\t/**\n\t* Adapter instance associated with this file loader.\n\t*/\n\t_adapter;\n\t/**\n\t* FileReader used by FileLoader.\n\t*/\n\t_reader;\n\t/**\n\t* Creates a new instance of `FileLoader`.\n\t*\n\t* @param filePromise A promise which resolves to a file instance.\n\t* @param uploadAdapterCreator The function which returns {@link module:upload/filerepository~UploadAdapter} instance.\n\t*/\n\tconstructor(filePromise, uploadAdapterCreator) {\n\t\tsuper();\n\t\tthis.id = uid();\n\t\tthis._filePromiseWrapper = this._createFilePromiseWrapper(filePromise);\n\t\tthis._adapter = uploadAdapterCreator(this);\n\t\tthis._reader = new FileReader();\n\t\tthis.set(\"status\", \"idle\");\n\t\tthis.set(\"uploaded\", 0);\n\t\tthis.set(\"uploadTotal\", null);\n\t\tthis.bind(\"uploadedPercent\").to(this, \"uploaded\", this, \"uploadTotal\", (uploaded, total) => {\n\t\t\treturn total ? uploaded / total * 100 : 0;\n\t\t});\n\t\tthis.set(\"uploadResponse\", null);\n\t}\n\t/**\n\t* A `Promise` which resolves to a `File` instance associated with this file loader.\n\t*/\n\tget file() {\n\t\tif (!this._filePromiseWrapper) return Promise.resolve(null);\n\t\telse return this._filePromiseWrapper.promise.then((file) => this._filePromiseWrapper ? file : null);\n\t}\n\t/**\n\t* Returns the file data. To read its data, you need for first load the file\n\t* by using the {@link module:upload/filerepository~FileLoader#read `read()`} method.\n\t*/\n\tget data() {\n\t\treturn this._reader.data;\n\t}\n\t/**\n\t* Reads file using {@link module:upload/filereader~FileReader}.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `filerepository-read-wrong-status` when status\n\t* is different than `idle`.\n\t*\n\t* Example usage:\n\t*\n\t* ```ts\n\t* fileLoader.read()\n\t* \t.then( data => { ... } )\n\t* \t.catch( err => {\n\t* \t\tif ( err === 'aborted' ) {\n\t* \t\t\tconsole.log( 'Reading aborted.' );\n\t* \t\t} else {\n\t* \t\t\tconsole.log( 'Reading error.', err );\n\t* \t\t}\n\t* \t} );\n\t* ```\n\t*\n\t* @returns Returns promise that will be resolved with read data. Promise will be rejected if error\n\t* occurs or if read process is aborted.\n\t*/\n\tread() {\n\t\tif (this.status != \"idle\")\n /**\n\t\t* You cannot call read if the status is different than idle.\n\t\t*\n\t\t* @error filerepository-read-wrong-status\n\t\t*/\n\t\tthrow new CKEditorError(\"filerepository-read-wrong-status\", this);\n\t\tthis.status = \"reading\";\n\t\treturn this.file.then((file) => this._reader.read(file)).then((data) => {\n\t\t\tif (this.status !== \"reading\") throw this.status;\n\t\t\tthis.status = \"idle\";\n\t\t\treturn data;\n\t\t}).catch((err) => {\n\t\t\tif (err === \"aborted\") {\n\t\t\t\tthis.status = \"aborted\";\n\t\t\t\tthrow \"aborted\";\n\t\t\t}\n\t\t\tthis.status = \"error\";\n\t\t\tthrow this._reader.error ? this._reader.error : err;\n\t\t});\n\t}\n\t/**\n\t* Reads file using the provided {@link module:upload/filerepository~UploadAdapter}.\n\t*\n\t* Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `filerepository-upload-wrong-status` when status\n\t* is different than `idle`.\n\t* Example usage:\n\t*\n\t* ```ts\n\t* fileLoader.upload()\n\t* \t.then( data => { ... } )\n\t* \t.catch( e => {\n\t* \t\tif ( e === 'aborted' ) {\n\t* \t\t\tconsole.log( 'Uploading aborted.' );\n\t* \t\t} else {\n\t* \t\t\tconsole.log( 'Uploading error.', e );\n\t* \t\t}\n\t* \t} );\n\t* ```\n\t*\n\t* @returns Returns promise that will be resolved with response data. Promise will be rejected if error\n\t* occurs or if read process is aborted.\n\t*/\n\tupload() {\n\t\tif (this.status != \"idle\")\n /**\n\t\t* You cannot call upload if the status is different than idle.\n\t\t*\n\t\t* @error filerepository-upload-wrong-status\n\t\t*/\n\t\tthrow new CKEditorError(\"filerepository-upload-wrong-status\", this);\n\t\tthis.status = \"uploading\";\n\t\treturn this.file.then(() => this._adapter.upload()).then((data) => {\n\t\t\tthis.uploadResponse = data;\n\t\t\tthis.status = \"idle\";\n\t\t\treturn data;\n\t\t}).catch((err) => {\n\t\t\tif (this.status === \"aborted\") throw \"aborted\";\n\t\t\tthis.status = \"error\";\n\t\t\tthrow err;\n\t\t});\n\t}\n\t/**\n\t* Aborts loading process.\n\t*/\n\tabort() {\n\t\tconst status = this.status;\n\t\tthis.status = \"aborted\";\n\t\tif (!this._filePromiseWrapper.isFulfilled) {\n\t\t\tthis._filePromiseWrapper.promise.catch(() => {});\n\t\t\tthis._filePromiseWrapper.rejecter(\"aborted\");\n\t\t} else if (status == \"reading\") this._reader.abort();\n\t\telse if (status == \"uploading\" && this._adapter.abort) this._adapter.abort();\n\t\tthis._destroy();\n\t}\n\t/**\n\t* Performs cleanup.\n\t*\n\t* @internal\n\t*/\n\t_destroy() {\n\t\tthis._filePromiseWrapper = void 0;\n\t\tthis._reader = void 0;\n\t\tthis._adapter = void 0;\n\t\tthis.uploadResponse = void 0;\n\t}\n\t/**\n\t* Wraps a given file promise into another promise giving additional\n\t* control (resolving, rejecting, checking if fulfilled) over it.\n\t*\n\t* @param filePromise The initial file promise to be wrapped.\n\t*/\n\t_createFilePromiseWrapper(filePromise) {\n\t\tconst wrapper = {};\n\t\twrapper.promise = new Promise((resolve, reject) => {\n\t\t\twrapper.rejecter = reject;\n\t\t\twrapper.isFulfilled = false;\n\t\t\tfilePromise.then((file) => {\n\t\t\t\twrapper.isFulfilled = true;\n\t\t\t\tresolve(file);\n\t\t\t}).catch((err) => {\n\t\t\t\twrapper.isFulfilled = true;\n\t\t\t\treject(err);\n\t\t\t});\n\t\t});\n\t\treturn wrapper;\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 upload/adapters/base64uploadadapter\n*/\n/**\n* A plugin that converts images inserted into the editor into [Base64 strings](https://en.wikipedia.org/wiki/Base64)\n* in the {@glink getting-started/setup/getting-and-setting-data editor output}.\n*\n* This kind of image upload does not require server processing – images are stored with the rest of the text and\n* displayed by the web browser without additional requests.\n*\n* Check out the {@glink features/images/image-upload/image-upload comprehensive \"Image upload overview\"} to learn about\n* other ways to upload images into CKEditor 5.\n*/\nvar Base64UploadAdapter = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [FileRepository];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Base64UploadAdapter\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"B64A\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.editor.plugins.get(FileRepository).createUploadAdapter = (loader) => new Adapter$1(loader);\n\t}\n};\n/**\n* The upload adapter that converts images inserted into the editor into Base64 strings.\n*/\nvar Adapter$1 = class {\n\t/**\n\t* `FileLoader` instance to use during the upload.\n\t*/\n\tloader;\n\treader;\n\t/**\n\t* Creates a new adapter instance.\n\t*/\n\tconstructor(loader) {\n\t\tthis.loader = loader;\n\t}\n\t/**\n\t* Starts the upload process.\n\t*\n\t* @see module:upload/filerepository~UploadAdapter#upload\n\t*/\n\tupload() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst reader = this.reader = new window.FileReader();\n\t\t\treader.addEventListener(\"load\", () => {\n\t\t\t\tresolve({ default: reader.result });\n\t\t\t});\n\t\t\treader.addEventListener(\"error\", (err) => {\n\t\t\t\treject(err);\n\t\t\t});\n\t\t\treader.addEventListener(\"abort\", () => {\n\t\t\t\treject();\n\t\t\t});\n\t\t\tthis.loader.file.then((file) => {\n\t\t\t\treader.readAsDataURL(file);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Aborts the upload process.\n\t*\n\t* @see module:upload/filerepository~UploadAdapter#abort\n\t*/\n\tabort() {\n\t\tthis.reader.abort();\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 upload/adapters/simpleuploadadapter\n*/\n/**\n* The Simple upload adapter allows uploading images to an application running on your server using\n* the [`XMLHttpRequest`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) API with a\n* minimal {@link module:upload/uploadconfig~SimpleUploadConfig editor configuration}.\n*\n* ```ts\n* ClassicEditor\n* \t.create( {\n* \t\tsimpleUpload: {\n* \t\t\tuploadUrl: 'http://example.com',\n* \t\t\theaders: {\n* \t\t\t\t...\n* \t\t\t}\n* \t\t}\n* \t} )\n* \t.then( ... )\n* \t.catch( ... );\n* ```\n*\n* See the {@glink features/images/image-upload/simple-upload-adapter \"Simple upload adapter\"} guide to learn how to\n* learn more about the feature (configuration, server–side requirements, etc.).\n*\n* Check out the {@glink features/images/image-upload/image-upload comprehensive \"Image upload overview\"} to learn about\n* other ways to upload images into CKEditor 5.\n*/\nvar SimpleUploadAdapter = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [FileRepository];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SimpleUploadAdapter\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"SUA\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst options = this.editor.config.get(\"simpleUpload\");\n\t\tif (!options) return;\n\t\tif (!options.uploadUrl) {\n\t\t\t/**\n\t\t\t* The {@link module:upload/uploadconfig~SimpleUploadConfig#uploadUrl `config.simpleUpload.uploadUrl`}\n\t\t\t* configuration required by the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadAdapter `SimpleUploadAdapter`}\n\t\t\t* is missing. Make sure the correct URL is specified for the image upload to work properly.\n\t\t\t*\n\t\t\t* @error simple-upload-adapter-missing-uploadurl\n\t\t\t*/\n\t\t\tlogWarning(\"simple-upload-adapter-missing-uploadurl\");\n\t\t\treturn;\n\t\t}\n\t\tthis.editor.plugins.get(FileRepository).createUploadAdapter = (loader) => {\n\t\t\treturn new Adapter(loader, options);\n\t\t};\n\t}\n};\n/**\n* Upload adapter.\n*/\nvar Adapter = class {\n\t/**\n\t* FileLoader instance to use during the upload.\n\t*/\n\tloader;\n\t/**\n\t* The configuration of the adapter.\n\t*/\n\toptions;\n\txhr;\n\t/**\n\t* Creates a new adapter instance.\n\t*/\n\tconstructor(loader, options) {\n\t\tthis.loader = loader;\n\t\tthis.options = options;\n\t}\n\t/**\n\t* Starts the upload process.\n\t*\n\t* @see module:upload/filerepository~UploadAdapter#upload\n\t*/\n\tupload() {\n\t\treturn this.loader.file.then((file) => new Promise((resolve, reject) => {\n\t\t\tthis._initRequest();\n\t\t\tthis._initListeners(resolve, reject, file);\n\t\t\tthis._sendRequest(file);\n\t\t}));\n\t}\n\t/**\n\t* Aborts the upload process.\n\t*\n\t* @see module:upload/filerepository~UploadAdapter#abort\n\t*/\n\tabort() {\n\t\tif (this.xhr) this.xhr.abort();\n\t}\n\t/**\n\t* Initializes the `XMLHttpRequest` object using the URL specified as\n\t* {@link module:upload/uploadconfig~SimpleUploadConfig#uploadUrl `simpleUpload.uploadUrl`} in the editor's\n\t* configuration.\n\t*/\n\t_initRequest() {\n\t\tconst xhr = this.xhr = new XMLHttpRequest();\n\t\txhr.open(\"POST\", this.options.uploadUrl, true);\n\t\txhr.responseType = \"json\";\n\t}\n\t/**\n\t* Initializes XMLHttpRequest listeners\n\t*\n\t* @param resolve Callback function to be called when the request is successful.\n\t* @param reject Callback function to be called when the request cannot be completed.\n\t* @param file Native File object.\n\t*/\n\t_initListeners(resolve, reject, file) {\n\t\tconst xhr = this.xhr;\n\t\tconst loader = this.loader;\n\t\tconst genericErrorText = `Couldn't upload file: ${file.name}.`;\n\t\txhr.addEventListener(\"error\", () => reject(genericErrorText));\n\t\txhr.addEventListener(\"abort\", () => reject());\n\t\txhr.addEventListener(\"load\", () => {\n\t\t\tconst response = xhr.response;\n\t\t\tif (!response || response.error) return reject(response && response.error && response.error.message ? response.error.message : genericErrorText);\n\t\t\tconst urls = response.url ? { default: response.url } : response.urls;\n\t\t\tresolve({\n\t\t\t\t...response,\n\t\t\t\turls\n\t\t\t});\n\t\t});\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (xhr.upload) xhr.upload.addEventListener(\"progress\", (evt) => {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (evt.lengthComputable) {\n\t\t\t\tloader.uploadTotal = evt.total;\n\t\t\t\tloader.uploaded = evt.loaded;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Prepares the data and sends the request.\n\t*\n\t* @param file File instance to be uploaded.\n\t*/\n\t_sendRequest(file) {\n\t\tlet headers = this.options.headers || {};\n\t\tif (typeof headers === \"function\") headers = headers(file);\n\t\tconst withCredentials = this.options.withCredentials || false;\n\t\tfor (const headerName of Object.keys(headers)) this.xhr.setRequestHeader(headerName, headers[headerName]);\n\t\tthis.xhr.withCredentials = withCredentials;\n\t\tconst data = new FormData();\n\t\tdata.append(\"upload\", file);\n\t\tthis.xhr.send(data);\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 { Base64UploadAdapter, FileLoader, FileReader, FileRepository, SimpleUploadAdapter };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module upload/filereader\n */\n\nimport { ObservableMixin, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\ntype DomFileReader = globalThis.FileReader;\n\nconst FileReaderBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Wrapper over the native `FileReader`.\n */\nexport class FileReader extends FileReaderBase {\n\tpublic total!: number;\n\n\t/**\n\t * Instance of native FileReader.\n\t */\n\tprivate readonly _reader: DomFileReader;\n\n\t/**\n\t * Holds the data of an already loaded file. The file must be first loaded\n\t * by using {@link module:upload/filereader~FileReader#read `read()`}.\n\t */\n\tprivate _data?: string;\n\n\t/**\n\t * Number of bytes loaded.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public loaded: number;\n\n\t/**\n\t * Creates an instance of the FileReader.\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst reader = new window.FileReader();\n\n\t\tthis._reader = reader;\n\t\tthis._data = undefined;\n\n\t\tthis.set( 'loaded', 0 );\n\n\t\treader.onprogress = evt => {\n\t\t\tthis.loaded = evt.loaded;\n\t\t};\n\t}\n\n\t/**\n\t * Returns error that occurred during file reading.\n\t */\n\tpublic get error(): DOMException | null {\n\t\treturn this._reader.error;\n\t}\n\n\t/**\n\t * Holds the data of an already loaded file. The file must be first loaded\n\t * by using {@link module:upload/filereader~FileReader#read `read()`}.\n\t */\n\tpublic get data(): string | undefined {\n\t\treturn this._data;\n\t}\n\n\t/**\n\t * Reads the provided file.\n\t *\n\t * @param file Native File object.\n\t * @returns Returns a promise that will be resolved with file's content.\n\t * The promise will be rejected in case of an error or when the reading process is aborted.\n\t */\n\tpublic read( file: File ): Promise<string> {\n\t\tconst reader = this._reader;\n\t\tthis.total = file.size;\n\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\treader.onload = () => {\n\t\t\t\tconst result = reader.result as string;\n\n\t\t\t\tthis._data = result;\n\n\t\t\t\tresolve( result );\n\t\t\t};\n\n\t\t\treader.onerror = () => {\n\t\t\t\treject( 'error' );\n\t\t\t};\n\n\t\t\treader.onabort = () => {\n\t\t\t\treject( 'aborted' );\n\t\t\t};\n\n\t\t\tthis._reader.readAsDataURL( file );\n\t\t} );\n\t}\n\n\t/**\n\t * Aborts file reader.\n\t */\n\tpublic abort(): void {\n\t\tthis._reader.abort();\n\t}\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/**\n * @module upload/filerepository\n */\n\nimport { Plugin, PendingActions, type PendingAction, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tCKEditorError,\n\tCollection,\n\tObservableMixin,\n\tlogWarning,\n\tuid,\n\ttype ObservableChangeEvent,\n\ttype CollectionChangeEvent,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { FileReader } from './filereader.js';\n\nconst FileLoaderBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * File repository plugin. A central point for managing file upload.\n *\n * To use it, first you need an upload adapter. Upload adapter's job is to handle communication with the server\n * (sending the file and handling server's response). You can use one of the existing plugins introducing upload adapters\n * (e.g. {@link module:adapter-ckfinder/uploadadapter~CKFinderUploadAdapter}) or write your own one – see\n * the {@glink framework/deep-dive/upload-adapter Custom image upload adapter deep-dive} guide.\n *\n * Then, you can use {@link module:upload/filerepository~FileRepository#createLoader `createLoader()`} and the returned\n * {@link module:upload/filerepository~FileLoader} instance to load and upload files.\n */\nexport class FileRepository extends Plugin {\n\t/**\n\t * Collection of loaders associated with this repository.\n\t */\n\tpublic loaders: Collection<FileLoader> = new Collection<FileLoader>();\n\n\t/**\n\t * A factory function which should be defined before using `FileRepository`.\n\t *\n\t * It should return a new instance of {@link module:upload/filerepository~UploadAdapter} that will be used to upload files.\n\t * {@link module:upload/filerepository~FileLoader} instance associated with the adapter\n\t * will be passed to that function.\n\t *\n\t * For more information and example see {@link module:upload/filerepository~UploadAdapter}.\n\t */\n\tpublic declare createUploadAdapter?: ( loader: FileLoader ) => UploadAdapter;\n\n\t/**\n\t * Loaders mappings used to retrieve loaders references.\n\t */\n\tprivate _loadersMap = new Map<File | Promise<File>, FileLoader>();\n\n\t/**\n\t * Reference to a pending action registered in a {@link module:core/pendingactions~PendingActions} plugin\n\t * while upload is in progress. When there is no upload then value is `null`.\n\t */\n\tprivate _pendingAction: PendingAction | null = null;\n\n\t/**\n\t * Number of bytes uploaded.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public uploaded: number;\n\n\t/**\n\t * Number of total bytes to upload.\n\t *\n\t * It might be different than the file size because of headers and additional data.\n\t * It contains `null` if value is not available yet, so it's better to use {@link #uploadedPercent} to monitor\n\t * the progress.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public uploadTotal: number | null;\n\n\t/**\n\t * Upload progress in percents.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public uploadedPercent: number;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FileRepository' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ PendingActions ]> {\n\t\treturn [ PendingActions ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\t// Keeps upload in a sync with pending actions.\n\t\tthis.loaders.on<CollectionChangeEvent>( 'change', () => this._updatePendingAction() );\n\n\t\tthis.set( 'uploaded', 0 );\n\t\tthis.set( 'uploadTotal', null );\n\n\t\tthis.bind( 'uploadedPercent' ).to( this, 'uploaded', this, 'uploadTotal', ( uploaded, total ) => {\n\t\t\treturn total ? ( uploaded / total * 100 ) : 0;\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the loader associated with specified file or promise.\n\t *\n\t * To get loader by id use `fileRepository.loaders.get( id )`.\n\t *\n\t * @param fileOrPromise Native file or promise handle.\n\t */\n\tpublic getLoader( fileOrPromise: File | Promise<File> ): FileLoader | null {\n\t\treturn this._loadersMap.get( fileOrPromise ) || null;\n\t}\n\n\t/**\n\t * Creates a loader instance for the given file.\n\t *\n\t * Requires {@link #createUploadAdapter} factory to be defined.\n\t *\n\t * @param fileOrPromise Native File object or native Promise object which resolves to a File.\n\t */\n\tpublic createLoader( fileOrPromise: File | Promise<File> ): FileLoader | null {\n\t\tif ( !this.createUploadAdapter ) {\n\t\t\t/**\n\t\t\t * You need to enable an upload adapter in order to be able to upload files.\n\t\t\t *\n\t\t\t * This warning shows up when {@link module:upload/filerepository~FileRepository} is being used\n\t\t\t * without {@link module:upload/filerepository~FileRepository#createUploadAdapter defining an upload adapter}.\n\t\t\t *\n\t\t\t * **If you see this warning when using one of the now deprecated CKEditor 5 builds**\n\t\t\t * it means that you did not configure any of the upload adapters available by default in those builds.\n\t\t\t *\n\t\t\t * Predefined builds are a deprecated solution and we strongly advise\n\t\t\t * {@glink updating/nim-migration/migration-to-new-installation-methods migrating to new installation methods}.\n\t\t\t *\n\t\t\t * See the {@glink features/images/image-upload/image-upload comprehensive \"Image upload overview\"} to learn which upload\n\t\t\t * adapters are available in the builds and how to configure them.\n\t\t\t *\n\t\t\t * Otherwise, if you see this warning, there is a chance that you enabled\n\t\t\t * a feature like {@link module:image/imageupload~ImageUpload},\n\t\t\t * or {@link module:image/imageupload/imageuploadui~ImageUploadUI} but you did not enable any upload adapter.\n\t\t\t * You can choose one of the existing upload adapters listed in the\n\t\t\t * {@glink features/images/image-upload/image-upload \"Image upload overview\"}.\n\t\t\t *\n\t\t\t * You can also implement your {@glink framework/deep-dive/upload-adapter own image upload adapter}.\n\t\t\t *\n\t\t\t * @error filerepository-no-upload-adapter\n\t\t\t */\n\t\t\tlogWarning( 'filerepository-no-upload-adapter' );\n\n\t\t\treturn null;\n\t\t}\n\n\t\tconst loader = new FileLoader( Promise.resolve( fileOrPromise ), this.createUploadAdapter );\n\n\t\tthis.loaders.add( loader );\n\t\tthis._loadersMap.set( fileOrPromise, loader );\n\n\t\t// Store also file => loader mapping so loader can be retrieved by file instance returned upon Promise resolution.\n\t\tif ( fileOrPromise instanceof Promise ) {\n\t\t\tloader.file\n\t\t\t\t.then( file => {\n\t\t\t\t\tthis._loadersMap.set( file!, loader );\n\t\t\t\t} )\n\t\t\t\t// Every then() must have a catch().\n\t\t\t\t// File loader state (and rejections) are handled in read() and upload().\n\t\t\t\t// Also, see the \"does not swallow the file promise rejection\" test.\n\t\t\t\t.catch( () => {} );\n\t\t}\n\n\t\tloader.on<ObservableChangeEvent>( 'change:uploaded', () => {\n\t\t\tlet aggregatedUploaded = 0;\n\n\t\t\tfor ( const loader of this.loaders ) {\n\t\t\t\taggregatedUploaded += loader.uploaded;\n\t\t\t}\n\n\t\t\tthis.uploaded = aggregatedUploaded;\n\t\t} );\n\n\t\tloader.on<ObservableChangeEvent>( 'change:uploadTotal', () => {\n\t\t\tlet aggregatedTotal = 0;\n\n\t\t\tfor ( const loader of this.loaders ) {\n\t\t\t\tif ( loader.uploadTotal ) {\n\t\t\t\t\taggregatedTotal += loader.uploadTotal;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.uploadTotal = aggregatedTotal;\n\t\t} );\n\n\t\treturn loader;\n\t}\n\n\t/**\n\t * Destroys the given loader.\n\t *\n\t * @param fileOrPromiseOrLoader File or Promise associated with that loader or loader itself.\n\t */\n\tpublic destroyLoader( fileOrPromiseOrLoader: File | Promise<File> | FileLoader ): void {\n\t\tconst loader = fileOrPromiseOrLoader instanceof FileLoader ? fileOrPromiseOrLoader : this.getLoader( fileOrPromiseOrLoader )!;\n\n\t\tloader._destroy();\n\n\t\tthis.loaders.remove( loader );\n\n\t\tthis._loadersMap.forEach( ( value, key ) => {\n\t\t\tif ( value === loader ) {\n\t\t\t\tthis._loadersMap.delete( key );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Registers or deregisters pending action bound with upload progress.\n\t */\n\tprivate _updatePendingAction(): void {\n\t\tconst pendingActions = this.editor.plugins.get( PendingActions );\n\n\t\tif ( this.loaders.length ) {\n\t\t\tif ( !this._pendingAction ) {\n\t\t\t\tconst t = this.editor.t;\n\t\t\t\tconst getMessage = ( value: number ) => `${ t( 'Upload in progress' ) } ${ parseInt( value as any ) }%.`;\n\n\t\t\t\tthis._pendingAction = pendingActions.add( getMessage( this.uploadedPercent ) );\n\t\t\t\tthis._pendingAction.bind( 'message' ).to( this, 'uploadedPercent', getMessage );\n\t\t\t}\n\t\t} else {\n\t\t\tpendingActions.remove( this._pendingAction! );\n\t\t\tthis._pendingAction = null;\n\t\t}\n\t}\n}\n\n/**\n * File loader class.\n *\n * It is used to control the process of reading the file and uploading it using the specified upload adapter.\n */\nclass FileLoader extends FileLoaderBase {\n\t/**\n\t * Unique id of FileLoader instance.\n\t *\n\t * @readonly\n\t */\n\tpublic readonly id: string;\n\n\t/**\n\t * Additional wrapper over the initial file promise passed to this loader.\n\t */\n\tprivate _filePromiseWrapper: FilePromiseWrapper;\n\n\t/**\n\t * Adapter instance associated with this file loader.\n\t */\n\tprivate _adapter: UploadAdapter;\n\n\t/**\n\t * FileReader used by FileLoader.\n\t */\n\tprivate _reader: FileReader;\n\n\t/**\n\t * Current status of FileLoader. It can be one of the following:\n\t *\n\t * * 'idle',\n\t * * 'reading',\n\t * * 'uploading',\n\t * * 'aborted',\n\t * * 'error'.\n\t *\n\t * When reading status can change in a following way:\n\t *\n\t * `idle` -> `reading` -> `idle`\n\t * `idle` -> `reading -> `aborted`\n\t * `idle` -> `reading -> `error`\n\t *\n\t * When uploading status can change in a following way:\n\t *\n\t * `idle` -> `uploading` -> `idle`\n\t * `idle` -> `uploading` -> `aborted`\n\t * `idle` -> `uploading` -> `error`\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public status: 'idle' | 'reading' | 'uploading' | 'aborted' | 'error';\n\n\t/**\n\t * Number of bytes uploaded.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public uploaded: number;\n\n\t/**\n\t * Number of total bytes to upload.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public uploadTotal: number | null;\n\n\t/**\n\t * Upload progress in percents.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public uploadedPercent: number;\n\n\t/**\n\t * Response of the upload.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public uploadResponse?: UploadResponse | null;\n\n\t/**\n\t * Creates a new instance of `FileLoader`.\n\t *\n\t * @param filePromise A promise which resolves to a file instance.\n\t * @param uploadAdapterCreator The function which returns {@link module:upload/filerepository~UploadAdapter} instance.\n\t */\n\tconstructor( filePromise: Promise<File>, uploadAdapterCreator: ( loader: FileLoader ) => UploadAdapter ) {\n\t\tsuper();\n\n\t\tthis.id = uid();\n\t\tthis._filePromiseWrapper = this._createFilePromiseWrapper( filePromise );\n\t\tthis._adapter = uploadAdapterCreator( this );\n\t\tthis._reader = new FileReader();\n\n\t\tthis.set( 'status', 'idle' );\n\t\tthis.set( 'uploaded', 0 );\n\t\tthis.set( 'uploadTotal', null );\n\n\t\tthis.bind( 'uploadedPercent' ).to( this, 'uploaded', this, 'uploadTotal', ( uploaded, total ) => {\n\t\t\treturn total ? ( uploaded / total * 100 ) : 0;\n\t\t} );\n\n\t\tthis.set( 'uploadResponse', null );\n\t}\n\n\t/**\n\t * A `Promise` which resolves to a `File` instance associated with this file loader.\n\t */\n\tpublic get file(): Promise<File | null> {\n\t\tif ( !this._filePromiseWrapper ) {\n\t\t\t// Loader was destroyed, return promise which resolves to null.\n\t\t\treturn Promise.resolve( null );\n\t\t} else {\n\t\t\t// The `this._filePromiseWrapper.promise` is chained and not simply returned to handle a case when:\n\t\t\t//\n\t\t\t//\t\t* The `loader.file.then( ... )` is called by external code (returned promise is pending).\n\t\t\t//\t\t* Then `loader._destroy()` is called (call is synchronous) which destroys the `loader`.\n\t\t\t//\t\t* Promise returned by the first `loader.file.then( ... )` call is resolved.\n\t\t\t//\n\t\t\t// Returning `this._filePromiseWrapper.promise` will still resolve to a `File` instance so there\n\t\t\t// is an additional check needed in the chain to see if `loader` was destroyed in the meantime.\n\t\t\treturn this._filePromiseWrapper.promise.then( file => this._filePromiseWrapper ? file : null );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the file data. To read its data, you need for first load the file\n\t * by using the {@link module:upload/filerepository~FileLoader#read `read()`} method.\n\t */\n\tpublic get data(): string | undefined {\n\t\treturn this._reader.data;\n\t}\n\n\t/**\n\t * Reads file using {@link module:upload/filereader~FileReader}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `filerepository-read-wrong-status` when status\n\t * is different than `idle`.\n\t *\n\t * Example usage:\n\t *\n\t * ```ts\n\t * fileLoader.read()\n\t * \t.then( data => { ... } )\n\t * \t.catch( err => {\n\t * \t\tif ( err === 'aborted' ) {\n\t * \t\t\tconsole.log( 'Reading aborted.' );\n\t * \t\t} else {\n\t * \t\t\tconsole.log( 'Reading error.', err );\n\t * \t\t}\n\t * \t} );\n\t * ```\n\t *\n\t * @returns Returns promise that will be resolved with read data. Promise will be rejected if error\n\t * occurs or if read process is aborted.\n\t */\n\tpublic read(): Promise<string> {\n\t\tif ( this.status != 'idle' ) {\n\t\t\t/**\n\t\t\t * You cannot call read if the status is different than idle.\n\t\t\t *\n\t\t\t * @error filerepository-read-wrong-status\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'filerepository-read-wrong-status', this );\n\t\t}\n\n\t\tthis.status = 'reading';\n\n\t\treturn this.file\n\t\t\t.then( file => this._reader.read( file! ) )\n\t\t\t.then( data => {\n\t\t\t\t// Edge case: reader was aborted after file was read - double check for proper status.\n\t\t\t\t// It can happen when image was deleted during its upload.\n\t\t\t\tif ( this.status !== 'reading' ) {\n\t\t\t\t\tthrow this.status;\n\t\t\t\t}\n\n\t\t\t\tthis.status = 'idle';\n\n\t\t\t\treturn data;\n\t\t\t} )\n\t\t\t.catch( err => {\n\t\t\t\tif ( err === 'aborted' ) {\n\t\t\t\t\tthis.status = 'aborted';\n\t\t\t\t\tthrow 'aborted';\n\t\t\t\t}\n\n\t\t\t\tthis.status = 'error';\n\t\t\t\tthrow this._reader.error ? this._reader.error : err;\n\t\t\t} );\n\t}\n\n\t/**\n\t * Reads file using the provided {@link module:upload/filerepository~UploadAdapter}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `filerepository-upload-wrong-status` when status\n\t * is different than `idle`.\n\t * Example usage:\n\t *\n\t * ```ts\n\t * fileLoader.upload()\n\t * \t.then( data => { ... } )\n\t * \t.catch( e => {\n\t * \t\tif ( e === 'aborted' ) {\n\t * \t\t\tconsole.log( 'Uploading aborted.' );\n\t * \t\t} else {\n\t * \t\t\tconsole.log( 'Uploading error.', e );\n\t * \t\t}\n\t * \t} );\n\t * ```\n\t *\n\t * @returns Returns promise that will be resolved with response data. Promise will be rejected if error\n\t * occurs or if read process is aborted.\n\t */\n\tpublic upload(): Promise<UploadResponse> {\n\t\tif ( this.status != 'idle' ) {\n\t\t\t/**\n\t\t\t * You cannot call upload if the status is different than idle.\n\t\t\t *\n\t\t\t * @error filerepository-upload-wrong-status\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'filerepository-upload-wrong-status', this );\n\t\t}\n\n\t\tthis.status = 'uploading';\n\n\t\treturn this.file\n\t\t\t.then( () => this._adapter.upload() )\n\t\t\t.then( data => {\n\t\t\t\tthis.uploadResponse = data;\n\t\t\t\tthis.status = 'idle';\n\n\t\t\t\treturn data;\n\t\t\t} )\n\t\t\t.catch( err => {\n\t\t\t\tif ( this.status === 'aborted' ) {\n\t\t\t\t\tthrow 'aborted';\n\t\t\t\t}\n\n\t\t\t\tthis.status = 'error';\n\t\t\t\tthrow err;\n\t\t\t} );\n\t}\n\n\t/**\n\t * Aborts loading process.\n\t */\n\tpublic abort(): void {\n\t\tconst status = this.status;\n\t\tthis.status = 'aborted';\n\n\t\tif ( !this._filePromiseWrapper.isFulfilled ) {\n\t\t\t// Edge case: file loader is aborted before read() is called\n\t\t\t// so it might happen that no one handled the rejection of this promise.\n\t\t\t// See https://github.com/ckeditor/ckeditor5-upload/pull/100\n\t\t\tthis._filePromiseWrapper.promise.catch( () => {} );\n\n\t\t\tthis._filePromiseWrapper.rejecter( 'aborted' );\n\t\t} else if ( status == 'reading' ) {\n\t\t\tthis._reader.abort();\n\t\t} else if ( status == 'uploading' && this._adapter.abort ) {\n\t\t\tthis._adapter.abort();\n\t\t}\n\n\t\tthis._destroy();\n\t}\n\n\t/**\n\t * Performs cleanup.\n\t *\n\t * @internal\n\t */\n\tpublic _destroy(): void {\n\t\tthis._filePromiseWrapper = undefined as any;\n\t\tthis._reader = undefined as any;\n\t\tthis._adapter = undefined as any;\n\t\tthis.uploadResponse = undefined;\n\t}\n\n\t/**\n\t * Wraps a given file promise into another promise giving additional\n\t * control (resolving, rejecting, checking if fulfilled) over it.\n\t *\n\t * @param filePromise The initial file promise to be wrapped.\n\t */\n\tprivate _createFilePromiseWrapper( filePromise: Promise<File> ): FilePromiseWrapper {\n\t\tconst wrapper: Partial<FilePromiseWrapper> = {};\n\n\t\twrapper.promise = new Promise<File>( ( resolve, reject ) => {\n\t\t\twrapper.rejecter = reject;\n\t\t\twrapper.isFulfilled = false;\n\n\t\t\tfilePromise\n\t\t\t\t.then( file => {\n\t\t\t\t\twrapper.isFulfilled = true;\n\t\t\t\t\tresolve( file );\n\t\t\t\t} )\n\t\t\t\t.catch( err => {\n\t\t\t\t\twrapper.isFulfilled = true;\n\t\t\t\t\treject( err );\n\t\t\t\t} );\n\t\t} );\n\n\t\treturn wrapper as FilePromiseWrapper;\n\t}\n}\n\nexport { FileLoader };\n\n/**\n * Upload adapter interface used by the {@link module:upload/filerepository~FileRepository file repository}\n * to handle file upload. An upload adapter is a bridge between the editor and server that handles file uploads.\n * It should contain a logic necessary to initiate an upload process and monitor its progress.\n *\n * Learn how to develop your own upload adapter for CKEditor 5 in the\n * {@glink framework/deep-dive/upload-adapter \"Custom upload adapter\"} guide.\n *\n * @interface UploadAdapter\n */\nexport interface UploadAdapter {\n\n\t/**\n\t * Executes the upload process.\n\t * This method should return a promise that will resolve when data will be uploaded to server. Promise should be\n\t * resolved with an object containing information about uploaded file:\n\t *\n\t * ```json\n\t * {\n\t * \tdefault: 'http://server/default-size.image.png'\n\t * }\n\t * ```\n\t *\n\t * Additionally, other image sizes can be provided:\n\t *\n\t * ```json\n\t * {\n\t * \tdefault: 'http://server/default-size.image.png',\n\t * \t'160': 'http://server/size-160.image.png',\n\t * \t'500': 'http://server/size-500.image.png',\n\t * \t'1000': 'http://server/size-1000.image.png',\n\t * \t'1052': 'http://server/default-size.image.png'\n\t * }\n\t * ```\n\t *\n\t * You can also pass additional properties from the server. In this case you need to wrap URLs\n\t * in the `urls` object and pass additional properties along the `urls` property.\n\t *\n\t * ```json\n\t * {\n\t * \tmyCustomProperty: 'foo',\n\t * \turls: {\n\t * \t\tdefault: 'http://server/default-size.image.png',\n\t * \t\t'160': 'http://server/size-160.image.png',\n\t * \t\t'500': 'http://server/size-500.image.png',\n\t * \t\t'1000': 'http://server/size-1000.image.png',\n\t * \t\t'1052': 'http://server/default-size.image.png'\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * NOTE: When returning multiple images, the widest returned one should equal the default one. It is essential to\n\t * correctly set `width` attribute of the image.\n\t *\n\t * Take a look at {@link module:upload/filerepository~UploadAdapter example Adapter implementation} and\n\t * {@link module:upload/filerepository~FileRepository#createUploadAdapter createUploadAdapter method}.\n\t *\n\t * @returns Promise that should be resolved when data is uploaded.\n\t */\n\tupload(): Promise<UploadResponse>;\n\n\t/**\n\t * Aborts the upload process.\n\t * After aborting it should reject promise returned from {@link #upload upload()}.\n\t *\n\t * Take a look at {@link module:upload/filerepository~UploadAdapter example Adapter implementation} and\n\t * {@link module:upload/filerepository~FileRepository#createUploadAdapter createUploadAdapter method}.\n\t */\n\tabort?(): void;\n}\n\nexport type UploadResponse = Record<string, unknown>;\n\n/**\n * Object returned by {@link module:upload/filerepository~FileLoader#_createFilePromiseWrapper} method\n * to add more control over the initial file promise passed to {@link module:upload/filerepository~FileLoader}.\n */\ntype FilePromiseWrapper = {\n\n\t/**\n\t * Wrapper promise which can be chained for further processing.\n\t */\n\tpromise: Promise<File>;\n\n\t/**\n\t * Rejects the promise when called.\n\t */\n\trejecter: ( reason?: unknown ) => void;\n\n\t/**\n\t * Whether original promise is already fulfilled.\n\t */\n\tisFulfilled: boolean;\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/**\n * @module upload/adapters/base64uploadadapter\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { FileRepository, type UploadResponse, type FileLoader, type UploadAdapter } from '../filerepository.js';\n\ntype DomFileReader = globalThis.FileReader;\n\n/**\n * A plugin that converts images inserted into the editor into [Base64 strings](https://en.wikipedia.org/wiki/Base64)\n * in the {@glink getting-started/setup/getting-and-setting-data editor output}.\n *\n * This kind of image upload does not require server processing – images are stored with the rest of the text and\n * displayed by the web browser without additional requests.\n *\n * Check out the {@glink features/images/image-upload/image-upload comprehensive \"Image upload overview\"} to learn about\n * other ways to upload images into CKEditor 5.\n */\nexport class Base64UploadAdapter extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FileRepository ]> {\n\t\treturn [ FileRepository ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Base64UploadAdapter' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'B64A';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis.editor.plugins.get( FileRepository ).createUploadAdapter = loader => new Adapter( loader );\n\t}\n}\n\n/**\n * The upload adapter that converts images inserted into the editor into Base64 strings.\n */\nclass Adapter implements UploadAdapter {\n\t/**\n\t * `FileLoader` instance to use during the upload.\n\t */\n\tpublic loader: FileLoader;\n\n\tpublic reader?: DomFileReader;\n\n\t/**\n\t * Creates a new adapter instance.\n\t */\n\tconstructor( loader: FileLoader ) {\n\t\tthis.loader = loader;\n\t}\n\n\t/**\n\t * Starts the upload process.\n\t *\n\t * @see module:upload/filerepository~UploadAdapter#upload\n\t */\n\tpublic upload(): Promise<UploadResponse> {\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tconst reader = this.reader = new window.FileReader();\n\n\t\t\treader.addEventListener( 'load', () => {\n\t\t\t\tresolve( { default: reader.result } );\n\t\t\t} );\n\n\t\t\treader.addEventListener( 'error', err => {\n\t\t\t\treject( err );\n\t\t\t} );\n\n\t\t\treader.addEventListener( 'abort', () => {\n\t\t\t\treject();\n\t\t\t} );\n\n\t\t\tthis.loader.file.then( file => {\n\t\t\t\treader.readAsDataURL( file! );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Aborts the upload process.\n\t *\n\t * @see module:upload/filerepository~UploadAdapter#abort\n\t */\n\tpublic abort(): void {\n\t\tthis.reader!.abort();\n\t}\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/**\n * @module upload/adapters/simpleuploadadapter\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { FileRepository, type UploadResponse, type FileLoader, type UploadAdapter } from '../filerepository.js';\nimport type { SimpleUploadConfig } from '../uploadconfig.js';\nimport { logWarning } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The Simple upload adapter allows uploading images to an application running on your server using\n * the [`XMLHttpRequest`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) API with a\n * minimal {@link module:upload/uploadconfig~SimpleUploadConfig editor configuration}.\n *\n * ```ts\n * ClassicEditor\n * \t.create( {\n * \t\tsimpleUpload: {\n * \t\t\tuploadUrl: 'http://example.com',\n * \t\t\theaders: {\n * \t\t\t\t...\n * \t\t\t}\n * \t\t}\n * \t} )\n * \t.then( ... )\n * \t.catch( ... );\n * ```\n *\n * See the {@glink features/images/image-upload/simple-upload-adapter \"Simple upload adapter\"} guide to learn how to\n * learn more about the feature (configuration, server–side requirements, etc.).\n *\n * Check out the {@glink features/images/image-upload/image-upload comprehensive \"Image upload overview\"} to learn about\n * other ways to upload images into CKEditor 5.\n */\nexport class SimpleUploadAdapter extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FileRepository ]> {\n\t\treturn [ FileRepository ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SimpleUploadAdapter' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'SUA';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst options = this.editor.config.get( 'simpleUpload' );\n\n\t\tif ( !options ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !options.uploadUrl ) {\n\t\t\t/**\n\t\t\t * The {@link module:upload/uploadconfig~SimpleUploadConfig#uploadUrl `config.simpleUpload.uploadUrl`}\n\t\t\t * configuration required by the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadAdapter `SimpleUploadAdapter`}\n\t\t\t * is missing. Make sure the correct URL is specified for the image upload to work properly.\n\t\t\t *\n\t\t\t * @error simple-upload-adapter-missing-uploadurl\n\t\t\t */\n\t\t\tlogWarning( 'simple-upload-adapter-missing-uploadurl' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.editor.plugins.get( FileRepository ).createUploadAdapter = loader => {\n\t\t\treturn new Adapter( loader, options );\n\t\t};\n\t}\n}\n\n/**\n * Upload adapter.\n */\nclass Adapter implements UploadAdapter {\n\t/**\n\t * FileLoader instance to use during the upload.\n\t */\n\tpublic loader: FileLoader;\n\n\t/**\n\t * The configuration of the adapter.\n\t */\n\tpublic options: SimpleUploadConfig;\n\n\tprivate xhr?: XMLHttpRequest;\n\n\t/**\n\t * Creates a new adapter instance.\n\t */\n\tconstructor( loader: FileLoader, options: SimpleUploadConfig ) {\n\t\tthis.loader = loader;\n\t\tthis.options = options;\n\t}\n\n\t/**\n\t * Starts the upload process.\n\t *\n\t * @see module:upload/filerepository~UploadAdapter#upload\n\t */\n\tpublic upload(): Promise<UploadResponse> {\n\t\treturn this.loader.file\n\t\t\t.then( file => new Promise( ( resolve, reject ) => {\n\t\t\t\tthis._initRequest();\n\t\t\t\tthis._initListeners( resolve, reject, file! );\n\t\t\t\tthis._sendRequest( file! );\n\t\t\t} ) );\n\t}\n\n\t/**\n\t * Aborts the upload process.\n\t *\n\t * @see module:upload/filerepository~UploadAdapter#abort\n\t */\n\tpublic abort(): void {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\t}\n\n\t/**\n\t * Initializes the `XMLHttpRequest` object using the URL specified as\n\t * {@link module:upload/uploadconfig~SimpleUploadConfig#uploadUrl `simpleUpload.uploadUrl`} in the editor's\n\t * configuration.\n\t */\n\tprivate _initRequest(): void {\n\t\tconst xhr = this.xhr = new XMLHttpRequest();\n\n\t\txhr.open( 'POST', this.options.uploadUrl, true );\n\t\txhr.responseType = 'json';\n\t}\n\n\t/**\n\t * Initializes XMLHttpRequest listeners\n\t *\n\t * @param resolve Callback function to be called when the request is successful.\n\t * @param reject Callback function to be called when the request cannot be completed.\n\t * @param file Native File object.\n\t */\n\tprivate _initListeners(\n\t\tresolve: ( result: UploadResponse ) => void,\n\t\treject: ( message?: string ) => void,\n\t\tfile: File\n\t): void {\n\t\tconst xhr = this.xhr!;\n\t\tconst loader = this.loader;\n\t\tconst genericErrorText = `Couldn't upload file: ${ file.name }.`;\n\n\t\txhr.addEventListener( 'error', () => reject( genericErrorText ) );\n\t\txhr.addEventListener( 'abort', () => reject() );\n\t\txhr.addEventListener( 'load', () => {\n\t\t\tconst response = xhr.response;\n\n\t\t\tif ( !response || response.error ) {\n\t\t\t\treturn reject( response && response.error && response.error.message ? response.error.message : genericErrorText );\n\t\t\t}\n\n\t\t\tconst urls = response.url ? { default: response.url } : response.urls;\n\n\t\t\t// Resolve with the normalized `urls` property and pass the rest of the response\n\t\t\t// to allow customizing the behavior of features relying on the upload adapters.\n\t\t\tresolve( {\n\t\t\t\t...response,\n\t\t\t\turls\n\t\t\t} );\n\t\t} );\n\n\t\t// Upload progress when it is supported.\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( xhr.upload ) {\n\t\t\txhr.upload.addEventListener( 'progress', evt => {\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( evt.lengthComputable ) {\n\t\t\t\t\tloader.uploadTotal = evt.total;\n\t\t\t\t\tloader.uploaded = evt.loaded;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Prepares the data and sends the request.\n\t *\n\t * @param file File instance to be uploaded.\n\t */\n\tprivate _sendRequest( file: File ): void {\n\t\t// Set headers if specified.\n\t\tlet headers = this.options.headers || {};\n\n\t\tif ( typeof headers === 'function' ) {\n\t\t\theaders = headers( file );\n\t\t}\n\n\t\t// Use the withCredentials flag if specified.\n\t\tconst withCredentials = this.options.withCredentials || false;\n\n\t\tfor ( const headerName of Object.keys( headers ) ) {\n\t\t\tthis.xhr!.setRequestHeader( headerName, headers[ headerName ] );\n\t\t}\n\n\t\tthis.xhr!.withCredentials = withCredentials;\n\n\t\t// Prepare the form data.\n\t\tconst data = new FormData();\n\n\t\tdata.append( 'upload', file );\n\n\t\t// Send the request.\n\t\tthis.xhr!.send( data );\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { CKEditorError, first, logWarning } from \"@ckeditor/ckeditor5-utils\";\nimport { ButtonView, MenuBarMenuListItemButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, addToolbarToDropdown, createDropdown } from \"@ckeditor/ckeditor5-ui\";\nimport { IconAlignCenter, IconAlignJustify, IconAlignLeft, IconAlignRight } from \"@ckeditor/ckeditor5-icons\";\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 alignment/utils\n*/\n/**\n* The list of supported alignment options:\n*\n* * `'left'`,\n* * `'right'`,\n* * `'center'`,\n* * `'justify'`\n*\n* @internal\n*/\nconst supportedOptions = [\n\t\"left\",\n\t\"right\",\n\t\"center\",\n\t\"justify\"\n];\n/**\n* Checks whether the passed option is supported by {@link module:alignment/alignmentediting~AlignmentEditing}.\n*\n* @internal\n* @param option The option value to check.\n*/\nfunction isSupported(option) {\n\treturn supportedOptions.includes(option);\n}\n/**\n* Checks whether alignment is the default one considering the direction\n* of the editor content.\n*\n* @internal\n* @param alignment The name of the alignment to check.\n* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n*/\nfunction isDefault(alignment, locale) {\n\tif (locale.contentLanguageDirection == \"rtl\") return alignment === \"right\";\n\telse return alignment === \"left\";\n}\n/**\n* Brings the configuration to the common form, an array of objects.\n*\n* @internal\n* @param configuredOptions Alignment plugin configuration.\n* @returns Normalized object holding the configuration.\n*/\nfunction normalizeAlignmentOptions(configuredOptions) {\n\tconst normalizedOptions = configuredOptions.map((option) => {\n\t\tlet result;\n\t\tif (typeof option == \"string\") result = { name: option };\n\t\telse result = option;\n\t\treturn result;\n\t}).filter((option) => {\n\t\tconst isNameValid = supportedOptions.includes(option.name);\n\t\tif (!isNameValid)\n /**\n\t\t* The `name` in one of the `alignment.options` is not recognized.\n\t\t* The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.\n\t\t*\n\t\t* @error alignment-config-name-not-recognized\n\t\t* @param {object} option Options with unknown value of the `name` property.\n\t\t*/\n\t\tlogWarning(\"alignment-config-name-not-recognized\", { option });\n\t\treturn isNameValid;\n\t});\n\tconst classNameCount = normalizedOptions.filter((option) => Boolean(option.className)).length;\n\tif (classNameCount && classNameCount < normalizedOptions.length)\n /**\n\t* The `className` property has to be defined for all options once at least one option declares `className`.\n\t*\n\t* @error alignment-config-classnames-are-missing\n\t* @param {object} configuredOptions Contents of `alignment.options`.\n\t*/\n\tthrow new CKEditorError(\"alignment-config-classnames-are-missing\", { configuredOptions });\n\tnormalizedOptions.forEach((option, index, allOptions) => {\n\t\tconst succeedingOptions = allOptions.slice(index + 1);\n\t\tif (succeedingOptions.some((item) => item.name == option.name))\n /**\n\t\t* The same `name` in one of the `alignment.options` was already declared.\n\t\t* Each `name` representing one alignment option can be set exactly once.\n\t\t*\n\t\t* @error alignment-config-name-already-defined\n\t\t* @param {object} option First option that declares given `name`.\n\t\t* @param {object} configuredOptions Contents of `alignment.options`.\n\t\t*/\n\t\tthrow new CKEditorError(\"alignment-config-name-already-defined\", {\n\t\t\toption,\n\t\t\tconfiguredOptions\n\t\t});\n\t\tif (option.className) {\n\t\t\tif (succeedingOptions.some((item) => item.className == option.className))\n /**\n\t\t\t* The same `className` in one of the `alignment.options` was already declared.\n\t\t\t*\n\t\t\t* @error alignment-config-classname-already-defined\n\t\t\t* @param {object} option First option that declares given `className`.\n\t\t\t* @param {object} configuredOptions\n\t\t\t* Contents of `alignment.options`.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"alignment-config-classname-already-defined\", {\n\t\t\t\toption,\n\t\t\t\tconfiguredOptions\n\t\t\t});\n\t\t}\n\t});\n\treturn normalizedOptions;\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 alignment/alignmentcommand\n*/\nconst ALIGNMENT = \"alignment\";\n/**\n* The alignment command plugin.\n*/\nvar AlignmentCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst locale = this.editor.locale;\n\t\tconst firstBlock = first(this.editor.model.document.selection.getSelectedBlocks());\n\t\tthis.isEnabled = Boolean(firstBlock) && this._canBeAligned(firstBlock);\n\t\tif (this.isEnabled && firstBlock.hasAttribute(\"alignment\")) this.value = firstBlock.getAttribute(\"alignment\");\n\t\telse this.value = locale.contentLanguageDirection === \"rtl\" ? \"right\" : \"left\";\n\t}\n\t/**\n\t* Executes the command. Applies the alignment `value` to the selected blocks.\n\t* If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,\n\t* the command will remove the attribute from the selected blocks.\n\t*\n\t* @param options Options for the executed command.\n\t* @param options.value The value to apply.\n\t* @fires execute\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\t\tconst value = options.value;\n\t\tmodel.change((writer) => {\n\t\t\tconst blocks = Array.from(doc.selection.getSelectedBlocks()).filter((block) => this._canBeAligned(block));\n\t\t\tconst currentAlignment = blocks[0].getAttribute(\"alignment\");\n\t\t\tif (isDefault(value, locale) || currentAlignment === value || !value) removeAlignmentFromSelection(blocks, writer);\n\t\t\telse setAlignmentOnSelection(blocks, writer, value);\n\t\t});\n\t}\n\t/**\n\t* Checks whether a block can have alignment set.\n\t*\n\t* @param block The block to be checked.\n\t*/\n\t_canBeAligned(block) {\n\t\treturn this.editor.model.schema.checkAttribute(block, ALIGNMENT);\n\t}\n};\n/**\n* Removes the alignment attribute from blocks.\n*/\nfunction removeAlignmentFromSelection(blocks, writer) {\n\tfor (const block of blocks) writer.removeAttribute(ALIGNMENT, block);\n}\n/**\n* Sets the alignment attribute on blocks.\n*/\nfunction setAlignmentOnSelection(blocks, writer, alignment) {\n\tfor (const block of blocks) writer.setAttribute(ALIGNMENT, alignment, block);\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 alignment/alignmentediting\n*/\n/**\n* The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds\n* the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.\n*/\nvar AlignmentEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AlignmentEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"alignment\", { options: supportedOptions.map((option) => ({ name: option })) });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst schema = editor.model.schema;\n\t\tconst optionsToConvert = normalizeAlignmentOptions(editor.config.get(\"alignment.options\")).filter((option) => isSupported(option.name) && !isDefault(option.name, locale));\n\t\tconst shouldUseClasses = optionsToConvert.some((option) => !!option.className);\n\t\tschema.extend(\"$block\", { allowAttributes: \"alignment\" });\n\t\teditor.model.schema.setAttributeProperties(\"alignment\", {\n\t\t\tisFormatting: true,\n\t\t\tblockAlignment: getBlockAlignmentAttributeProperty(locale)\n\t\t});\n\t\tif (shouldUseClasses) editor.conversion.attributeToAttribute(buildClassDefinition(optionsToConvert));\n\t\telse editor.conversion.for(\"downcast\").attributeToAttribute(buildDowncastInlineDefinition(optionsToConvert));\n\t\tconst upcastInlineDefinitions = buildUpcastInlineDefinitions(optionsToConvert);\n\t\tfor (const definition of upcastInlineDefinitions) editor.conversion.for(\"upcast\").attributeToAttribute(definition);\n\t\tconst upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions(optionsToConvert);\n\t\tfor (const definition of upcastCompatibilityDefinitions) editor.conversion.for(\"upcast\").attributeToAttribute(definition);\n\t\teditor.commands.add(\"alignment\", new AlignmentCommand(editor));\n\t}\n};\n/**\n* Prepare block alignment mapping for all possible alignment options.\n*/\nfunction getBlockAlignmentAttributeProperty(locale) {\n\tconst blockAlignment = {\n\t\tleft: { value: \"left\" },\n\t\tright: { value: \"right\" },\n\t\tcenter: { value: \"center\" },\n\t\tjustify: { value: \"justify\" }\n\t};\n\tconst defaultDirection = locale.contentLanguageDirection == \"rtl\" ? \"right\" : \"left\";\n\tblockAlignment[defaultDirection].isDefault = true;\n\treturn blockAlignment;\n}\n/**\n* Prepare downcast conversion definition for inline alignment styling.\n*/\nfunction buildDowncastInlineDefinition(options) {\n\tconst view = {};\n\tfor (const { name } of options) view[name] = {\n\t\tkey: \"style\",\n\t\tvalue: { \"text-align\": name }\n\t};\n\treturn {\n\t\tmodel: {\n\t\t\tkey: \"alignment\",\n\t\t\tvalues: options.map((option) => option.name)\n\t\t},\n\t\tview\n\t};\n}\n/**\n* Prepare upcast definitions for inline alignment styles.\n*/\nfunction buildUpcastInlineDefinitions(options) {\n\tconst definitions = [];\n\tfor (const { name } of options) definitions.push({\n\t\tview: {\n\t\t\tkey: \"style\",\n\t\t\tvalue: { \"text-align\": name }\n\t\t},\n\t\tmodel: {\n\t\t\tkey: \"alignment\",\n\t\t\tvalue: name\n\t\t}\n\t});\n\treturn definitions;\n}\n/**\n* Prepare upcast definitions for deprecated `align` attribute.\n*/\nfunction buildUpcastCompatibilityDefinitions(options) {\n\tconst definitions = [];\n\tfor (const { name } of options) definitions.push({\n\t\tview: {\n\t\t\tkey: \"align\",\n\t\t\tvalue: name\n\t\t},\n\t\tmodel: {\n\t\t\tkey: \"alignment\",\n\t\t\tvalue: name\n\t\t}\n\t});\n\treturn definitions;\n}\n/**\n* Prepare conversion definitions for upcast and downcast alignment with classes.\n*/\nfunction buildClassDefinition(options) {\n\tconst view = {};\n\tfor (const option of options) view[option.name] = {\n\t\tkey: \"class\",\n\t\tvalue: option.className\n\t};\n\treturn {\n\t\tmodel: {\n\t\t\tkey: \"alignment\",\n\t\t\tvalues: options.map((option) => option.name)\n\t\t},\n\t\tview\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 alignment/alignmentui\n*/\nconst iconsMap = /* #__PURE__ */ (() => /* @__PURE__ */ new Map([\n\t[\"left\", IconAlignLeft],\n\t[\"right\", IconAlignRight],\n\t[\"center\", IconAlignCenter],\n\t[\"justify\", IconAlignJustify]\n]))();\n/**\n* The default alignment UI plugin.\n*\n* It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons\n* and the `'alignment'` dropdown.\n*/\nvar AlignmentUI = class extends Plugin {\n\t/**\n\t* Returns the localized option titles provided by the plugin.\n\t*\n\t* The following localized titles corresponding with\n\t* {@link module:alignment/alignmentconfig~AlignmentConfig#options} are available:\n\t*\n\t* * `'left'`,\n\t* * `'right'`,\n\t* * `'center'`,\n\t* * `'justify'`.\n\t*\n\t* @readonly\n\t*/\n\tget localizedOptionTitles() {\n\t\tconst t = this.editor.t;\n\t\treturn {\n\t\t\t\"left\": t(\"Align left\"),\n\t\t\t\"right\": t(\"Align right\"),\n\t\t\t\"center\": t(\"Align center\"),\n\t\t\t\"justify\": t(\"Justify\")\n\t\t};\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AlignmentUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst options = normalizeAlignmentOptions(editor.config.get(\"alignment.options\"));\n\t\toptions.map((option) => option.name).filter(isSupported).forEach((option) => this._addButton(option));\n\t\tthis._addToolbarDropdown(options);\n\t\tthis._addMenuBarMenu(options);\n\t}\n\t/**\n\t* Helper method for initializing the button and linking it with an appropriate command.\n\t*\n\t* @param option The name of the alignment option for which the button is added.\n\t*/\n\t_addButton(option) {\n\t\tthis.editor.ui.componentFactory.add(`alignment:${option}`, (locale) => this._createButton(locale, option));\n\t}\n\t/**\n\t* Helper method for creating the button view element.\n\t*\n\t* @param locale Editor locale.\n\t* @param option The name of the alignment option for which the button is added.\n\t* @param buttonAttrs Optional parameters passed to button view instance.\n\t*/\n\t_createButton(locale, option, buttonAttrs = {}) {\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get(\"alignment\");\n\t\tconst buttonView = new ButtonView(locale);\n\t\tbuttonView.set({\n\t\t\tlabel: this.localizedOptionTitles[option],\n\t\t\ticon: iconsMap.get(option),\n\t\t\ttooltip: true,\n\t\t\tisToggleable: true,\n\t\t\t...buttonAttrs\n\t\t});\n\t\tbuttonView.bind(\"isEnabled\").to(command);\n\t\tbuttonView.bind(\"isOn\").to(command, \"value\", (value) => value === option);\n\t\tthis.listenTo(buttonView, \"execute\", () => {\n\t\t\teditor.execute(\"alignment\", { value: option });\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn buttonView;\n\t}\n\t/**\n\t* Helper method for initializing the toolnar dropdown and linking it with an appropriate command.\n\t*\n\t* @param options The name of the alignment option for which the button is added.\n\t*/\n\t_addToolbarDropdown(options) {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(\"alignment\", (locale) => {\n\t\t\tconst dropdownView = createDropdown(locale);\n\t\t\tconst tooltipPosition = locale.uiLanguageDirection === \"rtl\" ? \"w\" : \"e\";\n\t\t\tconst t = locale.t;\n\t\t\taddToolbarToDropdown(dropdownView, () => options.map((option) => this._createButton(locale, option.name, { tooltipPosition })), {\n\t\t\t\tenableActiveItemFocusOnDropdownOpen: true,\n\t\t\t\tisVertical: true,\n\t\t\t\tariaLabel: t(\"Text alignment toolbar\")\n\t\t\t});\n\t\t\tdropdownView.buttonView.set({\n\t\t\t\tlabel: t(\"Text alignment\"),\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tdropdownView.extendTemplate({ attributes: { class: \"ck-alignment-dropdown\" } });\n\t\t\tconst defaultIcon = locale.contentLanguageDirection === \"rtl\" ? iconsMap.get(\"right\") : iconsMap.get(\"left\");\n\t\t\tconst command = editor.commands.get(\"alignment\");\n\t\t\tdropdownView.buttonView.bind(\"icon\").to(command, \"value\", (value) => iconsMap.get(value) || defaultIcon);\n\t\t\tdropdownView.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\t\tthis.listenTo(dropdownView, \"execute\", () => {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t}\n\t/**\n\t* Creates a menu for all alignment options to use either in menu bar.\n\t*\n\t* @param options Normalized alignment options from config.\n\t*/\n\t_addMenuBarMenu(options) {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(\"menuBar:alignment\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"alignment\");\n\t\t\tconst t = locale.t;\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tconst listView = new MenuBarMenuListView(locale);\n\t\t\tmenuView.bind(\"isEnabled\").to(command);\n\t\t\tlistView.set({\n\t\t\t\tariaLabel: t(\"Text alignment\"),\n\t\t\t\trole: \"menu\"\n\t\t\t});\n\t\t\tmenuView.buttonView.set({ label: t(\"Text alignment\") });\n\t\t\tfor (const option of options) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView(locale, menuView);\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView(locale);\n\t\t\t\tbuttonView.delegate(\"execute\").to(menuView);\n\t\t\t\tbuttonView.set({\n\t\t\t\t\tlabel: this.localizedOptionTitles[option.name],\n\t\t\t\t\ticon: iconsMap.get(option.name),\n\t\t\t\t\trole: \"menuitemcheckbox\",\n\t\t\t\t\tisToggleable: true\n\t\t\t\t});\n\t\t\t\tbuttonView.on(\"execute\", () => {\n\t\t\t\t\teditor.execute(\"alignment\", { value: option.name });\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t});\n\t\t\t\tbuttonView.bind(\"isOn\").to(command, \"value\", (value) => value === option.name);\n\t\t\t\tbuttonView.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\t\t\tlistItemView.children.add(buttonView);\n\t\t\t\tlistView.items.add(listItemView);\n\t\t\t}\n\t\t\tmenuView.panelView.children.add(listView);\n\t\t\treturn menuView;\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 alignment/alignment\n*/\n/**\n* The text alignment plugin.\n*\n* For a detailed overview, check the {@glink features/text-alignment Text alignment} feature guide\n* and the {@glink api/alignment package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and\n* {@link module:alignment/alignmentui~AlignmentUI} plugins.\n*/\nvar Alignment = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [AlignmentEditing, AlignmentUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Alignment\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { Alignment, AlignmentCommand, AlignmentEditing, AlignmentUI, supportedOptions as _ALIGNMENT_SUPPORTED_OPTIONS, isSupported as _isAlignmentSupported, isDefault as _isDefaultAlignment, normalizeAlignmentOptions as _normalizeAlignmentOptions };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module alignment/utils\n */\n\nimport { CKEditorError, logWarning, type Locale } from '@ckeditor/ckeditor5-utils';\nimport type { AlignmentFormat, AlignmentSupportedOption } from './alignmentconfig.js';\n\n/**\n * The list of supported alignment options:\n *\n * * `'left'`,\n * * `'right'`,\n * * `'center'`,\n * * `'justify'`\n *\n * @internal\n */\nexport const supportedOptions: ReadonlyArray<AlignmentSupportedOption> = [ 'left', 'right', 'center', 'justify' ];\n\n/**\n * Checks whether the passed option is supported by {@link module:alignment/alignmentediting~AlignmentEditing}.\n *\n * @internal\n * @param option The option value to check.\n */\nexport function isSupported( option: string ): boolean {\n\treturn ( supportedOptions as Array<string> ).includes( option );\n}\n\n/**\n * Checks whether alignment is the default one considering the direction\n * of the editor content.\n *\n * @internal\n * @param alignment The name of the alignment to check.\n * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n */\nexport function isDefault( alignment: string, locale: Locale ): boolean {\n\t// Right now only LTR is supported so the 'left' value is always the default one.\n\n\tif ( locale.contentLanguageDirection == 'rtl' ) {\n\t\treturn alignment === 'right';\n\t} else {\n\t\treturn alignment === 'left';\n\t}\n}\n\n/**\n * Brings the configuration to the common form, an array of objects.\n *\n * @internal\n * @param configuredOptions Alignment plugin configuration.\n * @returns Normalized object holding the configuration.\n */\nexport function normalizeAlignmentOptions( configuredOptions: Array<string | AlignmentFormat> ): Array<AlignmentFormat> {\n\tconst normalizedOptions = configuredOptions\n\t\t.map( option => {\n\t\t\tlet result;\n\n\t\t\tif ( typeof option == 'string' ) {\n\t\t\t\tresult = { name: option };\n\t\t\t} else {\n\t\t\t\tresult = option;\n\t\t\t}\n\n\t\t\treturn result as AlignmentFormat;\n\t\t} )\n\t\t// Remove all unknown options.\n\t\t.filter( option => {\n\t\t\tconst isNameValid = supportedOptions.includes( option.name );\n\n\t\t\tif ( !isNameValid ) {\n\t\t\t\t/**\n\t\t\t\t * The `name` in one of the `alignment.options` is not recognized.\n\t\t\t\t * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-name-not-recognized\n\t\t\t\t * @param {object} option Options with unknown value of the `name` property.\n\t\t\t\t */\n\t\t\t\tlogWarning( 'alignment-config-name-not-recognized', { option } );\n\t\t\t}\n\n\t\t\treturn isNameValid;\n\t\t} );\n\n\tconst classNameCount = normalizedOptions.filter( option => Boolean( option.className ) ).length;\n\n\t// We either use classes for all styling options or for none.\n\tif ( classNameCount && classNameCount < normalizedOptions.length ) {\n\t\t/**\n\t\t * The `className` property has to be defined for all options once at least one option declares `className`.\n\t\t *\n\t\t * @error alignment-config-classnames-are-missing\n\t\t * @param {object} configuredOptions Contents of `alignment.options`.\n\t\t */\n\t\tthrow new CKEditorError( 'alignment-config-classnames-are-missing', { configuredOptions } );\n\t}\n\n\t// Validate resulting config.\n\tnormalizedOptions.forEach( ( option, index, allOptions ) => {\n\t\tconst succeedingOptions = allOptions.slice( index + 1 );\n\t\tconst nameAlreadyExists = succeedingOptions.some( item => item.name == option.name );\n\n\t\tif ( nameAlreadyExists ) {\n\t\t\t/**\n\t\t\t * The same `name` in one of the `alignment.options` was already declared.\n\t\t\t * Each `name` representing one alignment option can be set exactly once.\n\t\t\t *\n\t\t\t * @error alignment-config-name-already-defined\n\t\t\t * @param {object} option First option that declares given `name`.\n\t\t\t * @param {object} configuredOptions Contents of `alignment.options`.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'alignment-config-name-already-defined', { option, configuredOptions } );\n\t\t}\n\n\t\t// The `className` property is present. Check for duplicates then.\n\t\tif ( option.className ) {\n\t\t\tconst classNameAlreadyExists = succeedingOptions.some( item => item.className == option.className );\n\n\t\t\tif ( classNameAlreadyExists ) {\n\t\t\t\t/**\n\t\t\t\t * The same `className` in one of the `alignment.options` was already declared.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-classname-already-defined\n\t\t\t\t * @param {object} option First option that declares given `className`.\n\t\t\t\t * @param {object} configuredOptions\n\t\t\t\t * Contents of `alignment.options`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'alignment-config-classname-already-defined', { option, configuredOptions } );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn normalizedOptions;\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/**\n * @module alignment/alignmentcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\nimport type { ModelElement, ModelWriter } from '@ckeditor/ckeditor5-engine';\n\nimport { isDefault } from './utils.js';\nimport type { AlignmentSupportedOption } from './alignmentconfig.js';\n\nconst ALIGNMENT = 'alignment';\n\n/**\n * The alignment command plugin.\n */\nexport class AlignmentCommand extends Command {\n\t/**\n\t * A value of the current block's alignment.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: AlignmentSupportedOption;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst firstBlock = first( this.editor.model.document.selection.getSelectedBlocks() )!;\n\n\t\t// As first check whether to enable or disable the command as the value will always be false if the command cannot be enabled.\n\t\tthis.isEnabled = Boolean( firstBlock ) && this._canBeAligned( firstBlock );\n\n\t\tif ( this.isEnabled && firstBlock.hasAttribute( 'alignment' ) ) {\n\t\t\tthis.value = firstBlock.getAttribute( 'alignment' ) as AlignmentSupportedOption;\n\t\t} else {\n\t\t\tthis.value = locale.contentLanguageDirection === 'rtl' ? 'right' : 'left';\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command. Applies the alignment `value` to the selected blocks.\n\t * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,\n\t * the command will remove the attribute from the selected blocks.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.value The value to apply.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { value?: AlignmentSupportedOption } = {} ): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\tconst value = options.value!;\n\n\t\tmodel.change( writer => {\n\t\t\t// Get only those blocks from selected that can have alignment set\n\t\t\tconst blocks = Array.from( doc.selection.getSelectedBlocks() ).filter( block => this._canBeAligned( block ) );\n\t\t\tconst currentAlignment = blocks[ 0 ].getAttribute( 'alignment' );\n\n\t\t\t// Remove alignment attribute if current alignment is:\n\t\t\t// - default (should not be stored in model as it will bloat model data)\n\t\t\t// - equal to currently set\n\t\t\t// - or no value is passed - denotes default alignment.\n\t\t\tconst removeAlignment = isDefault( value, locale ) || currentAlignment === value || !value;\n\n\t\t\tif ( removeAlignment ) {\n\t\t\t\tremoveAlignmentFromSelection( blocks, writer );\n\t\t\t} else {\n\t\t\t\tsetAlignmentOnSelection( blocks, writer, value );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether a block can have alignment set.\n\t *\n\t * @param block The block to be checked.\n\t */\n\tprivate _canBeAligned( block: ModelElement ) {\n\t\treturn this.editor.model.schema.checkAttribute( block, ALIGNMENT );\n\t}\n}\n\n/**\n * Removes the alignment attribute from blocks.\n */\nfunction removeAlignmentFromSelection( blocks: Array<ModelElement>, writer: ModelWriter ) {\n\tfor ( const block of blocks ) {\n\t\twriter.removeAttribute( ALIGNMENT, block );\n\t}\n}\n\n/**\n * Sets the alignment attribute on blocks.\n */\nfunction setAlignmentOnSelection( blocks: Array<ModelElement>, writer: ModelWriter, alignment: string ) {\n\tfor ( const block of blocks ) {\n\t\twriter.setAttribute( ALIGNMENT, alignment, block );\n\t}\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/**\n * @module alignment/alignmentediting\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { DowncastAttributeDescriptor, ModelBlockAlignmentAttributesMapping } from '@ckeditor/ckeditor5-engine';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { AlignmentCommand } from './alignmentcommand.js';\nimport { isDefault, isSupported, normalizeAlignmentOptions, supportedOptions } from './utils.js';\nimport type { AlignmentFormat, AlignmentSupportedOption } from './alignmentconfig.js';\n\n/**\n * The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds\n * the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.\n */\nexport class AlignmentEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AlignmentEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'alignment', {\n\t\t\toptions: supportedOptions.map( option => ( { name: option } ) )\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst schema = editor.model.schema;\n\n\t\tconst options: Array<AlignmentFormat> = normalizeAlignmentOptions( editor.config.get( 'alignment.options' )! );\n\n\t\t// Filter out unsupported options and those that are redundant, e.g. `left` in LTR / `right` in RTL mode.\n\t\tconst optionsToConvert = options.filter(\n\t\t\toption => isSupported( option.name ) && !isDefault( option.name, locale )\n\t\t);\n\n\t\t// Once there is at least one `className` defined, we switch to alignment with classes.\n\t\tconst shouldUseClasses = optionsToConvert.some( option => !!option.className );\n\n\t\t// Allow alignment attribute on all blocks.\n\t\tschema.extend( '$block', { allowAttributes: 'alignment' } );\n\t\teditor.model.schema.setAttributeProperties( 'alignment', {\n\t\t\tisFormatting: true,\n\t\t\tblockAlignment: getBlockAlignmentAttributeProperty( locale )\n\t\t} );\n\n\t\tif ( shouldUseClasses ) {\n\t\t\teditor.conversion.attributeToAttribute( buildClassDefinition( optionsToConvert ) );\n\t\t} else {\n\t\t\t// Downcast inline styles.\n\t\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( buildDowncastInlineDefinition( optionsToConvert ) );\n\t\t}\n\n\t\tconst upcastInlineDefinitions = buildUpcastInlineDefinitions( optionsToConvert );\n\n\t\t// Always upcast from inline styles.\n\t\tfor ( const definition of upcastInlineDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\tconst upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions( optionsToConvert );\n\n\t\t// Always upcast from deprecated `align` attribute.\n\t\tfor ( const definition of upcastCompatibilityDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\teditor.commands.add( 'alignment', new AlignmentCommand( editor ) );\n\t}\n}\n\n/**\n * Prepare block alignment mapping for all possible alignment options.\n */\nfunction getBlockAlignmentAttributeProperty( locale: Locale ) {\n\tconst blockAlignment: ModelBlockAlignmentAttributesMapping = {\n\t\tleft: { value: 'left' },\n\t\tright: { value: 'right' },\n\t\tcenter: { value: 'center' },\n\t\tjustify: { value: 'justify' }\n\t} satisfies Record<AlignmentSupportedOption, unknown>;\n\n\tconst defaultDirection = locale.contentLanguageDirection == 'rtl' ? 'right' : 'left';\n\n\tblockAlignment[ defaultDirection ]!.isDefault = true;\n\n\treturn blockAlignment;\n}\n\n/**\n * Prepare downcast conversion definition for inline alignment styling.\n */\nfunction buildDowncastInlineDefinition( options: Array<AlignmentFormat> ) {\n\tconst view: Record<string, { key: 'style'; value: { 'text-align': AlignmentSupportedOption } }> = {};\n\n\tfor ( const { name } of options ) {\n\t\tview[ name ] = {\n\t\t\tkey: 'style',\n\t\t\tvalue: {\n\t\t\t\t'text-align': name\n\t\t\t}\n\t\t};\n\t}\n\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview\n\t};\n\n\treturn definition;\n}\n\n/**\n * Prepare upcast definitions for inline alignment styles.\n */\nfunction buildUpcastInlineDefinitions( options: Array<AlignmentFormat> ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\t'text-align': name\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n/**\n * Prepare upcast definitions for deprecated `align` attribute.\n */\nfunction buildUpcastCompatibilityDefinitions( options: Array<AlignmentFormat> ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'align',\n\t\t\t\tvalue: name\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n/**\n * Prepare conversion definitions for upcast and downcast alignment with classes.\n */\nfunction buildClassDefinition( options: Array<AlignmentFormat> ) {\n\tconst view: Record<string, DowncastAttributeDescriptor> = {};\n\n\tfor ( const option of options ) {\n\t\tview[ option.name ] = {\n\t\t\tkey: 'class',\n\t\t\tvalue: option.className!\n\t\t};\n\t}\n\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview\n\t};\n\n\treturn definition;\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/**\n * @module alignment/alignmentui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport {\n\ttype Button,\n\tButtonView,\n\tcreateDropdown,\n\taddToolbarToDropdown,\n\tMenuBarMenuListItemView,\n\tMenuBarMenuListItemButtonView,\n\tMenuBarMenuView,\n\tMenuBarMenuListView\n} from '@ckeditor/ckeditor5-ui';\nimport { IconAlignCenter, IconAlignJustify, IconAlignLeft, IconAlignRight } from '@ckeditor/ckeditor5-icons';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { isSupported, normalizeAlignmentOptions } from './utils.js';\nimport type { AlignmentFormat, AlignmentSupportedOption } from './alignmentconfig.js';\nimport { type AlignmentCommand } from './alignmentcommand.js';\n\nconst iconsMap = /* #__PURE__ */ ( () => new Map( [\n\t[ 'left', IconAlignLeft ],\n\t[ 'right', IconAlignRight ],\n\t[ 'center', IconAlignCenter ],\n\t[ 'justify', IconAlignJustify ]\n] ) )();\n\n/**\n * The default alignment UI plugin.\n *\n * It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons\n * and the `'alignment'` dropdown.\n */\nexport class AlignmentUI extends Plugin {\n\t/**\n\t * Returns the localized option titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:alignment/alignmentconfig~AlignmentConfig#options} are available:\n\t *\n\t * * `'left'`,\n\t * * `'right'`,\n\t * * `'center'`,\n\t * * `'justify'`.\n\t *\n\t * @readonly\n\t */\n\tpublic get localizedOptionTitles(): Record<AlignmentSupportedOption, string> {\n\t\tconst t = this.editor.t;\n\n\t\treturn {\n\t\t\t'left': t( 'Align left' ),\n\t\t\t'right': t( 'Align right' ),\n\t\t\t'center': t( 'Align center' ),\n\t\t\t'justify': t( 'Justify' )\n\t\t};\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AlignmentUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst options = normalizeAlignmentOptions( editor.config.get( 'alignment.options' )! );\n\n\t\toptions\n\t\t\t.map( option => option.name )\n\t\t\t.filter( isSupported )\n\t\t\t.forEach( option => this._addButton( option ) );\n\n\t\tthis._addToolbarDropdown( options );\n\t\tthis._addMenuBarMenu( options );\n\t}\n\n\t/**\n\t * Helper method for initializing the button and linking it with an appropriate command.\n\t *\n\t * @param option The name of the alignment option for which the button is added.\n\t */\n\tprivate _addButton( option: AlignmentSupportedOption ): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( `alignment:${ option }`, locale => this._createButton( locale, option ) );\n\t}\n\n\t/**\n\t * Helper method for creating the button view element.\n\t *\n\t * @param locale Editor locale.\n\t * @param option The name of the alignment option for which the button is added.\n\t * @param buttonAttrs Optional parameters passed to button view instance.\n\t */\n\tprivate _createButton(\n\t\tlocale: Locale,\n\t\toption: AlignmentSupportedOption,\n\t\tbuttonAttrs: Partial<Button> = {}\n\t): ButtonView {\n\t\tconst editor = this.editor;\n\t\tconst command: AlignmentCommand = editor.commands.get( 'alignment' )!;\n\t\tconst buttonView = new ButtonView( locale );\n\n\t\tbuttonView.set( {\n\t\t\tlabel: this.localizedOptionTitles[ option ],\n\t\t\ticon: iconsMap.get( option ),\n\t\t\ttooltip: true,\n\t\t\tisToggleable: true,\n\t\t\t...buttonAttrs\n\t\t} );\n\n\t\t// Bind button model to command.\n\t\tbuttonView.bind( 'isEnabled' ).to( command );\n\t\tbuttonView.bind( 'isOn' ).to( command, 'value', value => value === option );\n\n\t\t// Execute command.\n\t\tthis.listenTo( buttonView, 'execute', () => {\n\t\t\teditor.execute( 'alignment', { value: option } );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn buttonView;\n\t}\n\n\t/**\n\t * Helper method for initializing the toolnar dropdown and linking it with an appropriate command.\n\t *\n\t * @param options The name of the alignment option for which the button is added.\n\t */\n\tprivate _addToolbarDropdown( options: Array<AlignmentFormat> ): void {\n\t\tconst editor = this.editor;\n\t\tconst factory = editor.ui.componentFactory;\n\n\t\tfactory.add( 'alignment', locale => {\n\t\t\tconst dropdownView = createDropdown( locale );\n\t\t\tconst tooltipPosition = locale.uiLanguageDirection === 'rtl' ? 'w' : 'e';\n\t\t\tconst t = locale.t;\n\n\t\t\t// Add existing alignment buttons to dropdown's toolbar.\n\t\t\taddToolbarToDropdown(\n\t\t\t\tdropdownView,\n\t\t\t\t() => options.map( option => this._createButton( locale, option.name, { tooltipPosition } ) ) as Array<ButtonView>,\n\t\t\t\t{\n\t\t\t\t\tenableActiveItemFocusOnDropdownOpen: true,\n\t\t\t\t\tisVertical: true,\n\t\t\t\t\tariaLabel: t( 'Text alignment toolbar' )\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// Configure dropdown properties an behavior.\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tlabel: t( 'Text alignment' ),\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-alignment-dropdown'\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// The default icon depends on the direction of the content.\n\t\t\tconst defaultIcon = locale.contentLanguageDirection === 'rtl' ? iconsMap.get( 'right' ) : iconsMap.get( 'left' );\n\t\t\tconst command: AlignmentCommand = editor.commands.get( 'alignment' )!;\n\n\t\t\t// Change icon to reflect current selection's alignment.\n\t\t\tdropdownView.buttonView.bind( 'icon' ).to( command, 'value', value => iconsMap.get( value ) || defaultIcon );\n\n\t\t\t// Enable button if any of the buttons is enabled.\n\t\t\tdropdownView.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t\t// Focus the editable after executing the command.\n\t\t\t// Overrides a default behaviour where the focus is moved to the dropdown button.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/12125.\n\t\t\tthis.listenTo( dropdownView, 'execute', () => {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a menu for all alignment options to use either in menu bar.\n\t *\n\t * @param options Normalized alignment options from config.\n\t */\n\tprivate _addMenuBarMenu( options: Array<AlignmentFormat> ): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( 'menuBar:alignment', locale => {\n\t\t\tconst command: AlignmentCommand = editor.commands.get( 'alignment' )!;\n\t\t\tconst t = locale.t;\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\t\t\tconst listView = new MenuBarMenuListView( locale );\n\n\t\t\tmenuView.bind( 'isEnabled' ).to( command );\n\n\t\t\tlistView.set( {\n\t\t\t\tariaLabel: t( 'Text alignment' ),\n\t\t\t\trole: 'menu'\n\t\t\t} );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\tlabel: t( 'Text alignment' )\n\t\t\t} );\n\n\t\t\tfor ( const option of options ) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView( locale, menuView );\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView( locale );\n\n\t\t\t\tbuttonView.delegate( 'execute' ).to( menuView );\n\t\t\t\tbuttonView.set( {\n\t\t\t\t\tlabel: this.localizedOptionTitles[ option.name ],\n\t\t\t\t\ticon: iconsMap.get( option.name ),\n\t\t\t\t\trole: 'menuitemcheckbox',\n\t\t\t\t\tisToggleable: true\n\t\t\t\t} );\n\n\t\t\t\tbuttonView.on( 'execute', () => {\n\t\t\t\t\teditor.execute( 'alignment', { value: option.name } );\n\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t} );\n\n\t\t\t\tbuttonView.bind( 'isOn' ).to( command, 'value', value => value === option.name );\n\t\t\t\tbuttonView.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t\t\tlistItemView.children.add( buttonView );\n\t\t\t\tlistView.items.add( listItemView );\n\t\t\t}\n\n\t\t\tmenuView.panelView.children.add( listView );\n\n\t\t\treturn menuView;\n\t\t} );\n\t}\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/**\n * @module alignment/alignment\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { AlignmentEditing } from './alignmentediting.js';\nimport { AlignmentUI } from './alignmentui.js';\n\n/**\n * The text alignment plugin.\n *\n * For a detailed overview, check the {@glink features/text-alignment Text alignment} feature guide\n * and the {@glink api/alignment package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and\n * {@link module:alignment/alignmentui~AlignmentUI} plugins.\n */\nexport class Alignment extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ AlignmentEditing, AlignmentUI ]> {\n\t\treturn [ AlignmentEditing, AlignmentUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Alignment' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { EventInfo, ObservableMixin, count, env, isInsideCombinedSymbol, isInsideEmojiSequence, isInsideSurrogatePair, keyCodes } from \"@ckeditor/ckeditor5-utils\";\nimport { BubblingEventInfo, FocusObserver, ModelLiveRange, MouseObserver, Observer, TouchObserver, ViewDocumentDomEventData, _tryFixingModelRange } from \"@ckeditor/ckeditor5-engine\";\nimport { debounce, escapeRegExp } 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* Change buffer allows to group atomic changes (like characters that have been typed) into\n* {@link module:engine/model/batch~Batch batches}.\n*\n* Batches represent single undo steps, hence changes added to one single batch are undone together.\n*\n* The buffer has a configurable limit of atomic changes that it can accommodate. After the limit was\n* exceeded (see {@link ~TypingChangeBuffer#input}), a new batch is created in {@link ~TypingChangeBuffer#batch}.\n*\n* To use the change buffer you need to let it know about the number of changes that were added to the batch:\n*\n* ```ts\n* const buffer = new ChangeBuffer( model, LIMIT );\n*\n* // Later on in your feature:\n* buffer.batch.insert( pos, insertedCharacters );\n* buffer.input( insertedCharacters.length );\n* ```\n*/\nvar TypingChangeBuffer = class {\n\t/**\n\t* The model instance.\n\t*/\n\tmodel;\n\t/**\n\t* The maximum number of atomic changes which can be contained in one batch.\n\t*/\n\tlimit;\n\t/**\n\t* Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t*/\n\t_isLocked;\n\t/**\n\t* The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t* the {@link #batch batch} is set to a new one.\n\t*/\n\t_size;\n\t/**\n\t* The current batch instance.\n\t*/\n\t_batch = null;\n\t/**\n\t* The callback to document the change event which later needs to be removed.\n\t*/\n\t_changeCallback;\n\t/**\n\t* The callback to document selection `change:attribute` and `change:range` events which resets the buffer.\n\t*/\n\t_selectionChangeCallback;\n\t/**\n\t* Creates a new instance of the change buffer.\n\t*\n\t* @param limit The maximum number of atomic changes which can be contained in one batch.\n\t*/\n\tconstructor(model, limit = 20) {\n\t\tthis.model = model;\n\t\tthis._size = 0;\n\t\tthis.limit = limit;\n\t\tthis._isLocked = false;\n\t\tthis._changeCallback = (evt, batch) => {\n\t\t\tif (batch.isLocal && batch.isUndoable && batch !== this._batch) this._reset(true);\n\t\t};\n\t\tthis._selectionChangeCallback = () => {\n\t\t\tthis._reset();\n\t\t};\n\t\tthis.model.document.on(\"change\", this._changeCallback);\n\t\tthis.model.document.selection.on(\"change:range\", this._selectionChangeCallback);\n\t\tthis.model.document.selection.on(\"change:attribute\", this._selectionChangeCallback);\n\t}\n\t/**\n\t* The current batch to which a feature should add its operations. Once the {@link #size}\n\t* is reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t*/\n\tget batch() {\n\t\tif (!this._batch) this._batch = this.model.createBatch({ isTyping: true });\n\t\treturn this._batch;\n\t}\n\t/**\n\t* The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t* the {@link #batch batch} is set to a new one.\n\t*/\n\tget size() {\n\t\treturn this._size;\n\t}\n\t/**\n\t* The input number of changes into the buffer. Once the {@link #size} is\n\t* reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t*\n\t* @param changeCount The number of atomic changes to input.\n\t*/\n\tinput(changeCount) {\n\t\tthis._size += changeCount;\n\t\tif (this._size >= this.limit) this._reset(true);\n\t}\n\t/**\n\t* Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t*/\n\tget isLocked() {\n\t\treturn this._isLocked;\n\t}\n\t/**\n\t* Locks the buffer.\n\t*/\n\tlock() {\n\t\tthis._isLocked = true;\n\t}\n\t/**\n\t* Unlocks the buffer.\n\t*/\n\tunlock() {\n\t\tthis._isLocked = false;\n\t}\n\t/**\n\t* Destroys the buffer.\n\t*/\n\tdestroy() {\n\t\tthis.model.document.off(\"change\", this._changeCallback);\n\t\tthis.model.document.selection.off(\"change:range\", this._selectionChangeCallback);\n\t\tthis.model.document.selection.off(\"change:attribute\", this._selectionChangeCallback);\n\t}\n\t/**\n\t* Resets the change buffer.\n\t*\n\t* @param ignoreLock Whether internal lock {@link #isLocked} should be ignored.\n\t*/\n\t_reset(ignoreLock = false) {\n\t\tif (!this.isLocked || ignoreLock) {\n\t\t\tthis._batch = null;\n\t\t\tthis._size = 0;\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 typing/inserttextcommand\n*/\n/**\n* The insert text command. Used by the {@link module:typing/input~Input input feature} to handle typing.\n*/\nvar InsertTextCommand = class extends Command {\n\t/**\n\t* Typing's change buffer used to group subsequent changes into batches.\n\t*/\n\t_buffer;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param undoStepSize The maximum number of atomic changes\n\t* which can be contained in one batch in the command buffer.\n\t*/\n\tconstructor(editor, undoStepSize) {\n\t\tsuper(editor);\n\t\tthis._buffer = new TypingChangeBuffer(editor.model, undoStepSize);\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\t/**\n\t* The current change buffer.\n\t*/\n\tget buffer() {\n\t\treturn this._buffer;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._buffer.destroy();\n\t}\n\t/**\n\t* Executes the input command. It replaces the content within the given range with the given text.\n\t* Replacing is a two step process, first the content within the range is removed and then the new text is inserted\n\t* at the beginning of the range (which after the removal is a collapsed range).\n\t*\n\t* @fires execute\n\t* @param options The command options.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst text = options.text || \"\";\n\t\tconst textInsertions = text.length;\n\t\tlet selection = doc.selection;\n\t\tif (options.selection) selection = options.selection;\n\t\telse if (options.range) selection = model.createSelection(options.range);\n\t\tif (!model.canEditAt(selection)) return;\n\t\tconst resultRange = options.resultRange;\n\t\tmodel.enqueueChange(this._buffer.batch, (writer) => {\n\t\t\tthis._buffer.lock();\n\t\t\tconst selectionAttributes = Array.from(doc.selection.getAttributes());\n\t\t\tmodel.deleteContent(selection);\n\t\t\tif (text) model.insertContent(writer.createText(text, selectionAttributes), selection);\n\t\t\tif (resultRange) writer.setSelection(resultRange);\n\t\t\telse if (!selection.is(\"documentSelection\")) writer.setSelection(selection);\n\t\t\tthis._buffer.unlock();\n\t\t\tthis._buffer.input(textInsertions);\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 typing/inserttextobserver\n*/\nconst TYPING_INPUT_TYPES = [\"insertText\", \"insertReplacementText\"];\nconst TYPING_INPUT_TYPES_ANDROID = [...TYPING_INPUT_TYPES, \"insertCompositionText\"];\n/**\n* Text insertion observer introduces the {@link module:engine/view/document~ViewDocument#event:insertText} event.\n*/\nvar InsertTextObserver = class extends Observer {\n\t/**\n\t* Instance of the focus observer. Insert text observer calls\n\t* {@link module:engine/view/observer/focusobserver~FocusObserver#flush} to mark the latest focus change as complete.\n\t*/\n\tfocusObserver;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tthis.focusObserver = view.getObserver(FocusObserver);\n\t\tconst typingInputTypes = env.isAndroid ? TYPING_INPUT_TYPES_ANDROID : TYPING_INPUT_TYPES;\n\t\tconst viewDocument = view.document;\n\t\tviewDocument.on(\"beforeinput\", (evt, data) => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tconst { data: text, targetRanges, inputType, domEvent, isComposing } = data;\n\t\t\tif (!typingInputTypes.includes(inputType)) return;\n\t\t\tthis.focusObserver.flush();\n\t\t\tconst eventInfo = new EventInfo(viewDocument, \"insertText\");\n\t\t\tviewDocument.fire(eventInfo, new ViewDocumentDomEventData(view, domEvent, {\n\t\t\t\ttext,\n\t\t\t\tselection: view.createSelection(targetRanges),\n\t\t\t\tisComposing\n\t\t\t}));\n\t\t\tif (eventInfo.stop.called) evt.stop();\n\t\t});\n\t\tif (!env.isAndroid) viewDocument.on(\"compositionend\", (evt, { data, domEvent }) => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tif (!data) return;\n\t\t\tviewDocument.fire(\"insertText\", new ViewDocumentDomEventData(view, domEvent, {\n\t\t\t\ttext: data,\n\t\t\t\tisComposing: true\n\t\t\t}));\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\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 typing/input\n*/\n/**\n* Handles text input coming from the keyboard or other input methods.\n*/\nvar Input = class extends Plugin {\n\t/**\n\t* The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t*/\n\t_typingQueue;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Input\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst modelSelection = model.document.selection;\n\t\tthis._typingQueue = new TypingQueue(editor);\n\t\tview.addObserver(InsertTextObserver);\n\t\tconst insertTextCommand = new InsertTextCommand(editor, editor.config.get(\"typing.undoStep\") || 20);\n\t\teditor.commands.add(\"insertText\", insertTextCommand);\n\t\teditor.commands.add(\"input\", insertTextCommand);\n\t\tthis.listenTo(view.document, \"beforeinput\", () => {\n\t\t\tthis._typingQueue.flush(\"next beforeinput\");\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(view.document, \"insertText\", (evt, data) => {\n\t\t\tconst { text, selection: viewSelection } = data;\n\t\t\tif (view.document.selection.isFake && viewSelection && view.document.selection.isSimilar(viewSelection)) data.preventDefault();\n\t\t\tif (viewSelection && Array.from(viewSelection.getRanges()).some((range) => !range.isCollapsed)) data.preventDefault();\n\t\t\tif (!insertTextCommand.isEnabled) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet modelRanges;\n\t\t\tif (viewSelection) modelRanges = Array.from(viewSelection.getRanges()).filter((viewRange) => {\n\t\t\t\treturn viewRange.root.is(\"rootElement\");\n\t\t\t}).map((viewRange) => mapper.toModelRange(viewRange)).map((modelRange) => _tryFixingModelRange(modelRange, model.schema) || modelRange);\n\t\t\tif (!modelRanges || !modelRanges.length) modelRanges = Array.from(modelSelection.getRanges());\n\t\t\tlet insertText = text;\n\t\t\tif (env.isAndroid) {\n\t\t\t\tconst selectedText = Array.from(modelRanges[0].getItems()).reduce((rangeText, node) => {\n\t\t\t\t\treturn rangeText + (node.is(\"$textProxy\") ? node.data : \"\");\n\t\t\t\t}, \"\");\n\t\t\t\tif (selectedText) {\n\t\t\t\t\tif (selectedText.length <= insertText.length) {\n\t\t\t\t\t\tif (insertText.startsWith(selectedText)) {\n\t\t\t\t\t\t\tinsertText = insertText.substring(selectedText.length);\n\t\t\t\t\t\t\tmodelRanges[0].start = modelRanges[0].start.getShiftedBy(selectedText.length);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (selectedText.startsWith(insertText)) {\n\t\t\t\t\t\tmodelRanges[0].start = modelRanges[0].start.getShiftedBy(insertText.length);\n\t\t\t\t\t\tinsertText = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (insertText.length == 0 && modelRanges[0].isCollapsed) return;\n\t\t\t}\n\t\t\tconst commandData = {\n\t\t\t\ttext: insertText,\n\t\t\t\tselection: model.createSelection(modelRanges)\n\t\t\t};\n\t\t\tthis._typingQueue.push(commandData, Boolean(data.isComposing));\n\t\t\tif (data.domEvent.defaultPrevented) this._typingQueue.flush(\"beforeinput default prevented\");\n\t\t});\n\t\tif (env.isAndroid) this.listenTo(view.document, \"keydown\", (evt, data) => {\n\t\t\tif (modelSelection.isCollapsed || data.keyCode != 229 || !view.document.isComposing) return;\n\t\t\tdeleteSelectionContent(model, insertTextCommand);\n\t\t});\n\t\telse this.listenTo(view.document, \"compositionstart\", () => {\n\t\t\tif (modelSelection.isCollapsed) return;\n\t\t\tdeleteSelectionContent(model, insertTextCommand);\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(view.document, \"mutations\", (evt, { mutations }) => {\n\t\t\tif (this._typingQueue.hasAffectedElements()) for (const { node } of mutations) {\n\t\t\t\tconst viewElement = findMappedViewAncestor(node, mapper);\n\t\t\t\tconst modelElement = mapper.toModelElement(viewElement);\n\t\t\t\tif (this._typingQueue.isElementAffected(modelElement)) {\n\t\t\t\t\tthis._typingQueue.flush(\"mutations\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(view.document, \"compositionend\", () => {\n\t\t\tthis._typingQueue.flush(\"before composition end\");\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(view.document, \"compositionend\", () => {\n\t\t\tthis._typingQueue.flush(\"after composition end\");\n\t\t\tconst mutations = [];\n\t\t\tif (this._typingQueue.hasAffectedElements()) for (const element of this._typingQueue.flushAffectedElements()) {\n\t\t\t\tconst viewElement = mapper.toViewElement(element);\n\t\t\t\tif (!viewElement) continue;\n\t\t\t\tmutations.push({\n\t\t\t\t\ttype: \"children\",\n\t\t\t\t\tnode: viewElement\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (mutations.length || !env.isAndroid) view.document.fire(\"mutations\", { mutations });\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._typingQueue.destroy();\n\t}\n};\n/**\n* The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n*/\nvar TypingQueue = class {\n\t/**\n\t* The editor instance.\n\t*/\n\teditor;\n\t/**\n\t* Debounced queue flush as a safety mechanism for cases of mutation observer not triggering.\n\t*/\n\tflushDebounced = debounce(() => this.flush(\"timeout\"), 50);\n\t/**\n\t* The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t*/\n\t_queue = [];\n\t/**\n\t* Whether there is any composition enqueued or plain typing only.\n\t*/\n\t_isComposing = false;\n\t/**\n\t* A set of model elements. The typing happened in those elements. It's used for mutations check.\n\t*/\n\t_affectedElements = /* @__PURE__ */ new Set();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t}\n\t/**\n\t* Destroys the helper object.\n\t*/\n\tdestroy() {\n\t\tthis.flushDebounced.cancel();\n\t\tthis._affectedElements.clear();\n\t\twhile (this._queue.length) this.shift();\n\t}\n\t/**\n\t* Returns the size of the queue.\n\t*/\n\tget length() {\n\t\treturn this._queue.length;\n\t}\n\t/**\n\t* Push next insertText command data to the queue.\n\t*/\n\tpush(commandData, isComposing) {\n\t\tconst commandLiveData = { text: commandData.text };\n\t\tif (commandData.selection) {\n\t\t\tcommandLiveData.selectionRanges = [];\n\t\t\tfor (const range of commandData.selection.getRanges()) {\n\t\t\t\tcommandLiveData.selectionRanges.push(ModelLiveRange.fromRange(range));\n\t\t\t\tthis._affectedElements.add(range.start.parent);\n\t\t\t}\n\t\t}\n\t\tthis._queue.push(commandLiveData);\n\t\tthis._isComposing ||= isComposing;\n\t\tthis.flushDebounced();\n\t}\n\t/**\n\t* Shift the first item from the insertText command data queue.\n\t*/\n\tshift() {\n\t\tconst commandLiveData = this._queue.shift();\n\t\tconst commandData = { text: commandLiveData.text };\n\t\tif (commandLiveData.selectionRanges) {\n\t\t\tconst ranges = commandLiveData.selectionRanges.map((liveRange) => detachLiveRange(liveRange)).filter((range) => !!range);\n\t\t\tif (ranges.length) commandData.selection = this.editor.model.createSelection(ranges);\n\t\t}\n\t\treturn commandData;\n\t}\n\t/**\n\t* Applies all queued insertText command executions.\n\t*\n\t* @param reason Used only for debugging.\n\t*/\n\tflush(reason) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tthis.flushDebounced.cancel();\n\t\tif (!this._queue.length) return;\n\t\tconst buffer = editor.commands.get(\"insertText\").buffer;\n\t\tmodel.enqueueChange(buffer.batch, () => {\n\t\t\tbuffer.lock();\n\t\t\twhile (this._queue.length) {\n\t\t\t\tconst commandData = this.shift();\n\t\t\t\teditor.execute(\"insertText\", commandData);\n\t\t\t}\n\t\t\tbuffer.unlock();\n\t\t\tif (!this._isComposing) this._affectedElements.clear();\n\t\t\tthis._isComposing = false;\n\t\t});\n\t\tview.scrollToTheSelection();\n\t}\n\t/**\n\t* Returns `true` if the given model element is related to recent typing.\n\t*/\n\tisElementAffected(element) {\n\t\treturn this._affectedElements.has(element);\n\t}\n\t/**\n\t* Returns `true` if there are any affected elements in the queue.\n\t*/\n\thasAffectedElements() {\n\t\treturn this._affectedElements.size > 0;\n\t}\n\t/**\n\t* Returns an array of typing-related elements and clears the internal list.\n\t*/\n\tflushAffectedElements() {\n\t\tconst result = Array.from(this._affectedElements);\n\t\tthis._affectedElements.clear();\n\t\treturn result;\n\t}\n};\n/**\n* Deletes the content selected by the document selection at the start of composition.\n*/\nfunction deleteSelectionContent(model, insertTextCommand) {\n\tif (!insertTextCommand.isEnabled) return;\n\tconst buffer = insertTextCommand.buffer;\n\tbuffer.lock();\n\tmodel.enqueueChange(buffer.batch, () => {\n\t\tmodel.deleteContent(model.document.selection);\n\t});\n\tbuffer.unlock();\n}\n/**\n* Detaches a ModelLiveRange and returns the static range from it.\n*/\nfunction detachLiveRange(liveRange) {\n\tconst range = liveRange.toRange();\n\tliveRange.detach();\n\tif (range.root.rootName == \"$graveyard\") return null;\n\treturn range;\n}\n/**\n* For the given `viewNode`, finds and returns the closest ancestor of this node that has a mapping to the model.\n*/\nfunction findMappedViewAncestor(viewNode, mapper) {\n\tlet node = viewNode.is(\"$text\") ? viewNode.parent : viewNode;\n\twhile (!mapper.toModelElement(node)) node = node.parent;\n\treturn 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 typing/deletecommand\n*/\n/**\n* The delete command. Used by the {@link module:typing/delete~Delete delete feature} to handle the <kbd>Delete</kbd> and\n* <kbd>Backspace</kbd> keys.\n*/\nvar DeleteCommand = class extends Command {\n\t/**\n\t* The directionality of the delete describing in what direction it should\n\t* consume the content when the selection is collapsed.\n\t*/\n\tdirection;\n\t/**\n\t* Delete's change buffer used to group subsequent changes into batches.\n\t*/\n\t_buffer;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param direction The directionality of the delete describing in what direction it\n\t* should consume the content when the selection is collapsed.\n\t*/\n\tconstructor(editor, direction) {\n\t\tsuper(editor);\n\t\tthis.direction = direction;\n\t\tthis._buffer = new TypingChangeBuffer(editor.model, editor.config.get(\"typing.undoStep\"));\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\t/**\n\t* The current change buffer.\n\t*/\n\tget buffer() {\n\t\treturn this._buffer;\n\t}\n\t/**\n\t* Executes the delete command. Depending on whether the selection is collapsed or not, deletes its content\n\t* or a piece of content in the {@link #direction defined direction}.\n\t*\n\t* @fires execute\n\t* @param options The command options.\n\t* @param options.unit See {@link module:engine/model/utils/modifyselection~modifySelection}'s options.\n\t* @param options.sequence A number describing which subsequent delete event it is without the key being released.\n\t* See the {@link module:engine/view/document~ViewDocument#event:delete} event data.\n\t* @param options.selection Selection to remove. If not set, current model selection will be used.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tmodel.enqueueChange(this._buffer.batch, (writer) => {\n\t\t\tthis._buffer.lock();\n\t\t\tconst selection = writer.createSelection(options.selection || doc.selection);\n\t\t\tif (!model.canEditAt(selection)) return;\n\t\t\tconst sequence = options.sequence || 1;\n\t\t\tconst doNotResetEntireContent = selection.isCollapsed;\n\t\t\tif (selection.isCollapsed) model.modifySelection(selection, {\n\t\t\t\tdirection: this.direction,\n\t\t\t\tunit: options.unit,\n\t\t\t\ttreatEmojiAsSingleUnit: true\n\t\t\t});\n\t\t\tif (this._shouldEntireContentBeReplacedWithParagraph(sequence)) {\n\t\t\t\tthis._replaceEntireContentWithParagraph(writer);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._shouldReplaceFirstBlockWithParagraph(selection, sequence)) {\n\t\t\t\tthis.editor.execute(\"paragraph\", { selection });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (selection.isCollapsed) return;\n\t\t\tlet changeCount = 0;\n\t\t\tselection.getFirstRange().getMinimalFlatRanges().forEach((range) => {\n\t\t\t\tchangeCount += count(range.getWalker({\n\t\t\t\t\tsingleCharacters: true,\n\t\t\t\t\tignoreElementEnd: true,\n\t\t\t\t\tshallow: true\n\t\t\t\t}));\n\t\t\t});\n\t\t\tmodel.deleteContent(selection, {\n\t\t\t\tdoNotResetEntireContent,\n\t\t\t\tdirection: this.direction\n\t\t\t});\n\t\t\tthis._buffer.input(changeCount);\n\t\t\twriter.setSelection(selection);\n\t\t\tthis._buffer.unlock();\n\t\t});\n\t}\n\t/**\n\t* If the user keeps <kbd>Backspace</kbd> or <kbd>Delete</kbd> key pressed, the content of the current\n\t* editable will be cleared. However, this will not yet lead to resetting the remaining block to a paragraph\n\t* (which happens e.g. when the user does <kbd>Ctrl</kbd> + <kbd>A</kbd>, <kbd>Backspace</kbd>).\n\t*\n\t* But, if the user pressed the key in an empty editable for the first time,\n\t* we want to replace the entire content with a paragraph if:\n\t*\n\t* * the current limit element is empty,\n\t* * the paragraph is allowed in the limit element,\n\t* * the limit doesn't already have a paragraph inside.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5-typing/issues/61.\n\t*\n\t* @param sequence A number describing which subsequent delete event it is without the key being released.\n\t*/\n\t_shouldEntireContentBeReplacedWithParagraph(sequence) {\n\t\tif (sequence > 1) return false;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst limitElement = model.schema.getLimitElement(selection);\n\t\tif (!(selection.isCollapsed && selection.containsEntireContent(limitElement))) return false;\n\t\tif (!model.schema.checkChild(limitElement, \"paragraph\")) return false;\n\t\tconst limitElementFirstChild = limitElement.getChild(0);\n\t\tif (limitElementFirstChild && limitElementFirstChild.is(\"element\", \"paragraph\")) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* The entire content is replaced with the paragraph. Selection is moved inside the paragraph.\n\t*\n\t* @param writer The model writer.\n\t*/\n\t_replaceEntireContentWithParagraph(writer) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst limitElement = model.schema.getLimitElement(selection);\n\t\tconst paragraph = writer.createElement(\"paragraph\");\n\t\twriter.remove(writer.createRangeIn(limitElement));\n\t\twriter.insert(paragraph, limitElement);\n\t\twriter.setSelection(paragraph, 0);\n\t}\n\t/**\n\t* Checks if the selection is inside an empty element that is the first child of the limit element\n\t* and should be replaced with a paragraph.\n\t*\n\t* @param selection The selection.\n\t* @param sequence A number describing which subsequent delete event it is without the key being released.\n\t*/\n\t_shouldReplaceFirstBlockWithParagraph(selection, sequence) {\n\t\tconst model = this.editor.model;\n\t\tif (sequence > 1 || this.direction != \"backward\") return false;\n\t\tif (!selection.isCollapsed) return false;\n\t\tconst position = selection.getFirstPosition();\n\t\tconst limitElement = model.schema.getLimitElement(position);\n\t\tconst limitElementFirstChild = limitElement.getChild(0);\n\t\tif (position.parent != limitElementFirstChild) return false;\n\t\tif (!selection.containsEntireContent(limitElementFirstChild)) return false;\n\t\tif (!model.schema.checkChild(limitElement, \"paragraph\")) return false;\n\t\tif (limitElementFirstChild.name == \"paragraph\") return false;\n\t\treturn 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 typing/deleteobserver\n*/\nconst DELETE_CHARACTER = \"character\";\nconst DELETE_WORD = \"word\";\nconst DELETE_CODE_POINT = \"codePoint\";\nconst DELETE_SELECTION = \"selection\";\nconst DELETE_BACKWARD = \"backward\";\nconst DELETE_FORWARD = \"forward\";\nconst DELETE_EVENT_TYPES = {\n\tdeleteContent: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteContentBackward: {\n\t\tunit: DELETE_CODE_POINT,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteWordBackward: {\n\t\tunit: DELETE_WORD,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteHardLineBackward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteSoftLineBackward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\tdeleteContentForward: {\n\t\tunit: DELETE_CHARACTER,\n\t\tdirection: DELETE_FORWARD\n\t},\n\tdeleteWordForward: {\n\t\tunit: DELETE_WORD,\n\t\tdirection: DELETE_FORWARD\n\t},\n\tdeleteHardLineForward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_FORWARD\n\t},\n\tdeleteSoftLineForward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_FORWARD\n\t}\n};\n/**\n* Delete observer introduces the {@link module:engine/view/document~ViewDocument#event:delete} event.\n*\n* @internal\n*/\nvar DeleteObserver = class extends Observer {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tconst document = view.document;\n\t\tlet sequence = 0;\n\t\tdocument.on(\"keydown\", () => {\n\t\t\tsequence++;\n\t\t});\n\t\tdocument.on(\"keyup\", () => {\n\t\t\tsequence = 0;\n\t\t});\n\t\tdocument.on(\"beforeinput\", (evt, data) => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tconst { targetRanges, domEvent, inputType } = data;\n\t\t\tconst deleteEventSpec = DELETE_EVENT_TYPES[inputType];\n\t\t\tif (!deleteEventSpec) return;\n\t\t\tconst deleteData = {\n\t\t\t\tdirection: deleteEventSpec.direction,\n\t\t\t\tunit: deleteEventSpec.unit,\n\t\t\t\tsequence\n\t\t\t};\n\t\t\tif (deleteData.unit == DELETE_SELECTION) deleteData.selectionToRemove = view.createSelection(targetRanges[0]);\n\t\t\tif (inputType === \"deleteContentBackward\") {\n\t\t\t\tif (env.isAndroid) deleteData.sequence = 1;\n\t\t\t\tif (shouldUseTargetRanges(targetRanges)) {\n\t\t\t\t\tdeleteData.unit = DELETE_SELECTION;\n\t\t\t\t\tdeleteData.selectionToRemove = view.createSelection(targetRanges);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst eventInfo = new BubblingEventInfo(document, \"delete\", targetRanges[0]);\n\t\t\tdocument.fire(eventInfo, new ViewDocumentDomEventData(view, domEvent, deleteData));\n\t\t\tif (eventInfo.stop.called) evt.stop();\n\t\t});\n\t\tif (env.isBlink) enableChromeWorkaround(this);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\n};\n/**\n* Enables workaround for the issue https://github.com/ckeditor/ckeditor5/issues/11904.\n*/\nfunction enableChromeWorkaround(observer) {\n\tconst view = observer.view;\n\tconst document = view.document;\n\tlet pressedKeyCode = null;\n\tlet beforeInputReceived = false;\n\tdocument.on(\"keydown\", (evt, { keyCode }) => {\n\t\tpressedKeyCode = keyCode;\n\t\tbeforeInputReceived = false;\n\t});\n\tdocument.on(\"keyup\", (evt, { keyCode, domEvent }) => {\n\t\tconst selection = document.selection;\n\t\tconst shouldFireDeleteEvent = observer.isEnabled && keyCode == pressedKeyCode && isDeleteKeyCode(keyCode) && !selection.isCollapsed && !beforeInputReceived;\n\t\tpressedKeyCode = null;\n\t\tif (shouldFireDeleteEvent) {\n\t\t\tconst targetRange = selection.getFirstRange();\n\t\t\tconst eventInfo = new BubblingEventInfo(document, \"delete\", targetRange);\n\t\t\tconst deleteData = {\n\t\t\t\tunit: DELETE_SELECTION,\n\t\t\t\tdirection: getDeleteDirection(keyCode),\n\t\t\t\tselectionToRemove: selection\n\t\t\t};\n\t\t\tdocument.fire(eventInfo, new ViewDocumentDomEventData(view, domEvent, deleteData));\n\t\t}\n\t});\n\tdocument.on(\"beforeinput\", (evt, { inputType }) => {\n\t\tconst deleteEventSpec = DELETE_EVENT_TYPES[inputType];\n\t\tif (isDeleteKeyCode(pressedKeyCode) && deleteEventSpec && deleteEventSpec.direction == getDeleteDirection(pressedKeyCode)) beforeInputReceived = true;\n\t}, { priority: \"high\" });\n\tdocument.on(\"beforeinput\", (evt, { inputType, data }) => {\n\t\tif (pressedKeyCode == keyCodes.delete && inputType == \"insertText\" && data == \"\") evt.stop();\n\t}, { priority: \"high\" });\n\tfunction isDeleteKeyCode(keyCode) {\n\t\treturn keyCode == keyCodes.backspace || keyCode == keyCodes.delete;\n\t}\n\tfunction getDeleteDirection(keyCode) {\n\t\treturn keyCode == keyCodes.backspace ? DELETE_BACKWARD : DELETE_FORWARD;\n\t}\n}\n/**\n* Verifies whether the given target ranges cover more than a single character and should be used instead of a single code-point deletion.\n*/\nfunction shouldUseTargetRanges(targetRanges) {\n\tif (targetRanges.length != 1 || targetRanges[0].isCollapsed) return false;\n\tconst walker = targetRanges[0].getWalker({\n\t\tdirection: \"backward\",\n\t\tsingleCharacters: true,\n\t\tignoreElementEnd: true\n\t});\n\tlet count = 0;\n\tfor (const { nextPosition, item } of walker) {\n\t\tif (nextPosition.parent.is(\"$text\")) {\n\t\t\tconst data = nextPosition.parent.data;\n\t\t\tconst offset = nextPosition.offset;\n\t\t\tif (isInsideSurrogatePair(data, offset) || isInsideCombinedSymbol(data, offset) || isInsideEmojiSequence(data, offset)) continue;\n\t\t\tcount++;\n\t\t} else if (item.is(\"containerElement\") || item.is(\"emptyElement\")) count++;\n\t\tif (count > 1) return true;\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 typing/delete\n*/\n/**\n* The delete and backspace feature. Handles keys such as <kbd>Delete</kbd> and <kbd>Backspace</kbd>, other\n* keystrokes and user actions that result in deleting content in the editor.\n*/\nvar Delete = class extends Plugin {\n\t/**\n\t* Whether pressing backspace should trigger undo action\n\t*/\n\t_undoOnBackspace;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Delete\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst modelDocument = editor.model.document;\n\t\tview.addObserver(DeleteObserver);\n\t\tthis._undoOnBackspace = false;\n\t\tconst deleteForwardCommand = new DeleteCommand(editor, \"forward\");\n\t\teditor.commands.add(\"deleteForward\", deleteForwardCommand);\n\t\teditor.commands.add(\"forwardDelete\", deleteForwardCommand);\n\t\teditor.commands.add(\"delete\", new DeleteCommand(editor, \"backward\"));\n\t\tthis.listenTo(viewDocument, \"delete\", (evt, data) => {\n\t\t\tif (!viewDocument.isComposing) data.preventDefault();\n\t\t\tconst { direction, sequence, selectionToRemove, unit } = data;\n\t\t\tconst commandName = direction === \"forward\" ? \"deleteForward\" : \"delete\";\n\t\t\tconst commandData = { sequence };\n\t\t\tif (unit == \"selection\") {\n\t\t\t\tconst modelRanges = Array.from(selectionToRemove.getRanges()).map((viewRange) => editor.editing.mapper.toModelRange(viewRange)).map((modelRange) => _tryFixingModelRange(modelRange, editor.model.schema) || modelRange);\n\t\t\t\tcommandData.selection = editor.model.createSelection(modelRanges);\n\t\t\t} else commandData.unit = unit;\n\t\t\teditor.execute(commandName, commandData);\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(viewDocument, \"keydown\", (evt, data) => {\n\t\t\tif (viewDocument.isComposing || data.keyCode != keyCodes.backspace || !modelDocument.selection.isCollapsed) return;\n\t\t\tconst ancestorLimit = editor.model.schema.getLimitElement(modelDocument.selection);\n\t\t\tconst limitStartPosition = editor.model.createPositionAt(ancestorLimit, 0);\n\t\t\tif (limitStartPosition.isTouching(modelDocument.selection.getFirstPosition())) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tconst modelRange = editor.model.schema.getNearestSelectionRange(limitStartPosition, \"forward\");\n\t\t\t\tif (!modelRange) return;\n\t\t\t\tconst viewSelection = view.createSelection(editor.editing.mapper.toViewRange(modelRange));\n\t\t\t\tconst targetRange = viewSelection.getFirstRange();\n\t\t\t\tconst eventInfo = new BubblingEventInfo(document, \"delete\", targetRange);\n\t\t\t\tconst deleteData = {\n\t\t\t\t\tunit: \"selection\",\n\t\t\t\t\tdirection: \"backward\",\n\t\t\t\t\tselectionToRemove: viewSelection\n\t\t\t\t};\n\t\t\t\tviewDocument.fire(eventInfo, new ViewDocumentDomEventData(view, data.domEvent, deleteData));\n\t\t\t}\n\t\t});\n\t\tif (this.editor.plugins.has(\"UndoEditing\")) {\n\t\t\tthis.listenTo(viewDocument, \"delete\", (evt, data) => {\n\t\t\t\tif (this._undoOnBackspace && data.direction == \"backward\" && data.sequence == 1 && data.unit == \"codePoint\") {\n\t\t\t\t\tthis._undoOnBackspace = false;\n\t\t\t\t\teditor.execute(\"undo\");\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t}, { context: \"$capture\" });\n\t\t\tthis.listenTo(modelDocument, \"change\", () => {\n\t\t\t\tthis._undoOnBackspace = false;\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* If the next user action after calling this method is pressing backspace, it would undo the last change.\n\t*\n\t* Requires {@link module:undo/undoediting~UndoEditing} plugin. If not loaded, does nothing.\n\t*/\n\trequestUndoOnBackspace() {\n\t\tif (this.editor.plugins.has(\"UndoEditing\")) this._undoOnBackspace = 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 typing/typing\n*/\n/**\n* The typing feature. It handles typing.\n*\n* This is a \"glue\" plugin which loads the {@link module:typing/input~Input} and {@link module:typing/delete~Delete}\n* plugins.\n*/\nvar Typing = class extends Plugin {\n\tstatic get requires() {\n\t\treturn [Input, Delete];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Typing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* Returns the last text line from the given range.\n*\n* \"The last text line\" is understood as text (from one or more text nodes) which is limited either by a parent block\n* or by inline elements (e.g. `<softBreak>`).\n*\n* ```ts\n* const rangeToCheck = model.createRange(\n* \tmodel.createPositionAt( paragraph, 0 ),\n* \tmodel.createPositionAt( paragraph, 'end' )\n* );\n*\n* const { text, range } = getLastTextLine( rangeToCheck, model );\n* ```\n*\n* For model below, the returned `text` will be \"Foo bar baz\" and `range` will be set on whole `<paragraph>` content:\n*\n* ```xml\n* <paragraph>Foo bar baz<paragraph>\n* ```\n*\n* However, in below case, `text` will be set to \"baz\" and `range` will be set only on \"baz\".\n*\n* ```xml\n* <paragraph>Foo<softBreak></softBreak>bar<softBreak></softBreak>baz<paragraph>\n* ```\n*/\nfunction getLastTextLine(range, model) {\n\tlet start = range.start;\n\treturn {\n\t\ttext: Array.from(range.getWalker({ ignoreElementEnd: false })).reduce((rangeText, { item }) => {\n\t\t\tif (!(item.is(\"$text\") || item.is(\"$textProxy\"))) {\n\t\t\t\tstart = model.createPositionAfter(item);\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\treturn rangeText + item.data;\n\t\t}, \"\"),\n\t\trange: model.createRange(start, range.end)\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 typing/textwatcher\n*/\nconst TextWatcherBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The text watcher feature.\n*\n* Fires the {@link module:typing/textwatcher~TextWatcher#event:matched:data `matched:data`},\n* {@link module:typing/textwatcher~TextWatcher#event:matched:selection `matched:selection`} and\n* {@link module:typing/textwatcher~TextWatcher#event:unmatched `unmatched`} events on typing or selection changes.\n*/\nvar TextWatcher = class extends TextWatcherBase {\n\t/**\n\t* The editor's model.\n\t*/\n\tmodel;\n\t/**\n\t* The function used to match the text.\n\t*\n\t* The test callback can return 3 values:\n\t*\n\t* * `false` if there is no match,\n\t* * `true` if there is a match,\n\t* * an object if there is a match and we want to pass some additional information to the {@link #event:matched:data} event.\n\t*/\n\ttestCallback;\n\t/**\n\t* Whether there is a match currently.\n\t*/\n\t_hasMatch;\n\t/**\n\t* Creates a text watcher instance.\n\t*\n\t* @param testCallback See {@link module:typing/textwatcher~TextWatcher#testCallback}.\n\t*/\n\tconstructor(model, testCallback) {\n\t\tsuper();\n\t\tthis.model = model;\n\t\tthis.testCallback = testCallback;\n\t\tthis._hasMatch = false;\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.on(\"change:isEnabled\", () => {\n\t\t\tif (this.isEnabled) this._startListening();\n\t\t\telse {\n\t\t\t\tthis.stopListening(model.document.selection);\n\t\t\t\tthis.stopListening(model.document);\n\t\t\t}\n\t\t});\n\t\tthis._startListening();\n\t}\n\t/**\n\t* Flag indicating whether there is a match currently.\n\t*/\n\tget hasMatch() {\n\t\treturn this._hasMatch;\n\t}\n\t/**\n\t* Starts listening to the editor for typing and selection events.\n\t*/\n\t_startListening() {\n\t\tconst document = this.model.document;\n\t\tthis.listenTo(document.selection, \"change:range\", (evt, { directChange }) => {\n\t\t\tif (!directChange) return;\n\t\t\tif (!document.selection.isCollapsed) {\n\t\t\t\tif (this.hasMatch) {\n\t\t\t\t\tthis.fire(\"unmatched\");\n\t\t\t\t\tthis._hasMatch = false;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._evaluateTextBeforeSelection(\"selection\");\n\t\t});\n\t\tthis.listenTo(document, \"change:data\", (evt, batch) => {\n\t\t\tif (batch.isUndo || !batch.isLocal) return;\n\t\t\tthis._evaluateTextBeforeSelection(\"data\", { batch });\n\t\t});\n\t}\n\t/**\n\t* Checks the editor content for matched text.\n\t*\n\t* @fires matched:data\n\t* @fires matched:selection\n\t* @fires unmatched\n\t*\n\t* @param suffix A suffix used for generating the event name.\n\t* @param data Data object for event.\n\t*/\n\t_evaluateTextBeforeSelection(suffix, data = {}) {\n\t\tconst model = this.model;\n\t\tconst selection = model.document.selection;\n\t\tconst rangeBeforeSelection = model.createRange(model.createPositionAt(selection.focus.parent, 0), selection.focus);\n\t\tconst { text, range } = getLastTextLine(rangeBeforeSelection, model);\n\t\tconst testResult = this.testCallback(text);\n\t\tif (!testResult && this.hasMatch) this.fire(\"unmatched\");\n\t\tthis._hasMatch = !!testResult;\n\t\tif (testResult) {\n\t\t\tconst eventData = Object.assign(data, {\n\t\t\t\ttext,\n\t\t\t\trange\n\t\t\t});\n\t\t\tif (typeof testResult == \"object\") Object.assign(eventData, testResult);\n\t\t\tthis.fire(`matched:${suffix}`, eventData);\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 typing/twostepcaretmovement\n*/\n/**\n* This plugin enables the two-step caret (phantom) movement behavior for\n* {@link module:typing/twostepcaretmovement~TwoStepCaretMovement#registerAttribute registered attributes}\n* on arrow right (<kbd>→</kbd>) and left (<kbd>←</kbd>) key press.\n*\n* Thanks to this (phantom) caret movement the user is able to type before/after as well as at the\n* beginning/end of an attribute.\n*\n* **Note:** This plugin support right–to–left (Arabic, Hebrew, etc.) content by mirroring its behavior\n* but for the sake of simplicity examples showcase only left–to–right use–cases.\n*\n* # Forward movement\n*\n* ## \"Entering\" an attribute:\n*\n* When this plugin is enabled and registered for the `a` attribute and the selection is right before it\n* (at the attribute boundary), pressing the right arrow key will not move the selection but update its\n* attributes accordingly:\n*\n* * When enabled:\n*\n* ```xml\n* foo{}<$text a=\"true\">bar</$text>\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* foo<$text a=\"true\">{}bar</$text>\n* ```\n*\n* * When disabled:\n*\n* ```xml\n* foo{}<$text a=\"true\">bar</$text>\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* foo<$text a=\"true\">b{}ar</$text>\n* ```\n*\n*\n* ## \"Leaving\" an attribute:\n*\n* * When enabled:\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text>baz\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar</$text>{}baz\n* ```\n*\n* * When disabled:\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text>baz\n* ```\n*\n* \t<kbd>→</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar</$text>b{}az\n* ```\n*\n* # Backward movement\n*\n* * When enabled:\n*\n* ```xml\n* <$text a=\"true\">bar</$text>{}baz\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text>baz\n* ```\n*\n* * When disabled:\n*\n* ```xml\n* <$text a=\"true\">bar</$text>{}baz\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\">ba{}r</$text>b{}az\n* ```\n*\n* # Multiple attributes\n*\n* * When enabled and many attributes starts or ends at the same position:\n*\n* ```xml\n* <$text a=\"true\" b=\"true\">bar</$text>{}baz\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\" b=\"true\">bar{}</$text>baz\n* ```\n*\n* * When enabled and one procedes another:\n*\n* ```xml\n* <$text a=\"true\">bar</$text><$text b=\"true\">{}bar</$text>\n* ```\n*\n* \t<kbd>←</kbd>\n*\n* ```xml\n* <$text a=\"true\">bar{}</$text><$text b=\"true\">bar</$text>\n* ```\n*\n*/\nvar TwoStepCaretMovement = class extends Plugin {\n\t/**\n\t* A set of attributes to handle.\n\t*/\n\tattributes;\n\t/**\n\t* The current UID of the overridden gravity, as returned by\n\t* {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}.\n\t*/\n\t_overrideUid;\n\t/**\n\t* A flag indicating that the automatic gravity restoration should not happen upon the next\n\t* gravity restoration.\n\t* {@link module:engine/model/selection~ModelSelection#event:change:range} event.\n\t*/\n\t_isNextGravityRestorationSkipped = false;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TwoStepCaretMovement\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.attributes = /* @__PURE__ */ new Set();\n\t\tthis._overrideUid = null;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst locale = editor.locale;\n\t\tconst modelSelection = model.document.selection;\n\t\tthis.listenTo(view.document, \"arrowKey\", (evt, data) => {\n\t\t\tif (!modelSelection.isCollapsed) return;\n\t\t\tif (data.shiftKey || data.altKey || data.ctrlKey) return;\n\t\t\tconst arrowRightPressed = data.keyCode == keyCodes.arrowright;\n\t\t\tconst arrowLeftPressed = data.keyCode == keyCodes.arrowleft;\n\t\t\tif (!arrowRightPressed && !arrowLeftPressed) return;\n\t\t\tconst contentDirection = locale.contentLanguageDirection;\n\t\t\tlet isMovementHandled;\n\t\t\tif (contentDirection === \"ltr\" && arrowRightPressed || contentDirection === \"rtl\" && arrowLeftPressed) isMovementHandled = this._handleForwardMovement(data);\n\t\t\telse isMovementHandled = this._handleBackwardMovement(data);\n\t\t\tif (isMovementHandled === true) evt.stop();\n\t\t}, {\n\t\t\tcontext: \"$text\",\n\t\t\tpriority: \"highest\"\n\t\t});\n\t\tthis.listenTo(modelSelection, \"change:range\", (evt, data) => {\n\t\t\tif (this._isNextGravityRestorationSkipped) {\n\t\t\t\tthis._isNextGravityRestorationSkipped = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._isGravityOverridden) return;\n\t\t\tif (!data.directChange && isBetweenDifferentAttributes(modelSelection.getFirstPosition(), this.attributes)) return;\n\t\t\tthis._restoreGravity();\n\t\t});\n\t\tthis._enableClickingAfterNode();\n\t\tthis._enableInsertContentSelectionAttributesFixer();\n\t\tthis._handleDeleteContentAfterNode();\n\t}\n\t/**\n\t* Registers a given attribute for the two-step caret movement.\n\t*\n\t* @param attribute Name of the attribute to handle.\n\t*/\n\tregisterAttribute(attribute) {\n\t\tthis.attributes.add(attribute);\n\t}\n\t/**\n\t* Updates the document selection and the view according to the two–step caret movement state\n\t* when moving **forwards**. Executed upon `keypress` in the {@link module:engine/view/view~EditingView}.\n\t*\n\t* @internal\n\t* @param eventData Data of the key press.\n\t* @returns `true` when the handler prevented caret movement.\n\t*/\n\t_handleForwardMovement(eventData) {\n\t\tconst attributes = this.attributes;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst position = selection.getFirstPosition();\n\t\tif (this._isGravityOverridden) return false;\n\t\tif (position.isAtStart && hasAnyAttribute(selection, attributes)) return false;\n\t\tif (isBetweenDifferentAttributes(position, attributes)) {\n\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\tif (hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes, true)) clearSelectionAttributes(model, attributes);\n\t\t\telse this._overrideGravity();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Updates the document selection and the view according to the two–step caret movement state\n\t* when moving **backwards**. Executed upon `keypress` in the {@link module:engine/view/view~EditingView}.\n\t*\n\t* @internal\n\t* @param eventData Data of the key press.\n\t* @returns `true` when the handler prevented caret movement\n\t*/\n\t_handleBackwardMovement(eventData) {\n\t\tconst attributes = this.attributes;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst position = selection.getFirstPosition();\n\t\tif (this._isGravityOverridden) {\n\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\tthis._restoreGravity();\n\t\t\tif (isBetweenDifferentAttributes(position, attributes, true)) clearSelectionAttributes(model, attributes);\n\t\t\telse setSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (position.isAtStart) {\n\t\t\t\tif (hasAnyAttribute(selection, attributes)) {\n\t\t\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\t\t\tsetSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes, true)) {\n\t\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\t\tsetSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (isStepAfterAnyAttributeBoundary(position, attributes)) {\n\t\t\t\tif (position.isAtEnd && !hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes)) {\n\t\t\t\t\tif (eventData) preventCaretMovement(eventData);\n\t\t\t\t\tsetSelectionAttributesFromTheNodeBefore(model, attributes, position);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tthis._isNextGravityRestorationSkipped = true;\n\t\t\t\tthis._overrideGravity();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Starts listening to {@link module:engine/view/document~ViewDocument#event:mousedown} and\n\t* {@link module:engine/view/document~ViewDocument#event:selectionChange} and puts the selection before/after a 2-step node\n\t* if clicked at the beginning/ending of the 2-step node.\n\t*\n\t* The purpose of this action is to allow typing around the 2-step node directly after a click.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5/issues/1016.\n\t*/\n\t_enableClickingAfterNode() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst document = editor.editing.view.document;\n\t\teditor.editing.view.addObserver(MouseObserver);\n\t\teditor.editing.view.addObserver(TouchObserver);\n\t\tlet touched = false;\n\t\tlet clicked = false;\n\t\tthis.listenTo(document, \"touchstart\", () => {\n\t\t\tclicked = false;\n\t\t\ttouched = true;\n\t\t});\n\t\tthis.listenTo(document, \"mousedown\", () => {\n\t\t\tclicked = true;\n\t\t});\n\t\tthis.listenTo(document, \"selectionChange\", () => {\n\t\t\tconst attributes = this.attributes;\n\t\t\tif (!clicked && !touched) return;\n\t\t\tclicked = false;\n\t\t\ttouched = false;\n\t\t\tif (!selection.isCollapsed) return;\n\t\t\tif (!hasAnyAttribute(selection, attributes)) return;\n\t\t\tconst position = selection.getFirstPosition();\n\t\t\tif (!isBetweenDifferentAttributes(position, attributes)) return;\n\t\t\tif (position.isAtStart || isBetweenDifferentAttributes(position, attributes, true)) clearSelectionAttributes(model, attributes);\n\t\t\telse if (!this._isGravityOverridden) this._overrideGravity();\n\t\t});\n\t}\n\t/**\n\t* Starts listening to {@link module:engine/model/model~Model#event:insertContent} and corrects the model\n\t* selection attributes if the selection is at the end of a two-step node after inserting the content.\n\t*\n\t* The purpose of this action is to improve the overall UX because the user is no longer \"trapped\" by the\n\t* two-step attribute of the selection, and they can type a \"clean\" (`linkHref`–less) text right away.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5/issues/6053.\n\t*/\n\t_enableInsertContentSelectionAttributesFixer() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst attributes = this.attributes;\n\t\tthis.listenTo(model, \"insertContent\", () => {\n\t\t\tconst position = selection.getFirstPosition();\n\t\t\tif (hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes)) clearSelectionAttributes(model, attributes);\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether\n\t* removing a content right after the tow-step attribute.\n\t*\n\t* If so, the selection should not preserve the two-step attribute. However, if\n\t* the {@link module:typing/twostepcaretmovement~TwoStepCaretMovement} plugin is active and\n\t* the selection has the two-step attribute due to overridden gravity (at the end), the two-step attribute should stay untouched.\n\t*\n\t* The purpose of this action is to allow removing the link text and keep the selection outside the link.\n\t*\n\t* See https://github.com/ckeditor/ckeditor5/issues/7521.\n\t*/\n\t_handleDeleteContentAfterNode() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst view = editor.editing.view;\n\t\tlet isBackspace = false;\n\t\tlet shouldPreserveAttributes = false;\n\t\tthis.listenTo(view.document, \"delete\", (evt, data) => {\n\t\t\tisBackspace = data.direction === \"backward\";\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(model, \"deleteContent\", () => {\n\t\t\tif (!isBackspace) return;\n\t\t\tconst position = selection.getFirstPosition();\n\t\t\tshouldPreserveAttributes = hasAnyAttribute(selection, this.attributes) && !isStepAfterAnyAttributeBoundary(position, this.attributes);\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(model, \"deleteContent\", () => {\n\t\t\tif (!isBackspace) return;\n\t\t\tisBackspace = false;\n\t\t\tif (shouldPreserveAttributes) return;\n\t\t\teditor.model.enqueueChange(() => {\n\t\t\t\tconst position = selection.getFirstPosition();\n\t\t\t\tif (hasAnyAttribute(selection, this.attributes) && isBetweenDifferentAttributes(position, this.attributes)) {\n\t\t\t\t\tif (position.isAtStart || isBetweenDifferentAttributes(position, this.attributes, true)) clearSelectionAttributes(model, this.attributes);\n\t\t\t\t\telse if (!this._isGravityOverridden) this._overrideGravity();\n\t\t\t\t}\n\t\t\t});\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* `true` when the gravity is overridden for the plugin.\n\t*/\n\tget _isGravityOverridden() {\n\t\treturn !!this._overrideUid;\n\t}\n\t/**\n\t* Overrides the gravity using the {@link module:engine/model/writer~ModelWriter model writer}\n\t* and stores the information about this fact in the {@link #_overrideUid}.\n\t*\n\t* A shorthand for {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}.\n\t*/\n\t_overrideGravity() {\n\t\tthis._overrideUid = this.editor.model.change((writer) => {\n\t\t\treturn writer.overrideSelectionGravity();\n\t\t});\n\t}\n\t/**\n\t* Restores the gravity using the {@link module:engine/model/writer~ModelWriter model writer}.\n\t*\n\t* A shorthand for {@link module:engine/model/writer~ModelWriter#restoreSelectionGravity}.\n\t*/\n\t_restoreGravity() {\n\t\tthis.editor.model.change((writer) => {\n\t\t\twriter.restoreSelectionGravity(this._overrideUid);\n\t\t\tthis._overrideUid = null;\n\t\t});\n\t}\n};\n/**\n* Checks whether the selection has any of given attributes.\n*/\nfunction hasAnyAttribute(selection, attributes) {\n\tfor (const observedAttribute of attributes) if (selection.hasAttribute(observedAttribute)) return true;\n\treturn false;\n}\n/**\n* Applies the given attributes to the current selection using using the\n* values from the node before the current position. Uses\n* the {@link module:engine/model/writer~ModelWriter model writer}.\n*/\nfunction setSelectionAttributesFromTheNodeBefore(model, attributes, position) {\n\tconst nodeBefore = position.nodeBefore;\n\tmodel.change((writer) => {\n\t\tif (nodeBefore) {\n\t\t\tconst attributes = [];\n\t\t\tconst isInlineObject = model.schema.isObject(nodeBefore) && model.schema.isInline(nodeBefore);\n\t\t\tfor (const [key, value] of nodeBefore.getAttributes()) if (model.schema.checkAttribute(\"$text\", key) && (!isInlineObject || model.schema.getAttributeProperties(key).copyFromObject !== false)) attributes.push([key, value]);\n\t\t\twriter.setSelectionAttribute(attributes);\n\t\t} else writer.removeSelectionAttribute(attributes);\n\t});\n}\n/**\n* Removes 2-SCM attributes from the selection.\n*/\nfunction clearSelectionAttributes(model, attributes) {\n\tmodel.change((writer) => {\n\t\twriter.removeSelectionAttribute(attributes);\n\t});\n}\n/**\n* Prevents the caret movement in the view by calling `preventDefault` on the event data.\n*\n* @alias data.preventDefault\n*/\nfunction preventCaretMovement(data) {\n\tdata.preventDefault();\n}\n/**\n* Checks whether the step before `isBetweenDifferentAttributes()`.\n*/\nfunction isStepAfterAnyAttributeBoundary(position, attributes) {\n\treturn isBetweenDifferentAttributes(position.getShiftedBy(-1), attributes);\n}\n/**\n* Checks whether the given position is between different values of given attributes.\n*/\nfunction isBetweenDifferentAttributes(position, attributes, isStrict = false) {\n\tconst { nodeBefore, nodeAfter } = position;\n\tfor (const observedAttribute of attributes) {\n\t\tconst attrBefore = nodeBefore ? nodeBefore.getAttribute(observedAttribute) : void 0;\n\t\tconst attrAfter = nodeAfter ? nodeAfter.getAttribute(observedAttribute) : void 0;\n\t\tif (isStrict && (attrBefore === void 0 || attrAfter === void 0)) continue;\n\t\tif (attrAfter !== attrBefore) return true;\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 typing/texttransformation\n*/\nconst TRANSFORMATIONS = {\n\tcopyright: {\n\t\tfrom: \"(c)\",\n\t\tto: \"©\"\n\t},\n\tregisteredTrademark: {\n\t\tfrom: \"(r)\",\n\t\tto: \"®\"\n\t},\n\ttrademark: {\n\t\tfrom: \"(tm)\",\n\t\tto: \"™\"\n\t},\n\toneHalf: {\n\t\tfrom: /(^|[^/a-z0-9])(1\\/2)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"½\",\n\t\t\tnull\n\t\t]\n\t},\n\toneThird: {\n\t\tfrom: /(^|[^/a-z0-9])(1\\/3)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"⅓\",\n\t\t\tnull\n\t\t]\n\t},\n\ttwoThirds: {\n\t\tfrom: /(^|[^/a-z0-9])(2\\/3)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"⅔\",\n\t\t\tnull\n\t\t]\n\t},\n\toneForth: {\n\t\tfrom: /(^|[^/a-z0-9])(1\\/4)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"¼\",\n\t\t\tnull\n\t\t]\n\t},\n\tthreeQuarters: {\n\t\tfrom: /(^|[^/a-z0-9])(3\\/4)([^/a-z0-9])$/i,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"¾\",\n\t\t\tnull\n\t\t]\n\t},\n\tlessThanOrEqual: {\n\t\tfrom: \"<=\",\n\t\tto: \"≤\"\n\t},\n\tgreaterThanOrEqual: {\n\t\tfrom: \">=\",\n\t\tto: \"≥\"\n\t},\n\tnotEqual: {\n\t\tfrom: \"!=\",\n\t\tto: \"≠\"\n\t},\n\tarrowLeft: {\n\t\tfrom: \"<-\",\n\t\tto: \"←\"\n\t},\n\tarrowRight: {\n\t\tfrom: \"->\",\n\t\tto: \"→\"\n\t},\n\thorizontalEllipsis: {\n\t\tfrom: \"...\",\n\t\tto: \"…\"\n\t},\n\tenDash: {\n\t\tfrom: /(^| )(--)( )$/,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"–\",\n\t\t\tnull\n\t\t]\n\t},\n\temDash: {\n\t\tfrom: /(^| )(---)( )$/,\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"—\",\n\t\t\tnull\n\t\t]\n\t},\n\tquotesPrimary: {\n\t\tfrom: buildQuotesRegExp(\"\\\"\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"“\",\n\t\t\tnull,\n\t\t\t\"”\"\n\t\t]\n\t},\n\tquotesSecondary: {\n\t\tfrom: buildQuotesRegExp(\"'\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"‘\",\n\t\t\tnull,\n\t\t\t\"’\"\n\t\t]\n\t},\n\tquotesPrimaryEnGb: {\n\t\tfrom: buildQuotesRegExp(\"'\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"‘\",\n\t\t\tnull,\n\t\t\t\"’\"\n\t\t]\n\t},\n\tquotesSecondaryEnGb: {\n\t\tfrom: buildQuotesRegExp(\"\\\"\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"“\",\n\t\t\tnull,\n\t\t\t\"”\"\n\t\t]\n\t},\n\tquotesPrimaryPl: {\n\t\tfrom: buildQuotesRegExp(\"\\\"\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"„\",\n\t\t\tnull,\n\t\t\t\"”\"\n\t\t]\n\t},\n\tquotesSecondaryPl: {\n\t\tfrom: buildQuotesRegExp(\"'\"),\n\t\tto: [\n\t\t\tnull,\n\t\t\t\"‚\",\n\t\t\tnull,\n\t\t\t\"’\"\n\t\t]\n\t}\n};\nconst TRANSFORMATION_GROUPS = {\n\tsymbols: [\n\t\t\"copyright\",\n\t\t\"registeredTrademark\",\n\t\t\"trademark\"\n\t],\n\tmathematical: [\n\t\t\"oneHalf\",\n\t\t\"oneThird\",\n\t\t\"twoThirds\",\n\t\t\"oneForth\",\n\t\t\"threeQuarters\",\n\t\t\"lessThanOrEqual\",\n\t\t\"greaterThanOrEqual\",\n\t\t\"notEqual\",\n\t\t\"arrowLeft\",\n\t\t\"arrowRight\"\n\t],\n\ttypography: [\n\t\t\"horizontalEllipsis\",\n\t\t\"enDash\",\n\t\t\"emDash\"\n\t],\n\tquotes: [\"quotesPrimary\", \"quotesSecondary\"]\n};\nconst DEFAULT_TRANSFORMATIONS = [\n\t\"symbols\",\n\t\"mathematical\",\n\t\"typography\",\n\t\"quotes\"\n];\n/**\n* The text transformation plugin.\n*/\nvar TextTransformation = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Delete, Input];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TextTransformation\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"typing\", { transformations: { include: DEFAULT_TRANSFORMATIONS } });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst modelSelection = this.editor.model.document.selection;\n\t\tmodelSelection.on(\"change:range\", () => {\n\t\t\tconst anchor = modelSelection.anchor;\n\t\t\tconst isInCodeBlock = !!anchor && anchor.parent.is(\"element\", \"codeBlock\");\n\t\t\tconst isInInlineCode = modelSelection.hasAttribute(\"code\");\n\t\t\tthis.isEnabled = !(isInCodeBlock || isInInlineCode);\n\t\t});\n\t\tthis._enableTransformationWatchers();\n\t}\n\t/**\n\t* Create new TextWatcher listening to the editor for typing and selection events.\n\t*/\n\t_enableTransformationWatchers() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst deletePlugin = editor.plugins.get(\"Delete\");\n\t\tconst normalizedTransformations = normalizeTransformations(editor.config.get(\"typing.transformations\"));\n\t\tconst testCallback = (text) => {\n\t\t\tfor (const normalizedTransformation of normalizedTransformations) if (normalizedTransformation.from.test(text)) return { normalizedTransformation };\n\t\t};\n\t\tconst watcher = new TextWatcher(editor.model, testCallback);\n\t\twatcher.on(\"matched:data\", (evt, data) => {\n\t\t\tif (!data.batch.isTyping) return;\n\t\t\tconst { from, to } = data.normalizedTransformation;\n\t\t\tconst matches = from.exec(data.text);\n\t\t\tconst replaces = to(matches.slice(1));\n\t\t\tconst matchedRange = data.range;\n\t\t\tlet changeIndex = matches.index;\n\t\t\tmodel.enqueueChange((writer) => {\n\t\t\t\tfor (let i = 1; i < matches.length; i++) {\n\t\t\t\t\tconst match = matches[i];\n\t\t\t\t\tconst replaceWith = replaces[i - 1];\n\t\t\t\t\tif (replaceWith == null) {\n\t\t\t\t\t\tchangeIndex += match.length;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst replacePosition = matchedRange.start.getShiftedBy(changeIndex);\n\t\t\t\t\tconst replaceRange = model.createRange(replacePosition, replacePosition.getShiftedBy(match.length));\n\t\t\t\t\tconst attributes = getTextAttributesAfterPosition(replacePosition);\n\t\t\t\t\tmodel.insertContent(writer.createText(replaceWith, attributes), replaceRange);\n\t\t\t\t\tchangeIndex += replaceWith.length;\n\t\t\t\t}\n\t\t\t\tmodel.enqueueChange(() => {\n\t\t\t\t\tdeletePlugin.requestUndoOnBackspace();\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\twatcher.bind(\"isEnabled\").to(this);\n\t}\n};\n/**\n* Normalizes the configuration `from` parameter value.\n* The normalized value for the `from` parameter is a RegExp instance. If the passed `from` is already a RegExp instance,\n* it is returned unchanged.\n*/\nfunction normalizeFrom(from) {\n\tif (typeof from == \"string\") return new RegExp(`(${escapeRegExp(from)})$`);\n\treturn from;\n}\n/**\n* Normalizes the configuration `to` parameter value.\n* The normalized value for the `to` parameter is a function that takes an array and returns an array. See more in the\n* configuration description. If the passed `to` is already a function, it is returned unchanged.\n*/\nfunction normalizeTo(to) {\n\tif (typeof to == \"string\") return () => [to];\n\telse if (to instanceof Array) return () => to;\n\treturn to;\n}\n/**\n* For given `position` returns attributes for the text that is after that position.\n* The text can be in the same text node as the position (`foo[]bar`) or in the next text node (`foo[]<$text bold=\"true\">bar</$text>`).\n*/\nfunction getTextAttributesAfterPosition(position) {\n\treturn (position.textNode ? position.textNode : position.nodeAfter).getAttributes();\n}\n/**\n* Returns a RegExp pattern string that detects a sentence inside a quote.\n*\n* @param quoteCharacter The character to create a pattern for.\n*/\nfunction buildQuotesRegExp(quoteCharacter) {\n\treturn new RegExp(`(^|\\\\s)(${quoteCharacter})([^${quoteCharacter}]*)(${quoteCharacter})$`);\n}\n/**\n* Reads text transformation config and returns normalized array of transformations objects.\n*/\nfunction normalizeTransformations(config) {\n\tconst extra = config.extra || [];\n\tconst remove = config.remove || [];\n\tconst isNotRemoved = (transformation) => !remove.includes(transformation);\n\treturn expandGroupsAndRemoveDuplicates(config.include.concat(extra).filter(isNotRemoved)).filter(isNotRemoved).map((transformation) => typeof transformation == \"string\" && TRANSFORMATIONS[transformation] ? TRANSFORMATIONS[transformation] : transformation).filter((transformation) => typeof transformation === \"object\").map((transformation) => ({\n\t\tfrom: normalizeFrom(transformation.from),\n\t\tto: normalizeTo(transformation.to)\n\t}));\n}\n/**\n* Reads definitions and expands named groups if needed to transformation names.\n* This method also removes duplicated named transformations if any.\n*/\nfunction expandGroupsAndRemoveDuplicates(definitions) {\n\tconst definedTransformations = /* @__PURE__ */ new Set();\n\tfor (const transformationOrGroup of definitions) if (typeof transformationOrGroup == \"string\" && TRANSFORMATION_GROUPS[transformationOrGroup]) for (const transformation of TRANSFORMATION_GROUPS[transformationOrGroup]) definedTransformations.add(transformation);\n\telse definedTransformations.add(transformationOrGroup);\n\treturn Array.from(definedTransformations);\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* Returns a model range that covers all consecutive nodes with the same `attributeName` and its `value`\n* that intersect the given `position`.\n*\n* It can be used e.g. to get the entire range on which the `linkHref` attribute needs to be changed when having a\n* selection inside a link.\n*\n* @param position The start position.\n* @param attributeName The attribute name.\n* @param value The attribute value.\n* @param model The model instance.\n* @returns The link range.\n*/\nfunction findAttributeRange(position, attributeName, value, model) {\n\treturn model.createRange(findAttributeRangeBound(position, attributeName, value, true, model), findAttributeRangeBound(position, attributeName, value, false, model));\n}\n/**\n* Walks forward or backward (depends on the `lookBack` flag), node by node, as long as they have the same attribute value\n* and returns a position just before or after (depends on the `lookBack` flag) the last matched node.\n*\n* @param position The start position.\n* @param attributeName The attribute name.\n* @param value The attribute value.\n* @param lookBack Whether the walk direction is forward (`false`) or backward (`true`).\n* @returns The position just before the last matched node.\n*/\nfunction findAttributeRangeBound(position, attributeName, value, lookBack, model) {\n\tlet node = position.textNode || (lookBack ? position.nodeBefore : position.nodeAfter);\n\tlet lastNode = null;\n\twhile (node && node.getAttribute(attributeName) == value) {\n\t\tlastNode = node;\n\t\tnode = lookBack ? node.previousSibling : node.nextSibling;\n\t}\n\treturn lastNode ? model.createPositionAt(lastNode, lookBack ? \"before\" : \"after\") : position;\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 typing/utils/inlinehighlight\n*/\n/**\n* Adds a visual highlight style to an attribute element in which the selection is anchored.\n* Together with two-step caret movement, they indicate that the user is typing inside the element.\n*\n* Highlight is turned on by adding the given class to the attribute element in the view:\n*\n* * The class is removed before the conversion has started, as callbacks added with the `'highest'` priority\n* to {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} events.\n* * The class is added in the view post fixer, after other changes in the model tree were converted to the view.\n*\n* This way, adding and removing the highlight does not interfere with conversion.\n*\n* Usage:\n*\n* ```ts\n* import { inlineHighlight } from '@ckeditor/ckeditor5-typing/src/utils/inlinehighlight';\n*\n* // Make `ck-link_selected` class be applied on an `a` element\n* // whenever the corresponding `linkHref` attribute element is selected.\n* inlineHighlight( editor, 'linkHref', 'a', 'ck-link_selected' );\n* ```\n*\n* @param editor The editor instance.\n* @param attributeName The attribute name to check.\n* @param tagName The tagName of a view item.\n* @param className The class name to apply in the view.\n*/\nfunction inlineHighlight(editor, attributeName, tagName, className) {\n\tconst view = editor.editing.view;\n\tconst highlightedElements = /* @__PURE__ */ new Set();\n\tview.document.registerPostFixer((writer) => {\n\t\tconst selection = editor.model.document.selection;\n\t\tlet changed = false;\n\t\tif (selection.hasAttribute(attributeName)) {\n\t\t\tconst modelRange = findAttributeRange(selection.getFirstPosition(), attributeName, selection.getAttribute(attributeName), editor.model);\n\t\t\tconst viewRange = editor.editing.mapper.toViewRange(modelRange);\n\t\t\tfor (const item of viewRange.getItems()) if (item.is(\"element\", tagName) && !item.hasClass(className)) {\n\t\t\t\twriter.addClass(className, item);\n\t\t\t\thighlightedElements.add(item);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t});\n\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\tdispatcher.on(\"insert\", removeHighlight, { priority: \"highest\" });\n\t\tdispatcher.on(\"remove\", removeHighlight, { priority: \"highest\" });\n\t\tdispatcher.on(\"attribute\", removeHighlight, { priority: \"highest\" });\n\t\tdispatcher.on(\"selection\", removeHighlight, { priority: \"highest\" });\n\t\tfunction removeHighlight() {\n\t\t\tview.change((writer) => {\n\t\t\t\tfor (const item of highlightedElements.values()) {\n\t\t\t\t\twriter.removeClass(className, item);\n\t\t\t\t\thighlightedElements.delete(item);\n\t\t\t\t}\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\nexport { Delete, DeleteCommand, Input, InsertTextCommand, InsertTextObserver, TextTransformation, TextWatcher, TwoStepCaretMovement, Typing, TypingChangeBuffer, DeleteObserver as _DeleteObserver, findAttributeRange, findAttributeRangeBound, getLastTextLine, inlineHighlight };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module typing/utils/changebuffer\n */\n\nimport type {\n\tModel,\n\tBatch,\n\tModelDocumentChangeEvent,\n\tModelDocumentSelectionChangeEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport type { EventInfo } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Change buffer allows to group atomic changes (like characters that have been typed) into\n * {@link module:engine/model/batch~Batch batches}.\n *\n * Batches represent single undo steps, hence changes added to one single batch are undone together.\n *\n * The buffer has a configurable limit of atomic changes that it can accommodate. After the limit was\n * exceeded (see {@link ~TypingChangeBuffer#input}), a new batch is created in {@link ~TypingChangeBuffer#batch}.\n *\n * To use the change buffer you need to let it know about the number of changes that were added to the batch:\n *\n * ```ts\n * const buffer = new ChangeBuffer( model, LIMIT );\n *\n * // Later on in your feature:\n * buffer.batch.insert( pos, insertedCharacters );\n * buffer.input( insertedCharacters.length );\n * ```\n */\nexport class TypingChangeBuffer {\n\t/**\n\t * The model instance.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * The maximum number of atomic changes which can be contained in one batch.\n\t */\n\tpublic readonly limit: number;\n\n\t/**\n\t * Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t */\n\tprivate _isLocked: boolean;\n\n\t/**\n\t * The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t * the {@link #batch batch} is set to a new one.\n\t */\n\tprivate _size: number;\n\n\t/**\n\t * The current batch instance.\n\t */\n\tprivate _batch: Batch | null = null;\n\n\t/**\n\t * The callback to document the change event which later needs to be removed.\n\t */\n\tprivate readonly _changeCallback: ( evt: EventInfo, batch: Batch ) => void;\n\n\t/**\n\t * The callback to document selection `change:attribute` and `change:range` events which resets the buffer.\n\t */\n\tprivate readonly _selectionChangeCallback: () => void;\n\n\t/**\n\t * Creates a new instance of the change buffer.\n\t *\n\t * @param limit The maximum number of atomic changes which can be contained in one batch.\n\t */\n\tconstructor( model: Model, limit: number = 20 ) {\n\t\tthis.model = model;\n\t\tthis._size = 0;\n\t\tthis.limit = limit;\n\t\tthis._isLocked = false;\n\n\t\t// The function to be called in order to notify the buffer about batches which appeared in the document.\n\t\t// The callback will check whether it is a new batch and in that case the buffer will be flushed.\n\t\t//\n\t\t// The reason why the buffer needs to be flushed whenever a new batch appears is that the changes added afterwards\n\t\t// should be added to a new batch. For instance, when the user types, then inserts an image, and then types again,\n\t\t// the characters typed after inserting the image should be added to a different batch than the characters typed before.\n\t\tthis._changeCallback = ( evt, batch ) => {\n\t\t\tif ( batch.isLocal && batch.isUndoable && batch !== this._batch ) {\n\t\t\t\tthis._reset( true );\n\t\t\t}\n\t\t};\n\n\t\tthis._selectionChangeCallback = () => {\n\t\t\tthis._reset();\n\t\t};\n\n\t\tthis.model.document.on<ModelDocumentChangeEvent>( 'change', this._changeCallback );\n\n\t\tthis.model.document.selection.on<ModelDocumentSelectionChangeEvent>( 'change:range', this._selectionChangeCallback );\n\t\tthis.model.document.selection.on<ModelDocumentSelectionChangeEvent>( 'change:attribute', this._selectionChangeCallback );\n\t}\n\n\t/**\n\t * The current batch to which a feature should add its operations. Once the {@link #size}\n\t * is reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t */\n\tpublic get batch(): Batch {\n\t\tif ( !this._batch ) {\n\t\t\tthis._batch = this.model.createBatch( { isTyping: true } );\n\t\t}\n\n\t\treturn this._batch;\n\t}\n\n\t/**\n\t * The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t * the {@link #batch batch} is set to a new one.\n\t */\n\tpublic get size(): number {\n\t\treturn this._size;\n\t}\n\n\t/**\n\t * The input number of changes into the buffer. Once the {@link #size} is\n\t * reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t *\n\t * @param changeCount The number of atomic changes to input.\n\t */\n\tpublic input( changeCount: number ): void {\n\t\tthis._size += changeCount;\n\n\t\tif ( this._size >= this.limit ) {\n\t\t\tthis._reset( true );\n\t\t}\n\t}\n\n\t/**\n\t * Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t */\n\tpublic get isLocked(): boolean {\n\t\treturn this._isLocked;\n\t}\n\n\t/**\n\t * Locks the buffer.\n\t */\n\tpublic lock(): void {\n\t\tthis._isLocked = true;\n\t}\n\n\t/**\n\t * Unlocks the buffer.\n\t */\n\tpublic unlock(): void {\n\t\tthis._isLocked = false;\n\t}\n\n\t/**\n\t * Destroys the buffer.\n\t */\n\tpublic destroy(): void {\n\t\tthis.model.document.off( 'change', this._changeCallback );\n\t\tthis.model.document.selection.off( 'change:range', this._selectionChangeCallback );\n\t\tthis.model.document.selection.off( 'change:attribute', this._selectionChangeCallback );\n\t}\n\n\t/**\n\t * Resets the change buffer.\n\t *\n\t * @param ignoreLock Whether internal lock {@link #isLocked} should be ignored.\n\t */\n\tprivate _reset( ignoreLock: boolean = false ): void {\n\t\tif ( !this.isLocked || ignoreLock ) {\n\t\t\tthis._batch = null;\n\t\t\tthis._size = 0;\n\t\t}\n\t}\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/**\n * @module typing/inserttextcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TypingChangeBuffer } from './utils/changebuffer.js';\n\nimport type { ModelDocumentSelection, ModelRange, ModelSelection } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The insert text command. Used by the {@link module:typing/input~Input input feature} to handle typing.\n */\nexport class InsertTextCommand extends Command {\n\t/**\n\t * Typing's change buffer used to group subsequent changes into batches.\n\t */\n\tprivate readonly _buffer: TypingChangeBuffer;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param undoStepSize The maximum number of atomic changes\n\t * which can be contained in one batch in the command buffer.\n\t */\n\tconstructor( editor: Editor, undoStepSize: number ) {\n\t\tsuper( editor );\n\n\t\tthis._buffer = new TypingChangeBuffer( editor.model, undoStepSize );\n\n\t\t// Since this command may execute on different selectable than selection, it should be checked directly in execute block.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * The current change buffer.\n\t */\n\tpublic get buffer(): TypingChangeBuffer {\n\t\treturn this._buffer;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis._buffer.destroy();\n\t}\n\n\t/**\n\t * Executes the input command. It replaces the content within the given range with the given text.\n\t * Replacing is a two step process, first the content within the range is removed and then the new text is inserted\n\t * at the beginning of the range (which after the removal is a collapsed range).\n\t *\n\t * @fires execute\n\t * @param options The command options.\n\t */\n\tpublic override execute( options: InsertTextCommandOptions = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst text = options.text || '';\n\t\tconst textInsertions = text.length;\n\n\t\tlet selection: ModelSelection | ModelDocumentSelection = doc.selection;\n\n\t\tif ( options.selection ) {\n\t\t\tselection = options.selection;\n\t\t} else if ( options.range ) {\n\t\t\tselection = model.createSelection( options.range );\n\t\t}\n\n\t\t// Stop executing if selectable is in non-editable place.\n\t\tif ( !model.canEditAt( selection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resultRange = options.resultRange;\n\n\t\tmodel.enqueueChange( this._buffer.batch, writer => {\n\t\t\tthis._buffer.lock();\n\n\t\t\t// Store selection attributes before deleting old content to preserve formatting and link.\n\t\t\t// This unifies the behavior between ModelDocumentSelection and Selection provided as input option.\n\t\t\tconst selectionAttributes = Array.from( doc.selection.getAttributes() );\n\n\t\t\tmodel.deleteContent( selection );\n\n\t\t\tif ( text ) {\n\t\t\t\tmodel.insertContent( writer.createText( text, selectionAttributes ), selection );\n\t\t\t}\n\n\t\t\tif ( resultRange ) {\n\t\t\t\twriter.setSelection( resultRange );\n\t\t\t} else if ( !selection.is( 'documentSelection' ) ) {\n\t\t\t\twriter.setSelection( selection );\n\t\t\t}\n\n\t\t\tthis._buffer.unlock();\n\n\t\t\tthis._buffer.input( textInsertions );\n\t\t} );\n\t}\n}\n\n/**\n * Interface with parameters for executing InsertTextCommand.\n *\n * Both `range` and `selection` parameters are used for defining selection but should not be used together.\n * If both are defined, only `selection` will be considered.\n */\nexport interface InsertTextCommandOptions {\n\n\t/**\n\t * The text to be inserted.\n\t */\n\ttext?: string;\n\n\t/**\n\t * The selection in which the text is inserted.\n\t * Inserting a text into a selection deletes the current content within selection ranges. If the selection is not specified,\n\t * the current selection in the model will be used instead.\n\t */\n\tselection?: ModelSelection | ModelDocumentSelection;\n\n\t/**\n\t * The range in which the text is inserted. Defaults to the first range in the current selection.\n\t */\n\trange?: ModelRange;\n\n\t/**\n\t * The range where the selection should be placed after the insertion.\n\t * If not specified, the selection will be placed right after the inserted text.\n\t */\n\tresultRange?: ModelRange;\n}\n\nexport interface InsertTextCommandExecuteEvent {\n\tname: 'execute';\n\targs: [\n\t\tdata: [ options: InsertTextCommandOptions ]\n\t];\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/**\n * @module typing/inserttextobserver\n */\n\nimport { env, EventInfo } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tViewDocumentDomEventData,\n\tObserver,\n\tFocusObserver,\n\ttype EditingView,\n\ttype ViewDocumentCompositionEndEvent,\n\ttype ViewDocumentInputEvent,\n\ttype ViewDocumentSelection,\n\ttype ViewSelection\n} from '@ckeditor/ckeditor5-engine';\n\n// @if CK_DEBUG_TYPING // import { _buildLogMessage } from '@ckeditor/ckeditor5-engine/src/dev-utils/utils.js';\n\nconst TYPING_INPUT_TYPES = [\n\t// For collapsed range:\n\t//\t- This one is a regular typing (all browsers, all systems).\n\t//\t- This one is used by Chrome when typing accented letter – 2nd step when the user selects the accent (Mac).\n\t// For non-collapsed range:\n\t//\t- This one is used by Chrome when typing accented letter – when the selection box first appears (Mac).\n\t//\t- This one is used by Safari when accepting spell check suggestions from the context menu (Mac).\n\t'insertText',\n\n\t// This one is used by Safari when typing accented letter (Mac).\n\t// This one is used by Safari when accepting spell check suggestions from the autocorrection pop-up (Mac).\n\t'insertReplacementText'\n];\n\nconst TYPING_INPUT_TYPES_ANDROID = [\n\t...TYPING_INPUT_TYPES,\n\t'insertCompositionText'\n];\n\n/**\n * Text insertion observer introduces the {@link module:engine/view/document~ViewDocument#event:insertText} event.\n */\nexport class InsertTextObserver extends Observer {\n\t/**\n\t * Instance of the focus observer. Insert text observer calls\n\t * {@link module:engine/view/observer/focusobserver~FocusObserver#flush} to mark the latest focus change as complete.\n\t */\n\tpublic readonly focusObserver: FocusObserver;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tthis.focusObserver = view.getObserver( FocusObserver );\n\n\t\t// On Android composition events should immediately be applied to the model. Rendering is not disabled.\n\t\t// On non-Android the model is updated only on composition end.\n\t\t// On Android we can't rely on composition start/end to update model.\n\t\tconst typingInputTypes = env.isAndroid ? TYPING_INPUT_TYPES_ANDROID : TYPING_INPUT_TYPES;\n\n\t\tconst viewDocument = view.document;\n\n\t\tviewDocument.on<ViewDocumentInputEvent>( 'beforeinput', ( evt, data ) => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { data: text, targetRanges, inputType, domEvent, isComposing } = data;\n\n\t\t\tif ( !typingInputTypes.includes( inputType ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Mark the latest focus change as complete (we are typing in editable after the focus\n\t\t\t// so the selection is in the focused element).\n\t\t\tthis.focusObserver.flush();\n\n\t\t\tconst eventInfo = new EventInfo( viewDocument, 'insertText' );\n\n\t\t\tviewDocument.fire( eventInfo, new ViewDocumentDomEventData( view, domEvent, {\n\t\t\t\ttext,\n\t\t\t\tselection: view.createSelection( targetRanges ),\n\t\t\t\tisComposing\n\t\t\t} ) );\n\n\t\t\t// Stop the beforeinput event if `delete` event was stopped.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/753\n\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\n\t\t// On Android composition events are immediately applied to the model.\n\t\t// On non-Android the model is updated only on composition end.\n\t\t// On Android we can't rely on composition start/end to update model.\n\t\tif ( !env.isAndroid ) {\n\t\t\t// Note: The priority must be lower than the CompositionObserver handler to call it after the renderer is unblocked.\n\t\t\t// This is important for view to DOM position mapping.\n\t\t\t// This causes the effect of first remove composed DOM and then reapply it after model modification.\n\t\t\tviewDocument.on<ViewDocumentCompositionEndEvent>( 'compositionend', ( evt, { data, domEvent } ) => {\n\t\t\t\tif ( !this.isEnabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In case of aborted composition.\n\t\t\t\tif ( !data ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'InsertTextObserver',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t`%cFire insertText event, %c${ JSON.stringify( data ) }`,\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t 'color: blue'\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\t// How do we know where to insert the composed text?\n\t\t\t\t// 1. The SelectionObserver is blocked and the view is not updated with the composition changes.\n\t\t\t\t// 2. The last moment before it's locked is the `compositionstart` event.\n\t\t\t\t// 3. The `SelectionObserver` is listening for `compositionstart` event and immediately converts\n\t\t\t\t//    the selection. Handle this at the low priority so after the rendering is blocked.\n\t\t\t\tviewDocument.fire( 'insertText', new ViewDocumentDomEventData( view, domEvent, {\n\t\t\t\t\ttext: data,\n\t\t\t\t\tisComposing: true\n\t\t\t\t} ) );\n\t\t\t}, { priority: 'low' } );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic observe(): void {}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic stopObserving(): void {}\n}\n\n/**\n * Event fired when the user types text, for instance presses <kbd>A</kbd> or <kbd>?</kbd> in the\n * editing view document.\n *\n * **Note**: This event will **not** fire for keystrokes such as <kbd>Delete</kbd> or <kbd>Enter</kbd>.\n * They have dedicated events, see {@link module:engine/view/document~ViewDocument#event:delete} and\n * {@link module:engine/view/document~ViewDocument#event:enter} to learn more.\n *\n * **Note**: This event is fired by the {@link module:typing/inserttextobserver~InsertTextObserver input feature}.\n *\n * @eventName module:engine/view/document~ViewDocument#insertText\n * @param data The event data.\n */\nexport type ViewDocumentInsertTextEvent = {\n\tname: 'insertText';\n\targs: [ data: InsertTextEventData ];\n};\n\nexport interface InsertTextEventData extends ViewDocumentDomEventData {\n\n\t/**\n\t *  The text to be inserted.\n\t */\n\ttext: string;\n\n\t/**\n\t * The selection into which the text should be inserted.\n\t * If not specified, the insertion should occur at the current view selection.\n\t */\n\tselection?: ViewSelection | ViewDocumentSelection;\n\n\t/**\n\t * A flag indicating that event was fired during composition.\n\t *\n\t * Corresponds to the\n\t * {@link module:engine/view/document~ViewDocument#event:compositionstart},\n\t * {@link module:engine/view/document~ViewDocument#event:compositionupdate},\n\t * and {@link module:engine/view/document~ViewDocument#event:compositionend } trio.\n\t */\n\tisComposing?: boolean;\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/**\n * @module typing/input\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport { env } from '@ckeditor/ckeditor5-utils';\n\nimport { InsertTextCommand, type InsertTextCommandOptions } from './inserttextcommand.js';\nimport { InsertTextObserver, type ViewDocumentInsertTextEvent } from './inserttextobserver.js';\n\nimport {\n\tModelLiveRange,\n\t_tryFixingModelRange,\n\ttype Model,\n\ttype Mapper,\n\ttype ModelElement,\n\ttype ModelRange,\n\ttype ViewNode,\n\ttype ViewElement,\n\ttype ObserverMutationData,\n\ttype ViewDocumentCompositionStartEvent,\n\ttype ViewDocumentCompositionEndEvent,\n\ttype ViewDocumentKeyDownEvent,\n\ttype ViewDocumentMutationsEvent,\n\ttype ViewDocumentInputEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport { debounce } from 'es-toolkit/compat';\n\n// @if CK_DEBUG_TYPING // import { _debouncedLine, _buildLogMessage } from '@ckeditor/ckeditor5-engine/src/dev-utils/utils.js';\n\n/**\n * Handles text input coming from the keyboard or other input methods.\n */\nexport class Input extends Plugin {\n\t/**\n\t * The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t */\n\tprivate _typingQueue!: TypingQueue;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Input' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst modelSelection = model.document.selection;\n\n\t\tthis._typingQueue = new TypingQueue( editor );\n\n\t\tview.addObserver( InsertTextObserver );\n\n\t\t// TODO The above default configuration value should be defined using editor.config.define() once it's fixed.\n\t\tconst insertTextCommand = new InsertTextCommand( editor, editor.config.get( 'typing.undoStep' ) || 20 );\n\n\t\t// Register `insertText` command and add `input` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'insertText', insertTextCommand );\n\t\teditor.commands.add( 'input', insertTextCommand );\n\n\t\tthis.listenTo<ViewDocumentInputEvent>( view.document, 'beforeinput', () => {\n\t\t\t// Flush queue on the next beforeinput event because it could happen\n\t\t\t// that the mutation observer does not notice the DOM change in time.\n\t\t\tthis._typingQueue.flush( 'next beforeinput' );\n\t\t}, { priority: 'high' } );\n\n\t\tthis.listenTo<ViewDocumentInsertTextEvent>( view.document, 'insertText', ( evt, data ) => {\n\t\t\tconst { text, selection: viewSelection } = data;\n\n\t\t\t// In case of a synthetic event, make sure that selection is not fake.\n\t\t\tif ( view.document.selection.isFake && viewSelection && view.document.selection.isSimilar( viewSelection ) ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\n\t\t\t// In case of typing on a non-collapsed range, we have to handle it ourselves as a browser\n\t\t\t// could modify the DOM unpredictably.\n\t\t\t// Noticed cases:\n\t\t\t// * <pre><code>[foo</code></pre><p>]bar</p>\n\t\t\t// * <p>[foo</p><pre>]<code>bar</code></pre>\n\t\t\t// * <p>[foo</p><blockquote><p>]bar</p></blockquote>\n\t\t\t//\n\t\t\t// Especially tricky case is when a code block follows a paragraph as code block on the view side\n\t\t\t// is rendered as a <code> element inside a <pre> element, but only the <code> element is mapped to the model.\n\t\t\t// While mapping view position <pre>]<code> to model, the model position results before the <codeBlock> element,\n\t\t\t// and this triggers selection fixer to cover only text in the previous paragraph.\n\t\t\t//\n\t\t\t// This is safe for composition as those events are not cancellable\n\t\t\t// and the preventDefault() and defaultPrevented are not affected.\n\t\t\tif ( viewSelection && Array.from( viewSelection.getRanges() ).some( range => !range.isCollapsed ) ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\n\t\t\tif ( !insertTextCommand.isEnabled ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cInsertText command is disabled - prevent DOM change.',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tdata.preventDefault();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet modelRanges;\n\n\t\t\t// If view selection was specified, translate it to model selection.\n\t\t\tif ( viewSelection ) {\n\t\t\t\tmodelRanges = Array.from( viewSelection.getRanges() )\n\t\t\t\t\t.filter( viewRange => {\n\t\t\t\t\t\t// On Windows 11 with the US International keyboard, events are batched.\n\t\t\t\t\t\t// In other words, the first backtick press does not send an `insertText` event,\n\t\t\t\t\t\t// and only the second one sends it double (batched).\n\t\t\t\t\t\t// This causes a race condition if during the first backtick insert the element is removed from the tree,\n\t\t\t\t\t\t// and the second event flushes changes, and it's original targetRanges,\n\t\t\t\t\t\t// which were initially good, now refer to a removed element.\n\t\t\t\t\t\t// This is not reproducible on Mac/Linux as they enter composition mode.\n\t\t\t\t\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/18926.\n\t\t\t\t\t\treturn viewRange.root.is( 'rootElement' );\n\t\t\t\t\t} )\n\t\t\t\t\t.map( viewRange => mapper.toModelRange( viewRange ) )\n\t\t\t\t\t.map( modelRange => _tryFixingModelRange( modelRange, model.schema ) || modelRange );\n\t\t\t}\n\n\t\t\tif ( !modelRanges || !modelRanges.length ) {\n\t\t\t\tmodelRanges = Array.from( modelSelection.getRanges() );\n\t\t\t}\n\n\t\t\tlet insertText = text;\n\n\t\t\t// Typing in English on Android is firing composition events for the whole typed word.\n\t\t\t// We need to check the target range text to only apply the difference.\n\t\t\tif ( env.isAndroid ) {\n\t\t\t\tconst selectedText = Array.from( modelRanges[ 0 ].getItems() ).reduce( ( rangeText, node ) => {\n\t\t\t\t\treturn rangeText + ( node.is( '$textProxy' ) ? node.data : '' );\n\t\t\t\t}, '' );\n\n\t\t\t\tif ( selectedText ) {\n\t\t\t\t\tif ( selectedText.length <= insertText.length ) {\n\t\t\t\t\t\tif ( insertText.startsWith( selectedText ) ) {\n\t\t\t\t\t\t\tinsertText = insertText.substring( selectedText.length );\n\t\t\t\t\t\t\t( modelRanges[ 0 ] as any ).start = modelRanges[ 0 ].start.getShiftedBy( selectedText.length );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( selectedText.startsWith( insertText ) ) {\n\t\t\t\t\t\t\t// TODO this should be mapped as delete?\n\t\t\t\t\t\t\t( modelRanges[ 0 ] as any ).start = modelRanges[ 0 ].start.getShiftedBy( insertText.length );\n\t\t\t\t\t\t\tinsertText = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( insertText.length == 0 && modelRanges[ 0 ].isCollapsed ) {\n\t\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cIgnore insertion of an empty data to the collapsed range.',\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Note: the TypingQueue stores live-ranges internally as RTC could change the model while waiting for mutations.\n\t\t\tconst commandData: InsertTextCommandOptions = {\n\t\t\t\ttext: insertText,\n\t\t\t\tselection: model.createSelection( modelRanges )\n\t\t\t};\n\n\t\t\t// This is a beforeinput event, so we need to wait until the browser updates the DOM,\n\t\t\t// and we could apply changes to the model and verify if the DOM is valid.\n\t\t\t// The browser applies changes to the DOM not immediately on beforeinput event.\n\t\t\t// We just wait for mutation observer to notice changes or as a fallback a timeout.\n\t\t\t//\n\t\t\t// Previously we were cancelling the non-composition events, but it caused issues especially in Safari.\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`%cQueue insertText:%c \"${ commandData.text }\"%c ` +\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getFirstPosition().path }]-` +\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getLastPosition().path }]` +\n\t\t\t// @if CK_DEBUG_TYPING // \t\t` queue size: ${ this._typingQueue.length + 1 }`,\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t''\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tthis._typingQueue.push( commandData, Boolean( data.isComposing ) );\n\n\t\t\tif ( data.domEvent.defaultPrevented ) {\n\t\t\t\tthis._typingQueue.flush( 'beforeinput default prevented' );\n\t\t\t}\n\t\t} );\n\n\t\t// Delete selected content on composition start.\n\t\tif ( env.isAndroid ) {\n\t\t\t// On Android with English keyboard, the composition starts just by putting caret\n\t\t\t// at the word end or by selecting a table column. This is not a real composition started.\n\t\t\t// Trigger delete content on first composition key pressed.\n\t\t\tthis.listenTo<ViewDocumentKeyDownEvent>( view.document, 'keydown', ( evt, data ) => {\n\t\t\t\tif ( modelSelection.isCollapsed || data.keyCode != 229 || !view.document.isComposing ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconst firstPositionPath = modelSelection.getFirstPosition()!.path;\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconst lastPositionPath = modelSelection.getLastPosition()!.path;\n\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cKeyDown 229%c -> model.deleteContent() ' +\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t`[${ firstPositionPath }]-[${ lastPositionPath }]`,\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t''\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tdeleteSelectionContent( model, insertTextCommand );\n\t\t\t} );\n\t\t} else {\n\t\t\t// Note: The priority must precede the CompositionObserver handler to call it before\n\t\t\t// the renderer is blocked, because we want to render this change.\n\t\t\tthis.listenTo<ViewDocumentCompositionStartEvent>( view.document, 'compositionstart', () => {\n\t\t\t\tif ( modelSelection.isCollapsed ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconst firstPositionPath = modelSelection.getFirstPosition()!.path;\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconst lastPositionPath = modelSelection.getLastPosition()!.path;\n\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cComposition start%c -> model.deleteContent() ' +\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t`[${ firstPositionPath }]-[${ lastPositionPath }]`,\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tdeleteSelectionContent( model, insertTextCommand );\n\t\t\t}, { priority: 'high' } );\n\t\t}\n\n\t\t// Apply changes to the model as they are applied to the DOM by the browser.\n\t\t// On beforeinput event, the DOM is not yet modified. We wait for detected mutations to apply model changes.\n\t\tthis.listenTo<ViewDocumentMutationsEvent>( view.document, 'mutations', ( evt, { mutations } ) => {\n\t\t\t// Check if mutations are relevant for queued changes.\n\t\t\tif ( this._typingQueue.hasAffectedElements() ) {\n\t\t\t\tfor ( const { node } of mutations ) {\n\t\t\t\t\tconst viewElement = findMappedViewAncestor( node, mapper );\n\t\t\t\t\tconst modelElement = mapper.toModelElement( viewElement )!;\n\n\t\t\t\t\tif ( this._typingQueue.isElementAffected( modelElement ) ) {\n\t\t\t\t\t\tthis._typingQueue.flush( 'mutations' );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cMutations not related to the composition.',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-style: italic'\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t} );\n\n\t\t// Make sure that all changes are applied to the model before the end of composition.\n\t\tthis.listenTo<ViewDocumentCompositionEndEvent>( view.document, 'compositionend', () => {\n\t\t\tthis._typingQueue.flush( 'before composition end' );\n\t\t}, { priority: 'high' } );\n\n\t\t// Trigger mutations check after the composition completes to fix all DOM changes that got ignored during composition.\n\t\t// On Android, the Renderer is not disabled while composing. While updating DOM nodes, we ignore some changes\n\t\t// that are not that important (like NBSP vs. plain space character) and could break the composition flow.\n\t\t// After composition is completed, we trigger additional `mutations` event for elements affected by the composition\n\t\t// so the Renderer can adjust the DOM to the expected structure without breaking the composition.\n\t\tthis.listenTo<ViewDocumentCompositionEndEvent>( view.document, 'compositionend', () => {\n\t\t\t// There could be new item queued on the composition end, so flush it.\n\t\t\tthis._typingQueue.flush( 'after composition end' );\n\n\t\t\tconst mutations: Array<ObserverMutationData> = [];\n\n\t\t\tif ( this._typingQueue.hasAffectedElements() ) {\n\t\t\t\tfor ( const element of this._typingQueue.flushAffectedElements() ) {\n\t\t\t\t\tconst viewElement = mapper.toViewElement( element );\n\n\t\t\t\t\tif ( !viewElement ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tmutations.push( { type: 'children', node: viewElement } );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fire composition mutations, if any.\n\t\t\t//\n\t\t\t// For non-Android:\n\t\t\t// After the composition end, we need to verify if there are no left-overs.\n\t\t\t// Listening at the lowest priority, so after the `InsertTextObserver` added above (all composed text\n\t\t\t// should already be applied to the model, view, and DOM).\n\t\t\t// On non-Android the `Renderer` is blocked while the user is composing, but the `MutationObserver` still collects\n\t\t\t// mutated nodes and fires `mutations` events.\n\t\t\t// Those events are recorded by the `Renderer` but not applied to the DOM while composing.\n\t\t\t// We need to trigger those checks (and fixes) once again but this time without specifying the exact mutations\n\t\t\t// since they are already recorded by the `Renderer`.\n\t\t\t// It in most cases just clears the internal record of mutated text nodes\n\t\t\t// since all changes should already be applied to the DOM.\n\t\t\t// This is especially needed when a user cancels composition, so we can clear nodes marked to sync.\n\t\t\tif ( mutations.length || !env.isAndroid ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'Input',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'%cFire post-composition mutation fixes.',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold'\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tview.document.fire<ViewDocumentMutationsEvent>( 'mutations', { mutations } );\n\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis._typingQueue.destroy();\n\t}\n}\n\n/**\n * The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n */\nclass TypingQueue {\n\t/**\n\t * The editor instance.\n\t */\n\tpublic editor: Editor;\n\n\t/**\n\t * Debounced queue flush as a safety mechanism for cases of mutation observer not triggering.\n\t */\n\tpublic flushDebounced = debounce( () => this.flush( 'timeout' ), 50 );\n\n\t/**\n\t * The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t */\n\tprivate _queue: Array<InsertTextCommandLiveOptions> = [];\n\n\t/**\n\t * Whether there is any composition enqueued or plain typing only.\n\t */\n\tprivate _isComposing = false;\n\n\t/**\n\t * A set of model elements. The typing happened in those elements. It's used for mutations check.\n\t */\n\tprivate _affectedElements = new Set<ModelElement>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tthis.editor = editor;\n\t}\n\n\t/**\n\t * Destroys the helper object.\n\t */\n\tpublic destroy(): void {\n\t\tthis.flushDebounced.cancel();\n\t\tthis._affectedElements.clear();\n\n\t\twhile ( this._queue.length ) {\n\t\t\tthis.shift();\n\t\t}\n\t}\n\n\t/**\n\t * Returns the size of the queue.\n\t */\n\tpublic get length(): number {\n\t\treturn this._queue.length;\n\t}\n\n\t/**\n\t * Push next insertText command data to the queue.\n\t */\n\tpublic push( commandData: InsertTextCommandOptions, isComposing: boolean ): void {\n\t\tconst commandLiveData: InsertTextCommandLiveOptions = {\n\t\t\ttext: commandData.text\n\t\t};\n\n\t\tif ( commandData.selection ) {\n\t\t\tcommandLiveData.selectionRanges = [];\n\n\t\t\tfor ( const range of commandData.selection.getRanges() ) {\n\t\t\t\tcommandLiveData.selectionRanges.push( ModelLiveRange.fromRange( range ) );\n\n\t\t\t\t// Keep reference to the model element for later mutation checks.\n\t\t\t\tthis._affectedElements.add( range.start.parent as ModelElement );\n\t\t\t}\n\t\t}\n\n\t\tthis._queue.push( commandLiveData );\n\t\tthis._isComposing ||= isComposing;\n\t\tthis.flushDebounced();\n\t}\n\n\t/**\n\t * Shift the first item from the insertText command data queue.\n\t */\n\tpublic shift(): InsertTextCommandOptions {\n\t\tconst commandLiveData = this._queue.shift()!;\n\t\tconst commandData: InsertTextCommandOptions = {\n\t\t\ttext: commandLiveData.text\n\t\t};\n\n\t\tif ( commandLiveData.selectionRanges ) {\n\t\t\tconst ranges = commandLiveData.selectionRanges\n\t\t\t\t.map( liveRange => detachLiveRange( liveRange ) )\n\t\t\t\t.filter( ( range ): range is ModelRange => !!range );\n\n\t\t\tif ( ranges.length ) {\n\t\t\t\tcommandData.selection = this.editor.model.createSelection( ranges );\n\t\t\t}\n\t\t}\n\n\t\treturn commandData;\n\t}\n\n\t/**\n\t * Applies all queued insertText command executions.\n\t *\n\t * @param reason Used only for debugging.\n\t */\n\tpublic flush( reason: string ): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\n\t\tthis.flushDebounced.cancel();\n\n\t\tif ( !this._queue.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( ..._buildLogMessage( this, 'Input',\n\t\t// @if CK_DEBUG_TYPING // \t\t`%cFlush insertText queue on ${ reason }.`,\n\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold'\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tconst insertTextCommand = editor.commands.get( 'insertText' )!;\n\t\tconst buffer = insertTextCommand.buffer;\n\n\t\tmodel.enqueueChange( buffer.batch, () => {\n\t\t\tbuffer.lock();\n\n\t\t\twhile ( this._queue.length ) {\n\t\t\t\tconst commandData = this.shift();\n\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t`%cExecute queued insertText:%c \"${ commandData.text }\"%c ` +\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t`[${ commandData.selection.getFirstPosition().path }]-` +\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t\t`[${ commandData.selection.getLastPosition().path }]`,\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'font-weight: bold',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: blue',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t''\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\teditor.execute( 'insertText', commandData );\n\t\t\t}\n\n\t\t\tbuffer.unlock();\n\n\t\t\tif ( !this._isComposing ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'Input',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'Clear affected elements set'\n\t\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\t\tthis._affectedElements.clear();\n\t\t\t}\n\n\t\t\tthis._isComposing = false;\n\t\t} );\n\n\t\tview.scrollToTheSelection();\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Returns `true` if the given model element is related to recent typing.\n\t */\n\tpublic isElementAffected( element: ModelElement ): boolean {\n\t\treturn this._affectedElements.has( element );\n\t}\n\n\t/**\n\t * Returns `true` if there are any affected elements in the queue.\n\t */\n\tpublic hasAffectedElements(): boolean {\n\t\treturn this._affectedElements.size > 0;\n\t}\n\n\t/**\n\t * Returns an array of typing-related elements and clears the internal list.\n\t */\n\tpublic flushAffectedElements(): Array<ModelElement> {\n\t\tconst result = Array.from( this._affectedElements );\n\n\t\tthis._affectedElements.clear();\n\n\t\treturn result;\n\t}\n}\n\n/**\n * Deletes the content selected by the document selection at the start of composition.\n */\nfunction deleteSelectionContent( model: Model, insertTextCommand: InsertTextCommand ): void {\n\t// By relying on the state of the input command we allow disabling the entire input easily\n\t// by just disabling the input command. We could’ve used here the delete command but that\n\t// would mean requiring the delete feature which would block loading one without the other.\n\t// We could also check the editor.isReadOnly property, but that wouldn't allow to block\n\t// the input without blocking other features.\n\tif ( !insertTextCommand.isEnabled ) {\n\t\treturn;\n\t}\n\n\tconst buffer = insertTextCommand.buffer;\n\n\tbuffer.lock();\n\n\tmodel.enqueueChange( buffer.batch, () => {\n\t\tmodel.deleteContent( model.document.selection );\n\t} );\n\n\tbuffer.unlock();\n}\n\n/**\n * Detaches a ModelLiveRange and returns the static range from it.\n */\nfunction detachLiveRange( liveRange: ModelLiveRange ): ModelRange | null {\n\tconst range = liveRange.toRange();\n\n\tliveRange.detach();\n\n\tif ( range.root.rootName == '$graveyard' ) {\n\t\treturn null;\n\t}\n\n\treturn range;\n}\n\n/**\n * For the given `viewNode`, finds and returns the closest ancestor of this node that has a mapping to the model.\n */\nfunction findMappedViewAncestor( viewNode: ViewNode, mapper: Mapper ): ViewElement {\n\tlet node = ( viewNode.is( '$text' ) ? viewNode.parent : viewNode ) as ViewElement;\n\n\twhile ( !mapper.toModelElement( node ) ) {\n\t\tnode = node.parent as ViewElement;\n\t}\n\n\treturn node;\n}\n\n/**\n * The insertText command data stored as ModelLiveRange-s.\n */\ntype InsertTextCommandLiveOptions = {\n\ttext?: string;\n\tselectionRanges?: Array<ModelLiveRange>;\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/**\n * @module typing/deletecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { count } from '@ckeditor/ckeditor5-utils';\nimport type { ModelDocumentSelection, ModelElement, ModelSelection, ModelWriter } from '@ckeditor/ckeditor5-engine';\n\nimport { TypingChangeBuffer } from './utils/changebuffer.js';\n\n// @if CK_DEBUG_TYPING // import { _buildLogMessage } from '@ckeditor/ckeditor5-engine/src/dev-utils/utils.js';\n\n/**\n * The delete command. Used by the {@link module:typing/delete~Delete delete feature} to handle the <kbd>Delete</kbd> and\n * <kbd>Backspace</kbd> keys.\n */\nexport class DeleteCommand extends Command {\n\t/**\n\t * The directionality of the delete describing in what direction it should\n\t * consume the content when the selection is collapsed.\n\t */\n\tpublic readonly direction: 'forward' | 'backward';\n\n\t/**\n\t * Delete's change buffer used to group subsequent changes into batches.\n\t */\n\tprivate readonly _buffer: TypingChangeBuffer;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param direction The directionality of the delete describing in what direction it\n\t * should consume the content when the selection is collapsed.\n\t */\n\tconstructor( editor: Editor, direction: 'forward' | 'backward' ) {\n\t\tsuper( editor );\n\n\t\tthis.direction = direction;\n\t\tthis._buffer = new TypingChangeBuffer( editor.model, editor.config.get( 'typing.undoStep' ) );\n\n\t\t// Since this command may execute on different selectable than selection, it should be checked directly in execute block.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * The current change buffer.\n\t */\n\tpublic get buffer(): TypingChangeBuffer {\n\t\treturn this._buffer;\n\t}\n\n\t/**\n\t * Executes the delete command. Depending on whether the selection is collapsed or not, deletes its content\n\t * or a piece of content in the {@link #direction defined direction}.\n\t *\n\t * @fires execute\n\t * @param options The command options.\n\t * @param options.unit See {@link module:engine/model/utils/modifyselection~modifySelection}'s options.\n\t * @param options.sequence A number describing which subsequent delete event it is without the key being released.\n\t * See the {@link module:engine/view/document~ViewDocument#event:delete} event data.\n\t * @param options.selection Selection to remove. If not set, current model selection will be used.\n\t */\n\tpublic override execute( options: {\n\t\tunit?: 'character' | 'codePoint' | 'word';\n\t\tsequence?: number;\n\t\tselection?: ModelSelection | ModelDocumentSelection;\n\t} = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tmodel.enqueueChange( this._buffer.batch, writer => {\n\t\t\tthis._buffer.lock();\n\n\t\t\tconst selection = writer.createSelection( options.selection || doc.selection );\n\n\t\t\t// Don't execute command when selection is in non-editable place.\n\t\t\tif ( !model.canEditAt( selection ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst sequence = options.sequence || 1;\n\n\t\t\t// Do not replace the whole selected content if selection was collapsed.\n\t\t\t// This prevents such situation:\n\t\t\t//\n\t\t\t// <h1></h1><p>[]</p>\t-->  <h1>[</h1><p>]</p> \t\t-->  <p></p>\n\t\t\t// starting content\t\t-->   after `modifySelection`\t-->  after `deleteContent`.\n\t\t\tconst doNotResetEntireContent = selection.isCollapsed;\n\n\t\t\t// Try to extend the selection in the specified direction.\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\tmodel.modifySelection( selection, {\n\t\t\t\t\tdirection: this.direction,\n\t\t\t\t\tunit: options.unit,\n\t\t\t\t\ttreatEmojiAsSingleUnit: true\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Check if deleting in an empty editor. See https://github.com/ckeditor/ckeditor5-typing/issues/61.\n\t\t\tif ( this._shouldEntireContentBeReplacedWithParagraph( sequence ) ) {\n\t\t\t\tthis._replaceEntireContentWithParagraph( writer );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check if deleting in the first empty block.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/8137.\n\t\t\tif ( this._shouldReplaceFirstBlockWithParagraph( selection, sequence ) ) {\n\t\t\t\tthis.editor.execute( 'paragraph', { selection } );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If selection is still collapsed, then there's nothing to delete.\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet changeCount = 0;\n\n\t\t\tselection.getFirstRange()!.getMinimalFlatRanges().forEach( range => {\n\t\t\t\tchangeCount += count(\n\t\t\t\t\trange.getWalker( { singleCharacters: true, ignoreElementEnd: true, shallow: true } )\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.log( ..._buildLogMessage( this, 'DeleteCommand',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'Delete content',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t`[${ selection.getFirstPosition()!.path }]-[${ selection.getLastPosition()!.path }]`,\n\t\t\t// @if CK_DEBUG_TYPING // \t\toptions\n\t\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\tmodel.deleteContent( selection, {\n\t\t\t\tdoNotResetEntireContent,\n\t\t\t\tdirection: this.direction\n\t\t\t} );\n\n\t\t\tthis._buffer.input( changeCount );\n\n\t\t\twriter.setSelection( selection );\n\n\t\t\tthis._buffer.unlock();\n\t\t} );\n\t}\n\n\t/**\n\t * If the user keeps <kbd>Backspace</kbd> or <kbd>Delete</kbd> key pressed, the content of the current\n\t * editable will be cleared. However, this will not yet lead to resetting the remaining block to a paragraph\n\t * (which happens e.g. when the user does <kbd>Ctrl</kbd> + <kbd>A</kbd>, <kbd>Backspace</kbd>).\n\t *\n\t * But, if the user pressed the key in an empty editable for the first time,\n\t * we want to replace the entire content with a paragraph if:\n\t *\n\t * * the current limit element is empty,\n\t * * the paragraph is allowed in the limit element,\n\t * * the limit doesn't already have a paragraph inside.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5-typing/issues/61.\n\t *\n\t * @param sequence A number describing which subsequent delete event it is without the key being released.\n\t */\n\tprivate _shouldEntireContentBeReplacedWithParagraph( sequence: number ): boolean {\n\t\t// Does nothing if user pressed and held the \"Backspace\" or \"Delete\" key.\n\t\tif ( sequence > 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst selection = doc.selection;\n\t\tconst limitElement = model.schema.getLimitElement( selection );\n\n\t\t// If a collapsed selection contains the whole content it means that the content is empty\n\t\t// (from the user perspective).\n\t\tconst limitElementIsEmpty = selection.isCollapsed && selection.containsEntireContent( limitElement );\n\n\t\tif ( !limitElementIsEmpty ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !model.schema.checkChild( limitElement, 'paragraph' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst limitElementFirstChild = limitElement.getChild( 0 );\n\n\t\t// Does nothing if the limit element already contains only a paragraph.\n\t\t// We ignore the case when paragraph might have some inline elements (<p><inlineWidget>[]</inlineWidget></p>)\n\t\t// because we don't support such cases yet and it's unclear whether inlineWidget shouldn't be a limit itself.\n\t\tif ( limitElementFirstChild && limitElementFirstChild.is( 'element', 'paragraph' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * The entire content is replaced with the paragraph. Selection is moved inside the paragraph.\n\t *\n\t * @param writer The model writer.\n\t */\n\tprivate _replaceEntireContentWithParagraph( writer: ModelWriter ): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst selection = doc.selection;\n\t\tconst limitElement = model.schema.getLimitElement( selection );\n\t\tconst paragraph = writer.createElement( 'paragraph' );\n\n\t\twriter.remove( writer.createRangeIn( limitElement ) );\n\t\twriter.insert( paragraph, limitElement );\n\n\t\twriter.setSelection( paragraph, 0 );\n\t}\n\n\t/**\n\t * Checks if the selection is inside an empty element that is the first child of the limit element\n\t * and should be replaced with a paragraph.\n\t *\n\t * @param selection The selection.\n\t * @param sequence A number describing which subsequent delete event it is without the key being released.\n\t */\n\tprivate _shouldReplaceFirstBlockWithParagraph( selection: ModelSelection, sequence: number ): boolean {\n\t\tconst model = this.editor.model;\n\n\t\t// Does nothing if user pressed and held the \"Backspace\" key or it was a \"Delete\" button.\n\t\tif ( sequence > 1 || this.direction != 'backward' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst position = selection.getFirstPosition()!;\n\t\tconst limitElement = model.schema.getLimitElement( position );\n\t\tconst limitElementFirstChild = limitElement.getChild( 0 ) as ModelElement;\n\n\t\t// Only elements that are direct children of the limit element can be replaced.\n\t\t// Unwrapping from a block quote should be handled in a dedicated feature.\n\t\tif ( position.parent != limitElementFirstChild ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// A block should be replaced only if it was empty.\n\t\tif ( !selection.containsEntireContent( limitElementFirstChild ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Replace with a paragraph only if it's allowed there.\n\t\tif ( !model.schema.checkChild( limitElement, 'paragraph' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Does nothing if the limit element already contains only a paragraph.\n\t\tif ( limitElementFirstChild.name == 'paragraph' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\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/**\n * @module typing/deleteobserver\n */\n\nimport {\n\tenv,\n\tkeyCodes,\n\tisInsideCombinedSymbol,\n\tisInsideEmojiSequence,\n\tisInsideSurrogatePair\n} from '@ckeditor/ckeditor5-utils';\nimport {\n\tBubblingEventInfo,\n\tViewDocumentDomEventData,\n\tObserver,\n\ttype BubblingEvent,\n\ttype ViewDocumentInputEvent,\n\ttype ViewDocumentKeyDownEvent,\n\ttype ViewDocumentKeyUpEvent,\n\ttype ViewDocumentSelection,\n\ttype ViewSelection,\n\ttype ViewRange,\n\ttype EditingView\n} from '@ckeditor/ckeditor5-engine';\n\nconst DELETE_CHARACTER = 'character';\nconst DELETE_WORD = 'word';\nconst DELETE_CODE_POINT = 'codePoint';\nconst DELETE_SELECTION = 'selection';\nconst DELETE_BACKWARD = 'backward';\nconst DELETE_FORWARD = 'forward';\n\ntype DeleteEventSpec = {\n\tunit: 'selection' | 'codePoint' | 'character' | 'word';\n\tdirection: 'backward' | 'forward';\n};\n\nconst DELETE_EVENT_TYPES: Record<string, DeleteEventSpec> = {\n\t// --------------------------------------- Backward delete types -----------------------------------------------------\n\n\t// This happens in Safari on Mac when some content is selected and Ctrl + K is pressed.\n\tdeleteContent: {\n\t\tunit: DELETE_SELECTION,\n\n\t\t// According to the Input Events Level 2 spec, this delete type has no direction\n\t\t// but to keep things simple, let's default to backward.\n\t\tdirection: DELETE_BACKWARD\n\t},\n\t// Chrome and Safari on Mac: Backspace or Ctrl + H\n\tdeleteContentBackward: {\n\t\t// This kind of deletions must be done on the code point-level instead of target range provided by the DOM beforeinput event.\n\t\t// Take for instance \"👨‍👩‍👧‍👧\", it equals:\n\t\t//\n\t\t//\t* [ \"👨\", \"ZERO WIDTH JOINER\", \"👩\", \"ZERO WIDTH JOINER\", \"👧\", \"ZERO WIDTH JOINER\", \"👧\" ]\n\t\t//\t* or simply \"\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}\"\n\t\t//\n\t\t// The range provided by the browser would cause the entire multi-byte grapheme to disappear while the user\n\t\t// intention when deleting backwards (\"👨‍👩‍👧‍👧[]\", then backspace) is gradual \"decomposition\" (first to \"👨‍👩‍👧‍[]\",\n\t\t// then to \"👨‍👩‍[]\", etc.).\n\t\t//\n\t\t//\t* \"👨‍👩‍👧‍👧[]\" + backward delete (by code point)  -> results in \"👨‍👩‍👧[]\", removed the last \"👧\" 👍\n\t\t//\t* \"👨‍👩‍👧‍👧[]\" + backward delete (by character)  -> results in \"[]\", removed the whole grapheme 👎\n\t\t//\n\t\t// Deleting by code-point is simply a better UX. See \"deleteContentForward\" to learn more.\n\t\tunit: DELETE_CODE_POINT,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\t// On Mac: Option + Backspace.\n\t// On iOS: Hold the backspace for a while and the whole words will start to disappear.\n\tdeleteWordBackward: {\n\t\tunit: DELETE_WORD,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\t// Safari on Mac: Cmd + Backspace\n\tdeleteHardLineBackward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\t// Chrome on Mac: Cmd + Backspace.\n\tdeleteSoftLineBackward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_BACKWARD\n\t},\n\n\t// --------------------------------------- Forward delete types -----------------------------------------------------\n\n\t// Chrome on Mac: Fn + Backspace or Ctrl + D\n\t// Safari on Mac: Ctrl + K or Ctrl + D\n\tdeleteContentForward: {\n\t\t// Unlike backward delete, this delete must be performed by character instead of by code point, which\n\t\t// provides the best UX for working with accented letters.\n\t\t// Take, for example \"b̂\" (\"\\u0062\\u0302\", or [ \"LATIN SMALL LETTER B\", \"COMBINING CIRCUMFLEX ACCENT\" ]):\n\t\t//\n\t\t//\t* \"b̂[]\" + backward delete (by code point)  -> results in \"b[]\", removed the combining mark 👍\n\t\t//\t* \"[]b̂\" + forward delete (by code point)   -> results in \"[]^\", a bare combining mark does that not make sense when alone 👎\n\t\t//\t* \"[]b̂\" + forward delete (by character)    -> results in \"[]\", removed both \"b\" and the combining mark 👍\n\t\t//\n\t\t// See: \"deleteContentBackward\" to learn more.\n\t\tunit: DELETE_CHARACTER,\n\t\tdirection: DELETE_FORWARD\n\t},\n\t// On Mac: Fn + Option + Backspace.\n\tdeleteWordForward: {\n\t\tunit: DELETE_WORD,\n\t\tdirection: DELETE_FORWARD\n\t},\n\t// Chrome on Mac: Ctrl + K (you have to disable the Link plugin first, though, because it uses the same keystroke)\n\t// This is weird that it does not work in Safari on Mac despite being listed in the official shortcuts listing\n\t// on Apple's webpage.\n\tdeleteHardLineForward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_FORWARD\n\t},\n\t// At this moment there is no known way to trigger this event type but let's keep it for the symmetry with\n\t// deleteSoftLineBackward.\n\tdeleteSoftLineForward: {\n\t\tunit: DELETE_SELECTION,\n\t\tdirection: DELETE_FORWARD\n\t}\n};\n\n/**\n * Delete observer introduces the {@link module:engine/view/document~ViewDocument#event:delete} event.\n *\n * @internal\n */\nexport class DeleteObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tconst document = view.document;\n\n\t\t// It matters how many subsequent deletions were made, e.g. when the backspace key was pressed and held\n\t\t// by the user for some time. For instance, if such scenario ocurred and the heading the selection was\n\t\t// anchored to was the only content of the editor, it will not be converted into a paragraph (the user\n\t\t// wanted to clean it up, not remove it, it's about UX). Check out the DeleteCommand implementation to learn more.\n\t\t//\n\t\t// Fun fact: Safari on Mac won't fire beforeinput for backspace in an empty heading (only content).\n\t\tlet sequence = 0;\n\n\t\tdocument.on( 'keydown', () => {\n\t\t\tsequence++;\n\t\t} );\n\n\t\tdocument.on( 'keyup', () => {\n\t\t\tsequence = 0;\n\t\t} );\n\n\t\tdocument.on<ViewDocumentInputEvent>( 'beforeinput', ( evt, data ) => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { targetRanges, domEvent, inputType } = data;\n\t\t\tconst deleteEventSpec = DELETE_EVENT_TYPES[ inputType ];\n\n\t\t\tif ( !deleteEventSpec ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst deleteData: Partial<DeleteEventData> = {\n\t\t\t\tdirection: deleteEventSpec.direction,\n\t\t\t\tunit: deleteEventSpec.unit,\n\t\t\t\tsequence\n\t\t\t};\n\n\t\t\tif ( deleteData.unit == DELETE_SELECTION ) {\n\t\t\t\tdeleteData.selectionToRemove = view.createSelection( targetRanges[ 0 ] );\n\t\t\t}\n\n\t\t\t// The default deletion unit for deleteContentBackward is a single code point\n\t\t\t// but if the browser provides a wider target range then we should use it.\n\t\t\tif ( inputType === 'deleteContentBackward' ) {\n\t\t\t\t// On Android, deleteContentBackward has sequence 1 by default.\n\t\t\t\tif ( env.isAndroid ) {\n\t\t\t\t\tdeleteData.sequence = 1;\n\t\t\t\t}\n\n\t\t\t\t// The beforeInput event wants more than a single character to be removed.\n\t\t\t\tif ( shouldUseTargetRanges( targetRanges ) ) {\n\t\t\t\t\tdeleteData.unit = DELETE_SELECTION;\n\t\t\t\t\tdeleteData.selectionToRemove = view.createSelection( targetRanges );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst eventInfo = new BubblingEventInfo( document, 'delete', targetRanges[ 0 ] );\n\n\t\t\tdocument.fire( eventInfo, new ViewDocumentDomEventData( view, domEvent, deleteData ) );\n\n\t\t\t// Stop the beforeinput event if `delete` event was stopped.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/753\n\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\n\t\t// TODO: to be removed when https://bugs.chromium.org/p/chromium/issues/detail?id=1365311 is solved.\n\t\tif ( env.isBlink ) {\n\t\t\tenableChromeWorkaround( this );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic observe(): void {}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic stopObserving(): void {}\n}\n\n/**\n * Event fired when the user tries to delete content (e.g. presses <kbd>Delete</kbd> or <kbd>Backspace</kbd>).\n *\n * Note: This event is fired by the {@link module:typing/deleteobserver~DeleteObserver delete observer}\n * (usually registered by the {@link module:typing/delete~Delete delete feature}).\n *\n * @eventName module:engine/view/document~ViewDocument#delete\n * @param data The event data.\n */\nexport type ViewDocumentDeleteEvent = BubblingEvent<{\n\tname: 'delete';\n\targs: [ data: DeleteEventData ];\n}>;\n\nexport interface DeleteEventData extends ViewDocumentDomEventData<InputEvent> {\n\n\t/**\n\t * The direction in which the deletion should happen.\n\t */\n\tdirection: 'backward' | 'forward';\n\n\t/**\n\t * The \"amount\" of content that should be deleted.\n\t */\n\tunit: 'selection' | 'codePoint' | 'character' | 'word';\n\n\t/**\n\t * A number describing which subsequent delete event it is without the key being released.\n\t * If it's 2 or more it means that the key was pressed and hold.\n\t */\n\tsequence: number;\n\n\t/**\n\t * View selection which content should be removed. If not set,\n\t * current selection should be used.\n\t */\n\tselectionToRemove?: ViewSelection | ViewDocumentSelection;\n}\n\n/**\n * Enables workaround for the issue https://github.com/ckeditor/ckeditor5/issues/11904.\n */\nfunction enableChromeWorkaround( observer: DeleteObserver ) {\n\tconst view = observer.view;\n\tconst document = view.document;\n\n\tlet pressedKeyCode: number | null = null;\n\tlet beforeInputReceived = false;\n\n\tdocument.on<ViewDocumentKeyDownEvent>( 'keydown', ( evt, { keyCode } ) => {\n\t\tpressedKeyCode = keyCode;\n\t\tbeforeInputReceived = false;\n\t} );\n\n\tdocument.on<ViewDocumentKeyUpEvent>( 'keyup', ( evt, { keyCode, domEvent } ) => {\n\t\tconst selection = document.selection;\n\t\tconst shouldFireDeleteEvent = observer.isEnabled &&\n\t\t\tkeyCode == pressedKeyCode &&\n\t\t\tisDeleteKeyCode( keyCode ) &&\n\t\t\t!selection.isCollapsed &&\n\t\t\t!beforeInputReceived;\n\n\t\tpressedKeyCode = null;\n\n\t\tif ( shouldFireDeleteEvent ) {\n\t\t\tconst targetRange = selection.getFirstRange()!;\n\t\t\tconst eventInfo = new BubblingEventInfo( document, 'delete', targetRange );\n\t\t\tconst deleteData: Partial<DeleteEventData> = {\n\t\t\t\tunit: DELETE_SELECTION,\n\t\t\t\tdirection: getDeleteDirection( keyCode ),\n\t\t\t\tselectionToRemove: selection\n\t\t\t};\n\n\t\t\tdocument.fire( eventInfo, new ViewDocumentDomEventData( view, domEvent, deleteData ) );\n\t\t}\n\t} );\n\n\tdocument.on<ViewDocumentInputEvent>( 'beforeinput', ( evt, { inputType } ) => {\n\t\tconst deleteEventSpec = DELETE_EVENT_TYPES[ inputType ];\n\t\tconst isMatchingBeforeInput = isDeleteKeyCode( pressedKeyCode ) &&\n\t\t\tdeleteEventSpec &&\n\t\t\tdeleteEventSpec.direction == getDeleteDirection( pressedKeyCode );\n\n\t\tif ( isMatchingBeforeInput ) {\n\t\t\tbeforeInputReceived = true;\n\t\t}\n\t}, { priority: 'high' } );\n\n\tdocument.on<ViewDocumentInputEvent>( 'beforeinput', ( evt, { inputType, data } ) => {\n\t\tconst shouldIgnoreBeforeInput = pressedKeyCode == keyCodes.delete &&\n\t\t\tinputType == 'insertText' &&\n\t\t\tdata == '\\x7f'; // Delete character :P\n\n\t\tif ( shouldIgnoreBeforeInput ) {\n\t\t\tevt.stop();\n\t\t}\n\t}, { priority: 'high' } );\n\n\tfunction isDeleteKeyCode( keyCode: number | null ): boolean {\n\t\treturn keyCode == keyCodes.backspace || keyCode == keyCodes.delete;\n\t}\n\n\tfunction getDeleteDirection( keyCode: number | null ): 'backward' | 'forward' {\n\t\treturn keyCode == keyCodes.backspace ? DELETE_BACKWARD : DELETE_FORWARD;\n\t}\n}\n\n/**\n * Verifies whether the given target ranges cover more than a single character and should be used instead of a single code-point deletion.\n */\nfunction shouldUseTargetRanges( targetRanges: Array<ViewRange> ): boolean {\n\t// The collapsed target range could happen for example while deleting inside an inline filler\n\t// (it's mapped to collapsed position before an inline filler).\n\tif ( targetRanges.length != 1 || targetRanges[ 0 ].isCollapsed ) {\n\t\treturn false;\n\t}\n\n\tconst walker = targetRanges[ 0 ].getWalker( {\n\t\tdirection: 'backward',\n\t\tsingleCharacters: true,\n\t\tignoreElementEnd: true\n\t} );\n\n\tlet count = 0;\n\n\tfor ( const { nextPosition, item } of walker ) {\n\t\tif ( nextPosition.parent.is( '$text' ) ) {\n\t\t\tconst data = nextPosition.parent.data;\n\t\t\tconst offset = nextPosition.offset;\n\n\t\t\t// Count combined symbols and emoji sequences as a single character.\n\t\t\tif (\n\t\t\t\tisInsideSurrogatePair( data, offset ) ||\n\t\t\t\tisInsideCombinedSymbol( data, offset ) ||\n\t\t\t\tisInsideEmojiSequence( data, offset )\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tcount++;\n\t\t} else if ( item.is( 'containerElement' ) || item.is( 'emptyElement' ) ) {\n\t\t\tcount++;\n\t\t}\n\n\t\tif ( count > 1 ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\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/**\n * @module typing/delete\n */\n\nimport {\n\t_tryFixingModelRange,\n\tBubblingEventInfo,\n\tViewDocumentDomEventData,\n\ttype ViewDocumentKeyDownEvent\n} from '@ckeditor/ckeditor5-engine';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { keyCodes } from '@ckeditor/ckeditor5-utils';\nimport { DeleteCommand } from './deletecommand.js';\nimport { DeleteObserver, type DeleteEventData, type ViewDocumentDeleteEvent } from './deleteobserver.js';\n\n/**\n * The delete and backspace feature. Handles keys such as <kbd>Delete</kbd> and <kbd>Backspace</kbd>, other\n * keystrokes and user actions that result in deleting content in the editor.\n */\nexport class Delete extends Plugin {\n\t/**\n\t * Whether pressing backspace should trigger undo action\n\t */\n\tprivate _undoOnBackspace!: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Delete' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst modelDocument = editor.model.document;\n\n\t\tview.addObserver( DeleteObserver );\n\n\t\tthis._undoOnBackspace = false;\n\n\t\tconst deleteForwardCommand = new DeleteCommand( editor, 'forward' );\n\n\t\t// Register `deleteForward` command and add `forwardDelete` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'deleteForward', deleteForwardCommand );\n\t\teditor.commands.add( 'forwardDelete', deleteForwardCommand );\n\n\t\teditor.commands.add( 'delete', new DeleteCommand( editor, 'backward' ) );\n\n\t\tthis.listenTo<ViewDocumentDeleteEvent>( viewDocument, 'delete', ( evt, data ) => {\n\t\t\t// When not in composition, we handle the action, so prevent the default one.\n\t\t\t// When in composition, it's the browser who modify the DOM (renderer is disabled).\n\t\t\tif ( !viewDocument.isComposing ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\n\t\t\tconst { direction, sequence, selectionToRemove, unit } = data;\n\t\t\tconst commandName = direction === 'forward' ? 'deleteForward' : 'delete';\n\t\t\tconst commandData: Parameters<DeleteCommand[ 'execute' ]>[ 0 ] = { sequence };\n\n\t\t\tif ( unit == 'selection' ) {\n\t\t\t\tconst modelRanges = Array.from( selectionToRemove!.getRanges() )\n\t\t\t\t\t.map( viewRange => editor.editing.mapper.toModelRange( viewRange ) )\n\t\t\t\t\t.map( modelRange => _tryFixingModelRange( modelRange, editor.model.schema ) || modelRange );\n\n\t\t\t\tcommandData.selection = editor.model.createSelection( modelRanges );\n\t\t\t} else {\n\t\t\t\tcommandData.unit = unit;\n\t\t\t}\n\n\t\t\teditor.execute( commandName, commandData );\n\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: 'low' } );\n\n\t\t// Handle the Backspace key while at the beginning of a nested editable. See https://github.com/ckeditor/ckeditor5/issues/17383.\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( evt, data ) => {\n\t\t\tif (\n\t\t\t\tviewDocument.isComposing ||\n\t\t\t\tdata.keyCode != keyCodes.backspace ||\n\t\t\t\t!modelDocument.selection.isCollapsed\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst ancestorLimit = editor.model.schema.getLimitElement( modelDocument.selection );\n\t\t\tconst limitStartPosition = editor.model.createPositionAt( ancestorLimit, 0 );\n\n\t\t\tif ( limitStartPosition.isTouching( modelDocument.selection.getFirstPosition()! ) ) {\n\t\t\t\t// Stop the beforeinput event as it could be invalid.\n\t\t\t\tdata.preventDefault();\n\n\t\t\t\t// Create a fake delete event so all features can act on it and the target range is proper.\n\t\t\t\tconst modelRange = editor.model.schema.getNearestSelectionRange( limitStartPosition, 'forward' );\n\n\t\t\t\tif ( !modelRange ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewSelection = view.createSelection( editor.editing.mapper.toViewRange( modelRange ) );\n\t\t\t\tconst targetRange = viewSelection.getFirstRange()!;\n\n\t\t\t\tconst eventInfo = new BubblingEventInfo( document, 'delete', targetRange );\n\t\t\t\tconst deleteData: Partial<DeleteEventData> = {\n\t\t\t\t\tunit: 'selection',\n\t\t\t\t\tdirection: 'backward',\n\t\t\t\t\tselectionToRemove: viewSelection\n\t\t\t\t};\n\n\t\t\t\tviewDocument.fire( eventInfo, new ViewDocumentDomEventData( view, data.domEvent, deleteData ) );\n\t\t\t}\n\t\t} );\n\n\t\tif ( this.editor.plugins.has( 'UndoEditing' ) ) {\n\t\t\tthis.listenTo<ViewDocumentDeleteEvent>( viewDocument, 'delete', ( evt, data ) => {\n\t\t\t\tif ( this._undoOnBackspace && data.direction == 'backward' && data.sequence == 1 && data.unit == 'codePoint' ) {\n\t\t\t\t\tthis._undoOnBackspace = false;\n\n\t\t\t\t\teditor.execute( 'undo' );\n\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t}, { context: '$capture' } );\n\n\t\t\tthis.listenTo( modelDocument, 'change', () => {\n\t\t\t\tthis._undoOnBackspace = false;\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * If the next user action after calling this method is pressing backspace, it would undo the last change.\n\t *\n\t * Requires {@link module:undo/undoediting~UndoEditing} plugin. If not loaded, does nothing.\n\t */\n\tpublic requestUndoOnBackspace(): void {\n\t\tif ( this.editor.plugins.has( 'UndoEditing' ) ) {\n\t\t\tthis._undoOnBackspace = true;\n\t\t}\n\t}\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/**\n * @module typing/typing\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { Input } from './input.js';\nimport { Delete } from './delete.js';\n\n/**\n * The typing feature. It handles typing.\n *\n * This is a \"glue\" plugin which loads the {@link module:typing/input~Input} and {@link module:typing/delete~Delete}\n * plugins.\n */\nexport class Typing extends Plugin {\n\tpublic static get requires(): PluginDependenciesOf<[ Input, Delete ]> {\n\t\treturn [ Input, Delete ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Typing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module typing/utils/getlasttextline\n */\n\nimport type { Model, ModelRange } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Returns the last text line from the given range.\n *\n * \"The last text line\" is understood as text (from one or more text nodes) which is limited either by a parent block\n * or by inline elements (e.g. `<softBreak>`).\n *\n * ```ts\n * const rangeToCheck = model.createRange(\n * \tmodel.createPositionAt( paragraph, 0 ),\n * \tmodel.createPositionAt( paragraph, 'end' )\n * );\n *\n * const { text, range } = getLastTextLine( rangeToCheck, model );\n * ```\n *\n * For model below, the returned `text` will be \"Foo bar baz\" and `range` will be set on whole `<paragraph>` content:\n *\n * ```xml\n * <paragraph>Foo bar baz<paragraph>\n * ```\n *\n * However, in below case, `text` will be set to \"baz\" and `range` will be set only on \"baz\".\n *\n * ```xml\n * <paragraph>Foo<softBreak></softBreak>bar<softBreak></softBreak>baz<paragraph>\n * ```\n */\nexport function getLastTextLine( range: ModelRange, model: Model ): LastTextLineData {\n\tlet start = range.start;\n\n\tconst text = Array.from( range.getWalker( { ignoreElementEnd: false } ) ).reduce( ( rangeText, { item } ) => {\n\t\t// Trim text to a last occurrence of an inline element and update range start.\n\t\tif ( !( item.is( '$text' ) || item.is( '$textProxy' ) ) ) {\n\t\t\tstart = model.createPositionAfter( item );\n\n\t\t\treturn '';\n\t\t}\n\n\t\treturn rangeText + item.data;\n\t}, '' );\n\n\treturn { text, range: model.createRange( start, range.end ) };\n}\n\n/**\n * The value returned by {@link module:typing/utils/getlasttextline~getLastTextLine}.\n */\nexport type LastTextLineData = {\n\n\t/**\n\t * The text from the text nodes in the last text line.\n\t */\n\ttext: string;\n\n\t/**\n\t * The range set on the text nodes in the last text line.\n\t */\n\trange: ModelRange;\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/**\n * @module typing/textwatcher\n */\n\nimport { ObservableMixin, type ObservableChangeEvent, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\nimport { getLastTextLine } from './utils/getlasttextline.js';\n\nimport type {\n\tBatch,\n\tModel,\n\tModelRange,\n\tModelDocumentChangeEvent,\n\tModelDocumentSelectionChangeEvent\n} from '@ckeditor/ckeditor5-engine';\n\nconst TextWatcherBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * The text watcher feature.\n *\n * Fires the {@link module:typing/textwatcher~TextWatcher#event:matched:data `matched:data`},\n * {@link module:typing/textwatcher~TextWatcher#event:matched:selection `matched:selection`} and\n * {@link module:typing/textwatcher~TextWatcher#event:unmatched `unmatched`} events on typing or selection changes.\n */\nexport class TextWatcher extends TextWatcherBase {\n\t/**\n\t * The editor's model.\n\t */\n\tpublic readonly model: Model;\n\n\t/**\n\t * The function used to match the text.\n\t *\n\t * The test callback can return 3 values:\n\t *\n\t * * `false` if there is no match,\n\t * * `true` if there is a match,\n\t * * an object if there is a match and we want to pass some additional information to the {@link #event:matched:data} event.\n\t */\n\tpublic testCallback: ( text: string ) => unknown;\n\n\t/**\n\t * Whether there is a match currently.\n\t */\n\tprivate _hasMatch: boolean;\n\n\t/**\n\t * Flag indicating whether the `TextWatcher` instance is enabled or disabled.\n\t * A disabled TextWatcher will not evaluate text.\n\t *\n\t * To disable TextWatcher:\n\t *\n\t * ```ts\n\t * const watcher = new TextWatcher( editor.model, testCallback );\n\t *\n\t * // After this a testCallback will not be called.\n\t * watcher.isEnabled = false;\n\t * ```\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * Creates a text watcher instance.\n\t *\n\t * @param testCallback See {@link module:typing/textwatcher~TextWatcher#testCallback}.\n\t */\n\tconstructor( model: Model, testCallback: ( text: string ) => unknown ) {\n\t\tsuper();\n\n\t\tthis.model = model;\n\t\tthis.testCallback = testCallback;\n\t\tthis._hasMatch = false;\n\n\t\tthis.set( 'isEnabled', true );\n\n\t\t// Toggle text watching on isEnabled state change.\n\t\tthis.on<ObservableChangeEvent>( 'change:isEnabled', () => {\n\t\t\tif ( this.isEnabled ) {\n\t\t\t\tthis._startListening();\n\t\t\t} else {\n\t\t\t\tthis.stopListening( model.document.selection );\n\t\t\t\tthis.stopListening( model.document );\n\t\t\t}\n\t\t} );\n\n\t\tthis._startListening();\n\t}\n\n\t/**\n\t * Flag indicating whether there is a match currently.\n\t */\n\tpublic get hasMatch(): boolean {\n\t\treturn this._hasMatch;\n\t}\n\n\t/**\n\t * Starts listening to the editor for typing and selection events.\n\t */\n\tprivate _startListening(): void {\n\t\tconst model = this.model;\n\t\tconst document = model.document;\n\n\t\tthis.listenTo<ModelDocumentSelectionChangeEvent>( document.selection, 'change:range', ( evt, { directChange } ) => {\n\t\t\t// Indirect changes (i.e. when the user types or external changes are applied) are handled in the document's change event.\n\t\t\tif ( !directChange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Act only on collapsed selection.\n\t\t\tif ( !document.selection.isCollapsed ) {\n\t\t\t\tif ( this.hasMatch ) {\n\t\t\t\t\tthis.fire( 'unmatched' );\n\t\t\t\t\tthis._hasMatch = false;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._evaluateTextBeforeSelection( 'selection' );\n\t\t} );\n\n\t\tthis.listenTo<ModelDocumentChangeEvent>( document, 'change:data', ( evt, batch ) => {\n\t\t\tif ( batch.isUndo || !batch.isLocal ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._evaluateTextBeforeSelection( 'data', { batch } );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the editor content for matched text.\n\t *\n\t * @fires matched:data\n\t * @fires matched:selection\n\t * @fires unmatched\n\t *\n\t * @param suffix A suffix used for generating the event name.\n\t * @param data Data object for event.\n\t */\n\tprivate _evaluateTextBeforeSelection( suffix: 'data' | 'selection', data: { batch?: Batch } = {} ): void {\n\t\tconst model = this.model;\n\t\tconst document = model.document;\n\t\tconst selection = document.selection;\n\n\t\tconst rangeBeforeSelection = model.createRange( model.createPositionAt( selection.focus!.parent, 0 ), selection.focus! );\n\n\t\tconst { text, range } = getLastTextLine( rangeBeforeSelection, model );\n\n\t\tconst testResult = this.testCallback( text );\n\n\t\tif ( !testResult && this.hasMatch ) {\n\t\t\tthis.fire<TextWatcherUnmatchedTypingEvent>( 'unmatched' );\n\t\t}\n\n\t\tthis._hasMatch = !!testResult;\n\n\t\tif ( testResult ) {\n\t\t\tconst eventData = Object.assign( data, { text, range } );\n\n\t\t\t// If the test callback returns an object with additional data, assign the data as well.\n\t\t\tif ( typeof testResult == 'object' ) {\n\t\t\t\tObject.assign( eventData, testResult );\n\t\t\t}\n\n\t\t\tthis.fire<TextWatcherMatchedEvent>( `matched:${ suffix }`, eventData );\n\t\t}\n\t}\n}\n\nexport type TextWatcherMatchedEvent<TCallbackResult extends Record<string, unknown> = Record<string, unknown>> = {\n\tname: 'matched' | 'matched:data' | 'matched:selection';\n\targs: [ {\n\t\ttext: string;\n\t\trange: ModelRange;\n\t\tbatch?: Batch;\n\t} & TCallbackResult ];\n};\n\n/**\n * Fired whenever the text watcher found a match for data changes.\n *\n * @eventName ~TextWatcher#matched:data\n * @param data Event data.\n * @param data.testResult The additional data returned from the {@link module:typing/textwatcher~TextWatcher#testCallback}.\n */\nexport type TextWatcherMatchedDataEvent<TCallbackResult extends Record<string, unknown>> = {\n\tname: 'matched:data';\n\targs: [ data: TextWatcherMatchedTypingDataEventData & TCallbackResult ];\n};\n\nexport interface TextWatcherMatchedTypingDataEventData {\n\n\t/**\n\t * The full text before selection to which the regexp was applied.\n\t */\n\ttext: string;\n\n\t/**\n\t * The range representing the position of the `data.text`.\n\t */\n\trange: ModelRange;\n\n\tbatch: Batch;\n}\n\n/**\n * Fired whenever the text watcher found a match for selection changes.\n *\n * @eventName ~TextWatcher#matched:selection\n * @param data Event data.\n * @param data.testResult The additional data returned from the {@link module:typing/textwatcher~TextWatcher#testCallback}.\n */\nexport type TextWatcherMatchedTypingSelectionEvent<TCallbackResult extends Record<string, unknown>> = {\n\tname: 'matched:selection';\n\targs: [ data: TextWatcherMatchedTypingSelectionEventData & TCallbackResult ];\n};\n\nexport interface TextWatcherMatchedTypingSelectionEventData {\n\n\t/**\n\t * The full text before selection.\n\t */\n\ttext: string;\n\n\t/**\n\t * The range representing the position of the `data.text`.\n\t */\n\trange: ModelRange;\n}\n\n/**\n * Fired whenever the text does not match anymore. Fired only when the text watcher found a match.\n *\n * @eventName ~TextWatcher#unmatched\n */\nexport type TextWatcherUnmatchedTypingEvent = {\n\tname: 'unmatched';\n\targs: [];\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/**\n * @module typing/twostepcaretmovement\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport { keyCodes } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tMouseObserver,\n\tTouchObserver,\n\ttype ModelDocumentSelection,\n\ttype ModelDocumentSelectionChangeRangeEvent,\n\ttype ViewDocumentDomEventData,\n\ttype Model,\n\ttype ModelPosition,\n\ttype ViewDocumentArrowKeyEvent,\n\ttype ViewDocumentMouseDownEvent,\n\ttype ViewDocumentObserverSelectionChangeEvent,\n\ttype ViewDocumentTouchStartEvent,\n\ttype ModelInsertContentEvent,\n\ttype ModelDeleteContentEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport type { ViewDocumentDeleteEvent } from './deleteobserver.js';\n\n/**\n * This plugin enables the two-step caret (phantom) movement behavior for\n * {@link module:typing/twostepcaretmovement~TwoStepCaretMovement#registerAttribute registered attributes}\n * on arrow right (<kbd>→</kbd>) and left (<kbd>←</kbd>) key press.\n *\n * Thanks to this (phantom) caret movement the user is able to type before/after as well as at the\n * beginning/end of an attribute.\n *\n * **Note:** This plugin support right–to–left (Arabic, Hebrew, etc.) content by mirroring its behavior\n * but for the sake of simplicity examples showcase only left–to–right use–cases.\n *\n * # Forward movement\n *\n * ## \"Entering\" an attribute:\n *\n * When this plugin is enabled and registered for the `a` attribute and the selection is right before it\n * (at the attribute boundary), pressing the right arrow key will not move the selection but update its\n * attributes accordingly:\n *\n * * When enabled:\n *\n * ```xml\n * foo{}<$text a=\"true\">bar</$text>\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * foo<$text a=\"true\">{}bar</$text>\n * ```\n *\n * * When disabled:\n *\n * ```xml\n * foo{}<$text a=\"true\">bar</$text>\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * foo<$text a=\"true\">b{}ar</$text>\n * ```\n *\n *\n * ## \"Leaving\" an attribute:\n *\n * * When enabled:\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text>baz\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar</$text>{}baz\n * ```\n *\n * * When disabled:\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text>baz\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar</$text>b{}az\n * ```\n *\n * # Backward movement\n *\n * * When enabled:\n *\n * ```xml\n * <$text a=\"true\">bar</$text>{}baz\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text>baz\n * ```\n *\n * * When disabled:\n *\n * ```xml\n * <$text a=\"true\">bar</$text>{}baz\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\">ba{}r</$text>b{}az\n * ```\n *\n * # Multiple attributes\n *\n * * When enabled and many attributes starts or ends at the same position:\n *\n * ```xml\n * <$text a=\"true\" b=\"true\">bar</$text>{}baz\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\" b=\"true\">bar{}</$text>baz\n * ```\n *\n * * When enabled and one procedes another:\n *\n * ```xml\n * <$text a=\"true\">bar</$text><$text b=\"true\">{}bar</$text>\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text><$text b=\"true\">bar</$text>\n * ```\n *\n */\nexport class TwoStepCaretMovement extends Plugin {\n\t/**\n\t * A set of attributes to handle.\n\t */\n\tprivate attributes: Set<string>;\n\n\t/**\n\t * The current UID of the overridden gravity, as returned by\n\t * {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}.\n\t */\n\tprivate _overrideUid: string | null;\n\n\t/**\n\t * A flag indicating that the automatic gravity restoration should not happen upon the next\n\t * gravity restoration.\n\t * {@link module:engine/model/selection~ModelSelection#event:change:range} event.\n\t */\n\n\tprivate _isNextGravityRestorationSkipped = false;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TwoStepCaretMovement' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.attributes = new Set();\n\t\tthis._overrideUid = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst locale = editor.locale;\n\n\t\tconst modelSelection = model.document.selection;\n\n\t\t// Listen to keyboard events and handle the caret movement according to the 2-step caret logic.\n\t\tthis.listenTo<ViewDocumentArrowKeyEvent>( view.document, 'arrowKey', ( evt, data ) => {\n\t\t\t// This implementation works only for collapsed selection.\n\t\t\tif ( !modelSelection.isCollapsed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// When user tries to expand the selection or jump over the whole word or to the beginning/end then\n\t\t\t// two-steps movement is not necessary.\n\t\t\tif ( data.shiftKey || data.altKey || data.ctrlKey ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst arrowRightPressed = data.keyCode == keyCodes.arrowright;\n\t\t\tconst arrowLeftPressed = data.keyCode == keyCodes.arrowleft;\n\n\t\t\t// When neither left or right arrow has been pressed then do noting.\n\t\t\tif ( !arrowRightPressed && !arrowLeftPressed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst contentDirection = locale.contentLanguageDirection;\n\t\t\tlet isMovementHandled;\n\n\t\t\tif ( ( contentDirection === 'ltr' && arrowRightPressed ) || ( contentDirection === 'rtl' && arrowLeftPressed ) ) {\n\t\t\t\tisMovementHandled = this._handleForwardMovement( data );\n\t\t\t} else {\n\t\t\t\tisMovementHandled = this._handleBackwardMovement( data );\n\t\t\t}\n\n\t\t\t// Stop the keydown event if the two-step caret movement handled it. Avoid collisions\n\t\t\t// with other features which may also take over the caret movement (e.g. Widget).\n\t\t\tif ( isMovementHandled === true ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: '$text', priority: 'highest' } );\n\n\t\t// The automatic gravity restoration logic.\n\t\tthis.listenTo<ModelDocumentSelectionChangeRangeEvent>( modelSelection, 'change:range', ( evt, data ) => {\n\t\t\t// Skipping the automatic restoration is needed if the selection should change\n\t\t\t// but the gravity must remain overridden afterwards. See the #handleBackwardMovement\n\t\t\t// to learn more.\n\t\t\tif ( this._isNextGravityRestorationSkipped ) {\n\t\t\t\tthis._isNextGravityRestorationSkipped = false;\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Skip automatic restore when the gravity is not overridden — simply, there's nothing to restore\n\t\t\t// at this moment.\n\t\t\tif ( !this._isGravityOverridden ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Skip automatic restore when the change is indirect AND the selection is at the attribute boundary.\n\t\t\t// It means that e.g. if the change was external (collaboration) and the user had their\n\t\t\t// selection around the link, its gravity should remain intact in this change:range event.\n\t\t\tif ( !data.directChange && isBetweenDifferentAttributes( modelSelection.getFirstPosition()!, this.attributes ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._restoreGravity();\n\t\t} );\n\n\t\t// Handle a click at the beginning/end of a two-step element.\n\t\tthis._enableClickingAfterNode();\n\n\t\t// Change the attributes of the selection in certain situations after the two-step node was inserted into the document.\n\t\tthis._enableInsertContentSelectionAttributesFixer();\n\n\t\t// Handle removing the content after the two-step node.\n\t\tthis._handleDeleteContentAfterNode();\n\t}\n\n\t/**\n\t * Registers a given attribute for the two-step caret movement.\n\t *\n\t * @param attribute Name of the attribute to handle.\n\t */\n\tpublic registerAttribute( attribute: string ): void {\n\t\tthis.attributes.add( attribute );\n\t}\n\n\t/**\n\t * Updates the document selection and the view according to the two–step caret movement state\n\t * when moving **forwards**. Executed upon `keypress` in the {@link module:engine/view/view~EditingView}.\n\t *\n\t * @internal\n\t * @param eventData Data of the key press.\n\t * @returns `true` when the handler prevented caret movement.\n\t */\n\tpublic _handleForwardMovement( eventData?: ViewDocumentDomEventData ): boolean {\n\t\tconst attributes = this.attributes;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst position = selection.getFirstPosition()!;\n\n\t\t// DON'T ENGAGE 2-SCM if gravity is already overridden. It means that we just entered\n\t\t//\n\t\t// \t\t<paragraph>foo<$text attribute>{}bar</$text>baz</paragraph>\n\t\t//\n\t\t// or left the attribute\n\t\t//\n\t\t// \t\t<paragraph>foo<$text attribute>bar</$text>{}baz</paragraph>\n\t\t//\n\t\t// and the gravity will be restored automatically.\n\t\tif ( this._isGravityOverridden ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// DON'T ENGAGE 2-SCM when the selection is at the beginning of the block AND already has the\n\t\t// attribute:\n\t\t// * when the selection was initially set there using the mouse,\n\t\t// * when the editor has just started\n\t\t//\n\t\t//\t\t<paragraph><$text attribute>{}bar</$text>baz</paragraph>\n\t\t//\n\t\tif ( position.isAtStart && hasAnyAttribute( selection, attributes ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// ENGAGE 2-SCM When at least one of the observed attributes changes its value (incl. starts, ends).\n\t\t//\n\t\t//\t\t<paragraph>foo<$text attribute>bar{}</$text>baz</paragraph>\n\t\t//\t\t<paragraph>foo<$text attribute>bar{}</$text><$text otherAttribute>baz</$text></paragraph>\n\t\t//\t\t<paragraph>foo<$text attribute=1>bar{}</$text><$text attribute=2>baz</$text></paragraph>\n\t\t//\t\t<paragraph>foo{}<$text attribute>bar</$text>baz</paragraph>\n\t\t//\n\t\tif ( isBetweenDifferentAttributes( position, attributes ) ) {\n\t\t\tif ( eventData ) {\n\t\t\t\tpreventCaretMovement( eventData );\n\t\t\t}\n\n\t\t\t// CLEAR 2-SCM attributes if we are at the end of one 2-SCM and before\n\t\t\t// the next one with a different value of the same attribute.\n\t\t\t//\n\t\t\t//\t\t<paragraph>foo<$text attribute=1>bar{}</$text><$text attribute=2>bar</$text>baz</paragraph>\n\t\t\t//\n\t\t\tif (\n\t\t\t\thasAnyAttribute( selection, attributes ) &&\n\t\t\t\tisBetweenDifferentAttributes( position, attributes, true )\n\t\t\t) {\n\t\t\t\tclearSelectionAttributes( model, attributes );\n\t\t\t} else {\n\t\t\t\tthis._overrideGravity();\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Updates the document selection and the view according to the two–step caret movement state\n\t * when moving **backwards**. Executed upon `keypress` in the {@link module:engine/view/view~EditingView}.\n\t *\n\t * @internal\n\t * @param eventData Data of the key press.\n\t * @returns `true` when the handler prevented caret movement\n\t */\n\tpublic _handleBackwardMovement( eventData?: ViewDocumentDomEventData ): boolean {\n\t\tconst attributes = this.attributes;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst position = selection.getFirstPosition()!;\n\n\t\t// When the gravity is already overridden (by this plugin), it means we are on the two-step position.\n\t\t// Prevent the movement, restore the gravity and update selection attributes.\n\t\t//\n\t\t//\t\t<paragraph>foo<$text attribute=1>bar</$text><$text attribute=2>{}baz</$text></paragraph>\n\t\t//\t\t<paragraph>foo<$text attribute>bar</$text><$text otherAttribute>{}baz</$text></paragraph>\n\t\t//\t\t<paragraph>foo<$text attribute>{}bar</$text>baz</paragraph>\n\t\t//\t\t<paragraph>foo<$text attribute>bar</$text>{}baz</paragraph>\n\t\t//\n\t\tif ( this._isGravityOverridden ) {\n\t\t\tif ( eventData ) {\n\t\t\t\tpreventCaretMovement( eventData );\n\t\t\t}\n\n\t\t\tthis._restoreGravity();\n\n\t\t\t// CLEAR 2-SCM attributes if we are at the end of one 2-SCM and before\n\t\t\t// the next one with a different value of the same attribute.\n\t\t\t//\n\t\t\t//\t\t<paragraph>foo<$text attribute=1>bar</$text><$text attribute=2>{}bar</$text>baz</paragraph>\n\t\t\t//\n\t\t\tif ( isBetweenDifferentAttributes( position, attributes, true ) ) {\n\t\t\t\tclearSelectionAttributes( model, attributes );\n\t\t\t} else {\n\t\t\t\tsetSelectionAttributesFromTheNodeBefore( model, attributes, position );\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// REMOVE SELECTION ATTRIBUTE when restoring gravity towards a non-existent content at the\n\t\t\t// beginning of the block.\n\t\t\t//\n\t\t\t// \t\t<paragraph>{}<$text attribute>bar</$text></paragraph>\n\t\t\t//\n\t\t\tif ( position.isAtStart ) {\n\t\t\t\tif ( hasAnyAttribute( selection, attributes ) ) {\n\t\t\t\t\tif ( eventData ) {\n\t\t\t\t\t\tpreventCaretMovement( eventData );\n\t\t\t\t\t}\n\n\t\t\t\t\tsetSelectionAttributesFromTheNodeBefore( model, attributes, position );\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// SET 2-SCM attributes if we are between nodes with the same attribute but with different values.\n\t\t\t//\n\t\t\t//\t\t<paragraph>foo<$text attribute=1>bar</$text>[]<$text attribute=2>bar</$text>baz</paragraph>\n\t\t\t//\n\t\t\tif (\n\t\t\t\t!hasAnyAttribute( selection, attributes ) &&\n\t\t\t\tisBetweenDifferentAttributes( position, attributes, true )\n\t\t\t) {\n\t\t\t\tif ( eventData ) {\n\t\t\t\t\tpreventCaretMovement( eventData );\n\t\t\t\t}\n\n\t\t\t\tsetSelectionAttributesFromTheNodeBefore( model, attributes, position );\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// When we are moving from natural gravity, to the position of the 2SCM, we need to override the gravity,\n\t\t\t// and make sure it won't be restored. Unless it's at the end of the block and an observed attribute.\n\t\t\t// We need to check if the caret is a one position before the attribute boundary:\n\t\t\t//\n\t\t\t//\t\t<paragraph>foo<$text attribute=1>bar</$text><$text attribute=2>b{}az</$text></paragraph>\n\t\t\t//\t\t<paragraph>foo<$text attribute>bar</$text><$text otherAttribute>b{}az</$text></paragraph>\n\t\t\t//\t\t<paragraph>foo<$text attribute>b{}ar</$text>baz</paragraph>\n\t\t\t//\t\t<paragraph>foo<$text attribute>bar</$text>b{}az</paragraph>\n\t\t\t//\n\t\t\tif ( isStepAfterAnyAttributeBoundary( position, attributes ) ) {\n\t\t\t\t// ENGAGE 2-SCM if the selection has no attribute. This may happen when the user\n\t\t\t\t// left the attribute using a FORWARD 2-SCM.\n\t\t\t\t//\n\t\t\t\t// \t\t<paragraph><$text attribute>bar</$text>{}</paragraph>\n\t\t\t\t//\n\t\t\t\tif (\n\t\t\t\t\tposition.isAtEnd &&\n\t\t\t\t\t!hasAnyAttribute( selection, attributes ) &&\n\t\t\t\t\tisBetweenDifferentAttributes( position, attributes )\n\t\t\t\t) {\n\t\t\t\t\tif ( eventData ) {\n\t\t\t\t\t\tpreventCaretMovement( eventData );\n\t\t\t\t\t}\n\n\t\t\t\t\tsetSelectionAttributesFromTheNodeBefore( model, attributes, position );\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Skip the automatic gravity restore upon the next selection#change:range event.\n\t\t\t\t// If not skipped, it would automatically restore the gravity, which should remain\n\t\t\t\t// overridden.\n\t\t\t\tthis._isNextGravityRestorationSkipped = true;\n\t\t\t\tthis._overrideGravity();\n\n\t\t\t\t// Don't return \"true\" here because we didn't call _preventCaretMovement.\n\t\t\t\t// Returning here will destabilize the filler logic, which also listens to\n\t\t\t\t// keydown (and the event would be stopped).\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Starts listening to {@link module:engine/view/document~ViewDocument#event:mousedown} and\n\t * {@link module:engine/view/document~ViewDocument#event:selectionChange} and puts the selection before/after a 2-step node\n\t * if clicked at the beginning/ending of the 2-step node.\n\t *\n\t * The purpose of this action is to allow typing around the 2-step node directly after a click.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/1016.\n\t */\n\tprivate _enableClickingAfterNode(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst document = editor.editing.view.document;\n\n\t\teditor.editing.view.addObserver( MouseObserver );\n\t\teditor.editing.view.addObserver( TouchObserver );\n\n\t\tlet touched = false;\n\t\tlet clicked = false;\n\n\t\t// This event should be fired before selection on mobile devices.\n\t\tthis.listenTo<ViewDocumentTouchStartEvent>( document, 'touchstart', () => {\n\t\t\tclicked = false;\n\t\t\ttouched = true;\n\t\t} );\n\n\t\t// Track mouse click event.\n\t\t// Keep in mind that it's often called after the selection change on iOS devices.\n\t\t// On the Android devices, it's called before the selection change.\n\t\t// That's why we watch `touchstart` event on mobile and set `touched` flag, as it's fired before the selection change.\n\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/17171\n\t\tthis.listenTo<ViewDocumentMouseDownEvent>( document, 'mousedown', () => {\n\t\t\tclicked = true;\n\t\t} );\n\n\t\t// When the selection has changed...\n\t\tthis.listenTo<ViewDocumentObserverSelectionChangeEvent>( document, 'selectionChange', () => {\n\t\t\tconst attributes = this.attributes;\n\n\t\t\tif ( !clicked && !touched ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// ...and it was caused by the click or touch...\n\t\t\tclicked = false;\n\t\t\ttouched = false;\n\n\t\t\t// ...and no text is selected...\n\t\t\tif ( !selection.isCollapsed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// ...and clicked text is the 2-step node...\n\t\t\tif ( !hasAnyAttribute( selection, attributes ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst position = selection.getFirstPosition()!;\n\n\t\t\tif ( !isBetweenDifferentAttributes( position, attributes ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The selection at the start of a block would use surrounding attributes\n\t\t\t// from text after the selection so just clear 2-SCM attributes.\n\t\t\t//\n\t\t\t// Also, clear attributes for selection between same attribute with different values.\n\t\t\tif (\n\t\t\t\tposition.isAtStart ||\n\t\t\t\tisBetweenDifferentAttributes( position, attributes, true )\n\t\t\t) {\n\t\t\t\tclearSelectionAttributes( model, attributes );\n\t\t\t}\n\t\t\telse if ( !this._isGravityOverridden ) {\n\t\t\t\tthis._overrideGravity();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Starts listening to {@link module:engine/model/model~Model#event:insertContent} and corrects the model\n\t * selection attributes if the selection is at the end of a two-step node after inserting the content.\n\t *\n\t * The purpose of this action is to improve the overall UX because the user is no longer \"trapped\" by the\n\t * two-step attribute of the selection, and they can type a \"clean\" (`linkHref`–less) text right away.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/6053.\n\t */\n\tprivate _enableInsertContentSelectionAttributesFixer(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst attributes = this.attributes;\n\n\t\tthis.listenTo<ModelInsertContentEvent>( model, 'insertContent', () => {\n\t\t\tconst position = selection.getFirstPosition()!;\n\n\t\t\tif (\n\t\t\t\thasAnyAttribute( selection, attributes ) &&\n\t\t\t\tisBetweenDifferentAttributes( position, attributes )\n\t\t\t) {\n\t\t\t\tclearSelectionAttributes( model, attributes );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether\n\t * removing a content right after the tow-step attribute.\n\t *\n\t * If so, the selection should not preserve the two-step attribute. However, if\n\t * the {@link module:typing/twostepcaretmovement~TwoStepCaretMovement} plugin is active and\n\t * the selection has the two-step attribute due to overridden gravity (at the end), the two-step attribute should stay untouched.\n\t *\n\t * The purpose of this action is to allow removing the link text and keep the selection outside the link.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/7521.\n\t */\n\tprivate _handleDeleteContentAfterNode(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst view = editor.editing.view;\n\n\t\tlet isBackspace = false;\n\t\tlet shouldPreserveAttributes = false;\n\n\t\t// Detect pressing `Backspace`.\n\t\tthis.listenTo<ViewDocumentDeleteEvent>( view.document, 'delete', ( evt, data ) => {\n\t\t\tisBackspace = data.direction === 'backward';\n\t\t}, { priority: 'high' } );\n\n\t\t// Before removing the content, check whether the selection is inside a two-step attribute.\n\t\t// If so, we want to preserve those attributes.\n\t\tthis.listenTo<ModelDeleteContentEvent>( model, 'deleteContent', () => {\n\t\t\tif ( !isBackspace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst position = selection.getFirstPosition()!;\n\n\t\t\tshouldPreserveAttributes = hasAnyAttribute( selection, this.attributes ) &&\n\t\t\t\t!isStepAfterAnyAttributeBoundary( position, this.attributes );\n\t\t}, { priority: 'high' } );\n\n\t\t// After removing the content, check whether the current selection should preserve the `linkHref` attribute.\n\t\tthis.listenTo<ModelDeleteContentEvent>( model, 'deleteContent', () => {\n\t\t\tif ( !isBackspace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tisBackspace = false;\n\n\t\t\t// Do not escape two-step attribute if it was inside it before content deletion.\n\t\t\tif ( shouldPreserveAttributes ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Use `model.enqueueChange()` in order to execute the callback at the end of the changes process.\n\t\t\teditor.model.enqueueChange( () => {\n\t\t\t\tconst position = selection.getFirstPosition()!;\n\n\t\t\t\tif (\n\t\t\t\t\thasAnyAttribute( selection, this.attributes ) &&\n\t\t\t\t\tisBetweenDifferentAttributes( position, this.attributes )\n\t\t\t\t) {\n\t\t\t\t\tif ( position.isAtStart || isBetweenDifferentAttributes( position, this.attributes, true ) ) {\n\t\t\t\t\t\tclearSelectionAttributes( model, this.attributes );\n\t\t\t\t\t}\n\t\t\t\t\telse if ( !this._isGravityOverridden ) {\n\t\t\t\t\t\tthis._overrideGravity();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * `true` when the gravity is overridden for the plugin.\n\t */\n\tprivate get _isGravityOverridden(): boolean {\n\t\treturn !!this._overrideUid;\n\t}\n\n\t/**\n\t * Overrides the gravity using the {@link module:engine/model/writer~ModelWriter model writer}\n\t * and stores the information about this fact in the {@link #_overrideUid}.\n\t *\n\t * A shorthand for {@link module:engine/model/writer~ModelWriter#overrideSelectionGravity}.\n\t */\n\tprivate _overrideGravity(): void {\n\t\tthis._overrideUid = this.editor.model.change( writer => {\n\t\t\treturn writer.overrideSelectionGravity();\n\t\t} );\n\t}\n\n\t/**\n\t * Restores the gravity using the {@link module:engine/model/writer~ModelWriter model writer}.\n\t *\n\t * A shorthand for {@link module:engine/model/writer~ModelWriter#restoreSelectionGravity}.\n\t */\n\tprivate _restoreGravity(): void {\n\t\tthis.editor.model.change( writer => {\n\t\t\twriter.restoreSelectionGravity( this._overrideUid! );\n\t\t\tthis._overrideUid = null;\n\t\t} );\n\t}\n}\n\n/**\n * Checks whether the selection has any of given attributes.\n */\nfunction hasAnyAttribute( selection: ModelDocumentSelection, attributes: Set<string> ): boolean {\n\tfor ( const observedAttribute of attributes ) {\n\t\tif ( selection.hasAttribute( observedAttribute ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Applies the given attributes to the current selection using using the\n * values from the node before the current position. Uses\n * the {@link module:engine/model/writer~ModelWriter model writer}.\n */\nfunction setSelectionAttributesFromTheNodeBefore( model: Model, attributes: Set<string>, position: ModelPosition ) {\n\tconst nodeBefore = position.nodeBefore;\n\n\tmodel.change( writer => {\n\t\tif ( nodeBefore ) {\n\t\t\tconst attributes: Array<[string, unknown]> = [];\n\t\t\tconst isInlineObject = model.schema.isObject( nodeBefore ) && model.schema.isInline( nodeBefore );\n\n\t\t\tfor ( const [ key, value ] of nodeBefore.getAttributes() ) {\n\t\t\t\tif (\n\t\t\t\t\tmodel.schema.checkAttribute( '$text', key ) &&\n\t\t\t\t\t( !isInlineObject || model.schema.getAttributeProperties( key ).copyFromObject !== false )\n\t\t\t\t) {\n\t\t\t\t\tattributes.push( [ key, value ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twriter.setSelectionAttribute( attributes );\n\t\t} else {\n\t\t\twriter.removeSelectionAttribute( attributes );\n\t\t}\n\t} );\n}\n\n/**\n * Removes 2-SCM attributes from the selection.\n */\nfunction clearSelectionAttributes( model: Model, attributes: Set<string> ) {\n\tmodel.change( writer => {\n\t\twriter.removeSelectionAttribute( attributes );\n\t} );\n}\n\n/**\n * Prevents the caret movement in the view by calling `preventDefault` on the event data.\n *\n * @alias data.preventDefault\n */\nfunction preventCaretMovement( data: ViewDocumentDomEventData ) {\n\tdata.preventDefault();\n}\n\n/**\n * Checks whether the step before `isBetweenDifferentAttributes()`.\n */\nfunction isStepAfterAnyAttributeBoundary( position: ModelPosition, attributes: Set<string> ): boolean {\n\tconst positionBefore = position.getShiftedBy( -1 );\n\treturn isBetweenDifferentAttributes( positionBefore, attributes );\n}\n\n/**\n * Checks whether the given position is between different values of given attributes.\n */\nfunction isBetweenDifferentAttributes( position: ModelPosition, attributes: Set<string>, isStrict: boolean = false ): boolean {\n\tconst { nodeBefore, nodeAfter } = position;\n\n\tfor ( const observedAttribute of attributes ) {\n\t\tconst attrBefore = nodeBefore ? nodeBefore.getAttribute( observedAttribute ) : undefined;\n\t\tconst attrAfter = nodeAfter ? nodeAfter.getAttribute( observedAttribute ) : undefined;\n\n\t\tif ( isStrict && ( attrBefore === undefined || attrAfter === undefined ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( attrAfter !== attrBefore ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\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/**\n * @module typing/texttransformation\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type { ModelPosition } from '@ckeditor/ckeditor5-engine';\n\nimport { TextWatcher, type TextWatcherMatchedDataEvent } from './textwatcher.js';\nimport type { TextTransformationConfig, TextTypingTransformationDescription } from './typingconfig.js';\nimport { Delete } from './delete.js';\nimport { Input } from './input.js';\n\nimport { escapeRegExp } from 'es-toolkit/compat';\n\n// All named transformations.\nconst TRANSFORMATIONS: Record<string, TextTypingTransformationDescription> = {\n\t// Common symbols:\n\tcopyright: { from: '(c)', to: '©' },\n\tregisteredTrademark: { from: '(r)', to: '®' },\n\ttrademark: { from: '(tm)', to: '™' },\n\n\t// Mathematical:\n\toneHalf: { from: /(^|[^/a-z0-9])(1\\/2)([^/a-z0-9])$/i, to: [ null, '½', null ] },\n\toneThird: { from: /(^|[^/a-z0-9])(1\\/3)([^/a-z0-9])$/i, to: [ null, '⅓', null ] },\n\ttwoThirds: { from: /(^|[^/a-z0-9])(2\\/3)([^/a-z0-9])$/i, to: [ null, '⅔', null ] },\n\toneForth: { from: /(^|[^/a-z0-9])(1\\/4)([^/a-z0-9])$/i, to: [ null, '¼', null ] },\n\tthreeQuarters: { from: /(^|[^/a-z0-9])(3\\/4)([^/a-z0-9])$/i, to: [ null, '¾', null ] },\n\tlessThanOrEqual: { from: '<=', to: '≤' },\n\tgreaterThanOrEqual: { from: '>=', to: '≥' },\n\tnotEqual: { from: '!=', to: '≠' },\n\tarrowLeft: { from: '<-', to: '←' },\n\tarrowRight: { from: '->', to: '→' },\n\n\t// Typography:\n\thorizontalEllipsis: { from: '...', to: '…' },\n\tenDash: { from: /(^| )(--)( )$/, to: [ null, '–', null ] },\n\temDash: { from: /(^| )(---)( )$/, to: [ null, '—', null ] },\n\t// Quotations:\n\t// English, US\n\tquotesPrimary: { from: buildQuotesRegExp( '\"' ), to: [ null, '“', null, '”' ] },\n\tquotesSecondary: { from: buildQuotesRegExp( '\\'' ), to: [ null, '‘', null, '’' ] },\n\n\t// English, UK\n\tquotesPrimaryEnGb: { from: buildQuotesRegExp( '\\'' ), to: [ null, '‘', null, '’' ] },\n\tquotesSecondaryEnGb: { from: buildQuotesRegExp( '\"' ), to: [ null, '“', null, '”' ] },\n\n\t// Polish\n\tquotesPrimaryPl: { from: buildQuotesRegExp( '\"' ), to: [ null, '„', null, '”' ] },\n\tquotesSecondaryPl: { from: buildQuotesRegExp( '\\'' ), to: [ null, '‚', null, '’' ] }\n};\n\n// Transformation groups.\nconst TRANSFORMATION_GROUPS: Record<string, Array<string>> = {\n\tsymbols: [ 'copyright', 'registeredTrademark', 'trademark' ],\n\tmathematical: [\n\t\t'oneHalf', 'oneThird', 'twoThirds', 'oneForth', 'threeQuarters',\n\t\t'lessThanOrEqual', 'greaterThanOrEqual', 'notEqual',\n\t\t'arrowLeft', 'arrowRight'\n\t],\n\ttypography: [ 'horizontalEllipsis', 'enDash', 'emDash' ],\n\tquotes: [ 'quotesPrimary', 'quotesSecondary' ]\n};\n\n// A set of default transformations provided by the feature.\nconst DEFAULT_TRANSFORMATIONS = [\n\t'symbols',\n\t'mathematical',\n\t'typography',\n\t'quotes'\n];\n\n/**\n * The text transformation plugin.\n */\nexport class TextTransformation extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Delete, Input ]> {\n\t\treturn [ Delete, Input ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TextTransformation' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'typing', {\n\t\t\ttransformations: {\n\t\t\t\tinclude: DEFAULT_TRANSFORMATIONS\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst model = this.editor.model;\n\t\tconst modelSelection = model.document.selection;\n\n\t\tmodelSelection.on( 'change:range', () => {\n\t\t\t// Disable plugin when selection is inside a code block or inline code.\n\t\t\tconst anchor = modelSelection.anchor;\n\t\t\tconst isInCodeBlock = !!anchor && anchor.parent.is( 'element', 'codeBlock' );\n\t\t\tconst isInInlineCode = modelSelection.hasAttribute( 'code' );\n\n\t\t\tthis.isEnabled = !( isInCodeBlock || isInInlineCode );\n\t\t} );\n\n\t\tthis._enableTransformationWatchers();\n\t}\n\n\t/**\n\t * Create new TextWatcher listening to the editor for typing and selection events.\n\t */\n\tprivate _enableTransformationWatchers(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst deletePlugin: Delete = editor.plugins.get( 'Delete' );\n\t\tconst normalizedTransformations = normalizeTransformations( editor.config.get( 'typing.transformations' )! );\n\n\t\tconst testCallback = ( text: string ) => {\n\t\t\tfor ( const normalizedTransformation of normalizedTransformations ) {\n\t\t\t\tconst from = normalizedTransformation.from;\n\t\t\t\tconst match = from.test( text );\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\treturn { normalizedTransformation };\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst watcher = new TextWatcher( editor.model, testCallback );\n\n\t\twatcher.on<TextWatcherMatchedDataEvent<{\n\t\t\tnormalizedTransformation: NormalizedTransformationConfig;\n\t\t}>>( 'matched:data', ( evt, data ) => {\n\t\t\tif ( !data.batch.isTyping ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { from, to } = data.normalizedTransformation;\n\n\t\t\tconst matches = from.exec( data.text )!;\n\t\t\tconst replaces = to( matches.slice( 1 ) );\n\n\t\t\tconst matchedRange = data.range;\n\n\t\t\tlet changeIndex = matches.index;\n\n\t\t\tmodel.enqueueChange( writer => {\n\t\t\t\tfor ( let i = 1; i < matches.length; i++ ) {\n\t\t\t\t\tconst match = matches[ i ];\n\t\t\t\t\tconst replaceWith = replaces[ i - 1 ];\n\n\t\t\t\t\tif ( replaceWith == null ) {\n\t\t\t\t\t\tchangeIndex += match.length;\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst replacePosition = matchedRange.start.getShiftedBy( changeIndex );\n\t\t\t\t\tconst replaceRange = model.createRange( replacePosition, replacePosition.getShiftedBy( match.length ) );\n\t\t\t\t\tconst attributes = getTextAttributesAfterPosition( replacePosition );\n\n\t\t\t\t\tmodel.insertContent( writer.createText( replaceWith, attributes ), replaceRange );\n\n\t\t\t\t\tchangeIndex += replaceWith.length;\n\t\t\t\t}\n\n\t\t\t\tmodel.enqueueChange( () => {\n\t\t\t\t\tdeletePlugin.requestUndoOnBackspace();\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\n\t\twatcher.bind( 'isEnabled' ).to( this );\n\t}\n}\n\n/**\n * Normalizes the configuration `from` parameter value.\n * The normalized value for the `from` parameter is a RegExp instance. If the passed `from` is already a RegExp instance,\n * it is returned unchanged.\n */\nfunction normalizeFrom( from: string | RegExp ): RegExp {\n\tif ( typeof from == 'string' ) {\n\t\treturn new RegExp( `(${ escapeRegExp( from ) })$` );\n\t}\n\n\t// `from` is already a regular expression.\n\treturn from;\n}\n\n/**\n * Normalizes the configuration `to` parameter value.\n * The normalized value for the `to` parameter is a function that takes an array and returns an array. See more in the\n * configuration description. If the passed `to` is already a function, it is returned unchanged.\n */\nfunction normalizeTo( to: TextTypingTransformationDescription[ 'to' ] ) {\n\tif ( typeof to == 'string' ) {\n\t\treturn () => [ to ];\n\t} else if ( to instanceof Array ) {\n\t\treturn () => to;\n\t}\n\n\t// `to` is already a function.\n\treturn to;\n}\n\n/**\n * For given `position` returns attributes for the text that is after that position.\n * The text can be in the same text node as the position (`foo[]bar`) or in the next text node (`foo[]<$text bold=\"true\">bar</$text>`).\n */\nfunction getTextAttributesAfterPosition( position: ModelPosition ) {\n\tconst textNode = position.textNode ? position.textNode : position.nodeAfter;\n\n\treturn textNode!.getAttributes();\n}\n\n/**\n * Returns a RegExp pattern string that detects a sentence inside a quote.\n *\n * @param quoteCharacter The character to create a pattern for.\n */\nfunction buildQuotesRegExp( quoteCharacter: string ): RegExp {\n\treturn new RegExp( `(^|\\\\s)(${ quoteCharacter })([^${ quoteCharacter }]*)(${ quoteCharacter })$` );\n}\n\n/**\n * Reads text transformation config and returns normalized array of transformations objects.\n */\nfunction normalizeTransformations( config: TextTransformationConfig ): Array<NormalizedTransformationConfig> {\n\tconst extra = config.extra || [];\n\tconst remove = config.remove || [];\n\tconst isNotRemoved = ( transformation: TextTypingTransformationDescription | string ) => !remove.includes( transformation );\n\n\tconst configured = config.include.concat( extra ).filter( isNotRemoved );\n\n\treturn expandGroupsAndRemoveDuplicates( configured )\n\t\t.filter( isNotRemoved ) // Filter out 'remove' transformations as they might be set in group.\n\t\t.map( transformation => (\n\t\t\ttypeof transformation == 'string' && TRANSFORMATIONS[ transformation ] ? TRANSFORMATIONS[ transformation ] : transformation )\n\t\t)\n\t\t// Filter out transformations set as string that has not been found.\n\t\t.filter( ( transformation ): transformation is TextTypingTransformationDescription => typeof transformation === 'object' )\n\t\t.map( transformation => ( {\n\t\t\tfrom: normalizeFrom( transformation.from ),\n\t\t\tto: normalizeTo( transformation.to )\n\t\t} ) );\n}\n\n/**\n * Reads definitions and expands named groups if needed to transformation names.\n * This method also removes duplicated named transformations if any.\n */\nfunction expandGroupsAndRemoveDuplicates(\n\tdefinitions: Array<TextTypingTransformationDescription | string>\n): Array<TextTypingTransformationDescription | string> {\n\t// Set is using to make sure that transformation names are not duplicated.\n\tconst definedTransformations = new Set<TextTypingTransformationDescription | string>();\n\n\tfor ( const transformationOrGroup of definitions ) {\n\t\tif ( typeof transformationOrGroup == 'string' && TRANSFORMATION_GROUPS[ transformationOrGroup ] ) {\n\t\t\tfor ( const transformation of TRANSFORMATION_GROUPS[ transformationOrGroup ] ) {\n\t\t\t\tdefinedTransformations.add( transformation );\n\t\t\t}\n\t\t} else {\n\t\t\tdefinedTransformations.add( transformationOrGroup );\n\t\t}\n\t}\n\n\treturn Array.from( definedTransformations );\n}\n\ntype NormalizedTransformationConfig = {\n\tfrom: RegExp;\n\tto: ( matches: Array<string> ) => Array<string | null>;\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/**\n * @module typing/utils/findattributerange\n */\n\nimport type { ModelPosition, Model, ModelRange } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Returns a model range that covers all consecutive nodes with the same `attributeName` and its `value`\n * that intersect the given `position`.\n *\n * It can be used e.g. to get the entire range on which the `linkHref` attribute needs to be changed when having a\n * selection inside a link.\n *\n * @param position The start position.\n * @param attributeName The attribute name.\n * @param value The attribute value.\n * @param model The model instance.\n * @returns The link range.\n */\nexport function findAttributeRange(\n\tposition: ModelPosition,\n\tattributeName: string,\n\tvalue: unknown,\n\tmodel: Model\n): ModelRange {\n\treturn model.createRange(\n\t\tfindAttributeRangeBound( position, attributeName, value, true, model ),\n\t\tfindAttributeRangeBound( position, attributeName, value, false, model )\n\t);\n}\n\n/**\n * Walks forward or backward (depends on the `lookBack` flag), node by node, as long as they have the same attribute value\n * and returns a position just before or after (depends on the `lookBack` flag) the last matched node.\n *\n * @param position The start position.\n * @param attributeName The attribute name.\n * @param value The attribute value.\n * @param lookBack Whether the walk direction is forward (`false`) or backward (`true`).\n * @returns The position just before the last matched node.\n */\nexport function findAttributeRangeBound(\n\tposition: ModelPosition,\n\tattributeName: string,\n\tvalue: unknown,\n\tlookBack: boolean,\n\tmodel: Model\n): ModelPosition {\n\t// Get node before or after position (depends on `lookBack` flag).\n\t// When position is inside text node then start searching from text node.\n\tlet node = position.textNode || ( lookBack ? position.nodeBefore : position.nodeAfter );\n\n\tlet lastNode = null;\n\n\twhile ( node && node.getAttribute( attributeName ) == value ) {\n\t\tlastNode = node;\n\t\tnode = lookBack ? node.previousSibling : node.nextSibling;\n\t}\n\n\treturn lastNode ? model.createPositionAt( lastNode, lookBack ? 'before' : 'after' ) : position;\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/**\n * @module typing/utils/inlinehighlight\n */\n\nimport { findAttributeRange } from './findattributerange.js';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Adds a visual highlight style to an attribute element in which the selection is anchored.\n * Together with two-step caret movement, they indicate that the user is typing inside the element.\n *\n * Highlight is turned on by adding the given class to the attribute element in the view:\n *\n * * The class is removed before the conversion has started, as callbacks added with the `'highest'` priority\n * to {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} events.\n * * The class is added in the view post fixer, after other changes in the model tree were converted to the view.\n *\n * This way, adding and removing the highlight does not interfere with conversion.\n *\n * Usage:\n *\n * ```ts\n * import { inlineHighlight } from '@ckeditor/ckeditor5-typing/src/utils/inlinehighlight';\n *\n * // Make `ck-link_selected` class be applied on an `a` element\n * // whenever the corresponding `linkHref` attribute element is selected.\n * inlineHighlight( editor, 'linkHref', 'a', 'ck-link_selected' );\n * ```\n *\n * @param editor The editor instance.\n * @param attributeName The attribute name to check.\n * @param tagName The tagName of a view item.\n * @param className The class name to apply in the view.\n */\nexport function inlineHighlight(\n\teditor: Editor,\n\tattributeName: string,\n\ttagName: string,\n\tclassName: string\n): void {\n\tconst view = editor.editing.view;\n\tconst highlightedElements = new Set<ViewElement>();\n\n\t// Adding the class.\n\tview.document.registerPostFixer( writer => {\n\t\tconst selection = editor.model.document.selection;\n\t\tlet changed = false;\n\n\t\tif ( selection.hasAttribute( attributeName ) ) {\n\t\t\tconst modelRange = findAttributeRange(\n\t\t\t\tselection.getFirstPosition()!,\n\t\t\t\tattributeName,\n\t\t\t\tselection.getAttribute( attributeName ),\n\t\t\t\teditor.model\n\t\t\t);\n\t\t\tconst viewRange = editor.editing.mapper.toViewRange( modelRange );\n\n\t\t\t// There might be multiple view elements in the `viewRange`, for example, when the `a` element is\n\t\t\t// broken by a UIElement.\n\t\t\tfor ( const item of viewRange.getItems() ) {\n\t\t\t\tif ( item.is( 'element', tagName ) && !item.hasClass( className ) ) {\n\t\t\t\t\twriter.addClass( className, item );\n\t\t\t\t\thighlightedElements.add( item );\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t} );\n\n\t// Removing the class.\n\teditor.conversion.for( 'editingDowncast' ).add( dispatcher => {\n\t\t// Make sure the highlight is removed on every possible event, before conversion is started.\n\t\tdispatcher.on( 'insert', removeHighlight, { priority: 'highest' } );\n\t\tdispatcher.on( 'remove', removeHighlight, { priority: 'highest' } );\n\t\tdispatcher.on( 'attribute', removeHighlight, { priority: 'highest' } );\n\t\tdispatcher.on( 'selection', removeHighlight, { priority: 'highest' } );\n\n\t\tfunction removeHighlight() {\n\t\t\tview.change( writer => {\n\t\t\t\tfor ( const item of highlightedElements.values() ) {\n\t\t\t\t\twriter.removeClass( className, item );\n\t\t\t\t\thighlightedElements.delete( item );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { ModelDocumentSelection } from \"@ckeditor/ckeditor5-engine\";\nimport { IconBold, IconCode, IconItalic, IconStrikethrough, IconSubscript, IconSuperscript, IconUnderline } from \"@ckeditor/ckeditor5-icons\";\nimport { ButtonView, MenuBarMenuListItemButtonView } from \"@ckeditor/ckeditor5-ui\";\nimport { TwoStepCaretMovement, inlineHighlight } from \"@ckeditor/ckeditor5-typing\";\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 basic-styles/attributecommand\n*/\n/**\n* An extension of the base {@link module:core/command~Command} class, which provides utilities for a command\n* that toggles a single attribute on a text or an element.\n*\n* `AttributeCommand` uses {@link module:engine/model/document~ModelDocument#selection}\n* to decide which nodes (if any) should be changed, and applies or removes the attribute from them.\n*\n* The command checks the {@link module:engine/model/model~Model#schema} to decide if it can be enabled\n* for the current selection and to which nodes the attribute can be applied.\n*/\nvar AttributeCommand = class extends Command {\n\t/**\n\t* The attribute that will be set by the command.\n\t*/\n\tattributeKey;\n\t/**\n\t* @param attributeKey Attribute that will be set by the command.\n\t*/\n\tconstructor(editor, attributeKey) {\n\t\tsuper(editor);\n\t\tthis.attributeKey = attributeKey;\n\t}\n\t/**\n\t* Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tthis.value = this._getValueFromFirstAllowedNode();\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n\t}\n\t/**\n\t* Executes the command &ndash; applies the attribute to the selection or removes it from the selection.\n\t*\n\t* If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.\n\t*\n\t* The execution result differs, depending on the {@link module:engine/model/document~ModelDocument#selection}:\n\t*\n\t* * If the selection is on a range, the command applies the attribute to all nodes in that range\n\t* (if they are allowed to have this attribute by the {@link module:engine/model/schema~ModelSchema schema}).\n\t* * If the selection is collapsed in a non-empty node, the command applies the attribute to the\n\t* {@link module:engine/model/document~ModelDocument#selection} itself (note that typed characters copy attributes from the selection).\n\t* * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note\n\t* that the selection inherits all attributes from a node if it is in an empty node).\n\t*\n\t* @fires execute\n\t* @param options Command options.\n\t* @param options.forceValue If set, it will force the command behavior. If `true`,\n\t* the command will apply the attribute, otherwise the command will remove the attribute.\n\t* If not set, the command will look for its current value to decide what it should do.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst value = options.forceValue === void 0 ? !this.value : options.forceValue;\n\t\tmodel.change((writer) => {\n\t\t\tif (selection.isCollapsed) {\n\t\t\t\tif (value) writer.setSelectionAttribute(this.attributeKey, true);\n\t\t\t\telse writer.removeSelectionAttribute(this.attributeKey);\n\t\t\t} else {\n\t\t\t\tconst ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey, { includeEmptyRanges: true });\n\t\t\t\tfor (const range of ranges) {\n\t\t\t\t\tlet itemOrRange = range;\n\t\t\t\t\tlet attributeKey = this.attributeKey;\n\t\t\t\t\tif (range.isCollapsed) {\n\t\t\t\t\t\titemOrRange = range.start.parent;\n\t\t\t\t\t\tattributeKey = ModelDocumentSelection._getStoreAttributeKey(this.attributeKey);\n\t\t\t\t\t}\n\t\t\t\t\tif (value) writer.setAttribute(attributeKey, value, itemOrRange);\n\t\t\t\t\telse writer.removeAttribute(attributeKey, itemOrRange);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Checks the attribute value of the first node in the selection that allows the attribute.\n\t* For the collapsed selection returns the selection attribute.\n\t*\n\t* @returns The attribute value.\n\t*/\n\t_getValueFromFirstAllowedNode() {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\t\tif (selection.isCollapsed) return selection.hasAttribute(this.attributeKey);\n\t\tfor (const range of selection.getRanges()) for (const item of range.getItems()) if (schema.checkAttribute(item, this.attributeKey)) return item.hasAttribute(this.attributeKey);\n\t\treturn false;\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 basic-styles/bold/boldediting\n*/\nconst BOLD$1 = \"bold\";\n/**\n* The bold editing feature.\n*\n* It registers the `'bold'` command and introduces the `bold` attribute in the model which renders to the view\n* as a `<strong>` element.\n*/\nvar BoldEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"BoldEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: BOLD$1 });\n\t\teditor.model.schema.setAttributeProperties(BOLD$1, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\teditor.conversion.attributeToElement({\n\t\t\tmodel: BOLD$1,\n\t\t\tview: \"strong\",\n\t\t\tupcastAlso: [\"b\", (viewElement) => {\n\t\t\t\tconst fontWeight = viewElement.getStyle(\"font-weight\");\n\t\t\t\tif (!fontWeight) return null;\n\t\t\t\tif (fontWeight == \"bold\" || Number(fontWeight) >= 600) return {\n\t\t\t\t\tname: true,\n\t\t\t\t\tstyles: [\"font-weight\"]\n\t\t\t\t};\n\t\t\t\treturn null;\n\t\t\t}]\n\t\t});\n\t\teditor.commands.add(BOLD$1, new AttributeCommand(editor, BOLD$1));\n\t\teditor.keystrokes.set(\"CTRL+B\", BOLD$1);\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Bold text\"),\n\t\t\tkeystroke: \"CTRL+B\"\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* Returns a function that creates a (toolbar or menu bar) button for a basic style feature.\n*\n* @internal\n*/\nfunction getButtonCreator({ editor, commandName, plugin, icon, label, keystroke }) {\n\treturn (ButtonClass) => {\n\t\tconst command = editor.commands.get(commandName);\n\t\tconst view = new ButtonClass(editor.locale);\n\t\tview.set({\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\tkeystroke,\n\t\t\tisToggleable: true\n\t\t});\n\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\tview.bind(\"isOn\").to(command, \"value\");\n\t\tif (view instanceof MenuBarMenuListItemButtonView) view.set({ role: \"menuitemcheckbox\" });\n\t\telse view.set({ tooltip: true });\n\t\tplugin.listenTo(view, \"execute\", () => {\n\t\t\teditor.execute(commandName);\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn view;\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 basic-styles/bold/boldui\n*/\nconst BOLD = \"bold\";\n/**\n* The bold UI feature. It introduces the Bold button.\n*/\nvar BoldUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"BoldUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator({\n\t\t\teditor,\n\t\t\tcommandName: BOLD,\n\t\t\tplugin: this,\n\t\t\ticon: IconBold,\n\t\t\tlabel: t(\"Bold\"),\n\t\t\tkeystroke: \"CTRL+B\"\n\t\t});\n\t\teditor.ui.componentFactory.add(BOLD, () => createButton(ButtonView));\n\t\teditor.ui.componentFactory.add(\"menuBar:bold\", () => createButton(MenuBarMenuListItemButtonView));\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 basic-styles/bold\n*/\n/**\n* The bold feature.\n*\n* For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n* and the {@glink api/basic-styles package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:basic-styles/bold/boldediting~BoldEditing bold editing feature}\n* and {@link module:basic-styles/bold/boldui~BoldUI bold UI feature}.\n*/\nvar Bold = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [BoldEditing, BoldUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Bold\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 basic-styles/code/codeediting\n*/\nconst CODE$1 = \"code\";\nconst HIGHLIGHT_CLASS = \"ck-code_selected\";\n/**\n* The code editing feature.\n*\n* It registers the `'code'` command and introduces the `code` attribute in the model which renders to the view\n* as a `<code>` element.\n*/\nvar CodeEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"CodeEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TwoStepCaretMovement];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: CODE$1 });\n\t\teditor.model.schema.setAttributeProperties(CODE$1, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: false\n\t\t});\n\t\teditor.conversion.attributeToElement({\n\t\t\tmodel: CODE$1,\n\t\t\tview: \"code\"\n\t\t});\n\t\teditor.commands.add(CODE$1, new AttributeCommand(editor, CODE$1));\n\t\teditor.plugins.get(TwoStepCaretMovement).registerAttribute(CODE$1);\n\t\tinlineHighlight(editor, CODE$1, \"code\", HIGHLIGHT_CLASS);\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Move out of an inline code style\"),\n\t\t\tkeystroke: [[\"arrowleft\", \"arrowleft\"], [\"arrowright\", \"arrowright\"]]\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 basic-styles/code/codeui\n*/\nconst CODE = \"code\";\n/**\n* The code UI feature. It introduces the Code button.\n*/\nvar CodeUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"CodeUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator({\n\t\t\teditor,\n\t\t\tcommandName: CODE,\n\t\t\tplugin: this,\n\t\t\ticon: IconCode,\n\t\t\tlabel: t(\"Code\")\n\t\t});\n\t\teditor.ui.componentFactory.add(CODE, () => createButton(ButtonView));\n\t\teditor.ui.componentFactory.add(\"menuBar:code\", () => createButton(MenuBarMenuListItemButtonView));\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 basic-styles/code\n*/\n/**\n* The code feature.\n*\n* For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n* and the {@glink api/basic-styles package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:basic-styles/code/codeediting~CodeEditing code editing feature}\n* and {@link module:basic-styles/code/codeui~CodeUI code UI feature}.\n*/\nvar Code = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [CodeEditing, CodeUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Code\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 basic-styles/italic/italicediting\n*/\nconst ITALIC$1 = \"italic\";\n/**\n* The italic editing feature.\n*\n* It registers the `'italic'` command, the <kbd>Ctrl+I</kbd> keystroke and introduces the `italic` attribute in the model\n* which renders to the view as an `<i>` element.\n*/\nvar ItalicEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ItalicEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: ITALIC$1 });\n\t\teditor.model.schema.setAttributeProperties(ITALIC$1, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\teditor.conversion.attributeToElement({\n\t\t\tmodel: ITALIC$1,\n\t\t\tview: \"i\",\n\t\t\tupcastAlso: [\"em\", { styles: { \"font-style\": \"italic\" } }]\n\t\t});\n\t\teditor.commands.add(ITALIC$1, new AttributeCommand(editor, ITALIC$1));\n\t\teditor.keystrokes.set(\"CTRL+I\", ITALIC$1);\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Italic text\"),\n\t\t\tkeystroke: \"CTRL+I\"\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 basic-styles/italic/italicui\n*/\nconst ITALIC = \"italic\";\n/**\n* The italic UI feature. It introduces the Italic button.\n*/\nvar ItalicUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ItalicUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator({\n\t\t\teditor,\n\t\t\tcommandName: ITALIC,\n\t\t\tplugin: this,\n\t\t\ticon: IconItalic,\n\t\t\tkeystroke: \"CTRL+I\",\n\t\t\tlabel: t(\"Italic\")\n\t\t});\n\t\teditor.ui.componentFactory.add(ITALIC, () => createButton(ButtonView));\n\t\teditor.ui.componentFactory.add(\"menuBar:italic\", () => createButton(MenuBarMenuListItemButtonView));\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 basic-styles/italic\n*/\n/**\n* The italic feature.\n*\n* For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n* and the {@glink api/basic-styles package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:basic-styles/italic/italicediting~ItalicEditing} and\n* {@link module:basic-styles/italic/italicui~ItalicUI} plugins.\n*/\nvar Italic = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ItalicEditing, ItalicUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Italic\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 basic-styles/strikethrough/strikethroughediting\n*/\nconst STRIKETHROUGH$1 = \"strikethrough\";\n/**\n* The strikethrough editing feature.\n*\n* It registers the `'strikethrough'` command, the <kbd>Ctrl+Shift+X</kbd> keystroke and introduces the\n* `strikethroughsthrough` attribute in the model which renders to the view\n* as a `<s>` element.\n*/\nvar StrikethroughEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"StrikethroughEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: STRIKETHROUGH$1 });\n\t\teditor.model.schema.setAttributeProperties(STRIKETHROUGH$1, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\teditor.conversion.attributeToElement({\n\t\t\tmodel: STRIKETHROUGH$1,\n\t\t\tview: \"s\",\n\t\t\tupcastAlso: [\n\t\t\t\t\"del\",\n\t\t\t\t\"strike\",\n\t\t\t\t{ styles: { \"text-decoration\": \"line-through\" } }\n\t\t\t]\n\t\t});\n\t\teditor.commands.add(STRIKETHROUGH$1, new AttributeCommand(editor, STRIKETHROUGH$1));\n\t\teditor.keystrokes.set(\"CTRL+SHIFT+X\", \"strikethrough\");\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Strikethrough text\"),\n\t\t\tkeystroke: \"CTRL+SHIFT+X\"\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 basic-styles/strikethrough/strikethroughui\n*/\nconst STRIKETHROUGH = \"strikethrough\";\n/**\n* The strikethrough UI feature. It introduces the Strikethrough button.\n*/\nvar StrikethroughUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"StrikethroughUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator({\n\t\t\teditor,\n\t\t\tcommandName: STRIKETHROUGH,\n\t\t\tplugin: this,\n\t\t\ticon: IconStrikethrough,\n\t\t\tkeystroke: \"CTRL+SHIFT+X\",\n\t\t\tlabel: t(\"Strikethrough\")\n\t\t});\n\t\teditor.ui.componentFactory.add(STRIKETHROUGH, () => createButton(ButtonView));\n\t\teditor.ui.componentFactory.add(\"menuBar:strikethrough\", () => createButton(MenuBarMenuListItemButtonView));\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 basic-styles/strikethrough\n*/\n/**\n* The strikethrough feature.\n*\n* For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n* and the {@glink api/basic-styles package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:basic-styles/strikethrough/strikethroughediting~StrikethroughEditing} and\n* {@link module:basic-styles/strikethrough/strikethroughui~StrikethroughUI} plugins.\n*/\nvar Strikethrough = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [StrikethroughEditing, StrikethroughUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Strikethrough\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 basic-styles/subscript/subscriptediting\n*/\nconst SUBSCRIPT$1 = \"subscript\";\n/**\n* The subscript editing feature.\n*\n* It registers the `sub` command and introduces the `sub` attribute in the model which renders to the view\n* as a `<sub>` element.\n*/\nvar SubscriptEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SubscriptEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: SUBSCRIPT$1 });\n\t\teditor.model.schema.setAttributeProperties(SUBSCRIPT$1, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\teditor.conversion.attributeToElement({\n\t\t\tmodel: SUBSCRIPT$1,\n\t\t\tview: \"sub\",\n\t\t\tupcastAlso: [{ styles: { \"vertical-align\": \"sub\" } }]\n\t\t});\n\t\teditor.commands.add(SUBSCRIPT$1, new AttributeCommand(editor, SUBSCRIPT$1));\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 basic-styles/subscript/subscriptui\n*/\nconst SUBSCRIPT = \"subscript\";\n/**\n* The subscript UI feature. It introduces the Subscript button.\n*/\nvar SubscriptUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SubscriptUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator({\n\t\t\teditor,\n\t\t\tcommandName: SUBSCRIPT,\n\t\t\tplugin: this,\n\t\t\ticon: IconSubscript,\n\t\t\tlabel: t(\"Subscript\")\n\t\t});\n\t\teditor.ui.componentFactory.add(SUBSCRIPT, () => createButton(ButtonView));\n\t\teditor.ui.componentFactory.add(\"menuBar:subscript\", () => createButton(MenuBarMenuListItemButtonView));\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 basic-styles/subscript\n*/\n/**\n* The subscript feature.\n*\n* It loads the {@link module:basic-styles/subscript/subscriptediting~SubscriptEditing} and\n* {@link module:basic-styles/subscript/subscriptui~SubscriptUI} plugins.\n*/\nvar Subscript = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [SubscriptEditing, SubscriptUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Subscript\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 basic-styles/superscript/superscriptediting\n*/\nconst SUPERSCRIPT$1 = \"superscript\";\n/**\n* The superscript editing feature.\n*\n* It registers the `super` command and introduces the `super` attribute in the model which renders to the view\n* as a `<super>` element.\n*/\nvar SuperscriptEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SuperscriptEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: SUPERSCRIPT$1 });\n\t\teditor.model.schema.setAttributeProperties(SUPERSCRIPT$1, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\teditor.conversion.attributeToElement({\n\t\t\tmodel: SUPERSCRIPT$1,\n\t\t\tview: \"sup\",\n\t\t\tupcastAlso: [{ styles: { \"vertical-align\": \"super\" } }]\n\t\t});\n\t\teditor.commands.add(SUPERSCRIPT$1, new AttributeCommand(editor, SUPERSCRIPT$1));\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 basic-styles/superscript/superscriptui\n*/\nconst SUPERSCRIPT = \"superscript\";\n/**\n* The superscript UI feature. It introduces the Superscript button.\n*/\nvar SuperscriptUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SuperscriptUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator({\n\t\t\teditor,\n\t\t\tcommandName: SUPERSCRIPT,\n\t\t\tplugin: this,\n\t\t\ticon: IconSuperscript,\n\t\t\tlabel: t(\"Superscript\")\n\t\t});\n\t\teditor.ui.componentFactory.add(SUPERSCRIPT, () => createButton(ButtonView));\n\t\teditor.ui.componentFactory.add(\"menuBar:superscript\", () => createButton(MenuBarMenuListItemButtonView));\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 basic-styles/superscript\n*/\n/**\n* The superscript feature.\n*\n* It loads the {@link module:basic-styles/superscript/superscriptediting~SuperscriptEditing} and\n* {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.\n*/\nvar Superscript = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [SuperscriptEditing, SuperscriptUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Superscript\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 basic-styles/underline/underlineediting\n*/\nconst UNDERLINE$1 = \"underline\";\n/**\n* The underline editing feature.\n*\n* It registers the `'underline'` command, the <kbd>Ctrl+U</kbd> keystroke\n* and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.\n*/\nvar UnderlineEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"UnderlineEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: UNDERLINE$1 });\n\t\teditor.model.schema.setAttributeProperties(UNDERLINE$1, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\teditor.conversion.attributeToElement({\n\t\t\tmodel: UNDERLINE$1,\n\t\t\tview: \"u\",\n\t\t\tupcastAlso: { styles: { \"text-decoration\": \"underline\" } }\n\t\t});\n\t\teditor.commands.add(UNDERLINE$1, new AttributeCommand(editor, UNDERLINE$1));\n\t\teditor.keystrokes.set(\"CTRL+U\", \"underline\");\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Underline text\"),\n\t\t\tkeystroke: \"CTRL+U\"\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 basic-styles/underline/underlineui\n*/\nconst UNDERLINE = \"underline\";\n/**\n* The underline UI feature. It introduces the Underline button.\n*/\nvar UnderlineUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"UnderlineUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator({\n\t\t\teditor,\n\t\t\tcommandName: UNDERLINE,\n\t\t\tplugin: this,\n\t\t\ticon: IconUnderline,\n\t\t\tlabel: t(\"Underline\"),\n\t\t\tkeystroke: \"CTRL+U\"\n\t\t});\n\t\teditor.ui.componentFactory.add(UNDERLINE, () => createButton(ButtonView));\n\t\teditor.ui.componentFactory.add(\"menuBar:underline\", () => createButton(MenuBarMenuListItemButtonView));\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 basic-styles/underline\n*/\n/**\n* The underline feature.\n*\n* For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n* and the {@glink api/basic-styles package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:basic-styles/underline/underlineediting~UnderlineEditing} and\n* {@link module:basic-styles/underline/underlineui~UnderlineUI} plugins.\n*/\nvar Underline = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [UnderlineEditing, UnderlineUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Underline\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { AttributeCommand, Bold, BoldEditing, BoldUI, Code, CodeEditing, CodeUI, Italic, ItalicEditing, ItalicUI, Strikethrough, StrikethroughEditing, StrikethroughUI, Subscript, SubscriptEditing, SubscriptUI, Superscript, SuperscriptEditing, SuperscriptUI, Underline, UnderlineEditing, UnderlineUI, getButtonCreator as _getBasicStylesButtonCreator };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module basic-styles/attributecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { ModelDocumentSelection, type ModelRange, type ModelElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * An extension of the base {@link module:core/command~Command} class, which provides utilities for a command\n * that toggles a single attribute on a text or an element.\n *\n * `AttributeCommand` uses {@link module:engine/model/document~ModelDocument#selection}\n * to decide which nodes (if any) should be changed, and applies or removes the attribute from them.\n *\n * The command checks the {@link module:engine/model/model~Model#schema} to decide if it can be enabled\n * for the current selection and to which nodes the attribute can be applied.\n */\nexport class AttributeCommand extends Command {\n\t/**\n\t * Flag indicating whether the command is active. The command is active when the\n\t * {@link module:engine/model/selection~ModelSelection#hasAttribute selection has the attribute} which means that:\n\t *\n\t * * If the selection is not empty &ndash; That the attribute is set on the first node in the selection that allows this attribute.\n\t * * If the selection is empty &ndash; That the selection has the attribute itself (which means that newly typed\n\t * text will have this attribute, too).\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: boolean;\n\n\t/**\n\t * The attribute that will be set by the command.\n\t */\n\tpublic readonly attributeKey: string;\n\n\t/**\n\t * @param attributeKey Attribute that will be set by the command.\n\t */\n\tconstructor( editor: Editor, attributeKey: string ) {\n\t\tsuper( editor );\n\n\t\tthis.attributeKey = attributeKey;\n\t}\n\n\t/**\n\t * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis.value = this._getValueFromFirstAllowedNode();\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection( doc.selection, this.attributeKey );\n\t}\n\n\t/**\n\t * Executes the command &ndash; applies the attribute to the selection or removes it from the selection.\n\t *\n\t * If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.\n\t *\n\t * The execution result differs, depending on the {@link module:engine/model/document~ModelDocument#selection}:\n\t *\n\t * * If the selection is on a range, the command applies the attribute to all nodes in that range\n\t * (if they are allowed to have this attribute by the {@link module:engine/model/schema~ModelSchema schema}).\n\t * * If the selection is collapsed in a non-empty node, the command applies the attribute to the\n\t * {@link module:engine/model/document~ModelDocument#selection} itself (note that typed characters copy attributes from the selection).\n\t * * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note\n\t * that the selection inherits all attributes from a node if it is in an empty node).\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`,\n\t * the command will apply the attribute, otherwise the command will remove the attribute.\n\t * If not set, the command will look for its current value to decide what it should do.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst selection = doc.selection;\n\t\tconst value = ( options.forceValue === undefined ) ? !this.value : options.forceValue;\n\n\t\tmodel.change( writer => {\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.setSelectionAttribute( this.attributeKey, true );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeSelectionAttribute( this.attributeKey );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst ranges = model.schema.getValidRanges( selection.getRanges(), this.attributeKey, {\n\t\t\t\t\tincludeEmptyRanges: true\n\t\t\t\t} );\n\n\t\t\t\tfor ( const range of ranges ) {\n\t\t\t\t\tlet itemOrRange: ModelRange | ModelElement = range;\n\t\t\t\t\tlet attributeKey = this.attributeKey;\n\n\t\t\t\t\tif ( range.isCollapsed ) {\n\t\t\t\t\t\titemOrRange = range.start.parent as ModelElement;\n\t\t\t\t\t\tattributeKey = ModelDocumentSelection._getStoreAttributeKey( this.attributeKey );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\twriter.setAttribute( attributeKey, value, itemOrRange );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.removeAttribute( attributeKey, itemOrRange );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the attribute value of the first node in the selection that allows the attribute.\n\t * For the collapsed selection returns the selection attribute.\n\t *\n\t * @returns The attribute value.\n\t */\n\tprivate _getValueFromFirstAllowedNode(): boolean {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn selection.hasAttribute( this.attributeKey );\n\t\t}\n\n\t\tfor ( const range of selection.getRanges() ) {\n\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\tif ( schema.checkAttribute( item, this.attributeKey ) ) {\n\t\t\t\t\treturn item.hasAttribute( this.attributeKey );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\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/**\n * @module basic-styles/bold/boldediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { AttributeCommand } from '../attributecommand.js';\n\nconst BOLD = 'bold';\n\n/**\n * The bold editing feature.\n *\n * It registers the `'bold'` command and introduces the `bold` attribute in the model which renders to the view\n * as a `<strong>` element.\n */\nexport class BoldEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BoldEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\t// Allow bold attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: BOLD } );\n\t\teditor.model.schema.setAttributeProperties( BOLD, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\t// Build converter from model to view for data and editing pipelines.\n\t\teditor.conversion.attributeToElement( {\n\t\t\tmodel: BOLD,\n\t\t\tview: 'strong',\n\t\t\tupcastAlso: [\n\t\t\t\t'b',\n\t\t\t\tviewElement => {\n\t\t\t\t\tconst fontWeight = viewElement.getStyle( 'font-weight' );\n\n\t\t\t\t\tif ( !fontWeight ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Value of the `font-weight` attribute can be defined as a string or a number.\n\t\t\t\t\tif ( fontWeight == 'bold' || Number( fontWeight ) >= 600 ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tname: true,\n\t\t\t\t\t\t\tstyles: [ 'font-weight' ]\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\t// Create bold command.\n\t\teditor.commands.add( BOLD, new AttributeCommand( editor, BOLD ) );\n\n\t\t// Set the Ctrl+B keystroke.\n\t\teditor.keystrokes.set( 'CTRL+B', BOLD );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Bold text' ),\n\t\t\t\t\tkeystroke: 'CTRL+B'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module basic-styles/utils\n */\n\nimport type { Editor, Plugin } from '@ckeditor/ckeditor5-core';\nimport { type AttributeCommand } from './attributecommand.js';\nimport { MenuBarMenuListItemButtonView, type ButtonView } from '@ckeditor/ckeditor5-ui';\n\n/**\n * Returns a function that creates a (toolbar or menu bar) button for a basic style feature.\n *\n * @internal\n */\nexport function getButtonCreator( {\n\teditor, commandName, plugin, icon, label, keystroke\n}: {\n\teditor: Editor;\n\tcommandName: string;\n\ticon: string;\n\tlabel: string;\n\tplugin: Plugin;\n\tkeystroke?: string;\n} ) {\n\treturn <T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>( ButtonClass: T ): InstanceType<T> => {\n\t\tconst command = editor.commands.get( commandName )! as AttributeCommand;\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\n\t\tview.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\tkeystroke,\n\t\t\tisToggleable: true\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\tview.bind( 'isOn' ).to( command, 'value' );\n\n\t\tif ( view instanceof MenuBarMenuListItemButtonView ) {\n\t\t\tview.set( {\n\t\t\t\trole: 'menuitemcheckbox'\n\t\t\t} );\n\t\t} else {\n\t\t\tview.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\t\t}\n\n\t\t// Execute the command.\n\t\tplugin.listenTo( view, 'execute', () => {\n\t\t\teditor.execute( commandName );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn view;\n\t};\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/**\n * @module basic-styles/bold/boldui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconBold } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { getButtonCreator } from '../utils.js';\n\nconst BOLD = 'bold';\n\n/**\n * The bold UI feature. It introduces the Bold button.\n */\nexport class BoldUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BoldUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator( {\n\t\t\teditor,\n\t\t\tcommandName: BOLD,\n\t\t\tplugin: this,\n\t\t\ticon: IconBold,\n\t\t\tlabel: t( 'Bold' ),\n\t\t\tkeystroke: 'CTRL+B'\n\t\t} );\n\n\t\t// Add bold button to feature components.\n\t\teditor.ui.componentFactory.add( BOLD, () => createButton( ButtonView ) );\n\t\teditor.ui.componentFactory.add( 'menuBar:' + BOLD, () => createButton( MenuBarMenuListItemButtonView ) );\n\t}\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/**\n * @module basic-styles/bold\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { BoldEditing } from './bold/boldediting.js';\nimport { BoldUI } from './bold/boldui.js';\n\n/**\n * The bold feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/bold/boldediting~BoldEditing bold editing feature}\n * and {@link module:basic-styles/bold/boldui~BoldUI bold UI feature}.\n */\nexport class Bold extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ BoldEditing, BoldUI ]> {\n\t\treturn [ BoldEditing, BoldUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Bold' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module basic-styles/code/codeediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { TwoStepCaretMovement, inlineHighlight } from '@ckeditor/ckeditor5-typing';\n\nimport { AttributeCommand } from '../attributecommand.js';\n\nconst CODE = 'code';\nconst HIGHLIGHT_CLASS = 'ck-code_selected';\n\n/**\n * The code editing feature.\n *\n * It registers the `'code'` command and introduces the `code` attribute in the model which renders to the view\n * as a `<code>` element.\n */\nexport class CodeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'CodeEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TwoStepCaretMovement ]> {\n\t\treturn [ TwoStepCaretMovement ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\t// Allow code attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: CODE } );\n\t\teditor.model.schema.setAttributeProperties( CODE, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: false\n\t\t} );\n\n\t\teditor.conversion.attributeToElement( {\n\t\t\tmodel: CODE,\n\t\t\tview: 'code'\n\t\t} );\n\n\t\t// Create code command.\n\t\teditor.commands.add( CODE, new AttributeCommand( editor, CODE ) );\n\n\t\t// Enable two-step caret movement for `code` attribute.\n\t\teditor.plugins.get( TwoStepCaretMovement ).registerAttribute( CODE );\n\n\t\t// Setup highlight over selected element.\n\t\tinlineHighlight( editor, CODE, 'code', HIGHLIGHT_CLASS );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move out of an inline code style' ),\n\t\t\t\t\tkeystroke: [\n\t\t\t\t\t\t[ 'arrowleft', 'arrowleft' ],\n\t\t\t\t\t\t[ 'arrowright', 'arrowright' ]\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module basic-styles/code/codeui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconCode } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { getButtonCreator } from '../utils.js';\n\nconst CODE = 'code';\n\n/**\n * The code UI feature. It introduces the Code button.\n */\nexport class CodeUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'CodeUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator( {\n\t\t\teditor,\n\t\t\tcommandName: CODE,\n\t\t\tplugin: this,\n\t\t\ticon: IconCode,\n\t\t\tlabel: t( 'Code' )\n\t\t} );\n\n\t\t// Add code button to feature components.\n\t\teditor.ui.componentFactory.add( CODE, () => createButton( ButtonView ) );\n\t\teditor.ui.componentFactory.add( 'menuBar:' + CODE, () => createButton( MenuBarMenuListItemButtonView ) );\n\t}\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/**\n * @module basic-styles/code\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { CodeEditing } from './code/codeediting.js';\nimport { CodeUI } from './code/codeui.js';\n\n/**\n * The code feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/code/codeediting~CodeEditing code editing feature}\n * and {@link module:basic-styles/code/codeui~CodeUI code UI feature}.\n */\nexport class Code extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ CodeEditing, CodeUI ]> {\n\t\treturn [ CodeEditing, CodeUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Code' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module basic-styles/italic/italicediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { AttributeCommand } from '../attributecommand.js';\n\nconst ITALIC = 'italic';\n\n/**\n * The italic editing feature.\n *\n * It registers the `'italic'` command, the <kbd>Ctrl+I</kbd> keystroke and introduces the `italic` attribute in the model\n * which renders to the view as an `<i>` element.\n */\nexport class ItalicEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ItalicEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\t// Allow italic attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: ITALIC } );\n\t\teditor.model.schema.setAttributeProperties( ITALIC, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\teditor.conversion.attributeToElement( {\n\t\t\tmodel: ITALIC,\n\t\t\tview: 'i',\n\t\t\tupcastAlso: [\n\t\t\t\t'em',\n\t\t\t\t{\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\t'font-style': 'italic'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\t// Create italic command.\n\t\teditor.commands.add( ITALIC, new AttributeCommand( editor, ITALIC ) );\n\n\t\t// Set the Ctrl+I keystroke.\n\t\teditor.keystrokes.set( 'CTRL+I', ITALIC );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Italic text' ),\n\t\t\t\t\tkeystroke: 'CTRL+I'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module basic-styles/italic/italicui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconItalic } from '@ckeditor/ckeditor5-icons';\nimport { MenuBarMenuListItemButtonView, ButtonView } from '@ckeditor/ckeditor5-ui';\nimport { getButtonCreator } from '../utils.js';\n\nconst ITALIC = 'italic';\n\n/**\n * The italic UI feature. It introduces the Italic button.\n */\nexport class ItalicUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ItalicUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator( {\n\t\t\teditor,\n\t\t\tcommandName: ITALIC,\n\t\t\tplugin: this,\n\t\t\ticon: IconItalic,\n\t\t\tkeystroke: 'CTRL+I',\n\t\t\tlabel: t( 'Italic' )\n\t\t} );\n\n\t\t// Add bold button to feature components.\n\t\teditor.ui.componentFactory.add( ITALIC, () => createButton( ButtonView ) );\n\t\teditor.ui.componentFactory.add( 'menuBar:' + ITALIC, () => createButton( MenuBarMenuListItemButtonView ) );\n\t}\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/**\n * @module basic-styles/italic\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ItalicEditing } from './italic/italicediting.js';\nimport { ItalicUI } from './italic/italicui.js';\n\n/**\n * The italic feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/italic/italicediting~ItalicEditing} and\n * {@link module:basic-styles/italic/italicui~ItalicUI} plugins.\n */\nexport class Italic extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ItalicEditing, ItalicUI ]> {\n\t\treturn [ ItalicEditing, ItalicUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Italic' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module basic-styles/strikethrough/strikethroughediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { AttributeCommand } from '../attributecommand.js';\n\nconst STRIKETHROUGH = 'strikethrough';\n\n/**\n * The strikethrough editing feature.\n *\n * It registers the `'strikethrough'` command, the <kbd>Ctrl+Shift+X</kbd> keystroke and introduces the\n * `strikethroughsthrough` attribute in the model which renders to the view\n * as a `<s>` element.\n */\nexport class StrikethroughEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'StrikethroughEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\t// Allow strikethrough attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: STRIKETHROUGH } );\n\t\teditor.model.schema.setAttributeProperties( STRIKETHROUGH, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\teditor.conversion.attributeToElement( {\n\t\t\tmodel: STRIKETHROUGH,\n\t\t\tview: 's',\n\t\t\tupcastAlso: [\n\t\t\t\t'del',\n\t\t\t\t'strike',\n\t\t\t\t{\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\t'text-decoration': 'line-through'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\t// Create strikethrough command.\n\t\teditor.commands.add( STRIKETHROUGH, new AttributeCommand( editor, STRIKETHROUGH ) );\n\n\t\t// Set the Ctrl+Shift+X keystroke.\n\t\teditor.keystrokes.set( 'CTRL+SHIFT+X', 'strikethrough' );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Strikethrough text' ),\n\t\t\t\t\tkeystroke: 'CTRL+SHIFT+X'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module basic-styles/strikethrough/strikethroughui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconStrikethrough } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { getButtonCreator } from '../utils.js';\n\nconst STRIKETHROUGH = 'strikethrough';\n\n/**\n * The strikethrough UI feature. It introduces the Strikethrough button.\n */\nexport class StrikethroughUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'StrikethroughUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator( {\n\t\t\teditor,\n\t\t\tcommandName: STRIKETHROUGH,\n\t\t\tplugin: this,\n\t\t\ticon: IconStrikethrough,\n\t\t\tkeystroke: 'CTRL+SHIFT+X',\n\t\t\tlabel: t( 'Strikethrough' )\n\t\t} );\n\n\t\t// Add strikethrough button to feature components.\n\t\teditor.ui.componentFactory.add( STRIKETHROUGH, () => createButton( ButtonView ) );\n\t\teditor.ui.componentFactory.add( 'menuBar:' + STRIKETHROUGH, () => createButton( MenuBarMenuListItemButtonView ) );\n\t}\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/**\n * @module basic-styles/strikethrough\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { StrikethroughEditing } from './strikethrough/strikethroughediting.js';\nimport { StrikethroughUI } from './strikethrough/strikethroughui.js';\n\n/**\n * The strikethrough feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/strikethrough/strikethroughediting~StrikethroughEditing} and\n * {@link module:basic-styles/strikethrough/strikethroughui~StrikethroughUI} plugins.\n */\nexport class Strikethrough extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ StrikethroughEditing, StrikethroughUI ]> {\n\t\treturn [ StrikethroughEditing, StrikethroughUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Strikethrough' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module basic-styles/subscript/subscriptediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { AttributeCommand } from '../attributecommand.js';\n\nconst SUBSCRIPT = 'subscript';\n\n/**\n * The subscript editing feature.\n *\n * It registers the `sub` command and introduces the `sub` attribute in the model which renders to the view\n * as a `<sub>` element.\n */\nexport class SubscriptEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SubscriptEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\t// Allow sub attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: SUBSCRIPT } );\n\t\teditor.model.schema.setAttributeProperties( SUBSCRIPT, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\t// Build converter from model to view for data and editing pipelines.\n\n\t\teditor.conversion.attributeToElement( {\n\t\t\tmodel: SUBSCRIPT,\n\t\t\tview: 'sub',\n\t\t\tupcastAlso: [\n\t\t\t\t{\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\t'vertical-align': 'sub'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\t// Create sub command.\n\t\teditor.commands.add( SUBSCRIPT, new AttributeCommand( editor, SUBSCRIPT ) );\n\t}\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/**\n * @module basic-styles/subscript/subscriptui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconSubscript } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { getButtonCreator } from '../utils.js';\n\nconst SUBSCRIPT = 'subscript';\n\n/**\n * The subscript UI feature. It introduces the Subscript button.\n */\nexport class SubscriptUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SubscriptUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\n\t\tconst createButton = getButtonCreator( {\n\t\t\teditor,\n\t\t\tcommandName: SUBSCRIPT,\n\t\t\tplugin: this,\n\t\t\ticon: IconSubscript,\n\t\t\tlabel: t( 'Subscript' )\n\t\t} );\n\n\t\t// Add subscript button to feature components.\n\t\teditor.ui.componentFactory.add( SUBSCRIPT, () => createButton( ButtonView ) );\n\t\teditor.ui.componentFactory.add( 'menuBar:' + SUBSCRIPT, () => createButton( MenuBarMenuListItemButtonView ) );\n\t}\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/**\n * @module basic-styles/subscript\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { SubscriptEditing } from './subscript/subscriptediting.js';\nimport { SubscriptUI } from './subscript/subscriptui.js';\n\n/**\n * The subscript feature.\n *\n * It loads the {@link module:basic-styles/subscript/subscriptediting~SubscriptEditing} and\n * {@link module:basic-styles/subscript/subscriptui~SubscriptUI} plugins.\n */\nexport class Subscript extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ SubscriptEditing, SubscriptUI ]> {\n\t\treturn [ SubscriptEditing, SubscriptUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Subscript' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module basic-styles/superscript/superscriptediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { AttributeCommand } from '../attributecommand.js';\n\nconst SUPERSCRIPT = 'superscript';\n\n/**\n * The superscript editing feature.\n *\n * It registers the `super` command and introduces the `super` attribute in the model which renders to the view\n * as a `<super>` element.\n */\nexport class SuperscriptEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SuperscriptEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\t// Allow super attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: SUPERSCRIPT } );\n\t\teditor.model.schema.setAttributeProperties( SUPERSCRIPT, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\t// Build converter from model to view for data and editing pipelines.\n\n\t\teditor.conversion.attributeToElement( {\n\t\t\tmodel: SUPERSCRIPT,\n\t\t\tview: 'sup',\n\t\t\tupcastAlso: [\n\t\t\t\t{\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\t'vertical-align': 'super'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\t// Create super command.\n\t\teditor.commands.add( SUPERSCRIPT, new AttributeCommand( editor, SUPERSCRIPT ) );\n\t}\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/**\n * @module basic-styles/superscript/superscriptui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconSuperscript } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { getButtonCreator } from '../utils.js';\n\nconst SUPERSCRIPT = 'superscript';\n\n/**\n * The superscript UI feature. It introduces the Superscript button.\n */\nexport class SuperscriptUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SuperscriptUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator( {\n\t\t\teditor,\n\t\t\tcommandName: SUPERSCRIPT,\n\t\t\tplugin: this,\n\t\t\ticon: IconSuperscript,\n\t\t\tlabel: t( 'Superscript' )\n\t\t} );\n\n\t\t// Add superscript button to feature components.\n\t\teditor.ui.componentFactory.add( SUPERSCRIPT, () => createButton( ButtonView ) );\n\t\teditor.ui.componentFactory.add( 'menuBar:' + SUPERSCRIPT, () => createButton( MenuBarMenuListItemButtonView ) );\n\t}\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/**\n * @module basic-styles/superscript\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { SuperscriptEditing } from './superscript/superscriptediting.js';\nimport { SuperscriptUI } from './superscript/superscriptui.js';\n\n/**\n * The superscript feature.\n *\n * It loads the {@link module:basic-styles/superscript/superscriptediting~SuperscriptEditing} and\n * {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.\n */\nexport class Superscript extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ SuperscriptEditing, SuperscriptUI ]> {\n\t\treturn [ SuperscriptEditing, SuperscriptUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Superscript' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module basic-styles/underline/underlineediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { AttributeCommand } from '../attributecommand.js';\n\nconst UNDERLINE = 'underline';\n\n/**\n * The underline editing feature.\n *\n * It registers the `'underline'` command, the <kbd>Ctrl+U</kbd> keystroke\n * and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.\n */\nexport class UnderlineEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'UnderlineEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\t// Allow strikethrough attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: UNDERLINE } );\n\t\teditor.model.schema.setAttributeProperties( UNDERLINE, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\teditor.conversion.attributeToElement( {\n\t\t\tmodel: UNDERLINE,\n\t\t\tview: 'u',\n\t\t\tupcastAlso: {\n\t\t\t\tstyles: {\n\t\t\t\t\t'text-decoration': 'underline'\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Create underline command.\n\t\teditor.commands.add( UNDERLINE, new AttributeCommand( editor, UNDERLINE ) );\n\n\t\t// Set the Ctrl+U keystroke.\n\t\teditor.keystrokes.set( 'CTRL+U', 'underline' );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Underline text' ),\n\t\t\t\t\tkeystroke: 'CTRL+U'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module basic-styles/underline/underlineui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconUnderline } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { getButtonCreator } from '../utils.js';\n\nconst UNDERLINE = 'underline';\n\n/**\n * The underline UI feature. It introduces the Underline button.\n */\nexport class UnderlineUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'UnderlineUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst createButton = getButtonCreator( {\n\t\t\teditor,\n\t\t\tcommandName: UNDERLINE,\n\t\t\tplugin: this,\n\t\t\ticon: IconUnderline,\n\t\t\tlabel: t( 'Underline' ),\n\t\t\tkeystroke: 'CTRL+U'\n\t\t} );\n\n\t\t// Add bold button to feature components.\n\t\teditor.ui.componentFactory.add( UNDERLINE, () => createButton( ButtonView ) );\n\t\teditor.ui.componentFactory.add( 'menuBar:' + UNDERLINE, () => createButton( MenuBarMenuListItemButtonView ) );\n\t}\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/**\n * @module basic-styles/underline\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { UnderlineEditing } from './underline/underlineediting.js';\nimport { UnderlineUI } from './underline/underlineui.js';\n\n/**\n * The underline feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/underline/underlineediting~UnderlineEditing} and\n * {@link module:basic-styles/underline/underlineui~UnderlineUI} plugins.\n */\nexport class Underline extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ UnderlineEditing, UnderlineUI ]> {\n\t\treturn [ UnderlineEditing, UnderlineUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Underline' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { BubblingEventInfo, Observer, ViewDocumentDomEventData } from \"@ckeditor/ckeditor5-engine\";\nimport { env } from \"@ckeditor/ckeditor5-utils\";\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* Returns attributes that should be preserved on the enter keystroke.\n*\n* Filtering is realized based on `copyOnEnter` attribute property. Read more about attribute properties\n* {@link module:engine/model/schema~ModelSchema#setAttributeProperties here}.\n*\n* @param schema Model's schema.\n* @param allAttributes Attributes to filter.\n* @internal\n*/\nfunction* getCopyOnEnterAttributes(schema, allAttributes) {\n\tfor (const attribute of allAttributes) if (attribute && schema.getAttributeProperties(attribute[0]).copyOnEnter) yield attribute;\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 enter/entercommand\n*/\n/**\n* Enter command used by the {@link module:enter/enter~Enter Enter feature} to handle the <kbd>Enter</kbd> keystroke.\n*/\nvar EnterCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tthis.editor.model.change((writer) => {\n\t\t\tthis.enterBlock(writer);\n\t\t\tthis.fire(\"afterExecute\", { writer });\n\t\t});\n\t}\n\t/**\n\t* Splits a block where the document selection is placed, in the way how the <kbd>Enter</kbd> key is expected to work:\n\t*\n\t* ```\n\t* <p>Foo[]bar</p>   ->   <p>Foo</p><p>[]bar</p>\n\t* <p>Foobar[]</p>   ->   <p>Foobar</p><p>[]</p>\n\t* <p>Fo[ob]ar</p>   ->   <p>Fo</p><p>[]ar</p>\n\t* ```\n\t*\n\t* In some cases, the split will not happen:\n\t*\n\t* ```\n\t* // The selection parent is a limit element:\n\t* <figcaption>A[bc]d</figcaption>   ->   <figcaption>A[]d</figcaption>\n\t*\n\t* // The selection spans over multiple elements:\n\t* <h>x[x</h><p>y]y<p>   ->   <h>x</h><p>[]y</p>\n\t* ```\n\t*\n\t* @param writer Writer to use when performing the enter action.\n\t* @returns Boolean indicating if the block was split.\n\t*/\n\tenterBlock(writer) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst isSelectionEmpty = selection.isCollapsed;\n\t\tconst range = selection.getFirstRange();\n\t\tconst startElement = range.start.parent;\n\t\tconst endElement = range.end.parent;\n\t\tif (schema.isLimit(startElement) || schema.isLimit(endElement)) {\n\t\t\tif (!isSelectionEmpty && startElement == endElement) model.deleteContent(selection);\n\t\t\treturn false;\n\t\t}\n\t\tif (isSelectionEmpty) {\n\t\t\tconst attributesToCopy = getCopyOnEnterAttributes(writer.model.schema, selection.getAttributes());\n\t\t\tsplitBlock(writer, range.start);\n\t\t\twriter.setSelectionAttribute(attributesToCopy);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tconst leaveUnmerged = !(range.start.isAtStart && range.end.isAtEnd);\n\t\t\tconst isContainedWithinOneElement = startElement == endElement;\n\t\t\tmodel.deleteContent(selection, { leaveUnmerged });\n\t\t\tif (leaveUnmerged) {\n\t\t\t\tif (isContainedWithinOneElement) {\n\t\t\t\t\tsplitBlock(writer, selection.focus);\n\t\t\t\t\treturn true;\n\t\t\t\t} else writer.setSelection(endElement, 0);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n};\nfunction splitBlock(writer, splitPos) {\n\twriter.split(splitPos);\n\twriter.setSelection(splitPos.parent.nextSibling, 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 enter/enterobserver\n*/\nconst ENTER_EVENT_TYPES = {\n\tinsertParagraph: { isSoft: false },\n\tinsertLineBreak: { isSoft: true }\n};\n/**\n* Enter observer introduces the {@link module:engine/view/document~ViewDocument#event:enter `Document#enter`} event.\n*/\nvar EnterObserver = class extends Observer {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tconst doc = this.document;\n\t\tlet shiftPressed = false;\n\t\tdoc.on(\"keydown\", (evt, data) => {\n\t\t\tshiftPressed = data.shiftKey;\n\t\t});\n\t\tdoc.on(\"beforeinput\", (evt, data) => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tlet inputType = data.inputType;\n\t\t\tif (env.isSafari && shiftPressed && inputType == \"insertParagraph\") inputType = \"insertLineBreak\";\n\t\t\tconst domEvent = data.domEvent;\n\t\t\tconst enterEventSpec = ENTER_EVENT_TYPES[inputType];\n\t\t\tif (!enterEventSpec) return;\n\t\t\tconst event = new BubblingEventInfo(doc, \"enter\", data.targetRanges[0]);\n\t\t\tdoc.fire(event, new ViewDocumentDomEventData(view, domEvent, { isSoft: enterEventSpec.isSoft }));\n\t\t\tif (event.stop.called) evt.stop();\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving() {}\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 enter/enter\n*/\n/**\n* This plugin handles the <kbd>Enter</kbd> keystroke (hard line break) in the editor.\n*\n* See also the {@link module:enter/shiftenter~ShiftEnter} plugin.\n*\n* For more information about this feature see the {@glink api/enter package page}.\n*/\nvar Enter = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Enter\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = this.editor.t;\n\t\tview.addObserver(EnterObserver);\n\t\teditor.commands.add(\"enter\", new EnterCommand(editor));\n\t\tthis.listenTo(viewDocument, \"enter\", (evt, data) => {\n\t\t\tif (!viewDocument.isComposing) data.preventDefault();\n\t\t\tif (data.isSoft) return;\n\t\t\teditor.execute(\"enter\");\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: \"low\" });\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Insert a hard break (a new paragraph)\"),\n\t\t\tkeystroke: \"Enter\"\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 enter/shiftentercommand\n*/\n/**\n* ShiftEnter command. It is used by the {@link module:enter/shiftenter~ShiftEnter ShiftEnter feature} to handle\n* the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke.\n*/\nvar ShiftEnterCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tmodel.change((writer) => {\n\t\t\tsoftBreakAction(model, writer, doc.selection);\n\t\t\tthis.fire(\"afterExecute\", { writer });\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tthis.isEnabled = isEnabled(model.schema, doc.selection);\n\t}\n};\n/**\n* Checks whether the ShiftEnter command should be enabled in the specified selection.\n*/\nfunction isEnabled(schema, selection) {\n\tif (selection.rangeCount > 1) return false;\n\tconst anchorPos = selection.anchor;\n\tif (!anchorPos || !schema.checkChild(anchorPos, \"softBreak\")) return false;\n\tconst range = selection.getFirstRange();\n\tconst startElement = range.start.parent;\n\tconst endElement = range.end.parent;\n\tif ((isInsideLimitElement(startElement, schema) || isInsideLimitElement(endElement, schema)) && startElement !== endElement) return false;\n\treturn true;\n}\n/**\n* Creates a break in the way that the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke is expected to work.\n*/\nfunction softBreakAction(model, writer, selection) {\n\tconst isSelectionEmpty = selection.isCollapsed;\n\tconst range = selection.getFirstRange();\n\tconst startElement = range.start.parent;\n\tconst endElement = range.end.parent;\n\tconst isContainedWithinOneElement = startElement == endElement;\n\tif (isSelectionEmpty) insertBreak(model, writer, range.end, selection.getAttributes());\n\telse {\n\t\tconst leaveUnmerged = !(range.start.isAtStart && range.end.isAtEnd);\n\t\tmodel.deleteContent(selection, { leaveUnmerged });\n\t\tif (isContainedWithinOneElement) insertBreak(model, writer, selection.focus, selection.getAttributes());\n\t\telse if (leaveUnmerged) writer.setSelection(endElement, 0);\n\t}\n}\n/**\n* Inserts a softBreak with applicable attributes.\n*/\nfunction insertBreak(model, writer, position, selectionAttributes) {\n\tconst attributes = Array.from(getCopyOnEnterAttributes(model.schema, selectionAttributes));\n\tconst breakLineElement = writer.createElement(\"softBreak\", attributes);\n\tmodel.insertContent(breakLineElement, position);\n\twriter.setSelection(breakLineElement, \"after\");\n}\n/**\n* Checks whether the specified `element` is a child of the limit element.\n*\n* Checking whether the `<p>` element is inside a limit element:\n*   - `<$root><p>Text.</p></$root> => false`\n*   - `<$root><limitElement><p>Text</p></limitElement></$root> => true`\n*/\nfunction isInsideLimitElement(element, schema) {\n\tif (element.is(\"rootElement\")) return false;\n\treturn schema.isLimit(element) || isInsideLimitElement(element.parent, schema);\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 enter/shiftenter\n*/\n/**\n* This plugin handles the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke (soft line break) in the editor.\n*\n* See also the {@link module:enter/enter~Enter} plugin.\n*\n* For more information about this feature see the {@glink api/enter package page}.\n*/\nvar ShiftEnter = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ShiftEnter\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst conversion = editor.conversion;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = this.editor.t;\n\t\tschema.register(\"softBreak\", {\n\t\t\tallowWhere: \"$text\",\n\t\t\tallowAttributesOf: \"$text\",\n\t\t\tisInline: true\n\t\t});\n\t\tconversion.for(\"upcast\").elementToElement({\n\t\t\tmodel: \"softBreak\",\n\t\t\tview: \"br\"\n\t\t});\n\t\tconversion.for(\"downcast\").elementToElement({\n\t\t\tmodel: \"softBreak\",\n\t\t\tview: (modelElement, { writer }) => writer.createEmptyElement(\"br\")\n\t\t});\n\t\tview.addObserver(EnterObserver);\n\t\teditor.commands.add(\"shiftEnter\", new ShiftEnterCommand(editor));\n\t\teditor.model.document.registerPostFixer((writer) => removeStaleSoftBreakAttributes(writer));\n\t\tthis.listenTo(viewDocument, \"enter\", (evt, data) => {\n\t\t\tif (!viewDocument.isComposing) data.preventDefault();\n\t\t\tif (!data.isSoft) return;\n\t\t\teditor.execute(\"shiftEnter\");\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: \"low\" });\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Insert a soft break (a <code>&lt;br&gt;</code> element)\"),\n\t\t\tkeystroke: \"Shift+Enter\"\n\t\t}] });\n\t}\n};\n/**\n* The post-fixer that removes attributes from stale soft-break elements.\n*/\nfunction removeStaleSoftBreakAttributes(writer) {\n\tconst parentsToCheck = /* @__PURE__ */ new Set();\n\tfor (const change of writer.model.document.differ.getChanges()) if (change.type == \"insert\" || change.type == \"remove\") {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (change.position.parent.is(\"element\")) parentsToCheck.add(change.position.parent);\n\t} else if (change.type == \"attribute\") {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (change.range.start.parent.is(\"element\")) parentsToCheck.add(change.range.start.parent);\n\t}\n\tlet wasChanged = false;\n\tfor (const parent of parentsToCheck) for (const child of parent.getChildren()) {\n\t\tif (!child.is(\"element\", \"softBreak\")) continue;\n\t\tconst nextSibling = child.nextSibling;\n\t\tif (!nextSibling || nextSibling.is(\"element\")) continue;\n\t\tconst attributesToRemove = Array.from(child.getAttributes()).filter(([key, value]) => !hasSameAttribute(nextSibling, key, value));\n\t\tfor (const [key] of attributesToRemove) {\n\t\t\twriter.removeAttribute(key, child);\n\t\t\twasChanged = true;\n\t\t}\n\t}\n\treturn wasChanged;\n}\n/**\n* Returns `true` if the given node has the same attribute as the one provided in the parameters.\n*/\nfunction hasSameAttribute(node, key, value) {\n\treturn node?.getAttribute(key) === 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\nexport { Enter, EnterCommand, EnterObserver, ShiftEnter, ShiftEnterCommand, getCopyOnEnterAttributes as _getCopyOnEnterAttributes };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module enter/utils\n */\n\nimport type { ModelSchema } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Returns attributes that should be preserved on the enter keystroke.\n *\n * Filtering is realized based on `copyOnEnter` attribute property. Read more about attribute properties\n * {@link module:engine/model/schema~ModelSchema#setAttributeProperties here}.\n *\n * @param schema Model's schema.\n * @param allAttributes Attributes to filter.\n * @internal\n */\nexport function* getCopyOnEnterAttributes(\n\tschema: ModelSchema,\n\tallAttributes: Iterable<[ string, unknown ]>\n): IterableIterator<[ string, unknown ]> {\n\tfor ( const attribute of allAttributes ) {\n\t\tif ( attribute && schema.getAttributeProperties( attribute[ 0 ] ).copyOnEnter ) {\n\t\t\tyield attribute;\n\t\t}\n\t}\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/**\n * @module enter/entercommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { getCopyOnEnterAttributes } from './utils.js';\n\nimport type {\n\tModelElement,\n\tModelPosition,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Enter command used by the {@link module:enter/enter~Enter Enter feature} to handle the <kbd>Enter</kbd> keystroke.\n */\nexport class EnterCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tthis.editor.model.change( writer => {\n\t\t\tthis.enterBlock( writer );\n\t\t\tthis.fire<EnterCommandAfterExecuteEvent>( 'afterExecute', { writer } );\n\t\t} );\n\t}\n\n\t/**\n\t * Splits a block where the document selection is placed, in the way how the <kbd>Enter</kbd> key is expected to work:\n\t *\n\t * ```\n\t * <p>Foo[]bar</p>   ->   <p>Foo</p><p>[]bar</p>\n\t * <p>Foobar[]</p>   ->   <p>Foobar</p><p>[]</p>\n\t * <p>Fo[ob]ar</p>   ->   <p>Fo</p><p>[]ar</p>\n\t * ```\n\t *\n\t * In some cases, the split will not happen:\n\t *\n\t * ```\n\t * // The selection parent is a limit element:\n\t * <figcaption>A[bc]d</figcaption>   ->   <figcaption>A[]d</figcaption>\n\t *\n\t * // The selection spans over multiple elements:\n\t * <h>x[x</h><p>y]y<p>   ->   <h>x</h><p>[]y</p>\n\t * ```\n\t *\n\t * @param writer Writer to use when performing the enter action.\n\t * @returns Boolean indicating if the block was split.\n\t */\n\tpublic enterBlock( writer: ModelWriter ): boolean {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst isSelectionEmpty = selection.isCollapsed;\n\t\tconst range = selection.getFirstRange()!;\n\t\tconst startElement = range.start.parent as ModelElement;\n\t\tconst endElement = range.end.parent as ModelElement;\n\n\t\t// Don't touch the roots and other limit elements.\n\t\tif ( schema.isLimit( startElement ) || schema.isLimit( endElement ) ) {\n\t\t\t// Delete the selected content but only if inside a single limit element.\n\t\t\t// Abort, when crossing limit elements boundary (e.g. <limit1>x[x</limit1>donttouchme<limit2>y]y</limit2>).\n\t\t\t// This is an edge case and it's hard to tell what should actually happen because such a selection\n\t\t\t// is not entirely valid.\n\t\t\tif ( !isSelectionEmpty && startElement == endElement ) {\n\t\t\t\tmodel.deleteContent( selection );\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( isSelectionEmpty ) {\n\t\t\tconst attributesToCopy = getCopyOnEnterAttributes( writer.model.schema, selection.getAttributes() );\n\n\t\t\tsplitBlock( writer, range.start );\n\t\t\twriter.setSelectionAttribute( attributesToCopy );\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\tconst leaveUnmerged = !( range.start.isAtStart && range.end.isAtEnd );\n\t\t\tconst isContainedWithinOneElement = ( startElement == endElement );\n\n\t\t\tmodel.deleteContent( selection, { leaveUnmerged } );\n\n\t\t\tif ( leaveUnmerged ) {\n\t\t\t\t// Partially selected elements.\n\t\t\t\t//\n\t\t\t\t// <h>x[xx]x</h>\t\t-> <h>x^x</h>\t\t\t-> <h>x</h><h>^x</h>\n\t\t\t\tif ( isContainedWithinOneElement ) {\n\t\t\t\t\tsplitBlock( writer, selection.focus! );\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Selection over multiple elements.\n\t\t\t\t//\n\t\t\t\t// <h>x[x</h><p>y]y<p>\t-> <h>x^</h><p>y</p>\t-> <h>x</h><p>^y</p>\n\t\t\t\telse {\n\t\t\t\t\twriter.setSelection( endElement, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n}\n\n/**\n * Fired after the the {@link module:enter/entercommand~EnterCommand} is finished executing.\n *\n * @eventName ~EnterCommand#afterExecute\n */\nexport type EnterCommandAfterExecuteEvent = {\n\tname: 'afterExecute';\n\targs: [ { writer: ModelWriter } ];\n};\n\nfunction splitBlock( writer: ModelWriter, splitPos: ModelPosition ): void {\n\twriter.split( splitPos );\n\twriter.setSelection( splitPos.parent.nextSibling!, 0 );\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/**\n * @module enter/enterobserver\n */\n\nimport {\n\tObserver,\n\tViewDocumentDomEventData,\n\tBubblingEventInfo,\n\ttype EditingView,\n\ttype ViewDocumentInputEvent,\n\ttype BubblingEvent,\n\ttype ViewDocumentKeyDownEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport { env } from '@ckeditor/ckeditor5-utils';\n\nconst ENTER_EVENT_TYPES: Record<string, { isSoft: boolean }> = {\n\tinsertParagraph: { isSoft: false },\n\tinsertLineBreak: { isSoft: true }\n};\n\n/**\n * Enter observer introduces the {@link module:engine/view/document~ViewDocument#event:enter `Document#enter`} event.\n */\nexport class EnterObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tconst doc = this.document;\n\t\tlet shiftPressed = false;\n\n\t\tdoc.on<ViewDocumentKeyDownEvent>( 'keydown', ( evt, data ) => {\n\t\t\tshiftPressed = data.shiftKey;\n\t\t} );\n\n\t\tdoc.on<ViewDocumentInputEvent>( 'beforeinput', ( evt, data ) => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet inputType = data.inputType;\n\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/13321.\n\t\t\tif ( env.isSafari && shiftPressed && inputType == 'insertParagraph' ) {\n\t\t\t\tinputType = 'insertLineBreak';\n\t\t\t}\n\n\t\t\tconst domEvent = data.domEvent;\n\t\t\tconst enterEventSpec = ENTER_EVENT_TYPES[ inputType ];\n\n\t\t\tif ( !enterEventSpec ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst event = new BubblingEventInfo( doc, 'enter', data.targetRanges[ 0 ] );\n\n\t\t\tdoc.fire( event, new ViewDocumentDomEventData( view, domEvent, {\n\t\t\t\tisSoft: enterEventSpec.isSoft\n\t\t\t} ) );\n\n\t\t\t// Stop `beforeinput` event if `enter` event was stopped.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/753\n\t\t\tif ( event.stop.called ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic observe(): void {}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic stopObserving(): void {}\n}\n\n/**\n * Fired when the user presses the <kbd>Enter</kbd> key.\n *\n * Note: This event is fired by the {@link module:enter/enterobserver~EnterObserver observer}\n * (usually registered by the {@link module:enter/enter~Enter Enter feature} and\n * {@link module:enter/shiftenter~ShiftEnter ShiftEnter feature}).\n *\n * @eventName module:engine/view/document~ViewDocument#enter\n */\nexport type ViewDocumentEnterEvent = BubblingEvent<{\n\tname: 'enter';\n\targs: [ ViewDocumentEnterEventData ];\n}>;\nexport interface ViewDocumentEnterEventData extends ViewDocumentDomEventData<InputEvent> {\n\n\t/**\n\t * Whether it is a soft enter (<kbd>Shift</kbd>+<kbd>Enter</kbd>) or a hard enter (<kbd>Enter</kbd>).\n\t */\n\tisSoft: boolean;\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/**\n * @module enter/enter\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { EnterCommand } from './entercommand.js';\nimport { EnterObserver, type ViewDocumentEnterEvent } from './enterobserver.js';\n\n/**\n * This plugin handles the <kbd>Enter</kbd> keystroke (hard line break) in the editor.\n *\n * See also the {@link module:enter/shiftenter~ShiftEnter} plugin.\n *\n * For more information about this feature see the {@glink api/enter package page}.\n */\nexport class Enter extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Enter' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = this.editor.t;\n\n\t\tview.addObserver( EnterObserver );\n\n\t\teditor.commands.add( 'enter', new EnterCommand( editor ) );\n\n\t\tthis.listenTo<ViewDocumentEnterEvent>( viewDocument, 'enter', ( evt, data ) => {\n\t\t\t// When not in composition, we handle the action, so prevent the default one.\n\t\t\t// When in composition, it's the browser who modify the DOM (renderer is disabled).\n\t\t\tif ( !viewDocument.isComposing ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\n\t\t\t// The soft enter key is handled by the ShiftEnter plugin.\n\t\t\tif ( data.isSoft ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\teditor.execute( 'enter' );\n\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: 'low' } );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Insert a hard break (a new paragraph)' ),\n\t\t\t\t\tkeystroke: 'Enter'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module enter/shiftentercommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { getCopyOnEnterAttributes } from './utils.js';\n\nimport type {\n\tModelDocumentSelection,\n\tModel,\n\tModelPosition,\n\tModelSchema,\n\tModelElement,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * ShiftEnter command. It is used by the {@link module:enter/shiftenter~ShiftEnter ShiftEnter feature} to handle\n * the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke.\n */\nexport class ShiftEnterCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tmodel.change( writer => {\n\t\t\tsoftBreakAction( model, writer, doc.selection );\n\t\t\tthis.fire<ShiftEnterCommandAfterExecuteEvent>( 'afterExecute', { writer } );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis.isEnabled = isEnabled( model.schema, doc.selection );\n\t}\n}\n\n/**\n * Fired after the the {@link module:enter/shiftentercommand~ShiftEnterCommand} is finished executing.\n *\n * @eventName ~ShiftEnterCommand#afterExecute\n */\nexport type ShiftEnterCommandAfterExecuteEvent = {\n\tname: 'afterExecute';\n\targs: [ { writer: ModelWriter } ];\n};\n\n/**\n * Checks whether the ShiftEnter command should be enabled in the specified selection.\n */\nfunction isEnabled( schema: ModelSchema, selection: ModelDocumentSelection ): boolean {\n\t// At this moment it is okay to support single range selections only.\n\t// But in the future we may need to change that.\n\tif ( selection.rangeCount > 1 ) {\n\t\treturn false;\n\t}\n\n\tconst anchorPos = selection.anchor;\n\n\t// Check whether the break element can be inserted in the current selection anchor.\n\tif ( !anchorPos || !schema.checkChild( anchorPos, 'softBreak' ) ) {\n\t\treturn false;\n\t}\n\n\tconst range = selection.getFirstRange()!;\n\tconst startElement = range.start.parent as ModelElement;\n\tconst endElement = range.end.parent as ModelElement;\n\n\t// Do not modify the content if selection is cross-limit elements.\n\tif ( ( isInsideLimitElement( startElement, schema ) || isInsideLimitElement( endElement, schema ) ) && startElement !== endElement ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Creates a break in the way that the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke is expected to work.\n */\nfunction softBreakAction( model: Model, writer: ModelWriter, selection: ModelDocumentSelection ): void {\n\tconst isSelectionEmpty = selection.isCollapsed;\n\tconst range = selection.getFirstRange()!;\n\tconst startElement = range.start.parent as ModelElement;\n\tconst endElement = range.end.parent as ModelElement;\n\tconst isContainedWithinOneElement = ( startElement == endElement );\n\n\tif ( isSelectionEmpty ) {\n\t\tinsertBreak( model, writer, range.end, selection.getAttributes() );\n\t} else {\n\t\tconst leaveUnmerged = !( range.start.isAtStart && range.end.isAtEnd );\n\n\t\tmodel.deleteContent( selection, { leaveUnmerged } );\n\n\t\t// Selection within one element:\n\t\t//\n\t\t// <h>x[xx]x</h>\t\t-> <h>x^x</h>\t\t\t-> <h>x<br>^x</h>\n\t\tif ( isContainedWithinOneElement ) {\n\t\t\tinsertBreak( model, writer, selection.focus!, selection.getAttributes() );\n\t\t}\n\t\t// Selection over multiple elements.\n\t\t//\n\t\t// <h>x[x</h><p>y]y<p>\t-> <h>x^</h><p>y</p>\t-> <h>x</h><p>^y</p>\n\t\t//\n\t\t// We chose not to insert a line break in this case because:\n\t\t//\n\t\t// * it's not a very common scenario,\n\t\t// * it actually surprised me when I saw the \"expected behavior\" in real life.\n\t\t//\n\t\t// It's ok if the user will need to be more specific where they want the <br> to be inserted.\n\t\telse {\n\t\t\t// Move the selection to the 2nd element (last step of the example above).\n\t\t\tif ( leaveUnmerged ) {\n\t\t\t\twriter.setSelection( endElement, 0 );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Inserts a softBreak with applicable attributes.\n */\nfunction insertBreak(\n\tmodel: Model,\n\twriter: ModelWriter,\n\tposition: ModelPosition,\n\tselectionAttributes: IterableIterator<[ string, unknown ]>\n): void {\n\tconst attributes = Array.from( getCopyOnEnterAttributes( model.schema, selectionAttributes ) );\n\tconst breakLineElement = writer.createElement( 'softBreak', attributes );\n\n\tmodel.insertContent( breakLineElement, position );\n\twriter.setSelection( breakLineElement, 'after' );\n}\n\n/**\n * Checks whether the specified `element` is a child of the limit element.\n *\n * Checking whether the `<p>` element is inside a limit element:\n *   - `<$root><p>Text.</p></$root> => false`\n *   - `<$root><limitElement><p>Text</p></limitElement></$root> => true`\n */\nfunction isInsideLimitElement( element: ModelElement, schema: ModelSchema ): boolean {\n\t// `$root` is a limit element but in this case is an invalid element.\n\tif ( element.is( 'rootElement' ) ) {\n\t\treturn false;\n\t}\n\n\treturn schema.isLimit( element ) || isInsideLimitElement( element.parent as ModelElement, schema );\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/**\n * @module enter/shiftenter\n */\n\nimport { ShiftEnterCommand } from './shiftentercommand.js';\nimport { EnterObserver, type ViewDocumentEnterEvent } from './enterobserver.js';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tModelElement,\n\tModelNode,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * This plugin handles the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke (soft line break) in the editor.\n *\n * See also the {@link module:enter/enter~Enter} plugin.\n *\n * For more information about this feature see the {@glink api/enter package page}.\n */\nexport class ShiftEnter extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ShiftEnter' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst conversion = editor.conversion;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = this.editor.t;\n\n\t\t// Configure the schema.\n\t\tschema.register( 'softBreak', {\n\t\t\tallowWhere: '$text',\n\t\t\tallowAttributesOf: '$text',\n\t\t\tisInline: true\n\t\t} );\n\n\t\t// Configure converters.\n\t\tconversion.for( 'upcast' )\n\t\t\t.elementToElement( {\n\t\t\t\tmodel: 'softBreak',\n\t\t\t\tview: 'br'\n\t\t\t} );\n\n\t\tconversion.for( 'downcast' )\n\t\t\t.elementToElement( {\n\t\t\t\tmodel: 'softBreak',\n\t\t\t\tview: ( modelElement, { writer } ) => writer.createEmptyElement( 'br' )\n\t\t\t} );\n\n\t\tview.addObserver( EnterObserver );\n\n\t\teditor.commands.add( 'shiftEnter', new ShiftEnterCommand( editor ) );\n\t\teditor.model.document.registerPostFixer( writer => removeStaleSoftBreakAttributes( writer ) );\n\n\t\tthis.listenTo<ViewDocumentEnterEvent>( viewDocument, 'enter', ( evt, data ) => {\n\t\t\t// When not in composition, we handle the action, so prevent the default one.\n\t\t\t// When in composition, it's the browser who modify the DOM (renderer is disabled).\n\t\t\tif ( !viewDocument.isComposing ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t}\n\n\t\t\t// The hard enter key is handled by the Enter plugin.\n\t\t\tif ( !data.isSoft ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\teditor.execute( 'shiftEnter' );\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: 'low' } );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Insert a soft break (a <code>&lt;br&gt;</code> element)' ),\n\t\t\t\t\tkeystroke: 'Shift+Enter'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n}\n\n/**\n * The post-fixer that removes attributes from stale soft-break elements.\n */\nfunction removeStaleSoftBreakAttributes( writer: ModelWriter ): boolean {\n\tconst parentsToCheck = new Set<ModelElement>();\n\n\tfor ( const change of writer.model.document.differ.getChanges() ) {\n\t\tif ( change.type == 'insert' || change.type == 'remove' ) {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( change.position.parent.is( 'element' ) ) {\n\t\t\t\tparentsToCheck.add( change.position.parent );\n\t\t\t}\n\t\t} else {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( change.type == 'attribute' ) {\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( change.range.start.parent.is( 'element' ) ) {\n\t\t\t\t\tparentsToCheck.add( change.range.start.parent );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tlet wasChanged = false;\n\n\tfor ( const parent of parentsToCheck ) {\n\t\t// Just a sibling nodes check. We do not need to check attributes of nested elements.\n\t\tfor ( const child of parent.getChildren() ) {\n\t\t\t// Find a softBreak element.\n\t\t\tif ( !child.is( 'element', 'softBreak' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst nextSibling = child.nextSibling;\n\n\t\t\t// Do not remove attributes when softBreak is the last element or there is some element after it.\n\t\t\tif ( !nextSibling || nextSibling.is( 'element' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Remove the attribute if the next sibling does not have the same attribute.\n\t\t\tconst attributesToRemove = Array.from( child.getAttributes() )\n\t\t\t\t.filter( ( [ key, value ] ) => !hasSameAttribute( nextSibling, key, value ) );\n\n\t\t\tfor ( const [ key ] of attributesToRemove ) {\n\t\t\t\twriter.removeAttribute( key, child );\n\t\t\t\twasChanged = true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn wasChanged;\n}\n\n/**\n * Returns `true` if the given node has the same attribute as the one provided in the parameters.\n */\nfunction hasSameAttribute( node: ModelNode | null, key: string, value: unknown ): boolean {\n\treturn node?.getAttribute( key ) === value;\n}\n", "import { Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { ModelDocumentSelection, ModelTreeWalker, MouseObserver, PointerObserver } from \"@ckeditor/ckeditor5-engine\";\nimport { Delete } from \"@ckeditor/ckeditor5-typing\";\nimport { CKEditorError, DomEmitterMixin, EmitterMixin, ObservableMixin, Rect, compareArrays, env, getLocalizedArrowKeyCodeDirection, getRangeFromMouseEvent, global, isForwardArrowKeyCode, keyCodes, logWarning, toArray } from \"@ckeditor/ckeditor5-utils\";\nimport { IconDragHandle, IconReturnArrow } from \"@ckeditor/ckeditor5-icons\";\nimport { BalloonPanelView, ContextualBalloon, IconView, Template, ToolbarView, View } from \"@ckeditor/ckeditor5-ui\";\nimport { Enter, _getCopyOnEnterAttributes } from \"@ckeditor/ckeditor5-enter\";\nimport { throttle } 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* @module widget/highlightstack\n*/\nconst WidgetHighlightStackBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Class used to handle the correct order of highlights on elements.\n*\n* When different highlights are applied to same element the correct order should be preserved:\n*\n* * highlight with highest priority should be applied,\n* * if two highlights have same priority - sort by CSS class provided in\n* {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor}.\n*\n* This way, highlight will be applied with the same rules it is applied on texts.\n*/\nvar WidgetHighlightStack = class extends WidgetHighlightStackBase {\n\t_stack = [];\n\t/**\n\t* Adds highlight descriptor to the stack.\n\t*\n\t* @fires change:top\n\t*/\n\tadd(descriptor, writer) {\n\t\tconst stack = this._stack;\n\t\tconst oldTop = stack[0];\n\t\tthis._insertDescriptor(descriptor);\n\t\tconst newTop = stack[0];\n\t\tif (oldTop !== newTop && !compareDescriptors(oldTop, newTop)) this.fire(\"change:top\", {\n\t\t\toldDescriptor: oldTop,\n\t\t\tnewDescriptor: newTop,\n\t\t\twriter\n\t\t});\n\t}\n\t/**\n\t* Removes highlight descriptor from the stack.\n\t*\n\t* @fires change:top\n\t* @param id Id of the descriptor to remove.\n\t*/\n\tremove(id, writer) {\n\t\tconst stack = this._stack;\n\t\tconst oldTop = stack[0];\n\t\tthis._removeDescriptor(id);\n\t\tconst newTop = stack[0];\n\t\tif (oldTop !== newTop && !compareDescriptors(oldTop, newTop)) this.fire(\"change:top\", {\n\t\t\toldDescriptor: oldTop,\n\t\t\tnewDescriptor: newTop,\n\t\t\twriter\n\t\t});\n\t}\n\t/**\n\t* Inserts a given descriptor in correct place in the stack. It also takes care about updating information\n\t* when descriptor with same id is already present.\n\t*/\n\t_insertDescriptor(descriptor) {\n\t\tconst stack = this._stack;\n\t\tconst index = stack.findIndex((item) => item.id === descriptor.id);\n\t\tif (compareDescriptors(descriptor, stack[index])) return;\n\t\tif (index > -1) stack.splice(index, 1);\n\t\tlet i = 0;\n\t\twhile (stack[i] && shouldABeBeforeB(stack[i], descriptor)) i++;\n\t\tstack.splice(i, 0, descriptor);\n\t}\n\t/**\n\t* Removes descriptor with given id from the stack.\n\t*\n\t* @param id Descriptor's id.\n\t*/\n\t_removeDescriptor(id) {\n\t\tconst stack = this._stack;\n\t\tconst index = stack.findIndex((item) => item.id === id);\n\t\tif (index > -1) stack.splice(index, 1);\n\t}\n};\n/**\n* Compares two descriptors by checking their priority and class list.\n*\n* @returns Returns true if both descriptors are defined and have same priority and classes.\n*/\nfunction compareDescriptors(a, b) {\n\treturn a && b && a.priority == b.priority && classesToString(a.classes) == classesToString(b.classes);\n}\n/**\n* Checks whenever first descriptor should be placed in the stack before second one.\n*/\nfunction shouldABeBeforeB(a, b) {\n\tif (a.priority > b.priority) return true;\n\telse if (a.priority < b.priority) return false;\n\treturn classesToString(a.classes) > classesToString(b.classes);\n}\n/**\n* Converts CSS classes passed with {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor} to\n* sorted string.\n*/\nfunction classesToString(classes) {\n\treturn Array.isArray(classes) ? classes.sort().join(\",\") : classes;\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 widget/utils\n*/\n/**\n* CSS class added to each widget element.\n*/\nconst WIDGET_CLASS_NAME = \"ck-widget\";\n/**\n* CSS class added to currently selected widget element.\n*/\nconst WIDGET_SELECTED_CLASS_NAME = \"ck-widget_selected\";\n/**\n* Returns `true` if given {@link module:engine/view/node~ViewNode} is an {@link module:engine/view/element~ViewElement} and a widget.\n*/\nfunction isWidget(node) {\n\tif (!node.is(\"element\")) return false;\n\treturn !!node.getCustomProperty(\"widget\");\n}\n/**\n* Converts the given {@link module:engine/view/element~ViewElement} to a widget in the following way:\n*\n* * sets the `contenteditable` attribute to `\"false\"`,\n* * adds the `ck-widget` CSS class,\n* * adds a custom {@link module:engine/view/element~ViewElement#getFillerOffset `getFillerOffset()`} method returning `null`,\n* * adds a custom property allowing to recognize widget elements by using {@link ~isWidget `isWidget()`},\n* * implements the {@link ~setHighlightHandling view highlight on widgets}.\n*\n* This function needs to be used in conjunction with\n* {@link module:engine/conversion/downcasthelpers~DowncastHelpers downcast conversion helpers}\n* like {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n* Moreover, typically you will want to use `toWidget()` only for `editingDowncast`, while keeping the `dataDowncast` clean.\n*\n* For example, in order to convert a `<widget>` model element to `<div class=\"widget\">` in the view, you can define\n* such converters:\n*\n* ```ts\n* editor.conversion.for( 'editingDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'widget',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\tconst div = writer.createContainerElement( 'div', { class: 'widget' } );\n*\n* \t\t\treturn toWidget( div, writer, { label: 'some widget' } );\n* \t\t}\n* \t} );\n*\n* editor.conversion.for( 'dataDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'widget',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\treturn writer.createContainerElement( 'div', { class: 'widget' } );\n* \t\t}\n* \t} );\n* ```\n*\n* See the full source code of the widget (with a nested editable) schema definition and converters in\n* [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n*\n* @param options Additional options.\n* @param options.label Element's label provided to the {@link ~setLabel} function. It can be passed as\n* a plain string or a function returning a string. It represents the widget for assistive technologies (like screen readers).\n* @param options.hasSelectionHandle If `true`, the widget will have a selection handle added.\n* @returns Returns the same element.\n*/\nfunction toWidget(element, writer, options = {}) {\n\tif (!element.is(\"containerElement\"))\n /**\n\t* The element passed to `toWidget()` must be a {@link module:engine/view/containerelement~ViewContainerElement}\n\t* instance.\n\t*\n\t* @error widget-to-widget-wrong-element-type\n\t* @param {any} element The view element passed to `toWidget()`.\n\t*/\n\tthrow new CKEditorError(\"widget-to-widget-wrong-element-type\", null, { element });\n\twriter.setAttribute(\"contenteditable\", \"false\", element);\n\twriter.addClass(WIDGET_CLASS_NAME, element);\n\twriter.setCustomProperty(\"widget\", true, element);\n\telement.getFillerOffset = getFillerOffset;\n\twriter.setCustomProperty(\"widgetLabel\", [], element);\n\tif (options.label) setLabel(element, options.label);\n\tif (options.hasSelectionHandle) addSelectionHandle(element, writer);\n\tsetHighlightHandling(element, writer);\n\treturn element;\n}\n/**\n* Default handler for adding a highlight on a widget.\n* It adds CSS class and attributes basing on the given highlight descriptor.\n*/\nfunction addHighlight(element, descriptor, writer) {\n\tif (descriptor.classes) writer.addClass(toArray(descriptor.classes), element);\n\tif (descriptor.attributes) for (const key in descriptor.attributes) writer.setAttribute(key, descriptor.attributes[key], element);\n}\n/**\n* Default handler for removing a highlight from a widget.\n* It removes CSS class and attributes basing on the given highlight descriptor.\n*/\nfunction removeHighlight(element, descriptor, writer) {\n\tif (descriptor.classes) writer.removeClass(toArray(descriptor.classes), element);\n\tif (descriptor.attributes) for (const key in descriptor.attributes) writer.removeAttribute(key, element);\n}\n/**\n* Sets highlight handling methods. Uses {@link module:widget/highlightstack~WidgetHighlightStack} to\n* properly determine which highlight descriptor should be used at given time.\n*/\nfunction setHighlightHandling(element, writer, add = addHighlight, remove = removeHighlight) {\n\tconst stack = new WidgetHighlightStack();\n\tstack.on(\"change:top\", (evt, data) => {\n\t\tif (data.oldDescriptor) remove(element, data.oldDescriptor, data.writer);\n\t\tif (data.newDescriptor) add(element, data.newDescriptor, data.writer);\n\t});\n\tconst addHighlightCallback = (element, descriptor, writer) => stack.add(descriptor, writer);\n\tconst removeHighlightCallback = (element, id, writer) => stack.remove(id, writer);\n\twriter.setCustomProperty(\"addHighlight\", addHighlightCallback, element);\n\twriter.setCustomProperty(\"removeHighlight\", removeHighlightCallback, element);\n}\n/**\n* Sets label for given element.\n* It can be passed as a plain string or a function returning a string. Function will be called each time label is retrieved by\n* {@link ~getLabel `getLabel()`}.\n*/\nfunction setLabel(element, labelOrCreator) {\n\telement.getCustomProperty(\"widgetLabel\").push(labelOrCreator);\n}\n/**\n* Returns the label of the provided element.\n*/\nfunction getLabel(element) {\n\treturn element.getCustomProperty(\"widgetLabel\").reduce((prev, current) => {\n\t\tif (typeof current === \"function\") return prev ? prev + \". \" + current() : current();\n\t\telse return prev ? prev + \". \" + current : current;\n\t}, \"\");\n}\n/**\n* Adds functionality to the provided {@link module:engine/view/editableelement~ViewEditableElement} to act as a widget's editable:\n*\n* * sets the `contenteditable` attribute to `true` when\n* {@link module:engine/view/editableelement~ViewEditableElement#isReadOnly} is `false`,\n* otherwise sets it to `false`,\n* * adds the `ck-editor__editable` and `ck-editor__nested-editable` CSS classes,\n* * adds the `ck-editor__nested-editable_focused` CSS class when the editable is focused and removes it when it is blurred.\n* * implements the {@link ~setHighlightHandling view highlight on widget's editable}.\n* * sets the `role` attribute to `textbox` for accessibility purposes.\n*\n* Similarly to {@link ~toWidget `toWidget()`} this function should be used in `editingDowncast` only and it is usually\n* used together with {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n*\n* For example, in order to convert a `<nested>` model element to `<div class=\"nested\">` in the view, you can define\n* such converters:\n*\n* ```ts\n* editor.conversion.for( 'editingDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'nested',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\tconst div = writer.createEditableElement( 'div', { class: 'nested' } );\n*\n* \t\t\treturn toWidgetEditable( nested, writer, { label: 'label for editable' } );\n* \t\t}\n* \t} );\n*\n* editor.conversion.for( 'dataDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'nested',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\treturn writer.createContainerElement( 'div', { class: 'nested' } );\n* \t\t}\n* \t} );\n* ```\n*\n* See the full source code of the widget (with nested editable) schema definition and converters in\n* [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n*\n* @param options Additional options.\n* @param options.label Editable's label used by assistive technologies (e.g. screen readers).\n* @param options.withAriaRole Whether to add the role=\"textbox\" attribute on the editable. Defaults to `true`.\n* @returns Returns the same element that was provided in the `editable` parameter\n*/\nfunction toWidgetEditable(editable, writer, options = {}) {\n\twriter.addClass([\"ck-editor__editable\", \"ck-editor__nested-editable\"], editable);\n\tif (options.withAriaRole !== false) writer.setAttribute(\"role\", \"textbox\", editable);\n\tif (!editable.isReadOnly) writer.setAttribute(\"tabindex\", \"-1\", editable);\n\tif (options.label) writer.setAttribute(\"aria-label\", options.label, editable);\n\twriter.setAttribute(\"contenteditable\", editable.isReadOnly ? \"false\" : \"true\", editable);\n\teditable.on(\"change:isReadOnly\", (evt, property, isReadonly) => {\n\t\twriter.setAttribute(\"contenteditable\", isReadonly ? \"false\" : \"true\", editable);\n\t\tif (isReadonly) writer.removeAttribute(\"tabindex\", editable);\n\t\telse writer.setAttribute(\"tabindex\", \"-1\", editable);\n\t});\n\teditable.on(\"change:isFocused\", (evt, property, is) => {\n\t\tif (is) writer.addClass(\"ck-editor__nested-editable_focused\", editable);\n\t\telse writer.removeClass(\"ck-editor__nested-editable_focused\", editable);\n\t});\n\tsetHighlightHandling(editable, writer);\n\treturn editable;\n}\n/**\n* Returns a model range which is optimal (in terms of UX) for inserting a widget block.\n*\n* For instance, if a selection is in the middle of a paragraph, the collapsed range before this paragraph\n* will be returned so that it is not split. If the selection is at the end of a paragraph,\n* the collapsed range after this paragraph will be returned.\n*\n* Note: If the selection is placed in an empty block, the range in that block will be returned. If that range\n* is then passed to {@link module:engine/model/model~Model#insertContent}, the block will be fully replaced\n* by the inserted widget block.\n*\n* @param selection The selection based on which the insertion position should be calculated.\n* @param model Model instance.\n* @returns The optimal range.\n*/\nfunction findOptimalInsertionRange(selection, model) {\n\tconst selectedElement = selection.getSelectedElement();\n\tif (selectedElement) {\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(selection);\n\t\tif (typeAroundFakeCaretPosition) return model.createRange(model.createPositionAt(selectedElement, typeAroundFakeCaretPosition));\n\t}\n\treturn model.schema.findOptimalInsertionRange(selection);\n}\n/**\n* A util to be used in order to map view positions to correct model positions when implementing a widget\n* which renders non-empty view element for an empty model element.\n*\n* For example:\n*\n* ```\n* // Model:\n* <placeholder type=\"name\"></placeholder>\n*\n* // View:\n* <span class=\"placeholder\">name</span>\n* ```\n*\n* In such case, view positions inside `<span>` cannot be correctly mapped to the model (because the model element is empty).\n* To handle mapping positions inside `<span class=\"placeholder\">` to the model use this util as follows:\n*\n* ```ts\n* editor.editing.mapper.on(\n* \t'viewToModelPosition',\n* \tviewToModelPositionOutsideModelElement( model, viewElement => viewElement.hasClass( 'placeholder' ) )\n* );\n* ```\n*\n* The callback will try to map the view offset of selection to an expected model position.\n*\n* 1. When the position is at the end (or in the middle) of the inline widget:\n*\n* ```\n* // View:\n* <p>foo <span class=\"placeholder\">name|</span> bar</p>\n*\n* // Model:\n* <paragraph>foo <placeholder type=\"name\"></placeholder>| bar</paragraph>\n* ```\n*\n* 2. When the position is at the beginning of the inline widget:\n*\n* ```\n* // View:\n* <p>foo <span class=\"placeholder\">|name</span> bar</p>\n*\n* // Model:\n* <paragraph>foo |<placeholder type=\"name\"></placeholder> bar</paragraph>\n* ```\n*\n* @param model Model instance on which the callback operates.\n* @param viewElementMatcher Function that is passed a view element and should return `true` if the custom mapping\n* should be applied to the given view element.\n*/\nfunction viewToModelPositionOutsideModelElement(model, viewElementMatcher) {\n\treturn (evt, data) => {\n\t\tconst { mapper, viewPosition } = data;\n\t\tconst viewParent = mapper.findMappedViewAncestor(viewPosition);\n\t\tif (!viewElementMatcher(viewParent)) return;\n\t\tconst modelParent = mapper.toModelElement(viewParent);\n\t\tdata.modelPosition = model.createPositionAt(modelParent, viewPosition.isAtStart ? \"before\" : \"after\");\n\t};\n}\n/**\n* Default filler offset function applied to all widget elements.\n*/\nfunction getFillerOffset() {\n\treturn null;\n}\n/**\n* Adds a drag handle to the widget.\n*/\nfunction addSelectionHandle(widgetElement, writer) {\n\tconst selectionHandle = writer.createUIElement(\"div\", { class: \"ck ck-widget__selection-handle\" }, function(domDocument) {\n\t\tconst domElement = this.toDomElement(domDocument);\n\t\tconst icon = new IconView();\n\t\ticon.set(\"content\", IconDragHandle);\n\t\ticon.render();\n\t\tdomElement.appendChild(icon.element);\n\t\treturn domElement;\n\t});\n\twriter.insert(writer.createPositionAt(widgetElement, 0), selectionHandle);\n\twriter.addClass([\"ck-widget_with-selection-handle\"], widgetElement);\n}\n/**\n* Starting from a DOM resize host element (an element that receives dimensions as a result of resizing),\n* this helper returns the width of the found ancestor element.\n*\n*\t* It searches up to 5 levels of ancestors only.\n*\n* @param domResizeHost Resize host DOM element that receives dimensions as a result of resizing.\n* @returns Width of ancestor element in pixels or 0 if no ancestor with a computed width has been found.\n*/\nfunction calculateResizeHostAncestorWidth(domResizeHost) {\n\tconst getElementComputedWidth = (element) => {\n\t\tconst { width, paddingLeft, paddingRight } = element.ownerDocument.defaultView.getComputedStyle(element);\n\t\treturn parseFloat(width) - (parseFloat(paddingLeft) || 0) - (parseFloat(paddingRight) || 0);\n\t};\n\tconst domResizeHostParent = domResizeHost.parentElement;\n\tif (!domResizeHostParent) return 0;\n\tlet parentWidth = getElementComputedWidth(domResizeHostParent);\n\tconst ancestorLevelLimit = 5;\n\tlet currentLevel = 0;\n\tlet checkedElement = domResizeHostParent;\n\twhile (isNaN(parentWidth)) {\n\t\tcheckedElement = checkedElement.parentElement;\n\t\tif (++currentLevel > ancestorLevelLimit) return 0;\n\t\tparentWidth = getElementComputedWidth(checkedElement);\n\t}\n\treturn parentWidth;\n}\n/**\n* Calculates a relative width of a `domResizeHost` compared to its ancestor in percents.\n*\n* @param domResizeHost Resize host DOM element.\n* @returns Percentage value between 0 and 100.\n*/\nfunction calculateResizeHostPercentageWidth(domResizeHost, resizeHostRect = new Rect(domResizeHost)) {\n\tconst parentWidth = calculateResizeHostAncestorWidth(domResizeHost);\n\tif (!parentWidth) return 0;\n\treturn resizeHostRect.width / parentWidth * 100;\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 widget/widgettypearound/utils\n*/\n/**\n* The name of the type around model selection attribute responsible for\n* displaying a fake caret next to a selected widget.\n*\n* @internal\n*/\nconst TYPE_AROUND_SELECTION_ATTRIBUTE = \"widget-type-around\";\n/**\n* Checks if an element is a widget that qualifies to get the widget type around UI.\n*/\nfunction isTypeAroundWidget(viewElement, modelElement, schema) {\n\treturn !!viewElement && isWidget(viewElement) && !schema.isInline(modelElement);\n}\n/**\n* For the passed HTML element, this helper finds the closest widget type around button ancestor.\n*\n* @internal\n*/\nfunction getClosestTypeAroundDomButton(domElement) {\n\treturn domElement.closest(\".ck-widget__type-around__button\");\n}\n/**\n* For the passed widget type around button element, this helper determines at which position\n* the paragraph would be inserted into the content if, for instance, the button was\n* clicked by the user.\n*\n* @internal\n* @returns The position of the button.\n*/\nfunction getTypeAroundButtonPosition(domElement) {\n\treturn domElement.classList.contains(\"ck-widget__type-around__button_before\") ? \"before\" : \"after\";\n}\n/**\n* For the passed HTML element, this helper returns the closest view widget ancestor.\n*\n* @internal\n*/\nfunction getClosestWidgetViewElement(domElement, domConverter) {\n\tconst widgetDomElement = domElement.closest(\".ck-widget\");\n\treturn domConverter.mapDomToView(widgetDomElement);\n}\n/**\n* For the passed selection instance, it returns the position of the fake caret displayed next to a widget.\n*\n* **Note**: If the fake caret is not currently displayed, `null` is returned.\n*\n* @internal\n* @returns The position of the fake caret or `null` when none is present.\n*/\nfunction getTypeAroundFakeCaretPosition(selection) {\n\treturn selection.getAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n}\n/**\n* Looks for the `copyOnEnter` text formatting attributes (e.g. bold, font color) carried by the last piece\n* of inline content on the sibling that directly precedes a run of one or more consecutive block widgets.\n*\n* Used when the user inserts a new paragraph next to a widget (e.g. an image or a table) via the type-around\n* UI: the new, empty paragraph should continue whatever formatting was active right before the widget,\n* instead of starting unformatted:\n*\n* ```\n* <paragraph><$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock>\n* ```\n*\n* Only the attributes carried by the *last* inline child of that sibling are considered - whatever precedes\n* it doesn't matter, because it's the last piece of content that reflects what the user was typing right\n* before reaching the widget:\n*\n* ```\n* // \"bold\" IS recovered here: \"Bar\", the last child, is bold. \"Foo\" not being bold is irrelevant.\n* <paragraph>Foo<$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock>\n* ```\n*\n* If there is more than one widget in a row, the search continues past all of them until a sibling with\n* actual content (or the boundary of the parent) is found:\n*\n* ```\n* <paragraph><$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock><imageBlock></imageBlock>\n* ```\n*\n* @param schema Model's schema.\n* @param widgetElement The widget model element.\n* @internal\n*/\nfunction getCopyOnEnterTextAttributesBeforeWidgets(schema, widgetElement) {\n\tlet sibling = widgetElement;\n\twhile (sibling && sibling.is(\"element\") && schema.isObject(sibling)) sibling = sibling.previousSibling;\n\tif (!sibling?.is(\"element\")) return [];\n\tif (sibling.isEmpty) {\n\t\tconst selectionAttributes = extractStoredSelectionAttributes(sibling.getAttributes());\n\t\treturn Array.from(_getCopyOnEnterAttributes(schema, selectionAttributes));\n\t}\n\tconst lastChild = sibling.getChild(sibling.childCount - 1);\n\tif (!schema.isInline(lastChild)) return [];\n\treturn Array.from(_getCopyOnEnterAttributes(schema, lastChild.getAttributes()));\n}\n/**\n* Extracts the selection attributes stored on an empty block.\n*/\nfunction* extractStoredSelectionAttributes(iterator) {\n\tfor (const [attributeKey, attributeValue] of iterator) {\n\t\tif (!ModelDocumentSelection._isStoreAttributeKey(attributeKey)) continue;\n\t\tyield [ModelDocumentSelection._dropStoreAttributeKeyPrefix(attributeKey), attributeValue];\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 widget/widgettypearound/widgettypearound\n*/\nconst POSSIBLE_INSERTION_POSITIONS = [\"before\", \"after\"];\nconst RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(IconReturnArrow, \"image/svg+xml\").firstChild;\nconst PLUGIN_DISABLED_EDITING_ROOT_CLASS = \"ck-widget__type-around_disabled\";\n/**\n* A plugin that allows users to type around widgets where normally it is impossible to place the caret due\n* to limitations of web browsers. These \"tight spots\" occur, for instance, before (or after) a widget being\n* the first (or last) child of its parent or between two block widgets.\n*\n* This plugin extends the {@link module:widget/widget~Widget `Widget`} plugin and injects the user interface\n* with two buttons into each widget instance in the editor. Each of the buttons can be clicked by the\n* user if the widget is next to the \"tight spot\". Once clicked, a paragraph is created with the selection anchored\n* in it so that users can type (or insert content, paste, etc.) straight away.\n*/\nvar WidgetTypeAround = class extends Plugin {\n\t/**\n\t* A reference to the model widget element that has the fake caret active\n\t* on either side of it. It is later used to remove CSS classes associated with the fake caret\n\t* when the widget no longer needs it.\n\t*/\n\t_currentFakeCaretModelElement = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"WidgetTypeAround\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Enter, Delete];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tthis.on(\"change:isEnabled\", (evt, data, isEnabled) => {\n\t\t\teditingView.change((writer) => {\n\t\t\t\tfor (const root of editingView.document.roots) if (isEnabled) writer.removeClass(PLUGIN_DISABLED_EDITING_ROOT_CLASS, root);\n\t\t\t\telse writer.addClass(PLUGIN_DISABLED_EDITING_ROOT_CLASS, root);\n\t\t\t});\n\t\t\tif (!isEnabled) editor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tthis._enableTypeAroundUIInjection();\n\t\tthis._enableInsertingParagraphsOnButtonClick();\n\t\tthis._enableInsertingParagraphsOnEnterKeypress();\n\t\tthis._enableInsertingParagraphsOnTypingKeystroke();\n\t\tthis._enableTypeAroundFakeCaretActivationUsingKeyboardArrows();\n\t\tthis._enableDeleteIntegration();\n\t\tthis._enableInsertContentIntegration();\n\t\tthis._enableInsertObjectIntegration();\n\t\tthis._enableDeleteContentIntegration();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._currentFakeCaretModelElement = null;\n\t}\n\t/**\n\t* Inserts a new paragraph next to a widget element with the selection anchored in it.\n\t*\n\t* **Note**: This method is heavily user-oriented and will both focus the editing view and scroll\n\t* the viewport to the selection in the inserted paragraph.\n\t*\n\t* @param widgetModelElement The model widget element next to which a paragraph is inserted.\n\t* @param position The position where the paragraph is inserted. Either `'before'` or `'after'` the widget.\n\t*/\n\t_insertParagraph(widgetModelElement, position) {\n\t\tconst editor = this.editor;\n\t\tconst { model } = editor;\n\t\tconst { schema } = model;\n\t\tconst editingView = editor.editing.view;\n\t\tconst attributesToCopy = schema.getAttributesWithProperty(widgetModelElement, \"copyOnReplace\", true);\n\t\tconst selectionAttributes = getCopyOnEnterTextAttributesBeforeWidgets(schema, widgetModelElement);\n\t\tmodel.change((writer) => {\n\t\t\tif (editor.execute(\"insertParagraph\", {\n\t\t\t\tposition: editor.model.createPositionAt(widgetModelElement, position),\n\t\t\t\tattributes: attributesToCopy\n\t\t\t})) writer.setSelectionAttribute(selectionAttributes);\n\t\t});\n\t\teditingView.focus();\n\t\teditingView.scrollToTheSelection();\n\t}\n\t/**\n\t* A wrapper for the {@link module:utils/emittermixin~Emitter#listenTo} method that executes the callbacks only\n\t* when the plugin {@link #isEnabled is enabled}.\n\t*\n\t* @param emitter The object that fires the event.\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_listenToIfEnabled(emitter, event, callback, options) {\n\t\tthis.listenTo(emitter, event, (...args) => {\n\t\t\tif (this.isEnabled) callback(...args);\n\t\t}, options);\n\t}\n\t/**\n\t* Similar to {@link #_insertParagraph}, this method inserts a paragraph except that it\n\t* does not expect a position. Instead, it performs the insertion next to a selected widget\n\t* according to the `widget-type-around` model selection attribute value (fake caret position).\n\t*\n\t* Because this method requires the `widget-type-around` attribute to be set,\n\t* the insertion can only happen when the widget's fake caret is active (e.g. activated\n\t* using the keyboard).\n\t*\n\t* @returns Returns `true` when the paragraph was inserted (the attribute was present) and `false` otherwise.\n\t*/\n\t_insertParagraphAccordingToFakeCaretPosition() {\n\t\tconst modelSelection = this.editor.model.document.selection;\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n\t\tif (!typeAroundFakeCaretPosition) return false;\n\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\t\tthis._insertParagraph(selectedModelElement, typeAroundFakeCaretPosition);\n\t\treturn true;\n\t}\n\t/**\n\t* Creates a listener in the editing conversion pipeline that injects the widget type around\n\t* UI into every single widget instance created in the editor.\n\t*\n\t* The UI is delivered as a {@link module:engine/view/uielement~ViewUIElement}\n\t* wrapper which renders DOM buttons that users can use to insert paragraphs.\n\t*/\n\t_enableTypeAroundUIInjection() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.locale.t;\n\t\tconst buttonTitles = {\n\t\t\tbefore: t(\"Insert paragraph before block\"),\n\t\t\tafter: t(\"Insert paragraph after block\")\n\t\t};\n\t\teditor.editing.downcastDispatcher.on(\"insert\", (evt, data, conversionApi) => {\n\t\t\tconst viewElement = conversionApi.mapper.toViewElement(data.item);\n\t\t\tif (!viewElement) return;\n\t\t\tif (isTypeAroundWidget(viewElement, data.item, schema)) {\n\t\t\t\tinjectUIIntoWidget(conversionApi.writer, buttonTitles, viewElement);\n\t\t\t\tviewElement.getCustomProperty(\"widgetLabel\").push(() => {\n\t\t\t\t\treturn this.isEnabled ? t(\"Press Enter to type after or press Shift + Enter to type before the widget\") : \"\";\n\t\t\t\t});\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Brings support for the fake caret that appears when either:\n\t*\n\t* * the selection moves to a widget from a position next to it using arrow keys,\n\t* * the arrow key is pressed when the widget is already selected.\n\t*\n\t* The fake caret lets the user know that they can start typing or just press\n\t* <kbd>Enter</kbd> to insert a paragraph at the position next to a widget as suggested by the fake caret.\n\t*\n\t* The fake caret disappears when the user changes the selection or the editor\n\t* gets blurred.\n\t*\n\t* The whole idea is as follows:\n\t*\n\t* 1. A user does one of the 2 scenarios described at the beginning.\n\t* 2. The \"keydown\" listener is executed and the decision is made whether to show or hide the fake caret.\n\t* 3. If it should show up, the `widget-type-around` model selection attribute is set indicating\n\t*    on which side of the widget it should appear.\n\t* 4. The selection dispatcher reacts to the selection attribute and sets CSS classes responsible for the\n\t*    fake caret on the view widget.\n\t* 5. If the fake caret should disappear, the selection attribute is removed and the dispatcher\n\t*    does the CSS class clean-up in the view.\n\t* 6. Additionally, `change:range` and `FocusTracker#isFocused` listeners also remove the selection\n\t*    attribute (the former also removes widget CSS classes).\n\t*/\n\t_enableTypeAroundFakeCaretActivationUsingKeyboardArrows() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst editingView = editor.editing.view;\n\t\tthis._listenToIfEnabled(editingView.document, \"arrowKey\", (evt, domEventData) => {\n\t\t\tthis._handleArrowKeyPress(evt, domEventData);\n\t\t}, {\n\t\t\tcontext: [isWidget, \"$text\"],\n\t\t\tpriority: \"high\"\n\t\t});\n\t\tthis._listenToIfEnabled(modelSelection, \"change:range\", (evt, data) => {\n\t\t\tif (!data.directChange) return;\n\t\t\teditor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tthis._listenToIfEnabled(model.document, \"change:data\", () => {\n\t\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\t\t\tif (selectedModelElement) {\n\t\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n\t\t\t\tif (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) return;\n\t\t\t}\n\t\t\teditor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tthis._listenToIfEnabled(editor.editing.downcastDispatcher, \"selection\", (evt, data, conversionApi) => {\n\t\t\tconst writer = conversionApi.writer;\n\t\t\tif (this._currentFakeCaretModelElement) {\n\t\t\t\tconst selectedViewElement = conversionApi.mapper.toViewElement(this._currentFakeCaretModelElement);\n\t\t\t\tif (selectedViewElement) {\n\t\t\t\t\twriter.removeClass(POSSIBLE_INSERTION_POSITIONS.map(positionToWidgetCssClass), selectedViewElement);\n\t\t\t\t\tthis._currentFakeCaretModelElement = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst selectedModelElement = data.selection.getSelectedElement();\n\t\t\tif (!selectedModelElement) return;\n\t\t\tconst selectedViewElement = conversionApi.mapper.toViewElement(selectedModelElement);\n\t\t\tif (!isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(data.selection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\twriter.addClass(positionToWidgetCssClass(typeAroundFakeCaretPosition), selectedViewElement);\n\t\t\tthis._currentFakeCaretModelElement = selectedModelElement;\n\t\t});\n\t\tthis._listenToIfEnabled(editor.ui.focusTracker, \"change:isFocused\", (evt, name, isFocused) => {\n\t\t\tif (!isFocused) editor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tfunction positionToWidgetCssClass(position) {\n\t\t\treturn `ck-widget_type-around_show-fake-caret_${position}`;\n\t\t}\n\t}\n\t/**\n\t* A listener executed on each \"keydown\" in the view document, a part of\n\t* {@link #_enableTypeAroundFakeCaretActivationUsingKeyboardArrows}.\n\t*\n\t* It decides whether the arrow keypress should activate the fake caret or not (also whether it should\n\t* be deactivated).\n\t*\n\t* The fake caret activation is done by setting the `widget-type-around` model selection attribute\n\t* in this listener, and stopping and preventing the event that would normally be handled by the widget\n\t* plugin that is responsible for the regular keyboard navigation near/across all widgets (that\n\t* includes inline widgets, which are ignored by the widget type around plugin).\n\t*/\n\t_handleArrowKeyPress(evt, domEventData) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst editingView = editor.editing.view;\n\t\tif (domEventData.shiftKey) return;\n\t\tconst keyCode = domEventData.keyCode;\n\t\tconst isForward = isForwardArrowKeyCode(keyCode, editor.locale.contentLanguageDirection);\n\t\tconst selectedViewElement = editingView.document.selection.getSelectedElement();\n\t\tconst selectedModelElement = editor.editing.mapper.toModelElement(selectedViewElement);\n\t\tlet shouldStopAndPreventDefault;\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) shouldStopAndPreventDefault = this._handleArrowKeyPressOnSelectedWidget(isForward);\n\t\telse if (modelSelection.isCollapsed) shouldStopAndPreventDefault = this._handleArrowKeyPressWhenSelectionNextToAWidget(isForward);\n\t\telse if (!domEventData.shiftKey) shouldStopAndPreventDefault = this._handleArrowKeyPressWhenNonCollapsedSelection(isForward);\n\t\tif (shouldStopAndPreventDefault) {\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t}\n\t}\n\t/**\n\t* Handles the keyboard navigation on \"keydown\" when a widget is currently selected and activates or deactivates\n\t* the fake caret for that widget, depending on the current value of the `widget-type-around` model\n\t* selection attribute and the direction of the pressed arrow key.\n\t*\n\t* @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t* as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t* @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t* process the event any further. Returns `false` otherwise.\n\t*/\n\t_handleArrowKeyPressOnSelectedWidget(isForward) {\n\t\tconst model = this.editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n\t\treturn model.change((writer) => {\n\t\t\tif (typeAroundFakeCaretPosition) {\n\t\t\t\tif (!(typeAroundFakeCaretPosition === (isForward ? \"after\" : \"before\"))) {\n\t\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twriter.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? \"after\" : \"before\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\t/**\n\t* Handles the keyboard navigation on \"keydown\" when **no** widget is selected but the selection is **directly** next\n\t* to one and upon the fake caret should become active for this widget upon arrow keypress\n\t* (AKA entering/selecting the widget).\n\t*\n\t* **Note**: This code mirrors the implementation from the widget plugin but also adds the selection attribute.\n\t* Unfortunately, there is no safe way to let the widget plugin do the selection part first and then just set the\n\t* selection attribute here in the widget type around plugin. This is why this code must duplicate some from the widget plugin.\n\t*\n\t* @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t* as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t* @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t* process the event any further. Returns `false` otherwise.\n\t*/\n\t_handleArrowKeyPressWhenSelectionNextToAWidget(isForward) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst widgetPlugin = editor.plugins.get(\"Widget\");\n\t\tconst modelElementNextToSelection = widgetPlugin._getObjectElementNextToSelection(isForward);\n\t\tconst viewElementNextToSelection = editor.editing.mapper.toViewElement(modelElementNextToSelection);\n\t\tif (isTypeAroundWidget(viewElementNextToSelection, modelElementNextToSelection, schema)) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twidgetPlugin._setSelectionOverElement(modelElementNextToSelection);\n\t\t\t\twriter.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? \"before\" : \"after\");\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Handles the keyboard navigation on \"keydown\" when a widget is currently selected (together with some other content)\n\t* and the widget is the first or last element in the selection. It activates or deactivates the fake caret for that widget.\n\t*\n\t* @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t* as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t* @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t* process the event any further. Returns `false` otherwise.\n\t*/\n\t_handleArrowKeyPressWhenNonCollapsedSelection(isForward) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst selectedModelNode = isForward ? modelSelection.getLastPosition().nodeBefore : modelSelection.getFirstPosition().nodeAfter;\n\t\tconst selectedViewNode = mapper.toViewElement(selectedModelNode);\n\t\tif (isTypeAroundWidget(selectedViewNode, selectedModelNode, schema)) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(selectedModelNode, \"on\");\n\t\t\t\twriter.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? \"after\" : \"before\");\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Registers a `mousedown` listener for the view document which intercepts events\n\t* coming from the widget type around UI, which happens when a user clicks one of the buttons\n\t* that insert a paragraph next to a widget.\n\t*/\n\t_enableInsertingParagraphsOnButtonClick() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tthis._listenToIfEnabled(editingView.document, \"mousedown\", (evt, domEventData) => {\n\t\t\tconst button = getClosestTypeAroundDomButton(domEventData.domTarget);\n\t\t\tif (!button) return;\n\t\t\tconst buttonPosition = getTypeAroundButtonPosition(button);\n\t\t\tconst widgetViewElement = getClosestWidgetViewElement(button, editingView.domConverter);\n\t\t\tconst widgetModelElement = editor.editing.mapper.toModelElement(widgetViewElement);\n\t\t\tthis._insertParagraph(widgetModelElement, buttonPosition);\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t});\n\t}\n\t/**\n\t* Creates the <kbd>Enter</kbd> key listener on the view document that allows the user to insert a paragraph\n\t* near the widget when either:\n\t*\n\t* * The fake caret was first activated using the arrow keys,\n\t* * The entire widget is selected in the model.\n\t*\n\t* In the first case, the new paragraph is inserted according to the `widget-type-around` selection\n\t* attribute (see {@link #_handleArrowKeyPress}).\n\t*\n\t* In the second case, the new paragraph is inserted based on whether a soft (<kbd>Shift</kbd>+<kbd>Enter</kbd>) keystroke\n\t* was pressed or not.\n\t*/\n\t_enableInsertingParagraphsOnEnterKeypress() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst editingView = editor.editing.view;\n\t\tthis._listenToIfEnabled(editingView.document, \"enter\", (evt, domEventData) => {\n\t\t\tif (evt.eventPhase != \"atTarget\") return;\n\t\t\tconst selectedModelElement = selection.getSelectedElement();\n\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n\t\t\tconst schema = editor.model.schema;\n\t\t\tlet wasHandled;\n\t\t\tif (this._insertParagraphAccordingToFakeCaretPosition()) wasHandled = true;\n\t\t\telse if (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) {\n\t\t\t\tthis._insertParagraph(selectedModelElement, domEventData.isSoft ? \"before\" : \"after\");\n\t\t\t\twasHandled = true;\n\t\t\t}\n\t\t\tif (wasHandled) {\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: isWidget });\n\t}\n\t/**\n\t* Similar to the {@link #_enableInsertingParagraphsOnEnterKeypress}, it allows the user\n\t* to insert a paragraph next to a widget when the fake caret was activated using arrow\n\t* keys but it responds to typing instead of <kbd>Enter</kbd>.\n\t*\n\t* Listener enabled by this method will insert a new paragraph according to the `widget-type-around`\n\t* model selection attribute as the user simply starts typing, which creates the impression that the fake caret\n\t* behaves like a real one rendered by the browser (AKA your text appears where the caret was).\n\t*\n\t* **Note**: At the moment this listener creates 2 undo steps: one for the `insertParagraph` command\n\t* and another one for actual typing. It is not a disaster but this may need to be fixed\n\t* sooner or later.\n\t*/\n\t_enableInsertingParagraphsOnTypingKeystroke() {\n\t\tconst viewDocument = this.editor.editing.view.document;\n\t\tthis._listenToIfEnabled(viewDocument, \"insertText\", (evt, data) => {\n\t\t\tif (this._insertParagraphAccordingToFakeCaretPosition()) data.selection = viewDocument.selection;\n\t\t}, { priority: \"high\" });\n\t\tif (env.isAndroid) this._listenToIfEnabled(viewDocument, \"keydown\", (evt, data) => {\n\t\t\tif (data.keyCode == 229) this._insertParagraphAccordingToFakeCaretPosition();\n\t\t});\n\t\telse this._listenToIfEnabled(viewDocument, \"compositionstart\", () => {\n\t\t\tthis._insertParagraphAccordingToFakeCaretPosition();\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* It creates a \"delete\" event listener on the view document to handle cases when the <kbd>Delete</kbd> or <kbd>Backspace</kbd>\n\t* is pressed and the fake caret is currently active.\n\t*\n\t* The fake caret should create an illusion of a real browser caret so that when it appears before or after\n\t* a widget, pressing <kbd>Delete</kbd> or <kbd>Backspace</kbd> should remove a widget or delete the content\n\t* before or after a widget (depending on the content surrounding the widget).\n\t*/\n\t_enableDeleteIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tthis._listenToIfEnabled(editingView.document, \"delete\", (evt, domEventData) => {\n\t\t\tif (evt.eventPhase != \"atTarget\") return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(model.document.selection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\tconst direction = domEventData.direction;\n\t\t\tconst selectedModelWidget = model.document.selection.getSelectedElement();\n\t\t\tconst isFakeCaretBefore = typeAroundFakeCaretPosition === \"before\";\n\t\t\tconst isDeleteForward = direction == \"forward\";\n\t\t\tif (isFakeCaretBefore === isDeleteForward) editor.execute(\"delete\", { selection: model.createSelection(selectedModelWidget, \"on\") });\n\t\t\telse {\n\t\t\t\tconst range = schema.getNearestSelectionRange(model.createPositionAt(selectedModelWidget, typeAroundFakeCaretPosition), direction);\n\t\t\t\tif (range) {\n\t\t\t\t\tif (!range.isCollapsed) model.change((writer) => {\n\t\t\t\t\t\twriter.setSelection(range);\n\t\t\t\t\t\teditor.execute(isDeleteForward ? \"deleteForward\" : \"delete\");\n\t\t\t\t\t});\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst probe = model.createSelection(range.start);\n\t\t\t\t\t\tmodel.modifySelection(probe, { direction });\n\t\t\t\t\t\tif (!probe.focus.isEqual(range.start)) model.change((writer) => {\n\t\t\t\t\t\t\twriter.setSelection(range);\n\t\t\t\t\t\t\teditor.execute(isDeleteForward ? \"deleteForward\" : \"delete\");\n\t\t\t\t\t\t});\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst deepestEmptyRangeAncestor = getDeepestEmptyElementAncestor(schema, range.start.parent);\n\t\t\t\t\t\t\tmodel.deleteContent(model.createSelection(deepestEmptyRangeAncestor, \"on\"), { doNotAutoparagraph: true });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: isWidget });\n\t}\n\t/**\n\t* Attaches the {@link module:engine/model/model~Model#event:insertContent} event listener that, for instance, allows the user to paste\n\t* content near a widget when the fake caret is first activated using the arrow keys.\n\t*\n\t* The content is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t*/\n\t_enableInsertContentIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst documentSelection = model.document.selection;\n\t\tthis._listenToIfEnabled(editor.model, \"insertContent\", (evt, [content, selectable]) => {\n\t\t\tif (selectable && !selectable.is(\"documentSelection\")) return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(documentSelection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\tevt.stop();\n\t\t\treturn model.change((writer) => {\n\t\t\t\tconst selectedElement = documentSelection.getSelectedElement();\n\t\t\t\tconst position = model.createPositionAt(selectedElement, typeAroundFakeCaretPosition);\n\t\t\t\tconst selection = writer.createSelection(position);\n\t\t\t\tconst result = model.insertContent(content, selection);\n\t\t\t\twriter.setSelection(selection);\n\t\t\t\treturn result;\n\t\t\t});\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Attaches the {@link module:engine/model/model~Model#event:insertObject} event listener that modifies the\n\t* `options.findOptimalPosition`parameter to position of fake caret in relation to selected element\n\t* to reflect user's intent of desired insertion position.\n\t*\n\t* The object is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t*/\n\t_enableInsertObjectIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst documentSelection = this.editor.model.document.selection;\n\t\tthis._listenToIfEnabled(editor.model, \"insertObject\", (evt, args) => {\n\t\t\tconst [, selectable, options = {}] = args;\n\t\t\tif (selectable && !selectable.is(\"documentSelection\")) return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(documentSelection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\toptions.findOptimalPosition = typeAroundFakeCaretPosition;\n\t\t\targs[3] = options;\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Attaches the {@link module:engine/model/model~Model#event:deleteContent} event listener to block the event when the fake\n\t* caret is active.\n\t*\n\t* This is required for cases that trigger {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}\n\t* before calling {@link module:engine/model/model~Model#insertContent `model.insertContent()`} like, for instance,\n\t* plain text pasting.\n\t*/\n\t_enableDeleteContentIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst documentSelection = this.editor.model.document.selection;\n\t\tthis._listenToIfEnabled(editor.model, \"deleteContent\", (evt, [selection]) => {\n\t\t\tif (selection && !selection.is(\"documentSelection\")) return;\n\t\t\tif (getTypeAroundFakeCaretPosition(documentSelection)) evt.stop();\n\t\t}, { priority: \"high\" });\n\t}\n};\n/**\n* Injects the type around UI into a view widget instance.\n*/\nfunction injectUIIntoWidget(viewWriter, buttonTitles, widgetViewElement) {\n\tconst typeAroundWrapper = viewWriter.createUIElement(\"div\", { class: \"ck ck-reset_all ck-widget__type-around\" }, function(domDocument) {\n\t\tconst wrapperDomElement = this.toDomElement(domDocument);\n\t\tinjectButtons(wrapperDomElement, buttonTitles);\n\t\tinjectFakeCaret(wrapperDomElement);\n\t\treturn wrapperDomElement;\n\t});\n\tviewWriter.insert(viewWriter.createPositionAt(widgetViewElement, \"end\"), typeAroundWrapper);\n}\n/**\n* FYI: Not using the IconView class because each instance would need to be destroyed to avoid memory leaks\n* and it's pretty hard to figure out when a view (widget) is gone for good so it's cheaper to use raw\n* <svg> here.\n*/\nfunction injectButtons(wrapperDomElement, buttonTitles) {\n\tfor (const position of POSSIBLE_INSERTION_POSITIONS) {\n\t\tconst buttonTemplate = new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-widget__type-around__button\",\n\t\t\t\t\t`ck-widget__type-around__button_${position}`\n\t\t\t\t],\n\t\t\t\ttitle: buttonTitles[position],\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t},\n\t\t\tchildren: [wrapperDomElement.ownerDocument.importNode(RETURN_ARROW_ICON_ELEMENT, true)]\n\t\t});\n\t\twrapperDomElement.appendChild(buttonTemplate.render());\n\t}\n}\nfunction injectFakeCaret(wrapperDomElement) {\n\tconst caretTemplate = new Template({\n\t\ttag: \"div\",\n\t\tattributes: { class: [\"ck\", \"ck-widget__type-around__fake-caret\"] }\n\t});\n\twrapperDomElement.appendChild(caretTemplate.render());\n}\n/**\n* Returns the ancestor of an element closest to the root which is empty. For instance,\n* for `<baz>`:\n*\n* ```\n* <foo>abc<bar><baz></baz></bar></foo>\n* ```\n*\n* it returns `<bar>`.\n*/\nfunction getDeepestEmptyElementAncestor(schema, element) {\n\tlet deepestEmptyAncestor = element;\n\tfor (const ancestor of element.getAncestors({ parentFirst: true })) {\n\t\tif (ancestor.childCount > 1 || schema.isLimit(ancestor)) break;\n\t\tdeepestEmptyAncestor = ancestor;\n\t}\n\treturn deepestEmptyAncestor;\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 widget/verticalnavigation\n*/\n/**\n* Returns 'keydown' handler for up/down arrow keys that modifies the caret movement if it's in a text line next to an object.\n*\n* @param editing The editing controller.\n*/\nfunction verticalWidgetNavigationHandler(editing) {\n\tconst model = editing.model;\n\treturn (evt, data) => {\n\t\tconst arrowUpPressed = data.keyCode == keyCodes.arrowup;\n\t\tconst arrowDownPressed = data.keyCode == keyCodes.arrowdown;\n\t\tconst expandSelection = data.shiftKey;\n\t\tconst selection = model.document.selection;\n\t\tif (!arrowUpPressed && !arrowDownPressed) return;\n\t\tconst isForward = arrowDownPressed;\n\t\tconst range = findTextRangeFromSelection(editing, selection, isForward);\n\t\tif (!range) return;\n\t\tif (range.isCollapsed) {\n\t\t\tif (selection.isCollapsed) return;\n\t\t\telse if (expandSelection) return;\n\t\t}\n\t\tif (range.isCollapsed || isSingleLineRange(editing, range, isForward)) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst newPosition = isForward ? range.end : range.start;\n\t\t\t\tif (expandSelection) {\n\t\t\t\t\tconst newSelection = model.createSelection(selection.anchor);\n\t\t\t\t\tnewSelection.setFocus(newPosition);\n\t\t\t\t\twriter.setSelection(newSelection);\n\t\t\t\t} else writer.setSelection(newPosition);\n\t\t\t});\n\t\t\tevt.stop();\n\t\t\tdata.preventDefault();\n\t\t\tdata.stopPropagation();\n\t\t}\n\t};\n}\n/**\n* Finds the range between selection and closest limit element (in the direction of navigation).\n* The position next to limit element is adjusted to the closest allowed `$text` position.\n*\n* Returns `null` if, according to the schema, the resulting range cannot contain a `$text` element.\n*\n* @param editing The editing controller.\n* @param selection The current selection.\n* @param isForward The expected navigation direction.\n*/\nfunction findTextRangeFromSelection(editing, selection, isForward) {\n\tconst model = editing.model;\n\tif (isForward) {\n\t\tconst startPosition = selection.focus;\n\t\tconst endPosition = getNearestNonInlineLimit(model, startPosition, \"forward\");\n\t\tif (!endPosition) return;\n\t\tconst range = model.createRange(startPosition, endPosition);\n\t\tconst lastRangePosition = getNearestTextPosition(model.schema, range, \"backward\");\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (lastRangePosition) return model.createRange(startPosition, lastRangePosition);\n\t} else {\n\t\tconst endPosition = selection.focus;\n\t\tconst startPosition = getNearestNonInlineLimit(model, endPosition, \"backward\");\n\t\tif (!startPosition) return;\n\t\tconst range = model.createRange(startPosition, endPosition);\n\t\tconst firstRangePosition = getNearestTextPosition(model.schema, range, \"forward\");\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (firstRangePosition) return model.createRange(firstRangePosition, endPosition);\n\t}\n}\n/**\n* Finds the limit element position that is closest to startPosition.\n*\n* @param direction Search direction.\n*/\nfunction getNearestNonInlineLimit(model, startPosition, direction) {\n\tconst schema = model.schema;\n\tconst range = model.createRangeIn(startPosition.root);\n\tconst walkerValueType = direction == \"forward\" ? \"elementStart\" : \"elementEnd\";\n\tfor (const { previousPosition, item, type } of range.getWalker({\n\t\tstartPosition,\n\t\tdirection\n\t})) {\n\t\tif (schema.isLimit(item) && !schema.isInline(item)) return previousPosition;\n\t\tif (type == walkerValueType && schema.isBlock(item)) return null;\n\t}\n\treturn null;\n}\n/**\n* Basing on the provided range, finds the first or last (depending on `direction`) position inside the range\n* that can contain `$text` (according to schema).\n*\n* @param schema The schema.\n* @param range The range to find the position in.\n* @param direction Search direction.\n* @returns The nearest selection position.\n*\n*/\nfunction getNearestTextPosition(schema, range, direction) {\n\tconst position = direction == \"backward\" ? range.end : range.start;\n\tif (schema.checkChild(position, \"$text\")) return position;\n\tfor (const { nextPosition } of range.getWalker({ direction })) if (schema.checkChild(nextPosition, \"$text\")) return nextPosition;\n}\n/**\n* Checks if the DOM range corresponding to the provided model range renders as a single line by analyzing DOMRects\n* (verifying if they visually wrap content to the next line).\n*\n* @param editing The editing controller.\n* @param modelRange The current table cell content range.\n* @param isForward The expected navigation direction.\n*/\nfunction isSingleLineRange(editing, modelRange, isForward) {\n\tconst model = editing.model;\n\tconst domConverter = editing.view.domConverter;\n\tif (isForward) {\n\t\tconst probe = model.createSelection(modelRange.start);\n\t\tmodel.modifySelection(probe);\n\t\tif (!probe.focus.isAtEnd && !modelRange.start.isEqual(probe.focus)) modelRange = model.createRange(probe.focus, modelRange.end);\n\t}\n\tconst viewRange = editing.mapper.toViewRange(modelRange);\n\tconst domRange = domConverter.viewRangeToDom(viewRange);\n\tconst rects = Rect.getDomRangeRects(domRange);\n\tlet boundaryVerticalPosition;\n\tfor (const rect of rects) {\n\t\tif (boundaryVerticalPosition === void 0) {\n\t\t\tboundaryVerticalPosition = Math.round(rect.bottom);\n\t\t\tcontinue;\n\t\t}\n\t\tif (Math.round(rect.top) >= boundaryVerticalPosition) return false;\n\t\tboundaryVerticalPosition = Math.max(boundaryVerticalPosition, Math.round(rect.bottom));\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 widget/widget\n*/\n/**\n* The widget plugin. It enables base support for widgets.\n*\n* See {@glink api/widget package page} for more details and documentation.\n*\n* This plugin enables multiple behaviors required by widgets:\n*\n* * The model to view selection converter for the editing pipeline (it handles widget custom selection rendering).\n* If a converted selection wraps around a widget element, that selection is marked as\n* {@link module:engine/view/selection~ViewSelection#isFake fake}. Additionally, the `ck-widget_selected` CSS class\n* is added to indicate that widget has been selected.\n* * The mouse and keyboard events handling on and around widget elements.\n*/\nvar Widget = class extends Plugin {\n\t/**\n\t* Holds previously selected widgets.\n\t*/\n\t_previouslySelected = /* @__PURE__ */ new Set();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Widget\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [WidgetTypeAround, Delete];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = editor.t;\n\t\tthis.editor.editing.downcastDispatcher.on(\"selection\", (evt, data, conversionApi) => {\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst modelSelection = data.selection;\n\t\t\tif (modelSelection.isCollapsed) return;\n\t\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\t\t\tif (!selectedModelElement) return;\n\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n\t\t\tif (!isWidget(selectedViewElement)) return;\n\t\t\tif (!conversionApi.consumable.consume(modelSelection, \"selection\")) return;\n\t\t\tviewWriter.setSelection(viewWriter.createRangeOn(selectedViewElement), {\n\t\t\t\tfake: true,\n\t\t\t\tlabel: getLabel(selectedViewElement)\n\t\t\t});\n\t\t});\n\t\tthis.editor.editing.downcastDispatcher.on(\"selection\", (evt, data, conversionApi) => {\n\t\t\tthis._clearPreviouslySelectedWidgets(conversionApi.writer);\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst viewSelection = viewWriter.document.selection;\n\t\t\tlet lastMarked = null;\n\t\t\tfor (const range of viewSelection.getRanges()) for (const value of range) {\n\t\t\t\tconst node = value.item;\n\t\t\t\tif (isWidget(node) && !isChild(node, lastMarked)) {\n\t\t\t\t\tviewWriter.addClass(WIDGET_SELECTED_CLASS_NAME, node);\n\t\t\t\t\tthis._previouslySelected.add(node);\n\t\t\t\t\tlastMarked = node;\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t\tview.addObserver(MouseObserver);\n\t\tview.addObserver(PointerObserver);\n\t\tthis.listenTo(viewDocument, \"mousedown\", (...args) => this._onMousedown(...args));\n\t\tthis.listenTo(viewDocument, \"pointerdown\", (...args) => this._onPointerdown(...args));\n\t\tthis.listenTo(viewDocument, \"arrowKey\", (...args) => {\n\t\t\tthis._handleSelectionChangeOnArrowKeyPress(...args);\n\t\t}, { context: [isWidget, \"$text\"] });\n\t\tthis.listenTo(viewDocument, \"arrowKey\", (...args) => {\n\t\t\tthis._preventDefaultOnArrowKeyPress(...args);\n\t\t}, { context: \"$root\" });\n\t\tthis.listenTo(viewDocument, \"arrowKey\", verticalWidgetNavigationHandler(this.editor.editing), { context: \"$text\" });\n\t\tthis.listenTo(viewDocument, \"delete\", (evt, data) => {\n\t\t\tif (this._handleDelete(data.direction == \"forward\")) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: \"$root\" });\n\t\tthis.listenTo(viewDocument, \"tab\", (evt, data) => {\n\t\t\tif (this._selectNextEditable(data.shiftKey ? \"backward\" : \"forward\")) {\n\t\t\t\tview.scrollToTheSelection();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, {\n\t\t\tcontext: (node) => isWidget(node) || node.is(\"editableElement\"),\n\t\t\tpriority: \"low\"\n\t\t});\n\t\tthis.listenTo(viewDocument, \"keydown\", (evt, data) => {\n\t\t\tif (data.keystroke != keyCodes.esc) return;\n\t\t\tif (this._selectAncestorWidget()) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, {\n\t\t\tcontext: (node) => node.is(\"editableElement\"),\n\t\t\tpriority: \"low\"\n\t\t});\n\t\teditor.accessibility.addKeystrokeInfoGroup({\n\t\t\tid: \"widget\",\n\t\t\tlabel: t(\"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)\"),\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move focus from an editable area back to the parent widget\"),\n\t\t\t\t\tkeystroke: \"Esc\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Insert a new paragraph directly after a widget\"),\n\t\t\t\t\tkeystroke: \"Enter\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Insert a new paragraph directly before a widget\"),\n\t\t\t\t\tkeystroke: \"Shift+Enter\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move the caret to allow typing directly before a widget\"),\n\t\t\t\t\tkeystroke: [[\"arrowup\"], [\"arrowleft\"]]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move the caret to allow typing directly after a widget\"),\n\t\t\t\t\tkeystroke: [[\"arrowdown\"], [\"arrowright\"]]\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:mousedown mousedown} events on widget elements.\n\t*/\n\t_onMousedown(eventInfo, domEventData) {\n\t\tconst element = domEventData.target;\n\t\tif (!element) return;\n\t\tif (domEventData.domEvent.detail >= 3) {\n\t\t\tif (this._selectBlockContent(element)) domEventData.preventDefault();\n\t\t}\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:pointerdown pointerdown} events on widget elements.\n\t*/\n\t_onPointerdown(eventInfo, domEventData) {\n\t\tif (!domEventData.domEvent.isPrimary) return;\n\t\tif (getClosestTypeAroundDomButton(domEventData.domTarget)) return;\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tlet element = domEventData.target;\n\t\tif (!element) return;\n\t\tif (!isWidget(element)) {\n\t\t\tconst editableOrWidgetElement = findClosestEditableOrWidgetAncestor(element);\n\t\t\tif (!editableOrWidgetElement) return;\n\t\t\tif (isWidget(editableOrWidgetElement)) element = editableOrWidgetElement;\n\t\t\telse {\n\t\t\t\tconst clickTargetFromPoint = getElementFromMouseEvent(view, domEventData);\n\t\t\t\tif (clickTargetFromPoint && isWidget(clickTargetFromPoint)) element = clickTargetFromPoint;\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\tif (env.isAndroid || env.isiOS) domEventData.preventDefault();\n\t\tif (!viewDocument.isFocused) view.focus();\n\t\tconst modelElement = editor.editing.mapper.toModelElement(element);\n\t\tthis._setSelectionOverElement(modelElement);\n\t}\n\t/**\n\t* Selects entire block content, e.g. on triple click it selects entire paragraph.\n\t*/\n\t_selectBlockContent(element) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst schema = model.schema;\n\t\tconst viewElement = mapper.findMappedViewAncestor(this.editor.editing.view.createPositionAt(element, 0));\n\t\tconst modelElement = findTextBlockAncestor(mapper.toModelElement(viewElement), model.schema);\n\t\tif (!modelElement) return false;\n\t\tmodel.change((writer) => {\n\t\t\tconst nextTextBlock = !schema.isLimit(modelElement) ? findNextTextBlock(writer.createPositionAfter(modelElement), schema) : null;\n\t\t\tconst start = writer.createPositionAt(modelElement, 0);\n\t\t\tconst end = nextTextBlock ? writer.createPositionAt(nextTextBlock, 0) : writer.createPositionAt(modelElement, \"end\");\n\t\t\twriter.setSelection(writer.createRange(start, end));\n\t\t});\n\t\treturn true;\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and changes\n\t* the model selection when:\n\t*\n\t* * arrow key is pressed when the widget is selected,\n\t* * the selection is next to a widget and the widget should become selected upon the arrow key press.\n\t*\n\t* See {@link #_preventDefaultOnArrowKeyPress}.\n\t*/\n\t_handleSelectionChangeOnArrowKeyPress(eventInfo, domEventData) {\n\t\tconst keyCode = domEventData.keyCode;\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst selectedElement = modelSelection.getSelectedElement();\n\t\tconst direction = getLocalizedArrowKeyCodeDirection(keyCode, this.editor.locale.contentLanguageDirection);\n\t\tconst isForward = direction == \"down\" || direction == \"right\";\n\t\tconst isVerticalNavigation = direction == \"up\" || direction == \"down\";\n\t\tif (!domEventData.shiftKey && !modelSelection.isCollapsed) {\n\t\t\tif (hasObjectAtEdge(modelSelection, schema)) {\n\t\t\t\tconst position = isForward ? modelSelection.getLastPosition() : modelSelection.getFirstPosition();\n\t\t\t\tconst newRange = schema.getNearestSelectionRange(position, isForward ? \"forward\" : \"backward\");\n\t\t\t\tif (newRange) {\n\t\t\t\t\tmodel.change((writer) => {\n\t\t\t\t\t\twriter.setSelection(newRange);\n\t\t\t\t\t});\n\t\t\t\t\tdomEventData.preventDefault();\n\t\t\t\t\teventInfo.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst originalSelection = getModelSelectionAdjusted(model, isForward);\n\t\tconst probe = model.createSelection(originalSelection);\n\t\tmodel.modifySelection(probe, { direction: isForward ? \"forward\" : \"backward\" });\n\t\tif (probe.isEqual(originalSelection)) return;\n\t\tif (probe.focus.isTouching(originalSelection.focus) && schema.checkChild(probe.focus.parent, \"$text\") && (isForward ? !probe.focus.isAtEnd : !probe.focus.isAtStart)) model.modifySelection(probe, { direction: isForward ? \"forward\" : \"backward\" });\n\t\tconst lastSelectedNode = isForward ? originalSelection.focus.nodeBefore : originalSelection.focus.nodeAfter;\n\t\tconst nodeBeforeProbe = probe.focus.nodeBefore;\n\t\tconst nodeAfterProbe = probe.focus.nodeAfter;\n\t\tconst lastProbeNode = isForward ? nodeBeforeProbe : nodeAfterProbe;\n\t\tif (domEventData.shiftKey) {\n\t\t\tif (selectedElement && schema.isObject(selectedElement) || lastProbeNode && schema.isObject(lastProbeNode) || lastSelectedNode && schema.isObject(lastSelectedNode)) {\n\t\t\t\tmodel.change((writer) => {\n\t\t\t\t\twriter.setSelection(probe);\n\t\t\t\t});\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\teventInfo.stop();\n\t\t\t}\n\t\t} else if (lastProbeNode && schema.isObject(lastProbeNode)) {\n\t\t\tif (schema.isInline(lastProbeNode) && isVerticalNavigation) return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(lastProbeNode, \"on\");\n\t\t\t});\n\t\t\tdomEventData.preventDefault();\n\t\t\teventInfo.stop();\n\t\t}\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and prevents\n\t* the default browser behavior to make sure the fake selection is not being moved from a fake selection\n\t* container.\n\t*\n\t* See {@link #_handleSelectionChangeOnArrowKeyPress}.\n\t*/\n\t_preventDefaultOnArrowKeyPress(eventInfo, domEventData) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst objectElement = model.document.selection.getSelectedElement();\n\t\tif (objectElement && schema.isObject(objectElement)) {\n\t\t\tdomEventData.preventDefault();\n\t\t\teventInfo.stop();\n\t\t}\n\t}\n\t/**\n\t* Handles delete keys: backspace and delete.\n\t*\n\t* @param isForward Set to true if delete was performed in forward direction.\n\t* @returns Returns `true` if keys were handled correctly.\n\t*/\n\t_handleDelete(isForward) {\n\t\tconst modelSelection = this.editor.model.document.selection;\n\t\tif (!this.editor.model.canEditAt(modelSelection)) return;\n\t\tif (!modelSelection.isCollapsed) return;\n\t\tconst objectElement = this._getObjectElementNextToSelection(isForward);\n\t\tif (objectElement) {\n\t\t\tthis.editor.model.change((writer) => {\n\t\t\t\tlet previousNode = modelSelection.anchor.parent;\n\t\t\t\twhile (previousNode.isEmpty) {\n\t\t\t\t\tconst nodeToRemove = previousNode;\n\t\t\t\t\tpreviousNode = nodeToRemove.parent;\n\t\t\t\t\twriter.remove(nodeToRemove);\n\t\t\t\t}\n\t\t\t\tthis._setSelectionOverElement(objectElement);\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t}\n\t/**\n\t* Sets {@link module:engine/model/selection~ModelSelection document's selection} over given element.\n\t*\n\t* @internal\n\t*/\n\t_setSelectionOverElement(element) {\n\t\tthis.editor.model.change((writer) => {\n\t\t\twriter.setSelection(writer.createRangeOn(element));\n\t\t});\n\t}\n\t/**\n\t* Checks if {@link module:engine/model/element~ModelElement element} placed next to the current\n\t* {@link module:engine/model/selection~ModelSelection model selection} exists and is marked in\n\t* {@link module:engine/model/schema~ModelSchema schema} as `object`.\n\t*\n\t* @internal\n\t* @param forward Direction of checking.\n\t*/\n\t_getObjectElementNextToSelection(forward) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst probe = model.createSelection(modelSelection);\n\t\tmodel.modifySelection(probe, { direction: forward ? \"forward\" : \"backward\" });\n\t\tif (probe.isEqual(modelSelection)) return null;\n\t\tconst objectElement = forward ? probe.focus.nodeBefore : probe.focus.nodeAfter;\n\t\tif (objectElement && schema.isObject(objectElement)) return objectElement;\n\t\treturn null;\n\t}\n\t/**\n\t* Removes CSS class from previously selected widgets.\n\t*/\n\t_clearPreviouslySelectedWidgets(writer) {\n\t\tfor (const widget of this._previouslySelected) writer.removeClass(WIDGET_SELECTED_CLASS_NAME, widget);\n\t\tthis._previouslySelected.clear();\n\t}\n\t/**\n\t* Moves the document selection into the next editable or block widget.\n\t*/\n\t_selectNextEditable(direction) {\n\t\tconst editing = this.editor.editing;\n\t\tconst view = editing.view;\n\t\tconst model = this.editor.model;\n\t\tconst viewSelection = view.document.selection;\n\t\tconst modelSelection = model.document.selection;\n\t\tlet startPosition;\n\t\tif (modelSelection.rangeCount > 1) {\n\t\t\tconst selectionRange = modelSelection.isBackward ? modelSelection.getFirstRange() : modelSelection.getLastRange();\n\t\t\tstartPosition = editing.mapper.toViewPosition(direction == \"forward\" ? selectionRange.end : selectionRange.start);\n\t\t} else startPosition = direction == \"forward\" ? viewSelection.getFirstPosition() : viewSelection.getLastPosition();\n\t\tconst modelRange = this._findNextFocusRange(startPosition, direction);\n\t\tif (modelRange) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(modelRange);\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Looks for next focus point in the document starting from the given view position and direction.\n\t* The focus point is either a block widget or an editable.\n\t*\n\t* @internal\n\t*/\n\t_findNextFocusRange(startPosition, direction) {\n\t\tconst editing = this.editor.editing;\n\t\tconst view = editing.view;\n\t\tconst model = this.editor.model;\n\t\tconst viewSelection = view.document.selection;\n\t\tconst editableElement = viewSelection.editableElement;\n\t\tconst editablePath = editableElement.getPath();\n\t\tlet selectedElement = viewSelection.getSelectedElement();\n\t\tif (selectedElement && !isWidget(selectedElement)) selectedElement = null;\n\t\tconst viewRange = direction == \"forward\" ? view.createRange(startPosition, view.createPositionAt(startPosition.root, \"end\")) : view.createRange(view.createPositionAt(startPosition.root, 0), startPosition);\n\t\tfor (const { nextPosition } of viewRange.getWalker({ direction })) {\n\t\t\tconst item = nextPosition.parent;\n\t\t\tif (isWidget(item) && item != selectedElement) {\n\t\t\t\tconst modelElement = editing.mapper.toModelElement(item);\n\t\t\t\tif (!model.schema.isBlock(modelElement)) continue;\n\t\t\t\tif (compareArrays(editablePath, item.getPath()) != \"extension\") return model.createRangeOn(modelElement);\n\t\t\t} else if (item.is(\"editableElement\")) {\n\t\t\t\tif (item == editableElement && !selectedElement) continue;\n\t\t\t\tconst modelPosition = editing.mapper.toModelPosition(nextPosition);\n\t\t\t\tconst newRange = model.schema.getNearestSelectionRange(modelPosition, direction);\n\t\t\t\tif (!newRange) continue;\n\t\t\t\tif (item == editableElement && selectedElement) return newRange;\n\t\t\t\tif (compareArrays(editablePath, item.getPath()) != \"extension\") return model.createRangeIn(model.schema.getLimitElement(newRange));\n\t\t\t\treturn newRange;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Updates the document selection so that it selects first ancestor widget.\n\t*/\n\t_selectAncestorWidget() {\n\t\tconst editor = this.editor;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst positionParent = editor.editing.view.document.selection.getFirstPosition().parent;\n\t\tconst viewElement = (positionParent.is(\"$text\") ? positionParent.parent : positionParent).findAncestor(isWidget);\n\t\tif (!viewElement) return false;\n\t\tconst modelElement = mapper.toModelElement(viewElement);\n\t\tif (!modelElement) return false;\n\t\teditor.model.change((writer) => {\n\t\t\twriter.setSelection(modelElement, \"on\");\n\t\t});\n\t\treturn true;\n\t}\n};\n/**\n* Returns true if there is an object on an edge of the given selection.\n*/\nfunction hasObjectAtEdge(modelSelection, schema) {\n\tconst firstPosition = modelSelection.getFirstPosition();\n\tconst lastPosition = modelSelection.getLastPosition();\n\tconst firstSelectedNode = firstPosition.nodeAfter;\n\tconst lastSelectedNode = lastPosition.nodeBefore;\n\treturn !!firstSelectedNode && schema.isObject(firstSelectedNode) || !!lastSelectedNode && schema.isObject(lastSelectedNode);\n}\n/**\n* Returns new instance of the model selection adjusted for fake caret and selection direction on widgets.\n*/\nfunction getModelSelectionAdjusted(model, isForward) {\n\tconst modelSelection = model.document.selection;\n\tconst selectedElement = modelSelection.getSelectedElement();\n\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n\tif (selectedElement && typeAroundFakeCaretPosition == \"before\") return model.createSelection(selectedElement, \"before\");\n\telse if (selectedElement && typeAroundFakeCaretPosition == \"after\") return model.createSelection(selectedElement, \"after\");\n\treturn model.createSelection(modelSelection.getRanges(), { backward: !!selectedElement && model.schema.isObject(selectedElement) ? !isForward : modelSelection.isBackward });\n}\n/**\n* Finds the closest ancestor element that is either an editable element or a widget.\n*\n* @param element The element from which to start searching.\n* @returns The closest ancestor element that is either an editable element or a widget, or null if none is found.\n*/\nfunction findClosestEditableOrWidgetAncestor(element) {\n\tlet currentElement = element;\n\twhile (currentElement) {\n\t\tif (currentElement.is(\"editableElement\") || isWidget(currentElement)) return currentElement;\n\t\tcurrentElement = currentElement.parent;\n\t}\n\treturn null;\n}\n/**\n* Retrieves the ViewElement associated with a mouse event in the editing view.\n*\n* @param view The editing view.\n* @param domEventData The DOM event data containing the mouse event.\n* @returns The ViewElement associated with the mouse event, or null if not found.\n*/\nfunction getElementFromMouseEvent(view, domEventData) {\n\tconst domRange = getRangeFromMouseEvent(domEventData.domEvent);\n\tlet viewRange;\n\tif (domRange) viewRange = view.domConverter.domRangeToView(domRange);\n\telse viewRange = view.createRange(view.createPositionAt(domEventData.target, 0));\n\tif (!viewRange) return null;\n\tconst viewPosition = viewRange.start;\n\tif (!viewPosition.parent) return null;\n\tlet viewNode = viewPosition.parent;\n\tif (viewPosition.parent.is(\"editableElement\")) {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (viewPosition.isAtEnd && viewPosition.nodeBefore) viewNode = viewPosition.nodeBefore;\n\t\telse if (viewPosition.isAtStart && viewPosition.nodeAfter) viewNode = viewPosition.nodeAfter;\n\t}\n\tif (viewNode.is(\"$text\")) return viewNode.parent;\n\treturn viewNode;\n}\n/**\n* Checks whether the specified `element` is a child of the `parent` element.\n*\n* @param element An element to check.\n* @param parent A parent for the element.\n*/\nfunction isChild(element, parent) {\n\tif (!parent) return false;\n\treturn Array.from(element.getAncestors()).includes(parent);\n}\n/**\n* Returns nearest text block ancestor.\n*/\nfunction findTextBlockAncestor(modelElement, schema) {\n\tfor (const element of modelElement.getAncestors({\n\t\tincludeSelf: true,\n\t\tparentFirst: true\n\t})) {\n\t\tif (schema.checkChild(element, \"$text\")) return element;\n\t\tif (schema.isLimit(element) && !schema.isObject(element)) break;\n\t}\n\treturn null;\n}\n/**\n* Returns next text block where could put selection.\n*/\nfunction findNextTextBlock(position, schema) {\n\tconst treeWalker = new ModelTreeWalker({ startPosition: position });\n\tfor (const { item } of treeWalker) {\n\t\tif (schema.isLimit(item) || !item.is(\"element\")) return null;\n\t\tif (schema.checkChild(item, \"$text\")) return item;\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 widget/widgettoolbarrepository\n*/\n/**\n* Widget toolbar repository plugin. A central point for registering widget toolbars. This plugin handles the whole\n* toolbar rendering process and exposes a concise API.\n*\n* To add a toolbar for your widget use the {@link ~WidgetToolbarRepository#register `WidgetToolbarRepository#register()`} method.\n*\n* The following example comes from the {@link module:image/imagetoolbar~ImageToolbar} plugin:\n*\n* ```ts\n* class ImageToolbar extends Plugin {\n* \tstatic get requires(): PluginDependenciesOf<[ WidgetToolbarRepository ]> {\n* \t\treturn [ WidgetToolbarRepository ];\n* \t}\n*\n* \tafterInit() {\n* \t\tconst editor = this.editor;\n* \t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n*\n* \t\twidgetToolbarRepository.register( 'image', {\n* \t\t\titems: editor.config.get( 'image.toolbar' ),\n* \t\t\tgetRelatedElement: getClosestSelectedImageWidget\n* \t\t} );\n* \t}\n* }\n* ```\n*/\nvar WidgetToolbarRepository = class extends Plugin {\n\t/**\n\t* A map of toolbar definitions.\n\t*/\n\t_toolbarDefinitions = /* @__PURE__ */ new Map();\n\t_balloon;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"WidgetToolbarRepository\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tif (editor.plugins.has(\"BalloonToolbar\")) {\n\t\t\tconst balloonToolbar = editor.plugins.get(\"BalloonToolbar\");\n\t\t\tthis.listenTo(balloonToolbar, \"show\", (evt) => {\n\t\t\t\tif (isWidgetSelected(editor.editing.view.document.selection)) evt.stop();\n\t\t\t}, { priority: \"high\" });\n\t\t}\n\t\tthis._balloon = this.editor.plugins.get(\"ContextualBalloon\");\n\t\tthis.on(\"change:isEnabled\", () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t});\n\t\tthis.listenTo(editor.ui, \"update\", () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t});\n\t\tthis.listenTo(editor.ui.focusTracker, \"change:isFocused\", () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t}, { priority: \"low\" });\n\t}\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tfor (const toolbarConfig of this._toolbarDefinitions.values()) toolbarConfig.view.destroy();\n\t}\n\t/**\n\t* Registers toolbar in the WidgetToolbarRepository. It renders it in the `ContextualBalloon` based on the value of the invoked\n\t* `getRelatedElement` function. Toolbar items are gathered from `items` array.\n\t* The balloon's CSS class is by default `ck-toolbar-container` and may be override with the `balloonClassName` option.\n\t*\n\t* Note: This method should be called in the {@link module:core/plugin~PluginInterface#afterInit `Plugin#afterInit()`}\n\t* callback (or later) to make sure that the given toolbar items were already registered by other plugins.\n\t*\n\t* @param toolbarId An id for the toolbar. Used to\n\t* @param options Detailed options\n\t* @param options.ariaLabel Label used by assistive technologies to describe this toolbar element.\n\t* @param options.items Array of toolbar items.\n\t* @param options.getRelatedElement Callback which returns an element the toolbar should be attached to.\n\t* @param options.balloonClassName CSS class for the widget balloon.\n\t*/\n\tregister(toolbarId, { ariaLabel, items, getRelatedElement, balloonClassName = \"ck-toolbar-container\", positions }) {\n\t\tif (!items.length) {\n\t\t\t/**\n\t\t\t* When {@link module:widget/widgettoolbarrepository~WidgetToolbarRepository#register registering} a new widget toolbar, you\n\t\t\t* need to provide a non-empty array with the items that will be inserted into the toolbar.\n\t\t\t*\n\t\t\t* If you see this error when integrating the editor, you likely forgot to configure one of the widget toolbars.\n\t\t\t*\n\t\t\t* See for instance:\n\t\t\t*\n\t\t\t* * {@link module:table/tableconfig~TableConfig#contentToolbar `config.table.contentToolbar`}\n\t\t\t* * {@link module:image/imageconfig~ImageConfig#toolbar `config.image.toolbar`}\n\t\t\t*\n\t\t\t* @error widget-toolbar-no-items\n\t\t\t* @param {string} toolbarId The id of the toolbar that has not been configured correctly.\n\t\t\t*/\n\t\t\tlogWarning(\"widget-toolbar-no-items\", { toolbarId });\n\t\t\treturn;\n\t\t}\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst toolbarView = new ToolbarView(editor.locale);\n\t\ttoolbarView.ariaLabel = ariaLabel || t(\"Widget toolbar\");\n\t\tif (this._toolbarDefinitions.has(toolbarId))\n /**\n\t\t* Toolbar with the given id was already added.\n\t\t*\n\t\t* @error widget-toolbar-duplicated\n\t\t* @param {string} toolbarId Toolbar id.\n\t\t*/\n\t\tthrow new CKEditorError(\"widget-toolbar-duplicated\", this, { toolbarId });\n\t\tconst toolbarDefinition = {\n\t\t\tview: toolbarView,\n\t\t\tgetRelatedElement,\n\t\t\tballoonClassName,\n\t\t\titemsConfig: items,\n\t\t\tpositions,\n\t\t\tinitialized: false\n\t\t};\n\t\teditor.ui.addToolbar(toolbarView, {\n\t\t\tisContextual: true,\n\t\t\tbeforeFocus: () => {\n\t\t\t\tconst relatedElement = getRelatedElement(editor.editing.view.document.selection);\n\t\t\t\tif (relatedElement) this._showToolbar(toolbarDefinition, relatedElement);\n\t\t\t},\n\t\t\tafterBlur: () => {\n\t\t\t\tthis._hideToolbar(toolbarDefinition);\n\t\t\t}\n\t\t});\n\t\tthis._toolbarDefinitions.set(toolbarId, toolbarDefinition);\n\t}\n\t/**\n\t* Iterates over stored toolbars and makes them visible or hidden.\n\t*/\n\t_updateToolbarsVisibility() {\n\t\tlet maxRelatedElementDepth = 0;\n\t\tlet deepestRelatedElement = null;\n\t\tlet deepestToolbarDefinition = null;\n\t\tfor (const definition of this._toolbarDefinitions.values()) {\n\t\t\tconst relatedElement = definition.getRelatedElement(this.editor.editing.view.document.selection);\n\t\t\tif (!this.isEnabled || !relatedElement) {\n\t\t\t\tif (this._isToolbarInBalloon(definition)) this._hideToolbar(definition);\n\t\t\t} else if (!this.editor.ui.focusTracker.isFocused) {\n\t\t\t\tif (this._isToolbarVisible(definition)) this._hideToolbar(definition);\n\t\t\t} else {\n\t\t\t\tconst relatedElementDepth = relatedElement.getAncestors().length;\n\t\t\t\tif (relatedElementDepth > maxRelatedElementDepth) {\n\t\t\t\t\tmaxRelatedElementDepth = relatedElementDepth;\n\t\t\t\t\tdeepestRelatedElement = relatedElement;\n\t\t\t\t\tdeepestToolbarDefinition = definition;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (deepestToolbarDefinition) this._showToolbar(deepestToolbarDefinition, deepestRelatedElement);\n\t}\n\t/**\n\t* Hides the given toolbar.\n\t*/\n\t_hideToolbar(toolbarDefinition) {\n\t\tthis._balloon.remove(toolbarDefinition.view);\n\t\tthis.stopListening(this._balloon, \"change:visibleView\");\n\t}\n\t/**\n\t* Shows up the toolbar if the toolbar is not visible.\n\t* Otherwise, repositions the toolbar's balloon when toolbar's view is the most top view in balloon stack.\n\t*\n\t* It might happen here that the toolbar's view is under another view. Then do nothing as the other toolbar view\n\t* should be still visible after the {@link module:ui/editorui/editorui~EditorUI#event:update}.\n\t*/\n\t_showToolbar(toolbarDefinition, relatedElement) {\n\t\tif (this._isToolbarVisible(toolbarDefinition)) repositionContextualBalloon(this.editor, relatedElement, toolbarDefinition.positions);\n\t\telse if (!this._isToolbarInBalloon(toolbarDefinition)) {\n\t\t\tif (!toolbarDefinition.initialized) {\n\t\t\t\ttoolbarDefinition.initialized = true;\n\t\t\t\ttoolbarDefinition.view.fillFromConfig(toolbarDefinition.itemsConfig, this.editor.ui.componentFactory);\n\t\t\t}\n\t\t\tthis._balloon.add({\n\t\t\t\tview: toolbarDefinition.view,\n\t\t\t\tposition: getBalloonPositionData(this.editor, relatedElement, toolbarDefinition.positions),\n\t\t\t\tballoonClassName: toolbarDefinition.balloonClassName\n\t\t\t});\n\t\t\tthis.listenTo(this._balloon, \"change:visibleView\", () => {\n\t\t\t\tfor (const definition of this._toolbarDefinitions.values()) if (this._isToolbarVisible(definition)) {\n\t\t\t\t\tconst relatedElement = definition.getRelatedElement(this.editor.editing.view.document.selection);\n\t\t\t\t\trepositionContextualBalloon(this.editor, relatedElement, toolbarDefinition.positions);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t_isToolbarVisible(toolbar) {\n\t\treturn this._balloon.visibleView === toolbar.view;\n\t}\n\t_isToolbarInBalloon(toolbar) {\n\t\treturn this._balloon.hasView(toolbar.view);\n\t}\n};\nfunction repositionContextualBalloon(editor, relatedElement, positions) {\n\tconst balloon = editor.plugins.get(\"ContextualBalloon\");\n\tconst position = getBalloonPositionData(editor, relatedElement, positions);\n\tballoon.updatePosition(position);\n}\nfunction getBalloonPositionData(editor, relatedElement, positions) {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\treturn {\n\t\ttarget: editingView.domConverter.mapViewToDom(relatedElement),\n\t\tpositions: positions || [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\tdefaultPositions.viewportStickyNorth\n\t\t]\n\t};\n}\nfunction isWidgetSelected(selection) {\n\tconst viewElement = selection.getSelectedElement();\n\treturn !!(viewElement && isWidget(viewElement));\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 widget/widgetresize/resizerstate\n*/\nconst WidgetResizeStateBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Stores the internal state of a single resizable object.\n*/\nvar WidgetResizeState = class extends WidgetResizeStateBase {\n\t/**\n\t* The reference point of the resizer where the dragging started. It is used to measure the distance the user cursor\n\t* traveled, so how much the image should be enlarged.\n\t* This information is only known after the DOM was rendered, so it will be updated later.\n\t*\n\t* @internal\n\t*/\n\t_referenceCoordinates;\n\t/**\n\t* Resizer options.\n\t*/\n\t_options;\n\t/**\n\t* The original width (pixels) of the resized object when the resize process was started.\n\t*\n\t* @readonly\n\t*/\n\t_originalWidth;\n\t/**\n\t* The original height (pixels) of the resized object when the resize process was started.\n\t*\n\t* @readonly\n\t*/\n\t_originalHeight;\n\t/**\n\t* The original width (percents) of the resized object when the resize process was started.\n\t*\n\t* @readonly\n\t*/\n\t_originalWidthPercents;\n\t/**\n\t* A width to height ratio of the resized image.\n\t*\n\t* @readonly\n\t*/\n\t_aspectRatio;\n\t/**\n\t* @param options Resizer options.\n\t*/\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.set(\"activeHandlePosition\", null);\n\t\tthis.set(\"proposedWidthPercents\", null);\n\t\tthis.set(\"proposedWidth\", null);\n\t\tthis.set(\"proposedHeight\", null);\n\t\tthis.set(\"proposedHandleHostWidth\", null);\n\t\tthis.set(\"proposedHandleHostHeight\", null);\n\t\tthis._options = options;\n\t\tthis._referenceCoordinates = null;\n\t}\n\t/**\n\t* The original width (pixels) of the resized object when the resize process was started.\n\t*/\n\tget originalWidth() {\n\t\treturn this._originalWidth;\n\t}\n\t/**\n\t* The original height (pixels) of the resized object when the resize process was started.\n\t*/\n\tget originalHeight() {\n\t\treturn this._originalHeight;\n\t}\n\t/**\n\t* The original width (percents) of the resized object when the resize process was started.\n\t*/\n\tget originalWidthPercents() {\n\t\treturn this._originalWidthPercents;\n\t}\n\t/**\n\t* A width to height ratio of the resized image.\n\t*/\n\tget aspectRatio() {\n\t\treturn this._aspectRatio;\n\t}\n\t/**\n\t*\n\t* @param domResizeHandle The handle used to calculate the reference point.\n\t*/\n\tbegin(domResizeHandle, domHandleHost, domResizeHost) {\n\t\tconst clientRect = new Rect(domHandleHost);\n\t\tthis.activeHandlePosition = getHandlePosition(domResizeHandle);\n\t\tthis._referenceCoordinates = getAbsoluteBoundaryPoint(domHandleHost, getOppositePosition(this.activeHandlePosition));\n\t\tthis._originalWidth = clientRect.width;\n\t\tthis._originalHeight = clientRect.height;\n\t\tthis._aspectRatio = clientRect.width / clientRect.height;\n\t\tconst widthStyle = domResizeHost.style.width;\n\t\tif (widthStyle && widthStyle.match(/^\\d+(\\.\\d*)?%$/)) this._originalWidthPercents = parseFloat(widthStyle);\n\t\telse this._originalWidthPercents = calculateResizeHostPercentageWidth(domResizeHost, clientRect);\n\t}\n\tupdate(newSize) {\n\t\tthis.proposedWidth = newSize.width;\n\t\tthis.proposedHeight = newSize.height;\n\t\tthis.proposedWidthPercents = newSize.widthPercents;\n\t\tthis.proposedHandleHostWidth = newSize.handleHostWidth;\n\t\tthis.proposedHandleHostHeight = newSize.handleHostHeight;\n\t}\n};\n/**\n* Returns coordinates of the top-left corner of an element, relative to the document's top-left corner.\n*\n* @param resizerPosition The position of the resize handle, e.g. `\"top-left\"`, `\"bottom-right\"`.\n*/\nfunction getAbsoluteBoundaryPoint(element, resizerPosition) {\n\tconst elementRect = new Rect(element);\n\tconst positionParts = resizerPosition.split(\"-\");\n\tconst ret = {\n\t\tx: positionParts[1] == \"right\" ? elementRect.right : elementRect.left,\n\t\ty: positionParts[0] == \"bottom\" ? elementRect.bottom : elementRect.top\n\t};\n\tret.x += element.ownerDocument.defaultView.scrollX;\n\tret.y += element.ownerDocument.defaultView.scrollY;\n\treturn ret;\n}\n/**\n* @param resizerPosition The expected resizer position, like `\"top-left\"`, `\"bottom-right\"`.\n* @returns A prefixed HTML class name for the resizer element.\n*/\nfunction getResizerHandleClass(resizerPosition) {\n\treturn `ck-widget__resizer__handle-${resizerPosition}`;\n}\n/**\n* Determines the position of a given resize handle.\n*\n* @param domHandle Handle used to calculate the reference point.\n* @returns Returns a string like `\"top-left\"` or `undefined` if not matched.\n*/\nfunction getHandlePosition(domHandle) {\n\tfor (const position of [\n\t\t\"top-left\",\n\t\t\"top-right\",\n\t\t\"bottom-right\",\n\t\t\"bottom-left\"\n\t]) if (domHandle.classList.contains(getResizerHandleClass(position))) return position;\n}\n/**\n* @param position Like `\"top-left\"`.\n* @returns Inverted `position`, e.g. it returns `\"bottom-right\"` if `\"top-left\"` was given as `position`.\n*/\nfunction getOppositePosition(position) {\n\tconst parts = position.split(\"-\");\n\tconst replacements = {\n\t\ttop: \"bottom\",\n\t\tbottom: \"top\",\n\t\tleft: \"right\",\n\t\tright: \"left\"\n\t};\n\treturn `${replacements[parts[0]]}-${replacements[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 widget/widgetresize/sizeview\n*/\n/**\n* A view displaying the proposed new element size during the resizing.\n*\n* @internal\n*/\nvar SizeView = class extends View {\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-size-view\",\n\t\t\t\t\tbind.to(\"_viewPosition\", (value) => value ? `ck-orientation-${value}` : \"\")\n\t\t\t\t],\n\t\t\t\tstyle: { display: bind.if(\"_isVisible\", \"none\", (visible) => !visible) }\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"_label\") }]\n\t\t});\n\t}\n\t/**\n\t* A method used for binding the `SizeView` instance properties to the `ResizeState` instance observable properties.\n\t*\n\t* @internal\n\t* @param options An object defining the resizer options, used for setting the proper size label.\n\t* @param resizeState The `ResizeState` class instance, used for keeping the `SizeView` state up to date.\n\t*/\n\t_bindToState(options, resizeState) {\n\t\tthis.bind(\"_isVisible\").to(resizeState, \"proposedWidth\", resizeState, \"proposedHeight\", (width, height) => width !== null && height !== null);\n\t\tthis.bind(\"_label\").to(resizeState, \"proposedHandleHostWidth\", resizeState, \"proposedHandleHostHeight\", resizeState, \"proposedWidthPercents\", (width, height, widthPercents) => {\n\t\t\tif (options.unit === \"px\") return `${width}×${height}`;\n\t\t\telse return `${widthPercents}%`;\n\t\t});\n\t\tthis.bind(\"_viewPosition\").to(resizeState, \"activeHandlePosition\", resizeState, \"proposedHandleHostWidth\", resizeState, \"proposedHandleHostHeight\", (position, width, height) => width < 50 || height < 50 ? \"above-center\" : position);\n\t}\n\t/**\n\t* A method used for cleaning up. It removes the bindings and hides the view.\n\t*\n\t* @internal\n\t*/\n\t_dismiss() {\n\t\tthis.unbind();\n\t\tthis._isVisible = false;\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 widget/widgetresize/resizer\n*/\nconst WidgetResizerBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Represents a resizer for a single resizable object.\n*/\nvar WidgetResizer = class extends WidgetResizerBase {\n\t/**\n\t* Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t*\n\t* Note that a new state is created for each resize transaction.\n\t*/\n\t_state;\n\t/**\n\t* A view displaying the proposed new element size during the resizing.\n\t*/\n\t_sizeView;\n\t/**\n\t* Options passed to the {@link #constructor}.\n\t*/\n\t_options;\n\t/**\n\t* A wrapper that is controlled by the resizer. This is usually a widget element.\n\t*/\n\t_viewResizerWrapper = null;\n\t/**\n\t* The width of the resized {@link module:widget/widgetresize~WidgetResizerOptions#viewElement viewElement} before the resizing started.\n\t*/\n\t_initialViewWidth;\n\t/**\n\t* @param options Resizer options.\n\t*/\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis._options = options;\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isSelected\", false);\n\t\tthis.bind(\"isVisible\").to(this, \"isEnabled\", this, \"isSelected\", (isEnabled, isSelected) => isEnabled && isSelected);\n\t\tthis.decorate(\"begin\");\n\t\tthis.decorate(\"cancel\");\n\t\tthis.decorate(\"commit\");\n\t\tthis.decorate(\"updateSize\");\n\t\tthis.on(\"commit\", (event) => {\n\t\t\tif (!this.state.proposedWidth && !this.state.proposedWidthPercents) {\n\t\t\t\tthis._cleanup();\n\t\t\t\tevent.stop();\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t*\n\t* Note that a new state is created for each resize transaction.\n\t*/\n\tget state() {\n\t\treturn this._state;\n\t}\n\t/**\n\t* Makes resizer visible in the UI.\n\t*/\n\tshow() {\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\twriter.removeClass(\"ck-hidden\", this._viewResizerWrapper);\n\t\t});\n\t}\n\t/**\n\t* Hides resizer in the UI.\n\t*/\n\thide() {\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\twriter.addClass(\"ck-hidden\", this._viewResizerWrapper);\n\t\t});\n\t}\n\t/**\n\t* Attaches the resizer to the DOM.\n\t*/\n\tattach() {\n\t\tconst that = this;\n\t\tconst widgetElement = this._options.viewElement;\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\tconst viewResizerWrapper = writer.createUIElement(\"div\", { class: \"ck ck-reset_all ck-widget__resizer\" }, function(domDocument) {\n\t\t\t\tconst domElement = this.toDomElement(domDocument);\n\t\t\t\tthat._appendHandles(domElement);\n\t\t\t\tthat._appendSizeUI(domElement);\n\t\t\t\treturn domElement;\n\t\t\t});\n\t\t\twriter.insert(writer.createPositionAt(widgetElement, \"end\"), viewResizerWrapper);\n\t\t\twriter.addClass(\"ck-widget_with-resizer\", widgetElement);\n\t\t\tthis._viewResizerWrapper = viewResizerWrapper;\n\t\t\tif (!this.isVisible) this.hide();\n\t\t});\n\t\tthis.on(\"change:isVisible\", () => {\n\t\t\tif (this.isVisible) {\n\t\t\t\tthis.show();\n\t\t\t\tthis.redraw();\n\t\t\t} else this.hide();\n\t\t});\n\t}\n\t/**\n\t* Starts the resizing process.\n\t*\n\t* Creates a new {@link #state} for the current process.\n\t*\n\t* @fires begin\n\t* @param domResizeHandle Clicked handle.\n\t*/\n\tbegin(domResizeHandle) {\n\t\tthis._state = new WidgetResizeState(this._options);\n\t\tthis._sizeView._bindToState(this._options, this.state);\n\t\tthis._initialViewWidth = this._options.viewElement.getStyle(\"width\");\n\t\tthis.state.begin(domResizeHandle, this._getHandleHost(), this._getResizeHost());\n\t}\n\t/**\n\t* Updates the proposed size based on `domEventData`.\n\t*\n\t* @fires updateSize\n\t*/\n\tupdateSize(domEventData) {\n\t\tconst newSize = this._proposeNewSize(domEventData);\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\tconst unit = this._options.unit || \"%\";\n\t\t\tconst newWidth = (unit === \"%\" ? newSize.widthPercents : newSize.width) + unit;\n\t\t\twriter.setStyle(\"width\", newWidth, this._options.viewElement);\n\t\t});\n\t\tconst domHandleHost = this._getHandleHost();\n\t\tconst domHandleHostRect = new Rect(domHandleHost);\n\t\tconst handleHostWidth = Math.round(domHandleHostRect.width);\n\t\tconst handleHostHeight = Math.round(domHandleHostRect.height);\n\t\tconst domResizeHostRect = new Rect(domHandleHost);\n\t\tnewSize.width = Math.round(domResizeHostRect.width);\n\t\tnewSize.height = Math.round(domResizeHostRect.height);\n\t\tthis.redraw(domHandleHostRect);\n\t\tthis.state.update({\n\t\t\t...newSize,\n\t\t\thandleHostWidth,\n\t\t\thandleHostHeight\n\t\t});\n\t}\n\t/**\n\t* Applies the geometry proposed with the resizer.\n\t*\n\t* @fires commit\n\t*/\n\tcommit() {\n\t\tconst unit = this._options.unit || \"%\";\n\t\tconst newValue = (unit === \"%\" ? this.state.proposedWidthPercents : this.state.proposedWidth) + unit;\n\t\tthis._options.editor.editing.view.change(() => {\n\t\t\tthis._cleanup();\n\t\t\tthis._options.onCommit(newValue);\n\t\t});\n\t}\n\t/**\n\t* Cancels and rejects the proposed resize dimensions, hiding the UI.\n\t*\n\t* @fires cancel\n\t*/\n\tcancel() {\n\t\tthis._cleanup();\n\t}\n\t/**\n\t* Destroys the resizer.\n\t*/\n\tdestroy() {\n\t\tthis.cancel();\n\t}\n\t/**\n\t* Redraws the resizer.\n\t*\n\t* @param handleHostRect Handle host rectangle might be given to improve performance.\n\t*/\n\tredraw(handleHostRect) {\n\t\tconst domWrapper = this._domResizerWrapper;\n\t\tif (!existsInDom(domWrapper)) return;\n\t\tconst widgetWrapper = domWrapper.parentElement;\n\t\tconst handleHost = this._getHandleHost();\n\t\tconst resizerWrapper = this._viewResizerWrapper;\n\t\tconst currentDimensions = [\n\t\t\tresizerWrapper.getStyle(\"width\"),\n\t\t\tresizerWrapper.getStyle(\"height\"),\n\t\t\tresizerWrapper.getStyle(\"left\"),\n\t\t\tresizerWrapper.getStyle(\"top\")\n\t\t];\n\t\tlet newDimensions;\n\t\tif (widgetWrapper.isSameNode(handleHost)) {\n\t\t\tconst clientRect = handleHostRect || new Rect(handleHost);\n\t\t\tnewDimensions = [\n\t\t\t\tclientRect.width + \"px\",\n\t\t\t\tclientRect.height + \"px\",\n\t\t\t\tvoid 0,\n\t\t\t\tvoid 0\n\t\t\t];\n\t\t} else newDimensions = [\n\t\t\thandleHost.offsetWidth + \"px\",\n\t\t\thandleHost.offsetHeight + \"px\",\n\t\t\thandleHost.offsetLeft + \"px\",\n\t\t\thandleHost.offsetTop + \"px\"\n\t\t];\n\t\tif (compareArrays(currentDimensions, newDimensions) !== \"same\") this._options.editor.editing.view.change((writer) => {\n\t\t\twriter.setStyle({\n\t\t\t\twidth: newDimensions[0],\n\t\t\t\theight: newDimensions[1],\n\t\t\t\tleft: newDimensions[2],\n\t\t\t\ttop: newDimensions[3]\n\t\t\t}, resizerWrapper);\n\t\t});\n\t}\n\tcontainsHandle(domElement) {\n\t\treturn this._domResizerWrapper.contains(domElement);\n\t}\n\tstatic isResizeHandle(domElement) {\n\t\treturn domElement.classList.contains(\"ck-widget__resizer__handle\");\n\t}\n\t/**\n\t* Cleans up the context state.\n\t*/\n\t_cleanup() {\n\t\tthis._sizeView._dismiss();\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\twriter.setStyle(\"width\", this._initialViewWidth, this._options.viewElement);\n\t\t});\n\t}\n\t/**\n\t* Calculates the proposed size as the resize handles are dragged.\n\t*\n\t* @param domEventData Event data that caused the size update request. It should be used to calculate the proposed size.\n\t*/\n\t_proposeNewSize(domEventData) {\n\t\tconst state = this.state;\n\t\tconst currentCoordinates = extractCoordinates(domEventData);\n\t\tconst isCentered = this._options.isCentered ? this._options.isCentered(this) : true;\n\t\tconst enlargement = {\n\t\t\tx: state._referenceCoordinates.x - (currentCoordinates.x + state.originalWidth),\n\t\t\ty: currentCoordinates.y - state.originalHeight - state._referenceCoordinates.y\n\t\t};\n\t\tif (isCentered && state.activeHandlePosition.endsWith(\"-right\")) enlargement.x = currentCoordinates.x - (state._referenceCoordinates.x + state.originalWidth);\n\t\tif (isCentered) enlargement.x *= 2;\n\t\tlet width = Math.abs(state.originalWidth + enlargement.x);\n\t\tlet height = Math.abs(state.originalHeight + enlargement.y);\n\t\tif ((width / state.aspectRatio > height ? \"width\" : \"height\") == \"width\") height = width / state.aspectRatio;\n\t\telse width = height * state.aspectRatio;\n\t\treturn {\n\t\t\twidth: Math.round(width),\n\t\t\theight: Math.round(height),\n\t\t\twidthPercents: Math.min(Math.round(state.originalWidthPercents / state.originalWidth * width * 100) / 100, 100)\n\t\t};\n\t}\n\t/**\n\t* Obtains the resize host.\n\t*\n\t* Resize host is an object that receives dimensions which are the result of resizing.\n\t*/\n\t_getResizeHost() {\n\t\tconst widgetWrapper = this._domResizerWrapper.parentElement;\n\t\treturn this._options.getResizeHost(widgetWrapper);\n\t}\n\t/**\n\t* Obtains the handle host.\n\t*\n\t* Handle host is an object that the handles are aligned to.\n\t*\n\t* Handle host will not always be an entire widget itself. Take an image as an example. The image widget\n\t* contains an image and a caption. Only the image should be surrounded with handles.\n\t*/\n\t_getHandleHost() {\n\t\tconst widgetWrapper = this._domResizerWrapper.parentElement;\n\t\treturn this._options.getHandleHost(widgetWrapper);\n\t}\n\t/**\n\t* DOM container of the entire resize UI.\n\t*\n\t* Note that this property will have a value only after the element bound with the resizer is rendered\n\t* (otherwise `null`).\n\t*/\n\tget _domResizerWrapper() {\n\t\treturn this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper);\n\t}\n\t/**\n\t* Renders the resize handles in the DOM.\n\t*\n\t* @param domElement The resizer wrapper.\n\t*/\n\t_appendHandles(domElement) {\n\t\tfor (const currentPosition of [\n\t\t\t\"top-left\",\n\t\t\t\"top-right\",\n\t\t\t\"bottom-right\",\n\t\t\t\"bottom-left\"\n\t\t]) domElement.appendChild(new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: `ck-widget__resizer__handle ${getResizerClass(currentPosition)}` }\n\t\t}).render());\n\t}\n\t/**\n\t* Sets up the {@link #_sizeView} property and adds it to the passed `domElement`.\n\t*/\n\t_appendSizeUI(domElement) {\n\t\tthis._sizeView = new SizeView();\n\t\tthis._sizeView.render();\n\t\tdomElement.appendChild(this._sizeView.element);\n\t}\n};\n/**\n* @param resizerPosition Expected resizer position like `\"top-left\"`, `\"bottom-right\"`.\n* @returns A prefixed HTML class name for the resizer element\n*/\nfunction getResizerClass(resizerPosition) {\n\treturn `ck-widget__resizer__handle-${resizerPosition}`;\n}\nfunction extractCoordinates(event) {\n\treturn {\n\t\tx: event.pageX,\n\t\ty: event.pageY\n\t};\n}\nfunction existsInDom(element) {\n\treturn element && element.ownerDocument && element.ownerDocument.contains(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 widget/widgetresize\n*/\n/**\n* The widget resize feature plugin.\n*\n* Use the {@link module:widget/widgetresize~WidgetResize#attachTo} method to create a resizer for the specified widget.\n*/\nvar WidgetResize = class extends Plugin {\n\t/**\n\t* A map of resizers created using this plugin instance.\n\t*/\n\t_resizers = /* @__PURE__ */ new Map();\n\t_observer;\n\t_redrawSelectedResizerThrottled;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"WidgetResize\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editing = this.editor.editing;\n\t\tconst domDocument = global.window.document;\n\t\tthis.set(\"selectedResizer\", null);\n\t\tthis.set(\"_activeResizer\", null);\n\t\tediting.view.addObserver(MouseObserver);\n\t\tthis._observer = new (DomEmitterMixin())();\n\t\tthis.listenTo(editing.view.document, \"mousedown\", this._mouseDownListener.bind(this), { priority: \"high\" });\n\t\tthis._observer.listenTo(domDocument, \"mousemove\", this._mouseMoveListener.bind(this));\n\t\tthis._observer.listenTo(domDocument, \"mouseup\", this._mouseUpListener.bind(this));\n\t\tthis._redrawSelectedResizerThrottled = throttle(() => this.redrawSelectedResizer(), 200);\n\t\tthis.editor.ui.on(\"update\", this._redrawSelectedResizerThrottled);\n\t\tthis.editor.model.document.on(\"change\", () => {\n\t\t\tfor (const [viewElement, resizer] of this._resizers) if (!viewElement.isAttached()) {\n\t\t\t\tthis._resizers.delete(viewElement);\n\t\t\t\tresizer.destroy();\n\t\t\t}\n\t\t}, { priority: \"lowest\" });\n\t\tthis._observer.listenTo(global.window, \"resize\", this._redrawSelectedResizerThrottled);\n\t\tconst viewSelection = this.editor.editing.view.document.selection;\n\t\tviewSelection.on(\"change\", () => {\n\t\t\tconst selectedElement = viewSelection.getSelectedElement();\n\t\t\tconst resizer = this.getResizerByViewElement(selectedElement) || null;\n\t\t\tif (resizer) this.select(resizer);\n\t\t\telse this.deselect();\n\t\t});\n\t}\n\t/**\n\t* Redraws the selected resizer if there is any selected resizer and if it is visible.\n\t*/\n\tredrawSelectedResizer() {\n\t\tif (this.selectedResizer && this.selectedResizer.isVisible) this.selectedResizer.redraw();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._observer.stopListening();\n\t\tfor (const resizer of this._resizers.values()) resizer.destroy();\n\t\tthis._redrawSelectedResizerThrottled.cancel();\n\t}\n\t/**\n\t* Marks resizer as selected.\n\t*/\n\tselect(resizer) {\n\t\tthis.deselect();\n\t\tthis.selectedResizer = resizer;\n\t\tthis.selectedResizer.isSelected = true;\n\t}\n\t/**\n\t* Deselects currently set resizer.\n\t*/\n\tdeselect() {\n\t\tif (this.selectedResizer) this.selectedResizer.isSelected = false;\n\t\tthis.selectedResizer = null;\n\t}\n\t/**\n\t* @param options Resizer options.\n\t*/\n\tattachTo(options) {\n\t\tconst resizer = new WidgetResizer(options);\n\t\tconst plugins = this.editor.plugins;\n\t\tresizer.attach();\n\t\tif (plugins.has(\"WidgetToolbarRepository\")) {\n\t\t\tconst widgetToolbarRepository = plugins.get(\"WidgetToolbarRepository\");\n\t\t\tresizer.on(\"begin\", () => {\n\t\t\t\twidgetToolbarRepository.forceDisabled(\"resize\");\n\t\t\t}, { priority: \"lowest\" });\n\t\t\tresizer.on(\"cancel\", () => {\n\t\t\t\twidgetToolbarRepository.clearForceDisabled(\"resize\");\n\t\t\t}, { priority: \"highest\" });\n\t\t\tresizer.on(\"commit\", () => {\n\t\t\t\twidgetToolbarRepository.clearForceDisabled(\"resize\");\n\t\t\t}, { priority: \"highest\" });\n\t\t}\n\t\tthis._resizers.set(options.viewElement, resizer);\n\t\tconst selectedElement = this.editor.editing.view.document.selection.getSelectedElement();\n\t\tif (this.getResizerByViewElement(selectedElement) == resizer) this.select(resizer);\n\t\treturn resizer;\n\t}\n\t/**\n\t* Returns a resizer created for a given view element (widget element).\n\t*\n\t* @param viewElement View element associated with the resizer.\n\t*/\n\tgetResizerByViewElement(viewElement) {\n\t\treturn this._resizers.get(viewElement);\n\t}\n\t/**\n\t* Returns a resizer that contains a given resize handle.\n\t*/\n\t_getResizerByHandle(domResizeHandle) {\n\t\tfor (const resizer of this._resizers.values()) if (resizer.containsHandle(domResizeHandle)) return resizer;\n\t}\n\t/**\n\t* @param domEventData Native DOM event.\n\t*/\n\t_mouseDownListener(event, domEventData) {\n\t\tconst resizeHandle = domEventData.domTarget;\n\t\tif (!WidgetResizer.isResizeHandle(resizeHandle)) return;\n\t\tthis._activeResizer = this._getResizerByHandle(resizeHandle) || null;\n\t\tif (this._activeResizer) {\n\t\t\tthis._activeResizer.begin(resizeHandle);\n\t\t\tevent.stop();\n\t\t\tdomEventData.preventDefault();\n\t\t}\n\t}\n\t/**\n\t* @param domEventData Native DOM event.\n\t*/\n\t_mouseMoveListener(event, domEventData) {\n\t\tif (this._activeResizer) this._activeResizer.updateSize(domEventData);\n\t}\n\t_mouseUpListener() {\n\t\tif (this._activeResizer) {\n\t\t\tthis._activeResizer.commit();\n\t\t\tthis._activeResizer = 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\nexport { WIDGET_CLASS_NAME, WIDGET_SELECTED_CLASS_NAME, Widget, WidgetHighlightStack, WidgetResize, WidgetResizeState, WidgetResizer, WidgetToolbarRepository, WidgetTypeAround, TYPE_AROUND_SELECTION_ATTRIBUTE as _WIDGET_TYPE_AROUND_SELECTION_ATTRIBUTE, SizeView as _WidgetSizeView, getClosestTypeAroundDomButton as _getClosestWidgetTypeAroundDomButton, getClosestWidgetViewElement as _getClosestWidgetViewElement, getTypeAroundButtonPosition as _getWidgetTypeAroundButtonPosition, getTypeAroundFakeCaretPosition as _getWidgetTypeAroundFakeCaretPosition, calculateResizeHostAncestorWidth, calculateResizeHostPercentageWidth, findOptimalInsertionRange, getLabel, isTypeAroundWidget, isWidget, setHighlightHandling, setLabel, toWidget, toWidgetEditable, verticalWidgetNavigationHandler, viewToModelPositionOutsideModelElement };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module widget/highlightstack\n */\n\nimport { EmitterMixin, type ArrayOrItem, type EmitterMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport type { ViewDowncastWriter, DowncastHighlightDescriptor } from '@ckeditor/ckeditor5-engine';\n\nconst WidgetHighlightStackBase: EmitterMixinConstructor = /* #__PURE__ */ EmitterMixin();\n\n/**\n * Class used to handle the correct order of highlights on elements.\n *\n * When different highlights are applied to same element the correct order should be preserved:\n *\n * * highlight with highest priority should be applied,\n * * if two highlights have same priority - sort by CSS class provided in\n * {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor}.\n *\n * This way, highlight will be applied with the same rules it is applied on texts.\n */\nexport class WidgetHighlightStack extends WidgetHighlightStackBase {\n\tprivate readonly _stack: Array<DowncastHighlightDescriptor> = [];\n\n\t/**\n\t * Adds highlight descriptor to the stack.\n\t *\n\t * @fires change:top\n\t */\n\tpublic add( descriptor: DowncastHighlightDescriptor, writer: ViewDowncastWriter ): void {\n\t\tconst stack = this._stack;\n\n\t\t// Save top descriptor and insert new one. If top is changed - fire event.\n\t\tconst oldTop = stack[ 0 ];\n\t\tthis._insertDescriptor( descriptor );\n\t\tconst newTop = stack[ 0 ];\n\n\t\t// When new object is at the top and stores different information.\n\t\tif ( oldTop !== newTop && !compareDescriptors( oldTop, newTop ) ) {\n\t\t\tthis.fire<WidgetHighlightStackChangeEvent>( 'change:top', {\n\t\t\t\toldDescriptor: oldTop,\n\t\t\t\tnewDescriptor: newTop,\n\t\t\t\twriter\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Removes highlight descriptor from the stack.\n\t *\n\t * @fires change:top\n\t * @param id Id of the descriptor to remove.\n\t */\n\tpublic remove( id: string, writer: ViewDowncastWriter ): void {\n\t\tconst stack = this._stack;\n\n\t\tconst oldTop = stack[ 0 ];\n\t\tthis._removeDescriptor( id );\n\t\tconst newTop = stack[ 0 ];\n\n\t\t// When new object is at the top and stores different information.\n\t\tif ( oldTop !== newTop && !compareDescriptors( oldTop, newTop ) ) {\n\t\t\tthis.fire<WidgetHighlightStackChangeEvent>( 'change:top', {\n\t\t\t\toldDescriptor: oldTop,\n\t\t\t\tnewDescriptor: newTop,\n\t\t\t\twriter\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Inserts a given descriptor in correct place in the stack. It also takes care about updating information\n\t * when descriptor with same id is already present.\n\t */\n\tprivate _insertDescriptor( descriptor: DowncastHighlightDescriptor ) {\n\t\tconst stack = this._stack;\n\t\tconst index = stack.findIndex( item => item.id === descriptor.id );\n\n\t\t// Inserting exact same descriptor - do nothing.\n\t\tif ( compareDescriptors( descriptor, stack[ index ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If descriptor with same id but with different information is on the stack - remove it.\n\t\tif ( index > -1 ) {\n\t\t\tstack.splice( index, 1 );\n\t\t}\n\n\t\t// Find correct place to insert descriptor in the stack.\n\t\t// It has different information (for example priority) so it must be re-inserted in correct place.\n\t\tlet i = 0;\n\n\t\twhile ( stack[ i ] && shouldABeBeforeB( stack[ i ], descriptor ) ) {\n\t\t\ti++;\n\t\t}\n\n\t\tstack.splice( i, 0, descriptor );\n\t}\n\n\t/**\n\t * Removes descriptor with given id from the stack.\n\t *\n\t * @param id Descriptor's id.\n\t */\n\tprivate _removeDescriptor( id: string ) {\n\t\tconst stack = this._stack;\n\t\tconst index = stack.findIndex( item => item.id === id );\n\n\t\t// If descriptor with same id is on the list - remove it.\n\t\tif ( index > -1 ) {\n\t\t\tstack.splice( index, 1 );\n\t\t}\n\t}\n}\n\n/**\n * Compares two descriptors by checking their priority and class list.\n *\n * @returns Returns true if both descriptors are defined and have same priority and classes.\n */\nfunction compareDescriptors( a: DowncastHighlightDescriptor, b: DowncastHighlightDescriptor ) {\n\treturn a && b && a.priority == b.priority && classesToString( a.classes ) == classesToString( b.classes );\n}\n\n/**\n * Checks whenever first descriptor should be placed in the stack before second one.\n */\nfunction shouldABeBeforeB( a: DowncastHighlightDescriptor, b: DowncastHighlightDescriptor ) {\n\tif ( a.priority! > b.priority! ) {\n\t\treturn true;\n\t} else if ( a.priority! < b.priority! ) {\n\t\treturn false;\n\t}\n\n\t// When priorities are equal and names are different - use classes to compare.\n\treturn classesToString( a.classes ) > classesToString( b.classes );\n}\n\n/**\n * Converts CSS classes passed with {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor} to\n * sorted string.\n */\nfunction classesToString( classes: ArrayOrItem<string> ) {\n\treturn Array.isArray( classes ) ? classes.sort().join( ',' ) : classes;\n}\n\n/**\n * Fired when top element on {@link module:widget/highlightstack~WidgetHighlightStack} has been changed\n *\n * @eventName ~WidgetHighlightStack#change:top\n */\nexport type WidgetHighlightStackChangeEvent = {\n\tname: 'change' | 'change:top';\n\targs: [ WidgetHighlightStackChangeEventData ];\n};\n\n/**\n * Additional information about the change.\n */\nexport type WidgetHighlightStackChangeEventData = {\n\n\t/**\n\t * Old highlight descriptor. It will be `undefined` when first descriptor is added to the stack.\n\t */\n\toldDescriptor: DowncastHighlightDescriptor;\n\n\t/**\n\t * New highlight descriptor. It will be `undefined` when last descriptor is removed from the stack.\n\t */\n\tnewDescriptor: DowncastHighlightDescriptor;\n\n\t/**\n\t * View writer that can be used to modify element.\n\t */\n\twriter: ViewDowncastWriter;\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/**\n * @module widget/utils\n */\n\nimport { IconDragHandle } from '@ckeditor/ckeditor5-icons';\nimport {\n\tRect,\n\tCKEditorError,\n\ttoArray,\n\ttype ObservableChangeEvent,\n\ttype GetCallback\n} from '@ckeditor/ckeditor5-utils';\n\nimport {\n\ttype DowncastAddHighlightCallback,\n\ttype DowncastHighlightDescriptor,\n\ttype DowncastRemoveHighlightCallback,\n\ttype MapperViewToModelPositionEvent,\n\ttype ModelDocumentSelection,\n\ttype ViewDowncastWriter,\n\ttype Model,\n\ttype ModelRange,\n\ttype ModelSelection,\n\ttype ViewContainerElement,\n\ttype ViewEditableElement,\n\ttype ViewElement,\n\ttype ViewTypeCheckable\n} from '@ckeditor/ckeditor5-engine';\n\nimport { IconView } from '@ckeditor/ckeditor5-ui';\n\nimport { WidgetHighlightStack, type WidgetHighlightStackChangeEvent } from './highlightstack.js';\nimport { getTypeAroundFakeCaretPosition } from './widgettypearound/utils.js';\n\n/**\n * CSS class added to each widget element.\n */\nexport const WIDGET_CLASS_NAME = 'ck-widget';\n\n/**\n * CSS class added to currently selected widget element.\n */\nexport const WIDGET_SELECTED_CLASS_NAME = 'ck-widget_selected';\n\n/**\n * Returns `true` if given {@link module:engine/view/node~ViewNode} is an {@link module:engine/view/element~ViewElement} and a widget.\n */\nexport function isWidget( node: ViewTypeCheckable ): boolean {\n\tif ( !node.is( 'element' ) ) {\n\t\treturn false;\n\t}\n\n\treturn !!node.getCustomProperty( 'widget' );\n}\n\n/**\n * Converts the given {@link module:engine/view/element~ViewElement} to a widget in the following way:\n *\n * * sets the `contenteditable` attribute to `\"false\"`,\n * * adds the `ck-widget` CSS class,\n * * adds a custom {@link module:engine/view/element~ViewElement#getFillerOffset `getFillerOffset()`} method returning `null`,\n * * adds a custom property allowing to recognize widget elements by using {@link ~isWidget `isWidget()`},\n * * implements the {@link ~setHighlightHandling view highlight on widgets}.\n *\n * This function needs to be used in conjunction with\n * {@link module:engine/conversion/downcasthelpers~DowncastHelpers downcast conversion helpers}\n * like {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n * Moreover, typically you will want to use `toWidget()` only for `editingDowncast`, while keeping the `dataDowncast` clean.\n *\n * For example, in order to convert a `<widget>` model element to `<div class=\"widget\">` in the view, you can define\n * such converters:\n *\n * ```ts\n * editor.conversion.for( 'editingDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'widget',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\tconst div = writer.createContainerElement( 'div', { class: 'widget' } );\n *\n * \t\t\treturn toWidget( div, writer, { label: 'some widget' } );\n * \t\t}\n * \t} );\n *\n * editor.conversion.for( 'dataDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'widget',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\treturn writer.createContainerElement( 'div', { class: 'widget' } );\n * \t\t}\n * \t} );\n * ```\n *\n * See the full source code of the widget (with a nested editable) schema definition and converters in\n * [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n *\n * @param options Additional options.\n * @param options.label Element's label provided to the {@link ~setLabel} function. It can be passed as\n * a plain string or a function returning a string. It represents the widget for assistive technologies (like screen readers).\n * @param options.hasSelectionHandle If `true`, the widget will have a selection handle added.\n * @returns Returns the same element.\n */\nexport function toWidget(\n\telement: ViewElement,\n\twriter: ViewDowncastWriter,\n\toptions: {\n\t\tlabel?: string | ( () => string );\n\t\thasSelectionHandle?: boolean;\n\t} = {}\n): ViewElement {\n\tif ( !element.is( 'containerElement' ) ) {\n\t\t/**\n\t\t * The element passed to `toWidget()` must be a {@link module:engine/view/containerelement~ViewContainerElement}\n\t\t * instance.\n\t\t *\n\t\t * @error widget-to-widget-wrong-element-type\n\t\t * @param {any} element The view element passed to `toWidget()`.\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'widget-to-widget-wrong-element-type',\n\t\t\tnull,\n\t\t\t{ element }\n\t\t);\n\t}\n\n\twriter.setAttribute( 'contenteditable', 'false', element );\n\n\twriter.addClass( WIDGET_CLASS_NAME, element );\n\twriter.setCustomProperty( 'widget', true, element );\n\telement.getFillerOffset = getFillerOffset;\n\n\twriter.setCustomProperty( 'widgetLabel', [], element );\n\n\tif ( options.label ) {\n\t\tsetLabel( element, options.label );\n\t}\n\n\tif ( options.hasSelectionHandle ) {\n\t\taddSelectionHandle( element, writer );\n\t}\n\n\tsetHighlightHandling( element, writer );\n\n\treturn element;\n}\n\n/**\n * Default handler for adding a highlight on a widget.\n * It adds CSS class and attributes basing on the given highlight descriptor.\n */\nfunction addHighlight( element: ViewElement, descriptor: DowncastHighlightDescriptor, writer: ViewDowncastWriter ) {\n\tif ( descriptor.classes ) {\n\t\twriter.addClass( toArray( descriptor.classes ), element );\n\t}\n\n\tif ( descriptor.attributes ) {\n\t\tfor ( const key in descriptor.attributes ) {\n\t\t\twriter.setAttribute( key, descriptor.attributes[ key ], element );\n\t\t}\n\t}\n}\n\n/**\n * Default handler for removing a highlight from a widget.\n * It removes CSS class and attributes basing on the given highlight descriptor.\n */\nfunction removeHighlight( element: ViewElement, descriptor: DowncastHighlightDescriptor, writer: ViewDowncastWriter ) {\n\tif ( descriptor.classes ) {\n\t\twriter.removeClass( toArray( descriptor.classes ), element );\n\t}\n\n\tif ( descriptor.attributes ) {\n\t\tfor ( const key in descriptor.attributes ) {\n\t\t\twriter.removeAttribute( key, element );\n\t\t}\n\t}\n}\n\n/**\n * Sets highlight handling methods. Uses {@link module:widget/highlightstack~WidgetHighlightStack} to\n * properly determine which highlight descriptor should be used at given time.\n */\nexport function setHighlightHandling(\n\telement: ViewElement,\n\twriter: ViewDowncastWriter,\n\tadd: ( element: ViewElement, descriptor: DowncastHighlightDescriptor, writer: ViewDowncastWriter ) => void = addHighlight,\n\tremove: ( element: ViewElement, descriptor: DowncastHighlightDescriptor, writer: ViewDowncastWriter ) => void = removeHighlight\n): void {\n\tconst stack = new WidgetHighlightStack();\n\n\tstack.on<WidgetHighlightStackChangeEvent>( 'change:top', ( evt, data ) => {\n\t\tif ( data.oldDescriptor ) {\n\t\t\tremove( element, data.oldDescriptor, data.writer );\n\t\t}\n\n\t\tif ( data.newDescriptor ) {\n\t\t\tadd( element, data.newDescriptor, data.writer );\n\t\t}\n\t} );\n\n\tconst addHighlightCallback: DowncastAddHighlightCallback = ( element, descriptor, writer ) => stack.add( descriptor, writer );\n\tconst removeHighlightCallback: DowncastRemoveHighlightCallback = ( element, id, writer ) => stack.remove( id, writer );\n\n\twriter.setCustomProperty( 'addHighlight', addHighlightCallback, element );\n\twriter.setCustomProperty( 'removeHighlight', removeHighlightCallback, element );\n}\n\n/**\n * Sets label for given element.\n * It can be passed as a plain string or a function returning a string. Function will be called each time label is retrieved by\n * {@link ~getLabel `getLabel()`}.\n */\nexport function setLabel( element: ViewElement, labelOrCreator: string | ( () => string ) ): void {\n\tconst widgetLabel = element.getCustomProperty( 'widgetLabel' ) as Array<string | ( () => string )>;\n\n\twidgetLabel.push( labelOrCreator );\n}\n\n/**\n * Returns the label of the provided element.\n */\nexport function getLabel( element: ViewElement ): string {\n\tconst widgetLabel = element.getCustomProperty( 'widgetLabel' ) as Array<string | ( () => string )>;\n\n\treturn widgetLabel.reduce( ( prev: string, current: string | ( () => string ) ) => {\n\t\tif ( typeof current === 'function' ) {\n\t\t\treturn prev ? prev + '. ' + current() : current();\n\t\t} else {\n\t\t\treturn prev ? prev + '. ' + current : current;\n\t\t}\n\t}, '' );\n}\n\n/**\n * Adds functionality to the provided {@link module:engine/view/editableelement~ViewEditableElement} to act as a widget's editable:\n *\n * * sets the `contenteditable` attribute to `true` when\n * {@link module:engine/view/editableelement~ViewEditableElement#isReadOnly} is `false`,\n * otherwise sets it to `false`,\n * * adds the `ck-editor__editable` and `ck-editor__nested-editable` CSS classes,\n * * adds the `ck-editor__nested-editable_focused` CSS class when the editable is focused and removes it when it is blurred.\n * * implements the {@link ~setHighlightHandling view highlight on widget's editable}.\n * * sets the `role` attribute to `textbox` for accessibility purposes.\n *\n * Similarly to {@link ~toWidget `toWidget()`} this function should be used in `editingDowncast` only and it is usually\n * used together with {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n *\n * For example, in order to convert a `<nested>` model element to `<div class=\"nested\">` in the view, you can define\n * such converters:\n *\n * ```ts\n * editor.conversion.for( 'editingDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'nested',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\tconst div = writer.createEditableElement( 'div', { class: 'nested' } );\n *\n * \t\t\treturn toWidgetEditable( nested, writer, { label: 'label for editable' } );\n * \t\t}\n * \t} );\n *\n * editor.conversion.for( 'dataDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'nested',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\treturn writer.createContainerElement( 'div', { class: 'nested' } );\n * \t\t}\n * \t} );\n * ```\n *\n * See the full source code of the widget (with nested editable) schema definition and converters in\n * [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n *\n * @param options Additional options.\n * @param options.label Editable's label used by assistive technologies (e.g. screen readers).\n * @param options.withAriaRole Whether to add the role=\"textbox\" attribute on the editable. Defaults to `true`.\n * @returns Returns the same element that was provided in the `editable` parameter\n */\nexport function toWidgetEditable(\n\teditable: ViewEditableElement,\n\twriter: ViewDowncastWriter,\n\toptions: {\n\t\tlabel?: string;\n\t\twithAriaRole?: boolean;\n\t} = {}\n): ViewEditableElement {\n\twriter.addClass( [ 'ck-editor__editable', 'ck-editor__nested-editable' ], editable );\n\n\t// Set role=\"textbox\" only if explicitly requested (defaults to true for backward compatibility).\n\tif ( options.withAriaRole !== false ) {\n\t\twriter.setAttribute( 'role', 'textbox', editable );\n\t}\n\n\t// Setting tabindex=-1 on contenteditable=false makes it focusable. It propagates focus to the editable\n\t// element and makes it possible to highlight nested editables as focused. It's not what we want\n\t// for read-only editables though.\n\t// See more: https://github.com/ckeditor/ckeditor5/issues/18965\n\tif ( !editable.isReadOnly ) {\n\t\twriter.setAttribute( 'tabindex', '-1', editable );\n\t}\n\n\tif ( options.label ) {\n\t\twriter.setAttribute( 'aria-label', options.label, editable );\n\t}\n\n\t// Set initial contenteditable value.\n\twriter.setAttribute( 'contenteditable', editable.isReadOnly ? 'false' : 'true', editable );\n\n\t// Bind the contenteditable property to element#isReadOnly.\n\teditable.on<ObservableChangeEvent<boolean>>( 'change:isReadOnly', ( evt, property, isReadonly ) => {\n\t\twriter.setAttribute( 'contenteditable', isReadonly ? 'false' : 'true', editable );\n\n\t\tif ( isReadonly ) {\n\t\t\twriter.removeAttribute( 'tabindex', editable );\n\t\t} else {\n\t\t\twriter.setAttribute( 'tabindex', '-1', editable );\n\t\t}\n\t} );\n\n\teditable.on<ObservableChangeEvent<boolean>>( 'change:isFocused', ( evt, property, is ) => {\n\t\tif ( is ) {\n\t\t\twriter.addClass( 'ck-editor__nested-editable_focused', editable );\n\t\t} else {\n\t\t\twriter.removeClass( 'ck-editor__nested-editable_focused', editable );\n\t\t}\n\t} );\n\n\tsetHighlightHandling( editable, writer );\n\n\treturn editable;\n}\n\n/**\n * Returns a model range which is optimal (in terms of UX) for inserting a widget block.\n *\n * For instance, if a selection is in the middle of a paragraph, the collapsed range before this paragraph\n * will be returned so that it is not split. If the selection is at the end of a paragraph,\n * the collapsed range after this paragraph will be returned.\n *\n * Note: If the selection is placed in an empty block, the range in that block will be returned. If that range\n * is then passed to {@link module:engine/model/model~Model#insertContent}, the block will be fully replaced\n * by the inserted widget block.\n *\n * @param selection The selection based on which the insertion position should be calculated.\n * @param model Model instance.\n * @returns The optimal range.\n */\nexport function findOptimalInsertionRange(\n\tselection: ModelSelection | ModelDocumentSelection,\n\tmodel: Model\n): ModelRange {\n\tconst selectedElement = selection.getSelectedElement();\n\n\tif ( selectedElement ) {\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( selection );\n\n\t\t// If the WidgetTypeAround \"fake caret\" is displayed, use its position for the insertion\n\t\t// to provide the most predictable UX (https://github.com/ckeditor/ckeditor5/issues/7438).\n\t\tif ( typeAroundFakeCaretPosition ) {\n\t\t\treturn model.createRange( model.createPositionAt( selectedElement, typeAroundFakeCaretPosition ) );\n\t\t}\n\t}\n\n\treturn model.schema.findOptimalInsertionRange( selection );\n}\n\n/**\n * A util to be used in order to map view positions to correct model positions when implementing a widget\n * which renders non-empty view element for an empty model element.\n *\n * For example:\n *\n * ```\n * // Model:\n * <placeholder type=\"name\"></placeholder>\n *\n * // View:\n * <span class=\"placeholder\">name</span>\n * ```\n *\n * In such case, view positions inside `<span>` cannot be correctly mapped to the model (because the model element is empty).\n * To handle mapping positions inside `<span class=\"placeholder\">` to the model use this util as follows:\n *\n * ```ts\n * editor.editing.mapper.on(\n * \t'viewToModelPosition',\n * \tviewToModelPositionOutsideModelElement( model, viewElement => viewElement.hasClass( 'placeholder' ) )\n * );\n * ```\n *\n * The callback will try to map the view offset of selection to an expected model position.\n *\n * 1. When the position is at the end (or in the middle) of the inline widget:\n *\n * ```\n * // View:\n * <p>foo <span class=\"placeholder\">name|</span> bar</p>\n *\n * // Model:\n * <paragraph>foo <placeholder type=\"name\"></placeholder>| bar</paragraph>\n * ```\n *\n * 2. When the position is at the beginning of the inline widget:\n *\n * ```\n * // View:\n * <p>foo <span class=\"placeholder\">|name</span> bar</p>\n *\n * // Model:\n * <paragraph>foo |<placeholder type=\"name\"></placeholder> bar</paragraph>\n * ```\n *\n * @param model Model instance on which the callback operates.\n * @param viewElementMatcher Function that is passed a view element and should return `true` if the custom mapping\n * should be applied to the given view element.\n */\nexport function viewToModelPositionOutsideModelElement(\n\tmodel: Model,\n\tviewElementMatcher: ( element: ViewElement ) => boolean\n): GetCallback<MapperViewToModelPositionEvent> {\n\treturn ( evt, data ) => {\n\t\tconst { mapper, viewPosition } = data;\n\n\t\tconst viewParent = mapper.findMappedViewAncestor( viewPosition );\n\n\t\tif ( !viewElementMatcher( viewParent ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelParent = mapper.toModelElement( viewParent );\n\n\t\tdata.modelPosition = model.createPositionAt( modelParent!, viewPosition.isAtStart ? 'before' : 'after' );\n\t};\n}\n\n/**\n * Default filler offset function applied to all widget elements.\n */\nfunction getFillerOffset() {\n\treturn null;\n}\n\n/**\n * Adds a drag handle to the widget.\n */\nfunction addSelectionHandle( widgetElement: ViewContainerElement, writer: ViewDowncastWriter ) {\n\tconst selectionHandle = writer.createUIElement( 'div', { class: 'ck ck-widget__selection-handle' }, function( domDocument ) {\n\t\tconst domElement = this.toDomElement( domDocument );\n\n\t\t// Use the IconView from the ui library.\n\t\tconst icon = new IconView();\n\t\ticon.set( 'content', IconDragHandle );\n\n\t\t// Render the icon view right away to append its #element to the selectionHandle DOM element.\n\t\ticon.render();\n\n\t\tdomElement.appendChild( icon.element! );\n\n\t\treturn domElement;\n\t} );\n\n\t// Append the selection handle into the widget wrapper.\n\twriter.insert( writer.createPositionAt( widgetElement, 0 ), selectionHandle );\n\twriter.addClass( [ 'ck-widget_with-selection-handle' ], widgetElement );\n}\n\n/**\n * Starting from a DOM resize host element (an element that receives dimensions as a result of resizing),\n * this helper returns the width of the found ancestor element.\n *\n *\t* It searches up to 5 levels of ancestors only.\n *\n * @param domResizeHost Resize host DOM element that receives dimensions as a result of resizing.\n * @returns Width of ancestor element in pixels or 0 if no ancestor with a computed width has been found.\n */\nexport function calculateResizeHostAncestorWidth( domResizeHost: HTMLElement ): number {\n\tconst getElementComputedWidth = ( element: HTMLElement ) => {\n\t\tconst { width, paddingLeft, paddingRight } = element.ownerDocument.defaultView!.getComputedStyle( element! );\n\n\t\treturn parseFloat( width ) - ( parseFloat( paddingLeft ) || 0 ) - ( parseFloat( paddingRight ) || 0 );\n\t};\n\n\tconst domResizeHostParent = domResizeHost.parentElement;\n\n\tif ( !domResizeHostParent ) {\n\t\treturn 0;\n\t}\n\n\t// Need to use computed style as it properly excludes parent's paddings from the returned value.\n\tlet parentWidth = getElementComputedWidth( domResizeHostParent! );\n\n\t// Sometimes parent width cannot be accessed. If that happens we should go up in the elements tree\n\t// and try to get width from next ancestor.\n\t// https://github.com/ckeditor/ckeditor5/issues/10776\n\tconst ancestorLevelLimit = 5;\n\tlet currentLevel = 0;\n\n\tlet checkedElement = domResizeHostParent!;\n\n\twhile ( isNaN( parentWidth ) ) {\n\t\tcheckedElement = checkedElement.parentElement!;\n\n\t\tif ( ++currentLevel > ancestorLevelLimit ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tparentWidth = getElementComputedWidth( checkedElement );\n\t}\n\n\treturn parentWidth;\n}\n\n/**\n * Calculates a relative width of a `domResizeHost` compared to its ancestor in percents.\n *\n * @param domResizeHost Resize host DOM element.\n * @returns Percentage value between 0 and 100.\n */\nexport function calculateResizeHostPercentageWidth(\n\tdomResizeHost: HTMLElement,\n\tresizeHostRect: Rect = new Rect( domResizeHost )\n): number {\n\tconst parentWidth = calculateResizeHostAncestorWidth( domResizeHost );\n\n\tif ( !parentWidth ) {\n\t\treturn 0;\n\t}\n\n\treturn resizeHostRect.width / parentWidth * 100;\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/**\n * @module widget/widgettypearound/utils\n */\n\nimport { isWidget } from '../utils.js';\nimport { _getCopyOnEnterAttributes } from '@ckeditor/ckeditor5-enter';\n\nimport {\n\tModelDocumentSelection,\n\ttype ViewDomConverter,\n\ttype ModelNode,\n\ttype ModelElement,\n\ttype ModelSchema,\n\ttype ModelSelection,\n\ttype ViewElement\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * The name of the type around model selection attribute responsible for\n * displaying a fake caret next to a selected widget.\n *\n * @internal\n */\nexport const TYPE_AROUND_SELECTION_ATTRIBUTE = 'widget-type-around';\n\n/**\n * Checks if an element is a widget that qualifies to get the widget type around UI.\n */\nexport function isTypeAroundWidget( viewElement: ViewElement | undefined, modelElement: ModelElement, schema: ModelSchema ): boolean {\n\treturn !!viewElement && isWidget( viewElement ) && !schema.isInline( modelElement );\n}\n\n/**\n * For the passed HTML element, this helper finds the closest widget type around button ancestor.\n *\n * @internal\n */\nexport function getClosestTypeAroundDomButton( domElement: HTMLElement ): HTMLElement | null {\n\treturn domElement.closest( '.ck-widget__type-around__button' );\n}\n\n/**\n * For the passed widget type around button element, this helper determines at which position\n * the paragraph would be inserted into the content if, for instance, the button was\n * clicked by the user.\n *\n * @internal\n * @returns The position of the button.\n */\nexport function getTypeAroundButtonPosition( domElement: HTMLElement ): 'before' | 'after' {\n\treturn domElement.classList.contains( 'ck-widget__type-around__button_before' ) ? 'before' : 'after';\n}\n\n/**\n * For the passed HTML element, this helper returns the closest view widget ancestor.\n *\n * @internal\n */\nexport function getClosestWidgetViewElement( domElement: HTMLElement, domConverter: ViewDomConverter ): ViewElement {\n\tconst widgetDomElement = domElement.closest( '.ck-widget' );\n\n\treturn domConverter.mapDomToView( widgetDomElement as any ) as ViewElement;\n}\n\n/**\n * For the passed selection instance, it returns the position of the fake caret displayed next to a widget.\n *\n * **Note**: If the fake caret is not currently displayed, `null` is returned.\n *\n * @internal\n * @returns The position of the fake caret or `null` when none is present.\n */\nexport function getTypeAroundFakeCaretPosition( selection: ModelSelection | ModelDocumentSelection ): 'before' | 'after' | null {\n\treturn selection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) as any;\n}\n\n/**\n * Looks for the `copyOnEnter` text formatting attributes (e.g. bold, font color) carried by the last piece\n * of inline content on the sibling that directly precedes a run of one or more consecutive block widgets.\n *\n * Used when the user inserts a new paragraph next to a widget (e.g. an image or a table) via the type-around\n * UI: the new, empty paragraph should continue whatever formatting was active right before the widget,\n * instead of starting unformatted:\n *\n * ```\n * <paragraph><$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock>\n * ```\n *\n * Only the attributes carried by the *last* inline child of that sibling are considered - whatever precedes\n * it doesn't matter, because it's the last piece of content that reflects what the user was typing right\n * before reaching the widget:\n *\n * ```\n * // \"bold\" IS recovered here: \"Bar\", the last child, is bold. \"Foo\" not being bold is irrelevant.\n * <paragraph>Foo<$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock>\n * ```\n *\n * If there is more than one widget in a row, the search continues past all of them until a sibling with\n * actual content (or the boundary of the parent) is found:\n *\n * ```\n * <paragraph><$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock><imageBlock></imageBlock>\n * ```\n *\n * @param schema Model's schema.\n * @param widgetElement The widget model element.\n * @internal\n */\nexport function getCopyOnEnterTextAttributesBeforeWidgets(\n\tschema: ModelSchema,\n\twidgetElement: ModelElement\n): Array<[ string, unknown ]> {\n\t// If `element` is itself a widget, it counts as the first skipped widget in the chain (see above).\n\t// Otherwise, the chain of widgets to skip, if any, starts at its previous sibling.\n\tlet sibling: ModelNode | null = widgetElement;\n\n\t// Skip over any number of consecutive block widgets (objects).\n\twhile ( sibling && sibling.is( 'element' ) && schema.isObject( sibling ) ) {\n\t\tsibling = sibling.previousSibling;\n\t}\n\n\t// Reached the start of the parent, or found some other, non-widget element — there is nothing to copy.\n\tif ( !sibling?.is( 'element' ) ) {\n\t\treturn [];\n\t}\n\n\t// There is no content to take attributes from.\n\tif ( sibling.isEmpty ) {\n\t\tconst selectionAttributes = extractStoredSelectionAttributes( sibling.getAttributes() );\n\n\t\treturn Array.from( _getCopyOnEnterAttributes( schema, selectionAttributes ) );\n\t}\n\n\tconst lastChild = sibling.getChild( sibling.childCount - 1 )!;\n\n\t// Only text and inline elements (e.g. `softBreak`, `imageInline`) carry text formatting attributes.\n\t// A nested block (e.g. the paragraph inside a `blockQuote`) means this is a different context, not\n\t// a continuation of the surrounding flow, so there's nothing to recover.\n\tif ( !schema.isInline( lastChild ) ) {\n\t\treturn [];\n\t}\n\n\treturn Array.from( _getCopyOnEnterAttributes( schema, lastChild.getAttributes() ) );\n}\n\n/**\n * Extracts the selection attributes stored on an empty block.\n */\nfunction* extractStoredSelectionAttributes( iterator: IterableIterator<[string, unknown]> ): IterableIterator<[string, unknown]> {\n\tfor ( const [ attributeKey, attributeValue ] of iterator ) {\n\t\tif ( !ModelDocumentSelection._isStoreAttributeKey( attributeKey ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst realKey = ModelDocumentSelection._dropStoreAttributeKeyPrefix( attributeKey );\n\n\t\tyield [ realKey, attributeValue ];\n\t}\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/**\n * @module widget/widgettypearound/widgettypearound\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { IconReturnArrow } from '@ckeditor/ckeditor5-icons';\nimport { Template } from '@ckeditor/ckeditor5-ui';\n\nimport { Enter, type ViewDocumentEnterEvent } from '@ckeditor/ckeditor5-enter';\n\nimport {\n\tDelete,\n\ttype ViewDocumentDeleteEvent,\n\ttype ViewDocumentInsertTextEvent\n} from '@ckeditor/ckeditor5-typing';\n\nimport {\n\tenv,\n\tisForwardArrowKeyCode,\n\ttype BaseEvent,\n\ttype Emitter,\n\ttype GetCallback,\n\ttype GetCallbackOptions,\n\ttype ObservableChangeEvent,\n\ttype KeystrokeInfo\n} from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tBubblingEventInfo,\n\tModelDocumentChangeEvent,\n\tViewDocumentDomEventData,\n\tDowncastInsertEvent,\n\tDowncastSelectionEvent,\n\tViewDowncastWriter,\n\tModelElement,\n\tModelSchema,\n\tModelSelectionChangeRangeEvent,\n\tViewDocumentArrowKeyEvent,\n\tViewDocumentCompositionStartEvent,\n\tViewDocumentKeyDownEvent,\n\tViewDocumentMouseDownEvent,\n\tViewElement,\n\tModelDeleteContentEvent,\n\tModelInsertContentEvent,\n\tModelInsertObjectEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tisTypeAroundWidget,\n\tgetClosestTypeAroundDomButton,\n\tgetTypeAroundButtonPosition,\n\tgetClosestWidgetViewElement,\n\tgetTypeAroundFakeCaretPosition,\n\tgetCopyOnEnterTextAttributesBeforeWidgets,\n\tTYPE_AROUND_SELECTION_ATTRIBUTE\n} from './utils.js';\n\nimport { isWidget } from '../utils.js';\nimport { type Widget } from '../widget.js';\n\n// @if CK_DEBUG_TYPING // import { _buildLogMessage } from '@ckeditor/ckeditor5-engine/src/dev-utils/utils.js';\n\nconst POSSIBLE_INSERTION_POSITIONS = [ 'before', 'after' ] as const;\n\n// Do the SVG parsing once and then clone the result <svg> DOM element for each new button.\nconst RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString( IconReturnArrow, 'image/svg+xml' ).firstChild!;\n\nconst PLUGIN_DISABLED_EDITING_ROOT_CLASS = 'ck-widget__type-around_disabled';\n\n/**\n * A plugin that allows users to type around widgets where normally it is impossible to place the caret due\n * to limitations of web browsers. These \"tight spots\" occur, for instance, before (or after) a widget being\n * the first (or last) child of its parent or between two block widgets.\n *\n * This plugin extends the {@link module:widget/widget~Widget `Widget`} plugin and injects the user interface\n * with two buttons into each widget instance in the editor. Each of the buttons can be clicked by the\n * user if the widget is next to the \"tight spot\". Once clicked, a paragraph is created with the selection anchored\n * in it so that users can type (or insert content, paste, etc.) straight away.\n */\nexport class WidgetTypeAround extends Plugin {\n\t/**\n\t * A reference to the model widget element that has the fake caret active\n\t * on either side of it. It is later used to remove CSS classes associated with the fake caret\n\t * when the widget no longer needs it.\n\t */\n\tprivate _currentFakeCaretModelElement: ModelElement | null = null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WidgetTypeAround' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Enter, Delete ]> {\n\t\treturn [ Enter, Delete ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\n\t\t// Set a CSS class on the view editing root when the plugin is disabled so all the buttons\n\t\t// and lines visually disappear. All the interactions are disabled in individual plugin methods.\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isEnabled', ( evt, data, isEnabled ) => {\n\t\t\teditingView.change( writer => {\n\t\t\t\tfor ( const root of editingView.document.roots ) {\n\t\t\t\t\tif ( isEnabled ) {\n\t\t\t\t\t\twriter.removeClass( PLUGIN_DISABLED_EDITING_ROOT_CLASS, root );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.addClass( PLUGIN_DISABLED_EDITING_ROOT_CLASS, root );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tif ( !isEnabled ) {\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\twriter.removeSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tthis._enableTypeAroundUIInjection();\n\t\tthis._enableInsertingParagraphsOnButtonClick();\n\t\tthis._enableInsertingParagraphsOnEnterKeypress();\n\t\tthis._enableInsertingParagraphsOnTypingKeystroke();\n\t\tthis._enableTypeAroundFakeCaretActivationUsingKeyboardArrows();\n\t\tthis._enableDeleteIntegration();\n\t\tthis._enableInsertContentIntegration();\n\t\tthis._enableInsertObjectIntegration();\n\t\tthis._enableDeleteContentIntegration();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis._currentFakeCaretModelElement = null;\n\t}\n\n\t/**\n\t * Inserts a new paragraph next to a widget element with the selection anchored in it.\n\t *\n\t * **Note**: This method is heavily user-oriented and will both focus the editing view and scroll\n\t * the viewport to the selection in the inserted paragraph.\n\t *\n\t * @param widgetModelElement The model widget element next to which a paragraph is inserted.\n\t * @param position The position where the paragraph is inserted. Either `'before'` or `'after'` the widget.\n\t */\n\tprivate _insertParagraph( widgetModelElement: ModelElement, position: 'before' | 'after' ) {\n\t\tconst editor = this.editor;\n\t\tconst { model } = editor;\n\t\tconst { schema } = model;\n\t\tconst editingView = editor.editing.view;\n\n\t\tconst attributesToCopy = schema.getAttributesWithProperty( widgetModelElement, 'copyOnReplace', true );\n\t\tconst selectionAttributes = getCopyOnEnterTextAttributesBeforeWidgets( schema, widgetModelElement );\n\n\t\tmodel.change( writer => {\n\t\t\tconst insertedParagraph = editor.execute( 'insertParagraph', {\n\t\t\t\tposition: editor.model.createPositionAt( widgetModelElement, position ),\n\t\t\t\tattributes: attributesToCopy\n\t\t\t} );\n\n\t\t\tif ( insertedParagraph ) {\n\t\t\t\twriter.setSelectionAttribute( selectionAttributes );\n\t\t\t}\n\t\t} );\n\n\t\teditingView.focus();\n\t\teditingView.scrollToTheSelection();\n\t}\n\n\t/**\n\t * A wrapper for the {@link module:utils/emittermixin~Emitter#listenTo} method that executes the callbacks only\n\t * when the plugin {@link #isEnabled is enabled}.\n\t *\n\t * @param emitter The object that fires the event.\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\tprivate _listenToIfEnabled<TEvent extends BaseEvent>(\n\t\temitter: Emitter,\n\t\tevent: TEvent[ 'name' ],\n\t\tcallback: OmitThisParameter<GetCallback<TEvent>>,\n\t\toptions?: GetCallbackOptions<TEvent>\n\t): void {\n\t\tthis.listenTo( emitter, event, ( ...args ) => {\n\t\t\t// Do not respond if the plugin is disabled.\n\t\t\tif ( this.isEnabled ) {\n\t\t\t\tcallback( ...args );\n\t\t\t}\n\t\t}, options );\n\t}\n\n\t/**\n\t * Similar to {@link #_insertParagraph}, this method inserts a paragraph except that it\n\t * does not expect a position. Instead, it performs the insertion next to a selected widget\n\t * according to the `widget-type-around` model selection attribute value (fake caret position).\n\t *\n\t * Because this method requires the `widget-type-around` attribute to be set,\n\t * the insertion can only happen when the widget's fake caret is active (e.g. activated\n\t * using the keyboard).\n\t *\n\t * @returns Returns `true` when the paragraph was inserted (the attribute was present) and `false` otherwise.\n\t */\n\tprivate _insertParagraphAccordingToFakeCaretPosition() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( modelSelection );\n\n\t\tif ( !typeAroundFakeCaretPosition ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( ..._buildLogMessage( this, 'WidgetTypeAround',\n\t\t// @if CK_DEBUG_TYPING // \t\t'Fake caret -> insert paragraph',\n\t\t// @if CK_DEBUG_TYPING // \t) );\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tconst selectedModelElement = modelSelection.getSelectedElement()!;\n\n\t\tthis._insertParagraph( selectedModelElement, typeAroundFakeCaretPosition );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Creates a listener in the editing conversion pipeline that injects the widget type around\n\t * UI into every single widget instance created in the editor.\n\t *\n\t * The UI is delivered as a {@link module:engine/view/uielement~ViewUIElement}\n\t * wrapper which renders DOM buttons that users can use to insert paragraphs.\n\t */\n\tprivate _enableTypeAroundUIInjection() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.locale.t;\n\t\tconst buttonTitles = {\n\t\t\tbefore: t( 'Insert paragraph before block' ),\n\t\t\tafter: t( 'Insert paragraph after block' )\n\t\t};\n\n\t\teditor.editing.downcastDispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert', ( evt, data, conversionApi ) => {\n\t\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item );\n\n\t\t\tif ( !viewElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Filter out non-widgets and inline widgets.\n\t\t\tif ( isTypeAroundWidget( viewElement, data.item, schema ) ) {\n\t\t\t\tinjectUIIntoWidget( conversionApi.writer, buttonTitles, viewElement! );\n\n\t\t\t\tconst widgetLabel = viewElement.getCustomProperty( 'widgetLabel' ) as Array<string | ( () => string )>;\n\n\t\t\t\twidgetLabel.push( () => {\n\t\t\t\t\treturn this.isEnabled ? t( 'Press Enter to type after or press Shift + Enter to type before the widget' ) : '';\n\t\t\t\t} );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Brings support for the fake caret that appears when either:\n\t *\n\t * * the selection moves to a widget from a position next to it using arrow keys,\n\t * * the arrow key is pressed when the widget is already selected.\n\t *\n\t * The fake caret lets the user know that they can start typing or just press\n\t * <kbd>Enter</kbd> to insert a paragraph at the position next to a widget as suggested by the fake caret.\n\t *\n\t * The fake caret disappears when the user changes the selection or the editor\n\t * gets blurred.\n\t *\n\t * The whole idea is as follows:\n\t *\n\t * 1. A user does one of the 2 scenarios described at the beginning.\n\t * 2. The \"keydown\" listener is executed and the decision is made whether to show or hide the fake caret.\n\t * 3. If it should show up, the `widget-type-around` model selection attribute is set indicating\n\t *    on which side of the widget it should appear.\n\t * 4. The selection dispatcher reacts to the selection attribute and sets CSS classes responsible for the\n\t *    fake caret on the view widget.\n\t * 5. If the fake caret should disappear, the selection attribute is removed and the dispatcher\n\t *    does the CSS class clean-up in the view.\n\t * 6. Additionally, `change:range` and `FocusTracker#isFocused` listeners also remove the selection\n\t *    attribute (the former also removes widget CSS classes).\n\t */\n\tprivate _enableTypeAroundFakeCaretActivationUsingKeyboardArrows() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst editingView = editor.editing.view;\n\n\t\t// This is the main listener responsible for the fake caret.\n\t\t// Note: The priority must precede the default Widget class keydown handler (\"high\").\n\t\tthis._listenToIfEnabled<ViewDocumentArrowKeyEvent>( editingView.document, 'arrowKey', ( evt, domEventData ) => {\n\t\t\tthis._handleArrowKeyPress( evt, domEventData );\n\t\t}, { context: [ isWidget, '$text' ], priority: 'high' } );\n\n\t\t// This listener makes sure the widget type around selection attribute will be gone from the model\n\t\t// selection as soon as the model range changes. This attribute only makes sense when a widget is selected\n\t\t// (and the \"fake horizontal caret\" is visible) so whenever the range changes (e.g. selection moved somewhere else),\n\t\t// let's get rid of the attribute so that the selection downcast dispatcher isn't even bothered.\n\t\tthis._listenToIfEnabled<ModelSelectionChangeRangeEvent>( modelSelection, 'change:range', ( evt, data ) => {\n\t\t\t// Do not reset the selection attribute when the change was indirect.\n\t\t\tif ( !data.directChange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Get rid of the widget type around attribute of the selection on every change:range.\n\t\t\t// If the range changes, it means for sure, the user is no longer in the active (\"fake horizontal caret\") mode.\n\t\t\teditor.model.change( writer => {\n\t\t\t\twriter.removeSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE );\n\t\t\t} );\n\t\t} );\n\n\t\t// Get rid of the widget type around attribute of the selection on every document change\n\t\t// that makes widget not selected any more (i.e. widget was removed).\n\t\tthis._listenToIfEnabled<ModelDocumentChangeEvent>( model.document, 'change:data', () => {\n\t\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\n\t\t\tif ( selectedModelElement ) {\n\t\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement( selectedModelElement );\n\n\t\t\t\tif ( isTypeAroundWidget( selectedViewElement, selectedModelElement, schema ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\teditor.model.change( writer => {\n\t\t\t\twriter.removeSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE );\n\t\t\t} );\n\t\t} );\n\n\t\t// React to changes of the model selection attribute made by the arrow keys listener.\n\t\t// If the block widget is selected and the attribute changes, downcast the attribute to special\n\t\t// CSS classes associated with the active (\"fake horizontal caret\") mode of the widget.\n\t\tthis._listenToIfEnabled<DowncastSelectionEvent>( editor.editing.downcastDispatcher, 'selection', ( evt, data, conversionApi ) => {\n\t\t\tconst writer = conversionApi.writer;\n\n\t\t\tif ( this._currentFakeCaretModelElement ) {\n\t\t\t\tconst selectedViewElement = conversionApi.mapper.toViewElement( this._currentFakeCaretModelElement );\n\n\t\t\t\tif ( selectedViewElement ) {\n\t\t\t\t\t// Get rid of CSS classes associated with the active (\"fake horizontal caret\") mode from the view widget.\n\t\t\t\t\twriter.removeClass( POSSIBLE_INSERTION_POSITIONS.map( positionToWidgetCssClass ), selectedViewElement );\n\n\t\t\t\t\tthis._currentFakeCaretModelElement = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst selectedModelElement = data.selection.getSelectedElement();\n\n\t\t\tif ( !selectedModelElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedViewElement = conversionApi.mapper.toViewElement( selectedModelElement );\n\n\t\t\tif ( !isTypeAroundWidget( selectedViewElement, selectedModelElement, schema ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( data.selection );\n\n\t\t\tif ( !typeAroundFakeCaretPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twriter.addClass( positionToWidgetCssClass( typeAroundFakeCaretPosition ), selectedViewElement! );\n\n\t\t\t// Remember the view widget that got the \"fake-caret\" CSS class. This class should be removed ASAP when the\n\t\t\t// selection changes\n\t\t\tthis._currentFakeCaretModelElement = selectedModelElement;\n\t\t} );\n\n\t\tthis._listenToIfEnabled<ObservableChangeEvent<boolean>>( editor.ui.focusTracker, 'change:isFocused', ( evt, name, isFocused ) => {\n\t\t\tif ( !isFocused ) {\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\twriter.removeSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tfunction positionToWidgetCssClass( position: 'before' | 'after' ) {\n\t\t\treturn `ck-widget_type-around_show-fake-caret_${ position }`;\n\t\t}\n\t}\n\n\t/**\n\t * A listener executed on each \"keydown\" in the view document, a part of\n\t * {@link #_enableTypeAroundFakeCaretActivationUsingKeyboardArrows}.\n\t *\n\t * It decides whether the arrow keypress should activate the fake caret or not (also whether it should\n\t * be deactivated).\n\t *\n\t * The fake caret activation is done by setting the `widget-type-around` model selection attribute\n\t * in this listener, and stopping and preventing the event that would normally be handled by the widget\n\t * plugin that is responsible for the regular keyboard navigation near/across all widgets (that\n\t * includes inline widgets, which are ignored by the widget type around plugin).\n\t */\n\tprivate _handleArrowKeyPress( evt: BubblingEventInfo<'arrowKey'>, domEventData: ViewDocumentDomEventData & KeystrokeInfo ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst editingView = editor.editing.view;\n\n\t\t// Selection expanding/shrinking is handled without the fake caret by the widget plugin.\n\t\tif ( domEventData.shiftKey ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst keyCode = domEventData.keyCode;\n\t\tconst isForward = isForwardArrowKeyCode( keyCode, editor.locale.contentLanguageDirection );\n\t\tconst selectedViewElement = editingView.document.selection.getSelectedElement()!;\n\t\tconst selectedModelElement = editor.editing.mapper.toModelElement( selectedViewElement )!;\n\t\tlet shouldStopAndPreventDefault;\n\n\t\t// Handle keyboard navigation when a type-around-compatible widget is currently selected.\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( isTypeAroundWidget( selectedViewElement, selectedModelElement, schema ) ) {\n\t\t\tshouldStopAndPreventDefault = this._handleArrowKeyPressOnSelectedWidget( isForward );\n\t\t}\n\t\t// Handle keyboard arrow navigation when the selection is next to a type-around-compatible widget\n\t\t// and the widget is about to be selected.\n\t\telse if ( modelSelection.isCollapsed ) {\n\t\t\tshouldStopAndPreventDefault = this._handleArrowKeyPressWhenSelectionNextToAWidget( isForward );\n\t\t}\n\t\t// Handle collapsing a non-collapsed selection that is wider than on a single widget.\n\t\telse if ( !domEventData.shiftKey ) {\n\t\t\tshouldStopAndPreventDefault = this._handleArrowKeyPressWhenNonCollapsedSelection( isForward );\n\t\t}\n\n\t\tif ( shouldStopAndPreventDefault ) {\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t}\n\t}\n\n\t/**\n\t * Handles the keyboard navigation on \"keydown\" when a widget is currently selected and activates or deactivates\n\t * the fake caret for that widget, depending on the current value of the `widget-type-around` model\n\t * selection attribute and the direction of the pressed arrow key.\n\t *\n\t * @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t * as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t * @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t * process the event any further. Returns `false` otherwise.\n\t */\n\tprivate _handleArrowKeyPressOnSelectedWidget( isForward: boolean ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( modelSelection );\n\n\t\treturn model.change( writer => {\n\t\t\t// If the fake caret is displayed...\n\t\t\tif ( typeAroundFakeCaretPosition ) {\n\t\t\t\tconst isLeavingWidget = typeAroundFakeCaretPosition === ( isForward ? 'after' : 'before' );\n\n\t\t\t\t// If the keyboard arrow works against the value of the selection attribute...\n\t\t\t\t// then remove the selection attribute but prevent default DOM actions\n\t\t\t\t// and do not let the Widget plugin listener move the selection. This brings\n\t\t\t\t// the widget back to the state, for instance, like if was selected using the mouse.\n\t\t\t\t//\n\t\t\t\t// **Note**: If leaving the widget when the fake caret is active, then the default\n\t\t\t\t// Widget handler will change the selection and, in turn, this will automatically discard\n\t\t\t\t// the selection attribute.\n\t\t\t\tif ( !isLeavingWidget ) {\n\t\t\t\t\twriter.removeSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE );\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the fake caret wasn't displayed, let's set it now according to the direction of the arrow\n\t\t\t// key press. This also means we cannot let the Widget plugin listener move the selection.\n\t\t\telse {\n\t\t\t\twriter.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? 'after' : 'before' );\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} );\n\t}\n\n\t/**\n\t * Handles the keyboard navigation on \"keydown\" when **no** widget is selected but the selection is **directly** next\n\t * to one and upon the fake caret should become active for this widget upon arrow keypress\n\t * (AKA entering/selecting the widget).\n\t *\n\t * **Note**: This code mirrors the implementation from the widget plugin but also adds the selection attribute.\n\t * Unfortunately, there is no safe way to let the widget plugin do the selection part first and then just set the\n\t * selection attribute here in the widget type around plugin. This is why this code must duplicate some from the widget plugin.\n\t *\n\t * @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t * as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t * @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t * process the event any further. Returns `false` otherwise.\n\t */\n\tprivate _handleArrowKeyPressWhenSelectionNextToAWidget( isForward: boolean ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst widgetPlugin: Widget = editor.plugins.get( 'Widget' );\n\n\t\t// This is the widget the selection is about to be set on.\n\t\tconst modelElementNextToSelection = widgetPlugin._getObjectElementNextToSelection( isForward )!;\n\t\tconst viewElementNextToSelection = editor.editing.mapper.toViewElement( modelElementNextToSelection );\n\n\t\tif ( isTypeAroundWidget( viewElementNextToSelection, modelElementNextToSelection, schema ) ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twidgetPlugin._setSelectionOverElement( modelElementNextToSelection );\n\t\t\t\twriter.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? 'before' : 'after' );\n\t\t\t} );\n\n\t\t\t// The change() block above does the same job as the Widget plugin. The event can\n\t\t\t// be safely canceled.\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Handles the keyboard navigation on \"keydown\" when a widget is currently selected (together with some other content)\n\t * and the widget is the first or last element in the selection. It activates or deactivates the fake caret for that widget.\n\t *\n\t * @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t * as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t * @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t * process the event any further. Returns `false` otherwise.\n\t */\n\tprivate _handleArrowKeyPressWhenNonCollapsedSelection( isForward: boolean ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst modelSelection = model.document.selection;\n\n\t\tconst selectedModelNode = isForward ?\n\t\t\tmodelSelection.getLastPosition()!.nodeBefore :\n\t\t\tmodelSelection.getFirstPosition()!.nodeAfter;\n\n\t\tconst selectedViewNode = mapper.toViewElement( selectedModelNode as any );\n\n\t\t// There is a widget at the collapse position so collapse the selection to the fake caret on it.\n\t\tif ( isTypeAroundWidget( selectedViewNode, selectedModelNode as any, schema ) ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( selectedModelNode!, 'on' );\n\t\t\t\twriter.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? 'after' : 'before' );\n\t\t\t} );\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Registers a `mousedown` listener for the view document which intercepts events\n\t * coming from the widget type around UI, which happens when a user clicks one of the buttons\n\t * that insert a paragraph next to a widget.\n\t */\n\tprivate _enableInsertingParagraphsOnButtonClick() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\n\t\tthis._listenToIfEnabled<ViewDocumentMouseDownEvent>( editingView.document, 'mousedown', ( evt, domEventData ) => {\n\t\t\tconst button = getClosestTypeAroundDomButton( domEventData.domTarget );\n\n\t\t\tif ( !button ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst buttonPosition = getTypeAroundButtonPosition( button );\n\t\t\tconst widgetViewElement = getClosestWidgetViewElement( button, editingView.domConverter );\n\t\t\tconst widgetModelElement = editor.editing.mapper.toModelElement( widgetViewElement );\n\n\t\t\tthis._insertParagraph( widgetModelElement!, buttonPosition );\n\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the <kbd>Enter</kbd> key listener on the view document that allows the user to insert a paragraph\n\t * near the widget when either:\n\t *\n\t * * The fake caret was first activated using the arrow keys,\n\t * * The entire widget is selected in the model.\n\t *\n\t * In the first case, the new paragraph is inserted according to the `widget-type-around` selection\n\t * attribute (see {@link #_handleArrowKeyPress}).\n\t *\n\t * In the second case, the new paragraph is inserted based on whether a soft (<kbd>Shift</kbd>+<kbd>Enter</kbd>) keystroke\n\t * was pressed or not.\n\t */\n\tprivate _enableInsertingParagraphsOnEnterKeypress() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst editingView = editor.editing.view;\n\n\t\tthis._listenToIfEnabled<ViewDocumentEnterEvent>( editingView.document, 'enter', ( evt, domEventData ) => {\n\t\t\t// This event could be triggered from inside the widget but we are interested\n\t\t\t// only when the widget is selected itself.\n\t\t\tif ( evt.eventPhase != 'atTarget' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedModelElement = selection.getSelectedElement()!;\n\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement( selectedModelElement );\n\n\t\t\tconst schema = editor.model.schema;\n\t\t\tlet wasHandled;\n\n\t\t\t// First check if the widget is selected and there's a type around selection attribute associated\n\t\t\t// with the fake caret that would tell where to insert a new paragraph.\n\t\t\tif ( this._insertParagraphAccordingToFakeCaretPosition() ) {\n\t\t\t\twasHandled = true;\n\t\t\t}\n\t\t\t// Then, if there is no selection attribute associated with the fake caret, check if the widget\n\t\t\t// simply is selected and create a new paragraph according to the keystroke (Shift+)Enter.\n\t\t\telse if ( isTypeAroundWidget( selectedViewElement, selectedModelElement, schema ) ) {\n\t\t\t\tthis._insertParagraph( selectedModelElement, domEventData.isSoft ? 'before' : 'after' );\n\n\t\t\t\twasHandled = true;\n\t\t\t}\n\n\t\t\tif ( wasHandled ) {\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: isWidget } );\n\t}\n\n\t/**\n\t * Similar to the {@link #_enableInsertingParagraphsOnEnterKeypress}, it allows the user\n\t * to insert a paragraph next to a widget when the fake caret was activated using arrow\n\t * keys but it responds to typing instead of <kbd>Enter</kbd>.\n\t *\n\t * Listener enabled by this method will insert a new paragraph according to the `widget-type-around`\n\t * model selection attribute as the user simply starts typing, which creates the impression that the fake caret\n\t * behaves like a real one rendered by the browser (AKA your text appears where the caret was).\n\t *\n\t * **Note**: At the moment this listener creates 2 undo steps: one for the `insertParagraph` command\n\t * and another one for actual typing. It is not a disaster but this may need to be fixed\n\t * sooner or later.\n\t */\n\tprivate _enableInsertingParagraphsOnTypingKeystroke() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\n\t\t// Note: The priority must precede the default Input plugin insertText handler.\n\t\tthis._listenToIfEnabled<ViewDocumentInsertTextEvent>( viewDocument, 'insertText', ( evt, data ) => {\n\t\t\tif ( this._insertParagraphAccordingToFakeCaretPosition() ) {\n\t\t\t\t// The view selection in the event data contains the widget. If the new paragraph\n\t\t\t\t// was inserted, modify the view selection passed along with the insertText event\n\t\t\t\t// so the default event handler in the Input plugin starts typing inside the paragraph.\n\t\t\t\t// Otherwise, the typing would be over the widget.\n\t\t\t\tdata.selection = viewDocument.selection;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\tif ( env.isAndroid ) {\n\t\t\t// On Android with English keyboard, the composition starts just by putting caret\n\t\t\t// at the word end or by selecting a table column. This is not a real composition started.\n\t\t\t// Trigger delete content on first composition key pressed.\n\t\t\tthis._listenToIfEnabled<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( evt, data ) => {\n\t\t\t\tif ( data.keyCode == 229 ) {\n\t\t\t\t\tthis._insertParagraphAccordingToFakeCaretPosition();\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\t// Note: The priority must precede the default Input plugin compositionstart handler (to call it before delete content).\n\t\t\tthis._listenToIfEnabled<ViewDocumentCompositionStartEvent>( viewDocument, 'compositionstart', () => {\n\t\t\t\tthis._insertParagraphAccordingToFakeCaretPosition();\n\t\t\t}, { priority: 'highest' } );\n\t\t}\n\t}\n\n\t/**\n\t * It creates a \"delete\" event listener on the view document to handle cases when the <kbd>Delete</kbd> or <kbd>Backspace</kbd>\n\t * is pressed and the fake caret is currently active.\n\t *\n\t * The fake caret should create an illusion of a real browser caret so that when it appears before or after\n\t * a widget, pressing <kbd>Delete</kbd> or <kbd>Backspace</kbd> should remove a widget or delete the content\n\t * before or after a widget (depending on the content surrounding the widget).\n\t */\n\tprivate _enableDeleteIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\n\t\tthis._listenToIfEnabled<ViewDocumentDeleteEvent>( editingView.document, 'delete', ( evt, domEventData ) => {\n\t\t\t// This event could be triggered from inside the widget but we are interested\n\t\t\t// only when the widget is selected itself.\n\t\t\tif ( evt.eventPhase != 'atTarget' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( model.document.selection );\n\n\t\t\t// This listener handles only these cases when the fake caret is active.\n\t\t\tif ( !typeAroundFakeCaretPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst direction = domEventData.direction;\n\t\t\tconst selectedModelWidget = model.document.selection.getSelectedElement();\n\n\t\t\tconst isFakeCaretBefore = typeAroundFakeCaretPosition === 'before';\n\t\t\tconst isDeleteForward = direction == 'forward';\n\t\t\tconst shouldDeleteEntireWidget = isFakeCaretBefore === isDeleteForward;\n\n\t\t\tif ( shouldDeleteEntireWidget ) {\n\t\t\t\teditor.execute( 'delete', {\n\t\t\t\t\tselection: model.createSelection( selectedModelWidget!, 'on' )\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst range = schema.getNearestSelectionRange(\n\t\t\t\t\tmodel.createPositionAt( selectedModelWidget!, typeAroundFakeCaretPosition ),\n\t\t\t\t\tdirection\n\t\t\t\t);\n\n\t\t\t\t// If there is somewhere to move selection to, then there will be something to delete.\n\t\t\t\tif ( range ) {\n\t\t\t\t\t// If the range is NOT collapsed, then we know that the range contains an object (see getNearestSelectionRange() docs).\n\t\t\t\t\tif ( !range.isCollapsed ) {\n\t\t\t\t\t\tmodel.change( writer => {\n\t\t\t\t\t\t\twriter.setSelection( range );\n\t\t\t\t\t\t\teditor.execute( isDeleteForward ? 'deleteForward' : 'delete' );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst probe = model.createSelection( range.start );\n\t\t\t\t\t\tmodel.modifySelection( probe, { direction } );\n\n\t\t\t\t\t\t// If the range is collapsed, let's see if a non-collapsed range exists that can could be deleted.\n\t\t\t\t\t\t// If such range exists, use the editor command because it it safe for collaboration (it merges where it can).\n\t\t\t\t\t\tif ( !probe.focus!.isEqual( range.start ) ) {\n\t\t\t\t\t\t\tmodel.change( writer => {\n\t\t\t\t\t\t\t\twriter.setSelection( range );\n\t\t\t\t\t\t\t\teditor.execute( isDeleteForward ? 'deleteForward' : 'delete' );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If there is no non-collapsed range to be deleted then we are sure that there is an empty element\n\t\t\t\t\t\t// next to a widget that should be removed. \"delete\" and \"deleteForward\" commands cannot get rid of it\n\t\t\t\t\t\t// so calling Model#deleteContent here manually.\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst deepestEmptyRangeAncestor = getDeepestEmptyElementAncestor( schema, range.start.parent as ModelElement );\n\n\t\t\t\t\t\t\tmodel.deleteContent( model.createSelection( deepestEmptyRangeAncestor, 'on' ), {\n\t\t\t\t\t\t\t\tdoNotAutoparagraph: true\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If some content was deleted, don't let the handler from the Widget plugin kick in.\n\t\t\t// If nothing was deleted, then the default handler will have nothing to do anyway.\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: isWidget } );\n\t}\n\n\t/**\n\t * Attaches the {@link module:engine/model/model~Model#event:insertContent} event listener that, for instance, allows the user to paste\n\t * content near a widget when the fake caret is first activated using the arrow keys.\n\t *\n\t * The content is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t */\n\tprivate _enableInsertContentIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst documentSelection = model.document.selection;\n\n\t\tthis._listenToIfEnabled<ModelInsertContentEvent>( editor.model, 'insertContent', ( evt, [ content, selectable ] ) => {\n\t\t\tif ( selectable && !( selectable as any ).is( 'documentSelection' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( documentSelection );\n\n\t\t\tif ( !typeAroundFakeCaretPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevt.stop();\n\n\t\t\treturn model.change( writer => {\n\t\t\t\tconst selectedElement = documentSelection.getSelectedElement();\n\t\t\t\tconst position = model.createPositionAt( selectedElement!, typeAroundFakeCaretPosition );\n\t\t\t\tconst selection = writer.createSelection( position );\n\n\t\t\t\tconst result = model.insertContent( content, selection );\n\n\t\t\t\twriter.setSelection( selection );\n\n\t\t\t\treturn result;\n\t\t\t} );\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Attaches the {@link module:engine/model/model~Model#event:insertObject} event listener that modifies the\n\t * `options.findOptimalPosition`parameter to position of fake caret in relation to selected element\n\t * to reflect user's intent of desired insertion position.\n\t *\n\t * The object is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t */\n\tprivate _enableInsertObjectIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst documentSelection = model.document.selection;\n\n\t\tthis._listenToIfEnabled<ModelInsertObjectEvent>( editor.model, 'insertObject', ( evt, args ) => {\n\t\t\tconst [ , selectable, options = {} ] = args;\n\n\t\t\tif ( selectable && !( selectable as any ).is( 'documentSelection' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( documentSelection );\n\n\t\t\tif ( !typeAroundFakeCaretPosition ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\toptions.findOptimalPosition = typeAroundFakeCaretPosition;\n\t\t\targs[ 3 ] = options;\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Attaches the {@link module:engine/model/model~Model#event:deleteContent} event listener to block the event when the fake\n\t * caret is active.\n\t *\n\t * This is required for cases that trigger {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}\n\t * before calling {@link module:engine/model/model~Model#insertContent `model.insertContent()`} like, for instance,\n\t * plain text pasting.\n\t */\n\tprivate _enableDeleteContentIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst documentSelection = model.document.selection;\n\n\t\tthis._listenToIfEnabled<ModelDeleteContentEvent>( editor.model, 'deleteContent', ( evt, [ selection ] ) => {\n\t\t\tif ( selection && !selection.is( 'documentSelection' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( documentSelection );\n\n\t\t\t// Disable removing the selection content while pasting plain text.\n\t\t\tif ( typeAroundFakeCaretPosition ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n}\n\n/**\n * Injects the type around UI into a view widget instance.\n */\nfunction injectUIIntoWidget(\n\tviewWriter: ViewDowncastWriter,\n\tbuttonTitles: { before: string; after: string },\n\twidgetViewElement: ViewElement ) {\n\tconst typeAroundWrapper = viewWriter.createUIElement( 'div', {\n\t\tclass: 'ck ck-reset_all ck-widget__type-around'\n\t}, function( domDocument ) {\n\t\tconst wrapperDomElement = this.toDomElement( domDocument );\n\n\t\tinjectButtons( wrapperDomElement, buttonTitles );\n\t\tinjectFakeCaret( wrapperDomElement );\n\n\t\treturn wrapperDomElement;\n\t} );\n\n\t// Inject the type around wrapper into the widget's wrapper.\n\tviewWriter.insert( viewWriter.createPositionAt( widgetViewElement, 'end' ), typeAroundWrapper );\n}\n\n/**\n * FYI: Not using the IconView class because each instance would need to be destroyed to avoid memory leaks\n * and it's pretty hard to figure out when a view (widget) is gone for good so it's cheaper to use raw\n * <svg> here.\n */\nfunction injectButtons( wrapperDomElement: HTMLElement, buttonTitles: { before: string; after: string } ) {\n\tfor ( const position of POSSIBLE_INSERTION_POSITIONS ) {\n\t\tconst buttonTemplate = new Template( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-widget__type-around__button',\n\t\t\t\t\t`ck-widget__type-around__button_${ position }`\n\t\t\t\t],\n\t\t\t\ttitle: buttonTitles[ position ],\n\t\t\t\t'aria-hidden': 'true'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\twrapperDomElement.ownerDocument.importNode( RETURN_ARROW_ICON_ELEMENT, true )\n\t\t\t]\n\t\t} );\n\n\t\twrapperDomElement.appendChild( buttonTemplate.render() );\n\t}\n}\n\nfunction injectFakeCaret( wrapperDomElement: HTMLElement ) {\n\tconst caretTemplate = new Template( {\n\t\ttag: 'div',\n\t\tattributes: {\n\t\t\tclass: [\n\t\t\t\t'ck',\n\t\t\t\t'ck-widget__type-around__fake-caret'\n\t\t\t]\n\t\t}\n\t} );\n\n\twrapperDomElement.appendChild( caretTemplate.render() );\n}\n\n/**\n * Returns the ancestor of an element closest to the root which is empty. For instance,\n * for `<baz>`:\n *\n * ```\n * <foo>abc<bar><baz></baz></bar></foo>\n * ```\n *\n * it returns `<bar>`.\n */\nfunction getDeepestEmptyElementAncestor( schema: ModelSchema, element: ModelElement ) {\n\tlet deepestEmptyAncestor = element;\n\n\tfor ( const ancestor of element.getAncestors( { parentFirst: true } ) ) {\n\t\tif ( ( ancestor as any ).childCount > 1 || schema.isLimit( ancestor ) ) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdeepestEmptyAncestor = ancestor as ModelElement;\n\t}\n\n\treturn deepestEmptyAncestor;\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/**\n * @module widget/verticalnavigation\n */\n\nimport {\n\tkeyCodes,\n\tRect,\n\ttype GetCallback\n} from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tModelDocumentSelection,\n\tEditingController,\n\tModel,\n\tModelPosition,\n\tModelRange,\n\tModelSchema,\n\tModelSelection,\n\tViewDocumentArrowKeyEvent\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Returns 'keydown' handler for up/down arrow keys that modifies the caret movement if it's in a text line next to an object.\n *\n * @param editing The editing controller.\n */\nexport function verticalWidgetNavigationHandler(\n\tediting: EditingController\n): GetCallback<ViewDocumentArrowKeyEvent> {\n\tconst model = editing.model;\n\n\treturn ( evt, data ) => {\n\t\tconst arrowUpPressed = data.keyCode == keyCodes.arrowup;\n\t\tconst arrowDownPressed = data.keyCode == keyCodes.arrowdown;\n\t\tconst expandSelection = data.shiftKey;\n\t\tconst selection = model.document.selection;\n\n\t\tif ( !arrowUpPressed && !arrowDownPressed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isForward = arrowDownPressed;\n\n\t\t// Find a range between selection and closest limit element.\n\t\tconst range = findTextRangeFromSelection( editing, selection, isForward );\n\n\t\t// There is no selection position inside the limit element.\n\t\tif ( !range ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If already at the edge of a limit element.\n\t\tif ( range.isCollapsed ) {\n\t\t\t// A collapsed selection at limit edge - nothing more to do.\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// A non collapsed selection is at the limit edge while expanding the selection - let others do their stuff.\n\t\t\telse if ( expandSelection ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// If the range is a single line (there is no word wrapping) then move the selection to the position closest to the limit element.\n\t\t//\n\t\t// We can't move the selection directly to the isObject element (eg. table cell) because of dual position at the end/beginning\n\t\t// of wrapped line (it's at the same time at the end of one line and at the start of the next line).\n\t\tif ( range.isCollapsed || isSingleLineRange( editing, range, isForward ) ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\tconst newPosition = isForward ? range.end : range.start;\n\n\t\t\t\tif ( expandSelection ) {\n\t\t\t\t\tconst newSelection = model.createSelection( selection.anchor );\n\t\t\t\t\tnewSelection.setFocus( newPosition );\n\n\t\t\t\t\twriter.setSelection( newSelection );\n\t\t\t\t} else {\n\t\t\t\t\twriter.setSelection( newPosition );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tevt.stop();\n\t\t\tdata.preventDefault();\n\t\t\tdata.stopPropagation();\n\t\t}\n\t};\n}\n\n/**\n * Finds the range between selection and closest limit element (in the direction of navigation).\n * The position next to limit element is adjusted to the closest allowed `$text` position.\n *\n * Returns `null` if, according to the schema, the resulting range cannot contain a `$text` element.\n *\n * @param editing The editing controller.\n * @param selection The current selection.\n * @param isForward The expected navigation direction.\n */\nfunction findTextRangeFromSelection( editing: EditingController, selection: ModelSelection | ModelDocumentSelection, isForward: boolean ) {\n\tconst model = editing.model;\n\n\tif ( isForward ) {\n\t\tconst startPosition = selection.focus!;\n\t\tconst endPosition = getNearestNonInlineLimit( model, startPosition, 'forward' );\n\n\t\t// There is no limit element, browser should handle this.\n\t\tif ( !endPosition ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst range = model.createRange( startPosition, endPosition );\n\t\tconst lastRangePosition = getNearestTextPosition( model.schema, range, 'backward' );\n\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( lastRangePosition ) {\n\t\t\treturn model.createRange( startPosition, lastRangePosition );\n\t\t}\n\t} else {\n\t\tconst endPosition = selection.focus!;\n\t\tconst startPosition = getNearestNonInlineLimit( model, endPosition, 'backward' );\n\n\t\t// There is no limit element, browser should handle this.\n\t\tif ( !startPosition ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst range = model.createRange( startPosition, endPosition );\n\t\tconst firstRangePosition = getNearestTextPosition( model.schema, range, 'forward' );\n\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( firstRangePosition ) {\n\t\t\treturn model.createRange( firstRangePosition, endPosition );\n\t\t}\n\t}\n}\n\n/**\n * Finds the limit element position that is closest to startPosition.\n *\n * @param direction Search direction.\n */\nfunction getNearestNonInlineLimit( model: Model, startPosition: ModelPosition, direction: 'forward' | 'backward' ) {\n\tconst schema = model.schema;\n\tconst range = model.createRangeIn( startPosition.root );\n\n\tconst walkerValueType = direction == 'forward' ? 'elementStart' : 'elementEnd';\n\n\tfor ( const { previousPosition, item, type } of range.getWalker( { startPosition, direction } ) ) {\n\t\tif ( schema.isLimit( item ) && !schema.isInline( item ) ) {\n\t\t\treturn previousPosition;\n\t\t}\n\n\t\t// Stop looking for isLimit element if the next element is a block element (it is for sure not single line).\n\t\tif ( type == walkerValueType && schema.isBlock( item ) ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * Basing on the provided range, finds the first or last (depending on `direction`) position inside the range\n * that can contain `$text` (according to schema).\n *\n * @param schema The schema.\n * @param range The range to find the position in.\n * @param direction Search direction.\n * @returns The nearest selection position.\n *\n */\nfunction getNearestTextPosition( schema: ModelSchema, range: ModelRange, direction: 'forward' | 'backward' ) {\n\tconst position = direction == 'backward' ? range.end : range.start;\n\n\tif ( schema.checkChild( position, '$text' ) ) {\n\t\treturn position;\n\t}\n\n\tfor ( const { nextPosition } of range.getWalker( { direction } ) ) {\n\t\tif ( schema.checkChild( nextPosition, '$text' ) ) {\n\t\t\treturn nextPosition;\n\t\t}\n\t}\n}\n\n/**\n * Checks if the DOM range corresponding to the provided model range renders as a single line by analyzing DOMRects\n * (verifying if they visually wrap content to the next line).\n *\n * @param editing The editing controller.\n * @param modelRange The current table cell content range.\n * @param isForward The expected navigation direction.\n */\nfunction isSingleLineRange( editing: EditingController, modelRange: ModelRange, isForward: boolean ) {\n\tconst model = editing.model;\n\tconst domConverter = editing.view.domConverter;\n\n\t// Wrapped lines contain exactly the same position at the end of current line\n\t// and at the beginning of next line. That position's client rect is at the end\n\t// of current line. In case of caret at first position of the last line that 'dual'\n\t// position would be detected as it's not the last line.\n\tif ( isForward ) {\n\t\tconst probe = model.createSelection( modelRange.start );\n\n\t\tmodel.modifySelection( probe );\n\n\t\t// If the new position is at the end of the container then we can't use this position\n\t\t// because it would provide incorrect result for eg caption of image and selection\n\t\t// just before end of it. Also in this case there is no \"dual\" position.\n\t\tif ( !probe.focus!.isAtEnd && !modelRange.start.isEqual( probe.focus! ) ) {\n\t\t\tmodelRange = model.createRange( probe.focus!, modelRange.end );\n\t\t}\n\t}\n\n\tconst viewRange = editing.mapper.toViewRange( modelRange );\n\tconst domRange = domConverter.viewRangeToDom( viewRange );\n\tconst rects = Rect.getDomRangeRects( domRange );\n\n\tlet boundaryVerticalPosition;\n\n\tfor ( const rect of rects ) {\n\t\tif ( boundaryVerticalPosition === undefined ) {\n\t\t\tboundaryVerticalPosition = Math.round( rect.bottom );\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Let's check if this rect is in new line.\n\t\tif ( Math.round( rect.top ) >= boundaryVerticalPosition ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tboundaryVerticalPosition = Math.max( boundaryVerticalPosition, Math.round( rect.bottom ) );\n\t}\n\n\treturn true;\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/**\n * @module widget/widget\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tPointerObserver,\n\tMouseObserver,\n\tModelTreeWalker,\n\ttype ViewDocumentDomEventData,\n\ttype DowncastSelectionEvent,\n\ttype ViewDowncastWriter,\n\ttype ModelElement,\n\ttype ModelNode,\n\ttype ViewDocumentArrowKeyEvent,\n\ttype ViewDocumentPointerDownEvent,\n\ttype ViewDocumentMouseDownEvent,\n\ttype ViewElement,\n\ttype ModelSchema,\n\ttype ModelPosition,\n\ttype EditingView,\n\ttype ViewDocumentTabEvent,\n\ttype ViewDocumentKeyDownEvent,\n\ttype ViewNode,\n\ttype ViewRange,\n\ttype ViewPosition,\n\ttype ModelRange,\n\ttype Model,\n\ttype ModelSelection,\n\ttype ModelDocumentSelection\n} from '@ckeditor/ckeditor5-engine';\n\nimport { Delete, type ViewDocumentDeleteEvent } from '@ckeditor/ckeditor5-typing';\n\nimport {\n\tenv,\n\tkeyCodes,\n\tgetLocalizedArrowKeyCodeDirection,\n\tgetRangeFromMouseEvent,\n\tcompareArrays,\n\ttype EventInfo,\n\ttype KeystrokeInfo\n} from '@ckeditor/ckeditor5-utils';\n\nimport { WidgetTypeAround } from './widgettypearound/widgettypearound.js';\nimport { getClosestTypeAroundDomButton, getTypeAroundFakeCaretPosition } from './widgettypearound/utils.js';\nimport { verticalWidgetNavigationHandler } from './verticalnavigation.js';\nimport { getLabel, isWidget, WIDGET_SELECTED_CLASS_NAME } from './utils.js';\n\n/**\n * The widget plugin. It enables base support for widgets.\n *\n * See {@glink api/widget package page} for more details and documentation.\n *\n * This plugin enables multiple behaviors required by widgets:\n *\n * * The model to view selection converter for the editing pipeline (it handles widget custom selection rendering).\n * If a converted selection wraps around a widget element, that selection is marked as\n * {@link module:engine/view/selection~ViewSelection#isFake fake}. Additionally, the `ck-widget_selected` CSS class\n * is added to indicate that widget has been selected.\n * * The mouse and keyboard events handling on and around widget elements.\n */\nexport class Widget extends Plugin {\n\t/**\n\t * Holds previously selected widgets.\n\t */\n\tprivate _previouslySelected = new Set<ViewElement>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Widget' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ WidgetTypeAround, Delete ]> {\n\t\treturn [ WidgetTypeAround, Delete ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = editor.t;\n\n\t\t// Model to view selection converter.\n\t\t// Converts selection placed over widget element to fake selection.\n\t\t//\n\t\t// By default, the selection is downcasted by the engine to surround the attribute element, even though its only\n\t\t// child is an inline widget. A similar thing also happens when a collapsed marker is rendered as a UI element\n\t\t// next to an inline widget: the view selection contains both the widget and the marker.\n\t\t//\n\t\t// This prevents creating a correct fake selection when this inline widget is selected. Normalize the selection\n\t\t// in these cases based on the model:\n\t\t//\n\t\t//\t\t[<attributeElement><inlineWidget /></attributeElement>] -> <attributeElement>[<inlineWidget />]</attributeElement>\n\t\t//\t\t[<uiElement></uiElement><inlineWidget />] -> <uiElement></uiElement>[<inlineWidget />]\n\t\t//\n\t\t// Thanks to this:\n\t\t//\n\t\t// * fake selection can be set correctly,\n\t\t// * any logic depending on (View)Selection#getSelectedElement() also works OK.\n\t\t//\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/9524.\n\t\tthis.editor.editing.downcastDispatcher.on<DowncastSelectionEvent>( 'selection', ( evt, data, conversionApi ) => {\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst modelSelection = data.selection;\n\n\t\t\t// The collapsed selection can't contain any widget.\n\t\t\tif ( modelSelection.isCollapsed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\n\t\t\tif ( !selectedModelElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement( selectedModelElement )!;\n\n\t\t\tif ( !isWidget( selectedViewElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !conversionApi.consumable.consume( modelSelection, 'selection' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tviewWriter.setSelection( viewWriter.createRangeOn( selectedViewElement ), {\n\t\t\t\tfake: true,\n\t\t\t\tlabel: getLabel( selectedViewElement )\n\t\t\t} );\n\t\t} );\n\n\t\t// Mark all widgets inside the selection with the css class.\n\t\t// This handler is registered at the 'low' priority so it's triggered after the real selection conversion.\n\t\tthis.editor.editing.downcastDispatcher.on<DowncastSelectionEvent>( 'selection', ( evt, data, conversionApi ) => {\n\t\t\t// Remove selected class from previously selected widgets.\n\t\t\tthis._clearPreviouslySelectedWidgets( conversionApi.writer );\n\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst viewSelection = viewWriter.document.selection;\n\n\t\t\tlet lastMarked = null;\n\n\t\t\tfor ( const range of viewSelection.getRanges() ) {\n\t\t\t\t// Note: There could be multiple selected widgets in a range but no fake selection.\n\t\t\t\t// All of them must be marked as selected, for instance [<widget></widget><widget></widget>]\n\t\t\t\tfor ( const value of range ) {\n\t\t\t\t\tconst node = value.item as ViewElement;\n\t\t\t\t\t// Do not mark nested widgets in selected one. See: https://github.com/ckeditor/ckeditor5/issues/4594\n\t\t\t\t\tif ( isWidget( node ) && !isChild( node, lastMarked ) ) {\n\t\t\t\t\t\tviewWriter.addClass( WIDGET_SELECTED_CLASS_NAME, node );\n\t\t\t\t\t\tthis._previouslySelected.add( node );\n\t\t\t\t\t\tlastMarked = node;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\n\t\t// If mouse down is pressed on widget - create selection over whole widget.\n\t\tview.addObserver( MouseObserver );\n\t\tview.addObserver( PointerObserver );\n\t\tthis.listenTo<ViewDocumentMouseDownEvent>( viewDocument, 'mousedown', ( ...args ) => this._onMousedown( ...args ) );\n\t\tthis.listenTo<ViewDocumentPointerDownEvent>( viewDocument, 'pointerdown', ( ...args ) => this._onPointerdown( ...args ) );\n\n\t\t// There are two keydown listeners working on different priorities. This allows other\n\t\t// features such as WidgetTypeAround or TableKeyboard to attach their listeners in between\n\t\t// and customize the behavior even further in different content/selection scenarios.\n\t\t//\n\t\t// * The first listener handles changing the selection on arrow key press\n\t\t// if the widget is selected or if the selection is next to a widget and the widget\n\t\t// should become selected upon the arrow key press.\n\t\t//\n\t\t// * The second (late) listener makes sure the default browser action on arrow key press is\n\t\t// prevented when a widget is selected. This prevents the selection from being moved\n\t\t// from a fake selection container.\n\t\tthis.listenTo<ViewDocumentArrowKeyEvent>( viewDocument, 'arrowKey', ( ...args ) => {\n\t\t\tthis._handleSelectionChangeOnArrowKeyPress( ...args );\n\t\t}, { context: [ isWidget, '$text' ] } );\n\n\t\tthis.listenTo<ViewDocumentArrowKeyEvent>( viewDocument, 'arrowKey', ( ...args ) => {\n\t\t\tthis._preventDefaultOnArrowKeyPress( ...args );\n\t\t}, { context: '$root' } );\n\n\t\tthis.listenTo<ViewDocumentArrowKeyEvent>(\n\t\t\tviewDocument,\n\t\t\t'arrowKey',\n\t\t\tverticalWidgetNavigationHandler( this.editor.editing ),\n\t\t\t{ context: '$text' }\n\t\t);\n\n\t\t// Handle custom delete behaviour.\n\t\tthis.listenTo<ViewDocumentDeleteEvent>( viewDocument, 'delete', ( evt, data ) => {\n\t\t\tif ( this._handleDelete( data.direction == 'forward' ) ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: '$root' } );\n\n\t\t// Handle Tab/Shift+Tab key.\n\t\tthis.listenTo<ViewDocumentTabEvent>( viewDocument, 'tab', ( evt, data ) => {\n\t\t\tif ( this._selectNextEditable( data.shiftKey ? 'backward' : 'forward' ) ) {\n\t\t\t\tview.scrollToTheSelection();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, {\n\t\t\tcontext: node => isWidget( node ) || node.is( 'editableElement' ),\n\t\t\tpriority: 'low'\n\t\t} );\n\n\t\t// Handle Esc key while inside a nested editable.\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( evt, data ) => {\n\t\t\tif ( data.keystroke != keyCodes.esc ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this._selectAncestorWidget() ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, {\n\t\t\tcontext: node => node.is( 'editableElement' ),\n\t\t\tpriority: 'low'\n\t\t} );\n\n\t\t// Add the information about the keystrokes to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfoGroup( {\n\t\t\tid: 'widget',\n\t\t\tlabel: t( 'Keystrokes that can be used when a widget is selected (for example: image, table, etc.)' ),\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move focus from an editable area back to the parent widget' ),\n\t\t\t\t\tkeystroke: 'Esc'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Insert a new paragraph directly after a widget' ),\n\t\t\t\t\tkeystroke: 'Enter'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Insert a new paragraph directly before a widget' ),\n\t\t\t\t\tkeystroke: 'Shift+Enter'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move the caret to allow typing directly before a widget' ),\n\t\t\t\t\tkeystroke: [ [ 'arrowup' ], [ 'arrowleft' ] ]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move the caret to allow typing directly after a widget' ),\n\t\t\t\t\tkeystroke: [ [ 'arrowdown' ], [ 'arrowright' ] ]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Handles {@link module:engine/view/document~ViewDocument#event:mousedown mousedown} events on widget elements.\n\t */\n\tprivate _onMousedown( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData<MouseEvent> ) {\n\t\tconst element: ViewElement | null = domEventData.target;\n\n\t\t// Some of DOM elements have no view element representation so it may be null.\n\t\tif ( !element ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If triple click should select entire paragraph.\n\t\tif ( domEventData.domEvent.detail >= 3 ) {\n\t\t\tif ( this._selectBlockContent( element ) ) {\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handles {@link module:engine/view/document~ViewDocument#event:pointerdown pointerdown} events on widget elements.\n\t */\n\tprivate _onPointerdown( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData<PointerEvent> ) {\n\t\tif ( !domEventData.domEvent.isPrimary ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Canceling this event on a type around button would suppress the compatibility `mousedown`\n\t\t// event that activates the button on touch devices. See https://github.com/ckeditor/ckeditor5/issues/20103.\n\t\tif ( getClosestTypeAroundDomButton( domEventData.domTarget ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tlet element: ViewElement | null = domEventData.target;\n\n\t\t// Some of DOM elements have no view element representation so it may be null.\n\t\tif ( !element ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If target is not a widget element - check if one of the ancestors is.\n\t\tif ( !isWidget( element ) ) {\n\t\t\tconst editableOrWidgetElement = findClosestEditableOrWidgetAncestor( element );\n\n\t\t\tif ( !editableOrWidgetElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isWidget( editableOrWidgetElement ) ) {\n\t\t\t\telement = editableOrWidgetElement;\n\t\t\t} else {\n\t\t\t\t// Pick view range from the point where the mouse was clicked.\n\t\t\t\tconst clickTargetFromPoint = getElementFromMouseEvent( view, domEventData );\n\n\t\t\t\tif ( clickTargetFromPoint && isWidget( clickTargetFromPoint ) ) {\n\t\t\t\t\telement = clickTargetFromPoint;\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// On Android and iOS selection would jump to the first table cell, on other devices\n\t\t// we can't block it (and don't need to) because of drag and drop support.\n\t\t// In iOS drag and drop works anyway on a long press.\n\t\tif ( env.isAndroid || env.isiOS ) {\n\t\t\tdomEventData.preventDefault();\n\t\t}\n\n\t\t// Focus editor if is not focused already.\n\t\tif ( !viewDocument.isFocused ) {\n\t\t\tview.focus();\n\t\t}\n\n\t\t// Create model selection over widget.\n\t\tconst modelElement = editor.editing.mapper.toModelElement( element );\n\n\t\tthis._setSelectionOverElement( modelElement! );\n\t}\n\n\t/**\n\t * Selects entire block content, e.g. on triple click it selects entire paragraph.\n\t */\n\tprivate _selectBlockContent( element: ViewElement ): boolean {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst schema = model.schema;\n\n\t\tconst viewElement = mapper.findMappedViewAncestor( this.editor.editing.view.createPositionAt( element, 0 ) );\n\t\tconst modelElement = findTextBlockAncestor( mapper.toModelElement( viewElement )!, model.schema );\n\n\t\tif ( !modelElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst nextTextBlock = !schema.isLimit( modelElement ) ?\n\t\t\t\tfindNextTextBlock( writer.createPositionAfter( modelElement ), schema ) :\n\t\t\t\tnull;\n\n\t\t\tconst start = writer.createPositionAt( modelElement, 0 );\n\t\t\tconst end = nextTextBlock ?\n\t\t\t\twriter.createPositionAt( nextTextBlock, 0 ) :\n\t\t\t\twriter.createPositionAt( modelElement, 'end' );\n\n\t\t\twriter.setSelection( writer.createRange( start, end ) );\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and changes\n\t * the model selection when:\n\t *\n\t * * arrow key is pressed when the widget is selected,\n\t * * the selection is next to a widget and the widget should become selected upon the arrow key press.\n\t *\n\t * See {@link #_preventDefaultOnArrowKeyPress}.\n\t */\n\tprivate _handleSelectionChangeOnArrowKeyPress( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData & KeystrokeInfo ) {\n\t\tconst keyCode = domEventData.keyCode;\n\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst selectedElement = modelSelection.getSelectedElement();\n\t\tconst direction = getLocalizedArrowKeyCodeDirection( keyCode, this.editor.locale.contentLanguageDirection );\n\t\tconst isForward = direction == 'down' || direction == 'right';\n\t\tconst isVerticalNavigation = direction == 'up' || direction == 'down';\n\n\t\t// Collapsing a non-collapsed selection.\n\t\tif ( !domEventData.shiftKey && !modelSelection.isCollapsed ) {\n\t\t\t// If object element is selected or object is at the edge of selection.\n\t\t\tif ( hasObjectAtEdge( modelSelection, schema ) ) {\n\t\t\t\tconst position = isForward ? modelSelection.getLastPosition()! : modelSelection.getFirstPosition()!;\n\t\t\t\tconst newRange = schema.getNearestSelectionRange( position, isForward ? 'forward' : 'backward' );\n\n\t\t\t\tif ( newRange ) {\n\t\t\t\t\tmodel.change( writer => {\n\t\t\t\t\t\twriter.setSelection( newRange );\n\t\t\t\t\t} );\n\n\t\t\t\t\tdomEventData.preventDefault();\n\t\t\t\t\teventInfo.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Else is handled by the browser.\n\t\t\treturn;\n\t\t}\n\n\t\t// Adjust selection for fake caret and for selection direction when single object is selected.\n\t\tconst originalSelection = getModelSelectionAdjusted( model, isForward );\n\n\t\t// Clone current selection to use it as a probe. We must leave default selection as it is so it can return\n\t\t// to its current state after undo.\n\t\tconst probe = model.createSelection( originalSelection );\n\n\t\tmodel.modifySelection( probe, { direction: isForward ? 'forward' : 'backward' } );\n\n\t\t// The selection didn't change so there is nothing there.\n\t\tif ( probe.isEqual( originalSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Move probe one step further to make it visually recognizable\n\t\t// but only when there is a block allowing text, and we are not already on the exiting edge of it.\n\t\tif (\n\t\t\tprobe.focus!.isTouching( originalSelection.focus! ) &&\n\t\t\tschema.checkChild( probe.focus!.parent as ModelElement, '$text' ) &&\n\t\t\t( isForward ? !probe.focus!.isAtEnd : !probe.focus!.isAtStart )\n\t\t) {\n\t\t\tmodel.modifySelection( probe, { direction: isForward ? 'forward' : 'backward' } );\n\t\t}\n\n\t\tconst lastSelectedNode = isForward ? originalSelection.focus!.nodeBefore : originalSelection.focus!.nodeAfter;\n\n\t\tconst nodeBeforeProbe = probe.focus!.nodeBefore;\n\t\tconst nodeAfterProbe = probe.focus!.nodeAfter;\n\t\tconst lastProbeNode = isForward ? nodeBeforeProbe : nodeAfterProbe;\n\n\t\tif ( domEventData.shiftKey ) {\n\t\t\t// Expand selection from a selected object or include object in selection.\n\t\t\tif (\n\t\t\t\tselectedElement && schema.isObject( selectedElement ) ||\n\t\t\t\tlastProbeNode && schema.isObject( lastProbeNode ) ||\n\t\t\t\tlastSelectedNode && schema.isObject( lastSelectedNode )\n\t\t\t) {\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\twriter.setSelection( probe );\n\t\t\t\t} );\n\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\teventInfo.stop();\n\t\t\t}\n\t\t} else {\n\t\t\t// Select an object when moving caret over it.\n\t\t\tif ( lastProbeNode && schema.isObject( lastProbeNode ) ) {\n\t\t\t\tif ( schema.isInline( lastProbeNode ) && isVerticalNavigation ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\twriter.setSelection( lastProbeNode, 'on' );\n\t\t\t\t} );\n\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\teventInfo.stop();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and prevents\n\t * the default browser behavior to make sure the fake selection is not being moved from a fake selection\n\t * container.\n\t *\n\t * See {@link #_handleSelectionChangeOnArrowKeyPress}.\n\t */\n\tprivate _preventDefaultOnArrowKeyPress( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData ) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst objectElement = model.document.selection.getSelectedElement();\n\n\t\t// If object element is selected.\n\t\tif ( objectElement && schema.isObject( objectElement ) ) {\n\t\t\tdomEventData.preventDefault();\n\t\t\teventInfo.stop();\n\t\t}\n\t}\n\n\t/**\n\t * Handles delete keys: backspace and delete.\n\t *\n\t * @param isForward Set to true if delete was performed in forward direction.\n\t * @returns Returns `true` if keys were handled correctly.\n\t */\n\tprivate _handleDelete( isForward: boolean ) {\n\t\tconst modelDocument = this.editor.model.document;\n\t\tconst modelSelection = modelDocument.selection;\n\n\t\t// Do nothing when the read only mode is enabled.\n\t\tif ( !this.editor.model.canEditAt( modelSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do nothing on non-collapsed selection.\n\t\tif ( !modelSelection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst objectElement = this._getObjectElementNextToSelection( isForward );\n\n\t\tif ( objectElement ) {\n\t\t\tthis.editor.model.change( writer => {\n\t\t\t\tlet previousNode = modelSelection.anchor!.parent;\n\n\t\t\t\t// Remove previous element if empty.\n\t\t\t\twhile ( previousNode.isEmpty ) {\n\t\t\t\t\tconst nodeToRemove = previousNode;\n\t\t\t\t\tpreviousNode = nodeToRemove.parent!;\n\n\t\t\t\t\twriter.remove( nodeToRemove as ModelElement );\n\t\t\t\t}\n\n\t\t\t\tthis._setSelectionOverElement( objectElement );\n\t\t\t} );\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Sets {@link module:engine/model/selection~ModelSelection document's selection} over given element.\n\t *\n\t * @internal\n\t */\n\tpublic _setSelectionOverElement( element: ModelNode ): void {\n\t\tthis.editor.model.change( writer => {\n\t\t\twriter.setSelection( writer.createRangeOn( element ) );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks if {@link module:engine/model/element~ModelElement element} placed next to the current\n\t * {@link module:engine/model/selection~ModelSelection model selection} exists and is marked in\n\t * {@link module:engine/model/schema~ModelSchema schema} as `object`.\n\t *\n\t * @internal\n\t * @param forward Direction of checking.\n\t */\n\tpublic _getObjectElementNextToSelection( forward: boolean ): ModelElement | null {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst modelSelection = model.document.selection;\n\n\t\t// Clone current selection to use it as a probe. We must leave default selection as it is so it can return\n\t\t// to its current state after undo.\n\t\tconst probe = model.createSelection( modelSelection );\n\t\tmodel.modifySelection( probe, { direction: forward ? 'forward' : 'backward' } );\n\n\t\t// The selection didn't change so there is nothing there.\n\t\tif ( probe.isEqual( modelSelection ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst objectElement = forward ? probe.focus!.nodeBefore : probe.focus!.nodeAfter;\n\n\t\tif ( objectElement && schema.isObject( objectElement ) ) {\n\t\t\treturn objectElement as ModelElement;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Removes CSS class from previously selected widgets.\n\t */\n\tprivate _clearPreviouslySelectedWidgets( writer: ViewDowncastWriter ) {\n\t\tfor ( const widget of this._previouslySelected ) {\n\t\t\twriter.removeClass( WIDGET_SELECTED_CLASS_NAME, widget );\n\t\t}\n\n\t\tthis._previouslySelected.clear();\n\t}\n\n\t/**\n\t * Moves the document selection into the next editable or block widget.\n\t */\n\tprivate _selectNextEditable( direction: 'backward' | 'forward' ): boolean {\n\t\tconst editing = this.editor.editing;\n\t\tconst view = editing.view;\n\t\tconst model = this.editor.model;\n\t\tconst viewSelection = view.document.selection;\n\t\tconst modelSelection = model.document.selection;\n\n\t\t// Find start position.\n\t\tlet startPosition: ViewPosition;\n\n\t\t// Multiple table cells are selected - use focus cell.\n\t\tif ( modelSelection.rangeCount > 1 ) {\n\t\t\tconst selectionRange = modelSelection.isBackward ?\n\t\t\t\tmodelSelection.getFirstRange()! :\n\t\t\t\tmodelSelection.getLastRange()!;\n\n\t\t\tstartPosition = editing.mapper.toViewPosition(\n\t\t\t\tdirection == 'forward' ?\n\t\t\t\t\tselectionRange.end :\n\t\t\t\t\tselectionRange.start\n\t\t\t);\n\t\t} else {\n\t\t\tstartPosition = direction == 'forward' ?\n\t\t\t\tviewSelection.getFirstPosition()! :\n\t\t\t\tviewSelection.getLastPosition()!;\n\t\t}\n\n\t\tconst modelRange = this._findNextFocusRange( startPosition, direction );\n\n\t\tif ( modelRange ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( modelRange );\n\t\t\t} );\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Looks for next focus point in the document starting from the given view position and direction.\n\t * The focus point is either a block widget or an editable.\n\t *\n\t * @internal\n\t */\n\tpublic _findNextFocusRange( startPosition: ViewPosition, direction: 'backward' | 'forward' ): ModelRange | null {\n\t\tconst editing = this.editor.editing;\n\t\tconst view = editing.view;\n\t\tconst model = this.editor.model;\n\t\tconst viewSelection = view.document.selection;\n\n\t\tconst editableElement = viewSelection.editableElement!;\n\t\tconst editablePath = editableElement.getPath();\n\n\t\tlet selectedElement = viewSelection.getSelectedElement();\n\n\t\tif ( selectedElement && !isWidget( selectedElement ) ) {\n\t\t\tselectedElement = null;\n\t\t}\n\n\t\t// Look for the next editable.\n\t\tconst viewRange = direction == 'forward' ?\n\t\t\tview.createRange( startPosition, view.createPositionAt( startPosition.root as ViewNode, 'end' ) ) :\n\t\t\tview.createRange( view.createPositionAt( startPosition.root as ViewNode, 0 ), startPosition );\n\n\t\tfor ( const { nextPosition } of viewRange.getWalker( { direction } ) ) {\n\t\t\tconst item = nextPosition.parent as ViewNode;\n\n\t\t\t// Some widget along the way except the currently selected one.\n\t\t\tif ( isWidget( item ) && item != selectedElement ) {\n\t\t\t\tconst modelElement = editing.mapper.toModelElement( item as ViewElement )!;\n\n\t\t\t\t// Do not select inline widgets.\n\t\t\t\tif ( !model.schema.isBlock( modelElement ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Do not select widget itself when going out of widget or iterating over sibling elements in a widget.\n\t\t\t\tif ( compareArrays( editablePath, item.getPath() ) != 'extension' ) {\n\t\t\t\t\treturn model.createRangeOn( modelElement );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Encountered an editable element.\n\t\t\telse if ( item.is( 'editableElement' ) ) {\n\t\t\t\t// Ignore the current editable for text selection,\n\t\t\t\t// but use it when widget was selected to be able to jump after the widget.\n\t\t\t\tif ( item == editableElement && !selectedElement ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst modelPosition = editing.mapper.toModelPosition( nextPosition );\n\t\t\t\tconst newRange = model.schema.getNearestSelectionRange( modelPosition, direction );\n\n\t\t\t\t// There is nothing to select so just jump to the next one.\n\t\t\t\tif ( !newRange ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// In the same editable while widget was selected - do not select the editable content.\n\t\t\t\tif ( item == editableElement && selectedElement ) {\n\t\t\t\t\treturn newRange;\n\t\t\t\t}\n\n\t\t\t\t// Select the content of editable element when iterating over sibling editable elements\n\t\t\t\t// or going deeper into nested widgets.\n\t\t\t\tif ( compareArrays( editablePath, item.getPath() ) != 'extension' ) {\n\t\t\t\t\t// Find a limit element closest to the new selection range.\n\t\t\t\t\treturn model.createRangeIn( model.schema.getLimitElement( newRange ) );\n\t\t\t\t}\n\n\t\t\t\treturn newRange;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Updates the document selection so that it selects first ancestor widget.\n\t */\n\tprivate _selectAncestorWidget(): boolean {\n\t\tconst editor = this.editor;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst selection = editor.editing.view.document.selection;\n\n\t\tconst positionParent = selection.getFirstPosition()!.parent;\n\n\t\tconst positionParentElement = positionParent.is( '$text' ) ?\n\t\t\tpositionParent.parent as ViewElement :\n\t\t\tpositionParent as ViewElement;\n\n\t\tconst viewElement = positionParentElement.findAncestor( isWidget );\n\n\t\tif ( !viewElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst modelElement = mapper.toModelElement( viewElement );\n\n\t\tif ( !modelElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\teditor.model.change( writer => {\n\t\t\twriter.setSelection( modelElement, 'on' );\n\t\t} );\n\n\t\treturn true;\n\t}\n}\n\n/**\n * Returns true if there is an object on an edge of the given selection.\n */\nfunction hasObjectAtEdge( modelSelection: ModelSelection | ModelDocumentSelection, schema: ModelSchema ): boolean {\n\tconst firstPosition = modelSelection.getFirstPosition()!;\n\tconst lastPosition = modelSelection.getLastPosition()!;\n\n\tconst firstSelectedNode = firstPosition.nodeAfter;\n\tconst lastSelectedNode = lastPosition.nodeBefore;\n\n\treturn (\n\t\t!!firstSelectedNode && schema.isObject( firstSelectedNode ) ||\n\t\t!!lastSelectedNode && schema.isObject( lastSelectedNode )\n\t);\n}\n\n/**\n * Returns new instance of the model selection adjusted for fake caret and selection direction on widgets.\n */\nfunction getModelSelectionAdjusted( model: Model, isForward: boolean ): ModelSelection {\n\tconst modelSelection = model.document.selection;\n\tconst selectedElement = modelSelection.getSelectedElement();\n\n\t// Adjust selection for fake caret.\n\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( modelSelection );\n\n\tif ( selectedElement && typeAroundFakeCaretPosition == 'before' ) {\n\t\treturn model.createSelection( selectedElement, 'before' );\n\t} else if ( selectedElement && typeAroundFakeCaretPosition == 'after' ) {\n\t\treturn model.createSelection( selectedElement, 'after' );\n\t}\n\n\t// Make a copy of selection with adjusted direction for object selected.\n\treturn model.createSelection( modelSelection.getRanges(), {\n\t\tbackward: !!selectedElement && model.schema.isObject( selectedElement ) ? !isForward : modelSelection.isBackward\n\t} );\n}\n\n/**\n * Finds the closest ancestor element that is either an editable element or a widget.\n *\n * @param element The element from which to start searching.\n * @returns The closest ancestor element that is either an editable element or a widget, or null if none is found.\n */\nfunction findClosestEditableOrWidgetAncestor( element: ViewElement ): ViewElement | null {\n\tlet currentElement: ViewElement | null = element;\n\n\twhile ( currentElement ) {\n\t\tif ( currentElement.is( 'editableElement' ) || isWidget( currentElement ) ) {\n\t\t\treturn currentElement;\n\t\t}\n\n\t\tcurrentElement = currentElement.parent as ViewElement | null;\n\t}\n\n\treturn null;\n}\n\n/**\n * Retrieves the ViewElement associated with a mouse event in the editing view.\n *\n * @param view The editing view.\n * @param domEventData The DOM event data containing the mouse event.\n * @returns The ViewElement associated with the mouse event, or null if not found.\n */\nfunction getElementFromMouseEvent( view: EditingView, domEventData: ViewDocumentDomEventData<MouseEvent> ): ViewElement | null {\n\tconst domRange = getRangeFromMouseEvent( domEventData.domEvent );\n\tlet viewRange: ViewRange | null;\n\n\tif ( domRange ) {\n\t\tviewRange = view.domConverter.domRangeToView( domRange );\n\t} else {\n\t\t// Fallback to create range in target element. It happens frequently on Safari browser.\n\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/16978\n\t\tviewRange = view.createRange( view.createPositionAt( domEventData.target, 0 ) );\n\t}\n\n\tif ( !viewRange ) {\n\t\treturn null;\n\t}\n\n\tconst viewPosition = viewRange.start;\n\n\tif ( !viewPosition.parent ) {\n\t\treturn null;\n\t}\n\n\tlet viewNode = viewPosition.parent;\n\n\tif ( viewPosition.parent.is( 'editableElement' ) ) {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( viewPosition.isAtEnd && viewPosition.nodeBefore ) {\n\t\t\t// Click after a widget tend to return position at the end of the editable element\n\t\t\t// so use the node before it if range is at the end of a parent.\n\t\t\tviewNode = viewPosition.nodeBefore as ViewNode;\n\t\t} else if ( viewPosition.isAtStart && viewPosition.nodeAfter ) {\n\t\t\t// Click before a widget tend to return position at the start of the editable element\n\t\t\t// so use the node after it if range is at the start of a parent.\n\t\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/16992\n\t\t\tviewNode = viewPosition.nodeAfter as ViewNode;\n\t\t}\n\t}\n\n\tif ( viewNode.is( '$text' ) ) {\n\t\treturn viewNode.parent as ViewElement;\n\t}\n\n\treturn viewNode as ViewElement;\n}\n\n/**\n * Checks whether the specified `element` is a child of the `parent` element.\n *\n * @param element An element to check.\n * @param parent A parent for the element.\n */\nfunction isChild( element: ViewElement, parent: ViewElement | null ) {\n\tif ( !parent ) {\n\t\treturn false;\n\t}\n\n\treturn Array.from( element.getAncestors() ).includes( parent );\n}\n\n/**\n * Returns nearest text block ancestor.\n */\nfunction findTextBlockAncestor( modelElement: ModelElement, schema: ModelSchema ): ModelElement | null {\n\tfor ( const element of modelElement.getAncestors( { includeSelf: true, parentFirst: true } ) ) {\n\t\tif ( schema.checkChild( element as ModelElement, '$text' ) ) {\n\t\t\treturn element as ModelElement;\n\t\t}\n\n\t\t// Do not go beyond nested editable.\n\t\tif ( schema.isLimit( element ) && !schema.isObject( element ) ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns next text block where could put selection.\n */\nfunction findNextTextBlock( position: ModelPosition, schema: ModelSchema ): ModelElement | null {\n\tconst treeWalker = new ModelTreeWalker( { startPosition: position } );\n\n\tfor ( const { item } of treeWalker ) {\n\t\tif ( schema.isLimit( item ) || !item.is( 'element' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( schema.checkChild( item, '$text' ) ) {\n\t\t\treturn item;\n\t\t}\n\t}\n\n\treturn null;\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/**\n * @module widget/widgettoolbarrepository\n */\n\nimport { Plugin, type Editor, type ToolbarConfigItem, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type { ViewDocumentSelection, ViewElement } from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tBalloonPanelView,\n\tContextualBalloon,\n\tToolbarView,\n\ttype BalloonToolbar,\n\ttype BalloonToolbarShowEvent,\n\ttype EditorUIUpdateEvent\n} from '@ckeditor/ckeditor5-ui';\n\nimport {\n\tCKEditorError,\n\tlogWarning,\n\ttype ObservableChangeEvent,\n\ttype PositioningFunction,\n\ttype RectSource\n} from '@ckeditor/ckeditor5-utils';\n\nimport { isWidget } from './utils.js';\n\n/**\n * Widget toolbar repository plugin. A central point for registering widget toolbars. This plugin handles the whole\n * toolbar rendering process and exposes a concise API.\n *\n * To add a toolbar for your widget use the {@link ~WidgetToolbarRepository#register `WidgetToolbarRepository#register()`} method.\n *\n * The following example comes from the {@link module:image/imagetoolbar~ImageToolbar} plugin:\n *\n * ```ts\n * class ImageToolbar extends Plugin {\n * \tstatic get requires(): PluginDependenciesOf<[ WidgetToolbarRepository ]> {\n * \t\treturn [ WidgetToolbarRepository ];\n * \t}\n *\n * \tafterInit() {\n * \t\tconst editor = this.editor;\n * \t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n *\n * \t\twidgetToolbarRepository.register( 'image', {\n * \t\t\titems: editor.config.get( 'image.toolbar' ),\n * \t\t\tgetRelatedElement: getClosestSelectedImageWidget\n * \t\t} );\n * \t}\n * }\n * ```\n */\nexport class WidgetToolbarRepository extends Plugin {\n\t/**\n\t * A map of toolbar definitions.\n\t */\n\tprivate _toolbarDefinitions = new Map<string, WidgetRepositoryToolbarDefinition>();\n\n\tprivate _balloon!: ContextualBalloon;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WidgetToolbarRepository' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Disables the default balloon toolbar for all widgets.\n\t\tif ( editor.plugins.has( 'BalloonToolbar' ) ) {\n\t\t\tconst balloonToolbar: BalloonToolbar = editor.plugins.get( 'BalloonToolbar' );\n\n\t\t\tthis.listenTo<BalloonToolbarShowEvent>( balloonToolbar, 'show', evt => {\n\t\t\t\tif ( isWidgetSelected( editor.editing.view.document.selection ) ) {\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t}, { priority: 'high' } );\n\t\t}\n\n\t\tthis._balloon = this.editor.plugins.get( 'ContextualBalloon' );\n\n\t\tthis.on<ObservableChangeEvent>( 'change:isEnabled', () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t} );\n\n\t\tthis.listenTo<EditorUIUpdateEvent>( editor.ui, 'update', () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t} );\n\n\t\t// UI#update is not fired after focus is back in editor, we need to check if balloon panel should be visible.\n\t\tthis.listenTo<ObservableChangeEvent>( editor.ui.focusTracker, 'change:isFocused', () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t}, { priority: 'low' } );\n\t}\n\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tfor ( const toolbarConfig of this._toolbarDefinitions.values() ) {\n\t\t\ttoolbarConfig.view.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Registers toolbar in the WidgetToolbarRepository. It renders it in the `ContextualBalloon` based on the value of the invoked\n\t * `getRelatedElement` function. Toolbar items are gathered from `items` array.\n\t * The balloon's CSS class is by default `ck-toolbar-container` and may be override with the `balloonClassName` option.\n\t *\n\t * Note: This method should be called in the {@link module:core/plugin~PluginInterface#afterInit `Plugin#afterInit()`}\n\t * callback (or later) to make sure that the given toolbar items were already registered by other plugins.\n\t *\n\t * @param toolbarId An id for the toolbar. Used to\n\t * @param options Detailed options\n\t * @param options.ariaLabel Label used by assistive technologies to describe this toolbar element.\n\t * @param options.items Array of toolbar items.\n\t * @param options.getRelatedElement Callback which returns an element the toolbar should be attached to.\n\t * @param options.balloonClassName CSS class for the widget balloon.\n\t */\n\tpublic register(\n\t\ttoolbarId: string,\n\t\t{\n\t\t\tariaLabel,\n\t\t\titems,\n\t\t\tgetRelatedElement,\n\t\t\tballoonClassName = 'ck-toolbar-container',\n\t\t\tpositions\n\t\t}: {\n\t\t\tariaLabel?: string;\n\t\t\titems: Array<ToolbarConfigItem>;\n\t\t\tgetRelatedElement: ( selection: ViewDocumentSelection ) => ( ViewElement | null );\n\t\t\tballoonClassName?: string;\n\t\t\tpositions?: ReadonlyArray<PositioningFunction>;\n\t\t}\n\t): void {\n\t\t// Trying to register a toolbar without any item.\n\t\tif ( !items.length ) {\n\t\t\t/**\n\t\t\t * When {@link module:widget/widgettoolbarrepository~WidgetToolbarRepository#register registering} a new widget toolbar, you\n\t\t\t * need to provide a non-empty array with the items that will be inserted into the toolbar.\n\t\t\t *\n\t\t\t * If you see this error when integrating the editor, you likely forgot to configure one of the widget toolbars.\n\t\t\t *\n\t\t\t * See for instance:\n\t\t\t *\n\t\t\t * * {@link module:table/tableconfig~TableConfig#contentToolbar `config.table.contentToolbar`}\n\t\t\t * * {@link module:image/imageconfig~ImageConfig#toolbar `config.image.toolbar`}\n\t\t\t *\n\t\t\t * @error widget-toolbar-no-items\n\t\t\t * @param {string} toolbarId The id of the toolbar that has not been configured correctly.\n\t\t\t */\n\t\t\tlogWarning( 'widget-toolbar-no-items', { toolbarId } );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst toolbarView = new ToolbarView( editor.locale );\n\n\t\ttoolbarView.ariaLabel = ariaLabel || t( 'Widget toolbar' );\n\n\t\tif ( this._toolbarDefinitions.has( toolbarId ) ) {\n\t\t\t/**\n\t\t\t * Toolbar with the given id was already added.\n\t\t\t *\n\t\t\t * @error widget-toolbar-duplicated\n\t\t\t * @param {string} toolbarId Toolbar id.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'widget-toolbar-duplicated', this, { toolbarId } );\n\t\t}\n\n\t\tconst toolbarDefinition: WidgetRepositoryToolbarDefinition = {\n\t\t\tview: toolbarView,\n\t\t\tgetRelatedElement,\n\t\t\tballoonClassName,\n\t\t\titemsConfig: items,\n\t\t\tpositions,\n\t\t\tinitialized: false\n\t\t};\n\n\t\t// Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n\t\teditor.ui.addToolbar( toolbarView, {\n\t\t\tisContextual: true,\n\t\t\tbeforeFocus: () => {\n\t\t\t\tconst relatedElement = getRelatedElement( editor.editing.view.document.selection );\n\n\t\t\t\tif ( relatedElement ) {\n\t\t\t\t\tthis._showToolbar( toolbarDefinition, relatedElement );\n\t\t\t\t}\n\t\t\t},\n\t\t\tafterBlur: () => {\n\t\t\t\tthis._hideToolbar( toolbarDefinition );\n\t\t\t}\n\t\t} );\n\n\t\tthis._toolbarDefinitions.set( toolbarId, toolbarDefinition );\n\t}\n\n\t/**\n\t * Iterates over stored toolbars and makes them visible or hidden.\n\t */\n\tprivate _updateToolbarsVisibility() {\n\t\tlet maxRelatedElementDepth = 0;\n\t\tlet deepestRelatedElement = null;\n\t\tlet deepestToolbarDefinition = null;\n\n\t\tfor ( const definition of this._toolbarDefinitions.values() ) {\n\t\t\tconst relatedElement = definition.getRelatedElement( this.editor.editing.view.document.selection );\n\n\t\t\tif ( !this.isEnabled || !relatedElement ) {\n\t\t\t\tif ( this._isToolbarInBalloon( definition ) ) {\n\t\t\t\t\tthis._hideToolbar( definition );\n\t\t\t\t}\n\t\t\t} else if ( !this.editor.ui.focusTracker.isFocused ) {\n\t\t\t\tif ( this._isToolbarVisible( definition ) ) {\n\t\t\t\t\tthis._hideToolbar( definition );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst relatedElementDepth = relatedElement.getAncestors().length;\n\n\t\t\t\t// Many toolbars can express willingness to be displayed but they do not know about\n\t\t\t\t// each other. Figure out which toolbar is deepest in the view tree to decide which\n\t\t\t\t// should be displayed. For instance, if a selected image is inside a table cell, display\n\t\t\t\t// the ImageToolbar rather than the TableToolbar (https://github.com/ckeditor/ckeditor5-widget/issues/60).\n\t\t\t\tif ( relatedElementDepth > maxRelatedElementDepth ) {\n\t\t\t\t\tmaxRelatedElementDepth = relatedElementDepth;\n\t\t\t\t\tdeepestRelatedElement = relatedElement;\n\t\t\t\t\tdeepestToolbarDefinition = definition;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( deepestToolbarDefinition ) {\n\t\t\tthis._showToolbar( deepestToolbarDefinition, deepestRelatedElement! );\n\t\t}\n\t}\n\n\t/**\n\t * Hides the given toolbar.\n\t */\n\tprivate _hideToolbar( toolbarDefinition: WidgetRepositoryToolbarDefinition ) {\n\t\tthis._balloon.remove( toolbarDefinition.view );\n\t\tthis.stopListening( this._balloon, 'change:visibleView' );\n\t}\n\n\t/**\n\t * Shows up the toolbar if the toolbar is not visible.\n\t * Otherwise, repositions the toolbar's balloon when toolbar's view is the most top view in balloon stack.\n\t *\n\t * It might happen here that the toolbar's view is under another view. Then do nothing as the other toolbar view\n\t * should be still visible after the {@link module:ui/editorui/editorui~EditorUI#event:update}.\n\t */\n\tprivate _showToolbar(\n\t\ttoolbarDefinition: WidgetRepositoryToolbarDefinition,\n\t\trelatedElement: ViewElement\n\t) {\n\t\tif ( this._isToolbarVisible( toolbarDefinition ) ) {\n\t\t\trepositionContextualBalloon( this.editor, relatedElement, toolbarDefinition.positions );\n\t\t} else if ( !this._isToolbarInBalloon( toolbarDefinition ) ) {\n\t\t\tif ( !toolbarDefinition.initialized ) {\n\t\t\t\ttoolbarDefinition.initialized = true;\n\t\t\t\ttoolbarDefinition.view.fillFromConfig( toolbarDefinition.itemsConfig, this.editor.ui.componentFactory );\n\t\t\t}\n\n\t\t\tthis._balloon.add( {\n\t\t\t\tview: toolbarDefinition.view,\n\t\t\t\tposition: getBalloonPositionData( this.editor, relatedElement, toolbarDefinition.positions ),\n\t\t\t\tballoonClassName: toolbarDefinition.balloonClassName\n\t\t\t} );\n\n\t\t\t// Update toolbar position each time stack with toolbar view is switched to visible.\n\t\t\t// This is in a case target element has changed when toolbar was in invisible stack\n\t\t\t// e.g. target image was wrapped by a block quote.\n\t\t\t// See https://github.com/ckeditor/ckeditor5-widget/issues/92.\n\t\t\tthis.listenTo<ObservableChangeEvent>( this._balloon, 'change:visibleView', () => {\n\t\t\t\tfor ( const definition of this._toolbarDefinitions.values() ) {\n\t\t\t\t\tif ( this._isToolbarVisible( definition ) ) {\n\t\t\t\t\t\tconst relatedElement = definition.getRelatedElement( this.editor.editing.view.document.selection );\n\t\t\t\t\t\trepositionContextualBalloon( this.editor, relatedElement!, toolbarDefinition.positions );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tprivate _isToolbarVisible( toolbar: WidgetRepositoryToolbarDefinition ) {\n\t\treturn this._balloon.visibleView === toolbar.view;\n\t}\n\n\tprivate _isToolbarInBalloon( toolbar: WidgetRepositoryToolbarDefinition ) {\n\t\treturn this._balloon.hasView( toolbar.view );\n\t}\n}\n\nfunction repositionContextualBalloon( editor: Editor, relatedElement: ViewElement, positions?: ReadonlyArray<PositioningFunction> ) {\n\tconst balloon: ContextualBalloon = editor.plugins.get( 'ContextualBalloon' );\n\tconst position = getBalloonPositionData( editor, relatedElement, positions );\n\n\tballoon.updatePosition( position );\n}\n\nfunction getBalloonPositionData( editor: Editor, relatedElement: ViewElement, positions?: ReadonlyArray<PositioningFunction> ) {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\n\treturn {\n\t\ttarget: editingView.domConverter.mapViewToDom( relatedElement ) as RectSource | undefined,\n\t\tpositions: positions || [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\tdefaultPositions.viewportStickyNorth\n\t\t]\n\t};\n}\n\nfunction isWidgetSelected( selection: ViewDocumentSelection ) {\n\tconst viewElement = selection.getSelectedElement();\n\n\treturn !!( viewElement && isWidget( viewElement ) );\n}\n\n/**\n * The toolbar definition object used by the toolbar repository to manage toolbars.\n * It contains information necessary to display the toolbar in the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} and\n * update it during its life (display) cycle.\n */\ninterface WidgetRepositoryToolbarDefinition {\n\n\t/**\n\t * The UI view of the toolbar.\n\t */\n\tview: ToolbarView;\n\n\t/**\n\t * A function that returns an engine {@link module:engine/view/view~EditingView}\n\t * element the toolbar is to be attached to. For instance, an image widget or a table widget (or `null` when\n\t * there is no such element). The function accepts an instance of {@link module:engine/view/selection~ViewSelection}.\n\t */\n\tgetRelatedElement: ( selection: ViewDocumentSelection ) => ViewElement | null | undefined;\n\n\t/**\n\t * CSS class for the widget balloon when a toolbar is displayed.\n\t */\n\tballoonClassName: string;\n\n\titemsConfig: Array<ToolbarConfigItem>;\n\n\tpositions?: ReadonlyArray<PositioningFunction>;\n\n\tinitialized: boolean;\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/**\n * @module widget/widgetresize/resizerstate\n */\n\nimport { ObservableMixin, Rect, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\n\nimport type { WidgetResizerOptions } from '../widgetresize.js';\nimport { calculateResizeHostPercentageWidth } from '../utils.js';\n\nconst WidgetResizeStateBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Stores the internal state of a single resizable object.\n */\nexport class WidgetResizeState extends WidgetResizeStateBase {\n\t/**\n\t * The position of the handle that initiated the resizing. E.g. `\"top-left\"`, `\"bottom-right\"` etc. or `null`\n\t * if unknown.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public activeHandlePosition: string | null;\n\n\t/**\n\t * The width (percents) proposed, but not committed yet, in the current resize process.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public proposedWidthPercents: number | null;\n\n\t/**\n\t * The width (pixels) proposed, but not committed yet, in the current resize process.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public proposedWidth: number | null;\n\n\t/**\n\t * The height (pixels) proposed, but not committed yet, in the current resize process.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public proposedHeight: number | null;\n\n\t/**\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public proposedHandleHostWidth: number | null;\n\n\t/**\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public proposedHandleHostHeight: number | null;\n\n\t/**\n\t * The reference point of the resizer where the dragging started. It is used to measure the distance the user cursor\n\t * traveled, so how much the image should be enlarged.\n\t * This information is only known after the DOM was rendered, so it will be updated later.\n\t *\n\t * @internal\n\t */\n\tpublic _referenceCoordinates: { x: number; y: number } | null;\n\n\t/**\n\t * Resizer options.\n\t */\n\tprivate readonly _options: WidgetResizerOptions;\n\n\t/**\n\t * The original width (pixels) of the resized object when the resize process was started.\n\t *\n\t * @readonly\n\t */\n\tprivate _originalWidth?: number;\n\n\t/**\n\t * The original height (pixels) of the resized object when the resize process was started.\n\t *\n\t * @readonly\n\t */\n\tprivate _originalHeight?: number;\n\n\t/**\n\t * The original width (percents) of the resized object when the resize process was started.\n\t *\n\t * @readonly\n\t */\n\tprivate _originalWidthPercents?: number;\n\n\t/**\n\t * A width to height ratio of the resized image.\n\t *\n\t * @readonly\n\t */\n\tprivate _aspectRatio?: number;\n\n\t/**\n\t * @param options Resizer options.\n\t */\n\tconstructor( options: WidgetResizerOptions ) {\n\t\tsuper();\n\n\t\tthis.set( 'activeHandlePosition', null );\n\t\tthis.set( 'proposedWidthPercents', null );\n\t\tthis.set( 'proposedWidth', null );\n\t\tthis.set( 'proposedHeight', null );\n\t\tthis.set( 'proposedHandleHostWidth', null );\n\t\tthis.set( 'proposedHandleHostHeight', null );\n\n\t\tthis._options = options;\n\t\tthis._referenceCoordinates = null;\n\t}\n\n\t/**\n\t * The original width (pixels) of the resized object when the resize process was started.\n\t */\n\tpublic get originalWidth(): number | undefined {\n\t\treturn this._originalWidth;\n\t}\n\n\t/**\n\t * The original height (pixels) of the resized object when the resize process was started.\n\t */\n\tpublic get originalHeight(): number | undefined {\n\t\treturn this._originalHeight;\n\t}\n\n\t/**\n\t * The original width (percents) of the resized object when the resize process was started.\n\t */\n\tpublic get originalWidthPercents(): number | undefined {\n\t\treturn this._originalWidthPercents;\n\t}\n\n\t/**\n\t * A width to height ratio of the resized image.\n\t */\n\tpublic get aspectRatio(): number | undefined {\n\t\treturn this._aspectRatio;\n\t}\n\n\t/**\n\t *\n\t * @param domResizeHandle The handle used to calculate the reference point.\n\t */\n\tpublic begin( domResizeHandle: HTMLElement, domHandleHost: HTMLElement, domResizeHost: HTMLElement ): void {\n\t\tconst clientRect = new Rect( domHandleHost );\n\n\t\tthis.activeHandlePosition = getHandlePosition( domResizeHandle )!;\n\n\t\tthis._referenceCoordinates = getAbsoluteBoundaryPoint( domHandleHost, getOppositePosition( this.activeHandlePosition ) );\n\n\t\tthis._originalWidth = clientRect.width;\n\t\tthis._originalHeight = clientRect.height;\n\n\t\tthis._aspectRatio = clientRect.width / clientRect.height;\n\n\t\tconst widthStyle = domResizeHost.style.width;\n\n\t\tif ( widthStyle && widthStyle.match( /^\\d+(\\.\\d*)?%$/ ) ) {\n\t\t\tthis._originalWidthPercents = parseFloat( widthStyle );\n\t\t} else {\n\t\t\tthis._originalWidthPercents = calculateResizeHostPercentageWidth( domResizeHost, clientRect );\n\t\t}\n\t}\n\n\tpublic update( newSize: {\n\t\twidth: number;\n\t\theight: number;\n\t\twidthPercents: number;\n\t\thandleHostWidth: number;\n\t\thandleHostHeight: number;\n\t} ): void {\n\t\tthis.proposedWidth = newSize.width;\n\t\tthis.proposedHeight = newSize.height;\n\t\tthis.proposedWidthPercents = newSize.widthPercents;\n\n\t\tthis.proposedHandleHostWidth = newSize.handleHostWidth;\n\t\tthis.proposedHandleHostHeight = newSize.handleHostHeight;\n\t}\n}\n\n/**\n * Returns coordinates of the top-left corner of an element, relative to the document's top-left corner.\n *\n * @param resizerPosition The position of the resize handle, e.g. `\"top-left\"`, `\"bottom-right\"`.\n */\nfunction getAbsoluteBoundaryPoint( element: HTMLElement, resizerPosition: string ) {\n\tconst elementRect = new Rect( element );\n\tconst positionParts = resizerPosition.split( '-' );\n\tconst ret = {\n\t\tx: positionParts[ 1 ] == 'right' ? elementRect.right : elementRect.left,\n\t\ty: positionParts[ 0 ] == 'bottom' ? elementRect.bottom : elementRect.top\n\t};\n\n\tret.x += element.ownerDocument.defaultView!.scrollX;\n\tret.y += element.ownerDocument.defaultView!.scrollY;\n\n\treturn ret;\n}\n\n/**\n * @param resizerPosition The expected resizer position, like `\"top-left\"`, `\"bottom-right\"`.\n * @returns A prefixed HTML class name for the resizer element.\n */\nfunction getResizerHandleClass( resizerPosition: string ) {\n\treturn `ck-widget__resizer__handle-${ resizerPosition }`;\n}\n\n/**\n * Determines the position of a given resize handle.\n *\n * @param domHandle Handle used to calculate the reference point.\n * @returns Returns a string like `\"top-left\"` or `undefined` if not matched.\n */\nfunction getHandlePosition( domHandle: HTMLElement ) {\n\tconst resizerPositions = [ 'top-left', 'top-right', 'bottom-right', 'bottom-left' ];\n\n\tfor ( const position of resizerPositions ) {\n\t\tif ( domHandle.classList.contains( getResizerHandleClass( position ) ) ) {\n\t\t\treturn position;\n\t\t}\n\t}\n}\n\n/**\n * @param position Like `\"top-left\"`.\n * @returns Inverted `position`, e.g. it returns `\"bottom-right\"` if `\"top-left\"` was given as `position`.\n */\nfunction getOppositePosition( position: string ) {\n\tconst parts = position.split( '-' );\n\tconst replacements: Record<string, string> = {\n\t\ttop: 'bottom',\n\t\tbottom: 'top',\n\t\tleft: 'right',\n\t\tright: 'left'\n\t};\n\n\treturn `${ replacements[ parts[ 0 ] ] }-${ replacements[ parts[ 1 ] ] }`;\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/**\n * @module widget/widgetresize/sizeview\n */\n\nimport { View } from '@ckeditor/ckeditor5-ui';\nimport type { WidgetResizerOptions } from '../widgetresize.js';\nimport { type WidgetResizeState } from './resizerstate.js';\n\n/**\n * A view displaying the proposed new element size during the resizing.\n *\n * @internal\n */\nexport class SizeView extends View {\n\t/**\n\t * The visibility of the view defined based on the existence of the host proposed dimensions.\n\t *\n\t * @internal\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public _isVisible: boolean;\n\n\t/**\n\t * The text that will be displayed in the `SizeView` child.\n\t * It can be formatted as the pixel values (e.g. 10x20) or the percentage value (e.g. 10%).\n\t *\n\t * @internal\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public _label: string;\n\n\t/**\n\t * The position of the view defined based on the host size and active handle position.\n\t *\n\t * @internal\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public _viewPosition: string;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-size-view',\n\t\t\t\t\tbind.to( '_viewPosition', value => value ? `ck-orientation-${ value }` : '' )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: bind.if( '_isVisible', 'none', visible => !visible )\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: [ {\n\t\t\t\ttext: bind.to( '_label' )\n\t\t\t} ]\n\t\t} );\n\t}\n\n\t/**\n\t * A method used for binding the `SizeView` instance properties to the `ResizeState` instance observable properties.\n\t *\n\t * @internal\n\t * @param options An object defining the resizer options, used for setting the proper size label.\n\t * @param resizeState The `ResizeState` class instance, used for keeping the `SizeView` state up to date.\n\t */\n\tpublic _bindToState( options: WidgetResizerOptions, resizeState: WidgetResizeState ): void {\n\t\tthis.bind( '_isVisible' ).to( resizeState, 'proposedWidth', resizeState, 'proposedHeight', ( width, height ) =>\n\t\t\twidth !== null && height !== null );\n\n\t\tthis.bind( '_label' ).to(\n\t\t\tresizeState, 'proposedHandleHostWidth',\n\t\t\tresizeState, 'proposedHandleHostHeight',\n\t\t\tresizeState, 'proposedWidthPercents',\n\t\t\t( width, height, widthPercents ) => {\n\t\t\t\tif ( options.unit === 'px' ) {\n\t\t\t\t\treturn `${ width }×${ height }`;\n\t\t\t\t} else {\n\t\t\t\t\treturn `${ widthPercents }%`;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.bind( '_viewPosition' ).to(\n\t\t\tresizeState, 'activeHandlePosition',\n\t\t\tresizeState, 'proposedHandleHostWidth',\n\t\t\tresizeState, 'proposedHandleHostHeight',\n\t\t\t// If the widget is too small to contain the size label, display the label above.\n\t\t\t( position, width, height ) => width! < 50 || height! < 50 ? 'above-center' : position!\n\t\t);\n\t}\n\n\t/**\n\t * A method used for cleaning up. It removes the bindings and hides the view.\n\t *\n\t * @internal\n\t */\n\tpublic _dismiss(): void {\n\t\tthis.unbind();\n\t\tthis._isVisible = false;\n\t}\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/**\n * @module widget/widgetresize/resizer\n */\n\nimport { Template } from '@ckeditor/ckeditor5-ui';\nimport {\n\tRect,\n\tObservableMixin,\n\tcompareArrays,\n\ttype ObservableChangeEvent,\n\ttype DecoratedMethodEvent,\n\ttype ObservableMixinConstructor\n} from '@ckeditor/ckeditor5-utils';\n\nimport { WidgetResizeState } from './resizerstate.js';\nimport { SizeView } from './sizeview.js';\n\nimport type { WidgetResizerOptions } from '../widgetresize.js';\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\n\nconst WidgetResizerBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Represents a resizer for a single resizable object.\n */\nexport class WidgetResizer extends WidgetResizerBase {\n\t/**\n\t * Flag that indicates whether resizer can be used.\n\t *\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * Flag that indicates that resizer is currently focused.\n\t *\n\t * @observable\n\t */\n\tdeclare public isSelected: boolean;\n\n\t/**\n\t * Flag that indicates whether resizer is rendered (visible on the screen).\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t *\n\t * Note that a new state is created for each resize transaction.\n\t */\n\tprivate _state!: WidgetResizeState;\n\n\t/**\n\t * A view displaying the proposed new element size during the resizing.\n\t */\n\tprivate _sizeView!: SizeView;\n\n\t/**\n\t * Options passed to the {@link #constructor}.\n\t */\n\tprivate _options: WidgetResizerOptions;\n\n\t/**\n\t * A wrapper that is controlled by the resizer. This is usually a widget element.\n\t */\n\tprivate _viewResizerWrapper: ViewElement | null = null;\n\n\t/**\n\t * The width of the resized {@link module:widget/widgetresize~WidgetResizerOptions#viewElement viewElement} before the resizing started.\n\t */\n\tprivate _initialViewWidth: string | undefined;\n\n\t/**\n\t * @param options Resizer options.\n\t */\n\tconstructor( options: WidgetResizerOptions ) {\n\t\tsuper();\n\n\t\tthis._options = options;\n\n\t\tthis.set( 'isEnabled', true );\n\t\tthis.set( 'isSelected', false );\n\n\t\tthis.bind( 'isVisible' ).to( this, 'isEnabled', this, 'isSelected', ( isEnabled, isSelected ) => isEnabled && isSelected );\n\n\t\tthis.decorate( 'begin' );\n\t\tthis.decorate( 'cancel' );\n\t\tthis.decorate( 'commit' );\n\t\tthis.decorate( 'updateSize' );\n\n\t\tthis.on( 'commit', event => {\n\t\t\t// State might not be initialized yet. In this case, prevent further handling and make sure that the resizer is\n\t\t\t// cleaned up (https://github.com/ckeditor/ckeditor5/issues/5195).\n\t\t\tif ( !this.state.proposedWidth && !this.state.proposedWidthPercents ) {\n\t\t\t\tthis._cleanup();\n\t\t\t\tevent.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t *\n\t * Note that a new state is created for each resize transaction.\n\t */\n\tpublic get state(): WidgetResizeState {\n\t\treturn this._state;\n\t}\n\n\t/**\n\t * Makes resizer visible in the UI.\n\t */\n\tpublic show(): void {\n\t\tconst editingView = this._options.editor.editing.view;\n\n\t\teditingView.change( writer => {\n\t\t\twriter.removeClass( 'ck-hidden', this._viewResizerWrapper! );\n\t\t} );\n\t}\n\n\t/**\n\t * Hides resizer in the UI.\n\t */\n\tpublic hide(): void {\n\t\tconst editingView = this._options.editor.editing.view;\n\n\t\teditingView.change( writer => {\n\t\t\twriter.addClass( 'ck-hidden', this._viewResizerWrapper! );\n\t\t} );\n\t}\n\n\t/**\n\t * Attaches the resizer to the DOM.\n\t */\n\tpublic attach(): void {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias\n\t\tconst that = this;\n\t\tconst widgetElement = this._options.viewElement;\n\t\tconst editingView = this._options.editor.editing.view;\n\n\t\teditingView.change( writer => {\n\t\t\tconst viewResizerWrapper = writer.createUIElement( 'div', {\n\t\t\t\tclass: 'ck ck-reset_all ck-widget__resizer'\n\t\t\t}, function( domDocument ) {\n\t\t\t\tconst domElement = this.toDomElement( domDocument );\n\n\t\t\t\tthat._appendHandles( domElement );\n\t\t\t\tthat._appendSizeUI( domElement );\n\n\t\t\t\treturn domElement;\n\t\t\t} );\n\n\t\t\t// Append the resizer wrapper to the widget's wrapper.\n\t\t\twriter.insert( writer.createPositionAt( widgetElement, 'end' ), viewResizerWrapper );\n\t\t\twriter.addClass( 'ck-widget_with-resizer', widgetElement );\n\n\t\t\tthis._viewResizerWrapper = viewResizerWrapper;\n\n\t\t\tif ( !this.isVisible ) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t} );\n\n\t\tthis.on<ObservableChangeEvent>( 'change:isVisible', () => {\n\t\t\tif ( this.isVisible ) {\n\t\t\t\tthis.show();\n\t\t\t\tthis.redraw();\n\t\t\t} else {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Starts the resizing process.\n\t *\n\t * Creates a new {@link #state} for the current process.\n\t *\n\t * @fires begin\n\t * @param domResizeHandle Clicked handle.\n\t */\n\tpublic begin( domResizeHandle: HTMLElement ): void {\n\t\tthis._state = new WidgetResizeState( this._options );\n\n\t\tthis._sizeView._bindToState( this._options, this.state );\n\n\t\tthis._initialViewWidth = this._options.viewElement.getStyle( 'width' );\n\n\t\tthis.state.begin( domResizeHandle, this._getHandleHost(), this._getResizeHost() );\n\t}\n\n\t/**\n\t * Updates the proposed size based on `domEventData`.\n\t *\n\t * @fires updateSize\n\t */\n\tpublic updateSize( domEventData: MouseEvent ): void {\n\t\tconst newSize = this._proposeNewSize( domEventData );\n\t\tconst editingView = this._options.editor.editing.view;\n\n\t\teditingView.change( writer => {\n\t\t\tconst unit = this._options.unit || '%';\n\t\t\tconst newWidth = ( unit === '%' ? newSize.widthPercents : newSize.width ) + unit;\n\n\t\t\twriter.setStyle( 'width', newWidth, this._options.viewElement );\n\t\t} );\n\n\t\t// Get an actual image width, and:\n\t\t// * reflect this size to the resize wrapper\n\t\t// * apply this **real** size to the state\n\t\tconst domHandleHost = this._getHandleHost();\n\t\tconst domHandleHostRect = new Rect( domHandleHost );\n\n\t\tconst handleHostWidth = Math.round( domHandleHostRect.width );\n\t\tconst handleHostHeight = Math.round( domHandleHostRect.height );\n\n\t\t// Handle max-width limitation.\n\t\tconst domResizeHostRect = new Rect( domHandleHost );\n\n\t\tnewSize.width = Math.round( domResizeHostRect.width );\n\t\tnewSize.height = Math.round( domResizeHostRect.height );\n\n\t\tthis.redraw( domHandleHostRect );\n\n\t\tthis.state.update( {\n\t\t\t...newSize,\n\t\t\thandleHostWidth,\n\t\t\thandleHostHeight\n\t\t} );\n\t}\n\n\t/**\n\t * Applies the geometry proposed with the resizer.\n\t *\n\t * @fires commit\n\t */\n\tpublic commit(): void {\n\t\tconst unit = this._options.unit || '%';\n\t\tconst newValue = ( unit === '%' ? this.state.proposedWidthPercents : this.state.proposedWidth ) + unit;\n\n\t\t// Both cleanup and onCommit callback are very likely to make view changes. Ensure that it is made in a single step.\n\t\tthis._options.editor.editing.view.change( () => {\n\t\t\tthis._cleanup();\n\t\t\tthis._options.onCommit( newValue );\n\t\t} );\n\t}\n\n\t/**\n\t * Cancels and rejects the proposed resize dimensions, hiding the UI.\n\t *\n\t * @fires cancel\n\t */\n\tpublic cancel(): void {\n\t\tthis._cleanup();\n\t}\n\n\t/**\n\t * Destroys the resizer.\n\t */\n\tpublic destroy(): void {\n\t\tthis.cancel();\n\t}\n\n\t/**\n\t * Redraws the resizer.\n\t *\n\t * @param handleHostRect Handle host rectangle might be given to improve performance.\n\t */\n\tpublic redraw( handleHostRect?: Rect ): void {\n\t\tconst domWrapper = this._domResizerWrapper;\n\n\t\t// Refresh only if resizer exists in the DOM.\n\t\tif ( !existsInDom( domWrapper ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widgetWrapper = domWrapper!.parentElement;\n\t\tconst handleHost = this._getHandleHost();\n\t\tconst resizerWrapper = this._viewResizerWrapper!;\n\t\tconst currentDimensions = [\n\t\t\tresizerWrapper.getStyle( 'width' ),\n\t\t\tresizerWrapper.getStyle( 'height' ),\n\t\t\tresizerWrapper.getStyle( 'left' ),\n\t\t\tresizerWrapper.getStyle( 'top' )\n\t\t];\n\t\tlet newDimensions: Array<string | undefined>;\n\n\t\tif ( widgetWrapper!.isSameNode( handleHost ) ) {\n\t\t\tconst clientRect = handleHostRect || new Rect( handleHost );\n\n\t\t\tnewDimensions = [\n\t\t\t\tclientRect.width + 'px',\n\t\t\t\tclientRect.height + 'px',\n\t\t\t\tundefined,\n\t\t\t\tundefined\n\t\t\t];\n\t\t}\n\t\t// In case a resizing host is not a widget wrapper, we need to compensate\n\t\t// for any additional offsets the resize host might have. E.g. wrapper padding\n\t\t// or simply another editable. By doing that the border and resizers are shown\n\t\t// only around the resize host.\n\t\telse {\n\t\t\tnewDimensions = [\n\t\t\t\thandleHost.offsetWidth + 'px',\n\t\t\t\thandleHost.offsetHeight + 'px',\n\t\t\t\thandleHost.offsetLeft + 'px',\n\t\t\t\thandleHost.offsetTop + 'px'\n\t\t\t];\n\t\t}\n\n\t\t// Make changes to the view only if the resizer should actually get new dimensions.\n\t\t// Otherwise, if View#change() was always called, this would cause EditorUI#update\n\t\t// loops because the WidgetResize plugin listens to EditorUI#update and updates\n\t\t// the resizer.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/7633\n\t\tif ( compareArrays( currentDimensions, newDimensions ) !== 'same' ) {\n\t\t\tthis._options.editor.editing.view.change( writer => {\n\t\t\t\twriter.setStyle( {\n\t\t\t\t\twidth: newDimensions[ 0 ]!,\n\t\t\t\t\theight: newDimensions[ 1 ]!,\n\t\t\t\t\tleft: newDimensions[ 2 ]!,\n\t\t\t\t\ttop: newDimensions[ 3 ]!\n\t\t\t\t}, resizerWrapper );\n\t\t\t} );\n\t\t}\n\t}\n\n\tpublic containsHandle( domElement: HTMLElement ): boolean {\n\t\treturn this._domResizerWrapper!.contains( domElement );\n\t}\n\n\tpublic static isResizeHandle( domElement: HTMLElement ): boolean {\n\t\treturn domElement.classList.contains( 'ck-widget__resizer__handle' );\n\t}\n\n\t/**\n\t * Cleans up the context state.\n\t */\n\tprivate _cleanup(): void {\n\t\tthis._sizeView._dismiss();\n\n\t\tconst editingView = this._options.editor.editing.view;\n\n\t\teditingView.change( writer => {\n\t\t\twriter.setStyle( 'width', this._initialViewWidth!, this._options.viewElement );\n\t\t} );\n\t}\n\n\t/**\n\t * Calculates the proposed size as the resize handles are dragged.\n\t *\n\t * @param domEventData Event data that caused the size update request. It should be used to calculate the proposed size.\n\t */\n\tprivate _proposeNewSize( domEventData: MouseEvent ): { width: number; height: number; widthPercents: number } {\n\t\tconst state = this.state;\n\t\tconst currentCoordinates = extractCoordinates( domEventData );\n\t\tconst isCentered = this._options.isCentered ? this._options.isCentered( this ) : true;\n\n\t\t// Enlargement defines how much the resize host has changed in a given axis. Naturally it could be a negative number\n\t\t// meaning that it has been shrunk.\n\t\t//\n\t\t// +----------------+--+\n\t\t// |                |  |\n\t\t// |       img      |  |\n\t\t// |  /handle host  |  |\n\t\t// +----------------+  | ^\n\t\t// |                   | | - enlarge y\n\t\t// +-------------------+ v\n\t\t// \t\t\t\t\t<-->\n\t\t// \t\t\t\t\t enlarge x\n\t\tconst enlargement = {\n\t\t\tx: state._referenceCoordinates!.x - ( currentCoordinates.x + state.originalWidth! ),\n\t\t\ty: ( currentCoordinates.y - state.originalHeight! ) - state._referenceCoordinates!.y\n\t\t};\n\n\t\tif ( isCentered && state.activeHandlePosition!.endsWith( '-right' ) ) {\n\t\t\tenlargement.x = currentCoordinates.x - ( state._referenceCoordinates!.x + state.originalWidth! );\n\t\t}\n\n\t\t// Objects needs to be resized twice as much in horizontal axis if centered, since enlargement is counted from\n\t\t// one resized corner to your cursor. It needs to be duplicated to compensate for the other side too.\n\t\tif ( isCentered ) {\n\t\t\tenlargement.x *= 2;\n\t\t}\n\n\t\t// const resizeHost = this._getResizeHost();\n\n\t\t// The size proposed by the user. It does not consider the aspect ratio.\n\t\tlet width = Math.abs( state.originalWidth! + enlargement.x );\n\t\tlet height = Math.abs( state.originalHeight! + enlargement.y );\n\n\t\t// Dominant determination must take the ratio into account.\n\t\tconst dominant = width / state.aspectRatio! > height ? 'width' : 'height';\n\n\t\tif ( dominant == 'width' ) {\n\t\t\theight = width / state.aspectRatio!;\n\t\t} else {\n\t\t\twidth = height * state.aspectRatio!;\n\t\t}\n\n\t\treturn {\n\t\t\twidth: Math.round( width ),\n\t\t\theight: Math.round( height ),\n\t\t\twidthPercents: Math.min( Math.round( state.originalWidthPercents! / state.originalWidth! * width * 100 ) / 100, 100 )\n\t\t};\n\t}\n\n\t/**\n\t * Obtains the resize host.\n\t *\n\t * Resize host is an object that receives dimensions which are the result of resizing.\n\t */\n\tprivate _getResizeHost(): HTMLElement {\n\t\tconst widgetWrapper = this._domResizerWrapper!.parentElement;\n\n\t\treturn this._options.getResizeHost( widgetWrapper! );\n\t}\n\n\t/**\n\t * Obtains the handle host.\n\t *\n\t * Handle host is an object that the handles are aligned to.\n\t *\n\t * Handle host will not always be an entire widget itself. Take an image as an example. The image widget\n\t * contains an image and a caption. Only the image should be surrounded with handles.\n\t */\n\tprivate _getHandleHost(): HTMLElement {\n\t\tconst widgetWrapper = this._domResizerWrapper!.parentElement;\n\n\t\treturn this._options.getHandleHost( widgetWrapper! );\n\t}\n\n\t/**\n\t * DOM container of the entire resize UI.\n\t *\n\t * Note that this property will have a value only after the element bound with the resizer is rendered\n\t * (otherwise `null`).\n\t */\n\tprivate get _domResizerWrapper(): HTMLElement | null {\n\t\treturn this._options.editor.editing.view.domConverter.mapViewToDom( this._viewResizerWrapper! ) as any;\n\t}\n\n\t/**\n\t * Renders the resize handles in the DOM.\n\t *\n\t * @param domElement The resizer wrapper.\n\t */\n\tprivate _appendHandles( domElement: HTMLElement ) {\n\t\tconst resizerPositions = [ 'top-left', 'top-right', 'bottom-right', 'bottom-left' ];\n\n\t\tfor ( const currentPosition of resizerPositions ) {\n\t\t\tdomElement.appendChild( ( new Template( {\n\t\t\t\ttag: 'div',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: `ck-widget__resizer__handle ${ getResizerClass( currentPosition ) }`\n\t\t\t\t}\n\t\t\t} ).render() ) );\n\t\t}\n\t}\n\n\t/**\n\t * Sets up the {@link #_sizeView} property and adds it to the passed `domElement`.\n\t */\n\tprivate _appendSizeUI( domElement: HTMLElement ) {\n\t\tthis._sizeView = new SizeView();\n\n\t\t// Make sure icon#element is rendered before passing to appendChild().\n\t\tthis._sizeView.render();\n\n\t\tdomElement.appendChild( this._sizeView.element! );\n\t}\n}\n\n/**\n * @eventName ~WidgetResizer#begin\n */\nexport type WidgetResizerBeginEvent = DecoratedMethodEvent<WidgetResizer, 'begin'>;\n\n/**\n * @eventName ~WidgetResizer#cancel\n */\nexport type WidgetResizerCancelEvent = DecoratedMethodEvent<WidgetResizer, 'cancel'>;\n\n/**\n * @eventName ~WidgetResizer#commit\n */\nexport type WidgetResizerCommitEvent = DecoratedMethodEvent<WidgetResizer, 'commit'>;\n\n/**\n * @eventName ~WidgetResizer#updateSize\n */\nexport type WidgetResizerUpdateSizeEvent = DecoratedMethodEvent<WidgetResizer, 'updateSize'>;\n\n/**\n * @param resizerPosition Expected resizer position like `\"top-left\"`, `\"bottom-right\"`.\n * @returns A prefixed HTML class name for the resizer element\n */\nfunction getResizerClass( resizerPosition: string ) {\n\treturn `ck-widget__resizer__handle-${ resizerPosition }`;\n}\n\nfunction extractCoordinates( event: MouseEvent ) {\n\treturn {\n\t\tx: event.pageX,\n\t\ty: event.pageY\n\t};\n}\n\nfunction existsInDom( element: Node | DocumentFragment | undefined | null ) {\n\treturn element && element.ownerDocument && element.ownerDocument.contains( element );\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/**\n * @module widget/widgetresize\n */\n\nimport {\n\tWidgetResizer,\n\ttype WidgetResizerBeginEvent,\n\ttype WidgetResizerCancelEvent,\n\ttype WidgetResizerCommitEvent\n} from './widgetresize/resizer.js';\n\nimport { type WidgetToolbarRepository } from './widgettoolbarrepository.js';\n\nimport {\n\tPlugin,\n\ttype Editor\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\tMouseObserver,\n\ttype ModelDocumentChangeEvent,\n\ttype ViewDocumentDomEventData,\n\ttype ModelElement,\n\ttype ViewContainerElement,\n\ttype ViewDocumentMouseDownEvent,\n\ttype ViewSelectionChangeEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport type { EditorUIUpdateEvent } from '@ckeditor/ckeditor5-ui';\n\nimport {\n\tDomEmitterMixin,\n\tglobal,\n\ttype DomEmitter,\n\ttype EventInfo\n} from '@ckeditor/ckeditor5-utils';\n\nimport { throttle } from 'es-toolkit/compat';\n\n/**\n * The widget resize feature plugin.\n *\n * Use the {@link module:widget/widgetresize~WidgetResize#attachTo} method to create a resizer for the specified widget.\n */\nexport class WidgetResize extends Plugin {\n\t/**\n\t * The currently selected resizer.\n\t *\n\t * @observable\n\t */\n\tdeclare public selectedResizer: WidgetResizer | null;\n\n\t/**\n\t * References an active resizer.\n\t *\n\t * Active resizer means a resizer which handle is actively used by the end user.\n\t *\n\t * @internal\n\t * @observable\n\t */\n\tdeclare public _activeResizer: WidgetResizer | null;\n\n\t/**\n\t * A map of resizers created using this plugin instance.\n\t */\n\tprivate _resizers = new Map<ViewContainerElement, WidgetResizer>();\n\n\tprivate _observer!: DomEmitter;\n\n\tprivate _redrawSelectedResizerThrottled!: ReturnType<typeof throttle<() => void>>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WidgetResize' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editing = this.editor.editing;\n\t\tconst domDocument = global.window.document;\n\n\t\tthis.set( 'selectedResizer', null );\n\t\tthis.set( '_activeResizer', null );\n\n\t\tediting.view.addObserver( MouseObserver );\n\n\t\tthis._observer = new ( DomEmitterMixin() )();\n\n\t\tthis.listenTo<ViewDocumentMouseDownEvent>(\n\t\t\tediting.view.document,\n\t\t\t'mousedown',\n\t\t\tthis._mouseDownListener.bind( this ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\n\t\tthis._observer.listenTo( domDocument, 'mousemove', this._mouseMoveListener.bind( this ) );\n\t\tthis._observer.listenTo( domDocument, 'mouseup', this._mouseUpListener.bind( this ) );\n\n\t\tthis._redrawSelectedResizerThrottled = throttle( () => this.redrawSelectedResizer(), 200 );\n\n\t\t// Redrawing on any change of the UI of the editor (including content changes).\n\t\tthis.editor.ui.on<EditorUIUpdateEvent>( 'update', this._redrawSelectedResizerThrottled );\n\n\t\t// Remove view widget-resizer mappings for widgets that have been removed from the document.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/10156\n\t\t// https://github.com/ckeditor/ckeditor5/issues/10266\n\t\tthis.editor.model.document.on<ModelDocumentChangeEvent>( 'change', () => {\n\t\t\tfor ( const [ viewElement, resizer ] of this._resizers ) {\n\t\t\t\tif ( !viewElement.isAttached() ) {\n\t\t\t\t\tthis._resizers.delete( viewElement );\n\t\t\t\t\tresizer.destroy();\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'lowest' } );\n\n\t\t// Resizers need to be redrawn upon window resize, because new window might shrink resize host.\n\t\tthis._observer.listenTo( global.window, 'resize', this._redrawSelectedResizerThrottled );\n\n\t\tconst viewSelection = this.editor.editing.view.document.selection;\n\n\t\tviewSelection.on<ViewSelectionChangeEvent>( 'change', () => {\n\t\t\tconst selectedElement = viewSelection.getSelectedElement() as ViewContainerElement;\n\n\t\t\tconst resizer = this.getResizerByViewElement( selectedElement ) || null;\n\t\t\tif ( resizer ) {\n\t\t\t\tthis.select( resizer );\n\t\t\t} else {\n\t\t\t\tthis.deselect();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Redraws the selected resizer if there is any selected resizer and if it is visible.\n\t */\n\tpublic redrawSelectedResizer(): void {\n\t\tif ( this.selectedResizer && this.selectedResizer.isVisible ) {\n\t\t\tthis.selectedResizer.redraw();\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis._observer.stopListening();\n\n\t\tfor ( const resizer of this._resizers.values() ) {\n\t\t\tresizer.destroy();\n\t\t}\n\n\t\tthis._redrawSelectedResizerThrottled.cancel();\n\t}\n\n\t/**\n\t * Marks resizer as selected.\n\t */\n\tpublic select( resizer: WidgetResizer ): void {\n\t\tthis.deselect();\n\t\tthis.selectedResizer = resizer;\n\t\tthis.selectedResizer.isSelected = true;\n\t}\n\n\t/**\n\t * Deselects currently set resizer.\n\t */\n\tpublic deselect(): void {\n\t\tif ( this.selectedResizer ) {\n\t\t\tthis.selectedResizer.isSelected = false;\n\t\t}\n\n\t\tthis.selectedResizer = null;\n\t}\n\n\t/**\n\t * @param options Resizer options.\n\t */\n\tpublic attachTo( options: WidgetResizerOptions ): WidgetResizer {\n\t\tconst resizer = new WidgetResizer( options );\n\t\tconst plugins = this.editor.plugins;\n\n\t\tresizer.attach();\n\n\t\tif ( plugins.has( 'WidgetToolbarRepository' ) ) {\n\t\t\t// Hiding widget toolbar to improve the performance\n\t\t\t// (https://github.com/ckeditor/ckeditor5-widget/pull/112#issuecomment-564528765).\n\t\t\tconst widgetToolbarRepository: WidgetToolbarRepository = plugins.get( 'WidgetToolbarRepository' );\n\n\t\t\tresizer.on<WidgetResizerBeginEvent>( 'begin', () => {\n\t\t\t\twidgetToolbarRepository.forceDisabled( 'resize' );\n\t\t\t}, { priority: 'lowest' } );\n\n\t\t\tresizer.on<WidgetResizerCancelEvent>( 'cancel', () => {\n\t\t\t\twidgetToolbarRepository.clearForceDisabled( 'resize' );\n\t\t\t}, { priority: 'highest' } );\n\n\t\t\tresizer.on<WidgetResizerCommitEvent>( 'commit', () => {\n\t\t\t\twidgetToolbarRepository.clearForceDisabled( 'resize' );\n\t\t\t}, { priority: 'highest' } );\n\t\t}\n\n\t\tthis._resizers.set( options.viewElement, resizer );\n\n\t\tconst viewSelection = this.editor.editing.view.document.selection;\n\t\tconst selectedElement = viewSelection.getSelectedElement() as ViewContainerElement;\n\n\t\t// If the element the resizer is created for is currently focused, it should become visible.\n\t\tif ( this.getResizerByViewElement( selectedElement ) == resizer ) {\n\t\t\tthis.select( resizer );\n\t\t}\n\n\t\treturn resizer;\n\t}\n\n\t/**\n\t * Returns a resizer created for a given view element (widget element).\n\t *\n\t * @param viewElement View element associated with the resizer.\n\t */\n\tpublic getResizerByViewElement( viewElement: ViewContainerElement ): WidgetResizer | undefined {\n\t\treturn this._resizers.get( viewElement );\n\t}\n\n\t/**\n\t * Returns a resizer that contains a given resize handle.\n\t */\n\tprivate _getResizerByHandle( domResizeHandle: HTMLElement ): WidgetResizer | undefined {\n\t\tfor ( const resizer of this._resizers.values() ) {\n\t\t\tif ( resizer.containsHandle( domResizeHandle ) ) {\n\t\t\t\treturn resizer;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @param domEventData Native DOM event.\n\t */\n\tprivate _mouseDownListener( event: EventInfo, domEventData: ViewDocumentDomEventData ) {\n\t\tconst resizeHandle = domEventData.domTarget;\n\n\t\tif ( !WidgetResizer.isResizeHandle( resizeHandle ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._activeResizer = this._getResizerByHandle( resizeHandle ) || null;\n\n\t\tif ( this._activeResizer ) {\n\t\t\tthis._activeResizer.begin( resizeHandle );\n\n\t\t\t// Do not call other events when resizing. See: https://github.com/ckeditor/ckeditor5/issues/6755.\n\t\t\tevent.stop();\n\t\t\tdomEventData.preventDefault();\n\t\t}\n\t}\n\n\t/**\n\t * @param domEventData Native DOM event.\n\t */\n\tprivate _mouseMoveListener( event: unknown, domEventData: MouseEvent ) {\n\t\tif ( this._activeResizer ) {\n\t\t\tthis._activeResizer.updateSize( domEventData );\n\t\t}\n\t}\n\n\tprivate _mouseUpListener(): void {\n\t\tif ( this._activeResizer ) {\n\t\t\tthis._activeResizer.commit();\n\t\t\tthis._activeResizer = null;\n\t\t}\n\t}\n}\n\n/**\n * Interface describing a resizer. It allows to specify the resizing host, custom logic for calculating aspect ratio, etc.\n */\nexport interface WidgetResizerOptions {\n\n\t/**\n\t * Editor instance associated with the resizer.\n\t */\n\teditor: Editor;\n\n\tmodelElement: ModelElement;\n\n\t/**\n\t * A view of an element to be resized. Typically it's the main widget's view instance.\n\t */\n\tviewElement: ViewContainerElement;\n\n\tunit?: 'px' | '%';\n\n\t/**\n\t * A callback to be executed once the resizing process is done.\n\t *\n\t * It receives a `Number` (`newValue`) as a parameter.\n\t *\n\t * For example, {@link module:image/imageresize~ImageResize} uses it to execute the resize image command\n\t * which puts the new value into the model.\n\t *\n\t * ```ts\n\t * {\n\t *\teditor,\n\t *\tmodelElement: data.item,\n\t *\tviewElement: widget,\n\t *\n\t *\tonCommit( newValue ) {\n\t *\t\teditor.execute( 'resizeImage', { width: newValue } );\n\t *\t}\n\t * };\n\t * ```\n\t */\n\tonCommit: ( newValue: string ) => void;\n\n\tgetResizeHost: ( widgetWrapper: HTMLElement ) => HTMLElement;\n\n\tgetHandleHost: ( widgetWrapper: HTMLElement ) => HTMLElement;\n\n\tisCentered?: ( resizer: WidgetResizer ) => boolean;\n}\n", "import { Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { DomEmitterMixin, EventInfo, Rect, ResizeObserver, createElement, delay, env, getRangeFromMouseEvent, global, toUnit, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { DomEventObserver, ModelLiveRange, ModelRange, PointerObserver, ViewDataTransfer } from \"@ckeditor/ckeditor5-engine\";\nimport { mapValues, throttle } from \"es-toolkit/compat\";\nimport { Widget, isWidget } from \"@ckeditor/ckeditor5-widget\";\nimport { View } from \"@ckeditor/ckeditor5-ui\";\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 clipboard/utils/plaintexttohtml\n*/\n/**\n* Converts plain text to its HTML-ized version.\n*\n* @param text The plain text to convert.\n* @returns HTML generated from the plain text.\n*/\nfunction plainTextToHtml(text) {\n\ttext = text.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\\r?\\n\\r?\\n/g, \"</p><p>\").replace(/\\r?\\n/g, \"<br>\").replace(/\\t/g, \"&nbsp;&nbsp;&nbsp;&nbsp;\").replace(/^\\s/, \"&nbsp;\").replace(/\\s$/, \"&nbsp;\").replace(/\\s\\s/g, \" &nbsp;\");\n\tif (text.includes(\"</p><p>\") || text.includes(\"<br>\")) text = `<p>${text}</p>`;\n\treturn 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 clipboard/clipboardobserver\n*/\n/**\n* Clipboard events observer.\n*\n* Fires the following events:\n*\n* * {@link module:engine/view/document~ViewDocument#event:clipboardInput},\n* * {@link module:engine/view/document~ViewDocument#event:paste},\n* * {@link module:engine/view/document~ViewDocument#event:copy},\n* * {@link module:engine/view/document~ViewDocument#event:cut},\n* * {@link module:engine/view/document~ViewDocument#event:drop},\n* * {@link module:engine/view/document~ViewDocument#event:dragover},\n* * {@link module:engine/view/document~ViewDocument#event:dragging},\n* * {@link module:engine/view/document~ViewDocument#event:dragstart},\n* * {@link module:engine/view/document~ViewDocument#event:dragend},\n* * {@link module:engine/view/document~ViewDocument#event:dragenter},\n* * {@link module:engine/view/document~ViewDocument#event:dragleave}.\n*\n* **Note**: This observer is not available by default (ckeditor5-engine does not add it on its own).\n* To make it available, it needs to be added to {@link module:engine/view/document~ViewDocument} by using\n* the {@link module:engine/view/view~EditingView#addObserver `View#addObserver()`} method. Alternatively, you can load the\n* {@link module:clipboard/clipboard~Clipboard} plugin which adds this observer automatically (because it uses it).\n*/\nvar ClipboardObserver = class extends DomEventObserver {\n\tdomEventType = [\n\t\t\"paste\",\n\t\t\"copy\",\n\t\t\"cut\",\n\t\t\"drop\",\n\t\t\"dragover\",\n\t\t\"dragstart\",\n\t\t\"dragend\",\n\t\t\"dragenter\",\n\t\t\"dragleave\"\n\t];\n\tconstructor(view) {\n\t\tsuper(view);\n\t\tconst viewDocument = this.document;\n\t\tthis.listenTo(viewDocument, \"paste\", handleInput(\"clipboardInput\"), { priority: \"low\" });\n\t\tthis.listenTo(viewDocument, \"drop\", handleInput(\"clipboardInput\"), { priority: \"low\" });\n\t\tthis.listenTo(viewDocument, \"dragover\", handleInput(\"dragging\"), { priority: \"low\" });\n\t\tfunction handleInput(type) {\n\t\t\treturn (evt, data) => {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tconst targetRanges = data.dropRange ? [data.dropRange] : null;\n\t\t\t\tconst dataTransfer = data.dataTransfer;\n\t\t\t\tconst eventInfo = new EventInfo(viewDocument, type);\n\t\t\t\tlet content = \"\";\n\t\t\t\tif (dataTransfer.getData(\"text/html\")) content = dataTransfer.getData(\"text/html\");\n\t\t\t\telse if (dataTransfer.getData(\"text/plain\")) content = plainTextToHtml(dataTransfer.getData(\"text/plain\"));\n\t\t\t\tviewDocument.fire(eventInfo, {\n\t\t\t\t\tdataTransfer,\n\t\t\t\t\tcontent,\n\t\t\t\t\tmethod: evt.name,\n\t\t\t\t\ttargetRanges,\n\t\t\t\t\ttarget: data.target,\n\t\t\t\t\tdomEvent: data.domEvent\n\t\t\t\t});\n\t\t\t\tif (eventInfo.stop.called) data.stopPropagation();\n\t\t\t};\n\t\t}\n\t}\n\tonDomEvent(domEvent) {\n\t\tconst nativeDataTransfer = \"clipboardData\" in domEvent ? domEvent.clipboardData : domEvent.dataTransfer;\n\t\tconst cacheFiles = domEvent.type == \"drop\" || domEvent.type == \"paste\";\n\t\tconst evtData = { dataTransfer: new ViewDataTransfer(nativeDataTransfer, { cacheFiles }) };\n\t\tif (domEvent.type == \"drop\" || domEvent.type == \"dragover\") {\n\t\t\tconst domRange = getRangeFromMouseEvent(domEvent);\n\t\t\tevtData.dropRange = domRange && this.view.domConverter.domRangeToView(domRange);\n\t\t}\n\t\tthis.fire(domEvent.type, domEvent, evtData);\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 clipboard/utils/normalizeclipboarddata\n*/\n/**\n* Removes some popular browser quirks out of the clipboard data (HTML).\n* Removes all HTML comments. These are considered an internal thing and it makes little sense if they leak into the editor data.\n*\n* @param data The HTML data to normalize.\n* @returns Normalized HTML.\n* @internal\n*/\nfunction normalizeClipboardData(data) {\n\treturn data.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g, (fullMatch, spaces) => {\n\t\tif (spaces.length == 1) return \" \";\n\t\treturn spaces;\n\t}).replace(/<!--[\\s\\S]*?-->/g, \"\");\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 smallPaddingElements = [\"figcaption\", \"li\"];\nconst listElements = [\"ol\", \"ul\"];\n/**\n* Converts {@link module:engine/view/item~ViewItem view item} and all of its children to plain text.\n*\n* @param converter The converter instance.\n* @param viewItem View item to convert.\n* @returns Plain text representation of `viewItem`.\n*/\nfunction viewToPlainText(converter, viewItem) {\n\tif (viewItem.is(\"$text\") || viewItem.is(\"$textProxy\")) return viewItem.data;\n\tif (viewItem.is(\"element\", \"img\") && viewItem.hasAttribute(\"alt\")) return viewItem.getAttribute(\"alt\");\n\tif (viewItem.is(\"element\", \"br\")) return \"\\n\";\n\t/**\n\t* Item is a document fragment, attribute element or container element. It doesn't\n\t* have it's own text value, so we need to convert its children elements.\n\t*/\n\tlet text = \"\";\n\tlet prev = null;\n\tfor (const child of viewItem.getChildren()) {\n\t\ttext += newLinePadding(child, prev) + viewToPlainText(converter, child);\n\t\tprev = child;\n\t}\n\tif (viewItem.is(\"rawElement\")) {\n\t\tconst tempElement = document.implementation.createHTMLDocument(\"\").createElement(\"div\");\n\t\tviewItem.render(tempElement, converter);\n\t\ttext += domElementToPlainText(tempElement);\n\t}\n\treturn text;\n}\n/**\n* Recursively converts DOM element and all of its children to plain text.\n*/\nfunction domElementToPlainText(element) {\n\tlet text = \"\";\n\tif (element.nodeType === Node.TEXT_NODE) return element.textContent;\n\telse if (element.tagName === \"BR\") return \"\\n\";\n\tfor (const child of element.childNodes) text += domElementToPlainText(child);\n\treturn text;\n}\n/**\n* Returns new line padding to prefix the given elements with.\n*/\nfunction newLinePadding(element, previous) {\n\tif (!previous) return \"\";\n\tif (element.is(\"element\", \"li\") && !element.isEmpty && element.getChild(0).is(\"containerElement\")) return \"\\n\\n\";\n\tif (listElements.includes(element.name) && listElements.includes(previous.name))\n /**\n\t* Because `<ul>` and `<ol>` are ViewAttributeElements, two consecutive lists will not have any padding between\n\t* them (see the `if` statement below). To fix this, we need to make an exception for this case.\n\t*/\n\treturn \"\\n\\n\";\n\tif (!element.is(\"containerElement\") && !previous.is(\"containerElement\")) return \"\";\n\tif (smallPaddingElements.includes(element.name) || smallPaddingElements.includes(previous.name)) return \"\\n\";\n\tif (element.is(\"element\") && element.getCustomProperty(\"dataPipeline:transparentRendering\") || previous.is(\"element\") && previous.getCustomProperty(\"dataPipeline:transparentRendering\")) return \"\";\n\treturn \"\\n\\n\";\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 clipboard/clipboardmarkersutils\n*/\n/**\n* Part of the clipboard logic. Responsible for collecting markers from selected fragments\n* and restoring them with proper positions in pasted elements.\n*\n* @internal\n*/\nvar ClipboardMarkersUtils = class extends Plugin {\n\t/**\n\t* Map of marker names that can be copied.\n\t*\n\t* @internal\n\t*/\n\t_markersToCopy = /* @__PURE__ */ new Map();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ClipboardMarkersUtils\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Registers marker name as copyable in clipboard pipeline.\n\t*\n\t* @param markerName Name of marker that can be copied.\n\t* @param config Configuration that describes what can be performed on specified marker.\n\t* @internal\n\t*/\n\t_registerMarkerToCopy(markerName, config) {\n\t\tthis._markersToCopy.set(markerName, config);\n\t}\n\t/**\n\t* Performs copy markers on provided selection and paste it to fragment returned from `getCopiedFragment`.\n\t*\n\t* \t1. Picks all markers in provided selection.\n\t* \t2. Inserts fake markers to document.\n\t* \t3. Gets copied selection fragment from document.\n\t* \t4. Removes fake elements from fragment and document.\n\t* \t5. Inserts markers in the place of removed fake markers.\n\t*\n\t* Due to selection modification, when inserting items, `getCopiedFragment` must *always* operate on `writer.model.document.selection'.\n\t* Do not use any other custom selection object within callback, as this will lead to out-of-bounds exceptions in rare scenarios.\n\t*\n\t* @param action Type of clipboard action.\n\t* @param selection Selection to be checked.\n\t* @param getCopiedFragment\tCallback that performs copy of selection and returns it as fragment.\n\t* @internal\n\t*/\n\t_copySelectedFragmentWithMarkers(action, selection, getCopiedFragment = (writer) => writer.model.getSelectedContent(writer.model.document.selection)) {\n\t\treturn this.editor.model.change((writer) => {\n\t\t\tconst oldSelection = writer.model.document.selection;\n\t\t\twriter.setSelection(selection);\n\t\t\tconst sourceSelectionInsertedMarkers = this._insertFakeMarkersIntoSelection(writer, writer.model.document.selection, action);\n\t\t\tconst fragment = getCopiedFragment(writer);\n\t\t\tconst fakeMarkersRangesInsideRange = this._removeFakeMarkersInsideElement(writer, fragment);\n\t\t\tfor (const [markerName, elements] of Object.entries(sourceSelectionInsertedMarkers)) {\n\t\t\t\tfakeMarkersRangesInsideRange[markerName] ||= writer.createRangeIn(fragment);\n\t\t\t\tfor (const element of elements) writer.remove(element);\n\t\t\t}\n\t\t\tfragment.markers.clear();\n\t\t\tfor (const [markerName, range] of Object.entries(fakeMarkersRangesInsideRange)) fragment.markers.set(markerName, range);\n\t\t\twriter.setSelection(oldSelection);\n\t\t\treturn fragment;\n\t\t});\n\t}\n\t/**\n\t* Performs paste of markers on already pasted element.\n\t*\n\t* \t1. Inserts fake markers that are present in fragment element (such fragment will be processed in `getPastedDocumentElement`).\n\t* \t2. Calls `getPastedDocumentElement` and gets element that is inserted into root model.\n\t* \t3. Removes all fake markers present in transformed element.\n\t* \t4. Inserts new markers with removed fake markers ranges into pasted fragment.\n\t*\n\t* There are multiple edge cases that have to be considered before calling this function:\n\t*\n\t* \t* `markers` are inserted into the same element that must be later transformed inside `getPastedDocumentElement`.\n\t* \t* Fake marker elements inside `getPastedDocumentElement` can be cloned, but their ranges cannot overlap.\n\t* \t* If `duplicateOnPaste` is `true` in marker config then associated marker ID is regenerated before pasting.\n\t*\n\t* @param markers Object that maps marker name to corresponding range.\n\t* @param getPastedDocumentElement Getter used to get target markers element.\n\t* @internal\n\t*/\n\t_pasteMarkersIntoTransformedElement(markers, getPastedDocumentElement) {\n\t\tconst pasteMarkers = this._getPasteMarkersFromRangeMap(markers);\n\t\treturn this.editor.model.change((writer) => {\n\t\t\tconst sourceFragmentFakeMarkers = this._insertFakeMarkersElements(writer, pasteMarkers);\n\t\t\tconst transformedElement = getPastedDocumentElement(writer);\n\t\t\tconst removedFakeMarkers = this._removeFakeMarkersInsideElement(writer, transformedElement);\n\t\t\tfor (const element of Object.values(sourceFragmentFakeMarkers).flat()) writer.remove(element);\n\t\t\tfor (const [markerName, range] of Object.entries(removedFakeMarkers)) if (!writer.model.markers.has(markerName)) writer.addMarker(markerName, {\n\t\t\t\tusingOperation: true,\n\t\t\t\taffectsData: true,\n\t\t\t\trange\n\t\t\t});\n\t\t\treturn transformedElement;\n\t\t});\n\t}\n\t/**\n\t* Pastes document fragment with markers to document.\n\t* If `duplicateOnPaste` is `true` in marker config then associated markers IDs\n\t* are regenerated before pasting to avoid markers duplications in content.\n\t*\n\t* @param fragment Document fragment that should contain already processed by pipeline markers.\n\t* @internal\n\t*/\n\t_pasteFragmentWithMarkers(fragment) {\n\t\tconst pasteMarkers = this._getPasteMarkersFromRangeMap(fragment.markers);\n\t\tfragment.markers.clear();\n\t\tfor (const copyableMarker of pasteMarkers) fragment.markers.set(copyableMarker.name, copyableMarker.range);\n\t\treturn this.editor.model.insertContent(fragment);\n\t}\n\t/**\n\t* In some situations we have to perform copy on selected fragment with certain markers. This function allows to temporarily bypass\n\t* restrictions on markers that we want to copy.\n\t*\n\t* This function executes `executor()` callback. For the duration of the callback, if the clipboard pipeline is used to copy\n\t* content, markers with the specified name will be copied to the clipboard as well.\n\t*\n\t* @param markerName Which markers should be copied.\n\t* @param executor Callback executed.\n\t* @param config Optional configuration flags used to copy (such like partial copy flag).\n\t* @internal\n\t*/\n\t_forceMarkersCopy(markerName, executor, config = {\n\t\tallowedActions: \"all\",\n\t\tcopyPartiallySelected: true,\n\t\tduplicateOnPaste: true\n\t}) {\n\t\tconst before = this._markersToCopy.get(markerName);\n\t\tthis._markersToCopy.set(markerName, config);\n\t\texecutor();\n\t\tif (before) this._markersToCopy.set(markerName, before);\n\t\telse this._markersToCopy.delete(markerName);\n\t}\n\t/**\n\t* Checks if marker can be copied.\n\t*\n\t* @param markerName Name of checked marker.\n\t* @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t* @internal\n\t*/\n\t_isMarkerCopyable(markerName, action) {\n\t\tconst config = this._getMarkerClipboardConfig(markerName);\n\t\tif (!config) return false;\n\t\tif (!action) return true;\n\t\tconst { allowedActions } = config;\n\t\treturn allowedActions === \"all\" || allowedActions.includes(action);\n\t}\n\t/**\n\t* Checks if marker has any clipboard copy behavior configuration.\n\t*\n\t* @param markerName Name of checked marker.\n\t*/\n\t_hasMarkerConfiguration(markerName) {\n\t\treturn !!this._getMarkerClipboardConfig(markerName);\n\t}\n\t/**\n\t* Returns marker's configuration flags passed during registration.\n\t*\n\t* @param markerName Name of marker that should be returned.\n\t* @internal\n\t*/\n\t_getMarkerClipboardConfig(markerName) {\n\t\tconst [markerNamePrefix] = markerName.split(\":\");\n\t\treturn this._markersToCopy.get(markerNamePrefix) || null;\n\t}\n\t/**\n\t* First step of copying markers. It looks for markers intersecting with given selection and inserts `$marker` elements\n\t* at positions where document markers start or end. This way `$marker` elements can be easily copied together with\n\t* the rest of the content of the selection.\n\t*\n\t* @param writer An instance of the model writer.\n\t* @param selection Selection to be checked.\n\t* @param action Type of clipboard action.\n\t*/\n\t_insertFakeMarkersIntoSelection(writer, selection, action) {\n\t\tconst copyableMarkers = this._getCopyableMarkersFromSelection(writer, selection, action);\n\t\treturn this._insertFakeMarkersElements(writer, copyableMarkers);\n\t}\n\t/**\n\t* Returns array of markers that can be copied in specified selection.\n\t*\n\t* If marker cannot be copied partially (according to `copyPartiallySelected` configuration flag) and\n\t* is not present entirely in any selection range then it will be skipped.\n\t*\n\t* @param writer An instance of the model writer.\n\t* @param selection  Selection which will be checked.\n\t* @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t*/\n\t_getCopyableMarkersFromSelection(writer, selection, action) {\n\t\tconst selectionRanges = Array.from(selection.getRanges());\n\t\tconst markersInRanges = new Set(selectionRanges.flatMap((selectionRange) => Array.from(writer.model.markers.getMarkersIntersectingRange(selectionRange))));\n\t\tconst isSelectionMarkerCopyable = (marker) => {\n\t\t\tif (!this._isMarkerCopyable(marker.name, action)) return false;\n\t\t\tconst { copyPartiallySelected } = this._getMarkerClipboardConfig(marker.name);\n\t\t\tif (!copyPartiallySelected) {\n\t\t\t\tconst markerRange = marker.getRange();\n\t\t\t\treturn selectionRanges.some((selectionRange) => selectionRange.containsRange(markerRange, true));\n\t\t\t}\n\t\t\treturn true;\n\t\t};\n\t\treturn Array.from(markersInRanges).filter(isSelectionMarkerCopyable).map((copyableMarker) => {\n\t\t\treturn {\n\t\t\t\tname: action === \"dragstart\" ? this._getUniqueMarkerName(copyableMarker.name) : copyableMarker.name,\n\t\t\t\trange: copyableMarker.getRange()\n\t\t\t};\n\t\t});\n\t}\n\t/**\n\t* Picks all markers from markers map that can be pasted.\n\t* If `duplicateOnPaste` is `true`, it regenerates their IDs to ensure uniqueness.\n\t* If marker is not registered, it will be kept in the array anyway.\n\t*\n\t* @param markers Object that maps marker name to corresponding range.\n\t* @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t*/\n\t_getPasteMarkersFromRangeMap(markers, action = null) {\n\t\tconst { model } = this.editor;\n\t\treturn (markers instanceof Map ? Array.from(markers.entries()) : Object.entries(markers)).flatMap(([markerName, range]) => {\n\t\t\tif (!this._hasMarkerConfiguration(markerName)) return [{\n\t\t\t\tname: markerName,\n\t\t\t\trange\n\t\t\t}];\n\t\t\tif (this._isMarkerCopyable(markerName, action)) {\n\t\t\t\tconst copyMarkerConfig = this._getMarkerClipboardConfig(markerName);\n\t\t\t\tconst isInGraveyard = model.markers.has(markerName) && model.markers.get(markerName).getRange().root.rootName === \"$graveyard\";\n\t\t\t\tif (copyMarkerConfig.duplicateOnPaste || isInGraveyard) markerName = this._getUniqueMarkerName(markerName);\n\t\t\t\treturn [{\n\t\t\t\t\tname: markerName,\n\t\t\t\t\trange\n\t\t\t\t}];\n\t\t\t}\n\t\t\treturn [];\n\t\t});\n\t}\n\t/**\n\t* Inserts specified array of fake markers elements to document and assigns them `type` and `name` attributes.\n\t* Fake markers elements are used to calculate position of markers on pasted fragment that were transformed during\n\t* steps between copy and paste.\n\t*\n\t* @param writer An instance of the model writer.\n\t* @param markers Array of markers that will be inserted.\n\t*/\n\t_insertFakeMarkersElements(writer, markers) {\n\t\tconst mappedMarkers = {};\n\t\tconst sortedMarkers = markers.flatMap((marker) => {\n\t\t\tconst { start, end } = marker.range;\n\t\t\treturn [{\n\t\t\t\tposition: start,\n\t\t\t\tmarker,\n\t\t\t\ttype: \"start\"\n\t\t\t}, {\n\t\t\t\tposition: end,\n\t\t\t\tmarker,\n\t\t\t\ttype: \"end\"\n\t\t\t}];\n\t\t}).sort(({ position: posA }, { position: posB }) => posA.isBefore(posB) ? 1 : -1);\n\t\tfor (const { position, marker, type } of sortedMarkers) {\n\t\t\tconst fakeMarker = writer.createElement(\"$marker\", {\n\t\t\t\t\"data-name\": marker.name,\n\t\t\t\t\"data-type\": type\n\t\t\t});\n\t\t\tif (!mappedMarkers[marker.name]) mappedMarkers[marker.name] = [];\n\t\t\tmappedMarkers[marker.name].push(fakeMarker);\n\t\t\twriter.insert(fakeMarker, position);\n\t\t}\n\t\treturn mappedMarkers;\n\t}\n\t/**\n\t* Removes all `$marker` elements from the given document fragment.\n\t*\n\t* Returns an object where keys are marker names, and values are ranges corresponding to positions\n\t* where `$marker` elements were inserted.\n\t*\n\t* If the document fragment had only one `$marker` element for given marker (start or end) the other boundary is set automatically\n\t* (to the end or start of the document fragment, respectively).\n\t*\n\t* @param writer An instance of the model writer.\n\t* @param rootElement The element to be checked.\n\t*/\n\t_removeFakeMarkersInsideElement(writer, rootElement) {\n\t\tconst fakeMarkersRanges = this._getAllFakeMarkersFromElement(writer, rootElement).reduce((acc, fakeMarker) => {\n\t\t\tconst position = fakeMarker.markerElement && writer.createPositionBefore(fakeMarker.markerElement);\n\t\t\tlet prevFakeMarker = acc[fakeMarker.name];\n\t\t\tlet skipAssign = false;\n\t\t\tif (prevFakeMarker?.start && prevFakeMarker?.end) {\n\t\t\t\tif (this._getMarkerClipboardConfig(fakeMarker.name).duplicateOnPaste) acc[this._getUniqueMarkerName(fakeMarker.name)] = acc[fakeMarker.name];\n\t\t\t\telse skipAssign = true;\n\t\t\t\tprevFakeMarker = null;\n\t\t\t}\n\t\t\tif (!skipAssign) acc[fakeMarker.name] = {\n\t\t\t\t...prevFakeMarker,\n\t\t\t\t[fakeMarker.type]: position\n\t\t\t};\n\t\t\tif (fakeMarker.markerElement) writer.remove(fakeMarker.markerElement);\n\t\t\treturn acc;\n\t\t}, {});\n\t\treturn mapValues(fakeMarkersRanges, (range) => new ModelRange(range.start || writer.createPositionFromPath(rootElement, [0]), range.end || writer.createPositionAt(rootElement, \"end\")));\n\t}\n\t/**\n\t* Returns array that contains list of fake markers with corresponding `$marker` elements.\n\t*\n\t* For each marker, there can be two `$marker` elements or only one (if the document fragment contained\n\t* only the beginning or only the end of a marker).\n\t*\n\t* @param writer An instance of the model writer.\n\t* @param rootElement The element to be checked.\n\t*/\n\t_getAllFakeMarkersFromElement(writer, rootElement) {\n\t\tconst foundFakeMarkers = Array.from(writer.createRangeIn(rootElement)).flatMap(({ item }) => {\n\t\t\tif (!item.is(\"element\", \"$marker\")) return [];\n\t\t\treturn [{\n\t\t\t\tmarkerElement: item,\n\t\t\t\tname: item.getAttribute(\"data-name\"),\n\t\t\t\ttype: item.getAttribute(\"data-type\")\n\t\t\t}];\n\t\t});\n\t\tconst prependFakeMarkers = [];\n\t\tconst appendFakeMarkers = [];\n\t\tfor (const fakeMarker of foundFakeMarkers) {\n\t\t\tif (fakeMarker.type === \"end\") {\n\t\t\t\tif (!foundFakeMarkers.some((otherFakeMarker) => otherFakeMarker.name === fakeMarker.name && otherFakeMarker.type === \"start\")) prependFakeMarkers.push({\n\t\t\t\t\tmarkerElement: null,\n\t\t\t\t\tname: fakeMarker.name,\n\t\t\t\t\ttype: \"start\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (fakeMarker.type === \"start\") {\n\t\t\t\tif (!foundFakeMarkers.some((otherFakeMarker) => otherFakeMarker.name === fakeMarker.name && otherFakeMarker.type === \"end\")) appendFakeMarkers.unshift({\n\t\t\t\t\tmarkerElement: null,\n\t\t\t\t\tname: fakeMarker.name,\n\t\t\t\t\ttype: \"end\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn [\n\t\t\t...prependFakeMarkers,\n\t\t\t...foundFakeMarkers,\n\t\t\t...appendFakeMarkers\n\t\t];\n\t}\n\t/**\n\t* When copy of markers occurs we have to make sure that pasted markers have different names\n\t* than source markers. This functions helps with assigning unique part to marker name to\n\t* prevent duplicated markers error.\n\t*\n\t* @param name Name of marker\n\t*/\n\t_getUniqueMarkerName(name) {\n\t\tconst parts = name.split(\":\");\n\t\tconst newId = uid().substring(1, 6);\n\t\tif (parts.length === 3) return `${parts.slice(0, 2).join(\":\")}:${newId}`;\n\t\treturn `${parts.join(\":\")}:${newId}`;\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 clipboard/clipboardpipeline\n*/\n/**\n* The clipboard pipeline feature. It is responsible for intercepting the `paste` and `drop` events and\n* passing the pasted content through a series of events in order to insert it into the editor's content.\n* It also handles the `cut` and `copy` events to fill the native clipboard with the serialized editor's data.\n*\n* # Input pipeline\n*\n* The behavior of the default handlers (all at a `low` priority):\n*\n* ## Event: `paste` or `drop`\n*\n* 1. Translates the event data.\n* 2. Fires the {@link module:engine/view/document~ViewDocument#event:clipboardInput `view.Document#clipboardInput`} event.\n*\n* ## Event: `view.Document#clipboardInput`\n*\n* 1. If the `data.content` event field is already set (by some listener on a higher priority), it takes this content and fires the event\n*    from the last point.\n* 2. Otherwise, it retrieves `text/html` or `text/plain` from `data.dataTransfer`.\n* 3. Normalizes the raw data by applying simple filters on string data.\n* 4. Processes the raw data to {@link module:engine/view/documentfragment~ViewDocumentFragment `view.DocumentFragment`} with the\n*    {@link module:engine/controller/datacontroller~DataController#htmlProcessor `DataController#htmlProcessor`}.\n* 5. Fires the {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation\n*   `ClipboardPipeline#inputTransformation`} event with the view document fragment in the `data.content` event field.\n*\n* ## Event: `ClipboardPipeline#inputTransformation`\n*\n* 1. Converts {@link module:engine/view/documentfragment~ViewDocumentFragment `view.DocumentFragment`} from the `data.content` field to\n*    {@link module:engine/model/documentfragment~ModelDocumentFragment `model.DocumentFragment`}.\n* 2. Fires the {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:contentInsertion `ClipboardPipeline#contentInsertion`}\n*    event with the model document fragment in the `data.content` event field.\n*    **Note**: The `ClipboardPipeline#contentInsertion` event is fired within a model change block to allow other handlers\n*    to run in the same block without post-fixers called in between (i.e., the selection post-fixer).\n*\n* ## Event: `ClipboardPipeline#contentInsertion`\n*\n* 1. Calls {@link module:engine/model/model~Model#insertContent `model.insertContent()`} to insert `data.content`\n*    at the current selection position.\n*\n* # Output pipeline\n*\n* The behavior of the default handlers (all at a `low` priority):\n*\n* ## Event: `copy`, `cut` or `dragstart`\n*\n* 1. Retrieves the selected {@link module:engine/model/documentfragment~ModelDocumentFragment `model.DocumentFragment`} by calling\n*    {@link module:engine/model/model~Model#getSelectedContent `model#getSelectedContent()`}.\n* 2. Converts the model document fragment to {@link module:engine/view/documentfragment~ViewDocumentFragment `view.DocumentFragment`}.\n* 3. Fires the {@link module:engine/view/document~ViewDocument#event:clipboardOutput `view.Document#clipboardOutput`} event\n*    with the view document fragment in the `data.content` event field.\n*\n* ## Event: `view.Document#clipboardOutput`\n*\n* 1. Processes `data.content` to HTML and plain text with the\n*    {@link module:engine/controller/datacontroller~DataController#htmlProcessor `DataController#htmlProcessor`}.\n* 2. Updates the `data.dataTransfer` data for `text/html` and `text/plain` with the processed data.\n* 3. For the `cut` method, calls {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}\n*    on the current selection.\n*\n* Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n*/\nvar ClipboardPipeline = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ClipboardPipeline\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ClipboardMarkersUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.editor.editing.view.addObserver(ClipboardObserver);\n\t\tthis._setupPasteDrop();\n\t\tthis._setupCopyCut();\n\t}\n\t/**\n\t* Fires Clipboard `'outputTransformation'` event for given parameters.\n\t*\n\t* @internal\n\t*/\n\t_fireOutputTransformationEvent(dataTransfer, selection, method) {\n\t\tconst clipboardMarkersUtils = this.editor.plugins.get(\"ClipboardMarkersUtils\");\n\t\tthis.editor.model.enqueueChange({ isUndoable: method === \"cut\" }, () => {\n\t\t\tconst documentFragment = clipboardMarkersUtils._copySelectedFragmentWithMarkers(method, selection);\n\t\t\tthis.fire(\"outputTransformation\", {\n\t\t\t\tdataTransfer,\n\t\t\t\tcontent: documentFragment,\n\t\t\t\tmethod\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* The clipboard paste pipeline.\n\t*/\n\t_setupPasteDrop() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst clipboardMarkersUtils = this.editor.plugins.get(\"ClipboardMarkersUtils\");\n\t\tthis.listenTo(viewDocument, \"clipboardInput\", (evt, data) => {\n\t\t\tif (data.method == \"paste\" && !editor.model.canEditAt(editor.model.document.selection)) evt.stop();\n\t\t}, { priority: \"highest\" });\n\t\tthis.listenTo(viewDocument, \"clipboardInput\", (evt, data) => {\n\t\t\tconst dataTransfer = data.dataTransfer;\n\t\t\tconst eventInfo = new EventInfo(this, \"inputTransformation\");\n\t\t\tconst sourceEditorId = dataTransfer.getData(\"application/ckeditor5-editor-id\") || null;\n\t\t\tconst content = typeof data.content == \"string\" ? this.editor.data.htmlProcessor.toView(normalizeClipboardData(data.content)) : data.content;\n\t\t\tthis.fire(eventInfo, {\n\t\t\t\tcontent,\n\t\t\t\tdataTransfer,\n\t\t\t\tsourceEditorId,\n\t\t\t\textraContent: data.extraContent,\n\t\t\t\ttargetRanges: data.targetRanges,\n\t\t\t\tmethod: data.method\n\t\t\t});\n\t\t\tif (eventInfo.stop.called) evt.stop();\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(this, \"inputTransformation\", (evt, data) => {\n\t\t\tif (data.content.isEmpty) return;\n\t\t\tconst modelFragment = this.editor.data.toModel(data.content, \"$clipboardHolder\");\n\t\t\tif (modelFragment.childCount == 0) return;\n\t\t\tevt.stop();\n\t\t\tmodel.change(() => {\n\t\t\t\tthis.fire(\"contentInsertion\", {\n\t\t\t\t\tcontent: modelFragment,\n\t\t\t\t\tmethod: data.method,\n\t\t\t\t\tsourceEditorId: data.sourceEditorId,\n\t\t\t\t\tdataTransfer: data.dataTransfer,\n\t\t\t\t\ttargetRanges: data.targetRanges\n\t\t\t\t});\n\t\t\t});\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(this, \"contentInsertion\", (evt, data) => {\n\t\t\tdata.resultRange = clipboardMarkersUtils._pasteFragmentWithMarkers(data.content);\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* The clipboard copy/cut pipeline.\n\t*/\n\t_setupCopyCut() {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tconst onCopyCut = (evt, data) => {\n\t\t\tconst dataTransfer = data.dataTransfer;\n\t\t\tdata.preventDefault();\n\t\t\tthis._fireOutputTransformationEvent(dataTransfer, modelDocument.selection, evt.name);\n\t\t};\n\t\tthis.listenTo(viewDocument, \"copy\", onCopyCut, { priority: \"low\" });\n\t\tthis.listenTo(viewDocument, \"cut\", (evt, data) => {\n\t\t\tif (!editor.model.canEditAt(editor.model.document.selection)) data.preventDefault();\n\t\t\telse onCopyCut(evt, data);\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(this, \"outputTransformation\", (evt, data) => {\n\t\t\tconst content = editor.data.toView(data.content, { isClipboardPipeline: true });\n\t\t\tviewDocument.fire(\"clipboardOutput\", {\n\t\t\t\tdataTransfer: data.dataTransfer,\n\t\t\t\tcontent,\n\t\t\t\tmethod: data.method\n\t\t\t});\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(viewDocument, \"clipboardOutput\", (evt, data) => {\n\t\t\tif (!data.content.isEmpty) {\n\t\t\t\tdata.dataTransfer.setData(\"text/html\", this.editor.data.htmlProcessor.toData(data.content));\n\t\t\t\tdata.dataTransfer.setData(\"text/plain\", viewToPlainText(editor.data.htmlProcessor.domConverter, data.content));\n\t\t\t\tdata.dataTransfer.setData(\"application/ckeditor5-editor-id\", this.editor.id);\n\t\t\t}\n\t\t\tif (data.method == \"cut\") editor.model.deleteContent(modelDocument.selection);\n\t\t}, { priority: \"low\" });\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 clipboard/lineview\n*/\n/* istanbul ignore file -- @preserve */\nconst toPx = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The horizontal drop target line view.\n*\n* @internal\n*/\nvar LineView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\tisVisible: false,\n\t\t\tleft: null,\n\t\t\ttop: null,\n\t\t\twidth: null\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-clipboard-drop-target-line\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\tleft: bind.to(\"left\", (left) => toPx(left)),\n\t\t\t\t\ttop: bind.to(\"top\", (top) => toPx(top)),\n\t\t\t\t\twidth: bind.to(\"width\", (width) => toPx(width))\n\t\t\t\t}\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 clipboard/dragdroptarget\n*/\n/**\n* Part of the Drag and Drop handling. Responsible for finding and displaying the drop target.\n*\n* @internal\n*/\nvar DragDropTarget = class extends Plugin {\n\t/**\n\t* A delayed callback removing the drop marker.\n\t*\n\t* @internal\n\t*/\n\tremoveDropMarkerDelayed = delay(() => this.removeDropMarker(), 40);\n\t/**\n\t* A throttled callback updating the drop marker.\n\t*/\n\t_updateDropMarkerThrottled = throttle((targetRange) => this._updateDropMarker(targetRange), 40);\n\t/**\n\t* A throttled callback reconverting the drop parker.\n\t*/\n\t_reconvertMarkerThrottled = throttle(() => {\n\t\tif (this.editor.model.markers.has(\"drop-target\")) this.editor.editing.reconvertMarker(\"drop-target\");\n\t}, 0);\n\t/**\n\t* The horizontal drop target line view.\n\t*/\n\t_dropTargetLineView = new LineView();\n\t/**\n\t* DOM Emitter.\n\t*/\n\t_domEmitter = new (DomEmitterMixin())();\n\t/**\n\t* Map of document scrollable elements.\n\t*/\n\t_scrollables = /* @__PURE__ */ new Map();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"DragDropTarget\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis._setupDropMarker();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._domEmitter.stopListening();\n\t\tfor (const { resizeObserver } of this._scrollables.values()) resizeObserver.destroy();\n\t\tthis._updateDropMarkerThrottled.cancel();\n\t\tthis.removeDropMarkerDelayed.cancel();\n\t\tthis._reconvertMarkerThrottled.cancel();\n\t\treturn super.destroy();\n\t}\n\t/**\n\t* Finds the drop target range and updates the drop marker.\n\t*\n\t* @return The updated drop target range or null if no valid range was found.\n\t* @internal\n\t*/\n\tupdateDropMarker(targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange) {\n\t\tthis.removeDropMarkerDelayed.cancel();\n\t\tconst targetRange = findDropTargetRange(this.editor, targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange);\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif (!targetRange) return null;\n\t\tif (draggedRange && draggedRange.containsRange(targetRange)) {\n\t\t\tthis.removeDropMarker();\n\t\t\treturn null;\n\t\t}\n\t\tif (targetRange && !this.editor.model.canEditAt(targetRange)) {\n\t\t\tthis.removeDropMarker();\n\t\t\treturn null;\n\t\t}\n\t\tthis._updateDropMarkerThrottled(targetRange);\n\t\treturn targetRange;\n\t}\n\t/**\n\t* Finds the final drop target range.\n\t*\n\t* @internal\n\t*/\n\tgetFinalDropRange(targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange) {\n\t\tconst targetRange = findDropTargetRange(this.editor, targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange);\n\t\tthis.removeDropMarker();\n\t\treturn targetRange;\n\t}\n\t/**\n\t* Removes the drop target marker.\n\t*\n\t* @internal\n\t*/\n\tremoveDropMarker() {\n\t\tconst model = this.editor.model;\n\t\tthis.removeDropMarkerDelayed.cancel();\n\t\tthis._updateDropMarkerThrottled.cancel();\n\t\tthis._dropTargetLineView.isVisible = false;\n\t\tif (model.markers.has(\"drop-target\")) model.change((writer) => {\n\t\t\twriter.removeMarker(\"drop-target\");\n\t\t});\n\t}\n\t/**\n\t* Creates downcast conversion for the drop target marker.\n\t*/\n\t_setupDropMarker() {\n\t\tconst editor = this.editor;\n\t\teditor.ui.view.body.add(this._dropTargetLineView);\n\t\teditor.conversion.for(\"editingDowncast\").markerToHighlight({\n\t\t\tmodel: \"drop-target\",\n\t\t\tview: { classes: [\"ck-clipboard-drop-target-range\"] }\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").markerToElement({\n\t\t\tmodel: \"drop-target\",\n\t\t\tview: (data, { writer }) => {\n\t\t\t\tif (editor.model.schema.checkChild(data.markerRange.start, \"$text\")) {\n\t\t\t\t\tthis._dropTargetLineView.isVisible = false;\n\t\t\t\t\treturn this._createDropTargetPosition(writer);\n\t\t\t\t} else if (data.markerRange.isCollapsed) this._updateDropTargetLine(data.markerRange);\n\t\t\t\telse this._dropTargetLineView.isVisible = false;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Updates the drop target marker to the provided range.\n\t*\n\t* @param targetRange The range to set the marker to.\n\t*/\n\t_updateDropMarker(targetRange) {\n\t\tconst editor = this.editor;\n\t\tconst markers = editor.model.markers;\n\t\teditor.model.change((writer) => {\n\t\t\tif (markers.has(\"drop-target\")) {\n\t\t\t\tif (!markers.get(\"drop-target\").getRange().isEqual(targetRange)) writer.updateMarker(\"drop-target\", { range: targetRange });\n\t\t\t} else writer.addMarker(\"drop-target\", {\n\t\t\t\trange: targetRange,\n\t\t\t\tusingOperation: false,\n\t\t\t\taffectsData: false\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Creates the UI element for vertical (in-line) drop target.\n\t*/\n\t_createDropTargetPosition(writer) {\n\t\treturn writer.createUIElement(\"span\", { class: \"ck ck-clipboard-drop-target-position\" }, function(domDocument) {\n\t\t\tconst domElement = this.toDomElement(domDocument);\n\t\t\tdomElement.append(\"⁠\", domDocument.createElement(\"span\"), \"⁠\");\n\t\t\treturn domElement;\n\t\t});\n\t}\n\t/**\n\t* Updates the horizontal drop target line.\n\t*/\n\t_updateDropTargetLine(range) {\n\t\tconst editing = this.editor.editing;\n\t\tconst nodeBefore = range.start.nodeBefore;\n\t\tconst nodeAfter = range.start.nodeAfter;\n\t\tconst nodeParent = range.start.parent;\n\t\tconst viewElementBefore = nodeBefore ? editing.mapper.toViewElement(nodeBefore) : null;\n\t\tconst domElementBefore = viewElementBefore ? editing.view.domConverter.mapViewToDom(viewElementBefore) : null;\n\t\tconst viewElementAfter = nodeAfter ? editing.mapper.toViewElement(nodeAfter) : null;\n\t\tconst domElementAfter = viewElementAfter ? editing.view.domConverter.mapViewToDom(viewElementAfter) : null;\n\t\tconst viewElementParent = editing.mapper.toViewElement(nodeParent);\n\t\tif (!viewElementParent) return;\n\t\tconst domElementParent = editing.view.domConverter.mapViewToDom(viewElementParent);\n\t\tconst domScrollableRect = this._getScrollableRect(viewElementParent);\n\t\tconst { scrollX, scrollY } = global.window;\n\t\tconst rectBefore = domElementBefore ? new Rect(domElementBefore) : null;\n\t\tconst rectAfter = domElementAfter ? new Rect(domElementAfter) : null;\n\t\tconst rectParent = new Rect(domElementParent).excludeScrollbarsAndBorders();\n\t\tconst above = rectBefore ? rectBefore.bottom : rectParent.top;\n\t\tconst below = rectAfter ? rectAfter.top : rectParent.bottom;\n\t\tconst parentStyle = global.window.getComputedStyle(domElementParent);\n\t\tconst top = above <= below ? (above + below) / 2 : below;\n\t\tif (domScrollableRect.top < top && top < domScrollableRect.bottom) {\n\t\t\tconst left = rectParent.left + parseFloat(parentStyle.paddingLeft);\n\t\t\tconst right = rectParent.right - parseFloat(parentStyle.paddingRight);\n\t\t\tconst leftClamped = Math.max(left + scrollX, domScrollableRect.left);\n\t\t\tconst rightClamped = Math.min(right + scrollX, domScrollableRect.right);\n\t\t\tthis._dropTargetLineView.set({\n\t\t\t\tisVisible: true,\n\t\t\t\tleft: leftClamped,\n\t\t\t\ttop: top + scrollY,\n\t\t\t\twidth: rightClamped - leftClamped\n\t\t\t});\n\t\t} else this._dropTargetLineView.isVisible = false;\n\t}\n\t/**\n\t* Finds the closest scrollable element rect for the given view element.\n\t*/\n\t_getScrollableRect(viewElement) {\n\t\tconst rootName = viewElement.root.rootName;\n\t\tlet domScrollable;\n\t\tif (this._scrollables.has(rootName)) domScrollable = this._scrollables.get(rootName).domElement;\n\t\telse {\n\t\t\tdomScrollable = findScrollableElement(this.editor.editing.view.domConverter.mapViewToDom(viewElement));\n\t\t\tthis._domEmitter.listenTo(domScrollable, \"scroll\", this._reconvertMarkerThrottled, { usePassive: true });\n\t\t\tconst resizeObserver = new ResizeObserver(domScrollable, this._reconvertMarkerThrottled);\n\t\t\tthis._scrollables.set(rootName, {\n\t\t\t\tdomElement: domScrollable,\n\t\t\t\tresizeObserver\n\t\t\t});\n\t\t}\n\t\treturn new Rect(domScrollable).excludeScrollbarsAndBorders();\n\t}\n};\n/**\n* Returns fixed selection range for given position and target element.\n*/\nfunction findDropTargetRange(editor, targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange) {\n\tconst model = editor.model;\n\tconst mapper = editor.editing.mapper;\n\tlet modelElement = getClosestMappedModelElement(editor, targetViewElement);\n\twhile (modelElement) {\n\t\tif (!blockMode) {\n\t\t\tif (model.schema.checkChild(modelElement, \"$text\")) {\n\t\t\t\tif (targetViewRanges) {\n\t\t\t\t\tconst targetViewPosition = targetViewRanges[0].start;\n\t\t\t\t\tconst targetModelPosition = mapper.toModelPosition(targetViewPosition);\n\t\t\t\t\tif (!draggedRange || Array.from(draggedRange.getItems({ shallow: true })).some((item) => model.schema.checkChild(targetModelPosition, item))) {\n\t\t\t\t\t\tif (model.schema.checkChild(targetModelPosition, \"$text\")) return model.createRange(targetModelPosition);\n\t\t\t\t\t\telse if (targetViewPosition) return findDropTargetRangeForElement(editor, getClosestMappedModelElement(editor, targetViewPosition.parent), clientX, clientY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (model.schema.isInline(modelElement)) return findDropTargetRangeForElement(editor, modelElement, clientX, clientY);\n\t\t}\n\t\tif (model.schema.isBlock(modelElement)) return findDropTargetRangeForElement(editor, modelElement, clientX, clientY);\n\t\telse if (model.schema.checkChild(modelElement, \"$block\")) {\n\t\t\tconst childNodes = Array.from(modelElement.getChildren()).filter((node) => node.is(\"element\") && !shouldIgnoreElement(editor, node));\n\t\t\tlet startIndex = 0;\n\t\t\tlet endIndex = childNodes.length;\n\t\t\tif (endIndex == 0) return model.createRange(model.createPositionAt(modelElement, \"end\"));\n\t\t\twhile (startIndex < endIndex - 1) {\n\t\t\t\tconst middleIndex = Math.floor((startIndex + endIndex) / 2);\n\t\t\t\tif (findElementSide(editor, childNodes[middleIndex], clientX, clientY) == \"before\") endIndex = middleIndex;\n\t\t\t\telse startIndex = middleIndex;\n\t\t\t}\n\t\t\treturn findDropTargetRangeForElement(editor, childNodes[startIndex], clientX, clientY);\n\t\t}\n\t\tmodelElement = modelElement.parent;\n\t}\n\treturn null;\n}\n/**\n* Returns true for elements which should be ignored.\n*/\nfunction shouldIgnoreElement(editor, modelElement) {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\tconst viewElement = mapper.toViewElement(modelElement);\n\tif (!viewElement) return true;\n\tconst domElement = domConverter.mapViewToDom(viewElement);\n\treturn global.window.getComputedStyle(domElement).float != \"none\";\n}\n/**\n* Returns target range relative to the given element.\n*/\nfunction findDropTargetRangeForElement(editor, modelElement, clientX, clientY) {\n\tconst model = editor.model;\n\treturn model.createRange(model.createPositionAt(modelElement, findElementSide(editor, modelElement, clientX, clientY)));\n}\n/**\n* Resolves whether drop marker should be before or after the given element.\n*/\nfunction findElementSide(editor, modelElement, clientX, clientY) {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\tconst viewElement = mapper.toViewElement(modelElement);\n\tconst domElement = domConverter.mapViewToDom(viewElement);\n\tconst rect = new Rect(domElement);\n\tif (editor.model.schema.isInline(modelElement)) return clientX < (rect.left + rect.right) / 2 ? \"before\" : \"after\";\n\telse return clientY < (rect.top + rect.bottom) / 2 ? \"before\" : \"after\";\n}\n/**\n* Returns the closest model element for the specified view element.\n*/\nfunction getClosestMappedModelElement(editor, element) {\n\tconst mapper = editor.editing.mapper;\n\tconst view = editor.editing.view;\n\tconst targetModelElement = mapper.toModelElement(element);\n\tif (targetModelElement) return targetModelElement;\n\tconst viewPosition = view.createPositionBefore(element);\n\tconst viewElement = mapper.findMappedViewAncestor(viewPosition);\n\treturn mapper.toModelElement(viewElement);\n}\n/**\n* Returns the closest scrollable ancestor DOM element.\n*\n* It is assumed that `domNode` is attached to the document.\n*/\nfunction findScrollableElement(domNode) {\n\tlet domElement = domNode;\n\tdo {\n\t\tdomElement = domElement.parentElement;\n\t\tconst overflow = global.window.getComputedStyle(domElement).overflowY;\n\t\tif (overflow == \"auto\" || overflow == \"scroll\") break;\n\t} while (domElement.tagName != \"BODY\");\n\treturn domElement;\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 clipboard/dragdropblocktoolbar\n*/\n/**\n* Integration of a block Drag and Drop support with the block toolbar.\n*\n* @internal\n*/\nvar DragDropBlockToolbar = class extends Plugin {\n\t/**\n\t* Whether current dragging is started by block toolbar button dragging.\n\t*/\n\t_isBlockDragging = false;\n\t/**\n\t* DOM Emitter.\n\t*/\n\t_domEmitter = new (DomEmitterMixin())();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"DragDropBlockToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tthis.listenTo(editor, \"change:isReadOnly\", (evt, name, isReadOnly) => {\n\t\t\tif (isReadOnly) {\n\t\t\t\tthis.forceDisabled(\"readOnlyMode\");\n\t\t\t\tthis._isBlockDragging = false;\n\t\t\t} else this.clearForceDisabled(\"readOnlyMode\");\n\t\t});\n\t\tif (env.isAndroid) this.forceDisabled(\"noAndroidSupport\");\n\t\tif (editor.plugins.has(\"BlockToolbar\")) {\n\t\t\tconst element = editor.plugins.get(\"BlockToolbar\").buttonView.element;\n\t\t\tthis._domEmitter.listenTo(element, \"dragstart\", (evt, data) => this._handleBlockDragStart(data));\n\t\t\tthis._domEmitter.listenTo(global.document, \"dragover\", (evt, data) => this._handleBlockDragging(data));\n\t\t\tthis._domEmitter.listenTo(global.document, \"drop\", (evt, data) => this._handleBlockDragging(data));\n\t\t\tthis._domEmitter.listenTo(global.document, \"dragend\", () => this._handleBlockDragEnd(), { useCapture: true });\n\t\t\tif (this.isEnabled) element.setAttribute(\"draggable\", \"true\");\n\t\t\tthis.on(\"change:isEnabled\", (evt, name, isEnabled) => {\n\t\t\t\telement.setAttribute(\"draggable\", isEnabled ? \"true\" : \"false\");\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._domEmitter.stopListening();\n\t\treturn super.destroy();\n\t}\n\t/**\n\t* The `dragstart` event handler.\n\t*/\n\t_handleBlockDragStart(domEvent) {\n\t\tif (!this.isEnabled) return;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst view = this.editor.editing.view;\n\t\tconst blocks = Array.from(selection.getSelectedBlocks());\n\t\tconst draggedRange = model.createRange(model.createPositionBefore(blocks[0]), model.createPositionAfter(blocks[blocks.length - 1]));\n\t\tmodel.change((writer) => writer.setSelection(draggedRange));\n\t\tthis._isBlockDragging = true;\n\t\tview.focus();\n\t\tview.getObserver(ClipboardObserver).onDomEvent(domEvent);\n\t}\n\t/**\n\t* The `dragover` and `drop` event handler.\n\t*/\n\t_handleBlockDragging(domEvent) {\n\t\tif (!this.isEnabled || !this._isBlockDragging) return;\n\t\tconst clientX = domEvent.clientX + (this.editor.locale.contentLanguageDirection == \"ltr\" ? 100 : -100);\n\t\tconst clientY = domEvent.clientY;\n\t\tconst target = document.elementFromPoint(clientX, clientY);\n\t\tconst view = this.editor.editing.view;\n\t\tif (!target || !target.closest(\".ck-editor__editable\")) return;\n\t\tview.getObserver(ClipboardObserver).onDomEvent({\n\t\t\t...domEvent,\n\t\t\ttype: domEvent.type,\n\t\t\tdataTransfer: domEvent.dataTransfer,\n\t\t\ttarget,\n\t\t\tclientX,\n\t\t\tclientY,\n\t\t\tpreventDefault: () => domEvent.preventDefault(),\n\t\t\tstopPropagation: () => domEvent.stopPropagation()\n\t\t});\n\t}\n\t/**\n\t* The `dragend` event handler.\n\t*/\n\t_handleBlockDragEnd() {\n\t\tthis._isBlockDragging = false;\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 clipboard/dragdrop\n*/\n/**\n* The drag and drop feature. It works on top of the {@link module:clipboard/clipboardpipeline~ClipboardPipeline}.\n*\n* Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n*\n* @internal\n*/\nvar DragDrop = class extends Plugin {\n\t/**\n\t* The live range over the original content that is being dragged.\n\t*/\n\t_draggedRange;\n\t/**\n\t* The UID of current dragging that is used to verify if the drop started in the same editor as the drag start.\n\t*\n\t* **Note**: This is a workaround for broken 'dragend' events (they are not fired if the source text node got removed).\n\t*/\n\t_draggingUid;\n\t/**\n\t* The reference to the model element that currently has a `draggable` attribute set (it is set while dragging).\n\t*/\n\t_draggableElement;\n\t/**\n\t* A delayed callback removing draggable attributes.\n\t*/\n\t_clearDraggableAttributesDelayed = delay(() => this._clearDraggableAttributes(), 40);\n\t/**\n\t* Whether the dragged content can be dropped only in block context.\n\t*/\n\t_blockMode = false;\n\t/**\n\t* DOM Emitter.\n\t*/\n\t_domEmitter = new (DomEmitterMixin())();\n\t/**\n\t* The DOM element used to generate dragged preview image.\n\t*/\n\t_previewContainer;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"DragDrop\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tClipboardPipeline,\n\t\t\tWidget,\n\t\t\tDragDropTarget,\n\t\t\tDragDropBlockToolbar\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tthis._draggedRange = null;\n\t\tthis._draggingUid = \"\";\n\t\tthis._draggableElement = null;\n\t\tview.addObserver(ClipboardObserver);\n\t\tview.addObserver(PointerObserver);\n\t\tthis._setupDragging();\n\t\tthis._setupContentInsertionIntegration();\n\t\tthis._setupClipboardInputIntegration();\n\t\tthis._setupDraggableAttributeHandling();\n\t\tthis.listenTo(editor, \"change:isReadOnly\", (evt, name, isReadOnly) => {\n\t\t\tif (isReadOnly) this.forceDisabled(\"readOnlyMode\");\n\t\t\telse this.clearForceDisabled(\"readOnlyMode\");\n\t\t});\n\t\tthis.on(\"change:isEnabled\", (evt, name, isEnabled) => {\n\t\t\tif (!isEnabled) this._finalizeDragging(false);\n\t\t});\n\t\tif (env.isAndroid) this.forceDisabled(\"noAndroidSupport\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._draggedRange) {\n\t\t\tthis._draggedRange.detach();\n\t\t\tthis._draggedRange = null;\n\t\t}\n\t\tif (this._previewContainer) this._previewContainer.remove();\n\t\tthis._domEmitter.stopListening();\n\t\tthis._clearDraggableAttributesDelayed.cancel();\n\t\treturn super.destroy();\n\t}\n\t/**\n\t* Drag and drop events handling.\n\t*/\n\t_setupDragging() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst dragDropTarget = editor.plugins.get(DragDropTarget);\n\t\tthis.listenTo(viewDocument, \"dragstart\", (evt, data) => {\n\t\t\tif (data.target?.is(\"editableElement\")) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._prepareDraggedRange(data.target);\n\t\t\tif (!this._draggedRange) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._draggingUid = uid();\n\t\t\tconst canEditAtDraggedRange = this.isEnabled && editor.model.canEditAt(this._draggedRange);\n\t\t\tdata.dataTransfer.effectAllowed = canEditAtDraggedRange ? \"copyMove\" : \"copy\";\n\t\t\tdata.dataTransfer.setData(\"application/ckeditor5-dragging-uid\", this._draggingUid);\n\t\t\tconst draggedSelection = model.createSelection(this._draggedRange.toRange());\n\t\t\tthis.editor.plugins.get(\"ClipboardPipeline\")._fireOutputTransformationEvent(data.dataTransfer, draggedSelection, \"dragstart\");\n\t\t\tconst { dataTransfer, domTarget, domEvent } = data;\n\t\t\tconst { clientX } = domEvent;\n\t\t\tthis._updatePreview({\n\t\t\t\tdataTransfer,\n\t\t\t\tdomTarget,\n\t\t\t\tclientX\n\t\t\t});\n\t\t\tdata.stopPropagation();\n\t\t\tif (!canEditAtDraggedRange) {\n\t\t\t\tthis._draggedRange.detach();\n\t\t\t\tthis._draggedRange = null;\n\t\t\t\tthis._draggingUid = \"\";\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(viewDocument, \"dragend\", (evt, data) => {\n\t\t\tthis._finalizeDragging(!data.dataTransfer.isCanceled && data.dataTransfer.dropEffect == \"move\");\n\t\t}, { priority: \"low\" });\n\t\tthis._domEmitter.listenTo(global.document, \"dragend\", () => {\n\t\t\tthis._blockMode = false;\n\t\t}, { useCapture: true });\n\t\tthis.listenTo(viewDocument, \"dragenter\", () => {\n\t\t\tif (!this.isEnabled) return;\n\t\t\tview.focus();\n\t\t});\n\t\tthis.listenTo(viewDocument, \"dragleave\", () => {\n\t\t\tdragDropTarget.removeDropMarkerDelayed();\n\t\t});\n\t\tthis.listenTo(viewDocument, \"dragging\", (evt, data) => {\n\t\t\tif (!this.isEnabled) {\n\t\t\t\tdata.dataTransfer.dropEffect = \"none\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { clientX, clientY } = data.domEvent;\n\t\t\tif (!dragDropTarget.updateDropMarker(data.target, data.targetRanges, clientX, clientY, this._blockMode, this._draggedRange)) {\n\t\t\t\tdata.dataTransfer.dropEffect = \"none\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._draggedRange) data.dataTransfer.dropEffect = \"copy\";\n\t\t\tif (!env.isGecko) {\n\t\t\t\tif (data.dataTransfer.effectAllowed == \"copy\") data.dataTransfer.dropEffect = \"copy\";\n\t\t\t\telse if ([\"all\", \"copyMove\"].includes(data.dataTransfer.effectAllowed)) data.dataTransfer.dropEffect = \"move\";\n\t\t\t}\n\t\t\tevt.stop();\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Integration with the `clipboardInput` event.\n\t*/\n\t_setupClipboardInputIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tconst dragDropTarget = editor.plugins.get(DragDropTarget);\n\t\tthis.listenTo(viewDocument, \"clipboardInput\", (evt, data) => {\n\t\t\tif (data.method != \"drop\") return;\n\t\t\tconst { clientX, clientY } = data.domEvent;\n\t\t\tconst targetRange = dragDropTarget.getFinalDropRange(data.target, data.targetRanges, clientX, clientY, this._blockMode, this._draggedRange);\n\t\t\tif (!targetRange) {\n\t\t\t\tthis._finalizeDragging(false);\n\t\t\t\tevt.stop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._draggedRange && this._draggingUid != data.dataTransfer.getData(\"application/ckeditor5-dragging-uid\")) {\n\t\t\t\tthis._draggedRange.detach();\n\t\t\t\tthis._draggedRange = null;\n\t\t\t\tthis._draggingUid = \"\";\n\t\t\t}\n\t\t\tif (getFinalDropEffect(data.dataTransfer) == \"move\" && this._draggedRange && this._draggedRange.containsRange(targetRange, true)) {\n\t\t\t\tthis._finalizeDragging(false);\n\t\t\t\tevt.stop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdata.targetRanges = [editor.editing.mapper.toViewRange(targetRange)];\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Integration with the `contentInsertion` event of the clipboard pipeline.\n\t*/\n\t_setupContentInsertionIntegration() {\n\t\tconst clipboardPipeline = this.editor.plugins.get(ClipboardPipeline);\n\t\tclipboardPipeline.on(\"contentInsertion\", (evt, data) => {\n\t\t\tif (!this.isEnabled || data.method !== \"drop\") return;\n\t\t\tconst ranges = data.targetRanges.map((viewRange) => this.editor.editing.mapper.toModelRange(viewRange));\n\t\t\tthis.editor.model.change((writer) => writer.setSelection(ranges));\n\t\t}, { priority: \"high\" });\n\t\tclipboardPipeline.on(\"contentInsertion\", (evt, data) => {\n\t\t\tif (!this.isEnabled || data.method !== \"drop\") return;\n\t\t\tconst isMove = getFinalDropEffect(data.dataTransfer) == \"move\";\n\t\t\tconst isSuccess = !data.resultRange || !data.resultRange.isCollapsed;\n\t\t\tthis._finalizeDragging(isSuccess && isMove);\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* Adds listeners that add the `draggable` attribute to the elements while the mouse button is down so the dragging could start.\n\t*/\n\t_setupDraggableAttributeHandling() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tthis.listenTo(viewDocument, \"pointerdown\", (evt, data) => {\n\t\t\tif (env.isAndroid || !data) return;\n\t\t\tthis._clearDraggableAttributesDelayed.cancel();\n\t\t\tlet draggableElement = findDraggableWidget(data.target);\n\t\t\tif (env.isBlink && !editor.isReadOnly && !draggableElement && !viewDocument.selection.isCollapsed) {\n\t\t\t\tconst selectedElement = viewDocument.selection.getSelectedElement();\n\t\t\t\tif (!selectedElement || !isWidget(selectedElement)) draggableElement = viewDocument.selection.editableElement;\n\t\t\t}\n\t\t\tif (draggableElement) {\n\t\t\t\tview.change((writer) => {\n\t\t\t\t\twriter.setAttribute(\"draggable\", \"true\", draggableElement);\n\t\t\t\t});\n\t\t\t\tthis._draggableElement = editor.editing.mapper.toModelElement(draggableElement);\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(viewDocument, \"pointerup\", () => {\n\t\t\tif (!env.isAndroid) this._clearDraggableAttributesDelayed();\n\t\t});\n\t}\n\t/**\n\t* Removes the `draggable` attribute from the element that was used for dragging.\n\t*/\n\t_clearDraggableAttributes() {\n\t\tconst editing = this.editor.editing;\n\t\tediting.view.change((writer) => {\n\t\t\tif (this._draggableElement && this._draggableElement.root.rootName != \"$graveyard\") writer.removeAttribute(\"draggable\", editing.mapper.toViewElement(this._draggableElement));\n\t\t\tthis._draggableElement = null;\n\t\t});\n\t}\n\t/**\n\t* Deletes the dragged content from its original range and clears the dragging state.\n\t*\n\t* @param moved Whether the move succeeded.\n\t*/\n\t_finalizeDragging(moved) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\teditor.plugins.get(DragDropTarget).removeDropMarker();\n\t\tthis._clearDraggableAttributes();\n\t\tif (editor.plugins.has(\"WidgetToolbarRepository\")) editor.plugins.get(\"WidgetToolbarRepository\").clearForceDisabled(\"dragDrop\");\n\t\tthis._draggingUid = \"\";\n\t\tif (this._previewContainer) {\n\t\t\tthis._previewContainer.remove();\n\t\t\tthis._previewContainer = void 0;\n\t\t}\n\t\tif (!this._draggedRange) return;\n\t\tif (moved && this.isEnabled) model.change((writer) => {\n\t\t\tconst selection = model.createSelection(this._draggedRange);\n\t\t\tmodel.deleteContent(selection, { doNotAutoparagraph: true });\n\t\t\tconst selectionParent = selection.getFirstPosition().parent;\n\t\t\tif (selectionParent.isEmpty && !model.schema.checkChild(selectionParent, \"$text\") && model.schema.checkChild(selectionParent, \"paragraph\")) writer.insertElement(\"paragraph\", selectionParent, 0);\n\t\t});\n\t\tthis._draggedRange.detach();\n\t\tthis._draggedRange = null;\n\t}\n\t/**\n\t* Sets the dragged source range based on event target and document selection.\n\t*/\n\t_prepareDraggedRange(target) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst draggableWidget = target ? findDraggableWidget(target) : null;\n\t\tif (draggableWidget) {\n\t\t\tconst modelElement = editor.editing.mapper.toModelElement(draggableWidget);\n\t\t\tthis._draggedRange = ModelLiveRange.fromRange(model.createRangeOn(modelElement));\n\t\t\tthis._blockMode = model.schema.isBlock(modelElement);\n\t\t\tif (editor.plugins.has(\"WidgetToolbarRepository\")) editor.plugins.get(\"WidgetToolbarRepository\").forceDisabled(\"dragDrop\");\n\t\t\treturn;\n\t\t}\n\t\tif (selection.isCollapsed && !selection.getFirstPosition().parent.isEmpty) return;\n\t\tconst blocks = Array.from(selection.getSelectedBlocks());\n\t\tconst draggedRange = selection.getFirstRange();\n\t\tif (blocks.length == 0) {\n\t\t\tthis._draggedRange = ModelLiveRange.fromRange(draggedRange);\n\t\t\treturn;\n\t\t}\n\t\tconst blockRange = getRangeIncludingFullySelectedParents(model, blocks);\n\t\tif (blocks.length > 1) {\n\t\t\tthis._draggedRange = ModelLiveRange.fromRange(blockRange);\n\t\t\tthis._blockMode = true;\n\t\t} else if (blocks.length == 1) {\n\t\t\tconst touchesBlockEdges = draggedRange.start.isTouching(blockRange.start) && draggedRange.end.isTouching(blockRange.end);\n\t\t\tthis._draggedRange = ModelLiveRange.fromRange(touchesBlockEdges ? blockRange : draggedRange);\n\t\t\tthis._blockMode = touchesBlockEdges;\n\t\t}\n\t\tmodel.change((writer) => writer.setSelection(this._draggedRange.toRange()));\n\t}\n\t/**\n\t* Updates the dragged preview image.\n\t*/\n\t_updatePreview({ dataTransfer, domTarget, clientX }) {\n\t\tconst view = this.editor.editing.view;\n\t\tconst editable = view.document.selection.editableElement;\n\t\tconst domEditable = view.domConverter.mapViewToDom(editable);\n\t\tconst computedStyle = global.window.getComputedStyle(domEditable);\n\t\tif (!this._previewContainer) {\n\t\t\tthis._previewContainer = createElement(global.document, \"div\", { style: \"position: fixed; left: -999999px;\" });\n\t\t\tglobal.document.body.appendChild(this._previewContainer);\n\t\t} else if (this._previewContainer.firstElementChild) this._previewContainer.removeChild(this._previewContainer.firstElementChild);\n\t\tconst preview = createElement(global.document, \"div\");\n\t\tpreview.className = \"ck ck-content ck-clipboard-preview\";\n\t\tconst domRect = new Rect(domEditable);\n\t\tconst domEditablePaddingLeft = parseFloat(computedStyle.paddingLeft);\n\t\tconst domEditablePaddingRight = parseFloat(computedStyle.paddingRight);\n\t\tconst editableWidth = parseFloat(computedStyle.width) - domEditablePaddingLeft - domEditablePaddingRight;\n\t\tif (!domEditable.contains(domTarget)) {\n\t\t\tif (!env.isiOS) {\n\t\t\t\tconst offsetLeft = domRect.left - clientX + domEditablePaddingLeft;\n\t\t\t\tpreview.style.width = `${editableWidth + offsetLeft}px`;\n\t\t\t\tpreview.style.paddingLeft = `${offsetLeft}px`;\n\t\t\t} else {\n\t\t\t\tpreview.style.width = `${editableWidth}px`;\n\t\t\t\tpreview.style.backgroundColor = \"var(--ck-color-base-background)\";\n\t\t\t}\n\t\t} else if (env.isiOS) {\n\t\t\tpreview.style.maxWidth = `${editableWidth}px`;\n\t\t\tpreview.style.padding = \"10px\";\n\t\t\tpreview.style.minWidth = \"200px\";\n\t\t\tpreview.style.minHeight = \"20px\";\n\t\t\tpreview.style.boxSizing = \"border-box\";\n\t\t\tpreview.style.backgroundColor = \"var(--ck-color-base-background)\";\n\t\t} else return;\n\t\tview.domConverter.setContentOf(preview, dataTransfer.getData(\"text/html\"));\n\t\tdataTransfer.setDragImage(preview, 0, 0);\n\t\tthis._previewContainer.appendChild(preview);\n\t}\n};\n/**\n* Returns the drop effect that should be a result of dragging the content.\n* This function is handling a quirk when checking the effect in the 'drop' DOM event.\n*/\nfunction getFinalDropEffect(dataTransfer) {\n\tif (env.isGecko) return dataTransfer.dropEffect;\n\treturn [\"all\", \"copyMove\"].includes(dataTransfer.effectAllowed) ? \"move\" : \"copy\";\n}\n/**\n* Returns a widget element that should be dragged.\n*/\nfunction findDraggableWidget(target) {\n\tif (target.is(\"editableElement\")) return null;\n\tif (target.hasClass(\"ck-widget__selection-handle\")) return target.findAncestor(isWidget);\n\tif (isWidget(target)) return target;\n\tconst ancestor = target.findAncestor((node) => isWidget(node) || node.is(\"editableElement\"));\n\tif (isWidget(ancestor)) return ancestor;\n\treturn null;\n}\n/**\n* Recursively checks if common parent of provided elements doesn't have any other children. If that's the case,\n* it returns range including this parent. Otherwise, it returns only the range from first to last element.\n*\n* Example:\n*\n* <blockQuote>\n*   <paragraph>[Test 1</paragraph>\n*   <paragraph>Test 2</paragraph>\n*   <paragraph>Test 3]</paragraph>\n* <blockQuote>\n*\n* Because all elements inside the `blockQuote` are selected, the range is extended to include the `blockQuote` too.\n* If only first and second paragraphs would be selected, the range would not include it.\n*/\nfunction getRangeIncludingFullySelectedParents(model, elements) {\n\tconst firstElement = elements[0];\n\tconst lastElement = elements[elements.length - 1];\n\tconst parent = firstElement.getCommonAncestor(lastElement);\n\tconst startPosition = model.createPositionBefore(firstElement);\n\tconst endPosition = model.createPositionAfter(lastElement);\n\tif (parent && parent.is(\"element\") && !model.schema.isLimit(parent)) {\n\t\tconst parentRange = model.createRangeOn(parent);\n\t\tconst touchesStart = startPosition.isTouching(parentRange.start);\n\t\tconst touchesEnd = endPosition.isTouching(parentRange.end);\n\t\tif (touchesStart && touchesEnd) return getRangeIncludingFullySelectedParents(model, [parent]);\n\t}\n\treturn model.createRange(startPosition, endPosition);\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 clipboard/pasteplaintext\n*/\n/**\n* The plugin detects the user's intention to paste plain text.\n*\n* For example, it detects the <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> keystroke.\n*/\nvar PastePlainText = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"PastePlainText\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ClipboardPipeline];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst selection = model.document.selection;\n\t\tview.addObserver(ClipboardObserver);\n\t\teditor.plugins.get(ClipboardPipeline).on(\"contentInsertion\", (evt, data) => {\n\t\t\tif (!isUnformattedInlineContent(data.content, model)) return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst textAttributes = Array.from(selection.getAttributes()).filter(([key]) => model.schema.getAttributeProperties(key).isFormatting);\n\t\t\t\tif (!selection.isCollapsed) model.deleteContent(selection, { doNotAutoparagraph: true });\n\t\t\t\ttextAttributes.push(...selection.getAttributes());\n\t\t\t\tconst range = writer.createRangeIn(data.content);\n\t\t\t\tfor (const item of range.getItems()) for (const attribute of textAttributes) if (model.schema.checkAttribute(item, attribute[0])) writer.setAttribute(attribute[0], attribute[1], item);\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Returns true if specified `documentFragment` represents the unformatted inline content.\n*/\nfunction isUnformattedInlineContent(documentFragment, model) {\n\tlet range = model.createRangeIn(documentFragment);\n\tif (documentFragment.childCount == 1) {\n\t\tconst child = documentFragment.getChild(0);\n\t\tif (child.is(\"element\") && model.schema.isBlock(child) && !model.schema.isObject(child) && !model.schema.isLimit(child)) range = model.createRangeIn(child);\n\t}\n\tfor (const child of range.getItems()) {\n\t\tif (!model.schema.isInline(child)) return false;\n\t\tif (Array.from(child.getAttributeKeys()).find((key) => model.schema.getAttributeProperties(key).isFormatting)) return 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 clipboard/clipboard\n*/\n/**\n* The clipboard feature.\n*\n* Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n*\n* This is a \"glue\" plugin which loads the following plugins:\n* * {@link module:clipboard/clipboardpipeline~ClipboardPipeline}\n* * {@link module:clipboard/dragdrop~DragDrop}\n* * {@link module:clipboard/pasteplaintext~PastePlainText}\n*/\nvar Clipboard = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Clipboard\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tClipboardMarkersUtils,\n\t\t\tClipboardPipeline,\n\t\t\tDragDrop,\n\t\t\tPastePlainText\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [\n\t\t\t{\n\t\t\t\tlabel: t(\"Copy selected content\"),\n\t\t\t\tkeystroke: \"CTRL+C\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t(\"Paste content\"),\n\t\t\t\tkeystroke: \"CTRL+V\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t(\"Paste content as plain text\"),\n\t\t\t\tkeystroke: \"CTRL+SHIFT+V\"\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\nexport { Clipboard, ClipboardMarkersUtils, ClipboardObserver, ClipboardPipeline, DragDrop, DragDrop as _DragDrop, DragDropBlockToolbar, DragDropBlockToolbar as _DragDropBlockToolbar, DragDropTarget, DragDropTarget as _DragDropTarget, PastePlainText, LineView as _ClipboardLineView, normalizeClipboardData as _normalizeClipboardData, plainTextToHtml, viewToPlainText };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module clipboard/utils/plaintexttohtml\n */\n\n/**\n * Converts plain text to its HTML-ized version.\n *\n * @param text The plain text to convert.\n * @returns HTML generated from the plain text.\n */\nexport function plainTextToHtml( text: string ): string {\n\ttext = text\n\t\t// Encode &.\n\t\t.replace( /&/g, '&amp;' )\n\t\t// Encode <>.\n\t\t.replace( /</g, '&lt;' )\n\t\t.replace( />/g, '&gt;' )\n\t\t// Creates a paragraph for each double line break.\n\t\t.replace( /\\r?\\n\\r?\\n/g, '</p><p>' )\n\t\t// Creates a line break for each single line break.\n\t\t.replace( /\\r?\\n/g, '<br>' )\n\t\t// Replace tabs with four spaces.\n\t\t.replace( /\\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;' )\n\t\t// Preserve trailing spaces (only the first and last one – the rest is handled below).\n\t\t.replace( /^\\s/, '&nbsp;' )\n\t\t.replace( /\\s$/, '&nbsp;' )\n\t\t// Preserve other subsequent spaces now.\n\t\t.replace( /\\s\\s/g, ' &nbsp;' );\n\n\tif ( text.includes( '</p><p>' ) || text.includes( '<br>' ) ) {\n\t\t// If we created paragraphs above, add the trailing ones.\n\t\ttext = `<p>${ text }</p>`;\n\t}\n\n\t// TODO:\n\t// * What about '\\nfoo' vs ' foo'?\n\n\treturn text;\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/**\n * @module clipboard/clipboardobserver\n */\n\nimport { EventInfo, getRangeFromMouseEvent } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tViewDataTransfer,\n\tDomEventObserver,\n\ttype ViewDocumentDomEventData,\n\ttype EditingView,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewRange\n} from '@ckeditor/ckeditor5-engine';\n\nimport { plainTextToHtml } from './utils/plaintexttohtml.js';\n\n/**\n * Clipboard events observer.\n *\n * Fires the following events:\n *\n * * {@link module:engine/view/document~ViewDocument#event:clipboardInput},\n * * {@link module:engine/view/document~ViewDocument#event:paste},\n * * {@link module:engine/view/document~ViewDocument#event:copy},\n * * {@link module:engine/view/document~ViewDocument#event:cut},\n * * {@link module:engine/view/document~ViewDocument#event:drop},\n * * {@link module:engine/view/document~ViewDocument#event:dragover},\n * * {@link module:engine/view/document~ViewDocument#event:dragging},\n * * {@link module:engine/view/document~ViewDocument#event:dragstart},\n * * {@link module:engine/view/document~ViewDocument#event:dragend},\n * * {@link module:engine/view/document~ViewDocument#event:dragenter},\n * * {@link module:engine/view/document~ViewDocument#event:dragleave}.\n *\n * **Note**: This observer is not available by default (ckeditor5-engine does not add it on its own).\n * To make it available, it needs to be added to {@link module:engine/view/document~ViewDocument} by using\n * the {@link module:engine/view/view~EditingView#addObserver `View#addObserver()`} method. Alternatively, you can load the\n * {@link module:clipboard/clipboard~Clipboard} plugin which adds this observer automatically (because it uses it).\n */\nexport class ClipboardObserver extends DomEventObserver<\n\t'paste' | 'copy' | 'cut' | 'drop' | 'dragover' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave',\n\tClipboardEventData\n> {\n\tpublic readonly domEventType = [\n\t\t'paste', 'copy', 'cut', 'drop', 'dragover', 'dragstart', 'dragend', 'dragenter', 'dragleave'\n\t] as const;\n\n\tconstructor( view: EditingView ) {\n\t\tsuper( view );\n\n\t\tconst viewDocument = this.document;\n\n\t\tthis.listenTo<ViewDocumentPasteEvent>( viewDocument, 'paste', handleInput( 'clipboardInput' ), { priority: 'low' } );\n\t\tthis.listenTo<ViewDocumentDropEvent>( viewDocument, 'drop', handleInput( 'clipboardInput' ), { priority: 'low' } );\n\t\tthis.listenTo<ViewDocumentDragOverEvent>( viewDocument, 'dragover', handleInput( 'dragging' ), { priority: 'low' } );\n\n\t\tfunction handleInput( type: 'clipboardInput' | 'dragging' ) {\n\t\t\treturn ( evt: EventInfo, data: ViewDocumentDomEventData & ClipboardEventData ) => {\n\t\t\t\tdata.preventDefault();\n\n\t\t\t\tconst targetRanges = data.dropRange ? [ data.dropRange ] : null;\n\t\t\t\tconst dataTransfer = data.dataTransfer;\n\t\t\t\tconst eventInfo = new EventInfo( viewDocument, type );\n\n\t\t\t\tlet content = '';\n\n\t\t\t\tif ( dataTransfer.getData( 'text/html' ) ) {\n\t\t\t\t\tcontent = dataTransfer.getData( 'text/html' );\n\t\t\t\t} else if ( dataTransfer.getData( 'text/plain' ) ) {\n\t\t\t\t\tcontent = plainTextToHtml( dataTransfer.getData( 'text/plain' ) );\n\t\t\t\t}\n\n\t\t\t\tviewDocument.fire( eventInfo, {\n\t\t\t\t\tdataTransfer,\n\t\t\t\t\tcontent,\n\t\t\t\t\tmethod: evt.name,\n\t\t\t\t\ttargetRanges,\n\t\t\t\t\ttarget: data.target,\n\t\t\t\t\tdomEvent: data.domEvent\n\t\t\t\t} );\n\n\t\t\t\t// If CKEditor handled the input, do not bubble the original event any further.\n\t\t\t\t// This helps external integrations recognize that fact and act accordingly.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-upload/issues/92\n\t\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\t\tdata.stopPropagation();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic onDomEvent( domEvent: ClipboardEvent | DragEvent ): void {\n\t\tconst nativeDataTransfer = 'clipboardData' in domEvent ? domEvent.clipboardData! : domEvent.dataTransfer!;\n\t\tconst cacheFiles = domEvent.type == 'drop' || domEvent.type == 'paste';\n\n\t\tconst evtData: ClipboardEventData = {\n\t\t\tdataTransfer: new ViewDataTransfer( nativeDataTransfer, { cacheFiles } )\n\t\t};\n\n\t\tif ( domEvent.type == 'drop' || domEvent.type == 'dragover' ) {\n\t\t\tconst domRange = getRangeFromMouseEvent( domEvent as DragEvent );\n\n\t\t\tevtData.dropRange = domRange && this.view.domConverter.domRangeToView( domRange );\n\t\t}\n\n\t\tthis.fire( domEvent.type, domEvent, evtData );\n\t}\n}\n\n/**\n * The data of 'paste', 'copy', 'cut', 'drop', 'dragover', 'dragstart', 'dragend', 'dragenter' and 'dragleave' events.\n */\nexport interface ClipboardEventData {\n\n\t/**\n\t * The data transfer instance.\n\t */\n\tdataTransfer: ViewDataTransfer;\n\n\t/**\n\t * The position into which the content is dropped.\n\t */\n\tdropRange?: ViewRange | null;\n}\n\n/**\n * Fired as a continuation of the {@link module:engine/view/document~ViewDocument#event:paste} and\n * {@link module:engine/view/document~ViewDocument#event:drop} events.\n *\n * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.\n *\n * This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed\n * and inserted into the editor.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:clipboard/clipboardobserver~ClipboardObserver\n * @see module:clipboard/clipboard~Clipboard\n *\n * @eventName module:engine/view/document~ViewDocument#clipboardInput\n * @param data The event data.\n */\nexport type ViewDocumentClipboardInputEvent = {\n\tname: 'clipboardInput';\n\targs: [ data: ViewDocumentDomEventData<ClipboardEvent | DragEvent> & ClipboardInputEventData ];\n};\n\n/**\n * The value of the {@link module:engine/view/document~ViewDocument#event:paste},\n * {@link module:engine/view/document~ViewDocument#event:copy} and {@link module:engine/view/document~ViewDocument#event:cut} events.\n *\n * In order to access the clipboard data, use the `dataTransfer` property.\n */\nexport interface ClipboardInputEventData {\n\n\t/**\n\t * Data transfer instance.\n\t */\n\tdataTransfer: ViewDataTransfer;\n\n\t/**\n\t * Whether the event was triggered by a paste or a drop operation.\n\t */\n\tmethod: 'paste' | 'drop';\n\n\t/**\n\t * The tree view element representing the target.\n\t */\n\ttarget: ViewElement;\n\n\t/**\n\t * The ranges which are the target of the operation (usually – into which the content should be inserted).\n\t * If the clipboard input was triggered by a paste operation, this property is not set. If by a drop operation,\n\t * then it is the drop position (which can be different than the selection at the moment of the drop).\n\t */\n\ttargetRanges: Array<ViewRange> | null;\n\n\t/**\n\t * The content of clipboard input. Defaults to `text/html`. Falls-back to `text/plain`.\n\t */\n\tcontent: string | ViewDocumentFragment;\n\n\t/**\n\t * Custom data stored by the `clipboardInput` event handlers. Custom properties of this object can be defined and use to\n\t * pass parameters between listeners. Content of this property is passed to the `inputTransformation` event.\n\t */\n\textraContent?: unknown;\n}\n\n/**\n * Fired when the user drags the content over one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:engine/view/document~ViewDocument#event:clipboardInput\n *\n * @eventName module:engine/view/document~ViewDocument#dragover\n * @param data The event data.\n */\nexport type ViewDocumentDragOverEvent = {\n\tname: 'dragover';\n\targs: [ data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired when the user dropped the content into one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:engine/view/document~ViewDocument#event:clipboardInput\n *\n * @eventName module:engine/view/document~ViewDocument#drop\n * @param data The event data.\n */\nexport type ViewDocumentDropEvent = {\n\tname: 'drop';\n\targs: [ data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired when the user pasted the content into one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:engine/view/document~ViewDocument#event:clipboardInput\n *\n * @eventName module:engine/view/document~ViewDocument#paste\n * @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data.\n */\nexport type ViewDocumentPasteEvent = {\n\tname: 'paste';\n\targs: [ data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired when the user copied the content from one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:clipboard/clipboardobserver~ClipboardObserver\n *\n * @eventName module:engine/view/document~ViewDocument#copy\n * @param data The event data.\n */\nexport type ViewDocumentCopyEvent = {\n\tname: 'copy';\n\targs: [ data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired when the user cut the content from one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:clipboard/clipboardobserver~ClipboardObserver\n *\n * @eventName module:engine/view/document~ViewDocument#cut\n * @param data The event data.\n */\nexport type ViewDocumentCutEvent = {\n\tname: 'cut';\n\targs: [ data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired as a continuation of the {@link module:engine/view/document~ViewDocument#event:dragover} event.\n *\n * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.\n *\n * This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed\n * and inserted into the editor.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver}  method. This is usually done by the\n * {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded,\n * the observer must be added manually.\n *\n * @see module:clipboard/clipboardobserver~ClipboardObserver\n * @see module:clipboard/clipboard~Clipboard\n *\n * @eventName module:engine/view/document~ViewDocument#dragging\n * @param data The event data.\n */\nexport type ViewDocumentDraggingEvent = {\n\tname: 'dragging';\n\targs: [ data: ViewDocumentDomEventData<DragEvent> & DraggingEventData ];\n};\n\nexport interface DraggingEventData {\n\n\t/**\n\t * The data transfer instance.\n\t */\n\tdataTransfer: ViewDataTransfer;\n\n\t/**\n\t * Whether the event was triggered by a paste or a drop operation.\n\t */\n\tmethod: 'dragover';\n\n\t/**\n\t * The tree view element representing the target.\n\t */\n\ttarget: Element;\n\n\t/**\n\t * Ranges which are the target of the operation (usually – into which the content should be inserted).\n\t * It is the drop position (which can be different than the selection at the moment of drop).\n\t */\n\ttargetRanges: Array<ViewRange> | null;\n}\n\n/**\n * Fired when the user starts dragging the content in one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:engine/view/document~ViewDocument#event:clipboardInput\n *\n * @eventName module:engine/view/document~ViewDocument#dragstart\n * @param data The event data.\n */\nexport type ViewDocumentDragStartEvent = {\n\tname: 'dragstart';\n\targs: [ data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired when the user ended dragging the content.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:engine/view/document~ViewDocument#event:clipboardInput\n *\n * @eventName module:engine/view/document~ViewDocument#dragend\n * @param data The event data.\n */\nexport type ViewDocumentDragEndEvent = {\n\tname: 'dragend';\n\targs: [ data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired when the user drags the content into one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:engine/view/document~ViewDocument#event:clipboardInput\n *\n * @eventName module:engine/view/document~ViewDocument#dragenter\n * @param data The event data.\n */\nexport type ViewDocumentDragEnterEvent = {\n\tname: 'dragenter';\n\targs: [ data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData ];\n};\n\n/**\n * Fired when the user drags the content out of one of the editing roots of the editor.\n *\n * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.\n *\n * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}\n * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the\n * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}\n * plugin, but if for some reason it is not loaded, the observer must be added manually.\n *\n * @see module:engine/view/document~ViewDocument#event:clipboardInput\n *\n * @eventName module:engine/view/document~ViewDocument#dragleave\n * @param data The event data.\n */\nexport type ViewDocumentDragLeaveEvent = {\n\tname: 'dragleave';\n\targs: [ data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData ];\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/**\n * @module clipboard/utils/normalizeclipboarddata\n */\n\n/**\n * Removes some popular browser quirks out of the clipboard data (HTML).\n * Removes all HTML comments. These are considered an internal thing and it makes little sense if they leak into the editor data.\n *\n * @param data The HTML data to normalize.\n * @returns Normalized HTML.\n * @internal\n */\nexport function normalizeClipboardData( data: string ): string {\n\treturn data\n\t\t.replace( /<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g, ( fullMatch, spaces ) => {\n\t\t\t// Handle the most popular and problematic case when even a single space becomes an nbsp;.\n\t\t\t// Decode those to normal spaces. Read more in https://github.com/ckeditor/ckeditor5-clipboard/issues/2.\n\t\t\tif ( spaces.length == 1 ) {\n\t\t\t\treturn ' ';\n\t\t\t}\n\n\t\t\treturn spaces;\n\t\t} )\n\t\t// Remove all HTML comments.\n\t\t.replace( /<!--[\\s\\S]*?-->/g, '' );\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/**\n * @module clipboard/utils/viewtoplaintext\n */\n\nimport type { ViewDomConverter, ViewDocumentFragment, ViewElement, ViewItem } from '@ckeditor/ckeditor5-engine';\n\n// Elements which should not have empty-line padding.\n// Most `view.ContainerElement` want to be separate by new-line, but some are creating one structure\n// together (like `<li>`) so it is better to separate them by only one \"\\n\".\nconst smallPaddingElements = [ 'figcaption', 'li' ];\n\nconst listElements = [ 'ol', 'ul' ];\n\n/**\n * Converts {@link module:engine/view/item~ViewItem view item} and all of its children to plain text.\n *\n * @param converter The converter instance.\n * @param viewItem View item to convert.\n * @returns Plain text representation of `viewItem`.\n */\nexport function viewToPlainText(\n\tconverter: ViewDomConverter,\n\tviewItem: ViewItem | ViewDocumentFragment\n): string {\n\tif ( viewItem.is( '$text' ) || viewItem.is( '$textProxy' ) ) {\n\t\treturn viewItem.data;\n\t}\n\n\tif ( viewItem.is( 'element', 'img' ) && viewItem.hasAttribute( 'alt' ) ) {\n\t\treturn viewItem.getAttribute( 'alt' )!;\n\t}\n\n\tif ( viewItem.is( 'element', 'br' ) ) {\n\t\treturn '\\n'; // Convert soft breaks to single line break (https://github.com/ckeditor/ckeditor5/issues/8045).\n\t}\n\n\t/**\n\t * Item is a document fragment, attribute element or container element. It doesn't\n\t * have it's own text value, so we need to convert its children elements.\n\t */\n\n\tlet text = '';\n\tlet prev: ViewElement | null = null;\n\n\tfor ( const child of ( viewItem as ViewElement | ViewDocumentFragment ).getChildren() ) {\n\t\ttext += newLinePadding( child as ViewElement, prev ) + viewToPlainText( converter, child );\n\t\tprev = child as ViewElement;\n\t}\n\n\t// If item is a raw element, the only way to get its content is to render it and read the text directly from DOM.\n\tif ( viewItem.is( 'rawElement' ) ) {\n\t\tconst doc = document.implementation.createHTMLDocument( '' );\n\t\tconst tempElement = doc.createElement( 'div' );\n\n\t\tviewItem.render( tempElement, converter );\n\n\t\ttext += domElementToPlainText( tempElement );\n\t}\n\n\treturn text;\n}\n\n/**\n * Recursively converts DOM element and all of its children to plain text.\n */\nfunction domElementToPlainText( element: HTMLElement ): string {\n\tlet text = '';\n\n\tif ( element.nodeType === Node.TEXT_NODE ) {\n\t\treturn element.textContent!;\n\t} else if ( element.tagName === 'BR' ) {\n\t\treturn '\\n';\n\t}\n\n\tfor ( const child of element.childNodes ) {\n\t\ttext += domElementToPlainText( child as HTMLElement );\n\t}\n\n\treturn text;\n}\n\n/**\n * Returns new line padding to prefix the given elements with.\n */\nfunction newLinePadding(\n\telement: ViewElement,\n\tprevious: ViewElement | null\n): string {\n\tif ( !previous ) {\n\t\t// Don't add padding to first elements in a level.\n\t\treturn '';\n\t}\n\n\tif ( element.is( 'element', 'li' ) && !element.isEmpty && element.getChild( 0 )!.is( 'containerElement' ) ) {\n\t\t// Separate document list items with empty lines.\n\t\treturn '\\n\\n';\n\t}\n\n\tif ( listElements.includes( element.name ) && listElements.includes( previous.name ) ) {\n\t\t/**\n\t\t * Because `<ul>` and `<ol>` are ViewAttributeElements, two consecutive lists will not have any padding between\n\t\t * them (see the `if` statement below). To fix this, we need to make an exception for this case.\n\t\t */\n\t\treturn '\\n\\n';\n\t}\n\n\tif ( !element.is( 'containerElement' ) && !previous.is( 'containerElement' ) ) {\n\t\t// Don't add padding between non-container elements.\n\t\treturn '';\n\t}\n\n\tif ( smallPaddingElements.includes( element.name ) || smallPaddingElements.includes( previous.name ) ) {\n\t\t// Add small padding between selected container elements.\n\t\treturn '\\n';\n\t}\n\n\t// Do not add padding around the elements that won't be rendered.\n\tif (\n\t\telement.is( 'element' ) && element.getCustomProperty( 'dataPipeline:transparentRendering' ) ||\n\t\tprevious.is( 'element' ) && previous.getCustomProperty( 'dataPipeline:transparentRendering' )\n\t) {\n\t\treturn '';\n\t}\n\n\t// Add empty lines between container elements.\n\treturn '\\n\\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/**\n * @module clipboard/clipboardmarkersutils\n */\nimport { mapValues } from 'es-toolkit/compat';\n\nimport { uid } from '@ckeditor/ckeditor5-utils';\nimport { Plugin, type NonEmptyArray } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tModelRange,\n\ttype ModelDocumentFragment,\n\ttype ModelPosition,\n\ttype ModelElement,\n\ttype ModelDocumentSelection,\n\ttype ModelSelection,\n\ttype ModelWriter,\n\ttype Marker\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Part of the clipboard logic. Responsible for collecting markers from selected fragments\n * and restoring them with proper positions in pasted elements.\n *\n * @internal\n */\nexport class ClipboardMarkersUtils extends Plugin {\n\t/**\n\t * Map of marker names that can be copied.\n\t *\n\t * @internal\n\t */\n\tprivate _markersToCopy: Map<string, ClipboardMarkerConfiguration> = new Map();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ClipboardMarkersUtils' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Registers marker name as copyable in clipboard pipeline.\n\t *\n\t * @param markerName Name of marker that can be copied.\n\t * @param config Configuration that describes what can be performed on specified marker.\n\t * @internal\n\t */\n\tpublic _registerMarkerToCopy( markerName: string, config: ClipboardMarkerConfiguration ): void {\n\t\tthis._markersToCopy.set( markerName, config );\n\t}\n\n\t/**\n\t * Performs copy markers on provided selection and paste it to fragment returned from `getCopiedFragment`.\n\t *\n\t * \t1. Picks all markers in provided selection.\n\t * \t2. Inserts fake markers to document.\n\t * \t3. Gets copied selection fragment from document.\n\t * \t4. Removes fake elements from fragment and document.\n\t * \t5. Inserts markers in the place of removed fake markers.\n\t *\n\t * Due to selection modification, when inserting items, `getCopiedFragment` must *always* operate on `writer.model.document.selection'.\n\t * Do not use any other custom selection object within callback, as this will lead to out-of-bounds exceptions in rare scenarios.\n\t *\n\t * @param action Type of clipboard action.\n\t * @param selection Selection to be checked.\n\t * @param getCopiedFragment\tCallback that performs copy of selection and returns it as fragment.\n\t * @internal\n\t */\n\tpublic _copySelectedFragmentWithMarkers(\n\t\taction: ClipboardMarkerRestrictedAction,\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\tgetCopiedFragment: ( writer: ModelWriter ) => ModelDocumentFragment = writer =>\n\t\t\twriter.model.getSelectedContent( writer.model.document.selection )\n\t): ModelDocumentFragment {\n\t\treturn this.editor.model.change( writer => {\n\t\t\tconst oldSelection = writer.model.document.selection;\n\n\t\t\t// In some scenarios, such like in drag & drop, passed `selection` parameter is not actually\n\t\t\t// the same `selection` as the `writer.model.document.selection` which means that `_insertFakeMarkersToSelection`\n\t\t\t// is not affecting passed `selection` `start` and `end` positions but rather modifies `writer.model.document.selection`.\n\t\t\t//\n\t\t\t// It is critical due to fact that when we have selection that starts [ 0, 0 ] and ends at [ 1, 0 ]\n\t\t\t// and after inserting fake marker it will point to such marker instead of new widget position at start: [ 1, 0 ] end: [2, 0 ].\n\t\t\t// `writer.insert` modifies only original `writer.model.document.selection`.\n\t\t\twriter.setSelection( selection );\n\n\t\t\tconst sourceSelectionInsertedMarkers = this._insertFakeMarkersIntoSelection( writer, writer.model.document.selection, action );\n\t\t\tconst fragment = getCopiedFragment( writer );\n\t\t\tconst fakeMarkersRangesInsideRange = this._removeFakeMarkersInsideElement( writer, fragment );\n\n\t\t\t// <fake-marker> [Foo] Bar</fake-marker>\n\t\t\t//      ^                    ^\n\t\t\t// In `_insertFakeMarkersIntoSelection` call we inserted fake marker just before first element.\n\t\t\t// The problem is that the first element can be start position of selection so insertion fake-marker\n\t\t\t// before such element shifts selection (so selection that was at [0, 0] now is at [0, 1]).\n\t\t\t// It means that inserted fake-marker is no longer present inside such selection and is orphaned.\n\t\t\t// This function checks special case of such problem. Markers that are orphaned at the start position\n\t\t\t// and end position in the same time. Basically it means that they overlaps whole element.\n\t\t\tfor ( const [ markerName, elements ] of Object.entries( sourceSelectionInsertedMarkers ) ) {\n\t\t\t\tfakeMarkersRangesInsideRange[ markerName ] ||= writer.createRangeIn( fragment );\n\n\t\t\t\tfor ( const element of elements ) {\n\t\t\t\t\twriter.remove( element );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfragment.markers.clear();\n\n\t\t\tfor ( const [ markerName, range ] of Object.entries( fakeMarkersRangesInsideRange ) ) {\n\t\t\t\tfragment.markers.set( markerName, range );\n\t\t\t}\n\n\t\t\t// Revert back selection to previous one.\n\t\t\twriter.setSelection( oldSelection );\n\n\t\t\treturn fragment;\n\t\t} );\n\t}\n\n\t/**\n\t * Performs paste of markers on already pasted element.\n\t *\n\t * \t1. Inserts fake markers that are present in fragment element (such fragment will be processed in `getPastedDocumentElement`).\n\t * \t2. Calls `getPastedDocumentElement` and gets element that is inserted into root model.\n\t * \t3. Removes all fake markers present in transformed element.\n\t * \t4. Inserts new markers with removed fake markers ranges into pasted fragment.\n\t *\n\t * There are multiple edge cases that have to be considered before calling this function:\n\t *\n\t * \t* `markers` are inserted into the same element that must be later transformed inside `getPastedDocumentElement`.\n\t * \t* Fake marker elements inside `getPastedDocumentElement` can be cloned, but their ranges cannot overlap.\n\t * \t* If `duplicateOnPaste` is `true` in marker config then associated marker ID is regenerated before pasting.\n\t *\n\t * @param markers Object that maps marker name to corresponding range.\n\t * @param getPastedDocumentElement Getter used to get target markers element.\n\t * @internal\n\t */\n\tpublic _pasteMarkersIntoTransformedElement(\n\t\tmarkers: Record<string, ModelRange> | Map<string, ModelRange>,\n\t\tgetPastedDocumentElement: ( writer: ModelWriter ) => ModelElement\n\t): ModelElement {\n\t\tconst pasteMarkers = this._getPasteMarkersFromRangeMap( markers );\n\n\t\treturn this.editor.model.change( writer => {\n\t\t\t// Inserts fake markers into source fragment / element that is later transformed inside `getPastedDocumentElement`.\n\t\t\tconst sourceFragmentFakeMarkers = this._insertFakeMarkersElements( writer, pasteMarkers );\n\n\t\t\t// Modifies document fragment (for example, cloning table cells) and then inserts it into the document.\n\t\t\tconst transformedElement = getPastedDocumentElement( writer );\n\n\t\t\t// Removes markers in pasted and transformed fragment in root document.\n\t\t\tconst removedFakeMarkers = this._removeFakeMarkersInsideElement( writer, transformedElement );\n\n\t\t\t// Cleans up fake markers inserted into source fragment (that one before transformation which is not pasted).\n\t\t\tfor ( const element of Object.values( sourceFragmentFakeMarkers ).flat() ) {\n\t\t\t\twriter.remove( element );\n\t\t\t}\n\n\t\t\t// Inserts to root document fake markers.\n\t\t\tfor ( const [ markerName, range ] of Object.entries( removedFakeMarkers ) ) {\n\t\t\t\tif ( !writer.model.markers.has( markerName ) ) {\n\t\t\t\t\twriter.addMarker( markerName, {\n\t\t\t\t\t\tusingOperation: true,\n\t\t\t\t\t\taffectsData: true,\n\t\t\t\t\t\trange\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn transformedElement;\n\t\t} );\n\t}\n\n\t/**\n\t * Pastes document fragment with markers to document.\n\t * If `duplicateOnPaste` is `true` in marker config then associated markers IDs\n\t * are regenerated before pasting to avoid markers duplications in content.\n\t *\n\t * @param fragment Document fragment that should contain already processed by pipeline markers.\n\t * @internal\n\t */\n\tpublic _pasteFragmentWithMarkers( fragment: ModelDocumentFragment ): ModelRange {\n\t\tconst pasteMarkers = this._getPasteMarkersFromRangeMap( fragment.markers );\n\n\t\tfragment.markers.clear();\n\n\t\tfor ( const copyableMarker of pasteMarkers ) {\n\t\t\tfragment.markers.set( copyableMarker.name, copyableMarker.range );\n\t\t}\n\n\t\treturn this.editor.model.insertContent( fragment );\n\t}\n\n\t/**\n\t * In some situations we have to perform copy on selected fragment with certain markers. This function allows to temporarily bypass\n\t * restrictions on markers that we want to copy.\n\t *\n\t * This function executes `executor()` callback. For the duration of the callback, if the clipboard pipeline is used to copy\n\t * content, markers with the specified name will be copied to the clipboard as well.\n\t *\n\t * @param markerName Which markers should be copied.\n\t * @param executor Callback executed.\n\t * @param config Optional configuration flags used to copy (such like partial copy flag).\n\t * @internal\n\t */\n\tpublic _forceMarkersCopy(\n\t\tmarkerName: string,\n\t\texecutor: VoidFunction,\n\t\tconfig: ClipboardMarkerConfiguration = {\n\t\t\tallowedActions: 'all',\n\t\t\tcopyPartiallySelected: true,\n\t\t\tduplicateOnPaste: true\n\t\t}\n\t): void {\n\t\tconst before = this._markersToCopy.get( markerName );\n\n\t\tthis._markersToCopy.set( markerName, config );\n\n\t\texecutor();\n\n\t\tif ( before ) {\n\t\t\tthis._markersToCopy.set( markerName, before );\n\t\t} else {\n\t\t\tthis._markersToCopy.delete( markerName );\n\t\t}\n\t}\n\n\t/**\n\t * Checks if marker can be copied.\n\t *\n\t * @param markerName Name of checked marker.\n\t * @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t * @internal\n\t */\n\tpublic _isMarkerCopyable( markerName: string, action: ClipboardMarkerRestrictedAction | null ): boolean {\n\t\tconst config = this._getMarkerClipboardConfig( markerName );\n\n\t\tif ( !config ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If there is no action provided then only presence of marker is checked.\n\t\tif ( !action ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst { allowedActions } = config;\n\n\t\treturn allowedActions === 'all' || allowedActions.includes( action );\n\t}\n\n\t/**\n\t * Checks if marker has any clipboard copy behavior configuration.\n\t *\n\t * @param markerName Name of checked marker.\n\t */\n\tpublic _hasMarkerConfiguration( markerName: string ): boolean {\n\t\treturn !!this._getMarkerClipboardConfig( markerName );\n\t}\n\n\t/**\n\t * Returns marker's configuration flags passed during registration.\n\t *\n\t * @param markerName Name of marker that should be returned.\n\t * @internal\n\t */\n\tpublic _getMarkerClipboardConfig( markerName: string ): ClipboardMarkerConfiguration | null {\n\t\tconst [ markerNamePrefix ] = markerName.split( ':' );\n\n\t\treturn this._markersToCopy.get( markerNamePrefix ) || null;\n\t}\n\n\t/**\n\t * First step of copying markers. It looks for markers intersecting with given selection and inserts `$marker` elements\n\t * at positions where document markers start or end. This way `$marker` elements can be easily copied together with\n\t * the rest of the content of the selection.\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param selection Selection to be checked.\n\t * @param action Type of clipboard action.\n\t */\n\tprivate _insertFakeMarkersIntoSelection(\n\t\twriter: ModelWriter,\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\taction: ClipboardMarkerRestrictedAction\n\t): Record<string, Array<ModelElement>> {\n\t\tconst copyableMarkers = this._getCopyableMarkersFromSelection( writer, selection, action );\n\n\t\treturn this._insertFakeMarkersElements( writer, copyableMarkers );\n\t}\n\n\t/**\n\t * Returns array of markers that can be copied in specified selection.\n\t *\n\t * If marker cannot be copied partially (according to `copyPartiallySelected` configuration flag) and\n\t * is not present entirely in any selection range then it will be skipped.\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param selection  Selection which will be checked.\n\t * @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t */\n\tprivate _getCopyableMarkersFromSelection(\n\t\twriter: ModelWriter,\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\taction: ClipboardMarkerRestrictedAction | null\n\t): Array<CopyableMarker> {\n\t\tconst selectionRanges = Array.from( selection.getRanges()! );\n\n\t\t// Picks all markers in provided ranges. Ensures that there are no duplications if\n\t\t// there are multiple ranges that intersects with the same marker.\n\t\tconst markersInRanges = new Set(\n\t\t\tselectionRanges.flatMap(\n\t\t\t\tselectionRange => Array.from( writer.model.markers.getMarkersIntersectingRange( selectionRange ) )\n\t\t\t)\n\t\t);\n\n\t\tconst isSelectionMarkerCopyable = ( marker: Marker ) => {\n\t\t\t// Check if marker exists in configuration and provided action can be performed on it.\n\t\t\tconst isCopyable = this._isMarkerCopyable( marker.name, action );\n\n\t\t\tif ( !isCopyable ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Checks if configuration disallows to copy marker only if part of its content is selected.\n\t\t\t//\n\t\t\t// Example:\n\t\t\t// \t<marker-a> Hello [ World ] </marker-a>\n\t\t\t//\t\t\t\t\t\t^ selection\n\t\t\t//\n\t\t\t// In this scenario `marker-a` won't be copied because selection doesn't overlap its content entirely.\n\t\t\tconst { copyPartiallySelected } = this._getMarkerClipboardConfig( marker.name )!;\n\n\t\t\tif ( !copyPartiallySelected ) {\n\t\t\t\tconst markerRange = marker.getRange();\n\n\t\t\t\treturn selectionRanges.some( selectionRange => selectionRange.containsRange( markerRange, true ) );\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\treturn Array\n\t\t\t.from( markersInRanges )\n\t\t\t.filter( isSelectionMarkerCopyable )\n\t\t\t.map( ( copyableMarker ): CopyableMarker => {\n\t\t\t\t// During `dragstart` event original marker is still present in tree.\n\t\t\t\t// It is removed after the clipboard drop event, so none of the copied markers are inserted at the end.\n\t\t\t\t// It happens because there already markers with specified `marker.name` when clipboard is trying to insert data\n\t\t\t\t// and it aborts inserting.\n\t\t\t\tconst name = action === 'dragstart' ? this._getUniqueMarkerName( copyableMarker.name ) : copyableMarker.name;\n\n\t\t\t\treturn {\n\t\t\t\t\tname,\n\t\t\t\t\trange: copyableMarker.getRange()\n\t\t\t\t};\n\t\t\t} );\n\t}\n\n\t/**\n\t * Picks all markers from markers map that can be pasted.\n\t * If `duplicateOnPaste` is `true`, it regenerates their IDs to ensure uniqueness.\n\t * If marker is not registered, it will be kept in the array anyway.\n\t *\n\t * @param markers Object that maps marker name to corresponding range.\n\t * @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t */\n\tprivate _getPasteMarkersFromRangeMap(\n\t\tmarkers: Record<string, ModelRange> | Map<string, ModelRange>,\n\t\taction: ClipboardMarkerRestrictedAction | null = null\n\t): Array<CopyableMarker> {\n\t\tconst { model } = this.editor;\n\t\tconst entries = markers instanceof Map ? Array.from( markers.entries() ) : Object.entries( markers );\n\n\t\treturn entries.flatMap( ( [ markerName, range ] ): Array<CopyableMarker> => {\n\t\t\tif ( !this._hasMarkerConfiguration( markerName ) ) {\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: markerName,\n\t\t\t\t\t\trange\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tif ( this._isMarkerCopyable( markerName, action ) ) {\n\t\t\t\tconst copyMarkerConfig = this._getMarkerClipboardConfig( markerName )!;\n\t\t\t\tconst isInGraveyard = model.markers.has( markerName ) &&\n\t\t\t\t\tmodel.markers.get( markerName )!.getRange().root.rootName === '$graveyard';\n\n\t\t\t\tif ( copyMarkerConfig.duplicateOnPaste || isInGraveyard ) {\n\t\t\t\t\tmarkerName = this._getUniqueMarkerName( markerName );\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: markerName,\n\t\t\t\t\t\trange\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t\t}\n\n\t\t\treturn [];\n\t\t} );\n\t}\n\n\t/**\n\t * Inserts specified array of fake markers elements to document and assigns them `type` and `name` attributes.\n\t * Fake markers elements are used to calculate position of markers on pasted fragment that were transformed during\n\t * steps between copy and paste.\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param markers Array of markers that will be inserted.\n\t */\n\tprivate _insertFakeMarkersElements( writer: ModelWriter, markers: Array<CopyableMarker> ): Record<string, Array<ModelElement>> {\n\t\tconst mappedMarkers: Record<string, Array<ModelElement>> = {};\n\t\tconst sortedMarkers = markers\n\t\t\t.flatMap( marker => {\n\t\t\t\tconst { start, end } = marker.range;\n\n\t\t\t\treturn [\n\t\t\t\t\t{ position: start, marker, type: 'start' },\n\t\t\t\t\t{ position: end, marker, type: 'end' }\n\t\t\t\t];\n\t\t\t} )\n\t\t\t// Markers position is sorted backwards to ensure that the insertion of fake markers will not change\n\t\t\t// the position of the next markers.\n\t\t\t.sort( ( { position: posA }, { position: posB } ) => posA.isBefore( posB ) ? 1 : -1 );\n\n\t\tfor ( const { position, marker, type } of sortedMarkers ) {\n\t\t\tconst fakeMarker = writer.createElement( '$marker', {\n\t\t\t\t'data-name': marker.name,\n\t\t\t\t'data-type': type\n\t\t\t} );\n\n\t\t\tif ( !mappedMarkers[ marker.name ] ) {\n\t\t\t\tmappedMarkers[ marker.name ] = [];\n\t\t\t}\n\n\t\t\tmappedMarkers[ marker.name ]!.push( fakeMarker );\n\t\t\twriter.insert( fakeMarker, position );\n\t\t}\n\n\t\treturn mappedMarkers;\n\t}\n\n\t/**\n\t * Removes all `$marker` elements from the given document fragment.\n\t *\n\t * Returns an object where keys are marker names, and values are ranges corresponding to positions\n\t * where `$marker` elements were inserted.\n\t *\n\t * If the document fragment had only one `$marker` element for given marker (start or end) the other boundary is set automatically\n\t * (to the end or start of the document fragment, respectively).\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param rootElement The element to be checked.\n\t */\n\tprivate _removeFakeMarkersInsideElement(\n\t\twriter: ModelWriter,\n\t\trootElement: ModelElement | ModelDocumentFragment\n\t): Record<string, ModelRange> {\n\t\tconst fakeMarkersElements = this._getAllFakeMarkersFromElement( writer, rootElement );\n\t\tconst fakeMarkersRanges = fakeMarkersElements.reduce<Record<string, FakeMarkerRangeConstruct>>( ( acc, fakeMarker ) => {\n\t\t\tconst position = fakeMarker.markerElement && writer.createPositionBefore( fakeMarker.markerElement );\n\t\t\tlet prevFakeMarker: FakeMarkerRangeConstruct | null = acc[ fakeMarker.name ];\n\n\t\t\t// Handle scenario when tables clone cells with the same fake node. Example:\n\t\t\t//\n\t\t\t// <cell><fake-marker-a></cell> <cell><fake-marker-a></cell> <cell><fake-marker-a></cell>\n\t\t\t//                                          ^ cloned                    ^ cloned\n\t\t\t//\n\t\t\t// The easiest way to bypass this issue is to rename already existing in map nodes and\n\t\t\t// set them new unique name.\n\t\t\tlet skipAssign = false;\n\n\t\t\tif ( prevFakeMarker?.start && prevFakeMarker?.end ) {\n\t\t\t\tconst config = this._getMarkerClipboardConfig( fakeMarker.name )!;\n\n\t\t\t\tif ( config.duplicateOnPaste ) {\n\t\t\t\t\tacc[ this._getUniqueMarkerName( fakeMarker.name ) ] = acc[ fakeMarker.name ];\n\t\t\t\t} else {\n\t\t\t\t\tskipAssign = true;\n\t\t\t\t}\n\n\t\t\t\tprevFakeMarker = null;\n\t\t\t}\n\n\t\t\tif ( !skipAssign ) {\n\t\t\t\tacc[ fakeMarker.name ] = {\n\t\t\t\t\t...prevFakeMarker!,\n\t\t\t\t\t[ fakeMarker.type ]: position\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif ( fakeMarker.markerElement ) {\n\t\t\t\twriter.remove( fakeMarker.markerElement );\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t}, {} );\n\n\t\t// We cannot construct ranges directly in previous reduce because element ranges can overlap.\n\t\t// In other words lets assume we have such scenario:\n\n\t\t// <fake-marker-start /> <paragraph /> <fake-marker-2-start /> <fake-marker-end /> <fake-marker-2-end />\n\t\t//\n\t\t// We have to remove `fake-marker-start` firstly and then remove `fake-marker-2-start`.\n\t\t// Removal of `fake-marker-2-start` affects `fake-marker-end` position so we cannot create\n\t\t// connection between `fake-marker-start` and `fake-marker-end` without iterating whole set firstly.\n\t\treturn mapValues(\n\t\t\tfakeMarkersRanges,\n\t\t\trange => new ModelRange(\n\t\t\t\trange.start || writer.createPositionFromPath( rootElement, [ 0 ] ),\n\t\t\t\trange.end || writer.createPositionAt( rootElement, 'end' )\n\t\t\t)\n\t\t);\n\t}\n\n\t/**\n\t * Returns array that contains list of fake markers with corresponding `$marker` elements.\n\t *\n\t * For each marker, there can be two `$marker` elements or only one (if the document fragment contained\n\t * only the beginning or only the end of a marker).\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param rootElement The element to be checked.\n\t */\n\tprivate _getAllFakeMarkersFromElement( writer: ModelWriter, rootElement: ModelElement | ModelDocumentFragment ): Array<FakeMarker> {\n\t\tconst foundFakeMarkers = Array\n\t\t\t.from( writer.createRangeIn( rootElement ) )\n\t\t\t.flatMap( ( { item } ): Array<FakeMarker> => {\n\t\t\t\tif ( !item.is( 'element', '$marker' ) ) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst name = item.getAttribute( 'data-name' ) as string;\n\t\t\t\tconst type = item.getAttribute( 'data-type' ) as 'start' | 'end';\n\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tmarkerElement: item,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\ttype\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t\t} );\n\n\t\tconst prependFakeMarkers: Array<FakeMarker> = [];\n\t\tconst appendFakeMarkers: Array<FakeMarker> = [];\n\n\t\tfor ( const fakeMarker of foundFakeMarkers ) {\n\t\t\tif ( fakeMarker.type === 'end' ) {\n\t\t\t\t// <fake-marker> [ phrase</fake-marker> phrase ]\n\t\t\t\t//   ^\n\t\t\t\t// Handle case when marker is just before start of selection.\n\t\t\t\t// Only end marker is inside selection.\n\n\t\t\t\tconst hasMatchingStartMarker = foundFakeMarkers.some(\n\t\t\t\t\totherFakeMarker => otherFakeMarker.name === fakeMarker.name && otherFakeMarker.type === 'start'\n\t\t\t\t);\n\n\t\t\t\tif ( !hasMatchingStartMarker ) {\n\t\t\t\t\tprependFakeMarkers.push( {\n\t\t\t\t\t\tmarkerElement: null,\n\t\t\t\t\t\tname: fakeMarker.name,\n\t\t\t\t\t\ttype: 'start'\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( fakeMarker.type === 'start' ) {\n\t\t\t\t// [<fake-marker>phrase]</fake-marker>\n\t\t\t\t//                           ^\n\t\t\t\t// Handle case when fake marker is after selection.\n\t\t\t\t// Only start marker is inside selection.\n\n\t\t\t\tconst hasMatchingEndMarker = foundFakeMarkers.some(\n\t\t\t\t\totherFakeMarker => otherFakeMarker.name === fakeMarker.name && otherFakeMarker.type === 'end'\n\t\t\t\t);\n\n\t\t\t\tif ( !hasMatchingEndMarker ) {\n\t\t\t\t\tappendFakeMarkers.unshift( {\n\t\t\t\t\t\tmarkerElement: null,\n\t\t\t\t\t\tname: fakeMarker.name,\n\t\t\t\t\t\ttype: 'end'\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn [\n\t\t\t...prependFakeMarkers,\n\t\t\t...foundFakeMarkers,\n\t\t\t...appendFakeMarkers\n\t\t];\n\t}\n\n\t/**\n\t * When copy of markers occurs we have to make sure that pasted markers have different names\n\t * than source markers. This functions helps with assigning unique part to marker name to\n\t * prevent duplicated markers error.\n\t *\n\t * @param name Name of marker\n\t */\n\tprivate _getUniqueMarkerName( name: string ) {\n\t\tconst parts = name.split( ':' );\n\t\tconst newId = uid().substring( 1, 6 );\n\n\t\t// It looks like the marker already is UID marker so in this scenario just swap\n\t\t// last part of marker name and assign new UID.\n\t\t//\n\t\t// example: comment:{ threadId }:{ id } => comment:{ threadId }:{ newId }\n\t\tif ( parts.length === 3 ) {\n\t\t\treturn `${ parts.slice( 0, 2 ).join( ':' ) }:${ newId }`;\n\t\t}\n\n\t\t// Assign new segment to marker name with id.\n\t\t//\n\t\t// example: comment => comment:{ newId }\n\t\treturn `${ parts.join( ':' ) }:${ newId }`;\n\t}\n}\n\n/**\n * Specifies which action is performed during clipboard event.\n *\n * @internal\n */\nexport type ClipboardMarkerRestrictedAction = 'copy' | 'cut' | 'dragstart';\n\n/**\n * Specifies behavior of markers during clipboard actions.\n *\n * @internal\n */\nexport type ClipboardMarkerConfiguration = {\n\tallowedActions: NonEmptyArray<ClipboardMarkerRestrictedAction> | 'all';\n\n\t// If `false`, do not copy marker when only part of its content is selected.\n\tcopyPartiallySelected?: boolean;\n\n\t// If `true` then every marker that is present in clipboard document fragment element obtain new generated ID just before pasting.\n\t// It means that it is possible to perform copy once and then paste it multiple times wherever we want.\n\t//\n\t// On the other hand if it has false value the marker will be not pasted because ID already exists in the document.\n\t//\n\t// This flag is ignored in `cut` and `dragstart` actions because source marker is moved to graveyard and\n\t// it is still present in `model.markers`. Pasted marker id must be regenerated to avoid duplications.\n\tduplicateOnPaste?: boolean;\n};\n\n/**\n * Marker descriptor type used to revert markers into tree node.\n *\n * @internal\n */\ntype FakeMarker = {\n\ttype: 'start' | 'end';\n\tname: string;\n\tmarkerElement: ModelElement | null;\n};\n\n/**\n * Range used to construct real markers from fake markers. Every property must be optional\n * because real marker range is constructed using iteration over markers that represent `start`\n * and then `end`. Usually `start` is set firstly then after few nodes `end` is set.\n *\n * @internal\n */\ntype FakeMarkerRangeConstruct = {\n\tstart: ModelPosition | null;\n\tend: ModelPosition | null;\n};\n\n/**\n * Structure used to describe marker that has to be copied.\n *\n * @internal\n */\ntype CopyableMarker = {\n\tname: string;\n\trange: ModelRange;\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/**\n * @module clipboard/clipboardpipeline\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { EventInfo } from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tViewDataTransfer,\n\tModelDocumentFragment,\n\tViewDocumentDomEventData,\n\tModelRange,\n\tViewDocumentFragment,\n\tViewRange,\n\tModelSelection,\n\tModelDocumentSelection\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tClipboardObserver,\n\ttype ClipboardEventData,\n\ttype ViewDocumentCopyEvent,\n\ttype ViewDocumentCutEvent,\n\ttype ViewDocumentClipboardInputEvent\n} from './clipboardobserver.js';\n\nimport { normalizeClipboardData } from './utils/normalizeclipboarddata.js';\nimport { viewToPlainText } from './utils/viewtoplaintext.js';\nimport { ClipboardMarkersUtils } from './clipboardmarkersutils.js';\n\n// Input pipeline events overview:\n//\n//              ┌──────────────────────┐          ┌──────────────────────┐\n//              │     view.Document    │          │     view.Document    │\n//              │         paste        │          │         drop         │\n//              └───────────┬──────────┘          └───────────┬──────────┘\n//                          │                                 │\n//                          └────────────────┌────────────────┘\n//                                           │\n//                                 ┌─────────V────────┐\n//                                 │   view.Document  │   Retrieves text/html or text/plain from data.dataTransfer\n//                                 │  clipboardInput  │   and processes it to view.DocumentFragment.\n//                                 └─────────┬────────┘\n//                                           │\n//                               ┌───────────V───────────┐\n//                               │   ClipboardPipeline   │   Converts view.DocumentFragment to model.DocumentFragment.\n//                               │  inputTransformation  │\n//                               └───────────┬───────────┘\n//                                           │\n//                                ┌──────────V──────────┐\n//                                │  ClipboardPipeline  │   Calls model.insertContent().\n//                                │   contentInsertion  │\n//                                └─────────────────────┘\n//\n//\n// Output pipeline events overview:\n//\n//              ┌──────────────────────┐          ┌──────────────────────┐\n//              │     view.Document    │          │     view.Document    │   Retrieves the selected model.DocumentFragment\n//              │         copy         │          │          cut         │   and fires the `outputTransformation` event.\n//              └───────────┬──────────┘          └───────────┬──────────┘\n//                          │                                 │\n//                          └────────────────┌────────────────┘\n//                                           │\n//                               ┌───────────V───────────┐\n//                               │   ClipboardPipeline   │   Processes model.DocumentFragment and converts it to\n//                               │  outputTransformation │   view.DocumentFragment.\n//                               └───────────┬───────────┘\n//                                           │\n//                                 ┌─────────V────────┐\n//                                 │   view.Document  │   Processes view.DocumentFragment to text/html and text/plain\n//                                 │  clipboardOutput │   and stores the results in data.dataTransfer.\n//                                 └──────────────────┘\n//\n\n/**\n * The clipboard pipeline feature. It is responsible for intercepting the `paste` and `drop` events and\n * passing the pasted content through a series of events in order to insert it into the editor's content.\n * It also handles the `cut` and `copy` events to fill the native clipboard with the serialized editor's data.\n *\n * # Input pipeline\n *\n * The behavior of the default handlers (all at a `low` priority):\n *\n * ## Event: `paste` or `drop`\n *\n * 1. Translates the event data.\n * 2. Fires the {@link module:engine/view/document~ViewDocument#event:clipboardInput `view.Document#clipboardInput`} event.\n *\n * ## Event: `view.Document#clipboardInput`\n *\n * 1. If the `data.content` event field is already set (by some listener on a higher priority), it takes this content and fires the event\n *    from the last point.\n * 2. Otherwise, it retrieves `text/html` or `text/plain` from `data.dataTransfer`.\n * 3. Normalizes the raw data by applying simple filters on string data.\n * 4. Processes the raw data to {@link module:engine/view/documentfragment~ViewDocumentFragment `view.DocumentFragment`} with the\n *    {@link module:engine/controller/datacontroller~DataController#htmlProcessor `DataController#htmlProcessor`}.\n * 5. Fires the {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation\n *   `ClipboardPipeline#inputTransformation`} event with the view document fragment in the `data.content` event field.\n *\n * ## Event: `ClipboardPipeline#inputTransformation`\n *\n * 1. Converts {@link module:engine/view/documentfragment~ViewDocumentFragment `view.DocumentFragment`} from the `data.content` field to\n *    {@link module:engine/model/documentfragment~ModelDocumentFragment `model.DocumentFragment`}.\n * 2. Fires the {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:contentInsertion `ClipboardPipeline#contentInsertion`}\n *    event with the model document fragment in the `data.content` event field.\n *    **Note**: The `ClipboardPipeline#contentInsertion` event is fired within a model change block to allow other handlers\n *    to run in the same block without post-fixers called in between (i.e., the selection post-fixer).\n *\n * ## Event: `ClipboardPipeline#contentInsertion`\n *\n * 1. Calls {@link module:engine/model/model~Model#insertContent `model.insertContent()`} to insert `data.content`\n *    at the current selection position.\n *\n * # Output pipeline\n *\n * The behavior of the default handlers (all at a `low` priority):\n *\n * ## Event: `copy`, `cut` or `dragstart`\n *\n * 1. Retrieves the selected {@link module:engine/model/documentfragment~ModelDocumentFragment `model.DocumentFragment`} by calling\n *    {@link module:engine/model/model~Model#getSelectedContent `model#getSelectedContent()`}.\n * 2. Converts the model document fragment to {@link module:engine/view/documentfragment~ViewDocumentFragment `view.DocumentFragment`}.\n * 3. Fires the {@link module:engine/view/document~ViewDocument#event:clipboardOutput `view.Document#clipboardOutput`} event\n *    with the view document fragment in the `data.content` event field.\n *\n * ## Event: `view.Document#clipboardOutput`\n *\n * 1. Processes `data.content` to HTML and plain text with the\n *    {@link module:engine/controller/datacontroller~DataController#htmlProcessor `DataController#htmlProcessor`}.\n * 2. Updates the `data.dataTransfer` data for `text/html` and `text/plain` with the processed data.\n * 3. For the `cut` method, calls {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}\n *    on the current selection.\n *\n * Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n */\nexport class ClipboardPipeline extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ClipboardPipeline' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ClipboardMarkersUtils ]> {\n\t\treturn [ ClipboardMarkersUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\n\t\tview.addObserver( ClipboardObserver );\n\n\t\tthis._setupPasteDrop();\n\t\tthis._setupCopyCut();\n\t}\n\n\t/**\n\t * Fires Clipboard `'outputTransformation'` event for given parameters.\n\t *\n\t * @internal\n\t */\n\tpublic _fireOutputTransformationEvent(\n\t\tdataTransfer: ViewDataTransfer,\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\tmethod: 'copy' | 'cut' | 'dragstart'\n\t): void {\n\t\tconst clipboardMarkersUtils: ClipboardMarkersUtils = this.editor.plugins.get( 'ClipboardMarkersUtils' );\n\n\t\tthis.editor.model.enqueueChange( { isUndoable: method === 'cut' }, () => {\n\t\t\tconst documentFragment = clipboardMarkersUtils._copySelectedFragmentWithMarkers( method, selection );\n\n\t\t\tthis.fire<ClipboardOutputTransformationEvent>( 'outputTransformation', {\n\t\t\t\tdataTransfer,\n\t\t\t\tcontent: documentFragment,\n\t\t\t\tmethod\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * The clipboard paste pipeline.\n\t */\n\tprivate _setupPasteDrop(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst clipboardMarkersUtils: ClipboardMarkersUtils = this.editor.plugins.get( 'ClipboardMarkersUtils' );\n\n\t\t// Pasting is disabled when selection is in non-editable place.\n\t\t// Dropping is disabled in drag and drop handler.\n\t\tthis.listenTo<ViewDocumentClipboardInputEvent>( viewDocument, 'clipboardInput', ( evt, data ) => {\n\t\t\tif ( data.method == 'paste' && !editor.model.canEditAt( editor.model.document.selection ) ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.listenTo<ViewDocumentClipboardInputEvent>( viewDocument, 'clipboardInput', ( evt, data ) => {\n\t\t\tconst dataTransfer = data.dataTransfer;\n\n\t\t\tconst eventInfo = new EventInfo( this, 'inputTransformation' );\n\t\t\tconst sourceEditorId = dataTransfer.getData( 'application/ckeditor5-editor-id' ) || null;\n\n\t\t\t// Some feature could already inject content in the higher priority event handler (i.e., codeBlock, paste from office).\n\t\t\tconst content = typeof data.content == 'string' ?\n\t\t\t\tthis.editor.data.htmlProcessor.toView( normalizeClipboardData( data.content ) ) :\n\t\t\t\tdata.content;\n\n\t\t\tthis.fire<ClipboardInputTransformationEvent>( eventInfo, {\n\t\t\t\tcontent,\n\t\t\t\tdataTransfer,\n\t\t\t\tsourceEditorId,\n\t\t\t\textraContent: data.extraContent,\n\t\t\t\ttargetRanges: data.targetRanges,\n\t\t\t\tmethod: data.method as 'paste' | 'drop'\n\t\t\t} );\n\n\t\t\t// If CKEditor handled the input, do not bubble the original event any further.\n\t\t\t// This helps external integrations recognize this fact and act accordingly.\n\t\t\t// https://github.com/ckeditor/ckeditor5-upload/issues/92\n\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\n\t\t\tview.scrollToTheSelection();\n\t\t}, { priority: 'low' } );\n\n\t\tthis.listenTo<ClipboardInputTransformationEvent>( this, 'inputTransformation', ( evt, data ) => {\n\t\t\tif ( data.content.isEmpty ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst dataController = this.editor.data;\n\n\t\t\t// Convert the pasted content into a model document fragment.\n\t\t\t// The conversion is contextual, but in this case an \"all allowed\" context is needed\n\t\t\t// and for that we use the $clipboardHolder item.\n\t\t\tconst modelFragment = dataController.toModel( data.content, '$clipboardHolder' );\n\n\t\t\tif ( modelFragment.childCount == 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevt.stop();\n\n\t\t\t// Fire content insertion event in a single change block to allow other handlers to run in the same block\n\t\t\t// without post-fixers called in between (i.e., the selection post-fixer).\n\t\t\tmodel.change( () => {\n\t\t\t\tthis.fire<ClipboardContentInsertionEvent>( 'contentInsertion', {\n\t\t\t\t\tcontent: modelFragment,\n\t\t\t\t\tmethod: data.method,\n\t\t\t\t\tsourceEditorId: data.sourceEditorId,\n\t\t\t\t\tdataTransfer: data.dataTransfer,\n\t\t\t\t\ttargetRanges: data.targetRanges\n\t\t\t\t} );\n\t\t\t} );\n\t\t}, { priority: 'low' } );\n\n\t\tthis.listenTo<ClipboardContentInsertionEvent>( this, 'contentInsertion', ( evt, data ) => {\n\t\t\tdata.resultRange = clipboardMarkersUtils._pasteFragmentWithMarkers( data.content );\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * The clipboard copy/cut pipeline.\n\t */\n\tprivate _setupCopyCut(): void {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\n\t\tconst onCopyCut = ( evt: EventInfo<'copy' | 'cut'>, data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData ) => {\n\t\t\tconst dataTransfer = data.dataTransfer;\n\n\t\t\tdata.preventDefault();\n\n\t\t\tthis._fireOutputTransformationEvent( dataTransfer, modelDocument.selection, evt.name );\n\t\t};\n\n\t\tthis.listenTo<ViewDocumentCopyEvent>( viewDocument, 'copy', onCopyCut, { priority: 'low' } );\n\t\tthis.listenTo<ViewDocumentCutEvent>( viewDocument, 'cut', ( evt, data ) => {\n\t\t\t// Cutting is disabled when selection is in non-editable place.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5-clipboard/issues/26.\n\t\t\tif ( !editor.model.canEditAt( editor.model.document.selection ) ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t} else {\n\t\t\t\tonCopyCut( evt, data );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\n\t\tthis.listenTo<ClipboardOutputTransformationEvent>( this, 'outputTransformation', ( evt, data ) => {\n\t\t\tconst content = editor.data.toView( data.content, { isClipboardPipeline: true } );\n\n\t\t\tviewDocument.fire<ViewDocumentClipboardOutputEvent>( 'clipboardOutput', {\n\t\t\t\tdataTransfer: data.dataTransfer,\n\t\t\t\tcontent,\n\t\t\t\tmethod: data.method\n\t\t\t} );\n\t\t}, { priority: 'low' } );\n\n\t\tthis.listenTo<ViewDocumentClipboardOutputEvent>( viewDocument, 'clipboardOutput', ( evt, data ) => {\n\t\t\tif ( !data.content.isEmpty ) {\n\t\t\t\tdata.dataTransfer.setData( 'text/html', this.editor.data.htmlProcessor.toData( data.content ) );\n\t\t\t\tdata.dataTransfer.setData( 'text/plain', viewToPlainText( editor.data.htmlProcessor.domConverter, data.content ) );\n\t\t\t\tdata.dataTransfer.setData( 'application/ckeditor5-editor-id', this.editor.id );\n\t\t\t}\n\n\t\t\tif ( data.method == 'cut' ) {\n\t\t\t\teditor.model.deleteContent( modelDocument.selection );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t}\n}\n\n/**\n * Fired with the `content`, `dataTransfer`, `method`, and `targetRanges` properties:\n *\n * * The `content` which comes from the clipboard (it was pasted or dropped) should be processed in order to be inserted into the editor.\n * * The `dataTransfer` object is available in case the transformation functions need access to the raw clipboard data.\n * * The `method` indicates the original DOM event (for example `'drop'` or `'paste'`).\n * * The `targetRanges` property is an array of view ranges (it is available only for `'drop'`).\n *\n * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.\n *\n * **Note**: You should not stop this event if you want to change the input data. You should modify the `content` property instead.\n *\n * @see module:clipboard/clipboardobserver~ClipboardObserver\n * @see module:clipboard/clipboardpipeline~ClipboardPipeline\n *\n * @eventName ~ClipboardPipeline#inputTransformation\n * @param data The event data.\n */\nexport type ClipboardInputTransformationEvent = {\n\tname: 'inputTransformation';\n\targs: [ data: ClipboardInputTransformationData ];\n};\n\n/**\n * The data of 'inputTransformation' event.\n */\nexport interface ClipboardInputTransformationData {\n\n\t/**\n\t * The event data.\n\t * The content to be inserted into the editor. It can be modified by event listeners. Read more about the clipboard pipelines in\n\t * the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n\t */\n\tcontent: ViewDocumentFragment;\n\n\t/**\n\t * Custom data stored by the `clipboardInput` event handlers. Content of this property is passed from the `clipboardInput` event.\n\t */\n\textraContent?: unknown;\n\n\t/**\n\t * The data transfer instance.\n\t */\n\tdataTransfer: ViewDataTransfer;\n\n\t/**\n\t * The target drop ranges.\n\t */\n\ttargetRanges: Array<ViewRange> | null;\n\n\t/**\n\t * Whether the event was triggered by a paste or a drop operation.\n\t */\n\tmethod: 'paste' | 'drop';\n\n\t/**\n\t * ID of the editor instance from which the content was copied.\n\t */\n\tsourceEditorId: string | null;\n}\n\n/**\n * Fired with the `content`, `dataTransfer`, `method`, and `targetRanges` properties:\n *\n * * The `content` which comes from the clipboard (was pasted or dropped) should be processed in order to be inserted into the editor.\n * * The `dataTransfer` object is available in case the transformation functions need access to the raw clipboard data.\n * * The `method` indicates the original DOM event (for example `'drop'` or `'paste'`).\n * * The `targetRanges` property is an array of view ranges (it is available only for `'drop'`).\n *\n * Event handlers can modify the content according to the final insertion position.\n *\n * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.\n *\n * **Note**: You should not stop this event if you want to change the input data. You should modify the `content` property instead.\n *\n * @see module:clipboard/clipboardobserver~ClipboardObserver\n * @see module:clipboard/clipboardpipeline~ClipboardPipeline\n * @see module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation\n *\n * @eventName ~ClipboardPipeline#contentInsertion\n * @param data The event data.\n */\nexport type ClipboardContentInsertionEvent = {\n\tname: 'contentInsertion';\n\targs: [ data: ClipboardContentInsertionData ];\n};\n\n/**\n * The data of 'contentInsertion' event.\n */\nexport interface ClipboardContentInsertionData {\n\n\t/**\n\t * The content to be inserted into the editor.\n\t * Read more about the clipboard pipelines in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n\t */\n\tcontent: ModelDocumentFragment;\n\n\t/**\n\t * Whether the event was triggered by a paste or a drop operation.\n\t */\n\tmethod: 'paste' | 'drop';\n\n\t/**\n\t * The ID of the editor instance from which the content was copied.\n\t */\n\tsourceEditorId: string | null;\n\n\t/**\n\t * The data transfer instance.\n\t */\n\n\tdataTransfer: ViewDataTransfer;\n\n\t/**\n\t * The target drop ranges.\n\t */\n\ttargetRanges: Array<ViewRange> | null;\n\n\t/**\n\t * The result of the `model.insertContent()` call\n\t * (inserted by the event handler at a low priority).\n\t */\n\tresultRange?: ModelRange;\n}\n\n/**\n * Fired on {@link module:engine/view/document~ViewDocument#event:copy} and {@link module:engine/view/document~ViewDocument#event:cut}\n * with a copy of the selected content. The content can be processed before it ends up in the clipboard.\n *\n * It is a part of the {@glink framework/deep-dive/clipboard#output-pipeline clipboard output pipeline}.\n *\n * @see module:clipboard/clipboardobserver~ClipboardObserver\n * @see module:clipboard/clipboardpipeline~ClipboardPipeline\n *\n * @eventName module:engine/view/document~ViewDocument#clipboardOutput\n * @param data The event data.\n */\nexport type ViewDocumentClipboardOutputEvent = {\n\tname: 'clipboardOutput';\n\targs: [ data: ViewDocumentClipboardOutputEventData ];\n};\n\n/**\n * The value of the 'clipboardOutput' event.\n */\nexport interface ViewDocumentClipboardOutputEventData {\n\n\t/**\n\t * The data transfer instance.\n\t *\n\t * @readonly\n\t */\n\tdataTransfer: ViewDataTransfer;\n\n\t/**\n\t * Content to be put into the clipboard. It can be modified by the event listeners.\n\t * Read more about the clipboard pipelines in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n\t */\n\tcontent: ViewDocumentFragment;\n\n\t/**\n\t * Whether the event was triggered by a copy or cut operation.\n\t */\n\tmethod: 'copy' | 'cut' | 'dragstart';\n}\n\n/**\n * Fired on {@link module:engine/view/document~ViewDocument#event:copy}, {@link module:engine/view/document~ViewDocument#event:cut}\n * and {@link module:engine/view/document~ViewDocument#event:dragstart}. The content can be processed before it ends up in the clipboard.\n *\n * It is a part of the {@glink framework/deep-dive/clipboard#output-pipeline clipboard output pipeline}.\n *\n * @eventName ~ClipboardPipeline#outputTransformation\n * @param data The event data.\n */\nexport type ClipboardOutputTransformationEvent = {\n\tname: 'outputTransformation';\n\targs: [ data: ClipboardOutputTransformationData ];\n};\n\n/**\n * The value of the 'outputTransformation' event.\n */\nexport interface ClipboardOutputTransformationData {\n\n\t/**\n\t * The data transfer instance.\n\t *\n\t * @readonly\n\t */\n\tdataTransfer: ViewDataTransfer;\n\n\t/**\n\t * Content to be put into the clipboard. It can be modified by the event listeners.\n\t * Read more about the clipboard pipelines in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n\t */\n\tcontent: ModelDocumentFragment;\n\n\t/**\n\t * Whether the event was triggered by a copy or cut operation.\n\t */\n\tmethod: 'copy' | 'cut' | 'dragstart';\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/**\n * @module clipboard/lineview\n */\n\n/* istanbul ignore file -- @preserve */\n\nimport { View } from '@ckeditor/ckeditor5-ui';\nimport { toUnit } from '@ckeditor/ckeditor5-utils';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\n/**\n * The horizontal drop target line view.\n *\n * @internal\n */\nexport class LineView extends View {\n\t/**\n\t * Controls whether the line is visible.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isVisible: boolean;\n\n\t/**\n\t * Controls the line position x coordinate.\n\t *\n\t * @observable\n\t * @default null\n\t */\n\tdeclare public left: number | null;\n\n\t/**\n\t * Controls the line width.\n\t *\n\t * @observable\n\t * @default null\n\t */\n\tdeclare public width: number | null;\n\n\t/**\n\t * Controls the line position y coordinate.\n\t *\n\t * @observable\n\t * @default null\n\t */\n\tdeclare public top: number | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\tisVisible: false,\n\t\t\tleft: null,\n\t\t\ttop: null,\n\t\t\twidth: null\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-clipboard-drop-target-line',\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value )\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\tleft: bind.to( 'left', left => toPx( left! ) ),\n\t\t\t\t\ttop: bind.to( 'top', top => toPx( top! ) ),\n\t\t\t\t\twidth: bind.to( 'width', width => toPx( width! ) )\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module clipboard/dragdroptarget\n */\n\nimport {\n\tPlugin,\n\ttype Editor\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\ttype ModelNode,\n\ttype ModelElement,\n\ttype ModelRange,\n\ttype ModelLiveRange,\n\ttype ViewElement,\n\ttype ViewRange,\n\ttype ViewDowncastWriter,\n\ttype ViewRootEditableElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tglobal,\n\tRect,\n\tDomEmitterMixin,\n\tdelay,\n\tResizeObserver,\n\ttype DomEmitter\n} from '@ckeditor/ckeditor5-utils';\n\nimport { LineView } from './lineview.js';\n\nimport { throttle } from 'es-toolkit/compat';\n\n/**\n * Part of the Drag and Drop handling. Responsible for finding and displaying the drop target.\n *\n * @internal\n */\nexport class DragDropTarget extends Plugin {\n\t/**\n\t * A delayed callback removing the drop marker.\n\t *\n\t * @internal\n\t */\n\tpublic readonly removeDropMarkerDelayed: ReturnType<typeof delay> = delay( () => this.removeDropMarker(), 40 );\n\n\t/**\n\t * A throttled callback updating the drop marker.\n\t */\n\tprivate readonly _updateDropMarkerThrottled = throttle(\n\t\ttargetRange => this._updateDropMarker( targetRange ), 40\n\t);\n\n\t/**\n\t * A throttled callback reconverting the drop parker.\n\t */\n\tprivate readonly _reconvertMarkerThrottled = throttle( () => {\n\t\tif ( this.editor.model.markers.has( 'drop-target' ) ) {\n\t\t\tthis.editor.editing.reconvertMarker( 'drop-target' );\n\t\t}\n\t}, 0 );\n\n\t/**\n\t * The horizontal drop target line view.\n\t */\n\tprivate _dropTargetLineView = new LineView();\n\n\t/**\n\t * DOM Emitter.\n\t */\n\tprivate _domEmitter: DomEmitter = new ( DomEmitterMixin() )();\n\n\t/**\n\t * Map of document scrollable elements.\n\t */\n\tprivate _scrollables = new Map<string, {\n\t\tdomElement: HTMLElement;\n\t\tresizeObserver: ResizeObserver;\n\t}>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'DragDropTarget' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis._setupDropMarker();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._domEmitter.stopListening();\n\n\t\tfor ( const { resizeObserver } of this._scrollables.values() ) {\n\t\t\tresizeObserver.destroy();\n\t\t}\n\n\t\tthis._updateDropMarkerThrottled.cancel();\n\t\tthis.removeDropMarkerDelayed.cancel();\n\t\tthis._reconvertMarkerThrottled.cancel();\n\n\t\treturn super.destroy();\n\t}\n\n\t/**\n\t * Finds the drop target range and updates the drop marker.\n\t *\n\t * @return The updated drop target range or null if no valid range was found.\n\t * @internal\n\t */\n\tpublic updateDropMarker(\n\t\ttargetViewElement: ViewElement,\n\t\ttargetViewRanges: Array<ViewRange> | null,\n\t\tclientX: number,\n\t\tclientY: number,\n\t\tblockMode: boolean,\n\t\tdraggedRange: ModelLiveRange | null\n\t): ModelRange | null {\n\t\tthis.removeDropMarkerDelayed.cancel();\n\n\t\tconst targetRange = findDropTargetRange(\n\t\t\tthis.editor,\n\t\t\ttargetViewElement,\n\t\t\ttargetViewRanges,\n\t\t\tclientX,\n\t\t\tclientY,\n\t\t\tblockMode,\n\t\t\tdraggedRange\n\t\t);\n\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif ( !targetRange ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( draggedRange && draggedRange.containsRange( targetRange ) ) {\n\t\t\t// Target range is inside the dragged range.\n\t\t\tthis.removeDropMarker();\n\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( targetRange && !this.editor.model.canEditAt( targetRange ) ) {\n\t\t\t// Do not show drop marker if target place is not editable.\n\t\t\tthis.removeDropMarker();\n\n\t\t\treturn null;\n\t\t}\n\n\t\tthis._updateDropMarkerThrottled( targetRange );\n\n\t\treturn targetRange;\n\t}\n\n\t/**\n\t * Finds the final drop target range.\n\t *\n\t * @internal\n\t */\n\tpublic getFinalDropRange(\n\t\ttargetViewElement: ViewElement,\n\t\ttargetViewRanges: Array<ViewRange> | null,\n\t\tclientX: number,\n\t\tclientY: number,\n\t\tblockMode: boolean,\n\t\tdraggedRange: ModelLiveRange | null\n\t): ModelRange | null {\n\t\tconst targetRange = findDropTargetRange(\n\t\t\tthis.editor,\n\t\t\ttargetViewElement,\n\t\t\ttargetViewRanges,\n\t\t\tclientX,\n\t\t\tclientY,\n\t\t\tblockMode,\n\t\t\tdraggedRange\n\t\t);\n\t\t// The dragging markers must be removed after searching for the target range because sometimes\n\t\t// the target lands on the marker itself.\n\t\tthis.removeDropMarker();\n\n\t\treturn targetRange;\n\t}\n\n\t/**\n\t * Removes the drop target marker.\n\t *\n\t * @internal\n\t */\n\tpublic removeDropMarker(): void {\n\t\tconst model = this.editor.model;\n\n\t\tthis.removeDropMarkerDelayed.cancel();\n\t\tthis._updateDropMarkerThrottled.cancel();\n\t\tthis._dropTargetLineView.isVisible = false;\n\n\t\tif ( model.markers.has( 'drop-target' ) ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.removeMarker( 'drop-target' );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Creates downcast conversion for the drop target marker.\n\t */\n\tprivate _setupDropMarker(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.view.body.add( this._dropTargetLineView );\n\n\t\t// Drop marker conversion for hovering over widgets.\n\t\teditor.conversion.for( 'editingDowncast' ).markerToHighlight( {\n\t\t\tmodel: 'drop-target',\n\t\t\tview: {\n\t\t\t\tclasses: [ 'ck-clipboard-drop-target-range' ]\n\t\t\t}\n\t\t} );\n\n\t\t// Drop marker conversion for in text and block drop target.\n\t\teditor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t\t\tmodel: 'drop-target',\n\t\t\tview: ( data, { writer } ) => {\n\t\t\t\t// Inline drop.\n\t\t\t\tif ( editor.model.schema.checkChild( data.markerRange.start, '$text' ) ) {\n\t\t\t\t\tthis._dropTargetLineView.isVisible = false;\n\n\t\t\t\t\treturn this._createDropTargetPosition( writer );\n\t\t\t\t}\n\t\t\t\t// Block drop.\n\t\t\t\telse {\n\t\t\t\t\tif ( data.markerRange.isCollapsed ) {\n\t\t\t\t\t\tthis._updateDropTargetLine( data.markerRange );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._dropTargetLineView.isVisible = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Updates the drop target marker to the provided range.\n\t *\n\t * @param targetRange The range to set the marker to.\n\t */\n\tprivate _updateDropMarker( targetRange: ModelRange ): void {\n\t\tconst editor = this.editor;\n\t\tconst markers = editor.model.markers;\n\n\t\teditor.model.change( writer => {\n\t\t\tif ( markers.has( 'drop-target' ) ) {\n\t\t\t\tif ( !markers.get( 'drop-target' )!.getRange().isEqual( targetRange ) ) {\n\t\t\t\t\twriter.updateMarker( 'drop-target', { range: targetRange } );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twriter.addMarker( 'drop-target', {\n\t\t\t\t\trange: targetRange,\n\t\t\t\t\tusingOperation: false,\n\t\t\t\t\taffectsData: false\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the UI element for vertical (in-line) drop target.\n\t */\n\tprivate _createDropTargetPosition( writer: ViewDowncastWriter ): ViewElement {\n\t\treturn writer.createUIElement( 'span', { class: 'ck ck-clipboard-drop-target-position' }, function( domDocument ) {\n\t\t\tconst domElement = this.toDomElement( domDocument );\n\n\t\t\t// Using word joiner to make this marker as high as text and also making text not break on marker.\n\t\t\tdomElement.append( '\\u2060', domDocument.createElement( 'span' ), '\\u2060' );\n\n\t\t\treturn domElement;\n\t\t} );\n\t}\n\n\t/**\n\t * Updates the horizontal drop target line.\n\t */\n\tprivate _updateDropTargetLine( range: ModelRange ): void {\n\t\tconst editing = this.editor.editing;\n\n\t\tconst nodeBefore = range.start.nodeBefore as ModelElement | null;\n\t\tconst nodeAfter = range.start.nodeAfter as ModelElement | null;\n\t\tconst nodeParent = range.start.parent as ModelElement;\n\n\t\tconst viewElementBefore = nodeBefore ? editing.mapper.toViewElement( nodeBefore ) : null;\n\t\tconst domElementBefore = viewElementBefore ? editing.view.domConverter.mapViewToDom( viewElementBefore ) : null;\n\n\t\tconst viewElementAfter = nodeAfter ? editing.mapper.toViewElement( nodeAfter )! : null;\n\t\tconst domElementAfter = viewElementAfter ? editing.view.domConverter.mapViewToDom( viewElementAfter ) : null;\n\n\t\tconst viewElementParent = editing.mapper.toViewElement( nodeParent )!;\n\n\t\tif ( !viewElementParent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domElementParent = editing.view.domConverter.mapViewToDom( viewElementParent )!;\n\n\t\tconst domScrollableRect = this._getScrollableRect( viewElementParent );\n\n\t\tconst { scrollX, scrollY } = global.window;\n\t\tconst rectBefore = domElementBefore ? new Rect( domElementBefore ) : null;\n\t\tconst rectAfter = domElementAfter ? new Rect( domElementAfter ) : null;\n\t\tconst rectParent = new Rect( domElementParent ).excludeScrollbarsAndBorders();\n\n\t\tconst above = rectBefore ? rectBefore.bottom : rectParent.top;\n\t\tconst below = rectAfter ? rectAfter.top : rectParent.bottom;\n\n\t\tconst parentStyle = global.window.getComputedStyle( domElementParent );\n\t\tconst top = ( above <= below ? ( above + below ) / 2 : below );\n\n\t\tif ( domScrollableRect.top < top && top < domScrollableRect.bottom ) {\n\t\t\tconst left = rectParent.left + parseFloat( parentStyle.paddingLeft );\n\t\t\tconst right = rectParent.right - parseFloat( parentStyle.paddingRight );\n\n\t\t\tconst leftClamped = Math.max( left + scrollX, domScrollableRect.left );\n\t\t\tconst rightClamped = Math.min( right + scrollX, domScrollableRect.right );\n\n\t\t\tthis._dropTargetLineView.set( {\n\t\t\t\tisVisible: true,\n\t\t\t\tleft: leftClamped,\n\t\t\t\ttop: top + scrollY,\n\t\t\t\twidth: rightClamped - leftClamped\n\t\t\t} );\n\t\t} else {\n\t\t\tthis._dropTargetLineView.isVisible = false;\n\t\t}\n\t}\n\n\t/**\n\t * Finds the closest scrollable element rect for the given view element.\n\t */\n\tprivate _getScrollableRect( viewElement: ViewElement ): Rect {\n\t\tconst rootName = ( viewElement.root as ViewRootEditableElement ).rootName;\n\n\t\tlet domScrollable;\n\n\t\tif ( this._scrollables.has( rootName ) ) {\n\t\t\tdomScrollable = this._scrollables.get( rootName )!.domElement;\n\t\t} else {\n\t\t\tconst domElement = this.editor.editing.view.domConverter.mapViewToDom( viewElement )!;\n\n\t\t\tdomScrollable = findScrollableElement( domElement );\n\n\t\t\tthis._domEmitter.listenTo( domScrollable, 'scroll', this._reconvertMarkerThrottled, { usePassive: true } );\n\t\t\tconst resizeObserver = new ResizeObserver( domScrollable, this._reconvertMarkerThrottled );\n\n\t\t\tthis._scrollables.set( rootName, {\n\t\t\t\tdomElement: domScrollable,\n\t\t\t\tresizeObserver\n\t\t\t} );\n\t\t}\n\n\t\treturn new Rect( domScrollable ).excludeScrollbarsAndBorders();\n\t}\n}\n\n/**\n * Returns fixed selection range for given position and target element.\n */\nfunction findDropTargetRange(\n\teditor: Editor,\n\ttargetViewElement: ViewElement,\n\ttargetViewRanges: Array<ViewRange> | null,\n\tclientX: number,\n\tclientY: number,\n\tblockMode: boolean,\n\tdraggedRange: ModelLiveRange | null\n): ModelRange | null {\n\tconst model = editor.model;\n\tconst mapper = editor.editing.mapper;\n\n\tconst targetModelElement = getClosestMappedModelElement( editor, targetViewElement );\n\tlet modelElement = targetModelElement;\n\n\twhile ( modelElement ) {\n\t\tif ( !blockMode ) {\n\t\t\tif ( model.schema.checkChild( modelElement, '$text' ) ) {\n\t\t\t\tif ( targetViewRanges ) {\n\t\t\t\t\tconst targetViewPosition = targetViewRanges[ 0 ].start;\n\t\t\t\t\tconst targetModelPosition = mapper.toModelPosition( targetViewPosition );\n\t\t\t\t\tconst canDropOnPosition = !draggedRange || Array\n\t\t\t\t\t\t.from( draggedRange.getItems( { shallow: true } ) )\n\t\t\t\t\t\t.some( item => model.schema.checkChild( targetModelPosition, item as ModelNode ) );\n\n\t\t\t\t\tif ( canDropOnPosition ) {\n\t\t\t\t\t\tif ( model.schema.checkChild( targetModelPosition, '$text' ) ) {\n\t\t\t\t\t\t\treturn model.createRange( targetModelPosition );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\t\t\tif ( targetViewPosition ) {\n\t\t\t\t\t\t\t\t// This is the case of dropping inside a span wrapper of an inline image.\n\t\t\t\t\t\t\t\treturn findDropTargetRangeForElement(\n\t\t\t\t\t\t\t\t\teditor,\n\t\t\t\t\t\t\t\t\tgetClosestMappedModelElement( editor, targetViewPosition.parent as ViewElement ),\n\t\t\t\t\t\t\t\t\tclientX,\n\t\t\t\t\t\t\t\t\tclientY\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( model.schema.isInline( modelElement ) ) {\n\t\t\t\treturn findDropTargetRangeForElement( editor, modelElement, clientX, clientY );\n\t\t\t}\n\t\t}\n\n\t\tif ( model.schema.isBlock( modelElement ) ) {\n\t\t\treturn findDropTargetRangeForElement( editor, modelElement, clientX, clientY );\n\t\t}\n\t\telse if ( model.schema.checkChild( modelElement, '$block' ) ) {\n\t\t\tconst childNodes = Array.from( modelElement.getChildren() )\n\t\t\t\t.filter( ( node ): node is ModelElement => node.is( 'element' ) && !shouldIgnoreElement( editor, node ) );\n\n\t\t\tlet startIndex = 0;\n\t\t\tlet endIndex = childNodes.length;\n\n\t\t\tif ( endIndex == 0 ) {\n\t\t\t\treturn model.createRange( model.createPositionAt( modelElement as ModelElement, 'end' ) );\n\t\t\t}\n\n\t\t\twhile ( startIndex < endIndex - 1 ) {\n\t\t\t\tconst middleIndex = Math.floor( ( startIndex + endIndex ) / 2 );\n\t\t\t\tconst side = findElementSide( editor, childNodes[ middleIndex ], clientX, clientY );\n\n\t\t\t\tif ( side == 'before' ) {\n\t\t\t\t\tendIndex = middleIndex;\n\t\t\t\t} else {\n\t\t\t\t\tstartIndex = middleIndex;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn findDropTargetRangeForElement( editor, childNodes[ startIndex ], clientX, clientY );\n\t\t}\n\n\t\tmodelElement = modelElement.parent as ModelElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns true for elements which should be ignored.\n */\nfunction shouldIgnoreElement( editor: Editor, modelElement: ModelElement ): boolean {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\n\tconst viewElement = mapper.toViewElement( modelElement )!;\n\n\tif ( !viewElement ) {\n\t\treturn true;\n\t}\n\n\tconst domElement = domConverter.mapViewToDom( viewElement )!;\n\n\treturn global.window.getComputedStyle( domElement ).float != 'none';\n}\n\n/**\n * Returns target range relative to the given element.\n */\nfunction findDropTargetRangeForElement( editor: Editor, modelElement: ModelElement, clientX: number, clientY: number ): ModelRange {\n\tconst model = editor.model;\n\n\treturn model.createRange(\n\t\tmodel.createPositionAt(\n\t\t\tmodelElement as ModelElement,\n\t\t\tfindElementSide( editor, modelElement, clientX, clientY )\n\t\t)\n\t);\n}\n\n/**\n * Resolves whether drop marker should be before or after the given element.\n */\nfunction findElementSide( editor: Editor, modelElement: ModelElement, clientX: number, clientY: number ): 'before' | 'after' {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\n\tconst viewElement = mapper.toViewElement( modelElement )!;\n\tconst domElement = domConverter.mapViewToDom( viewElement )!;\n\tconst rect = new Rect( domElement );\n\n\tif ( editor.model.schema.isInline( modelElement ) ) {\n\t\treturn clientX < ( rect.left + rect.right ) / 2 ? 'before' : 'after';\n\t} else {\n\t\treturn clientY < ( rect.top + rect.bottom ) / 2 ? 'before' : 'after';\n\t}\n}\n\n/**\n * Returns the closest model element for the specified view element.\n */\nfunction getClosestMappedModelElement( editor: Editor, element: ViewElement ): ModelElement {\n\tconst mapper = editor.editing.mapper;\n\tconst view = editor.editing.view;\n\n\tconst targetModelElement = mapper.toModelElement( element );\n\n\tif ( targetModelElement ) {\n\t\treturn targetModelElement;\n\t}\n\n\t// Find mapped ancestor if the target is inside not mapped element (for example inline code element).\n\tconst viewPosition = view.createPositionBefore( element );\n\tconst viewElement = mapper.findMappedViewAncestor( viewPosition );\n\n\treturn mapper.toModelElement( viewElement )!;\n}\n\n/**\n * Returns the closest scrollable ancestor DOM element.\n *\n * It is assumed that `domNode` is attached to the document.\n */\nfunction findScrollableElement( domNode: HTMLElement ): HTMLElement {\n\tlet domElement: HTMLElement = domNode;\n\n\tdo {\n\t\tdomElement = domElement.parentElement!;\n\n\t\tconst overflow = global.window.getComputedStyle( domElement ).overflowY;\n\n\t\tif ( overflow == 'auto' || overflow == 'scroll' ) {\n\t\t\tbreak;\n\t\t}\n\t} while ( domElement.tagName != 'BODY' );\n\n\treturn domElement;\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/**\n * @module clipboard/dragdropblocktoolbar\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tenv,\n\tglobal,\n\tDomEmitterMixin,\n\ttype ObservableChangeEvent,\n\ttype DomEmitter\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { BlockToolbar } from '@ckeditor/ckeditor5-ui';\n\nimport { ClipboardObserver } from './clipboardobserver.js';\n\n/**\n * Integration of a block Drag and Drop support with the block toolbar.\n *\n * @internal\n */\nexport class DragDropBlockToolbar extends Plugin {\n\t/**\n\t * Whether current dragging is started by block toolbar button dragging.\n\t */\n\tprivate _isBlockDragging = false;\n\n\t/**\n\t * DOM Emitter.\n\t */\n\tprivate _domEmitter: DomEmitter = new ( DomEmitterMixin() )();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'DragDropBlockToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\tthis.listenTo<ObservableChangeEvent<boolean>>( editor, 'change:isReadOnly', ( evt, name, isReadOnly ) => {\n\t\t\tif ( isReadOnly ) {\n\t\t\t\tthis.forceDisabled( 'readOnlyMode' );\n\t\t\t\tthis._isBlockDragging = false;\n\t\t\t} else {\n\t\t\t\tthis.clearForceDisabled( 'readOnlyMode' );\n\t\t\t}\n\t\t} );\n\n\t\tif ( env.isAndroid ) {\n\t\t\tthis.forceDisabled( 'noAndroidSupport' );\n\t\t}\n\n\t\tif ( editor.plugins.has( 'BlockToolbar' ) ) {\n\t\t\tconst blockToolbar: BlockToolbar = editor.plugins.get( 'BlockToolbar' );\n\t\t\tconst element = blockToolbar.buttonView.element!;\n\n\t\t\tthis._domEmitter.listenTo( element, 'dragstart', ( evt, data ) => this._handleBlockDragStart( data ) );\n\t\t\tthis._domEmitter.listenTo( global.document, 'dragover', ( evt, data ) => this._handleBlockDragging( data ) );\n\t\t\tthis._domEmitter.listenTo( global.document, 'drop', ( evt, data ) => this._handleBlockDragging( data ) );\n\t\t\tthis._domEmitter.listenTo( global.document, 'dragend', () => this._handleBlockDragEnd(), { useCapture: true } );\n\n\t\t\tif ( this.isEnabled ) {\n\t\t\t\telement.setAttribute( 'draggable', 'true' );\n\t\t\t}\n\n\t\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isEnabled', ( evt, name, isEnabled ) => {\n\t\t\t\telement.setAttribute( 'draggable', isEnabled ? 'true' : 'false' );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._domEmitter.stopListening();\n\n\t\treturn super.destroy();\n\t}\n\n\t/**\n\t * The `dragstart` event handler.\n\t */\n\tprivate _handleBlockDragStart( domEvent: DragEvent ): void {\n\t\tif ( !this.isEnabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst view = this.editor.editing.view;\n\n\t\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\t\tconst draggedRange = model.createRange(\n\t\t\tmodel.createPositionBefore( blocks[ 0 ] ),\n\t\t\tmodel.createPositionAfter( blocks[ blocks.length - 1 ] )\n\t\t);\n\n\t\tmodel.change( writer => writer.setSelection( draggedRange ) );\n\n\t\tthis._isBlockDragging = true;\n\n\t\tview.focus();\n\t\tview.getObserver( ClipboardObserver )!.onDomEvent( domEvent );\n\t}\n\n\t/**\n\t * The `dragover` and `drop` event handler.\n\t */\n\tprivate _handleBlockDragging( domEvent: DragEvent ): void {\n\t\tif ( !this.isEnabled || !this._isBlockDragging ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst clientX = domEvent.clientX + ( this.editor.locale.contentLanguageDirection == 'ltr' ? 100 : -100 );\n\t\tconst clientY = domEvent.clientY;\n\t\tconst target = document.elementFromPoint( clientX, clientY );\n\t\tconst view = this.editor.editing.view;\n\n\t\tif ( !target || !target.closest( '.ck-editor__editable' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tview.getObserver( ClipboardObserver )!.onDomEvent( {\n\t\t\t...domEvent,\n\t\t\ttype: domEvent.type,\n\t\t\tdataTransfer: domEvent.dataTransfer,\n\t\t\ttarget,\n\t\t\tclientX,\n\t\t\tclientY,\n\t\t\tpreventDefault: () => domEvent.preventDefault(),\n\t\t\tstopPropagation: () => domEvent.stopPropagation()\n\t\t} );\n\t}\n\n\t/**\n\t * The `dragend` event handler.\n\t */\n\tprivate _handleBlockDragEnd(): void {\n\t\tthis._isBlockDragging = false;\n\t}\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/**\n * @module clipboard/dragdrop\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tModelLiveRange,\n\tPointerObserver,\n\ttype ViewDataTransfer,\n\ttype ModelElement,\n\ttype Model,\n\ttype ModelRange,\n\ttype ModelPosition,\n\ttype ViewElement,\n\ttype ViewDocumentDomEventData,\n\ttype ViewDocumentPointerDownEvent,\n\ttype ViewDocumentPointerUpEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tWidget,\n\tisWidget,\n\ttype WidgetToolbarRepository\n} from '@ckeditor/ckeditor5-widget';\n\nimport {\n\tenv,\n\tuid,\n\tglobal,\n\tcreateElement,\n\tDomEmitterMixin,\n\tdelay,\n\tRect,\n\ttype DelayedFunc,\n\ttype ObservableChangeEvent,\n\ttype DomEmitter\n} from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tClipboardPipeline,\n\ttype ClipboardContentInsertionEvent\n} from './clipboardpipeline.js';\n\nimport {\n\tClipboardObserver,\n\ttype ViewDocumentDragEndEvent,\n\ttype ViewDocumentDragEnterEvent,\n\ttype ViewDocumentDraggingEvent,\n\ttype ViewDocumentDragLeaveEvent,\n\ttype ViewDocumentDragStartEvent,\n\ttype ViewDocumentClipboardInputEvent\n} from './clipboardobserver.js';\n\nimport { DragDropTarget } from './dragdroptarget.js';\nimport { DragDropBlockToolbar } from './dragdropblocktoolbar.js';\n\n// Drag and drop events overview:\n//\n//                ┌──────────────────┐\n//                │     mousedown    │   Sets the draggable attribute.\n//                └─────────┬────────┘\n//                          │\n//                          └─────────────────────┐\n//                          │                     │\n//                          │           ┌─────────V────────┐\n//                          │           │      mouseup     │   Dragging did not start, removes the draggable attribute.\n//                          │           └──────────────────┘\n//                          │\n//                ┌─────────V────────┐   Retrieves the selected model.DocumentFragment\n//                │     dragstart    │   and converts it to view.DocumentFragment.\n//                └─────────┬────────┘\n//                          │\n//                ┌─────────V────────┐   Processes view.DocumentFragment to text/html and text/plain\n//                │  clipboardOutput │   and stores the results in data.dataTransfer.\n//                └─────────┬────────┘\n//                          │\n//                          │   DOM dragover\n//                          ┌────────────┐\n//                          │            │\n//                ┌─────────V────────┐   │\n//                │     dragging     │   │   Updates the drop target marker.\n//                └─────────┬────────┘   │\n//                          │            │\n//            ┌─────────────└────────────┘\n//            │             │            │\n//            │   ┌─────────V────────┐   │\n//            │   │     dragleave    │   │   Removes the drop target marker.\n//            │   └─────────┬────────┘   │\n//            │             │            │\n//        ┌───│─────────────┘            │\n//        │   │             │            │\n//        │   │   ┌─────────V────────┐   │\n//        │   │   │     dragenter    │   │   Focuses the editor view.\n//        │   │   └─────────┬────────┘   │\n//        │   │             │            │\n//        │   │             └────────────┘\n//        │   │\n//        │   └─────────────┐\n//        │   │             │\n//        │   │   ┌─────────V────────┐\n//        └───┐   │       drop       │   (The default handler of the clipboard pipeline).\n//            │   └─────────┬────────┘\n//            │             │\n//            │   ┌─────────V────────┐   Resolves the final data.targetRanges.\n//            │   │  clipboardInput  │   Aborts if dropping on dragged content.\n//            │   └─────────┬────────┘\n//            │             │\n//            │   ┌─────────V────────┐\n//            │   │  clipboardInput  │   (The default handler of the clipboard pipeline).\n//            │   └─────────┬────────┘\n//            │             │\n//            │ ┌───────────V───────────┐\n//            │ │  inputTransformation  │   (The default handler of the clipboard pipeline).\n//            │ └───────────┬───────────┘\n//            │             │\n//            │  ┌──────────V──────────┐\n//            │  │   contentInsertion  │   Updates the document selection to drop range.\n//            │  └──────────┬──────────┘\n//            │             │\n//            │  ┌──────────V──────────┐\n//            │  │   contentInsertion  │   (The default handler of the clipboard pipeline).\n//            │  └──────────┬──────────┘\n//            │             │\n//            │  ┌──────────V──────────┐\n//            │  │   contentInsertion  │   Removes the content from the original range if the insertion was successful.\n//            │  └──────────┬──────────┘\n//            │             │\n//            └─────────────┐\n//                          │\n//                ┌─────────V────────┐\n//                │      dragend     │   Removes the drop marker and cleans the state.\n//                └──────────────────┘\n//\n\n/**\n * The drag and drop feature. It works on top of the {@link module:clipboard/clipboardpipeline~ClipboardPipeline}.\n *\n * Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n *\n * @internal\n */\nexport class DragDrop extends Plugin {\n\t/**\n\t * The live range over the original content that is being dragged.\n\t */\n\tprivate _draggedRange!: ModelLiveRange | null;\n\n\t/**\n\t * The UID of current dragging that is used to verify if the drop started in the same editor as the drag start.\n\t *\n\t * **Note**: This is a workaround for broken 'dragend' events (they are not fired if the source text node got removed).\n\t */\n\tprivate _draggingUid!: string;\n\n\t/**\n\t * The reference to the model element that currently has a `draggable` attribute set (it is set while dragging).\n\t */\n\tprivate _draggableElement!: ModelElement | null;\n\n\t/**\n\t * A delayed callback removing draggable attributes.\n\t */\n\tprivate _clearDraggableAttributesDelayed: DelayedFunc<() => void> = delay( () => this._clearDraggableAttributes(), 40 );\n\n\t/**\n\t * Whether the dragged content can be dropped only in block context.\n\t */\n\t// TODO handle drag from other editor instance\n\t// TODO configure to use block, inline or both\n\tprivate _blockMode: boolean = false;\n\n\t/**\n\t * DOM Emitter.\n\t */\n\tprivate _domEmitter: DomEmitter = new ( DomEmitterMixin() )();\n\n\t/**\n\t * The DOM element used to generate dragged preview image.\n\t */\n\tprivate _previewContainer?: HTMLElement;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'DragDrop' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ClipboardPipeline, Widget, DragDropTarget, DragDropBlockToolbar ]> {\n\t\treturn [ ClipboardPipeline, Widget, DragDropTarget, DragDropBlockToolbar ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\n\t\tthis._draggedRange = null;\n\t\tthis._draggingUid = '';\n\t\tthis._draggableElement = null;\n\n\t\tview.addObserver( ClipboardObserver );\n\t\tview.addObserver( PointerObserver );\n\n\t\tthis._setupDragging();\n\t\tthis._setupContentInsertionIntegration();\n\t\tthis._setupClipboardInputIntegration();\n\t\tthis._setupDraggableAttributeHandling();\n\n\t\tthis.listenTo<ObservableChangeEvent<boolean>>( editor, 'change:isReadOnly', ( evt, name, isReadOnly ) => {\n\t\t\tif ( isReadOnly ) {\n\t\t\t\tthis.forceDisabled( 'readOnlyMode' );\n\t\t\t} else {\n\t\t\t\tthis.clearForceDisabled( 'readOnlyMode' );\n\t\t\t}\n\t\t} );\n\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:isEnabled', ( evt, name, isEnabled ) => {\n\t\t\tif ( !isEnabled ) {\n\t\t\t\tthis._finalizeDragging( false );\n\t\t\t}\n\t\t} );\n\n\t\tif ( env.isAndroid ) {\n\t\t\tthis.forceDisabled( 'noAndroidSupport' );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._draggedRange ) {\n\t\t\tthis._draggedRange.detach();\n\t\t\tthis._draggedRange = null;\n\t\t}\n\n\t\tif ( this._previewContainer ) {\n\t\t\tthis._previewContainer.remove();\n\t\t}\n\n\t\tthis._domEmitter.stopListening();\n\t\tthis._clearDraggableAttributesDelayed.cancel();\n\n\t\treturn super.destroy();\n\t}\n\n\t/**\n\t * Drag and drop events handling.\n\t */\n\tprivate _setupDragging(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst dragDropTarget = editor.plugins.get( DragDropTarget );\n\n\t\t// The handler for the drag start; it is responsible for setting data transfer object.\n\t\tthis.listenTo<ViewDocumentDragStartEvent>( viewDocument, 'dragstart', ( evt, data ) => {\n\t\t\t// Don't drag the editable element itself.\n\t\t\tif ( data.target?.is( 'editableElement' ) ) {\n\t\t\t\tdata.preventDefault();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._prepareDraggedRange( data.target );\n\n\t\t\tif ( !this._draggedRange ) {\n\t\t\t\tdata.preventDefault();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._draggingUid = uid();\n\n\t\t\tconst canEditAtDraggedRange = this.isEnabled && editor.model.canEditAt( this._draggedRange );\n\n\t\t\tdata.dataTransfer.effectAllowed = canEditAtDraggedRange ? 'copyMove' : 'copy';\n\t\t\tdata.dataTransfer.setData( 'application/ckeditor5-dragging-uid', this._draggingUid );\n\n\t\t\tconst draggedSelection = model.createSelection( this._draggedRange.toRange() );\n\t\t\tconst clipboardPipeline: ClipboardPipeline = this.editor.plugins.get( 'ClipboardPipeline' );\n\n\t\t\tclipboardPipeline._fireOutputTransformationEvent( data.dataTransfer, draggedSelection, 'dragstart' );\n\n\t\t\tconst { dataTransfer, domTarget, domEvent } = data;\n\t\t\tconst { clientX } = domEvent;\n\n\t\t\tthis._updatePreview( { dataTransfer, domTarget, clientX } );\n\n\t\t\tdata.stopPropagation();\n\n\t\t\tif ( !canEditAtDraggedRange ) {\n\t\t\t\tthis._draggedRange.detach();\n\t\t\t\tthis._draggedRange = null;\n\t\t\t\tthis._draggingUid = '';\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\n\t\t// The handler for finalizing drag and drop. It should always be triggered after dragging completes\n\t\t// even if it was completed in a different application.\n\t\t// Note: This is not fired if source text node got removed while downcasting a marker.\n\t\tthis.listenTo<ViewDocumentDragEndEvent>( viewDocument, 'dragend', ( evt, data ) => {\n\t\t\tthis._finalizeDragging( !data.dataTransfer.isCanceled && data.dataTransfer.dropEffect == 'move' );\n\t\t}, { priority: 'low' } );\n\n\t\t// Reset block dragging mode even if dropped outside the editable.\n\t\tthis._domEmitter.listenTo( global.document, 'dragend', () => {\n\t\t\tthis._blockMode = false;\n\t\t}, { useCapture: true } );\n\n\t\t// Dragging over the editable.\n\t\tthis.listenTo<ViewDocumentDragEnterEvent>( viewDocument, 'dragenter', () => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tview.focus();\n\t\t} );\n\n\t\t// Dragging out of the editable.\n\t\tthis.listenTo<ViewDocumentDragLeaveEvent>( viewDocument, 'dragleave', () => {\n\t\t\t// We do not know if the mouse left the editor or just some element in it, so let us wait a few milliseconds\n\t\t\t// to check if 'dragover' is not fired.\n\t\t\tdragDropTarget.removeDropMarkerDelayed();\n\t\t} );\n\n\t\t// Handler for moving dragged content over the target area.\n\t\tthis.listenTo<ViewDocumentDraggingEvent>( viewDocument, 'dragging', ( evt, data ) => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\tdata.dataTransfer.dropEffect = 'none';\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { clientX, clientY } = ( data as ViewDocumentDomEventData<DragEvent> ).domEvent;\n\n\t\t\tconst targetRange = dragDropTarget.updateDropMarker(\n\t\t\t\tdata.target,\n\t\t\t\tdata.targetRanges,\n\t\t\t\tclientX,\n\t\t\t\tclientY,\n\t\t\t\tthis._blockMode,\n\t\t\t\tthis._draggedRange\n\t\t\t);\n\n\t\t\t// Do not allow dropping if there is no valid target range (e.g., dropping on non-editable place).\n\t\t\tif ( !targetRange ) {\n\t\t\t\tdata.dataTransfer.dropEffect = 'none';\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If this is content being dragged from another editor, moving out of current editor instance\n\t\t\t// is not possible until 'dragend' event case will be fixed.\n\t\t\tif ( !this._draggedRange ) {\n\t\t\t\tdata.dataTransfer.dropEffect = 'copy';\n\t\t\t}\n\n\t\t\t// In Firefox it is already set and effect allowed remains the same as originally set.\n\t\t\tif ( !env.isGecko ) {\n\t\t\t\tif ( data.dataTransfer.effectAllowed == 'copy' ) {\n\t\t\t\t\tdata.dataTransfer.dropEffect = 'copy';\n\t\t\t\t} else if ( [ 'all', 'copyMove' ].includes( data.dataTransfer.effectAllowed ) ) {\n\t\t\t\t\tdata.dataTransfer.dropEffect = 'move';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tevt.stop();\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Integration with the `clipboardInput` event.\n\t */\n\tprivate _setupClipboardInputIntegration(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst dragDropTarget = editor.plugins.get( DragDropTarget );\n\n\t\t// Update the event target ranges and abort dropping if dropping over itself.\n\t\tthis.listenTo<ViewDocumentClipboardInputEvent>( viewDocument, 'clipboardInput', ( evt, data ) => {\n\t\t\tif ( data.method != 'drop' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { clientX, clientY } = ( data as ViewDocumentDomEventData<DragEvent> ).domEvent;\n\t\t\tconst targetRange = dragDropTarget.getFinalDropRange(\n\t\t\t\tdata.target,\n\t\t\t\tdata.targetRanges,\n\t\t\t\tclientX,\n\t\t\t\tclientY,\n\t\t\t\tthis._blockMode,\n\t\t\t\tthis._draggedRange\n\t\t\t);\n\n\t\t\tif ( !targetRange ) {\n\t\t\t\tthis._finalizeDragging( false );\n\t\t\t\tevt.stop();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Since we cannot rely on the drag end event, we must check if the local drag range is from the current drag and drop\n\t\t\t// or it is from some previous not cleared one.\n\t\t\tif ( this._draggedRange && this._draggingUid != data.dataTransfer.getData( 'application/ckeditor5-dragging-uid' ) ) {\n\t\t\t\tthis._draggedRange.detach();\n\t\t\t\tthis._draggedRange = null;\n\t\t\t\tthis._draggingUid = '';\n\t\t\t}\n\n\t\t\t// Do not do anything if some content was dragged within the same document to the same position.\n\t\t\tconst isMove = getFinalDropEffect( data.dataTransfer ) == 'move';\n\n\t\t\tif ( isMove && this._draggedRange && this._draggedRange.containsRange( targetRange, true ) ) {\n\t\t\t\tthis._finalizeDragging( false );\n\t\t\t\tevt.stop();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Override the target ranges with the one adjusted to the best one for a drop.\n\t\t\tdata.targetRanges = [ editor.editing.mapper.toViewRange( targetRange ) ];\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Integration with the `contentInsertion` event of the clipboard pipeline.\n\t */\n\tprivate _setupContentInsertionIntegration(): void {\n\t\tconst clipboardPipeline = this.editor.plugins.get( ClipboardPipeline );\n\n\t\tclipboardPipeline.on<ClipboardContentInsertionEvent>( 'contentInsertion', ( evt, data ) => {\n\t\t\tif ( !this.isEnabled || data.method !== 'drop' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update the selection to the target range in the same change block to avoid selection post-fixing\n\t\t\t// and to be able to clone text attributes for plain text dropping.\n\t\t\tconst ranges = data.targetRanges!.map( viewRange => this.editor.editing.mapper.toModelRange( viewRange ) );\n\n\t\t\tthis.editor.model.change( writer => writer.setSelection( ranges ) );\n\t\t}, { priority: 'high' } );\n\n\t\tclipboardPipeline.on<ClipboardContentInsertionEvent>( 'contentInsertion', ( evt, data ) => {\n\t\t\tif ( !this.isEnabled || data.method !== 'drop' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Remove dragged range content, remove markers, clean after dragging.\n\t\t\tconst isMove = getFinalDropEffect( data.dataTransfer ) == 'move';\n\n\t\t\t// Whether any content was inserted (insertion might fail if the schema is disallowing some elements\n\t\t\t// (for example an image caption allows only the content of a block but not blocks themselves.\n\t\t\t// Some integrations might not return valid range (i.e., table pasting).\n\t\t\tconst isSuccess = !data.resultRange || !data.resultRange.isCollapsed;\n\n\t\t\tthis._finalizeDragging( isSuccess && isMove );\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Adds listeners that add the `draggable` attribute to the elements while the mouse button is down so the dragging could start.\n\t */\n\tprivate _setupDraggableAttributeHandling(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\n\t\t// Add the 'draggable' attribute to the widget while pressing the selection handle.\n\t\t// This is required for widgets to be draggable. In Chrome it will enable dragging text nodes.\n\t\tthis.listenTo<ViewDocumentPointerDownEvent>( viewDocument, 'pointerdown', ( evt, data ) => {\n\t\t\t// The lack of data can be caused by editor tests firing fake mouse events. This should not occur\n\t\t\t// in real-life scenarios but this greatly simplifies editor tests that would otherwise fail a lot.\n\t\t\tif ( env.isAndroid || !data ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._clearDraggableAttributesDelayed.cancel();\n\n\t\t\t// Check if this is a mousedown over the widget (but not a nested editable).\n\t\t\tlet draggableElement = findDraggableWidget( data.target );\n\n\t\t\t// Note: There is a limitation that if more than a widget is selected (a widget and some text)\n\t\t\t// and dragging starts on the widget, then only the widget is dragged.\n\n\t\t\t// If this was not a widget then we should check if we need to drag some text content.\n\t\t\t// In Chrome set a 'draggable' attribute on closest editable to allow immediate dragging of the selected text range.\n\t\t\t// In Firefox this is not needed. In Safari it makes the whole editable draggable (not just textual content).\n\t\t\t// Disabled in read-only mode because draggable=\"true\" + contenteditable=\"false\" results\n\t\t\t// in not firing selectionchange event ever, which makes the selection stuck in read-only mode.\n\t\t\tif ( env.isBlink && !editor.isReadOnly && !draggableElement && !viewDocument.selection.isCollapsed ) {\n\t\t\t\tconst selectedElement = viewDocument.selection.getSelectedElement();\n\n\t\t\t\tif ( !selectedElement || !isWidget( selectedElement ) ) {\n\t\t\t\t\tdraggableElement = viewDocument.selection.editableElement;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( draggableElement ) {\n\t\t\t\tview.change( writer => {\n\t\t\t\t\twriter.setAttribute( 'draggable', 'true', draggableElement! );\n\t\t\t\t} );\n\n\t\t\t\t// Keep the reference to the model element in case the view element gets removed while dragging.\n\t\t\t\tthis._draggableElement = editor.editing.mapper.toModelElement( draggableElement )!;\n\t\t\t}\n\t\t} );\n\n\t\t// Remove the draggable attribute in case no dragging started (only mousedown + mouseup).\n\t\tthis.listenTo<ViewDocumentPointerUpEvent>( viewDocument, 'pointerup', () => {\n\t\t\tif ( !env.isAndroid ) {\n\t\t\t\tthis._clearDraggableAttributesDelayed();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Removes the `draggable` attribute from the element that was used for dragging.\n\t */\n\tprivate _clearDraggableAttributes(): void {\n\t\tconst editing = this.editor.editing;\n\n\t\tediting.view.change( writer => {\n\t\t\t// Remove 'draggable' attribute.\n\t\t\tif ( this._draggableElement && this._draggableElement.root.rootName != '$graveyard' ) {\n\t\t\t\twriter.removeAttribute( 'draggable', editing.mapper.toViewElement( this._draggableElement )! );\n\t\t\t}\n\n\t\t\tthis._draggableElement = null;\n\t\t} );\n\t}\n\n\t/**\n\t * Deletes the dragged content from its original range and clears the dragging state.\n\t *\n\t * @param moved Whether the move succeeded.\n\t */\n\tprivate _finalizeDragging( moved: boolean ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst dragDropTarget = editor.plugins.get( DragDropTarget );\n\n\t\tdragDropTarget.removeDropMarker();\n\t\tthis._clearDraggableAttributes();\n\n\t\tif ( editor.plugins.has( 'WidgetToolbarRepository' ) ) {\n\t\t\tconst widgetToolbarRepository: WidgetToolbarRepository = editor.plugins.get( 'WidgetToolbarRepository' );\n\n\t\t\twidgetToolbarRepository.clearForceDisabled( 'dragDrop' );\n\t\t}\n\n\t\tthis._draggingUid = '';\n\n\t\tif ( this._previewContainer ) {\n\t\t\tthis._previewContainer.remove();\n\t\t\tthis._previewContainer = undefined;\n\t\t}\n\n\t\tif ( !this._draggedRange ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Delete moved content.\n\t\tif ( moved && this.isEnabled ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\tconst selection = model.createSelection( this._draggedRange );\n\n\t\t\t\tmodel.deleteContent( selection, { doNotAutoparagraph: true } );\n\n\t\t\t\t// Check result selection if it does not require auto-paragraphing of empty container.\n\t\t\t\tconst selectionParent = selection.getFirstPosition()!.parent as ModelElement;\n\n\t\t\t\tif (\n\t\t\t\t\tselectionParent.isEmpty &&\n\t\t\t\t\t!model.schema.checkChild( selectionParent, '$text' ) &&\n\t\t\t\t\tmodel.schema.checkChild( selectionParent, 'paragraph' )\n\t\t\t\t) {\n\t\t\t\t\twriter.insertElement( 'paragraph', selectionParent, 0 );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis._draggedRange.detach();\n\t\tthis._draggedRange = null;\n\t}\n\n\t/**\n\t * Sets the dragged source range based on event target and document selection.\n\t */\n\tprivate _prepareDraggedRange( target: ViewElement ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\t// Check if this is dragstart over the widget (but not a nested editable).\n\t\tconst draggableWidget = target ? findDraggableWidget( target ) : null;\n\n\t\tif ( draggableWidget ) {\n\t\t\tconst modelElement = editor.editing.mapper.toModelElement( draggableWidget )!;\n\n\t\t\tthis._draggedRange = ModelLiveRange.fromRange( model.createRangeOn( modelElement ) );\n\t\t\tthis._blockMode = model.schema.isBlock( modelElement );\n\n\t\t\t// Disable toolbars so they won't obscure the drop area.\n\t\t\tif ( editor.plugins.has( 'WidgetToolbarRepository' ) ) {\n\t\t\t\tconst widgetToolbarRepository: WidgetToolbarRepository = editor.plugins.get( 'WidgetToolbarRepository' );\n\n\t\t\t\twidgetToolbarRepository.forceDisabled( 'dragDrop' );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If this was not a widget we should check if we need to drag some text content.\n\t\tif ( selection.isCollapsed && !( selection.getFirstPosition()!.parent as ModelElement ).isEmpty ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\t\tconst draggedRange = selection.getFirstRange()!;\n\n\t\tif ( blocks.length == 0 ) {\n\t\t\tthis._draggedRange = ModelLiveRange.fromRange( draggedRange );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst blockRange = getRangeIncludingFullySelectedParents( model, blocks );\n\n\t\tif ( blocks.length > 1 ) {\n\t\t\tthis._draggedRange = ModelLiveRange.fromRange( blockRange );\n\t\t\tthis._blockMode = true;\n\t\t\t// TODO block mode for dragging from outside editor? or inline? or both?\n\t\t} else {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( blocks.length == 1 ) {\n\t\t\t\tconst touchesBlockEdges = draggedRange.start.isTouching( blockRange.start ) &&\n\t\t\t\t\tdraggedRange.end.isTouching( blockRange.end );\n\n\t\t\t\tthis._draggedRange = ModelLiveRange.fromRange( touchesBlockEdges ? blockRange : draggedRange );\n\t\t\t\tthis._blockMode = touchesBlockEdges;\n\t\t\t}\n\t\t}\n\n\t\tmodel.change( writer => writer.setSelection( this._draggedRange!.toRange() ) );\n\t}\n\n\t/**\n\t * Updates the dragged preview image.\n\t */\n\tprivate _updatePreview( {\n\t\tdataTransfer,\n\t\tdomTarget,\n\t\tclientX\n\t}: {\n\t\tdataTransfer: ViewDataTransfer;\n\t\tdomTarget: HTMLElement;\n\t\tclientX: number;\n\t} ): void {\n\t\tconst view = this.editor.editing.view;\n\t\tconst editable = view.document.selection.editableElement!;\n\t\tconst domEditable = view.domConverter.mapViewToDom( editable )!;\n\t\tconst computedStyle = global.window.getComputedStyle( domEditable );\n\n\t\tif ( !this._previewContainer ) {\n\t\t\tthis._previewContainer = createElement( global.document, 'div', {\n\t\t\t\tstyle: 'position: fixed; left: -999999px;'\n\t\t\t} );\n\n\t\t\tglobal.document.body.appendChild( this._previewContainer );\n\t\t} else if ( this._previewContainer.firstElementChild ) {\n\t\t\tthis._previewContainer.removeChild( this._previewContainer.firstElementChild );\n\t\t}\n\n\t\tconst preview = createElement( global.document, 'div' );\n\n\t\tpreview.className = 'ck ck-content ck-clipboard-preview';\n\n\t\tconst domRect = new Rect( domEditable );\n\t\tconst domEditablePaddingLeft = parseFloat( computedStyle.paddingLeft );\n\t\tconst domEditablePaddingRight = parseFloat( computedStyle.paddingRight );\n\t\tconst editableWidth = parseFloat( computedStyle.width ) - domEditablePaddingLeft - domEditablePaddingRight;\n\n\t\t// Dragging by the drag handle outside editable element.\n\t\tif ( !domEditable.contains( domTarget ) ) {\n\t\t\tif ( !env.isiOS ) {\n\t\t\t\tconst offsetLeft = domRect.left - clientX + domEditablePaddingLeft;\n\n\t\t\t\tpreview.style.width = `${ editableWidth + offsetLeft }px`;\n\t\t\t\tpreview.style.paddingLeft = `${ offsetLeft }px`;\n\t\t\t} else {\n\t\t\t\t// Without a padding as on iOS preview have a background and padding would be visible.\n\t\t\t\tpreview.style.width = `${ editableWidth }px`;\n\t\t\t\tpreview.style.backgroundColor = 'var(--ck-color-base-background)';\n\t\t\t}\n\t\t} else if ( env.isiOS ) {\n\t\t\t// Custom preview for iOS. Note that it must have some dimensions for iOS to start dragging element.\n\t\t\tpreview.style.maxWidth = `${ editableWidth }px`;\n\t\t\tpreview.style.padding = '10px';\n\t\t\tpreview.style.minWidth = '200px';\n\t\t\tpreview.style.minHeight = '20px';\n\t\t\tpreview.style.boxSizing = 'border-box';\n\t\t\tpreview.style.backgroundColor = 'var(--ck-color-base-background)';\n\t\t} else {\n\t\t\t// If domTarget is inside the editable root, browsers will display the preview correctly by themselves.\n\t\t\treturn;\n\t\t}\n\n\t\tview.domConverter.setContentOf( preview, dataTransfer.getData( 'text/html' ) );\n\n\t\tdataTransfer.setDragImage( preview, 0, 0 );\n\n\t\tthis._previewContainer.appendChild( preview );\n\t}\n}\n\n/**\n * Returns the drop effect that should be a result of dragging the content.\n * This function is handling a quirk when checking the effect in the 'drop' DOM event.\n */\nfunction getFinalDropEffect( dataTransfer: ViewDataTransfer ): ViewDataTransfer[ 'dropEffect' ] {\n\tif ( env.isGecko ) {\n\t\treturn dataTransfer.dropEffect;\n\t}\n\n\treturn [ 'all', 'copyMove' ].includes( dataTransfer.effectAllowed ) ? 'move' : 'copy';\n}\n\n/**\n * Returns a widget element that should be dragged.\n */\nfunction findDraggableWidget( target: ViewElement ): ViewElement | null {\n\t// This is directly an editable so not a widget for sure.\n\tif ( target.is( 'editableElement' ) ) {\n\t\treturn null;\n\t}\n\n\t// TODO: Let's have a isWidgetSelectionHandleDomElement() helper in ckeditor5-widget utils.\n\tif ( target.hasClass( 'ck-widget__selection-handle' ) ) {\n\t\treturn target.findAncestor( isWidget );\n\t}\n\n\t// Direct hit on a widget.\n\tif ( isWidget( target ) ) {\n\t\treturn target;\n\t}\n\n\t// Find closest ancestor that is either a widget or an editable element...\n\tconst ancestor = target.findAncestor( node => isWidget( node ) || node.is( 'editableElement' ) )!;\n\n\t// ...and if closer was the widget then enable dragging it.\n\tif ( isWidget( ancestor ) ) {\n\t\treturn ancestor;\n\t}\n\n\treturn null;\n}\n\n/**\n * Recursively checks if common parent of provided elements doesn't have any other children. If that's the case,\n * it returns range including this parent. Otherwise, it returns only the range from first to last element.\n *\n * Example:\n *\n * <blockQuote>\n *   <paragraph>[Test 1</paragraph>\n *   <paragraph>Test 2</paragraph>\n *   <paragraph>Test 3]</paragraph>\n * <blockQuote>\n *\n * Because all elements inside the `blockQuote` are selected, the range is extended to include the `blockQuote` too.\n * If only first and second paragraphs would be selected, the range would not include it.\n */\nfunction getRangeIncludingFullySelectedParents( model: Model, elements: Array<ModelElement> ): ModelRange {\n\tconst firstElement = elements[ 0 ];\n\tconst lastElement = elements[ elements.length - 1 ];\n\tconst parent = firstElement.getCommonAncestor( lastElement );\n\tconst startPosition: ModelPosition = model.createPositionBefore( firstElement );\n\tconst endPosition: ModelPosition = model.createPositionAfter( lastElement );\n\n\tif (\n\t\tparent &&\n\t\tparent.is( 'element' ) &&\n\t\t!model.schema.isLimit( parent )\n\t) {\n\t\tconst parentRange = model.createRangeOn( parent );\n\t\tconst touchesStart = startPosition.isTouching( parentRange.start );\n\t\tconst touchesEnd = endPosition.isTouching( parentRange.end );\n\n\t\tif ( touchesStart && touchesEnd ) {\n\t\t\t// Selection includes all elements in the parent.\n\t\t\treturn getRangeIncludingFullySelectedParents( model, [ parent ] );\n\t\t}\n\t}\n\n\treturn model.createRange( startPosition, endPosition );\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/**\n * @module clipboard/pasteplaintext\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type { ModelDocumentFragment, Model, ModelElement } from '@ckeditor/ckeditor5-engine';\n\nimport { ClipboardObserver } from './clipboardobserver.js';\nimport { ClipboardPipeline, type ClipboardContentInsertionEvent } from './clipboardpipeline.js';\n\n/**\n * The plugin detects the user's intention to paste plain text.\n *\n * For example, it detects the <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> keystroke.\n */\nexport class PastePlainText extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'PastePlainText' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ClipboardPipeline ]> {\n\t\treturn [ ClipboardPipeline ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst selection = model.document.selection;\n\n\t\tview.addObserver( ClipboardObserver );\n\n\t\teditor.plugins.get( ClipboardPipeline ).on<ClipboardContentInsertionEvent>( 'contentInsertion', ( evt, data ) => {\n\t\t\tif ( !isUnformattedInlineContent( data.content, model ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmodel.change( writer => {\n\t\t\t\t// Formatting attributes should be preserved.\n\t\t\t\tconst textAttributes = Array.from( selection.getAttributes() )\n\t\t\t\t\t.filter( ( [ key ] ) => model.schema.getAttributeProperties( key ).isFormatting );\n\n\t\t\t\tif ( !selection.isCollapsed ) {\n\t\t\t\t\tmodel.deleteContent( selection, { doNotAutoparagraph: true } );\n\t\t\t\t}\n\n\t\t\t\t// Also preserve other attributes if they survived the content deletion (because they were not fully selected).\n\t\t\t\t// For example linkHref is not a formatting attribute but it should be preserved if pasted text was in the middle\n\t\t\t\t// of a link.\n\t\t\t\ttextAttributes.push( ...selection.getAttributes() );\n\n\t\t\t\tconst range = writer.createRangeIn( data.content );\n\n\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\tfor ( const attribute of textAttributes ) {\n\t\t\t\t\t\tif ( model.schema.checkAttribute( item, attribute[ 0 ] ) ) {\n\t\t\t\t\t\t\twriter.setAttribute( attribute[ 0 ], attribute[ 1 ], item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n}\n\n/**\n * Returns true if specified `documentFragment` represents the unformatted inline content.\n */\nfunction isUnformattedInlineContent( documentFragment: ModelDocumentFragment, model: Model ): boolean {\n\tlet range = model.createRangeIn( documentFragment );\n\n\t// We consider three scenarios here. The document fragment may include:\n\t//\n\t// 1. Only text and inline objects. Then it could be unformatted inline content.\n\t// 2. Exactly one block element on top-level, eg. <p>Foobar</p> or <h2>Title</h2>.\n\t//    In this case, check this element content, it could be treated as unformatted inline content.\n\t// 3. More block elements or block objects, then it is not unformatted inline content.\n\t//\n\t// We will check for scenario 2. specifically, and if it happens, we will unwrap it and follow with the regular algorithm.\n\t//\n\tif ( documentFragment.childCount == 1 ) {\n\t\tconst child = documentFragment.getChild( 0 )!;\n\n\t\tif ( child.is( 'element' ) && model.schema.isBlock( child ) && !model.schema.isObject( child ) && !model.schema.isLimit( child ) ) {\n\t\t\t// Scenario 2. as described above.\n\t\t\trange = model.createRangeIn( child as ModelElement );\n\t\t}\n\t}\n\n\tfor ( const child of range.getItems() ) {\n\t\tif ( !model.schema.isInline( child ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst attributeKeys = Array.from( child.getAttributeKeys() );\n\n\t\tif ( attributeKeys.find( key => model.schema.getAttributeProperties( key ).isFormatting ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\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/**\n * @module clipboard/clipboard\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { ClipboardPipeline } from './clipboardpipeline.js';\nimport { DragDrop } from './dragdrop.js';\nimport { PastePlainText } from './pasteplaintext.js';\nimport { ClipboardMarkersUtils } from './clipboardmarkersutils.js';\n\n/**\n * The clipboard feature.\n *\n * Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n * * {@link module:clipboard/clipboardpipeline~ClipboardPipeline}\n * * {@link module:clipboard/dragdrop~DragDrop}\n * * {@link module:clipboard/pasteplaintext~PastePlainText}\n */\nexport class Clipboard extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Clipboard' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ClipboardMarkersUtils, ClipboardPipeline, DragDrop, PastePlainText ]> {\n\t\treturn [ ClipboardMarkersUtils, ClipboardPipeline, DragDrop, PastePlainText ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\t// Add the information about the keystrokes to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Copy selected content' ),\n\t\t\t\t\tkeystroke: 'CTRL+C'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Paste content' ),\n\t\t\t\t\tkeystroke: 'CTRL+V'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Paste content as plain text' ),\n\t\t\t\t\tkeystroke: 'CTRL+SHIFT+V'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { NoOperation, transformOperationSets } from \"@ckeditor/ckeditor5-engine\";\nimport { ButtonView, MenuBarMenuListItemButtonView } from \"@ckeditor/ckeditor5-ui\";\nimport { IconRedo, IconUndo } from \"@ckeditor/ckeditor5-icons\";\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 undo/basecommand\n*/\n/**\n* Base class for the undo feature commands: {@link module:undo/undocommand~UndoCommand} and {@link module:undo/redocommand~RedoCommand}.\n*/\nvar UndoRedoBaseCommand = class extends Command {\n\t/**\n\t* Stack of items stored by the command. These are pairs of:\n\t*\n\t* * {@link module:engine/model/batch~Batch batch} saved by the command,\n\t* * {@link module:engine/model/selection~ModelSelection selection} state at the moment of saving the batch.\n\t*/\n\t_stack = [];\n\t/**\n\t* Stores all batches that were created by this command.\n\t*\n\t* @internal\n\t*/\n\t_createdBatches = /* @__PURE__ */ new WeakSet();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.refresh();\n\t\tthis._isEnabledBasedOnSelection = false;\n\t\tthis.listenTo(editor.data, \"set\", (evt, data) => {\n\t\t\tdata[1] = { ...data[1] };\n\t\t\tconst options = data[1];\n\t\t\tif (!options.batchType) options.batchType = { isUndoable: false };\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(editor.data, \"set\", (evt, data) => {\n\t\t\tif (!data[1].batchType.isUndoable) this.clearStack();\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._stack.length > 0;\n\t}\n\t/**\n\t* Returns all batches created by this command.\n\t*/\n\tget createdBatches() {\n\t\treturn this._createdBatches;\n\t}\n\t/**\n\t* Stores a batch in the command, together with the selection state of the {@link module:engine/model/document~ModelDocument document}\n\t* created by the editor which this command is registered to.\n\t*\n\t* @param batch The batch to add.\n\t*/\n\taddBatch(batch) {\n\t\tconst docSelection = this.editor.model.document.selection;\n\t\tconst selection = {\n\t\t\tranges: docSelection.hasOwnRange ? Array.from(docSelection.getRanges()) : [],\n\t\t\tisBackward: docSelection.isBackward\n\t\t};\n\t\tthis._stack.push({\n\t\t\tbatch,\n\t\t\tselection\n\t\t});\n\t\tthis.refresh();\n\t}\n\t/**\n\t* Removes all items from the stack.\n\t*/\n\tclearStack() {\n\t\tthis._stack = [];\n\t\tthis.refresh();\n\t}\n\t/**\n\t* Restores the {@link module:engine/model/document~ModelDocument#selection document selection} state after a batch was undone.\n\t*\n\t* @param ranges Ranges to be restored.\n\t* @param isBackward A flag describing whether the restored range was selected forward or backward.\n\t* @param operations Operations which has been applied since selection has been stored.\n\t*/\n\t_restoreSelection(ranges, isBackward, operations) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selectionRanges = [];\n\t\tconst transformedRangeGroups = ranges.map((range) => range.getTransformedByOperations(operations));\n\t\tconst allRanges = transformedRangeGroups.flat();\n\t\tfor (const rangeGroup of transformedRangeGroups) {\n\t\t\tconst transformed = rangeGroup.filter((range) => range.root != document.graveyard).filter((range) => !isRangeContainedByAnyOtherRange(range, allRanges));\n\t\t\tif (!transformed.length) continue;\n\t\t\tnormalizeRanges(transformed);\n\t\t\tselectionRanges.push(transformed[0]);\n\t\t}\n\t\tif (selectionRanges.length) model.change((writer) => {\n\t\t\twriter.setSelection(selectionRanges, { backward: isBackward });\n\t\t});\n\t}\n\t/**\n\t* Undoes a batch by reversing that batch, transforming reversed batch and finally applying it.\n\t* This is a helper method for {@link #execute}.\n\t*\n\t* @param batchToUndo The batch to be undone.\n\t* @param undoingBatch The batch that will contain undoing changes.\n\t*/\n\t_undo(batchToUndo, undoingBatch) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tthis._createdBatches.add(undoingBatch);\n\t\tconst operationsToUndo = batchToUndo.operations.slice().filter((operation) => operation.isDocumentOperation);\n\t\toperationsToUndo.reverse();\n\t\tfor (const operationToUndo of operationsToUndo) {\n\t\t\tconst nextBaseVersion = operationToUndo.baseVersion + 1;\n\t\t\tconst historyOperations = Array.from(document.history.getOperations(nextBaseVersion));\n\t\t\tconst reversedOperations = transformOperationSets([operationToUndo.getReversed()], historyOperations, {\n\t\t\t\tuseRelations: true,\n\t\t\t\tdocument: this.editor.model.document,\n\t\t\t\tpadWithNoOps: false,\n\t\t\t\tforceWeakRemove: true\n\t\t\t}).operationsA;\n\t\t\tfor (let operation of reversedOperations) {\n\t\t\t\tconst affectedSelectable = operation.affectedSelectable;\n\t\t\t\tif (affectedSelectable && !model.canEditAt(affectedSelectable)) operation = new NoOperation(operation.baseVersion);\n\t\t\t\tundoingBatch.addOperation(operation);\n\t\t\t\tmodel.applyOperation(operation);\n\t\t\t\tdocument.history.setOperationAsUndone(operationToUndo, operation);\n\t\t\t}\n\t\t}\n\t}\n};\n/**\n* Normalizes list of ranges by joining intersecting or \"touching\" ranges.\n*\n* @param ranges Ranges to be normalized.\n*/\nfunction normalizeRanges(ranges) {\n\tranges.sort((a, b) => a.start.isBefore(b.start) ? -1 : 1);\n\tfor (let i = 1; i < ranges.length; i++) {\n\t\tconst joinedRange = ranges[i - 1].getJoined(ranges[i], true);\n\t\tif (joinedRange) {\n\t\t\ti--;\n\t\t\tranges.splice(i, 2, joinedRange);\n\t\t}\n\t}\n}\nfunction isRangeContainedByAnyOtherRange(range, ranges) {\n\treturn ranges.some((otherRange) => otherRange !== range && otherRange.containsRange(range, 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 undo/undocommand\n*/\n/**\n* The undo command stores {@link module:engine/model/batch~Batch batches} applied to the\n* {@link module:engine/model/document~ModelDocument document} and is able to undo a batch by reversing it and transforming by\n* batches from {@link module:engine/model/document~ModelDocument#history history} that happened after the reversed batch.\n*\n* The undo command also takes care of restoring the {@link module:engine/model/document~ModelDocument#selection document selection}.\n*/\nvar UndoCommand = class extends UndoRedoBaseCommand {\n\t/**\n\t* Executes the command. This method reverts a {@link module:engine/model/batch~Batch batch} added to the command's stack, transforms\n\t* and applies the reverted version on the {@link module:engine/model/document~ModelDocument document} and removes the batch from\n\t* the stack. Then, it restores the {@link module:engine/model/document~ModelDocument#selection document selection}.\n\t*\n\t* @fires execute\n\t* @fires revert\n\t* @param batch A batch that should be undone. If not set, the last added batch will be undone.\n\t*/\n\texecute(batch = null) {\n\t\tconst batchIndex = batch ? this._stack.findIndex((a) => a.batch == batch) : this._stack.length - 1;\n\t\tconst item = this._stack.splice(batchIndex, 1)[0];\n\t\tconst undoingBatch = this.editor.model.createBatch({ isUndo: true });\n\t\tthis.editor.model.enqueueChange(undoingBatch, () => {\n\t\t\tthis._undo(item.batch, undoingBatch);\n\t\t\tconst operations = this.editor.model.document.history.getOperations(item.batch.baseVersion);\n\t\t\tthis._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);\n\t\t});\n\t\tthis.fire(\"revert\", item.batch, undoingBatch);\n\t\tthis.refresh();\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 undo/redocommand\n*/\n/**\n* The redo command stores {@link module:engine/model/batch~Batch batches} that were used to undo a batch by\n* {@link module:undo/undocommand~UndoCommand}. It is able to redo a previously undone batch by reversing the undoing\n* batches created by `UndoCommand`. The reversed batch is transformed by all the batches from\n* {@link module:engine/model/document~ModelDocument#history history} that happened after the reversed undo batch.\n*\n* The redo command also takes care of restoring the {@link module:engine/model/document~ModelDocument#selection document selection}.\n*/\nvar RedoCommand = class extends UndoRedoBaseCommand {\n\t/**\n\t* Executes the command. This method reverts the last {@link module:engine/model/batch~Batch batch} added to\n\t* the command's stack, applies the reverted and transformed version on the\n\t* {@link module:engine/model/document~ModelDocument document} and removes the batch from the stack.\n\t* Then, it restores the {@link module:engine/model/document~ModelDocument#selection document selection}.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst item = this._stack.pop();\n\t\tconst redoingBatch = this.editor.model.createBatch({ isUndo: true });\n\t\tthis.editor.model.enqueueChange(redoingBatch, () => {\n\t\t\tconst nextBaseVersion = item.batch.operations[item.batch.operations.length - 1].baseVersion + 1;\n\t\t\tconst operations = this.editor.model.document.history.getOperations(nextBaseVersion);\n\t\t\tthis._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);\n\t\t\tthis._undo(item.batch, redoingBatch);\n\t\t});\n\t\tthis.fire(\"revert\", item.batch, redoingBatch);\n\t\tthis.refresh();\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 undo/undoediting\n*/\n/**\n* The undo engine feature.\n*\n* It introduces the `'undo'` and `'redo'` commands to the editor.\n*/\nvar UndoEditing = class extends Plugin {\n\t/**\n\t* The command that manages the undo {@link module:engine/model/batch~Batch batches} stack (history).\n\t* Created and registered during the {@link #init feature initialization}.\n\t*/\n\t_undoCommand;\n\t/**\n\t* The command that manages the redo {@link module:engine/model/batch~Batch batches} stack (history).\n\t* Created and registered during the {@link #init feature initialization}.\n\t*/\n\t_redoCommand;\n\t/**\n\t* Keeps track of which batches were registered in undo.\n\t*/\n\t_batchRegistry = /* @__PURE__ */ new WeakSet();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"UndoEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tthis._undoCommand = new UndoCommand(editor);\n\t\tthis._redoCommand = new RedoCommand(editor);\n\t\teditor.commands.add(\"undo\", this._undoCommand);\n\t\teditor.commands.add(\"redo\", this._redoCommand);\n\t\tthis.listenTo(editor.model, \"applyOperation\", (evt, args) => {\n\t\t\tconst operation = args[0];\n\t\t\tif (!operation.isDocumentOperation) return;\n\t\t\tconst batch = operation.batch;\n\t\t\tconst isRedoBatch = this._redoCommand.createdBatches.has(batch);\n\t\t\tconst isUndoBatch = this._undoCommand.createdBatches.has(batch);\n\t\t\tif (this._batchRegistry.has(batch)) return;\n\t\t\tthis._batchRegistry.add(batch);\n\t\t\tif (!batch.isUndoable) return;\n\t\t\tif (isRedoBatch) this._undoCommand.addBatch(batch);\n\t\t\telse if (!isUndoBatch) {\n\t\t\t\tthis._undoCommand.addBatch(batch);\n\t\t\t\tthis._redoCommand.clearStack();\n\t\t\t}\n\t\t}, { priority: \"highest\" });\n\t\tthis.listenTo(this._undoCommand, \"revert\", (evt, undoneBatch, undoingBatch) => {\n\t\t\tthis._redoCommand.addBatch(undoingBatch);\n\t\t});\n\t\teditor.keystrokes.set(\"CTRL+Z\", \"undo\");\n\t\teditor.keystrokes.set(\"CTRL+Y\", \"redo\");\n\t\teditor.keystrokes.set(\"CTRL+SHIFT+Z\", \"redo\");\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Undo\"),\n\t\t\tkeystroke: \"CTRL+Z\"\n\t\t}, {\n\t\t\tlabel: t(\"Redo\"),\n\t\t\tkeystroke: [[\"CTRL+Y\"], [\"CTRL+SHIFT+Z\"]]\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 undo/undoui\n*/\n/**\n* The undo UI feature. It introduces the `'undo'` and `'redo'` buttons to the editor.\n*/\nvar UndoUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"UndoUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = editor.t;\n\t\tconst localizedUndoIcon = locale.uiLanguageDirection == \"ltr\" ? IconUndo : IconRedo;\n\t\tconst localizedRedoIcon = locale.uiLanguageDirection == \"ltr\" ? IconRedo : IconUndo;\n\t\tthis._addButtonsToFactory(\"undo\", t(\"Undo\"), \"CTRL+Z\", localizedUndoIcon);\n\t\tthis._addButtonsToFactory(\"redo\", t(\"Redo\"), \"CTRL+Y\", localizedRedoIcon);\n\t}\n\t/**\n\t* Creates a button for the specified command.\n\t*\n\t* @param name Command name.\n\t* @param label Button label.\n\t* @param keystroke Command keystroke.\n\t* @param Icon Source of the icon.\n\t*/\n\t_addButtonsToFactory(name, label, keystroke, Icon) {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(name, () => {\n\t\t\tconst buttonView = this._createButton(ButtonView, name, label, keystroke, Icon);\n\t\t\tbuttonView.set({ tooltip: true });\n\t\t\treturn buttonView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:\" + name, () => {\n\t\t\treturn this._createButton(MenuBarMenuListItemButtonView, name, label, keystroke, Icon);\n\t\t});\n\t}\n\t/**\n\t* TODO\n\t*/\n\t_createButton(ButtonClass, name, label, keystroke, Icon) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get(name);\n\t\tconst view = new ButtonClass(locale);\n\t\tview.set({\n\t\t\tlabel,\n\t\t\ticon: Icon,\n\t\t\tkeystroke\n\t\t});\n\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\teditor.execute(name);\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn view;\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 undo/undo\n*/\n/**\n* The undo feature.\n*\n* This is a \"glue\" plugin which loads the {@link module:undo/undoediting~UndoEditing undo editing feature}\n* and the {@link module:undo/undoui~UndoUI undo UI feature}.\n*\n* Below is an explanation of the undo mechanism working together with {@link module:engine/model/history~History History}:\n*\n* Whenever an {@link module:engine/model/operation/operation~Operation operation} is applied to the\n* {@link module:engine/model/document~ModelDocument document}, it is saved to `History` as is.\n* The {@link module:engine/model/batch~Batch batch} that owns that operation is also saved, in\n* {@link module:undo/undocommand~UndoCommand}, together with the selection that was present in the document before the\n* operation was applied. A batch is saved instead of the operation because changes are undone batch-by-batch, not operation-by-operation\n* and a batch is seen as one undo step.\n*\n* After changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:\n*\n* ```\n*    History                            Undo stack\n* ==============             ==================================\n* [operation A1]                      [  batch A  ]\n* [operation B1]                      [  batch B  ]\n* [operation B2]                      [  batch C  ]\n* [operation C1]\n* [operation C2]\n* [operation B3]\n* [operation C3]\n* ```\n*\n* Where operations starting with the same letter are from same batch.\n*\n* Undoing a batch means that a set of operations which will reverse the effects of that batch needs to be generated.\n* For example, if a batch added several letters, undoing the batch should remove them. It is important to apply undoing\n* operations in the reversed order, so if a batch has operation `X`, `Y`, `Z`, reversed operations `Zr`, `Yr` and `Xr`\n* need to be applied. Otherwise reversed operation `Xr` would operate on a wrong document state, because operation `X`\n* does not know that operations `Y` and `Z` happened.\n*\n* After operations from an undone batch got {@link module:engine/model/operation/operation~Operation#getReversed reversed},\n* one needs to make sure if they are ready to be applied. In the scenario above, operation `C3` is the last operation and `C3r`\n* bases on up-to-date document state, so it can be applied to the document.\n*\n* ```\n*      History                             Undo stack\n* =================             ==================================\n* [ operation A1  ]                      [  batch A  ]\n* [ operation B1  ]                      [  batch B  ]\n* [ operation B2  ]             [   processing undoing batch C   ]\n* [ operation C1  ]\n* [ operation C2  ]\n* [ operation B3  ]\n* [ operation C3  ]\n* [ operation C3r ]\n* ```\n*\n* Next is operation `C2`, reversed to `C2r`. `C2r` bases on `C2`, so it bases on the wrong document state. It needs to be\n* transformed by operations from history that happened after it, so it \"knows\" about them. Let us assume that `C2' = C2r * B3 * C3 * C3r`,\n* where `*` means \"transformed by\". Rest of operations from that batch are processed in the same fashion.\n*\n* ```\n*      History                             Undo stack                                      Redo stack\n* =================             ==================================             ==================================\n* [ operation A1  ]                      [  batch A  ]                                    [ batch Cr ]\n* [ operation B1  ]                      [  batch B  ]\n* [ operation B2  ]\n* [ operation C1  ]\n* [ operation C2  ]\n* [ operation B3  ]\n* [ operation C3  ]\n* [ operation C3r ]\n* [ operation C2' ]\n* [ operation C1' ]\n* ```\n*\n* Selective undo works on the same basis, however, instead of undoing the last batch in the undo stack, any batch can be undone.\n* The same algorithm applies: operations from a batch (i.e. `A1`) are reversed and then transformed by operations stored in history.\n*\n* Redo also is very similar to undo. It has its own stack that is filled with undoing (reversed batches). Operations from\n* the batch that is re-done are reversed-back, transformed in proper order and applied to the document.\n*\n* ```\n*      History                             Undo stack                                      Redo stack\n* =================             ==================================             ==================================\n* [ operation A1  ]                      [  batch A  ]\n* [ operation B1  ]                      [  batch B  ]\n* [ operation B2  ]                      [ batch Crr ]\n* [ operation C1  ]\n* [ operation C2  ]\n* [ operation B3  ]\n* [ operation C3  ]\n* [ operation C3r ]\n* [ operation C2' ]\n* [ operation C1' ]\n* [ operation C1'r]\n* [ operation C2'r]\n* [ operation C3rr]\n* ```\n*/\nvar Undo = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [UndoEditing, UndoUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Undo\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { RedoCommand, Undo, UndoCommand, UndoEditing, UndoRedoBaseCommand, UndoUI };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module undo/basecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport {\n\ttransformOperationSets,\n\ttype Batch,\n\ttype Operation,\n\ttype DataControllerSetEvent,\n\ttype ModelRange,\n\tNoOperation\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Base class for the undo feature commands: {@link module:undo/undocommand~UndoCommand} and {@link module:undo/redocommand~RedoCommand}.\n */\nexport abstract class UndoRedoBaseCommand extends Command {\n\t/**\n\t * Stack of items stored by the command. These are pairs of:\n\t *\n\t * * {@link module:engine/model/batch~Batch batch} saved by the command,\n\t * * {@link module:engine/model/selection~ModelSelection selection} state at the moment of saving the batch.\n\t */\n\tprotected _stack: Array<{ batch: Batch; selection: { ranges: Array<ModelRange>; isBackward: boolean } }> = [];\n\n\t/**\n\t * Stores all batches that were created by this command.\n\t *\n\t * @internal\n\t */\n\tpublic _createdBatches: WeakSet<Batch> = new WeakSet<Batch>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Refresh state, so the command is inactive right after initialization.\n\t\tthis.refresh();\n\n\t\t// This command should not depend on selection change.\n\t\tthis._isEnabledBasedOnSelection = false;\n\n\t\t// Set the transparent batch for the `editor.data.set()` call if the\n\t\t// batch type is not set already.\n\t\tthis.listenTo<DataControllerSetEvent>( editor.data, 'set', ( evt, data ) => {\n\t\t\t// Create a shallow copy of the options to not change the original args.\n\t\t\t// And make sure that an object is assigned to data[ 1 ].\n\t\t\tdata[ 1 ] = { ...data[ 1 ] };\n\n\t\t\tconst options = data[ 1 ];\n\n\t\t\t// If batch type is not set, default to non-undoable batch.\n\t\t\tif ( !options.batchType ) {\n\t\t\t\toptions.batchType = { isUndoable: false };\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// Clear the stack for the `transparent` batches.\n\t\tthis.listenTo<DataControllerSetEvent>( editor.data, 'set', ( evt, data ) => {\n\t\t\t// We can assume that the object exists and it has a `batchType` property.\n\t\t\t// It was ensured with a higher priority listener before.\n\t\t\tconst options = data[ 1 ]!;\n\n\t\t\tif ( !options.batchType!.isUndoable ) {\n\t\t\t\tthis.clearStack();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._stack.length > 0;\n\t}\n\n\t/**\n\t * Returns all batches created by this command.\n\t */\n\tpublic get createdBatches(): WeakSet<Batch> {\n\t\treturn this._createdBatches;\n\t}\n\n\t/**\n\t * Stores a batch in the command, together with the selection state of the {@link module:engine/model/document~ModelDocument document}\n\t * created by the editor which this command is registered to.\n\t *\n\t * @param batch The batch to add.\n\t */\n\tpublic addBatch( batch: Batch ): void {\n\t\tconst docSelection = this.editor.model.document.selection;\n\n\t\tconst selection = {\n\t\t\tranges: docSelection.hasOwnRange ? Array.from( docSelection.getRanges() ) : [],\n\t\t\tisBackward: docSelection.isBackward\n\t\t};\n\n\t\tthis._stack.push( { batch, selection } );\n\t\tthis.refresh();\n\t}\n\n\t/**\n\t * Removes all items from the stack.\n\t */\n\tpublic clearStack(): void {\n\t\tthis._stack = [];\n\t\tthis.refresh();\n\t}\n\n\t/**\n\t * Restores the {@link module:engine/model/document~ModelDocument#selection document selection} state after a batch was undone.\n\t *\n\t * @param ranges Ranges to be restored.\n\t * @param isBackward A flag describing whether the restored range was selected forward or backward.\n\t * @param operations Operations which has been applied since selection has been stored.\n\t */\n\tprotected _restoreSelection(\n\t\tranges: Array<ModelRange>,\n\t\tisBackward: boolean,\n\t\toperations: Array<Operation>\n\t): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\t// This will keep the transformed selection ranges.\n\t\tconst selectionRanges: Array<ModelRange> = [];\n\n\t\t// Transform all ranges from the restored selection.\n\t\tconst transformedRangeGroups = ranges.map( range => range.getTransformedByOperations( operations ) );\n\t\tconst allRanges = transformedRangeGroups.flat();\n\n\t\tfor ( const rangeGroup of transformedRangeGroups ) {\n\t\t\t// While transforming there could appear ranges that are contained by other ranges, we shall ignore them.\n\t\t\tconst transformed = rangeGroup\n\t\t\t\t.filter( range => range.root != document.graveyard )\n\t\t\t\t.filter( range => !isRangeContainedByAnyOtherRange( range, allRanges ) );\n\n\t\t\t// All the transformed ranges ended up in graveyard.\n\t\t\tif ( !transformed.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// After the range got transformed, we have an array of ranges. Some of those\n\t\t\t// ranges may be \"touching\" -- they can be next to each other and could be merged.\n\t\t\tnormalizeRanges( transformed );\n\n\t\t\t// For each `range` from `ranges`, we take only one transformed range.\n\t\t\t// This is because we want to prevent situation where single-range selection\n\t\t\t// got transformed to multi-range selection.\n\t\t\tselectionRanges.push( transformed[ 0 ] );\n\t\t}\n\n\t\t// @if CK_DEBUG_ENGINE // console.log( `Restored selection by undo: ${ selectionRanges.join( ', ' ) }` );\n\n\t\t// `selectionRanges` may be empty if all ranges ended up in graveyard. If that is the case, do not restore selection.\n\t\tif ( selectionRanges.length ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( selectionRanges, { backward: isBackward } );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Undoes a batch by reversing that batch, transforming reversed batch and finally applying it.\n\t * This is a helper method for {@link #execute}.\n\t *\n\t * @param batchToUndo The batch to be undone.\n\t * @param undoingBatch The batch that will contain undoing changes.\n\t */\n\tprotected _undo( batchToUndo: Batch, undoingBatch: Batch ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\t// All changes done by the command execution will be saved as one batch.\n\t\tthis._createdBatches.add( undoingBatch );\n\n\t\tconst operationsToUndo = batchToUndo.operations.slice().filter( operation => operation.isDocumentOperation );\n\t\toperationsToUndo.reverse();\n\n\t\t// We will process each operation from `batchToUndo`, in reverse order. If there were operations A, B and C in undone batch,\n\t\t// we need to revert them in reverse order, so first C' (reversed C), then B', then A'.\n\t\tfor ( const operationToUndo of operationsToUndo ) {\n\t\t\tconst nextBaseVersion = operationToUndo.baseVersion! + 1;\n\t\t\tconst historyOperations = Array.from( document.history.getOperations( nextBaseVersion ) );\n\n\t\t\tconst transformedSets = transformOperationSets(\n\t\t\t\t[ operationToUndo.getReversed() ],\n\t\t\t\thistoryOperations,\n\t\t\t\t{\n\t\t\t\t\tuseRelations: true,\n\t\t\t\t\tdocument: this.editor.model.document,\n\t\t\t\t\tpadWithNoOps: false,\n\t\t\t\t\tforceWeakRemove: true\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst reversedOperations = transformedSets.operationsA;\n\n\t\t\t// After reversed operation has been transformed by all history operations, apply it.\n\t\t\tfor ( let operation of reversedOperations ) {\n\t\t\t\t// Do not apply any operation on non-editable space.\n\t\t\t\tconst affectedSelectable = operation.affectedSelectable;\n\n\t\t\t\tif ( affectedSelectable && !model.canEditAt( affectedSelectable ) ) {\n\t\t\t\t\toperation = new NoOperation( operation.baseVersion );\n\t\t\t\t}\n\n\t\t\t\t// Before applying, add the operation to the `undoingBatch`.\n\t\t\t\tundoingBatch.addOperation( operation );\n\t\t\t\tmodel.applyOperation( operation );\n\n\t\t\t\tdocument.history.setOperationAsUndone( operationToUndo, operation );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Normalizes list of ranges by joining intersecting or \"touching\" ranges.\n *\n * @param ranges Ranges to be normalized.\n */\nfunction normalizeRanges( ranges: Array<ModelRange> ): void {\n\tranges.sort( ( a, b ) => a.start.isBefore( b.start ) ? -1 : 1 );\n\n\tfor ( let i = 1; i < ranges.length; i++ ) {\n\t\tconst previousRange = ranges[ i - 1 ];\n\t\tconst joinedRange = previousRange.getJoined( ranges[ i ], true );\n\n\t\tif ( joinedRange ) {\n\t\t\t// Replace the ranges on the list with the new joined range.\n\t\t\ti--;\n\t\t\tranges.splice( i, 2, joinedRange );\n\t\t}\n\t}\n}\n\nfunction isRangeContainedByAnyOtherRange( range: ModelRange, ranges: Array<ModelRange> ): boolean {\n\treturn ranges.some( otherRange => otherRange !== range && otherRange.containsRange( range, true ) );\n}\n\n/**\n * Fired when execution of the undo or redo command reverts some batch.\n *\n * @eventName ~UndoRedoBaseCommand#revert\n */\nexport type UndoRedoBaseCommandRevertEvent = {\n\tname: 'revert';\n\targs: [ batch: Batch, undoingBatch: Batch ];\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/**\n * @module undo/undocommand\n */\n\nimport { UndoRedoBaseCommand, type UndoRedoBaseCommandRevertEvent } from './basecommand.js';\nimport type { Batch } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The undo command stores {@link module:engine/model/batch~Batch batches} applied to the\n * {@link module:engine/model/document~ModelDocument document} and is able to undo a batch by reversing it and transforming by\n * batches from {@link module:engine/model/document~ModelDocument#history history} that happened after the reversed batch.\n *\n * The undo command also takes care of restoring the {@link module:engine/model/document~ModelDocument#selection document selection}.\n */\nexport class UndoCommand extends UndoRedoBaseCommand {\n\t/**\n\t * Executes the command. This method reverts a {@link module:engine/model/batch~Batch batch} added to the command's stack, transforms\n\t * and applies the reverted version on the {@link module:engine/model/document~ModelDocument document} and removes the batch from\n\t * the stack. Then, it restores the {@link module:engine/model/document~ModelDocument#selection document selection}.\n\t *\n\t * @fires execute\n\t * @fires revert\n\t * @param batch A batch that should be undone. If not set, the last added batch will be undone.\n\t */\n\tpublic override execute( batch: Batch | null = null ): void {\n\t\t// If batch is not given, set `batchIndex` to the last index in command stack.\n\t\tconst batchIndex = batch ? this._stack.findIndex( a => a.batch == batch ) : this._stack.length - 1;\n\n\t\tconst item = this._stack.splice( batchIndex, 1 )[ 0 ];\n\t\tconst undoingBatch = this.editor.model.createBatch( { isUndo: true } );\n\n\t\t// All changes have to be done in one `enqueueChange` callback so other listeners will not\n\t\t// step between consecutive operations, or won't do changes to the document before selection is properly restored.\n\t\tthis.editor.model.enqueueChange( undoingBatch, () => {\n\t\t\tthis._undo( item.batch, undoingBatch );\n\n\t\t\tconst operations = this.editor.model.document.history.getOperations( item.batch.baseVersion! );\n\t\t\tthis._restoreSelection( item.selection.ranges, item.selection.isBackward, operations );\n\t\t} );\n\n\t\t// Firing `revert` event after the change block to make sure that it includes all changes from post-fixers\n\t\t// and make sure that the selection is \"stabilized\" (the selection range is saved after undo is executed and then\n\t\t// restored on redo, so it is important that the selection range is saved after post-fixers are done).\n\t\tthis.fire<UndoRedoBaseCommandRevertEvent>( 'revert', item.batch, undoingBatch );\n\n\t\tthis.refresh();\n\t}\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/**\n * @module undo/redocommand\n */\n\nimport { UndoRedoBaseCommand, type UndoRedoBaseCommandRevertEvent } from './basecommand.js';\n\n/**\n * The redo command stores {@link module:engine/model/batch~Batch batches} that were used to undo a batch by\n * {@link module:undo/undocommand~UndoCommand}. It is able to redo a previously undone batch by reversing the undoing\n * batches created by `UndoCommand`. The reversed batch is transformed by all the batches from\n * {@link module:engine/model/document~ModelDocument#history history} that happened after the reversed undo batch.\n *\n * The redo command also takes care of restoring the {@link module:engine/model/document~ModelDocument#selection document selection}.\n */\nexport class RedoCommand extends UndoRedoBaseCommand {\n\t/**\n\t * Executes the command. This method reverts the last {@link module:engine/model/batch~Batch batch} added to\n\t * the command's stack, applies the reverted and transformed version on the\n\t * {@link module:engine/model/document~ModelDocument document} and removes the batch from the stack.\n\t * Then, it restores the {@link module:engine/model/document~ModelDocument#selection document selection}.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst item = this._stack.pop()!;\n\t\tconst redoingBatch = this.editor.model.createBatch( { isUndo: true } );\n\n\t\t// All changes have to be done in one `enqueueChange` callback so other listeners will not step between consecutive\n\t\t// operations, or won't do changes to the document before selection is properly restored.\n\t\tthis.editor.model.enqueueChange( redoingBatch, () => {\n\t\t\tconst lastOperation = item.batch.operations[ item.batch.operations.length - 1 ];\n\t\t\tconst nextBaseVersion = lastOperation.baseVersion! + 1;\n\t\t\tconst operations = this.editor.model.document.history.getOperations( nextBaseVersion );\n\n\t\t\tthis._restoreSelection( item.selection.ranges, item.selection.isBackward, operations );\n\t\t\tthis._undo( item.batch, redoingBatch );\n\t\t} );\n\n\t\t// Firing `revert` event after the change block to make sure that it includes all changes from post-fixers\n\t\t// and make sure that the selection is \"stabilized\" (the selection range is saved after undo is executed and then\n\t\t// restored on redo, so it is important that the selection range is saved after post-fixers are done).\n\t\tthis.fire<UndoRedoBaseCommandRevertEvent>( 'revert', item.batch, redoingBatch );\n\n\t\tthis.refresh();\n\t}\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/**\n * @module undo/undoediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\nimport { UndoCommand } from './undocommand.js';\nimport { RedoCommand } from './redocommand.js';\nimport { type UndoRedoBaseCommandRevertEvent } from './basecommand.js';\n\nimport type {\n\tBatch,\n\tModelApplyOperationEvent\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * The undo engine feature.\n *\n * It introduces the `'undo'` and `'redo'` commands to the editor.\n */\nexport class UndoEditing extends Plugin {\n\t/**\n\t * The command that manages the undo {@link module:engine/model/batch~Batch batches} stack (history).\n\t * Created and registered during the {@link #init feature initialization}.\n\t */\n\tprivate _undoCommand!: UndoCommand;\n\n\t/**\n\t * The command that manages the redo {@link module:engine/model/batch~Batch batches} stack (history).\n\t * Created and registered during the {@link #init feature initialization}.\n\t */\n\tprivate _redoCommand!: RedoCommand;\n\n\t/**\n\t * Keeps track of which batches were registered in undo.\n\t */\n\tprivate _batchRegistry = new WeakSet<Batch>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'UndoEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\t// Create commands.\n\t\tthis._undoCommand = new UndoCommand( editor );\n\t\tthis._redoCommand = new RedoCommand( editor );\n\n\t\t// Register command to the editor.\n\t\teditor.commands.add( 'undo', this._undoCommand );\n\t\teditor.commands.add( 'redo', this._redoCommand );\n\n\t\tthis.listenTo<ModelApplyOperationEvent>( editor.model, 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\t// Do not register batch if the operation is not a document operation.\n\t\t\t// This prevents from creating empty undo steps, where all operations where non-document operations.\n\t\t\t// Non-document operations creates and alters content in detached tree fragments (for example, document fragments).\n\t\t\t// Most of time this is preparing data before it is inserted into actual tree (for example during copy & paste).\n\t\t\t// Such operations should not be reversed.\n\t\t\tif ( !operation.isDocumentOperation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst batch = operation.batch!;\n\n\t\t\tconst isRedoBatch = this._redoCommand.createdBatches.has( batch );\n\t\t\tconst isUndoBatch = this._undoCommand.createdBatches.has( batch );\n\t\t\tconst wasProcessed = this._batchRegistry.has( batch );\n\n\t\t\t// Skip the batch if it was already processed.\n\t\t\tif ( wasProcessed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the batch to the registry so it will not be processed again.\n\t\t\tthis._batchRegistry.add( batch );\n\n\t\t\tif ( !batch.isUndoable ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isRedoBatch ) {\n\t\t\t\t// If this batch comes from `redoCommand`, add it to the `undoCommand` stack.\n\t\t\t\tthis._undoCommand.addBatch( batch );\n\t\t\t} else if ( !isUndoBatch ) {\n\t\t\t\t// If the batch comes neither  from `redoCommand` nor from `undoCommand` then it is a new, regular batch.\n\t\t\t\t// Add the batch to the `undoCommand` stack and clear the `redoCommand` stack.\n\t\t\t\tthis._undoCommand.addBatch( batch );\n\t\t\t\tthis._redoCommand.clearStack();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.listenTo<UndoRedoBaseCommandRevertEvent>( this._undoCommand, 'revert', ( evt, undoneBatch, undoingBatch ) => {\n\t\t\tthis._redoCommand.addBatch( undoingBatch );\n\t\t} );\n\n\t\teditor.keystrokes.set( 'CTRL+Z', 'undo' );\n\t\teditor.keystrokes.set( 'CTRL+Y', 'redo' );\n\t\teditor.keystrokes.set( 'CTRL+SHIFT+Z', 'redo' );\n\n\t\t// Add the information about the keystrokes to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Undo' ),\n\t\t\t\t\tkeystroke: 'CTRL+Z'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Redo' ),\n\t\t\t\t\tkeystroke: [ [ 'CTRL+Y' ], [ 'CTRL+SHIFT+Z' ] ]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module undo/undoui\n */\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { IconUndo, IconRedo } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The undo UI feature. It introduces the `'undo'` and `'redo'` buttons to the editor.\n */\nexport class UndoUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'UndoUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = editor.t;\n\n\t\tconst localizedUndoIcon = locale.uiLanguageDirection == 'ltr' ? IconUndo : IconRedo;\n\t\tconst localizedRedoIcon = locale.uiLanguageDirection == 'ltr' ? IconRedo : IconUndo;\n\n\t\tthis._addButtonsToFactory( 'undo', t( 'Undo' ), 'CTRL+Z', localizedUndoIcon );\n\t\tthis._addButtonsToFactory( 'redo', t( 'Redo' ), 'CTRL+Y', localizedRedoIcon );\n\t}\n\n\t/**\n\t * Creates a button for the specified command.\n\t *\n\t * @param name Command name.\n\t * @param label Button label.\n\t * @param keystroke Command keystroke.\n\t * @param Icon Source of the icon.\n\t */\n\tprivate _addButtonsToFactory( name: 'undo' | 'redo', label: string, keystroke: string, Icon: string ) {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( name, () => {\n\t\t\tconst buttonView = this._createButton( ButtonView, name, label, keystroke, Icon );\n\n\t\t\tbuttonView.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn buttonView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:' + name, () => {\n\t\t\treturn this._createButton( MenuBarMenuListItemButtonView, name, label, keystroke, Icon );\n\t\t} );\n\t}\n\n\t/**\n\t * TODO\n\t */\n\tprivate _createButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>(\n\t\tButtonClass: T,\n\t\tname: 'undo' | 'redo',\n\t\tlabel: string,\n\t\tkeystroke: string,\n\t\tIcon: string\n\t): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get( name )!;\n\t\tconst view = new ButtonClass( locale ) as InstanceType<T>;\n\n\t\tview.set( {\n\t\t\tlabel,\n\t\t\ticon: Icon,\n\t\t\tkeystroke\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\tthis.listenTo( view, 'execute', () => {\n\t\t\teditor.execute( name );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn view;\n\t}\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/**\n * @module undo/undo\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { UndoEditing } from './undoediting.js';\nimport { UndoUI } from './undoui.js';\n\n/**\n * The undo feature.\n *\n * This is a \"glue\" plugin which loads the {@link module:undo/undoediting~UndoEditing undo editing feature}\n * and the {@link module:undo/undoui~UndoUI undo UI feature}.\n *\n * Below is an explanation of the undo mechanism working together with {@link module:engine/model/history~History History}:\n *\n * Whenever an {@link module:engine/model/operation/operation~Operation operation} is applied to the\n * {@link module:engine/model/document~ModelDocument document}, it is saved to `History` as is.\n * The {@link module:engine/model/batch~Batch batch} that owns that operation is also saved, in\n * {@link module:undo/undocommand~UndoCommand}, together with the selection that was present in the document before the\n * operation was applied. A batch is saved instead of the operation because changes are undone batch-by-batch, not operation-by-operation\n * and a batch is seen as one undo step.\n *\n * After changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:\n *\n * ```\n *    History                            Undo stack\n * ==============             ==================================\n * [operation A1]                      [  batch A  ]\n * [operation B1]                      [  batch B  ]\n * [operation B2]                      [  batch C  ]\n * [operation C1]\n * [operation C2]\n * [operation B3]\n * [operation C3]\n * ```\n *\n * Where operations starting with the same letter are from same batch.\n *\n * Undoing a batch means that a set of operations which will reverse the effects of that batch needs to be generated.\n * For example, if a batch added several letters, undoing the batch should remove them. It is important to apply undoing\n * operations in the reversed order, so if a batch has operation `X`, `Y`, `Z`, reversed operations `Zr`, `Yr` and `Xr`\n * need to be applied. Otherwise reversed operation `Xr` would operate on a wrong document state, because operation `X`\n * does not know that operations `Y` and `Z` happened.\n *\n * After operations from an undone batch got {@link module:engine/model/operation/operation~Operation#getReversed reversed},\n * one needs to make sure if they are ready to be applied. In the scenario above, operation `C3` is the last operation and `C3r`\n * bases on up-to-date document state, so it can be applied to the document.\n *\n * ```\n *      History                             Undo stack\n * =================             ==================================\n * [ operation A1  ]                      [  batch A  ]\n * [ operation B1  ]                      [  batch B  ]\n * [ operation B2  ]             [   processing undoing batch C   ]\n * [ operation C1  ]\n * [ operation C2  ]\n * [ operation B3  ]\n * [ operation C3  ]\n * [ operation C3r ]\n * ```\n *\n * Next is operation `C2`, reversed to `C2r`. `C2r` bases on `C2`, so it bases on the wrong document state. It needs to be\n * transformed by operations from history that happened after it, so it \"knows\" about them. Let us assume that `C2' = C2r * B3 * C3 * C3r`,\n * where `*` means \"transformed by\". Rest of operations from that batch are processed in the same fashion.\n *\n * ```\n *      History                             Undo stack                                      Redo stack\n * =================             ==================================             ==================================\n * [ operation A1  ]                      [  batch A  ]                                    [ batch Cr ]\n * [ operation B1  ]                      [  batch B  ]\n * [ operation B2  ]\n * [ operation C1  ]\n * [ operation C2  ]\n * [ operation B3  ]\n * [ operation C3  ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * ```\n *\n * Selective undo works on the same basis, however, instead of undoing the last batch in the undo stack, any batch can be undone.\n * The same algorithm applies: operations from a batch (i.e. `A1`) are reversed and then transformed by operations stored in history.\n *\n * Redo also is very similar to undo. It has its own stack that is filled with undoing (reversed batches). Operations from\n * the batch that is re-done are reversed-back, transformed in proper order and applied to the document.\n *\n * ```\n *      History                             Undo stack                                      Redo stack\n * =================             ==================================             ==================================\n * [ operation A1  ]                      [  batch A  ]\n * [ operation B1  ]                      [  batch B  ]\n * [ operation B2  ]                      [ batch Crr ]\n * [ operation C1  ]\n * [ operation C2  ]\n * [ operation B3  ]\n * [ operation C3  ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * [ operation C1'r]\n * [ operation C2'r]\n * [ operation C3rr]\n * ```\n */\nexport class Undo extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ UndoEditing, UndoUI ]> {\n\t\treturn [ UndoEditing, UndoUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Undo' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Clipboard, ClipboardPipeline } from \"@ckeditor/ckeditor5-clipboard\";\nimport { ModelElement, ModelLivePosition, ModelLiveRange, Observer, ViewUpcastWriter, _isParagraphableModelNode, enableViewPlaceholder } from \"@ckeditor/ckeditor5-engine\";\nimport { Undo } from \"@ckeditor/ckeditor5-undo\";\nimport { Delete } from \"@ckeditor/ckeditor5-typing\";\nimport { CKEditorError, Collection, DomEmitterMixin, FocusTracker, KeystrokeHandler, Rect, _tryCastDimensionsToUnit, _tryParseDimensionWithUnit, env, first, global, logWarning, toArray } from \"@ckeditor/ckeditor5-utils\";\nimport { Widget, WidgetResize, WidgetToolbarRepository, calculateResizeHostAncestorWidth, findOptimalInsertionRange, isWidget, toWidget, toWidgetEditable } from \"@ckeditor/ckeditor5-widget\";\nimport { BalloonPanelView, ButtonView, CollapsibleView, ContextualBalloon, CssTransitionDisablerMixin, Dialog, DropdownButtonView, FileDialogButtonView, FocusCycler, FormHeaderView, FormRowView, LabeledFieldView, MenuBarMenuListItemButtonView, MenuBarMenuListItemFileDialogButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, Notification, SplitButtonView, UIModel, View, ViewCollection, addListToDropdown, addToolbarToDropdown, clickOutsideHandler, createDropdown, createLabeledInputNumber, createLabeledInputText, submitHandler } from \"@ckeditor/ckeditor5-ui\";\nimport { IconCaption, IconImage, IconImageUpload, IconImageUrl, IconObjectCenter, IconObjectFullWidth, IconObjectInline, IconObjectInlineLeft, IconObjectInlineRight, IconObjectLeft, IconObjectRight, IconObjectSizeCustom, IconObjectSizeFull, IconObjectSizeLarge, IconObjectSizeMedium, IconObjectSizeSmall, IconPreviousArrow, IconTextAlternative } from \"@ckeditor/ckeditor5-icons\";\nimport { FileRepository } from \"@ckeditor/ckeditor5-upload\";\nimport { identity, isEqual, isObject } 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* @module image/image/utils\n*/\n/**\n* Creates a view element representing the inline image.\n*\n* ```html\n* <span class=\"image-inline\"><img></img></span>\n* ```\n*\n* Note that `alt` and `src` attributes are converted separately, so they are not included.\n*\n* @internal\n*/\nfunction createInlineImageViewElement(writer) {\n\treturn writer.createContainerElement(\"span\", { class: \"image-inline\" }, writer.createEmptyElement(\"img\"));\n}\n/**\n* Creates a view element representing the block image.\n*\n* ```html\n* <figure class=\"image\"><img></img></figure>\n* ```\n*\n* Note that `alt` and `src` attributes are converted separately, so they are not included.\n*\n* @internal\n*/\nfunction createBlockImageViewElement(writer) {\n\treturn writer.createContainerElement(\"figure\", { class: \"image\" }, [writer.createEmptyElement(\"img\"), writer.createSlot(\"children\")]);\n}\n/**\n* A function returning a `MatcherPattern` for a particular type of View images.\n*\n* @deprecated\n* @internal\n* @param matchImageType The type of created image.\n*/\nfunction getImgViewElementMatcher(editor, matchImageType) {\n\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\tconst areBothImagePluginsLoaded = editor.plugins.has(\"ImageInlineEditing\") && editor.plugins.has(\"ImageBlockEditing\");\n\treturn (element) => {\n\t\tif (!imageUtils.isInlineImageView(element)) return null;\n\t\tif (!areBothImagePluginsLoaded) return getPositiveMatchPattern(element);\n\t\tif (getViewImageType(element, imageUtils) !== matchImageType) return null;\n\t\treturn getPositiveMatchPattern(element);\n\t};\n\tfunction getPositiveMatchPattern(element) {\n\t\tconst pattern = { name: true };\n\t\tif (element.hasAttribute(\"src\")) pattern.attributes = [\"src\"];\n\t\treturn pattern;\n\t}\n}\n/**\n* Resolves the model image type (`'imageBlock'` or `'imageInline'`) that a given `<img>` view element represents,\n* based purely on its view structure.\n*\n* An `<img>` is treated as a block image when it has a `display: block` style or is wrapped in a block image figure\n* (`<figure class=\"image\">`, also `<figure class=\"image\"><a>...</a></figure>` added by the `LinkImage` plugin).\n* Otherwise it is treated as an inline image.\n*\n* Note that this only reflects the view representation - it does not check whether the resolved type is allowed by the\n* schema at the insertion position.\n*\n* @internal\n* @param element The `<img>` view element to resolve the type for.\n* @param imageUtils The `ImageUtils` plugin instance.\n*/\nfunction getViewImageType(element, imageUtils) {\n\treturn element.getStyle(\"display\") == \"block\" || element.findAncestor(imageUtils.isBlockImageView) ? \"imageBlock\" : \"imageInline\";\n}\n/**\n* Checks whether the given image type can be placed at the specified position - either directly (or after hoisting\n* to an allowed ancestor) or, for inline images, wrapped in an auto-created paragraph.\n*\n* This is the predicate that decides whether a block image may land at a position or must degrade to an inline image\n* (for example, inside an `$inlineRoot` that disallows block content) and, symmetrically, whether an inline image may\n* become a block image. `isParagraphable()` is always `false` for `imageBlock` (a block object never fits in a\n* paragraph), so the auto-paragraph relaxation only applies to the inline target.\n*\n* @internal\n* @param schema The model schema to check against.\n* @param position The position at which the image type should be placed.\n* @param imageType The image type to check.\n*/\nfunction isImageTypePlaceable(schema, position, imageType) {\n\treturn !!schema.findAllowedParent(position, imageType) || _isParagraphableModelNode(position, imageType, schema);\n}\n/**\n* Considering the current model selection, it returns the name of the model image element\n* (`'imageBlock'` or `'imageInline'`) that will make most sense from the UX perspective if a new\n* image was inserted (also: uploaded, dropped, pasted) at that selection.\n*\n* The assumption is that inserting images into empty blocks or on other block widgets should\n* produce block images. Inline images should be inserted in other cases, e.g. in paragraphs\n* that already contain some text.\n*\n* @internal\n*/\nfunction determineImageTypeForInsertionAtSelection(schema, selection) {\n\tconst firstBlock = first(selection.getSelectedBlocks());\n\tif (!firstBlock || schema.isObject(firstBlock)) return \"imageBlock\";\n\tif (firstBlock.isEmpty && firstBlock.name != \"listItem\") return \"imageBlock\";\n\treturn \"imageInline\";\n}\n/**\n* Returns parsed value of the size, but only if it contains unit: px.\n*\n* @internal\n*/\nfunction getSizeValueIfInPx(size) {\n\tif (size && size.endsWith(\"px\")) return parseInt(size);\n\treturn null;\n}\n/**\n* Returns true if both styles (width and height) are set.\n*\n* If both image styles: width & height are set, they will override the image width & height attributes in the\n* browser. In this case, the image looks the same as if these styles were applied to attributes instead of styles.\n* That's why we can upcast these styles to width & height attributes instead of resizedWidth and resizedHeight.\n*\n* @internal\n*/\nfunction widthAndHeightStylesAreBothSet(viewElement) {\n\tconst widthStyle = getSizeValueIfInPx(viewElement.getStyle(\"width\"));\n\tconst heightStyle = getSizeValueIfInPx(viewElement.getStyle(\"height\"));\n\treturn !!(widthStyle && heightStyle);\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 IMAGE_WIDGETS_CLASSES_MATCH_REGEXP = /^(image|image-inline)$/;\n/**\n* A set of helpers related to images.\n*/\nvar ImageUtils = class extends Plugin {\n\t/**\n\t* DOM Emitter.\n\t*/\n\t_domEmitter = new (DomEmitterMixin())();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageUtils\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Checks if the provided model element is an `image` or `imageInline`.\n\t*/\n\tisImage(modelElement) {\n\t\treturn this.isInlineImage(modelElement) || this.isBlockImage(modelElement);\n\t}\n\t/**\n\t* Checks if the provided view element represents an inline image.\n\t*\n\t* Also, see {@link module:image/imageutils~ImageUtils#isImageWidget}.\n\t*/\n\tisInlineImageView(element) {\n\t\treturn !!element && element.is(\"element\", \"img\");\n\t}\n\t/**\n\t* Checks if the provided view element represents a block image.\n\t*\n\t* Also, see {@link module:image/imageutils~ImageUtils#isImageWidget}.\n\t*/\n\tisBlockImageView(element) {\n\t\treturn !!element && element.is(\"element\", \"figure\") && element.hasClass(\"image\");\n\t}\n\t/**\n\t* Handles inserting single file. This method unifies image insertion using {@link module:widget/utils~findOptimalInsertionRange}\n\t* method.\n\t*\n\t* ```ts\n\t* const imageUtils = editor.plugins.get( 'ImageUtils' );\n\t*\n\t* imageUtils.insertImage( { src: 'path/to/image.jpg' } );\n\t* ```\n\t*\n\t* @param attributes Attributes of the inserted image.\n\t* This method filters out the attributes which are disallowed by the {@link module:engine/model/schema~ModelSchema}.\n\t* @param selectable Place to insert the image. If not specified,\n\t* the {@link module:widget/utils~findOptimalInsertionRange} logic will be applied for the block images\n\t* and `model.document.selection` for the inline images.\n\t*\n\t* **Note**: If `selectable` is passed, this helper will not be able to set selection attributes (such as `linkHref`)\n\t* and apply them to the new image. In this case, make sure all selection attributes are passed in `attributes`.\n\t*\n\t* @param imageType Image type of inserted image. If not specified,\n\t* it will be determined automatically depending of editor config or place of the insertion.\n\t* @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t* The default is `true`.\n\t* @return The inserted model image element.\n\t*/\n\tinsertImage(attributes = {}, selectable = null, imageType = null, options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst determinedImageType = determineImageTypeForInsertion(editor, selectable || selection, imageType);\n\t\tattributes = {\n\t\t\t...Object.fromEntries(selection.getAttributes()),\n\t\t\t...attributes\n\t\t};\n\t\tfor (const attributeName in attributes) if (!model.schema.checkAttribute(determinedImageType, attributeName)) delete attributes[attributeName];\n\t\treturn model.change((writer) => {\n\t\t\tconst { setImageSizes = true } = options;\n\t\t\tconst imageElement = writer.createElement(determinedImageType, attributes);\n\t\t\tmodel.insertObject(imageElement, selectable, null, {\n\t\t\t\tsetSelection: \"on\",\n\t\t\t\tfindOptimalPosition: !selectable && determinedImageType != \"imageInline\" ? \"auto\" : void 0\n\t\t\t});\n\t\t\tif (imageElement.parent) {\n\t\t\t\tif (setImageSizes) this.setImageNaturalSizeAttributes(imageElement);\n\t\t\t\treturn imageElement;\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n\t/**\n\t* Reads original image sizes and sets them as `width` and `height`.\n\t*\n\t* The `src` attribute may not be available if the user is using an upload adapter. In such a case,\n\t* this method is called again after the upload process is complete and the `src` attribute is available.\n\t*/\n\tsetImageNaturalSizeAttributes(imageElement) {\n\t\tconst src = imageElement.getAttribute(\"src\");\n\t\tif (!src) return;\n\t\tif (imageElement.getAttribute(\"width\") || imageElement.getAttribute(\"height\")) return;\n\t\tthis.editor.model.change((writer) => {\n\t\t\tconst img = new global.window.Image();\n\t\t\tthis._domEmitter.listenTo(img, \"load\", () => {\n\t\t\t\tif (!imageElement.getAttribute(\"width\") && !imageElement.getAttribute(\"height\")) this.editor.model.enqueueChange(writer.batch, (writer) => {\n\t\t\t\t\twriter.setAttribute(\"width\", img.naturalWidth, imageElement);\n\t\t\t\t\twriter.setAttribute(\"height\", img.naturalHeight, imageElement);\n\t\t\t\t});\n\t\t\t\tthis._domEmitter.stopListening(img, \"load\");\n\t\t\t});\n\t\t\timg.src = src;\n\t\t});\n\t}\n\t/**\n\t* Returns an image widget editing view element if one is selected or is among the selection's ancestors.\n\t*/\n\tgetClosestSelectedImageWidget(selection) {\n\t\tconst selectionPosition = selection.getFirstPosition();\n\t\tif (!selectionPosition) return null;\n\t\tconst viewElement = selection.getSelectedElement();\n\t\tif (viewElement && this.isImageWidget(viewElement)) return viewElement;\n\t\tlet parent = selectionPosition.parent;\n\t\twhile (parent) {\n\t\t\tif (parent.is(\"element\") && this.isImageWidget(parent)) return parent;\n\t\t\tparent = parent.parent;\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Returns a image model element if one is selected or is among the selection's ancestors.\n\t*/\n\tgetClosestSelectedImageElement(selection) {\n\t\tconst selectedElement = selection.getSelectedElement();\n\t\treturn this.isImage(selectedElement) ? selectedElement : selection.getFirstPosition().findAncestor(\"imageBlock\");\n\t}\n\t/**\n\t* Returns an image widget editing view based on the passed image view.\n\t*/\n\tgetImageWidgetFromImageView(imageView) {\n\t\treturn imageView.findAncestor({ classes: IMAGE_WIDGETS_CLASSES_MATCH_REGEXP });\n\t}\n\t/**\n\t* Checks if image can be inserted at current model selection.\n\t*\n\t* @internal\n\t*/\n\tisImageAllowed() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\treturn isImageAllowedInParent(this.editor, selection) && isNotInsideImage(selection);\n\t}\n\t/**\n\t* Converts a given {@link module:engine/view/element~ViewElement} to an image widget:\n\t* * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property} allowing to recognize the image widget\n\t* element.\n\t* * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n\t*\n\t* @param writer An instance of the view writer.\n\t* @param label The element's label. It will be concatenated with the image `alt` attribute if one is present.\n\t*/\n\ttoImageWidget(viewElement, writer, label) {\n\t\twriter.setCustomProperty(\"image\", true, viewElement);\n\t\tconst labelCreator = () => {\n\t\t\tconst altText = this.findViewImgElement(viewElement).getAttribute(\"alt\");\n\t\t\treturn altText ? `${altText} ${label}` : label;\n\t\t};\n\t\treturn toWidget(viewElement, writer, { label: labelCreator });\n\t}\n\t/**\n\t* Checks if a given view element is an image widget.\n\t*/\n\tisImageWidget(viewElement) {\n\t\treturn !!viewElement.getCustomProperty(\"image\") && isWidget(viewElement);\n\t}\n\t/**\n\t* Checks if the provided model element is an `image`.\n\t*/\n\tisBlockImage(modelElement) {\n\t\treturn !!modelElement && modelElement.is(\"element\", \"imageBlock\");\n\t}\n\t/**\n\t* Checks if the provided model element is an `imageInline`.\n\t*/\n\tisInlineImage(modelElement) {\n\t\treturn !!modelElement && modelElement.is(\"element\", \"imageInline\");\n\t}\n\t/**\n\t* Get the view `<img>` from another view element, e.g. a widget (`<figure class=\"image\">`), a link (`<a>`).\n\t*\n\t* The `<img>` can be located deep in other elements, so this helper performs a deep tree search.\n\t*/\n\tfindViewImgElement(figureView) {\n\t\tif (this.isInlineImageView(figureView)) return figureView;\n\t\tconst editingView = this.editor.editing.view;\n\t\tfor (const { item } of editingView.createRangeIn(figureView)) if (this.isInlineImageView(item)) return item;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._domEmitter.stopListening();\n\t\treturn super.destroy();\n\t}\n};\n/**\n* Checks if image is allowed by schema in optimal insertion parent.\n*/\nfunction isImageAllowedInParent(editor, selection) {\n\tif (determineImageTypeForInsertion(editor, selection, null) == \"imageBlock\") return isBlockImageAllowedAtInsertion(editor.model, selection);\n\treturn editor.model.schema.checkChild(selection.focus, \"imageInline\");\n}\n/**\n* Checks if selection is not placed inside an image (e.g. its caption).\n*/\nfunction isNotInsideImage(selection) {\n\treturn [...selection.focus.getAncestors()].every((ancestor) => !ancestor.is(\"element\", \"imageBlock\"));\n}\n/**\n* Returns a node that will be used to insert image with `model.insertContent`.\n*/\nfunction getInsertImageParent(selection, model) {\n\tconst parent = findOptimalInsertionRange(selection, model).start.parent;\n\tif (parent.isEmpty && !parent.is(\"rootElement\")) return parent.parent;\n\treturn parent;\n}\n/**\n* Checks whether a block image is allowed by the schema at the optimal insertion point for the given selectable\n* (e.g. it is not allowed inside `$inlineRoot` or any other inline-only container).\n*/\nfunction isBlockImageAllowedAtInsertion(model, selectable) {\n\tconst insertionParent = getInsertImageParent(selectable.is(\"position\") ? model.createSelection(selectable) : selectable, model);\n\treturn model.schema.checkChild(insertionParent, \"imageBlock\");\n}\n/**\n* Determine image element type name depending on editor config or place of insertion.\n*\n* @param imageType Image element type name. Used to force return of provided element name,\n* but only if there is proper plugin enabled.\n*/\nfunction determineImageTypeForInsertion(editor, selectable, imageType) {\n\tconst schema = editor.model.schema;\n\tconst configImageInsertType = editor.config.get(\"image.insert.type\");\n\tif (!editor.plugins.has(\"ImageBlockEditing\")) return \"imageInline\";\n\tif (!editor.plugins.has(\"ImageInlineEditing\")) return \"imageBlock\";\n\tif (imageType) return imageType;\n\tif (!isBlockImageAllowedAtInsertion(editor.model, selectable)) return \"imageInline\";\n\tif (configImageInsertType === \"inline\") return \"imageInline\";\n\tif (configImageInsertType !== \"auto\") return \"imageBlock\";\n\tif (selectable.is(\"selection\")) return determineImageTypeForInsertionAtSelection(schema, selectable);\n\treturn schema.checkChild(selectable, \"imageInline\") ? \"imageInline\" : \"imageBlock\";\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 image/autoimage\n*/\nconst IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\\/\\/)?[\\w-]+\\.[\\w.~:/[\\]@!$&'()*+,;=%-]+/.source + /\\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source + /(\\?[\\w.~:/[\\]@!$&'()*+,;=%-]*)?/.source + /(#[\\w.~:/[\\]@!$&'()*+,;=%-]*)?$/.source));\n/**\n* The auto-image plugin. It recognizes image links in the pasted content and embeds\n* them shortly after they are injected into the document.\n*/\nvar AutoImage = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tClipboard,\n\t\t\tImageUtils,\n\t\t\tUndo,\n\t\t\tDelete\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AutoImage\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t* cleaning of the timeout.\n\t*/\n\t_timeoutId;\n\t/**\n\t* The position where the `<imageBlock>` element will be inserted after the timeout,\n\t* determined each time a new content is pasted into the document.\n\t*/\n\t_positionToInsert;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._timeoutId = null;\n\t\tthis._positionToInsert = null;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\t\tconst clipboardPipeline = editor.plugins.get(\"ClipboardPipeline\");\n\t\tthis.listenTo(clipboardPipeline, \"inputTransformation\", () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange();\n\t\t\tconst leftLivePosition = ModelLivePosition.fromPosition(firstRange.start);\n\t\t\tleftLivePosition.stickiness = \"toPrevious\";\n\t\t\tconst rightLivePosition = ModelLivePosition.fromPosition(firstRange.end);\n\t\t\trightLivePosition.stickiness = \"toNext\";\n\t\t\tmodelDocument.once(\"change:data\", () => {\n\t\t\t\tthis._embedImageBetweenPositions(leftLivePosition, rightLivePosition);\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: \"high\" });\n\t\t});\n\t\teditor.commands.get(\"undo\").on(\"execute\", () => {\n\t\t\tif (this._timeoutId) {\n\t\t\t\tglobal.window.clearTimeout(this._timeoutId);\n\t\t\t\tthis._positionToInsert.detach();\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Analyzes the part of the document between provided positions in search for a URL representing an image.\n\t* When the URL is found, it is automatically converted into an image.\n\t*\n\t* @param leftPosition Left position of the selection.\n\t* @param rightPosition Right position of the selection.\n\t*/\n\t_embedImageBetweenPositions(leftPosition, rightPosition) {\n\t\tconst editor = this.editor;\n\t\tconst urlRange = new ModelLiveRange(leftPosition, rightPosition);\n\t\tconst walker = urlRange.getWalker({ ignoreElementEnd: true });\n\t\tconst selectionAttributes = Object.fromEntries(editor.model.document.selection.getAttributes());\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tlet src = \"\";\n\t\tfor (const node of walker) if (node.item.is(\"$textProxy\")) src += node.item.data;\n\t\tsrc = src.trim();\n\t\tif (!src.match(IMAGE_URL_REGEXP)) {\n\t\t\turlRange.detach();\n\t\t\treturn;\n\t\t}\n\t\tthis._positionToInsert = ModelLivePosition.fromPosition(leftPosition);\n\t\tthis._timeoutId = setTimeout(() => {\n\t\t\tif (!editor.commands.get(\"insertImage\").isEnabled) {\n\t\t\t\turlRange.detach();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\teditor.model.change((writer) => {\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\twriter.remove(urlRange);\n\t\t\t\turlRange.detach();\n\t\t\t\tlet insertionPosition;\n\t\t\t\tif (this._positionToInsert.root.rootName !== \"$graveyard\") insertionPosition = this._positionToInsert.toPosition();\n\t\t\t\timageUtils.insertImage({\n\t\t\t\t\t...selectionAttributes,\n\t\t\t\t\tsrc\n\t\t\t\t}, insertionPosition);\n\t\t\t\tthis._positionToInsert.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t});\n\t\t\teditor.plugins.get(\"Delete\").requestUndoOnBackspace();\n\t\t}, 100);\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 image/imagetextalternative/imagetextalternativecommand\n*/\n/**\n* The image text alternative command. It is used to change the `alt` attribute of `<imageBlock>` and `<imageInline>` model elements.\n*/\nvar ImageTextAlternativeCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst element = this.editor.plugins.get(\"ImageUtils\").getClosestSelectedImageElement(this.editor.model.document.selection);\n\t\tthis.isEnabled = !!element;\n\t\tif (this.isEnabled && element.hasAttribute(\"alt\")) this.value = element.getAttribute(\"alt\");\n\t\telse this.value = false;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options\n\t* @param options.newValue The new value of the `alt` attribute to set.\n\t*/\n\texecute(options) {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst model = editor.model;\n\t\tconst imageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n\t\tmodel.change((writer) => {\n\t\t\twriter.setAttribute(\"alt\", options.newValue, imageElement);\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 image/imagetextalternative/imagetextalternativeediting\n*/\n/**\n* The image text alternative editing plugin.\n*\n* Registers the `'imageTextAlternative'` command.\n*/\nvar ImageTextAlternativeEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageTextAlternativeEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.editor.commands.add(\"imageTextAlternative\", new ImageTextAlternativeCommand(this.editor));\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 image/imagetextalternative/ui/textalternativeformview\n*/\n/**\n* The TextAlternativeFormView class.\n*\n* @internal\n*/\nvar TextAlternativeFormView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the form.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* An input with a label.\n\t*/\n\tlabeledInput;\n\t/**\n\t* The Back button view displayed in the header.\n\t*/\n\tbackButtonView;\n\t/**\n\t* A button used to submit the form.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* A collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of views which can be focused in the form.\n\t*/\n\t_focusables;\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\t\tthis.labeledInput = this._createLabeledInputView();\n\t\tthis.children = this.createCollection([this._createHeaderView()]);\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tchildren: [this.labeledInput, this.saveButtonView],\n\t\t\tclass: [\"ck-form__row_with-submit\", \"ck-form__row_large-top-padding\"]\n\t\t}));\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis.fire(\"cancel\");\n\t\t\tcancel();\n\t\t});\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-form\",\n\t\t\t\t\t\"ck-text-alternative-form\",\n\t\t\t\t\t\"ck-responsive-form\"\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\t[\n\t\t\tthis.backButtonView,\n\t\t\tthis.labeledInput,\n\t\t\tthis.saveButtonView\n\t\t].forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis.focusTracker.add(v.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Creates a back button view that cancels the form.\n\t*/\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn backButton;\n\t}\n\t/**\n\t* Creates a save button view that text alternative the image.\n\t*/\n\t_createSaveButton() {\n\t\tconst t = this.locale.t;\n\t\tconst saveButton = new ButtonView(this.locale);\n\t\tsaveButton.set({\n\t\t\tlabel: t(\"Save\"),\n\t\t\twithText: true,\n\t\t\ttype: \"submit\",\n\t\t\tclass: \"ck-button-action ck-button-bold\"\n\t\t});\n\t\treturn saveButton;\n\t}\n\t/**\n\t* Creates a header view for the form.\n\t*/\n\t_createHeaderView() {\n\t\tconst t = this.locale.t;\n\t\tconst header = new FormHeaderView(this.locale, { label: t(\"Text Alternative\") });\n\t\theader.children.add(this.backButtonView, 0);\n\t\treturn header;\n\t}\n\t/**\n\t* Creates an input with a label.\n\t*\n\t* @returns Labeled field view instance.\n\t*/\n\t_createLabeledInputView() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n\t\tlabeledInput.label = t(\"Text alternative\");\n\t\tlabeledInput.class = \"ck-labeled-field-view_full-width\";\n\t\treturn labeledInput;\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* A helper utility that positions the\n* {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance\n* with respect to the image in the editor content, if one is selected.\n*\n* @param editor The editor instance.\n* @internal\n*/\nfunction repositionContextualBalloon(editor) {\n\tconst balloon = editor.plugins.get(\"ContextualBalloon\");\n\tif (editor.plugins.get(\"ImageUtils\").getClosestSelectedImageWidget(editor.editing.view.document.selection)) {\n\t\tconst position = getBalloonPositionData(editor);\n\t\tballoon.updatePosition(position);\n\t}\n}\n/**\n* Returns the positioning options that control the geometry of the\n* {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n* to the selected element in the editor content.\n*\n* @param editor The editor instance.\n* @internal\n*/\nfunction getBalloonPositionData(editor) {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\treturn {\n\t\ttarget: editingView.domConverter.mapViewToDom(imageUtils.getClosestSelectedImageWidget(editingView.document.selection)),\n\t\tpositions: [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\tdefaultPositions.viewportStickyNorth\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 image/imagetextalternative/imagetextalternativeui\n*/\n/**\n* The image text alternative UI plugin.\n*\n* The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n*/\nvar ImageTextAlternativeUI = class extends Plugin {\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* A form containing a textarea and buttons, used to change the `alt` text value.\n\t*/\n\t_form;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageTextAlternativeUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis._createButton();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this._form) this._form.destroy();\n\t}\n\t/**\n\t* Creates a button showing the balloon panel for changing the image text alternative and\n\t* registers it in the editor {@link module:ui/componentfactory~ComponentFactory ComponentFactory}.\n\t*/\n\t_createButton() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\teditor.ui.componentFactory.add(\"imageTextAlternative\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"imageTextAlternative\");\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tview.set({\n\t\t\t\tlabel: t(\"Change image text alternative\"),\n\t\t\t\ticon: IconTextAlternative,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\t\tview.bind(\"isOn\").to(command, \"value\", (value) => !!value);\n\t\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\t\tthis._showForm();\n\t\t\t});\n\t\t\treturn view;\n\t\t});\n\t}\n\t/**\n\t* Creates the {@link module:image/imagetextalternative/ui/textalternativeformview~TextAlternativeFormView}\n\t* form.\n\t*/\n\t_createForm() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tthis._balloon = this.editor.plugins.get(\"ContextualBalloon\");\n\t\tthis._form = new (CssTransitionDisablerMixin(TextAlternativeFormView))(editor.locale);\n\t\tthis._form.render();\n\t\tthis.listenTo(this._form, \"submit\", () => {\n\t\t\teditor.execute(\"imageTextAlternative\", { newValue: this._form.labeledInput.fieldView.element.value });\n\t\t\tthis._hideForm(true);\n\t\t});\n\t\tthis.listenTo(this._form, \"cancel\", () => {\n\t\t\tthis._hideForm(true);\n\t\t});\n\t\tthis.listenTo(editor.ui, \"update\", () => {\n\t\t\tif (!imageUtils.getClosestSelectedImageWidget(viewDocument.selection)) this._hideForm(true);\n\t\t\telse if (this._isVisible) repositionContextualBalloon(editor);\n\t\t});\n\t\tclickOutsideHandler({\n\t\t\temitter: this._form,\n\t\t\tactivator: () => this._isVisible,\n\t\t\tcontextElements: () => [this._balloon.view.element],\n\t\t\tcallback: () => this._hideForm()\n\t\t});\n\t}\n\t/**\n\t* Shows the {@link #_form} in the {@link #_balloon}.\n\t*/\n\t_showForm() {\n\t\tif (this._isVisible) return;\n\t\tif (!this._form) this._createForm();\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get(\"imageTextAlternative\");\n\t\tconst labeledInput = this._form.labeledInput;\n\t\tthis._form.disableCssTransitions();\n\t\tif (!this._isInBalloon) this._balloon.add({\n\t\t\tview: this._form,\n\t\t\tposition: getBalloonPositionData(editor)\n\t\t});\n\t\tlabeledInput.fieldView.value = labeledInput.fieldView.element.value = command.value || \"\";\n\t\tthis._form.labeledInput.fieldView.select();\n\t\tthis._form.enableCssTransitions();\n\t}\n\t/**\n\t* Removes the {@link #_form} from the {@link #_balloon}.\n\t*\n\t* @param focusEditable Controls whether the editing view is focused afterwards.\n\t*/\n\t_hideForm(focusEditable = false) {\n\t\tif (!this._isInBalloon) return;\n\t\tif (this._form.focusTracker.isFocused) this._form.saveButtonView.focus();\n\t\tthis._balloon.remove(this._form);\n\t\tif (focusEditable) this.editor.editing.view.focus();\n\t}\n\t/**\n\t* Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t*/\n\tget _isVisible() {\n\t\treturn !!this._balloon && this._balloon.visibleView === this._form;\n\t}\n\t/**\n\t* Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t*/\n\tget _isInBalloon() {\n\t\treturn !!this._balloon && this._balloon.hasView(this._form);\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 image/imagetextalternative\n*/\n/**\n* The image text alternative plugin.\n*\n* For a detailed overview, check the {@glink features/images/images-styles image styles} documentation.\n*\n* This is a \"glue\" plugin which loads the\n*  {@link module:image/imagetextalternative/imagetextalternativeediting~ImageTextAlternativeEditing}\n* and {@link module:image/imagetextalternative/imagetextalternativeui~ImageTextAlternativeUI} plugins.\n*/\nvar ImageTextAlternative = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageTextAlternativeEditing, ImageTextAlternativeUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageTextAlternative\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* Returns a function that converts the image view representation:\n*\n* ```html\n* <figure class=\"image\"><img src=\"...\" alt=\"...\"></img></figure>\n* ```\n*\n* to the model representation:\n*\n* ```html\n* <imageBlock src=\"...\" alt=\"...\"></imageBlock>\n* ```\n*\n* The entire content of the `<figure>` element except the first `<img>` is being converted as children\n* of the `<imageBlock>` model element.\n*\n* @internal\n*/\nfunction upcastImageFigure(imageUtils) {\n\tconst converter = (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.test(data.viewItem, {\n\t\t\tname: true,\n\t\t\tclasses: \"image\"\n\t\t})) return;\n\t\tconst viewImage = imageUtils.findViewImgElement(data.viewItem);\n\t\tif (!viewImage || !conversionApi.consumable.test(viewImage, { name: true })) return;\n\t\tif (!isImageTypePlaceable(conversionApi.schema, data.modelCursor, \"imageBlock\")) return;\n\t\tconversionApi.consumable.consume(data.viewItem, {\n\t\t\tname: true,\n\t\t\tclasses: \"image\"\n\t\t});\n\t\tconst conversionResult = conversionApi.convertItem(viewImage, data.modelCursor);\n\t\t/* istanbul ignore if: defensive guard for the `ModelRange | null` return type -- @preserve */\n\t\tif (!conversionResult.modelRange) {\n\t\t\tconversionApi.consumable.revert(data.viewItem, {\n\t\t\t\tname: true,\n\t\t\t\tclasses: \"image\"\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst modelImage = first(conversionResult.modelRange.getItems());\n\t\tif (!modelImage) {\n\t\t\tconversionApi.consumable.revert(data.viewItem, {\n\t\t\t\tname: true,\n\t\t\t\tclasses: \"image\"\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconversionApi.convertChildren(data.viewItem, modelImage);\n\t\tconversionApi.updateConversionResult(modelImage, data);\n\t};\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:figure\", converter);\n\t};\n}\n/**\n* Returns a function that upcasts an `<img>` element to either an `imageBlock` or an `imageInline` model element.\n*\n* The image type is first determined from the view structure (see {@link module:image/image/utils~getViewImageType}):\n* an `<img>` wrapped in a `<figure class=\"image\">` or styled with `display: block` becomes an `imageBlock`, otherwise\n* an `imageInline`.\n*\n* That structural type is then verified against the schema at the insertion position. If it cannot be placed there -\n* neither directly (or after hoisting to an allowed ancestor) nor wrapped in an auto-created paragraph - the converter\n* falls back to `matchImageType`. This is what allows a block image to degrade to an inline image inside an inline root\n* (and, symmetrically, an inline image to become a block image in a context that only accepts block images) instead of\n* being dropped.\n*\n* Both `ImageBlockEditing` and `ImageInlineEditing` register this converter, each passing the type it falls back to.\n* When only one of them is loaded, that single type is always produced.\n*\n* @internal\n* @param matchImageType The image type to fall back to when the type resolved from the view cannot be placed at the\n* insertion position.\n* @param imageUtils The `ImageUtils` plugin instance.\n*/\nfunction upcastImg(matchImageType, imageUtils) {\n\tconst converter = (evt, data, conversionApi) => {\n\t\tlet imageType = getViewImageType(data.viewItem, imageUtils);\n\t\tconst attributes = data.viewItem.hasAttribute(\"src\") ? { src: data.viewItem.getAttribute(\"src\") } : void 0;\n\t\tconst consumables = {\n\t\t\tname: true,\n\t\t\tattributes: Object.keys(attributes || {})\n\t\t};\n\t\tif (!conversionApi.consumable.test(data.viewItem, consumables)) return;\n\t\tif (imageType != matchImageType && !isImageTypePlaceable(conversionApi.schema, data.modelCursor, imageType)) imageType = matchImageType;\n\t\tconst modelElement = conversionApi.writer.createElement(imageType, attributes);\n\t\tif (!conversionApi.safeInsert(modelElement, data.modelCursor)) return;\n\t\tconversionApi.consumable.consume(data.viewItem, consumables);\n\t\tconversionApi.convertChildren(data.viewItem, modelElement);\n\t\tconversionApi.updateConversionResult(modelElement, data);\n\t};\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:img\", converter);\n\t};\n}\n/**\n* Returns a function that converts the image view representation:\n*\n* ```html\n* <picture><source ... /><source ... />...<img ... /></picture>\n* ```\n*\n* to the model representation as the `sources` attribute:\n*\n* ```html\n* <image[Block|Inline] ... sources=\"...\"></image[Block|Inline]>\n* ```\n*\n* @internal\n*/\nfunction upcastPicture(imageUtils) {\n\tconst sourceAttributeNames = [\n\t\t\"srcset\",\n\t\t\"media\",\n\t\t\"type\",\n\t\t\"sizes\"\n\t];\n\tconst converter = (evt, data, conversionApi) => {\n\t\tconst pictureViewElement = data.viewItem;\n\t\tif (!conversionApi.consumable.test(pictureViewElement, { name: true })) return;\n\t\tconst sources = /* @__PURE__ */ new Map();\n\t\tfor (const childSourceElement of pictureViewElement.getChildren()) if (childSourceElement.is(\"element\", \"source\")) {\n\t\t\tconst attributes = {};\n\t\t\tfor (const name of sourceAttributeNames) if (childSourceElement.hasAttribute(name)) {\n\t\t\t\tif (conversionApi.consumable.test(childSourceElement, { attributes: name })) attributes[name] = childSourceElement.getAttribute(name);\n\t\t\t}\n\t\t\tif (Object.keys(attributes).length) sources.set(childSourceElement, attributes);\n\t\t}\n\t\tconst imgViewElement = imageUtils.findViewImgElement(pictureViewElement);\n\t\tif (!imgViewElement) return;\n\t\tlet modelImage = data.modelCursor.parent;\n\t\tif (!modelImage.is(\"element\", \"imageBlock\")) {\n\t\t\tconst conversionResult = conversionApi.convertItem(imgViewElement, data.modelCursor);\n\t\t\tdata.modelRange = conversionResult.modelRange;\n\t\t\tdata.modelCursor = conversionResult.modelCursor;\n\t\t\t/* istanbul ignore if: defensive guard for the `ModelRange | null` return type -- @preserve */\n\t\t\tif (!conversionResult.modelRange) return;\n\t\t\tmodelImage = first(conversionResult.modelRange.getItems());\n\t\t\tif (!modelImage) return;\n\t\t}\n\t\tconversionApi.consumable.consume(pictureViewElement, { name: true });\n\t\tfor (const [sourceElement, attributes] of sources) conversionApi.consumable.consume(sourceElement, { attributes: Object.keys(attributes) });\n\t\tif (sources.size) conversionApi.writer.setAttribute(\"sources\", Array.from(sources.values()), modelImage);\n\t\tconversionApi.convertChildren(pictureViewElement, modelImage);\n\t};\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:picture\", converter);\n\t};\n}\n/**\n* Converter used to convert the `srcset` model image attribute to the `srcset` and `sizes` attributes in the view.\n*\n* @internal\n* @param imageType The type of the image.\n*/\nfunction downcastSrcsetAttribute(imageUtils, imageType) {\n\tconst converter = (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst writer = conversionApi.writer;\n\t\tconst element = conversionApi.mapper.toViewElement(data.item);\n\t\tconst img = imageUtils.findViewImgElement(element);\n\t\tif (data.attributeNewValue === null) {\n\t\t\twriter.removeAttribute(\"srcset\", img);\n\t\t\twriter.removeAttribute(\"sizes\", img);\n\t\t} else if (data.attributeNewValue) {\n\t\t\twriter.setAttribute(\"srcset\", data.attributeNewValue, img);\n\t\t\twriter.setAttribute(\"sizes\", \"100vw\", img);\n\t\t}\n\t};\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`attribute:srcset:${imageType}`, converter);\n\t};\n}\n/**\n* Converts the `source` model attribute to the `<picture><source /><source />...<img /></picture>`\n* view structure.\n*\n* @internal\n*/\nfunction downcastSourcesAttribute(imageUtils) {\n\tconst converter = (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst element = conversionApi.mapper.toViewElement(data.item);\n\t\tconst imgElement = imageUtils.findViewImgElement(element);\n\t\tconst attributeNewValue = data.attributeNewValue;\n\t\tif (attributeNewValue && attributeNewValue.length) {\n\t\t\tconst attributeElements = [];\n\t\t\tlet viewElement = imgElement.parent;\n\t\t\twhile (viewElement && viewElement.is(\"attributeElement\")) {\n\t\t\t\tconst parentElement = viewElement.parent;\n\t\t\t\tviewWriter.unwrap(viewWriter.createRangeOn(imgElement), viewElement);\n\t\t\t\tattributeElements.unshift(viewElement);\n\t\t\t\tviewElement = parentElement;\n\t\t\t}\n\t\t\tconst hasPictureElement = imgElement.parent.is(\"element\", \"picture\");\n\t\t\tconst pictureElement = hasPictureElement ? imgElement.parent : viewWriter.createContainerElement(\"picture\", null);\n\t\t\tif (!hasPictureElement) viewWriter.insert(viewWriter.createPositionBefore(imgElement), pictureElement);\n\t\t\tviewWriter.remove(viewWriter.createRangeIn(pictureElement));\n\t\t\tviewWriter.insert(viewWriter.createPositionAt(pictureElement, \"end\"), attributeNewValue.map((sourceAttributes) => {\n\t\t\t\treturn viewWriter.createEmptyElement(\"source\", sourceAttributes);\n\t\t\t}));\n\t\t\tviewWriter.move(viewWriter.createRangeOn(imgElement), viewWriter.createPositionAt(pictureElement, \"end\"));\n\t\t\tfor (const attributeElement of attributeElements) viewWriter.wrap(viewWriter.createRangeOn(pictureElement), attributeElement);\n\t\t} else if (imgElement.parent.is(\"element\", \"picture\")) {\n\t\t\tconst pictureElement = imgElement.parent;\n\t\t\tviewWriter.move(viewWriter.createRangeOn(imgElement), viewWriter.createPositionBefore(pictureElement));\n\t\t\tviewWriter.remove(pictureElement);\n\t\t}\n\t};\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"attribute:sources:imageBlock\", converter);\n\t\tdispatcher.on(\"attribute:sources:imageInline\", converter);\n\t};\n}\n/**\n* Converter used to convert a given image attribute from the model to the view.\n*\n* @internal\n* @param imageType The type of the image.\n* @param attributeKey The name of the attribute to convert.\n*/\nfunction downcastImageAttribute(imageUtils, imageType, attributeKey) {\n\tconst converter = (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst element = conversionApi.mapper.toViewElement(data.item);\n\t\tconst img = imageUtils.findViewImgElement(element);\n\t\tviewWriter.setAttribute(data.attributeKey, data.attributeNewValue || \"\", img);\n\t};\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`attribute:${attributeKey}:${imageType}`, converter);\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 image/image/imageloadobserver\n*/\n/**\n* Observes all new images added to the {@link module:engine/view/document~ViewDocument},\n* fires {@link module:engine/view/document~ViewDocument#event:imageLoaded} and\n* {@link module:engine/view/document~ViewDocument#event:layoutChanged} event every time when the new image\n* has been loaded.\n*\n* **Note:** This event is not fired for images that has been added to the document and rendered as `complete` (already loaded).\n*/\nvar ImageLoadObserver = class extends Observer {\n\t/**\n\t* @inheritDoc\n\t*/\n\tobserve(domRoot) {\n\t\tthis.listenTo(domRoot, \"load\", (event, domEvent) => {\n\t\t\tconst domElement = domEvent.target;\n\t\t\tif (this.checkShouldIgnoreEventFromTarget(domElement)) return;\n\t\t\tif (domElement.tagName == \"IMG\") this._fireEvents(domEvent);\n\t\t}, { useCapture: true });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstopObserving(domRoot) {\n\t\tthis.stopListening(domRoot);\n\t}\n\t/**\n\t* Fires {@link module:engine/view/document~ViewDocument#event:layoutChanged} and\n\t* {@link module:engine/view/document~ViewDocument#event:imageLoaded}\n\t* if observer {@link #isEnabled is enabled}.\n\t*\n\t* @param domEvent The DOM event.\n\t*/\n\t_fireEvents(domEvent) {\n\t\tif (this.isEnabled) {\n\t\t\tthis.document.fire(\"layoutChanged\");\n\t\t\tthis.document.fire(\"imageLoaded\", domEvent);\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 image/image/insertimagecommand\n*/\n/**\n* Insert image command.\n*\n* The command is registered by the {@link module:image/image/imageediting~ImageEditing} plugin as `insertImage`\n* and it is also available via aliased `imageInsert` name.\n*\n* In order to insert an image at the current selection position\n* (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),\n* execute the command and specify the image source:\n*\n* ```ts\n* editor.execute( 'insertImage', { source: 'http://url.to.the/image' } );\n* ```\n*\n* It is also possible to insert multiple images at once:\n*\n* ```ts\n* editor.execute( 'insertImage', {\n* \tsource:  [\n* \t\t'path/to/image.jpg',\n* \t\t'path/to/other-image.jpg'\n* \t]\n* } );\n* ```\n*\n* If you want to take the full control over the process, you can specify individual model attributes:\n*\n* ```ts\n* editor.execute( 'insertImage', {\n* \tsource:  [\n* \t\t{ src: 'path/to/image.jpg', alt: 'First alt text' },\n* \t\t{ src: 'path/to/other-image.jpg', alt: 'Second alt text', customAttribute: 'My attribute value' }\n* \t]\n* } );\n* ```\n*/\nvar InsertImageCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tconst configImageInsertType = editor.config.get(\"image.insert.type\");\n\t\tif (!editor.plugins.has(\"ImageBlockEditing\")) {\n\t\t\tif (configImageInsertType === \"block\")\n /**\n\t\t\t* The {@link module:image/imageblock~ImageBlock} plugin must be enabled to allow inserting block images. See\n\t\t\t* {@link module:image/imageconfig~ImageInsertConfig#type} to learn more.\n\t\t\t*\n\t\t\t* @error image-block-plugin-required\n\t\t\t*/\n\t\t\tlogWarning(\"image-block-plugin-required\");\n\t\t}\n\t\tif (!editor.plugins.has(\"ImageInlineEditing\")) {\n\t\t\tif (configImageInsertType === \"inline\")\n /**\n\t\t\t* The {@link module:image/imageinline~ImageInline} plugin must be enabled to allow inserting inline images. See\n\t\t\t* {@link module:image/imageconfig~ImageInsertConfig#type} to learn more.\n\t\t\t*\n\t\t\t* @error image-inline-plugin-required\n\t\t\t*/\n\t\t\tlogWarning(\"image-inline-plugin-required\");\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tthis.isEnabled = imageUtils.isImageAllowed();\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options Options for the executed command.\n\t* @param options.imageType The type of the image to insert. If not specified, the type will be determined automatically.\n\t* @param options.source The image source or an array of image sources to insert.\n\t* @param options.breakBlock If set to `true`, the block at the selection start will be broken before inserting the image.\n\t* See the documentation of the command to learn more about accepted formats.\n\t*/\n\texecute(options) {\n\t\tconst sourceDefinitions = toArray(options.source);\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tconst selectionAttributes = Object.fromEntries(selection.getAttributes());\n\t\tsourceDefinitions.forEach((sourceDefinition, index) => {\n\t\t\tconst selectedElement = selection.getSelectedElement();\n\t\t\tif (typeof sourceDefinition === \"string\") sourceDefinition = { src: sourceDefinition };\n\t\t\tif (index && selectedElement && imageUtils.isImage(selectedElement)) {\n\t\t\t\tconst position = this.editor.model.createPositionAfter(selectedElement);\n\t\t\t\timageUtils.insertImage({\n\t\t\t\t\t...sourceDefinition,\n\t\t\t\t\t...selectionAttributes\n\t\t\t\t}, position, options.imageType);\n\t\t\t} else if (options.breakBlock) imageUtils.insertImage({\n\t\t\t\t...sourceDefinition,\n\t\t\t\t...selectionAttributes\n\t\t\t}, selection.getFirstPosition(), options.imageType);\n\t\t\telse imageUtils.insertImage({\n\t\t\t\t...sourceDefinition,\n\t\t\t\t...selectionAttributes\n\t\t\t}, null, options.imageType);\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 image/image/replaceimagesourcecommand\n*/\n/**\n* Replace image source command.\n*\n* Changes image source to the one provided. Can be executed as follows:\n*\n* ```ts\n* editor.execute( 'replaceImageSource', { source: 'http://url.to.the/image' } );\n* ```\n*/\nvar ReplaceImageSourceCommand = class extends Command {\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.decorate(\"cleanupImage\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tconst element = this.editor.model.document.selection.getSelectedElement();\n\t\tthis.isEnabled = imageUtils.isImage(element);\n\t\tthis.value = this.isEnabled ? element.getAttribute(\"src\") : null;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options Options for the executed command.\n\t* @param options.source The image source to replace.\n\t*/\n\texecute(options) {\n\t\tconst image = this.editor.model.document.selection.getSelectedElement();\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tthis.editor.model.change((writer) => {\n\t\t\twriter.setAttribute(\"src\", options.source, image);\n\t\t\tthis.cleanupImage(writer, image);\n\t\t\timageUtils.setImageNaturalSizeAttributes(image);\n\t\t});\n\t}\n\t/**\n\t* Cleanup image attributes that are not relevant to the new source.\n\t*\n\t* Removed attributes are: 'srcset', 'sizes', 'sources', 'width', 'height', 'alt'.\n\t*\n\t* This method is decorated, to allow custom cleanup logic.\n\t* For example, to remove 'myImageId' attribute after 'src' has changed:\n\t*\n\t* ```ts\n\t* replaceImageSourceCommand.on( 'cleanupImage', ( eventInfo, [ writer, image ] ) => {\n\t* \twriter.removeAttribute( 'myImageId', image );\n\t* } );\n\t* ```\n\t*/\n\tcleanupImage(writer, image) {\n\t\twriter.removeAttribute(\"srcset\", image);\n\t\twriter.removeAttribute(\"sizes\", image);\n\t\t/**\n\t\t* In case responsive images some attributes should be cleaned up.\n\t\t* Check: https://github.com/ckeditor/ckeditor5/issues/15093\n\t\t*/\n\t\twriter.removeAttribute(\"sources\", image);\n\t\twriter.removeAttribute(\"width\", image);\n\t\twriter.removeAttribute(\"height\", image);\n\t\twriter.removeAttribute(\"alt\", image);\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 image/image/imageediting\n*/\n/**\n* The image engine plugin. This module loads common code shared between\n* {@link module:image/image/imageinlineediting~ImageInlineEditing} and\n* {@link module:image/image/imageblockediting~ImageBlockEditing} plugins.\n*\n* This plugin registers the {@link module:image/image/insertimagecommand~InsertImageCommand 'insertImage'} command.\n*/\nvar ImageEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\t\teditor.editing.view.addObserver(ImageLoadObserver);\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"img\",\n\t\t\t\tkey: \"alt\"\n\t\t\t},\n\t\t\tmodel: \"alt\"\n\t\t}).attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"img\",\n\t\t\t\tkey: \"srcset\"\n\t\t\t},\n\t\t\tmodel: \"srcset\"\n\t\t});\n\t\tconst insertImageCommand = new InsertImageCommand(editor);\n\t\tconst replaceImageSourceCommand = new ReplaceImageSourceCommand(editor);\n\t\teditor.commands.add(\"insertImage\", insertImageCommand);\n\t\teditor.commands.add(\"replaceImageSource\", replaceImageSourceCommand);\n\t\teditor.commands.add(\"imageInsert\", insertImageCommand);\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 image/imagesizeattributes\n*/\n/**\n* This plugin enables `width` and `height` attributes in inline and block image elements.\n*/\nvar ImageSizeAttributes = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageSizeAttributes\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tthis._registerSchema();\n\t\tthis._registerConverters(\"imageBlock\");\n\t\tthis._registerConverters(\"imageInline\");\n\t}\n\t/**\n\t* Registers the `width` and `height` attributes for inline and block images.\n\t*/\n\t_registerSchema() {\n\t\tconst schema = this.editor.model.schema;\n\t\tif (this.editor.plugins.has(\"ImageBlockEditing\")) schema.extend(\"imageBlock\", { allowAttributes: [\"width\", \"height\"] });\n\t\tif (this.editor.plugins.has(\"ImageInlineEditing\")) schema.extend(\"imageInline\", { allowAttributes: [\"width\", \"height\"] });\n\t}\n\t/**\n\t* Registers converters for `width` and `height` attributes.\n\t*/\n\t_registerConverters(imageType) {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst viewElementName = imageType === \"imageBlock\" ? \"figure\" : \"img\";\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: viewElementName,\n\t\t\t\tstyles: { width: /.+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"width\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tif (widthAndHeightStylesAreBothSet(viewElement)) return getSizeValueIfInPx(viewElement.getStyle(\"width\"));\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}).attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: viewElementName,\n\t\t\t\tkey: \"width\"\n\t\t\t},\n\t\t\tmodel: \"width\"\n\t\t}).attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: viewElementName,\n\t\t\t\tstyles: { height: /.+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"height\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tif (widthAndHeightStylesAreBothSet(viewElement)) return getSizeValueIfInPx(viewElement.getStyle(\"height\"));\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}).attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: viewElementName,\n\t\t\t\tkey: \"height\"\n\t\t\t},\n\t\t\tmodel: \"height\"\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\t\tattachDowncastConverter(dispatcher, \"width\", \"width\", true, true);\n\t\t\tattachDowncastConverter(dispatcher, \"height\", \"height\", true, true);\n\t\t});\n\t\teditor.conversion.for(\"dataDowncast\").add((dispatcher) => {\n\t\t\tattachDowncastConverter(dispatcher, \"width\", \"width\", false);\n\t\t\tattachDowncastConverter(dispatcher, \"height\", \"height\", false);\n\t\t});\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:img\", (evt, data, conversionApi) => {\n\t\t\t\tconst width = data.viewItem.getAttribute(\"width\");\n\t\t\t\tconst height = data.viewItem.getAttribute(\"height\");\n\t\t\t\tif (width && height) conversionApi.consumable.consume(data.viewItem, { styles: [\"aspect-ratio\"] });\n\t\t\t});\n\t\t});\n\t\tfunction attachDowncastConverter(dispatcher, modelAttributeName, viewAttributeName, setRatioForInlineImage, isEditingDowncast = false) {\n\t\t\tdispatcher.on(`attribute:${modelAttributeName}:${imageType}`, (evt, data, conversionApi) => {\n\t\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement(data.item);\n\t\t\t\tconst img = imageUtils.findViewImgElement(viewElement);\n\t\t\t\tif (data.attributeNewValue !== null) viewWriter.setAttribute(viewAttributeName, data.attributeNewValue, img);\n\t\t\t\telse viewWriter.removeAttribute(viewAttributeName, img);\n\t\t\t\tconst width = data.item.getAttribute(\"width\");\n\t\t\t\tconst height = data.item.getAttribute(\"height\");\n\t\t\t\tconst hasSizes = width && height;\n\t\t\t\tif (hasSizes && isEditingDowncast) viewWriter.setAttribute(\"loading\", \"lazy\", img);\n\t\t\t\tif (data.item.hasAttribute(\"sources\")) return;\n\t\t\t\tconst isResized = data.item.hasAttribute(\"resizedWidth\");\n\t\t\t\tif (imageType === \"imageInline\" && !isResized && !setRatioForInlineImage) return;\n\t\t\t\tif (hasSizes) viewWriter.setStyle(\"aspect-ratio\", `${width}/${height}`, img);\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* The image type command. It changes the type of a selected image, depending on the configuration.\n*/\nvar ImageTypeCommand = class extends Command {\n\t/**\n\t* Model element name the command converts to.\n\t*/\n\t_modelElementName;\n\t/**\n\t* @inheritDoc\n\t*\n\t* @param modelElementName Model element name the command converts to.\n\t*/\n\tconstructor(editor, modelElementName) {\n\t\tsuper(editor);\n\t\tthis._modelElementName = modelElementName;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst element = imageUtils.getClosestSelectedImageElement(model.document.selection);\n\t\tif (!(this._modelElementName === \"imageBlock\" ? imageUtils.isInlineImage(element) : imageUtils.isBlockImage(element))) {\n\t\t\tthis.isEnabled = false;\n\t\t\treturn;\n\t\t}\n\t\tconst position = model.createPositionBefore(element);\n\t\tthis.isEnabled = isImageTypePlaceable(schema, position, this._modelElementName);\n\t}\n\t/**\n\t* Executes the command and changes the type of a selected image.\n\t*\n\t* @fires execute\n\t* @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t* The default is `true`.\n\t* @returns An object containing references to old and new model image elements\n\t* (for before and after the change) so external integrations can hook into the decorated\n\t* `execute` event and handle this change. `null` if the type change failed.\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst oldElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n\t\tconst attributes = Object.fromEntries(oldElement.getAttributes());\n\t\tif (!attributes.src && !attributes.uploadId) return null;\n\t\treturn model.change((writer) => {\n\t\t\tconst { setImageSizes = true } = options;\n\t\t\tconst markers = Array.from(model.markers).filter((marker) => marker.getRange().containsItem(oldElement));\n\t\t\tconst newElement = imageUtils.insertImage(attributes, model.createSelection(oldElement, \"on\"), this._modelElementName, { setImageSizes });\n\t\t\tif (!newElement) return null;\n\t\t\tconst newElementRange = writer.createRangeOn(newElement);\n\t\t\tfor (const marker of markers) {\n\t\t\t\tconst markerRange = marker.getRange();\n\t\t\t\tconst range = markerRange.root.rootName != \"$graveyard\" ? markerRange.getJoined(newElementRange, true) : newElementRange;\n\t\t\t\twriter.updateMarker(marker, { range });\n\t\t\t}\n\t\t\treturn {\n\t\t\t\toldElement,\n\t\t\t\tnewElement\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 image/image/imageplaceholder\n*/\n/**\n* Adds support for image placeholder that is automatically removed when the image is loaded.\n*/\nvar ImagePlaceholder = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImagePlaceholder\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tthis._setupSchema();\n\t\tthis._setupConversion();\n\t\tthis._setupLoadListener();\n\t}\n\t/**\n\t* Extends model schema.\n\t*/\n\t_setupSchema() {\n\t\tconst schema = this.editor.model.schema;\n\t\tif (schema.isRegistered(\"imageBlock\")) schema.extend(\"imageBlock\", { allowAttributes: [\"placeholder\"] });\n\t\tif (schema.isRegistered(\"imageInline\")) schema.extend(\"imageInline\", { allowAttributes: [\"placeholder\"] });\n\t}\n\t/**\n\t* Registers converters.\n\t*/\n\t_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"attribute:placeholder\", (evt, data, conversionApi) => {\n\t\t\t\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\t\t\t\tif (!data.item.is(\"element\", \"imageBlock\") && !data.item.is(\"element\", \"imageInline\")) return;\n\t\t\t\tconversionApi.consumable.consume(data.item, evt.name);\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst element = conversionApi.mapper.toViewElement(data.item);\n\t\t\t\tconst img = imageUtils.findViewImgElement(element);\n\t\t\t\tif (data.attributeNewValue) {\n\t\t\t\t\tviewWriter.addClass(\"image_placeholder\", img);\n\t\t\t\t\tviewWriter.setStyle(\"background-image\", `url(${data.attributeNewValue})`, img);\n\t\t\t\t\tviewWriter.setCustomProperty(\"editingPipeline:doNotReuseOnce\", true, img);\n\t\t\t\t} else {\n\t\t\t\t\tviewWriter.removeClass(\"image_placeholder\", img);\n\t\t\t\t\tviewWriter.removeStyle(\"background-image\", img);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Prepares listener for image load.\n\t*/\n\t_setupLoadListener() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editing = editor.editing;\n\t\tconst editingView = editing.view;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\teditingView.addObserver(ImageLoadObserver);\n\t\tthis.listenTo(editingView.document, \"imageLoaded\", (evt, domEvent) => {\n\t\t\tconst imgViewElement = editingView.domConverter.mapDomToView(domEvent.target);\n\t\t\tif (!imgViewElement) return;\n\t\t\tconst viewElement = imageUtils.getImageWidgetFromImageView(imgViewElement);\n\t\t\tif (!viewElement) return;\n\t\t\tconst modelElement = editing.mapper.toModelElement(viewElement);\n\t\t\tif (!modelElement || !modelElement.hasAttribute(\"placeholder\")) return;\n\t\t\tmodel.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\t\twriter.removeAttribute(\"placeholder\", modelElement);\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 image/image/imageblockediting\n*/\n/**\n* The image block plugin.\n*\n* It registers:\n*\n* * `<imageBlock>` as a block element in the document schema, and allows `alt`, `src` and `srcset` attributes.\n* * converters for editing and data pipelines.,\n* * {@link module:image/image/imagetypecommand~ImageTypeCommand `'imageTypeBlock'`} command that converts inline images into\n* block images.\n*/\nvar ImageBlockEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageEditing,\n\t\t\tImageSizeAttributes,\n\t\t\tImageUtils,\n\t\t\tImagePlaceholder,\n\t\t\tClipboardPipeline\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageBlockEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.register(\"imageBlock\", {\n\t\t\tinheritAllFrom: \"$blockObject\",\n\t\t\tallowAttributes: [\n\t\t\t\t\"alt\",\n\t\t\t\t\"src\",\n\t\t\t\t\"srcset\"\n\t\t\t]\n\t\t});\n\t\tthis._setupConversion();\n\t\tif (editor.plugins.has(\"ImageInlineEditing\")) {\n\t\t\teditor.commands.add(\"imageTypeBlock\", new ImageTypeCommand(this.editor, \"imageBlock\"));\n\t\t\tthis._setupClipboardIntegration();\n\t\t}\n\t}\n\t/**\n\t* Configures conversion pipelines to support upcasting and downcasting\n\t* block images (block image widgets) and their attributes.\n\t*/\n\t_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconversion.for(\"dataDowncast\").elementToStructure({\n\t\t\tmodel: \"imageBlock\",\n\t\t\tview: (modelElement, { writer }) => createBlockImageViewElement(writer)\n\t\t});\n\t\tconversion.for(\"editingDowncast\").elementToStructure({\n\t\t\tmodel: \"imageBlock\",\n\t\t\tview: (modelElement, { writer }) => imageUtils.toImageWidget(createBlockImageViewElement(writer), writer, t(\"image widget\"))\n\t\t});\n\t\tconversion.for(\"downcast\").add(downcastImageAttribute(imageUtils, \"imageBlock\", \"src\")).add(downcastImageAttribute(imageUtils, \"imageBlock\", \"alt\")).add(downcastSrcsetAttribute(imageUtils, \"imageBlock\"));\n\t\tconversion.for(\"upcast\").add(upcastImg(\"imageBlock\", imageUtils)).add(upcastImageFigure(imageUtils));\n\t}\n\t/**\n\t* Integrates the plugin with the clipboard pipeline.\n\t*\n\t* Idea is that the feature should recognize the user's intent when an **inline** image is\n\t* pasted or dropped. If such an image is pasted/dropped:\n\t*\n\t* * into an empty block (e.g. an empty paragraph),\n\t* * on another object (e.g. some block widget).\n\t*\n\t* it gets converted into a block image on the fly. We assume this is the user's intent\n\t* if they decided to put their image there.\n\t*\n\t* See the `ImageInlineEditing` for the similar integration that works in the opposite direction.\n\t*\n\t* The feature also sets image `width` and `height` attributes on paste.\n\t*/\n\t_setupClipboardIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst clipboardPipeline = editor.plugins.get(\"ClipboardPipeline\");\n\t\tthis.listenTo(clipboardPipeline, \"inputTransformation\", (evt, data) => {\n\t\t\tconst docFragmentChildren = Array.from(data.content.getChildren());\n\t\t\tlet modelRange;\n\t\t\tif (!docFragmentChildren.every(imageUtils.isInlineImageView)) return;\n\t\t\tif (data.targetRanges) modelRange = editor.editing.mapper.toModelRange(data.targetRanges[0]);\n\t\t\telse modelRange = model.document.selection.getFirstRange();\n\t\t\tconst selection = model.createSelection(modelRange);\n\t\t\tconst selectionPosition = selection.getFirstPosition();\n\t\t\tif (!!selectionPosition && isImageTypePlaceable(model.schema, selectionPosition, \"imageBlock\") && determineImageTypeForInsertionAtSelection(model.schema, selection) === \"imageBlock\") {\n\t\t\t\tconst writer = new ViewUpcastWriter(editingView.document);\n\t\t\t\tconst blockViewImages = docFragmentChildren.map((inlineViewImage) => writer.createElement(\"figure\", { class: \"image\" }, inlineViewImage));\n\t\t\t\tdata.content = writer.createDocumentFragment(blockViewImages);\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(clipboardPipeline, \"contentInsertion\", (evt, data) => {\n\t\t\tif (data.method !== \"paste\") return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst range = writer.createRangeIn(data.content);\n\t\t\t\tfor (const item of range.getItems()) if (item.is(\"element\", \"imageBlock\")) imageUtils.setImageNaturalSizeAttributes(item);\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 image/imageinsert/ui/imageinsertformview\n*/\n/**\n* The view displayed in the insert image dropdown.\n*\n* See {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n*\n* @internal\n*/\nvar ImageInsertFormView = class extends View {\n\t/**\n\t* Tracks information about DOM focus in the form.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A collection of views that can be focused in the form.\n\t*/\n\t_focusables;\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* A collection of the defined integrations for inserting the images.\n\t*/\n\tchildren;\n\t/**\n\t* Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n\t*\n\t* @param locale The localization services instance.\n\t* @param integrations An integrations object that contains components (or tokens for components) to be shown in the panel view.\n\t*/\n\tconstructor(locale, integrations = []) {\n\t\tsuper(locale);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.children = this.createCollection();\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tfor (const view of integrations) {\n\t\t\tthis.children.add(view);\n\t\t\tthis._focusables.add(view);\n\t\t\tif (view instanceof CollapsibleView) this._focusables.addMany(view.children);\n\t\t}\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-image-insert-form\"],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\tfor (const view of this._focusables) this.focusTracker.add(view.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tconst stopPropagation = (data) => data.stopPropagation();\n\t\tthis.keystrokes.set(\"arrowright\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowleft\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowup\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowdown\", stopPropagation);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the first {@link #_focusables focusable} in the form.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\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 image/imageinsert/imageinsertui\n*/\n/**\n* The image insert dropdown plugin.\n*\n* For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}\n* and {@glink features/images/images-inserting Insert images via source URL} documentation.\n*\n* Adds the `'insertImage'` dropdown to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n* and also the `imageInsert` dropdown as an alias for backward compatibility.\n*\n* Adds the `'menuBar:insertImage'` sub-menu to the {@link module:ui/componentfactory~ComponentFactory UI component factory}, which is\n* by default added to the `'Insert'` menu.\n*/\nvar ImageInsertUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageInsertUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* The dropdown view responsible for displaying the image insert UI.\n\t*/\n\tdropdownView;\n\t/**\n\t* Registered integrations map.\n\t*/\n\t_integrations = /* @__PURE__ */ new Map();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"image.insert.integrations\", [\n\t\t\t\"upload\",\n\t\t\t\"assetManager\",\n\t\t\t\"url\"\n\t\t]);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tthis.set(\"isImageSelected\", false);\n\t\tthis.listenTo(editor.model.document, \"change\", () => {\n\t\t\tthis.isImageSelected = imageUtils.isImage(selection.getSelectedElement());\n\t\t});\n\t\tconst componentCreator = (locale) => this._createToolbarComponent(locale);\n\t\tconst menuBarComponentCreator = (locale) => this._createMenuBarComponent(locale);\n\t\teditor.ui.componentFactory.add(\"insertImage\", componentCreator);\n\t\teditor.ui.componentFactory.add(\"imageInsert\", componentCreator);\n\t\teditor.ui.componentFactory.add(\"menuBar:insertImage\", menuBarComponentCreator);\n\t}\n\t/**\n\t* Registers the insert image dropdown integration.\n\t*/\n\tregisterIntegration({ name, observable, buttonViewCreator, formViewCreator, menuBarButtonViewCreator, requiresForm = false, override = false }) {\n\t\tif (this._integrations.has(name) && !override)\n /**\n\t\t* There are two insert-image integrations registered with the same name.\n\t\t*\n\t\t* Make sure that you do not load multiple asset manager plugins.\n\t\t*\n\t\t* @error image-insert-integration-exists\n\t\t*/\n\t\tlogWarning(\"image-insert-integration-exists\", { name });\n\t\tthis._integrations.set(name, {\n\t\t\tobservable,\n\t\t\tbuttonViewCreator,\n\t\t\tmenuBarButtonViewCreator,\n\t\t\tformViewCreator,\n\t\t\trequiresForm\n\t\t});\n\t}\n\t/**\n\t* Creates the toolbar component.\n\t*/\n\t_createToolbarComponent(locale) {\n\t\tconst editor = this.editor;\n\t\tconst t = locale.t;\n\t\tconst integrations = this._prepareIntegrations();\n\t\tif (!integrations.length) return null;\n\t\tlet dropdownButton;\n\t\tconst firstIntegration = integrations[0];\n\t\tif (integrations.length == 1) {\n\t\t\tif (!firstIntegration.requiresForm) return firstIntegration.buttonViewCreator(true);\n\t\t\tdropdownButton = firstIntegration.buttonViewCreator(true);\n\t\t} else {\n\t\t\tconst actionButton = firstIntegration.buttonViewCreator(false);\n\t\t\tdropdownButton = new SplitButtonView(locale, actionButton);\n\t\t\tdropdownButton.tooltip = true;\n\t\t\tdropdownButton.bind(\"label\").to(this, \"isImageSelected\", (isImageSelected) => isImageSelected ? t(\"Replace image\") : t(\"Insert image\"));\n\t\t}\n\t\tconst dropdownView = this.dropdownView = createDropdown(locale, dropdownButton);\n\t\tconst observables = integrations.map(({ observable }) => typeof observable == \"function\" ? observable() : observable);\n\t\tdropdownView.bind(\"isEnabled\").toMany(observables, \"isEnabled\", (...isEnabled) => isEnabled.some((isEnabled) => isEnabled));\n\t\tdropdownView.once(\"change:isOpen\", () => {\n\t\t\tconst integrationViews = integrations.flatMap(({ formViewCreator }) => formViewCreator(integrations.length == 1));\n\t\t\tconst imageInsertFormView = new ImageInsertFormView(editor.locale, integrationViews);\n\t\t\tdropdownView.panelView.children.add(imageInsertFormView);\n\t\t});\n\t\treturn dropdownView;\n\t}\n\t/**\n\t* Creates the menu bar component.\n\t*/\n\t_createMenuBarComponent(locale) {\n\t\tconst t = locale.t;\n\t\tconst integrations = this._prepareIntegrations();\n\t\tif (!integrations.length) return null;\n\t\tconst integrationViews = integrations.flatMap(({ menuBarButtonViewCreator }) => menuBarButtonViewCreator(integrations.length == 1));\n\t\tconst resultView = new MenuBarMenuView(locale);\n\t\tconst listView = new MenuBarMenuListView(locale);\n\t\tresultView.panelView.children.add(listView);\n\t\tresultView.buttonView.set({\n\t\t\ticon: IconImage,\n\t\t\tlabel: t(\"Image\")\n\t\t});\n\t\tfor (const integrationView of integrationViews) {\n\t\t\tconst listItemView = new MenuBarMenuListItemView(locale, resultView);\n\t\t\tlistItemView.children.add(integrationView);\n\t\t\tlistView.items.add(listItemView);\n\t\t\tintegrationView.delegate(\"execute\").to(resultView);\n\t\t}\n\t\treturn resultView;\n\t}\n\t/**\n\t* Validates the integrations list.\n\t*/\n\t_prepareIntegrations() {\n\t\tconst items = this.editor.config.get(\"image.insert.integrations\");\n\t\tconst result = [];\n\t\tif (!items.length) {\n\t\t\t/**\n\t\t\t* The insert image feature requires a list of integrations to be provided in the editor configuration.\n\t\t\t*\n\t\t\t* The default list of integrations is `upload`, `assetManager`, `url`. Those integrations are included\n\t\t\t* in the insert image dropdown if the given feature plugin is loaded. You should omit the `integrations`\n\t\t\t* configuration key to use the default set or provide a selected list of integrations that should be used.\n\t\t\t*\n\t\t\t* @error image-insert-integrations-not-specified\n\t\t\t*/\n\t\t\tlogWarning(\"image-insert-integrations-not-specified\");\n\t\t\treturn result;\n\t\t}\n\t\tfor (const item of items) {\n\t\t\tif (!this._integrations.has(item)) {\n\t\t\t\tif (![\n\t\t\t\t\t\"upload\",\n\t\t\t\t\t\"assetManager\",\n\t\t\t\t\t\"url\"\n\t\t\t\t].includes(item))\n /**\n\t\t\t\t* The specified insert image integration name is unknown or the providing plugin is not loaded in the editor.\n\t\t\t\t*\n\t\t\t\t* @error image-insert-unknown-integration\n\t\t\t\t*/\n\t\t\t\tlogWarning(\"image-insert-unknown-integration\", { item });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresult.push(this._integrations.get(item));\n\t\t}\n\t\tif (!result.length)\n /**\n\t\t* The image insert feature requires integrations to be registered by separate features.\n\t\t*\n\t\t* The `insertImage` toolbar button requires integrations to be registered by other features.\n\t\t* For example {@link module:image/imageupload~ImageUpload ImageUpload},\n\t\t* {@link module:image/imageinsert~ImageInsert ImageInsert},\n\t\t* {@link module:image/imageinsertviaurl~ImageInsertViaUrl ImageInsertViaUrl},\n\t\t* {@link module:ckbox/ckbox~CKBox CKBox}\n\t\t*\n\t\t* @error image-insert-integrations-not-registered\n\t\t*/\n\t\tlogWarning(\"image-insert-integrations-not-registered\");\n\t\treturn result;\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 image/imageblock\n*/\n/**\n* The image block plugin.\n*\n* This is a \"glue\" plugin which loads the following plugins:\n*\n* * {@link module:image/image/imageblockediting~ImageBlockEditing},\n* * {@link module:image/imagetextalternative~ImageTextAlternative}.\n*\n* Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n* for more information.\n*/\nvar ImageBlock = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageBlockEditing,\n\t\t\tWidget,\n\t\t\tImageTextAlternative,\n\t\t\tImageInsertUI\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageBlock\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 image/image/imageinlineediting\n*/\n/**\n* The image inline plugin.\n*\n* It registers:\n*\n* * `<imageInline>` as an inline element in the document schema, and allows `alt`, `src` and `srcset` attributes.\n* * converters for editing and data pipelines.\n* * {@link module:image/image/imagetypecommand~ImageTypeCommand `'imageTypeInline'`} command that converts block images into\n* inline images.\n*/\nvar ImageInlineEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageEditing,\n\t\t\tImageSizeAttributes,\n\t\t\tImageUtils,\n\t\t\tImagePlaceholder,\n\t\t\tClipboardPipeline\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageInlineEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.register(\"imageInline\", {\n\t\t\tinheritAllFrom: \"$inlineObject\",\n\t\t\tallowAttributes: [\n\t\t\t\t\"alt\",\n\t\t\t\t\"src\",\n\t\t\t\t\"srcset\"\n\t\t\t],\n\t\t\tdisallowIn: [\"caption\"]\n\t\t});\n\t\tthis._setupConversion();\n\t\tif (editor.plugins.has(\"ImageBlockEditing\")) {\n\t\t\teditor.commands.add(\"imageTypeInline\", new ImageTypeCommand(this.editor, \"imageInline\"));\n\t\t\tthis._setupClipboardIntegration();\n\t\t}\n\t}\n\t/**\n\t* Configures conversion pipelines to support upcasting and downcasting\n\t* inline images (inline image widgets) and their attributes.\n\t*/\n\t_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: \"imageInline\",\n\t\t\tview: (modelElement, { writer }) => writer.createEmptyElement(\"img\")\n\t\t});\n\t\tconversion.for(\"editingDowncast\").elementToStructure({\n\t\t\tmodel: \"imageInline\",\n\t\t\tview: (modelElement, { writer }) => imageUtils.toImageWidget(createInlineImageViewElement(writer), writer, t(\"image widget\"))\n\t\t});\n\t\tconversion.for(\"downcast\").add(downcastImageAttribute(imageUtils, \"imageInline\", \"src\")).add(downcastImageAttribute(imageUtils, \"imageInline\", \"alt\")).add(downcastSrcsetAttribute(imageUtils, \"imageInline\"));\n\t\tconversion.for(\"upcast\").add(upcastImg(\"imageInline\", imageUtils));\n\t}\n\t/**\n\t* Integrates the plugin with the clipboard pipeline.\n\t*\n\t* Idea is that the feature should recognize the user's intent when an **block** image is\n\t* pasted or dropped. If such an image is pasted/dropped into a non-empty block\n\t* (e.g. a paragraph with some text) it gets converted into an inline image on the fly.\n\t*\n\t* We assume this is the user's intent if they decided to put their image there.\n\t*\n\t* **Note**: If a block image has a caption, it will not be converted to an inline image\n\t* to avoid the confusion. Captions are added on purpose and they should never be lost\n\t* in the clipboard pipeline.\n\t*\n\t* See the `ImageBlockEditing` for the similar integration that works in the opposite direction.\n\t*\n\t* The feature also sets image `width` and `height` attributes when pasting.\n\t*/\n\t_setupClipboardIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst clipboardPipeline = editor.plugins.get(\"ClipboardPipeline\");\n\t\tthis.listenTo(clipboardPipeline, \"inputTransformation\", (evt, data) => {\n\t\t\tconst docFragmentChildren = Array.from(data.content.getChildren());\n\t\t\tlet modelRange;\n\t\t\tif (!docFragmentChildren.every(imageUtils.isBlockImageView)) return;\n\t\t\tif (data.targetRanges) modelRange = editor.editing.mapper.toModelRange(data.targetRanges[0]);\n\t\t\telse modelRange = model.document.selection.getFirstRange();\n\t\t\tconst selection = model.createSelection(modelRange);\n\t\t\tconst selectionPosition = selection.getFirstPosition();\n\t\t\tif (!(!!selectionPosition && isImageTypePlaceable(model.schema, selectionPosition, \"imageBlock\")) || determineImageTypeForInsertionAtSelection(model.schema, selection) === \"imageInline\") {\n\t\t\t\tconst writer = new ViewUpcastWriter(editingView.document);\n\t\t\t\tconst inlineViewImages = docFragmentChildren.map((blockViewImage) => {\n\t\t\t\t\tif (blockViewImage.childCount === 1) {\n\t\t\t\t\t\tArray.from(blockViewImage.getAttributes()).forEach((attribute) => writer.setAttribute(...attribute, imageUtils.findViewImgElement(blockViewImage)));\n\t\t\t\t\t\treturn blockViewImage.getChild(0);\n\t\t\t\t\t} else return blockViewImage;\n\t\t\t\t});\n\t\t\t\tdata.content = writer.createDocumentFragment(inlineViewImages);\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(clipboardPipeline, \"contentInsertion\", (evt, data) => {\n\t\t\tif (data.method !== \"paste\") return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst range = writer.createRangeIn(data.content);\n\t\t\t\tfor (const item of range.getItems()) if (item.is(\"element\", \"imageInline\")) imageUtils.setImageNaturalSizeAttributes(item);\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 image/imageinline\n*/\n/**\n* The image inline plugin.\n*\n* This is a \"glue\" plugin which loads the following plugins:\n*\n* * {@link module:image/image/imageinlineediting~ImageInlineEditing},\n* * {@link module:image/imagetextalternative~ImageTextAlternative}.\n*\n* Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n* for more information.\n*/\nvar ImageInline = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageInlineEditing,\n\t\t\tWidget,\n\t\t\tImageTextAlternative,\n\t\t\tImageInsertUI\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageInline\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 image/image\n*/\n/**\n* The image plugin.\n*\n* For a detailed overview, check the {@glink features/images/images-overview image feature} documentation.\n*\n* This is a \"glue\" plugin which loads the following plugins:\n*\n* * {@link module:image/imageblock~ImageBlock},\n* * {@link module:image/imageinline~ImageInline},\n*\n* Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n* for more information.\n*/\nvar Image = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageBlock, ImageInline];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Image\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* The image caption utilities plugin.\n*/\nvar ImageCaptionUtils = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageCaptionUtils\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* Returns the caption model element from a given image element. Returns `null` if no caption is found.\n\t*/\n\tgetCaptionFromImageModelElement(imageModelElement) {\n\t\tfor (const node of imageModelElement.getChildren()) if (!!node && node.is(\"element\", \"caption\")) return node;\n\t\treturn null;\n\t}\n\t/**\n\t* Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.\n\t*/\n\tgetCaptionFromModelSelection(selection) {\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tconst captionElement = selection.getFirstPosition().findAncestor(\"caption\");\n\t\tif (!captionElement) return null;\n\t\tif (imageUtils.isBlockImage(captionElement.parent)) return captionElement;\n\t\treturn null;\n\t}\n\t/**\n\t* {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a `<figcaption>` element that is placed\n\t* inside the image `<figure>` element.\n\t* @returns Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element\n\t* cannot be matched.\n\t*/\n\tmatchImageCaptionViewElement(element) {\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tif (element.name == \"figcaption\" && imageUtils.isBlockImageView(element.parent)) return { name: true };\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* The toggle image caption command.\n*\n* This command is registered by {@link module:image/imagecaption/imagecaptionediting~ImageCaptionEditing} as the\n* `'toggleImageCaption'` editor command.\n*\n* Executing this command:\n*\n* * either adds or removes the image caption of a selected image (depending on whether the caption is present or not),\n* * removes the image caption if the selection is anchored in one.\n*\n* ```ts\n* // Toggle the presence of the caption.\n* editor.execute( 'toggleImageCaption' );\n* ```\n*\n* **Note**: Upon executing this command, the selection will be set on the image if previously anchored in the caption element.\n*\n* **Note**: You can move the selection to the caption right away as it shows up upon executing this command by using\n* the `focusCaptionOnShow` option:\n*\n* ```ts\n* editor.execute( 'toggleImageCaption', { focusCaptionOnShow: true } );\n* ```\n*/\nvar ToggleImageCaptionCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst imageCaptionUtils = editor.plugins.get(\"ImageCaptionUtils\");\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tif (!editor.plugins.has(ImageBlockEditing)) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\t\t\treturn;\n\t\t}\n\t\tconst selection = editor.model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\t\tif (!selectedElement) {\n\t\t\tconst ancestorCaptionElement = imageCaptionUtils.getCaptionFromModelSelection(selection);\n\t\t\tthis.isEnabled = !!ancestorCaptionElement;\n\t\t\tthis.value = !!ancestorCaptionElement;\n\t\t\treturn;\n\t\t}\n\t\tthis.isEnabled = imageUtils.isImage(selectedElement);\n\t\tif (this.isEnabled && imageUtils.isInlineImage(selectedElement)) {\n\t\t\tconst position = editor.model.createPositionBefore(selectedElement);\n\t\t\tthis.isEnabled = isImageTypePlaceable(editor.model.schema, position, \"imageBlock\");\n\t\t}\n\t\tif (!this.isEnabled) this.value = false;\n\t\telse this.value = !!imageCaptionUtils.getCaptionFromImageModelElement(selectedElement);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* ```ts\n\t* editor.execute( 'toggleImageCaption' );\n\t* ```\n\t*\n\t* @param options Options for the executed command.\n\t* @param options.focusCaptionOnShow When true and the caption shows up, the selection will be moved into it straight away.\n\t* @fires execute\n\t*/\n\texecute(options = {}) {\n\t\tconst { focusCaptionOnShow } = options;\n\t\tthis.editor.model.change((writer) => {\n\t\t\tif (this.value) this._hideImageCaption(writer);\n\t\t\telse this._showImageCaption(writer, focusCaptionOnShow);\n\t\t});\n\t}\n\t/**\n\t* Shows the caption of the `<imageBlock>` or `<imageInline>`. Also:\n\t*\n\t* * it converts `<imageInline>` to `<imageBlock>` to show the caption,\n\t* * it attempts to restore the caption content from the `ImageCaptionEditing` caption registry,\n\t* * it moves the selection to the caption right away, it the `focusCaptionOnShow` option was set.\n\t*/\n\t_showImageCaption(writer, focusCaptionOnShow) {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst imageCaptionEditing = this.editor.plugins.get(\"ImageCaptionEditing\");\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tlet selectedImage = selection.getSelectedElement();\n\t\tconst savedCaption = imageCaptionEditing._getSavedCaption(selectedImage);\n\t\tif (imageUtils.isInlineImage(selectedImage)) {\n\t\t\tthis.editor.execute(\"imageTypeBlock\");\n\t\t\tselectedImage = selection.getSelectedElement();\n\t\t}\n\t\tconst newCaptionElement = savedCaption || writer.createElement(\"caption\");\n\t\twriter.append(newCaptionElement, selectedImage);\n\t\tif (focusCaptionOnShow) writer.setSelection(newCaptionElement, \"in\");\n\t}\n\t/**\n\t* Hides the caption of a selected image (or an image caption the selection is anchored to).\n\t*\n\t* The content of the caption is stored in the `ImageCaptionEditing` caption registry to make this\n\t* a reversible action.\n\t*/\n\t_hideImageCaption(writer) {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst imageCaptionEditing = editor.plugins.get(\"ImageCaptionEditing\");\n\t\tconst imageCaptionUtils = editor.plugins.get(\"ImageCaptionUtils\");\n\t\tlet selectedImage = selection.getSelectedElement();\n\t\tlet captionElement;\n\t\tif (selectedImage) captionElement = imageCaptionUtils.getCaptionFromImageModelElement(selectedImage);\n\t\telse {\n\t\t\tcaptionElement = imageCaptionUtils.getCaptionFromModelSelection(selection);\n\t\t\tselectedImage = captionElement.parent;\n\t\t}\n\t\timageCaptionEditing._saveCaption(selectedImage, captionElement);\n\t\twriter.setSelection(selectedImage, \"on\");\n\t\twriter.remove(captionElement);\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 image/imagecaption/imagecaptionediting\n*/\n/**\n* The image caption engine plugin. It is responsible for:\n*\n* * registering converters for the caption element,\n* * registering converters for the caption model attribute,\n* * registering the {@link module:image/imagecaption/toggleimagecaptioncommand~ToggleImageCaptionCommand `toggleImageCaption`} command.\n*/\nvar ImageCaptionEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils, ImageCaptionUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageCaptionEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* A map that keeps saved JSONified image captions and image model elements they are\n\t* associated with.\n\t*\n\t* To learn more about this system, see {@link #_saveCaption}.\n\t*/\n\t_savedCaptionsMap;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._savedCaptionsMap = /* @__PURE__ */ new WeakMap();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tif (!schema.isRegistered(\"caption\")) schema.register(\"caption\", {\n\t\t\tallowIn: \"imageBlock\",\n\t\t\tallowContentOf: \"$block\",\n\t\t\tisLimit: true\n\t\t});\n\t\telse schema.extend(\"caption\", { allowIn: \"imageBlock\" });\n\t\teditor.commands.add(\"toggleImageCaption\", new ToggleImageCaptionCommand(this.editor));\n\t\tthis._setupConversion();\n\t\tthis._setupImageTypeCommandsIntegration();\n\t\tthis._registerCaptionReconversion();\n\t}\n\t/**\n\t* Configures conversion pipelines to support upcasting and downcasting\n\t* image captions.\n\t*/\n\t_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst imageCaptionUtils = editor.plugins.get(\"ImageCaptionUtils\");\n\t\tconst t = editor.t;\n\t\teditor.conversion.for(\"upcast\").elementToElement({\n\t\t\tview: (element) => imageCaptionUtils.matchImageCaptionViewElement(element),\n\t\t\tmodel: \"caption\"\n\t\t});\n\t\teditor.conversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: \"caption\",\n\t\t\tview: (modelElement, { writer }) => {\n\t\t\t\tif (!imageUtils.isBlockImage(modelElement.parent)) return null;\n\t\t\t\treturn writer.createContainerElement(\"figcaption\");\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").elementToElement({\n\t\t\tmodel: \"caption\",\n\t\t\tview: (modelElement, { writer }) => {\n\t\t\t\tif (!imageUtils.isBlockImage(modelElement.parent)) return null;\n\t\t\t\tconst figcaptionElement = writer.createEditableElement(\"figcaption\");\n\t\t\t\twriter.setCustomProperty(\"imageCaption\", true, figcaptionElement);\n\t\t\t\tfigcaptionElement.placeholder = t(\"Enter image caption\");\n\t\t\t\tenableViewPlaceholder({\n\t\t\t\t\tview,\n\t\t\t\t\telement: figcaptionElement,\n\t\t\t\t\tkeepOnFocus: true\n\t\t\t\t});\n\t\t\t\tconst imageAlt = modelElement.parent.getAttribute(\"alt\");\n\t\t\t\tconst label = imageAlt ? t(\"Caption for image: %0\", [imageAlt]) : t(\"Caption for the image\");\n\t\t\t\treturn toWidgetEditable(figcaptionElement, writer, { label });\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Integrates with {@link module:image/image/imagetypecommand~ImageTypeCommand image type commands}\n\t* to make sure the caption is preserved when the type of an image changes so it can be restored\n\t* in the future if the user decides they want their caption back.\n\t*/\n\t_setupImageTypeCommandsIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst imageCaptionUtils = editor.plugins.get(\"ImageCaptionUtils\");\n\t\tconst imageTypeInlineCommand = editor.commands.get(\"imageTypeInline\");\n\t\tconst imageTypeBlockCommand = editor.commands.get(\"imageTypeBlock\");\n\t\tconst handleImageTypeChange = (evt) => {\n\t\t\tif (!evt.return) return;\n\t\t\tconst { oldElement, newElement } = evt.return;\n\t\t\t/* istanbul ignore if: paranoid check -- @preserve */\n\t\t\tif (!oldElement) return;\n\t\t\tif (imageUtils.isBlockImage(oldElement)) {\n\t\t\t\tconst oldCaptionElement = imageCaptionUtils.getCaptionFromImageModelElement(oldElement);\n\t\t\t\tif (oldCaptionElement) {\n\t\t\t\t\tthis._saveCaption(newElement, oldCaptionElement);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst savedOldElementCaption = this._getSavedCaption(oldElement);\n\t\t\tif (savedOldElementCaption) this._saveCaption(newElement, savedOldElementCaption);\n\t\t};\n\t\tif (imageTypeInlineCommand) this.listenTo(imageTypeInlineCommand, \"execute\", handleImageTypeChange, { priority: \"low\" });\n\t\tif (imageTypeBlockCommand) this.listenTo(imageTypeBlockCommand, \"execute\", handleImageTypeChange, { priority: \"low\" });\n\t}\n\t/**\n\t* Returns the saved {@link module:engine/model/element~ModelElement#toJSON JSONified} caption\n\t* of an image model element.\n\t*\n\t* See {@link #_saveCaption}.\n\t*\n\t* @internal\n\t* @param imageModelElement The model element the caption should be returned for.\n\t* @returns The model caption element or `null` if there is none.\n\t*/\n\t_getSavedCaption(imageModelElement) {\n\t\tconst jsonObject = this._savedCaptionsMap.get(imageModelElement);\n\t\treturn jsonObject ? ModelElement.fromJSON(jsonObject) : null;\n\t}\n\t/**\n\t* Saves a {@link module:engine/model/element~ModelElement#toJSON JSONified} caption for\n\t* an image element to allow restoring it in the future.\n\t*\n\t* A caption is saved every time it gets hidden and/or the type of an image changes. The\n\t* user should be able to restore it on demand.\n\t*\n\t* **Note**: The caption cannot be stored in the image model element attribute because,\n\t* for instance, when the model state propagates to collaborators, the attribute would get\n\t* lost (mainly because it does not convert to anything when the caption is hidden) and\n\t* the states of collaborators' models would de-synchronize causing numerous issues.\n\t*\n\t* See {@link #_getSavedCaption}.\n\t*\n\t* @internal\n\t* @param imageModelElement The model element the caption is saved for.\n\t* @param caption The caption model element to be saved.\n\t*/\n\t_saveCaption(imageModelElement, caption) {\n\t\tthis._savedCaptionsMap.set(imageModelElement, caption.toJSON());\n\t}\n\t/**\n\t* Reconverts image caption when image alt attribute changes.\n\t* The change of alt attribute is reflected in caption's aria-label attribute.\n\t*/\n\t_registerCaptionReconversion() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst imageCaptionUtils = editor.plugins.get(\"ImageCaptionUtils\");\n\t\tmodel.document.on(\"change:data\", () => {\n\t\t\tconst changes = model.document.differ.getChanges();\n\t\t\tfor (const change of changes) {\n\t\t\t\tif (change.attributeKey !== \"alt\") continue;\n\t\t\t\tconst image = change.range.start.nodeAfter;\n\t\t\t\tif (imageUtils.isBlockImage(image)) {\n\t\t\t\t\tconst caption = imageCaptionUtils.getCaptionFromImageModelElement(image);\n\t\t\t\t\tif (!caption) return;\n\t\t\t\t\teditor.editing.reconvertItem(caption);\n\t\t\t\t}\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 image/imagecaption/imagecaptionui\n*/\n/**\n* The image caption UI plugin. It introduces the `'toggleImageCaption'` UI button.\n*/\nvar ImageCaptionUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageCaptionUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageCaptionUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageCaptionUtils = editor.plugins.get(\"ImageCaptionUtils\");\n\t\tconst t = editor.t;\n\t\teditor.ui.componentFactory.add(\"toggleImageCaption\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"toggleImageCaption\");\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tview.set({\n\t\t\t\ticon: IconCaption,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tview.bind(\"isOn\", \"isEnabled\").to(command, \"value\", \"isEnabled\");\n\t\t\tview.bind(\"label\").to(command, \"value\", (value) => value ? t(\"Toggle caption off\") : t(\"Toggle caption on\"));\n\t\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\t\teditor.execute(\"toggleImageCaption\", { focusCaptionOnShow: true });\n\t\t\t\tconst modelCaptionElement = imageCaptionUtils.getCaptionFromModelSelection(editor.model.document.selection);\n\t\t\t\tif (modelCaptionElement) {\n\t\t\t\t\tconst figcaptionElement = editor.editing.mapper.toViewElement(modelCaptionElement);\n\t\t\t\t\teditingView.scrollToTheSelection();\n\t\t\t\t\teditingView.change((writer) => {\n\t\t\t\t\t\twriter.addClass(\"image__caption_highlighted\", figcaptionElement);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn view;\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 image/imagecaption\n*/\n/**\n* The image caption plugin.\n*\n* For a detailed overview, check the {@glink features/images/images-captions image caption} documentation.\n*/\nvar ImageCaption = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageCaptionEditing, ImageCaptionUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageCaption\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* Creates a regular expression used to test for image files.\n*\n* ```ts\n* const imageType = createImageTypeRegExp( [ 'png', 'jpeg', 'svg+xml', 'vnd.microsoft.icon' ] );\n*\n* console.log( 'is supported image', imageType.test( file.type ) );\n* ```\n*/\nfunction createImageTypeRegExp(types) {\n\tconst regExpSafeNames = types.map((type) => type.replace(\"+\", \"\\\\+\"));\n\treturn new RegExp(`^image\\\\/(${regExpSafeNames.join(\"|\")})$`);\n}\n/**\n* Creates a promise that fetches the image local source (Base64 or blob) and resolves with a `File` object.\n*\n* @internal\n* @param image Image whose source to fetch.\n* @returns A promise which resolves when an image source is fetched and converted to a `File` instance.\n* It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\n*/\nfunction fetchLocalImage(image) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst imageSrc = image.getAttribute(\"src\");\n\t\tfetch(imageSrc).then((resource) => resource.blob()).then((blob) => {\n\t\t\tconst mimeType = getImageMimeType(blob, imageSrc);\n\t\t\tconst filename = `image.${mimeType.replace(\"image/\", \"\")}`;\n\t\t\tresolve(new File([blob], filename, { type: mimeType }));\n\t\t}).catch((err) => {\n\t\t\treturn err && err.name === \"TypeError\" ? convertLocalImageOnCanvas(imageSrc).then(resolve).catch(reject) : reject(err);\n\t\t});\n\t});\n}\n/**\n* Checks whether a given node is an image element with a local source (Base64 or blob).\n*\n* @param node The node to check.\n* @internal\n*/\nfunction isLocalImage(imageUtils, node) {\n\tif (!imageUtils.isInlineImageView(node) || !node.getAttribute(\"src\")) return false;\n\treturn !!node.getAttribute(\"src\").match(/^data:image\\/\\w+;base64,/g) || !!node.getAttribute(\"src\").match(/^blob:/g);\n}\n/**\n* Extracts an image type based on its blob representation or its source.\n* @param blob Image blob representation.\n* @param src Image `src` attribute value.\n*/\nfunction getImageMimeType(blob, src) {\n\tif (blob.type) return blob.type;\n\telse if (src.match(/data:(image\\/\\w+);base64/)) return src.match(/data:(image\\/\\w+);base64/)[1].toLowerCase();\n\telse return \"image/jpeg\";\n}\n/**\n* Creates a promise that converts the image local source (Base64 or blob) to a blob using canvas and resolves\n* with a `File` object.\n* @param imageSrc Image `src` attribute value.\n* @returns A promise which resolves when an image source is converted to a `File` instance.\n* It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\n*/\nfunction convertLocalImageOnCanvas(imageSrc) {\n\treturn getBlobFromCanvas(imageSrc).then((blob) => {\n\t\tconst mimeType = getImageMimeType(blob, imageSrc);\n\t\tconst filename = `image.${mimeType.replace(\"image/\", \"\")}`;\n\t\treturn new File([blob], filename, { type: mimeType });\n\t});\n}\n/**\n* Creates a promise that resolves with a `Blob` object converted from the image source (Base64 or blob).\n* @param imageSrc Image `src` attribute value.\n*/\nfunction getBlobFromCanvas(imageSrc) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst image = global.document.createElement(\"img\");\n\t\timage.addEventListener(\"load\", () => {\n\t\t\tconst canvas = global.document.createElement(\"canvas\");\n\t\t\tcanvas.width = image.width;\n\t\t\tcanvas.height = image.height;\n\t\t\tcanvas.getContext(\"2d\").drawImage(image, 0, 0);\n\t\t\tcanvas.toBlob((blob) => blob ? resolve(blob) : reject());\n\t\t});\n\t\timage.addEventListener(\"error\", () => reject());\n\t\timage.src = imageSrc;\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 image/imageupload/imageuploadui\n*/\n/**\n* The image upload button plugin.\n*\n* For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature} documentation.\n*\n* Adds the `'uploadImage'` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n* and also the `imageUpload` button as an alias for backward compatibility.\n*\n* Adds the `'menuBar:uploadImage'` menu button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}.\n*\n* It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are the default components\n* through which image upload is available.\n*/\nvar ImageUploadUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageUploadUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(\"uploadImage\", () => this._createToolbarButton());\n\t\teditor.ui.componentFactory.add(\"imageUpload\", () => this._createToolbarButton());\n\t\teditor.ui.componentFactory.add(\"menuBar:uploadImage\", () => this._createMenuBarButton(\"standalone\"));\n\t\tif (editor.plugins.has(\"ImageInsertUI\")) editor.plugins.get(\"ImageInsertUI\").registerIntegration({\n\t\t\tname: \"upload\",\n\t\t\tobservable: () => editor.commands.get(\"uploadImage\"),\n\t\t\tbuttonViewCreator: () => this._createToolbarButton(),\n\t\t\tformViewCreator: () => this._createDropdownButton(),\n\t\t\tmenuBarButtonViewCreator: (isOnly) => this._createMenuBarButton(isOnly ? \"insertOnly\" : \"insertNested\")\n\t\t});\n\t}\n\t/**\n\t* Creates the base for various kinds of the button component provided by this feature.\n\t*/\n\t_createButton(ButtonClass) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get(\"uploadImage\");\n\t\tconst imageTypes = editor.config.get(\"image.upload.types\");\n\t\tconst imageTypesRegExp = createImageTypeRegExp(imageTypes);\n\t\tconst view = new ButtonClass(editor.locale);\n\t\tconst t = locale.t;\n\t\tview.set({\n\t\t\tacceptedType: imageTypes.map((type) => `image/${type}`).join(\",\"),\n\t\t\tallowMultipleFiles: true,\n\t\t\tlabel: t(\"Upload from computer\"),\n\t\t\ticon: IconImageUpload\n\t\t});\n\t\tview.bind(\"isEnabled\").to(command);\n\t\tview.on(\"done\", (evt, files) => {\n\t\t\tconst imagesToUpload = Array.from(files).filter((file) => imageTypesRegExp.test(file.type));\n\t\t\tif (imagesToUpload.length) {\n\t\t\t\teditor.execute(\"uploadImage\", { file: imagesToUpload });\n\t\t\t\teditor.editing.view.focus();\n\t\t\t}\n\t\t});\n\t\treturn view;\n\t}\n\t/**\n\t* Creates a simple toolbar button, with an icon and a tooltip.\n\t*/\n\t_createToolbarButton() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst imageInsertUI = this.editor.plugins.get(\"ImageInsertUI\");\n\t\tconst uploadImageCommand = this.editor.commands.get(\"uploadImage\");\n\t\tconst button = this._createButton(FileDialogButtonView);\n\t\tbutton.tooltip = true;\n\t\tbutton.bind(\"label\").to(imageInsertUI, \"isImageSelected\", uploadImageCommand, \"isAccessAllowed\", (isImageSelected, isAccessAllowed) => {\n\t\t\tif (!isAccessAllowed) return t(\"You have no image upload permissions.\");\n\t\t\treturn isImageSelected ? t(\"Replace image from computer\") : t(\"Upload image from computer\");\n\t\t});\n\t\treturn button;\n\t}\n\t/**\n\t* Creates a button for the dropdown view, with an icon, text and no tooltip.\n\t*/\n\t_createDropdownButton() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst imageInsertUI = this.editor.plugins.get(\"ImageInsertUI\");\n\t\tconst button = this._createButton(FileDialogButtonView);\n\t\tbutton.withText = true;\n\t\tbutton.bind(\"label\").to(imageInsertUI, \"isImageSelected\", (isImageSelected) => isImageSelected ? t(\"Replace from computer\") : t(\"Upload from computer\"));\n\t\tbutton.on(\"execute\", () => {\n\t\t\timageInsertUI.dropdownView.isOpen = false;\n\t\t});\n\t\treturn button;\n\t}\n\t/**\n\t* Creates a button for the menu bar.\n\t*/\n\t_createMenuBarButton(type) {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createButton(MenuBarMenuListItemFileDialogButtonView);\n\t\tbutton.withText = true;\n\t\tswitch (type) {\n\t\t\tcase \"standalone\":\n\t\t\t\tbutton.label = t(\"Image from computer\");\n\t\t\t\tbreak;\n\t\t\tcase \"insertOnly\":\n\t\t\t\tbutton.label = t(\"Image\");\n\t\t\t\tbreak;\n\t\t\tcase \"insertNested\": button.label = t(\"From computer\");\n\t\t}\n\t\treturn button;\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 image/imageupload/imageuploadprogress\n*/\n/**\n* The image upload progress plugin.\n* It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.\n*/\nvar ImageUploadProgress = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageUploadProgress\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* The image placeholder that is displayed before real image data can be accessed.\n\t*\n\t* For the record, this image is a 1x1 px GIF with an aspect ratio set by CSS.\n\t*/\n\tplaceholder;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.placeholder = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tif (editor.plugins.has(\"ImageBlockEditing\")) editor.editing.downcastDispatcher.on(\"attribute:uploadStatus:imageBlock\", this.uploadStatusChange);\n\t\tif (editor.plugins.has(\"ImageInlineEditing\")) editor.editing.downcastDispatcher.on(\"attribute:uploadStatus:imageInline\", this.uploadStatusChange);\n\t}\n\t/**\n\t* This method is called each time the image `uploadStatus` attribute is changed.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param data Additional information about the change.\n\t*/\n\tuploadStatusChange = (evt, data, conversionApi) => {\n\t\tconst editor = this.editor;\n\t\tconst modelImage = data.item;\n\t\tconst uploadId = modelImage.getAttribute(\"uploadId\");\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst fileRepository = editor.plugins.get(FileRepository);\n\t\tconst status = uploadId ? data.attributeNewValue : null;\n\t\tconst placeholder = this.placeholder;\n\t\tconst viewFigure = editor.editing.mapper.toViewElement(modelImage);\n\t\tconst viewWriter = conversionApi.writer;\n\t\tif (status == \"reading\") {\n\t\t\t_startAppearEffect(viewFigure, viewWriter);\n\t\t\t_showPlaceholder(imageUtils, placeholder, viewFigure, viewWriter);\n\t\t\treturn;\n\t\t}\n\t\tif (status == \"uploading\") {\n\t\t\tconst loader = fileRepository.loaders.get(uploadId);\n\t\t\t_startAppearEffect(viewFigure, viewWriter);\n\t\t\tif (!loader) _showPlaceholder(imageUtils, placeholder, viewFigure, viewWriter);\n\t\t\telse {\n\t\t\t\t_hidePlaceholder(viewFigure, viewWriter);\n\t\t\t\t_showProgressBar(viewFigure, viewWriter, loader, editor.editing.view);\n\t\t\t\t_displayLocalImage(imageUtils, viewFigure, viewWriter, loader);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (status == \"complete\" && fileRepository.loaders.get(uploadId)) _showCompleteIcon(viewFigure, viewWriter, editor.editing.view);\n\t\t_hideProgressBar(viewFigure, viewWriter);\n\t\t_hidePlaceholder(viewFigure, viewWriter);\n\t\t_stopAppearEffect(viewFigure, viewWriter);\n\t};\n};\n/**\n* Adds ck-appear class to the image figure if one is not already applied.\n*/\nfunction _startAppearEffect(viewFigure, writer) {\n\tif (!viewFigure.hasClass(\"ck-appear\")) writer.addClass(\"ck-appear\", viewFigure);\n}\n/**\n* Removes ck-appear class to the image figure if one is not already removed.\n*/\nfunction _stopAppearEffect(viewFigure, writer) {\n\twriter.removeClass(\"ck-appear\", viewFigure);\n}\n/**\n* Shows placeholder together with infinite progress bar on given image figure.\n*/\nfunction _showPlaceholder(imageUtils, placeholder, viewFigure, writer) {\n\tif (!viewFigure.hasClass(\"ck-image-upload-placeholder\")) writer.addClass(\"ck-image-upload-placeholder\", viewFigure);\n\tconst viewImg = imageUtils.findViewImgElement(viewFigure);\n\tif (viewImg.getAttribute(\"src\") !== placeholder) writer.setAttribute(\"src\", placeholder, viewImg);\n\tif (!_getUIElement(viewFigure, \"placeholder\")) writer.insert(writer.createPositionAfter(viewImg), _createPlaceholder(writer));\n}\n/**\n* Removes placeholder together with infinite progress bar on given image figure.\n*/\nfunction _hidePlaceholder(viewFigure, writer) {\n\tif (viewFigure.hasClass(\"ck-image-upload-placeholder\")) writer.removeClass(\"ck-image-upload-placeholder\", viewFigure);\n\t_removeUIElement(viewFigure, writer, \"placeholder\");\n}\n/**\n* Shows progress bar displaying upload progress.\n* Attaches it to the file loader to update when upload percentace is changed.\n*/\nfunction _showProgressBar(viewFigure, writer, loader, view) {\n\tconst progressBar = _createProgressBar(writer);\n\twriter.insert(writer.createPositionAt(viewFigure, \"end\"), progressBar);\n\tloader.on(\"change:uploadedPercent\", (evt, name, value) => {\n\t\tview.change((writer) => {\n\t\t\twriter.setStyle(\"width\", value + \"%\", progressBar);\n\t\t});\n\t});\n}\n/**\n* Hides upload progress bar.\n*/\nfunction _hideProgressBar(viewFigure, writer) {\n\t_removeUIElement(viewFigure, writer, \"progressBar\");\n}\n/**\n* Shows complete icon and hides after a certain amount of time.\n*/\nfunction _showCompleteIcon(viewFigure, writer, view) {\n\tconst completeIcon = writer.createUIElement(\"div\", { class: \"ck-image-upload-complete-icon\" });\n\twriter.insert(writer.createPositionAt(viewFigure, \"end\"), completeIcon);\n\tsetTimeout(() => {\n\t\tview.change((writer) => writer.remove(writer.createRangeOn(completeIcon)));\n\t}, 3e3);\n}\n/**\n* Create progress bar element using {@link module:engine/view/uielement~ViewUIElement}.\n*/\nfunction _createProgressBar(writer) {\n\tconst progressBar = writer.createUIElement(\"div\", { class: \"ck-progress-bar\" });\n\twriter.setCustomProperty(\"progressBar\", true, progressBar);\n\treturn progressBar;\n}\n/**\n* Create placeholder element using {@link module:engine/view/uielement~ViewUIElement}.\n*/\nfunction _createPlaceholder(writer) {\n\tconst placeholder = writer.createUIElement(\"div\", { class: \"ck-upload-placeholder-loader\" });\n\twriter.setCustomProperty(\"placeholder\", true, placeholder);\n\treturn placeholder;\n}\n/**\n* Returns {@link module:engine/view/uielement~ViewUIElement} of given unique property from image figure element.\n* Returns `undefined` if element is not found.\n*/\nfunction _getUIElement(imageFigure, uniqueProperty) {\n\tfor (const child of imageFigure.getChildren()) if (child.getCustomProperty(uniqueProperty)) return child;\n}\n/**\n* Removes {@link module:engine/view/uielement~ViewUIElement} of given unique property from image figure element.\n*/\nfunction _removeUIElement(viewFigure, writer, uniqueProperty) {\n\tconst element = _getUIElement(viewFigure, uniqueProperty);\n\tif (element) writer.remove(writer.createRangeOn(element));\n}\n/**\n* Displays local data from file loader.\n*/\nfunction _displayLocalImage(imageUtils, viewFigure, writer, loader) {\n\tif (loader.data) {\n\t\tconst viewImg = imageUtils.findViewImgElement(viewFigure);\n\t\twriter.setAttribute(\"src\", loader.data, viewImg);\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 image/imageupload/uploadimagecommand\n*/\n/**\n* The upload image command.\n*\n* The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin as `uploadImage`\n* and it is also available via aliased `imageUpload` name.\n*\n* In order to upload an image at the current selection position\n* (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),\n* execute the command and pass the native image file instance:\n*\n* ```ts\n* this.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {\n* \t// Assuming that only images were pasted:\n* \tconst images = Array.from( data.dataTransfer.files );\n*\n* \t// Upload the first image:\n* \teditor.execute( 'uploadImage', { file: images[ 0 ] } );\n* } );\n* ```\n*\n* It is also possible to insert multiple images at once:\n*\n* ```ts\n* editor.execute( 'uploadImage', {\n* \tfile: [\n* \t\tfile1,\n* \t\tfile2\n* \t]\n* } );\n* ```\n*/\nvar UploadImageCommand = class extends Command {\n\t/**\n\t* Creates an instance of the `imageUlpoad` command. When executed, the command upload one of\n\t* the currently selected image from computer.\n\t*\n\t* @param editor The editor instance.\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.set(\"isAccessAllowed\", true);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst selectedElement = editor.model.document.selection.getSelectedElement();\n\t\tthis.isEnabled = imageUtils.isImageAllowed() || imageUtils.isImage(selectedElement);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options Options for the executed command.\n\t* @param options.file The image file or an array of image files to upload.\n\t*/\n\texecute(options) {\n\t\tconst files = toArray(options.file);\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tconst selectionAttributes = Object.fromEntries(selection.getAttributes());\n\t\tfiles.forEach((file, index) => {\n\t\t\tconst selectedElement = selection.getSelectedElement();\n\t\t\tif (index && selectedElement && imageUtils.isImage(selectedElement)) {\n\t\t\t\tconst position = this.editor.model.createPositionAfter(selectedElement);\n\t\t\t\tthis._uploadImage(file, selectionAttributes, position);\n\t\t\t} else this._uploadImage(file, selectionAttributes);\n\t\t});\n\t}\n\t/**\n\t* Handles uploading single file.\n\t*/\n\t_uploadImage(file, attributes, position) {\n\t\tconst editor = this.editor;\n\t\tconst loader = editor.plugins.get(FileRepository).createLoader(file);\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tif (!loader) return;\n\t\timageUtils.insertImage({\n\t\t\t...attributes,\n\t\t\tuploadId: loader.id\n\t\t}, position);\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 image/imageupload/imageuploadediting\n*/\n/**\n* The editing part of the image upload feature. It registers the `'uploadImage'` command\n* and the `imageUpload` command as an aliased name.\n*\n* When an image is uploaded, it fires the {@link ~ImageUploadEditing#event:uploadComplete `uploadComplete`} event\n* that allows adding custom attributes to the {@link module:engine/model/element~ModelElement image element}.\n*/\nvar ImageUploadEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tFileRepository,\n\t\t\tNotification,\n\t\t\tClipboardPipeline,\n\t\t\tImageUtils\n\t\t];\n\t}\n\tstatic get pluginName() {\n\t\treturn \"ImageUploadEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and\n\t* model elements during the upload.\n\t*\n\t* Model element of the uploaded image can change, for instance, when {@link module:image/image/imagetypecommand~ImageTypeCommand}\n\t* is executed as a result of adding caption or changing image style. As a result, the upload logic must keep track of the model\n\t* element (reference) and resolve the upload for the correct model element (instead of the one that landed in the `$graveyard`\n\t* after image type changed).\n\t*/\n\t_uploadImageElements;\n\t/**\n\t* An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and\n\t* upload responses for handling images dragged during their upload process. When such images are later\n\t* dropped, their original upload IDs no longer exist in the registry (as the original upload completed).\n\t* This map preserves the upload responses to properly handle such cases.\n\t*/\n\t_uploadedImages = /* @__PURE__ */ new Map();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"image\", { upload: { types: [\n\t\t\t\"jpeg\",\n\t\t\t\"png\",\n\t\t\t\"gif\",\n\t\t\t\"bmp\",\n\t\t\t\"webp\",\n\t\t\t\"tiff\"\n\t\t] } });\n\t\tthis._uploadImageElements = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst doc = editor.model.document;\n\t\tconst conversion = editor.conversion;\n\t\tconst fileRepository = editor.plugins.get(FileRepository);\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst clipboardPipeline = editor.plugins.get(\"ClipboardPipeline\");\n\t\tconst imageTypes = createImageTypeRegExp(editor.config.get(\"image.upload.types\"));\n\t\tconst uploadImageCommand = new UploadImageCommand(editor);\n\t\teditor.commands.add(\"uploadImage\", uploadImageCommand);\n\t\teditor.commands.add(\"imageUpload\", uploadImageCommand);\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"img\",\n\t\t\t\tkey: \"uploadId\"\n\t\t\t},\n\t\t\tmodel: \"uploadId\"\n\t\t}).add((dispatcher) => dispatcher.on(\"element:img\", (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.test(data.viewItem, { attributes: [\"data-ck-upload-id\"] })) return;\n\t\t\tconst uploadId = data.viewItem.getAttribute(\"data-ck-upload-id\");\n\t\t\tif (!uploadId) return;\n\t\t\tif (!data.modelRange) return;\n\t\t\tconst [modelElement] = Array.from(data.modelRange.getItems({ shallow: true }));\n\t\t\tconst loader = fileRepository.loaders.get(uploadId);\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (modelElement) {\n\t\t\t\tconversionApi.writer.setAttribute(\"uploadId\", uploadId, modelElement);\n\t\t\t\tconversionApi.consumable.consume(data.viewItem, { attributes: [\"data-ck-upload-id\"] });\n\t\t\t\tif (loader && loader.data) conversionApi.writer.setAttribute(\"uploadStatus\", loader.status, modelElement);\n\t\t\t}\n\t\t}, { priority: \"low\" }));\n\t\tthis.listenTo(editor.editing.view.document, \"clipboardInput\", (evt, data) => {\n\t\t\tif (isHtmlInDataTransfer(data.dataTransfer)) return;\n\t\t\tconst images = Array.from(data.dataTransfer.files).filter((file) => {\n\t\t\t\tif (!file) return false;\n\t\t\t\treturn imageTypes.test(file.type);\n\t\t\t});\n\t\t\tif (!images.length) return;\n\t\t\tevt.stop();\n\t\t\teditor.model.change((writer) => {\n\t\t\t\tif (data.targetRanges) writer.setSelection(data.targetRanges.map((viewRange) => editor.editing.mapper.toModelRange(viewRange)));\n\t\t\t\teditor.execute(\"uploadImage\", { file: images });\n\t\t\t});\n\t\t\tif (!editor.commands.get(\"uploadImage\").isAccessAllowed) {\n\t\t\t\tconst notification = editor.plugins.get(\"Notification\");\n\t\t\t\tconst t = editor.locale.t;\n\t\t\t\tnotification.showWarning(t(\"You have no image upload permissions.\"), { namespace: \"image\" });\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(clipboardPipeline, \"inputTransformation\", (evt, data) => {\n\t\t\tconst fetchableImages = Array.from(editor.editing.view.createRangeIn(data.content)).map((value) => value.item).filter((viewElement) => isLocalImage(imageUtils, viewElement) && !viewElement.getAttribute(\"uploadProcessed\")).map((viewElement) => {\n\t\t\t\treturn {\n\t\t\t\t\tpromise: fetchLocalImage(viewElement),\n\t\t\t\t\timageElement: viewElement\n\t\t\t\t};\n\t\t\t});\n\t\t\tif (!fetchableImages.length) return;\n\t\t\tconst writer = new ViewUpcastWriter(editor.editing.view.document);\n\t\t\tfor (const fetchableImage of fetchableImages) {\n\t\t\t\twriter.setAttribute(\"uploadProcessed\", true, fetchableImage.imageElement);\n\t\t\t\tconst loader = fileRepository.createLoader(fetchableImage.promise);\n\t\t\t\tif (loader) {\n\t\t\t\t\twriter.setAttribute(\"src\", \"\", fetchableImage.imageElement);\n\t\t\t\t\twriter.setAttribute(\"uploadId\", loader.id, fetchableImage.imageElement);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\teditor.editing.view.document.on(\"dragover\", (evt, data) => {\n\t\t\tdata.preventDefault();\n\t\t});\n\t\tdoc.on(\"change\", () => {\n\t\t\tconst changes = doc.differ.getChanges({ includeChangesInGraveyard: true }).reverse();\n\t\t\tconst insertedImagesIds = /* @__PURE__ */ new Set();\n\t\t\tfor (const entry of changes) if (entry.type == \"insert\" && entry.name != \"$text\") {\n\t\t\t\tconst item = entry.position.nodeAfter;\n\t\t\t\tconst isInsertedInGraveyard = entry.position.root.rootName == \"$graveyard\";\n\t\t\t\tfor (const imageElement of getImagesFromChangeItem(editor, item)) {\n\t\t\t\t\tconst uploadId = imageElement.getAttribute(\"uploadId\");\n\t\t\t\t\tconst uploadStatus = imageElement.getAttribute(\"uploadStatus\");\n\t\t\t\t\tif (!uploadId || uploadStatus == \"complete\") continue;\n\t\t\t\t\tconst loader = fileRepository.loaders.get(uploadId);\n\t\t\t\t\tif (!loader) {\n\t\t\t\t\t\tif (!isInsertedInGraveyard && this._uploadedImages.has(uploadId)) editor.model.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\t\t\t\t\twriter.setAttribute(\"uploadStatus\", \"complete\", imageElement);\n\t\t\t\t\t\t\tthis.fire(\"uploadComplete\", {\n\t\t\t\t\t\t\t\tdata: this._uploadedImages.get(uploadId),\n\t\t\t\t\t\t\t\timageElement\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (isInsertedInGraveyard) {\n\t\t\t\t\t\tif (!insertedImagesIds.has(uploadId)) {\n\t\t\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\t\t\tif (Array.from(this._uploadImageElements.get(uploadId)).every((element) => element.root.rootName == \"$graveyard\")) loader.abort();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tinsertedImagesIds.add(uploadId);\n\t\t\t\t\t\tif (!this._uploadImageElements.has(uploadId)) this._uploadImageElements.set(uploadId, /* @__PURE__ */ new Set([imageElement]));\n\t\t\t\t\t\telse this._uploadImageElements.get(uploadId).add(imageElement);\n\t\t\t\t\t\tif (loader.status == \"idle\") this._readAndUpload(loader);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.on(\"uploadComplete\", (evt, { imageElement, data }) => {\n\t\t\tconst urls = data.urls ? data.urls : data;\n\t\t\tthis.editor.model.change((writer) => {\n\t\t\t\twriter.setAttribute(\"src\", urls.default, imageElement);\n\t\t\t\tthis._parseAndSetSrcsetAttributeOnImage(urls, imageElement, writer);\n\t\t\t\timageUtils.setImageNaturalSizeAttributes(imageElement);\n\t\t\t});\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst schema = this.editor.model.schema;\n\t\tif (this.editor.plugins.has(\"ImageBlockEditing\")) {\n\t\t\tschema.extend(\"imageBlock\", { allowAttributes: [\"uploadId\", \"uploadStatus\"] });\n\t\t\tthis._registerConverters(\"imageBlock\");\n\t\t}\n\t\tif (this.editor.plugins.has(\"ImageInlineEditing\")) {\n\t\t\tschema.extend(\"imageInline\", { allowAttributes: [\"uploadId\", \"uploadStatus\"] });\n\t\t\tthis._registerConverters(\"imageInline\");\n\t\t}\n\t}\n\t/**\n\t* Reads and uploads an image.\n\t*\n\t* The image is read from the disk and as a Base64-encoded string it is set temporarily to\n\t* `image[src]`. When the image is successfully uploaded, the temporary data is replaced with the target\n\t* image's URL (the URL to the uploaded image on the server).\n\t*/\n\t_readAndUpload(loader) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst t = editor.locale.t;\n\t\tconst fileRepository = editor.plugins.get(FileRepository);\n\t\tconst notification = editor.plugins.get(Notification);\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst imageUploadElements = this._uploadImageElements;\n\t\tmodel.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\tconst elements = imageUploadElements.get(loader.id);\n\t\t\tfor (const element of elements) writer.setAttribute(\"uploadStatus\", \"reading\", element);\n\t\t});\n\t\treturn loader.read().then(() => {\n\t\t\tconst promise = loader.upload();\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (editor.ui) editor.ui.ariaLiveAnnouncer.announce(t(\"Uploading image\"));\n\t\t\tfor (const imageElement of imageUploadElements.get(loader.id)) {\n\t\t\t\t/* istanbul ignore next -- @preserve */\n\t\t\t\tif (env.isSafari) {\n\t\t\t\t\tconst viewFigure = editor.editing.mapper.toViewElement(imageElement);\n\t\t\t\t\tconst viewImg = imageUtils.findViewImgElement(viewFigure);\n\t\t\t\t\teditor.editing.view.once(\"render\", () => {\n\t\t\t\t\t\tif (!viewImg.parent) return;\n\t\t\t\t\t\tconst domFigure = editor.editing.view.domConverter.mapViewToDom(viewImg.parent);\n\t\t\t\t\t\tif (!domFigure) return;\n\t\t\t\t\t\tconst originalDisplay = domFigure.style.display;\n\t\t\t\t\t\tdomFigure.style.display = \"none\";\n\t\t\t\t\t\tdomFigure._ckHack = domFigure.offsetHeight;\n\t\t\t\t\t\tdomFigure.style.display = originalDisplay;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tmodel.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\t\t\twriter.setAttribute(\"uploadStatus\", \"uploading\", imageElement);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn promise;\n\t\t}).then((data) => {\n\t\t\tmodel.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\t\tfor (const imageElement of imageUploadElements.get(loader.id)) {\n\t\t\t\t\twriter.setAttribute(\"uploadStatus\", \"complete\", imageElement);\n\t\t\t\t\tthis.fire(\"uploadComplete\", {\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\timageElement\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif (editor.ui) editor.ui.ariaLiveAnnouncer.announce(t(\"Image upload complete\"));\n\t\t\t\tthis._uploadedImages.set(loader.id, data);\n\t\t\t});\n\t\t\tclean();\n\t\t}).catch((error) => {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (editor.ui) editor.ui.ariaLiveAnnouncer.announce(t(\"Error during image upload\"));\n\t\t\tif (loader.status !== \"error\" && loader.status !== \"aborted\") throw error;\n\t\t\tif (loader.status == \"error\" && error) notification.showWarning(error, {\n\t\t\t\ttitle: t(\"Upload failed\"),\n\t\t\t\tnamespace: \"upload\"\n\t\t\t});\n\t\t\tmodel.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\t\tfor (const imageElement of imageUploadElements.get(loader.id)) if (imageElement.root.rootName !== \"$graveyard\") writer.remove(imageElement);\n\t\t\t});\n\t\t\tclean();\n\t\t});\n\t\tfunction clean() {\n\t\t\tmodel.enqueueChange({ isUndoable: false }, (writer) => {\n\t\t\t\tfor (const imageElement of imageUploadElements.get(loader.id)) {\n\t\t\t\t\twriter.removeAttribute(\"uploadId\", imageElement);\n\t\t\t\t\twriter.removeAttribute(\"uploadStatus\", imageElement);\n\t\t\t\t}\n\t\t\t\timageUploadElements.delete(loader.id);\n\t\t\t});\n\t\t\tfileRepository.destroyLoader(loader);\n\t\t}\n\t}\n\t/**\n\t* Creates the `srcset` attribute based on a given file upload response and sets it as an attribute to a specific image element.\n\t*\n\t* @param data Data object from which `srcset` will be created.\n\t* @param image The image element on which the `srcset` attribute will be set.\n\t*/\n\t_parseAndSetSrcsetAttributeOnImage(data, image, writer) {\n\t\tlet maxWidth = 0;\n\t\tconst srcsetAttribute = Object.keys(data).filter((key) => {\n\t\t\tconst width = parseInt(key, 10);\n\t\t\tif (!isNaN(width)) {\n\t\t\t\tmaxWidth = Math.max(maxWidth, width);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}).map((key) => `${data[key]} ${key}w`).join(\", \");\n\t\tif (srcsetAttribute != \"\") {\n\t\t\tconst attributes = { srcset: srcsetAttribute };\n\t\t\tif (!image.hasAttribute(\"width\") && !image.hasAttribute(\"height\")) attributes.width = maxWidth;\n\t\t\twriter.setAttributes(attributes, image);\n\t\t}\n\t}\n\t/**\n\t* Registers image upload converters.\n\t*\n\t* @param imageType The type of the image.\n\t*/\n\t_registerConverters(imageType) {\n\t\tconst { conversion, plugins } = this.editor;\n\t\tconst fileRepository = plugins.get(FileRepository);\n\t\tconst imageUtils = plugins.get(ImageUtils);\n\t\tconversion.for(\"dataDowncast\").add((dispatcher) => {\n\t\t\tdispatcher.on(`attribute:uploadId:${imageType}`, (evt, data, conversionApi) => {\n\t\t\t\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\t\t\t\tconst loader = fileRepository.loaders.get(data.attributeNewValue);\n\t\t\t\tif (!loader || !loader.data) return null;\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement(data.item);\n\t\t\t\tconst img = imageUtils.findViewImgElement(viewElement);\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif (img) {\n\t\t\t\t\tconversionApi.consumable.consume(data.item, evt.name);\n\t\t\t\t\tconversionApi.writer.setAttribute(\"data-ck-upload-id\", loader.id, img);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* TODO move this to the clipboard package.\n*\n* Returns `true` if non-empty `text/html` is included in the data transfer.\n*/\nfunction isHtmlInDataTransfer(dataTransfer) {\n\treturn Array.from(dataTransfer.types).includes(\"text/html\") && dataTransfer.getData(\"text/html\") !== \"\";\n}\nfunction getImagesFromChangeItem(editor, item) {\n\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\treturn Array.from(editor.model.createRangeOn(item)).filter((value) => imageUtils.isImage(value.item)).map((value) => value.item);\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 image/imageupload\n*/\n/**\n* The image upload plugin.\n*\n* For a detailed overview, check the {@glink features/images/image-upload/image-upload image upload feature} documentation.\n*\n* This plugin does not do anything directly, but it loads a set of specific plugins to enable image uploading:\n*\n* * {@link module:image/imageupload/imageuploadediting~ImageUploadEditing},\n* * {@link module:image/imageupload/imageuploadui~ImageUploadUI},\n* * {@link module:image/imageupload/imageuploadprogress~ImageUploadProgress}.\n*/\nvar ImageUpload = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageUpload\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageUploadEditing,\n\t\t\tImageUploadUI,\n\t\t\tImageUploadProgress\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 image/imageinsert/ui/imageinserturlview\n*/\n/**\n* The insert an image via URL view.\n*\n* See {@link module:image/imageinsert/imageinsertviaurlui~ImageInsertViaUrlUI}.\n*\n* @internal\n*/\nvar ImageInsertUrlView = class extends View {\n\t/**\n\t* The URL input field view.\n\t*/\n\turlInputView;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"imageURLInputValue\", \"\");\n\t\tthis.set(\"isImageSelected\", false);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.urlInputView = this._createUrlInputView();\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-image-insert-url\"],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: [this.urlInputView, {\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-image-insert-url__action-row\"] }\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Creates the {@link #urlInputView}.\n\t*/\n\t_createUrlInputView() {\n\t\tconst locale = this.locale;\n\t\tconst t = locale.t;\n\t\tconst urlInputView = new LabeledFieldView(locale, createLabeledInputText);\n\t\turlInputView.bind(\"label\").to(this, \"isImageSelected\", (value) => value ? t(\"Update image URL\") : t(\"Insert image via URL\"));\n\t\turlInputView.bind(\"isEnabled\").to(this);\n\t\turlInputView.fieldView.inputMode = \"url\";\n\t\turlInputView.fieldView.placeholder = \"https://example.com/image.png\";\n\t\turlInputView.fieldView.bind(\"value\").to(this, \"imageURLInputValue\", (value) => value || \"\");\n\t\turlInputView.fieldView.on(\"input\", () => {\n\t\t\tthis.imageURLInputValue = urlInputView.fieldView.element.value.trim();\n\t\t});\n\t\treturn urlInputView;\n\t}\n\t/**\n\t* Focuses the view.\n\t*/\n\tfocus() {\n\t\tthis.urlInputView.focus();\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 image/imageinsert/imageinsertviaurlui\n*/\n/**\n* The image insert via URL plugin (UI part).\n*\n* The plugin introduces two UI components to the {@link module:ui/componentfactory~ComponentFactory UI component factory}:\n*\n* * the `'insertImageViaUrl'` toolbar button,\n* * the `'menuBar:insertImageViaUrl'` menu bar component.\n*\n* It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are default components\n* through which inserting image via URL is available.\n*/\nvar ImageInsertViaUrlUI = class extends Plugin {\n\t_imageInsertUI;\n\t_formView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageInsertViaUrlUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageInsertUI, Dialog];\n\t}\n\tinit() {\n\t\tthis.editor.ui.componentFactory.add(\"insertImageViaUrl\", () => this._createToolbarButton());\n\t\tthis.editor.ui.componentFactory.add(\"menuBar:insertImageViaUrl\", () => this._createMenuBarButton(\"standalone\"));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tthis._imageInsertUI = this.editor.plugins.get(\"ImageInsertUI\");\n\t\tthis._imageInsertUI.registerIntegration({\n\t\t\tname: \"url\",\n\t\t\tobservable: () => this.editor.commands.get(\"insertImage\"),\n\t\t\tbuttonViewCreator: () => this._createToolbarButton(),\n\t\t\tformViewCreator: () => this._createDropdownButton(),\n\t\t\tmenuBarButtonViewCreator: (isOnly) => this._createMenuBarButton(isOnly ? \"insertOnly\" : \"insertNested\")\n\t\t});\n\t}\n\t/**\n\t* Creates the base for various kinds of the button component provided by this feature.\n\t*/\n\t_createInsertUrlButton(ButtonClass) {\n\t\tconst button = new ButtonClass(this.editor.locale);\n\t\tbutton.icon = IconImageUrl;\n\t\tbutton.on(\"execute\", () => {\n\t\t\tthis._showModal();\n\t\t});\n\t\treturn button;\n\t}\n\t/**\n\t* Creates a simple toolbar button, with an icon and a tooltip.\n\t*/\n\t_createToolbarButton() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createInsertUrlButton(ButtonView);\n\t\tbutton.tooltip = true;\n\t\tbutton.bind(\"label\").to(this._imageInsertUI, \"isImageSelected\", (isImageSelected) => isImageSelected ? t(\"Update image URL\") : t(\"Insert image via URL\"));\n\t\treturn button;\n\t}\n\t/**\n\t* Creates a button for the dropdown view, with an icon, text and no tooltip.\n\t*/\n\t_createDropdownButton() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createInsertUrlButton(ButtonView);\n\t\tbutton.withText = true;\n\t\tbutton.bind(\"label\").to(this._imageInsertUI, \"isImageSelected\", (isImageSelected) => isImageSelected ? t(\"Update image URL\") : t(\"Insert via URL\"));\n\t\treturn button;\n\t}\n\t/**\n\t* Creates a button for the menu bar.\n\t*/\n\t_createMenuBarButton(type) {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createInsertUrlButton(MenuBarMenuListItemButtonView);\n\t\tbutton.withText = true;\n\t\tswitch (type) {\n\t\t\tcase \"standalone\":\n\t\t\t\tbutton.label = t(\"Image via URL\");\n\t\t\t\tbreak;\n\t\t\tcase \"insertOnly\":\n\t\t\t\tbutton.label = t(\"Image\");\n\t\t\t\tbreak;\n\t\t\tcase \"insertNested\": button.label = t(\"Via URL\");\n\t\t}\n\t\treturn button;\n\t}\n\t/**\n\t* Creates the form view used to submit the image URL.\n\t*/\n\t_createInsertUrlView() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst replaceImageSourceCommand = editor.commands.get(\"replaceImageSource\");\n\t\tconst insertImageCommand = editor.commands.get(\"insertImage\");\n\t\tconst imageInsertUrlView = new ImageInsertUrlView(locale);\n\t\timageInsertUrlView.bind(\"isImageSelected\").to(this._imageInsertUI);\n\t\timageInsertUrlView.bind(\"isEnabled\").toMany([insertImageCommand, replaceImageSourceCommand], \"isEnabled\", (...isEnabled) => isEnabled.some((isCommandEnabled) => isCommandEnabled));\n\t\treturn imageInsertUrlView;\n\t}\n\t/**\n\t* Shows the insert image via URL form view in a modal.\n\t*/\n\t_showModal() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst dialog = editor.plugins.get(\"Dialog\");\n\t\tif (!this._formView) {\n\t\t\tthis._formView = this._createInsertUrlView();\n\t\t\tthis._formView.on(\"submit\", () => this._handleSave());\n\t\t}\n\t\tconst replaceImageSourceCommand = editor.commands.get(\"replaceImageSource\");\n\t\tthis._formView.imageURLInputValue = replaceImageSourceCommand.value || \"\";\n\t\tdialog.show({\n\t\t\tid: \"insertImageViaUrl\",\n\t\t\ttitle: t(\"Image via URL\"),\n\t\t\tisModal: true,\n\t\t\tcontent: this._formView,\n\t\t\tactionButtons: [{\n\t\t\t\tlabel: t(\"Cancel\"),\n\t\t\t\twithText: true,\n\t\t\t\tonExecute: () => dialog.hide()\n\t\t\t}, {\n\t\t\t\tlabel: this._imageInsertUI.isImageSelected ? t(\"Save\") : t(\"Insert\"),\n\t\t\t\tclass: \"ck-button-action\",\n\t\t\t\twithText: true,\n\t\t\t\tonExecute: () => this._handleSave()\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* Executes appropriate command depending on selection and form value.\n\t*/\n\t_handleSave() {\n\t\tif (this.editor.commands.get(\"replaceImageSource\").isEnabled) this.editor.execute(\"replaceImageSource\", { source: this._formView.imageURLInputValue });\n\t\telse this.editor.execute(\"insertImage\", { source: this._formView.imageURLInputValue });\n\t\tthis.editor.plugins.get(\"Dialog\").hide();\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 image/imageinsertviaurl\n*/\n/**\n* The image insert via URL plugin.\n*\n* For a detailed overview, check the {@glink features/images/images-inserting\n* Insert images via source URL} documentation.\n*\n* This plugin does not do anything directly, but it loads a set of specific plugins\n* to enable image inserting via implemented integrations:\n*\n* * {@link module:image/imageinsert/imageinsertui~ImageInsertUI},\n*/\nvar ImageInsertViaUrl = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageInsertViaUrl\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageInsertViaUrlUI, ImageInsertUI];\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 image/imageinsert\n*/\n/**\n* The image insert plugin.\n*\n* For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}\n* and {@glink features/images/images-inserting Insert images via source URL} documentation.\n*\n* This plugin does not do anything directly, but it loads a set of specific plugins\n* to enable image uploading or inserting via implemented integrations:\n*\n* * {@link module:image/imageupload~ImageUpload}\n* * {@link module:image/imageinsert/imageinsertui~ImageInsertUI}\n*/\nvar ImageInsert = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageInsert\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageUpload,\n\t\t\tImageInsertViaUrl,\n\t\t\tImageInsertUI\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 image/imageresize/resizeimagecommand\n*/\n/**\n* The resize image command. Currently, it only supports the width attribute.\n*/\nvar ResizeImageCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst element = editor.plugins.get(\"ImageUtils\").getClosestSelectedImageElement(editor.model.document.selection);\n\t\tthis.isEnabled = !!element;\n\t\tif (!element || !element.hasAttribute(\"resizedWidth\")) this.value = null;\n\t\telse this.value = {\n\t\t\twidth: element.getAttribute(\"resizedWidth\"),\n\t\t\theight: null\n\t\t};\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* ```ts\n\t* // Sets the width to 50%:\n\t* editor.execute( 'resizeImage', { width: '50%' } );\n\t*\n\t* // Removes the width attribute:\n\t* editor.execute( 'resizeImage', { width: null } );\n\t* ```\n\t*\n\t* @param options\n\t* @param options.width The new width of the image.\n\t* @fires execute\n\t*/\n\texecute(options) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconst imageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n\t\tthis.value = {\n\t\t\twidth: options.width,\n\t\t\theight: null\n\t\t};\n\t\tif (imageElement) model.change((writer) => {\n\t\t\twriter.setAttribute(\"resizedWidth\", options.width, imageElement);\n\t\t\twriter.removeAttribute(\"resizedHeight\", imageElement);\n\t\t\timageUtils.setImageNaturalSizeAttributes(imageElement);\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* The image resize editing feature.\n*\n* It adds the ability to resize each image using handles or manually by\n* {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n*/\nvar ImageResizeEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageResizeEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"IR\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"image\", {\n\t\t\tresizeUnit: \"%\",\n\t\t\tresizeOptions: [\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeImage:original\",\n\t\t\t\t\tvalue: null,\n\t\t\t\t\ticon: \"original\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeImage:custom\",\n\t\t\t\t\tvalue: \"custom\",\n\t\t\t\t\ticon: \"custom\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeImage:25\",\n\t\t\t\t\tvalue: \"25\",\n\t\t\t\t\ticon: \"small\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeImage:50\",\n\t\t\t\t\tvalue: \"50\",\n\t\t\t\t\ticon: \"medium\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeImage:75\",\n\t\t\t\t\tvalue: \"75\",\n\t\t\t\t\ticon: \"large\"\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst resizeImageCommand = new ResizeImageCommand(editor);\n\t\tthis._registerConverters(\"imageBlock\");\n\t\tthis._registerConverters(\"imageInline\");\n\t\teditor.commands.add(\"resizeImage\", resizeImageCommand);\n\t\teditor.commands.add(\"imageResize\", resizeImageCommand);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tthis._registerSchema();\n\t}\n\t_registerSchema() {\n\t\tconst schema = this.editor.model.schema;\n\t\tif (this.editor.plugins.has(\"ImageBlockEditing\")) {\n\t\t\tschema.extend(\"imageBlock\", { allowAttributes: [\"resizedWidth\", \"resizedHeight\"] });\n\t\t\tschema.setAttributeProperties(\"resizedWidth\", { isFormatting: true });\n\t\t\tschema.setAttributeProperties(\"resizedHeight\", { isFormatting: true });\n\t\t}\n\t\tif (this.editor.plugins.has(\"ImageInlineEditing\")) {\n\t\t\tschema.extend(\"imageInline\", { allowAttributes: [\"resizedWidth\", \"resizedHeight\"] });\n\t\t\tschema.setAttributeProperties(\"resizedWidth\", { isFormatting: true });\n\t\t\tschema.setAttributeProperties(\"resizedHeight\", { isFormatting: true });\n\t\t}\n\t}\n\t/**\n\t* Registers image resize converters.\n\t*\n\t* @param imageType The type of the image.\n\t*/\n\t_registerConverters(imageType) {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\teditor.conversion.for(\"downcast\").add((dispatcher) => dispatcher.on(`attribute:resizedWidth:${imageType}`, (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst viewImg = conversionApi.mapper.toViewElement(data.item);\n\t\t\tif (data.attributeNewValue !== null) {\n\t\t\t\tviewWriter.setStyle(\"width\", data.attributeNewValue, viewImg);\n\t\t\t\tviewWriter.addClass(\"image_resized\", viewImg);\n\t\t\t} else {\n\t\t\t\tviewWriter.removeStyle(\"width\", viewImg);\n\t\t\t\tviewWriter.removeClass(\"image_resized\", viewImg);\n\t\t\t}\n\t\t}));\n\t\teditor.conversion.for(\"dataDowncast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tname: imageType,\n\t\t\t\tkey: \"resizedHeight\"\n\t\t\t},\n\t\t\tview: (modelAttributeValue) => ({\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: { \"height\": modelAttributeValue }\n\t\t\t})\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => dispatcher.on(`attribute:resizedHeight:${imageType}`, (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst viewImg = conversionApi.mapper.toViewElement(data.item);\n\t\t\tconst target = imageType === \"imageInline\" ? imageUtils.findViewImgElement(viewImg) : viewImg;\n\t\t\tif (data.attributeNewValue !== null) viewWriter.setStyle(\"height\", data.attributeNewValue, target);\n\t\t\telse viewWriter.removeStyle(\"height\", target);\n\t\t}));\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: imageType === \"imageBlock\" ? \"figure\" : \"img\",\n\t\t\t\tstyles: { width: /.+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"resizedWidth\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tif (widthAndHeightStylesAreBothSet(viewElement)) return null;\n\t\t\t\t\treturn viewElement.getStyle(\"width\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: imageType === \"imageBlock\" ? \"figure\" : \"img\",\n\t\t\t\tstyles: { height: /.+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"resizedHeight\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tif (widthAndHeightStylesAreBothSet(viewElement)) return null;\n\t\t\t\t\treturn viewElement.getStyle(\"height\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(`element:${imageType === \"imageBlock\" ? \"figure\" : \"img\"}`, (evt, data, conversionApi) => {\n\t\t\t\tconversionApi.consumable.consume(data.viewItem, { classes: [\"image_resized\"] });\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 image/imageresize/imageresizebuttons\n*/\nconst RESIZE_ICONS = /* #__PURE__ */ (() => ({\n\tsmall: IconObjectSizeSmall,\n\tmedium: IconObjectSizeMedium,\n\tlarge: IconObjectSizeLarge,\n\tcustom: IconObjectSizeCustom,\n\toriginal: IconObjectSizeFull\n}))();\n/**\n* The image resize buttons plugin.\n*\n* It adds a possibility to resize images using the toolbar dropdown or individual buttons, depending on the plugin configuration.\n*/\nvar ImageResizeButtons = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageResizeEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageResizeButtons\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* The resize unit.\n\t* @default '%'\n\t*/\n\t_resizeUnit;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._resizeUnit = editor.config.get(\"image.resizeUnit\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst options = editor.config.get(\"image.resizeOptions\");\n\t\tconst command = editor.commands.get(\"resizeImage\");\n\t\tthis.bind(\"isEnabled\").to(command);\n\t\tfor (const option of options) this._registerImageResizeButton(option);\n\t\tthis._registerImageResizeDropdown(options);\n\t}\n\t/**\n\t* A helper function that creates a standalone button component for the plugin.\n\t*\n\t* @param option A model of the resize option.\n\t*/\n\t_registerImageResizeButton(option) {\n\t\tconst editor = this.editor;\n\t\tconst { name, value, icon } = option;\n\t\teditor.ui.componentFactory.add(name, (locale) => {\n\t\t\tconst button = new ButtonView(locale);\n\t\t\tconst command = editor.commands.get(\"resizeImage\");\n\t\t\tconst labelText = this._getOptionLabelValue(option, true);\n\t\t\tif (!RESIZE_ICONS[icon])\n /**\n\t\t\t* When configuring {@link module:image/imageconfig~ImageConfig#resizeOptions `config.image.resizeOptions`} for standalone\n\t\t\t* buttons, a valid `icon` token must be set for each option.\n\t\t\t*\n\t\t\t* See all valid options described in the\n\t\t\t* {@link module:image/imageconfig~ImageResizeOption plugin configuration}.\n\t\t\t*\n\t\t\t* @error imageresizebuttons-missing-icon\n\t\t\t* @param {module:image/imageconfig~ImageResizeOption} option Invalid image resize option.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"imageresizebuttons-missing-icon\", editor, option);\n\t\t\tbutton.set({\n\t\t\t\tlabel: labelText,\n\t\t\t\ticon: RESIZE_ICONS[icon],\n\t\t\t\ttooltip: labelText,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tbutton.bind(\"isEnabled\").to(this);\n\t\t\tif (editor.plugins.has(\"ImageCustomResizeUI\") && isCustomImageResizeOption(option)) {\n\t\t\t\tconst customResizeUI = editor.plugins.get(\"ImageCustomResizeUI\");\n\t\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\t\tcustomResizeUI._showForm(this._resizeUnit);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst optionValueWithUnit = value ? value + this._resizeUnit : null;\n\t\t\t\tbutton.bind(\"isOn\").to(command, \"value\", command, \"isEnabled\", getIsOnButtonCallback(optionValueWithUnit));\n\t\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\t\teditor.execute(\"resizeImage\", { width: optionValueWithUnit });\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn button;\n\t\t});\n\t}\n\t/**\n\t* A helper function that creates a dropdown component for the plugin containing all the resize options defined in\n\t* the editor configuration.\n\t*\n\t* @param options An array of configured options.\n\t*/\n\t_registerImageResizeDropdown(options) {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst originalSizeOption = options.find((option) => !option.value);\n\t\tconst componentCreator = (locale) => {\n\t\t\tconst command = editor.commands.get(\"resizeImage\");\n\t\t\tconst dropdownView = createDropdown(locale, DropdownButtonView);\n\t\t\tconst dropdownButton = dropdownView.buttonView;\n\t\t\tconst accessibleLabel = t(\"Resize image\");\n\t\t\tdropdownButton.set({\n\t\t\t\ttooltip: accessibleLabel,\n\t\t\t\tcommandValue: originalSizeOption.value,\n\t\t\t\ticon: RESIZE_ICONS.medium,\n\t\t\t\tisToggleable: true,\n\t\t\t\tlabel: this._getOptionLabelValue(originalSizeOption),\n\t\t\t\twithText: true,\n\t\t\t\tclass: \"ck-resize-image-button\",\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\tariaLabelledBy: void 0\n\t\t\t});\n\t\t\tdropdownButton.bind(\"label\").to(command, \"value\", (commandValue) => {\n\t\t\t\tif (commandValue && commandValue.width) return commandValue.width;\n\t\t\t\telse return this._getOptionLabelValue(originalSizeOption);\n\t\t\t});\n\t\t\tdropdownView.bind(\"isEnabled\").to(this);\n\t\t\taddListToDropdown(dropdownView, () => this._getResizeDropdownListItemDefinitions(options, command), {\n\t\t\t\tariaLabel: t(\"Image resize list\"),\n\t\t\t\trole: \"menu\"\n\t\t\t});\n\t\t\tthis.listenTo(dropdownView, \"execute\", (evt) => {\n\t\t\t\tif (\"onClick\" in evt.source) evt.source.onClick();\n\t\t\t\telse {\n\t\t\t\t\teditor.execute(evt.source.commandName, { width: evt.source.commandValue });\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t};\n\t\teditor.ui.componentFactory.add(\"resizeImage\", componentCreator);\n\t\teditor.ui.componentFactory.add(\"imageResize\", componentCreator);\n\t}\n\t/**\n\t* A helper function for creating an option label value string.\n\t*\n\t* @param option A resize option object.\n\t* @param forTooltip An optional flag for creating a tooltip label.\n\t* @returns A user-defined label combined from the numeric value and the resize unit or the default label\n\t* for reset options (`Original`).\n\t*/\n\t_getOptionLabelValue(option, forTooltip = false) {\n\t\tconst t = this.editor.t;\n\t\tif (option.label) return option.label;\n\t\telse if (forTooltip) {\n\t\t\tif (isCustomImageResizeOption(option)) return t(\"Custom image size\");\n\t\t\telse if (option.value) return t(\"Resize image to %0\", option.value + this._resizeUnit);\n\t\t\telse return t(\"Resize image to the original size\");\n\t\t} else if (isCustomImageResizeOption(option)) return t(\"Custom\");\n\t\telse if (option.value) return option.value + this._resizeUnit;\n\t\telse return t(\"Original\");\n\t}\n\t/**\n\t* A helper function that parses the resize options and returns list item definitions ready for use in the dropdown.\n\t*\n\t* @param options The resize options.\n\t* @param command The resize image command.\n\t* @returns Dropdown item definitions.\n\t*/\n\t_getResizeDropdownListItemDefinitions(options, command) {\n\t\tconst { editor } = this;\n\t\tconst itemDefinitions = new Collection();\n\t\tconst optionsWithSerializedValues = options.map((option) => {\n\t\t\tif (isCustomImageResizeOption(option)) return {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: \"custom\"\n\t\t\t};\n\t\t\tif (!option.value) return {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: null\n\t\t\t};\n\t\t\treturn {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: `${option.value}${this._resizeUnit}`\n\t\t\t};\n\t\t});\n\t\tfor (const option of optionsWithSerializedValues) {\n\t\t\tlet definition;\n\t\t\tif (editor.plugins.has(\"ImageCustomResizeUI\") && isCustomImageResizeOption(option)) {\n\t\t\t\tconst customResizeUI = editor.plugins.get(\"ImageCustomResizeUI\");\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: new UIModel({\n\t\t\t\t\t\tlabel: this._getOptionLabelValue(option),\n\t\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null,\n\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\tcustomResizeUI._showForm(this._resizeUnit);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\tconst allDropdownValues = Object.values(optionsWithSerializedValues).map((option) => option.valueWithUnits);\n\t\t\t\tdefinition.model.bind(\"isOn\").to(command, \"value\", command, \"isEnabled\", getIsOnCustomButtonCallback(allDropdownValues));\n\t\t\t} else {\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: new UIModel({\n\t\t\t\t\t\tcommandName: \"resizeImage\",\n\t\t\t\t\t\tcommandValue: option.valueWithUnits,\n\t\t\t\t\t\tlabel: this._getOptionLabelValue(option),\n\t\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\tdefinition.model.bind(\"isOn\").to(command, \"value\", command, \"isEnabled\", getIsOnButtonCallback(option.valueWithUnits));\n\t\t\t}\n\t\t\tdefinition.model.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\t\titemDefinitions.add(definition);\n\t\t}\n\t\treturn itemDefinitions;\n\t}\n};\n/**\n* A helper that checks if provided option triggers custom resize balloon.\n*/\nfunction isCustomImageResizeOption(option) {\n\treturn option.value === \"custom\";\n}\n/**\n* A helper function for setting the `isOn` state of buttons in value bindings.\n*/\nfunction getIsOnButtonCallback(value) {\n\treturn (commandValue, isEnabled) => {\n\t\tconst objectCommandValue = commandValue;\n\t\tif (objectCommandValue === void 0 || !isEnabled) return false;\n\t\tif (value === null && objectCommandValue === value) return true;\n\t\treturn objectCommandValue !== null && objectCommandValue.width === value;\n\t};\n}\n/**\n* A helper function for setting the `isOn` state of custom size button in value bindings.\n*/\nfunction getIsOnCustomButtonCallback(allDropdownValues) {\n\treturn (commandValue, isEnabled) => !allDropdownValues.some((dropdownValue) => getIsOnButtonCallback(dropdownValue)(commandValue, isEnabled));\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 RESIZABLE_IMAGES_CSS_SELECTOR = \"figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img\";\nconst RESIZED_IMAGE_CLASS = \"image_resized\";\n/**\n* The image resize by handles feature.\n*\n* It adds the ability to resize each image using handles or manually by\n* {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n*/\nvar ImageResizeHandles = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [WidgetResize, ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageResizeHandles\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst command = this.editor.commands.get(\"resizeImage\");\n\t\tthis.bind(\"isEnabled\").to(command);\n\t\tthis._setupResizerCreator();\n\t}\n\t/**\n\t* Attaches the listeners responsible for creating a resizer for each image, except for images inside the HTML embed preview.\n\t*/\n\t_setupResizerCreator() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\teditingView.addObserver(ImageLoadObserver);\n\t\tthis.listenTo(editingView.document, \"imageLoaded\", (evt, domEvent) => {\n\t\t\tif (!domEvent.target.matches(RESIZABLE_IMAGES_CSS_SELECTOR)) return;\n\t\t\tconst domConverter = editor.editing.view.domConverter;\n\t\t\tconst imageView = domConverter.domToView(domEvent.target);\n\t\t\tconst widgetView = imageUtils.getImageWidgetFromImageView(imageView);\n\t\t\tlet resizer = this.editor.plugins.get(WidgetResize).getResizerByViewElement(widgetView);\n\t\t\tif (resizer) {\n\t\t\t\tresizer.redraw();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst mapper = editor.editing.mapper;\n\t\t\tconst imageModel = mapper.toModelElement(widgetView);\n\t\t\tresizer = editor.plugins.get(WidgetResize).attachTo({\n\t\t\t\tunit: editor.config.get(\"image.resizeUnit\"),\n\t\t\t\tmodelElement: imageModel,\n\t\t\t\tviewElement: widgetView,\n\t\t\t\teditor,\n\t\t\t\tgetHandleHost(domWidgetElement) {\n\t\t\t\t\treturn domWidgetElement.querySelector(\"img\");\n\t\t\t\t},\n\t\t\t\tgetResizeHost() {\n\t\t\t\t\treturn domConverter.mapViewToDom(mapper.toViewElement(imageModel));\n\t\t\t\t},\n\t\t\t\tisCentered() {\n\t\t\t\t\treturn imageModel.getAttribute(\"imageStyle\") == \"alignCenter\";\n\t\t\t\t},\n\t\t\t\tonCommit(newValue) {\n\t\t\t\t\teditingView.change((writer) => {\n\t\t\t\t\t\twriter.removeClass(RESIZED_IMAGE_CLASS, widgetView);\n\t\t\t\t\t});\n\t\t\t\t\teditor.execute(\"resizeImage\", { width: newValue });\n\t\t\t\t}\n\t\t\t});\n\t\t\tresizer.on(\"updateSize\", () => {\n\t\t\t\tif (!widgetView.hasClass(RESIZED_IMAGE_CLASS)) editingView.change((writer) => {\n\t\t\t\t\twriter.addClass(RESIZED_IMAGE_CLASS, widgetView);\n\t\t\t\t});\n\t\t\t\tconst target = imageModel.name === \"imageInline\" ? imageView : widgetView;\n\t\t\t\tif (target.getStyle(\"height\")) editingView.change((writer) => {\n\t\t\t\t\twriter.removeStyle(\"height\", target);\n\t\t\t\t});\n\t\t\t});\n\t\t\tresizer.bind(\"isEnabled\").to(this);\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* Finds model, view and DOM element for selected image element. Returns `null` if there is no image selected.\n*\n* @param editor Editor instance.\n* @internal\n*/\nfunction getSelectedImageEditorNodes(editor) {\n\tconst { editing } = editor;\n\tconst imageModelElement = editor.plugins.get(\"ImageUtils\").getClosestSelectedImageElement(editor.model.document.selection);\n\tif (!imageModelElement) return null;\n\tconst imageViewElement = editing.mapper.toViewElement(imageModelElement);\n\treturn {\n\t\tmodel: imageModelElement,\n\t\tview: imageViewElement,\n\t\tdom: editing.view.domConverter.mapViewToDom(imageViewElement)\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 image/imageresize/utils/getselectedimagewidthinunits\n*/\n/**\n* Returns image width in specified units. It is width of image after resize.\n*\n* \t* If image is not selected or command is disabled then `null` will be returned.\n* \t* If image is not fully loaded (and it is impossible to determine its natural size) then `null` will be returned.\n*\t* If `targetUnit` percentage is passed then it will return width percentage of image related to its accessors.\n*\n* @param editor Editor instance.\n* @param targetUnit Unit in which dimension will be returned.\n* @returns Parsed image width after resize (with unit).\n* @internal\n*/\nfunction getSelectedImageWidthInUnits(editor, targetUnit) {\n\tconst imageNodes = getSelectedImageEditorNodes(editor);\n\tif (!imageNodes) return null;\n\tconst parsedResizedWidth = _tryParseDimensionWithUnit(imageNodes.model.getAttribute(\"resizedWidth\") || null);\n\tif (!parsedResizedWidth) return null;\n\tif (parsedResizedWidth.unit === targetUnit) return parsedResizedWidth;\n\tconst imageParentWidthPx = calculateResizeHostAncestorWidth(imageNodes.dom);\n\tconst imageHolderDimension = {\n\t\tunit: \"px\",\n\t\tvalue: new Rect(imageNodes.dom).width\n\t};\n\treturn _tryCastDimensionsToUnit(imageParentWidthPx, imageHolderDimension, targetUnit);\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 image/imageresize/ui/imagecustomresizeformview\n*/\n/**\n* The ImageCustomResizeFormView class.\n*\n* @internal\n*/\nvar ImageCustomResizeFormView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the form.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Resize unit shortcut.\n\t*/\n\tunit;\n\t/**\n\t* The Back button view displayed in the header.\n\t*/\n\tbackButtonView;\n\t/**\n\t* A button used to submit the form.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* An input with a label.\n\t*/\n\tlabeledInput;\n\t/**\n\t* A collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of views which can be focused in the form.\n\t*/\n\t_focusables;\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* An array of form validators used by {@link #isValid}.\n\t*/\n\t_validators;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, unit, validators) {\n\t\tsuper(locale);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.unit = unit;\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\t\tthis.labeledInput = this._createLabeledInputView();\n\t\tthis.children = this.createCollection([this._createHeaderView()]);\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tchildren: [this.labeledInput, this.saveButtonView],\n\t\t\tclass: [\"ck-form__row_with-submit\", \"ck-form__row_large-top-padding\"]\n\t\t}));\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._validators = validators;\n\t\tthis.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis.fire(\"cancel\");\n\t\t\tcancel();\n\t\t});\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-form\",\n\t\t\t\t\t\"ck-image-custom-resize-form\",\n\t\t\t\t\t\"ck-responsive-form\"\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\t[\n\t\t\tthis.backButtonView,\n\t\t\tthis.labeledInput,\n\t\t\tthis.saveButtonView\n\t\t].forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis.focusTracker.add(v.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Creates a back button view that cancels the form.\n\t*/\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn backButton;\n\t}\n\t/**\n\t* Creates a save button view that resize the image.\n\t*/\n\t_createSaveButton() {\n\t\tconst t = this.locale.t;\n\t\tconst saveButton = new ButtonView(this.locale);\n\t\tsaveButton.set({\n\t\t\tlabel: t(\"Save\"),\n\t\t\twithText: true,\n\t\t\ttype: \"submit\",\n\t\t\tclass: \"ck-button-action ck-button-bold\"\n\t\t});\n\t\treturn saveButton;\n\t}\n\t/**\n\t* Creates a header view for the form.\n\t*/\n\t_createHeaderView() {\n\t\tconst t = this.locale.t;\n\t\tconst header = new FormHeaderView(this.locale, { label: t(\"Image Resize\") });\n\t\theader.children.add(this.backButtonView, 0);\n\t\treturn header;\n\t}\n\t/**\n\t* Creates an input with a label.\n\t*\n\t* @returns Labeled field view instance.\n\t*/\n\t_createLabeledInputView() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputNumber);\n\t\tlabeledInput.label = t(\"Resize image (in %0)\", this.unit);\n\t\tlabeledInput.class = \"ck-labeled-field-view_full-width\";\n\t\tlabeledInput.fieldView.set({ step: .1 });\n\t\treturn labeledInput;\n\t}\n\t/**\n\t* Validates the form and returns `false` when some fields are invalid.\n\t*/\n\tisValid() {\n\t\tthis.resetFormStatus();\n\t\tfor (const validator of this._validators) {\n\t\t\tconst errorText = validator(this);\n\t\t\tif (errorText) {\n\t\t\t\tthis.labeledInput.errorText = errorText;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Cleans up the supplementary error and information text of the {@link #labeledInput}\n\t* bringing them back to the state when the form has been displayed for the first time.\n\t*\n\t* See {@link #isValid}.\n\t*/\n\tresetFormStatus() {\n\t\tthis.labeledInput.errorText = null;\n\t}\n\t/**\n\t* The native DOM `value` of the input element of {@link #labeledInput}.\n\t*/\n\tget rawSize() {\n\t\tconst { element } = this.labeledInput.fieldView;\n\t\tif (!element) return null;\n\t\treturn element.value;\n\t}\n\t/**\n\t* Get numeric value of size. Returns `null` if value of size input element in {@link #labeledInput}.is not a number.\n\t*/\n\tget parsedSize() {\n\t\tconst { rawSize } = this;\n\t\tif (rawSize === null) return null;\n\t\tconst parsed = Number.parseFloat(rawSize);\n\t\tif (Number.isNaN(parsed)) return null;\n\t\treturn parsed;\n\t}\n\t/**\n\t* Returns serialized image input size with unit.\n\t* Returns `null` if value of size input element in {@link #labeledInput}.is not a number.\n\t*/\n\tget sizeWithUnits() {\n\t\tconst { parsedSize, unit } = this;\n\t\tif (parsedSize === null) return null;\n\t\treturn `${parsedSize}${unit}`;\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* Returns min and max value of resize image in specified unit.\n*\n* @param editor Editor instance.\n* @param targetUnit Unit in which dimension will be returned.\n* @returns Possible resize range in numeric form.\n* @internal\n*/\nfunction getSelectedImagePossibleResizeRange(editor, targetUnit) {\n\tconst imageNodes = getSelectedImageEditorNodes(editor);\n\tif (!imageNodes) return null;\n\tconst imageParentWidthPx = calculateResizeHostAncestorWidth(imageNodes.dom);\n\tconst minimumImageWidth = _tryParseDimensionWithUnit(window.getComputedStyle(imageNodes.dom).minWidth) || {\n\t\tvalue: 1,\n\t\tunit: \"px\"\n\t};\n\treturn {\n\t\tunit: targetUnit,\n\t\tlower: Math.max(.1, _tryCastDimensionsToUnit(imageParentWidthPx, minimumImageWidth, targetUnit).value),\n\t\tupper: targetUnit === \"px\" ? imageParentWidthPx : 100\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 image/imageresize/imagecustomresizeui\n*/\n/**\n* The custom resize image UI plugin.\n*\n* The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n*/\nvar ImageCustomResizeUI = class extends Plugin {\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* A form containing a textarea and buttons, used to change the `alt` text value.\n\t*/\n\t_form;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageCustomResizeUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this._form) this._form.destroy();\n\t}\n\t/**\n\t* Creates the {@link module:image/imageresize/ui/imagecustomresizeformview~ImageCustomResizeFormView}\n\t* form.\n\t*/\n\t_createForm(unit) {\n\t\tconst editor = this.editor;\n\t\tthis._balloon = this.editor.plugins.get(\"ContextualBalloon\");\n\t\tthis._form = new (CssTransitionDisablerMixin(ImageCustomResizeFormView))(editor.locale, unit, getFormValidators(editor));\n\t\tthis._form.render();\n\t\tthis.listenTo(this._form, \"submit\", () => {\n\t\t\tif (this._form.isValid()) {\n\t\t\t\teditor.execute(\"resizeImage\", { width: this._form.sizeWithUnits });\n\t\t\t\tthis._hideForm(true);\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(this._form.labeledInput, \"change:errorText\", () => {\n\t\t\teditor.ui.update();\n\t\t});\n\t\tthis.listenTo(this._form, \"cancel\", () => {\n\t\t\tthis._hideForm(true);\n\t\t});\n\t\tclickOutsideHandler({\n\t\t\temitter: this._form,\n\t\t\tactivator: () => this._isVisible,\n\t\t\tcontextElements: () => [this._balloon.view.element],\n\t\t\tcallback: () => this._hideForm()\n\t\t});\n\t}\n\t/**\n\t* Shows the {@link #_form} in the {@link #_balloon}.\n\t*\n\t* @internal\n\t*/\n\t_showForm(unit) {\n\t\tif (this._isVisible) return;\n\t\tif (!this._form) this._createForm(unit);\n\t\tconst editor = this.editor;\n\t\tconst labeledInput = this._form.labeledInput;\n\t\tthis._form.disableCssTransitions();\n\t\tthis._form.resetFormStatus();\n\t\tif (!this._isInBalloon) this._balloon.add({\n\t\t\tview: this._form,\n\t\t\tposition: getBalloonPositionData(editor)\n\t\t});\n\t\tconst currentParsedWidth = getSelectedImageWidthInUnits(editor, unit);\n\t\tconst initialInputValue = currentParsedWidth ? currentParsedWidth.value.toFixed(1) : \"\";\n\t\tconst possibleRange = getSelectedImagePossibleResizeRange(editor, unit);\n\t\tlabeledInput.fieldView.value = labeledInput.fieldView.element.value = initialInputValue;\n\t\tif (possibleRange) Object.assign(labeledInput.fieldView, {\n\t\t\tmin: possibleRange.lower.toFixed(1),\n\t\t\tmax: Math.ceil(possibleRange.upper).toFixed(1)\n\t\t});\n\t\tthis._form.labeledInput.fieldView.select();\n\t\tthis._form.enableCssTransitions();\n\t}\n\t/**\n\t* Removes the {@link #_form} from the {@link #_balloon}.\n\t*\n\t* @param focusEditable Controls whether the editing view is focused afterwards.\n\t*/\n\t_hideForm(focusEditable = false) {\n\t\tif (!this._isInBalloon) return;\n\t\tif (this._form.focusTracker.isFocused) this._form.saveButtonView.focus();\n\t\tthis._balloon.remove(this._form);\n\t\tif (focusEditable) this.editor.editing.view.focus();\n\t}\n\t/**\n\t* Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t*/\n\tget _isVisible() {\n\t\treturn !!this._balloon && this._balloon.visibleView === this._form;\n\t}\n\t/**\n\t* Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t*/\n\tget _isInBalloon() {\n\t\treturn !!this._balloon && this._balloon.hasView(this._form);\n\t}\n};\n/**\n* Returns image resize form validation callbacks.\n*\n* @param editor Editor instance.\n*/\nfunction getFormValidators(editor) {\n\tconst t = editor.t;\n\treturn [(form) => {\n\t\tif (form.rawSize.trim() === \"\") return t(\"The value must not be empty.\");\n\t\tif (form.parsedSize === null) return t(\"The value should be a plain number.\");\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 image/imageresize\n*/\n/**\n* The image resize plugin.\n*\n* It adds a possibility to resize each image using handles.\n*/\nvar ImageResize = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageResizeEditing,\n\t\t\tImageResizeHandles,\n\t\t\tImageCustomResizeUI,\n\t\t\tImageResizeButtons\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageResize\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* The image style command. It is used to apply {@link module:image/imageconfig~ImageStyleConfig#options image style option}\n* to a selected image.\n*\n* **Note**: Executing this command may change the image model element if the desired style requires an image of a different\n* type. See {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute} to learn more.\n*/\nvar ImageStyleCommand = class extends Command {\n\t/**\n\t* An object containing names of default style options for the inline and block images.\n\t* If there is no default style option for the given image type in the configuration,\n\t* the name will be `false`.\n\t*/\n\t_defaultStyles;\n\t/**\n\t* The styles handled by this command.\n\t*/\n\t_styles;\n\t/**\n\t* Creates an instance of the image style command. When executed, the command applies one of\n\t* {@link module:image/imageconfig~ImageStyleConfig#options style options} to the currently selected image.\n\t*\n\t* @param editor The editor instance.\n\t* @param styles The style options that this command supports.\n\t*/\n\tconstructor(editor, styles) {\n\t\tsuper(editor);\n\t\tthis._defaultStyles = {\n\t\t\timageBlock: false,\n\t\t\timageInline: false\n\t\t};\n\t\tthis._styles = new Map(styles.map((style) => {\n\t\t\tif (style.isDefault) for (const modelElementName of style.modelElements) this._defaultStyles[modelElementName] = style.name;\n\t\t\treturn [style.name, style];\n\t\t}));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst element = this.editor.plugins.get(\"ImageUtils\").getClosestSelectedImageElement(this.editor.model.document.selection);\n\t\tthis.isEnabled = !!element;\n\t\tif (!this.isEnabled) this.value = false;\n\t\telse if (element.hasAttribute(\"imageStyle\")) this.value = element.getAttribute(\"imageStyle\");\n\t\telse this.value = this._defaultStyles[element.name];\n\t}\n\t/**\n\t* Returns whether the style with the given name can be applied to the currently selected image.\n\t*\n\t* Applying a style may internally trigger a type conversion (block ↔ inline) when the style\n\t* supports only the opposite type. If that conversion would be rejected by the schema (for\n\t* example, converting an inline image to a block image inside `$inlineRoot`), this style\n\t* cannot be applied even though the command itself is enabled. UI components representing\n\t* individual styles should reflect this per-style state in their `isEnabled`.\n\t*/\n\tisStyleEnabled(styleName) {\n\t\tif (!this.isEnabled) return false;\n\t\tconst imageUtils = this.editor.plugins.get(\"ImageUtils\");\n\t\tconst element = imageUtils.getClosestSelectedImageElement(this.editor.model.document.selection);\n\t\tif (!element || !this._styles.has(styleName)) return false;\n\t\tif (!this.shouldConvertImageType(styleName, element)) return true;\n\t\tconst typeCommandName = imageUtils.isBlockImage(element) ? \"imageTypeInline\" : \"imageTypeBlock\";\n\t\tconst typeCommand = this.editor.commands.get(typeCommandName);\n\t\treturn !!typeCommand && typeCommand.isEnabled;\n\t}\n\t/**\n\t* Executes the command and applies the style to the currently selected image:\n\t*\n\t* ```ts\n\t* editor.execute( 'imageStyle', { value: 'side' } );\n\t* ```\n\t*\n\t* **Note**: Executing this command may change the image model element if the desired style requires an image\n\t* of a different type. Learn more about {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements model element}\n\t* configuration for the style option.\n\t*\n\t* @param options.value The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).\n\t* @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t* The default is `true`.\n\t* @fires execute\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tif (options.value && !this.isStyleEnabled(options.value)) return;\n\t\tmodel.change((writer) => {\n\t\t\tconst requestedStyle = options.value;\n\t\t\tconst { setImageSizes = true } = options;\n\t\t\tlet imageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n\t\t\tif (requestedStyle && this.shouldConvertImageType(requestedStyle, imageElement)) {\n\t\t\t\tthis.editor.execute(imageUtils.isBlockImage(imageElement) ? \"imageTypeInline\" : \"imageTypeBlock\", { setImageSizes });\n\t\t\t\timageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n\t\t\t}\n\t\t\tif (!requestedStyle || this._styles.get(requestedStyle).isDefault) writer.removeAttribute(\"imageStyle\", imageElement);\n\t\t\telse writer.setAttribute(\"imageStyle\", requestedStyle, imageElement);\n\t\t\tif (setImageSizes) imageUtils.setImageNaturalSizeAttributes(imageElement);\n\t\t});\n\t}\n\t/**\n\t* Returns `true` if requested style change would trigger the image type change.\n\t*\n\t* @param requestedStyle The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).\n\t* @param imageElement The image model element.\n\t*/\n\tshouldConvertImageType(requestedStyle, imageElement) {\n\t\treturn !this._styles.get(requestedStyle).modelElements.includes(imageElement.name);\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 image/imagestyle/utils\n*/\n/**\n* Default image style options provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}\n* configuration.\n*\n* There are available 5 styles focused on formatting:\n*\n* * **`'alignLeft'`** aligns the inline or block image to the left and wraps it with the text using the `image-style-align-left` class,\n* * **`'alignRight'`** aligns the inline or block image to the right and wraps it with the text using the `image-style-align-right` class,\n* * **`'alignCenter'`** centers the block image using the `image-style-align-center` class,\n* * **`'alignBlockLeft'`** aligns the block image to the left using the `image-style-block-align-left` class,\n* * **`'alignBlockRight'`** aligns the block image to the right using the `image-style-block-align-right` class,\n*\n* and 3 semantic styles:\n*\n* * **`'inline'`** is an inline image without any CSS class,\n* * **`'block'`** is a block image without any CSS class,\n* * **`'side'`** is a block image styled with the `image-style-side` CSS class.\n*\n* @internal\n*/\nconst DEFAULT_OPTIONS = {\n\tget inline() {\n\t\treturn {\n\t\t\tname: \"inline\",\n\t\t\ttitle: \"In line\",\n\t\t\ticon: IconObjectInline,\n\t\t\tmodelElements: [\"imageInline\"],\n\t\t\tisDefault: true\n\t\t};\n\t},\n\tget alignLeft() {\n\t\treturn {\n\t\t\tname: \"alignLeft\",\n\t\t\ttitle: \"Left aligned image\",\n\t\t\ticon: IconObjectInlineLeft,\n\t\t\tmodelElements: [\"imageBlock\", \"imageInline\"],\n\t\t\tclassName: \"image-style-align-left\"\n\t\t};\n\t},\n\tget alignBlockLeft() {\n\t\treturn {\n\t\t\tname: \"alignBlockLeft\",\n\t\t\ttitle: \"Left aligned image\",\n\t\t\ticon: IconObjectLeft,\n\t\t\tmodelElements: [\"imageBlock\"],\n\t\t\tclassName: \"image-style-block-align-left\"\n\t\t};\n\t},\n\tget alignCenter() {\n\t\treturn {\n\t\t\tname: \"alignCenter\",\n\t\t\ttitle: \"Centered image\",\n\t\t\ticon: IconObjectCenter,\n\t\t\tmodelElements: [\"imageBlock\"],\n\t\t\tclassName: \"image-style-align-center\"\n\t\t};\n\t},\n\tget alignRight() {\n\t\treturn {\n\t\t\tname: \"alignRight\",\n\t\t\ttitle: \"Right aligned image\",\n\t\t\ticon: IconObjectInlineRight,\n\t\t\tmodelElements: [\"imageBlock\", \"imageInline\"],\n\t\t\tclassName: \"image-style-align-right\"\n\t\t};\n\t},\n\tget alignBlockRight() {\n\t\treturn {\n\t\t\tname: \"alignBlockRight\",\n\t\t\ttitle: \"Right aligned image\",\n\t\t\ticon: IconObjectRight,\n\t\t\tmodelElements: [\"imageBlock\"],\n\t\t\tclassName: \"image-style-block-align-right\"\n\t\t};\n\t},\n\tget block() {\n\t\treturn {\n\t\t\tname: \"block\",\n\t\t\ttitle: \"Centered image\",\n\t\t\ticon: IconObjectCenter,\n\t\t\tmodelElements: [\"imageBlock\"],\n\t\t\tisDefault: true\n\t\t};\n\t},\n\tget side() {\n\t\treturn {\n\t\t\tname: \"side\",\n\t\t\ttitle: \"Side image\",\n\t\t\ticon: IconObjectInlineRight,\n\t\t\tmodelElements: [\"imageBlock\"],\n\t\t\tclassName: \"image-style-side\"\n\t\t};\n\t}\n};\n/**\n* Default image style icons provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}\n* configuration.\n*\n* See {@link module:image/imageconfig~ImageStyleOptionDefinition#icon} to learn more.\n*\n* There are 7 default icons available: `'full'`, `'left'`, `'inlineLeft'`, `'center'`, `'right'`, `'inlineRight'`, and `'inline'`.\n*\n* @internal\n*/\nconst DEFAULT_ICONS = /* #__PURE__ */ (() => ({\n\tfull: IconObjectFullWidth,\n\tleft: IconObjectLeft,\n\tright: IconObjectRight,\n\tcenter: IconObjectCenter,\n\tinlineLeft: IconObjectInlineLeft,\n\tinlineRight: IconObjectInlineRight,\n\tinline: IconObjectInline\n}))();\n/**\n* Default drop-downs provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#toolbar}\n* configuration. The drop-downs are containers for the {@link module:image/imageconfig~ImageStyleConfig#options image style options}.\n*\n* If both of the `ImageEditing` plugins are loaded, there are 2 predefined drop-downs available:\n*\n* * **`'imageStyle:wrapText'`**, which contains the `alignLeft` and `alignRight` options, that is,\n* those that wraps the text around the image,\n* * **`'imageStyle:breakText'`**, which contains the `alignBlockLeft`, `alignCenter` and `alignBlockRight` options, that is,\n* those that breaks the text around the image.\n*\n* @internal\n*/\nconst DEFAULT_DROPDOWN_DEFINITIONS = [{\n\tname: \"imageStyle:wrapText\",\n\ttitle: \"Wrap text\",\n\tdefaultItem: \"imageStyle:alignLeft\",\n\titems: [\"imageStyle:alignLeft\", \"imageStyle:alignRight\"]\n}, {\n\tname: \"imageStyle:breakText\",\n\ttitle: \"Break text\",\n\tdefaultItem: \"imageStyle:block\",\n\titems: [\n\t\t\"imageStyle:alignBlockLeft\",\n\t\t\"imageStyle:block\",\n\t\t\"imageStyle:alignBlockRight\"\n\t]\n}];\n/**\n* Returns the style with a given `name` from an array of styles.\n*\n* @internal\n*/\nfunction getStyleDefinitionByName(name, styles) {\n\tfor (const style of styles) if (style.name === name) return style;\n}\n/**\n* Returns a list of the normalized and validated image style options.\n*\n* @param config\n* @param config.isInlinePluginLoaded\n* Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.\n* @param config.isBlockPluginLoaded\n* Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.\n* @param config.configuredStyles\n* The image styles configuration provided in the image styles {@link module:image/imageconfig~ImageConfig#styles configuration}\n* as a default or custom value.\n* @returns\n* * Each of options contains a complete icon markup.\n* * The image style options not supported by any of the loaded plugins are filtered out.\n*/\nfunction normalizeStyles(config) {\n\treturn (config.configuredStyles.options || []).map((arrangement) => normalizeDefinition(arrangement)).filter((arrangement) => isValidOption(arrangement, config));\n}\n/**\n* Returns the default image styles configuration depending on the loaded image editing plugins.\n*\n* @param isInlinePluginLoaded\n* Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.\n*\n* @param isBlockPluginLoaded\n* Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.\n*\n* @returns\n* It returns an object with the lists of the image style options and groups defined as strings related to the\n* {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default options}\n*/\nfunction getDefaultStylesConfiguration(isBlockPluginLoaded, isInlinePluginLoaded) {\n\tif (isBlockPluginLoaded && isInlinePluginLoaded) return { options: [\n\t\t\"inline\",\n\t\t\"alignLeft\",\n\t\t\"alignRight\",\n\t\t\"alignCenter\",\n\t\t\"alignBlockLeft\",\n\t\t\"alignBlockRight\",\n\t\t\"block\",\n\t\t\"side\"\n\t] };\n\telse if (isBlockPluginLoaded) return { options: [\"block\", \"side\"] };\n\telse if (isInlinePluginLoaded) return { options: [\n\t\t\"inline\",\n\t\t\"alignLeft\",\n\t\t\"alignRight\"\n\t] };\n\treturn {};\n}\n/**\n* Returns a list of the available predefined drop-downs' definitions depending on the loaded image editing plugins.\n*/\nfunction getDefaultDropdownDefinitions(pluginCollection) {\n\tif (pluginCollection.has(\"ImageBlockEditing\") && pluginCollection.has(\"ImageInlineEditing\")) return [...DEFAULT_DROPDOWN_DEFINITIONS];\n\telse return [];\n}\n/**\n* Normalizes an image style option or group provided in the {@link module:image/imageconfig~ImageConfig#styles}\n* and returns it in a {@link module:image/imageconfig~ImageStyleOptionDefinition}/\n*/\nfunction normalizeDefinition(definition) {\n\tif (typeof definition === \"string\") {\n\t\tif (!DEFAULT_OPTIONS[definition]) definition = { name: definition };\n\t\telse definition = { ...DEFAULT_OPTIONS[definition] };\n\t} else definition = extendStyle(DEFAULT_OPTIONS[definition.name], definition);\n\tif (typeof definition.icon === \"string\") definition.icon = DEFAULT_ICONS[definition.icon] || definition.icon;\n\treturn definition;\n}\n/**\n* Checks if the image style option is valid:\n* * if it has the modelElements fields defined and filled,\n* * if the defined modelElements are supported by any of the loaded image editing plugins.\n* It also displays a console warning these conditions are not met.\n*\n* @param option image style option\n*/\nfunction isValidOption(option, { isBlockPluginLoaded, isInlinePluginLoaded }) {\n\tconst { modelElements, name } = option;\n\tif (!modelElements || !modelElements.length || !name) {\n\t\twarnInvalidStyle({ style: option });\n\t\treturn false;\n\t} else {\n\t\tconst supportedElements = [isBlockPluginLoaded ? \"imageBlock\" : null, isInlinePluginLoaded ? \"imageInline\" : null];\n\t\tif (!modelElements.some((elementName) => supportedElements.includes(elementName))) {\n\t\t\t/**\n\t\t\t* In order to work correctly, each image style {@link module:image/imageconfig~ImageStyleOptionDefinition option}\n\t\t\t* requires specific model elements (also: types of images) to be supported by the editor.\n\t\t\t*\n\t\t\t* Model element names to which the image style option can be applied are defined in the\n\t\t\t* {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements} property of the style option\n\t\t\t* definition.\n\t\t\t*\n\t\t\t* Explore the warning in the console to find out precisely which option is not supported and which editor plugins\n\t\t\t* are missing. Make sure these plugins are loaded in your editor to get this image style option working.\n\t\t\t*\n\t\t\t* @error image-style-missing-dependency\n\t\t\t* @param {string} style The name of the unsupported option.\n\t\t\t* @param {Array.<string>} missingPlugins The names of the plugins one of which has to be loaded for the particular option.\n\t\t\t*/\n\t\t\tlogWarning(\"image-style-missing-dependency\", {\n\t\t\t\tstyle: option,\n\t\t\t\tmissingPlugins: modelElements.map((name) => name === \"imageBlock\" ? \"ImageBlockEditing\" : \"ImageInlineEditing\")\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n* Extends the default style with a style provided by the developer.\n* Note: Don't override the custom–defined style object, clone it instead.\n*/\nfunction extendStyle(source, style) {\n\tconst extendedStyle = { ...style };\n\tfor (const prop in source) if (!Object.prototype.hasOwnProperty.call(style, prop)) extendedStyle[prop] = source[prop];\n\treturn extendedStyle;\n}\n/**\n* Displays a console warning with the 'image-style-configuration-definition-invalid' error.\n*/\nfunction warnInvalidStyle(info) {\n\t/**\n\t* The image style definition provided in the configuration is invalid.\n\t*\n\t* Please make sure the definition implements properly one of the following:\n\t*\n\t* * {@link module:image/imageconfig~ImageStyleOptionDefinition image style option definition},\n\t* * {@link module:image/imageconfig~ImageStyleDropdownDefinition image style dropdown definition}\n\t*\n\t* @error image-style-configuration-definition-invalid\n\t* @param {object} info The information about the invalid definition.\n\t*/\n\tlogWarning(\"image-style-configuration-definition-invalid\", info);\n}\n/**\n* @internal\n*/\nconst utils = {\n\tnormalizeStyles,\n\tgetDefaultStylesConfiguration,\n\tgetDefaultDropdownDefinitions,\n\twarnInvalidStyle\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 image/imagestyle/converters\n*/\n/**\n* Returns a converter for the `imageStyle` attribute. It can be used for adding, changing and removing the attribute.\n*\n* @param styles An array containing available image style options.\n* @returns A model-to-view attribute converter.\n* @internal\n*/\nfunction modelToViewStyleAttribute(styles) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst newStyle = getStyleDefinitionByName(data.attributeNewValue, styles);\n\t\tconst oldStyle = getStyleDefinitionByName(data.attributeOldValue, styles);\n\t\tconst viewElement = conversionApi.mapper.toViewElement(data.item);\n\t\tconst viewWriter = conversionApi.writer;\n\t\tif (oldStyle) viewWriter.removeClass(oldStyle.className, viewElement);\n\t\tif (newStyle) viewWriter.addClass(newStyle.className, viewElement);\n\t};\n}\n/**\n* Returns a view-to-model converter converting image CSS classes to a proper value in the model.\n*\n* @param styles Image style options for which the converter is created.\n* @returns A view-to-model converter.\n* @internal\n*/\nfunction viewToModelStyleAttribute(styles) {\n\tconst nonDefaultStyles = {\n\t\timageInline: styles.filter((style) => !style.isDefault && style.modelElements.includes(\"imageInline\")),\n\t\timageBlock: styles.filter((style) => !style.isDefault && style.modelElements.includes(\"imageBlock\"))\n\t};\n\treturn (evt, data, conversionApi) => {\n\t\tif (!data.modelRange) return;\n\t\tconst viewElement = data.viewItem;\n\t\tconst modelImageElement = first(data.modelRange.getItems());\n\t\tif (!modelImageElement) return;\n\t\tif (!conversionApi.schema.checkAttribute(modelImageElement, \"imageStyle\")) return;\n\t\tfor (const style of nonDefaultStyles[modelImageElement.name]) if (conversionApi.consumable.consume(viewElement, { classes: style.className })) conversionApi.writer.setAttribute(\"imageStyle\", style.name, modelImageElement);\n\t\tnormalizeFloatToDefinitionStyle(conversionApi, viewElement, modelImageElement, styles);\n\t};\n}\n/**\n* A helper function that attempts to convert the `float` CSS style into a corresponding `imageStyle` attribute.\n*\n* It maps `float: left` and `float: right` to standard alignment styles (e.g. `'alignLeft'`, `'alignRight'`),\n* but only if the target style definition matches one of the {@link module:image/image/utils~DEFAULT_OPTIONS default options}.\n*/\nfunction normalizeFloatToDefinitionStyle(conversionApi, viewElement, modelElement, styles) {\n\tif (!conversionApi.consumable.test(viewElement, { styles: [\"float\"] })) return;\n\tlet floatStyleName = null;\n\tswitch (viewElement.getStyle(\"float\")) {\n\t\tcase \"left\":\n\t\t\tfloatStyleName = \"alignLeft\";\n\t\t\tbreak;\n\t\tcase \"right\": floatStyleName = \"alignRight\";\n\t}\n\tif (!floatStyleName) return;\n\tconst definition = getStyleDefinitionByName(floatStyleName, styles);\n\tif (!definition) return;\n\tconst builtinDefinition = DEFAULT_OPTIONS[definition.name];\n\tif (!isEqual(definition, builtinDefinition)) return;\n\tconversionApi.writer.setAttribute(\"imageStyle\", floatStyleName, modelElement);\n\tconversionApi.consumable.consume(viewElement, { styles: [\"float\"] });\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 image/imagestyle/imagestyleediting\n*/\n/**\n* The image style engine plugin. It sets the default configuration, creates converters and registers\n* {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}.\n*/\nvar ImageStyleEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageStyleEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageUtils];\n\t}\n\t/**\n\t* It contains a list of the normalized and validated style options.\n\t*\n\t* * Each option contains a complete icon markup.\n\t* * The style options not supported by any of the loaded image editing plugins (\n\t* {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} or\n\t* {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`}) are filtered out.\n\t*\n\t* @internal\n\t* @readonly\n\t*/\n\tnormalizedStyles;\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst isBlockPluginLoaded = editor.plugins.has(\"ImageBlockEditing\");\n\t\tconst isInlinePluginLoaded = editor.plugins.has(\"ImageInlineEditing\");\n\t\teditor.config.define(\"image.styles\", utils.getDefaultStylesConfiguration(isBlockPluginLoaded, isInlinePluginLoaded));\n\t\tthis.normalizedStyles = utils.normalizeStyles({\n\t\t\tconfiguredStyles: editor.config.get(\"image.styles\"),\n\t\t\tisBlockPluginLoaded,\n\t\t\tisInlinePluginLoaded\n\t\t});\n\t\tthis._setupConversion(isBlockPluginLoaded, isInlinePluginLoaded);\n\t\tthis._setupPostFixer();\n\t\teditor.commands.add(\"imageStyle\", new ImageStyleCommand(editor, this.normalizedStyles));\n\t}\n\t/**\n\t* Sets the editor conversion taking the presence of\n\t* {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`}\n\t* and {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugins into consideration.\n\t*/\n\t_setupConversion(isBlockPluginLoaded, isInlinePluginLoaded) {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst modelToViewConverter = modelToViewStyleAttribute(this.normalizedStyles);\n\t\tconst viewToModelConverter = viewToModelStyleAttribute(this.normalizedStyles);\n\t\teditor.editing.downcastDispatcher.on(\"attribute:imageStyle\", modelToViewConverter);\n\t\teditor.data.downcastDispatcher.on(\"attribute:imageStyle\", modelToViewConverter);\n\t\tif (isBlockPluginLoaded) {\n\t\t\tschema.extend(\"imageBlock\", { allowAttributes: \"imageStyle\" });\n\t\t\tschema.setAttributeProperties(\"imageStyle\", {\n\t\t\t\tisFormatting: true,\n\t\t\t\tblockAlignment: getBlockAlignmentAttributeProperty(this.normalizedStyles)\n\t\t\t});\n\t\t\teditor.data.upcastDispatcher.on(\"element:figure\", viewToModelConverter, { priority: \"low\" });\n\t\t}\n\t\tif (isInlinePluginLoaded) {\n\t\t\tschema.extend(\"imageInline\", { allowAttributes: \"imageStyle\" });\n\t\t\tschema.setAttributeProperties(\"imageStyle\", { isFormatting: true });\n\t\t\teditor.data.upcastDispatcher.on(\"element:img\", viewToModelConverter, { priority: \"low\" });\n\t\t}\n\t}\n\t/**\n\t* Registers a post-fixer that will make sure that the style attribute value is correct for a specific image type (block vs inline).\n\t*/\n\t_setupPostFixer() {\n\t\tconst editor = this.editor;\n\t\tconst document = editor.model.document;\n\t\tconst imageUtils = editor.plugins.get(ImageUtils);\n\t\tconst stylesMap = new Map(this.normalizedStyles.map((style) => [style.name, style]));\n\t\tdocument.registerPostFixer((writer) => {\n\t\t\tlet changed = false;\n\t\t\tfor (const change of document.differ.getChanges()) if (change.type == \"insert\" || change.type == \"attribute\" && change.attributeKey == \"imageStyle\") {\n\t\t\t\tlet element = change.type == \"insert\" ? change.position.nodeAfter : change.range.start.nodeAfter;\n\t\t\t\tif (element && element.is(\"element\", \"paragraph\") && element.childCount > 0) element = element.getChild(0);\n\t\t\t\tif (!imageUtils.isImage(element)) continue;\n\t\t\t\tconst imageStyle = element.getAttribute(\"imageStyle\");\n\t\t\t\tif (!imageStyle) continue;\n\t\t\t\tconst imageStyleDefinition = stylesMap.get(imageStyle);\n\t\t\t\tif (!imageStyleDefinition || !imageStyleDefinition.modelElements.includes(element.name)) {\n\t\t\t\t\twriter.removeAttribute(\"imageStyle\", element);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn changed;\n\t\t});\n\t}\n};\n/**\n* Returns a mapping of generic alignment values ('left', 'right', 'center') to their corresponding\n* block image alignment style names.\n*\n* This function is particularly useful for scenarios like `td[align]` conversion, which needs to know\n* exactly how to map a generic `align` attribute to the correct alignment value. This mapping is necessary\n* because the actual alignment value can differ depending on the target element type (e.g., block images\n* vs. tables).\n*\n* @param styles An array of available image style option definitions.\n* @returns A record mapping basic alignments to their valid, block-specific style names.\n*/\nfunction getBlockAlignmentAttributeProperty(styles) {\n\tconst pickFirstSupported = (...names) => {\n\t\tconst found = names.map((name) => getStyleDefinitionByName(name, styles)).find((definition) => definition?.modelElements.includes(\"imageBlock\"));\n\t\tif (!found) return;\n\t\treturn {\n\t\t\tisDefault: !!found.isDefault,\n\t\t\tvalue: found.name\n\t\t};\n\t};\n\treturn Object.fromEntries(Object.entries({\n\t\tleft: [\"alignBlockLeft\", \"alignLeft\"],\n\t\tright: [\"alignBlockRight\", \"alignRight\"],\n\t\tcenter: [\"block\", \"alignCenter\"]\n\t}).map(([align, names]) => [align, pickFirstSupported(...names)]).filter(([, resolved]) => resolved !== 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 image/imagestyle/imagestyleui\n*/\n/**\n* The image style UI plugin.\n*\n* It registers buttons corresponding to the {@link module:image/imageconfig~ImageConfig#styles} configuration.\n* It also registers the {@link module:image/imagestyle/utils#DEFAULT_DROPDOWN_DEFINITIONS default drop-downs} and the\n* custom drop-downs defined by the developer in the {@link module:image/imageconfig~ImageConfig#toolbar} configuration.\n*/\nvar ImageStyleUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageStyleEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageStyleUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Returns the default localized style titles provided by the plugin.\n\t*\n\t* The following localized titles corresponding with\n\t* {@link module:image/imagestyle/utils#DEFAULT_OPTIONS} are available:\n\t*\n\t* * `'Wrap text'`,\n\t* * `'Break text'`,\n\t* * `'In line'`,\n\t* * `'Full size image'`,\n\t* * `'Side image'`,\n\t* * `'Left aligned image'`,\n\t* * `'Centered image'`,\n\t* * `'Right aligned image'`\n\t*/\n\tget localizedDefaultStylesTitles() {\n\t\tconst t = this.editor.t;\n\t\treturn {\n\t\t\t\"Wrap text\": t(\"Wrap text\"),\n\t\t\t\"Break text\": t(\"Break text\"),\n\t\t\t\"In line\": t(\"In line\"),\n\t\t\t\"Full size image\": t(\"Full size image\"),\n\t\t\t\"Side image\": t(\"Side image\"),\n\t\t\t\"Left aligned image\": t(\"Left aligned image\"),\n\t\t\t\"Centered image\": t(\"Centered image\"),\n\t\t\t\"Right aligned image\": t(\"Right aligned image\")\n\t\t};\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst plugins = this.editor.plugins;\n\t\tconst toolbarConfig = this.editor.config.get(\"image.toolbar\") || [];\n\t\tconst definedStyles = translateStyles(plugins.get(\"ImageStyleEditing\").normalizedStyles, this.localizedDefaultStylesTitles);\n\t\tfor (const styleConfig of definedStyles) this._createButton(styleConfig);\n\t\tconst definedDropdowns = translateStyles([...toolbarConfig.filter(isObject), ...utils.getDefaultDropdownDefinitions(plugins)], this.localizedDefaultStylesTitles);\n\t\tfor (const dropdownConfig of definedDropdowns) this._createDropdown(dropdownConfig, definedStyles);\n\t}\n\t/**\n\t* Creates a dropdown and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.\n\t*/\n\t_createDropdown(dropdownConfig, definedStyles) {\n\t\tconst factory = this.editor.ui.componentFactory;\n\t\tfactory.add(dropdownConfig.name, (locale) => {\n\t\t\tlet defaultButton;\n\t\t\tconst { defaultItem, items, title } = dropdownConfig;\n\t\t\tconst buttonViews = items.filter((itemName) => definedStyles.find(({ name }) => getUIComponentName(name) === itemName)).map((buttonName) => {\n\t\t\t\tconst button = factory.create(buttonName);\n\t\t\t\tif (buttonName === defaultItem) defaultButton = button;\n\t\t\t\treturn button;\n\t\t\t});\n\t\t\tif (items.length !== buttonViews.length) utils.warnInvalidStyle({ dropdown: dropdownConfig });\n\t\t\tconst dropdownView = createDropdown(locale, SplitButtonView);\n\t\t\tconst splitButtonView = dropdownView.buttonView;\n\t\t\tconst splitButtonViewArrow = splitButtonView.arrowView;\n\t\t\taddToolbarToDropdown(dropdownView, buttonViews, { enableActiveItemFocusOnDropdownOpen: true });\n\t\t\tsplitButtonView.set({\n\t\t\t\tlabel: getDropdownButtonTitle(title, defaultButton.label),\n\t\t\t\tclass: null,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tsplitButtonViewArrow.unbind(\"label\");\n\t\t\tsplitButtonViewArrow.set({ label: title });\n\t\t\tsplitButtonView.bind(\"icon\").toMany(buttonViews, \"isOn\", (...areOn) => {\n\t\t\t\tconst index = areOn.findIndex(identity);\n\t\t\t\treturn index < 0 ? defaultButton.icon : buttonViews[index].icon;\n\t\t\t});\n\t\t\tsplitButtonView.bind(\"label\").toMany(buttonViews, \"isOn\", (...areOn) => {\n\t\t\t\tconst index = areOn.findIndex(identity);\n\t\t\t\treturn getDropdownButtonTitle(title, index < 0 ? defaultButton.label : buttonViews[index].label);\n\t\t\t});\n\t\t\tsplitButtonView.bind(\"isOn\").toMany(buttonViews, \"isOn\", (...areOn) => areOn.some(identity));\n\t\t\tsplitButtonView.bind(\"class\").toMany(buttonViews, \"isOn\", (...areOn) => areOn.some(identity) ? \"ck-splitbutton_flatten\" : void 0);\n\t\t\tsplitButtonView.on(\"execute\", () => {\n\t\t\t\tif (!buttonViews.some(({ isOn }) => isOn)) defaultButton.fire(\"execute\");\n\t\t\t\telse dropdownView.isOpen = !dropdownView.isOpen;\n\t\t\t});\n\t\t\tdropdownView.bind(\"isEnabled\").toMany(buttonViews, \"isEnabled\", (...areEnabled) => areEnabled.some(identity));\n\t\t\tthis.listenTo(dropdownView, \"execute\", () => {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t}\n\t/**\n\t* Creates a button and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.\n\t*/\n\t_createButton(buttonConfig) {\n\t\tconst buttonName = buttonConfig.name;\n\t\tthis.editor.ui.componentFactory.add(getUIComponentName(buttonName), (locale) => {\n\t\t\tconst editor = this.editor;\n\t\t\tconst command = editor.commands.get(\"imageStyle\");\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tview.set({\n\t\t\t\tlabel: buttonConfig.title,\n\t\t\t\ticon: buttonConfig.icon,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tconst reactiveSources = [command];\n\t\t\tconst imageTypeBlock = editor.commands.get(\"imageTypeBlock\");\n\t\t\tconst imageTypeInline = editor.commands.get(\"imageTypeInline\");\n\t\t\tif (imageTypeBlock) reactiveSources.push(imageTypeBlock);\n\t\t\tif (imageTypeInline) reactiveSources.push(imageTypeInline);\n\t\t\tview.bind(\"isEnabled\").toMany(reactiveSources, \"isEnabled\", () => command.isStyleEnabled(buttonName));\n\t\t\tview.bind(\"isOn\").to(command, \"value\", (value) => value === buttonName);\n\t\t\tview.on(\"execute\", this._executeCommand.bind(this, buttonName));\n\t\t\treturn view;\n\t\t});\n\t}\n\t_executeCommand(name) {\n\t\tthis.editor.execute(\"imageStyle\", { value: name });\n\t\tthis.editor.editing.view.focus();\n\t}\n};\n/**\n* Returns the translated `title` from the passed styles array.\n*/\nfunction translateStyles(styles, titles) {\n\tfor (const style of styles) if (titles[style.title]) style.title = titles[style.title];\n\treturn styles;\n}\n/**\n* Returns the image style component name with the \"imageStyle:\" prefix.\n*/\nfunction getUIComponentName(name) {\n\treturn `imageStyle:${name}`;\n}\n/**\n* Returns title for the splitbutton containing the dropdown title and default action item title.\n*/\nfunction getDropdownButtonTitle(dropdownTitle, buttonTitle) {\n\treturn (dropdownTitle ? dropdownTitle + \": \" : \"\") + buttonTitle;\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 image/imagestyle\n*/\n/**\n* The image style plugin.\n*\n* For a detailed overview of the image styles feature, check the {@glink features/images/images-styles documentation}.\n*\n* This is a \"glue\" plugin which loads the following plugins:\n* * {@link module:image/imagestyle/imagestyleediting~ImageStyleEditing},\n* * {@link module:image/imagestyle/imagestyleui~ImageStyleUI}\n*\n* It provides a default configuration, which can be extended or overwritten.\n* Read more about the {@link module:image/imageconfig~ImageConfig#styles image styles configuration}.\n*/\nvar ImageStyle = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageStyleEditing, ImageStyleUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageStyle\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 image/imagetoolbar\n*/\n/**\n* The image toolbar plugin. It creates and manages the image toolbar (the toolbar displayed when an image is selected).\n*\n* For an overview, check the {@glink features/images/images-overview#image-contextual-toolbar image contextual toolbar} documentation.\n*\n* Instances of toolbar components (e.g. buttons) are created using the editor's\n* {@link module:ui/componentfactory~ComponentFactory component factory}\n* based on the {@link module:image/imageconfig~ImageConfig#toolbar `image.toolbar` configuration option}.\n*\n* The toolbar uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n*/\nvar ImageToolbar = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [WidgetToolbarRepository, ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ImageToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst widgetToolbarRepository = editor.plugins.get(WidgetToolbarRepository);\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\twidgetToolbarRepository.register(\"image\", {\n\t\t\tariaLabel: t(\"Image toolbar\"),\n\t\t\titems: normalizeDeclarativeConfig(editor.config.get(\"image.toolbar\") || []),\n\t\t\tgetRelatedElement: (selection) => imageUtils.getClosestSelectedImageWidget(selection)\n\t\t});\n\t}\n};\n/**\n* Convert the dropdown definitions to their keys registered in the ComponentFactory.\n* The registration precess should be handled by the plugin which handles the UI of a particular feature.\n*/\nfunction normalizeDeclarativeConfig(config) {\n\treturn config.map((item) => isObject(item) ? item.name : item);\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 image/pictureediting\n*/\n/**\n* This plugin enables the [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture) element support in the editor.\n*\n* * It enables the `sources` model attribute on `imageBlock` and `imageInline` model elements\n* (brought by {@link module:image/imageblock~ImageBlock} and {@link module:image/imageinline~ImageInline}, respectively).\n* * It translates the `sources` model element to the view (also: data) structure that may look as follows:\n*\n* ```html\n* <p>Inline image using picture:\n* \t<picture>\n* \t\t<source media=\"(min-width: 800px)\" srcset=\"image-large.webp\" type=\"image/webp\">\n* \t\t<source media=\"(max-width: 800px)\" srcset=\"image-small.webp\" type=\"image/webp\">\n* \t\t<!-- Other sources as specified in the \"sources\" model attribute... -->\n* \t\t<img src=\"image.png\" alt=\"An image using picture\" />\n* \t</picture>\n* </p>\n*\n* <p>Block image using picture:</p>\n* <figure class=\"image\">\n* \t<picture>\n* \t\t<source media=\"(min-width: 800px)\" srcset=\"image-large.webp\" type=\"image/webp\">\n* \t\t<source media=\"(max-width: 800px)\" srcset=\"image-small.webp\" type=\"image/webp\">\n* \t\t<!-- Other sources as specified in the \"sources\" model attribute... -->\n* \t\t<img src=\"image.png\" alt=\"An image using picture\" />\n* \t</picture>\n* \t<figcaption>Caption of the image</figcaption>\n* </figure>\n* ```\n*\n* **Note:** The value of the `sources` {@glink framework/architecture/editing-engine#changing-the-model model attribute}\n* in both examples equals:\n*\n* ```css\n* [\n* \t{\n* \t\tmedia: '(min-width: 800px)',\n* \t\tsrcset: 'image-large.webp',\n* \t\ttype: 'image/webp'\n* \t},\n* \t{\n* \t\tmedia: '(max-width: 800px)',\n* \t\tsrcset: 'image-small.webp',\n* \t\ttype: 'image/webp'\n* \t}\n* ]\n* ```\n*\n* * It integrates with the {@link module:image/imageupload~ImageUpload} plugin so images uploaded in the editor\n* automatically render using `<picture>` if the {@glink features/images/image-upload/image-upload upload adapter}\n* supports image sources and provides neccessary data.\n*\n* @private\n*/\nvar PictureEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ImageEditing, ImageUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"PictureEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tif (editor.plugins.has(\"ImageBlockEditing\")) editor.model.schema.extend(\"imageBlock\", { allowAttributes: [\"sources\"] });\n\t\tif (editor.plugins.has(\"ImageInlineEditing\")) editor.model.schema.extend(\"imageInline\", { allowAttributes: [\"sources\"] });\n\t\tthis._setupConversion();\n\t\tthis._setupImageUploadEditingIntegration();\n\t}\n\t/**\n\t* Configures conversion pipelines to support upcasting and downcasting images using the `<picture>` view element\n\t* and the model `sources` attribute.\n\t*/\n\t_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\t\tconversion.for(\"upcast\").add(upcastPicture(imageUtils));\n\t\tconversion.for(\"downcast\").add(downcastSourcesAttribute(imageUtils));\n\t}\n\t/**\n\t* Makes it possible for uploaded images to get the `sources` model attribute and the `<picture>...</picture>`\n\t* view structure out-of-the-box if relevant data is provided along the\n\t* {@link module:image/imageupload/imageuploadediting~ImageUploadEditing#event:uploadComplete} event.\n\t*/\n\t_setupImageUploadEditingIntegration() {\n\t\tconst editor = this.editor;\n\t\tif (!editor.plugins.has(\"ImageUploadEditing\")) return;\n\t\tconst imageUploadEditing = editor.plugins.get(\"ImageUploadEditing\");\n\t\tthis.listenTo(imageUploadEditing, \"uploadComplete\", (evt, { imageElement, data }) => {\n\t\t\tconst sources = data.sources;\n\t\t\tif (!sources) return;\n\t\t\teditor.model.change((writer) => {\n\t\t\t\twriter.setAttributes({ sources }, imageElement);\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\nexport { AutoImage, Image, ImageBlock, ImageBlockEditing, ImageCaption, ImageCaptionEditing, ImageCaptionUI, ImageCaptionUtils, ImageCustomResizeUI, ImageEditing, ImageInline, ImageInlineEditing, ImageInsert, ImageInsertUI, ImageInsertViaUrl, ImageInsertViaUrlUI, ImageLoadObserver, ImagePlaceholder, ImageResize, ImageResizeButtons, ImageResizeEditing, ImageResizeHandles, ImageSizeAttributes, ImageStyle, ImageStyleCommand, ImageStyleEditing, ImageStyleUI, ImageTextAlternative, ImageTextAlternativeCommand, ImageTextAlternativeEditing, ImageTextAlternativeUI, ImageToolbar, ImageTypeCommand, ImageUpload, ImageUploadEditing, ImageUploadProgress, ImageUploadUI, ImageUtils, InsertImageCommand, PictureEditing, ReplaceImageSourceCommand, ResizeImageCommand, ToggleImageCaptionCommand, UploadImageCommand, DEFAULT_DROPDOWN_DEFINITIONS as _IMAGE_DEFAULT_DROPDOWN_DEFINITIONS, DEFAULT_ICONS as _IMAGE_DEFAULT_ICONS, DEFAULT_OPTIONS as _IMAGE_DEFAULT_OPTIONS, ImageCustomResizeFormView as _ImageCustomResizeFormView, ImageInsertFormView as _ImageInsertFormView, ImageInsertUrlView as _ImageInsertUrlView, utils as _ImageStyleUtils, TextAlternativeFormView as _ImageTextAlternativeFormView, widthAndHeightStylesAreBothSet as _checkIfImageWidthAndHeightStylesAreBothSet, createBlockImageViewElement as _createBlockImageViewElement, createInlineImageViewElement as _createInlineImageViewElement, determineImageTypeForInsertionAtSelection as _determineImageTypeForInsertionAtSelection, downcastImageAttribute as _downcastImageAttribute, downcastSourcesAttribute as _downcastImageSourcesAttribute, downcastSrcsetAttribute as _downcastImageSrcsetAttribute, fetchLocalImage as _fetchLocalImage, getBalloonPositionData as _getImageBalloonPositionData, getSizeValueIfInPx as _getImageSizeValueIfInPx, getImgViewElementMatcher as _getImageViewElementMatcher, getSelectedImageEditorNodes as _getSelectedImageEditorNodes, getSelectedImagePossibleResizeRange as _getSelectedImagePossibleResizeRange, getSelectedImageWidthInUnits as _getSelectedImageWidthInUnits, isLocalImage as _isLocalImage, modelToViewStyleAttribute as _modelToViewImageStyleAttribute, repositionContextualBalloon as _repositionImageContextualBalloon, upcastImageFigure as _upcastImageFigure, upcastPicture as _upcastImagePicture, viewToModelStyleAttribute as _viewToModelImageStyleAttribute, createImageTypeRegExp, isHtmlInDataTransfer };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module image/image/utils\n */\n\nimport {\n\ttype ModelDocumentSelection,\n\ttype MatcherPattern,\n\ttype ModelPosition,\n\ttype ModelSchema,\n\ttype ModelSelection,\n\ttype ViewContainerElement,\n\ttype ViewDowncastWriter,\n\ttype ViewElement,\n\t_isParagraphableModelNode as isParagraphable\n} from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * Creates a view element representing the inline image.\n *\n * ```html\n * <span class=\"image-inline\"><img></img></span>\n * ```\n *\n * Note that `alt` and `src` attributes are converted separately, so they are not included.\n *\n * @internal\n */\nexport function createInlineImageViewElement( writer: ViewDowncastWriter ): ViewContainerElement {\n\treturn writer.createContainerElement( 'span', { class: 'image-inline' },\n\t\twriter.createEmptyElement( 'img' )\n\t);\n}\n\n/**\n * Creates a view element representing the block image.\n *\n * ```html\n * <figure class=\"image\"><img></img></figure>\n * ```\n *\n * Note that `alt` and `src` attributes are converted separately, so they are not included.\n *\n * @internal\n */\nexport function createBlockImageViewElement( writer: ViewDowncastWriter ): ViewContainerElement {\n\treturn writer.createContainerElement( 'figure', { class: 'image' }, [\n\t\twriter.createEmptyElement( 'img' ),\n\t\twriter.createSlot( 'children' )\n\t] );\n}\n\n/**\n * A function returning a `MatcherPattern` for a particular type of View images.\n *\n * @deprecated\n * @internal\n * @param matchImageType The type of created image.\n */\nexport function getImgViewElementMatcher( editor: Editor, matchImageType: 'imageBlock' | 'imageInline' ): MatcherPattern {\n\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\tconst areBothImagePluginsLoaded = editor.plugins.has( 'ImageInlineEditing' ) && editor.plugins.has( 'ImageBlockEditing' );\n\n\treturn element => {\n\t\t// Check if the matched view element is an <img>.\n\t\tif ( !imageUtils.isInlineImageView( element ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// If just one of the plugins is loaded (block or inline), it will match all kinds of images.\n\t\tif ( !areBothImagePluginsLoaded ) {\n\t\t\treturn getPositiveMatchPattern( element );\n\t\t}\n\n\t\tconst imageType = getViewImageType( element, imageUtils );\n\n\t\tif ( imageType !== matchImageType ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn getPositiveMatchPattern( element );\n\t};\n\n\tfunction getPositiveMatchPattern( element: ViewElement ) {\n\t\tconst pattern: Record<string, unknown> = {\n\t\t\tname: true\n\t\t};\n\n\t\t// This will trigger src consumption (See https://github.com/ckeditor/ckeditor5/issues/11530).\n\t\tif ( element.hasAttribute( 'src' ) ) {\n\t\t\tpattern.attributes = [ 'src' ];\n\t\t}\n\n\t\treturn pattern;\n\t}\n}\n\n/**\n * Resolves the model image type (`'imageBlock'` or `'imageInline'`) that a given `<img>` view element represents,\n * based purely on its view structure.\n *\n * An `<img>` is treated as a block image when it has a `display: block` style or is wrapped in a block image figure\n * (`<figure class=\"image\">`, also `<figure class=\"image\"><a>...</a></figure>` added by the `LinkImage` plugin).\n * Otherwise it is treated as an inline image.\n *\n * Note that this only reflects the view representation - it does not check whether the resolved type is allowed by the\n * schema at the insertion position.\n *\n * @internal\n * @param element The `<img>` view element to resolve the type for.\n * @param imageUtils The `ImageUtils` plugin instance.\n */\nexport function getViewImageType( element: ViewElement, imageUtils: ImageUtils ): 'imageBlock' | 'imageInline' {\n\t// The <img> can be standalone, wrapped in <figure>...</figure> (ImageBlock plugin) or\n\t// wrapped in <figure><a>...</a></figure> (LinkImage plugin).\n\treturn ( element.getStyle( 'display' ) == 'block' || element.findAncestor( imageUtils.isBlockImageView ) ?\n\t\t'imageBlock' :\n\t\t'imageInline'\n\t);\n}\n\n/**\n * Checks whether the given image type can be placed at the specified position - either directly (or after hoisting\n * to an allowed ancestor) or, for inline images, wrapped in an auto-created paragraph.\n *\n * This is the predicate that decides whether a block image may land at a position or must degrade to an inline image\n * (for example, inside an `$inlineRoot` that disallows block content) and, symmetrically, whether an inline image may\n * become a block image. `isParagraphable()` is always `false` for `imageBlock` (a block object never fits in a\n * paragraph), so the auto-paragraph relaxation only applies to the inline target.\n *\n * @internal\n * @param schema The model schema to check against.\n * @param position The position at which the image type should be placed.\n * @param imageType The image type to check.\n */\nexport function isImageTypePlaceable(\n\tschema: ModelSchema,\n\tposition: ModelPosition,\n\timageType: 'imageBlock' | 'imageInline'\n): boolean {\n\treturn !!schema.findAllowedParent( position, imageType ) || isParagraphable( position, imageType, schema );\n}\n\n/**\n * Considering the current model selection, it returns the name of the model image element\n * (`'imageBlock'` or `'imageInline'`) that will make most sense from the UX perspective if a new\n * image was inserted (also: uploaded, dropped, pasted) at that selection.\n *\n * The assumption is that inserting images into empty blocks or on other block widgets should\n * produce block images. Inline images should be inserted in other cases, e.g. in paragraphs\n * that already contain some text.\n *\n * @internal\n */\nexport function determineImageTypeForInsertionAtSelection(\n\tschema: ModelSchema,\n\tselection: ModelSelection | ModelDocumentSelection\n): 'imageBlock' | 'imageInline' {\n\tconst firstBlock = first( selection.getSelectedBlocks() );\n\n\t// Insert a block image if the selection is not in/on block elements or it's on a block widget.\n\tif ( !firstBlock || schema.isObject( firstBlock ) ) {\n\t\treturn 'imageBlock';\n\t}\n\n\t// A block image should also be inserted into an empty block element\n\t// (that is not an empty list item so the list won't get split).\n\tif ( firstBlock.isEmpty && firstBlock.name != 'listItem' ) {\n\t\treturn 'imageBlock';\n\t}\n\n\t// Otherwise insert an inline image.\n\treturn 'imageInline';\n}\n\n/**\n * Returns parsed value of the size, but only if it contains unit: px.\n *\n * @internal\n */\nexport function getSizeValueIfInPx( size: string | undefined ): number | null {\n\tif ( size && size.endsWith( 'px' ) ) {\n\t\treturn parseInt( size );\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns true if both styles (width and height) are set.\n *\n * If both image styles: width & height are set, they will override the image width & height attributes in the\n * browser. In this case, the image looks the same as if these styles were applied to attributes instead of styles.\n * That's why we can upcast these styles to width & height attributes instead of resizedWidth and resizedHeight.\n *\n * @internal\n */\nexport function widthAndHeightStylesAreBothSet( viewElement: ViewElement ): boolean {\n\tconst widthStyle = getSizeValueIfInPx( viewElement.getStyle( 'width' ) );\n\tconst heightStyle = getSizeValueIfInPx( viewElement.getStyle( 'height' ) );\n\n\treturn !!( widthStyle && heightStyle );\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/**\n * @module image/imageutils\n */\n\nimport type {\n\tModelElement,\n\tViewElement,\n\tViewNode,\n\tModelDocumentSelection,\n\tViewDocumentSelection,\n\tModelSelection,\n\tViewSelection,\n\tModelDocumentFragment,\n\tViewDocumentFragment,\n\tViewDowncastWriter,\n\tModel,\n\tModelPosition,\n\tViewContainerElement\n} from '@ckeditor/ckeditor5-engine';\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport { findOptimalInsertionRange, isWidget, toWidget } from '@ckeditor/ckeditor5-widget';\nimport { determineImageTypeForInsertionAtSelection } from './image/utils.js';\nimport { DomEmitterMixin, type DomEmitter, global } from '@ckeditor/ckeditor5-utils';\n\nconst IMAGE_WIDGETS_CLASSES_MATCH_REGEXP = /^(image|image-inline)$/;\n\n/**\n * A set of helpers related to images.\n */\nexport class ImageUtils extends Plugin {\n\t/**\n\t * DOM Emitter.\n\t */\n\tprivate _domEmitter: DomEmitter = new ( DomEmitterMixin() )();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageUtils' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if the provided model element is an `image` or `imageInline`.\n\t */\n\tpublic isImage( modelElement?: ModelElement | null ): modelElement is ModelElement & { name: 'imageInline' | 'imageBlock' } {\n\t\treturn this.isInlineImage( modelElement ) || this.isBlockImage( modelElement );\n\t}\n\n\t/**\n\t * Checks if the provided view element represents an inline image.\n\t *\n\t * Also, see {@link module:image/imageutils~ImageUtils#isImageWidget}.\n\t */\n\tpublic isInlineImageView( element?: ViewElement | null ): boolean {\n\t\treturn !!element && element.is( 'element', 'img' );\n\t}\n\n\t/**\n\t * Checks if the provided view element represents a block image.\n\t *\n\t * Also, see {@link module:image/imageutils~ImageUtils#isImageWidget}.\n\t */\n\tpublic isBlockImageView( element?: ViewElement | null ): boolean {\n\t\treturn !!element && element.is( 'element', 'figure' ) && element.hasClass( 'image' );\n\t}\n\n\t/**\n\t * Handles inserting single file. This method unifies image insertion using {@link module:widget/utils~findOptimalInsertionRange}\n\t * method.\n\t *\n\t * ```ts\n\t * const imageUtils = editor.plugins.get( 'ImageUtils' );\n\t *\n\t * imageUtils.insertImage( { src: 'path/to/image.jpg' } );\n\t * ```\n\t *\n\t * @param attributes Attributes of the inserted image.\n\t * This method filters out the attributes which are disallowed by the {@link module:engine/model/schema~ModelSchema}.\n\t * @param selectable Place to insert the image. If not specified,\n\t * the {@link module:widget/utils~findOptimalInsertionRange} logic will be applied for the block images\n\t * and `model.document.selection` for the inline images.\n\t *\n\t * **Note**: If `selectable` is passed, this helper will not be able to set selection attributes (such as `linkHref`)\n\t * and apply them to the new image. In this case, make sure all selection attributes are passed in `attributes`.\n\t *\n\t * @param imageType Image type of inserted image. If not specified,\n\t * it will be determined automatically depending of editor config or place of the insertion.\n\t * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t * The default is `true`.\n\t * @return The inserted model image element.\n\t */\n\tpublic insertImage(\n\t\tattributes: Record<string, unknown> = {},\n\t\tselectable: ModelSelection | ModelPosition | null = null,\n\t\timageType: ( 'imageBlock' | 'imageInline' | null ) = null,\n\t\toptions: { setImageSizes?: boolean } = {}\n\t): ModelElement | null {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\tconst determinedImageType = determineImageTypeForInsertion( editor, selectable || selection, imageType );\n\n\t\t// Mix declarative attributes with selection attributes because the new image should \"inherit\"\n\t\t// the latter for best UX. For instance, inline images inserted into existing links\n\t\t// should not split them. To do that, they need to have \"linkHref\" inherited from the selection.\n\t\tattributes = {\n\t\t\t...Object.fromEntries( selection.getAttributes() ),\n\t\t\t...attributes\n\t\t};\n\n\t\tfor ( const attributeName in attributes ) {\n\t\t\tif ( !model.schema.checkAttribute( determinedImageType, attributeName ) ) {\n\t\t\t\tdelete attributes[ attributeName ];\n\t\t\t}\n\t\t}\n\n\t\treturn model.change( writer => {\n\t\t\tconst { setImageSizes = true } = options;\n\t\t\tconst imageElement = writer.createElement( determinedImageType, attributes );\n\n\t\t\tmodel.insertObject( imageElement, selectable, null, {\n\t\t\t\tsetSelection: 'on',\n\t\t\t\t// If we want to insert a block image (for whatever reason) then we don't want to split text blocks.\n\t\t\t\t// This applies only when we don't have the selectable specified (i.e., we insert multiple block images at once).\n\t\t\t\tfindOptimalPosition: !selectable && determinedImageType != 'imageInline' ? 'auto' : undefined\n\t\t\t} );\n\n\t\t\t// Inserting an image might've failed due to schema regulations.\n\t\t\tif ( imageElement.parent ) {\n\t\t\t\tif ( setImageSizes ) {\n\t\t\t\t\tthis.setImageNaturalSizeAttributes( imageElement );\n\t\t\t\t}\n\n\t\t\t\treturn imageElement;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t} );\n\t}\n\n\t/**\n\t * Reads original image sizes and sets them as `width` and `height`.\n\t *\n\t * The `src` attribute may not be available if the user is using an upload adapter. In such a case,\n\t * this method is called again after the upload process is complete and the `src` attribute is available.\n\t */\n\tpublic setImageNaturalSizeAttributes( imageElement: ModelElement ): void {\n\t\tconst src = imageElement.getAttribute( 'src' ) as string;\n\n\t\tif ( !src ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( imageElement.getAttribute( 'width' ) || imageElement.getAttribute( 'height' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.editor.model.change( writer => {\n\t\t\tconst img = new global.window.Image();\n\n\t\t\tthis._domEmitter.listenTo( img, 'load', () => {\n\t\t\t\tif ( !imageElement.getAttribute( 'width' ) && !imageElement.getAttribute( 'height' ) ) {\n\t\t\t\t\t// We use writer.batch to be able to undo (in a single step) width and height setting\n\t\t\t\t\t// along with any change that triggered this action (e.g. image resize or image style change).\n\t\t\t\t\tthis.editor.model.enqueueChange( writer.batch, writer => {\n\t\t\t\t\t\twriter.setAttribute( 'width', img.naturalWidth, imageElement );\n\t\t\t\t\t\twriter.setAttribute( 'height', img.naturalHeight, imageElement );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tthis._domEmitter.stopListening( img, 'load' );\n\t\t\t} );\n\n\t\t\timg.src = src;\n\t\t} );\n\t}\n\n\t/**\n\t * Returns an image widget editing view element if one is selected or is among the selection's ancestors.\n\t */\n\tpublic getClosestSelectedImageWidget( selection: ViewSelection | ViewDocumentSelection ): ViewElement | null {\n\t\tconst selectionPosition = selection.getFirstPosition();\n\n\t\tif ( !selectionPosition ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst viewElement = selection.getSelectedElement();\n\n\t\tif ( viewElement && this.isImageWidget( viewElement ) ) {\n\t\t\treturn viewElement;\n\t\t}\n\n\t\tlet parent: ViewNode | ViewDocumentFragment | null = selectionPosition.parent;\n\n\t\twhile ( parent ) {\n\t\t\tif ( parent.is( 'element' ) && this.isImageWidget( parent ) ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns a image model element if one is selected or is among the selection's ancestors.\n\t */\n\tpublic getClosestSelectedImageElement( selection: ModelSelection | ModelDocumentSelection ): ModelElement | null {\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\treturn this.isImage( selectedElement ) ? selectedElement : selection.getFirstPosition()!.findAncestor( 'imageBlock' );\n\t}\n\n\t/**\n\t * Returns an image widget editing view based on the passed image view.\n\t */\n\tpublic getImageWidgetFromImageView( imageView: ViewElement ): ViewContainerElement | null {\n\t\treturn imageView.findAncestor( { classes: IMAGE_WIDGETS_CLASSES_MATCH_REGEXP } ) as ( ViewContainerElement | null );\n\t}\n\n\t/**\n\t * Checks if image can be inserted at current model selection.\n\t *\n\t * @internal\n\t */\n\tpublic isImageAllowed(): boolean {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\treturn isImageAllowedInParent( this.editor, selection ) && isNotInsideImage( selection );\n\t}\n\n\t/**\n\t * Converts a given {@link module:engine/view/element~ViewElement} to an image widget:\n\t * * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property} allowing to recognize the image widget\n\t * element.\n\t * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n\t *\n\t * @param writer An instance of the view writer.\n\t * @param label The element's label. It will be concatenated with the image `alt` attribute if one is present.\n\t */\n\tpublic toImageWidget( viewElement: ViewElement, writer: ViewDowncastWriter, label: string ): ViewElement {\n\t\twriter.setCustomProperty( 'image', true, viewElement );\n\n\t\tconst labelCreator = () => {\n\t\t\tconst imgElement = this.findViewImgElement( viewElement )!;\n\t\t\tconst altText = imgElement.getAttribute( 'alt' );\n\n\t\t\treturn altText ? `${ altText } ${ label }` : label;\n\t\t};\n\n\t\treturn toWidget( viewElement, writer, { label: labelCreator } );\n\t}\n\n\t/**\n\t * Checks if a given view element is an image widget.\n\t */\n\tprotected isImageWidget( viewElement: ViewElement ): boolean {\n\t\treturn !!viewElement.getCustomProperty( 'image' ) && isWidget( viewElement );\n\t}\n\n\t/**\n\t * Checks if the provided model element is an `image`.\n\t */\n\tpublic isBlockImage( modelElement?: ModelElement | null ): boolean {\n\t\treturn !!modelElement && modelElement.is( 'element', 'imageBlock' );\n\t}\n\n\t/**\n\t * Checks if the provided model element is an `imageInline`.\n\t */\n\tpublic isInlineImage( modelElement?: ModelElement | null ): boolean {\n\t\treturn !!modelElement && modelElement.is( 'element', 'imageInline' );\n\t}\n\n\t/**\n\t * Get the view `<img>` from another view element, e.g. a widget (`<figure class=\"image\">`), a link (`<a>`).\n\t *\n\t * The `<img>` can be located deep in other elements, so this helper performs a deep tree search.\n\t */\n\tpublic findViewImgElement( figureView: ViewElement ): ViewElement | undefined {\n\t\tif ( this.isInlineImageView( figureView ) ) {\n\t\t\treturn figureView;\n\t\t}\n\n\t\tconst editingView = this.editor.editing.view;\n\n\t\tfor ( const { item } of editingView.createRangeIn( figureView ) ) {\n\t\t\tif ( this.isInlineImageView( item as ViewElement ) ) {\n\t\t\t\treturn item as ViewElement;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._domEmitter.stopListening();\n\n\t\treturn super.destroy();\n\t}\n}\n\n/**\n * Checks if image is allowed by schema in optimal insertion parent.\n */\nfunction isImageAllowedInParent( editor: Editor, selection: ModelSelection | ModelDocumentSelection ): boolean {\n\tconst imageType = determineImageTypeForInsertion( editor, selection, null );\n\n\tif ( imageType == 'imageBlock' ) {\n\t\treturn isBlockImageAllowedAtInsertion( editor.model, selection );\n\t}\n\n\treturn editor.model.schema.checkChild( selection.focus!, 'imageInline' );\n}\n\n/**\n * Checks if selection is not placed inside an image (e.g. its caption).\n */\nfunction isNotInsideImage( selection: ModelDocumentSelection ): boolean {\n\treturn [ ...selection.focus!.getAncestors() ].every( ancestor => !ancestor.is( 'element', 'imageBlock' ) );\n}\n\n/**\n * Returns a node that will be used to insert image with `model.insertContent`.\n */\nfunction getInsertImageParent( selection: ModelSelection | ModelDocumentSelection, model: Model ): ModelElement | ModelDocumentFragment {\n\tconst insertionRange = findOptimalInsertionRange( selection, model );\n\tconst parent = insertionRange.start.parent;\n\n\tif ( parent.isEmpty && !parent.is( 'rootElement' ) ) {\n\t\treturn parent.parent!;\n\t}\n\n\treturn parent;\n}\n\n/**\n * Checks whether a block image is allowed by the schema at the optimal insertion point for the given selectable\n * (e.g. it is not allowed inside `$inlineRoot` or any other inline-only container).\n */\nfunction isBlockImageAllowedAtInsertion(\n\tmodel: Model,\n\tselectable: ModelPosition | ModelSelection | ModelDocumentSelection\n): boolean {\n\tconst selection = selectable.is( 'position' ) ? model.createSelection( selectable ) : selectable;\n\tconst insertionParent = getInsertImageParent( selection, model );\n\n\treturn model.schema.checkChild( insertionParent as ModelElement, 'imageBlock' );\n}\n\n/**\n * Determine image element type name depending on editor config or place of insertion.\n *\n * @param imageType Image element type name. Used to force return of provided element name,\n * but only if there is proper plugin enabled.\n */\nfunction determineImageTypeForInsertion(\n\teditor: Editor,\n\tselectable: ModelPosition | ModelSelection | ModelDocumentSelection,\n\timageType: 'imageBlock' | 'imageInline' | null\n): 'imageBlock' | 'imageInline' {\n\tconst schema = editor.model.schema;\n\tconst configImageInsertType = editor.config.get( 'image.insert.type' );\n\n\tif ( !editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\treturn 'imageInline';\n\t}\n\n\tif ( !editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\treturn 'imageBlock';\n\t}\n\n\tif ( imageType ) {\n\t\treturn imageType;\n\t}\n\n\t// Force `imageInline` when a block image cannot be placed at the insertion location (e.g. inside\n\t// `$inlineRoot` or another inline-only container). Otherwise the `image.insert.type` config\n\t// (default: `'block'`) could pick a type the schema would later reject.\n\tif ( !isBlockImageAllowedAtInsertion( editor.model, selectable ) ) {\n\t\treturn 'imageInline';\n\t}\n\n\tif ( configImageInsertType === 'inline' ) {\n\t\treturn 'imageInline';\n\t}\n\n\tif ( configImageInsertType !== 'auto' ) {\n\t\treturn 'imageBlock';\n\t}\n\n\t// Try to replace the selected widget (e.g. another image).\n\tif ( selectable.is( 'selection' ) ) {\n\t\treturn determineImageTypeForInsertionAtSelection( schema, selectable );\n\t}\n\n\treturn schema.checkChild( selectable, 'imageInline' ) ? 'imageInline' : 'imageBlock';\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/**\n * @module image/autoimage\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tClipboard,\n\ttype ClipboardInputTransformationEvent,\n\ttype ClipboardPipeline\n} from '@ckeditor/ckeditor5-clipboard';\nimport { ModelLivePosition, ModelLiveRange } from '@ckeditor/ckeditor5-engine';\nimport { Undo } from '@ckeditor/ckeditor5-undo';\nimport { Delete } from '@ckeditor/ckeditor5-typing';\nimport { global } from '@ckeditor/ckeditor5-utils';\n\nimport { ImageUtils } from './imageutils.js';\n\n// Implements the pattern: http(s)://(www.)example.com/path/to/resource.ext?query=params&maybe=too.\nconst IMAGE_URL_REGEXP = new RegExp( String( /^(http(s)?:\\/\\/)?[\\w-]+\\.[\\w.~:/[\\]@!$&'()*+,;=%-]+/.source +\n\t/\\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source +\n\t/(\\?[\\w.~:/[\\]@!$&'()*+,;=%-]*)?/.source +\n\t/(#[\\w.~:/[\\]@!$&'()*+,;=%-]*)?$/.source ) );\n\n/**\n * The auto-image plugin. It recognizes image links in the pasted content and embeds\n * them shortly after they are injected into the document.\n */\nexport class AutoImage extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Clipboard, ImageUtils, Undo, Delete ]> {\n\t\treturn [ Clipboard, ImageUtils, Undo, Delete ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AutoImage' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t * cleaning of the timeout.\n\t */\n\tprivate _timeoutId: ReturnType<typeof setTimeout> | null;\n\n\t/**\n\t * The position where the `<imageBlock>` element will be inserted after the timeout,\n\t * determined each time a new content is pasted into the document.\n\t */\n\tprivate _positionToInsert: ModelLivePosition | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._timeoutId = null;\n\n\t\tthis._positionToInsert = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\n\t\t// We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n\t\t// After pasting, the content between those positions will be checked for a URL that could be transformed\n\t\t// into an image.\n\t\tthis.listenTo<ClipboardInputTransformationEvent>( clipboardPipeline, 'inputTransformation', () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange()!;\n\n\t\t\tconst leftLivePosition = ModelLivePosition.fromPosition( firstRange.start );\n\t\t\tleftLivePosition.stickiness = 'toPrevious';\n\n\t\t\tconst rightLivePosition = ModelLivePosition.fromPosition( firstRange.end );\n\t\t\trightLivePosition.stickiness = 'toNext';\n\n\t\t\tmodelDocument.once( 'change:data', () => {\n\t\t\t\tthis._embedImageBetweenPositions( leftLivePosition, rightLivePosition );\n\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\n\t\teditor.commands.get( 'undo' )!.on( 'execute', () => {\n\t\t\tif ( this._timeoutId ) {\n\t\t\t\tglobal.window.clearTimeout( this._timeoutId );\n\t\t\t\tthis._positionToInsert!.detach();\n\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Analyzes the part of the document between provided positions in search for a URL representing an image.\n\t * When the URL is found, it is automatically converted into an image.\n\t *\n\t * @param leftPosition Left position of the selection.\n\t * @param rightPosition Right position of the selection.\n\t */\n\tprivate _embedImageBetweenPositions( leftPosition: ModelLivePosition, rightPosition: ModelLivePosition ): void {\n\t\tconst editor = this.editor;\n\t\t// TODO: Use a marker instead of ModelLiveRange & LivePositions.\n\t\tconst urlRange = new ModelLiveRange( leftPosition, rightPosition );\n\t\tconst walker = urlRange.getWalker( { ignoreElementEnd: true } );\n\t\tconst selectionAttributes = Object.fromEntries( editor.model.document.selection.getAttributes() );\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\tlet src = '';\n\n\t\tfor ( const node of walker ) {\n\t\t\tif ( node.item.is( '$textProxy' ) ) {\n\t\t\t\tsrc += node.item.data;\n\t\t\t}\n\t\t}\n\n\t\tsrc = src.trim();\n\n\t\t// If the URL does not match the image URL regexp, let's skip that.\n\t\tif ( !src.match( IMAGE_URL_REGEXP ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Position will not be available in the `setTimeout` function so let's clone it.\n\t\tthis._positionToInsert = ModelLivePosition.fromPosition( leftPosition );\n\n\t\t// This action mustn't be executed if undo was called between pasting and auto-embedding.\n\t\tthis._timeoutId = setTimeout( () => {\n\t\t\t// Do nothing if image element cannot be inserted at the current position.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/2763.\n\t\t\t// Condition must be checked after timeout - pasting may take place on an element, replacing it. The final position matters.\n\t\t\tconst imageCommand = editor.commands.get( 'insertImage' )!;\n\n\t\t\tif ( !imageCommand.isEnabled ) {\n\t\t\t\turlRange.detach();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\teditor.model.change( writer => {\n\t\t\t\tthis._timeoutId = null;\n\n\t\t\t\twriter.remove( urlRange );\n\t\t\t\turlRange.detach();\n\n\t\t\t\tlet insertionPosition;\n\n\t\t\t\t// Check if the position where the element should be inserted is still valid.\n\t\t\t\t// Otherwise leave it as undefined to use the logic of insertImage().\n\t\t\t\tif ( this._positionToInsert!.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tinsertionPosition = this._positionToInsert!.toPosition();\n\t\t\t\t}\n\n\t\t\t\timageUtils.insertImage( { ...selectionAttributes, src }, insertionPosition );\n\n\t\t\t\tthis._positionToInsert!.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t} );\n\n\t\t\tconst deletePlugin: Delete = editor.plugins.get( 'Delete' );\n\n\t\t\tdeletePlugin.requestUndoOnBackspace();\n\t\t}, 100 );\n\t}\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/**\n * @module image/imagetextalternative/imagetextalternativecommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * The image text alternative command. It is used to change the `alt` attribute of `<imageBlock>` and `<imageInline>` model elements.\n */\nexport class ImageTextAlternativeCommand extends Command {\n\t/**\n\t * The command value: `false` if there is no `alt` attribute, otherwise the value of the `alt` attribute.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public value: string | false;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst element = imageUtils.getClosestSelectedImageElement( this.editor.model.document.selection )!;\n\n\t\tthis.isEnabled = !!element;\n\n\t\tif ( this.isEnabled && element.hasAttribute( 'alt' ) ) {\n\t\t\tthis.value = element.getAttribute( 'alt' ) as string | false;\n\t\t} else {\n\t\t\tthis.value = false;\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options\n\t * @param options.newValue The new value of the `alt` attribute to set.\n\t */\n\tpublic override execute( options: { newValue: string } ): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst model = editor.model;\n\t\tconst imageElement = imageUtils.getClosestSelectedImageElement( model.document.selection );\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setAttribute( 'alt', options.newValue, imageElement! );\n\t\t} );\n\t}\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/**\n * @module image/imagetextalternative/imagetextalternativeediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageTextAlternativeCommand } from './imagetextalternativecommand.js';\nimport { ImageUtils } from '../imageutils.js';\n\n/**\n * The image text alternative editing plugin.\n *\n * Registers the `'imageTextAlternative'` command.\n */\nexport class ImageTextAlternativeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageTextAlternativeEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis.editor.commands.add( 'imageTextAlternative', new ImageTextAlternativeCommand( this.editor ) );\n\t}\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/**\n * @module image/imagetextalternative/ui/textalternativeformview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tFormRowView,\n\tFormHeaderView,\n\tLabeledFieldView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputText,\n\tsubmitHandler,\n\ttype InputView,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\nimport { IconPreviousArrow } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The TextAlternativeFormView class.\n *\n * @internal\n */\nexport class TextAlternativeFormView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * An input with a label.\n\t */\n\tpublic labeledInput: LabeledFieldView<InputView>;\n\n\t/**\n\t * The Back button view displayed in the header.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * A button used to submit the form.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * A collection of child views.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A collection of views which can be focused in the form.\n\t */\n\tprotected readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprotected readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\t// Create buttons.\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\n\t\t// Create input fields.\n\t\tthis.labeledInput = this._createLabeledInputView();\n\n\t\tthis.children = this.createCollection( [\n\t\t\tthis._createHeaderView()\n\t\t] );\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\tthis.labeledInput,\n\t\t\t\tthis.saveButtonView\n\t\t\t],\n\t\t\tclass: [\n\t\t\t\t'ck-form__row_with-submit',\n\t\t\t\t'ck-form__row_large-top-padding'\n\t\t\t]\n\t\t} ) );\n\n\t\tthis._focusables = new ViewCollection();\n\n\t\t// Close the panel on esc key press when the **form has focus**.\n\t\tthis.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis.fire<TextAlternativeFormViewCancelEvent>( 'cancel' );\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form',\n\t\t\t\t\t'ck-text-alternative-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-image/issues/40\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.backButtonView,\n\t\t\tthis.labeledInput,\n\t\t\tthis.saveButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Creates a back button view that cancels the form.\n\t */\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn backButton;\n\t}\n\n\t/**\n\t * Creates a save button view that text alternative the image.\n\t */\n\tprivate _createSaveButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst saveButton = new ButtonView( this.locale );\n\n\t\tsaveButton.set( {\n\t\t\tlabel: t( 'Save' ),\n\t\t\twithText: true,\n\t\t\ttype: 'submit',\n\t\t\tclass: 'ck-button-action ck-button-bold'\n\t\t} );\n\n\t\treturn saveButton;\n\t}\n\n\t/**\n\t * Creates a header view for the form.\n\t */\n\tprivate _createHeaderView(): FormHeaderView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst header = new FormHeaderView( this.locale, {\n\t\t\tlabel: t( 'Text Alternative' )\n\t\t} );\n\n\t\theader.children.add( this.backButtonView, 0 );\n\n\t\treturn header;\n\t}\n\n\t/**\n\t * Creates an input with a label.\n\t *\n\t * @returns Labeled field view instance.\n\t */\n\tprivate _createLabeledInputView(): LabeledFieldView<InputView> {\n\t\tconst t = this.locale!.t;\n\t\tconst labeledInput = new LabeledFieldView<InputView>( this.locale, createLabeledInputText );\n\n\t\tlabeledInput.label = t( 'Text alternative' );\n\t\tlabeledInput.class = 'ck-labeled-field-view_full-width';\n\n\t\treturn labeledInput;\n\t}\n}\n\n/**\n * Fired when the form view is submitted.\n *\n * @eventName ~TextAlternativeFormView#submit\n * @internal\n */\nexport type TextAlternativeFormViewSubmitEvent = {\n\tname: 'submit';\n\targs: [];\n};\n\n/**\n * Fired when the form view is canceled.\n *\n * @eventName ~TextAlternativeFormView#cancel\n * @internal\n */\nexport type TextAlternativeFormViewCancelEvent = {\n\tname: 'cancel';\n\targs: [];\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/**\n * @module image/image/ui/utils\n */\n\nimport type { DomOptimalPositionOptions } from '@ckeditor/ckeditor5-utils';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { BalloonPanelView, type ContextualBalloon } from '@ckeditor/ckeditor5-ui';\n\nimport { type ImageUtils } from '../../imageutils.js';\n\n/**\n * A helper utility that positions the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance\n * with respect to the image in the editor content, if one is selected.\n *\n * @param editor The editor instance.\n * @internal\n */\nexport function repositionContextualBalloon( editor: Editor ): void {\n\tconst balloon: ContextualBalloon = editor.plugins.get( 'ContextualBalloon' );\n\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\tif ( imageUtils.getClosestSelectedImageWidget( editor.editing.view.document.selection ) ) {\n\t\tconst position = getBalloonPositionData( editor );\n\n\t\tballoon.updatePosition( position );\n\t}\n}\n\n/**\n * Returns the positioning options that control the geometry of the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n * to the selected element in the editor content.\n *\n * @param editor The editor instance.\n * @internal\n */\nexport function getBalloonPositionData( editor: Editor ): Partial<DomOptimalPositionOptions> {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\treturn {\n\t\ttarget: editingView.domConverter.mapViewToDom(\n\t\t\timageUtils.getClosestSelectedImageWidget( editingView.document.selection )!\n\t\t) as HTMLElement,\n\t\tpositions: [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\tdefaultPositions.viewportStickyNorth\n\t\t]\n\t};\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/**\n * @module image/imagetextalternative/imagetextalternativeui\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tButtonView,\n\tContextualBalloon,\n\tclickOutsideHandler,\n\tCssTransitionDisablerMixin,\n\ttype ViewWithCssTransitionDisabler\n} from '@ckeditor/ckeditor5-ui';\nimport { IconTextAlternative } from '@ckeditor/ckeditor5-icons';\n\nimport {\n\tTextAlternativeFormView,\n\ttype TextAlternativeFormViewCancelEvent,\n\ttype TextAlternativeFormViewSubmitEvent\n} from './ui/textalternativeformview.js';\nimport { repositionContextualBalloon, getBalloonPositionData } from '../image/ui/utils.js';\nimport { type ImageTextAlternativeCommand } from './imagetextalternativecommand.js';\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * The image text alternative UI plugin.\n *\n * The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n */\nexport class ImageTextAlternativeUI extends Plugin {\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon?: ContextualBalloon;\n\n\t/**\n\t * A form containing a textarea and buttons, used to change the `alt` text value.\n\t */\n\tprivate _form?: TextAlternativeFormView & ViewWithCssTransitionDisabler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageTextAlternativeUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis._createButton();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see https://github.com/ckeditor/ckeditor5/issues/1341).\n\t\tif ( this._form ) {\n\t\t\tthis._form.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Creates a button showing the balloon panel for changing the image text alternative and\n\t * registers it in the editor {@link module:ui/componentfactory~ComponentFactory ComponentFactory}.\n\t */\n\tprivate _createButton(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'imageTextAlternative', locale => {\n\t\t\tconst command: ImageTextAlternativeCommand = editor.commands.get( 'imageTextAlternative' )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: t( 'Change image text alternative' ),\n\t\t\t\ticon: IconTextAlternative,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\t\tview.bind( 'isOn' ).to( command, 'value', value => !!value );\n\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\tthis._showForm();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the {@link module:image/imagetextalternative/ui/textalternativeformview~TextAlternativeFormView}\n\t * form.\n\t */\n\tprivate _createForm(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\tthis._balloon = this.editor.plugins.get( 'ContextualBalloon' );\n\n\t\tthis._form = new ( CssTransitionDisablerMixin( TextAlternativeFormView ) )( editor.locale );\n\n\t\t// Render the form so its #element is available for clickOutsideHandler.\n\t\tthis._form.render();\n\n\t\tthis.listenTo<TextAlternativeFormViewSubmitEvent>( this._form, 'submit', () => {\n\t\t\teditor.execute( 'imageTextAlternative', {\n\t\t\t\tnewValue: this._form!.labeledInput.fieldView.element!.value\n\t\t\t} );\n\n\t\t\tthis._hideForm( true );\n\t\t} );\n\n\t\tthis.listenTo<TextAlternativeFormViewCancelEvent>( this._form, 'cancel', () => {\n\t\t\tthis._hideForm( true );\n\t\t} );\n\n\t\t// Reposition the balloon or hide the form if an image widget is no longer selected.\n\t\tthis.listenTo( editor.ui, 'update', () => {\n\t\t\tif ( !imageUtils.getClosestSelectedImageWidget( viewDocument.selection ) ) {\n\t\t\t\tthis._hideForm( true );\n\t\t\t} else if ( this._isVisible ) {\n\t\t\t\trepositionContextualBalloon( editor );\n\t\t\t}\n\t\t} );\n\n\t\t// Close on click outside of balloon panel element.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this._form,\n\t\t\tactivator: () => this._isVisible,\n\t\t\tcontextElements: () => [ this._balloon!.view.element! ],\n\t\t\tcallback: () => this._hideForm()\n\t\t} );\n\t}\n\n\t/**\n\t * Shows the {@link #_form} in the {@link #_balloon}.\n\t */\n\tprivate _showForm(): void {\n\t\tif ( this._isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._form ) {\n\t\t\tthis._createForm();\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst command: ImageTextAlternativeCommand = editor.commands.get( 'imageTextAlternative' )!;\n\t\tconst labeledInput = this._form!.labeledInput;\n\n\t\tthis._form!.disableCssTransitions();\n\n\t\tif ( !this._isInBalloon ) {\n\t\t\tthis._balloon!.add( {\n\t\t\t\tview: this._form!,\n\t\t\t\tposition: getBalloonPositionData( editor )\n\t\t\t} );\n\t\t}\n\n\t\t// Make sure that each time the panel shows up, the field remains in sync with the value of\n\t\t// the command. If the user typed in the input, then canceled the balloon (`labeledInput#value`\n\t\t// stays unaltered) and re-opened it without changing the value of the command, they would see the\n\t\t// old value instead of the actual value of the command.\n\t\t// https://github.com/ckeditor/ckeditor5-image/issues/114\n\t\tlabeledInput.fieldView.value = labeledInput.fieldView.element!.value = command.value || '';\n\n\t\tthis._form!.labeledInput.fieldView.select();\n\n\t\tthis._form!.enableCssTransitions();\n\t}\n\n\t/**\n\t * Removes the {@link #_form} from the {@link #_balloon}.\n\t *\n\t * @param focusEditable Controls whether the editing view is focused afterwards.\n\t */\n\tprivate _hideForm( focusEditable: boolean = false ): void {\n\t\tif ( !this._isInBalloon ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Blur the input element before removing it from DOM to prevent issues in some browsers.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1501.\n\t\tif ( this._form!.focusTracker.isFocused ) {\n\t\t\tthis._form!.saveButtonView.focus();\n\t\t}\n\n\t\tthis._balloon!.remove( this._form! );\n\n\t\tif ( focusEditable ) {\n\t\t\tthis.editor.editing.view.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t */\n\tprivate get _isVisible(): boolean {\n\t\treturn !!this._balloon && this._balloon.visibleView === this._form;\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t */\n\tprivate get _isInBalloon(): boolean {\n\t\treturn !!this._balloon && this._balloon.hasView( this._form! );\n\t}\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/**\n * @module image/imagetextalternative\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageTextAlternativeEditing } from './imagetextalternative/imagetextalternativeediting.js';\nimport { ImageTextAlternativeUI } from './imagetextalternative/imagetextalternativeui.js';\n\n/**\n * The image text alternative plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-styles image styles} documentation.\n *\n * This is a \"glue\" plugin which loads the\n *  {@link module:image/imagetextalternative/imagetextalternativeediting~ImageTextAlternativeEditing}\n * and {@link module:image/imagetextalternative/imagetextalternativeui~ImageTextAlternativeUI} plugins.\n */\nexport class ImageTextAlternative extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageTextAlternativeEditing, ImageTextAlternativeUI ]> {\n\t\treturn [ ImageTextAlternativeEditing, ImageTextAlternativeUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageTextAlternative' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module image/image/converters\n */\n\nimport {\n\ttype DowncastDispatcher,\n\ttype ModelElement,\n\ttype UpcastDispatcher,\n\ttype UpcastElementEvent,\n\ttype ViewElement,\n\ttype ViewElementAttributes,\n\ttype DowncastAttributeEvent,\n\ttype Consumables\n} from '@ckeditor/ckeditor5-engine';\nimport { first, type GetCallback } from '@ckeditor/ckeditor5-utils';\nimport { type ImageUtils } from '../imageutils.js';\nimport { getViewImageType, isImageTypePlaceable } from './utils.js';\n\n/**\n * Returns a function that converts the image view representation:\n *\n * ```html\n * <figure class=\"image\"><img src=\"...\" alt=\"...\"></img></figure>\n * ```\n *\n * to the model representation:\n *\n * ```html\n * <imageBlock src=\"...\" alt=\"...\"></imageBlock>\n * ```\n *\n * The entire content of the `<figure>` element except the first `<img>` is being converted as children\n * of the `<imageBlock>` model element.\n *\n * @internal\n */\nexport function upcastImageFigure( imageUtils: ImageUtils ): ( dispatcher: UpcastDispatcher ) => void {\n\tconst converter: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\t\t// Do not convert if this is not an \"image figure\".\n\t\tif ( !conversionApi.consumable.test( data.viewItem, { name: true, classes: 'image' } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find an image element inside the figure element.\n\t\tconst viewImage = imageUtils.findViewImgElement( data.viewItem );\n\n\t\t// Do not convert if image element is absent or was already converted.\n\t\tif ( !viewImage || !conversionApi.consumable.test( viewImage, { name: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If a block image cannot land at this position (e.g. inside an inline root or another limit that\n\t\t// disallows block content), do not handle the figure here. Leaving it unconsumed lets the default\n\t\t// converter unwrap the figure so the `upcastImg()` converter can turn the inner `<img>` into an inline\n\t\t// image - otherwise the whole figure (the image included) would be dropped.\n\t\tif ( !isImageTypePlaceable( conversionApi.schema, data.modelCursor, 'imageBlock' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Consume the figure to prevent other converters from processing it again.\n\t\tconversionApi.consumable.consume( data.viewItem, { name: true, classes: 'image' } );\n\n\t\t// Convert view image to model image.\n\t\tconst conversionResult = conversionApi.convertItem( viewImage, data.modelCursor );\n\n\t\t// When nothing was converted there is no model image to attach the figure's children to.\n\t\t// In practice `convertItem()` yields a non-null (empty) range for an `<img/>` - handled by the\n\t\t// `!modelImage` check below - so this only guards the `ModelRange | null` return type.\n\t\t/* istanbul ignore if: defensive guard for the `ModelRange | null` return type -- @preserve */\n\t\tif ( !conversionResult.modelRange ) {\n\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'image' } );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Get image element from conversion result.\n\t\tconst modelImage = first( conversionResult.modelRange.getItems() ) as ModelElement;\n\n\t\t// When image wasn't successfully converted then finish conversion.\n\t\tif ( !modelImage ) {\n\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'image' } );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Convert rest of the figure element's children as an image children.\n\t\tconversionApi.convertChildren( data.viewItem, modelImage );\n\n\t\tconversionApi.updateConversionResult( modelImage, data );\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:figure', converter );\n\t};\n}\n\n/**\n * Returns a function that upcasts an `<img>` element to either an `imageBlock` or an `imageInline` model element.\n *\n * The image type is first determined from the view structure (see {@link module:image/image/utils~getViewImageType}):\n * an `<img>` wrapped in a `<figure class=\"image\">` or styled with `display: block` becomes an `imageBlock`, otherwise\n * an `imageInline`.\n *\n * That structural type is then verified against the schema at the insertion position. If it cannot be placed there -\n * neither directly (or after hoisting to an allowed ancestor) nor wrapped in an auto-created paragraph - the converter\n * falls back to `matchImageType`. This is what allows a block image to degrade to an inline image inside an inline root\n * (and, symmetrically, an inline image to become a block image in a context that only accepts block images) instead of\n * being dropped.\n *\n * Both `ImageBlockEditing` and `ImageInlineEditing` register this converter, each passing the type it falls back to.\n * When only one of them is loaded, that single type is always produced.\n *\n * @internal\n * @param matchImageType The image type to fall back to when the type resolved from the view cannot be placed at the\n * insertion position.\n * @param imageUtils The `ImageUtils` plugin instance.\n */\nexport function upcastImg(\n\tmatchImageType: 'imageBlock' | 'imageInline',\n\timageUtils: ImageUtils\n): ( dispatcher: UpcastDispatcher ) => void {\n\tconst converter: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\t\t// Check if the `<img>` should be upcasted as a block image or an inline one.\n\t\tlet imageType = getViewImageType( data.viewItem, imageUtils );\n\n\t\t// Collect attributes and build consumables to test.\n\t\tconst attributes = data.viewItem.hasAttribute( 'src' ) ? {\n\t\t\tsrc: data.viewItem.getAttribute( 'src' )\n\t\t} : undefined;\n\n\t\tconst consumables: Consumables = {\n\t\t\tname: true,\n\t\t\tattributes: Object.keys( attributes || {} )\n\t\t};\n\n\t\t// Exit early if it is already consumed by some other converter.\n\t\tif ( !conversionApi.consumable.test( data.viewItem, consumables ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Is this image type allowed here? Switch type if not.\n\t\tif ( imageType != matchImageType && !isImageTypePlaceable( conversionApi.schema, data.modelCursor, imageType ) ) {\n\t\t\timageType = matchImageType;\n\t\t}\n\n\t\tconst modelElement = conversionApi.writer.createElement( imageType, attributes );\n\n\t\tif ( !conversionApi.safeInsert( modelElement, data.modelCursor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( data.viewItem, consumables );\n\t\tconversionApi.convertChildren( data.viewItem, modelElement );\n\t\tconversionApi.updateConversionResult( modelElement, data );\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:img', converter );\n\t};\n}\n\n/**\n * Returns a function that converts the image view representation:\n *\n * ```html\n * <picture><source ... /><source ... />...<img ... /></picture>\n * ```\n *\n * to the model representation as the `sources` attribute:\n *\n * ```html\n * <image[Block|Inline] ... sources=\"...\"></image[Block|Inline]>\n * ```\n *\n * @internal\n */\nexport function upcastPicture( imageUtils: ImageUtils ): ( dispatcher: UpcastDispatcher ) => void {\n\tconst sourceAttributeNames = [ 'srcset', 'media', 'type', 'sizes' ];\n\n\tconst converter: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\t\tconst pictureViewElement = data.viewItem;\n\n\t\t// Do not convert <picture> if already consumed.\n\t\tif ( !conversionApi.consumable.test( pictureViewElement, { name: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst sources = new Map<ViewElement, Record<string, string | undefined>>();\n\n\t\t// Collect all <source /> elements attribute values.\n\t\tfor ( const childSourceElement of pictureViewElement.getChildren() ) {\n\t\t\tif ( childSourceElement.is( 'element', 'source' ) ) {\n\t\t\t\tconst attributes: Record<string, string | undefined> = {};\n\n\t\t\t\tfor ( const name of sourceAttributeNames ) {\n\t\t\t\t\tif ( childSourceElement.hasAttribute( name ) ) {\n\t\t\t\t\t\t// Don't collect <source /> attribute if already consumed somewhere else.\n\t\t\t\t\t\tif ( conversionApi.consumable.test( childSourceElement, { attributes: name } ) ) {\n\t\t\t\t\t\t\tattributes[ name ] = childSourceElement.getAttribute( name );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( Object.keys( attributes ).length ) {\n\t\t\t\t\tsources.set( childSourceElement, attributes );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst imgViewElement = imageUtils.findViewImgElement( pictureViewElement );\n\n\t\t// Don't convert when a picture has no <img/> inside (it is broken).\n\t\tif ( !imgViewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet modelImage = data.modelCursor.parent;\n\n\t\t// - In case of an inline image (cursor parent in a <paragraph>), the <img/> must be converted right away\n\t\t// because no converter handled it yet and otherwise there would be no model element to set the sources attribute on.\n\t\t// - In case of a block image, the <figure class=\"image\"> converter (in ImageBlockEditing) converts the\n\t\t// <img/> right away on its own and the modelCursor is already inside an imageBlock and there's nothing special\n\t\t// to do here.\n\t\tif ( !modelImage.is( 'element', 'imageBlock' ) ) {\n\t\t\tconst conversionResult = conversionApi.convertItem( imgViewElement, data.modelCursor );\n\n\t\t\t// Set image range as conversion result.\n\t\t\tdata.modelRange = conversionResult.modelRange;\n\n\t\t\t// Continue conversion where image conversion ends.\n\t\t\tdata.modelCursor = conversionResult.modelCursor;\n\n\t\t\t// The `<img/>` was not converted to a model image element (e.g. an inline root only allows\n\t\t\t// inline content and neither image type was allowed), so there is nothing to set the sources on.\n\t\t\t// In practice `convertItem()` yields a non-null (empty) range for an `<img/>` - handled by the\n\t\t\t// `!modelImage` check below - so this only guards the `ModelRange | null` return type.\n\t\t\t/* istanbul ignore if: defensive guard for the `ModelRange | null` return type -- @preserve */\n\t\t\tif ( !conversionResult.modelRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmodelImage = first( conversionResult.modelRange.getItems() ) as ModelElement;\n\n\t\t\tif ( !modelImage ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconversionApi.consumable.consume( pictureViewElement, { name: true } );\n\n\t\t// Consume only these <source/> attributes that were actually collected and will be passed on\n\t\t// to the image model element.\n\t\tfor ( const [ sourceElement, attributes ] of sources ) {\n\t\t\tconversionApi.consumable.consume( sourceElement, { attributes: Object.keys( attributes ) } );\n\t\t}\n\n\t\tif ( sources.size ) {\n\t\t\tconversionApi.writer.setAttribute( 'sources', Array.from( sources.values() ), modelImage );\n\t\t}\n\n\t\t// Convert rest of the <picture> children as an image children. Other converters may want to consume them.\n\t\tconversionApi.convertChildren( pictureViewElement, modelImage );\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:picture', converter );\n\t};\n}\n\n/**\n * Converter used to convert the `srcset` model image attribute to the `srcset` and `sizes` attributes in the view.\n *\n * @internal\n * @param imageType The type of the image.\n */\nexport function downcastSrcsetAttribute(\n\timageUtils: ImageUtils,\n\timageType: 'imageBlock' | 'imageInline'\n): ( dispatcher: DowncastDispatcher ) => void {\n\tconst converter: GetCallback<DowncastAttributeEvent<ModelElement>> = ( evt, data, conversionApi\t) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst writer = conversionApi.writer;\n\t\tconst element = conversionApi.mapper.toViewElement( data.item )!;\n\t\tconst img = imageUtils.findViewImgElement( element )!;\n\n\t\tif ( data.attributeNewValue === null ) {\n\t\t\twriter.removeAttribute( 'srcset', img );\n\t\t\twriter.removeAttribute( 'sizes', img );\n\t\t} else {\n\t\t\tif ( data.attributeNewValue ) {\n\t\t\t\twriter.setAttribute( 'srcset', data.attributeNewValue, img );\n\t\t\t\t// Always outputting `100vw`. See https://github.com/ckeditor/ckeditor5-image/issues/2.\n\t\t\t\twriter.setAttribute( 'sizes', '100vw', img );\n\t\t\t}\n\t\t}\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( `attribute:srcset:${ imageType }`, converter );\n\t};\n}\n\n/**\n * Converts the `source` model attribute to the `<picture><source /><source />...<img /></picture>`\n * view structure.\n *\n * @internal\n */\nexport function downcastSourcesAttribute( imageUtils: ImageUtils ): ( dispatcher: DowncastDispatcher ) => void {\n\tconst converter: GetCallback<DowncastAttributeEvent<ModelElement>> = ( evt, data, conversionApi\t) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst element = conversionApi.mapper.toViewElement( data.item )!;\n\t\tconst imgElement = imageUtils.findViewImgElement( element )!;\n\t\tconst attributeNewValue = data.attributeNewValue as null | Array<ViewElementAttributes>;\n\n\t\tif ( attributeNewValue && attributeNewValue.length ) {\n\t\t\t// Collect all wrapping attribute elements.\n\t\t\tconst attributeElements = [];\n\t\t\tlet viewElement = imgElement.parent;\n\n\t\t\twhile ( viewElement && viewElement.is( 'attributeElement' ) ) {\n\t\t\t\tconst parentElement = viewElement.parent;\n\n\t\t\t\tviewWriter.unwrap( viewWriter.createRangeOn( imgElement ), viewElement );\n\n\t\t\t\tattributeElements.unshift( viewElement );\n\t\t\t\tviewElement = parentElement;\n\t\t\t}\n\n\t\t\tconst hasPictureElement = imgElement.parent!.is( 'element', 'picture' );\n\n\t\t\t// Reuse existing <picture> element (https://github.com/ckeditor/ckeditor5/issues/17192) or create a new one.\n\t\t\tconst pictureElement = hasPictureElement ? imgElement.parent : viewWriter.createContainerElement( 'picture', null );\n\n\t\t\tif ( !hasPictureElement ) {\n\t\t\t\tviewWriter.insert( viewWriter.createPositionBefore( imgElement ), pictureElement );\n\t\t\t}\n\n\t\t\tviewWriter.remove( viewWriter.createRangeIn( pictureElement ) );\n\n\t\t\tviewWriter.insert( viewWriter.createPositionAt( pictureElement, 'end' ),\n\t\t\t\tattributeNewValue.map( sourceAttributes => {\n\t\t\t\t\treturn viewWriter.createEmptyElement( 'source', sourceAttributes );\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tviewWriter.move( viewWriter.createRangeOn( imgElement ), viewWriter.createPositionAt( pictureElement, 'end' ) );\n\n\t\t\t// Apply collected attribute elements over the new picture element.\n\t\t\tfor ( const attributeElement of attributeElements ) {\n\t\t\t\tviewWriter.wrap( viewWriter.createRangeOn( pictureElement ), attributeElement );\n\t\t\t}\n\t\t}\n\t\t// Both setting \"sources\" to an empty array and removing the attribute should unwrap the <img />.\n\t\t// Unwrap once if the latter followed the former, though.\n\t\telse if ( imgElement.parent!.is( 'element', 'picture' ) ) {\n\t\t\tconst pictureElement = imgElement.parent;\n\n\t\t\tviewWriter.move( viewWriter.createRangeOn( imgElement ), viewWriter.createPositionBefore( pictureElement ) );\n\t\t\tviewWriter.remove( pictureElement );\n\t\t}\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute:sources:imageBlock', converter );\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute:sources:imageInline', converter );\n\t};\n}\n\n/**\n * Converter used to convert a given image attribute from the model to the view.\n *\n * @internal\n * @param imageType The type of the image.\n * @param attributeKey The name of the attribute to convert.\n */\nexport function downcastImageAttribute(\n\timageUtils: ImageUtils,\n\timageType: 'imageBlock' | 'imageInline',\n\tattributeKey: string\n): ( dispatcher: DowncastDispatcher ) => void {\n\tconst converter: GetCallback<DowncastAttributeEvent<ModelElement>> = ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst element = conversionApi.mapper.toViewElement( data.item )!;\n\t\tconst img = imageUtils.findViewImgElement( element )!;\n\n\t\tviewWriter.setAttribute( data.attributeKey, data.attributeNewValue || '', img );\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( `attribute:${ attributeKey }:${ imageType }`, converter );\n\t};\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/**\n * @module image/image/imageloadobserver\n */\n\nimport { Observer } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Observes all new images added to the {@link module:engine/view/document~ViewDocument},\n * fires {@link module:engine/view/document~ViewDocument#event:imageLoaded} and\n * {@link module:engine/view/document~ViewDocument#event:layoutChanged} event every time when the new image\n * has been loaded.\n *\n * **Note:** This event is not fired for images that has been added to the document and rendered as `complete` (already loaded).\n */\nexport class ImageLoadObserver extends Observer {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic observe( domRoot: HTMLElement ): void {\n\t\tthis.listenTo( domRoot, 'load', ( event, domEvent ) => {\n\t\t\tconst domElement = domEvent.target as HTMLElement;\n\n\t\t\tif ( this.checkShouldIgnoreEventFromTarget( domElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( domElement.tagName == 'IMG' ) {\n\t\t\t\tthis._fireEvents( domEvent );\n\t\t\t}\n\t\t\t// Use capture phase for better performance (https://github.com/ckeditor/ckeditor5/issues/4504).\n\t\t}, { useCapture: true } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override stopObserving( domRoot: HTMLElement ): void {\n\t\tthis.stopListening( domRoot );\n\t}\n\n\t/**\n\t * Fires {@link module:engine/view/document~ViewDocument#event:layoutChanged} and\n\t * {@link module:engine/view/document~ViewDocument#event:imageLoaded}\n\t * if observer {@link #isEnabled is enabled}.\n\t *\n\t * @param domEvent The DOM event.\n\t */\n\tprivate _fireEvents( domEvent: Event ): void {\n\t\tif ( this.isEnabled ) {\n\t\t\tthis.document.fire( 'layoutChanged' );\n\t\t\tthis.document.fire<ImageLoadedEvent>( 'imageLoaded', domEvent );\n\t\t}\n\t}\n}\n\n/**\n * Fired when an <img/> DOM element has been loaded in the DOM root.\n *\n * Introduced by {@link module:image/image/imageloadobserver~ImageLoadObserver}.\n *\n * @see module:image/image/imageloadobserver~ImageLoadObserver\n *\n * @eventName module:engine/view/document~ViewDocument#imageLoaded\n * @param data Event data.\n */\nexport type ImageLoadedEvent = {\n\tname: 'imageLoaded';\n\targs: [ Event ];\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/**\n * @module image/image/insertimagecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { logWarning, toArray, type ArrayOrItem } from '@ckeditor/ckeditor5-utils';\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * Insert image command.\n *\n * The command is registered by the {@link module:image/image/imageediting~ImageEditing} plugin as `insertImage`\n * and it is also available via aliased `imageInsert` name.\n *\n * In order to insert an image at the current selection position\n * (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),\n * execute the command and specify the image source:\n *\n * ```ts\n * editor.execute( 'insertImage', { source: 'http://url.to.the/image' } );\n * ```\n *\n * It is also possible to insert multiple images at once:\n *\n * ```ts\n * editor.execute( 'insertImage', {\n * \tsource:  [\n * \t\t'path/to/image.jpg',\n * \t\t'path/to/other-image.jpg'\n * \t]\n * } );\n * ```\n *\n * If you want to take the full control over the process, you can specify individual model attributes:\n *\n * ```ts\n * editor.execute( 'insertImage', {\n * \tsource:  [\n * \t\t{ src: 'path/to/image.jpg', alt: 'First alt text' },\n * \t\t{ src: 'path/to/other-image.jpg', alt: 'Second alt text', customAttribute: 'My attribute value' }\n * \t]\n * } );\n * ```\n */\nexport class InsertImageCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tconst configImageInsertType = editor.config.get( 'image.insert.type' );\n\n\t\tif ( !editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\tif ( configImageInsertType === 'block' ) {\n\t\t\t\t/**\n\t\t\t\t * The {@link module:image/imageblock~ImageBlock} plugin must be enabled to allow inserting block images. See\n\t\t\t\t * {@link module:image/imageconfig~ImageInsertConfig#type} to learn more.\n\t\t\t\t *\n\t\t\t\t * @error image-block-plugin-required\n\t\t\t\t */\n\t\t\t\tlogWarning( 'image-block-plugin-required' );\n\t\t\t}\n\t\t}\n\n\t\tif ( !editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\tif ( configImageInsertType === 'inline' ) {\n\t\t\t\t/**\n\t\t\t\t * The {@link module:image/imageinline~ImageInline} plugin must be enabled to allow inserting inline images. See\n\t\t\t\t * {@link module:image/imageconfig~ImageInsertConfig#type} to learn more.\n\t\t\t\t *\n\t\t\t\t * @error image-inline-plugin-required\n\t\t\t\t */\n\t\t\t\tlogWarning( 'image-inline-plugin-required' );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\tthis.isEnabled = imageUtils.isImageAllowed();\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.imageType The type of the image to insert. If not specified, the type will be determined automatically.\n\t * @param options.source The image source or an array of image sources to insert.\n\t * @param options.breakBlock If set to `true`, the block at the selection start will be broken before inserting the image.\n\t * See the documentation of the command to learn more about accepted formats.\n\t */\n\tpublic override execute(\n\t\toptions: {\n\t\t\tsource: ArrayOrItem<string | Record<string, unknown>>;\n\t\t\timageType?: 'imageBlock' | 'imageInline' | null;\n\t\t\tbreakBlock?: boolean;\n\t\t}\n\t): void {\n\t\tconst sourceDefinitions = toArray<string | Record<string, unknown>>( options.source );\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\t// In case of multiple images, each image (starting from the 2nd) will be inserted at a position that\n\t\t// follows the previous one. That will move the selection and, to stay on the safe side and make sure\n\t\t// all images inherit the same selection attributes, they are collected beforehand.\n\t\t//\n\t\t// Applying these attributes ensures, for instance, that inserting an (inline) image into a link does\n\t\t// not split that link but preserves its continuity.\n\t\t//\n\t\t// Note: Selection attributes that do not make sense for images will be filtered out by insertImage() anyway.\n\t\tconst selectionAttributes = Object.fromEntries( selection.getAttributes() );\n\n\t\tsourceDefinitions.forEach( ( sourceDefinition, index ) => {\n\t\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t\tif ( typeof sourceDefinition === 'string' ) {\n\t\t\t\tsourceDefinition = { src: sourceDefinition };\n\t\t\t}\n\n\t\t\t// Inserting of an inline image replace the selected element and make a selection on the inserted image.\n\t\t\t// Therefore inserting multiple inline images requires creating position after each element.\n\t\t\tif ( index && selectedElement && imageUtils.isImage( selectedElement ) ) {\n\t\t\t\tconst position = this.editor.model.createPositionAfter( selectedElement );\n\n\t\t\t\timageUtils.insertImage( { ...sourceDefinition, ...selectionAttributes }, position, options.imageType );\n\t\t\t} else if ( options.breakBlock ) {\n\t\t\t\timageUtils.insertImage( { ...sourceDefinition, ...selectionAttributes }, selection.getFirstPosition(), options.imageType );\n\t\t\t} else {\n\t\t\t\timageUtils.insertImage( { ...sourceDefinition, ...selectionAttributes }, null, options.imageType );\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module image/image/replaceimagesourcecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { type ImageUtils } from '../imageutils.js';\nimport type { ModelWriter, ModelElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Replace image source command.\n *\n * Changes image source to the one provided. Can be executed as follows:\n *\n * ```ts\n * editor.execute( 'replaceImageSource', { source: 'http://url.to.the/image' } );\n * ```\n */\nexport class ReplaceImageSourceCommand extends Command {\n\tdeclare public value: string | null;\n\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.decorate( 'cleanupImage' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst element = this.editor.model.document.selection.getSelectedElement()!;\n\n\t\tthis.isEnabled = imageUtils.isImage( element );\n\t\tthis.value = this.isEnabled ? element.getAttribute( 'src' ) as string : null;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.source The image source to replace.\n\t */\n\tpublic override execute( options: { source: string } ): void {\n\t\tconst image = this.editor.model.document.selection.getSelectedElement()!;\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\tthis.editor.model.change( writer => {\n\t\t\twriter.setAttribute( 'src', options.source, image );\n\n\t\t\tthis.cleanupImage( writer, image );\n\n\t\t\timageUtils.setImageNaturalSizeAttributes( image );\n\t\t} );\n\t}\n\n\t/**\n\t * Cleanup image attributes that are not relevant to the new source.\n\t *\n\t * Removed attributes are: 'srcset', 'sizes', 'sources', 'width', 'height', 'alt'.\n\t *\n\t * This method is decorated, to allow custom cleanup logic.\n\t * For example, to remove 'myImageId' attribute after 'src' has changed:\n\t *\n\t * ```ts\n\t * replaceImageSourceCommand.on( 'cleanupImage', ( eventInfo, [ writer, image ] ) => {\n\t * \twriter.removeAttribute( 'myImageId', image );\n\t * } );\n\t * ```\n\t */\n\tpublic cleanupImage( writer: ModelWriter, image: ModelElement ): void {\n\t\twriter.removeAttribute( 'srcset', image );\n\t\twriter.removeAttribute( 'sizes', image );\n\n\t\t/**\n\t\t * In case responsive images some attributes should be cleaned up.\n\t\t * Check: https://github.com/ckeditor/ckeditor5/issues/15093\n\t\t */\n\t\twriter.removeAttribute( 'sources', image );\n\t\twriter.removeAttribute( 'width', image );\n\t\twriter.removeAttribute( 'height', image );\n\t\twriter.removeAttribute( 'alt', image );\n\t}\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/**\n * @module image/image/imageediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageLoadObserver } from './imageloadobserver.js';\nimport { InsertImageCommand } from './insertimagecommand.js';\nimport { ReplaceImageSourceCommand } from './replaceimagesourcecommand.js';\nimport { ImageUtils } from '../imageutils.js';\n\n/**\n * The image engine plugin. This module loads common code shared between\n * {@link module:image/image/imageinlineediting~ImageInlineEditing} and\n * {@link module:image/image/imageblockediting~ImageBlockEditing} plugins.\n *\n * This plugin registers the {@link module:image/image/insertimagecommand~InsertImageCommand 'insertImage'} command.\n */\nexport class ImageEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\n\t\t// See https://github.com/ckeditor/ckeditor5-image/issues/142.\n\t\teditor.editing.view.addObserver( ImageLoadObserver );\n\n\t\tconversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'img',\n\t\t\t\t\tkey: 'alt'\n\t\t\t\t},\n\t\t\t\tmodel: 'alt'\n\t\t\t} )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'img',\n\t\t\t\t\tkey: 'srcset'\n\t\t\t\t},\n\t\t\t\tmodel: 'srcset'\n\t\t\t} );\n\n\t\tconst insertImageCommand = new InsertImageCommand( editor );\n\t\tconst replaceImageSourceCommand = new ReplaceImageSourceCommand( editor );\n\n\t\teditor.commands.add( 'insertImage', insertImageCommand );\n\t\teditor.commands.add( 'replaceImageSource', replaceImageSourceCommand );\n\n\t\t// `imageInsert` is an alias for backward compatibility.\n\t\teditor.commands.add( 'imageInsert', insertImageCommand );\n\t}\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/**\n * @module image/imagesizeattributes\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { DowncastDispatcher, DowncastAttributeEvent, ViewElement, ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { ImageUtils } from './imageutils.js';\nimport { widthAndHeightStylesAreBothSet, getSizeValueIfInPx } from './image/utils.js';\n\n/**\n * This plugin enables `width` and `height` attributes in inline and block image elements.\n */\nexport class ImageSizeAttributes extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageSizeAttributes' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tthis._registerSchema();\n\t\tthis._registerConverters( 'imageBlock' );\n\t\tthis._registerConverters( 'imageInline' );\n\t}\n\n\t/**\n\t * Registers the `width` and `height` attributes for inline and block images.\n\t */\n\tprivate _registerSchema(): void {\n\t\tconst schema = this.editor.model.schema;\n\n\t\tif ( this.editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\tschema.extend( 'imageBlock', { allowAttributes: [ 'width', 'height' ] } );\n\t\t}\n\n\t\tif ( this.editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\tschema.extend( 'imageInline', { allowAttributes: [ 'width', 'height' ] } );\n\t\t}\n\t}\n\n\t/**\n\t * Registers converters for `width` and `height` attributes.\n\t */\n\tprivate _registerConverters( imageType: 'imageBlock' | 'imageInline' ): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst viewElementName = imageType === 'imageBlock' ? 'figure' : 'img';\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: viewElementName,\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\twidth: /.+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'width',\n\t\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\t\tif ( widthAndHeightStylesAreBothSet( viewElement ) ) {\n\t\t\t\t\t\t\treturn getSizeValueIfInPx( viewElement.getStyle( 'width' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: viewElementName,\n\t\t\t\t\tkey: 'width'\n\t\t\t\t},\n\t\t\t\tmodel: 'width'\n\t\t\t} )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: viewElementName,\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\theight: /.+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'height',\n\t\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\t\tif ( widthAndHeightStylesAreBothSet( viewElement ) ) {\n\t\t\t\t\t\t\treturn getSizeValueIfInPx( viewElement.getStyle( 'height' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: viewElementName,\n\t\t\t\t\tkey: 'height'\n\t\t\t\t},\n\t\t\t\tmodel: 'height'\n\t\t\t} );\n\n\t\t// Dedicated converters to propagate attributes to the <img> element.\n\t\teditor.conversion.for( 'editingDowncast' ).add( dispatcher => {\n\t\t\tattachDowncastConverter( dispatcher, 'width', 'width', true, true );\n\t\t\tattachDowncastConverter( dispatcher, 'height', 'height', true, true );\n\t\t} );\n\n\t\teditor.conversion.for( 'dataDowncast' ).add( dispatcher => {\n\t\t\tattachDowncastConverter( dispatcher, 'width', 'width', false );\n\t\t\tattachDowncastConverter( dispatcher, 'height', 'height', false );\n\t\t} );\n\n\t\t// Consume `aspect-ratio` style if `width` and `height` attributes are set on the image.\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on( 'element:img', ( evt, data, conversionApi ) => {\n\t\t\t\tconst width = data.viewItem.getAttribute( 'width' );\n\t\t\t\tconst height = data.viewItem.getAttribute( 'height' );\n\n\t\t\t\tif ( width && height ) {\n\t\t\t\t\tconversionApi.consumable.consume( data.viewItem, { styles: [ 'aspect-ratio' ] } );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\tfunction attachDowncastConverter(\n\t\t\tdispatcher: DowncastDispatcher,\n\t\t\tmodelAttributeName: string,\n\t\t\tviewAttributeName: string,\n\t\t\tsetRatioForInlineImage: boolean,\n\t\t\tisEditingDowncast: boolean = false\n\t\t) {\n\t\t\tdispatcher.on<DowncastAttributeEvent>( `attribute:${ modelAttributeName }:${ imageType }`, ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item as ModelElement )!;\n\t\t\t\tconst img = imageUtils.findViewImgElement( viewElement )!;\n\n\t\t\t\tif ( data.attributeNewValue !== null ) {\n\t\t\t\t\tviewWriter.setAttribute( viewAttributeName, data.attributeNewValue, img );\n\t\t\t\t} else {\n\t\t\t\t\tviewWriter.removeAttribute( viewAttributeName, img );\n\t\t\t\t}\n\n\t\t\t\tconst width = data.item.getAttribute( 'width' );\n\t\t\t\tconst height = data.item.getAttribute( 'height' );\n\t\t\t\tconst hasSizes = width && height;\n\n\t\t\t\tif ( hasSizes && isEditingDowncast ) {\n\t\t\t\t\tviewWriter.setAttribute( 'loading', 'lazy', img );\n\t\t\t\t}\n\n\t\t\t\t// Do not set aspect-ratio for pictures. See https://github.com/ckeditor/ckeditor5/issues/14579.\n\t\t\t\tif ( data.item.hasAttribute( 'sources' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst isResized = data.item.hasAttribute( 'resizedWidth' );\n\n\t\t\t\t// Do not set aspect ratio for inline images which are not resized (data pipeline).\n\t\t\t\tif ( imageType === 'imageInline' && !isResized && !setRatioForInlineImage ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( hasSizes ) {\n\t\t\t\t\tviewWriter.setStyle( 'aspect-ratio', `${ width }/${ height }`, img );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module image/image/imagetypecommand\n */\n\nimport { type ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { type ImageUtils } from '../imageutils.js';\nimport { isImageTypePlaceable } from './utils.js';\n\n/**\n * The image type command. It changes the type of a selected image, depending on the configuration.\n */\nexport class ImageTypeCommand extends Command {\n\t/**\n\t * Model element name the command converts to.\n\t */\n\tprivate readonly _modelElementName: 'imageBlock' | 'imageInline';\n\n\t/**\n\t * @inheritDoc\n\t *\n\t * @param modelElementName Model element name the command converts to.\n\t */\n\tconstructor( editor: Editor, modelElementName: 'imageBlock' | 'imageInline' ) {\n\t\tsuper( editor );\n\n\t\tthis._modelElementName = modelElementName;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst element = imageUtils.getClosestSelectedImageElement( model.document.selection );\n\n\t\t// The command converts the opposite image type into `_modelElementName`, so a matching source image\n\t\t// must be selected.\n\t\tconst hasSourceImage = this._modelElementName === 'imageBlock' ?\n\t\t\timageUtils.isInlineImage( element ) :\n\t\t\timageUtils.isBlockImage( element );\n\n\t\tif ( !hasSourceImage ) {\n\t\t\tthis.isEnabled = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// The target type must also be placeable at the image's position. Otherwise the conversion would call\n\t\t// `model.insertContent` with no valid landing spot (e.g. switching to `imageBlock` inside an `$inlineRoot`,\n\t\t// or to `imageInline` inside a container that only accepts block images).\n\t\tconst position = model.createPositionBefore( element! );\n\n\t\tthis.isEnabled = isImageTypePlaceable( schema, position, this._modelElementName );\n\t}\n\n\t/**\n\t * Executes the command and changes the type of a selected image.\n\t *\n\t * @fires execute\n\t * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t * The default is `true`.\n\t * @returns An object containing references to old and new model image elements\n\t * (for before and after the change) so external integrations can hook into the decorated\n\t * `execute` event and handle this change. `null` if the type change failed.\n\t */\n\tpublic override execute( options: { setImageSizes?: boolean } = {} ): { oldElement: ModelElement; newElement: ModelElement } | null {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst oldElement = imageUtils.getClosestSelectedImageElement( model.document.selection )!;\n\t\tconst attributes = Object.fromEntries( oldElement.getAttributes() );\n\n\t\t// Don't change image type if \"src\" is missing (a broken image), unless there's \"uploadId\" set.\n\t\t// This state may happen during image upload (before it finishes) and it should be possible to change type\n\t\t// of the image in the meantime.\n\t\tif ( !attributes.src && !attributes.uploadId ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn model.change( writer => {\n\t\t\tconst { setImageSizes = true } = options;\n\n\t\t\t// Get all markers that contain the old image element.\n\t\t\tconst markers = Array.from( model.markers )\n\t\t\t\t.filter( marker => marker.getRange().containsItem( oldElement ) );\n\n\t\t\tconst newElement = imageUtils.insertImage(\n\t\t\t\tattributes,\n\t\t\t\tmodel.createSelection( oldElement, 'on' ),\n\t\t\t\tthis._modelElementName,\n\t\t\t\t{ setImageSizes }\n\t\t\t);\n\n\t\t\tif ( !newElement ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst newElementRange = writer.createRangeOn( newElement );\n\n\t\t\t// Expand the previously intersecting markers' ranges to include the new image element.\n\t\t\tfor ( const marker of markers ) {\n\t\t\t\tconst markerRange = marker.getRange();\n\n\t\t\t\t// Join the survived part of the old marker range with the new element range\n\t\t\t\t// (loosely because there could be some new paragraph or the existing one might got split).\n\t\t\t\tconst range = markerRange.root.rootName != '$graveyard' ?\n\t\t\t\t\tmarkerRange.getJoined( newElementRange, true )! : newElementRange;\n\n\t\t\t\twriter.updateMarker( marker, { range } );\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\toldElement,\n\t\t\t\tnewElement\n\t\t\t};\n\t\t} );\n\t}\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/**\n * @module image/image/imageplaceholder\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type {\n\tDowncastAttributeEvent,\n\tModelElement,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport { ImageUtils } from '../imageutils.js';\nimport { ImageLoadObserver, type ImageLoadedEvent } from './imageloadobserver.js';\n\n/**\n * Adds support for image placeholder that is automatically removed when the image is loaded.\n */\nexport class ImagePlaceholder extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImagePlaceholder' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tthis._setupSchema();\n\t\tthis._setupConversion();\n\t\tthis._setupLoadListener();\n\t}\n\n\t/**\n\t * Extends model schema.\n\t */\n\tprivate _setupSchema(): void {\n\t\tconst schema = this.editor.model.schema;\n\n\t\t// Wait for ImageBlockEditing or ImageInlineEditing to register their elements first,\n\t\t// that's why doing this in afterInit() instead of init().\n\t\tif ( schema.isRegistered( 'imageBlock' ) ) {\n\t\t\tschema.extend( 'imageBlock', {\n\t\t\t\tallowAttributes: [ 'placeholder' ]\n\t\t\t} );\n\t\t}\n\n\t\tif ( schema.isRegistered( 'imageInline' ) ) {\n\t\t\tschema.extend( 'imageInline', {\n\t\t\t\tallowAttributes: [ 'placeholder' ]\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Registers converters.\n\t */\n\tprivate _setupConversion(): void {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\tconversion.for( 'editingDowncast' ).add( dispatcher => {\n\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute:placeholder', ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( !data.item.is( 'element', 'imageBlock' ) && !data.item.is( 'element', 'imageInline' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconversionApi.consumable.consume( data.item, evt.name );\n\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst element = conversionApi.mapper.toViewElement( data.item )!;\n\t\t\t\tconst img = imageUtils.findViewImgElement( element )!;\n\n\t\t\t\tif ( data.attributeNewValue ) {\n\t\t\t\t\tviewWriter.addClass( 'image_placeholder', img );\n\t\t\t\t\tviewWriter.setStyle( 'background-image', `url(${ data.attributeNewValue })`, img );\n\t\t\t\t\tviewWriter.setCustomProperty( 'editingPipeline:doNotReuseOnce', true, img );\n\t\t\t\t} else {\n\t\t\t\t\tviewWriter.removeClass( 'image_placeholder', img );\n\t\t\t\t\tviewWriter.removeStyle( 'background-image', img );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Prepares listener for image load.\n\t */\n\tprivate _setupLoadListener(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editing = editor.editing;\n\t\tconst editingView = editing.view;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\teditingView.addObserver( ImageLoadObserver );\n\n\t\tthis.listenTo<ImageLoadedEvent>( editingView.document, 'imageLoaded', ( evt, domEvent ) => {\n\t\t\tconst imgViewElement = editingView.domConverter.mapDomToView( domEvent.target as HTMLElement );\n\n\t\t\tif ( !imgViewElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewElement = imageUtils.getImageWidgetFromImageView( imgViewElement as ViewElement );\n\n\t\t\tif ( !viewElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst modelElement = editing.mapper.toModelElement( viewElement );\n\n\t\t\tif ( !modelElement || !modelElement.hasAttribute( 'placeholder' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmodel.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\twriter.removeAttribute( 'placeholder', modelElement );\n\t\t\t} );\n\t\t} );\n\t}\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/**\n * @module image/image/imageblockediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tClipboardPipeline,\n\ttype ClipboardInputTransformationEvent,\n\ttype ClipboardContentInsertionEvent\n} from '@ckeditor/ckeditor5-clipboard';\nimport {\n\tViewUpcastWriter,\n\ttype ViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tdowncastImageAttribute,\n\tdowncastSrcsetAttribute,\n\tupcastImg,\n\tupcastImageFigure\n} from './converters.js';\n\nimport { ImageEditing } from './imageediting.js';\nimport { ImageSizeAttributes } from '../imagesizeattributes.js';\nimport { ImageTypeCommand } from './imagetypecommand.js';\nimport { ImageUtils } from '../imageutils.js';\nimport {\n\tcreateBlockImageViewElement,\n\tdetermineImageTypeForInsertionAtSelection,\n\tisImageTypePlaceable\n} from './utils.js';\nimport { ImagePlaceholder } from './imageplaceholder.js';\n\n/**\n * The image block plugin.\n *\n * It registers:\n *\n * * `<imageBlock>` as a block element in the document schema, and allows `alt`, `src` and `srcset` attributes.\n * * converters for editing and data pipelines.,\n * * {@link module:image/image/imagetypecommand~ImageTypeCommand `'imageTypeBlock'`} command that converts inline images into\n * block images.\n */\nexport class ImageBlockEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[\n\t\tImageEditing,\n\t\tImageSizeAttributes,\n\t\tImageUtils,\n\t\tImagePlaceholder,\n\t\tClipboardPipeline\n\t]> {\n\t\treturn [\n\t\t\tImageEditing,\n\t\t\tImageSizeAttributes,\n\t\t\tImageUtils,\n\t\t\tImagePlaceholder,\n\t\t\tClipboardPipeline\n\t\t];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageBlockEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\t// Converters 'alt' and 'srcset' are added in 'ImageEditing' plugin.\n\t\tschema.register( 'imageBlock', {\n\t\t\tinheritAllFrom: '$blockObject',\n\t\t\tallowAttributes: [ 'alt', 'src', 'srcset' ]\n\t\t} );\n\n\t\tthis._setupConversion();\n\n\t\tif ( editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\teditor.commands.add( 'imageTypeBlock', new ImageTypeCommand( this.editor, 'imageBlock' ) );\n\n\t\t\tthis._setupClipboardIntegration();\n\t\t}\n\t}\n\n\t/**\n\t * Configures conversion pipelines to support upcasting and downcasting\n\t * block images (block image widgets) and their attributes.\n\t */\n\tprivate _setupConversion(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\tconversion.for( 'dataDowncast' )\n\t\t\t.elementToStructure( {\n\t\t\t\tmodel: 'imageBlock',\n\t\t\t\tview: ( modelElement, { writer } ) => createBlockImageViewElement( writer )\n\t\t\t} );\n\n\t\tconversion.for( 'editingDowncast' )\n\t\t\t.elementToStructure( {\n\t\t\t\tmodel: 'imageBlock',\n\t\t\t\tview: ( modelElement, { writer } ) => imageUtils.toImageWidget(\n\t\t\t\t\tcreateBlockImageViewElement( writer ), writer, t( 'image widget' )\n\t\t\t\t)\n\t\t\t} );\n\n\t\tconversion.for( 'downcast' )\n\t\t\t.add( downcastImageAttribute( imageUtils, 'imageBlock', 'src' ) )\n\t\t\t.add( downcastImageAttribute( imageUtils, 'imageBlock', 'alt' ) )\n\t\t\t.add( downcastSrcsetAttribute( imageUtils, 'imageBlock' ) );\n\n\t\t// More image related upcasts are in 'ImageEditing' plugin.\n\t\tconversion.for( 'upcast' )\n\t\t\t.add( upcastImg( 'imageBlock', imageUtils ) )\n\t\t\t.add( upcastImageFigure( imageUtils ) );\n\t}\n\n\t/**\n\t * Integrates the plugin with the clipboard pipeline.\n\t *\n\t * Idea is that the feature should recognize the user's intent when an **inline** image is\n\t * pasted or dropped. If such an image is pasted/dropped:\n\t *\n\t * * into an empty block (e.g. an empty paragraph),\n\t * * on another object (e.g. some block widget).\n\t *\n\t * it gets converted into a block image on the fly. We assume this is the user's intent\n\t * if they decided to put their image there.\n\t *\n\t * See the `ImageInlineEditing` for the similar integration that works in the opposite direction.\n\t *\n\t * The feature also sets image `width` and `height` attributes on paste.\n\t */\n\tprivate _setupClipboardIntegration(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\n\t\tthis.listenTo<ClipboardInputTransformationEvent>(\n\t\t\tclipboardPipeline,\n\t\t\t'inputTransformation',\n\t\t\t( evt, data ) => {\n\t\t\t\tconst docFragmentChildren = Array.from( data.content.getChildren() as IterableIterator<ViewElement> );\n\t\t\t\tlet modelRange;\n\n\t\t\t\t// Make sure only <img> elements are dropped or pasted. Otherwise, if there some other HTML\n\t\t\t\t// mixed up, this should be handled as a regular paste.\n\t\t\t\tif ( !docFragmentChildren.every( imageUtils.isInlineImageView ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// When drag and dropping, data.targetRanges specifies where to drop because\n\t\t\t\t// this is usually a different place than the current model selection (the user\n\t\t\t\t// uses a drop marker to specify the drop location).\n\t\t\t\tif ( data.targetRanges ) {\n\t\t\t\t\tmodelRange = editor.editing.mapper.toModelRange( data.targetRanges[ 0 ] );\n\t\t\t\t}\n\t\t\t\t// Pasting, however, always occurs at the current model selection.\n\t\t\t\telse {\n\t\t\t\t\tmodelRange = model.document.selection.getFirstRange();\n\t\t\t\t}\n\n\t\t\t\tconst selection = model.createSelection( modelRange );\n\n\t\t\t\t// Convert inline images into block images only when the currently selected block is empty\n\t\t\t\t// (e.g. an empty paragraph) or some object is selected (to replace it). Additionally verify\n\t\t\t\t// that `imageBlock` can actually land somewhere reachable from the drop target - inside\n\t\t\t\t// `$inlineRoot` or another limit container that disallows block content the heuristic\n\t\t\t\t// returns `'imageBlock'` for a blockless selection, but wrapping the pasted `<img>` would\n\t\t\t\t// just be upcast-stripped.\n\t\t\t\tconst selectionPosition = selection.getFirstPosition();\n\t\t\t\tconst canPlaceBlock = !!selectionPosition && isImageTypePlaceable( model.schema, selectionPosition, 'imageBlock' );\n\n\t\t\t\tif (\n\t\t\t\t\tcanPlaceBlock &&\n\t\t\t\t\tdetermineImageTypeForInsertionAtSelection( model.schema, selection ) === 'imageBlock'\n\t\t\t\t) {\n\t\t\t\t\tconst writer = new ViewUpcastWriter( editingView.document );\n\n\t\t\t\t\t// Wrap <img ... /> -> <figure class=\"image\"><img .../></figure>\n\t\t\t\t\tconst blockViewImages = docFragmentChildren.map(\n\t\t\t\t\t\tinlineViewImage => writer.createElement( 'figure', { class: 'image' }, inlineViewImage )\n\t\t\t\t\t);\n\n\t\t\t\t\tdata.content = writer.createDocumentFragment( blockViewImages );\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.listenTo<ClipboardContentInsertionEvent>(\n\t\t\tclipboardPipeline,\n\t\t\t'contentInsertion',\n\t\t\t( evt, data ) => {\n\t\t\t\tif ( data.method !== 'paste' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\tconst range = writer.createRangeIn( data.content );\n\n\t\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\t\tif ( item.is( 'element', 'imageBlock' ) ) {\n\t\t\t\t\t\t\timageUtils.setImageNaturalSizeAttributes( item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t}\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/**\n * @module image/imageinsert/ui/imageinsertformview\n */\n\nimport {\n\tView,\n\tViewCollection,\n\tsubmitHandler,\n\tFocusCycler,\n\tCollapsibleView,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The view displayed in the insert image dropdown.\n *\n * See {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n *\n * @internal\n */\nexport class ImageInsertFormView extends View {\n\t/**\n\t * Tracks information about DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprotected readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprotected readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * A collection of the defined integrations for inserting the images.\n\t */\n\tprivate readonly children: ViewCollection<FocusableView>;\n\n\t/**\n\t * Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param integrations An integrations object that contains components (or tokens for components) to be shown in the panel view.\n\t */\n\tconstructor( locale: Locale, integrations: Array<FocusableView> = [] ) {\n\t\tsuper( locale );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.children = this.createCollection();\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tfor ( const view of integrations ) {\n\t\t\tthis.children.add( view );\n\t\t\tthis._focusables.add( view );\n\n\t\t\tif ( view instanceof CollapsibleView ) {\n\t\t\t\tthis._focusables.addMany( view.children );\n\t\t\t}\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-image-insert-form'\n\t\t\t\t],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tfor ( const view of this._focusables ) {\n\t\t\tthis.focusTracker.add( view.element! );\n\t\t}\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tconst stopPropagation = ( data: KeyboardEvent ) => data.stopPropagation();\n\n\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t// keystroke handler would take over the key management in the URL input. We need to prevent\n\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the first {@link #_focusables focusable} in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\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/**\n * @module image/imageinsert/imageinsertui\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tlogWarning,\n\ttype Locale,\n\ttype Observable\n} from '@ckeditor/ckeditor5-utils';\nimport {\n\tcreateDropdown,\n\ttype ButtonView,\n\ttype DropdownButtonView,\n\ttype DropdownView,\n\ttype FocusableView,\n\ttype MenuBarMenuListItemButtonView,\n\tMenuBarMenuListItemView,\n\tMenuBarMenuListView,\n\tMenuBarMenuView,\n\tSplitButtonView,\n\ttype View\n} from '@ckeditor/ckeditor5-ui';\nimport { IconImage } from '@ckeditor/ckeditor5-icons';\n\nimport { ImageInsertFormView } from './ui/imageinsertformview.js';\nimport { ImageUtils } from '../imageutils.js';\n\n/**\n * The image insert dropdown plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}\n * and {@glink features/images/images-inserting Insert images via source URL} documentation.\n *\n * Adds the `'insertImage'` dropdown to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n * and also the `imageInsert` dropdown as an alias for backward compatibility.\n *\n * Adds the `'menuBar:insertImage'` sub-menu to the {@link module:ui/componentfactory~ComponentFactory UI component factory}, which is\n * by default added to the `'Insert'` menu.\n */\nexport class ImageInsertUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageInsertUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * The dropdown view responsible for displaying the image insert UI.\n\t */\n\tpublic dropdownView?: DropdownView;\n\n\t/**\n\t * Observable property used to alter labels while some image is selected and when it is not.\n\t *\n\t * @observable\n\t */\n\tdeclare public isImageSelected: boolean;\n\n\t/**\n\t * Registered integrations map.\n\t */\n\tprivate _integrations = new Map<string, IntegrationData>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'image.insert.integrations', [\n\t\t\t'upload',\n\t\t\t'assetManager',\n\t\t\t'url'\n\t\t] );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\tthis.set( 'isImageSelected', false );\n\n\t\tthis.listenTo( editor.model.document, 'change', () => {\n\t\t\tthis.isImageSelected = imageUtils.isImage( selection.getSelectedElement() );\n\t\t} );\n\n\t\tconst componentCreator = ( locale: Locale ) => this._createToolbarComponent( locale );\n\t\tconst menuBarComponentCreator = ( locale: Locale ) => this._createMenuBarComponent( locale );\n\n\t\t// Register `insertImage` dropdown and add `imageInsert` dropdown as an alias for backward compatibility.\n\t\teditor.ui.componentFactory.add( 'insertImage', componentCreator );\n\t\teditor.ui.componentFactory.add( 'imageInsert', componentCreator );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:insertImage', menuBarComponentCreator );\n\t}\n\n\t/**\n\t * Registers the insert image dropdown integration.\n\t */\n\tpublic registerIntegration( {\n\t\tname,\n\t\tobservable,\n\t\tbuttonViewCreator,\n\t\tformViewCreator,\n\t\tmenuBarButtonViewCreator,\n\t\trequiresForm = false,\n\t\toverride = false\n\t}: {\n\t\tname: string;\n\t\tobservable: Observable & { isEnabled: boolean } | ( () => Observable & { isEnabled: boolean } );\n\t\tbuttonViewCreator: ( isOnlyOne: boolean ) => ButtonView;\n\t\tformViewCreator: ( isOnlyOne: boolean ) => FocusableView | Array<FocusableView>;\n\t\tmenuBarButtonViewCreator: ( isOnlyOne: boolean ) => MenuBarMenuListItemButtonView | Array<MenuBarMenuListItemButtonView>;\n\t\trequiresForm?: boolean;\n\t\toverride?: boolean;\n\t} ): void {\n\t\tif ( this._integrations.has( name ) && !override ) {\n\t\t\t/**\n\t\t\t * There are two insert-image integrations registered with the same name.\n\t\t\t *\n\t\t\t * Make sure that you do not load multiple asset manager plugins.\n\t\t\t *\n\t\t\t * @error image-insert-integration-exists\n\t\t\t */\n\t\t\tlogWarning( 'image-insert-integration-exists', { name } );\n\t\t}\n\n\t\tthis._integrations.set( name, {\n\t\t\tobservable,\n\t\t\tbuttonViewCreator,\n\t\t\tmenuBarButtonViewCreator,\n\t\t\tformViewCreator,\n\t\t\trequiresForm\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the toolbar component.\n\t */\n\tprivate _createToolbarComponent( locale: Locale ): DropdownView | FocusableView {\n\t\tconst editor = this.editor;\n\t\tconst t = locale.t;\n\n\t\tconst integrations = this._prepareIntegrations();\n\n\t\tif ( !integrations.length ) {\n\t\t\treturn null as any;\n\t\t}\n\n\t\tlet dropdownButton: SplitButtonView | DropdownButtonView | undefined;\n\t\tconst firstIntegration = integrations[ 0 ];\n\n\t\tif ( integrations.length == 1 ) {\n\t\t\t// Do not use dropdown for a single integration button (integration that does not require form view).\n\t\t\tif ( !firstIntegration.requiresForm ) {\n\t\t\t\treturn firstIntegration.buttonViewCreator( true );\n\t\t\t}\n\n\t\t\tdropdownButton = firstIntegration.buttonViewCreator( true ) as DropdownButtonView;\n\t\t} else {\n\t\t\tconst actionButton = firstIntegration.buttonViewCreator( false ) as ButtonView & FocusableView;\n\n\t\t\tdropdownButton = new SplitButtonView( locale, actionButton );\n\t\t\tdropdownButton.tooltip = true;\n\n\t\t\tdropdownButton.bind( 'label' ).to( this, 'isImageSelected', isImageSelected => isImageSelected ?\n\t\t\t\tt( 'Replace image' ) :\n\t\t\t\tt( 'Insert image' )\n\t\t\t);\n\t\t}\n\n\t\tconst dropdownView = this.dropdownView = createDropdown( locale, dropdownButton );\n\t\tconst observables = integrations.map( ( { observable } ) => typeof observable == 'function' ? observable() : observable );\n\n\t\tdropdownView.bind( 'isEnabled' ).toMany( observables, 'isEnabled', ( ...isEnabled ) => (\n\t\t\tisEnabled.some( isEnabled => isEnabled )\n\t\t) );\n\n\t\tdropdownView.once( 'change:isOpen', () => {\n\t\t\tconst integrationViews = integrations.flatMap( ( { formViewCreator } ) => formViewCreator( integrations.length == 1 ) );\n\t\t\tconst imageInsertFormView = new ImageInsertFormView( editor.locale, integrationViews );\n\n\t\t\tdropdownView.panelView.children.add( imageInsertFormView );\n\t\t} );\n\n\t\treturn dropdownView;\n\t}\n\n\t/**\n\t * Creates the menu bar component.\n\t */\n\tprivate _createMenuBarComponent( locale: Locale ): View {\n\t\tconst t = locale.t;\n\n\t\tconst integrations = this._prepareIntegrations();\n\n\t\tif ( !integrations.length ) {\n\t\t\treturn null as any;\n\t\t}\n\n\t\tconst integrationViews = integrations.flatMap( ( {\n\t\t\tmenuBarButtonViewCreator\n\t\t} ) => menuBarButtonViewCreator( integrations.length == 1 ) );\n\n\t\tconst resultView = new MenuBarMenuView( locale );\n\t\tconst listView = new MenuBarMenuListView( locale );\n\t\tresultView.panelView.children.add( listView );\n\n\t\tresultView.buttonView.set( {\n\t\t\ticon: IconImage,\n\t\t\tlabel: t( 'Image' )\n\t\t} );\n\n\t\tfor ( const integrationView of integrationViews ) {\n\t\t\tconst listItemView = new MenuBarMenuListItemView( locale, resultView );\n\n\t\t\tlistItemView.children.add( integrationView );\n\t\t\tlistView.items.add( listItemView );\n\n\t\t\tintegrationView.delegate( 'execute' ).to( resultView );\n\t\t}\n\n\t\treturn resultView;\n\t}\n\n\t/**\n\t * Validates the integrations list.\n\t */\n\tprivate _prepareIntegrations(): Array<IntegrationData> {\n\t\tconst editor = this.editor;\n\t\tconst items = editor.config.get( 'image.insert.integrations' )!;\n\t\tconst result: Array<IntegrationData> = [];\n\n\t\tif ( !items.length ) {\n\t\t\t/**\n\t\t\t * The insert image feature requires a list of integrations to be provided in the editor configuration.\n\t\t\t *\n\t\t\t * The default list of integrations is `upload`, `assetManager`, `url`. Those integrations are included\n\t\t\t * in the insert image dropdown if the given feature plugin is loaded. You should omit the `integrations`\n\t\t\t * configuration key to use the default set or provide a selected list of integrations that should be used.\n\t\t\t *\n\t\t\t * @error image-insert-integrations-not-specified\n\t\t\t */\n\t\t\tlogWarning( 'image-insert-integrations-not-specified' );\n\n\t\t\treturn result;\n\t\t}\n\n\t\tfor ( const item of items ) {\n\t\t\tif ( !this._integrations.has( item ) ) {\n\t\t\t\tif ( ![ 'upload', 'assetManager', 'url' ].includes( item ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * The specified insert image integration name is unknown or the providing plugin is not loaded in the editor.\n\t\t\t\t\t *\n\t\t\t\t\t * @error image-insert-unknown-integration\n\t\t\t\t\t */\n\t\t\t\t\tlogWarning( 'image-insert-unknown-integration', { item } );\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tresult.push( this._integrations.get( item )! );\n\t\t}\n\n\t\tif ( !result.length ) {\n\t\t\t/**\n\t\t\t * The image insert feature requires integrations to be registered by separate features.\n\t\t\t *\n\t\t\t * The `insertImage` toolbar button requires integrations to be registered by other features.\n\t\t\t * For example {@link module:image/imageupload~ImageUpload ImageUpload},\n\t\t\t * {@link module:image/imageinsert~ImageInsert ImageInsert},\n\t\t\t * {@link module:image/imageinsertviaurl~ImageInsertViaUrl ImageInsertViaUrl},\n\t\t\t * {@link module:ckbox/ckbox~CKBox CKBox}\n\t\t\t *\n\t\t\t * @error image-insert-integrations-not-registered\n\t\t\t */\n\t\t\tlogWarning( 'image-insert-integrations-not-registered' );\n\t\t}\n\n\t\treturn result;\n\t}\n}\n\ntype IntegrationData = {\n\tobservable: Observable & { isEnabled: boolean } | ( () => Observable & { isEnabled: boolean } );\n\tbuttonViewCreator: ( isOnlyOne: boolean ) => ButtonView;\n\tmenuBarButtonViewCreator: ( isOnlyOne: boolean ) => MenuBarMenuListItemButtonView | Array<MenuBarMenuListItemButtonView>;\n\tformViewCreator: ( isOnlyOne: boolean ) => FocusableView | Array<FocusableView>;\n\trequiresForm: boolean;\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/**\n * @module image/imageblock\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { Widget } from '@ckeditor/ckeditor5-widget';\n\nimport { ImageTextAlternative } from './imagetextalternative.js';\nimport { ImageBlockEditing } from './image/imageblockediting.js';\nimport { ImageInsertUI } from './imageinsert/imageinsertui.js';\n\n/**\n * The image block plugin.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * {@link module:image/image/imageblockediting~ImageBlockEditing},\n * * {@link module:image/imagetextalternative~ImageTextAlternative}.\n *\n * Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n * for more information.\n */\nexport class ImageBlock extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageBlockEditing, Widget, ImageTextAlternative, ImageInsertUI ]> {\n\t\treturn [ ImageBlockEditing, Widget, ImageTextAlternative, ImageInsertUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageBlock' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module image/image/imageinlineediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tClipboardPipeline,\n\ttype ClipboardInputTransformationEvent,\n\ttype ClipboardContentInsertionEvent\n} from '@ckeditor/ckeditor5-clipboard';\nimport { ViewUpcastWriter, type ViewElement } from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tdowncastImageAttribute,\n\tdowncastSrcsetAttribute,\n\tupcastImg\n} from './converters.js';\n\nimport { ImageEditing } from './imageediting.js';\nimport { ImageSizeAttributes } from '../imagesizeattributes.js';\nimport { ImageTypeCommand } from './imagetypecommand.js';\nimport { ImageUtils } from '../imageutils.js';\nimport {\n\tcreateInlineImageViewElement,\n\tdetermineImageTypeForInsertionAtSelection,\n\tisImageTypePlaceable\n} from './utils.js';\nimport { ImagePlaceholder } from './imageplaceholder.js';\n\n/**\n * The image inline plugin.\n *\n * It registers:\n *\n * * `<imageInline>` as an inline element in the document schema, and allows `alt`, `src` and `srcset` attributes.\n * * converters for editing and data pipelines.\n * * {@link module:image/image/imagetypecommand~ImageTypeCommand `'imageTypeInline'`} command that converts block images into\n * inline images.\n */\nexport class ImageInlineEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[\n\t\tImageEditing,\n\t\tImageSizeAttributes,\n\t\tImageUtils,\n\t\tImagePlaceholder,\n\t\tClipboardPipeline\n\t]> {\n\t\treturn [\n\t\t\tImageEditing,\n\t\t\tImageSizeAttributes,\n\t\t\tImageUtils,\n\t\t\tImagePlaceholder,\n\t\t\tClipboardPipeline\n\t\t];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageInlineEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\t// Converters 'alt' and 'srcset' are added in 'ImageEditing' plugin.\n\t\tschema.register( 'imageInline', {\n\t\t\tinheritAllFrom: '$inlineObject',\n\t\t\tallowAttributes: [ 'alt', 'src', 'srcset' ],\n\t\t\t// Disallow inline images in captions (at least for now).\n\t\t\t// This is the best spot to do that because independent packages can introduce captions (ImageCaption, TableCaption, etc.).\n\t\t\tdisallowIn: [ 'caption' ]\n\t\t} );\n\n\t\tthis._setupConversion();\n\n\t\tif ( editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\teditor.commands.add( 'imageTypeInline', new ImageTypeCommand( this.editor, 'imageInline' ) );\n\n\t\t\tthis._setupClipboardIntegration();\n\t\t}\n\t}\n\n\t/**\n\t * Configures conversion pipelines to support upcasting and downcasting\n\t * inline images (inline image widgets) and their attributes.\n\t */\n\tprivate _setupConversion(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\tconversion.for( 'dataDowncast' )\n\t\t\t.elementToElement( {\n\t\t\t\tmodel: 'imageInline',\n\t\t\t\tview: ( modelElement, { writer } ) => writer.createEmptyElement( 'img' )\n\t\t\t} );\n\n\t\tconversion.for( 'editingDowncast' )\n\t\t\t.elementToStructure( {\n\t\t\t\tmodel: 'imageInline',\n\t\t\t\tview: ( modelElement, { writer } ) => imageUtils.toImageWidget(\n\t\t\t\t\tcreateInlineImageViewElement( writer ), writer, t( 'image widget' )\n\t\t\t\t)\n\t\t\t} );\n\n\t\tconversion.for( 'downcast' )\n\t\t\t.add( downcastImageAttribute( imageUtils, 'imageInline', 'src' ) )\n\t\t\t.add( downcastImageAttribute( imageUtils, 'imageInline', 'alt' ) )\n\t\t\t.add( downcastSrcsetAttribute( imageUtils, 'imageInline' ) );\n\n\t\t// More image related upcasts are in 'ImageEditing' plugin.\n\t\tconversion.for( 'upcast' )\n\t\t\t.add( upcastImg( 'imageInline', imageUtils ) );\n\t}\n\n\t/**\n\t * Integrates the plugin with the clipboard pipeline.\n\t *\n\t * Idea is that the feature should recognize the user's intent when an **block** image is\n\t * pasted or dropped. If such an image is pasted/dropped into a non-empty block\n\t * (e.g. a paragraph with some text) it gets converted into an inline image on the fly.\n\t *\n\t * We assume this is the user's intent if they decided to put their image there.\n\t *\n\t * **Note**: If a block image has a caption, it will not be converted to an inline image\n\t * to avoid the confusion. Captions are added on purpose and they should never be lost\n\t * in the clipboard pipeline.\n\t *\n\t * See the `ImageBlockEditing` for the similar integration that works in the opposite direction.\n\t *\n\t * The feature also sets image `width` and `height` attributes when pasting.\n\t */\n\tprivate _setupClipboardIntegration(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\n\t\tthis.listenTo<ClipboardInputTransformationEvent>(\n\t\t\tclipboardPipeline,\n\t\t\t'inputTransformation',\n\t\t\t( evt, data ) => {\n\t\t\t\tconst docFragmentChildren = Array.from( data.content.getChildren() as IterableIterator<ViewElement> );\n\t\t\t\tlet modelRange;\n\n\t\t\t\t// Make sure only <figure class=\"image\"></figure> elements are dropped or pasted. Otherwise, if there some other HTML\n\t\t\t\t// mixed up, this should be handled as a regular paste.\n\t\t\t\tif ( !docFragmentChildren.every( imageUtils.isBlockImageView ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// When drag and dropping, data.targetRanges specifies where to drop because\n\t\t\t\t// this is usually a different place than the current model selection (the user\n\t\t\t\t// uses a drop marker to specify the drop location).\n\t\t\t\tif ( data.targetRanges ) {\n\t\t\t\t\tmodelRange = editor.editing.mapper.toModelRange( data.targetRanges[ 0 ] );\n\t\t\t\t}\n\t\t\t\t// Pasting, however, always occurs at the current model selection.\n\t\t\t\telse {\n\t\t\t\t\tmodelRange = model.document.selection.getFirstRange();\n\t\t\t\t}\n\n\t\t\t\tconst selection = model.createSelection( modelRange );\n\n\t\t\t\t// Convert block images into inline images only when pasting or dropping into non-empty blocks\n\t\t\t\t// and when the block is not an object (e.g. pasting to replace another widget). Also force\n\t\t\t\t// the unwrap when `imageBlock` cannot land at the target (e.g. inside `$inlineRoot`) - in\n\t\t\t\t// that case the heuristic still returns `'imageBlock'` for a blockless selection, but the\n\t\t\t\t// resulting `<figure>` would be upcast-stripped.\n\t\t\t\tconst selectionPosition = selection.getFirstPosition();\n\t\t\t\tconst canPlaceBlock = !!selectionPosition && isImageTypePlaceable( model.schema, selectionPosition, 'imageBlock' );\n\n\t\t\t\tif (\n\t\t\t\t\t!canPlaceBlock ||\n\t\t\t\t\tdetermineImageTypeForInsertionAtSelection( model.schema, selection ) === 'imageInline'\n\t\t\t\t) {\n\t\t\t\t\tconst writer = new ViewUpcastWriter( editingView.document );\n\n\t\t\t\t\t// Unwrap <figure class=\"image\"><img .../></figure> -> <img ... />\n\t\t\t\t\t// but <figure class=\"image\"><img .../><figcaption>...</figcaption></figure> -> stays the same\n\t\t\t\t\tconst inlineViewImages = docFragmentChildren.map( blockViewImage => {\n\t\t\t\t\t// If there's just one child, it can be either <img /> or <a><img></a>.\n\t\t\t\t\t// If there are other children than <img>, this means that the block image\n\t\t\t\t\t// has a caption or some other features and this kind of image should be\n\t\t\t\t\t// pasted/dropped without modifications.\n\t\t\t\t\t\tif ( blockViewImage.childCount === 1 ) {\n\t\t\t\t\t\t// Pass the attributes which are present only in the <figure> to the <img>\n\t\t\t\t\t\t// (e.g. the style=\"width:10%\" attribute applied by the ImageResize plugin).\n\t\t\t\t\t\t\tArray.from( blockViewImage.getAttributes() )\n\t\t\t\t\t\t\t\t.forEach( attribute => writer.setAttribute(\n\t\t\t\t\t\t\t\t\t...attribute,\n\t\t\t\t\t\t\t\t\timageUtils.findViewImgElement( blockViewImage )!\n\t\t\t\t\t\t\t\t) );\n\n\t\t\t\t\t\t\treturn blockViewImage.getChild( 0 )!;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn blockViewImage;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\tdata.content = writer.createDocumentFragment( inlineViewImages );\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.listenTo<ClipboardContentInsertionEvent>(\n\t\t\tclipboardPipeline,\n\t\t\t'contentInsertion',\n\t\t\t( evt, data ) => {\n\t\t\t\tif ( data.method !== 'paste' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\tconst range = writer.createRangeIn( data.content );\n\n\t\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\t\tif ( item.is( 'element', 'imageInline' ) ) {\n\t\t\t\t\t\t\timageUtils.setImageNaturalSizeAttributes( item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t}\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/**\n * @module image/imageinline\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { Widget } from '@ckeditor/ckeditor5-widget';\n\nimport { ImageTextAlternative } from './imagetextalternative.js';\nimport { ImageInlineEditing } from './image/imageinlineediting.js';\nimport { ImageInsertUI } from './imageinsert/imageinsertui.js';\n\n/**\n * The image inline plugin.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * {@link module:image/image/imageinlineediting~ImageInlineEditing},\n * * {@link module:image/imagetextalternative~ImageTextAlternative}.\n *\n * Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n * for more information.\n */\nexport class ImageInline extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageInlineEditing, Widget, ImageTextAlternative, ImageInsertUI ]> {\n\t\treturn [ ImageInlineEditing, Widget, ImageTextAlternative, ImageInsertUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageInline' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module image/image\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageBlock } from './imageblock.js';\nimport { ImageInline } from './imageinline.js';\n\n/**\n * The image plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-overview image feature} documentation.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * {@link module:image/imageblock~ImageBlock},\n * * {@link module:image/imageinline~ImageInline},\n *\n * Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n * for more information.\n */\nexport class Image extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageBlock, ImageInline ]> {\n\t\treturn [ ImageBlock, ImageInline ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Image' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module image/imagecaption/imagecaptionutils\n */\n\nimport type { ModelDocumentSelection, ModelElement, ModelSelection, ViewElement, Match } from '@ckeditor/ckeditor5-engine';\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { ImageUtils } from '../imageutils.js';\n\n/**\n * The image caption utilities plugin.\n */\nexport class ImageCaptionUtils extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageCaptionUtils' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * Returns the caption model element from a given image element. Returns `null` if no caption is found.\n\t */\n\tpublic getCaptionFromImageModelElement( imageModelElement: ModelElement ): ModelElement | null {\n\t\tfor ( const node of imageModelElement.getChildren() ) {\n\t\t\tif ( !!node && node.is( 'element', 'caption' ) ) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.\n\t */\n\tpublic getCaptionFromModelSelection( selection: ModelSelection | ModelDocumentSelection ): ModelElement | null {\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\t\tconst captionElement = selection.getFirstPosition()!.findAncestor( 'caption' );\n\n\t\tif ( !captionElement ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( imageUtils.isBlockImage( captionElement.parent as ModelElement ) ) {\n\t\t\treturn captionElement;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a `<figcaption>` element that is placed\n\t * inside the image `<figure>` element.\n\t * @returns Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element\n\t * cannot be matched.\n\t */\n\tpublic matchImageCaptionViewElement( element: ViewElement ): Match | null {\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\t// Convert only captions for images.\n\t\tif ( element.name == 'figcaption' && imageUtils.isBlockImageView( element.parent as ViewElement ) ) {\n\t\t\treturn { name: true };\n\t\t}\n\n\t\treturn null;\n\t}\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/**\n * @module image/imagecaption/toggleimagecaptioncommand\n */\n\nimport type { ModelElement, ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { Command } from '@ckeditor/ckeditor5-core';\n\nimport { ImageBlockEditing } from '../image/imageblockediting.js';\nimport { isImageTypePlaceable } from '../image/utils.js';\nimport { type ImageCaptionUtils } from './imagecaptionutils.js';\nimport { type ImageUtils } from '../imageutils.js';\nimport { type ImageCaptionEditing } from './imagecaptionediting.js';\n\n/**\n * The toggle image caption command.\n *\n * This command is registered by {@link module:image/imagecaption/imagecaptionediting~ImageCaptionEditing} as the\n * `'toggleImageCaption'` editor command.\n *\n * Executing this command:\n *\n * * either adds or removes the image caption of a selected image (depending on whether the caption is present or not),\n * * removes the image caption if the selection is anchored in one.\n *\n * ```ts\n * // Toggle the presence of the caption.\n * editor.execute( 'toggleImageCaption' );\n * ```\n *\n * **Note**: Upon executing this command, the selection will be set on the image if previously anchored in the caption element.\n *\n * **Note**: You can move the selection to the caption right away as it shows up upon executing this command by using\n * the `focusCaptionOnShow` option:\n *\n * ```ts\n * editor.execute( 'toggleImageCaption', { focusCaptionOnShow: true } );\n * ```\n */\nexport class ToggleImageCaptionCommand extends Command {\n\tdeclare public value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst imageCaptionUtils: ImageCaptionUtils = editor.plugins.get( 'ImageCaptionUtils' );\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\t// Only block images can get captions.\n\t\tif ( !editor.plugins.has( ImageBlockEditing ) ) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst selection = editor.model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\tif ( !selectedElement ) {\n\t\t\tconst ancestorCaptionElement = imageCaptionUtils.getCaptionFromModelSelection( selection );\n\n\t\t\tthis.isEnabled = !!ancestorCaptionElement;\n\t\t\tthis.value = !!ancestorCaptionElement;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Block images support captions by default but the command should also be enabled for inline\n\t\t// images because toggling the caption when one is selected should convert it into a block image.\n\t\tthis.isEnabled = imageUtils.isImage( selectedElement );\n\n\t\t// For an inline image the toggle requires an inline → block conversion. Make sure that\n\t\t// `imageBlock` can actually land somewhere reachable from the current position (e.g. inside\n\t\t// `$inlineRoot` or another limit ancestor that disallows `imageBlock`, the conversion would\n\t\t// otherwise be a no-op and the writer would still try to append the caption to the inline\n\t\t// image - which the schema rejects).\n\t\tif ( this.isEnabled && imageUtils.isInlineImage( selectedElement ) ) {\n\t\t\tconst position = editor.model.createPositionBefore( selectedElement );\n\n\t\t\tthis.isEnabled = isImageTypePlaceable( editor.model.schema, position, 'imageBlock' );\n\t\t}\n\n\t\tif ( !this.isEnabled ) {\n\t\t\tthis.value = false;\n\t\t} else {\n\t\t\tthis.value = !!imageCaptionUtils.getCaptionFromImageModelElement( selectedElement );\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * ```ts\n\t * editor.execute( 'toggleImageCaption' );\n\t * ```\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.focusCaptionOnShow When true and the caption shows up, the selection will be moved into it straight away.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { focusCaptionOnShow?: boolean } = {} ): void {\n\t\tconst { focusCaptionOnShow } = options;\n\n\t\tthis.editor.model.change( writer => {\n\t\t\tif ( this.value ) {\n\t\t\t\tthis._hideImageCaption( writer );\n\t\t\t} else {\n\t\t\t\tthis._showImageCaption( writer, focusCaptionOnShow );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Shows the caption of the `<imageBlock>` or `<imageInline>`. Also:\n\t *\n\t * * it converts `<imageInline>` to `<imageBlock>` to show the caption,\n\t * * it attempts to restore the caption content from the `ImageCaptionEditing` caption registry,\n\t * * it moves the selection to the caption right away, it the `focusCaptionOnShow` option was set.\n\t */\n\tprivate _showImageCaption( writer: ModelWriter, focusCaptionOnShow?: boolean ): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst imageCaptionEditing: ImageCaptionEditing = this.editor.plugins.get( 'ImageCaptionEditing' );\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\tlet selectedImage = selection.getSelectedElement()!;\n\n\t\tconst savedCaption = imageCaptionEditing._getSavedCaption( selectedImage );\n\n\t\t// Convert imageInline -> image first.\n\t\tif ( imageUtils.isInlineImage( selectedImage ) ) {\n\t\t\tthis.editor.execute( 'imageTypeBlock' );\n\n\t\t\t// Executing the command created a new model element. Let's pick it again.\n\t\t\tselectedImage = selection.getSelectedElement()!;\n\t\t}\n\n\t\t// Try restoring the caption from the ImageCaptionEditing plugin storage.\n\t\tconst newCaptionElement = savedCaption || writer.createElement( 'caption' );\n\n\t\twriter.append( newCaptionElement, selectedImage );\n\n\t\tif ( focusCaptionOnShow ) {\n\t\t\twriter.setSelection( newCaptionElement, 'in' );\n\t\t}\n\t}\n\n\t/**\n\t * Hides the caption of a selected image (or an image caption the selection is anchored to).\n\t *\n\t * The content of the caption is stored in the `ImageCaptionEditing` caption registry to make this\n\t * a reversible action.\n\t */\n\tprivate _hideImageCaption( writer: ModelWriter ): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst imageCaptionEditing: ImageCaptionEditing = editor.plugins.get( 'ImageCaptionEditing' );\n\t\tconst imageCaptionUtils: ImageCaptionUtils = editor.plugins.get( 'ImageCaptionUtils' );\n\t\tlet selectedImage = selection.getSelectedElement()!;\n\t\tlet captionElement: ModelElement;\n\n\t\tif ( selectedImage ) {\n\t\t\tcaptionElement = imageCaptionUtils.getCaptionFromImageModelElement( selectedImage )!;\n\t\t} else {\n\t\t\tcaptionElement = imageCaptionUtils.getCaptionFromModelSelection( selection )!;\n\t\t\tselectedImage = captionElement!.parent as ModelElement;\n\t\t}\n\n\t\t// Store the caption content so it can be restored quickly if the user changes their mind even if they toggle image<->imageInline.\n\t\timageCaptionEditing._saveCaption( selectedImage, captionElement );\n\n\t\twriter.setSelection( selectedImage, 'on' );\n\t\twriter.remove( captionElement );\n\t}\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/**\n * @module image/imagecaption/imagecaptionediting\n */\n\nimport { type Editor, Plugin, type CommandExecuteEvent, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ModelElement, enableViewPlaceholder, type ModelDocumentChangeEvent, type DifferItemAttribute } from '@ckeditor/ckeditor5-engine';\nimport { toWidgetEditable } from '@ckeditor/ckeditor5-widget';\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport { ToggleImageCaptionCommand } from './toggleimagecaptioncommand.js';\nimport { ImageUtils } from '../imageutils.js';\nimport { ImageCaptionUtils } from './imagecaptionutils.js';\n\n/**\n * The image caption engine plugin. It is responsible for:\n *\n * * registering converters for the caption element,\n * * registering converters for the caption model attribute,\n * * registering the {@link module:image/imagecaption/toggleimagecaptioncommand~ToggleImageCaptionCommand `toggleImageCaption`} command.\n */\nexport class ImageCaptionEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils, ImageCaptionUtils ]> {\n\t\treturn [ ImageUtils, ImageCaptionUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageCaptionEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * A map that keeps saved JSONified image captions and image model elements they are\n\t * associated with.\n\t *\n\t * To learn more about this system, see {@link #_saveCaption}.\n\t */\n\tprivate _savedCaptionsMap: WeakMap<ModelElement, unknown>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._savedCaptionsMap = new WeakMap();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\t// Schema configuration.\n\t\tif ( !schema.isRegistered( 'caption' ) ) {\n\t\t\tschema.register( 'caption', {\n\t\t\t\tallowIn: 'imageBlock',\n\t\t\t\tallowContentOf: '$block',\n\t\t\t\tisLimit: true\n\t\t\t} );\n\t\t} else {\n\t\t\tschema.extend( 'caption', {\n\t\t\t\tallowIn: 'imageBlock'\n\t\t\t} );\n\t\t}\n\n\t\teditor.commands.add( 'toggleImageCaption', new ToggleImageCaptionCommand( this.editor ) );\n\n\t\tthis._setupConversion();\n\t\tthis._setupImageTypeCommandsIntegration();\n\t\tthis._registerCaptionReconversion();\n\t}\n\n\t/**\n\t * Configures conversion pipelines to support upcasting and downcasting\n\t * image captions.\n\t */\n\tprivate _setupConversion(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst imageCaptionUtils: ImageCaptionUtils = editor.plugins.get( 'ImageCaptionUtils' );\n\t\tconst t = editor.t;\n\n\t\t// View -> model converter for the data pipeline.\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tview: element => imageCaptionUtils.matchImageCaptionViewElement( element ),\n\t\t\tmodel: 'caption'\n\t\t} );\n\n\t\t// Model -> view converter for the data pipeline.\n\t\teditor.conversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'caption',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tif ( !imageUtils.isBlockImage( modelElement.parent as ModelElement ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn writer.createContainerElement( 'figcaption' );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> view converter for the editing pipeline.\n\t\teditor.conversion.for( 'editingDowncast' ).elementToElement( {\n\t\t\tmodel: 'caption',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tif ( !imageUtils.isBlockImage( modelElement.parent as ModelElement ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst figcaptionElement = writer.createEditableElement( 'figcaption' );\n\t\t\t\twriter.setCustomProperty( 'imageCaption', true, figcaptionElement );\n\n\t\t\t\tfigcaptionElement.placeholder = t( 'Enter image caption' );\n\t\t\t\tenableViewPlaceholder( {\n\t\t\t\t\tview,\n\t\t\t\t\telement: figcaptionElement,\n\t\t\t\t\tkeepOnFocus: true\n\t\t\t\t} );\n\n\t\t\t\tconst imageAlt = ( modelElement.parent as ModelElement ).getAttribute( 'alt' ) as string;\n\t\t\t\tconst label = imageAlt ? t( 'Caption for image: %0', [ imageAlt ] ) : t( 'Caption for the image' );\n\n\t\t\t\treturn toWidgetEditable( figcaptionElement, writer, { label } );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Integrates with {@link module:image/image/imagetypecommand~ImageTypeCommand image type commands}\n\t * to make sure the caption is preserved when the type of an image changes so it can be restored\n\t * in the future if the user decides they want their caption back.\n\t */\n\tprivate _setupImageTypeCommandsIntegration(): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst imageCaptionUtils: ImageCaptionUtils = editor.plugins.get( 'ImageCaptionUtils' );\n\t\tconst imageTypeInlineCommand = editor.commands.get( 'imageTypeInline' );\n\t\tconst imageTypeBlockCommand = editor.commands.get( 'imageTypeBlock' );\n\n\t\tconst handleImageTypeChange: GetCallback<CommandExecuteEvent> = evt => {\n\t\t\t// The image type command execution can be unsuccessful.\n\t\t\tif ( !evt.return ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { oldElement, newElement } = evt.return as { oldElement: ModelElement; newElement: ModelElement };\n\n\t\t\t/* istanbul ignore if: paranoid check -- @preserve */\n\t\t\tif ( !oldElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( imageUtils.isBlockImage( oldElement ) ) {\n\t\t\t\tconst oldCaptionElement = imageCaptionUtils.getCaptionFromImageModelElement( oldElement );\n\n\t\t\t\t// If the old element was a captioned block image (the caption was visible),\n\t\t\t\t// simply save it so it can be restored.\n\t\t\t\tif ( oldCaptionElement ) {\n\t\t\t\t\tthis._saveCaption( newElement, oldCaptionElement );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst savedOldElementCaption = this._getSavedCaption( oldElement );\n\n\t\t\t// If either:\n\t\t\t//\n\t\t\t// * the block image didn't have a visible caption,\n\t\t\t// * the block image caption was hidden (and already saved),\n\t\t\t// * the inline image was passed\n\t\t\t//\n\t\t\t// just try to \"pass\" the saved caption from the old image to the new image\n\t\t\t// so it can be retrieved in the future if the user wants it back.\n\t\t\tif ( savedOldElementCaption ) {\n\t\t\t\t// Note: Since we're writing to a WeakMap, we don't bother with removing the\n\t\t\t\t// [ oldElement, savedOldElementCaption ] pair from it.\n\t\t\t\tthis._saveCaption( newElement, savedOldElementCaption );\n\t\t\t}\n\t\t};\n\n\t\t// Presence of the commands depends on the Image(Inline|Block)Editing plugins loaded in the editor.\n\t\tif ( imageTypeInlineCommand ) {\n\t\t\tthis.listenTo<CommandExecuteEvent>( imageTypeInlineCommand, 'execute', handleImageTypeChange, { priority: 'low' } );\n\t\t}\n\n\t\tif ( imageTypeBlockCommand ) {\n\t\t\tthis.listenTo<CommandExecuteEvent>( imageTypeBlockCommand, 'execute', handleImageTypeChange, { priority: 'low' } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the saved {@link module:engine/model/element~ModelElement#toJSON JSONified} caption\n\t * of an image model element.\n\t *\n\t * See {@link #_saveCaption}.\n\t *\n\t * @internal\n\t * @param imageModelElement The model element the caption should be returned for.\n\t * @returns The model caption element or `null` if there is none.\n\t */\n\tpublic _getSavedCaption( imageModelElement: ModelElement ): ModelElement | null {\n\t\tconst jsonObject = this._savedCaptionsMap.get( imageModelElement );\n\n\t\treturn jsonObject ? ModelElement.fromJSON( jsonObject ) : null;\n\t}\n\n\t/**\n\t * Saves a {@link module:engine/model/element~ModelElement#toJSON JSONified} caption for\n\t * an image element to allow restoring it in the future.\n\t *\n\t * A caption is saved every time it gets hidden and/or the type of an image changes. The\n\t * user should be able to restore it on demand.\n\t *\n\t * **Note**: The caption cannot be stored in the image model element attribute because,\n\t * for instance, when the model state propagates to collaborators, the attribute would get\n\t * lost (mainly because it does not convert to anything when the caption is hidden) and\n\t * the states of collaborators' models would de-synchronize causing numerous issues.\n\t *\n\t * See {@link #_getSavedCaption}.\n\t *\n\t * @internal\n\t * @param imageModelElement The model element the caption is saved for.\n\t * @param caption The caption model element to be saved.\n\t */\n\tpublic _saveCaption( imageModelElement: ModelElement, caption: ModelElement ): void {\n\t\tthis._savedCaptionsMap.set( imageModelElement, caption.toJSON() );\n\t}\n\n\t/**\n\t * Reconverts image caption when image alt attribute changes.\n\t * The change of alt attribute is reflected in caption's aria-label attribute.\n\t */\n\tprivate _registerCaptionReconversion(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst imageCaptionUtils: ImageCaptionUtils = editor.plugins.get( 'ImageCaptionUtils' );\n\n\t\tmodel.document.on<ModelDocumentChangeEvent>( 'change:data', () => {\n\t\t\tconst changes = model.document.differ.getChanges();\n\n\t\t\tfor ( const change of changes as Array<DifferItemAttribute> ) {\n\t\t\t\tif ( change.attributeKey !== 'alt' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst image = change.range.start.nodeAfter as ModelElement;\n\n\t\t\t\tif ( imageUtils.isBlockImage( image ) ) {\n\t\t\t\t\tconst caption = imageCaptionUtils.getCaptionFromImageModelElement( image );\n\n\t\t\t\t\tif ( !caption ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\teditor.editing.reconvertItem( caption );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module image/imagecaption/imagecaptionui\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\nimport { IconCaption } from '@ckeditor/ckeditor5-icons';\nimport { ImageCaptionUtils } from './imagecaptionutils.js';\nimport { type ToggleImageCaptionCommand } from './toggleimagecaptioncommand.js';\n\n/**\n * The image caption UI plugin. It introduces the `'toggleImageCaption'` UI button.\n */\nexport class ImageCaptionUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageCaptionUtils ]> {\n\t\treturn [ ImageCaptionUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageCaptionUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageCaptionUtils: ImageCaptionUtils = editor.plugins.get( 'ImageCaptionUtils' );\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'toggleImageCaption', locale => {\n\t\t\tconst command: ToggleImageCaptionCommand = editor.commands.get( 'toggleImageCaption' )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\ticon: IconCaption,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );\n\t\t\tview.bind( 'label' ).to( command, 'value', value => value ? t( 'Toggle caption off' ) : t( 'Toggle caption on' ) );\n\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\teditor.execute( 'toggleImageCaption', { focusCaptionOnShow: true } );\n\n\t\t\t\t// Scroll to the selection and highlight the caption if the caption showed up.\n\t\t\t\tconst modelCaptionElement = imageCaptionUtils.getCaptionFromModelSelection( editor.model.document.selection );\n\n\t\t\t\tif ( modelCaptionElement ) {\n\t\t\t\t\tconst figcaptionElement = editor.editing.mapper.toViewElement( modelCaptionElement );\n\n\t\t\t\t\teditingView.scrollToTheSelection();\n\n\t\t\t\t\teditingView.change( writer => {\n\t\t\t\t\t\twriter.addClass( 'image__caption_highlighted', figcaptionElement! );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\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/**\n * @module image/imagecaption\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageCaptionEditing } from './imagecaption/imagecaptionediting.js';\nimport { ImageCaptionUI } from './imagecaption/imagecaptionui.js';\n\n/**\n * The image caption plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-captions image caption} documentation.\n */\nexport class ImageCaption extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageCaptionEditing, ImageCaptionUI ]> {\n\t\treturn [ ImageCaptionEditing, ImageCaptionUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageCaption' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module image/imageupload/utils\n */\n\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\nimport { global } from '@ckeditor/ckeditor5-utils';\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * Creates a regular expression used to test for image files.\n *\n * ```ts\n * const imageType = createImageTypeRegExp( [ 'png', 'jpeg', 'svg+xml', 'vnd.microsoft.icon' ] );\n *\n * console.log( 'is supported image', imageType.test( file.type ) );\n * ```\n */\nexport function createImageTypeRegExp( types: Array<string> ): RegExp {\n\t// Sanitize the MIME type name which may include: \"+\", \"-\" or \".\".\n\tconst regExpSafeNames = types.map( type => type.replace( '+', '\\\\+' ) );\n\n\treturn new RegExp( `^image\\\\/(${ regExpSafeNames.join( '|' ) })$` );\n}\n\n/**\n * Creates a promise that fetches the image local source (Base64 or blob) and resolves with a `File` object.\n *\n * @internal\n * @param image Image whose source to fetch.\n * @returns A promise which resolves when an image source is fetched and converted to a `File` instance.\n * It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\n */\nexport function fetchLocalImage( image: ViewElement ): Promise<File> {\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst imageSrc = image.getAttribute( 'src' )!;\n\n\t\t// Fetch works asynchronously and so does not block browser UI when processing data.\n\t\tfetch( imageSrc )\n\t\t\t.then( resource => resource.blob() )\n\t\t\t.then( blob => {\n\t\t\t\tconst mimeType = getImageMimeType( blob, imageSrc );\n\t\t\t\tconst ext = mimeType.replace( 'image/', '' );\n\t\t\t\tconst filename = `image.${ ext }`;\n\t\t\t\tconst file = new File( [ blob ], filename, { type: mimeType } );\n\n\t\t\t\tresolve( file );\n\t\t\t} )\n\t\t\t.catch( err => {\n\t\t\t\t// Fetch fails only, if it can't make a request due to a network failure or if anything prevented the request\n\t\t\t\t// from completing, i.e. the Content Security Policy rules. It is not possible to detect the exact cause of failure,\n\t\t\t\t// so we are just trying the fallback solution, if general TypeError is thrown.\n\t\t\t\treturn err && err.name === 'TypeError' ?\n\t\t\t\t\tconvertLocalImageOnCanvas( imageSrc ).then( resolve ).catch( reject ) :\n\t\t\t\t\treject( err );\n\t\t\t} );\n\t} );\n}\n\n/**\n * Checks whether a given node is an image element with a local source (Base64 or blob).\n *\n * @param node The node to check.\n * @internal\n */\nexport function isLocalImage( imageUtils: ImageUtils, node: ViewElement ): boolean {\n\tif ( !imageUtils.isInlineImageView( node ) || !node.getAttribute( 'src' ) ) {\n\t\treturn false;\n\t}\n\n\treturn !!node.getAttribute( 'src' )!.match( /^data:image\\/\\w+;base64,/g ) ||\n\t\t!!node.getAttribute( 'src' )!.match( /^blob:/g );\n}\n\n/**\n * Extracts an image type based on its blob representation or its source.\n * @param blob Image blob representation.\n * @param src Image `src` attribute value.\n */\nfunction getImageMimeType( blob: Blob, src: string ): string {\n\tif ( blob.type ) {\n\t\treturn blob.type;\n\t} else if ( src.match( /data:(image\\/\\w+);base64/ ) ) {\n\t\treturn src.match( /data:(image\\/\\w+);base64/ )![ 1 ].toLowerCase();\n\t} else {\n\t\t// Fallback to 'jpeg' as common extension.\n\t\treturn 'image/jpeg';\n\t}\n}\n\n/**\n * Creates a promise that converts the image local source (Base64 or blob) to a blob using canvas and resolves\n * with a `File` object.\n * @param imageSrc Image `src` attribute value.\n * @returns A promise which resolves when an image source is converted to a `File` instance.\n * It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\n */\nfunction convertLocalImageOnCanvas( imageSrc: string ): Promise<File> {\n\treturn getBlobFromCanvas( imageSrc ).then( blob => {\n\t\tconst mimeType = getImageMimeType( blob, imageSrc );\n\t\tconst ext = mimeType.replace( 'image/', '' );\n\t\tconst filename = `image.${ ext }`;\n\n\t\treturn new File( [ blob ], filename, { type: mimeType } );\n\t} );\n}\n\n/**\n * Creates a promise that resolves with a `Blob` object converted from the image source (Base64 or blob).\n * @param imageSrc Image `src` attribute value.\n */\nfunction getBlobFromCanvas( imageSrc: string ): Promise<Blob> {\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst image = global.document.createElement( 'img' );\n\n\t\timage.addEventListener( 'load', () => {\n\t\t\tconst canvas = global.document.createElement( 'canvas' );\n\n\t\t\tcanvas.width = image.width;\n\t\t\tcanvas.height = image.height;\n\n\t\t\tconst ctx = canvas.getContext( '2d' )!;\n\n\t\t\tctx.drawImage( image, 0, 0 );\n\n\t\t\tcanvas.toBlob( blob => blob ? resolve( blob ) : reject() );\n\t\t} );\n\n\t\timage.addEventListener( 'error', () => reject() );\n\n\t\timage.src = imageSrc;\n\t} );\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/**\n * @module image/imageupload/imageuploadui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport {\n\tFileDialogButtonView,\n\tMenuBarMenuListItemFileDialogButtonView,\n\ttype ButtonView,\n\ttype MenuBarMenuListItemButtonView\n} from '@ckeditor/ckeditor5-ui';\nimport { IconImageUpload } from '@ckeditor/ckeditor5-icons';\nimport { createImageTypeRegExp } from './utils.js';\nimport { type ImageInsertUI } from '../imageinsert/imageinsertui.js';\n\n/**\n * The image upload button plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature} documentation.\n *\n * Adds the `'uploadImage'` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n * and also the `imageUpload` button as an alias for backward compatibility.\n *\n * Adds the `'menuBar:uploadImage'` menu button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}.\n *\n * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are the default components\n * through which image upload is available.\n */\nexport class ImageUploadUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageUploadUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Setup `uploadImage` button and add `imageUpload` button as an alias for backward compatibility.\n\t\teditor.ui.componentFactory.add( 'uploadImage', () => this._createToolbarButton() );\n\t\teditor.ui.componentFactory.add( 'imageUpload', () => this._createToolbarButton() );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:uploadImage', () => this._createMenuBarButton( 'standalone' ) );\n\n\t\tif ( editor.plugins.has( 'ImageInsertUI' ) ) {\n\t\t\teditor.plugins.get( 'ImageInsertUI' ).registerIntegration( {\n\t\t\t\tname: 'upload',\n\t\t\t\tobservable: () => editor.commands.get( 'uploadImage' )!,\n\t\t\t\tbuttonViewCreator: () => this._createToolbarButton(),\n\t\t\t\tformViewCreator: () => this._createDropdownButton(),\n\t\t\t\tmenuBarButtonViewCreator: isOnly => this._createMenuBarButton( isOnly ? 'insertOnly' : 'insertNested' )\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Creates the base for various kinds of the button component provided by this feature.\n\t */\n\tprivate _createButton<T extends typeof FileDialogButtonView | typeof MenuBarMenuListItemFileDialogButtonView>(\n\t\tButtonClass: T\n\t): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get( 'uploadImage' )!;\n\t\tconst imageTypes = editor.config.get( 'image.upload.types' )!;\n\t\tconst imageTypesRegExp = createImageTypeRegExp( imageTypes );\n\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\t\tconst t = locale.t;\n\n\t\tview.set( {\n\t\t\tacceptedType: imageTypes.map( type => `image/${ type }` ).join( ',' ),\n\t\t\tallowMultipleFiles: true,\n\t\t\tlabel: t( 'Upload from computer' ),\n\t\t\ticon: IconImageUpload\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command );\n\n\t\tview.on( 'done', ( evt, files: FileList ) => {\n\t\t\tconst imagesToUpload = Array.from( files ).filter( file => imageTypesRegExp.test( file.type ) );\n\n\t\t\tif ( imagesToUpload.length ) {\n\t\t\t\teditor.execute( 'uploadImage', { file: imagesToUpload } );\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t}\n\t\t} );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Creates a simple toolbar button, with an icon and a tooltip.\n\t */\n\tprivate _createToolbarButton(): ButtonView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst imageInsertUI: ImageInsertUI = this.editor.plugins.get( 'ImageInsertUI' );\n\t\tconst uploadImageCommand = this.editor.commands.get( 'uploadImage' )!;\n\n\t\tconst button = this._createButton( FileDialogButtonView );\n\n\t\tbutton.tooltip = true;\n\t\tbutton.bind( 'label' ).to(\n\t\t\timageInsertUI,\n\t\t\t'isImageSelected',\n\t\t\tuploadImageCommand,\n\t\t\t'isAccessAllowed',\n\t\t\t( isImageSelected, isAccessAllowed ) => {\n\t\t\t\tif ( !isAccessAllowed ) {\n\t\t\t\t\treturn t( 'You have no image upload permissions.' );\n\t\t\t\t}\n\n\t\t\t\treturn isImageSelected ? t( 'Replace image from computer' ) : t( 'Upload image from computer' );\n\t\t\t}\n\t\t);\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates a button for the dropdown view, with an icon, text and no tooltip.\n\t */\n\tprivate _createDropdownButton(): ButtonView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst imageInsertUI: ImageInsertUI = this.editor.plugins.get( 'ImageInsertUI' );\n\n\t\tconst button = this._createButton( FileDialogButtonView );\n\n\t\tbutton.withText = true;\n\n\t\tbutton.bind( 'label' ).to(\n\t\t\timageInsertUI,\n\t\t\t'isImageSelected',\n\t\t\tisImageSelected => isImageSelected ? t( 'Replace from computer' ) : t( 'Upload from computer' )\n\t\t);\n\n\t\tbutton.on( 'execute', () => {\n\t\t\timageInsertUI.dropdownView!.isOpen = false;\n\t\t} );\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates a button for the menu bar.\n\t */\n\tprivate _createMenuBarButton( type: 'standalone' | 'insertOnly' | 'insertNested' ): MenuBarMenuListItemButtonView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createButton( MenuBarMenuListItemFileDialogButtonView );\n\n\t\tbutton.withText = true;\n\n\t\tswitch ( type ) {\n\t\t\tcase 'standalone':\n\t\t\t\tbutton.label = t( 'Image from computer' );\n\t\t\t\tbreak;\n\t\t\tcase 'insertOnly':\n\t\t\t\tbutton.label = t( 'Image' );\n\t\t\t\tbreak;\n\t\t\tcase 'insertNested':\n\t\t\t\tbutton.label = t( 'From computer' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn button;\n\t}\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/**\n * @module image/imageupload/imageuploadprogress\n */\n\nimport { type Editor, Plugin } from '@ckeditor/ckeditor5-core';\nimport { FileRepository, type FileLoader } from '@ckeditor/ckeditor5-upload';\n\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\nimport type {\n\tViewDowncastWriter,\n\tEditingView,\n\tViewElement,\n\tViewContainerElement,\n\tViewUIElement,\n\tDowncastAttributeEvent,\n\tModelElement\n} from '@ckeditor/ckeditor5-engine';\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * The image upload progress plugin.\n * It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.\n */\nexport class ImageUploadProgress extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageUploadProgress' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * The image placeholder that is displayed before real image data can be accessed.\n\t *\n\t * For the record, this image is a 1x1 px GIF with an aspect ratio set by CSS.\n\t */\n\tprivate placeholder: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.placeholder = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Upload status change - update image's view according to that status.\n\t\tif ( editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\teditor.editing.downcastDispatcher.on<DowncastAttributeEvent>(\n\t\t\t\t'attribute:uploadStatus:imageBlock',\n\t\t\t\tthis.uploadStatusChange\n\t\t\t);\n\t\t}\n\n\t\tif ( editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\teditor.editing.downcastDispatcher.on<DowncastAttributeEvent>(\n\t\t\t\t'attribute:uploadStatus:imageInline',\n\t\t\t\tthis.uploadStatusChange\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * This method is called each time the image `uploadStatus` attribute is changed.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param data Additional information about the change.\n\t */\n\tprivate uploadStatusChange: GetCallback<DowncastAttributeEvent> = ( evt, data, conversionApi ) => {\n\t\tconst editor = this.editor;\n\t\tconst modelImage = data.item as ModelElement;\n\t\tconst uploadId = modelImage.getAttribute( 'uploadId' ) as string | number;\n\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\t\tconst status = uploadId ? data.attributeNewValue : null;\n\t\tconst placeholder = this.placeholder;\n\t\tconst viewFigure = editor.editing.mapper.toViewElement( modelImage )! as ViewContainerElement;\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\tif ( status == 'reading' ) {\n\t\t\t// Start \"appearing\" effect and show placeholder with infinite progress bar on the top\n\t\t\t// while image is read from disk.\n\t\t\t_startAppearEffect( viewFigure, viewWriter );\n\t\t\t_showPlaceholder( imageUtils, placeholder, viewFigure, viewWriter );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Show progress bar on the top of the image when image is uploading.\n\t\tif ( status == 'uploading' ) {\n\t\t\tconst loader = fileRepository.loaders.get( uploadId );\n\n\t\t\t// Start appear effect if needed - see https://github.com/ckeditor/ckeditor5-image/issues/191.\n\t\t\t_startAppearEffect( viewFigure, viewWriter );\n\n\t\t\tif ( !loader ) {\n\t\t\t\t// There is no loader associated with uploadId - this means that image came from external changes.\n\t\t\t\t// In such cases we still want to show the placeholder until image is fully uploaded.\n\t\t\t\t// Show placeholder if needed - see https://github.com/ckeditor/ckeditor5-image/issues/191.\n\t\t\t\t_showPlaceholder( imageUtils, placeholder, viewFigure, viewWriter );\n\t\t\t} else {\n\t\t\t\t// Hide placeholder and initialize progress bar showing upload progress.\n\t\t\t\t_hidePlaceholder( viewFigure, viewWriter );\n\t\t\t\t_showProgressBar( viewFigure, viewWriter, loader, editor.editing.view );\n\t\t\t\t_displayLocalImage( imageUtils, viewFigure!, viewWriter, loader );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( status == 'complete' && fileRepository.loaders.get( uploadId ) ) {\n\t\t\t_showCompleteIcon( viewFigure, viewWriter, editor.editing.view );\n\t\t}\n\n\t\t// Clean up.\n\t\t_hideProgressBar( viewFigure, viewWriter );\n\t\t_hidePlaceholder( viewFigure, viewWriter );\n\t\t_stopAppearEffect( viewFigure, viewWriter );\n\t};\n}\n\n/**\n * Adds ck-appear class to the image figure if one is not already applied.\n */\nfunction _startAppearEffect( viewFigure: ViewContainerElement, writer: ViewDowncastWriter ) {\n\tif ( !viewFigure.hasClass( 'ck-appear' ) ) {\n\t\twriter.addClass( 'ck-appear', viewFigure );\n\t}\n}\n\n/**\n * Removes ck-appear class to the image figure if one is not already removed.\n */\nfunction _stopAppearEffect( viewFigure: ViewContainerElement, writer: ViewDowncastWriter ) {\n\twriter.removeClass( 'ck-appear', viewFigure );\n}\n\n/**\n * Shows placeholder together with infinite progress bar on given image figure.\n */\nfunction _showPlaceholder( imageUtils: ImageUtils, placeholder: string, viewFigure: ViewContainerElement, writer: ViewDowncastWriter ) {\n\tif ( !viewFigure.hasClass( 'ck-image-upload-placeholder' ) ) {\n\t\twriter.addClass( 'ck-image-upload-placeholder', viewFigure );\n\t}\n\n\tconst viewImg = imageUtils.findViewImgElement( viewFigure )!;\n\n\tif ( viewImg.getAttribute( 'src' ) !== placeholder ) {\n\t\twriter.setAttribute( 'src', placeholder, viewImg );\n\t}\n\n\tif ( !_getUIElement( viewFigure, 'placeholder' ) ) {\n\t\twriter.insert( writer.createPositionAfter( viewImg ), _createPlaceholder( writer ) );\n\t}\n}\n\n/**\n * Removes placeholder together with infinite progress bar on given image figure.\n */\nfunction _hidePlaceholder( viewFigure: ViewContainerElement, writer: ViewDowncastWriter ) {\n\tif ( viewFigure.hasClass( 'ck-image-upload-placeholder' ) ) {\n\t\twriter.removeClass( 'ck-image-upload-placeholder', viewFigure );\n\t}\n\n\t_removeUIElement( viewFigure, writer, 'placeholder' );\n}\n\n/**\n * Shows progress bar displaying upload progress.\n * Attaches it to the file loader to update when upload percentace is changed.\n */\nfunction _showProgressBar( viewFigure: ViewContainerElement, writer: ViewDowncastWriter, loader: FileLoader, view: EditingView ) {\n\tconst progressBar = _createProgressBar( writer );\n\twriter.insert( writer.createPositionAt( viewFigure, 'end' ), progressBar );\n\n\t// Update progress bar width when uploadedPercent is changed.\n\tloader.on( 'change:uploadedPercent', ( evt, name, value ) => {\n\t\tview.change( writer => {\n\t\t\twriter.setStyle( 'width', value + '%', progressBar );\n\t\t} );\n\t} );\n}\n\n/**\n * Hides upload progress bar.\n */\nfunction _hideProgressBar( viewFigure: ViewContainerElement, writer: ViewDowncastWriter ) {\n\t_removeUIElement( viewFigure, writer, 'progressBar' );\n}\n\n/**\n * Shows complete icon and hides after a certain amount of time.\n */\nfunction _showCompleteIcon( viewFigure: ViewContainerElement, writer: ViewDowncastWriter, view: EditingView ) {\n\tconst completeIcon = writer.createUIElement( 'div', { class: 'ck-image-upload-complete-icon' } );\n\n\twriter.insert( writer.createPositionAt( viewFigure, 'end' ), completeIcon );\n\n\tsetTimeout( () => {\n\t\tview.change( writer => writer.remove( writer.createRangeOn( completeIcon ) ) );\n\t}, 3000 );\n}\n\n/**\n * Create progress bar element using {@link module:engine/view/uielement~ViewUIElement}.\n */\nfunction _createProgressBar( writer: ViewDowncastWriter ): ViewUIElement {\n\tconst progressBar = writer.createUIElement( 'div', { class: 'ck-progress-bar' } );\n\n\twriter.setCustomProperty( 'progressBar', true, progressBar );\n\n\treturn progressBar;\n}\n\n/**\n * Create placeholder element using {@link module:engine/view/uielement~ViewUIElement}.\n */\nfunction _createPlaceholder( writer: ViewDowncastWriter ): ViewUIElement {\n\tconst placeholder = writer.createUIElement( 'div', { class: 'ck-upload-placeholder-loader' } );\n\n\twriter.setCustomProperty( 'placeholder', true, placeholder );\n\n\treturn placeholder;\n}\n\n/**\n * Returns {@link module:engine/view/uielement~ViewUIElement} of given unique property from image figure element.\n * Returns `undefined` if element is not found.\n */\nfunction _getUIElement( imageFigure: ViewElement, uniqueProperty: string ): ViewUIElement | undefined {\n\tfor ( const child of imageFigure.getChildren() ) {\n\t\tif ( ( child as ViewElement ).getCustomProperty( uniqueProperty ) ) {\n\t\t\treturn child as ViewUIElement;\n\t\t}\n\t}\n}\n\n/**\n * Removes {@link module:engine/view/uielement~ViewUIElement} of given unique property from image figure element.\n */\nfunction _removeUIElement( viewFigure: ViewContainerElement, writer: ViewDowncastWriter, uniqueProperty: string ) {\n\tconst element = _getUIElement( viewFigure, uniqueProperty );\n\n\tif ( element ) {\n\t\twriter.remove( writer.createRangeOn( element ) );\n\t}\n}\n\n/**\n * Displays local data from file loader.\n */\nfunction _displayLocalImage( imageUtils: ImageUtils, viewFigure: ViewElement, writer: ViewDowncastWriter, loader: FileLoader ) {\n\tif ( loader.data ) {\n\t\tconst viewImg = imageUtils.findViewImgElement( viewFigure )!;\n\n\t\twriter.setAttribute( 'src', loader.data, viewImg );\n\t}\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/**\n * @module image/imageupload/uploadimagecommand\n */\n\nimport { FileRepository } from '@ckeditor/ckeditor5-upload';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { toArray, type ArrayOrItem } from '@ckeditor/ckeditor5-utils';\nimport type { ModelPosition } from '@ckeditor/ckeditor5-engine';\n\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * The upload image command.\n *\n * The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin as `uploadImage`\n * and it is also available via aliased `imageUpload` name.\n *\n * In order to upload an image at the current selection position\n * (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),\n * execute the command and pass the native image file instance:\n *\n * ```ts\n * this.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {\n * \t// Assuming that only images were pasted:\n * \tconst images = Array.from( data.dataTransfer.files );\n *\n * \t// Upload the first image:\n * \teditor.execute( 'uploadImage', { file: images[ 0 ] } );\n * } );\n * ```\n *\n * It is also possible to insert multiple images at once:\n *\n * ```ts\n * editor.execute( 'uploadImage', {\n * \tfile: [\n * \t\tfile1,\n * \t\tfile2\n * \t]\n * } );\n * ```\n */\nexport class UploadImageCommand extends Command {\n\t/**\n\t * The command property: `false` if there is no permission on image upload, otherwise `true`.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tdeclare public isAccessAllowed: boolean;\n\n\t/**\n\t * Creates an instance of the `imageUlpoad` command. When executed, the command upload one of\n\t * the currently selected image from computer.\n\t *\n\t * @param editor The editor instance.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'isAccessAllowed', true );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst selectedElement = editor.model.document.selection.getSelectedElement()!;\n\n\t\t// TODO: This needs refactoring.\n\t\tthis.isEnabled = imageUtils.isImageAllowed() || imageUtils.isImage( selectedElement );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.file The image file or an array of image files to upload.\n\t */\n\tpublic override execute( options: { file: ArrayOrItem<File> } ): void {\n\t\tconst files = toArray( options.file );\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\t// In case of multiple files, each file (starting from the 2nd) will be inserted at a position that\n\t\t// follows the previous one. That will move the selection and, to stay on the safe side and make sure\n\t\t// all images inherit the same selection attributes, they are collected beforehand.\n\t\t//\n\t\t// Applying these attributes ensures, for instance, that inserting an (inline) image into a link does\n\t\t// not split that link but preserves its continuity.\n\t\t//\n\t\t// Note: Selection attributes that do not make sense for images will be filtered out by insertImage() anyway.\n\t\tconst selectionAttributes = Object.fromEntries( selection.getAttributes() );\n\n\t\tfiles.forEach( ( file, index ) => {\n\t\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t\t// Inserting of an inline image replace the selected element and make a selection on the inserted image.\n\t\t\t// Therefore inserting multiple inline images requires creating position after each element.\n\t\t\tif ( index && selectedElement && imageUtils.isImage( selectedElement ) ) {\n\t\t\t\tconst position = this.editor.model.createPositionAfter( selectedElement );\n\n\t\t\t\tthis._uploadImage( file, selectionAttributes, position );\n\t\t\t} else {\n\t\t\t\tthis._uploadImage( file, selectionAttributes );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Handles uploading single file.\n\t */\n\tprivate _uploadImage( file: File, attributes: object, position?: ModelPosition ): void {\n\t\tconst editor = this.editor;\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\t\tconst loader = fileRepository.createLoader( file );\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\t// Do not throw when upload adapter is not set. FileRepository will log an error anyway.\n\t\tif ( !loader ) {\n\t\t\treturn;\n\t\t}\n\n\t\timageUtils.insertImage( { ...attributes, uploadId: loader.id }, position );\n\t}\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/**\n * @module image/imageupload/imageuploadediting\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tViewUpcastWriter,\n\ttype ModelElement,\n\ttype ModelItem,\n\ttype ModelWriter,\n\ttype ViewDataTransfer,\n\ttype ViewElement,\n\ttype ModelNodeAttributes,\n\ttype DowncastAttributeEvent,\n\ttype UpcastElementEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport { Notification } from '@ckeditor/ckeditor5-ui';\nimport {\n\tClipboardPipeline,\n\ttype ViewDocumentClipboardInputEvent,\n\ttype ClipboardInputTransformationEvent\n} from '@ckeditor/ckeditor5-clipboard';\nimport { FileRepository, type UploadResponse, type FileLoader } from '@ckeditor/ckeditor5-upload';\nimport { env } from '@ckeditor/ckeditor5-utils';\n\nimport { ImageUtils } from '../imageutils.js';\nimport { UploadImageCommand } from './uploadimagecommand.js';\nimport { createImageTypeRegExp, fetchLocalImage, isLocalImage } from './utils.js';\n\n/**\n * The editing part of the image upload feature. It registers the `'uploadImage'` command\n * and the `imageUpload` command as an aliased name.\n *\n * When an image is uploaded, it fires the {@link ~ImageUploadEditing#event:uploadComplete `uploadComplete`} event\n * that allows adding custom attributes to the {@link module:engine/model/element~ModelElement image element}.\n */\nexport class ImageUploadEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FileRepository, Notification, ClipboardPipeline, ImageUtils ]> {\n\t\treturn [ FileRepository, Notification, ClipboardPipeline, ImageUtils ];\n\t}\n\n\tpublic static get pluginName() {\n\t\treturn 'ImageUploadEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and\n\t * model elements during the upload.\n\t *\n\t * Model element of the uploaded image can change, for instance, when {@link module:image/image/imagetypecommand~ImageTypeCommand}\n\t * is executed as a result of adding caption or changing image style. As a result, the upload logic must keep track of the model\n\t * element (reference) and resolve the upload for the correct model element (instead of the one that landed in the `$graveyard`\n\t * after image type changed).\n\t */\n\tprivate readonly _uploadImageElements: Map<string, Set<ModelElement>>;\n\n\t/**\n\t * An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and\n\t * upload responses for handling images dragged during their upload process. When such images are later\n\t * dropped, their original upload IDs no longer exist in the registry (as the original upload completed).\n\t * This map preserves the upload responses to properly handle such cases.\n\t */\n\tprivate readonly _uploadedImages = new Map<string, UploadResponse>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'image', {\n\t\t\tupload: {\n\t\t\t\ttypes: [ 'jpeg', 'png', 'gif', 'bmp', 'webp', 'tiff' ]\n\t\t\t}\n\t\t} );\n\n\t\tthis._uploadImageElements = new Map();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst doc = editor.model.document;\n\t\tconst conversion = editor.conversion;\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\t\tconst imageTypes = createImageTypeRegExp( editor.config.get( 'image.upload.types' )! );\n\t\tconst uploadImageCommand = new UploadImageCommand( editor );\n\n\t\t// Register `uploadImage` command and add `imageUpload` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'uploadImage', uploadImageCommand );\n\t\teditor.commands.add( 'imageUpload', uploadImageCommand );\n\n\t\t// Register upcast converter for uploadId.\n\t\tconversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'img',\n\t\t\t\t\tkey: 'uploadId'\n\t\t\t\t},\n\t\t\t\tmodel: 'uploadId'\n\t\t\t} )\n\n\t\t\t// Handle the case when the image is not fully uploaded yet but it's being moved.\n\t\t\t// See more: https://github.com/ckeditor/ckeditor5/pull/17327\n\t\t\t.add( dispatcher => dispatcher.on<UpcastElementEvent>( 'element:img', ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.test( data.viewItem, { attributes: [ 'data-ck-upload-id' ] } ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst uploadId = data.viewItem.getAttribute( 'data-ck-upload-id' );\n\n\t\t\t\tif ( !uploadId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The `<img>` was not converted to a model image element (e.g. an inline root only allows\n\t\t\t\t// inline content and the image was not allowed), so there is nothing to set the upload data on.\n\t\t\t\tif ( !data.modelRange ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst [ modelElement ] = Array.from( data.modelRange.getItems( { shallow: true } ) );\n\t\t\t\tconst loader = fileRepository.loaders.get( uploadId as string );\n\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( modelElement ) {\n\t\t\t\t\t// Handle case when `uploadId` is set on the image element but the loader is not present in the registry.\n\t\t\t\t\t// It may happen when the image was successfully uploaded and the loader was removed from the registry.\n\t\t\t\t\t// It's still present in the `_uploadedImages` map though. It's why we do not place this line in the condition below.\n\t\t\t\t\tconversionApi.writer.setAttribute( 'uploadId', uploadId, modelElement );\n\t\t\t\t\tconversionApi.consumable.consume( data.viewItem, { attributes: [ 'data-ck-upload-id' ] } );\n\n\t\t\t\t\tif ( loader && loader.data ) {\n\t\t\t\t\t\tconversionApi.writer.setAttribute( 'uploadStatus', loader.status, modelElement );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, { priority: 'low' } ) );\n\n\t\t// Handle pasted images.\n\t\t// For every image file, a new file loader is created and a placeholder image is\n\t\t// inserted into the content. Then, those images are uploaded once they appear in the model\n\t\t// (see Document#change listener below).\n\t\tthis.listenTo<ViewDocumentClipboardInputEvent>( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {\n\t\t\t// Skip if non empty HTML data is included.\n\t\t\t// https://github.com/ckeditor/ckeditor5-upload/issues/68\n\t\t\tif ( isHtmlInDataTransfer( data.dataTransfer ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst images = Array.from( data.dataTransfer.files ).filter( file => {\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5-image/pull/254.\n\t\t\t\tif ( !file ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn imageTypes.test( file.type );\n\t\t\t} );\n\n\t\t\tif ( !images.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevt.stop();\n\n\t\t\teditor.model.change( writer => {\n\t\t\t\t// Set selection to paste target.\n\t\t\t\tif ( data.targetRanges ) {\n\t\t\t\t\twriter.setSelection( data.targetRanges.map( viewRange => editor.editing.mapper.toModelRange( viewRange ) ) );\n\t\t\t\t}\n\n\t\t\t\teditor.execute( 'uploadImage', { file: images } );\n\t\t\t} );\n\n\t\t\tconst uploadImageCommand = editor.commands.get( 'uploadImage' )!;\n\n\t\t\tif ( !uploadImageCommand.isAccessAllowed ) {\n\t\t\t\tconst notification: Notification = editor.plugins.get( 'Notification' );\n\t\t\t\tconst t = editor.locale.t;\n\n\t\t\t\tnotification.showWarning( t( 'You have no image upload permissions.' ), {\n\t\t\t\t\tnamespace: 'image'\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Handle HTML pasted with images with base64 or blob sources.\n\t\t// For every image file, a new file loader is created and a placeholder image is\n\t\t// inserted into the content. Then, those images are uploaded once they appear in the model\n\t\t// (see Document#change listener below).\n\t\tthis.listenTo<ClipboardInputTransformationEvent>( clipboardPipeline, 'inputTransformation', ( evt, data ) => {\n\t\t\tconst fetchableImages = Array.from( editor.editing.view.createRangeIn( data.content ) )\n\t\t\t\t.map( value => value.item as ViewElement )\n\t\t\t\t.filter( viewElement =>\n\t\t\t\t\tisLocalImage( imageUtils, viewElement ) &&\n\t\t\t\t\t!viewElement.getAttribute( 'uploadProcessed' ) )\n\t\t\t\t.map( viewElement => { return { promise: fetchLocalImage( viewElement ), imageElement: viewElement }; } );\n\n\t\t\tif ( !fetchableImages.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst writer = new ViewUpcastWriter( editor.editing.view.document );\n\n\t\t\tfor ( const fetchableImage of fetchableImages ) {\n\t\t\t\t// Set attribute marking that the image was processed already.\n\t\t\t\twriter.setAttribute( 'uploadProcessed', true, fetchableImage.imageElement );\n\n\t\t\t\tconst loader = fileRepository.createLoader( fetchableImage.promise );\n\n\t\t\t\tif ( loader ) {\n\t\t\t\t\twriter.setAttribute( 'src', '', fetchableImage.imageElement );\n\t\t\t\t\twriter.setAttribute( 'uploadId', loader.id, fetchableImage.imageElement );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Prevents from the browser redirecting to the dropped image.\n\t\teditor.editing.view.document.on( 'dragover', ( evt, data ) => {\n\t\t\tdata.preventDefault();\n\t\t} );\n\n\t\t// Upload placeholder images that appeared in the model.\n\t\tdoc.on( 'change', () => {\n\t\t\t// Note: Reversing changes to start with insertions and only then handle removals. If it was the other way around,\n\t\t\t// loaders for **all** images that land in the $graveyard would abort while in fact only those that were **not** replaced\n\t\t\t// by other images should be aborted.\n\t\t\tconst changes = doc.differ.getChanges( { includeChangesInGraveyard: true } ).reverse();\n\t\t\tconst insertedImagesIds = new Set();\n\n\t\t\tfor ( const entry of changes ) {\n\t\t\t\tif ( entry.type == 'insert' && entry.name != '$text' ) {\n\t\t\t\t\tconst item = entry.position.nodeAfter!;\n\t\t\t\t\tconst isInsertedInGraveyard = entry.position.root.rootName == '$graveyard';\n\n\t\t\t\t\tfor ( const imageElement of getImagesFromChangeItem( editor, item ) ) {\n\t\t\t\t\t\t// Check if the image element still has upload id.\n\t\t\t\t\t\tconst uploadId = imageElement.getAttribute( 'uploadId' ) as string;\n\t\t\t\t\t\tconst uploadStatus = imageElement.getAttribute( 'uploadStatus' );\n\n\t\t\t\t\t\t// Check if status is complete to ensure that there were no additional reconversions\n\t\t\t\t\t\t// in the same batch that set the status to 'complete'. It may happen when list item\n\t\t\t\t\t\t// performed refresh of its children (including images) because `uploadStatus` attribute\n\t\t\t\t\t\t// has been changed.\n\t\t\t\t\t\tif ( !uploadId || uploadStatus == 'complete' ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Check if the image is loaded on this client.\n\t\t\t\t\t\tconst loader = fileRepository.loaders.get( uploadId );\n\n\t\t\t\t\t\tif ( !loader ) {\n\t\t\t\t\t\t\t// If the loader does not exist, it means that the image was already uploaded\n\t\t\t\t\t\t\t// and the loader promise was removed from the registry. In that scenario we need\n\t\t\t\t\t\t\t// to restore response object from the internal map.\n\t\t\t\t\t\t\tif ( !isInsertedInGraveyard && this._uploadedImages.has( uploadId ) ) {\n\t\t\t\t\t\t\t\t// Fire `uploadComplete` to set proper attributes on the image element.\n\t\t\t\t\t\t\t\teditor.model.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\t\t\t\t\t\twriter.setAttribute( 'uploadStatus', 'complete', imageElement );\n\n\t\t\t\t\t\t\t\t\tthis.fire<ImageUploadCompleteEvent>( 'uploadComplete', {\n\t\t\t\t\t\t\t\t\t\tdata: this._uploadedImages.get( uploadId )!,\n\t\t\t\t\t\t\t\t\t\timageElement: imageElement as ModelElement\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t// While it makes sense to remove the image from the `_uploadedImages` map here,\n\t\t\t\t\t\t\t\t// it's counterintuitive for the user that pastes image in uploading several times.\n\t\t\t\t\t\t\t\t// It'll work the first time, but the next time the image will be empty because the\n\t\t\t\t\t\t\t\t// `_uploadedImages` no longer contain the response.\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( isInsertedInGraveyard ) {\n\t\t\t\t\t\t\t// If the image was inserted to the graveyard for good (**not** replaced by another image),\n\t\t\t\t\t\t\t// only then abort the loading process.\n\t\t\t\t\t\t\tif ( !insertedImagesIds.has( uploadId ) ) {\n\t\t\t\t\t\t\t\t// ... but abort it only if all remain images that share the same loader are in the graveyard too.\n\t\t\t\t\t\t\t\t// This is to prevent situation when we have two images in uploading state and one of them is being\n\t\t\t\t\t\t\t\t// placed in the graveyard (e.g. using undo). The other one should not be aborted.\n\t\t\t\t\t\t\t\tconst allImagesThatShareUploaderInGraveyard = Array\n\t\t\t\t\t\t\t\t\t.from( this._uploadImageElements.get( uploadId )! )\n\t\t\t\t\t\t\t\t\t.every( element => element.root.rootName == '$graveyard' );\n\n\t\t\t\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\t\t\t\tif ( allImagesThatShareUploaderInGraveyard ) {\n\t\t\t\t\t\t\t\t\tloader.abort();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Remember the upload id of the inserted image. If it acted as a replacement for another\n\t\t\t\t\t\t\t// image (which landed in the $graveyard), the related loader will not be aborted because\n\t\t\t\t\t\t\t// this is still the same image upload.\n\t\t\t\t\t\t\tinsertedImagesIds.add( uploadId );\n\n\t\t\t\t\t\t\t// Keep the mapping between the upload ID and the image model element so the upload\n\t\t\t\t\t\t\t// can later resolve in the context of the correct model element. The model element could\n\t\t\t\t\t\t\t// change for the same upload if one image was replaced by another (e.g. image type was changed),\n\t\t\t\t\t\t\t// so this may also replace an existing mapping.\n\t\t\t\t\t\t\tif ( !this._uploadImageElements.has( uploadId ) ) {\n\t\t\t\t\t\t\t\tthis._uploadImageElements.set( uploadId, new Set( [ imageElement as ModelElement ] ) );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._uploadImageElements.get( uploadId )!.add( imageElement as ModelElement );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( loader.status == 'idle' ) {\n\t\t\t\t\t\t\t\t// If the image was inserted into content and has not been loaded yet, start loading it.\n\t\t\t\t\t\t\t\tthis._readAndUpload( loader );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Set the default handler for feeding the image element with `src` and `srcset` attributes.\n\t\t// Also set the natural `width` and `height` attributes (if not already set).\n\t\tthis.on<ImageUploadCompleteEvent>( 'uploadComplete', ( evt, { imageElement, data } ) => {\n\t\t\tconst urls = data.urls ? data.urls as Record<string, unknown> : data;\n\n\t\t\tthis.editor.model.change( writer => {\n\t\t\t\twriter.setAttribute( 'src', urls.default, imageElement );\n\t\t\t\tthis._parseAndSetSrcsetAttributeOnImage( urls, imageElement, writer );\n\t\t\t\timageUtils.setImageNaturalSizeAttributes( imageElement );\n\t\t\t} );\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst schema = this.editor.model.schema;\n\n\t\t// Setup schema to allow uploadId and uploadStatus for images.\n\t\t// Wait for ImageBlockEditing or ImageInlineEditing to register their elements first,\n\t\t// that's why doing this in afterInit() instead of init().\n\t\tif ( this.editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\tschema.extend( 'imageBlock', {\n\t\t\t\tallowAttributes: [ 'uploadId', 'uploadStatus' ]\n\t\t\t} );\n\n\t\t\tthis._registerConverters( 'imageBlock' );\n\t\t}\n\n\t\tif ( this.editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\tschema.extend( 'imageInline', {\n\t\t\t\tallowAttributes: [ 'uploadId', 'uploadStatus' ]\n\t\t\t} );\n\n\t\t\tthis._registerConverters( 'imageInline' );\n\t\t}\n\t}\n\n\t/**\n\t * Reads and uploads an image.\n\t *\n\t * The image is read from the disk and as a Base64-encoded string it is set temporarily to\n\t * `image[src]`. When the image is successfully uploaded, the temporary data is replaced with the target\n\t * image's URL (the URL to the uploaded image on the server).\n\t */\n\tprotected _readAndUpload( loader: FileLoader ): Promise<void> {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst t = editor.locale.t;\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\t\tconst notification = editor.plugins.get( Notification );\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst imageUploadElements = this._uploadImageElements;\n\n\t\tmodel.enqueueChange( { isUndoable: false }, writer => {\n\t\t\tconst elements = imageUploadElements.get( loader.id )!;\n\n\t\t\tfor ( const element of elements ) {\n\t\t\t\twriter.setAttribute( 'uploadStatus', 'reading', element );\n\t\t\t}\n\t\t} );\n\n\t\treturn loader.read()\n\t\t\t.then( () => {\n\t\t\t\tconst promise = loader.upload();\n\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( editor.ui ) {\n\t\t\t\t\teditor.ui.ariaLiveAnnouncer.announce( t( 'Uploading image' ) );\n\t\t\t\t}\n\n\t\t\t\tfor ( const imageElement of imageUploadElements.get( loader.id )! ) {\n\t\t\t\t\t// Force re–paint in Safari. Without it, the image will display with a wrong size.\n\t\t\t\t\t// https://github.com/ckeditor/ckeditor5/issues/1975\n\t\t\t\t\t/* istanbul ignore next -- @preserve */\n\t\t\t\t\tif ( env.isSafari ) {\n\t\t\t\t\t\tconst viewFigure = editor.editing.mapper.toViewElement( imageElement )!;\n\t\t\t\t\t\tconst viewImg = imageUtils.findViewImgElement( viewFigure )!;\n\n\t\t\t\t\t\teditor.editing.view.once( 'render', () => {\n\t\t\t\t\t\t\t// Early returns just to be safe. There might be some code ran\n\t\t\t\t\t\t\t// in between the outer scope and this callback.\n\t\t\t\t\t\t\tif ( !viewImg.parent ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst domFigure = editor.editing.view.domConverter.mapViewToDom( viewImg.parent ) as HTMLElement | undefined;\n\n\t\t\t\t\t\t\tif ( !domFigure ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst originalDisplay = domFigure.style.display;\n\n\t\t\t\t\t\t\tdomFigure.style.display = 'none';\n\n\t\t\t\t\t\t\t// Make sure this line will never be removed during minification for having \"no effect\".\n\t\t\t\t\t\t\t( domFigure as any )._ckHack = domFigure.offsetHeight;\n\n\t\t\t\t\t\t\tdomFigure.style.display = originalDisplay;\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\t\t\twriter.setAttribute( 'uploadStatus', 'uploading', imageElement );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn promise;\n\t\t\t} )\n\t\t\t.then( data => {\n\t\t\t\tmodel.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\t\tfor ( const imageElement of imageUploadElements.get( loader.id )! ) {\n\t\t\t\t\t\twriter.setAttribute( 'uploadStatus', 'complete', imageElement );\n\t\t\t\t\t\tthis.fire<ImageUploadCompleteEvent>( 'uploadComplete', { data, imageElement } );\n\t\t\t\t\t}\n\n\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\tif ( editor.ui ) {\n\t\t\t\t\t\teditor.ui.ariaLiveAnnouncer.announce( t( 'Image upload complete' ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._uploadedImages.set( loader.id, data );\n\t\t\t\t} );\n\n\t\t\t\tclean();\n\t\t\t} )\n\t\t\t.catch( error => {\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( editor.ui ) {\n\t\t\t\t\teditor.ui.ariaLiveAnnouncer.announce( t( 'Error during image upload' ) );\n\t\t\t\t}\n\n\t\t\t\t// If status is not 'error' nor 'aborted' - throw error because it means that something else went wrong,\n\t\t\t\t// it might be generic error and it would be real pain to find what is going on.\n\t\t\t\tif ( loader.status !== 'error' && loader.status !== 'aborted' ) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\t// Might be 'aborted'.\n\t\t\t\tif ( loader.status == 'error' && error ) {\n\t\t\t\t\tnotification.showWarning( error, {\n\t\t\t\t\t\ttitle: t( 'Upload failed' ),\n\t\t\t\t\t\tnamespace: 'upload'\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// Permanently remove image from insertion batch.\n\t\t\t\tmodel.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\t\tfor ( const imageElement of imageUploadElements.get( loader.id )! ) {\n\t\t\t\t\t\t// Handle situation when the image has been removed and then `abort` exception was thrown.\n\t\t\t\t\t\t// See: https://github.com/ckeditor/ckeditor5-commercial/issues/6817\n\t\t\t\t\t\tif ( imageElement.root.rootName !== '$graveyard' ) {\n\t\t\t\t\t\t\twriter.remove( imageElement );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tclean();\n\t\t\t} );\n\n\t\tfunction clean() {\n\t\t\tmodel.enqueueChange( { isUndoable: false }, writer => {\n\t\t\t\tfor ( const imageElement of imageUploadElements.get( loader.id )! ) {\n\t\t\t\t\twriter.removeAttribute( 'uploadId', imageElement );\n\t\t\t\t\twriter.removeAttribute( 'uploadStatus', imageElement );\n\t\t\t\t}\n\n\t\t\t\timageUploadElements.delete( loader.id );\n\t\t\t} );\n\n\t\t\tfileRepository.destroyLoader( loader );\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `srcset` attribute based on a given file upload response and sets it as an attribute to a specific image element.\n\t *\n\t * @param data Data object from which `srcset` will be created.\n\t * @param image The image element on which the `srcset` attribute will be set.\n\t */\n\tprotected _parseAndSetSrcsetAttributeOnImage( data: Record<string, unknown>, image: ModelElement, writer: ModelWriter ): void {\n\t\t// Srcset attribute for responsive images support.\n\t\tlet maxWidth = 0;\n\n\t\tconst srcsetAttribute = Object.keys( data )\n\t\t\t// Filter out keys that are not integers.\n\t\t\t.filter( key => {\n\t\t\t\tconst width = parseInt( key, 10 );\n\n\t\t\t\tif ( !isNaN( width ) ) {\n\t\t\t\t\tmaxWidth = Math.max( maxWidth, width );\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} )\n\n\t\t\t// Convert each key to srcset entry.\n\t\t\t.map( key => `${ data[ key ] } ${ key }w` )\n\n\t\t\t// Join all entries.\n\t\t\t.join( ', ' );\n\n\t\tif ( srcsetAttribute != '' ) {\n\t\t\tconst attributes: ModelNodeAttributes = {\n\t\t\t\tsrcset: srcsetAttribute\n\t\t\t};\n\n\t\t\tif ( !image.hasAttribute( 'width' ) && !image.hasAttribute( 'height' ) ) {\n\t\t\t\tattributes.width = maxWidth;\n\t\t\t}\n\n\t\t\twriter.setAttributes( attributes, image );\n\t\t}\n\t}\n\n\t/**\n\t * Registers image upload converters.\n\t *\n\t * @param imageType The type of the image.\n\t */\n\tprivate _registerConverters( imageType: 'imageBlock' | 'imageInline' ) {\n\t\tconst { conversion, plugins } = this.editor;\n\n\t\tconst fileRepository = plugins.get( FileRepository );\n\t\tconst imageUtils = plugins.get( ImageUtils );\n\n\t\t// It sets `data-ck-upload-id` attribute on the view image elements that are not fully uploaded.\n\t\t// It avoids the situation when image disappears when it's being moved and upload is not finished yet.\n\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/16967\n\t\tconversion.for( 'dataDowncast' ).add( dispatcher => {\n\t\t\tdispatcher.on<DowncastAttributeEvent>( `attribute:uploadId:${ imageType }`, ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst loader = fileRepository.loaders.get( data.attributeNewValue as string );\n\n\t\t\t\tif ( !loader || !loader.data ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item as ModelElement )!;\n\t\t\t\tconst img = imageUtils.findViewImgElement( viewElement );\n\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( img ) {\n\t\t\t\t\tconversionApi.consumable.consume( data.item, evt.name );\n\t\t\t\t\tconversionApi.writer.setAttribute( 'data-ck-upload-id', loader.id, img );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n}\n\n/**\n * TODO move this to the clipboard package.\n *\n * Returns `true` if non-empty `text/html` is included in the data transfer.\n */\nexport function isHtmlInDataTransfer( dataTransfer: ViewDataTransfer ): boolean {\n\treturn Array.from( dataTransfer.types ).includes( 'text/html' ) && dataTransfer.getData( 'text/html' ) !== '';\n}\n\nfunction getImagesFromChangeItem( editor: Editor, item: ModelItem ): Array<ModelItem> {\n\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\treturn Array.from( editor.model.createRangeOn( item ) )\n\t\t.filter( value => imageUtils.isImage( value.item as ModelElement ) )\n\t\t.map( value => value.item );\n}\n\n/**\n * An event fired when an image is uploaded. You can hook into this event to provide\n * custom attributes to the {@link module:engine/model/element~ModelElement image element} based on the data from\n * the server.\n *\n * ```ts\n * const imageUploadEditing = editor.plugins.get( 'ImageUploadEditing' );\n *\n * imageUploadEditing.on( 'uploadComplete', ( evt, { data, imageElement } ) => {\n * \teditor.model.change( writer => {\n * \t\twriter.setAttribute( 'someAttribute', 'foo', imageElement );\n * \t} );\n * } );\n * ```\n *\n * You can also stop the default handler that sets the `src` and `srcset` attributes\n * if you want to provide custom values for these attributes.\n *\n * ```ts\n * imageUploadEditing.on( 'uploadComplete', ( evt, { data, imageElement } ) => {\n * \tevt.stop();\n * } );\n * ```\n *\n * **Note**: This event is fired by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin.\n *\n * @eventName ~ImageUploadEditing#uploadComplete\n * @param data The `uploadComplete` event data.\n */\nexport type ImageUploadCompleteEvent = {\n\tname: 'uploadComplete';\n\targs: [ data: ImageUploadCompleteData];\n};\n\nexport type ImageUploadCompleteData = {\n\n\t/**\n\t * The data coming from the upload adapter.\n\t */\n\tdata: UploadResponse;\n\n\t/**\n\t * The model {@link module:engine/model/element~ModelElement image element} that can be customized.\n\t */\n\timageElement: ModelElement;\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/**\n * @module image/imageupload\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageUploadUI } from './imageupload/imageuploadui.js';\nimport { ImageUploadProgress } from './imageupload/imageuploadprogress.js';\nimport { ImageUploadEditing } from './imageupload/imageuploadediting.js';\n\n/**\n * The image upload plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload image upload feature} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins to enable image uploading:\n *\n * * {@link module:image/imageupload/imageuploadediting~ImageUploadEditing},\n * * {@link module:image/imageupload/imageuploadui~ImageUploadUI},\n * * {@link module:image/imageupload/imageuploadprogress~ImageUploadProgress}.\n */\nexport class ImageUpload extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageUpload' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUploadEditing, ImageUploadUI, ImageUploadProgress ]> {\n\t\treturn [ ImageUploadEditing, ImageUploadUI, ImageUploadProgress ];\n\t}\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/**\n * @module image/imageinsert/ui/imageinserturlview\n */\n\nimport {\n\tView,\n\tLabeledFieldView,\n\tcreateLabeledInputText,\n\tsubmitHandler,\n\ttype InputTextView\n} from '@ckeditor/ckeditor5-ui';\nimport { KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The insert an image via URL view.\n *\n * See {@link module:image/imageinsert/imageinsertviaurlui~ImageInsertViaUrlUI}.\n *\n * @internal\n */\nexport class ImageInsertUrlView extends View {\n\t/**\n\t * The URL input field view.\n\t */\n\tpublic urlInputView: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * The value of the URL input.\n\t *\n\t * @observable\n\t */\n\tdeclare public imageURLInputValue: string;\n\n\t/**\n\t * Observable property used to alter labels while some image is selected and when it is not.\n\t *\n\t * @observable\n\t */\n\tdeclare public isImageSelected: boolean;\n\n\t/**\n\t * Observable property indicating whether the form interactive elements should be enabled.\n\t *\n\t * @observable\n\t */\n\tdeclare public isEnabled: boolean;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( 'imageURLInputValue', '' );\n\t\tthis.set( 'isImageSelected', false );\n\t\tthis.set( 'isEnabled', true );\n\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\tthis.urlInputView = this._createUrlInputView();\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-image-insert-url'\n\t\t\t\t],\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView,\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-image-insert-url__action-row'\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Creates the {@link #urlInputView}.\n\t */\n\tprivate _createUrlInputView() {\n\t\tconst locale = this.locale!;\n\t\tconst t = locale.t;\n\t\tconst urlInputView = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\turlInputView.bind( 'label' ).to( this, 'isImageSelected',\n\t\t\tvalue => value ? t( 'Update image URL' ) : t( 'Insert image via URL' )\n\t\t);\n\n\t\turlInputView.bind( 'isEnabled' ).to( this );\n\n\t\turlInputView.fieldView.inputMode = 'url';\n\t\turlInputView.fieldView.placeholder = 'https://example.com/image.png';\n\n\t\turlInputView.fieldView.bind( 'value' ).to( this, 'imageURLInputValue', ( value: string ) => value || '' );\n\t\turlInputView.fieldView.on( 'input', () => {\n\t\t\tthis.imageURLInputValue = urlInputView.fieldView.element!.value.trim();\n\t\t} );\n\n\t\treturn urlInputView;\n\t}\n\n\t/**\n\t * Focuses the view.\n\t */\n\tpublic focus(): void {\n\t\tthis.urlInputView.focus();\n\t}\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/**\n * @module image/imageinsert/imageinsertviaurlui\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ButtonView, Dialog, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { IconImageUrl } from '@ckeditor/ckeditor5-icons';\n\nimport { ImageInsertUI } from './imageinsertui.js';\nimport { ImageInsertUrlView } from './ui/imageinserturlview.js';\n\n/**\n * The image insert via URL plugin (UI part).\n *\n * The plugin introduces two UI components to the {@link module:ui/componentfactory~ComponentFactory UI component factory}:\n *\n * * the `'insertImageViaUrl'` toolbar button,\n * * the `'menuBar:insertImageViaUrl'` menu bar component.\n *\n * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are default components\n * through which inserting image via URL is available.\n */\nexport class ImageInsertViaUrlUI extends Plugin {\n\tprivate _imageInsertUI!: ImageInsertUI;\n\tprivate _formView?: ImageInsertUrlView;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageInsertViaUrlUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageInsertUI, Dialog ]> {\n\t\treturn [ ImageInsertUI, Dialog ];\n\t}\n\n\tpublic init(): void {\n\t\tthis.editor.ui.componentFactory.add( 'insertImageViaUrl', () => this._createToolbarButton() );\n\t\tthis.editor.ui.componentFactory.add( 'menuBar:insertImageViaUrl', () => this._createMenuBarButton( 'standalone' ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tthis._imageInsertUI = this.editor.plugins.get( 'ImageInsertUI' );\n\n\t\tthis._imageInsertUI.registerIntegration( {\n\t\t\tname: 'url',\n\t\t\tobservable: () => this.editor.commands.get( 'insertImage' )!,\n\t\t\tbuttonViewCreator: () => this._createToolbarButton(),\n\t\t\tformViewCreator: () => this._createDropdownButton(),\n\t\t\tmenuBarButtonViewCreator: isOnly => this._createMenuBarButton( isOnly ? 'insertOnly' : 'insertNested' )\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the base for various kinds of the button component provided by this feature.\n\t */\n\tprivate _createInsertUrlButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>(\n\t\tButtonClass: T\n\t): InstanceType<T> {\n\t\tconst button = new ButtonClass( this.editor.locale ) as InstanceType<T>;\n\n\t\tbutton.icon = IconImageUrl;\n\t\tbutton.on( 'execute', () => {\n\t\t\tthis._showModal();\n\t\t} );\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates a simple toolbar button, with an icon and a tooltip.\n\t */\n\tprivate _createToolbarButton(): ButtonView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createInsertUrlButton( ButtonView );\n\n\t\tbutton.tooltip = true;\n\t\tbutton.bind( 'label' ).to(\n\t\t\tthis._imageInsertUI,\n\t\t\t'isImageSelected',\n\t\t\tisImageSelected => isImageSelected ? t( 'Update image URL' ) : t( 'Insert image via URL' )\n\t\t);\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates a button for the dropdown view, with an icon, text and no tooltip.\n\t */\n\tprivate _createDropdownButton(): ButtonView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createInsertUrlButton( ButtonView );\n\n\t\tbutton.withText = true;\n\t\tbutton.bind( 'label' ).to(\n\t\t\tthis._imageInsertUI,\n\t\t\t'isImageSelected',\n\t\t\tisImageSelected => isImageSelected ? t( 'Update image URL' ) : t( 'Insert via URL' )\n\t\t);\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates a button for the menu bar.\n\t */\n\tprivate _createMenuBarButton( type: 'standalone' | 'insertOnly' | 'insertNested' ): MenuBarMenuListItemButtonView {\n\t\tconst t = this.editor.locale.t;\n\t\tconst button = this._createInsertUrlButton( MenuBarMenuListItemButtonView );\n\n\t\tbutton.withText = true;\n\n\t\tswitch ( type ) {\n\t\t\tcase 'standalone':\n\t\t\t\tbutton.label = t( 'Image via URL' );\n\t\t\t\tbreak;\n\t\t\tcase 'insertOnly':\n\t\t\t\tbutton.label = t( 'Image' );\n\t\t\t\tbreak;\n\t\t\tcase 'insertNested':\n\t\t\t\tbutton.label = t( 'Via URL' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates the form view used to submit the image URL.\n\t */\n\tprivate _createInsertUrlView(): ImageInsertUrlView {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\n\t\tconst replaceImageSourceCommand = editor.commands.get( 'replaceImageSource' )!;\n\t\tconst insertImageCommand = editor.commands.get( 'insertImage' )!;\n\n\t\tconst imageInsertUrlView = new ImageInsertUrlView( locale );\n\n\t\timageInsertUrlView.bind( 'isImageSelected' ).to( this._imageInsertUI );\n\t\timageInsertUrlView.bind( 'isEnabled' ).toMany( [ insertImageCommand, replaceImageSourceCommand ], 'isEnabled', ( ...isEnabled ) => (\n\t\t\tisEnabled.some( isCommandEnabled => isCommandEnabled )\n\t\t) );\n\n\t\treturn imageInsertUrlView;\n\t}\n\n\t/**\n\t * Shows the insert image via URL form view in a modal.\n\t */\n\tprivate _showModal() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = locale.t;\n\t\tconst dialog = editor.plugins.get( 'Dialog' );\n\n\t\tif ( !this._formView ) {\n\t\t\tthis._formView = this._createInsertUrlView();\n\t\t\tthis._formView.on( 'submit', () => this._handleSave() );\n\t\t}\n\n\t\tconst replaceImageSourceCommand = editor.commands.get( 'replaceImageSource' )!;\n\t\tthis._formView.imageURLInputValue = replaceImageSourceCommand.value || '';\n\n\t\tdialog.show( {\n\t\t\tid: 'insertImageViaUrl',\n\t\t\ttitle: t( 'Image via URL' ),\n\t\t\tisModal: true,\n\t\t\tcontent: this._formView,\n\t\t\tactionButtons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Cancel' ),\n\t\t\t\t\twithText: true,\n\t\t\t\t\tonExecute: () => dialog.hide()\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: this._imageInsertUI.isImageSelected ? t( 'Save' ) : t( 'Insert' ),\n\t\t\t\t\tclass: 'ck-button-action',\n\t\t\t\t\twithText: true,\n\t\t\t\t\tonExecute: () => this._handleSave()\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Executes appropriate command depending on selection and form value.\n\t */\n\tprivate _handleSave() {\n\t\tconst replaceImageSourceCommand = this.editor.commands.get( 'replaceImageSource' )!;\n\n\t\t// If an image element is currently selected, we want to replace its source attribute (instead of inserting a new image).\n\t\t// We detect if an image is selected by checking `replaceImageSource` command state.\n\t\tif ( replaceImageSourceCommand.isEnabled ) {\n\t\t\tthis.editor.execute( 'replaceImageSource', { source: this._formView!.imageURLInputValue } );\n\t\t} else {\n\t\t\tthis.editor.execute( 'insertImage', { source: this._formView!.imageURLInputValue } );\n\t\t}\n\n\t\tthis.editor.plugins.get( 'Dialog' ).hide();\n\t}\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/**\n * @module image/imageinsertviaurl\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageInsertUI } from './imageinsert/imageinsertui.js';\nimport { ImageInsertViaUrlUI } from './imageinsert/imageinsertviaurlui.js';\n\n/**\n * The image insert via URL plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-inserting\n * Insert images via source URL} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins\n * to enable image inserting via implemented integrations:\n *\n * * {@link module:image/imageinsert/imageinsertui~ImageInsertUI},\n */\nexport class ImageInsertViaUrl extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageInsertViaUrl' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageInsertViaUrlUI, ImageInsertUI ]> {\n\t\treturn [ ImageInsertViaUrlUI, ImageInsertUI ];\n\t}\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/**\n * @module image/imageinsert\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageUpload } from './imageupload.js';\nimport { ImageInsertViaUrl } from './imageinsertviaurl.js';\nimport { ImageInsertUI } from './imageinsert/imageinsertui.js';\n\n/**\n * The image insert plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}\n * and {@glink features/images/images-inserting Insert images via source URL} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins\n * to enable image uploading or inserting via implemented integrations:\n *\n * * {@link module:image/imageupload~ImageUpload}\n * * {@link module:image/imageinsert/imageinsertui~ImageInsertUI}\n */\nexport class ImageInsert extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageInsert' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUpload, ImageInsertViaUrl, ImageInsertUI ]> {\n\t\treturn [ ImageUpload, ImageInsertViaUrl, ImageInsertUI ];\n\t}\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/**\n * @module image/imageresize/resizeimagecommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * The resize image command. Currently, it only supports the width attribute.\n */\nexport class ResizeImageCommand extends Command {\n\t/**\n\t * Desired image width and height.\n\t */\n\tdeclare public value: undefined | null | {\n\t\twidth: string | null;\n\t\theight: string | null;\n\t};\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst element = imageUtils.getClosestSelectedImageElement( editor.model.document.selection );\n\n\t\tthis.isEnabled = !!element;\n\n\t\tif ( !element || !element.hasAttribute( 'resizedWidth' ) ) {\n\t\t\tthis.value = null;\n\t\t} else {\n\t\t\tthis.value = {\n\t\t\t\twidth: element.getAttribute( 'resizedWidth' ) as string,\n\t\t\t\theight: null\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * ```ts\n\t * // Sets the width to 50%:\n\t * editor.execute( 'resizeImage', { width: '50%' } );\n\t *\n\t * // Removes the width attribute:\n\t * editor.execute( 'resizeImage', { width: null } );\n\t * ```\n\t *\n\t * @param options\n\t * @param options.width The new width of the image.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { width: string | null } ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst imageElement = imageUtils.getClosestSelectedImageElement( model.document.selection );\n\n\t\tthis.value = {\n\t\t\twidth: options.width,\n\t\t\theight: null\n\t\t};\n\n\t\tif ( imageElement ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setAttribute( 'resizedWidth', options.width, imageElement );\n\t\t\t\twriter.removeAttribute( 'resizedHeight', imageElement );\n\t\t\t\timageUtils.setImageNaturalSizeAttributes( imageElement );\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module image/imageresize/imageresizeediting\n */\n\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\nimport { type Editor, Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageUtils } from '../imageutils.js';\nimport { ResizeImageCommand } from './resizeimagecommand.js';\nimport { widthAndHeightStylesAreBothSet } from '../image/utils.js';\n\n/**\n * The image resize editing feature.\n *\n * It adds the ability to resize each image using handles or manually by\n * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n */\nexport class ImageResizeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageResizeEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'IR';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'image', {\n\t\t\tresizeUnit: '%',\n\t\t\tresizeOptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:original',\n\t\t\t\t\tvalue: null,\n\t\t\t\t\ticon: 'original'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:custom',\n\t\t\t\t\tvalue: 'custom',\n\t\t\t\t\ticon: 'custom'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:25',\n\t\t\t\t\tvalue: '25',\n\t\t\t\t\ticon: 'small'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:50',\n\t\t\t\t\tvalue: '50',\n\t\t\t\t\ticon: 'medium'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:75',\n\t\t\t\t\tvalue: '75',\n\t\t\t\t\ticon: 'large'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst resizeImageCommand = new ResizeImageCommand( editor );\n\n\t\tthis._registerConverters( 'imageBlock' );\n\t\tthis._registerConverters( 'imageInline' );\n\n\t\t// Register `resizeImage` command and add `imageResize` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'resizeImage', resizeImageCommand );\n\t\teditor.commands.add( 'imageResize', resizeImageCommand );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tthis._registerSchema();\n\t}\n\n\tprivate _registerSchema(): void {\n\t\tconst schema = this.editor.model.schema;\n\n\t\tif ( this.editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\tschema.extend( 'imageBlock', { allowAttributes: [ 'resizedWidth', 'resizedHeight' ] } );\n\t\t\tschema.setAttributeProperties( 'resizedWidth', { isFormatting: true } );\n\t\t\tschema.setAttributeProperties( 'resizedHeight', { isFormatting: true } );\n\t\t}\n\n\t\tif ( this.editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\tschema.extend( 'imageInline', { allowAttributes: [ 'resizedWidth', 'resizedHeight' ] } );\n\t\t\tschema.setAttributeProperties( 'resizedWidth', { isFormatting: true } );\n\t\t\tschema.setAttributeProperties( 'resizedHeight', { isFormatting: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Registers image resize converters.\n\t *\n\t * @param imageType The type of the image.\n\t */\n\tprivate _registerConverters( imageType: 'imageBlock' | 'imageInline' ) {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\t// Dedicated converter to propagate image's attribute to the img tag.\n\t\teditor.conversion.for( 'downcast' ).add( dispatcher =>\n\t\t\tdispatcher.on( `attribute:resizedWidth:${ imageType }`, ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst viewImg = conversionApi.mapper.toViewElement( data.item );\n\n\t\t\t\tif ( data.attributeNewValue !== null ) {\n\t\t\t\t\tviewWriter.setStyle( 'width', data.attributeNewValue, viewImg );\n\t\t\t\t\tviewWriter.addClass( 'image_resized', viewImg );\n\t\t\t\t} else {\n\t\t\t\t\tviewWriter.removeStyle( 'width', viewImg );\n\t\t\t\t\tviewWriter.removeClass( 'image_resized', viewImg );\n\t\t\t\t}\n\t\t\t} )\n\t\t);\n\n\t\teditor.conversion.for( 'dataDowncast' ).attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tname: imageType,\n\t\t\t\tkey: 'resizedHeight'\n\t\t\t},\n\t\t\tview: modelAttributeValue => ( {\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\t'height': modelAttributeValue\n\t\t\t\t}\n\t\t\t} )\n\t\t} );\n\n\t\teditor.conversion.for( 'editingDowncast' ).add( dispatcher =>\n\t\t\tdispatcher.on( `attribute:resizedHeight:${ imageType }`, ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst viewImg = conversionApi.mapper.toViewElement( data.item );\n\t\t\t\tconst target = imageType === 'imageInline' ? imageUtils.findViewImgElement( viewImg ) : viewImg;\n\n\t\t\t\tif ( data.attributeNewValue !== null ) {\n\t\t\t\t\tviewWriter.setStyle( 'height', data.attributeNewValue, target );\n\t\t\t\t} else {\n\t\t\t\t\tviewWriter.removeStyle( 'height', target );\n\t\t\t\t}\n\t\t\t} )\n\t\t);\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: imageType === 'imageBlock' ? 'figure' : 'img',\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\twidth: /.+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'resizedWidth',\n\t\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\t\tif ( widthAndHeightStylesAreBothSet( viewElement ) ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn viewElement.getStyle( 'width' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: imageType === 'imageBlock' ? 'figure' : 'img',\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\theight: /.+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'resizedHeight',\n\t\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\t\tif ( widthAndHeightStylesAreBothSet( viewElement ) ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn viewElement.getStyle( 'height' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on( `element:${ imageType === 'imageBlock' ? 'figure' : 'img' }`, ( evt, data, conversionApi ) => {\n\t\t\t\tconversionApi.consumable.consume( data.viewItem, { classes: [ 'image_resized' ] } );\n\t\t\t} );\n\t\t} );\n\t}\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/**\n * @module image/imageresize/imageresizebuttons\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tButtonView,\n\tDropdownButtonView,\n\tUIModel,\n\tcreateDropdown,\n\taddListToDropdown,\n\ttype ListDropdownItemDefinition\n} from '@ckeditor/ckeditor5-ui';\nimport { CKEditorError, Collection, type Locale } from '@ckeditor/ckeditor5-utils';\nimport {\n\tIconObjectSizeCustom,\n\tIconObjectSizeFull,\n\tIconObjectSizeLarge,\n\tIconObjectSizeMedium,\n\tIconObjectSizeSmall\n} from '@ckeditor/ckeditor5-icons';\n\nimport { ImageResizeEditing } from './imageresizeediting.js';\n\nimport { type ResizeImageCommand } from './resizeimagecommand.js';\nimport type { ImageResizeOption } from '../imageconfig.js';\n\nconst RESIZE_ICONS = /* #__PURE__ */ ( () => ( {\n\tsmall: IconObjectSizeSmall,\n\tmedium: IconObjectSizeMedium,\n\tlarge: IconObjectSizeLarge,\n\tcustom: IconObjectSizeCustom,\n\toriginal: IconObjectSizeFull\n} ) )();\n\n/**\n * The image resize buttons plugin.\n *\n * It adds a possibility to resize images using the toolbar dropdown or individual buttons, depending on the plugin configuration.\n */\nexport class ImageResizeButtons extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageResizeEditing ]> {\n\t\treturn [ ImageResizeEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageResizeButtons' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * The resize unit.\n\t * @default '%'\n\t */\n\tprivate readonly _resizeUnit: 'px' | '%';\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._resizeUnit = editor.config.get( 'image.resizeUnit' )!;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst options = editor.config.get( 'image.resizeOptions' )!;\n\t\tconst command: ResizeImageCommand = editor.commands.get( 'resizeImage' )!;\n\n\t\tthis.bind( 'isEnabled' ).to( command );\n\n\t\tfor ( const option of options ) {\n\t\t\tthis._registerImageResizeButton( option );\n\t\t}\n\n\t\tthis._registerImageResizeDropdown( options );\n\t}\n\n\t/**\n\t * A helper function that creates a standalone button component for the plugin.\n\t *\n\t * @param option A model of the resize option.\n\t */\n\tprivate _registerImageResizeButton( option: ImageResizeOption ): void {\n\t\tconst editor = this.editor;\n\t\tconst { name, value, icon } = option;\n\n\t\teditor.ui.componentFactory.add( name, locale => {\n\t\t\tconst button = new ButtonView( locale );\n\t\t\tconst command: ResizeImageCommand = editor.commands.get( 'resizeImage' )!;\n\t\t\tconst labelText = this._getOptionLabelValue( option, true );\n\n\t\t\tif ( !RESIZE_ICONS[ icon as keyof typeof RESIZE_ICONS ] ) {\n\t\t\t\t/**\n\t\t\t\t * When configuring {@link module:image/imageconfig~ImageConfig#resizeOptions `config.image.resizeOptions`} for standalone\n\t\t\t\t * buttons, a valid `icon` token must be set for each option.\n\t\t\t\t *\n\t\t\t\t * See all valid options described in the\n\t\t\t\t * {@link module:image/imageconfig~ImageResizeOption plugin configuration}.\n\t\t\t\t *\n\t\t\t\t * @error imageresizebuttons-missing-icon\n\t\t\t\t * @param {module:image/imageconfig~ImageResizeOption} option Invalid image resize option.\n\t\t\t\t*/\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'imageresizebuttons-missing-icon',\n\t\t\t\t\teditor,\n\t\t\t\t\toption\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tbutton.set( {\n\t\t\t\t// Use the `label` property for a verbose description (because of ARIA).\n\t\t\t\tlabel: labelText,\n\t\t\t\ticon: RESIZE_ICONS[ icon as keyof typeof RESIZE_ICONS ],\n\t\t\t\ttooltip: labelText,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\t// Bind button to the command.\n\t\t\tbutton.bind( 'isEnabled' ).to( this );\n\n\t\t\tif ( editor.plugins.has( 'ImageCustomResizeUI' ) && isCustomImageResizeOption( option ) ) {\n\t\t\t\tconst customResizeUI = editor.plugins.get( 'ImageCustomResizeUI' );\n\n\t\t\t\tthis.listenTo( button, 'execute', () => {\n\t\t\t\t\tcustomResizeUI._showForm( this._resizeUnit );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst optionValueWithUnit = value ? value + this._resizeUnit : null;\n\n\t\t\t\tbutton.bind( 'isOn' ).to(\n\t\t\t\t\tcommand, 'value',\n\t\t\t\t\tcommand, 'isEnabled',\n\t\t\t\t\tgetIsOnButtonCallback( optionValueWithUnit )\n\t\t\t\t);\n\n\t\t\t\tthis.listenTo( button, 'execute', () => {\n\t\t\t\t\teditor.execute( 'resizeImage', { width: optionValueWithUnit } );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn button;\n\t\t} );\n\t}\n\n\t/**\n\t * A helper function that creates a dropdown component for the plugin containing all the resize options defined in\n\t * the editor configuration.\n\t *\n\t * @param options An array of configured options.\n\t */\n\tprivate _registerImageResizeDropdown( options: Array<ImageResizeOption> ): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst originalSizeOption = options.find( option => !option.value )!;\n\n\t\tconst componentCreator = ( locale: Locale ) => {\n\t\t\tconst command: ResizeImageCommand = editor.commands.get( 'resizeImage' )!;\n\t\t\tconst dropdownView = createDropdown( locale, DropdownButtonView );\n\t\t\tconst dropdownButton: typeof dropdownView.buttonView & { commandValue?: string | null } = dropdownView.buttonView;\n\t\t\tconst accessibleLabel = t( 'Resize image' );\n\n\t\t\tdropdownButton.set( {\n\t\t\t\ttooltip: accessibleLabel,\n\t\t\t\tcommandValue: originalSizeOption.value,\n\t\t\t\ticon: RESIZE_ICONS.medium,\n\t\t\t\tisToggleable: true,\n\t\t\t\tlabel: this._getOptionLabelValue( originalSizeOption ),\n\t\t\t\twithText: true,\n\t\t\t\tclass: 'ck-resize-image-button',\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\tariaLabelledBy: undefined\n\t\t\t} );\n\n\t\t\tdropdownButton.bind( 'label' ).to( command, 'value', commandValue => {\n\t\t\t\tif ( commandValue && commandValue.width ) {\n\t\t\t\t\treturn commandValue.width;\n\t\t\t\t} else {\n\t\t\t\t\treturn this._getOptionLabelValue( originalSizeOption );\n\t\t\t\t}\n\t\t\t} );\n\t\t\tdropdownView.bind( 'isEnabled' ).to( this );\n\n\t\t\taddListToDropdown( dropdownView, () => this._getResizeDropdownListItemDefinitions( options, command ), {\n\t\t\t\tariaLabel: t( 'Image resize list' ),\n\t\t\t\trole: 'menu'\n\t\t\t} );\n\n\t\t\t// Execute command when an item from the dropdown is selected.\n\t\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\t\tif ( 'onClick' in evt.source ) {\n\t\t\t\t\t( evt.source as any ).onClick();\n\t\t\t\t} else {\n\t\t\t\t\teditor.execute( ( evt.source as any ).commandName, { width: ( evt.source as any ).commandValue } );\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t};\n\n\t\t// Register `resizeImage` dropdown and add `imageResize` dropdown as an alias for backward compatibility.\n\t\teditor.ui.componentFactory.add( 'resizeImage', componentCreator );\n\t\teditor.ui.componentFactory.add( 'imageResize', componentCreator );\n\t}\n\n\t/**\n\t * A helper function for creating an option label value string.\n\t *\n\t * @param option A resize option object.\n\t * @param forTooltip An optional flag for creating a tooltip label.\n\t * @returns A user-defined label combined from the numeric value and the resize unit or the default label\n\t * for reset options (`Original`).\n\t */\n\tprivate _getOptionLabelValue( option: ImageResizeOption, forTooltip: boolean = false ): string {\n\t\tconst t = this.editor.t;\n\n\t\tif ( option.label ) {\n\t\t\treturn option.label;\n\t\t} else if ( forTooltip ) {\n\t\t\tif ( isCustomImageResizeOption( option ) ) {\n\t\t\t\treturn t( 'Custom image size' );\n\t\t\t} else if ( option.value ) {\n\t\t\t\treturn t( 'Resize image to %0', option.value + this._resizeUnit );\n\t\t\t} else {\n\t\t\t\treturn t( 'Resize image to the original size' );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( isCustomImageResizeOption( option ) ) {\n\t\t\t\treturn t( 'Custom' );\n\t\t\t} else if ( option.value ) {\n\t\t\t\treturn option.value + this._resizeUnit;\n\t\t\t} else {\n\t\t\t\treturn t( 'Original' );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A helper function that parses the resize options and returns list item definitions ready for use in the dropdown.\n\t *\n\t * @param options The resize options.\n\t * @param command The resize image command.\n\t * @returns Dropdown item definitions.\n\t */\n\tprivate _getResizeDropdownListItemDefinitions(\n\t\toptions: Array<ImageResizeOption>,\n\t\tcommand: ResizeImageCommand\n\t): Collection<ListDropdownItemDefinition> {\n\t\tconst { editor } = this;\n\t\tconst itemDefinitions = new Collection<ListDropdownItemDefinition>();\n\n\t\tconst optionsWithSerializedValues = options.map( option => {\n\t\t\tif ( isCustomImageResizeOption( option ) ) {\n\t\t\t\treturn {\n\t\t\t\t\t...option,\n\t\t\t\t\tvalueWithUnits: 'custom'\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif ( !option.value ) {\n\t\t\t\treturn {\n\t\t\t\t\t...option,\n\t\t\t\t\tvalueWithUnits: null\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: `${ option.value }${ this._resizeUnit }`\n\t\t\t};\n\t\t} );\n\n\t\tfor ( const option of optionsWithSerializedValues ) {\n\t\t\tlet definition: ListDropdownItemDefinition | null;\n\n\t\t\tif ( editor.plugins.has( 'ImageCustomResizeUI' ) && isCustomImageResizeOption( option ) ) {\n\t\t\t\tconst customResizeUI = editor.plugins.get( 'ImageCustomResizeUI' );\n\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: new UIModel( {\n\t\t\t\t\t\tlabel: this._getOptionLabelValue( option ),\n\t\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null,\n\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\tcustomResizeUI._showForm( this._resizeUnit );\n\t\t\t\t\t\t}\n\t\t\t\t\t} )\n\t\t\t\t};\n\n\t\t\t\tconst allDropdownValues = Object.values( optionsWithSerializedValues ).map( option => option.valueWithUnits );\n\n\t\t\t\tdefinition.model.bind( 'isOn' ).to(\n\t\t\t\t\tcommand, 'value',\n\t\t\t\t\tcommand, 'isEnabled',\n\t\t\t\t\tgetIsOnCustomButtonCallback( allDropdownValues )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: new UIModel( {\n\t\t\t\t\t\tcommandName: 'resizeImage',\n\t\t\t\t\t\tcommandValue: option.valueWithUnits,\n\t\t\t\t\t\tlabel: this._getOptionLabelValue( option ),\n\t\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null\n\t\t\t\t\t} )\n\t\t\t\t};\n\n\t\t\t\tdefinition.model.bind( 'isOn' ).to(\n\t\t\t\t\tcommand, 'value',\n\t\t\t\t\tcommand, 'isEnabled',\n\t\t\t\t\tgetIsOnButtonCallback( option.valueWithUnits )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tdefinition.model.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\t\titemDefinitions.add( definition );\n\t\t}\n\n\t\treturn itemDefinitions;\n\t}\n}\n\n/**\n * A helper that checks if provided option triggers custom resize balloon.\n */\nfunction isCustomImageResizeOption( option: ImageResizeOption ) {\n\treturn option.value === 'custom';\n}\n\n/**\n * A helper function for setting the `isOn` state of buttons in value bindings.\n */\nfunction getIsOnButtonCallback( value: string | null ) {\n\treturn ( commandValue: ResizeImageCommand['value'], isEnabled: boolean ): boolean => {\n\t\tconst objectCommandValue = commandValue as null | undefined | { width: string | null };\n\n\t\tif ( objectCommandValue === undefined || !isEnabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( value === null && objectCommandValue === value ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn objectCommandValue !== null && objectCommandValue.width === value;\n\t};\n}\n\n/**\n * A helper function for setting the `isOn` state of custom size button in value bindings.\n */\nfunction getIsOnCustomButtonCallback( allDropdownValues: Array<string | null> ) {\n\treturn ( commandValue: ResizeImageCommand['value'], isEnabled: boolean ): boolean => !allDropdownValues.some(\n\t\tdropdownValue => getIsOnButtonCallback( dropdownValue )( commandValue, isEnabled )\n\t);\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/**\n * @module image/imageresize/imageresizehandles\n */\n\nimport type { ModelElement, ViewElement } from '@ckeditor/ckeditor5-engine';\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { WidgetResize } from '@ckeditor/ckeditor5-widget';\nimport { ImageUtils } from '../imageutils.js';\n\nimport { ImageLoadObserver, type ImageLoadedEvent } from '../image/imageloadobserver.js';\nimport { type ResizeImageCommand } from './resizeimagecommand.js';\n\nconst RESIZABLE_IMAGES_CSS_SELECTOR =\n\t'figure.image.ck-widget > img,' +\n\t'figure.image.ck-widget > picture > img,' +\n\t'figure.image.ck-widget > a > img,' +\n\t'figure.image.ck-widget > a > picture > img,' +\n\t'span.image-inline.ck-widget > img,' +\n\t'span.image-inline.ck-widget > picture > img';\n\nconst RESIZED_IMAGE_CLASS = 'image_resized';\n\n/**\n * The image resize by handles feature.\n *\n * It adds the ability to resize each image using handles or manually by\n * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n */\nexport class ImageResizeHandles extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ WidgetResize, ImageUtils ]> {\n\t\treturn [ WidgetResize, ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageResizeHandles' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst command: ResizeImageCommand = this.editor.commands.get( 'resizeImage' )!;\n\t\tthis.bind( 'isEnabled' ).to( command );\n\n\t\tthis._setupResizerCreator();\n\t}\n\n\t/**\n\t * Attaches the listeners responsible for creating a resizer for each image, except for images inside the HTML embed preview.\n\t */\n\tprivate _setupResizerCreator(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\teditingView.addObserver( ImageLoadObserver );\n\n\t\tthis.listenTo<ImageLoadedEvent>( editingView.document, 'imageLoaded', ( evt, domEvent ) => {\n\t\t\t// The resizer must be attached only to images loaded by the `ImageInsert`, `ImageUpload` or `LinkImage` plugins.\n\t\t\tif ( !( domEvent.target as HTMLElement ).matches( RESIZABLE_IMAGES_CSS_SELECTOR ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst domConverter = editor.editing.view.domConverter;\n\t\t\tconst imageView = domConverter.domToView( domEvent.target as HTMLElement ) as ViewElement;\n\t\t\tconst widgetView = imageUtils.getImageWidgetFromImageView( imageView )!;\n\t\t\tlet resizer = this.editor.plugins.get( WidgetResize ).getResizerByViewElement( widgetView );\n\n\t\t\tif ( resizer ) {\n\t\t\t\t// There are rare cases when the image will be triggered multiple times for the same widget, e.g. when\n\t\t\t\t// the image's source was changed after upload (https://github.com/ckeditor/ckeditor5/pull/8108#issuecomment-708302992).\n\t\t\t\tresizer.redraw();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst mapper = editor.editing.mapper;\n\t\t\tconst imageModel = mapper.toModelElement( widgetView )!;\n\n\t\t\tresizer = editor.plugins\n\t\t\t\t.get( WidgetResize )\n\t\t\t\t.attachTo( {\n\t\t\t\t\tunit: editor.config.get( 'image.resizeUnit' )!,\n\n\t\t\t\t\tmodelElement: imageModel,\n\t\t\t\t\tviewElement: widgetView,\n\t\t\t\t\teditor,\n\n\t\t\t\t\tgetHandleHost( domWidgetElement ) {\n\t\t\t\t\t\treturn domWidgetElement.querySelector( 'img' )!;\n\t\t\t\t\t},\n\t\t\t\t\tgetResizeHost() {\n\t\t\t\t\t\treturn domConverter.mapViewToDom( mapper.toViewElement( imageModel as ModelElement )! ) as HTMLElement;\n\t\t\t\t\t},\n\n\t\t\t\t\tisCentered() {\n\t\t\t\t\t\tconst imageStyle = imageModel.getAttribute( 'imageStyle' );\n\n\t\t\t\t\t\treturn imageStyle == 'alignCenter';\n\t\t\t\t\t},\n\n\t\t\t\t\tonCommit( newValue ) {\n\t\t\t\t\t\t// Get rid of the CSS class in case the command execution that follows is unsuccessful\n\t\t\t\t\t\t// (e.g. Track Changes can override it and the new dimensions will not apply). Otherwise,\n\t\t\t\t\t\t// the presence of the class and the absence of the width style will cause it to take 100%\n\t\t\t\t\t\t// of the horizontal space.\n\t\t\t\t\t\teditingView.change( writer => {\n\t\t\t\t\t\t\twriter.removeClass( RESIZED_IMAGE_CLASS, widgetView );\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\teditor.execute( 'resizeImage', { width: newValue } );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\tresizer.on( 'updateSize', () => {\n\t\t\t\tif ( !widgetView.hasClass( RESIZED_IMAGE_CLASS ) ) {\n\t\t\t\t\teditingView.change( writer => {\n\t\t\t\t\t\twriter.addClass( RESIZED_IMAGE_CLASS, widgetView );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tconst target = imageModel.name === 'imageInline' ? imageView : widgetView;\n\n\t\t\t\tif ( target.getStyle( 'height' ) ) {\n\t\t\t\t\teditingView.change( writer => {\n\t\t\t\t\t\twriter.removeStyle( 'height', target );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tresizer.bind( 'isEnabled' ).to( this );\n\t\t} );\n\t}\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/**\n * @module image/imageresize/utils/getselectedimageeditornodes\n */\n\nimport type { ViewElement, ModelElement } from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\n/**\n * Finds model, view and DOM element for selected image element. Returns `null` if there is no image selected.\n *\n * @param editor Editor instance.\n * @internal\n */\nexport function getSelectedImageEditorNodes( editor: Editor ): ImageEditorNodes | null {\n\tconst { editing } = editor;\n\n\tconst imageUtils = editor.plugins.get( 'ImageUtils' );\n\tconst imageModelElement = imageUtils.getClosestSelectedImageElement( editor.model.document.selection );\n\n\tif ( !imageModelElement ) {\n\t\treturn null;\n\t}\n\n\tconst imageViewElement = editing.mapper.toViewElement( imageModelElement )!;\n\tconst imageDOMElement = editing.view.domConverter.mapViewToDom( imageViewElement )!;\n\n\treturn {\n\t\tmodel: imageModelElement,\n\t\tview: imageViewElement,\n\t\tdom: imageDOMElement\n\t};\n}\n\n/**\n * @internal;\n */\ntype ImageEditorNodes = {\n\tmodel: ModelElement;\n\tview: ViewElement;\n\tdom: HTMLElement;\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/**\n * @module image/imageresize/utils/getselectedimagewidthinunits\n */\n\nimport { Rect, _tryCastDimensionsToUnit, _tryParseDimensionWithUnit, type _DimensionWithUnit } from '@ckeditor/ckeditor5-utils';\n\nimport { calculateResizeHostAncestorWidth } from '@ckeditor/ckeditor5-widget';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { getSelectedImageEditorNodes } from './getselectedimageeditornodes.js';\n\n/**\n * Returns image width in specified units. It is width of image after resize.\n *\n * \t* If image is not selected or command is disabled then `null` will be returned.\n * \t* If image is not fully loaded (and it is impossible to determine its natural size) then `null` will be returned.\n *\t* If `targetUnit` percentage is passed then it will return width percentage of image related to its accessors.\n *\n * @param editor Editor instance.\n * @param targetUnit Unit in which dimension will be returned.\n * @returns Parsed image width after resize (with unit).\n * @internal\n */\nexport function getSelectedImageWidthInUnits( editor: Editor, targetUnit: string ): _DimensionWithUnit | null {\n\tconst imageNodes = getSelectedImageEditorNodes( editor );\n\n\tif ( !imageNodes ) {\n\t\treturn null;\n\t}\n\n\tconst parsedResizedWidth = _tryParseDimensionWithUnit(\n\t\timageNodes.model.getAttribute( 'resizedWidth' ) as string || null\n\t);\n\n\tif ( !parsedResizedWidth ) {\n\t\treturn null;\n\t}\n\n\tif ( parsedResizedWidth.unit === targetUnit ) {\n\t\treturn parsedResizedWidth;\n\t}\n\n\tconst imageParentWidthPx = calculateResizeHostAncestorWidth( imageNodes.dom );\n\tconst imageHolderDimension = {\n\t\tunit: 'px',\n\t\tvalue: new Rect( imageNodes.dom ).width\n\t};\n\n\treturn _tryCastDimensionsToUnit( imageParentWidthPx, imageHolderDimension, targetUnit );\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/**\n * @module image/imageresize/ui/imagecustomresizeformview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tFormHeaderView,\n\tFormRowView,\n\tLabeledFieldView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputNumber,\n\tsubmitHandler,\n\ttype FocusableView,\n\ttype InputNumberView\n} from '@ckeditor/ckeditor5-ui';\n\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\nimport { IconPreviousArrow } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The ImageCustomResizeFormView class.\n *\n * @internal\n */\nexport class ImageCustomResizeFormView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Resize unit shortcut.\n\t */\n\tpublic readonly unit: string;\n\n\t/**\n\t * The Back button view displayed in the header.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * A button used to submit the form.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * An input with a label.\n\t */\n\tpublic labeledInput: LabeledFieldView<InputNumberView>;\n\n\t/**\n\t * A collection of child views.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A collection of views which can be focused in the form.\n\t */\n\tprotected readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprotected readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * An array of form validators used by {@link #isValid}.\n\t */\n\tprivate readonly _validators: Array<ImageCustomResizeFormValidatorCallback>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, unit: string, validators: Array<ImageCustomResizeFormValidatorCallback> ) {\n\t\tsuper( locale );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.unit = unit;\n\n\t\t// Create buttons.\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\n\t\t// Create input fields.\n\t\tthis.labeledInput = this._createLabeledInputView();\n\n\t\tthis.children = this.createCollection( [ this._createHeaderView() ] );\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\tthis.labeledInput,\n\t\t\t\tthis.saveButtonView\n\t\t\t],\n\t\t\tclass: [\n\t\t\t\t'ck-form__row_with-submit',\n\t\t\t\t'ck-form__row_large-top-padding'\n\t\t\t]\n\t\t} ) );\n\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._validators = validators;\n\n\t\t// Close the panel on esc key press when the **form has focus**.\n\t\tthis.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis.fire<ImageCustomResizeFormViewCancelEvent>( 'cancel' );\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form',\n\t\t\t\t\t'ck-image-custom-resize-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-image/issues/40\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.backButtonView,\n\t\t\tthis.labeledInput,\n\t\t\tthis.saveButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Creates a back button view that cancels the form.\n\t */\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn backButton;\n\t}\n\n\t/**\n\t * Creates a save button view that resize the image.\n\t */\n\tprivate _createSaveButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst saveButton = new ButtonView( this.locale );\n\n\t\tsaveButton.set( {\n\t\t\tlabel: t( 'Save' ),\n\t\t\twithText: true,\n\t\t\ttype: 'submit',\n\t\t\tclass: 'ck-button-action ck-button-bold'\n\t\t} );\n\n\t\treturn saveButton;\n\t}\n\n\t/**\n\t * Creates a header view for the form.\n\t */\n\tprivate _createHeaderView(): FormHeaderView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst header = new FormHeaderView( this.locale, {\n\t\t\tlabel: t( 'Image Resize' )\n\t\t} );\n\n\t\theader.children.add( this.backButtonView, 0 );\n\n\t\treturn header;\n\t}\n\n\t/**\n\t * Creates an input with a label.\n\t *\n\t * @returns Labeled field view instance.\n\t */\n\tprivate _createLabeledInputView(): LabeledFieldView<InputNumberView> {\n\t\tconst t = this.locale!.t;\n\t\tconst labeledInput = new LabeledFieldView<InputNumberView>( this.locale, createLabeledInputNumber );\n\n\t\tlabeledInput.label = t( 'Resize image (in %0)', this.unit );\n\t\tlabeledInput.class = 'ck-labeled-field-view_full-width';\n\t\tlabeledInput.fieldView.set( {\n\t\t\tstep: 0.1\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\t// One error per field is enough.\n\t\t\tif ( errorText ) {\n\t\t\t\t// Apply updated error.\n\t\t\t\tthis.labeledInput.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of the {@link #labeledInput}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tpublic resetFormStatus(): void {\n\t\tthis.labeledInput.errorText = null;\n\t}\n\n\t/**\n\t * The native DOM `value` of the input element of {@link #labeledInput}.\n\t */\n\tpublic get rawSize(): string | null {\n\t\tconst { element } = this.labeledInput.fieldView;\n\n\t\tif ( !element ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn element.value;\n\t}\n\n\t/**\n\t * Get numeric value of size. Returns `null` if value of size input element in {@link #labeledInput}.is not a number.\n\t */\n\tpublic get parsedSize(): number | null {\n\t\tconst { rawSize } = this;\n\n\t\tif ( rawSize === null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst parsed = Number.parseFloat( rawSize );\n\n\t\tif ( Number.isNaN( parsed ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn parsed;\n\t}\n\n\t/**\n\t * Returns serialized image input size with unit.\n\t * Returns `null` if value of size input element in {@link #labeledInput}.is not a number.\n\t */\n\tpublic get sizeWithUnits(): string | null {\n\t\tconst { parsedSize, unit } = this;\n\n\t\tif ( parsedSize === null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn `${ parsedSize }${ unit }`;\n\t}\n}\n\n/**\n * Callback used by {@link ~ImageCustomResizeFormView} to check if passed form value is valid.\n *\n * \t* If `undefined` is returned, it is assumed that the form value is correct and there is no error.\n * \t* If string is returned, it is assumed that the form value is incorrect and the returned string is displayed in the error label\n *\n * @internal\n */\nexport type ImageCustomResizeFormValidatorCallback = ( form: ImageCustomResizeFormView ) => string | undefined;\n\n/**\n * Fired when the form view is submitted.\n *\n * @eventName ~ImageCustomResizeFormView#submit\n */\nexport type ImageCustomResizeFormViewSubmitEvent = {\n\tname: 'submit';\n\targs: [];\n};\n\n/**\n * Fired when the form view is canceled.\n *\n * @eventName ~ImageCustomResizeFormView#cancel\n */\nexport type ImageCustomResizeFormViewCancelEvent = {\n\tname: 'cancel';\n\targs: [];\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/**\n * @module image/imageresize/utils/getselectedimagepossibleresizerange\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { calculateResizeHostAncestorWidth } from '@ckeditor/ckeditor5-widget';\nimport { getSelectedImageEditorNodes } from './getselectedimageeditornodes.js';\nimport { _tryCastDimensionsToUnit, _tryParseDimensionWithUnit } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Returns min and max value of resize image in specified unit.\n *\n * @param editor Editor instance.\n * @param targetUnit Unit in which dimension will be returned.\n * @returns Possible resize range in numeric form.\n * @internal\n */\nexport function getSelectedImagePossibleResizeRange( editor: Editor, targetUnit: string ): PossibleResizeImageRange | null {\n\tconst imageNodes = getSelectedImageEditorNodes( editor );\n\n\tif ( !imageNodes ) {\n\t\treturn null;\n\t}\n\n\tconst imageParentWidthPx = calculateResizeHostAncestorWidth( imageNodes.dom );\n\tconst minimumImageWidth = _tryParseDimensionWithUnit( window.getComputedStyle( imageNodes.dom ).minWidth ) || {\n\t\tvalue: 1,\n\t\tunit: 'px'\n\t};\n\n\tconst lower = Math.max( 0.1, _tryCastDimensionsToUnit( imageParentWidthPx, minimumImageWidth, targetUnit ).value );\n\tconst upper = targetUnit === 'px' ? imageParentWidthPx : 100;\n\n\treturn {\n\t\tunit: targetUnit,\n\t\tlower,\n\t\tupper\n\t};\n}\n\n/**\n * @internal\n */\nexport type PossibleResizeImageRange = {\n\tunit: string;\n\tlower: number;\n\tupper: number;\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/**\n * @module image/imageresize/imagecustomresizeui\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tContextualBalloon,\n\tclickOutsideHandler,\n\tCssTransitionDisablerMixin,\n\ttype ViewWithCssTransitionDisabler\n} from '@ckeditor/ckeditor5-ui';\n\nimport { getBalloonPositionData } from '../image/ui/utils.js';\nimport { getSelectedImageWidthInUnits } from './utils/getselectedimagewidthinunits.js';\n\nimport {\n\tImageCustomResizeFormView,\n\ttype ImageCustomResizeFormValidatorCallback,\n\ttype ImageCustomResizeFormViewCancelEvent,\n\ttype ImageCustomResizeFormViewSubmitEvent\n} from './ui/imagecustomresizeformview.js';\nimport { getSelectedImagePossibleResizeRange } from './utils/getselectedimagepossibleresizerange.js';\n\n/**\n * The custom resize image UI plugin.\n *\n * The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n */\nexport class ImageCustomResizeUI extends Plugin {\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon?: ContextualBalloon;\n\n\t/**\n\t * A form containing a textarea and buttons, used to change the `alt` text value.\n\t */\n\tprivate _form?: ImageCustomResizeFormView & ViewWithCssTransitionDisabler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageCustomResizeUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see https://github.com/ckeditor/ckeditor5/issues/1341).\n\t\tif ( this._form ) {\n\t\t\tthis._form.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the {@link module:image/imageresize/ui/imagecustomresizeformview~ImageCustomResizeFormView}\n\t * form.\n\t */\n\tprivate _createForm( unit: string ): void {\n\t\tconst editor = this.editor;\n\n\t\tthis._balloon = this.editor.plugins.get( 'ContextualBalloon' );\n\n\t\tthis._form = new ( CssTransitionDisablerMixin( ImageCustomResizeFormView ) )( editor.locale, unit, getFormValidators( editor ) );\n\n\t\t// Render the form so its #element is available for clickOutsideHandler.\n\t\tthis._form.render();\n\n\t\tthis.listenTo<ImageCustomResizeFormViewSubmitEvent>( this._form, 'submit', () => {\n\t\t\tif ( this._form!.isValid() ) {\n\t\t\t\teditor.execute( 'resizeImage', {\n\t\t\t\t\twidth: this._form!.sizeWithUnits\n\t\t\t\t} );\n\n\t\t\t\tthis._hideForm( true );\n\t\t\t}\n\t\t} );\n\n\t\t// Update balloon position when form error label is added .\n\t\tthis.listenTo( this._form.labeledInput, 'change:errorText', () => {\n\t\t\teditor.ui.update();\n\t\t} );\n\n\t\tthis.listenTo<ImageCustomResizeFormViewCancelEvent>( this._form, 'cancel', () => {\n\t\t\tthis._hideForm( true );\n\t\t} );\n\n\t\t// Close on click outside of balloon panel element.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this._form,\n\t\t\tactivator: () => this._isVisible,\n\t\t\tcontextElements: () => [ this._balloon!.view.element! ],\n\t\t\tcallback: () => this._hideForm()\n\t\t} );\n\t}\n\n\t/**\n\t * Shows the {@link #_form} in the {@link #_balloon}.\n\t *\n\t * @internal\n\t */\n\tpublic _showForm( unit: string ): void {\n\t\tif ( this._isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._form ) {\n\t\t\tthis._createForm( unit );\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst labeledInput = this._form!.labeledInput;\n\n\t\tthis._form!.disableCssTransitions();\n\t\tthis._form!.resetFormStatus();\n\n\t\tif ( !this._isInBalloon ) {\n\t\t\tthis._balloon!.add( {\n\t\t\t\tview: this._form!,\n\t\t\t\tposition: getBalloonPositionData( editor )\n\t\t\t} );\n\t\t}\n\n\t\t// Make sure that each time the panel shows up, the field remains in sync with the value of\n\t\t// the command. If the user typed in the input, then canceled the balloon (`labeledInput#value`\n\t\t// stays unaltered) and re-opened it without changing the value of the command, they would see the\n\t\t// old value instead of the actual value of the command.\n\t\tconst currentParsedWidth = getSelectedImageWidthInUnits( editor, unit );\n\t\tconst initialInputValue = currentParsedWidth ? currentParsedWidth.value.toFixed( 1 ) : '';\n\t\tconst possibleRange = getSelectedImagePossibleResizeRange( editor, unit );\n\n\t\tlabeledInput.fieldView.value = labeledInput.fieldView.element!.value = initialInputValue;\n\n\t\tif ( possibleRange ) {\n\t\t\tObject.assign( labeledInput.fieldView, {\n\t\t\t\tmin: possibleRange.lower.toFixed( 1 ),\n\t\t\t\tmax: Math.ceil( possibleRange.upper ).toFixed( 1 )\n\t\t\t} );\n\t\t}\n\n\t\tthis._form!.labeledInput.fieldView.select();\n\t\tthis._form!.enableCssTransitions();\n\t}\n\n\t/**\n\t * Removes the {@link #_form} from the {@link #_balloon}.\n\t *\n\t * @param focusEditable Controls whether the editing view is focused afterwards.\n\t */\n\tprivate _hideForm( focusEditable: boolean = false ): void {\n\t\tif ( !this._isInBalloon ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Blur the input element before removing it from DOM to prevent issues in some browsers.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1501.\n\t\tif ( this._form!.focusTracker.isFocused ) {\n\t\t\tthis._form!.saveButtonView.focus();\n\t\t}\n\n\t\tthis._balloon!.remove( this._form! );\n\n\t\tif ( focusEditable ) {\n\t\t\tthis.editor.editing.view.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t */\n\tprivate get _isVisible(): boolean {\n\t\treturn !!this._balloon && this._balloon.visibleView === this._form;\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t */\n\tprivate get _isInBalloon(): boolean {\n\t\treturn !!this._balloon && this._balloon.hasView( this._form! );\n\t}\n}\n\n/**\n * Returns image resize form validation callbacks.\n *\n * @param editor Editor instance.\n */\nfunction getFormValidators( editor: Editor ): Array<ImageCustomResizeFormValidatorCallback> {\n\tconst t = editor.t;\n\n\treturn [\n\t\tform => {\n\t\t\tif ( form.rawSize!.trim() === '' ) {\n\t\t\t\treturn t( 'The value must not be empty.' );\n\t\t\t}\n\n\t\t\tif ( form.parsedSize === null ) {\n\t\t\t\treturn t( 'The value should be a plain number.' );\n\t\t\t}\n\t\t}\n\t];\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/**\n * @module image/imageresize\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageResizeButtons } from './imageresize/imageresizebuttons.js';\nimport { ImageResizeEditing } from './imageresize/imageresizeediting.js';\nimport { ImageResizeHandles } from './imageresize/imageresizehandles.js';\nimport { ImageCustomResizeUI } from './imageresize/imagecustomresizeui.js';\n\n/**\n * The image resize plugin.\n *\n * It adds a possibility to resize each image using handles.\n */\nexport class ImageResize extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[\n\t\tImageResizeEditing,\n\t\tImageResizeHandles,\n\t\tImageCustomResizeUI,\n\t\tImageResizeButtons\n\t]> {\n\t\treturn [\n\t\t\tImageResizeEditing,\n\t\t\tImageResizeHandles,\n\t\t\tImageCustomResizeUI,\n\t\t\tImageResizeButtons\n\t\t];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageResize' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module image/imagestyle/imagestylecommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ImageStyleOptionDefinition } from '../imageconfig.js';\nimport { type ImageUtils } from '../imageutils.js';\n\n/**\n * The image style command. It is used to apply {@link module:image/imageconfig~ImageStyleConfig#options image style option}\n * to a selected image.\n *\n * **Note**: Executing this command may change the image model element if the desired style requires an image of a different\n * type. See {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute} to learn more.\n */\nexport class ImageStyleCommand extends Command {\n\t/**\n\t * An object containing names of default style options for the inline and block images.\n\t * If there is no default style option for the given image type in the configuration,\n\t * the name will be `false`.\n\t */\n\tprivate _defaultStyles: Record<string, string | false>;\n\n\t/**\n\t * The styles handled by this command.\n\t */\n\tprivate _styles: Map<string, ImageStyleOptionDefinition>;\n\n\t/**\n\t * Creates an instance of the image style command. When executed, the command applies one of\n\t * {@link module:image/imageconfig~ImageStyleConfig#options style options} to the currently selected image.\n\t *\n\t * @param editor The editor instance.\n\t * @param styles The style options that this command supports.\n\t */\n\tconstructor( editor: Editor, styles: Array<ImageStyleOptionDefinition> ) {\n\t\tsuper( editor );\n\n\t\tthis._defaultStyles = {\n\t\t\timageBlock: false,\n\t\t\timageInline: false\n\t\t};\n\n\t\tthis._styles = new Map( styles.map( style => {\n\t\t\tif ( style.isDefault ) {\n\t\t\t\tfor ( const modelElementName of style.modelElements ) {\n\t\t\t\t\tthis._defaultStyles[ modelElementName ] = style.name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn [ style.name, style ];\n\t\t} ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst element = imageUtils.getClosestSelectedImageElement( this.editor.model.document.selection )!;\n\n\t\tthis.isEnabled = !!element;\n\n\t\tif ( !this.isEnabled ) {\n\t\t\tthis.value = false;\n\t\t} else if ( element.hasAttribute( 'imageStyle' ) ) {\n\t\t\tthis.value = element.getAttribute( 'imageStyle' );\n\t\t} else {\n\t\t\tthis.value = this._defaultStyles[ element.name ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether the style with the given name can be applied to the currently selected image.\n\t *\n\t * Applying a style may internally trigger a type conversion (block ↔ inline) when the style\n\t * supports only the opposite type. If that conversion would be rejected by the schema (for\n\t * example, converting an inline image to a block image inside `$inlineRoot`), this style\n\t * cannot be applied even though the command itself is enabled. UI components representing\n\t * individual styles should reflect this per-style state in their `isEnabled`.\n\t */\n\tpublic isStyleEnabled( styleName: string ): boolean {\n\t\tif ( !this.isEnabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\t\tconst element = imageUtils.getClosestSelectedImageElement( this.editor.model.document.selection );\n\n\t\tif ( !element || !this._styles.has( styleName ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !this.shouldConvertImageType( styleName, element ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Applying this style requires a type conversion. The corresponding type command must be enabled\n\t\t// for the conversion to succeed.\n\t\tconst typeCommandName = imageUtils.isBlockImage( element ) ? 'imageTypeInline' : 'imageTypeBlock';\n\t\tconst typeCommand = this.editor.commands.get( typeCommandName );\n\n\t\treturn !!typeCommand && typeCommand.isEnabled;\n\t}\n\n\t/**\n\t * Executes the command and applies the style to the currently selected image:\n\t *\n\t * ```ts\n\t * editor.execute( 'imageStyle', { value: 'side' } );\n\t * ```\n\t *\n\t * **Note**: Executing this command may change the image model element if the desired style requires an image\n\t * of a different type. Learn more about {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements model element}\n\t * configuration for the style option.\n\t *\n\t * @param options.value The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).\n\t * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t * The default is `true`.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { value?: string; setImageSizes?: boolean } = {} ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\t// If the requested style requires a type conversion that the schema does not allow,\n\t\t// skip execution entirely to avoid leaving the image with a style its current type does not support.\n\t\tif ( options.value && !this.isStyleEnabled( options.value ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst requestedStyle = options.value;\n\t\t\tconst { setImageSizes = true } = options;\n\n\t\t\tlet imageElement = imageUtils.getClosestSelectedImageElement( model.document.selection )!;\n\n\t\t\t// Change the image type if a style requires it.\n\t\t\tif ( requestedStyle && this.shouldConvertImageType( requestedStyle, imageElement ) ) {\n\t\t\t\tthis.editor.execute( imageUtils.isBlockImage( imageElement ) ? 'imageTypeInline' : 'imageTypeBlock', { setImageSizes } );\n\n\t\t\t\t// Update the imageElement to the newly created image.\n\t\t\t\timageElement = imageUtils.getClosestSelectedImageElement( model.document.selection )!;\n\t\t\t}\n\n\t\t\t// Default style means that there is no `imageStyle` attribute in the model.\n\t\t\t// https://github.com/ckeditor/ckeditor5-image/issues/147\n\t\t\tif ( !requestedStyle || this._styles.get( requestedStyle )!.isDefault ) {\n\t\t\t\twriter.removeAttribute( 'imageStyle', imageElement );\n\t\t\t} else {\n\t\t\t\twriter.setAttribute( 'imageStyle', requestedStyle, imageElement );\n\t\t\t}\n\n\t\t\tif ( setImageSizes ) {\n\t\t\t\timageUtils.setImageNaturalSizeAttributes( imageElement );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns `true` if requested style change would trigger the image type change.\n\t *\n\t * @param requestedStyle The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).\n\t * @param imageElement The image model element.\n\t */\n\tpublic shouldConvertImageType( requestedStyle: string, imageElement: ModelElement ): boolean {\n\t\tconst supportedTypes = this._styles.get( requestedStyle )!.modelElements;\n\n\t\treturn !supportedTypes.includes( imageElement.name );\n\t}\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/**\n * @module image/imagestyle/utils\n */\n\nimport { logWarning } from '@ckeditor/ckeditor5-utils';\nimport {\n\tIconObjectCenter,\n\tIconObjectFullWidth,\n\tIconObjectInline,\n\tIconObjectInlineLeft,\n\tIconObjectInlineRight,\n\tIconObjectLeft,\n\tIconObjectRight\n} from '@ckeditor/ckeditor5-icons';\nimport type { Editor, PluginCollection } from '@ckeditor/ckeditor5-core';\nimport type { ImageStyleConfig, ImageStyleDropdownDefinition, ImageStyleOptionDefinition } from '../imageconfig.js';\n\n/**\n * Default image style options provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}\n * configuration.\n *\n * There are available 5 styles focused on formatting:\n *\n * * **`'alignLeft'`** aligns the inline or block image to the left and wraps it with the text using the `image-style-align-left` class,\n * * **`'alignRight'`** aligns the inline or block image to the right and wraps it with the text using the `image-style-align-right` class,\n * * **`'alignCenter'`** centers the block image using the `image-style-align-center` class,\n * * **`'alignBlockLeft'`** aligns the block image to the left using the `image-style-block-align-left` class,\n * * **`'alignBlockRight'`** aligns the block image to the right using the `image-style-block-align-right` class,\n *\n * and 3 semantic styles:\n *\n * * **`'inline'`** is an inline image without any CSS class,\n * * **`'block'`** is a block image without any CSS class,\n * * **`'side'`** is a block image styled with the `image-style-side` CSS class.\n *\n * @internal\n */\nexport const DEFAULT_OPTIONS: Record<string, ImageStyleOptionDefinition> = {\n\t// This style represents an image placed in the line of text.\n\tget inline() {\n\t\treturn {\n\t\t\tname: 'inline',\n\t\t\ttitle: 'In line',\n\t\t\ticon: IconObjectInline,\n\t\t\tmodelElements: [ 'imageInline' ],\n\t\t\tisDefault: true\n\t\t};\n\t},\n\n\t// This style represents an image aligned to the left and wrapped with text.\n\tget alignLeft() {\n\t\treturn {\n\t\t\tname: 'alignLeft',\n\t\t\ttitle: 'Left aligned image',\n\t\t\ticon: IconObjectInlineLeft,\n\t\t\tmodelElements: [ 'imageBlock', 'imageInline' ],\n\t\t\tclassName: 'image-style-align-left'\n\t\t};\n\t},\n\n\t// This style represents an image aligned to the left.\n\tget alignBlockLeft() {\n\t\treturn {\n\t\t\tname: 'alignBlockLeft',\n\t\t\ttitle: 'Left aligned image',\n\t\t\ticon: IconObjectLeft,\n\t\t\tmodelElements: [ 'imageBlock' ],\n\t\t\tclassName: 'image-style-block-align-left'\n\t\t};\n\t},\n\n\t// This style represents a centered image.\n\tget alignCenter() {\n\t\treturn {\n\t\t\tname: 'alignCenter',\n\t\t\ttitle: 'Centered image',\n\t\t\ticon: IconObjectCenter,\n\t\t\tmodelElements: [ 'imageBlock' ],\n\t\t\tclassName: 'image-style-align-center'\n\t\t};\n\t},\n\n\t// This style represents an image aligned to the right and wrapped with text.\n\tget alignRight() {\n\t\treturn {\n\t\t\tname: 'alignRight',\n\t\t\ttitle: 'Right aligned image',\n\t\t\ticon: IconObjectInlineRight,\n\t\t\tmodelElements: [ 'imageBlock', 'imageInline' ],\n\t\t\tclassName: 'image-style-align-right'\n\t\t};\n\t},\n\n\t// This style represents an image aligned to the right.\n\tget alignBlockRight() {\n\t\treturn {\n\t\t\tname: 'alignBlockRight',\n\t\t\ttitle: 'Right aligned image',\n\t\t\ticon: IconObjectRight,\n\t\t\tmodelElements: [ 'imageBlock' ],\n\t\t\tclassName: 'image-style-block-align-right'\n\t\t};\n\t},\n\n\t// This option is equal to the situation when no style is applied.\n\tget block() {\n\t\treturn {\n\t\t\tname: 'block',\n\t\t\ttitle: 'Centered image',\n\t\t\ticon: IconObjectCenter,\n\t\t\tmodelElements: [ 'imageBlock' ],\n\t\t\tisDefault: true\n\t\t};\n\t},\n\n\t// This represents a side image.\n\tget side() {\n\t\treturn {\n\t\t\tname: 'side',\n\t\t\ttitle: 'Side image',\n\t\t\ticon: IconObjectInlineRight,\n\t\t\tmodelElements: [ 'imageBlock' ],\n\t\t\tclassName: 'image-style-side'\n\t\t};\n\t}\n};\n\n/**\n * Default image style icons provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}\n * configuration.\n *\n * See {@link module:image/imageconfig~ImageStyleOptionDefinition#icon} to learn more.\n *\n * There are 7 default icons available: `'full'`, `'left'`, `'inlineLeft'`, `'center'`, `'right'`, `'inlineRight'`, and `'inline'`.\n *\n * @internal\n */\nexport const DEFAULT_ICONS: Record<string, string> = /* #__PURE__ */ ( () => ( {\n\tfull: IconObjectFullWidth,\n\tleft: IconObjectLeft,\n\tright: IconObjectRight,\n\tcenter: IconObjectCenter,\n\tinlineLeft: IconObjectInlineLeft,\n\tinlineRight: IconObjectInlineRight,\n\tinline: IconObjectInline\n} ) )();\n\n/**\n * Default drop-downs provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#toolbar}\n * configuration. The drop-downs are containers for the {@link module:image/imageconfig~ImageStyleConfig#options image style options}.\n *\n * If both of the `ImageEditing` plugins are loaded, there are 2 predefined drop-downs available:\n *\n * * **`'imageStyle:wrapText'`**, which contains the `alignLeft` and `alignRight` options, that is,\n * those that wraps the text around the image,\n * * **`'imageStyle:breakText'`**, which contains the `alignBlockLeft`, `alignCenter` and `alignBlockRight` options, that is,\n * those that breaks the text around the image.\n *\n * @internal\n */\nexport const DEFAULT_DROPDOWN_DEFINITIONS: Array<ImageStyleDropdownDefinition> = [ {\n\tname: 'imageStyle:wrapText',\n\ttitle: 'Wrap text',\n\tdefaultItem: 'imageStyle:alignLeft',\n\titems: [ 'imageStyle:alignLeft', 'imageStyle:alignRight' ]\n}, {\n\tname: 'imageStyle:breakText',\n\ttitle: 'Break text',\n\tdefaultItem: 'imageStyle:block',\n\titems: [ 'imageStyle:alignBlockLeft', 'imageStyle:block', 'imageStyle:alignBlockRight' ]\n} ];\n\n/**\n * Returns the style with a given `name` from an array of styles.\n *\n * @internal\n */\nexport function getStyleDefinitionByName(\n\tname: string,\n\tstyles: Array<ImageStyleOptionDefinition>\n): ImageStyleOptionDefinition | undefined {\n\tfor ( const style of styles ) {\n\t\tif ( style.name === name ) {\n\t\t\treturn style;\n\t\t}\n\t}\n}\n\n/**\n * Returns a list of the normalized and validated image style options.\n *\n * @param config\n * @param config.isInlinePluginLoaded\n * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.\n * @param config.isBlockPluginLoaded\n * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.\n * @param config.configuredStyles\n * The image styles configuration provided in the image styles {@link module:image/imageconfig~ImageConfig#styles configuration}\n * as a default or custom value.\n * @returns\n * * Each of options contains a complete icon markup.\n * * The image style options not supported by any of the loaded plugins are filtered out.\n */\nfunction normalizeStyles( config: {\n\tisInlinePluginLoaded: boolean;\n\tisBlockPluginLoaded: boolean;\n\tconfiguredStyles: ImageStyleConfig;\n}\n): Array<ImageStyleOptionDefinition> {\n\tconst configuredStyles = config.configuredStyles.options || [];\n\n\tconst styles = configuredStyles\n\t\t.map( arrangement => normalizeDefinition( arrangement ) )\n\t\t.filter( arrangement => isValidOption( arrangement, config ) );\n\n\treturn styles;\n}\n\n/**\n * Returns the default image styles configuration depending on the loaded image editing plugins.\n *\n * @param isInlinePluginLoaded\n * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.\n *\n * @param isBlockPluginLoaded\n * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.\n *\n * @returns\n * It returns an object with the lists of the image style options and groups defined as strings related to the\n * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default options}\n */\nfunction getDefaultStylesConfiguration( isBlockPluginLoaded: boolean, isInlinePluginLoaded: boolean ): ImageStyleConfig {\n\tif ( isBlockPluginLoaded && isInlinePluginLoaded ) {\n\t\treturn {\n\t\t\toptions: [\n\t\t\t\t'inline', 'alignLeft', 'alignRight',\n\t\t\t\t'alignCenter', 'alignBlockLeft', 'alignBlockRight',\n\t\t\t\t'block', 'side'\n\t\t\t]\n\t\t};\n\t} else if ( isBlockPluginLoaded ) {\n\t\treturn {\n\t\t\toptions: [ 'block', 'side' ]\n\t\t};\n\t} else if ( isInlinePluginLoaded ) {\n\t\treturn {\n\t\t\toptions: [ 'inline', 'alignLeft', 'alignRight' ]\n\t\t};\n\t}\n\n\treturn {};\n}\n\n/**\n * Returns a list of the available predefined drop-downs' definitions depending on the loaded image editing plugins.\n */\nfunction getDefaultDropdownDefinitions( pluginCollection: PluginCollection<Editor> ): Array<ImageStyleDropdownDefinition> {\n\tif ( pluginCollection.has( 'ImageBlockEditing' ) && pluginCollection.has( 'ImageInlineEditing' ) ) {\n\t\treturn [ ...DEFAULT_DROPDOWN_DEFINITIONS ];\n\t} else {\n\t\treturn [];\n\t}\n}\n\n/**\n * Normalizes an image style option or group provided in the {@link module:image/imageconfig~ImageConfig#styles}\n * and returns it in a {@link module:image/imageconfig~ImageStyleOptionDefinition}/\n */\nfunction normalizeDefinition( definition: string | Partial<ImageStyleOptionDefinition> & { name: string } ): ImageStyleOptionDefinition {\n\tif ( typeof definition === 'string' ) {\n\t\t// Just the name of the style has been passed, but none of the defaults.\n\t\tif ( !DEFAULT_OPTIONS[ definition ] ) {\n\t\t\t// Normalize the style anyway to prevent errors.\n\t\t\tdefinition = { name: definition };\n\t\t}\n\t\t// Just the name of the style has been passed and it's one of the defaults, just use it.\n\t\t// Clone the style to avoid overriding defaults.\n\t\telse {\n\t\t\tdefinition = { ...DEFAULT_OPTIONS[ definition ] };\n\t\t}\n\t} else {\n\t\t// If an object style has been passed and if the name matches one of the defaults,\n\t\t// extend it with defaults – the user wants to customize a default style.\n\t\t// Note: Don't override the user–defined style object, clone it instead.\n\t\tdefinition = extendStyle( DEFAULT_OPTIONS[ definition.name ], definition );\n\t}\n\n\t// If an icon is defined as a string and correspond with a name\n\t// in default icons, use the default icon provided by the plugin.\n\tif ( typeof definition.icon === 'string' ) {\n\t\tdefinition.icon = DEFAULT_ICONS[ definition.icon ] || definition.icon;\n\t}\n\n\treturn definition as ImageStyleOptionDefinition;\n}\n\n/**\n * Checks if the image style option is valid:\n * * if it has the modelElements fields defined and filled,\n * * if the defined modelElements are supported by any of the loaded image editing plugins.\n * It also displays a console warning these conditions are not met.\n *\n * @param option image style option\n */\nfunction isValidOption(\n\toption: ImageStyleOptionDefinition,\n\t{ isBlockPluginLoaded, isInlinePluginLoaded }: { isBlockPluginLoaded: boolean; isInlinePluginLoaded: boolean }\n): boolean {\n\tconst { modelElements, name } = option;\n\n\tif ( !modelElements || !modelElements.length || !name ) {\n\t\twarnInvalidStyle( { style: option } );\n\n\t\treturn false;\n\t} else {\n\t\tconst supportedElements = [ isBlockPluginLoaded ? 'imageBlock' : null, isInlinePluginLoaded ? 'imageInline' : null ];\n\n\t\t// Check if the option is supported by any of the loaded plugins.\n\t\tif ( !modelElements.some( elementName => supportedElements.includes( elementName ) ) ) {\n\t\t\t/**\n\t\t\t * In order to work correctly, each image style {@link module:image/imageconfig~ImageStyleOptionDefinition option}\n\t\t\t * requires specific model elements (also: types of images) to be supported by the editor.\n\t\t\t *\n\t\t\t * Model element names to which the image style option can be applied are defined in the\n\t\t\t * {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements} property of the style option\n\t\t\t * definition.\n\t\t\t *\n\t\t\t * Explore the warning in the console to find out precisely which option is not supported and which editor plugins\n\t\t\t * are missing. Make sure these plugins are loaded in your editor to get this image style option working.\n\t\t\t *\n\t\t\t * @error image-style-missing-dependency\n\t\t\t * @param {string} style The name of the unsupported option.\n\t\t\t * @param {Array.<string>} missingPlugins The names of the plugins one of which has to be loaded for the particular option.\n\t\t\t */\n\t\t\tlogWarning( 'image-style-missing-dependency', {\n\t\t\t\tstyle: option,\n\t\t\t\tmissingPlugins: modelElements.map( name => name === 'imageBlock' ? 'ImageBlockEditing' : 'ImageInlineEditing' )\n\t\t\t} );\n\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Extends the default style with a style provided by the developer.\n * Note: Don't override the custom–defined style object, clone it instead.\n */\nfunction extendStyle( source: ImageStyleOptionDefinition, style: Partial<ImageStyleOptionDefinition> ): ImageStyleOptionDefinition {\n\tconst extendedStyle: Record<string, any> = { ...style };\n\n\tfor ( const prop in source ) {\n\t\tif ( !Object.prototype.hasOwnProperty.call( style, prop ) ) {\n\t\t\textendedStyle[ prop ] = source[ prop as keyof typeof source ];\n\t\t}\n\t}\n\n\treturn extendedStyle as ImageStyleOptionDefinition;\n}\n\n/**\n * Displays a console warning with the 'image-style-configuration-definition-invalid' error.\n */\nfunction warnInvalidStyle( info: object ): void {\n\t/**\n\t * The image style definition provided in the configuration is invalid.\n\t *\n\t * Please make sure the definition implements properly one of the following:\n\t *\n\t * * {@link module:image/imageconfig~ImageStyleOptionDefinition image style option definition},\n\t * * {@link module:image/imageconfig~ImageStyleDropdownDefinition image style dropdown definition}\n\t *\n\t * @error image-style-configuration-definition-invalid\n\t * @param {object} info The information about the invalid definition.\n\t */\n\tlogWarning( 'image-style-configuration-definition-invalid', info );\n}\n\n/**\n * @internal\n */\nexport const utils: {\n\tnormalizeStyles: typeof normalizeStyles;\n\tgetDefaultStylesConfiguration: typeof getDefaultStylesConfiguration;\n\tgetDefaultDropdownDefinitions: typeof getDefaultDropdownDefinitions;\n\twarnInvalidStyle: typeof warnInvalidStyle;\n} = {\n\tnormalizeStyles,\n\tgetDefaultStylesConfiguration,\n\tgetDefaultDropdownDefinitions,\n\twarnInvalidStyle\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/**\n * @module image/imagestyle/converters\n */\n\nimport { isEqual } from 'es-toolkit/compat';\nimport type {\n\tDowncastAttributeEvent,\n\tModelElement,\n\tModelItem,\n\tUpcastConversionApi,\n\tUpcastElementEvent,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\nimport { first, type GetCallback } from '@ckeditor/ckeditor5-utils';\nimport type { ImageStyleOptionDefinition } from '../imageconfig.js';\nimport { DEFAULT_OPTIONS, getStyleDefinitionByName } from './utils.js';\n\n/**\n * Returns a converter for the `imageStyle` attribute. It can be used for adding, changing and removing the attribute.\n *\n * @param styles An array containing available image style options.\n * @returns A model-to-view attribute converter.\n * @internal\n */\nexport function modelToViewStyleAttribute( styles: Array<ImageStyleOptionDefinition> ): GetCallback<DowncastAttributeEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if there is class name associated with given value.\n\t\tconst newStyle = getStyleDefinitionByName( data.attributeNewValue as string, styles );\n\t\tconst oldStyle = getStyleDefinitionByName( data.attributeOldValue as string, styles );\n\n\t\tconst viewElement = conversionApi.mapper.toViewElement( data.item as ModelElement )!;\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\tif ( oldStyle ) {\n\t\t\tviewWriter.removeClass( oldStyle.className!, viewElement );\n\t\t}\n\n\t\tif ( newStyle ) {\n\t\t\tviewWriter.addClass( newStyle.className!, viewElement );\n\t\t}\n\t};\n}\n\n/**\n * Returns a view-to-model converter converting image CSS classes to a proper value in the model.\n *\n * @param styles Image style options for which the converter is created.\n * @returns A view-to-model converter.\n * @internal\n */\nexport function viewToModelStyleAttribute( styles: Array<ImageStyleOptionDefinition> ): GetCallback<UpcastElementEvent> {\n\t// Convert only non–default styles.\n\tconst nonDefaultStyles: Record<string, Array<ImageStyleOptionDefinition>> = {\n\t\timageInline: styles.filter( style => !style.isDefault && style.modelElements.includes( 'imageInline' ) ),\n\t\timageBlock: styles.filter( style => !style.isDefault && style.modelElements.includes( 'imageBlock' ) )\n\t};\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !data.modelRange ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewElement = data.viewItem;\n\t\tconst modelImageElement = first( data.modelRange.getItems() );\n\n\t\t// Run this converter only if an image has been found in the model.\n\t\t// In some cases it may not be found (for example if we run this on a figure with different type than image).\n\t\tif ( !modelImageElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// ...and the `imageStyle` attribute is allowed for that element, otherwise stop conversion early.\n\t\tif ( !conversionApi.schema.checkAttribute( modelImageElement, 'imageStyle' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Convert styles one by one.\n\t\tfor ( const style of nonDefaultStyles[ ( modelImageElement as ModelElement ).name ] ) {\n\t\t\t// Try to consume class corresponding with the style.\n\t\t\tif ( conversionApi.consumable.consume( viewElement, { classes: style.className } ) ) {\n\t\t\t\t// And convert this style to model attribute.\n\t\t\t\tconversionApi.writer.setAttribute( 'imageStyle', style.name, modelImageElement );\n\t\t\t}\n\t\t}\n\n\t\t// Normalize float styles (alignLeft, alignRight).\n\t\tnormalizeFloatToDefinitionStyle( conversionApi, viewElement, modelImageElement, styles );\n\t};\n}\n\n/**\n * A helper function that attempts to convert the `float` CSS style into a corresponding `imageStyle` attribute.\n *\n * It maps `float: left` and `float: right` to standard alignment styles (e.g. `'alignLeft'`, `'alignRight'`),\n * but only if the target style definition matches one of the {@link module:image/image/utils~DEFAULT_OPTIONS default options}.\n */\nfunction normalizeFloatToDefinitionStyle(\n\tconversionApi: UpcastConversionApi,\n\tviewElement: ViewElement,\n\tmodelElement: ModelItem,\n\tstyles: Array<ImageStyleOptionDefinition>\n) {\n\tif ( !conversionApi.consumable.test( viewElement, { styles: [ 'float' ] } ) ) {\n\t\treturn;\n\t}\n\n\tlet floatStyleName: string | null = null;\n\n\tswitch ( viewElement.getStyle( 'float' ) ) {\n\t\tcase 'left':\n\t\t\tfloatStyleName = 'alignLeft';\n\t\t\tbreak;\n\n\t\tcase 'right':\n\t\t\tfloatStyleName = 'alignRight';\n\t\t\tbreak;\n\t}\n\n\tif ( !floatStyleName ) {\n\t\treturn;\n\t}\n\n\tconst definition = getStyleDefinitionByName( floatStyleName, styles );\n\n\tif ( !definition ) {\n\t\treturn;\n\t}\n\n\tconst builtinDefinition = DEFAULT_OPTIONS[ definition.name ];\n\n\tif ( !isEqual( definition, builtinDefinition ) ) {\n\t\treturn;\n\t}\n\n\tconversionApi.writer.setAttribute( 'imageStyle', floatStyleName, modelElement );\n\tconversionApi.consumable.consume( viewElement, { styles: [ 'float' ] } );\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/**\n * @module image/imagestyle/imagestyleediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { ModelBlockAlignmentAttributesMapping, ModelElement, UpcastElementEvent } from '@ckeditor/ckeditor5-engine';\n\nimport { ImageStyleCommand } from './imagestylecommand.js';\nimport { ImageUtils } from '../imageutils.js';\nimport { getStyleDefinitionByName, utils } from './utils.js';\nimport { viewToModelStyleAttribute, modelToViewStyleAttribute } from './converters.js';\nimport type { ImageStyleOptionDefinition } from '../imageconfig.js';\n\n/**\n * The image style engine plugin. It sets the default configuration, creates converters and registers\n * {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}.\n */\nexport class ImageStyleEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageStyleEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageUtils ]> {\n\t\treturn [ ImageUtils ];\n\t}\n\n\t/**\n\t * It contains a list of the normalized and validated style options.\n\t *\n\t * * Each option contains a complete icon markup.\n\t * * The style options not supported by any of the loaded image editing plugins (\n\t * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} or\n\t * {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`}) are filtered out.\n\t *\n\t * @internal\n\t * @readonly\n\t */\n\tpublic normalizedStyles?: Array<ImageStyleOptionDefinition>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst isBlockPluginLoaded = editor.plugins.has( 'ImageBlockEditing' );\n\t\tconst isInlinePluginLoaded = editor.plugins.has( 'ImageInlineEditing' );\n\n\t\teditor.config.define( 'image.styles', utils.getDefaultStylesConfiguration( isBlockPluginLoaded, isInlinePluginLoaded ) );\n\n\t\tthis.normalizedStyles = utils.normalizeStyles( {\n\t\t\tconfiguredStyles: editor.config.get( 'image.styles' )!,\n\t\t\tisBlockPluginLoaded,\n\t\t\tisInlinePluginLoaded\n\t\t} );\n\n\t\tthis._setupConversion( isBlockPluginLoaded, isInlinePluginLoaded );\n\t\tthis._setupPostFixer();\n\n\t\t// Register imageStyle command.\n\t\teditor.commands.add( 'imageStyle', new ImageStyleCommand( editor, this.normalizedStyles ) );\n\t}\n\n\t/**\n\t * Sets the editor conversion taking the presence of\n\t * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`}\n\t * and {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugins into consideration.\n\t */\n\tprivate _setupConversion( isBlockPluginLoaded: boolean, isInlinePluginLoaded: boolean ): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\tconst modelToViewConverter = modelToViewStyleAttribute( this.normalizedStyles! );\n\t\tconst viewToModelConverter = viewToModelStyleAttribute( this.normalizedStyles! );\n\n\t\teditor.editing.downcastDispatcher.on( 'attribute:imageStyle', modelToViewConverter );\n\t\teditor.data.downcastDispatcher.on( 'attribute:imageStyle', modelToViewConverter );\n\n\t\t// Allow imageStyle attribute in image and imageInline.\n\t\t// We could call it 'style' but https://github.com/ckeditor/ckeditor5-engine/issues/559.\n\t\tif ( isBlockPluginLoaded ) {\n\t\t\tschema.extend( 'imageBlock', { allowAttributes: 'imageStyle' } );\n\t\t\tschema.setAttributeProperties( 'imageStyle', {\n\t\t\t\tisFormatting: true,\n\t\t\t\tblockAlignment: getBlockAlignmentAttributeProperty( this.normalizedStyles! )\n\t\t\t} );\n\n\t\t\t// Converter for figure element from view to model.\n\t\t\teditor.data.upcastDispatcher.on<UpcastElementEvent>( 'element:figure', viewToModelConverter, { priority: 'low' } );\n\t\t}\n\n\t\tif ( isInlinePluginLoaded ) {\n\t\t\tschema.extend( 'imageInline', { allowAttributes: 'imageStyle' } );\n\t\t\tschema.setAttributeProperties( 'imageStyle', { isFormatting: true } );\n\n\t\t\t// Converter for the img element from view to model.\n\t\t\teditor.data.upcastDispatcher.on( 'element:img', viewToModelConverter, { priority: 'low' } );\n\t\t}\n\t}\n\n\t/**\n\t * Registers a post-fixer that will make sure that the style attribute value is correct for a specific image type (block vs inline).\n\t */\n\tprivate _setupPostFixer(): void {\n\t\tconst editor = this.editor;\n\t\tconst document = editor.model.document;\n\n\t\tconst imageUtils = editor.plugins.get( ImageUtils );\n\t\tconst stylesMap = new Map( this.normalizedStyles!.map( style => [ style.name, style ] ) );\n\n\t\t// Make sure that style attribute is valid for the image type.\n\t\tdocument.registerPostFixer( writer => {\n\t\t\tlet changed = false;\n\n\t\t\tfor ( const change of document.differ.getChanges() ) {\n\t\t\t\tif ( change.type == 'insert' || change.type == 'attribute' && change.attributeKey == 'imageStyle' ) {\n\t\t\t\t\tlet element = change.type == 'insert' ? change.position.nodeAfter! : change.range.start.nodeAfter!;\n\n\t\t\t\t\tif ( element && element.is( 'element', 'paragraph' ) && element.childCount > 0 ) {\n\t\t\t\t\t\telement = element.getChild( 0 )!;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !imageUtils.isImage( element as ModelElement ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst imageStyle = element.getAttribute( 'imageStyle' ) as string | undefined;\n\n\t\t\t\t\tif ( !imageStyle ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst imageStyleDefinition = stylesMap.get( imageStyle );\n\n\t\t\t\t\tif ( !imageStyleDefinition || !imageStyleDefinition.modelElements.includes( ( element as ModelElement ).name ) ) {\n\t\t\t\t\t\twriter.removeAttribute( 'imageStyle', element );\n\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn changed;\n\t\t} );\n\t}\n}\n\n/**\n * Returns a mapping of generic alignment values ('left', 'right', 'center') to their corresponding\n * block image alignment style names.\n *\n * This function is particularly useful for scenarios like `td[align]` conversion, which needs to know\n * exactly how to map a generic `align` attribute to the correct alignment value. This mapping is necessary\n * because the actual alignment value can differ depending on the target element type (e.g., block images\n * vs. tables).\n *\n * @param styles An array of available image style option definitions.\n * @returns A record mapping basic alignments to their valid, block-specific style names.\n */\nfunction getBlockAlignmentAttributeProperty( styles: Array<ImageStyleOptionDefinition> ): ModelBlockAlignmentAttributesMapping {\n\tconst pickFirstSupported = ( ...names: Array<string> ) => {\n\t\tconst found = names\n\t\t\t.map( name => getStyleDefinitionByName( name, styles ) )\n\t\t\t.find( definition => definition?.modelElements.includes( 'imageBlock' ) );\n\n\t\tif ( !found ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn {\n\t\t\tisDefault: !!found.isDefault,\n\t\t\tvalue: found.name\n\t\t};\n\t};\n\n\tconst candidates: Record<string, Array<string>> = {\n\t\tleft: [ 'alignBlockLeft', 'alignLeft' ],\n\t\tright: [ 'alignBlockRight', 'alignRight' ],\n\t\tcenter: [ 'block', 'alignCenter' ]\n\t};\n\n\treturn Object.fromEntries(\n\t\tObject.entries( candidates )\n\t\t\t.map( ( [ align, names ] ) => [ align, pickFirstSupported( ...names ) ] )\n\t\t\t.filter( ( [ , resolved ] ) => resolved !== undefined )\n\t);\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/**\n * @module image/imagestyle/imagestyleui\n */\n\nimport { Plugin, type PluginDependenciesOf, type Command } from '@ckeditor/ckeditor5-core';\nimport { ButtonView, createDropdown, addToolbarToDropdown, SplitButtonView } from '@ckeditor/ckeditor5-ui';\nimport { isObject, identity } from 'es-toolkit/compat';\nimport { ImageStyleEditing } from './imagestyleediting.js';\nimport { utils } from './utils.js';\nimport type { ImageStyleDropdownDefinition, ImageStyleOptionDefinition } from '../imageconfig.js';\nimport { type ImageStyleCommand } from './imagestylecommand.js';\n\n/**\n * The image style UI plugin.\n *\n * It registers buttons corresponding to the {@link module:image/imageconfig~ImageConfig#styles} configuration.\n * It also registers the {@link module:image/imagestyle/utils#DEFAULT_DROPDOWN_DEFINITIONS default drop-downs} and the\n * custom drop-downs defined by the developer in the {@link module:image/imageconfig~ImageConfig#toolbar} configuration.\n */\nexport class ImageStyleUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageStyleEditing ]> {\n\t\treturn [ ImageStyleEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageStyleUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the default localized style titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS} are available:\n\t *\n\t * * `'Wrap text'`,\n\t * * `'Break text'`,\n\t * * `'In line'`,\n\t * * `'Full size image'`,\n\t * * `'Side image'`,\n\t * * `'Left aligned image'`,\n\t * * `'Centered image'`,\n\t * * `'Right aligned image'`\n\t */\n\tpublic get localizedDefaultStylesTitles(): Record<string, string> {\n\t\tconst t = this.editor.t;\n\n\t\treturn {\n\t\t\t'Wrap text': t( 'Wrap text' ),\n\t\t\t'Break text': t( 'Break text' ),\n\t\t\t'In line': t( 'In line' ),\n\t\t\t'Full size image': t( 'Full size image' ),\n\t\t\t'Side image': t( 'Side image' ),\n\t\t\t'Left aligned image': t( 'Left aligned image' ),\n\t\t\t'Centered image': t( 'Centered image' ),\n\t\t\t'Right aligned image': t( 'Right aligned image' )\n\t\t};\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst plugins = this.editor.plugins;\n\t\tconst toolbarConfig = this.editor.config.get( 'image.toolbar' ) || [];\n\t\tconst imageStyleEditing: ImageStyleEditing = plugins.get( 'ImageStyleEditing' );\n\n\t\tconst definedStyles = translateStyles(\n\t\t\timageStyleEditing.normalizedStyles!,\n\t\t\tthis.localizedDefaultStylesTitles\n\t\t);\n\n\t\tfor ( const styleConfig of definedStyles ) {\n\t\t\tthis._createButton( styleConfig );\n\t\t}\n\n\t\tconst definedDropdowns = translateStyles(\n\t\t\t[\n\t\t\t\t...toolbarConfig.filter( isObject ) as Array<ImageStyleDropdownDefinition>,\n\t\t\t\t...utils.getDefaultDropdownDefinitions( plugins )\n\t\t\t],\n\t\t\tthis.localizedDefaultStylesTitles\n\t\t);\n\n\t\tfor ( const dropdownConfig of definedDropdowns ) {\n\t\t\tthis._createDropdown( dropdownConfig, definedStyles );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a dropdown and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.\n\t */\n\tprivate _createDropdown( dropdownConfig: ImageStyleDropdownDefinition, definedStyles: Array<ImageStyleOptionDefinition> ): void {\n\t\tconst factory = this.editor.ui.componentFactory;\n\n\t\tfactory.add( dropdownConfig.name, locale => {\n\t\t\tlet defaultButton: ButtonView | undefined;\n\n\t\t\tconst { defaultItem, items, title } = dropdownConfig;\n\t\t\tconst buttonViews = items\n\t\t\t\t.filter( itemName => definedStyles.find( ( { name } ) => getUIComponentName( name ) === itemName ) )\n\t\t\t\t.map( buttonName => {\n\t\t\t\t\tconst button = factory.create( buttonName ) as ButtonView;\n\n\t\t\t\t\tif ( buttonName === defaultItem ) {\n\t\t\t\t\t\tdefaultButton = button;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn button;\n\t\t\t\t} );\n\n\t\t\tif ( items.length !== buttonViews.length ) {\n\t\t\t\tutils.warnInvalidStyle( { dropdown: dropdownConfig } );\n\t\t\t}\n\n\t\t\tconst dropdownView = createDropdown( locale, SplitButtonView );\n\t\t\tconst splitButtonView = dropdownView.buttonView as SplitButtonView;\n\t\t\tconst splitButtonViewArrow = splitButtonView.arrowView;\n\n\t\t\taddToolbarToDropdown( dropdownView, buttonViews, { enableActiveItemFocusOnDropdownOpen: true } );\n\n\t\t\tsplitButtonView.set( {\n\t\t\t\tlabel: getDropdownButtonTitle( title, defaultButton!.label! ),\n\t\t\t\tclass: null,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tsplitButtonViewArrow.unbind( 'label' );\n\t\t\tsplitButtonViewArrow.set( {\n\t\t\t\tlabel: title\n\t\t\t} );\n\n\t\t\tsplitButtonView.bind( 'icon' ).toMany( buttonViews, 'isOn', ( ...areOn ) => {\n\t\t\t\tconst index = areOn.findIndex( identity );\n\n\t\t\t\treturn ( index < 0 ) ? defaultButton!.icon : buttonViews[ index ].icon;\n\t\t\t} );\n\n\t\t\tsplitButtonView.bind( 'label' ).toMany( buttonViews, 'isOn', ( ...areOn ) => {\n\t\t\t\tconst index = areOn.findIndex( identity );\n\n\t\t\t\treturn getDropdownButtonTitle( title, ( index < 0 ) ? defaultButton!.label! : buttonViews[ index ].label! );\n\t\t\t} );\n\n\t\t\tsplitButtonView.bind( 'isOn' ).toMany( buttonViews, 'isOn', ( ...areOn ) => areOn.some( identity ) );\n\n\t\t\tsplitButtonView.bind( 'class' )\n\t\t\t\t.toMany( buttonViews, 'isOn', ( ...areOn ) => areOn.some( identity ) ? 'ck-splitbutton_flatten' : undefined );\n\n\t\t\tsplitButtonView.on( 'execute', () => {\n\t\t\t\tif ( !buttonViews.some( ( { isOn } ) => isOn ) ) {\n\t\t\t\t\tdefaultButton!.fire( 'execute' );\n\t\t\t\t} else {\n\t\t\t\t\tdropdownView.isOpen = !dropdownView.isOpen;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdownView.bind( 'isEnabled' )\n\t\t\t\t.toMany( buttonViews, 'isEnabled', ( ...areEnabled ) => areEnabled.some( identity ) );\n\n\t\t\t// Focus the editable after executing the command.\n\t\t\t// Overrides a default behaviour where the focus is moved to the dropdown button.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/12125.\n\t\t\tthis.listenTo( dropdownView, 'execute', () => {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a button and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.\n\t */\n\tprivate _createButton( buttonConfig: ImageStyleOptionDefinition ): void {\n\t\tconst buttonName = buttonConfig.name;\n\n\t\tthis.editor.ui.componentFactory.add( getUIComponentName( buttonName ), locale => {\n\t\t\tconst editor = this.editor;\n\t\t\tconst command: ImageStyleCommand = editor.commands.get( 'imageStyle' )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: buttonConfig.title,\n\t\t\t\ticon: buttonConfig.icon,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\t// Per-style applicability lives on the command (`isStyleEnabled`). The binding observes\n\t\t\t// every command whose state can affect that answer (`imageStyle` itself plus the type\n\t\t\t// commands that may be triggered internally) so the button re-evaluates on each refresh.\n\t\t\tconst reactiveSources: Array<Command> = [ command ];\n\t\t\tconst imageTypeBlock = editor.commands.get( 'imageTypeBlock' );\n\t\t\tconst imageTypeInline = editor.commands.get( 'imageTypeInline' );\n\n\t\t\tif ( imageTypeBlock ) {\n\t\t\t\treactiveSources.push( imageTypeBlock );\n\t\t\t}\n\t\t\tif ( imageTypeInline ) {\n\t\t\t\treactiveSources.push( imageTypeInline );\n\t\t\t}\n\n\t\t\tview.bind( 'isEnabled' ).toMany( reactiveSources, 'isEnabled', () => command.isStyleEnabled( buttonName ) );\n\t\t\tview.bind( 'isOn' ).to( command, 'value', value => value === buttonName );\n\t\t\tview.on( 'execute', this._executeCommand.bind( this, buttonName ) );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n\n\tprivate _executeCommand( name: string ): void {\n\t\tthis.editor.execute( 'imageStyle', { value: name } );\n\t\tthis.editor.editing.view.focus();\n\t}\n}\n\n/**\n * Returns the translated `title` from the passed styles array.\n */\nfunction translateStyles<T extends ImageStyleOptionDefinition | ImageStyleDropdownDefinition>(\n\tstyles: Array<T>,\n\ttitles: Record<string, string>\n): Array<T> {\n\tfor ( const style of styles ) {\n\t\t// Localize the titles of the styles, if a title corresponds with\n\t\t// a localized default provided by the plugin.\n\t\tif ( titles[ style.title! ] ) {\n\t\t\tstyle.title = titles[ style.title! ];\n\t\t}\n\t}\n\n\treturn styles;\n}\n\n/**\n * Returns the image style component name with the \"imageStyle:\" prefix.\n */\nfunction getUIComponentName( name: string ): string {\n\treturn `imageStyle:${ name }`;\n}\n\n/**\n * Returns title for the splitbutton containing the dropdown title and default action item title.\n */\nfunction getDropdownButtonTitle( dropdownTitle: string | undefined, buttonTitle: string ): string {\n\treturn ( dropdownTitle ? dropdownTitle + ': ' : '' ) + buttonTitle;\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/**\n * @module image/imagestyle\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ImageStyleEditing } from './imagestyle/imagestyleediting.js';\nimport { ImageStyleUI } from './imagestyle/imagestyleui.js';\n\n/**\n * The image style plugin.\n *\n * For a detailed overview of the image styles feature, check the {@glink features/images/images-styles documentation}.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n * * {@link module:image/imagestyle/imagestyleediting~ImageStyleEditing},\n * * {@link module:image/imagestyle/imagestyleui~ImageStyleUI}\n *\n * It provides a default configuration, which can be extended or overwritten.\n * Read more about the {@link module:image/imageconfig~ImageConfig#styles image styles configuration}.\n */\nexport class ImageStyle extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageStyleEditing, ImageStyleUI ]> {\n\t\treturn [ ImageStyleEditing, ImageStyleUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageStyle' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module image/imagetoolbar\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { WidgetToolbarRepository } from '@ckeditor/ckeditor5-widget';\n\nimport { ImageUtils } from './imageutils.js';\nimport type { ImageStyleDropdownDefinition } from './imageconfig.js';\n\nimport { isObject } from 'es-toolkit/compat';\n\n/**\n * The image toolbar plugin. It creates and manages the image toolbar (the toolbar displayed when an image is selected).\n *\n * For an overview, check the {@glink features/images/images-overview#image-contextual-toolbar image contextual toolbar} documentation.\n *\n * Instances of toolbar components (e.g. buttons) are created using the editor's\n * {@link module:ui/componentfactory~ComponentFactory component factory}\n * based on the {@link module:image/imageconfig~ImageConfig#toolbar `image.toolbar` configuration option}.\n *\n * The toolbar uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n */\nexport class ImageToolbar extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ WidgetToolbarRepository, ImageUtils ]> {\n\t\treturn [ WidgetToolbarRepository, ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ImageToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\twidgetToolbarRepository.register( 'image', {\n\t\t\tariaLabel: t( 'Image toolbar' ),\n\t\t\titems: normalizeDeclarativeConfig( editor.config.get( 'image.toolbar' ) || [] ),\n\t\t\tgetRelatedElement: selection => imageUtils.getClosestSelectedImageWidget( selection )!\n\t\t} );\n\t}\n}\n\n/**\n * Convert the dropdown definitions to their keys registered in the ComponentFactory.\n * The registration precess should be handled by the plugin which handles the UI of a particular feature.\n */\nfunction normalizeDeclarativeConfig( config: Array<string | ImageStyleDropdownDefinition> ): Array<string> {\n\treturn config.map( item => isObject( item ) ? item.name : item );\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/**\n * @module image/pictureediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { ImageEditing } from './image/imageediting.js';\nimport { ImageUtils } from './imageutils.js';\nimport { downcastSourcesAttribute, upcastPicture } from './image/converters.js';\nimport type { ImageUploadEditing, ImageUploadCompleteEvent } from './imageupload/imageuploadediting.js';\n\n/**\n * This plugin enables the [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture) element support in the editor.\n *\n * * It enables the `sources` model attribute on `imageBlock` and `imageInline` model elements\n * (brought by {@link module:image/imageblock~ImageBlock} and {@link module:image/imageinline~ImageInline}, respectively).\n * * It translates the `sources` model element to the view (also: data) structure that may look as follows:\n *\n * ```html\n * <p>Inline image using picture:\n * \t<picture>\n * \t\t<source media=\"(min-width: 800px)\" srcset=\"image-large.webp\" type=\"image/webp\">\n * \t\t<source media=\"(max-width: 800px)\" srcset=\"image-small.webp\" type=\"image/webp\">\n * \t\t<!-- Other sources as specified in the \"sources\" model attribute... -->\n * \t\t<img src=\"image.png\" alt=\"An image using picture\" />\n * \t</picture>\n * </p>\n *\n * <p>Block image using picture:</p>\n * <figure class=\"image\">\n * \t<picture>\n * \t\t<source media=\"(min-width: 800px)\" srcset=\"image-large.webp\" type=\"image/webp\">\n * \t\t<source media=\"(max-width: 800px)\" srcset=\"image-small.webp\" type=\"image/webp\">\n * \t\t<!-- Other sources as specified in the \"sources\" model attribute... -->\n * \t\t<img src=\"image.png\" alt=\"An image using picture\" />\n * \t</picture>\n * \t<figcaption>Caption of the image</figcaption>\n * </figure>\n * ```\n *\n * **Note:** The value of the `sources` {@glink framework/architecture/editing-engine#changing-the-model model attribute}\n * in both examples equals:\n *\n * ```css\n * [\n * \t{\n * \t\tmedia: '(min-width: 800px)',\n * \t\tsrcset: 'image-large.webp',\n * \t\ttype: 'image/webp'\n * \t},\n * \t{\n * \t\tmedia: '(max-width: 800px)',\n * \t\tsrcset: 'image-small.webp',\n * \t\ttype: 'image/webp'\n * \t}\n * ]\n * ```\n *\n * * It integrates with the {@link module:image/imageupload~ImageUpload} plugin so images uploaded in the editor\n * automatically render using `<picture>` if the {@glink features/images/image-upload/image-upload upload adapter}\n * supports image sources and provides neccessary data.\n *\n * @private\n */\nexport class PictureEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageEditing, ImageUtils ]> {\n\t\treturn [ ImageEditing, ImageUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'PictureEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\n\t\tif ( editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\teditor.model.schema.extend( 'imageBlock', {\n\t\t\t\tallowAttributes: [ 'sources' ]\n\t\t\t} );\n\t\t}\n\n\t\tif ( editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\teditor.model.schema.extend( 'imageInline', {\n\t\t\t\tallowAttributes: [ 'sources' ]\n\t\t\t} );\n\t\t}\n\n\t\tthis._setupConversion();\n\t\tthis._setupImageUploadEditingIntegration();\n\t}\n\n\t/**\n\t * Configures conversion pipelines to support upcasting and downcasting images using the `<picture>` view element\n\t * and the model `sources` attribute.\n\t */\n\tprivate _setupConversion(): void {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\t\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\t\tconversion.for( 'upcast' ).add( upcastPicture( imageUtils ) );\n\t\tconversion.for( 'downcast' ).add( downcastSourcesAttribute( imageUtils ) );\n\t}\n\n\t/**\n\t * Makes it possible for uploaded images to get the `sources` model attribute and the `<picture>...</picture>`\n\t * view structure out-of-the-box if relevant data is provided along the\n\t * {@link module:image/imageupload/imageuploadediting~ImageUploadEditing#event:uploadComplete} event.\n\t */\n\tprivate _setupImageUploadEditingIntegration(): void {\n\t\tconst editor = this.editor;\n\n\t\tif ( !editor.plugins.has( 'ImageUploadEditing' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst imageUploadEditing: ImageUploadEditing = editor.plugins.get( 'ImageUploadEditing' );\n\n\t\tthis.listenTo<ImageUploadCompleteEvent>(\n\t\t\timageUploadEditing,\n\t\t\t'uploadComplete',\n\t\t\t( evt, { imageElement, data } ) => {\n\t\t\t\tconst sources = data.sources;\n\n\t\t\t\tif ( !sources ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\twriter.setAttributes( {\n\t\t\t\t\t\tsources\n\t\t\t\t\t}, imageElement );\n\t\t\t\t} );\n\t\t\t} );\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Delete, Input, TextWatcher, TwoStepCaretMovement, findAttributeRange, getLastTextLine, inlineHighlight } from \"@ckeditor/ckeditor5-typing\";\nimport { ClipboardPipeline } from \"@ckeditor/ckeditor5-clipboard\";\nimport { Collection, FocusTracker, KeystrokeHandler, ObservableMixin, diff, env, first, keyCodes, priorities, toMap } from \"@ckeditor/ckeditor5-utils\";\nimport { ClickObserver, Matcher, ModelLivePosition } from \"@ckeditor/ckeditor5-engine\";\nimport { upperFirst } from \"es-toolkit/compat\";\nimport { IconLink, IconNextArrow, IconPencil, IconPreviousArrow, IconSettings, IconUnlink } from \"@ckeditor/ckeditor5-icons\";\nimport { ButtonView, ContextualBalloon, CssTransitionDisablerMixin, FocusCycler, FormHeaderView, FormRowView, IconView, LabeledFieldView, ListItemView, ListView, MenuBarMenuListItemButtonView, SwitchButtonView, ToolbarView, View, ViewCollection, clickOutsideHandler, createLabeledInputText, submitHandler } from \"@ckeditor/ckeditor5-ui\";\nimport { isWidget } from \"@ckeditor/ckeditor5-widget\";\nimport { ImageBlockEditing, ImageEditing, ImageUtils } from \"@ckeditor/ckeditor5-image\";\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 link/utils/automaticdecorators\n*/\n/**\n* Helper class that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition} and provides\n* the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement downcast dispatchers} for them.\n*/\nvar AutomaticLinkDecorators = class {\n\t/**\n\t* Stores the definition of {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}.\n\t* This data is used as a source for a downcast dispatcher to create a proper conversion to output data.\n\t*/\n\t_definitions = /* @__PURE__ */ new Set();\n\t/**\n\t* A callback that checks if a decorator can be applied to a given element.\n\t* Returns `true` if there is a conflict preventing the decorator from being applied.\n\t*/\n\t_conflictChecker;\n\t/**\n\t* Gives information about the number of decorators stored in the {@link module:link/utils/automaticdecorators~AutomaticLinkDecorators}\n\t* instance.\n\t*/\n\tget length() {\n\t\treturn this._definitions.size;\n\t}\n\t/**\n\t* Sets a callback that checks if a decorator can be applied to a given element.\n\t*\n\t* @param checker A function that returns `true` if there is a conflict preventing the decorator from being applied.\n\t*/\n\tsetConflictChecker(checker) {\n\t\tthis._conflictChecker = checker;\n\t}\n\t/**\n\t* Adds automatic decorator objects or an array with them to be used during downcasting.\n\t*\n\t* @param item A configuration object of automatic rules for decorating links. It might also be an array of such objects.\n\t*/\n\tadd(item) {\n\t\tif (Array.isArray(item)) item.forEach((item) => this._definitions.add(item));\n\t\telse this._definitions.add(item);\n\t}\n\t/**\n\t* Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method.\n\t*\n\t* @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n\t*/\n\tgetDispatcher() {\n\t\treturn (dispatcher) => {\n\t\t\tconst elementCreator = (item, viewWriter) => {\n\t\t\t\tconst viewElement = viewWriter.createAttributeElement(\"a\", item.attributes, { priority: 5 });\n\t\t\t\tif (item.classes) viewWriter.addClass(item.classes, viewElement);\n\t\t\t\tfor (const key in item.styles) viewWriter.setStyle(key, item.styles[key], viewElement);\n\t\t\t\tviewWriter.setCustomProperty(\"link\", true, viewElement);\n\t\t\t\treturn viewElement;\n\t\t\t};\n\t\t\tconst createConverter = (isApplyingConverter) => {\n\t\t\t\treturn (evt, data, conversionApi) => {\n\t\t\t\t\tif (!data.attributeKey.startsWith(\"link\")) return;\n\t\t\t\t\tif (data.attributeKey == \"linkHref\" && !conversionApi.consumable.test(data.item, \"attribute:linkHref\")) return;\n\t\t\t\t\tif (!data.item.is(\"selection\") && !conversionApi.schema.isInline(data.item)) return;\n\t\t\t\t\tfor (const decorator of this._definitions) if (decorator.callback(data.item.getAttribute(\"linkHref\")) && !this._conflictChecker?.(decorator, data.item) && isApplyingConverter) {\n\t\t\t\t\t\tif (data.item.is(\"selection\")) conversionApi.writer.wrap(conversionApi.writer.document.selection.getFirstRange(), elementCreator(decorator, conversionApi.writer));\n\t\t\t\t\t\telse conversionApi.writer.wrap(conversionApi.mapper.toViewRange(data.range), elementCreator(decorator, conversionApi.writer));\n\t\t\t\t\t} else conversionApi.writer.unwrap(conversionApi.mapper.toViewRange(data.range), elementCreator(decorator, conversionApi.writer));\n\t\t\t\t};\n\t\t\t};\n\t\t\tdispatcher.on(\"attribute\", createConverter(false), { priority: priorities.high - 1 });\n\t\t\tdispatcher.on(\"attribute\", createConverter(true), { priority: priorities.high - 2 });\n\t\t};\n\t}\n\t/**\n\t* Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method\n\t* when linking images.\n\t*\n\t* @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n\t*/\n\tgetDispatcherForLinkedImage() {\n\t\treturn (dispatcher) => {\n\t\t\tconst createConverter = (isApplyingConverter) => {\n\t\t\t\treturn (evt, data, { writer, mapper }) => {\n\t\t\t\t\tif (!data.item.is(\"element\", \"imageBlock\") || !data.attributeKey.startsWith(\"link\")) return;\n\t\t\t\t\tconst viewFigure = mapper.toViewElement(data.item);\n\t\t\t\t\tconst linkInImage = Array.from(viewFigure.getChildren()).find((child) => child.is(\"element\", \"a\"));\n\t\t\t\t\tif (!linkInImage) return;\n\t\t\t\t\tfor (const decorator of this._definitions) {\n\t\t\t\t\t\tconst attributes = toMap(decorator.attributes);\n\t\t\t\t\t\tif (decorator.callback(data.item.getAttribute(\"linkHref\")) && !this._conflictChecker?.(decorator, data.item) && isApplyingConverter) {\n\t\t\t\t\t\t\tfor (const [key, val] of attributes) if (key === \"class\") writer.addClass(val, linkInImage);\n\t\t\t\t\t\t\telse writer.setAttribute(key, val, false, linkInImage);\n\t\t\t\t\t\t\tif (decorator.classes) writer.addClass(decorator.classes, linkInImage);\n\t\t\t\t\t\t\tfor (const key in decorator.styles) writer.setStyle(key, decorator.styles[key], linkInImage);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (const [key, val] of attributes) if (key === \"class\") writer.removeClass(val, linkInImage);\n\t\t\t\t\t\t\telse writer.removeAttribute(key, val, linkInImage);\n\t\t\t\t\t\t\tif (decorator.classes) writer.removeClass(decorator.classes, linkInImage);\n\t\t\t\t\t\t\tfor (const key in decorator.styles) writer.removeStyle(key, linkInImage);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t\tdispatcher.on(\"attribute\", createConverter(false), { priority: priorities.high - 1 });\n\t\t\tdispatcher.on(\"attribute\", createConverter(true), { priority: priorities.high - 2 });\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*/\nconst ATTRIBUTE_WHITESPACES = /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g;\nconst SAFE_URL_TEMPLATE = \"^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))\";\nconst EMAIL_REG_EXP = /^[\\S]+@((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+(?:[a-z\\u00a1-\\uffff]{2,})$/i;\nconst PROTOCOL_REG_EXP = /^((\\w+:(\\/{2,})?)|(\\W))/i;\nconst DEFAULT_LINK_PROTOCOLS = [\n\t\"https?\",\n\t\"ftps?\",\n\t\"mailto\"\n];\n/**\n* A keystroke used by the {@link module:link/linkui~LinkUI link UI feature}.\n*/\nconst LINK_KEYSTROKE = \"Ctrl+K\";\n/**\n* Returns `true` if a given view node is the link element.\n*/\nfunction isLinkElement(node) {\n\treturn node.is(\"attributeElement\") && !!node.getCustomProperty(\"link\");\n}\n/**\n* Creates a link {@link module:engine/view/attributeelement~ViewAttributeElement} with the provided `href` attribute.\n*/\nfunction createLinkElement(href, { writer }) {\n\tconst linkElement = writer.createAttributeElement(\"a\", { href }, { priority: 5 });\n\twriter.setCustomProperty(\"link\", true, linkElement);\n\treturn linkElement;\n}\n/**\n* Returns a safe URL based on a given value.\n*\n* A URL is considered safe if it is safe for the user (does not contain any malicious code).\n*\n* If a URL is considered unsafe, a simple `\"#\"` is returned.\n*\n* @internal\n*/\nfunction ensureSafeUrl(url, allowedProtocols = DEFAULT_LINK_PROTOCOLS) {\n\tconst urlString = String(url);\n\tconst protocolsList = allowedProtocols.join(\"|\");\n\treturn isSafeUrl(urlString, new RegExp(`${SAFE_URL_TEMPLATE.replace(\"<protocols>\", protocolsList)}`, \"i\")) ? urlString : \"#\";\n}\n/**\n* Checks whether the given URL is safe for the user (does not contain any malicious code).\n*/\nfunction isSafeUrl(url, customRegexp) {\n\treturn !!url.replace(ATTRIBUTE_WHITESPACES, \"\").match(customRegexp);\n}\n/**\n* Returns the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration processed\n* to respect the locale of the editor, i.e. to display the {@link module:link/linkconfig~LinkDecoratorManualDefinition label}\n* in the correct language.\n*\n* **Note**: Only the few most commonly used labels are translated automatically. Other labels should be manually\n* translated in the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration.\n*\n* @param t Shorthand for {@link module:utils/locale~Locale#t Locale#t}.\n* @param decorators The decorator reference where the label values should be localized.\n* @internal\n*/\nfunction getLocalizedDecorators(t, decorators) {\n\tconst localizedDecoratorsLabels = {\n\t\t\"Open in a new tab\": t(\"Open in a new tab\"),\n\t\t\"Downloadable\": t(\"Downloadable\")\n\t};\n\tdecorators.forEach((decorator) => {\n\t\tif (\"label\" in decorator && localizedDecoratorsLabels[decorator.label]) decorator.label = localizedDecoratorsLabels[decorator.label];\n\t\treturn decorator;\n\t});\n\treturn decorators;\n}\n/**\n* Converts an object with defined decorators to a normalized array of decorators. The `id` key is added for each decorator and\n* is used as the attribute's name in the model.\n*\n* @internal\n*/\nfunction normalizeDecorators(decorators) {\n\tconst retArray = [];\n\tif (decorators) for (const [key, value] of Object.entries(decorators)) {\n\t\tconst decorator = Object.assign({}, value, { id: `link${upperFirst(key)}` });\n\t\tretArray.push(decorator);\n\t}\n\treturn retArray;\n}\n/**\n* Returns `true` if the specified `element` can be linked (the element allows the `linkHref` attribute).\n*/\nfunction isLinkableElement(element, schema) {\n\tif (!element) return false;\n\treturn schema.checkAttribute(element.name, \"linkHref\");\n}\n/**\n* Returns `true` if the specified `value` is an email.\n*\n* @internal\n*/\nfunction isEmail(value) {\n\treturn EMAIL_REG_EXP.test(value);\n}\n/**\n* Adds the protocol prefix to the specified `link` when:\n*\n* * it does not contain it already, and there is a {@link module:link/linkconfig~LinkConfig#defaultProtocol `defaultProtocol` }\n* configuration value provided,\n* * or the link is an email address.\n*/\nfunction addLinkProtocolIfApplicable(link, defaultProtocol) {\n\tconst protocol = isEmail(link) ? \"mailto:\" : defaultProtocol;\n\tconst isProtocolNeeded = !!protocol && !linkHasProtocol(link);\n\treturn link && isProtocolNeeded ? protocol + link : link;\n}\n/**\n* Checks if protocol is already included in the link.\n*\n* @internal\n*/\nfunction linkHasProtocol(link) {\n\treturn PROTOCOL_REG_EXP.test(link);\n}\n/**\n* Opens the link in a new browser tab.\n*/\nfunction openLink(link) {\n\twindow.open(link, \"_blank\", \"noopener\");\n}\n/**\n* Returns a text of a link range.\n*\n* If the returned value is `undefined`, the range contains elements other than text nodes.\n*/\nfunction extractTextFromLinkRange(range) {\n\tlet text = \"\";\n\tfor (const item of range.getItems()) {\n\t\tif (!item.is(\"$text\") && !item.is(\"$textProxy\")) return;\n\t\ttext += item.data;\n\t}\n\treturn 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 link/utils/conflictingdecorators\n*/\n/**\n* Checks if two decorators conflict with each other.\n*\n* Decorators conflict when they share the same HTML attribute names (excluding mergeable attributes)\n* or style properties.\n*\n* @internal\n* @param a The first decorator.\n* @param b The second decorator.\n*/\nfunction areDecoratorsConflicting(a, b) {\n\tif (a.attributes && b.attributes) {\n\t\tif (Object.keys(a.attributes).some((key) => !isMergeableAttribute(key) && key in b.attributes)) return true;\n\t}\n\tif (a.styles && b.styles) {\n\t\tif (Object.keys(a.styles).some((key) => key in b.styles)) return true;\n\t}\n\treturn false;\n\tfunction isMergeableAttribute(key) {\n\t\treturn key === \"class\" || key === \"style\" || key === \"rel\";\n\t}\n}\n/**\n* Resolves conflicting manual decorators by automatically disabling decorators that share\n* the same HTML attributes with newly enabled decorators.\n*\n* @internal\n* @param options Configuration object.\n* @param options.decoratorStates Initial decorator states.\n* @param options.allDecorators Collection of all manual decorators.\n* @returns Updated decorator states with conflicts resolved.\n*/\nfunction resolveConflictingDecorators({ decoratorStates, allDecorators }) {\n\tconst resolved = { ...decoratorStates };\n\tfor (const name in decoratorStates) if (decoratorStates[name] && isNewlyAddedDecorator(name)) {\n\t\tconst conflicts = getConflictingManualDecorators(name, allDecorators);\n\t\tfor (const conflict of conflicts) resolved[conflict] = false;\n\t}\n\tfunction isNewlyAddedDecorator(name) {\n\t\treturn allDecorators.some((item) => item.id === name && !item.value);\n\t}\n\treturn resolved;\n}\n/**\n* Returns array of decorator names that conflict with the given decorator.\n* Decorators conflict when they share the same HTML attribute names or style properties.\n*\n* @param decoratorId The id/name of the manual decorator to check for conflicts.\n* @param manualDecorators Collection of all manual decorators.\n* @returns Array of conflicting decorator names.\n*/\nfunction getConflictingManualDecorators(decoratorId, manualDecorators) {\n\tconst decorator = manualDecorators.find((item) => item.id === decoratorId);\n\t/* istanbul ignore next -- @preserve */\n\tif (!decorator) return [];\n\treturn manualDecorators.filter((otherDecorator) => otherDecorator.id !== decoratorId && areDecoratorsConflicting(decorator, otherDecorator)).map((item) => item.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 link/linkcommand\n*/\n/**\n* The link command. It is used by the {@link module:link/link~Link link feature}.\n*/\nvar LinkCommand = class extends Command {\n\t/**\n\t* A collection of {@link module:link/utils/manualdecorator~LinkManualDecorator manual decorators}\n\t* corresponding to the {@link module:link/linkconfig~LinkConfig#decorators decorator configuration}.\n\t*\n\t* You can consider it a model with states of manual decorators added to the currently selected link.\n\t*/\n\tmanualDecorators = new Collection();\n\t/**\n\t* An instance of the helper that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition}\n\t* that are used by the {@glink features/link link} and the {@glink features/images/images-linking linking images} features.\n\t*/\n\tautomaticDecorators = new AutomaticLinkDecorators();\n\t/**\n\t* Synchronizes the state of {@link #manualDecorators} with the currently present elements in the model.\n\t*/\n\trestoreManualDecoratorStates() {\n\t\tfor (const manualDecorator of this.manualDecorators) manualDecorator.value = this._getDecoratorStateFromModel(manualDecorator.id);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement() || first(selection.getSelectedBlocks());\n\t\tif (isLinkableElement(selectedElement, model.schema)) {\n\t\t\tthis.value = selectedElement.getAttribute(\"linkHref\");\n\t\t\tthis.isEnabled = model.schema.checkAttribute(selectedElement, \"linkHref\");\n\t\t} else {\n\t\t\tthis.value = selection.getAttribute(\"linkHref\");\n\t\t\tthis.isEnabled = model.schema.checkAttributeInSelection(selection, \"linkHref\");\n\t\t}\n\t\tfor (const manualDecorator of this.manualDecorators) manualDecorator.value = this._getDecoratorStateFromModel(manualDecorator.id);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* When the selection is non-collapsed, the `linkHref` attribute will be applied to nodes inside the selection, but only to\n\t* those nodes where the `linkHref` attribute is allowed (disallowed nodes will be omitted).\n\t*\n\t* When the selection is collapsed and is not inside the text with the `linkHref` attribute, a\n\t* new {@link module:engine/model/text~ModelText text node} with the `linkHref` attribute will be inserted in place of the caret, but\n\t* only if such element is allowed in this place. The `_data` of the inserted text will equal the `href` parameter.\n\t* The selection will be updated to wrap the just inserted text node.\n\t*\n\t* When the selection is collapsed and inside the text with the `linkHref` attribute, the attribute value will be updated.\n\t*\n\t* # Decorators and model attribute management\n\t*\n\t* There is an optional argument to this command that applies or removes model\n\t* {@glink framework/architecture/editing-engine#text-attributes text attributes} brought by\n\t* {@link module:link/utils/manualdecorator~LinkManualDecorator manual link decorators}.\n\t*\n\t* Text attribute names in the model correspond to the entries in the {@link module:link/linkconfig~LinkConfig#decorators\n\t* configuration}.\n\t* For every decorator configured, a model text attribute exists with the \"link\" prefix. For example, a `'linkMyDecorator'` attribute\n\t* corresponds to `'myDecorator'` in the configuration.\n\t*\n\t* To learn more about link decorators, check out the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`}\n\t* documentation.\n\t*\n\t* Here is how to manage decorator attributes with the link command:\n\t*\n\t* ```ts\n\t* const linkCommand = editor.commands.get( 'link' );\n\t*\n\t* // Adding a new decorator attribute.\n\t* linkCommand.execute( 'http://example.com', {\n\t* \tlinkIsExternal: true\n\t* } );\n\t*\n\t* // Removing a decorator attribute from the selection.\n\t* linkCommand.execute( 'http://example.com', {\n\t* \tlinkIsExternal: false\n\t* } );\n\t*\n\t* // Adding multiple decorator attributes at the same time.\n\t* linkCommand.execute( 'http://example.com', {\n\t* \tlinkIsExternal: true,\n\t* \tlinkIsDownloadable: true,\n\t* } );\n\t*\n\t* // Removing and adding decorator attributes at the same time.\n\t* linkCommand.execute( 'http://example.com', {\n\t* \tlinkIsExternal: false,\n\t* \tlinkFoo: true,\n\t* \tlinkIsDownloadable: false,\n\t* } );\n\t* ```\n\t*\n\t* **Note**: If the decorator attribute name is not specified, its state remains untouched.\n\t*\n\t* **Note**: {@link module:link/unlinkcommand~UnlinkCommand#execute `UnlinkCommand#execute()`} removes all\n\t* decorator attributes.\n\t*\n\t* An optional parameter called `displayedText` is to add or update text of the link that represents the `href`. For example:\n\t*\n\t* ```ts\n\t* const linkCommand = editor.commands.get( 'link' );\n\t*\n\t* // Adding a new link with `displayedText` attribute.\n\t* linkCommand.execute( 'http://example.com', {}, 'Example' );\n\t* ```\n\t*\n\t* The above code will create an anchor like this:\n\t*\n\t* ```html\n\t* <a href=\"http://example.com\">Example</a>\n\t* ```\n\t*\n\t* @fires execute\n\t* @param href Link destination.\n\t* @param manualDecoratorIds The information about manual decorator attributes to be applied or removed upon execution.\n\t* @param displayedText Text of the link.\n\t*/\n\texecute(href, manualDecoratorIds = {}, displayedText) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst resolvedDecoratorsIds = resolveConflictingDecorators({\n\t\t\tallDecorators: Array.from(this.manualDecorators),\n\t\t\tdecoratorStates: manualDecoratorIds\n\t\t});\n\t\tconst truthyManualDecorators = [];\n\t\tconst falsyManualDecorators = [];\n\t\tfor (const name in resolvedDecoratorsIds) if (resolvedDecoratorsIds[name]) truthyManualDecorators.push(name);\n\t\telse falsyManualDecorators.push(name);\n\t\tmodel.change((writer) => {\n\t\t\tconst updateLinkAttributes = (itemOrRange) => {\n\t\t\t\twriter.setAttribute(\"linkHref\", href, itemOrRange);\n\t\t\t\ttruthyManualDecorators.forEach((item) => writer.setAttribute(item, true, itemOrRange));\n\t\t\t\tfalsyManualDecorators.forEach((item) => writer.removeAttribute(item, itemOrRange));\n\t\t\t};\n\t\t\tconst updateLinkTextIfNeeded = (range, linkHref) => {\n\t\t\t\tconst linkText = extractTextFromLinkRange(range);\n\t\t\t\tif (!linkText) return range;\n\t\t\t\tlet newText = displayedText;\n\t\t\t\tif (!newText) newText = linkHref && linkHref == linkText ? href : linkText;\n\t\t\t\tif (newText != linkText) {\n\t\t\t\t\tconst fragment = writer.createDocumentFragment();\n\t\t\t\t\tfor (const item of range.getItems()) {\n\t\t\t\t\t\tconst text = item;\n\t\t\t\t\t\twriter.append(writer.createText(text.data, text.getAttributes()), fragment);\n\t\t\t\t\t}\n\t\t\t\t\tconst fragRange = writer.createRangeIn(fragment);\n\t\t\t\t\tconst changes = findChanges(linkText, newText);\n\t\t\t\t\tlet insertsLength = 0;\n\t\t\t\t\tfor (const { offset, actual, expected } of changes) {\n\t\t\t\t\t\tconst updatedOffset = offset + insertsLength;\n\t\t\t\t\t\tconst subRange = writer.createRange(fragRange.start.getShiftedBy(updatedOffset), fragRange.start.getShiftedBy(updatedOffset + actual.length));\n\t\t\t\t\t\tconst attributes = getLinkPartTextNode(subRange, fragRange).getAttributes();\n\t\t\t\t\t\tconst formattingAttributes = Array.from(attributes).filter(([key]) => model.schema.getAttributeProperties(key).isFormatting);\n\t\t\t\t\t\tconst newTextNode = writer.createText(expected, formattingAttributes);\n\t\t\t\t\t\tupdateLinkAttributes(newTextNode);\n\t\t\t\t\t\twriter.remove(subRange);\n\t\t\t\t\t\twriter.insert(newTextNode, subRange.start);\n\t\t\t\t\t\tinsertsLength += expected.length;\n\t\t\t\t\t}\n\t\t\t\t\tmodel.insertContent(fragment, range);\n\t\t\t\t\treturn writer.createRange(range.start, range.start.getShiftedBy(newText.length));\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst collapseSelectionAtLinkEnd = (linkRange) => {\n\t\t\t\tconst { plugins } = this.editor;\n\t\t\t\twriter.setSelection(linkRange.end);\n\t\t\t\tif (plugins.has(\"TwoStepCaretMovement\")) plugins.get(\"TwoStepCaretMovement\")._handleForwardMovement();\n\t\t\t\telse for (const key of [\n\t\t\t\t\t\"linkHref\",\n\t\t\t\t\t...truthyManualDecorators,\n\t\t\t\t\t...falsyManualDecorators\n\t\t\t\t]) writer.removeSelectionAttribute(key);\n\t\t\t};\n\t\t\tif (selection.isCollapsed) {\n\t\t\t\tconst position = selection.getFirstPosition();\n\t\t\t\tif (selection.hasAttribute(\"linkHref\")) {\n\t\t\t\t\tconst linkHref = selection.getAttribute(\"linkHref\");\n\t\t\t\t\tconst linkRange = findAttributeRange(position, \"linkHref\", linkHref, model);\n\t\t\t\t\tconst newLinkRange = updateLinkTextIfNeeded(linkRange, linkHref);\n\t\t\t\t\tupdateLinkAttributes(newLinkRange || linkRange);\n\t\t\t\t\tif (newLinkRange) collapseSelectionAtLinkEnd(newLinkRange);\n\t\t\t\t} else if (href !== \"\") {\n\t\t\t\t\tconst attributes = toMap(selection.getAttributes());\n\t\t\t\t\tattributes.set(\"linkHref\", href);\n\t\t\t\t\ttruthyManualDecorators.forEach((item) => {\n\t\t\t\t\t\tattributes.set(item, true);\n\t\t\t\t\t});\n\t\t\t\t\tcollapseSelectionAtLinkEnd(model.insertContent(writer.createText(displayedText || href, attributes), position));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst selectionRanges = Array.from(selection.getRanges());\n\t\t\t\tconst ranges = model.schema.getValidRanges(selectionRanges, \"linkHref\");\n\t\t\t\tconst allowedRanges = [];\n\t\t\t\tfor (const element of selection.getSelectedBlocks()) if (model.schema.checkAttribute(element, \"linkHref\")) allowedRanges.push(writer.createRangeOn(element));\n\t\t\t\tconst rangesToUpdate = allowedRanges.slice();\n\t\t\t\tfor (const range of ranges) if (this._isRangeToUpdate(range, allowedRanges)) rangesToUpdate.push(range);\n\t\t\t\tconst stickyPseudoRanges = selectionRanges.map((range) => ({\n\t\t\t\t\tstart: ModelLivePosition.fromPosition(range.start, \"toPrevious\"),\n\t\t\t\t\tend: ModelLivePosition.fromPosition(range.end, \"toNext\")\n\t\t\t\t}));\n\t\t\t\tfor (let range of rangesToUpdate) {\n\t\t\t\t\tconst linkHref = (range.start.textNode || range.start.nodeAfter).getAttribute(\"linkHref\");\n\t\t\t\t\trange = updateLinkTextIfNeeded(range, linkHref) || range;\n\t\t\t\t\tupdateLinkAttributes(range);\n\t\t\t\t}\n\t\t\t\twriter.setSelection(stickyPseudoRanges.map((pseudoRange) => {\n\t\t\t\t\tconst start = pseudoRange.start.toPosition();\n\t\t\t\t\tconst end = pseudoRange.end.toPosition();\n\t\t\t\t\tpseudoRange.start.detach();\n\t\t\t\t\tpseudoRange.end.detach();\n\t\t\t\t\treturn model.createRange(start, end);\n\t\t\t\t}));\n\t\t\t}\n\t\t});\n\t\tthis.restoreManualDecoratorStates();\n\t}\n\t/**\n\t* Provides information whether a decorator with a given name is present in the currently processed selection.\n\t*\n\t* @param decoratorName The name of the manual decorator used in the model\n\t* @returns The information whether a given decorator is currently present in the selection.\n\t*/\n\t_getDecoratorStateFromModel(decoratorName) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\t\tif (isLinkableElement(selectedElement, model.schema)) return selectedElement.getAttribute(decoratorName);\n\t\treturn selection.getAttribute(decoratorName);\n\t}\n\t/**\n\t* Checks whether specified `range` is inside an element that accepts the `linkHref` attribute.\n\t*\n\t* @param range A range to check.\n\t* @param allowedRanges An array of ranges created on elements where the attribute is accepted.\n\t*/\n\t_isRangeToUpdate(range, allowedRanges) {\n\t\tfor (const allowedRange of allowedRanges) if (allowedRange.containsRange(range)) return false;\n\t\treturn true;\n\t}\n};\n/**\n* Compares two strings and returns an array of changes needed to transform one into another.\n* Uses the diff utility to find the differences and groups them into chunks containing information\n* about the offset and actual/expected content.\n*\n* @param oldText The original text to compare.\n* @param newText The new text to compare against.\n* @returns Array of change objects containing offset and actual/expected content.\n*\n* @example\n* findChanges( 'hello world', 'hi there' );\n*\n* Returns:\n* [\n* \t{\n* \t\t\"offset\": 1,\n* \t\t\"actual\": \"ello\",\n* \t\t\"expected\": \"i\"\n* \t},\n* \t{\n* \t\t\"offset\": 2,\n* \t\t\"actual\": \"wo\",\n* \t\t\"expected\": \"the\"\n* \t},\n* \t{\n* \t\t\"offset\": 3,\n* \t\t\"actual\": \"ld\",\n* \t\t\"expected\": \"e\"\n* \t}\n* ]\n*/\nfunction findChanges(oldText, newText) {\n\tconst changes = diff(oldText, newText);\n\tconst counter = {\n\t\tequal: 0,\n\t\tinsert: 0,\n\t\tdelete: 0\n\t};\n\tconst result = [];\n\tlet actualSlice = \"\";\n\tlet expectedSlice = \"\";\n\tfor (const action of [...changes, null]) {\n\t\tif (action == \"insert\") expectedSlice += newText[counter.equal + counter.insert];\n\t\telse if (action == \"delete\") actualSlice += oldText[counter.equal + counter.delete];\n\t\telse if (actualSlice.length || expectedSlice.length) {\n\t\t\tresult.push({\n\t\t\t\toffset: counter.equal,\n\t\t\t\tactual: actualSlice,\n\t\t\t\texpected: expectedSlice\n\t\t\t});\n\t\t\tactualSlice = \"\";\n\t\t\texpectedSlice = \"\";\n\t\t}\n\t\tif (action) counter[action]++;\n\t}\n\treturn result;\n}\n/**\n* Returns text node withing the link range that should be updated.\n*\n* @param range Partial link range.\n* @param linkRange Range of the entire link.\n* @returns Text node.\n*/\nfunction getLinkPartTextNode(range, linkRange) {\n\tif (!range.isCollapsed) return first(range.getItems());\n\tconst position = range.start;\n\tif (position.textNode) return position.textNode;\n\tif (!position.nodeBefore || position.isEqual(linkRange.start)) return position.nodeAfter;\n\telse return position.nodeBefore;\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 link/unlinkcommand\n*/\n/**\n* The unlink command. It is used by the {@link module:link/link~Link link plugin}.\n*/\nvar UnlinkCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\t\tif (isLinkableElement(selectedElement, model.schema)) this.isEnabled = model.schema.checkAttribute(selectedElement, \"linkHref\");\n\t\telse this.isEnabled = model.schema.checkAttributeInSelection(selection, \"linkHref\");\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* When the selection is collapsed, it removes the `linkHref` attribute from each node with the same `linkHref` attribute value.\n\t* When the selection is non-collapsed, it removes the `linkHref` attribute from each node in selected ranges.\n\t*\n\t* # Decorators\n\t*\n\t* If {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} is specified,\n\t* all configured decorators are removed together with the `linkHref` attribute.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\tmodel.change((writer) => {\n\t\t\tconst rangesToUnlink = selection.isCollapsed ? [findAttributeRange(selection.getFirstPosition(), \"linkHref\", selection.getAttribute(\"linkHref\"), model)] : model.schema.getValidRanges(selection.getRanges(), \"linkHref\");\n\t\t\tfor (const range of rangesToUnlink) {\n\t\t\t\twriter.removeAttribute(\"linkHref\", range);\n\t\t\t\tif (linkCommand) for (const manualDecorator of linkCommand.manualDecorators) writer.removeAttribute(manualDecorator.id, range);\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 link/utils/manualdecorator\n*/\nconst LinkManualDecoratorBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Helper class that stores manual decorators with observable {@link module:link/utils/manualdecorator~LinkManualDecorator#value}\n* to support integration with the UI state. An instance of this class is a model with the state of individual manual decorators.\n* These decorators are kept as collections in {@link module:link/linkcommand~LinkCommand#manualDecorators}.\n*/\nvar LinkManualDecorator = class extends LinkManualDecoratorBase {\n\t/**\n\t* An ID of a manual decorator which is the name of the attribute in the model, for example: 'linkManualDecorator0'.\n\t*/\n\tid;\n\t/**\n\t* The default value of manual decorator.\n\t*/\n\tdefaultValue;\n\t/**\n\t* The label used in the user interface to toggle the manual decorator.\n\t*/\n\tlabel;\n\t/**\n\t* A set of attributes added to downcasted data when the decorator is activated for a specific link.\n\t* Attributes should be added in a form of attributes defined in {@link module:engine/view/elementdefinition~ViewElementDefinition}.\n\t*/\n\tattributes;\n\t/**\n\t* A set of classes added to downcasted data when the decorator is activated for a specific link.\n\t* Classes should be added in a form of classes defined in {@link module:engine/view/elementdefinition~ViewElementDefinition}.\n\t*/\n\tclasses;\n\t/**\n\t* A set of styles added to downcasted data when the decorator is activated for a specific link.\n\t* Styles should be added in a form of styles defined in {@link module:engine/view/elementdefinition~ViewElementDefinition}.\n\t*/\n\tstyles;\n\t/**\n\t* Creates a new instance of {@link module:link/utils/manualdecorator~LinkManualDecorator}.\n\t*\n\t* @param options The configuration object.\n\t*/\n\tconstructor({ id, label, attributes, classes, styles, defaultValue }) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.set(\"value\", void 0);\n\t\tthis.defaultValue = defaultValue;\n\t\tthis.label = label;\n\t\tthis.attributes = attributes;\n\t\tthis.classes = classes;\n\t\tthis.styles = styles;\n\t}\n\t/**\n\t* Returns {@link module:engine/view/matcher~MatcherPattern} with decorator attributes.\n\t*\n\t* @internal\n\t*/\n\t_createPattern() {\n\t\treturn {\n\t\t\tattributes: this.attributes,\n\t\t\tclasses: this.classes,\n\t\t\tstyles: this.styles\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 link/linkediting\n*/\nconst HIGHLIGHT_CLASS = \"ck-link_selected\";\nconst DECORATOR_AUTOMATIC = \"automatic\";\nconst DECORATOR_MANUAL = \"manual\";\nconst EXTERNAL_LINKS_REGEXP = /^(https?:)?\\/\\//;\n/**\n* The link engine feature.\n*\n* It introduces the `linkHref=\"url\"` attribute in the model which renders to the view as a `<a href=\"url\">` element\n* as well as `'link'` and `'unlink'` commands.\n*/\nvar LinkEditing = class extends Plugin {\n\t/**\n\t* A list of functions that handles opening links. If any of them returns `true`, the link is considered to be opened.\n\t*/\n\t_linkOpeners = [];\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LinkEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tTwoStepCaretMovement,\n\t\t\tInput,\n\t\t\tClipboardPipeline\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"link\", {\n\t\t\tallowCreatingEmptyLinks: false,\n\t\t\taddTargetToExternalLinks: false,\n\t\t\ttoolbar: [\n\t\t\t\t\"linkPreview\",\n\t\t\t\t\"|\",\n\t\t\t\t\"editLink\",\n\t\t\t\t\"linkProperties\",\n\t\t\t\t\"unlink\"\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst allowedProtocols = this.editor.config.get(\"link.allowedProtocols\");\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: \"linkHref\" });\n\t\teditor.conversion.for(\"dataDowncast\").attributeToElement({\n\t\t\tmodel: \"linkHref\",\n\t\t\tview: createLinkElement\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").attributeToElement({\n\t\t\tmodel: \"linkHref\",\n\t\t\tview: (href, conversionApi) => {\n\t\t\t\treturn createLinkElement(ensureSafeUrl(href, allowedProtocols), conversionApi);\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"a\",\n\t\t\t\tattributes: { href: true }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"linkHref\",\n\t\t\t\tvalue: (viewElement) => viewElement.getAttribute(\"href\")\n\t\t\t}\n\t\t});\n\t\teditor.commands.add(\"link\", new LinkCommand(editor));\n\t\teditor.commands.add(\"unlink\", new UnlinkCommand(editor));\n\t\tconst linkDecorators = getLocalizedDecorators(editor.t, normalizeDecorators(editor.config.get(\"link.decorators\")));\n\t\tthis._enableAutomaticDecorators(linkDecorators.filter((item) => item.mode === DECORATOR_AUTOMATIC));\n\t\tthis._enableManualDecorators(linkDecorators.filter((item) => item.mode === DECORATOR_MANUAL));\n\t\teditor.plugins.get(TwoStepCaretMovement).registerAttribute(\"linkHref\");\n\t\tinlineHighlight(editor, \"linkHref\", \"a\", HIGHLIGHT_CLASS);\n\t\tthis._enableLinkOpen();\n\t\tthis._enableSelectionAttributesFixer();\n\t\tthis._enableClipboardIntegration();\n\t\tthis._enableDecoratorConflictPostfixer();\n\t}\n\t/**\n\t* Registers a function that opens links in a new browser tab.\n\t*\n\t* @param linkOpener The function that opens a link in a new browser tab.\n\t* @internal\n\t*/\n\t_registerLinkOpener(linkOpener) {\n\t\tthis._linkOpeners.push(linkOpener);\n\t}\n\t/**\n\t* Processes an array of configured {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}\n\t* and registers a {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher downcast dispatcher}\n\t* for each one of them. Downcast dispatchers are obtained using the\n\t* {@link module:link/utils/automaticdecorators~AutomaticLinkDecorators#getDispatcher} method.\n\t*\n\t* **Note**: This method also activates the automatic external link decorator if enabled with\n\t* {@link module:link/linkconfig~LinkConfig#addTargetToExternalLinks `config.link.addTargetToExternalLinks`}.\n\t*/\n\t_enableAutomaticDecorators(automaticDecoratorDefinitions) {\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get(\"link\");\n\t\tconst automaticDecorators = command.automaticDecorators;\n\t\tif (editor.config.get(\"link.addTargetToExternalLinks\")) automaticDecorators.add({\n\t\t\tid: \"linkIsExternal\",\n\t\t\tmode: DECORATOR_AUTOMATIC,\n\t\t\tcallback: (url) => !!url && EXTERNAL_LINKS_REGEXP.test(url),\n\t\t\tattributes: {\n\t\t\t\ttarget: \"_blank\",\n\t\t\t\trel: \"noopener noreferrer\"\n\t\t\t}\n\t\t});\n\t\tautomaticDecorators.add(automaticDecoratorDefinitions);\n\t\tautomaticDecorators.setConflictChecker((automaticDecorator, modelItem) => {\n\t\t\tfor (const manualDecorator of command.manualDecorators) {\n\t\t\t\tif (!modelItem.hasAttribute(manualDecorator.id)) continue;\n\t\t\t\tif (areDecoratorsConflicting(automaticDecorator, manualDecorator)) return true;\n\t\t\t}\n\t\t});\n\t\tif (automaticDecorators.length) editor.conversion.for(\"downcast\").add(automaticDecorators.getDispatcher());\n\t}\n\t/**\n\t* Processes an array of configured {@link module:link/linkconfig~LinkDecoratorManualDefinition manual decorators},\n\t* transforms them into {@link module:link/utils/manualdecorator~LinkManualDecorator} instances and stores them in the\n\t* {@link module:link/linkcommand~LinkCommand#manualDecorators} collection (a model for manual decorators state).\n\t*\n\t* Also registers an {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement attribute-to-element}\n\t* converter for each manual decorator and extends the {@link module:engine/model/schema~ModelSchema model's schema}\n\t* with adequate model attributes.\n\t*/\n\t_enableManualDecorators(manualDecoratorDefinitions) {\n\t\tif (!manualDecoratorDefinitions.length) return;\n\t\tconst editor = this.editor;\n\t\tconst manualDecorators = editor.commands.get(\"link\").manualDecorators;\n\t\tmanualDecoratorDefinitions.forEach((decoratorDefinition) => {\n\t\t\teditor.model.schema.extend(\"$text\", { allowAttributes: decoratorDefinition.id });\n\t\t\tconst decorator = new LinkManualDecorator(decoratorDefinition);\n\t\t\tmanualDecorators.add(decorator);\n\t\t\teditor.conversion.for(\"downcast\").add((dispatcher) => {\n\t\t\t\tconst elementCreator = (writer) => {\n\t\t\t\t\tconst element = writer.createAttributeElement(\"a\", decorator.attributes, { priority: 5 });\n\t\t\t\t\tif (decorator.classes) writer.addClass(decorator.classes, element);\n\t\t\t\t\tfor (const key in decorator.styles) writer.setStyle(key, decorator.styles[key], element);\n\t\t\t\t\twriter.setCustomProperty(\"link\", true, element);\n\t\t\t\t\treturn element;\n\t\t\t\t};\n\t\t\t\tconst createConverter = (isApplyingConverter) => {\n\t\t\t\t\treturn (evt, data, conversionApi) => {\n\t\t\t\t\t\tif (!data.item.is(\"selection\") && !conversionApi.schema.isInline(data.item)) return;\n\t\t\t\t\t\tif (!isApplyingConverter && data.attributeOldValue) {\n\t\t\t\t\t\t\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\t\t\t\t\t\t\tconversionApi.writer.unwrap(conversionApi.mapper.toViewRange(data.range), elementCreator(conversionApi.writer));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isApplyingConverter && data.attributeNewValue) {\n\t\t\t\t\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\t\t\t\t\tif (data.item.is(\"selection\")) conversionApi.writer.wrap(conversionApi.writer.document.selection.getFirstRange(), elementCreator(conversionApi.writer));\n\t\t\t\t\t\t\telse conversionApi.writer.wrap(conversionApi.mapper.toViewRange(data.range), elementCreator(conversionApi.writer));\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tdispatcher.on(`attribute:${decorator.id}`, createConverter(false), { priority: priorities.high - 1 });\n\t\t\t\tdispatcher.on(`attribute:${decorator.id}`, createConverter(true), { priority: priorities.high - 2 });\n\t\t\t});\n\t\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\t\tview: {\n\t\t\t\t\tname: \"a\",\n\t\t\t\t\t...decorator._createPattern()\n\t\t\t\t},\n\t\t\t\tmodel: { key: decorator.id }\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Attaches handlers for {@link module:engine/view/document~ViewDocument#event:enter} and\n\t* {@link module:engine/view/document~ViewDocument#event:click} to enable link following.\n\t*/\n\t_enableLinkOpen() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tconst handleLinkOpening = (url) => {\n\t\t\tif (!this._linkOpeners.some((opener) => opener(url))) openLink(url);\n\t\t};\n\t\tthis.listenTo(viewDocument, \"click\", (evt, data) => {\n\t\t\tif (!(env.isMac ? data.domEvent.metaKey : data.domEvent.ctrlKey)) return;\n\t\t\tlet clickedElement = data.domTarget;\n\t\t\tif (clickedElement.tagName.toLowerCase() != \"a\") clickedElement = clickedElement.closest(\"a\");\n\t\t\tif (!clickedElement) return;\n\t\t\tconst url = clickedElement.getAttribute(\"href\");\n\t\t\tif (!url) return;\n\t\t\tevt.stop();\n\t\t\tdata.preventDefault();\n\t\t\thandleLinkOpening(url);\n\t\t}, { context: \"$capture\" });\n\t\tthis.listenTo(viewDocument, \"keydown\", (evt, data) => {\n\t\t\tconst url = editor.commands.get(\"link\").value;\n\t\t\tif (!(!!url && data.keyCode === keyCodes.enter && data.altKey)) return;\n\t\t\tevt.stop();\n\t\t\thandleLinkOpening(url);\n\t\t});\n\t}\n\t/**\n\t* Watches the ModelDocumentSelection attribute changes and removes link decorator attributes when the linkHref attribute is removed.\n\t*\n\t* This is to ensure that there is no left-over link decorator attributes on the document selection that is no longer in a link.\n\t*/\n\t_enableSelectionAttributesFixer() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tthis.listenTo(selection, \"change:attribute\", (evt, { attributeKeys }) => {\n\t\t\tif (!attributeKeys.includes(\"linkHref\") || selection.hasAttribute(\"linkHref\")) return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\tremoveLinkAttributesFromSelection(writer, getLinkAttributesAllowedOnText(model.schema));\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Enables URL fixing on pasting.\n\t*/\n\t_enableClipboardIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst defaultProtocol = this.editor.config.get(\"link.defaultProtocol\");\n\t\tif (!defaultProtocol) return;\n\t\tthis.listenTo(editor.plugins.get(\"ClipboardPipeline\"), \"contentInsertion\", (evt, data) => {\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst range = writer.createRangeIn(data.content);\n\t\t\t\tfor (const item of range.getItems()) if (item.hasAttribute(\"linkHref\")) {\n\t\t\t\t\tconst newLink = addLinkProtocolIfApplicable(item.getAttribute(\"linkHref\"), defaultProtocol);\n\t\t\t\t\twriter.setAttribute(\"linkHref\", newLink, item);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Registers a postfixer that resolves conflicting decorator attributes on elements.\n\t*/\n\t_enableDecoratorConflictPostfixer() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\tmodel.document.registerPostFixer((writer) => {\n\t\t\tlet hasChanged = false;\n\t\t\tconst changes = model.document.differ.getChanges();\n\t\t\tconst elementsToCheck = /* @__PURE__ */ new Set();\n\t\t\tconst manualDecoratorAttributeKeys = new Set(linkCommand.manualDecorators.map((decorator) => decorator.id));\n\t\t\tfor (const change of changes) {\n\t\t\t\tif (change.type === \"attribute\") {\n\t\t\t\t\tif (change.attributeKey !== \"linkHref\" && !manualDecoratorAttributeKeys.has(change.attributeKey)) continue;\n\t\t\t\t\tfor (const item of change.range.getItems()) if (item.hasAttribute(\"linkHref\")) elementsToCheck.add(item);\n\t\t\t\t}\n\t\t\t\tif (change.type === \"insert\" && change.attributes.has(\"linkHref\") && change.position.nodeAfter) elementsToCheck.add(change.position.nodeAfter);\n\t\t\t}\n\t\t\tfor (const item of elementsToCheck) {\n\t\t\t\tconst appliedDecorators = [];\n\t\t\t\tfor (const manualDecorator of linkCommand.manualDecorators) {\n\t\t\t\t\tif (!item.hasAttribute(manualDecorator.id)) continue;\n\t\t\t\t\tfor (let i = appliedDecorators.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tconst appliedDecorator = appliedDecorators[i];\n\t\t\t\t\t\tif (areDecoratorsConflicting(appliedDecorator, manualDecorator)) {\n\t\t\t\t\t\t\twriter.removeAttribute(appliedDecorator.id, item);\n\t\t\t\t\t\t\tappliedDecorators.splice(i, 1);\n\t\t\t\t\t\t\thasChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tappliedDecorators.push(manualDecorator);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn hasChanged;\n\t\t});\n\t}\n};\n/**\n* Make the selection free of link-related model attributes.\n* All link-related model attributes start with \"link\". That includes not only \"linkHref\"\n* but also all decorator attributes (they have dynamic names), or even custom plugins.\n*/\nfunction removeLinkAttributesFromSelection(writer, linkAttributes) {\n\twriter.removeSelectionAttribute(\"linkHref\");\n\tfor (const attribute of linkAttributes) writer.removeSelectionAttribute(attribute);\n}\n/**\n* Returns an array containing names of the attributes allowed on `$text` that describes the link item.\n*/\nfunction getLinkAttributesAllowedOnText(schema) {\n\treturn schema.getDefinition(\"$text\").allowAttributes.filter((attribute) => attribute.startsWith(\"link\"));\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 link/ui/linkpreviewbuttonview\n*/\n/**\n* The link button class. Rendered as an `<a>` tag with link opening in a new tab.\n*\n* Provides a custom `navigate` cancelable event.\n*/\nvar LinkPreviewButtonView = class extends ButtonView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\thref: void 0,\n\t\t\twithText: true\n\t\t});\n\t\tthis.extendTemplate({\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-link-toolbar__preview\"],\n\t\t\t\thref: bind.to(\"href\"),\n\t\t\t\ttarget: \"_blank\",\n\t\t\t\trel: \"noopener noreferrer\"\n\t\t\t},\n\t\t\ton: { click: bind.to((evt) => {\n\t\t\t\tif (this.href) {\n\t\t\t\t\tconst cancel = () => evt.preventDefault();\n\t\t\t\t\tthis.fire(\"navigate\", this.href, cancel);\n\t\t\t\t}\n\t\t\t}) }\n\t\t});\n\t\tthis.template.tag = \"a\";\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 link/ui/linkformview\n*/\n/**\n* The link form view.\n*/\nvar LinkFormView = class extends View {\n\t/**\n\t* Tracks information about DOM focus in the form.\n\t*/\n\tfocusTracker = new FocusTracker();\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes = new KeystrokeHandler();\n\t/**\n\t* The Back button view displayed in the header.\n\t*/\n\tbackButtonView;\n\t/**\n\t* The Save button view.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* A button that opens the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} allowing the user to\n\t* configure manual decorators for the link handled by this form.\n\t*/\n\tmanualDecoratorsButtonView;\n\t/**\n\t* The \"Displayed text\" input view.\n\t*/\n\tdisplayedTextInputView;\n\t/**\n\t* The URL input view.\n\t*/\n\turlInputView;\n\t/**\n\t* A collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of child views in the providers list.\n\t*/\n\tprovidersListChildren;\n\t/**\n\t* An array of form validators used by {@link #isValid}.\n\t*/\n\t_validators;\n\t/**\n\t* A collection of views that can be focused in the form.\n\t*/\n\t_focusables = new ViewCollection();\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t* @param validators  Form validators used by {@link #isValid}.\n\t*/\n\tconstructor(locale, validators) {\n\t\tsuper(locale);\n\t\tthis._validators = validators;\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\t\tthis.manualDecoratorsButtonView = this._createManualDecoratorsButton();\n\t\tthis.displayedTextInputView = this._createDisplayedTextInput();\n\t\tthis.urlInputView = this._createUrlInput();\n\t\tthis.providersListChildren = this.createCollection();\n\t\tthis.children = this.createCollection([this._createHeaderView()]);\n\t\tthis._createFormChildren();\n\t\tthis.listenTo(this.providersListChildren, \"add\", () => {\n\t\t\tthis.stopListening(this.providersListChildren, \"add\");\n\t\t\tthis.children.add(this._createProvidersListView());\n\t\t});\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-form\",\n\t\t\t\t\t\"ck-link-form\",\n\t\t\t\t\t\"ck-responsive-form\"\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\t[\n\t\t\tthis.urlInputView,\n\t\t\tthis.manualDecoratorsButtonView,\n\t\t\tthis.saveButtonView,\n\t\t\t...this.providersListChildren,\n\t\t\tthis.backButtonView,\n\t\t\tthis.displayedTextInputView\n\t\t].forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis.focusTracker.add(v.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the fist {@link #_focusables} in the form.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Validates the form and returns `false` when some fields are invalid.\n\t*/\n\tisValid() {\n\t\tthis.resetFormStatus();\n\t\tfor (const validator of this._validators) {\n\t\t\tconst errorText = validator(this);\n\t\t\tif (errorText) {\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t* bringing them back to the state when the form has been displayed for the first time.\n\t*\n\t* See {@link #isValid}.\n\t*/\n\tresetFormStatus() {\n\t\tthis.urlInputView.errorText = null;\n\t}\n\t/**\n\t* Creates a back button view that cancels the form.\n\t*/\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn backButton;\n\t}\n\t/**\n\t* Creates a save button view that inserts the link.\n\t*/\n\t_createSaveButton() {\n\t\tconst t = this.locale.t;\n\t\tconst saveButton = new ButtonView(this.locale);\n\t\tsaveButton.set({\n\t\t\tlabel: t(\"Insert\"),\n\t\t\ttooltip: false,\n\t\t\twithText: true,\n\t\t\ttype: \"submit\",\n\t\t\tclass: \"ck-button-action ck-button-bold\"\n\t\t});\n\t\treturn saveButton;\n\t}\n\t/**\n\t* Creates a button that opens the link properties view.\n\t*/\n\t_createManualDecoratorsButton() {\n\t\tconst t = this.locale.t;\n\t\tconst button = new ButtonView(this.locale);\n\t\tbutton.set({\n\t\t\tlabel: t(\"Link properties\"),\n\t\t\ticon: IconSettings,\n\t\t\ttooltip: true,\n\t\t\tisVisible: false\n\t\t});\n\t\tbutton.delegate(\"execute\").to(this, \"showDecorators\");\n\t\treturn button;\n\t}\n\t/**\n\t* Creates a header view for the form.\n\t*/\n\t_createHeaderView() {\n\t\tconst t = this.locale.t;\n\t\tconst header = new FormHeaderView(this.locale, { label: t(\"Link\") });\n\t\theader.children.add(this.backButtonView, 0);\n\t\treturn header;\n\t}\n\t/**\n\t* Creates a view for the providers list.\n\t*/\n\t_createProvidersListView() {\n\t\tconst providersListView = new ListView(this.locale);\n\t\tprovidersListView.extendTemplate({ attributes: { class: [\"ck-link-form__providers-list\"] } });\n\t\tprovidersListView.items.bindTo(this.providersListChildren).using((def) => {\n\t\t\tconst listItemView = new ListItemView(this.locale);\n\t\t\tlistItemView.children.add(def);\n\t\t\treturn listItemView;\n\t\t});\n\t\treturn providersListView;\n\t}\n\t/**\n\t* Creates a labeled input view for the \"Displayed text\" field.\n\t*/\n\t_createDisplayedTextInput() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n\t\tlabeledInput.label = t(\"Displayed text\");\n\t\tlabeledInput.class = \"ck-labeled-field-view_full-width\";\n\t\treturn labeledInput;\n\t}\n\t/**\n\t* Creates a labeled input view for the URL field.\n\t*\n\t* @returns Labeled field view instance.\n\t*/\n\t_createUrlInput() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n\t\tlabeledInput.fieldView.inputMode = \"url\";\n\t\tlabeledInput.label = t(\"Link URL\");\n\t\tlabeledInput.class = \"ck-labeled-field-view_full-width\";\n\t\treturn labeledInput;\n\t}\n\t/**\n\t* Populates the {@link #children} collection of the form.\n\t*/\n\t_createFormChildren() {\n\t\tthis.children.add(new FormRowView(this.locale, {\n\t\t\tchildren: [this.displayedTextInputView],\n\t\t\tclass: [\"ck-form__row_large-top-padding\"]\n\t\t}));\n\t\tthis.children.add(new FormRowView(this.locale, {\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView,\n\t\t\t\tthis.manualDecoratorsButtonView,\n\t\t\t\tthis.saveButtonView\n\t\t\t],\n\t\t\tclass: [\n\t\t\t\t\"ck-form__row_with-submit\",\n\t\t\t\t\"ck-form__row_large-top-padding\",\n\t\t\t\t\"ck-form__row_large-bottom-padding\"\n\t\t\t]\n\t\t}));\n\t}\n\t/**\n\t* The native DOM `value` of the {@link #urlInputView} element.\n\t*\n\t* **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t* which works one way only and may not represent the actual state of the component in the DOM.\n\t*/\n\tget url() {\n\t\tconst { element } = this.urlInputView.fieldView;\n\t\tif (!element) return null;\n\t\treturn element.value.trim();\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 link/ui/linkprovideritemsview\n*/\n/**\n* The link provider items view.\n*/\nvar LinkProviderItemsView = class extends View {\n\t/**\n\t* Tracks information about DOM focus in the form.\n\t*/\n\tfocusTracker = new FocusTracker();\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes = new KeystrokeHandler();\n\t/**\n\t* The Back button view displayed in the header.\n\t*/\n\tbackButtonView;\n\t/**\n\t* The List view of links buttons.\n\t*/\n\tlistView;\n\t/**\n\t* The collection of child views, which is bind with the `listView`.\n\t*/\n\tlistChildren;\n\t/**\n\t* The view displayed when the list is empty.\n\t*/\n\temptyListInformation;\n\t/**\n\t* A collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of views that can be focused in the form.\n\t*/\n\t_focusables = new ViewCollection();\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* Creates an instance of the {@link module:link/ui/linkprovideritemsview~LinkProviderItemsView} class.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.listChildren = this.createCollection();\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.listView = this._createListView();\n\t\tthis.emptyListInformation = this._createEmptyLinksListItemView();\n\t\tthis.children = this.createCollection([this._createHeaderView(), this.emptyListInformation]);\n\t\tthis.set(\"title\", \"\");\n\t\tthis.set(\"emptyListPlaceholder\", \"\");\n\t\tthis.set(\"hasItems\", false);\n\t\tthis.listenTo(this.listChildren, \"change\", () => {\n\t\t\tthis.hasItems = this.listChildren.length > 0;\n\t\t});\n\t\tthis.on(\"change:hasItems\", (evt, propName, hasItems) => {\n\t\t\tif (hasItems) {\n\t\t\t\tthis.children.remove(this.emptyListInformation);\n\t\t\t\tthis.children.add(this.listView);\n\t\t\t} else {\n\t\t\t\tthis.children.remove(this.listView);\n\t\t\t\tthis.children.add(this.emptyListInformation);\n\t\t\t}\n\t\t});\n\t\tthis.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis.fire(\"cancel\");\n\t\t\tcancel();\n\t\t});\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-link-providers\"],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\t[this.listView, this.backButtonView].forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis.focusTracker.add(v.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the fist {@link #_focusables} in the form.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Creates a view for the list at the bottom.\n\t*/\n\t_createListView() {\n\t\tconst listView = new ListView(this.locale);\n\t\tlistView.extendTemplate({ attributes: { class: [\"ck-link-providers__list\"] } });\n\t\tlistView.items.bindTo(this.listChildren).using((button) => {\n\t\t\tconst listItemView = new ListItemView(this.locale);\n\t\t\tlistItemView.children.add(button);\n\t\t\treturn listItemView;\n\t\t});\n\t\treturn listView;\n\t}\n\t/**\n\t* Creates a back button view that cancels the form.\n\t*/\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn backButton;\n\t}\n\t/**\n\t* Creates a header view for the form.\n\t*/\n\t_createHeaderView() {\n\t\tconst header = new FormHeaderView(this.locale);\n\t\theader.bind(\"label\").to(this, \"title\");\n\t\theader.children.add(this.backButtonView, 0);\n\t\treturn header;\n\t}\n\t/**\n\t* Creates an info view for an empty list.\n\t*/\n\t_createEmptyLinksListItemView() {\n\t\tconst view = new View(this.locale);\n\t\tview.setTemplate({\n\t\t\ttag: \"p\",\n\t\t\tattributes: { class: [\"ck\", \"ck-link__empty-list-info\"] },\n\t\t\tchildren: [{ text: this.bindTemplate.to(\"emptyListPlaceholder\") }]\n\t\t});\n\t\treturn view;\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 link/ui/linkpropertiesview\n*/\n/**\n* The link properties view controller class.\n*\n* See {@link module:link/ui/linkpropertiesview~LinkPropertiesView}.\n*/\nvar LinkPropertiesView = class extends View {\n\t/**\n\t* Tracks information about DOM focus in the form.\n\t*/\n\tfocusTracker = new FocusTracker();\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes = new KeystrokeHandler();\n\t/**\n\t* The Back button view displayed in the header.\n\t*/\n\tbackButtonView;\n\t/**\n\t* A collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of {@link module:ui/button/switchbuttonview~SwitchButtonView},\n\t* which corresponds to {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators}\n\t* configured in the editor.\n\t*/\n\tlistChildren;\n\t/**\n\t* A collection of views that can be focused in the form.\n\t*/\n\t_focusables = new ViewCollection();\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* Creates an instance of the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} class.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.listChildren = this.createCollection();\n\t\tthis.children = this.createCollection([this._createHeaderView(), this._createListView()]);\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-link-properties\"],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t\tthis.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis.fire(\"back\");\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\t[...this.listChildren, this.backButtonView].forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis.focusTracker.add(v.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the fist {@link #_focusables} in the form.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Creates a back button view.\n\t*/\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"back\");\n\t\treturn backButton;\n\t}\n\t/**\n\t* Creates a header view for the form.\n\t*/\n\t_createHeaderView() {\n\t\tconst t = this.locale.t;\n\t\tconst header = new FormHeaderView(this.locale, { label: t(\"Link properties\") });\n\t\theader.children.add(this.backButtonView, 0);\n\t\treturn header;\n\t}\n\t/**\n\t* Creates a form view that displays the {@link #listChildren} collection.\n\t*/\n\t_createListView() {\n\t\tconst listView = new ListView(this.locale);\n\t\tlistView.extendTemplate({ attributes: { class: [\"ck-link__list\"] } });\n\t\tlistView.items.bindTo(this.listChildren).using((item) => {\n\t\t\tconst listItemView = new ListItemView(this.locale);\n\t\t\tlistItemView.children.add(item);\n\t\t\treturn listItemView;\n\t\t});\n\t\treturn listView;\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 link/ui/linkbuttonview\n*/\n/**\n* Represents a view for a dropdown menu button.\n*/\nvar LinkButtonView = class extends ButtonView {\n\t/**\n\t* An icon that displays an arrow to indicate a direction of the menu.\n\t*/\n\tarrowView;\n\t/**\n\t* Creates an instance of the dropdown menu button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set({ withText: true });\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-link__button\"] } });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.arrowView);\n\t}\n\t/**\n\t* Creates the arrow view instance.\n\t*\n\t* @private\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new IconView();\n\t\tarrowView.content = IconNextArrow;\n\t\treturn arrowView;\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 link/linkui\n*/\nconst VISUAL_SELECTION_MARKER_NAME = \"link-ui\";\n/**\n* The link UI plugin. It introduces the `'link'` and `'unlink'` buttons and support for the <kbd>Ctrl+K</kbd> keystroke.\n*\n* It uses the\n* {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n*/\nvar LinkUI = class extends Plugin {\n\t/**\n\t* The toolbar view displayed inside of the balloon.\n\t*/\n\ttoolbarView = null;\n\t/**\n\t* The form view displayed inside the balloon.\n\t*/\n\tformView = null;\n\t/**\n\t* The view displaying links list.\n\t*/\n\tlinkProviderItemsView = null;\n\t/**\n\t* The form view displaying properties link settings.\n\t*/\n\tpropertiesView = null;\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* The collection of the link providers.\n\t*/\n\t_linksProviders = new Collection();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon, LinkEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LinkUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\tthis.set(\"selectedLinkableText\", void 0);\n\t\teditor.editing.view.addObserver(ClickObserver);\n\t\tthis._balloon = editor.plugins.get(ContextualBalloon);\n\t\tthis._registerComponents();\n\t\tthis._registerEditingOpeners();\n\t\tthis._enableBalloonActivators();\n\t\teditor.conversion.for(\"editingDowncast\").markerToHighlight({\n\t\t\tmodel: VISUAL_SELECTION_MARKER_NAME,\n\t\t\tview: { classes: [\"ck-fake-link-selection\"] }\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").markerToElement({\n\t\t\tmodel: VISUAL_SELECTION_MARKER_NAME,\n\t\t\tview: (data, { writer }) => {\n\t\t\t\tif (!data.markerRange.isCollapsed) return null;\n\t\t\t\tconst markerElement = writer.createUIElement(\"span\");\n\t\t\t\twriter.addClass([\"ck-fake-link-selection\", \"ck-fake-link-selection_collapsed\"], markerElement);\n\t\t\t\treturn markerElement;\n\t\t\t}\n\t\t});\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Create link\"),\n\t\t\tkeystroke: LINK_KEYSTROKE\n\t\t}, {\n\t\t\tlabel: t(\"Move out of a link\"),\n\t\t\tkeystroke: [[\"arrowleft\", \"arrowleft\"], [\"arrowright\", \"arrowright\"]]\n\t\t}] });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this.propertiesView) this.propertiesView.destroy();\n\t\tif (this.formView) this.formView.destroy();\n\t\tif (this.toolbarView) this.toolbarView.destroy();\n\t\tif (this.linkProviderItemsView) this.linkProviderItemsView.destroy();\n\t}\n\t/**\n\t* Registers list of buttons below the link form view that\n\t* open a list of links provided by the clicked provider.\n\t*/\n\tregisterLinksListProvider(provider) {\n\t\tconst insertIndex = this._linksProviders.filter((existing) => (existing.order || 0) <= (provider.order || 0)).length;\n\t\tthis._linksProviders.add(provider, insertIndex);\n\t}\n\t/**\n\t* Creates views.\n\t*/\n\t_createViews() {\n\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.formView = this._createFormView();\n\t\tif (linkCommand.manualDecorators.length) this.propertiesView = this._createPropertiesView();\n\t\tthis._enableUserBalloonInteractions();\n\t}\n\t/**\n\t* Creates the ToolbarView instance.\n\t*/\n\t_createToolbarView() {\n\t\tconst editor = this.editor;\n\t\tconst toolbarView = new ToolbarView(editor.locale);\n\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\ttoolbarView.class = \"ck-link-toolbar\";\n\t\tlet toolbarItems = editor.config.get(\"link.toolbar\");\n\t\tif (!linkCommand.manualDecorators.length) toolbarItems = toolbarItems.filter((item) => item !== \"linkProperties\");\n\t\ttoolbarView.fillFromConfig(toolbarItems, editor.ui.componentFactory);\n\t\ttoolbarView.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis._hideUI();\n\t\t\tcancel();\n\t\t});\n\t\ttoolbarView.keystrokes.set(LINK_KEYSTROKE, (data, cancel) => {\n\t\t\tthis._addFormView();\n\t\t\tcancel();\n\t\t});\n\t\teditor.ui.addToolbar(toolbarView, {\n\t\t\tisContextual: true,\n\t\t\tbeforeFocus: () => {\n\t\t\t\tif (this._getSelectedLinkElement() && !this._isToolbarVisible) this._showUI(true);\n\t\t\t},\n\t\t\tafterBlur: () => {\n\t\t\t\tthis._hideUI(false);\n\t\t\t}\n\t\t});\n\t\treturn toolbarView;\n\t}\n\t/**\n\t* Creates the {@link module:link/ui/linkformview~LinkFormView} instance.\n\t*/\n\t_createFormView() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\tconst defaultProtocol = editor.config.get(\"link.defaultProtocol\");\n\t\tconst formView = new (CssTransitionDisablerMixin(LinkFormView))(editor.locale, getFormValidators(editor));\n\t\tformView.displayedTextInputView.bind(\"isEnabled\").to(this, \"selectedLinkableText\", (value) => value !== void 0);\n\t\tformView.urlInputView.bind(\"isEnabled\").to(linkCommand, \"isEnabled\");\n\t\tformView.saveButtonView.bind(\"isEnabled\").to(linkCommand, \"isEnabled\");\n\t\tformView.saveButtonView.bind(\"label\").to(linkCommand, \"value\", (value) => value ? t(\"Update\") : t(\"Insert\"));\n\t\tthis.listenTo(formView, \"submit\", () => {\n\t\t\tif (formView.isValid()) {\n\t\t\t\tconst url = formView.urlInputView.fieldView.element.value;\n\t\t\t\tconst parsedUrl = addLinkProtocolIfApplicable(url, defaultProtocol);\n\t\t\t\tconst displayedText = formView.displayedTextInputView.fieldView.element.value;\n\t\t\t\teditor.execute(\"link\", parsedUrl, this._getDecoratorSwitchesState(), displayedText !== this.selectedLinkableText ? displayedText : void 0);\n\t\t\t\tthis._closeFormView();\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(formView.urlInputView, \"change:errorText\", () => {\n\t\t\teditor.ui.update();\n\t\t});\n\t\tthis.listenTo(formView, \"cancel\", () => {\n\t\t\tthis._closeFormView();\n\t\t});\n\t\tformView.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis._closeFormView();\n\t\t\tcancel();\n\t\t});\n\t\tformView.providersListChildren.bindTo(this._linksProviders).using((provider) => this._createLinksListProviderButton(provider));\n\t\tformView.manualDecoratorsButtonView.isVisible = linkCommand.manualDecorators.length > 0;\n\t\tthis.listenTo(formView, \"showDecorators\", () => {\n\t\t\tthis._addPropertiesView();\n\t\t});\n\t\treturn formView;\n\t}\n\t/**\n\t* Creates a sorted array of buttons with link names.\n\t*/\n\t_createLinkProviderListView(provider) {\n\t\treturn provider.getListItems().map(({ href, label, icon }) => {\n\t\t\tconst buttonView = new ButtonView();\n\t\t\tbuttonView.set({\n\t\t\t\tlabel,\n\t\t\t\ticon,\n\t\t\t\ttooltip: false,\n\t\t\t\twithText: true\n\t\t\t});\n\t\t\tbuttonView.on(\"execute\", () => {\n\t\t\t\tthis.formView.resetFormStatus();\n\t\t\t\tthis.formView.urlInputView.fieldView.value = href;\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t\tthis._removeLinksProviderView();\n\t\t\t\tthis.formView.focus();\n\t\t\t});\n\t\t\treturn buttonView;\n\t\t});\n\t}\n\t/**\n\t* Creates a view for links provider.\n\t*/\n\t_createLinkProviderItemsView(provider) {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst view = new LinkProviderItemsView(editor.locale);\n\t\tconst { emptyListPlaceholder, label } = provider;\n\t\tview.emptyListPlaceholder = emptyListPlaceholder || t(\"No links available\");\n\t\tview.title = label;\n\t\tthis.listenTo(view, \"cancel\", () => {\n\t\t\teditor.editing.view.focus();\n\t\t\tthis._removeLinksProviderView();\n\t\t\tthis.formView.focus();\n\t\t});\n\t\treturn view;\n\t}\n\t/**\n\t* Creates the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} instance.\n\t*/\n\t_createPropertiesView() {\n\t\tconst editor = this.editor;\n\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\tconst view = new (CssTransitionDisablerMixin(LinkPropertiesView))(editor.locale);\n\t\tthis.listenTo(view, \"back\", () => {\n\t\t\tif (this._isFormInPanel) {\n\t\t\t\tthis._removePropertiesView();\n\t\t\t\tthis.formView.focus();\n\t\t\t} else {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t\tthis._removePropertiesView();\n\t\t\t}\n\t\t});\n\t\tview.listChildren.bindTo(linkCommand.manualDecorators).using((manualDecorator) => {\n\t\t\tconst button = new SwitchButtonView(editor.locale);\n\t\t\tbutton.set({\n\t\t\t\tlabel: manualDecorator.label,\n\t\t\t\twithText: true\n\t\t\t});\n\t\t\tbutton.bind(\"isOn\").toMany([manualDecorator, linkCommand], \"value\", (decoratorValue, commandValue) => {\n\t\t\t\treturn commandValue === void 0 && decoratorValue === void 0 ? !!manualDecorator.defaultValue : !!decoratorValue;\n\t\t\t});\n\t\t\tbutton.on(\"execute\", () => {\n\t\t\t\tconst newValue = !button.isOn;\n\t\t\t\tif (linkCommand.value !== void 0) editor.execute(\"link\", linkCommand.value, {\n\t\t\t\t\t...this._getDecoratorSwitchesState(),\n\t\t\t\t\t[manualDecorator.id]: newValue\n\t\t\t\t});\n\t\t\t\telse this._togglePendingManualDecorator(manualDecorator, newValue);\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t\treturn view;\n\t}\n\t/**\n\t* Obtains the state of the manual decorators.\n\t*/\n\t_getDecoratorSwitchesState() {\n\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\treturn Array.from(linkCommand.manualDecorators).reduce((accumulator, manualDecorator) => {\n\t\t\tconst value = linkCommand.value === void 0 && manualDecorator.value === void 0 ? manualDecorator.defaultValue : manualDecorator.value;\n\t\t\treturn {\n\t\t\t\t...accumulator,\n\t\t\t\t[manualDecorator.id]: !!value\n\t\t\t};\n\t\t}, {});\n\t}\n\t/**\n\t* Toggles the state of a manual decorator while a new link is being created, that is, before it is\n\t* inserted into the document. Since there is no link (and no command value) to execute the `'link'`\n\t* command against yet, the new state is kept on the decorator's own observable\n\t* {@link module:link/utils/manualdecorator~LinkManualDecorator#value} instead of the model.\n\t*/\n\t_togglePendingManualDecorator(manualDecorator, newValue) {\n\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\tconst allDecorators = Array.from(linkCommand.manualDecorators);\n\t\tconst decoratorStates = this._getDecoratorSwitchesState();\n\t\tconst previousDecoratorStates = allDecorators.map((decorator) => ({\n\t\t\tid: decorator.id,\n\t\t\tattributes: decorator.attributes,\n\t\t\tstyles: decorator.styles,\n\t\t\tvalue: decoratorStates[decorator.id]\n\t\t}));\n\t\tdecoratorStates[manualDecorator.id] = newValue;\n\t\tconst resolvedStates = resolveConflictingDecorators({\n\t\t\tdecoratorStates,\n\t\t\tallDecorators: previousDecoratorStates\n\t\t});\n\t\tfor (const decorator of allDecorators) decorator.value = resolvedStates[decorator.id];\n\t}\n\t/**\n\t* Clears the state of all manual decorators that may have been toggled while creating a link that,\n\t* in the end, was never inserted into the document (for example, the user canceled the form).\n\t*/\n\t_resetPendingManualDecoratorsState() {\n\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\tfor (const manualDecorator of linkCommand.manualDecorators) manualDecorator.value = void 0;\n\t}\n\t/**\n\t* Registers listeners used in editing plugin, used to open links.\n\t*/\n\t_registerEditingOpeners() {\n\t\tthis.editor.plugins.get(LinkEditing)._registerLinkOpener((href) => {\n\t\t\tconst match = this._getLinkProviderLinkByHref(href);\n\t\t\tif (!match) return false;\n\t\t\tconst { item, provider } = match;\n\t\t\tif (provider.navigate) return provider.navigate(item);\n\t\t\treturn false;\n\t\t});\n\t}\n\t/**\n\t* Registers components in the ComponentFactory.\n\t*/\n\t_registerComponents() {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(\"link\", () => {\n\t\t\tconst button = this._createButton(ButtonView);\n\t\t\tbutton.set({ tooltip: true });\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:link\", () => {\n\t\t\tconst button = this._createButton(MenuBarMenuListItemButtonView);\n\t\t\tbutton.set({ role: \"menuitemcheckbox\" });\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"linkPreview\", (locale) => {\n\t\t\tconst button = new LinkPreviewButtonView(locale);\n\t\t\tconst allowedProtocols = editor.config.get(\"link.allowedProtocols\");\n\t\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\t\tconst t = locale.t;\n\t\t\tbutton.bind(\"isEnabled\").to(linkCommand, \"value\", (href) => !!href);\n\t\t\tbutton.bind(\"href\").to(linkCommand, \"value\", (href) => {\n\t\t\t\treturn href && ensureSafeUrl(href, allowedProtocols);\n\t\t\t});\n\t\t\tconst setHref = (href) => {\n\t\t\t\tif (href === \"\") {\n\t\t\t\t\tbutton.label = t(\"This link has no URL\");\n\t\t\t\t\tbutton.icon = void 0;\n\t\t\t\t\tbutton.tooltip = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!href) {\n\t\t\t\t\tbutton.label = void 0;\n\t\t\t\t\tbutton.icon = void 0;\n\t\t\t\t\tbutton.tooltip = t(\"Open link in new tab\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst selectedLinksProviderLink = this._getLinkProviderLinkByHref(href);\n\t\t\t\tif (selectedLinksProviderLink) {\n\t\t\t\t\tconst { label, tooltip, icon } = selectedLinksProviderLink.item;\n\t\t\t\t\tbutton.label = label;\n\t\t\t\t\tbutton.tooltip = tooltip || false;\n\t\t\t\t\tbutton.icon = icon;\n\t\t\t\t} else {\n\t\t\t\t\tbutton.label = href;\n\t\t\t\t\tbutton.icon = void 0;\n\t\t\t\t\tbutton.tooltip = t(\"Open link in new tab\");\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetHref(linkCommand.value);\n\t\t\tthis.listenTo(linkCommand, \"change:value\", (evt, name, href) => {\n\t\t\t\tsetHref(href);\n\t\t\t});\n\t\t\tthis.listenTo(button, \"navigate\", (evt, href, cancel) => {\n\t\t\t\tconst selectedLinksProviderLink = this._getLinkProviderLinkByHref(href);\n\t\t\t\tif (!selectedLinksProviderLink) return;\n\t\t\t\tconst { provider, item } = selectedLinksProviderLink;\n\t\t\t\tconst { navigate } = provider;\n\t\t\t\tif (navigate && navigate(item)) {\n\t\t\t\t\tevt.stop();\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"unlink\", (locale) => {\n\t\t\tconst unlinkCommand = editor.commands.get(\"unlink\");\n\t\t\tconst button = new ButtonView(locale);\n\t\t\tconst t = locale.t;\n\t\t\tbutton.set({\n\t\t\t\tlabel: t(\"Unlink\"),\n\t\t\t\ticon: IconUnlink,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tbutton.bind(\"isEnabled\").to(unlinkCommand);\n\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\teditor.execute(\"unlink\");\n\t\t\t\tthis._hideUI();\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"editLink\", (locale) => {\n\t\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\t\tconst button = new ButtonView(locale);\n\t\t\tconst t = locale.t;\n\t\t\tbutton.set({\n\t\t\t\tlabel: t(\"Edit link\"),\n\t\t\t\ticon: IconPencil,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tbutton.bind(\"isEnabled\").to(linkCommand);\n\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\tthis._addFormView();\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"linkProperties\", (locale) => {\n\t\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\t\tconst button = new ButtonView(locale);\n\t\t\tconst t = locale.t;\n\t\t\tbutton.set({\n\t\t\t\tlabel: t(\"Link properties\"),\n\t\t\t\ticon: IconSettings,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tbutton.bind(\"isEnabled\").to(linkCommand, \"isEnabled\", linkCommand, \"value\", linkCommand, \"manualDecorators\", (isEnabled, href, manualDecorators) => isEnabled && href !== void 0 && manualDecorators.length > 0);\n\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\tthis._addPropertiesView();\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t}\n\t/**\n\t* Creates a links button view.\n\t*/\n\t_createLinksListProviderButton(linkProvider) {\n\t\tconst locale = this.editor.locale;\n\t\tconst linksButton = new LinkButtonView(locale);\n\t\tlinksButton.set({ label: linkProvider.label });\n\t\tthis.listenTo(linksButton, \"execute\", () => {\n\t\t\tthis._showLinksProviderView(linkProvider);\n\t\t});\n\t\treturn linksButton;\n\t}\n\t/**\n\t* Creates a button for link command to use either in toolbar or in menu bar.\n\t*/\n\t_createButton(ButtonClass) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get(\"link\");\n\t\tconst view = new ButtonClass(editor.locale);\n\t\tconst t = locale.t;\n\t\tview.set({\n\t\t\tlabel: t(\"Link\"),\n\t\t\ticon: IconLink,\n\t\t\tkeystroke: LINK_KEYSTROKE,\n\t\t\tisToggleable: true\n\t\t});\n\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\tview.bind(\"isOn\").to(command, \"value\", (value) => !!value);\n\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\teditor.editing.view.scrollToTheSelection();\n\t\t\tthis._showUI(true);\n\t\t\tif (this._getSelectedLinkElement()) this._addFormView();\n\t\t});\n\t\treturn view;\n\t}\n\t/**\n\t* Attaches actions that control whether the balloon panel containing the\n\t* {@link #formView} should be displayed.\n\t*/\n\t_enableBalloonActivators() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tthis.listenTo(viewDocument, \"click\", () => {\n\t\t\tif (this._getSelectedLinkElement()) this._showUI();\n\t\t});\n\t\teditor.keystrokes.set(LINK_KEYSTROKE, (keyEvtData, cancel) => {\n\t\t\tcancel();\n\t\t\tif (editor.commands.get(\"link\").isEnabled) {\n\t\t\t\teditor.editing.view.scrollToTheSelection();\n\t\t\t\tthis._showUI(true);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Attaches actions that control whether the balloon panel containing the\n\t* {@link #formView} is visible or not.\n\t*/\n\t_enableUserBalloonInteractions() {\n\t\tthis.editor.keystrokes.set(\"Tab\", (data, cancel) => {\n\t\t\tif (this._isToolbarVisible && !this.toolbarView.focusTracker.isFocused) {\n\t\t\t\tthis.toolbarView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t\tthis.editor.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tif (this._isUIVisible) {\n\t\t\t\tthis._hideUI();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\tclickOutsideHandler({\n\t\t\temitter: this.formView,\n\t\t\tactivator: () => this._isUIInPanel,\n\t\t\tcontextElements: () => [this._balloon.view.element],\n\t\t\tcallback: () => {\n\t\t\t\tthis._hideUI(false);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Adds the {@link #toolbarView} to the {@link #_balloon}.\n\t*\n\t* @internal\n\t*/\n\t_addToolbarView() {\n\t\tif (!this.toolbarView) this._createViews();\n\t\tif (this._isToolbarInPanel) return;\n\t\tthis._balloon.add({\n\t\t\tview: this.toolbarView,\n\t\t\tposition: this._getBalloonPositionData(),\n\t\t\tballoonClassName: \"ck-toolbar-container\"\n\t\t});\n\t}\n\t/**\n\t* Adds the {@link #formView} to the {@link #_balloon}.\n\t*/\n\t_addFormView() {\n\t\tif (!this.formView) this._createViews();\n\t\tif (this._isFormInPanel) return;\n\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\tthis.formView.disableCssTransitions();\n\t\tthis.formView.resetFormStatus();\n\t\tthis.formView.backButtonView.isVisible = linkCommand.isEnabled && linkCommand.value !== void 0;\n\t\tthis._balloon.add({\n\t\t\tview: this.formView,\n\t\t\tposition: this._getBalloonPositionData()\n\t\t});\n\t\tthis.selectedLinkableText = this._getSelectedLinkableText();\n\t\tthis.formView.displayedTextInputView.fieldView.value = this.selectedLinkableText || \"\";\n\t\tthis.formView.urlInputView.fieldView.value = linkCommand.value || \"\";\n\t\tif (this._balloon.visibleView === this.formView) this.formView.urlInputView.fieldView.select();\n\t\tthis.formView.enableCssTransitions();\n\t}\n\t/**\n\t* Adds the {@link #propertiesView} to the {@link #_balloon}.\n\t*/\n\t_addPropertiesView() {\n\t\tif (!this.propertiesView) this._createViews();\n\t\tif (this._arePropertiesInPanel) return;\n\t\tthis.propertiesView.disableCssTransitions();\n\t\tthis._balloon.add({\n\t\t\tview: this.propertiesView,\n\t\t\tposition: this._getBalloonPositionData()\n\t\t});\n\t\tthis.propertiesView.enableCssTransitions();\n\t\tthis.propertiesView.focus();\n\t}\n\t/**\n\t* Shows the view with links provided by the given provider.\n\t*/\n\t_showLinksProviderView(provider) {\n\t\tif (this.linkProviderItemsView) this._removeLinksProviderView();\n\t\tthis.linkProviderItemsView = this._createLinkProviderItemsView(provider);\n\t\tthis._addLinkProviderItemsView(provider);\n\t}\n\t/**\n\t* Adds the {@link #linkProviderItemsView} to the {@link #_balloon}.\n\t*/\n\t_addLinkProviderItemsView(provider) {\n\t\tthis.linkProviderItemsView.listChildren.clear();\n\t\tthis.linkProviderItemsView.listChildren.addMany(this._createLinkProviderListView(provider));\n\t\tthis._balloon.add({\n\t\t\tview: this.linkProviderItemsView,\n\t\t\tposition: this._getBalloonPositionData()\n\t\t});\n\t\tthis.linkProviderItemsView.focus();\n\t}\n\t/**\n\t* Closes the form view. Decides whether the balloon should be hidden completely or if the action view should be shown. This is\n\t* decided upon the link command value (which has a value if the document selection is in the link).\n\t*/\n\t_closeFormView() {\n\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\tthis.selectedLinkableText = void 0;\n\t\tif (linkCommand.value !== void 0) this._removeFormView();\n\t\telse this._hideUI();\n\t}\n\t/**\n\t* Removes the {@link #propertiesView} from the {@link #_balloon}.\n\t*/\n\t_removePropertiesView() {\n\t\tif (this._arePropertiesInPanel) this._balloon.remove(this.propertiesView);\n\t}\n\t/**\n\t* Removes the {@link #linkProviderItemsView} from the {@link #_balloon}.\n\t*/\n\t_removeLinksProviderView() {\n\t\tif (this._isLinksListInPanel) this._balloon.remove(this.linkProviderItemsView);\n\t}\n\t/**\n\t* Removes the {@link #formView} from the {@link #_balloon}.\n\t*/\n\t_removeFormView(updateFocus = true) {\n\t\tif (this._isFormInPanel) {\n\t\t\tconst linkCommand = this.editor.commands.get(\"link\");\n\t\t\tthis.formView.saveButtonView.focus();\n\t\t\tthis.formView.displayedTextInputView.fieldView.reset();\n\t\t\tthis.formView.urlInputView.fieldView.reset();\n\t\t\tif (linkCommand.value === void 0) this._resetPendingManualDecoratorsState();\n\t\t\tthis._balloon.remove(this.formView);\n\t\t\tif (updateFocus) this.editor.editing.view.focus();\n\t\t\tthis._hideFakeVisualSelection();\n\t\t}\n\t}\n\t/**\n\t* Shows the correct UI type. It is either {@link #formView} or {@link #toolbarView}.\n\t*\n\t* @internal\n\t*/\n\t_showUI(forceVisible = false) {\n\t\tif (!this.formView) this._createViews();\n\t\tif (!this._getSelectedLinkElement()) {\n\t\t\tthis._showFakeVisualSelection();\n\t\t\tthis._addToolbarView();\n\t\t\tif (forceVisible) this._balloon.showStack(\"main\");\n\t\t\tthis._addFormView();\n\t\t} else {\n\t\t\tif (this._isToolbarVisible) this._addFormView();\n\t\t\telse this._addToolbarView();\n\t\t\tif (forceVisible) this._balloon.showStack(\"main\");\n\t\t}\n\t\tthis._startUpdatingUI();\n\t}\n\t/**\n\t* Removes the {@link #formView} from the {@link #_balloon}.\n\t*\n\t* See {@link #_addFormView}, {@link #_addToolbarView}.\n\t*/\n\t_hideUI(updateFocus = true) {\n\t\tconst editor = this.editor;\n\t\tif (!this._isUIInPanel) return;\n\t\tthis.stopListening(editor.ui, \"update\");\n\t\tthis.stopListening(this._balloon, \"change:visibleView\");\n\t\tif (updateFocus) editor.editing.view.focus();\n\t\tthis._removeLinksProviderView();\n\t\tthis._removePropertiesView();\n\t\tthis._removeFormView(updateFocus);\n\t\tif (this._isToolbarInPanel) this._balloon.remove(this.toolbarView);\n\t\tthis._hideFakeVisualSelection();\n\t}\n\t/**\n\t* Makes the UI react to the {@link module:ui/editorui/editorui~EditorUI#event:update} event to\n\t* reposition itself when the editor UI should be refreshed.\n\t*\n\t* See: {@link #_hideUI} to learn when the UI stops reacting to the `update` event.\n\t*/\n\t_startUpdatingUI() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tlet prevSelectedLink = this._getSelectedLinkElement();\n\t\tlet prevSelectionParent = getSelectionParent();\n\t\tconst update = () => {\n\t\t\tconst selectedLink = this._getSelectedLinkElement();\n\t\t\tconst selectionParent = getSelectionParent();\n\t\t\tif (prevSelectedLink && !selectedLink || !prevSelectedLink && selectionParent !== prevSelectionParent) this._hideUI();\n\t\t\telse if (this._isUIVisible) this._balloon.updatePosition(this._getBalloonPositionData());\n\t\t\tprevSelectedLink = selectedLink;\n\t\t\tprevSelectionParent = selectionParent;\n\t\t};\n\t\tfunction getSelectionParent() {\n\t\t\treturn viewDocument.selection.focus.getAncestors().reverse().find((node) => node.is(\"element\"));\n\t\t}\n\t\tthis.listenTo(editor.ui, \"update\", update);\n\t\tthis.listenTo(this._balloon, \"change:visibleView\", update);\n\t}\n\t/**\n\t* Returns `true` when {@link #propertiesView} is in the {@link #_balloon}.\n\t*/\n\tget _arePropertiesInPanel() {\n\t\treturn !!this.propertiesView && this._balloon.hasView(this.propertiesView);\n\t}\n\t/**\n\t* Returns `true` when {@link #linkProviderItemsView} is in the {@link #_balloon}.\n\t*/\n\tget _isLinksListInPanel() {\n\t\treturn !!this.linkProviderItemsView && this._balloon.hasView(this.linkProviderItemsView);\n\t}\n\t/**\n\t* Returns `true` when {@link #formView} is in the {@link #_balloon}.\n\t*/\n\tget _isFormInPanel() {\n\t\treturn !!this.formView && this._balloon.hasView(this.formView);\n\t}\n\t/**\n\t* Returns `true` when {@link #toolbarView} is in the {@link #_balloon}.\n\t*/\n\tget _isToolbarInPanel() {\n\t\treturn !!this.toolbarView && this._balloon.hasView(this.toolbarView);\n\t}\n\t/**\n\t* Returns `true` when {@link #propertiesView} is in the {@link #_balloon} and it is\n\t* currently visible.\n\t*/\n\tget _isPropertiesVisible() {\n\t\treturn !!this.propertiesView && this._balloon.visibleView === this.propertiesView;\n\t}\n\t/**\n\t* Returns `true` when {@link #formView} is in the {@link #_balloon} and it is\n\t* currently visible.\n\t*/\n\tget _isFormVisible() {\n\t\treturn !!this.formView && this._balloon.visibleView == this.formView;\n\t}\n\t/**\n\t* Returns `true` when {@link #toolbarView} is in the {@link #_balloon} and it is\n\t* currently visible.\n\t*/\n\tget _isToolbarVisible() {\n\t\treturn !!this.toolbarView && this._balloon.visibleView === this.toolbarView;\n\t}\n\t/**\n\t* Returns `true` when {@link #propertiesView}, {@link #toolbarView}, {@link #linkProviderItemsView}\n\t* or {@link #formView} is in the {@link #_balloon}.\n\t*/\n\tget _isUIInPanel() {\n\t\treturn this._arePropertiesInPanel || this._isLinksListInPanel || this._isFormInPanel || this._isToolbarInPanel;\n\t}\n\t/**\n\t* Returns `true` when {@link #propertiesView}, {@link #linkProviderItemsView}, {@link #toolbarView}\n\t* or {@link #formView} is in the {@link #_balloon} and it is currently visible.\n\t*/\n\tget _isUIVisible() {\n\t\treturn this._isPropertiesVisible || this._isLinksListInPanel || this._isFormVisible || this._isToolbarVisible;\n\t}\n\t/**\n\t* Returns positioning options for the {@link #_balloon}. They control the way the balloon is attached\n\t* to the target element or selection.\n\t*\n\t* If the selection is collapsed and inside a link element, the panel will be attached to the\n\t* entire link element. Otherwise, it will be attached to the selection.\n\t*/\n\t_getBalloonPositionData() {\n\t\tconst view = this.editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tif (this.editor.model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {\n\t\t\tconst markerViewElements = this.editor.editing.mapper.markerNameToElements(VISUAL_SELECTION_MARKER_NAME);\n\t\t\tif (markerViewElements) {\n\t\t\t\tconst markerViewElementsArray = Array.from(markerViewElements);\n\t\t\t\tconst newRange = view.createRange(view.createPositionBefore(markerViewElementsArray[0]), view.createPositionAfter(markerViewElementsArray[markerViewElementsArray.length - 1]));\n\t\t\t\treturn { target: view.domConverter.viewRangeToDom(newRange) };\n\t\t\t}\n\t\t}\n\t\treturn { target: () => {\n\t\t\tconst targetLink = this._getSelectedLinkElement();\n\t\t\treturn targetLink ? view.domConverter.mapViewToDom(targetLink) : view.domConverter.viewRangeToDom(viewDocument.selection.getFirstRange());\n\t\t} };\n\t}\n\t/**\n\t* Returns the link {@link module:engine/view/attributeelement~ViewAttributeElement} under\n\t* the {@link module:engine/view/document~ViewDocument editing view's} selection or `null`\n\t* if there is none.\n\t*\n\t* **Note**: For a non–collapsed selection, the link element is returned when **fully**\n\t* selected and the **only** element within the selection boundaries, or when\n\t* a linked widget is selected.\n\t*/\n\t_getSelectedLinkElement() {\n\t\tconst view = this.editor.editing.view;\n\t\tconst selection = view.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\t\tif (selection.isCollapsed || selectedElement && isWidget(selectedElement)) return findLinkElementAncestor(selection.getFirstPosition());\n\t\telse {\n\t\t\tconst range = selection.getFirstRange().getTrimmed();\n\t\t\tconst startLink = findLinkElementAncestor(range.start);\n\t\t\tconst endLink = findLinkElementAncestor(range.end);\n\t\t\tif (!startLink || startLink != endLink) return null;\n\t\t\tif (view.createRangeIn(startLink).getTrimmed().isEqual(range)) return startLink;\n\t\t\telse return null;\n\t\t}\n\t}\n\t/**\n\t* Returns selected link text content.\n\t* If link is not selected it returns the selected text.\n\t* If selection or link includes non text node (inline object or block) then returns undefined.\n\t*/\n\t_getSelectedLinkableText() {\n\t\tconst model = this.editor.model;\n\t\tconst editing = this.editor.editing;\n\t\tconst selectedLink = this._getSelectedLinkElement();\n\t\tif (!selectedLink) return extractTextFromLinkRange(model.document.selection.getFirstRange());\n\t\tconst viewLinkRange = editing.view.createRangeOn(selectedLink);\n\t\tconst linkRange = editing.mapper.toModelRange(viewLinkRange);\n\t\treturn extractTextFromLinkRange(linkRange);\n\t}\n\t/**\n\t* Returns a provider by its URL.\n\t*\n\t* @param href URL of the link.\n\t* @returns Link provider and item or `null` if not found.\n\t*/\n\t_getLinkProviderLinkByHref(href) {\n\t\tif (!href) return null;\n\t\tfor (const provider of this._linksProviders) {\n\t\t\tconst item = provider.getItem ? provider.getItem(href) : provider.getListItems().find((item) => item.href === href);\n\t\t\tif (item) return {\n\t\t\t\tprovider,\n\t\t\t\titem\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Displays a fake visual selection when the contextual balloon is displayed.\n\t*\n\t* This adds a 'link-ui' marker into the document that is rendered as a highlight on selected text fragment.\n\t*/\n\t_showFakeVisualSelection() {\n\t\tconst model = this.editor.model;\n\t\tmodel.change((writer) => {\n\t\t\tconst range = model.document.selection.getFirstRange();\n\t\t\tif (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) writer.updateMarker(VISUAL_SELECTION_MARKER_NAME, { range });\n\t\t\telse if (range.start.isAtEnd) {\n\t\t\t\tconst startPosition = range.start.getLastMatchingPosition(({ item }) => !model.schema.isContent(item), { boundaries: range });\n\t\t\t\twriter.addMarker(VISUAL_SELECTION_MARKER_NAME, {\n\t\t\t\t\tusingOperation: false,\n\t\t\t\t\taffectsData: false,\n\t\t\t\t\trange: writer.createRange(startPosition, range.end)\n\t\t\t\t});\n\t\t\t} else writer.addMarker(VISUAL_SELECTION_MARKER_NAME, {\n\t\t\t\tusingOperation: false,\n\t\t\t\taffectsData: false,\n\t\t\t\trange\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Hides the fake visual selection created in {@link #_showFakeVisualSelection}.\n\t*/\n\t_hideFakeVisualSelection() {\n\t\tconst model = this.editor.model;\n\t\tif (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) model.change((writer) => {\n\t\t\twriter.removeMarker(VISUAL_SELECTION_MARKER_NAME);\n\t\t});\n\t}\n};\n/**\n* Returns a link element if there's one among the ancestors of the provided `Position`.\n*\n* @param View position to analyze.\n* @returns Link element at the position or null.\n*/\nfunction findLinkElementAncestor(position) {\n\treturn position.getAncestors().find((ancestor) => isLinkElement(ancestor)) || null;\n}\n/**\n* Returns link form validation callbacks.\n*\n* @param editor Editor instance.\n*/\nfunction getFormValidators(editor) {\n\tconst t = editor.t;\n\tconst allowCreatingEmptyLinks = editor.config.get(\"link.allowCreatingEmptyLinks\");\n\treturn [(form) => {\n\t\tif (!allowCreatingEmptyLinks && !form.url.length) return t(\"Link URL must not be empty.\");\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 link/autolink\n*/\nconst MIN_LINK_LENGTH_WITH_SPACE_AT_END = 4;\nconst URL_REG_EXP = /* @__PURE__ */ new RegExp(\"(^|\\\\s)(((?:(?:(?:https?|ftp):)?\\\\/\\\\/)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(((?!www\\\\.)|(www\\\\.))(?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.)+(?:[a-z\\\\u00a1-\\\\uffff]{2,63}))|localhost)(?::\\\\d{2,5})?(?:[/?#]\\\\S*)?)|((www.|(\\\\S+@))((?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.))+(?:[a-z\\\\u00a1-\\\\uffff]{2,63})))$\", \"i\");\nconst URL_GROUP_IN_MATCH = 2;\n/**\n* The autolink plugin.\n*/\nvar AutoLink = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Delete, LinkEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AutoLink\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tselection.on(\"change:range\", () => {\n\t\t\tthis.isEnabled = !selection.anchor.parent.is(\"element\", \"codeBlock\");\n\t\t});\n\t\tthis._enableTypingHandling();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tthis._enableEnterHandling();\n\t\tthis._enableShiftEnterHandling();\n\t\tthis._enablePasteLinking();\n\t}\n\t/**\n\t* For given position, returns a range that includes the whole link that contains the position.\n\t*\n\t* If position is not inside a link, returns `null`.\n\t*/\n\t_expandLinkRange(model, position) {\n\t\tif (position.textNode && position.textNode.hasAttribute(\"linkHref\")) return findAttributeRange(position, \"linkHref\", position.textNode.getAttribute(\"linkHref\"), model);\n\t\telse return null;\n\t}\n\t/**\n\t* Extends the document selection to includes all links that intersects with given `selectedRange`.\n\t*/\n\t_selectEntireLinks(writer, selectedRange) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selStart = selection.getFirstPosition();\n\t\tconst selEnd = selection.getLastPosition();\n\t\tlet updatedSelection = selectedRange.getJoined(this._expandLinkRange(model, selStart) || selectedRange);\n\t\tif (updatedSelection) updatedSelection = updatedSelection.getJoined(this._expandLinkRange(model, selEnd) || selectedRange);\n\t\tif (updatedSelection && (updatedSelection.start.isBefore(selStart) || updatedSelection.end.isAfter(selEnd))) writer.setSelection(updatedSelection);\n\t}\n\t/**\n\t* Enables autolinking on pasting a URL when some content is selected.\n\t*/\n\t_enablePasteLinking() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst clipboardPipeline = editor.plugins.get(\"ClipboardPipeline\");\n\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\tclipboardPipeline.on(\"inputTransformation\", (evt, data) => {\n\t\t\tif (!this.isEnabled || !linkCommand.isEnabled || selection.isCollapsed || data.method !== \"paste\") return;\n\t\t\tif (selection.rangeCount > 1) return;\n\t\t\tconst selectedRange = selection.getFirstRange();\n\t\t\tconst newLink = data.dataTransfer.getData(\"text/plain\");\n\t\t\tif (!newLink) return;\n\t\t\tconst matches = newLink.match(URL_REG_EXP);\n\t\t\tif (matches && matches[2] === newLink) {\n\t\t\t\tmodel.change((writer) => {\n\t\t\t\t\tthis._selectEntireLinks(writer, selectedRange);\n\t\t\t\t\tlinkCommand.execute(newLink);\n\t\t\t\t});\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Enables autolinking on typing.\n\t*/\n\t_enableTypingHandling() {\n\t\tconst editor = this.editor;\n\t\tconst watcher = new TextWatcher(editor.model, (text) => {\n\t\t\tlet mappedText = text;\n\t\t\tif (!isSingleSpaceAtTheEnd(mappedText)) return;\n\t\t\tmappedText = mappedText.slice(0, -1);\n\t\t\tif (\"!.:,;?\".includes(mappedText[mappedText.length - 1])) mappedText = mappedText.slice(0, -1);\n\t\t\tconst url = getUrlAtTextEnd(mappedText);\n\t\t\tif (url) return {\n\t\t\t\turl,\n\t\t\t\tremovedTrailingCharacters: text.length - mappedText.length\n\t\t\t};\n\t\t});\n\t\twatcher.on(\"matched:data\", (evt, data) => {\n\t\t\tconst { batch, range, url, removedTrailingCharacters } = data;\n\t\t\tif (!batch.isTyping) return;\n\t\t\tconst linkEnd = range.end.getShiftedBy(-removedTrailingCharacters);\n\t\t\tconst linkStart = linkEnd.getShiftedBy(-url.length);\n\t\t\tconst linkRange = editor.model.createRange(linkStart, linkEnd);\n\t\t\tthis._applyAutoLink(url, linkRange);\n\t\t});\n\t\twatcher.bind(\"isEnabled\").to(this);\n\t}\n\t/**\n\t* Enables autolinking on the <kbd>Enter</kbd> key.\n\t*/\n\t_enableEnterHandling() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst enterCommand = editor.commands.get(\"enter\");\n\t\tif (!enterCommand) return;\n\t\tenterCommand.on(\"execute\", () => {\n\t\t\tconst position = model.document.selection.getFirstPosition();\n\t\t\tlet rangeToCheck;\n\t\t\tif (position.parent.previousSibling?.is(\"element\")) rangeToCheck = model.createRangeIn(position.parent.previousSibling);\n\t\t\telse rangeToCheck = model.createRange(model.createPositionAt(position.parent, 0), position);\n\t\t\tthis._checkAndApplyAutoLinkOnRange(rangeToCheck);\n\t\t});\n\t}\n\t/**\n\t* Enables autolinking on the <kbd>Shift</kbd>+<kbd>Enter</kbd> keyboard shortcut.\n\t*/\n\t_enableShiftEnterHandling() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst shiftEnterCommand = editor.commands.get(\"shiftEnter\");\n\t\tif (!shiftEnterCommand) return;\n\t\tshiftEnterCommand.on(\"execute\", () => {\n\t\t\tconst position = model.document.selection.getFirstPosition();\n\t\t\tconst rangeToCheck = model.createRange(model.createPositionAt(position.parent, 0), position.getShiftedBy(-1));\n\t\t\tthis._checkAndApplyAutoLinkOnRange(rangeToCheck);\n\t\t});\n\t}\n\t/**\n\t* Checks if the passed range contains a linkable text.\n\t*/\n\t_checkAndApplyAutoLinkOnRange(rangeToCheck) {\n\t\tconst model = this.editor.model;\n\t\tconst { text, range } = getLastTextLine(rangeToCheck, model);\n\t\tconst url = getUrlAtTextEnd(text);\n\t\tif (url) {\n\t\t\tconst linkRange = model.createRange(range.end.getShiftedBy(-url.length), range.end);\n\t\t\tthis._applyAutoLink(url, linkRange);\n\t\t}\n\t}\n\t/**\n\t* Applies a link on a given range if the link should be applied.\n\t*\n\t* @param url The URL to link.\n\t* @param range The text range to apply the link attribute to.\n\t*/\n\t_applyAutoLink(url, range) {\n\t\tconst model = this.editor.model;\n\t\tconst defaultProtocol = this.editor.config.get(\"link.defaultProtocol\");\n\t\tconst fullUrl = addLinkProtocolIfApplicable(url, defaultProtocol);\n\t\tif (!this.isEnabled || !isLinkAllowedOnRange(range, model) || !linkHasProtocol(fullUrl) || linkIsAlreadySet(range)) return;\n\t\tthis._persistAutoLink(fullUrl, range);\n\t}\n\t/**\n\t* Enqueues autolink changes in the model.\n\t*\n\t* @param url The URL to link.\n\t* @param range The text range to apply the link attribute to.\n\t*/\n\t_persistAutoLink(url, range) {\n\t\tconst model = this.editor.model;\n\t\tconst deletePlugin = this.editor.plugins.get(\"Delete\");\n\t\tmodel.enqueueChange((writer) => {\n\t\t\twriter.setAttribute(\"linkHref\", url, range);\n\t\t\tmodel.enqueueChange(() => {\n\t\t\t\tdeletePlugin.requestUndoOnBackspace();\n\t\t\t});\n\t\t});\n\t}\n};\nfunction isSingleSpaceAtTheEnd(text) {\n\treturn text.length > MIN_LINK_LENGTH_WITH_SPACE_AT_END && text[text.length - 1] === \" \" && text[text.length - 2] !== \" \";\n}\nfunction getUrlAtTextEnd(text) {\n\tconst match = URL_REG_EXP.exec(text);\n\treturn match ? match[URL_GROUP_IN_MATCH] : null;\n}\nfunction isLinkAllowedOnRange(range, model) {\n\treturn model.schema.checkAttributeInSelection(model.createSelection(range), \"linkHref\");\n}\nfunction linkIsAlreadySet(range) {\n\tconst item = range.start.nodeAfter;\n\treturn !!item && item.hasAttribute(\"linkHref\");\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 link/link\n*/\n/**\n* The link plugin.\n*\n* This is a \"glue\" plugin that loads the {@link module:link/linkediting~LinkEditing link editing feature}\n* and {@link module:link/linkui~LinkUI link UI feature}.\n*/\nvar Link = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tLinkEditing,\n\t\t\tLinkUI,\n\t\t\tAutoLink\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Link\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 link/linkimageediting\n*/\n/**\n* The link image engine feature.\n*\n* It accepts the `linkHref=\"url\"` attribute in the model for the {@link module:image/image~Image `<imageBlock>`} element\n* which allows linking images.\n*/\nvar LinkImageEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tImageEditing,\n\t\t\tImageUtils,\n\t\t\tLinkEditing\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LinkImageEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tif (editor.plugins.has(\"ImageBlockEditing\")) schema.extend(\"imageBlock\", { allowAttributes: [\"linkHref\"] });\n\t\teditor.conversion.for(\"upcast\").add(upcastLink(editor));\n\t\teditor.conversion.for(\"downcast\").add(downcastImageLink(editor));\n\t\tthis._enableAutomaticDecorators();\n\t\tthis._enableManualDecorators();\n\t}\n\t/**\n\t* Processes {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators} definitions and\n\t* attaches proper converters that will work when linking an image.`\n\t*/\n\t_enableAutomaticDecorators() {\n\t\tconst editor = this.editor;\n\t\tconst automaticDecorators = editor.commands.get(\"link\").automaticDecorators;\n\t\tif (automaticDecorators.length) editor.conversion.for(\"downcast\").add(automaticDecorators.getDispatcherForLinkedImage());\n\t}\n\t/**\n\t* Processes transformed {@link module:link/utils/manualdecorator~LinkManualDecorator} instances and attaches proper converters\n\t* that will work when linking an image.\n\t*/\n\t_enableManualDecorators() {\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get(\"link\");\n\t\tfor (const decorator of command.manualDecorators) {\n\t\t\tif (editor.plugins.has(\"ImageBlockEditing\")) editor.model.schema.extend(\"imageBlock\", { allowAttributes: decorator.id });\n\t\t\tif (editor.plugins.has(\"ImageInlineEditing\")) editor.model.schema.extend(\"imageInline\", { allowAttributes: decorator.id });\n\t\t\teditor.conversion.for(\"downcast\").add(downcastImageLinkManualDecorator(decorator));\n\t\t\teditor.conversion.for(\"upcast\").add(upcastImageLinkManualDecorator(editor, decorator));\n\t\t}\n\t}\n};\n/**\n* Returns a converter for linked block images that consumes the \"href\" attribute\n* if a link contains an image.\n*\n* @param editor The editor instance.\n*/\nfunction upcastLink(editor) {\n\tconst isImageInlinePluginLoaded = editor.plugins.has(\"ImageInlineEditing\");\n\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:a\", (evt, data, conversionApi) => {\n\t\t\tconst viewLink = data.viewItem;\n\t\t\tconst imageInLink = imageUtils.findViewImgElement(viewLink);\n\t\t\tif (!imageInLink) return;\n\t\t\tconst blockImageView = imageInLink.findAncestor((element) => imageUtils.isBlockImageView(element));\n\t\t\tif (isImageInlinePluginLoaded && !blockImageView) return;\n\t\t\tconst consumableAttributes = { attributes: [\"href\"] };\n\t\t\tif (!conversionApi.consumable.test(viewLink, consumableAttributes)) return;\n\t\t\tconst linkHref = viewLink.getAttribute(\"href\");\n\t\t\tconst modelElement = data.modelCursor.parent;\n\t\t\tif (modelElement.is(\"element\", \"imageBlock\")) {\n\t\t\t\tconversionApi.writer.setAttribute(\"linkHref\", linkHref, modelElement);\n\t\t\t\tconversionApi.consumable.consume(viewLink, consumableAttributes);\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t};\n}\n/**\n* Creates a converter that adds `<a>` to linked block image view elements.\n*/\nfunction downcastImageLink(editor) {\n\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"attribute:linkHref:imageBlock\", (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\tconst viewFigure = conversionApi.mapper.toViewElement(data.item);\n\t\t\tconst writer = conversionApi.writer;\n\t\t\tconst linkInImage = Array.from(viewFigure.getChildren()).find((child) => child.is(\"element\", \"a\"));\n\t\t\tconst viewImage = imageUtils.findViewImgElement(viewFigure);\n\t\t\tconst viewImgOrPicture = viewImage.parent.is(\"element\", \"picture\") ? viewImage.parent : viewImage;\n\t\t\tif (linkInImage) {\n\t\t\t\tif (data.attributeNewValue) writer.setAttribute(\"href\", data.attributeNewValue, linkInImage);\n\t\t\t\telse {\n\t\t\t\t\twriter.move(writer.createRangeOn(viewImgOrPicture), writer.createPositionAt(viewFigure, 0));\n\t\t\t\t\twriter.remove(linkInImage);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst linkElement = writer.createContainerElement(\"a\", { href: data.attributeNewValue });\n\t\t\t\twriter.insert(writer.createPositionAt(viewFigure, 0), linkElement);\n\t\t\t\twriter.move(writer.createRangeOn(viewImgOrPicture), writer.createPositionAt(linkElement, 0));\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t};\n}\n/**\n* Returns a converter that decorates the `<a>` element when the image is the link label.\n*/\nfunction downcastImageLinkManualDecorator(decorator) {\n\treturn (dispatcher) => {\n\t\tconst createConverter = (isApplyingConverter) => {\n\t\t\treturn (evt, data, conversionApi) => {\n\t\t\t\tconst viewFigure = conversionApi.mapper.toViewElement(data.item);\n\t\t\t\tconst linkInImage = Array.from(viewFigure.getChildren()).find((child) => child.is(\"element\", \"a\"));\n\t\t\t\tif (!linkInImage) return;\n\t\t\t\tif (!isApplyingConverter && data.attributeOldValue) {\n\t\t\t\t\tfor (const [key, val] of toMap(decorator.attributes)) conversionApi.writer.removeAttribute(key, val, linkInImage);\n\t\t\t\t\tif (decorator.classes) conversionApi.writer.removeClass(decorator.classes, linkInImage);\n\t\t\t\t\tfor (const key in decorator.styles) conversionApi.writer.removeStyle(key, linkInImage);\n\t\t\t\t}\n\t\t\t\tif (isApplyingConverter && data.attributeNewValue) {\n\t\t\t\t\tfor (const [key, val] of toMap(decorator.attributes)) conversionApi.writer.setAttribute(key, val, false, linkInImage);\n\t\t\t\t\tif (decorator.classes) conversionApi.writer.addClass(decorator.classes, linkInImage);\n\t\t\t\t\tfor (const key in decorator.styles) conversionApi.writer.setStyle(key, decorator.styles[key], linkInImage);\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\tdispatcher.on(`attribute:${decorator.id}:imageBlock`, createConverter(false), { priority: priorities.high - 1 });\n\t\tdispatcher.on(`attribute:${decorator.id}:imageBlock`, createConverter(true), { priority: priorities.high - 2 });\n\t};\n}\n/**\n* Returns a converter that checks whether manual decorators should be applied to the link.\n*/\nfunction upcastImageLinkManualDecorator(editor, decorator) {\n\tconst isImageInlinePluginLoaded = editor.plugins.has(\"ImageInlineEditing\");\n\tconst imageUtils = editor.plugins.get(\"ImageUtils\");\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:a\", (evt, data, conversionApi) => {\n\t\t\tconst viewLink = data.viewItem;\n\t\t\tconst imageInLink = imageUtils.findViewImgElement(viewLink);\n\t\t\tif (!imageInLink) return;\n\t\t\tconst blockImageView = imageInLink.findAncestor((element) => imageUtils.isBlockImageView(element));\n\t\t\tif (isImageInlinePluginLoaded && !blockImageView) return;\n\t\t\tconst result = new Matcher(decorator._createPattern()).match(viewLink);\n\t\t\tif (!result) return;\n\t\t\tif (!conversionApi.consumable.test(viewLink, result.match)) return;\n\t\t\tconst modelElement = data.modelCursor.parent;\n\t\t\tif (modelElement?.is(\"element\", \"imageBlock\")) {\n\t\t\t\tconversionApi.writer.setAttribute(decorator.id, true, modelElement);\n\t\t\t\tconversionApi.consumable.consume(viewLink, result.match);\n\t\t\t}\n\t\t}, { priority: \"high\" });\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 link/linkimageui\n*/\n/**\n* The link image UI plugin.\n*\n* This plugin provides the `'linkImage'` button that can be displayed in the {@link module:image/imagetoolbar~ImageToolbar}.\n* It can be used to wrap images in links.\n*/\nvar LinkImageUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tLinkEditing,\n\t\t\tLinkUI,\n\t\t\tImageBlockEditing\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LinkImageUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tthis.listenTo(viewDocument, \"click\", (evt, data) => {\n\t\t\tif (this._isSelectedLinkedImage(editor.model.document.selection)) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t\tthis._createToolbarLinkImageButton();\n\t}\n\t/**\n\t* Creates a `LinkImageUI` button view.\n\t*\n\t* Clicking this button shows a {@link module:link/linkui~LinkUI#_balloon} attached to the selection.\n\t* When an image is already linked, the view shows {@link module:link/linkui~LinkUI#toolbarView} or\n\t* {@link module:link/linkui~LinkUI#formView} if it is not.\n\t*/\n\t_createToolbarLinkImageButton() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\teditor.ui.componentFactory.add(\"linkImage\", (locale) => {\n\t\t\tconst button = new ButtonView(locale);\n\t\t\tconst plugin = editor.plugins.get(\"LinkUI\");\n\t\t\tconst linkCommand = editor.commands.get(\"link\");\n\t\t\tbutton.set({\n\t\t\t\tisEnabled: true,\n\t\t\t\tlabel: t(\"Link image\"),\n\t\t\t\ticon: IconLink,\n\t\t\t\tkeystroke: LINK_KEYSTROKE,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tbutton.bind(\"isEnabled\").to(linkCommand, \"isEnabled\");\n\t\t\tbutton.bind(\"isOn\").to(linkCommand, \"value\", (value) => !!value);\n\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\tif (this._isSelectedLinkedImage(editor.model.document.selection)) plugin._addToolbarView();\n\t\t\t\telse plugin._showUI(true);\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t}\n\t/**\n\t* Returns true if a linked image (either block or inline) is the only selected element\n\t* in the model document.\n\t*/\n\t_isSelectedLinkedImage(selection) {\n\t\tconst selectedModelElement = selection.getSelectedElement();\n\t\treturn this.editor.plugins.get(\"ImageUtils\").isImage(selectedModelElement) && selectedModelElement.hasAttribute(\"linkHref\");\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 link/linkimage\n*/\n/**\n* The `LinkImage` plugin.\n*\n* This is a \"glue\" plugin that loads the {@link module:link/linkimageediting~LinkImageEditing link image editing feature}\n* and {@link module:link/linkimageui~LinkImageUI link image UI feature}.\n*/\nvar LinkImage = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [LinkImageEditing, LinkImageUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LinkImage\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { AutoLink, AutomaticLinkDecorators, Link, LinkCommand, LinkEditing, LinkFormView, LinkImage, LinkImageEditing, LinkImageUI, LinkManualDecorator, LinkPropertiesView, LinkProviderItemsView, LinkUI, UnlinkCommand, LINK_KEYSTROKE as _LINK_KEYSTROKE, LinkButtonView as _LinkButtonView, LinkPreviewButtonView as _LinkPreviewButtonView, createLinkElement as _createLinkElement, ensureSafeUrl as _ensureSafeLinkUrl, extractTextFromLinkRange as _extractTextFromLinkRange, getLocalizedDecorators as _getLocalizedLinkDecorators, linkHasProtocol as _hasLinkProtocol, isEmail as _isEmailLink, normalizeDecorators as _normalizeLinkDecorators, openLink as _openLink, addLinkProtocolIfApplicable, isLinkElement, isLinkableElement };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module link/utils/automaticdecorators\n */\n\nimport { type GetCallback, priorities, toMap, type ArrayOrItem } from '@ckeditor/ckeditor5-utils';\nimport type {\n\tDowncastAttributeEvent,\n\tDowncastDispatcher,\n\tModelDocumentSelection,\n\tModelElement,\n\tModelItem,\n\tModelSelection,\n\tViewDowncastWriter,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\nimport type { NormalizedLinkDecoratorAutomaticDefinition } from '../utils.js';\n\n/**\n * Helper class that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition} and provides\n * the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement downcast dispatchers} for them.\n */\nexport class AutomaticLinkDecorators {\n\t/**\n\t * Stores the definition of {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}.\n\t * This data is used as a source for a downcast dispatcher to create a proper conversion to output data.\n\t */\n\tprivate _definitions = new Set<NormalizedLinkDecoratorAutomaticDefinition>();\n\n\t/**\n\t * A callback that checks if a decorator can be applied to a given element.\n\t * Returns `true` if there is a conflict preventing the decorator from being applied.\n\t */\n\tprivate _conflictChecker?: LinkDecoratorConflictChecker;\n\n\t/**\n\t * Gives information about the number of decorators stored in the {@link module:link/utils/automaticdecorators~AutomaticLinkDecorators}\n\t * instance.\n\t */\n\tpublic get length(): number {\n\t\treturn this._definitions.size;\n\t}\n\n\t/**\n\t * Sets a callback that checks if a decorator can be applied to a given element.\n\t *\n\t * @param checker A function that returns `true` if there is a conflict preventing the decorator from being applied.\n\t */\n\tpublic setConflictChecker( checker: LinkDecoratorConflictChecker ): void {\n\t\tthis._conflictChecker = checker;\n\t}\n\n\t/**\n\t * Adds automatic decorator objects or an array with them to be used during downcasting.\n\t *\n\t * @param item A configuration object of automatic rules for decorating links. It might also be an array of such objects.\n\t */\n\tpublic add( item: ArrayOrItem<NormalizedLinkDecoratorAutomaticDefinition> ): void {\n\t\tif ( Array.isArray( item ) ) {\n\t\t\titem.forEach( item => this._definitions.add( item ) );\n\t\t} else {\n\t\t\tthis._definitions.add( item );\n\t\t}\n\t}\n\n\t/**\n\t * Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method.\n\t *\n\t * @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n\t */\n\tpublic getDispatcher(): ( dispatcher: DowncastDispatcher ) => void {\n\t\treturn dispatcher => {\n\t\t\tconst elementCreator = (\n\t\t\t\titem: NormalizedLinkDecoratorAutomaticDefinition,\n\t\t\t\tviewWriter: ViewDowncastWriter\n\t\t\t) => {\n\t\t\t\tconst viewElement = viewWriter.createAttributeElement( 'a', item.attributes, {\n\t\t\t\t\tpriority: 5\n\t\t\t\t} );\n\n\t\t\t\tif ( item.classes ) {\n\t\t\t\t\tviewWriter.addClass( item.classes, viewElement );\n\t\t\t\t}\n\n\t\t\t\tfor ( const key in item.styles ) {\n\t\t\t\t\tviewWriter.setStyle( key, item.styles[ key ], viewElement );\n\t\t\t\t}\n\n\t\t\t\tviewWriter.setCustomProperty( 'link', true, viewElement );\n\n\t\t\t\treturn viewElement;\n\t\t\t};\n\n\t\t\tconst createConverter = ( isApplyingConverter: boolean ): GetCallback<DowncastAttributeEvent> => {\n\t\t\t\treturn ( evt, data, conversionApi ) => {\n\t\t\t\t\tif ( !data.attributeKey.startsWith( 'link' ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// There is only test as this behavior decorates links and\n\t\t\t\t\t// it is run before dispatcher which actually consumes this node.\n\t\t\t\t\t// This allows on writing own dispatcher with highest priority,\n\t\t\t\t\t// which blocks both native converter and this additional decoration.\n\t\t\t\t\tif ( data.attributeKey == 'linkHref' && !conversionApi.consumable.test( data.item, 'attribute:linkHref' ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Automatic decorators for block links are handled e.g. in LinkImageEditing.\n\t\t\t\t\tif ( !data.item.is( 'selection' ) && !conversionApi.schema.isInline( data.item ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( const decorator of this._definitions ) {\n\t\t\t\t\t\t// Check if automatic decorator is matched and does not conflict with any other active manual decorator.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdecorator.callback( data.item.getAttribute( 'linkHref' ) as string | null ) &&\n\t\t\t\t\t\t\t!this._conflictChecker?.( decorator, data.item ) &&\n\t\t\t\t\t\t\tisApplyingConverter\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif ( data.item.is( 'selection' ) ) {\n\t\t\t\t\t\t\t\tconversionApi.writer.wrap(\n\t\t\t\t\t\t\t\t\tconversionApi.writer.document.selection.getFirstRange()!,\n\t\t\t\t\t\t\t\t\telementCreator( decorator, conversionApi.writer )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconversionApi.writer.wrap(\n\t\t\t\t\t\t\t\t\tconversionApi.mapper.toViewRange( data.range ),\n\t\t\t\t\t\t\t\t\telementCreator( decorator, conversionApi.writer )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconversionApi.writer.unwrap(\n\t\t\t\t\t\t\t\tconversionApi.mapper.toViewRange( data.range ),\n\t\t\t\t\t\t\t\telementCreator( decorator, conversionApi.writer )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t\tdispatcher.on<DowncastAttributeEvent>( 'attribute', createConverter( false ), { priority: priorities.high - 1 } );\n\t\t\t// Apply decorators after all automatic and manual decorators are removed so removing one decorator\n\t\t\t// won't strip part of the other decorator's attributes, classes or styles.\n\t\t\tdispatcher.on<DowncastAttributeEvent>( 'attribute', createConverter( true ), { priority: priorities.high - 2 } );\n\t\t};\n\t}\n\n\t/**\n\t * Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method\n\t * when linking images.\n\t *\n\t * @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n\t */\n\tpublic getDispatcherForLinkedImage(): ( dispatcher: DowncastDispatcher ) => void {\n\t\treturn dispatcher => {\n\t\t\tconst createConverter = ( isApplyingConverter: boolean ): GetCallback<DowncastAttributeEvent<ModelElement>> => {\n\t\t\t\treturn ( evt, data, { writer, mapper } ) => {\n\t\t\t\t\tif ( !data.item.is( 'element', 'imageBlock' ) || !data.attributeKey.startsWith( 'link' ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst viewFigure = mapper.toViewElement( data.item )!;\n\t\t\t\t\tconst linkInImage = Array.from( viewFigure.getChildren() )\n\t\t\t\t\t\t.find( ( child ): child is ViewElement => child.is( 'element', 'a' ) );\n\n\t\t\t\t\t// It's not guaranteed that the anchor is present in the image block during execution of this dispatcher.\n\t\t\t\t\t// It might have been removed during the execution of unlink command that runs the image link downcast dispatcher\n\t\t\t\t\t// that is executed before this one and removes the anchor from the image block.\n\t\t\t\t\tif ( !linkInImage ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( const decorator of this._definitions ) {\n\t\t\t\t\t\tconst attributes = toMap( decorator.attributes );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdecorator.callback( data.item.getAttribute( 'linkHref' ) as string | null ) &&\n\t\t\t\t\t\t\t!this._conflictChecker?.( decorator, data.item ) &&\n\t\t\t\t\t\t\tisApplyingConverter\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tfor ( const [ key, val ] of attributes ) {\n\t\t\t\t\t\t\t\t// Left for backward compatibility. Since v30 decorator should\n\t\t\t\t\t\t\t\t// accept `classes` and `styles` separately from `attributes`.\n\t\t\t\t\t\t\t\tif ( key === 'class' ) {\n\t\t\t\t\t\t\t\t\twriter.addClass( val, linkInImage );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\twriter.setAttribute( key, val, false, linkInImage );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( decorator.classes ) {\n\t\t\t\t\t\t\t\twriter.addClass( decorator.classes, linkInImage );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor ( const key in decorator.styles ) {\n\t\t\t\t\t\t\t\twriter.setStyle( key, decorator.styles[ key ], linkInImage );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor ( const [ key, val ] of attributes ) {\n\t\t\t\t\t\t\t\tif ( key === 'class' ) {\n\t\t\t\t\t\t\t\t\twriter.removeClass( val, linkInImage );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\twriter.removeAttribute( key, val, linkInImage );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( decorator.classes ) {\n\t\t\t\t\t\t\t\twriter.removeClass( decorator.classes, linkInImage );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor ( const key in decorator.styles ) {\n\t\t\t\t\t\t\t\twriter.removeStyle( key, linkInImage );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute', createConverter( false ), { priority: priorities.high - 1 } );\n\t\t\t// Apply decorators after all automatic and manual decorators are removed so removing one decorator\n\t\t\t// won't strip part of the other decorator's attributes, classes or styles.\n\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute', createConverter( true ), { priority: priorities.high - 2 } );\n\t\t};\n\t}\n}\n\n/**\n * A callback that checks if a decorator can be applied to a given element.\n * Returns `true` if there is a conflict preventing the decorator from being applied.\n */\nexport type LinkDecoratorConflictChecker = (\n\tdecorator: NormalizedLinkDecoratorAutomaticDefinition,\n\tmodelItem: ModelItem | ModelSelection | ModelDocumentSelection\n) => boolean | undefined;\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/**\n * @module link/utils\n */\n\nimport type {\n\tDowncastConversionApi,\n\tModelElement,\n\tModelSchema,\n\tViewAttributeElement,\n\tViewNode,\n\tViewDocumentFragment,\n\tModelRange\n} from '@ckeditor/ckeditor5-engine';\n\nimport type { LocaleTranslate } from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tLinkDecoratorAutomaticDefinition,\n\tLinkDecoratorDefinition,\n\tLinkDecoratorManualDefinition\n} from './linkconfig.js';\n\nimport { upperFirst } from 'es-toolkit/compat';\n\nconst ATTRIBUTE_WHITESPACES = /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g; // eslint-disable-line no-control-regex\n\nconst SAFE_URL_TEMPLATE = '^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))';\n\n// Simplified email test - should be run over previously found URL.\nconst EMAIL_REG_EXP = /^[\\S]+@((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+(?:[a-z\\u00a1-\\uffff]{2,})$/i;\n\n// The regex checks for the protocol syntax ('xxxx://' or 'xxxx:')\n// or non-word characters at the beginning of the link ('/', '#' etc.).\nconst PROTOCOL_REG_EXP = /^((\\w+:(\\/{2,})?)|(\\W))/i;\n\nconst DEFAULT_LINK_PROTOCOLS = [\n\t'https?',\n\t'ftps?',\n\t'mailto'\n];\n\n/**\n * A keystroke used by the {@link module:link/linkui~LinkUI link UI feature}.\n */\nexport const LINK_KEYSTROKE = 'Ctrl+K';\n\n/**\n * Returns `true` if a given view node is the link element.\n */\nexport function isLinkElement( node: ViewNode | ViewDocumentFragment ): boolean {\n\treturn node.is( 'attributeElement' ) && !!node.getCustomProperty( 'link' );\n}\n\n/**\n * Creates a link {@link module:engine/view/attributeelement~ViewAttributeElement} with the provided `href` attribute.\n */\nexport function createLinkElement( href: string, { writer }: DowncastConversionApi ): ViewAttributeElement {\n\t// Priority 5 - https://github.com/ckeditor/ckeditor5-link/issues/121.\n\tconst linkElement = writer.createAttributeElement( 'a', { href }, { priority: 5 } );\n\n\twriter.setCustomProperty( 'link', true, linkElement );\n\n\treturn linkElement;\n}\n\n/**\n * Returns a safe URL based on a given value.\n *\n * A URL is considered safe if it is safe for the user (does not contain any malicious code).\n *\n * If a URL is considered unsafe, a simple `\"#\"` is returned.\n *\n * @internal\n */\nexport function ensureSafeUrl( url: unknown, allowedProtocols: Array<string> = DEFAULT_LINK_PROTOCOLS ): string {\n\tconst urlString = String( url );\n\n\tconst protocolsList = allowedProtocols.join( '|' );\n\tconst customSafeRegex = new RegExp( `${ SAFE_URL_TEMPLATE.replace( '<protocols>', protocolsList ) }`, 'i' );\n\n\treturn isSafeUrl( urlString, customSafeRegex ) ? urlString : '#';\n}\n\n/**\n * Checks whether the given URL is safe for the user (does not contain any malicious code).\n */\nfunction isSafeUrl( url: string, customRegexp: RegExp ): boolean {\n\tconst normalizedUrl = url.replace( ATTRIBUTE_WHITESPACES, '' );\n\n\treturn !!normalizedUrl.match( customRegexp );\n}\n\n/**\n * Returns the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration processed\n * to respect the locale of the editor, i.e. to display the {@link module:link/linkconfig~LinkDecoratorManualDefinition label}\n * in the correct language.\n *\n * **Note**: Only the few most commonly used labels are translated automatically. Other labels should be manually\n * translated in the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration.\n *\n * @param t Shorthand for {@link module:utils/locale~Locale#t Locale#t}.\n * @param decorators The decorator reference where the label values should be localized.\n * @internal\n */\nexport function getLocalizedDecorators(\n\tt: LocaleTranslate,\n\tdecorators: Array<NormalizedLinkDecoratorDefinition>\n): Array<NormalizedLinkDecoratorDefinition> {\n\tconst localizedDecoratorsLabels: Record<string, string> = {\n\t\t'Open in a new tab': t( 'Open in a new tab' ),\n\t\t'Downloadable': t( 'Downloadable' )\n\t};\n\n\tdecorators.forEach( decorator => {\n\t\tif ( 'label' in decorator && localizedDecoratorsLabels[ decorator.label ] ) {\n\t\t\tdecorator.label = localizedDecoratorsLabels[ decorator.label ];\n\t\t}\n\n\t\treturn decorator;\n\t} );\n\n\treturn decorators;\n}\n\n/**\n * Converts an object with defined decorators to a normalized array of decorators. The `id` key is added for each decorator and\n * is used as the attribute's name in the model.\n *\n * @internal\n */\nexport function normalizeDecorators( decorators?: Record<string, LinkDecoratorDefinition> ): Array<NormalizedLinkDecoratorDefinition> {\n\tconst retArray: Array<NormalizedLinkDecoratorDefinition> = [];\n\n\tif ( decorators ) {\n\t\tfor ( const [ key, value ] of Object.entries( decorators ) ) {\n\t\t\tconst decorator = Object.assign(\n\t\t\t\t{},\n\t\t\t\tvalue,\n\t\t\t\t{ id: `link${ upperFirst( key ) }` }\n\t\t\t);\n\n\t\t\tretArray.push( decorator );\n\t\t}\n\t}\n\n\treturn retArray;\n}\n\n/**\n * Returns `true` if the specified `element` can be linked (the element allows the `linkHref` attribute).\n */\nexport function isLinkableElement( element: ModelElement | null, schema: ModelSchema ): element is ModelElement {\n\tif ( !element ) {\n\t\treturn false;\n\t}\n\n\treturn schema.checkAttribute( element.name, 'linkHref' );\n}\n\n/**\n * Returns `true` if the specified `value` is an email.\n *\n * @internal\n */\nexport function isEmail( value: string ): boolean {\n\treturn EMAIL_REG_EXP.test( value );\n}\n\n/**\n * Adds the protocol prefix to the specified `link` when:\n *\n * * it does not contain it already, and there is a {@link module:link/linkconfig~LinkConfig#defaultProtocol `defaultProtocol` }\n * configuration value provided,\n * * or the link is an email address.\n */\nexport function addLinkProtocolIfApplicable( link: string, defaultProtocol?: string ): string {\n\tconst protocol = isEmail( link ) ? 'mailto:' : defaultProtocol;\n\tconst isProtocolNeeded = !!protocol && !linkHasProtocol( link );\n\n\treturn link && isProtocolNeeded ? protocol + link : link;\n}\n\n/**\n * Checks if protocol is already included in the link.\n *\n * @internal\n */\nexport function linkHasProtocol( link: string ): boolean {\n\treturn PROTOCOL_REG_EXP.test( link );\n}\n\n/**\n * Opens the link in a new browser tab.\n */\nexport function openLink( link: string ): void {\n\twindow.open( link, '_blank', 'noopener' );\n}\n\n/**\n * Returns a text of a link range.\n *\n * If the returned value is `undefined`, the range contains elements other than text nodes.\n */\nexport function extractTextFromLinkRange( range: ModelRange ): string | undefined {\n\tlet text = '';\n\n\tfor ( const item of range.getItems() ) {\n\t\tif ( !item.is( '$text' ) && !item.is( '$textProxy' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttext += item.data;\n\t}\n\n\treturn text;\n}\n\nexport type NormalizedLinkDecoratorAutomaticDefinition = LinkDecoratorAutomaticDefinition & { id: string };\nexport type NormalizedLinkDecoratorManualDefinition = LinkDecoratorManualDefinition & { id: string };\nexport type NormalizedLinkDecoratorDefinition = NormalizedLinkDecoratorAutomaticDefinition | NormalizedLinkDecoratorManualDefinition;\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/**\n * @module link/utils/conflictingdecorators\n */\n\n/**\n * Checks if two decorators conflict with each other.\n *\n * Decorators conflict when they share the same HTML attribute names (excluding mergeable attributes)\n * or style properties.\n *\n * @internal\n * @param a The first decorator.\n * @param b The second decorator.\n */\nexport function areDecoratorsConflicting( a: DecoratorLike, b: DecoratorLike ): boolean {\n\tif ( a.attributes && b.attributes ) {\n\t\tconst hasConflict = Object.keys( a.attributes ).some(\n\t\t\tkey => !isMergeableAttribute( key ) && key in b.attributes!\n\t\t);\n\n\t\tif ( hasConflict ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// Check for conflicting style properties (same CSS property names).\n\tif ( a.styles && b.styles ) {\n\t\tconst hasConflict = Object.keys( a.styles ).some( key => key in b.styles! );\n\n\t\tif ( hasConflict ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// Classes don't conflict with each other - they can be merged.\n\treturn false;\n\n\tfunction isMergeableAttribute( key: string ): boolean {\n\t\treturn key === 'class' || key === 'style' || key === 'rel';\n\t}\n}\n\n/**\n * Resolves conflicting manual decorators by automatically disabling decorators that share\n * the same HTML attributes with newly enabled decorators.\n *\n * @internal\n * @param options Configuration object.\n * @param options.decoratorStates Initial decorator states.\n * @param options.allDecorators Collection of all manual decorators.\n * @returns Updated decorator states with conflicts resolved.\n */\nexport function resolveConflictingDecorators(\n\t{\n\t\tdecoratorStates,\n\t\tallDecorators\n\t}: {\n\t\tdecoratorStates: Record<string, boolean>;\n\t\tallDecorators: Array<DecoratorLike & { value?: boolean }>;\n\t}\n): Record<string, boolean> {\n\tconst resolved: Record<string, boolean> = { ...decoratorStates };\n\n\tfor ( const name in decoratorStates ) {\n\t\tif ( decoratorStates[ name ] && isNewlyAddedDecorator( name ) ) {\n\t\t\tconst conflicts = getConflictingManualDecorators( name, allDecorators );\n\n\t\t\tfor ( const conflict of conflicts ) {\n\t\t\t\tresolved[ conflict ] = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction isNewlyAddedDecorator( name: string ): boolean {\n\t\treturn allDecorators.some( item => item.id === name && !item.value );\n\t}\n\n\treturn resolved;\n}\n\n/**\n * Returns array of decorator names that conflict with the given decorator.\n * Decorators conflict when they share the same HTML attribute names or style properties.\n *\n * @param decoratorId The id/name of the manual decorator to check for conflicts.\n * @param manualDecorators Collection of all manual decorators.\n * @returns Array of conflicting decorator names.\n */\nfunction getConflictingManualDecorators(\n\tdecoratorId: string,\n\tmanualDecorators: Array<DecoratorLike>\n): Array<string> {\n\tconst decorator = manualDecorators.find( item => item.id === decoratorId );\n\n\t/* istanbul ignore next -- @preserve */\n\tif ( !decorator ) {\n\t\treturn [];\n\t}\n\n\treturn manualDecorators\n\t\t.filter( otherDecorator => otherDecorator.id !== decoratorId && areDecoratorsConflicting( decorator, otherDecorator ) )\n\t\t.map( item => item.id );\n}\n\n/**\n * Decorator-like object representing attributes and styles.\n */\ntype DecoratorLike = {\n\tid: string;\n\tattributes?: Record<string, string>;\n\tstyles?: Record<string, string>;\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/**\n * @module link/linkcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { findAttributeRange } from '@ckeditor/ckeditor5-typing';\nimport { Collection, diff, first, toMap } from '@ckeditor/ckeditor5-utils';\nimport { ModelLivePosition, type ModelRange, type ModelItem, type ModelTextProxy } from '@ckeditor/ckeditor5-engine';\n\nimport { AutomaticLinkDecorators } from './utils/automaticdecorators.js';\nimport { extractTextFromLinkRange, isLinkableElement } from './utils.js';\nimport { type LinkManualDecorator } from './utils/manualdecorator.js';\nimport { resolveConflictingDecorators } from './utils/conflictingdecorators.js';\n\n/**\n * The link command. It is used by the {@link module:link/link~Link link feature}.\n */\nexport class LinkCommand extends Command {\n\t/**\n\t * The value of the `'linkHref'` attribute if the start of the selection is located in a node with this attribute.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: string | undefined;\n\n\t/**\n\t * A collection of {@link module:link/utils/manualdecorator~LinkManualDecorator manual decorators}\n\t * corresponding to the {@link module:link/linkconfig~LinkConfig#decorators decorator configuration}.\n\t *\n\t * You can consider it a model with states of manual decorators added to the currently selected link.\n\t */\n\tpublic readonly manualDecorators: Collection<LinkManualDecorator> = new Collection<LinkManualDecorator>();\n\n\t/**\n\t * An instance of the helper that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition}\n\t * that are used by the {@glink features/link link} and the {@glink features/images/images-linking linking images} features.\n\t */\n\tpublic readonly automaticDecorators: AutomaticLinkDecorators = new AutomaticLinkDecorators();\n\n\t/**\n\t * Synchronizes the state of {@link #manualDecorators} with the currently present elements in the model.\n\t */\n\tpublic restoreManualDecoratorStates(): void {\n\t\tfor ( const manualDecorator of this.manualDecorators ) {\n\t\t\tmanualDecorator.value = this._getDecoratorStateFromModel( manualDecorator.id );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement() || first( selection.getSelectedBlocks() );\n\n\t\t// A check for any integration that allows linking elements (e.g. `LinkImage`).\n\t\t// Currently the selection reads attributes from text nodes only.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/7429 and https://github.com/ckeditor/ckeditor5/issues/7465.\n\t\tif ( isLinkableElement( selectedElement, model.schema ) ) {\n\t\t\tthis.value = selectedElement.getAttribute( 'linkHref' ) as string | undefined;\n\t\t\tthis.isEnabled = model.schema.checkAttribute( selectedElement, 'linkHref' );\n\t\t} else {\n\t\t\tthis.value = selection.getAttribute( 'linkHref' ) as string | undefined;\n\t\t\tthis.isEnabled = model.schema.checkAttributeInSelection( selection, 'linkHref' );\n\t\t}\n\n\t\tfor ( const manualDecorator of this.manualDecorators ) {\n\t\t\tmanualDecorator.value = this._getDecoratorStateFromModel( manualDecorator.id );\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * When the selection is non-collapsed, the `linkHref` attribute will be applied to nodes inside the selection, but only to\n\t * those nodes where the `linkHref` attribute is allowed (disallowed nodes will be omitted).\n\t *\n\t * When the selection is collapsed and is not inside the text with the `linkHref` attribute, a\n\t * new {@link module:engine/model/text~ModelText text node} with the `linkHref` attribute will be inserted in place of the caret, but\n\t * only if such element is allowed in this place. The `_data` of the inserted text will equal the `href` parameter.\n\t * The selection will be updated to wrap the just inserted text node.\n\t *\n\t * When the selection is collapsed and inside the text with the `linkHref` attribute, the attribute value will be updated.\n\t *\n\t * # Decorators and model attribute management\n\t *\n\t * There is an optional argument to this command that applies or removes model\n\t * {@glink framework/architecture/editing-engine#text-attributes text attributes} brought by\n\t * {@link module:link/utils/manualdecorator~LinkManualDecorator manual link decorators}.\n\t *\n\t * Text attribute names in the model correspond to the entries in the {@link module:link/linkconfig~LinkConfig#decorators\n\t * configuration}.\n\t * For every decorator configured, a model text attribute exists with the \"link\" prefix. For example, a `'linkMyDecorator'` attribute\n\t * corresponds to `'myDecorator'` in the configuration.\n\t *\n\t * To learn more about link decorators, check out the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`}\n\t * documentation.\n\t *\n\t * Here is how to manage decorator attributes with the link command:\n\t *\n\t * ```ts\n\t * const linkCommand = editor.commands.get( 'link' );\n\t *\n\t * // Adding a new decorator attribute.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: true\n\t * } );\n\t *\n\t * // Removing a decorator attribute from the selection.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: false\n\t * } );\n\t *\n\t * // Adding multiple decorator attributes at the same time.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: true,\n\t * \tlinkIsDownloadable: true,\n\t * } );\n\t *\n\t * // Removing and adding decorator attributes at the same time.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: false,\n\t * \tlinkFoo: true,\n\t * \tlinkIsDownloadable: false,\n\t * } );\n\t * ```\n\t *\n\t * **Note**: If the decorator attribute name is not specified, its state remains untouched.\n\t *\n\t * **Note**: {@link module:link/unlinkcommand~UnlinkCommand#execute `UnlinkCommand#execute()`} removes all\n\t * decorator attributes.\n\t *\n\t * An optional parameter called `displayedText` is to add or update text of the link that represents the `href`. For example:\n\t *\n\t * ```ts\n\t * const linkCommand = editor.commands.get( 'link' );\n\t *\n\t * // Adding a new link with `displayedText` attribute.\n\t * linkCommand.execute( 'http://example.com', {}, 'Example' );\n\t * ```\n\t *\n\t * The above code will create an anchor like this:\n\t *\n\t * ```html\n\t * <a href=\"http://example.com\">Example</a>\n\t * ```\n\t *\n\t * @fires execute\n\t * @param href Link destination.\n\t * @param manualDecoratorIds The information about manual decorator attributes to be applied or removed upon execution.\n\t * @param displayedText Text of the link.\n\t */\n\tpublic override execute(\n\t\thref: string,\n\t\tmanualDecoratorIds: Record<string, boolean> = {},\n\t\tdisplayedText?: string\n\t): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\t// Resolve conflicting decorators and get the final decorator states.\n\t\tconst resolvedDecoratorsIds = resolveConflictingDecorators( {\n\t\t\tallDecorators: Array.from( this.manualDecorators ),\n\t\t\tdecoratorStates: manualDecoratorIds\n\t\t} );\n\n\t\t// Stores information about manual decorators to turn them on/off when command is applied.\n\t\tconst truthyManualDecorators: Array<string> = [];\n\t\tconst falsyManualDecorators: Array<string> = [];\n\n\t\tfor ( const name in resolvedDecoratorsIds ) {\n\t\t\tif ( resolvedDecoratorsIds[ name ] ) {\n\t\t\t\ttruthyManualDecorators.push( name );\n\t\t\t} else {\n\t\t\t\tfalsyManualDecorators.push( name );\n\t\t\t}\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst updateLinkAttributes = ( itemOrRange: ModelItem | ModelRange ): void => {\n\t\t\t\twriter.setAttribute( 'linkHref', href, itemOrRange );\n\n\t\t\t\ttruthyManualDecorators.forEach( item => writer.setAttribute( item, true, itemOrRange ) );\n\t\t\t\tfalsyManualDecorators.forEach( item => writer.removeAttribute( item, itemOrRange ) );\n\t\t\t};\n\n\t\t\tconst updateLinkTextIfNeeded = ( range: ModelRange, linkHref?: string ): ModelRange | undefined => {\n\t\t\t\tconst linkText = extractTextFromLinkRange( range );\n\n\t\t\t\tif ( !linkText ) {\n\t\t\t\t\treturn range;\n\t\t\t\t}\n\n\t\t\t\t// Make a copy not to override the command param value.\n\t\t\t\tlet newText = displayedText;\n\n\t\t\t\tif ( !newText ) {\n\t\t\t\t\t// Replace the link text with the new href if previously href was equal to text.\n\t\t\t\t\t// For example: `<a href=\"http://ckeditor.com/\">http://ckeditor.com/</a>`.\n\t\t\t\t\tnewText = linkHref && linkHref == linkText ? href : linkText;\n\t\t\t\t}\n\n\t\t\t\t// Only if needed.\n\t\t\t\tif ( newText != linkText ) {\n\t\t\t\t\tconst fragment = writer.createDocumentFragment();\n\n\t\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\t\t// `extractTextFromLinkRange()` called above guarantees that we operate only on text proxies here.\n\t\t\t\t\t\tconst text = item as ModelTextProxy;\n\n\t\t\t\t\t\twriter.append( writer.createText( text.data, text.getAttributes() ), fragment );\n\t\t\t\t\t}\n\n\t\t\t\t\tconst fragRange = writer.createRangeIn( fragment );\n\n\t\t\t\t\tconst changes = findChanges( linkText, newText );\n\t\t\t\t\tlet insertsLength = 0;\n\n\t\t\t\t\tfor ( const { offset, actual, expected } of changes ) {\n\t\t\t\t\t\tconst updatedOffset = offset + insertsLength;\n\t\t\t\t\t\tconst subRange = writer.createRange(\n\t\t\t\t\t\t\tfragRange.start.getShiftedBy( updatedOffset ),\n\t\t\t\t\t\t\tfragRange.start.getShiftedBy( updatedOffset + actual.length )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Collect formatting attributes from replaced text.\n\t\t\t\t\t\tconst textNode = getLinkPartTextNode( subRange, fragRange )!;\n\t\t\t\t\t\tconst attributes = textNode.getAttributes();\n\t\t\t\t\t\tconst formattingAttributes = Array\n\t\t\t\t\t\t\t.from( attributes )\n\t\t\t\t\t\t\t.filter( ( [ key ] ) => model.schema.getAttributeProperties( key ).isFormatting );\n\n\t\t\t\t\t\t// Create a new text node.\n\t\t\t\t\t\tconst newTextNode = writer.createText( expected, formattingAttributes );\n\n\t\t\t\t\t\t// Set link attributes before inserting to document to avoid Differ attributes edge case.\n\t\t\t\t\t\tupdateLinkAttributes( newTextNode );\n\n\t\t\t\t\t\t// Replace text with formatting.\n\t\t\t\t\t\twriter.remove( subRange );\n\t\t\t\t\t\twriter.insert( newTextNode, subRange.start );\n\n\t\t\t\t\t\t// Sum of all previous inserts.\n\t\t\t\t\t\tinsertsLength += expected.length;\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.insertContent( fragment, range );\n\n\t\t\t\t\treturn writer.createRange( range.start, range.start.getShiftedBy( newText.length ) );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst collapseSelectionAtLinkEnd = ( linkRange: ModelRange ): void => {\n\t\t\t\tconst { plugins } = this.editor;\n\n\t\t\t\twriter.setSelection( linkRange.end );\n\n\t\t\t\tif ( plugins.has( 'TwoStepCaretMovement' ) ) {\n\t\t\t\t\t// After replacing the text of the link, we need to move the caret to the end of the link,\n\t\t\t\t\t// override it's gravity to forward to prevent keeping e.g. bold attribute on the caret\n\t\t\t\t\t// which was previously inside the link.\n\t\t\t\t\t//\n\t\t\t\t\t// If the plugin is not available, the caret will be placed at the end of the link and the\n\t\t\t\t\t// bold attribute will be kept even if command moved caret outside the link.\n\t\t\t\t\tplugins.get( 'TwoStepCaretMovement' )._handleForwardMovement();\n\t\t\t\t} else {\n\t\t\t\t\t// Remove the `linkHref` attribute and all link decorators from the selection.\n\t\t\t\t\t// It stops adding a new content into the link element.\n\t\t\t\t\tfor ( const key of [ 'linkHref', ...truthyManualDecorators, ...falsyManualDecorators ] ) {\n\t\t\t\t\t\twriter.removeSelectionAttribute( key );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// If selection is collapsed then update selected link or insert new one at the place of caret.\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\tconst position = selection.getFirstPosition()!;\n\n\t\t\t\t// When selection is inside text with `linkHref` attribute.\n\t\t\t\tif ( selection.hasAttribute( 'linkHref' ) ) {\n\t\t\t\t\tconst linkHref = selection.getAttribute( 'linkHref' ) as string;\n\t\t\t\t\tconst linkRange = findAttributeRange( position, 'linkHref', linkHref, model );\n\t\t\t\t\tconst newLinkRange = updateLinkTextIfNeeded( linkRange, linkHref );\n\n\t\t\t\t\tupdateLinkAttributes( newLinkRange || linkRange );\n\n\t\t\t\t\t// Put the selection at the end of the updated link only when text was changed.\n\t\t\t\t\t// When text was not altered we keep the original selection.\n\t\t\t\t\tif ( newLinkRange ) {\n\t\t\t\t\t\tcollapseSelectionAtLinkEnd( newLinkRange );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If not then insert text node with `linkHref` attribute in place of caret.\n\t\t\t\t// However, since selection is collapsed, attribute value will be used as data for text node.\n\t\t\t\t// So, if `href` is empty, do not create text node.\n\t\t\t\telse if ( href !== '' ) {\n\t\t\t\t\tconst attributes = toMap( selection.getAttributes() );\n\n\t\t\t\t\tattributes.set( 'linkHref', href );\n\n\t\t\t\t\ttruthyManualDecorators.forEach( item => {\n\t\t\t\t\t\tattributes.set( item, true );\n\t\t\t\t\t} );\n\n\t\t\t\t\tconst newLinkRange = model.insertContent( writer.createText( displayedText || href, attributes ), position );\n\n\t\t\t\t\t// Put the selection at the end of the inserted link.\n\t\t\t\t\t// Using end of range returned from insertContent in case nodes with the same attributes got merged.\n\t\t\t\t\tcollapseSelectionAtLinkEnd( newLinkRange );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Non-collapsed selection.\n\n\t\t\t\t// If selection has non-collapsed ranges, we change attribute on nodes inside those ranges\n\t\t\t\t// omitting nodes where the `linkHref` attribute is disallowed.\n\t\t\t\tconst selectionRanges = Array.from( selection.getRanges() );\n\t\t\t\tconst ranges = model.schema.getValidRanges( selectionRanges, 'linkHref' );\n\n\t\t\t\t// But for the first, check whether the `linkHref` attribute is allowed on selected blocks (e.g. the \"image\" element).\n\t\t\t\tconst allowedRanges = [];\n\n\t\t\t\tfor ( const element of selection.getSelectedBlocks() ) {\n\t\t\t\t\tif ( model.schema.checkAttribute( element, 'linkHref' ) ) {\n\t\t\t\t\t\tallowedRanges.push( writer.createRangeOn( element ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Ranges that accept the `linkHref` attribute. Since we will iterate over `allowedRanges`, let's clone it.\n\t\t\t\tconst rangesToUpdate = allowedRanges.slice();\n\n\t\t\t\t// For all selection ranges we want to check whether given range is inside an element that accepts the `linkHref` attribute.\n\t\t\t\t// If so, we don't want to propagate applying the attribute to its children.\n\t\t\t\tfor ( const range of ranges ) {\n\t\t\t\t\tif ( this._isRangeToUpdate( range, allowedRanges ) ) {\n\t\t\t\t\t\trangesToUpdate.push( range );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Store the selection ranges in a pseudo live range array (stickiness to the outside of the range).\n\t\t\t\tconst stickyPseudoRanges = selectionRanges.map( range => ( {\n\t\t\t\t\tstart: ModelLivePosition.fromPosition( range.start, 'toPrevious' ),\n\t\t\t\t\tend: ModelLivePosition.fromPosition( range.end, 'toNext' )\n\t\t\t\t} ) );\n\n\t\t\t\t// Update or set links (including text update if needed).\n\t\t\t\tfor ( let range of rangesToUpdate ) {\n\t\t\t\t\tconst linkHref = ( range.start.textNode || range.start.nodeAfter! ).getAttribute( 'linkHref' ) as string | undefined;\n\n\t\t\t\t\trange = updateLinkTextIfNeeded( range, linkHref ) || range;\n\n\t\t\t\t\tupdateLinkAttributes( range );\n\t\t\t\t}\n\n\t\t\t\t// The original selection got trimmed by replacing content so we need to restore it.\n\t\t\t\twriter.setSelection( stickyPseudoRanges.map( pseudoRange => {\n\t\t\t\t\tconst start = pseudoRange.start.toPosition();\n\t\t\t\t\tconst end = pseudoRange.end.toPosition();\n\n\t\t\t\t\tpseudoRange.start.detach();\n\t\t\t\t\tpseudoRange.end.detach();\n\n\t\t\t\t\treturn model.createRange( start, end );\n\t\t\t\t} ) );\n\t\t\t}\n\t\t} );\n\n\t\tthis.restoreManualDecoratorStates();\n\t}\n\n\t/**\n\t * Provides information whether a decorator with a given name is present in the currently processed selection.\n\t *\n\t * @param decoratorName The name of the manual decorator used in the model\n\t * @returns The information whether a given decorator is currently present in the selection.\n\t */\n\tprivate _getDecoratorStateFromModel( decoratorName: string ): boolean | undefined {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t// A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.\n\t\t// Currently the selection reads attributes from text nodes only.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/7429 and https://github.com/ckeditor/ckeditor5/issues/7465.\n\t\tif ( isLinkableElement( selectedElement, model.schema ) ) {\n\t\t\treturn selectedElement.getAttribute( decoratorName ) as boolean | undefined;\n\t\t}\n\n\t\treturn selection.getAttribute( decoratorName ) as boolean | undefined;\n\t}\n\n\t/**\n\t * Checks whether specified `range` is inside an element that accepts the `linkHref` attribute.\n\t *\n\t * @param range A range to check.\n\t * @param allowedRanges An array of ranges created on elements where the attribute is accepted.\n\t */\n\tprivate _isRangeToUpdate( range: ModelRange, allowedRanges: Array<ModelRange> ): boolean {\n\t\tfor ( const allowedRange of allowedRanges ) {\n\t\t\t// A range is inside an element that will have the `linkHref` attribute. Do not modify its nodes.\n\t\t\tif ( allowedRange.containsRange( range ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}\n\n/**\n * Compares two strings and returns an array of changes needed to transform one into another.\n * Uses the diff utility to find the differences and groups them into chunks containing information\n * about the offset and actual/expected content.\n *\n * @param oldText The original text to compare.\n * @param newText The new text to compare against.\n * @returns Array of change objects containing offset and actual/expected content.\n *\n * @example\n * findChanges( 'hello world', 'hi there' );\n *\n * Returns:\n * [\n * \t{\n * \t\t\"offset\": 1,\n * \t\t\"actual\": \"ello\",\n * \t\t\"expected\": \"i\"\n * \t},\n * \t{\n * \t\t\"offset\": 2,\n * \t\t\"actual\": \"wo\",\n * \t\t\"expected\": \"the\"\n * \t},\n * \t{\n * \t\t\"offset\": 3,\n * \t\t\"actual\": \"ld\",\n * \t\t\"expected\": \"e\"\n * \t}\n * ]\n */\nfunction findChanges( oldText: string, newText: string ): Array<{ offset: number; actual: string; expected: string }> {\n\t// Get array of operations (insert/delete/equal) needed to transform oldText into newText.\n\t// Example: diff('abc', 'abxc') returns ['equal', 'equal', 'insert', 'equal']\n\tconst changes = diff( oldText, newText );\n\n\t// Track position in both strings based on operation type.\n\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\tconst result = [];\n\n\t// Accumulate consecutive changes into slices before creating change objects.\n\tlet actualSlice = '';\n\tlet expectedSlice = '';\n\n\t// Adding null as sentinel value to handle final accumulated changes.\n\tfor ( const action of [ ...changes, null ] ) {\n\t\tif ( action == 'insert' ) {\n\t\t\t// Example: for 'abc' -> 'abxc', at insert position, adds 'x' to expectedSlice.\n\t\t\texpectedSlice += newText[ counter.equal + counter.insert ];\n\t\t}\n\t\telse if ( action == 'delete' ) {\n\t\t\t// Example: for 'abc' -> 'ac', at delete position, adds 'b' to actualSlice.\n\t\t\tactualSlice += oldText[ counter.equal + counter.delete ];\n\t\t}\n\t\telse if ( actualSlice.length || expectedSlice.length ) {\n\t\t\t// On 'equal' or end: bundle accumulated changes into a single change object.\n\t\t\t// Example: { offset: 2, actual: \"\", expected: \"x\" }\n\t\t\tresult.push( {\n\t\t\t\toffset: counter.equal,\n\t\t\t\tactual: actualSlice,\n\t\t\t\texpected: expectedSlice\n\t\t\t} );\n\n\t\t\tactualSlice = '';\n\t\t\texpectedSlice = '';\n\t\t}\n\n\t\t// Increment appropriate counter for the current operation.\n\t\tif ( action ) {\n\t\t\tcounter[ action ]++;\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Returns text node withing the link range that should be updated.\n *\n * @param range Partial link range.\n * @param linkRange Range of the entire link.\n * @returns Text node.\n */\nfunction getLinkPartTextNode( range: ModelRange, linkRange: ModelRange ): ModelItem | null {\n\tif ( !range.isCollapsed ) {\n\t\treturn first( range.getItems() );\n\t}\n\n\tconst position = range.start;\n\n\tif ( position.textNode ) {\n\t\treturn position.textNode;\n\t}\n\n\t// If the range is at the start of a link range then prefer node inside a link range.\n\tif ( !position.nodeBefore || position.isEqual( linkRange.start ) ) {\n\t\treturn position.nodeAfter;\n\t} else {\n\t\treturn position.nodeBefore;\n\t}\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/**\n * @module link/unlinkcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { findAttributeRange } from '@ckeditor/ckeditor5-typing';\n\nimport { type LinkCommand } from './linkcommand.js';\nimport { isLinkableElement } from './utils.js';\n\n/**\n * The unlink command. It is used by the {@link module:link/link~Link link plugin}.\n */\nexport class UnlinkCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t// A check for any integration that allows linking elements (e.g. `LinkImage`).\n\t\t// Currently the selection reads attributes from text nodes only.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/7429 and https://github.com/ckeditor/ckeditor5/issues/7465.\n\t\tif ( isLinkableElement( selectedElement, model.schema ) ) {\n\t\t\tthis.isEnabled = model.schema.checkAttribute( selectedElement, 'linkHref' );\n\t\t} else {\n\t\t\tthis.isEnabled = model.schema.checkAttributeInSelection( selection, 'linkHref' );\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * When the selection is collapsed, it removes the `linkHref` attribute from each node with the same `linkHref` attribute value.\n\t * When the selection is non-collapsed, it removes the `linkHref` attribute from each node in selected ranges.\n\t *\n\t * # Decorators\n\t *\n\t * If {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} is specified,\n\t * all configured decorators are removed together with the `linkHref` attribute.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst linkCommand: LinkCommand | undefined = editor.commands.get( 'link' );\n\n\t\tmodel.change( writer => {\n\t\t\t// Get ranges to unlink.\n\t\t\tconst rangesToUnlink = selection.isCollapsed ?\n\t\t\t\t[ findAttributeRange(\n\t\t\t\t\tselection.getFirstPosition()!,\n\t\t\t\t\t'linkHref',\n\t\t\t\t\tselection.getAttribute( 'linkHref' ),\n\t\t\t\t\tmodel\n\t\t\t\t) ] :\n\t\t\t\tmodel.schema.getValidRanges( selection.getRanges(), 'linkHref' );\n\n\t\t\t// Remove `linkHref` attribute from specified ranges.\n\t\t\tfor ( const range of rangesToUnlink ) {\n\t\t\t\twriter.removeAttribute( 'linkHref', range );\n\t\t\t\t// If there are registered custom attributes, then remove them during unlink.\n\t\t\t\tif ( linkCommand ) {\n\t\t\t\t\tfor ( const manualDecorator of linkCommand.manualDecorators ) {\n\t\t\t\t\t\twriter.removeAttribute( manualDecorator.id, range );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module link/utils/manualdecorator\n */\n\nimport { ObservableMixin, type ArrayOrItem, type ObservableMixinConstructor } from '@ckeditor/ckeditor5-utils';\nimport type { MatcherObjectPattern } from '@ckeditor/ckeditor5-engine';\nimport type { NormalizedLinkDecoratorManualDefinition } from '../utils.js';\n\nconst LinkManualDecoratorBase: ObservableMixinConstructor = /* #__PURE__ */ ObservableMixin();\n\n/**\n * Helper class that stores manual decorators with observable {@link module:link/utils/manualdecorator~LinkManualDecorator#value}\n * to support integration with the UI state. An instance of this class is a model with the state of individual manual decorators.\n * These decorators are kept as collections in {@link module:link/linkcommand~LinkCommand#manualDecorators}.\n */\nexport class LinkManualDecorator extends LinkManualDecoratorBase {\n\t/**\n\t * An ID of a manual decorator which is the name of the attribute in the model, for example: 'linkManualDecorator0'.\n\t */\n\tpublic id: string;\n\n\t/**\n\t * The value of the current manual decorator. It reflects its state from the UI.\n\t *\n\t * @observable\n\t */\n\tdeclare public value: boolean | undefined;\n\n\t/**\n\t * The default value of manual decorator.\n\t */\n\tpublic defaultValue?: boolean;\n\n\t/**\n\t * The label used in the user interface to toggle the manual decorator.\n\t */\n\tpublic label: string;\n\n\t/**\n\t * A set of attributes added to downcasted data when the decorator is activated for a specific link.\n\t * Attributes should be added in a form of attributes defined in {@link module:engine/view/elementdefinition~ViewElementDefinition}.\n\t */\n\tpublic attributes?: Record<string, string>;\n\n\t/**\n\t * A set of classes added to downcasted data when the decorator is activated for a specific link.\n\t * Classes should be added in a form of classes defined in {@link module:engine/view/elementdefinition~ViewElementDefinition}.\n\t */\n\tpublic classes?: ArrayOrItem<string>;\n\n\t/**\n\t * A set of styles added to downcasted data when the decorator is activated for a specific link.\n\t * Styles should be added in a form of styles defined in {@link module:engine/view/elementdefinition~ViewElementDefinition}.\n\t */\n\tpublic styles?: Record<string, string>;\n\n\t/**\n\t * Creates a new instance of {@link module:link/utils/manualdecorator~LinkManualDecorator}.\n\t *\n\t * @param options The configuration object.\n\t */\n\tconstructor( { id, label, attributes, classes, styles, defaultValue }: NormalizedLinkDecoratorManualDefinition ) {\n\t\tsuper();\n\n\t\tthis.id = id;\n\t\tthis.set( 'value', undefined );\n\t\tthis.defaultValue = defaultValue;\n\t\tthis.label = label;\n\t\tthis.attributes = attributes;\n\t\tthis.classes = classes;\n\t\tthis.styles = styles;\n\t}\n\n\t/**\n\t * Returns {@link module:engine/view/matcher~MatcherPattern} with decorator attributes.\n\t *\n\t * @internal\n\t */\n\tpublic _createPattern(): MatcherObjectPattern {\n\t\treturn {\n\t\t\tattributes: this.attributes,\n\t\t\tclasses: this.classes,\n\t\t\tstyles: this.styles\n\t\t};\n\t}\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/**\n * @module link/linkediting\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type {\n\tModelSchema,\n\tModelWriter,\n\tViewElement,\n\tViewDocumentKeyDownEvent,\n\tViewDocumentClickEvent,\n\tModelDocumentSelectionChangeAttributeEvent,\n\tViewDowncastWriter,\n\tDowncastAttributeEvent,\n\tModelItem\n} from '@ckeditor/ckeditor5-engine';\nimport {\n\tInput,\n\tTwoStepCaretMovement,\n\tinlineHighlight\n} from '@ckeditor/ckeditor5-typing';\nimport {\n\tClipboardPipeline,\n\ttype ClipboardContentInsertionEvent\n} from '@ckeditor/ckeditor5-clipboard';\nimport { keyCodes, env, type GetCallback, priorities } from '@ckeditor/ckeditor5-utils';\n\nimport { LinkCommand } from './linkcommand.js';\nimport { UnlinkCommand } from './unlinkcommand.js';\nimport { areDecoratorsConflicting } from './utils/conflictingdecorators.js';\nimport { LinkManualDecorator } from './utils/manualdecorator.js';\nimport {\n\tcreateLinkElement,\n\tensureSafeUrl,\n\tgetLocalizedDecorators,\n\tnormalizeDecorators,\n\taddLinkProtocolIfApplicable,\n\topenLink,\n\ttype NormalizedLinkDecoratorAutomaticDefinition,\n\ttype NormalizedLinkDecoratorManualDefinition\n} from './utils.js';\n\nconst HIGHLIGHT_CLASS = 'ck-link_selected';\nconst DECORATOR_AUTOMATIC = 'automatic';\nconst DECORATOR_MANUAL = 'manual';\nconst EXTERNAL_LINKS_REGEXP = /^(https?:)?\\/\\//;\n\n/**\n * The link engine feature.\n *\n * It introduces the `linkHref=\"url\"` attribute in the model which renders to the view as a `<a href=\"url\">` element\n * as well as `'link'` and `'unlink'` commands.\n */\nexport class LinkEditing extends Plugin {\n\t/**\n\t * A list of functions that handles opening links. If any of them returns `true`, the link is considered to be opened.\n\t */\n\tprivate readonly _linkOpeners: Array<LinkOpener> = [];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LinkEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[\n\t\tTwoStepCaretMovement,\n\t\tInput,\n\t\tClipboardPipeline\n\t]> {\n\t\t// Clipboard is required for handling cut and paste events while typing over the link.\n\t\treturn [\n\t\t\tTwoStepCaretMovement,\n\t\t\tInput,\n\t\t\tClipboardPipeline\n\t\t];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'link', {\n\t\t\tallowCreatingEmptyLinks: false,\n\t\t\taddTargetToExternalLinks: false,\n\t\t\ttoolbar: [ 'linkPreview', '|', 'editLink', 'linkProperties', 'unlink' ]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst allowedProtocols = this.editor.config.get( 'link.allowedProtocols' );\n\n\t\t// Allow link attribute on all inline nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: 'linkHref' } );\n\n\t\teditor.conversion.for( 'dataDowncast' )\n\t\t\t.attributeToElement( { model: 'linkHref', view: createLinkElement } );\n\n\t\teditor.conversion.for( 'editingDowncast' )\n\t\t\t.attributeToElement( { model: 'linkHref', view: ( href, conversionApi ) => {\n\t\t\t\treturn createLinkElement( ensureSafeUrl( href, allowedProtocols ), conversionApi );\n\t\t\t} } );\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t.elementToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\thref: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'linkHref',\n\t\t\t\t\tvalue: ( viewElement: ViewElement ) => viewElement.getAttribute( 'href' )\n\t\t\t\t}\n\t\t\t} );\n\n\t\t// Create linking commands.\n\t\teditor.commands.add( 'link', new LinkCommand( editor ) );\n\t\teditor.commands.add( 'unlink', new UnlinkCommand( editor ) );\n\n\t\tconst linkDecorators = getLocalizedDecorators( editor.t, normalizeDecorators( editor.config.get( 'link.decorators' ) ) );\n\n\t\tthis._enableAutomaticDecorators( linkDecorators\n\t\t\t.filter( ( item ): item is NormalizedLinkDecoratorAutomaticDefinition => item.mode === DECORATOR_AUTOMATIC ) );\n\t\tthis._enableManualDecorators( linkDecorators\n\t\t\t.filter( ( item ): item is NormalizedLinkDecoratorManualDefinition => item.mode === DECORATOR_MANUAL ) );\n\n\t\t// Enable two-step caret movement for `linkHref` attribute.\n\t\tconst twoStepCaretMovementPlugin = editor.plugins.get( TwoStepCaretMovement );\n\t\ttwoStepCaretMovementPlugin.registerAttribute( 'linkHref' );\n\n\t\t// Setup highlight over selected link.\n\t\tinlineHighlight( editor, 'linkHref', 'a', HIGHLIGHT_CLASS );\n\n\t\t// Handle link following by CTRL+click or ALT+ENTER\n\t\tthis._enableLinkOpen();\n\n\t\t// Clears the ModelDocumentSelection decorator attributes if the selection is no longer in a link (for example while using 2-SCM).\n\t\tthis._enableSelectionAttributesFixer();\n\n\t\t// Handle adding default protocol to pasted links.\n\t\tthis._enableClipboardIntegration();\n\n\t\t// Register postfixer that resolves conflicting decorator attributes.\n\t\tthis._enableDecoratorConflictPostfixer();\n\t}\n\n\t/**\n\t * Registers a function that opens links in a new browser tab.\n\t *\n\t * @param linkOpener The function that opens a link in a new browser tab.\n\t * @internal\n\t */\n\tpublic _registerLinkOpener( linkOpener: LinkOpener ): void {\n\t\tthis._linkOpeners.push( linkOpener );\n\t}\n\n\t/**\n\t * Processes an array of configured {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}\n\t * and registers a {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher downcast dispatcher}\n\t * for each one of them. Downcast dispatchers are obtained using the\n\t * {@link module:link/utils/automaticdecorators~AutomaticLinkDecorators#getDispatcher} method.\n\t *\n\t * **Note**: This method also activates the automatic external link decorator if enabled with\n\t * {@link module:link/linkconfig~LinkConfig#addTargetToExternalLinks `config.link.addTargetToExternalLinks`}.\n\t */\n\tprivate _enableAutomaticDecorators( automaticDecoratorDefinitions: Array<NormalizedLinkDecoratorAutomaticDefinition> ): void {\n\t\tconst editor = this.editor;\n\t\t// Store automatic decorators in the command instance as we do the same with manual decorators.\n\t\t// Thanks to that, `LinkImageEditing` plugin can re-use the same definitions.\n\t\tconst command: LinkCommand = editor.commands.get( 'link' )!;\n\t\tconst automaticDecorators = command.automaticDecorators;\n\n\t\t// Adds a default decorator for external links.\n\t\tif ( editor.config.get( 'link.addTargetToExternalLinks' ) ) {\n\t\t\tautomaticDecorators.add( {\n\t\t\t\tid: 'linkIsExternal',\n\t\t\t\tmode: DECORATOR_AUTOMATIC,\n\t\t\t\tcallback: url => !!url && EXTERNAL_LINKS_REGEXP.test( url ),\n\t\t\t\tattributes: {\n\t\t\t\t\ttarget: '_blank',\n\t\t\t\t\trel: 'noopener noreferrer'\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tautomaticDecorators.add( automaticDecoratorDefinitions );\n\n\t\tautomaticDecorators.setConflictChecker( ( automaticDecorator, modelItem ) => {\n\t\t\tfor ( const manualDecorator of command.manualDecorators ) {\n\t\t\t\t// If manual decorator is not applied, skip it.\n\t\t\t\tif ( !modelItem.hasAttribute( manualDecorator.id ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// If it conflicts with manual decorator that was applied, return true\n\t\t\t\t// to prevent the automatic decorator from being applied.\n\t\t\t\tif ( areDecoratorsConflicting( automaticDecorator, manualDecorator ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tif ( automaticDecorators.length ) {\n\t\t\teditor.conversion.for( 'downcast' ).add( automaticDecorators.getDispatcher() );\n\t\t}\n\t}\n\n\t/**\n\t * Processes an array of configured {@link module:link/linkconfig~LinkDecoratorManualDefinition manual decorators},\n\t * transforms them into {@link module:link/utils/manualdecorator~LinkManualDecorator} instances and stores them in the\n\t * {@link module:link/linkcommand~LinkCommand#manualDecorators} collection (a model for manual decorators state).\n\t *\n\t * Also registers an {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement attribute-to-element}\n\t * converter for each manual decorator and extends the {@link module:engine/model/schema~ModelSchema model's schema}\n\t * with adequate model attributes.\n\t */\n\tprivate _enableManualDecorators( manualDecoratorDefinitions: Array<NormalizedLinkDecoratorManualDefinition> ): void {\n\t\tif ( !manualDecoratorDefinitions.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst command: LinkCommand = editor.commands.get( 'link' )!;\n\t\tconst manualDecorators = command.manualDecorators;\n\n\t\tmanualDecoratorDefinitions.forEach( decoratorDefinition => {\n\t\t\teditor.model.schema.extend( '$text', { allowAttributes: decoratorDefinition.id } );\n\n\t\t\t// Keeps reference to manual decorator to decode its name to attributes during downcast.\n\t\t\tconst decorator = new LinkManualDecorator( decoratorDefinition );\n\n\t\t\tmanualDecorators.add( decorator );\n\n\t\t\teditor.conversion.for( 'downcast' ).add( dispatcher => {\n\t\t\t\tconst elementCreator = ( writer: ViewDowncastWriter ) => {\n\t\t\t\t\tconst element = writer.createAttributeElement( 'a', decorator.attributes, { priority: 5 } );\n\n\t\t\t\t\tif ( decorator.classes ) {\n\t\t\t\t\t\twriter.addClass( decorator.classes, element );\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( const key in decorator.styles ) {\n\t\t\t\t\t\twriter.setStyle( key, decorator.styles[ key ], element );\n\t\t\t\t\t}\n\n\t\t\t\t\twriter.setCustomProperty( 'link', true, element );\n\n\t\t\t\t\treturn element;\n\t\t\t\t};\n\n\t\t\t\tconst createConverter = ( isApplyingConverter: boolean ): GetCallback<DowncastAttributeEvent> => {\n\t\t\t\t\treturn ( evt, data, conversionApi ) => {\n\t\t\t\t\t\t// Manual decorators for block links are handled e.g. in LinkImageEditing.\n\t\t\t\t\t\tif ( !data.item.is( 'selection' ) && !conversionApi.schema.isInline( data.item ) ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( !isApplyingConverter && data.attributeOldValue ) {\n\t\t\t\t\t\t\t// Only test while removing the decorator as this is triggered before the applying converter.\n\t\t\t\t\t\t\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconversionApi.writer.unwrap(\n\t\t\t\t\t\t\t\tconversionApi.mapper.toViewRange( data.range ),\n\t\t\t\t\t\t\t\telementCreator( conversionApi.writer )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( isApplyingConverter && data.attributeNewValue ) {\n\t\t\t\t\t\t\t// Consume while applying the decorator.\n\t\t\t\t\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( data.item.is( 'selection' ) ) {\n\t\t\t\t\t\t\t\tconversionApi.writer.wrap(\n\t\t\t\t\t\t\t\t\tconversionApi.writer.document.selection.getFirstRange()!,\n\t\t\t\t\t\t\t\t\telementCreator( conversionApi.writer )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconversionApi.writer.wrap(\n\t\t\t\t\t\t\t\t\tconversionApi.mapper.toViewRange( data.range ),\n\t\t\t\t\t\t\t\t\telementCreator( conversionApi.writer )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\tdispatcher.on<DowncastAttributeEvent>( `attribute:${ decorator.id }`, createConverter( false ), {\n\t\t\t\t\tpriority: priorities.high - 1\n\t\t\t\t} );\n\t\t\t\t// Apply decorators after all automatic and manual decorators are removed so removing one decorator\n\t\t\t\t// won't strip part of the other decorator's attributes, classes or styles.\n\t\t\t\tdispatcher.on<DowncastAttributeEvent>( `attribute:${ decorator.id }`, createConverter( true ), {\n\t\t\t\t\tpriority: priorities.high - 2\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'a',\n\t\t\t\t\t...decorator._createPattern()\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: decorator.id\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Attaches handlers for {@link module:engine/view/document~ViewDocument#event:enter} and\n\t * {@link module:engine/view/document~ViewDocument#event:click} to enable link following.\n\t */\n\tprivate _enableLinkOpen(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\n\t\tconst handleLinkOpening = ( url: string ): void => {\n\t\t\tif ( !this._linkOpeners.some( opener => opener( url ) ) ) {\n\t\t\t\topenLink( url );\n\t\t\t}\n\t\t};\n\n\t\tthis.listenTo<ViewDocumentClickEvent>( viewDocument, 'click', ( evt, data ) => {\n\t\t\tconst shouldOpen = env.isMac ? data.domEvent.metaKey : data.domEvent.ctrlKey;\n\n\t\t\tif ( !shouldOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet clickedElement: Element | null = data.domTarget;\n\n\t\t\tif ( clickedElement.tagName.toLowerCase() != 'a' ) {\n\t\t\t\tclickedElement = clickedElement.closest( 'a' );\n\t\t\t}\n\n\t\t\tif ( !clickedElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst url = clickedElement.getAttribute( 'href' );\n\n\t\t\tif ( !url ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevt.stop();\n\t\t\tdata.preventDefault();\n\n\t\t\thandleLinkOpening( url );\n\t\t}, { context: '$capture' } );\n\n\t\t// Open link on Alt+Enter.\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( evt, data ) => {\n\t\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\t\t\tconst url = linkCommand!.value;\n\t\t\tconst shouldOpen = !!url && data.keyCode === keyCodes.enter && data.altKey;\n\n\t\t\tif ( !shouldOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevt.stop();\n\n\t\t\thandleLinkOpening( url );\n\t\t} );\n\t}\n\n\t/**\n\t * Watches the ModelDocumentSelection attribute changes and removes link decorator attributes when the linkHref attribute is removed.\n\t *\n\t * This is to ensure that there is no left-over link decorator attributes on the document selection that is no longer in a link.\n\t */\n\tprivate _enableSelectionAttributesFixer(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\tthis.listenTo<ModelDocumentSelectionChangeAttributeEvent>( selection, 'change:attribute', ( evt, { attributeKeys } ) => {\n\t\t\tif ( !attributeKeys.includes( 'linkHref' ) || selection.hasAttribute( 'linkHref' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmodel.change( writer => {\n\t\t\t\tremoveLinkAttributesFromSelection( writer, getLinkAttributesAllowedOnText( model.schema ) );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Enables URL fixing on pasting.\n\t */\n\tprivate _enableClipboardIntegration(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst defaultProtocol = this.editor.config.get( 'link.defaultProtocol' );\n\n\t\tif ( !defaultProtocol ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.listenTo<ClipboardContentInsertionEvent>( editor.plugins.get( 'ClipboardPipeline' ), 'contentInsertion', ( evt, data ) => {\n\t\t\tmodel.change( writer => {\n\t\t\t\tconst range = writer.createRangeIn( data.content );\n\n\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\tif ( item.hasAttribute( 'linkHref' ) ) {\n\t\t\t\t\t\tconst newLink = addLinkProtocolIfApplicable( item.getAttribute( 'linkHref' ) as string, defaultProtocol );\n\n\t\t\t\t\t\twriter.setAttribute( 'linkHref', newLink, item );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a postfixer that resolves conflicting decorator attributes on elements.\n\t */\n\tprivate _enableDecoratorConflictPostfixer(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\n\t\tmodel.document.registerPostFixer( writer => {\n\t\t\tlet hasChanged = false;\n\n\t\t\tconst changes = model.document.differ.getChanges();\n\t\t\tconst elementsToCheck = new Set<ModelItem>();\n\t\t\tconst manualDecoratorAttributeKeys = new Set<string>(\n\t\t\t\tlinkCommand.manualDecorators.map( decorator => decorator.id )\n\t\t\t);\n\n\t\t\tfor ( const change of changes ) {\n\t\t\t\tif ( change.type === 'attribute' ) {\n\t\t\t\t\t// Only react to link-related attribute changes to reduce work.\n\t\t\t\t\tif ( change.attributeKey !== 'linkHref' && !manualDecoratorAttributeKeys.has( change.attributeKey ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Use range items instead of nodeAfter to avoid issues with text node merging.\n\t\t\t\t\tfor ( const item of change.range.getItems() ) {\n\t\t\t\t\t\tif ( item.hasAttribute( 'linkHref' ) ) {\n\t\t\t\t\t\t\telementsToCheck.add( item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check if newly inserted nodes have link attributes. This is to cover the case of pasting content\n\t\t\t\t// with link attributes or typing over a link.\n\t\t\t\tif ( change.type === 'insert' && change.attributes.has( 'linkHref' ) && change.position.nodeAfter ) {\n\t\t\t\t\telementsToCheck.add( change.position.nodeAfter );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check each element for conflicting decorators.\n\t\t\tfor ( const item of elementsToCheck ) {\n\t\t\t\tconst appliedDecorators: Array<LinkManualDecorator> = [];\n\n\t\t\t\tfor ( const manualDecorator of linkCommand.manualDecorators ) {\n\t\t\t\t\tif ( !item.hasAttribute( manualDecorator.id ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Resolve conflicts on the fly, remove the earlier decorator (later wins).\n\t\t\t\t\tfor ( let i = appliedDecorators.length - 1; i >= 0; i-- ) {\n\t\t\t\t\t\tconst appliedDecorator = appliedDecorators[ i ];\n\n\t\t\t\t\t\tif ( areDecoratorsConflicting( appliedDecorator, manualDecorator ) ) {\n\t\t\t\t\t\t\twriter.removeAttribute( appliedDecorator.id, item );\n\t\t\t\t\t\t\tappliedDecorators.splice( i, 1 );\n\t\t\t\t\t\t\thasChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tappliedDecorators.push( manualDecorator );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn hasChanged;\n\t\t} );\n\t}\n}\n\n/**\n * A function that handles opening links. It may be used to define custom link handlers.\n *\n * @returns `true` if the link was opened successfully.\n */\ntype LinkOpener = ( url: string ) => boolean;\n\n/**\n * Make the selection free of link-related model attributes.\n * All link-related model attributes start with \"link\". That includes not only \"linkHref\"\n * but also all decorator attributes (they have dynamic names), or even custom plugins.\n */\nfunction removeLinkAttributesFromSelection( writer: ModelWriter, linkAttributes: Array<string> ): void {\n\twriter.removeSelectionAttribute( 'linkHref' );\n\n\tfor ( const attribute of linkAttributes ) {\n\t\twriter.removeSelectionAttribute( attribute );\n\t}\n}\n\n/**\n * Returns an array containing names of the attributes allowed on `$text` that describes the link item.\n */\nfunction getLinkAttributesAllowedOnText( schema: ModelSchema ): Array<string> {\n\tconst textAttributes = schema.getDefinition( '$text' )!.allowAttributes;\n\n\treturn textAttributes.filter( attribute => attribute.startsWith( 'link' ) );\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/**\n * @module link/ui/linkpreviewbuttonview\n */\n\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The link button class. Rendered as an `<a>` tag with link opening in a new tab.\n *\n * Provides a custom `navigate` cancelable event.\n */\nexport class LinkPreviewButtonView extends ButtonView {\n\t/**\n\t * The value of the \"href\" attribute of the link.\n\t *\n\t * @observable\n\t */\n\tdeclare public href: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.set( {\n\t\t\thref: undefined,\n\t\t\twithText: true\n\t\t} );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck-link-toolbar__preview' ],\n\t\t\t\thref: bind.to( 'href' ),\n\t\t\t\ttarget: '_blank',\n\t\t\t\trel: 'noopener noreferrer'\n\t\t\t},\n\n\t\t\ton: {\n\t\t\t\tclick: bind.to( evt => {\n\t\t\t\t\tif ( this.href ) {\n\t\t\t\t\t\tconst cancel = () => evt.preventDefault();\n\n\t\t\t\t\t\tthis.fire<LinkPreviewButtonNavigateEvent>( 'navigate', this.href, cancel );\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\n\t\tthis.template!.tag = 'a';\n\t}\n}\n\n/**\n * Fired when the button view is clicked.\n *\n * @eventName ~LinkPreviewButtonView#navigate\n */\nexport type LinkPreviewButtonNavigateEvent = {\n\tname: 'navigate';\n\targs: [ href: string, cancel: () => void ];\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/**\n * @module link/ui/linkformview\n */\n\nimport {\n\tButtonView,\n\tListView,\n\tListItemView,\n\tFocusCycler,\n\tLabeledFieldView,\n\tFormHeaderView,\n\tFormRowView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputText,\n\tsubmitHandler,\n\ttype InputTextView,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\nimport { IconPreviousArrow, IconSettings } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The link form view.\n */\nexport class LinkFormView extends View {\n\t/**\n\t * Tracks information about DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker = new FocusTracker();\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler = new KeystrokeHandler();\n\n\t/**\n\t * The Back button view displayed in the header.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * The Save button view.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * A button that opens the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} allowing the user to\n\t * configure manual decorators for the link handled by this form.\n\t */\n\tpublic manualDecoratorsButtonView: ButtonView;\n\n\t/**\n\t * The \"Displayed text\" input view.\n\t */\n\tpublic displayedTextInputView: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * The URL input view.\n\t */\n\tpublic urlInputView: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * A collection of child views.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A collection of child views in the providers list.\n\t */\n\tpublic readonly providersListChildren: ViewCollection<ButtonView>;\n\n\t/**\n\t * An array of form validators used by {@link #isValid}.\n\t */\n\tprivate readonly _validators: Array<LinkFormValidatorCallback>;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprivate readonly _focusables = new ViewCollection<FocusableView>();\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param validators  Form validators used by {@link #isValid}.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\tvalidators: Array<LinkFormValidatorCallback>\n\t) {\n\t\tsuper( locale );\n\n\t\tthis._validators = validators;\n\n\t\t// Create buttons.\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\t\tthis.manualDecoratorsButtonView = this._createManualDecoratorsButton();\n\n\t\t// Create input fields.\n\t\tthis.displayedTextInputView = this._createDisplayedTextInput();\n\t\tthis.urlInputView = this._createUrlInput();\n\n\t\tthis.providersListChildren = this.createCollection();\n\t\tthis.children = this.createCollection( [\n\t\t\tthis._createHeaderView()\n\t\t] );\n\n\t\tthis._createFormChildren();\n\n\t\t// Add providers list view to the children when the first item is added to the list.\n\t\t// This is to avoid adding the list view when the form is empty.\n\t\tthis.listenTo( this.providersListChildren, 'add', () => {\n\t\t\tthis.stopListening( this.providersListChildren, 'add' );\n\t\t\tthis.children.add( this._createProvidersListView() );\n\t\t} );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form',\n\t\t\t\t\t'ck-link-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/90\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.urlInputView,\n\t\t\tthis.manualDecoratorsButtonView,\n\t\t\tthis.saveButtonView,\n\t\t\t...this.providersListChildren,\n\t\t\tthis.backButtonView,\n\t\t\tthis.displayedTextInputView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\t// One error per field is enough.\n\t\t\tif ( errorText ) {\n\t\t\t\t// Apply updated error.\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tpublic resetFormStatus(): void {\n\t\tthis.urlInputView.errorText = null;\n\t}\n\n\t/**\n\t * Creates a back button view that cancels the form.\n\t */\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn backButton;\n\t}\n\n\t/**\n\t * Creates a save button view that inserts the link.\n\t */\n\tprivate _createSaveButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst saveButton = new ButtonView( this.locale );\n\n\t\tsaveButton.set( {\n\t\t\tlabel: t( 'Insert' ),\n\t\t\ttooltip: false,\n\t\t\twithText: true,\n\t\t\ttype: 'submit',\n\t\t\tclass: 'ck-button-action ck-button-bold'\n\t\t} );\n\n\t\treturn saveButton;\n\t}\n\n\t/**\n\t * Creates a button that opens the link properties view.\n\t */\n\tprivate _createManualDecoratorsButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst button = new ButtonView( this.locale );\n\n\t\tbutton.set( {\n\t\t\tlabel: t( 'Link properties' ),\n\t\t\ticon: IconSettings,\n\t\t\ttooltip: true,\n\t\t\tisVisible: false\n\t\t} );\n\n\t\tbutton.delegate( 'execute' ).to( this, 'showDecorators' );\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * Creates a header view for the form.\n\t */\n\tprivate _createHeaderView(): FormHeaderView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst header = new FormHeaderView( this.locale, {\n\t\t\tlabel: t( 'Link' )\n\t\t} );\n\n\t\theader.children.add( this.backButtonView, 0 );\n\n\t\treturn header;\n\t}\n\n\t/**\n\t * Creates a view for the providers list.\n\t */\n\tprivate _createProvidersListView(): ListView {\n\t\tconst providersListView = new ListView( this.locale );\n\n\t\tprovidersListView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-link-form__providers-list'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\n\t\tprovidersListView.items.bindTo( this.providersListChildren ).using( def => {\n\t\t\tconst listItemView = new ListItemView( this.locale );\n\n\t\t\tlistItemView.children.add( def );\n\n\t\t\treturn listItemView;\n\t\t} );\n\n\t\treturn providersListView;\n\t}\n\n\t/**\n\t * Creates a labeled input view for the \"Displayed text\" field.\n\t */\n\tprivate _createDisplayedTextInput(): LabeledFieldView<InputTextView> {\n\t\tconst t = this.locale!.t;\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\n\t\tlabeledInput.label = t( 'Displayed text' );\n\t\tlabeledInput.class = 'ck-labeled-field-view_full-width';\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Creates a labeled input view for the URL field.\n\t *\n\t * @returns Labeled field view instance.\n\t */\n\tprivate _createUrlInput(): LabeledFieldView<InputTextView> {\n\t\tconst t = this.locale!.t;\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\n\t\tlabeledInput.fieldView.inputMode = 'url';\n\t\tlabeledInput.label = t( 'Link URL' );\n\t\tlabeledInput.class = 'ck-labeled-field-view_full-width';\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Populates the {@link #children} collection of the form.\n\t */\n\tprivate _createFormChildren(): void {\n\t\tthis.children.add( new FormRowView( this.locale!, {\n\t\t\tchildren: [\n\t\t\t\tthis.displayedTextInputView\n\t\t\t],\n\t\t\tclass: [\n\t\t\t\t'ck-form__row_large-top-padding'\n\t\t\t]\n\t\t} ) );\n\n\t\tthis.children.add( new FormRowView( this.locale!, {\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView,\n\t\t\t\tthis.manualDecoratorsButtonView,\n\t\t\t\tthis.saveButtonView\n\t\t\t],\n\t\t\tclass: [\n\t\t\t\t'ck-form__row_with-submit',\n\t\t\t\t'ck-form__row_large-top-padding',\n\t\t\t\t'ck-form__row_large-bottom-padding'\n\t\t\t]\n\t\t} ) );\n\t}\n\n\t/**\n\t * The native DOM `value` of the {@link #urlInputView} element.\n\t *\n\t * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t * which works one way only and may not represent the actual state of the component in the DOM.\n\t */\n\tpublic get url(): string | null {\n\t\tconst { element } = this.urlInputView.fieldView;\n\n\t\tif ( !element ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn element.value.trim();\n\t}\n}\n\n/**\n * Callback used by {@link ~LinkFormView} to check if passed form value is valid.\n *\n * \t* If `undefined` is returned, it is assumed that the form value is correct and there is no error.\n * \t* If string is returned, it is assumed that the form value is incorrect and the returned string is displayed in the error label\n */\nexport type LinkFormValidatorCallback = ( form: LinkFormView ) => string | undefined;\n\n/**\n * Fired when the form view is submitted (when one of the children triggered the submit event),\n * for example with a click on {@link ~LinkFormView#saveButtonView}.\n *\n * @eventName ~LinkFormView#submit\n */\nexport type LinkFormSubmitEvent = {\n\tname: 'submit';\n\targs: [];\n};\n\n/**\n * Fired when the form view is canceled, for example with a click on {@link ~LinkFormView#backButtonView}.\n *\n * @eventName ~LinkFormView#cancel\n */\nexport type LinkFormCancelEvent = {\n\tname: 'cancel';\n\targs: [];\n};\n\n/**\n * Fired when the {@link ~LinkFormView#manualDecoratorsButtonView} is pressed, requesting the link properties\n * (manual decorators) view to be displayed.\n *\n * @eventName ~LinkFormView#showDecorators\n */\nexport type LinkFormShowDecoratorsEvent = {\n\tname: 'showDecorators';\n\targs: [];\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/**\n * @module link/ui/linkprovideritemsview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tFormHeaderView,\n\tView,\n\tListView,\n\tListItemView,\n\tViewCollection,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\n\nimport { IconPreviousArrow } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The link provider items view.\n */\nexport class LinkProviderItemsView extends View {\n\t/**\n\t * Tracks information about the list of links.\n\t *\n\t * @observable\n\t */\n\tdeclare public hasItems: boolean;\n\n\t/**\n\t * The header label of the view.\n\t *\n\t * @observable\n\t */\n\tdeclare public title: string;\n\n\t/**\n\t * The text displayed when no links are available.\n\t *\n\t * @observable\n\t */\n\tdeclare public emptyListPlaceholder: string;\n\n\t/**\n\t * Tracks information about DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker = new FocusTracker();\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler = new KeystrokeHandler();\n\n\t/**\n\t * The Back button view displayed in the header.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * The List view of links buttons.\n\t */\n\tpublic listView: ListView;\n\n\t/**\n\t * The collection of child views, which is bind with the `listView`.\n\t */\n\tpublic readonly listChildren: ViewCollection<ButtonView>;\n\n\t/**\n\t * The view displayed when the list is empty.\n\t */\n\tpublic emptyListInformation: View;\n\n\t/**\n\t * A collection of child views.\n\t */\n\tpublic children: ViewCollection;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprivate readonly _focusables = new ViewCollection<FocusableView>();\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * Creates an instance of the {@link module:link/ui/linkprovideritemsview~LinkProviderItemsView} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.listChildren = this.createCollection();\n\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.listView = this._createListView();\n\t\tthis.emptyListInformation = this._createEmptyLinksListItemView();\n\n\t\tthis.children = this.createCollection( [\n\t\t\tthis._createHeaderView(),\n\t\t\tthis.emptyListInformation\n\t\t] );\n\n\t\tthis.set( 'title', '' );\n\t\tthis.set( 'emptyListPlaceholder', '' );\n\t\tthis.set( 'hasItems', false );\n\n\t\tthis.listenTo( this.listChildren, 'change', () => {\n\t\t\tthis.hasItems = this.listChildren.length > 0;\n\t\t} );\n\n\t\tthis.on( 'change:hasItems', ( evt, propName, hasItems ) => {\n\t\t\tif ( hasItems ) {\n\t\t\t\tthis.children.remove( this.emptyListInformation );\n\t\t\t\tthis.children.add( this.listView );\n\t\t\t} else {\n\t\t\t\tthis.children.remove( this.listView );\n\t\t\t\tthis.children.add( this.emptyListInformation );\n\t\t\t}\n\t\t} );\n\n\t\t// Close the panel on esc key press when the **form has focus**.\n\t\tthis.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis.fire<LinkProvidersCancelEvent>( 'cancel' );\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-link-providers'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/90\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tconst childViews = [\n\t\t\tthis.listView,\n\t\t\tthis.backButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Creates a view for the list at the bottom.\n\t */\n\tprivate _createListView(): ListView {\n\t\tconst listView = new ListView( this.locale );\n\n\t\tlistView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-link-providers__list'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\n\t\tlistView.items.bindTo( this.listChildren ).using( button => {\n\t\t\tconst listItemView = new ListItemView( this.locale );\n\n\t\t\tlistItemView.children.add( button );\n\n\t\t\treturn listItemView;\n\t\t} );\n\n\t\treturn listView;\n\t}\n\n\t/**\n\t * Creates a back button view that cancels the form.\n\t */\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn backButton;\n\t}\n\n\t/**\n\t * Creates a header view for the form.\n\t */\n\tprivate _createHeaderView(): FormHeaderView {\n\t\tconst header = new FormHeaderView( this.locale );\n\n\t\theader.bind( 'label' ).to( this, 'title' );\n\t\theader.children.add( this.backButtonView, 0 );\n\n\t\treturn header;\n\t}\n\n\t/**\n\t * Creates an info view for an empty list.\n\t */\n\tprivate _createEmptyLinksListItemView(): View {\n\t\tconst view = new View( this.locale );\n\n\t\tview.setTemplate( {\n\t\t\ttag: 'p',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck', 'ck-link__empty-list-info' ]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: this.bindTemplate.to( 'emptyListPlaceholder' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\n\t\treturn view;\n\t}\n}\n\n/**\n * Fired when the links view is canceled, for example with a click on {@link ~LinkProviderItemsView#backButtonView}.\n *\n * @eventName ~LinkProviderItemsView#cancel\n */\nexport type LinkProvidersCancelEvent = {\n\tname: 'cancel';\n\targs: [];\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/**\n * @module link/ui/linkpropertiesview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tFormHeaderView,\n\tView,\n\tViewCollection,\n\tListView,\n\tListItemView,\n\ttype SwitchButtonView,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\nimport { IconPreviousArrow } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The link properties view controller class.\n *\n * See {@link module:link/ui/linkpropertiesview~LinkPropertiesView}.\n */\nexport class LinkPropertiesView extends View {\n\t/**\n\t * Tracks information about DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker = new FocusTracker();\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler = new KeystrokeHandler();\n\n\t/**\n\t * The Back button view displayed in the header.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * A collection of child views.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A collection of {@link module:ui/button/switchbuttonview~SwitchButtonView},\n\t * which corresponds to {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators}\n\t * configured in the editor.\n\t */\n\tpublic readonly listChildren: ViewCollection<SwitchButtonView>;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprivate readonly _focusables = new ViewCollection<FocusableView>();\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * Creates an instance of the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.listChildren = this.createCollection();\n\n\t\tthis.children = this.createCollection( [\n\t\t\tthis._createHeaderView(),\n\t\t\tthis._createListView()\n\t\t] );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-link-properties'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/90\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\n\t\t// Close the panel on esc key press when the **form has focus**.\n\t\tthis.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis.fire<LinkPropertiesBackEvent>( 'back' );\n\t\t\tcancel();\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tconst childViews = [\n\t\t\t...this.listChildren,\n\t\t\tthis.backButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Creates a back button view.\n\t */\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\t// TODO: maybe we should have a dedicated BackButtonView in the UI library.\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'back' );\n\n\t\treturn backButton;\n\t}\n\n\t/**\n\t * Creates a header view for the form.\n\t */\n\tprivate _createHeaderView(): FormHeaderView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst header = new FormHeaderView( this.locale, {\n\t\t\tlabel: t( 'Link properties' )\n\t\t} );\n\n\t\theader.children.add( this.backButtonView, 0 );\n\n\t\treturn header;\n\t}\n\n\t/**\n\t * Creates a form view that displays the {@link #listChildren} collection.\n\t */\n\tprivate _createListView(): ListView {\n\t\tconst listView = new ListView( this.locale );\n\n\t\tlistView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-link__list'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\n\t\tlistView.items.bindTo( this.listChildren ).using( item => {\n\t\t\tconst listItemView = new ListItemView( this.locale );\n\n\t\t\tlistItemView.children.add( item );\n\n\t\t\treturn listItemView;\n\t\t} );\n\n\t\treturn listView;\n\t}\n}\n\n/**\n * Fired when the {@link ~LinkPropertiesView#backButtonView} is pressed.\n *\n * @eventName ~LinkPropertiesView#back\n */\nexport type LinkPropertiesBackEvent = {\n\tname: 'back';\n\targs: [];\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/**\n * @module link/ui/linkbuttonview\n */\n\nimport { IconNextArrow } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, IconView } from '@ckeditor/ckeditor5-ui';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Represents a view for a dropdown menu button.\n */\nexport class LinkButtonView extends ButtonView {\n\t/**\n\t * An icon that displays an arrow to indicate a direction of the menu.\n\t */\n\tpublic readonly arrowView: IconView;\n\n\t/**\n\t * Creates an instance of the dropdown menu button view.\n\t *\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( locale?: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\twithText: true\n\t\t} );\n\n\t\tthis.arrowView = this._createArrowView();\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-link__button'\n\t\t\t\t]\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.children.add( this.arrowView );\n\t}\n\n\t/**\n\t * Creates the arrow view instance.\n\t *\n\t * @private\n\t */\n\tprivate _createArrowView() {\n\t\tconst arrowView = new IconView();\n\n\t\tarrowView.content = IconNextArrow;\n\n\t\treturn arrowView;\n\t}\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/**\n * @module link/linkui\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { IconLink, IconPencil, IconUnlink, IconSettings } from '@ckeditor/ckeditor5-icons';\nimport {\n\tClickObserver,\n\ttype ViewAttributeElement,\n\ttype ViewDocumentClickEvent,\n\ttype ViewElement,\n\ttype ViewPosition\n} from '@ckeditor/ckeditor5-engine';\nimport {\n\tButtonView,\n\tSwitchButtonView,\n\tContextualBalloon,\n\tclickOutsideHandler,\n\tCssTransitionDisablerMixin,\n\tMenuBarMenuListItemButtonView,\n\tToolbarView,\n\ttype ViewWithCssTransitionDisabler,\n\ttype ButtonExecuteEvent\n} from '@ckeditor/ckeditor5-ui';\n\nimport { Collection, type ObservableChangeEvent, type DomOptimalPositionOptions } from '@ckeditor/ckeditor5-utils';\nimport { isWidget } from '@ckeditor/ckeditor5-widget';\n\nimport { LinkEditing } from './linkediting.js';\nimport { resolveConflictingDecorators } from './utils/conflictingdecorators.js';\n\nimport { LinkPreviewButtonView, type LinkPreviewButtonNavigateEvent } from './ui/linkpreviewbuttonview.js';\nimport { LinkFormView, type LinkFormValidatorCallback } from './ui/linkformview.js';\nimport { LinkProviderItemsView } from './ui/linkprovideritemsview.js';\nimport { LinkPropertiesView } from './ui/linkpropertiesview.js';\nimport { LinkButtonView } from './ui/linkbuttonview.js';\n\nimport { type LinkCommand } from './linkcommand.js';\nimport { type UnlinkCommand } from './unlinkcommand.js';\nimport { type LinkManualDecorator } from './utils/manualdecorator.js';\n\nimport {\n\taddLinkProtocolIfApplicable,\n\tensureSafeUrl,\n\tisLinkElement,\n\textractTextFromLinkRange,\n\tLINK_KEYSTROKE\n} from './utils.js';\n\nconst VISUAL_SELECTION_MARKER_NAME = 'link-ui';\n\n/**\n * The link UI plugin. It introduces the `'link'` and `'unlink'` buttons and support for the <kbd>Ctrl+K</kbd> keystroke.\n *\n * It uses the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */\nexport class LinkUI extends Plugin {\n\t/**\n\t * The toolbar view displayed inside of the balloon.\n\t */\n\tpublic toolbarView: ToolbarView | null = null;\n\n\t/**\n\t * The form view displayed inside the balloon.\n\t */\n\tpublic formView: LinkFormView & ViewWithCssTransitionDisabler | null = null;\n\n\t/**\n\t * The view displaying links list.\n\t */\n\tpublic linkProviderItemsView: LinkProviderItemsView | null = null;\n\n\t/**\n\t * The form view displaying properties link settings.\n\t */\n\tpublic propertiesView: LinkPropertiesView & ViewWithCssTransitionDisabler | null = null;\n\n\t/**\n\t * The selected text of the link or text that is selected and can become a link.\n\t *\n\t * Note: It is `undefined` when the current selection does not allow for text,\n\t * for example any non text node is selected or multiple blocks are selected.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public selectedLinkableText: string | undefined;\n\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon!: ContextualBalloon;\n\n\t/**\n\t * The collection of the link providers.\n\t */\n\tprivate _linksProviders: Collection<LinksProvider> = new Collection();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon, LinkEditing ]> {\n\t\treturn [ ContextualBalloon, LinkEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LinkUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\tthis.set( 'selectedLinkableText', undefined );\n\n\t\teditor.editing.view.addObserver( ClickObserver );\n\n\t\tthis._balloon = editor.plugins.get( ContextualBalloon );\n\n\t\t// Create toolbar buttons.\n\t\tthis._registerComponents();\n\t\tthis._registerEditingOpeners();\n\t\tthis._enableBalloonActivators();\n\n\t\t// Renders a fake visual selection marker on an expanded selection.\n\t\teditor.conversion.for( 'editingDowncast' ).markerToHighlight( {\n\t\t\tmodel: VISUAL_SELECTION_MARKER_NAME,\n\t\t\tview: {\n\t\t\t\tclasses: [ 'ck-fake-link-selection' ]\n\t\t\t}\n\t\t} );\n\n\t\t// Renders a fake visual selection marker on a collapsed selection.\n\t\teditor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t\t\tmodel: VISUAL_SELECTION_MARKER_NAME,\n\t\t\tview: ( data, { writer } ) => {\n\t\t\t\tif ( !data.markerRange.isCollapsed ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst markerElement = writer.createUIElement( 'span' );\n\n\t\t\t\twriter.addClass(\n\t\t\t\t\t[ 'ck-fake-link-selection', 'ck-fake-link-selection_collapsed' ],\n\t\t\t\t\tmarkerElement\n\t\t\t\t);\n\n\t\t\t\treturn markerElement;\n\t\t\t}\n\t\t} );\n\n\t\t// Add the information about the keystrokes to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Create link' ),\n\t\t\t\t\tkeystroke: LINK_KEYSTROKE\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move out of a link' ),\n\t\t\t\t\tkeystroke: [\n\t\t\t\t\t\t[ 'arrowleft', 'arrowleft' ],\n\t\t\t\t\t\t[ 'arrowright', 'arrowright' ]\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see https://github.com/ckeditor/ckeditor5/issues/1341).\n\t\tif ( this.propertiesView ) {\n\t\t\tthis.propertiesView.destroy();\n\t\t}\n\n\t\tif ( this.formView ) {\n\t\t\tthis.formView.destroy();\n\t\t}\n\n\t\tif ( this.toolbarView ) {\n\t\t\tthis.toolbarView.destroy();\n\t\t}\n\n\t\tif ( this.linkProviderItemsView ) {\n\t\t\tthis.linkProviderItemsView.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Registers list of buttons below the link form view that\n\t * open a list of links provided by the clicked provider.\n\t */\n\tpublic registerLinksListProvider( provider: LinksProvider ): void {\n\t\tconst insertIndex = this._linksProviders\n\t\t\t.filter( existing => ( existing.order || 0 ) <= ( provider.order || 0 ) )\n\t\t\t.length;\n\n\t\tthis._linksProviders.add( provider, insertIndex );\n\t}\n\n\t/**\n\t * Creates views.\n\t */\n\tprivate _createViews() {\n\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.formView = this._createFormView();\n\n\t\tif ( linkCommand.manualDecorators.length ) {\n\t\t\tthis.propertiesView = this._createPropertiesView();\n\t\t}\n\n\t\t// Attach lifecycle actions to the the balloon.\n\t\tthis._enableUserBalloonInteractions();\n\t}\n\n\t/**\n\t * Creates the ToolbarView instance.\n\t */\n\tprivate _createToolbarView(): ToolbarView {\n\t\tconst editor = this.editor;\n\t\tconst toolbarView = new ToolbarView( editor.locale );\n\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\n\t\ttoolbarView.class = 'ck-link-toolbar';\n\n\t\t// Remove the linkProperties button if there are no manual decorators, as it would be useless.\n\t\tlet toolbarItems = editor.config.get( 'link.toolbar' )!;\n\n\t\tif ( !linkCommand.manualDecorators.length ) {\n\t\t\ttoolbarItems = toolbarItems.filter( item => item !== 'linkProperties' );\n\t\t}\n\n\t\ttoolbarView.fillFromConfig( toolbarItems, editor.ui.componentFactory );\n\n\t\t// Close the panel on esc key press when the **link toolbar have focus**.\n\t\ttoolbarView.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis._hideUI();\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Open the form view on Ctrl+K when the **link toolbar have focus**..\n\t\ttoolbarView.keystrokes.set( LINK_KEYSTROKE, ( data, cancel ) => {\n\t\t\tthis._addFormView();\n\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Register the toolbar, so it becomes available for Alt+F10 and Esc navigation.\n\t\t// TODO this should be registered earlier to be able to open this toolbar without previously opening it by click or Ctrl+K\n\t\teditor.ui.addToolbar( toolbarView, {\n\t\t\tisContextual: true,\n\t\t\tbeforeFocus: () => {\n\t\t\t\tif ( this._getSelectedLinkElement() && !this._isToolbarVisible ) {\n\t\t\t\t\tthis._showUI( true );\n\t\t\t\t}\n\t\t\t},\n\t\t\tafterBlur: () => {\n\t\t\t\tthis._hideUI( false );\n\t\t\t}\n\t\t} );\n\n\t\treturn toolbarView;\n\t}\n\n\t/**\n\t * Creates the {@link module:link/ui/linkformview~LinkFormView} instance.\n\t */\n\tprivate _createFormView(): LinkFormView & ViewWithCssTransitionDisabler {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\t\tconst defaultProtocol = editor.config.get( 'link.defaultProtocol' );\n\n\t\tconst formView = new ( CssTransitionDisablerMixin( LinkFormView ) )( editor.locale, getFormValidators( editor ) );\n\n\t\tformView.displayedTextInputView.bind( 'isEnabled' ).to( this, 'selectedLinkableText', value => value !== undefined );\n\n\t\t// Form elements should be read-only when corresponding commands are disabled.\n\t\tformView.urlInputView.bind( 'isEnabled' ).to( linkCommand, 'isEnabled' );\n\n\t\t// Disable the \"save\" button if the command is disabled.\n\t\tformView.saveButtonView.bind( 'isEnabled' ).to( linkCommand, 'isEnabled' );\n\n\t\t// Change the \"Save\" button label depending on the command state.\n\t\tformView.saveButtonView.bind( 'label' ).to( linkCommand, 'value', value => value ? t( 'Update' ) : t( 'Insert' ) );\n\n\t\t// Execute link command after clicking the \"Save\" button.\n\t\tthis.listenTo( formView, 'submit', () => {\n\t\t\tif ( formView.isValid() ) {\n\t\t\t\tconst url = formView.urlInputView.fieldView.element!.value;\n\t\t\t\tconst parsedUrl = addLinkProtocolIfApplicable( url, defaultProtocol );\n\t\t\t\tconst displayedText = formView.displayedTextInputView.fieldView.element!.value;\n\n\t\t\t\teditor.execute(\n\t\t\t\t\t'link',\n\t\t\t\t\tparsedUrl,\n\t\t\t\t\tthis._getDecoratorSwitchesState(),\n\t\t\t\t\tdisplayedText !== this.selectedLinkableText ? displayedText : undefined\n\t\t\t\t);\n\n\t\t\t\tthis._closeFormView();\n\t\t\t}\n\t\t} );\n\n\t\t// Update balloon position when form error changes.\n\t\tthis.listenTo( formView.urlInputView, 'change:errorText', () => {\n\t\t\teditor.ui.update();\n\t\t} );\n\n\t\t// Hide the panel after clicking the \"Cancel\" button.\n\t\tthis.listenTo( formView, 'cancel', () => {\n\t\t\tthis._closeFormView();\n\t\t} );\n\n\t\t// Close the panel on esc key press when the **form has focus**.\n\t\tformView.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis._closeFormView();\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Watch adding new link providers and add them to the buttons list.\n\t\tformView.providersListChildren.bindTo( this._linksProviders ).using(\n\t\t\tprovider => this._createLinksListProviderButton( provider )\n\t\t);\n\n\t\t// The \"Link properties\" button makes sense only when there is something to configure.\n\t\tformView.manualDecoratorsButtonView.isVisible = linkCommand.manualDecorators.length > 0;\n\n\t\t// Let the user open the link properties view directly from the form, that is, also while\n\t\t// creating a brand new link that has not been inserted into the document yet. In that case,\n\t\t// the properties view operates on the not–yet–inserted link. See #_createPropertiesView.\n\t\tthis.listenTo( formView, 'showDecorators', () => {\n\t\t\tthis._addPropertiesView();\n\t\t} );\n\n\t\treturn formView;\n\t}\n\n\t/**\n\t * Creates a sorted array of buttons with link names.\n\t */\n\tprivate _createLinkProviderListView( provider: LinksProvider ): Array<ButtonView> {\n\t\treturn provider.getListItems().map( ( { href, label, icon } ) => {\n\t\t\tconst buttonView = new ButtonView();\n\n\t\t\tbuttonView.set( {\n\t\t\t\tlabel,\n\t\t\t\ticon,\n\t\t\t\ttooltip: false,\n\t\t\t\twithText: true\n\t\t\t} );\n\n\t\t\tbuttonView.on( 'execute', () => {\n\t\t\t\tthis.formView!.resetFormStatus();\n\t\t\t\tthis.formView!.urlInputView.fieldView.value = href;\n\n\t\t\t\t// Set focus to the editing view to prevent from losing it while current view is removed.\n\t\t\t\tthis.editor.editing.view.focus();\n\n\t\t\t\tthis._removeLinksProviderView();\n\n\t\t\t\t// Set the focus to the URL input field.\n\t\t\t\tthis.formView!.focus();\n\t\t\t} );\n\n\t\t\treturn buttonView;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a view for links provider.\n\t */\n\tprivate _createLinkProviderItemsView( provider: LinksProvider ): LinkProviderItemsView {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\n\t\tconst view = new LinkProviderItemsView( editor.locale );\n\t\tconst { emptyListPlaceholder, label } = provider;\n\n\t\tview.emptyListPlaceholder = emptyListPlaceholder || t( 'No links available' );\n\t\tview.title = label;\n\n\t\t// Hide the panel after clicking the \"Cancel\" button.\n\t\tthis.listenTo( view, 'cancel', () => {\n\t\t\t// Set focus to the editing view to prevent from losing it while current view is removed.\n\t\t\teditor.editing.view.focus();\n\n\t\t\tthis._removeLinksProviderView();\n\n\t\t\t// Set the focus to the URL input field.\n\t\t\tthis.formView!.focus();\n\t\t} );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Creates the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} instance.\n\t */\n\tprivate _createPropertiesView(): LinkPropertiesView & ViewWithCssTransitionDisabler {\n\t\tconst editor = this.editor;\n\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\n\t\tconst view = new ( CssTransitionDisablerMixin( LinkPropertiesView ) )( editor.locale );\n\n\t\t// Hide the panel after clicking the back button.\n\t\tthis.listenTo( view, 'back', () => {\n\t\t\t// The properties view can be opened either straight from the toolbar (for an already\n\t\t\t// inserted link) or from within the form (while creating or editing a link). Bring focus\n\t\t\t// back to whichever view will become visible once the properties view is removed.\n\t\t\tif ( this._isFormInPanel ) {\n\t\t\t\tthis._removePropertiesView();\n\t\t\t\tthis.formView!.focus();\n\t\t\t} else {\n\t\t\t\t// Move focus back to the editing view to prevent from losing it while current view is removed.\n\t\t\t\teditor.editing.view.focus();\n\n\t\t\t\tthis._removePropertiesView();\n\t\t\t}\n\t\t} );\n\n\t\tview.listChildren.bindTo( linkCommand.manualDecorators ).using( manualDecorator => {\n\t\t\tconst button: SwitchButtonView = new SwitchButtonView( editor.locale );\n\n\t\t\tbutton.set( {\n\t\t\t\tlabel: manualDecorator.label,\n\t\t\t\twithText: true\n\t\t\t} );\n\n\t\t\tbutton.bind( 'isOn' ).toMany( [ manualDecorator, linkCommand ], 'value', ( decoratorValue, commandValue ) => {\n\t\t\t\treturn commandValue === undefined && decoratorValue === undefined ?\n\t\t\t\t\t!!manualDecorator.defaultValue :\n\t\t\t\t\t!!decoratorValue;\n\t\t\t} );\n\n\t\t\tbutton.on( 'execute', () => {\n\t\t\t\tconst newValue = !button.isOn;\n\n\t\t\t\tif ( linkCommand.value !== undefined ) {\n\t\t\t\t\t// There is an existing link under the selection (or command value) — apply the\n\t\t\t\t\t// decorator change to the document immediately, as before.\n\t\t\t\t\teditor.execute( 'link', linkCommand.value!, {\n\t\t\t\t\t\t...this._getDecoratorSwitchesState(),\n\t\t\t\t\t\t[ manualDecorator.id ]: newValue\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\t// The link has not been inserted into the document yet (it's still being created\n\t\t\t\t\t// in the form). There is nothing to execute the command on, so instead we keep the\n\t\t\t\t\t// toggled state on the decorator itself. It will be picked up by\n\t\t\t\t\t// #_getDecoratorSwitchesState and applied together with the link once the form\n\t\t\t\t\t// is submitted.\n\t\t\t\t\tthis._togglePendingManualDecorator( manualDecorator, newValue );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Obtains the state of the manual decorators.\n\t */\n\tprivate _getDecoratorSwitchesState(): Record<string, boolean> {\n\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\n\t\treturn Array\n\t\t\t.from( linkCommand.manualDecorators )\n\t\t\t.reduce<Record<string, boolean>>( ( accumulator, manualDecorator ) => {\n\t\t\t\tconst value = linkCommand.value === undefined && manualDecorator.value === undefined ?\n\t\t\t\t\tmanualDecorator.defaultValue :\n\t\t\t\t\tmanualDecorator.value;\n\n\t\t\t\treturn {\n\t\t\t\t\t...accumulator,\n\t\t\t\t\t[ manualDecorator.id ]: !!value\n\t\t\t\t};\n\t\t\t}, {} );\n\t}\n\n\t/**\n\t * Toggles the state of a manual decorator while a new link is being created, that is, before it is\n\t * inserted into the document. Since there is no link (and no command value) to execute the `'link'`\n\t * command against yet, the new state is kept on the decorator's own observable\n\t * {@link module:link/utils/manualdecorator~LinkManualDecorator#value} instead of the model.\n\t */\n\tprivate _togglePendingManualDecorator( manualDecorator: LinkManualDecorator, newValue: boolean ): void {\n\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\t\tconst allDecorators = Array.from( linkCommand.manualDecorators );\n\n\t\tconst decoratorStates = this._getDecoratorSwitchesState();\n\n\t\t// A decorator that is only \"on\" via its `defaultValue` (never explicitly toggled) still has\n\t\t// `#value === undefined`, which `resolveConflictingDecorators()` would mistake for \"newly\n\t\t// enabled\" just like the decorator actually being toggled — causing both to evict each other.\n\t\t// Normalize to the same default-aware boolean as above so only genuine toggles count as new.\n\t\tconst previousDecoratorStates = allDecorators.map( decorator => ( {\n\t\t\tid: decorator.id,\n\t\t\tattributes: decorator.attributes,\n\t\t\tstyles: decorator.styles,\n\t\t\tvalue: decoratorStates[ decorator.id ]\n\t\t} ) );\n\n\t\tdecoratorStates[ manualDecorator.id ] = newValue;\n\n\t\tconst resolvedStates = resolveConflictingDecorators( {\n\t\t\tdecoratorStates,\n\t\t\tallDecorators: previousDecoratorStates\n\t\t} );\n\n\t\tfor ( const decorator of allDecorators ) {\n\t\t\tdecorator.value = resolvedStates[ decorator.id ];\n\t\t}\n\t}\n\n\t/**\n\t * Clears the state of all manual decorators that may have been toggled while creating a link that,\n\t * in the end, was never inserted into the document (for example, the user canceled the form).\n\t */\n\tprivate _resetPendingManualDecoratorsState(): void {\n\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\n\t\tfor ( const manualDecorator of linkCommand.manualDecorators ) {\n\t\t\tmanualDecorator.value = undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Registers listeners used in editing plugin, used to open links.\n\t */\n\tprivate _registerEditingOpeners() {\n\t\tconst linkEditing = this.editor.plugins.get( LinkEditing );\n\n\t\tlinkEditing._registerLinkOpener( href => {\n\t\t\tconst match = this._getLinkProviderLinkByHref( href );\n\n\t\t\tif ( !match ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst { item, provider } = match;\n\n\t\t\tif ( provider.navigate ) {\n\t\t\t\treturn provider.navigate( item );\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} );\n\t}\n\n\t/**\n\t * Registers components in the ComponentFactory.\n\t */\n\tprivate _registerComponents(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( 'link', () => {\n\t\t\tconst button = this._createButton( ButtonView );\n\n\t\t\tbutton.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:link', () => {\n\t\t\tconst button = this._createButton( MenuBarMenuListItemButtonView );\n\n\t\t\tbutton.set( {\n\t\t\t\trole: 'menuitemcheckbox'\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'linkPreview', locale => {\n\t\t\tconst button = new LinkPreviewButtonView( locale );\n\t\t\tconst allowedProtocols = editor.config.get( 'link.allowedProtocols' )!;\n\t\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\t\t\tconst t = locale.t;\n\n\t\t\tbutton.bind( 'isEnabled' ).to( linkCommand, 'value', href => !!href );\n\n\t\t\tbutton.bind( 'href' ).to( linkCommand, 'value', href => {\n\t\t\t\treturn href && ensureSafeUrl( href, allowedProtocols );\n\t\t\t} );\n\n\t\t\tconst setHref = ( href: string | undefined ) => {\n\t\t\t\tif ( href === '' ) {\n\t\t\t\t\tbutton.label = t( 'This link has no URL' );\n\t\t\t\t\tbutton.icon = undefined;\n\t\t\t\t\tbutton.tooltip = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( !href ) {\n\t\t\t\t\tbutton.label = undefined;\n\t\t\t\t\tbutton.icon = undefined;\n\t\t\t\t\tbutton.tooltip = t( 'Open link in new tab' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst selectedLinksProviderLink = this._getLinkProviderLinkByHref( href );\n\n\t\t\t\tif ( selectedLinksProviderLink ) {\n\t\t\t\t\tconst { label, tooltip, icon } = selectedLinksProviderLink.item;\n\n\t\t\t\t\tbutton.label = label;\n\t\t\t\t\tbutton.tooltip = tooltip || false;\n\t\t\t\t\tbutton.icon = icon;\n\t\t\t\t} else {\n\t\t\t\t\tbutton.label = href;\n\t\t\t\t\tbutton.icon = undefined;\n\t\t\t\t\tbutton.tooltip = t( 'Open link in new tab' );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tsetHref( linkCommand.value );\n\n\t\t\tthis.listenTo<ObservableChangeEvent<string | undefined>>( linkCommand, 'change:value', ( evt, name, href ) => {\n\t\t\t\tsetHref( href );\n\t\t\t} );\n\n\t\t\tthis.listenTo<LinkPreviewButtonNavigateEvent>( button, 'navigate', ( evt, href, cancel ) => {\n\t\t\t\tconst selectedLinksProviderLink = this._getLinkProviderLinkByHref( href );\n\n\t\t\t\tif ( !selectedLinksProviderLink ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { provider, item } = selectedLinksProviderLink!;\n\t\t\t\tconst { navigate } = provider;\n\n\t\t\t\tif ( navigate && navigate( item! ) ) {\n\t\t\t\t\tevt.stop();\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'unlink', locale => {\n\t\t\tconst unlinkCommand: UnlinkCommand = editor.commands.get( 'unlink' )!;\n\t\t\tconst button = new ButtonView( locale );\n\t\t\tconst t = locale.t;\n\n\t\t\tbutton.set( {\n\t\t\t\tlabel: t( 'Unlink' ),\n\t\t\t\ticon: IconUnlink,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tbutton.bind( 'isEnabled' ).to( unlinkCommand );\n\n\t\t\tthis.listenTo<ButtonExecuteEvent>( button, 'execute', () => {\n\t\t\t\teditor.execute( 'unlink' );\n\t\t\t\tthis._hideUI();\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'editLink', locale => {\n\t\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\t\t\tconst button = new ButtonView( locale );\n\t\t\tconst t = locale.t;\n\n\t\t\tbutton.set( {\n\t\t\t\tlabel: t( 'Edit link' ),\n\t\t\t\ticon: IconPencil,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tbutton.bind( 'isEnabled' ).to( linkCommand );\n\n\t\t\tthis.listenTo<ButtonExecuteEvent>( button, 'execute', () => {\n\t\t\t\tthis._addFormView();\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'linkProperties', locale => {\n\t\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\t\t\tconst button = new ButtonView( locale );\n\t\t\tconst t = locale.t;\n\n\t\t\tbutton.set( {\n\t\t\t\tlabel: t( 'Link properties' ),\n\t\t\t\ticon: IconSettings,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tbutton.bind( 'isEnabled' ).to(\n\t\t\t\tlinkCommand, 'isEnabled',\n\t\t\t\tlinkCommand, 'value',\n\t\t\t\tlinkCommand, 'manualDecorators',\n\t\t\t\t( isEnabled, href, manualDecorators ) => isEnabled && href !== undefined && manualDecorators.length > 0\n\t\t\t);\n\n\t\t\tthis.listenTo<ButtonExecuteEvent>( button, 'execute', () => {\n\t\t\t\tthis._addPropertiesView();\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a links button view.\n\t */\n\tprivate _createLinksListProviderButton( linkProvider: LinksProvider ): LinkButtonView {\n\t\tconst locale = this.editor.locale!;\n\t\tconst linksButton = new LinkButtonView( locale );\n\n\t\tlinksButton.set( {\n\t\t\tlabel: linkProvider.label\n\t\t} );\n\n\t\tthis.listenTo( linksButton, 'execute', () => {\n\t\t\tthis._showLinksProviderView( linkProvider );\n\t\t} );\n\n\t\treturn linksButton;\n\t}\n\n\t/**\n\t * Creates a button for link command to use either in toolbar or in menu bar.\n\t */\n\tprivate _createButton<T extends typeof ButtonView>( ButtonClass: T ): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get( 'link' )!;\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\t\tconst t = locale.t;\n\n\t\tview.set( {\n\t\t\tlabel: t( 'Link' ),\n\t\t\ticon: IconLink,\n\t\t\tkeystroke: LINK_KEYSTROKE,\n\t\t\tisToggleable: true\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\tview.bind( 'isOn' ).to( command, 'value', value => !!value );\n\n\t\t// Show the panel on button click.\n\t\tthis.listenTo<ButtonExecuteEvent>( view, 'execute', () => {\n\t\t\teditor.editing.view.scrollToTheSelection();\n\t\t\tthis._showUI( true );\n\n\t\t\t// Open the form view on-top of the toolbar view if it's already visible.\n\t\t\t// It should be visible every time the link is selected.\n\t\t\tif ( this._getSelectedLinkElement() ) {\n\t\t\t\tthis._addFormView();\n\t\t\t}\n\t\t} );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Attaches actions that control whether the balloon panel containing the\n\t * {@link #formView} should be displayed.\n\t */\n\tprivate _enableBalloonActivators(): void {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\n\t\t// Handle click on view document and show panel when selection is placed inside the link element.\n\t\t// Keep panel open until selection will be inside the same link element.\n\t\tthis.listenTo<ViewDocumentClickEvent>( viewDocument, 'click', () => {\n\t\t\tconst parentLink = this._getSelectedLinkElement();\n\n\t\t\tif ( parentLink ) {\n\t\t\t\t// Then show panel but keep focus inside editor editable.\n\t\t\t\tthis._showUI();\n\t\t\t}\n\t\t} );\n\n\t\t// Handle the `Ctrl+K` keystroke and show the panel.\n\t\teditor.keystrokes.set( LINK_KEYSTROKE, ( keyEvtData, cancel ) => {\n\t\t\t// Prevent focusing the search bar in FF, Chrome and Edge. See https://github.com/ckeditor/ckeditor5/issues/4811.\n\t\t\tcancel();\n\n\t\t\tif ( editor.commands.get( 'link' )!.isEnabled ) {\n\t\t\t\teditor.editing.view.scrollToTheSelection();\n\t\t\t\tthis._showUI( true );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Attaches actions that control whether the balloon panel containing the\n\t * {@link #formView} is visible or not.\n\t */\n\tprivate _enableUserBalloonInteractions(): void {\n\t\t// Focus the form if the balloon is visible and the Tab key has been pressed.\n\t\tthis.editor.keystrokes.set( 'Tab', ( data, cancel ) => {\n\t\t\tif ( this._isToolbarVisible && !this.toolbarView!.focusTracker.isFocused ) {\n\t\t\t\tthis.toolbarView!.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t}, {\n\t\t\t// Use the high priority because the link UI navigation is more important\n\t\t\t// than other feature's actions, e.g. list indentation.\n\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/146\n\t\t\tpriority: 'high'\n\t\t} );\n\n\t\t// Close the panel on the Esc key press when the editable has focus and the balloon is visible.\n\t\tthis.editor.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tif ( this._isUIVisible ) {\n\t\t\t\tthis._hideUI();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t} );\n\n\t\t// Close on click outside of balloon panel element.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this.formView!,\n\t\t\tactivator: () => this._isUIInPanel,\n\t\t\tcontextElements: () => [ this._balloon.view.element! ],\n\t\t\tcallback: () => {\n\t\t\t\t// Focusing on the editable during a click outside the balloon panel might\n\t\t\t\t// cause the selection to move to the beginning of the editable, so we avoid\n\t\t\t\t// focusing on it during this action.\n\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/18253\n\t\t\t\tthis._hideUI( false );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Adds the {@link #toolbarView} to the {@link #_balloon}.\n\t *\n\t * @internal\n\t */\n\tpublic _addToolbarView(): void {\n\t\tif ( !this.toolbarView ) {\n\t\t\tthis._createViews();\n\t\t}\n\n\t\tif ( this._isToolbarInPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._balloon.add( {\n\t\t\tview: this.toolbarView!,\n\t\t\tposition: this._getBalloonPositionData(),\n\t\t\tballoonClassName: 'ck-toolbar-container'\n\t\t} );\n\t}\n\n\t/**\n\t * Adds the {@link #formView} to the {@link #_balloon}.\n\t */\n\tprivate _addFormView(): void {\n\t\tif ( !this.formView ) {\n\t\t\tthis._createViews();\n\t\t}\n\n\t\tif ( this._isFormInPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\n\t\tthis.formView!.disableCssTransitions();\n\t\tthis.formView!.resetFormStatus();\n\t\tthis.formView!.backButtonView.isVisible = linkCommand.isEnabled && linkCommand.value !== undefined;\n\n\t\tthis._balloon.add( {\n\t\t\tview: this.formView!,\n\t\t\tposition: this._getBalloonPositionData()\n\t\t} );\n\n\t\t// Make sure that each time the panel shows up, the fields remains in sync with the value of\n\t\t// the command. If the user typed in the input, then canceled the balloon (`urlInputView.fieldView#value` stays\n\t\t// unaltered) and re-opened it without changing the value of the link command (e.g. because they\n\t\t// clicked the same link), they would see the old value instead of the actual value of the command.\n\t\t// https://github.com/ckeditor/ckeditor5-link/issues/78\n\t\t// https://github.com/ckeditor/ckeditor5-link/issues/123\n\n\t\tthis.selectedLinkableText = this._getSelectedLinkableText();\n\n\t\tthis.formView!.displayedTextInputView.fieldView.value = this.selectedLinkableText || '';\n\t\tthis.formView!.urlInputView.fieldView.value = linkCommand.value || '';\n\n\t\t// Select input when form view is currently visible.\n\t\tif ( this._balloon.visibleView === this.formView ) {\n\t\t\tthis.formView!.urlInputView.fieldView.select();\n\t\t}\n\n\t\tthis.formView!.enableCssTransitions();\n\t}\n\n\t/**\n\t * Adds the {@link #propertiesView} to the {@link #_balloon}.\n\t */\n\tprivate _addPropertiesView(): void {\n\t\tif ( !this.propertiesView ) {\n\t\t\tthis._createViews();\n\t\t}\n\n\t\tif ( this._arePropertiesInPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.propertiesView!.disableCssTransitions();\n\n\t\tthis._balloon.add( {\n\t\t\tview: this.propertiesView!,\n\t\t\tposition: this._getBalloonPositionData()\n\t\t} );\n\n\t\tthis.propertiesView!.enableCssTransitions();\n\t\tthis.propertiesView!.focus();\n\t}\n\n\t/**\n\t * Shows the view with links provided by the given provider.\n\t */\n\tprivate _showLinksProviderView( provider: LinksProvider ): void {\n\t\tif ( this.linkProviderItemsView ) {\n\t\t\tthis._removeLinksProviderView();\n\t\t}\n\n\t\tthis.linkProviderItemsView = this._createLinkProviderItemsView( provider );\n\n\t\tthis._addLinkProviderItemsView( provider );\n\t}\n\n\t/**\n\t * Adds the {@link #linkProviderItemsView} to the {@link #_balloon}.\n\t */\n\tprivate _addLinkProviderItemsView( provider: LinksProvider ): void {\n\t\t// Clear the collection of links.\n\t\tthis.linkProviderItemsView!.listChildren.clear();\n\n\t\t// Add links to the collection.\n\t\tthis.linkProviderItemsView!.listChildren.addMany( this._createLinkProviderListView( provider ) );\n\n\t\tthis._balloon.add( {\n\t\t\tview: this.linkProviderItemsView!,\n\t\t\tposition: this._getBalloonPositionData()\n\t\t} );\n\n\t\tthis.linkProviderItemsView!.focus();\n\t}\n\n\t/**\n\t * Closes the form view. Decides whether the balloon should be hidden completely or if the action view should be shown. This is\n\t * decided upon the link command value (which has a value if the document selection is in the link).\n\t */\n\tprivate _closeFormView(): void {\n\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\n\t\tthis.selectedLinkableText = undefined;\n\n\t\tif ( linkCommand.value !== undefined ) {\n\t\t\tthis._removeFormView();\n\t\t} else {\n\t\t\tthis._hideUI();\n\t\t}\n\t}\n\n\t/**\n\t * Removes the {@link #propertiesView} from the {@link #_balloon}.\n\t */\n\tprivate _removePropertiesView(): void {\n\t\tif ( this._arePropertiesInPanel ) {\n\t\t\tthis._balloon.remove( this.propertiesView! );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the {@link #linkProviderItemsView} from the {@link #_balloon}.\n\t */\n\tprivate _removeLinksProviderView(): void {\n\t\tif ( this._isLinksListInPanel ) {\n\t\t\tthis._balloon.remove( this.linkProviderItemsView! );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the {@link #formView} from the {@link #_balloon}.\n\t */\n\tprivate _removeFormView( updateFocus: boolean = true ): void {\n\t\tif ( this._isFormInPanel ) {\n\t\t\tconst linkCommand: LinkCommand = this.editor.commands.get( 'link' )!;\n\n\t\t\t// Blur the input element before removing it from DOM to prevent issues in some browsers.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/1501.\n\t\t\tthis.formView!.saveButtonView.focus();\n\n\t\t\t// Reset fields to update the state of the submit button.\n\t\t\tthis.formView!.displayedTextInputView.fieldView.reset();\n\t\t\tthis.formView!.urlInputView.fieldView.reset();\n\n\t\t\t// If there is still no link at this point, the form is being closed without the link having\n\t\t\t// been inserted (e.g. the user canceled the creation). Any decorator states toggled in the\n\t\t\t// meantime (see #_togglePendingManualDecorator) belonged to that abandoned, not-yet-inserted\n\t\t\t// link and must not leak into the next time a new link is created.\n\t\t\tif ( linkCommand.value === undefined ) {\n\t\t\t\tthis._resetPendingManualDecoratorsState();\n\t\t\t}\n\n\t\t\tthis._balloon.remove( this.formView! );\n\n\t\t\t// Because the form has an input which has focus, the focus must be brought back\n\t\t\t// to the editor. Otherwise, it would be lost.\n\t\t\tif ( updateFocus ) {\n\t\t\t\tthis.editor.editing.view.focus();\n\t\t\t}\n\n\t\t\tthis._hideFakeVisualSelection();\n\t\t}\n\t}\n\n\t/**\n\t * Shows the correct UI type. It is either {@link #formView} or {@link #toolbarView}.\n\t *\n\t * @internal\n\t */\n\tpublic _showUI( forceVisible: boolean = false ): void {\n\t\tif ( !this.formView ) {\n\t\t\tthis._createViews();\n\t\t}\n\n\t\t// When there's no link under the selection, go straight to the editing UI.\n\t\tif ( !this._getSelectedLinkElement() ) {\n\t\t\t// Show visual selection on a text without a link when the contextual balloon is displayed.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/4721.\n\t\t\tthis._showFakeVisualSelection();\n\n\t\t\tthis._addToolbarView();\n\n\t\t\t// Be sure panel with link is visible.\n\t\t\tif ( forceVisible ) {\n\t\t\t\tthis._balloon.showStack( 'main' );\n\t\t\t}\n\n\t\t\tthis._addFormView();\n\t\t}\n\t\t// If there's a link under the selection...\n\t\telse {\n\t\t\t// Go to the editing UI if toolbar is already visible.\n\t\t\tif ( this._isToolbarVisible ) {\n\t\t\t\tthis._addFormView();\n\t\t\t}\n\t\t\t// Otherwise display just the toolbar.\n\t\t\telse {\n\t\t\t\tthis._addToolbarView();\n\t\t\t}\n\n\t\t\t// Be sure panel with link is visible.\n\t\t\tif ( forceVisible ) {\n\t\t\t\tthis._balloon.showStack( 'main' );\n\t\t\t}\n\t\t}\n\n\t\t// Begin responding to ui#update once the UI is added.\n\t\tthis._startUpdatingUI();\n\t}\n\n\t/**\n\t * Removes the {@link #formView} from the {@link #_balloon}.\n\t *\n\t * See {@link #_addFormView}, {@link #_addToolbarView}.\n\t */\n\tprivate _hideUI( updateFocus: boolean = true ): void {\n\t\tconst editor = this.editor;\n\n\t\tif ( !this._isUIInPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.stopListening( editor.ui, 'update' );\n\t\tthis.stopListening( this._balloon, 'change:visibleView' );\n\n\t\t// Make sure the focus always gets back to the editable _before_ removing the focused form view.\n\t\t// Doing otherwise causes issues in some browsers. See https://github.com/ckeditor/ckeditor5-link/issues/193.\n\t\tif ( updateFocus ) {\n\t\t\teditor.editing.view.focus();\n\t\t}\n\n\t\t// If the links view is visible, remove it because it can be on top of the stack.\n\t\tthis._removeLinksProviderView();\n\n\t\t// If the properties form view is visible, remove it because it can be on top of the stack.\n\t\tthis._removePropertiesView();\n\n\t\t// Then remove the form view because it's beneath the properties form.\n\t\tthis._removeFormView( updateFocus );\n\n\t\t// Finally, remove the link toolbar view because it's last in the stack.\n\t\tif ( this._isToolbarInPanel ) {\n\t\t\tthis._balloon.remove( this.toolbarView! );\n\t\t}\n\n\t\tthis._hideFakeVisualSelection();\n\t}\n\n\t/**\n\t * Makes the UI react to the {@link module:ui/editorui/editorui~EditorUI#event:update} event to\n\t * reposition itself when the editor UI should be refreshed.\n\t *\n\t * See: {@link #_hideUI} to learn when the UI stops reacting to the `update` event.\n\t */\n\tprivate _startUpdatingUI(): void {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\n\t\tlet prevSelectedLink = this._getSelectedLinkElement();\n\t\tlet prevSelectionParent = getSelectionParent();\n\n\t\tconst update = () => {\n\t\t\tconst selectedLink = this._getSelectedLinkElement();\n\t\t\tconst selectionParent = getSelectionParent();\n\n\t\t\t// Hide the panel if:\n\t\t\t//\n\t\t\t// * the selection went out of the EXISTING link element. E.g. user moved the caret out\n\t\t\t//   of the link,\n\t\t\t// * the selection went to a different parent when creating a NEW link. E.g. someone\n\t\t\t//   else modified the document.\n\t\t\t// * the selection has expanded (e.g. displaying link toolbar then pressing SHIFT+Right arrow).\n\t\t\t//\n\t\t\t// Note: #_getSelectedLinkElement will return a link for a non-collapsed selection only\n\t\t\t// when fully selected.\n\t\t\tif ( ( prevSelectedLink && !selectedLink ) ||\n\t\t\t\t( !prevSelectedLink && selectionParent !== prevSelectionParent ) ) {\n\t\t\t\tthis._hideUI();\n\t\t\t}\n\t\t\t// Update the position of the panel when:\n\t\t\t//  * link panel is in the visible stack\n\t\t\t//  * the selection remains in the original link element,\n\t\t\t//  * there was no link element in the first place, i.e. creating a new link\n\t\t\telse if ( this._isUIVisible ) {\n\t\t\t\t// If still in a link element, simply update the position of the balloon.\n\t\t\t\t// If there was no link (e.g. inserting one), the balloon must be moved\n\t\t\t\t// to the new position in the editing view (a new native DOM range).\n\t\t\t\tthis._balloon.updatePosition( this._getBalloonPositionData() );\n\t\t\t}\n\n\t\t\tprevSelectedLink = selectedLink;\n\t\t\tprevSelectionParent = selectionParent;\n\t\t};\n\n\t\tfunction getSelectionParent() {\n\t\t\treturn viewDocument.selection.focus!.getAncestors()\n\t\t\t\t.reverse()\n\t\t\t\t.find( ( node ): node is ViewElement => node.is( 'element' ) );\n\t\t}\n\n\t\tthis.listenTo( editor.ui, 'update', update );\n\t\tthis.listenTo( this._balloon, 'change:visibleView', update );\n\t}\n\n\t/**\n\t * Returns `true` when {@link #propertiesView} is in the {@link #_balloon}.\n\t */\n\tprivate get _arePropertiesInPanel(): boolean {\n\t\treturn !!this.propertiesView && this._balloon.hasView( this.propertiesView );\n\t}\n\n\t/**\n\t * Returns `true` when {@link #linkProviderItemsView} is in the {@link #_balloon}.\n\t */\n\tprivate get _isLinksListInPanel(): boolean {\n\t\treturn !!this.linkProviderItemsView && this._balloon.hasView( this.linkProviderItemsView );\n\t}\n\n\t/**\n\t * Returns `true` when {@link #formView} is in the {@link #_balloon}.\n\t */\n\tprivate get _isFormInPanel(): boolean {\n\t\treturn !!this.formView && this._balloon.hasView( this.formView );\n\t}\n\n\t/**\n\t * Returns `true` when {@link #toolbarView} is in the {@link #_balloon}.\n\t */\n\tprivate get _isToolbarInPanel(): boolean {\n\t\treturn !!this.toolbarView && this._balloon.hasView( this.toolbarView );\n\t}\n\n\t/**\n\t * Returns `true` when {@link #propertiesView} is in the {@link #_balloon} and it is\n\t * currently visible.\n\t */\n\tprivate get _isPropertiesVisible(): boolean {\n\t\treturn !!this.propertiesView && this._balloon.visibleView === this.propertiesView;\n\t}\n\n\t/**\n\t * Returns `true` when {@link #formView} is in the {@link #_balloon} and it is\n\t * currently visible.\n\t */\n\tprivate get _isFormVisible(): boolean {\n\t\treturn !!this.formView && this._balloon.visibleView == this.formView;\n\t}\n\n\t/**\n\t * Returns `true` when {@link #toolbarView} is in the {@link #_balloon} and it is\n\t * currently visible.\n\t */\n\tprivate get _isToolbarVisible(): boolean {\n\t\treturn !!this.toolbarView && this._balloon.visibleView === this.toolbarView;\n\t}\n\n\t/**\n\t * Returns `true` when {@link #propertiesView}, {@link #toolbarView}, {@link #linkProviderItemsView}\n\t * or {@link #formView} is in the {@link #_balloon}.\n\t */\n\tprivate get _isUIInPanel(): boolean {\n\t\treturn this._arePropertiesInPanel || this._isLinksListInPanel || this._isFormInPanel || this._isToolbarInPanel;\n\t}\n\n\t/**\n\t * Returns `true` when {@link #propertiesView}, {@link #linkProviderItemsView}, {@link #toolbarView}\n\t * or {@link #formView} is in the {@link #_balloon} and it is currently visible.\n\t */\n\tprivate get _isUIVisible(): boolean {\n\t\treturn this._isPropertiesVisible || this._isLinksListInPanel || this._isFormVisible || this._isToolbarVisible;\n\t}\n\n\t/**\n\t * Returns positioning options for the {@link #_balloon}. They control the way the balloon is attached\n\t * to the target element or selection.\n\t *\n\t * If the selection is collapsed and inside a link element, the panel will be attached to the\n\t * entire link element. Otherwise, it will be attached to the selection.\n\t */\n\tprivate _getBalloonPositionData(): Partial<DomOptimalPositionOptions> {\n\t\tconst view = this.editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst model = this.editor.model;\n\n\t\tif ( model.markers.has( VISUAL_SELECTION_MARKER_NAME ) ) {\n\t\t\t// There are cases when we highlight selection using a marker (#7705, #4721).\n\t\t\tconst markerViewElements = this.editor.editing.mapper.markerNameToElements( VISUAL_SELECTION_MARKER_NAME );\n\n\t\t\t// Marker could be removed by link text override and end up in the graveyard.\n\t\t\tif ( markerViewElements ) {\n\t\t\t\tconst markerViewElementsArray = Array.from( markerViewElements );\n\t\t\t\tconst newRange = view.createRange(\n\t\t\t\t\tview.createPositionBefore( markerViewElementsArray[ 0 ] ),\n\t\t\t\t\tview.createPositionAfter( markerViewElementsArray[ markerViewElementsArray.length - 1 ] )\n\t\t\t\t);\n\n\t\t\t\treturn {\n\t\t\t\t\ttarget: view.domConverter.viewRangeToDom( newRange )\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Make sure the target is calculated on demand at the last moment because a cached DOM range\n\t\t// (which is very fragile) can desynchronize with the state of the editing view if there was\n\t\t// any rendering done in the meantime. This can happen, for instance, when an inline widget\n\t\t// gets unlinked.\n\t\treturn {\n\t\t\ttarget: () => {\n\t\t\t\tconst targetLink = this._getSelectedLinkElement();\n\n\t\t\t\treturn targetLink ?\n\t\t\t\t\t// When selection is inside link element, then attach panel to this element.\n\t\t\t\t\tview.domConverter.mapViewToDom( targetLink )! :\n\t\t\t\t\t// Otherwise attach panel to the selection.\n\t\t\t\t\tview.domConverter.viewRangeToDom( viewDocument.selection.getFirstRange()! );\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Returns the link {@link module:engine/view/attributeelement~ViewAttributeElement} under\n\t * the {@link module:engine/view/document~ViewDocument editing view's} selection or `null`\n\t * if there is none.\n\t *\n\t * **Note**: For a non–collapsed selection, the link element is returned when **fully**\n\t * selected and the **only** element within the selection boundaries, or when\n\t * a linked widget is selected.\n\t */\n\tprivate _getSelectedLinkElement(): ViewAttributeElement | null {\n\t\tconst view = this.editor.editing.view;\n\t\tconst selection = view.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t// The selection is collapsed or some widget is selected (especially inline widget).\n\t\tif ( selection.isCollapsed || selectedElement && isWidget( selectedElement ) ) {\n\t\t\treturn findLinkElementAncestor( selection.getFirstPosition()! );\n\t\t} else {\n\t\t\t// The range for fully selected link is usually anchored in adjacent text nodes.\n\t\t\t// Trim it to get closer to the actual link element.\n\t\t\tconst range = selection.getFirstRange()!.getTrimmed();\n\t\t\tconst startLink = findLinkElementAncestor( range.start );\n\t\t\tconst endLink = findLinkElementAncestor( range.end );\n\n\t\t\tif ( !startLink || startLink != endLink ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Check if the link element is fully selected.\n\t\t\tif ( view.createRangeIn( startLink ).getTrimmed().isEqual( range ) ) {\n\t\t\t\treturn startLink;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns selected link text content.\n\t * If link is not selected it returns the selected text.\n\t * If selection or link includes non text node (inline object or block) then returns undefined.\n\t */\n\tprivate _getSelectedLinkableText(): string | undefined {\n\t\tconst model = this.editor.model;\n\t\tconst editing = this.editor.editing;\n\t\tconst selectedLink = this._getSelectedLinkElement();\n\n\t\tif ( !selectedLink ) {\n\t\t\treturn extractTextFromLinkRange( model.document.selection.getFirstRange()! );\n\t\t}\n\n\t\tconst viewLinkRange = editing.view.createRangeOn( selectedLink );\n\t\tconst linkRange = editing.mapper.toModelRange( viewLinkRange );\n\n\t\treturn extractTextFromLinkRange( linkRange );\n\t}\n\n\t/**\n\t * Returns a provider by its URL.\n\t *\n\t * @param href URL of the link.\n\t * @returns Link provider and item or `null` if not found.\n\t */\n\tprivate _getLinkProviderLinkByHref( href: string ): { provider: LinksProvider; item: LinksProviderDetailedItem } | null {\n\t\tif ( !href ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor ( const provider of this._linksProviders ) {\n\t\t\tconst item = provider.getItem ?\n\t\t\t\tprovider.getItem( href ) :\n\t\t\t\tprovider.getListItems().find( item => item.href === href );\n\n\t\t\tif ( item ) {\n\t\t\t\treturn { provider, item };\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Displays a fake visual selection when the contextual balloon is displayed.\n\t *\n\t * This adds a 'link-ui' marker into the document that is rendered as a highlight on selected text fragment.\n\t */\n\tprivate _showFakeVisualSelection(): void {\n\t\tconst model = this.editor.model;\n\n\t\tmodel.change( writer => {\n\t\t\tconst range = model.document.selection.getFirstRange()!;\n\n\t\t\tif ( model.markers.has( VISUAL_SELECTION_MARKER_NAME ) ) {\n\t\t\t\twriter.updateMarker( VISUAL_SELECTION_MARKER_NAME, { range } );\n\t\t\t} else {\n\t\t\t\tif ( range.start.isAtEnd ) {\n\t\t\t\t\tconst startPosition = range.start.getLastMatchingPosition(\n\t\t\t\t\t\t( { item } ) => !model.schema.isContent( item ),\n\t\t\t\t\t\t{ boundaries: range }\n\t\t\t\t\t);\n\n\t\t\t\t\twriter.addMarker( VISUAL_SELECTION_MARKER_NAME, {\n\t\t\t\t\t\tusingOperation: false,\n\t\t\t\t\t\taffectsData: false,\n\t\t\t\t\t\trange: writer.createRange( startPosition, range.end )\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\twriter.addMarker( VISUAL_SELECTION_MARKER_NAME, {\n\t\t\t\t\t\tusingOperation: false,\n\t\t\t\t\t\taffectsData: false,\n\t\t\t\t\t\trange\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Hides the fake visual selection created in {@link #_showFakeVisualSelection}.\n\t */\n\tprivate _hideFakeVisualSelection(): void {\n\t\tconst model = this.editor.model;\n\n\t\tif ( model.markers.has( VISUAL_SELECTION_MARKER_NAME ) ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.removeMarker( VISUAL_SELECTION_MARKER_NAME );\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * Link list item that represents a single link in the provider's list.\n * It's displayed after the user clicks the button that opens the list in the link form view.\n */\nexport type LinksProviderListItem = {\n\n\t/**\n\t * Unique identifier of the item. Avoids collection malfunction when there are links with the same labels.\n\t */\n\tid: string;\n\n\t/**\n\t * URL of the link.\n\t */\n\thref: string;\n\n\t/**\n\t * Label that is used as a text for the list item.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Optional icon displayed for the item.\n\t */\n\ticon?: string;\n};\n\n/**\n * Link list item with additional attributes that will be used when:\n *\n * \t* The item is selected and the preview of the item is displayed.\n * \t* The user selects the item and the link is created.\n * \t* The user navigates to the item using editing.\n *\n * It can be used to perform additional lookups in the database or to provide additional information about the link.\n */\nexport type LinksProviderDetailedItem = {\n\n\t/**\n\t * URL of the link.\n\t */\n\thref: string;\n\n\t/**\n\t * Optional icon displayed when the user opens toolbar with the item preview.\n\t */\n\ticon?: string;\n\n\t/**\n\t * Optional label shown in the link preview. If not passed then the `href` is used as the label.\n\t */\n\tlabel?: string;\n\n\t/**\n\t * Optional tooltip shown in the link preview.\n\t */\n\ttooltip?: string;\n};\n\n/**\n * Interface for a provider that provides a list of links to be displayed in the link form view.\n */\nexport type LinksProvider = {\n\n\t/**\n\t * Label that serves two purposes:\n\t *\n\t * \t* As a text for the button that opens this link list from within link form view.\n\t * \t* As a text for the header when the list of links from this provider is displayed.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Message to be displayed when there are no items in the list.\n\t * It's optional and if not provided, a default message will be displayed.\n\t */\n\temptyListPlaceholder?: string;\n\n\t/**\n\t * Weight used for ordering providers in the list. Higher weight means the provider will be displayed lower in the list.\n\t *\n\t * @default 0\n\t */\n\torder?: number;\n\n\t/**\n\t * Callback for retrieving an static array of items which is being called every time the list is displayed.\n\t * It's not required to provide all links at once, it's possible to pass only slice of links.\n\t */\n\tgetListItems(): Array<LinksProviderListItem>;\n\n\t/**\n\t * Optional callback for retrieving an item by its URL.\n\t * If not provided the item from the list will be used.\n\t */\n\tgetItem?( href: string ): LinksProviderDetailedItem | null;\n\n\t/**\n\t * Callback called when user clicked the link in the list.\n\t *\n\t * @param item Item that was clicked.\n\t * @returns `true` if the link was handled by the provider, `false` otherwise. It'll prevent the default action if `true`.\n\t */\n\tnavigate?( item: LinksProviderDetailedItem ): boolean;\n};\n\n/**\n * Returns a link element if there's one among the ancestors of the provided `Position`.\n *\n * @param View position to analyze.\n * @returns Link element at the position or null.\n */\nfunction findLinkElementAncestor( position: ViewPosition ): ViewAttributeElement | null {\n\treturn position.getAncestors().find( ( ancestor ): ancestor is ViewAttributeElement => isLinkElement( ancestor ) ) || null;\n}\n\n/**\n * Returns link form validation callbacks.\n *\n * @param editor Editor instance.\n */\nfunction getFormValidators( editor: Editor ): Array<LinkFormValidatorCallback> {\n\tconst t = editor.t;\n\tconst allowCreatingEmptyLinks = editor.config.get( 'link.allowCreatingEmptyLinks' );\n\n\treturn [\n\t\tform => {\n\t\t\tif ( !allowCreatingEmptyLinks && !form.url!.length ) {\n\t\t\t\treturn t( 'Link URL must not be empty.' );\n\t\t\t}\n\t\t}\n\t];\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/**\n * @module link/autolink\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { ClipboardInputTransformationEvent } from '@ckeditor/ckeditor5-clipboard';\nimport type { ModelDocumentSelectionChangeEvent, Model, ModelPosition, ModelRange, ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { Delete, TextWatcher, getLastTextLine, findAttributeRange, type TextWatcherMatchedDataEvent } from '@ckeditor/ckeditor5-typing';\nimport type { EnterCommand, ShiftEnterCommand } from '@ckeditor/ckeditor5-enter';\n\nimport { addLinkProtocolIfApplicable, linkHasProtocol } from './utils.js';\nimport { LinkEditing } from './linkediting.js';\n\nconst MIN_LINK_LENGTH_WITH_SPACE_AT_END = 4; // Ie: \"t.co \" (length 5).\n\n// This was a tweak from https://gist.github.com/dperini/729294.\nconst URL_REG_EXP = new RegExp(\n\t// Group 1: Line start or after a space.\n\t'(^|\\\\s)' +\n\t// Group 2: Detected URL (or e-mail).\n\t'(' +\n\t\t// Protocol identifier or short syntax \"//\"\n\t\t// a. Full form http://user@foo.bar.baz:8080/foo/bar.html#baz?foo=bar\n\t\t'(' +\n\t\t\t'(?:(?:(?:https?|ftp):)?\\\\/\\\\/)' +\n\t\t\t// BasicAuth using user:pass (optional)\n\t\t\t'(?:\\\\S+(?::\\\\S*)?@)?' +\n\t\t\t'(?:' +\n\t\t\t\t// IP address dotted notation octets\n\t\t\t\t// excludes loopback network 0.0.0.0\n\t\t\t\t// excludes reserved space >= 224.0.0.0\n\t\t\t\t// excludes network & broadcast addresses\n\t\t\t\t// (first & last IP address of each class)\n\t\t\t\t'(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])' +\n\t\t\t\t'(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}' +\n\t\t\t\t'(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))' +\n\t\t\t\t'|' +\n\t\t\t\t'(' +\n\t\t\t\t\t// Do not allow `www.foo` - see https://github.com/ckeditor/ckeditor5/issues/8050.\n\t\t\t\t\t'((?!www\\\\.)|(www\\\\.))' +\n\t\t\t\t\t// Host & domain names.\n\t\t\t\t\t'(?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.)+' +\n\t\t\t\t\t// TLD identifier name.\n\t\t\t\t\t'(?:[a-z\\\\u00a1-\\\\uffff]{2,63})' +\n\t\t\t\t')' +\n\t\t\t\t'|' +\n\t\t\t\t// Allow localhost as a valid hostname\n\t\t\t\t'localhost' +\n\t\t\t')' +\n\t\t\t// port number (optional)\n\t\t\t'(?::\\\\d{2,5})?' +\n\t\t\t// resource path (optional)\n\t\t\t'(?:[/?#]\\\\S*)?' +\n\t\t')' +\n\t\t'|' +\n\t\t// b. Short form (either www.example.com or example@example.com)\n\t\t'(' +\n\t\t\t'(www.|(\\\\S+@))' +\n\t\t\t// Host & domain names.\n\t\t\t'((?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.))+' +\n\t\t\t// TLD identifier name.\n\t\t\t'(?:[a-z\\\\u00a1-\\\\uffff]{2,63})' +\n\t\t')' +\n\t')$', 'i' );\n\nconst URL_GROUP_IN_MATCH = 2;\n\n/**\n * The autolink plugin.\n */\nexport class AutoLink extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Delete, LinkEditing ]> {\n\t\treturn [ Delete, LinkEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AutoLink' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\n\t\tselection.on<ModelDocumentSelectionChangeEvent>( 'change:range', () => {\n\t\t\t// Disable plugin when selection is inside a code block.\n\t\t\tthis.isEnabled = !selection.anchor!.parent.is( 'element', 'codeBlock' );\n\t\t} );\n\n\t\tthis._enableTypingHandling();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tthis._enableEnterHandling();\n\t\tthis._enableShiftEnterHandling();\n\t\tthis._enablePasteLinking();\n\t}\n\n\t/**\n\t * For given position, returns a range that includes the whole link that contains the position.\n\t *\n\t * If position is not inside a link, returns `null`.\n\t */\n\tprivate _expandLinkRange( model: Model, position: ModelPosition ): ModelRange | null {\n\t\tif ( position.textNode && position.textNode.hasAttribute( 'linkHref' ) ) {\n\t\t\treturn findAttributeRange( position, 'linkHref', position.textNode.getAttribute( 'linkHref' ), model );\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Extends the document selection to includes all links that intersects with given `selectedRange`.\n\t */\n\tprivate _selectEntireLinks( writer: ModelWriter, selectedRange: ModelRange ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selStart = selection.getFirstPosition()!;\n\t\tconst selEnd = selection.getLastPosition()!;\n\n\t\tlet updatedSelection = selectedRange.getJoined( this._expandLinkRange( model, selStart ) || selectedRange );\n\n\t\tif ( updatedSelection ) {\n\t\t\tupdatedSelection = updatedSelection.getJoined( this._expandLinkRange( model, selEnd ) || selectedRange );\n\t\t}\n\n\t\tif ( updatedSelection && ( updatedSelection.start.isBefore( selStart ) || updatedSelection.end.isAfter( selEnd ) ) ) {\n\t\t\t// Only update the selection if it changed.\n\t\t\twriter.setSelection( updatedSelection );\n\t\t}\n\t}\n\n\t/**\n\t * Enables autolinking on pasting a URL when some content is selected.\n\t */\n\tprivate _enablePasteLinking(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst clipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\t\tconst linkCommand = editor.commands.get( 'link' )!;\n\n\t\tclipboardPipeline.on<ClipboardInputTransformationEvent>( 'inputTransformation', ( evt, data ) => {\n\t\t\tif ( !this.isEnabled || !linkCommand.isEnabled || selection.isCollapsed || data.method !== 'paste' ) {\n\t\t\t\t// Abort if we are disabled or the selection is collapsed.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( selection.rangeCount > 1 ) {\n\t\t\t\t// Abort if there are multiple selection ranges.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedRange = selection.getFirstRange()!;\n\n\t\t\tconst newLink = data.dataTransfer.getData( 'text/plain' );\n\n\t\t\tif ( !newLink ) {\n\t\t\t\t// Abort if there is no plain text on the clipboard.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst matches = newLink.match( URL_REG_EXP );\n\n\t\t\t// If the text in the clipboard has a URL, and that URL is the whole clipboard.\n\t\t\tif ( matches && matches[ 2 ] === newLink ) {\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\tthis._selectEntireLinks( writer, selectedRange );\n\t\t\t\t\tlinkCommand.execute( newLink );\n\t\t\t\t} );\n\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Enables autolinking on typing.\n\t */\n\tprivate _enableTypingHandling(): void {\n\t\tconst editor = this.editor;\n\n\t\tconst watcher = new TextWatcher( editor.model, text => {\n\t\t\tlet mappedText = text;\n\n\t\t\t// 1. Detect <kbd>Space</kbd> after a text with a potential link.\n\t\t\tif ( !isSingleSpaceAtTheEnd( mappedText ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// 2. Remove the last space character.\n\t\t\tmappedText = mappedText.slice( 0, -1 );\n\n\t\t\t// 3. Remove punctuation at the end of the URL if it exists.\n\t\t\tif ( '!.:,;?'.includes( mappedText[ mappedText.length - 1 ] ) ) {\n\t\t\t\tmappedText = mappedText.slice( 0, -1 );\n\t\t\t}\n\n\t\t\t// 4. Check text before last typed <kbd>Space</kbd> or punctuation.\n\t\t\tconst url = getUrlAtTextEnd( mappedText );\n\n\t\t\tif ( url ) {\n\t\t\t\treturn {\n\t\t\t\t\turl,\n\t\t\t\t\tremovedTrailingCharacters: text.length - mappedText.length\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\twatcher.on<TextWatcherMatchedDataEvent<{ url: string; removedTrailingCharacters: number }>>( 'matched:data', ( evt, data ) => {\n\t\t\tconst { batch, range, url, removedTrailingCharacters } = data;\n\n\t\t\tif ( !batch.isTyping ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst linkEnd = range.end.getShiftedBy( -removedTrailingCharacters ); // Executed after a space character or punctuation.\n\t\t\tconst linkStart = linkEnd.getShiftedBy( -url.length );\n\n\t\t\tconst linkRange = editor.model.createRange( linkStart, linkEnd );\n\n\t\t\tthis._applyAutoLink( url, linkRange );\n\t\t} );\n\n\t\twatcher.bind( 'isEnabled' ).to( this );\n\t}\n\n\t/**\n\t * Enables autolinking on the <kbd>Enter</kbd> key.\n\t */\n\tprivate _enableEnterHandling(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst enterCommand: EnterCommand | undefined = editor.commands.get( 'enter' );\n\n\t\tif ( !enterCommand ) {\n\t\t\treturn;\n\t\t}\n\n\t\tenterCommand.on( 'execute', () => {\n\t\t\tconst position = model.document.selection.getFirstPosition()!;\n\n\t\t\tlet rangeToCheck: ModelRange;\n\n\t\t\t// Previous sibling might not be an element if enter was blocked due to be triggered in a limit element.\n\t\t\tif ( position.parent.previousSibling?.is( 'element' ) ) {\n\t\t\t\trangeToCheck = model.createRangeIn( position.parent.previousSibling );\n\t\t\t} else {\n\t\t\t\trangeToCheck = model.createRange( model.createPositionAt( position.parent, 0 ), position );\n\t\t\t}\n\n\t\t\tthis._checkAndApplyAutoLinkOnRange( rangeToCheck );\n\t\t} );\n\t}\n\n\t/**\n\t * Enables autolinking on the <kbd>Shift</kbd>+<kbd>Enter</kbd> keyboard shortcut.\n\t */\n\tprivate _enableShiftEnterHandling(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tconst shiftEnterCommand: ShiftEnterCommand | undefined = editor.commands.get( 'shiftEnter' );\n\n\t\tif ( !shiftEnterCommand ) {\n\t\t\treturn;\n\t\t}\n\n\t\tshiftEnterCommand.on( 'execute', () => {\n\t\t\tconst position = model.document.selection.getFirstPosition()!;\n\n\t\t\tconst rangeToCheck = model.createRange(\n\t\t\t\tmodel.createPositionAt( position.parent, 0 ),\n\t\t\t\tposition.getShiftedBy( -1 )\n\t\t\t);\n\n\t\t\tthis._checkAndApplyAutoLinkOnRange( rangeToCheck );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks if the passed range contains a linkable text.\n\t */\n\tprivate _checkAndApplyAutoLinkOnRange( rangeToCheck: ModelRange ): void {\n\t\tconst model = this.editor.model;\n\t\tconst { text, range } = getLastTextLine( rangeToCheck, model );\n\n\t\tconst url = getUrlAtTextEnd( text );\n\n\t\tif ( url ) {\n\t\t\tconst linkRange = model.createRange(\n\t\t\t\trange.end.getShiftedBy( -url.length ),\n\t\t\t\trange.end\n\t\t\t);\n\n\t\t\tthis._applyAutoLink( url, linkRange );\n\t\t}\n\t}\n\n\t/**\n\t * Applies a link on a given range if the link should be applied.\n\t *\n\t * @param url The URL to link.\n\t * @param range The text range to apply the link attribute to.\n\t */\n\tprivate _applyAutoLink( url: string, range: ModelRange ): void {\n\t\tconst model = this.editor.model;\n\n\t\tconst defaultProtocol = this.editor.config.get( 'link.defaultProtocol' );\n\t\tconst fullUrl = addLinkProtocolIfApplicable( url, defaultProtocol );\n\n\t\tif ( !this.isEnabled || !isLinkAllowedOnRange( range, model ) || !linkHasProtocol( fullUrl ) || linkIsAlreadySet( range ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._persistAutoLink( fullUrl, range );\n\t}\n\n\t/**\n\t * Enqueues autolink changes in the model.\n\t *\n\t * @param url The URL to link.\n\t * @param range The text range to apply the link attribute to.\n\t */\n\tprivate _persistAutoLink( url: string, range: ModelRange ): void {\n\t\tconst model = this.editor.model;\n\t\tconst deletePlugin = this.editor.plugins.get( 'Delete' );\n\n\t\t// Enqueue change to make undo step.\n\t\tmodel.enqueueChange( writer => {\n\t\t\twriter.setAttribute( 'linkHref', url, range );\n\n\t\t\tmodel.enqueueChange( () => {\n\t\t\t\tdeletePlugin.requestUndoOnBackspace();\n\t\t\t} );\n\t\t} );\n\t}\n}\n\n// Check if text should be evaluated by the plugin in order to reduce number of RegExp checks on whole text.\nfunction isSingleSpaceAtTheEnd( text: string ): boolean {\n\treturn text.length > MIN_LINK_LENGTH_WITH_SPACE_AT_END && text[ text.length - 1 ] === ' ' && text[ text.length - 2 ] !== ' ';\n}\n\nfunction getUrlAtTextEnd( text: string ): string | null {\n\tconst match = URL_REG_EXP.exec( text );\n\n\treturn match ? match[ URL_GROUP_IN_MATCH ] : null;\n}\n\nfunction isLinkAllowedOnRange( range: ModelRange, model: Model ): boolean {\n\treturn model.schema.checkAttributeInSelection( model.createSelection( range ), 'linkHref' );\n}\n\nfunction linkIsAlreadySet( range: ModelRange ): boolean {\n\tconst item = range.start.nodeAfter;\n\treturn !!item && item.hasAttribute( 'linkHref' );\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/**\n * @module link/link\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { LinkEditing } from './linkediting.js';\nimport { LinkUI } from './linkui.js';\nimport { AutoLink } from './autolink.js';\n\n/**\n * The link plugin.\n *\n * This is a \"glue\" plugin that loads the {@link module:link/linkediting~LinkEditing link editing feature}\n * and {@link module:link/linkui~LinkUI link UI feature}.\n */\nexport class Link extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LinkEditing, LinkUI, AutoLink ]> {\n\t\treturn [ LinkEditing, LinkUI, AutoLink ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Link' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module link/linkimageediting\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tMatcher,\n\ttype UpcastElementEvent,\n\ttype ModelNode,\n\ttype ModelElement,\n\ttype DowncastAttributeEvent,\n\ttype ViewElement,\n\ttype DowncastDispatcher,\n\ttype UpcastDispatcher\n} from '@ckeditor/ckeditor5-engine';\nimport { type GetCallback, priorities, toMap } from '@ckeditor/ckeditor5-utils';\n\nimport { LinkEditing } from './linkediting.js';\nimport { type LinkManualDecorator } from './utils/manualdecorator.js';\nimport { type LinkCommand } from './linkcommand.js';\n\nimport { ImageEditing, ImageUtils } from '@ckeditor/ckeditor5-image';\n\n/**\n * The link image engine feature.\n *\n * It accepts the `linkHref=\"url\"` attribute in the model for the {@link module:image/image~Image `<imageBlock>`} element\n * which allows linking images.\n */\nexport class LinkImageEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ImageEditing, ImageUtils, LinkEditing ]> {\n\t\treturn [ ImageEditing, ImageUtils, LinkEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LinkImageEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\tif ( editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\tschema.extend( 'imageBlock', { allowAttributes: [ 'linkHref' ] } );\n\t\t}\n\n\t\teditor.conversion.for( 'upcast' ).add( upcastLink( editor ) );\n\t\teditor.conversion.for( 'downcast' ).add( downcastImageLink( editor ) );\n\n\t\t// Definitions for decorators are provided by the `link` command and the `LinkEditing` plugin.\n\t\tthis._enableAutomaticDecorators();\n\t\tthis._enableManualDecorators();\n\t}\n\n\t/**\n\t * Processes {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators} definitions and\n\t * attaches proper converters that will work when linking an image.`\n\t */\n\tprivate _enableAutomaticDecorators(): void {\n\t\tconst editor = this.editor;\n\t\tconst command: LinkCommand = editor.commands.get( 'link' )!;\n\t\tconst automaticDecorators = command.automaticDecorators;\n\n\t\tif ( automaticDecorators.length ) {\n\t\t\teditor.conversion.for( 'downcast' ).add( automaticDecorators.getDispatcherForLinkedImage() );\n\t\t}\n\t}\n\n\t/**\n\t * Processes transformed {@link module:link/utils/manualdecorator~LinkManualDecorator} instances and attaches proper converters\n\t * that will work when linking an image.\n\t */\n\tprivate _enableManualDecorators(): void {\n\t\tconst editor = this.editor;\n\t\tconst command: LinkCommand = editor.commands.get( 'link' )!;\n\n\t\tfor ( const decorator of command.manualDecorators ) {\n\t\t\tif ( editor.plugins.has( 'ImageBlockEditing' ) ) {\n\t\t\t\teditor.model.schema.extend( 'imageBlock', { allowAttributes: decorator.id } );\n\t\t\t}\n\n\t\t\tif ( editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\t\teditor.model.schema.extend( 'imageInline', { allowAttributes: decorator.id } );\n\t\t\t}\n\n\t\t\teditor.conversion.for( 'downcast' ).add( downcastImageLinkManualDecorator( decorator ) );\n\t\t\teditor.conversion.for( 'upcast' ).add( upcastImageLinkManualDecorator( editor, decorator ) );\n\t\t}\n\t}\n}\n\n/**\n * Returns a converter for linked block images that consumes the \"href\" attribute\n * if a link contains an image.\n *\n * @param editor The editor instance.\n */\nfunction upcastLink( editor: Editor ): ( dispatcher: UpcastDispatcher ) => void {\n\tconst isImageInlinePluginLoaded = editor.plugins.has( 'ImageInlineEditing' );\n\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\treturn dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:a', ( evt, data, conversionApi ) => {\n\t\t\tconst viewLink = data.viewItem;\n\t\t\tconst imageInLink = imageUtils.findViewImgElement( viewLink );\n\n\t\t\tif ( !imageInLink ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blockImageView = imageInLink.findAncestor( element => imageUtils.isBlockImageView( element ) );\n\n\t\t\t// There are four possible cases to consider here\n\t\t\t//\n\t\t\t// 1. A \"root > ... > figure.image > a > img\" structure.\n\t\t\t// 2. A \"root > ... > figure.image > a > picture > img\" structure.\n\t\t\t// 3. A \"root > ... > block > a > img\" structure.\n\t\t\t// 4. A \"root > ... > block > a > picture > img\" structure.\n\t\t\t//\n\t\t\t// but the last 2 cases should only be considered by this converter when the inline image plugin\n\t\t\t// is NOT loaded in the editor (because otherwise, that would be a plain, linked inline image).\n\t\t\tif ( isImageInlinePluginLoaded && !blockImageView ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// There's an image inside an <a> element - we consume it so it won't be picked up by the Link plugin.\n\t\t\tconst consumableAttributes = { attributes: [ 'href' ] };\n\n\t\t\t// Consume the `href` attribute so the default one will not convert it to $text attribute.\n\t\t\tif ( !conversionApi.consumable.test( viewLink, consumableAttributes ) ) {\n\t\t\t\t// Might be consumed by something else - i.e. other converter with priority=highest - a standard check.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst linkHref = viewLink.getAttribute( 'href' );\n\n\t\t\t// A full definition of the image feature.\n\t\t\t// figure > a > img: parent of the view link element is an image element (figure).\n\t\t\tconst modelElement = data.modelCursor.parent as ModelNode;\n\n\t\t\tif ( modelElement.is( 'element', 'imageBlock' ) ) {\n\t\t\t\t// Set the linkHref attribute from link element on model image element.\n\t\t\t\tconversionApi.writer.setAttribute( 'linkHref', linkHref, modelElement );\n\t\t\t\tconversionApi.consumable.consume( viewLink, consumableAttributes );\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t\t// Using the same priority that `upcastImageLinkManualDecorator()` converter guarantees\n\t\t// that manual decorators will decorate the proper element.\n\t};\n}\n\n/**\n * Creates a converter that adds `<a>` to linked block image view elements.\n */\nfunction downcastImageLink( editor: Editor ): ( dispatcher: DowncastDispatcher ) => void {\n\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\treturn dispatcher => {\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute:linkHref:imageBlock', ( evt, data, conversionApi ) => {\n\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The image will be already converted - so it will be present in the view.\n\t\t\tconst viewFigure = conversionApi.mapper.toViewElement( data.item )!;\n\t\t\tconst writer = conversionApi.writer;\n\n\t\t\t// But we need to check whether the link element exists.\n\t\t\tconst linkInImage = Array.from( viewFigure.getChildren() )\n\t\t\t\t.find( ( child ): child is ViewElement => child.is( 'element', 'a' ) );\n\t\t\tconst viewImage = imageUtils.findViewImgElement( viewFigure )!;\n\t\t\t// <picture>...<img/></picture> or <img/>\n\t\t\tconst viewImgOrPicture = viewImage.parent!.is( 'element', 'picture' ) ? viewImage.parent : viewImage;\n\n\t\t\t// If so, update the attribute if it's defined or remove the entire link if the attribute is empty.\n\t\t\tif ( linkInImage ) {\n\t\t\t\tif ( data.attributeNewValue ) {\n\t\t\t\t\twriter.setAttribute( 'href', data.attributeNewValue, linkInImage );\n\t\t\t\t} else {\n\t\t\t\t\twriter.move( writer.createRangeOn( viewImgOrPicture ), writer.createPositionAt( viewFigure, 0 ) );\n\t\t\t\t\twriter.remove( linkInImage );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// But if it does not exist. Let's wrap already converted image by newly created link element.\n\t\t\t\t// 1. Create an empty link element.\n\t\t\t\tconst linkElement = writer.createContainerElement( 'a', { href: data.attributeNewValue } );\n\n\t\t\t\t// 2. Insert link inside the associated image.\n\t\t\t\twriter.insert( writer.createPositionAt( viewFigure, 0 ), linkElement );\n\n\t\t\t\t// 3. Move the image to the link.\n\t\t\t\twriter.move( writer.createRangeOn( viewImgOrPicture ), writer.createPositionAt( linkElement, 0 ) );\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t};\n}\n\n/**\n * Returns a converter that decorates the `<a>` element when the image is the link label.\n */\nfunction downcastImageLinkManualDecorator( decorator: LinkManualDecorator ): ( dispatcher: DowncastDispatcher ) => void {\n\treturn dispatcher => {\n\t\tconst createConverter = ( isApplyingConverter: boolean ): GetCallback<DowncastAttributeEvent<ModelElement>> => {\n\t\t\treturn ( evt, data, conversionApi ) => {\n\t\t\t\tconst viewFigure = conversionApi.mapper.toViewElement( data.item )!;\n\t\t\t\tconst linkInImage = Array.from( viewFigure.getChildren() )\n\t\t\t\t\t.find( ( child ): child is ViewElement => child.is( 'element', 'a' ) );\n\n\t\t\t\t// The <a> element was removed by the time this converter is executed.\n\t\t\t\t// It may happen when the base `linkHref` and decorator attributes are removed\n\t\t\t\t// at the same time (see https://github.com/ckeditor/ckeditor5/issues/8401).\n\t\t\t\tif ( !linkInImage ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Handle deactivated manual decorator.\n\t\t\t\tif ( !isApplyingConverter && data.attributeOldValue ) {\n\t\t\t\t\tfor ( const [ key, val ] of toMap( decorator.attributes ) ) {\n\t\t\t\t\t\tconversionApi.writer.removeAttribute( key, val, linkInImage );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( decorator.classes ) {\n\t\t\t\t\t\tconversionApi.writer.removeClass( decorator.classes, linkInImage );\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( const key in decorator.styles ) {\n\t\t\t\t\t\tconversionApi.writer.removeStyle( key, linkInImage );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Handle activated manual decorator.\n\t\t\t\tif ( isApplyingConverter && data.attributeNewValue ) {\n\t\t\t\t\tfor ( const [ key, val ] of toMap( decorator.attributes ) ) {\n\t\t\t\t\t\tconversionApi.writer.setAttribute( key, val, false, linkInImage );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( decorator.classes ) {\n\t\t\t\t\t\tconversionApi.writer.addClass( decorator.classes, linkInImage );\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( const key in decorator.styles ) {\n\t\t\t\t\t\tconversionApi.writer.setStyle( key, decorator.styles[ key ], linkInImage );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( `attribute:${ decorator.id }:imageBlock`, createConverter( false ), {\n\t\t\tpriority: priorities.high - 1\n\t\t} );\n\t\t// Apply decorators after all automatic and manual decorators are removed so removing one decorator\n\t\t// won't strip part of the other decorator's attributes, classes or styles.\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( `attribute:${ decorator.id }:imageBlock`, createConverter( true ), {\n\t\t\tpriority: priorities.high - 2\n\t\t} );\n\t};\n}\n\n/**\n * Returns a converter that checks whether manual decorators should be applied to the link.\n */\nfunction upcastImageLinkManualDecorator( editor: Editor, decorator: LinkManualDecorator ): ( dispatcher: UpcastDispatcher ) => void {\n\tconst isImageInlinePluginLoaded = editor.plugins.has( 'ImageInlineEditing' );\n\tconst imageUtils: ImageUtils = editor.plugins.get( 'ImageUtils' );\n\n\treturn dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:a', ( evt, data, conversionApi ) => {\n\t\t\tconst viewLink = data.viewItem;\n\t\t\tconst imageInLink = imageUtils.findViewImgElement( viewLink );\n\n\t\t\t// We need to check whether an image is inside a link because the converter handles\n\t\t\t// only manual decorators for linked images. See https://github.com/ckeditor/ckeditor5/issues/7975.\n\t\t\tif ( !imageInLink ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blockImageView = imageInLink.findAncestor( element => imageUtils.isBlockImageView( element ) );\n\n\t\t\tif ( isImageInlinePluginLoaded && !blockImageView ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst matcher = new Matcher( decorator._createPattern() );\n\t\t\tconst result = matcher.match( viewLink );\n\n\t\t\t// The link element does not have required attributes or/and proper values.\n\t\t\tif ( !result ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check whether we can consume those attributes.\n\t\t\tif ( !conversionApi.consumable.test( viewLink, result.match ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// At this stage we can assume that we have the `<imageBlock>` elements in model cursor or range.\n\t\t\tconst modelElement = data.modelCursor.parent;\n\n\t\t\tif ( modelElement?.is( 'element', 'imageBlock' ) ) {\n\t\t\t\tconversionApi.writer.setAttribute( decorator.id, true, modelElement );\n\t\t\t\tconversionApi.consumable.consume( viewLink, result.match );\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t\t// Using the same priority that `upcastLink()` converter guarantees that the linked image was properly converted.\n\t};\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/**\n * @module link/linkimageui\n */\n\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { IconLink } from '@ckeditor/ckeditor5-icons';\nimport type {\n\tModelDocumentSelection,\n\tModelSelection,\n\tViewDocumentClickEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport { ImageBlockEditing, type ImageUtils } from '@ckeditor/ckeditor5-image';\n\nimport { LinkUI } from './linkui.js';\nimport { LinkEditing } from './linkediting.js';\nimport { type LinkCommand } from './linkcommand.js';\n\nimport { LINK_KEYSTROKE } from './utils.js';\n\n/**\n * The link image UI plugin.\n *\n * This plugin provides the `'linkImage'` button that can be displayed in the {@link module:image/imagetoolbar~ImageToolbar}.\n * It can be used to wrap images in links.\n */\nexport class LinkImageUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LinkEditing, LinkUI, ImageBlockEditing ]> {\n\t\treturn [ LinkEditing, LinkUI, ImageBlockEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LinkImageUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\n\t\tthis.listenTo<ViewDocumentClickEvent>( viewDocument, 'click', ( evt, data ) => {\n\t\t\tif ( this._isSelectedLinkedImage( editor.model.document.selection ) ) {\n\t\t\t\t// Prevent browser navigation when clicking a linked image.\n\t\t\t\tdata.preventDefault();\n\n\t\t\t\t// Block the `LinkUI` plugin when an image was clicked.\n\t\t\t\t// In such a case, we'd like to display the image toolbar.\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\tthis._createToolbarLinkImageButton();\n\t}\n\n\t/**\n\t * Creates a `LinkImageUI` button view.\n\t *\n\t * Clicking this button shows a {@link module:link/linkui~LinkUI#_balloon} attached to the selection.\n\t * When an image is already linked, the view shows {@link module:link/linkui~LinkUI#toolbarView} or\n\t * {@link module:link/linkui~LinkUI#formView} if it is not.\n\t */\n\tprivate _createToolbarLinkImageButton(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'linkImage', locale => {\n\t\t\tconst button = new ButtonView( locale );\n\t\t\tconst plugin = editor.plugins.get( 'LinkUI' );\n\t\t\tconst linkCommand: LinkCommand = editor.commands.get( 'link' )!;\n\n\t\t\tbutton.set( {\n\t\t\t\tisEnabled: true,\n\t\t\t\tlabel: t( 'Link image' ),\n\t\t\t\ticon: IconLink,\n\t\t\t\tkeystroke: LINK_KEYSTROKE,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\t// Bind button to the command.\n\t\t\tbutton.bind( 'isEnabled' ).to( linkCommand, 'isEnabled' );\n\t\t\tbutton.bind( 'isOn' ).to( linkCommand, 'value', value => !!value );\n\n\t\t\t// Show the actionsView or formView (both from LinkUI) on button click depending on whether the image is linked already.\n\t\t\tthis.listenTo( button, 'execute', () => {\n\t\t\t\tif ( this._isSelectedLinkedImage( editor.model.document.selection ) ) {\n\t\t\t\t\tplugin._addToolbarView();\n\t\t\t\t} else {\n\t\t\t\t\tplugin._showUI( true );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\t}\n\n\t/**\n\t * Returns true if a linked image (either block or inline) is the only selected element\n\t * in the model document.\n\t */\n\tprivate _isSelectedLinkedImage( selection: ModelDocumentSelection | ModelSelection ): boolean {\n\t\tconst selectedModelElement = selection.getSelectedElement();\n\t\tconst imageUtils: ImageUtils = this.editor.plugins.get( 'ImageUtils' );\n\n\t\treturn imageUtils.isImage( selectedModelElement ) && selectedModelElement.hasAttribute( 'linkHref' );\n\t}\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/**\n * @module link/linkimage\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { LinkImageEditing } from './linkimageediting.js';\nimport { LinkImageUI } from './linkimageui.js';\n\n/**\n * The `LinkImage` plugin.\n *\n * This is a \"glue\" plugin that loads the {@link module:link/linkimageediting~LinkImageEditing link image editing feature}\n * and {@link module:link/linkimageui~LinkImageUI link image UI feature}.\n */\nexport class LinkImage extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LinkImageEditing, LinkImageUI ]> {\n\t\treturn [ LinkImageEditing, LinkImageUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LinkImage' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { ShiftEnter } from \"@ckeditor/ckeditor5-enter\";\nimport { ViewUpcastWriter } from \"@ckeditor/ckeditor5-engine\";\nimport { ClipboardPipeline } from \"@ckeditor/ckeditor5-clipboard\";\nimport { Collection, first } from \"@ckeditor/ckeditor5-utils\";\nimport { MenuBarMenuListItemButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, SplitButtonView, UIModel, addListToDropdown, createDropdown } from \"@ckeditor/ckeditor5-ui\";\nimport { IconCodeBlock } from \"@ckeditor/ckeditor5-icons\";\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* Returns code block languages as defined in `config.codeBlock.languages` but processed:\n*\n* * To consider the editor localization, i.e. to display {@link module:code-block/codeblockconfig~CodeBlockLanguageDefinition}\n* in the correct language. There is no way to use {@link module:utils/locale~Locale#t} when the user\n* configuration is defined because the editor does not exist yet.\n* * To make sure each definition has a CSS class associated with it even if not specified\n* in the original configuration.\n*\n* @internal\n*/\nfunction getNormalizedAndLocalizedLanguageDefinitions(editor) {\n\tconst t = editor.t;\n\tconst languageDefs = editor.config.get(\"codeBlock.languages\");\n\tfor (const def of languageDefs) {\n\t\tif (def.label === \"Plain text\") def.label = t(\"Plain text\");\n\t\tif (def.class === void 0) def.class = `language-${def.language}`;\n\t}\n\treturn languageDefs;\n}\n/**\n* Returns an object associating certain language definition properties with others. For instance:\n*\n* For:\n*\n* ```ts\n* const definitions = {\n* \t{ language: 'php', class: 'language-php', label: 'PHP' },\n* \t{ language: 'javascript', class: 'js', label: 'JavaScript' },\n* };\n*\n* getPropertyAssociation( definitions, 'class', 'language' );\n* ```\n*\n* returns:\n*\n* ```ts\n* {\n* \t'language-php': 'php',\n* \t'js': 'javascript'\n* }\n* ```\n*\n* and\n*\n* ```ts\n* getPropertyAssociation( definitions, 'language', 'label' );\n* ```\n*\n* returns:\n*\n* ```ts\n* {\n* \t'php': 'PHP',\n* \t'javascript': 'JavaScript'\n* }\n* ```\n*\n* @internal\n*/\nfunction getPropertyAssociation(languageDefs, key, value) {\n\tconst association = {};\n\tfor (const def of languageDefs) if (key === \"class\") {\n\t\tconst newKey = def[key].split(\" \").shift();\n\t\tassociation[newKey] = def[value];\n\t} else association[def[key]] = def[value];\n\treturn association;\n}\n/**\n* For a given model text node, it returns white spaces that precede other characters in that node.\n* This corresponds to the indentation part of the code block line.\n*\n* @internal\n*/\nfunction getLeadingWhiteSpaces(textNode) {\n\treturn textNode.data.match(/^(\\s*)/)[0];\n}\n/**\n* For plain text containing the code (a snippet), it returns a document fragment containing\n* view text nodes separated by `<br>` elements (in place of new line characters \"\\n\"), for instance:\n*\n* Input:\n*\n* ```ts\n* \"foo()\\n\n* bar()\"\n* ```\n*\n* Output:\n*\n* ```html\n* <DocumentFragment>\n* \t\"foo()\"\n* \t<br/>\n* \t\"bar()\"\n* </DocumentFragment>\n* ```\n*\n* @param text The raw code text to be converted.\n* @internal\n*/\nfunction rawSnippetTextToViewDocumentFragment(writer, text) {\n\tconst fragment = writer.createDocumentFragment();\n\tconst textLines = text.split(\"\\n\");\n\tconst items = textLines.reduce((nodes, line, lineIndex) => {\n\t\tnodes.push(line);\n\t\tif (lineIndex < textLines.length - 1) nodes.push(writer.createElement(\"br\"));\n\t\treturn nodes;\n\t}, []);\n\twriter.appendChild(items, fragment);\n\treturn fragment;\n}\n/**\n* Returns an array of all model positions within the selection that represent code block lines.\n*\n* If the selection is collapsed, it returns the exact selection anchor position:\n*\n* ```html\n* <codeBlock>[]foo</codeBlock>        ->     <codeBlock>^foo</codeBlock>\n* <codeBlock>foo[]bar</codeBlock>     ->     <codeBlock>foo^bar</codeBlock>\n* ```\n*\n* Otherwise, it returns positions **before** each text node belonging to all code blocks contained by the selection:\n*\n* ```html\n* <codeBlock>                                <codeBlock>\n*     foo[bar                                   ^foobar\n*     <softBreak></softBreak>         ->        <softBreak></softBreak>\n*     baz]qux                                   ^bazqux\n* </codeBlock>                               </codeBlock>\n* ```\n*\n* It also works across other non–code blocks:\n*\n* ```html\n* <codeBlock>                                <codeBlock>\n*     foo[bar                                   ^foobar\n* </codeBlock>                               </codeBlock>\n* <paragraph>text</paragraph>         ->     <paragraph>text</paragraph>\n* <codeBlock>                                <codeBlock>\n*     baz]qux                                   ^bazqux\n* </codeBlock>                               </codeBlock>\n* ```\n*\n* **Note:** The positions are in reverse order so they do not get outdated when iterating over them and\n* the writer inserts or removes elements at the same time.\n*\n* **Note:** The position is located after the leading white spaces in the text node.\n*\n* @internal\n*/\nfunction getIndentOutdentPositions(model) {\n\tconst selection = model.document.selection;\n\tconst positions = [];\n\tif (selection.isCollapsed) return [selection.anchor];\n\tconst walker = selection.getFirstRange().getWalker({\n\t\tignoreElementEnd: true,\n\t\tdirection: \"backward\"\n\t});\n\tfor (const { item } of walker) {\n\t\tlet node = item.is(\"$textProxy\") ? item.textNode : item;\n\t\tconst parent = node.parent;\n\t\tif (!parent.is(\"element\", \"codeBlock\") || node.is(\"element\", \"softBreak\")) continue;\n\t\twhile (node.previousSibling && !node.previousSibling.is(\"element\", \"softBreak\")) node = node.previousSibling;\n\t\tconst startOffset = !node.is(\"$text\") ? node.startOffset : node.startOffset + getLeadingWhiteSpaces(node).length;\n\t\tconst position = model.createPositionAt(parent, startOffset);\n\t\tif (positions.every((pos) => !pos.isEqual(position))) positions.push(position);\n\t}\n\treturn positions;\n}\n/**\n* Checks if any of the blocks within the model selection is a code block.\n*\n* @internal\n*/\nfunction isModelSelectionInCodeBlock(selection) {\n\tconst firstBlock = first(selection.getSelectedBlocks());\n\treturn !!firstBlock && firstBlock.is(\"element\", \"codeBlock\");\n}\n/**\n* Checks if an {@link module:engine/model/element~ModelElement Element} can become a code block.\n*\n* @param schema Model's schema.\n* @param element The element to be checked.\n* @returns Check result.\n* @internal\n*/\nfunction canBeCodeBlock(schema, element) {\n\tif (element.is(\"rootElement\") || schema.isLimit(element)) return false;\n\treturn schema.checkChild(element.parent, \"codeBlock\");\n}\n/**\n* Get the translated message read by the screen reader when you enter or exit an element with your cursor.\n*\n* @internal\n*/\nfunction getCodeBlockAriaAnnouncement(t, languageDefs, element, direction) {\n\tconst languagesToLabels = getPropertyAssociation(languageDefs, \"language\", \"label\");\n\tconst codeBlockLanguage = element.getAttribute(\"language\");\n\tif (codeBlockLanguage in languagesToLabels) {\n\t\tconst language = languagesToLabels[codeBlockLanguage];\n\t\tif (direction === \"enter\") return t(\"Entering %0 code snippet\", language);\n\t\treturn t(\"Leaving %0 code snippet\", language);\n\t}\n\tif (direction === \"enter\") return t(\"Entering code snippet\");\n\treturn t(\"Leaving code snippet\");\n}\n/**\n* For given position, finds the closest position that is at the beginning of a line of code and returns a text node that is at the\n* beginning of the line (or `null` if there's no text node at the beginning of a given line).\n*\n* Line beings at the start of a code block element and after each `softBreak` element.\n*\n* Note: even though code block doesn't allow inline elements other than `<softBreak>` by default, some features may overwrite this rule,\n* so such inline elements are taken into account.\n*\n* Some examples of expected results:\n*\n* ```\n* <codeBlock>^</codeBlock>                                ->   null\n* <codeBlock>^foobar</codeBlock>                          ->   <codeBlock>[foobar]</codeBlock>\n* <codeBlock>foobar^</codeBlock>                          ->   <codeBlock>[foobar]</codeBlock>\n* <codeBlock>foo^bar</codeBlock>                          ->   <codeBlock>[foobar]</codeBlock>\n* <codeBlock>foo^<softBreak />bar</codeBlock>             ->   <codeBlock>[foo]<softBreak />bar</codeBlock>\n* <codeBlock>foo<softBreak />bar^</codeBlock>             ->   <codeBlock>foo<softBreak />[bar]</codeBlock>\n* <codeBlock>foo<softBreak />b^ar</codeBlock>             ->   <codeBlock>foo<softBreak />[bar]</codeBlock>\n* <codeBlock>foo<softBreak />^bar</codeBlock>             ->   <codeBlock>foo<softBreak />[bar]</codeBlock>\n* <codeBlock>^<element /></codeBlock>                     ->   null\n* <codeBlock><element />^</codeBlock>                     ->   null\n* <codeBlock>foo^<element /></codeBlock>                  ->   <codeBlock>[foo]<element /></codeBlock>\n* <codeBlock>foo<element />^</codeBlock>                  ->   <codeBlock>[foo]<element /></codeBlock>\n* <codeBlock>foo<element />bar^</codeBlock>               ->   <codeBlock>[foo]<element />bar</codeBlock>\n* <codeBlock><element />bar^</codeBlock>                  ->   null\n* <codeBlock>foo<softBreak />^<softBreak /></codeBlock>   ->   null\n* <codeBlock>foo<softBreak />^<element /></codeBlock>     ->   null\n* <codeBlock>foo<softBreak /><element />^</codeBlock>     ->   null\n* <codeBlock>foo<softBreak />bar<element />^</codeBlock>  ->   <codeBlock>foo<softBreak />[bar]<element /></codeBlock>\n* <codeBlock>foo<softBreak /><element />ba^r</codeBlock>  ->   null\n* ```\n*\n* @internal\n*/\nfunction getTextNodeAtLineStart(position, model) {\n\tif (position.textNode) position = model.createPositionBefore(position.textNode);\n\twhile (position.nodeBefore && !position.nodeBefore.is(\"element\", \"softBreak\")) position = model.createPositionBefore(position.nodeBefore);\n\tconst nodeAtStart = position.nodeAfter;\n\treturn nodeAtStart && nodeAtStart.is(\"$text\") ? nodeAtStart : 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* The code block command plugin.\n*/\nvar CodeBlockCommand = class extends Command {\n\t/**\n\t* Contains the last used language.\n\t*/\n\t_lastLanguage;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._lastLanguage = null;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Executes the command. When the command {@link #value is on}, all topmost code blocks within\n\t* the selection will be removed. If it is off, all selected blocks will be flattened and\n\t* wrapped by a code block.\n\t*\n\t* @fires execute\n\t* @param options Command options.\n\t* @param options.language The code block language.\n\t* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a code block,\n\t* otherwise the command will remove the code block. If not set, the command will act basing on its current value.\n\t* @param options.usePreviousLanguageChoice If set on `true` and the `options.language` is not specified, the command\n\t* will apply the previous language (if the command was already executed) when inserting the `codeBlock` element.\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst firstLanguageInConfig = getNormalizedAndLocalizedLanguageDefinitions(editor)[0];\n\t\tconst blocks = Array.from(selection.getSelectedBlocks());\n\t\tconst value = options.forceValue == void 0 ? !this.value : options.forceValue;\n\t\tconst language = getLanguage(options, this._lastLanguage, firstLanguageInConfig.language);\n\t\tmodel.change((writer) => {\n\t\t\tif (value) this._applyCodeBlock(writer, blocks, language);\n\t\t\telse this._removeCodeBlock(writer, blocks);\n\t\t});\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst firstBlock = first(selection.getSelectedBlocks());\n\t\treturn !!firstBlock?.is(\"element\", \"codeBlock\") ? firstBlock.getAttribute(\"language\") : false;\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tif (this.value) return true;\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst schema = this.editor.model.schema;\n\t\tconst firstBlock = first(selection.getSelectedBlocks());\n\t\tif (!firstBlock) return false;\n\t\treturn canBeCodeBlock(schema, firstBlock);\n\t}\n\t_applyCodeBlock(writer, blocks, language) {\n\t\tthis._lastLanguage = language;\n\t\tconst schema = this.editor.model.schema;\n\t\tconst allowedBlocks = blocks.filter((block) => canBeCodeBlock(schema, block));\n\t\tfor (const block of allowedBlocks) {\n\t\t\twriter.rename(block, \"codeBlock\");\n\t\t\twriter.setAttribute(\"language\", language, block);\n\t\t\tschema.removeDisallowedAttributes([block], writer);\n\t\t\tArray.from(block.getChildren()).filter((child) => !schema.checkChild(block, child)).forEach((child) => writer.remove(child));\n\t\t}\n\t\tallowedBlocks.reverse().forEach((currentBlock, i) => {\n\t\t\tconst nextBlock = allowedBlocks[i + 1];\n\t\t\tif (currentBlock.previousSibling === nextBlock) {\n\t\t\t\twriter.appendElement(\"softBreak\", nextBlock);\n\t\t\t\twriter.merge(writer.createPositionBefore(currentBlock));\n\t\t\t}\n\t\t});\n\t}\n\t_removeCodeBlock(writer, blocks) {\n\t\tconst codeBlocks = blocks.filter((block) => block.is(\"element\", \"codeBlock\"));\n\t\tfor (const block of codeBlocks) {\n\t\t\tconst range = writer.createRangeOn(block);\n\t\t\tfor (const item of Array.from(range.getItems()).reverse()) if (item.is(\"element\", \"softBreak\") && item.parent.is(\"element\", \"codeBlock\")) {\n\t\t\t\tconst { position } = writer.split(writer.createPositionBefore(item));\n\t\t\t\tconst elementAfter = position.nodeAfter;\n\t\t\t\twriter.rename(elementAfter, \"paragraph\");\n\t\t\t\twriter.removeAttribute(\"language\", elementAfter);\n\t\t\t\twriter.remove(item);\n\t\t\t}\n\t\t\twriter.rename(block, \"paragraph\");\n\t\t\twriter.removeAttribute(\"language\", block);\n\t\t}\n\t}\n};\n/**\n* Picks the language for the new code block. If any language is passed as an option,\n* it will be returned. Else, if option usePreviousLanguageChoice is true and some\n* code block was already created (lastLanguage is not null) then previously used\n* language will be returned. If not, it will return default language.\n*/\nfunction getLanguage(options, lastLanguage, defaultLanguage) {\n\tif (options.language) return options.language;\n\tif (options.usePreviousLanguageChoice && lastLanguage) return lastLanguage;\n\treturn defaultLanguage;\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 code-block/indentcodeblockcommand\n*/\n/**\n* The code block indentation increase command plugin.\n*/\nvar IndentCodeBlockCommand = class extends Command {\n\t/**\n\t* A sequence of characters added to the line when the command is executed.\n\t*/\n\t_indentSequence;\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._indentSequence = editor.config.get(\"codeBlock.indentSequence\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Executes the command. When the command {@link #isEnabled is enabled}, the indentation of the\n\t* code lines in the selection will be increased.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tmodel.change((writer) => {\n\t\t\tconst positions = getIndentOutdentPositions(model);\n\t\t\tfor (const position of positions) {\n\t\t\t\tconst indentSequenceTextElement = writer.createText(this._indentSequence);\n\t\t\t\tmodel.insertContent(indentSequenceTextElement, position);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*/\n\t_checkEnabled() {\n\t\tif (!this._indentSequence) return false;\n\t\treturn isModelSelectionInCodeBlock(this.editor.model.document.selection);\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* The code block indentation decrease command plugin.\n*/\nvar OutdentCodeBlockCommand = class extends Command {\n\t/**\n\t* A sequence of characters removed from the line when the command is executed.\n\t*/\n\t_indentSequence;\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._indentSequence = editor.config.get(\"codeBlock.indentSequence\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Executes the command. When the command {@link #isEnabled is enabled}, the indentation of the\n\t* code lines in the selection will be decreased.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tmodel.change(() => {\n\t\t\tconst positions = getIndentOutdentPositions(model);\n\t\t\tfor (const position of positions) {\n\t\t\t\tconst range = getLastOutdentableSequenceRange(model, position, this._indentSequence);\n\t\t\t\tif (range) model.deleteContent(model.createSelection(range));\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @private\n\t* @returns {Boolean} Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tif (!this._indentSequence) return false;\n\t\tconst model = this.editor.model;\n\t\tif (!isModelSelectionInCodeBlock(model.document.selection)) return false;\n\t\treturn getIndentOutdentPositions(model).some((position) => {\n\t\t\treturn getLastOutdentableSequenceRange(model, position, this._indentSequence);\n\t\t});\n\t}\n};\nfunction getLastOutdentableSequenceRange(model, position, sequence) {\n\tconst nodeAtPosition = getTextNodeAtLineStart(position, model);\n\tif (!nodeAtPosition) return null;\n\tconst leadingWhiteSpaces = getLeadingWhiteSpaces(nodeAtPosition);\n\tconst lastIndexOfSequence = leadingWhiteSpaces.lastIndexOf(sequence);\n\tif (lastIndexOfSequence + sequence.length !== leadingWhiteSpaces.length) return null;\n\tif (lastIndexOfSequence === -1) return null;\n\tconst { parent, startOffset } = nodeAtPosition;\n\treturn model.createRange(model.createPositionAt(parent, startOffset + lastIndexOfSequence), model.createPositionAt(parent, startOffset + lastIndexOfSequence + sequence.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* A model-to-view (both editing and data) converter for the `codeBlock` element.\n*\n* Sample input:\n*\n* ```html\n* <codeBlock language=\"javascript\">foo();<softBreak></softBreak>bar();</codeBlock>\n* ```\n*\n* Sample output (editing):\n*\n* ```html\n* <pre data-language=\"JavaScript\"><code class=\"language-javascript\">foo();<br />bar();</code></pre>\n* ```\n*\n* Sample output (data, see {@link module:code-block/converters~modelToDataViewSoftBreakInsertion}):\n*\n* ```html\n* <pre><code class=\"language-javascript\">foo();\\nbar();</code></pre>\n* ```\n*\n* @param languageDefs The normalized language configuration passed to the feature.\n* @param useLabels When `true`, the `<pre>` element will get a `data-language` attribute with a\n* human–readable label of the language. Used only in the editing.\n* @returns Returns a conversion callback.\n* @internal\n*/\nfunction modelToViewCodeBlockInsertion(model, languageDefs, useLabels = false) {\n\tconst languagesToClasses = getPropertyAssociation(languageDefs, \"language\", \"class\");\n\tconst languagesToLabels = getPropertyAssociation(languageDefs, \"language\", \"label\");\n\treturn (evt, data, conversionApi) => {\n\t\tconst { writer, mapper, consumable } = conversionApi;\n\t\tif (!consumable.consume(data.item, \"insert\")) return;\n\t\tconst codeBlockLanguage = data.item.getAttribute(\"language\");\n\t\tconst targetViewPosition = mapper.toViewPosition(model.createPositionBefore(data.item));\n\t\tconst preAttributes = {};\n\t\tif (useLabels) {\n\t\t\tpreAttributes[\"data-language\"] = languagesToLabels[codeBlockLanguage];\n\t\t\tpreAttributes.spellcheck = \"false\";\n\t\t}\n\t\tconst codeAttributes = languagesToClasses[codeBlockLanguage] ? { class: languagesToClasses[codeBlockLanguage] } : void 0;\n\t\tconst code = writer.createContainerElement(\"code\", codeAttributes);\n\t\tconst pre = writer.createContainerElement(\"pre\", preAttributes, code);\n\t\twriter.insert(targetViewPosition, pre);\n\t\tmapper.bindElements(data.item, code);\n\t};\n}\n/**\n* A model-to-data view converter for the new line (`softBreak`) separator.\n*\n* Sample input:\n*\n* ```html\n* <codeBlock ...>foo();<softBreak></softBreak>bar();</codeBlock>\n* ```\n*\n* Sample output:\n*\n* ```html\n* <pre><code ...>foo();\\nbar();</code></pre>\n* ```\n*\n* @returns Returns a conversion callback.\n* @internal\n*/\nfunction modelToDataViewSoftBreakInsertion(model) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (data.item.parent.name !== \"codeBlock\") return;\n\t\tconst { writer, mapper, consumable } = conversionApi;\n\t\tif (!consumable.consume(data.item, \"insert\")) return;\n\t\tconst position = mapper.toViewPosition(model.createPositionBefore(data.item));\n\t\twriter.insert(position, writer.createText(\"\\n\"));\n\t};\n}\n/**\n* A view-to-model converter for `<pre>` with the `<code>` HTML.\n*\n* Sample input:\n*\n* ```html\n* <pre><code class=\"language-javascript\">foo();bar();</code></pre>\n* ```\n*\n* Sample output:\n*\n* ```html\n* <codeBlock language=\"javascript\">foo();bar();</codeBlock>\n* ```\n*\n* @param languageDefs The normalized language configuration passed to the feature.\n* @returns Returns a conversion callback.\n* @internal\n*/\nfunction dataViewToModelCodeBlockInsertion(editingView, languageDefs) {\n\tconst classesToLanguages = getPropertyAssociation(languageDefs, \"class\", \"language\");\n\tconst defaultLanguageName = languageDefs[0].language;\n\treturn (evt, data, conversionApi) => {\n\t\tconst viewCodeElement = data.viewItem;\n\t\tconst viewPreElement = viewCodeElement.parent;\n\t\tif (!viewPreElement || !viewPreElement.is(\"element\", \"pre\")) return;\n\t\tif (data.modelCursor.findAncestor(\"codeBlock\")) return;\n\t\tconst { consumable, writer } = conversionApi;\n\t\tif (!consumable.test(viewCodeElement, { name: true })) return;\n\t\tconst codeBlock = writer.createElement(\"codeBlock\");\n\t\tconst viewChildClasses = [...viewCodeElement.getClassNames()];\n\t\tif (!viewChildClasses.length) viewChildClasses.push(\"\");\n\t\tfor (const className of viewChildClasses) {\n\t\t\tconst language = classesToLanguages[className];\n\t\t\tif (language) {\n\t\t\t\tconsumable.consume(viewCodeElement, { classes: [className] });\n\t\t\t\twriter.setAttribute(\"language\", language, codeBlock);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!codeBlock.hasAttribute(\"language\")) writer.setAttribute(\"language\", defaultLanguageName, codeBlock);\n\t\tconversionApi.convertChildren(viewCodeElement, codeBlock);\n\t\tif (!conversionApi.safeInsert(codeBlock, data.modelCursor)) return;\n\t\tconsumable.consume(viewCodeElement, { name: true });\n\t\tconversionApi.updateConversionResult(codeBlock, data);\n\t};\n}\n/**\n* A view-to-model converter for new line characters in `<pre>`.\n*\n* Sample input:\n*\n* ```html\n* <pre><code class=\"language-javascript\">foo();\\nbar();</code></pre>\n* ```\n*\n* Sample output:\n*\n* ```html\n* <codeBlock language=\"javascript\">foo();<softBreak></softBreak>bar();</codeBlock>\n* ```\n*\n* @returns {Function} Returns a conversion callback.\n* @internal\n*/\nfunction dataViewToModelTextNewlinesInsertion() {\n\treturn (evt, data, { consumable, writer }) => {\n\t\tlet position = data.modelCursor;\n\t\tif (!consumable.test(data.viewItem)) return;\n\t\tif (!position.findAncestor(\"codeBlock\")) return;\n\t\tconsumable.consume(data.viewItem);\n\t\tconst textLines = data.viewItem.data.split(\"\\n\").map((data) => writer.createText(data));\n\t\tconst lastLine = textLines[textLines.length - 1];\n\t\tfor (const node of textLines) {\n\t\t\twriter.insert(node, position);\n\t\t\tposition = position.getShiftedBy(node.offsetSize);\n\t\t\tif (node !== lastLine) {\n\t\t\t\tconst softBreak = writer.createElement(\"softBreak\");\n\t\t\t\twriter.insert(softBreak, position);\n\t\t\t\tposition = writer.createPositionAfter(softBreak);\n\t\t\t}\n\t\t}\n\t\tdata.modelRange = writer.createRange(data.modelCursor, position);\n\t\tdata.modelCursor = position;\n\t};\n}\n/**\n* A view-to-model converter that handles orphan text nodes (white spaces, new lines, etc.)\n* that surround `<code>` inside `<pre>`.\n*\n* Sample input:\n*\n* ```html\n* // White spaces\n* <pre> <code>foo()</code> </pre>\n*\n* // White spaces\n* <pre>      <code>foo()</code>      </pre>\n*\n* // White spaces\n* <pre>\t\t\t<code>foo()</code>\t\t\t</pre>\n*\n* // New lines\n* <pre>\n* \t<code>foo()</code>\n* </pre>\n*\n* // Redundant text\n* <pre>ABC<code>foo()</code>DEF</pre>\n* ```\n*\n* Unified output for each case:\n*\n* ```html\n* <codeBlock language=\"plaintext\">foo()</codeBlock>\n* ```\n*\n* @returns Returns a conversion callback.\n* @internal\n*/\nfunction dataViewToModelOrphanNodeConsumer() {\n\treturn (evt, data, { consumable }) => {\n\t\tconst preElement = data.viewItem;\n\t\tif (preElement.findAncestor(\"pre\")) return;\n\t\tconst preChildren = Array.from(preElement.getChildren());\n\t\tconst childCodeElement = preChildren.find((node) => node.is(\"element\", \"code\"));\n\t\tif (!childCodeElement) return;\n\t\tfor (const child of preChildren) {\n\t\t\tif (child === childCodeElement || !child.is(\"$text\")) continue;\n\t\t\tconsumable.consume(child, { name: true });\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 code-block/codeblockediting\n*/\nconst DEFAULT_ELEMENT = \"paragraph\";\n/**\n* The editing part of the code block feature.\n*\n* Introduces the `'codeBlock'` command and the `'codeBlock'` model element.\n*/\nvar CodeBlockEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"CodeBlockEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ShiftEnter];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"codeBlock\", {\n\t\t\tlanguages: [\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"plaintext\",\n\t\t\t\t\tlabel: \"Plain text\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"c\",\n\t\t\t\t\tlabel: \"C\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"cs\",\n\t\t\t\t\tlabel: \"C#\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"cpp\",\n\t\t\t\t\tlabel: \"C++\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"css\",\n\t\t\t\t\tlabel: \"CSS\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"diff\",\n\t\t\t\t\tlabel: \"Diff\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"go\",\n\t\t\t\t\tlabel: \"Go\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"html\",\n\t\t\t\t\tlabel: \"HTML\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"java\",\n\t\t\t\t\tlabel: \"Java\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"javascript\",\n\t\t\t\t\tlabel: \"JavaScript\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"php\",\n\t\t\t\t\tlabel: \"PHP\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"python\",\n\t\t\t\t\tlabel: \"Python\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"ruby\",\n\t\t\t\t\tlabel: \"Ruby\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"typescript\",\n\t\t\t\t\tlabel: \"TypeScript\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlanguage: \"xml\",\n\t\t\t\t\tlabel: \"XML\"\n\t\t\t\t}\n\t\t\t],\n\t\t\tindentSequence: \"\t\"\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tconst normalizedLanguagesDefs = getNormalizedAndLocalizedLanguageDefinitions(editor);\n\t\teditor.commands.add(\"codeBlock\", new CodeBlockCommand(editor));\n\t\teditor.commands.add(\"indentCodeBlock\", new IndentCodeBlockCommand(editor));\n\t\teditor.commands.add(\"outdentCodeBlock\", new OutdentCodeBlockCommand(editor));\n\t\tthis.listenTo(view.document, \"tab\", (evt, data) => {\n\t\t\tconst commandName = data.shiftKey ? \"outdentCodeBlock\" : \"indentCodeBlock\";\n\t\t\tif (!editor.commands.get(commandName).isEnabled) return;\n\t\t\teditor.execute(commandName);\n\t\t\tdata.stopPropagation();\n\t\t\tdata.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: \"pre\" });\n\t\tschema.register(\"codeBlock\", {\n\t\t\tallowWhere: \"$block\",\n\t\t\tallowChildren: \"$text\",\n\t\t\tdisallowChildren: \"$inlineObject\",\n\t\t\tallowAttributes: [\"language\"],\n\t\t\tallowAttributesOf: \"$listItem\",\n\t\t\tisBlock: true\n\t\t});\n\t\tschema.addAttributeCheck((context, attributeName) => {\n\t\t\tconst parent = context.getItem(context.length - 2);\n\t\t\tif (schema.getAttributeProperties(attributeName).isFormatting && parent && parent.name == \"codeBlock\") return false;\n\t\t});\n\t\teditor.editing.downcastDispatcher.on(\"insert:codeBlock\", modelToViewCodeBlockInsertion(model, normalizedLanguagesDefs, true));\n\t\teditor.data.downcastDispatcher.on(\"insert:codeBlock\", modelToViewCodeBlockInsertion(model, normalizedLanguagesDefs));\n\t\teditor.data.downcastDispatcher.on(\"insert:softBreak\", modelToDataViewSoftBreakInsertion(model), { priority: \"high\" });\n\t\teditor.data.upcastDispatcher.on(\"element:code\", dataViewToModelCodeBlockInsertion(view, normalizedLanguagesDefs));\n\t\teditor.data.upcastDispatcher.on(\"text\", dataViewToModelTextNewlinesInsertion());\n\t\teditor.data.upcastDispatcher.on(\"element:pre\", dataViewToModelOrphanNodeConsumer(), { priority: \"high\" });\n\t\tthis.listenTo(editor.editing.view.document, \"clipboardInput\", (evt, data) => {\n\t\t\tlet insertionRange = model.createRange(model.document.selection.anchor);\n\t\t\tif (data.targetRanges) insertionRange = editor.editing.mapper.toModelRange(data.targetRanges[0]);\n\t\t\tif (!insertionRange.start.parent.is(\"element\", \"codeBlock\")) return;\n\t\t\tconst text = data.dataTransfer.getData(\"text/plain\");\n\t\t\tconst writer = new ViewUpcastWriter(editor.editing.view.document);\n\t\t\tdata.content = rawSnippetTextToViewDocumentFragment(writer, text);\n\t\t});\n\t\tif (editor.plugins.has(\"ClipboardPipeline\")) editor.plugins.get(ClipboardPipeline).on(\"contentInsertion\", (evt, data) => {\n\t\t\tconst model = editor.model;\n\t\t\tconst selection = model.document.selection;\n\t\t\tif (!selection.anchor.parent.is(\"element\", \"codeBlock\")) return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst contentRange = writer.createRangeIn(data.content);\n\t\t\t\tfor (const item of [...contentRange.getItems()]) if (item.is(\"node\") && !schema.checkChild(selection.anchor, item)) writer.remove(item);\n\t\t\t});\n\t\t});\n\t\tthis.listenTo(model, \"getSelectedContent\", (evt, [selection]) => {\n\t\t\tconst anchor = selection.anchor;\n\t\t\tif (selection.isCollapsed || !anchor.parent.is(\"element\", \"codeBlock\") || !anchor.hasSameParentAs(selection.focus)) return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst docFragment = evt.return;\n\t\t\t\tif (anchor.parent.is(\"element\") && (docFragment.childCount > 1 || selection.containsEntireContent(anchor.parent))) {\n\t\t\t\t\tconst codeBlock = writer.createElement(\"codeBlock\", anchor.parent.getAttributes());\n\t\t\t\t\twriter.append(docFragment, codeBlock);\n\t\t\t\t\tconst newDocumentFragment = writer.createDocumentFragment();\n\t\t\t\t\twriter.append(codeBlock, newDocumentFragment);\n\t\t\t\t\tevt.return = newDocumentFragment;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst textNode = docFragment.getChild(0);\n\t\t\t\tif (schema.checkAttribute(textNode, \"code\")) writer.setAttribute(\"code\", true, textNode);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst commands = editor.commands;\n\t\tconst indent = commands.get(\"indent\");\n\t\tconst outdent = commands.get(\"outdent\");\n\t\tif (indent) indent.registerChildCommand(commands.get(\"indentCodeBlock\"), { priority: \"highest\" });\n\t\tif (outdent) outdent.registerChildCommand(commands.get(\"outdentCodeBlock\"));\n\t\tthis.listenTo(editor.editing.view.document, \"enter\", (evt, data) => {\n\t\t\tif (!editor.model.document.selection.getLastPosition().parent.is(\"element\", \"codeBlock\")) return;\n\t\t\tif (!leaveBlockStartOnEnter(editor, data.isSoft) && !leaveBlockEndOnEnter(editor, data.isSoft)) breakLineOnEnter(editor);\n\t\t\tdata.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: \"pre\" });\n\t\tthis._initAriaAnnouncements();\n\t}\n\t/**\n\t* Observe when user enters or leaves code block and set proper aria value in global live announcer.\n\t* This allows screen readers to indicate when the user has entered and left the specified code block.\n\t*\n\t* @internal\n\t*/\n\t_initAriaAnnouncements() {\n\t\tconst { model, ui, t } = this.editor;\n\t\tconst languageDefs = getNormalizedAndLocalizedLanguageDefinitions(this.editor);\n\t\tlet lastFocusedCodeBlock = null;\n\t\tmodel.document.selection.on(\"change:range\", () => {\n\t\t\tconst focusParent = model.document.selection.focus.parent;\n\t\t\tif (!ui || lastFocusedCodeBlock === focusParent || !focusParent.is(\"element\")) return;\n\t\t\tif (lastFocusedCodeBlock && lastFocusedCodeBlock.is(\"element\", \"codeBlock\")) ui.ariaLiveAnnouncer.announce(getCodeBlockAriaAnnouncement(t, languageDefs, lastFocusedCodeBlock, \"leave\"));\n\t\t\tif (focusParent.is(\"element\", \"codeBlock\")) ui.ariaLiveAnnouncer.announce(getCodeBlockAriaAnnouncement(t, languageDefs, focusParent, \"enter\"));\n\t\t\tlastFocusedCodeBlock = focusParent;\n\t\t});\n\t}\n};\n/**\n* Normally, when the Enter (or Shift+Enter) key is pressed, a soft line break is to be added to the\n* code block. Let's try to follow the indentation of the previous line when possible, for instance:\n*\n* ```html\n* // Before pressing enter (or shift enter)\n* <codeBlock>\n* \"    foo()\"[]                   // Indent of 4 spaces.\n* </codeBlock>\n*\n* // After pressing:\n* <codeBlock>\n* \"    foo()\"                 // Indent of 4 spaces.\n* <softBreak></softBreak>     // A new soft break created by pressing enter.\n* \"    \"[]                    // Retain the indent of 4 spaces.\n* </codeBlock>\n* ```\n*/\nfunction breakLineOnEnter(editor) {\n\tconst model = editor.model;\n\tconst modelDoc = model.document;\n\tconst lastSelectionPosition = modelDoc.selection.getLastPosition();\n\tlet leadingWhiteSpaces;\n\tconst node = getTextNodeAtLineStart(lastSelectionPosition, model);\n\tif (node && node.is(\"$text\")) leadingWhiteSpaces = getLeadingWhiteSpaces(node);\n\teditor.model.change((writer) => {\n\t\teditor.execute(\"shiftEnter\");\n\t\tif (leadingWhiteSpaces) writer.insertText(leadingWhiteSpaces, modelDoc.selection.anchor);\n\t});\n}\n/**\n* Leave the code block when Enter (but NOT Shift+Enter) has been pressed twice at the beginning\n* of the code block:\n*\n* ```html\n* // Before:\n* <codeBlock>[]<softBreak></softBreak>foo</codeBlock>\n*\n* // After pressing:\n* <paragraph>[]</paragraph><codeBlock>foo</codeBlock>\n* ```\n*\n* @param isSoftEnter When `true`, enter was pressed along with <kbd>Shift</kbd>.\n* @returns `true` when selection left the block. `false` if stayed.\n*/\nfunction leaveBlockStartOnEnter(editor, isSoftEnter) {\n\tconst modelDoc = editor.model.document;\n\tconst view = editor.editing.view;\n\tconst lastSelectionPosition = modelDoc.selection.getLastPosition();\n\tconst nodeAfter = lastSelectionPosition.nodeAfter;\n\tif (isSoftEnter || !modelDoc.selection.isCollapsed || !lastSelectionPosition.isAtStart) return false;\n\tif (!isSoftBreakNode(nodeAfter)) return false;\n\teditor.model.change((writer) => {\n\t\teditor.execute(\"enter\");\n\t\tconst newBlock = modelDoc.selection.anchor.parent.previousSibling;\n\t\twriter.rename(newBlock, DEFAULT_ELEMENT);\n\t\twriter.setSelection(newBlock, \"in\");\n\t\teditor.model.schema.removeDisallowedAttributes([newBlock], writer);\n\t\twriter.remove(nodeAfter);\n\t});\n\tview.scrollToTheSelection();\n\treturn true;\n}\n/**\n* Leave the code block when Enter (but NOT Shift+Enter) has been pressed twice at the end\n* of the code block:\n*\n* ```html\n* // Before:\n* <codeBlock>foo[]</codeBlock>\n*\n* // After first press:\n* <codeBlock>foo<softBreak></softBreak>[]</codeBlock>\n*\n* // After second press:\n* <codeBlock>foo</codeBlock><paragraph>[]</paragraph>\n* ```\n*\n* @param isSoftEnter When `true`, enter was pressed along with <kbd>Shift</kbd>.\n* @returns `true` when selection left the block. `false` if stayed.\n*/\nfunction leaveBlockEndOnEnter(editor, isSoftEnter) {\n\tconst model = editor.model;\n\tconst modelDoc = model.document;\n\tconst view = editor.editing.view;\n\tconst lastSelectionPosition = modelDoc.selection.getLastPosition();\n\tconst nodeBefore = lastSelectionPosition.nodeBefore;\n\tlet emptyLineRangeToRemoveOnEnter;\n\tif (isSoftEnter || !modelDoc.selection.isCollapsed || !lastSelectionPosition.isAtEnd || !nodeBefore || !nodeBefore.previousSibling) return false;\n\tif (isSoftBreakNode(nodeBefore) && isSoftBreakNode(nodeBefore.previousSibling)) emptyLineRangeToRemoveOnEnter = model.createRange(model.createPositionBefore(nodeBefore.previousSibling), model.createPositionAfter(nodeBefore));\n\telse if (isEmptyishTextNode(nodeBefore) && isSoftBreakNode(nodeBefore.previousSibling) && isSoftBreakNode(nodeBefore.previousSibling.previousSibling)) emptyLineRangeToRemoveOnEnter = model.createRange(model.createPositionBefore(nodeBefore.previousSibling.previousSibling), model.createPositionAfter(nodeBefore));\n\telse if (isEmptyishTextNode(nodeBefore) && isSoftBreakNode(nodeBefore.previousSibling) && isEmptyishTextNode(nodeBefore.previousSibling.previousSibling) && nodeBefore.previousSibling.previousSibling && isSoftBreakNode(nodeBefore.previousSibling.previousSibling.previousSibling)) emptyLineRangeToRemoveOnEnter = model.createRange(model.createPositionBefore(nodeBefore.previousSibling.previousSibling.previousSibling), model.createPositionAfter(nodeBefore));\n\telse return false;\n\teditor.model.change((writer) => {\n\t\twriter.remove(emptyLineRangeToRemoveOnEnter);\n\t\teditor.execute(\"enter\");\n\t\tconst newBlock = modelDoc.selection.anchor.parent;\n\t\twriter.rename(newBlock, DEFAULT_ELEMENT);\n\t\teditor.model.schema.removeDisallowedAttributes([newBlock], writer);\n\t});\n\tview.scrollToTheSelection();\n\treturn true;\n}\nfunction isEmptyishTextNode(node) {\n\treturn node && node.is(\"$text\") && !node.data.match(/\\S/);\n}\nfunction isSoftBreakNode(node) {\n\treturn node && node.is(\"element\", \"softBreak\");\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 code-block/codeblockui\n*/\n/**\n* The code block UI plugin.\n*\n* Introduces the `'codeBlock'` dropdown.\n*/\nvar CodeBlockUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"CodeBlockUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst componentFactory = editor.ui.componentFactory;\n\t\tconst normalizedLanguageDefs = getNormalizedAndLocalizedLanguageDefinitions(editor);\n\t\tconst itemDefinitions = this._getLanguageListItemDefinitions(normalizedLanguageDefs);\n\t\tconst command = editor.commands.get(\"codeBlock\");\n\t\tcomponentFactory.add(\"codeBlock\", (locale) => {\n\t\t\tconst dropdownView = createDropdown(locale, SplitButtonView);\n\t\t\tconst splitButtonView = dropdownView.buttonView;\n\t\t\tconst accessibleLabel = t(\"Insert code block\");\n\t\t\tsplitButtonView.set({\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ttooltip: true,\n\t\t\t\ticon: IconCodeBlock,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tsplitButtonView.bind(\"isOn\").to(command, \"value\", (value) => !!value);\n\t\t\tsplitButtonView.on(\"execute\", () => {\n\t\t\t\teditor.execute(\"codeBlock\", { usePreviousLanguageChoice: true });\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\tdropdownView.on(\"execute\", (evt) => {\n\t\t\t\teditor.execute(\"codeBlock\", {\n\t\t\t\t\tlanguage: evt.source._codeBlockLanguage,\n\t\t\t\t\tforceValue: true\n\t\t\t\t});\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\tdropdownView.class = \"ck-code-block-dropdown\";\n\t\t\tdropdownView.bind(\"isEnabled\").to(command);\n\t\t\taddListToDropdown(dropdownView, itemDefinitions, {\n\t\t\t\trole: \"menu\",\n\t\t\t\tariaLabel: accessibleLabel\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t\tcomponentFactory.add(\"menuBar:codeBlock\", (locale) => {\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tmenuView.buttonView.set({\n\t\t\t\trole: \"menuitem\",\n\t\t\t\tlabel: t(\"Code block\"),\n\t\t\t\ticon: IconCodeBlock\n\t\t\t});\n\t\t\tmenuView.bind(\"isEnabled\").to(command);\n\t\t\tconst listView = new MenuBarMenuListView(locale);\n\t\t\tlistView.set({ ariaLabel: t(\"Insert code block\") });\n\t\t\tfor (const definition of itemDefinitions) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView(locale, menuView);\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView(locale);\n\t\t\t\tbuttonView.bind(...Object.keys(definition.model)).to(definition.model);\n\t\t\t\tbuttonView.set({\n\t\t\t\t\tisToggleable: true,\n\t\t\t\t\trole: \"menuitemcheckbox\"\n\t\t\t\t});\n\t\t\t\tbuttonView.delegate(\"execute\").to(menuView);\n\t\t\t\tbuttonView.on(\"execute\", () => {\n\t\t\t\t\teditor.execute(\"codeBlock\", {\n\t\t\t\t\t\tlanguage: definition.model._codeBlockLanguage,\n\t\t\t\t\t\tforceValue: command.value == definition.model._codeBlockLanguage ? false : true\n\t\t\t\t\t});\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t});\n\t\t\t\tlistItemView.children.add(buttonView);\n\t\t\t\tlistView.items.add(listItemView);\n\t\t\t}\n\t\t\tmenuView.panelView.children.add(listView);\n\t\t\treturn menuView;\n\t\t});\n\t}\n\t/**\n\t* A helper returning a collection of the `codeBlock` dropdown items representing languages\n\t* available for the user to choose from.\n\t*/\n\t_getLanguageListItemDefinitions(normalizedLanguageDefs) {\n\t\tconst command = this.editor.commands.get(\"codeBlock\");\n\t\tconst itemDefinitions = new Collection();\n\t\tfor (const languageDef of normalizedLanguageDefs) {\n\t\t\tconst definition = {\n\t\t\t\ttype: \"button\",\n\t\t\t\tmodel: new UIModel({\n\t\t\t\t\t_codeBlockLanguage: languageDef.language,\n\t\t\t\t\tlabel: languageDef.label,\n\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\twithText: true\n\t\t\t\t})\n\t\t\t};\n\t\t\tdefinition.model.bind(\"isOn\").to(command, \"value\", (value) => {\n\t\t\t\treturn value === definition.model._codeBlockLanguage;\n\t\t\t});\n\t\t\titemDefinitions.add(definition);\n\t\t}\n\t\treturn itemDefinitions;\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 code-block/codeblock\n*/\n/**\n* The code block plugin.\n*\n* For more information about this feature check the {@glink api/code-block package page} and the\n* {@glink features/code-blocks code block} feature guide.\n*\n* This is a \"glue\" plugin that loads the {@link module:code-block/codeblockediting~CodeBlockEditing code block editing feature}\n* and the {@link module:code-block/codeblockui~CodeBlockUI code block UI feature}.\n*/\nvar CodeBlock = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [CodeBlockEditing, CodeBlockUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"CodeBlock\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { CodeBlock, CodeBlockCommand, CodeBlockEditing, CodeBlockUI, IndentCodeBlockCommand, OutdentCodeBlockCommand, canBeCodeBlock as _canBeCodeBlock, dataViewToModelCodeBlockInsertion as _dataViewToModelCodeBlockInsertion, dataViewToModelOrphanNodeConsumer as _dataViewToModelCodeBlockOrphanNodeConsumer, dataViewToModelTextNewlinesInsertion as _dataViewToModelCodeBlockTextNewlinesInsertion, getCodeBlockAriaAnnouncement as _getCodeBlockAriaAnnouncement, getIndentOutdentPositions as _getCodeBlockIndentOutdentPositions, getLeadingWhiteSpaces as _getCodeBlockLeadingWhiteSpaces, getPropertyAssociation as _getCodeBlockPropertyAssociation, getTextNodeAtLineStart as _getCodeBlockTextNodeAtLineStart, getNormalizedAndLocalizedLanguageDefinitions as _getNormalizedAndLocalizedCodeBlockLanguageDefinitions, isModelSelectionInCodeBlock as _isModelSelectionInCodeBlock, modelToDataViewSoftBreakInsertion as _modelToDataViewCodeBlockSoftBreakInsertion, modelToViewCodeBlockInsertion as _modelToViewCodeBlockInsertion, rawSnippetTextToViewDocumentFragment as _rawCodeBlockSnippetTextToViewDocumentFragment };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module code-block/utils\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { CodeBlockLanguageDefinition } from './codeblockconfig.js';\nimport type {\n\tModelDocumentSelection,\n\tModelElement,\n\tModel,\n\tModelPosition,\n\tModelSchema,\n\tModelText,\n\tViewUpcastWriter,\n\tViewDocumentFragment,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport { first, type LocaleTranslate } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Returns code block languages as defined in `config.codeBlock.languages` but processed:\n *\n * * To consider the editor localization, i.e. to display {@link module:code-block/codeblockconfig~CodeBlockLanguageDefinition}\n * in the correct language. There is no way to use {@link module:utils/locale~Locale#t} when the user\n * configuration is defined because the editor does not exist yet.\n * * To make sure each definition has a CSS class associated with it even if not specified\n * in the original configuration.\n *\n * @internal\n */\nexport function getNormalizedAndLocalizedLanguageDefinitions( editor: Editor ): Array<CodeBlockLanguageDefinition> {\n\tconst t = editor.t;\n\tconst languageDefs = editor.config.get( 'codeBlock.languages' ) as Array<CodeBlockLanguageDefinition>;\n\n\tfor ( const def of languageDefs ) {\n\t\tif ( def.label === 'Plain text' ) {\n\t\t\tdef.label = t( 'Plain text' );\n\t\t}\n\n\t\tif ( def.class === undefined ) {\n\t\t\tdef.class = `language-${ def.language }`;\n\t\t}\n\t}\n\n\treturn languageDefs;\n}\n\n/**\n * Returns an object associating certain language definition properties with others. For instance:\n *\n * For:\n *\n * ```ts\n * const definitions = {\n * \t{ language: 'php', class: 'language-php', label: 'PHP' },\n * \t{ language: 'javascript', class: 'js', label: 'JavaScript' },\n * };\n *\n * getPropertyAssociation( definitions, 'class', 'language' );\n * ```\n *\n * returns:\n *\n * ```ts\n * {\n * \t'language-php': 'php',\n * \t'js': 'javascript'\n * }\n * ```\n *\n * and\n *\n * ```ts\n * getPropertyAssociation( definitions, 'language', 'label' );\n * ```\n *\n * returns:\n *\n * ```ts\n * {\n * \t'php': 'PHP',\n * \t'javascript': 'JavaScript'\n * }\n * ```\n *\n * @internal\n */\nexport function getPropertyAssociation(\n\tlanguageDefs: Array<CodeBlockLanguageDefinition>,\n\tkey: keyof CodeBlockLanguageDefinition,\n\tvalue: keyof CodeBlockLanguageDefinition\n): Record<string, string> {\n\tconst association: Record<string, string> = {};\n\n\tfor ( const def of languageDefs ) {\n\t\tif ( key === 'class' ) {\n\t\t\t// Only the first class is considered.\n\t\t\tconst newKey = ( def[ key ]! ).split( ' ' ).shift()!;\n\n\t\t\tassociation[ newKey ] = def[ value ]!;\n\t\t} else {\n\t\t\tassociation[ def[ key ]! ] = def[ value ]!;\n\t\t}\n\t}\n\n\treturn association;\n}\n\n/**\n * For a given model text node, it returns white spaces that precede other characters in that node.\n * This corresponds to the indentation part of the code block line.\n *\n * @internal\n */\nexport function getLeadingWhiteSpaces( textNode: ModelText ): string {\n\treturn textNode.data.match( /^(\\s*)/ )![ 0 ];\n}\n\n/**\n * For plain text containing the code (a snippet), it returns a document fragment containing\n * view text nodes separated by `<br>` elements (in place of new line characters \"\\n\"), for instance:\n *\n * Input:\n *\n * ```ts\n * \"foo()\\n\n * bar()\"\n * ```\n *\n * Output:\n *\n * ```html\n * <DocumentFragment>\n * \t\"foo()\"\n * \t<br/>\n * \t\"bar()\"\n * </DocumentFragment>\n * ```\n *\n * @param text The raw code text to be converted.\n * @internal\n */\nexport function rawSnippetTextToViewDocumentFragment( writer: ViewUpcastWriter, text: string ): ViewDocumentFragment {\n\tconst fragment = writer.createDocumentFragment();\n\tconst textLines = text.split( '\\n' );\n\n\tconst items = textLines.reduce( ( nodes: Array<string | ViewElement>, line, lineIndex ) => {\n\t\tnodes.push( line );\n\n\t\tif ( lineIndex < textLines.length - 1 ) {\n\t\t\tnodes.push( writer.createElement( 'br' ) );\n\t\t}\n\n\t\treturn nodes;\n\t}, [] );\n\n\twriter.appendChild( items, fragment );\n\n\treturn fragment;\n}\n\n/**\n * Returns an array of all model positions within the selection that represent code block lines.\n *\n * If the selection is collapsed, it returns the exact selection anchor position:\n *\n * ```html\n * <codeBlock>[]foo</codeBlock>        ->     <codeBlock>^foo</codeBlock>\n * <codeBlock>foo[]bar</codeBlock>     ->     <codeBlock>foo^bar</codeBlock>\n * ```\n *\n * Otherwise, it returns positions **before** each text node belonging to all code blocks contained by the selection:\n *\n * ```html\n * <codeBlock>                                <codeBlock>\n *     foo[bar                                   ^foobar\n *     <softBreak></softBreak>         ->        <softBreak></softBreak>\n *     baz]qux                                   ^bazqux\n * </codeBlock>                               </codeBlock>\n * ```\n *\n * It also works across other non–code blocks:\n *\n * ```html\n * <codeBlock>                                <codeBlock>\n *     foo[bar                                   ^foobar\n * </codeBlock>                               </codeBlock>\n * <paragraph>text</paragraph>         ->     <paragraph>text</paragraph>\n * <codeBlock>                                <codeBlock>\n *     baz]qux                                   ^bazqux\n * </codeBlock>                               </codeBlock>\n * ```\n *\n * **Note:** The positions are in reverse order so they do not get outdated when iterating over them and\n * the writer inserts or removes elements at the same time.\n *\n * **Note:** The position is located after the leading white spaces in the text node.\n *\n * @internal\n */\nexport function getIndentOutdentPositions( model: Model ): Array<ModelPosition> {\n\tconst selection = model.document.selection;\n\tconst positions: Array<ModelPosition> = [];\n\n\t// When the selection is collapsed, there's only one position we can indent or outdent.\n\tif ( selection.isCollapsed ) {\n\t\treturn [ selection.anchor! ];\n\t}\n\n\t// When the selection is NOT collapsed, collect all positions starting before text nodes\n\t// (code lines) in any <codeBlock> within the selection.\n\n\t// Walk backward so positions we are about to collect here do not get outdated when\n\t// inserting or deleting using the writer.\n\n\tconst walker = selection.getFirstRange()!.getWalker( {\n\t\tignoreElementEnd: true,\n\t\tdirection: 'backward'\n\t} );\n\n\tfor ( const { item } of walker ) {\n\t\tlet node = item.is( '$textProxy' ) ? item.textNode : item;\n\t\tconst parent = node.parent;\n\n\t\tif ( !parent!.is( 'element', 'codeBlock' ) || node.is( 'element', 'softBreak' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// For each item in code block, move backwards until the beginning of the line it is in is found.\n\t\twhile ( node.previousSibling && !node.previousSibling.is( 'element', 'softBreak' ) ) {\n\t\t\tnode = node.previousSibling;\n\t\t}\n\n\t\t// Take the leading white spaces into account (only for text nodes).\n\t\tconst startOffset = !node.is( '$text' ) ? node.startOffset! : node.startOffset! + getLeadingWhiteSpaces( node ).length;\n\t\tconst position = model.createPositionAt( parent, startOffset );\n\n\t\t// Do not add the same position twice. Unfortunately using set doesn't deduplicate positions because\n\t\t// they are different objects.\n\t\tif ( positions.every( pos => !pos.isEqual( position ) ) ) {\n\t\t\tpositions.push( position );\n\t\t}\n\t}\n\n\treturn positions;\n}\n\n/**\n * Checks if any of the blocks within the model selection is a code block.\n *\n * @internal\n */\nexport function isModelSelectionInCodeBlock( selection: ModelDocumentSelection ): boolean {\n\tconst firstBlock = first( selection.getSelectedBlocks() );\n\n\treturn !!firstBlock && firstBlock.is( 'element', 'codeBlock' );\n}\n\n/**\n * Checks if an {@link module:engine/model/element~ModelElement Element} can become a code block.\n *\n * @param schema Model's schema.\n * @param element The element to be checked.\n * @returns Check result.\n * @internal\n */\nexport function canBeCodeBlock( schema: ModelSchema, element: ModelElement ): boolean {\n\tif ( element.is( 'rootElement' ) || schema.isLimit( element ) ) {\n\t\treturn false;\n\t}\n\n\treturn schema.checkChild( element.parent as ModelElement, 'codeBlock' );\n}\n\n/**\n * Get the translated message read by the screen reader when you enter or exit an element with your cursor.\n *\n * @internal\n */\nexport function getCodeBlockAriaAnnouncement(\n\tt: LocaleTranslate,\n\tlanguageDefs: Array<CodeBlockLanguageDefinition>,\n\telement: ModelElement,\n\tdirection: 'enter' | 'leave'\n): string {\n\tconst languagesToLabels = getPropertyAssociation( languageDefs, 'language', 'label' );\n\tconst codeBlockLanguage = element.getAttribute( 'language' ) as string;\n\n\tif ( codeBlockLanguage in languagesToLabels ) {\n\t\tconst language = languagesToLabels[ codeBlockLanguage ];\n\n\t\tif ( direction === 'enter' ) {\n\t\t\treturn t( 'Entering %0 code snippet', language );\n\t\t}\n\n\t\treturn t( 'Leaving %0 code snippet', language );\n\t}\n\n\tif ( direction === 'enter' ) {\n\t\treturn t( 'Entering code snippet' );\n\t}\n\n\treturn t( 'Leaving code snippet' );\n}\n\n/**\n * For given position, finds the closest position that is at the beginning of a line of code and returns a text node that is at the\n * beginning of the line (or `null` if there's no text node at the beginning of a given line).\n *\n * Line beings at the start of a code block element and after each `softBreak` element.\n *\n * Note: even though code block doesn't allow inline elements other than `<softBreak>` by default, some features may overwrite this rule,\n * so such inline elements are taken into account.\n *\n * Some examples of expected results:\n *\n * ```\n * <codeBlock>^</codeBlock>                                ->   null\n * <codeBlock>^foobar</codeBlock>                          ->   <codeBlock>[foobar]</codeBlock>\n * <codeBlock>foobar^</codeBlock>                          ->   <codeBlock>[foobar]</codeBlock>\n * <codeBlock>foo^bar</codeBlock>                          ->   <codeBlock>[foobar]</codeBlock>\n * <codeBlock>foo^<softBreak />bar</codeBlock>             ->   <codeBlock>[foo]<softBreak />bar</codeBlock>\n * <codeBlock>foo<softBreak />bar^</codeBlock>             ->   <codeBlock>foo<softBreak />[bar]</codeBlock>\n * <codeBlock>foo<softBreak />b^ar</codeBlock>             ->   <codeBlock>foo<softBreak />[bar]</codeBlock>\n * <codeBlock>foo<softBreak />^bar</codeBlock>             ->   <codeBlock>foo<softBreak />[bar]</codeBlock>\n * <codeBlock>^<element /></codeBlock>                     ->   null\n * <codeBlock><element />^</codeBlock>                     ->   null\n * <codeBlock>foo^<element /></codeBlock>                  ->   <codeBlock>[foo]<element /></codeBlock>\n * <codeBlock>foo<element />^</codeBlock>                  ->   <codeBlock>[foo]<element /></codeBlock>\n * <codeBlock>foo<element />bar^</codeBlock>               ->   <codeBlock>[foo]<element />bar</codeBlock>\n * <codeBlock><element />bar^</codeBlock>                  ->   null\n * <codeBlock>foo<softBreak />^<softBreak /></codeBlock>   ->   null\n * <codeBlock>foo<softBreak />^<element /></codeBlock>     ->   null\n * <codeBlock>foo<softBreak /><element />^</codeBlock>     ->   null\n * <codeBlock>foo<softBreak />bar<element />^</codeBlock>  ->   <codeBlock>foo<softBreak />[bar]<element /></codeBlock>\n * <codeBlock>foo<softBreak /><element />ba^r</codeBlock>  ->   null\n * ```\n *\n * @internal\n */\nexport function getTextNodeAtLineStart( position: ModelPosition, model: Model ): ModelText | null {\n\t// First, move position before a text node, if it is inside a text node.\n\tif ( position.textNode ) {\n\t\tposition = model.createPositionBefore( position.textNode );\n\t}\n\n\t// Then, jump-back the position until it is before a `softBreak` or at the beginning of the `codeBlock`.\n\twhile ( position.nodeBefore && !position.nodeBefore.is( 'element', 'softBreak' ) ) {\n\t\tposition = model.createPositionBefore( position.nodeBefore );\n\t}\n\n\t// Now, the position is at the beginning of a line.\n\t// Return a text node after the position, if there is one.\n\tconst nodeAtStart = position.nodeAfter;\n\n\treturn nodeAtStart && nodeAtStart.is( '$text' ) ? nodeAtStart : null;\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/**\n * @module code-block/codeblockcommand\n */\n\nimport type { ModelElement, ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\nimport { getNormalizedAndLocalizedLanguageDefinitions, canBeCodeBlock } from './utils.js';\n\n/**\n * The code block command plugin.\n */\nexport class CodeBlockCommand extends Command {\n\t/**\n\t * Contains the last used language.\n\t */\n\tprivate _lastLanguage: string | null;\n\n\t/**\n\t * Contains language if any is selected, false otherwise.\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: string | false;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._lastLanguage = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the command. When the command {@link #value is on}, all topmost code blocks within\n\t * the selection will be removed. If it is off, all selected blocks will be flattened and\n\t * wrapped by a code block.\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.language The code block language.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a code block,\n\t * otherwise the command will remove the code block. If not set, the command will act basing on its current value.\n\t * @param options.usePreviousLanguageChoice If set on `true` and the `options.language` is not specified, the command\n\t * will apply the previous language (if the command was already executed) when inserting the `codeBlock` element.\n\t */\n\tpublic override execute( options: {\n\t\tlanguage?: string;\n\t\tforceValue?: boolean;\n\t\tusePreviousLanguageChoice?: boolean;\n\t} = {} ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst normalizedLanguagesDefs = getNormalizedAndLocalizedLanguageDefinitions( editor );\n\t\tconst firstLanguageInConfig = normalizedLanguagesDefs[ 0 ];\n\n\t\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\t\tconst value = options.forceValue == undefined ? !this.value : options.forceValue;\n\t\tconst language = getLanguage( options, this._lastLanguage, firstLanguageInConfig.language );\n\n\t\tmodel.change( writer => {\n\t\t\tif ( value ) {\n\t\t\t\tthis._applyCodeBlock( writer, blocks, language );\n\t\t\t} else {\n\t\t\t\tthis._removeCodeBlock( writer, blocks );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue(): string | false {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst firstBlock = first( selection.getSelectedBlocks() );\n\t\tconst isCodeBlock = !!firstBlock?.is( 'element', 'codeBlock' );\n\n\t\treturn isCodeBlock ? firstBlock.getAttribute( 'language' ) as string : false;\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled(): boolean {\n\t\tif ( this.value ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst schema = this.editor.model.schema;\n\n\t\tconst firstBlock = first( selection.getSelectedBlocks() );\n\n\t\tif ( !firstBlock ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn canBeCodeBlock( schema, firstBlock );\n\t}\n\n\tprivate _applyCodeBlock( writer: ModelWriter, blocks: Array<ModelElement>, language: string ): void {\n\t\tthis._lastLanguage = language;\n\n\t\tconst schema = this.editor.model.schema;\n\t\tconst allowedBlocks = blocks.filter( block => canBeCodeBlock( schema, block ) );\n\n\t\tfor ( const block of allowedBlocks ) {\n\t\t\twriter.rename( block, 'codeBlock' );\n\t\t\twriter.setAttribute( 'language', language, block );\n\t\t\tschema.removeDisallowedAttributes( [ block ], writer );\n\n\t\t\t// Remove children of the  `codeBlock` element that are not allowed. See https://github.com/ckeditor/ckeditor5/issues/9567.\n\t\t\tArray.from( block.getChildren() )\n\t\t\t\t.filter( child => !schema.checkChild( block, child ) )\n\t\t\t\t.forEach( child => writer.remove( child ) );\n\t\t}\n\n\t\tallowedBlocks.reverse().forEach( ( currentBlock, i ) => {\n\t\t\tconst nextBlock = allowedBlocks[ i + 1 ];\n\n\t\t\tif ( currentBlock.previousSibling === nextBlock ) {\n\t\t\t\twriter.appendElement( 'softBreak', nextBlock );\n\t\t\t\twriter.merge( writer.createPositionBefore( currentBlock ) );\n\t\t\t}\n\t\t} );\n\t}\n\n\tprivate _removeCodeBlock( writer: ModelWriter, blocks: Array<ModelElement> ): void {\n\t\tconst codeBlocks = blocks.filter( block => block.is( 'element', 'codeBlock' ) );\n\n\t\tfor ( const block of codeBlocks ) {\n\t\t\tconst range = writer.createRangeOn( block );\n\n\t\t\tfor ( const item of Array.from( range.getItems() ).reverse() ) {\n\t\t\t\tif ( item.is( 'element', 'softBreak' ) && item.parent!.is( 'element', 'codeBlock' ) ) {\n\t\t\t\t\tconst { position } = writer.split( writer.createPositionBefore( item ) );\n\t\t\t\t\tconst elementAfter = position.nodeAfter as ModelElement;\n\n\t\t\t\t\twriter.rename( elementAfter, 'paragraph' );\n\t\t\t\t\twriter.removeAttribute( 'language', elementAfter );\n\t\t\t\t\twriter.remove( item );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twriter.rename( block, 'paragraph' );\n\t\t\twriter.removeAttribute( 'language', block );\n\t\t}\n\t}\n}\n\n/**\n * Picks the language for the new code block. If any language is passed as an option,\n * it will be returned. Else, if option usePreviousLanguageChoice is true and some\n * code block was already created (lastLanguage is not null) then previously used\n * language will be returned. If not, it will return default language.\n */\nfunction getLanguage(\n\toptions: { usePreviousLanguageChoice?: boolean; language?: string },\n\tlastLanguage: string | null,\n\tdefaultLanguage: string\n): string {\n\tif ( options.language ) {\n\t\treturn options.language;\n\t}\n\n\tif ( options.usePreviousLanguageChoice && lastLanguage ) {\n\t\treturn lastLanguage;\n\t}\n\n\treturn defaultLanguage;\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/**\n * @module code-block/indentcodeblockcommand\n */\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tgetIndentOutdentPositions,\n\tisModelSelectionInCodeBlock\n} from './utils.js';\n\n/**\n * The code block indentation increase command plugin.\n */\nexport class IndentCodeBlockCommand extends Command {\n\t/**\n\t * A sequence of characters added to the line when the command is executed.\n\t */\n\tprivate _indentSequence: string;\n\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._indentSequence = editor.config.get( 'codeBlock.indentSequence' )!;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the command. When the command {@link #isEnabled is enabled}, the indentation of the\n\t * code lines in the selection will be increased.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tmodel.change( writer => {\n\t\t\tconst positions = getIndentOutdentPositions( model );\n\n\t\t\t// Indent all positions, for instance assuming the indent sequence is 4x space (\"    \"):\n\t\t\t//\n\t\t\t//\t\t<codeBlock>^foo</codeBlock>        ->       <codeBlock>    foo</codeBlock>\n\t\t\t//\n\t\t\t//\t\t<codeBlock>foo^bar</codeBlock>     ->       <codeBlock>foo    bar</codeBlock>\n\t\t\t//\n\t\t\t// Also, when there is more than one position:\n\t\t\t//\n\t\t\t//\t\t<codeBlock>\n\t\t\t//\t\t\t^foobar\n\t\t\t//\t\t\t<softBreak></softBreak>\n\t\t\t//\t\t\t^bazqux\n\t\t\t//\t\t</codeBlock>\n\t\t\t//\n\t\t\t//\t\t->\n\t\t\t//\n\t\t\t//\t\t<codeBlock>\n\t\t\t//\t\t\t    foobar\n\t\t\t//\t\t\t<softBreak></softBreak>\n\t\t\t//\t\t\t    bazqux\n\t\t\t//\t\t</codeBlock>\n\t\t\t//\n\t\t\tfor ( const position of positions ) {\n\t\t\t\tconst indentSequenceTextElement = writer.createText( this._indentSequence );\n\n\t\t\t\t// Previously insertion was done by writer.insertText(). It was changed to insertContent() to enable\n\t\t\t\t// integration of code block with track changes. It's the easiest way of integration because insertContent()\n\t\t\t\t// is already integrated with track changes, but if it ever cause any troubles it can be reverted, however\n\t\t\t\t// some additional work will be required in track changes integration of code block.\n\t\t\t\tmodel.insertContent( indentSequenceTextElement, position );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t */\n\tprivate _checkEnabled(): boolean {\n\t\tif ( !this._indentSequence ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Indent (forward) command is always enabled when there's any code block in the selection\n\t\t// because you can always indent code lines.\n\t\treturn isModelSelectionInCodeBlock( this.editor.model.document.selection );\n\t}\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/**\n * @module code-block/outdentcodeblockcommand\n */\n\nimport type { Model, ModelPosition, ModelRange } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tgetLeadingWhiteSpaces,\n\tgetIndentOutdentPositions,\n\tisModelSelectionInCodeBlock,\n\tgetTextNodeAtLineStart\n} from './utils.js';\n\n/**\n * The code block indentation decrease command plugin.\n */\nexport class OutdentCodeBlockCommand extends Command {\n\t/**\n\t * A sequence of characters removed from the line when the command is executed.\n\t */\n\tprivate readonly _indentSequence: string;\n\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._indentSequence = editor.config.get( 'codeBlock.indentSequence' )!;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the command. When the command {@link #isEnabled is enabled}, the indentation of the\n\t * code lines in the selection will be decreased.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tmodel.change( () => {\n\t\t\tconst positions = getIndentOutdentPositions( model );\n\n\t\t\t// Outdent all positions, for instance assuming the indent sequence is 4x space (\"    \"):\n\t\t\t//\n\t\t\t//\t\t<codeBlock>^foo</codeBlock>         ->       <codeBlock>foo</codeBlock>\n\t\t\t//\n\t\t\t//\t\t<codeBlock>    ^bar</codeBlock>     ->       <codeBlock>bar</codeBlock>\n\t\t\t//\n\t\t\t// Also, when there is more than one position:\n\t\t\t//\n\t\t\t//\t\t<codeBlock>\n\t\t\t//\t\t\t    ^foobar\n\t\t\t//\t\t\t<softBreak></softBreak>\n\t\t\t//\t\t\t    ^bazqux\n\t\t\t//\t\t</codeBlock>\n\t\t\t//\n\t\t\t//\t\t->\n\t\t\t//\n\t\t\t//\t\t<codeBlock>\n\t\t\t//\t\t\tfoobar\n\t\t\t//\t\t\t<softBreak></softBreak>\n\t\t\t//\t\t\tbazqux\n\t\t\t//\t\t</codeBlock>\n\t\t\tfor ( const position of positions ) {\n\t\t\t\tconst range = getLastOutdentableSequenceRange( model, position, this._indentSequence );\n\n\t\t\t\tif ( range ) {\n\t\t\t\t\t// Previously deletion was done by writer.remove(). It was changed to deleteContent() to enable\n\t\t\t\t\t// integration of code block with track changes. It's the easiest way of integration because deleteContent()\n\t\t\t\t\t// is already integrated with track changes, but if it ever cause any troubles it can be reverted, however\n\t\t\t\t\t// some additional work will be required in track changes integration of code block.\n\t\t\t\t\tmodel.deleteContent( model.createSelection( range ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @private\n\t * @returns {Boolean} Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled(): boolean {\n\t\tif ( !this._indentSequence ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst model = this.editor.model;\n\n\t\tif ( !isModelSelectionInCodeBlock( model.document.selection ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Outdent command can execute only when there is an indent character sequence\n\t\t// in some of the lines.\n\t\treturn getIndentOutdentPositions( model ).some( position => {\n\t\t\treturn getLastOutdentableSequenceRange( model, position, this._indentSequence );\n\t\t} );\n\t}\n}\n\n// For a position coming from `getIndentOutdentPositions()`, it returns the range representing\n// the last occurrence of the indent sequence among the leading whitespaces of the code line the\n// position represents.\n//\n// For instance, assuming the indent sequence is 4x space (\"    \"):\n//\n//\t\t<codeBlock>foo^</codeBlock>                                 ->          null\n//\t\t<codeBlock>foo^<softBreak></softBreak>bar</codeBlock>       ->          null\n//\t\t<codeBlock>  ^foo</codeBlock>                               ->          null\n//\t\t<codeBlock>        ^foo</codeBlock>                         ->          <codeBlock>    [    ]foo</codeBlock>\n//\t\t<codeBlock>    ^foo    bar</codeBlock>                      ->          <codeBlock>[    ]foo    bar</codeBlock>\n//\n// @param {<module:engine/model/model~Model>} model\n// @param {<module:engine/model/position~ModelPosition>} position\n// @param {String} sequence\n// @returns {<module:engine/model/range~ModelRange>|null}\nfunction getLastOutdentableSequenceRange( model: Model, position: ModelPosition, sequence: string ): ModelRange | null {\n\t// Positions start before each text node (code line). Get the node corresponding to the position.\n\tconst nodeAtPosition = getTextNodeAtLineStart( position, model );\n\n\tif ( !nodeAtPosition ) {\n\t\treturn null;\n\t}\n\n\tconst leadingWhiteSpaces = getLeadingWhiteSpaces( nodeAtPosition );\n\tconst lastIndexOfSequence = leadingWhiteSpaces.lastIndexOf( sequence );\n\n\t// For instance, assuming the indent sequence is 4x space (\"    \"):\n\t//\n\t//\t\t<codeBlock>    \t^foo</codeBlock>           ->             null\n\t//\n\tif ( lastIndexOfSequence + sequence.length !== leadingWhiteSpaces.length ) {\n\t\treturn null;\n\t}\n\n\t// For instance, assuming the indent sequence is 4x space (\"    \"):\n\t//\n\t//\t\t<codeBlock>  ^foo</codeBlock>           ->             null\n\t//\n\tif ( lastIndexOfSequence === -1 ) {\n\t\treturn null;\n\t}\n\n\tconst { parent, startOffset } = nodeAtPosition;\n\n\t// Create a range that contains the **last** indent sequence among the leading whitespaces\n\t// of the line.\n\t//\n\t// For instance, assuming the indent sequence is 4x space (\"    \"):\n\t//\n\t//\t\t<codeBlock>        ^foo</codeBlock>      ->     <codeBlock>    [    ]foo</codeBlock>\n\t//\n\treturn model.createRange(\n\t\tmodel.createPositionAt( parent!, startOffset! + lastIndexOfSequence ),\n\t\tmodel.createPositionAt( parent!, startOffset! + lastIndexOfSequence + sequence.length )\n\t);\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/**\n * @module code-block/converters\n */\n\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\nimport type {\n\tDowncastInsertEvent,\n\tModelElement,\n\tModel,\n\tUpcastElementEvent,\n\tUpcastTextEvent,\n\tEditingView\n} from '@ckeditor/ckeditor5-engine';\nimport type { CodeBlockLanguageDefinition } from './codeblockconfig.js';\nimport { getPropertyAssociation } from './utils.js';\n\n/**\n * A model-to-view (both editing and data) converter for the `codeBlock` element.\n *\n * Sample input:\n *\n * ```html\n * <codeBlock language=\"javascript\">foo();<softBreak></softBreak>bar();</codeBlock>\n * ```\n *\n * Sample output (editing):\n *\n * ```html\n * <pre data-language=\"JavaScript\"><code class=\"language-javascript\">foo();<br />bar();</code></pre>\n * ```\n *\n * Sample output (data, see {@link module:code-block/converters~modelToDataViewSoftBreakInsertion}):\n *\n * ```html\n * <pre><code class=\"language-javascript\">foo();\\nbar();</code></pre>\n * ```\n *\n * @param languageDefs The normalized language configuration passed to the feature.\n * @param useLabels When `true`, the `<pre>` element will get a `data-language` attribute with a\n * human–readable label of the language. Used only in the editing.\n * @returns Returns a conversion callback.\n * @internal\n */\nexport function modelToViewCodeBlockInsertion(\n\tmodel: Model,\n\tlanguageDefs: Array<CodeBlockLanguageDefinition>,\n\tuseLabels: boolean = false\n): GetCallback<DowncastInsertEvent> {\n\t// Language CSS classes:\n\t//\n\t//\t\t{\n\t//\t\t\tphp: 'language-php',\n\t//\t\t\tpython: 'language-python',\n\t//\t\t\tjavascript: 'js',\n\t//\t\t\t...\n\t//\t\t}\n\tconst languagesToClasses = getPropertyAssociation( languageDefs, 'language', 'class' );\n\n\t// Language labels:\n\t//\n\t//\t\t{\n\t//\t\t\tphp: 'PHP',\n\t//\t\t\tpython: 'Python',\n\t//\t\t\tjavascript: 'JavaScript',\n\t//\t\t\t...\n\t//\t\t}\n\tconst languagesToLabels = getPropertyAssociation( languageDefs, 'language', 'label' );\n\n\treturn ( evt, data, conversionApi ): void => {\n\t\tconst { writer, mapper, consumable } = conversionApi;\n\n\t\tif ( !consumable.consume( data.item, 'insert' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst codeBlockLanguage = data.item.getAttribute( 'language' ) as string;\n\t\tconst targetViewPosition = mapper.toViewPosition( model.createPositionBefore( data.item ) );\n\t\tconst preAttributes: Record<string, string> = {};\n\n\t\t// Attributes added only in the editing view.\n\t\tif ( useLabels ) {\n\t\t\tpreAttributes[ 'data-language' ] = languagesToLabels[ codeBlockLanguage ];\n\t\t\tpreAttributes.spellcheck = 'false';\n\t\t}\n\n\t\tconst codeAttributes = languagesToClasses[ codeBlockLanguage ] ? {\n\t\t\tclass: languagesToClasses[ codeBlockLanguage ]\n\t\t} : undefined;\n\t\tconst code = writer.createContainerElement( 'code', codeAttributes );\n\n\t\tconst pre = writer.createContainerElement( 'pre', preAttributes, code );\n\n\t\twriter.insert( targetViewPosition, pre );\n\n\t\tmapper.bindElements( data.item as ModelElement, code );\n\t};\n}\n\n/**\n * A model-to-data view converter for the new line (`softBreak`) separator.\n *\n * Sample input:\n *\n * ```html\n * <codeBlock ...>foo();<softBreak></softBreak>bar();</codeBlock>\n * ```\n *\n * Sample output:\n *\n * ```html\n * <pre><code ...>foo();\\nbar();</code></pre>\n * ```\n *\n * @returns Returns a conversion callback.\n * @internal\n */\nexport function modelToDataViewSoftBreakInsertion( model: Model ): GetCallback<DowncastInsertEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( data.item.parent!.name !== 'codeBlock' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { writer, mapper, consumable } = conversionApi;\n\n\t\tif ( !consumable.consume( data.item, 'insert' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst position = mapper.toViewPosition( model.createPositionBefore( data.item ) );\n\n\t\twriter.insert( position, writer.createText( '\\n' ) );\n\t};\n}\n\n/**\n * A view-to-model converter for `<pre>` with the `<code>` HTML.\n *\n * Sample input:\n *\n * ```html\n * <pre><code class=\"language-javascript\">foo();bar();</code></pre>\n * ```\n *\n * Sample output:\n *\n * ```html\n * <codeBlock language=\"javascript\">foo();bar();</codeBlock>\n * ```\n *\n * @param languageDefs The normalized language configuration passed to the feature.\n * @returns Returns a conversion callback.\n * @internal\n */\nexport function dataViewToModelCodeBlockInsertion(\n\teditingView: EditingView,\n\tlanguageDefs: Array<CodeBlockLanguageDefinition>\n): GetCallback<UpcastElementEvent> {\n\t// Language names associated with CSS classes:\n\t//\n\t//\t\t{\n\t//\t\t\t'language-php': 'php',\n\t//\t\t\t'language-python': 'python',\n\t//\t\t\tjs: 'javascript',\n\t//\t\t\t...\n\t//\t\t}\n\tconst classesToLanguages = getPropertyAssociation( languageDefs, 'class', 'language' );\n\tconst defaultLanguageName = languageDefs[ 0 ].language;\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst viewCodeElement = data.viewItem;\n\t\tconst viewPreElement = viewCodeElement.parent;\n\n\t\tif ( !viewPreElement || !viewPreElement.is( 'element', 'pre' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In case of nested code blocks we don't want to convert to another code block.\n\t\tif ( data.modelCursor.findAncestor( 'codeBlock' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { consumable, writer } = conversionApi;\n\n\t\tif ( !consumable.test( viewCodeElement, { name: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst codeBlock = writer.createElement( 'codeBlock' );\n\t\tconst viewChildClasses = [ ...viewCodeElement.getClassNames() ];\n\n\t\t// As we're to associate each class with a model language, a lack of class (empty class) can be\n\t\t// also associated with a language if the language definition was configured so. Pushing an empty\n\t\t// string to make sure the association will work.\n\t\tif ( !viewChildClasses.length ) {\n\t\t\tviewChildClasses.push( '' );\n\t\t}\n\n\t\t// Figure out if any of the <code> element's class names is a valid programming\n\t\t// language class. If so, use it on the model element (becomes the language of the entire block).\n\t\tfor ( const className of viewChildClasses ) {\n\t\t\tconst language = classesToLanguages[ className ];\n\n\t\t\tif ( language ) {\n\t\t\t\tconsumable.consume( viewCodeElement, { classes: [ className ] } );\n\t\t\t\twriter.setAttribute( 'language', language, codeBlock );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If no language value was set, use the default language from the config.\n\t\tif ( !codeBlock.hasAttribute( 'language' ) ) {\n\t\t\twriter.setAttribute( 'language', defaultLanguageName, codeBlock );\n\t\t}\n\n\t\t// Convert children before inserting the code block element\n\t\t// to make sure that code block won't be splitted by any block.\n\t\tconversionApi.convertChildren( viewCodeElement, codeBlock );\n\n\t\t// Let's try to insert code block.\n\t\tif ( !conversionApi.safeInsert( codeBlock, data.modelCursor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconsumable.consume( viewCodeElement, { name: true } );\n\n\t\tconversionApi.updateConversionResult( codeBlock, data );\n\t};\n}\n\n/**\n * A view-to-model converter for new line characters in `<pre>`.\n *\n * Sample input:\n *\n * ```html\n * <pre><code class=\"language-javascript\">foo();\\nbar();</code></pre>\n * ```\n *\n * Sample output:\n *\n * ```html\n * <codeBlock language=\"javascript\">foo();<softBreak></softBreak>bar();</codeBlock>\n * ```\n *\n * @returns {Function} Returns a conversion callback.\n * @internal\n */\nexport function dataViewToModelTextNewlinesInsertion(): GetCallback<UpcastTextEvent> {\n\treturn ( evt, data, { consumable, writer } ) => {\n\t\tlet position = data.modelCursor;\n\n\t\t// When node is already converted then do nothing.\n\t\tif ( !consumable.test( data.viewItem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When not inside `codeBlock` then do nothing.\n\t\tif ( !position.findAncestor( 'codeBlock' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconsumable.consume( data.viewItem );\n\n\t\tconst text = data.viewItem.data;\n\t\tconst textLines = text.split( '\\n' ).map( data => writer.createText( data ) );\n\t\tconst lastLine = textLines[ textLines.length - 1 ];\n\n\t\tfor ( const node of textLines ) {\n\t\t\twriter.insert( node, position );\n\t\t\tposition = position.getShiftedBy( node.offsetSize );\n\n\t\t\tif ( node !== lastLine ) {\n\t\t\t\tconst softBreak = writer.createElement( 'softBreak' );\n\n\t\t\t\twriter.insert( softBreak, position );\n\t\t\t\tposition = writer.createPositionAfter( softBreak );\n\t\t\t}\n\t\t}\n\n\t\tdata.modelRange = writer.createRange(\n\t\t\tdata.modelCursor,\n\t\t\tposition\n\t\t);\n\t\tdata.modelCursor = position;\n\t};\n}\n\n/**\n * A view-to-model converter that handles orphan text nodes (white spaces, new lines, etc.)\n * that surround `<code>` inside `<pre>`.\n *\n * Sample input:\n *\n * ```html\n * // White spaces\n * <pre> <code>foo()</code> </pre>\n *\n * // White spaces\n * <pre>      <code>foo()</code>      </pre>\n *\n * // White spaces\n * <pre>\t\t\t<code>foo()</code>\t\t\t</pre>\n *\n * // New lines\n * <pre>\n * \t<code>foo()</code>\n * </pre>\n *\n * // Redundant text\n * <pre>ABC<code>foo()</code>DEF</pre>\n * ```\n *\n * Unified output for each case:\n *\n * ```html\n * <codeBlock language=\"plaintext\">foo()</codeBlock>\n * ```\n *\n * @returns Returns a conversion callback.\n * @internal\n */\nexport function dataViewToModelOrphanNodeConsumer(): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, { consumable } ) => {\n\t\tconst preElement = data.viewItem;\n\n\t\t// Don't clean up nested pre elements. Their content should stay as it is, they are not upcasted\n\t\t// to code blocks.\n\t\tif ( preElement.findAncestor( 'pre' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst preChildren = Array.from( preElement.getChildren() );\n\t\tconst childCodeElement = preChildren.find( node => node.is( 'element', 'code' ) );\n\n\t\t// <code>-less <pre>. It will not upcast to code block in the model, skipping.\n\t\tif ( !childCodeElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const child of preChildren ) {\n\t\t\tif ( child === childCodeElement || !child.is( '$text' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Consuming the orphan to remove it from the input data.\n\t\t\t// Second argument in `consumable.consume` is discarded for text nodes.\n\t\t\tconsumable.consume( child, { name: true } );\n\t\t}\n\t};\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/**\n * @module code-block/codeblockediting\n */\n\nimport { Plugin, type Editor, type MultiCommand, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ShiftEnter, type ViewDocumentEnterEvent } from '@ckeditor/ckeditor5-enter';\n\nimport {\n\tViewUpcastWriter,\n\ttype ModelRange,\n\ttype ModelNode,\n\ttype ModelGetSelectedContentEvent,\n\ttype ViewDocumentTabEvent,\n\ttype DowncastInsertEvent,\n\ttype UpcastElementEvent,\n\ttype UpcastTextEvent,\n\ttype ModelElement,\n\ttype ModelSelectionChangeRangeEvent\n} from '@ckeditor/ckeditor5-engine';\nimport {\n\tClipboardPipeline,\n\ttype ViewDocumentClipboardInputEvent,\n\ttype ClipboardContentInsertionEvent\n} from '@ckeditor/ckeditor5-clipboard';\n\nimport { CodeBlockCommand } from './codeblockcommand.js';\nimport { IndentCodeBlockCommand } from './indentcodeblockcommand.js';\nimport { OutdentCodeBlockCommand } from './outdentcodeblockcommand.js';\nimport {\n\tgetNormalizedAndLocalizedLanguageDefinitions,\n\tgetLeadingWhiteSpaces,\n\trawSnippetTextToViewDocumentFragment,\n\tgetCodeBlockAriaAnnouncement,\n\tgetTextNodeAtLineStart\n} from './utils.js';\nimport {\n\tmodelToViewCodeBlockInsertion,\n\tmodelToDataViewSoftBreakInsertion,\n\tdataViewToModelCodeBlockInsertion,\n\tdataViewToModelTextNewlinesInsertion,\n\tdataViewToModelOrphanNodeConsumer\n} from './converters.js';\n\nconst DEFAULT_ELEMENT = 'paragraph';\n\n/**\n * The editing part of the code block feature.\n *\n * Introduces the `'codeBlock'` command and the `'codeBlock'` model element.\n */\nexport class CodeBlockEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'CodeBlockEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ShiftEnter ]> {\n\t\treturn [ ShiftEnter ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'codeBlock', {\n\t\t\tlanguages: [\n\t\t\t\t{ language: 'plaintext', label: 'Plain text' },\n\t\t\t\t{ language: 'c', label: 'C' },\n\t\t\t\t{ language: 'cs', label: 'C#' },\n\t\t\t\t{ language: 'cpp', label: 'C++' },\n\t\t\t\t{ language: 'css', label: 'CSS' },\n\t\t\t\t{ language: 'diff', label: 'Diff' },\n\t\t\t\t{ language: 'go', label: 'Go' },\n\t\t\t\t{ language: 'html', label: 'HTML' },\n\t\t\t\t{ language: 'java', label: 'Java' },\n\t\t\t\t{ language: 'javascript', label: 'JavaScript' },\n\t\t\t\t{ language: 'php', label: 'PHP' },\n\t\t\t\t{ language: 'python', label: 'Python' },\n\t\t\t\t{ language: 'ruby', label: 'Ruby' },\n\t\t\t\t{ language: 'typescript', label: 'TypeScript' },\n\t\t\t\t{ language: 'xml', label: 'XML' }\n\t\t\t],\n\n\t\t\t// A single tab.\n\t\t\tindentSequence: '\\t'\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\n\t\tconst normalizedLanguagesDefs = getNormalizedAndLocalizedLanguageDefinitions( editor );\n\n\t\t// The main command.\n\t\teditor.commands.add( 'codeBlock', new CodeBlockCommand( editor ) );\n\n\t\t// Commands that change the indentation.\n\t\teditor.commands.add( 'indentCodeBlock', new IndentCodeBlockCommand( editor ) );\n\t\teditor.commands.add( 'outdentCodeBlock', new OutdentCodeBlockCommand( editor ) );\n\n\t\tthis.listenTo<ViewDocumentTabEvent>( view.document, 'tab', ( evt, data ) => {\n\t\t\tconst commandName = data.shiftKey ? 'outdentCodeBlock' : 'indentCodeBlock';\n\t\t\tconst command: OutdentCodeBlockCommand | IndentCodeBlockCommand = editor.commands.get( commandName )!;\n\n\t\t\tif ( !command.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\teditor.execute( commandName );\n\n\t\t\tdata.stopPropagation();\n\t\t\tdata.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: 'pre' } );\n\n\t\tschema.register( 'codeBlock', {\n\t\t\tallowWhere: '$block',\n\t\t\tallowChildren: '$text',\n\t\t\t// Disallow `$inlineObject` and its derivatives like `inlineWidget` inside `codeBlock` to ensure that only text,\n\t\t\t// not other inline elements like inline images, are allowed. This maintains the semantic integrity of code blocks.\n\t\t\tdisallowChildren: '$inlineObject',\n\t\t\tallowAttributes: [ 'language' ],\n\t\t\tallowAttributesOf: '$listItem',\n\t\t\tisBlock: true\n\t\t} );\n\n\t\t// Disallow formatting attributes on `codeBlock` children.\n\t\tschema.addAttributeCheck( ( context, attributeName ) => {\n\t\t\tconst parent = context.getItem( context.length - 2 );\n\t\t\tconst isFormatting = schema.getAttributeProperties( attributeName ).isFormatting;\n\n\t\t\tif ( isFormatting && parent && parent.name == 'codeBlock' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\t// Conversion.\n\t\teditor.editing.downcastDispatcher.on<DowncastInsertEvent>(\n\t\t\t'insert:codeBlock',\n\t\t\tmodelToViewCodeBlockInsertion( model, normalizedLanguagesDefs, true )\n\t\t);\n\t\teditor.data.downcastDispatcher.on<DowncastInsertEvent>(\n\t\t\t'insert:codeBlock',\n\t\t\tmodelToViewCodeBlockInsertion( model, normalizedLanguagesDefs )\n\t\t);\n\t\teditor.data.downcastDispatcher.on<DowncastInsertEvent>(\n\t\t\t'insert:softBreak',\n\t\t\tmodelToDataViewSoftBreakInsertion( model ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\t\teditor.data.upcastDispatcher.on<UpcastElementEvent>(\n\t\t\t'element:code',\n\t\t\tdataViewToModelCodeBlockInsertion( view, normalizedLanguagesDefs )\n\t\t);\n\t\teditor.data.upcastDispatcher.on<UpcastTextEvent>( 'text', dataViewToModelTextNewlinesInsertion() );\n\t\teditor.data.upcastDispatcher.on<UpcastElementEvent>( 'element:pre', dataViewToModelOrphanNodeConsumer(), { priority: 'high' } );\n\n\t\t// Intercept the clipboard input (paste) when the selection is anchored in the code block and force the clipboard\n\t\t// data to be pasted as a single plain text. Otherwise, the code lines will split the code block and\n\t\t// \"spill out\" as separate paragraphs.\n\t\tthis.listenTo<ViewDocumentClipboardInputEvent>( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {\n\t\t\tlet insertionRange = model.createRange( model.document.selection.anchor! );\n\n\t\t\t// Use target ranges in case this is a drop.\n\t\t\tif ( data.targetRanges ) {\n\t\t\t\tinsertionRange = editor.editing.mapper.toModelRange( data.targetRanges[ 0 ] );\n\t\t\t}\n\n\t\t\tif ( !insertionRange.start.parent.is( 'element', 'codeBlock' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst text = data.dataTransfer.getData( 'text/plain' );\n\t\t\tconst writer = new ViewUpcastWriter( editor.editing.view.document );\n\n\t\t\t// Pass the view fragment to the default clipboardInput handler.\n\t\t\tdata.content = rawSnippetTextToViewDocumentFragment( writer, text );\n\t\t} );\n\n\t\tif ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t\t\t// Elements may have a plain textual representation (hence be present in the 'text/plain' data transfer),\n\t\t\t// but not be allowed in the code block.\n\t\t\t// Filter them out before inserting the content to the model.\n\t\t\teditor.plugins.get( ClipboardPipeline ).on<ClipboardContentInsertionEvent>( 'contentInsertion', ( evt, data ) => {\n\t\t\t\tconst model = editor.model;\n\t\t\t\tconst selection = model.document.selection;\n\n\t\t\t\tif ( !selection.anchor!.parent.is( 'element', 'codeBlock' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\tconst contentRange = writer.createRangeIn( data.content );\n\n\t\t\t\t\tfor ( const item of [ ...contentRange.getItems() ] ) {\n\t\t\t\t\t\t// Remove all nodes disallowed in the code block.\n\t\t\t\t\t\tif ( item.is( 'node' ) && !schema.checkChild( selection.anchor!, item ) ) {\n\t\t\t\t\t\t\twriter.remove( item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\t// Make sure multi–line selection is always wrapped in a code block when `getSelectedContent()`\n\t\t// is used (e.g. clipboard copy). Otherwise, only the raw text will be copied to the clipboard and,\n\t\t// upon next paste, this bare text will not be inserted as a code block, which is not the best UX.\n\t\t// Similarly, when the selection in a single line, the selected content should be an inline code\n\t\t// so it can be pasted later on and retain it's preformatted nature.\n\t\tthis.listenTo<ModelGetSelectedContentEvent>( model, 'getSelectedContent', ( evt, [ selection ] ) => {\n\t\t\tconst anchor = selection.anchor!;\n\n\t\t\tif ( selection.isCollapsed || !anchor.parent.is( 'element', 'codeBlock' ) || !anchor.hasSameParentAs( selection.focus! ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmodel.change( writer => {\n\t\t\t\tconst docFragment = evt.return!;\n\n\t\t\t\t// fo[o<softBreak></softBreak>b]ar  ->   <codeBlock language=\"...\">[o<softBreak></softBreak>b]<codeBlock>\n\t\t\t\tif (\n\t\t\t\t\tanchor.parent.is( 'element' ) &&\n\t\t\t\t\t( docFragment.childCount > 1 || selection.containsEntireContent( anchor.parent ) )\n\t\t\t\t) {\n\t\t\t\t\tconst codeBlock = writer.createElement( 'codeBlock', anchor.parent.getAttributes() );\n\t\t\t\t\twriter.append( docFragment, codeBlock );\n\n\t\t\t\t\tconst newDocumentFragment = writer.createDocumentFragment();\n\t\t\t\t\twriter.append( codeBlock, newDocumentFragment );\n\n\t\t\t\t\tevt.return = newDocumentFragment;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// \"f[oo]\"                          ->   <$text code=\"true\">oo</text>\n\t\t\t\tconst textNode = docFragment.getChild( 0 )!;\n\n\t\t\t\tif ( schema.checkAttribute( textNode, 'code' ) ) {\n\t\t\t\t\twriter.setAttribute( 'code', true, textNode );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst commands = editor.commands;\n\t\tconst indent = commands.get( 'indent' );\n\t\tconst outdent = commands.get( 'outdent' );\n\n\t\tif ( indent ) {\n\t\t\t// Priority is highest due to integration with `IndentList` command of `List` plugin.\n\t\t\t// If selection is in a code block we give priority to it. This way list item cannot be indented\n\t\t\t// but if we would give priority to indenting list item then user would have to indent list item\n\t\t\t// as much as possible and only then he could indent code block.\n\t\t\t( indent as MultiCommand ).registerChildCommand( commands.get( 'indentCodeBlock' )!, { priority: 'highest' } );\n\t\t}\n\n\t\tif ( outdent ) {\n\t\t\t( outdent as MultiCommand ).registerChildCommand( commands.get( 'outdentCodeBlock' )! );\n\t\t}\n\n\t\t// Customize the response to the <kbd>Enter</kbd> and <kbd>Shift</kbd>+<kbd>Enter</kbd>\n\t\t// key press when the selection is in the code block. Upon enter key press we can either\n\t\t// leave the block if it's \"two or three enters\" in a row or create a new code block line, preserving\n\t\t// previous line's indentation.\n\t\tthis.listenTo<ViewDocumentEnterEvent>( editor.editing.view.document, 'enter', ( evt, data ) => {\n\t\t\tconst positionParent = editor.model.document.selection.getLastPosition()!.parent;\n\n\t\t\tif ( !positionParent.is( 'element', 'codeBlock' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !leaveBlockStartOnEnter( editor, data.isSoft ) && !leaveBlockEndOnEnter( editor, data.isSoft ) ) {\n\t\t\t\tbreakLineOnEnter( editor );\n\t\t\t}\n\n\t\t\tdata.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: 'pre' } );\n\n\t\tthis._initAriaAnnouncements( );\n\t}\n\n\t/**\n\t * Observe when user enters or leaves code block and set proper aria value in global live announcer.\n\t * This allows screen readers to indicate when the user has entered and left the specified code block.\n\t *\n\t * @internal\n\t */\n\tprivate _initAriaAnnouncements( ) {\n\t\tconst { model, ui, t } = this.editor;\n\t\tconst languageDefs = getNormalizedAndLocalizedLanguageDefinitions( this.editor );\n\n\t\tlet lastFocusedCodeBlock: ModelElement | null = null;\n\n\t\tmodel.document.selection.on<ModelSelectionChangeRangeEvent>( 'change:range', () => {\n\t\t\tconst focusParent = model.document.selection.focus!.parent;\n\n\t\t\tif ( !ui || lastFocusedCodeBlock === focusParent || !focusParent.is( 'element' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( lastFocusedCodeBlock && lastFocusedCodeBlock.is( 'element', 'codeBlock' ) ) {\n\t\t\t\tui.ariaLiveAnnouncer.announce( getCodeBlockAriaAnnouncement( t, languageDefs, lastFocusedCodeBlock, 'leave' ) );\n\t\t\t}\n\n\t\t\tif ( focusParent.is( 'element', 'codeBlock' ) ) {\n\t\t\t\tui.ariaLiveAnnouncer.announce( getCodeBlockAriaAnnouncement( t, languageDefs, focusParent, 'enter' ) );\n\t\t\t}\n\n\t\t\tlastFocusedCodeBlock = focusParent;\n\t\t} );\n\t}\n}\n\n/**\n * Normally, when the Enter (or Shift+Enter) key is pressed, a soft line break is to be added to the\n * code block. Let's try to follow the indentation of the previous line when possible, for instance:\n *\n * ```html\n * // Before pressing enter (or shift enter)\n * <codeBlock>\n * \"    foo()\"[]                   // Indent of 4 spaces.\n * </codeBlock>\n *\n * // After pressing:\n * <codeBlock>\n * \"    foo()\"                 // Indent of 4 spaces.\n * <softBreak></softBreak>     // A new soft break created by pressing enter.\n * \"    \"[]                    // Retain the indent of 4 spaces.\n * </codeBlock>\n * ```\n */\nfunction breakLineOnEnter( editor: Editor ): void {\n\tconst model = editor.model;\n\tconst modelDoc = model.document;\n\t// Use last position as other mechanisms (e.g. condition deciding whether this function should be called) also check that.\n\tconst lastSelectionPosition = modelDoc.selection.getLastPosition()!;\n\tlet leadingWhiteSpaces: string | undefined;\n\n\tconst node = getTextNodeAtLineStart( lastSelectionPosition, model );\n\n\t// Figure out the indentation (white space chars) at the beginning of the line.\n\tif ( node && node.is( '$text' ) ) {\n\t\tleadingWhiteSpaces = getLeadingWhiteSpaces( node );\n\t}\n\n\t// Keeping everything in a change block for a single undo step.\n\teditor.model.change( writer => {\n\t\teditor.execute( 'shiftEnter' );\n\n\t\t// If the line before being broken in two had some indentation, let's retain it\n\t\t// in the new line.\n\t\tif ( leadingWhiteSpaces ) {\n\t\t\twriter.insertText( leadingWhiteSpaces, modelDoc.selection.anchor! );\n\t\t}\n\t} );\n}\n\n/**\n * Leave the code block when Enter (but NOT Shift+Enter) has been pressed twice at the beginning\n * of the code block:\n *\n * ```html\n * // Before:\n * <codeBlock>[]<softBreak></softBreak>foo</codeBlock>\n *\n * // After pressing:\n * <paragraph>[]</paragraph><codeBlock>foo</codeBlock>\n * ```\n *\n * @param isSoftEnter When `true`, enter was pressed along with <kbd>Shift</kbd>.\n * @returns `true` when selection left the block. `false` if stayed.\n */\nfunction leaveBlockStartOnEnter( editor: Editor, isSoftEnter: boolean ): boolean {\n\tconst model = editor.model;\n\tconst modelDoc = model.document;\n\tconst view = editor.editing.view;\n\tconst lastSelectionPosition = modelDoc.selection.getLastPosition()!;\n\tconst nodeAfter = lastSelectionPosition.nodeAfter;\n\n\tif ( isSoftEnter || !modelDoc.selection.isCollapsed || !lastSelectionPosition.isAtStart ) {\n\t\treturn false;\n\t}\n\n\tif ( !isSoftBreakNode( nodeAfter ) ) {\n\t\treturn false;\n\t}\n\n\t// We're doing everything in a single change block to have a single undo step.\n\teditor.model.change( writer => {\n\t\t// \"Clone\" the <codeBlock> in the standard way.\n\t\teditor.execute( 'enter' );\n\n\t\t// The cloned block exists now before the original code block.\n\t\tconst newBlock = modelDoc.selection.anchor!.parent.previousSibling! as ModelElement;\n\n\t\t// Make the cloned <codeBlock> a regular <paragraph> (with clean attributes, so no language).\n\t\twriter.rename( newBlock, DEFAULT_ELEMENT );\n\t\twriter.setSelection( newBlock, 'in' );\n\t\teditor.model.schema.removeDisallowedAttributes( [ newBlock ], writer );\n\n\t\t// Remove the <softBreak> that originally followed the selection position.\n\t\twriter.remove( nodeAfter! );\n\t} );\n\n\t// Eye candy.\n\tview.scrollToTheSelection();\n\n\treturn true;\n}\n\n/**\n * Leave the code block when Enter (but NOT Shift+Enter) has been pressed twice at the end\n * of the code block:\n *\n * ```html\n * // Before:\n * <codeBlock>foo[]</codeBlock>\n *\n * // After first press:\n * <codeBlock>foo<softBreak></softBreak>[]</codeBlock>\n *\n * // After second press:\n * <codeBlock>foo</codeBlock><paragraph>[]</paragraph>\n * ```\n *\n * @param isSoftEnter When `true`, enter was pressed along with <kbd>Shift</kbd>.\n * @returns `true` when selection left the block. `false` if stayed.\n */\nfunction leaveBlockEndOnEnter( editor: Editor, isSoftEnter: boolean ): boolean {\n\tconst model = editor.model;\n\tconst modelDoc = model.document;\n\tconst view = editor.editing.view;\n\tconst lastSelectionPosition = modelDoc.selection.getLastPosition()!;\n\tconst nodeBefore = lastSelectionPosition.nodeBefore;\n\n\tlet emptyLineRangeToRemoveOnEnter: ModelRange;\n\n\tif ( isSoftEnter || !modelDoc.selection.isCollapsed || !lastSelectionPosition.isAtEnd || !nodeBefore || !nodeBefore.previousSibling ) {\n\t\treturn false;\n\t}\n\n\t// When the position is directly preceded by two soft breaks\n\t//\n\t//\t\t<codeBlock>foo<softBreak></softBreak><softBreak></softBreak>[]</codeBlock>\n\t//\n\t// it creates the following range that will be cleaned up before leaving:\n\t//\n\t//\t\t<codeBlock>foo[<softBreak></softBreak><softBreak></softBreak>]</codeBlock>\n\t//\n\tif ( isSoftBreakNode( nodeBefore ) && isSoftBreakNode( nodeBefore.previousSibling ) ) {\n\t\temptyLineRangeToRemoveOnEnter = model.createRange(\n\t\t\tmodel.createPositionBefore( nodeBefore.previousSibling ), model.createPositionAfter( nodeBefore )\n\t\t);\n\t}\n\n\t// When there's some text before the position that is\n\t// preceded by two soft breaks and made purely of white–space characters\n\t//\n\t//\t\t<codeBlock>foo<softBreak></softBreak><softBreak></softBreak>    []</codeBlock>\n\t//\n\t// it creates the following range to clean up before leaving:\n\t//\n\t//\t\t<codeBlock>foo[<softBreak></softBreak><softBreak></softBreak>    ]</codeBlock>\n\t//\n\telse if (\n\t\tisEmptyishTextNode( nodeBefore ) &&\n\t\tisSoftBreakNode( nodeBefore.previousSibling ) &&\n\t\tisSoftBreakNode( nodeBefore.previousSibling.previousSibling )\n\t) {\n\t\temptyLineRangeToRemoveOnEnter = model.createRange(\n\t\t\tmodel.createPositionBefore( nodeBefore.previousSibling.previousSibling! ), model.createPositionAfter( nodeBefore )\n\t\t);\n\t}\n\n\t// When there's some text before the position that is made purely of white–space characters\n\t// and is preceded by some other text made purely of white–space characters\n\t//\n\t//\t\t<codeBlock>foo<softBreak></softBreak>    <softBreak></softBreak>    []</codeBlock>\n\t//\n\t// it creates the following range to clean up before leaving:\n\t//\n\t//\t\t<codeBlock>foo[<softBreak></softBreak>    <softBreak></softBreak>    ]</codeBlock>\n\t//\n\telse if (\n\t\tisEmptyishTextNode( nodeBefore ) &&\n\t\tisSoftBreakNode( nodeBefore.previousSibling ) &&\n\t\tisEmptyishTextNode( nodeBefore.previousSibling.previousSibling ) &&\n\t\tnodeBefore.previousSibling.previousSibling &&\n\t\tisSoftBreakNode( nodeBefore.previousSibling.previousSibling.previousSibling )\n\t) {\n\t\temptyLineRangeToRemoveOnEnter = model.createRange(\n\t\t\tmodel.createPositionBefore( nodeBefore.previousSibling.previousSibling.previousSibling! ),\n\t\t\tmodel.createPositionAfter( nodeBefore )\n\t\t);\n\t}\n\n\t// Not leaving the block in the following cases:\n\t//\n\t//\t\t<codeBlock>    []</codeBlock>\n\t//\t\t<codeBlock>  a []</codeBlock>\n\t//\t\t<codeBlock>foo<softBreak></softBreak>[]</codeBlock>\n\t//\t\t<codeBlock>foo<softBreak></softBreak><softBreak></softBreak>bar[]</codeBlock>\n\t//\t\t<codeBlock>foo<softBreak></softBreak><softBreak></softBreak> a []</codeBlock>\n\t//\n\telse {\n\t\treturn false;\n\t}\n\n\t// We're doing everything in a single change block to have a single undo step.\n\teditor.model.change( writer => {\n\t\t// Remove the last <softBreak>s and all white space characters that followed them.\n\t\twriter.remove( emptyLineRangeToRemoveOnEnter );\n\n\t\t// \"Clone\" the <codeBlock> in the standard way.\n\t\teditor.execute( 'enter' );\n\n\t\tconst newBlock = modelDoc.selection.anchor!.parent as ModelElement;\n\n\t\t// Make the cloned <codeBlock> a regular <paragraph> (with clean attributes, so no language).\n\t\twriter.rename( newBlock, DEFAULT_ELEMENT );\n\t\teditor.model.schema.removeDisallowedAttributes( [ newBlock ], writer );\n\t} );\n\n\t// Eye candy.\n\tview.scrollToTheSelection();\n\n\treturn true;\n}\n\nfunction isEmptyishTextNode( node: ModelNode | null ) {\n\treturn node && node.is( '$text' ) && !node.data.match( /\\S/ );\n}\n\nfunction isSoftBreakNode( node: ModelNode | null ) {\n\treturn node && node.is( 'element', 'softBreak' );\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/**\n * @module code-block/codeblockui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { Collection } from '@ckeditor/ckeditor5-utils';\nimport {\n\tUIModel,\n\tSplitButtonView,\n\tcreateDropdown,\n\taddListToDropdown,\n\tMenuBarMenuListItemButtonView,\n\tMenuBarMenuListView,\n\tMenuBarMenuView,\n\tMenuBarMenuListItemView,\n\ttype ListDropdownButtonDefinition\n} from '@ckeditor/ckeditor5-ui';\nimport { IconCodeBlock } from '@ckeditor/ckeditor5-icons';\n\nimport { getNormalizedAndLocalizedLanguageDefinitions } from './utils.js';\n\nimport type { CodeBlockLanguageDefinition } from './codeblockconfig.js';\nimport { type CodeBlockCommand } from './codeblockcommand.js';\n\n/**\n * The code block UI plugin.\n *\n * Introduces the `'codeBlock'` dropdown.\n */\nexport class CodeBlockUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'CodeBlockUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst componentFactory = editor.ui.componentFactory;\n\t\tconst normalizedLanguageDefs = getNormalizedAndLocalizedLanguageDefinitions( editor );\n\t\tconst itemDefinitions = this._getLanguageListItemDefinitions( normalizedLanguageDefs );\n\t\tconst command: CodeBlockCommand = editor.commands.get( 'codeBlock' )!;\n\n\t\tcomponentFactory.add( 'codeBlock', locale => {\n\t\t\tconst dropdownView = createDropdown( locale, SplitButtonView );\n\t\t\tconst splitButtonView = dropdownView.buttonView;\n\t\t\tconst accessibleLabel = t( 'Insert code block' );\n\n\t\t\tsplitButtonView.set( {\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ttooltip: true,\n\t\t\t\ticon: IconCodeBlock,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\tsplitButtonView.bind( 'isOn' ).to( command, 'value', value => !!value );\n\n\t\t\tsplitButtonView.on( 'execute', () => {\n\t\t\t\teditor.execute( 'codeBlock', {\n\t\t\t\t\tusePreviousLanguageChoice: true\n\t\t\t\t} );\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tdropdownView.on( 'execute', evt => {\n\t\t\t\teditor.execute( 'codeBlock', {\n\t\t\t\t\tlanguage: ( evt.source as any )._codeBlockLanguage,\n\t\t\t\t\tforceValue: true\n\t\t\t\t} );\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tdropdownView.class = 'ck-code-block-dropdown';\n\t\t\tdropdownView.bind( 'isEnabled' ).to( command );\n\n\t\t\taddListToDropdown( dropdownView, itemDefinitions, {\n\t\t\t\trole: 'menu',\n\t\t\t\tariaLabel: accessibleLabel\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\n\t\tcomponentFactory.add( 'menuBar:codeBlock', locale => {\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\trole: 'menuitem',\n\t\t\t\tlabel: t( 'Code block' ),\n\t\t\t\ticon: IconCodeBlock\n\t\t\t} );\n\n\t\t\tmenuView.bind( 'isEnabled' ).to( command );\n\n\t\t\tconst listView = new MenuBarMenuListView( locale );\n\n\t\t\tlistView.set( {\n\t\t\t\tariaLabel: t( 'Insert code block' )\n\t\t\t} );\n\n\t\t\tfor ( const definition of itemDefinitions ) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView( locale, menuView );\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView( locale );\n\n\t\t\t\tbuttonView.bind( ...Object.keys( definition.model ) as Array<keyof MenuBarMenuListItemButtonView> ).to( definition.model );\n\t\t\t\tbuttonView.set( {\n\t\t\t\t\tisToggleable: true,\n\t\t\t\t\trole: 'menuitemcheckbox'\n\t\t\t\t} );\n\n\t\t\t\tbuttonView.delegate( 'execute' ).to( menuView );\n\n\t\t\t\tbuttonView.on( 'execute', () => {\n\t\t\t\t\teditor.execute( 'codeBlock', {\n\t\t\t\t\t\tlanguage: definition.model._codeBlockLanguage as string,\n\t\t\t\t\t\tforceValue: command.value == definition.model._codeBlockLanguage ? false : true\n\t\t\t\t\t} );\n\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t} );\n\n\t\t\t\tlistItemView.children.add( buttonView );\n\t\t\t\tlistView.items.add( listItemView );\n\t\t\t}\n\n\t\t\tmenuView.panelView.children.add( listView );\n\n\t\t\treturn menuView;\n\t\t} );\n\t}\n\n\t/**\n\t * A helper returning a collection of the `codeBlock` dropdown items representing languages\n\t * available for the user to choose from.\n\t */\n\tprivate _getLanguageListItemDefinitions(\n\t\tnormalizedLanguageDefs: Array<CodeBlockLanguageDefinition>\n\t): Collection<ListDropdownButtonDefinition> {\n\t\tconst editor = this.editor;\n\t\tconst command: CodeBlockCommand = editor.commands.get( 'codeBlock' )!;\n\t\tconst itemDefinitions = new Collection<ListDropdownButtonDefinition>();\n\n\t\tfor ( const languageDef of normalizedLanguageDefs ) {\n\t\t\tconst definition: ListDropdownButtonDefinition = {\n\t\t\t\ttype: 'button',\n\t\t\t\tmodel: new UIModel( {\n\t\t\t\t\t_codeBlockLanguage: languageDef.language,\n\t\t\t\t\tlabel: languageDef.label,\n\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\twithText: true\n\t\t\t\t} )\n\t\t\t};\n\n\t\t\tdefinition.model.bind( 'isOn' ).to( command, 'value', value => {\n\t\t\t\treturn value === definition.model._codeBlockLanguage;\n\t\t\t} );\n\n\t\t\titemDefinitions.add( definition );\n\t\t}\n\n\t\treturn itemDefinitions;\n\t}\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/**\n * @module code-block/codeblock\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { CodeBlockEditing } from './codeblockediting.js';\nimport { CodeBlockUI } from './codeblockui.js';\n\n/**\n * The code block plugin.\n *\n * For more information about this feature check the {@glink api/code-block package page} and the\n * {@glink features/code-blocks code block} feature guide.\n *\n * This is a \"glue\" plugin that loads the {@link module:code-block/codeblockediting~CodeBlockEditing code block editing feature}\n * and the {@link module:code-block/codeblockui~CodeBlockUI code block UI feature}.\n */\nexport class CodeBlock extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ CodeBlockEditing, CodeBlockUI ]> {\n\t\treturn [ CodeBlockEditing, CodeBlockUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'CodeBlock' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { CKEditorError, ElementReplacer, Rect } from \"@ckeditor/ckeditor5-utils\";\nimport { Editor, ElementApiMixin, attachToForm, normalizeRootsConfig, normalizeSingleRootEditorConstructorParams, registerAndInitializeRootConfigAttributes, rootAcceptsBlocks, verifyRootElements } from \"@ckeditor/ckeditor5-core\";\nimport { BoxedEditorUIView, DialogView, EditorUI, InlineEditableUIView, MenuBarView, StickyPanelView, ToolbarView, normalizeToolbarConfig } from \"@ckeditor/ckeditor5-ui\";\nimport { enableViewPlaceholder } from \"@ckeditor/ckeditor5-engine\";\nimport { isElement } 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* @module editor-classic/classiceditorui\n*/\n/**\n* The classic editor UI class.\n*/\nvar ClassicEditorUI = class extends EditorUI {\n\t/**\n\t* The main (top–most) view of the editor UI.\n\t*/\n\tview;\n\t/**\n\t* A normalized `config.toolbar` object.\n\t*/\n\t_toolbarConfig;\n\t/**\n\t* The element replacer instance used to hide the editor's source element.\n\t*/\n\t_elementReplacer;\n\t/**\n\t* Creates an instance of the classic editor UI class.\n\t*\n\t* @param editor The editor instance.\n\t* @param view The view of the UI.\n\t*/\n\tconstructor(editor, view) {\n\t\tsuper(editor);\n\t\tthis.view = view;\n\t\tthis._toolbarConfig = normalizeToolbarConfig(editor.config.get(\"toolbar\"));\n\t\tthis._elementReplacer = new ElementReplacer();\n\t\tthis.listenTo(editor.editing.view, \"scrollToTheSelection\", this._handleScrollToTheSelectionWithStickyPanel.bind(this));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tget element() {\n\t\treturn this.view.element;\n\t}\n\t/**\n\t* Initializes the UI.\n\t*\n\t* @param replacementElement The DOM element that will be the source for the created editor.\n\t*/\n\tinit(replacementElement) {\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editable = view.editable;\n\t\tconst editingRoot = editingView.document.getRoot();\n\t\teditable.name = editingRoot.rootName;\n\t\teditable.isInlineRoot = !rootAcceptsBlocks(editor, editingRoot.rootName);\n\t\tview.render();\n\t\tconst editableElement = editable.element;\n\t\tthis.setEditableElement(editable.name, editableElement);\n\t\tview.editable.bind(\"isFocused\").to(this.focusTracker);\n\t\teditingView.attachDomRoot(editableElement);\n\t\tif (replacementElement) this._elementReplacer.replace(replacementElement, this.element);\n\t\tthis._initPlaceholder();\n\t\tthis._initToolbar();\n\t\tif (view.menuBarView) this.initMenuBar(view.menuBarView);\n\t\tthis._initDialogPluginIntegration();\n\t\tthis._initContextualBalloonIntegration();\n\t\tthis.fire(\"ready\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tconst view = this.view;\n\t\tconst editingView = this.editor.editing.view;\n\t\tthis._elementReplacer.restore();\n\t\tif (editingView.getDomRoot(view.editable.name)) editingView.detachDomRoot(view.editable.name);\n\t\tview.destroy();\n\t}\n\t/**\n\t* Initializes the editor toolbar.\n\t*/\n\t_initToolbar() {\n\t\tconst view = this.view;\n\t\tview.stickyPanel.bind(\"isActive\").to(this.focusTracker, \"isFocused\");\n\t\tview.stickyPanel.limiterElement = view.element;\n\t\tview.stickyPanel.bind(\"viewportTopOffset\").to(this, \"viewportOffset\", ({ visualTop }) => visualTop || 0);\n\t\tview.toolbar.fillFromConfig(this._toolbarConfig, this.componentFactory);\n\t\tthis.addToolbar(view.toolbar);\n\t}\n\t/**\n\t* Enable the placeholder text on the editing root.\n\t*/\n\t_initPlaceholder() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editingRoot = editingView.document.getRoot();\n\t\tconst sourceElement = editor.sourceElement;\n\t\tlet placeholderText;\n\t\tconst placeholder = editor.config.get(\"roots\")[this.view.editable.name].placeholder;\n\t\tif (placeholder) placeholderText = placeholder;\n\t\tif (!placeholderText && sourceElement && sourceElement.tagName.toLowerCase() === \"textarea\") placeholderText = sourceElement.getAttribute(\"placeholder\");\n\t\tif (placeholderText) editingRoot.placeholder = placeholderText;\n\t\tenableViewPlaceholder({\n\t\t\tview: editingView,\n\t\t\telement: editingRoot,\n\t\t\tisDirectHost: this.view.editable.isInlineRoot,\n\t\t\tkeepOnFocus: true\n\t\t});\n\t}\n\t/**\n\t* Provides an integration between the sticky toolbar and {@link module:ui/panel/balloon/contextualballoon contextual balloon plugin}.\n\t* It allows the contextual balloon to consider the height of the\n\t* {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel}. It prevents the balloon from overlapping\n\t* the sticky toolbar by adjusting the balloon's position using viewport offset configuration.\n\t*/\n\t_initContextualBalloonIntegration() {\n\t\tif (!this.editor.plugins.has(\"ContextualBalloon\")) return;\n\t\tconst { stickyPanel } = this.view;\n\t\tconst contextualBalloon = this.editor.plugins.get(\"ContextualBalloon\");\n\t\tcontextualBalloon.on(\"getPositionOptions\", (evt) => {\n\t\t\tconst position = evt.return;\n\t\t\tif (!position || !stickyPanel.isSticky || !stickyPanel.element) return;\n\t\t\tconst stickyPanelHeight = new Rect(stickyPanel.element).height;\n\t\t\tconst target = typeof position.target === \"function\" ? position.target() : position.target;\n\t\t\tconst limiter = typeof position.limiter === \"function\" ? position.limiter() : position.limiter;\n\t\t\tif (target && limiter && new Rect(target).height >= new Rect(limiter).height - stickyPanelHeight) return;\n\t\t\tconst viewportOffsetConfig = { ...position.viewportOffsetConfig };\n\t\t\tconst newTopViewportOffset = (viewportOffsetConfig.top || 0) + stickyPanelHeight;\n\t\t\tevt.return = {\n\t\t\t\t...position,\n\t\t\t\tviewportOffsetConfig: {\n\t\t\t\t\t...viewportOffsetConfig,\n\t\t\t\t\ttop: newTopViewportOffset\n\t\t\t\t}\n\t\t\t};\n\t\t}, { priority: \"low\" });\n\t\tconst updateBalloonPosition = () => {\n\t\t\tif (contextualBalloon.visibleView) contextualBalloon.updatePosition();\n\t\t};\n\t\tthis.listenTo(stickyPanel, \"change:isSticky\", updateBalloonPosition);\n\t\tthis.listenTo(this.editor.ui, \"change:viewportOffset\", updateBalloonPosition);\n\t}\n\t/**\n\t* Provides an integration between the sticky toolbar and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t* It allows the UI-agnostic engine method to consider the geometry of the\n\t* {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel} that pins to the\n\t* edge of the viewport and can obscure the user caret after scrolling the window.\n\t*\n\t* @param evt The `scrollToTheSelection` event info.\n\t* @param data The payload carried by the `scrollToTheSelection` event.\n\t* @param originalArgs The original arguments passed to `scrollViewportToShowTarget()` method (see implementation to learn more).\n\t*/\n\t_handleScrollToTheSelectionWithStickyPanel(evt, data, originalArgs) {\n\t\tconst stickyPanel = this.view.stickyPanel;\n\t\tif (stickyPanel.isSticky) {\n\t\t\tconst stickyPanelHeight = new Rect(stickyPanel.element).height;\n\t\t\tdata.viewportOffset.top += stickyPanelHeight;\n\t\t} else {\n\t\t\tconst scrollViewportOnPanelGettingSticky = () => {\n\t\t\t\tthis.editor.editing.view.scrollToTheSelection(originalArgs);\n\t\t\t};\n\t\t\tthis.listenTo(stickyPanel, \"change:isSticky\", scrollViewportOnPanelGettingSticky);\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.stopListening(stickyPanel, \"change:isSticky\", scrollViewportOnPanelGettingSticky);\n\t\t\t}, 20);\n\t\t}\n\t}\n\t/**\n\t* Provides an integration between the sticky toolbar and {@link module:ui/dialog/dialog the Dialog plugin}.\n\t*\n\t* It moves the dialog down to ensure that the\n\t* {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel sticky panel}\n\t* used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.\n\t*/\n\t_initDialogPluginIntegration() {\n\t\tif (!this.editor.plugins.has(\"Dialog\")) return;\n\t\tconst stickyPanel = this.view.stickyPanel;\n\t\tconst dialogPlugin = this.editor.plugins.get(\"Dialog\");\n\t\tdialogPlugin.on(\"show\", () => {\n\t\t\tconst dialogView = dialogPlugin.view;\n\t\t\tdialogView.on(\"moveTo\", (evt, data) => {\n\t\t\t\tif (!stickyPanel.isSticky || dialogView.wasMoved || dialogView.isModal) return;\n\t\t\t\tconst stickyPanelContentRect = new Rect(stickyPanel.contentPanelElement);\n\t\t\t\tif (data[1] < stickyPanelContentRect.bottom + DialogView.defaultOffset) data[1] = stickyPanelContentRect.bottom + DialogView.defaultOffset;\n\t\t\t}, { priority: \"high\" });\n\t\t}, { priority: \"low\" });\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 editor-classic/classiceditoruiview\n*/\n/**\n* Classic editor UI view. Uses an inline editable and a sticky toolbar, all\n* enclosed in a boxed UI view.\n*/\nvar ClassicEditorUIView = class extends BoxedEditorUIView {\n\t/**\n\t* Sticky panel view instance. This is a parent view of a {@link #toolbar}\n\t* that makes toolbar sticky.\n\t*/\n\tstickyPanel;\n\t/**\n\t* Toolbar view instance.\n\t*/\n\ttoolbar;\n\t/**\n\t* Editable UI view.\n\t*/\n\teditable;\n\t/**\n\t* Creates an instance of the classic editor UI view.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param editingView The editing view instance this view is related to.\n\t* @param options Configuration options for the view instance.\n\t* @param options.shouldToolbarGroupWhenFull When set `true` enables automatic items grouping\n\t* in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.\n\t* See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.\n\t* @param options.editableElement A {@link module:core/editor/editorconfig~ViewRootElementDefinition}\n\t* describing the editable element to create inside the UI box. When omitted, a default `<div>` is used.\n\t* @param options.label When set, this value will be used as an accessible `aria-label` of the\n\t* {@link module:ui/editableui/editableuiview~EditableUIView editable view}.\n\t*/\n\tconstructor(locale, editingView, options = {}) {\n\t\tsuper(locale);\n\t\tthis.stickyPanel = new StickyPanelView(locale);\n\t\tthis.toolbar = new ToolbarView(locale, { shouldGroupWhenFull: options.shouldToolbarGroupWhenFull });\n\t\tif (options.useMenuBar) this.menuBarView = new MenuBarView(locale);\n\t\tthis.editable = new InlineEditableUIView(locale, editingView, options.editableElement, { label: options.label });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this.menuBarView) this.stickyPanel.content.addMany([this.menuBarView, this.toolbar]);\n\t\telse this.stickyPanel.content.add(this.toolbar);\n\t\tthis.top.add(this.stickyPanel);\n\t\tthis.main.add(this.editable);\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 editor-classic/classiceditor\n*/\nconst ClassicEditorBase = /* #__PURE__ */ ElementApiMixin(Editor);\n/**\n* The classic editor implementation. It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.\n* See the {@glink examples/builds/classic-editor demo}.\n*\n* In order to create a classic editor instance, use the static\n* {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.\n*/\nvar ClassicEditor = class extends ClassicEditorBase {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get editorName() {\n\t\treturn \"ClassicEditor\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tui;\n\tconstructor(sourceElementOrDataOrConfig, config = {}) {\n\t\tconst { sourceElementOrData, editorConfig } = normalizeSingleRootEditorConstructorParams(sourceElementOrDataOrConfig, config);\n\t\tsuper(editorConfig);\n\t\tnormalizeRootsConfig(sourceElementOrData, this.config, \"main\", true);\n\t\tconst sourceElement = this.config.get(\"attachTo\");\n\t\tthis.config.define(\"menuBar.isVisible\", false);\n\t\tif (isElement$1(sourceElement)) {\n\t\t\tif (!sourceElement.isConnected)\n /**\n\t\t\t* Cannot initialize the editor because the provided source element is not attached to the DOM and cannot be replaced.\n\t\t\t*\n\t\t\t* @error editor-source-element-not-attached\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"editor-source-element-not-attached\", null);\n\t\t\tthis.sourceElement = sourceElement;\n\t\t}\n\t\tthis.model.document.createRoot(this.config.get(\"roots\").main.modelElement);\n\t\tregisterAndInitializeRootConfigAttributes(this);\n\t\tconst shouldToolbarGroupWhenFull = !this.config.get(\"toolbar.shouldNotGroupWhenFull\");\n\t\tconst menuBarConfig = this.config.get(\"menuBar\");\n\t\tconst editableElement = this.config.get(\"roots\").main.element;\n\t\tconst view = new ClassicEditorUIView(this.locale, this.editing.view, {\n\t\t\tshouldToolbarGroupWhenFull,\n\t\t\tuseMenuBar: menuBarConfig.isVisible,\n\t\t\tlabel: this.config.get(\"roots\").main.label,\n\t\t\teditableElement\n\t\t});\n\t\tthis.ui = new ClassicEditorUI(this, view);\n\t\tattachToForm(this);\n\t}\n\t/**\n\t* Destroys the editor instance, releasing all resources used by it.\n\t*\n\t* Updates the original editor element with the data if the\n\t* {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t* configuration option is set to `true`.\n\t*/\n\tasync destroy() {\n\t\tif (this.sourceElement) this.updateSourceElement();\n\t\tthis.ui.destroy();\n\t\tawait super.destroy();\n\t}\n\tstatic async create(sourceElementOrDataOrConfig, config = {}) {\n\t\tconst editor = new this(sourceElementOrDataOrConfig, config);\n\t\tawait editor.initPlugins();\n\t\tverifyRootElements(editor);\n\t\tawait editor.ui.init(editor.config.get(\"attachTo\") || null);\n\t\tawait editor.data.init(editor.config.get(\"roots\").main.initialData);\n\t\teditor.fire(\"ready\");\n\t\treturn editor;\n\t}\n};\nfunction isElement$1(value) {\n\treturn isElement(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\nexport { ClassicEditor, ClassicEditorUI, ClassicEditorUIView };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module editor-classic/classiceditorui\n */\n\nimport { rootAcceptsBlocks, type Editor, type ElementApi } from '@ckeditor/ckeditor5-core';\nimport {\n\tEditorUI,\n\tDialogView,\n\tnormalizeToolbarConfig,\n\ttype DialogViewMoveToEvent,\n\ttype Dialog,\n\ttype EditorUIReadyEvent,\n\ttype ContextualBalloonGetPositionOptionsEvent\n} from '@ckeditor/ckeditor5-ui';\nimport {\n\tenableViewPlaceholder,\n\ttype ViewScrollToTheSelectionEvent\n} from '@ckeditor/ckeditor5-engine';\nimport { ElementReplacer, Rect, type EventInfo } from '@ckeditor/ckeditor5-utils';\nimport { type ClassicEditorUIView } from './classiceditoruiview.js';\n\n/**\n * The classic editor UI class.\n */\nexport class ClassicEditorUI extends EditorUI {\n\t/**\n\t * The main (top–most) view of the editor UI.\n\t */\n\tpublic readonly view: ClassicEditorUIView;\n\n\t/**\n\t * A normalized `config.toolbar` object.\n\t */\n\tprivate readonly _toolbarConfig: ReturnType<typeof normalizeToolbarConfig>;\n\n\t/**\n\t * The element replacer instance used to hide the editor's source element.\n\t */\n\tprivate readonly _elementReplacer: ElementReplacer;\n\n\t/**\n\t * Creates an instance of the classic editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */\n\tconstructor( editor: Editor, view: ClassicEditorUIView ) {\n\t\tsuper( editor );\n\n\t\tthis.view = view;\n\t\tthis._toolbarConfig = normalizeToolbarConfig( editor.config.get( 'toolbar' ) );\n\n\t\tthis._elementReplacer = new ElementReplacer();\n\n\t\tthis.listenTo<ViewScrollToTheSelectionEvent>(\n\t\t\teditor.editing.view, 'scrollToTheSelection', this._handleScrollToTheSelectionWithStickyPanel.bind( this ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override get element(): HTMLElement | null {\n\t\treturn this.view.element;\n\t}\n\n\t/**\n\t * Initializes the UI.\n\t *\n\t * @param replacementElement The DOM element that will be the source for the created editor.\n\t */\n\tpublic init( replacementElement: HTMLElement | null ): void {\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editable = view.editable;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\n\t\t// The editable UI and editing root should share the same name. Then name is used\n\t\t// to recognize the particular editable, for instance in ARIA attributes.\n\t\teditable.name = editingRoot.rootName;\n\n\t\t// Resolved during UI init rather than in the editor constructor: by this point the plugin\n\t\t// initialization phase has finished, so the schema is fully populated and the check below\n\t\t// reflects any plugin-registered root types or additional content rules.\n\t\teditable.isInlineRoot = !rootAcceptsBlocks( editor, editingRoot.rootName );\n\n\t\tview.render();\n\n\t\t// The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n\t\t// But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n\t\tconst editableElement = editable.element!;\n\n\t\t// Register the editable UI view in the editor. A single editor instance can aggregate multiple\n\t\t// editable areas (roots) but the classic editor has only one.\n\t\tthis.setEditableElement( editable.name, editableElement );\n\n\t\t// Let the editable UI element respond to the changes in the global editor focus\n\t\t// tracker. It has been added to the same tracker a few lines above but, in reality, there are\n\t\t// many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n\t\t// as they have focus, the editable should act like it is focused too (although technically\n\t\t// it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n\t\t// Doing otherwise will result in editable focus styles disappearing, once e.g. the\n\t\t// toolbar gets focused.\n\t\tview.editable.bind( 'isFocused' ).to( this.focusTracker );\n\n\t\t// Bind the editable UI element to the editing view, making it an end– and entry–point\n\t\t// of the editor's engine. This is where the engine meets the UI.\n\t\teditingView.attachDomRoot( editableElement );\n\n\t\t// If an element containing the initial data of the editor was provided, replace it with\n\t\t// an editor instance's UI in DOM until the editor is destroyed. For instance, a <textarea>\n\t\t// can be such element.\n\t\tif ( replacementElement ) {\n\t\t\tthis._elementReplacer.replace( replacementElement, this.element as HTMLElement | undefined );\n\t\t}\n\n\t\tthis._initPlaceholder();\n\t\tthis._initToolbar();\n\n\t\tif ( view.menuBarView ) {\n\t\t\tthis.initMenuBar( view.menuBarView );\n\t\t}\n\n\t\tthis._initDialogPluginIntegration();\n\t\tthis._initContextualBalloonIntegration();\n\n\t\tthis.fire<EditorUIReadyEvent>( 'ready' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tconst view = this.view;\n\t\tconst editingView = this.editor.editing.view;\n\n\t\tthis._elementReplacer.restore();\n\n\t\tif ( editingView.getDomRoot( view.editable.name! ) ) {\n\t\t\teditingView.detachDomRoot( view.editable.name! );\n\t\t}\n\n\t\tview.destroy();\n\t}\n\n\t/**\n\t * Initializes the editor toolbar.\n\t */\n\tprivate _initToolbar(): void {\n\t\tconst view = this.view;\n\n\t\t// Set–up the sticky panel with toolbar.\n\t\tview.stickyPanel.bind( 'isActive' ).to( this.focusTracker, 'isFocused' );\n\t\tview.stickyPanel.limiterElement = view.element;\n\t\tview.stickyPanel.bind( 'viewportTopOffset' ).to( this, 'viewportOffset', ( { visualTop } ) => visualTop || 0 );\n\n\t\tview.toolbar.fillFromConfig( this._toolbarConfig, this.componentFactory );\n\n\t\t// Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n\t\tthis.addToolbar( view.toolbar );\n\t}\n\n\t/**\n\t * Enable the placeholder text on the editing root.\n\t */\n\tprivate _initPlaceholder(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst editingRoot = editingView.document.getRoot()!;\n\t\tconst sourceElement = ( editor as Editor & ElementApi ).sourceElement;\n\n\t\tlet placeholderText;\n\t\tconst placeholder = editor.config.get( 'roots' )![ this.view.editable.name! ].placeholder;\n\n\t\tif ( placeholder ) {\n\t\t\tplaceholderText = placeholder;\n\t\t}\n\n\t\tif ( !placeholderText && sourceElement && sourceElement.tagName.toLowerCase() === 'textarea' ) {\n\t\t\tplaceholderText = sourceElement.getAttribute( 'placeholder' );\n\t\t}\n\n\t\tif ( placeholderText ) {\n\t\t\teditingRoot.placeholder = placeholderText;\n\t\t}\n\n\t\tenableViewPlaceholder( {\n\t\t\tview: editingView,\n\t\t\telement: editingRoot,\n\t\t\tisDirectHost: this.view.editable.isInlineRoot,\n\t\t\tkeepOnFocus: true\n\t\t} );\n\t}\n\n\t/**\n\t * Provides an integration between the sticky toolbar and {@link module:ui/panel/balloon/contextualballoon contextual balloon plugin}.\n\t * It allows the contextual balloon to consider the height of the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel}. It prevents the balloon from overlapping\n\t * the sticky toolbar by adjusting the balloon's position using viewport offset configuration.\n\t */\n\tprivate _initContextualBalloonIntegration(): void {\n\t\tif ( !this.editor.plugins.has( 'ContextualBalloon' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { stickyPanel } = this.view;\n\t\tconst contextualBalloon = this.editor.plugins.get( 'ContextualBalloon' );\n\n\t\tcontextualBalloon.on<ContextualBalloonGetPositionOptionsEvent>( 'getPositionOptions', evt => {\n\t\t\tconst position = evt.return;\n\n\t\t\tif ( !position || !stickyPanel.isSticky || !stickyPanel.element ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Measure toolbar (and menu bar) height.\n\t\t\tconst stickyPanelHeight = new Rect( stickyPanel.element ).height;\n\n\t\t\t// Handle edge case when the target element is larger than the limiter.\n\t\t\t// It's an issue because the contextual balloon can overlap top table cells when the table is larger than the viewport\n\t\t\t// and it's placed at the top of the editor. It's better to overlap toolbar in that situation.\n\t\t\t// Check this issue: https://github.com/ckeditor/ckeditor5/issues/15744\n\t\t\tconst target = typeof position.target === 'function' ? position.target() : position.target;\n\t\t\tconst limiter = typeof position.limiter === 'function' ? position.limiter() : position.limiter;\n\n\t\t\tif ( target && limiter && new Rect( target ).height >= new Rect( limiter ).height - stickyPanelHeight ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Ensure that viewport offset is present, it can be undefined according to the typing.\n\t\t\tconst viewportOffsetConfig = { ...position.viewportOffsetConfig };\n\t\t\tconst newTopViewportOffset = ( viewportOffsetConfig.top || 0 ) + stickyPanelHeight;\n\n\t\t\tevt.return = {\n\t\t\t\t...position,\n\t\t\t\tviewportOffsetConfig: {\n\t\t\t\t\t...viewportOffsetConfig,\n\t\t\t\t\ttop: newTopViewportOffset\n\t\t\t\t}\n\t\t\t};\n\t\t}, { priority: 'low' } );\n\n\t\t// Update balloon position when the toolbar becomes sticky or when ui viewportOffset changes.\n\t\tconst updateBalloonPosition = () => {\n\t\t\tif ( contextualBalloon.visibleView ) {\n\t\t\t\tcontextualBalloon.updatePosition();\n\t\t\t}\n\t\t};\n\n\t\tthis.listenTo( stickyPanel, 'change:isSticky', updateBalloonPosition );\n\t\tthis.listenTo( this.editor.ui, 'change:viewportOffset', updateBalloonPosition );\n\t}\n\n\t/**\n\t * Provides an integration between the sticky toolbar and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t * It allows the UI-agnostic engine method to consider the geometry of the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel} that pins to the\n\t * edge of the viewport and can obscure the user caret after scrolling the window.\n\t *\n\t * @param evt The `scrollToTheSelection` event info.\n\t * @param data The payload carried by the `scrollToTheSelection` event.\n\t * @param originalArgs The original arguments passed to `scrollViewportToShowTarget()` method (see implementation to learn more).\n\t */\n\tprivate _handleScrollToTheSelectionWithStickyPanel(\n\t\tevt: EventInfo<'scrollToTheSelection'>,\n\t\tdata: ViewScrollToTheSelectionEvent[ 'args' ][ 0 ],\n\t\toriginalArgs: ViewScrollToTheSelectionEvent[ 'args' ][ 1 ]\n\t): void {\n\t\tconst stickyPanel = this.view.stickyPanel;\n\n\t\tif ( stickyPanel.isSticky ) {\n\t\t\tconst stickyPanelHeight = new Rect( stickyPanel.element! ).height;\n\n\t\t\tdata.viewportOffset.top += stickyPanelHeight;\n\t\t} else {\n\t\t\tconst scrollViewportOnPanelGettingSticky = () => {\n\t\t\t\tthis.editor.editing.view.scrollToTheSelection( originalArgs );\n\t\t\t};\n\n\t\t\tthis.listenTo( stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky );\n\n\t\t\t// This works as a post-scroll-fixer because it's impossible predict whether the panel will be sticky after scrolling or not.\n\t\t\t// Listen for a short period of time only and if the toolbar does not become sticky very soon, cancel the listener.\n\t\t\tsetTimeout( () => {\n\t\t\t\tthis.stopListening( stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky );\n\t\t\t}, 20 );\n\t\t}\n\t}\n\n\t/**\n\t * Provides an integration between the sticky toolbar and {@link module:ui/dialog/dialog the Dialog plugin}.\n\t *\n\t * It moves the dialog down to ensure that the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel sticky panel}\n\t * used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.\n\t */\n\tprivate _initDialogPluginIntegration(): void {\n\t\tif ( !this.editor.plugins.has( 'Dialog' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst stickyPanel = this.view.stickyPanel;\n\t\tconst dialogPlugin: Dialog = this.editor.plugins.get( 'Dialog' );\n\n\t\tdialogPlugin.on( 'show', () => {\n\t\t\tconst dialogView = dialogPlugin.view!;\n\n\t\t\tdialogView.on<DialogViewMoveToEvent>( 'moveTo', ( evt, data ) => {\n\t\t\t\t// Engage only when the panel is sticky, and the dialog is using one of default positions.\n\t\t\t\t// Ignore modals because they are displayed on top of the page (and overlay) and they do not collide with anything\n\t\t\t\t// See (https://github.com/ckeditor/ckeditor5/issues/17339).\n\t\t\t\tif ( !stickyPanel.isSticky || dialogView.wasMoved || dialogView.isModal ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst stickyPanelContentRect = new Rect( stickyPanel.contentPanelElement );\n\n\t\t\t\tif ( data[ 1 ] < stickyPanelContentRect.bottom + DialogView.defaultOffset ) {\n\t\t\t\t\tdata[ 1 ] = stickyPanelContentRect.bottom + DialogView.defaultOffset;\n\t\t\t\t}\n\t\t\t}, { priority: 'high' } );\n\t\t}, { priority: 'low' } );\n\t}\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/**\n * @module editor-classic/classiceditoruiview\n */\n\nimport { BoxedEditorUIView, InlineEditableUIView, MenuBarView, StickyPanelView, ToolbarView } from '@ckeditor/ckeditor5-ui';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\nimport type { EditingView } from '@ckeditor/ckeditor5-engine';\nimport type { ViewRootElementDefinition } from '@ckeditor/ckeditor5-core';\n\n/**\n * Classic editor UI view. Uses an inline editable and a sticky toolbar, all\n * enclosed in a boxed UI view.\n */\nexport class ClassicEditorUIView extends BoxedEditorUIView {\n\t/**\n\t * Sticky panel view instance. This is a parent view of a {@link #toolbar}\n\t * that makes toolbar sticky.\n\t */\n\tpublic readonly stickyPanel: StickyPanelView;\n\n\t/**\n\t * Toolbar view instance.\n\t */\n\tpublic override readonly toolbar: ToolbarView;\n\n\t/**\n\t * Editable UI view.\n\t */\n\tpublic readonly editable: InlineEditableUIView;\n\n\t/**\n\t * Creates an instance of the classic editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param options Configuration options for the view instance.\n\t * @param options.shouldToolbarGroupWhenFull When set `true` enables automatic items grouping\n\t * in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.\n\t * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.\n\t * @param options.editableElement A {@link module:core/editor/editorconfig~ViewRootElementDefinition}\n\t * describing the editable element to create inside the UI box. When omitted, a default `<div>` is used.\n\t * @param options.label When set, this value will be used as an accessible `aria-label` of the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView editable view}.\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\teditingView: EditingView,\n\t\toptions: {\n\t\t\tshouldToolbarGroupWhenFull?: boolean;\n\t\t\tuseMenuBar?: boolean;\n\t\t\teditableElement?: ViewRootElementDefinition;\n\t\t\tlabel?: string | Record<string, string>;\n\t\t} = {}\n\t) {\n\t\tsuper( locale );\n\n\t\tthis.stickyPanel = new StickyPanelView( locale );\n\n\t\tthis.toolbar = new ToolbarView( locale, {\n\t\t\tshouldGroupWhenFull: options.shouldToolbarGroupWhenFull\n\t\t} );\n\n\t\tif ( options.useMenuBar ) {\n\t\t\tthis.menuBarView = new MenuBarView( locale );\n\t\t}\n\n\t\tthis.editable = new InlineEditableUIView( locale, editingView, options.editableElement, {\n\t\t\tlabel: options.label\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this.menuBarView ) {\n\t\t\t// Set toolbar as a child of a stickyPanel and makes toolbar sticky.\n\t\t\tthis.stickyPanel.content.addMany( [ this.menuBarView, this.toolbar ] );\n\t\t} else {\n\t\t\tthis.stickyPanel.content.add( this.toolbar );\n\t\t}\n\n\t\tthis.top.add( this.stickyPanel );\n\t\tthis.main.add( this.editable );\n\t}\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/**\n * @module editor-classic/classiceditor\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport { ClassicEditorUI } from './classiceditorui.js';\nimport { ClassicEditorUIView } from './classiceditoruiview.js';\n\nimport {\n\tEditor,\n\tElementApiMixin,\n\tattachToForm,\n\tnormalizeRootsConfig,\n\tnormalizeSingleRootEditorConstructorParams,\n\tregisterAndInitializeRootConfigAttributes,\n\tverifyRootElements,\n\ttype EditorConfig,\n\ttype EditorReadyEvent,\n\ttype ViewRootElementDefinition,\n\ttype ElementApiMixinConstructor\n} from '@ckeditor/ckeditor5-core';\n\nimport { isElement as _isElement } from 'es-toolkit/compat';\n\nconst ClassicEditorBase: ElementApiMixinConstructor<typeof Editor> = /* #__PURE__ */ ElementApiMixin( Editor );\n\n/**\n * The classic editor implementation. It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.\n * See the {@glink examples/builds/classic-editor demo}.\n *\n * In order to create a classic editor instance, use the static\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.\n */\nexport class ClassicEditor extends ClassicEditorBase {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get editorName(): 'ClassicEditor' {\n\t\treturn 'ClassicEditor';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly ui: ClassicEditorUI;\n\n\t/**\n\t * Creates an instance of the classic editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method instead.\n\t *\n\t * @param config The editor configuration.\n\t */\n\tprotected constructor( config: EditorConfig );\n\n\t/**\n\t * Creates an instance of the classic editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method instead.\n\t *\n\t * **Note**: This constructor signature is deprecated and will be removed in the future release.\n\t *\n\t * @deprecated\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data. For more information see\n\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.\n\t * @param config The editor configuration.\n\t */\n\tprotected constructor( sourceElementOrData: HTMLElement | string, config: EditorConfig );\n\n\tprotected constructor( sourceElementOrDataOrConfig: HTMLElement | string | EditorConfig, config: EditorConfig = {} ) {\n\t\tconst {\n\t\t\tsourceElementOrData,\n\t\t\teditorConfig\n\t\t} = normalizeSingleRootEditorConstructorParams( sourceElementOrDataOrConfig, config );\n\n\t\tsuper( editorConfig );\n\n\t\tnormalizeRootsConfig( sourceElementOrData, this.config, 'main', true );\n\n\t\t// From this point use only normalized `roots.main.element`.\n\t\tconst sourceElement = this.config.get( 'attachTo' );\n\n\t\tthis.config.define( 'menuBar.isVisible', false );\n\n\t\tif ( isElement( sourceElement ) ) {\n\t\t\tif ( !sourceElement.isConnected ) {\n\t\t\t\t/**\n\t\t\t\t * Cannot initialize the editor because the provided source element is not attached to the DOM and cannot be replaced.\n\t\t\t\t *\n\t\t\t\t * @error editor-source-element-not-attached\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'editor-source-element-not-attached', null );\n\t\t\t}\n\n\t\t\tthis.sourceElement = sourceElement;\n\t\t}\n\n\t\tthis.model.document.createRoot( this.config.get( 'roots' )!.main.modelElement );\n\t\tregisterAndInitializeRootConfigAttributes( this );\n\n\t\tconst shouldToolbarGroupWhenFull = !this.config.get( 'toolbar.shouldNotGroupWhenFull' );\n\n\t\tconst menuBarConfig = this.config.get( 'menuBar' )!;\n\n\t\t// The `normalizeRootsConfig()` already normalized this.\n\t\tconst editableElement = this.config.get( 'roots' )!.main.element as ViewRootElementDefinition | undefined;\n\n\t\tconst view = new ClassicEditorUIView( this.locale, this.editing.view, {\n\t\t\tshouldToolbarGroupWhenFull,\n\t\t\tuseMenuBar: menuBarConfig.isVisible,\n\t\t\tlabel: this.config.get( 'roots' )!.main.label,\n\t\t\teditableElement\n\t\t} );\n\n\t\tthis.ui = new ClassicEditorUI( this, view );\n\n\t\tattachToForm( this );\n\t}\n\n\t/**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t */\n\tpublic override async destroy(): Promise<unknown> {\n\t\tif ( this.sourceElement ) {\n\t\t\tthis.updateSourceElement();\n\t\t}\n\n\t\tthis.ui.destroy();\n\n\t\tawait super.destroy();\n\n\t\t// To satisfy the return type and to keep it backward compatible.\n\t\t// eslint-disable-next-line no-useless-return\n\t\treturn;\n\t}\n\n\t/**\n\t * Creates a new classic editor instance.\n\t *\n\t * There are three ways how the editor can be initialized.\n\t *\n\t * # Replacing a DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( {\n\t * \t\tattachTo: document.querySelector( '#editor' )\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will be replaced by the editor UI.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( {\n\t * \t\troot: {\n\t * \t\t\tinitialData: '<p>Hello world!</p>'\n\t * \t\t}\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Replacing a DOM element (and data provided in `config.root.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( {\n\t * \t\tattachTo: document.querySelector( '#editor' ),\n\t * \t\troot: {\n\t * \t\t\tinitialData: '<p>Hello world!</p>'\n\t * \t\t}\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */\n\tpublic static override create( config: EditorConfig ): Promise<ClassicEditor>;\n\n\t/**\n\t * Creates a new classic editor instance.\n\t *\n\t * **Note**: This method signature is deprecated and will be removed in the future release.\n\t *\n\t * There are three ways how the editor can be initialized.\n\t *\n\t * # Replacing a DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( document.querySelector( '#editor' ) )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will be replaced by the editor UI.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( '<p>Hello world!</p>' )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Replacing a DOM element (and data provided in `config.root.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( document.querySelector( '#editor' ), {\n\t * \t\troot: {\n\t * \t\t\tinitialData: '<p>Hello world!</p>'\n\t * \t\t}\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * @deprecated\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data.\n\t *\n\t * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization\n\t * and the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element editor element} will replace the passed element\n\t * in the DOM (the original one will be hidden and the editor will be injected next to it).\n\t *\n\t * If the {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}\n\t * option is set to `true`, the editor data will be set back to the original element once the editor is destroyed and when a form,\n\t * in which this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration\n\t * with native web forms.\n\t *\n\t * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.\n\t * It is available under the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element `editor.ui.element`} property.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */\n\tpublic static override create( sourceElementOrData: HTMLElement | string, config: EditorConfig ): Promise<ClassicEditor>;\n\n\tpublic static override async create(\n\t\tsourceElementOrDataOrConfig: HTMLElement | string | EditorConfig,\n\t\tconfig: EditorConfig = {}\n\t): Promise<ClassicEditor> {\n\t\tconst editor = new this( sourceElementOrDataOrConfig as any, config );\n\n\t\tawait editor.initPlugins();\n\n\t\t// Roots are created in the editor constructor (before plugins are loaded), but the schema is only fully\n\t\t// built after plugins register their items during init(). Custom root element names (e.g. registered by a\n\t\t// plugin) may not exist in the schema at construction time, so we defer this check until here.\n\t\tverifyRootElements( editor );\n\n\t\tawait editor.ui.init( editor.config.get( 'attachTo' ) || null );\n\t\tawait editor.data.init( editor.config.get( 'roots' )!.main.initialData! );\n\n\t\teditor.fire<EditorReadyEvent>( 'ready' );\n\n\t\treturn editor;\n\t}\n}\n\nfunction isElement( value: any ): value is Element {\n\treturn _isElement( value );\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { CKEditorError, Collection, Rect, env, keyCodes, logWarning, toMap, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { ButtonView, ContextualBalloon, ListItemView, ListView, View, clickOutsideHandler } from \"@ckeditor/ckeditor5-ui\";\nimport { TextWatcher } from \"@ckeditor/ckeditor5-typing\";\nimport { debounce } 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* @module mention/mentioncommand\n*/\nconst BRACKET_PAIRS = {\n\t\"(\": \")\",\n\t\"[\": \"]\",\n\t\"{\": \"}\"\n};\n/**\n* The mention command.\n*\n* The command is registered by {@link module:mention/mentionediting~MentionEditing} as `'mention'`.\n*\n* To insert a mention into a range, execute the command and specify a mention object with a range to replace:\n*\n* ```ts\n* const focus = editor.model.document.selection.focus;\n*\n* // It will replace one character before the selection focus with the '#1234' text\n* // with the mention attribute filled with passed attributes.\n* editor.execute( 'mention', {\n* \tmarker: '#',\n* \tmention: {\n* \t\tid: '#1234',\n* \t\tname: 'Foo',\n* \t\ttitle: 'Big Foo'\n* \t},\n* \trange: editor.model.createRange( focus.getShiftedBy( -1 ), focus )\n* } );\n*\n* // It will replace one character before the selection focus with the 'The \"Big Foo\"' text\n* // with the mention attribute filled with passed attributes.\n* editor.execute( 'mention', {\n* \tmarker: '#',\n* \tmention: {\n* \t\tid: '#1234',\n* \t\tname: 'Foo',\n* \t\ttitle: 'Big Foo'\n* \t},\n* \ttext: 'The \"Big Foo\"',\n* \trange: editor.model.createRange( focus.getShiftedBy( -1 ), focus )\n* } );\n*\t```\n*/\nvar MentionCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection(doc.selection, \"mention\");\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @param options Options for the executed command.\n\t* @param options.mention The mention object to insert. When a string is passed, it will be used to create a plain\n\t* object with the name attribute that equals the passed string.\n\t* @param options.marker The marker character (e.g. `'@'`).\n\t* @param options.text The text of the inserted mention. Defaults to the full mention string composed from `marker` and\n\t* `mention` string or `mention.id` if an object is passed.\n\t* @param options.range The range to replace.\n\t* Note that the replaced range might be shorter than the inserted text with the mention attribute.\n\t* @fires execute\n\t*/\n\texecute(options) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst mentionData = typeof options.mention == \"string\" ? { id: options.mention } : options.mention;\n\t\tconst mentionID = mentionData.id;\n\t\tconst range = options.range || selection.getFirstRange();\n\t\tif (!model.canEditAt(range)) return;\n\t\tconst mentionText = options.text || mentionID;\n\t\tconst mention = _addMentionAttributes({\n\t\t\t_text: mentionText,\n\t\t\tid: mentionID\n\t\t}, mentionData);\n\t\tif (!mentionID.startsWith(options.marker))\n /**\n\t\t* The feed item ID must start with the marker character(s).\n\t\t*\n\t\t* Correct mention feed setting:\n\t\t*\n\t\t* ```ts\n\t\t* mentions: [\n\t\t* \t{\n\t\t* \t\tmarker: '@',\n\t\t* \t\tfeed: [ '@Ann', '@Barney', ... ]\n\t\t* \t}\n\t\t* ]\n\t\t* ```\n\t\t*\n\t\t* Incorrect mention feed setting:\n\t\t*\n\t\t* ```ts\n\t\t* mentions: [\n\t\t* \t{\n\t\t* \t\tmarker: '@',\n\t\t* \t\tfeed: [ 'Ann', 'Barney', ... ]\n\t\t* \t}\n\t\t* ]\n\t\t* ```\n\t\t*\n\t\t* See {@link module:mention/mentionconfig~MentionConfig}.\n\t\t*\n\t\t* @error mentioncommand-incorrect-id\n\t\t*/\n\t\tthrow new CKEditorError(\"mentioncommand-incorrect-id\", this);\n\t\tmodel.change((writer) => {\n\t\t\tconst currentAttributes = toMap(selection.getAttributes());\n\t\t\tconst attributesWithMention = new Map(currentAttributes.entries());\n\t\t\tattributesWithMention.set(\"mention\", mention);\n\t\t\tconst insertionRange = model.insertContent(writer.createText(mentionText, attributesWithMention), range);\n\t\t\tconst nodeBefore = insertionRange.start.nodeBefore;\n\t\t\tconst nodeAfter = insertionRange.end.nodeAfter;\n\t\t\tconst isFollowedByWhiteSpace = nodeAfter && nodeAfter.is(\"$text\") && nodeAfter.data.startsWith(\" \");\n\t\t\tlet isInsertedInBrackets = false;\n\t\t\tif (nodeBefore && nodeAfter && nodeBefore.is(\"$text\") && nodeAfter.is(\"$text\")) {\n\t\t\t\tconst precedingCharacter = nodeBefore.data.slice(-1);\n\t\t\t\tconst isPrecededByOpeningBracket = precedingCharacter in BRACKET_PAIRS;\n\t\t\t\tconst isFollowedByBracketClosure = isPrecededByOpeningBracket && nodeAfter.data.startsWith(BRACKET_PAIRS[precedingCharacter]);\n\t\t\t\tisInsertedInBrackets = isPrecededByOpeningBracket && isFollowedByBracketClosure;\n\t\t\t}\n\t\t\tif (!isInsertedInBrackets && !isFollowedByWhiteSpace) model.insertContent(writer.createText(\" \", currentAttributes), range.start.getShiftedBy(mentionText.length));\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 mention/mentionediting\n*/\n/**\n* The mention editing feature.\n*\n* It introduces the {@link module:mention/mentioncommand~MentionCommand command} and the `mention`\n* attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}\n* as a `<span class=\"mention\" data-mention=\"@mention\">`.\n*/\nvar MentionEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MentionEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\t\tmodel.schema.extend(\"$text\", { allowAttributes: \"mention\" });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (context.endsWith(\"codeBlock $text\")) return false;\n\t\t}, \"mention\");\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tattributes: \"data-mention\",\n\t\t\t\tclasses: \"mention\"\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"mention\",\n\t\t\t\tvalue: (viewElement) => _toMentionAttribute(viewElement)\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"downcast\").attributeToElement({\n\t\t\tmodel: \"mention\",\n\t\t\tview: createViewMentionElement\n\t\t});\n\t\teditor.conversion.for(\"downcast\").add(preventPartialMentionDowncast);\n\t\tdoc.registerPostFixer((writer) => removePartialMentionPostFixer(writer, doc, model.schema));\n\t\tdoc.registerPostFixer((writer) => extendAttributeOnMentionPostFixer(writer, doc));\n\t\tdoc.registerPostFixer((writer) => selectionMentionAttributePostFixer(writer, doc));\n\t\teditor.commands.add(\"mention\", new MentionCommand(editor));\n\t}\n};\n/**\n* @internal\n*/\nfunction _addMentionAttributes(baseMentionData, data) {\n\treturn Object.assign({ uid: uid().slice(0, 8) }, baseMentionData, data || {});\n}\n/**\n* Creates a mention attribute value from the provided view element and optional data.\n*\n* This function is exposed as\n* {@link module:mention/mention~Mention#toMentionAttribute `editor.plugins.get( 'Mention' ).toMentionAttribute()`}.\n*\n* @internal\n*/\nfunction _toMentionAttribute(viewElementOrMention, data) {\n\tconst dataMention = viewElementOrMention.getAttribute(\"data-mention\");\n\tconst textNode = viewElementOrMention.getChild(0);\n\tif (!textNode) return;\n\tconst dataUid = viewElementOrMention.getAttribute(\"data-mention-uid\");\n\treturn _addMentionAttributes({\n\t\tid: dataMention,\n\t\t_text: textNode.data\n\t}, dataUid ? {\n\t\tuid: dataUid,\n\t\t...data\n\t} : data);\n}\n/**\n* A converter that blocks partial mention from being converted.\n*\n* This converter is registered with 'highest' priority in order to consume mention attribute before it is converted by\n* any other converters. This converter only consumes partial mention - those whose `_text` attribute is not equal to text with mention\n* attribute. This may happen when copying part of mention text.\n*/\nfunction preventPartialMentionDowncast(dispatcher) {\n\tdispatcher.on(\"attribute:mention\", (evt, data, conversionApi) => {\n\t\tconst mention = data.attributeNewValue;\n\t\tif (!data.item.is(\"$textProxy\") || !mention) return;\n\t\tconst start = data.range.start;\n\t\tif ((start.textNode || start.nodeAfter).data != mention._text) conversionApi.consumable.consume(data.item, evt.name);\n\t}, { priority: \"highest\" });\n}\n/**\n* Creates a mention element from the mention data.\n*/\nfunction createViewMentionElement(mention, { writer, options }) {\n\tif (!mention) return;\n\treturn writer.createAttributeElement(\"span\", {\n\t\tclass: \"mention\",\n\t\t\"data-mention\": mention.id,\n\t\t...!options.isClipboardPipeline && { \"data-mention-uid\": mention.uid }\n\t}, {\n\t\tid: mention.uid,\n\t\tpriority: 20\n\t});\n}\n/**\n* Model post-fixer that disallows typing with selection when the selection is placed after the text node with the mention attribute or\n* before a text node with mention attribute.\n*/\nfunction selectionMentionAttributePostFixer(writer, doc) {\n\tconst selection = doc.selection;\n\tconst focus = selection.focus;\n\tif (selection.isCollapsed && selection.hasAttribute(\"mention\") && shouldNotTypeWithMentionAt(focus)) {\n\t\twriter.removeSelectionAttribute(\"mention\");\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* Helper function to detect if mention attribute should be removed from selection.\n* This check makes only sense if the selection has mention attribute.\n*\n* The mention attribute should be removed from a selection when selection focus is placed:\n* a) after a text node\n* b) the position is at parents start - the selection will set attributes from node after.\n*/\nfunction shouldNotTypeWithMentionAt(position) {\n\tconst isAtStart = position.isAtStart;\n\treturn position.nodeBefore && position.nodeBefore.is(\"$text\") || isAtStart;\n}\n/**\n* Model post-fixer that removes the mention attribute from the modified text node.\n*/\nfunction removePartialMentionPostFixer(writer, doc, schema) {\n\tconst changes = doc.differ.getChanges();\n\tlet wasChanged = false;\n\tfor (const change of changes) {\n\t\tif (change.type == \"attribute\") continue;\n\t\tconst position = change.position;\n\t\tif (change.name == \"$text\") {\n\t\t\tconst nodeAfterInsertedTextNode = position.textNode && position.textNode.nextSibling;\n\t\t\twasChanged = checkAndFix(position.textNode, writer) || wasChanged;\n\t\t\twasChanged = checkAndFix(nodeAfterInsertedTextNode, writer) || wasChanged;\n\t\t\twasChanged = checkAndFix(position.nodeBefore, writer) || wasChanged;\n\t\t\twasChanged = checkAndFix(position.nodeAfter, writer) || wasChanged;\n\t\t}\n\t\tif (change.name != \"$text\" && change.type == \"insert\") {\n\t\t\tconst insertedNode = position.nodeAfter;\n\t\t\tfor (const item of writer.createRangeIn(insertedNode).getItems()) wasChanged = checkAndFix(item, writer) || wasChanged;\n\t\t}\n\t\tif (change.type == \"insert\" && schema.isInline(change.name)) {\n\t\t\tconst nodeAfterInserted = position.nodeAfter && position.nodeAfter.nextSibling;\n\t\t\twasChanged = checkAndFix(position.nodeBefore, writer) || wasChanged;\n\t\t\twasChanged = checkAndFix(nodeAfterInserted, writer) || wasChanged;\n\t\t}\n\t}\n\treturn wasChanged;\n}\n/**\n* This post-fixer will extend the attribute applied on the part of the mention so the whole text node of the mention will have\n* the added attribute.\n*/\nfunction extendAttributeOnMentionPostFixer(writer, doc) {\n\tconst changes = doc.differ.getChanges();\n\tlet wasChanged = false;\n\tfor (const change of changes) if (change.type === \"attribute\" && change.attributeKey != \"mention\") {\n\t\tconst nodeBefore = change.range.start.nodeBefore;\n\t\tconst nodeAfter = change.range.end.nodeAfter;\n\t\tfor (const node of [nodeBefore, nodeAfter]) if (isBrokenMentionNode(node) && node.getAttribute(change.attributeKey) != change.attributeNewValue) {\n\t\t\twriter.setAttribute(change.attributeKey, change.attributeNewValue, node);\n\t\t\twasChanged = true;\n\t\t}\n\t}\n\treturn wasChanged;\n}\n/**\n* Checks if a node has a correct mention attribute if present.\n* Returns `true` if the node is text and has a mention attribute whose text does not match the expected mention text.\n*/\nfunction isBrokenMentionNode(node) {\n\tif (!node || !(node.is(\"$text\") || node.is(\"$textProxy\")) || !node.hasAttribute(\"mention\")) return false;\n\treturn node.data != node.getAttribute(\"mention\")._text;\n}\n/**\n* Fixes a mention on a text node if it needs a fix.\n*/\nfunction checkAndFix(textNode, writer) {\n\tif (isBrokenMentionNode(textNode)) {\n\t\twriter.removeAttribute(\"mention\", textNode);\n\t\treturn true;\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 mention/ui/mentionsview\n*/\n/**\n* The mention ui view.\n*/\nvar MentionsView = class extends ListView {\n\tselected;\n\tposition;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-mentions\"],\n\t\t\ttabindex: \"-1\"\n\t\t} });\n\t}\n\t/**\n\t* {@link #select Selects} the first item.\n\t*/\n\tselectFirst() {\n\t\tthis.select(0);\n\t}\n\t/**\n\t* Selects next item to the currently {@link #select selected}.\n\t*\n\t* If the last item is already selected, it will select the first item.\n\t*/\n\tselectNext() {\n\t\tconst item = this.selected;\n\t\tconst index = this.items.getIndex(item);\n\t\tthis.select(index + 1);\n\t}\n\t/**\n\t* Selects previous item to the currently {@link #select selected}.\n\t*\n\t* If the first item is already selected, it will select the last item.\n\t*/\n\tselectPrevious() {\n\t\tconst item = this.selected;\n\t\tconst index = this.items.getIndex(item);\n\t\tthis.select(index - 1);\n\t}\n\t/**\n\t* Marks item at a given index as selected.\n\t*\n\t* Handles selection cycling when passed index is out of bounds:\n\t* - if the index is lower than 0, it will select the last item,\n\t* - if the index is higher than the last item index, it will select the first item.\n\t*\n\t* @param index Index of an item to be marked as selected.\n\t*/\n\tselect(index) {\n\t\tlet indexToGet = 0;\n\t\tif (index > 0 && index < this.items.length) indexToGet = index;\n\t\telse if (index < 0) indexToGet = this.items.length - 1;\n\t\tconst item = this.items.get(indexToGet);\n\t\tif (this.selected === item) return;\n\t\tif (this.selected) this.selected.removeHighlight();\n\t\titem.highlight();\n\t\tthis.selected = item;\n\t\tif (!this._isItemVisibleInScrolledArea(item)) this.element.scrollTop = item.element.offsetTop;\n\t}\n\t/**\n\t* Triggers the `execute` event on the {@link #select selected} item.\n\t*/\n\texecuteSelected() {\n\t\tthis.selected.fire(\"execute\");\n\t}\n\t/**\n\t* Checks if an item is visible in the scrollable area.\n\t*\n\t* The item is considered visible when:\n\t* - its top boundary is inside the scrollable rect\n\t* - its bottom boundary is inside the scrollable rect (the whole item must be visible)\n\t*/\n\t_isItemVisibleInScrolledArea(item) {\n\t\treturn new Rect(this.element).contains(new Rect(item.element));\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 mention/ui/domwrapperview\n*/\n/**\n* This class wraps DOM element as a CKEditor5 UI View.\n*\n* It allows to render any DOM element and use it in mentions list.\n*/\nvar MentionDomWrapperView = class extends View {\n\t/**\n\t* The DOM element for which wrapper was created.\n\t*/\n\tdomElement;\n\t/**\n\t* Creates an instance of {@link module:mention/ui/domwrapperview~MentionDomWrapperView} class.\n\t*\n\t* Also see {@link #render}.\n\t*/\n\tconstructor(locale, domElement) {\n\t\tsuper(locale);\n\t\tthis.template = void 0;\n\t\tthis.domElement = domElement;\n\t\tthis.domElement.classList.add(\"ck-button\");\n\t\tthis.set(\"isOn\", false);\n\t\tthis.on(\"change:isOn\", (evt, name, isOn) => {\n\t\t\tif (isOn) {\n\t\t\t\tthis.domElement.classList.add(\"ck-on\");\n\t\t\t\tthis.domElement.classList.remove(\"ck-off\");\n\t\t\t} else {\n\t\t\t\tthis.domElement.classList.add(\"ck-off\");\n\t\t\t\tthis.domElement.classList.remove(\"ck-on\");\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(this.domElement, \"click\", () => {\n\t\t\tthis.fire(\"execute\");\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.element = this.domElement;\n\t}\n\t/**\n\t* Focuses the DOM element.\n\t*/\n\tfocus() {\n\t\tthis.domElement.focus();\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 mention/ui/mentionlistitemview\n*/\nvar MentionListItemView = class extends ListItemView {\n\titem;\n\tmarker;\n\thighlight() {\n\t\tconst child = this.children.first;\n\t\tchild.isOn = true;\n\t}\n\tremoveHighlight() {\n\t\tconst child = this.children.first;\n\t\tchild.isOn = false;\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 mention/mentionui\n*/\nconst VERTICAL_SPACING = 3;\nconst defaultHandledKeyCodes = [\n\tkeyCodes.arrowup,\n\tkeyCodes.arrowdown,\n\tkeyCodes.esc\n];\nconst defaultCommitKeyCodes = [keyCodes.enter, keyCodes.tab];\n/**\n* The mention UI feature.\n*/\nvar MentionUI = class extends Plugin {\n\t/**\n\t* The mention view.\n\t*/\n\t_mentionsView;\n\t/**\n\t* Stores mention feeds configurations.\n\t*/\n\t_mentionsConfigurations;\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t_items = new Collection();\n\t_lastRequested;\n\t/**\n\t* Debounced feed requester. It uses `es-toolkit#debounce` method to delay function call.\n\t*/\n\t_requestFeedDebounced;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MentionUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._mentionsView = this._createMentionView();\n\t\tthis._mentionsConfigurations = /* @__PURE__ */ new Map();\n\t\tthis._requestFeedDebounced = debounce(this._requestFeed, 100);\n\t\teditor.config.define(\"mention\", { feeds: [] });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst commitKeys = editor.config.get(\"mention.commitKeys\") || defaultCommitKeyCodes;\n\t\tconst handledKeyCodes = defaultHandledKeyCodes.concat(commitKeys);\n\t\tthis._balloon = editor.plugins.get(ContextualBalloon);\n\t\teditor.editing.view.document.on(\"keydown\", (evt, data) => {\n\t\t\tif (isHandledKey(data.keyCode) && this._isUIVisible) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t\tif (data.keyCode == keyCodes.arrowdown) this._mentionsView.selectNext();\n\t\t\t\tif (data.keyCode == keyCodes.arrowup) this._mentionsView.selectPrevious();\n\t\t\t\tif (commitKeys.includes(data.keyCode)) this._mentionsView.executeSelected();\n\t\t\t\tif (data.keyCode == keyCodes.esc) this._hideUIAndRemoveMarker();\n\t\t\t}\n\t\t}, { priority: \"highest\" });\n\t\tclickOutsideHandler({\n\t\t\temitter: this._mentionsView,\n\t\t\tactivator: () => this._isUIVisible,\n\t\t\tcontextElements: () => [this._balloon.view.element],\n\t\t\tcallback: () => this._hideUIAndRemoveMarker()\n\t\t});\n\t\tconst feeds = editor.config.get(\"mention.feeds\");\n\t\tfor (const mentionDescription of feeds) {\n\t\t\tconst { feed, marker, dropdownLimit } = mentionDescription;\n\t\t\tif (!isValidMentionMarker(marker))\n /**\n\t\t\t* The marker must be a single character.\n\t\t\t*\n\t\t\t* Correct markers: `'@'`, `'#'`.\n\t\t\t*\n\t\t\t* Incorrect markers: `'$$'`, `'[@'`.\n\t\t\t*\n\t\t\t* See {@link module:mention/mentionconfig~MentionConfig}.\n\t\t\t*\n\t\t\t* @error mentionconfig-incorrect-marker\n\t\t\t* @param {string} marker Configured marker\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"mentionconfig-incorrect-marker\", null, { marker });\n\t\t\tconst definition = {\n\t\t\t\tmarker,\n\t\t\t\tfeedCallback: typeof feed == \"function\" ? feed.bind(this.editor) : createFeedCallback(feed),\n\t\t\t\titemRenderer: mentionDescription.itemRenderer,\n\t\t\t\tdropdownLimit\n\t\t\t};\n\t\t\tthis._mentionsConfigurations.set(marker, definition);\n\t\t}\n\t\tthis._setupTextWatcher(feeds);\n\t\tthis.listenTo(editor, \"change:isReadOnly\", () => {\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t});\n\t\tthis.on(\"requestFeed:response\", (evt, data) => this._handleFeedResponse(data));\n\t\tthis.on(\"requestFeed:error\", () => this._hideUIAndRemoveMarker());\n\t\t/**\n\t\t* Checks if a given key code is handled by the mention UI.\n\t\t*/\n\t\tfunction isHandledKey(keyCode) {\n\t\t\treturn handledKeyCodes.includes(keyCode);\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._mentionsView.destroy();\n\t}\n\t/**\n\t* Returns true when {@link #_mentionsView} is in the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon} and it is\n\t* currently visible.\n\t*/\n\tget _isUIVisible() {\n\t\treturn this._balloon.visibleView === this._mentionsView;\n\t}\n\t/**\n\t* Creates the {@link #_mentionsView}.\n\t*/\n\t_createMentionView() {\n\t\tconst locale = this.editor.locale;\n\t\tconst mentionsView = new MentionsView(locale);\n\t\tmentionsView.items.bindTo(this._items).using((data) => {\n\t\t\tconst { item, marker } = data;\n\t\t\tconst { dropdownLimit: markerDropdownLimit } = this._mentionsConfigurations.get(marker);\n\t\t\tconst dropdownLimit = markerDropdownLimit || this.editor.config.get(\"mention.dropdownLimit\") || 10;\n\t\t\tif (mentionsView.items.length >= dropdownLimit) return null;\n\t\t\tconst listItemView = new MentionListItemView(locale);\n\t\t\tconst view = this._renderItem(item, marker);\n\t\t\tview.delegate(\"execute\").to(listItemView);\n\t\t\tlistItemView.children.add(view);\n\t\t\tlistItemView.item = item;\n\t\t\tlistItemView.marker = marker;\n\t\t\tlistItemView.on(\"execute\", () => {\n\t\t\t\tmentionsView.fire(\"execute\", {\n\t\t\t\t\titem,\n\t\t\t\t\tmarker\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn listItemView;\n\t\t});\n\t\tmentionsView.on(\"execute\", (evt, data) => {\n\t\t\tconst editor = this.editor;\n\t\t\tconst model = editor.model;\n\t\t\tconst item = data.item;\n\t\t\tconst marker = data.marker;\n\t\t\tconst mentionMarker = editor.model.markers.get(\"mention\");\n\t\t\tconst end = model.createPositionAt(model.document.selection.focus);\n\t\t\tconst start = model.createPositionAt(mentionMarker.getStart());\n\t\t\tconst range = model.createRange(start, end);\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t\teditor.execute(\"mention\", {\n\t\t\t\tmention: item,\n\t\t\t\ttext: item.text,\n\t\t\t\tmarker,\n\t\t\t\trange\n\t\t\t});\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn mentionsView;\n\t}\n\t/**\n\t* Returns item renderer for the marker.\n\t*/\n\t_getItemRenderer(marker) {\n\t\tconst { itemRenderer } = this._mentionsConfigurations.get(marker);\n\t\treturn itemRenderer;\n\t}\n\t/**\n\t* Requests a feed from a configured callbacks.\n\t*/\n\t_requestFeed(marker, feedText) {\n\t\tthis._lastRequested = feedText;\n\t\tconst { feedCallback } = this._mentionsConfigurations.get(marker);\n\t\tconst feedResponse = feedCallback(feedText);\n\t\tif (!(feedResponse instanceof Promise)) {\n\t\t\tthis.fire(\"requestFeed:response\", {\n\t\t\t\tfeed: feedResponse,\n\t\t\t\tmarker,\n\t\t\t\tfeedText\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tfeedResponse.then((response) => {\n\t\t\tif (this._lastRequested == feedText) this.fire(\"requestFeed:response\", {\n\t\t\t\tfeed: response,\n\t\t\t\tmarker,\n\t\t\t\tfeedText\n\t\t\t});\n\t\t\telse this.fire(\"requestFeed:discarded\", {\n\t\t\t\tfeed: response,\n\t\t\t\tmarker,\n\t\t\t\tfeedText\n\t\t\t});\n\t\t}).catch((error) => {\n\t\t\tthis.fire(\"requestFeed:error\", { error });\n\t\t\t/**\n\t\t\t* The callback used for obtaining mention autocomplete feed thrown and error and the mention UI was hidden or\n\t\t\t* not displayed at all.\n\t\t\t*\n\t\t\t* @error mention-feed-callback-error\n\t\t\t*/\n\t\t\tlogWarning(\"mention-feed-callback-error\", { marker });\n\t\t});\n\t}\n\t/**\n\t* Registers a text watcher for the marker.\n\t*/\n\t_setupTextWatcher(feeds) {\n\t\tconst editor = this.editor;\n\t\tconst feedsWithPattern = feeds.map((feed) => ({\n\t\t\t...feed,\n\t\t\tpattern: createRegExp(feed.marker, feed.minimumCharacters || 0)\n\t\t}));\n\t\tconst watcher = new TextWatcher(editor.model, createTestCallback(feedsWithPattern));\n\t\twatcher.on(\"matched\", (evt, data) => {\n\t\t\tconst markerDefinition = getLastValidMarkerInText(feedsWithPattern, data.text);\n\t\t\tconst focus = editor.model.document.selection.focus;\n\t\t\tconst markerPosition = editor.model.createPositionAt(focus.parent, markerDefinition.position);\n\t\t\tif (isPositionInExistingMention(focus) || isMarkerInExistingMention(markerPosition)) {\n\t\t\t\tthis._hideUIAndRemoveMarker();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst feedText = requestFeedText(markerDefinition, data.text);\n\t\t\tconst matchedTextLength = markerDefinition.marker.length + feedText.length;\n\t\t\tconst start = focus.getShiftedBy(-matchedTextLength);\n\t\t\tconst end = focus.getShiftedBy(-feedText.length);\n\t\t\tconst markerRange = editor.model.createRange(start, end);\n\t\t\tif (checkIfStillInCompletionMode(editor)) {\n\t\t\t\tconst mentionMarker = editor.model.markers.get(\"mention\");\n\t\t\t\teditor.model.change((writer) => {\n\t\t\t\t\twriter.updateMarker(mentionMarker, { range: markerRange });\n\t\t\t\t});\n\t\t\t} else editor.model.change((writer) => {\n\t\t\t\twriter.addMarker(\"mention\", {\n\t\t\t\t\trange: markerRange,\n\t\t\t\t\tusingOperation: false,\n\t\t\t\t\taffectsData: false\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis._requestFeedDebounced(markerDefinition.marker, feedText);\n\t\t});\n\t\twatcher.on(\"unmatched\", () => {\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t});\n\t\tconst mentionCommand = editor.commands.get(\"mention\");\n\t\twatcher.bind(\"isEnabled\").to(mentionCommand);\n\t\treturn watcher;\n\t}\n\t/**\n\t* Handles the feed response event data.\n\t*/\n\t_handleFeedResponse(data) {\n\t\tconst { feed, marker } = data;\n\t\tif (!checkIfStillInCompletionMode(this.editor)) return;\n\t\tif (!this.editor.commands.get(\"mention\").isEnabled) {\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t\treturn;\n\t\t}\n\t\tthis._items.clear();\n\t\tfor (const feedItem of feed) {\n\t\t\tconst item = typeof feedItem != \"object\" ? {\n\t\t\t\tid: feedItem,\n\t\t\t\ttext: feedItem\n\t\t\t} : feedItem;\n\t\t\tthis._items.add({\n\t\t\t\titem,\n\t\t\t\tmarker\n\t\t\t});\n\t\t}\n\t\tconst mentionMarker = this.editor.model.markers.get(\"mention\");\n\t\tif (this._items.length) this._showOrUpdateUI(mentionMarker);\n\t\telse this._hideUIAndRemoveMarker();\n\t}\n\t/**\n\t* Shows the mentions balloon. If the panel is already visible, it will reposition it.\n\t*/\n\t_showOrUpdateUI(markerMarker) {\n\t\tif (this._isUIVisible) this._balloon.updatePosition(this._getBalloonPanelPositionData(markerMarker, this._mentionsView.position));\n\t\telse this._balloon.add({\n\t\t\tview: this._mentionsView,\n\t\t\tposition: this._getBalloonPanelPositionData(markerMarker, this._mentionsView.position),\n\t\t\tsingleViewMode: true,\n\t\t\tballoonClassName: \"ck-mention-balloon\"\n\t\t});\n\t\tthis._mentionsView.position = this._balloon.view.position;\n\t\tthis._mentionsView.selectFirst();\n\t}\n\t/**\n\t* Hides the mentions balloon and removes the 'mention' marker from the markers collection.\n\t*/\n\t_hideUIAndRemoveMarker() {\n\t\tif (this._balloon.hasView(this._mentionsView)) this._balloon.remove(this._mentionsView);\n\t\tif (checkIfStillInCompletionMode(this.editor)) this.editor.model.change((writer) => writer.removeMarker(\"mention\"));\n\t\tthis._mentionsView.position = void 0;\n\t}\n\t/**\n\t* Renders a single item in the autocomplete list.\n\t*/\n\t_renderItem(item, marker) {\n\t\tconst editor = this.editor;\n\t\tlet view;\n\t\tlet label = item.id;\n\t\tconst renderer = this._getItemRenderer(marker);\n\t\tif (renderer) {\n\t\t\tconst renderResult = renderer(item);\n\t\t\tif (typeof renderResult != \"string\") view = new MentionDomWrapperView(editor.locale, renderResult);\n\t\t\telse label = renderResult;\n\t\t}\n\t\tif (!view) {\n\t\t\tconst buttonView = new ButtonView(editor.locale);\n\t\t\tbuttonView.label = label;\n\t\t\tbuttonView.withText = true;\n\t\t\tview = buttonView;\n\t\t}\n\t\treturn view;\n\t}\n\t/**\n\t* Creates a position options object used to position the balloon panel.\n\t*\n\t* @param mentionMarker\n\t* @param preferredPosition The name of the last matched position name.\n\t*/\n\t_getBalloonPanelPositionData(mentionMarker, preferredPosition) {\n\t\tconst editor = this.editor;\n\t\tconst editing = editor.editing;\n\t\tconst domConverter = editing.view.domConverter;\n\t\tconst mapper = editing.mapper;\n\t\tconst uiLanguageDirection = editor.locale.uiLanguageDirection;\n\t\treturn {\n\t\t\ttarget: () => {\n\t\t\t\tlet modelRange = mentionMarker.getRange();\n\t\t\t\tif (modelRange.start.root.rootName == \"$graveyard\") modelRange = editor.model.document.selection.getFirstRange();\n\t\t\t\tconst viewRange = mapper.toViewRange(modelRange);\n\t\t\t\treturn Rect.getDomRangeRects(domConverter.viewRangeToDom(viewRange)).pop();\n\t\t\t},\n\t\t\tlimiter: () => {\n\t\t\t\tconst view = this.editor.editing.view;\n\t\t\t\tconst editableElement = view.document.selection.editableElement;\n\t\t\t\tif (editableElement) return view.domConverter.mapViewToDom(editableElement.root);\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tpositions: getBalloonPanelPositions(preferredPosition, uiLanguageDirection)\n\t\t};\n\t}\n};\n/**\n* Returns the balloon positions data callbacks.\n*/\nfunction getBalloonPanelPositions(preferredPosition, uiLanguageDirection) {\n\tconst positions = {\n\t\t\"caret_se\": (targetRect, balloonRect, viewportRect) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.bottom + VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport(targetRect.right, balloonRect, viewportRect),\n\t\t\t\tname: \"caret_se\",\n\t\t\t\tconfig: { withArrow: false }\n\t\t\t};\n\t\t},\n\t\t\"caret_ne\": (targetRect, balloonRect, viewportRect) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport(targetRect.right, balloonRect, viewportRect),\n\t\t\t\tname: \"caret_ne\",\n\t\t\t\tconfig: { withArrow: false }\n\t\t\t};\n\t\t},\n\t\t\"caret_sw\": (targetRect, balloonRect, viewportRect) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.bottom + VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport(targetRect.right - balloonRect.width, balloonRect, viewportRect),\n\t\t\t\tname: \"caret_sw\",\n\t\t\t\tconfig: { withArrow: false }\n\t\t\t};\n\t\t},\n\t\t\"caret_nw\": (targetRect, balloonRect, viewportRect) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport(targetRect.right - balloonRect.width, balloonRect, viewportRect),\n\t\t\t\tname: \"caret_nw\",\n\t\t\t\tconfig: { withArrow: false }\n\t\t\t};\n\t\t}\n\t};\n\tif (Object.prototype.hasOwnProperty.call(positions, preferredPosition)) return [positions[preferredPosition]];\n\treturn uiLanguageDirection !== \"rtl\" ? [\n\t\tpositions.caret_se,\n\t\tpositions.caret_sw,\n\t\tpositions.caret_ne,\n\t\tpositions.caret_nw\n\t] : [\n\t\tpositions.caret_sw,\n\t\tpositions.caret_se,\n\t\tpositions.caret_nw,\n\t\tpositions.caret_ne\n\t];\n}\n/**\n* Keeps the panel within the viewport horizontally, so it does not get cut off\n* when the caret is close to the screen edge (e.g. on mobile).\n*\n* See https://github.com/ckeditor/ckeditor5/issues/20182.\n*/\nfunction fitLeftInViewport(left, balloonRect, viewportRect) {\n\treturn Math.max(viewportRect.left, Math.min(left, viewportRect.right - balloonRect.width));\n}\n/**\n* Returns a marker definition of the last valid occurring marker in a given string.\n* If there is no valid marker in a string, it returns undefined.\n*\n* Example of returned object:\n*\n* ```ts\n* {\n* \tmarker: '@',\n* \tposition: 4,\n* \tminimumCharacters: 0\n* }\n* ````\n*\n* @param feedsWithPattern Registered feeds in editor for mention plugin with created RegExp for matching marker.\n* @param text String to find the marker in\n* @returns Matched marker's definition\n*/\nfunction getLastValidMarkerInText(feedsWithPattern, text) {\n\tlet lastValidMarker;\n\tfor (const feed of feedsWithPattern) {\n\t\tconst currentMarkerLastIndex = text.lastIndexOf(feed.marker);\n\t\tif (currentMarkerLastIndex > 0 && !text.substring(currentMarkerLastIndex - 1).match(feed.pattern)) continue;\n\t\tif (!lastValidMarker || currentMarkerLastIndex >= lastValidMarker.position) lastValidMarker = {\n\t\t\tmarker: feed.marker,\n\t\t\tposition: currentMarkerLastIndex,\n\t\t\tminimumCharacters: feed.minimumCharacters,\n\t\t\tpattern: feed.pattern\n\t\t};\n\t}\n\treturn lastValidMarker;\n}\n/**\n* Creates a RegExp pattern for the marker.\n*\n* Function has to be exported to achieve 100% code coverage.\n*\n* @internal\n*/\nfunction createRegExp(marker, minimumCharacters) {\n\tconst numberOfCharacters = minimumCharacters == 0 ? \"*\" : `{${minimumCharacters},}`;\n\tconst openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? \"\\\\p{Ps}\\\\p{Pi}\\\"'\" : \"\\\\(\\\\[{\\\"'\";\n\tconst mentionCharacters = \".\";\n\tmarker = marker.replace(/[.*+?^${}()\\-|[\\]\\\\]/g, \"\\\\$&\");\n\tconst pattern = `(?:^|[ ${openAfterCharacters}])(${marker})(${mentionCharacters}${numberOfCharacters})$`;\n\treturn new RegExp(pattern, \"u\");\n}\n/**\n* Creates a test callback for the marker to be used in the text watcher instance.\n*\n* @param feedsWithPattern Feeds of mention plugin configured in editor with RegExp to match marker in text\n*/\nfunction createTestCallback(feedsWithPattern) {\n\tconst textMatcher = (text) => {\n\t\tconst markerDefinition = getLastValidMarkerInText(feedsWithPattern, text);\n\t\tif (!markerDefinition) return false;\n\t\tlet splitStringFrom = 0;\n\t\tif (markerDefinition.position !== 0) splitStringFrom = markerDefinition.position - 1;\n\t\tconst textToTest = text.substring(splitStringFrom);\n\t\treturn markerDefinition.pattern.test(textToTest);\n\t};\n\treturn textMatcher;\n}\n/**\n* Creates a text matcher from the marker.\n*/\nfunction requestFeedText(markerDefinition, text) {\n\tlet splitStringFrom = 0;\n\tif (markerDefinition.position !== 0) splitStringFrom = markerDefinition.position - 1;\n\tconst regExp = createRegExp(markerDefinition.marker, 0);\n\treturn text.substring(splitStringFrom).match(regExp)[2];\n}\n/**\n* The default feed callback.\n*/\nfunction createFeedCallback(feedItems) {\n\treturn (feedText) => {\n\t\treturn feedItems.filter((item) => {\n\t\t\treturn (typeof item == \"string\" ? item : String(item.id)).toLowerCase().includes(feedText.toLowerCase());\n\t\t});\n\t};\n}\n/**\n* Checks if position in inside or right after a text with a mention.\n*/\nfunction isPositionInExistingMention(position) {\n\tconst hasMention = position.textNode && position.textNode.hasAttribute(\"mention\");\n\tconst nodeBefore = position.nodeBefore;\n\treturn hasMention || nodeBefore && nodeBefore.is(\"$text\") && nodeBefore.hasAttribute(\"mention\");\n}\n/**\n* Checks if the closest marker offset is at the beginning of a mention.\n*\n* See https://github.com/ckeditor/ckeditor5/issues/11400.\n*/\nfunction isMarkerInExistingMention(markerPosition) {\n\tconst nodeAfter = markerPosition.nodeAfter;\n\treturn nodeAfter && nodeAfter.is(\"$text\") && nodeAfter.hasAttribute(\"mention\");\n}\n/**\n* Checks if string is a valid mention marker.\n*/\nfunction isValidMentionMarker(marker) {\n\treturn !!marker;\n}\n/**\n* Checks the mention plugins is in completion mode (e.g. when typing is after a valid mention string like @foo).\n*/\nfunction checkIfStillInCompletionMode(editor) {\n\treturn editor.model.markers.has(\"mention\");\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 mention/mention\n*/\n/**\n* The mention plugin.\n*\n* For a detailed overview, check the {@glink features/mentions Mention feature} guide.\n*/\nvar Mention = class extends Plugin {\n\ttoMentionAttribute(viewElement, data) {\n\t\treturn _toMentionAttribute(viewElement, data);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Mention\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [MentionEditing, MentionUI];\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 { Mention, MentionCommand, MentionDomWrapperView, MentionEditing, MentionListItemView, MentionUI, MentionsView, _addMentionAttributes, createRegExp as _createMentionMarkerRegExp, _toMentionAttribute };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module mention/mentioncommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelRange } from '@ckeditor/ckeditor5-engine';\nimport { CKEditorError, toMap } from '@ckeditor/ckeditor5-utils';\n\nimport { _addMentionAttributes } from './mentionediting.js';\n\nconst BRACKET_PAIRS = {\n\t'(': ')',\n\t'[': ']',\n\t'{': '}'\n} as const;\n\n/**\n * The mention command.\n *\n * The command is registered by {@link module:mention/mentionediting~MentionEditing} as `'mention'`.\n *\n * To insert a mention into a range, execute the command and specify a mention object with a range to replace:\n *\n * ```ts\n * const focus = editor.model.document.selection.focus;\n *\n * // It will replace one character before the selection focus with the '#1234' text\n * // with the mention attribute filled with passed attributes.\n * editor.execute( 'mention', {\n * \tmarker: '#',\n * \tmention: {\n * \t\tid: '#1234',\n * \t\tname: 'Foo',\n * \t\ttitle: 'Big Foo'\n * \t},\n * \trange: editor.model.createRange( focus.getShiftedBy( -1 ), focus )\n * } );\n *\n * // It will replace one character before the selection focus with the 'The \"Big Foo\"' text\n * // with the mention attribute filled with passed attributes.\n * editor.execute( 'mention', {\n * \tmarker: '#',\n * \tmention: {\n * \t\tid: '#1234',\n * \t\tname: 'Foo',\n * \t\ttitle: 'Big Foo'\n * \t},\n * \ttext: 'The \"Big Foo\"',\n * \trange: editor.model.createRange( focus.getShiftedBy( -1 ), focus )\n * } );\n *\t```\n */\nexport class MentionCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic constructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Since this command may pass range in execution parameters, it should be checked directly in execute block.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection( doc.selection, 'mention' );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.mention The mention object to insert. When a string is passed, it will be used to create a plain\n\t * object with the name attribute that equals the passed string.\n\t * @param options.marker The marker character (e.g. `'@'`).\n\t * @param options.text The text of the inserted mention. Defaults to the full mention string composed from `marker` and\n\t * `mention` string or `mention.id` if an object is passed.\n\t * @param options.range The range to replace.\n\t * Note that the replaced range might be shorter than the inserted text with the mention attribute.\n\t * @fires execute\n\t */\n\tpublic override execute( options: {\n\t\tmention: string | { id: string; [ key: string ]: unknown };\n\t\tmarker: string;\n\t\ttext?: string;\n\t\trange?: ModelRange;\n\t} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selection = document.selection;\n\n\t\tconst mentionData = typeof options.mention == 'string' ? { id: options.mention } : options.mention;\n\t\tconst mentionID = mentionData.id;\n\n\t\tconst range = options.range || selection.getFirstRange();\n\n\t\t// Don't execute command if range is in non-editable place.\n\t\tif ( !model.canEditAt( range ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mentionText = options.text || mentionID;\n\n\t\tconst mention = _addMentionAttributes( { _text: mentionText, id: mentionID }, mentionData );\n\n\t\tif ( !mentionID.startsWith( options.marker ) ) {\n\t\t\t/**\n\t\t\t * The feed item ID must start with the marker character(s).\n\t\t\t *\n\t\t\t * Correct mention feed setting:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * mentions: [\n\t\t\t * \t{\n\t\t\t * \t\tmarker: '@',\n\t\t\t * \t\tfeed: [ '@Ann', '@Barney', ... ]\n\t\t\t * \t}\n\t\t\t * ]\n\t\t\t * ```\n\t\t\t *\n\t\t\t * Incorrect mention feed setting:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * mentions: [\n\t\t\t * \t{\n\t\t\t * \t\tmarker: '@',\n\t\t\t * \t\tfeed: [ 'Ann', 'Barney', ... ]\n\t\t\t * \t}\n\t\t\t * ]\n\t\t\t * ```\n\t\t\t *\n\t\t\t * See {@link module:mention/mentionconfig~MentionConfig}.\n\t\t\t *\n\t\t\t * @error mentioncommand-incorrect-id\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'mentioncommand-incorrect-id',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst currentAttributes = toMap( selection.getAttributes() );\n\t\t\tconst attributesWithMention = new Map( currentAttributes.entries() );\n\n\t\t\tattributesWithMention.set( 'mention', mention );\n\n\t\t\t// Replace a range with the text with a mention.\n\t\t\tconst insertionRange = model.insertContent( writer.createText( mentionText, attributesWithMention ), range );\n\t\t\tconst nodeBefore = insertionRange.start.nodeBefore;\n\t\t\tconst nodeAfter = insertionRange.end.nodeAfter;\n\n\t\t\tconst isFollowedByWhiteSpace = nodeAfter && nodeAfter.is( '$text' ) && nodeAfter.data.startsWith( ' ' );\n\t\t\tlet isInsertedInBrackets = false;\n\n\t\t\tif ( nodeBefore && nodeAfter && nodeBefore.is( '$text' ) && nodeAfter.is( '$text' ) ) {\n\t\t\t\tconst precedingCharacter = nodeBefore.data.slice( -1 );\n\t\t\t\tconst isPrecededByOpeningBracket = precedingCharacter in BRACKET_PAIRS;\n\t\t\t\tconst isFollowedByBracketClosure = isPrecededByOpeningBracket && nodeAfter.data.startsWith(\n\t\t\t\t\tBRACKET_PAIRS[ precedingCharacter as keyof typeof BRACKET_PAIRS ]\n\t\t\t\t);\n\n\t\t\t\tisInsertedInBrackets = isPrecededByOpeningBracket && isFollowedByBracketClosure;\n\t\t\t}\n\n\t\t\t// Don't add a white space if either of the following is true:\n\t\t\t// * there's already one after the mention;\n\t\t\t// * the mention was inserted in the empty matching brackets.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/4651\n\t\t\tif ( !isInsertedInBrackets && !isFollowedByWhiteSpace ) {\n\t\t\t\tmodel.insertContent( writer.createText( ' ', currentAttributes ), range!.start.getShiftedBy( mentionText.length ) );\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module mention/mentionediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport type {\n\tModelElement,\n\tModelText,\n\tModelWriter,\n\tModelDocument,\n\tViewAttributeElement,\n\tDowncastConversionApi,\n\tDowncastDispatcher,\n\tModelPosition,\n\tModelSchema,\n\tDowncastAttributeEvent,\n\tModelItem\n} from '@ckeditor/ckeditor5-engine';\nimport { uid } from '@ckeditor/ckeditor5-utils';\n\nimport { MentionCommand } from './mentioncommand.js';\nimport type { MentionAttribute } from './mention.js';\n\n/**\n * The mention editing feature.\n *\n * It introduces the {@link module:mention/mentioncommand~MentionCommand command} and the `mention`\n * attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}\n * as a `<span class=\"mention\" data-mention=\"@mention\">`.\n */\nexport class MentionEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MentionEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\t// Allow the mention attribute on all text nodes.\n\t\tmodel.schema.extend( '$text', { allowAttributes: 'mention' } );\n\n\t\t// Disallow the mention attribute on text nodes inside code blocks.\n\t\t// This prevents mention-based features (slash commands, emoji autocomplete)\n\t\t// from triggering inside code blocks.\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tif ( context.endsWith( 'codeBlock $text' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'mention' );\n\n\t\t// Upcast conversion.\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tattributes: 'data-mention',\n\t\t\t\tclasses: 'mention'\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'mention',\n\t\t\t\tvalue: ( viewElement: ModelElement ) => _toMentionAttribute( viewElement )\n\t\t\t}\n\t\t} );\n\n\t\t// Downcast conversion.\n\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: 'mention',\n\t\t\tview: createViewMentionElement\n\t\t} );\n\t\teditor.conversion.for( 'downcast' ).add( preventPartialMentionDowncast );\n\n\t\tdoc.registerPostFixer( writer => removePartialMentionPostFixer( writer, doc, model.schema ) );\n\t\tdoc.registerPostFixer( writer => extendAttributeOnMentionPostFixer( writer, doc ) );\n\t\tdoc.registerPostFixer( writer => selectionMentionAttributePostFixer( writer, doc ) );\n\n\t\teditor.commands.add( 'mention', new MentionCommand( editor ) );\n\t}\n}\n\n/**\n * @internal\n */\nexport function _addMentionAttributes(\n\tbaseMentionData: { id: string; _text: string },\n\tdata?: Record<string, unknown>\n): MentionAttribute {\n\treturn Object.assign( { uid: uid().slice( 0, 8 ) }, baseMentionData, data || {} );\n}\n\n/**\n * Creates a mention attribute value from the provided view element and optional data.\n *\n * This function is exposed as\n * {@link module:mention/mention~Mention#toMentionAttribute `editor.plugins.get( 'Mention' ).toMentionAttribute()`}.\n *\n * @internal\n */\nexport function _toMentionAttribute(\n\tviewElementOrMention: ModelElement,\n\tdata?: Record<string, unknown>\n): MentionAttribute | undefined {\n\tconst dataMention = viewElementOrMention.getAttribute( 'data-mention' ) as string;\n\n\tconst textNode = viewElementOrMention.getChild( 0 ) as ModelText;\n\n\t// Do not convert empty mentions.\n\tif ( !textNode ) {\n\t\treturn;\n\t}\n\n\tconst dataUid = viewElementOrMention.getAttribute( 'data-mention-uid' ) as string;\n\n\tconst baseMentionData = {\n\t\tid: dataMention,\n\t\t_text: textNode.data\n\t};\n\n\treturn _addMentionAttributes( baseMentionData, dataUid ? { uid: dataUid, ...data } : data );\n}\n\n/**\n * A converter that blocks partial mention from being converted.\n *\n * This converter is registered with 'highest' priority in order to consume mention attribute before it is converted by\n * any other converters. This converter only consumes partial mention - those whose `_text` attribute is not equal to text with mention\n * attribute. This may happen when copying part of mention text.\n */\nfunction preventPartialMentionDowncast( dispatcher: DowncastDispatcher ) {\n\tdispatcher.on<DowncastAttributeEvent>( 'attribute:mention', ( evt, data, conversionApi ) => {\n\t\tconst mention = data.attributeNewValue as MentionAttribute;\n\n\t\tif ( !data.item.is( '$textProxy' ) || !mention ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst start = data.range.start;\n\t\tconst textNode = start.textNode || start.nodeAfter as ModelText;\n\n\t\tif ( textNode!.data != mention._text ) {\n\t\t\t// Consume item to prevent partial mention conversion.\n\t\t\tconversionApi.consumable.consume( data.item, evt.name );\n\t\t}\n\t}, { priority: 'highest' } );\n}\n\n/**\n * Creates a mention element from the mention data.\n */\nfunction createViewMentionElement(\n\tmention: MentionAttribute,\n\t{ writer, options }: DowncastConversionApi\n): ViewAttributeElement | undefined {\n\tif ( !mention ) {\n\t\treturn;\n\t}\n\n\treturn writer.createAttributeElement( 'span', {\n\t\tclass: 'mention',\n\t\t'data-mention': mention.id,\n\t\t// Omit `data-mention-uid` in clipboard (copy/cut) to prevent UIDs duplication.\n\t\t...( !options.isClipboardPipeline && { 'data-mention-uid': mention.uid } )\n\t}, {\n\t\tid: mention.uid,\n\t\tpriority: 20\n\t} );\n}\n\n/**\n * Model post-fixer that disallows typing with selection when the selection is placed after the text node with the mention attribute or\n * before a text node with mention attribute.\n */\nfunction selectionMentionAttributePostFixer( writer: ModelWriter, doc: ModelDocument ): boolean {\n\tconst selection = doc.selection;\n\tconst focus = selection.focus;\n\n\tif ( selection.isCollapsed && selection.hasAttribute( 'mention' ) && shouldNotTypeWithMentionAt( focus! ) ) {\n\t\twriter.removeSelectionAttribute( 'mention' );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Helper function to detect if mention attribute should be removed from selection.\n * This check makes only sense if the selection has mention attribute.\n *\n * The mention attribute should be removed from a selection when selection focus is placed:\n * a) after a text node\n * b) the position is at parents start - the selection will set attributes from node after.\n */\nfunction shouldNotTypeWithMentionAt( position: ModelPosition ): boolean {\n\tconst isAtStart = position.isAtStart;\n\tconst isAfterAMention = position.nodeBefore && position.nodeBefore.is( '$text' );\n\n\treturn isAfterAMention || isAtStart;\n}\n\n/**\n * Model post-fixer that removes the mention attribute from the modified text node.\n */\nfunction removePartialMentionPostFixer( writer: ModelWriter, doc: ModelDocument, schema: ModelSchema ): boolean {\n\tconst changes = doc.differ.getChanges();\n\n\tlet wasChanged = false;\n\n\tfor ( const change of changes ) {\n\t\tif ( change.type == 'attribute' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Checks the text node on the current position.\n\t\tconst position = change.position;\n\n\t\tif ( change.name == '$text' ) {\n\t\t\tconst nodeAfterInsertedTextNode = position.textNode && position.textNode.nextSibling;\n\n\t\t\t// Checks the text node where the change occurred.\n\t\t\twasChanged = checkAndFix( position.textNode, writer ) || wasChanged;\n\n\t\t\t// Occurs on paste inside a text node with mention.\n\t\t\twasChanged = checkAndFix( nodeAfterInsertedTextNode, writer ) || wasChanged;\n\t\t\twasChanged = checkAndFix( position.nodeBefore, writer ) || wasChanged;\n\t\t\twasChanged = checkAndFix( position.nodeAfter, writer ) || wasChanged;\n\t\t}\n\n\t\t// Checks text nodes in inserted elements (might occur when splitting a paragraph or pasting content inside text with mention).\n\t\tif ( change.name != '$text' && change.type == 'insert' ) {\n\t\t\tconst insertedNode = position.nodeAfter as ModelElement;\n\n\t\t\tfor ( const item of writer.createRangeIn( insertedNode! ).getItems() ) {\n\t\t\t\twasChanged = checkAndFix( item, writer ) || wasChanged;\n\t\t\t}\n\t\t}\n\n\t\t// Inserted inline elements might break mention.\n\t\tif ( change.type == 'insert' && schema.isInline( change.name ) ) {\n\t\t\tconst nodeAfterInserted = position.nodeAfter && position.nodeAfter.nextSibling;\n\n\t\t\twasChanged = checkAndFix( position.nodeBefore, writer ) || wasChanged;\n\t\t\twasChanged = checkAndFix( nodeAfterInserted, writer ) || wasChanged;\n\t\t}\n\t}\n\n\treturn wasChanged;\n}\n\n/**\n * This post-fixer will extend the attribute applied on the part of the mention so the whole text node of the mention will have\n * the added attribute.\n */\nfunction extendAttributeOnMentionPostFixer( writer: ModelWriter, doc: ModelDocument ): boolean {\n\tconst changes = doc.differ.getChanges();\n\n\tlet wasChanged = false;\n\n\tfor ( const change of changes ) {\n\t\tif ( change.type === 'attribute' && change.attributeKey != 'mention' ) {\n\t\t\t// Checks the node on the left side of the range...\n\t\t\tconst nodeBefore = change.range.start.nodeBefore;\n\t\t\t// ... and on the right side of the range.\n\t\t\tconst nodeAfter = change.range.end.nodeAfter;\n\n\t\t\tfor ( const node of [ nodeBefore, nodeAfter ] ) {\n\t\t\t\tif ( isBrokenMentionNode( node ) && node!.getAttribute( change.attributeKey ) != change.attributeNewValue ) {\n\t\t\t\t\twriter.setAttribute( change.attributeKey, change.attributeNewValue, node! );\n\n\t\t\t\t\twasChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn wasChanged;\n}\n\n/**\n * Checks if a node has a correct mention attribute if present.\n * Returns `true` if the node is text and has a mention attribute whose text does not match the expected mention text.\n */\nfunction isBrokenMentionNode( node: ModelItem | null ): boolean {\n\tif ( !node || !( node.is( '$text' ) || node.is( '$textProxy' ) ) || !node.hasAttribute( 'mention' ) ) {\n\t\treturn false;\n\t}\n\n\tconst text = node.data;\n\tconst mention = node.getAttribute( 'mention' ) as MentionAttribute;\n\n\tconst expectedText = mention._text;\n\n\treturn text != expectedText;\n}\n\n/**\n * Fixes a mention on a text node if it needs a fix.\n */\nfunction checkAndFix( textNode: ModelItem | null, writer: ModelWriter ): boolean {\n\tif ( isBrokenMentionNode( textNode ) ) {\n\t\twriter.removeAttribute( 'mention', textNode! );\n\n\t\treturn true;\n\t}\n\n\treturn false;\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/**\n * @module mention/ui/mentionsview\n */\n\nimport { ListView } from '@ckeditor/ckeditor5-ui';\nimport { Rect, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { type MentionListItemView } from './mentionlistitemview.js';\n\n/**\n * The mention ui view.\n */\nexport class MentionsView extends ListView {\n\tpublic selected: MentionListItemView | undefined;\n\n\tpublic position: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-mentions'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * {@link #select Selects} the first item.\n\t */\n\tpublic selectFirst(): void {\n\t\tthis.select( 0 );\n\t}\n\n\t/**\n\t * Selects next item to the currently {@link #select selected}.\n\t *\n\t * If the last item is already selected, it will select the first item.\n\t */\n\tpublic selectNext(): void {\n\t\tconst item = this.selected;\n\t\tconst index = this.items.getIndex( item! );\n\n\t\tthis.select( index + 1 );\n\t}\n\n\t/**\n\t * Selects previous item to the currently {@link #select selected}.\n\t *\n\t * If the first item is already selected, it will select the last item.\n\t */\n\tpublic selectPrevious(): void {\n\t\tconst item = this.selected;\n\t\tconst index = this.items.getIndex( item! );\n\n\t\tthis.select( index - 1 );\n\t}\n\n\t/**\n\t * Marks item at a given index as selected.\n\t *\n\t * Handles selection cycling when passed index is out of bounds:\n\t * - if the index is lower than 0, it will select the last item,\n\t * - if the index is higher than the last item index, it will select the first item.\n\t *\n\t * @param index Index of an item to be marked as selected.\n\t */\n\tpublic select( index: number ): void {\n\t\tlet indexToGet = 0;\n\n\t\tif ( index > 0 && index < this.items.length ) {\n\t\t\tindexToGet = index;\n\t\t} else if ( index < 0 ) {\n\t\t\tindexToGet = this.items.length - 1;\n\t\t}\n\n\t\tconst item = this.items.get( indexToGet ) as MentionListItemView;\n\n\t\t// Return early if item is already selected.\n\t\tif ( this.selected === item ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove highlight of previously selected item.\n\t\tif ( this.selected ) {\n\t\t\tthis.selected.removeHighlight();\n\t\t}\n\n\t\titem.highlight();\n\t\tthis.selected = item;\n\n\t\t// Scroll the mentions view to the selected element.\n\t\tif ( !this._isItemVisibleInScrolledArea( item ) ) {\n\t\t\tthis.element!.scrollTop = item.element!.offsetTop;\n\t\t}\n\t}\n\n\t/**\n\t * Triggers the `execute` event on the {@link #select selected} item.\n\t */\n\tpublic executeSelected(): void {\n\t\tthis.selected!.fire( 'execute' );\n\t}\n\n\t/**\n\t * Checks if an item is visible in the scrollable area.\n\t *\n\t * The item is considered visible when:\n\t * - its top boundary is inside the scrollable rect\n\t * - its bottom boundary is inside the scrollable rect (the whole item must be visible)\n\t */\n\tprivate _isItemVisibleInScrolledArea( item: MentionListItemView ) {\n\t\treturn new Rect( this.element! ).contains( new Rect( item.element! ) );\n\t}\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/**\n * @module mention/ui/domwrapperview\n */\n\nimport { View } from '@ckeditor/ckeditor5-ui';\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * This class wraps DOM element as a CKEditor5 UI View.\n *\n * It allows to render any DOM element and use it in mentions list.\n */\nexport class MentionDomWrapperView extends View {\n\t/**\n\t * The DOM element for which wrapper was created.\n\t */\n\tpublic domElement: HTMLElement;\n\n\t/**\n\t * Controls whether the dom wrapper view is \"on\". This is in line with {@link module:ui/button/button~Button#isOn} property.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isOn: boolean;\n\n\t/**\n\t * Creates an instance of {@link module:mention/ui/domwrapperview~MentionDomWrapperView} class.\n\t *\n\t * Also see {@link #render}.\n\t */\n\tconstructor( locale: Locale, domElement: HTMLElement ) {\n\t\tsuper( locale );\n\n\t\t// Disable template rendering on this view.\n\t\tthis.template = undefined;\n\n\t\tthis.domElement = domElement;\n\n\t\t// Render dom wrapper as a button.\n\t\tthis.domElement.classList.add( 'ck-button' );\n\n\t\tthis.set( 'isOn', false );\n\n\t\t// Handle isOn state as in buttons.\n\t\tthis.on( 'change:isOn', ( evt, name, isOn ) => {\n\t\t\tif ( isOn ) {\n\t\t\t\tthis.domElement.classList.add( 'ck-on' );\n\t\t\t\tthis.domElement.classList.remove( 'ck-off' );\n\t\t\t} else {\n\t\t\t\tthis.domElement.classList.add( 'ck-off' );\n\t\t\t\tthis.domElement.classList.remove( 'ck-on' );\n\t\t\t}\n\t\t} );\n\n\t\t// Pass click event as execute event.\n\t\tthis.listenTo( this.domElement, 'click', () => {\n\t\t\tthis.fire( 'execute' );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.element = this.domElement;\n\t}\n\n\t/**\n\t * Focuses the DOM element.\n\t */\n\tpublic focus(): void {\n\t\tthis.domElement.focus();\n\t}\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/**\n * @module mention/ui/mentionlistitemview\n */\n\nimport { ListItemView } from '@ckeditor/ckeditor5-ui';\n\nimport type { MentionFeedItem } from '../mentionconfig.js';\n\nimport { type MentionDomWrapperView } from './domwrapperview.js';\n\nexport class MentionListItemView extends ListItemView {\n\tpublic item!: MentionFeedItem;\n\n\tpublic marker!: string;\n\n\tpublic highlight(): void {\n\t\tconst child = this.children.first as MentionDomWrapperView;\n\n\t\tchild.isOn = true;\n\t}\n\n\tpublic removeHighlight(): void {\n\t\tconst child = this.children.first as MentionDomWrapperView;\n\n\t\tchild.isOn = false;\n\t}\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/**\n * @module mention/mentionui\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tViewDocumentKeyDownEvent,\n\tMarker,\n\tModelPosition\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tButtonView,\n\tContextualBalloon,\n\tclickOutsideHandler\n} from '@ckeditor/ckeditor5-ui';\n\nimport {\n\tCKEditorError,\n\tCollection,\n\tRect,\n\tenv,\n\tkeyCodes,\n\tlogWarning,\n\ttype DomOptimalPositionOptions\n} from '@ckeditor/ckeditor5-utils';\n\nimport { TextWatcher, type TextWatcherMatchedEvent } from '@ckeditor/ckeditor5-typing';\n\nimport { debounce } from 'es-toolkit/compat';\n\nimport { MentionsView } from './ui/mentionsview.js';\nimport { MentionDomWrapperView } from './ui/domwrapperview.js';\nimport { MentionListItemView } from './ui/mentionlistitemview.js';\n\nimport type {\n\tMentionFeedbackCallback,\n\tMentionFeed,\n\tMentionFeedItem,\n\tMentionItemRenderer,\n\tMentionFeedObjectItem\n} from './mentionconfig.js';\n\nconst VERTICAL_SPACING = 3;\n\n// The key codes that mention UI handles when it is open (without commit keys).\nconst defaultHandledKeyCodes = [\n\tkeyCodes.arrowup,\n\tkeyCodes.arrowdown,\n\tkeyCodes.esc\n];\n\n// Dropdown commit key codes.\nconst defaultCommitKeyCodes = [\n\tkeyCodes.enter,\n\tkeyCodes.tab\n];\n\n/**\n * The mention UI feature.\n */\nexport class MentionUI extends Plugin {\n\t/**\n\t * The mention view.\n\t */\n\tprivate readonly _mentionsView: MentionsView;\n\n\t/**\n\t * Stores mention feeds configurations.\n\t */\n\tprivate _mentionsConfigurations: Map<string, Definition>;\n\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon: ContextualBalloon | undefined;\n\n\tprivate _items = new Collection<{ item: MentionFeedObjectItem; marker: string }>();\n\n\tprivate _lastRequested?: string;\n\n\t/**\n\t * Debounced feed requester. It uses `es-toolkit#debounce` method to delay function call.\n\t */\n\tprivate _requestFeedDebounced: ( marker: string, feedText: string ) => void;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MentionUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._mentionsView = this._createMentionView();\n\t\tthis._mentionsConfigurations = new Map();\n\t\tthis._requestFeedDebounced = debounce( this._requestFeed, 100 );\n\n\t\teditor.config.define( 'mention', { feeds: [] } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\tconst commitKeys = editor.config.get( 'mention.commitKeys' ) || defaultCommitKeyCodes;\n\t\tconst handledKeyCodes = defaultHandledKeyCodes.concat( commitKeys );\n\n\t\tthis._balloon = editor.plugins.get( ContextualBalloon );\n\n\t\t// Key listener that handles navigation in mention view.\n\t\teditor.editing.view.document.on<ViewDocumentKeyDownEvent>( 'keydown', ( evt, data ) => {\n\t\t\tif ( isHandledKey( data.keyCode ) && this._isUIVisible ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop(); // Required for Enter key overriding.\n\n\t\t\t\tif ( data.keyCode == keyCodes.arrowdown ) {\n\t\t\t\t\tthis._mentionsView.selectNext();\n\t\t\t\t}\n\n\t\t\t\tif ( data.keyCode == keyCodes.arrowup ) {\n\t\t\t\t\tthis._mentionsView.selectPrevious();\n\t\t\t\t}\n\n\t\t\t\tif ( commitKeys.includes( data.keyCode ) ) {\n\t\t\t\t\tthis._mentionsView.executeSelected();\n\t\t\t\t}\n\n\t\t\t\tif ( data.keyCode == keyCodes.esc ) {\n\t\t\t\t\tthis._hideUIAndRemoveMarker();\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'highest' } ); // Required to override the Enter key.\n\n\t\t// Close the dropdown upon clicking outside of the plugin UI.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this._mentionsView,\n\t\t\tactivator: () => this._isUIVisible,\n\t\t\tcontextElements: () => [ this._balloon!.view.element! ],\n\t\t\tcallback: () => this._hideUIAndRemoveMarker()\n\t\t} );\n\n\t\tconst feeds = editor.config.get( 'mention.feeds' )!;\n\n\t\tfor ( const mentionDescription of feeds ) {\n\t\t\tconst { feed, marker, dropdownLimit } = mentionDescription;\n\n\t\t\tif ( !isValidMentionMarker( marker ) ) {\n\t\t\t\t/**\n\t\t\t\t * The marker must be a single character.\n\t\t\t\t *\n\t\t\t\t * Correct markers: `'@'`, `'#'`.\n\t\t\t\t *\n\t\t\t\t * Incorrect markers: `'$$'`, `'[@'`.\n\t\t\t\t *\n\t\t\t\t * See {@link module:mention/mentionconfig~MentionConfig}.\n\t\t\t\t *\n\t\t\t\t * @error mentionconfig-incorrect-marker\n\t\t\t\t * @param {string} marker Configured marker\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'mentionconfig-incorrect-marker', null, { marker } );\n\t\t\t}\n\n\t\t\tconst feedCallback = typeof feed == 'function' ? feed.bind( this.editor ) : createFeedCallback( feed );\n\t\t\tconst itemRenderer = mentionDescription.itemRenderer;\n\t\t\tconst definition = { marker, feedCallback, itemRenderer, dropdownLimit };\n\n\t\t\tthis._mentionsConfigurations.set( marker, definition );\n\t\t}\n\n\t\tthis._setupTextWatcher( feeds );\n\t\tthis.listenTo( editor, 'change:isReadOnly', () => {\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t} );\n\t\tthis.on<RequestFeedResponseEvent>( 'requestFeed:response', ( evt, data ) => this._handleFeedResponse( data ) );\n\t\tthis.on<RequestFeedErrorEvent>( 'requestFeed:error', () => this._hideUIAndRemoveMarker() );\n\n\t\t/**\n\t\t * Checks if a given key code is handled by the mention UI.\n\t\t */\n\t\tfunction isHandledKey( keyCode: number ): boolean {\n\t\t\treturn handledKeyCodes.includes( keyCode );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see https://github.com/ckeditor/ckeditor5/issues/1341).\n\t\tthis._mentionsView.destroy();\n\t}\n\n\t/**\n\t * Returns true when {@link #_mentionsView} is in the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon} and it is\n\t * currently visible.\n\t */\n\tprivate get _isUIVisible(): boolean {\n\t\treturn this._balloon!.visibleView === this._mentionsView;\n\t}\n\n\t/**\n\t * Creates the {@link #_mentionsView}.\n\t */\n\tprivate _createMentionView(): MentionsView {\n\t\tconst locale = this.editor.locale;\n\n\t\tconst mentionsView = new MentionsView( locale );\n\n\t\tmentionsView.items.bindTo( this._items ).using( data => {\n\t\t\tconst { item, marker } = data;\n\n\t\t\tconst { dropdownLimit: markerDropdownLimit } = this._mentionsConfigurations.get( marker )!;\n\n\t\t\t// Set to 10 by default for backwards compatibility. See: https://github.com/ckeditor/ckeditor5/issues/10479\n\t\t\tconst dropdownLimit = markerDropdownLimit || this.editor.config.get( 'mention.dropdownLimit' ) || 10;\n\n\t\t\tif ( mentionsView.items.length >= dropdownLimit ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst listItemView = new MentionListItemView( locale );\n\n\t\t\tconst view = this._renderItem( item, marker );\n\t\t\tview.delegate( 'execute' ).to( listItemView );\n\n\t\t\tlistItemView.children.add( view );\n\t\t\tlistItemView.item = item;\n\t\t\tlistItemView.marker = marker;\n\n\t\t\tlistItemView.on( 'execute', () => {\n\t\t\t\tmentionsView.fire( 'execute', {\n\t\t\t\t\titem,\n\t\t\t\t\tmarker\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\treturn listItemView;\n\t\t} );\n\n\t\tmentionsView.on( 'execute', ( evt, data ) => {\n\t\t\tconst editor = this.editor;\n\t\t\tconst model = editor.model;\n\n\t\t\tconst item = data.item;\n\t\t\tconst marker = data.marker;\n\n\t\t\tconst mentionMarker = editor.model.markers.get( 'mention' );\n\n\t\t\t// Create a range on matched text.\n\t\t\tconst end = model.createPositionAt( model.document.selection.focus! );\n\t\t\tconst start = model.createPositionAt( mentionMarker!.getStart() );\n\t\t\tconst range = model.createRange( start, end );\n\n\t\t\tthis._hideUIAndRemoveMarker();\n\n\t\t\teditor.execute( 'mention', {\n\t\t\t\tmention: item,\n\t\t\t\ttext: item.text,\n\t\t\t\tmarker,\n\t\t\t\trange\n\t\t\t} );\n\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn mentionsView;\n\t}\n\n\t/**\n\t * Returns item renderer for the marker.\n\t */\n\tprivate _getItemRenderer( marker: string ): MentionItemRenderer | undefined {\n\t\tconst { itemRenderer } = this._mentionsConfigurations.get( marker )!;\n\n\t\treturn itemRenderer;\n\t}\n\n\t/**\n\t * Requests a feed from a configured callbacks.\n\t */\n\tprivate _requestFeed( marker: string, feedText: string ): void {\n\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Feed]%c Requesting for', 'color: blue', 'color: black', `\"${ feedText }\"` );\n\n\t\t// Store the last requested feed - it is used to discard any out-of order requests.\n\t\tthis._lastRequested = feedText;\n\n\t\tconst { feedCallback } = this._mentionsConfigurations.get( marker )!;\n\t\tconst feedResponse = feedCallback( feedText );\n\n\t\tconst isAsynchronous = feedResponse instanceof Promise;\n\n\t\t// For synchronous feeds (e.g. callbacks, arrays) fire the response event immediately.\n\t\tif ( !isAsynchronous ) {\n\t\t\tthis.fire<RequestFeedResponseEvent>( 'requestFeed:response', { feed: feedResponse, marker, feedText } );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Handle the asynchronous responses.\n\t\tfeedResponse\n\t\t\t.then( response => {\n\t\t\t\t// Check the feed text of this response with the last requested one so either:\n\t\t\t\tif ( this._lastRequested == feedText ) {\n\t\t\t\t\t// It is the same and fire the response event.\n\t\t\t\t\tthis.fire<RequestFeedResponseEvent>( 'requestFeed:response', { feed: response, marker, feedText } );\n\t\t\t\t} else {\n\t\t\t\t\t// It is different - most probably out-of-order one, so fire the discarded event.\n\t\t\t\t\tthis.fire<RequestFeedDiscardedEvent>( 'requestFeed:discarded', { feed: response, marker, feedText } );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( error => {\n\t\t\t\tthis.fire<RequestFeedErrorEvent>( 'requestFeed:error', { error } );\n\n\t\t\t\t/**\n\t\t\t\t * The callback used for obtaining mention autocomplete feed thrown and error and the mention UI was hidden or\n\t\t\t\t * not displayed at all.\n\t\t\t\t *\n\t\t\t\t * @error mention-feed-callback-error\n\t\t\t\t */\n\t\t\t\tlogWarning( 'mention-feed-callback-error', { marker } );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Registers a text watcher for the marker.\n\t */\n\tprivate _setupTextWatcher( feeds: Array<MentionFeed> ): TextWatcher {\n\t\tconst editor = this.editor;\n\n\t\tconst feedsWithPattern: Array<MentionFeed & { pattern: RegExp }> = feeds.map( feed => ( {\n\t\t\t...feed,\n\t\t\tpattern: createRegExp( feed.marker, feed.minimumCharacters || 0 )\n\t\t} ) );\n\n\t\tconst watcher = new TextWatcher( editor.model, createTestCallback( feedsWithPattern ) );\n\n\t\twatcher.on<TextWatcherMatchedEvent>( 'matched', ( evt, data ) => {\n\t\t\tconst markerDefinition = getLastValidMarkerInText( feedsWithPattern, data.text );\n\t\t\tconst selection = editor.model.document.selection;\n\t\t\tconst focus = selection.focus;\n\t\t\tconst markerPosition = editor.model.createPositionAt( focus!.parent, markerDefinition!.position );\n\n\t\t\tif ( isPositionInExistingMention( focus! ) || isMarkerInExistingMention( markerPosition ) ) {\n\t\t\t\tthis._hideUIAndRemoveMarker();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst feedText = requestFeedText( markerDefinition, data.text );\n\t\t\tconst matchedTextLength = markerDefinition!.marker.length + feedText.length;\n\n\t\t\t// Create a marker range.\n\t\t\tconst start = focus!.getShiftedBy( -matchedTextLength );\n\t\t\tconst end = focus!.getShiftedBy( -feedText.length );\n\n\t\t\tconst markerRange = editor.model.createRange( start, end );\n\n\t\t\t// @if CK_DEBUG_MENTION // console.group( '%c[TextWatcher]%c matched', 'color: red', 'color: black', `\"${ feedText }\"` );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'data#text', `\"${ data.text }\"` );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'data#range', data.range.start.path, data.range.end.path );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'marker definition', markerDefinition );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'marker range', markerRange.start.path, markerRange.end.path );\n\n\t\t\tif ( checkIfStillInCompletionMode( editor ) ) {\n\t\t\t\tconst mentionMarker = editor.model.markers.get( 'mention' )!;\n\n\t\t\t\t// Update the marker - user might've moved the selection to other mention trigger.\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Updating the marker.', 'color: purple', 'color: black' );\n\n\t\t\t\t\twriter.updateMarker( mentionMarker, { range: markerRange } );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Adding the marker.', 'color: purple', 'color: black' );\n\n\t\t\t\t\twriter.addMarker( 'mention', { range: markerRange, usingOperation: false, affectsData: false } );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._requestFeedDebounced( markerDefinition!.marker, feedText );\n\n\t\t\t// @if CK_DEBUG_MENTION // console.groupEnd();\n\t\t} );\n\n\t\twatcher.on( 'unmatched', () => {\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t} );\n\n\t\tconst mentionCommand = editor.commands.get( 'mention' )!;\n\t\twatcher.bind( 'isEnabled' ).to( mentionCommand );\n\n\t\treturn watcher;\n\t}\n\n\t/**\n\t * Handles the feed response event data.\n\t */\n\tprivate _handleFeedResponse( data: RequestFeedResponseEvent['args'][0] ) {\n\t\tconst { feed, marker } = data;\n\n\t\t// eslint-disable-next-line @stylistic/max-len\n\t\t// @if CK_DEBUG_MENTION // console.log( `%c[Feed]%c Response for \"${ data.feedText }\" (${ feed.length })`, 'color: blue', 'color: black', feed );\n\n\t\t// If the marker is not in the document happens when the selection had changed and the 'mention' marker was removed.\n\t\tif ( !checkIfStillInCompletionMode( this.editor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not show the mention UI if the mention command is disabled\n\t\t// (e.g. the cursor was moved into a code block after the feed was requested).\n\t\tconst mentionCommand = this.editor.commands.get( 'mention' )!;\n\n\t\tif ( !mentionCommand.isEnabled ) {\n\t\t\tthis._hideUIAndRemoveMarker();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset the view.\n\t\tthis._items.clear();\n\n\t\tfor ( const feedItem of feed ) {\n\t\t\tconst item = typeof feedItem != 'object' ? { id: feedItem, text: feedItem } : feedItem;\n\n\t\t\tthis._items.add( { item, marker } );\n\t\t}\n\n\t\tconst mentionMarker = this.editor.model.markers.get( 'mention' );\n\n\t\tif ( this._items.length ) {\n\t\t\tthis._showOrUpdateUI( mentionMarker! );\n\t\t} else {\n\t\t\t// Do not show empty mention UI.\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t}\n\t}\n\n\t/**\n\t * Shows the mentions balloon. If the panel is already visible, it will reposition it.\n\t */\n\tprivate _showOrUpdateUI( markerMarker: Marker ): void {\n\t\tif ( this._isUIVisible ) {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Updating position.', 'color: green', 'color: black' );\n\n\t\t\t// Update balloon position as the mention list view may change its size.\n\t\t\tthis._balloon!.updatePosition( this._getBalloonPanelPositionData( markerMarker, this._mentionsView!.position ) );\n\t\t} else {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Showing the UI.', 'color: green', 'color: black' );\n\n\t\t\tthis._balloon!.add( {\n\t\t\t\tview: this._mentionsView,\n\t\t\t\tposition: this._getBalloonPanelPositionData( markerMarker, this._mentionsView.position ),\n\t\t\t\tsingleViewMode: true,\n\t\t\t\tballoonClassName: 'ck-mention-balloon'\n\t\t\t} );\n\t\t}\n\n\t\tthis._mentionsView.position = this._balloon!.view.position;\n\t\tthis._mentionsView.selectFirst();\n\t}\n\n\t/**\n\t * Hides the mentions balloon and removes the 'mention' marker from the markers collection.\n\t */\n\tprivate _hideUIAndRemoveMarker(): void {\n\t\t// Remove the mention view from balloon before removing marker - it is used by balloon position target().\n\t\tif ( this._balloon!.hasView( this._mentionsView ) ) {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Hiding the UI.', 'color: green', 'color: black' );\n\n\t\t\tthis._balloon!.remove( this._mentionsView );\n\t\t}\n\n\t\tif ( checkIfStillInCompletionMode( this.editor ) ) {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Removing marker.', 'color: purple', 'color: black' );\n\n\t\t\tthis.editor.model.change( writer => writer.removeMarker( 'mention' ) );\n\t\t}\n\n\t\t// Make the last matched position on panel view undefined so the #_getBalloonPanelPositionData() method will return all positions\n\t\t// on the next call.\n\t\tthis._mentionsView.position = undefined;\n\t}\n\n\t/**\n\t * Renders a single item in the autocomplete list.\n\t */\n\tprivate _renderItem( item: MentionFeedObjectItem, marker: string ): MentionDomWrapperView | ButtonView {\n\t\tconst editor = this.editor;\n\n\t\tlet view;\n\t\tlet label = item.id;\n\n\t\tconst renderer = this._getItemRenderer( marker );\n\n\t\tif ( renderer ) {\n\t\t\tconst renderResult = renderer( item );\n\n\t\t\tif ( typeof renderResult != 'string' ) {\n\t\t\t\tview = new MentionDomWrapperView( editor.locale, renderResult );\n\t\t\t} else {\n\t\t\t\tlabel = renderResult;\n\t\t\t}\n\t\t}\n\n\t\tif ( !view ) {\n\t\t\tconst buttonView = new ButtonView( editor.locale );\n\n\t\t\tbuttonView.label = label;\n\t\t\tbuttonView.withText = true;\n\n\t\t\tview = buttonView;\n\t\t}\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * Creates a position options object used to position the balloon panel.\n\t *\n\t * @param mentionMarker\n\t * @param preferredPosition The name of the last matched position name.\n\t */\n\tprivate _getBalloonPanelPositionData(\n\t\tmentionMarker: Marker,\n\t\tpreferredPosition: MentionsView['position']\n\t): Partial<DomOptimalPositionOptions> {\n\t\tconst editor = this.editor;\n\t\tconst editing = editor.editing;\n\t\tconst domConverter = editing.view.domConverter;\n\t\tconst mapper = editing.mapper;\n\t\tconst uiLanguageDirection = editor.locale.uiLanguageDirection;\n\n\t\treturn {\n\t\t\ttarget: () => {\n\t\t\t\tlet modelRange = mentionMarker.getRange();\n\n\t\t\t\t// Target the UI to the model selection range - the marker has been removed so probably the UI will not be shown anyway.\n\t\t\t\t// The logic is used by ContextualBalloon to display another panel in the same place.\n\t\t\t\tif ( modelRange.start.root.rootName == '$graveyard' ) {\n\t\t\t\t\tmodelRange = editor.model.document.selection.getFirstRange()!;\n\t\t\t\t}\n\n\t\t\t\tconst viewRange = mapper.toViewRange( modelRange );\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects( domConverter.viewRangeToDom( viewRange ) );\n\n\t\t\t\treturn rangeRects.pop()!;\n\t\t\t},\n\t\t\tlimiter: () => {\n\t\t\t\tconst view = this.editor.editing.view;\n\t\t\t\tconst viewDocument = view.document;\n\t\t\t\tconst editableElement = viewDocument.selection.editableElement;\n\n\t\t\t\tif ( editableElement ) {\n\t\t\t\t\treturn view.domConverter.mapViewToDom( editableElement.root ) as HTMLElement;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tpositions: getBalloonPanelPositions( preferredPosition, uiLanguageDirection )\n\t\t};\n\t}\n}\n\n/**\n * Returns the balloon positions data callbacks.\n */\nfunction getBalloonPanelPositions(\n\tpreferredPosition: MentionsView['position'],\n\tuiLanguageDirection: string\n): DomOptimalPositionOptions['positions'] {\n\tconst positions: Record<string, DomOptimalPositionOptions['positions'][0]> = {\n\t\t// Positions the panel to the southeast of the caret rectangle.\n\t\t'caret_se': ( targetRect: Rect, balloonRect: Rect, viewportRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.bottom + VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport( targetRect.right, balloonRect, viewportRect ),\n\t\t\t\tname: 'caret_se',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\n\t\t// Positions the panel to the northeast of the caret rectangle.\n\t\t'caret_ne': ( targetRect: Rect, balloonRect: Rect, viewportRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport( targetRect.right, balloonRect, viewportRect ),\n\t\t\t\tname: 'caret_ne',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\n\t\t// Positions the panel to the southwest of the caret rectangle.\n\t\t'caret_sw': ( targetRect: Rect, balloonRect: Rect, viewportRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.bottom + VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport( targetRect.right - balloonRect.width, balloonRect, viewportRect ),\n\t\t\t\tname: 'caret_sw',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\n\t\t// Positions the panel to the northwest of the caret rect.\n\t\t'caret_nw': ( targetRect: Rect, balloonRect: Rect, viewportRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n\t\t\t\tleft: fitLeftInViewport( targetRect.right - balloonRect.width, balloonRect, viewportRect ),\n\t\t\t\tname: 'caret_nw',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n\n\t// Returns only the last position if it was matched to prevent the panel from jumping after the first match.\n\tif ( Object.prototype.hasOwnProperty.call( positions, preferredPosition! ) ) {\n\t\treturn [\n\t\t\tpositions[ preferredPosition! ]\n\t\t];\n\t}\n\n\t// By default, return all position callbacks ordered depending on the UI language direction.\n\treturn uiLanguageDirection !== 'rtl' ? [\n\t\tpositions.caret_se,\n\t\tpositions.caret_sw,\n\t\tpositions.caret_ne,\n\t\tpositions.caret_nw\n\t] : [\n\t\tpositions.caret_sw,\n\t\tpositions.caret_se,\n\t\tpositions.caret_nw,\n\t\tpositions.caret_ne\n\t];\n}\n\n/**\n * Keeps the panel within the viewport horizontally, so it does not get cut off\n * when the caret is close to the screen edge (e.g. on mobile).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/20182.\n */\nfunction fitLeftInViewport( left: number, balloonRect: Rect, viewportRect: Rect ): number {\n\treturn Math.max( viewportRect.left, Math.min( left, viewportRect.right - balloonRect.width ) );\n}\n\n/**\n * Returns a marker definition of the last valid occurring marker in a given string.\n * If there is no valid marker in a string, it returns undefined.\n *\n * Example of returned object:\n *\n * ```ts\n * {\n * \tmarker: '@',\n * \tposition: 4,\n * \tminimumCharacters: 0\n * }\n * ````\n *\n * @param feedsWithPattern Registered feeds in editor for mention plugin with created RegExp for matching marker.\n * @param text String to find the marker in\n * @returns Matched marker's definition\n */\nfunction getLastValidMarkerInText(\n\tfeedsWithPattern: Array<MentionFeed & { pattern: RegExp }>,\n\ttext: string\n): MarkerDefinition {\n\tlet lastValidMarker: any;\n\n\tfor ( const feed of feedsWithPattern ) {\n\t\tconst currentMarkerLastIndex = text.lastIndexOf( feed.marker );\n\n\t\tif ( currentMarkerLastIndex > 0 && !text.substring( currentMarkerLastIndex - 1 ).match( feed.pattern ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( !lastValidMarker || currentMarkerLastIndex >= lastValidMarker.position ) {\n\t\t\tlastValidMarker = {\n\t\t\t\tmarker: feed.marker,\n\t\t\t\tposition: currentMarkerLastIndex,\n\t\t\t\tminimumCharacters: feed.minimumCharacters,\n\t\t\t\tpattern: feed.pattern\n\t\t\t};\n\t\t}\n\t}\n\n\treturn lastValidMarker;\n}\n\n/**\n * Creates a RegExp pattern for the marker.\n *\n * Function has to be exported to achieve 100% code coverage.\n *\n * @internal\n */\nexport function createRegExp( marker: string, minimumCharacters: number ): RegExp {\n\tconst numberOfCharacters = minimumCharacters == 0 ? '*' : `{${ minimumCharacters },}`;\n\tconst openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? '\\\\p{Ps}\\\\p{Pi}\"\\'' : '\\\\(\\\\[{\"\\'';\n\tconst mentionCharacters = '.';\n\n\t// I wanted to make an util out of it, but since this regexp uses \"u\" flag, it became difficult.\n\t// When \"u\" flag is used, the regexp has \"strict\" escaping rules, i.e. if you try to escape a character that does not need\n\t// to be escaped, RegExp() will throw. It made it difficult to write a generic util, because different characters are\n\t// allowed in different context. For example, escaping \"-\" sometimes was correct, but sometimes it threw an error.\n\tmarker = marker.replace( /[.*+?^${}()\\-|[\\]\\\\]/g, '\\\\$&' );\n\n\t// The pattern consists of 3 groups:\n\t//\n\t// - 0 (non-capturing): Opening sequence - start of the line, space or an opening punctuation character like \"(\" or \"\\\"\",\n\t// - 1: The marker character(s),\n\t// - 2: Mention input (taking the minimal length into consideration to trigger the UI),\n\t//\n\t// The pattern matches up to the caret (end of string switch - $).\n\t//               (0:      opening sequence       )(1: marker  )(2:                typed mention              )$\n\tconst pattern = `(?:^|[ ${ openAfterCharacters }])(${ marker })(${ mentionCharacters }${ numberOfCharacters })$`;\n\n\treturn new RegExp( pattern, 'u' );\n}\n\n/**\n * Creates a test callback for the marker to be used in the text watcher instance.\n *\n * @param feedsWithPattern Feeds of mention plugin configured in editor with RegExp to match marker in text\n */\nfunction createTestCallback( feedsWithPattern: Array<MentionFeed & { pattern: RegExp }> ): ( text: string ) => boolean {\n\tconst textMatcher = ( text: string ) => {\n\t\tconst markerDefinition = getLastValidMarkerInText( feedsWithPattern, text );\n\n\t\tif ( !markerDefinition ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet splitStringFrom = 0;\n\n\t\tif ( markerDefinition.position !== 0 ) {\n\t\t\tsplitStringFrom = markerDefinition.position - 1;\n\t\t}\n\n\t\tconst textToTest = text.substring( splitStringFrom );\n\n\t\treturn markerDefinition.pattern.test( textToTest );\n\t};\n\n\treturn textMatcher;\n}\n\n/**\n * Creates a text matcher from the marker.\n */\nfunction requestFeedText( markerDefinition: MarkerDefinition, text: string ): string {\n\tlet splitStringFrom = 0;\n\n\tif ( markerDefinition.position !== 0 ) {\n\t\tsplitStringFrom = markerDefinition.position - 1;\n\t}\n\n\tconst regExp = createRegExp( markerDefinition.marker, 0 );\n\tconst textToMatch = text.substring( splitStringFrom );\n\tconst match = textToMatch.match( regExp )!;\n\n\treturn match[ 2 ];\n}\n\n/**\n * The default feed callback.\n */\nfunction createFeedCallback( feedItems: Array<MentionFeedItem> ) {\n\treturn ( feedText: string ) => {\n\t\tconst filteredItems = feedItems\n\t\t\t// Make the default mention feed case-insensitive.\n\t\t\t.filter( item => {\n\t\t\t\t// Item might be defined as object.\n\t\t\t\tconst itemId = typeof item == 'string' ? item : String( item.id );\n\n\t\t\t\t// The default feed is case insensitive.\n\t\t\t\treturn itemId.toLowerCase().includes( feedText.toLowerCase() );\n\t\t\t} );\n\t\treturn filteredItems;\n\t};\n}\n\n/**\n * Checks if position in inside or right after a text with a mention.\n */\nfunction isPositionInExistingMention( position: ModelPosition ): boolean | null {\n\t// The text watcher listens only to changed range in selection - so the selection attributes are not yet available\n\t// and you cannot use selection.hasAttribute( 'mention' ) just yet.\n\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1723.\n\tconst hasMention = position.textNode && position.textNode.hasAttribute( 'mention' );\n\n\tconst nodeBefore = position.nodeBefore;\n\n\treturn hasMention || nodeBefore && nodeBefore.is( '$text' ) && nodeBefore.hasAttribute( 'mention' );\n}\n\n/**\n * Checks if the closest marker offset is at the beginning of a mention.\n *\n * See https://github.com/ckeditor/ckeditor5/issues/11400.\n */\nfunction isMarkerInExistingMention( markerPosition: ModelPosition ): boolean | null {\n\tconst nodeAfter = markerPosition.nodeAfter;\n\n\treturn nodeAfter && nodeAfter.is( '$text' ) && nodeAfter.hasAttribute( 'mention' );\n}\n\n/**\n * Checks if string is a valid mention marker.\n */\nfunction isValidMentionMarker( marker: string ): boolean {\n\treturn !!marker;\n}\n\n/**\n * Checks the mention plugins is in completion mode (e.g. when typing is after a valid mention string like @foo).\n */\nfunction checkIfStillInCompletionMode( editor: Editor ): boolean {\n\treturn editor.model.markers.has( 'mention' );\n}\n\ntype RequestFeedResponse = {\n\n\t/**\n\t * Autocomplete items\n\t */\n\tfeed: Array<MentionFeedItem>;\n\n\t/**\n\t * The character which triggers autocompletion for mention.\n\t */\n\tmarker: string;\n\n\t/**\n\t * The text for which feed items were requested.\n\t */\n\tfeedText: string;\n};\n\ntype RequestFeedError = {\n\n\t/**\n\t * The error that was caught.\n\t */\n\terror: ErrorEvent;\n};\n\n/**\n * Fired whenever requested feed has a response.\n */\ntype RequestFeedResponseEvent = {\n\tname: 'requestFeed:response';\n\targs: [ RequestFeedResponse ];\n};\n\n/**\n * Fired whenever the requested feed was discarded. This happens when the response was delayed and\n * other feed was already requested.\n */\ntype RequestFeedDiscardedEvent = {\n\tname: 'requestFeed:discarded';\n\targs: [ RequestFeedResponse ];\n};\n\n/**\n * Fired whenever the requested {@link module:mention/mentionconfig~MentionFeed#feed} promise fails with error.\n */\ntype RequestFeedErrorEvent = {\n\tname: 'requestFeed:error';\n\targs: [ RequestFeedError ];\n};\n\ntype Definition = {\n\tmarker: string;\n\tfeedCallback: MentionFeedbackCallback;\n\titemRenderer?: MentionItemRenderer;\n\tdropdownLimit?: number;\n};\n\ntype MarkerDefinition = {\n\tmarker: string;\n\tminimumCharacters?: number;\n\tpattern: RegExp;\n\tposition: number;\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/**\n * @module mention/mention\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\n\nimport { MentionEditing, _toMentionAttribute } from './mentionediting.js';\nimport { MentionUI } from './mentionui.js';\n\n/**\n * The mention plugin.\n *\n * For a detailed overview, check the {@glink features/mentions Mention feature} guide.\n */\nexport class Mention extends Plugin {\n\t/**\n\t * Creates a mention attribute value from the provided view element and additional data.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'Mention' ).toMentionAttribute( viewElement, { userId: '1234' } );\n\t *\n\t * // For a view element: <span data-mention=\"@joe\">@John Doe</span>\n\t * // it will return:\n\t * // { id: '@joe', userId: '1234', uid: '7a7bc7...', _text: '@John Doe' }\n\t * ```\n\t *\n\t * @param data Additional data to be stored in the mention attribute.\n\t */\n\tpublic toMentionAttribute<MentionData extends Record<string, unknown>>(\n\t\tviewElement: ModelElement,\n\t\tdata: MentionData\n\t): ( MentionAttribute & MentionData ) | undefined;\n\n\t/**\n\t * Creates a mention attribute value from the provided view element.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'Mention' ).toMentionAttribute( viewElement );\n\t *\n\t * // For a view element: <span data-mention=\"@joe\">@John Doe</span>\n\t * // it will return:\n\t * // { id: '@joe', uid: '7a7bc7...', _text: '@John Doe' }\n\t * ```\n\t */\n\tpublic toMentionAttribute( viewElement: ModelElement ): MentionAttribute | undefined;\n\n\tpublic toMentionAttribute( viewElement: ModelElement, data?: Record<string, unknown> ): MentionAttribute | undefined {\n\t\treturn _toMentionAttribute( viewElement, data );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Mention' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MentionEditing, MentionUI ]> {\n\t\treturn [ MentionEditing, MentionUI ];\n\t}\n}\n\n/**\n * Represents a mention in the model.\n *\n * See {@link module:mention/mention~Mention#toMentionAttribute `Mention#toMentionAttribute()`}.\n */\nexport type MentionAttribute = {\n\n\t/**\n\t * The ID of a mention. It identifies the mention item in the mention feed. There can be multiple mentions\n\t * in the document with the same ID (e.g. the same hashtag being mentioned).\n\t */\n\tid: string;\n\n\t/**\n\t * A unique ID of this mention instance. Should be passed as an `option.id` when using\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement writer.createAttributeElement()}.\n\t */\n\tuid: string;\n\n\t/**\n\t * Helper property that stores the text of the inserted mention. Used for detecting a broken mention\n\t * in the editing area.\n\t *\n\t * @internal\n\t */\n\t_text: string;\n};\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { getCode, parseKeystroke } from \"@ckeditor/ckeditor5-utils\";\nimport { IconSelectAll } from \"@ckeditor/ckeditor5-icons\";\nimport { ButtonView, MenuBarMenuListItemButtonView } from \"@ckeditor/ckeditor5-ui\";\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 select-all/selectallcommand\n*/\n/**\n* The select all command.\n*\n* It is used by the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature} to handle\n* the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke.\n*\n* Executing this command changes the {@glink framework/architecture/editing-engine#model model}\n* selection so it contains the entire content of the editable root of the editor the selection is\n* {@link module:engine/model/selection~ModelSelection#anchor anchored} in.\n*\n* If the selection was anchored in a {@glink framework/tutorials/widgets/implementing-a-block-widget nested editable}\n* (e.g. a caption of an image), the new selection will contain its entire content. Successive executions of this command\n* will expand the selection to encompass more and more content up to the entire editable root of the editor.\n*/\nvar SelectAllCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.affectsData = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tlet scopeElement = model.schema.getLimitElement(selection);\n\t\tif (selection.containsEntireContent(scopeElement) || !isSelectAllScope(model.schema, scopeElement)) do {\n\t\t\tscopeElement = scopeElement.parent;\n\t\t\tif (!scopeElement) return;\n\t\t} while (!isSelectAllScope(model.schema, scopeElement));\n\t\tmodel.change((writer) => {\n\t\t\twriter.setSelection(scopeElement, \"in\");\n\t\t});\n\t}\n};\n/**\n* Checks whether the element is a valid select-all scope. Returns true, if the element is a\n* {@link module:engine/model/schema~ModelSchema#isLimit limit}, and can contain any text or paragraph.\n*\n* @param schema Schema to check against.\n* @param element Model element.\n*/\nfunction isSelectAllScope(schema, element) {\n\treturn schema.isLimit(element) && (schema.checkChild(element, \"$text\") || schema.checkChild(element, \"paragraph\"));\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 select-all/selectallediting\n*/\nconst SELECT_ALL_KEYSTROKE = /* #__PURE__ */ parseKeystroke(\"Ctrl+A\");\n/**\n* The select all editing feature.\n*\n* It registers the `'selectAll'` {@link module:select-all/selectallcommand~SelectAllCommand command}\n* and the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke listener which executes it.\n*/\nvar SelectAllEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SelectAllEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\teditor.commands.add(\"selectAll\", new SelectAllCommand(editor));\n\t\tthis.listenTo(viewDocument, \"keydown\", (eventInfo, domEventData) => {\n\t\t\tif (getCode(domEventData) === SELECT_ALL_KEYSTROKE) {\n\t\t\t\teditor.execute(\"selectAll\");\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t}\n\t\t});\n\t\teditor.accessibility.addKeystrokeInfos({ keystrokes: [{\n\t\t\tlabel: t(\"Select all\"),\n\t\t\tkeystroke: \"CTRL+A\"\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 select-all/selectallui\n*/\n/**\n* The select all UI feature.\n*\n* It registers the `'selectAll'` UI button in the editor's\n* {@link module:ui/componentfactory~ComponentFactory component factory}. When clicked, the button\n* executes the {@link module:select-all/selectallcommand~SelectAllCommand select all command}.\n*/\nvar SelectAllUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SelectAllUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(\"selectAll\", () => {\n\t\t\tconst buttonView = this._createButton(ButtonView);\n\t\t\tbuttonView.set({ tooltip: true });\n\t\t\treturn buttonView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:selectAll\", () => {\n\t\t\treturn this._createButton(MenuBarMenuListItemButtonView);\n\t\t});\n\t}\n\t/**\n\t* Creates a button for select all command to use either in toolbar or in menu bar.\n\t*/\n\t_createButton(ButtonClass) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get(\"selectAll\");\n\t\tconst view = new ButtonClass(editor.locale);\n\t\tconst t = locale.t;\n\t\tview.set({\n\t\t\tlabel: t(\"Select all\"),\n\t\t\ticon: IconSelectAll,\n\t\t\tkeystroke: \"Ctrl+A\"\n\t\t});\n\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\teditor.execute(\"selectAll\");\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn view;\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 select-all/selectall\n*/\n/**\n* The select all feature.\n*\n* This is a \"glue\" plugin which loads the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature}\n* and the {@link module:select-all/selectallui~SelectAllUI select all UI feature}.\n*\n* Please refer to the documentation of individual features to learn more.\n*/\nvar SelectAll = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [SelectAllEditing, SelectAllUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"SelectAll\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { SelectAll, SelectAllCommand, SelectAllEditing, SelectAllUI };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module select-all/selectallcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, ModelSchema } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The select all command.\n *\n * It is used by the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature} to handle\n * the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke.\n *\n * Executing this command changes the {@glink framework/architecture/editing-engine#model model}\n * selection so it contains the entire content of the editable root of the editor the selection is\n * {@link module:engine/model/selection~ModelSelection#anchor anchored} in.\n *\n * If the selection was anchored in a {@glink framework/tutorials/widgets/implementing-a-block-widget nested editable}\n * (e.g. a caption of an image), the new selection will contain its entire content. Successive executions of this command\n * will expand the selection to encompass more and more content up to the entire editable root of the editor.\n */\nexport class SelectAllCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// It does not affect data so should be enabled in read-only mode.\n\t\tthis.affectsData = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tlet scopeElement: ModelElement | null = model.schema.getLimitElement( selection );\n\n\t\t// If an entire scope is selected, or the selection's ancestor is not a scope yet,\n\t\t// browse through ancestors to find the enclosing parent scope.\n\t\tif ( selection.containsEntireContent( scopeElement ) || !isSelectAllScope( model.schema, scopeElement ) ) {\n\t\t\tdo {\n\t\t\t\tscopeElement = scopeElement.parent as ModelElement | null;\n\n\t\t\t\t// Do nothing, if the entire `root` is already selected.\n\t\t\t\tif ( !scopeElement ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} while ( !isSelectAllScope( model.schema, scopeElement ) );\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setSelection( scopeElement!, 'in' );\n\t\t} );\n\t}\n}\n\n/**\n * Checks whether the element is a valid select-all scope. Returns true, if the element is a\n * {@link module:engine/model/schema~ModelSchema#isLimit limit}, and can contain any text or paragraph.\n *\n * @param schema Schema to check against.\n * @param element Model element.\n */\nfunction isSelectAllScope( schema: ModelSchema, element: ModelElement ): boolean {\n\treturn schema.isLimit( element ) && ( schema.checkChild( element, '$text' ) || schema.checkChild( element, 'paragraph' ) );\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/**\n * @module select-all/selectallediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { getCode, parseKeystroke } from '@ckeditor/ckeditor5-utils';\nimport { SelectAllCommand } from './selectallcommand.js';\nimport type { ViewDocumentKeyDownEvent } from '@ckeditor/ckeditor5-engine';\n\nconst SELECT_ALL_KEYSTROKE = /* #__PURE__ */ parseKeystroke( 'Ctrl+A' );\n\n/**\n * The select all editing feature.\n *\n * It registers the `'selectAll'` {@link module:select-all/selectallcommand~SelectAllCommand command}\n * and the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke listener which executes it.\n */\nexport class SelectAllEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SelectAllEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\n\t\teditor.commands.add( 'selectAll', new SelectAllCommand( editor ) );\n\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( viewDocument, 'keydown', ( eventInfo, domEventData ) => {\n\t\t\tif ( getCode( domEventData ) === SELECT_ALL_KEYSTROKE ) {\n\t\t\t\teditor.execute( 'selectAll' );\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t}\n\t\t} );\n\n\t\t// Add the information about the keystroke to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Select all' ),\n\t\t\t\t\tkeystroke: 'CTRL+A'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\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/**\n * @module select-all/selectallui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconSelectAll } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\n\n/**\n * The select all UI feature.\n *\n * It registers the `'selectAll'` UI button in the editor's\n * {@link module:ui/componentfactory~ComponentFactory component factory}. When clicked, the button\n * executes the {@link module:select-all/selectallcommand~SelectAllCommand select all command}.\n */\nexport class SelectAllUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SelectAllUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( 'selectAll', () => {\n\t\t\tconst buttonView = this._createButton( ButtonView );\n\n\t\t\tbuttonView.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn buttonView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:selectAll', () => {\n\t\t\treturn this._createButton( MenuBarMenuListItemButtonView );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a button for select all command to use either in toolbar or in menu bar.\n\t */\n\tprivate _createButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>( ButtonClass: T ): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get( 'selectAll' )!;\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\t\tconst t = locale.t;\n\n\t\tview.set( {\n\t\t\tlabel: t( 'Select all' ),\n\t\t\ticon: IconSelectAll,\n\t\t\tkeystroke: 'Ctrl+A'\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t// Execute the command.\n\t\tthis.listenTo( view, 'execute', () => {\n\t\t\teditor.execute( 'selectAll' );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn view;\n\t}\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/**\n * @module select-all/selectall\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { SelectAllEditing } from './selectallediting.js';\nimport { SelectAllUI } from './selectallui.js';\n\n/**\n * The select all feature.\n *\n * This is a \"glue\" plugin which loads the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature}\n * and the {@link module:select-all/selectallui~SelectAllUI select all UI feature}.\n *\n * Please refer to the documentation of individual features to learn more.\n */\nexport class SelectAll extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ SelectAllEditing, SelectAllUI ]> {\n\t\treturn [ SelectAllEditing, SelectAllUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SelectAll' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Clipboard } from \"@ckeditor/ckeditor5-clipboard\";\nimport { Enter, ShiftEnter } from \"@ckeditor/ckeditor5-enter\";\nimport { SelectAll } from \"@ckeditor/ckeditor5-select-all\";\nimport { Typing } from \"@ckeditor/ckeditor5-typing\";\nimport { Undo } from \"@ckeditor/ckeditor5-undo\";\nimport { AccessibilityHelp } from \"@ckeditor/ckeditor5-ui\";\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 essentials/essentials\n*/\n/**\n* A plugin including all essential editing features. It represents a set of features that enables similar functionalities\n* to a `<textarea>` element.\n*\n* It includes:\n*\n* * {@link module:ui/editorui/accessibilityhelp/accessibilityhelp~AccessibilityHelp},\n* * {@link module:clipboard/clipboard~Clipboard},\n* * {@link module:enter/enter~Enter},\n* * {@link module:select-all/selectall~SelectAll},\n* * {@link module:enter/shiftenter~ShiftEnter},\n* * {@link module:typing/typing~Typing},\n* * {@link module:undo/undo~Undo}.\n*\n* This plugin set does not define any block-level containers (such as {@link module:paragraph/paragraph~Paragraph}).\n* If your editor is supposed to handle block content, make sure to include it.\n*/\nvar Essentials = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tAccessibilityHelp,\n\t\t\tClipboard,\n\t\t\tEnter,\n\t\t\tSelectAll,\n\t\t\tShiftEnter,\n\t\t\tTyping,\n\t\t\tUndo\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Essentials\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { Essentials };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module essentials/essentials\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { Clipboard } from '@ckeditor/ckeditor5-clipboard';\nimport { Enter, ShiftEnter } from '@ckeditor/ckeditor5-enter';\nimport { SelectAll } from '@ckeditor/ckeditor5-select-all';\nimport { Typing } from '@ckeditor/ckeditor5-typing';\nimport { Undo } from '@ckeditor/ckeditor5-undo';\nimport { AccessibilityHelp } from '@ckeditor/ckeditor5-ui';\n\n/**\n * A plugin including all essential editing features. It represents a set of features that enables similar functionalities\n * to a `<textarea>` element.\n *\n * It includes:\n *\n * * {@link module:ui/editorui/accessibilityhelp/accessibilityhelp~AccessibilityHelp},\n * * {@link module:clipboard/clipboard~Clipboard},\n * * {@link module:enter/enter~Enter},\n * * {@link module:select-all/selectall~SelectAll},\n * * {@link module:enter/shiftenter~ShiftEnter},\n * * {@link module:typing/typing~Typing},\n * * {@link module:undo/undo~Undo}.\n *\n * This plugin set does not define any block-level containers (such as {@link module:paragraph/paragraph~Paragraph}).\n * If your editor is supposed to handle block content, make sure to include it.\n */\nexport class Essentials extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ AccessibilityHelp, Clipboard, Enter, SelectAll, ShiftEnter, Typing, Undo ]> {\n\t\treturn [ AccessibilityHelp, Clipboard, Enter, SelectAll, ShiftEnter, Typing, Undo ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Essentials' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { ModelDocumentSelection, addBackgroundStylesRules, isLengthStyleValue, isPercentageStyleValue } from \"@ckeditor/ckeditor5-engine\";\nimport { ColorSelectorView, MenuBarMenuListItemButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, UIModel, addListToDropdown, createDropdown, focusChildOnDropdownOpen, getLocalizedColorOptions, normalizeColorOptions } from \"@ckeditor/ckeditor5-ui\";\nimport { CKEditorError, Collection } from \"@ckeditor/ckeditor5-utils\";\nimport { IconFontBackground, IconFontColor, IconFontFamily, IconFontSize } from \"@ckeditor/ckeditor5-icons\";\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 font/fontcommand\n*/\n/**\n* The base font command.\n*/\nvar FontCommand = class extends Command {\n\t/**\n\t* A model attribute on which this command operates.\n\t*/\n\tattributeKey;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor Editor instance.\n\t* @param attributeKey The name of a model attribute on which this command operates.\n\t*/\n\tconstructor(editor, attributeKey) {\n\t\tsuper(editor);\n\t\tthis.attributeKey = attributeKey;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tthis.value = doc.selection.getAttribute(this.attributeKey);\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n\t}\n\t/**\n\t* Executes the command. Applies the `value` of the {@link #attributeKey} to the selection.\n\t* If no `value` is passed, it removes the attribute from the selection.\n\t*\n\t* @param options Options for the executed command.\n\t* @param options.value The value to apply.\n\t* @fires execute\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst value = options.value;\n\t\tconst batch = options.batch;\n\t\tconst updateAttribute = (writer) => {\n\t\t\tif (selection.isCollapsed) {\n\t\t\t\tif (value) writer.setSelectionAttribute(this.attributeKey, value);\n\t\t\t\telse writer.removeSelectionAttribute(this.attributeKey);\n\t\t\t} else {\n\t\t\t\tconst ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey, { includeEmptyRanges: true });\n\t\t\t\tfor (const range of ranges) {\n\t\t\t\t\tlet itemOrRange = range;\n\t\t\t\t\tlet attributeKey = this.attributeKey;\n\t\t\t\t\tif (range.isCollapsed) {\n\t\t\t\t\t\titemOrRange = range.start.parent;\n\t\t\t\t\t\tattributeKey = ModelDocumentSelection._getStoreAttributeKey(this.attributeKey);\n\t\t\t\t\t}\n\t\t\t\t\tif (value) writer.setAttribute(attributeKey, value, itemOrRange);\n\t\t\t\t\telse writer.removeAttribute(attributeKey, itemOrRange);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tif (batch) model.enqueueChange(batch, (writer) => {\n\t\t\tupdateAttribute(writer);\n\t\t});\n\t\telse model.change((writer) => {\n\t\t\tupdateAttribute(writer);\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* The name of the font size plugin.\n*/\nconst FONT_SIZE = \"fontSize\";\n/**\n* The name of the font family plugin.\n*/\nconst FONT_FAMILY = \"fontFamily\";\n/**\n* The name of the font color plugin.\n*/\nconst FONT_COLOR = \"fontColor\";\n/**\n* The name of the font background color plugin.\n*/\nconst FONT_BACKGROUND_COLOR = \"fontBackgroundColor\";\n/**\n* Builds a proper converter definition out of input data.\n*\n* @internal\n*/\nfunction buildDefinition(modelAttributeKey, options) {\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: modelAttributeKey,\n\t\t\tvalues: []\n\t\t},\n\t\tview: {},\n\t\tupcastAlso: {}\n\t};\n\tfor (const option of options) {\n\t\tdefinition.model.values.push(option.model);\n\t\tdefinition.view[option.model] = option.view;\n\t\tif (option.upcastAlso) definition.upcastAlso[option.model] = option.upcastAlso;\n\t}\n\treturn definition;\n}\n/**\n* A {@link module:font/fontcolor~FontColor font color} and\n* {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper\n* responsible for upcasting data to the model.\n*\n* **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.\n*\n* @internal\n*/\nfunction renderUpcastAttribute(styleAttr) {\n\treturn (viewElement) => normalizeColorCode(viewElement.getStyle(styleAttr));\n}\n/**\n* A {@link module:font/fontcolor~FontColor font color} and\n* {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper\n* responsible for downcasting a color attribute to a `<span>` element.\n*\n* **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.\n*\n* @internal\n*/\nfunction renderDowncastElement(styleAttr) {\n\treturn (modelAttributeValue, { writer }) => writer.createAttributeElement(\"span\", { style: `${styleAttr}:${modelAttributeValue}` }, { priority: 7 });\n}\n/**\n* A helper that adds {@link module:ui/colorselector/colorselectorview~ColorSelectorView} to the color dropdown with proper initial values.\n*\n* @param options Configuration options\n* @param options.dropdownView The dropdown view to which a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}\n* will be added.\n* @param options.colors An array with definitions representing colors to be displayed in the color selector.\n* @param options.columns The number of columns in the color grid.\n* @param options.removeButtonLabel The label for the button responsible for removing the color.\n* @param options.colorPickerLabel The label for the color picker button.\n* @param options.documentColorsLabel The label for the section with document colors.\n* @param options.documentColorsCount The number of document colors inside the dropdown.\n* @param options.colorPickerViewConfig Configuration of the color picker view.\n* @returns The new color selector view.\n* @internal\n*/\nfunction addColorSelectorToDropdown({ dropdownView, colors, columns, removeButtonLabel, colorPickerLabel, documentColorsLabel, documentColorsCount, colorPickerViewConfig }) {\n\tconst locale = dropdownView.locale;\n\tconst colorSelectorView = new ColorSelectorView(locale, {\n\t\tcolors,\n\t\tcolumns,\n\t\tremoveButtonLabel,\n\t\tcolorPickerLabel,\n\t\tdocumentColorsLabel,\n\t\tdocumentColorsCount,\n\t\tcolorPickerViewConfig\n\t});\n\tdropdownView.colorSelectorView = colorSelectorView;\n\tdropdownView.panelView.children.add(colorSelectorView);\n\treturn colorSelectorView;\n}\n/**\n* Fixes the color value string.\n*/\nfunction normalizeColorCode(value) {\n\treturn value.replace(/\\s/g, \"\");\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* The font family command. It is used by {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing}\n* to apply the font family.\n*\n* ```ts\n* editor.execute( 'fontFamily', { value: 'Arial' } );\n* ```\n*\n* **Note**: Executing the command without the value removes the attribute from the model.\n*/\nvar FontFamilyCommand = class extends FontCommand {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor, FONT_FAMILY);\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* Normalizes the {@link module:font/fontconfig~FontFamilyConfig#options configuration options}\n* to the {@link module:font/fontconfig~FontFamilyOption} format.\n*\n* @param configuredOptions An array of options taken from the configuration.\n* @internal\n*/\nfunction normalizeOptions(configuredOptions) {\n\treturn configuredOptions.map(getOptionDefinition$1).filter((option) => option !== void 0);\n}\n/**\n* Normalizes the CSS `font-family` property value to an array of unquoted and trimmed font faces.\n*\n* @internal\n*/\nfunction normalizeFontFamilies(fontDefinition) {\n\treturn fontDefinition.replace(/[\"']/g, \"\").split(\",\").map((name) => name.trim());\n}\n/**\n* Returns an option definition either created from string shortcut.\n* If object is passed then this method will return it without alternating it. Returns undefined for item than cannot be parsed.\n*\n*/\nfunction getOptionDefinition$1(option) {\n\tif (typeof option === \"object\") return option;\n\tif (option === \"default\") return {\n\t\ttitle: \"Default\",\n\t\tmodel: void 0\n\t};\n\tif (typeof option !== \"string\") return;\n\treturn generateFontPreset(option);\n}\n/**\n* Creates a predefined preset for pixel size. It deconstructs font-family like string into full configuration option.\n* A font definition is passed as coma delimited set of font family names. Font names might be quoted.\n*\n* @param fontDefinition A font definition form configuration.\n*/\nfunction generateFontPreset(fontDefinition) {\n\tconst fontNames = normalizeFontFamilies(fontDefinition);\n\tconst firstFontName = fontNames[0];\n\tconst cssFontNames = fontNames.map(normalizeFontNameForCSS).join(\", \");\n\treturn {\n\t\ttitle: firstFontName,\n\t\tmodel: cssFontNames,\n\t\tview: {\n\t\t\tname: \"span\",\n\t\t\tstyles: { \"font-family\": cssFontNames },\n\t\t\tpriority: 7\n\t\t}\n\t};\n}\n/**\n* Normalizes font name for the style attribute. It adds braces (') if font name contains spaces.\n*/\nfunction normalizeFontNameForCSS(fontName) {\n\tfontName = fontName.trim();\n\tif (fontName.indexOf(\" \") > 0) fontName = `'${fontName}'`;\n\treturn fontName;\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 font/fontfamily/fontfamilyediting\n*/\n/**\n* The font family editing feature.\n*\n* It introduces the {@link module:font/fontfamily/fontfamilycommand~FontFamilyCommand command} and\n* the `fontFamily` attribute in the {@link module:engine/model/model~Model model} which renders\n* in the {@link module:engine/view/view view} as an inline `<span>` element (`<span style=\"font-family: Arial\">`),\n* depending on the {@link module:font/fontconfig~FontFamilyConfig configuration}.\n*/\nvar FontFamilyEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontFamilyEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(FONT_FAMILY, {\n\t\t\toptions: [\n\t\t\t\t\"default\",\n\t\t\t\t\"Arial, Helvetica, sans-serif\",\n\t\t\t\t\"Courier New, Courier, monospace\",\n\t\t\t\t\"Georgia, serif\",\n\t\t\t\t\"Lucida Sans Unicode, Lucida Grande, sans-serif\",\n\t\t\t\t\"Tahoma, Geneva, sans-serif\",\n\t\t\t\t\"Times New Roman, Times, serif\",\n\t\t\t\t\"Trebuchet MS, Helvetica, sans-serif\",\n\t\t\t\t\"Verdana, Geneva, sans-serif\"\n\t\t\t],\n\t\t\tsupportAllValues: false\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: FONT_FAMILY });\n\t\teditor.model.schema.setAttributeProperties(FONT_FAMILY, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\tconst options = normalizeOptions(editor.config.get(\"fontFamily.options\")).filter((item) => item.model);\n\t\tconst definition = buildDefinition(FONT_FAMILY, options);\n\t\tif (editor.config.get(\"fontFamily.supportAllValues\")) {\n\t\t\tthis._prepareAnyValueConverters();\n\t\t\tthis._prepareCompatibilityConverter();\n\t\t} else editor.conversion.attributeToElement(definition);\n\t\teditor.commands.add(FONT_FAMILY, new FontFamilyCommand(editor));\n\t}\n\t/**\n\t* These converters enable keeping any value found as `style=\"font-family: *\"` as a value of an attribute on a text even\n\t* if it is not defined in the plugin configuration.\n\t*/\n\t_prepareAnyValueConverters() {\n\t\tconst editor = this.editor;\n\t\teditor.conversion.for(\"downcast\").attributeToElement({\n\t\t\tmodel: FONT_FAMILY,\n\t\t\tview: (attributeValue, { writer }) => {\n\t\t\t\treturn writer.createAttributeElement(\"span\", { style: \"font-family:\" + attributeValue }, { priority: 7 });\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_FAMILY,\n\t\t\t\tvalue: (viewElement) => viewElement.getStyle(\"font-family\")\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tstyles: { \"font-family\": /.*/ }\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Adds support for legacy `<font face=\"..\">` formatting.\n\t*/\n\t_prepareCompatibilityConverter() {\n\t\tthis.editor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"font\",\n\t\t\t\tattributes: { \"face\": /.*/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_FAMILY,\n\t\t\t\tvalue: (viewElement) => viewElement.getAttribute(\"face\")\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 font/fontfamily/fontfamilyui\n*/\n/**\n* The font family UI plugin. It introduces the `'fontFamily'` dropdown.\n*/\nvar FontFamilyUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontFamilyUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst options = this._getLocalizedOptions();\n\t\tconst command = editor.commands.get(FONT_FAMILY);\n\t\tconst accessibleLabel = t(\"Font Family\");\n\t\tconst listOptions = _prepareListOptions$1(options, command);\n\t\teditor.ui.componentFactory.add(FONT_FAMILY, (locale) => {\n\t\t\tconst dropdownView = createDropdown(locale);\n\t\t\taddListToDropdown(dropdownView, listOptions, {\n\t\t\t\trole: \"menu\",\n\t\t\t\tariaLabel: accessibleLabel\n\t\t\t});\n\t\t\tdropdownView.buttonView.set({\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontFamily,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tdropdownView.extendTemplate({ attributes: { class: \"ck-font-family-dropdown\" } });\n\t\t\tdropdownView.bind(\"isEnabled\").to(command);\n\t\t\tthis.listenTo(dropdownView, \"execute\", (evt) => {\n\t\t\t\teditor.execute(evt.source.commandName, { value: evt.source.commandParam });\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t\teditor.ui.componentFactory.add(`menuBar:${FONT_FAMILY}`, (locale) => {\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tmenuView.buttonView.set({\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontFamily\n\t\t\t});\n\t\t\tmenuView.bind(\"isEnabled\").to(command);\n\t\t\tconst listView = new MenuBarMenuListView(locale);\n\t\t\tfor (const definition of listOptions) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView(locale, menuView);\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView(locale);\n\t\t\t\tbuttonView.set({\n\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\tisToggleable: true\n\t\t\t\t});\n\t\t\t\tbuttonView.bind(...Object.keys(definition.model)).to(definition.model);\n\t\t\t\tbuttonView.delegate(\"execute\").to(menuView);\n\t\t\t\tbuttonView.on(\"execute\", () => {\n\t\t\t\t\teditor.execute(definition.model.commandName, { value: definition.model.commandParam });\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t});\n\t\t\t\tlistItemView.children.add(buttonView);\n\t\t\t\tlistView.items.add(listItemView);\n\t\t\t}\n\t\t\tmenuView.panelView.children.add(listView);\n\t\t\treturn menuView;\n\t\t});\n\t}\n\t/**\n\t* Returns options as defined in `config.fontFamily.options` but processed to account for\n\t* editor localization, i.e. to display {@link module:font/fontconfig~FontFamilyOption}\n\t* in the correct language.\n\t*\n\t* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n\t* when the user configuration is defined because the editor does not exist yet.\n\t*/\n\t_getLocalizedOptions() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\treturn normalizeOptions(editor.config.get(FONT_FAMILY).options).map((option) => {\n\t\t\tif (option.title === \"Default\") option.title = t(\"Default\");\n\t\t\treturn option;\n\t\t});\n\t}\n};\n/**\n* Prepares FontFamily dropdown items.\n*/\nfunction _prepareListOptions$1(options, command) {\n\tconst itemDefinitions = new Collection();\n\tfor (const option of options) {\n\t\tconst def = {\n\t\t\ttype: \"button\",\n\t\t\tmodel: new UIModel({\n\t\t\t\tcommandName: FONT_FAMILY,\n\t\t\t\tcommandParam: option.model,\n\t\t\t\tlabel: option.title,\n\t\t\t\trole: \"menuitemradio\",\n\t\t\t\twithText: true\n\t\t\t})\n\t\t};\n\t\tdef.model.bind(\"isOn\").to(command, \"value\", (value) => {\n\t\t\tif (value === option.model) return true;\n\t\t\tif (!value || !option.model) return false;\n\t\t\treturn normalizeFontFamilies(value)[0].toLowerCase() === normalizeFontFamilies(option.model)[0].toLowerCase();\n\t\t});\n\t\tif (option.view && typeof option.view !== \"string\" && option.view.styles) def.model.set(\"labelStyle\", `font-family: ${option.view.styles[\"font-family\"]}`);\n\t\titemDefinitions.add(def);\n\t}\n\treturn itemDefinitions;\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 font/fontfamily\n*/\n/**\n* The font family plugin.\n*\n* For a detailed overview, check the {@glink features/font font feature} documentatiom\n* and the {@glink api/font package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing} and\n* {@link module:font/fontfamily/fontfamilyui~FontFamilyUI} features in the editor.\n*/\nvar FontFamily = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [FontFamilyEditing, FontFamilyUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontFamily\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* The font size command. It is used by {@link module:font/fontsize/fontsizeediting~FontSizeEditing}\n* to apply the font size.\n*\n* ```ts\n* editor.execute( 'fontSize', { value: 'small' } );\n* ```\n*\n* **Note**: Executing the command without the value removes the attribute from the model.\n*/\nvar FontSizeCommand = class extends FontCommand {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor, FONT_SIZE);\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 font/fontsize/utils\n*/\n/**\n* Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options}\n* to the {@link module:font/fontconfig~FontSizeOption} format.\n*\n* @param configuredOptions An array of options taken from the configuration.\n* @internal\n*/\nfunction normalizeOptions$1(configuredOptions) {\n\treturn configuredOptions.map((item) => getOptionDefinition(item)).filter((option) => option !== void 0);\n}\nconst namedPresets = {\n\tget tiny() {\n\t\treturn {\n\t\t\ttitle: \"Tiny\",\n\t\t\tmodel: \"tiny\",\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tclasses: \"text-tiny\",\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t},\n\tget small() {\n\t\treturn {\n\t\t\ttitle: \"Small\",\n\t\t\tmodel: \"small\",\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tclasses: \"text-small\",\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t},\n\tget big() {\n\t\treturn {\n\t\t\ttitle: \"Big\",\n\t\t\tmodel: \"big\",\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tclasses: \"text-big\",\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t},\n\tget huge() {\n\t\treturn {\n\t\t\ttitle: \"Huge\",\n\t\t\tmodel: \"huge\",\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tclasses: \"text-huge\",\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t}\n};\n/**\n* Returns an option definition either from preset or creates one from number shortcut.\n* If object is passed then this method will return it without alternating it. Returns undefined for item than cannot be parsed.\n*/\nfunction getOptionDefinition(option) {\n\tif (typeof option === \"number\") option = String(option);\n\tif (typeof option === \"object\" && isFullItemDefinition(option)) return attachPriority(option);\n\tconst preset = findPreset(option);\n\tif (preset) return attachPriority(preset);\n\tif (option === \"default\") return {\n\t\tmodel: void 0,\n\t\ttitle: \"Default\"\n\t};\n\tif (isNumericalDefinition(option)) return;\n\treturn generatePixelPreset(option);\n}\n/**\n* Creates a predefined preset for pixel size.\n* @param definition Font size in pixels.\n* @returns\n*/\nfunction generatePixelPreset(definition) {\n\tif (typeof definition === \"string\") definition = {\n\t\ttitle: definition,\n\t\tmodel: `${parseFloat(definition)}px`\n\t};\n\tdefinition.view = {\n\t\tname: \"span\",\n\t\tstyles: { \"font-size\": definition.model }\n\t};\n\treturn attachPriority(definition);\n}\n/**\n* Adds the priority to the view element definition if missing. It's required due to https://github.com/ckeditor/ckeditor5/issues/2291\n*/\nfunction attachPriority(definition) {\n\tif (definition.view && typeof definition.view !== \"string\" && !definition.view.priority) definition.view.priority = 7;\n\treturn definition;\n}\n/**\n* Returns a prepared preset definition. If passed an object, a name of preset should be defined as `model` value.\n*\n* @param definition.model A preset name.\n*/\nfunction findPreset(definition) {\n\treturn typeof definition === \"string\" ? namedPresets[definition] : namedPresets[definition.model];\n}\n/**\n* We treat `definition` as completed if it is an object that contains `title`, `model` and `view` values.\n*/\nfunction isFullItemDefinition(definition) {\n\treturn definition.title && definition.model && definition.view;\n}\nfunction isNumericalDefinition(definition) {\n\tlet numberValue;\n\tif (typeof definition === \"object\") {\n\t\tif (!definition.model)\n /**\n\t\t* Provided value as an option for {@link module:font/fontsize~FontSize} seems to invalid.\n\t\t*\n\t\t* See valid examples described in the {@link module:font/fontconfig~FontSizeConfig#options plugin configuration}.\n\t\t*\n\t\t* @error font-size-invalid-definition\n\t\t*/\n\t\tthrow new CKEditorError(\"font-size-invalid-definition\", null, definition);\n\t\telse numberValue = parseFloat(definition.model);\n\t} else numberValue = parseFloat(definition);\n\treturn isNaN(numberValue);\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 font/fontsize/fontsizeediting\n*/\nconst styleFontSize = [\n\t\"x-small\",\n\t\"x-small\",\n\t\"small\",\n\t\"medium\",\n\t\"large\",\n\t\"x-large\",\n\t\"xx-large\",\n\t\"xxx-large\"\n];\n/**\n* The font size editing feature.\n*\n* It introduces the {@link module:font/fontsize/fontsizecommand~FontSizeCommand command} and the `fontSize`\n* attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}\n* as a `<span>` element with either:\n* * a style attribute (`<span style=\"font-size:12px\">...</span>`),\n* * or a class attribute (`<span class=\"text-small\">...</span>`)\n*\n* depending on the {@link module:font/fontconfig~FontSizeConfig configuration}.\n*/\nvar FontSizeEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontSizeEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(FONT_SIZE, {\n\t\t\toptions: [\n\t\t\t\t\"tiny\",\n\t\t\t\t\"small\",\n\t\t\t\t\"default\",\n\t\t\t\t\"big\",\n\t\t\t\t\"huge\"\n\t\t\t],\n\t\t\tsupportAllValues: false\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: FONT_SIZE });\n\t\teditor.model.schema.setAttributeProperties(FONT_SIZE, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t});\n\t\tconst supportAllValues = editor.config.get(\"fontSize.supportAllValues\");\n\t\tconst options = normalizeOptions$1(this.editor.config.get(\"fontSize.options\")).filter((item) => item.model);\n\t\tconst definition = buildDefinition(FONT_SIZE, options);\n\t\tif (supportAllValues) {\n\t\t\tthis._prepareAnyValueConverters(definition);\n\t\t\tthis._prepareCompatibilityConverter();\n\t\t} else editor.conversion.attributeToElement(definition);\n\t\teditor.commands.add(FONT_SIZE, new FontSizeCommand(editor));\n\t}\n\t/**\n\t* These converters enable keeping any value found as `style=\"font-size: *\"` as a value of an attribute on a text even\n\t* if it is not defined in the plugin configuration.\n\t*\n\t* @param definition Converter definition out of input data.\n\t*/\n\t_prepareAnyValueConverters(definition) {\n\t\tconst editor = this.editor;\n\t\tconst presets = definition.model.values.filter((value) => {\n\t\t\treturn !isLengthStyleValue(String(value)) && !isPercentageStyleValue(String(value));\n\t\t});\n\t\tif (presets.length)\n /**\n\t\t* If {@link module:font/fontconfig~FontSizeConfig#supportAllValues `config.fontSize.supportAllValues`} is `true`,\n\t\t* you need to use numerical values as font size options.\n\t\t*\n\t\t* See valid examples described in the {@link module:font/fontconfig~FontSizeConfig#options plugin configuration}.\n\t\t*\n\t\t* @error font-size-invalid-use-of-named-presets\n\t\t* @param {Array.<string>} presets Invalid values.\n\t\t*/\n\t\tthrow new CKEditorError(\"font-size-invalid-use-of-named-presets\", null, { presets });\n\t\teditor.conversion.for(\"downcast\").attributeToElement({\n\t\t\tmodel: FONT_SIZE,\n\t\t\tview: (attributeValue, { writer }) => {\n\t\t\t\tif (!attributeValue) return;\n\t\t\t\treturn writer.createAttributeElement(\"span\", { style: \"font-size:\" + attributeValue }, { priority: 7 });\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_SIZE,\n\t\t\t\tvalue: (viewElement) => viewElement.getStyle(\"font-size\")\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tstyles: { \"font-size\": /.*/ }\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Adds support for legacy `<font size=\"..\">` formatting.\n\t*/\n\t_prepareCompatibilityConverter() {\n\t\tthis.editor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"font\",\n\t\t\t\tattributes: { \"size\": /^[+-]?\\d{1,3}$/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_SIZE,\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tconst value = viewElement.getAttribute(\"size\");\n\t\t\t\t\tconst isRelative = value[0] === \"-\" || value[0] === \"+\";\n\t\t\t\t\tlet size = parseInt(value, 10);\n\t\t\t\t\tif (isRelative) size = 3 + size;\n\t\t\t\t\tconst maxSize = styleFontSize.length - 1;\n\t\t\t\t\treturn styleFontSize[Math.min(Math.max(size, 0), maxSize)];\n\t\t\t\t}\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 font/fontsize/fontsizeui\n*/\n/**\n* The font size UI plugin. It introduces the `'fontSize'` dropdown.\n*/\nvar FontSizeUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontSizeUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst options = this._getLocalizedOptions();\n\t\tconst command = editor.commands.get(FONT_SIZE);\n\t\tconst accessibleLabel = t(\"Font Size\");\n\t\tconst listOptions = _prepareListOptions(options, command);\n\t\teditor.ui.componentFactory.add(FONT_SIZE, (locale) => {\n\t\t\tconst dropdownView = createDropdown(locale);\n\t\t\taddListToDropdown(dropdownView, listOptions, {\n\t\t\t\trole: \"menu\",\n\t\t\t\tariaLabel: accessibleLabel\n\t\t\t});\n\t\t\tdropdownView.buttonView.set({\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontSize,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tdropdownView.extendTemplate({ attributes: { class: [\"ck-font-size-dropdown\"] } });\n\t\t\tdropdownView.bind(\"isEnabled\").to(command);\n\t\t\tthis.listenTo(dropdownView, \"execute\", (evt) => {\n\t\t\t\teditor.execute(evt.source.commandName, { value: evt.source.commandParam });\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t\teditor.ui.componentFactory.add(`menuBar:${FONT_SIZE}`, (locale) => {\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tmenuView.buttonView.set({\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontSize\n\t\t\t});\n\t\t\tmenuView.bind(\"isEnabled\").to(command);\n\t\t\tconst listView = new MenuBarMenuListView(locale);\n\t\t\tfor (const definition of listOptions) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView(locale, menuView);\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView(locale);\n\t\t\t\tbuttonView.set({\n\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\tisToggleable: true\n\t\t\t\t});\n\t\t\t\tbuttonView.bind(...Object.keys(definition.model)).to(definition.model);\n\t\t\t\tbuttonView.delegate(\"execute\").to(menuView);\n\t\t\t\tbuttonView.on(\"execute\", () => {\n\t\t\t\t\teditor.execute(definition.model.commandName, { value: definition.model.commandParam });\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t});\n\t\t\t\tlistItemView.children.add(buttonView);\n\t\t\t\tlistView.items.add(listItemView);\n\t\t\t}\n\t\t\tmenuView.panelView.children.add(listView);\n\t\t\treturn menuView;\n\t\t});\n\t}\n\t/**\n\t* Returns options as defined in `config.fontSize.options` but processed to account for\n\t* editor localization, i.e. to display {@link module:font/fontconfig~FontSizeOption}\n\t* in the correct language.\n\t*\n\t* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n\t* when the user configuration is defined because the editor does not exist yet.\n\t*/\n\t_getLocalizedOptions() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst localizedTitles = {\n\t\t\tDefault: t(\"Default\"),\n\t\t\tTiny: t(\"Tiny\"),\n\t\t\tSmall: t(\"Small\"),\n\t\t\tBig: t(\"Big\"),\n\t\t\tHuge: t(\"Huge\")\n\t\t};\n\t\treturn normalizeOptions$1(editor.config.get(FONT_SIZE).options).map((option) => {\n\t\t\tconst title = localizedTitles[option.title];\n\t\t\tif (title && title != option.title) option = Object.assign({}, option, { title });\n\t\t\treturn option;\n\t\t});\n\t}\n};\n/**\n* Prepares FontSize dropdown items.\n*/\nfunction _prepareListOptions(options, command) {\n\tconst itemDefinitions = new Collection();\n\tfor (const option of options) {\n\t\tconst def = {\n\t\t\ttype: \"button\",\n\t\t\tmodel: new UIModel({\n\t\t\t\tcommandName: FONT_SIZE,\n\t\t\t\tcommandParam: option.model,\n\t\t\t\tlabel: option.title,\n\t\t\t\tclass: \"ck-fontsize-option\",\n\t\t\t\trole: \"menuitemradio\",\n\t\t\t\twithText: true\n\t\t\t})\n\t\t};\n\t\tif (option.view && typeof option.view !== \"string\") {\n\t\t\tif (option.view.styles) def.model.set(\"labelStyle\", `font-size:${option.view.styles[\"font-size\"]}`);\n\t\t\tif (option.view.classes) def.model.set(\"class\", `${def.model.class} ${option.view.classes}`);\n\t\t}\n\t\tdef.model.bind(\"isOn\").to(command, \"value\", (value) => value === option.model);\n\t\titemDefinitions.add(def);\n\t}\n\treturn itemDefinitions;\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 font/fontsize\n*/\n/**\n* The font size plugin.\n*\n* For a detailed overview, check the {@glink features/font font feature} documentation\n* and the {@glink api/font package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:font/fontsize/fontsizeediting~FontSizeEditing} and\n* {@link module:font/fontsize/fontsizeui~FontSizeUI} features in the editor.\n*/\nvar FontSize = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [FontSizeEditing, FontSizeUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontSize\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options}\n\t* to the {@link module:font/fontconfig~FontSizeOption} format.\n\t*\n\t* @param options An array of options taken from the configuration.\n\t*/\n\tnormalizeSizeOptions(options) {\n\t\treturn normalizeOptions$1(options);\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* The font color command. It is used by {@link module:font/fontcolor/fontcolorediting~FontColorEditing}\n* to apply the font color.\n*\n* ```ts\n* editor.execute( 'fontColor', { value: 'rgb(250, 20, 20)' } );\n* ```\n*\n* **Note**: Executing the command with the `null` value removes the attribute from the model.\n*/\nvar FontColorCommand = class extends FontCommand {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor, FONT_COLOR);\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 font/fontcolor/fontcolorediting\n*/\n/**\n* The font color editing feature.\n*\n* It introduces the {@link module:font/fontcolor/fontcolorcommand~FontColorCommand command} and\n* the `fontColor` attribute in the {@link module:engine/model/model~Model model} which renders\n* in the {@link module:engine/view/view view} as a `<span>` element (`<span style=\"color: ...\">`),\n* depending on the {@link module:font/fontconfig~FontColorConfig configuration}.\n*/\nvar FontColorEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontColorEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(FONT_COLOR, {\n\t\t\tcolors: [\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 0%)\",\n\t\t\t\t\tlabel: \"Black\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 30%)\",\n\t\t\t\t\tlabel: \"Dim grey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 60%)\",\n\t\t\t\t\tlabel: \"Grey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 90%)\",\n\t\t\t\t\tlabel: \"Light grey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 100%)\",\n\t\t\t\t\tlabel: \"White\",\n\t\t\t\t\thasBorder: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Red\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(30, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Orange\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(60, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Yellow\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(90, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Light green\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(120, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Green\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(150, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Aquamarine\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(180, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Turquoise\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(210, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Light blue\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(240, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Blue\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(270, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Purple\"\n\t\t\t\t}\n\t\t\t],\n\t\t\tcolumns: 5\n\t\t});\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tstyles: { \"color\": /[\\s\\S]+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_COLOR,\n\t\t\t\tvalue: renderUpcastAttribute(\"color\")\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"font\",\n\t\t\t\tattributes: { \"color\": /^#?\\w+$/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_COLOR,\n\t\t\t\tvalue: (viewElement) => viewElement.getAttribute(\"color\")\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"downcast\").attributeToElement({\n\t\t\tmodel: FONT_COLOR,\n\t\t\tview: renderDowncastElement(\"color\")\n\t\t});\n\t\teditor.commands.add(FONT_COLOR, new FontColorCommand(editor));\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: FONT_COLOR });\n\t\teditor.model.schema.setAttributeProperties(FONT_COLOR, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\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 font/ui/colorui\n*/\n/**\n* The color UI plugin which isolates the common logic responsible for displaying dropdowns with color grids.\n*\n* It is used to create the `'fontBackgroundColor'` and `'fontColor'` dropdowns, each hosting\n* a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n*/\nvar FontColorUIBase = class extends Plugin {\n\t/**\n\t* The name of the command which will be executed when a color tile is clicked.\n\t*/\n\tcommandName;\n\t/**\n\t* The name of this component in the {@link module:ui/componentfactory~ComponentFactory}.\n\t* Also the configuration scope name in `editor.config`.\n\t*/\n\tcomponentName;\n\t/**\n\t* The SVG icon used by the dropdown.\n\t*/\n\ticon;\n\t/**\n\t* The label used by the dropdown.\n\t*/\n\tdropdownLabel;\n\t/**\n\t* The number of columns in the color grid.\n\t*/\n\tcolumns;\n\t/**\n\t* Creates a plugin which introduces a dropdown with a pre–configured\n\t* {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n\t*\n\t* @param editor An editor instance.\n\t* @param config The configuration object.\n\t* @param config.commandName The name of the command which will be executed when a color tile is clicked.\n\t* @param config.componentName The name of the dropdown in the {@link module:ui/componentfactory~ComponentFactory}\n\t* and the configuration scope name in `editor.config`.\n\t* @param config.icon The SVG icon used by the dropdown.\n\t* @param config.dropdownLabel The label used by the dropdown.\n\t*/\n\tconstructor(editor, { commandName, componentName, icon, dropdownLabel }) {\n\t\tsuper(editor);\n\t\tthis.commandName = commandName;\n\t\tthis.componentName = componentName;\n\t\tthis.icon = icon;\n\t\tthis.dropdownLabel = dropdownLabel;\n\t\tthis.columns = editor.config.get(`${this.componentName}.columns`);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = locale.t;\n\t\tconst command = editor.commands.get(this.commandName);\n\t\tconst componentConfig = editor.config.get(this.componentName);\n\t\tconst colorsConfig = normalizeColorOptions(componentConfig.colors);\n\t\tconst localizedColors = getLocalizedColorOptions(locale, colorsConfig);\n\t\tconst documentColorsCount = componentConfig.documentColors;\n\t\tconst hasColorPicker = componentConfig.colorPicker !== false;\n\t\teditor.ui.componentFactory.add(this.componentName, (locale) => {\n\t\t\tconst dropdownView = createDropdown(locale);\n\t\t\tlet dropdownContentRendered = false;\n\t\t\tconst colorSelectorView = addColorSelectorToDropdown({\n\t\t\t\tdropdownView,\n\t\t\t\tcolors: localizedColors.map((option) => ({\n\t\t\t\t\tlabel: option.label,\n\t\t\t\t\tcolor: option.model,\n\t\t\t\t\toptions: { hasBorder: option.hasBorder }\n\t\t\t\t})),\n\t\t\t\tcolumns: this.columns,\n\t\t\t\tremoveButtonLabel: t(\"Remove color\"),\n\t\t\t\tcolorPickerLabel: t(\"Color picker\"),\n\t\t\t\tdocumentColorsLabel: documentColorsCount !== 0 ? t(\"Document colors\") : \"\",\n\t\t\t\tdocumentColorsCount: documentColorsCount === void 0 ? this.columns : documentColorsCount,\n\t\t\t\tcolorPickerViewConfig: hasColorPicker ? componentConfig.colorPicker || {} : false\n\t\t\t});\n\t\t\tcolorSelectorView.bind(\"selectedColor\").to(command, \"value\");\n\t\t\tdropdownView.buttonView.set({\n\t\t\t\tlabel: this.dropdownLabel,\n\t\t\t\ticon: this.icon,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tdropdownView.extendTemplate({ attributes: { class: \"ck-color-ui-dropdown\" } });\n\t\t\tdropdownView.bind(\"isEnabled\").to(command);\n\t\t\tcolorSelectorView.on(\"execute\", (evt, data) => {\n\t\t\t\tif (dropdownView.isOpen) editor.execute(this.commandName, {\n\t\t\t\t\tvalue: data.value,\n\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t});\n\t\t\t\tif (data.source !== \"colorPicker\") editor.editing.view.focus();\n\t\t\t\tif (data.source === \"colorPickerSaveButton\") dropdownView.isOpen = false;\n\t\t\t});\n\t\t\tcolorSelectorView.on(\"colorPicker:show\", () => {\n\t\t\t\tthis._undoStepBatch = editor.model.createBatch();\n\t\t\t});\n\t\t\tcolorSelectorView.on(\"colorPicker:cancel\", () => {\n\t\t\t\tif (this._undoStepBatch.operations.length) {\n\t\t\t\t\tdropdownView.isOpen = false;\n\t\t\t\t\teditor.execute(\"undo\", this._undoStepBatch);\n\t\t\t\t}\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\tdropdownView.on(\"change:isOpen\", (evt, name, isVisible) => {\n\t\t\t\tif (!dropdownContentRendered) {\n\t\t\t\t\tdropdownContentRendered = true;\n\t\t\t\t\tdropdownView.colorSelectorView.appendUI();\n\t\t\t\t}\n\t\t\t\tif (isVisible) {\n\t\t\t\t\tif (documentColorsCount !== 0) colorSelectorView.updateDocumentColors(editor.model, this.componentName);\n\t\t\t\t\tcolorSelectorView.updateSelectedColors();\n\t\t\t\t\tcolorSelectorView.showColorGridsFragment();\n\t\t\t\t}\n\t\t\t});\n\t\t\tfocusChildOnDropdownOpen(dropdownView, () => dropdownView.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find((item) => item.isOn));\n\t\t\treturn dropdownView;\n\t\t});\n\t\teditor.ui.componentFactory.add(`menuBar:${this.componentName}`, (locale) => {\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tmenuView.buttonView.set({\n\t\t\t\tlabel: this.dropdownLabel,\n\t\t\t\ticon: this.icon\n\t\t\t});\n\t\t\tmenuView.bind(\"isEnabled\").to(command);\n\t\t\tlet contentRendered = false;\n\t\t\tconst colorSelectorView = new ColorSelectorView(locale, {\n\t\t\t\tcolors: localizedColors.map((option) => ({\n\t\t\t\t\tlabel: option.label,\n\t\t\t\t\tcolor: option.model,\n\t\t\t\t\toptions: { hasBorder: option.hasBorder }\n\t\t\t\t})),\n\t\t\t\tcolumns: this.columns,\n\t\t\t\tremoveButtonLabel: t(\"Remove color\"),\n\t\t\t\tcolorPickerLabel: t(\"Color picker\"),\n\t\t\t\tdocumentColorsLabel: documentColorsCount !== 0 ? t(\"Document colors\") : \"\",\n\t\t\t\tdocumentColorsCount: documentColorsCount === void 0 ? this.columns : documentColorsCount,\n\t\t\t\tcolorPickerViewConfig: false\n\t\t\t});\n\t\t\tcolorSelectorView.bind(\"selectedColor\").to(command, \"value\");\n\t\t\tcolorSelectorView.delegate(\"execute\").to(menuView);\n\t\t\tcolorSelectorView.on(\"execute\", (evt, data) => {\n\t\t\t\teditor.execute(this.commandName, {\n\t\t\t\t\tvalue: data.value,\n\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t});\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\tmenuView.on(\"change:isOpen\", (evt, name, isVisible) => {\n\t\t\t\tif (!contentRendered) {\n\t\t\t\t\tcontentRendered = true;\n\t\t\t\t\tcolorSelectorView.appendUI();\n\t\t\t\t}\n\t\t\t\tif (isVisible) {\n\t\t\t\t\tif (documentColorsCount !== 0) colorSelectorView.updateDocumentColors(editor.model, this.componentName);\n\t\t\t\t\tcolorSelectorView.updateSelectedColors();\n\t\t\t\t\tcolorSelectorView.showColorGridsFragment();\n\t\t\t\t}\n\t\t\t});\n\t\t\tmenuView.panelView.children.add(colorSelectorView);\n\t\t\treturn menuView;\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 font/fontcolor/fontcolorui\n*/\n/**\n* The font color UI plugin. It introduces the `'fontColor'` dropdown.\n*/\nvar FontColorUI = class extends FontColorUIBase {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tconst t = editor.locale.t;\n\t\tsuper(editor, {\n\t\t\tcommandName: FONT_COLOR,\n\t\t\tcomponentName: FONT_COLOR,\n\t\t\ticon: IconFontColor,\n\t\t\tdropdownLabel: t(\"Font Color\")\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontColorUI\";\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 font/fontcolor\n*/\n/**\n* The font color plugin.\n*\n* For a detailed overview, check the {@glink features/font font feature} documentation\n* and the {@glink api/font package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:font/fontcolor/fontcolorediting~FontColorEditing} and\n* {@link module:font/fontcolor/fontcolorui~FontColorUI} features in the editor.\n*/\nvar FontColor = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [FontColorEditing, FontColorUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontColor\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* The font background color command. It is used by\n* {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing}\n* to apply the font background color.\n*\n* ```ts\n* editor.execute( 'fontBackgroundColor', { value: 'rgb(250, 20, 20)' } );\n* ```\n*\n* **Note**: Executing the command with the `null` value removes the attribute from the model.\n*/\nvar FontBackgroundColorCommand = class extends FontCommand {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor, FONT_BACKGROUND_COLOR);\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 font/fontbackgroundcolor/fontbackgroundcolorediting\n*/\n/**\n* The font background color editing feature.\n*\n* It introduces the {@link module:font/fontbackgroundcolor/fontbackgroundcolorcommand~FontBackgroundColorCommand command} and\n* the `fontBackgroundColor` attribute in the {@link module:engine/model/model~Model model} which renders\n* in the {@link module:engine/view/view view} as a `<span>` element (`<span style=\"background-color: ...\">`),\n* depending on the {@link module:font/fontconfig~FontColorConfig configuration}.\n*/\nvar FontBackgroundColorEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontBackgroundColorEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(FONT_BACKGROUND_COLOR, {\n\t\t\tcolors: [\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 0%)\",\n\t\t\t\t\tlabel: \"Black\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 30%)\",\n\t\t\t\t\tlabel: \"Dim grey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 60%)\",\n\t\t\t\t\tlabel: \"Grey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 90%)\",\n\t\t\t\t\tlabel: \"Light grey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 0%, 100%)\",\n\t\t\t\t\tlabel: \"White\",\n\t\t\t\t\thasBorder: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(0, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Red\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(30, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Orange\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(60, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Yellow\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(90, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Light green\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(120, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Green\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(150, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Aquamarine\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(180, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Turquoise\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(210, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Light blue\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(240, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Blue\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: \"hsl(270, 75%, 60%)\",\n\t\t\t\t\tlabel: \"Purple\"\n\t\t\t\t}\n\t\t\t],\n\t\t\tcolumns: 5\n\t\t});\n\t\teditor.data.addStyleProcessorRules(addBackgroundStylesRules);\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"span\",\n\t\t\t\tstyles: { \"background-color\": /[\\s\\S]+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_BACKGROUND_COLOR,\n\t\t\t\tvalue: renderUpcastAttribute(\"background-color\")\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"downcast\").attributeToElement({\n\t\t\tmodel: FONT_BACKGROUND_COLOR,\n\t\t\tview: renderDowncastElement(\"background-color\")\n\t\t});\n\t\teditor.commands.add(FONT_BACKGROUND_COLOR, new FontBackgroundColorCommand(editor));\n\t\teditor.model.schema.extend(\"$text\", { allowAttributes: FONT_BACKGROUND_COLOR });\n\t\teditor.model.schema.setAttributeProperties(FONT_BACKGROUND_COLOR, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\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 font/fontbackgroundcolor/fontbackgroundcolorui\n*/\n/**\n* The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.\n*/\nvar FontBackgroundColorUI = class extends FontColorUIBase {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tconst t = editor.locale.t;\n\t\tsuper(editor, {\n\t\t\tcommandName: FONT_BACKGROUND_COLOR,\n\t\t\tcomponentName: FONT_BACKGROUND_COLOR,\n\t\t\ticon: IconFontBackground,\n\t\t\tdropdownLabel: t(\"Font Background Color\")\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontBackgroundColorUI\";\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 font/fontbackgroundcolor\n*/\n/**\n* The font background color plugin.\n*\n* For a detailed overview, check the {@glink features/font font feature} documentation\n* and the {@glink api/font package page}.\n*\n* This is a \"glue\" plugin which loads\n* the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} and\n* {@link module:font/fontbackgroundcolor/fontbackgroundcolorui~FontBackgroundColorUI} features in the editor.\n*/\nvar FontBackgroundColor = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [FontBackgroundColorEditing, FontBackgroundColorUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"FontBackgroundColor\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 font/font\n*/\n/**\n* A plugin that enables a set of text styling features:\n*\n* * {@link module:font/fontsize~FontSize},\n* * {@link module:font/fontfamily~FontFamily}.\n* * {@link module:font/fontcolor~FontColor},\n* * {@link module:font/fontbackgroundcolor~FontBackgroundColor}.\n*\n* For a detailed overview, check the {@glink features/font Font feature} documentation\n* and the {@glink api/font package page}.\n*/\nvar Font = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tFontFamily,\n\t\t\tFontSize,\n\t\t\tFontColor,\n\t\t\tFontBackgroundColor\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Font\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { Font, FontBackgroundColor, FontBackgroundColorCommand, FontBackgroundColorEditing, FontBackgroundColorUI, FontColor, FontColorCommand, FontColorEditing, FontColorUI, FontColorUIBase, FontCommand, FontFamily, FontFamilyCommand, FontFamilyEditing, FontFamilyUI, FontSize, FontSizeCommand, FontSizeEditing, FontSizeUI, addColorSelectorToDropdown as _addFontColorSelectorToDropdown, buildDefinition as _buildFontDefinition, normalizeOptions as _normalizeFontFamilyOptions, normalizeOptions$1 as _normalizeFontSizeOptions, renderDowncastElement as _renderDowncastFontElement, renderUpcastAttribute as _renderUpcastFontColorAttribute };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module font/fontcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport {\n\tModelDocumentSelection,\n\ttype Batch,\n\ttype ModelWriter,\n\ttype ModelRange,\n\ttype ModelElement\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * The base font command.\n */\nexport abstract class FontCommand extends Command {\n\t/**\n\t * When set, it reflects the {@link #attributeKey} value of the selection.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: string;\n\n\t/**\n\t * A model attribute on which this command operates.\n\t */\n\tpublic readonly attributeKey: string;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor Editor instance.\n\t * @param attributeKey The name of a model attribute on which this command operates.\n\t */\n\tconstructor( editor: Editor, attributeKey: string ) {\n\t\tsuper( editor );\n\n\t\tthis.attributeKey = attributeKey;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis.value = doc.selection.getAttribute( this.attributeKey ) as string;\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection( doc.selection, this.attributeKey );\n\t}\n\n\t/**\n\t * Executes the command. Applies the `value` of the {@link #attributeKey} to the selection.\n\t * If no `value` is passed, it removes the attribute from the selection.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.value The value to apply.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { value?: string; batch?: Batch } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selection = document.selection;\n\n\t\tconst value = options.value;\n\t\tconst batch = options.batch;\n\n\t\tconst updateAttribute = ( writer: ModelWriter ) => {\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.setSelectionAttribute( this.attributeKey, value );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeSelectionAttribute( this.attributeKey );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst ranges = model.schema.getValidRanges( selection.getRanges(), this.attributeKey, {\n\t\t\t\t\tincludeEmptyRanges: true\n\t\t\t\t} );\n\n\t\t\t\tfor ( const range of ranges ) {\n\t\t\t\t\tlet itemOrRange: ModelRange | ModelElement = range;\n\t\t\t\t\tlet attributeKey = this.attributeKey;\n\n\t\t\t\t\tif ( range.isCollapsed ) {\n\t\t\t\t\t\titemOrRange = range.start.parent as ModelElement;\n\t\t\t\t\t\tattributeKey = ModelDocumentSelection._getStoreAttributeKey( this.attributeKey );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\twriter.setAttribute( attributeKey, value, itemOrRange );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.removeAttribute( attributeKey, itemOrRange );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// In some scenarios, you may want to use a single undo step for multiple changes (e.g. in color picker).\n\t\tif ( batch ) {\n\t\t\tmodel.enqueueChange( batch, writer => {\n\t\t\t\tupdateAttribute( writer );\n\t\t\t} );\n\t\t} else {\n\t\t\tmodel.change( writer => {\n\t\t\t\tupdateAttribute( writer );\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module font/utils\n */\n\nimport type { FontFamilyOption, FontSizeOption } from './fontconfig.js';\nimport { ColorSelectorView, type ColorDefinition, type ColorPickerViewConfig, type DropdownView } from '@ckeditor/ckeditor5-ui';\nimport type { ArrayOrItem } from '@ckeditor/ckeditor5-utils';\nimport type {\n\tViewAttributeElement,\n\tViewElement,\n\tMatcherPattern,\n\tViewElementDefinition,\n\tDowncastConversionApi\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * The name of the font size plugin.\n */\nexport const FONT_SIZE = 'fontSize';\n\n/**\n * The name of the font family plugin.\n */\nexport const FONT_FAMILY = 'fontFamily';\n\n/**\n * The name of the font color plugin.\n */\nexport const FONT_COLOR = 'fontColor';\n\n/**\n * The name of the font background color plugin.\n */\nexport const FONT_BACKGROUND_COLOR = 'fontBackgroundColor';\n\n/**\n * Builds a proper converter definition out of input data.\n *\n * @internal\n */\nexport function buildDefinition(\n\tmodelAttributeKey: string,\n\toptions: Array<FontFamilyOption> | Array<FontSizeOption>\n): FontConverterDefinition {\n\tconst definition: FontConverterDefinition = {\n\t\tmodel: {\n\t\t\tkey: modelAttributeKey,\n\t\t\tvalues: []\n\t\t},\n\t\tview: {},\n\t\tupcastAlso: {}\n\t};\n\n\tfor ( const option of options ) {\n\t\tdefinition.model.values.push( option.model! );\n\t\tdefinition.view[ option.model! ] = option.view!;\n\n\t\tif ( option.upcastAlso ) {\n\t\t\tdefinition.upcastAlso[ option.model! ] = option.upcastAlso;\n\t\t}\n\t}\n\n\treturn definition;\n}\n\n/**\n * @internal\n */\nexport type FontConverterDefinition = {\n\tmodel: { key: string; values: Array<string> };\n\tview: Record<string, ViewElementDefinition>;\n\tupcastAlso: Record<string, ArrayOrItem<MatcherPattern>>;\n};\n\n/**\n * A {@link module:font/fontcolor~FontColor font color} and\n * {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper\n * responsible for upcasting data to the model.\n *\n * **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.\n *\n * @internal\n */\nexport function renderUpcastAttribute( styleAttr: string ) {\n\treturn ( viewElement: ViewElement ): string => normalizeColorCode( viewElement.getStyle( styleAttr )! );\n}\n\n/**\n * A {@link module:font/fontcolor~FontColor font color} and\n * {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper\n * responsible for downcasting a color attribute to a `<span>` element.\n *\n * **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.\n *\n * @internal\n */\nexport function renderDowncastElement( styleAttr: string ) {\n\treturn ( modelAttributeValue: string, { writer }: DowncastConversionApi ): ViewAttributeElement =>\n\t\twriter.createAttributeElement( 'span', {\n\t\t\tstyle: `${ styleAttr }:${ modelAttributeValue }`\n\t\t}, { priority: 7 } );\n}\n\n/**\n * A helper that adds {@link module:ui/colorselector/colorselectorview~ColorSelectorView} to the color dropdown with proper initial values.\n *\n * @param options Configuration options\n * @param options.dropdownView The dropdown view to which a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}\n * will be added.\n * @param options.colors An array with definitions representing colors to be displayed in the color selector.\n * @param options.columns The number of columns in the color grid.\n * @param options.removeButtonLabel The label for the button responsible for removing the color.\n * @param options.colorPickerLabel The label for the color picker button.\n * @param options.documentColorsLabel The label for the section with document colors.\n * @param options.documentColorsCount The number of document colors inside the dropdown.\n * @param options.colorPickerViewConfig Configuration of the color picker view.\n * @returns The new color selector view.\n * @internal\n */\nexport function addColorSelectorToDropdown(\n\t{\n\t\tdropdownView, colors, columns, removeButtonLabel, colorPickerLabel,\n\t\tdocumentColorsLabel, documentColorsCount, colorPickerViewConfig\n\t}: {\n\t\tdropdownView: FontColorSelectorDropdownView;\n\t\tcolors: Array<ColorDefinition>;\n\t\tcolumns: number;\n\t\tremoveButtonLabel: string;\n\t\tcolorPickerLabel: string;\n\t\tdocumentColorsLabel?: string;\n\t\tdocumentColorsCount?: number;\n\t\tcolorPickerViewConfig: ColorPickerViewConfig | false;\n\t}\n): ColorSelectorView {\n\tconst locale = dropdownView.locale!;\n\tconst colorSelectorView = new ColorSelectorView( locale, {\n\t\tcolors,\n\t\tcolumns,\n\t\tremoveButtonLabel,\n\t\tcolorPickerLabel,\n\t\tdocumentColorsLabel,\n\t\tdocumentColorsCount,\n\t\tcolorPickerViewConfig\n\t} );\n\n\tdropdownView.colorSelectorView = colorSelectorView;\n\tdropdownView.panelView.children.add( colorSelectorView );\n\n\treturn colorSelectorView;\n}\n\n/**\n * Fixes the color value string.\n */\nfunction normalizeColorCode( value: string ): string {\n\treturn value.replace( /\\s/g, '' );\n}\n\nexport type FontColorSelectorDropdownView = DropdownView & {\n\tcolorSelectorView?: ColorSelectorView;\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/**\n * @module font/fontfamily/fontfamilycommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { FontCommand } from '../fontcommand.js';\nimport { FONT_FAMILY } from '../utils.js';\n\n/**\n * The font family command. It is used by {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing}\n * to apply the font family.\n *\n * ```ts\n * editor.execute( 'fontFamily', { value: 'Arial' } );\n * ```\n *\n * **Note**: Executing the command without the value removes the attribute from the model.\n */\nexport class FontFamilyCommand extends FontCommand {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor, FONT_FAMILY );\n\t}\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/**\n * @module font/fontfamily/utils\n */\n\nimport type { FontFamilyOption } from '../fontconfig.js';\n\n/**\n * Normalizes the {@link module:font/fontconfig~FontFamilyConfig#options configuration options}\n * to the {@link module:font/fontconfig~FontFamilyOption} format.\n *\n * @param configuredOptions An array of options taken from the configuration.\n * @internal\n */\nexport function normalizeOptions( configuredOptions: Array<string | FontFamilyOption> ): Array<FontFamilyOption> {\n\t// Convert options to objects.\n\treturn configuredOptions\n\t\t.map( getOptionDefinition )\n\t\t// Filter out undefined values that `getOptionDefinition` might return.\n\t\t.filter( option => option !== undefined ) as Array<FontFamilyOption>;\n}\n\n/**\n * Normalizes the CSS `font-family` property value to an array of unquoted and trimmed font faces.\n *\n * @internal\n */\nexport function normalizeFontFamilies( fontDefinition: string ): Array<string> {\n\treturn fontDefinition\n\t\t.replace( /[\"']/g, '' ).split( ',' )\n\t\t.map( name => name.trim() );\n}\n\n/**\n * Returns an option definition either created from string shortcut.\n * If object is passed then this method will return it without alternating it. Returns undefined for item than cannot be parsed.\n *\n */\nfunction getOptionDefinition( option: string | FontFamilyOption ): FontFamilyOption | undefined {\n\t// Treat any object as full item definition provided by user in configuration.\n\tif ( typeof option === 'object' ) {\n\t\treturn option;\n\t}\n\n\t// Handle 'default' string as a special case. It will be used to remove the fontFamily attribute.\n\tif ( option === 'default' ) {\n\t\treturn {\n\t\t\ttitle: 'Default',\n\t\t\tmodel: undefined\n\t\t};\n\t}\n\n\t// Ignore values that we cannot parse to a definition.\n\tif ( typeof option !== 'string' ) {\n\t\treturn undefined;\n\t}\n\n\t// Return font family definition from font string.\n\treturn generateFontPreset( option );\n}\n\n/**\n * Creates a predefined preset for pixel size. It deconstructs font-family like string into full configuration option.\n * A font definition is passed as coma delimited set of font family names. Font names might be quoted.\n *\n * @param fontDefinition A font definition form configuration.\n */\nfunction generateFontPreset( fontDefinition: string ): FontFamilyOption {\n\t// Remove quotes from font names. They will be normalized later.\n\tconst fontNames = normalizeFontFamilies( fontDefinition );\n\n\t// The first matched font name will be used as dropdown list item title and as model value.\n\tconst firstFontName = fontNames[ 0 ];\n\n\t// CSS-compatible font names.\n\tconst cssFontNames = fontNames.map( normalizeFontNameForCSS ).join( ', ' );\n\n\treturn {\n\t\ttitle: firstFontName,\n\t\tmodel: cssFontNames,\n\t\tview: {\n\t\t\tname: 'span',\n\t\t\tstyles: {\n\t\t\t\t'font-family': cssFontNames\n\t\t\t},\n\t\t\tpriority: 7\n\t\t}\n\t};\n}\n\n/**\n * Normalizes font name for the style attribute. It adds braces (') if font name contains spaces.\n */\nfunction normalizeFontNameForCSS( fontName: string ): string {\n\tfontName = fontName.trim();\n\n\t// Compound font names should be quoted.\n\tif ( fontName.indexOf( ' ' ) > 0 ) {\n\t\tfontName = `'${ fontName }'`;\n\t}\n\n\treturn fontName;\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/**\n * @module font/fontfamily/fontfamilyediting\n */\n\nimport { type Editor, Plugin } from '@ckeditor/ckeditor5-core';\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\n\nimport { FontFamilyCommand } from './fontfamilycommand.js';\nimport { normalizeOptions } from './utils.js';\nimport { buildDefinition, FONT_FAMILY } from '../utils.js';\n\n/**\n * The font family editing feature.\n *\n * It introduces the {@link module:font/fontfamily/fontfamilycommand~FontFamilyCommand command} and\n * the `fontFamily` attribute in the {@link module:engine/model/model~Model model} which renders\n * in the {@link module:engine/view/view view} as an inline `<span>` element (`<span style=\"font-family: Arial\">`),\n * depending on the {@link module:font/fontconfig~FontFamilyConfig configuration}.\n */\nexport class FontFamilyEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontFamilyEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Define default configuration using font families shortcuts.\n\t\teditor.config.define( FONT_FAMILY, {\n\t\t\toptions: [\n\t\t\t\t'default',\n\t\t\t\t'Arial, Helvetica, sans-serif',\n\t\t\t\t'Courier New, Courier, monospace',\n\t\t\t\t'Georgia, serif',\n\t\t\t\t'Lucida Sans Unicode, Lucida Grande, sans-serif',\n\t\t\t\t'Tahoma, Geneva, sans-serif',\n\t\t\t\t'Times New Roman, Times, serif',\n\t\t\t\t'Trebuchet MS, Helvetica, sans-serif',\n\t\t\t\t'Verdana, Geneva, sans-serif'\n\t\t\t],\n\t\t\tsupportAllValues: false\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Allow fontFamily attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: FONT_FAMILY } );\n\t\teditor.model.schema.setAttributeProperties( FONT_FAMILY, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\t// Get configured font family options without \"default\" option.\n\t\tconst options = normalizeOptions(\n\t\t\teditor.config.get( 'fontFamily.options' )!\n\t\t).filter( item => item.model );\n\t\tconst definition = buildDefinition( FONT_FAMILY, options );\n\n\t\t// Set-up the two-way conversion.\n\t\tif ( editor.config.get( 'fontFamily.supportAllValues' ) ) {\n\t\t\tthis._prepareAnyValueConverters();\n\t\t\tthis._prepareCompatibilityConverter();\n\t\t} else {\n\t\t\teditor.conversion.attributeToElement( definition );\n\t\t}\n\n\t\teditor.commands.add( FONT_FAMILY, new FontFamilyCommand( editor ) );\n\t}\n\n\t/**\n\t * These converters enable keeping any value found as `style=\"font-family: *\"` as a value of an attribute on a text even\n\t * if it is not defined in the plugin configuration.\n\t */\n\tprivate _prepareAnyValueConverters(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: FONT_FAMILY,\n\t\t\tview: ( attributeValue, { writer } ) => {\n\t\t\t\treturn writer.createAttributeElement( 'span', { style: 'font-family:' + attributeValue }, { priority: 7 } );\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_FAMILY,\n\t\t\t\tvalue: ( viewElement: ViewElement ) => viewElement.getStyle( 'font-family' )\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tstyles: {\n\t\t\t\t\t'font-family': /.*/\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Adds support for legacy `<font face=\"..\">` formatting.\n\t */\n\tprivate _prepareCompatibilityConverter(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'font',\n\t\t\t\tattributes: {\n\t\t\t\t\t'face': /.*/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_FAMILY,\n\t\t\t\tvalue: ( viewElement: ViewElement ) => viewElement.getAttribute( 'face' )\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module font/fontfamily/fontfamilyui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { Collection } from '@ckeditor/ckeditor5-utils';\nimport { IconFontFamily } from '@ckeditor/ckeditor5-icons';\nimport {\n\tUIModel,\n\tcreateDropdown,\n\taddListToDropdown,\n\tMenuBarMenuView,\n\tMenuBarMenuListView,\n\tMenuBarMenuListItemView,\n\tMenuBarMenuListItemButtonView,\n\ttype ListDropdownButtonDefinition\n} from '@ckeditor/ckeditor5-ui';\n\nimport { normalizeFontFamilies, normalizeOptions } from './utils.js';\nimport { FONT_FAMILY } from '../utils.js';\n\nimport type { FontFamilyOption } from '../fontconfig.js';\nimport { type FontFamilyCommand } from './fontfamilycommand.js';\n\n/**\n * The font family UI plugin. It introduces the `'fontFamily'` dropdown.\n */\nexport class FontFamilyUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontFamilyUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tconst options = this._getLocalizedOptions();\n\n\t\tconst command: FontFamilyCommand = editor.commands.get( FONT_FAMILY )!;\n\t\tconst accessibleLabel = t( 'Font Family' );\n\t\tconst listOptions = _prepareListOptions( options, command );\n\n\t\t// Register UI component.\n\t\teditor.ui.componentFactory.add( FONT_FAMILY, locale => {\n\t\t\tconst dropdownView = createDropdown( locale );\n\n\t\t\taddListToDropdown( dropdownView, listOptions, {\n\t\t\t\trole: 'menu',\n\t\t\t\tariaLabel: accessibleLabel\n\t\t\t} );\n\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontFamily,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-font-family-dropdown'\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdownView.bind( 'isEnabled' ).to( command );\n\n\t\t\t// Execute command when an item from the dropdown is selected.\n\t\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\t\teditor.execute( ( evt.source as any ).commandName, { value: ( evt.source as any ).commandParam } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( `menuBar:${ FONT_FAMILY }`, locale => {\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontFamily\n\t\t\t} );\n\n\t\t\tmenuView.bind( 'isEnabled' ).to( command );\n\n\t\t\tconst listView = new MenuBarMenuListView( locale );\n\n\t\t\tfor ( const definition of listOptions ) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView( locale, menuView );\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView( locale );\n\n\t\t\t\tbuttonView.set( {\n\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\tisToggleable: true\n\t\t\t\t} );\n\n\t\t\t\tbuttonView.bind( ...Object.keys( definition.model ) as Array<keyof MenuBarMenuListItemButtonView> ).to( definition.model );\n\t\t\t\tbuttonView.delegate( 'execute' ).to( menuView );\n\n\t\t\t\tbuttonView.on( 'execute', () => {\n\t\t\t\t\teditor.execute( ( definition.model as any ).commandName, {\n\t\t\t\t\t\tvalue: ( definition.model as any ).commandParam\n\t\t\t\t\t} );\n\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t} );\n\n\t\t\t\tlistItemView.children.add( buttonView );\n\t\t\t\tlistView.items.add( listItemView );\n\t\t\t}\n\n\t\t\tmenuView.panelView.children.add( listView );\n\n\t\t\treturn menuView;\n\t\t} );\n\t}\n\n\t/**\n\t * Returns options as defined in `config.fontFamily.options` but processed to account for\n\t * editor localization, i.e. to display {@link module:font/fontconfig~FontFamilyOption}\n\t * in the correct language.\n\t *\n\t * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n\t * when the user configuration is defined because the editor does not exist yet.\n\t */\n\tprivate _getLocalizedOptions(): Array<FontFamilyOption> {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tconst options = normalizeOptions( ( editor.config.get( FONT_FAMILY )! ).options! );\n\n\t\treturn options.map( option => {\n\t\t\t// The only title to localize is \"Default\" others are font names.\n\t\t\tif ( option.title === 'Default' ) {\n\t\t\t\toption.title = t( 'Default' );\n\t\t\t}\n\n\t\t\treturn option;\n\t\t} );\n\t}\n}\n\n/**\n * Prepares FontFamily dropdown items.\n */\nfunction _prepareListOptions( options: Array<FontFamilyOption>, command: FontFamilyCommand ): Collection<ListDropdownButtonDefinition> {\n\tconst itemDefinitions = new Collection<ListDropdownButtonDefinition>();\n\n\t// Create dropdown items.\n\tfor ( const option of options ) {\n\t\tconst def = {\n\t\t\ttype: 'button' as const,\n\t\t\tmodel: new UIModel( {\n\t\t\t\tcommandName: FONT_FAMILY,\n\t\t\t\tcommandParam: option.model,\n\t\t\t\tlabel: option.title,\n\t\t\t\trole: 'menuitemradio',\n\t\t\t\twithText: true\n\t\t\t} )\n\t\t};\n\n\t\tdef.model.bind( 'isOn' ).to( command, 'value', value => {\n\t\t\t// \"Default\" or check in strict font-family converters mode.\n\t\t\tif ( value === option.model ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ( !value || !option.model ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst valueNormalized = normalizeFontFamilies( value )[ 0 ].toLowerCase();\n\t\t\tconst optionNormalized = normalizeFontFamilies( option.model )[ 0 ].toLowerCase();\n\n\t\t\treturn valueNormalized === optionNormalized;\n\t\t} );\n\n\t\t// Try to set a dropdown list item style.\n\t\tif ( option.view && typeof option.view !== 'string' && option.view.styles ) {\n\t\t\tdef.model.set( 'labelStyle', `font-family: ${ option.view.styles[ 'font-family' ] }` );\n\t\t}\n\n\t\titemDefinitions.add( def );\n\t}\n\treturn itemDefinitions;\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/**\n * @module font/fontfamily\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { FontFamilyEditing } from './fontfamily/fontfamilyediting.js';\nimport { FontFamilyUI } from './fontfamily/fontfamilyui.js';\n\n/**\n * The font family plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentatiom\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing} and\n * {@link module:font/fontfamily/fontfamilyui~FontFamilyUI} features in the editor.\n */\nexport class FontFamily extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FontFamilyEditing, FontFamilyUI ]> {\n\t\treturn [ FontFamilyEditing, FontFamilyUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontFamily' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module font/fontsize/fontsizecommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { FontCommand } from '../fontcommand.js';\nimport { FONT_SIZE } from '../utils.js';\n\n/**\n * The font size command. It is used by {@link module:font/fontsize/fontsizeediting~FontSizeEditing}\n * to apply the font size.\n *\n * ```ts\n * editor.execute( 'fontSize', { value: 'small' } );\n * ```\n *\n * **Note**: Executing the command without the value removes the attribute from the model.\n */\nexport class FontSizeCommand extends FontCommand {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor, FONT_SIZE );\n\t}\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/**\n * @module font/fontsize/utils\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport { type FontSizeOption } from '../fontconfig.js';\n\n/**\n * Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options}\n * to the {@link module:font/fontconfig~FontSizeOption} format.\n *\n * @param configuredOptions An array of options taken from the configuration.\n * @internal\n */\nexport function normalizeOptions( configuredOptions: Array<string | number | FontSizeOption> ): Array<FontSizeOption> {\n\t// Convert options to objects.\n\treturn configuredOptions\n\t\t.map( item => getOptionDefinition( item ) )\n\t\t// Filter out undefined values that `getOptionDefinition` might return.\n\t\t.filter( ( option ): option is FontSizeOption => option !== undefined );\n}\n\n// Default named presets map. Always create a new instance of the preset object in order to avoid modifying references.\nconst namedPresets: Record<string, FontSizeOption> = {\n\tget tiny(): FontSizeOption {\n\t\treturn {\n\t\t\ttitle: 'Tiny',\n\t\t\tmodel: 'tiny',\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tclasses: 'text-tiny',\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t},\n\tget small(): FontSizeOption {\n\t\treturn {\n\t\t\ttitle: 'Small',\n\t\t\tmodel: 'small',\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tclasses: 'text-small',\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t},\n\tget big(): FontSizeOption {\n\t\treturn {\n\t\t\ttitle: 'Big',\n\t\t\tmodel: 'big',\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tclasses: 'text-big',\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t},\n\tget huge(): FontSizeOption {\n\t\treturn {\n\t\t\ttitle: 'Huge',\n\t\t\tmodel: 'huge',\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tclasses: 'text-huge',\n\t\t\t\tpriority: 7\n\t\t\t}\n\t\t};\n\t}\n};\n\n/**\n * Returns an option definition either from preset or creates one from number shortcut.\n * If object is passed then this method will return it without alternating it. Returns undefined for item than cannot be parsed.\n */\nfunction getOptionDefinition( option: string | number | FontSizeOption ): FontSizeOption | undefined {\n\tif ( typeof option === 'number' ) {\n\t\toption = String( option );\n\t}\n\n\t// Check whether passed option is a full item definition provided by user in configuration.\n\tif ( typeof option === 'object' && isFullItemDefinition( option ) ) {\n\t\treturn attachPriority( option );\n\t}\n\n\tconst preset = findPreset( option );\n\n\t// Item is a named preset.\n\tif ( preset ) {\n\t\treturn attachPriority( preset );\n\t}\n\n\t// 'Default' font size. It will be used to remove the fontSize attribute.\n\tif ( option === 'default' ) {\n\t\treturn {\n\t\t\tmodel: undefined,\n\t\t\ttitle: 'Default'\n\t\t};\n\t}\n\n\t// At this stage we probably have numerical value to generate a preset so parse it's value.\n\t// Discard any faulty values.\n\tif ( isNumericalDefinition( option ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Return font size definition from size value.\n\treturn generatePixelPreset( option );\n}\n\n/**\n * Creates a predefined preset for pixel size.\n * @param definition Font size in pixels.\n * @returns\n */\nfunction generatePixelPreset( definition: string | FontSizeOption ): FontSizeOption {\n\t// Extend a short (numeric value) definition.\n\tif ( typeof definition === 'string' ) {\n\t\tdefinition = {\n\t\t\ttitle: definition,\n\t\t\tmodel: `${ parseFloat( definition ) }px`\n\t\t};\n\t}\n\n\tdefinition.view = {\n\t\tname: 'span',\n\t\tstyles: {\n\t\t\t'font-size': definition.model!\n\t\t}\n\t};\n\n\treturn attachPriority( definition );\n}\n\n/**\n * Adds the priority to the view element definition if missing. It's required due to https://github.com/ckeditor/ckeditor5/issues/2291\n */\nfunction attachPriority( definition: FontSizeOption ): FontSizeOption {\n\tif ( definition.view && typeof definition.view !== 'string' && !definition.view.priority ) {\n\t\tdefinition.view!.priority = 7;\n\t}\n\n\treturn definition;\n}\n\n/**\n * Returns a prepared preset definition. If passed an object, a name of preset should be defined as `model` value.\n *\n * @param definition.model A preset name.\n */\nfunction findPreset( definition: string | { model?: string } ): FontSizeOption | undefined {\n\treturn typeof definition === 'string' ? namedPresets[ definition ] : namedPresets[ definition.model! ];\n}\n\n/**\n * We treat `definition` as completed if it is an object that contains `title`, `model` and `view` values.\n */\nfunction isFullItemDefinition( definition: Record<string, any> ): boolean {\n\treturn definition.title && definition.model && definition.view;\n}\n\nfunction isNumericalDefinition( definition: string | FontSizeOption ): boolean {\n\tlet numberValue;\n\n\tif ( typeof definition === 'object' ) {\n\t\tif ( !definition.model ) {\n\t\t\t/**\n\t\t\t * Provided value as an option for {@link module:font/fontsize~FontSize} seems to invalid.\n\t\t\t *\n\t\t\t * See valid examples described in the {@link module:font/fontconfig~FontSizeConfig#options plugin configuration}.\n\t\t\t *\n\t\t\t * @error font-size-invalid-definition\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'font-size-invalid-definition', null, definition );\n\t\t} else {\n\t\t\tnumberValue = parseFloat( definition.model );\n\t\t}\n\t} else {\n\t\tnumberValue = parseFloat( definition );\n\t}\n\n\treturn isNaN( numberValue );\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/**\n * @module font/fontsize/fontsizeediting\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport {\n\tisLengthStyleValue,\n\tisPercentageStyleValue,\n\ttype ViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport { FontSizeCommand } from './fontsizecommand.js';\nimport { normalizeOptions } from './utils.js';\nimport { buildDefinition, FONT_SIZE, type FontConverterDefinition } from '../utils.js';\n\n// Mapping of `<font size=\"..\">` styling to CSS's `font-size` values.\nconst styleFontSize = [\n\t'x-small', // Size \"0\" equal to \"1\".\n\t'x-small',\n\t'small',\n\t'medium',\n\t'large',\n\t'x-large',\n\t'xx-large',\n\t'xxx-large'\n];\n\n/**\n * The font size editing feature.\n *\n * It introduces the {@link module:font/fontsize/fontsizecommand~FontSizeCommand command} and the `fontSize`\n * attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}\n * as a `<span>` element with either:\n * * a style attribute (`<span style=\"font-size:12px\">...</span>`),\n * * or a class attribute (`<span class=\"text-small\">...</span>`)\n *\n * depending on the {@link module:font/fontconfig~FontSizeConfig configuration}.\n */\nexport class FontSizeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontSizeEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Define default configuration using named presets.\n\t\teditor.config.define( FONT_SIZE, {\n\t\t\toptions: [\n\t\t\t\t'tiny',\n\t\t\t\t'small',\n\t\t\t\t'default',\n\t\t\t\t'big',\n\t\t\t\t'huge'\n\t\t\t],\n\t\t\tsupportAllValues: false\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Allow fontSize attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: FONT_SIZE } );\n\t\teditor.model.schema.setAttributeProperties( FONT_SIZE, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\n\t\tconst supportAllValues = editor.config.get( 'fontSize.supportAllValues' );\n\n\t\t// Define view to model conversion.\n\t\tconst options = normalizeOptions( this.editor.config.get( 'fontSize.options' )! )\n\t\t\t.filter( item => item.model );\n\t\tconst definition = buildDefinition( FONT_SIZE, options );\n\n\t\t// Set-up the two-way conversion.\n\t\tif ( supportAllValues ) {\n\t\t\tthis._prepareAnyValueConverters( definition );\n\t\t\tthis._prepareCompatibilityConverter();\n\t\t} else {\n\t\t\teditor.conversion.attributeToElement( definition );\n\t\t}\n\n\t\t// Add FontSize command.\n\t\teditor.commands.add( FONT_SIZE, new FontSizeCommand( editor ) );\n\t}\n\n\t/**\n\t * These converters enable keeping any value found as `style=\"font-size: *\"` as a value of an attribute on a text even\n\t * if it is not defined in the plugin configuration.\n\t *\n\t * @param definition Converter definition out of input data.\n\t */\n\tprivate _prepareAnyValueConverters( definition: FontConverterDefinition ): void {\n\t\tconst editor = this.editor;\n\n\t\t// If `fontSize.supportAllValues=true`, we do not allow to use named presets in the plugin's configuration.\n\t\tconst presets = definition.model!.values.filter( ( value: any ) => {\n\t\t\treturn !isLengthStyleValue( String( value ) ) && !isPercentageStyleValue( String( value ) );\n\t\t} );\n\n\t\tif ( presets.length ) {\n\t\t\t/**\n\t\t\t * If {@link module:font/fontconfig~FontSizeConfig#supportAllValues `config.fontSize.supportAllValues`} is `true`,\n\t\t\t * you need to use numerical values as font size options.\n\t\t\t *\n\t\t\t * See valid examples described in the {@link module:font/fontconfig~FontSizeConfig#options plugin configuration}.\n\t\t\t *\n\t\t\t * @error font-size-invalid-use-of-named-presets\n\t\t\t * @param {Array.<string>} presets Invalid values.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'font-size-invalid-use-of-named-presets',\n\t\t\t\tnull, { presets }\n\t\t\t);\n\t\t}\n\n\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: FONT_SIZE,\n\t\t\tview: ( attributeValue, { writer } ) => {\n\t\t\t\tif ( !attributeValue ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treturn writer.createAttributeElement( 'span', { style: 'font-size:' + attributeValue }, { priority: 7 } );\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_SIZE,\n\t\t\t\tvalue: ( viewElement: ViewElement ) => viewElement.getStyle( 'font-size' )\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tstyles: {\n\t\t\t\t\t'font-size': /.*/\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Adds support for legacy `<font size=\"..\">` formatting.\n\t */\n\tprivate _prepareCompatibilityConverter(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'font',\n\t\t\t\tattributes: {\n\t\t\t\t\t// Documentation mentions sizes from 1 to 7. To handle old content we support all values\n\t\t\t\t\t// up to 999 but clamp it to the valid range. Why 999? It should cover accidental values\n\t\t\t\t\t// similar to percentage, e.g. 100%, 200% which could be the usual mistake for font size.\n\t\t\t\t\t'size': /^[+-]?\\d{1,3}$/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_SIZE,\n\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\tconst value = viewElement.getAttribute( 'size' )!;\n\t\t\t\t\tconst isRelative = value[ 0 ] === '-' || value[ 0 ] === '+';\n\n\t\t\t\t\tlet size = parseInt( value, 10 );\n\n\t\t\t\t\tif ( isRelative ) {\n\t\t\t\t\t\t// Add relative size (which can be negative) to the default size = 3.\n\t\t\t\t\t\tsize = 3 + size;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst maxSize = styleFontSize.length - 1;\n\t\t\t\t\tconst clampedSize = Math.min( Math.max( size, 0 ), maxSize );\n\n\t\t\t\t\treturn styleFontSize[ clampedSize ];\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module font/fontsize/fontsizeui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconFontSize } from '@ckeditor/ckeditor5-icons';\nimport {\n\tUIModel,\n\tcreateDropdown,\n\taddListToDropdown,\n\ttype ListDropdownButtonDefinition,\n\tMenuBarMenuView,\n\tMenuBarMenuListView,\n\tMenuBarMenuListItemView,\n\tMenuBarMenuListItemButtonView\n} from '@ckeditor/ckeditor5-ui';\nimport { Collection } from '@ckeditor/ckeditor5-utils';\n\nimport { normalizeOptions } from './utils.js';\nimport { FONT_SIZE } from '../utils.js';\n\nimport type { FontSizeOption } from '../fontconfig.js';\nimport { type FontSizeCommand } from './fontsizecommand.js';\n\n/**\n * The font size UI plugin. It introduces the `'fontSize'` dropdown.\n */\nexport class FontSizeUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontSizeUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tconst options = this._getLocalizedOptions();\n\n\t\tconst command: FontSizeCommand = editor.commands.get( FONT_SIZE )!;\n\t\tconst accessibleLabel = t( 'Font Size' );\n\n\t\tconst listOptions = _prepareListOptions( options, command );\n\n\t\t// Register UI component.\n\t\teditor.ui.componentFactory.add( FONT_SIZE, locale => {\n\t\t\tconst dropdownView = createDropdown( locale );\n\n\t\t\taddListToDropdown( dropdownView, listOptions, {\n\t\t\t\trole: 'menu',\n\t\t\t\tariaLabel: accessibleLabel\n\t\t\t} );\n\n\t\t\t// Create dropdown model.\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontSize,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck-font-size-dropdown'\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdownView.bind( 'isEnabled' ).to( command );\n\n\t\t\t// Execute command when an item from the dropdown is selected.\n\t\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\t\teditor.execute( ( evt.source as any ).commandName, { value: ( evt.source as any ).commandParam } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( `menuBar:${ FONT_SIZE }`, locale => {\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\tlabel: accessibleLabel,\n\t\t\t\ticon: IconFontSize\n\t\t\t} );\n\n\t\t\tmenuView.bind( 'isEnabled' ).to( command );\n\n\t\t\tconst listView = new MenuBarMenuListView( locale );\n\n\t\t\tfor ( const definition of listOptions ) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView( locale, menuView );\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView( locale );\n\n\t\t\t\tbuttonView.set( {\n\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\tisToggleable: true\n\t\t\t\t} );\n\n\t\t\t\tbuttonView.bind( ...Object.keys( definition.model ) as Array<keyof MenuBarMenuListItemButtonView> ).to( definition.model );\n\t\t\t\tbuttonView.delegate( 'execute' ).to( menuView );\n\n\t\t\t\tbuttonView.on( 'execute', () => {\n\t\t\t\t\teditor.execute( ( definition.model as any ).commandName, {\n\t\t\t\t\t\tvalue: ( definition.model as any ).commandParam\n\t\t\t\t\t} );\n\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t} );\n\n\t\t\t\tlistItemView.children.add( buttonView );\n\t\t\t\tlistView.items.add( listItemView );\n\t\t\t}\n\n\t\t\tmenuView.panelView.children.add( listView );\n\n\t\t\treturn menuView;\n\t\t} );\n\t}\n\n\t/**\n\t * Returns options as defined in `config.fontSize.options` but processed to account for\n\t * editor localization, i.e. to display {@link module:font/fontconfig~FontSizeOption}\n\t * in the correct language.\n\t *\n\t * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n\t * when the user configuration is defined because the editor does not exist yet.\n\t */\n\tprivate _getLocalizedOptions(): Array<FontSizeOption> {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tconst localizedTitles: Record<string, string> = {\n\t\t\tDefault: t( 'Default' ),\n\t\t\tTiny: t( 'Tiny' ),\n\t\t\tSmall: t( 'Small' ),\n\t\t\tBig: t( 'Big' ),\n\t\t\tHuge: t( 'Huge' )\n\t\t};\n\n\t\tconst options = normalizeOptions( ( editor.config.get( FONT_SIZE )! ).options! );\n\n\t\treturn options.map( option => {\n\t\t\tconst title = localizedTitles[ option.title ];\n\n\t\t\tif ( title && title != option.title ) {\n\t\t\t\t// Clone the option to avoid altering the original `namedPresets` from `./utils.js`.\n\t\t\t\toption = Object.assign( {}, option, { title } );\n\t\t\t}\n\n\t\t\treturn option;\n\t\t} );\n\t}\n}\n\n/**\n * Prepares FontSize dropdown items.\n */\nfunction _prepareListOptions( options: Array<FontSizeOption>, command: FontSizeCommand ): Collection<ListDropdownButtonDefinition> {\n\tconst itemDefinitions = new Collection<ListDropdownButtonDefinition>();\n\n\tfor ( const option of options ) {\n\t\tconst def = {\n\t\t\ttype: 'button' as const,\n\t\t\tmodel: new UIModel( {\n\t\t\t\tcommandName: FONT_SIZE,\n\t\t\t\tcommandParam: option.model,\n\t\t\t\tlabel: option.title,\n\t\t\t\tclass: 'ck-fontsize-option',\n\t\t\t\trole: 'menuitemradio',\n\t\t\t\twithText: true\n\t\t\t} )\n\t\t};\n\n\t\tif ( option.view && typeof option.view !== 'string' ) {\n\t\t\tif ( option.view.styles ) {\n\t\t\t\tdef.model.set( 'labelStyle', `font-size:${ option.view.styles[ 'font-size' ] }` );\n\t\t\t}\n\t\t\tif ( option.view.classes ) {\n\t\t\t\tdef.model.set( 'class', `${ def.model.class } ${ option.view.classes }` );\n\t\t\t}\n\t\t}\n\n\t\tdef.model.bind( 'isOn' ).to( command, 'value', value => value === option.model );\n\n\t\t// Add the option to the collection.\n\t\titemDefinitions.add( def );\n\t}\n\n\treturn itemDefinitions;\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/**\n * @module font/fontsize\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { FontSizeEditing } from './fontsize/fontsizeediting.js';\nimport { FontSizeUI } from './fontsize/fontsizeui.js';\nimport { normalizeOptions } from './fontsize/utils.js';\nimport type { FontSizeOption } from './fontconfig.js';\n\n/**\n * The font size plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentation\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:font/fontsize/fontsizeediting~FontSizeEditing} and\n * {@link module:font/fontsize/fontsizeui~FontSizeUI} features in the editor.\n */\nexport class FontSize extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FontSizeEditing, FontSizeUI ]> {\n\t\treturn [ FontSizeEditing, FontSizeUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontSize' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options}\n\t * to the {@link module:font/fontconfig~FontSizeOption} format.\n\t *\n\t * @param options An array of options taken from the configuration.\n\t */\n\tpublic normalizeSizeOptions( options: Array<string | number | FontSizeOption> ): Array<FontSizeOption> {\n\t\treturn normalizeOptions( options );\n\t}\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/**\n * @module font/fontcolor/fontcolorcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { FontCommand } from '../fontcommand.js';\nimport { FONT_COLOR } from '../utils.js';\n\n/**\n * The font color command. It is used by {@link module:font/fontcolor/fontcolorediting~FontColorEditing}\n * to apply the font color.\n *\n * ```ts\n * editor.execute( 'fontColor', { value: 'rgb(250, 20, 20)' } );\n * ```\n *\n * **Note**: Executing the command with the `null` value removes the attribute from the model.\n */\nexport class FontColorCommand extends FontCommand {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor, FONT_COLOR );\n\t}\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/**\n * @module font/fontcolor/fontcolorediting\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport { FontColorCommand } from './fontcolorcommand.js';\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\nimport { FONT_COLOR, renderDowncastElement, renderUpcastAttribute } from '../utils.js';\n\n/**\n * The font color editing feature.\n *\n * It introduces the {@link module:font/fontcolor/fontcolorcommand~FontColorCommand command} and\n * the `fontColor` attribute in the {@link module:engine/model/model~Model model} which renders\n * in the {@link module:engine/view/view view} as a `<span>` element (`<span style=\"color: ...\">`),\n * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.\n */\nexport class FontColorEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontColorEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( FONT_COLOR, {\n\t\t\tcolors: [\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 0%)',\n\t\t\t\t\tlabel: 'Black'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 30%)',\n\t\t\t\t\tlabel: 'Dim grey'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 60%)',\n\t\t\t\t\tlabel: 'Grey'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 90%)',\n\t\t\t\t\tlabel: 'Light grey'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 100%)',\n\t\t\t\t\tlabel: 'White',\n\t\t\t\t\thasBorder: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 75%, 60%)',\n\t\t\t\t\tlabel: 'Red'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(30, 75%, 60%)',\n\t\t\t\t\tlabel: 'Orange'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(60, 75%, 60%)',\n\t\t\t\t\tlabel: 'Yellow'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(90, 75%, 60%)',\n\t\t\t\t\tlabel: 'Light green'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(120, 75%, 60%)',\n\t\t\t\t\tlabel: 'Green'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(150, 75%, 60%)',\n\t\t\t\t\tlabel: 'Aquamarine'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(180, 75%, 60%)',\n\t\t\t\t\tlabel: 'Turquoise'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(210, 75%, 60%)',\n\t\t\t\t\tlabel: 'Light blue'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(240, 75%, 60%)',\n\t\t\t\t\tlabel: 'Blue'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(270, 75%, 60%)',\n\t\t\t\t\tlabel: 'Purple'\n\t\t\t\t}\n\t\t\t],\n\t\t\tcolumns: 5\n\t\t} );\n\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tstyles: {\n\t\t\t\t\t'color': /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_COLOR,\n\t\t\t\tvalue: renderUpcastAttribute( 'color' )\n\t\t\t}\n\t\t} );\n\n\t\t// Support legacy `<font color=\"..\">` formatting.\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'font',\n\t\t\t\tattributes: {\n\t\t\t\t\t'color': /^#?\\w+$/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_COLOR,\n\t\t\t\tvalue: ( viewElement: ViewElement ) => viewElement.getAttribute( 'color' )\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: FONT_COLOR,\n\t\t\tview: renderDowncastElement( 'color' )\n\t\t} );\n\n\t\teditor.commands.add( FONT_COLOR, new FontColorCommand( editor ) );\n\n\t\t// Allow the font color attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: FONT_COLOR } );\n\n\t\teditor.model.schema.setAttributeProperties( FONT_COLOR, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\t}\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/**\n * @module font/ui/colorui\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { Batch } from '@ckeditor/ckeditor5-engine';\nimport {\n\tcreateDropdown,\n\tnormalizeColorOptions,\n\tgetLocalizedColorOptions,\n\tfocusChildOnDropdownOpen,\n\ttype ColorSelectorExecuteEvent,\n\ttype ColorSelectorColorPickerCancelEvent,\n\ttype ColorSelectorColorPickerShowEvent,\n\tMenuBarMenuView,\n\tColorSelectorView\n} from '@ckeditor/ckeditor5-ui';\n\nimport {\n\taddColorSelectorToDropdown,\n\ttype FontColorSelectorDropdownView,\n\ttype FONT_BACKGROUND_COLOR,\n\ttype FONT_COLOR\n} from '../utils.js';\nimport { type FontColorCommand } from '../fontcolor/fontcolorcommand.js';\nimport { type FontBackgroundColorCommand } from '../fontbackgroundcolor/fontbackgroundcolorcommand.js';\nimport type { FontColorConfig } from '../fontconfig.js';\n\n/**\n * The color UI plugin which isolates the common logic responsible for displaying dropdowns with color grids.\n *\n * It is used to create the `'fontBackgroundColor'` and `'fontColor'` dropdowns, each hosting\n * a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n */\nexport class FontColorUIBase extends Plugin {\n\t/**\n\t * The name of the command which will be executed when a color tile is clicked.\n\t */\n\tpublic commandName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;\n\n\t/**\n\t * The name of this component in the {@link module:ui/componentfactory~ComponentFactory}.\n\t * Also the configuration scope name in `editor.config`.\n\t */\n\tpublic componentName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;\n\n\t/**\n\t * The SVG icon used by the dropdown.\n\t */\n\tpublic icon: string;\n\n\t/**\n\t * The label used by the dropdown.\n\t */\n\tpublic dropdownLabel: string;\n\n\t/**\n\t * The number of columns in the color grid.\n\t */\n\tpublic columns: number;\n\n\t/**\n\t * Keeps all changes in color picker in one batch while dropdown is open.\n\t */\n\tdeclare private _undoStepBatch: Batch;\n\n\t/**\n\t * Creates a plugin which introduces a dropdown with a pre–configured\n\t * {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n\t *\n\t * @param editor An editor instance.\n\t * @param config The configuration object.\n\t * @param config.commandName The name of the command which will be executed when a color tile is clicked.\n\t * @param config.componentName The name of the dropdown in the {@link module:ui/componentfactory~ComponentFactory}\n\t * and the configuration scope name in `editor.config`.\n\t * @param config.icon The SVG icon used by the dropdown.\n\t * @param config.dropdownLabel The label used by the dropdown.\n\t */\n\tconstructor(\n\t\teditor: Editor,\n\t\t{ commandName, componentName, icon, dropdownLabel }: {\n\t\t\tcommandName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;\n\t\t\tcomponentName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;\n\t\t\ticon: string;\n\t\t\tdropdownLabel: string;\n\t\t}\n\t) {\n\t\tsuper( editor );\n\n\t\tthis.commandName = commandName;\n\t\tthis.componentName = componentName;\n\t\tthis.icon = icon;\n\t\tthis.dropdownLabel = dropdownLabel;\n\t\tthis.columns = editor.config.get( `${ this.componentName }.columns` )!;\n\t}\n\n\t/**\n\t* @inheritDoc\n\t*/\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = locale.t;\n\t\tconst command: FontColorCommand | FontBackgroundColorCommand = editor.commands.get( this.commandName )!;\n\t\tconst componentConfig = editor.config.get( this.componentName )! as FontColorConfig;\n\t\tconst colorsConfig = normalizeColorOptions( componentConfig.colors! );\n\t\tconst localizedColors = getLocalizedColorOptions( locale, colorsConfig );\n\t\tconst documentColorsCount = componentConfig.documentColors;\n\t\tconst hasColorPicker = componentConfig.colorPicker !== false;\n\n\t\t// Register the UI component.\n\t\teditor.ui.componentFactory.add( this.componentName, locale => {\n\t\t\tconst dropdownView: FontColorSelectorDropdownView = createDropdown( locale );\n\t\t\t// Font color dropdown rendering is deferred once it gets open to improve performance.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/6192.\n\t\t\tlet dropdownContentRendered = false;\n\n\t\t\tconst colorSelectorView = addColorSelectorToDropdown( {\n\t\t\t\tdropdownView,\n\t\t\t\tcolors: localizedColors.map( option => ( {\n\t\t\t\t\tlabel: option.label,\n\t\t\t\t\tcolor: option.model,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\thasBorder: option.hasBorder\n\t\t\t\t\t}\n\t\t\t\t} ) ),\n\t\t\t\tcolumns: this.columns,\n\t\t\t\tremoveButtonLabel: t( 'Remove color' ),\n\t\t\t\tcolorPickerLabel: t( 'Color picker' ),\n\t\t\t\tdocumentColorsLabel: documentColorsCount !== 0 ? t( 'Document colors' ) : '',\n\t\t\t\tdocumentColorsCount: documentColorsCount === undefined ? this.columns : documentColorsCount,\n\t\t\t\tcolorPickerViewConfig: hasColorPicker ? ( componentConfig.colorPicker || {} ) : false\n\t\t\t} );\n\n\t\t\tcolorSelectorView.bind( 'selectedColor' ).to( command, 'value' );\n\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tlabel: this.dropdownLabel,\n\t\t\t\ticon: this.icon,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-color-ui-dropdown'\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdownView.bind( 'isEnabled' ).to( command );\n\n\t\t\tcolorSelectorView.on<ColorSelectorExecuteEvent>( 'execute', ( evt, data ) => {\n\t\t\t\tif ( dropdownView.isOpen ) {\n\t\t\t\t\teditor.execute( this.commandName, {\n\t\t\t\t\t\tvalue: data.value,\n\t\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( data.source !== 'colorPicker' ) {\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t}\n\n\t\t\t\tif ( data.source === 'colorPickerSaveButton' ) {\n\t\t\t\t\tdropdownView.isOpen = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tcolorSelectorView.on<ColorSelectorColorPickerShowEvent>( 'colorPicker:show', () => {\n\t\t\t\tthis._undoStepBatch = editor.model.createBatch();\n\t\t\t} );\n\n\t\t\tcolorSelectorView.on<ColorSelectorColorPickerCancelEvent>( 'colorPicker:cancel', () => {\n\t\t\t\tif ( this._undoStepBatch!.operations.length ) {\n\t\t\t\t\t// We need to close the dropdown before the undo batch.\n\t\t\t\t\t// Otherwise, FontColorUIBase treats undo as a selected color change,\n\t\t\t\t\t// propagating the update to the whole selection.\n\t\t\t\t\t// That's an issue if spans with various colors were selected.\n\t\t\t\t\tdropdownView.isOpen = false;\n\t\t\t\t\teditor.execute( 'undo', this._undoStepBatch );\n\t\t\t\t}\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tdropdownView.on( 'change:isOpen', ( evt, name, isVisible ) => {\n\t\t\t\tif ( !dropdownContentRendered ) {\n\t\t\t\t\tdropdownContentRendered = true;\n\n\t\t\t\t\tdropdownView.colorSelectorView!.appendUI();\n\t\t\t\t}\n\n\t\t\t\tif ( isVisible ) {\n\t\t\t\t\tif ( documentColorsCount !== 0 ) {\n\t\t\t\t\t\tcolorSelectorView!.updateDocumentColors( editor.model, this.componentName );\n\t\t\t\t\t}\n\n\t\t\t\t\tcolorSelectorView!.updateSelectedColors();\n\t\t\t\t\tcolorSelectorView!.showColorGridsFragment();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Accessibility: focus the first active color when opening the dropdown.\n\t\t\tfocusChildOnDropdownOpen(\n\t\t\t\tdropdownView,\n\t\t\t\t() => dropdownView.colorSelectorView!.colorGridsFragmentView.staticColorsGrid!.items.find( ( item: any ) => item.isOn )\n\t\t\t);\n\n\t\t\treturn dropdownView;\n\t\t} );\n\n\t\t// Register menu bar button..\n\t\teditor.ui.componentFactory.add( `menuBar:${ this.componentName }`, locale => {\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\tlabel: this.dropdownLabel,\n\t\t\t\ticon: this.icon\n\t\t\t} );\n\n\t\t\tmenuView.bind( 'isEnabled' ).to( command );\n\n\t\t\t// Font color sub-menu rendering is deferred once it gets open to improve performance.\n\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/6192.\n\t\t\tlet contentRendered = false;\n\n\t\t\tconst colorSelectorView = new ColorSelectorView( locale, {\n\t\t\t\tcolors: localizedColors.map( option => ( {\n\t\t\t\t\tlabel: option.label,\n\t\t\t\t\tcolor: option.model,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\thasBorder: option.hasBorder\n\t\t\t\t\t}\n\t\t\t\t} ) ),\n\t\t\t\tcolumns: this.columns,\n\t\t\t\tremoveButtonLabel: t( 'Remove color' ),\n\t\t\t\tcolorPickerLabel: t( 'Color picker' ),\n\t\t\t\tdocumentColorsLabel: documentColorsCount !== 0 ? t( 'Document colors' ) : '',\n\t\t\t\tdocumentColorsCount: documentColorsCount === undefined ? this.columns : documentColorsCount,\n\t\t\t\tcolorPickerViewConfig: false\n\t\t\t} );\n\n\t\t\tcolorSelectorView.bind( 'selectedColor' ).to( command, 'value' );\n\n\t\t\tcolorSelectorView.delegate( 'execute' ).to( menuView );\n\t\t\tcolorSelectorView.on<ColorSelectorExecuteEvent>( 'execute', ( evt, data ) => {\n\t\t\t\teditor.execute( this.commandName, {\n\t\t\t\t\tvalue: data.value,\n\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t} );\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tmenuView.on( 'change:isOpen', ( evt, name, isVisible ) => {\n\t\t\t\tif ( !contentRendered ) {\n\t\t\t\t\tcontentRendered = true;\n\n\t\t\t\t\tcolorSelectorView!.appendUI();\n\t\t\t\t}\n\n\t\t\t\tif ( isVisible ) {\n\t\t\t\t\tif ( documentColorsCount !== 0 ) {\n\t\t\t\t\t\tcolorSelectorView!.updateDocumentColors( editor.model, this.componentName );\n\t\t\t\t\t}\n\n\t\t\t\t\tcolorSelectorView!.updateSelectedColors();\n\t\t\t\t\tcolorSelectorView!.showColorGridsFragment();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tmenuView.panelView.children.add( colorSelectorView );\n\n\t\t\treturn menuView;\n\t\t} );\n\t}\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/**\n * @module font/fontcolor/fontcolorui\n */\n\nimport { IconFontColor } from '@ckeditor/ckeditor5-icons';\nimport { FontColorUIBase } from '../ui/colorui.js';\nimport { FONT_COLOR } from '../utils.js';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\n/**\n * The font color UI plugin. It introduces the `'fontColor'` dropdown.\n */\nexport class FontColorUI extends FontColorUIBase {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tconst t = editor.locale.t;\n\n\t\tsuper( editor, {\n\t\t\tcommandName: FONT_COLOR,\n\t\t\tcomponentName: FONT_COLOR,\n\t\t\ticon: IconFontColor,\n\t\t\tdropdownLabel: t( 'Font Color' )\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontColorUI' as const;\n\t}\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/**\n * @module font/fontcolor\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { FontColorEditing } from './fontcolor/fontcolorediting.js';\nimport { FontColorUI } from './fontcolor/fontcolorui.js';\n\n/**\n * The font color plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentation\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:font/fontcolor/fontcolorediting~FontColorEditing} and\n * {@link module:font/fontcolor/fontcolorui~FontColorUI} features in the editor.\n */\nexport class FontColor extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FontColorEditing, FontColorUI ]> {\n\t\treturn [ FontColorEditing, FontColorUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontColor' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module font/fontbackgroundcolor/fontbackgroundcolorcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { FontCommand } from '../fontcommand.js';\nimport { FONT_BACKGROUND_COLOR } from '../utils.js';\n\n/**\n * The font background color command. It is used by\n * {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing}\n * to apply the font background color.\n *\n * ```ts\n * editor.execute( 'fontBackgroundColor', { value: 'rgb(250, 20, 20)' } );\n * ```\n *\n * **Note**: Executing the command with the `null` value removes the attribute from the model.\n */\nexport class FontBackgroundColorCommand extends FontCommand {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor, FONT_BACKGROUND_COLOR );\n\t}\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/**\n * @module font/fontbackgroundcolor/fontbackgroundcolorediting\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport { addBackgroundStylesRules } from '@ckeditor/ckeditor5-engine';\n\nimport { FontBackgroundColorCommand } from './fontbackgroundcolorcommand.js';\nimport { FONT_BACKGROUND_COLOR, renderDowncastElement, renderUpcastAttribute } from '../utils.js';\n\n/**\n * The font background color editing feature.\n *\n * It introduces the {@link module:font/fontbackgroundcolor/fontbackgroundcolorcommand~FontBackgroundColorCommand command} and\n * the `fontBackgroundColor` attribute in the {@link module:engine/model/model~Model model} which renders\n * in the {@link module:engine/view/view view} as a `<span>` element (`<span style=\"background-color: ...\">`),\n * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.\n */\nexport class FontBackgroundColorEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontBackgroundColorEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( FONT_BACKGROUND_COLOR, {\n\t\t\tcolors: [\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 0%)',\n\t\t\t\t\tlabel: 'Black'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 30%)',\n\t\t\t\t\tlabel: 'Dim grey'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 60%)',\n\t\t\t\t\tlabel: 'Grey'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 90%)',\n\t\t\t\t\tlabel: 'Light grey'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 0%, 100%)',\n\t\t\t\t\tlabel: 'White',\n\t\t\t\t\thasBorder: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(0, 75%, 60%)',\n\t\t\t\t\tlabel: 'Red'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(30, 75%, 60%)',\n\t\t\t\t\tlabel: 'Orange'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(60, 75%, 60%)',\n\t\t\t\t\tlabel: 'Yellow'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(90, 75%, 60%)',\n\t\t\t\t\tlabel: 'Light green'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(120, 75%, 60%)',\n\t\t\t\t\tlabel: 'Green'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(150, 75%, 60%)',\n\t\t\t\t\tlabel: 'Aquamarine'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(180, 75%, 60%)',\n\t\t\t\t\tlabel: 'Turquoise'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(210, 75%, 60%)',\n\t\t\t\t\tlabel: 'Light blue'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(240, 75%, 60%)',\n\t\t\t\t\tlabel: 'Blue'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcolor: 'hsl(270, 75%, 60%)',\n\t\t\t\t\tlabel: 'Purple'\n\t\t\t\t}\n\t\t\t],\n\t\t\tcolumns: 5\n\t\t} );\n\n\t\teditor.data.addStyleProcessorRules( addBackgroundStylesRules );\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tstyles: {\n\t\t\t\t\t'background-color': /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: FONT_BACKGROUND_COLOR,\n\t\t\t\tvalue: renderUpcastAttribute( 'background-color' )\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: FONT_BACKGROUND_COLOR,\n\t\t\tview: renderDowncastElement( 'background-color' )\n\t\t} );\n\n\t\teditor.commands.add( FONT_BACKGROUND_COLOR, new FontBackgroundColorCommand( editor ) );\n\n\t\t// Allow the font backgroundColor attribute on text nodes.\n\t\teditor.model.schema.extend( '$text', { allowAttributes: FONT_BACKGROUND_COLOR } );\n\n\t\teditor.model.schema.setAttributeProperties( FONT_BACKGROUND_COLOR, {\n\t\t\tisFormatting: true,\n\t\t\tcopyOnEnter: true\n\t\t} );\n\t}\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/**\n * @module font/fontbackgroundcolor/fontbackgroundcolorui\n */\n\nimport { IconFontBackground } from '@ckeditor/ckeditor5-icons';\nimport { FontColorUIBase } from '../ui/colorui.js';\nimport { FONT_BACKGROUND_COLOR } from '../utils.js';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\n/**\n * The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.\n */\nexport class FontBackgroundColorUI extends FontColorUIBase {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tconst t = editor.locale.t;\n\n\t\tsuper( editor, {\n\t\t\tcommandName: FONT_BACKGROUND_COLOR,\n\t\t\tcomponentName: FONT_BACKGROUND_COLOR,\n\t\t\ticon: IconFontBackground,\n\t\t\tdropdownLabel: t( 'Font Background Color' )\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontBackgroundColorUI' as const;\n\t}\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/**\n * @module font/fontbackgroundcolor\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { FontBackgroundColorEditing } from './fontbackgroundcolor/fontbackgroundcolorediting.js';\nimport { FontBackgroundColorUI } from './fontbackgroundcolor/fontbackgroundcolorui.js';\n\n/**\n * The font background color plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentation\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads\n * the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} and\n * {@link module:font/fontbackgroundcolor/fontbackgroundcolorui~FontBackgroundColorUI} features in the editor.\n */\nexport class FontBackgroundColor extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FontBackgroundColorEditing, FontBackgroundColorUI ]> {\n\t\treturn [ FontBackgroundColorEditing, FontBackgroundColorUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'FontBackgroundColor' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module font/font\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { FontFamily } from './fontfamily.js';\nimport { FontSize } from './fontsize.js';\nimport { FontColor } from './fontcolor.js';\nimport { FontBackgroundColor } from './fontbackgroundcolor.js';\n\n/**\n * A plugin that enables a set of text styling features:\n *\n * * {@link module:font/fontsize~FontSize},\n * * {@link module:font/fontfamily~FontFamily}.\n * * {@link module:font/fontcolor~FontColor},\n * * {@link module:font/fontbackgroundcolor~FontBackgroundColor}.\n *\n * For a detailed overview, check the {@glink features/font Font feature} documentation\n * and the {@glink api/font package page}.\n */\nexport class Font extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ FontFamily, FontSize, FontColor, FontBackgroundColor ]> {\n\t\treturn [ FontFamily, FontSize, FontColor, FontBackgroundColor ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Font' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { first } from \"@ckeditor/ckeditor5-utils\";\nimport { ButtonView } from \"@ckeditor/ckeditor5-ui\";\nimport { IconParagraph } from \"@ckeditor/ckeditor5-icons\";\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 paragraph/paragraphcommand\n*/\n/**\n* The paragraph command.\n*/\nvar ParagraphCommand = class extends Command {\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst block = first(document.selection.getSelectedBlocks());\n\t\tthis.value = !!block && block.is(\"element\", \"paragraph\");\n\t\tthis.isEnabled = !!block && checkCanBecomeParagraph(block, model.schema);\n\t}\n\t/**\n\t* Executes the command. All the blocks (see {@link module:engine/model/schema~ModelSchema}) in the selection\n\t* will be turned to paragraphs.\n\t*\n\t* @fires execute\n\t* @param options Options for the executed command.\n\t* @param options.selection The selection that the command should be applied to. By default,\n\t* if not provided, the command is applied to the {@link module:engine/model/document~ModelDocument#selection}.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selection = options.selection || document.selection;\n\t\tif (!model.canEditAt(selection)) return;\n\t\tmodel.change((writer) => {\n\t\t\tconst blocks = selection.getSelectedBlocks();\n\t\t\tfor (const block of blocks) if (!block.is(\"element\", \"paragraph\") && checkCanBecomeParagraph(block, model.schema)) writer.rename(block, \"paragraph\");\n\t\t});\n\t}\n};\n/**\n* Checks whether the given block can be replaced by a paragraph.\n*\n* @param block A block to be tested.\n* @param schema The schema of the document.\n*/\nfunction checkCanBecomeParagraph(block, schema) {\n\treturn schema.checkChild(block.parent, \"paragraph\") && !schema.isObject(block);\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 paragraph/insertparagraphcommand\n*/\n/**\n* The insert paragraph command. It inserts a new paragraph at a specific\n* {@link module:engine/model/position~ModelPosition document position}.\n*\n* ```ts\n* // Insert a new paragraph before an element in the document.\n* editor.execute( 'insertParagraph', {\n*   position: editor.model.createPositionBefore( element )\n* } );\n* ```\n*\n* If a paragraph is disallowed in the context of the specific position, the command\n* will attempt to split position ancestors to find a place where it is possible\n* to insert a paragraph.\n*\n* **Note**: This command moves the selection to the inserted paragraph.\n*/\nvar InsertParagraphCommand = class extends Command {\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @param options Options for the executed command.\n\t* @param options.position The model position at which the new paragraph will be inserted.\n\t* @param options.attributes Attributes keys and values to set on a inserted paragraph.\n\t* @fires execute\n\t*/\n\texecute(options) {\n\t\tconst model = this.editor.model;\n\t\tconst attributes = options.attributes;\n\t\tlet position = options.position;\n\t\tif (!model.canEditAt(position)) return null;\n\t\treturn model.change((writer) => {\n\t\t\tposition = this._findPositionToInsertParagraph(position, writer);\n\t\t\tif (!position) return null;\n\t\t\tconst paragraph = writer.createElement(\"paragraph\");\n\t\t\tif (attributes) model.schema.setAllowedAttributes(paragraph, attributes, writer);\n\t\t\tmodel.insertContent(paragraph, position);\n\t\t\twriter.setSelection(paragraph, \"in\");\n\t\t\treturn writer.createPositionAt(paragraph, 0);\n\t\t});\n\t}\n\t/**\n\t* Returns the best position to insert a new paragraph.\n\t*/\n\t_findPositionToInsertParagraph(position, writer) {\n\t\tconst model = this.editor.model;\n\t\tif (model.schema.checkChild(position, \"paragraph\")) return position;\n\t\tconst allowedParent = model.schema.findAllowedParent(position, \"paragraph\");\n\t\tif (!allowedParent) return null;\n\t\tconst positionParent = position.parent;\n\t\tconst isTextAllowed = model.schema.checkChild(positionParent, \"$text\");\n\t\tif (positionParent.isEmpty || isTextAllowed && position.isAtEnd) return model.createPositionAfter(positionParent);\n\t\tif (!positionParent.isEmpty && isTextAllowed && position.isAtStart) return model.createPositionBefore(positionParent);\n\t\treturn writer.split(position, allowedParent).position;\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 paragraph/paragraph\n*/\n/**\n* The paragraph feature for the editor.\n*\n* It introduces the `<paragraph>` element in the model which renders as a `<p>` element in the DOM and data.\n*\n* It also brings two editors commands:\n*\n* * The {@link module:paragraph/paragraphcommand~ParagraphCommand `'paragraph'`} command that converts all\n* blocks in the model selection into paragraphs.\n* * The {@link module:paragraph/insertparagraphcommand~InsertParagraphCommand `'insertParagraph'`} command\n* that inserts a new paragraph at a specified location in the model.\n*/\nvar Paragraph = class Paragraph extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Paragraph\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\teditor.commands.add(\"paragraph\", new ParagraphCommand(editor));\n\t\teditor.commands.add(\"insertParagraph\", new InsertParagraphCommand(editor));\n\t\tmodel.schema.register(\"paragraph\", { inheritAllFrom: \"$block\" });\n\t\teditor.conversion.elementToElement({\n\t\t\tmodel: \"paragraph\",\n\t\t\tview: \"p\"\n\t\t});\n\t\teditor.conversion.for(\"upcast\").elementToElement({\n\t\t\tmodel: (viewElement, { writer }) => {\n\t\t\t\tif (!Paragraph.paragraphLikeElements.has(viewElement.name)) return null;\n\t\t\t\tif (viewElement.isEmpty) return null;\n\t\t\t\treturn writer.createElement(\"paragraph\");\n\t\t\t},\n\t\t\tview: /.+/,\n\t\t\tconverterPriority: \"low\"\n\t\t});\n\t}\n\t/**\n\t* A list of element names which should be treated by the autoparagraphing algorithms as\n\t* paragraph-like. This means that e.g. the following content:\n\t*\n\t* ```html\n\t* <h1>Foo</h1>\n\t* <table>\n\t*   <tr>\n\t*     <td>X</td>\n\t*     <td>\n\t*       <ul>\n\t*         <li>Y</li>\n\t*         <li>Z</li>\n\t*       </ul>\n\t*     </td>\n\t*   </tr>\n\t* </table>\n\t* ```\n\t*\n\t* contains five paragraph-like elements: `<h1>`, two `<td>`s and two `<li>`s.\n\t* Hence, if none of the features is going to convert those elements the above content will be automatically handled\n\t* by the paragraph feature and converted to:\n\t*\n\t* ```html\n\t* <p>Foo</p>\n\t* <p>X</p>\n\t* <p>Y</p>\n\t* <p>Z</p>\n\t* ```\n\t*\n\t* Note: The `<td>` containing two `<li>` elements was ignored as the innermost paragraph-like elements\n\t* have a priority upon conversion.\n\t*/\n\tstatic paragraphLikeElements = /* @__PURE__ */ new Set([\n\t\t\"blockquote\",\n\t\t\"dd\",\n\t\t\"div\",\n\t\t\"dt\",\n\t\t\"h1\",\n\t\t\"h2\",\n\t\t\"h3\",\n\t\t\"h4\",\n\t\t\"h5\",\n\t\t\"h6\",\n\t\t\"li\",\n\t\t\"p\",\n\t\t\"td\",\n\t\t\"th\"\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 paragraph/paragraphbuttonui\n*/\n/**\n* This plugin defines the `'paragraph'` button. It can be used together with\n* {@link module:heading/headingbuttonsui~HeadingButtonsUI} to replace the standard heading dropdown.\n*\n* This plugin is not loaded automatically by the {@link module:paragraph/paragraph~Paragraph} plugin. It must\n* be added manually.\n*\n* ```ts\n* ClassicEditor\n*   .create( {\n*     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n*     toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n*   } )\n*   .then( ... )\n*   .catch( ... );\n* ```\n*/\nvar ParagraphButtonUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Paragraph];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\teditor.ui.componentFactory.add(\"paragraph\", (locale) => {\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tconst command = editor.commands.get(\"paragraph\");\n\t\t\tview.label = t(\"Paragraph\");\n\t\t\tview.icon = IconParagraph;\n\t\t\tview.tooltip = true;\n\t\t\tview.isToggleable = true;\n\t\t\tview.bind(\"isEnabled\").to(command);\n\t\t\tview.bind(\"isOn\").to(command, \"value\");\n\t\t\tview.on(\"execute\", () => {\n\t\t\t\teditor.execute(\"paragraph\");\n\t\t\t});\n\t\t\treturn view;\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\nexport { InsertParagraphCommand, Paragraph, ParagraphButtonUI, ParagraphCommand };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module paragraph/paragraphcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\nimport type { ModelSchema, ModelSelection, ModelDocumentSelection, ModelElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The paragraph command.\n */\nexport class ParagraphCommand extends Command {\n\tpublic constructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Since this command may pass selection in execution block, it should be checked directly.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * The value of the command. Indicates whether the selection start is placed in a paragraph.\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tdeclare public value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst block = first( document.selection.getSelectedBlocks() );\n\n\t\tthis.value = !!block && block.is( 'element', 'paragraph' );\n\t\tthis.isEnabled = !!block && checkCanBecomeParagraph( block, model.schema );\n\t}\n\n\t/**\n\t * Executes the command. All the blocks (see {@link module:engine/model/schema~ModelSchema}) in the selection\n\t * will be turned to paragraphs.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.selection The selection that the command should be applied to. By default,\n\t * if not provided, the command is applied to the {@link module:engine/model/document~ModelDocument#selection}.\n\t */\n\tpublic override execute( options: {\n\t\tselection?: ModelSelection | ModelDocumentSelection;\n\t} = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tconst selection = options.selection || document.selection;\n\n\t\t// Don't execute command if selection is in non-editable place.\n\t\tif ( !model.canEditAt( selection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst blocks = selection.getSelectedBlocks();\n\n\t\t\tfor ( const block of blocks ) {\n\t\t\t\tif ( !block.is( 'element', 'paragraph' ) && checkCanBecomeParagraph( block, model.schema ) ) {\n\t\t\t\t\twriter.rename( block, 'paragraph' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Checks whether the given block can be replaced by a paragraph.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */\nfunction checkCanBecomeParagraph( block: ModelElement, schema: ModelSchema ): boolean {\n\treturn schema.checkChild( block.parent as ModelElement, 'paragraph' ) && !schema.isObject( block );\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/**\n * @module paragraph/insertparagraphcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, ModelPosition, ModelWriter } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The insert paragraph command. It inserts a new paragraph at a specific\n * {@link module:engine/model/position~ModelPosition document position}.\n *\n * ```ts\n * // Insert a new paragraph before an element in the document.\n * editor.execute( 'insertParagraph', {\n *   position: editor.model.createPositionBefore( element )\n * } );\n * ```\n *\n * If a paragraph is disallowed in the context of the specific position, the command\n * will attempt to split position ancestors to find a place where it is possible\n * to insert a paragraph.\n *\n * **Note**: This command moves the selection to the inserted paragraph.\n */\nexport class InsertParagraphCommand extends Command {\n\tpublic constructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Since this command passes position in execution block instead of selection, it should be checked directly.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.position The model position at which the new paragraph will be inserted.\n\t * @param options.attributes Attributes keys and values to set on a inserted paragraph.\n\t * @fires execute\n\t */\n\tpublic override execute( options: {\n\t\tposition: ModelPosition;\n\t\tattributes?: Record<string, unknown>;\n\t} ): ModelPosition | null {\n\t\tconst model = this.editor.model;\n\t\tconst attributes = options.attributes;\n\n\t\tlet position: ModelPosition | null = options.position;\n\n\t\t// Don't execute command if position is in non-editable place.\n\t\tif ( !model.canEditAt( position ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn model.change( writer => {\n\t\t\tposition = this._findPositionToInsertParagraph( position!, writer );\n\n\t\t\tif ( !position ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst paragraph = writer.createElement( 'paragraph' );\n\n\t\t\tif ( attributes ) {\n\t\t\t\tmodel.schema.setAllowedAttributes( paragraph, attributes, writer );\n\t\t\t}\n\n\t\t\tmodel.insertContent( paragraph, position );\n\t\t\twriter.setSelection( paragraph, 'in' );\n\n\t\t\treturn writer.createPositionAt( paragraph, 0 );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the best position to insert a new paragraph.\n\t */\n\tprivate _findPositionToInsertParagraph( position: ModelPosition, writer: ModelWriter ): ModelPosition | null {\n\t\tconst model = this.editor.model;\n\n\t\tif ( model.schema.checkChild( position, 'paragraph' ) ) {\n\t\t\treturn position;\n\t\t}\n\n\t\tconst allowedParent = model.schema.findAllowedParent( position, 'paragraph' );\n\n\t\t// It could be there's no ancestor limit that would allow paragraph.\n\t\t// In theory, \"paragraph\" could be disallowed even in the \"$root\".\n\t\tif ( !allowedParent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst positionParent = position.parent as ModelElement;\n\t\tconst isTextAllowed = model.schema.checkChild( positionParent, '$text' );\n\n\t\t// At empty $block or at the end of $block.\n\t\t// <paragraph>[]</paragraph> ---> <paragraph></paragraph><paragraph>[]</paragraph>\n\t\t// <paragraph>foo[]</paragraph> ---> <paragraph>foo</paragraph><paragraph>[]</paragraph>\n\t\tif ( positionParent.isEmpty || isTextAllowed && position.isAtEnd ) {\n\t\t\treturn model.createPositionAfter( positionParent );\n\t\t}\n\n\t\t// At the start of $block with text.\n\t\t// <paragraph>[]foo</paragraph> ---> <paragraph>[]</paragraph><paragraph>foo</paragraph>\n\t\tif ( !positionParent.isEmpty && isTextAllowed && position.isAtStart ) {\n\t\t\treturn model.createPositionBefore( positionParent );\n\t\t}\n\n\t\treturn writer.split( position, allowedParent ).position;\n\t}\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/**\n * @module paragraph/paragraph\n */\n\nimport { ParagraphCommand } from './paragraphcommand.js';\nimport { InsertParagraphCommand } from './insertparagraphcommand.js';\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\n/**\n * The paragraph feature for the editor.\n *\n * It introduces the `<paragraph>` element in the model which renders as a `<p>` element in the DOM and data.\n *\n * It also brings two editors commands:\n *\n * * The {@link module:paragraph/paragraphcommand~ParagraphCommand `'paragraph'`} command that converts all\n * blocks in the model selection into paragraphs.\n * * The {@link module:paragraph/insertparagraphcommand~InsertParagraphCommand `'insertParagraph'`} command\n * that inserts a new paragraph at a specified location in the model.\n */\nexport class Paragraph extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Paragraph' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\teditor.commands.add( 'paragraph', new ParagraphCommand( editor ) );\n\t\teditor.commands.add( 'insertParagraph', new InsertParagraphCommand( editor ) );\n\n\t\t// Schema.\n\t\tmodel.schema.register( 'paragraph', { inheritAllFrom: '$block' } );\n\n\t\teditor.conversion.elementToElement( { model: 'paragraph', view: 'p' } );\n\n\t\t// Conversion for paragraph-like elements which has not been converted by any plugin.\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tmodel: ( viewElement, { writer } ) => {\n\t\t\t\tif ( !Paragraph.paragraphLikeElements.has( viewElement.name ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Do not auto-paragraph empty elements.\n\t\t\t\tif ( viewElement.isEmpty ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn writer.createElement( 'paragraph' );\n\t\t\t},\n\t\t\tview: /.+/,\n\t\t\tconverterPriority: 'low'\n\t\t} );\n\t}\n\n\t/**\n\t * A list of element names which should be treated by the autoparagraphing algorithms as\n\t * paragraph-like. This means that e.g. the following content:\n\t *\n\t * ```html\n\t * <h1>Foo</h1>\n\t * <table>\n\t *   <tr>\n\t *     <td>X</td>\n\t *     <td>\n\t *       <ul>\n\t *         <li>Y</li>\n\t *         <li>Z</li>\n\t *       </ul>\n\t *     </td>\n\t *   </tr>\n\t * </table>\n\t * ```\n\t *\n\t * contains five paragraph-like elements: `<h1>`, two `<td>`s and two `<li>`s.\n\t * Hence, if none of the features is going to convert those elements the above content will be automatically handled\n\t * by the paragraph feature and converted to:\n\t *\n\t * ```html\n\t * <p>Foo</p>\n\t * <p>X</p>\n\t * <p>Y</p>\n\t * <p>Z</p>\n\t * ```\n\t *\n\t * Note: The `<td>` containing two `<li>` elements was ignored as the innermost paragraph-like elements\n\t * have a priority upon conversion.\n\t */\n\tpublic static paragraphLikeElements: Set<string> = new Set( [\n\t\t'blockquote',\n\t\t'dd',\n\t\t'div',\n\t\t'dt',\n\t\t'h1',\n\t\t'h2',\n\t\t'h3',\n\t\t'h4',\n\t\t'h5',\n\t\t'h6',\n\t\t'li',\n\t\t'p',\n\t\t'td',\n\t\t'th'\n\t] );\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/**\n * @module paragraph/paragraphbuttonui\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\nimport { IconParagraph } from '@ckeditor/ckeditor5-icons';\n\nimport { Paragraph } from './paragraph.js';\nimport { type ParagraphCommand } from './paragraphcommand.js';\n\n/**\n * This plugin defines the `'paragraph'` button. It can be used together with\n * {@link module:heading/headingbuttonsui~HeadingButtonsUI} to replace the standard heading dropdown.\n *\n * This plugin is not loaded automatically by the {@link module:paragraph/paragraph~Paragraph} plugin. It must\n * be added manually.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n *     toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */\nexport class ParagraphButtonUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Paragraph ]> {\n\t\treturn [ Paragraph ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'paragraph', locale => {\n\t\t\tconst view = new ButtonView( locale );\n\t\t\tconst command: ParagraphCommand = editor.commands.get( 'paragraph' )!;\n\n\t\t\tview.label = t( 'Paragraph' );\n\t\t\tview.icon = IconParagraph;\n\t\t\tview.tooltip = true;\n\t\t\tview.isToggleable = true;\n\t\t\tview.bind( 'isEnabled' ).to( command );\n\t\t\tview.bind( 'isOn' ).to( command, 'value' );\n\n\t\t\tview.on( 'execute', () => {\n\t\t\t\teditor.execute( 'paragraph' );\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Paragraph } from \"@ckeditor/ckeditor5-paragraph\";\nimport { Collection, first, logWarning, priorities } from \"@ckeditor/ckeditor5-utils\";\nimport { ButtonView, MenuBarMenuListItemButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, UIModel, addListToDropdown, createDropdown } from \"@ckeditor/ckeditor5-ui\";\nimport { IconHeading1, IconHeading2, IconHeading3, IconHeading4, IconHeading5, IconHeading6 } from \"@ckeditor/ckeditor5-icons\";\nimport { ViewDowncastWriter, enableViewPlaceholder, hideViewPlaceholder, needsViewPlaceholder, showViewPlaceholder } from \"@ckeditor/ckeditor5-engine\";\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 heading/headingcommand\n*/\n/**\n* The heading command. It is used by the {@link module:heading/heading~Heading heading feature} to apply headings.\n*/\nvar HeadingCommand = class extends Command {\n\t/**\n\t* Set of defined model's elements names that this command support.\n\t* See {@link module:heading/headingconfig~HeadingOption}.\n\t*/\n\tmodelElements;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor Editor instance.\n\t* @param modelElements Names of the element which this command can apply in the model.\n\t*/\n\tconstructor(editor, modelElements) {\n\t\tsuper(editor);\n\t\tthis.modelElements = modelElements;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst block = first(this.editor.model.document.selection.getSelectedBlocks());\n\t\tthis.value = !!block && this.modelElements.includes(block.name) && block.name;\n\t\tthis.isEnabled = !!block && this.modelElements.some((heading) => checkCanBecomeHeading(block, heading, this.editor.model.schema));\n\t}\n\t/**\n\t* Executes the command. Applies the heading to the selected blocks or, if the first selected\n\t* block is a heading already, turns selected headings (of this level only) to paragraphs.\n\t*\n\t* @param options.value Name of the element which this command will apply in the model.\n\t* @fires execute\n\t*/\n\texecute(options) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst modelElement = options.value;\n\t\tmodel.change((writer) => {\n\t\t\tconst blocks = Array.from(document.selection.getSelectedBlocks()).filter((block) => {\n\t\t\t\treturn checkCanBecomeHeading(block, modelElement, model.schema);\n\t\t\t});\n\t\t\tfor (const block of blocks) if (!block.is(\"element\", modelElement)) writer.rename(block, modelElement);\n\t\t});\n\t}\n};\n/**\n* Checks whether the given block can be replaced by a specific heading.\n*\n* @param block A block to be tested.\n* @param heading Command element name in the model.\n* @param schema The schema of the document.\n*/\nfunction checkCanBecomeHeading(block, heading, schema) {\n\treturn schema.checkChild(block.parent, heading) && !schema.isObject(block);\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 heading/headingediting\n*/\nconst defaultModelElement = \"paragraph\";\n/**\n* The headings engine feature. It handles switching between block formats &ndash; headings and paragraph.\n* This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.\n* It introduces `heading1`-`headingN` commands which allow to convert paragraphs into headings.\n*/\nvar HeadingEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"HeadingEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"heading\", { options: [\n\t\t\t{\n\t\t\t\tmodel: \"paragraph\",\n\t\t\t\ttitle: \"Paragraph\",\n\t\t\t\tclass: \"ck-heading_paragraph\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tmodel: \"heading1\",\n\t\t\t\tview: \"h2\",\n\t\t\t\ttitle: \"Heading 1\",\n\t\t\t\tclass: \"ck-heading_heading1\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tmodel: \"heading2\",\n\t\t\t\tview: \"h3\",\n\t\t\t\ttitle: \"Heading 2\",\n\t\t\t\tclass: \"ck-heading_heading2\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tmodel: \"heading3\",\n\t\t\t\tview: \"h4\",\n\t\t\t\ttitle: \"Heading 3\",\n\t\t\t\tclass: \"ck-heading_heading3\"\n\t\t\t}\n\t\t] });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Paragraph];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst options = editor.config.get(\"heading.options\");\n\t\tconst modelElements = [];\n\t\tfor (const option of options) {\n\t\t\tif (option.model === \"paragraph\") continue;\n\t\t\teditor.model.schema.register(option.model, { inheritAllFrom: \"$block\" });\n\t\t\teditor.conversion.elementToElement(option);\n\t\t\tmodelElements.push(option.model);\n\t\t}\n\t\tthis._addDefaultH1Conversion(editor);\n\t\teditor.commands.add(\"heading\", new HeadingCommand(editor, modelElements));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst enterCommand = editor.commands.get(\"enter\");\n\t\tconst options = editor.config.get(\"heading.options\");\n\t\tif (enterCommand) this.listenTo(enterCommand, \"afterExecute\", (evt, data) => {\n\t\t\tconst positionParent = editor.model.document.selection.getFirstPosition().parent;\n\t\t\tif (options.some((option) => positionParent.is(\"element\", option.model)) && !positionParent.is(\"element\", defaultModelElement) && positionParent.childCount === 0) data.writer.rename(positionParent, defaultModelElement);\n\t\t});\n\t}\n\t/**\n\t* Adds default conversion for `h1` -> `heading1` with a low priority.\n\t*\n\t* @param editor Editor instance on which to add the `h1` conversion.\n\t*/\n\t_addDefaultH1Conversion(editor) {\n\t\teditor.conversion.for(\"upcast\").elementToElement({\n\t\t\tmodel: \"heading1\",\n\t\t\tview: \"h1\",\n\t\t\tconverterPriority: priorities.low + 1\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* Returns heading options as defined in `config.heading.options` but processed to consider\n* the editor localization, i.e. to display {@link module:heading/headingconfig~HeadingOption}\n* in the correct language.\n*\n* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n* when the user configuration is defined because the editor does not exist yet.\n*\n* @internal\n*/\nfunction getLocalizedOptions(editor) {\n\tconst t = editor.t;\n\tconst localizedTitles = {\n\t\t\"Paragraph\": t(\"Paragraph\"),\n\t\t\"Heading 1\": t(\"Heading 1\"),\n\t\t\"Heading 2\": t(\"Heading 2\"),\n\t\t\"Heading 3\": t(\"Heading 3\"),\n\t\t\"Heading 4\": t(\"Heading 4\"),\n\t\t\"Heading 5\": t(\"Heading 5\"),\n\t\t\"Heading 6\": t(\"Heading 6\")\n\t};\n\treturn editor.config.get(\"heading.options\").map((option) => {\n\t\tconst title = localizedTitles[option.title];\n\t\tif (title && title != option.title) option.title = title;\n\t\treturn option;\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 heading/headingui\n*/\n/**\n* The headings UI feature. It introduces the `headings` dropdown.\n*/\nvar HeadingUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"HeadingUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst options = getLocalizedOptions(editor);\n\t\tconst defaultTitle = t(\"Choose heading\");\n\t\tconst accessibleLabel = t(\"Heading\");\n\t\teditor.ui.componentFactory.add(\"heading\", (locale) => {\n\t\t\tconst titles = {};\n\t\t\tconst itemDefinitions = new Collection();\n\t\t\tconst headingCommand = editor.commands.get(\"heading\");\n\t\t\tconst paragraphCommand = editor.commands.get(\"paragraph\");\n\t\t\tconst commands = [headingCommand];\n\t\t\tfor (const option of options) {\n\t\t\t\tconst def = {\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: new UIModel({\n\t\t\t\t\t\tlabel: option.title,\n\t\t\t\t\t\tclass: option.class,\n\t\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\t\twithText: true\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\tif (option.model === \"paragraph\") {\n\t\t\t\t\tdef.model.bind(\"isOn\").to(paragraphCommand, \"value\");\n\t\t\t\t\tdef.model.set(\"commandName\", \"paragraph\");\n\t\t\t\t\tcommands.push(paragraphCommand);\n\t\t\t\t} else {\n\t\t\t\t\tdef.model.bind(\"isOn\").to(headingCommand, \"value\", (value) => value === option.model);\n\t\t\t\t\tdef.model.set({\n\t\t\t\t\t\tcommandName: \"heading\",\n\t\t\t\t\t\tcommandValue: option.model\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\titemDefinitions.add(def);\n\t\t\t\ttitles[option.model] = option.title;\n\t\t\t}\n\t\t\tconst dropdownView = createDropdown(locale);\n\t\t\taddListToDropdown(dropdownView, itemDefinitions, {\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\trole: \"menu\"\n\t\t\t});\n\t\t\tdropdownView.buttonView.set({\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\tariaLabelledBy: void 0,\n\t\t\t\tisOn: false,\n\t\t\t\twithText: true,\n\t\t\t\ttooltip: accessibleLabel\n\t\t\t});\n\t\t\tdropdownView.extendTemplate({ attributes: { class: [\"ck-heading-dropdown\"] } });\n\t\t\tdropdownView.bind(\"isEnabled\").toMany(commands, \"isEnabled\", (...areEnabled) => {\n\t\t\t\treturn areEnabled.some((isEnabled) => isEnabled);\n\t\t\t});\n\t\t\tdropdownView.buttonView.bind(\"label\").to(headingCommand, \"value\", paragraphCommand, \"value\", (heading, paragraph) => {\n\t\t\t\tconst whichModel = paragraph ? \"paragraph\" : heading;\n\t\t\t\tif (typeof whichModel === \"boolean\") return defaultTitle;\n\t\t\t\tif (!titles[whichModel]) return defaultTitle;\n\t\t\t\treturn titles[whichModel];\n\t\t\t});\n\t\t\tdropdownView.buttonView.bind(\"ariaLabel\").to(headingCommand, \"value\", paragraphCommand, \"value\", (heading, paragraph) => {\n\t\t\t\tconst whichModel = paragraph ? \"paragraph\" : heading;\n\t\t\t\tif (typeof whichModel === \"boolean\") return accessibleLabel;\n\t\t\t\tif (!titles[whichModel]) return accessibleLabel;\n\t\t\t\treturn `${titles[whichModel]}, ${accessibleLabel}`;\n\t\t\t});\n\t\t\tthis.listenTo(dropdownView, \"execute\", (evt) => {\n\t\t\t\tconst { commandName, commandValue } = evt.source;\n\t\t\t\teditor.execute(commandName, commandValue ? { value: commandValue } : void 0);\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:heading\", (locale) => {\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tconst headingCommand = editor.commands.get(\"heading\");\n\t\t\tconst paragraphCommand = editor.commands.get(\"paragraph\");\n\t\t\tconst commands = [headingCommand];\n\t\t\tconst listView = new MenuBarMenuListView(locale);\n\t\t\tmenuView.set({ class: \"ck-heading-dropdown\" });\n\t\t\tlistView.set({\n\t\t\t\tariaLabel: t(\"Heading\"),\n\t\t\t\trole: \"menu\"\n\t\t\t});\n\t\t\tmenuView.buttonView.set({ label: t(\"Heading\") });\n\t\t\tmenuView.panelView.children.add(listView);\n\t\t\tfor (const option of options) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView(locale, menuView);\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView(locale);\n\t\t\t\tlistItemView.children.add(buttonView);\n\t\t\t\tlistView.items.add(listItemView);\n\t\t\t\tbuttonView.set({\n\t\t\t\t\tisToggleable: true,\n\t\t\t\t\tlabel: option.title,\n\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\tclass: option.class\n\t\t\t\t});\n\t\t\t\tbuttonView.delegate(\"execute\").to(menuView);\n\t\t\t\tbuttonView.on(\"execute\", () => {\n\t\t\t\t\tconst commandName = option.model === \"paragraph\" ? \"paragraph\" : \"heading\";\n\t\t\t\t\teditor.execute(commandName, { value: option.model });\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t});\n\t\t\t\tif (option.model === \"paragraph\") {\n\t\t\t\t\tbuttonView.bind(\"isOn\").to(paragraphCommand, \"value\");\n\t\t\t\t\tcommands.push(paragraphCommand);\n\t\t\t\t} else buttonView.bind(\"isOn\").to(headingCommand, \"value\", (value) => value === option.model);\n\t\t\t}\n\t\t\tmenuView.bind(\"isEnabled\").toMany(commands, \"isEnabled\", (...areEnabled) => {\n\t\t\t\treturn areEnabled.some((isEnabled) => isEnabled);\n\t\t\t});\n\t\t\treturn menuView;\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 heading/heading\n*/\n/**\n* The headings feature.\n*\n* For a detailed overview, check the {@glink features/headings Headings feature} guide\n* and the {@glink api/heading package page}.\n*\n* This is a \"glue\" plugin which loads the {@link module:heading/headingediting~HeadingEditing heading editing feature}\n* and {@link module:heading/headingui~HeadingUI heading UI feature}.\n*\n* @extends module:core/plugin~Plugin\n*/\nvar Heading = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [HeadingEditing, HeadingUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Heading\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 heading/headingbuttonsui\n*/\nconst defaultIcons = /* #__PURE__ */ (() => ({\n\theading1: IconHeading1,\n\theading2: IconHeading2,\n\theading3: IconHeading3,\n\theading4: IconHeading4,\n\theading5: IconHeading5,\n\theading6: IconHeading6\n}))();\n/**\n* The `HeadingButtonsUI` plugin defines a set of UI buttons that can be used instead of the\n* standard drop down component.\n*\n* This feature is not enabled by default by the {@link module:heading/heading~Heading} plugin and needs to be\n* installed manually to the editor configuration.\n*\n* Plugin introduces button UI elements, which names are same as `model` property from {@link module:heading/headingconfig~HeadingOption}.\n*\n* ```ts\n* ClassicEditor\n*   .create( {\n*     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n*     heading: {\n*       options: [\n*         { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },\n*         { model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },\n*         { model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },\n*         { model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }\n*       ]\n*      },\n*      toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n*   } )\n*   .then( ... )\n*   .catch( ... );\n* ```\n*\n* NOTE: The `'paragraph'` button is defined in by the {@link module:paragraph/paragraphbuttonui~ParagraphButtonUI} plugin\n* which needs to be loaded manually as well.\n*\n* It is possible to use custom icons by providing `icon` config option in {@link module:heading/headingconfig~HeadingOption}.\n* For the default configuration standard icons are used.\n*/\nvar HeadingButtonsUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tgetLocalizedOptions(this.editor).filter((item) => item.model !== \"paragraph\").map((item) => this._createButton(item));\n\t}\n\t/**\n\t* Creates single button view from provided configuration option.\n\t*/\n\t_createButton(option) {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(option.model, (locale) => {\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tconst command = editor.commands.get(\"heading\");\n\t\t\tview.label = option.title;\n\t\t\tview.icon = option.icon || defaultIcons[option.model];\n\t\t\tview.tooltip = true;\n\t\t\tview.isToggleable = true;\n\t\t\tview.bind(\"isEnabled\").to(command);\n\t\t\tview.bind(\"isOn\").to(command, \"value\", (value) => value == option.model);\n\t\t\tview.on(\"execute\", () => {\n\t\t\t\teditor.execute(\"heading\", { value: option.model });\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn view;\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 heading/title\n*/\nconst titleLikeElements = /* @__PURE__ */ new Set([\n\t\"paragraph\",\n\t\"heading1\",\n\t\"heading2\",\n\t\"heading3\",\n\t\"heading4\",\n\t\"heading5\",\n\t\"heading6\"\n]);\n/**\n* The Title plugin.\n*\n* It splits the document into `Title` and `Body` sections.\n*/\nvar Title = class extends Plugin {\n\t/**\n\t* A reference to an empty paragraph in the body\n\t* created when there is no element in the body for the placeholder purposes.\n\t*/\n\t_bodyPlaceholder = /* @__PURE__ */ new Map();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Title\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Paragraph];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tmodel.schema.register(\"title\", {\n\t\t\tisBlock: true,\n\t\t\tallowIn: \"$root\"\n\t\t});\n\t\tmodel.schema.register(\"title-content\", {\n\t\t\tisBlock: true,\n\t\t\tallowIn: \"title\",\n\t\t\tallowAttributes: [\"alignment\"]\n\t\t});\n\t\tmodel.schema.extend(\"$text\", { allowIn: \"title-content\" });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (context.endsWith(\"title-content $text\")) return false;\n\t\t});\n\t\teditor.editing.mapper.on(\"modelToViewPosition\", mapModelPositionToView(editor.editing.view));\n\t\teditor.data.mapper.on(\"modelToViewPosition\", mapModelPositionToView(editor.editing.view));\n\t\teditor.conversion.for(\"downcast\").elementToElement({\n\t\t\tmodel: \"title-content\",\n\t\t\tview: \"h1\"\n\t\t});\n\t\teditor.conversion.for(\"downcast\").add((dispatcher) => dispatcher.on(\"insert:title\", (evt, data, conversionApi) => {\n\t\t\tconversionApi.consumable.consume(data.item, evt.name);\n\t\t}));\n\t\teditor.data.upcastDispatcher.on(\"element:h1\", dataViewModelH1Insertion, { priority: \"high\" });\n\t\teditor.data.upcastDispatcher.on(\"element:h2\", dataViewModelH1Insertion, { priority: \"high\" });\n\t\teditor.data.upcastDispatcher.on(\"element:h3\", dataViewModelH1Insertion, { priority: \"high\" });\n\t\tmodel.document.registerPostFixer((writer) => this._fixTitleContent(writer));\n\t\tmodel.document.registerPostFixer((writer) => this._fixTitleElement(writer));\n\t\tmodel.document.registerPostFixer((writer) => this._fixBodyElement(writer));\n\t\tmodel.document.registerPostFixer((writer) => this._fixExtraParagraph(writer));\n\t\tthis._attachPlaceholders();\n\t\tthis._attachTabPressHandling();\n\t\tthis._warnIfNoSupportedRoot();\n\t}\n\t/**\n\t* Logs a single warning when none of the editor's roots can host the title structure. The Title feature\n\t* only operates on roots whose `modelElement` is the default `$root`; roots configured with a custom\n\t* `modelElement` are silently skipped at runtime. If no root supports the structure, the plugin is\n\t* effectively a no-op and the integrator likely wants to know.\n\t*/\n\t_warnIfNoSupportedRoot() {\n\t\tconst model = this.editor.model;\n\t\tfor (const root of model.document.getRoots()) if (model.schema.checkChild(root, \"title\")) return;\n\t\t/**\n\t\t* The Title feature was loaded, but none of the editor's roots supports the `title` element. The feature\n\t\t* only operates on roots whose `modelElement` is the default `$root`; roots configured with a custom\n\t\t* `modelElement` (including `$inlineRoot`) are silently skipped, so `getTitle()` / `getBody()` fall back\n\t\t* to the regular data getter and no title structure is ever inserted.\n\t\t*\n\t\t* To use the Title feature, ensure at least one root uses the default `$root` model element. Otherwise,\n\t\t* remove the Title plugin from this editor's plugin list.\n\t\t*\n\t\t* @error title-no-supported-root\n\t\t*/\n\t\tlogWarning(\"title-no-supported-root\");\n\t}\n\t/**\n\t* Returns the title of the document. Note that because this plugin does not allow any formatting inside\n\t* the title element, the output of this method will be a plain text, with no HTML tags.\n\t*\n\t* It is not recommended to use this method together with features that insert markers to the\n\t* data output, like comments or track changes features. If such markers start in the title and end in the\n\t* body, the result of this method might be incorrect.\n\t*\n\t* @param options Additional configuration passed to the conversion process.\n\t* See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n\t* @returns The title of the document.\n\t*/\n\tgetTitle(options = {}) {\n\t\tconst rootName = options.rootName ? options.rootName : void 0;\n\t\tconst titleElement = this._getTitleElement(rootName);\n\t\tif (!titleElement) return \"\";\n\t\tconst titleContentElement = titleElement.getChild(0);\n\t\treturn this.editor.data.stringify(titleContentElement, options);\n\t}\n\t/**\n\t* Returns the body of the document.\n\t*\n\t* Note that it is not recommended to use this method together with features that insert markers to the\n\t* data output, like comments or track changes features. If such markers start in the title and end in the\n\t* body, the result of this method might be incorrect.\n\t*\n\t* @param options Additional configuration passed to the conversion process.\n\t* See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n\t* @returns The body of the document.\n\t*/\n\tgetBody(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst data = editor.data;\n\t\tconst model = editor.model;\n\t\tconst rootName = options.rootName ? options.rootName : void 0;\n\t\tconst root = editor.model.document.getRoot(rootName);\n\t\tif (!model.schema.checkChild(root, \"title\")) return data.get({\n\t\t\t...options,\n\t\t\trootName: root.rootName\n\t\t});\n\t\tconst firstChild = root.getChild(0);\n\t\tif (!firstChild || !firstChild.is(\"element\", \"title\")) return \"\";\n\t\tconst view = editor.editing.view;\n\t\tconst viewWriter = new ViewDowncastWriter(view.document);\n\t\tconst rootRange = model.createRangeIn(root);\n\t\tconst viewDocumentFragment = viewWriter.createDocumentFragment();\n\t\tconst bodyStartPosition = model.createPositionAfter(firstChild);\n\t\tconst bodyRange = model.createRange(bodyStartPosition, model.createPositionAt(root, \"end\"));\n\t\tconst markers = /* @__PURE__ */ new Map();\n\t\tfor (const marker of model.markers) {\n\t\t\tconst intersection = bodyRange.getIntersection(marker.getRange());\n\t\t\tif (intersection) markers.set(marker.name, intersection);\n\t\t}\n\t\tdata.mapper.clearBindings();\n\t\tdata.mapper.bindElements(root, viewDocumentFragment);\n\t\tdata.downcastDispatcher.convert(rootRange, markers, viewWriter, options);\n\t\tviewWriter.remove(viewWriter.createRangeOn(viewDocumentFragment.getChild(0)));\n\t\treturn editor.data.processor.toData(viewDocumentFragment);\n\t}\n\t/**\n\t* Returns the `title` element when it is in the document. Returns `undefined` otherwise.\n\t*/\n\t_getTitleElement(rootName) {\n\t\tconst model = this.editor.model;\n\t\tconst root = model.document.getRoot(rootName);\n\t\tif (!model.schema.checkChild(root, \"title\")) return;\n\t\tfor (const child of root.getChildren()) if (isTitle(child)) return child;\n\t}\n\t/**\n\t* Model post-fixer callback that ensures that `title` has only one `title-content` child.\n\t* All additional children should be moved after the `title` element and renamed to a paragraph.\n\t*/\n\t_fixTitleContent(writer) {\n\t\tlet changed = false;\n\t\tfor (const rootName of this.editor.model.document.getRootNames()) {\n\t\t\tconst title = this._getTitleElement(rootName);\n\t\t\tif (!title || title.maxOffset === 1) continue;\n\t\t\tconst titleChildren = Array.from(title.getChildren());\n\t\t\ttitleChildren.shift();\n\t\t\tfor (const titleChild of titleChildren) {\n\t\t\t\twriter.move(writer.createRangeOn(titleChild), title, \"after\");\n\t\t\t\twriter.rename(titleChild, \"paragraph\");\n\t\t\t}\n\t\t\tchanged = true;\n\t\t}\n\t\treturn changed;\n\t}\n\t/**\n\t* Model post-fixer callback that creates a title element when it is missing,\n\t* takes care of the correct position of it and removes additional title elements.\n\t*/\n\t_fixTitleElement(writer) {\n\t\tlet changed = false;\n\t\tconst model = this.editor.model;\n\t\tfor (const modelRoot of this.editor.model.document.getRoots()) {\n\t\t\tif (!model.schema.checkChild(modelRoot, \"title\")) continue;\n\t\t\tconst titleElements = Array.from(modelRoot.getChildren()).filter(isTitle);\n\t\t\tconst firstTitleElement = titleElements[0];\n\t\t\tconst firstRootChild = modelRoot.getChild(0);\n\t\t\tif (firstRootChild.is(\"element\", \"title\")) {\n\t\t\t\tif (titleElements.length > 1) {\n\t\t\t\t\tfixAdditionalTitleElements(titleElements, writer, model);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!firstTitleElement && !titleLikeElements.has(firstRootChild.name)) {\n\t\t\t\tconst title = writer.createElement(\"title\");\n\t\t\t\twriter.insert(title, modelRoot);\n\t\t\t\twriter.insertElement(\"title-content\", title);\n\t\t\t\tchanged = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (titleLikeElements.has(firstRootChild.name)) changeElementToTitle(firstRootChild, writer, model);\n\t\t\telse writer.move(writer.createRangeOn(firstTitleElement), modelRoot, 0);\n\t\t\tfixAdditionalTitleElements(titleElements, writer, model);\n\t\t\tchanged = true;\n\t\t}\n\t\treturn changed;\n\t}\n\t/**\n\t* Model post-fixer callback that adds an empty paragraph at the end of the document\n\t* when it is needed for the placeholder purposes.\n\t*/\n\t_fixBodyElement(writer) {\n\t\tconst schema = this.editor.model.schema;\n\t\tlet changed = false;\n\t\tfor (const rootName of this.editor.model.document.getRootNames()) {\n\t\t\tconst modelRoot = this.editor.model.document.getRoot(rootName);\n\t\t\tif (modelRoot.childCount < 2 && schema.checkChild(modelRoot, \"title\")) {\n\t\t\t\tconst placeholder = writer.createElement(\"paragraph\");\n\t\t\t\twriter.insert(placeholder, modelRoot, 1);\n\t\t\t\tthis._bodyPlaceholder.set(rootName, placeholder);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n\t/**\n\t* Model post-fixer callback that removes a paragraph from the end of the document\n\t* if it was created for the placeholder purposes and is not needed anymore.\n\t*/\n\t_fixExtraParagraph(writer) {\n\t\tlet changed = false;\n\t\tfor (const rootName of this.editor.model.document.getRootNames()) {\n\t\t\tconst root = this.editor.model.document.getRoot(rootName);\n\t\t\tconst placeholder = this._bodyPlaceholder.get(rootName);\n\t\t\tif (!placeholder) continue;\n\t\t\tif (shouldRemoveLastParagraph(placeholder, root)) {\n\t\t\t\tthis._bodyPlaceholder.delete(rootName);\n\t\t\t\twriter.remove(placeholder);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n\t/**\n\t* Attaches the `Title` and `Body` placeholders to the title and/or content.\n\t*/\n\t_attachPlaceholders() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst view = editor.editing.view;\n\t\tconst sourceElement = editor.sourceElement;\n\t\tconst titlePlaceholder = editor.config.get(\"title.placeholder\") || t(\"Type your title\");\n\t\teditor.editing.downcastDispatcher.on(\"insert:title-content\", (evt, data, conversionApi) => {\n\t\t\tconst element = conversionApi.mapper.toViewElement(data.item);\n\t\t\telement.placeholder = titlePlaceholder;\n\t\t\tenableViewPlaceholder({\n\t\t\t\tview,\n\t\t\t\telement,\n\t\t\t\tkeepOnFocus: true\n\t\t\t});\n\t\t});\n\t\tconst bodyViewElements = /* @__PURE__ */ new Map();\n\t\tview.document.registerPostFixer((writer) => {\n\t\t\tlet hasChanged = false;\n\t\t\tfor (const viewRoot of view.document.roots) {\n\t\t\t\tif (viewRoot.isEmpty) continue;\n\t\t\t\tconst modelRoot = editor.editing.mapper.toModelElement(viewRoot);\n\t\t\t\tif (!editor.model.schema.checkChild(modelRoot, \"title\")) continue;\n\t\t\t\tconst body = viewRoot.getChild(1);\n\t\t\t\tconst oldBody = bodyViewElements.get(viewRoot.rootName);\n\t\t\t\tif (body !== oldBody) {\n\t\t\t\t\tif (oldBody) {\n\t\t\t\t\t\thideViewPlaceholder(writer, oldBody);\n\t\t\t\t\t\twriter.removeAttribute(\"data-placeholder\", oldBody);\n\t\t\t\t\t}\n\t\t\t\t\tconst bodyPlaceholder = editor.config.get(\"roots\")[viewRoot.rootName]?.placeholder || isTextArea(sourceElement) && sourceElement.getAttribute(\"placeholder\") || t(\"Type or paste your content here.\");\n\t\t\t\t\twriter.setAttribute(\"data-placeholder\", bodyPlaceholder, body);\n\t\t\t\t\tbodyViewElements.set(viewRoot.rootName, body);\n\t\t\t\t\thasChanged = true;\n\t\t\t\t}\n\t\t\t\tif (needsViewPlaceholder(body, true) && viewRoot.childCount === 2 && body.name === \"p\") hasChanged = showViewPlaceholder(writer, body) ? true : hasChanged;\n\t\t\t\telse hasChanged = hideViewPlaceholder(writer, body) ? true : hasChanged;\n\t\t\t}\n\t\t\treturn hasChanged;\n\t\t});\n\t}\n\t/**\n\t* Creates navigation between the title and body sections using <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.\n\t*/\n\t_attachTabPressHandling() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\teditor.keystrokes.set(\"TAB\", (data, cancel) => {\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst selection = model.document.selection;\n\t\t\t\tconst selectedElements = Array.from(selection.getSelectedBlocks());\n\t\t\t\tif (selectedElements.length === 1 && selectedElements[0].is(\"element\", \"title-content\")) {\n\t\t\t\t\tconst firstBodyElement = selection.getFirstPosition().root.getChild(1);\n\t\t\t\t\twriter.setSelection(firstBodyElement, 0);\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\teditor.keystrokes.set(\"SHIFT + TAB\", (data, cancel) => {\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst selection = model.document.selection;\n\t\t\t\tif (!selection.isCollapsed) return;\n\t\t\t\tconst selectedElement = first(selection.getSelectedBlocks());\n\t\t\t\tconst selectionPosition = selection.getFirstPosition();\n\t\t\t\tconst root = editor.model.document.getRoot(selectionPosition.root.rootName);\n\t\t\t\tif (!model.schema.checkChild(root, \"title\")) return;\n\t\t\t\tconst title = root.getChild(0);\n\t\t\t\tif (selectedElement === root.getChild(1) && selectionPosition.isAtStart) {\n\t\t\t\t\twriter.setSelection(title.getChild(0), 0);\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* A view-to-model converter for the h1 that appears at the beginning of the document (a title element).\n*\n* Matches only the synthetic upcast parent named `$root` (the default generic root element). Title is not supported\n* for roots whose `modelElement` is customized, so this converter intentionally does not fire on them.\n*\n* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n* @param evt An object containing information about the fired event.\n* @param data An object containing conversion input, a placeholder for conversion output and possibly other values.\n* @param conversionApi Conversion interface to be used by the callback.\n*/\nfunction dataViewModelH1Insertion(evt, data, conversionApi) {\n\tconst modelCursor = data.modelCursor;\n\tconst viewItem = data.viewItem;\n\tif (!modelCursor.isAtStart || !modelCursor.parent.is(\"element\", \"$root\")) return;\n\tif (!conversionApi.consumable.consume(viewItem, { name: true })) return;\n\tconst modelWriter = conversionApi.writer;\n\tconst title = modelWriter.createElement(\"title\");\n\tconst titleContent = modelWriter.createElement(\"title-content\");\n\tmodelWriter.append(titleContent, title);\n\tmodelWriter.insert(title, modelCursor);\n\tconversionApi.convertChildren(viewItem, titleContent);\n\tconversionApi.updateConversionResult(title, data);\n}\n/**\n* Maps position from the beginning of the model `title` element to the beginning of the view `h1` element.\n*\n* ```html\n* <title>^<title-content>Foo</title-content></title> -> <h1>^Foo</h1>\n* ```\n*/\nfunction mapModelPositionToView(editingView) {\n\treturn (evt, data) => {\n\t\tconst positionParent = data.modelPosition.parent;\n\t\tif (!positionParent.is(\"element\", \"title\")) return;\n\t\tconst modelTitleElement = positionParent.parent;\n\t\tconst viewElement = data.mapper.toViewElement(modelTitleElement);\n\t\tdata.viewPosition = editingView.createPositionAt(viewElement, 0);\n\t\tevt.stop();\n\t};\n}\n/**\n* @returns Returns true when given element is a title. Returns false otherwise.\n*/\nfunction isTitle(element) {\n\treturn element.is(\"element\", \"title\");\n}\n/**\n* Changes the given element to the title element.\n*/\nfunction changeElementToTitle(element, writer, model) {\n\tconst title = writer.createElement(\"title\");\n\twriter.insert(title, element, \"before\");\n\twriter.insert(element, title, 0);\n\twriter.rename(element, \"title-content\");\n\tmodel.schema.removeDisallowedAttributes([element], writer);\n}\n/**\n* Loops over the list of title elements and fixes additional ones.\n*\n* @returns Returns true when there was any change. Returns false otherwise.\n*/\nfunction fixAdditionalTitleElements(titleElements, writer, model) {\n\tlet hasChanged = false;\n\tfor (const title of titleElements) if (title.index !== 0) {\n\t\tfixTitleElement(title, writer, model);\n\t\thasChanged = true;\n\t}\n\treturn hasChanged;\n}\n/**\n* Changes given title element to a paragraph or removes it when it is empty.\n*/\nfunction fixTitleElement(title, writer, model) {\n\tconst child = title.getChild(0);\n\tif (child.isEmpty) {\n\t\twriter.remove(title);\n\t\treturn;\n\t}\n\twriter.move(writer.createRangeOn(child), title, \"before\");\n\twriter.rename(child, \"paragraph\");\n\twriter.remove(title);\n\tmodel.schema.removeDisallowedAttributes([child], writer);\n}\n/**\n* Returns true when the last paragraph in the document was created only for the placeholder\n* purpose and it's not needed anymore. Returns false otherwise.\n*/\nfunction shouldRemoveLastParagraph(placeholder, root) {\n\tif (!placeholder.is(\"element\", \"paragraph\") || placeholder.childCount) return false;\n\tif (root.childCount <= 2 || root.getChild(root.childCount - 1) !== placeholder) return false;\n\treturn true;\n}\n/**\n* Returns true when given element is a DOM textarea.\n*/\nfunction isTextArea(sourceElement) {\n\treturn !!sourceElement && sourceElement.tagName.toLowerCase() === \"textarea\";\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 { Heading, HeadingButtonsUI, HeadingCommand, HeadingEditing, HeadingUI, Title, getLocalizedOptions as _getLocalizedHeadingOptions };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module heading/headingcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\nimport type { ModelElement, ModelSchema } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The heading command. It is used by the {@link module:heading/heading~Heading heading feature} to apply headings.\n */\nexport class HeadingCommand extends Command {\n\t/**\n\t * If the selection starts in a heading (which {@link #modelElements is supported by this command})\n\t * the value is set to the name of that heading model element.\n\t * It is  set to `false` otherwise.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: false | string;\n\n\t/**\n\t * Set of defined model's elements names that this command support.\n\t * See {@link module:heading/headingconfig~HeadingOption}.\n\t */\n\tpublic readonly modelElements: Array<string>;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor Editor instance.\n\t * @param modelElements Names of the element which this command can apply in the model.\n\t */\n\tconstructor( editor: Editor, modelElements: Array<string> ) {\n\t\tsuper( editor );\n\n\t\tthis.modelElements = modelElements;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst block = first( this.editor.model.document.selection.getSelectedBlocks() );\n\n\t\tthis.value = !!block && this.modelElements.includes( block.name ) && block.name;\n\t\tthis.isEnabled = !!block && this.modelElements.some( heading => checkCanBecomeHeading( block, heading, this.editor.model.schema ) );\n\t}\n\n\t/**\n\t * Executes the command. Applies the heading to the selected blocks or, if the first selected\n\t * block is a heading already, turns selected headings (of this level only) to paragraphs.\n\t *\n\t * @param options.value Name of the element which this command will apply in the model.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { value: string } ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tconst modelElement = options.value;\n\n\t\tmodel.change( writer => {\n\t\t\tconst blocks = Array.from( document.selection.getSelectedBlocks() )\n\t\t\t\t.filter( block => {\n\t\t\t\t\treturn checkCanBecomeHeading( block, modelElement, model.schema );\n\t\t\t\t} );\n\n\t\t\tfor ( const block of blocks ) {\n\t\t\t\tif ( !block.is( 'element', modelElement ) ) {\n\t\t\t\t\twriter.rename( block, modelElement );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Checks whether the given block can be replaced by a specific heading.\n *\n * @param block A block to be tested.\n * @param heading Command element name in the model.\n * @param schema The schema of the document.\n */\nfunction checkCanBecomeHeading( block: ModelElement, heading: string, schema: ModelSchema ) {\n\treturn schema.checkChild( block.parent as ModelElement, heading ) && !schema.isObject( block );\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/**\n * @module heading/headingediting\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { Paragraph } from '@ckeditor/ckeditor5-paragraph';\nimport { priorities } from '@ckeditor/ckeditor5-utils';\nimport type { EnterCommandAfterExecuteEvent } from '@ckeditor/ckeditor5-enter';\nimport type { HeadingOption } from './headingconfig.js';\n\nimport { HeadingCommand } from './headingcommand.js';\n\nconst defaultModelElement = 'paragraph';\n\n/**\n * The headings engine feature. It handles switching between block formats &ndash; headings and paragraph.\n * This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.\n * It introduces `heading1`-`headingN` commands which allow to convert paragraphs into headings.\n */\nexport class HeadingEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'HeadingEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'heading', {\n\t\t\toptions: [\n\t\t\t\t{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },\n\t\t\t\t{ model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },\n\t\t\t\t{ model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },\n\t\t\t\t{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Paragraph ]> {\n\t\treturn [ Paragraph ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst options: Array<HeadingOption> = editor.config.get( 'heading.options' )!;\n\n\t\tconst modelElements = [];\n\n\t\tfor ( const option of options ) {\n\t\t\t// Skip paragraph - it is defined in required Paragraph feature.\n\t\t\tif ( option.model === 'paragraph' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Schema.\n\t\t\teditor.model.schema.register( option.model, {\n\t\t\t\tinheritAllFrom: '$block'\n\t\t\t} );\n\n\t\t\teditor.conversion.elementToElement( option );\n\n\t\t\tmodelElements.push( option.model );\n\t\t}\n\n\t\tthis._addDefaultH1Conversion( editor );\n\n\t\t// Register the heading command for this option.\n\t\teditor.commands.add( 'heading', new HeadingCommand( editor, modelElements ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\t// If the enter command is added to the editor, alter its behavior.\n\t\t// Enter at the end of a heading element should create a paragraph.\n\t\tconst editor = this.editor;\n\t\tconst enterCommand = editor.commands.get( 'enter' );\n\t\tconst options: Array<HeadingOption> = editor.config.get( 'heading.options' )!;\n\n\t\tif ( enterCommand ) {\n\t\t\tthis.listenTo<EnterCommandAfterExecuteEvent>( enterCommand, 'afterExecute', ( evt, data ) => {\n\t\t\t\tconst positionParent = editor.model.document.selection.getFirstPosition()!.parent;\n\t\t\t\tconst isHeading = options.some( option => positionParent.is( 'element', option.model ) );\n\n\t\t\t\tif ( isHeading && !positionParent.is( 'element', defaultModelElement ) && positionParent.childCount === 0 ) {\n\t\t\t\t\tdata.writer.rename( positionParent, defaultModelElement );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Adds default conversion for `h1` -> `heading1` with a low priority.\n\t *\n\t * @param editor Editor instance on which to add the `h1` conversion.\n\t */\n\tprivate _addDefaultH1Conversion( editor: Editor ) {\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tmodel: 'heading1',\n\t\t\tview: 'h1',\n\t\t\t// With a `low` priority, `paragraph` plugin autoparagraphing mechanism is executed. Make sure\n\t\t\t// this listener is called before it. If not, `h1` will be transformed into a paragraph.\n\t\t\tconverterPriority: priorities.low + 1\n\t\t} );\n\t}\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/**\n * @module heading/utils\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport type { HeadingOption } from './headingconfig.js';\n\n/**\n * Returns heading options as defined in `config.heading.options` but processed to consider\n * the editor localization, i.e. to display {@link module:heading/headingconfig~HeadingOption}\n * in the correct language.\n *\n * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n * when the user configuration is defined because the editor does not exist yet.\n *\n * @internal\n */\nexport function getLocalizedOptions( editor: Editor ): Array<HeadingOption> {\n\tconst t = editor.t;\n\tconst localizedTitles: Record<string, string> = {\n\t\t'Paragraph': t( 'Paragraph' ),\n\t\t'Heading 1': t( 'Heading 1' ),\n\t\t'Heading 2': t( 'Heading 2' ),\n\t\t'Heading 3': t( 'Heading 3' ),\n\t\t'Heading 4': t( 'Heading 4' ),\n\t\t'Heading 5': t( 'Heading 5' ),\n\t\t'Heading 6': t( 'Heading 6' )\n\t};\n\n\treturn editor.config.get( 'heading.options' )!.map( option => {\n\t\tconst title = localizedTitles[ option.title ];\n\n\t\tif ( title && title != option.title ) {\n\t\t\toption.title = title;\n\t\t}\n\n\t\treturn option;\n\t} );\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/**\n * @module heading/headingui\n */\n\nimport { Plugin, type Command } from '@ckeditor/ckeditor5-core';\nimport {\n\tUIModel,\n\tcreateDropdown,\n\taddListToDropdown,\n\ttype ButtonExecuteEvent,\n\ttype ListDropdownItemDefinition,\n\tMenuBarMenuListItemView,\n\tMenuBarMenuListView,\n\tMenuBarMenuView,\n\tMenuBarMenuListItemButtonView\n} from '@ckeditor/ckeditor5-ui';\nimport { Collection } from '@ckeditor/ckeditor5-utils';\nimport type { ParagraphCommand } from '@ckeditor/ckeditor5-paragraph';\n\nimport { getLocalizedOptions } from './utils.js';\nimport { type HeadingCommand } from './headingcommand.js';\n\n/**\n * The headings UI feature. It introduces the `headings` dropdown.\n */\nexport class HeadingUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'HeadingUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst options = getLocalizedOptions( editor );\n\t\tconst defaultTitle = t( 'Choose heading' );\n\t\tconst accessibleLabel = t( 'Heading' );\n\n\t\t// Register UI component.\n\t\teditor.ui.componentFactory.add( 'heading', locale => {\n\t\t\tconst titles: Record<string, string> = {};\n\t\t\tconst itemDefinitions: Collection<ListDropdownItemDefinition> = new Collection();\n\t\t\tconst headingCommand: HeadingCommand = editor.commands.get( 'heading' )!;\n\t\t\tconst paragraphCommand: ParagraphCommand = editor.commands.get( 'paragraph' )!;\n\t\t\tconst commands: Array<Command> = [ headingCommand ];\n\n\t\t\tfor ( const option of options ) {\n\t\t\t\tconst def: ListDropdownItemDefinition = {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: new UIModel( {\n\t\t\t\t\t\tlabel: option.title,\n\t\t\t\t\t\tclass: option.class,\n\t\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\t\twithText: true\n\t\t\t\t\t} )\n\t\t\t\t};\n\n\t\t\t\tif ( option.model === 'paragraph' ) {\n\t\t\t\t\tdef.model.bind( 'isOn' ).to( paragraphCommand, 'value' );\n\t\t\t\t\tdef.model.set( 'commandName', 'paragraph' );\n\t\t\t\t\tcommands.push( paragraphCommand );\n\t\t\t\t} else {\n\t\t\t\t\tdef.model.bind( 'isOn' ).to( headingCommand, 'value', value => value === option.model );\n\t\t\t\t\tdef.model.set( {\n\t\t\t\t\t\tcommandName: 'heading',\n\t\t\t\t\t\tcommandValue: option.model\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// Add the option to the collection.\n\t\t\t\titemDefinitions.add( def );\n\n\t\t\t\ttitles[ option.model ] = option.title;\n\t\t\t}\n\n\t\t\tconst dropdownView = createDropdown( locale );\n\t\t\taddListToDropdown( dropdownView, itemDefinitions, {\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\trole: 'menu'\n\t\t\t} );\n\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\tariaLabelledBy: undefined,\n\t\t\t\tisOn: false,\n\t\t\t\twithText: true,\n\t\t\t\ttooltip: accessibleLabel\n\t\t\t} );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck-heading-dropdown'\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdownView.bind( 'isEnabled' ).toMany( commands, 'isEnabled', ( ...areEnabled ) => {\n\t\t\t\treturn areEnabled.some( isEnabled => isEnabled );\n\t\t\t} );\n\n\t\t\tdropdownView.buttonView.bind( 'label' ).to( headingCommand, 'value', paragraphCommand, 'value', ( heading, paragraph ) => {\n\t\t\t\tconst whichModel = paragraph ? 'paragraph' : heading;\n\n\t\t\t\tif ( typeof whichModel === 'boolean' ) {\n\t\t\t\t\treturn defaultTitle;\n\t\t\t\t}\n\n\t\t\t\t// If none of the commands is active, display default title.\n\t\t\t\tif ( !titles[ whichModel ] ) {\n\t\t\t\t\treturn defaultTitle;\n\t\t\t\t}\n\n\t\t\t\treturn titles[ whichModel ];\n\t\t\t} );\n\n\t\t\tdropdownView.buttonView.bind( 'ariaLabel' ).to( headingCommand, 'value', paragraphCommand, 'value', ( heading, paragraph ) => {\n\t\t\t\tconst whichModel = paragraph ? 'paragraph' : heading;\n\n\t\t\t\tif ( typeof whichModel === 'boolean' ) {\n\t\t\t\t\treturn accessibleLabel;\n\t\t\t\t}\n\n\t\t\t\t// If none of the commands is active, display default title.\n\t\t\t\tif ( !titles[ whichModel ] ) {\n\t\t\t\t\treturn accessibleLabel;\n\t\t\t\t}\n\n\t\t\t\treturn `${ titles[ whichModel ] }, ${ accessibleLabel }`;\n\t\t\t} );\n\n\t\t\t// Execute command when an item from the dropdown is selected.\n\t\t\tthis.listenTo<ButtonExecuteEvent>( dropdownView, 'execute', evt => {\n\t\t\t\tconst { commandName, commandValue } = evt.source as any;\n\t\t\t\teditor.execute( commandName, commandValue ? { value: commandValue } : undefined );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:heading', locale => {\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\t\t\tconst headingCommand: HeadingCommand = editor.commands.get( 'heading' )!;\n\t\t\tconst paragraphCommand: ParagraphCommand = editor.commands.get( 'paragraph' )!;\n\t\t\tconst commands: Array<Command> = [ headingCommand ];\n\t\t\tconst listView = new MenuBarMenuListView( locale );\n\n\t\t\tmenuView.set( {\n\t\t\t\tclass: 'ck-heading-dropdown'\n\t\t\t} );\n\n\t\t\tlistView.set( {\n\t\t\t\tariaLabel: t( 'Heading' ),\n\t\t\t\trole: 'menu'\n\t\t\t} );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\tlabel: t( 'Heading' )\n\t\t\t} );\n\n\t\t\tmenuView.panelView.children.add( listView );\n\n\t\t\tfor ( const option of options ) {\n\t\t\t\tconst listItemView = new MenuBarMenuListItemView( locale, menuView );\n\t\t\t\tconst buttonView = new MenuBarMenuListItemButtonView( locale );\n\n\t\t\t\tlistItemView.children.add( buttonView );\n\t\t\t\tlistView.items.add( listItemView );\n\n\t\t\t\tbuttonView.set( {\n\t\t\t\t\tisToggleable: true,\n\t\t\t\t\tlabel: option.title,\n\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\tclass: option.class\n\t\t\t\t} );\n\n\t\t\t\tbuttonView.delegate( 'execute' ).to( menuView );\n\n\t\t\t\tbuttonView.on<ButtonExecuteEvent>( 'execute', () => {\n\t\t\t\t\tconst commandName = option.model === 'paragraph' ? 'paragraph' : 'heading';\n\n\t\t\t\t\teditor.execute( commandName, { value: option.model } );\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t} );\n\n\t\t\t\tif ( option.model === 'paragraph' ) {\n\t\t\t\t\tbuttonView.bind( 'isOn' ).to( paragraphCommand, 'value' );\n\t\t\t\t\tcommands.push( paragraphCommand );\n\t\t\t\t} else {\n\t\t\t\t\tbuttonView.bind( 'isOn' ).to( headingCommand, 'value', value => value === option.model );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmenuView.bind( 'isEnabled' ).toMany( commands, 'isEnabled', ( ...areEnabled ) => {\n\t\t\t\treturn areEnabled.some( isEnabled => isEnabled );\n\t\t\t} );\n\n\t\t\treturn menuView;\n\t\t} );\n\t}\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/**\n * @module heading/heading\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { HeadingEditing } from './headingediting.js';\nimport { HeadingUI } from './headingui.js';\n\n/**\n * The headings feature.\n *\n * For a detailed overview, check the {@glink features/headings Headings feature} guide\n * and the {@glink api/heading package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:heading/headingediting~HeadingEditing heading editing feature}\n * and {@link module:heading/headingui~HeadingUI heading UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport class Heading extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ HeadingEditing, HeadingUI ]> {\n\t\treturn [ HeadingEditing, HeadingUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Heading' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module heading/headingbuttonsui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\nimport { IconHeading1, IconHeading2, IconHeading3, IconHeading4, IconHeading5, IconHeading6 } from '@ckeditor/ckeditor5-icons';\n\nimport { getLocalizedOptions } from './utils.js';\nimport type { HeadingOption } from './headingconfig.js';\nimport { type HeadingCommand } from './headingcommand.js';\n\nconst defaultIcons: Record<string, string> = /* #__PURE__ */ ( () => ( {\n\theading1: IconHeading1,\n\theading2: IconHeading2,\n\theading3: IconHeading3,\n\theading4: IconHeading4,\n\theading5: IconHeading5,\n\theading6: IconHeading6\n} ) )();\n\n/**\n * The `HeadingButtonsUI` plugin defines a set of UI buttons that can be used instead of the\n * standard drop down component.\n *\n * This feature is not enabled by default by the {@link module:heading/heading~Heading} plugin and needs to be\n * installed manually to the editor configuration.\n *\n * Plugin introduces button UI elements, which names are same as `model` property from {@link module:heading/headingconfig~HeadingOption}.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n *     heading: {\n *       options: [\n *         { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },\n *         { model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },\n *         { model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },\n *         { model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }\n *       ]\n *      },\n *      toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n *\n * NOTE: The `'paragraph'` button is defined in by the {@link module:paragraph/paragraphbuttonui~ParagraphButtonUI} plugin\n * which needs to be loaded manually as well.\n *\n * It is possible to use custom icons by providing `icon` config option in {@link module:heading/headingconfig~HeadingOption}.\n * For the default configuration standard icons are used.\n */\nexport class HeadingButtonsUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst options = getLocalizedOptions( this.editor );\n\n\t\toptions\n\t\t\t.filter( item => item.model !== 'paragraph' )\n\t\t\t.map( item => this._createButton( item ) );\n\t}\n\n\t/**\n\t * Creates single button view from provided configuration option.\n\t */\n\tprivate _createButton( option: HeadingOption ) {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( option.model, locale => {\n\t\t\tconst view = new ButtonView( locale );\n\t\t\tconst command: HeadingCommand = editor.commands.get( 'heading' )!;\n\n\t\t\tview.label = option.title;\n\t\t\tview.icon = option.icon || defaultIcons[ option.model ];\n\t\t\tview.tooltip = true;\n\t\t\tview.isToggleable = true;\n\t\t\tview.bind( 'isEnabled' ).to( command );\n\t\t\tview.bind( 'isOn' ).to( command, 'value', value => value == option.model );\n\n\t\t\tview.on( 'execute', () => {\n\t\t\t\teditor.execute( 'heading', { value: option.model } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\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/**\n * @module heading/title\n */\n\nimport { Plugin, type Editor, type ElementApi, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { Paragraph } from '@ckeditor/ckeditor5-paragraph';\nimport { first, logWarning, type GetCallback } from '@ckeditor/ckeditor5-utils';\nimport {\n\tViewDowncastWriter,\n\tenableViewPlaceholder,\n\thideViewPlaceholder,\n\tneedsViewPlaceholder,\n\tshowViewPlaceholder,\n\ttype DowncastInsertEvent,\n\ttype ModelElement,\n\ttype MapperModelToViewPositionEvent,\n\ttype Model,\n\ttype ModelRootElement,\n\ttype UpcastConversionApi,\n\ttype UpcastConversionData,\n\ttype UpcastElementEvent,\n\ttype EditingView,\n\ttype ViewElement,\n\ttype ModelWriter,\n\ttype PlaceholderableViewElement\n} from '@ckeditor/ckeditor5-engine';\n\n// A list of element names that should be treated by the Title plugin as title-like.\n// This means that an element of a type from this list will be changed to a title element\n// when it is the first element in the root.\nconst titleLikeElements = new Set( [ 'paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6' ] );\n\n/**\n * The Title plugin.\n *\n * It splits the document into `Title` and `Body` sections.\n */\nexport class Title extends Plugin {\n\t/**\n\t * A reference to an empty paragraph in the body\n\t * created when there is no element in the body for the placeholder purposes.\n\t */\n\tprivate _bodyPlaceholder = new Map<string, ModelElement>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Title' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Paragraph ]> {\n\t\treturn [ Paragraph ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\t// To use the schema for disabling some features when the selection is inside the title element\n\t\t// it is needed to create the following structure:\n\t\t//\n\t\t// <title>\n\t\t//     <title-content>The title text</title-content>\n\t\t// </title>\n\t\t//\n\t\t// See: https://github.com/ckeditor/ckeditor5/issues/2005.\n\t\t//\n\t\t// Title is scoped to roots whose `modelElement` is the generic `$root`. Custom root\n\t\t// `modelElement` names (including `$inlineRoot`) are intentionally not supported:\n\t\t// the title structure (`title` + `title-content` + paragraph body placeholder) relies on\n\t\t// the root accepting `$block` content, which is not guaranteed for custom or inline roots.\n\t\t// Runtime codepaths below additionally guard on `schema.checkChild( root, 'title' )` so\n\t\t// the plugin gracefully no-ops on roots where the schema does not allow the title element.\n\t\t// eslint-disable-next-line ckeditor5-rules/no-literal-dollar-root -- registered only on the default `$root` by design\n\t\tmodel.schema.register( 'title', { isBlock: true, allowIn: '$root' } );\n\t\tmodel.schema.register( 'title-content', { isBlock: true, allowIn: 'title', allowAttributes: [ 'alignment' ] } );\n\t\tmodel.schema.extend( '$text', { allowIn: 'title-content' } );\n\n\t\t// Disallow all attributes in `title-content`.\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tif ( context.endsWith( 'title-content $text' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\t// Because `title` is represented by two elements in the model\n\t\t// but only one in the view, it is needed to adjust Mapper.\n\t\teditor.editing.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', mapModelPositionToView( editor.editing.view ) );\n\t\teditor.data.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', mapModelPositionToView( editor.editing.view ) );\n\n\t\t// Conversion.\n\t\teditor.conversion.for( 'downcast' ).elementToElement( { model: 'title-content', view: 'h1' } );\n\t\teditor.conversion.for( 'downcast' ).add( dispatcher => dispatcher.on<DowncastInsertEvent>(\n\t\t\t'insert:title',\n\t\t\t( evt, data, conversionApi ) => {\n\t\t\t\tconversionApi.consumable.consume( data.item, evt.name );\n\t\t\t}\n\t\t) );\n\n\t\t// Custom converter is used for data v -> m conversion to avoid calling post-fixer when setting data.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/2036.\n\t\teditor.data.upcastDispatcher.on<UpcastElementEvent>( 'element:h1', dataViewModelH1Insertion, { priority: 'high' } );\n\t\teditor.data.upcastDispatcher.on<UpcastElementEvent>( 'element:h2', dataViewModelH1Insertion, { priority: 'high' } );\n\t\teditor.data.upcastDispatcher.on<UpcastElementEvent>( 'element:h3', dataViewModelH1Insertion, { priority: 'high' } );\n\n\t\t// Take care about correct `title` element structure.\n\t\tmodel.document.registerPostFixer( writer => this._fixTitleContent( writer ) );\n\n\t\t// Create and take care of correct position of a `title` element.\n\t\tmodel.document.registerPostFixer( writer => this._fixTitleElement( writer ) );\n\n\t\t// Create element for `Body` placeholder if it is missing.\n\t\tmodel.document.registerPostFixer( writer => this._fixBodyElement( writer ) );\n\n\t\t// Prevent from adding extra at the end of the document.\n\t\tmodel.document.registerPostFixer( writer => this._fixExtraParagraph( writer ) );\n\n\t\t// Attach `Title` and `Body` placeholders to the empty title and/or content.\n\t\tthis._attachPlaceholders();\n\n\t\t// Attach Tab handling.\n\t\tthis._attachTabPressHandling();\n\n\t\tthis._warnIfNoSupportedRoot();\n\t}\n\n\t/**\n\t * Logs a single warning when none of the editor's roots can host the title structure. The Title feature\n\t * only operates on roots whose `modelElement` is the default `$root`; roots configured with a custom\n\t * `modelElement` are silently skipped at runtime. If no root supports the structure, the plugin is\n\t * effectively a no-op and the integrator likely wants to know.\n\t */\n\tprivate _warnIfNoSupportedRoot(): void {\n\t\tconst model = this.editor.model;\n\n\t\tfor ( const root of model.document.getRoots() ) {\n\t\t\tif ( model.schema.checkChild( root, 'title' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * The Title feature was loaded, but none of the editor's roots supports the `title` element. The feature\n\t\t * only operates on roots whose `modelElement` is the default `$root`; roots configured with a custom\n\t\t * `modelElement` (including `$inlineRoot`) are silently skipped, so `getTitle()` / `getBody()` fall back\n\t\t * to the regular data getter and no title structure is ever inserted.\n\t\t *\n\t\t * To use the Title feature, ensure at least one root uses the default `$root` model element. Otherwise,\n\t\t * remove the Title plugin from this editor's plugin list.\n\t\t *\n\t\t * @error title-no-supported-root\n\t\t */\n\t\tlogWarning( 'title-no-supported-root' );\n\t}\n\n\t/**\n\t * Returns the title of the document. Note that because this plugin does not allow any formatting inside\n\t * the title element, the output of this method will be a plain text, with no HTML tags.\n\t *\n\t * It is not recommended to use this method together with features that insert markers to the\n\t * data output, like comments or track changes features. If such markers start in the title and end in the\n\t * body, the result of this method might be incorrect.\n\t *\n\t * @param options Additional configuration passed to the conversion process.\n\t * See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n\t * @returns The title of the document.\n\t */\n\tpublic getTitle( options: Record<string, unknown> = {} ): string {\n\t\tconst rootName = options.rootName ? options.rootName as string : undefined;\n\t\tconst titleElement = this._getTitleElement( rootName );\n\n\t\t// Root does not support the title structure (custom/inline root) — nothing to stringify.\n\t\tif ( !titleElement ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst titleContentElement = titleElement.getChild( 0 ) as ModelElement;\n\n\t\treturn this.editor.data.stringify( titleContentElement, options );\n\t}\n\n\t/**\n\t * Returns the body of the document.\n\t *\n\t * Note that it is not recommended to use this method together with features that insert markers to the\n\t * data output, like comments or track changes features. If such markers start in the title and end in the\n\t * body, the result of this method might be incorrect.\n\t *\n\t * @param options Additional configuration passed to the conversion process.\n\t * See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n\t * @returns The body of the document.\n\t */\n\tpublic getBody( options: Record<string, unknown> = {} ): string {\n\t\tconst editor = this.editor;\n\t\tconst data = editor.data;\n\t\tconst model = editor.model;\n\t\tconst rootName = options.rootName ? options.rootName as string : undefined;\n\t\tconst root = editor.model.document.getRoot( rootName )!;\n\n\t\t// Root does not support the title structure (custom/inline root) — the whole root is the body.\n\t\t// Delegate to the regular data getter so mixed-root callers receive useful content.\n\t\tif ( !model.schema.checkChild( root, 'title' ) ) {\n\t\t\treturn data.get( { ...options, rootName: root.rootName } );\n\t\t}\n\n\t\t// Root is empty / missing the expected title element (e.g. detached root or transient state) — no body to stringify.\n\t\tconst firstChild = root.getChild( 0 );\n\n\t\tif ( !firstChild || !firstChild.is( 'element', 'title' ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst view = editor.editing.view;\n\t\tconst viewWriter = new ViewDowncastWriter( view.document );\n\n\t\tconst rootRange = model.createRangeIn( root );\n\t\tconst viewDocumentFragment = viewWriter.createDocumentFragment();\n\n\t\t// Find all markers that intersects with body.\n\t\tconst bodyStartPosition = model.createPositionAfter( firstChild );\n\t\tconst bodyRange = model.createRange( bodyStartPosition, model.createPositionAt( root, 'end' ) );\n\n\t\tconst markers = new Map();\n\n\t\tfor ( const marker of model.markers ) {\n\t\t\tconst intersection = bodyRange.getIntersection( marker.getRange() );\n\n\t\t\tif ( intersection ) {\n\t\t\t\tmarkers.set( marker.name, intersection );\n\t\t\t}\n\t\t}\n\n\t\t// Convert the entire root to view.\n\t\tdata.mapper.clearBindings();\n\t\tdata.mapper.bindElements( root, viewDocumentFragment );\n\t\tdata.downcastDispatcher.convert( rootRange, markers, viewWriter, options );\n\n\t\t// Remove title element from view.\n\t\tviewWriter.remove( viewWriter.createRangeOn( viewDocumentFragment.getChild( 0 ) ) );\n\n\t\t// view -> data\n\t\treturn editor.data.processor.toData( viewDocumentFragment );\n\t}\n\n\t/**\n\t * Returns the `title` element when it is in the document. Returns `undefined` otherwise.\n\t */\n\tprivate _getTitleElement( rootName?: string ): ModelElement | undefined {\n\t\tconst model = this.editor.model;\n\t\tconst root = model.document.getRoot( rootName )!;\n\n\t\t// Root does not support the title structure (custom/inline root).\n\t\tif ( !model.schema.checkChild( root, 'title' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const child of root.getChildren() as IterableIterator<ModelElement> ) {\n\t\t\tif ( isTitle( child ) ) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Model post-fixer callback that ensures that `title` has only one `title-content` child.\n\t * All additional children should be moved after the `title` element and renamed to a paragraph.\n\t */\n\tprivate _fixTitleContent( writer: ModelWriter ) {\n\t\tlet changed = false;\n\n\t\tfor ( const rootName of this.editor.model.document.getRootNames() ) {\n\t\t\tconst title = this._getTitleElement( rootName );\n\n\t\t\t// If there is no title in the content it will be created by `_fixTitleElement` post-fixer.\n\t\t\t// If the title has just one element, then it is correct. No fixing.\n\t\t\tif ( !title || title.maxOffset === 1 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst titleChildren = Array.from( title.getChildren() ) as Array<ModelElement>;\n\n\t\t\t// Skip first child because it is an allowed element.\n\t\t\ttitleChildren.shift();\n\n\t\t\tfor ( const titleChild of titleChildren ) {\n\t\t\t\twriter.move( writer.createRangeOn( titleChild ), title, 'after' );\n\t\t\t\twriter.rename( titleChild, 'paragraph' );\n\t\t\t}\n\n\t\t\tchanged = true;\n\t\t}\n\n\t\treturn changed;\n\t}\n\n\t/**\n\t * Model post-fixer callback that creates a title element when it is missing,\n\t * takes care of the correct position of it and removes additional title elements.\n\t */\n\tprivate _fixTitleElement( writer: ModelWriter ) {\n\t\tlet changed = false;\n\t\tconst model = this.editor.model;\n\n\t\tfor ( const modelRoot of this.editor.model.document.getRoots() ) {\n\t\t\t// Skip roots that do not support the title structure (custom/inline root).\n\t\t\tif ( !model.schema.checkChild( modelRoot, 'title' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst titleElements = Array.from( modelRoot.getChildren() as IterableIterator<ModelElement> ).filter( isTitle );\n\t\t\tconst firstTitleElement = titleElements[ 0 ];\n\t\t\tconst firstRootChild = modelRoot.getChild( 0 ) as ModelElement;\n\n\t\t\t// When title element is at the beginning of the document then try to fix additional title elements (if there are any).\n\t\t\tif ( firstRootChild.is( 'element', 'title' ) ) {\n\t\t\t\tif ( titleElements.length > 1 ) {\n\t\t\t\t\tfixAdditionalTitleElements( titleElements, writer, model );\n\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// When there is no title in the document and first element in the document cannot be changed\n\t\t\t// to the title then create an empty title element at the beginning of the document.\n\t\t\tif ( !firstTitleElement && !titleLikeElements.has( firstRootChild.name ) ) {\n\t\t\t\tconst title = writer.createElement( 'title' );\n\n\t\t\t\twriter.insert( title, modelRoot );\n\t\t\t\twriter.insertElement( 'title-content', title );\n\n\t\t\t\tchanged = true;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( titleLikeElements.has( firstRootChild.name ) ) {\n\t\t\t\t// Change the first element in the document to the title if it can be changed (is title-like).\n\t\t\t\tchangeElementToTitle( firstRootChild, writer, model );\n\t\t\t} else {\n\t\t\t\t// Otherwise, move the first occurrence of the title element to the beginning of the document.\n\t\t\t\twriter.move( writer.createRangeOn( firstTitleElement ), modelRoot, 0 );\n\t\t\t}\n\n\t\t\tfixAdditionalTitleElements( titleElements, writer, model );\n\n\t\t\tchanged = true;\n\t\t}\n\n\t\treturn changed;\n\t}\n\n\t/**\n\t * Model post-fixer callback that adds an empty paragraph at the end of the document\n\t * when it is needed for the placeholder purposes.\n\t */\n\tprivate _fixBodyElement( writer: ModelWriter ) {\n\t\tconst schema = this.editor.model.schema;\n\t\tlet changed = false;\n\n\t\tfor ( const rootName of this.editor.model.document.getRootNames() ) {\n\t\t\tconst modelRoot = this.editor.model.document.getRoot( rootName )!;\n\n\t\t\t// Only insert the paragraph body placeholder when the root supports the title structure.\n\t\t\t// Custom/inline roots that do not accept `title` are intentionally skipped, matching `_fixTitleElement`.\n\t\t\tif ( modelRoot.childCount < 2 && schema.checkChild( modelRoot, 'title' ) ) {\n\t\t\t\tconst placeholder = writer.createElement( 'paragraph' );\n\n\t\t\t\twriter.insert( placeholder, modelRoot, 1 );\n\t\t\t\tthis._bodyPlaceholder.set( rootName, placeholder );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t}\n\n\t/**\n\t * Model post-fixer callback that removes a paragraph from the end of the document\n\t * if it was created for the placeholder purposes and is not needed anymore.\n\t */\n\tprivate _fixExtraParagraph( writer: ModelWriter ) {\n\t\tlet changed = false;\n\n\t\tfor ( const rootName of this.editor.model.document.getRootNames() ) {\n\t\t\tconst root = this.editor.model.document.getRoot( rootName )!;\n\t\t\tconst placeholder = this._bodyPlaceholder.get( rootName );\n\n\t\t\t// Roots that do not support the title structure never had a body placeholder created.\n\t\t\tif ( !placeholder ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( shouldRemoveLastParagraph( placeholder, root ) ) {\n\t\t\t\tthis._bodyPlaceholder.delete( rootName );\n\t\t\t\twriter.remove( placeholder );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t}\n\n\t/**\n\t * Attaches the `Title` and `Body` placeholders to the title and/or content.\n\t */\n\tprivate _attachPlaceholders() {\n\t\tconst editor: Editor & Partial<ElementApi> = this.editor;\n\t\tconst t = editor.t;\n\t\tconst view = editor.editing.view;\n\t\tconst sourceElement = editor.sourceElement;\n\n\t\tconst titlePlaceholder = editor.config.get( 'title.placeholder' ) || t( 'Type your title' );\n\n\t\t// Attach placeholder to the view title element.\n\t\teditor.editing.downcastDispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert:title-content', ( evt, data, conversionApi ) => {\n\t\t\tconst element: PlaceholderableViewElement = conversionApi.mapper.toViewElement( data.item )!;\n\n\t\t\telement.placeholder = titlePlaceholder;\n\n\t\t\tenableViewPlaceholder( {\n\t\t\t\tview,\n\t\t\t\telement,\n\t\t\t\tkeepOnFocus: true\n\t\t\t} );\n\t\t} );\n\n\t\t// Attach placeholder to first element after a title element and remove it if it's not needed anymore.\n\t\t// First element after title can change, so we need to observe all changes keep placeholder in sync.\n\t\tconst bodyViewElements = new Map<string, ViewElement>();\n\n\t\t// This post-fixer runs after the model post-fixer, so we can assume that the second child in view root will always exist.\n\t\tview.document.registerPostFixer( writer => {\n\t\t\tlet hasChanged = false;\n\n\t\t\tfor ( const viewRoot of view.document.roots ) {\n\t\t\t\t// `viewRoot` can be empty despite the model post-fixers if the model root was detached.\n\t\t\t\tif ( viewRoot.isEmpty ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Skip roots whose schema does not support the title structure (custom/inline root).\n\t\t\t\t// Their view root won't have the expected title+body layout.\n\t\t\t\t// A title-allowed root always has a paragraph body placeholder created by `_fixBodyElement`,\n\t\t\t\t// so the second view child is guaranteed to exist once this guard passes.\n\t\t\t\tconst modelRoot = editor.editing.mapper.toModelElement( viewRoot )!;\n\n\t\t\t\tif ( !editor.model.schema.checkChild( modelRoot, 'title' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst body = viewRoot!.getChild( 1 ) as ViewElement;\n\t\t\t\tconst oldBody = bodyViewElements.get( viewRoot.rootName );\n\n\t\t\t\t// If body element has changed we need to disable placeholder on the previous element and enable on the new one.\n\t\t\t\tif ( body !== oldBody ) {\n\t\t\t\t\tif ( oldBody ) {\n\t\t\t\t\t\thideViewPlaceholder( writer, oldBody );\n\t\t\t\t\t\twriter.removeAttribute( 'data-placeholder', oldBody );\n\t\t\t\t\t}\n\n\t\t\t\t\tconst bodyPlaceholder = editor.config.get( 'roots' )![ viewRoot.rootName ]?.placeholder ||\n\t\t\t\t\t\tisTextArea( sourceElement ) && sourceElement.getAttribute( 'placeholder' ) ||\n\t\t\t\t\t\tt( 'Type or paste your content here.' );\n\n\t\t\t\t\twriter.setAttribute( 'data-placeholder', bodyPlaceholder, body );\n\t\t\t\t\tbodyViewElements.set( viewRoot.rootName, body );\n\n\t\t\t\t\thasChanged = true;\n\t\t\t\t}\n\n\t\t\t\t// Then we need to display placeholder if it is needed.\n\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/8689.\n\t\t\t\tif ( needsViewPlaceholder( body, true ) && viewRoot!.childCount === 2 && body!.name === 'p' ) {\n\t\t\t\t\thasChanged = showViewPlaceholder( writer, body ) ? true : hasChanged;\n\t\t\t\t} else {\n\t\t\t\t\t// Or hide if it is not needed.\n\t\t\t\t\thasChanged = hideViewPlaceholder( writer, body ) ? true : hasChanged;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn hasChanged;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates navigation between the title and body sections using <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.\n\t */\n\tprivate _attachTabPressHandling() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\t// Pressing <kbd>Tab</kbd> inside the title should move the caret to the body.\n\t\teditor.keystrokes.set( 'TAB', ( data, cancel ) => {\n\t\t\tmodel.change( writer => {\n\t\t\t\tconst selection = model.document.selection;\n\t\t\t\tconst selectedElements = Array.from( selection.getSelectedBlocks() );\n\n\t\t\t\tif ( selectedElements.length === 1 && selectedElements[ 0 ].is( 'element', 'title-content' ) ) {\n\t\t\t\t\tconst root = selection.getFirstPosition()!.root;\n\t\t\t\t\tconst firstBodyElement = root.getChild( 1 );\n\n\t\t\t\t\twriter.setSelection( firstBodyElement!, 0 );\n\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// Pressing <kbd>Shift</kbd>+<kbd>Tab</kbd> at the beginning of the body should move the caret to the title.\n\t\teditor.keystrokes.set( 'SHIFT + TAB', ( data, cancel ) => {\n\t\t\tmodel.change( writer => {\n\t\t\t\tconst selection = model.document.selection;\n\n\t\t\t\tif ( !selection.isCollapsed ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst selectedElement = first( selection.getSelectedBlocks() );\n\t\t\t\tconst selectionPosition = selection.getFirstPosition()!;\n\t\t\t\tconst root = editor.model.document.getRoot( selectionPosition.root.rootName! )!;\n\n\t\t\t\t// Root does not support the title structure (custom/inline root) — no title to jump to.\n\t\t\t\tif ( !model.schema.checkChild( root, 'title' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst title = root.getChild( 0 ) as ModelElement;\n\t\t\t\tconst body = root.getChild( 1 );\n\n\t\t\t\tif ( selectedElement === body && selectionPosition.isAtStart ) {\n\t\t\t\t\twriter.setSelection( title.getChild( 0 )!, 0 );\n\n\t\t\t\t\tcancel();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n}\n\n/**\n * A view-to-model converter for the h1 that appears at the beginning of the document (a title element).\n *\n * Matches only the synthetic upcast parent named `$root` (the default generic root element). Title is not supported\n * for roots whose `modelElement` is customized, so this converter intentionally does not fire on them.\n *\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n * @param evt An object containing information about the fired event.\n * @param data An object containing conversion input, a placeholder for conversion output and possibly other values.\n * @param conversionApi Conversion interface to be used by the callback.\n */\nfunction dataViewModelH1Insertion( evt: unknown, data: UpcastConversionData<ViewElement>, conversionApi: UpcastConversionApi ) {\n\tconst modelCursor = data.modelCursor;\n\tconst viewItem = data.viewItem;\n\n\t// Testing against a literal `$root` is intentional: this converter must not fire on roots whose `modelElement`\n\t// is customized, because the Title feature only registers its schema against `$root`.\n\t// eslint-disable-next-line ckeditor5-rules/no-literal-dollar-root -- name-agnostic check would fire for unsupported custom roots\n\tif ( !modelCursor.isAtStart || !modelCursor.parent.is( 'element', '$root' ) ) {\n\t\treturn;\n\t}\n\n\tif ( !conversionApi.consumable.consume( viewItem, { name: true } ) ) {\n\t\treturn;\n\t}\n\n\tconst modelWriter = conversionApi.writer;\n\n\tconst title = modelWriter.createElement( 'title' );\n\tconst titleContent = modelWriter.createElement( 'title-content' );\n\n\tmodelWriter.append( titleContent, title );\n\tmodelWriter.insert( title, modelCursor );\n\n\tconversionApi.convertChildren( viewItem, titleContent );\n\n\tconversionApi.updateConversionResult( title, data );\n}\n\n/**\n * Maps position from the beginning of the model `title` element to the beginning of the view `h1` element.\n *\n * ```html\n * <title>^<title-content>Foo</title-content></title> -> <h1>^Foo</h1>\n * ```\n */\nfunction mapModelPositionToView( editingView: EditingView ): GetCallback<MapperModelToViewPositionEvent> {\n\treturn ( evt, data ) => {\n\t\tconst positionParent = data.modelPosition.parent;\n\n\t\tif ( !positionParent.is( 'element', 'title' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelTitleElement = positionParent.parent as ModelElement;\n\t\tconst viewElement = data.mapper.toViewElement( modelTitleElement )!;\n\n\t\tdata.viewPosition = editingView.createPositionAt( viewElement, 0 );\n\t\tevt.stop();\n\t};\n}\n\n/**\n * @returns Returns true when given element is a title. Returns false otherwise.\n */\nfunction isTitle( element: ModelElement ) {\n\treturn element.is( 'element', 'title' );\n}\n\n/**\n * Changes the given element to the title element.\n */\nfunction changeElementToTitle( element: ModelElement, writer: ModelWriter, model: Model ) {\n\tconst title = writer.createElement( 'title' );\n\n\twriter.insert( title, element, 'before' );\n\twriter.insert( element, title, 0 );\n\twriter.rename( element, 'title-content' );\n\tmodel.schema.removeDisallowedAttributes( [ element ], writer );\n}\n\n/**\n * Loops over the list of title elements and fixes additional ones.\n *\n * @returns Returns true when there was any change. Returns false otherwise.\n */\nfunction fixAdditionalTitleElements( titleElements: Array<ModelElement>, writer: ModelWriter, model: Model ) {\n\tlet hasChanged = false;\n\n\tfor ( const title of titleElements ) {\n\t\tif ( title.index !== 0 ) {\n\t\t\tfixTitleElement( title, writer, model );\n\n\t\t\thasChanged = true;\n\t\t}\n\t}\n\n\treturn hasChanged;\n}\n\n/**\n * Changes given title element to a paragraph or removes it when it is empty.\n */\nfunction fixTitleElement( title: ModelElement, writer: ModelWriter, model: Model ) {\n\tconst child = title.getChild( 0 ) as ModelElement;\n\n\t// Empty title should be removed.\n\t// It is created as a result of pasting to the title element.\n\tif ( child.isEmpty ) {\n\t\twriter.remove( title );\n\n\t\treturn;\n\t}\n\n\twriter.move( writer.createRangeOn( child ), title, 'before' );\n\twriter.rename( child, 'paragraph' );\n\twriter.remove( title );\n\tmodel.schema.removeDisallowedAttributes( [ child ], writer );\n}\n\n/**\n * Returns true when the last paragraph in the document was created only for the placeholder\n * purpose and it's not needed anymore. Returns false otherwise.\n */\nfunction shouldRemoveLastParagraph( placeholder: ModelElement, root: ModelRootElement ) {\n\tif ( !placeholder.is( 'element', 'paragraph' ) || placeholder.childCount ) {\n\t\treturn false;\n\t}\n\n\tif ( root.childCount <= 2 || root.getChild( root.childCount - 1 ) !== placeholder ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * The configuration of the {@link module:heading/title~Title title feature}.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     attachTo: document.querySelector( '#editor' ),\n *     plugins: [ Title, ... ],\n *     title: {\n *       placeholder: 'My custom placeholder for the title'\n *     },\n *     root: {\n *       placeholder: 'My custom placeholder for the body'\n *     }\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.\n */\nexport interface HeadingTitleConfig {\n\n\t/**\n\t * Defines a custom value of the placeholder for the title field.\n\t *\n\t * Read more in {@link module:heading/title~HeadingTitleConfig}.\n\t */\n\tplaceholder?: string;\n}\n\n/**\n * Returns true when given element is a DOM textarea.\n */\nfunction isTextArea( sourceElement: HTMLElement | undefined ): sourceElement is HTMLTextAreaElement {\n\treturn !!sourceElement && sourceElement.tagName.toLowerCase() === 'textarea';\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Delete } from \"@ckeditor/ckeditor5-typing\";\nimport { Enter } from \"@ckeditor/ckeditor5-enter\";\nimport { CKEditorError, FocusTracker, KeystrokeHandler, createElement, env, first, getCode, getLocalizedArrowKeyCodeDirection, global, parseKeystroke, toArray, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { _normalizeFontSizeOptions } from \"@ckeditor/ckeditor5-font\";\nimport { ClipboardPipeline } from \"@ckeditor/ckeditor5-clipboard\";\nimport { ButtonView, CollapsibleView, FocusCycler, LabeledFieldView, MenuBarMenuListItemButtonView, MenuBarMenuView, SplitButtonView, SwitchButtonView, View, ViewCollection, addKeyboardHandlingForGrid, createDropdown, createLabeledInputNumber, focusChildOnDropdownOpen } from \"@ckeditor/ckeditor5-ui\";\nimport { IconBulletedList, IconListStyleArabicIndic, IconListStyleCircle, IconListStyleDecimal, IconListStyleDecimalLeadingZero, IconListStyleDisc, IconListStyleLowerLatin, IconListStyleLowerRoman, IconListStyleSquare, IconListStyleUpperLatin, IconListStyleUpperRoman, IconNumberedList, IconTodoList } from \"@ckeditor/ckeditor5-icons\";\nimport { pick } from \"es-toolkit/compat\";\nimport { DomEventObserver, Matcher, ModelTreeWalker, getViewFillerOffset } from \"@ckeditor/ckeditor5-engine\";\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 list/list/utils/listwalker\n*/\n/**\n* Document list blocks iterator.\n*\n* @internal\n*/\nvar ListWalker = class {\n\t/**\n\t* The start list item block element.\n\t*/\n\t_startElement;\n\t/**\n\t* The reference indent. Initialized by the indent of the start block.\n\t*/\n\t_referenceIndent;\n\t/**\n\t* The iterating direction.\n\t*/\n\t_isForward;\n\t/**\n\t* Whether start block should be included in the result (if it's matching other criteria).\n\t*/\n\t_includeSelf;\n\t/**\n\t* Additional attributes that must be the same for each block.\n\t*/\n\t_sameAttributes;\n\t/**\n\t* Whether blocks with the same indent level as the start block should be included in the result.\n\t*/\n\t_sameIndent;\n\t/**\n\t* Whether blocks with a lower indent level than the start block should be included in the result.\n\t*/\n\t_lowerIndent;\n\t/**\n\t* Whether blocks with a higher indent level than the start block should be included in the result.\n\t*/\n\t_higherIndent;\n\t/**\n\t* Creates a document list iterator.\n\t*\n\t* @param startElement The start list item block element.\n\t* @param options.direction The iterating direction.\n\t* @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n\t* @param options.sameAttributes Additional attributes that must be the same for each block.\n\t* @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n\t* in the result.\n\t* @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n\t* in the result.\n\t* @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n\t* in the result.\n\t*/\n\tconstructor(startElement, options) {\n\t\tthis._startElement = startElement;\n\t\tthis._referenceIndent = startElement.getAttribute(\"listIndent\");\n\t\tthis._isForward = options.direction == \"forward\";\n\t\tthis._includeSelf = !!options.includeSelf;\n\t\tthis._sameAttributes = toArray(options.sameAttributes || []);\n\t\tthis._sameIndent = !!options.sameIndent;\n\t\tthis._lowerIndent = !!options.lowerIndent;\n\t\tthis._higherIndent = !!options.higherIndent;\n\t}\n\t/**\n\t* Performs only first step of iteration and returns the result.\n\t*\n\t* @param startElement The start list item block element.\n\t* @param options.direction The iterating direction.\n\t* @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n\t* @param options.sameAttributes Additional attributes that must be the same for each block.\n\t* @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n\t* in the result.\n\t* @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n\t* in the result.\n\t* @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n\t* in the result.\n\t*/\n\tstatic first(startElement, options) {\n\t\tconst iterator = new this(startElement, options)[Symbol.iterator]();\n\t\treturn first(iterator);\n\t}\n\t/**\n\t* Iterable interface.\n\t*/\n\t*[Symbol.iterator]() {\n\t\tconst nestedItems = [];\n\t\tfor (const { node } of new SiblingListBlocksIterator(this._getStartNode(), this._isForward ? \"forward\" : \"backward\")) {\n\t\t\tconst indent = node.getAttribute(\"listIndent\");\n\t\t\tif (indent < this._referenceIndent) {\n\t\t\t\tif (!this._lowerIndent) break;\n\t\t\t\tthis._referenceIndent = indent;\n\t\t\t} else if (indent > this._referenceIndent) {\n\t\t\t\tif (!this._higherIndent) continue;\n\t\t\t\tif (!this._isForward) {\n\t\t\t\t\tnestedItems.push(node);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!this._sameIndent) {\n\t\t\t\t\tif (this._higherIndent) {\n\t\t\t\t\t\tif (nestedItems.length) {\n\t\t\t\t\t\t\tyield* nestedItems;\n\t\t\t\t\t\t\tnestedItems.length = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (this._sameAttributes.some((attr) => node.getAttribute(attr) !== this._startElement.getAttribute(attr))) break;\n\t\t\t}\n\t\t\tif (nestedItems.length) {\n\t\t\t\tyield* nestedItems;\n\t\t\t\tnestedItems.length = 0;\n\t\t\t}\n\t\t\tyield node;\n\t\t}\n\t}\n\t/**\n\t* Returns the model element to start iterating.\n\t*/\n\t_getStartNode() {\n\t\tif (this._includeSelf) return this._startElement;\n\t\treturn this._isForward ? this._startElement.nextSibling : this._startElement.previousSibling;\n\t}\n};\n/**\n* Iterates sibling list blocks starting from the given node.\n*\n* @internal\n*/\nvar SiblingListBlocksIterator = class {\n\t_node;\n\t_isForward;\n\t_previousNodesByIndent = [];\n\t_previous = null;\n\t_previousNodeIndent = null;\n\t/**\n\t* @param node The model node.\n\t* @param direction Iteration direction.\n\t*/\n\tconstructor(node, direction = \"forward\") {\n\t\tthis._node = node;\n\t\tthis._isForward = direction === \"forward\";\n\t}\n\t[Symbol.iterator]() {\n\t\treturn this;\n\t}\n\tnext() {\n\t\tif (!isListItemBlock(this._node)) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tconst nodeIndent = this._node.getAttribute(\"listIndent\");\n\t\tlet previousNodeInList = null;\n\t\tif (this._previous) {\n\t\t\tconst previousNodeIndent = this._previousNodeIndent;\n\t\t\tif (nodeIndent > previousNodeIndent) this._previousNodesByIndent[previousNodeIndent] = this._previous;\n\t\t\telse if (nodeIndent < previousNodeIndent) {\n\t\t\t\tpreviousNodeInList = this._previousNodesByIndent[nodeIndent] || null;\n\t\t\t\tthis._previousNodesByIndent.length = nodeIndent;\n\t\t\t} else previousNodeInList = this._previous;\n\t\t}\n\t\tconst value = {\n\t\t\tnode: this._node,\n\t\t\tprevious: this._previous,\n\t\t\tpreviousNodeInList\n\t\t};\n\t\tthis._previous = this._node;\n\t\tthis._previousNodeIndent = nodeIndent;\n\t\tthis._node = this._isForward ? this._node.nextSibling : this._node.previousSibling;\n\t\treturn {\n\t\t\tvalue,\n\t\t\tdone: false\n\t\t};\n\t}\n};\n/**\n* The iterable protocol over the list elements.\n*\n* @internal\n*/\nvar ListBlocksIterable = class {\n\t_listHead;\n\t/**\n\t* @param listHead The head element of a list.\n\t*/\n\tconstructor(listHead) {\n\t\tthis._listHead = listHead;\n\t}\n\t/**\n\t* List blocks iterator.\n\t*\n\t* Iterates over all blocks of a list.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn new SiblingListBlocksIterator(this._listHead);\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* The list item ID generator.\n*\n* @internal\n*/\nvar ListItemUid = class {\n\t/**\n\t* Returns the next ID.\n\t*\n\t* @internal\n\t*/\n\t/* istanbul ignore next: static function definition -- @preserve */\n\tstatic next() {\n\t\treturn uid();\n\t}\n};\n/**\n* Returns true if the given model node is a list item block.\n*\n* @internal\n*/\nfunction isListItemBlock(node) {\n\treturn !!node && node.is(\"element\") && node.hasAttribute(\"listItemId\");\n}\n/**\n* Returns an array with all elements that represents the same list item.\n*\n* It means that values for `listIndent`, and `listItemId` for all items are equal.\n*\n* @internal\n* @param listItem Starting list item element.\n* @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n* in the result.\n*/\nfunction getAllListItemBlocks(listItem, options = {}) {\n\treturn [...getListItemBlocks(listItem, {\n\t\t...options,\n\t\tdirection: \"backward\"\n\t}), ...getListItemBlocks(listItem, {\n\t\t...options,\n\t\tdirection: \"forward\"\n\t})];\n}\n/**\n* Returns an array with elements that represents the same list item in the specified direction.\n*\n* It means that values for `listIndent` and `listItemId` for all items are equal.\n*\n* **Note**: For backward search the provided item is not included, but for forward search it is included in the result.\n*\n* @internal\n* @param listItem Starting list item element.\n* @param options.direction Walking direction.\n* @param options.higherIndent Whether blocks with a higher indent level than the start block should be included in the result.\n*/\nfunction getListItemBlocks(listItem, options = {}) {\n\tconst isForward = options.direction == \"forward\";\n\tconst items = Array.from(new ListWalker(listItem, {\n\t\t...options,\n\t\tincludeSelf: isForward,\n\t\tsameIndent: true,\n\t\tsameAttributes: \"listItemId\"\n\t}));\n\treturn isForward ? items : items.reverse();\n}\n/**\n* Returns a list items nested inside the given list item.\n*\n* @internal\n*/\nfunction getNestedListBlocks(listItem) {\n\treturn Array.from(new ListWalker(listItem, {\n\t\tdirection: \"forward\",\n\t\thigherIndent: true\n\t}));\n}\n/**\n* Returns array of all blocks/items of the same list as given block (same indent, same type and properties).\n*\n* @internal\n* @param listItem Starting list item element.\n* @param options Additional list walker options to modify the range of returned list items.\n*/\nfunction getListItems(listItem, options) {\n\tconst backwardBlocks = new ListWalker(listItem, {\n\t\tsameIndent: true,\n\t\tsameAttributes: \"listType\",\n\t\t...options\n\t});\n\tconst forwardBlocks = new ListWalker(listItem, {\n\t\tsameIndent: true,\n\t\tsameAttributes: \"listType\",\n\t\tincludeSelf: true,\n\t\tdirection: \"forward\",\n\t\t...options\n\t});\n\treturn [...Array.from(backwardBlocks).reverse(), ...forwardBlocks];\n}\n/**\n* Check if the given block is the first in the list item.\n*\n* @internal\n* @param listBlock The list block element.\n*/\nfunction isFirstBlockOfListItem(listBlock) {\n\tif (!ListWalker.first(listBlock, {\n\t\tsameIndent: true,\n\t\tsameAttributes: \"listItemId\"\n\t})) return true;\n\treturn false;\n}\n/**\n* Check if the given block is the last in the list item.\n*\n* @internal\n*/\nfunction isLastBlockOfListItem(listBlock) {\n\tif (!ListWalker.first(listBlock, {\n\t\tdirection: \"forward\",\n\t\tsameIndent: true,\n\t\tsameAttributes: \"listItemId\"\n\t})) return true;\n\treturn false;\n}\n/**\n* Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n*\n* @internal\n* @param blocks The list of selected blocks.\n* @param options.withNested Whether should include nested list items.\n*/\nfunction expandListBlocksToCompleteItems(blocks, options = {}) {\n\tblocks = toArray(blocks);\n\tconst higherIndent = options.withNested !== false;\n\tconst allBlocks = /* @__PURE__ */ new Set();\n\tfor (const block of blocks) for (const itemBlock of getAllListItemBlocks(block, { higherIndent })) allBlocks.add(itemBlock);\n\treturn sortBlocks(allBlocks);\n}\n/**\n* Expands the given list of selected blocks to include all the items of the lists they're in.\n*\n* @internal\n* @param blocks The list of selected blocks.\n*/\nfunction expandListBlocksToCompleteList(blocks) {\n\tblocks = toArray(blocks);\n\tconst allBlocks = /* @__PURE__ */ new Set();\n\tfor (const block of blocks) for (const itemBlock of getListItems(block)) allBlocks.add(itemBlock);\n\treturn sortBlocks(allBlocks);\n}\n/**\n* Splits the list item just before the provided list block.\n*\n* @internal\n* @param listBlock The list block element.\n* @param writer The model writer.\n* @returns The array of updated blocks.\n*/\nfunction splitListItemBefore(listBlock, writer) {\n\tconst blocks = getListItemBlocks(listBlock, { direction: \"forward\" });\n\tconst id = ListItemUid.next();\n\tfor (const block of blocks) writer.setAttribute(\"listItemId\", id, block);\n\treturn blocks;\n}\n/**\n* Merges the list item with the parent list item.\n*\n* @internal\n* @param listBlock The list block element.\n* @param parentBlock The list block element to merge with.\n* @param writer The model writer.\n* @returns The array of updated blocks.\n*/\nfunction mergeListItemBefore(listBlock, parentBlock, writer) {\n\tconst attributes = {};\n\tfor (const [key, value] of parentBlock.getAttributes()) if (key.startsWith(\"list\")) attributes[key] = value;\n\tconst blocks = getListItemBlocks(listBlock, { direction: \"forward\" });\n\tfor (const block of blocks) writer.setAttributes(attributes, block);\n\treturn blocks;\n}\n/**\n* Increases indentation of given list blocks.\n*\n* @internal\n* @param blocks The block or iterable of blocks.\n* @param writer The model writer.\n* @param options Additional options.\n* @param options.expand Whether should expand the list of blocks to include complete list items.\n* @param options.indentBy The number of levels the indentation should change (could be negative).\n* @param options.attributeNames List of attribute names to remove when a block leaves the list (when blockIndent < 0).\n*/\nfunction indentBlocks(blocks, writer, { expand, indentBy = 1, attributeNames }) {\n\tblocks = toArray(blocks);\n\tconst allBlocks = expand ? expandListBlocksToCompleteItems(blocks) : blocks;\n\tfor (const block of allBlocks) {\n\t\tconst blockIndent = block.getAttribute(\"listIndent\") + indentBy;\n\t\tif (blockIndent < 0) removeListAttributes(block, writer, attributeNames);\n\t\telse writer.setAttribute(\"listIndent\", blockIndent, block);\n\t}\n\treturn allBlocks;\n}\n/**\n* Decreases indentation of given list of blocks. If the indentation of some blocks matches the indentation\n* of surrounding blocks, they get merged together.\n*\n* @internal\n* @param blocks The block or iterable of blocks.\n* @param writer The model writer.\n* @param options Additional options.\n* @param options.attributeNames List of attribute names to remove when a block leaves the list (when blockIndent < 0).\n*/\nfunction outdentBlocksWithMerge(blocks, writer, { attributeNames }) {\n\tblocks = toArray(blocks);\n\tconst allBlocks = expandListBlocksToCompleteItems(blocks);\n\tconst visited = /* @__PURE__ */ new Set();\n\tconst referenceIndent = Math.min(...allBlocks.map((block) => block.getAttribute(\"listIndent\")));\n\tconst parentBlocks = /* @__PURE__ */ new Map();\n\tfor (const block of allBlocks) parentBlocks.set(block, ListWalker.first(block, { lowerIndent: true }));\n\tfor (const block of allBlocks) {\n\t\tif (visited.has(block)) continue;\n\t\tvisited.add(block);\n\t\tconst blockIndent = block.getAttribute(\"listIndent\") - 1;\n\t\tif (blockIndent < 0) {\n\t\t\tremoveListAttributes(block, writer, attributeNames);\n\t\t\tcontinue;\n\t\t}\n\t\tif (block.getAttribute(\"listIndent\") == referenceIndent && parentBlocks.get(block)) {\n\t\t\tconst mergedBlocks = mergeListItemIfNotLast(block, parentBlocks.get(block), writer);\n\t\t\tfor (const mergedBlock of mergedBlocks) visited.add(mergedBlock);\n\t\t\tif (mergedBlocks.length) continue;\n\t\t}\n\t\twriter.setAttribute(\"listIndent\", blockIndent, block);\n\t}\n\treturn sortBlocks(visited);\n}\n/**\n* Removes all list attributes from the given blocks.\n*\n* @internal\n* @param blocks The block or iterable of blocks.\n* @param writer The model writer.\n* @param attributeNames List of attribute names to remove.\n* @returns Array of altered blocks.\n*/\nfunction removeListAttributes(blocks, writer, attributeNames) {\n\tblocks = toArray(blocks);\n\tfor (const block of blocks) if (block.is(\"element\", \"listItem\")) writer.rename(block, \"paragraph\");\n\tfor (const block of blocks) for (const attributeKey of block.getAttributeKeys()) if (attributeNames.includes(attributeKey)) writer.removeAttribute(attributeKey, block);\n\treturn blocks;\n}\n/**\n* Checks whether the given blocks are related to a single list item.\n*\n* @internal\n* @param blocks The list block elements.\n*/\nfunction isSingleListItem(blocks) {\n\tif (!blocks.length) return false;\n\tconst firstItemId = blocks[0].getAttribute(\"listItemId\");\n\tif (!firstItemId) return false;\n\treturn !blocks.some((item) => item.getAttribute(\"listItemId\") != firstItemId);\n}\n/**\n* Modifies the indents of list blocks following the given list block so the indentation is valid after\n* the given block is no longer a list item.\n*\n* @internal\n* @param lastBlock The last list block that has become a non-list element.\n* @param writer The model writer.\n* @returns Array of altered blocks.\n*/\nfunction outdentFollowingItems(lastBlock, writer) {\n\tconst changedBlocks = [];\n\tlet currentIndent = Number.POSITIVE_INFINITY;\n\tfor (const { node } of new SiblingListBlocksIterator(lastBlock.nextSibling)) {\n\t\tconst indent = node.getAttribute(\"listIndent\");\n\t\tif (indent == 0) break;\n\t\tif (indent < currentIndent) currentIndent = indent;\n\t\tconst newIndent = indent - currentIndent;\n\t\twriter.setAttribute(\"listIndent\", newIndent, node);\n\t\tchangedBlocks.push(node);\n\t}\n\treturn changedBlocks;\n}\n/**\n* Returns the array of given blocks sorted by model indexes (document order).\n*\n* @internal\n*/\nfunction sortBlocks(blocks) {\n\treturn Array.from(blocks).filter((block) => block.root.rootName !== \"$graveyard\").sort((a, b) => a.index - b.index);\n}\n/**\n* Returns a selected block object. If a selected object is inline or when there is no selected\n* object, `null` is returned.\n*\n* @internal\n* @param model The instance of editor model.\n* @returns Selected block object or `null`.\n*/\nfunction getSelectedBlockObject(model) {\n\tconst selectedElement = model.document.selection.getSelectedElement();\n\tif (!selectedElement) return null;\n\tif (model.schema.isObject(selectedElement) && model.schema.isBlock(selectedElement)) return selectedElement;\n\treturn null;\n}\n/**\n* Checks whether the given block can be replaced by a listItem.\n*\n* Note that this is possible only when multiBlock = false option is set in feature config.\n*\n* @param block A block to be tested.\n* @param schema The schema of the document.\n* @internal\n*/\nfunction canBecomeSimpleListItem(block, schema) {\n\treturn schema.checkChild(block.parent, \"listItem\") && schema.checkChild(block, \"$text\") && !schema.isObject(block);\n}\n/**\n* Returns true if listType is of type `numbered` or `customNumbered`.\n*\n* @internal\n*/\nfunction isNumberedListType(listType) {\n\treturn listType == \"numbered\" || listType == \"customNumbered\";\n}\n/**\n* Checks if the given list item block is the first block of the first item in its list at the given indent.\n*\n* Walks back over previous siblings and returns:\n* - `true` if it reaches a non-list block or a list block at a lower indent (a new list begins here),\n* - `false` if it finds a same-indent block of the same `listItemId` (a continuation of the current item) or of the same\n*   `listType` (the visible list already has earlier items),\n* - `true` if it finds a same-indent block of a different `listType` and a different `listItemId` (a different list ends; ours\n*   starts here),\n* - `false` if the loop ends (it reaches the first non-list-item block, or no more previous siblings) while passing only\n*   higher-indent blocks (those blocks live inside an intermediate skip-level `<li style=\"list-style-type:none\">` wrapper\n*   at our indent).\n*\n* For example, in the model:\n*\n* ```\n* '  # aaa'\n* '# bbb'\n* ```\n*\n* `bbb` is preceded by a higher-indent block `aaa`, which in the view is rendered inside an intermediate\n* skip-level wrapper at indent 0:\n*\n* ```html\n* <ol>\n*   <li style=\"list-style-type:none\">\n*     <ol>\n*       <li>aaa</li>\n*     </ol>\n*   </li>\n*   <li>bbb</li>\n* </ol>\n* ```\n*\n* So `bbb` is the second visible item in the outer list and the function returns `false`.\n*/\nfunction isFirstListItemInList(listItem) {\n\tconst itemIndent = listItem.getAttribute(\"listIndent\");\n\tconst itemListType = listItem.getAttribute(\"listType\");\n\tconst itemListItemId = listItem.getAttribute(\"listItemId\");\n\tlet previous = listItem.previousSibling;\n\tlet sawHigherIndent = false;\n\twhile (isListItemBlock(previous)) {\n\t\tconst previousIndent = previous.getAttribute(\"listIndent\");\n\t\tif (previousIndent < itemIndent) return true;\n\t\tif (previousIndent === itemIndent) {\n\t\t\tif (previous.getAttribute(\"listItemId\") === itemListItemId) return false;\n\t\t\treturn previous.getAttribute(\"listType\") !== itemListType;\n\t\t}\n\t\tsawHigherIndent = true;\n\t\tprevious = previous.previousSibling;\n\t}\n\treturn !sawHigherIndent;\n}\n/**\n* Merges a given block to the given parent block if parent is a list item and there is no more blocks in the same item.\n*/\nfunction mergeListItemIfNotLast(block, parentBlock, writer) {\n\tif (getListItemBlocks(parentBlock, { direction: \"forward\" }).pop().index > block.index) return mergeListItemBefore(block, parentBlock, writer);\n\treturn [];\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 list/list/listindentcommand\n*/\n/**\n* The document list indent command. It is used by the {@link module:list/list~List list feature}.\n*/\nvar ListIndentCommand = class extends Command {\n\t/**\n\t* Determines by how much the command will change the list item's indent attribute.\n\t*/\n\t_direction;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param indentDirection The direction of indent. If it is equal to `backward`, the command\n\t* will outdent a list item.\n\t*/\n\tconstructor(editor, indentDirection) {\n\t\tsuper(editor);\n\t\tthis._direction = indentDirection;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.\n\t*\n\t* @fires execute\n\t* @fires afterExecute\n\t*/\n\texecute() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst blocks = getSelectedListBlocks(model.document.selection);\n\t\tconst attributeNames = editor.plugins.get(\"ListEditing\").getListAttributeNames();\n\t\tmodel.change((writer) => {\n\t\t\tconst changedBlocks = [];\n\t\t\tif (isSingleListItem(blocks) && !isFirstBlockOfListItem(blocks[0])) {\n\t\t\t\tif (this._direction == \"forward\") changedBlocks.push(...indentBlocks(blocks, writer, { attributeNames }));\n\t\t\t\tchangedBlocks.push(...splitListItemBefore(blocks[0], writer));\n\t\t\t} else if (this._direction == \"forward\") changedBlocks.push(...indentBlocks(blocks, writer, {\n\t\t\t\texpand: true,\n\t\t\t\tattributeNames\n\t\t\t}));\n\t\t\telse changedBlocks.push(...outdentBlocksWithMerge(blocks, writer, { attributeNames }));\n\t\t\tfor (const block of changedBlocks) {\n\t\t\t\tif (!block.hasAttribute(\"listType\")) continue;\n\t\t\t\tconst previousItemBlock = ListWalker.first(block, { sameIndent: true });\n\t\t\t\tif (previousItemBlock) writer.setAttribute(\"listType\", previousItemBlock.getAttribute(\"listType\"), block);\n\t\t\t}\n\t\t\tthis._fireAfterExecute(changedBlocks);\n\t\t});\n\t}\n\t/**\n\t* Fires the `afterExecute` event.\n\t*\n\t* @param changedBlocks The changed list elements.\n\t*/\n\t_fireAfterExecute(changedBlocks) {\n\t\tthis.fire(\"afterExecute\", sortBlocks(new Set(changedBlocks)));\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tlet blocks = getSelectedListBlocks(this.editor.model.document.selection);\n\t\tlet firstBlock = blocks[0];\n\t\tif (!firstBlock) return false;\n\t\tif (this._direction == \"backward\") return true;\n\t\tif (isSingleListItem(blocks) && !isFirstBlockOfListItem(blocks[0])) return true;\n\t\tif (this.editor.config.get(\"list.enableSkipLevelLists\")) return true;\n\t\tblocks = expandListBlocksToCompleteItems(blocks);\n\t\tfirstBlock = blocks[0];\n\t\tconst siblingItem = ListWalker.first(firstBlock, { sameIndent: true });\n\t\tif (!siblingItem) return false;\n\t\tif (siblingItem.getAttribute(\"listType\") == firstBlock.getAttribute(\"listType\")) return true;\n\t\treturn false;\n\t}\n};\n/**\n* Returns an array of selected blocks truncated to the first non list block element.\n*/\nfunction getSelectedListBlocks(selection) {\n\tconst blocks = Array.from(selection.getSelectedBlocks());\n\tconst firstNonListBlockIndex = blocks.findIndex((block) => !isListItemBlock(block));\n\tif (firstNonListBlockIndex != -1) blocks.length = firstNonListBlockIndex;\n\treturn blocks;\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* The list command. It is used by the {@link module:list/list~List list feature}.\n*/\nvar ListCommand = class extends Command {\n\t/**\n\t* The type of the list created by the command.\n\t*/\n\ttype;\n\t/**\n\t* List Walker options that change the range of the list items to be changed when the selection is collapsed within a list item.\n\t*\n\t* In a multi-level list, when the selection is collapsed within a list item, instead of changing only the list items of the same list\n\t* type and current indent level, the entire list structure is changed (all list items at all indent levels of any list type).\n\t*/\n\t_listWalkerOptions;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param type List type that will be handled by this command.\n\t*/\n\tconstructor(editor, type, options = {}) {\n\t\tsuper(editor);\n\t\tthis.type = type;\n\t\tthis._listWalkerOptions = options.multiLevel ? {\n\t\t\thigherIndent: true,\n\t\t\tlowerIndent: true,\n\t\t\tsameAttributes: []\n\t\t} : void 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Executes the list command.\n\t*\n\t* @fires execute\n\t* @fires afterExecute\n\t* @param options Command options.\n\t* @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the\n\t* selected items and potentially the neighbor elements to the proper list items. If set to `false` it will convert selected elements\n\t* to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.\n\t* @param options.additionalAttributes Additional attributes that are set for list items when the command is executed.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selectedBlockObject = getSelectedBlockObject(model);\n\t\tconst blocks = Array.from(document.selection.getSelectedBlocks()).filter((block) => model.schema.checkAttribute(block, \"listType\") || canBecomeSimpleListItem(block, model.schema));\n\t\tconst turnOff = options.forceValue !== void 0 ? !options.forceValue : this.value;\n\t\tmodel.change((writer) => {\n\t\t\tif (turnOff) {\n\t\t\t\tconst lastBlock = blocks[blocks.length - 1];\n\t\t\t\tconst attributeNames = this.editor.plugins.get(\"ListEditing\").getListAttributeNames();\n\t\t\t\tconst itemBlocks = getListItemBlocks(lastBlock, { direction: \"forward\" });\n\t\t\t\tconst changedBlocks = [];\n\t\t\t\tif (itemBlocks.length > 1) changedBlocks.push(...splitListItemBefore(itemBlocks[1], writer));\n\t\t\t\tchangedBlocks.push(...removeListAttributes(blocks, writer, attributeNames));\n\t\t\t\tchangedBlocks.push(...outdentFollowingItems(lastBlock, writer));\n\t\t\t\tthis._fireAfterExecute(changedBlocks);\n\t\t\t} else if ((selectedBlockObject || document.selection.isCollapsed) && isListItemBlock(blocks[0])) {\n\t\t\t\tconst changedBlocks = getListItems(selectedBlockObject || blocks[0], this._listWalkerOptions);\n\t\t\t\tfor (const block of changedBlocks) writer.setAttributes({\n\t\t\t\t\t...options.additionalAttributes,\n\t\t\t\t\tlistType: this.type\n\t\t\t\t}, block);\n\t\t\t\tthis._fireAfterExecute(changedBlocks);\n\t\t\t} else {\n\t\t\t\tconst changedBlocks = [];\n\t\t\t\tfor (const block of blocks) if (!block.hasAttribute(\"listType\")) {\n\t\t\t\t\tif (!block.is(\"element\", \"listItem\") && canBecomeSimpleListItem(block, model.schema)) writer.rename(block, \"listItem\");\n\t\t\t\t\twriter.setAttributes({\n\t\t\t\t\t\t...options.additionalAttributes,\n\t\t\t\t\t\tlistIndent: 0,\n\t\t\t\t\t\tlistItemId: ListItemUid.next(),\n\t\t\t\t\t\tlistType: this.type\n\t\t\t\t\t}, block);\n\t\t\t\t\tchangedBlocks.push(block);\n\t\t\t\t} else for (const node of expandListBlocksToCompleteItems(block, { withNested: false })) if (node.getAttribute(\"listType\") != this.type) {\n\t\t\t\t\twriter.setAttributes({\n\t\t\t\t\t\t...options.additionalAttributes,\n\t\t\t\t\t\tlistType: this.type\n\t\t\t\t\t}, node);\n\t\t\t\t\tchangedBlocks.push(node);\n\t\t\t\t}\n\t\t\t\tthis._fireAfterExecute(changedBlocks);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Fires the `afterExecute` event.\n\t*\n\t* @param changedBlocks The changed list elements.\n\t*/\n\t_fireAfterExecute(changedBlocks) {\n\t\tthis.fire(\"afterExecute\", sortBlocks(new Set(changedBlocks)));\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst blocks = Array.from(selection.getSelectedBlocks());\n\t\tif (!blocks.length) return false;\n\t\tfor (const block of blocks) if (block.getAttribute(\"listType\") != this.type) return false;\n\t\treturn true;\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\t\tconst blocks = Array.from(selection.getSelectedBlocks());\n\t\tif (!blocks.length) return false;\n\t\tif (this.value) return true;\n\t\tfor (const block of blocks) if (schema.checkAttribute(block, \"listType\") || canBecomeSimpleListItem(block, schema)) return true;\n\t\treturn false;\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 list/list/listmergecommand\n*/\n/**\n* The document list merge command. It is used by the {@link module:list/list~List list feature}.\n*/\nvar ListMergeCommand = class extends Command {\n\t/**\n\t* Whether list item should be merged before or after the selected block.\n\t*/\n\t_direction;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param direction Whether list item should be merged before or after the selected block.\n\t*/\n\tconstructor(editor, direction) {\n\t\tsuper(editor);\n\t\tthis._direction = direction;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Merges list blocks together (depending on the {@link #constructor}'s `direction` parameter).\n\t*\n\t* @fires execute\n\t* @fires afterExecute\n\t* @param options Command options.\n\t* @param options.shouldMergeOnBlocksContentLevel When set `true`, merging will be performed together\n\t* with {@link module:engine/model/model~Model#deleteContent} to get rid of the inline content in the selection or take advantage\n\t* of the heuristics in `deleteContent()` that helps convert lists into paragraphs in certain cases.\n\t*/\n\texecute({ shouldMergeOnBlocksContentLevel = false } = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst changedBlocks = [];\n\t\tconst attributeNames = editor.plugins.get(\"ListEditing\").getListAttributeNames();\n\t\tmodel.change((writer) => {\n\t\t\tconst { firstElement, lastElement } = this._getMergeSubjectElements(selection, shouldMergeOnBlocksContentLevel);\n\t\t\tif (!firstElement || !lastElement) return;\n\t\t\tconst firstIndent = firstElement.getAttribute(\"listIndent\") || 0;\n\t\t\tconst lastIndent = lastElement.getAttribute(\"listIndent\");\n\t\t\tconst lastElementId = lastElement.getAttribute(\"listItemId\");\n\t\t\tif (firstIndent != lastIndent) {\n\t\t\t\tconst nestedLastElementBlocks = getNestedListBlocks(lastElement);\n\t\t\t\tchangedBlocks.push(...indentBlocks([lastElement, ...nestedLastElementBlocks], writer, {\n\t\t\t\t\tindentBy: firstIndent - lastIndent,\n\t\t\t\t\texpand: firstIndent < lastIndent,\n\t\t\t\t\tattributeNames\n\t\t\t\t}));\n\t\t\t}\n\t\t\tif (shouldMergeOnBlocksContentLevel) {\n\t\t\t\tlet sel = selection;\n\t\t\t\tif (selection.isCollapsed) sel = writer.createSelection(writer.createRange(writer.createPositionAt(firstElement, \"end\"), writer.createPositionAt(lastElement, 0)));\n\t\t\t\tmodel.deleteContent(sel, { doNotResetEntireContent: selection.isCollapsed });\n\t\t\t\tconst lastElementAfterDelete = sel.getLastPosition().parent;\n\t\t\t\tconst nextSibling = lastElementAfterDelete.nextSibling;\n\t\t\t\tchangedBlocks.push(lastElementAfterDelete);\n\t\t\t\tif (nextSibling && nextSibling !== lastElement && nextSibling.getAttribute(\"listItemId\") == lastElementId) changedBlocks.push(...mergeListItemBefore(nextSibling, lastElementAfterDelete, writer));\n\t\t\t} else changedBlocks.push(...mergeListItemBefore(lastElement, firstElement, writer));\n\t\t\tthis._fireAfterExecute(changedBlocks);\n\t\t});\n\t}\n\t/**\n\t* Fires the `afterExecute` event.\n\t*\n\t* @param changedBlocks The changed list elements.\n\t*/\n\t_fireAfterExecute(changedBlocks) {\n\t\tthis.fire(\"afterExecute\", sortBlocks(new Set(changedBlocks)));\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedBlockObject = getSelectedBlockObject(model);\n\t\tif (selection.isCollapsed || selectedBlockObject) {\n\t\t\tconst positionParent = selectedBlockObject || selection.getFirstPosition().parent;\n\t\t\tif (!isListItemBlock(positionParent)) return false;\n\t\t\tconst siblingNode = this._direction == \"backward\" ? positionParent.previousSibling : positionParent.nextSibling;\n\t\t\tif (!siblingNode) return false;\n\t\t\tif (isSingleListItem([positionParent, siblingNode])) return false;\n\t\t} else {\n\t\t\tconst lastPosition = selection.getLastPosition();\n\t\t\tconst firstPosition = selection.getFirstPosition();\n\t\t\tif (lastPosition.parent === firstPosition.parent) return false;\n\t\t\tif (!isListItemBlock(lastPosition.parent)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Returns the boundary elements the merge should be executed for. These are not necessarily selection's first\n\t* and last position parents but sometimes sibling or even further blocks depending on the context.\n\t*\n\t* @param selection The selection the merge is executed for.\n\t* @param shouldMergeOnBlocksContentLevel When `true`, merge is performed together with\n\t* {@link module:engine/model/model~Model#deleteContent} to remove the inline content within the selection.\n\t*/\n\t_getMergeSubjectElements(selection, shouldMergeOnBlocksContentLevel) {\n\t\tconst model = this.editor.model;\n\t\tconst selectedBlockObject = getSelectedBlockObject(model);\n\t\tlet firstElement, lastElement;\n\t\tif (selection.isCollapsed || selectedBlockObject) {\n\t\t\tconst positionParent = selectedBlockObject || selection.getFirstPosition().parent;\n\t\t\tconst isFirstBlock = isFirstBlockOfListItem(positionParent);\n\t\t\tif (this._direction == \"backward\") {\n\t\t\t\tlastElement = positionParent;\n\t\t\t\tif (isFirstBlock && !shouldMergeOnBlocksContentLevel) {\n\t\t\t\t\tfirstElement = ListWalker.first(positionParent, {\n\t\t\t\t\t\tsameIndent: true,\n\t\t\t\t\t\tlowerIndent: true\n\t\t\t\t\t});\n\t\t\t\t\tif (!firstElement && isListItemBlock(positionParent.previousSibling)) firstElement = positionParent.previousSibling;\n\t\t\t\t} else firstElement = positionParent.previousSibling;\n\t\t\t} else {\n\t\t\t\tfirstElement = positionParent;\n\t\t\t\tlastElement = positionParent.nextSibling;\n\t\t\t}\n\t\t} else {\n\t\t\tfirstElement = selection.getFirstPosition().parent;\n\t\t\tlastElement = selection.getLastPosition().parent;\n\t\t}\n\t\treturn {\n\t\t\tfirstElement,\n\t\t\tlastElement\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* The document list split command that splits the list item at the selection.\n*\n* It is used by the {@link module:list/list~List list feature}.\n*/\nvar ListSplitCommand = class extends Command {\n\t/**\n\t* Whether list item should be split before or after the selected block.\n\t*/\n\t_direction;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param direction Whether list item should be split before or after the selected block.\n\t*/\n\tconstructor(editor, direction) {\n\t\tsuper(editor);\n\t\tthis._direction = direction;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Splits the list item at the selection.\n\t*\n\t* @fires execute\n\t* @fires afterExecute\n\t*/\n\texecute() {\n\t\tthis.editor.model.change((writer) => {\n\t\t\tconst changedBlocks = splitListItemBefore(this._getStartBlock(), writer);\n\t\t\tthis._fireAfterExecute(changedBlocks);\n\t\t});\n\t}\n\t/**\n\t* Fires the `afterExecute` event.\n\t*\n\t* @param changedBlocks The changed list elements.\n\t*/\n\t_fireAfterExecute(changedBlocks) {\n\t\tthis.fire(\"afterExecute\", sortBlocks(new Set(changedBlocks)));\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst block = this._getStartBlock();\n\t\treturn selection.isCollapsed && isListItemBlock(block) && !isFirstBlockOfListItem(block);\n\t}\n\t/**\n\t* Returns the model element that is the main focus of the command (according to the current selection and command direction).\n\t*/\n\t_getStartBlock() {\n\t\tconst positionParent = this.editor.model.document.selection.getFirstPosition().parent;\n\t\treturn this._direction == \"before\" ? positionParent : positionParent.nextSibling;\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 list/listformatting/listitemboldintegration\n*/\n/**\n* The list item bold integration plugin.\n*/\nvar ListItemBoldIntegration = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListItemBoldIntegration\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting = editor.plugins.get(\"ListFormatting\");\n\t\tconst listEditing = editor.plugins.get(ListEditing);\n\t\tif (!editor.plugins.has(\"BoldEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tListFormatting.registerFormatAttribute(\"bold\", \"listItemBold\");\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope: \"item\",\n\t\t\tattributeName: \"listItemBold\",\n\t\t\tsetAttributeOnDowncast(writer, value, viewElement, options) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif (value) {\n\t\t\t\t\twriter.addClass(\"ck-list-marker-bold\", viewElement);\n\t\t\t\t\tif (env.isSafari && !(options && options.dataPipeline)) writer.setStyle(\"--ck-content-list-marker-dummy-bold\", \"0\", viewElement);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tif (!editor.plugins.has(\"BoldEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tmodel.schema.extend(\"$listItem\", { allowAttributes: \"listItemBold\" });\n\t\tmodel.schema.setAttributeProperties(\"listItemBold\", { isFormatting: true });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (!context.last.getAttribute(\"listItemId\")) return false;\n\t\t}, \"listItemBold\");\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tmodel: \"listItemBold\",\n\t\t\tview: {\n\t\t\t\tname: \"li\",\n\t\t\t\tclasses: \"ck-list-marker-bold\"\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 list/listformatting/listitemitalicintegration\n*/\n/**\n* The list item italic integration plugin.\n*/\nvar ListItemItalicIntegration = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListItemItalicIntegration\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting = editor.plugins.get(\"ListFormatting\");\n\t\tconst listEditing = editor.plugins.get(ListEditing);\n\t\tif (!editor.plugins.has(\"ItalicEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tListFormatting.registerFormatAttribute(\"italic\", \"listItemItalic\");\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope: \"item\",\n\t\t\tattributeName: \"listItemItalic\",\n\t\t\tsetAttributeOnDowncast(writer, value, viewElement, options) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif (value) {\n\t\t\t\t\twriter.addClass(\"ck-list-marker-italic\", viewElement);\n\t\t\t\t\tif (env.isSafari && !(options && options.dataPipeline)) writer.setStyle(\"--ck-content-list-marker-dummy-italic\", \"0\", viewElement);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tif (!editor.plugins.has(\"ItalicEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tmodel.schema.extend(\"$listItem\", { allowAttributes: \"listItemItalic\" });\n\t\tmodel.schema.setAttributeProperties(\"listItemItalic\", { isFormatting: true });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (!context.last.getAttribute(\"listItemId\")) return false;\n\t\t}, \"listItemItalic\");\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tmodel: \"listItemItalic\",\n\t\t\tview: {\n\t\t\t\tname: \"li\",\n\t\t\t\tclasses: \"ck-list-marker-italic\"\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 list/listformatting/listitemfontsizeintegration\n*/\n/**\n* The list item font size integration plugin.\n*/\nvar ListItemFontSizeIntegration = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListItemFontSizeIntegration\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting = editor.plugins.get(\"ListFormatting\");\n\t\tconst listEditing = editor.plugins.get(ListEditing);\n\t\tif (!editor.plugins.has(\"FontSizeEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tconst normalizedFontSizeOptions = _normalizeFontSizeOptions(editor.config.get(\"fontSize.options\"));\n\t\tListFormatting.registerFormatAttribute(\"fontSize\", \"listItemFontSize\");\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope: \"item\",\n\t\t\tattributeName: \"listItemFontSize\",\n\t\t\tsetAttributeOnDowncast(writer, value, viewElement, options) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif (value) {\n\t\t\t\t\tconst fontSizeOption = normalizedFontSizeOptions.find((option) => option.model == value);\n\t\t\t\t\tif (fontSizeOption && fontSizeOption.view && typeof fontSizeOption.view != \"string\") {\n\t\t\t\t\t\tif (fontSizeOption.view.styles) {\n\t\t\t\t\t\t\twriter.addClass(\"ck-list-marker-font-size\", viewElement);\n\t\t\t\t\t\t\twriter.setStyle(\"--ck-content-list-marker-font-size\", fontSizeOption.view.styles[\"font-size\"], viewElement);\n\t\t\t\t\t\t} else if (fontSizeOption.view.classes) {\n\t\t\t\t\t\t\twriter.addClass(`ck-list-marker-font-size-${value}`, viewElement);\n\t\t\t\t\t\t\tif (env.isSafari && !(options && options.dataPipeline)) writer.setStyle(\"--ck-content-list-marker-dummy-font-size\", \"0\", viewElement);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.addClass(\"ck-list-marker-font-size\", viewElement);\n\t\t\t\t\t\twriter.setStyle(\"--ck-content-list-marker-font-size\", value, viewElement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tif (!editor.plugins.has(\"FontSizeEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tmodel.schema.extend(\"$listItem\", { allowAttributes: \"listItemFontSize\" });\n\t\tmodel.schema.setAttributeProperties(\"listItemFontSize\", { isFormatting: true });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (!context.last.getAttribute(\"listItemId\")) return false;\n\t\t}, \"listItemFontSize\");\n\t\teditor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: \"listItemFontSize\",\n\t\t\t\tvalue: (viewElement) => viewElement.getStyle(\"--ck-content-list-marker-font-size\")\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: \"li\",\n\t\t\t\tclasses: \"ck-list-marker-font-size\",\n\t\t\t\tstyles: { \"--ck-content-list-marker-font-size\": /.*/ }\n\t\t\t}\n\t\t});\n\t\tconst fontSizeOptions = _normalizeFontSizeOptions(editor.config.get(\"fontSize.options\"));\n\t\tfor (const option of fontSizeOptions)\n /* v8 ignore next -- Normalized font size options used by the integration provide model and view values. */\n\t\tif (option.model && option.view) editor.conversion.for(\"upcast\").elementToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: \"listItemFontSize\",\n\t\t\t\tvalue: option.model\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: \"li\",\n\t\t\t\tclasses: `ck-list-marker-font-size-${option.model}`\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 list/listformatting/listitemfontcolorintegration\n*/\n/**\n* The list item font color integration plugin.\n*/\nvar ListItemFontColorIntegration = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListItemFontColorIntegration\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting = editor.plugins.get(\"ListFormatting\");\n\t\tconst listEditing = editor.plugins.get(ListEditing);\n\t\tif (!editor.plugins.has(\"FontColorEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tListFormatting.registerFormatAttribute(\"fontColor\", \"listItemFontColor\");\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope: \"item\",\n\t\t\tattributeName: \"listItemFontColor\",\n\t\t\tsetAttributeOnDowncast(writer, value, viewElement) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif (value) {\n\t\t\t\t\twriter.addClass(\"ck-list-marker-color\", viewElement);\n\t\t\t\t\twriter.setStyle(\"--ck-content-list-marker-color\", value, viewElement);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tif (!editor.plugins.has(\"FontColorEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tmodel.schema.extend(\"$listItem\", { allowAttributes: \"listItemFontColor\" });\n\t\tmodel.schema.setAttributeProperties(\"listItemFontColor\", { isFormatting: true });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (!context.last.getAttribute(\"listItemId\")) return false;\n\t\t}, \"listItemFontColor\");\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: \"listItemFontColor\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\treturn viewElement.getStyle(\"--ck-content-list-marker-color\");\n\t\t\t\t}\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: \"li\",\n\t\t\t\tclasses: \"ck-list-marker-color\",\n\t\t\t\tstyles: { \"--ck-content-list-marker-color\": /.*/ }\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 list/listformatting/listitemfontfamilyintegration\n*/\n/**\n* The list item font family integration plugin.\n*/\nvar ListItemFontFamilyIntegration = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListItemFontFamilyIntegration\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting = editor.plugins.get(\"ListFormatting\");\n\t\tconst listEditing = editor.plugins.get(ListEditing);\n\t\tif (!editor.plugins.has(\"FontFamilyEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tListFormatting.registerFormatAttribute(\"fontFamily\", \"listItemFontFamily\");\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope: \"item\",\n\t\t\tattributeName: \"listItemFontFamily\",\n\t\t\tsetAttributeOnDowncast(writer, value, viewElement) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif (value) {\n\t\t\t\t\twriter.addClass(\"ck-list-marker-font-family\", viewElement);\n\t\t\t\t\twriter.setStyle(\"--ck-content-list-marker-font-family\", value, viewElement);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tif (!editor.plugins.has(\"FontFamilyEditing\") || !this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tmodel.schema.extend(\"$listItem\", { allowAttributes: \"listItemFontFamily\" });\n\t\tmodel.schema.setAttributeProperties(\"listItemFontFamily\", { isFormatting: true });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (!context.last.getAttribute(\"listItemId\")) return false;\n\t\t}, \"listItemFontFamily\");\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: \"listItemFontFamily\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\treturn viewElement.getStyle(\"--ck-content-list-marker-font-family\");\n\t\t\t\t}\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: \"li\",\n\t\t\t\tclasses: \"ck-list-marker-font-family\",\n\t\t\t\tstyles: { \"--ck-content-list-marker-font-family\": /.*/ }\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 list/listformatting\n*/\n/**\n* The list formatting plugin.\n*\n* It enables integration with formatting plugins to style the list marker.\n* The list marker is styled based on the consistent formatting applied to the content of the list item.\n*\n* The list of supported formatting plugins includes:\n* * Font color.\n* * Font size.\n* * Font family.\n* * Bold.\n* * Italic.\n*/\nvar ListFormatting = class extends Plugin {\n\t/**\n\t* The list of loaded formatting.\n\t*/\n\t_loadedFormatting = {};\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListFormatting\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tListItemBoldIntegration,\n\t\t\tListItemItalicIntegration,\n\t\t\tListItemFontSizeIntegration,\n\t\t\tListItemFontColorIntegration,\n\t\t\tListItemFontFamilyIntegration\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"list.enableListItemMarkerFormatting\", true);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tif (!this.editor.config.get(\"list.enableListItemMarkerFormatting\")) return;\n\t\tthis._registerPostfixerForListItemFormatting();\n\t}\n\t/**\n\t* Registers a postfixer that ensures that the list item formatting attribute is consistent with the formatting\n\t* applied to the content of the list item.\n\t*/\n\t_registerPostfixerForListItemFormatting() {\n\t\tconst model = this.editor.model;\n\t\tmodel.document.registerPostFixer((writer) => {\n\t\t\tconst changes = model.document.differ.getChanges();\n\t\t\tconst modifiedListItems = /* @__PURE__ */ new Set();\n\t\t\tlet returnValue = false;\n\t\t\tfor (const entry of changes) if (entry.type === \"attribute\") {\n\t\t\t\tif (entry.attributeKey == \"listItemId\" || entry.attributeKey == \"listType\" || this._isInlineOrSelectionFormatting(entry.attributeKey) || Object.values(this._loadedFormatting).includes(entry.attributeKey)) {\n\t\t\t\t\tif (isListItemBlock(entry.range.start.nodeAfter)) modifiedListItems.add(entry.range.start.nodeAfter);\n\t\t\t\t\telse if (isListItemBlock(entry.range.start.parent)) modifiedListItems.add(entry.range.start.parent);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (isListItemBlock(entry.position.nodeAfter)) modifiedListItems.add(entry.position.nodeAfter);\n\t\t\t\tif (isListItemBlock(entry.position.nodeBefore)) modifiedListItems.add(entry.position.nodeBefore);\n\t\t\t\tif (isListItemBlock(entry.position.parent)) modifiedListItems.add(entry.position.parent);\n\t\t\t\tif (entry.type == \"insert\" && entry.name != \"$text\") {\n\t\t\t\t\tconst range = writer.createRangeIn(entry.position.nodeAfter);\n\t\t\t\t\tfor (const item of range.getItems()) if (isListItemBlock(item)) modifiedListItems.add(item);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const listItem of modifiedListItems) {\n\t\t\t\tconst formats = getListItemConsistentFormat(model, listItem, Object.keys(this._loadedFormatting));\n\t\t\t\tfor (const [formatAttributeName, formatValue] of Object.entries(formats)) {\n\t\t\t\t\tconst listItemFormatAttributeName = this._loadedFormatting[formatAttributeName];\n\t\t\t\t\tif (formatValue && setFormattingToListItem(writer, listItem, listItemFormatAttributeName, formatValue)) returnValue = true;\n\t\t\t\t\telse if (!formatValue && removeFormattingFromListItem(writer, listItem, listItemFormatAttributeName)) returnValue = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn returnValue;\n\t\t});\n\t}\n\t/**\n\t* Registers an integration between a default attribute (e.g., `fontFamily`) and a new attribute\n\t* intended specifically for list item elements (e.g., `listItemFontFamily`).\n\t*\n\t* These attributes are later used by the postfixer logic to determine whether to add the new attribute\n\t* to the list item element, based on whether there is a consistent default formatting attribute\n\t* applied within its content.\n\t*/\n\tregisterFormatAttribute(formatAttribute, listItemFormatAttribute) {\n\t\tthis._loadedFormatting[formatAttribute] = listItemFormatAttribute;\n\t}\n\t/**\n\t* Returns true if the given model attribute name is a supported inline formatting attribute.\n\t*/\n\t_isInlineOrSelectionFormatting(attributeKey) {\n\t\treturn attributeKey.replace(/^selection:/, \"\") in this._loadedFormatting;\n\t}\n};\n/**\n* Returns the consistent format of the list item element.\n* If the list item contains multiple blocks, it checks only the first block.\n*/\nfunction getListItemConsistentFormat(model, listItem, attributeKeys) {\n\tif (isFirstBlockOfListItem(listItem)) return getSingleListItemConsistentFormat(model, listItem, attributeKeys);\n\treturn getSingleListItemConsistentFormat(model, getAllListItemBlocks(listItem)[0], attributeKeys);\n}\n/**\n* Returns the consistent format of a single list item element.\n*/\nfunction getSingleListItemConsistentFormat(model, listItem, attributeKeys) {\n\tif (!isNumberedOrBulletedList(listItem) || model.schema.isLimit(listItem)) return Object.fromEntries(attributeKeys.map((attributeKey) => [attributeKey]));\n\tif (listItem.isEmpty) return Object.fromEntries(attributeKeys.map((attributeKey) => [attributeKey, listItem.getAttribute(`selection:${attributeKey}`)]));\n\tconst attributesToCheck = new Set(attributeKeys);\n\tconst valuesMap = {};\n\tconst walker = model.createRangeIn(listItem).getWalker({ ignoreElementEnd: true });\n\tfor (const { item } of walker) {\n\t\tfor (const attributeKey of attributesToCheck) if (model.schema.checkAttribute(item, attributeKey)) {\n\t\t\tconst formatAttribute = item.getAttribute(attributeKey);\n\t\t\tif (formatAttribute === void 0) {\n\t\t\t\tattributesToCheck.delete(attributeKey);\n\t\t\t\tvaluesMap[attributeKey] = void 0;\n\t\t\t} else if (valuesMap[attributeKey] === void 0) valuesMap[attributeKey] = formatAttribute;\n\t\t\telse if (valuesMap[attributeKey] !== formatAttribute) {\n\t\t\t\tattributesToCheck.delete(attributeKey);\n\t\t\t\tvaluesMap[attributeKey] = void 0;\n\t\t\t}\n\t\t} else if (!(attributeKey in valuesMap)) valuesMap[attributeKey] = void 0;\n\t\tif (!attributesToCheck.size) break;\n\t\tif (model.schema.isLimit(item)) walker.jumpTo(model.createPositionAfter(item));\n\t}\n\treturn valuesMap;\n}\n/**\n* Adds the specified formatting attribute to the list item element.\n*/\nfunction setFormattingToListItem(writer, listItem, attributeKey, attributeValue) {\n\tconst listItemBlocks = getAllListItemBlocks(listItem);\n\tlet wasChanged = false;\n\tfor (const listItem of listItemBlocks) if (!listItem.hasAttribute(attributeKey) || listItem.getAttribute(attributeKey) !== attributeValue) {\n\t\twriter.setAttribute(attributeKey, attributeValue, listItem);\n\t\twasChanged = true;\n\t}\n\treturn wasChanged;\n}\n/**\n* Removes the specified formatting attribute from the list item element.\n*/\nfunction removeFormattingFromListItem(writer, listItem, attributeKey) {\n\tconst listItemBlocks = getAllListItemBlocks(listItem);\n\tlet wasChanged = false;\n\tfor (const listItem of listItemBlocks) if (listItem.hasAttribute(attributeKey)) {\n\t\twriter.removeAttribute(attributeKey, listItem);\n\t\twasChanged = true;\n\t}\n\treturn wasChanged;\n}\n/**\n* Checks if the given list type is a numbered or bulleted list.\n*/\nfunction isNumberedOrBulletedList(listItem) {\n\treturn [\n\t\t\"numbered\",\n\t\t\"bulleted\",\n\t\t\"customNumbered\",\n\t\t\"customBulleted\"\n\t].includes(listItem.getAttribute(\"listType\"));\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* A set of helpers related to document lists.\n*/\nvar ListUtils = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListUtils\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Expands the given list of selected blocks to include all the items of the lists they're in.\n\t*\n\t* @param blocks The list of selected blocks.\n\t*/\n\texpandListBlocksToCompleteList(blocks) {\n\t\treturn expandListBlocksToCompleteList(blocks);\n\t}\n\t/**\n\t* Check if the given block is the first in the list item.\n\t*\n\t* @param listBlock The list block element.\n\t*/\n\tisFirstBlockOfListItem(listBlock) {\n\t\treturn isFirstBlockOfListItem(listBlock);\n\t}\n\t/**\n\t* Returns true if the given model node is a list item block.\n\t*\n\t* @param node A model node.\n\t*/\n\tisListItemBlock(node) {\n\t\treturn isListItemBlock(node);\n\t}\n\t/**\n\t* Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n\t*\n\t* @param blocks The list of selected blocks.\n\t* @param options.withNested Whether should include nested list items.\n\t*/\n\texpandListBlocksToCompleteItems(blocks, options = {}) {\n\t\treturn expandListBlocksToCompleteItems(blocks, options);\n\t}\n\t/**\n\t* Returns true if listType is of type `numbered` or `customNumbered`.\n\t*/\n\tisNumberedListType(listType) {\n\t\treturn isNumberedListType(listType);\n\t}\n\t/**\n\t* Returns true if the given list item is the first item in the list.\n\t*/\n\tisFirstListItemInList(listItem) {\n\t\treturn isFirstListItemInList(listItem);\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* Checks if view element is a list type (ul or ol).\n*\n* @internal\n*/\nfunction isListView(viewElement) {\n\treturn viewElement.is(\"element\", \"ol\") || viewElement.is(\"element\", \"ul\");\n}\n/**\n* Checks if view element is a list item (li).\n*\n* @internal\n*/\nfunction isListItemView(viewElement) {\n\treturn viewElement.is(\"element\", \"li\");\n}\n/**\n* Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.\n*\n* Also, fixes non HTML compliant lists indents:\n*\n* ```\n* before:                                     fixed list:\n* OL                                          OL\n* |-> LI (parent LIs: 0)                      |-> LI     (indent: 0)\n*     |-> OL                                  |-> OL\n*         |-> OL                                  |\n*         |   |-> OL                              |\n*         |       |-> OL                          |\n*         |           |-> LI (parent LIs: 1)      |-> LI (indent: 1)\n*         |-> LI (parent LIs: 1)                  |-> LI (indent: 1)\n*\n* before:                                     fixed list:\n* OL                                          OL\n* |-> OL                                      |\n*     |-> OL                                  |\n*          |-> OL                             |\n*              |-> LI (parent LIs: 0)         |-> LI        (indent: 0)\n*\n* before:                                     fixed list:\n* OL                                          OL\n* |-> LI (parent LIs: 0)                      |-> LI         (indent: 0)\n* |-> OL                                          |-> OL\n*     |-> LI (parent LIs: 0)                          |-> LI (indent: 1)\n* ```\n*\n* @internal\n*/\nfunction getIndent(listItem) {\n\tlet indent = 0;\n\tlet parent = listItem.parent;\n\twhile (parent) {\n\t\tif (isListItemView(parent)) indent++;\n\t\telse {\n\t\t\tconst previousSibling = parent.previousSibling;\n\t\t\tif (previousSibling && isListItemView(previousSibling)) indent++;\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\treturn indent;\n}\n/**\n* Creates a list attribute element (ol or ul).\n*\n* @internal\n*/\nfunction createListElement(writer, indent, type, id = getViewElementIdForListType(type, indent)) {\n\treturn writer.createAttributeElement(getViewElementNameForListType(type), null, {\n\t\tpriority: 2 * indent / 100 - 100,\n\t\tid\n\t});\n}\n/**\n* Creates a list item attribute element (li).\n*\n* @internal\n*/\nfunction createListItemElement(writer, indent, id) {\n\treturn writer.createAttributeElement(\"li\", null, {\n\t\tpriority: (2 * indent + 1) / 100 - 100,\n\t\tid\n\t});\n}\n/**\n* Returns a view element name for the given list type.\n*\n* @internal\n*/\nfunction getViewElementNameForListType(type) {\n\treturn type == \"numbered\" || type == \"customNumbered\" ? \"ol\" : \"ul\";\n}\n/**\n* Returns a view element ID for the given list type and indent.\n*\n* @internal\n*/\nfunction getViewElementIdForListType(type, indent) {\n\treturn `list-${type}-${indent}`;\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* Based on the provided positions looks for the list head and stores it in the provided map.\n*\n* @internal\n* @param position The search starting position.\n* @param itemToListHead The map from list item element to the list head element.\n* @param visited A set of elements that were already visited.\n*/\nfunction findAndAddListHeadToMap(position, itemToListHead, visited) {\n\tconst previousNode = position.nodeBefore;\n\tif (!isListItemBlock(previousNode)) {\n\t\tconst item = position.nodeAfter;\n\t\tif (isListItemBlock(item)) itemToListHead.add(item);\n\t} else {\n\t\tlet listHead = previousNode;\n\t\tfor (const { node } of new SiblingListBlocksIterator(listHead, \"backward\")) {\n\t\t\tlistHead = node;\n\t\t\tif (visited.has(listHead)) return;\n\t\t\tvisited.add(listHead);\n\t\t\tif (itemToListHead.has(previousNode)) return;\n\t\t}\n\t\titemToListHead.add(listHead);\n\t}\n}\n/**\n* Scans the list starting from the given list head element and fixes items' indentation.\n*\n* @internal\n* @param listNodes The iterable of list nodes.\n* @param writer The model writer.\n* @returns Whether the model was modified.\n*/\nfunction fixListIndents(listNodes, writer) {\n\tlet maxIndent = 0;\n\tlet prevIndent = -1;\n\tlet fixBy = null;\n\tlet applied = false;\n\tfor (const { node } of listNodes) {\n\t\tconst itemIndent = node.getAttribute(\"listIndent\");\n\t\tif (itemIndent > maxIndent) {\n\t\t\tlet newIndent;\n\t\t\tif (fixBy === null) {\n\t\t\t\tfixBy = itemIndent - maxIndent;\n\t\t\t\tnewIndent = maxIndent;\n\t\t\t} else {\n\t\t\t\tif (fixBy > itemIndent) fixBy = itemIndent;\n\t\t\t\tnewIndent = itemIndent - fixBy;\n\t\t\t}\n\t\t\tif (newIndent > prevIndent + 1) newIndent = prevIndent + 1;\n\t\t\twriter.setAttribute(\"listIndent\", newIndent, node);\n\t\t\tapplied = true;\n\t\t\tprevIndent = newIndent;\n\t\t} else {\n\t\t\tfixBy = null;\n\t\t\tmaxIndent = itemIndent + 1;\n\t\t\tprevIndent = itemIndent;\n\t\t}\n\t}\n\treturn applied;\n}\n/**\n* Scans the list starting from the given list head element and fixes items' types.\n*\n* @internal\n* @param listNodes The iterable of list nodes.\n* @param seenIds The set of already known IDs.\n* @param writer The model writer.\n* @returns Whether the model was modified.\n*/\nfunction fixListItemIds(listNodes, seenIds, writer) {\n\tconst visited = /* @__PURE__ */ new Set();\n\tlet applied = false;\n\tfor (const { node } of listNodes) {\n\t\tif (visited.has(node)) continue;\n\t\tlet listType = node.getAttribute(\"listType\");\n\t\tlet listItemId = node.getAttribute(\"listItemId\");\n\t\tif (seenIds.has(listItemId)) listItemId = ListItemUid.next();\n\t\tseenIds.add(listItemId);\n\t\tif (node.is(\"element\", \"listItem\")) {\n\t\t\tif (node.getAttribute(\"listItemId\") != listItemId) {\n\t\t\t\twriter.setAttribute(\"listItemId\", listItemId, node);\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const block of getListItemBlocks(node, { direction: \"forward\" })) {\n\t\t\tvisited.add(block);\n\t\t\tif (block.getAttribute(\"listType\") != listType) {\n\t\t\t\tlistItemId = ListItemUid.next();\n\t\t\t\tlistType = block.getAttribute(\"listType\");\n\t\t\t}\n\t\t\tif (block.getAttribute(\"listItemId\") != listItemId) {\n\t\t\t\twriter.setAttribute(\"listItemId\", listItemId, block);\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t}\n\t}\n\treturn applied;\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* Returns a consuming upcast converter for skip-level list item wrappers. It detects intermediate `<li>` elements\n* with `list-style-type:none` (generated by the skip-level downcast or by external sources) and consumes them\n* without producing a model element, so they don't end up as empty list items in the model.\n*\n* The wrapper `<li>` is consumed, but its children (nested lists) are converted normally. Because `getIndent()`\n* counts all ancestor `<li>` elements (including the consumed wrapper), nested items receive the correct indent\n* values that reflect the skip-level gap.\n*\n* Only `<li>` elements whose sole meaningful content is a nested `<ul>`/`<ol>` are treated as intermediate wrappers.\n* Anything else (text, paragraphs, custom elements, even an empty `<li>` with `list-style-type:none` carrying only\n* attributes) falls through to the regular list item upcast, so its data and attributes can be preserved by GHS\n* or other plugins.\n*\n* @internal\n*/\nfunction listItemSkipLevelConsumer() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst viewItem = data.viewItem;\n\t\tif (viewItem.getStyle(\"list-style-type\") !== \"none\") return;\n\t\tif (!isSkipLevelWrapper(viewItem)) return;\n\t\tif (!conversionApi.consumable.consume(viewItem, { name: true })) return;\n\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren(viewItem, data.modelCursor);\n\t\tdata.modelRange = modelRange;\n\t\tdata.modelCursor = modelCursor;\n\t};\n}\n/**\n* Checks whether a `<li>` view element is a skip-level intermediate wrapper, i.e. its only child is a nested\n* `<ul>`/`<ol>`. Any other content (text, `<br>`, `<p>`, custom elements, NBSP, etc.) disqualifies the element,\n* so it is upcast as a regular list item.\n*/\nfunction isSkipLevelWrapper(viewItem) {\n\tlet hasNestedList = false;\n\tfor (const child of viewItem.getChildren()) {\n\t\tif (child.is(\"element\", \"ul\") || child.is(\"element\", \"ol\")) {\n\t\t\thasNestedList = true;\n\t\t\tcontinue;\n\t\t}\n\t\treturn false;\n\t}\n\treturn hasNestedList;\n}\n/**\n* Returns the upcast converter for list items. It's supposed to work after the block converters (content inside list items) are converted.\n*\n* @internal\n*/\nfunction listItemUpcastConverter() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst { writer, schema } = conversionApi;\n\t\tif (!data.modelRange) return;\n\t\tconst items = Array.from(data.modelRange.getItems({ shallow: true })).filter((item) => schema.checkAttribute(item, \"listItemId\"));\n\t\tif (!items.length) return;\n\t\tif (items.every((item) => item.hasAttribute(\"listItemId\"))) return;\n\t\tconst listItemId = data.viewItem.getAttribute(\"data-list-item-id\") || ListItemUid.next();\n\t\tconversionApi.consumable.consume(data.viewItem, { attributes: \"data-list-item-id\" });\n\t\tconst listIndent = getIndent(data.viewItem);\n\t\tlet listType = data.viewItem.parent && data.viewItem.parent.is(\"element\", \"ol\") ? \"numbered\" : \"bulleted\";\n\t\tconst firstItemListType = items[0].getAttribute(\"listType\");\n\t\tif (firstItemListType) listType = firstItemListType;\n\t\tconst attributes = {\n\t\t\tlistItemId,\n\t\t\tlistIndent,\n\t\t\tlistType\n\t\t};\n\t\tfor (const item of items) if (!item.hasAttribute(\"listItemId\")) writer.setAttributes(attributes, item);\n\t\tif (items.length > 1) {\n\t\t\tif (items[1].getAttribute(\"listItemId\") != attributes.listItemId) conversionApi.keepEmptyElement(items[0]);\n\t\t}\n\t};\n}\n/**\n* Returns a model document change:data event listener that triggers conversion of related items if needed.\n*\n* @internal\n* @param model The editor model.\n* @param editing The editing controller.\n* @param attributeNames The list of all model list attributes (including registered strategies).\n* @param listEditing The document list editing plugin.\n*/\nfunction reconvertItemsOnDataChange(model, editing, attributeNames, listEditing) {\n\treturn () => {\n\t\tconst changes = model.document.differ.getChanges();\n\t\tconst itemsToRefresh = [];\n\t\tconst itemToListHead = /* @__PURE__ */ new Set();\n\t\tconst changedItems = /* @__PURE__ */ new Set();\n\t\tconst visited = /* @__PURE__ */ new Set();\n\t\tfor (const entry of changes) if (entry.type == \"insert\" && entry.name != \"$text\") {\n\t\t\tfindAndAddListHeadToMap(entry.position, itemToListHead, visited);\n\t\t\tif (!entry.attributes.has(\"listItemId\")) findAndAddListHeadToMap(entry.position.getShiftedBy(entry.length), itemToListHead, visited);\n\t\t\telse changedItems.add(entry.position.nodeAfter);\n\t\t} else if (entry.type == \"remove\" && entry.attributes.has(\"listItemId\")) findAndAddListHeadToMap(entry.position, itemToListHead, visited);\n\t\telse if (entry.type == \"attribute\") {\n\t\t\tconst item = entry.range.start.nodeAfter;\n\t\t\tif (attributeNames.includes(entry.attributeKey)) {\n\t\t\t\tfindAndAddListHeadToMap(entry.range.start, itemToListHead, visited);\n\t\t\t\tif (entry.attributeNewValue === null) {\n\t\t\t\t\tfindAndAddListHeadToMap(entry.range.start.getShiftedBy(1), itemToListHead, visited);\n\t\t\t\t\tif (doesItemBlockRequiresRefresh(item)) itemsToRefresh.push(item);\n\t\t\t\t} else changedItems.add(item);\n\t\t\t} else if (isListItemBlock(item)) {\n\t\t\t\tif (doesItemBlockRequiresRefresh(item)) itemsToRefresh.push(item);\n\t\t\t}\n\t\t}\n\t\tfor (const listHead of itemToListHead.values()) itemsToRefresh.push(...collectListItemsToRefresh(listHead, changedItems));\n\t\tfor (const item of new Set(itemsToRefresh)) editing.reconvertItem(item);\n\t};\n\tfunction collectListItemsToRefresh(listHead, changedItems) {\n\t\tconst itemsToRefresh = [];\n\t\tconst visited = /* @__PURE__ */ new Set();\n\t\tconst stack = [];\n\t\tfor (const { node, previous } of new SiblingListBlocksIterator(listHead)) {\n\t\t\tif (visited.has(node)) continue;\n\t\t\tconst itemIndent = node.getAttribute(\"listIndent\");\n\t\t\tif (previous && itemIndent < previous.getAttribute(\"listIndent\")) stack.length = itemIndent + 1;\n\t\t\tstack[itemIndent] = {\n\t\t\t\tmodelAttributes: getListModelAttributes(node),\n\t\t\t\tmodelElement: node\n\t\t\t};\n\t\t\tfillStackForIntermediates(node, itemIndent, stack);\n\t\t\tconst blocks = getListItemBlocks(node, { direction: \"forward\" });\n\t\t\tfor (const block of blocks) {\n\t\t\t\tvisited.add(block);\n\t\t\t\tif (doesItemBlockRequiresRefresh(block, blocks)) itemsToRefresh.push(block);\n\t\t\t\telse if (doesItemWrappingRequiresRefresh(block, stack, changedItems)) itemsToRefresh.push(block);\n\t\t\t}\n\t\t}\n\t\treturn itemsToRefresh;\n\t}\n\tfunction getListModelAttributes(item) {\n\t\treturn Object.fromEntries(Array.from(item.getAttributes()).filter(([key]) => attributeNames.includes(key)));\n\t}\n\tfunction fillStackForIntermediates(node, itemIndent, stack) {\n\t\tfor (let i = itemIndent - 1; i >= 0; i--) {\n\t\t\tif (stack[i]) break;\n\t\t\tconst siblingAtIndent = findSiblingListItemAt(node, i);\n\t\t\tlet ancestorAtLowerIndent = null;\n\t\t\tif (!siblingAtIndent) {\n\t\t\t\tfor (let k = i - 1; k >= 0; k--) if (stack[k]) {\n\t\t\t\t\tancestorAtLowerIndent = stack[k].modelElement;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst referenceItem = siblingAtIndent || ancestorAtLowerIndent || node;\n\t\t\tstack[i] = {\n\t\t\t\tmodelAttributes: {\n\t\t\t\t\t...getListModelAttributes(referenceItem),\n\t\t\t\t\tlistItemId: `list-item-skip-${i}`,\n\t\t\t\t\tlistIndent: i\n\t\t\t\t},\n\t\t\t\tmodelElement: referenceItem\n\t\t\t};\n\t\t}\n\t}\n\tfunction doesItemBlockRequiresRefresh(item, blocks) {\n\t\tconst viewElement = editing.mapper.toViewElement(item);\n\t\tif (!viewElement) return false;\n\t\tif (isItemBlockInsideStructureSlot(viewElement)) return true;\n\t\tif (listEditing.fire(\"checkElement\", {\n\t\t\tmodelElement: item,\n\t\t\tviewElement\n\t\t})) return true;\n\t\tif (!item.is(\"element\", \"paragraph\") && !item.is(\"element\", \"listItem\")) return false;\n\t\tconst useBogus = shouldUseBogusParagraph(item, attributeNames, blocks);\n\t\tif (useBogus && viewElement.is(\"element\", \"p\")) return true;\n\t\telse if (!useBogus && viewElement.is(\"element\", \"span\")) return true;\n\t\treturn false;\n\t}\n\tfunction isItemBlockInsideStructureSlot(viewElement) {\n\t\tviewElement = viewElement.parent;\n\t\twhile (viewElement.is(\"attributeElement\") && [\n\t\t\t\"ol\",\n\t\t\t\"ul\",\n\t\t\t\"li\"\n\t\t].includes(viewElement.name)) viewElement = viewElement.parent;\n\t\tif (viewElement.getCustomProperty(\"$structureSlotParent\") && !editing.mapper.toModelElement(viewElement)) return true;\n\t\treturn false;\n\t}\n\tfunction doesItemWrappingRequiresRefresh(item, stack, changedItems) {\n\t\tif (changedItems.has(item)) return false;\n\t\tconst viewElement = editing.mapper.toViewElement(item);\n\t\tlet indent = stack.length - 1;\n\t\tfor (let element = viewElement.parent; !element.is(\"editableElement\"); element = element.parent) {\n\t\t\tconst isListItemElement = isListItemView(element);\n\t\t\tconst isListElement = isListView(element);\n\t\t\tif (!isListElement && !isListItemElement) continue;\n\t\t\t/* v8 ignore next -- Defensive guard for transient skip-level list stack gaps. */\n\t\t\tif (stack[indent]) {\n\t\t\t\tconst eventName = `checkAttributes:${isListItemElement ? \"item\" : \"list\"}`;\n\t\t\t\tif (listEditing.fire(eventName, {\n\t\t\t\t\tviewElement: element,\n\t\t\t\t\tmodelAttributes: stack[indent].modelAttributes,\n\t\t\t\t\tmodelReferenceElement: stack[indent].modelElement\n\t\t\t\t})) break;\n\t\t\t}\n\t\t\tif (isListElement) {\n\t\t\t\tindent--;\n\t\t\t\tif (indent < 0) return false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n/**\n* Returns the list item downcast converter.\n*\n* @internal\n* @param attributeNames A list of attribute names that should be converted if they are set.\n* @param strategies The strategies.\n* @param model The model.\n*/\nfunction listItemDowncastConverter(attributeNames, strategies, model, { dataPipeline, enableSkipLevelLists }) {\n\tconst consumer = createAttributesConsumer(attributeNames, strategies);\n\treturn (evt, data, conversionApi) => {\n\t\tconst { writer, mapper, consumable } = conversionApi;\n\t\tconst listItem = data.item;\n\t\tif (!attributeNames.includes(data.attributeKey)) return;\n\t\tif (!consumer(listItem, consumable)) return;\n\t\tconst options = {\n\t\t\t...conversionApi.options,\n\t\t\tdataPipeline,\n\t\t\tenableSkipLevelLists\n\t\t};\n\t\tconst viewElement = findMappedViewElement(listItem, mapper, model, writer);\n\t\tremoveCustomMarkerElements(viewElement, writer, mapper);\n\t\tunwrapListItemBlock(viewElement, writer);\n\t\twrapListItemBlock(listItem, insertCustomMarkerElements(listItem, viewElement, strategies, writer, options), strategies, writer, options);\n\t};\n}\n/**\n* The 'remove' downcast converter for custom markers.\n*\n* @internal\n*/\nfunction listItemDowncastRemoveConverter(schema) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst { writer, mapper } = conversionApi;\n\t\tconst elementName = evt.name.split(\":\")[1];\n\t\tif (!schema.checkAttribute(elementName, \"listItemId\")) return;\n\t\tconst viewStart = mapper.toViewPosition(data.position);\n\t\tconst modelEnd = data.position.getShiftedBy(data.length);\n\t\tconst viewEnd = mapper.toViewPosition(modelEnd, { isPhantom: true });\n\t\tconst viewElement = writer.createRange(viewStart, viewEnd).getTrimmed().end.nodeBefore;\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif (!viewElement) return;\n\t\tremoveCustomMarkerElements(viewElement, writer, mapper);\n\t};\n}\n/**\n* Returns the bogus paragraph view element creator. A bogus paragraph is used if a list item contains only a single block or nested list.\n*\n* @internal\n* @param attributeNames The list of all model list attributes (including registered strategies).\n*/\nfunction bogusParagraphCreator(attributeNames, { dataPipeline } = {}) {\n\treturn (modelElement, { writer }) => {\n\t\tif (!shouldUseBogusParagraph(modelElement, attributeNames)) return null;\n\t\tif (!dataPipeline) return writer.createContainerElement(\"span\", { class: \"ck-list-bogus-paragraph\" });\n\t\tconst viewElement = writer.createContainerElement(\"p\");\n\t\twriter.setCustomProperty(\"dataPipeline:transparentRendering\", true, viewElement);\n\t\treturn viewElement;\n\t};\n}\n/**\n* Helper for mapping mode to view elements. It's using positions mapping instead of mapper.toViewElement( element )\n* to find outermost view element. This is for cases when mapping is using inner view element like in the code blocks (pre > code).\n*\n* @internal\n* @param element The model element.\n* @param mapper The mapper instance.\n* @param model The model.\n* @param writer The view downcast writer.\n*/\nfunction findMappedViewElement(element, mapper, model, writer) {\n\tconst modelRange = model.createRangeOn(element);\n\tconst viewWalker = mapper.toViewRange(modelRange).getTrimmed().getWalker();\n\tfor (const { item } of viewWalker) if (item.is(\"element\") && item.getCustomProperty(\"listItemMarker\")) viewWalker.jumpTo(writer.createPositionAfter(item));\n\telse if (item.is(\"element\") && !item.getCustomProperty(\"listItemWrapper\")) return item;\n}\n/**\n* The model to view custom position mapping for cases when marker is injected at the beginning of a block.\n*\n* @internal\n*/\nfunction createModelToViewPositionMapper(strategies, view) {\n\treturn (evt, data) => {\n\t\tif (data.modelPosition.offset > 0) return;\n\t\tconst positionParent = data.modelPosition.parent;\n\t\tif (!isListItemBlock(positionParent)) return;\n\t\tif (!strategies.some((strategy) => strategy.scope == \"itemMarker\" && strategy.canInjectMarkerIntoElement && strategy.canInjectMarkerIntoElement(positionParent))) return;\n\t\tconst viewElement = data.mapper.toViewElement(positionParent);\n\t\tconst viewRange = view.createRangeIn(viewElement);\n\t\tconst viewWalker = viewRange.getWalker();\n\t\tlet positionAfterLastMarker = viewRange.start;\n\t\tfor (const { item } of viewWalker) {\n\t\t\tif (item.is(\"element\") && data.mapper.toModelElement(item) || item.is(\"$textProxy\")) break;\n\t\t\t/* v8 ignore next -- Depends on custom marker internals in mapper position translation. */\n\t\t\tif (item.is(\"element\") && item.getCustomProperty(\"listItemMarker\")) {\n\t\t\t\tpositionAfterLastMarker = view.createPositionAfter(item);\n\t\t\t\tviewWalker.skip(({ previousPosition }) => !previousPosition.isEqual(positionAfterLastMarker));\n\t\t\t}\n\t\t}\n\t\tdata.viewPosition = positionAfterLastMarker;\n\t};\n}\n/**\n* Removes a custom marker elements and item wrappers related to that marker.\n*/\nfunction removeCustomMarkerElements(viewElement, viewWriter, mapper) {\n\twhile (viewElement.parent.is(\"attributeElement\") && viewElement.parent.getCustomProperty(\"listItemWrapper\")) viewWriter.unwrap(viewWriter.createRangeOn(viewElement), viewElement.parent);\n\tconst markersToRemove = [];\n\tcollectMarkersToRemove(viewWriter.createPositionBefore(viewElement).getWalker({ direction: \"backward\" }));\n\tcollectMarkersToRemove(viewWriter.createRangeIn(viewElement).getWalker());\n\tfor (const marker of markersToRemove) viewWriter.remove(marker);\n\tfunction collectMarkersToRemove(viewWalker) {\n\t\tfor (const { item } of viewWalker) {\n\t\t\tif (item.is(\"element\") && mapper.toModelElement(item)) break;\n\t\t\tif (item.is(\"element\") && item.getCustomProperty(\"listItemMarker\")) markersToRemove.push(item);\n\t\t}\n\t}\n}\n/**\n* Inserts a custom marker elements and wraps first block of a list item if marker requires it.\n*/\nfunction insertCustomMarkerElements(listItem, viewElement, strategies, writer, { dataPipeline }) {\n\tlet viewRange = writer.createRangeOn(viewElement);\n\tif (!isFirstBlockOfListItem(listItem)) return viewRange;\n\tfor (const strategy of strategies) {\n\t\tif (strategy.scope != \"itemMarker\") continue;\n\t\tconst markerElement = strategy.createElement(writer, listItem, { dataPipeline });\n\t\tif (!markerElement) continue;\n\t\twriter.setCustomProperty(\"listItemMarker\", true, markerElement);\n\t\tif (strategy.canInjectMarkerIntoElement && strategy.canInjectMarkerIntoElement(listItem)) writer.insert(writer.createPositionAt(viewElement, 0), markerElement);\n\t\telse {\n\t\t\twriter.insert(viewRange.start, markerElement);\n\t\t\tviewRange = writer.createRange(writer.createPositionBefore(markerElement), writer.createPositionAfter(viewElement));\n\t\t}\n\t\tif (!strategy.createWrapperElement || !strategy.canWrapElement) continue;\n\t\tconst wrapper = strategy.createWrapperElement(writer, listItem, { dataPipeline });\n\t\twriter.setCustomProperty(\"listItemWrapper\", true, wrapper);\n\t\tif (strategy.canWrapElement(listItem)) viewRange = writer.wrap(viewRange, wrapper);\n\t\telse {\n\t\t\tviewRange = writer.wrap(writer.createRangeOn(markerElement), wrapper);\n\t\t\tviewRange = writer.createRange(viewRange.start, writer.createPositionAfter(viewElement));\n\t\t}\n\t}\n\treturn viewRange;\n}\n/**\n* Unwraps all ol, ul, and li attribute elements that are wrapping the provided view element.\n*/\nfunction unwrapListItemBlock(viewElement, viewWriter) {\n\tlet attributeElement = viewElement.parent;\n\twhile (attributeElement.is(\"attributeElement\") && [\n\t\t\"ul\",\n\t\t\"ol\",\n\t\t\"li\"\n\t].includes(attributeElement.name)) {\n\t\tconst parentElement = attributeElement.parent;\n\t\tviewWriter.unwrap(viewWriter.createRangeOn(viewElement), attributeElement);\n\t\tattributeElement = parentElement;\n\t}\n}\n/**\n* Wraps the given list item with appropriate attribute elements for ul, ol, and li.\n*\n* For skip-level lists (where indent gaps exist, e.g. indent 0 → indent 2), this function\n* generates intermediate wrapper pairs (ul/ol + li) at each missing level. These intermediate\n* wrappers are invisible (`list-style-type: none` on the li). Scope `'list'` strategies are\n* applied so the wrapper element (ul/ol) carries the same classes and styles as real list\n* wrappers, while scope `'item'` strategies are skipped since there is no model element\n* backing the intermediate level.\n*/\nfunction wrapListItemBlock(listItem, viewRange, strategies, writer, options) {\n\tif (!listItem.hasAttribute(\"listIndent\")) return;\n\tconst listItemIndent = listItem.getAttribute(\"listIndent\");\n\tconst enableSkipLevelLists = options.enableSkipLevelLists;\n\tlet currentListItem = listItem;\n\tfor (let indent = listItemIndent; indent >= 0; indent--) {\n\t\tconst isIntermediate = currentListItem.getAttribute(\"listIndent\") !== indent;\n\t\tif (isIntermediate) {\n\t\t\tconst referenceItem = findSiblingListItemAt(listItem, indent) || currentListItem;\n\t\t\tconst listType = referenceItem.getAttribute(\"listType\");\n\t\t\tconst listItemViewElement = createListItemElement(writer, indent, `list-item-skip-${indent}`);\n\t\t\tconst listViewElement = createListElement(writer, indent, listType);\n\t\t\twriter.setStyle(\"list-style-type\", \"none\", listItemViewElement);\n\t\t\tfor (const strategy of strategies) if (strategy.scope == \"list\" && referenceItem.hasAttribute(strategy.attributeName)) strategy.setAttributeOnDowncast(writer, referenceItem.getAttribute(strategy.attributeName), listViewElement, options, referenceItem);\n\t\t\tviewRange = writer.wrap(viewRange, listItemViewElement);\n\t\t\tviewRange = writer.wrap(viewRange, listViewElement);\n\t\t} else {\n\t\t\tconst listItemViewElement = createListItemElement(writer, indent, currentListItem.getAttribute(\"listItemId\"));\n\t\t\tconst listViewElement = createListElement(writer, indent, currentListItem.getAttribute(\"listType\"));\n\t\t\tfor (const strategy of strategies) if ((strategy.scope == \"list\" || strategy.scope == \"item\") && currentListItem.hasAttribute(strategy.attributeName)) strategy.setAttributeOnDowncast(writer, currentListItem.getAttribute(strategy.attributeName), strategy.scope == \"list\" ? listViewElement : listItemViewElement, options, currentListItem);\n\t\t\tviewRange = writer.wrap(viewRange, listItemViewElement);\n\t\t\tviewRange = writer.wrap(viewRange, listViewElement);\n\t\t}\n\t\tif (indent == 0) break;\n\t\tif (!isIntermediate) {\n\t\t\tconst nextListItem = ListWalker.first(currentListItem, { lowerIndent: true });\n\t\t\tif (nextListItem) currentListItem = nextListItem;\n\t\t\telse if (!enableSkipLevelLists) break;\n\t\t}\n\t}\n}\n/**\n* Walks forward from the given list item through model siblings to find the first list item block\n* at exactly the specified indent level. Stops when it encounters a non-list block or a list item\n* at a lower indent (which means we left the current subtree).\n*/\nfunction findSiblingListItemAt(listItem, targetIndent) {\n\tlet node = listItem.nextSibling;\n\twhile (node && isListItemBlock(node)) {\n\t\tconst indent = node.getAttribute(\"listIndent\");\n\t\tif (indent < targetIndent) return null;\n\t\tif (indent === targetIndent) return node;\n\t\tnode = node.nextSibling;\n\t}\n\treturn null;\n}\nfunction createAttributesConsumer(attributeNames, strategies) {\n\tconst nonConsumingAttributes = strategies.filter((strategy) => strategy.consume === false).map((strategy) => strategy.attributeName);\n\treturn (node, consumable) => {\n\t\tconst events = [];\n\t\tfor (const attributeName of attributeNames) if (node.hasAttribute(attributeName) && !nonConsumingAttributes.includes(attributeName)) events.push(`attribute:${attributeName}`);\n\t\tif (!events.every((event) => consumable.test(node, event) !== false)) return false;\n\t\tevents.forEach((event) => consumable.consume(node, event));\n\t\treturn true;\n\t};\n}\nfunction shouldUseBogusParagraph(item, attributeNames, blocks = getAllListItemBlocks(item)) {\n\tif (!isListItemBlock(item)) return false;\n\tfor (const attributeKey of item.getAttributeKeys()) {\n\t\tif (attributeKey.startsWith(\"selection:\") || attributeKey == \"htmlEmptyBlock\") continue;\n\t\tif (!attributeNames.includes(attributeKey)) return false;\n\t}\n\treturn blocks.length < 2;\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 list/list/listediting\n*/\n/**\n* A list of base list model attributes.\n*/\nconst LIST_BASE_ATTRIBUTES = [\n\t\"listType\",\n\t\"listIndent\",\n\t\"listItemId\"\n];\n/**\n* The editing part of the document-list feature. It handles creating, editing and removing lists and list items.\n*/\nvar ListEditing = class extends Plugin {\n\t/**\n\t* The list of registered downcast strategies.\n\t*/\n\t_downcastStrategies = [];\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tEnter,\n\t\t\tDelete,\n\t\t\tListUtils,\n\t\t\tClipboardPipeline,\n\t\t\tListFormatting\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"list.multiBlock\", true);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst multiBlock = editor.config.get(\"list.multiBlock\");\n\t\tif (editor.plugins.has(\"LegacyListEditing\"))\n /**\n\t\t* The `List` feature cannot be loaded together with the `LegacyList` plugin.\n\t\t*\n\t\t* @error list-feature-conflict\n\t\t* @param {string} conflictPlugin Name of the plugin.\n\t\t*/\n\t\tthrow new CKEditorError(\"list-feature-conflict\", this, { conflictPlugin: \"LegacyListEditing\" });\n\t\tmodel.schema.register(\"$listItem\", { allowAttributes: LIST_BASE_ATTRIBUTES });\n\t\tif (multiBlock) {\n\t\t\tmodel.schema.extend(\"$container\", { allowAttributesOf: \"$listItem\" });\n\t\t\tmodel.schema.extend(\"$block\", { allowAttributesOf: \"$listItem\" });\n\t\t\tmodel.schema.extend(\"$blockObject\", { allowAttributesOf: \"$listItem\" });\n\t\t} else model.schema.register(\"listItem\", {\n\t\t\tinheritAllFrom: \"$block\",\n\t\t\tallowAttributesOf: \"$listItem\"\n\t\t});\n\t\tfor (const attribute of LIST_BASE_ATTRIBUTES) model.schema.setAttributeProperties(attribute, { copyOnReplace: true });\n\t\teditor.commands.add(\"numberedList\", new ListCommand(editor, \"numbered\"));\n\t\teditor.commands.add(\"bulletedList\", new ListCommand(editor, \"bulleted\"));\n\t\teditor.commands.add(\"customNumberedList\", new ListCommand(editor, \"customNumbered\", { multiLevel: true }));\n\t\teditor.commands.add(\"customBulletedList\", new ListCommand(editor, \"customBulleted\", { multiLevel: true }));\n\t\teditor.commands.add(\"indentList\", new ListIndentCommand(editor, \"forward\"));\n\t\teditor.commands.add(\"outdentList\", new ListIndentCommand(editor, \"backward\"));\n\t\teditor.commands.add(\"splitListItemBefore\", new ListSplitCommand(editor, \"before\"));\n\t\teditor.commands.add(\"splitListItemAfter\", new ListSplitCommand(editor, \"after\"));\n\t\tif (multiBlock) {\n\t\t\teditor.commands.add(\"mergeListItemBackward\", new ListMergeCommand(editor, \"backward\"));\n\t\t\teditor.commands.add(\"mergeListItemForward\", new ListMergeCommand(editor, \"forward\"));\n\t\t}\n\t\tthis._setupDeleteIntegration();\n\t\tthis._setupEnterIntegration();\n\t\tthis._setupTabIntegration();\n\t\tthis._setupClipboardIntegration();\n\t\tthis._setupAccessibilityIntegration();\n\t\tthis._setupListItemIdConversionStrategy();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst commands = this.editor.commands;\n\t\tconst indent = commands.get(\"indent\");\n\t\tconst outdent = commands.get(\"outdent\");\n\t\tif (indent) indent.registerChildCommand(commands.get(\"indentList\"), { priority: \"high\" });\n\t\tif (outdent) outdent.registerChildCommand(commands.get(\"outdentList\"), { priority: \"lowest\" });\n\t\tthis._setupModelPostFixing();\n\t\tthis._setupConversion();\n\t}\n\t/**\n\t* Registers a downcast strategy.\n\t*\n\t* **Note**: Strategies must be registered in the `Plugin#init()` phase so that it can be applied\n\t* in the `ListEditing#afterInit()`.\n\t*\n\t* @param strategy The downcast strategy to register.\n\t*/\n\tregisterDowncastStrategy(strategy) {\n\t\tthis._downcastStrategies.push(strategy);\n\t}\n\t/**\n\t* Returns list of model attribute names that should affect downcast conversion.\n\t*/\n\tgetListAttributeNames() {\n\t\treturn [...LIST_BASE_ATTRIBUTES, ...this._downcastStrategies.map((strategy) => strategy.attributeName)];\n\t}\n\t/**\n\t* Attaches the listener to the {@link module:engine/view/document~ViewDocument#event:delete} event and handles backspace/delete\n\t* keys in and around document lists.\n\t*/\n\t_setupDeleteIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst mergeBackwardCommand = editor.commands.get(\"mergeListItemBackward\");\n\t\tconst mergeForwardCommand = editor.commands.get(\"mergeListItemForward\");\n\t\tthis.listenTo(editor.editing.view.document, \"delete\", (evt, data) => {\n\t\t\tconst selection = editor.model.document.selection;\n\t\t\tif (getSelectedBlockObject(editor.model)) return;\n\t\t\teditor.model.change(() => {\n\t\t\t\tconst firstPosition = selection.getFirstPosition();\n\t\t\t\tif (selection.isCollapsed && data.direction == \"backward\") {\n\t\t\t\t\tif (!firstPosition.isAtStart) return;\n\t\t\t\t\tconst positionParent = firstPosition.parent;\n\t\t\t\t\tif (!isListItemBlock(positionParent)) return;\n\t\t\t\t\tconst previousBlock = ListWalker.first(positionParent, {\n\t\t\t\t\t\tsameAttributes: \"listType\",\n\t\t\t\t\t\tsameIndent: true\n\t\t\t\t\t});\n\t\t\t\t\tconst hasNoMergeTarget = positionParent.getAttribute(\"listIndent\") === 0 || !isListItemBlock(positionParent.previousSibling);\n\t\t\t\t\tif (!previousBlock && hasNoMergeTarget) {\n\t\t\t\t\t\tif (!isLastBlockOfListItem(positionParent)) editor.execute(\"splitListItemAfter\");\n\t\t\t\t\t\teditor.execute(\"outdentList\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!mergeBackwardCommand || !mergeBackwardCommand.isEnabled) return;\n\t\t\t\t\t\tmergeBackwardCommand.execute({ shouldMergeOnBlocksContentLevel: shouldMergeOnBlocksContentLevel(editor.model, \"backward\") });\n\t\t\t\t\t}\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t} else {\n\t\t\t\t\tif (selection.isCollapsed && !selection.getLastPosition().isAtEnd) return;\n\t\t\t\t\tif (!mergeForwardCommand || !mergeForwardCommand.isEnabled) return;\n\t\t\t\t\tmergeForwardCommand.execute({ shouldMergeOnBlocksContentLevel: shouldMergeOnBlocksContentLevel(editor.model, \"forward\") });\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t});\n\t\t}, { context: \"li\" });\n\t}\n\t/**\n\t* Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:enter} event and handles enter key press\n\t* in document lists.\n\t*/\n\t_setupEnterIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst commands = editor.commands;\n\t\tconst enterCommand = commands.get(\"enter\");\n\t\tthis.listenTo(editor.editing.view.document, \"enter\", (evt, data) => {\n\t\t\tconst doc = model.document;\n\t\t\tconst positionParent = doc.selection.getFirstPosition().parent;\n\t\t\tif (doc.selection.isCollapsed && isListItemBlock(positionParent) && positionParent.isEmpty && !data.isSoft) {\n\t\t\t\tconst isFirstBlock = isFirstBlockOfListItem(positionParent);\n\t\t\t\tconst isLastBlock = isLastBlockOfListItem(positionParent);\n\t\t\t\tif (isFirstBlock && isLastBlock) {\n\t\t\t\t\teditor.execute(\"outdentList\");\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t} else if (isFirstBlock && !isLastBlock) {\n\t\t\t\t\teditor.execute(\"splitListItemAfter\");\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t} else if (isLastBlock) {\n\t\t\t\t\teditor.execute(\"splitListItemBefore\");\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}, { context: \"li\" });\n\t\tthis.listenTo(enterCommand, \"afterExecute\", () => {\n\t\t\tconst splitCommand = commands.get(\"splitListItemBefore\");\n\t\t\tsplitCommand.refresh();\n\t\t\tif (!splitCommand.isEnabled) return;\n\t\t\tconst positionParent = editor.model.document.selection.getLastPosition().parent;\n\t\t\tif (getAllListItemBlocks(positionParent).length === 2) splitCommand.execute();\n\t\t});\n\t}\n\t/**\n\t* Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:tab} event and handles tab key and tab+shift keys\n\t* presses in document lists.\n\t*/\n\t_setupTabIntegration() {\n\t\tconst editor = this.editor;\n\t\tthis.listenTo(editor.editing.view.document, \"tab\", (evt, data) => {\n\t\t\tconst commandName = data.shiftKey ? \"outdentList\" : \"indentList\";\n\t\t\tif (this.editor.commands.get(commandName).isEnabled) {\n\t\t\t\teditor.execute(commandName);\n\t\t\t\tdata.stopPropagation();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: \"li\" });\n\t}\n\t/**\n\t* Registers the conversion helpers for the document-list feature.\n\t*/\n\t_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst attributeNames = this.getListAttributeNames();\n\t\tconst multiBlock = editor.config.get(\"list.multiBlock\");\n\t\tconst elementName = multiBlock ? \"paragraph\" : \"listItem\";\n\t\tconst enableSkipLevelLists = !!editor.config.get(\"list.enableSkipLevelLists\");\n\t\teditor.conversion.for(\"upcast\").elementToElement({\n\t\t\tview: \"li\",\n\t\t\tmodel: (viewElement, { writer }) => writer.createElement(elementName, { listType: \"\" })\n\t\t}).elementToElement({\n\t\t\tview: \"p\",\n\t\t\tmodel: (viewElement, { writer }) => {\n\t\t\t\tif (viewElement.parent && viewElement.parent.is(\"element\", \"li\")) return writer.createElement(elementName, { listType: \"\" });\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tconverterPriority: \"high\"\n\t\t}).add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:p\", (evt, data, conversionApi) => {\n\t\t\t\tconst viewElement = data.viewItem;\n\t\t\t\tif (!viewElement.parent || !viewElement.parent.is(\"element\", \"li\")) return;\n\t\t\t\tif (viewElement.isEmpty) return;\n\t\t\t\tif (!viewElement.getAttributeKeys().next().done) return;\n\t\t\t\tfor (const sibling of viewElement.parent.getChildren()) {\n\t\t\t\t\tif (sibling === viewElement) continue;\n\t\t\t\t\tif (sibling.is(\"element\", \"ol\") || sibling.is(\"element\", \"ul\")) continue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconversionApi.consumable.consume(viewElement, { name: true });\n\t\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren(viewElement, data.modelCursor);\n\t\t\t\tdata.modelRange = modelRange;\n\t\t\t\tdata.modelCursor = modelCursor;\n\t\t\t}, { priority: \"highest\" });\n\t\t\tif (enableSkipLevelLists) dispatcher.on(\"element:li\", listItemSkipLevelConsumer(), { priority: \"high\" });\n\t\t\tdispatcher.on(\"element:li\", listItemUpcastConverter());\n\t\t});\n\t\tif (!multiBlock) editor.conversion.for(\"downcast\").elementToElement({\n\t\t\tmodel: \"listItem\",\n\t\t\tview: \"p\"\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").elementToElement({\n\t\t\tmodel: elementName,\n\t\t\tview: bogusParagraphCreator(attributeNames),\n\t\t\tconverterPriority: \"high\"\n\t\t}).add((dispatcher) => {\n\t\t\tdispatcher.on(\"attribute\", listItemDowncastConverter(attributeNames, this._downcastStrategies, model, { enableSkipLevelLists }));\n\t\t\tdispatcher.on(\"remove\", listItemDowncastRemoveConverter(model.schema));\n\t\t});\n\t\teditor.conversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: elementName,\n\t\t\tview: bogusParagraphCreator(attributeNames, { dataPipeline: true }),\n\t\t\tconverterPriority: \"high\"\n\t\t}).add((dispatcher) => {\n\t\t\tdispatcher.on(\"attribute\", listItemDowncastConverter(attributeNames, this._downcastStrategies, model, {\n\t\t\t\tdataPipeline: true,\n\t\t\t\tenableSkipLevelLists\n\t\t\t}));\n\t\t});\n\t\tconst modelToViewPositionMapper = createModelToViewPositionMapper(this._downcastStrategies, editor.editing.view);\n\t\teditor.editing.mapper.on(\"modelToViewPosition\", modelToViewPositionMapper);\n\t\teditor.data.mapper.on(\"modelToViewPosition\", modelToViewPositionMapper);\n\t\tthis.listenTo(model.document, \"change:data\", reconvertItemsOnDataChange(model, editor.editing, attributeNames, this), { priority: \"high\" });\n\t\tthis.on(\"checkAttributes:item\", (evt, { viewElement, modelAttributes }) => {\n\t\t\tif (viewElement.id != modelAttributes.listItemId) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t});\n\t\tthis.on(\"checkAttributes:list\", (evt, { viewElement, modelAttributes }) => {\n\t\t\tif (viewElement.name != getViewElementNameForListType(modelAttributes.listType) || viewElement.id != getViewElementIdForListType(modelAttributes.listType, modelAttributes.listIndent)) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Registers model post-fixers.\n\t*/\n\t_setupModelPostFixing() {\n\t\tconst model = this.editor.model;\n\t\tconst attributeNames = this.getListAttributeNames();\n\t\tmodel.document.registerPostFixer((writer) => modelChangePostFixer$1(model, writer, attributeNames, this));\n\t\tif (!this.editor.config.get(\"list.enableSkipLevelLists\")) this.on(\"postFixer\", (evt, { listNodes, writer }) => {\n\t\t\tevt.return = fixListIndents(listNodes, writer) || evt.return;\n\t\t}, { priority: \"high\" });\n\t\tthis.on(\"postFixer\", (evt, { listNodes, writer, seenIds }) => {\n\t\t\tevt.return = fixListItemIds(listNodes, seenIds, writer) || evt.return;\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Integrates the feature with the clipboard via {@link module:engine/model/model~Model#insertContent} and\n\t* {@link module:engine/model/model~Model#getSelectedContent}.\n\t*/\n\t_setupClipboardIntegration() {\n\t\tconst model = this.editor.model;\n\t\tconst clipboardPipeline = this.editor.plugins.get(\"ClipboardPipeline\");\n\t\tthis.listenTo(model, \"insertContent\", createModelIndentPasteFixer(model), { priority: \"high\" });\n\t\tthis.listenTo(clipboardPipeline, \"outputTransformation\", (evt, data) => {\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst allContentChildren = Array.from(data.content.getChildren());\n\t\t\t\tconst lastItem = allContentChildren[allContentChildren.length - 1];\n\t\t\t\tif (allContentChildren.length > 1 && lastItem.is(\"element\") && lastItem.isEmpty) {\n\t\t\t\t\tif (allContentChildren.slice(0, -1).every(isListItemBlock)) writer.remove(lastItem);\n\t\t\t\t}\n\t\t\t\tif (data.method == \"copy\" || data.method == \"cut\") {\n\t\t\t\t\tconst allChildren = Array.from(data.content.getChildren());\n\t\t\t\t\t/* v8 ignore next -- Clipboard output normally reaches this cleanup only for selected single list items. */\n\t\t\t\t\tif (isSingleListItem(allChildren)) removeListAttributes(allChildren, writer, this.getListAttributeNames());\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Informs editor accessibility features about keystrokes brought by the plugin.\n\t*/\n\t_setupAccessibilityIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\teditor.accessibility.addKeystrokeInfoGroup({\n\t\t\tid: \"list\",\n\t\t\tlabel: t(\"Keystrokes that can be used in a list\"),\n\t\t\tkeystrokes: [{\n\t\t\t\tlabel: t(\"Increase list item indent\"),\n\t\t\t\tkeystroke: \"Tab\"\n\t\t\t}, {\n\t\t\t\tlabel: t(\"Decrease list item indent\"),\n\t\t\t\tkeystroke: \"Shift+Tab\"\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* Convert `listItemId` attribute to `data-list-item-id` attribute on the view element in both downcast pipelines.\n\t*/\n\t_setupListItemIdConversionStrategy() {\n\t\tthis.registerDowncastStrategy({\n\t\t\tscope: \"item\",\n\t\t\tattributeName: \"listItemId\",\n\t\t\tsetAttributeOnDowncast(writer, attributeValue, viewElement, options) {\n\t\t\t\tif (options && (options.skipListItemIds || options.isClipboardPipeline)) return;\n\t\t\t\twriter.setAttribute(\"data-list-item-id\", attributeValue, viewElement);\n\t\t\t}\n\t\t});\n\t}\n};\n/**\n* Post-fixer that reacts to changes on document and fixes incorrect model states (invalid `listItemId` and `listIndent` values).\n*\n* In the example below, there is a correct list structure.\n* Then the middle element is removed so the list structure will become incorrect:\n*\n* ```xml\n* <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=1>Item 2</paragraph>   <--- this is removed.\n* <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=2>Item 3</paragraph>\n* ```\n*\n* The list structure after the middle element is removed:\n*\n* ```xml\n* <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=2>Item 3</paragraph>\n* ```\n*\n* Should become:\n*\n* ```xml\n* <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=1>Item 3</paragraph>   <--- note that indent got post-fixed.\n* ```\n*\n* @param model The data model.\n* @param writer The writer to do changes with.\n* @param attributeNames The list of all model list attributes (including registered strategies).\n* @param ListEditing The document list editing plugin.\n* @returns `true` if any change has been applied, `false` otherwise.\n*/\nfunction modelChangePostFixer$1(model, writer, attributeNames, listEditing) {\n\tconst changes = model.document.differ.getChanges();\n\tconst visited = /* @__PURE__ */ new Set();\n\tconst itemToListHead = /* @__PURE__ */ new Set();\n\tconst multiBlock = listEditing.editor.config.get(\"list.multiBlock\");\n\tlet applied = false;\n\tfor (const entry of changes) {\n\t\tif (entry.type == \"insert\" && entry.name != \"$text\") {\n\t\t\tconst item = entry.position.nodeAfter;\n\t\t\tif (!model.schema.checkAttribute(item, \"listItemId\")) {\n\t\t\t\tfor (const attributeName of Array.from(item.getAttributeKeys())) if (attributeNames.includes(attributeName)) {\n\t\t\t\t\twriter.removeAttribute(attributeName, item);\n\t\t\t\t\tapplied = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfindAndAddListHeadToMap(entry.position, itemToListHead, visited);\n\t\t\tif (!entry.attributes.has(\"listItemId\")) findAndAddListHeadToMap(entry.position.getShiftedBy(entry.length), itemToListHead, visited);\n\t\t\tfor (const { item: innerItem, previousPosition } of model.createRangeIn(item)) if (isListItemBlock(innerItem)) findAndAddListHeadToMap(previousPosition, itemToListHead, visited);\n\t\t} else if (entry.type == \"remove\") findAndAddListHeadToMap(entry.position, itemToListHead, visited);\n\t\telse if (entry.type == \"attribute\" && attributeNames.includes(entry.attributeKey)) {\n\t\t\tfindAndAddListHeadToMap(entry.range.start, itemToListHead, visited);\n\t\t\tif (entry.attributeNewValue === null) findAndAddListHeadToMap(entry.range.start.getShiftedBy(1), itemToListHead, visited);\n\t\t}\n\t\tif (!multiBlock && entry.type == \"attribute\" && LIST_BASE_ATTRIBUTES.includes(entry.attributeKey)) {\n\t\t\tconst element = entry.range.start.nodeAfter;\n\t\t\tif (entry.attributeNewValue === null && element && element.is(\"element\", \"listItem\")) {\n\t\t\t\twriter.rename(element, \"paragraph\");\n\t\t\t\tapplied = true;\n\t\t\t} else if (entry.attributeOldValue === null && element && element.is(\"element\") && element.name != \"listItem\") {\n\t\t\t\twriter.rename(element, \"listItem\");\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t}\n\t}\n\tconst seenIds = /* @__PURE__ */ new Set();\n\tfor (const listHead of itemToListHead.values()) applied = listEditing.fire(\"postFixer\", {\n\t\tlistNodes: new ListBlocksIterable(listHead),\n\t\tlistHead,\n\t\twriter,\n\t\tseenIds\n\t}) || applied;\n\treturn applied;\n}\n/**\n* A fixer for pasted content that includes list items.\n*\n* It fixes indentation of pasted list items so the pasted items match correctly to the context they are pasted into.\n*\n* Example:\n*\n* ```xml\n* <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=\"0\">A</paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=\"1\">B^</paragraph>\n* // At ^ paste:  <paragraph listType=\"numbered\" listItemId=\"x\" listIndent=\"0\">X</paragraph>\n* //              <paragraph listType=\"numbered\" listItemId=\"y\" listIndent=\"1\">Y</paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=\"2\">C</paragraph>\n* ```\n*\n* Should become:\n*\n* ```xml\n* <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=\"0\">A</paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=\"1\">BX</paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"y\" listIndent=\"2\">Y/paragraph>\n* <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=\"2\">C</paragraph>\n* ```\n*/\nfunction createModelIndentPasteFixer(model) {\n\treturn (evt, [content, selectable]) => {\n\t\tconst items = (content.is(\"documentFragment\") ? Array.from(content.getChildren()) : [content]).filter((item) => !model.schema.isInline(item));\n\t\tif (!items.length) return;\n\t\tconst position = (selectable ? model.createSelection(selectable) : model.document.selection).getFirstPosition();\n\t\tlet refItem;\n\t\tif (isListItemBlock(position.parent)) refItem = position.parent;\n\t\telse if (isListItemBlock(position.nodeBefore) && isListItemBlock(position.nodeAfter)) refItem = position.nodeBefore;\n\t\telse return;\n\t\tmodel.change((writer) => {\n\t\t\tconst refType = refItem.getAttribute(\"listType\");\n\t\t\tconst refIndent = refItem.getAttribute(\"listIndent\");\n\t\t\tconst firstElementIndent = items[0].getAttribute(\"listIndent\") || 0;\n\t\t\tconst indentDiff = Math.max(refIndent - firstElementIndent, 0);\n\t\t\tfor (const item of items) {\n\t\t\t\tconst isListItem = isListItemBlock(item);\n\t\t\t\tif (refItem.is(\"element\", \"listItem\") && item.is(\"element\", \"paragraph\"))\n /**\n\t\t\t\t* When paragraphs or a plain text list is pasted into a simple list, convert\n\t\t\t\t* the `<paragraphs>' to `<listItem>' to avoid breaking the target list.\n\t\t\t\t*\n\t\t\t\t* See https://github.com/ckeditor/ckeditor5/issues/13826.\n\t\t\t\t*/\n\t\t\t\twriter.rename(item, \"listItem\");\n\t\t\t\twriter.setAttributes({\n\t\t\t\t\tlistIndent: (isListItem ? item.getAttribute(\"listIndent\") : 0) + indentDiff,\n\t\t\t\t\tlistItemId: isListItem ? item.getAttribute(\"listItemId\") : ListItemUid.next(),\n\t\t\t\t\tlistType: refType\n\t\t\t\t}, item);\n\t\t\t}\n\t\t});\n\t};\n}\n/**\n* Decides whether the merge should be accompanied by the model's `deleteContent()`, for instance, to get rid of the inline\n* content in the selection or take advantage of the heuristics in `deleteContent()` that helps convert lists into paragraphs\n* in certain cases.\n*/\nfunction shouldMergeOnBlocksContentLevel(model, direction) {\n\tconst selection = model.document.selection;\n\tif (!selection.isCollapsed) return !getSelectedBlockObject(model);\n\tif (direction === \"forward\") return true;\n\tconst positionParent = selection.getFirstPosition().parent;\n\tconst previousSibling = positionParent.previousSibling;\n\tif (model.schema.isObject(previousSibling)) return false;\n\tif (previousSibling.isEmpty) return true;\n\treturn isSingleListItem([positionParent, previousSibling]);\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* Helper method for creating toolbar and menu buttons and linking them with an appropriate command.\n*\n* @internal\n* @param editor The editor instance to which the UI component will be added.\n* @param commandName The name of the command.\n* @param label The button label.\n* @param icon The source of the icon.\n*/\nfunction createUIComponents(editor, commandName, label, icon) {\n\teditor.ui.componentFactory.add(commandName, () => {\n\t\tconst buttonView = _createButton(ButtonView, editor, commandName, label, icon);\n\t\tbuttonView.set({\n\t\t\ttooltip: true,\n\t\t\tisToggleable: true\n\t\t});\n\t\treturn buttonView;\n\t});\n\teditor.ui.componentFactory.add(`menuBar:${commandName}`, () => {\n\t\tconst buttonView = _createButton(MenuBarMenuListItemButtonView, editor, commandName, label, icon);\n\t\tbuttonView.set({\n\t\t\trole: \"menuitemcheckbox\",\n\t\t\tisToggleable: true\n\t\t});\n\t\treturn buttonView;\n\t});\n}\n/**\n* Creates a button to use either in toolbar or in menu bar.\n*/\nfunction _createButton(ButtonClass, editor, commandName, label, icon) {\n\tconst command = editor.commands.get(commandName);\n\tconst view = new ButtonClass(editor.locale);\n\tview.set({\n\t\tlabel,\n\t\ticon\n\t});\n\tview.bind(\"isOn\", \"isEnabled\").to(command, \"value\", \"isEnabled\");\n\tview.on(\"execute\", () => {\n\t\teditor.execute(commandName);\n\t\teditor.editing.view.focus();\n\t});\n\treturn view;\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 list/list/listui\n*/\n/**\n* The list UI feature. It introduces the `'numberedList'` and `'bulletedList'` buttons that\n* allow to convert paragraphs to and from list items and indent or outdent them.\n*/\nvar ListUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst t = this.editor.t;\n\t\tif (!this.editor.ui.componentFactory.has(\"numberedList\")) createUIComponents(this.editor, \"numberedList\", t(\"Numbered List\"), IconNumberedList);\n\t\tif (!this.editor.ui.componentFactory.has(\"bulletedList\")) createUIComponents(this.editor, \"bulletedList\", t(\"Bulleted List\"), IconBulletedList);\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 list/list\n*/\n/**\n* The list feature.\n*\n* This is a \"glue\" plugin that loads the {@link module:list/list/listediting~ListEditing  list\n* editing feature} and {@link module:list/list/listui~ListUI list UI feature}.\n*/\nvar List = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing, ListUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"List\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 list/listproperties/liststartcommand\n*/\n/**\n* The list start index command. It changes the `listStart` attribute of the selected list items,\n* letting the user to choose the starting point of an ordered list.\n* It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n*/\nvar ListStartCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst value = this._getValue();\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options Execute options.\n\t* @param options.startIndex The list start index.\n\t*/\n\texecute({ startIndex = 1 } = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tlet blocks = Array.from(document.selection.getSelectedBlocks()).filter((block) => isListItemBlock(block) && isNumberedListType(block.getAttribute(\"listType\")));\n\t\tblocks = expandListBlocksToCompleteList(blocks);\n\t\tmodel.change((writer) => {\n\t\t\tfor (const block of blocks) writer.setAttribute(\"listStart\", startIndex >= 0 ? startIndex : 1, block);\n\t\t});\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst document = this.editor.model.document;\n\t\tconst block = first(document.selection.getSelectedBlocks());\n\t\tif (block && isListItemBlock(block) && isNumberedListType(block.getAttribute(\"listType\"))) return block.getAttribute(\"listStart\");\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 list/listproperties/utils/style\n*/\nconst LIST_STYLE_TO_LIST_TYPE = {};\nconst LIST_STYLE_TO_TYPE_ATTRIBUTE = {};\nconst TYPE_ATTRIBUTE_TO_LIST_STYLE = {};\nconst LIST_STYLE_TYPES = [\n\t{\n\t\tlistStyle: \"disc\",\n\t\ttypeAttribute: \"disc\",\n\t\tlistType: \"bulleted\"\n\t},\n\t{\n\t\tlistStyle: \"circle\",\n\t\ttypeAttribute: \"circle\",\n\t\tlistType: \"bulleted\"\n\t},\n\t{\n\t\tlistStyle: \"square\",\n\t\ttypeAttribute: \"square\",\n\t\tlistType: \"bulleted\"\n\t},\n\t{\n\t\tlistStyle: \"decimal\",\n\t\ttypeAttribute: \"1\",\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"decimal-leading-zero\",\n\t\ttypeAttribute: null,\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"lower-roman\",\n\t\ttypeAttribute: \"i\",\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"upper-roman\",\n\t\ttypeAttribute: \"I\",\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"lower-alpha\",\n\t\ttypeAttribute: \"a\",\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"upper-alpha\",\n\t\ttypeAttribute: \"A\",\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"lower-latin\",\n\t\ttypeAttribute: \"a\",\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"upper-latin\",\n\t\ttypeAttribute: \"A\",\n\t\tlistType: \"numbered\"\n\t},\n\t{\n\t\tlistStyle: \"arabic-indic\",\n\t\ttypeAttribute: null,\n\t\tlistType: \"numbered\"\n\t}\n];\nfor (const { listStyle, typeAttribute, listType } of LIST_STYLE_TYPES) {\n\tLIST_STYLE_TO_LIST_TYPE[listStyle] = listType;\n\tLIST_STYLE_TO_TYPE_ATTRIBUTE[listStyle] = typeAttribute;\n\tif (typeAttribute) TYPE_ATTRIBUTE_TO_LIST_STYLE[typeAttribute] = listStyle;\n}\n/**\n* Gets all the style types supported by given list type.\n*\n* @internal\n*/\nfunction getAllSupportedStyleTypes() {\n\treturn LIST_STYLE_TYPES.map((x) => x.listStyle);\n}\n/**\n* Checks whether the given list-style-type is supported by numbered or bulleted list.\n*\n* @internal\n*/\nfunction getListTypeFromListStyleType(listStyleType) {\n\treturn LIST_STYLE_TO_LIST_TYPE[listStyleType] || null;\n}\n/**\n* Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.\n*\n* @internal\n*/\nfunction getListStyleTypeFromTypeAttribute(value) {\n\treturn TYPE_ATTRIBUTE_TO_LIST_STYLE[value] || null;\n}\n/**\n* Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.\n*\n* @internal\n*/\nfunction getTypeAttributeFromListStyleType(value) {\n\treturn LIST_STYLE_TO_TYPE_ATTRIBUTE[value] || null;\n}\n/**\n* Normalizes list style by converting aliases to their canonical form.\n*\n* @internal\n* @param listStyle The list style value to normalize.\n* @returns The canonical form of the list style.\n*\n* @example\n* normalizeListStyle( 'lower-alpha' ); // Returns 'lower-latin'\n* normalizeListStyle( 'upper-alpha' ); // Returns 'upper-latin'\n* normalizeListStyle( 'disc' ); // Returns 'disc'\n*/\nfunction normalizeListStyle(listStyle) {\n\tswitch (listStyle) {\n\t\tcase \"lower-alpha\": return \"lower-latin\";\n\t\tcase \"upper-alpha\": return \"upper-latin\";\n\t\tdefault: return listStyle;\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 list/listproperties/liststylecommand\n*/\n/**\n* The list style command. It changes `listStyle` attribute of the selected list items,\n* letting the user choose styles for the list item markers.\n* It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n*/\nvar ListStyleCommand = class extends Command {\n\t/**\n\t* The default type of the list style.\n\t*/\n\tdefaultType;\n\t/**\n\t* The list of supported style types by this command.\n\t*/\n\t_supportedTypes;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param defaultType The list type that will be used by default if the value was not specified during\n\t* the command execution.\n\t* @param supportedTypes The list of supported style types by this command.\n\t*/\n\tconstructor(editor, defaultType, supportedTypes) {\n\t\tsuper(editor);\n\t\tthis.defaultType = defaultType;\n\t\tthis._supportedTypes = supportedTypes;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options.type The type of the list style, e.g. `'disc'` or `'square'`. If `null` is specified, the default\n\t* style will be applied.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tmodel.change((writer) => {\n\t\t\tthis._tryToConvertItemsToList(options);\n\t\t\tlet blocks = Array.from(document.selection.getSelectedBlocks()).filter((block) => block.hasAttribute(\"listType\"));\n\t\t\tif (!blocks.length) return;\n\t\t\tblocks = expandListBlocksToCompleteList(blocks);\n\t\t\tfor (const block of blocks) writer.setAttribute(\"listStyle\", options.type || this.defaultType, block);\n\t\t});\n\t}\n\t/**\n\t* Checks if the given style type is supported by this plugin.\n\t*/\n\tisStyleTypeSupported(value) {\n\t\tif (!this._supportedTypes) return true;\n\t\treturn this._supportedTypes.includes(value);\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst listItem = first(this.editor.model.document.selection.getSelectedBlocks());\n\t\tif (isListItemBlock(listItem)) return listItem.getAttribute(\"listStyle\");\n\t\treturn null;\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tconst editor = this.editor;\n\t\tconst numberedList = editor.commands.get(\"numberedList\");\n\t\tconst bulletedList = editor.commands.get(\"bulletedList\");\n\t\treturn numberedList.isEnabled || bulletedList.isEnabled;\n\t}\n\t/**\n\t* Check if the provided list style is valid. Also change the selection to a list if it's not set yet.\n\t*\n\t* @param options.type The type of the list style. If `null` is specified, the function does nothing.\n\t*/\n\t_tryToConvertItemsToList(options) {\n\t\tif (!options.type) return;\n\t\tconst listType = getListTypeFromListStyleType(options.type);\n\t\tif (!listType) return;\n\t\tconst editor = this.editor;\n\t\tconst commandName = `${listType}List`;\n\t\tif (!editor.commands.get(commandName).value) editor.execute(commandName);\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 list/listproperties/listreversedcommand\n*/\n/**\n* The list reversed command. It changes the `listReversed` attribute of the selected list items,\n* letting the user to choose the order of an ordered list.\n* It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n*/\nvar ListReversedCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst value = this._getValue();\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options.reversed Whether the list should be reversed.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tlet blocks = Array.from(document.selection.getSelectedBlocks()).filter((block) => isListItemBlock(block) && block.getAttribute(\"listType\") == \"numbered\");\n\t\tblocks = expandListBlocksToCompleteList(blocks);\n\t\tmodel.change((writer) => {\n\t\t\tfor (const block of blocks) writer.setAttribute(\"listReversed\", !!options.reversed, block);\n\t\t});\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*/\n\t_getValue() {\n\t\tconst document = this.editor.model.document;\n\t\tconst block = first(document.selection.getSelectedBlocks());\n\t\tif (isListItemBlock(block) && block.getAttribute(\"listType\") == \"numbered\") return block.getAttribute(\"listReversed\");\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* Returns a converter that consumes the `style`, `reversed`, and `start` attributes.\n* In `style`, it searches for the `list-style-type` definition.\n* If not found, the `\"default\"` value will be used.\n*\n* @internal\n* @param strategy\n*/\nfunction listPropertiesUpcastConverter(strategy) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst { writer, schema, consumable } = conversionApi;\n\t\tif (consumable.test(data.viewItem, strategy.viewConsumables) === false) return;\n\t\tif (!data.modelRange) Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n\t\tlet applied = false;\n\t\tfor (const item of data.modelRange.getItems({ shallow: true })) {\n\t\t\tif (!schema.checkAttribute(item, strategy.attributeName)) continue;\n\t\t\tif (!strategy.appliesToListItem(item)) continue;\n\t\t\tif (item.hasAttribute(strategy.attributeName)) continue;\n\t\t\twriter.setAttribute(strategy.attributeName, strategy.getAttributeOnUpcast(data.viewItem), item);\n\t\t\tapplied = true;\n\t\t}\n\t\tif (applied) consumable.consume(data.viewItem, strategy.viewConsumables);\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 list/listproperties/listpropertiesutils\n*/\n/**\n* A set of helpers related to document lists.\n*/\nvar ListPropertiesUtils = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListPropertiesUtils\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Gets all the style types supported by given list type.\n\t*/\n\tgetAllSupportedStyleTypes() {\n\t\treturn getAllSupportedStyleTypes();\n\t}\n\t/**\n\t* Checks whether the given list-style-type is supported by numbered or bulleted list.\n\t*/\n\tgetListTypeFromListStyleType(listStyleType) {\n\t\treturn getListTypeFromListStyleType(listStyleType);\n\t}\n\t/**\n\t* Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.\n\t*/\n\tgetListStyleTypeFromTypeAttribute(value) {\n\t\treturn getListStyleTypeFromTypeAttribute(value);\n\t}\n\t/**\n\t* Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.\n\t*/\n\tgetTypeAttributeFromListStyleType(value) {\n\t\treturn getTypeAttributeFromListStyleType(value);\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 list/listproperties/utils/config\n*/\n/**\n* Normalizes {@link module:list/listconfig~ListPropertiesConfig} in the configuration of the list properties feature.\n* The structure of normalized list properties options looks as follows:\n*\n* ```ts\n* {\n* \tstyles: {\n* \t\tlistTypes: [ 'bulleted', 'numbered' ],\n* \t\tuseAttribute: false\n* \t},\n* \tstartIndex: true,\n* \treversed: true\n* }\n* ```\n*\n* @internal\n* @param config The list properties {@link module:list/listconfig~ListPropertiesConfig config}.\n* @returns An object with normalized list properties options.\n*/\nfunction getNormalizedConfig(config) {\n\tconst { startIndex, reversed, styles } = config;\n\treturn {\n\t\tstyles: getNormalizedStylesConfig(styles),\n\t\tstartIndex: startIndex || false,\n\t\treversed: reversed || false\n\t};\n}\n/**\n* Normalizes styles in the configuration of the list properties feature.\n* The structure of normalized list properties options looks as follows:\n*\n* ```ts\n* {\n* \tlistTypes: [ 'bulleted', 'numbered' ],\n* \tuseAttribute: false\n* }\n* ```\n*\n* @param styles The list properties styles.\n* @returns An object with normalized list properties styles.\n*/\nfunction getNormalizedStylesConfig(styles) {\n\tconst normalizedConfig = {\n\t\tlistTypes: [\"bulleted\", \"numbered\"],\n\t\tuseAttribute: false,\n\t\tlistStyleTypes: {\n\t\t\tnumbered: [\n\t\t\t\t\"decimal\",\n\t\t\t\t\"decimal-leading-zero\",\n\t\t\t\t\"lower-roman\",\n\t\t\t\t\"upper-roman\",\n\t\t\t\t\"lower-latin\",\n\t\t\t\t\"upper-latin\"\n\t\t\t],\n\t\t\tbulleted: [\n\t\t\t\t\"disc\",\n\t\t\t\t\"circle\",\n\t\t\t\t\"square\"\n\t\t\t]\n\t\t}\n\t};\n\tif (styles === true) return normalizedConfig;\n\tif (!styles) {\n\t\tnormalizedConfig.listTypes = [];\n\t\tnormalizedConfig.listStyleTypes = {};\n\t} else if (Array.isArray(styles) || typeof styles == \"string\") {\n\t\tnormalizedConfig.listTypes = toArray(styles);\n\t\tnormalizedConfig.listStyleTypes = pick(normalizedConfig.listStyleTypes, normalizedConfig.listTypes);\n\t} else {\n\t\tnormalizedConfig.listTypes = styles.listTypes ? toArray(styles.listTypes) : normalizedConfig.listTypes;\n\t\tnormalizedConfig.useAttribute = !!styles.useAttribute;\n\t\tif (styles.listStyleTypes) normalizedConfig.listStyleTypes = styles.listStyleTypes;\n\t\telse normalizedConfig.listStyleTypes = pick(normalizedConfig.listStyleTypes, normalizedConfig.listTypes);\n\t}\n\treturn normalizedConfig;\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 list/listproperties/listpropertiesediting\n*/\nconst DEFAULT_LIST_TYPE$1 = \"default\";\n/**\n* The document list properties engine feature.\n*\n* It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.\n* Read more in {@link module:list/listconfig~ListPropertiesConfig}.\n*/\nvar ListPropertiesEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing, ListPropertiesUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListPropertiesEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"LP\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"list.properties\", {\n\t\t\tstyles: true,\n\t\t\tstartIndex: false,\n\t\t\treversed: false\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst listEditing = editor.plugins.get(ListEditing);\n\t\tconst strategies = createAttributeStrategies$1(editor.config.get(\"list.properties\"));\n\t\tfor (const strategy of strategies) {\n\t\t\tstrategy.addCommand(editor);\n\t\t\tmodel.schema.extend(\"$listItem\", { allowAttributes: strategy.attributeName });\n\t\t\tlistEditing.registerDowncastStrategy({\n\t\t\t\tscope: \"list\",\n\t\t\t\tattributeName: strategy.attributeName,\n\t\t\t\tsetAttributeOnDowncast(writer, attributeValue, viewElement) {\n\t\t\t\t\tstrategy.setAttributeOnDowncast(writer, attributeValue, viewElement);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tfor (const strategy of strategies) {\n\t\t\t\tdispatcher.on(\"element:ol\", listPropertiesUpcastConverter(strategy));\n\t\t\t\tdispatcher.on(\"element:ul\", listPropertiesUpcastConverter(strategy));\n\t\t\t}\n\t\t});\n\t\tlistEditing.on(\"checkAttributes:list\", (evt, { viewElement, modelAttributes, modelReferenceElement }) => {\n\t\t\tfor (const strategy of strategies) {\n\t\t\t\tif (!strategy.appliesToListItem(modelReferenceElement)) continue;\n\t\t\t\tif (strategy.getAttributeOnUpcast(viewElement) != modelAttributes[strategy.attributeName]) {\n\t\t\t\t\tevt.return = true;\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(editor.commands.get(\"indentList\"), \"afterExecute\", (evt, changedBlocks) => {\n\t\t\tmodel.change((writer) => {\n\t\t\t\tfor (const node of changedBlocks) for (const strategy of strategies) if (strategy.appliesToListItem(node)) writer.setAttribute(strategy.attributeName, strategy.defaultValue, node);\n\t\t\t});\n\t\t});\n\t\tlistEditing.on(\"postFixer\", (evt, { listNodes, writer }) => {\n\t\t\tfor (const { node } of listNodes) for (const strategy of strategies) {\n\t\t\t\tif (strategy.hasValidAttribute(node)) continue;\n\t\t\t\tif (strategy.appliesToListItem(node)) writer.setAttribute(strategy.attributeName, strategy.defaultValue, node);\n\t\t\t\telse writer.removeAttribute(strategy.attributeName, node);\n\t\t\t\tevt.return = true;\n\t\t\t}\n\t\t});\n\t\tlistEditing.on(\"postFixer\", (evt, { listNodes, writer }) => {\n\t\t\tfor (const { node, previousNodeInList } of listNodes) {\n\t\t\t\tif (!previousNodeInList) continue;\n\t\t\t\tif (previousNodeInList.getAttribute(\"listType\") != node.getAttribute(\"listType\")) continue;\n\t\t\t\tfor (const strategy of strategies) {\n\t\t\t\t\tconst { attributeName } = strategy;\n\t\t\t\t\tif (!strategy.appliesToListItem(node)) continue;\n\t\t\t\t\tconst value = previousNodeInList.getAttribute(attributeName);\n\t\t\t\t\tif (node.getAttribute(attributeName) != value) {\n\t\t\t\t\t\twriter.setAttribute(attributeName, value, node);\n\t\t\t\t\t\tevt.return = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n/**\n* Creates an array of strategies for dealing with enabled listItem attributes.\n*/\nfunction createAttributeStrategies$1(enabledProperties) {\n\tconst strategies = [];\n\tconst normalizedConfig = getNormalizedConfig(enabledProperties);\n\tif (enabledProperties.styles) {\n\t\tconst useAttribute = normalizedConfig.styles.useAttribute;\n\t\tstrategies.push({\n\t\t\tattributeName: \"listStyle\",\n\t\t\tdefaultValue: DEFAULT_LIST_TYPE$1,\n\t\t\tviewConsumables: { styles: \"list-style-type\" },\n\t\t\taddCommand(editor) {\n\t\t\t\tlet supportedTypes = getAllSupportedStyleTypes();\n\t\t\t\tif (useAttribute) supportedTypes = supportedTypes.filter((styleType) => !!getTypeAttributeFromListStyleType(styleType));\n\t\t\t\teditor.commands.add(\"listStyle\", new ListStyleCommand(editor, DEFAULT_LIST_TYPE$1, supportedTypes));\n\t\t\t},\n\t\t\tappliesToListItem(item) {\n\t\t\t\treturn item.getAttribute(\"listType\") == \"numbered\" || item.getAttribute(\"listType\") == \"bulleted\";\n\t\t\t},\n\t\t\thasValidAttribute(item) {\n\t\t\t\tif (!this.appliesToListItem(item)) return !item.hasAttribute(\"listStyle\");\n\t\t\t\tif (!item.hasAttribute(\"listStyle\")) return false;\n\t\t\t\tconst value = item.getAttribute(\"listStyle\");\n\t\t\t\tif (value == DEFAULT_LIST_TYPE$1) return true;\n\t\t\t\treturn getListTypeFromListStyleType(value) == item.getAttribute(\"listType\");\n\t\t\t},\n\t\t\tsetAttributeOnDowncast(writer, listStyle, element) {\n\t\t\t\tif (listStyle && listStyle !== DEFAULT_LIST_TYPE$1) {\n\t\t\t\t\tif (useAttribute) {\n\t\t\t\t\t\tconst value = getTypeAttributeFromListStyleType(listStyle);\n\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\twriter.setAttribute(\"type\", value, element);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.setStyle(\"list-style-type\", listStyle, element);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twriter.removeStyle(\"list-style-type\", element);\n\t\t\t\twriter.removeAttribute(\"type\", element);\n\t\t\t},\n\t\t\tgetAttributeOnUpcast(listParent) {\n\t\t\t\tconst style = listParent.getStyle(\"list-style-type\");\n\t\t\t\tif (style) return normalizeListStyle(style);\n\t\t\t\tconst attribute = listParent.getAttribute(\"type\");\n\t\t\t\tif (attribute) return getListStyleTypeFromTypeAttribute(attribute);\n\t\t\t\treturn DEFAULT_LIST_TYPE$1;\n\t\t\t}\n\t\t});\n\t}\n\tif (enabledProperties.reversed) strategies.push({\n\t\tattributeName: \"listReversed\",\n\t\tdefaultValue: false,\n\t\tviewConsumables: { attributes: \"reversed\" },\n\t\taddCommand(editor) {\n\t\t\teditor.commands.add(\"listReversed\", new ListReversedCommand(editor));\n\t\t},\n\t\tappliesToListItem(item) {\n\t\t\treturn item.getAttribute(\"listType\") == \"numbered\";\n\t\t},\n\t\thasValidAttribute(item) {\n\t\t\treturn this.appliesToListItem(item) == item.hasAttribute(\"listReversed\");\n\t\t},\n\t\tsetAttributeOnDowncast(writer, listReversed, element) {\n\t\t\tif (listReversed) writer.setAttribute(\"reversed\", \"reversed\", element);\n\t\t\telse writer.removeAttribute(\"reversed\", element);\n\t\t},\n\t\tgetAttributeOnUpcast(listParent) {\n\t\t\treturn listParent.hasAttribute(\"reversed\");\n\t\t}\n\t});\n\tif (enabledProperties.startIndex) strategies.push({\n\t\tattributeName: \"listStart\",\n\t\tdefaultValue: 1,\n\t\tviewConsumables: { attributes: \"start\" },\n\t\taddCommand(editor) {\n\t\t\teditor.commands.add(\"listStart\", new ListStartCommand(editor));\n\t\t},\n\t\tappliesToListItem(item) {\n\t\t\treturn isNumberedListType(item.getAttribute(\"listType\"));\n\t\t},\n\t\thasValidAttribute(item) {\n\t\t\treturn this.appliesToListItem(item) == item.hasAttribute(\"listStart\");\n\t\t},\n\t\tsetAttributeOnDowncast(writer, listStart, element) {\n\t\t\tif (listStart == 0 || listStart > 1) writer.setAttribute(\"start\", listStart, element);\n\t\t\telse writer.removeAttribute(\"start\", element);\n\t\t},\n\t\tgetAttributeOnUpcast(listParent) {\n\t\t\tconst startAttributeValue = listParent.getAttribute(\"start\");\n\t\t\treturn startAttributeValue >= 0 ? startAttributeValue : 1;\n\t\t}\n\t});\n\treturn strategies;\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 list/listproperties/ui/listpropertiesview\n*/\n/**\n* The list properties view to be displayed in the list dropdown.\n*\n* Contains a grid of available list styles and, for numbered list, also the list start index and reversed fields.\n*\n* @internal\n*/\nvar ListPropertiesView = class extends View {\n\t/**\n\t* A collection of the child views.\n\t*/\n\tchildren;\n\t/**\n\t* A view that renders the grid of list styles.\n\t*/\n\tstylesView = null;\n\t/**\n\t* A collapsible view that hosts additional list property fields ({@link #startIndexFieldView} and\n\t* {@link #reversedSwitchButtonView}) to visually separate them from the {@link #stylesView grid of styles}.\n\t*\n\t* **Note**: Only present when:\n\t* * the view represents **numbered** list properties,\n\t* * and the {@link #stylesView} is rendered,\n\t* * and either {@link #startIndexFieldView} or {@link #reversedSwitchButtonView} is rendered.\n\t*\n\t* @readonly\n\t*/\n\tadditionalPropertiesCollapsibleView = null;\n\t/**\n\t* A labeled number field allowing the user to set the start index of the list.\n\t*\n\t* **Note**: Only present when the view represents **numbered** list properties.\n\t*\n\t* @readonly\n\t*/\n\tstartIndexFieldView = null;\n\t/**\n\t* A switch button allowing the user to make the edited list reversed.\n\t*\n\t* **Note**: Only present when the view represents **numbered** list properties.\n\t*\n\t* @readonly\n\t*/\n\treversedSwitchButtonView = null;\n\t/**\n\t* Tracks information about the DOM focus in the view.\n\t*/\n\tfocusTracker = new FocusTracker();\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes = new KeystrokeHandler();\n\t/**\n\t* A collection of views that can be focused in the properties view.\n\t*/\n\tfocusables = new ViewCollection();\n\t/**\n\t* Helps cycling over {@link #focusables} in the view.\n\t*/\n\tfocusCycler;\n\t/**\n\t* Creates an instance of the list properties view.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param options Options of the view.\n\t* @param options.enabledProperties An object containing the configuration of enabled list property names.\n\t* Allows conditional rendering the sub-components of the properties view.\n\t* @param options.styleButtonViews A list of style buttons to be rendered\n\t* inside the styles grid. The grid will not be rendered when `enabledProperties` does not include the `'styles'` key.\n\t* @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).\n\t*/\n\tconstructor(locale, { enabledProperties, styleButtonViews, styleGridAriaLabel }) {\n\t\tsuper(locale);\n\t\tconst elementCssClasses = [\"ck\", \"ck-list-properties\"];\n\t\tthis.children = this.createCollection();\n\t\tthis.focusCycler = new FocusCycler({\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tif (styleButtonViews && styleButtonViews.length) {\n\t\t\tthis.stylesView = this._createStylesView(styleButtonViews, styleGridAriaLabel);\n\t\t\tthis.children.add(this.stylesView);\n\t\t} else elementCssClasses.push(\"ck-list-properties_without-styles\");\n\t\tif (enabledProperties.startIndex || enabledProperties.reversed) {\n\t\t\tthis._addNumberedListPropertyViews(enabledProperties);\n\t\t\telementCssClasses.push(\"ck-list-properties_with-numbered-properties\");\n\t\t}\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: elementCssClasses },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this.stylesView) {\n\t\t\tthis.focusables.add(this.stylesView);\n\t\t\tthis.focusTracker.add(this.stylesView.element);\n\t\t\tif (this.startIndexFieldView || this.reversedSwitchButtonView) {\n\t\t\t\tthis.focusables.add(this.children.last.buttonView);\n\t\t\t\tthis.focusTracker.add(this.children.last.buttonView.element);\n\t\t\t}\n\t\t\tfor (const item of this.stylesView.children) this.stylesView.focusTracker.add(item.element);\n\t\t\taddKeyboardHandlingForGrid({\n\t\t\t\tkeystrokeHandler: this.stylesView.keystrokes,\n\t\t\t\tfocusTracker: this.stylesView.focusTracker,\n\t\t\t\tgridItems: this.stylesView.children,\n\t\t\t\tnumberOfColumns: () => global.window.getComputedStyle(this.stylesView.element).getPropertyValue(\"grid-template-columns\").split(\" \").length,\n\t\t\t\tuiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n\t\t\t});\n\t\t}\n\t\tif (this.startIndexFieldView) {\n\t\t\tthis.focusables.add(this.startIndexFieldView);\n\t\t\tthis.focusTracker.add(this.startIndexFieldView.element);\n\t\t\tconst stopPropagation = (data) => data.stopPropagation();\n\t\t\tthis.keystrokes.set(\"arrowright\", stopPropagation);\n\t\t\tthis.keystrokes.set(\"arrowleft\", stopPropagation);\n\t\t\tthis.keystrokes.set(\"arrowup\", stopPropagation);\n\t\t\tthis.keystrokes.set(\"arrowdown\", stopPropagation);\n\t\t}\n\t\tif (this.reversedSwitchButtonView) {\n\t\t\tthis.focusables.add(this.reversedSwitchButtonView);\n\t\t\tthis.focusTracker.add(this.reversedSwitchButtonView.element);\n\t\t}\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.focusCycler.focusFirst();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocusLast() {\n\t\tthis.focusCycler.focusLast();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Creates the list styles grid.\n\t*\n\t* @param styleButtons Buttons to be placed in the grid.\n\t* @param styleGridAriaLabel The assistive technology label of the grid.\n\t*/\n\t_createStylesView(styleButtons, styleGridAriaLabel) {\n\t\tconst stylesView = new View(this.locale);\n\t\tstylesView.children = stylesView.createCollection();\n\t\tstylesView.children.addMany(styleButtons);\n\t\tstylesView.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\t\"aria-label\": styleGridAriaLabel,\n\t\t\t\tclass: [\"ck\", \"ck-list-styles-list\"]\n\t\t\t},\n\t\t\tchildren: stylesView.children\n\t\t});\n\t\tstylesView.children.delegate(\"execute\").to(this);\n\t\tstylesView.focus = function() {\n\t\t\tfor (const child of this.children) if (child instanceof ButtonView && child.isOn) {\n\t\t\t\tchild.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.children.first.focus();\n\t\t};\n\t\tstylesView.focusTracker = new FocusTracker();\n\t\tstylesView.keystrokes = new KeystrokeHandler();\n\t\tstylesView.render();\n\t\tstylesView.keystrokes.listenTo(stylesView.element);\n\t\treturn stylesView;\n\t}\n\t/**\n\t* Renders {@link #startIndexFieldView} and/or {@link #reversedSwitchButtonView} depending on the configuration of the properties view.\n\t*\n\t* @param enabledProperties An object containing the configuration of enabled list property names\n\t* (see {@link #constructor}).\n\t*/\n\t_addNumberedListPropertyViews(enabledProperties) {\n\t\tconst t = this.locale.t;\n\t\tconst numberedPropertyViews = [];\n\t\tif (enabledProperties.startIndex) {\n\t\t\tthis.startIndexFieldView = this._createStartIndexField();\n\t\t\tnumberedPropertyViews.push(this.startIndexFieldView);\n\t\t}\n\t\tif (enabledProperties.reversed) {\n\t\t\tthis.reversedSwitchButtonView = this._createReversedSwitchButton();\n\t\t\tnumberedPropertyViews.push(this.reversedSwitchButtonView);\n\t\t}\n\t\tif (this.stylesView) {\n\t\t\tthis.additionalPropertiesCollapsibleView = new CollapsibleView(this.locale, numberedPropertyViews);\n\t\t\tthis.additionalPropertiesCollapsibleView.set({\n\t\t\t\tlabel: t(\"List properties\"),\n\t\t\t\tisCollapsed: true\n\t\t\t});\n\t\t\tthis.additionalPropertiesCollapsibleView.buttonView.bind(\"isEnabled\").toMany(numberedPropertyViews, \"isEnabled\", (...areEnabled) => areEnabled.some((isEnabled) => isEnabled));\n\t\t\tthis.additionalPropertiesCollapsibleView.buttonView.on(\"change:isEnabled\", (evt, data, isEnabled) => {\n\t\t\t\tif (!isEnabled) this.additionalPropertiesCollapsibleView.isCollapsed = true;\n\t\t\t});\n\t\t\tthis.children.add(this.additionalPropertiesCollapsibleView);\n\t\t} else this.children.addMany(numberedPropertyViews);\n\t}\n\t/**\n\t* Creates the list start index labeled field.\n\t*/\n\t_createStartIndexField() {\n\t\tconst t = this.locale.t;\n\t\tconst startIndexFieldView = new LabeledFieldView(this.locale, createLabeledInputNumber);\n\t\tstartIndexFieldView.set({\n\t\t\tlabel: t(\"Start at\"),\n\t\t\tclass: \"ck-numbered-list-properties__start-index\"\n\t\t});\n\t\tstartIndexFieldView.fieldView.set({\n\t\t\tmin: 0,\n\t\t\tstep: 1,\n\t\t\tvalue: 1,\n\t\t\tinputMode: \"numeric\"\n\t\t});\n\t\tstartIndexFieldView.fieldView.on(\"input\", () => {\n\t\t\tconst inputElement = startIndexFieldView.fieldView.element;\n\t\t\tconst startIndex = inputElement.valueAsNumber;\n\t\t\tif (Number.isNaN(startIndex)) {\n\t\t\t\tstartIndexFieldView.errorText = t(\"Invalid start index value.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!inputElement.checkValidity()) startIndexFieldView.errorText = t(\"Start index must be greater than 0.\");\n\t\t\telse this.fire(\"listStart\", { startIndex });\n\t\t});\n\t\treturn startIndexFieldView;\n\t}\n\t/**\n\t* Creates the reversed list switch button.\n\t*/\n\t_createReversedSwitchButton() {\n\t\tconst t = this.locale.t;\n\t\tconst reversedButtonView = new SwitchButtonView(this.locale);\n\t\treversedButtonView.set({\n\t\t\twithText: true,\n\t\t\tlabel: t(\"Reversed order\"),\n\t\t\tclass: \"ck-numbered-list-properties__reversed-order\"\n\t\t});\n\t\treversedButtonView.delegate(\"execute\").to(this, \"listReversed\");\n\t\treturn reversedButtonView;\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 list/listproperties/listpropertiesui\n*/\n/**\n* The list properties UI plugin. It introduces the extended `'bulletedList'` and `'numberedList'` toolbar\n* buttons that allow users to control such aspects of list as the marker, start index or order.\n*\n* **Note**: Buttons introduced by this plugin override implementations from the {@link module:list/list/listui~ListUI}\n* (because they share the same names).\n*/\nvar ListPropertiesUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListPropertiesUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst propertiesConfig = editor.config.get(\"list.properties\");\n\t\tconst normalizedConfig = getNormalizedConfig(propertiesConfig);\n\t\tconst stylesListTypes = normalizedConfig.styles.listTypes;\n\t\tif (stylesListTypes.includes(\"bulleted\")) {\n\t\t\tconst styleDefinitions = [\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the disc list style\"),\n\t\t\t\t\ttooltip: t(\"Disc\"),\n\t\t\t\t\ttype: \"disc\",\n\t\t\t\t\ticon: IconListStyleDisc\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the circle list style\"),\n\t\t\t\t\ttooltip: t(\"Circle\"),\n\t\t\t\t\ttype: \"circle\",\n\t\t\t\t\ticon: IconListStyleCircle\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the square list style\"),\n\t\t\t\t\ttooltip: t(\"Square\"),\n\t\t\t\t\ttype: \"square\",\n\t\t\t\t\ticon: IconListStyleSquare\n\t\t\t\t}\n\t\t\t];\n\t\t\tconst buttonLabel = t(\"Bulleted List\");\n\t\t\tconst styleGridAriaLabel = t(\"Bulleted list styles toolbar\");\n\t\t\tconst commandName = \"bulletedList\";\n\t\t\teditor.ui.componentFactory.add(commandName, getDropdownViewCreator({\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tparentCommandName: commandName,\n\t\t\t\tbuttonLabel,\n\t\t\t\tbuttonIcon: IconBulletedList,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t}));\n\t\t\teditor.ui.componentFactory.add(`menuBar:${commandName}`, getMenuBarStylesMenuCreator({\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tparentCommandName: commandName,\n\t\t\t\tbuttonLabel,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t}));\n\t\t}\n\t\tif (stylesListTypes.includes(\"numbered\") || propertiesConfig.startIndex || propertiesConfig.reversed) {\n\t\t\tconst styleDefinitions = [\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the decimal list style\"),\n\t\t\t\t\ttooltip: t(\"Decimal\"),\n\t\t\t\t\ttype: \"decimal\",\n\t\t\t\t\ticon: IconListStyleDecimal\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the decimal with leading zero list style\"),\n\t\t\t\t\ttooltip: t(\"Decimal with leading zero\"),\n\t\t\t\t\ttype: \"decimal-leading-zero\",\n\t\t\t\t\ticon: IconListStyleDecimalLeadingZero\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the lower–roman list style\"),\n\t\t\t\t\ttooltip: t(\"Lower–roman\"),\n\t\t\t\t\ttype: \"lower-roman\",\n\t\t\t\t\ticon: IconListStyleLowerRoman\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the upper–roman list style\"),\n\t\t\t\t\ttooltip: t(\"Upper-roman\"),\n\t\t\t\t\ttype: \"upper-roman\",\n\t\t\t\t\ticon: IconListStyleUpperRoman\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the lower–latin list style\"),\n\t\t\t\t\ttooltip: t(\"Lower-latin\"),\n\t\t\t\t\ttype: \"lower-latin\",\n\t\t\t\t\ticon: IconListStyleLowerLatin\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the upper–latin list style\"),\n\t\t\t\t\ttooltip: t(\"Upper-latin\"),\n\t\t\t\t\ttype: \"upper-latin\",\n\t\t\t\t\ticon: IconListStyleUpperLatin\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Toggle the arabic-indic list style\"),\n\t\t\t\t\ttooltip: t(\"Arabic-indic\"),\n\t\t\t\t\ttype: \"arabic-indic\",\n\t\t\t\t\ticon: IconListStyleArabicIndic\n\t\t\t\t}\n\t\t\t];\n\t\t\tconst buttonLabel = t(\"Numbered List\");\n\t\t\tconst styleGridAriaLabel = t(\"Numbered list styles toolbar\");\n\t\t\tconst commandName = \"numberedList\";\n\t\t\teditor.ui.componentFactory.add(commandName, getDropdownViewCreator({\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tparentCommandName: commandName,\n\t\t\t\tbuttonLabel,\n\t\t\t\tbuttonIcon: IconNumberedList,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t}));\n\t\t\tif (stylesListTypes.includes(\"numbered\")) editor.ui.componentFactory.add(`menuBar:${commandName}`, getMenuBarStylesMenuCreator({\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tparentCommandName: commandName,\n\t\t\t\tbuttonLabel,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t}));\n\t\t}\n\t}\n};\n/**\n* A helper that returns a function that creates a split button with a toolbar in the dropdown,\n* which in turn contains buttons allowing users to change list styles in the context of the current selection.\n*\n* @param options.editor\n* @param options.normalizedConfig List properties configuration.\n* @param options.parentCommandName The name of the higher-order editor command associated with\n* the set of particular list styles (e.g. \"bulletedList\" for \"disc\", \"circle\", and \"square\" styles).\n* @param options.buttonLabel Label of the main part of the split button.\n* @param options.buttonIcon The SVG string of an icon for the main part of the split button.\n* @param options.styleGridAriaLabel The ARIA label for the styles grid in the split button dropdown.\n* @param options.styleDefinitions Definitions of the style buttons.\n* @returns A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.\n*/\nfunction getDropdownViewCreator({ editor, normalizedConfig, parentCommandName, buttonLabel, buttonIcon, styleGridAriaLabel, styleDefinitions }) {\n\tconst parentCommand = editor.commands.get(parentCommandName);\n\treturn (locale) => {\n\t\tconst dropdownView = createDropdown(locale, SplitButtonView);\n\t\tconst mainButtonView = dropdownView.buttonView;\n\t\tdropdownView.bind(\"isEnabled\").to(parentCommand);\n\t\tdropdownView.class = \"ck-list-styles-dropdown\";\n\t\tmainButtonView.on(\"execute\", () => {\n\t\t\teditor.execute(parentCommandName);\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\tmainButtonView.set({\n\t\t\tlabel: buttonLabel,\n\t\t\ticon: buttonIcon,\n\t\t\ttooltip: true,\n\t\t\tisToggleable: true\n\t\t});\n\t\tmainButtonView.bind(\"isOn\").to(parentCommand, \"value\", (value) => !!value);\n\t\tdropdownView.once(\"change:isOpen\", () => {\n\t\t\tconst listPropertiesView = createListPropertiesView({\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tdropdownView,\n\t\t\t\tparentCommandName,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t});\n\t\t\tdropdownView.panelView.children.add(listPropertiesView);\n\t\t});\n\t\tdropdownView.on(\"execute\", () => {\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn dropdownView;\n\t};\n}\n/**\n* A helper that returns a function (factory) that creates individual buttons used by users to change styles\n* of lists.\n*\n* @param options.editor\n* @param options.listStyleCommand The instance of the `ListStylesCommand` class.\n* @param options.parentCommandName The name of the higher-order command associated with a\n* particular list style (e.g. \"bulletedList\" is associated with \"square\" and \"numberedList\" is associated with \"roman\").\n* @returns A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.\n*/\nfunction getStyleButtonCreator({ editor, listStyleCommand, parentCommandName }) {\n\tconst locale = editor.locale;\n\tconst parentCommand = editor.commands.get(parentCommandName);\n\treturn ({ label, type, icon, tooltip }) => {\n\t\tconst button = new ButtonView(locale);\n\t\tbutton.set({\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip\n\t\t});\n\t\tbutton.bind(\"isOn\").to(listStyleCommand, \"value\", (value) => value === type);\n\t\tbutton.on(\"execute\", () => {\n\t\t\tif (parentCommand.value) {\n\t\t\t\tif (listStyleCommand.value === type) editor.execute(parentCommandName);\n\t\t\t\telse if (listStyleCommand.value !== type) editor.execute(\"listStyle\", { type });\n\t\t\t} else editor.model.change(() => {\n\t\t\t\teditor.execute(\"listStyle\", { type });\n\t\t\t});\n\t\t});\n\t\treturn button;\n\t};\n}\n/**\n* A helper that creates the properties view for the individual style dropdown.\n*\n* @param options.editor Editor instance.\n* @param options.normalizedConfig List properties configuration.\n* @param options.dropdownView Styles dropdown view that hosts the properties view.\n* @param options.parentCommandName The name of the higher-order editor command associated with\n* the set of particular list styles (e.g. \"bulletedList\" for \"disc\", \"circle\", and \"square\" styles).\n* @param options.styleDefinitions Definitions of the style buttons.\n* @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).\n*/\nfunction createListPropertiesView({ editor, normalizedConfig, dropdownView, parentCommandName, styleDefinitions, styleGridAriaLabel }) {\n\tconst locale = editor.locale;\n\tconst enabledProperties = {\n\t\t...normalizedConfig,\n\t\t...parentCommandName != \"numberedList\" ? {\n\t\t\tstartIndex: false,\n\t\t\treversed: false\n\t\t} : null\n\t};\n\tconst listType = parentCommandName.replace(\"List\", \"\");\n\tlet styleButtonViews = null;\n\tif (normalizedConfig.styles.listTypes.includes(listType)) {\n\t\tconst listStyleCommand = editor.commands.get(\"listStyle\");\n\t\tconst styleButtonCreator = getStyleButtonCreator({\n\t\t\teditor,\n\t\t\tparentCommandName,\n\t\t\tlistStyleCommand\n\t\t});\n\t\tconst configuredListStylesTypes = normalizedConfig.styles.listStyleTypes;\n\t\tlet filteredDefinitions = styleDefinitions;\n\t\t/* v8 ignore next -- Normalized config always provides listStyleTypes for enabled styles. */\n\t\tif (configuredListStylesTypes) {\n\t\t\tconst allowedTypes = configuredListStylesTypes[listType];\n\t\t\tif (allowedTypes) filteredDefinitions = styleDefinitions.filter((def) => allowedTypes.includes(def.type));\n\t\t}\n\t\tconst isStyleTypeSupported = getStyleTypeSupportChecker(listStyleCommand);\n\t\tstyleButtonViews = filteredDefinitions.filter(isStyleTypeSupported).map(styleButtonCreator);\n\t}\n\tconst listPropertiesView = new ListPropertiesView(locale, {\n\t\tstyleGridAriaLabel,\n\t\tenabledProperties,\n\t\tstyleButtonViews\n\t});\n\tif (normalizedConfig.styles.listTypes.includes(listType)) focusChildOnDropdownOpen(dropdownView, () => {\n\t\treturn listPropertiesView.stylesView.children.find((child) => child.isOn);\n\t});\n\tif (enabledProperties.startIndex) {\n\t\tconst listStartCommand = editor.commands.get(\"listStart\");\n\t\tlistPropertiesView.startIndexFieldView.bind(\"isEnabled\").to(listStartCommand);\n\t\tlistPropertiesView.startIndexFieldView.fieldView.bind(\"value\").to(listStartCommand);\n\t\tlistPropertiesView.on(\"listStart\", (evt, data) => editor.execute(\"listStart\", data));\n\t}\n\tif (enabledProperties.reversed) {\n\t\tconst listReversedCommand = editor.commands.get(\"listReversed\");\n\t\tlistPropertiesView.reversedSwitchButtonView.bind(\"isEnabled\").to(listReversedCommand);\n\t\tlistPropertiesView.reversedSwitchButtonView.bind(\"isOn\").to(listReversedCommand, \"value\", (value) => !!value);\n\t\tlistPropertiesView.on(\"listReversed\", () => {\n\t\t\tconst isReversed = listReversedCommand.value;\n\t\t\teditor.execute(\"listReversed\", { reversed: !isReversed });\n\t\t});\n\t}\n\tlistPropertiesView.delegate(\"execute\").to(dropdownView);\n\treturn listPropertiesView;\n}\n/**\n* A helper that creates the list style submenu for menu bar.\n*\n* @param editor Editor instance.\n* @param normalizedConfig List properties configuration.\n* @param parentCommandName Name of the list command.\n* @param buttonLabel Label of the menu button.\n* @param styleGridAriaLabel ARIA label of the styles grid.\n*/\nfunction getMenuBarStylesMenuCreator({ editor, normalizedConfig, parentCommandName, buttonLabel, styleGridAriaLabel, styleDefinitions }) {\n\treturn (locale) => {\n\t\tconst menuView = new MenuBarMenuView(locale);\n\t\tconst listCommand = editor.commands.get(parentCommandName);\n\t\tconst listStyleCommand = editor.commands.get(\"listStyle\");\n\t\tconst isStyleTypeSupported = getStyleTypeSupportChecker(listStyleCommand);\n\t\tconst styleButtonCreator = getStyleButtonCreator({\n\t\t\teditor,\n\t\t\tparentCommandName,\n\t\t\tlistStyleCommand\n\t\t});\n\t\tconst configuredListStylesTypes = normalizedConfig.styles.listStyleTypes;\n\t\tlet filteredDefinitions = styleDefinitions;\n\t\t/* v8 ignore next -- Normalized config always provides listStyleTypes for enabled styles. */\n\t\tif (configuredListStylesTypes) {\n\t\t\tconst allowedTypes = configuredListStylesTypes[listCommand.type];\n\t\t\tif (allowedTypes) filteredDefinitions = styleDefinitions.filter((def) => allowedTypes.includes(def.type));\n\t\t}\n\t\tconst styleButtonViews = filteredDefinitions.filter(isStyleTypeSupported).map(styleButtonCreator);\n\t\tconst listPropertiesView = new ListPropertiesView(locale, {\n\t\t\tstyleGridAriaLabel,\n\t\t\tenabledProperties: {\n\t\t\t\t...normalizedConfig,\n\t\t\t\tstartIndex: false,\n\t\t\t\treversed: false\n\t\t\t},\n\t\t\tstyleButtonViews\n\t\t});\n\t\tlistPropertiesView.delegate(\"execute\").to(menuView);\n\t\tmenuView.buttonView.set({\n\t\t\tlabel: buttonLabel,\n\t\t\ticon: parentCommandName === \"bulletedList\" ? IconBulletedList : IconNumberedList\n\t\t});\n\t\tmenuView.panelView.children.add(listPropertiesView);\n\t\tmenuView.bind(\"isEnabled\").to(listCommand, \"isEnabled\");\n\t\tmenuView.on(\"execute\", () => {\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn menuView;\n\t};\n}\nfunction getStyleTypeSupportChecker(listStyleCommand) {\n\tif (typeof listStyleCommand.isStyleTypeSupported == \"function\") return (styleDefinition) => listStyleCommand.isStyleTypeSupported(styleDefinition.type);\n\telse return () => 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 list/listproperties\n*/\n/**\n* The list properties feature.\n*\n* This is a \"glue\" plugin that loads the\n* {@link module:list/listproperties/listpropertiesediting~ListPropertiesEditing list properties\n* editing feature} and the {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.\n*/\nvar ListProperties = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListPropertiesEditing, ListPropertiesUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ListProperties\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 list/todolist/checktodolistcommand\n*/\n/**\n* The check to-do command.\n*\n* The command is registered by the {@link module:list/todolist/todolistediting~TodoListEditing} as\n* the `checkTodoList` editor command.\n*/\nvar CheckTodoListCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.on(\"execute\", () => {\n\t\t\tthis.refresh();\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* Updates the command's {@link #value} and {@link #isEnabled} properties based on the current selection.\n\t*/\n\trefresh() {\n\t\tconst selectedElements = this._getSelectedItems();\n\t\tthis.value = this._getValue(selectedElements);\n\t\tthis.isEnabled = !!selectedElements.length;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply\n\t* the attribute. Otherwise, the command will remove the attribute. If not set, the command will look for its current\n\t* value to decide what it should do.\n\t*/\n\texecute(options = {}) {\n\t\tthis.editor.model.change((writer) => {\n\t\t\tconst selectedElements = this._getSelectedItems();\n\t\t\tconst value = options.forceValue === void 0 ? !this._getValue(selectedElements) : options.forceValue;\n\t\t\tfor (const element of selectedElements) if (value) writer.setAttribute(\"todoListChecked\", true, element);\n\t\t\telse writer.removeAttribute(\"todoListChecked\", element);\n\t\t});\n\t}\n\t/**\n\t* Returns a value for the command.\n\t*/\n\t_getValue(selectedElements) {\n\t\treturn selectedElements.every((element) => element.getAttribute(\"todoListChecked\"));\n\t}\n\t/**\n\t* Gets all to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t*/\n\t_getSelectedItems() {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selectionRange = model.document.selection.getFirstRange();\n\t\tconst startElement = selectionRange.start.parent;\n\t\tconst elements = [];\n\t\tif (schema.checkAttribute(startElement, \"todoListChecked\")) elements.push(...getAllListItemBlocks(startElement));\n\t\tfor (const item of selectionRange.getItems({ shallow: true })) if (schema.checkAttribute(item, \"todoListChecked\") && !elements.includes(item)) elements.push(...getAllListItemBlocks(item));\n\t\treturn elements;\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 list/todolist/todocheckboxchangeobserver\n*/\n/**\n* Observes all to-do list checkboxes state changes.\n*\n* Note that this observer is not available by default. To make it available it needs to be added to\n* {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n*\n* @internal\n*/\nvar TodoCheckboxChangeObserver = class extends DomEventObserver {\n\t/**\n\t* @inheritDoc\n\t*/\n\tdomEventType = [\"change\"];\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tif (domEvent.target) {\n\t\t\tconst viewTarget = this.view.domConverter.mapDomToView(domEvent.target);\n\t\t\tif (viewTarget && viewTarget.is(\"element\", \"input\") && viewTarget.getAttribute(\"type\") == \"checkbox\" && viewTarget.findAncestor({ classes: \"todo-list__label\" })) this.fire(\"todoCheckboxChange\", domEvent);\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 list/todolist/todolistediting\n*/\nconst ITEM_TOGGLE_KEYSTROKE$1 = /* #__PURE__ */ parseKeystroke(\"Ctrl+Enter\");\n/**\n* The engine of the to-do list feature. It handles creating, editing and removing to-do lists and their items.\n*\n* It registers the entire functionality of the {@link module:list/list/listediting~ListEditing list editing plugin}\n* and extends it with the commands:\n*\n* - `'todoList'`,\n* - `'checkTodoList'`,\n*/\nvar TodoListEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TodoListEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editing = editor.editing;\n\t\tconst listEditing = editor.plugins.get(ListEditing);\n\t\tconst elementName = editor.config.get(\"list.multiBlock\") ? \"paragraph\" : \"listItem\";\n\t\teditor.commands.add(\"todoList\", new ListCommand(editor, \"todo\"));\n\t\teditor.commands.add(\"checkTodoList\", new CheckTodoListCommand(editor));\n\t\tediting.view.addObserver(TodoCheckboxChangeObserver);\n\t\tmodel.schema.extend(\"$listItem\", { allowAttributes: \"todoListChecked\" });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tconst item = context.last;\n\t\t\tif (!item.getAttribute(\"listItemId\") || item.getAttribute(\"listType\") != \"todo\") return false;\n\t\t}, \"todoListChecked\");\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:input\", todoItemInputConverter());\n\t\t\tdispatcher.on(\"element:li\", todoListItemUpcastConverter(), { priority: \"low\" });\n\t\t\tdispatcher.on(\"element:label\", elementUpcastConsumingConverter({\n\t\t\t\tname: \"label\",\n\t\t\t\tclasses: \"todo-list__label\"\n\t\t\t}));\n\t\t\tdispatcher.on(\"element:label\", elementUpcastConsumingConverter({\n\t\t\t\tname: \"label\",\n\t\t\t\tclasses: [\"todo-list__label\", \"todo-list__label_without-description\"]\n\t\t\t}));\n\t\t\tdispatcher.on(\"element:span\", elementUpcastConsumingConverter({\n\t\t\t\tname: \"span\",\n\t\t\t\tclasses: \"todo-list__label__description\"\n\t\t\t}));\n\t\t\tdispatcher.on(\"element:ul\", attributeUpcastConsumingConverter({\n\t\t\t\tname: \"ul\",\n\t\t\t\tclasses: \"todo-list\"\n\t\t\t}));\n\t\t});\n\t\teditor.conversion.for(\"downcast\").elementToElement({\n\t\t\tmodel: elementName,\n\t\t\tview: (element, { writer }) => {\n\t\t\t\tif (isDescriptionBlock(element, listEditing.getListAttributeNames())) return writer.createContainerElement(\"span\", { class: \"todo-list__label__description\" });\n\t\t\t},\n\t\t\tconverterPriority: \"highest\"\n\t\t});\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope: \"list\",\n\t\t\tattributeName: \"listType\",\n\t\t\tsetAttributeOnDowncast(writer, value, element) {\n\t\t\t\tif (value == \"todo\") writer.addClass(\"todo-list\", element);\n\t\t\t\telse writer.removeClass(\"todo-list\", element);\n\t\t\t}\n\t\t});\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope: \"itemMarker\",\n\t\t\tattributeName: \"todoListChecked\",\n\t\t\tcreateElement(writer, modelElement, { dataPipeline }) {\n\t\t\t\tif (modelElement.getAttribute(\"listType\") != \"todo\") return null;\n\t\t\t\tconst viewElement = writer.createUIElement(\"input\", {\n\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t...modelElement.getAttribute(\"todoListChecked\") ? { checked: \"checked\" } : null,\n\t\t\t\t\t...dataPipeline ? { disabled: \"disabled\" } : { tabindex: \"-1\" }\n\t\t\t\t});\n\t\t\t\tif (dataPipeline) return viewElement;\n\t\t\t\tconst wrapper = writer.createContainerElement(\"span\", { contenteditable: \"false\" }, viewElement);\n\t\t\t\twrapper.getFillerOffset = () => null;\n\t\t\t\treturn wrapper;\n\t\t\t},\n\t\t\tcanWrapElement(modelElement) {\n\t\t\t\treturn isDescriptionBlock(modelElement, listEditing.getListAttributeNames());\n\t\t\t},\n\t\t\tcreateWrapperElement(writer, modelElement, { dataPipeline }) {\n\t\t\t\tconst classes = [\"todo-list__label\"];\n\t\t\t\tif (!isDescriptionBlock(modelElement, listEditing.getListAttributeNames())) classes.push(\"todo-list__label_without-description\");\n\t\t\t\treturn writer.createAttributeElement(dataPipeline ? \"label\" : \"span\", { class: classes.join(\" \") });\n\t\t\t}\n\t\t});\n\t\tlistEditing.on(\"checkElement\", (evt, { modelElement, viewElement }) => {\n\t\t\tconst isFirstTodoModelParagraphBlock = isDescriptionBlock(modelElement, listEditing.getListAttributeNames());\n\t\t\tif (viewElement.hasClass(\"todo-list__label__description\") != isFirstTodoModelParagraphBlock) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t});\n\t\tlistEditing.on(\"checkElement\", (evt, { modelElement, viewElement }) => {\n\t\t\tconst isFirstTodoModelItemBlock = modelElement.getAttribute(\"listType\") == \"todo\" && isFirstBlockOfListItem(modelElement);\n\t\t\tlet hasViewItemMarker = false;\n\t\t\tconst viewWalker = editor.editing.view.createPositionBefore(viewElement).getWalker({ direction: \"backward\" });\n\t\t\tfor (const { item } of viewWalker) {\n\t\t\t\tif (item.is(\"element\") && editor.editing.mapper.toModelElement(item)) break;\n\t\t\t\tif (item.is(\"element\", \"input\") && item.getAttribute(\"type\") == \"checkbox\") hasViewItemMarker = true;\n\t\t\t}\n\t\t\tif (hasViewItemMarker != isFirstTodoModelItemBlock) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t});\n\t\tlistEditing.on(\"postFixer\", (evt, { listNodes, writer }) => {\n\t\t\tfor (const { node, previousNodeInList } of listNodes) {\n\t\t\t\tif (!previousNodeInList) continue;\n\t\t\t\tif (previousNodeInList.getAttribute(\"listItemId\") != node.getAttribute(\"listItemId\")) continue;\n\t\t\t\tconst previousHasAttribute = previousNodeInList.hasAttribute(\"todoListChecked\");\n\t\t\t\tconst nodeHasAttribute = node.hasAttribute(\"todoListChecked\");\n\t\t\t\tif (nodeHasAttribute && !previousHasAttribute) {\n\t\t\t\t\twriter.removeAttribute(\"todoListChecked\", node);\n\t\t\t\t\tevt.return = true;\n\t\t\t\t} else if (!nodeHasAttribute && previousHasAttribute) {\n\t\t\t\t\twriter.setAttribute(\"todoListChecked\", true, node);\n\t\t\t\t\tevt.return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmodel.document.registerPostFixer((writer) => {\n\t\t\tconst changes = model.document.differ.getChanges();\n\t\t\tlet wasFixed = false;\n\t\t\tfor (const change of changes) if (change.type == \"attribute\" && change.attributeKey == \"listType\") {\n\t\t\t\tconst element = change.range.start.nodeAfter;\n\t\t\t\tif (change.attributeOldValue == \"todo\" && element.hasAttribute(\"todoListChecked\")) {\n\t\t\t\t\twriter.removeAttribute(\"todoListChecked\", element);\n\t\t\t\t\twasFixed = true;\n\t\t\t\t}\n\t\t\t} else if (change.type == \"insert\" && change.name != \"$text\") {\n\t\t\t\tfor (const { item } of writer.createRangeOn(change.position.nodeAfter)) if (item.is(\"element\") && item.getAttribute(\"listType\") != \"todo\" && item.hasAttribute(\"todoListChecked\")) {\n\t\t\t\t\twriter.removeAttribute(\"todoListChecked\", item);\n\t\t\t\t\twasFixed = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wasFixed;\n\t\t});\n\t\tthis.listenTo(editing.view.document, \"keydown\", (evt, data) => {\n\t\t\tif (getCode(data) === ITEM_TOGGLE_KEYSTROKE$1) {\n\t\t\t\teditor.execute(\"checkTodoList\");\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(editing.view.document, \"todoCheckboxChange\", (evt, data) => {\n\t\t\tconst viewTarget = data.target;\n\t\t\tif (!viewTarget || !viewTarget.is(\"element\", \"input\")) return;\n\t\t\tconst viewPositionAfter = editing.view.createPositionAfter(viewTarget);\n\t\t\tconst modelElement = editing.mapper.toModelPosition(viewPositionAfter).parent;\n\t\t\t/* v8 ignore next -- Defensive guard for externally fired observer events outside to-do list inputs. */\n\t\t\tif (modelElement && isListItemBlock(modelElement) && modelElement.getAttribute(\"listType\") == \"todo\") this._handleCheckmarkChange(modelElement);\n\t\t});\n\t\tthis.listenTo(editing.view.document, \"arrowKey\", jumpOverCheckmarkOnSideArrowKeyPress$1(model, editor.locale), { context: \"$text\" });\n\t\tthis.listenTo(editing.mapper, \"viewToModelPosition\", (evt, data) => {\n\t\t\tconst viewParent = data.viewPosition.parent;\n\t\t\tconst isStartOfListItem = viewParent.is(\"attributeElement\", \"li\") && data.viewPosition.offset == 0;\n\t\t\tconst isStartOfListLabel = isLabelElement(viewParent) && data.viewPosition.offset <= 1;\n\t\t\tconst isInInputWrapper = viewParent.is(\"element\", \"span\") && viewParent.getAttribute(\"contenteditable\") == \"false\" && isLabelElement(viewParent.parent);\n\t\t\tif (!isStartOfListItem && !isStartOfListLabel && !isInInputWrapper) return;\n\t\t\tconst nodeAfter = data.modelPosition.nodeAfter;\n\t\t\t/* v8 ignore next -- Defensive mapper guard for view positions outside to-do list widgets. */\n\t\t\tif (nodeAfter && nodeAfter.getAttribute(\"listType\") == \"todo\") data.modelPosition = model.createPositionAt(nodeAfter, 0);\n\t\t}, { priority: \"low\" });\n\t\tthis._initAriaAnnouncements();\n\t}\n\t/**\n\t* Handles the checkbox element change, moves the selection to the corresponding model item to make it possible\n\t* to toggle the `todoListChecked` attribute using the command, and restores the selection position.\n\t*\n\t* Some say it's a hack :) Moving the selection only for executing the command on a certain node and restoring it after,\n\t* is not a clear solution. We need to design an API for using commands beyond the selection range.\n\t* See https://github.com/ckeditor/ckeditor5/issues/1954.\n\t*/\n\t_handleCheckmarkChange(listItem) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst previousSelectionRanges = Array.from(model.document.selection.getRanges());\n\t\tmodel.change((writer) => {\n\t\t\twriter.setSelection(listItem, \"end\");\n\t\t\teditor.execute(\"checkTodoList\");\n\t\t\twriter.setSelection(previousSelectionRanges);\n\t\t});\n\t}\n\t/**\n\t* Observe when user enters or leaves todo list and set proper aria value in global live announcer.\n\t* This allows screen readers to indicate when the user has entered and left the specified todo list.\n\t*\n\t* @internal\n\t*/\n\t_initAriaAnnouncements() {\n\t\tconst { model, ui, t } = this.editor;\n\t\tlet lastFocusedCodeBlock = null;\n\t\tif (!ui) return;\n\t\tmodel.document.selection.on(\"change:range\", () => {\n\t\t\tconst focusParent = model.document.selection.focus.parent;\n\t\t\tconst lastElementIsTodoList = isTodoListItemElement(lastFocusedCodeBlock);\n\t\t\tconst currentElementIsTodoList = isTodoListItemElement(focusParent);\n\t\t\tif (lastElementIsTodoList && !currentElementIsTodoList) ui.ariaLiveAnnouncer.announce(t(\"Leaving a to-do list\"));\n\t\t\telse if (!lastElementIsTodoList && currentElementIsTodoList) ui.ariaLiveAnnouncer.announce(t(\"Entering a to-do list\"));\n\t\t\tlastFocusedCodeBlock = focusParent;\n\t\t});\n\t}\n};\n/**\n* Returns an upcast converter for to-do list items.\n*/\nfunction todoListItemUpcastConverter() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst { writer, schema } = conversionApi;\n\t\tif (!data.modelRange) return;\n\t\tconst groupedItems = Array.from(data.modelRange.getItems({ shallow: true })).filter((item) => item.getAttribute(\"listType\") === \"todo\" && schema.checkAttribute(item, \"listItemId\")).reduce((acc, item) => {\n\t\t\tconst listItemId = item.getAttribute(\"listItemId\");\n\t\t\tif (!acc.has(listItemId)) acc.set(listItemId, getAllListItemBlocks(item));\n\t\t\treturn acc;\n\t\t}, /* @__PURE__ */ new Map());\n\t\tfor (const [, items] of groupedItems.entries()) if (items.some((item) => item.getAttribute(\"todoListChecked\"))) for (const item of items) writer.setAttribute(\"todoListChecked\", true, item);\n\t};\n}\n/**\n* Returns an upcast converter that detects a to-do list checkbox and marks the list item as a to-do list.\n*/\nfunction todoItemInputConverter() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst modelCursor = data.modelCursor;\n\t\tconst modelItem = modelCursor.parent;\n\t\tconst viewItem = data.viewItem;\n\t\tif (!conversionApi.consumable.test(viewItem, { name: true })) return;\n\t\tif (viewItem.getAttribute(\"type\") != \"checkbox\" || !modelCursor.isAtStart || !modelItem.hasAttribute(\"listType\")) return;\n\t\tconversionApi.consumable.consume(viewItem, { name: true });\n\t\tconst writer = conversionApi.writer;\n\t\twriter.setAttribute(\"listType\", \"todo\", modelItem);\n\t\tif (data.viewItem.hasAttribute(\"checked\")) writer.setAttribute(\"todoListChecked\", true, modelItem);\n\t\tdata.modelRange = writer.createRange(modelCursor);\n\t};\n}\n/**\n* Returns an upcast converter that consumes element matching the given matcher pattern.\n*/\nfunction elementUpcastConsumingConverter(matcherPattern) {\n\tconst matcher = new Matcher(matcherPattern);\n\treturn (evt, data, conversionApi) => {\n\t\tconst matcherResult = matcher.match(data.viewItem);\n\t\tif (!matcherResult) return;\n\t\tif (!conversionApi.consumable.consume(data.viewItem, matcherResult.match)) return;\n\t\tObject.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n\t};\n}\n/**\n* Returns an upcast converter that consumes attributes matching the given matcher pattern.\n*/\nfunction attributeUpcastConsumingConverter(matcherPattern) {\n\tconst matcher = new Matcher(matcherPattern);\n\treturn (evt, data, conversionApi) => {\n\t\tconst matcherResult = matcher.match(data.viewItem);\n\t\tif (!matcherResult) return;\n\t\tconst match = matcherResult.match;\n\t\tmatch.name = false;\n\t\tconversionApi.consumable.consume(data.viewItem, match);\n\t};\n}\n/**\n* Returns true if the given list item block should be converted as a description block of a to-do list item.\n*/\nfunction isDescriptionBlock(modelElement, listAttributeNames) {\n\treturn (modelElement.is(\"element\", \"paragraph\") || modelElement.is(\"element\", \"listItem\")) && modelElement.getAttribute(\"listType\") == \"todo\" && isFirstBlockOfListItem(modelElement) && hasOnlyListAttributes(modelElement, listAttributeNames);\n}\n/**\n* Returns true if only attributes from the given list are present on the model element.\n*/\nfunction hasOnlyListAttributes(modelElement, attributeNames) {\n\tfor (const attributeKey of modelElement.getAttributeKeys()) {\n\t\tif (attributeKey.startsWith(\"selection:\")) continue;\n\t\tif (!attributeNames.includes(attributeKey)) return false;\n\t}\n\treturn true;\n}\n/**\n* Jump at the start and end of a to-do list item.\n*/\nfunction jumpOverCheckmarkOnSideArrowKeyPress$1(model, locale) {\n\treturn (eventInfo, domEventData) => {\n\t\tconst direction = getLocalizedArrowKeyCodeDirection(domEventData.keyCode, locale.contentLanguageDirection);\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\t\tif (!selection.isCollapsed) return;\n\t\tconst position = selection.getFirstPosition();\n\t\tconst parent = position.parent;\n\t\tif (direction == \"right\" && position.isAtEnd) {\n\t\t\tconst newRange = schema.getNearestSelectionRange(model.createPositionAfter(parent), \"forward\");\n\t\t\tif (!newRange) return;\n\t\t\tconst newRangeParent = newRange.start.parent;\n\t\t\tif (newRangeParent && isListItemBlock(newRangeParent) && newRangeParent.getAttribute(\"listType\") == \"todo\") {\n\t\t\t\tmodel.change((writer) => writer.setSelection(newRange));\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\tdomEventData.stopPropagation();\n\t\t\t\teventInfo.stop();\n\t\t\t}\n\t\t} else if (direction == \"left\" && position.isAtStart && isListItemBlock(parent) && parent.getAttribute(\"listType\") == \"todo\") {\n\t\t\tconst newRange = schema.getNearestSelectionRange(model.createPositionBefore(parent), \"backward\");\n\t\t\tif (!newRange) return;\n\t\t\tmodel.change((writer) => writer.setSelection(newRange));\n\t\t\tdomEventData.preventDefault();\n\t\t\tdomEventData.stopPropagation();\n\t\t\teventInfo.stop();\n\t\t}\n\t};\n}\n/**\n* Returns true if the given element is a label element of a to-do list item.\n*/\nfunction isLabelElement(viewElement) {\n\treturn !!viewElement && viewElement.is(\"attributeElement\") && viewElement.hasClass(\"todo-list__label\");\n}\n/**\n* Returns true if the given element is a list item model element of a to-do list.\n*/\nfunction isTodoListItemElement(element) {\n\tif (!element) return false;\n\tif (!element.is(\"element\", \"paragraph\") && !element.is(\"element\", \"listItem\")) return false;\n\treturn element.getAttribute(\"listType\") == \"todo\";\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 list/todolist/todolistui\n*/\n/**\n* The to-do list UI feature. It introduces the `'todoList'` button that\n* allows to convert elements to and from to-do list items and to indent or outdent them.\n*/\nvar TodoListUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TodoListUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst t = this.editor.t;\n\t\tcreateUIComponents(this.editor, \"todoList\", t(\"To-do List\"), IconTodoList);\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 list/todolist\n*/\n/**\n* The to-do list feature.\n*\n* This is a \"glue\" plugin that loads the {@link module:list/todolist/todolistediting~TodoListEditing to-do list\n* editing feature} and the {@link module:list/todolist/todolistui~TodoListUI to-do list UI feature}.\n*/\nvar TodoList = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TodoListEditing, TodoListUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TodoList\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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* The list command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.\n*/\nvar LegacyListCommand = class extends Command {\n\t/**\n\t* The type of the list created by the command.\n\t*/\n\ttype;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param type List type that will be handled by this command.\n\t*/\n\tconstructor(editor, type) {\n\t\tsuper(editor);\n\t\tthis.type = type;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Executes the list command.\n\t*\n\t* @fires execute\n\t* @param options Command options.\n\t* @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the\n\t* selected items and potentially the neighbor elements to the proper list items. If set to `false`, it will convert selected elements\n\t* to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst blocks = Array.from(document.selection.getSelectedBlocks()).filter((block) => checkCanBecomeListItem(block, model.schema));\n\t\tconst turnOff = options.forceValue !== void 0 ? !options.forceValue : this.value;\n\t\tmodel.change((writer) => {\n\t\t\tif (turnOff) {\n\t\t\t\tlet next = blocks[blocks.length - 1].nextSibling;\n\t\t\t\tlet currentIndent = Number.POSITIVE_INFINITY;\n\t\t\t\tlet changes = [];\n\t\t\t\twhile (next && next.name == \"listItem\" && next.getAttribute(\"listIndent\") !== 0) {\n\t\t\t\t\tconst indent = next.getAttribute(\"listIndent\");\n\t\t\t\t\tif (indent < currentIndent) currentIndent = indent;\n\t\t\t\t\tconst newIndent = indent - currentIndent;\n\t\t\t\t\tchanges.push({\n\t\t\t\t\t\telement: next,\n\t\t\t\t\t\tlistIndent: newIndent\n\t\t\t\t\t});\n\t\t\t\t\tnext = next.nextSibling;\n\t\t\t\t}\n\t\t\t\tchanges = changes.reverse();\n\t\t\t\tfor (const item of changes) writer.setAttribute(\"listIndent\", item.listIndent, item.element);\n\t\t\t}\n\t\t\tif (!turnOff) {\n\t\t\t\tlet lowestIndent = Number.POSITIVE_INFINITY;\n\t\t\t\tfor (const item of blocks) if (item.is(\"element\", \"listItem\") && item.getAttribute(\"listIndent\") < lowestIndent) lowestIndent = item.getAttribute(\"listIndent\");\n\t\t\t\tlowestIndent = lowestIndent === 0 ? 1 : lowestIndent;\n\t\t\t\t_fixType(blocks, true, lowestIndent);\n\t\t\t\t_fixType(blocks, false, lowestIndent);\n\t\t\t}\n\t\t\tfor (const element of blocks.reverse()) if (turnOff && element.name == \"listItem\") writer.rename(element, \"paragraph\");\n\t\t\telse if (!turnOff && element.name != \"listItem\") {\n\t\t\t\twriter.setAttributes({\n\t\t\t\t\tlistType: this.type,\n\t\t\t\t\tlistIndent: 0\n\t\t\t\t}, element);\n\t\t\t\twriter.rename(element, \"listItem\");\n\t\t\t} else if (!turnOff && element.name == \"listItem\" && element.getAttribute(\"listType\") != this.type) writer.setAttribute(\"listType\", this.type, element);\n\t\t\t/**\n\t\t\t* Event fired by the {@link #execute} method.\n\t\t\t*\n\t\t\t* It allows to execute an action after executing the {@link ~ListCommand#execute} method, for example adjusting\n\t\t\t* attributes of changed blocks.\n\t\t\t*\n\t\t\t* @protected\n\t\t\t* @event _executeCleanup\n\t\t\t*/\n\t\t\tthis.fire(\"_executeCleanup\", blocks);\n\t\t});\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst listItem = first(this.editor.model.document.selection.getSelectedBlocks());\n\t\treturn !!listItem && listItem.is(\"element\", \"listItem\") && listItem.getAttribute(\"listType\") == this.type;\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tif (this.value) return true;\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst schema = this.editor.model.schema;\n\t\tconst firstBlock = first(selection.getSelectedBlocks());\n\t\tif (!firstBlock) return false;\n\t\treturn checkCanBecomeListItem(firstBlock, schema);\n\t}\n};\n/**\n* Helper function used when one or more list item have their type changed. Fixes type of other list items\n* that are affected by the change (are in same lists) but are not directly in selection. The function got extracted\n* not to duplicated code, as same fix has to be performed before and after selection.\n*\n* @param blocks Blocks that are in selection.\n* @param isBackward Specified whether fix will be applied for blocks before first selected block (`true`)\n* or blocks after last selected block (`false`).\n* @param lowestIndent Lowest indent among selected blocks.\n*/\nfunction _fixType(blocks, isBackward, lowestIndent) {\n\tconst startingItem = isBackward ? blocks[0] : blocks[blocks.length - 1];\n\tif (startingItem.is(\"element\", \"listItem\")) {\n\t\tlet item = startingItem[isBackward ? \"previousSibling\" : \"nextSibling\"];\n\t\tlet currentIndent = startingItem.getAttribute(\"listIndent\");\n\t\twhile (item && item.is(\"element\", \"listItem\") && item.getAttribute(\"listIndent\") >= lowestIndent) {\n\t\t\tif (currentIndent > item.getAttribute(\"listIndent\")) currentIndent = item.getAttribute(\"listIndent\");\n\t\t\tif (item.getAttribute(\"listIndent\") == currentIndent) blocks[isBackward ? \"unshift\" : \"push\"](item);\n\t\t\titem = item[isBackward ? \"previousSibling\" : \"nextSibling\"];\n\t\t}\n\t}\n}\n/**\n* Checks whether the given block can be replaced by a listItem.\n*\n* @param block A block to be tested.\n* @param schema The schema of the document.\n*/\nfunction checkCanBecomeListItem(block, schema) {\n\treturn schema.checkChild(block.parent, \"listItem\") && !schema.isObject(block);\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* The list indent command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.\n*/\nvar LegacyIndentCommand = class extends Command {\n\t/**\n\t* Determines by how much the command will change the list item's indent attribute.\n\t*/\n\t_indentBy;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param indentDirection The direction of indent. If it is equal to `backward`, the command will outdent a list item.\n\t*/\n\tconstructor(editor, indentDirection) {\n\t\tsuper(editor);\n\t\tthis._indentBy = indentDirection == \"forward\" ? 1 : -1;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tlet itemsToChange = Array.from(doc.selection.getSelectedBlocks());\n\t\tmodel.change((writer) => {\n\t\t\tconst lastItem = itemsToChange[itemsToChange.length - 1];\n\t\t\tlet next = lastItem.nextSibling;\n\t\t\twhile (next && next.name == \"listItem\" && next.getAttribute(\"listIndent\") > lastItem.getAttribute(\"listIndent\")) {\n\t\t\t\titemsToChange.push(next);\n\t\t\t\tnext = next.nextSibling;\n\t\t\t}\n\t\t\tif (this._indentBy < 0) itemsToChange = itemsToChange.reverse();\n\t\t\tfor (const item of itemsToChange) {\n\t\t\t\tconst indent = item.getAttribute(\"listIndent\") + this._indentBy;\n\t\t\t\tif (indent < 0) writer.rename(item, \"paragraph\");\n\t\t\t\telse writer.setAttribute(\"listIndent\", indent, item);\n\t\t\t}\n\t\t\tthis.fire(\"_executeCleanup\", itemsToChange);\n\t\t});\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tconst listItem = first(this.editor.model.document.selection.getSelectedBlocks());\n\t\tif (!listItem || !listItem.is(\"element\", \"listItem\")) return false;\n\t\tif (this._indentBy > 0) {\n\t\t\tconst indent = listItem.getAttribute(\"listIndent\");\n\t\t\tconst type = listItem.getAttribute(\"listType\");\n\t\t\tlet prev = listItem.previousSibling;\n\t\t\twhile (prev && prev.is(\"element\", \"listItem\") && prev.getAttribute(\"listIndent\") >= indent) {\n\t\t\t\tif (prev.getAttribute(\"listIndent\") == indent) return prev.getAttribute(\"listType\") == type;\n\t\t\t\tprev = prev.previousSibling;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn 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 list/legacylist/legacyutils\n*/\n/**\n* Creates a list item {@link module:engine/view/containerelement~ViewContainerElement}.\n*\n* @internal\n* @param writer The writer instance.\n*/\nfunction createViewListItemElement(writer) {\n\tconst viewItem = writer.createContainerElement(\"li\");\n\tviewItem.getFillerOffset = getListItemFillerOffset;\n\treturn viewItem;\n}\n/**\n* Helper function that creates a `<ul><li></li></ul>` or (`<ol>`) structure out of the given `modelItem` model `listItem` element.\n* Then, it binds the created view list item (`<li>`) with the model `listItem` element.\n* The function then returns the created view list item (`<li>`).\n*\n* @internal\n* @param modelItem Model list item.\n* @param conversionApi Conversion interface.\n* @returns View list element.\n*/\nfunction generateLiInUl(modelItem, conversionApi) {\n\tconst mapper = conversionApi.mapper;\n\tconst viewWriter = conversionApi.writer;\n\tconst listType = modelItem.getAttribute(\"listType\") == \"numbered\" ? \"ol\" : \"ul\";\n\tconst viewItem = createViewListItemElement(viewWriter);\n\tconst viewList = viewWriter.createContainerElement(listType, null);\n\tviewWriter.insert(viewWriter.createPositionAt(viewList, 0), viewItem);\n\tmapper.bindElements(modelItem, viewItem);\n\treturn viewItem;\n}\n/**\n* Helper function that inserts a view list at a correct place and merges it with its siblings.\n* It takes a model list item element (`modelItem`) and a corresponding view list item element (`injectedItem`). The view list item\n* should be in a view list element (`<ul>` or `<ol>`) and should be its only child.\n* See comments below to better understand the algorithm.\n*\n* @internal\n* @param modelItem Model list item.\n* @param injectedItem\n* @param conversionApi Conversion interface.\n* @param model The model instance.\n*/\nfunction injectViewList(modelItem, injectedItem, conversionApi, model) {\n\tconst injectedList = injectedItem.parent;\n\tconst mapper = conversionApi.mapper;\n\tconst viewWriter = conversionApi.writer;\n\tlet insertPosition;\n\tconst refItem = getSiblingListItem(modelItem.previousSibling, {\n\t\tsameIndent: true,\n\t\tsmallerIndent: true,\n\t\tlistIndent: modelItem.getAttribute(\"listIndent\")\n\t});\n\tconst prevItem = modelItem.previousSibling;\n\tif (refItem && refItem.getAttribute(\"listIndent\") == modelItem.getAttribute(\"listIndent\")) {\n\t\tconst viewItem = mapper.toViewElement(refItem);\n\t\tinsertPosition = viewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n\t} else if (prevItem && prevItem.name == \"listItem\") {\n\t\tinsertPosition = mapper.toViewPosition(model.createPositionAt(prevItem, \"end\"));\n\t\tconst mappedViewAncestor = mapper.findMappedViewAncestor(insertPosition);\n\t\tconst nestedList = findNestedList(mappedViewAncestor);\n\t\tif (nestedList) insertPosition = viewWriter.createPositionBefore(nestedList);\n\t\telse insertPosition = viewWriter.createPositionAt(mappedViewAncestor, \"end\");\n\t} else insertPosition = mapper.toViewPosition(model.createPositionBefore(modelItem));\n\tinsertPosition = positionAfterUiElements(insertPosition);\n\tviewWriter.insert(insertPosition, injectedList);\n\tif (prevItem && prevItem.name == \"listItem\") {\n\t\tconst prevView = mapper.toViewElement(prevItem);\n\t\tconst walker = viewWriter.createRange(viewWriter.createPositionAt(prevView, 0), insertPosition).getWalker({ ignoreElementEnd: true });\n\t\tfor (const value of walker) if (value.item.is(\"element\", \"li\")) {\n\t\t\tconst breakPosition = viewWriter.breakContainer(viewWriter.createPositionBefore(value.item));\n\t\t\tconst viewList = value.item.parent;\n\t\t\tconst targetPosition = viewWriter.createPositionAt(injectedItem, \"end\");\n\t\t\tmergeViewLists(viewWriter, targetPosition.nodeBefore, targetPosition.nodeAfter);\n\t\t\tviewWriter.move(viewWriter.createRangeOn(viewList), targetPosition);\n\t\t\twalker._position = breakPosition;\n\t\t}\n\t} else {\n\t\tconst nextViewList = injectedList.nextSibling;\n\t\tif (nextViewList && (nextViewList.is(\"element\", \"ul\") || nextViewList.is(\"element\", \"ol\"))) {\n\t\t\tlet lastSubChild = null;\n\t\t\tfor (const child of nextViewList.getChildren()) {\n\t\t\t\tconst modelChild = mapper.toModelElement(child);\n\t\t\t\tif (modelChild && modelChild.getAttribute(\"listIndent\") > modelItem.getAttribute(\"listIndent\")) lastSubChild = child;\n\t\t\t\telse break;\n\t\t\t}\n\t\t\tif (lastSubChild) {\n\t\t\t\tviewWriter.breakContainer(viewWriter.createPositionAfter(lastSubChild));\n\t\t\t\tviewWriter.move(viewWriter.createRangeOn(lastSubChild.parent), viewWriter.createPositionAt(injectedItem, \"end\"));\n\t\t\t}\n\t\t}\n\t}\n\tmergeViewLists(viewWriter, injectedList, injectedList.nextSibling);\n\tmergeViewLists(viewWriter, injectedList.previousSibling, injectedList);\n}\nfunction mergeViewLists(viewWriter, firstList, secondList) {\n\tif (!firstList || !secondList || firstList.name != \"ul\" && firstList.name != \"ol\") return null;\n\tif (firstList.name != secondList.name || firstList.getAttribute(\"class\") !== secondList.getAttribute(\"class\")) return null;\n\treturn viewWriter.mergeContainers(viewWriter.createPositionAfter(firstList));\n}\n/**\n* Helper function that for a given `view.Position`, returns a `view.Position` that is after all `view.UIElement`s that\n* are after the given position.\n*\n* For example:\n* `<container:p>foo^<ui:span></ui:span><ui:span></ui:span>bar</container:p>`\n* For position ^, the position before \"bar\" will be returned.\n*\n* @internal\n*/\nfunction positionAfterUiElements(viewPosition) {\n\treturn viewPosition.getLastMatchingPosition((value) => value.item.is(\"uiElement\"));\n}\n/**\n* Helper function that searches for a previous list item sibling of a given model item that meets the given criteria\n* passed by the options object.\n*\n* @internal\n* @param options Search criteria.\n* @param options.sameIndent Whether the sought sibling should have the same indentation.\n* @param options.smallerIndent Whether the sought sibling should have a smaller indentation.\n* @param options.listIndent The reference indentation.\n* @param options.direction Walking direction.\n*/\nfunction getSiblingListItem(modelItem, options) {\n\tconst sameIndent = !!options.sameIndent;\n\tconst smallerIndent = !!options.smallerIndent;\n\tconst indent = options.listIndent;\n\tlet item = modelItem;\n\twhile (item && item.name == \"listItem\") {\n\t\tconst itemIndent = item.getAttribute(\"listIndent\");\n\t\tif (sameIndent && indent == itemIndent || smallerIndent && indent > itemIndent) return item;\n\t\tif (options.direction === \"forward\") item = item.nextSibling;\n\t\telse item = item.previousSibling;\n\t}\n\treturn null;\n}\n/**\n* Returns a first list view element that is direct child of the given view element.\n*\n* @internal\n*/\nfunction findNestedList(viewElement) {\n\tfor (const node of viewElement.getChildren()) if (node.name == \"ul\" || node.name == \"ol\") return node;\n\treturn null;\n}\n/**\n* Returns an array with all `listItem` elements that represent the same list.\n*\n* It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.\n*\n* Additionally, if the `position` is inside a list item, that list item will be returned as well.\n*\n* @internal\n* @param position Starting position.\n* @param direction Walking direction.\n*/\nfunction getSiblingNodes(position, direction) {\n\tconst items = [];\n\tconst listItem = position.parent;\n\tconst walkerOptions = {\n\t\tignoreElementEnd: false,\n\t\tstartPosition: position,\n\t\tshallow: true,\n\t\tdirection\n\t};\n\tconst limitIndent = listItem.getAttribute(\"listIndent\");\n\tconst nodes = [...new ModelTreeWalker(walkerOptions)].filter((value) => value.item.is(\"element\")).map((value) => value.item);\n\tfor (const element of nodes) {\n\t\tif (!element.is(\"element\", \"listItem\")) break;\n\t\tif (element.getAttribute(\"listIndent\") < limitIndent) break;\n\t\tif (element.getAttribute(\"listIndent\") > limitIndent) continue;\n\t\tif (element.getAttribute(\"listType\") !== listItem.getAttribute(\"listType\")) break;\n\t\tif (element.getAttribute(\"listStyle\") !== listItem.getAttribute(\"listStyle\")) break;\n\t\tif (element.getAttribute(\"listReversed\") !== listItem.getAttribute(\"listReversed\")) break;\n\t\tif (element.getAttribute(\"listStart\") !== listItem.getAttribute(\"listStart\")) break;\n\t\tif (direction === \"backward\") items.unshift(element);\n\t\telse items.push(element);\n\t}\n\treturn items;\n}\n/**\n* Returns an array with all `listItem` elements in the model selection.\n*\n* It returns all the items even if only a part of the list is selected, including items that belong to nested lists.\n* If no list is selected, it returns an empty array.\n* The order of the elements is not specified.\n*\n* @internal\n*/\nfunction getSelectedListItems(model) {\n\tlet listItems = [...model.document.selection.getSelectedBlocks()].filter((element) => element.is(\"element\", \"listItem\")).map((element) => {\n\t\tconst position = model.change((writer) => writer.createPositionAt(element, 0));\n\t\treturn [...getSiblingNodes(position, \"backward\"), ...getSiblingNodes(position, \"forward\")];\n\t}).flat();\n\tlistItems = [...new Set(listItems)];\n\treturn listItems;\n}\nconst BULLETED_LIST_STYLE_TYPES = [\n\t\"disc\",\n\t\"circle\",\n\t\"square\"\n];\nconst NUMBERED_LIST_STYLE_TYPES = [\n\t\"decimal\",\n\t\"decimal-leading-zero\",\n\t\"lower-roman\",\n\t\"upper-roman\",\n\t\"lower-latin\",\n\t\"upper-latin\"\n];\n/**\n* Checks whether the given list-style-type is supported by numbered or bulleted list.\n*\n* @internal\n*/\nfunction getListTypeFromListStyleType$1(listStyleType) {\n\tif (BULLETED_LIST_STYLE_TYPES.includes(listStyleType)) return \"bulleted\";\n\tif (NUMBERED_LIST_STYLE_TYPES.includes(listStyleType)) return \"numbered\";\n\treturn null;\n}\n/**\n* Implementation of getFillerOffset for view list item element.\n*\n* @returns Block filler offset or `null` if block filler is not needed.\n*/\nfunction getListItemFillerOffset() {\n\tconst hasOnlyLists = !this.isEmpty && (this.getChild(0).name == \"ul\" || this.getChild(0).name == \"ol\");\n\tif (this.isEmpty || hasOnlyLists) return 0;\n\treturn getViewFillerOffset.call(this);\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* A set of helpers related to legacy lists.\n*/\nvar LegacyListUtils = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LegacyListUtils\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* Checks whether the given list-style-type is supported by numbered or bulleted list.\n\t*/\n\tgetListTypeFromListStyleType(listStyleType) {\n\t\treturn getListTypeFromListStyleType$1(listStyleType);\n\t}\n\t/**\n\t* Returns an array with all `listItem` elements in the model selection.\n\t*\n\t* It returns all the items even if only a part of the list is selected, including items that belong to nested lists.\n\t* If no list is selected, it returns an empty array.\n\t* The order of the elements is not specified.\n\t*/\n\tgetSelectedListItems(model) {\n\t\treturn getSelectedListItems(model);\n\t}\n\t/**\n\t* Returns an array with all `listItem` elements that represent the same list.\n\t*\n\t* It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.\n\t*\n\t* Additionally, if the `position` is inside a list item, that list item will be returned as well.\n\t*\n\t* @param position Starting position.\n\t* @param direction Walking direction.\n\t*/\n\tgetSiblingNodes(position, direction) {\n\t\treturn getSiblingNodes(position, direction);\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 list/legacylist/legacyconverters\n*/\n/**\n* A model-to-view converter for the `listItem` model element insertion.\n*\n* It creates a `<ul><li></li><ul>` (or `<ol>`) view structure out of a `listItem` model element, inserts it at the correct\n* position, and merges the list with surrounding lists (if available).\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n* @param model Model instance.\n*/\nfunction modelViewInsertion$1(model) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst consumable = conversionApi.consumable;\n\t\tif (!consumable.test(data.item, \"insert\") || !consumable.test(data.item, \"attribute:listType\") || !consumable.test(data.item, \"attribute:listIndent\")) return;\n\t\tconsumable.consume(data.item, \"insert\");\n\t\tconsumable.consume(data.item, \"attribute:listType\");\n\t\tconsumable.consume(data.item, \"attribute:listIndent\");\n\t\tconst modelItem = data.item;\n\t\tconst viewItem = generateLiInUl(modelItem, conversionApi);\n\t\tinjectViewList(modelItem, viewItem, conversionApi, model);\n\t};\n}\n/**\n* A model-to-view converter for the `listItem` model element removal.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove\n* @param model Model instance.\n* @returns Returns a conversion callback.\n*/\nfunction modelViewRemove(model) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst viewItem = conversionApi.mapper.toViewPosition(data.position).getLastMatchingPosition((value) => !value.item.is(\"element\", \"li\")).nodeAfter;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tviewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n\t\tviewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n\t\tconst viewList = viewItem.parent;\n\t\tconst viewListPrev = viewList.previousSibling;\n\t\tconst removeRange = viewWriter.createRangeOn(viewList);\n\t\tconst removed = viewWriter.remove(removeRange);\n\t\tif (viewListPrev && viewListPrev.nextSibling) mergeViewLists(viewWriter, viewListPrev, viewListPrev.nextSibling);\n\t\thoistNestedLists(conversionApi.mapper.toModelElement(viewItem).getAttribute(\"listIndent\") + 1, data.position, removeRange.start, viewItem, conversionApi, model);\n\t\tfor (const child of viewWriter.createRangeIn(removed).getItems()) conversionApi.mapper.unbindViewElement(child);\n\t\tevt.stop();\n\t};\n}\n/**\n* A model-to-view converter for the `type` attribute change on the `listItem` model element.\n*\n* This change means that the `<li>` element parent changes from `<ul>` to `<ol>` (or vice versa). This is accomplished\n* by breaking view elements and changing their name. The next {@link module:list/legacylist/legacyconverters~modelViewMergeAfterChangeType}\n* converter will attempt to merge split nodes.\n*\n* Splitting this conversion into 2 steps makes it possible to add an additional conversion in the middle.\n* Check {@link module:list/legacytodolist/legacytodolistconverters~modelViewChangeType} to see an example of it.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n*/\nconst modelViewChangeType$1 = (evt, data, conversionApi) => {\n\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\tconst viewItem = conversionApi.mapper.toViewElement(data.item);\n\tconst viewWriter = conversionApi.writer;\n\tviewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n\tviewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n\tconst viewList = viewItem.parent;\n\tconst listName = data.attributeNewValue == \"numbered\" ? \"ol\" : \"ul\";\n\tviewWriter.rename(listName, viewList);\n};\n/**\n* A model-to-view converter that attempts to merge nodes split by {@link module:list/legacylist/legacyconverters~modelViewChangeType}.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n*/\nconst modelViewMergeAfterChangeType = (evt, data, conversionApi) => {\n\tconversionApi.consumable.consume(data.item, evt.name);\n\tconst viewList = conversionApi.mapper.toViewElement(data.item).parent;\n\tconst viewWriter = conversionApi.writer;\n\tmergeViewLists(viewWriter, viewList, viewList.nextSibling);\n\tmergeViewLists(viewWriter, viewList.previousSibling, viewList);\n};\n/**\n* A model-to-view converter for the `listIndent` attribute change on the `listItem` model element.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n* @param model Model instance.\n* @returns Returns a conversion callback.\n*/\nfunction modelViewChangeIndent(model) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, \"attribute:listIndent\")) return;\n\t\tconst viewItem = conversionApi.mapper.toViewElement(data.item);\n\t\tconst viewWriter = conversionApi.writer;\n\t\tviewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n\t\tviewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n\t\tconst viewList = viewItem.parent;\n\t\tconst viewListPrev = viewList.previousSibling;\n\t\tconst removeRange = viewWriter.createRangeOn(viewList);\n\t\tviewWriter.remove(removeRange);\n\t\tif (viewListPrev && viewListPrev.nextSibling) mergeViewLists(viewWriter, viewListPrev, viewListPrev.nextSibling);\n\t\thoistNestedLists(data.attributeOldValue + 1, data.range.start, removeRange.start, viewItem, conversionApi, model);\n\t\tinjectViewList(data.item, viewItem, conversionApi, model);\n\t\tfor (const child of data.item.getChildren()) conversionApi.consumable.consume(child, \"insert\");\n\t};\n}\n/**\n* A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter is fired for\n* insert change of every model item, and should be fired before the actual converter. The converter checks whether the inserted\n* model item is a non-`listItem` element. If it is, and it is inserted inside a view list, the converter breaks the\n* list so the model element is inserted to the view parent element corresponding to its model parent element.\n*\n* The converter prevents such situations:\n*\n* ```xml\n* // Model:                        // View:\n* <listItem>foo</listItem>         <ul>\n* <listItem>bar</listItem>             <li>foo</li>\n*                                      <li>bar</li>\n*                                  </ul>\n*\n* // After change:                 // Correct view guaranteed by this converter:\n* <listItem>foo</listItem>         <ul><li>foo</li></ul><p>xxx</p><ul><li>bar</li></ul>\n* <paragraph>xxx</paragraph>       // Instead of this wrong view state:\n* <listItem>bar</listItem>         <ul><li>foo</li><p>xxx</p><li>bar</li></ul>\n* ```\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n*/\nconst modelViewSplitOnInsert = (evt, data, conversionApi) => {\n\tif (!conversionApi.consumable.test(data.item, evt.name)) return;\n\tif (data.item.name != \"listItem\") {\n\t\tlet viewPosition = conversionApi.mapper.toViewPosition(data.range.start);\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst lists = [];\n\t\twhile (viewPosition.parent.name == \"ul\" || viewPosition.parent.name == \"ol\") {\n\t\t\tviewPosition = viewWriter.breakContainer(viewPosition);\n\t\t\tif (viewPosition.parent.name != \"li\") break;\n\t\t\tconst removeStart = viewPosition;\n\t\t\tconst removeEnd = viewWriter.createPositionAt(viewPosition.parent, \"end\");\n\t\t\tif (!removeStart.isEqual(removeEnd)) {\n\t\t\t\tconst removed = viewWriter.remove(viewWriter.createRange(removeStart, removeEnd));\n\t\t\t\tlists.push(removed);\n\t\t\t}\n\t\t\tviewPosition = viewWriter.createPositionAfter(viewPosition.parent);\n\t\t}\n\t\tif (lists.length > 0) {\n\t\t\tfor (let i = 0; i < lists.length; i++) {\n\t\t\t\tconst previousList = viewPosition.nodeBefore;\n\t\t\t\tviewPosition = viewWriter.insert(viewPosition, lists[i]).end;\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tconst mergePos = mergeViewLists(viewWriter, previousList, previousList.nextSibling);\n\t\t\t\t\tif (mergePos && mergePos.parent == previousList) viewPosition.offset--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmergeViewLists(viewWriter, viewPosition.nodeBefore, viewPosition.nodeAfter);\n\t\t}\n\t}\n};\n/**\n* A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter takes care of\n* merging view lists after something is removed or moved from near them.\n*\n* Example:\n*\n* ```xml\n* // Model:                        // View:\n* <listItem>foo</listItem>         <ul><li>foo</li></ul>\n* <paragraph>xxx</paragraph>       <p>xxx</p>\n* <listItem>bar</listItem>         <ul><li>bar</li></ul>\n*\n* // After change:                 // Correct view guaranteed by this converter:\n* <listItem>foo</listItem>         <ul>\n* <listItem>bar</listItem>             <li>foo</li>\n*                                      <li>bar</li>\n*                                  </ul>\n* ```\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove\n*/\nconst modelViewMergeAfter = (evt, data, conversionApi) => {\n\tconst viewPosition = conversionApi.mapper.toViewPosition(data.position);\n\tconst viewItemPrev = viewPosition.nodeBefore;\n\tconst viewItemNext = viewPosition.nodeAfter;\n\tmergeViewLists(conversionApi.writer, viewItemPrev, viewItemNext);\n};\n/**\n* A view-to-model converter that converts the `<li>` view elements into the `listItem` model elements.\n*\n* To set correct values of the `listType` and `listIndent` attributes the converter:\n* * checks `<li>`'s parent,\n* * stores and increases the `conversionApi.store.indent` value when `<li>`'s sub-items are converted.\n*\n* @internal\n* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n*/\nconst viewModelConverter = (evt, data, conversionApi) => {\n\tif (conversionApi.consumable.consume(data.viewItem, { name: true })) {\n\t\tconst writer = conversionApi.writer;\n\t\tconst listItem = writer.createElement(\"listItem\");\n\t\tconst indent = getIndent$1(data.viewItem);\n\t\twriter.setAttribute(\"listIndent\", indent, listItem);\n\t\tconst type = data.viewItem.parent && data.viewItem.parent.name == \"ol\" ? \"numbered\" : \"bulleted\";\n\t\twriter.setAttribute(\"listType\", type, listItem);\n\t\tif (!conversionApi.safeInsert(listItem, data.modelCursor)) return;\n\t\tconst nextPosition = viewToModelListItemChildrenConverter(listItem, data.viewItem.getChildren(), conversionApi);\n\t\tdata.modelRange = writer.createRange(data.modelCursor, nextPosition);\n\t\tconversionApi.updateConversionResult(listItem, data);\n\t}\n};\n/**\n* A view-to-model converter for the `<ul>` and `<ol>` view elements that cleans the input view of garbage.\n* This is mostly to clean whitespaces from between the `<li>` view elements inside the view list element, however, also\n* incorrect data can be cleared if the view was incorrect.\n*\n* @internal\n* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n*/\nconst cleanList = (evt, data, conversionApi) => {\n\tif (conversionApi.consumable.test(data.viewItem, { name: true })) {\n\t\tconst children = Array.from(data.viewItem.getChildren());\n\t\tfor (const child of children) if (!(child.is(\"element\", \"li\") || isList(child))) child._remove();\n\t}\n};\n/**\n* A view-to-model converter for the `<li>` elements that cleans whitespace formatting from the input view.\n*\n* @internal\n* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n*/\nconst cleanListItem = (evt, data, conversionApi) => {\n\tif (conversionApi.consumable.test(data.viewItem, { name: true })) {\n\t\tif (data.viewItem.childCount === 0) return;\n\t\tconst children = [...data.viewItem.getChildren()];\n\t\tlet foundList = false;\n\t\tfor (const child of children) {\n\t\t\tif (foundList && !isList(child)) child._remove();\n\t\t\tif (isList(child)) foundList = true;\n\t\t}\n\t}\n};\n/**\n* Returns a callback for model position to view position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes\n* positions between the `listItem` elements that would be incorrectly mapped because of how list items are represented in the model\n* and in the view.\n*\n* @internal\n*/\nfunction modelToViewPosition(view) {\n\treturn (evt, data) => {\n\t\tif (data.isPhantom) return;\n\t\tconst modelItem = data.modelPosition.nodeBefore;\n\t\tif (modelItem && modelItem.is(\"element\", \"listItem\")) {\n\t\t\tconst viewItem = data.mapper.toViewElement(modelItem);\n\t\t\tconst topmostViewList = viewItem.getAncestors().find(isList);\n\t\t\tconst walker = view.createPositionAt(viewItem, 0).getWalker();\n\t\t\tfor (const value of walker) if (value.type == \"elementStart\" && value.item.is(\"element\", \"li\")) {\n\t\t\t\tdata.viewPosition = value.previousPosition;\n\t\t\t\tbreak;\n\t\t\t} else if (value.type == \"elementEnd\" && value.item == topmostViewList) {\n\t\t\t\tdata.viewPosition = value.nextPosition;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* The callback for view position to model position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes\n* positions between the `<li>` elements that would be incorrectly mapped because of how list items are represented in the model\n* and in the view.\n*\n* @internal\n* @see module:engine/conversion/mapper~Mapper#event:viewToModelPosition\n* @param model Model instance.\n* @returns Returns a conversion callback.\n*/\nfunction viewToModelPosition(model) {\n\treturn (evt, data) => {\n\t\tconst viewPos = data.viewPosition;\n\t\tconst viewParent = viewPos.parent;\n\t\tconst mapper = data.mapper;\n\t\tif (viewParent.name == \"ul\" || viewParent.name == \"ol\") {\n\t\t\tif (!viewPos.isAtEnd) {\n\t\t\t\tconst modelNode = mapper.toModelElement(viewPos.nodeAfter);\n\t\t\t\tdata.modelPosition = model.createPositionBefore(modelNode);\n\t\t\t} else {\n\t\t\t\tconst modelNode = mapper.toModelElement(viewPos.nodeBefore);\n\t\t\t\tconst modelLength = mapper.getModelLength(viewPos.nodeBefore);\n\t\t\t\tdata.modelPosition = model.createPositionBefore(modelNode).getShiftedBy(modelLength);\n\t\t\t}\n\t\t\tevt.stop();\n\t\t} else if (viewParent.name == \"li\" && viewPos.nodeBefore && (viewPos.nodeBefore.name == \"ul\" || viewPos.nodeBefore.name == \"ol\")) {\n\t\t\tconst modelNode = mapper.toModelElement(viewParent);\n\t\t\tlet modelLength = 1;\n\t\t\tlet viewList = viewPos.nodeBefore;\n\t\t\twhile (viewList && isList(viewList)) {\n\t\t\t\tmodelLength += mapper.getModelLength(viewList);\n\t\t\t\tviewList = viewList.previousSibling;\n\t\t\t}\n\t\t\tdata.modelPosition = model.createPositionBefore(modelNode).getShiftedBy(modelLength);\n\t\t\tevt.stop();\n\t\t}\n\t};\n}\n/**\n* Post-fixer that reacts to changes on document and fixes incorrect model states.\n*\n* In the example below, there is a correct list structure.\n* Then the middle element is removed so the list structure will become incorrect:\n*\n* ```xml\n* <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n* <listItem listType=\"bulleted\" listIndent=1>Item 2</listItem>   <--- this is removed.\n* <listItem listType=\"bulleted\" listIndent=2>Item 3</listItem>\n* ```\n*\n* The list structure after the middle element is removed:\n*\n* ```xml\n* <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n* <listItem listType=\"bulleted\" listIndent=2>Item 3</listItem>\n* ```\n*\n* Should become:\n*\n* ```xml\n* <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n* <listItem listType=\"bulleted\" listIndent=1>Item 3</listItem>   <--- note that indent got post-fixed.\n* ```\n*\n* @internal\n* @param model The data model.\n* @param writer The writer to do changes with.\n* @returns `true` if any change has been applied, `false` otherwise.\n*/\nfunction modelChangePostFixer(model, writer) {\n\tconst changes = model.document.differ.getChanges();\n\tconst itemToListHead = /* @__PURE__ */ new Map();\n\tlet applied = false;\n\tfor (const entry of changes) if (entry.type == \"insert\" && entry.name == \"listItem\") _addListToFix(entry.position);\n\telse if (entry.type == \"insert\" && entry.name != \"listItem\") {\n\t\tif (entry.name != \"$text\") {\n\t\t\tconst item = entry.position.nodeAfter;\n\t\t\tif (item.hasAttribute(\"listIndent\")) {\n\t\t\t\twriter.removeAttribute(\"listIndent\", item);\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t\tif (item.hasAttribute(\"listType\")) {\n\t\t\t\twriter.removeAttribute(\"listType\", item);\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t\tif (item.hasAttribute(\"listStyle\")) {\n\t\t\t\twriter.removeAttribute(\"listStyle\", item);\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t\tif (item.hasAttribute(\"listReversed\")) {\n\t\t\t\twriter.removeAttribute(\"listReversed\", item);\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t\tif (item.hasAttribute(\"listStart\")) {\n\t\t\t\twriter.removeAttribute(\"listStart\", item);\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t\tfor (const innerItem of Array.from(model.createRangeIn(item)).filter((e) => e.item.is(\"element\", \"listItem\"))) _addListToFix(innerItem.previousPosition);\n\t\t}\n\t\t_addListToFix(entry.position.getShiftedBy(entry.length));\n\t} else if (entry.type == \"remove\" && entry.name == \"listItem\") _addListToFix(entry.position);\n\telse if (entry.type == \"attribute\" && entry.attributeKey == \"listIndent\") _addListToFix(entry.range.start);\n\telse if (entry.type == \"attribute\" && entry.attributeKey == \"listType\") _addListToFix(entry.range.start);\n\tfor (const listHead of itemToListHead.values()) {\n\t\t_fixListIndents(listHead);\n\t\t_fixListTypes(listHead);\n\t}\n\treturn applied;\n\tfunction _addListToFix(position) {\n\t\tconst previousNode = position.nodeBefore;\n\t\tif (!previousNode || !previousNode.is(\"element\", \"listItem\")) {\n\t\t\tconst item = position.nodeAfter;\n\t\t\tif (item && item.is(\"element\", \"listItem\")) itemToListHead.set(item, item);\n\t\t} else {\n\t\t\tlet listHead = previousNode;\n\t\t\tif (itemToListHead.has(listHead)) return;\n\t\t\tfor (let previousSibling = listHead.previousSibling; previousSibling && previousSibling.is(\"element\", \"listItem\"); previousSibling = listHead.previousSibling) {\n\t\t\t\tlistHead = previousSibling;\n\t\t\t\tif (itemToListHead.has(listHead)) return;\n\t\t\t}\n\t\t\titemToListHead.set(previousNode, listHead);\n\t\t}\n\t}\n\tfunction _fixListIndents(item) {\n\t\tlet maxIndent = 0;\n\t\tlet fixBy = null;\n\t\twhile (item && item.is(\"element\", \"listItem\")) {\n\t\t\tconst itemIndent = item.getAttribute(\"listIndent\");\n\t\t\tif (itemIndent > maxIndent) {\n\t\t\t\tlet newIndent;\n\t\t\t\tif (fixBy === null) {\n\t\t\t\t\tfixBy = itemIndent - maxIndent;\n\t\t\t\t\tnewIndent = maxIndent;\n\t\t\t\t} else {\n\t\t\t\t\tif (fixBy > itemIndent) fixBy = itemIndent;\n\t\t\t\t\tnewIndent = itemIndent - fixBy;\n\t\t\t\t}\n\t\t\t\twriter.setAttribute(\"listIndent\", newIndent, item);\n\t\t\t\tapplied = true;\n\t\t\t} else {\n\t\t\t\tfixBy = null;\n\t\t\t\tmaxIndent = item.getAttribute(\"listIndent\") + 1;\n\t\t\t}\n\t\t\titem = item.nextSibling;\n\t\t}\n\t}\n\tfunction _fixListTypes(item) {\n\t\tlet typesStack = [];\n\t\tlet prev = null;\n\t\twhile (item && item.is(\"element\", \"listItem\")) {\n\t\t\tconst itemIndent = item.getAttribute(\"listIndent\");\n\t\t\tif (prev && prev.getAttribute(\"listIndent\") > itemIndent) typesStack = typesStack.slice(0, itemIndent + 1);\n\t\t\tif (itemIndent != 0) {\n\t\t\t\tif (typesStack[itemIndent]) {\n\t\t\t\t\tconst type = typesStack[itemIndent];\n\t\t\t\t\tif (item.getAttribute(\"listType\") != type) {\n\t\t\t\t\t\twriter.setAttribute(\"listType\", type, item);\n\t\t\t\t\t\tapplied = true;\n\t\t\t\t\t}\n\t\t\t\t} else typesStack[itemIndent] = item.getAttribute(\"listType\");\n\t\t\t}\n\t\t\tprev = item;\n\t\t\titem = item.nextSibling;\n\t\t}\n\t}\n}\n/**\n* A fixer for pasted content that includes list items.\n*\n* It fixes indentation of pasted list items so the pasted items match correctly to the context they are pasted into.\n*\n* Example:\n*\n* ```xml\n* <listItem listType=\"bulleted\" listIndent=0>A</listItem>\n* <listItem listType=\"bulleted\" listIndent=1>B^</listItem>\n* // At ^ paste:  <listItem listType=\"bulleted\" listIndent=4>X</listItem>\n* //              <listItem listType=\"bulleted\" listIndent=5>Y</listItem>\n* <listItem listType=\"bulleted\" listIndent=2>C</listItem>\n* ```\n*\n* Should become:\n*\n* ```xml\n* <listItem listType=\"bulleted\" listIndent=0>A</listItem>\n* <listItem listType=\"bulleted\" listIndent=1>BX</listItem>\n* <listItem listType=\"bulleted\" listIndent=2>Y/listItem>\n* <listItem listType=\"bulleted\" listIndent=2>C</listItem>\n* ```\n*\n* @internal\n*/\nconst modelIndentPasteFixer = function(evt, [content, selectable]) {\n\tconst model = this;\n\tlet item = content.is(\"documentFragment\") ? content.getChild(0) : content;\n\tlet selection;\n\tif (!selectable) selection = model.document.selection;\n\telse selection = model.createSelection(selectable);\n\tif (item && item.is(\"element\", \"listItem\")) {\n\t\tconst pos = selection.getFirstPosition();\n\t\tlet refItem = null;\n\t\tif (pos.parent.is(\"element\", \"listItem\")) refItem = pos.parent;\n\t\telse if (pos.nodeBefore && pos.nodeBefore.is(\"element\", \"listItem\")) refItem = pos.nodeBefore;\n\t\tif (refItem) {\n\t\t\tconst indentChange = refItem.getAttribute(\"listIndent\");\n\t\t\tif (indentChange > 0) while (item && item.is(\"element\", \"listItem\")) {\n\t\t\t\titem._setAttribute(\"listIndent\", item.getAttribute(\"listIndent\") + indentChange);\n\t\t\t\titem = item.nextSibling;\n\t\t\t}\n\t\t}\n\t}\n};\n/**\n* Helper function that converts children of a given `<li>` view element into corresponding model elements.\n* The function maintains proper order of elements if model `listItem` is split during the conversion\n* due to block children conversion.\n*\n* @param listItemModel List item model element to which converted children will be inserted.\n* @param viewChildren View elements which will be converted.\n* @param conversionApi Conversion interface to be used by the callback.\n* @returns Position on which next elements should be inserted after children conversion.\n*/\nfunction viewToModelListItemChildrenConverter(listItemModel, viewChildren, conversionApi) {\n\tconst { writer, schema } = conversionApi;\n\tlet nextPosition = writer.createPositionAfter(listItemModel);\n\tfor (const child of viewChildren) if (child.name == \"ul\" || child.name == \"ol\") nextPosition = conversionApi.convertItem(child, nextPosition).modelCursor;\n\telse {\n\t\tconst result = conversionApi.convertItem(child, writer.createPositionAt(listItemModel, \"end\"));\n\t\tconst convertedChild = result.modelRange.start.nodeAfter;\n\t\tif (convertedChild && convertedChild.is(\"element\") && !schema.checkChild(listItemModel, convertedChild.name)) {\n\t\t\tif (result.modelCursor.parent.is(\"element\", \"listItem\")) listItemModel = result.modelCursor.parent;\n\t\t\telse listItemModel = findNextListItem(result.modelCursor);\n\t\t\tnextPosition = writer.createPositionAfter(listItemModel);\n\t\t}\n\t}\n\treturn nextPosition;\n}\n/**\n* Helper function that seeks for a next list item starting from given `startPosition`.\n*/\nfunction findNextListItem(startPosition) {\n\tconst treeWalker = new ModelTreeWalker({ startPosition });\n\tlet value;\n\tdo\n\t\tvalue = treeWalker.next();\n\twhile (!value.value.item.is(\"element\", \"listItem\"));\n\treturn value.value.item;\n}\n/**\n* Helper function that takes all children of given `viewRemovedItem` and moves them in a correct place, according\n* to other given parameters.\n*/\nfunction hoistNestedLists(nextIndent, modelRemoveStartPosition, viewRemoveStartPosition, viewRemovedItem, conversionApi, model) {\n\tconst prevModelItem = getSiblingListItem(modelRemoveStartPosition.nodeBefore, {\n\t\tsameIndent: true,\n\t\tsmallerIndent: true,\n\t\tlistIndent: nextIndent\n\t});\n\tconst mapper = conversionApi.mapper;\n\tconst viewWriter = conversionApi.writer;\n\tconst prevIndent = prevModelItem ? prevModelItem.getAttribute(\"listIndent\") : null;\n\tlet insertPosition;\n\tif (!prevModelItem) insertPosition = viewRemoveStartPosition;\n\telse if (prevIndent == nextIndent) {\n\t\tconst prevViewList = mapper.toViewElement(prevModelItem).parent;\n\t\tinsertPosition = viewWriter.createPositionAfter(prevViewList);\n\t} else {\n\t\tconst modelPosition = model.createPositionAt(prevModelItem, \"end\");\n\t\tinsertPosition = mapper.toViewPosition(modelPosition);\n\t}\n\tinsertPosition = positionAfterUiElements(insertPosition);\n\tfor (const child of [...viewRemovedItem.getChildren()]) if (isList(child)) {\n\t\tinsertPosition = viewWriter.move(viewWriter.createRangeOn(child), insertPosition).end;\n\t\tmergeViewLists(viewWriter, child, child.nextSibling);\n\t\tmergeViewLists(viewWriter, child.previousSibling, child);\n\t}\n}\n/**\n* Checks if view element is a list type (ul or ol).\n*/\nfunction isList(viewElement) {\n\treturn viewElement.is(\"element\", \"ol\") || viewElement.is(\"element\", \"ul\");\n}\n/**\n* Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.\n*\n* Also, fixes non HTML compliant lists indents:\n*\n* ```\n* before:                                     fixed list:\n* OL                                          OL\n* |-> LI (parent LIs: 0)                      |-> LI     (indent: 0)\n*     |-> OL                                  |-> OL\n*         |-> OL                                  |\n*         |   |-> OL                              |\n*         |       |-> OL                          |\n*         |           |-> LI (parent LIs: 1)      |-> LI (indent: 1)\n*         |-> LI (parent LIs: 1)                  |-> LI (indent: 1)\n*\n* before:                                     fixed list:\n* OL                                          OL\n* |-> OL                                      |\n*     |-> OL                                  |\n*          |-> OL                             |\n*              |-> LI (parent LIs: 0)         |-> LI        (indent: 0)\n*\n* before:                                     fixed list:\n* OL                                          OL\n* |-> LI (parent LIs: 0)                      |-> LI         (indent: 0)\n* |-> OL                                          |-> OL\n*     |-> LI (parent LIs: 0)                          |-> LI (indent: 1)\n* ```\n*/\nfunction getIndent$1(listItem) {\n\tlet indent = 0;\n\tlet parent = listItem.parent;\n\twhile (parent) {\n\t\tif (parent.is(\"element\", \"li\")) indent++;\n\t\telse {\n\t\t\tconst previousSibling = parent.previousSibling;\n\t\t\tif (previousSibling && previousSibling.is(\"element\", \"li\")) indent++;\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\treturn indent;\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 list/legacylist/legacylistediting\n*/\n/**\n* The engine of the list feature. It handles creating, editing and removing lists and list items.\n*\n* It registers the `'numberedList'`, `'bulletedList'`, `'indentList'` and `'outdentList'` commands.\n*/\nvar LegacyListEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LegacyListEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tEnter,\n\t\t\tDelete,\n\t\t\tLegacyListUtils\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.register(\"listItem\", {\n\t\t\tinheritAllFrom: \"$block\",\n\t\t\tallowAttributes: [\"listType\", \"listIndent\"]\n\t\t});\n\t\tconst data = editor.data;\n\t\tconst editing = editor.editing;\n\t\teditor.model.document.registerPostFixer((writer) => modelChangePostFixer(editor.model, writer));\n\t\tediting.mapper.registerViewToModelLength(\"li\", getViewListItemLength);\n\t\tdata.mapper.registerViewToModelLength(\"li\", getViewListItemLength);\n\t\tediting.mapper.on(\"modelToViewPosition\", modelToViewPosition(editing.view));\n\t\tediting.mapper.on(\"viewToModelPosition\", viewToModelPosition(editor.model));\n\t\tdata.mapper.on(\"modelToViewPosition\", modelToViewPosition(editing.view));\n\t\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"insert\", modelViewSplitOnInsert, { priority: \"high\" });\n\t\t\tdispatcher.on(\"insert:listItem\", modelViewInsertion$1(editor.model));\n\t\t\tdispatcher.on(\"attribute:listType:listItem\", modelViewChangeType$1, { priority: \"high\" });\n\t\t\tdispatcher.on(\"attribute:listType:listItem\", modelViewMergeAfterChangeType, { priority: \"low\" });\n\t\t\tdispatcher.on(\"attribute:listIndent:listItem\", modelViewChangeIndent(editor.model));\n\t\t\tdispatcher.on(\"remove:listItem\", modelViewRemove(editor.model));\n\t\t\tdispatcher.on(\"remove\", modelViewMergeAfter, { priority: \"low\" });\n\t\t});\n\t\teditor.conversion.for(\"dataDowncast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"insert\", modelViewSplitOnInsert, { priority: \"high\" });\n\t\t\tdispatcher.on(\"insert:listItem\", modelViewInsertion$1(editor.model));\n\t\t});\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:ul\", cleanList, { priority: \"high\" });\n\t\t\tdispatcher.on(\"element:ol\", cleanList, { priority: \"high\" });\n\t\t\tdispatcher.on(\"element:li\", cleanListItem, { priority: \"high\" });\n\t\t\tdispatcher.on(\"element:li\", viewModelConverter);\n\t\t});\n\t\teditor.model.on(\"insertContent\", modelIndentPasteFixer, { priority: \"high\" });\n\t\teditor.commands.add(\"numberedList\", new LegacyListCommand(editor, \"numbered\"));\n\t\teditor.commands.add(\"bulletedList\", new LegacyListCommand(editor, \"bulleted\"));\n\t\teditor.commands.add(\"indentList\", new LegacyIndentCommand(editor, \"forward\"));\n\t\teditor.commands.add(\"outdentList\", new LegacyIndentCommand(editor, \"backward\"));\n\t\tconst viewDocument = editing.view.document;\n\t\tthis.listenTo(viewDocument, \"enter\", (evt, data) => {\n\t\t\tconst doc = this.editor.model.document;\n\t\t\tconst positionParent = doc.selection.getLastPosition().parent;\n\t\t\tif (doc.selection.isCollapsed && positionParent.name == \"listItem\" && positionParent.isEmpty) {\n\t\t\t\tthis.editor.execute(\"outdentList\");\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: \"li\" });\n\t\tthis.listenTo(viewDocument, \"delete\", (evt, data) => {\n\t\t\tif (data.direction !== \"backward\") return;\n\t\t\tconst selection = this.editor.model.document.selection;\n\t\t\tif (!selection.isCollapsed) return;\n\t\t\tconst firstPosition = selection.getFirstPosition();\n\t\t\tif (!firstPosition.isAtStart) return;\n\t\t\tconst positionParent = firstPosition.parent;\n\t\t\tif (positionParent.name !== \"listItem\") return;\n\t\t\tif (positionParent.previousSibling && positionParent.previousSibling.name === \"listItem\") return;\n\t\t\tthis.editor.execute(\"outdentList\");\n\t\t\tdata.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: \"li\" });\n\t\tthis.listenTo(editor.editing.view.document, \"tab\", (evt, data) => {\n\t\t\tconst commandName = data.shiftKey ? \"outdentList\" : \"indentList\";\n\t\t\tif (this.editor.commands.get(commandName).isEnabled) {\n\t\t\t\teditor.execute(commandName);\n\t\t\t\tdata.stopPropagation();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: \"li\" });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst commands = this.editor.commands;\n\t\tconst indent = commands.get(\"indent\");\n\t\tconst outdent = commands.get(\"outdent\");\n\t\tif (indent) indent.registerChildCommand(commands.get(\"indentList\"));\n\t\tif (outdent) outdent.registerChildCommand(commands.get(\"outdentList\"));\n\t}\n};\nfunction getViewListItemLength(element) {\n\tlet length = 1;\n\tfor (const child of element.getChildren()) if (child.name == \"ul\" || child.name == \"ol\") for (const item of child.getChildren()) length += getViewListItemLength(item);\n\treturn 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 list/legacylist\n*/\n/**\n* The legacy list feature.\n*\n* This is a \"glue\" plugin that loads the {@link module:list/legacylist/legacylistediting~LegacyListEditing legacy list editing feature}\n* and {@link module:list/list/listui~ListUI list UI feature}.\n*/\nvar LegacyList = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [LegacyListEditing, ListUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LegacyList\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 list/legacylistproperties/legacyliststylecommand\n*/\n/**\n* The list style command. It changes the `listStyle` attribute of the selected list items.\n*\n* If the list type (numbered or bulleted) can be inferred from the passed style type,\n* the command tries to convert selected items to a list of that type.\n* It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n*/\nvar LegacyListStyleCommand = class extends Command {\n\t/**\n\t* The default type of the list style.\n\t*/\n\tdefaultType;\n\t/**\n\t* Creates an instance of the command.\n\t*\n\t* @param editor The editor instance.\n\t* @param defaultType The list type that will be used by default if the value was not specified during\n\t* the command execution.\n\t*/\n\tconstructor(editor, defaultType) {\n\t\tsuper(editor);\n\t\tthis.defaultType = defaultType;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options.type The type of the list style, e.g. `'disc'` or `'square'`. If `null` is specified, the default\n\t* style will be applied.\n\t*/\n\texecute(options = {}) {\n\t\tthis._tryToConvertItemsToList(options);\n\t\tconst model = this.editor.model;\n\t\tconst listItems = getSelectedListItems(model);\n\t\tif (!listItems.length) return;\n\t\tmodel.change((writer) => {\n\t\t\tfor (const item of listItems) writer.setAttribute(\"listStyle\", options.type || this.defaultType, item);\n\t\t});\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst listItem = this.editor.model.document.selection.getFirstPosition().parent;\n\t\tif (listItem && listItem.is(\"element\", \"listItem\")) return listItem.getAttribute(\"listStyle\");\n\t\treturn null;\n\t}\n\t/**\n\t* Checks whether the command can be enabled in the current context.\n\t*\n\t* @returns Whether the command should be enabled.\n\t*/\n\t_checkEnabled() {\n\t\tconst editor = this.editor;\n\t\tconst numberedList = editor.commands.get(\"numberedList\");\n\t\tconst bulletedList = editor.commands.get(\"bulletedList\");\n\t\treturn numberedList.isEnabled || bulletedList.isEnabled;\n\t}\n\t/**\n\t* Checks if the provided list style is valid. Also changes the selection to a list if it's not set yet.\n\t*\n\t* @param options Additional options.\n\t* @param options.type The type of the list style. If `null` is specified, the function does nothing.\n\t*/\n\t_tryToConvertItemsToList(options) {\n\t\tif (!options.type) return;\n\t\tconst listType = getListTypeFromListStyleType$1(options.type);\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif (!listType) return;\n\t\tconst editor = this.editor;\n\t\tconst commandName = `${listType}List`;\n\t\tif (!editor.commands.get(commandName).value) editor.execute(commandName);\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 list/legacylistproperties/legacylistreversedcommand\n*/\n/**\n* The reversed list command. It changes the `listReversed` attribute of the selected list items. As a result, the list order will be\n* reversed.\n* It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n*/\nvar LegacyListReversedCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst value = this._getValue();\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options.reversed Whether the list should be reversed.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst listItems = getSelectedListItems(model).filter((item) => item.getAttribute(\"listType\") == \"numbered\");\n\t\tmodel.change((writer) => {\n\t\t\tfor (const item of listItems) writer.setAttribute(\"listReversed\", !!options.reversed, item);\n\t\t});\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst listItem = this.editor.model.document.selection.getFirstPosition().parent;\n\t\tif (listItem && listItem.is(\"element\", \"listItem\") && listItem.getAttribute(\"listType\") == \"numbered\") return listItem.getAttribute(\"listReversed\");\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 list/legacylistproperties/legacyliststartcommand\n*/\n/**\n* The list start index command. It changes the `listStart` attribute of the selected list items.\n* It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n*/\nvar LegacyListStartCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst value = this._getValue();\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options Execute options.\n\t* @param options.startIndex The list start index.\n\t*/\n\texecute({ startIndex = 1 } = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst listItems = getSelectedListItems(model).filter((item) => item.getAttribute(\"listType\") == \"numbered\");\n\t\tmodel.change((writer) => {\n\t\t\tfor (const item of listItems) writer.setAttribute(\"listStart\", startIndex >= 0 ? startIndex : 1, item);\n\t\t});\n\t}\n\t/**\n\t* Checks the command's {@link #value}.\n\t*\n\t* @returns The current value.\n\t*/\n\t_getValue() {\n\t\tconst listItem = this.editor.model.document.selection.getFirstPosition().parent;\n\t\tif (listItem && listItem.is(\"element\", \"listItem\") && listItem.getAttribute(\"listType\") == \"numbered\") return listItem.getAttribute(\"listStart\");\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 list/legacylistproperties/legacylistpropertiesediting\n*/\nconst DEFAULT_LIST_TYPE = \"default\";\n/**\n* The engine of the list properties feature.\n*\n* It sets the value for the `listItem` attribute of the {@link module:list/legacylist~LegacyList `<listItem>`} element that\n* allows modifying the list style type.\n*\n* It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.\n* Read more in {@link module:list/listconfig~ListPropertiesConfig}.\n*/\nvar LegacyListPropertiesEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [LegacyListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LegacyListPropertiesEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"list\", { properties: {\n\t\t\tstyles: true,\n\t\t\tstartIndex: false,\n\t\t\treversed: false\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst strategies = createAttributeStrategies(editor.config.get(\"list.properties\"));\n\t\tmodel.schema.extend(\"listItem\", { allowAttributes: strategies.map((s) => s.attributeName) });\n\t\tfor (const strategy of strategies) strategy.addCommand(editor);\n\t\tthis.listenTo(editor.commands.get(\"indentList\"), \"_executeCleanup\", fixListAfterIndentListCommand(editor, strategies));\n\t\tthis.listenTo(editor.commands.get(\"outdentList\"), \"_executeCleanup\", fixListAfterOutdentListCommand(editor, strategies));\n\t\tthis.listenTo(editor.commands.get(\"bulletedList\"), \"_executeCleanup\", restoreDefaultListStyle(editor));\n\t\tthis.listenTo(editor.commands.get(\"numberedList\"), \"_executeCleanup\", restoreDefaultListStyle(editor));\n\t\tmodel.document.registerPostFixer(fixListAttributesOnListItemElements(editor, strategies));\n\t\teditor.conversion.for(\"upcast\").add(upcastListItemAttributes(strategies));\n\t\teditor.conversion.for(\"downcast\").add(downcastListItemAttributes(strategies));\n\t\tthis._mergeListAttributesWhileMergingLists(strategies);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tif (editor.commands.get(\"todoList\")) editor.model.document.registerPostFixer(removeListItemAttributesFromTodoList(editor));\n\t}\n\t/**\n\t* Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether two lists will be merged into a single\n\t* one after deleting the content.\n\t*\n\t* The purpose of this action is to adjust the `listStyle`, `listReversed` and `listStart` values\n\t* for the list that was merged.\n\t*\n\t* Consider the following model's content:\n\t*\n\t* ```xml\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t* <paragraph>[A paragraph.]</paragraph>\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 1</listItem>\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 2</listItem>\n\t* ```\n\t*\n\t* After removing the paragraph element, the second list will be merged into the first one.\n\t* We want to inherit the `listStyle` attribute for the second list from the first one.\n\t*\n\t* ```xml\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t* <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t* ```\n\t*\n\t* See https://github.com/ckeditor/ckeditor5/issues/7879.\n\t*\n\t* @param attributeStrategies Strategies for the enabled attributes.\n\t*/\n\t_mergeListAttributesWhileMergingLists(attributeStrategies) {\n\t\tconst model = this.editor.model;\n\t\tlet firstMostOuterItem;\n\t\tthis.listenTo(model, \"deleteContent\", (evt, [selection]) => {\n\t\t\tconst firstPosition = selection.getFirstPosition();\n\t\t\tconst lastPosition = selection.getLastPosition();\n\t\t\tif (firstPosition.parent === lastPosition.parent) return;\n\t\t\tif (!firstPosition.parent.is(\"element\", \"listItem\")) return;\n\t\t\tconst nextSibling = lastPosition.parent.nextSibling;\n\t\t\tif (!nextSibling || !nextSibling.is(\"element\", \"listItem\")) return;\n\t\t\tconst mostOuterItemList = getSiblingListItem(firstPosition.parent, {\n\t\t\t\tsameIndent: true,\n\t\t\t\tlistIndent: nextSibling.getAttribute(\"listIndent\")\n\t\t\t});\n\t\t\tif (!mostOuterItemList) return;\n\t\t\tif (mostOuterItemList.getAttribute(\"listType\") === nextSibling.getAttribute(\"listType\")) firstMostOuterItem = mostOuterItemList;\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(model, \"deleteContent\", () => {\n\t\t\tif (!firstMostOuterItem) return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst secondListMostOuterItem = getSiblingListItem(firstMostOuterItem.nextSibling, {\n\t\t\t\t\tsameIndent: true,\n\t\t\t\t\tlistIndent: firstMostOuterItem.getAttribute(\"listIndent\"),\n\t\t\t\t\tdirection: \"forward\"\n\t\t\t\t});\n\t\t\t\tif (!secondListMostOuterItem) {\n\t\t\t\t\tfirstMostOuterItem = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst items = [secondListMostOuterItem, ...getSiblingNodes(writer.createPositionAt(secondListMostOuterItem, 0), \"forward\")];\n\t\t\t\tfor (const listItem of items) for (const strategy of attributeStrategies) if (strategy.appliesToListItem(listItem)) {\n\t\t\t\t\tconst attributeName = strategy.attributeName;\n\t\t\t\t\tconst value = firstMostOuterItem.getAttribute(attributeName);\n\t\t\t\t\twriter.setAttribute(attributeName, value, listItem);\n\t\t\t\t}\n\t\t\t});\n\t\t\tfirstMostOuterItem = null;\n\t\t}, { priority: \"low\" });\n\t}\n};\n/**\n* Creates an array of strategies for dealing with enabled listItem attributes.\n*/\nfunction createAttributeStrategies(enabledProperties) {\n\tconst strategies = [];\n\tif (enabledProperties.styles) strategies.push({\n\t\tattributeName: \"listStyle\",\n\t\tdefaultValue: DEFAULT_LIST_TYPE,\n\t\taddCommand(editor) {\n\t\t\teditor.commands.add(\"listStyle\", new LegacyListStyleCommand(editor, DEFAULT_LIST_TYPE));\n\t\t},\n\t\tappliesToListItem() {\n\t\t\treturn true;\n\t\t},\n\t\tsetAttributeOnDowncast(writer, listStyle, element) {\n\t\t\tif (listStyle && listStyle !== DEFAULT_LIST_TYPE) writer.setStyle(\"list-style-type\", listStyle, element);\n\t\t\telse writer.removeStyle(\"list-style-type\", element);\n\t\t},\n\t\tgetAttributeOnUpcast(listParent) {\n\t\t\treturn normalizeListStyle(listParent.getStyle(\"list-style-type\")) || DEFAULT_LIST_TYPE;\n\t\t}\n\t});\n\tif (enabledProperties.reversed) strategies.push({\n\t\tattributeName: \"listReversed\",\n\t\tdefaultValue: false,\n\t\taddCommand(editor) {\n\t\t\teditor.commands.add(\"listReversed\", new LegacyListReversedCommand(editor));\n\t\t},\n\t\tappliesToListItem(item) {\n\t\t\treturn item.getAttribute(\"listType\") == \"numbered\";\n\t\t},\n\t\tsetAttributeOnDowncast(writer, listReversed, element) {\n\t\t\tif (listReversed) writer.setAttribute(\"reversed\", \"reversed\", element);\n\t\t\telse writer.removeAttribute(\"reversed\", element);\n\t\t},\n\t\tgetAttributeOnUpcast(listParent) {\n\t\t\treturn listParent.hasAttribute(\"reversed\");\n\t\t}\n\t});\n\tif (enabledProperties.startIndex) strategies.push({\n\t\tattributeName: \"listStart\",\n\t\tdefaultValue: 1,\n\t\taddCommand(editor) {\n\t\t\teditor.commands.add(\"listStart\", new LegacyListStartCommand(editor));\n\t\t},\n\t\tappliesToListItem(item) {\n\t\t\treturn item.getAttribute(\"listType\") == \"numbered\";\n\t\t},\n\t\tsetAttributeOnDowncast(writer, listStart, element) {\n\t\t\tif (listStart == 0 || listStart > 1) writer.setAttribute(\"start\", listStart, element);\n\t\t\telse writer.removeAttribute(\"start\", element);\n\t\t},\n\t\tgetAttributeOnUpcast(listParent) {\n\t\t\tconst startAttributeValue = listParent.getAttribute(\"start\");\n\t\t\treturn startAttributeValue >= 0 ? startAttributeValue : 1;\n\t\t}\n\t});\n\treturn strategies;\n}\n/**\n* Returns a converter consumes the `style`, `reversed` and `start` attribute.\n* In `style` it searches for the `list-style-type` definition.\n* If not found, the `\"default\"` value will be used.\n*/\nfunction upcastListItemAttributes(attributeStrategies) {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:li\", (evt, data, conversionApi) => {\n\t\t\tif (!data.modelRange) return;\n\t\t\tconst listParent = data.viewItem.parent;\n\t\t\tconst listItem = data.modelRange.start.nodeAfter || data.modelRange.end.nodeBefore;\n\t\t\tfor (const strategy of attributeStrategies) if (strategy.appliesToListItem(listItem)) {\n\t\t\t\tconst listStyle = strategy.getAttributeOnUpcast(listParent);\n\t\t\t\tconversionApi.writer.setAttribute(strategy.attributeName, listStyle, listItem);\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t};\n}\n/**\n* Returns a converter that adds `reversed`, `start` attributes and adds `list-style-type` definition as a value for the `style` attribute.\n* The `\"default\"` values are removed and not present in the view/data.\n*/\nfunction downcastListItemAttributes(attributeStrategies) {\n\treturn (dispatcher) => {\n\t\tfor (const strategy of attributeStrategies) dispatcher.on(`attribute:${strategy.attributeName}:listItem`, (evt, data, conversionApi) => {\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst currentElement = data.item;\n\t\t\tconst previousElement = getSiblingListItem(currentElement.previousSibling, {\n\t\t\t\tsameIndent: true,\n\t\t\t\tlistIndent: currentElement.getAttribute(\"listIndent\"),\n\t\t\t\tdirection: \"backward\"\n\t\t\t});\n\t\t\tconst viewItem = conversionApi.mapper.toViewElement(currentElement);\n\t\t\tif (!areRepresentingSameList(currentElement, previousElement)) viewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n\t\t\tstrategy.setAttributeOnDowncast(viewWriter, data.attributeNewValue, viewItem.parent);\n\t\t}, { priority: \"low\" });\n\t};\n\t/**\n\t* Checks whether specified list items belong to the same list.\n\t*/\n\tfunction areRepresentingSameList(listItem1, listItem2) {\n\t\treturn listItem2 && listItem1.getAttribute(\"listType\") === listItem2.getAttribute(\"listType\") && listItem1.getAttribute(\"listIndent\") === listItem2.getAttribute(\"listIndent\") && listItem1.getAttribute(\"listStyle\") === listItem2.getAttribute(\"listStyle\") && listItem1.getAttribute(\"listReversed\") === listItem2.getAttribute(\"listReversed\") && listItem1.getAttribute(\"listStart\") === listItem2.getAttribute(\"listStart\");\n\t}\n}\n/**\n* When indenting list, nested list should clear its value for the attributes or inherit from nested lists.\n*\n* ■ List item 1.\n* ■ List item 2.[]\n* ■ List item 3.\n* editor.execute( 'indentList' );\n*\n* ■ List item 1.\n*     ○ List item 2.[]\n* ■ List item 3.\n*/\nfunction fixListAfterIndentListCommand(editor, attributeStrategies) {\n\treturn (evt, changedItems) => {\n\t\tconst root = changedItems[0];\n\t\tconst rootIndent = root.getAttribute(\"listIndent\");\n\t\tconst itemsToUpdate = changedItems.filter((item) => item.getAttribute(\"listIndent\") === rootIndent);\n\t\tlet previousSibling = null;\n\t\tif (root.previousSibling.getAttribute(\"listIndent\") + 1 !== rootIndent) previousSibling = getSiblingListItem(root.previousSibling, {\n\t\t\tsameIndent: true,\n\t\t\tdirection: \"backward\",\n\t\t\tlistIndent: rootIndent\n\t\t});\n\t\teditor.model.change((writer) => {\n\t\t\tfor (const item of itemsToUpdate) for (const strategy of attributeStrategies) if (strategy.appliesToListItem(item)) {\n\t\t\t\tconst valueToSet = previousSibling == null ? strategy.defaultValue : previousSibling.getAttribute(strategy.attributeName);\n\t\t\t\twriter.setAttribute(strategy.attributeName, valueToSet, item);\n\t\t\t}\n\t\t});\n\t};\n}\n/**\n* When outdenting a list, a nested list should copy attribute values\n* from the previous sibling list item including the same value for the `listIndent` value.\n*\n* ■ List item 1.\n*     ○ List item 2.[]\n* ■ List item 3.\n*\n* editor.execute( 'outdentList' );\n*\n* ■ List item 1.\n* ■ List item 2.[]\n* ■ List item 3.\n*/\nfunction fixListAfterOutdentListCommand(editor, attributeStrategies) {\n\treturn (evt, changedItems) => {\n\t\tchangedItems = changedItems.reverse().filter((item) => item.is(\"element\", \"listItem\"));\n\t\tif (!changedItems.length) return;\n\t\tconst indent = changedItems[0].getAttribute(\"listIndent\");\n\t\tconst listType = changedItems[0].getAttribute(\"listType\");\n\t\tlet listItem = changedItems[0].previousSibling;\n\t\tif (listItem.is(\"element\", \"listItem\")) while (listItem.getAttribute(\"listIndent\") !== indent) listItem = listItem.previousSibling;\n\t\telse listItem = null;\n\t\tif (!listItem) listItem = changedItems[changedItems.length - 1].nextSibling;\n\t\tif (!listItem || !listItem.is(\"element\", \"listItem\")) return;\n\t\tif (listItem.getAttribute(\"listType\") !== listType) return;\n\t\teditor.model.change((writer) => {\n\t\t\tconst itemsToUpdate = changedItems.filter((item) => item.getAttribute(\"listIndent\") === indent);\n\t\t\tfor (const item of itemsToUpdate) for (const strategy of attributeStrategies) if (strategy.appliesToListItem(item)) {\n\t\t\t\tconst attributeName = strategy.attributeName;\n\t\t\t\tconst valueToSet = listItem.getAttribute(attributeName);\n\t\t\t\twriter.setAttribute(attributeName, valueToSet, item);\n\t\t\t}\n\t\t});\n\t};\n}\n/**\n* Each `listItem` element must have specified the `listStyle`, `listReversed` and `listStart` attributes\n* if they are enabled and supported by its `listType`.\n* This post-fixer checks whether inserted elements `listItem` elements should inherit the attribute values from\n* their sibling nodes or should use the default values.\n*\n* Paragraph[]\n* ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n* ■ List item 2. // ...\n* ■ List item 3. // ...\n*\n* editor.execute( 'bulletedList' )\n*\n* ■ Paragraph[]  // [listStyle=\"square\", listType=\"bulleted\"]\n* ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n* ■ List item 2.\n* ■ List item 3.\n*\n* It also covers a such change:\n*\n* [Paragraph 1\n* Paragraph 2]\n* ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n* ■ List item 2. // ...\n* ■ List item 3. // ...\n*\n* editor.execute( 'numberedList' )\n*\n* 1. [Paragraph 1 // [listStyle=\"default\", listType=\"numbered\"]\n* 2. Paragraph 2] // [listStyle=\"default\", listType=\"numbered\"]\n* ■ List item 1.  // [listStyle=\"square\", listType=\"bulleted\"]\n* ■ List item 2.  // ...\n* ■ List item 3.  // ...\n*/\nfunction fixListAttributesOnListItemElements(editor, attributeStrategies) {\n\treturn (writer) => {\n\t\tlet wasFixed = false;\n\t\tconst insertedListItems = getChangedListItems(editor.model.document.differ.getChanges()).filter((item) => {\n\t\t\treturn item.getAttribute(\"listType\") !== \"todo\";\n\t\t});\n\t\tif (!insertedListItems.length) return wasFixed;\n\t\tlet existingListItem = insertedListItems[insertedListItems.length - 1].nextSibling;\n\t\tif (!existingListItem || !existingListItem.is(\"element\", \"listItem\")) {\n\t\t\texistingListItem = insertedListItems[0].previousSibling;\n\t\t\tif (existingListItem) {\n\t\t\t\tconst indent = insertedListItems[0].getAttribute(\"listIndent\");\n\t\t\t\twhile (existingListItem.is(\"element\", \"listItem\") && existingListItem.getAttribute(\"listIndent\") !== indent) {\n\t\t\t\t\texistingListItem = existingListItem.previousSibling;\n\t\t\t\t\tif (!existingListItem) break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const strategy of attributeStrategies) {\n\t\t\tconst attributeName = strategy.attributeName;\n\t\t\tfor (const item of insertedListItems) {\n\t\t\t\tif (!strategy.appliesToListItem(item)) {\n\t\t\t\t\twriter.removeAttribute(attributeName, item);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!item.hasAttribute(attributeName)) {\n\t\t\t\t\tif (shouldInheritListType(existingListItem, item, strategy)) writer.setAttribute(attributeName, existingListItem.getAttribute(attributeName), item);\n\t\t\t\t\telse writer.setAttribute(attributeName, strategy.defaultValue, item);\n\t\t\t\t\twasFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\tconst previousSibling = item.previousSibling;\n\t\t\t\t\tif (shouldInheritListTypeFromPreviousItem(previousSibling, item, strategy.attributeName)) {\n\t\t\t\t\t\twriter.setAttribute(attributeName, previousSibling.getAttribute(attributeName), item);\n\t\t\t\t\t\twasFixed = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn wasFixed;\n\t};\n}\n/**\n* Checks whether the `listStyle`, `listReversed` and `listStart` attributes\n* should be copied from the `baseItem` element.\n*\n* The attribute should be copied if the inserted element does not have defined it and\n* the value for the element is other than default in the base element.\n*/\nfunction shouldInheritListType(baseItem, itemToChange, attributeStrategy) {\n\tif (!baseItem) return false;\n\tconst baseListAttribute = baseItem.getAttribute(attributeStrategy.attributeName);\n\tif (!baseListAttribute) return false;\n\tif (baseListAttribute == attributeStrategy.defaultValue) return false;\n\tif (baseItem.getAttribute(\"listType\") !== itemToChange.getAttribute(\"listType\")) return false;\n\treturn true;\n}\n/**\n* Checks whether the `listStyle`, `listReversed` and `listStart` attributes\n* should be copied from previous list item.\n*\n* The attribute should be copied if there's a mismatch of styles of the pasted list into a nested list.\n* Top-level lists are not normalized as we allow side-by-side list of different types.\n*/\nfunction shouldInheritListTypeFromPreviousItem(previousItem, itemToChange, attributeName) {\n\tif (!previousItem || !previousItem.is(\"element\", \"listItem\")) return false;\n\tif (itemToChange.getAttribute(\"listType\") !== previousItem.getAttribute(\"listType\")) return false;\n\tconst previousItemIndent = previousItem.getAttribute(\"listIndent\");\n\tif (previousItemIndent < 1 || previousItemIndent !== itemToChange.getAttribute(\"listIndent\")) return false;\n\tconst previousItemListAttribute = previousItem.getAttribute(attributeName);\n\tif (!previousItemListAttribute || previousItemListAttribute === itemToChange.getAttribute(attributeName)) return false;\n\treturn true;\n}\n/**\n* Removes the `listStyle`, `listReversed` and `listStart` attributes from \"todo\" list items.\n*/\nfunction removeListItemAttributesFromTodoList(editor) {\n\treturn (writer) => {\n\t\tconst todoListItems = getChangedListItems(editor.model.document.differ.getChanges()).filter((item) => {\n\t\t\treturn item.getAttribute(\"listType\") === \"todo\" && (item.hasAttribute(\"listStyle\") || item.hasAttribute(\"listReversed\") || item.hasAttribute(\"listStart\"));\n\t\t});\n\t\tif (!todoListItems.length) return false;\n\t\tfor (const item of todoListItems) {\n\t\t\twriter.removeAttribute(\"listStyle\", item);\n\t\t\twriter.removeAttribute(\"listReversed\", item);\n\t\t\twriter.removeAttribute(\"listStart\", item);\n\t\t}\n\t\treturn true;\n\t};\n}\n/**\n* Restores the `listStyle` attribute after changing the list type.\n*/\nfunction restoreDefaultListStyle(editor) {\n\treturn (evt, changedItems) => {\n\t\tchangedItems = changedItems.filter((item) => item.is(\"element\", \"listItem\"));\n\t\teditor.model.change((writer) => {\n\t\t\tfor (const item of changedItems) writer.removeAttribute(\"listStyle\", item);\n\t\t});\n\t};\n}\n/**\n* Returns the `listItem` that was inserted or changed.\n*\n* @param changes The changes list returned by the differ.\n*/\nfunction getChangedListItems(changes) {\n\tconst items = [];\n\tfor (const change of changes) {\n\t\tconst item = getItemFromChange(change);\n\t\tif (item && item.is(\"element\", \"listItem\")) items.push(item);\n\t}\n\treturn items;\n}\nfunction getItemFromChange(change) {\n\tif (change.type === \"attribute\") return change.range.start.nodeAfter;\n\tif (change.type === \"insert\") return change.position.nodeAfter;\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 list/legacylistproperties\n*/\n/**\n* The legacy list properties feature.\n*\n* This is a \"glue\" plugin that loads the {@link module:list/legacylistproperties/legacylistpropertiesediting~LegacyListPropertiesEditing\n* legacy list properties editing feature} and the\n* {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.\n*/\nvar LegacyListProperties = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [LegacyListPropertiesEditing, ListPropertiesUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LegacyListProperties\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 list/legacytodolist/legacychecktodolistcommand\n*/\nconst attributeKey = \"todoListChecked\";\n/**\n* The check to-do command.\n*\n* The command is registered by the {@link module:list/legacytodolist/legacytodolistediting~LegacyTodoListEditing} as\n* the `checkTodoList` editor command and it is also available via aliased `todoListCheck` name.\n*/\nvar LegacyCheckTodoListCommand = class extends Command {\n\t/**\n\t* A list of to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t*\n\t* @internal\n\t*/\n\t_selectedElements;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._selectedElements = [];\n\t\tthis.on(\"execute\", () => {\n\t\t\tthis.refresh();\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* Updates the command's {@link #value} and {@link #isEnabled} properties based on the current selection.\n\t*/\n\trefresh() {\n\t\tthis._selectedElements = this._getSelectedItems();\n\t\tthis.value = this._selectedElements.every((element) => !!element.getAttribute(attributeKey));\n\t\tthis.isEnabled = !!this._selectedElements.length;\n\t}\n\t/**\n\t* Gets all to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t*/\n\t_getSelectedItems() {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selectionRange = model.document.selection.getFirstRange();\n\t\tconst startElement = selectionRange.start.parent;\n\t\tconst elements = [];\n\t\tif (schema.checkAttribute(startElement, attributeKey)) elements.push(startElement);\n\t\tfor (const item of selectionRange.getItems()) if (schema.checkAttribute(item, attributeKey) && !elements.includes(item)) elements.push(item);\n\t\treturn elements;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply\n\t* the attribute. Otherwise, the command will remove the attribute. If not set, the command will look for its current\n\t* value to decide what it should do.\n\t*/\n\texecute(options = {}) {\n\t\tthis.editor.model.change((writer) => {\n\t\t\tfor (const element of this._selectedElements) if (options.forceValue === void 0 ? !this.value : options.forceValue) writer.setAttribute(attributeKey, true, element);\n\t\t\telse writer.removeAttribute(attributeKey, element);\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* A model-to-view converter for the `listItem` model element insertion.\n*\n* It converts the `listItem` model element to an unordered list with a {@link module:engine/view/uielement~ViewUIElement checkbox element}\n* at the beginning of each list item. It also merges the list with surrounding lists (if available).\n*\n* It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n* @param model Model instance.\n* @param onCheckboxChecked Callback function.\n* @returns Returns a conversion callback.\n*/\nfunction modelViewInsertion(model, onCheckboxChecked) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst consumable = conversionApi.consumable;\n\t\tif (!consumable.test(data.item, \"insert\") || !consumable.test(data.item, \"attribute:listType\") || !consumable.test(data.item, \"attribute:listIndent\")) return;\n\t\tif (data.item.getAttribute(\"listType\") != \"todo\") return;\n\t\tconst modelItem = data.item;\n\t\tconsumable.consume(modelItem, \"insert\");\n\t\tconsumable.consume(modelItem, \"attribute:listType\");\n\t\tconsumable.consume(modelItem, \"attribute:listIndent\");\n\t\tconsumable.consume(modelItem, \"attribute:todoListChecked\");\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewItem = generateLiInUl(modelItem, conversionApi);\n\t\tconst checkmarkElement = createCheckmarkElement(modelItem, viewWriter, !!modelItem.getAttribute(\"todoListChecked\"), onCheckboxChecked);\n\t\tconst span = viewWriter.createContainerElement(\"span\", { class: \"todo-list__label__description\" });\n\t\tviewWriter.addClass(\"todo-list\", viewItem.parent);\n\t\tviewWriter.insert(viewWriter.createPositionAt(viewItem, 0), checkmarkElement);\n\t\tviewWriter.insert(viewWriter.createPositionAfter(checkmarkElement), span);\n\t\tinjectViewList(modelItem, viewItem, conversionApi, model);\n\t};\n}\n/**\n* A model-to-view converter for the `listItem` model element insertion.\n*\n* It is used by {@link module:engine/controller/datacontroller~DataController}.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n* @param model Model instance.\n* @returns Returns a conversion callback.\n*/\nfunction dataModelViewInsertion(model) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst consumable = conversionApi.consumable;\n\t\tif (!consumable.test(data.item, \"insert\") || !consumable.test(data.item, \"attribute:listType\") || !consumable.test(data.item, \"attribute:listIndent\")) return;\n\t\tif (data.item.getAttribute(\"listType\") != \"todo\") return;\n\t\tconst modelItem = data.item;\n\t\tconsumable.consume(modelItem, \"insert\");\n\t\tconsumable.consume(modelItem, \"attribute:listType\");\n\t\tconsumable.consume(modelItem, \"attribute:listIndent\");\n\t\tconsumable.consume(modelItem, \"attribute:todoListChecked\");\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewItem = generateLiInUl(modelItem, conversionApi);\n\t\tviewWriter.addClass(\"todo-list\", viewItem.parent);\n\t\tconst label = viewWriter.createContainerElement(\"label\", { class: \"todo-list__label\" });\n\t\tconst checkbox = viewWriter.createEmptyElement(\"input\", {\n\t\t\ttype: \"checkbox\",\n\t\t\tdisabled: \"disabled\"\n\t\t});\n\t\tconst span = viewWriter.createContainerElement(\"span\", { class: \"todo-list__label__description\" });\n\t\tif (modelItem.getAttribute(\"todoListChecked\")) viewWriter.setAttribute(\"checked\", \"checked\", checkbox);\n\t\tviewWriter.insert(viewWriter.createPositionAt(viewItem, 0), label);\n\t\tviewWriter.insert(viewWriter.createPositionAt(label, 0), checkbox);\n\t\tviewWriter.insert(viewWriter.createPositionAfter(checkbox), span);\n\t\tinjectViewList(modelItem, viewItem, conversionApi, model);\n\t};\n}\n/**\n* A view-to-model converter for the checkbox element inside a view list item.\n*\n* It changes the `listType` of the model `listItem` to a `todo` value.\n* When a view checkbox element is marked as checked, an additional `todoListChecked=\"true\"` attribute is added to the model item.\n*\n* It is used by {@link module:engine/controller/datacontroller~DataController}.\n*\n* @internal\n* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n*/\nconst dataViewModelCheckmarkInsertion = (evt, data, conversionApi) => {\n\tconst modelCursor = data.modelCursor;\n\tconst modelItem = modelCursor.parent;\n\tconst viewItem = data.viewItem;\n\tif (viewItem.getAttribute(\"type\") != \"checkbox\" || modelItem.name != \"listItem\" || !modelCursor.isAtStart) return;\n\tif (!conversionApi.consumable.consume(viewItem, { name: true })) return;\n\tconst writer = conversionApi.writer;\n\twriter.setAttribute(\"listType\", \"todo\", modelItem);\n\tif (data.viewItem.hasAttribute(\"checked\")) writer.setAttribute(\"todoListChecked\", true, modelItem);\n\tdata.modelRange = writer.createRange(modelCursor);\n};\n/**\n* A model-to-view converter for the `listType` attribute change on the `listItem` model element.\n*\n* This change means that the `<li>` element parent changes to `<ul class=\"todo-list\">` and a\n* {@link module:engine/view/uielement~ViewUIElement checkbox UI element} is added at the beginning\n* of the list item element (or vice versa).\n*\n* This converter is preceded by {@link module:list/legacylist/legacyconverters~modelViewChangeType} and followed by\n* {@link module:list/legacylist/legacyconverters~modelViewMergeAfterChangeType} to handle splitting and merging surrounding lists\n* of the same type.\n*\n* It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n* @param onCheckedChange Callback fired after clicking the checkbox UI element.\n* @param view Editing view controller.\n* @returns Returns a conversion callback.\n*/\nfunction modelViewChangeType(onCheckedChange, view) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst viewItem = conversionApi.mapper.toViewElement(data.item);\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst labelElement = findLabel(viewItem, view);\n\t\tif (data.attributeNewValue == \"todo\") {\n\t\t\tconst isChecked = !!data.item.getAttribute(\"todoListChecked\");\n\t\t\tconst checkmarkElement = createCheckmarkElement(data.item, viewWriter, isChecked, onCheckedChange);\n\t\t\tconst span = viewWriter.createContainerElement(\"span\", { class: \"todo-list__label__description\" });\n\t\t\tconst itemRange = viewWriter.createRangeIn(viewItem);\n\t\t\tconst nestedList = findNestedList(viewItem);\n\t\t\tconst descriptionStart = positionAfterUiElements(itemRange.start);\n\t\t\tconst descriptionEnd = nestedList ? viewWriter.createPositionBefore(nestedList) : itemRange.end;\n\t\t\tconst descriptionRange = viewWriter.createRange(descriptionStart, descriptionEnd);\n\t\t\tviewWriter.addClass(\"todo-list\", viewItem.parent);\n\t\t\tviewWriter.move(descriptionRange, viewWriter.createPositionAt(span, 0));\n\t\t\tviewWriter.insert(viewWriter.createPositionAt(viewItem, 0), checkmarkElement);\n\t\t\tviewWriter.insert(viewWriter.createPositionAfter(checkmarkElement), span);\n\t\t} else if (data.attributeOldValue == \"todo\") {\n\t\t\tconst descriptionSpan = findDescription(viewItem, view);\n\t\t\tviewWriter.removeClass(\"todo-list\", viewItem.parent);\n\t\t\tviewWriter.remove(labelElement);\n\t\t\tviewWriter.move(viewWriter.createRangeIn(descriptionSpan), viewWriter.createPositionBefore(descriptionSpan));\n\t\t\tviewWriter.remove(descriptionSpan);\n\t\t}\n\t};\n}\n/**\n* A model-to-view converter for the `todoListChecked` attribute change on the `listItem` model element.\n*\n* It marks the {@link module:engine/view/uielement~ViewUIElement checkbox UI element} as checked.\n*\n* It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n*\n* @internal\n* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n* @param onCheckedChange Callback fired after clicking the checkbox UI element.\n* @returns Returns a conversion callback.\n*/\nfunction modelViewChangeChecked(onCheckedChange) {\n\treturn (evt, data, conversionApi) => {\n\t\tif (data.item.getAttribute(\"listType\") != \"todo\") return;\n\t\tif (!conversionApi.consumable.consume(data.item, \"attribute:todoListChecked\")) return;\n\t\tconst { mapper, writer: viewWriter } = conversionApi;\n\t\tconst isChecked = !!data.item.getAttribute(\"todoListChecked\");\n\t\tconst oldCheckmarkElement = mapper.toViewElement(data.item).getChild(0);\n\t\tconst newCheckmarkElement = createCheckmarkElement(data.item, viewWriter, isChecked, onCheckedChange);\n\t\tviewWriter.insert(viewWriter.createPositionAfter(oldCheckmarkElement), newCheckmarkElement);\n\t\tviewWriter.remove(oldCheckmarkElement);\n\t};\n}\n/**\n* A model-to-view position at zero offset mapper.\n*\n* This helper ensures that position inside todo-list in the view is mapped after the checkbox.\n*\n* It only handles the position at the beginning of a list item as other positions are properly mapped be the default mapper.\n*\n* @internal\n*/\nfunction mapModelToViewPosition(view) {\n\treturn (evt, data) => {\n\t\tconst modelPosition = data.modelPosition;\n\t\tconst parent = modelPosition.parent;\n\t\tif (!parent.is(\"element\", \"listItem\") || parent.getAttribute(\"listType\") != \"todo\") return;\n\t\tconst descSpan = findDescription(data.mapper.toViewElement(parent), view);\n\t\tif (descSpan) data.viewPosition = data.mapper.findPositionIn(descSpan, modelPosition.offset);\n\t};\n}\n/**\n* Creates a checkbox UI element.\n*/\nfunction createCheckmarkElement(modelItem, viewWriter, isChecked, onChange) {\n\treturn viewWriter.createUIElement(\"label\", {\n\t\tclass: \"todo-list__label\",\n\t\tcontenteditable: false\n\t}, function(domDocument) {\n\t\tconst checkbox = createElement(document, \"input\", {\n\t\t\ttype: \"checkbox\",\n\t\t\ttabindex: \"-1\"\n\t\t});\n\t\tif (isChecked) checkbox.setAttribute(\"checked\", \"checked\");\n\t\tcheckbox.addEventListener(\"change\", () => onChange(modelItem));\n\t\tconst domElement = this.toDomElement(domDocument);\n\t\tdomElement.appendChild(checkbox);\n\t\treturn domElement;\n\t});\n}\nfunction findLabel(viewItem, view) {\n\tconst range = view.createRangeIn(viewItem);\n\tfor (const value of range) if (value.item.is(\"uiElement\", \"label\")) return value.item;\n}\nfunction findDescription(viewItem, view) {\n\tconst range = view.createRangeIn(viewItem);\n\tfor (const value of range) if (value.item.is(\"containerElement\", \"span\") && value.item.hasClass(\"todo-list__label__description\")) return value.item;\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 ITEM_TOGGLE_KEYSTROKE = /* #__PURE__ */ parseKeystroke(\"Ctrl+Enter\");\n/**\n* The engine of the to-do list feature. It handles creating, editing and removing to-do lists and their items.\n*\n* It registers the entire functionality of the {@link module:list/legacylist/legacylistediting~LegacyListEditing legacy list editing\n* plugin} and extends it with the commands:\n*\n* - `'todoList'`,\n* - `'checkTodoList'`,\n* - `'todoListCheck'` as an alias for `checkTodoList` command.\n*/\nvar LegacyTodoListEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LegacyTodoListEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [LegacyListEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst { editing, data, model } = editor;\n\t\tmodel.schema.extend(\"listItem\", { allowAttributes: [\"todoListChecked\"] });\n\t\tmodel.schema.addAttributeCheck((context, attributeName) => {\n\t\t\tconst item = context.last;\n\t\t\tif (attributeName == \"todoListChecked\" && item.name == \"listItem\" && item.getAttribute(\"listType\") != \"todo\") return false;\n\t\t});\n\t\teditor.commands.add(\"todoList\", new LegacyListCommand(editor, \"todo\"));\n\t\tconst checkTodoListCommand = new LegacyCheckTodoListCommand(editor);\n\t\teditor.commands.add(\"checkTodoList\", checkTodoListCommand);\n\t\teditor.commands.add(\"todoListCheck\", checkTodoListCommand);\n\t\tdata.downcastDispatcher.on(\"insert:listItem\", dataModelViewInsertion(model), { priority: \"high\" });\n\t\tdata.upcastDispatcher.on(\"element:input\", dataViewModelCheckmarkInsertion, { priority: \"high\" });\n\t\tediting.downcastDispatcher.on(\"insert:listItem\", modelViewInsertion(model, (listItem) => this._handleCheckmarkChange(listItem)), { priority: \"high\" });\n\t\tediting.downcastDispatcher.on(\"attribute:listType:listItem\", modelViewChangeType((listItem) => this._handleCheckmarkChange(listItem), editing.view));\n\t\tediting.downcastDispatcher.on(\"attribute:todoListChecked:listItem\", modelViewChangeChecked((listItem) => this._handleCheckmarkChange(listItem)));\n\t\tediting.mapper.on(\"modelToViewPosition\", mapModelToViewPosition(editing.view));\n\t\tdata.mapper.on(\"modelToViewPosition\", mapModelToViewPosition(editing.view));\n\t\tthis.listenTo(editing.view.document, \"arrowKey\", jumpOverCheckmarkOnSideArrowKeyPress(model, editor.locale), { context: \"li\" });\n\t\tthis.listenTo(editing.view.document, \"keydown\", (evt, data) => {\n\t\t\tif (getCode(data) === ITEM_TOGGLE_KEYSTROKE) {\n\t\t\t\teditor.execute(\"checkTodoList\");\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t\tconst listItemsToFix = /* @__PURE__ */ new Set();\n\t\tthis.listenTo(model, \"applyOperation\", (evt, args) => {\n\t\t\tconst operation = args[0];\n\t\t\tif (operation.type == \"rename\" && operation.oldName == \"listItem\") {\n\t\t\t\tconst item = operation.position.nodeAfter;\n\t\t\t\tif (item.hasAttribute(\"todoListChecked\")) listItemsToFix.add(item);\n\t\t\t} else if (operation.type == \"changeAttribute\" && operation.key == \"listType\" && operation.oldValue === \"todo\") {\n\t\t\t\tfor (const item of operation.range.getItems()) if (item.hasAttribute(\"todoListChecked\") && item.getAttribute(\"listType\") !== \"todo\") listItemsToFix.add(item);\n\t\t\t}\n\t\t});\n\t\tmodel.document.registerPostFixer((writer) => {\n\t\t\tlet hasChanged = false;\n\t\t\tfor (const listItem of listItemsToFix) {\n\t\t\t\twriter.removeAttribute(\"todoListChecked\", listItem);\n\t\t\t\thasChanged = true;\n\t\t\t}\n\t\t\tlistItemsToFix.clear();\n\t\t\treturn hasChanged;\n\t\t});\n\t\tthis._initAriaAnnouncements();\n\t}\n\t/**\n\t* Handles the checkbox element change, moves the selection to the corresponding model item to make it possible\n\t* to toggle the `todoListChecked` attribute using the command, and restores the selection position.\n\t*\n\t* Some say it's a hack :) Moving the selection only for executing the command on a certain node and restoring it after,\n\t* is not a clear solution. We need to design an API for using commands beyond the selection range.\n\t* See https://github.com/ckeditor/ckeditor5/issues/1954.\n\t*/\n\t_handleCheckmarkChange(listItem) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst previousSelectionRanges = Array.from(model.document.selection.getRanges());\n\t\tmodel.change((writer) => {\n\t\t\twriter.setSelection(listItem, \"end\");\n\t\t\teditor.execute(\"checkTodoList\");\n\t\t\twriter.setSelection(previousSelectionRanges);\n\t\t});\n\t}\n\t/**\n\t* Observe when user enters or leaves todo list and set proper aria value in global live announcer.\n\t* This allows screen readers to indicate when the user has entered and left the specified todo list.\n\t*\n\t* @internal\n\t*/\n\t_initAriaAnnouncements() {\n\t\tconst { model, ui, t } = this.editor;\n\t\tlet lastFocusedCodeBlock = null;\n\t\tif (!ui) return;\n\t\tmodel.document.selection.on(\"change:range\", () => {\n\t\t\tconst focusParent = model.document.selection.focus.parent;\n\t\t\tconst lastElementIsTodoList = isLegacyTodoListItemElement(lastFocusedCodeBlock);\n\t\t\tconst currentElementIsTodoList = isLegacyTodoListItemElement(focusParent);\n\t\t\tif (lastElementIsTodoList && !currentElementIsTodoList) ui.ariaLiveAnnouncer.announce(t(\"Leaving a to-do list\"));\n\t\t\telse if (!lastElementIsTodoList && currentElementIsTodoList) ui.ariaLiveAnnouncer.announce(t(\"Entering a to-do list\"));\n\t\t\tlastFocusedCodeBlock = focusParent;\n\t\t});\n\t}\n};\n/**\n* Handles the left/right (LTR/RTL content) arrow key and moves the selection at the end of the previous block element\n* if the selection is just after the checkbox element. In other words, it jumps over the checkbox element when\n* moving the selection to the left/right (LTR/RTL).\n*\n* @returns Callback for 'keydown' events.\n*/\nfunction jumpOverCheckmarkOnSideArrowKeyPress(model, locale) {\n\treturn (eventInfo, domEventData) => {\n\t\tif (getLocalizedArrowKeyCodeDirection(domEventData.keyCode, locale.contentLanguageDirection) != \"left\") return;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\t\tif (!selection.isCollapsed) return;\n\t\tconst position = selection.getFirstPosition();\n\t\tconst parent = position.parent;\n\t\tif (parent.name === \"listItem\" && parent.getAttribute(\"listType\") == \"todo\" && position.isAtStart) {\n\t\t\tconst newRange = schema.getNearestSelectionRange(model.createPositionBefore(parent), \"backward\");\n\t\t\tif (newRange) model.change((writer) => writer.setSelection(newRange));\n\t\t\tdomEventData.preventDefault();\n\t\t\tdomEventData.stopPropagation();\n\t\t\teventInfo.stop();\n\t\t}\n\t};\n}\n/**\n* Returns true if the given element is a list item model element of a to-do list.\n*/\nfunction isLegacyTodoListItemElement(element) {\n\treturn !!element && element.is(\"element\", \"listItem\") && element.getAttribute(\"listType\") === \"todo\";\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 list/legacytodolist\n*/\n/**\n* The legacy to-do list feature.\n*\n* This is a \"glue\" plugin that loads the {@link module:list/legacytodolist/legacytodolistediting~LegacyTodoListEditing legacy to-do list\n* editing feature} and the {@link module:list/todolist/todolistui~TodoListUI to-do list UI feature}.\n*/\nvar LegacyTodoList = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [LegacyTodoListEditing, TodoListUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"LegacyTodoList\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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*/\nvar AdjacentListsSupport = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AdjacentListsSupport\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.model.schema.register(\"listSeparator\", {\n\t\t\tallowWhere: \"$block\",\n\t\t\tisBlock: true\n\t\t});\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:ol\", listSeparatorUpcastConverter());\n\t\t\tdispatcher.on(\"element:ul\", listSeparatorUpcastConverter());\n\t\t}).elementToElement({\n\t\t\tmodel: \"listSeparator\",\n\t\t\tview: \"ck-list-separator\"\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").elementToElement({\n\t\t\tmodel: \"listSeparator\",\n\t\t\tview: {\n\t\t\t\tname: \"div\",\n\t\t\t\tclasses: [\"ck-list-separator\", \"ck-hidden\"]\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: \"listSeparator\",\n\t\t\tview: (modelElement, conversionApi) => {\n\t\t\t\tconst viewElement = conversionApi.writer.createContainerElement(\"ck-list-separator\");\n\t\t\t\tconversionApi.writer.setCustomProperty(\"dataPipeline:transparentRendering\", true, viewElement);\n\t\t\t\tviewElement.getFillerOffset = () => null;\n\t\t\t\treturn viewElement;\n\t\t\t}\n\t\t});\n\t}\n};\n/**\n* Inserts a list separator element between two lists of the same type (`ol` + `ol` or `ul` + `ul`).\n*/\nfunction listSeparatorUpcastConverter() {\n\treturn (evt, data, conversionApi) => {\n\t\tconst element = data.viewItem;\n\t\tconst nextSibling = element.nextSibling;\n\t\tif (!nextSibling) return;\n\t\tif (element.name !== nextSibling.name) return;\n\t\tif (!data.modelRange) Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n\t\tconst writer = conversionApi.writer;\n\t\tconst modelElement = writer.createElement(\"listSeparator\");\n\t\tif (!conversionApi.safeInsert(modelElement, data.modelCursor)) return;\n\t\tconst parts = conversionApi.getSplitParts(modelElement);\n\t\tdata.modelRange = writer.createRange(data.modelRange.start, writer.createPositionAfter(parts[parts.length - 1]));\n\t\tconversionApi.updateConversionResult(modelElement, data);\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 { AdjacentListsSupport, CheckTodoListCommand, LegacyCheckTodoListCommand, LegacyIndentCommand, LegacyList, LegacyListCommand, LegacyListEditing, LegacyListProperties, LegacyListPropertiesEditing, LegacyListReversedCommand, LegacyListStartCommand, LegacyListStyleCommand, LegacyListUtils, LegacyTodoList, LegacyTodoListEditing, List, ListCommand, ListEditing, ListFormatting, ListIndentCommand, ListItemBoldIntegration, ListItemFontColorIntegration, ListItemFontFamilyIntegration, ListItemFontSizeIntegration, ListItemItalicIntegration, ListMergeCommand, ListProperties, ListPropertiesEditing, ListPropertiesUI, ListPropertiesUtils, ListReversedCommand, ListSplitCommand, ListStartCommand, ListStyleCommand, ListUI, ListUtils, TodoList, TodoListEditing, TodoListUI, ListBlocksIterable as _ListBlocksIterable, ListItemUid as _ListItemUid, ListPropertiesView as _ListPropertiesView, ListWalker as _ListWalker, SiblingListBlocksIterator as _SiblingListBlocksIterator, TodoCheckboxChangeObserver as _TodoCheckboxChangeObserver, canBecomeSimpleListItem as _canBecomeSimpleListItem, createListElement as _createListElement, createListItemElement as _createListItemElement, createUIComponents as _createListUIComponents, createModelToViewPositionMapper as _createModelToViewListPositionMapper, expandListBlocksToCompleteItems as _expandListBlocksToCompleteItems, expandListBlocksToCompleteList as _expandListBlocksToCompleteList, findAndAddListHeadToMap as _findAndAddListHeadToMap, findMappedViewElement as _findMappedListItemViewElement, fixListIndents as _fixListIndents, fixListItemIds as _fixListItemIds, getAllListItemBlocks as _getAllListItemBlocks, getAllSupportedStyleTypes as _getAllSupportedListStyleTypes, getIndent as _getListIndent, getListItemBlocks as _getListItemBlocks, getListItems as _getListItems, getListStyleTypeFromTypeAttribute as _getListStyleTypeFromTypeAttribute, getListTypeFromListStyleType as _getListTypeFromListStyleType, getNestedListBlocks as _getNestedListBlocks, getNormalizedConfig as _getNormalizedListConfig, getSelectedBlockObject as _getSelectedBlockObject, getTypeAttributeFromListStyleType as _getTypeAttributeFromListStyleType, getViewElementIdForListType as _getViewElementIdForListType, getViewElementNameForListType as _getViewElementNameForListType, indentBlocks as _indentListBlocks, isFirstBlockOfListItem as _isFirstBlockOfListItem, isLastBlockOfListItem as _isLastBlockOfListItem, isListItemBlock as _isListItemBlock, isListItemView as _isListItemView, isListView as _isListView, isNumberedListType as _isNumberedListType, isSingleListItem as _isSingleListItem, bogusParagraphCreator as _listItemBogusParagraphCreator, listItemDowncastConverter as _listItemDowncastConverter, listItemDowncastRemoveConverter as _listItemDowncastRemoveConverter, listItemUpcastConverter as _listItemUpcastConverter, listPropertiesUpcastConverter as _listPropertiesUpcastConverter, mergeListItemBefore as _mergeListItemBefore, normalizeListStyle as _normalizeListStyle, outdentFollowingItems as _outdentFollowingListItems, outdentBlocksWithMerge as _outdentListBlocksWithMerge, reconvertItemsOnDataChange as _reconvertListItemsOnDataChange, removeListAttributes as _removeListAttributes, sortBlocks as _sortListBlocks, splitListItemBefore as _splitListItemBefore };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module list/list/utils/listwalker\n */\n\nimport { first, toArray, type ArrayOrItem } from '@ckeditor/ckeditor5-utils';\nimport { isListItemBlock, type ListElement } from './model.js';\n\nimport type { ModelElement, ModelNode } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Document list blocks iterator.\n *\n * @internal\n */\nexport class ListWalker {\n\t/**\n\t * The start list item block element.\n\t */\n\tprivate _startElement: ModelNode;\n\n\t/**\n\t * The reference indent. Initialized by the indent of the start block.\n\t */\n\tprivate _referenceIndent: number;\n\n\t/**\n\t * The iterating direction.\n\t */\n\tprivate _isForward: boolean;\n\n\t/**\n\t * Whether start block should be included in the result (if it's matching other criteria).\n\t */\n\tprivate _includeSelf: boolean;\n\n\t/**\n\t * Additional attributes that must be the same for each block.\n\t */\n\tprivate _sameAttributes: Array<string>;\n\n\t/**\n\t * Whether blocks with the same indent level as the start block should be included in the result.\n\t */\n\tprivate _sameIndent: boolean;\n\n\t/**\n\t * Whether blocks with a lower indent level than the start block should be included in the result.\n\t */\n\tprivate _lowerIndent: boolean;\n\n\t/**\n\t * Whether blocks with a higher indent level than the start block should be included in the result.\n\t */\n\tprivate _higherIndent: boolean;\n\n\t/**\n\t * Creates a document list iterator.\n\t *\n\t * @param startElement The start list item block element.\n\t * @param options.direction The iterating direction.\n\t * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n\t * @param options.sameAttributes Additional attributes that must be the same for each block.\n\t * @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n\t * in the result.\n\t * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n\t * in the result.\n\t * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n\t * in the result.\n\t */\n\tconstructor(\n\t\tstartElement: ModelNode,\n\t\toptions: ListWalkerOptions\n\t) {\n\t\tthis._startElement = startElement;\n\t\tthis._referenceIndent = startElement.getAttribute( 'listIndent' ) as number;\n\t\tthis._isForward = options.direction == 'forward';\n\t\tthis._includeSelf = !!options.includeSelf;\n\t\tthis._sameAttributes = toArray( options.sameAttributes || [] );\n\t\tthis._sameIndent = !!options.sameIndent;\n\t\tthis._lowerIndent = !!options.lowerIndent;\n\t\tthis._higherIndent = !!options.higherIndent;\n\t}\n\n\t/**\n\t * Performs only first step of iteration and returns the result.\n\t *\n\t * @param startElement The start list item block element.\n\t * @param options.direction The iterating direction.\n\t * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n\t * @param options.sameAttributes Additional attributes that must be the same for each block.\n\t * @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n\t * in the result.\n\t * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n\t * in the result.\n\t * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n\t * in the result.\n\t */\n\tpublic static first(\n\t\tstartElement: ModelNode,\n\t\toptions: ListWalkerOptions\n\t): ListElement | null {\n\t\tconst walker = new this( startElement, options );\n\t\tconst iterator = walker[ Symbol.iterator ]();\n\n\t\treturn first( iterator );\n\t}\n\n\t/**\n\t * Iterable interface.\n\t */\n\tpublic* [ Symbol.iterator ](): Iterator<ListElement> {\n\t\tconst nestedItems: Array<ListElement> = [];\n\n\t\tfor ( const { node } of new SiblingListBlocksIterator( this._getStartNode(), this._isForward ? 'forward' : 'backward' ) ) {\n\t\t\tconst indent = node.getAttribute( 'listIndent' );\n\n\t\t\t// Leaving a nested list.\n\t\t\tif ( indent < this._referenceIndent ) {\n\t\t\t\t// Abort searching blocks.\n\t\t\t\tif ( !this._lowerIndent ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// While searching for lower indents, update the reference indent to find another parent in the next step.\n\t\t\t\tthis._referenceIndent = indent;\n\t\t\t}\n\t\t\t// Entering a nested list.\n\t\t\telse if ( indent > this._referenceIndent ) {\n\t\t\t\t// Ignore nested blocks.\n\t\t\t\tif ( !this._higherIndent ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Collect nested blocks to verify if they are really nested, or it's a different item.\n\t\t\t\tif ( !this._isForward ) {\n\t\t\t\t\tnestedItems.push( node );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Same indent level block.\n\t\t\telse {\n\t\t\t\t// Ignore same indent block.\n\t\t\t\tif ( !this._sameIndent ) {\n\t\t\t\t\t// While looking for nested blocks, stop iterating while encountering first same indent block.\n\t\t\t\t\tif ( this._higherIndent ) {\n\t\t\t\t\t\t// No more nested blocks so yield nested items.\n\t\t\t\t\t\tif ( nestedItems.length ) {\n\t\t\t\t\t\t\tyield* nestedItems;\n\t\t\t\t\t\t\tnestedItems.length = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Abort if item has any additionally specified attribute different.\n\t\t\t\tif ( this._sameAttributes.some( attr => node.getAttribute( attr ) !== this._startElement.getAttribute( attr ) ) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// There is another block for the same list item so the nested items were in the same list item.\n\t\t\tif ( nestedItems.length ) {\n\t\t\t\tyield* nestedItems;\n\t\t\t\tnestedItems.length = 0;\n\t\t\t}\n\n\t\t\tyield node;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the model element to start iterating.\n\t */\n\tprivate _getStartNode() {\n\t\tif ( this._includeSelf ) {\n\t\t\treturn this._startElement;\n\t\t}\n\n\t\treturn this._isForward ?\n\t\t\tthis._startElement.nextSibling :\n\t\t\tthis._startElement.previousSibling;\n\t}\n}\n\n/**\n * Iterates sibling list blocks starting from the given node.\n *\n * @internal\n */\nexport class SiblingListBlocksIterator implements IterableIterator<ListIteratorValue> {\n\tprivate _node: ModelNode | null;\n\tprivate _isForward: boolean;\n\tprivate _previousNodesByIndent: Array<ListElement> = [];\n\tprivate _previous: ListElement | null = null;\n\tprivate _previousNodeIndent: number | null = null;\n\n\t/**\n\t * @param node The model node.\n\t * @param direction Iteration direction.\n\t */\n\tconstructor(\n\t\tnode: ModelNode | null,\n\t\tdirection: 'forward' | 'backward' = 'forward'\n\t) {\n\t\tthis._node = node;\n\t\tthis._isForward = direction === 'forward';\n\t}\n\n\tpublic [ Symbol.iterator ](): IterableIterator<ListIteratorValue> {\n\t\treturn this;\n\t}\n\n\tpublic next(): IteratorResult<ListIteratorValue> {\n\t\tif ( !isListItemBlock( this._node ) ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\tconst nodeIndent = this._node.getAttribute( 'listIndent' );\n\t\tlet previousNodeInList: ListElement | null = null;\n\n\t\tif ( this._previous ) {\n\t\t\tconst previousNodeIndent = this._previousNodeIndent!;\n\n\t\t\t// Let's find previous node for the same indent.\n\t\t\t// We're going to need that when we get back to previous indent.\n\t\t\tif ( nodeIndent > previousNodeIndent ) {\n\t\t\t\tthis._previousNodesByIndent[ previousNodeIndent ] = this._previous;\n\t\t\t}\n\t\t\t// Restore the one for given indent.\n\t\t\telse if ( nodeIndent < previousNodeIndent ) {\n\t\t\t\tpreviousNodeInList = this._previousNodesByIndent[ nodeIndent ] || null;\n\t\t\t\tthis._previousNodesByIndent.length = nodeIndent;\n\t\t\t}\n\t\t\t// Same indent.\n\t\t\telse {\n\t\t\t\tpreviousNodeInList = this._previous;\n\t\t\t}\n\t\t}\n\n\t\tconst value = {\n\t\t\tnode: this._node,\n\t\t\tprevious: this._previous,\n\t\t\tpreviousNodeInList\n\t\t};\n\n\t\tthis._previous = this._node as ListElement;\n\t\tthis._previousNodeIndent = nodeIndent;\n\t\tthis._node = this._isForward ? this._node.nextSibling : this._node.previousSibling;\n\n\t\treturn { value, done: false };\n\t}\n}\n\n/**\n * The iterable protocol over the list elements.\n *\n * @internal\n */\nexport class ListBlocksIterable {\n\tprivate _listHead: ModelElement;\n\n\t/**\n\t * @param listHead The head element of a list.\n\t */\n\tconstructor( listHead: ModelElement ) {\n\t\tthis._listHead = listHead;\n\t}\n\n\t/**\n\t * List blocks iterator.\n\t *\n\t * Iterates over all blocks of a list.\n\t */\n\tpublic [ Symbol.iterator ](): Iterator<ListIteratorValue> {\n\t\treturn new SiblingListBlocksIterator( this._listHead );\n\t}\n}\n\n/**\n * Object returned by `SiblingListBlocksIterator` when traversing a list.\n *\n * @internal\n */\nexport interface ListIteratorValue {\n\n\t/**\n\t * The current list node.\n\t */\n\tnode: ListElement;\n\n\t/**\n\t * The previous list node.\n\t */\n\tprevious: ListElement | null;\n\n\t/**\n\t * The previous list node at the same indent as current node.\n\t */\n\tpreviousNodeInList: ListElement | null;\n}\n\n/**\n * Document list blocks iterator options.\n *\n * @internal\n */\nexport type ListWalkerOptions = {\n\tdirection?: 'forward' | 'backward';\n\tincludeSelf?: boolean;\n\tsameAttributes?: ArrayOrItem<string>;\n\tsameIndent?: boolean;\n\tlowerIndent?: boolean;\n\thigherIndent?: boolean;\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/**\n * @module list/list/utils/model\n */\n\nimport type {\n\tModelDocumentFragment,\n\tModelElement,\n\tModel,\n\tModelNode,\n\tModelWriter,\n\tModelItem,\n\tModelSchema\n} from '@ckeditor/ckeditor5-engine';\n\nimport { uid, toArray, type ArrayOrItem } from '@ckeditor/ckeditor5-utils';\n\nimport { ListWalker, type ListWalkerOptions, SiblingListBlocksIterator } from './listwalker.js';\nimport { type ListType } from '../listediting.js';\n\n/**\n * The list item ID generator.\n *\n * @internal\n */\nexport class ListItemUid {\n\t/**\n\t * Returns the next ID.\n\t *\n\t * @internal\n\t */\n\t/* istanbul ignore next: static function definition -- @preserve */\n\tpublic static next(): string {\n\t\treturn uid();\n\t}\n}\n\n/**\n * An {@link module:engine/model/element~ModelElement} that is known to be a list element.\n *\n * @internal\n */\nexport interface ListElement extends ModelElement {\n\tgetAttribute( key: 'listItemId' ): string;\n\tgetAttribute( key: 'listIndent' ): number;\n\tgetAttribute( key: 'listType' ): ListType;\n\tgetAttribute( key: string ): unknown;\n}\n\n/**\n * Returns true if the given model node is a list item block.\n *\n * @internal\n */\nexport function isListItemBlock( node: ModelItem | ModelDocumentFragment | null ): node is ListElement {\n\treturn !!node && node.is( 'element' ) && node.hasAttribute( 'listItemId' );\n}\n\n/**\n * Returns an array with all elements that represents the same list item.\n *\n * It means that values for `listIndent`, and `listItemId` for all items are equal.\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n * in the result.\n */\nexport function getAllListItemBlocks(\n\tlistItem: ModelNode,\n\toptions: {\n\t\thigherIndent?: boolean;\n\t} = {}\n): Array<ListElement> {\n\treturn [\n\t\t...getListItemBlocks( listItem, { ...options, direction: 'backward' } ),\n\t\t...getListItemBlocks( listItem, { ...options, direction: 'forward' } )\n\t];\n}\n\n/**\n * Returns an array with elements that represents the same list item in the specified direction.\n *\n * It means that values for `listIndent` and `listItemId` for all items are equal.\n *\n * **Note**: For backward search the provided item is not included, but for forward search it is included in the result.\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options.direction Walking direction.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included in the result.\n */\nexport function getListItemBlocks(\n\tlistItem: ModelNode,\n\toptions: {\n\t\tdirection?: 'forward' | 'backward';\n\t\thigherIndent?: boolean;\n\t} = {}\n): Array<ListElement> {\n\tconst isForward = options.direction == 'forward';\n\n\tconst items = Array.from( new ListWalker( listItem, {\n\t\t...options,\n\t\tincludeSelf: isForward,\n\t\tsameIndent: true,\n\t\tsameAttributes: 'listItemId'\n\t} ) );\n\n\treturn isForward ? items : items.reverse();\n}\n\n/**\n * Returns a list items nested inside the given list item.\n *\n * @internal\n */\nexport function getNestedListBlocks( listItem: ModelElement ): Array<ListElement> {\n\treturn Array.from( new ListWalker( listItem, {\n\t\tdirection: 'forward',\n\t\thigherIndent: true\n\t} ) );\n}\n\n/**\n * Returns array of all blocks/items of the same list as given block (same indent, same type and properties).\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options Additional list walker options to modify the range of returned list items.\n */\nexport function getListItems( listItem: ModelElement, options?: ListWalkerOptions ): Array<ListElement> {\n\tconst backwardBlocks = new ListWalker( listItem, {\n\t\tsameIndent: true,\n\t\tsameAttributes: 'listType',\n\t\t...options\n\t} );\n\n\tconst forwardBlocks = new ListWalker( listItem, {\n\t\tsameIndent: true,\n\t\tsameAttributes: 'listType',\n\t\tincludeSelf: true,\n\t\tdirection: 'forward',\n\t\t...options\n\t} );\n\n\treturn [\n\t\t...Array.from( backwardBlocks ).reverse(),\n\t\t...forwardBlocks\n\t];\n}\n\n/**\n * Check if the given block is the first in the list item.\n *\n * @internal\n * @param listBlock The list block element.\n */\nexport function isFirstBlockOfListItem( listBlock: ModelNode ): boolean {\n\tconst previousSibling = ListWalker.first( listBlock, {\n\t\tsameIndent: true,\n\t\tsameAttributes: 'listItemId'\n\t} );\n\n\tif ( !previousSibling ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Check if the given block is the last in the list item.\n *\n * @internal\n */\nexport function isLastBlockOfListItem( listBlock: ModelElement ): boolean {\n\tconst nextSibling = ListWalker.first( listBlock, {\n\t\tdirection: 'forward',\n\t\tsameIndent: true,\n\t\tsameAttributes: 'listItemId'\n\t} );\n\n\tif ( !nextSibling ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n *\n * @internal\n * @param blocks The list of selected blocks.\n * @param options.withNested Whether should include nested list items.\n */\nexport function expandListBlocksToCompleteItems(\n\tblocks: ArrayOrItem<ModelElement>,\n\toptions: { withNested?: boolean } = {}\n): Array<ListElement> {\n\tblocks = toArray( blocks );\n\n\tconst higherIndent = options.withNested !== false;\n\tconst allBlocks = new Set<ListElement>();\n\n\tfor ( const block of blocks ) {\n\t\tfor ( const itemBlock of getAllListItemBlocks( block, { higherIndent } ) ) {\n\t\t\tallBlocks.add( itemBlock );\n\t\t}\n\t}\n\n\treturn sortBlocks( allBlocks );\n}\n\n/**\n * Expands the given list of selected blocks to include all the items of the lists they're in.\n *\n * @internal\n * @param blocks The list of selected blocks.\n */\nexport function expandListBlocksToCompleteList( blocks: ArrayOrItem<ModelElement> ): Array<ListElement> {\n\tblocks = toArray( blocks );\n\n\tconst allBlocks = new Set<ListElement>();\n\n\tfor ( const block of blocks ) {\n\t\tfor ( const itemBlock of getListItems( block ) ) {\n\t\t\tallBlocks.add( itemBlock );\n\t\t}\n\t}\n\n\treturn sortBlocks( allBlocks );\n}\n\n/**\n * Splits the list item just before the provided list block.\n *\n * @internal\n * @param listBlock The list block element.\n * @param writer The model writer.\n * @returns The array of updated blocks.\n */\nexport function splitListItemBefore(\n\tlistBlock: ModelElement,\n\twriter: ModelWriter\n): Array<ListElement> {\n\tconst blocks = getListItemBlocks( listBlock, { direction: 'forward' } );\n\tconst id = ListItemUid.next();\n\n\tfor ( const block of blocks ) {\n\t\twriter.setAttribute( 'listItemId', id, block );\n\t}\n\n\treturn blocks;\n}\n\n/**\n * Merges the list item with the parent list item.\n *\n * @internal\n * @param listBlock The list block element.\n * @param parentBlock The list block element to merge with.\n * @param writer The model writer.\n * @returns The array of updated blocks.\n */\nexport function mergeListItemBefore(\n\tlistBlock: ModelNode,\n\tparentBlock: ModelElement,\n\twriter: ModelWriter\n): Array<ListElement> {\n\tconst attributes: Record<string, unknown> = {};\n\n\tfor ( const [ key, value ] of parentBlock.getAttributes() ) {\n\t\tif ( key.startsWith( 'list' ) ) {\n\t\t\tattributes[ key ] = value;\n\t\t}\n\t}\n\n\tconst blocks = getListItemBlocks( listBlock, { direction: 'forward' } );\n\n\tfor ( const block of blocks ) {\n\t\twriter.setAttributes( attributes, block );\n\t}\n\n\treturn blocks;\n}\n\n/**\n * Increases indentation of given list blocks.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n * @param options Additional options.\n * @param options.expand Whether should expand the list of blocks to include complete list items.\n * @param options.indentBy The number of levels the indentation should change (could be negative).\n * @param options.attributeNames List of attribute names to remove when a block leaves the list (when blockIndent < 0).\n */\nexport function indentBlocks(\n\tblocks: ArrayOrItem<ListElement>,\n\twriter: ModelWriter,\n\t{\n\t\texpand,\n\t\tindentBy = 1,\n\t\tattributeNames\n\t}: {\n\t\texpand?: boolean;\n\t\tindentBy?: number;\n\t\tattributeNames: Array<string>;\n\t}\n): Array<ListElement> {\n\tblocks = toArray( blocks );\n\n\t// Expand the selected blocks to contain the whole list items.\n\tconst allBlocks = expand ? expandListBlocksToCompleteItems( blocks ) : blocks;\n\n\tfor ( const block of allBlocks ) {\n\t\tconst blockIndent = block.getAttribute( 'listIndent' ) + indentBy;\n\n\t\tif ( blockIndent < 0 ) {\n\t\t\tremoveListAttributes( block, writer, attributeNames );\n\t\t} else {\n\t\t\twriter.setAttribute( 'listIndent', blockIndent, block );\n\t\t}\n\t}\n\n\treturn allBlocks;\n}\n\n/**\n * Decreases indentation of given list of blocks. If the indentation of some blocks matches the indentation\n * of surrounding blocks, they get merged together.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n * @param options Additional options.\n * @param options.attributeNames List of attribute names to remove when a block leaves the list (when blockIndent < 0).\n */\nexport function outdentBlocksWithMerge(\n\tblocks: ArrayOrItem<ListElement>,\n\twriter: ModelWriter,\n\t{ attributeNames }: { attributeNames: Array<string> }\n): Array<ListElement> {\n\tblocks = toArray( blocks );\n\n\t// Expand the selected blocks to contain the whole list items.\n\tconst allBlocks = expandListBlocksToCompleteItems( blocks );\n\tconst visited = new Set<ListElement>();\n\n\tconst referenceIndent = Math.min( ...allBlocks.map( block => block.getAttribute( 'listIndent' ) ) );\n\tconst parentBlocks = new Map();\n\n\t// Collect parent blocks before the list structure gets altered.\n\tfor ( const block of allBlocks ) {\n\t\tparentBlocks.set( block, ListWalker.first( block, { lowerIndent: true } ) );\n\t}\n\n\tfor ( const block of allBlocks ) {\n\t\tif ( visited.has( block ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisited.add( block );\n\n\t\tconst blockIndent = block.getAttribute( 'listIndent' ) - 1;\n\n\t\tif ( blockIndent < 0 ) {\n\t\t\tremoveListAttributes( block, writer, attributeNames );\n\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Merge with parent list item while outdenting and indent matches reference indent.\n\t\t// The parent block may be null if the block has no ancestor with a lower indent (e.g. when skip-level\n\t\t// lists are enabled and the first item starts at indent > 0). In that case, skip the merge and just\n\t\t// decrease the indent. Without skip-level lists, the post-fixer guarantees sequential indents, so\n\t\t// a parent with a lower indent always exists and this guard has no effect.\n\t\tif ( block.getAttribute( 'listIndent' ) == referenceIndent && parentBlocks.get( block ) ) {\n\t\t\tconst mergedBlocks = mergeListItemIfNotLast( block, parentBlocks.get( block ), writer );\n\n\t\t\t// All list item blocks are updated while merging so add those to visited set.\n\t\t\tfor ( const mergedBlock of mergedBlocks ) {\n\t\t\t\tvisited.add( mergedBlock );\n\t\t\t}\n\n\t\t\t// The indent level was updated while merging so continue to next block.\n\t\t\tif ( mergedBlocks.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\twriter.setAttribute( 'listIndent', blockIndent, block );\n\t}\n\n\treturn sortBlocks( visited );\n}\n\n/**\n * Removes all list attributes from the given blocks.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n * @param attributeNames List of attribute names to remove.\n * @returns Array of altered blocks.\n */\nexport function removeListAttributes(\n\tblocks: ArrayOrItem<ModelElement>,\n\twriter: ModelWriter,\n\tattributeNames: Array<string>\n): Array<ModelElement> {\n\tblocks = toArray( blocks );\n\n\t// Convert simple list items to plain paragraphs.\n\tfor ( const block of blocks ) {\n\t\tif ( block.is( 'element', 'listItem' ) ) {\n\t\t\twriter.rename( block, 'paragraph' );\n\t\t}\n\t}\n\n\t// Remove list attributes.\n\tfor ( const block of blocks ) {\n\t\tfor ( const attributeKey of block.getAttributeKeys() ) {\n\t\t\tif ( attributeNames.includes( attributeKey ) ) {\n\t\t\t\twriter.removeAttribute( attributeKey, block );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn blocks;\n}\n\n/**\n * Checks whether the given blocks are related to a single list item.\n *\n * @internal\n * @param blocks The list block elements.\n */\nexport function isSingleListItem( blocks: Array<ModelNode> ): boolean {\n\tif ( !blocks.length ) {\n\t\treturn false;\n\t}\n\n\tconst firstItemId = blocks[ 0 ].getAttribute( 'listItemId' );\n\n\tif ( !firstItemId ) {\n\t\treturn false;\n\t}\n\n\treturn !blocks.some( item => item.getAttribute( 'listItemId' ) != firstItemId );\n}\n\n/**\n * Modifies the indents of list blocks following the given list block so the indentation is valid after\n * the given block is no longer a list item.\n *\n * @internal\n * @param lastBlock The last list block that has become a non-list element.\n * @param writer The model writer.\n * @returns Array of altered blocks.\n */\nexport function outdentFollowingItems( lastBlock: ModelElement, writer: ModelWriter ): Array<ListElement> {\n\tconst changedBlocks = [];\n\n\t// Start from the model item that is just after the last turned-off item.\n\tlet currentIndent = Number.POSITIVE_INFINITY;\n\n\t// Correct indent of all items after the last turned off item.\n\t// Rules that should be followed:\n\t// 1. All direct sub-items of turned-off item should become indent 0, because the first item after it\n\t//    will be the first item of a new list. Other items are at the same level, so should have same 0 index.\n\t// 2. All items with indent lower than indent of turned-off item should become indent 0, because they\n\t//    should not end up as a child of any of list items that they were not children of before.\n\t// 3. All other items should have their indent changed relatively to it's parent.\n\t//\n\t// For example:\n\t// 1  * --------\n\t// 2     * --------\n\t// 3        * --------\t\t\t<-- this is turned off.\n\t// 4           * --------\t\t<-- this has to become indent = 0, because it will be first item on a new list.\n\t// 5              * --------\t<-- this should be still be a child of item above, so indent = 1.\n\t// 6        * --------\t\t\t<-- this has to become indent = 0, because it should not be a child of any of items above.\n\t// 7           * --------\t\t<-- this should be still be a child of item above, so indent = 1.\n\t// 8     * --------\t\t\t\t<-- this has to become indent = 0.\n\t// 9        * --------\t\t\t<-- this should still be a child of item above, so indent = 1.\n\t// 10          * --------\t\t<-- this should still be a child of item above, so indent = 2.\n\t// 11          * --------\t\t<-- this should still be at the same level as item above, so indent = 2.\n\t// 12 * --------\t\t\t\t<-- this and all below are left unchanged.\n\t// 13    * --------\n\t// 14       * --------\n\t//\n\t// After turning off 3 the list becomes:\n\t//\n\t// 1  * --------\n\t// 2     * --------\n\t//\n\t// 3  --------\n\t//\n\t// 4  * --------\n\t// 5     * --------\n\t// 6  * --------\n\t// 7     * --------\n\t// 8  * --------\n\t// 9     * --------\n\t// 10       * --------\n\t// 11       * --------\n\t// 12 * --------\n\t// 13    * --------\n\t// 14       * --------\n\t//\n\t// Thanks to this algorithm no lists are mismatched and no items get unexpected children/parent, while\n\t// those parent-child connection which are possible to maintain are still maintained. It's worth noting\n\t// that this is the same effect that we would be get by multiple use of outdent command. However doing\n\t// it like this is much more efficient because it's less operation (less memory usage, easier OT) and\n\t// less conversion (faster).\n\tfor ( const { node } of new SiblingListBlocksIterator( lastBlock.nextSibling ) ) {\n\t\t// Check each next list item, as long as its indent is higher than 0.\n\t\tconst indent = node.getAttribute( 'listIndent' );\n\n\t\t// If the indent is 0 we are not going to change anything anyway.\n\t\tif ( indent == 0 ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// We check if that's item indent is lower than current relative indent.\n\t\tif ( indent < currentIndent ) {\n\t\t\t// If it is, current relative indent becomes that indent.\n\t\t\tcurrentIndent = indent;\n\t\t}\n\n\t\t// Fix indent relatively to current relative indent.\n\t\t// Note, that if we just changed the current relative indent, the newIndent will be equal to 0.\n\t\tconst newIndent = indent - currentIndent;\n\n\t\twriter.setAttribute( 'listIndent', newIndent, node );\n\t\tchangedBlocks.push( node );\n\t}\n\n\treturn changedBlocks;\n}\n\n/**\n * Returns the array of given blocks sorted by model indexes (document order).\n *\n * @internal\n */\nexport function sortBlocks<T extends ModelElement>( blocks: Iterable<T> ): Array<T> {\n\treturn Array.from( blocks )\n\t\t.filter( block => block.root.rootName !== '$graveyard' )\n\t\t.sort( ( a, b ) => a.index! - b.index! );\n}\n\n/**\n * Returns a selected block object. If a selected object is inline or when there is no selected\n * object, `null` is returned.\n *\n * @internal\n * @param model The instance of editor model.\n * @returns Selected block object or `null`.\n */\nexport function getSelectedBlockObject( model: Model ): ModelElement | null {\n\tconst selectedElement = model.document.selection.getSelectedElement();\n\n\tif ( !selectedElement ) {\n\t\treturn null;\n\t}\n\n\tif ( model.schema.isObject( selectedElement ) && model.schema.isBlock( selectedElement ) ) {\n\t\treturn selectedElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Checks whether the given block can be replaced by a listItem.\n *\n * Note that this is possible only when multiBlock = false option is set in feature config.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n * @internal\n */\nexport function canBecomeSimpleListItem( block: ModelElement, schema: ModelSchema ): boolean {\n\treturn schema.checkChild( block.parent as ModelElement, 'listItem' ) &&\n\t\tschema.checkChild( block, '$text' ) &&\n\t\t!schema.isObject( block );\n}\n\n/**\n * Returns true if listType is of type `numbered` or `customNumbered`.\n *\n * @internal\n */\nexport function isNumberedListType( listType: ListType ): boolean {\n\treturn listType == 'numbered' || listType == 'customNumbered';\n}\n\n/**\n * Checks if the given list item block is the first block of the first item in its list at the given indent.\n *\n * Walks back over previous siblings and returns:\n * - `true` if it reaches a non-list block or a list block at a lower indent (a new list begins here),\n * - `false` if it finds a same-indent block of the same `listItemId` (a continuation of the current item) or of the same\n *   `listType` (the visible list already has earlier items),\n * - `true` if it finds a same-indent block of a different `listType` and a different `listItemId` (a different list ends; ours\n *   starts here),\n * - `false` if the loop ends (it reaches the first non-list-item block, or no more previous siblings) while passing only\n *   higher-indent blocks (those blocks live inside an intermediate skip-level `<li style=\"list-style-type:none\">` wrapper\n *   at our indent).\n *\n * For example, in the model:\n *\n * ```\n * '  # aaa'\n * '# bbb'\n * ```\n *\n * `bbb` is preceded by a higher-indent block `aaa`, which in the view is rendered inside an intermediate\n * skip-level wrapper at indent 0:\n *\n * ```html\n * <ol>\n *   <li style=\"list-style-type:none\">\n *     <ol>\n *       <li>aaa</li>\n *     </ol>\n *   </li>\n *   <li>bbb</li>\n * </ol>\n * ```\n *\n * So `bbb` is the second visible item in the outer list and the function returns `false`.\n */\nexport function isFirstListItemInList( listItem: ModelElement ): boolean {\n\tconst itemIndent = listItem.getAttribute( 'listIndent' ) as number;\n\tconst itemListType = listItem.getAttribute( 'listType' );\n\tconst itemListItemId = listItem.getAttribute( 'listItemId' );\n\n\tlet previous = listItem.previousSibling;\n\tlet sawHigherIndent = false;\n\n\twhile ( isListItemBlock( previous ) ) {\n\t\tconst previousIndent = previous.getAttribute( 'listIndent' ) as number;\n\n\t\tif ( previousIndent < itemIndent ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( previousIndent === itemIndent ) {\n\t\t\t// The previous block belongs to the current item — we are a continuation block, not the first block of\n\t\t\t// the list item, so item-block indent should not apply (a normal list indent should fall through instead).\n\t\t\tif ( previous.getAttribute( 'listItemId' ) === itemListItemId ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn previous.getAttribute( 'listType' ) !== itemListType;\n\t\t}\n\n\t\tsawHigherIndent = true;\n\t\tprevious = previous.previousSibling;\n\t}\n\n\t// Reached the first non-list-item block (or no more previous siblings). If only higher-indent blocks were on\n\t// the way, they live inside an intermediate skip-level wrapper at our indent — we are not first.\n\treturn !sawHigherIndent;\n}\n\n/**\n * Merges a given block to the given parent block if parent is a list item and there is no more blocks in the same item.\n */\nfunction mergeListItemIfNotLast(\n\tblock: ListElement,\n\tparentBlock: ListElement,\n\twriter: ModelWriter\n) {\n\tconst parentItemBlocks = getListItemBlocks( parentBlock, { direction: 'forward' } );\n\n\t// Merge with parent only if outdented item wasn't the last one in its parent.\n\t// Merge:\n\t// * a\t\t\t->\t\t* a\n\t//   * [b]\t\t->\t\t  b\n\t//   c\t\t\t->\t\t  c\n\t// Don't merge:\n\t// * a\t\t\t->\t\t* a\n\t//   * [b]\t\t-> \t\t* b\n\t// * c\t\t\t->\t\t* c\n\tif ( parentItemBlocks.pop()!.index! > block.index! ) {\n\t\treturn mergeListItemBefore( block, parentBlock, writer );\n\t}\n\n\treturn [];\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/**\n * @module list/list/listindentcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelDocumentSelection, ModelElement } from '@ckeditor/ckeditor5-engine';\n\nimport {\n\texpandListBlocksToCompleteItems,\n\tindentBlocks,\n\tisFirstBlockOfListItem,\n\tisListItemBlock,\n\tisSingleListItem,\n\toutdentBlocksWithMerge,\n\tsortBlocks,\n\tsplitListItemBefore,\n\ttype ListElement\n} from './utils/model.js';\nimport { ListWalker } from './utils/listwalker.js';\nimport type { ListEditing } from './listediting.js';\n\n/**\n * The document list indent command. It is used by the {@link module:list/list~List list feature}.\n */\nexport class ListIndentCommand extends Command {\n\t/**\n\t * Determines by how much the command will change the list item's indent attribute.\n\t */\n\tprivate readonly _direction: 'forward' | 'backward';\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param indentDirection The direction of indent. If it is equal to `backward`, the command\n\t * will outdent a list item.\n\t */\n\tconstructor( editor: Editor, indentDirection: 'forward' | 'backward' ) {\n\t\tsuper( editor );\n\n\t\tthis._direction = indentDirection;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst blocks = getSelectedListBlocks( model.document.selection );\n\t\tconst listEditing: ListEditing = editor.plugins.get( 'ListEditing' );\n\t\tconst attributeNames = listEditing.getListAttributeNames();\n\n\t\tmodel.change( writer => {\n\t\t\tconst changedBlocks = [];\n\n\t\t\t// Handle selection contained in the single list item and starting in the following blocks.\n\t\t\tif ( isSingleListItem( blocks ) && !isFirstBlockOfListItem( blocks[ 0 ] ) ) {\n\t\t\t\t// Allow increasing indent of following list item blocks.\n\t\t\t\tif ( this._direction == 'forward' ) {\n\t\t\t\t\tchangedBlocks.push( ...indentBlocks( blocks, writer, { attributeNames } ) );\n\t\t\t\t}\n\n\t\t\t\t// For indent make sure that indented blocks have a new ID.\n\t\t\t\t// For outdent just split blocks from the list item (give them a new IDs).\n\t\t\t\tchangedBlocks.push( ...splitListItemBefore( blocks[ 0 ], writer ) );\n\t\t\t}\n\t\t\t// More than a single list item is selected, or the first block of list item is selected.\n\t\t\telse {\n\t\t\t\t// Now just update the attributes of blocks.\n\t\t\t\tif ( this._direction == 'forward' ) {\n\t\t\t\t\tchangedBlocks.push( ...indentBlocks( blocks, writer, { expand: true, attributeNames } ) );\n\t\t\t\t} else {\n\t\t\t\t\tchangedBlocks.push( ...outdentBlocksWithMerge( blocks, writer, { attributeNames } ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Align the list item type to match the previous list item (from the same list).\n\t\t\tfor ( const block of changedBlocks ) {\n\t\t\t\t// This block become a plain block (for example a paragraph).\n\t\t\t\tif ( !block.hasAttribute( 'listType' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst previousItemBlock = ListWalker.first( block, { sameIndent: true } );\n\n\t\t\t\tif ( previousItemBlock ) {\n\t\t\t\t\twriter.setAttribute( 'listType', previousItemBlock.getAttribute( 'listType' ), block );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._fireAfterExecute( changedBlocks );\n\t\t} );\n\t}\n\n\t/**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */\n\tprivate _fireAfterExecute( changedBlocks: Array<ModelElement> ) {\n\t\tthis.fire<ListIndentCommandAfterExecuteEvent>( 'afterExecute', sortBlocks( new Set( changedBlocks ) ) );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled(): boolean {\n\t\t// Check whether any of position's ancestor is a list item.\n\t\tlet blocks = getSelectedListBlocks( this.editor.model.document.selection );\n\t\tlet firstBlock = blocks[ 0 ];\n\n\t\t// If selection is not in a list item, the command is disabled.\n\t\tif ( !firstBlock ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we are outdenting it is enough to be in list item. Every list item can always be outdented.\n\t\tif ( this._direction == 'backward' ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// A single block of a list item is selected, so it could be indented as a sublist.\n\t\tif ( isSingleListItem( blocks ) && !isFirstBlockOfListItem( blocks[ 0 ] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// When skip levels are allowed, any list item can always be indented further.\n\t\tif ( this.editor.config.get( 'list.enableSkipLevelLists' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tblocks = expandListBlocksToCompleteItems( blocks );\n\t\tfirstBlock = blocks[ 0 ];\n\n\t\t// Check if there is any list item before selected items that could become a parent of selected items.\n\t\tconst siblingItem = ListWalker.first( firstBlock, { sameIndent: true } );\n\n\t\tif ( !siblingItem ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( siblingItem.getAttribute( 'listType' ) == firstBlock.getAttribute( 'listType' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n\n/**\n * Returns an array of selected blocks truncated to the first non list block element.\n */\nfunction getSelectedListBlocks( selection: ModelDocumentSelection ) {\n\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\tconst firstNonListBlockIndex = blocks.findIndex( block => !isListItemBlock( block ) );\n\n\tif ( firstNonListBlockIndex != -1 ) {\n\t\tblocks.length = firstNonListBlockIndex;\n\t}\n\n\treturn blocks as Array<ListElement>;\n}\n\n/**\n * Event fired by the {@link ~ListIndentCommand#execute} method.\n *\n * It allows to execute an action after executing the {@link module:list/list/listcommand~ListCommand#execute}\n * method, for example adjusting attributes of changed list items.\n *\n * @internal\n * @eventName ~ListIndentCommand#afterExecute\n */\nexport type ListIndentCommandAfterExecuteEvent = {\n\tname: 'afterExecute';\n\targs: [ changedBlocks: Array<ModelElement> ];\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/**\n * @module list/list/listcommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport {\n\tsplitListItemBefore,\n\texpandListBlocksToCompleteItems,\n\tgetListItemBlocks,\n\tgetListItems,\n\tremoveListAttributes,\n\toutdentFollowingItems,\n\tListItemUid,\n\tsortBlocks,\n\tgetSelectedBlockObject,\n\tisListItemBlock,\n\tcanBecomeSimpleListItem\n} from './utils/model.js';\nimport type { ListEditing, ListType } from './listediting.js';\nimport type { ListWalkerOptions } from './utils/listwalker.js';\n\n/**\n * The list command. It is used by the {@link module:list/list~List list feature}.\n */\nexport class ListCommand extends Command {\n\t/**\n\t * The type of the list created by the command.\n\t */\n\tpublic readonly type: ListType;\n\n\t/**\n\t * A flag indicating whether the command is active, which means that the selection starts in a list of the same type.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tpublic declare value: boolean;\n\n\t/**\n\t * List Walker options that change the range of the list items to be changed when the selection is collapsed within a list item.\n\t *\n\t * In a multi-level list, when the selection is collapsed within a list item, instead of changing only the list items of the same list\n\t * type and current indent level, the entire list structure is changed (all list items at all indent levels of any list type).\n\t */\n\tprivate readonly _listWalkerOptions?: ListWalkerOptions;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param type List type that will be handled by this command.\n\t */\n\tconstructor( editor: Editor, type: ListType, options: { multiLevel?: boolean } = {} ) {\n\t\tsuper( editor );\n\n\t\tthis.type = type;\n\n\t\tthis._listWalkerOptions = options.multiLevel ? {\n\t\t\thigherIndent: true,\n\t\t\tlowerIndent: true,\n\t\t\tsameAttributes: []\n\t\t} :\tundefined;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the list command.\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the\n\t * selected items and potentially the neighbor elements to the proper list items. If set to `false` it will convert selected elements\n\t * to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.\n\t * @param options.additionalAttributes Additional attributes that are set for list items when the command is executed.\n\t */\n\tpublic override execute( options: { forceValue?: boolean; additionalAttributes?: Record<string, unknown> } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selectedBlockObject = getSelectedBlockObject( model );\n\n\t\tconst blocks = Array.from( document.selection.getSelectedBlocks() )\n\t\t\t.filter( block => model.schema.checkAttribute( block, 'listType' ) || canBecomeSimpleListItem( block, model.schema ) );\n\n\t\t// Whether we are turning off some items.\n\t\tconst turnOff = options.forceValue !== undefined ? !options.forceValue : this.value;\n\n\t\tmodel.change( writer => {\n\t\t\tif ( turnOff ) {\n\t\t\t\tconst lastBlock = blocks[ blocks.length - 1 ];\n\t\t\t\tconst listEditing: ListEditing = this.editor.plugins.get( 'ListEditing' );\n\t\t\t\tconst attributeNames = listEditing.getListAttributeNames();\n\n\t\t\t\t// Split the first block from the list item.\n\t\t\t\tconst itemBlocks = getListItemBlocks( lastBlock, { direction: 'forward' } );\n\t\t\t\tconst changedBlocks = [];\n\n\t\t\t\tif ( itemBlocks.length > 1 ) {\n\t\t\t\t\tchangedBlocks.push( ...splitListItemBefore( itemBlocks[ 1 ], writer ) );\n\t\t\t\t}\n\n\t\t\t\t// Strip list attributes.\n\t\t\t\tchangedBlocks.push( ...removeListAttributes( blocks, writer, attributeNames ) );\n\n\t\t\t\t// Outdent items following the selected list item.\n\t\t\t\tchangedBlocks.push( ...outdentFollowingItems( lastBlock, writer ) );\n\n\t\t\t\tthis._fireAfterExecute( changedBlocks );\n\t\t\t}\n\t\t\t// Changing type of list items for a collapsed selection inside a list item.\n\t\t\telse if ( ( selectedBlockObject || document.selection.isCollapsed ) && isListItemBlock( blocks[ 0 ] ) ) {\n\t\t\t\tconst changedBlocks = getListItems( selectedBlockObject || blocks[ 0 ], this._listWalkerOptions );\n\n\t\t\t\tfor ( const block of changedBlocks ) {\n\t\t\t\t\twriter.setAttributes( {\n\t\t\t\t\t\t...options.additionalAttributes,\n\t\t\t\t\t\tlistType: this.type\n\t\t\t\t\t}, block );\n\t\t\t\t}\n\n\t\t\t\tthis._fireAfterExecute( changedBlocks );\n\t\t\t}\n\t\t\t// Turning on the list items for a non-collapsed selection.\n\t\t\telse {\n\t\t\t\tconst changedBlocks = [];\n\n\t\t\t\tfor ( const block of blocks ) {\n\t\t\t\t\t// Promote the given block to the list item.\n\t\t\t\t\tif ( !block.hasAttribute( 'listType' ) ) {\n\t\t\t\t\t\t// Rename block to a simple list item if this option is enabled.\n\t\t\t\t\t\tif ( !block.is( 'element', 'listItem' ) && canBecomeSimpleListItem( block, model.schema ) ) {\n\t\t\t\t\t\t\twriter.rename( block, 'listItem' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twriter.setAttributes( {\n\t\t\t\t\t\t\t...options.additionalAttributes,\n\t\t\t\t\t\t\tlistIndent: 0,\n\t\t\t\t\t\t\tlistItemId: ListItemUid.next(),\n\t\t\t\t\t\t\tlistType: this.type\n\t\t\t\t\t\t}, block );\n\n\t\t\t\t\t\tchangedBlocks.push( block );\n\t\t\t\t\t}\n\t\t\t\t\t// Change the type of list item.\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor ( const node of expandListBlocksToCompleteItems( block, { withNested: false } ) ) {\n\t\t\t\t\t\t\tif ( node.getAttribute( 'listType' ) != this.type ) {\n\t\t\t\t\t\t\t\twriter.setAttributes( {\n\t\t\t\t\t\t\t\t\t...options.additionalAttributes,\n\t\t\t\t\t\t\t\t\tlistType: this.type\n\t\t\t\t\t\t\t\t}, node );\n\n\t\t\t\t\t\t\t\tchangedBlocks.push( node );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._fireAfterExecute( changedBlocks );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */\n\tprivate _fireAfterExecute( changedBlocks: Array<ModelElement> ) {\n\t\tthis.fire<ListCommandAfterExecuteEvent>( 'afterExecute', sortBlocks( new Set( changedBlocks ) ) );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue(): boolean {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\n\t\tif ( !blocks.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const block of blocks ) {\n\t\t\tif ( block.getAttribute( 'listType' ) != this.type ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled(): boolean {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\n\t\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\n\t\tif ( !blocks.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If command value is true it means that we are in list item, so the command should be enabled.\n\t\tif ( this.value ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor ( const block of blocks ) {\n\t\t\tif ( schema.checkAttribute( block, 'listType' ) || canBecomeSimpleListItem( block, schema ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n}\n\n/**\n * Event fired by the {@link ~ListCommand#execute} method.\n *\n * It allows to execute an action after executing the {@link ~ListCommand#execute} method,\n * for example adjusting attributes of changed list items.\n *\n * @internal\n * @eventName ~ListCommand#afterExecute\n */\nexport type ListCommandAfterExecuteEvent = {\n\tname: 'afterExecute';\n\targs: [ changedBlocks: Array<ModelElement> ];\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/**\n * @module list/list/listmergecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelDocumentSelection, ModelElement, ModelNode, ModelSelection } from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tgetNestedListBlocks,\n\tindentBlocks,\n\tsortBlocks,\n\tisFirstBlockOfListItem,\n\tmergeListItemBefore,\n\tisSingleListItem,\n\tgetSelectedBlockObject,\n\tisListItemBlock,\n\ttype ListElement\n} from './utils/model.js';\nimport { ListWalker } from './utils/listwalker.js';\nimport type { ListEditing } from './listediting.js';\n\n/**\n * The document list merge command. It is used by the {@link module:list/list~List list feature}.\n */\nexport class ListMergeCommand extends Command {\n\t/**\n\t * Whether list item should be merged before or after the selected block.\n\t */\n\tprivate readonly _direction: 'forward' | 'backward';\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param direction Whether list item should be merged before or after the selected block.\n\t */\n\tconstructor( editor: Editor, direction: 'forward' | 'backward' ) {\n\t\tsuper( editor );\n\n\t\tthis._direction = direction;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Merges list blocks together (depending on the {@link #constructor}'s `direction` parameter).\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t * @param options Command options.\n\t * @param options.shouldMergeOnBlocksContentLevel When set `true`, merging will be performed together\n\t * with {@link module:engine/model/model~Model#deleteContent} to get rid of the inline content in the selection or take advantage\n\t * of the heuristics in `deleteContent()` that helps convert lists into paragraphs in certain cases.\n\t */\n\tpublic override execute(\n\t\t{ shouldMergeOnBlocksContentLevel = false }: { shouldMergeOnBlocksContentLevel?: boolean } = {}\n\t): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst changedBlocks: Array<ModelElement> = [];\n\t\tconst listEditing: ListEditing = editor.plugins.get( 'ListEditing' );\n\t\tconst attributeNames = listEditing.getListAttributeNames();\n\n\t\tmodel.change( writer => {\n\t\t\tconst { firstElement, lastElement } = this._getMergeSubjectElements( selection, shouldMergeOnBlocksContentLevel );\n\n\t\t\t// A defensive guard. When `_getMergeSubjectElements()` cannot determine a valid pair of elements\n\t\t\t// to merge (for example because there is no list block before/after the current one),\n\t\t\t// the command should be a no-op instead of throwing on `null.getAttribute()`.\n\t\t\tif ( !firstElement || !lastElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst firstIndent = firstElement.getAttribute( 'listIndent' ) || 0;\n\t\t\tconst lastIndent = lastElement.getAttribute( 'listIndent' );\n\t\t\tconst lastElementId = lastElement.getAttribute( 'listItemId' );\n\n\t\t\tif ( firstIndent != lastIndent ) {\n\t\t\t\tconst nestedLastElementBlocks = getNestedListBlocks( lastElement );\n\n\t\t\t\tchangedBlocks.push( ...indentBlocks( [ lastElement, ...nestedLastElementBlocks ], writer, {\n\t\t\t\t\tindentBy: firstIndent - lastIndent,\n\n\t\t\t\t\t// If outdenting, the entire sub-tree that follows must be included.\n\t\t\t\t\texpand: firstIndent < lastIndent,\n\n\t\t\t\t\tattributeNames\n\t\t\t\t} ) );\n\t\t\t}\n\n\t\t\tif ( shouldMergeOnBlocksContentLevel ) {\n\t\t\t\tlet sel: ModelSelection | ModelDocumentSelection = selection;\n\n\t\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\t\tsel = writer.createSelection( writer.createRange(\n\t\t\t\t\t\twriter.createPositionAt( firstElement, 'end' ),\n\t\t\t\t\t\twriter.createPositionAt( lastElement, 0 )\n\t\t\t\t\t) );\n\t\t\t\t}\n\n\t\t\t\t// Delete selected content. Replace entire content only for non-collapsed selection.\n\t\t\t\tmodel.deleteContent( sel, { doNotResetEntireContent: selection.isCollapsed } );\n\n\t\t\t\t// Get the last \"touched\" element after deleteContent call (can't use the lastElement because\n\t\t\t\t// it could get merged into the firstElement while deleting content).\n\t\t\t\tconst lastElementAfterDelete = sel.getLastPosition()!.parent;\n\n\t\t\t\t// Check if the element after it was in the same list item and adjust it if needed.\n\t\t\t\tconst nextSibling = lastElementAfterDelete.nextSibling;\n\n\t\t\t\tchangedBlocks.push( lastElementAfterDelete as ModelElement );\n\n\t\t\t\tif ( nextSibling && nextSibling !== lastElement && nextSibling.getAttribute( 'listItemId' ) == lastElementId ) {\n\t\t\t\t\tchangedBlocks.push( ...mergeListItemBefore( nextSibling, lastElementAfterDelete, writer ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tchangedBlocks.push( ...mergeListItemBefore( lastElement, firstElement, writer ) );\n\t\t\t}\n\n\t\t\tthis._fireAfterExecute( changedBlocks );\n\t\t} );\n\t}\n\n\t/**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */\n\tprivate _fireAfterExecute( changedBlocks: Array<ModelElement> ) {\n\t\tthis.fire<ListMergeCommandAfterExecuteEvent>( 'afterExecute', sortBlocks( new Set( changedBlocks ) ) );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled(): boolean {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedBlockObject = getSelectedBlockObject( model );\n\n\t\tif ( selection.isCollapsed || selectedBlockObject ) {\n\t\t\tconst positionParent = selectedBlockObject || selection.getFirstPosition()!.parent;\n\n\t\t\tif ( !isListItemBlock( positionParent ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst siblingNode = this._direction == 'backward' ?\n\t\t\t\tpositionParent.previousSibling :\n\t\t\t\tpositionParent.nextSibling;\n\n\t\t\tif ( !siblingNode ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( isSingleListItem( [ positionParent, siblingNode ] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tconst lastPosition = selection.getLastPosition()!;\n\t\t\tconst firstPosition = selection.getFirstPosition()!;\n\n\t\t\t// If deleting within a single block of a list item, there's no need to merge anything.\n\t\t\t// The default delete should be executed instead.\n\t\t\tif ( lastPosition.parent === firstPosition.parent ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( !isListItemBlock( lastPosition.parent ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the boundary elements the merge should be executed for. These are not necessarily selection's first\n\t * and last position parents but sometimes sibling or even further blocks depending on the context.\n\t *\n\t * @param selection The selection the merge is executed for.\n\t * @param shouldMergeOnBlocksContentLevel When `true`, merge is performed together with\n\t * {@link module:engine/model/model~Model#deleteContent} to remove the inline content within the selection.\n\t */\n\tprivate _getMergeSubjectElements(\n\t\tselection: ModelSelection | ModelDocumentSelection,\n\t\tshouldMergeOnBlocksContentLevel: boolean\n\t) {\n\t\tconst model = this.editor.model;\n\t\tconst selectedBlockObject = getSelectedBlockObject( model );\n\t\tlet firstElement, lastElement;\n\n\t\tif ( selection.isCollapsed || selectedBlockObject ) {\n\t\t\tconst positionParent = selectedBlockObject || selection.getFirstPosition()!.parent as ModelNode;\n\t\t\tconst isFirstBlock = isFirstBlockOfListItem( positionParent );\n\n\t\t\tif ( this._direction == 'backward' ) {\n\t\t\t\tlastElement = positionParent;\n\n\t\t\t\tif ( isFirstBlock && !shouldMergeOnBlocksContentLevel ) {\n\t\t\t\t\t// For the \"c\" as an anchorElement:\n\t\t\t\t\t//  * a\n\t\t\t\t\t//    * b\n\t\t\t\t\t//  * [c]  <-- this block should be merged with \"a\"\n\t\t\t\t\t// It should find \"a\" element to merge with:\n\t\t\t\t\t//  * a\n\t\t\t\t\t//    * b\n\t\t\t\t\t//    c\n\t\t\t\t\tfirstElement = ListWalker.first( positionParent, { sameIndent: true, lowerIndent: true } );\n\n\t\t\t\t\t// Fallback for \"skip-level\" structures where the previous list block in the model\n\t\t\t\t\t// happens to live at a *higher* indent (no same-or-lower-indent block precedes it).\n\t\t\t\t\tif ( !firstElement && isListItemBlock( positionParent.previousSibling ) ) {\n\t\t\t\t\t\tfirstElement = positionParent.previousSibling;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfirstElement = positionParent.previousSibling;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// In case of the forward merge there is no case as above, just merge with next sibling.\n\t\t\t\tfirstElement = positionParent;\n\t\t\t\tlastElement = positionParent.nextSibling;\n\t\t\t}\n\t\t} else {\n\t\t\tfirstElement = selection.getFirstPosition()!.parent;\n\t\t\tlastElement = selection.getLastPosition()!.parent;\n\t\t}\n\n\t\treturn {\n\t\t\tfirstElement: firstElement as ListElement,\n\t\t\tlastElement: lastElement as ListElement\n\t\t};\n\t}\n}\n\n/**\n * Event fired by the {@link ~ListMergeCommand#execute} method.\n *\n * It allows to execute an action after executing the {@link module:list/list/listcommand~ListCommand#execute}\n * method, for example adjusting attributes of changed list items.\n *\n * @internal\n * @eventName ~ListMergeCommand#afterExecute\n */\nexport type ListMergeCommandAfterExecuteEvent = {\n\tname: 'afterExecute';\n\targs: [ changedBlocks: Array<ModelElement> ];\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/**\n * @module list/list/listsplitcommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tisFirstBlockOfListItem,\n\tisListItemBlock,\n\tsortBlocks,\n\tsplitListItemBefore\n} from './utils/model.js';\n\n/**\n * The document list split command that splits the list item at the selection.\n *\n * It is used by the {@link module:list/list~List list feature}.\n */\nexport class ListSplitCommand extends Command {\n\t/**\n\t * Whether list item should be split before or after the selected block.\n\t */\n\tprivate readonly _direction: 'before' | 'after';\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param direction Whether list item should be split before or after the selected block.\n\t */\n\tconstructor( editor: Editor, direction: 'before' | 'after' ) {\n\t\tsuper( editor );\n\n\t\tthis._direction = direction;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Splits the list item at the selection.\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.change( writer => {\n\t\t\tconst changedBlocks = splitListItemBefore( this._getStartBlock(), writer );\n\n\t\t\tthis._fireAfterExecute( changedBlocks );\n\t\t} );\n\t}\n\n\t/**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */\n\tprivate _fireAfterExecute( changedBlocks: Array<ModelElement> ) {\n\t\tthis.fire<ListSplitCommandAfterExecuteEvent>( 'afterExecute', sortBlocks( new Set( changedBlocks ) ) );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst block = this._getStartBlock();\n\n\t\treturn selection.isCollapsed &&\n\t\t\tisListItemBlock( block ) &&\n\t\t\t!isFirstBlockOfListItem( block );\n\t}\n\n\t/**\n\t * Returns the model element that is the main focus of the command (according to the current selection and command direction).\n\t */\n\tprivate _getStartBlock() {\n\t\tconst doc = this.editor.model.document;\n\t\tconst positionParent = doc.selection.getFirstPosition()!.parent;\n\n\t\treturn ( this._direction == 'before' ? positionParent : positionParent.nextSibling ) as ModelElement;\n\t}\n}\n\n/**\n * Event fired by the {@link ~ListSplitCommand#execute} method.\n *\n * It allows to execute an action after executing the {@link module:list/list/listcommand~ListCommand#execute}\n * method, for example adjusting attributes of changed list items.\n *\n * @internal\n * @eventName ~ListSplitCommand#afterExecute\n */\nexport type ListSplitCommandAfterExecuteEvent = {\n\tname: 'afterExecute';\n\targs: [ changedBlocks: Array<ModelElement> ];\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/**\n * @module list/listformatting/listitemboldintegration\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { env } from '@ckeditor/ckeditor5-utils';\n\nimport { ListEditing } from '../list/listediting.js';\nimport type { ListFormatting } from '../listformatting.js';\n\n/**\n * The list item bold integration plugin.\n */\nexport class ListItemBoldIntegration extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListItemBoldIntegration' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing ]> {\n\t\treturn [ ListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting: ListFormatting = editor.plugins.get( 'ListFormatting' );\n\t\tconst listEditing = editor.plugins.get( ListEditing );\n\n\t\tif ( !editor.plugins.has( 'BoldEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tListFormatting.registerFormatAttribute( 'bold', 'listItemBold' );\n\n\t\t// Register the downcast strategy in init() so that the attribute name is registered before the list editing\n\t\t// registers its converters.\n\t\t// This ensures that the attribute is recognized by downcast strategies and bogus paragraphs are handled correctly.\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope: 'item',\n\t\t\tattributeName: 'listItemBold',\n\n\t\t\tsetAttributeOnDowncast( writer, value, viewElement, options ) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.addClass( 'ck-list-marker-bold', viewElement );\n\n\t\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/18790.\n\t\t\t\t\tif ( env.isSafari && !( options && options.dataPipeline ) ) {\n\t\t\t\t\t\twriter.setStyle( '--ck-content-list-marker-dummy-bold', '0', viewElement );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tif ( !editor.plugins.has( 'BoldEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.schema.extend( '$listItem', { allowAttributes: 'listItemBold' } );\n\t\tmodel.schema.setAttributeProperties( 'listItemBold', {\n\t\t\tisFormatting: true\n\t\t} );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( !item.getAttribute( 'listItemId' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'listItemBold' );\n\n\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tmodel: 'listItemBold',\n\t\t\tview: {\n\t\t\t\tname: 'li',\n\t\t\t\tclasses: 'ck-list-marker-bold'\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module list/listformatting/listitemitalicintegration\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { env } from '@ckeditor/ckeditor5-utils';\n\nimport { ListEditing } from '../list/listediting.js';\nimport type { ListFormatting } from '../listformatting.js';\n\n/**\n * The list item italic integration plugin.\n */\nexport class ListItemItalicIntegration extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListItemItalicIntegration' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing ]> {\n\t\treturn [ ListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting: ListFormatting = editor.plugins.get( 'ListFormatting' );\n\t\tconst listEditing = editor.plugins.get( ListEditing );\n\n\t\tif ( !editor.plugins.has( 'ItalicEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tListFormatting.registerFormatAttribute( 'italic', 'listItemItalic' );\n\n\t\t// Register the downcast strategy in init() so that the attribute name is registered before the list editing\n\t\t// registers its converters.\n\t\t// This ensures that the attribute is recognized by downcast strategies and bogus paragraphs are handled correctly.\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope: 'item',\n\t\t\tattributeName: 'listItemItalic',\n\n\t\t\tsetAttributeOnDowncast( writer, value, viewElement, options ) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.addClass( 'ck-list-marker-italic', viewElement );\n\n\t\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/18790.\n\t\t\t\t\tif ( env.isSafari && !( options && options.dataPipeline ) ) {\n\t\t\t\t\t\twriter.setStyle( '--ck-content-list-marker-dummy-italic', '0', viewElement );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tif ( !editor.plugins.has( 'ItalicEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.schema.extend( '$listItem', { allowAttributes: 'listItemItalic' } );\n\t\tmodel.schema.setAttributeProperties( 'listItemItalic', {\n\t\t\tisFormatting: true\n\t\t} );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( !item.getAttribute( 'listItemId' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'listItemItalic' );\n\n\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tmodel: 'listItemItalic',\n\t\t\tview: {\n\t\t\t\tname: 'li',\n\t\t\t\tclasses: 'ck-list-marker-italic'\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module list/listformatting/listitemfontsizeintegration\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\nimport { env } from '@ckeditor/ckeditor5-utils';\nimport { _normalizeFontSizeOptions } from '@ckeditor/ckeditor5-font';\n\nimport { ListEditing } from '../list/listediting.js';\nimport type { ListFormatting } from '../listformatting.js';\n\n/**\n * The list item font size integration plugin.\n */\nexport class ListItemFontSizeIntegration extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListItemFontSizeIntegration' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing ]> {\n\t\treturn [ ListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting: ListFormatting = editor.plugins.get( 'ListFormatting' );\n\t\tconst listEditing = editor.plugins.get( ListEditing );\n\n\t\tif ( !editor.plugins.has( 'FontSizeEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst normalizedFontSizeOptions = _normalizeFontSizeOptions( editor.config.get( 'fontSize.options' )! );\n\n\t\tListFormatting.registerFormatAttribute( 'fontSize', 'listItemFontSize' );\n\n\t\t// Register the downcast strategy in init() so that the attribute name is registered before the list editing\n\t\t// registers its converters.\n\t\t// This ensures that the attribute is recognized by downcast strategies and bogus paragraphs are handled correctly.\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope: 'item',\n\t\t\tattributeName: 'listItemFontSize',\n\n\t\t\tsetAttributeOnDowncast( writer, value: string, viewElement, options ) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif ( value ) {\n\t\t\t\t\tconst fontSizeOption = normalizedFontSizeOptions.find( option => option.model == value );\n\n\t\t\t\t\tif ( fontSizeOption && fontSizeOption.view && typeof fontSizeOption.view != 'string' ) {\n\t\t\t\t\t\tif ( fontSizeOption.view.styles ) {\n\t\t\t\t\t\t\twriter.addClass( 'ck-list-marker-font-size', viewElement );\n\t\t\t\t\t\t\twriter.setStyle( '--ck-content-list-marker-font-size', fontSizeOption.view.styles[ 'font-size' ], viewElement );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* v8 ignore next -- Normalized font size options used by the integration expose styles or classes. */\n\t\t\t\t\t\telse if ( fontSizeOption.view.classes ) {\n\t\t\t\t\t\t\twriter.addClass( `ck-list-marker-font-size-${ value }`, viewElement );\n\n\t\t\t\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/18790.\n\t\t\t\t\t\t\tif ( env.isSafari && !( options && options.dataPipeline ) ) {\n\t\t\t\t\t\t\t\twriter.setStyle( '--ck-content-list-marker-dummy-font-size', '0', viewElement );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.addClass( 'ck-list-marker-font-size', viewElement );\n\t\t\t\t\t\twriter.setStyle( '--ck-content-list-marker-font-size', value as string, viewElement );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tif ( !editor.plugins.has( 'FontSizeEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.schema.extend( '$listItem', { allowAttributes: 'listItemFontSize' } );\n\t\tmodel.schema.setAttributeProperties( 'listItemFontSize', {\n\t\t\tisFormatting: true\n\t\t} );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( !item.getAttribute( 'listItemId' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'listItemFontSize' );\n\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: 'listItemFontSize',\n\t\t\t\tvalue: ( viewElement: ViewElement ) => viewElement.getStyle( '--ck-content-list-marker-font-size' )\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: 'li',\n\t\t\t\tclasses: 'ck-list-marker-font-size',\n\t\t\t\tstyles: {\n\t\t\t\t\t'--ck-content-list-marker-font-size': /.*/\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tconst fontSizeOptions = _normalizeFontSizeOptions( editor.config.get( 'fontSize.options' )! );\n\n\t\tfor ( const option of fontSizeOptions ) {\n\t\t\t/* v8 ignore next -- Normalized font size options used by the integration provide model and view values. */\n\t\t\tif ( option.model && option.view ) {\n\t\t\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tkey: 'listItemFontSize',\n\t\t\t\t\t\tvalue: option.model\n\t\t\t\t\t},\n\t\t\t\t\tview: {\n\t\t\t\t\t\tname: 'li',\n\t\t\t\t\t\tclasses: `ck-list-marker-font-size-${ option.model }`\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\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/**\n * @module list/listformatting/listitemfontcolorintegration\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { type ViewElement } from '@ckeditor/ckeditor5-engine';\n\nimport { ListEditing } from '../list/listediting.js';\nimport type { ListFormatting } from '../listformatting.js';\n\n/**\n * The list item font color integration plugin.\n */\nexport class ListItemFontColorIntegration extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListItemFontColorIntegration' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing ]> {\n\t\treturn [ ListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting: ListFormatting = editor.plugins.get( 'ListFormatting' );\n\t\tconst listEditing = editor.plugins.get( ListEditing );\n\n\t\tif ( !editor.plugins.has( 'FontColorEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tListFormatting.registerFormatAttribute( 'fontColor', 'listItemFontColor' );\n\n\t\t// Register the downcast strategy in init() so that the attribute name is registered before the list editing\n\t\t// registers its converters.\n\t\t// This ensures that the attribute is recognized by downcast strategies and bogus paragraphs are handled correctly.\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope: 'item',\n\t\t\tattributeName: 'listItemFontColor',\n\n\t\t\tsetAttributeOnDowncast( writer, value, viewElement ) {\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.addClass( 'ck-list-marker-color', viewElement );\n\t\t\t\t\twriter.setStyle( '--ck-content-list-marker-color', value as string, viewElement );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tif ( !editor.plugins.has( 'FontColorEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.schema.extend( '$listItem', { allowAttributes: 'listItemFontColor' } );\n\t\tmodel.schema.setAttributeProperties( 'listItemFontColor', {\n\t\t\tisFormatting: true\n\t\t} );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( !item.getAttribute( 'listItemId' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'listItemFontColor' );\n\n\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: 'listItemFontColor',\n\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\treturn viewElement.getStyle( '--ck-content-list-marker-color' );\n\t\t\t\t}\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: 'li',\n\t\t\t\tclasses: 'ck-list-marker-color',\n\t\t\t\tstyles: {\n\t\t\t\t\t'--ck-content-list-marker-color': /.*/\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module list/listformatting/listitemfontfamilyintegration\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { type ViewElement } from '@ckeditor/ckeditor5-engine';\n\nimport { ListEditing } from '../list/listediting.js';\nimport type { ListFormatting } from '../listformatting.js';\n\n/**\n * The list item font family integration plugin.\n */\nexport class ListItemFontFamilyIntegration extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListItemFontFamilyIntegration' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing ]> {\n\t\treturn [ ListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst ListFormatting: ListFormatting = editor.plugins.get( 'ListFormatting' );\n\t\tconst listEditing = editor.plugins.get( ListEditing );\n\n\t\tif ( !editor.plugins.has( 'FontFamilyEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tListFormatting.registerFormatAttribute( 'fontFamily', 'listItemFontFamily' );\n\n\t\t// Register the downcast strategy in init() so that the attribute name is registered before the list editing\n\t\t// registers its converters.\n\t\t// This ensures that the attribute is recognized by downcast strategies and bogus paragraphs are handled correctly.\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope: 'item',\n\t\t\tattributeName: 'listItemFontFamily',\n\n\t\t\tsetAttributeOnDowncast( writer, value, viewElement ) {\n\t\t\t\t// There is no need of removing the style because downcast strategies handles it automatically.\n\t\t\t\t/* v8 ignore next -- Downcast callbacks are only registered for meaningful list marker formatting values. */\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.addClass( 'ck-list-marker-font-family', viewElement );\n\t\t\t\t\twriter.setStyle( '--ck-content-list-marker-font-family', value as string, viewElement );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tif ( !editor.plugins.has( 'FontFamilyEditing' ) || !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.schema.extend( '$listItem', { allowAttributes: 'listItemFontFamily' } );\n\t\tmodel.schema.setAttributeProperties( 'listItemFontFamily', {\n\t\t\tisFormatting: true\n\t\t} );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( !item.getAttribute( 'listItemId' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'listItemFontFamily' );\n\n\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: 'listItemFontFamily',\n\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\treturn viewElement.getStyle( '--ck-content-list-marker-font-family' );\n\t\t\t\t}\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tname: 'li',\n\t\t\t\tclasses: 'ck-list-marker-font-family',\n\t\t\t\tstyles: {\n\t\t\t\t\t'--ck-content-list-marker-font-family': /.*/\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module list/listformatting\n */\n\nimport { type Editor, Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { ListItemBoldIntegration } from './listformatting/listitemboldintegration.js';\nimport { ListItemItalicIntegration } from './listformatting/listitemitalicintegration.js';\nimport { ListItemFontSizeIntegration } from './listformatting/listitemfontsizeintegration.js';\nimport { ListItemFontColorIntegration } from './listformatting/listitemfontcolorintegration.js';\nimport { ListItemFontFamilyIntegration } from './listformatting/listitemfontfamilyintegration.js';\n\nimport type {\n\tModel,\n\tModelElement,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tisListItemBlock,\n\tgetAllListItemBlocks,\n\tisFirstBlockOfListItem\n} from './list/utils/model.js';\n\n/**\n * The list formatting plugin.\n *\n * It enables integration with formatting plugins to style the list marker.\n * The list marker is styled based on the consistent formatting applied to the content of the list item.\n *\n * The list of supported formatting plugins includes:\n * * Font color.\n * * Font size.\n * * Font family.\n * * Bold.\n * * Italic.\n */\nexport class ListFormatting extends Plugin {\n\t/**\n\t * The list of loaded formatting.\n\t */\n\tprivate readonly _loadedFormatting: Record<string, string> = {};\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListFormatting' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[\n\t\tListItemBoldIntegration,\n\t\tListItemItalicIntegration,\n\t\tListItemFontSizeIntegration,\n\t\tListItemFontColorIntegration,\n\t\tListItemFontFamilyIntegration\n\t]> {\n\t\treturn [\n\t\t\tListItemBoldIntegration,\n\t\t\tListItemItalicIntegration,\n\t\t\tListItemFontSizeIntegration,\n\t\t\tListItemFontColorIntegration,\n\t\t\tListItemFontFamilyIntegration\n\t\t];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'list.enableListItemMarkerFormatting', true );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tif ( !this.editor.config.get( 'list.enableListItemMarkerFormatting' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._registerPostfixerForListItemFormatting();\n\t}\n\n\t/**\n\t * Registers a postfixer that ensures that the list item formatting attribute is consistent with the formatting\n\t * applied to the content of the list item.\n\t */\n\tprivate _registerPostfixerForListItemFormatting(): void {\n\t\tconst model = this.editor.model;\n\n\t\tmodel.document.registerPostFixer( writer => {\n\t\t\tconst changes = model.document.differ.getChanges();\n\t\t\tconst modifiedListItems = new Set<ModelElement>();\n\t\t\tlet returnValue = false;\n\n\t\t\tfor ( const entry of changes ) {\n\t\t\t\tif ( entry.type === 'attribute' ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tentry.attributeKey == 'listItemId' ||\n\t\t\t\t\t\tentry.attributeKey == 'listType' ||\n\t\t\t\t\t\tthis._isInlineOrSelectionFormatting( entry.attributeKey ) ||\n\t\t\t\t\t\tObject.values( this._loadedFormatting ).includes( entry.attributeKey )\n\t\t\t\t\t) {\n\t\t\t\t\t\tif ( isListItemBlock( entry.range.start.nodeAfter ) ) {\n\t\t\t\t\t\t\tmodifiedListItems.add( entry.range.start.nodeAfter );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( isListItemBlock( entry.range.start.parent ) ) {\n\t\t\t\t\t\t\tmodifiedListItems.add( entry.range.start.parent );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ( isListItemBlock( entry.position.nodeAfter ) ) {\n\t\t\t\t\t\tmodifiedListItems.add( entry.position.nodeAfter );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isListItemBlock( entry.position.nodeBefore ) ) {\n\t\t\t\t\t\tmodifiedListItems.add( entry.position.nodeBefore );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isListItemBlock( entry.position.parent ) ) {\n\t\t\t\t\t\tmodifiedListItems.add( entry.position.parent );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( entry.type == 'insert' && entry.name != '$text' ) {\n\t\t\t\t\t\tconst range = writer.createRangeIn( entry.position.nodeAfter as ModelElement );\n\n\t\t\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\t\t\tif ( isListItemBlock( item ) ) {\n\t\t\t\t\t\t\t\tmodifiedListItems.add( item );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( const listItem of modifiedListItems ) {\n\t\t\t\tconst formats = getListItemConsistentFormat( model, listItem, Object.keys( this._loadedFormatting ) );\n\n\t\t\t\tfor ( const [ formatAttributeName, formatValue ] of Object.entries( formats ) ) {\n\t\t\t\t\tconst listItemFormatAttributeName = this._loadedFormatting[ formatAttributeName ];\n\n\t\t\t\t\tif ( formatValue && setFormattingToListItem( writer, listItem, listItemFormatAttributeName, formatValue ) ) {\n\t\t\t\t\t\treturnValue = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( !formatValue && removeFormattingFromListItem( writer, listItem, listItemFormatAttributeName ) ) {\n\t\t\t\t\t\treturnValue = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn returnValue;\n\t\t} );\n\t}\n\n\t/**\n\t * Registers an integration between a default attribute (e.g., `fontFamily`) and a new attribute\n\t * intended specifically for list item elements (e.g., `listItemFontFamily`).\n\t *\n\t * These attributes are later used by the postfixer logic to determine whether to add the new attribute\n\t * to the list item element, based on whether there is a consistent default formatting attribute\n\t * applied within its content.\n\t */\n\tpublic registerFormatAttribute( formatAttribute: string, listItemFormatAttribute: string ): void {\n\t\tthis._loadedFormatting[ formatAttribute ] = listItemFormatAttribute;\n\t}\n\n\t/**\n\t * Returns true if the given model attribute name is a supported inline formatting attribute.\n\t */\n\tprivate _isInlineOrSelectionFormatting( attributeKey: string ): boolean {\n\t\treturn attributeKey.replace( /^selection:/, '' ) in this._loadedFormatting;\n\t}\n}\n\n/**\n * Returns the consistent format of the list item element.\n * If the list item contains multiple blocks, it checks only the first block.\n */\nfunction getListItemConsistentFormat( model: Model, listItem: ModelElement, attributeKeys: Array<string> ) {\n\tif ( isFirstBlockOfListItem( listItem ) ) {\n\t\treturn getSingleListItemConsistentFormat( model, listItem, attributeKeys );\n\t}\n\n\t// Always the first block of the list item should be checked for consistent formatting.\n\tconst listItemBlocks = getAllListItemBlocks( listItem );\n\n\treturn getSingleListItemConsistentFormat( model, listItemBlocks[ 0 ], attributeKeys );\n}\n\n/**\n * Returns the consistent format of a single list item element.\n */\nfunction getSingleListItemConsistentFormat( model: Model, listItem: ModelElement, attributeKeys: Array<string> ) {\n\t// Only bulleted and numbered lists can have formatting (to-do lists are not supported).\n\t// Do not check internals of limit elements (for example, do not check table cells).\n\tif ( !isNumberedOrBulletedList( listItem ) || model.schema.isLimit( listItem ) ) {\n\t\treturn Object.fromEntries( attributeKeys.map( attributeKey => [ attributeKey ] ) ) as Record<string, string | undefined>;\n\t}\n\n\tif ( listItem.isEmpty ) {\n\t\treturn Object.fromEntries( attributeKeys.map( attributeKey => (\n\t\t\t[ attributeKey, listItem.getAttribute( `selection:${ attributeKey }` ) as string | undefined ]\n\t\t) ) );\n\t}\n\n\tconst attributesToCheck = new Set( attributeKeys );\n\tconst valuesMap: Record<string, string | undefined> = {};\n\n\tconst range = model.createRangeIn( listItem );\n\tconst walker = range.getWalker( { ignoreElementEnd: true } );\n\n\tfor ( const { item } of walker ) {\n\t\tfor ( const attributeKey of attributesToCheck ) {\n\t\t\tif ( model.schema.checkAttribute( item, attributeKey ) ) {\n\t\t\t\tconst formatAttribute = item.getAttribute( attributeKey ) as string;\n\n\t\t\t\tif ( formatAttribute === undefined ) {\n\t\t\t\t\tattributesToCheck.delete( attributeKey );\n\t\t\t\t\tvaluesMap[ attributeKey ] = undefined;\n\t\t\t\t}\n\t\t\t\telse if ( valuesMap[ attributeKey ] === undefined ) {\n\t\t\t\t\t// First item inside a list item block.\n\t\t\t\t\tvaluesMap[ attributeKey ] = formatAttribute;\n\t\t\t\t}\n\t\t\t\telse if ( valuesMap[ attributeKey ] !== formatAttribute ) {\n\t\t\t\t\t// Following items in the same block of a list item.\n\t\t\t\t\tattributesToCheck.delete( attributeKey );\n\t\t\t\t\tvaluesMap[ attributeKey ] = undefined;\n\t\t\t\t}\n\t\t\t} else if ( !( attributeKey in valuesMap ) ) {\n\t\t\t\t// Store it so a format would be removed when all items in the given list item does not allow that formatting.\n\t\t\t\tvaluesMap[ attributeKey ] = undefined;\n\t\t\t}\n\t\t}\n\n\t\t// End early if all attributes have been checked and are inconsistent.\n\t\tif ( !attributesToCheck.size ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// Jump over inline limit elements as we expect only outside them to be the same formatting.\n\t\tif ( model.schema.isLimit( item ) ) {\n\t\t\twalker.jumpTo( model.createPositionAfter( item ) );\n\t\t}\n\t}\n\n\treturn valuesMap;\n}\n\n/**\n * Adds the specified formatting attribute to the list item element.\n */\nfunction setFormattingToListItem(\n\twriter: ModelWriter,\n\tlistItem: ModelElement,\n\tattributeKey: string,\n\tattributeValue: string\n): boolean {\n\t// Multi-block items should have consistent formatting.\n\tconst listItemBlocks = getAllListItemBlocks( listItem );\n\tlet wasChanged = false;\n\n\tfor ( const listItem of listItemBlocks ) {\n\t\tif ( !listItem.hasAttribute( attributeKey ) || listItem.getAttribute( attributeKey ) !== attributeValue ) {\n\t\t\twriter.setAttribute( attributeKey, attributeValue, listItem );\n\t\t\twasChanged = true;\n\t\t}\n\t}\n\n\treturn wasChanged;\n}\n\n/**\n * Removes the specified formatting attribute from the list item element.\n */\nfunction removeFormattingFromListItem(\n\twriter: ModelWriter,\n\tlistItem: ModelElement,\n\tattributeKey: string\n): boolean {\n\t// Multi-block items should have consistent formatting.\n\tconst listItemBlocks = getAllListItemBlocks( listItem );\n\tlet wasChanged = false;\n\n\tfor ( const listItem of listItemBlocks ) {\n\t\tif ( listItem.hasAttribute( attributeKey ) ) {\n\t\t\twriter.removeAttribute( attributeKey, listItem );\n\t\t\twasChanged = true;\n\t\t}\n\t}\n\n\treturn wasChanged;\n}\n\n/**\n * Checks if the given list type is a numbered or bulleted list.\n */\nfunction isNumberedOrBulletedList( listItem: ModelElement ): boolean {\n\treturn [ 'numbered', 'bulleted', 'customNumbered', 'customBulleted' ].includes( listItem.getAttribute( 'listType' ) as string );\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/**\n * @module list/list/listutils\n */\n\nimport type { ModelElement, ModelNode } from '@ckeditor/ckeditor5-engine';\nimport type { ArrayOrItem } from '@ckeditor/ckeditor5-utils';\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport {\n\ttype ListElement,\n\texpandListBlocksToCompleteItems,\n\texpandListBlocksToCompleteList,\n\tisFirstBlockOfListItem,\n\tisFirstListItemInList,\n\tisListItemBlock,\n\tisNumberedListType\n} from './utils/model.js';\nimport type { ListType } from './listediting.js';\n\n/**\n * A set of helpers related to document lists.\n */\nexport class ListUtils extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListUtils' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Expands the given list of selected blocks to include all the items of the lists they're in.\n\t *\n\t * @param blocks The list of selected blocks.\n\t */\n\tpublic expandListBlocksToCompleteList( blocks: ArrayOrItem<ModelElement> ): Array<ModelElement> {\n\t\treturn expandListBlocksToCompleteList( blocks );\n\t}\n\n\t/**\n\t * Check if the given block is the first in the list item.\n\t *\n\t * @param listBlock The list block element.\n\t */\n\tpublic isFirstBlockOfListItem( listBlock: ModelElement ): boolean {\n\t\treturn isFirstBlockOfListItem( listBlock );\n\t}\n\n\t/**\n\t * Returns true if the given model node is a list item block.\n\t *\n\t * @param node A model node.\n\t */\n\tpublic isListItemBlock( node: ModelNode | null ): node is ListElement {\n\t\treturn isListItemBlock( node );\n\t}\n\n\t/**\n\t * Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n\t *\n\t * @param blocks The list of selected blocks.\n\t * @param options.withNested Whether should include nested list items.\n\t */\n\tpublic expandListBlocksToCompleteItems(\n\t\tblocks: ArrayOrItem<ModelElement>,\n\t\toptions: { withNested?: boolean } = {}\n\t): Array<ModelElement> {\n\t\treturn expandListBlocksToCompleteItems( blocks, options );\n\t}\n\n\t/**\n\t * Returns true if listType is of type `numbered` or `customNumbered`.\n\t */\n\tpublic isNumberedListType( listType: ListType ): boolean {\n\t\treturn isNumberedListType( listType );\n\t}\n\n\t/**\n\t * Returns true if the given list item is the first item in the list.\n\t */\n\tpublic isFirstListItemInList( listItem: ModelElement ): boolean {\n\t\treturn isFirstListItemInList( listItem );\n\t}\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/**\n * @module list/list/utils/view\n */\n\nimport type { ViewDowncastWriter, ViewAttributeElement, ViewDocumentFragment, ViewElement, ViewNode } from '@ckeditor/ckeditor5-engine';\nimport { type ListType } from '../listediting.js';\n\n/**\n * Checks if view element is a list type (ul or ol).\n *\n * @internal\n */\nexport function isListView( viewElement: ViewNode | ViewDocumentFragment ): viewElement is ViewElement & { name: 'ul' | 'ol' } {\n\treturn viewElement.is( 'element', 'ol' ) || viewElement.is( 'element', 'ul' );\n}\n\n/**\n * Checks if view element is a list item (li).\n *\n * @internal\n */\nexport function isListItemView( viewElement: ViewNode | ViewDocumentFragment ): viewElement is ViewElement & { name: 'li' } {\n\treturn viewElement.is( 'element', 'li' );\n}\n\n/**\n * Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.\n *\n * Also, fixes non HTML compliant lists indents:\n *\n * ```\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI     (indent: 0)\n *     |-> OL                                  |-> OL\n *         |-> OL                                  |\n *         |   |-> OL                              |\n *         |       |-> OL                          |\n *         |           |-> LI (parent LIs: 1)      |-> LI (indent: 1)\n *         |-> LI (parent LIs: 1)                  |-> LI (indent: 1)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> OL                                      |\n *     |-> OL                                  |\n *          |-> OL                             |\n *              |-> LI (parent LIs: 0)         |-> LI        (indent: 0)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI         (indent: 0)\n * |-> OL                                          |-> OL\n *     |-> LI (parent LIs: 0)                          |-> LI (indent: 1)\n * ```\n *\n * @internal\n */\nexport function getIndent( listItem: ViewElement ): number {\n\tlet indent = 0;\n\tlet parent = listItem.parent;\n\n\twhile ( parent ) {\n\t\t// Each LI in the tree will result in an increased indent for HTML compliant lists.\n\t\tif ( isListItemView( parent ) ) {\n\t\t\tindent++;\n\t\t} else {\n\t\t\t// If however the list is nested in other list we should check previous sibling of any of the list elements...\n\t\t\tconst previousSibling = ( parent as ViewElement ).previousSibling;\n\n\t\t\t// ...because the we might need increase its indent:\n\t\t\t//\t\tbefore:                           fixed list:\n\t\t\t//\t\tOL                                OL\n\t\t\t//\t\t|-> LI (parent LIs: 0)            |-> LI         (indent: 0)\n\t\t\t//\t\t|-> OL                                |-> OL\n\t\t\t//\t\t    |-> LI (parent LIs: 0)                |-> LI (indent: 1)\n\t\t\tif ( previousSibling && isListItemView( previousSibling ) ) {\n\t\t\t\tindent++;\n\t\t\t}\n\t\t}\n\n\t\tparent = parent.parent;\n\t}\n\n\treturn indent;\n}\n\n/**\n * Creates a list attribute element (ol or ul).\n *\n * @internal\n */\nexport function createListElement(\n\twriter: ViewDowncastWriter,\n\tindent: number,\n\ttype: ListType,\n\tid: string = getViewElementIdForListType( type, indent )\n): ViewAttributeElement {\n\t// Negative priorities so that restricted editing attribute won't wrap lists.\n\treturn writer.createAttributeElement( getViewElementNameForListType( type ), null, {\n\t\tpriority: 2 * indent / 100 - 100,\n\t\tid\n\t} );\n}\n\n/**\n * Creates a list item attribute element (li).\n *\n * @internal\n */\nexport function createListItemElement(\n\twriter: ViewDowncastWriter,\n\tindent: number,\n\tid: string\n): ViewAttributeElement {\n\t// Negative priorities so that restricted editing attribute won't wrap list items.\n\treturn writer.createAttributeElement( 'li', null, {\n\t\tpriority: ( 2 * indent + 1 ) / 100 - 100,\n\t\tid\n\t} );\n}\n\n/**\n * Returns a view element name for the given list type.\n *\n * @internal\n */\nexport function getViewElementNameForListType( type?: ListType ): 'ol' | 'ul' {\n\treturn type == 'numbered' || type == 'customNumbered' ? 'ol' : 'ul';\n}\n\n/**\n * Returns a view element ID for the given list type and indent.\n *\n * @internal\n */\nexport function getViewElementIdForListType( type?: ListType, indent?: number ): string {\n\treturn `list-${ type }-${ indent }`;\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/**\n * @module list/list/utils/postfixers\n */\n\nimport type { ModelElement, ModelPosition, ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { SiblingListBlocksIterator, type ListIteratorValue } from './listwalker.js';\nimport { getListItemBlocks, isListItemBlock, ListItemUid, type ListElement } from './model.js';\n\n/**\n * Based on the provided positions looks for the list head and stores it in the provided map.\n *\n * @internal\n * @param position The search starting position.\n * @param itemToListHead The map from list item element to the list head element.\n * @param visited A set of elements that were already visited.\n */\nexport function findAndAddListHeadToMap(\n\tposition: ModelPosition,\n\titemToListHead: Set<ListElement>,\n\tvisited: Set<ModelElement>\n): void {\n\tconst previousNode = position.nodeBefore;\n\n\tif ( !isListItemBlock( previousNode ) ) {\n\t\tconst item = position.nodeAfter;\n\n\t\tif ( isListItemBlock( item ) ) {\n\t\t\titemToListHead.add( item );\n\t\t}\n\t} else {\n\t\tlet listHead = previousNode;\n\n\t\t// Previously, the loop below was defined like this:\n\t\t//\n\t\t// \t\tfor ( { node: listHead } of new SiblingListBlocksIterator( listHead, 'backward' ) )\n\t\t//\n\t\t// Unfortunately, such a destructuring is incorrectly transpiled by Babel and the loop never ends.\n\t\t// See: https://github.com/ckeditor/ckeditor5-react/issues/345.\n\t\tfor ( const { node } of new SiblingListBlocksIterator( listHead, 'backward' ) ) {\n\t\t\tlistHead = node;\n\n\t\t\tif ( visited.has( listHead ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvisited.add( listHead );\n\n\t\t\tif ( itemToListHead.has( previousNode ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\titemToListHead.add( listHead );\n\t}\n}\n\n/**\n * Scans the list starting from the given list head element and fixes items' indentation.\n *\n * @internal\n * @param listNodes The iterable of list nodes.\n * @param writer The model writer.\n * @returns Whether the model was modified.\n */\nexport function fixListIndents(\n\tlistNodes: Iterable<ListIteratorValue>,\n\twriter: ModelWriter\n): boolean {\n\tlet maxIndent = 0; // Guards local sublist max indents that need fixing.\n\tlet prevIndent = -1; // Previous item indent.\n\tlet fixBy = null;\n\tlet applied = false;\n\n\tfor ( const { node } of listNodes ) {\n\t\tconst itemIndent = node.getAttribute( 'listIndent' );\n\n\t\tif ( itemIndent > maxIndent ) {\n\t\t\tlet newIndent;\n\n\t\t\tif ( fixBy === null ) {\n\t\t\t\tfixBy = itemIndent - maxIndent;\n\t\t\t\tnewIndent = maxIndent;\n\t\t\t} else {\n\t\t\t\tif ( fixBy > itemIndent ) {\n\t\t\t\t\tfixBy = itemIndent;\n\t\t\t\t}\n\n\t\t\t\tnewIndent = itemIndent - fixBy;\n\t\t\t}\n\n\t\t\tif ( newIndent > prevIndent + 1 ) {\n\t\t\t\tnewIndent = prevIndent + 1;\n\t\t\t}\n\n\t\t\twriter.setAttribute( 'listIndent', newIndent, node );\n\n\t\t\tapplied = true;\n\t\t\tprevIndent = newIndent;\n\t\t} else {\n\t\t\tfixBy = null;\n\t\t\tmaxIndent = itemIndent + 1;\n\t\t\tprevIndent = itemIndent;\n\t\t}\n\t}\n\n\treturn applied;\n}\n\n/**\n * Scans the list starting from the given list head element and fixes items' types.\n *\n * @internal\n * @param listNodes The iterable of list nodes.\n * @param seenIds The set of already known IDs.\n * @param writer The model writer.\n * @returns Whether the model was modified.\n */\nexport function fixListItemIds(\n\tlistNodes: Iterable<ListIteratorValue>,\n\tseenIds: Set<string>,\n\twriter: ModelWriter\n): boolean {\n\tconst visited = new Set();\n\tlet applied = false;\n\n\tfor ( const { node } of listNodes ) {\n\t\tif ( visited.has( node ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet listType = node.getAttribute( 'listType' );\n\t\tlet listItemId = node.getAttribute( 'listItemId' );\n\n\t\t// Use a new ID if this one was spot earlier (even in other list).\n\t\tif ( seenIds.has( listItemId ) ) {\n\t\t\tlistItemId = ListItemUid.next();\n\t\t}\n\n\t\tseenIds.add( listItemId );\n\n\t\t// Make sure that all items in a simple list have unique IDs.\n\t\tif ( node.is( 'element', 'listItem' ) ) {\n\t\t\tif ( node.getAttribute( 'listItemId' ) != listItemId ) {\n\t\t\t\twriter.setAttribute( 'listItemId', listItemId, node );\n\n\t\t\t\tapplied = true;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor ( const block of getListItemBlocks( node, { direction: 'forward' } ) ) {\n\t\t\tvisited.add( block );\n\n\t\t\t// Use a new ID if a block of a bigger list item has different type.\n\t\t\tif ( block.getAttribute( 'listType' ) != listType ) {\n\t\t\t\tlistItemId = ListItemUid.next();\n\t\t\t\tlistType = block.getAttribute( 'listType' );\n\t\t\t}\n\n\t\t\tif ( block.getAttribute( 'listItemId' ) != listItemId ) {\n\t\t\t\twriter.setAttribute( 'listItemId', listItemId, block );\n\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn applied;\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/**\n * @module list/list/converters\n */\n\nimport {\n\ttype DowncastAttributeEvent,\n\ttype ViewDowncastWriter,\n\ttype EditingController,\n\ttype ModelElement,\n\ttype DowncastElementCreatorFunction,\n\ttype Mapper,\n\ttype Model,\n\ttype ModelConsumable,\n\ttype ModelNode,\n\ttype UpcastElementEvent,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewRange,\n\ttype DowncastRemoveEvent,\n\ttype EditingView,\n\ttype MapperModelToViewPositionEvent,\n\ttype ViewTreeWalker,\n\ttype ModelSchema\n} from '@ckeditor/ckeditor5-engine';\n\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tgetAllListItemBlocks,\n\tgetListItemBlocks,\n\tisListItemBlock,\n\tisFirstBlockOfListItem,\n\tListItemUid,\n\ttype ListElement\n} from './utils/model.js';\n\nimport {\n\tcreateListElement,\n\tcreateListItemElement,\n\tgetIndent,\n\tisListView,\n\tisListItemView\n} from './utils/view.js';\n\nimport { ListWalker, SiblingListBlocksIterator } from './utils/listwalker.js';\nimport { findAndAddListHeadToMap } from './utils/postfixers.js';\n\nimport type {\n\tListEditing,\n\tListEditingCheckAttributesEvent,\n\tListEditingCheckElementEvent,\n\tListItemAttributesMap,\n\tListDowncastStrategy\n} from './listediting.js';\n\n/**\n * Returns a consuming upcast converter for skip-level list item wrappers. It detects intermediate `<li>` elements\n * with `list-style-type:none` (generated by the skip-level downcast or by external sources) and consumes them\n * without producing a model element, so they don't end up as empty list items in the model.\n *\n * The wrapper `<li>` is consumed, but its children (nested lists) are converted normally. Because `getIndent()`\n * counts all ancestor `<li>` elements (including the consumed wrapper), nested items receive the correct indent\n * values that reflect the skip-level gap.\n *\n * Only `<li>` elements whose sole meaningful content is a nested `<ul>`/`<ol>` are treated as intermediate wrappers.\n * Anything else (text, paragraphs, custom elements, even an empty `<li>` with `list-style-type:none` carrying only\n * attributes) falls through to the regular list item upcast, so its data and attributes can be preserved by GHS\n * or other plugins.\n *\n * @internal\n */\nexport function listItemSkipLevelConsumer(): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst viewItem = data.viewItem;\n\n\t\tif ( viewItem.getStyle( 'list-style-type' ) !== 'none' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !isSkipLevelWrapper( viewItem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( viewItem, { name: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( viewItem, data.modelCursor );\n\n\t\tdata.modelRange = modelRange;\n\t\tdata.modelCursor = modelCursor;\n\t};\n}\n\n/**\n * Checks whether a `<li>` view element is a skip-level intermediate wrapper, i.e. its only child is a nested\n * `<ul>`/`<ol>`. Any other content (text, `<br>`, `<p>`, custom elements, NBSP, etc.) disqualifies the element,\n * so it is upcast as a regular list item.\n */\nfunction isSkipLevelWrapper( viewItem: ViewElement ): boolean {\n\tlet hasNestedList = false;\n\n\tfor ( const child of viewItem.getChildren() ) {\n\t\tif ( child.is( 'element', 'ul' ) || child.is( 'element', 'ol' ) ) {\n\t\t\thasNestedList = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn hasNestedList;\n}\n\n/**\n * Returns the upcast converter for list items. It's supposed to work after the block converters (content inside list items) are converted.\n *\n * @internal\n */\nexport function listItemUpcastConverter(): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst { writer, schema } = conversionApi;\n\n\t\tif ( !data.modelRange ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst items = Array.from( data.modelRange.getItems( { shallow: true } ) )\n\t\t\t.filter( ( item ): item is ModelElement => schema.checkAttribute( item, 'listItemId' ) );\n\n\t\tif ( !items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// All items already have list attributes set by a recursive conversion (e.g. children of a skip-level\n\t\t// wrapper <li> that was consumed without creating a model element). Nothing left to do here.\n\t\tif ( items.every( item => item.hasAttribute( 'listItemId' ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst listItemId = data.viewItem.getAttribute( 'data-list-item-id' ) || ListItemUid.next();\n\n\t\tconversionApi.consumable.consume( data.viewItem, { attributes: 'data-list-item-id' } );\n\n\t\tconst listIndent = getIndent( data.viewItem );\n\t\tlet listType = data.viewItem.parent && data.viewItem.parent.is( 'element', 'ol' ) ? 'numbered' : 'bulleted';\n\n\t\t// Preserve list type if was already set (for example by to-do list feature).\n\t\tconst firstItemListType = items[ 0 ].getAttribute( 'listType' ) as string;\n\n\t\tif ( firstItemListType ) {\n\t\t\tlistType = firstItemListType;\n\t\t}\n\n\t\tconst attributes = {\n\t\t\tlistItemId,\n\t\t\tlistIndent,\n\t\t\tlistType\n\t\t};\n\n\t\tfor ( const item of items ) {\n\t\t\t// Set list attributes only on same level items, those nested deeper are already handled by the recursive conversion.\n\t\t\tif ( !item.hasAttribute( 'listItemId' ) ) {\n\t\t\t\twriter.setAttributes( attributes, item );\n\t\t\t}\n\t\t}\n\n\t\tif ( items.length > 1 ) {\n\t\t\t// Make sure that list item that contain only nested list will preserve paragraph for itself:\n\t\t\t//\t<ul>\n\t\t\t//\t\t<li>\n\t\t\t//\t\t\t<p></p>  <-- this one must be kept\n\t\t\t//\t\t\t<ul>\n\t\t\t//\t\t\t\t<li></li>\n\t\t\t//\t\t\t</ul>\n\t\t\t//\t\t</li>\n\t\t\t//\t</ul>\n\t\t\tif ( items[ 1 ].getAttribute( 'listItemId' ) != attributes.listItemId ) {\n\t\t\t\tconversionApi.keepEmptyElement( items[ 0 ] );\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Returns a model document change:data event listener that triggers conversion of related items if needed.\n *\n * @internal\n * @param model The editor model.\n * @param editing The editing controller.\n * @param attributeNames The list of all model list attributes (including registered strategies).\n * @param listEditing The document list editing plugin.\n */\nexport function reconvertItemsOnDataChange(\n\tmodel: Model,\n\tediting: EditingController,\n\tattributeNames: Array<string>,\n\tlistEditing: ListEditing\n): () => void {\n\treturn () => {\n\t\tconst changes = model.document.differ.getChanges();\n\t\tconst itemsToRefresh = [];\n\t\tconst itemToListHead = new Set<ListElement>();\n\t\tconst changedItems = new Set<ModelNode>();\n\t\tconst visited = new Set<ModelElement>();\n\n\t\tfor ( const entry of changes ) {\n\t\t\tif ( entry.type == 'insert' && entry.name != '$text' ) {\n\t\t\t\tfindAndAddListHeadToMap( entry.position, itemToListHead, visited );\n\n\t\t\t\t// Insert of a non-list item.\n\t\t\t\tif ( !entry.attributes.has( 'listItemId' ) ) {\n\t\t\t\t\tfindAndAddListHeadToMap( entry.position.getShiftedBy( entry.length ), itemToListHead, visited );\n\t\t\t\t} else {\n\t\t\t\t\tchangedItems.add( entry.position.nodeAfter! );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Removed list item.\n\t\t\telse if ( entry.type == 'remove' && entry.attributes.has( 'listItemId' ) ) {\n\t\t\t\tfindAndAddListHeadToMap( entry.position, itemToListHead, visited );\n\t\t\t}\n\t\t\t// Changed list attribute.\n\t\t\telse if ( entry.type == 'attribute' ) {\n\t\t\t\tconst item = entry.range.start.nodeAfter!;\n\n\t\t\t\tif ( attributeNames.includes( entry.attributeKey ) ) {\n\t\t\t\t\tfindAndAddListHeadToMap( entry.range.start, itemToListHead, visited );\n\n\t\t\t\t\tif ( entry.attributeNewValue === null ) {\n\t\t\t\t\t\tfindAndAddListHeadToMap( entry.range.start.getShiftedBy( 1 ), itemToListHead, visited );\n\n\t\t\t\t\t\t// Check if paragraph should be converted from bogus to plain paragraph.\n\t\t\t\t\t\tif ( doesItemBlockRequiresRefresh( item as ModelElement ) ) {\n\t\t\t\t\t\t\titemsToRefresh.push( item );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchangedItems.add( item );\n\t\t\t\t\t}\n\t\t\t\t} else if ( isListItemBlock( item ) ) {\n\t\t\t\t\t// Some other attribute was changed on the list item,\n\t\t\t\t\t// check if paragraph does not need to be converted to bogus or back.\n\t\t\t\t\tif ( doesItemBlockRequiresRefresh( item ) ) {\n\t\t\t\t\t\titemsToRefresh.push( item );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( const listHead of itemToListHead.values() ) {\n\t\t\titemsToRefresh.push( ...collectListItemsToRefresh( listHead, changedItems ) );\n\t\t}\n\n\t\tfor ( const item of new Set( itemsToRefresh ) ) {\n\t\t\tediting.reconvertItem( item );\n\t\t}\n\t};\n\n\tfunction collectListItemsToRefresh( listHead: ListElement, changedItems: Set<ModelNode> ) {\n\t\tconst itemsToRefresh = [];\n\t\tconst visited = new Set();\n\t\tconst stack: Array<{\n\t\t\tmodelAttributes: ListItemAttributesMap;\n\t\t\tmodelElement: ListElement;\n\t\t}> = [];\n\n\t\tfor ( const { node, previous } of new SiblingListBlocksIterator( listHead ) ) {\n\t\t\tif ( visited.has( node ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst itemIndent = node.getAttribute( 'listIndent' );\n\n\t\t\t// Current node is at the lower indent so trim the stack.\n\t\t\tif ( previous && itemIndent < previous.getAttribute( 'listIndent' ) ) {\n\t\t\t\tstack.length = itemIndent + 1;\n\t\t\t}\n\n\t\t\t// Update the stack for the current indent level.\n\t\t\tstack[ itemIndent ] = {\n\t\t\t\tmodelAttributes: getListModelAttributes( node ),\n\t\t\t\tmodelElement: node\n\t\t\t};\n\n\t\t\tfillStackForIntermediates( node, itemIndent, stack );\n\n\t\t\t// Find all blocks of the current node.\n\t\t\tconst blocks = getListItemBlocks( node, { direction: 'forward' } );\n\n\t\t\tfor ( const block of blocks ) {\n\t\t\t\tvisited.add( block );\n\n\t\t\t\t// Check if bogus vs plain paragraph needs refresh.\n\t\t\t\tif ( doesItemBlockRequiresRefresh( block, blocks ) ) {\n\t\t\t\t\titemsToRefresh.push( block );\n\t\t\t\t}\n\t\t\t\t// Check if wrapping with UL, OL, LIs needs refresh.\n\t\t\t\telse if ( doesItemWrappingRequiresRefresh( block, stack, changedItems ) ) {\n\t\t\t\t\titemsToRefresh.push( block );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn itemsToRefresh;\n\t}\n\n\t// Returns model list attributes (those tracked by `attributeNames`) of the given item as a plain object.\n\tfunction getListModelAttributes( item: ListElement ): ListItemAttributesMap {\n\t\treturn Object.fromEntries(\n\t\t\tArray.from( item.getAttributes() )\n\t\t\t\t.filter( ( [ key ] ) => attributeNames.includes( key ) )\n\t\t);\n\t}\n\n\t// Skip-level lists have view wrappers (<ol>/<ul>) at indent levels with no matching\n\t// model item. Each such wrapper inherits its attributes (listStart, listStyle, etc.)\n\t// from a nearby model item - the first sibling found at that indent, or the closest\n\t// lower-indent ancestor (mirroring the downcast's fallback). Remember that item here\n\t// so later we can compare the wrapper against the current model and tell whether it's\n\t// still up to date.\n\tfunction fillStackForIntermediates(\n\t\tnode: ListElement,\n\t\titemIndent: number,\n\t\tstack: Array<{\n\t\t\tmodelAttributes: ListItemAttributesMap;\n\t\t\tmodelElement: ListElement;\n\t\t}>\n\t) {\n\t\tfor ( let i = itemIndent - 1; i >= 0; i-- ) {\n\t\t\tif ( stack[ i ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst siblingAtIndent = findSiblingListItemAt( node, i );\n\n\t\t\tlet ancestorAtLowerIndent: ListElement | null = null;\n\n\t\t\tif ( !siblingAtIndent ) {\n\t\t\t\tfor ( let k = i - 1; k >= 0; k-- ) {\n\t\t\t\t\tif ( stack[ k ] ) {\n\t\t\t\t\t\tancestorAtLowerIndent = stack[ k ].modelElement;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst referenceItem: ListElement = siblingAtIndent || ancestorAtLowerIndent || node;\n\n\t\t\tstack[ i ] = {\n\t\t\t\tmodelAttributes: {\n\t\t\t\t\t...getListModelAttributes( referenceItem ),\n\t\t\t\t\tlistItemId: `list-item-skip-${ i }`,\n\t\t\t\t\tlistIndent: i\n\t\t\t\t},\n\t\t\t\tmodelElement: referenceItem\n\t\t\t};\n\t\t}\n\t}\n\n\tfunction doesItemBlockRequiresRefresh( item: ModelElement, blocks?: Array<ModelNode> ) {\n\t\tconst viewElement = editing.mapper.toViewElement( item );\n\n\t\tif ( !viewElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( isItemBlockInsideStructureSlot( viewElement ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst needsRefresh = listEditing.fire<ListEditingCheckElementEvent>( 'checkElement', {\n\t\t\tmodelElement: item,\n\t\t\tviewElement\n\t\t} );\n\n\t\tif ( needsRefresh ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( !item.is( 'element', 'paragraph' ) && !item.is( 'element', 'listItem' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst useBogus = shouldUseBogusParagraph( item, attributeNames, blocks );\n\n\t\tif ( useBogus && viewElement.is( 'element', 'p' ) ) {\n\t\t\treturn true;\n\t\t} else if ( !useBogus && viewElement.is( 'element', 'span' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction isItemBlockInsideStructureSlot( viewElement: ViewElement ) {\n\t\tviewElement = viewElement.parent as ViewElement;\n\n\t\twhile ( viewElement.is( 'attributeElement' ) && [ 'ol', 'ul', 'li' ].includes( viewElement.name ) ) {\n\t\t\tviewElement = viewElement.parent as ViewElement;\n\t\t}\n\n\t\t// List item inside elementToStructure slot parent without mapping then it requires refresh for correct positions\n\t\t// as structure child elements does not have mapping from model and position would land in wrong place.\n\t\tif (\n\t\t\tviewElement.getCustomProperty( '$structureSlotParent' ) &&\n\t\t\t!editing.mapper.toModelElement( viewElement )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction doesItemWrappingRequiresRefresh(\n\t\titem: ModelElement,\n\t\tstack: Array<{\n\t\t\tmodelAttributes: ListItemAttributesMap;\n\t\t\tmodelElement: ListElement;\n\t\t}>,\n\t\tchangedItems: Set<ModelNode>\n\t) {\n\t\t// Items directly affected by some \"change\" don't need a refresh, they will be converted by their own changes.\n\t\tif ( changedItems.has( item ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst viewElement = editing.mapper.toViewElement( item )!;\n\t\tlet indent = stack.length - 1;\n\n\t\t// Traverse down the stack to the root to verify if all ULs, OLs, and LIs are as expected.\n\t\tfor (\n\t\t\tlet element = viewElement.parent!;\n\t\t\t!element.is( 'editableElement' );\n\t\t\telement = element.parent!\n\t\t) {\n\t\t\tconst isListItemElement = isListItemView( element );\n\t\t\tconst isListElement = isListView( element );\n\n\t\t\tif ( !isListElement && !isListItemElement ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// The stack is indexed by listIndent, so with skip-level lists it may have empty slots\n\t\t\t// for skipped indent levels. Skip attribute checking for those but still track the indent\n\t\t\t// level below. Without skip-level lists, the post-fixer ensures sequential indents, so the\n\t\t\t// stack is always fully populated and this guard has no effect.\n\t\t\t/* v8 ignore next -- Defensive guard for transient skip-level list stack gaps. */\n\t\t\tif ( stack[ indent ] ) {\n\t\t\t\tconst eventName = `checkAttributes:${ isListItemElement ? 'item' : 'list' }` as const;\n\t\t\t\tconst needsRefresh = listEditing.fire<ListEditingCheckAttributesEvent>( eventName, {\n\t\t\t\t\tviewElement: element as ViewElement,\n\t\t\t\t\tmodelAttributes: stack[ indent ].modelAttributes,\n\t\t\t\t\tmodelReferenceElement: stack[ indent ].modelElement\n\t\t\t\t} );\n\n\t\t\t\tif ( needsRefresh ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isListElement ) {\n\t\t\t\tindent--;\n\n\t\t\t\t// Don't need to iterate further if we already know that the item is wrapped appropriately.\n\t\t\t\tif ( indent < 0 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}\n\n/**\n * Returns the list item downcast converter.\n *\n * @internal\n * @param attributeNames A list of attribute names that should be converted if they are set.\n * @param strategies The strategies.\n * @param model The model.\n */\nexport function listItemDowncastConverter(\n\tattributeNames: Array<string>,\n\tstrategies: Array<ListDowncastStrategy>,\n\tmodel: Model,\n\t{ dataPipeline, enableSkipLevelLists }: { dataPipeline?: boolean; enableSkipLevelLists?: boolean }\n): GetCallback<DowncastAttributeEvent<ListElement>> {\n\tconst consumer = createAttributesConsumer( attributeNames, strategies );\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst { writer, mapper, consumable } = conversionApi;\n\n\t\tconst listItem = data.item;\n\n\t\tif ( !attributeNames.includes( data.attributeKey ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Test if attributes on the converted items are not consumed.\n\t\tif ( !consumer( listItem, consumable ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst options = {\n\t\t\t...conversionApi.options,\n\t\t\tdataPipeline,\n\t\t\tenableSkipLevelLists\n\t\t};\n\n\t\t// Use positions mapping instead of mapper.toViewElement( listItem ) to find outermost view element.\n\t\t// This is for cases when mapping is using inner view element like in the code blocks (pre > code).\n\t\tconst viewElement = findMappedViewElement( listItem, mapper, model, writer )!;\n\n\t\t// Remove custom item marker.\n\t\tremoveCustomMarkerElements( viewElement, writer, mapper );\n\n\t\t// Unwrap element from current list wrappers.\n\t\tunwrapListItemBlock( viewElement, writer );\n\n\t\t// Insert custom item marker.\n\t\tconst viewRange = insertCustomMarkerElements( listItem, viewElement, strategies, writer, options );\n\n\t\t// Then wrap them with the new list wrappers (UL, OL, LI).\n\t\twrapListItemBlock( listItem, viewRange, strategies, writer, options );\n\t};\n}\n\n/**\n * The 'remove' downcast converter for custom markers.\n *\n * @internal\n */\nexport function listItemDowncastRemoveConverter( schema: ModelSchema ): GetCallback<DowncastRemoveEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst { writer, mapper } = conversionApi;\n\t\tconst elementName = evt.name.split( ':' )[ 1 ];\n\n\t\t// Do not remove marker if the deleted element is some inline object inside paragraph.\n\t\t// See https://github.com/ckeditor/ckeditor5-internal/issues/3680.\n\t\tif ( !schema.checkAttribute( elementName, 'listItemId' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find the view range start position by mapping the model position at which the remove happened.\n\t\tconst viewStart = mapper.toViewPosition( data.position );\n\n\t\tconst modelEnd = data.position.getShiftedBy( data.length );\n\t\tconst viewEnd = mapper.toViewPosition( modelEnd, { isPhantom: true } );\n\n\t\t// Trim the range to remove in case some UI elements are on the view range boundaries.\n\t\tconst viewRange = writer.createRange( viewStart, viewEnd ).getTrimmed();\n\n\t\t// Use positions mapping instead of mapper.toViewElement( listItem ) to find outermost view element.\n\t\t// This is for cases when mapping is using inner view element like in the code blocks (pre > code).\n\t\tconst viewElement = viewRange.end.nodeBefore as ViewElement | null;\n\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif ( !viewElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove custom item marker.\n\t\tremoveCustomMarkerElements( viewElement, writer, mapper );\n\t};\n}\n\n/**\n * Returns the bogus paragraph view element creator. A bogus paragraph is used if a list item contains only a single block or nested list.\n *\n * @internal\n * @param attributeNames The list of all model list attributes (including registered strategies).\n */\nexport function bogusParagraphCreator(\n\tattributeNames: Array<string>,\n\t{ dataPipeline }: { dataPipeline?: boolean } = {}\n): DowncastElementCreatorFunction {\n\treturn ( modelElement, { writer } ) => {\n\t\t// Convert only if a bogus paragraph should be used.\n\t\tif ( !shouldUseBogusParagraph( modelElement, attributeNames ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( !dataPipeline ) {\n\t\t\treturn writer.createContainerElement( 'span', { class: 'ck-list-bogus-paragraph' } );\n\t\t}\n\n\t\t// Using `<p>` in case there are some markers on it and transparentRendering will render it anyway.\n\t\tconst viewElement = writer.createContainerElement( 'p' );\n\n\t\twriter.setCustomProperty( 'dataPipeline:transparentRendering', true, viewElement );\n\n\t\treturn viewElement;\n\t};\n}\n\n/**\n * Helper for mapping mode to view elements. It's using positions mapping instead of mapper.toViewElement( element )\n * to find outermost view element. This is for cases when mapping is using inner view element like in the code blocks (pre > code).\n *\n * @internal\n * @param element The model element.\n * @param mapper The mapper instance.\n * @param model The model.\n * @param writer The view downcast writer.\n */\nexport function findMappedViewElement(\n\telement: ModelElement,\n\tmapper: Mapper,\n\tmodel: Model,\n\twriter: ViewDowncastWriter\n): ViewElement | undefined {\n\tconst modelRange = model.createRangeOn( element );\n\tconst viewRange = mapper.toViewRange( modelRange ).getTrimmed();\n\tconst viewWalker = viewRange.getWalker();\n\n\tfor ( const { item } of viewWalker ) {\n\t\tif ( item.is( 'element' ) && item.getCustomProperty( 'listItemMarker' ) ) {\n\t\t\tviewWalker.jumpTo( writer.createPositionAfter( item ) );\n\t\t} else if ( item.is( 'element' ) && !item.getCustomProperty( 'listItemWrapper' ) ) {\n\t\t\treturn item;\n\t\t}\n\t}\n}\n\n/**\n * The model to view custom position mapping for cases when marker is injected at the beginning of a block.\n *\n * @internal\n */\nexport function createModelToViewPositionMapper(\n\tstrategies: Array<ListDowncastStrategy>,\n\tview: EditingView\n): GetCallback<MapperModelToViewPositionEvent> {\n\treturn ( evt, data ) => {\n\t\tif ( data.modelPosition.offset > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst positionParent = data.modelPosition.parent;\n\n\t\tif ( !isListItemBlock( positionParent ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !strategies.some( strategy => (\n\t\t\tstrategy.scope == 'itemMarker' &&\n\t\t\tstrategy.canInjectMarkerIntoElement &&\n\t\t\tstrategy.canInjectMarkerIntoElement( positionParent )\n\t\t) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewElement = data.mapper.toViewElement( positionParent )!;\n\t\tconst viewRange = view.createRangeIn( viewElement );\n\n\t\tconst viewWalker = viewRange.getWalker();\n\t\tlet positionAfterLastMarker = viewRange.start;\n\n\t\tfor ( const { item } of viewWalker ) {\n\t\t\t// Walk only over the non-mapped elements (UIElements, ViewAttributeElements, $text, or any other element without mapping).\n\t\t\tif ( item.is( 'element' ) && data.mapper.toModelElement( item ) || item.is( '$textProxy' ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t/* v8 ignore next -- Depends on custom marker internals in mapper position translation. */\n\t\t\tif ( item.is( 'element' ) && item.getCustomProperty( 'listItemMarker' ) ) {\n\t\t\t\tpositionAfterLastMarker = view.createPositionAfter( item );\n\n\t\t\t\t// Jump over the content of the marker (this is not needed for UIElement but required for other element types).\n\t\t\t\tviewWalker.skip( ( { previousPosition } ) => !previousPosition.isEqual( positionAfterLastMarker ) );\n\t\t\t}\n\t\t}\n\n\t\tdata.viewPosition = positionAfterLastMarker;\n\t};\n}\n\n/**\n * Removes a custom marker elements and item wrappers related to that marker.\n */\nfunction removeCustomMarkerElements( viewElement: ViewElement, viewWriter: ViewDowncastWriter, mapper: Mapper ): void {\n\t// Remove item wrapper.\n\twhile ( viewElement.parent!.is( 'attributeElement' ) && viewElement.parent!.getCustomProperty( 'listItemWrapper' ) ) {\n\t\tviewWriter.unwrap( viewWriter.createRangeOn( viewElement ), viewElement.parent );\n\t}\n\n\t// Remove custom item markers.\n\tconst markersToRemove: Array<ViewElement> = [];\n\n\t// Markers before a block.\n\tcollectMarkersToRemove( viewWriter.createPositionBefore( viewElement ).getWalker( { direction: 'backward' } ) );\n\n\t// Markers inside a block.\n\tcollectMarkersToRemove( viewWriter.createRangeIn( viewElement ).getWalker() );\n\n\tfor ( const marker of markersToRemove ) {\n\t\tviewWriter.remove( marker );\n\t}\n\n\tfunction collectMarkersToRemove( viewWalker: ViewTreeWalker ) {\n\t\tfor ( const { item } of viewWalker ) {\n\t\t\t// Walk only over the non-mapped elements (UIElements, ViewAttributeElements, $text, or any other element without mapping).\n\t\t\tif ( item.is( 'element' ) && mapper.toModelElement( item ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( item.is( 'element' ) && item.getCustomProperty( 'listItemMarker' ) ) {\n\t\t\t\tmarkersToRemove.push( item );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Inserts a custom marker elements and wraps first block of a list item if marker requires it.\n */\nfunction insertCustomMarkerElements(\n\tlistItem: ModelElement,\n\tviewElement: ViewElement,\n\tstrategies: Array<ListDowncastStrategy>,\n\twriter: ViewDowncastWriter,\n\t{ dataPipeline }: { dataPipeline?: boolean }\n): ViewRange {\n\tlet viewRange = writer.createRangeOn( viewElement );\n\n\t// Marker can be inserted only before the first block of a list item.\n\tif ( !isFirstBlockOfListItem( listItem ) ) {\n\t\treturn viewRange;\n\t}\n\n\tfor ( const strategy of strategies ) {\n\t\tif ( strategy.scope != 'itemMarker' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Create the custom marker element and inject it before the first block of the list item.\n\t\tconst markerElement = strategy.createElement( writer, listItem, { dataPipeline } );\n\n\t\tif ( !markerElement ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\twriter.setCustomProperty( 'listItemMarker', true, markerElement );\n\n\t\tif ( strategy.canInjectMarkerIntoElement && strategy.canInjectMarkerIntoElement( listItem ) ) {\n\t\t\twriter.insert( writer.createPositionAt( viewElement, 0 ), markerElement );\n\t\t} else {\n\t\t\twriter.insert( viewRange.start, markerElement );\n\n\t\t\tviewRange = writer.createRange(\n\t\t\t\twriter.createPositionBefore( markerElement ),\n\t\t\t\twriter.createPositionAfter( viewElement )\n\t\t\t);\n\t\t}\n\n\t\t// Wrap the marker and optionally the first block with an attribute element (label for to-do lists).\n\t\tif ( !strategy.createWrapperElement || !strategy.canWrapElement ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst wrapper = strategy.createWrapperElement( writer, listItem, { dataPipeline } );\n\n\t\twriter.setCustomProperty( 'listItemWrapper', true, wrapper );\n\n\t\t// The whole block can be wrapped...\n\t\tif ( strategy.canWrapElement( listItem ) ) {\n\t\t\tviewRange = writer.wrap( viewRange, wrapper );\n\t\t} else {\n\t\t\t// ... or only the marker element (if the block is downcasted to heading or block widget).\n\t\t\tviewRange = writer.wrap( writer.createRangeOn( markerElement ), wrapper );\n\n\t\t\tviewRange = writer.createRange(\n\t\t\t\tviewRange.start,\n\t\t\t\twriter.createPositionAfter( viewElement )\n\t\t\t);\n\t\t}\n\t}\n\n\treturn viewRange;\n}\n\n/**\n * Unwraps all ol, ul, and li attribute elements that are wrapping the provided view element.\n */\nfunction unwrapListItemBlock( viewElement: ViewElement, viewWriter: ViewDowncastWriter ) {\n\tlet attributeElement: ViewElement | ViewDocumentFragment = viewElement.parent!;\n\n\twhile ( attributeElement.is( 'attributeElement' ) && [ 'ul', 'ol', 'li' ].includes( attributeElement.name ) ) {\n\t\tconst parentElement = attributeElement.parent;\n\n\t\tviewWriter.unwrap( viewWriter.createRangeOn( viewElement ), attributeElement );\n\n\t\tattributeElement = parentElement!;\n\t}\n}\n\n/**\n * Wraps the given list item with appropriate attribute elements for ul, ol, and li.\n *\n * For skip-level lists (where indent gaps exist, e.g. indent 0 → indent 2), this function\n * generates intermediate wrapper pairs (ul/ol + li) at each missing level. These intermediate\n * wrappers are invisible (`list-style-type: none` on the li). Scope `'list'` strategies are\n * applied so the wrapper element (ul/ol) carries the same classes and styles as real list\n * wrappers, while scope `'item'` strategies are skipped since there is no model element\n * backing the intermediate level.\n */\nfunction wrapListItemBlock(\n\tlistItem: ListElement,\n\tviewRange: ViewRange,\n\tstrategies: Array<ListDowncastStrategy>,\n\twriter: ViewDowncastWriter,\n\toptions: Record<string, unknown>\n) {\n\tif ( !listItem.hasAttribute( 'listIndent' ) ) {\n\t\treturn;\n\t}\n\n\tconst listItemIndent = listItem.getAttribute( 'listIndent' );\n\tconst enableSkipLevelLists = options.enableSkipLevelLists;\n\tlet currentListItem: ListElement | null = listItem;\n\n\tfor ( let indent = listItemIndent; indent >= 0; indent-- ) {\n\t\t// When ListWalker jumps over indent levels (e.g. from indent 2 to indent 0, either because\n\t\t// enableSkipLevelLists is enabled or because the item is at the start of a fragment and its\n\t\t// nearest ancestor is further up), the levels in between have no corresponding model element.\n\t\t// We detect these \"intermediate\" levels by checking if currentListItem's indent doesn't match\n\t\t// the current loop indent. Handling this regardless of the enableSkipLevelLists config makes the\n\t\t// downcast resilient to unexpected skip-level states in the model.\n\t\tconst isIntermediate = currentListItem.getAttribute( 'listIndent' ) !== indent;\n\n\t\tif ( isIntermediate ) {\n\t\t\t// Intermediate levels get invisible wrappers: list-style-type:none hides the marker on <li>,\n\t\t\t// and scope:'item' strategies are not applied (no data-list-item-id, etc.) since there is no\n\t\t\t// model element backing this level.\n\t\t\t//\n\t\t\t// The <li> uses a fixed ID per indent (`list-item-skip-N`) so that sibling items sharing\n\t\t\t// the same skipped level merge into one <li> (e.g. two items at indent 1 with no parent\n\t\t\t// at indent 0 share one intermediate <li> at indent 0).\n\t\t\t//\n\t\t\t// The <ul/ol> type is chosen to ensure correct merging at this indent:\n\t\t\t// - If a real list item exists at this indent (found by walking forward), use its type\n\t\t\t//   so the intermediate wrapper merges with that item's real wrapper.\n\t\t\t// - Otherwise, use the ancestor's type so all intermediates at this indent share the\n\t\t\t//   same type and merge with each other.\n\t\t\tconst siblingAtIndent = findSiblingListItemAt( listItem, indent );\n\t\t\tconst referenceItem = siblingAtIndent || currentListItem;\n\t\t\tconst listType = referenceItem.getAttribute( 'listType' );\n\n\t\t\tconst listItemViewElement = createListItemElement( writer, indent, `list-item-skip-${ indent }` );\n\t\t\tconst listViewElement = createListElement( writer, indent, listType );\n\n\t\t\twriter.setStyle( 'list-style-type', 'none', listItemViewElement );\n\n\t\t\t// Apply scope:'list' strategies so that intermediate <ol>/<ul> wrappers carry the same\n\t\t\t// classes and styles as real list wrappers (e.g. multi-level-list class, todo-list class,\n\t\t\t// list-style-type:none). Without this, intermediate and real list elements at the same\n\t\t\t// indent would have mismatched attributes and could not merge correctly, causing browsers\n\t\t\t// to render unwanted default markers.\n\t\t\t//\n\t\t\t// Use the reference item (sibling or ancestor) as the strategy source so the attributes\n\t\t\t// match whatever this intermediate is supposed to merge with.\n\t\t\tfor ( const strategy of strategies ) {\n\t\t\t\tif (\n\t\t\t\t\tstrategy.scope == 'list' &&\n\t\t\t\t\treferenceItem.hasAttribute( strategy.attributeName )\n\t\t\t\t) {\n\t\t\t\t\tstrategy.setAttributeOnDowncast(\n\t\t\t\t\t\twriter,\n\t\t\t\t\t\treferenceItem.getAttribute( strategy.attributeName ),\n\t\t\t\t\t\tlistViewElement,\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\treferenceItem\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tviewRange = writer.wrap( viewRange, listItemViewElement );\n\t\t\tviewRange = writer.wrap( viewRange, listViewElement );\n\t\t} else {\n\t\t\tconst listItemViewElement = createListItemElement( writer, indent, currentListItem.getAttribute( 'listItemId' ) );\n\t\t\tconst listViewElement = createListElement( writer, indent, currentListItem.getAttribute( 'listType' ) );\n\n\t\t\tfor ( const strategy of strategies ) {\n\t\t\t\tif (\n\t\t\t\t\t( strategy.scope == 'list' || strategy.scope == 'item' ) &&\n\t\t\t\t\tcurrentListItem.hasAttribute( strategy.attributeName )\n\t\t\t\t) {\n\t\t\t\t\tstrategy.setAttributeOnDowncast(\n\t\t\t\t\t\twriter,\n\t\t\t\t\t\tcurrentListItem.getAttribute( strategy.attributeName ),\n\t\t\t\t\t\tstrategy.scope == 'list' ? listViewElement : listItemViewElement,\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\tcurrentListItem\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tviewRange = writer.wrap( viewRange, listItemViewElement );\n\t\t\tviewRange = writer.wrap( viewRange, listViewElement );\n\t\t}\n\n\t\tif ( indent == 0 ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// Only look for a parent when at a real (non-intermediate) level. At intermediate levels\n\t\t// currentListItem already points to the nearest found ancestor and won't change.\n\t\tif ( !isIntermediate ) {\n\t\t\tconst nextListItem = ListWalker.first( currentListItem, { lowerIndent: true } );\n\n\t\t\tif ( nextListItem ) {\n\t\t\t\tcurrentListItem = nextListItem;\n\t\t\t} else if ( !enableSkipLevelLists ) {\n\t\t\t\t// There is no list item with lower indent, this means this is a document fragment\n\t\t\t\t// containing only a part of nested list (like copy to clipboard) so we don't need\n\t\t\t\t// to try to wrap it further.\n\t\t\t\t//\n\t\t\t\t// When enableSkipLevelLists is enabled, the loop continues to indent 0 producing\n\t\t\t\t// intermediate wrappers at every remaining level to ensure a complete HTML structure\n\t\t\t\t// regardless of whether the item has a preceding parent.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Walks forward from the given list item through model siblings to find the first list item block\n * at exactly the specified indent level. Stops when it encounters a non-list block or a list item\n * at a lower indent (which means we left the current subtree).\n */\nfunction findSiblingListItemAt( listItem: ListElement, targetIndent: number ): ListElement | null {\n\tlet node = listItem.nextSibling;\n\n\twhile ( node && isListItemBlock( node ) ) {\n\t\tconst indent = ( node as ListElement ).getAttribute( 'listIndent' );\n\n\t\tif ( indent < targetIndent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( indent === targetIndent ) {\n\t\t\treturn node as ListElement;\n\t\t}\n\n\t\tnode = node.nextSibling;\n\t}\n\n\treturn null;\n}\n\n// Returns the function that is responsible for consuming attributes that are set on the model node.\nfunction createAttributesConsumer( attributeNames: Array<string>, strategies: Array<ListDowncastStrategy> ) {\n\tconst nonConsumingAttributes = strategies\n\t\t.filter( strategy => strategy.consume === false )\n\t\t.map( strategy => strategy.attributeName );\n\n\treturn ( node: ModelNode, consumable: ModelConsumable ) => {\n\t\tconst events = [];\n\n\t\t// Collect all set attributes that are triggering conversion.\n\t\tfor ( const attributeName of attributeNames ) {\n\t\t\tif ( node.hasAttribute( attributeName ) && !nonConsumingAttributes.includes( attributeName ) ) {\n\t\t\t\tevents.push( `attribute:${ attributeName }` );\n\t\t\t}\n\t\t}\n\n\t\tif ( !events.every( event => consumable.test( node, event ) !== false ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tevents.forEach( event => consumable.consume( node, event ) );\n\n\t\treturn true;\n\t};\n}\n\n// Whether the given item should be rendered as a bogus paragraph.\nfunction shouldUseBogusParagraph(\n\titem: ModelNode,\n\tattributeNames: Array<string>,\n\tblocks: Array<ModelNode> = getAllListItemBlocks( item )\n) {\n\tif ( !isListItemBlock( item ) ) {\n\t\treturn false;\n\t}\n\n\tfor ( const attributeKey of item.getAttributeKeys() ) {\n\t\t// Ignore selection attributes stored on block elements.\n\t\tif ( attributeKey.startsWith( 'selection:' ) || attributeKey == 'htmlEmptyBlock' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Don't use bogus paragraph if there are attributes from other features.\n\t\tif ( !attributeNames.includes( attributeKey ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn blocks.length < 2;\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/**\n * @module list/list/listediting\n */\n\nimport { Plugin, type Editor, type MultiCommand, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tDowncastAttributeEvent,\n\tModelDocumentChangeEvent,\n\tViewDowncastWriter,\n\tModelElement,\n\tModel,\n\tModelInsertContentEvent,\n\tUpcastElementEvent,\n\tViewDocumentTabEvent,\n\tViewElement,\n\tViewAttributeElement,\n\tModelWriter,\n\tDowncastRemoveEvent,\n\tMapperModelToViewPositionEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport { Delete, type ViewDocumentDeleteEvent } from '@ckeditor/ckeditor5-typing';\nimport { Enter, type EnterCommand, type ViewDocumentEnterEvent } from '@ckeditor/ckeditor5-enter';\nimport { CKEditorError, type GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport { ListIndentCommand } from './listindentcommand.js';\nimport { ListCommand } from './listcommand.js';\nimport { ListMergeCommand } from './listmergecommand.js';\nimport { ListSplitCommand } from './listsplitcommand.js';\nimport { ListFormatting } from '../listformatting.js';\nimport { ListUtils } from './listutils.js';\n\nimport {\n\tbogusParagraphCreator,\n\tcreateModelToViewPositionMapper,\n\tlistItemDowncastConverter,\n\tlistItemDowncastRemoveConverter,\n\tlistItemSkipLevelConsumer,\n\tlistItemUpcastConverter,\n\treconvertItemsOnDataChange\n} from './converters.js';\nimport {\n\tfindAndAddListHeadToMap,\n\tfixListIndents,\n\tfixListItemIds\n} from './utils/postfixers.js';\nimport {\n\tgetAllListItemBlocks,\n\tisFirstBlockOfListItem,\n\tisLastBlockOfListItem,\n\tisSingleListItem,\n\tgetSelectedBlockObject,\n\tisListItemBlock,\n\tremoveListAttributes,\n\tListItemUid,\n\ttype ListElement\n} from './utils/model.js';\nimport {\n\tgetViewElementIdForListType,\n\tgetViewElementNameForListType\n} from './utils/view.js';\n\nimport { ListWalker, ListBlocksIterable } from './utils/listwalker.js';\n\nimport {\n\tClipboardPipeline,\n\ttype ClipboardOutputTransformationEvent\n} from '@ckeditor/ckeditor5-clipboard';\n\n/**\n * A list of base list model attributes.\n */\nconst LIST_BASE_ATTRIBUTES = [ 'listType', 'listIndent', 'listItemId' ];\n\nexport type ListType = 'numbered' | 'bulleted' | 'todo' | 'customNumbered' | 'customBulleted';\n\n/**\n * Map of model attributes applicable to list blocks.\n */\nexport interface ListItemAttributesMap {\n\tlistType?: ListType;\n\tlistIndent?: number;\n\tlistItemId?: string;\n}\n\n/**\n * The editing part of the document-list feature. It handles creating, editing and removing lists and list items.\n */\nexport class ListEditing extends Plugin {\n\t/**\n\t * The list of registered downcast strategies.\n\t */\n\tprivate readonly _downcastStrategies: Array<ListDowncastStrategy> = [];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Enter, Delete, ListUtils, ClipboardPipeline, ListFormatting ]> {\n\t\treturn [ Enter, Delete, ListUtils, ClipboardPipeline, ListFormatting ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'list.multiBlock', true );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst multiBlock = editor.config.get( 'list.multiBlock' );\n\n\t\tif ( editor.plugins.has( 'LegacyListEditing' ) ) {\n\t\t\t/**\n\t\t\t * The `List` feature cannot be loaded together with the `LegacyList` plugin.\n\t\t\t *\n\t\t\t * @error list-feature-conflict\n\t\t\t * @param {string} conflictPlugin Name of the plugin.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'list-feature-conflict', this, { conflictPlugin: 'LegacyListEditing' } );\n\t\t}\n\n\t\tmodel.schema.register( '$listItem', { allowAttributes: LIST_BASE_ATTRIBUTES } );\n\n\t\tif ( multiBlock ) {\n\t\t\tmodel.schema.extend( '$container', { allowAttributesOf: '$listItem' } );\n\t\t\tmodel.schema.extend( '$block', { allowAttributesOf: '$listItem' } );\n\t\t\tmodel.schema.extend( '$blockObject', { allowAttributesOf: '$listItem' } );\n\t\t} else {\n\t\t\tmodel.schema.register( 'listItem', {\n\t\t\t\tinheritAllFrom: '$block',\n\t\t\t\tallowAttributesOf: '$listItem'\n\t\t\t} );\n\t\t}\n\n\t\tfor ( const attribute of LIST_BASE_ATTRIBUTES ) {\n\t\t\tmodel.schema.setAttributeProperties( attribute, {\n\t\t\t\tcopyOnReplace: true\n\t\t\t} );\n\t\t}\n\n\t\t// Register commands.\n\t\teditor.commands.add( 'numberedList', new ListCommand( editor, 'numbered' ) );\n\t\teditor.commands.add( 'bulletedList', new ListCommand( editor, 'bulleted' ) );\n\n\t\teditor.commands.add( 'customNumberedList', new ListCommand(\teditor,\t'customNumbered', {\tmultiLevel: true } ) );\n\t\teditor.commands.add( 'customBulletedList', new ListCommand( editor, 'customBulleted', {\tmultiLevel: true } ) );\n\n\t\teditor.commands.add( 'indentList', new ListIndentCommand( editor, 'forward' ) );\n\t\teditor.commands.add( 'outdentList', new ListIndentCommand( editor, 'backward' ) );\n\n\t\teditor.commands.add( 'splitListItemBefore', new ListSplitCommand( editor, 'before' ) );\n\t\teditor.commands.add( 'splitListItemAfter', new ListSplitCommand( editor, 'after' ) );\n\n\t\tif ( multiBlock ) {\n\t\t\teditor.commands.add( 'mergeListItemBackward', new ListMergeCommand( editor, 'backward' ) );\n\t\t\teditor.commands.add( 'mergeListItemForward', new ListMergeCommand( editor, 'forward' ) );\n\t\t}\n\n\t\tthis._setupDeleteIntegration();\n\t\tthis._setupEnterIntegration();\n\t\tthis._setupTabIntegration();\n\t\tthis._setupClipboardIntegration();\n\t\tthis._setupAccessibilityIntegration();\n\t\tthis._setupListItemIdConversionStrategy();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst commands = editor.commands;\n\t\tconst indent = commands.get( 'indent' ) as MultiCommand;\n\t\tconst outdent = commands.get( 'outdent' ) as MultiCommand;\n\n\t\tif ( indent ) {\n\t\t\t// Priority is high due to integration with `IndentBlock` plugin. We want to indent list first and if it's not possible\n\t\t\t// user can indent content with `IndentBlock` plugin.\n\t\t\tindent.registerChildCommand( commands.get( 'indentList' )!, { priority: 'high' } );\n\t\t}\n\n\t\tif ( outdent ) {\n\t\t\t// Priority is lowest due to integration with `IndentBlock` and `IndentCode` plugins.\n\t\t\t// First we want to allow user to outdent all indendations from other features then he can oudent list item.\n\t\t\toutdent.registerChildCommand( commands.get( 'outdentList' )!, { priority: 'lowest' } );\n\t\t}\n\n\t\t// Register conversion and model post-fixer after other plugins had a chance to register their attribute strategies.\n\t\tthis._setupModelPostFixing();\n\t\tthis._setupConversion();\n\t}\n\n\t/**\n\t * Registers a downcast strategy.\n\t *\n\t * **Note**: Strategies must be registered in the `Plugin#init()` phase so that it can be applied\n\t * in the `ListEditing#afterInit()`.\n\t *\n\t * @param strategy The downcast strategy to register.\n\t */\n\tpublic registerDowncastStrategy( strategy: ListDowncastStrategy ): void {\n\t\tthis._downcastStrategies.push( strategy );\n\t}\n\n\t/**\n\t * Returns list of model attribute names that should affect downcast conversion.\n\t */\n\tpublic getListAttributeNames(): Array<string> {\n\t\treturn [\n\t\t\t...LIST_BASE_ATTRIBUTES,\n\t\t\t...this._downcastStrategies.map( strategy => strategy.attributeName )\n\t\t];\n\t}\n\n\t/**\n\t * Attaches the listener to the {@link module:engine/view/document~ViewDocument#event:delete} event and handles backspace/delete\n\t * keys in and around document lists.\n\t */\n\tprivate _setupDeleteIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst mergeBackwardCommand: ListMergeCommand | undefined = editor.commands.get( 'mergeListItemBackward' );\n\t\tconst mergeForwardCommand: ListMergeCommand | undefined = editor.commands.get( 'mergeListItemForward' );\n\n\t\tthis.listenTo<ViewDocumentDeleteEvent>( editor.editing.view.document, 'delete', ( evt, data ) => {\n\t\t\tconst selection = editor.model.document.selection;\n\n\t\t\t// Let the Widget plugin take care of block widgets while deleting (https://github.com/ckeditor/ckeditor5/issues/11346).\n\t\t\tif ( getSelectedBlockObject( editor.model ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\teditor.model.change( () => {\n\t\t\t\tconst firstPosition = selection.getFirstPosition()!;\n\n\t\t\t\tif ( selection.isCollapsed && data.direction == 'backward' ) {\n\t\t\t\t\tif ( !firstPosition.isAtStart ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst positionParent = firstPosition.parent;\n\n\t\t\t\t\tif ( !isListItemBlock( positionParent ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst previousBlock = ListWalker.first( positionParent, {\n\t\t\t\t\t\tsameAttributes: 'listType',\n\t\t\t\t\t\tsameIndent: true\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Outdent the first block of a list item when there is no list block to merge with: either a first\n\t\t\t\t\t// list item (indent 0) or an item whose preceding sibling is not a list block (for example a block\n\t\t\t\t\t// quote between skip-level list items), in which case the only sensible action is to outdent.\n\t\t\t\t\tconst hasNoMergeTarget = positionParent.getAttribute( 'listIndent' ) === 0 ||\n\t\t\t\t\t\t!isListItemBlock( positionParent.previousSibling );\n\n\t\t\t\t\tif ( !previousBlock && hasNoMergeTarget ) {\n\t\t\t\t\t\tif ( !isLastBlockOfListItem( positionParent ) ) {\n\t\t\t\t\t\t\teditor.execute( 'splitListItemAfter' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\teditor.execute( 'outdentList' );\n\t\t\t\t\t}\n\t\t\t\t\t// Merge block with previous one (on the block level or on the content level).\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ( !mergeBackwardCommand || !mergeBackwardCommand.isEnabled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmergeBackwardCommand.execute( {\n\t\t\t\t\t\t\tshouldMergeOnBlocksContentLevel: shouldMergeOnBlocksContentLevel( editor.model, 'backward' )\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t\t// Non-collapsed selection or forward delete.\n\t\t\t\telse {\n\t\t\t\t\t// Collapsed selection should trigger forward merging only if at the end of a block.\n\t\t\t\t\tif ( selection.isCollapsed && !selection.getLastPosition()!.isAtEnd ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !mergeForwardCommand || !mergeForwardCommand.isEnabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tmergeForwardCommand.execute( {\n\t\t\t\t\t\tshouldMergeOnBlocksContentLevel: shouldMergeOnBlocksContentLevel( editor.model, 'forward' )\n\t\t\t\t\t} );\n\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t} );\n\t\t}, { context: 'li' } );\n\t}\n\n\t/**\n\t * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:enter} event and handles enter key press\n\t * in document lists.\n\t */\n\tprivate _setupEnterIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst commands = editor.commands;\n\t\tconst enterCommand: EnterCommand = commands.get( 'enter' )!;\n\n\t\t// Overwrite the default Enter key behavior: outdent or split the list in certain cases.\n\t\tthis.listenTo<ViewDocumentEnterEvent>( editor.editing.view.document, 'enter', ( evt, data ) => {\n\t\t\tconst doc = model.document;\n\t\t\tconst positionParent = doc.selection.getFirstPosition()!.parent;\n\n\t\t\tif (\n\t\t\t\tdoc.selection.isCollapsed &&\n\t\t\t\tisListItemBlock( positionParent ) &&\n\t\t\t\tpositionParent.isEmpty &&\n\t\t\t\t!data.isSoft\n\t\t\t) {\n\t\t\t\tconst isFirstBlock = isFirstBlockOfListItem( positionParent );\n\t\t\t\tconst isLastBlock = isLastBlockOfListItem( positionParent );\n\n\t\t\t\t// * a      →      * a\n\t\t\t\t// * []     →      []\n\t\t\t\tif ( isFirstBlock && isLastBlock ) {\n\t\t\t\t\teditor.execute( 'outdentList' );\n\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t\t// * []     →      * []\n\t\t\t\t//   a      →      * a\n\t\t\t\telse if ( isFirstBlock && !isLastBlock ) {\n\t\t\t\t\teditor.execute( 'splitListItemAfter' );\n\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t\t// * a      →      * a\n\t\t\t\t//   []     →      * []\n\t\t\t\telse if ( isLastBlock ) {\n\t\t\t\t\teditor.execute( 'splitListItemBefore' );\n\n\t\t\t\t\tdata.preventDefault();\n\t\t\t\t\tevt.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}, { context: 'li' } );\n\n\t\t// In some cases, after the default block splitting, we want to modify the new block to become a new list item\n\t\t// instead of an additional block in the same list item.\n\t\tthis.listenTo( enterCommand, 'afterExecute', () => {\n\t\t\tconst splitCommand: ListSplitCommand = commands.get( 'splitListItemBefore' )!;\n\n\t\t\t// The command has not refreshed because the change block related to EnterCommand#execute() is not over yet.\n\t\t\t// Let's keep it up to date and take advantage of ListSplitCommand#isEnabled.\n\t\t\tsplitCommand.refresh();\n\n\t\t\tif ( !splitCommand.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst doc = editor.model.document;\n\t\t\tconst positionParent = doc.selection.getLastPosition()!.parent;\n\t\t\tconst listItemBlocks = getAllListItemBlocks( positionParent as any );\n\n\t\t\t// Keep in mind this split happens after the default enter handler was executed. For instance:\n\t\t\t//\n\t\t\t// │       Initial state       │    After default enter    │   Here in #afterExecute   │\n\t\t\t// ├───────────────────────────┼───────────────────────────┼───────────────────────────┤\n\t\t\t// │          * a[]            │           * a             │           * a             │\n\t\t\t// │                           │             []            │           * []            │\n\t\t\tif ( listItemBlocks.length === 2 ) {\n\t\t\t\tsplitCommand.execute();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:tab} event and handles tab key and tab+shift keys\n\t * presses in document lists.\n\t */\n\tprivate _setupTabIntegration() {\n\t\tconst editor = this.editor;\n\n\t\tthis.listenTo<ViewDocumentTabEvent>( editor.editing.view.document, 'tab', ( evt, data ) => {\n\t\t\tconst commandName = data.shiftKey ? 'outdentList' : 'indentList';\n\t\t\tconst command = this.editor.commands.get( commandName )!;\n\n\t\t\tif ( command.isEnabled ) {\n\t\t\t\teditor.execute( commandName );\n\n\t\t\t\tdata.stopPropagation();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: 'li' } );\n\t}\n\n\t/**\n\t * Registers the conversion helpers for the document-list feature.\n\t */\n\tprivate _setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst attributeNames = this.getListAttributeNames();\n\t\tconst multiBlock = editor.config.get( 'list.multiBlock' );\n\t\tconst elementName = multiBlock ? 'paragraph' : 'listItem';\n\t\tconst enableSkipLevelLists = !!editor.config.get( 'list.enableSkipLevelLists' );\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t// Convert <li> to a generic paragraph (or listItem element) so the content of <li> is always inside a block.\n\t\t\t// Setting the listType attribute to let other features (to-do list) know that this is part of a list item.\n\t\t\t// This is also important to properly handle simple lists so that paragraphs inside a list item won't break the list item.\n\t\t\t// <li>  <-- converted to listItem\n\t\t\t//   <p></p> <-- should be also converted to listItem, so it won't split and replace the listItem generated from the above li.\n\t\t\t.elementToElement( {\n\t\t\t\tview: 'li',\n\t\t\t\tmodel: ( viewElement, { writer } ) => writer.createElement( elementName, { listType: '' } )\n\t\t\t} )\n\t\t\t// Convert paragraph to the list block (without list type defined yet).\n\t\t\t// This is important to properly handle bogus paragraph and to-do lists.\n\t\t\t// Most of the time the bogus paragraph should not appear in the data of to-do list,\n\t\t\t// but if there is any marker or an attribute on the paragraph then the bogus paragraph\n\t\t\t// is preserved in the data, and we need to be able to detect this case.\n\t\t\t.elementToElement( {\n\t\t\t\tview: 'p',\n\t\t\t\tmodel: ( viewElement, { writer } ) => {\n\t\t\t\t\tif ( viewElement.parent && viewElement.parent.is( 'element', 'li' ) ) {\n\t\t\t\t\t\treturn writer.createElement( elementName, { listType: '' } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t},\n\t\t\t\tconverterPriority: 'high'\n\t\t\t} )\n\t\t\t.add( dispatcher => {\n\t\t\t\t// A `<p>` that is the only `<p>` child of its `<li>` and carries no own attributes is\n\t\t\t\t// a bogus wrapper around the list item's content. Consume its name and convert its\n\t\t\t\t// children directly into the surrounding `<li>`'s paragraph instead of letting\n\t\t\t\t// `elementToElement('p')` above create a separate paragraph and force an autobreak.\n\t\t\t\t// Otherwise we would end up with two paragraphs (one of them empty), instead of one paragraph with content.\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:p', ( evt, data, conversionApi ) => {\n\t\t\t\t\tconst viewElement = data.viewItem;\n\n\t\t\t\t\tif ( !viewElement.parent || !viewElement.parent.is( 'element', 'li' ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Empty <p> (truly empty, e.g. `<li><p></p></li>`) must go through the standard\n\t\t\t\t\t// `elementToElement('p')` path so the EmptyBlock upcast (priority 'lowest') takes care of it.\n\t\t\t\t\tif ( viewElement.isEmpty ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Bogus only when `<p>` carries no own attributes.\n\t\t\t\t\tif ( !viewElement.getAttributeKeys().next().done ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// And the surrounding <li> has no other block-level content besides nested lists\n\t\t\t\t\t// (any text or non-list element sibling means a multi-block list item where this\n\t\t\t\t\t// <p> must keep its own paragraph in the model).\n\t\t\t\t\tfor ( const sibling of viewElement.parent.getChildren() ) {\n\t\t\t\t\t\tif ( sibling === viewElement ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( sibling.is( 'element', 'ol' ) || sibling.is( 'element', 'ul' ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Mark the <p> as consumed so the lower-priority `elementToElement('p')` (and the\n\t\t\t\t\t// Paragraph plugin's default `<p>` converter) skip it — otherwise they would\n\t\t\t\t\t// create a separate model paragraph and trigger the auto-break empty paragraph\n\t\t\t\t\t// we are working around.\n\t\t\t\t\tconversionApi.consumable.consume( viewElement, { name: true } );\n\n\t\t\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( viewElement, data.modelCursor );\n\n\t\t\t\t\tdata.modelRange = modelRange;\n\t\t\t\t\tdata.modelCursor = modelCursor;\n\t\t\t\t}, { priority: 'highest' } );\n\n\t\t\t\tif ( enableSkipLevelLists ) {\n\t\t\t\t\t// A consuming converter for intermediate `<li>` wrappers produced by the skip-level downcast\n\t\t\t\t\t// (or by external sources). It is registered with 'high' priority so it reliably runs before\n\t\t\t\t\t// any other `element:li` upcast converter. Registration order inside this `.add()` is already\n\t\t\t\t\t// enough for our own converters, but `high` guards against other plugins that may attach their\n\t\t\t\t\t// own `element:li` listeners at the default priority in a separate `.add()` block.\n\t\t\t\t\tdispatcher.on<UpcastElementEvent>(\n\t\t\t\t\t\t'element:li', listItemSkipLevelConsumer(), { priority: 'high' }\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:li', listItemUpcastConverter() );\n\t\t\t} );\n\n\t\tif ( !multiBlock ) {\n\t\t\teditor.conversion.for( 'downcast' )\n\t\t\t\t.elementToElement( {\n\t\t\t\t\tmodel: 'listItem',\n\t\t\t\t\tview: 'p'\n\t\t\t\t} );\n\t\t}\n\n\t\teditor.conversion.for( 'editingDowncast' )\n\t\t\t.elementToElement( {\n\t\t\t\tmodel: elementName,\n\t\t\t\tview: bogusParagraphCreator( attributeNames ),\n\t\t\t\tconverterPriority: 'high'\n\t\t\t} )\n\t\t\t.add( dispatcher => {\n\t\t\t\tdispatcher.on<DowncastAttributeEvent<ListElement>>(\n\t\t\t\t\t'attribute',\n\t\t\t\t\tlistItemDowncastConverter(\n\t\t\t\t\t\tattributeNames,\n\t\t\t\t\t\tthis._downcastStrategies,\n\t\t\t\t\t\tmodel,\n\t\t\t\t\t\t{ enableSkipLevelLists }\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tdispatcher.on<DowncastRemoveEvent>( 'remove', listItemDowncastRemoveConverter( model.schema ) );\n\t\t\t} );\n\n\t\teditor.conversion.for( 'dataDowncast' )\n\t\t\t.elementToElement( {\n\t\t\t\tmodel: elementName,\n\t\t\t\tview: bogusParagraphCreator( attributeNames, { dataPipeline: true } ),\n\t\t\t\tconverterPriority: 'high'\n\t\t\t} )\n\t\t\t.add( dispatcher => {\n\t\t\t\tdispatcher.on<DowncastAttributeEvent<ListElement>>(\n\t\t\t\t\t'attribute',\n\t\t\t\t\tlistItemDowncastConverter( attributeNames, this._downcastStrategies, model, {\n\t\t\t\t\t\tdataPipeline: true, enableSkipLevelLists\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t} );\n\n\t\tconst modelToViewPositionMapper = createModelToViewPositionMapper( this._downcastStrategies, editor.editing.view );\n\n\t\teditor.editing.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', modelToViewPositionMapper );\n\t\teditor.data.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', modelToViewPositionMapper );\n\n\t\tthis.listenTo<ModelDocumentChangeEvent>(\n\t\t\tmodel.document,\n\t\t\t'change:data',\n\t\t\treconvertItemsOnDataChange( model, editor.editing, attributeNames, this ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\n\t\t// For LI verify if an ID of the attribute element is correct.\n\t\tthis.on<ListEditingCheckAttributesEvent>( 'checkAttributes:item', ( evt, { viewElement, modelAttributes } ) => {\n\t\t\tif ( viewElement.id != modelAttributes.listItemId ) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\n\t\t// For UL and OL check if the name and ID of element is correct.\n\t\tthis.on<ListEditingCheckAttributesEvent>( 'checkAttributes:list', ( evt, { viewElement, modelAttributes } ) => {\n\t\t\tif (\n\t\t\t\tviewElement.name != getViewElementNameForListType( modelAttributes.listType ) ||\n\t\t\t\tviewElement.id != getViewElementIdForListType( modelAttributes.listType, modelAttributes.listIndent )\n\t\t\t) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Registers model post-fixers.\n\t */\n\tprivate _setupModelPostFixing() {\n\t\tconst model = this.editor.model;\n\t\tconst attributeNames = this.getListAttributeNames();\n\t\t// Register list fixing.\n\t\t// First the low level handler.\n\t\tmodel.document.registerPostFixer( writer => modelChangePostFixer( model, writer, attributeNames, this ) );\n\n\t\t// Then the callbacks for the specific lists.\n\t\t// The indentation fixing must be the first one (but only when skip levels are not allowed)...\n\t\tif ( !this.editor.config.get( 'list.enableSkipLevelLists' ) ) {\n\t\t\tthis.on<ListEditingPostFixerEvent>( 'postFixer', ( evt, { listNodes, writer } ) => {\n\t\t\t\tevt.return = fixListIndents( listNodes, writer ) || evt.return;\n\t\t\t}, { priority: 'high' } );\n\t\t}\n\n\t\t// ...then the item ids... and after that other fixers that rely on the correct indentation and ids.\n\t\tthis.on<ListEditingPostFixerEvent>( 'postFixer', ( evt, { listNodes, writer, seenIds } ) => {\n\t\t\tevt.return = fixListItemIds( listNodes, seenIds, writer ) || evt.return;\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Integrates the feature with the clipboard via {@link module:engine/model/model~Model#insertContent} and\n\t * {@link module:engine/model/model~Model#getSelectedContent}.\n\t */\n\tprivate _setupClipboardIntegration() {\n\t\tconst model = this.editor.model;\n\t\tconst clipboardPipeline: ClipboardPipeline = this.editor.plugins.get( 'ClipboardPipeline' );\n\n\t\tthis.listenTo<ModelInsertContentEvent>( model, 'insertContent', createModelIndentPasteFixer( model ), { priority: 'high' } );\n\n\t\t// To enhance the UX, the editor should not copy list attributes to the clipboard if the selection\n\t\t// started and ended in the same list item.\n\t\t//\n\t\t// If the selection was enclosed in a single list item, there is a good chance the user did not want it\n\t\t// copied as a list item but plain blocks.\n\t\t//\n\t\t// This avoids pasting orphaned list items instead of paragraphs, for instance, straight into the root.\n\t\t//\n\t\t//\t                       ┌─────────────────────┬───────────────────┐\n\t\t//\t                       │ Selection           │ Clipboard content │\n\t\t//\t                       ├─────────────────────┼───────────────────┤\n\t\t//\t                       │ [* <Widget />]      │ <Widget />        │\n\t\t//\t                       ├─────────────────────┼───────────────────┤\n\t\t//\t                       │ [* Foo]             │ Foo               │\n\t\t//\t                       ├─────────────────────┼───────────────────┤\n\t\t//\t                       │ * Foo [bar] baz     │ bar               │\n\t\t//\t                       ├─────────────────────┼───────────────────┤\n\t\t//\t                       │ * Fo[o              │ o                 │\n\t\t//\t                       │   ba]r              │ ba                │\n\t\t//\t                       ├─────────────────────┼───────────────────┤\n\t\t//\t                       │ * Fo[o              │ * o               │\n\t\t//\t                       │ * ba]r              │ * ba              │\n\t\t//\t                       ├─────────────────────┼───────────────────┤\n\t\t//\t                       │ [* Foo              │ * Foo             │\n\t\t//\t                       │  * bar]             │ * bar             │\n\t\t//\t                       └─────────────────────┴───────────────────┘\n\t\t//\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/11608, https://github.com/ckeditor/ckeditor5/issues/14969\n\t\tthis.listenTo<ClipboardOutputTransformationEvent>( clipboardPipeline, 'outputTransformation', ( evt, data ) => {\n\t\t\tmodel.change( writer => {\n\t\t\t\t// Remove last block if it's empty.\n\t\t\t\tconst allContentChildren = Array.from( data.content.getChildren() );\n\t\t\t\tconst lastItem = allContentChildren[ allContentChildren.length - 1 ];\n\n\t\t\t\tif ( allContentChildren.length > 1 && lastItem.is( 'element' ) && lastItem.isEmpty ) {\n\t\t\t\t\tconst contentChildrenExceptLastItem = allContentChildren.slice( 0, -1 );\n\n\t\t\t\t\tif ( contentChildrenExceptLastItem.every( isListItemBlock ) ) {\n\t\t\t\t\t\twriter.remove( lastItem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Copy/cut only content of a list item (for drag-drop move the whole list item).\n\t\t\t\tif ( data.method == 'copy' || data.method == 'cut' ) {\n\t\t\t\t\tconst allChildren = Array.from( data.content.getChildren() );\n\t\t\t\t\tconst isSingleListItemSelected = isSingleListItem( allChildren );\n\n\t\t\t\t\t/* v8 ignore next -- Clipboard output normally reaches this cleanup only for selected single list items. */\n\t\t\t\t\tif ( isSingleListItemSelected ) {\n\t\t\t\t\t\tremoveListAttributes( allChildren as Array<ModelElement>, writer, this.getListAttributeNames() );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Informs editor accessibility features about keystrokes brought by the plugin.\n\t */\n\tprivate _setupAccessibilityIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.accessibility.addKeystrokeInfoGroup( {\n\t\t\tid: 'list',\n\t\t\tlabel: t( 'Keystrokes that can be used in a list' ),\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Increase list item indent' ),\n\t\t\t\t\tkeystroke: 'Tab'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Decrease list item indent' ),\n\t\t\t\t\tkeystroke: 'Shift+Tab'\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Convert `listItemId` attribute to `data-list-item-id` attribute on the view element in both downcast pipelines.\n\t */\n\tprivate _setupListItemIdConversionStrategy() {\n\t\tthis.registerDowncastStrategy( {\n\t\t\tscope: 'item',\n\t\t\tattributeName: 'listItemId',\n\n\t\t\tsetAttributeOnDowncast( writer, attributeValue, viewElement, options ) {\n\t\t\t\tif ( options && ( options.skipListItemIds || options.isClipboardPipeline ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twriter.setAttribute( 'data-list-item-id', attributeValue, viewElement );\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * The attribute to attribute downcast strategy for UL, OL, LI elements.\n */\nexport interface ListAttributeDowncastStrategy {\n\n\t/**\n\t * The scope of the downcast (whether it applies to LI or OL/UL).\n\t */\n\tscope: 'list' | 'item';\n\n\t/**\n\t * The model attribute name.\n\t */\n\tattributeName: string;\n\n\t/**\n\t * Whether the attribute should be consumed or this strategy is a side effect.\n\t *\n\t * @default true\n\t */\n\tconsume?: boolean;\n\n\t/**\n\t * Sets the property on the view element.\n\t */\n\tsetAttributeOnDowncast(\n\t\twriter: ViewDowncastWriter,\n\t\tvalue: unknown,\n\t\telement: ViewElement,\n\t\toptions: Record<string, unknown>,\n\t\tmodelElement: ModelElement\n\t): void;\n}\n\n/**\n * The custom marker downcast strategy.\n */\nexport interface ListItemMarkerDowncastStrategy {\n\n\t/**\n\t * The scope of the downcast.\n\t */\n\tscope: 'itemMarker';\n\n\t/**\n\t * The model attribute name.\n\t */\n\tattributeName: string;\n\n\t/**\n\t * Whether the attribute should be consumed or this strategy is a side effect.\n\t *\n\t * @default true\n\t */\n\tconsume?: boolean;\n\n\t/**\n\t * Creates a view element for a custom item marker.\n\t */\n\tcreateElement(\n\t\twriter: ViewDowncastWriter,\n\t\tmodelElement: ModelElement,\n\t\t{ dataPipeline }: { dataPipeline?: boolean }\n\t): ViewElement | null;\n\n\t/**\n\t * Creates an ViewAttributeElement to be used for wrapping a first block of a list item.\n\t */\n\tcreateWrapperElement?(\n\t\twriter: ViewDowncastWriter,\n\t\tmodelElement: ModelElement,\n\t\t{ dataPipeline }: { dataPipeline?: boolean }\n\t): ViewAttributeElement;\n\n\t/**\n\t * Should return true if the given list block can be wrapped with the wrapper created by `createWrapperElement()`\n\t * or only the marker element should be wrapped.\n\t */\n\tcanWrapElement?( modelElement: ModelElement ): boolean;\n\n\t/**\n\t * Should return true if the custom marker can be injected into a given list block.\n\t * Otherwise, custom marker view element is always injected before the block element.\n\t */\n\tcanInjectMarkerIntoElement?( modelElement: ModelElement ): boolean;\n}\n\n/**\n * The downcast strategy.\n */\nexport type ListDowncastStrategy = ListAttributeDowncastStrategy | ListItemMarkerDowncastStrategy;\n\n/**\n * Post-fixer that reacts to changes on document and fixes incorrect model states (invalid `listItemId` and `listIndent` values).\n *\n * In the example below, there is a correct list structure.\n * Then the middle element is removed so the list structure will become incorrect:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=1>Item 2</paragraph>   <--- this is removed.\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=2>Item 3</paragraph>\n * ```\n *\n * The list structure after the middle element is removed:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=2>Item 3</paragraph>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=1>Item 3</paragraph>   <--- note that indent got post-fixed.\n * ```\n *\n * @param model The data model.\n * @param writer The writer to do changes with.\n * @param attributeNames The list of all model list attributes (including registered strategies).\n * @param ListEditing The document list editing plugin.\n * @returns `true` if any change has been applied, `false` otherwise.\n */\nfunction modelChangePostFixer(\n\tmodel: Model,\n\twriter: ModelWriter,\n\tattributeNames: Array<string>,\n\tlistEditing: ListEditing\n) {\n\tconst changes = model.document.differ.getChanges();\n\tconst visited = new Set<ModelElement>();\n\tconst itemToListHead = new Set<ListElement>();\n\tconst multiBlock = listEditing.editor.config.get( 'list.multiBlock' );\n\n\tlet applied = false;\n\n\tfor ( const entry of changes ) {\n\t\tif ( entry.type == 'insert' && entry.name != '$text' ) {\n\t\t\tconst item = entry.position.nodeAfter!;\n\n\t\t\t// Remove attributes in case of renamed element.\n\t\t\tif ( !model.schema.checkAttribute( item, 'listItemId' ) ) {\n\t\t\t\tfor ( const attributeName of Array.from( item.getAttributeKeys() ) ) {\n\t\t\t\t\tif ( attributeNames.includes( attributeName ) ) {\n\t\t\t\t\t\twriter.removeAttribute( attributeName, item );\n\n\t\t\t\t\t\tapplied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfindAndAddListHeadToMap( entry.position, itemToListHead, visited );\n\n\t\t\t// Insert of a non-list item - check if there is a list after it.\n\t\t\tif ( !entry.attributes.has( 'listItemId' ) ) {\n\t\t\t\tfindAndAddListHeadToMap( entry.position.getShiftedBy( entry.length ), itemToListHead, visited );\n\t\t\t}\n\n\t\t\t// Check if there is no nested list.\n\t\t\tfor ( const { item: innerItem, previousPosition } of model.createRangeIn( item as ModelElement ) ) {\n\t\t\t\tif ( isListItemBlock( innerItem ) ) {\n\t\t\t\t\tfindAndAddListHeadToMap( previousPosition, itemToListHead, visited );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Removed list item or block adjacent to a list.\n\t\telse if ( entry.type == 'remove' ) {\n\t\t\tfindAndAddListHeadToMap( entry.position, itemToListHead, visited );\n\t\t}\n\t\t// Changed list item indent or type.\n\t\telse if ( entry.type == 'attribute' && attributeNames.includes( entry.attributeKey ) ) {\n\t\t\tfindAndAddListHeadToMap( entry.range.start, itemToListHead, visited );\n\n\t\t\tif ( entry.attributeNewValue === null ) {\n\t\t\t\tfindAndAddListHeadToMap( entry.range.start.getShiftedBy( 1 ), itemToListHead, visited );\n\t\t\t}\n\t\t}\n\n\t\t// Make sure that there is no left over listItem element without attributes or a block with list attributes that is not a listItem.\n\t\tif ( !multiBlock && entry.type == 'attribute' && LIST_BASE_ATTRIBUTES.includes( entry.attributeKey ) ) {\n\t\t\tconst element = entry.range.start.nodeAfter!;\n\n\t\t\tif ( entry.attributeNewValue === null && element && element.is( 'element', 'listItem' ) ) {\n\t\t\t\twriter.rename( element, 'paragraph' );\n\t\t\t\tapplied = true;\n\t\t\t} else if ( entry.attributeOldValue === null && element && element.is( 'element' ) && element.name != 'listItem' ) {\n\t\t\t\twriter.rename( element, 'listItem' );\n\t\t\t\tapplied = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Make sure that IDs are not shared by split list.\n\tconst seenIds = new Set<string>();\n\n\tfor ( const listHead of itemToListHead.values() ) {\n\t\tapplied = listEditing.fire<ListEditingPostFixerEvent>( 'postFixer', {\n\t\t\tlistNodes: new ListBlocksIterable( listHead ),\n\t\t\tlistHead,\n\t\t\twriter,\n\t\t\tseenIds\n\t\t} ) || applied;\n\t}\n\n\treturn applied;\n}\n\n/**\n * A fixer for pasted content that includes list items.\n *\n * It fixes indentation of pasted list items so the pasted items match correctly to the context they are pasted into.\n *\n * Example:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=\"0\">A</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=\"1\">B^</paragraph>\n * // At ^ paste:  <paragraph listType=\"numbered\" listItemId=\"x\" listIndent=\"0\">X</paragraph>\n * //              <paragraph listType=\"numbered\" listItemId=\"y\" listIndent=\"1\">Y</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=\"2\">C</paragraph>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=\"0\">A</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=\"1\">BX</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"y\" listIndent=\"2\">Y/paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=\"2\">C</paragraph>\n * ```\n */\nfunction createModelIndentPasteFixer( model: Model ): GetCallback<ModelInsertContentEvent> {\n\treturn ( evt, [ content, selectable ] ) => {\n\t\t// Only consider block elements for list attribute fixing. Applying list attributes to text nodes\n\t\t// or inline objects does not make sense and can cause editor crashes.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/19994.\n\t\tconst items = ( content.is( 'documentFragment' ) ?\n\t\t\tArray.from( content.getChildren() ) :\n\t\t\t[ content ]\n\t\t).filter( item => !model.schema.isInline( item ) );\n\n\t\tif ( !items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst selection = selectable ?\n\t\t\tmodel.createSelection( selectable ) :\n\t\t\tmodel.document.selection;\n\n\t\tconst position = selection.getFirstPosition()!;\n\n\t\t// Get a reference list item. Attributes of the inserted list items will be fixed according to that item.\n\t\tlet refItem: ListElement;\n\n\t\tif ( isListItemBlock( position.parent ) ) {\n\t\t\trefItem = position.parent;\n\t\t} else if ( isListItemBlock( position.nodeBefore ) && isListItemBlock( position.nodeAfter ) ) {\n\t\t\trefItem = position.nodeBefore;\n\t\t} else {\n\t\t\treturn; // Content is not copied into a list.\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst refType = refItem.getAttribute( 'listType' );\n\t\t\tconst refIndent = refItem.getAttribute( 'listIndent' );\n\t\t\tconst firstElementIndent = items[ 0 ].getAttribute( 'listIndent' ) as number || 0;\n\t\t\tconst indentDiff = Math.max( refIndent - firstElementIndent, 0 );\n\n\t\t\tfor ( const item of items ) {\n\t\t\t\tconst isListItem = isListItemBlock( item );\n\n\t\t\t\tif ( refItem.is( 'element', 'listItem' ) && item.is( 'element', 'paragraph' ) ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * When paragraphs or a plain text list is pasted into a simple list, convert\n\t\t\t\t\t * the `<paragraphs>' to `<listItem>' to avoid breaking the target list.\n\t\t\t\t\t *\n\t\t\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/13826.\n\t\t\t\t\t */\n\t\t\t\t\twriter.rename( item as ModelElement, 'listItem' );\n\t\t\t\t}\n\n\t\t\t\twriter.setAttributes( {\n\t\t\t\t\tlistIndent: ( isListItem ? item.getAttribute( 'listIndent' ) : 0 ) + indentDiff,\n\t\t\t\t\tlistItemId: isListItem ? item.getAttribute( 'listItemId' ) : ListItemUid.next(),\n\t\t\t\t\tlistType: refType\n\t\t\t\t}, item );\n\t\t\t}\n\t\t} );\n\t};\n}\n\n/**\n * Decides whether the merge should be accompanied by the model's `deleteContent()`, for instance, to get rid of the inline\n * content in the selection or take advantage of the heuristics in `deleteContent()` that helps convert lists into paragraphs\n * in certain cases.\n */\nfunction shouldMergeOnBlocksContentLevel( model: Model, direction: 'backward' | 'forward' ) {\n\tconst selection = model.document.selection;\n\n\tif ( !selection.isCollapsed ) {\n\t\treturn !getSelectedBlockObject( model );\n\t}\n\n\tif ( direction === 'forward' ) {\n\t\treturn true;\n\t}\n\n\tconst firstPosition = selection.getFirstPosition()!;\n\tconst positionParent = firstPosition.parent;\n\tconst previousSibling = positionParent.previousSibling!;\n\n\tif ( model.schema.isObject( previousSibling ) ) {\n\t\treturn false;\n\t}\n\n\tif ( ( previousSibling as ModelElement ).isEmpty ) {\n\t\treturn true;\n\t}\n\n\treturn isSingleListItem( [ positionParent as ModelElement, previousSibling ] );\n}\n\n/**\n * Event fired on changes detected on the model list element to verify if the view representation of a list element\n * is representing those attributes.\n *\n * It allows triggering a re-wrapping of a list item.\n *\n * @eventName ~ListEditing#postFixer\n * @param listHead The head element of a list.\n * @param writer The writer to do changes with.\n * @param seenIds The set of already known IDs.\n * @returns If a post-fixer made a change of the model tree, it should return `true`.\n */\nexport type ListEditingPostFixerEvent = {\n\tname: 'postFixer';\n\targs: [ {\n\t\tlistNodes: ListBlocksIterable;\n\t\tlistHead: ModelElement;\n\t\twriter: ModelWriter;\n\t\tseenIds: Set<string>;\n\t} ];\n\treturn: boolean;\n};\n\n/**\n * Event fired on changes detected on the model list element to verify if the view representation of a list element\n * is representing those attributes.\n *\n * It allows triggering a re-wrapping of a list item.\n *\n * **Note**: For convenience this event is namespaced and could be captured as `checkAttributes:list` or `checkAttributes:item`.\n *\n * @internal\n * @eventName ~ListEditing#checkAttributes\n */\nexport type ListEditingCheckAttributesEvent = {\n\tname: 'checkAttributes' | 'checkAttributes:list' | 'checkAttributes:item';\n\targs: [ {\n\t\tviewElement: ViewElement & { id?: string };\n\t\tmodelAttributes: ListItemAttributesMap;\n\t\tmodelReferenceElement: ListElement;\n\t} ];\n\treturn: boolean;\n};\n\n/**\n * Event fired on changes detected on the model list element to verify if the view representation of a list block element\n * is representing those attributes.\n *\n * It allows triggering a reconversion of a list item block.\n *\n * @internal\n * @eventName ~ListEditing#checkElement\n */\nexport type ListEditingCheckElementEvent = {\n\tname: 'checkElement';\n\targs: [ {\n\t\tviewElement: ViewElement;\n\t\tmodelElement: ModelElement;\n\t} ];\n\treturn: boolean;\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/**\n * @module list/list/utils\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { ButtonView, MenuBarMenuListItemButtonView, type ButtonExecuteEvent } from '@ckeditor/ckeditor5-ui';\n\n/**\n * Helper method for creating toolbar and menu buttons and linking them with an appropriate command.\n *\n * @internal\n * @param editor The editor instance to which the UI component will be added.\n * @param commandName The name of the command.\n * @param label The button label.\n * @param icon The source of the icon.\n */\nexport function createUIComponents(\n\teditor: Editor,\n\tcommandName: 'bulletedList' | 'numberedList' | 'todoList',\n\tlabel: string,\n\ticon: string\n): void {\n\teditor.ui.componentFactory.add( commandName, () => {\n\t\tconst buttonView = _createButton( ButtonView, editor, commandName, label, icon );\n\n\t\tbuttonView.set( {\n\t\t\ttooltip: true,\n\t\t\tisToggleable: true\n\t\t} );\n\n\t\treturn buttonView;\n\t} );\n\n\teditor.ui.componentFactory.add( `menuBar:${ commandName }`, () => {\n\t\tconst buttonView = _createButton( MenuBarMenuListItemButtonView, editor, commandName, label, icon );\n\n\t\tbuttonView.set( {\n\t\t\trole: 'menuitemcheckbox',\n\t\t\tisToggleable: true\n\t\t} );\n\n\t\treturn buttonView;\n\t} );\n}\n\n/**\n * Creates a button to use either in toolbar or in menu bar.\n */\nfunction _createButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>(\n\tButtonClass: T,\n\teditor: Editor,\n\tcommandName: 'bulletedList' | 'numberedList' | 'todoList',\n\tlabel: string,\n\ticon: string\n): InstanceType<T> {\n\tconst command = editor.commands.get( commandName )!;\n\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\n\tview.set( {\n\t\tlabel,\n\t\ticon\n\t} );\n\n\t// Bind button model to command.\n\tview.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );\n\n\t// Execute the command.\n\tview.on<ButtonExecuteEvent>( 'execute', () => {\n\t\teditor.execute( commandName );\n\t\teditor.editing.view.focus();\n\t} );\n\n\treturn view;\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/**\n * @module list/list/listui\n */\n\nimport { createUIComponents } from './utils.js';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconBulletedList, IconNumberedList } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The list UI feature. It introduces the `'numberedList'` and `'bulletedList'` buttons that\n * allow to convert paragraphs to and from list items and indent or outdent them.\n */\nexport class ListUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst t = this.editor.t;\n\n\t\t// Create button numberedList.\n\t\tif ( !this.editor.ui.componentFactory.has( 'numberedList' ) ) {\n\t\t\tcreateUIComponents( this.editor, 'numberedList', t( 'Numbered List' ), IconNumberedList );\n\t\t}\n\n\t\t// Create button bulletedList.\n\t\tif ( !this.editor.ui.componentFactory.has( 'bulletedList' ) ) {\n\t\t\tcreateUIComponents( this.editor, 'bulletedList', t( 'Bulleted List' ), IconBulletedList );\n\t\t}\n\t}\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/**\n * @module list/list\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ListEditing } from './list/listediting.js';\nimport { ListUI } from './list/listui.js';\n\n/**\n * The list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/list/listediting~ListEditing  list\n * editing feature} and {@link module:list/list/listui~ListUI list UI feature}.\n */\nexport class List extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing, ListUI ]> {\n\t\treturn [ ListEditing, ListUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'List' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module list/listproperties/liststartcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\nimport {\n\texpandListBlocksToCompleteList,\n\tisListItemBlock,\n\tisNumberedListType\n} from '../list/utils/model.js';\n\n/**\n * The list start index command. It changes the `listStart` attribute of the selected list items,\n * letting the user to choose the starting point of an ordered list.\n * It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n */\nexport class ListStartCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public value: number | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst value = this._getValue();\n\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Execute options.\n\t * @param options.startIndex The list start index.\n\t */\n\tpublic override execute( { startIndex = 1 }: { startIndex?: number } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tlet blocks = Array.from( document.selection.getSelectedBlocks() )\n\t\t\t.filter( block =>\n\t\t\t\tisListItemBlock( block ) &&\n\t\t\t\tisNumberedListType( block.getAttribute( 'listType' ) )\n\t\t\t);\n\n\t\tblocks = expandListBlocksToCompleteList( blocks );\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const block of blocks ) {\n\t\t\t\twriter.setAttribute( 'listStart', startIndex >= 0 ? startIndex : 1, block );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue() {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tconst block = first( document.selection.getSelectedBlocks() );\n\n\t\tif (\n\t\t\tblock &&\n\t\t\tisListItemBlock( block ) &&\n\t\t\tisNumberedListType( block.getAttribute( 'listType' ) )\n\t\t) {\n\t\t\treturn block.getAttribute( 'listStart' ) as number;\n\t\t}\n\n\t\treturn null;\n\t}\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/**\n* @module list/listproperties/utils/style\n*/\n\nconst LIST_STYLE_TO_LIST_TYPE: Record<string, 'bulleted' | 'numbered' | undefined> = {};\nconst LIST_STYLE_TO_TYPE_ATTRIBUTE: Record<string, string | null | undefined> = {};\nconst TYPE_ATTRIBUTE_TO_LIST_STYLE: Record<string, string | undefined> = {};\n\nconst LIST_STYLE_TYPES: Array<{ listStyle: string; typeAttribute: string | null; listType: 'bulleted' | 'numbered' }> = [\n\t{ listStyle: 'disc', typeAttribute: 'disc', listType: 'bulleted' },\n\t{ listStyle: 'circle', typeAttribute: 'circle', listType: 'bulleted' },\n\t{ listStyle: 'square', typeAttribute: 'square', listType: 'bulleted' },\n\t{ listStyle: 'decimal', typeAttribute: '1', listType: 'numbered' },\n\t{ listStyle: 'decimal-leading-zero', typeAttribute: null, listType: 'numbered' },\n\t{ listStyle: 'lower-roman', typeAttribute: 'i', listType: 'numbered' },\n\t{ listStyle: 'upper-roman', typeAttribute: 'I', listType: 'numbered' },\n\t{ listStyle: 'lower-alpha', typeAttribute: 'a', listType: 'numbered' },\n\t{ listStyle: 'upper-alpha', typeAttribute: 'A', listType: 'numbered' },\n\t{ listStyle: 'lower-latin', typeAttribute: 'a', listType: 'numbered' },\n\t{ listStyle: 'upper-latin', typeAttribute: 'A', listType: 'numbered' },\n\t{ listStyle: 'arabic-indic', typeAttribute: null, listType: 'numbered' }\n];\n\nfor ( const { listStyle, typeAttribute, listType } of LIST_STYLE_TYPES ) {\n\tLIST_STYLE_TO_LIST_TYPE[ listStyle ] = listType;\n\tLIST_STYLE_TO_TYPE_ATTRIBUTE[ listStyle ] = typeAttribute;\n\n\tif ( typeAttribute ) {\n\t\tTYPE_ATTRIBUTE_TO_LIST_STYLE[ typeAttribute ] = listStyle;\n\t}\n}\n\n/**\n * Gets all the style types supported by given list type.\n *\n * @internal\n */\nexport function getAllSupportedStyleTypes(): Array<string> {\n\treturn LIST_STYLE_TYPES.map( x => x.listStyle );\n}\n\n/**\n * Checks whether the given list-style-type is supported by numbered or bulleted list.\n *\n * @internal\n */\nexport function getListTypeFromListStyleType( listStyleType: string ): 'bulleted' | 'numbered' | null {\n\treturn LIST_STYLE_TO_LIST_TYPE[ listStyleType ] || null;\n}\n\n/**\n * Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.\n *\n * @internal\n */\nexport function getListStyleTypeFromTypeAttribute( value: string ): string | null {\n\treturn TYPE_ATTRIBUTE_TO_LIST_STYLE[ value ] || null;\n}\n\n/**\n * Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.\n *\n * @internal\n */\nexport function getTypeAttributeFromListStyleType( value: string ): string | null {\n\treturn LIST_STYLE_TO_TYPE_ATTRIBUTE[ value ] || null;\n}\n\n/**\n * Normalizes list style by converting aliases to their canonical form.\n *\n * @internal\n * @param listStyle The list style value to normalize.\n * @returns The canonical form of the list style.\n *\n * @example\n * normalizeListStyle( 'lower-alpha' ); // Returns 'lower-latin'\n * normalizeListStyle( 'upper-alpha' ); // Returns 'upper-latin'\n * normalizeListStyle( 'disc' ); // Returns 'disc'\n */\nexport function normalizeListStyle( listStyle: string ): string {\n\tswitch ( listStyle ) {\n\t\tcase 'lower-alpha':\n\t\t\treturn 'lower-latin';\n\t\tcase 'upper-alpha':\n\t\t\treturn 'upper-latin';\n\t\tdefault:\n\t\t\treturn listStyle;\n\t}\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/**\n * @module list/listproperties/liststylecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\nimport {\n\texpandListBlocksToCompleteList,\n\tisListItemBlock\n} from '../list/utils/model.js';\nimport { getListTypeFromListStyleType } from './utils/style.js';\n\n/**\n * The list style command. It changes `listStyle` attribute of the selected list items,\n * letting the user choose styles for the list item markers.\n * It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n */\nexport class ListStyleCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public value: string | null;\n\n\t/**\n\t * The default type of the list style.\n\t */\n\tpublic readonly defaultType: string;\n\n\t/**\n\t * The list of supported style types by this command.\n\t */\n\tprivate _supportedTypes: Array<string> | undefined;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param defaultType The list type that will be used by default if the value was not specified during\n\t * the command execution.\n\t * @param supportedTypes The list of supported style types by this command.\n\t */\n\tconstructor( editor: Editor, defaultType: string, supportedTypes?: Array<string> ) {\n\t\tsuper( editor );\n\n\t\tthis.defaultType = defaultType;\n\t\tthis._supportedTypes = supportedTypes;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.type The type of the list style, e.g. `'disc'` or `'square'`. If `null` is specified, the default\n\t * style will be applied.\n\t */\n\tpublic override execute( options: { type?: string | null } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tmodel.change( writer => {\n\t\t\tthis._tryToConvertItemsToList( options );\n\n\t\t\tlet blocks = Array.from( document.selection.getSelectedBlocks() )\n\t\t\t\t.filter( block => block.hasAttribute( 'listType' ) );\n\n\t\t\tif ( !blocks.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tblocks = expandListBlocksToCompleteList( blocks );\n\n\t\t\tfor ( const block of blocks ) {\n\t\t\t\twriter.setAttribute( 'listStyle', options.type || this.defaultType, block );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks if the given style type is supported by this plugin.\n\t */\n\tpublic isStyleTypeSupported( value: string ): boolean {\n\t\tif ( !this._supportedTypes ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn this._supportedTypes.includes( value );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue() {\n\t\tconst listItem = first( this.editor.model.document.selection.getSelectedBlocks() );\n\n\t\tif ( isListItemBlock( listItem ) ) {\n\t\t\treturn listItem.getAttribute( 'listStyle' ) as string;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled() {\n\t\tconst editor = this.editor;\n\n\t\tconst numberedList = editor.commands.get( 'numberedList' )!;\n\t\tconst bulletedList = editor.commands.get( 'bulletedList' )!;\n\n\t\treturn numberedList.isEnabled || bulletedList.isEnabled;\n\t}\n\n\t/**\n\t * Check if the provided list style is valid. Also change the selection to a list if it's not set yet.\n\t *\n\t * @param options.type The type of the list style. If `null` is specified, the function does nothing.\n\t*/\n\tprivate _tryToConvertItemsToList( options: { type?: string | null } ) {\n\t\tif ( !options.type ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst listType = getListTypeFromListStyleType( options.type );\n\n\t\tif ( !listType ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst commandName = `${ listType }List` as const;\n\t\tconst command = editor.commands.get( commandName )!;\n\n\t\tif ( !command.value ) {\n\t\t\teditor.execute( commandName );\n\t\t}\n\t}\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/**\n * @module list/listproperties/listreversedcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\nimport {\n\texpandListBlocksToCompleteList,\n\tisListItemBlock\n} from '../list/utils/model.js';\n\n/**\n * The list reversed command. It changes the `listReversed` attribute of the selected list items,\n * letting the user to choose the order of an ordered list.\n * It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n */\nexport class ListReversedCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public value: boolean | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst value = this._getValue();\n\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.reversed Whether the list should be reversed.\n\t */\n\tpublic override execute( options: { reversed?: boolean } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tlet blocks = Array.from( document.selection.getSelectedBlocks() )\n\t\t\t.filter( block => isListItemBlock( block ) && block.getAttribute( 'listType' ) == 'numbered' );\n\n\t\tblocks = expandListBlocksToCompleteList( blocks );\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const block of blocks ) {\n\t\t\t\twriter.setAttribute( 'listReversed', !!options.reversed, block );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t */\n\tprivate _getValue() {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\tconst block = first( document.selection.getSelectedBlocks() );\n\n\t\tif ( isListItemBlock( block ) && block.getAttribute( 'listType' ) == 'numbered' ) {\n\t\t\treturn block.getAttribute( 'listReversed' ) as boolean;\n\t\t}\n\n\t\treturn null;\n\t}\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/**\n * @module list/listproperties/converters\n */\n\nimport type { UpcastElementEvent } from '@ckeditor/ckeditor5-engine';\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport type { AttributeStrategy } from './listpropertiesediting.js';\n\n/**\n * Returns a converter that consumes the `style`, `reversed`, and `start` attributes.\n * In `style`, it searches for the `list-style-type` definition.\n * If not found, the `\"default\"` value will be used.\n *\n * @internal\n * @param strategy\n */\nexport function listPropertiesUpcastConverter( strategy: AttributeStrategy ): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst { writer, schema, consumable } = conversionApi;\n\n\t\t// If there is no view consumable to consume, set the default attribute value to be able to reconvert nested lists on parent change.\n\t\t// So abort converting if attribute was directly consumed.\n\t\tif ( consumable.test( data.viewItem, strategy.viewConsumables ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !data.modelRange ) {\n\t\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t\t}\n\n\t\tlet applied = false;\n\n\t\tfor ( const item of data.modelRange!.getItems( { shallow: true } ) ) {\n\t\t\tif ( !schema.checkAttribute( item, strategy.attributeName ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !strategy.appliesToListItem( item ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Set list attributes only on same level items, those nested deeper are already handled by the recursive conversion.\n\t\t\tif ( item.hasAttribute( strategy.attributeName ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\twriter.setAttribute( strategy.attributeName, strategy.getAttributeOnUpcast( data.viewItem ), item );\n\t\t\tapplied = true;\n\t\t}\n\n\t\tif ( applied ) {\n\t\t\tconsumable.consume( data.viewItem, strategy.viewConsumables );\n\t\t}\n\t};\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/**\n * @module list/listproperties/listpropertiesutils\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport {\n\tgetAllSupportedStyleTypes,\n\tgetListStyleTypeFromTypeAttribute,\n\tgetListTypeFromListStyleType,\n\tgetTypeAttributeFromListStyleType\n} from './utils/style.js';\n\n/**\n * A set of helpers related to document lists.\n */\nexport class ListPropertiesUtils extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListPropertiesUtils' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Gets all the style types supported by given list type.\n\t */\n\tpublic getAllSupportedStyleTypes(): Array<string> {\n\t\treturn getAllSupportedStyleTypes();\n\t}\n\n\t/**\n\t * Checks whether the given list-style-type is supported by numbered or bulleted list.\n\t */\n\tpublic getListTypeFromListStyleType( listStyleType: string ): 'bulleted' | 'numbered' | null {\n\t\treturn getListTypeFromListStyleType( listStyleType );\n\t}\n\n\t/**\n\t * Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.\n\t */\n\tpublic getListStyleTypeFromTypeAttribute( value: string ): string | null {\n\t\treturn getListStyleTypeFromTypeAttribute( value );\n\t}\n\n\t/**\n\t * Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.\n\t */\n\tpublic getTypeAttributeFromListStyleType( value: string ): string | null {\n\t\treturn getTypeAttributeFromListStyleType( value );\n\t}\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/**\n * @module list/listproperties/utils/config\n */\n\nimport { pick } from 'es-toolkit/compat';\nimport { toArray } from '@ckeditor/ckeditor5-utils';\nimport type { ListPropertiesConfig, ListPropertiesStyleListType } from '../../listconfig.js';\n\n/**\n * Normalizes {@link module:list/listconfig~ListPropertiesConfig} in the configuration of the list properties feature.\n * The structure of normalized list properties options looks as follows:\n *\n * ```ts\n * {\n * \tstyles: {\n * \t\tlistTypes: [ 'bulleted', 'numbered' ],\n * \t\tuseAttribute: false\n * \t},\n * \tstartIndex: true,\n * \treversed: true\n * }\n * ```\n *\n * @internal\n * @param config The list properties {@link module:list/listconfig~ListPropertiesConfig config}.\n * @returns An object with normalized list properties options.\n */\nexport function getNormalizedConfig( config: ListPropertiesConfig ): NormalizedListPropertiesConfig {\n\tconst { startIndex, reversed, styles } = config;\n\n\treturn {\n\t\tstyles: getNormalizedStylesConfig( styles ),\n\t\tstartIndex: startIndex || false,\n\t\treversed: reversed || false\n\t};\n}\n\n/**\n * Normalizes styles in the configuration of the list properties feature.\n * The structure of normalized list properties options looks as follows:\n *\n * ```ts\n * {\n * \tlistTypes: [ 'bulleted', 'numbered' ],\n * \tuseAttribute: false\n * }\n * ```\n *\n * @param styles The list properties styles.\n * @returns An object with normalized list properties styles.\n */\nfunction getNormalizedStylesConfig( styles: ListPropertiesConfig[ 'styles' ] ): NormalizedListPropertiesConfig[ 'styles' ] {\n\tconst normalizedConfig: NormalizedListPropertiesConfig[ 'styles' ] = {\n\t\tlistTypes: [ 'bulleted', 'numbered' ],\n\t\tuseAttribute: false,\n\t\tlistStyleTypes: {\n\t\t\tnumbered: [ 'decimal', 'decimal-leading-zero', 'lower-roman', 'upper-roman', 'lower-latin', 'upper-latin' ],\n\t\t\tbulleted: [ 'disc', 'circle', 'square' ]\n\t\t}\n\t};\n\n\tif ( styles === true ) {\n\t\treturn normalizedConfig;\n\t}\n\n\tif ( !styles ) {\n\t\tnormalizedConfig.listTypes = [];\n\t\tnormalizedConfig.listStyleTypes = {};\n\t}\n\telse if ( Array.isArray( styles ) || typeof styles == 'string' ) {\n\t\tnormalizedConfig.listTypes = toArray( styles );\n\t\tnormalizedConfig.listStyleTypes = pick( normalizedConfig.listStyleTypes, normalizedConfig.listTypes );\n\t}\n\telse {\n\t\tnormalizedConfig.listTypes = styles.listTypes ?\n\t\t\ttoArray( styles.listTypes ) :\n\t\t\tnormalizedConfig.listTypes;\n\n\t\tnormalizedConfig.useAttribute = !!styles.useAttribute;\n\n\t\tif ( styles.listStyleTypes ) {\n\t\t\tnormalizedConfig.listStyleTypes = styles.listStyleTypes;\n\t\t} else {\n\t\t\tnormalizedConfig.listStyleTypes = pick( normalizedConfig.listStyleTypes, normalizedConfig.listTypes );\n\t\t}\n\t}\n\n\treturn normalizedConfig;\n}\n\n/**\n* Normalized list properties config.\n*\n* @internal\n*/\nexport type NormalizedListPropertiesConfig = {\n\tstyles: {\n\t\tlistTypes: Array<ListPropertiesStyleListType>;\n\t\tlistStyleTypes?: {\n\t\t\tnumbered?: Array<string>;\n\t\t\tbulleted?: Array<string>;\n\t\t};\n\t\tuseAttribute: boolean;\n\t};\n\tstartIndex: boolean;\n\treversed: boolean;\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/**\n * @module list/listproperties/listpropertiesediting\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tConsumables,\n\tViewDowncastWriter,\n\tModelElement,\n\tModelItem,\n\tUpcastElementEvent,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tListEditing,\n\ttype ListType,\n\ttype ListEditingCheckAttributesEvent,\n\ttype ListEditingPostFixerEvent,\n\ttype ListItemAttributesMap\n} from '../list/listediting.js';\n\nimport { ListStartCommand } from './liststartcommand.js';\nimport { ListStyleCommand } from './liststylecommand.js';\nimport { ListReversedCommand } from './listreversedcommand.js';\nimport { listPropertiesUpcastConverter } from './converters.js';\nimport {\n\tgetAllSupportedStyleTypes,\n\tgetListTypeFromListStyleType,\n\tgetListStyleTypeFromTypeAttribute,\n\tgetTypeAttributeFromListStyleType,\n\tnormalizeListStyle\n} from './utils/style.js';\nimport { ListPropertiesUtils } from './listpropertiesutils.js';\nimport {\n\tisNumberedListType\n} from '../list/utils/model.js';\n\nimport type { ListIndentCommandAfterExecuteEvent } from '../list/listindentcommand.js';\nimport type { ListPropertiesConfig } from '../listconfig.js';\nimport { getNormalizedConfig } from './utils/config.js';\n\nconst DEFAULT_LIST_TYPE = 'default';\n\n/**\n * The document list properties engine feature.\n *\n * It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.\n * Read more in {@link module:list/listconfig~ListPropertiesConfig}.\n */\nexport class ListPropertiesEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing, ListPropertiesUtils ]> {\n\t\treturn [ ListEditing, ListPropertiesUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListPropertiesEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'LP';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'list.properties', {\n\t\t\tstyles: true,\n\t\t\tstartIndex: false,\n\t\t\treversed: false\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst listEditing = editor.plugins.get( ListEditing );\n\n\t\tconst enabledProperties = editor.config.get( 'list.properties' )!;\n\t\tconst strategies = createAttributeStrategies( enabledProperties );\n\n\t\tfor ( const strategy of strategies ) {\n\t\t\tstrategy.addCommand( editor );\n\n\t\t\tmodel.schema.extend( '$listItem', { allowAttributes: strategy.attributeName } );\n\n\t\t\t// Register downcast strategy.\n\t\t\tlistEditing.registerDowncastStrategy( {\n\t\t\t\tscope: 'list',\n\t\t\t\tattributeName: strategy.attributeName,\n\n\t\t\t\tsetAttributeOnDowncast( writer, attributeValue, viewElement ) {\n\t\t\t\t\tstrategy.setAttributeOnDowncast( writer, attributeValue, viewElement );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Set up conversion.\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tfor ( const strategy of strategies ) {\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:ol', listPropertiesUpcastConverter( strategy ) );\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:ul', listPropertiesUpcastConverter( strategy ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Verify if the list view element (ul or ol) requires refreshing.\n\t\tlistEditing.on<ListEditingCheckAttributesEvent>(\n\t\t\t'checkAttributes:list',\n\t\t\t( evt, { viewElement, modelAttributes, modelReferenceElement } ) => {\n\t\t\t\tfor ( const strategy of strategies ) {\n\t\t\t\t\tif ( !strategy.appliesToListItem( modelReferenceElement ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( strategy.getAttributeOnUpcast( viewElement ) != modelAttributes[ strategy.attributeName ] ) {\n\t\t\t\t\t\tevt.return = true;\n\t\t\t\t\t\tevt.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\t// Reset list properties after indenting list items.\n\t\tthis.listenTo<ListIndentCommandAfterExecuteEvent>(\n\t\t\teditor.commands.get( 'indentList' )!,\n\t\t\t'afterExecute',\n\t\t\t( evt, changedBlocks ) => {\n\t\t\t\tmodel.change( writer => {\n\t\t\t\t\tfor ( const node of changedBlocks ) {\n\t\t\t\t\t\tfor ( const strategy of strategies ) {\n\t\t\t\t\t\t\tif ( strategy.appliesToListItem( node ) ) {\n\t\t\t\t\t\t\t\t// Just reset the attribute.\n\t\t\t\t\t\t\t\t// If there is a previous indented list that this node should be merged into,\n\t\t\t\t\t\t\t\t// the postfixer will unify all the attributes of both sub-lists.\n\t\t\t\t\t\t\t\twriter.setAttribute( strategy.attributeName, strategy.defaultValue, node );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t);\n\n\t\t// Add or remove list properties attributes depending on the list type.\n\t\tlistEditing.on<ListEditingPostFixerEvent>( 'postFixer', ( evt, { listNodes, writer } ) => {\n\t\t\tfor ( const { node } of listNodes ) {\n\t\t\t\tfor ( const strategy of strategies ) {\n\t\t\t\t\t// Check if attribute is valid.\n\t\t\t\t\tif ( strategy.hasValidAttribute( node ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add missing default property attributes...\n\t\t\t\t\tif ( strategy.appliesToListItem( node ) ) {\n\t\t\t\t\t\twriter.setAttribute( strategy.attributeName, strategy.defaultValue, node );\n\t\t\t\t\t}\n\t\t\t\t\t// ...or remove invalid property attributes.\n\t\t\t\t\telse {\n\t\t\t\t\t\twriter.removeAttribute( strategy.attributeName, node );\n\t\t\t\t\t}\n\n\t\t\t\t\tevt.return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Make sure that all items in a single list (items at the same level & listType) have the same properties.\n\t\tlistEditing.on<ListEditingPostFixerEvent>( 'postFixer', ( evt, { listNodes, writer } ) => {\n\t\t\tfor ( const { node, previousNodeInList } of listNodes ) {\n\t\t\t\t// This is a first item of a nested list.\n\t\t\t\tif ( !previousNodeInList ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// This is a first block of a list of a different type.\n\t\t\t\tif ( previousNodeInList.getAttribute( 'listType' ) != node.getAttribute( 'listType' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Copy properties from the previous one.\n\t\t\t\tfor ( const strategy of strategies ) {\n\t\t\t\t\tconst { attributeName } = strategy;\n\n\t\t\t\t\tif ( !strategy.appliesToListItem( node ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst value = previousNodeInList.getAttribute( attributeName );\n\n\t\t\t\t\tif ( node.getAttribute( attributeName ) != value ) {\n\t\t\t\t\t\twriter.setAttribute( attributeName, value, node );\n\t\t\t\t\t\tevt.return = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Strategy for dealing with `listItem` attributes supported by this plugin.\n *\n * @internal\n */\nexport interface AttributeStrategy {\n\n\t/**\n\t * The model attribute name.\n\t */\n\tattributeName: keyof ListItemAttributesMap;\n\n\t/**\n\t * The model attribute default value.\n\t */\n\tdefaultValue: unknown;\n\n\t/**\n\t * The view consumable as expected by {@link module:engine/conversion/viewconsumable~ViewConsumable#consume `ViewConsumable`}.\n\t */\n\tviewConsumables: Consumables;\n\n\t/**\n\t * Registers an editor command.\n\t */\n\taddCommand( editor: Editor ): void;\n\n\t/**\n\t * Verifies whether the strategy is applicable for the specified model element.\n\t */\n\tappliesToListItem( element: ModelItem ): boolean;\n\n\t/**\n\t * Verifies whether the model attribute value is valid.\n\t */\n\thasValidAttribute( element: ModelElement ): boolean;\n\n\t/**\n\t * Sets the property on the view element.\n\t */\n\tsetAttributeOnDowncast( writer: ViewDowncastWriter, value: unknown, element: ViewElement ): void;\n\n\t/**\n\t * Retrieves the property value from the view element.\n\t */\n\tgetAttributeOnUpcast( element: ViewElement ): unknown;\n}\n\n/**\n * Creates an array of strategies for dealing with enabled listItem attributes.\n */\nfunction createAttributeStrategies( enabledProperties: ListPropertiesConfig ) {\n\tconst strategies: Array<AttributeStrategy> = [];\n\tconst normalizedConfig = getNormalizedConfig( enabledProperties );\n\n\tif ( enabledProperties.styles ) {\n\t\tconst useAttribute = normalizedConfig.styles.useAttribute;\n\n\t\tstrategies.push( {\n\t\t\tattributeName: 'listStyle',\n\t\t\tdefaultValue: DEFAULT_LIST_TYPE,\n\t\t\tviewConsumables: { styles: 'list-style-type' },\n\n\t\t\taddCommand( editor ) {\n\t\t\t\tlet supportedTypes = getAllSupportedStyleTypes();\n\n\t\t\t\tif ( useAttribute ) {\n\t\t\t\t\tsupportedTypes = supportedTypes.filter( styleType => !!getTypeAttributeFromListStyleType( styleType ) );\n\t\t\t\t}\n\n\t\t\t\teditor.commands.add( 'listStyle', new ListStyleCommand( editor, DEFAULT_LIST_TYPE, supportedTypes ) );\n\t\t\t},\n\n\t\t\tappliesToListItem( item ) {\n\t\t\t\treturn item.getAttribute( 'listType' ) == 'numbered' || item.getAttribute( 'listType' ) == 'bulleted';\n\t\t\t},\n\n\t\t\thasValidAttribute( item ) {\n\t\t\t\tif ( !this.appliesToListItem( item ) ) {\n\t\t\t\t\treturn !item.hasAttribute( 'listStyle' );\n\t\t\t\t}\n\n\t\t\t\tif ( !item.hasAttribute( 'listStyle' ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst value = item.getAttribute( 'listStyle' );\n\n\t\t\t\tif ( value == DEFAULT_LIST_TYPE ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn getListTypeFromListStyleType( value as string ) == item.getAttribute( 'listType' );\n\t\t\t},\n\n\t\t\tsetAttributeOnDowncast( writer, listStyle, element ) {\n\t\t\t\tif ( listStyle && listStyle !== DEFAULT_LIST_TYPE ) {\n\t\t\t\t\tif ( useAttribute ) {\n\t\t\t\t\t\tconst value = getTypeAttributeFromListStyleType( listStyle as string );\n\n\t\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\t\twriter.setAttribute( 'type', value, element );\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.setStyle( 'list-style-type', listStyle as string, element );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twriter.removeStyle( 'list-style-type', element );\n\t\t\t\twriter.removeAttribute( 'type', element );\n\t\t\t},\n\n\t\t\tgetAttributeOnUpcast( listParent ) {\n\t\t\t\tconst style = listParent.getStyle( 'list-style-type' );\n\n\t\t\t\tif ( style ) {\n\t\t\t\t\treturn normalizeListStyle( style );\n\t\t\t\t}\n\n\t\t\t\tconst attribute = listParent.getAttribute( 'type' );\n\n\t\t\t\tif ( attribute ) {\n\t\t\t\t\treturn getListStyleTypeFromTypeAttribute( attribute );\n\t\t\t\t}\n\n\t\t\t\treturn DEFAULT_LIST_TYPE;\n\t\t\t}\n\t\t} );\n\t}\n\n\tif ( enabledProperties.reversed ) {\n\t\tstrategies.push( {\n\t\t\tattributeName: 'listReversed',\n\t\t\tdefaultValue: false,\n\t\t\tviewConsumables: { attributes: 'reversed' },\n\n\t\t\taddCommand( editor ) {\n\t\t\t\teditor.commands.add( 'listReversed', new ListReversedCommand( editor ) );\n\t\t\t},\n\n\t\t\tappliesToListItem( item ) {\n\t\t\t\treturn item.getAttribute( 'listType' ) == 'numbered';\n\t\t\t},\n\n\t\t\thasValidAttribute( item ) {\n\t\t\t\treturn this.appliesToListItem( item ) == item.hasAttribute( 'listReversed' );\n\t\t\t},\n\n\t\t\tsetAttributeOnDowncast( writer, listReversed, element ) {\n\t\t\t\tif ( listReversed ) {\n\t\t\t\t\twriter.setAttribute( 'reversed', 'reversed', element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'reversed', element );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetAttributeOnUpcast( listParent ) {\n\t\t\t\treturn listParent.hasAttribute( 'reversed' );\n\t\t\t}\n\t\t} );\n\t}\n\n\tif ( enabledProperties.startIndex ) {\n\t\tstrategies.push( {\n\t\t\tattributeName: 'listStart',\n\t\t\tdefaultValue: 1,\n\t\t\tviewConsumables: { attributes: 'start' },\n\n\t\t\taddCommand( editor ) {\n\t\t\t\teditor.commands.add( 'listStart', new ListStartCommand( editor ) );\n\t\t\t},\n\n\t\t\tappliesToListItem( item ) {\n\t\t\t\treturn isNumberedListType( item.getAttribute( 'listType' ) as ListType );\n\t\t\t},\n\n\t\t\thasValidAttribute( item ) {\n\t\t\t\treturn this.appliesToListItem( item ) == item.hasAttribute( 'listStart' );\n\t\t\t},\n\n\t\t\tsetAttributeOnDowncast( writer, listStart, element ) {\n\t\t\t\tif ( listStart == 0 || ( listStart as number ) > 1 ) {\n\t\t\t\t\twriter.setAttribute( 'start', listStart, element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'start', element );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetAttributeOnUpcast( listParent ) {\n\t\t\t\tconst startAttributeValue: any = listParent.getAttribute( 'start' );\n\n\t\t\t\treturn startAttributeValue >= 0 ? startAttributeValue : 1;\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn strategies;\n}\n\ndeclare module '../list/listediting' {\n\tinterface ListItemAttributesMap {\n\t\tlistStyle?: string;\n\t\tlistStart?: number;\n\t\tlistReversed?: boolean;\n\t}\n}\n\ndeclare module '../list/utils/model' {\n\tinterface ListElement {\n\t\tgetAttribute( key: 'listStyle' ): string;\n\t\tgetAttribute( key: 'listStart' ): number;\n\t\tgetAttribute( key: 'listReversed' ): boolean;\n\t}\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/**\n * @module list/listproperties/ui/listpropertiesview\n */\n\nimport {\n\tButtonView,\n\tView,\n\tViewCollection,\n\tFocusCycler,\n\tSwitchButtonView,\n\tLabeledFieldView,\n\tcreateLabeledInputNumber,\n\taddKeyboardHandlingForGrid,\n\tCollapsibleView,\n\ttype InputNumberView,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\n\nimport {\n\tFocusTracker,\n\tKeystrokeHandler,\n\tglobal,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { NormalizedListPropertiesConfig } from '../utils/config.js';\n\n/**\n * The list properties view to be displayed in the list dropdown.\n *\n * Contains a grid of available list styles and, for numbered list, also the list start index and reversed fields.\n *\n * @internal\n */\nexport class ListPropertiesView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public locale: Locale;\n\n\t/**\n\t * A collection of the child views.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A view that renders the grid of list styles.\n\t */\n\tpublic readonly stylesView: StylesView | null = null;\n\n\t/**\n\t * A collapsible view that hosts additional list property fields ({@link #startIndexFieldView} and\n\t * {@link #reversedSwitchButtonView}) to visually separate them from the {@link #stylesView grid of styles}.\n\t *\n\t * **Note**: Only present when:\n\t * * the view represents **numbered** list properties,\n\t * * and the {@link #stylesView} is rendered,\n\t * * and either {@link #startIndexFieldView} or {@link #reversedSwitchButtonView} is rendered.\n\t *\n\t * @readonly\n\t */\n\tpublic additionalPropertiesCollapsibleView: CollapsibleView | null = null;\n\n\t/**\n\t * A labeled number field allowing the user to set the start index of the list.\n\t *\n\t * **Note**: Only present when the view represents **numbered** list properties.\n\t *\n\t * @readonly\n\t */\n\tpublic startIndexFieldView: LabeledFieldView<InputNumberView> | null = null;\n\n\t/**\n\t * A switch button allowing the user to make the edited list reversed.\n\t *\n\t * **Note**: Only present when the view represents **numbered** list properties.\n\t *\n\t * @readonly\n\t */\n\tpublic reversedSwitchButtonView: SwitchButtonView | null = null;\n\n\t/**\n\t * Tracks information about the DOM focus in the view.\n\t */\n\tpublic readonly focusTracker: FocusTracker = new FocusTracker();\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler = new KeystrokeHandler();\n\n\t/**\n\t * A collection of views that can be focused in the properties view.\n\t */\n\tpublic readonly focusables: ViewCollection<FocusableView> = new ViewCollection<FocusableView>();\n\n\t/**\n\t * Helps cycling over {@link #focusables} in the view.\n\t */\n\tpublic readonly focusCycler: FocusCycler;\n\n\t/**\n\t * Creates an instance of the list properties view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options Options of the view.\n\t * @param options.enabledProperties An object containing the configuration of enabled list property names.\n\t * Allows conditional rendering the sub-components of the properties view.\n\t * @param options.styleButtonViews A list of style buttons to be rendered\n\t * inside the styles grid. The grid will not be rendered when `enabledProperties` does not include the `'styles'` key.\n\t * @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).\n\t */\n\tconstructor(\n\t\tlocale: Locale,\n\t\t{ enabledProperties, styleButtonViews, styleGridAriaLabel }: {\n\t\t\tenabledProperties: NormalizedListPropertiesConfig;\n\t\t\tstyleButtonViews: Array<ButtonView> | null;\n\t\t\tstyleGridAriaLabel: string;\n\t\t}\n\t) {\n\t\tsuper( locale );\n\n\t\tconst elementCssClasses = [\n\t\t\t'ck',\n\t\t\t'ck-list-properties'\n\t\t];\n\n\t\tthis.children = this.createCollection();\n\n\t\tthis.focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate #children backwards using the <kbd>Shift</kbd> + <kbd>Tab</kbd> keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate #children forwards using the <kbd>Tab</kbd> key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\t// The rendering of the styles grid is conditional. When there is no styles grid, the view will render without collapsible\n\t\t// for numbered list properties, hence simplifying the layout.\n\t\tif ( styleButtonViews && styleButtonViews.length ) {\n\t\t\tthis.stylesView = this._createStylesView( styleButtonViews!, styleGridAriaLabel );\n\t\t\tthis.children.add( this.stylesView );\n\t\t} else {\n\t\t\telementCssClasses.push( 'ck-list-properties_without-styles' );\n\t\t}\n\n\t\t// The rendering of the numbered list property views is also conditional. It only makes sense for the numbered list\n\t\t// dropdown. The unordered list does not have such properties.\n\t\tif ( enabledProperties.startIndex || enabledProperties.reversed ) {\n\t\t\tthis._addNumberedListPropertyViews( enabledProperties );\n\n\t\t\telementCssClasses.push( 'ck-list-properties_with-numbered-properties' );\n\t\t}\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: elementCssClasses\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tif ( this.stylesView ) {\n\t\t\tthis.focusables.add( this.stylesView );\n\t\t\tthis.focusTracker.add( this.stylesView.element! );\n\n\t\t\t// Register the collapsible toggle button to the focus system.\n\t\t\tif ( this.startIndexFieldView || this.reversedSwitchButtonView ) {\n\t\t\t\tthis.focusables.add( ( this.children.last as any ).buttonView );\n\t\t\t\tthis.focusTracker.add( ( this.children.last as any ).buttonView.element );\n\t\t\t}\n\n\t\t\tfor ( const item of this.stylesView.children ) {\n\t\t\t\tthis.stylesView.focusTracker.add( item.element! );\n\t\t\t}\n\n\t\t\taddKeyboardHandlingForGrid( {\n\t\t\t\tkeystrokeHandler: this.stylesView.keystrokes,\n\t\t\t\tfocusTracker: this.stylesView.focusTracker,\n\t\t\t\tgridItems: this.stylesView.children,\n\t\t\t\t// Note: The styles view has a different number of columns depending on whether the other properties\n\t\t\t\t// are enabled in the dropdown or not (https://github.com/ckeditor/ckeditor5/issues/12340)\n\t\t\t\tnumberOfColumns: () => global.window\n\t\t\t\t\t.getComputedStyle( this.stylesView!.element! )\n\t\t\t\t\t.getPropertyValue( 'grid-template-columns' )\n\t\t\t\t\t.split( ' ' )\n\t\t\t\t\t.length,\n\t\t\t\tuiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.startIndexFieldView ) {\n\t\t\tthis.focusables.add( this.startIndexFieldView );\n\t\t\tthis.focusTracker.add( this.startIndexFieldView.element! );\n\n\t\t\tconst stopPropagation = ( data: Event ) => data.stopPropagation();\n\n\t\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t\t// keystroke handler would take over the key management in the input. We need to prevent\n\t\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t\t}\n\n\t\tif ( this.reversedSwitchButtonView ) {\n\t\t\tthis.focusables.add( this.reversedSwitchButtonView );\n\t\t\tthis.focusTracker.add( this.reversedSwitchButtonView.element! );\n\t\t}\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus(): void {\n\t\tthis.focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focusLast(): void {\n\t\tthis.focusCycler.focusLast();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Creates the list styles grid.\n\t *\n\t * @param styleButtons Buttons to be placed in the grid.\n\t * @param styleGridAriaLabel The assistive technology label of the grid.\n\t */\n\tprivate _createStylesView( styleButtons: Array<ButtonView>, styleGridAriaLabel: string ) {\n\t\tconst stylesView = new View( this.locale ) as StylesView;\n\n\t\tstylesView.children = stylesView.createCollection();\n\t\tstylesView.children.addMany( styleButtons );\n\n\t\tstylesView.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\t'aria-label': styleGridAriaLabel,\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-list-styles-list'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: stylesView.children\n\t\t} );\n\n\t\tstylesView.children.delegate( 'execute' ).to( this );\n\n\t\tstylesView.focus = function( this: any ) {\n\t\t\t// If there is a button that is already on, focus it.\n\t\t\t// It's counterintuitive to focus the first button when there is already a button on.\n\t\t\tfor ( const child of this.children ) {\n\t\t\t\tif ( child instanceof ButtonView && child.isOn ) {\n\t\t\t\t\tchild.focus();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ... otherwise focus the first button.\n\t\t\tthis.children.first.focus();\n\t\t};\n\n\t\tstylesView.focusTracker = new FocusTracker();\n\t\tstylesView.keystrokes = new KeystrokeHandler();\n\n\t\tstylesView.render();\n\n\t\tstylesView.keystrokes.listenTo( stylesView.element! );\n\n\t\treturn stylesView;\n\t}\n\n\t/**\n\t * Renders {@link #startIndexFieldView} and/or {@link #reversedSwitchButtonView} depending on the configuration of the properties view.\n\t *\n\t * @param enabledProperties An object containing the configuration of enabled list property names\n\t * (see {@link #constructor}).\n\t */\n\tprivate _addNumberedListPropertyViews( enabledProperties: NormalizedListPropertiesConfig ) {\n\t\tconst t = this.locale.t;\n\t\tconst numberedPropertyViews = [];\n\n\t\tif ( enabledProperties.startIndex ) {\n\t\t\tthis.startIndexFieldView = this._createStartIndexField();\n\t\t\tnumberedPropertyViews.push( this.startIndexFieldView );\n\t\t}\n\n\t\tif ( enabledProperties.reversed ) {\n\t\t\tthis.reversedSwitchButtonView = this._createReversedSwitchButton();\n\t\t\tnumberedPropertyViews.push( this.reversedSwitchButtonView );\n\t\t}\n\n\t\t// When there are some style buttons, pack the numbered list properties into a collapsible to separate them.\n\t\tif ( this.stylesView ) {\n\t\t\tthis.additionalPropertiesCollapsibleView = new CollapsibleView( this.locale, numberedPropertyViews );\n\n\t\t\tthis.additionalPropertiesCollapsibleView.set( {\n\t\t\t\tlabel: t( 'List properties' ),\n\t\t\t\tisCollapsed: true\n\t\t\t} );\n\n\t\t\t// Don't enable the collapsible view unless either start index or reversed field is enabled (e.g. when no list is selected).\n\t\t\tthis.additionalPropertiesCollapsibleView.buttonView.bind( 'isEnabled' ).toMany(\n\t\t\t\tnumberedPropertyViews, 'isEnabled', ( ...areEnabled ) => areEnabled.some( isEnabled => isEnabled ) );\n\n\t\t\t// Automatically collapse the additional properties collapsible when either start index or reversed field gets disabled.\n\t\t\tthis.additionalPropertiesCollapsibleView.buttonView.on( 'change:isEnabled', ( evt, data, isEnabled ) => {\n\t\t\t\tif ( !isEnabled ) {\n\t\t\t\t\tthis.additionalPropertiesCollapsibleView!.isCollapsed = true;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tthis.children.add( this.additionalPropertiesCollapsibleView );\n\t\t} else {\n\t\t\tthis.children.addMany( numberedPropertyViews );\n\t\t}\n\t}\n\n\t/**\n\t * Creates the list start index labeled field.\n\t */\n\tprivate _createStartIndexField() {\n\t\tconst t = this.locale.t;\n\t\tconst startIndexFieldView = new LabeledFieldView( this.locale, createLabeledInputNumber );\n\n\t\tstartIndexFieldView.set( {\n\t\t\tlabel: t( 'Start at' ),\n\t\t\tclass: 'ck-numbered-list-properties__start-index'\n\t\t} );\n\n\t\tstartIndexFieldView.fieldView.set( {\n\t\t\tmin: 0,\n\t\t\tstep: 1,\n\t\t\tvalue: 1,\n\t\t\tinputMode: 'numeric'\n\t\t} );\n\n\t\tstartIndexFieldView.fieldView.on( 'input', () => {\n\t\t\tconst inputElement = startIndexFieldView.fieldView.element!;\n\t\t\tconst startIndex = inputElement.valueAsNumber;\n\n\t\t\tif ( Number.isNaN( startIndex ) ) {\n\t\t\t\t// Number inputs allow for the entry of characters that may result in NaN,\n\t\t\t\t// such as 'e', '+', '123e', '2-'.\n\t\t\t\tstartIndexFieldView.errorText = t( 'Invalid start index value.' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !inputElement.checkValidity() ) {\n\t\t\t\tstartIndexFieldView.errorText = t( 'Start index must be greater than 0.' );\n\t\t\t} else {\n\t\t\t\tthis.fire<ListPropertiesViewListStartEvent>( 'listStart', { startIndex } );\n\t\t\t}\n\t\t} );\n\n\t\treturn startIndexFieldView;\n\t}\n\n\t/**\n\t * Creates the reversed list switch button.\n\t */\n\tprivate _createReversedSwitchButton() {\n\t\tconst t = this.locale.t;\n\t\tconst reversedButtonView = new SwitchButtonView( this.locale );\n\n\t\treversedButtonView.set( {\n\t\t\twithText: true,\n\t\t\tlabel: t( 'Reversed order' ),\n\t\t\tclass: 'ck-numbered-list-properties__reversed-order'\n\t\t} );\n\n\t\treversedButtonView.delegate( 'execute' ).to( this, 'listReversed' );\n\n\t\treturn reversedButtonView;\n\t}\n}\n\n/**\n * The view that renders the grid of styles.\n *\n * @internal\n */\nexport type StylesView = View & {\n\tchildren: ViewCollection;\n\tfocusTracker: FocusTracker;\n\tkeystrokes: KeystrokeHandler;\n\tfocus(): void;\n};\n\n/**\n * Fired when the list start index value has changed via {@link ~ListPropertiesView#startIndexFieldView}.\n *\n * @eventName ~ListPropertiesView#listStart\n */\nexport type ListPropertiesViewListStartEvent = {\n\tname: 'listStart';\n\targs: [ data: { startIndex: number } ];\n};\n\n/**\n * Fired when the list order has changed (reversed) via {@link ~ListPropertiesView#reversedSwitchButtonView}.\n *\n * @eventName ~ListPropertiesView#listReversed\n */\nexport type ListPropertiesViewListReversedEvent = {\n\tname: 'listReversed';\n\targs: [];\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/**\n * @module list/listproperties/listpropertiesui\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport {\n\tIconBulletedList,\n\tIconNumberedList,\n\tIconListStyleCircle,\n\tIconListStyleDecimal,\n\tIconListStyleDecimalLeadingZero,\n\tIconListStyleDisc,\n\tIconListStyleLowerLatin,\n\tIconListStyleLowerRoman,\n\tIconListStyleSquare,\n\tIconListStyleUpperLatin,\n\tIconListStyleUpperRoman,\n\tIconListStyleArabicIndic\n} from '@ckeditor/ckeditor5-icons';\nimport {\n\tButtonView,\n\tSplitButtonView,\n\tcreateDropdown,\n\tfocusChildOnDropdownOpen,\n\tMenuBarMenuView,\n\ttype DropdownView\n} from '@ckeditor/ckeditor5-ui';\n\nimport type { Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { ListPropertiesView } from './ui/listpropertiesview.js';\n\nimport { type LegacyListStyleCommand } from '../legacylistproperties/legacyliststylecommand.js';\nimport { type ListStyleCommand } from '../listproperties/liststylecommand.js';\nimport { type LegacyListStartCommand } from '../legacylistproperties/legacyliststartcommand.js';\nimport { type ListStartCommand } from '../listproperties/liststartcommand.js';\nimport { type LegacyListReversedCommand } from '../legacylistproperties/legacylistreversedcommand.js';\nimport { type ListReversedCommand } from '../listproperties/listreversedcommand.js';\n\nimport { getNormalizedConfig, type NormalizedListPropertiesConfig } from './utils/config.js';\nimport { type ListPropertiesStyleListType } from '../listconfig.js';\n\n/**\n * The list properties UI plugin. It introduces the extended `'bulletedList'` and `'numberedList'` toolbar\n * buttons that allow users to control such aspects of list as the marker, start index or order.\n *\n * **Note**: Buttons introduced by this plugin override implementations from the {@link module:list/list/listui~ListUI}\n * (because they share the same names).\n */\nexport class ListPropertiesUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListPropertiesUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\tconst propertiesConfig = editor.config.get( 'list.properties' )!;\n\t\tconst normalizedConfig = getNormalizedConfig( propertiesConfig );\n\t\tconst stylesListTypes = normalizedConfig.styles.listTypes;\n\n\t\t// Note: When this plugin does not register the \"bulletedList\" dropdown due to properties configuration,\n\t\t// a simple button will be still registered under the same name by ListUI as a fallback. This should happen\n\t\t// in most editor configuration because the List plugin automatically requires ListUI.\n\t\tif ( stylesListTypes.includes( 'bulleted' ) ) {\n\t\t\tconst styleDefinitions = [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the disc list style' ),\n\t\t\t\t\ttooltip: t( 'Disc' ),\n\t\t\t\t\ttype: 'disc',\n\t\t\t\t\ticon: IconListStyleDisc\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the circle list style' ),\n\t\t\t\t\ttooltip: t( 'Circle' ),\n\t\t\t\t\ttype: 'circle',\n\t\t\t\t\ticon: IconListStyleCircle\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the square list style' ),\n\t\t\t\t\ttooltip: t( 'Square' ),\n\t\t\t\t\ttype: 'square',\n\t\t\t\t\ticon: IconListStyleSquare\n\t\t\t\t}\n\t\t\t];\n\t\t\tconst buttonLabel = t( 'Bulleted List' );\n\t\t\tconst styleGridAriaLabel = t( 'Bulleted list styles toolbar' );\n\t\t\tconst commandName = 'bulletedList';\n\n\t\t\teditor.ui.componentFactory.add( commandName, getDropdownViewCreator( {\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tparentCommandName: commandName,\n\t\t\t\tbuttonLabel,\n\t\t\t\tbuttonIcon: IconBulletedList,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t} ) );\n\n\t\t\t// Add the menu bar item for bulleted list.\n\t\t\teditor.ui.componentFactory.add( `menuBar:${ commandName }`, getMenuBarStylesMenuCreator( {\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tparentCommandName: commandName,\n\t\t\t\tbuttonLabel,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t} ) );\n\t\t}\n\n\t\t// Note: When this plugin does not register the \"numberedList\" dropdown due to properties configuration,\n\t\t// a simple button will be still registered under the same name by ListUI as a fallback. This should happen\n\t\t// in most editor configuration because the List plugin automatically requires ListUI.\n\t\tif ( stylesListTypes.includes( 'numbered' ) || propertiesConfig.startIndex || propertiesConfig.reversed ) {\n\t\t\tconst styleDefinitions = [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the decimal list style' ),\n\t\t\t\t\ttooltip: t( 'Decimal' ),\n\t\t\t\t\ttype: 'decimal',\n\t\t\t\t\ticon: IconListStyleDecimal\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the decimal with leading zero list style' ),\n\t\t\t\t\ttooltip: t( 'Decimal with leading zero' ),\n\t\t\t\t\ttype: 'decimal-leading-zero',\n\t\t\t\t\ticon: IconListStyleDecimalLeadingZero\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the lower–roman list style' ),\n\t\t\t\t\ttooltip: t( 'Lower–roman' ),\n\t\t\t\t\ttype: 'lower-roman',\n\t\t\t\t\ticon: IconListStyleLowerRoman\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the upper–roman list style' ),\n\t\t\t\t\ttooltip: t( 'Upper-roman' ),\n\t\t\t\t\ttype: 'upper-roman',\n\t\t\t\t\ticon: IconListStyleUpperRoman\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the lower–latin list style' ),\n\t\t\t\t\ttooltip: t( 'Lower-latin' ),\n\t\t\t\t\ttype: 'lower-latin',\n\t\t\t\t\ticon: IconListStyleLowerLatin\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the upper–latin list style' ),\n\t\t\t\t\ttooltip: t( 'Upper-latin' ),\n\t\t\t\t\ttype: 'upper-latin',\n\t\t\t\t\ticon: IconListStyleUpperLatin\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Toggle the arabic-indic list style' ),\n\t\t\t\t\ttooltip: t( 'Arabic-indic' ),\n\t\t\t\t\ttype: 'arabic-indic',\n\t\t\t\t\ticon: IconListStyleArabicIndic\n\t\t\t\t}\n\t\t\t];\n\t\t\tconst buttonLabel = t( 'Numbered List' );\n\t\t\tconst styleGridAriaLabel = t( 'Numbered list styles toolbar' );\n\t\t\tconst commandName = 'numberedList';\n\n\t\t\teditor.ui.componentFactory.add( commandName, getDropdownViewCreator( {\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tparentCommandName: commandName,\n\t\t\t\tbuttonLabel,\n\t\t\t\tbuttonIcon: IconNumberedList,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t} ) );\n\n\t\t\t// Menu bar menu does not display list start index or reverse UI. If there are no styles enabled,\n\t\t\t// the menu makes no sense and should be omitted.\n\t\t\tif ( stylesListTypes.includes( 'numbered' ) ) {\n\t\t\t\teditor.ui.componentFactory.add( `menuBar:${ commandName }`, getMenuBarStylesMenuCreator( {\n\t\t\t\t\teditor,\n\t\t\t\t\tnormalizedConfig,\n\t\t\t\t\tparentCommandName: commandName,\n\t\t\t\t\tbuttonLabel,\n\t\t\t\t\tstyleGridAriaLabel,\n\t\t\t\t\tstyleDefinitions\n\t\t\t\t} ) );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * A helper that returns a function that creates a split button with a toolbar in the dropdown,\n * which in turn contains buttons allowing users to change list styles in the context of the current selection.\n *\n * @param options.editor\n * @param options.normalizedConfig List properties configuration.\n * @param options.parentCommandName The name of the higher-order editor command associated with\n * the set of particular list styles (e.g. \"bulletedList\" for \"disc\", \"circle\", and \"square\" styles).\n * @param options.buttonLabel Label of the main part of the split button.\n * @param options.buttonIcon The SVG string of an icon for the main part of the split button.\n * @param options.styleGridAriaLabel The ARIA label for the styles grid in the split button dropdown.\n * @param options.styleDefinitions Definitions of the style buttons.\n * @returns A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.\n */\nfunction getDropdownViewCreator( {\n\teditor,\n\tnormalizedConfig,\n\tparentCommandName,\n\tbuttonLabel,\n\tbuttonIcon,\n\tstyleGridAriaLabel,\n\tstyleDefinitions\n}: {\n\teditor: Editor;\n\tnormalizedConfig: Readonly<NormalizedListPropertiesConfig>;\n\tparentCommandName: string;\n\tbuttonLabel: string;\n\tbuttonIcon: string;\n\tstyleGridAriaLabel: string;\n\tstyleDefinitions: Array<StyleDefinition>;\n} ) {\n\tconst parentCommand = editor.commands.get( parentCommandName )!;\n\n\treturn ( locale: Locale ) => {\n\t\tconst dropdownView = createDropdown( locale, SplitButtonView );\n\t\tconst mainButtonView = dropdownView.buttonView;\n\n\t\tdropdownView.bind( 'isEnabled' ).to( parentCommand );\n\t\tdropdownView.class = 'ck-list-styles-dropdown';\n\n\t\t// Main button was clicked.\n\t\tmainButtonView.on( 'execute', () => {\n\t\t\teditor.execute( parentCommandName );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\tmainButtonView.set( {\n\t\t\tlabel: buttonLabel,\n\t\t\ticon: buttonIcon,\n\t\t\ttooltip: true,\n\t\t\tisToggleable: true\n\t\t} );\n\n\t\tmainButtonView.bind( 'isOn' ).to( parentCommand, 'value', value => !!value );\n\n\t\tdropdownView.once( 'change:isOpen', () => {\n\t\t\tconst listPropertiesView = createListPropertiesView( {\n\t\t\t\teditor,\n\t\t\t\tnormalizedConfig,\n\t\t\t\tdropdownView,\n\t\t\t\tparentCommandName,\n\t\t\t\tstyleGridAriaLabel,\n\t\t\t\tstyleDefinitions\n\t\t\t} );\n\n\t\t\tdropdownView.panelView.children.add( listPropertiesView );\n\t\t} );\n\n\t\t// Focus the editable after executing the command.\n\t\t// Overrides a default behaviour where the focus is moved to the dropdown button.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/12125.\n\t\tdropdownView.on( 'execute', () => {\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn dropdownView;\n\t};\n}\n\n/**\n * A helper that returns a function (factory) that creates individual buttons used by users to change styles\n * of lists.\n *\n * @param options.editor\n * @param options.listStyleCommand The instance of the `ListStylesCommand` class.\n * @param options.parentCommandName The name of the higher-order command associated with a\n * particular list style (e.g. \"bulletedList\" is associated with \"square\" and \"numberedList\" is associated with \"roman\").\n * @returns A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.\n */\nfunction getStyleButtonCreator( {\n\teditor,\n\tlistStyleCommand,\n\tparentCommandName\n}: {\n\teditor: Editor;\n\tlistStyleCommand: LegacyListStyleCommand | ListStyleCommand;\n\tparentCommandName: string;\n} ) {\n\tconst locale = editor.locale;\n\tconst parentCommand = editor.commands.get( parentCommandName )!;\n\n\treturn ( { label, type, icon, tooltip }: StyleDefinition ) => {\n\t\tconst button = new ButtonView( locale );\n\n\t\tbutton.set( { label, icon, tooltip } );\n\n\t\tbutton.bind( 'isOn' ).to( listStyleCommand, 'value', value => value === type );\n\n\t\tbutton.on( 'execute', () => {\n\t\t\t// If the content the selection is anchored to is a list, let's change its style.\n\t\t\tif ( parentCommand.value ) {\n\t\t\t\t// Remove the list when the current list style is the same as the one that would normally be applied.\n\t\t\t\tif ( listStyleCommand.value === type ) {\n\t\t\t\t\teditor.execute( parentCommandName );\n\t\t\t\t}\n\t\t\t\t// If the current list style is not set in the model or the style is different than the\n\t\t\t\t// one to be applied, simply apply the new style.\n\t\t\t\telse {\n\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\tif ( listStyleCommand.value !== type ) {\n\t\t\t\t\t\teditor.execute( 'listStyle', { type } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Otherwise, leave the creation of the styled list to the `ListStyleCommand`.\n\t\t\telse {\n\t\t\t\teditor.model.change( () => {\n\t\t\t\t\teditor.execute( 'listStyle', { type } );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn button;\n\t};\n}\n\n/**\n * A helper that creates the properties view for the individual style dropdown.\n *\n * @param options.editor Editor instance.\n * @param options.normalizedConfig List properties configuration.\n * @param options.dropdownView Styles dropdown view that hosts the properties view.\n * @param options.parentCommandName The name of the higher-order editor command associated with\n * the set of particular list styles (e.g. \"bulletedList\" for \"disc\", \"circle\", and \"square\" styles).\n * @param options.styleDefinitions Definitions of the style buttons.\n * @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).\n */\nfunction createListPropertiesView( {\n\teditor,\n\tnormalizedConfig,\n\tdropdownView,\n\tparentCommandName,\n\tstyleDefinitions,\n\tstyleGridAriaLabel\n}: {\n\teditor: Editor;\n\tnormalizedConfig: Readonly<NormalizedListPropertiesConfig>;\n\tdropdownView: DropdownView;\n\tparentCommandName: string;\n\tstyleDefinitions: Array<StyleDefinition>;\n\tstyleGridAriaLabel: string;\n} ) {\n\tconst locale = editor.locale;\n\tconst enabledProperties = {\n\t\t...normalizedConfig,\n\n\t\t...( parentCommandName != 'numberedList' ? {\n\t\t\tstartIndex: false,\n\t\t\treversed: false\n\t\t} : null )\n\t};\n\tconst listType = parentCommandName.replace( 'List', '' ) as ListPropertiesStyleListType;\n\n\tlet styleButtonViews = null;\n\n\tif ( normalizedConfig.styles.listTypes.includes( listType ) ) {\n\t\tconst listStyleCommand: LegacyListStyleCommand | ListStyleCommand = editor.commands.get( 'listStyle' )!;\n\t\tconst styleButtonCreator = getStyleButtonCreator( {\n\t\t\teditor,\n\t\t\tparentCommandName,\n\t\t\tlistStyleCommand\n\t\t} );\n\n\t\tconst configuredListStylesTypes = normalizedConfig.styles.listStyleTypes;\n\t\tlet filteredDefinitions = styleDefinitions;\n\n\t\t/* v8 ignore next -- Normalized config always provides listStyleTypes for enabled styles. */\n\t\tif ( configuredListStylesTypes ) {\n\t\t\tconst allowedTypes = configuredListStylesTypes[ listType ];\n\n\t\t\tif ( allowedTypes ) {\n\t\t\t\tfilteredDefinitions = styleDefinitions.filter( def => allowedTypes.includes( def.type ) );\n\t\t\t}\n\t\t}\n\n\t\tconst isStyleTypeSupported = getStyleTypeSupportChecker( listStyleCommand );\n\t\tstyleButtonViews = filteredDefinitions\n\t\t\t.filter( isStyleTypeSupported )\n\t\t\t.map( styleButtonCreator );\n\t}\n\n\tconst listPropertiesView = new ListPropertiesView( locale, {\n\t\tstyleGridAriaLabel,\n\t\tenabledProperties,\n\t\tstyleButtonViews\n\t} );\n\n\tif ( normalizedConfig.styles.listTypes.includes( listType ) ) {\n\t\t// Accessibility: focus the first active style when opening the dropdown.\n\t\tfocusChildOnDropdownOpen( dropdownView, () => {\n\t\t\treturn listPropertiesView.stylesView!.children.find( ( child: any ) => child.isOn );\n\t\t} );\n\t}\n\n\tif ( enabledProperties.startIndex ) {\n\t\tconst listStartCommand: LegacyListStartCommand | ListStartCommand = editor.commands.get( 'listStart' )!;\n\n\t\tlistPropertiesView.startIndexFieldView!.bind( 'isEnabled' ).to( listStartCommand );\n\t\tlistPropertiesView.startIndexFieldView!.fieldView.bind( 'value' ).to( listStartCommand as any );\n\t\tlistPropertiesView.on( 'listStart', ( evt, data ) => editor.execute( 'listStart', data ) );\n\t}\n\n\tif ( enabledProperties.reversed ) {\n\t\tconst listReversedCommand: LegacyListReversedCommand | ListReversedCommand = editor.commands.get( 'listReversed' )!;\n\n\t\tlistPropertiesView.reversedSwitchButtonView!.bind( 'isEnabled' ).to( listReversedCommand );\n\t\tlistPropertiesView.reversedSwitchButtonView!.bind( 'isOn' ).to( listReversedCommand, 'value', value => !!value );\n\t\tlistPropertiesView.on( 'listReversed', () => {\n\t\t\tconst isReversed = listReversedCommand.value;\n\n\t\t\teditor.execute( 'listReversed', { reversed: !isReversed } );\n\t\t} );\n\t}\n\n\t// Make sure applying styles closes the dropdown.\n\tlistPropertiesView.delegate( 'execute' ).to( dropdownView );\n\n\treturn listPropertiesView;\n}\n\n/**\n * A helper that creates the list style submenu for menu bar.\n *\n * @param editor Editor instance.\n * @param normalizedConfig List properties configuration.\n * @param parentCommandName Name of the list command.\n * @param buttonLabel Label of the menu button.\n * @param styleGridAriaLabel ARIA label of the styles grid.\n */\nfunction getMenuBarStylesMenuCreator(\n\t{\n\t\teditor,\n\t\tnormalizedConfig,\n\t\tparentCommandName,\n\t\tbuttonLabel,\n\t\tstyleGridAriaLabel,\n\t\tstyleDefinitions\n\t}: {\n\t\teditor: Editor;\n\t\tnormalizedConfig: Readonly<NormalizedListPropertiesConfig>;\n\t\tparentCommandName: 'bulletedList' | 'numberedList';\n\t\tbuttonLabel: string;\n\t\tstyleGridAriaLabel: string;\n\t\tstyleDefinitions: Array<StyleDefinition>;\n\t}\n) {\n\treturn ( locale: Locale ) => {\n\t\tconst menuView = new MenuBarMenuView( locale );\n\t\tconst listCommand = editor.commands.get( parentCommandName )!;\n\t\tconst listStyleCommand = editor.commands.get( 'listStyle' )!;\n\t\tconst isStyleTypeSupported = getStyleTypeSupportChecker( listStyleCommand );\n\t\tconst styleButtonCreator = getStyleButtonCreator( {\n\t\t\teditor,\n\t\t\tparentCommandName,\n\t\t\tlistStyleCommand\n\t\t} );\n\n\t\tconst configuredListStylesTypes = normalizedConfig.styles.listStyleTypes;\n\t\tlet filteredDefinitions = styleDefinitions;\n\n\t\t/* v8 ignore next -- Normalized config always provides listStyleTypes for enabled styles. */\n\t\tif ( configuredListStylesTypes ) {\n\t\t\tconst listType = listCommand.type as 'numbered' | 'bulleted';\n\t\t\tconst allowedTypes = configuredListStylesTypes[ listType ];\n\n\t\t\tif ( allowedTypes ) {\n\t\t\t\tfilteredDefinitions = styleDefinitions.filter( def => allowedTypes.includes( def.type ) );\n\t\t\t}\n\t\t}\n\n\t\tconst styleButtonViews = filteredDefinitions.filter( isStyleTypeSupported ).map( styleButtonCreator );\n\t\tconst listPropertiesView = new ListPropertiesView( locale, {\n\t\t\tstyleGridAriaLabel,\n\t\t\tenabledProperties: {\n\t\t\t\t...normalizedConfig,\n\n\t\t\t\t// Disable list start index and reversed in the menu bar.\n\t\t\t\tstartIndex: false,\n\t\t\t\treversed: false\n\t\t\t},\n\t\t\tstyleButtonViews\n\t\t} );\n\n\t\tlistPropertiesView.delegate( 'execute' ).to( menuView );\n\n\t\tmenuView.buttonView.set( {\n\t\t\tlabel: buttonLabel,\n\t\t\ticon: parentCommandName === 'bulletedList' ? IconBulletedList : IconNumberedList\n\t\t} );\n\t\tmenuView.panelView.children.add( listPropertiesView );\n\t\tmenuView.bind( 'isEnabled' ).to( listCommand, 'isEnabled' );\n\t\tmenuView.on( 'execute', () => {\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn menuView;\n\t};\n}\n\nfunction getStyleTypeSupportChecker( listStyleCommand: LegacyListStyleCommand | ListStyleCommand ) {\n\tif ( typeof listStyleCommand.isStyleTypeSupported == 'function' ) {\n\t\treturn ( styleDefinition: StyleDefinition ) => listStyleCommand.isStyleTypeSupported( styleDefinition.type );\n\t} else {\n\t\treturn () => true;\n\t}\n}\n\ninterface StyleDefinition {\n\n\t/**\n\t * The label of the style button.\n\t */\n\tlabel: string;\n\n\t/**\n\t * The type of the style button (e.g. \"roman\" or \"circle\").\n\t */\n\ttype: string;\n\n\t/**\n\t * The SVG string of an icon of the style button.\n\t */\n\ticon: string;\n\n\t/**\n\t * The tooltip text of the button (shorter than verbose label).\n\t */\n\ttooltip: string;\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/**\n * @module list/listproperties\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ListPropertiesEditing } from './listproperties/listpropertiesediting.js';\nimport { ListPropertiesUI } from './listproperties/listpropertiesui.js';\n\n/**\n * The list properties feature.\n *\n * This is a \"glue\" plugin that loads the\n * {@link module:list/listproperties/listpropertiesediting~ListPropertiesEditing list properties\n * editing feature} and the {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.\n */\nexport class ListProperties extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListPropertiesEditing, ListPropertiesUI ]> {\n\t\treturn [ ListPropertiesEditing, ListPropertiesUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'ListProperties' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module list/todolist/checktodolistcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { getAllListItemBlocks } from '../list/utils/model.js';\n\n/**\n * The check to-do command.\n *\n * The command is registered by the {@link module:list/todolist/todolistediting~TodoListEditing} as\n * the `checkTodoList` editor command.\n */\nexport class CheckTodoListCommand extends Command {\n\t/**\n\t * A list of to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Refresh command before executing to be sure all values are up to date.\n\t\t// It is needed when selection has changed before command execution, in the same change block.\n\t\tthis.on( 'execute', () => {\n\t\t\tthis.refresh();\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Updates the command's {@link #value} and {@link #isEnabled} properties based on the current selection.\n\t */\n\tpublic override refresh(): void {\n\t\tconst selectedElements = this._getSelectedItems();\n\n\t\tthis.value = this._getValue( selectedElements );\n\t\tthis.isEnabled = !!selectedElements.length;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply\n\t * the attribute. Otherwise, the command will remove the attribute. If not set, the command will look for its current\n\t * value to decide what it should do.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tthis.editor.model.change( writer => {\n\t\t\tconst selectedElements = this._getSelectedItems();\n\t\t\tconst value = ( options.forceValue === undefined ) ? !this._getValue( selectedElements ) : options.forceValue;\n\n\t\t\tfor ( const element of selectedElements ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.setAttribute( 'todoListChecked', true, element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'todoListChecked', element );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns a value for the command.\n\t */\n\tprivate _getValue( selectedElements: Array<ModelElement> ): boolean {\n\t\treturn selectedElements.every( element => element.getAttribute( 'todoListChecked' ) );\n\t}\n\n\t/**\n\t * Gets all to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t */\n\tprivate _getSelectedItems() {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\n\t\tconst selectionRange = model.document.selection.getFirstRange()!;\n\t\tconst startElement = selectionRange.start.parent as ModelElement;\n\t\tconst elements: Array<ModelElement> = [];\n\n\t\tif ( schema.checkAttribute( startElement, 'todoListChecked' ) ) {\n\t\t\telements.push( ...getAllListItemBlocks( startElement ) );\n\t\t}\n\n\t\tfor ( const item of selectionRange.getItems( { shallow: true } ) as Iterable<ModelElement> ) {\n\t\t\tif ( schema.checkAttribute( item, 'todoListChecked' ) && !elements.includes( item ) ) {\n\t\t\t\telements.push( ...getAllListItemBlocks( item ) );\n\t\t\t}\n\t\t}\n\n\t\treturn elements;\n\t}\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/**\n * @module list/todolist/todocheckboxchangeobserver\n */\n\nimport { DomEventObserver, type ViewDocumentDomEventData } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Observes all to-do list checkboxes state changes.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~EditingView} by {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @internal\n */\nexport class TodoCheckboxChangeObserver extends DomEventObserver<'change'> {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic readonly domEventType = [ 'change' ] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: Event ): void {\n\t\tif ( domEvent.target ) {\n\t\t\tconst viewTarget = this.view.domConverter.mapDomToView( domEvent.target as HTMLElement );\n\n\t\t\tif (\n\t\t\t\tviewTarget &&\n\t\t\t\tviewTarget.is( 'element', 'input' ) &&\n\t\t\t\tviewTarget.getAttribute( 'type' ) == 'checkbox' &&\n\t\t\t\tviewTarget.findAncestor( { classes: 'todo-list__label' } )\n\t\t\t) {\n\t\t\t\tthis.fire( 'todoCheckboxChange', domEvent );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Fired when the to-do list checkbox is toggled.\n *\n * Introduced by {@link module:list/todolist/todocheckboxchangeobserver~TodoCheckboxChangeObserver}.\n *\n * Note that this event is not available by default. To make it available,\n * {@link module:list/todolist/todocheckboxchangeobserver~TodoCheckboxChangeObserver}\n * needs to be added to {@link module:engine/view/view~EditingView} by the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:list/todolist/todocheckboxchangeobserver~TodoCheckboxChangeObserver\n * @eventName module:engine/view/document~ViewDocument#todoCheckboxChange\n * @param data The event data.\n */\nexport type ViewDocumentTodoCheckboxChangeEvent = {\n\tname: 'todoCheckboxChange';\n\targs: [ data: ViewDocumentDomEventData<Event> ];\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/**\n * @module list/todolist/todolistediting\n */\n\nimport {\n\tMatcher,\n\ttype UpcastElementEvent,\n\ttype Model,\n\ttype MatcherPattern,\n\ttype ViewElement,\n\ttype ViewDocumentKeyDownEvent,\n\ttype ViewDocumentArrowKeyEvent,\n\ttype MapperViewToModelPositionEvent,\n\ttype ViewDocumentFragment,\n\ttype ModelSelectionChangeRangeEvent,\n\ttype ModelDocumentFragment,\n\ttype ModelElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tgetCode,\n\tparseKeystroke,\n\tgetLocalizedArrowKeyCodeDirection,\n\ttype GetCallback,\n\ttype Locale\n} from '@ckeditor/ckeditor5-utils';\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { getAllListItemBlocks, isFirstBlockOfListItem, isListItemBlock } from '../list/utils/model.js';\nimport {\n\tListEditing,\n\ttype ListEditingCheckElementEvent,\n\ttype ListEditingPostFixerEvent\n} from '../list/listediting.js';\nimport { ListCommand } from '../list/listcommand.js';\nimport { CheckTodoListCommand } from './checktodolistcommand.js';\nimport { TodoCheckboxChangeObserver, type ViewDocumentTodoCheckboxChangeEvent } from './todocheckboxchangeobserver.js';\n\nconst ITEM_TOGGLE_KEYSTROKE = /* #__PURE__ */ parseKeystroke( 'Ctrl+Enter' );\n\n/**\n * The engine of the to-do list feature. It handles creating, editing and removing to-do lists and their items.\n *\n * It registers the entire functionality of the {@link module:list/list/listediting~ListEditing list editing plugin}\n * and extends it with the commands:\n *\n * - `'todoList'`,\n * - `'checkTodoList'`,\n */\nexport class TodoListEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TodoListEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ListEditing ]> {\n\t\treturn [ ListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst editing = editor.editing;\n\t\tconst listEditing = editor.plugins.get( ListEditing );\n\t\tconst multiBlock = editor.config.get( 'list.multiBlock' );\n\t\tconst elementName = multiBlock ? 'paragraph' : 'listItem';\n\n\t\teditor.commands.add( 'todoList', new ListCommand( editor, 'todo' ) );\n\t\teditor.commands.add( 'checkTodoList', new CheckTodoListCommand( editor ) );\n\n\t\tediting.view.addObserver( TodoCheckboxChangeObserver );\n\n\t\tmodel.schema.extend( '$listItem', { allowAttributes: 'todoListChecked' } );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\t// Don't allow `todoListChecked` attribute on elements which are not todo list items.\n\t\t\tif ( !item.getAttribute( 'listItemId' ) || item.getAttribute( 'listType' ) != 'todo' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'todoListChecked' );\n\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\t// Upcast of to-do list item is based on a checkbox at the beginning of a <li> to keep compatibility with markdown input.\n\t\t\tdispatcher.on( 'element:input', todoItemInputConverter() );\n\n\t\t\t// Priority is set to low to allow generic list item converter to run first.\n\t\t\tdispatcher.on( 'element:li', todoListItemUpcastConverter(), {\n\t\t\t\tpriority: 'low'\n\t\t\t} );\n\n\t\t\t// Consume other elements that are normally generated in data downcast, so they won't get captured by GHS.\n\t\t\tdispatcher.on( 'element:label', elementUpcastConsumingConverter(\n\t\t\t\t{ name: 'label', classes: 'todo-list__label' }\n\t\t\t) );\n\t\t\tdispatcher.on( 'element:label', elementUpcastConsumingConverter(\n\t\t\t\t{ name: 'label', classes: [ 'todo-list__label', 'todo-list__label_without-description' ] }\n\t\t\t) );\n\t\t\tdispatcher.on( 'element:span', elementUpcastConsumingConverter(\n\t\t\t\t{ name: 'span', classes: 'todo-list__label__description' }\n\t\t\t) );\n\n\t\t\tdispatcher.on( 'element:ul', attributeUpcastConsumingConverter(\n\t\t\t\t{ name: 'ul', classes: 'todo-list' }\n\t\t\t) );\n\t\t} );\n\n\t\teditor.conversion.for( 'downcast' ).elementToElement( {\n\t\t\tmodel: elementName,\n\t\t\tview: ( element, { writer } ) => {\n\t\t\t\tif ( isDescriptionBlock( element, listEditing.getListAttributeNames() ) ) {\n\t\t\t\t\treturn writer.createContainerElement( 'span', { class: 'todo-list__label__description' } );\n\t\t\t\t}\n\t\t\t},\n\t\t\tconverterPriority: 'highest'\n\t\t} );\n\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope: 'list',\n\t\t\tattributeName: 'listType',\n\n\t\t\tsetAttributeOnDowncast( writer, value, element ) {\n\t\t\t\tif ( value == 'todo' ) {\n\t\t\t\t\twriter.addClass( 'todo-list', element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeClass( 'todo-list', element );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope: 'itemMarker',\n\t\t\tattributeName: 'todoListChecked',\n\n\t\t\tcreateElement( writer, modelElement, { dataPipeline } ) {\n\t\t\t\tif ( modelElement.getAttribute( 'listType' ) != 'todo' ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst viewElement = writer.createUIElement( 'input', {\n\t\t\t\t\ttype: 'checkbox',\n\t\t\t\t\t...( modelElement.getAttribute( 'todoListChecked' ) ?\n\t\t\t\t\t\t{ checked: 'checked' } :\n\t\t\t\t\t\tnull\n\t\t\t\t\t),\n\t\t\t\t\t...( dataPipeline ?\n\t\t\t\t\t\t{ disabled: 'disabled' } :\n\t\t\t\t\t\t{ tabindex: '-1' }\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\tif ( dataPipeline ) {\n\t\t\t\t\treturn viewElement;\n\t\t\t\t}\n\n\t\t\t\tconst wrapper = writer.createContainerElement( 'span', { contenteditable: 'false' }, viewElement );\n\n\t\t\t\twrapper.getFillerOffset = () => null;\n\n\t\t\t\treturn wrapper;\n\t\t\t},\n\n\t\t\tcanWrapElement( modelElement ) {\n\t\t\t\treturn isDescriptionBlock( modelElement, listEditing.getListAttributeNames() );\n\t\t\t},\n\n\t\t\tcreateWrapperElement( writer, modelElement, { dataPipeline } ) {\n\t\t\t\tconst classes = [ 'todo-list__label' ];\n\n\t\t\t\tif ( !isDescriptionBlock( modelElement, listEditing.getListAttributeNames() ) ) {\n\t\t\t\t\tclasses.push( 'todo-list__label_without-description' );\n\t\t\t\t}\n\n\t\t\t\treturn writer.createAttributeElement( dataPipeline ? 'label' : 'span', {\n\t\t\t\t\tclass: classes.join( ' ' )\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Verifies if a to-do list block requires reconversion of a first item downcasted as an item description.\n\t\tlistEditing.on<ListEditingCheckElementEvent>( 'checkElement', ( evt, { modelElement, viewElement } ) => {\n\t\t\tconst isFirstTodoModelParagraphBlock = isDescriptionBlock( modelElement, listEditing.getListAttributeNames() );\n\t\t\tconst hasViewClass = viewElement.hasClass( 'todo-list__label__description' );\n\n\t\t\tif ( hasViewClass != isFirstTodoModelParagraphBlock ) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\n\t\t// Verifies if a to-do list block requires reconversion of a checkbox element\n\t\t// (for example there is a new paragraph inserted as a first block of a list item).\n\t\tlistEditing.on<ListEditingCheckElementEvent>( 'checkElement', ( evt, { modelElement, viewElement } ) => {\n\t\t\tconst isFirstTodoModelItemBlock = modelElement.getAttribute( 'listType' ) == 'todo' && isFirstBlockOfListItem( modelElement );\n\n\t\t\tlet hasViewItemMarker = false;\n\t\t\tconst viewWalker = editor.editing.view.createPositionBefore( viewElement ).getWalker( { direction: 'backward' } );\n\n\t\t\tfor ( const { item } of viewWalker ) {\n\t\t\t\tif ( item.is( 'element' ) && editor.editing.mapper.toModelElement( item ) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( item.is( 'element', 'input' ) && item.getAttribute( 'type' ) == 'checkbox' ) {\n\t\t\t\t\thasViewItemMarker = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( hasViewItemMarker != isFirstTodoModelItemBlock ) {\n\t\t\t\tevt.return = true;\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t} );\n\n\t\t// Make sure that all blocks of the same list item have the same todoListChecked attribute.\n\t\tlistEditing.on<ListEditingPostFixerEvent>( 'postFixer', ( evt, { listNodes, writer } ) => {\n\t\t\tfor ( const { node, previousNodeInList } of listNodes ) {\n\t\t\t\t// This is a first item of a nested list.\n\t\t\t\tif ( !previousNodeInList ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( previousNodeInList.getAttribute( 'listItemId' ) != node.getAttribute( 'listItemId' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst previousHasAttribute = previousNodeInList.hasAttribute( 'todoListChecked' );\n\t\t\t\tconst nodeHasAttribute = node.hasAttribute( 'todoListChecked' );\n\n\t\t\t\tif ( nodeHasAttribute && !previousHasAttribute ) {\n\t\t\t\t\twriter.removeAttribute( 'todoListChecked', node );\n\t\t\t\t\tevt.return = true;\n\t\t\t\t}\n\t\t\t\telse if ( !nodeHasAttribute && previousHasAttribute ) {\n\t\t\t\t\twriter.setAttribute( 'todoListChecked', true, node );\n\t\t\t\t\tevt.return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Make sure that todoListChecked attribute is only present for to-do list items.\n\t\tmodel.document.registerPostFixer( writer => {\n\t\t\tconst changes = model.document.differ.getChanges();\n\t\t\tlet wasFixed = false;\n\n\t\t\tfor ( const change of changes ) {\n\t\t\t\tif ( change.type == 'attribute' && change.attributeKey == 'listType' ) {\n\t\t\t\t\tconst element = change.range.start.nodeAfter!;\n\n\t\t\t\t\tif ( change.attributeOldValue == 'todo' && element.hasAttribute( 'todoListChecked' ) ) {\n\t\t\t\t\t\twriter.removeAttribute( 'todoListChecked', element );\n\t\t\t\t\t\twasFixed = true;\n\t\t\t\t\t}\n\t\t\t\t} else if ( change.type == 'insert' && change.name != '$text' ) {\n\t\t\t\t\tfor ( const { item } of writer.createRangeOn( change.position.nodeAfter! ) ) {\n\t\t\t\t\t\tif ( item.is( 'element' ) && item.getAttribute( 'listType' ) != 'todo' && item.hasAttribute( 'todoListChecked' ) ) {\n\t\t\t\t\t\t\twriter.removeAttribute( 'todoListChecked', item );\n\t\t\t\t\t\t\twasFixed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn wasFixed;\n\t\t} );\n\n\t\t// Toggle check state of selected to-do list items on keystroke.\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( editing.view.document, 'keydown', ( evt, data ) => {\n\t\t\tif ( getCode( data ) === ITEM_TOGGLE_KEYSTROKE ) {\n\t\t\t\teditor.execute( 'checkTodoList' );\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// Toggle check state of a to-do list item clicked on the checkbox.\n\t\tthis.listenTo<ViewDocumentTodoCheckboxChangeEvent>( editing.view.document, 'todoCheckboxChange', ( evt, data ) => {\n\t\t\tconst viewTarget = data.target;\n\n\t\t\tif ( !viewTarget || !viewTarget.is( 'element', 'input' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewPositionAfter = editing.view.createPositionAfter( viewTarget );\n\t\t\tconst modelPositionAfter = editing.mapper.toModelPosition( viewPositionAfter );\n\t\t\tconst modelElement = modelPositionAfter.parent;\n\n\t\t\t/* v8 ignore next -- Defensive guard for externally fired observer events outside to-do list inputs. */\n\t\t\tif ( modelElement && isListItemBlock( modelElement ) && modelElement.getAttribute( 'listType' ) == 'todo' ) {\n\t\t\t\tthis._handleCheckmarkChange( modelElement );\n\t\t\t}\n\t\t} );\n\n\t\t// Jump at the start/end of the next node on right arrow key press, when selection is before the checkbox.\n\t\t//\n\t\t// <blockquote><p>Foo{}</p></blockquote>\n\t\t// <ul><li><checkbox/>Bar</li></ul>\n\t\t//\n\t\t// press: `->`\n\t\t//\n\t\t// <blockquote><p>Foo</p></blockquote>\n\t\t// <ul><li><checkbox/>{}Bar</li></ul>\n\t\t//\n\t\tthis.listenTo<ViewDocumentArrowKeyEvent>(\n\t\t\tediting.view.document,\n\t\t\t'arrowKey',\n\t\t\tjumpOverCheckmarkOnSideArrowKeyPress( model, editor.locale ),\n\t\t\t{ context: '$text' }\n\t\t);\n\n\t\t// Map view positions inside the checkbox and wrappers to the position in the first block of the list item.\n\t\tthis.listenTo<MapperViewToModelPositionEvent>( editing.mapper, 'viewToModelPosition', ( evt, data ) => {\n\t\t\tconst viewParent = data.viewPosition.parent as ViewElement;\n\n\t\t\tconst isStartOfListItem = viewParent.is( 'attributeElement', 'li' ) && data.viewPosition.offset == 0;\n\t\t\tconst isStartOfListLabel = isLabelElement( viewParent ) && data.viewPosition.offset <= 1;\n\n\t\t\tconst isInInputWrapper = viewParent.is( 'element', 'span' ) &&\n\t\t\t\tviewParent.getAttribute( 'contenteditable' ) == 'false' &&\n\t\t\t\tisLabelElement( viewParent.parent );\n\n\t\t\tif ( !isStartOfListItem && !isStartOfListLabel && !isInInputWrapper ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst nodeAfter = data.modelPosition!.nodeAfter;\n\n\t\t\t/* v8 ignore next -- Defensive mapper guard for view positions outside to-do list widgets. */\n\t\t\tif ( nodeAfter && nodeAfter.getAttribute( 'listType' ) == 'todo' ) {\n\t\t\t\tdata.modelPosition = model.createPositionAt( nodeAfter, 0 );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\n\t\tthis._initAriaAnnouncements();\n\t}\n\n\t/**\n\t * Handles the checkbox element change, moves the selection to the corresponding model item to make it possible\n\t * to toggle the `todoListChecked` attribute using the command, and restores the selection position.\n\t *\n\t * Some say it's a hack :) Moving the selection only for executing the command on a certain node and restoring it after,\n\t * is not a clear solution. We need to design an API for using commands beyond the selection range.\n\t * See https://github.com/ckeditor/ckeditor5/issues/1954.\n\t */\n\tprivate _handleCheckmarkChange( listItem: ModelElement ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst previousSelectionRanges = Array.from( model.document.selection.getRanges() );\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setSelection( listItem, 'end' );\n\t\t\teditor.execute( 'checkTodoList' );\n\t\t\twriter.setSelection( previousSelectionRanges );\n\t\t} );\n\t}\n\n\t/**\n\t * Observe when user enters or leaves todo list and set proper aria value in global live announcer.\n\t * This allows screen readers to indicate when the user has entered and left the specified todo list.\n\t *\n\t * @internal\n\t */\n\tprivate _initAriaAnnouncements( ) {\n\t\tconst { model, ui, t } = this.editor;\n\t\tlet lastFocusedCodeBlock: ModelElement | ModelDocumentFragment | null = null;\n\n\t\tif ( !ui ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.document.selection.on<ModelSelectionChangeRangeEvent>( 'change:range', () => {\n\t\t\tconst focusParent = model.document.selection.focus!.parent;\n\t\t\tconst lastElementIsTodoList = isTodoListItemElement( lastFocusedCodeBlock );\n\t\t\tconst currentElementIsTodoList = isTodoListItemElement( focusParent );\n\n\t\t\tif ( lastElementIsTodoList && !currentElementIsTodoList ) {\n\t\t\t\tui.ariaLiveAnnouncer.announce( t( 'Leaving a to-do list' ) );\n\t\t\t} else if ( !lastElementIsTodoList && currentElementIsTodoList ) {\n\t\t\t\tui.ariaLiveAnnouncer.announce( t( 'Entering a to-do list' ) );\n\t\t\t}\n\n\t\t\tlastFocusedCodeBlock = focusParent;\n\t\t} );\n\t}\n}\n\n/**\n * Returns an upcast converter for to-do list items.\n */\nfunction todoListItemUpcastConverter(): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst { writer, schema } = conversionApi;\n\n\t\tif ( !data.modelRange ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Group to-do list items by their listItemId attribute to ensure that all items of the same list item have the same checked state.\n\t\tconst groupedItems = Array\n\t\t\t.from( data.modelRange.getItems( { shallow: true } ) )\n\t\t\t.filter( ( item ): item is ModelElement =>\n\t\t\t\titem.getAttribute( 'listType' ) === 'todo' && schema.checkAttribute( item, 'listItemId' )\n\t\t\t)\n\t\t\t.reduce( ( acc, item ) => {\n\t\t\t\tconst listItemId = item.getAttribute( 'listItemId' ) as string;\n\n\t\t\t\tif ( !acc.has( listItemId ) ) {\n\t\t\t\t\tacc.set( listItemId, getAllListItemBlocks( item ) );\n\t\t\t\t}\n\n\t\t\t\treturn acc;\n\t\t\t}, new Map<string, Array<ModelElement>>() );\n\n\t\t// During the upcast, we need to ensure that all items of the same list have the same checked state. From time to time\n\t\t// the checked state of the items can be different when the user pastes content from the clipboard with <input type=\"checkbox\">\n\t\t// that has checked state set to true. In such cases, we need to ensure that all items of the same list have the same checked state.\n\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/15602\n\t\tfor ( const [ , items ] of groupedItems.entries() ) {\n\t\t\tif ( items.some( item => item.getAttribute( 'todoListChecked' ) ) ) {\n\t\t\t\tfor ( const item of items ) {\n\t\t\t\t\twriter.setAttribute( 'todoListChecked', true, item );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Returns an upcast converter that detects a to-do list checkbox and marks the list item as a to-do list.\n */\nfunction todoItemInputConverter(): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst modelCursor = data.modelCursor;\n\t\tconst modelItem = modelCursor.parent as ModelElement;\n\t\tconst viewItem = data.viewItem;\n\n\t\tif ( !conversionApi.consumable.test( viewItem, { name: true } ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( viewItem.getAttribute( 'type' ) != 'checkbox' || !modelCursor.isAtStart || !modelItem.hasAttribute( 'listType' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconversionApi.consumable.consume( viewItem, { name: true } );\n\n\t\tconst writer = conversionApi.writer;\n\n\t\twriter.setAttribute( 'listType', 'todo', modelItem );\n\n\t\tif ( data.viewItem.hasAttribute( 'checked' ) ) {\n\t\t\twriter.setAttribute( 'todoListChecked', true, modelItem );\n\t\t}\n\n\t\tdata.modelRange = writer.createRange( modelCursor );\n\t};\n}\n\n/**\n * Returns an upcast converter that consumes element matching the given matcher pattern.\n */\nfunction elementUpcastConsumingConverter( matcherPattern: MatcherPattern ): GetCallback<UpcastElementEvent> {\n\tconst matcher = new Matcher( matcherPattern );\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst matcherResult = matcher.match( data.viewItem );\n\n\t\tif ( !matcherResult ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( data.viewItem, matcherResult.match ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t};\n}\n\n/**\n * Returns an upcast converter that consumes attributes matching the given matcher pattern.\n */\nfunction attributeUpcastConsumingConverter( matcherPattern: MatcherPattern ): GetCallback<UpcastElementEvent> {\n\tconst matcher = new Matcher( matcherPattern );\n\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst matcherResult = matcher.match( data.viewItem );\n\n\t\tif ( !matcherResult ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst match = matcherResult.match;\n\n\t\tmatch.name = false;\n\t\tconversionApi.consumable.consume( data.viewItem, match );\n\t};\n}\n\n/**\n * Returns true if the given list item block should be converted as a description block of a to-do list item.\n */\nfunction isDescriptionBlock( modelElement: ModelElement, listAttributeNames: Array<string> ): boolean {\n\treturn ( modelElement.is( 'element', 'paragraph' ) || modelElement.is( 'element', 'listItem' ) ) &&\n\t\tmodelElement.getAttribute( 'listType' ) == 'todo' &&\n\t\tisFirstBlockOfListItem( modelElement ) &&\n\t\thasOnlyListAttributes( modelElement, listAttributeNames );\n}\n\n/**\n * Returns true if only attributes from the given list are present on the model element.\n */\nfunction hasOnlyListAttributes( modelElement: ModelElement, attributeNames: Array<string> ): boolean {\n\tfor ( const attributeKey of modelElement.getAttributeKeys() ) {\n\t\t// Ignore selection attributes stored on block elements.\n\t\tif ( attributeKey.startsWith( 'selection:' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( !attributeNames.includes( attributeKey ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Jump at the start and end of a to-do list item.\n */\nfunction jumpOverCheckmarkOnSideArrowKeyPress( model: Model, locale: Locale ): GetCallback<ViewDocumentArrowKeyEvent> {\n\treturn ( eventInfo, domEventData ) => {\n\t\tconst direction = getLocalizedArrowKeyCodeDirection( domEventData.keyCode, locale.contentLanguageDirection );\n\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst position = selection.getFirstPosition()!;\n\t\tconst parent = position.parent as ModelElement;\n\n\t\t// Right arrow before a to-do list item.\n\t\tif ( direction == 'right' && position.isAtEnd ) {\n\t\t\tconst newRange = schema.getNearestSelectionRange( model.createPositionAfter( parent ), 'forward' );\n\n\t\t\tif ( !newRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newRangeParent = newRange.start.parent;\n\n\t\t\tif ( newRangeParent && isListItemBlock( newRangeParent ) && newRangeParent.getAttribute( 'listType' ) == 'todo' ) {\n\t\t\t\tmodel.change( writer => writer.setSelection( newRange ) );\n\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\tdomEventData.stopPropagation();\n\t\t\t\teventInfo.stop();\n\t\t\t}\n\t\t}\n\t\t// Left arrow at the beginning of a to-do list item.\n\t\telse if ( direction == 'left' && position.isAtStart && isListItemBlock( parent ) && parent.getAttribute( 'listType' ) == 'todo' ) {\n\t\t\tconst newRange = schema.getNearestSelectionRange( model.createPositionBefore( parent ), 'backward' );\n\n\t\t\tif ( !newRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmodel.change( writer => writer.setSelection( newRange ) );\n\n\t\t\tdomEventData.preventDefault();\n\t\t\tdomEventData.stopPropagation();\n\t\t\teventInfo.stop();\n\t\t}\n\t};\n}\n\n/**\n * Returns true if the given element is a label element of a to-do list item.\n */\nfunction isLabelElement( viewElement: ViewElement | ViewDocumentFragment | null ): boolean {\n\treturn !!viewElement && viewElement.is( 'attributeElement' ) && viewElement.hasClass( 'todo-list__label' );\n}\n\n/**\n * Returns true if the given element is a list item model element of a to-do list.\n */\nfunction isTodoListItemElement( element: ModelElement | ModelDocumentFragment | null ): boolean {\n\tif ( !element ) {\n\t\treturn false;\n\t}\n\n\tif ( !element.is( 'element', 'paragraph' ) && !element.is( 'element', 'listItem' ) ) {\n\t\treturn false;\n\t}\n\n\treturn element.getAttribute( 'listType' ) == 'todo';\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/**\n * @module list/todolist/todolistui\n */\n\nimport { createUIComponents } from '../list/utils.js';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconTodoList } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The to-do list UI feature. It introduces the `'todoList'` button that\n * allows to convert elements to and from to-do list items and to indent or outdent them.\n */\nexport class TodoListUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TodoListUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst t = this.editor.t;\n\n\t\tcreateUIComponents( this.editor, 'todoList', t( 'To-do List' ), IconTodoList );\n\t}\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/**\n * @module list/todolist\n */\n\nimport { TodoListEditing } from './todolist/todolistediting.js';\nimport { TodoListUI } from './todolist/todolistui.js';\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\n/**\n * The to-do list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/todolist/todolistediting~TodoListEditing to-do list\n * editing feature} and the {@link module:list/todolist/todolistui~TodoListUI to-do list UI feature}.\n */\nexport class TodoList extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TodoListEditing, TodoListUI ]> {\n\t\treturn [ TodoListEditing, TodoListUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TodoList' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module list/legacylist/legacylistcommand\n */\n\nimport type { ModelElement, ModelNode, ModelSchema } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport { first } from '@ckeditor/ckeditor5-utils';\nimport { type ListType } from '../list/listediting.js';\n\n/**\n * The list command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.\n */\nexport class LegacyListCommand extends Command {\n\t/**\n\t * The type of the list created by the command.\n\t */\n\tpublic readonly type: ListType;\n\n\t/**\n\t * A flag indicating whether the command is active, which means that the selection starts in a list of the same type.\n\t *\n\t * @readonly\n\t */\n\tdeclare public value: boolean;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param type List type that will be handled by this command.\n\t */\n\tconstructor( editor: Editor, type: ListType ) {\n\t\tsuper( editor );\n\n\t\tthis.type = type;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the list command.\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the\n\t * selected items and potentially the neighbor elements to the proper list items. If set to `false`, it will convert selected elements\n\t * to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst blocks = Array.from( document.selection.getSelectedBlocks() )\n\t\t\t.filter( block => checkCanBecomeListItem( block, model.schema ) );\n\n\t\t// Whether we are turning off some items.\n\t\tconst turnOff = options.forceValue !== undefined ? !options.forceValue : this.value;\n\n\t\t// If we are turning off items, we are going to rename them to paragraphs.\n\n\t\tmodel.change( writer => {\n\t\t\t// If part of a list got turned off, we need to handle (outdent) all of sub-items of the last turned-off item.\n\t\t\t// To be sure that model is all the time in a good state, we first fix items below turned-off item.\n\t\t\tif ( turnOff ) {\n\t\t\t\t// Start from the model item that is just after the last turned-off item.\n\t\t\t\tlet next = blocks[ blocks.length - 1 ].nextSibling as ModelElement;\n\t\t\t\tlet currentIndent = Number.POSITIVE_INFINITY;\n\t\t\t\tlet changes = [];\n\n\t\t\t\t// Correct indent of all items after the last turned off item.\n\t\t\t\t// Rules that should be followed:\n\t\t\t\t// 1. All direct sub-items of turned-off item should become indent 0, because the first item after it\n\t\t\t\t//    will be the first item of a new list. Other items are at the same level, so should have same 0 index.\n\t\t\t\t// 2. All items with indent lower than indent of turned-off item should become indent 0, because they\n\t\t\t\t//    should not end up as a child of any of list items that they were not children of before.\n\t\t\t\t// 3. All other items should have their indent changed relatively to it's parent.\n\t\t\t\t//\n\t\t\t\t// For example:\n\t\t\t\t// 1  * --------\n\t\t\t\t// 2     * --------\n\t\t\t\t// 3        * --------\t\t\t<-- this is turned off.\n\t\t\t\t// 4           * --------\t\t<-- this has to become indent = 0, because it will be first item on a new list.\n\t\t\t\t// 5              * --------\t<-- this should be still be a child of item above, so indent = 1.\n\t\t\t\t// 6        * --------\t\t\t<-- this has to become indent = 0, because it should not be a child of any of items above.\n\t\t\t\t// 7           * --------\t\t<-- this should be still be a child of item above, so indent = 1.\n\t\t\t\t// 8     * --------\t\t\t\t<-- this has to become indent = 0.\n\t\t\t\t// 9        * --------\t\t\t<-- this should still be a child of item above, so indent = 1.\n\t\t\t\t// 10          * --------\t\t<-- this should still be a child of item above, so indent = 2.\n\t\t\t\t// 11          * --------\t\t<-- this should still be at the same level as item above, so indent = 2.\n\t\t\t\t// 12 * --------\t\t\t\t<-- this and all below are left unchanged.\n\t\t\t\t// 13    * --------\n\t\t\t\t// 14       * --------\n\t\t\t\t//\n\t\t\t\t// After turning off 3 the list becomes:\n\t\t\t\t//\n\t\t\t\t// 1  * --------\n\t\t\t\t// 2     * --------\n\t\t\t\t//\n\t\t\t\t// 3  --------\n\t\t\t\t//\n\t\t\t\t// 4  * --------\n\t\t\t\t// 5     * --------\n\t\t\t\t// 6  * --------\n\t\t\t\t// 7     * --------\n\t\t\t\t// 8  * --------\n\t\t\t\t// 9     * --------\n\t\t\t\t// 10       * --------\n\t\t\t\t// 11       * --------\n\t\t\t\t// 12 * --------\n\t\t\t\t// 13    * --------\n\t\t\t\t// 14       * --------\n\t\t\t\t//\n\t\t\t\t// Thanks to this algorithm no lists are mismatched and no items get unexpected children/parent, while\n\t\t\t\t// those parent-child connection which are possible to maintain are still maintained. It's worth noting\n\t\t\t\t// that this is the same effect that we would be get by multiple use of outdent command. However doing\n\t\t\t\t// it like this is much more efficient because it's less operation (less memory usage, easier OT) and\n\t\t\t\t// less conversion (faster).\n\t\t\t\twhile ( next && next.name == 'listItem' && next.getAttribute( 'listIndent' ) !== 0 ) {\n\t\t\t\t\t// Check each next list item, as long as its indent is bigger than 0.\n\t\t\t\t\t// If the indent is 0 we are not going to change anything anyway.\n\t\t\t\t\tconst indent = next.getAttribute( 'listIndent' ) as number;\n\n\t\t\t\t\t// We check if that's item indent is lower as current relative indent.\n\t\t\t\t\tif ( indent < currentIndent ) {\n\t\t\t\t\t\t// If it is, current relative indent becomes that indent.\n\t\t\t\t\t\tcurrentIndent = indent;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fix indent relatively to current relative indent.\n\t\t\t\t\t// Note, that if we just changed the current relative indent, the newIndent will be equal to 0.\n\t\t\t\t\tconst newIndent = indent - currentIndent;\n\n\t\t\t\t\t// Save the entry in changes array. We do not apply it at the moment, because we will need to\n\t\t\t\t\t// reverse the changes so the last item is changed first.\n\t\t\t\t\t// This is to keep model in correct state all the time.\n\t\t\t\t\tchanges.push( { element: next, listIndent: newIndent } );\n\n\t\t\t\t\t// Find next item.\n\t\t\t\t\tnext = next.nextSibling as ModelElement;\n\t\t\t\t}\n\n\t\t\t\tchanges = changes.reverse();\n\n\t\t\t\tfor ( const item of changes ) {\n\t\t\t\t\twriter.setAttribute( 'listIndent', item.listIndent, item.element );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we are turning on, we might change some items that are already `listItem`s but with different type.\n\t\t\t// Changing one nested list item to other type should also trigger changing all its siblings so the\n\t\t\t// whole nested list is of the same type.\n\t\t\t// Example (assume changing to numbered list):\n\t\t\t// * ------\t\t\t\t<-- do not fix, top level item\n\t\t\t//   * ------\t\t\t<-- fix, because latter list item of this item's list is changed\n\t\t\t//      * ------\t\t<-- do not fix, item is not affected (different list)\n\t\t\t//   * ------\t\t\t<-- fix, because latter list item of this item's list is changed\n\t\t\t//      * ------\t\t<-- fix, because latter list item of this item's list is changed\n\t\t\t//      * ---[--\t\t<-- already in selection\n\t\t\t//   * ------\t\t\t<-- already in selection\n\t\t\t//   * ------\t\t\t<-- already in selection\n\t\t\t// * ------\t\t\t\t<-- already in selection, but does not cause other list items to change because is top-level\n\t\t\t//   * ---]--\t\t\t<-- already in selection\n\t\t\t//   * ------\t\t\t<-- fix, because preceding list item of this item's list is changed\n\t\t\t//      * ------\t\t<-- do not fix, item is not affected (different list)\n\t\t\t// * ------\t\t\t\t<-- do not fix, top level item\n\t\t\tif ( !turnOff ) {\n\t\t\t\t// Find lowest indent among selected items. This will be indicator what is the indent of\n\t\t\t\t// top-most list affected by the command.\n\t\t\t\tlet lowestIndent = Number.POSITIVE_INFINITY;\n\n\t\t\t\tfor ( const item of blocks ) {\n\t\t\t\t\tif ( item.is( 'element', 'listItem' ) && ( item.getAttribute( 'listIndent' ) as number ) < lowestIndent ) {\n\t\t\t\t\t\tlowestIndent = item.getAttribute( 'listIndent' ) as number;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Do not execute the fix for top-level lists.\n\t\t\t\tlowestIndent = lowestIndent === 0 ? 1 : lowestIndent;\n\n\t\t\t\t// Fix types of list items that are \"before\" the selected blocks.\n\t\t\t\t_fixType( blocks, true, lowestIndent );\n\n\t\t\t\t// Fix types of list items that are \"after\" the selected blocks.\n\t\t\t\t_fixType( blocks, false, lowestIndent );\n\t\t\t}\n\n\t\t\t// Phew! Now it will be easier :).\n\t\t\t// For each block element that was in the selection, we will either: turn it to list item,\n\t\t\t// turn it to paragraph, or change it's type. Or leave it as it is.\n\t\t\t// Do it in reverse as there might be multiple blocks (same as with changing indents).\n\t\t\tfor ( const element of blocks.reverse() ) {\n\t\t\t\tif ( turnOff && element.name == 'listItem' ) {\n\t\t\t\t\t// We are turning off and the element is a `listItem` - it should be converted to `paragraph`.\n\t\t\t\t\t// List item specific attributes are removed by post fixer.\n\t\t\t\t\twriter.rename( element, 'paragraph' );\n\t\t\t\t} else if ( !turnOff && element.name != 'listItem' ) {\n\t\t\t\t\t// We are turning on and the element is not a `listItem` - it should be converted to `listItem`.\n\t\t\t\t\t// The order of operations is important to keep model in correct state.\n\t\t\t\t\twriter.setAttributes( { listType: this.type, listIndent: 0 }, element );\n\t\t\t\t\twriter.rename( element, 'listItem' );\n\t\t\t\t} else if ( !turnOff && element.name == 'listItem' && element.getAttribute( 'listType' ) != this.type ) {\n\t\t\t\t\t// We are turning on and the element is a `listItem` but has different type - change it's type and\n\t\t\t\t\t// type of it's all siblings that have same indent.\n\t\t\t\t\twriter.setAttribute( 'listType', this.type, element );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Event fired by the {@link #execute} method.\n\t\t\t *\n\t\t\t * It allows to execute an action after executing the {@link ~ListCommand#execute} method, for example adjusting\n\t\t\t * attributes of changed blocks.\n\t\t\t *\n\t\t\t * @protected\n\t\t\t * @event _executeCleanup\n\t\t\t */\n\t\t\tthis.fire( '_executeCleanup', blocks );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue(): boolean {\n\t\t// Check whether closest `listItem` ancestor of the position has a correct type.\n\t\tconst listItem = first( this.editor.model.document.selection.getSelectedBlocks() );\n\n\t\treturn !!listItem && listItem.is( 'element', 'listItem' ) && listItem.getAttribute( 'listType' ) == this.type;\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled() {\n\t\t// If command value is true it means that we are in list item, so the command should be enabled.\n\t\tif ( this.value ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst schema = this.editor.model.schema;\n\n\t\tconst firstBlock = first( selection.getSelectedBlocks() );\n\n\t\tif ( !firstBlock ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Otherwise, check if list item can be inserted at the position start.\n\t\treturn checkCanBecomeListItem( firstBlock, schema );\n\t}\n}\n\n/**\n * Helper function used when one or more list item have their type changed. Fixes type of other list items\n * that are affected by the change (are in same lists) but are not directly in selection. The function got extracted\n * not to duplicated code, as same fix has to be performed before and after selection.\n *\n * @param blocks Blocks that are in selection.\n * @param isBackward Specified whether fix will be applied for blocks before first selected block (`true`)\n * or blocks after last selected block (`false`).\n * @param lowestIndent Lowest indent among selected blocks.\n */\nfunction _fixType(\n\tblocks: Array<ModelNode>,\n\tisBackward: boolean,\n\tlowestIndent: number\n) {\n\t// We need to check previous sibling of first changed item and next siblings of last changed item.\n\tconst startingItem = isBackward ? blocks[ 0 ] : blocks[ blocks.length - 1 ];\n\n\tif ( startingItem.is( 'element', 'listItem' ) ) {\n\t\tlet item = startingItem[ isBackward ? 'previousSibling' : 'nextSibling' ];\n\t\t// During processing items, keeps the lowest indent of already processed items.\n\t\t// This saves us from changing too many items.\n\t\t// Following example is for going forward as it is easier to read, however same applies to going backward.\n\t\t// * ------\n\t\t//   * ------\n\t\t//     * --[---\n\t\t//   * ------\t\t<-- `lowestIndent` should be 1\n\t\t//     * --]---\t\t<-- `startingItem`, `currentIndent` = 2, `lowestIndent` == 1\n\t\t//     * ------\t\t<-- should be fixed, `indent` == 2 == `currentIndent`\n\t\t//   * ------\t\t<-- should be fixed, set `currentIndent` to 1, `indent` == 1 == `currentIndent`\n\t\t//     * ------\t\t<-- should not be fixed, item is in different list, `indent` = 2, `indent` != `currentIndent`\n\t\t//   * ------\t\t<-- should be fixed, `indent` == 1 == `currentIndent`\n\t\t// * ------\t\t\t<-- break loop (`indent` < `lowestIndent`)\n\t\tlet currentIndent = startingItem.getAttribute( 'listIndent' ) as number;\n\n\t\t// Look back until a list item with indent lower than reference `lowestIndent`.\n\t\t// That would be the parent of nested sublist which contains item having `lowestIndent`.\n\t\twhile ( item && item.is( 'element', 'listItem' ) && ( item.getAttribute( 'listIndent' ) as number ) >= lowestIndent ) {\n\t\t\tif ( currentIndent > ( item.getAttribute( 'listIndent' ) as number ) ) {\n\t\t\t\tcurrentIndent = item.getAttribute( 'listIndent' ) as number;\n\t\t\t}\n\n\t\t\t// Found an item that is in the same nested sublist.\n\t\t\tif ( item.getAttribute( 'listIndent' ) == currentIndent ) {\n\t\t\t\t// Just add the item to selected blocks like it was selected by the user.\n\t\t\t\tblocks[ isBackward ? 'unshift' : 'push' ]( item );\n\t\t\t}\n\n\t\t\titem = item[ isBackward ? 'previousSibling' : 'nextSibling' ];\n\t\t}\n\t}\n}\n\n/**\n * Checks whether the given block can be replaced by a listItem.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */\nfunction checkCanBecomeListItem( block: ModelElement, schema: ModelSchema ) {\n\treturn schema.checkChild( block.parent as any, 'listItem' ) && !schema.isObject( block );\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/**\n * @module list/legacylist/legacyindentcommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The list indent command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.\n */\nexport class LegacyIndentCommand extends Command {\n\t/**\n\t * Determines by how much the command will change the list item's indent attribute.\n\t */\n\tprivate readonly _indentBy: 1 | -1;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param indentDirection The direction of indent. If it is equal to `backward`, the command will outdent a list item.\n\t */\n\tconstructor( editor: Editor, indentDirection: 'forward' | 'backward' ) {\n\t\tsuper( editor );\n\n\t\tthis._indentBy = indentDirection == 'forward' ? 1 : -1;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tlet itemsToChange = Array.from( doc.selection.getSelectedBlocks() );\n\n\t\tmodel.change( writer => {\n\t\t\tconst lastItem = itemsToChange[ itemsToChange.length - 1 ];\n\n\t\t\t// Indenting a list item should also indent all the items that are already sub-items of indented item.\n\t\t\tlet next = lastItem.nextSibling as ModelElement | null;\n\n\t\t\t// Check all items after last indented item, as long as their indent is bigger than indent of that item.\n\t\t\twhile (\n\t\t\t\tnext && next.name == 'listItem' &&\n\t\t\t\t( next.getAttribute( 'listIndent' ) as number ) > ( lastItem.getAttribute( 'listIndent' ) as number )\n\t\t\t) {\n\t\t\t\titemsToChange.push( next );\n\n\t\t\t\tnext = next.nextSibling as ModelElement | null;\n\t\t\t}\n\n\t\t\t// We need to be sure to keep model in correct state after each small change, because converters\n\t\t\t// bases on that state and assumes that model is correct.\n\t\t\t// Because of that, if the command outdents items, we will outdent them starting from the last item, as\n\t\t\t// it is safer.\n\t\t\tif ( this._indentBy < 0 ) {\n\t\t\t\titemsToChange = itemsToChange.reverse();\n\t\t\t}\n\n\t\t\tfor ( const item of itemsToChange ) {\n\t\t\t\tconst indent = ( item.getAttribute( 'listIndent' ) as number ) + this._indentBy;\n\n\t\t\t\t// If indent is lower than 0, it means that the item got outdented when it was not indented.\n\t\t\t\t// This means that we need to convert that list item to paragraph.\n\t\t\t\tif ( indent < 0 ) {\n\t\t\t\t\t// To keep the model as correct as possible, first rename listItem, then remove attributes,\n\t\t\t\t\t// as listItem without attributes is very incorrect and will cause problems in converters.\n\t\t\t\t\t// No need to remove attributes, will be removed by post fixer.\n\t\t\t\t\twriter.rename( item, 'paragraph' );\n\t\t\t\t}\n\t\t\t\t// If indent is >= 0, change the attribute value.\n\t\t\t\telse {\n\t\t\t\t\twriter.setAttribute( 'listIndent', indent, item );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// It allows to execute an action after executing the `~IndentCommand#execute` method, for example adjusting\n\t\t\t// attributes of changed list items.\n\t\t\tthis.fire( '_executeCleanup', itemsToChange );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled() {\n\t\t// Check whether any of position's ancestor is a list item.\n\t\tconst listItem = first( this.editor.model.document.selection.getSelectedBlocks() );\n\n\t\t// If selection is not in a list item, the command is disabled.\n\t\tif ( !listItem || !listItem.is( 'element', 'listItem' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this._indentBy > 0 ) {\n\t\t\t// Cannot indent first item in it's list. Check if before `listItem` is a list item that is in same list.\n\t\t\t// To be in the same list, the item has to have same attributes and cannot be \"split\" by an item with lower indent.\n\t\t\tconst indent = listItem.getAttribute( 'listIndent' ) as number;\n\t\t\tconst type = listItem.getAttribute( 'listType' ) as string;\n\n\t\t\tlet prev = listItem.previousSibling;\n\n\t\t\twhile ( prev && prev.is( 'element', 'listItem' ) && ( prev.getAttribute( 'listIndent' ) as number ) >= indent ) {\n\t\t\t\tif ( prev.getAttribute( 'listIndent' ) == indent ) {\n\t\t\t\t\t// The item is on the same level.\n\t\t\t\t\t// If it has same type, it means that we found a preceding sibling from the same list.\n\t\t\t\t\t// If it does not have same type, it means that `listItem` is on different list (this can happen only\n\t\t\t\t\t// on top level lists, though).\n\t\t\t\t\treturn prev.getAttribute( 'listType' ) == type;\n\t\t\t\t}\n\n\t\t\t\tprev = prev.previousSibling;\n\t\t\t}\n\n\t\t\t// Could not find similar list item, this means that `listItem` is first in its list.\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we are outdenting it is enough to be in list item. Every list item can always be outdented.\n\t\treturn true;\n\t}\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/**\n * @module list/legacylist/legacyutils\n */\n\nimport {\n\tModelTreeWalker,\n\tgetViewFillerOffset,\n\ttype DowncastConversionApi,\n\ttype ViewDowncastWriter,\n\ttype ModelElement,\n\ttype ModelItem,\n\ttype Model,\n\ttype ModelPosition,\n\ttype ViewContainerElement,\n\ttype ViewElement,\n\ttype ViewItem,\n\ttype ViewPosition\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Creates a list item {@link module:engine/view/containerelement~ViewContainerElement}.\n *\n * @internal\n * @param writer The writer instance.\n */\nexport function createViewListItemElement( writer: ViewDowncastWriter ): ViewContainerElement {\n\tconst viewItem = writer.createContainerElement( 'li' );\n\n\tviewItem.getFillerOffset = getListItemFillerOffset;\n\n\treturn viewItem;\n}\n\n/**\n * Helper function that creates a `<ul><li></li></ul>` or (`<ol>`) structure out of the given `modelItem` model `listItem` element.\n * Then, it binds the created view list item (`<li>`) with the model `listItem` element.\n * The function then returns the created view list item (`<li>`).\n *\n * @internal\n * @param modelItem Model list item.\n * @param conversionApi Conversion interface.\n * @returns View list element.\n */\nexport function generateLiInUl( modelItem: ModelItem, conversionApi: DowncastConversionApi ): ViewContainerElement {\n\tconst mapper = conversionApi.mapper;\n\tconst viewWriter = conversionApi.writer;\n\tconst listType = modelItem.getAttribute( 'listType' ) == 'numbered' ? 'ol' : 'ul';\n\tconst viewItem = createViewListItemElement( viewWriter );\n\n\tconst viewList = viewWriter.createContainerElement( listType, null );\n\n\tviewWriter.insert( viewWriter.createPositionAt( viewList, 0 ), viewItem );\n\n\tmapper.bindElements( modelItem as any, viewItem );\n\n\treturn viewItem;\n}\n\n/**\n * Helper function that inserts a view list at a correct place and merges it with its siblings.\n * It takes a model list item element (`modelItem`) and a corresponding view list item element (`injectedItem`). The view list item\n * should be in a view list element (`<ul>` or `<ol>`) and should be its only child.\n * See comments below to better understand the algorithm.\n *\n * @internal\n * @param modelItem Model list item.\n * @param injectedItem\n * @param conversionApi Conversion interface.\n * @param model The model instance.\n */\nexport function injectViewList(\n\tmodelItem: ModelElement,\n\tinjectedItem: ViewContainerElement,\n\tconversionApi: DowncastConversionApi,\n\tmodel: Model\n): void {\n\tconst injectedList = injectedItem.parent as ViewElement;\n\tconst mapper = conversionApi.mapper;\n\tconst viewWriter = conversionApi.writer;\n\n\t// The position where the view list will be inserted.\n\tlet insertPosition;\n\n\t// 1. Find the previous list item that has the same or smaller indent. Basically we are looking for the first model item\n\t// that is a \"parent\" or \"sibling\" of the injected model item.\n\t// If there is no such list item, it means that the injected list item is the first item in \"its list\".\n\tconst refItem = getSiblingListItem( modelItem.previousSibling, {\n\t\tsameIndent: true,\n\t\tsmallerIndent: true,\n\t\tlistIndent: modelItem.getAttribute( 'listIndent' ) as number\n\t} );\n\tconst prevItem = modelItem.previousSibling as ModelElement | null;\n\n\tif ( refItem && refItem.getAttribute( 'listIndent' ) == modelItem.getAttribute( 'listIndent' ) ) {\n\t\t// There is a list item with the same indent - we found the same-level sibling.\n\t\t// Break the list after it. The inserted view item will be added in the broken space.\n\t\tconst viewItem = mapper.toViewElement( refItem )!;\n\t\tinsertPosition = viewWriter.breakContainer( viewWriter.createPositionAfter( viewItem ) );\n\t} else {\n\t\t// There is no list item with the same indent. Check the previous model item.\n\t\tif ( prevItem && prevItem.name == 'listItem' ) {\n\t\t\t// If it is a list item, it has to have a lower indent.\n\t\t\t// It means that the inserted item should be added to it as its nested item.\n\t\t\tinsertPosition = mapper.toViewPosition( model.createPositionAt( prevItem, 'end' ) );\n\n\t\t\t// There could be some not mapped elements (eg. span in to-do list) but we need to insert\n\t\t\t// a nested list directly inside the li element.\n\t\t\tconst mappedViewAncestor = mapper.findMappedViewAncestor( insertPosition );\n\t\t\tconst nestedList = findNestedList( mappedViewAncestor );\n\n\t\t\t// If there already is some nested list, then use it's position.\n\t\t\tif ( nestedList ) {\n\t\t\t\tinsertPosition = viewWriter.createPositionBefore( nestedList );\n\t\t\t} else {\n\t\t\t\t// Else just put new list on the end of list item content.\n\t\t\t\tinsertPosition = viewWriter.createPositionAt( mappedViewAncestor, 'end' );\n\t\t\t}\n\t\t} else {\n\t\t\t// The previous item is not a list item (or does not exist at all).\n\t\t\t// Just map the position and insert the view item at the mapped position.\n\t\t\tinsertPosition = mapper.toViewPosition( model.createPositionBefore( modelItem ) );\n\t\t}\n\t}\n\n\tinsertPosition = positionAfterUiElements( insertPosition );\n\n\t// Insert the view item.\n\tviewWriter.insert( insertPosition, injectedList );\n\n\t// 2. Handle possible children of the injected model item.\n\tif ( prevItem && prevItem.name == 'listItem' ) {\n\t\tconst prevView = mapper.toViewElement( prevItem )!;\n\n\t\tconst walkerBoundaries = viewWriter.createRange( viewWriter.createPositionAt( prevView, 0 ), insertPosition );\n\t\tconst walker = walkerBoundaries.getWalker( { ignoreElementEnd: true } );\n\n\t\tfor ( const value of walker ) {\n\t\t\tif ( value.item.is( 'element', 'li' ) ) {\n\t\t\t\tconst breakPosition = viewWriter.breakContainer( viewWriter.createPositionBefore( value.item ) );\n\t\t\t\tconst viewList = value.item.parent as ViewElement;\n\n\t\t\t\tconst targetPosition = viewWriter.createPositionAt( injectedItem, 'end' );\n\t\t\t\tmergeViewLists( viewWriter, targetPosition.nodeBefore!, targetPosition.nodeAfter! );\n\t\t\t\tviewWriter.move( viewWriter.createRangeOn( viewList ), targetPosition );\n\n\t\t\t\t// This is bad, but those lists will be removed soon anyway.\n\t\t\t\t( walker as any )._position = breakPosition;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst nextViewList = injectedList.nextSibling;\n\n\t\tif ( nextViewList && ( nextViewList.is( 'element', 'ul' ) || nextViewList.is( 'element', 'ol' ) ) ) {\n\t\t\tlet lastSubChild = null;\n\n\t\t\tfor ( const child of nextViewList.getChildren() as Iterable<ViewElement> ) {\n\t\t\t\tconst modelChild = mapper.toModelElement( child );\n\n\t\t\t\tif (\n\t\t\t\t\tmodelChild &&\n\t\t\t\t\t( modelChild.getAttribute( 'listIndent' ) as number ) > ( modelItem.getAttribute( 'listIndent' ) as number )\n\t\t\t\t) {\n\t\t\t\t\tlastSubChild = child;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( lastSubChild ) {\n\t\t\t\tviewWriter.breakContainer( viewWriter.createPositionAfter( lastSubChild ) );\n\t\t\t\tviewWriter.move(\n\t\t\t\t\tviewWriter.createRangeOn( lastSubChild.parent as any ),\n\t\t\t\t\tviewWriter.createPositionAt( injectedItem, 'end' )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Merge the inserted view list with its possible neighbor lists.\n\tmergeViewLists( viewWriter, injectedList, injectedList.nextSibling! );\n\tmergeViewLists( viewWriter, injectedList.previousSibling!, injectedList );\n}\n\n/**\n * Helper function that takes two parameters that are expected to be view list elements, and merges them.\n * The merge happens only if both parameters are list elements of the same type (the same element name and the same class attributes).\n *\n * @internal\n * @param viewWriter The writer instance.\n * @param firstList The first element to compare.\n * @param secondList The second element to compare.\n * @returns The position after merge or `null` when there was no merge.\n */\nexport function mergeViewLists(\n\tviewWriter: ViewDowncastWriter,\n\tfirstList: ViewItem,\n\tsecondList: ViewItem\n): ViewPosition | null;\n\nexport function mergeViewLists(\n\tviewWriter: ViewDowncastWriter,\n\tfirstList: any,\n\tsecondList: any\n): ViewPosition | null {\n\t// Check if two lists are going to be merged.\n\tif ( !firstList || !secondList || ( firstList.name != 'ul' && firstList.name != 'ol' ) ) {\n\t\treturn null;\n\t}\n\n\t// Both parameters are list elements, so compare types now.\n\tif ( firstList.name != secondList.name || firstList.getAttribute( 'class' ) !== secondList.getAttribute( 'class' ) ) {\n\t\treturn null;\n\t}\n\n\treturn viewWriter.mergeContainers( viewWriter.createPositionAfter( firstList ) );\n}\n\n/**\n * Helper function that for a given `view.Position`, returns a `view.Position` that is after all `view.UIElement`s that\n * are after the given position.\n *\n * For example:\n * `<container:p>foo^<ui:span></ui:span><ui:span></ui:span>bar</container:p>`\n * For position ^, the position before \"bar\" will be returned.\n *\n * @internal\n */\nexport function positionAfterUiElements( viewPosition: ViewPosition ): ViewPosition {\n\treturn viewPosition.getLastMatchingPosition( value => value.item.is( 'uiElement' ) );\n}\n\n/**\n * Helper function that searches for a previous list item sibling of a given model item that meets the given criteria\n * passed by the options object.\n *\n * @internal\n * @param options Search criteria.\n * @param options.sameIndent Whether the sought sibling should have the same indentation.\n * @param options.smallerIndent Whether the sought sibling should have a smaller indentation.\n * @param options.listIndent The reference indentation.\n * @param options.direction Walking direction.\n */\nexport function getSiblingListItem(\n\tmodelItem: ModelItem | null,\n\toptions: {\n\t\tsameIndent?: boolean;\n\t\tsmallerIndent?: boolean;\n\t\tlistIndent?: number;\n\t\tdirection?: 'forward' | 'backward';\n\t}\n): ModelElement | null {\n\tconst sameIndent = !!options.sameIndent;\n\tconst smallerIndent = !!options.smallerIndent;\n\tconst indent = options.listIndent;\n\n\tlet item: any = modelItem;\n\n\twhile ( item && item.name == 'listItem' ) {\n\t\tconst itemIndent = item.getAttribute( 'listIndent' ) as number;\n\n\t\tif ( ( sameIndent && indent == itemIndent ) || ( smallerIndent && indent as number > itemIndent ) ) {\n\t\t\treturn item;\n\t\t}\n\n\t\tif ( options.direction === 'forward' ) {\n\t\t\titem = item.nextSibling;\n\t\t} else {\n\t\t\titem = item.previousSibling;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns a first list view element that is direct child of the given view element.\n *\n * @internal\n */\nexport function findNestedList( viewElement: ViewElement ): ViewElement | null {\n\tfor ( const node of ( viewElement.getChildren() as Iterable<ViewElement> ) ) {\n\t\tif ( node.name == 'ul' || node.name == 'ol' ) {\n\t\t\treturn node;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns an array with all `listItem` elements that represent the same list.\n *\n * It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.\n *\n * Additionally, if the `position` is inside a list item, that list item will be returned as well.\n *\n * @internal\n * @param position Starting position.\n * @param direction Walking direction.\n */\nexport function getSiblingNodes( position: ModelPosition, direction: 'forward' | 'backward' ): Array<ModelElement> {\n\tconst items: Array<ModelElement> = [];\n\tconst listItem = position.parent as ModelElement;\n\tconst walkerOptions = {\n\t\tignoreElementEnd: false,\n\t\tstartPosition: position,\n\t\tshallow: true,\n\t\tdirection\n\t};\n\tconst limitIndent = listItem.getAttribute( 'listIndent' ) as number;\n\tconst nodes = [ ...new ModelTreeWalker( walkerOptions ) ]\n\t\t.filter( value => value.item.is( 'element' ) )\n\t\t.map( value => value.item );\n\n\tfor ( const element of nodes ) {\n\t\t// If found something else than `listItem`, we're out of the list scope.\n\t\tif ( !element.is( 'element', 'listItem' ) ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// If current parsed item has lower indent that element that the element that was a starting point,\n\t\t// it means we left a nested list. Abort searching items.\n\t\t//\n\t\t// ■ List item 1.       [listIndent=0]\n\t\t//     ○ List item 2.[] [listIndent=1], limitIndent = 1,\n\t\t//     ○ List item 3.   [listIndent=1]\n\t\t// ■ List item 4.       [listIndent=0]\n\t\t//\n\t\t// Abort searching when leave nested list.\n\t\tif ( ( element.getAttribute( 'listIndent' ) as number ) < limitIndent ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// ■ List item 1.[]     [listIndent=0] limitIndent = 0,\n\t\t//     ○ List item 2.   [listIndent=1]\n\t\t//     ○ List item 3.   [listIndent=1]\n\t\t// ■ List item 4.       [listIndent=0]\n\t\t//\n\t\t// Ignore nested lists.\n\t\tif ( ( element.getAttribute( 'listIndent' ) as number ) > limitIndent ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// ■ List item 1.[]  [listType=bulleted]\n\t\t// 1. List item 2.   [listType=numbered]\n\t\t// 2.List item 3.    [listType=numbered]\n\t\t//\n\t\t// Abort searching when found a different kind of a list.\n\t\tif ( element.getAttribute( 'listType' ) !== listItem.getAttribute( 'listType' ) ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// ■ List item 1.[]  [listType=bulleted]\n\t\t// ■ List item 2.    [listType=bulleted]\n\t\t// ○ List item 3.    [listType=bulleted]\n\t\t// ○ List item 4.    [listType=bulleted]\n\t\t//\n\t\t// Abort searching when found a different list style,\n\t\tif ( element.getAttribute( 'listStyle' ) !== listItem.getAttribute( 'listStyle' ) ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// ... different direction\n\t\tif ( element.getAttribute( 'listReversed' ) !== listItem.getAttribute( 'listReversed' ) ) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// ... and different start index\n\t\tif ( element.getAttribute( 'listStart' ) !== listItem.getAttribute( 'listStart' ) ) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif ( direction === 'backward' ) {\n\t\t\titems.unshift( element );\n\t\t} else {\n\t\t\titems.push( element );\n\t\t}\n\t}\n\n\treturn items;\n}\n\n/**\n * Returns an array with all `listItem` elements in the model selection.\n *\n * It returns all the items even if only a part of the list is selected, including items that belong to nested lists.\n * If no list is selected, it returns an empty array.\n * The order of the elements is not specified.\n *\n * @internal\n */\nexport function getSelectedListItems( model: Model ): Array<ModelElement> {\n\tconst document = model.document;\n\n\t// For all selected blocks find all list items that are being selected\n\t// and update the `listStyle` attribute in those lists.\n\tlet listItems = [ ...document.selection.getSelectedBlocks() ]\n\t\t.filter( element => element.is( 'element', 'listItem' ) )\n\t\t.map( element => {\n\t\t\tconst position = model.change( writer => writer.createPositionAt( element, 0 ) );\n\n\t\t\treturn [\n\t\t\t\t...getSiblingNodes( position, 'backward' ),\n\t\t\t\t...getSiblingNodes( position, 'forward' )\n\t\t\t];\n\t\t} )\n\t\t.flat();\n\n\t// Since `getSelectedBlocks()` can return items that belong to the same list, and\n\t// `getSiblingNodes()` returns the entire list, we need to remove duplicated items.\n\tlistItems = [ ...new Set( listItems ) ];\n\n\treturn listItems;\n}\n\nconst BULLETED_LIST_STYLE_TYPES = [ 'disc', 'circle', 'square' ];\n\n// There's a lot of them (https://www.w3.org/TR/css-counter-styles-3/#typedef-counter-style).\n// Let's support only those that can be selected by ListPropertiesUI.\nconst NUMBERED_LIST_STYLE_TYPES = [\n\t'decimal',\n\t'decimal-leading-zero',\n\t'lower-roman',\n\t'upper-roman',\n\t'lower-latin',\n\t'upper-latin'\n];\n\n/**\n * Checks whether the given list-style-type is supported by numbered or bulleted list.\n *\n * @internal\n */\nexport function getListTypeFromListStyleType( listStyleType: string ): 'bulleted' | 'numbered' | null {\n\tif ( BULLETED_LIST_STYLE_TYPES.includes( listStyleType ) ) {\n\t\treturn 'bulleted';\n\t}\n\n\tif ( NUMBERED_LIST_STYLE_TYPES.includes( listStyleType ) ) {\n\t\treturn 'numbered';\n\t}\n\n\treturn null;\n}\n\n/**\n * Implementation of getFillerOffset for view list item element.\n *\n * @returns Block filler offset or `null` if block filler is not needed.\n */\nfunction getListItemFillerOffset( this: any ): number | null {\n\tconst hasOnlyLists = !this.isEmpty && ( this.getChild( 0 ).name == 'ul' || this.getChild( 0 ).name == 'ol' );\n\n\tif ( this.isEmpty || hasOnlyLists ) {\n\t\treturn 0;\n\t}\n\n\treturn getViewFillerOffset.call( this );\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/**\n * @module list/legacylist/legacylistutils\n */\n\nimport type { ModelElement, Model, ModelPosition } from '@ckeditor/ckeditor5-engine';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tgetListTypeFromListStyleType,\n\tgetSelectedListItems,\n\tgetSiblingNodes\n} from './legacyutils.js';\n\n/**\n * A set of helpers related to legacy lists.\n */\nexport class LegacyListUtils extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LegacyListUtils' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether the given list-style-type is supported by numbered or bulleted list.\n\t */\n\tpublic getListTypeFromListStyleType( listStyleType: string ): 'bulleted' | 'numbered' | null {\n\t\treturn getListTypeFromListStyleType( listStyleType );\n\t}\n\n\t/**\n\t * Returns an array with all `listItem` elements in the model selection.\n\t *\n\t * It returns all the items even if only a part of the list is selected, including items that belong to nested lists.\n\t * If no list is selected, it returns an empty array.\n\t * The order of the elements is not specified.\n\t */\n\tpublic getSelectedListItems( model: Model ): Array<ModelElement> {\n\t\treturn getSelectedListItems( model );\n\t}\n\n\t/**\n\t * Returns an array with all `listItem` elements that represent the same list.\n\t *\n\t * It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.\n\t *\n\t * Additionally, if the `position` is inside a list item, that list item will be returned as well.\n\t *\n\t * @param position Starting position.\n\t * @param direction Walking direction.\n\t */\n\tpublic getSiblingNodes( position: ModelPosition, direction: 'forward' | 'backward' ): Array<ModelElement> {\n\t\treturn getSiblingNodes( position, direction );\n\t}\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/**\n * @module list/legacylist/legacyconverters\n */\n\nimport {\n\tModelTreeWalker,\n\ttype DowncastAttributeEvent,\n\ttype DowncastConversionApi,\n\ttype DowncastInsertEvent,\n\ttype DowncastRemoveEvent,\n\ttype ModelElement,\n\ttype MapperModelToViewPositionEvent,\n\ttype MapperViewToModelPositionEvent,\n\ttype Model,\n\ttype ModelInsertContentEvent,\n\ttype ModelNode,\n\ttype ModelPosition,\n\ttype UpcastConversionApi,\n\ttype UpcastElementEvent,\n\ttype EditingView,\n\ttype ViewContainerElement,\n\ttype ViewElement,\n\ttype ViewNode,\n\ttype ViewPosition,\n\ttype ViewTypeCheckable,\n\ttype ModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tgenerateLiInUl,\n\tinjectViewList,\n\tmergeViewLists,\n\tgetSiblingListItem,\n\tpositionAfterUiElements\n} from './legacyutils.js';\n\n/**\n * A model-to-view converter for the `listItem` model element insertion.\n *\n * It creates a `<ul><li></li><ul>` (or `<ol>`) view structure out of a `listItem` model element, inserts it at the correct\n * position, and merges the list with surrounding lists (if available).\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n * @param model Model instance.\n */\nexport function modelViewInsertion( model: Model ): GetCallback<DowncastInsertEvent<ModelElement>> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst consumable = conversionApi.consumable;\n\n\t\tif ( !consumable.test( data.item, 'insert' ) ||\n\t\t\t!consumable.test( data.item, 'attribute:listType' ) ||\n\t\t\t!consumable.test( data.item, 'attribute:listIndent' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconsumable.consume( data.item, 'insert' );\n\t\tconsumable.consume( data.item, 'attribute:listType' );\n\t\tconsumable.consume( data.item, 'attribute:listIndent' );\n\n\t\tconst modelItem = data.item;\n\t\tconst viewItem = generateLiInUl( modelItem, conversionApi );\n\n\t\tinjectViewList( modelItem, viewItem, conversionApi, model );\n\t};\n}\n\n/**\n * A model-to-view converter for the `listItem` model element removal.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */\nexport function modelViewRemove( model: Model ): GetCallback<DowncastRemoveEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst viewPosition = conversionApi.mapper.toViewPosition( data.position );\n\t\tconst viewStart = viewPosition.getLastMatchingPosition( value => !value.item.is( 'element', 'li' ) );\n\t\tconst viewItem = viewStart.nodeAfter as ViewElement;\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\t// 1. Break the container after and before the list item.\n\t\t// This will create a view list with one view list item - the one to remove.\n\t\tviewWriter.breakContainer( viewWriter.createPositionBefore( viewItem ) );\n\t\tviewWriter.breakContainer( viewWriter.createPositionAfter( viewItem ) );\n\n\t\t// 2. Remove the list with the item to remove.\n\t\tconst viewList = viewItem.parent as ViewElement;\n\t\tconst viewListPrev = viewList.previousSibling;\n\t\tconst removeRange = viewWriter.createRangeOn( viewList );\n\t\tconst removed = viewWriter.remove( removeRange );\n\n\t\t// 3. Merge the whole created by breaking and removing the list.\n\t\tif ( viewListPrev && viewListPrev.nextSibling ) {\n\t\t\tmergeViewLists( viewWriter, viewListPrev, viewListPrev.nextSibling );\n\t\t}\n\n\t\t// 4. Bring back nested list that was in the removed <li>.\n\t\tconst modelItem = conversionApi.mapper.toModelElement( viewItem )!;\n\n\t\thoistNestedLists(\n\t\t\tmodelItem.getAttribute( 'listIndent' ) as number + 1,\n\t\t\tdata.position,\n\t\t\tremoveRange.start,\n\t\t\tviewItem,\n\t\t\tconversionApi,\n\t\t\tmodel\n\t\t);\n\n\t\t// 5. Unbind removed view item and all children.\n\t\tfor ( const child of viewWriter.createRangeIn( removed ).getItems() ) {\n\t\t\tconversionApi.mapper.unbindViewElement( child as ViewElement );\n\t\t}\n\n\t\tevt.stop();\n\t};\n}\n\n/**\n * A model-to-view converter for the `type` attribute change on the `listItem` model element.\n *\n * This change means that the `<li>` element parent changes from `<ul>` to `<ol>` (or vice versa). This is accomplished\n * by breaking view elements and changing their name. The next {@link module:list/legacylist/legacyconverters~modelViewMergeAfterChangeType}\n * converter will attempt to merge split nodes.\n *\n * Splitting this conversion into 2 steps makes it possible to add an additional conversion in the middle.\n * Check {@link module:list/legacytodolist/legacytodolistconverters~modelViewChangeType} to see an example of it.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n */\nexport const modelViewChangeType: GetCallback<DowncastAttributeEvent<ModelElement>> = ( evt, data, conversionApi ) => {\n\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\treturn;\n\t}\n\n\tconst viewItem = conversionApi.mapper.toViewElement( data.item )!;\n\tconst viewWriter = conversionApi.writer;\n\n\t// Break the container after and before the list item.\n\t// This will create a view list with one view list item -- the one that changed type.\n\tviewWriter.breakContainer( viewWriter.createPositionBefore( viewItem ) );\n\tviewWriter.breakContainer( viewWriter.createPositionAfter( viewItem ) );\n\n\t// Change name of the view list that holds the changed view item.\n\t// We cannot just change name property, because that would not render properly.\n\tconst viewList = viewItem.parent as ViewContainerElement;\n\tconst listName = data.attributeNewValue == 'numbered' ? 'ol' : 'ul';\n\n\tviewWriter.rename( listName, viewList );\n};\n\n/**\n * A model-to-view converter that attempts to merge nodes split by {@link module:list/legacylist/legacyconverters~modelViewChangeType}.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n */\nexport const modelViewMergeAfterChangeType: GetCallback<DowncastAttributeEvent<ModelElement>> = ( evt, data, conversionApi ) => {\n\tconversionApi.consumable.consume( data.item, evt.name );\n\n\tconst viewItem = conversionApi.mapper.toViewElement( data.item )!;\n\tconst viewList = viewItem.parent as ViewContainerElement;\n\tconst viewWriter = conversionApi.writer;\n\n\t// Merge the changed view list with other lists, if possible.\n\tmergeViewLists( viewWriter, viewList, viewList.nextSibling! );\n\tmergeViewLists( viewWriter, viewList.previousSibling!, viewList );\n};\n\n/**\n * A model-to-view converter for the `listIndent` attribute change on the `listItem` model element.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */\nexport function modelViewChangeIndent( model: Model ): GetCallback<DowncastAttributeEvent<ModelElement>> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, 'attribute:listIndent' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewItem = conversionApi.mapper.toViewElement( data.item ) as ViewContainerElement;\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\t// 1. Break the container after and before the list item.\n\t\t// This will create a view list with one view list item -- the one that changed type.\n\t\tviewWriter.breakContainer( viewWriter.createPositionBefore( viewItem ) );\n\t\tviewWriter.breakContainer( viewWriter.createPositionAfter( viewItem ) );\n\n\t\t// 2. Extract view list with changed view list item and merge \"hole\" possibly created by breaking and removing elements.\n\t\tconst viewList = viewItem.parent as ViewElement;\n\t\tconst viewListPrev = viewList.previousSibling;\n\t\tconst removeRange = viewWriter.createRangeOn( viewList );\n\t\tviewWriter.remove( removeRange );\n\n\t\tif ( viewListPrev && viewListPrev.nextSibling ) {\n\t\t\tmergeViewLists( viewWriter, viewListPrev, viewListPrev.nextSibling );\n\t\t}\n\n\t\t// 3. Bring back nested list that was in the removed <li>.\n\t\thoistNestedLists(\n\t\t\tdata.attributeOldValue as number + 1,\n\t\t\tdata.range.start,\n\t\t\tremoveRange.start,\n\t\t\tviewItem,\n\t\t\tconversionApi,\n\t\t\tmodel\n\t\t);\n\n\t\t// 4. Inject view list like it is newly inserted.\n\t\tinjectViewList( data.item, viewItem, conversionApi, model );\n\n\t\t// 5. Consume insertion of children inside the item. They are already handled by re-building the item in view.\n\t\tfor ( const child of data.item.getChildren() ) {\n\t\t\tconversionApi.consumable.consume( child, 'insert' );\n\t\t}\n\t};\n}\n\n/**\n * A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter is fired for\n * insert change of every model item, and should be fired before the actual converter. The converter checks whether the inserted\n * model item is a non-`listItem` element. If it is, and it is inserted inside a view list, the converter breaks the\n * list so the model element is inserted to the view parent element corresponding to its model parent element.\n *\n * The converter prevents such situations:\n *\n * ```xml\n * // Model:                        // View:\n * <listItem>foo</listItem>         <ul>\n * <listItem>bar</listItem>             <li>foo</li>\n *                                      <li>bar</li>\n *                                  </ul>\n *\n * // After change:                 // Correct view guaranteed by this converter:\n * <listItem>foo</listItem>         <ul><li>foo</li></ul><p>xxx</p><ul><li>bar</li></ul>\n * <paragraph>xxx</paragraph>       // Instead of this wrong view state:\n * <listItem>bar</listItem>         <ul><li>foo</li><p>xxx</p><li>bar</li></ul>\n * ```\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n */\nexport const modelViewSplitOnInsert: GetCallback<DowncastInsertEvent<ModelElement>> = ( evt, data, conversionApi ) => {\n\tif ( !conversionApi.consumable.test( data.item, evt.name ) ) {\n\t\treturn;\n\t}\n\n\tif ( data.item.name != 'listItem' ) {\n\t\tlet viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst lists = [];\n\n\t\t// Break multiple ULs/OLs if there are.\n\t\t//\n\t\t// Imagine following list:\n\t\t//\n\t\t// 1 --------\n\t\t//   1.1 --------\n\t\t//     1.1.1 --------\n\t\t//     1.1.2 --------\n\t\t//     1.1.3 --------\n\t\t//       1.1.3.1 --------\n\t\t//   1.2 --------\n\t\t//     1.2.1 --------\n\t\t// 2 --------\n\t\t//\n\t\t// Insert paragraph after item 1.1.1:\n\t\t//\n\t\t// 1 --------\n\t\t//   1.1 --------\n\t\t//     1.1.1 --------\n\t\t//\n\t\t// Lorem ipsum.\n\t\t//\n\t\t//     1.1.2 --------\n\t\t//     1.1.3 --------\n\t\t//       1.1.3.1 --------\n\t\t//   1.2 --------\n\t\t//     1.2.1 --------\n\t\t// 2 --------\n\t\t//\n\t\t// In this case 1.1.2 has to become beginning of a new list.\n\t\t// We need to break list before 1.1.2 (obvious), then we need to break list also before 1.2.\n\t\t// Then we need to move those broken pieces one after another and merge:\n\t\t//\n\t\t// 1 --------\n\t\t//   1.1 --------\n\t\t//     1.1.1 --------\n\t\t//\n\t\t// Lorem ipsum.\n\t\t//\n\t\t// 1.1.2 --------\n\t\t//   1.1.3 --------\n\t\t//     1.1.3.1 --------\n\t\t// 1.2 --------\n\t\t//   1.2.1 --------\n\t\t// 2 --------\n\t\t//\n\t\twhile ( ( viewPosition.parent as any ).name == 'ul' || ( viewPosition.parent as any ).name == 'ol' ) {\n\t\t\tviewPosition = viewWriter.breakContainer( viewPosition );\n\n\t\t\tif ( ( viewPosition.parent as any ).name != 'li' ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Remove lists that are after inserted element.\n\t\t\t// They will be brought back later, below the inserted element.\n\t\t\tconst removeStart = viewPosition;\n\t\t\tconst removeEnd = viewWriter.createPositionAt( viewPosition.parent as any, 'end' );\n\n\t\t\t// Don't remove if there is nothing to remove.\n\t\t\tif ( !removeStart.isEqual( removeEnd ) ) {\n\t\t\t\tconst removed = viewWriter.remove( viewWriter.createRange( removeStart, removeEnd ) );\n\t\t\t\tlists.push( removed );\n\t\t\t}\n\n\t\t\tviewPosition = viewWriter.createPositionAfter( viewPosition.parent as any );\n\t\t}\n\n\t\t// Bring back removed lists.\n\t\tif ( lists.length > 0 ) {\n\t\t\tfor ( let i = 0; i < lists.length; i++ ) {\n\t\t\t\tconst previousList = viewPosition.nodeBefore;\n\t\t\t\tconst insertedRange = viewWriter.insert( viewPosition, lists[ i ] );\n\t\t\t\tviewPosition = insertedRange.end;\n\n\t\t\t\t// Don't merge first list! We want a split in that place (this is why this converter is introduced).\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tconst mergePos = mergeViewLists( viewWriter, previousList!, previousList!.nextSibling! );\n\n\t\t\t\t\t// If `mergePos` is in `previousList` it means that the lists got merged.\n\t\t\t\t\t// In this case, we need to fix insert position.\n\t\t\t\t\tif ( mergePos && mergePos.parent == previousList ) {\n\t\t\t\t\t\tviewPosition.offset--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Merge last inserted list with element after it.\n\t\t\tmergeViewLists( viewWriter, viewPosition.nodeBefore!, viewPosition.nodeAfter! );\n\t\t}\n\t}\n};\n\n/**\n * A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter takes care of\n * merging view lists after something is removed or moved from near them.\n *\n * Example:\n *\n * ```xml\n * // Model:                        // View:\n * <listItem>foo</listItem>         <ul><li>foo</li></ul>\n * <paragraph>xxx</paragraph>       <p>xxx</p>\n * <listItem>bar</listItem>         <ul><li>bar</li></ul>\n *\n * // After change:                 // Correct view guaranteed by this converter:\n * <listItem>foo</listItem>         <ul>\n * <listItem>bar</listItem>             <li>foo</li>\n *                                      <li>bar</li>\n *                                  </ul>\n * ```\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove\n */\nexport const modelViewMergeAfter: GetCallback<DowncastRemoveEvent> = ( evt, data, conversionApi ) => {\n\tconst viewPosition = conversionApi.mapper.toViewPosition( data.position );\n\tconst viewItemPrev = viewPosition.nodeBefore;\n\tconst viewItemNext = viewPosition.nodeAfter;\n\n\t// Merge lists if something (remove, move) was done from inside of list.\n\t// Merging will be done only if both items are view lists of the same type.\n\t// The check is done inside the helper function.\n\tmergeViewLists( conversionApi.writer, viewItemPrev!, viewItemNext! );\n};\n\n/**\n * A view-to-model converter that converts the `<li>` view elements into the `listItem` model elements.\n *\n * To set correct values of the `listType` and `listIndent` attributes the converter:\n * * checks `<li>`'s parent,\n * * stores and increases the `conversionApi.store.indent` value when `<li>`'s sub-items are converted.\n *\n * @internal\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */\nexport const viewModelConverter: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\tif ( conversionApi.consumable.consume( data.viewItem, { name: true } ) ) {\n\t\tconst writer = conversionApi.writer;\n\n\t\t// 1. Create `listItem` model element.\n\t\tconst listItem = writer.createElement( 'listItem' );\n\n\t\t// 2. Handle `listItem` model element attributes.\n\t\tconst indent = getIndent( data.viewItem );\n\n\t\twriter.setAttribute( 'listIndent', indent, listItem );\n\n\t\t// Set 'bulleted' as default. If this item is pasted into a context,\n\t\tconst type = data.viewItem.parent && ( data.viewItem.parent as any ).name == 'ol' ? 'numbered' : 'bulleted';\n\t\twriter.setAttribute( 'listType', type, listItem );\n\n\t\tif ( !conversionApi.safeInsert( listItem, data.modelCursor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextPosition = viewToModelListItemChildrenConverter( listItem, data.viewItem.getChildren(), conversionApi );\n\n\t\t// Result range starts before the first item and ends after the last.\n\t\tdata.modelRange = writer.createRange( data.modelCursor, nextPosition );\n\n\t\tconversionApi.updateConversionResult( listItem, data );\n\t}\n};\n\n/**\n * A view-to-model converter for the `<ul>` and `<ol>` view elements that cleans the input view of garbage.\n * This is mostly to clean whitespaces from between the `<li>` view elements inside the view list element, however, also\n * incorrect data can be cleared if the view was incorrect.\n *\n * @internal\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */\nexport const cleanList: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\tif ( conversionApi.consumable.test( data.viewItem, { name: true } ) ) {\n\t\t// Caching children because when we start removing them iterating fails.\n\t\tconst children = Array.from( data.viewItem.getChildren() );\n\n\t\tfor ( const child of children ) {\n\t\t\tconst isWrongElement = !( child.is( 'element', 'li' ) || isList( child ) );\n\n\t\t\tif ( isWrongElement ) {\n\t\t\t\tchild._remove();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * A view-to-model converter for the `<li>` elements that cleans whitespace formatting from the input view.\n *\n * @internal\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */\nexport const cleanListItem: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\tif ( conversionApi.consumable.test( data.viewItem, { name: true } ) ) {\n\t\tif ( data.viewItem.childCount === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst children = [ ...data.viewItem.getChildren() ];\n\n\t\tlet foundList = false;\n\n\t\tfor ( const child of children ) {\n\t\t\tif ( foundList && !isList( child ) ) {\n\t\t\t\tchild._remove();\n\t\t\t}\n\n\t\t\tif ( isList( child ) ) {\n\t\t\t\t// If this is a <ul> or <ol>, do not process it, just mark that we already visited list element.\n\t\t\t\tfoundList = true;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Returns a callback for model position to view position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes\n * positions between the `listItem` elements that would be incorrectly mapped because of how list items are represented in the model\n * and in the view.\n *\n * @internal\n */\nexport function modelToViewPosition( view: EditingView ): GetCallback<MapperModelToViewPositionEvent> {\n\treturn ( evt, data ) => {\n\t\tif ( data.isPhantom ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelItem = data.modelPosition.nodeBefore;\n\n\t\tif ( modelItem && modelItem.is( 'element', 'listItem' ) ) {\n\t\t\tconst viewItem = data.mapper.toViewElement( modelItem )!;\n\t\t\tconst topmostViewList = viewItem.getAncestors().find( isList );\n\t\t\tconst walker = view.createPositionAt( viewItem, 0 ).getWalker();\n\n\t\t\tfor ( const value of walker ) {\n\t\t\t\tif ( value.type == 'elementStart' && value.item.is( 'element', 'li' ) ) {\n\t\t\t\t\tdata.viewPosition = value.previousPosition;\n\n\t\t\t\t\tbreak;\n\t\t\t\t} else if ( value.type == 'elementEnd' && value.item == topmostViewList ) {\n\t\t\t\t\tdata.viewPosition = value.nextPosition;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * The callback for view position to model position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes\n * positions between the `<li>` elements that would be incorrectly mapped because of how list items are represented in the model\n * and in the view.\n *\n * @internal\n * @see module:engine/conversion/mapper~Mapper#event:viewToModelPosition\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */\nexport function viewToModelPosition( model: Model ): GetCallback<MapperViewToModelPositionEvent> {\n\treturn ( evt, data ) => {\n\t\tconst viewPos = data.viewPosition;\n\t\tconst viewParent = viewPos.parent as ViewElement;\n\t\tconst mapper = data.mapper;\n\n\t\tif ( viewParent.name == 'ul' || viewParent.name == 'ol' ) {\n\t\t\t// Position is directly in <ul> or <ol>.\n\t\t\tif ( !viewPos.isAtEnd ) {\n\t\t\t\t// If position is not at the end, it must be before <li>.\n\t\t\t\t// Get that <li>, map it to `listItem` and set model position before that `listItem`.\n\t\t\t\tconst modelNode = mapper.toModelElement( viewPos.nodeAfter as any )!;\n\n\t\t\t\tdata.modelPosition = model.createPositionBefore( modelNode );\n\t\t\t} else {\n\t\t\t\t// Position is at the end of <ul> or <ol>, so there is no <li> after it to be mapped.\n\t\t\t\t// There is <li> before the position, but we cannot just map it to `listItem` and set model position after it,\n\t\t\t\t// because that <li> may contain nested items.\n\t\t\t\t// We will check \"model length\" of that <li>, in other words - how many `listItem`s are in that <li>.\n\t\t\t\tconst modelNode = mapper.toModelElement( viewPos.nodeBefore as any );\n\t\t\t\tconst modelLength = mapper.getModelLength( viewPos.nodeBefore! );\n\n\t\t\t\t// Then we get model position before mapped `listItem` and shift it accordingly.\n\t\t\t\tdata.modelPosition = model.createPositionBefore( modelNode! ).getShiftedBy( modelLength );\n\t\t\t}\n\n\t\t\tevt.stop();\n\t\t} else if (\n\t\t\tviewParent.name == 'li' &&\n\t\t\tviewPos.nodeBefore &&\n\t\t\t( ( viewPos.nodeBefore as any ).name == 'ul' || ( viewPos.nodeBefore as any ).name == 'ol' )\n\t\t) {\n\t\t\t// In most cases when view position is in <li> it is in text and this is a correct position.\n\t\t\t// However, if position is after <ul> or <ol> we have to fix it -- because in model <ul>/<ol> are not in the `listItem`.\n\t\t\tconst modelNode = mapper.toModelElement( viewParent );\n\n\t\t\t// Check all <ul>s and <ol>s that are in the <li> but before mapped position.\n\t\t\t// Get model length of those elements and then add it to the offset of `listItem` mapped to the original <li>.\n\t\t\tlet modelLength = 1; // Starts from 1 because the original <li> has to be counted in too.\n\t\t\tlet viewList: ViewNode | null = viewPos.nodeBefore;\n\n\t\t\twhile ( viewList && isList( viewList ) ) {\n\t\t\t\tmodelLength += mapper.getModelLength( viewList );\n\n\t\t\t\tviewList = viewList.previousSibling;\n\t\t\t}\n\n\t\t\tdata.modelPosition = model.createPositionBefore( modelNode! ).getShiftedBy( modelLength );\n\n\t\t\tevt.stop();\n\t\t}\n\t};\n}\n\n/**\n * Post-fixer that reacts to changes on document and fixes incorrect model states.\n *\n * In the example below, there is a correct list structure.\n * Then the middle element is removed so the list structure will become incorrect:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>Item 2</listItem>   <--- this is removed.\n * <listItem listType=\"bulleted\" listIndent=2>Item 3</listItem>\n * ```\n *\n * The list structure after the middle element is removed:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n * <listItem listType=\"bulleted\" listIndent=2>Item 3</listItem>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>Item 3</listItem>   <--- note that indent got post-fixed.\n * ```\n *\n * @internal\n * @param model The data model.\n * @param writer The writer to do changes with.\n * @returns `true` if any change has been applied, `false` otherwise.\n */\nexport function modelChangePostFixer( model: Model, writer: ModelWriter ): boolean {\n\tconst changes = model.document.differ.getChanges();\n\tconst itemToListHead = new Map<ModelElement, ModelElement>();\n\n\tlet applied = false;\n\n\tfor ( const entry of changes ) {\n\t\tif ( entry.type == 'insert' && entry.name == 'listItem' ) {\n\t\t\t_addListToFix( entry.position );\n\t\t} else if ( entry.type == 'insert' && entry.name != 'listItem' ) {\n\t\t\tif ( entry.name != '$text' ) {\n\t\t\t\t// In case of renamed element.\n\t\t\t\tconst item = entry.position.nodeAfter as ModelElement;\n\n\t\t\t\tif ( item.hasAttribute( 'listIndent' ) ) {\n\t\t\t\t\twriter.removeAttribute( 'listIndent', item );\n\n\t\t\t\t\tapplied = true;\n\t\t\t\t}\n\n\t\t\t\tif ( item.hasAttribute( 'listType' ) ) {\n\t\t\t\t\twriter.removeAttribute( 'listType', item );\n\n\t\t\t\t\tapplied = true;\n\t\t\t\t}\n\n\t\t\t\tif ( item.hasAttribute( 'listStyle' ) ) {\n\t\t\t\t\twriter.removeAttribute( 'listStyle', item );\n\n\t\t\t\t\tapplied = true;\n\t\t\t\t}\n\n\t\t\t\tif ( item.hasAttribute( 'listReversed' ) ) {\n\t\t\t\t\twriter.removeAttribute( 'listReversed', item );\n\n\t\t\t\t\tapplied = true;\n\t\t\t\t}\n\n\t\t\t\tif ( item.hasAttribute( 'listStart' ) ) {\n\t\t\t\t\twriter.removeAttribute( 'listStart', item );\n\n\t\t\t\t\tapplied = true;\n\t\t\t\t}\n\n\t\t\t\tfor ( const innerItem of Array.from( model.createRangeIn( item ) ).filter( e => e.item.is( 'element', 'listItem' ) ) ) {\n\t\t\t\t\t_addListToFix( innerItem.previousPosition );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst posAfter = entry.position.getShiftedBy( entry.length );\n\n\t\t\t_addListToFix( posAfter );\n\t\t} else if ( entry.type == 'remove' && entry.name == 'listItem' ) {\n\t\t\t_addListToFix( entry.position );\n\t\t} else if ( entry.type == 'attribute' && entry.attributeKey == 'listIndent' ) {\n\t\t\t_addListToFix( entry.range.start );\n\t\t} else if ( entry.type == 'attribute' && entry.attributeKey == 'listType' ) {\n\t\t\t_addListToFix( entry.range.start );\n\t\t}\n\t}\n\n\tfor ( const listHead of itemToListHead.values() ) {\n\t\t_fixListIndents( listHead );\n\t\t_fixListTypes( listHead );\n\t}\n\n\treturn applied;\n\n\tfunction _addListToFix( position: ModelPosition ) {\n\t\tconst previousNode = position.nodeBefore;\n\n\t\tif ( !previousNode || !previousNode.is( 'element', 'listItem' ) ) {\n\t\t\tconst item = position.nodeAfter;\n\n\t\t\tif ( item && item.is( 'element', 'listItem' ) ) {\n\t\t\t\titemToListHead.set( item, item );\n\t\t\t}\n\t\t} else {\n\t\t\tlet listHead = previousNode;\n\n\t\t\tif ( itemToListHead.has( listHead ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (\n\t\t\t\t// Cache previousSibling and reuse for performance reasons. See https://github.com/ckeditor/ckeditor5/issues/6581.\n\t\t\t\tlet previousSibling = listHead.previousSibling;\n\t\t\t\tpreviousSibling && previousSibling.is( 'element', 'listItem' );\n\t\t\t\tpreviousSibling = listHead.previousSibling\n\t\t\t) {\n\t\t\t\tlistHead = previousSibling;\n\n\t\t\t\tif ( itemToListHead.has( listHead ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titemToListHead.set( previousNode, listHead );\n\t\t}\n\t}\n\n\tfunction _fixListIndents( item: ModelNode | null ) {\n\t\tlet maxIndent = 0;\n\t\tlet fixBy = null;\n\n\t\twhile ( item && item.is( 'element', 'listItem' ) ) {\n\t\t\tconst itemIndent = item.getAttribute( 'listIndent' ) as number;\n\n\t\t\tif ( itemIndent > maxIndent ) {\n\t\t\t\tlet newIndent;\n\n\t\t\t\tif ( fixBy === null ) {\n\t\t\t\t\tfixBy = itemIndent - maxIndent;\n\t\t\t\t\tnewIndent = maxIndent;\n\t\t\t\t} else {\n\t\t\t\t\tif ( fixBy > itemIndent ) {\n\t\t\t\t\t\tfixBy = itemIndent;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewIndent = itemIndent - fixBy;\n\t\t\t\t}\n\n\t\t\t\twriter.setAttribute( 'listIndent', newIndent, item );\n\n\t\t\t\tapplied = true;\n\t\t\t} else {\n\t\t\t\tfixBy = null;\n\t\t\t\tmaxIndent = item.getAttribute( 'listIndent' ) as number + 1;\n\t\t\t}\n\n\t\t\titem = item.nextSibling;\n\t\t}\n\t}\n\n\tfunction _fixListTypes( item: ModelNode | null ) {\n\t\tlet typesStack: Array<string> = [];\n\t\tlet prev = null;\n\n\t\twhile ( item && item.is( 'element', 'listItem' ) ) {\n\t\t\tconst itemIndent = item.getAttribute( 'listIndent' ) as number;\n\n\t\t\tif ( prev && prev.getAttribute( 'listIndent' ) as number > itemIndent ) {\n\t\t\t\ttypesStack = typesStack.slice( 0, itemIndent + 1 );\n\t\t\t}\n\n\t\t\tif ( itemIndent != 0 ) {\n\t\t\t\tif ( typesStack[ itemIndent ] ) {\n\t\t\t\t\tconst type = typesStack[ itemIndent ];\n\n\t\t\t\t\tif ( item.getAttribute( 'listType' ) != type ) {\n\t\t\t\t\t\twriter.setAttribute( 'listType', type, item );\n\n\t\t\t\t\t\tapplied = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttypesStack[ itemIndent ] = item.getAttribute( 'listType' ) as string;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprev = item;\n\t\t\titem = item.nextSibling;\n\t\t}\n\t}\n}\n\n/**\n * A fixer for pasted content that includes list items.\n *\n * It fixes indentation of pasted list items so the pasted items match correctly to the context they are pasted into.\n *\n * Example:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>A</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>B^</listItem>\n * // At ^ paste:  <listItem listType=\"bulleted\" listIndent=4>X</listItem>\n * //              <listItem listType=\"bulleted\" listIndent=5>Y</listItem>\n * <listItem listType=\"bulleted\" listIndent=2>C</listItem>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>A</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>BX</listItem>\n * <listItem listType=\"bulleted\" listIndent=2>Y/listItem>\n * <listItem listType=\"bulleted\" listIndent=2>C</listItem>\n * ```\n *\n * @internal\n */\nexport const modelIndentPasteFixer: GetCallback<ModelInsertContentEvent> = function( evt, [ content, selectable ] ) {\n\tconst model = this as Model;\n\n\t// Check whether inserted content starts from a `listItem`. If it does not, it means that there are some other\n\t// elements before it and there is no need to fix indents, because even if we insert that content into a list,\n\t// that list will be broken.\n\t// Note: we also need to handle singular elements because inserting item with indent 0 into 0,1,[],2\n\t// would create incorrect model.\n\tlet item = content.is( 'documentFragment' ) ? content.getChild( 0 ) : content;\n\n\tlet selection;\n\n\tif ( !selectable ) {\n\t\tselection = model.document.selection;\n\t} else {\n\t\tselection = model.createSelection( selectable );\n\t}\n\n\tif ( item && item.is( 'element', 'listItem' ) ) {\n\t\t// Get a reference list item. Inserted list items will be fixed according to that item.\n\t\tconst pos = selection.getFirstPosition()!;\n\t\tlet refItem = null;\n\n\t\tif ( pos.parent.is( 'element', 'listItem' ) ) {\n\t\t\trefItem = pos.parent;\n\t\t} else if ( pos.nodeBefore && pos.nodeBefore.is( 'element', 'listItem' ) ) {\n\t\t\trefItem = pos.nodeBefore;\n\t\t}\n\n\t\t// If there is `refItem` it means that we do insert list items into an existing list.\n\t\tif ( refItem ) {\n\t\t\t// First list item in `data` has indent equal to 0 (it is a first list item). It should have indent equal\n\t\t\t// to the indent of reference item. We have to fix the first item and all of it's children and following siblings.\n\t\t\t// Indent of all those items has to be adjusted to reference item.\n\t\t\tconst indentChange = refItem.getAttribute( 'listIndent' ) as number;\n\n\t\t\t// Fix only if there is anything to fix.\n\t\t\tif ( indentChange > 0 ) {\n\t\t\t\t// Adjust indent of all \"first\" list items in inserted data.\n\t\t\t\twhile ( item && item.is( 'element', 'listItem' ) ) {\n\t\t\t\t\titem._setAttribute( 'listIndent', item.getAttribute( 'listIndent' ) as number + indentChange );\n\n\t\t\t\t\titem = item.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Helper function that converts children of a given `<li>` view element into corresponding model elements.\n * The function maintains proper order of elements if model `listItem` is split during the conversion\n * due to block children conversion.\n *\n * @param listItemModel List item model element to which converted children will be inserted.\n * @param viewChildren View elements which will be converted.\n * @param conversionApi Conversion interface to be used by the callback.\n * @returns Position on which next elements should be inserted after children conversion.\n */\nfunction viewToModelListItemChildrenConverter(\n\tlistItemModel: ModelElement,\n\tviewChildren: Iterable<ViewNode>,\n\tconversionApi: UpcastConversionApi\n) {\n\tconst { writer, schema } = conversionApi;\n\n\t// A position after the last inserted `listItem`.\n\tlet nextPosition = writer.createPositionAfter( listItemModel );\n\n\t// Check all children of the converted `<li>`. At this point we assume there are no \"whitespace\" view text nodes\n\t// in view list, between view list items. This should be handled by `<ul>` and `<ol>` converters.\n\tfor ( const child of viewChildren ) {\n\t\tif ( ( child as any ).name == 'ul' || ( child as any ).name == 'ol' ) {\n\t\t\t// If the children is a list, we will insert its conversion result after currently handled `listItem`.\n\t\t\t// Then, next insertion position will be set after all the new list items (and maybe other elements if\n\t\t\t// something split list item).\n\t\t\t//\n\t\t\t// If this is a list, we expect that some `listItem`s and possibly other blocks will be inserted, however `.modelCursor`\n\t\t\t// should be set after last `listItem` (or block). This is why it feels safe to use it as `nextPosition`\n\t\t\tnextPosition = conversionApi.convertItem( child, nextPosition ).modelCursor;\n\t\t} else {\n\t\t\t// If this is not a list, try inserting content at the end of the currently handled `listItem`.\n\t\t\tconst result = conversionApi.convertItem( child, writer.createPositionAt( listItemModel, 'end' ) );\n\n\t\t\t// It may end up that the current `listItem` becomes split (if that content cannot be inside `listItem`). For example:\n\t\t\t//\n\t\t\t// <li><p>Foo</p></li>\n\t\t\t//\n\t\t\t// will be converted to:\n\t\t\t//\n\t\t\t// <listItem></listItem><paragraph>Foo</paragraph><listItem></listItem>\n\t\t\t//\n\t\t\tconst convertedChild = result.modelRange!.start.nodeAfter;\n\t\t\tconst wasSplit = convertedChild && convertedChild.is( 'element' ) && !schema.checkChild( listItemModel, convertedChild.name );\n\n\t\t\tif ( wasSplit ) {\n\t\t\t\t// As `lastListItem` got split, we need to update it to the second part of the split `listItem` element.\n\t\t\t\t//\n\t\t\t\t// `modelCursor` should be set to a position where the conversion should continue. There are multiple possible scenarios\n\t\t\t\t// that may happen. Usually, `modelCursor` (marked as `#` below) would point to the second list item after conversion:\n\t\t\t\t//\n\t\t\t\t//\t\t`<li><p>Foo</p></li>` -> `<listItem></listItem><paragraph>Foo</paragraph><listItem>#</listItem>`\n\t\t\t\t//\n\t\t\t\t// However, in some cases, like auto-paragraphing, the position is placed at the end of the block element:\n\t\t\t\t//\n\t\t\t\t//\t\t`<li><div>Foo</div></li>` -> `<listItem></listItem><paragraph>Foo#</paragraph><listItem></listItem>`\n\t\t\t\t//\n\t\t\t\t// or after an element if another element broken auto-paragraphed element:\n\t\t\t\t//\n\t\t\t\t//\t\t`<li><div><h2>Foo</h2></div></li>` -> `<listItem></listItem><heading1>Foo</heading1>#<listItem></listItem>`\n\t\t\t\t//\n\t\t\t\t// We need to check for such cases and use proper list item and position based on it.\n\t\t\t\t//\n\t\t\t\tif ( result.modelCursor.parent.is( 'element', 'listItem' ) ) {\n\t\t\t\t\t// (1).\n\t\t\t\t\tlistItemModel = result.modelCursor.parent;\n\t\t\t\t} else {\n\t\t\t\t\t// (2), (3).\n\t\t\t\t\tlistItemModel = findNextListItem( result.modelCursor );\n\t\t\t\t}\n\n\t\t\t\tnextPosition = writer.createPositionAfter( listItemModel );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nextPosition;\n}\n\n/**\n * Helper function that seeks for a next list item starting from given `startPosition`.\n */\nfunction findNextListItem( startPosition: ModelPosition ) {\n\tconst treeWalker = new ModelTreeWalker( { startPosition } );\n\n\tlet value;\n\n\tdo {\n\t\tvalue = treeWalker.next();\n\t} while ( !value.value.item.is( 'element', 'listItem' ) );\n\n\treturn value.value.item;\n}\n\n/**\n * Helper function that takes all children of given `viewRemovedItem` and moves them in a correct place, according\n * to other given parameters.\n */\nfunction hoistNestedLists(\n\tnextIndent: number,\n\tmodelRemoveStartPosition: ModelPosition,\n\tviewRemoveStartPosition: ViewPosition,\n\tviewRemovedItem: ViewElement,\n\tconversionApi: DowncastConversionApi,\n\tmodel: Model\n) {\n\t// Find correct previous model list item element.\n\t// The element has to have either same or smaller indent than given reference indent.\n\t// This will be the model element which will get nested items (if it has smaller indent) or sibling items (if it has same indent).\n\t// Keep in mind that such element might not be found, if removed item was the first item.\n\tconst prevModelItem = getSiblingListItem( modelRemoveStartPosition.nodeBefore, {\n\t\tsameIndent: true,\n\t\tsmallerIndent: true,\n\t\tlistIndent: nextIndent\n\t} );\n\n\tconst mapper = conversionApi.mapper;\n\tconst viewWriter = conversionApi.writer;\n\n\t// Indent of found element or `null` if the element has not been found.\n\tconst prevIndent = prevModelItem ? prevModelItem.getAttribute( 'listIndent' ) : null;\n\n\tlet insertPosition;\n\n\tif ( !prevModelItem ) {\n\t\t// If element has not been found, simply insert lists at the position where the removed item was:\n\t\t//\n\t\t// Lorem ipsum.\n\t\t// 1 --------           <--- this is removed, no previous list item, put nested items in place of removed item.\n\t\t//   1.1 --------       <--- this is reference indent.\n\t\t//     1.1.1 --------\n\t\t//     1.1.2 --------\n\t\t//   1.2 --------\n\t\t//\n\t\t// Becomes:\n\t\t//\n\t\t// Lorem ipsum.\n\t\t// 1.1 --------\n\t\t//   1.1.1 --------\n\t\t//   1.1.2 --------\n\t\t// 1.2 --------\n\t\tinsertPosition = viewRemoveStartPosition;\n\t} else if ( prevIndent == nextIndent ) {\n\t\t// If element has been found and has same indent as reference indent it means that nested items should\n\t\t// become siblings of found element:\n\t\t//\n\t\t// 1 --------\n\t\t//   1.1 --------\n\t\t//   1.2 --------       <--- this is `prevModelItem`.\n\t\t// 2 --------           <--- this is removed, previous list item has indent same as reference indent.\n\t\t//   2.1 --------       <--- this is reference indent, this and 2.2 should become siblings of 1.2.\n\t\t//   2.2 --------\n\t\t//\n\t\t// Becomes:\n\t\t//\n\t\t// 1 --------\n\t\t//   1.1 --------\n\t\t//   1.2 --------\n\t\t//   2.1 --------\n\t\t//   2.2 --------\n\t\tconst prevViewList = mapper.toViewElement( prevModelItem )!.parent as ViewElement;\n\t\tinsertPosition = viewWriter.createPositionAfter( prevViewList );\n\t} else {\n\t\t// If element has been found and has smaller indent as reference indent it means that nested items\n\t\t// should become nested items of found item:\n\t\t//\n\t\t// 1 --------           <--- this is `prevModelItem`.\n\t\t//   1.1 --------       <--- this is removed, previous list item has indent smaller than reference indent.\n\t\t//     1.1.1 --------   <--- this is reference indent, this and 1.1.1 should become nested items of 1.\n\t\t//     1.1.2 --------\n\t\t//   1.2 --------\n\t\t//\n\t\t// Becomes:\n\t\t//\n\t\t// 1 --------\n\t\t//   1.1.1 --------\n\t\t//   1.1.2 --------\n\t\t//   1.2 --------\n\t\t//\n\t\t// Note: in this case 1.1.1 have indent 2 while 1 have indent 0. In model that should not be possible,\n\t\t// because following item may have indent bigger only by one. But this is fixed by postfixer.\n\t\tconst modelPosition = model.createPositionAt( prevModelItem, 'end' );\n\t\tinsertPosition = mapper.toViewPosition( modelPosition );\n\t}\n\n\tinsertPosition = positionAfterUiElements( insertPosition );\n\n\t// Handle multiple lists. This happens if list item has nested numbered and bulleted lists. Following lists\n\t// are inserted after the first list (no need to recalculate insertion position for them).\n\tfor ( const child of [ ...viewRemovedItem.getChildren() ] ) {\n\t\tif ( isList( child ) ) {\n\t\t\tinsertPosition = viewWriter.move( viewWriter.createRangeOn( child ), insertPosition ).end;\n\n\t\t\tmergeViewLists( viewWriter, child, child.nextSibling! );\n\t\t\tmergeViewLists( viewWriter, child.previousSibling!, child );\n\t\t}\n\t}\n}\n\n/**\n * Checks if view element is a list type (ul or ol).\n */\nfunction isList( viewElement: ViewTypeCheckable ): viewElement is ViewElement & { name: 'ol' | 'ul' } {\n\treturn viewElement.is( 'element', 'ol' ) || viewElement.is( 'element', 'ul' );\n}\n\n/**\n * Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.\n *\n * Also, fixes non HTML compliant lists indents:\n *\n * ```\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI     (indent: 0)\n *     |-> OL                                  |-> OL\n *         |-> OL                                  |\n *         |   |-> OL                              |\n *         |       |-> OL                          |\n *         |           |-> LI (parent LIs: 1)      |-> LI (indent: 1)\n *         |-> LI (parent LIs: 1)                  |-> LI (indent: 1)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> OL                                      |\n *     |-> OL                                  |\n *          |-> OL                             |\n *              |-> LI (parent LIs: 0)         |-> LI        (indent: 0)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI         (indent: 0)\n * |-> OL                                          |-> OL\n *     |-> LI (parent LIs: 0)                          |-> LI (indent: 1)\n * ```\n */\nfunction getIndent( listItem: ViewElement ) {\n\tlet indent = 0;\n\n\tlet parent = listItem.parent as ViewElement;\n\n\twhile ( parent ) {\n\t\t// Each LI in the tree will result in an increased indent for HTML compliant lists.\n\t\tif ( parent.is( 'element', 'li' ) ) {\n\t\t\tindent++;\n\t\t} else {\n\t\t\t// If however the list is nested in other list we should check previous sibling of any of the list elements...\n\t\t\tconst previousSibling = parent.previousSibling;\n\n\t\t\t// ...because the we might need increase its indent:\n\t\t\t//\t\tbefore:                           fixed list:\n\t\t\t//\t\tOL                                OL\n\t\t\t//\t\t|-> LI (parent LIs: 0)            |-> LI         (indent: 0)\n\t\t\t//\t\t|-> OL                                |-> OL\n\t\t\t//\t\t    |-> LI (parent LIs: 0)                |-> LI (indent: 1)\n\t\t\tif ( previousSibling && previousSibling.is( 'element', 'li' ) ) {\n\t\t\t\tindent++;\n\t\t\t}\n\t\t}\n\n\t\tparent = parent.parent as ViewElement;\n\t}\n\n\treturn indent;\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/**\n * @module list/legacylist/legacylistediting\n */\n\nimport { LegacyListCommand } from './legacylistcommand.js';\nimport { LegacyIndentCommand } from './legacyindentcommand.js';\nimport { LegacyListUtils } from './legacylistutils.js';\n\nimport { Plugin, type MultiCommand, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { Enter, type ViewDocumentEnterEvent } from '@ckeditor/ckeditor5-enter';\nimport { Delete, type ViewDocumentDeleteEvent } from '@ckeditor/ckeditor5-typing';\n\nimport type {\n\tDowncastAttributeEvent,\n\tDowncastInsertEvent,\n\tDowncastRemoveEvent,\n\tModelElement,\n\tMapperModelToViewPositionEvent,\n\tMapperViewToModelPositionEvent,\n\tModelInsertContentEvent,\n\tUpcastElementEvent,\n\tViewDocumentTabEvent,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tcleanList,\n\tcleanListItem,\n\tmodelViewInsertion,\n\tmodelViewChangeType,\n\tmodelViewMergeAfterChangeType,\n\tmodelViewMergeAfter,\n\tmodelViewRemove,\n\tmodelViewSplitOnInsert,\n\tmodelViewChangeIndent,\n\tmodelChangePostFixer,\n\tmodelIndentPasteFixer,\n\tviewModelConverter,\n\tmodelToViewPosition,\n\tviewToModelPosition\n} from './legacyconverters.js';\n\n/**\n * The engine of the list feature. It handles creating, editing and removing lists and list items.\n *\n * It registers the `'numberedList'`, `'bulletedList'`, `'indentList'` and `'outdentList'` commands.\n */\nexport class LegacyListEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LegacyListEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Enter, Delete, LegacyListUtils ]> {\n\t\treturn [ Enter, Delete, LegacyListUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Schema.\n\t\t// Note: in case `$block` will ever be allowed in `listItem`, keep in mind that this feature\n\t\t// uses `Selection#getSelectedBlocks()` without any additional processing to obtain all selected list items.\n\t\t// If there are blocks allowed inside list item, algorithms using `getSelectedBlocks()` will have to be modified.\n\t\teditor.model.schema.register( 'listItem', {\n\t\t\tinheritAllFrom: '$block',\n\t\t\tallowAttributes: [ 'listType', 'listIndent' ]\n\t\t} );\n\n\t\t// Converters.\n\t\tconst data = editor.data;\n\t\tconst editing = editor.editing;\n\n\t\teditor.model.document.registerPostFixer( writer => modelChangePostFixer( editor.model, writer ) );\n\n\t\tediting.mapper.registerViewToModelLength( 'li', getViewListItemLength );\n\t\tdata.mapper.registerViewToModelLength( 'li', getViewListItemLength );\n\n\t\tediting.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', modelToViewPosition( editing.view ) );\n\t\tediting.mapper.on<MapperViewToModelPositionEvent>( 'viewToModelPosition', viewToModelPosition( editor.model ) );\n\t\tdata.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', modelToViewPosition( editing.view ) );\n\n\t\teditor.conversion.for( 'editingDowncast' )\n\t\t\t.add( dispatcher => {\n\t\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert', modelViewSplitOnInsert, { priority: 'high' } );\n\t\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert:listItem', modelViewInsertion( editor.model ) );\n\t\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>(\n\t\t\t\t\t'attribute:listType:listItem', modelViewChangeType, { priority: 'high' }\n\t\t\t\t);\n\t\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>(\n\t\t\t\t\t'attribute:listType:listItem', modelViewMergeAfterChangeType, { priority: 'low' } );\n\t\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>(\n\t\t\t\t\t'attribute:listIndent:listItem', modelViewChangeIndent( editor.model )\n\t\t\t\t);\n\t\t\t\tdispatcher.on<DowncastRemoveEvent>( 'remove:listItem', modelViewRemove( editor.model ) );\n\t\t\t\tdispatcher.on<DowncastRemoveEvent>( 'remove', modelViewMergeAfter, { priority: 'low' } );\n\t\t\t} );\n\n\t\teditor.conversion.for( 'dataDowncast' )\n\t\t\t.add( dispatcher => {\n\t\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert', modelViewSplitOnInsert, { priority: 'high' } );\n\t\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert:listItem', modelViewInsertion( editor.model ) );\n\t\t\t} );\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t.add( dispatcher => {\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:ul', cleanList, { priority: 'high' } );\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:ol', cleanList, { priority: 'high' } );\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:li', cleanListItem, { priority: 'high' } );\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:li', viewModelConverter );\n\t\t\t} );\n\n\t\t// Fix indentation of pasted items.\n\t\teditor.model.on<ModelInsertContentEvent>( 'insertContent', modelIndentPasteFixer, { priority: 'high' } );\n\n\t\t// Register commands for numbered and bulleted list.\n\t\teditor.commands.add( 'numberedList', new LegacyListCommand( editor, 'numbered' ) );\n\t\teditor.commands.add( 'bulletedList', new LegacyListCommand( editor, 'bulleted' ) );\n\n\t\t// Register commands for indenting.\n\t\teditor.commands.add( 'indentList', new LegacyIndentCommand( editor, 'forward' ) );\n\t\teditor.commands.add( 'outdentList', new LegacyIndentCommand( editor, 'backward' ) );\n\n\t\tconst viewDocument = editing.view.document;\n\n\t\t// Overwrite default Enter key behavior.\n\t\t// If Enter key is pressed with selection collapsed in empty list item, outdent it instead of breaking it.\n\t\tthis.listenTo<ViewDocumentEnterEvent>( viewDocument, 'enter', ( evt, data ) => {\n\t\t\tconst doc = this.editor.model.document;\n\t\t\tconst positionParent = doc.selection.getLastPosition()!.parent;\n\n\t\t\tif ( doc.selection.isCollapsed && positionParent.name == 'listItem' && positionParent.isEmpty ) {\n\t\t\t\tthis.editor.execute( 'outdentList' );\n\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: 'li' } );\n\n\t\t// Overwrite default Backspace key behavior.\n\t\t// If Backspace key is pressed with selection collapsed on first position in first list item, outdent it. #83\n\t\tthis.listenTo<ViewDocumentDeleteEvent>( viewDocument, 'delete', ( evt, data ) => {\n\t\t\t// Check conditions from those that require less computations like those immediately available.\n\t\t\tif ( data.direction !== 'backward' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selection = this.editor.model.document.selection;\n\n\t\t\tif ( !selection.isCollapsed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst firstPosition = selection.getFirstPosition()!;\n\n\t\t\tif ( !firstPosition.isAtStart ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst positionParent = firstPosition.parent;\n\n\t\t\tif ( positionParent.name !== 'listItem' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst previousIsAListItem = positionParent.previousSibling && ( positionParent.previousSibling as any ).name === 'listItem';\n\n\t\t\tif ( previousIsAListItem ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.editor.execute( 'outdentList' );\n\n\t\t\tdata.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: 'li' } );\n\n\t\tthis.listenTo<ViewDocumentTabEvent>( editor.editing.view.document, 'tab', ( evt, data ) => {\n\t\t\tconst commandName = data.shiftKey ? 'outdentList' : 'indentList';\n\t\t\tconst command = this.editor.commands.get( commandName )!;\n\n\t\t\tif ( command.isEnabled ) {\n\t\t\t\teditor.execute( commandName );\n\n\t\t\t\tdata.stopPropagation();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: 'li' } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst commands = this.editor.commands;\n\n\t\tconst indent = commands.get( 'indent' ) as MultiCommand;\n\t\tconst outdent = commands.get( 'outdent' ) as MultiCommand;\n\n\t\tif ( indent ) {\n\t\t\tindent.registerChildCommand( commands.get( 'indentList' )! );\n\t\t}\n\n\t\tif ( outdent ) {\n\t\t\toutdent.registerChildCommand( commands.get( 'outdentList' )! );\n\t\t}\n\t}\n}\n\nfunction getViewListItemLength( element: ViewElement ) {\n\tlet length = 1;\n\n\tfor ( const child of element.getChildren() as Iterable<ViewElement> ) {\n\t\tif ( child.name == 'ul' || child.name == 'ol' ) {\n\t\t\tfor ( const item of child.getChildren() ) {\n\t\t\t\tlength += getViewListItemLength( item as ViewElement );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn length;\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/**\n * @module list/legacylist\n */\n\nimport { LegacyListEditing } from './legacylist/legacylistediting.js';\nimport { ListUI } from './list/listui.js';\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\n/**\n * The legacy list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/legacylist/legacylistediting~LegacyListEditing legacy list editing feature}\n * and {@link module:list/list/listui~ListUI list UI feature}.\n */\nexport class LegacyList extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LegacyListEditing, ListUI ]> {\n\t\treturn [ LegacyListEditing, ListUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LegacyList' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module list/legacylistproperties/legacyliststylecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { getListTypeFromListStyleType, getSelectedListItems } from '../legacylist/legacyutils.js';\n\n/**\n * The list style command. It changes the `listStyle` attribute of the selected list items.\n *\n * If the list type (numbered or bulleted) can be inferred from the passed style type,\n * the command tries to convert selected items to a list of that type.\n * It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n */\nexport class LegacyListStyleCommand extends Command {\n\tdeclare public isStyleTypeSupported: undefined;\n\n\t/**\n\t * @inheritDoc\n\t * @readonly\n\t */\n\tdeclare public value: string | null;\n\n\t/**\n\t * The default type of the list style.\n\t */\n\tpublic readonly defaultType: string;\n\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param defaultType The list type that will be used by default if the value was not specified during\n\t * the command execution.\n\t */\n\tconstructor( editor: Editor, defaultType: string ) {\n\t\tsuper( editor );\n\n\t\tthis.defaultType = defaultType;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.type The type of the list style, e.g. `'disc'` or `'square'`. If `null` is specified, the default\n\t * style will be applied.\n\t */\n\tpublic override execute( options: { type?: string | null } = {} ): void {\n\t\tthis._tryToConvertItemsToList( options );\n\n\t\tconst model = this.editor.model;\n\t\tconst listItems = getSelectedListItems( model );\n\n\t\tif ( !listItems.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const item of listItems ) {\n\t\t\t\twriter.setAttribute( 'listStyle', options.type || this.defaultType, item );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue() {\n\t\tconst listItem = this.editor.model.document.selection.getFirstPosition()!.parent;\n\n\t\tif ( listItem && listItem.is( 'element', 'listItem' ) ) {\n\t\t\treturn listItem.getAttribute( 'listStyle' ) as string;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled() {\n\t\tconst editor = this.editor;\n\n\t\tconst numberedList = editor.commands.get( 'numberedList' )!;\n\t\tconst bulletedList = editor.commands.get( 'bulletedList' )!;\n\n\t\treturn numberedList.isEnabled || bulletedList.isEnabled;\n\t}\n\n\t/**\n\t * Checks if the provided list style is valid. Also changes the selection to a list if it's not set yet.\n\t *\n\t * @param options Additional options.\n\t * @param options.type The type of the list style. If `null` is specified, the function does nothing.\n\t*/\n\tprivate _tryToConvertItemsToList( options: { type?: string | null } ) {\n\t\tif ( !options.type ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst listType = getListTypeFromListStyleType( options.type );\n\n\t\t/* istanbul ignore next -- @preserve */\n\t\tif ( !listType ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst commandName = `${ listType }List` as const;\n\t\tconst command = editor.commands.get( commandName )!;\n\n\t\tif ( !command.value ) {\n\t\t\teditor.execute( commandName );\n\t\t}\n\t}\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/**\n * @module list/legacylistproperties/legacylistreversedcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { getSelectedListItems } from '../legacylist/legacyutils.js';\n\n/**\n * The reversed list command. It changes the `listReversed` attribute of the selected list items. As a result, the list order will be\n * reversed.\n * It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n */\nexport class LegacyListReversedCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public value: boolean | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst value = this._getValue();\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.reversed Whether the list should be reversed.\n\t */\n\tpublic override execute( options: { reversed?: boolean } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst listItems = getSelectedListItems( model )\n\t\t\t.filter( item => item.getAttribute( 'listType' ) == 'numbered' );\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const item of listItems ) {\n\t\t\t\twriter.setAttribute( 'listReversed', !!options.reversed, item );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue() {\n\t\tconst listItem = this.editor.model.document.selection.getFirstPosition()!.parent;\n\n\t\tif ( listItem && listItem.is( 'element', 'listItem' ) && listItem.getAttribute( 'listType' ) == 'numbered' ) {\n\t\t\treturn listItem.getAttribute( 'listReversed' ) as boolean;\n\t\t}\n\n\t\treturn null;\n\t}\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/**\n * @module list/legacylistproperties/legacyliststartcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { getSelectedListItems } from '../legacylist/legacyutils.js';\n\n/**\n * The list start index command. It changes the `listStart` attribute of the selected list items.\n * It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n */\nexport class LegacyListStartCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tdeclare public value: number | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst value = this._getValue();\n\t\tthis.value = value;\n\t\tthis.isEnabled = value != null;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Execute options.\n\t * @param options.startIndex The list start index.\n\t */\n\tpublic override execute( { startIndex = 1 }: { startIndex?: number } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst listItems = getSelectedListItems( model )\n\t\t\t.filter( item => item.getAttribute( 'listType' ) == 'numbered' );\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const item of listItems ) {\n\t\t\t\twriter.setAttribute( 'listStart', startIndex >= 0 ? startIndex : 1, item );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */\n\tprivate _getValue() {\n\t\tconst listItem = this.editor.model.document.selection.getFirstPosition()!.parent;\n\n\t\tif ( listItem && listItem.is( 'element', 'listItem' ) && listItem.getAttribute( 'listType' ) == 'numbered' ) {\n\t\t\treturn listItem.getAttribute( 'listStart' ) as number;\n\t\t}\n\n\t\treturn null;\n\t}\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/**\n * @module list/legacylistproperties/legacylistpropertiesediting\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tDifferItem,\n\tDowncastAttributeEvent,\n\tDowncastDispatcher,\n\tViewDowncastWriter,\n\tModelElement,\n\tModelDeleteContentEvent,\n\tModelNode,\n\tUpcastDispatcher,\n\tUpcastElementEvent,\n\tViewElement,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport { LegacyListEditing } from '../legacylist/legacylistediting.js';\nimport { LegacyListStyleCommand } from './legacyliststylecommand.js';\nimport { LegacyListReversedCommand } from './legacylistreversedcommand.js';\nimport { LegacyListStartCommand } from './legacyliststartcommand.js';\nimport { getSiblingListItem, getSiblingNodes } from '../legacylist/legacyutils.js';\nimport type { ListPropertiesConfig } from '../listconfig.js';\nimport { normalizeListStyle } from '../listproperties/utils/style.js';\n\nconst DEFAULT_LIST_TYPE = 'default';\n\n/**\n * The engine of the list properties feature.\n *\n * It sets the value for the `listItem` attribute of the {@link module:list/legacylist~LegacyList `<listItem>`} element that\n * allows modifying the list style type.\n *\n * It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.\n * Read more in {@link module:list/listconfig~ListPropertiesConfig}.\n */\nexport class LegacyListPropertiesEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LegacyListEditing ]> {\n\t\treturn [ LegacyListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LegacyListPropertiesEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'list', {\n\t\t\tproperties: {\n\t\t\t\tstyles: true,\n\t\t\t\tstartIndex: false,\n\t\t\t\treversed: false\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tconst enabledProperties = editor.config.get( 'list.properties' )!;\n\t\tconst strategies = createAttributeStrategies( enabledProperties );\n\n\t\t// Extend schema.\n\t\tmodel.schema.extend( 'listItem', {\n\t\t\tallowAttributes: strategies.map( s => s.attributeName )\n\t\t} );\n\n\t\tfor ( const strategy of strategies ) {\n\t\t\tstrategy.addCommand( editor );\n\t\t}\n\n\t\t// Fix list attributes when modifying their nesting levels (the `listIndent` attribute).\n\t\tthis.listenTo( editor.commands.get( 'indentList' )!, '_executeCleanup', fixListAfterIndentListCommand( editor, strategies ) );\n\t\tthis.listenTo( editor.commands.get( 'outdentList' )!, '_executeCleanup', fixListAfterOutdentListCommand( editor, strategies ) );\n\n\t\tthis.listenTo( editor.commands.get( 'bulletedList' )!, '_executeCleanup', restoreDefaultListStyle( editor ) );\n\t\tthis.listenTo( editor.commands.get( 'numberedList' )!, '_executeCleanup', restoreDefaultListStyle( editor ) );\n\n\t\t// Register a post-fixer that ensures that the attributes is specified in each `listItem` element.\n\t\tmodel.document.registerPostFixer( fixListAttributesOnListItemElements( editor, strategies ) );\n\n\t\t// Set up conversion.\n\t\teditor.conversion.for( 'upcast' ).add( upcastListItemAttributes( strategies ) );\n\t\teditor.conversion.for( 'downcast' ).add( downcastListItemAttributes( strategies ) );\n\n\t\t// Handle merging two separated lists into the single one.\n\t\tthis._mergeListAttributesWhileMergingLists( strategies );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Enable post-fixer that removes the attributes from to-do list items only if the \"TodoList\" plugin is on.\n\t\t// We need to registry the hook here since the `TodoList` plugin can be added after the `ListPropertiesEditing`.\n\t\tif ( editor.commands.get( 'todoList' ) ) {\n\t\t\teditor.model.document.registerPostFixer( removeListItemAttributesFromTodoList( editor ) );\n\t\t}\n\t}\n\n\t/**\n\t * Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether two lists will be merged into a single\n\t * one after deleting the content.\n\t *\n\t * The purpose of this action is to adjust the `listStyle`, `listReversed` and `listStart` values\n\t * for the list that was merged.\n\t *\n\t * Consider the following model's content:\n\t *\n\t * ```xml\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t * <paragraph>[A paragraph.]</paragraph>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 2</listItem>\n\t * ```\n\t *\n\t * After removing the paragraph element, the second list will be merged into the first one.\n\t * We want to inherit the `listStyle` attribute for the second list from the first one.\n\t *\n\t * ```xml\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t * ```\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/7879.\n\t *\n\t * @param attributeStrategies Strategies for the enabled attributes.\n\t */\n\tprivate _mergeListAttributesWhileMergingLists( attributeStrategies: Array<AttributeStrategy> ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\t// First the outer-most`listItem` in the first list reference.\n\t\t// If found, the lists should be merged and this `listItem` provides the attributes\n\t\t// and it is also a starting point when searching for items in the second list.\n\t\tlet firstMostOuterItem: ModelElement | null;\n\n\t\t// Check whether the removed content is between two lists.\n\t\tthis.listenTo<ModelDeleteContentEvent>( model, 'deleteContent', ( evt, [ selection ] ) => {\n\t\t\tconst firstPosition = selection.getFirstPosition()!;\n\t\t\tconst lastPosition = selection.getLastPosition()!;\n\n\t\t\t// Typing or removing content in a single item. Aborting.\n\t\t\tif ( firstPosition.parent === lastPosition.parent ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// An element before the content that will be removed is not a list.\n\t\t\tif ( !firstPosition.parent.is( 'element', 'listItem' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst nextSibling = lastPosition.parent.nextSibling;\n\n\t\t\t// An element after the content that will be removed is not a list.\n\t\t\tif ( !nextSibling || !nextSibling.is( 'element', 'listItem' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Find the outermost list item based on the `listIndent` attribute. We can't assume that `listIndent=0`\n\t\t\t// because the selection can be hooked in nested lists.\n\t\t\t//\n\t\t\t// <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t\t\t// <listItem listIndent=\"1\" listType=\"bulleted\" listStyle=\"square\">UL List [item 1.1</listItem>\n\t\t\t// <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">[]UL List item 1.</listItem>\n\t\t\t// <listItem listIndent=\"1\" listType=\"bulleted\" listStyle=\"circle\">UL List ]item 1.1</listItem>\n\t\t\t//\n\t\t\t// After deleting the content, we would like to inherit the \"square\" attribute for the last element:\n\t\t\t//\n\t\t\t// <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t\t\t// <listItem listIndent=\"1\" listType=\"bulleted\" listStyle=\"square\">UL List []item 1.1</listItem>\n\t\t\tconst mostOuterItemList = getSiblingListItem( firstPosition.parent, {\n\t\t\t\tsameIndent: true,\n\t\t\t\tlistIndent: nextSibling.getAttribute( 'listIndent' ) as number\n\t\t\t} );\n\n\t\t\t// The outermost list item may not exist while removing elements between lists with different value\n\t\t\t// of the `listIndent` attribute. In such a case we don't want to update anything.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/8073.\n\t\t\tif ( !mostOuterItemList ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( mostOuterItemList.getAttribute( 'listType' ) === nextSibling.getAttribute( 'listType' ) ) {\n\t\t\t\tfirstMostOuterItem = mostOuterItemList;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// If so, update the `listStyle` attribute for the second list.\n\t\tthis.listenTo<ModelDeleteContentEvent>( model, 'deleteContent', () => {\n\t\t\tif ( !firstMostOuterItem ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmodel.change( writer => {\n\t\t\t\t// Find the first most-outer item list in the merged list.\n\t\t\t\t// A case when the first list item in the second list was merged into the last item in the first list.\n\t\t\t\t//\n\t\t\t\t// <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t\t\t\t// <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t\t\t\t// <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">[]UL List item 1</listItem>\n\t\t\t\t// <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 2</listItem>\n\t\t\t\tconst secondListMostOuterItem = getSiblingListItem( firstMostOuterItem!.nextSibling, {\n\t\t\t\t\tsameIndent: true,\n\t\t\t\t\tlistIndent: firstMostOuterItem!.getAttribute( 'listIndent' ) as number,\n\t\t\t\t\tdirection: 'forward'\n\t\t\t\t} );\n\n\t\t\t\t// If the selection ends in a non-list element, there are no <listItem>s that would require adjustments.\n\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/8642.\n\t\t\t\tif ( !secondListMostOuterItem ) {\n\t\t\t\t\tfirstMostOuterItem = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst items = [\n\t\t\t\t\tsecondListMostOuterItem,\n\t\t\t\t\t...getSiblingNodes( writer.createPositionAt( secondListMostOuterItem, 0 ), 'forward' )\n\t\t\t\t];\n\n\t\t\t\tfor ( const listItem of items ) {\n\t\t\t\t\tfor ( const strategy of attributeStrategies ) {\n\t\t\t\t\t\tif ( strategy.appliesToListItem( listItem ) ) {\n\t\t\t\t\t\t\tconst attributeName = strategy.attributeName;\n\t\t\t\t\t\t\tconst value = firstMostOuterItem!.getAttribute( attributeName );\n\n\t\t\t\t\t\t\twriter.setAttribute( attributeName, value, listItem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tfirstMostOuterItem = null;\n\t\t}, { priority: 'low' } );\n\t}\n}\n\n/**\n * Strategy for dealing with `listItem` attributes supported by this plugin.\n */\ninterface AttributeStrategy {\n\tattributeName: string;\n\tdefaultValue: unknown;\n\taddCommand: ( editor: Editor ) => void;\n\tappliesToListItem: ( element: ModelNode ) => boolean;\n\tsetAttributeOnDowncast: ( writer: ViewDowncastWriter, value: any, element: ViewElement ) => void;\n\tgetAttributeOnUpcast: ( element: ViewElement ) => unknown;\n}\n\n/**\n * Creates an array of strategies for dealing with enabled listItem attributes.\n */\nfunction createAttributeStrategies( enabledProperties: ListPropertiesConfig ) {\n\tconst strategies: Array<AttributeStrategy> = [];\n\n\tif ( enabledProperties.styles ) {\n\t\tstrategies.push( {\n\t\t\tattributeName: 'listStyle',\n\t\t\tdefaultValue: DEFAULT_LIST_TYPE,\n\n\t\t\taddCommand( editor ) {\n\t\t\t\teditor.commands.add( 'listStyle', new LegacyListStyleCommand( editor, DEFAULT_LIST_TYPE ) );\n\t\t\t},\n\n\t\t\tappliesToListItem() {\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\tsetAttributeOnDowncast( writer, listStyle, element ) {\n\t\t\t\tif ( listStyle && listStyle !== DEFAULT_LIST_TYPE ) {\n\t\t\t\t\twriter.setStyle( 'list-style-type', listStyle, element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeStyle( 'list-style-type', element );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetAttributeOnUpcast( listParent ) {\n\t\t\t\treturn normalizeListStyle( listParent.getStyle( 'list-style-type' )! ) || DEFAULT_LIST_TYPE;\n\t\t\t}\n\t\t} );\n\t}\n\n\tif ( enabledProperties.reversed ) {\n\t\tstrategies.push( {\n\t\t\tattributeName: 'listReversed',\n\t\t\tdefaultValue: false,\n\n\t\t\taddCommand( editor ) {\n\t\t\t\teditor.commands.add( 'listReversed', new LegacyListReversedCommand( editor ) );\n\t\t\t},\n\n\t\t\tappliesToListItem( item ) {\n\t\t\t\treturn item.getAttribute( 'listType' ) == 'numbered';\n\t\t\t},\n\n\t\t\tsetAttributeOnDowncast( writer, listReversed, element ) {\n\t\t\t\tif ( listReversed ) {\n\t\t\t\t\twriter.setAttribute( 'reversed', 'reversed', element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'reversed', element );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetAttributeOnUpcast( listParent ) {\n\t\t\t\treturn listParent.hasAttribute( 'reversed' );\n\t\t\t}\n\t\t} );\n\t}\n\n\tif ( enabledProperties.startIndex ) {\n\t\tstrategies.push( {\n\t\t\tattributeName: 'listStart',\n\t\t\tdefaultValue: 1,\n\n\t\t\taddCommand( editor ) {\n\t\t\t\teditor.commands.add( 'listStart', new LegacyListStartCommand( editor ) );\n\t\t\t},\n\n\t\t\tappliesToListItem( item ) {\n\t\t\t\treturn item.getAttribute( 'listType' ) == 'numbered';\n\t\t\t},\n\n\t\t\tsetAttributeOnDowncast( writer, listStart, element ) {\n\t\t\t\tif ( listStart == 0 || listStart > 1 ) {\n\t\t\t\t\twriter.setAttribute( 'start', listStart, element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'start', element );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetAttributeOnUpcast( listParent ) {\n\t\t\t\tconst startAttributeValue: any = listParent.getAttribute( 'start' );\n\n\t\t\t\treturn startAttributeValue >= 0 ? startAttributeValue : 1;\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn strategies;\n}\n\n/**\n * Returns a converter consumes the `style`, `reversed` and `start` attribute.\n * In `style` it searches for the `list-style-type` definition.\n * If not found, the `\"default\"` value will be used.\n */\nfunction upcastListItemAttributes( attributeStrategies: Array<AttributeStrategy> ) {\n\treturn ( dispatcher: UpcastDispatcher ) => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:li', ( evt, data, conversionApi ) => {\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/13858\n\t\t\tif ( !data.modelRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst listParent = data.viewItem.parent as ViewElement;\n\t\t\tconst listItem = data.modelRange.start.nodeAfter || data.modelRange.end.nodeBefore;\n\n\t\t\tfor ( const strategy of attributeStrategies ) {\n\t\t\t\tif ( strategy.appliesToListItem( listItem! ) ) {\n\t\t\t\t\tconst listStyle = strategy.getAttributeOnUpcast( listParent );\n\t\t\t\t\tconversionApi.writer.setAttribute( strategy.attributeName, listStyle, listItem! );\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t};\n}\n\n/**\n * Returns a converter that adds `reversed`, `start` attributes and adds `list-style-type` definition as a value for the `style` attribute.\n * The `\"default\"` values are removed and not present in the view/data.\n */\nfunction downcastListItemAttributes( attributeStrategies: Array<AttributeStrategy> ) {\n\treturn ( dispatcher: DowncastDispatcher ) => {\n\t\tfor ( const strategy of attributeStrategies ) {\n\t\t\tdispatcher.on<DowncastAttributeEvent>( `attribute:${ strategy.attributeName }:listItem`, ( evt, data, conversionApi ) => {\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst currentElement = data.item as ModelElement;\n\n\t\t\t\tconst previousElement = getSiblingListItem( currentElement.previousSibling, {\n\t\t\t\t\tsameIndent: true,\n\t\t\t\t\tlistIndent: currentElement.getAttribute( 'listIndent' ) as number,\n\t\t\t\t\tdirection: 'backward'\n\t\t\t\t} );\n\n\t\t\t\tconst viewItem = conversionApi.mapper.toViewElement( currentElement )!;\n\n\t\t\t\t// A case when elements represent different lists. We need to separate their container.\n\t\t\t\tif ( !areRepresentingSameList( currentElement, previousElement ) ) {\n\t\t\t\t\tviewWriter.breakContainer( viewWriter.createPositionBefore( viewItem ) );\n\t\t\t\t}\n\t\t\t\tstrategy.setAttributeOnDowncast( viewWriter, data.attributeNewValue, viewItem.parent as ViewElement );\n\t\t\t}, { priority: 'low' } );\n\t\t}\n\t};\n\n\t/**\n\t * Checks whether specified list items belong to the same list.\n\t */\n\tfunction areRepresentingSameList( listItem1: ModelElement, listItem2: ModelElement | null ) {\n\t\treturn listItem2 &&\n\t\t\tlistItem1.getAttribute( 'listType' ) === listItem2.getAttribute( 'listType' ) &&\n\t\t\tlistItem1.getAttribute( 'listIndent' ) === listItem2.getAttribute( 'listIndent' ) &&\n\t\t\tlistItem1.getAttribute( 'listStyle' ) === listItem2.getAttribute( 'listStyle' ) &&\n\t\t\tlistItem1.getAttribute( 'listReversed' ) === listItem2.getAttribute( 'listReversed' ) &&\n\t\t\tlistItem1.getAttribute( 'listStart' ) === listItem2.getAttribute( 'listStart' );\n\t}\n}\n\n/**\n * When indenting list, nested list should clear its value for the attributes or inherit from nested lists.\n *\n * ■ List item 1.\n * ■ List item 2.[]\n * ■ List item 3.\n * editor.execute( 'indentList' );\n *\n * ■ List item 1.\n *     ○ List item 2.[]\n * ■ List item 3.\n */\nfunction fixListAfterIndentListCommand( editor: Editor, attributeStrategies: Array<AttributeStrategy> ) {\n\treturn ( evt: unknown, changedItems: Array<ModelElement> ) => {\n\t\tconst root = changedItems[ 0 ];\n\t\tconst rootIndent = root.getAttribute( 'listIndent' ) as number;\n\n\t\tconst itemsToUpdate = changedItems.filter( item => item.getAttribute( 'listIndent' ) === rootIndent );\n\n\t\t// A case where a few list items are indented must be checked separately\n\t\t// since `getSiblingListItem()` returns the first changed element.\n\t\t// ■ List item 1.\n\t\t//     ○ [List item 2.\n\t\t//     ○ List item 3.]\n\t\t// ■ List item 4.\n\t\t//\n\t\t// List items: `2` and `3` should be adjusted.\n\t\tlet previousSibling: ModelElement | null = null;\n\n\t\tif ( root.previousSibling!.getAttribute( 'listIndent' ) as number + 1 !== rootIndent ) {\n\t\t\tpreviousSibling = getSiblingListItem( root.previousSibling, {\n\t\t\t\tsameIndent: true, direction: 'backward', listIndent: rootIndent\n\t\t\t} );\n\t\t}\n\n\t\teditor.model.change( writer => {\n\t\t\tfor ( const item of itemsToUpdate ) {\n\t\t\t\tfor ( const strategy of attributeStrategies ) {\n\t\t\t\t\tif ( strategy.appliesToListItem( item ) ) {\n\t\t\t\t\t\tconst valueToSet = previousSibling == null ?\n\t\t\t\t\t\t\tstrategy.defaultValue :\n\t\t\t\t\t\t\tpreviousSibling.getAttribute( strategy.attributeName );\n\n\t\t\t\t\t\twriter.setAttribute( strategy.attributeName, valueToSet, item );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t};\n}\n\n/**\n * When outdenting a list, a nested list should copy attribute values\n * from the previous sibling list item including the same value for the `listIndent` value.\n *\n * ■ List item 1.\n *     ○ List item 2.[]\n * ■ List item 3.\n *\n * editor.execute( 'outdentList' );\n *\n * ■ List item 1.\n * ■ List item 2.[]\n * ■ List item 3.\n */\nfunction fixListAfterOutdentListCommand( editor: Editor, attributeStrategies: Array<AttributeStrategy> ) {\n\treturn ( evt: unknown, changedItems: Array<ModelElement> ) => {\n\t\tchangedItems = changedItems.reverse().filter( item => item.is( 'element', 'listItem' ) );\n\n\t\tif ( !changedItems.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst indent = changedItems[ 0 ].getAttribute( 'listIndent' );\n\t\tconst listType = changedItems[ 0 ].getAttribute( 'listType' );\n\t\tlet listItem: ModelNode | null = changedItems[ 0 ].previousSibling!;\n\n\t\t// ■ List item 1.\n\t\t//     ○ List item 2.\n\t\t//     ○ List item 3.[]\n\t\t// ■ List item 4.\n\t\t//\n\t\t// After outdenting a list, `List item 3` should inherit the `listStyle` attribute from `List item 1`.\n\t\t//\n\t\t// ■ List item 1.\n\t\t//     ○ List item 2.\n\t\t// ■ List item 3.[]\n\t\t// ■ List item 4.\n\t\tif ( listItem.is( 'element', 'listItem' ) ) {\n\t\t\twhile ( listItem!.getAttribute( 'listIndent' ) !== indent ) {\n\t\t\t\tlistItem = listItem!.previousSibling;\n\t\t\t}\n\t\t} else {\n\t\t\tlistItem = null;\n\t\t}\n\n\t\t// Outdenting such a list should restore values based on `List item 4`.\n\t\t// ■ List item 1.[]\n\t\t//     ○ List item 2.\n\t\t//     ○ List item 3.\n\t\t// ■ List item 4.\n\t\tif ( !listItem ) {\n\t\t\tlistItem = changedItems[ changedItems.length - 1 ].nextSibling;\n\t\t}\n\n\t\t// And such a list should not modify anything.\n\t\t// However, `listItem` can indicate a node below the list. Be sure that we have the `listItem` element.\n\t\t// ■ List item 1.[]\n\t\t//     ○ List item 2.\n\t\t//     ○ List item 3.\n\t\t// <paragraph>The later if check.</paragraph>\n\t\tif ( !listItem || !listItem.is( 'element', 'listItem' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not modify the list if found `listItem` represents other type of list than outdented list items.\n\t\tif ( listItem.getAttribute( 'listType' ) !== listType ) {\n\t\t\treturn;\n\t\t}\n\n\t\teditor.model.change( writer => {\n\t\t\tconst itemsToUpdate = changedItems.filter( item => item.getAttribute( 'listIndent' ) === indent );\n\n\t\t\tfor ( const item of itemsToUpdate ) {\n\t\t\t\tfor ( const strategy of attributeStrategies ) {\n\t\t\t\t\tif ( strategy.appliesToListItem( item ) ) {\n\t\t\t\t\t\tconst attributeName = strategy.attributeName;\n\t\t\t\t\t\tconst valueToSet = listItem!.getAttribute( attributeName );\n\n\t\t\t\t\t\twriter.setAttribute( attributeName, valueToSet, item );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t};\n}\n\n/**\n * Each `listItem` element must have specified the `listStyle`, `listReversed` and `listStart` attributes\n * if they are enabled and supported by its `listType`.\n * This post-fixer checks whether inserted elements `listItem` elements should inherit the attribute values from\n * their sibling nodes or should use the default values.\n *\n * Paragraph[]\n * ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2. // ...\n * ■ List item 3. // ...\n *\n * editor.execute( 'bulletedList' )\n *\n * ■ Paragraph[]  // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2.\n * ■ List item 3.\n *\n * It also covers a such change:\n *\n * [Paragraph 1\n * Paragraph 2]\n * ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2. // ...\n * ■ List item 3. // ...\n *\n * editor.execute( 'numberedList' )\n *\n * 1. [Paragraph 1 // [listStyle=\"default\", listType=\"numbered\"]\n * 2. Paragraph 2] // [listStyle=\"default\", listType=\"numbered\"]\n * ■ List item 1.  // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2.  // ...\n * ■ List item 3.  // ...\n */\nfunction fixListAttributesOnListItemElements( editor: Editor, attributeStrategies: Array<AttributeStrategy> ) {\n\treturn ( writer: ModelWriter ) => {\n\t\tlet wasFixed = false;\n\n\t\tconst insertedListItems = getChangedListItems( editor.model.document.differ.getChanges() )\n\t\t\t.filter( item => {\n\t\t\t\t// Don't touch todo lists. They are handled in another post-fixer.\n\t\t\t\treturn item.getAttribute( 'listType' ) !== 'todo';\n\t\t\t} );\n\n\t\tif ( !insertedListItems.length ) {\n\t\t\treturn wasFixed;\n\t\t}\n\n\t\t// Check whether the last inserted element is next to the `listItem` element.\n\t\t//\n\t\t// ■ Paragraph[]  // <-- The inserted item.\n\t\t// ■ List item 1.\n\t\tlet existingListItem = insertedListItems[ insertedListItems.length - 1 ].nextSibling;\n\n\t\t// If it doesn't, maybe the `listItem` was inserted at the end of the list.\n\t\t//\n\t\t// ■ List item 1.\n\t\t// ■ Paragraph[]  // <-- The inserted item.\n\t\tif ( !existingListItem || !existingListItem.is( 'element', 'listItem' ) ) {\n\t\t\texistingListItem = insertedListItems[ 0 ].previousSibling;\n\n\t\t\tif ( existingListItem ) {\n\t\t\t\tconst indent = insertedListItems[ 0 ].getAttribute( 'listIndent' );\n\n\t\t\t\t// But we need to find a `listItem` with the `listIndent=0` attribute.\n\t\t\t\t// If doesn't, maybe the `listItem` was inserted at the end of the list.\n\t\t\t\t//\n\t\t\t\t// ■ List item 1.\n\t\t\t\t//     ○ List item 2.\n\t\t\t\t// ■ Paragraph[]  // <-- The inserted item.\n\t\t\t\twhile ( existingListItem.is( 'element', 'listItem' ) && existingListItem.getAttribute( 'listIndent' ) !== indent ) {\n\t\t\t\t\texistingListItem = existingListItem.previousSibling;\n\n\t\t\t\t\t// If the item does not exist, most probably there is no other content in the editor.\n\t\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/8072.\n\t\t\t\t\tif ( !existingListItem ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( const strategy of attributeStrategies ) {\n\t\t\tconst attributeName = strategy.attributeName;\n\n\t\t\tfor ( const item of insertedListItems ) {\n\t\t\t\tif ( !strategy.appliesToListItem( item ) ) {\n\t\t\t\t\twriter.removeAttribute( attributeName, item );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( !item.hasAttribute( attributeName ) ) {\n\t\t\t\t\tif ( shouldInheritListType( existingListItem, item, strategy ) ) {\n\t\t\t\t\t\twriter.setAttribute( attributeName, existingListItem!.getAttribute( attributeName ), item );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.setAttribute( attributeName, strategy.defaultValue, item );\n\t\t\t\t\t}\n\t\t\t\t\twasFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\t// Adjust the `listStyle`, `listReversed` and `listStart`\n\t\t\t\t\t// attributes for inserted (pasted) items. See https://github.com/ckeditor/ckeditor5/issues/8160.\n\t\t\t\t\t//\n\t\t\t\t\t// ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n\t\t\t\t\t//     ○ List item 1.1. // [listStyle=\"circle\", listType=\"bulleted\"]\n\t\t\t\t\t//     ○ [] (selection is here)\n\t\t\t\t\t//\n\t\t\t\t\t// Then, pasting a list with different attributes (listStyle, listType):\n\t\t\t\t\t//\n\t\t\t\t\t// 1. First. // [listStyle=\"decimal\", listType=\"numbered\"]\n\t\t\t\t\t// 2. Second // [listStyle=\"decimal\", listType=\"numbered\"]\n\t\t\t\t\t//\n\t\t\t\t\t// The `listType` attribute will be corrected by the `ListEditing` converters.\n\t\t\t\t\t// We need to adjust the `listStyle` attribute. Expected structure:\n\t\t\t\t\t//\n\t\t\t\t\t// ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n\t\t\t\t\t//     ○ List item 1.1. // [listStyle=\"circle\", listType=\"bulleted\"]\n\t\t\t\t\t//     ○ First. // [listStyle=\"circle\", listType=\"bulleted\"]\n\t\t\t\t\t//     ○ Second // [listStyle=\"circle\", listType=\"bulleted\"]\n\t\t\t\t\tconst previousSibling = item.previousSibling;\n\n\t\t\t\t\tif ( shouldInheritListTypeFromPreviousItem( previousSibling, item, strategy.attributeName ) ) {\n\t\t\t\t\t\twriter.setAttribute( attributeName, previousSibling!.getAttribute( attributeName ), item );\n\n\t\t\t\t\t\twasFixed = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn wasFixed;\n\t};\n}\n\n/**\n * Checks whether the `listStyle`, `listReversed` and `listStart` attributes\n * should be copied from the `baseItem` element.\n *\n * The attribute should be copied if the inserted element does not have defined it and\n * the value for the element is other than default in the base element.\n */\nfunction shouldInheritListType( baseItem: ModelNode | null, itemToChange: ModelElement, attributeStrategy: AttributeStrategy ) {\n\tif ( !baseItem ) {\n\t\treturn false;\n\t}\n\n\tconst baseListAttribute = baseItem.getAttribute( attributeStrategy.attributeName );\n\n\tif ( !baseListAttribute ) {\n\t\treturn false;\n\t}\n\n\tif ( baseListAttribute == attributeStrategy.defaultValue ) {\n\t\treturn false;\n\t}\n\n\tif ( baseItem.getAttribute( 'listType' ) !== itemToChange.getAttribute( 'listType' ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Checks whether the `listStyle`, `listReversed` and `listStart` attributes\n * should be copied from previous list item.\n *\n * The attribute should be copied if there's a mismatch of styles of the pasted list into a nested list.\n * Top-level lists are not normalized as we allow side-by-side list of different types.\n */\nfunction shouldInheritListTypeFromPreviousItem( previousItem: ModelNode | null, itemToChange: ModelElement, attributeName: string ) {\n\tif ( !previousItem || !previousItem.is( 'element', 'listItem' ) ) {\n\t\treturn false;\n\t}\n\n\tif ( itemToChange.getAttribute( 'listType' ) !== previousItem.getAttribute( 'listType' ) ) {\n\t\treturn false;\n\t}\n\n\tconst previousItemIndent = previousItem.getAttribute( 'listIndent' ) as number;\n\n\tif ( previousItemIndent < 1 || previousItemIndent !== itemToChange.getAttribute( 'listIndent' ) ) {\n\t\treturn false;\n\t}\n\n\tconst previousItemListAttribute = previousItem.getAttribute( attributeName );\n\n\tif ( !previousItemListAttribute || previousItemListAttribute === itemToChange.getAttribute( attributeName ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Removes the `listStyle`, `listReversed` and `listStart` attributes from \"todo\" list items.\n */\nfunction removeListItemAttributesFromTodoList( editor: Editor ) {\n\treturn ( writer: ModelWriter ) => {\n\t\tconst todoListItems = getChangedListItems( editor.model.document.differ.getChanges() )\n\t\t\t.filter( item => {\n\t\t\t\t// Handle the todo lists only. The rest is handled in another post-fixer.\n\t\t\t\treturn item.getAttribute( 'listType' ) === 'todo' && (\n\t\t\t\t\titem.hasAttribute( 'listStyle' ) ||\n\t\t\t\t\titem.hasAttribute( 'listReversed' ) ||\n\t\t\t\t\titem.hasAttribute( 'listStart' )\n\t\t\t\t);\n\t\t\t} );\n\n\t\tif ( !todoListItems.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ( const item of todoListItems ) {\n\t\t\twriter.removeAttribute( 'listStyle', item );\n\t\t\twriter.removeAttribute( 'listReversed', item );\n\t\t\twriter.removeAttribute( 'listStart', item );\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\n/**\n * Restores the `listStyle` attribute after changing the list type.\n */\nfunction restoreDefaultListStyle( editor: Editor ) {\n\treturn ( evt: unknown, changedItems: Array<ModelElement> ) => {\n\t\tchangedItems = changedItems.filter( item => item.is( 'element', 'listItem' ) );\n\n\t\teditor.model.change( writer => {\n\t\t\tfor ( const item of changedItems ) {\n\t\t\t\t// Remove the attribute. Post-fixer will restore the proper value.\n\t\t\t\twriter.removeAttribute( 'listStyle', item );\n\t\t\t}\n\t\t} );\n\t};\n}\n\n/**\n * Returns the `listItem` that was inserted or changed.\n *\n * @param changes The changes list returned by the differ.\n */\nfunction getChangedListItems( changes: Array<DifferItem> ) {\n\tconst items: Array<ModelElement> = [];\n\n\tfor ( const change of changes ) {\n\t\tconst item = getItemFromChange( change );\n\n\t\tif ( item && item.is( 'element', 'listItem' ) ) {\n\t\t\titems.push( item );\n\t\t}\n\t}\n\n\treturn items;\n}\n\nfunction getItemFromChange( change: DifferItem ) {\n\tif ( change.type === 'attribute' ) {\n\t\treturn change.range.start.nodeAfter;\n\t}\n\n\tif ( change.type === 'insert' ) {\n\t\treturn change.position.nodeAfter;\n\t}\n\n\treturn null;\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/**\n * @module list/legacylistproperties\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { LegacyListPropertiesEditing } from './legacylistproperties/legacylistpropertiesediting.js';\nimport { ListPropertiesUI } from './listproperties/listpropertiesui.js';\n\n/**\n * The legacy list properties feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/legacylistproperties/legacylistpropertiesediting~LegacyListPropertiesEditing\n * legacy list properties editing feature} and the\n * {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.\n */\nexport class LegacyListProperties extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LegacyListPropertiesEditing, ListPropertiesUI ]> {\n\t\treturn [ LegacyListPropertiesEditing, ListPropertiesUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LegacyListProperties' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module list/legacytodolist/legacychecktodolistcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\n\nconst attributeKey = 'todoListChecked';\n\n/**\n * The check to-do command.\n *\n * The command is registered by the {@link module:list/legacytodolist/legacytodolistediting~LegacyTodoListEditing} as\n * the `checkTodoList` editor command and it is also available via aliased `todoListCheck` name.\n */\nexport class LegacyCheckTodoListCommand extends Command {\n\t/**\n\t * A list of to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: boolean;\n\n\t/**\n\t * A list of to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t *\n\t * @internal\n\t */\n\tpublic _selectedElements: Array<ModelElement>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._selectedElements = [];\n\n\t\t// Refresh command before executing to be sure all values are up to date.\n\t\t// It is needed when selection has changed before command execution, in the same change block.\n\t\tthis.on( 'execute', () => {\n\t\t\tthis.refresh();\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Updates the command's {@link #value} and {@link #isEnabled} properties based on the current selection.\n\t */\n\tpublic override refresh(): void {\n\t\tthis._selectedElements = this._getSelectedItems();\n\t\tthis.value = this._selectedElements.every( element => !!element.getAttribute( attributeKey ) );\n\t\tthis.isEnabled = !!this._selectedElements.length;\n\t}\n\n\t/**\n\t * Gets all to-do list items selected by the {@link module:engine/model/selection~ModelSelection}.\n\t */\n\tprivate _getSelectedItems() {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\n\t\tconst selectionRange = model.document.selection.getFirstRange()!;\n\t\tconst startElement = selectionRange.start.parent as ModelElement;\n\t\tconst elements: Array<ModelElement> = [];\n\n\t\tif ( schema.checkAttribute( startElement, attributeKey ) ) {\n\t\t\telements.push( startElement );\n\t\t}\n\n\t\tfor ( const item of selectionRange.getItems() as Iterable<ModelElement> ) {\n\t\t\tif ( schema.checkAttribute( item, attributeKey ) && !elements.includes( item ) ) {\n\t\t\t\telements.push( item );\n\t\t\t}\n\t\t}\n\n\t\treturn elements;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply\n\t * the attribute. Otherwise, the command will remove the attribute. If not set, the command will look for its current\n\t * value to decide what it should do.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tthis.editor.model.change( writer => {\n\t\t\tfor ( const element of this._selectedElements ) {\n\t\t\t\tconst value = ( options.forceValue === undefined ) ? !this.value : options.forceValue;\n\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.setAttribute( attributeKey, true, element );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( attributeKey, element );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module list/legacytodolist/legacytodolistconverters\n */\n\nimport type {\n\tDowncastAttributeEvent,\n\tDowncastInsertEvent,\n\tViewDowncastWriter,\n\tModelElement,\n\tMapperModelToViewPositionEvent,\n\tModel,\n\tUpcastElementEvent,\n\tEditingView,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport { createElement, type GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport { generateLiInUl, injectViewList, positionAfterUiElements, findNestedList } from '../legacylist/legacyutils.js';\n\n/**\n * A model-to-view converter for the `listItem` model element insertion.\n *\n * It converts the `listItem` model element to an unordered list with a {@link module:engine/view/uielement~ViewUIElement checkbox element}\n * at the beginning of each list item. It also merges the list with surrounding lists (if available).\n *\n * It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n * @param model Model instance.\n * @param onCheckboxChecked Callback function.\n * @returns Returns a conversion callback.\n */\nexport function modelViewInsertion(\n\tmodel: Model,\n\tonCheckboxChecked: ( element: ModelElement ) => void\n): GetCallback<DowncastInsertEvent<ModelElement>> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst consumable = conversionApi.consumable;\n\n\t\tif ( !consumable.test( data.item, 'insert' ) ||\n\t\t\t!consumable.test( data.item, 'attribute:listType' ) ||\n\t\t\t!consumable.test( data.item, 'attribute:listIndent' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( data.item.getAttribute( 'listType' ) != 'todo' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelItem = data.item;\n\n\t\tconsumable.consume( modelItem, 'insert' );\n\t\tconsumable.consume( modelItem, 'attribute:listType' );\n\t\tconsumable.consume( modelItem, 'attribute:listIndent' );\n\t\tconsumable.consume( modelItem, 'attribute:todoListChecked' );\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewItem = generateLiInUl( modelItem, conversionApi );\n\n\t\tconst isChecked = !!modelItem.getAttribute( 'todoListChecked' );\n\t\tconst checkmarkElement = createCheckmarkElement( modelItem, viewWriter, isChecked, onCheckboxChecked );\n\n\t\tconst span = viewWriter.createContainerElement( 'span', {\n\t\t\tclass: 'todo-list__label__description'\n\t\t} );\n\n\t\tviewWriter.addClass( 'todo-list', viewItem.parent as any );\n\t\tviewWriter.insert( viewWriter.createPositionAt( viewItem, 0 ), checkmarkElement );\n\t\tviewWriter.insert( viewWriter.createPositionAfter( checkmarkElement ), span );\n\n\t\tinjectViewList( modelItem, viewItem, conversionApi, model );\n\t};\n}\n\n/**\n * A model-to-view converter for the `listItem` model element insertion.\n *\n * It is used by {@link module:engine/controller/datacontroller~DataController}.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */\nexport function dataModelViewInsertion( model: Model ): GetCallback<DowncastInsertEvent<ModelElement>> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst consumable = conversionApi.consumable;\n\n\t\tif ( !consumable.test( data.item, 'insert' ) ||\n\t\t\t!consumable.test( data.item, 'attribute:listType' ) ||\n\t\t\t!consumable.test( data.item, 'attribute:listIndent' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( data.item.getAttribute( 'listType' ) != 'todo' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modelItem = data.item;\n\n\t\tconsumable.consume( modelItem, 'insert' );\n\t\tconsumable.consume( modelItem, 'attribute:listType' );\n\t\tconsumable.consume( modelItem, 'attribute:listIndent' );\n\t\tconsumable.consume( modelItem, 'attribute:todoListChecked' );\n\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst viewItem = generateLiInUl( modelItem, conversionApi );\n\n\t\tviewWriter.addClass( 'todo-list', viewItem.parent as any );\n\n\t\tconst label = viewWriter.createContainerElement( 'label', {\n\t\t\tclass: 'todo-list__label'\n\t\t} );\n\n\t\tconst checkbox = viewWriter.createEmptyElement( 'input', {\n\t\t\ttype: 'checkbox',\n\t\t\tdisabled: 'disabled'\n\t\t} );\n\n\t\tconst span = viewWriter.createContainerElement( 'span', {\n\t\t\tclass: 'todo-list__label__description'\n\t\t} );\n\n\t\tif ( modelItem.getAttribute( 'todoListChecked' ) ) {\n\t\t\tviewWriter.setAttribute( 'checked', 'checked', checkbox );\n\t\t}\n\n\t\tviewWriter.insert( viewWriter.createPositionAt( viewItem, 0 ), label );\n\t\tviewWriter.insert( viewWriter.createPositionAt( label, 0 ), checkbox );\n\t\tviewWriter.insert( viewWriter.createPositionAfter( checkbox ), span );\n\n\t\tinjectViewList( modelItem, viewItem, conversionApi, model );\n\t};\n}\n\n/**\n * A view-to-model converter for the checkbox element inside a view list item.\n *\n * It changes the `listType` of the model `listItem` to a `todo` value.\n * When a view checkbox element is marked as checked, an additional `todoListChecked=\"true\"` attribute is added to the model item.\n *\n * It is used by {@link module:engine/controller/datacontroller~DataController}.\n *\n * @internal\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */\nexport const dataViewModelCheckmarkInsertion: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\tconst modelCursor = data.modelCursor;\n\tconst modelItem = modelCursor.parent;\n\tconst viewItem = data.viewItem;\n\n\tif ( viewItem.getAttribute( 'type' ) != 'checkbox' || modelItem.name != 'listItem' || !modelCursor.isAtStart ) {\n\t\treturn;\n\t}\n\n\tif ( !conversionApi.consumable.consume( viewItem, { name: true } ) ) {\n\t\treturn;\n\t}\n\n\tconst writer = conversionApi.writer;\n\n\twriter.setAttribute( 'listType', 'todo', modelItem );\n\n\tif ( data.viewItem.hasAttribute( 'checked' ) ) {\n\t\twriter.setAttribute( 'todoListChecked', true, modelItem );\n\t}\n\n\tdata.modelRange = writer.createRange( modelCursor );\n};\n\n/**\n * A model-to-view converter for the `listType` attribute change on the `listItem` model element.\n *\n * This change means that the `<li>` element parent changes to `<ul class=\"todo-list\">` and a\n * {@link module:engine/view/uielement~ViewUIElement checkbox UI element} is added at the beginning\n * of the list item element (or vice versa).\n *\n * This converter is preceded by {@link module:list/legacylist/legacyconverters~modelViewChangeType} and followed by\n * {@link module:list/legacylist/legacyconverters~modelViewMergeAfterChangeType} to handle splitting and merging surrounding lists\n * of the same type.\n *\n * It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n * @param onCheckedChange Callback fired after clicking the checkbox UI element.\n * @param view Editing view controller.\n * @returns Returns a conversion callback.\n */\nexport function modelViewChangeType(\n\tonCheckedChange: ( element: ModelElement ) => void,\n\tview: EditingView\n): GetCallback<DowncastAttributeEvent<ModelElement>> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewItem = conversionApi.mapper.toViewElement( data.item )!;\n\t\tconst viewWriter = conversionApi.writer;\n\n\t\tconst labelElement = findLabel( viewItem, view )!;\n\n\t\tif ( data.attributeNewValue == 'todo' ) {\n\t\t\tconst isChecked = !!data.item.getAttribute( 'todoListChecked' );\n\t\t\tconst checkmarkElement = createCheckmarkElement( data.item, viewWriter, isChecked, onCheckedChange );\n\n\t\t\tconst span = viewWriter.createContainerElement( 'span', {\n\t\t\t\tclass: 'todo-list__label__description'\n\t\t\t} );\n\n\t\t\tconst itemRange = viewWriter.createRangeIn( viewItem );\n\t\t\tconst nestedList = findNestedList( viewItem );\n\n\t\t\tconst descriptionStart = positionAfterUiElements( itemRange.start );\n\t\t\tconst descriptionEnd = nestedList ? viewWriter.createPositionBefore( nestedList ) : itemRange.end;\n\t\t\tconst descriptionRange = viewWriter.createRange( descriptionStart, descriptionEnd );\n\n\t\t\tviewWriter.addClass( 'todo-list', viewItem.parent as any );\n\t\t\tviewWriter.move( descriptionRange, viewWriter.createPositionAt( span, 0 ) );\n\t\t\tviewWriter.insert( viewWriter.createPositionAt( viewItem, 0 ), checkmarkElement );\n\t\t\tviewWriter.insert( viewWriter.createPositionAfter( checkmarkElement ), span );\n\t\t} else if ( data.attributeOldValue == 'todo' ) {\n\t\t\tconst descriptionSpan = findDescription( viewItem, view )!;\n\n\t\t\tviewWriter.removeClass( 'todo-list', viewItem.parent as any );\n\t\t\tviewWriter.remove( labelElement );\n\t\t\tviewWriter.move( viewWriter.createRangeIn( descriptionSpan ), viewWriter.createPositionBefore( descriptionSpan ) );\n\t\t\tviewWriter.remove( descriptionSpan );\n\t\t}\n\t};\n}\n\n/**\n * A model-to-view converter for the `todoListChecked` attribute change on the `listItem` model element.\n *\n * It marks the {@link module:engine/view/uielement~ViewUIElement checkbox UI element} as checked.\n *\n * It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n *\n * @internal\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n * @param onCheckedChange Callback fired after clicking the checkbox UI element.\n * @returns Returns a conversion callback.\n */\nexport function modelViewChangeChecked(\n\tonCheckedChange: ( element: ModelElement ) => void\n): GetCallback<DowncastAttributeEvent<ModelElement>> {\n\treturn ( evt, data, conversionApi ) => {\n\t\t// Do not convert `todoListChecked` attribute when to-do list item has changed to other list item.\n\t\t// This attribute will be removed by the model post fixer.\n\t\tif ( data.item.getAttribute( 'listType' ) != 'todo' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !conversionApi.consumable.consume( data.item, 'attribute:todoListChecked' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { mapper, writer: viewWriter } = conversionApi;\n\t\tconst isChecked = !!data.item.getAttribute( 'todoListChecked' );\n\t\tconst viewItem = mapper.toViewElement( data.item )!;\n\t\t// Because of m -> v position mapper we can be sure checkbox is always at the beginning.\n\t\tconst oldCheckmarkElement = viewItem.getChild( 0 )!;\n\t\tconst newCheckmarkElement = createCheckmarkElement( data.item, viewWriter, isChecked, onCheckedChange );\n\n\t\tviewWriter.insert( viewWriter.createPositionAfter( oldCheckmarkElement ), newCheckmarkElement );\n\t\tviewWriter.remove( oldCheckmarkElement );\n\t};\n}\n\n/**\n * A model-to-view position at zero offset mapper.\n *\n * This helper ensures that position inside todo-list in the view is mapped after the checkbox.\n *\n * It only handles the position at the beginning of a list item as other positions are properly mapped be the default mapper.\n *\n * @internal\n */\nexport function mapModelToViewPosition( view: EditingView ): GetCallback<MapperModelToViewPositionEvent> {\n\treturn ( evt, data ) => {\n\t\tconst modelPosition = data.modelPosition;\n\t\tconst parent = modelPosition.parent;\n\n\t\tif ( !parent.is( 'element', 'listItem' ) || parent.getAttribute( 'listType' ) != 'todo' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewLi = data.mapper.toViewElement( parent )!;\n\t\tconst descSpan = findDescription( viewLi, view );\n\n\t\tif ( descSpan ) {\n\t\t\tdata.viewPosition = data.mapper.findPositionIn( descSpan, modelPosition.offset );\n\t\t}\n\t};\n}\n\n/**\n * Creates a checkbox UI element.\n */\nfunction createCheckmarkElement(\n\tmodelItem: ModelElement,\n\tviewWriter: ViewDowncastWriter,\n\tisChecked: boolean,\n\tonChange: ( element: ModelElement ) => void\n) {\n\tconst uiElement = viewWriter.createUIElement(\n\t\t'label',\n\t\t{\n\t\t\tclass: 'todo-list__label',\n\t\t\tcontenteditable: false\n\t\t},\n\t\tfunction( domDocument ) {\n\t\t\tconst checkbox = createElement( document, 'input', { type: 'checkbox', tabindex: '-1' } );\n\n\t\t\tif ( isChecked ) {\n\t\t\t\tcheckbox.setAttribute( 'checked', 'checked' );\n\t\t\t}\n\n\t\t\tcheckbox.addEventListener( 'change', () => onChange( modelItem ) );\n\n\t\t\tconst domElement = this.toDomElement( domDocument );\n\n\t\t\tdomElement.appendChild( checkbox );\n\n\t\t\treturn domElement;\n\t\t}\n\t);\n\n\treturn uiElement;\n}\n\n// Helper method to find label element inside li.\nfunction findLabel( viewItem: ViewElement, view: EditingView ) {\n\tconst range = view.createRangeIn( viewItem );\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'uiElement', 'label' ) ) {\n\t\t\treturn value.item;\n\t\t}\n\t}\n}\n\nfunction findDescription( viewItem: ViewElement, view: EditingView ) {\n\tconst range = view.createRangeIn( viewItem );\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'containerElement', 'span' ) && value.item.hasClass( 'todo-list__label__description' ) ) {\n\t\t\treturn value.item;\n\t\t}\n\t}\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/**\n * @module list/legacytodolist/legacytodolistediting\n */\n\nimport type {\n\tDowncastAttributeEvent,\n\tDowncastInsertEvent,\n\tModelElement,\n\tModelItem,\n\tMapperModelToViewPositionEvent,\n\tModel,\n\tModelApplyOperationEvent,\n\tUpcastElementEvent,\n\tViewDocumentArrowKeyEvent,\n\tViewDocumentKeyDownEvent,\n\tAttributeOperation,\n\tRenameOperation,\n\tModelSelectionChangeRangeEvent,\n\tModelDocumentFragment\n} from '@ckeditor/ckeditor5-engine';\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tgetCode,\n\tparseKeystroke,\n\tgetLocalizedArrowKeyCodeDirection,\n\ttype Locale,\n\ttype GetCallback\n} from '@ckeditor/ckeditor5-utils';\n\nimport { LegacyListCommand } from '../legacylist/legacylistcommand.js';\nimport { LegacyListEditing } from '../legacylist/legacylistediting.js';\nimport { LegacyCheckTodoListCommand } from './legacychecktodolistcommand.js';\nimport {\n\tdataModelViewInsertion,\n\tdataViewModelCheckmarkInsertion,\n\tmapModelToViewPosition,\n\tmodelViewChangeChecked,\n\tmodelViewChangeType,\n\tmodelViewInsertion\n} from './legacytodolistconverters.js';\n\nconst ITEM_TOGGLE_KEYSTROKE = /* #__PURE__ */ parseKeystroke( 'Ctrl+Enter' );\n\n/**\n * The engine of the to-do list feature. It handles creating, editing and removing to-do lists and their items.\n *\n * It registers the entire functionality of the {@link module:list/legacylist/legacylistediting~LegacyListEditing legacy list editing\n * plugin} and extends it with the commands:\n *\n * - `'todoList'`,\n * - `'checkTodoList'`,\n * - `'todoListCheck'` as an alias for `checkTodoList` command.\n */\nexport class LegacyTodoListEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LegacyTodoListEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LegacyListEditing ]> {\n\t\treturn [ LegacyListEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst { editing, data, model } = editor;\n\n\t\t// Extend schema.\n\t\tmodel.schema.extend( 'listItem', {\n\t\t\tallowAttributes: [ 'todoListChecked' ]\n\t\t} );\n\n\t\t// Disallow todoListChecked attribute on other nodes than listItem with to-do listType.\n\t\tmodel.schema.addAttributeCheck( ( context: any, attributeName ) => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( attributeName == 'todoListChecked' && item.name == 'listItem' && item.getAttribute( 'listType' ) != 'todo' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\t// Register `todoList` command.\n\t\teditor.commands.add( 'todoList', new LegacyListCommand( editor, 'todo' ) );\n\n\t\tconst checkTodoListCommand = new LegacyCheckTodoListCommand( editor );\n\n\t\t// Register `checkTodoList` command and add `todoListCheck` command as an alias for backward compatibility.\n\t\teditor.commands.add( 'checkTodoList', checkTodoListCommand );\n\t\teditor.commands.add( 'todoListCheck', checkTodoListCommand );\n\n\t\t// Define converters.\n\t\tdata.downcastDispatcher.on<DowncastInsertEvent<ModelElement>>(\n\t\t\t'insert:listItem',\n\t\t\tdataModelViewInsertion( model ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\t\tdata.upcastDispatcher.on<UpcastElementEvent>(\n\t\t\t'element:input',\n\t\t\tdataViewModelCheckmarkInsertion,\n\t\t\t{ priority: 'high' }\n\t\t);\n\n\t\tediting.downcastDispatcher.on<DowncastInsertEvent<ModelElement>>(\n\t\t\t'insert:listItem',\n\t\t\tmodelViewInsertion( model, listItem => this._handleCheckmarkChange( listItem ) ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\t\tediting.downcastDispatcher.on<DowncastAttributeEvent<ModelElement>>(\n\t\t\t'attribute:listType:listItem',\n\t\t\tmodelViewChangeType( listItem => this._handleCheckmarkChange( listItem ), editing.view )\n\t\t);\n\t\tediting.downcastDispatcher.on<DowncastAttributeEvent<ModelElement>>(\n\t\t\t'attribute:todoListChecked:listItem',\n\t\t\tmodelViewChangeChecked( listItem => this._handleCheckmarkChange( listItem ) )\n\t\t);\n\n\t\tediting.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', mapModelToViewPosition( editing.view ) );\n\t\tdata.mapper.on<MapperModelToViewPositionEvent>( 'modelToViewPosition', mapModelToViewPosition( editing.view ) );\n\n\t\t// Jump at the end of the previous node on left arrow key press, when selection is after the checkbox.\n\t\t//\n\t\t// <blockquote><p>Foo</p></blockquote>\n\t\t// <ul><li><checkbox/>{}Bar</li></ul>\n\t\t//\n\t\t// press: `<-`\n\t\t//\n\t\t// <blockquote><p>Foo{}</p></blockquote>\n\t\t// <ul><li><checkbox/>Bar</li></ul>\n\t\t//\n\t\tthis.listenTo<ViewDocumentArrowKeyEvent>(\n\t\t\tediting.view.document,\n\t\t\t'arrowKey',\n\t\t\tjumpOverCheckmarkOnSideArrowKeyPress( model, editor.locale ),\n\t\t\t{ context: 'li' }\n\t\t);\n\n\t\t// Toggle check state of selected to-do list items on keystroke.\n\t\tthis.listenTo<ViewDocumentKeyDownEvent>( editing.view.document, 'keydown', ( evt, data ) => {\n\t\t\tif ( getCode( data ) === ITEM_TOGGLE_KEYSTROKE ) {\n\t\t\t\teditor.execute( 'checkTodoList' );\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// Remove `todoListChecked` attribute when a host element is no longer a to-do list item.\n\t\tconst listItemsToFix = new Set<ModelItem>();\n\n\t\tthis.listenTo<ModelApplyOperationEvent>( model, 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ] as RenameOperation | AttributeOperation;\n\n\t\t\tif ( operation.type == 'rename' && operation.oldName == 'listItem' ) {\n\t\t\t\tconst item = operation.position.nodeAfter!;\n\n\t\t\t\tif ( item.hasAttribute( 'todoListChecked' ) ) {\n\t\t\t\t\tlistItemsToFix.add( item );\n\t\t\t\t}\n\t\t\t} else if ( operation.type == 'changeAttribute' && operation.key == 'listType' && operation.oldValue === 'todo' ) {\n\t\t\t\tfor ( const item of operation.range.getItems() ) {\n\t\t\t\t\tif ( item.hasAttribute( 'todoListChecked' ) && item.getAttribute( 'listType' ) !== 'todo' ) {\n\t\t\t\t\t\tlistItemsToFix.add( item );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tmodel.document.registerPostFixer( writer => {\n\t\t\tlet hasChanged = false;\n\n\t\t\tfor ( const listItem of listItemsToFix ) {\n\t\t\t\twriter.removeAttribute( 'todoListChecked', listItem );\n\t\t\t\thasChanged = true;\n\t\t\t}\n\n\t\t\tlistItemsToFix.clear();\n\n\t\t\treturn hasChanged;\n\t\t} );\n\n\t\tthis._initAriaAnnouncements();\n\t}\n\n\t/**\n\t * Handles the checkbox element change, moves the selection to the corresponding model item to make it possible\n\t * to toggle the `todoListChecked` attribute using the command, and restores the selection position.\n\t *\n\t * Some say it's a hack :) Moving the selection only for executing the command on a certain node and restoring it after,\n\t * is not a clear solution. We need to design an API for using commands beyond the selection range.\n\t * See https://github.com/ckeditor/ckeditor5/issues/1954.\n\t */\n\tprivate _handleCheckmarkChange( listItem: ModelElement ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst previousSelectionRanges = Array.from( model.document.selection.getRanges() );\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setSelection( listItem, 'end' );\n\t\t\teditor.execute( 'checkTodoList' );\n\t\t\twriter.setSelection( previousSelectionRanges );\n\t\t} );\n\t}\n\n\t/**\n\t * Observe when user enters or leaves todo list and set proper aria value in global live announcer.\n\t * This allows screen readers to indicate when the user has entered and left the specified todo list.\n\t *\n\t * @internal\n\t */\n\tprivate _initAriaAnnouncements( ) {\n\t\tconst { model, ui, t } = this.editor;\n\t\tlet lastFocusedCodeBlock: ModelElement | ModelDocumentFragment | null = null;\n\n\t\tif ( !ui ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.document.selection.on<ModelSelectionChangeRangeEvent>( 'change:range', () => {\n\t\t\tconst focusParent = model.document.selection.focus!.parent;\n\t\t\tconst lastElementIsTodoList = isLegacyTodoListItemElement( lastFocusedCodeBlock );\n\t\t\tconst currentElementIsTodoList = isLegacyTodoListItemElement( focusParent );\n\n\t\t\tif ( lastElementIsTodoList && !currentElementIsTodoList ) {\n\t\t\t\tui.ariaLiveAnnouncer.announce( t( 'Leaving a to-do list' ) );\n\t\t\t} else if ( !lastElementIsTodoList && currentElementIsTodoList ) {\n\t\t\t\tui.ariaLiveAnnouncer.announce( t( 'Entering a to-do list' ) );\n\t\t\t}\n\n\t\t\tlastFocusedCodeBlock = focusParent;\n\t\t} );\n\t}\n}\n\n/**\n * Handles the left/right (LTR/RTL content) arrow key and moves the selection at the end of the previous block element\n * if the selection is just after the checkbox element. In other words, it jumps over the checkbox element when\n * moving the selection to the left/right (LTR/RTL).\n *\n * @returns Callback for 'keydown' events.\n */\nfunction jumpOverCheckmarkOnSideArrowKeyPress( model: Model, locale: Locale ): GetCallback<ViewDocumentArrowKeyEvent> {\n\treturn ( eventInfo, domEventData ) => {\n\t\tconst direction = getLocalizedArrowKeyCodeDirection( domEventData.keyCode, locale.contentLanguageDirection );\n\n\t\tif ( direction != 'left' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\n\t\tif ( !selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst position = selection.getFirstPosition()!;\n\t\tconst parent = position.parent;\n\n\t\tif ( parent.name === 'listItem' && parent.getAttribute( 'listType' ) == 'todo' && position.isAtStart ) {\n\t\t\tconst newRange = schema.getNearestSelectionRange( model.createPositionBefore( parent ), 'backward' );\n\n\t\t\tif ( newRange ) {\n\t\t\t\tmodel.change( writer => writer.setSelection( newRange ) );\n\t\t\t}\n\n\t\t\tdomEventData.preventDefault();\n\t\t\tdomEventData.stopPropagation();\n\t\t\teventInfo.stop();\n\t\t}\n\t};\n}\n\n/**\n * Returns true if the given element is a list item model element of a to-do list.\n */\nfunction isLegacyTodoListItemElement( element: ModelElement | ModelDocumentFragment | null ): boolean {\n\treturn !!element && element.is( 'element', 'listItem' ) && element.getAttribute( 'listType' ) === 'todo';\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/**\n * @module list/legacytodolist\n */\n\nimport { LegacyTodoListEditing } from './legacytodolist/legacytodolistediting.js';\nimport { TodoListUI } from './todolist/todolistui.js';\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\n/**\n * The legacy to-do list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/legacytodolist/legacytodolistediting~LegacyTodoListEditing legacy to-do list\n * editing feature} and the {@link module:list/todolist/todolistui~TodoListUI to-do list UI feature}.\n */\nexport class LegacyTodoList extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ LegacyTodoListEditing, TodoListUI ]> {\n\t\treturn [ LegacyTodoListEditing, TodoListUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'LegacyTodoList' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module list/list/adjacentlistssupport\n */\n\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\nimport type { UpcastElementEvent, ViewElement } from '@ckeditor/ckeditor5-engine';\n\nexport class AdjacentListsSupport extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AdjacentListsSupport' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tmodel.schema.register( 'listSeparator', {\n\t\t\tallowWhere: '$block',\n\t\t\tisBlock: true\n\t\t} );\n\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t// Add a list separator element between similar list elements on upcast.\n\t\t\t.add( dispatcher => {\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:ol', listSeparatorUpcastConverter() );\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:ul', listSeparatorUpcastConverter() );\n\t\t\t} )\n\t\t\t// View-to-model transformation.\n\t\t\t.elementToElement( {\n\t\t\t\tmodel: 'listSeparator',\n\t\t\t\tview: 'ck-list-separator'\n\t\t\t} );\n\n\t\t// The list separator element should exist in the view, but should be invisible (hidden).\n\t\teditor.conversion.for( 'editingDowncast' ).elementToElement( {\n\t\t\tmodel: 'listSeparator',\n\t\t\tview: {\n\t\t\t\tname: 'div',\n\t\t\t\tclasses: [ 'ck-list-separator', 'ck-hidden' ]\n\t\t\t}\n\t\t} );\n\n\t\t// The list separator element should not exist in the output data.\n\t\teditor.conversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'listSeparator',\n\t\t\tview: ( modelElement, conversionApi ) => {\n\t\t\t\tconst viewElement = conversionApi.writer.createContainerElement( 'ck-list-separator' );\n\n\t\t\t\tconversionApi.writer.setCustomProperty( 'dataPipeline:transparentRendering', true, viewElement );\n\n\t\t\t\tviewElement.getFillerOffset = () => null;\n\n\t\t\t\treturn viewElement;\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Inserts a list separator element between two lists of the same type (`ol` + `ol` or `ul` + `ul`).\n */\nfunction listSeparatorUpcastConverter(): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst element: ViewElement = data.viewItem;\n\t\tconst nextSibling = element.nextSibling as ViewElement | null;\n\n\t\tif ( !nextSibling ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( element.name !== nextSibling.name ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !data.modelRange ) {\n\t\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t\t}\n\n\t\tconst writer = conversionApi.writer;\n\t\tconst modelElement = writer.createElement( 'listSeparator' );\n\n\t\t// Try to insert a list separator element on the current model cursor position.\n\t\tif ( !conversionApi.safeInsert( modelElement, data.modelCursor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst parts = conversionApi.getSplitParts( modelElement );\n\n\t\t// Extend the model range with the range of the created list separator element.\n\t\tdata.modelRange = writer.createRange(\n\t\t\tdata.modelRange!.start,\n\t\t\twriter.createPositionAfter( parts[ parts.length - 1 ] )\n\t\t);\n\n\t\tconversionApi.updateConversionResult( modelElement, data );\n\t};\n}\n", "import { Command, MultiCommand, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { ButtonView, MenuBarMenuListItemButtonView } from \"@ckeditor/ckeditor5-ui\";\nimport { IconIndent, IconOutdent } from \"@ckeditor/ckeditor5-icons\";\nimport { addMarginStylesRules } from \"@ckeditor/ckeditor5-engine\";\nimport { first } from \"@ckeditor/ckeditor5-utils\";\nimport { _isListItemBlock } from \"@ckeditor/ckeditor5-list\";\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 indent/indentediting\n*/\n/**\n* The indent editing feature.\n*\n* This plugin registers the `'indent'` and `'outdent'` commands.\n*\n* **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in the\n* {@link module:indent/indent~Indent indent feature} API documentation.\n*/\nvar IndentEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"IndentEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.commands.add(\"indent\", new MultiCommand(editor));\n\t\teditor.commands.add(\"outdent\", new MultiCommand(editor));\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 indent/indentui\n*/\n/**\n* The indent UI feature.\n*\n* This plugin registers the `'indent'` and `'outdent'` buttons.\n*\n* **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in\n* the {@link module:indent/indent~Indent indent feature} API documentation.\n*/\nvar IndentUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"IndentUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = editor.t;\n\t\tconst localizedIndentIcon = locale.uiLanguageDirection == \"ltr\" ? IconIndent : IconOutdent;\n\t\tconst localizedOutdentIcon = locale.uiLanguageDirection == \"ltr\" ? IconOutdent : IconIndent;\n\t\tthis._defineButton(\"indent\", t(\"Increase indent\"), localizedIndentIcon);\n\t\tthis._defineButton(\"outdent\", t(\"Decrease indent\"), localizedOutdentIcon);\n\t}\n\t/**\n\t* Defines UI buttons for both toolbar and menu bar.\n\t*/\n\t_defineButton(commandName, label, icon) {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(commandName, () => {\n\t\t\tconst buttonView = this._createButton(ButtonView, commandName, label, icon);\n\t\t\tbuttonView.set({ tooltip: true });\n\t\t\treturn buttonView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:\" + commandName, () => {\n\t\t\treturn this._createButton(MenuBarMenuListItemButtonView, commandName, label, icon);\n\t\t});\n\t}\n\t/**\n\t* Creates a button to use either in toolbar or in menu bar.\n\t*/\n\t_createButton(ButtonClass, commandName, label, icon) {\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get(commandName);\n\t\tconst view = new ButtonClass(editor.locale);\n\t\tview.set({\n\t\t\tlabel,\n\t\t\ticon\n\t\t});\n\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\teditor.execute(commandName);\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn view;\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 indent/indent\n*/\n/**\n* The indent feature.\n*\n* This plugin acts as a single entry point plugin for other features that implement indentation of elements like lists or paragraphs.\n*\n* The compatible features are:\n*\n* * The {@link module:list/list~List} or {@link module:list/list/listediting~ListEditing} feature for list indentation.\n* * The {@link module:indent/indentblock~IndentBlock} feature for block indentation.\n*\n* This is a \"glue\" plugin that loads the following plugins:\n*\n* * The {@link module:indent/indentediting~IndentEditing indent editing feature}.\n* * The {@link module:indent/indentui~IndentUI indent UI feature}.\n*\n* The dependent plugins register the `'indent'` and `'outdent'` commands and introduce the `'indent'` and `'outdent'` buttons\n* that allow to increase or decrease text indentation of supported elements.\n*\n* **Note**: In order for the commands and buttons to work, at least one of compatible features is required.\n*/\nvar Indent = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Indent\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [IndentEditing, IndentUI];\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 indent/indentblockcommand\n*/\n/**\n* The indent block command.\n*\n* The command is registered by the {@link module:indent/indentblock~IndentBlock} as `'indentBlock'` for indenting blocks and\n* `'outdentBlock'` for outdenting blocks.\n*\n* To increase block indentation at the current selection, execute the command:\n*\n* ```ts\n* editor.execute( 'indentBlock' );\n* ```\n*\n* To decrease block indentation at the current selection, execute the command:\n*\n* ```ts\n* editor.execute( 'outdentBlock' );\n* ```\n*/\nvar IndentBlockCommand = class extends Command {\n\t/**\n\t* The command's indentation behavior.\n\t*/\n\t_indentBehavior;\n\t/**\n\t* Creates an instance of the command.\n\t*/\n\tconstructor(editor, indentBehavior) {\n\t\tsuper(editor);\n\t\tthis._indentBehavior = indentBehavior;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst block = first(model.document.selection.getSelectedBlocks());\n\t\tif (!block || !this._isIndentationChangeAllowed(block)) {\n\t\t\tthis.isEnabled = false;\n\t\t\treturn;\n\t\t}\n\t\tthis.isEnabled = this._indentBehavior.checkEnabled(block.getAttribute(\"blockIndent\"));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst blocksToChange = this._getBlocksToChange();\n\t\tmodel.change((writer) => {\n\t\t\tfor (const block of blocksToChange) {\n\t\t\t\tconst currentIndent = block.getAttribute(\"blockIndent\");\n\t\t\t\tconst nextIndent = this._indentBehavior.getNextIndent(currentIndent);\n\t\t\t\tif (nextIndent) writer.setAttribute(\"blockIndent\", nextIndent, block);\n\t\t\t\telse writer.removeAttribute(\"blockIndent\", block);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Returns blocks from selection that should have blockIndent selection set.\n\t*/\n\t_getBlocksToChange() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\treturn Array.from(selection.getSelectedBlocks()).filter((block) => this._isIndentationChangeAllowed(block));\n\t}\n\t/**\n\t* Returns false if indentation cannot be applied, i.e.:\n\t* - for blocks disallowed by schema declaration\n\t* - for blocks in Document Lists (disallowed forward indentation only). See https://github.com/ckeditor/ckeditor5/issues/14155.\n\t* Otherwise returns true.\n\t*/\n\t_isIndentationChangeAllowed(element) {\n\t\tconst editor = this.editor;\n\t\tif (!editor.model.schema.checkAttribute(element, \"blockIndent\")) return false;\n\t\tif (!editor.plugins.has(\"ListUtils\")) return true;\n\t\tif (!this._indentBehavior.isForward) return true;\n\t\treturn !editor.plugins.get(\"ListUtils\").isListItemBlock(element);\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* The block indentation behavior that uses offsets to set indentation.\n*\n* @internal\n*/\nvar IndentUsingOffset = class {\n\t/**\n\t* The direction of indentation.\n\t*/\n\tisForward;\n\t/**\n\t* The offset of the next indentation step.\n\t*/\n\toffset;\n\t/**\n\t* Indentation unit.\n\t*/\n\tunit;\n\t/**\n\t* Creates an instance of the indentation behavior.\n\t*\n\t* @param config.direction The direction of indentation.\n\t* @param config.offset The offset of the next indentation step.\n\t* @param config.unit Indentation unit.\n\t*/\n\tconstructor(config) {\n\t\tthis.isForward = config.direction === \"forward\";\n\t\tthis.offset = config.offset;\n\t\tthis.unit = config.unit;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tcheckEnabled(indentAttributeValue) {\n\t\tconst currentOffset = parseFloat(indentAttributeValue || \"0\");\n\t\treturn this.isForward || currentOffset > 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tgetNextIndent(indentAttributeValue) {\n\t\tconst currentOffset = parseFloat(indentAttributeValue || \"0\");\n\t\tconst isSameUnit = !indentAttributeValue || indentAttributeValue.endsWith(this.unit);\n\t\tif (currentOffset < 0) return;\n\t\tif (!isSameUnit) return this.isForward ? this.offset + this.unit : void 0;\n\t\tconst offsetToSet = currentOffset + (this.isForward ? this.offset : -this.offset);\n\t\treturn offsetToSet > 0 ? offsetToSet + this.unit : void 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* The block indentation behavior that uses classes to set indentation.\n*\n* @internal\n*/\nvar IndentUsingClasses = class {\n\t/**\n\t* The direction of indentation.\n\t*/\n\tisForward;\n\t/**\n\t* A list of classes used for indentation.\n\t*/\n\tclasses;\n\t/**\n\t* Creates an instance of the indentation behavior.\n\t*\n\t* @param config.direction The direction of indentation.\n\t* @param config.classes A list of classes used for indentation.\n\t*/\n\tconstructor(config) {\n\t\tthis.isForward = config.direction === \"forward\";\n\t\tthis.classes = config.classes;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tcheckEnabled(indentAttributeValue) {\n\t\tconst currentIndex = this.classes.indexOf(indentAttributeValue);\n\t\tif (this.isForward) return currentIndex < this.classes.length - 1;\n\t\telse return currentIndex >= 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tgetNextIndent(indentAttributeValue) {\n\t\tconst nextIndex = this.classes.indexOf(indentAttributeValue) + (this.isForward ? 1 : -1);\n\t\tconst nextIndexClamped = Math.min(nextIndex, this.classes.length - 1);\n\t\treturn this.classes[nextIndexClamped];\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 indent/integrations/indentblocklistcommand\n*/\n/**\n* The indent block list command.\n*\n* The command is registered by the {@link module:indent/integrations/indentblocklistintegration~IndentBlockListIntegration} as\n* `'indentBlockList'` for indenting lists and `'outdentBlockList'` for outdenting lists.\n*\n* To increase/decrease block indentation of the list the selection must be at the start of the first top–level list item\n* in the list.\n*\n* To increase block indentation of the list, execute the command:\n*\n* ```ts\n* editor.execute( 'indentBlockList' );\n* ```\n*\n* To decrease block indentation of the list, execute the command:\n*\n* ```ts\n* editor.execute( 'outdentBlockList' );\n* ```\n*/\nvar IndentBlockListCommand = class extends Command {\n\t/**\n\t* The command's indentation behavior.\n\t*/\n\t_indentBehavior;\n\t/**\n\t* Creates an instance of the command.\n\t*/\n\tconstructor(editor, indentBehavior) {\n\t\tsuper(editor);\n\t\tthis._indentBehavior = indentBehavior;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst listItem = this._getFirstListItemIfSelectionIsAtListStart(this.editor.model.document.selection);\n\t\tthis.isEnabled = !!listItem && this._indentBehavior.checkEnabled(listItem.getAttribute(\"blockIndentList\"));\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options Command options.\n\t* @param options.firstListOnly When `true`, indentation is applied only to the first list at the beginning of the selection.\n\t* When `false` or omitted, indentation is applied to all lists of the selection.\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst listUtils = editor.plugins.get(\"ListUtils\");\n\t\tmodel.change((writer) => {\n\t\t\tconst listItem = this._getFirstListItemIfSelectionIsAtListStart(selection);\n\t\t\tconst listItems = [];\n\t\t\tif (!options.firstListOnly) {\n\t\t\t\tconst blocks = Array.from(selection.getSelectedBlocks());\n\t\t\t\tfor (const block of blocks) if (_isListItemBlock(block) && block.getAttribute(\"listIndent\") === 0 && model.schema.checkAttribute(block, \"blockIndentList\")) listItems.push(block);\n\t\t\t} else listItems.push(listItem);\n\t\t\tconst expandedListItems = listUtils.expandListBlocksToCompleteList(listItems);\n\t\t\tfor (const item of expandedListItems) {\n\t\t\t\tconst currentIndent = item.getAttribute(\"blockIndentList\");\n\t\t\t\tconst nextIndent = this._indentBehavior.getNextIndent(currentIndent);\n\t\t\t\tif (nextIndent) writer.setAttribute(\"blockIndentList\", nextIndent, item);\n\t\t\t\telse writer.removeAttribute(\"blockIndentList\", item);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Returns the list item at the beginning of the current selection if it is the first top–level list item in the list.\n\t* Otherwise, returns `null`.\n\t*/\n\t_getFirstListItemIfSelectionIsAtListStart(selection) {\n\t\tconst position = selection.getFirstPosition();\n\t\tconst listUtils = this.editor.plugins.get(\"ListUtils\");\n\t\tconst parent = position.parent;\n\t\tconst schema = this.editor.model.schema;\n\t\tif (position.isAtStart && _isListItemBlock(parent) && parent.getAttribute(\"listIndent\") == 0 && schema.checkAttribute(parent, \"blockIndentList\") && listUtils.isFirstListItemInList(parent)) return parent;\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 indent/integrations/indentblocklistitemcommand\n*/\n/**\n* The indent block list item command.\n*\n* The command is registered by the {@link module:indent/integrations/indentblocklistintegration~IndentBlockListIntegration} as\n* `'indentBlockListItem'` for indenting list items and `'outdentBlockListItem'` for outdenting list items.\n*\n* It's only possible to reset the block indentation of a list item to `0`.\n* This means that if a list item has negative block indentation, the command will only allow forward indentation\n* to make it possible to reset it to `0` and if a list item has positive block indentation, the command\n* will only allow backward indentation to make it possible to reset it to `0`.\n*\n* To increase block indentation of the list item, execute the command:\n*\n* ```ts\n* editor.execute( 'indentBlockListItem' );\n* ```\n*\n* To decrease block indentation of the list item, execute the command:\n*\n* ```ts\n* editor.execute( 'outdentBlockListItem' );\n* ```\n*/\nvar IndentBlockListItemCommand = class extends Command {\n\t/**\n\t* The command's indentation behavior.\n\t*/\n\t_indentBehavior;\n\t/**\n\t* Creates an instance of the command.\n\t*/\n\tconstructor(editor, indentBehavior) {\n\t\tsuper(editor);\n\t\tthis._indentBehavior = indentBehavior;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = this._getAffectedListItems().length > 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tthis.editor.model.change((writer) => {\n\t\t\tfor (const block of this._getAffectedListItems()) writer.removeAttribute(\"blockIndentListItem\", block);\n\t\t});\n\t}\n\t/**\n\t* Returns an array of list items which block indentation should be changed.\n\t*/\n\t_getAffectedListItems() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst listUtils = this.editor.plugins.get(\"ListUtils\");\n\t\tconst blocksInSelection = Array.from(selection.getSelectedBlocks());\n\t\treturn listUtils.expandListBlocksToCompleteItems(blocksInSelection).filter((block) => this._isIndentationChangeAllowed(block));\n\t}\n\t/**\n\t* Returns `true` if changing the block indentation is allowed for the given list item.\n\t*/\n\t_isIndentationChangeAllowed(element) {\n\t\tif (!element.hasAttribute(\"blockIndentListItem\")) return false;\n\t\treturn this._indentBehavior.checkEnabled(element.getAttribute(\"blockIndentListItem\"));\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 indent/indentcommandbehavior/resetindentusingoffset\n*/\n/**\n* The list item block indentation behavior that resets offset-based indentation toward zero.\n*\n* Unlike {@link module:indent/indentcommandbehavior/indentusingoffset~IndentUsingOffset}, this behavior\n* is enabled only when the current indentation value can be moved toward zero:\n* - for forward direction only when the current offset is negative,\n* - for backward direction only when the current offset is positive.\n*\n* @internal\n*/\nvar ResetIndentUsingOffset = class extends IndentUsingOffset {\n\t/**\n\t* @inheritDoc\n\t*/\n\tcheckEnabled(indentAttributeValue) {\n\t\tconst currentOffset = parseFloat(indentAttributeValue);\n\t\treturn this.isForward && currentOffset < 0 || !this.isForward && currentOffset > 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 indent/indentcommandbehavior/resetindentusingclasses\n*/\n/**\n* The list item block indentation behavior that resets class-based indentation toward zero.\n*\n* Unlike {@link module:indent/indentcommandbehavior/indentusingclasses~IndentUsingClasses}, this behavior\n* is enabled only in the backward (outdent) direction when a class-based indentation is set.\n* This is because class-based indentation values cannot be negative, so the only way to reset\n* them to zero is to remove the class by outdenting.\n*\n* @internal\n*/\nvar ResetIndentUsingClasses = class extends IndentUsingClasses {\n\t/**\n\t* @inheritDoc\n\t*/\n\tcheckEnabled(indentAttributeValue) {\n\t\treturn !this.isForward && !!indentAttributeValue;\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* This integration enables using block indentation feature with lists.\n*/\nvar IndentBlockListIntegration = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"IndentBlockListIntegration\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tif (!this.editor.plugins.has(\"ListEditing\")) return;\n\t\tconst config = editor.config.get(\"indentBlock\");\n\t\tif (config.classes && config.classes.length) {\n\t\t\tthis._setupConversionUsingClasses(config.classes, \"ol\", \"blockIndentList\", \"list\");\n\t\t\tthis._setupConversionUsingClasses(config.classes, \"ul\", \"blockIndentList\", \"list\");\n\t\t\tthis._setupConversionUsingClasses(config.classes, \"li\", \"blockIndentListItem\", \"item\");\n\t\t\teditor.commands.add(\"indentBlockList\", new IndentBlockListCommand(editor, new IndentUsingClasses({\n\t\t\t\tdirection: \"forward\",\n\t\t\t\tclasses: config.classes\n\t\t\t})));\n\t\t\teditor.commands.add(\"outdentBlockList\", new IndentBlockListCommand(editor, new IndentUsingClasses({\n\t\t\t\tdirection: \"backward\",\n\t\t\t\tclasses: config.classes\n\t\t\t})));\n\t\t\teditor.commands.add(\"indentBlockListItem\", new IndentBlockListItemCommand(editor, new ResetIndentUsingClasses({\n\t\t\t\tdirection: \"forward\",\n\t\t\t\tclasses: config.classes\n\t\t\t})));\n\t\t\teditor.commands.add(\"outdentBlockListItem\", new IndentBlockListItemCommand(editor, new ResetIndentUsingClasses({\n\t\t\t\tdirection: \"backward\",\n\t\t\t\tclasses: config.classes\n\t\t\t})));\n\t\t} else {\n\t\t\teditor.data.addStyleProcessorRules(addMarginStylesRules);\n\t\t\tthis._setupConversionUsingOffset(\"ol\", \"blockIndentList\", \"list\");\n\t\t\tthis._setupConversionUsingOffset(\"ul\", \"blockIndentList\", \"list\");\n\t\t\tthis._setupConversionUsingOffset(\"li\", \"blockIndentListItem\", \"item\");\n\t\t\teditor.commands.add(\"indentBlockList\", new IndentBlockListCommand(editor, new IndentUsingOffset({\n\t\t\t\tdirection: \"forward\",\n\t\t\t\toffset: config.offset,\n\t\t\t\tunit: config.unit\n\t\t\t})));\n\t\t\teditor.commands.add(\"outdentBlockList\", new IndentBlockListCommand(editor, new IndentUsingOffset({\n\t\t\t\tdirection: \"backward\",\n\t\t\t\toffset: config.offset,\n\t\t\t\tunit: config.unit\n\t\t\t})));\n\t\t\teditor.commands.add(\"indentBlockListItem\", new IndentBlockListItemCommand(editor, new ResetIndentUsingOffset({\n\t\t\t\tdirection: \"forward\",\n\t\t\t\toffset: config.offset,\n\t\t\t\tunit: config.unit\n\t\t\t})));\n\t\t\teditor.commands.add(\"outdentBlockListItem\", new IndentBlockListItemCommand(editor, new ResetIndentUsingOffset({\n\t\t\t\tdirection: \"backward\",\n\t\t\t\toffset: config.offset,\n\t\t\t\tunit: config.unit\n\t\t\t})));\n\t\t}\n\t\teditor.plugins.get(\"ListEditing\").on(\"postFixer\", (evt, { listNodes, writer }) => {\n\t\t\tfor (const { node, previousNodeInList } of listNodes) {\n\t\t\t\tif (!previousNodeInList) continue;\n\t\t\t\tif (previousNodeInList.getAttribute(\"listType\") != node.getAttribute(\"listType\")) continue;\n\t\t\t\tif (ensureIndentValuesConsistency(\"blockIndentList\", node, previousNodeInList, writer)) evt.return = true;\n\t\t\t\tif (previousNodeInList.getAttribute(\"listItemId\") != node.getAttribute(\"listItemId\")) continue;\n\t\t\t\tif (ensureIndentValuesConsistency(\"blockIndentListItem\", node, previousNodeInList, writer)) evt.return = true;\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(editor.editing.view.document, \"tab\", (evt, data) => {\n\t\t\tconst commandName = data.shiftKey ? \"outdentBlockList\" : \"indentBlockList\";\n\t\t\tif (this.editor.commands.get(commandName).isEnabled) {\n\t\t\t\teditor.execute(commandName, { firstListOnly: true });\n\t\t\t\tdata.stopPropagation();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, {\n\t\t\tcontext: \"li\",\n\t\t\tpriority: \"high\"\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tif (!editor.plugins.has(\"ListEditing\")) return;\n\t\tschema.extend(\"$listItem\", { allowAttributes: [\"blockIndentList\", \"blockIndentListItem\"] });\n\t\tschema.setAttributeProperties(\"blockIndentList\", { isFormatting: true });\n\t\tschema.setAttributeProperties(\"blockIndentListItem\", { isFormatting: true });\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (!context.last.getAttribute(\"listItemId\")) return false;\n\t\t}, \"blockIndentList\");\n\t\tmodel.schema.addAttributeCheck((context) => {\n\t\t\tif (!context.last.getAttribute(\"listItemId\")) return false;\n\t\t}, \"blockIndentListItem\");\n\t\tconst clearBlockIndentAttributesOnListIndentChange = (_evt, changedBlocks) => {\n\t\t\teditor.model.change((writer) => {\n\t\t\t\tfor (const node of changedBlocks) if (node.hasAttribute(\"listItemId\")) {\n\t\t\t\t\tif (node.hasAttribute(\"blockIndentList\")) writer.removeAttribute(\"blockIndentList\", node);\n\t\t\t\t\tif (node.hasAttribute(\"blockIndentListItem\")) writer.removeAttribute(\"blockIndentListItem\", node);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tconst indentListCommand = editor.commands.get(\"indentList\");\n\t\tconst outdentListCommand = editor.commands.get(\"outdentList\");\n\t\tif (indentListCommand) this.listenTo(indentListCommand, \"afterExecute\", clearBlockIndentAttributesOnListIndentChange);\n\t\tif (outdentListCommand) this.listenTo(outdentListCommand, \"afterExecute\", clearBlockIndentAttributesOnListIndentChange);\n\t\tconst indentCommand = editor.commands.get(\"indent\");\n\t\tconst outdentCommand = editor.commands.get(\"outdent\");\n\t\tindentCommand.registerChildCommand(editor.commands.get(\"indentBlockList\"), { priority: \"highest\" });\n\t\toutdentCommand.registerChildCommand(editor.commands.get(\"outdentBlockList\"));\n\t\tindentCommand.registerChildCommand(editor.commands.get(\"indentBlockListItem\"));\n\t\toutdentCommand.registerChildCommand(editor.commands.get(\"outdentBlockListItem\"));\n\t}\n\t/**\n\t* Setups conversion for list block indent using offset.\n\t*/\n\t_setupConversionUsingOffset(element, attributeName, scope) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst conversion = editor.conversion;\n\t\tconst marginProperty = locale.contentLanguageDirection === \"rtl\" ? \"margin-right\" : \"margin-left\";\n\t\tconst listEditing = editor.plugins.get(\"ListEditing\");\n\t\tconversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(`element:${element}`, listBlockIndentUpcastConverter(attributeName, (item) => item.getStyle(marginProperty), (consumable, item) => consumable.consume(item, { styles: marginProperty })), { priority: \"low\" });\n\t\t});\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope,\n\t\t\tattributeName,\n\t\t\tsetAttributeOnDowncast(writer, value, element) {\n\t\t\t\tif (value) writer.setStyle(marginProperty, value, element);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Setups conversion for list block indent using classes.\n\t*/\n\t_setupConversionUsingClasses(classes, element, attributeName, scope) {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\t\tconst listEditing = editor.plugins.get(\"ListEditing\");\n\t\tconversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(`element:${element}`, listBlockIndentUpcastConverter(attributeName, (item) => classes.find((cls) => item.hasClass(cls)), (consumable, item, value) => consumable.consume(item, { classes: value })), { priority: \"low\" });\n\t\t});\n\t\tlistEditing.registerDowncastStrategy({\n\t\t\tscope,\n\t\t\tattributeName,\n\t\t\tsetAttributeOnDowncast(writer, value, element) {\n\t\t\t\tif (value) writer.addClass(value, element);\n\t\t\t}\n\t\t});\n\t}\n};\n/**\n* Returns an upcast converter for block list indentation.\n*\n* @param attributeName The name of the model attribute.\n* @param getValue A function to get the value from the view element.\n* @param consume A function to consume the view element.\n* @returns A callback for the upcast conversion.\n*/\nfunction listBlockIndentUpcastConverter(attributeName, getValue, consume) {\n\treturn (evt, data, conversionApi) => {\n\t\tconst { writer, consumable } = conversionApi;\n\t\tif (!data.modelRange) Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n\t\tconst value = getValue(data.viewItem);\n\t\tif (value === void 0) return;\n\t\tlet applied = false;\n\t\tlet indentLevel;\n\t\tfor (const item of data.modelRange.getItems({ shallow: true })) {\n\t\t\tif (indentLevel === void 0) indentLevel = item.getAttribute(\"listIndent\");\n\t\t\tif (item.hasAttribute(attributeName)) continue;\n\t\t\tif (item.getAttribute(\"listIndent\") !== indentLevel) continue;\n\t\t\twriter.setAttribute(attributeName, value, item);\n\t\t\tapplied = true;\n\t\t}\n\t\tif (applied) consume(consumable, data.viewItem, value);\n\t};\n}\n/**\n* Ensures that two nodes have the same value of the given attribute.\n* If the values are different, the attribute value from the previous node is applied to the given node.\n* Returns true if the attribute value was changed, false otherwise.\n*/\nfunction ensureIndentValuesConsistency(attributeName, node, previousNodeInList, writer) {\n\tconst prevNodeIndentListValue = previousNodeInList.getAttribute(attributeName);\n\tif (node.getAttribute(attributeName) === prevNodeIndentListValue) return false;\n\tif (prevNodeIndentListValue) writer.setAttribute(attributeName, prevNodeIndentListValue, node);\n\telse writer.removeAttribute(attributeName, node);\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 indent/indentblock\n*/\nconst DEFAULT_ELEMENTS = [\n\t\"paragraph\",\n\t\"heading1\",\n\t\"heading2\",\n\t\"heading3\",\n\t\"heading4\",\n\t\"heading5\",\n\t\"heading6\"\n];\n/**\n* The block indentation feature.\n*\n* It registers the `'indentBlock'` and `'outdentBlock'` commands.\n*\n* If the plugin {@link module:indent/indent~Indent} is defined, it also attaches the `'indentBlock'` and `'outdentBlock'` commands to\n* the `'indent'` and `'outdent'` commands.\n*/\nvar IndentBlock = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"indentBlock\", {\n\t\t\toffset: 40,\n\t\t\tunit: \"px\"\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"IndentBlock\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [IndentBlockListIntegration];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst configuration = editor.config.get(\"indentBlock\");\n\t\tif (configuration.classes && configuration.classes.length) {\n\t\t\tthis._setupConversionUsingClasses(configuration.classes);\n\t\t\teditor.commands.add(\"indentBlock\", new IndentBlockCommand(editor, new IndentUsingClasses({\n\t\t\t\tdirection: \"forward\",\n\t\t\t\tclasses: configuration.classes\n\t\t\t})));\n\t\t\teditor.commands.add(\"outdentBlock\", new IndentBlockCommand(editor, new IndentUsingClasses({\n\t\t\t\tdirection: \"backward\",\n\t\t\t\tclasses: configuration.classes\n\t\t\t})));\n\t\t} else {\n\t\t\teditor.data.addStyleProcessorRules(addMarginStylesRules);\n\t\t\tthis._setupConversionUsingOffset();\n\t\t\teditor.commands.add(\"indentBlock\", new IndentBlockCommand(editor, new IndentUsingOffset({\n\t\t\t\tdirection: \"forward\",\n\t\t\t\toffset: configuration.offset,\n\t\t\t\tunit: configuration.unit\n\t\t\t})));\n\t\t\teditor.commands.add(\"outdentBlock\", new IndentBlockCommand(editor, new IndentUsingOffset({\n\t\t\t\tdirection: \"backward\",\n\t\t\t\toffset: configuration.offset,\n\t\t\t\tunit: configuration.unit\n\t\t\t})));\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst indentCommand = editor.commands.get(\"indent\");\n\t\tconst outdentCommand = editor.commands.get(\"outdent\");\n\t\tconst options = editor.config.get(\"heading.options\");\n\t\t(options && options.map((option) => option.model) || DEFAULT_ELEMENTS).forEach((elementName) => {\n\t\t\tif (schema.isRegistered(elementName)) schema.extend(elementName, { allowAttributes: \"blockIndent\" });\n\t\t});\n\t\tschema.setAttributeProperties(\"blockIndent\", { isFormatting: true });\n\t\tindentCommand.registerChildCommand(editor.commands.get(\"indentBlock\"));\n\t\toutdentCommand.registerChildCommand(editor.commands.get(\"outdentBlock\"));\n\t}\n\t/**\n\t* Setups conversion for using offset indents.\n\t*/\n\t_setupConversionUsingOffset() {\n\t\tconst conversion = this.editor.conversion;\n\t\tconst marginProperty = this.editor.locale.contentLanguageDirection === \"rtl\" ? \"margin-right\" : \"margin-left\";\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: { styles: { [marginProperty]: /[\\s\\S]+/ } },\n\t\t\tmodel: {\n\t\t\t\tkey: \"blockIndent\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tif (!viewElement.is(\"element\", \"li\")) return viewElement.getStyle(marginProperty);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconversion.for(\"downcast\").attributeToAttribute({\n\t\t\tmodel: \"blockIndent\",\n\t\t\tview: (modelAttributeValue) => {\n\t\t\t\treturn {\n\t\t\t\t\tkey: \"style\",\n\t\t\t\t\tvalue: { [marginProperty]: modelAttributeValue }\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Setups conversion for using classes.\n\t*/\n\t_setupConversionUsingClasses(classes) {\n\t\tconst definition = {\n\t\t\tmodel: {\n\t\t\t\tkey: \"blockIndent\",\n\t\t\t\tvalues: []\n\t\t\t},\n\t\t\tview: {}\n\t\t};\n\t\tfor (const className of classes) {\n\t\t\tdefinition.model.values.push(className);\n\t\t\tdefinition.view[className] = {\n\t\t\t\tkey: \"class\",\n\t\t\t\tvalue: [className]\n\t\t\t};\n\t\t}\n\t\tthis.editor.conversion.attributeToAttribute(definition);\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 { Indent, IndentBlock, IndentBlockCommand, IndentBlockListCommand, IndentBlockListIntegration, IndentBlockListItemCommand, IndentEditing, IndentUI, IndentUsingClasses as _IndentUsingClasses, IndentUsingOffset as _IndentUsingOffset };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module indent/indentediting\n */\n\nimport { Plugin, MultiCommand } from '@ckeditor/ckeditor5-core';\n\n/**\n * The indent editing feature.\n *\n * This plugin registers the `'indent'` and `'outdent'` commands.\n *\n * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in the\n * {@link module:indent/indent~Indent indent feature} API documentation.\n */\nexport class IndentEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'IndentEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.commands.add( 'indent', new MultiCommand( editor ) );\n\t\teditor.commands.add( 'outdent', new MultiCommand( editor ) );\n\t}\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/**\n * @module indent/indentui\n */\n\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconIndent, IconOutdent } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The indent UI feature.\n *\n * This plugin registers the `'indent'` and `'outdent'` buttons.\n *\n * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in\n * the {@link module:indent/indent~Indent indent feature} API documentation.\n */\nexport class IndentUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'IndentUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = editor.t;\n\n\t\tconst localizedIndentIcon = locale.uiLanguageDirection == 'ltr' ? IconIndent : IconOutdent;\n\t\tconst localizedOutdentIcon = locale.uiLanguageDirection == 'ltr' ? IconOutdent : IconIndent;\n\n\t\tthis._defineButton( 'indent', t( 'Increase indent' ), localizedIndentIcon );\n\t\tthis._defineButton( 'outdent', t( 'Decrease indent' ), localizedOutdentIcon );\n\t}\n\n\t/**\n\t * Defines UI buttons for both toolbar and menu bar.\n\t */\n\tprivate _defineButton( commandName: 'indent' | 'outdent', label: string, icon: string ): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( commandName, () => {\n\t\t\tconst buttonView = this._createButton( ButtonView, commandName, label, icon );\n\n\t\t\tbuttonView.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn buttonView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:' + commandName, () => {\n\t\t\treturn this._createButton( MenuBarMenuListItemButtonView, commandName, label, icon );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a button to use either in toolbar or in menu bar.\n\t */\n\tprivate _createButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>(\n\t\tButtonClass: T,\n\t\tcommandName: string,\n\t\tlabel: string,\n\t\ticon: string\n\t): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get( commandName )!;\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\n\t\tview.set( {\n\t\t\tlabel,\n\t\t\ticon\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t// Execute the command.\n\t\tthis.listenTo( view, 'execute', () => {\n\t\t\teditor.execute( commandName );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn view;\n\t}\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/**\n * @module indent/indent\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { IndentEditing } from './indentediting.js';\nimport { IndentUI } from './indentui.js';\n\n/**\n * The indent feature.\n *\n * This plugin acts as a single entry point plugin for other features that implement indentation of elements like lists or paragraphs.\n *\n * The compatible features are:\n *\n * * The {@link module:list/list~List} or {@link module:list/list/listediting~ListEditing} feature for list indentation.\n * * The {@link module:indent/indentblock~IndentBlock} feature for block indentation.\n *\n * This is a \"glue\" plugin that loads the following plugins:\n *\n * * The {@link module:indent/indentediting~IndentEditing indent editing feature}.\n * * The {@link module:indent/indentui~IndentUI indent UI feature}.\n *\n * The dependent plugins register the `'indent'` and `'outdent'` commands and introduce the `'indent'` and `'outdent'` buttons\n * that allow to increase or decrease text indentation of supported elements.\n *\n * **Note**: In order for the commands and buttons to work, at least one of compatible features is required.\n */\nexport class Indent extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Indent' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ IndentEditing, IndentUI ]> {\n\t\treturn [ IndentEditing, IndentUI ];\n\t}\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/**\n * @module indent/indentblockcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport type { ListUtils } from '@ckeditor/ckeditor5-list';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\nimport type { IndentBehavior } from './indentcommandbehavior/indentbehavior.js';\n\n/**\n * The indent block command.\n *\n * The command is registered by the {@link module:indent/indentblock~IndentBlock} as `'indentBlock'` for indenting blocks and\n * `'outdentBlock'` for outdenting blocks.\n *\n * To increase block indentation at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'indentBlock' );\n * ```\n *\n * To decrease block indentation at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'outdentBlock' );\n * ```\n */\nexport class IndentBlockCommand extends Command {\n\t/**\n\t * The command's indentation behavior.\n\t */\n\tprivate readonly _indentBehavior: IndentBehavior;\n\n\t/**\n\t * Creates an instance of the command.\n\t */\n\tconstructor( editor: Editor, indentBehavior: IndentBehavior ) {\n\t\tsuper( editor );\n\n\t\tthis._indentBehavior = indentBehavior;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tconst block = first( model.document.selection.getSelectedBlocks() );\n\n\t\tif ( !block || !this._isIndentationChangeAllowed( block ) ) {\n\t\t\tthis.isEnabled = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isEnabled = this._indentBehavior.checkEnabled( block.getAttribute( 'blockIndent' ) as string );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\n\t\tconst blocksToChange = this._getBlocksToChange();\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const block of blocksToChange ) {\n\t\t\t\tconst currentIndent = block.getAttribute( 'blockIndent' ) as string;\n\n\t\t\t\tconst nextIndent = this._indentBehavior.getNextIndent( currentIndent );\n\n\t\t\t\tif ( nextIndent ) {\n\t\t\t\t\twriter.setAttribute( 'blockIndent', nextIndent, block );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'blockIndent', block );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns blocks from selection that should have blockIndent selection set.\n\t */\n\tprivate _getBlocksToChange(): Array<ModelElement> {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst blocksInSelection = Array.from( selection.getSelectedBlocks() );\n\n\t\treturn blocksInSelection.filter( block => this._isIndentationChangeAllowed( block ) );\n\t}\n\n\t/**\n\t * Returns false if indentation cannot be applied, i.e.:\n\t * - for blocks disallowed by schema declaration\n\t * - for blocks in Document Lists (disallowed forward indentation only). See https://github.com/ckeditor/ckeditor5/issues/14155.\n\t * Otherwise returns true.\n\t */\n\tprivate _isIndentationChangeAllowed( element: ModelElement ): boolean {\n\t\tconst editor = this.editor;\n\n\t\tif ( !editor.model.schema.checkAttribute( element, 'blockIndent' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !editor.plugins.has( 'ListUtils' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Only forward indentation is disallowed in list items. This allows the user to outdent blocks that are already indented.\n\t\tif ( !this._indentBehavior.isForward ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst listUtils: ListUtils = editor.plugins.get( 'ListUtils' );\n\n\t\treturn !listUtils.isListItemBlock( element );\n\t}\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/**\n * @module indent/indentcommandbehavior/indentusingoffset\n */\n\nimport type { IndentBehavior } from './indentbehavior.js';\n\n/**\n * The block indentation behavior that uses offsets to set indentation.\n *\n * @internal\n */\nexport class IndentUsingOffset implements IndentBehavior {\n\t/**\n\t * The direction of indentation.\n\t */\n\tpublic isForward: boolean;\n\n\t/**\n\t * The offset of the next indentation step.\n\t */\n\tpublic offset: number;\n\n\t/**\n\t * Indentation unit.\n\t */\n\tpublic unit: string;\n\n\t/**\n\t * Creates an instance of the indentation behavior.\n\t *\n\t * @param config.direction The direction of indentation.\n\t * @param config.offset The offset of the next indentation step.\n\t * @param config.unit Indentation unit.\n\t */\n\tconstructor( config: { direction: 'forward' | 'backward'; offset: number; unit: string } ) {\n\t\tthis.isForward = config.direction === 'forward';\n\t\tthis.offset = config.offset;\n\t\tthis.unit = config.unit;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic checkEnabled( indentAttributeValue: string ): boolean {\n\t\tconst currentOffset = parseFloat( indentAttributeValue || '0' );\n\n\t\t// The command is always enabled for forward indentation.\n\t\treturn this.isForward || currentOffset > 0;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic getNextIndent( indentAttributeValue: string ): string | undefined {\n\t\tconst currentOffset = parseFloat( indentAttributeValue || '0' );\n\t\tconst isSameUnit = !indentAttributeValue || indentAttributeValue.endsWith( this.unit );\n\n\t\tif ( currentOffset < 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !isSameUnit ) {\n\t\t\treturn this.isForward ? this.offset + this.unit : undefined;\n\t\t}\n\n\t\tconst nextOffset = this.isForward ? this.offset : -this.offset;\n\t\tconst offsetToSet = currentOffset + nextOffset;\n\n\t\treturn offsetToSet > 0 ? offsetToSet + this.unit : undefined;\n\t}\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/**\n * @module indent/indentcommandbehavior/indentusingclasses\n */\n\nimport type { IndentBehavior } from './indentbehavior.js';\n\n/**\n * The block indentation behavior that uses classes to set indentation.\n *\n * @internal\n */\nexport class IndentUsingClasses implements IndentBehavior {\n\t/**\n\t * The direction of indentation.\n\t */\n\tpublic isForward: boolean;\n\n\t/**\n\t * A list of classes used for indentation.\n\t */\n\tpublic classes: Array<string>;\n\n\t/**\n\t * Creates an instance of the indentation behavior.\n\t *\n\t * @param config.direction The direction of indentation.\n\t * @param config.classes A list of classes used for indentation.\n\t */\n\tconstructor( config: { direction: 'forward' | 'backward'; classes: Array<string> } ) {\n\t\tthis.isForward = config.direction === 'forward';\n\t\tthis.classes = config.classes!;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic checkEnabled( indentAttributeValue: string ): boolean {\n\t\tconst currentIndex = this.classes.indexOf( indentAttributeValue );\n\n\t\tif ( this.isForward ) {\n\t\t\treturn currentIndex < this.classes.length - 1;\n\t\t} else {\n\t\t\treturn currentIndex >= 0;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic getNextIndent( indentAttributeValue: string ): string | undefined {\n\t\tconst currentIndex = this.classes.indexOf( indentAttributeValue );\n\t\tconst indexStep = this.isForward ? 1 : -1;\n\t\tconst nextIndex = currentIndex + indexStep;\n\t\tconst nextIndexClamped = Math.min( nextIndex, this.classes.length - 1 );\n\n\t\treturn this.classes[ nextIndexClamped ];\n\t}\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/**\n * @module indent/integrations/indentblocklistcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelDocumentSelection, ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { _isListItemBlock } from '@ckeditor/ckeditor5-list';\n\nimport type { IndentBehavior } from '../indentcommandbehavior/indentbehavior.js';\n\n/**\n * The indent block list command.\n *\n * The command is registered by the {@link module:indent/integrations/indentblocklistintegration~IndentBlockListIntegration} as\n * `'indentBlockList'` for indenting lists and `'outdentBlockList'` for outdenting lists.\n *\n * To increase/decrease block indentation of the list the selection must be at the start of the first top–level list item\n * in the list.\n *\n * To increase block indentation of the list, execute the command:\n *\n * ```ts\n * editor.execute( 'indentBlockList' );\n * ```\n *\n * To decrease block indentation of the list, execute the command:\n *\n * ```ts\n * editor.execute( 'outdentBlockList' );\n * ```\n */\nexport class IndentBlockListCommand extends Command {\n\t/**\n\t * The command's indentation behavior.\n\t */\n\tprivate readonly _indentBehavior: IndentBehavior;\n\n\t/**\n\t * Creates an instance of the command.\n\t */\n\tconstructor( editor: Editor, indentBehavior: IndentBehavior ) {\n\t\tsuper( editor );\n\n\t\tthis._indentBehavior = indentBehavior;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst listItem = this._getFirstListItemIfSelectionIsAtListStart( this.editor.model.document.selection );\n\n\t\tthis.isEnabled = !!listItem && this._indentBehavior.checkEnabled( listItem.getAttribute( 'blockIndentList' ) as string );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.firstListOnly When `true`, indentation is applied only to the first list at the beginning of the selection.\n\t * When `false` or omitted, indentation is applied to all lists of the selection.\n\t */\n\tpublic override execute( options: { firstListOnly?: boolean } = {} ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst listUtils = editor.plugins.get( 'ListUtils' );\n\n\t\tmodel.change( writer => {\n\t\t\tconst listItem = this._getFirstListItemIfSelectionIsAtListStart( selection )!;\n\t\t\tconst listItems = [];\n\n\t\t\tif ( !options.firstListOnly ) {\n\t\t\t\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\n\t\t\t\tfor ( const block of blocks ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t_isListItemBlock( block ) &&\n\t\t\t\t\t\tblock.getAttribute( 'listIndent' ) === 0 &&\n\t\t\t\t\t\tmodel.schema.checkAttribute( block, 'blockIndentList' )\n\t\t\t\t\t) {\n\t\t\t\t\t\tlistItems.push( block );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlistItems.push( listItem );\n\t\t\t}\n\n\t\t\t// Expand to all list items in the selected lists to process them together and reduce postfixer usage.\n\t\t\tconst expandedListItems = listUtils.expandListBlocksToCompleteList( listItems );\n\n\t\t\tfor ( const item of expandedListItems ) {\n\t\t\t\tconst currentIndent = item.getAttribute( 'blockIndentList' ) as string;\n\t\t\t\tconst nextIndent = this._indentBehavior.getNextIndent( currentIndent );\n\n\t\t\t\tif ( nextIndent ) {\n\t\t\t\t\twriter.setAttribute( 'blockIndentList', nextIndent, item );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'blockIndentList', item );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the list item at the beginning of the current selection if it is the first top–level list item in the list.\n\t * Otherwise, returns `null`.\n\t */\n\tprivate _getFirstListItemIfSelectionIsAtListStart( selection: ModelDocumentSelection ): ModelElement | null {\n\t\tconst position = selection.getFirstPosition()!;\n\t\tconst listUtils = this.editor.plugins.get( 'ListUtils' );\n\t\tconst parent = position.parent as ModelElement;\n\t\tconst schema = this.editor.model.schema;\n\n\t\tif (\n\t\t\tposition.isAtStart &&\n\t\t\t_isListItemBlock( parent ) &&\n\t\t\tparent.getAttribute( 'listIndent' ) == 0 &&\n\t\t\tschema.checkAttribute( parent, 'blockIndentList' ) &&\n\t\t\tlistUtils.isFirstListItemInList( parent )\n\t\t) {\n\t\t\treturn parent;\n\t\t}\n\n\t\treturn null;\n\t}\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/**\n * @module indent/integrations/indentblocklistitemcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { type ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { type ListUtils } from '@ckeditor/ckeditor5-list';\n\nimport type { IndentBehavior } from '../indentcommandbehavior/indentbehavior.js';\n\n/**\n * The indent block list item command.\n *\n * The command is registered by the {@link module:indent/integrations/indentblocklistintegration~IndentBlockListIntegration} as\n * `'indentBlockListItem'` for indenting list items and `'outdentBlockListItem'` for outdenting list items.\n *\n * It's only possible to reset the block indentation of a list item to `0`.\n * This means that if a list item has negative block indentation, the command will only allow forward indentation\n * to make it possible to reset it to `0` and if a list item has positive block indentation, the command\n * will only allow backward indentation to make it possible to reset it to `0`.\n *\n * To increase block indentation of the list item, execute the command:\n *\n * ```ts\n * editor.execute( 'indentBlockListItem' );\n * ```\n *\n * To decrease block indentation of the list item, execute the command:\n *\n * ```ts\n * editor.execute( 'outdentBlockListItem' );\n * ```\n */\nexport class IndentBlockListItemCommand extends Command {\n\t/**\n\t * The command's indentation behavior.\n\t */\n\tprivate readonly _indentBehavior: IndentBehavior;\n\n\t/**\n\t * Creates an instance of the command.\n\t */\n\tconstructor( editor: Editor, indentBehavior: IndentBehavior ) {\n\t\tsuper( editor );\n\n\t\tthis._indentBehavior = indentBehavior;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._getAffectedListItems().length > 0;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const block of this._getAffectedListItems() ) {\n\t\t\t\twriter.removeAttribute( 'blockIndentListItem', block );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns an array of list items which block indentation should be changed.\n\t */\n\tprivate _getAffectedListItems(): Array<ModelElement> {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst listUtils: ListUtils = this.editor.plugins.get( 'ListUtils' );\n\t\tconst blocksInSelection = Array.from( selection.getSelectedBlocks() );\n\t\tconst expandedBlocks = listUtils.expandListBlocksToCompleteItems( blocksInSelection );\n\n\t\treturn expandedBlocks.filter( block => this._isIndentationChangeAllowed( block ) );\n\t}\n\n\t/**\n\t * Returns `true` if changing the block indentation is allowed for the given list item.\n\t */\n\tprivate _isIndentationChangeAllowed( element: ModelElement ): boolean {\n\t\tif ( !element.hasAttribute( 'blockIndentListItem' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._indentBehavior.checkEnabled( element.getAttribute( 'blockIndentListItem' ) as string );\n\t}\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/**\n * @module indent/indentcommandbehavior/resetindentusingoffset\n */\n\nimport { IndentUsingOffset } from './indentusingoffset.js';\n\n/**\n * The list item block indentation behavior that resets offset-based indentation toward zero.\n *\n * Unlike {@link module:indent/indentcommandbehavior/indentusingoffset~IndentUsingOffset}, this behavior\n * is enabled only when the current indentation value can be moved toward zero:\n * - for forward direction only when the current offset is negative,\n * - for backward direction only when the current offset is positive.\n *\n * @internal\n */\nexport class ResetIndentUsingOffset extends IndentUsingOffset {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override checkEnabled( indentAttributeValue: string ): boolean {\n\t\tconst currentOffset = parseFloat( indentAttributeValue );\n\n\t\treturn this.isForward && currentOffset < 0 || !this.isForward && currentOffset > 0;\n\t}\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/**\n * @module indent/indentcommandbehavior/resetindentusingclasses\n */\n\nimport { IndentUsingClasses } from './indentusingclasses.js';\n\n/**\n * The list item block indentation behavior that resets class-based indentation toward zero.\n *\n * Unlike {@link module:indent/indentcommandbehavior/indentusingclasses~IndentUsingClasses}, this behavior\n * is enabled only in the backward (outdent) direction when a class-based indentation is set.\n * This is because class-based indentation values cannot be negative, so the only way to reset\n * them to zero is to remove the class by outdenting.\n *\n * @internal\n */\nexport class ResetIndentUsingClasses extends IndentUsingClasses {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override checkEnabled( indentAttributeValue: string ): boolean {\n\t\treturn !this.isForward && !!indentAttributeValue;\n\t}\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/**\n * @module indent/integrations/indentblocklistintegration\n */\n\nimport {\n\ttype ListEditingPostFixerEvent,\n\ttype _ListIndentCommandAfterExecuteEvent\n} from '@ckeditor/ckeditor5-list';\n\nimport { type GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\ttype MultiCommand,\n\tPlugin\n} from '@ckeditor/ckeditor5-core';\n\nimport {\n\taddMarginStylesRules,\n\ttype ModelWriter,\n\ttype ModelElement,\n\ttype UpcastElementEvent,\n\ttype ViewConsumable,\n\ttype ViewDocumentTabEvent,\n\ttype ViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport { IndentBlockListCommand } from './indentblocklistcommand.js';\nimport { IndentBlockListItemCommand } from './indentblocklistitemcommand.js';\nimport { IndentUsingOffset } from '../indentcommandbehavior/indentusingoffset.js';\nimport { IndentUsingClasses } from '../indentcommandbehavior/indentusingclasses.js';\nimport { ResetIndentUsingOffset } from '../indentcommandbehavior/resetindentusingoffset.js';\nimport { ResetIndentUsingClasses } from '../indentcommandbehavior/resetindentusingclasses.js';\n\n/**\n * This integration enables using block indentation feature with lists.\n */\nexport class IndentBlockListIntegration extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'IndentBlockListIntegration' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\tif ( !this.editor.plugins.has( 'ListEditing' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst config = editor.config.get( 'indentBlock' )!;\n\n\t\tif ( config.classes && config.classes.length ) {\n\t\t\tthis._setupConversionUsingClasses( config.classes, 'ol', 'blockIndentList', 'list' );\n\t\t\tthis._setupConversionUsingClasses( config.classes, 'ul', 'blockIndentList', 'list' );\n\t\t\tthis._setupConversionUsingClasses( config.classes!, 'li', 'blockIndentListItem', 'item' );\n\n\t\t\teditor.commands.add( 'indentBlockList', new IndentBlockListCommand( editor, new IndentUsingClasses( {\n\t\t\t\tdirection: 'forward',\n\t\t\t\tclasses: config.classes!\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'outdentBlockList', new IndentBlockListCommand( editor, new IndentUsingClasses( {\n\t\t\t\tdirection: 'backward',\n\t\t\t\tclasses: config.classes!\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'indentBlockListItem', new IndentBlockListItemCommand( editor, new ResetIndentUsingClasses( {\n\t\t\t\tdirection: 'forward',\n\t\t\t\tclasses: config.classes!\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'outdentBlockListItem', new IndentBlockListItemCommand( editor, new ResetIndentUsingClasses( {\n\t\t\t\tdirection: 'backward',\n\t\t\t\tclasses: config.classes!\n\t\t\t} ) ) );\n\t\t} else {\n\t\t\teditor.data.addStyleProcessorRules( addMarginStylesRules );\n\n\t\t\tthis._setupConversionUsingOffset( 'ol', 'blockIndentList', 'list' );\n\t\t\tthis._setupConversionUsingOffset( 'ul', 'blockIndentList', 'list' );\n\t\t\tthis._setupConversionUsingOffset( 'li', 'blockIndentListItem', 'item' );\n\n\t\t\teditor.commands.add( 'indentBlockList', new IndentBlockListCommand( editor, new IndentUsingOffset( {\n\t\t\t\tdirection: 'forward',\n\t\t\t\toffset: config.offset!,\n\t\t\t\tunit: config.unit!\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'outdentBlockList', new IndentBlockListCommand( editor, new IndentUsingOffset( {\n\t\t\t\tdirection: 'backward',\n\t\t\t\toffset: config.offset!,\n\t\t\t\tunit: config.unit!\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'indentBlockListItem', new IndentBlockListItemCommand( editor, new ResetIndentUsingOffset( {\n\t\t\t\tdirection: 'forward',\n\t\t\t\toffset: config.offset!,\n\t\t\t\tunit: config.unit!\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'outdentBlockListItem', new IndentBlockListItemCommand( editor, new ResetIndentUsingOffset( {\n\t\t\t\tdirection: 'backward',\n\t\t\t\toffset: config.offset!,\n\t\t\t\tunit: config.unit!\n\t\t\t} ) ) );\n\t\t}\n\n\t\tconst listEditing = editor.plugins.get( 'ListEditing' );\n\n\t\t// Make sure that all items in a single list (items at the same level & listType) have the same blockIndentList attribute value.\n\t\t// Also make sure that all block in a single list item (blocks with the same listItemId) have the same\n\t\t// blockIndentListItem attribute value.\n\t\tlistEditing.on<ListEditingPostFixerEvent>( 'postFixer', ( evt, { listNodes, writer } ) => {\n\t\t\tfor ( const { node, previousNodeInList } of listNodes ) {\n\t\t\t\t// This is a first item of a nested list.\n\t\t\t\tif ( !previousNodeInList ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( previousNodeInList.getAttribute( 'listType' ) != node.getAttribute( 'listType' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( ensureIndentValuesConsistency( 'blockIndentList', node, previousNodeInList, writer ) ) {\n\t\t\t\t\tevt.return = true;\n\t\t\t\t}\n\n\t\t\t\tif ( previousNodeInList.getAttribute( 'listItemId' ) != node.getAttribute( 'listItemId' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( ensureIndentValuesConsistency( 'blockIndentListItem', node, previousNodeInList, writer ) ) {\n\t\t\t\t\tevt.return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.listenTo<ViewDocumentTabEvent>( editor.editing.view.document, 'tab', ( evt, data ) => {\n\t\t\tconst commandName = data.shiftKey ? 'outdentBlockList' : 'indentBlockList';\n\t\t\tconst command = this.editor.commands.get( commandName )!;\n\n\t\t\tif ( command.isEnabled ) {\n\t\t\t\teditor.execute( commandName, { firstListOnly: true } );\n\n\t\t\t\tdata.stopPropagation();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: 'li', priority: 'high' } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\n\t\tif ( !editor.plugins.has( 'ListEditing' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Schema registration.\n\t\tschema.extend( '$listItem', { allowAttributes: [ 'blockIndentList', 'blockIndentListItem' ] } );\n\t\tschema.setAttributeProperties( 'blockIndentList', { isFormatting: true } );\n\t\tschema.setAttributeProperties( 'blockIndentListItem', { isFormatting: true } );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( !item.getAttribute( 'listItemId' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'blockIndentList' );\n\n\t\tmodel.schema.addAttributeCheck( context => {\n\t\t\tconst item = context.last;\n\n\t\t\tif ( !item.getAttribute( 'listItemId' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, 'blockIndentListItem' );\n\n\t\t// Clear blockIndentList and blockIndentListItem when list indent changes.\n\t\tconst clearBlockIndentAttributesOnListIndentChange = (\n\t\t\t_evt: unknown,\n\t\t\tchangedBlocks: Array<ModelElement>\n\t\t) => {\n\t\t\teditor.model.change( writer => {\n\t\t\t\tfor ( const node of changedBlocks ) {\n\t\t\t\t\tif ( node.hasAttribute( 'listItemId' ) ) {\n\t\t\t\t\t\tif ( node.hasAttribute( 'blockIndentList' ) ) {\n\t\t\t\t\t\t\twriter.removeAttribute( 'blockIndentList', node );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( node.hasAttribute( 'blockIndentListItem' ) ) {\n\t\t\t\t\t\t\twriter.removeAttribute( 'blockIndentListItem', node );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\tconst indentListCommand = editor.commands.get( 'indentList' );\n\t\tconst outdentListCommand = editor.commands.get( 'outdentList' );\n\n\t\tif ( indentListCommand ) {\n\t\t\tthis.listenTo<_ListIndentCommandAfterExecuteEvent>(\n\t\t\t\tindentListCommand,\n\t\t\t\t'afterExecute',\n\t\t\t\tclearBlockIndentAttributesOnListIndentChange\n\t\t\t);\n\t\t}\n\n\t\tif ( outdentListCommand ) {\n\t\t\tthis.listenTo<_ListIndentCommandAfterExecuteEvent>(\n\t\t\t\toutdentListCommand,\n\t\t\t\t'afterExecute',\n\t\t\t\tclearBlockIndentAttributesOnListIndentChange\n\t\t\t);\n\t\t}\n\n\t\t// Register list block indent commands in multi command.\n\t\tconst indentCommand = editor.commands.get( 'indent' ) as MultiCommand;\n\t\tconst outdentCommand = editor.commands.get( 'outdent' ) as MultiCommand;\n\n\t\t// Priority is highest so that block indent takes precedence over list indent (`indentList` is registered\n\t\t// at `high`). When the selection is at the start of the first list item at indent 0, the block indent\n\t\t// command adds margin instead of increasing the list indent level. For items at higher indent levels,\n\t\t// this command is disabled and falls through to `indentList`.\n\t\tindentCommand.registerChildCommand( editor.commands.get( 'indentBlockList' )!, { priority: 'highest' } );\n\t\toutdentCommand.registerChildCommand( editor.commands.get( 'outdentBlockList' )! );\n\n\t\tindentCommand.registerChildCommand( editor.commands.get( 'indentBlockListItem' )! );\n\t\toutdentCommand.registerChildCommand( editor.commands.get( 'outdentBlockListItem' )! );\n\t}\n\n\t/**\n\t * Setups conversion for list block indent using offset.\n\t */\n\tprivate _setupConversionUsingOffset( element: string, attributeName: string, scope: 'list' | 'item' ): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst conversion = editor.conversion;\n\t\tconst marginProperty = locale.contentLanguageDirection === 'rtl' ? 'margin-right' : 'margin-left';\n\t\tconst listEditing = editor.plugins.get( 'ListEditing' );\n\n\t\tconversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on<UpcastElementEvent>(\n\t\t\t\t`element:${ element }`,\n\t\t\t\tlistBlockIndentUpcastConverter(\n\t\t\t\t\tattributeName,\n\t\t\t\t\titem => item.getStyle( marginProperty ),\n\t\t\t\t\t( consumable, item ) => consumable.consume( item, { styles: marginProperty } )\n\t\t\t\t),\n\t\t\t\t{ priority: 'low' }\n\t\t\t);\n\t\t} );\n\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope,\n\t\t\tattributeName,\n\n\t\t\tsetAttributeOnDowncast( writer, value, element ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.setStyle( marginProperty, value as string, element );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Setups conversion for list block indent using classes.\n\t */\n\tprivate _setupConversionUsingClasses( classes: Array<string>, element: string, attributeName: string, scope: 'list' | 'item' ): void {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\t\tconst listEditing = editor.plugins.get( 'ListEditing' );\n\n\t\tconversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on<UpcastElementEvent>(\n\t\t\t\t`element:${ element }`,\n\t\t\t\tlistBlockIndentUpcastConverter(\n\t\t\t\t\tattributeName,\n\t\t\t\t\titem => classes.find( cls => item.hasClass( cls ) ),\n\t\t\t\t\t( consumable, item, value ) => consumable.consume( item, { classes: value } )\n\t\t\t\t),\n\t\t\t\t{ priority: 'low' }\n\t\t\t);\n\t\t} );\n\n\t\tlistEditing.registerDowncastStrategy( {\n\t\t\tscope,\n\t\t\tattributeName,\n\n\t\t\tsetAttributeOnDowncast( writer, value, element ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\twriter.addClass( value as string, element );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Returns an upcast converter for block list indentation.\n *\n * @param attributeName The name of the model attribute.\n * @param getValue A function to get the value from the view element.\n * @param consume A function to consume the view element.\n * @returns A callback for the upcast conversion.\n */\nfunction listBlockIndentUpcastConverter(\n\tattributeName: string,\n\tgetValue: ( viewItem: ViewElement ) => string | undefined,\n\tconsume: ( consumable: ViewConsumable, viewItem: ViewElement, value: string ) => void\n): GetCallback<UpcastElementEvent> {\n\treturn ( evt, data, conversionApi ) => {\n\t\tconst { writer, consumable } = conversionApi;\n\n\t\tif ( !data.modelRange ) {\n\t\t\tObject.assign( data, conversionApi.convertChildren( data.viewItem, data.modelCursor ) );\n\t\t}\n\n\t\tconst value = getValue( data.viewItem );\n\n\t\tif ( value === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet applied = false;\n\t\tlet indentLevel;\n\n\t\tfor ( const item of data.modelRange!.getItems( { shallow: true } ) ) {\n\t\t\tif ( indentLevel === undefined ) {\n\t\t\t\tindentLevel = item.getAttribute( 'listIndent' );\n\t\t\t}\n\n\t\t\tif ( item.hasAttribute( attributeName ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( item.getAttribute( 'listIndent' ) !== indentLevel ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\twriter.setAttribute( attributeName, value, item );\n\t\t\tapplied = true;\n\t\t}\n\n\t\tif ( applied ) {\n\t\t\tconsume( consumable, data.viewItem, value );\n\t\t}\n\t};\n}\n\n/**\n * Ensures that two nodes have the same value of the given attribute.\n * If the values are different, the attribute value from the previous node is applied to the given node.\n * Returns true if the attribute value was changed, false otherwise.\n */\nfunction ensureIndentValuesConsistency(\n\tattributeName: string,\n\tnode: ModelElement,\n\tpreviousNodeInList: ModelElement,\n\twriter: ModelWriter\n): boolean {\n\tconst prevNodeIndentListValue = previousNodeInList.getAttribute( attributeName );\n\n\tif ( node.getAttribute( attributeName ) === prevNodeIndentListValue ) {\n\t\treturn false;\n\t}\n\n\tif ( prevNodeIndentListValue ) {\n\t\twriter.setAttribute( attributeName, prevNodeIndentListValue, node );\n\t} else {\n\t\twriter.removeAttribute( attributeName, node );\n\t}\n\n\treturn true;\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/**\n * @module indent/indentblock\n */\n\nimport { Plugin, type Editor, type MultiCommand, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { addMarginStylesRules, type DowncastAttributeDescriptor, type ViewElement } from '@ckeditor/ckeditor5-engine';\n\nimport type { HeadingOption } from '@ckeditor/ckeditor5-heading';\nimport { IndentBlockCommand } from './indentblockcommand.js';\nimport { IndentUsingOffset } from './indentcommandbehavior/indentusingoffset.js';\nimport { IndentUsingClasses } from './indentcommandbehavior/indentusingclasses.js';\nimport { IndentBlockListIntegration } from './integrations/indentblocklistintegration.js';\n\nconst DEFAULT_ELEMENTS = [ 'paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6' ];\n\n/**\n * The block indentation feature.\n *\n * It registers the `'indentBlock'` and `'outdentBlock'` commands.\n *\n * If the plugin {@link module:indent/indent~Indent} is defined, it also attaches the `'indentBlock'` and `'outdentBlock'` commands to\n * the `'indent'` and `'outdent'` commands.\n */\nexport class IndentBlock extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'indentBlock', {\n\t\t\toffset: 40,\n\t\t\tunit: 'px'\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'IndentBlock' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ IndentBlockListIntegration ]> {\n\t\treturn [ IndentBlockListIntegration ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst configuration = editor.config.get( 'indentBlock' )!;\n\n\t\tif ( configuration.classes && configuration.classes.length ) {\n\t\t\tthis._setupConversionUsingClasses( configuration.classes );\n\n\t\t\teditor.commands.add( 'indentBlock', new IndentBlockCommand( editor, new IndentUsingClasses( {\n\t\t\t\tdirection: 'forward',\n\t\t\t\tclasses: configuration.classes\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'outdentBlock', new IndentBlockCommand( editor, new IndentUsingClasses( {\n\t\t\t\tdirection: 'backward',\n\t\t\t\tclasses: configuration.classes\n\t\t\t} ) ) );\n\t\t} else {\n\t\t\teditor.data.addStyleProcessorRules( addMarginStylesRules );\n\t\t\tthis._setupConversionUsingOffset();\n\n\t\t\teditor.commands.add( 'indentBlock', new IndentBlockCommand( editor, new IndentUsingOffset( {\n\t\t\t\tdirection: 'forward',\n\t\t\t\toffset: configuration.offset!,\n\t\t\t\tunit: configuration.unit!\n\t\t\t} ) ) );\n\n\t\t\teditor.commands.add( 'outdentBlock', new IndentBlockCommand( editor, new IndentUsingOffset( {\n\t\t\t\tdirection: 'backward',\n\t\t\t\toffset: configuration.offset!,\n\t\t\t\tunit: configuration.unit!\n\t\t\t} ) ) );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\tconst indentCommand = editor.commands.get( 'indent' ) as MultiCommand;\n\t\tconst outdentCommand = editor.commands.get( 'outdent' ) as MultiCommand;\n\n\t\t// Enable block indentation to heading configuration options. If it is not defined enable in paragraph and default headings.\n\t\tconst options: Array<HeadingOption> = editor.config.get( 'heading.options' )!;\n\t\tconst configuredElements = options && options.map( option => option.model );\n\t\tconst knownElements = configuredElements || DEFAULT_ELEMENTS;\n\n\t\tknownElements.forEach( elementName => {\n\t\t\tif ( schema.isRegistered( elementName ) ) {\n\t\t\t\tschema.extend( elementName, { allowAttributes: 'blockIndent' } );\n\t\t\t}\n\t\t} );\n\n\t\tschema.setAttributeProperties( 'blockIndent', { isFormatting: true } );\n\n\t\tindentCommand.registerChildCommand( editor.commands.get( 'indentBlock' )! );\n\t\toutdentCommand.registerChildCommand( editor.commands.get( 'outdentBlock' )! );\n\t}\n\n\t/**\n\t * Setups conversion for using offset indents.\n\t */\n\tprivate _setupConversionUsingOffset(): void {\n\t\tconst conversion = this.editor.conversion;\n\t\tconst locale = this.editor.locale;\n\t\tconst marginProperty = locale.contentLanguageDirection === 'rtl' ? 'margin-right' : 'margin-left';\n\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tstyles: {\n\t\t\t\t\t[ marginProperty ]: /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'blockIndent',\n\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\t// Do not indent block elements in Document Lists. See https://github.com/ckeditor/ckeditor5/issues/12466.\n\t\t\t\t\tif ( !viewElement.is( 'element', 'li' ) ) {\n\t\t\t\t\t\treturn viewElement.getStyle( marginProperty );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tconversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\tmodel: 'blockIndent',\n\t\t\tview: modelAttributeValue => {\n\t\t\t\treturn {\n\t\t\t\t\tkey: 'style',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\t[ marginProperty as string ]: modelAttributeValue as string\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Setups conversion for using classes.\n\t */\n\tprivate _setupConversionUsingClasses( classes: Array<string> ) {\n\t\tconst definition: {\n\t\t\tmodel: { key: string; values: Array<string> };\n\t\t\tview: Record<string, DowncastAttributeDescriptor>;\n\t\t} = {\n\t\t\tmodel: {\n\t\t\t\tkey: 'blockIndent',\n\t\t\t\tvalues: []\n\t\t\t},\n\t\t\tview: {}\n\t\t};\n\n\t\tfor ( const className of classes ) {\n\t\t\tdefinition.model.values.push( className );\n\t\t\tdefinition.view[ className ] = {\n\t\t\t\tkey: 'class',\n\t\t\t\tvalue: [ className ]\n\t\t\t};\n\t\t}\n\n\t\tthis.editor.conversion.attributeToAttribute( definition );\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Widget, WidgetResize, WidgetToolbarRepository, calculateResizeHostAncestorWidth, findOptimalInsertionRange, isWidget, toWidget } from \"@ckeditor/ckeditor5-widget\";\nimport { CKEditorError, Collection, FocusTracker, KeystrokeHandler, Rect, _tryCastDimensionsToUnit, _tryParseDimensionWithUnit, first, global, logWarning, toArray } from \"@ckeditor/ckeditor5-utils\";\nimport { BalloonPanelView, ButtonView, ContextualBalloon, CssTransitionDisablerMixin, Dialog, DropdownButtonView, FocusCycler, FormHeaderView, FormRowView, IconView, LabeledFieldView, MenuBarMenuListItemButtonView, SplitButtonView, Template, UIModel, View, ViewCollection, addListToDropdown, addToolbarToDropdown, clickOutsideHandler, createDropdown, createLabeledInputNumber, createLabeledInputText, submitHandler } from \"@ckeditor/ckeditor5-ui\";\nimport { IconMedia, IconMediaPlaceholder, IconObjectCenter, IconObjectInlineLeft, IconObjectInlineRight, IconObjectLeft, IconObjectRight, IconObjectSizeCustom, IconObjectSizeFull, IconObjectSizeLarge, IconObjectSizeMedium, IconObjectSizeSmall, IconPreviousArrow } from \"@ckeditor/ckeditor5-icons\";\nimport { ModelLivePosition, ModelLiveRange } from \"@ckeditor/ckeditor5-engine\";\nimport { Clipboard } from \"@ckeditor/ckeditor5-clipboard\";\nimport { Delete } from \"@ckeditor/ckeditor5-typing\";\nimport { Undo } from \"@ckeditor/ckeditor5-undo\";\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* Returns a function that converts the model \"url\" attribute to the view representation.\n*\n* Depending on the configuration, the view representation can be \"semantic\" (for the data pipeline):\n*\n* ```html\n* <figure class=\"media\">\n* \t<oembed url=\"foo\"></oembed>\n* </figure>\n* ```\n*\n* or \"non-semantic\" (for the editing view pipeline):\n*\n* ```html\n* <figure class=\"media\">\n* \t<div data-oembed-url=\"foo\">[ non-semantic media preview for \"foo\" ]</div>\n* </figure>\n* ```\n*\n* **Note:** Changing the model \"url\" attribute replaces the entire content of the\n* `<figure>` in the view.\n*\n* @param registry The registry providing\n* the media and their content.\n* @param options options object with following properties:\n* - elementName When set, overrides the default element name for semantic media embeds.\n* - renderMediaPreview When `true`, the converter will create the view in the non-semantic form.\n* - renderForEditingView When `true`, the converter will create a view specific for the\n* editing pipeline (e.g. including CSS classes, content placeholders).\n*\n* @internal\n*/\nfunction modelToViewUrlAttributeConverter(registry, options) {\n\tconst converter = (evt, data, conversionApi) => {\n\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\tconst url = data.attributeNewValue;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst figure = conversionApi.mapper.toViewElement(data.item);\n\t\tconst mediaContentElement = [...figure.getChildren()].find((child) => child.getCustomProperty(\"media-content\"));\n\t\tviewWriter.remove(mediaContentElement);\n\t\tconst mediaViewElement = registry.getMediaViewElement(viewWriter, url, options);\n\t\tviewWriter.insert(viewWriter.createPositionAt(figure, 0), mediaViewElement);\n\t};\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"attribute:url:media\", converter);\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* Converts a given {@link module:engine/view/element~ViewElement} to a media embed widget:\n* * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}\n* allowing to recognize the media widget element.\n* * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n*\n* @param writer An instance of the view writer.\n* @param label The element's label.\n* @internal\n*/\nfunction toMediaWidget(viewElement, writer, label) {\n\twriter.setCustomProperty(\"media\", true, viewElement);\n\treturn toWidget(viewElement, writer, { label });\n}\n/**\n* Returns a media widget editing view element if one is selected.\n*\n* @internal\n*/\nfunction getSelectedMediaViewWidget(selection) {\n\tconst viewElement = selection.getSelectedElement();\n\tif (viewElement && isMediaWidget(viewElement)) return viewElement;\n\treturn null;\n}\n/**\n* Checks if a given view element is a media widget.\n*\n* @internal\n*/\nfunction isMediaWidget(viewElement) {\n\treturn !!viewElement.getCustomProperty(\"media\") && isWidget(viewElement);\n}\n/**\n* Creates a view element representing the media. Either a \"semantic\" one for the data pipeline:\n*\n* ```html\n* <figure class=\"media\">\n* \t<oembed url=\"foo\"></oembed>\n* </figure>\n* ```\n*\n* or a \"non-semantic\" (for the editing view pipeline):\n*\n* ```html\n* <figure class=\"media\">\n* \t<div data-oembed-url=\"foo\">[ non-semantic media preview for \"foo\" ]</div>\n* </figure>\n* ```\n*\n* @internal\n*/\nfunction createMediaFigureElement(writer, registry, url, options) {\n\treturn writer.createContainerElement(\"figure\", { class: \"media\" }, [registry.getMediaViewElement(writer, url, options), writer.createSlot()]);\n}\n/**\n* Returns a selected media element in the model, if any.\n*\n* @internal\n*/\nfunction getSelectedMediaModelWidget(selection) {\n\tconst selectedElement = selection.getSelectedElement();\n\tif (selectedElement && selectedElement.is(\"element\", \"media\")) return selectedElement;\n\treturn null;\n}\n/**\n* Creates a media element and inserts it into the model.\n*\n* **Note**: This method will use {@link module:engine/model/model~Model#insertContent `model.insertContent()`} logic of inserting content\n* if no `insertPosition` is passed.\n*\n* @param url An URL of an embeddable media.\n* @param findOptimalPosition If true it will try to find optimal position to insert media without breaking content\n* in which a selection is.\n* @internal\n*/\nfunction insertMedia(model, url, selectable, findOptimalPosition) {\n\tmodel.change((writer) => {\n\t\tconst mediaElement = writer.createElement(\"media\", { url });\n\t\tmodel.insertObject(mediaElement, selectable, null, {\n\t\t\tsetSelection: \"on\",\n\t\t\tfindOptimalPosition: findOptimalPosition ? \"auto\" : void 0\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* The insert media command.\n*\n* The command is registered by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} as `'mediaEmbed'`.\n*\n* To insert media at the current selection, execute the command and specify the URL:\n*\n* ```ts\n* editor.execute( 'mediaEmbed', 'http://url.to.the/media' );\n* ```\n*/\nvar MediaEmbedCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedMedia = getSelectedMediaModelWidget(selection);\n\t\tthis.value = selectedMedia ? selectedMedia.getAttribute(\"url\") : void 0;\n\t\tthis.isEnabled = isMediaSelected(selection) || isAllowedInParent(selection, model);\n\t}\n\t/**\n\t* Executes the command, which either:\n\t*\n\t* * updates the URL of the selected media,\n\t* * inserts the new media into the editor and puts the selection around it.\n\t*\n\t* @fires execute\n\t* @param url The URL of the media.\n\t*/\n\texecute(url) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedMedia = getSelectedMediaModelWidget(selection);\n\t\tif (selectedMedia) model.change((writer) => {\n\t\t\twriter.setAttribute(\"url\", url, selectedMedia);\n\t\t});\n\t\telse insertMedia(model, url, selection, true);\n\t}\n};\n/**\n* Checks if the media embed is allowed in the parent.\n*/\nfunction isAllowedInParent(selection, model) {\n\tlet parent = findOptimalInsertionRange(selection, model).start.parent;\n\tif (parent.isEmpty && !model.schema.isLimit(parent)) parent = parent.parent;\n\treturn model.schema.checkChild(parent, \"media\");\n}\n/**\n* Checks if the media object is selected.\n*/\nfunction isMediaSelected(selection) {\n\tconst element = selection.getSelectedElement();\n\treturn !!element && element.name === \"media\";\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 media-embed/mediaregistry\n*/\nconst mediaPlaceholderIconViewBox = \"0 0 64 42\";\n/**\n* A bridge between the raw media content provider definitions and the editor view content.\n*\n* It helps translating media URLs to corresponding {@link module:engine/view/element~ViewElement view elements}.\n*\n* Mostly used by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} plugin.\n*/\nvar MediaRegistry = class {\n\t/**\n\t* The {@link module:utils/locale~Locale} instance.\n\t*/\n\tlocale;\n\t/**\n\t* The media provider definitions available for the registry. Usually corresponding with the\n\t* {@link module:media-embed/mediaembedconfig~MediaEmbedConfig media configuration}.\n\t*/\n\tproviderDefinitions;\n\t/**\n\t* Creates an instance of the {@link module:media-embed/mediaregistry~MediaRegistry} class.\n\t*\n\t* @param locale The localization services instance.\n\t* @param config The configuration of the media embed feature.\n\t*/\n\tconstructor(locale, config) {\n\t\tconst providers = config.providers;\n\t\tconst extraProviders = config.extraProviders || [];\n\t\tconst removedProviders = new Set(config.removeProviders);\n\t\tconst providerDefinitions = providers.concat(extraProviders).filter((provider) => {\n\t\t\tconst name = provider.name;\n\t\t\tif (!name) {\n\t\t\t\t/**\n\t\t\t\t* One of the providers (or extra providers) specified in the media embed configuration\n\t\t\t\t* has no name and will not be used by the editor. In order to get this media\n\t\t\t\t* provider working, double check your editor configuration.\n\t\t\t\t*\n\t\t\t\t* @error media-embed-no-provider-name\n\t\t\t\t*/\n\t\t\t\tlogWarning(\"media-embed-no-provider-name\", { provider });\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn !removedProviders.has(name);\n\t\t});\n\t\tthis.locale = locale;\n\t\tthis.providerDefinitions = providerDefinitions;\n\t}\n\t/**\n\t* Checks whether the passed URL is representing a certain media type allowed in the editor.\n\t*\n\t* @param url The URL to be checked\n\t*/\n\thasMedia(url) {\n\t\treturn !!this._getMedia(url);\n\t}\n\t/**\n\t* For the given media URL string and options, it returns the {@link module:engine/view/element~ViewElement view element}\n\t* representing that media.\n\t*\n\t* **Note:** If no URL is specified, an empty view element is returned.\n\t*\n\t* @param writer The view writer used to produce a view element.\n\t* @param url The URL to be translated into a view element.\n\t*/\n\tgetMediaViewElement(writer, url, options) {\n\t\treturn this._getMedia(url).getViewElement(writer, options);\n\t}\n\t/**\n\t* Returns a `Media` instance for the given URL.\n\t*\n\t* @param url The URL of the media.\n\t* @returns The `Media` instance or `null` when there is none.\n\t*/\n\t_getMedia(url) {\n\t\tif (!url) return new Media(this.locale);\n\t\turl = url.trim();\n\t\tfor (const definition of this.providerDefinitions) {\n\t\t\tconst previewRenderer = definition.html;\n\t\t\tconst pattern = toArray(definition.url);\n\t\t\tfor (const subPattern of pattern) {\n\t\t\t\tconst match = this._getUrlMatches(url, subPattern);\n\t\t\t\tif (match) return new Media(this.locale, url, match, previewRenderer);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Tries to match `url` to `pattern`.\n\t*\n\t* @param url The URL of the media.\n\t* @param pattern The pattern that should accept the media URL.\n\t*/\n\t_getUrlMatches(url, pattern) {\n\t\tlet match = url.match(pattern);\n\t\tif (match) return match;\n\t\tlet rawUrl = url.replace(/^https?:\\/\\//, \"\");\n\t\tmatch = rawUrl.match(pattern);\n\t\tif (match) return match;\n\t\trawUrl = rawUrl.replace(/^www\\./, \"\");\n\t\tmatch = rawUrl.match(pattern);\n\t\tif (match) return match;\n\t\treturn null;\n\t}\n};\n/**\n* Represents media defined by the provider configuration.\n*\n* It can be rendered to the {@link module:engine/view/element~ViewElement view element} and used in the editing or data pipeline.\n*/\nvar Media = class {\n\t/**\n\t* The URL this Media instance represents.\n\t*/\n\turl;\n\t/**\n\t* Shorthand for {@link module:utils/locale~Locale#t}.\n\t*\n\t* @see module:utils/locale~Locale#t\n\t*/\n\t_locale;\n\t/**\n\t* The output of the `RegExp.match` which validated the {@link #url} of this media.\n\t*/\n\t_match;\n\t/**\n\t* The function returning the HTML string preview of this media.\n\t*/\n\t_previewRenderer;\n\tconstructor(locale, url, match, previewRenderer) {\n\t\tthis.url = this._getValidUrl(url);\n\t\tthis._locale = locale;\n\t\tthis._match = match;\n\t\tthis._previewRenderer = previewRenderer;\n\t}\n\t/**\n\t* Returns the view element representation of the media.\n\t*\n\t* @param writer The view writer used to produce a view element.\n\t*/\n\tgetViewElement(writer, options) {\n\t\tconst attributes = {};\n\t\tlet viewElement;\n\t\tif (options.renderForEditingView || options.renderMediaPreview && this.url && this._previewRenderer) {\n\t\t\tif (this.url) attributes[\"data-oembed-url\"] = this.url;\n\t\t\tif (options.renderForEditingView) attributes.class = \"ck-media__wrapper\";\n\t\t\tconst mediaHtml = this._getPreviewHtml(options);\n\t\t\tviewElement = writer.createRawElement(\"div\", attributes, (domElement, domConverter) => {\n\t\t\t\tdomConverter.setContentOf(domElement, mediaHtml);\n\t\t\t});\n\t\t} else {\n\t\t\tif (this.url) attributes.url = this.url;\n\t\t\tviewElement = writer.createEmptyElement(options.elementName, attributes);\n\t\t}\n\t\twriter.setCustomProperty(\"media-content\", true, viewElement);\n\t\treturn viewElement;\n\t}\n\t/**\n\t* Returns the HTML string of the media content preview.\n\t*/\n\t_getPreviewHtml(options) {\n\t\tif (this._previewRenderer) return this._previewRenderer(this._match);\n\t\telse {\n\t\t\tif (this.url && options.renderForEditingView) return this._getPlaceholderHtml();\n\t\t\treturn \"\";\n\t\t}\n\t}\n\t/**\n\t* Returns the placeholder HTML when the media has no content preview.\n\t*/\n\t_getPlaceholderHtml() {\n\t\tconst icon = new IconView();\n\t\tconst t = this._locale.t;\n\t\ticon.content = IconMediaPlaceholder;\n\t\ticon.viewBox = mediaPlaceholderIconViewBox;\n\t\treturn new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: \"ck ck-reset_all ck-media__placeholder\" },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: \"ck-media__placeholder__icon\" },\n\t\t\t\tchildren: [icon]\n\t\t\t}, {\n\t\t\t\ttag: \"a\",\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: \"ck-media__placeholder__url\",\n\t\t\t\t\ttarget: \"_blank\",\n\t\t\t\t\trel: \"noopener noreferrer\",\n\t\t\t\t\thref: this.url,\n\t\t\t\t\t\"data-cke-tooltip-text\": t(\"Open media in new tab\")\n\t\t\t\t},\n\t\t\t\tchildren: [{\n\t\t\t\t\ttag: \"span\",\n\t\t\t\t\tattributes: { class: \"ck-media__placeholder__url__text\" },\n\t\t\t\t\tchildren: [this.url]\n\t\t\t\t}]\n\t\t\t}]\n\t\t}).render().outerHTML;\n\t}\n\t/**\n\t* Returns the full URL to the specified media.\n\t*\n\t* @param url The URL of the media.\n\t*/\n\t_getValidUrl(url) {\n\t\tif (!url) return null;\n\t\tif (url.match(/^https?/)) return url;\n\t\treturn \"https://\" + url;\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 media-embed/mediaembedediting\n*/\n/**\n* The media embed editing feature.\n*/\nvar MediaEmbedEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* The media registry managing the media providers in the editor.\n\t*/\n\tregistry;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"mediaEmbed\", {\n\t\t\telementName: \"oembed\",\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tname: \"dailymotion\",\n\t\t\t\t\turl: [/^dailymotion\\.com\\/video\\/(\\w+)/, /^dai.ly\\/(\\w+)/],\n\t\t\t\t\thtml: (match) => {\n\t\t\t\t\t\treturn `<div><iframe src=\"https://www.dailymotion.com/embed/video/${match[1]}\" width=\"1280\" height=\"720\" style=\"width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display: block;\" frameborder=\"0\" allowfullscreen allow=\"autoplay\"></iframe></div>`;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"spotify\",\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(artist\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(album\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(track\\/\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: (match) => {\n\t\t\t\t\t\tconst id = match[1];\n\t\t\t\t\t\tconst isTrack = id.startsWith(\"track/\");\n\t\t\t\t\t\treturn `<div><iframe src=\"https://open.spotify.com/embed/${id}\" width=\"300\" height=\"${isTrack ? \"80\" : \"378\"}\" style=\"${isTrack ? \"width: 100%; height: 80px; border: 0; display: block;\" : \"width: 100%; height: auto; aspect-ratio: 100 / 126; border: 0; display: block;\"}\" frameborder=\"0\" allowtransparency=\"true\" allow=\"encrypted-media\"></iframe></div>`;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"youtube\",\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)(?:&t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/shorts\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^youtube\\.com\\/embed\\/([\\w-]+)(?:\\?start=(\\d+))?/,\n\t\t\t\t\t\t/^youtu\\.be\\/([\\w-]+)(?:\\?t=(\\d+))?/\n\t\t\t\t\t],\n\t\t\t\t\thtml: (match) => {\n\t\t\t\t\t\tconst id = match[1];\n\t\t\t\t\t\tconst time = match[2];\n\t\t\t\t\t\treturn `<div><iframe src=\"https://www.youtube.com/embed/${id}${time ? `?start=${time}` : \"\"}\" width=\"1280\" height=\"720\" style=\"width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display: block;\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe></div>`;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"vimeo\",\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^vimeo\\.com\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^player\\.vimeo\\.com\\/video\\/(\\d+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: (match) => {\n\t\t\t\t\t\treturn `<div><iframe src=\"https://player.vimeo.com/video/${match[1]}\" width=\"1280\" height=\"720\" style=\"width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display: block;\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>`;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"instagram\",\n\t\t\t\t\turl: [/^instagram\\.com\\/p\\/(\\w+)/, /^instagram\\.com\\/reel\\/(\\w+)/]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"twitter\",\n\t\t\t\t\turl: [/^twitter\\.com/, /^x\\.com/]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"googleMaps\",\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^google\\.com\\/maps/,\n\t\t\t\t\t\t/^goo\\.gl\\/maps/,\n\t\t\t\t\t\t/^maps\\.google\\.com/,\n\t\t\t\t\t\t/^maps\\.app\\.goo\\.gl/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"flickr\",\n\t\t\t\t\turl: /^flickr\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"facebook\",\n\t\t\t\t\turl: /^facebook\\.com/\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t\tthis.registry = new MediaRegistry(editor.locale, editor.config.get(\"mediaEmbed\"));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst renderMediaPreview = editor.config.get(\"mediaEmbed.previewsInData\");\n\t\tconst elementName = editor.config.get(\"mediaEmbed.elementName\");\n\t\tconst registry = this.registry;\n\t\teditor.commands.add(\"mediaEmbed\", new MediaEmbedCommand(editor));\n\t\tschema.register(\"media\", {\n\t\t\tinheritAllFrom: \"$blockObject\",\n\t\t\tallowAttributes: [\"url\"]\n\t\t});\n\t\tconversion.for(\"dataDowncast\").elementToStructure({\n\t\t\tmodel: \"media\",\n\t\t\tview: (modelElement, { writer }) => {\n\t\t\t\tconst url = modelElement.getAttribute(\"url\");\n\t\t\t\treturn createMediaFigureElement(writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderMediaPreview: !!url && renderMediaPreview\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tconversion.for(\"dataDowncast\").add(modelToViewUrlAttributeConverter(registry, {\n\t\t\telementName,\n\t\t\trenderMediaPreview\n\t\t}));\n\t\tconversion.for(\"editingDowncast\").elementToStructure({\n\t\t\tmodel: \"media\",\n\t\t\tview: (modelElement, { writer }) => {\n\t\t\t\tconst url = modelElement.getAttribute(\"url\");\n\t\t\t\tconst figure = createMediaFigureElement(writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderForEditingView: true\n\t\t\t\t});\n\t\t\t\treturn toMediaWidget(figure, writer, t(\"media widget\"));\n\t\t\t}\n\t\t});\n\t\tconversion.for(\"editingDowncast\").add(modelToViewUrlAttributeConverter(registry, {\n\t\t\telementName,\n\t\t\trenderForEditingView: true\n\t\t}));\n\t\tconversion.for(\"upcast\").elementToElement({\n\t\t\tview: (element) => [\"oembed\", elementName].includes(element.name) && element.getAttribute(\"url\") ? { name: true } : null,\n\t\t\tmodel: (viewMedia, { writer }) => {\n\t\t\t\tconst url = viewMedia.getAttribute(\"url\");\n\t\t\t\tif (registry.hasMedia(url)) return writer.createElement(\"media\", { url });\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}).elementToElement({\n\t\t\tview: {\n\t\t\t\tname: \"div\",\n\t\t\t\tattributes: { \"data-oembed-url\": true }\n\t\t\t},\n\t\t\tmodel: (viewMedia, { writer }) => {\n\t\t\t\tconst url = viewMedia.getAttribute(\"data-oembed-url\");\n\t\t\t\tif (registry.hasMedia(url)) return writer.createElement(\"media\", { url });\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}).add((dispatcher) => {\n\t\t\tconst converter = (evt, data, conversionApi) => {\n\t\t\t\tif (!conversionApi.consumable.consume(data.viewItem, {\n\t\t\t\t\tname: true,\n\t\t\t\t\tclasses: \"media\"\n\t\t\t\t})) return;\n\t\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren(data.viewItem, data.modelCursor);\n\t\t\t\tdata.modelRange = modelRange;\n\t\t\t\tdata.modelCursor = modelCursor;\n\t\t\t\tif (!first(modelRange.getItems())) conversionApi.consumable.revert(data.viewItem, {\n\t\t\t\t\tname: true,\n\t\t\t\t\tclasses: \"media\"\n\t\t\t\t});\n\t\t\t};\n\t\t\tdispatcher.on(\"element:figure\", converter);\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 media-embed/automediaembed\n*/\nconst URL_REGEXP = /^(?:http(s)?:\\/\\/)?[\\w-]+\\.[\\w-.~:/?#[\\]@!$&'()*+,;=%]+$/;\n/**\n* The auto-media embed plugin. It recognizes media links in the pasted content and embeds\n* them shortly after they are injected into the document.\n*/\nvar AutoMediaEmbed = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tClipboard,\n\t\t\tDelete,\n\t\t\tUndo\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AutoMediaEmbed\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t* cleaning of the timeout.\n\t*/\n\t_timeoutId;\n\t/**\n\t* The position where the `<media>` element will be inserted after the timeout,\n\t* determined each time the new content is pasted into the document.\n\t*/\n\t_positionToInsert;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._timeoutId = null;\n\t\tthis._positionToInsert = null;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\t\tconst clipboardPipeline = editor.plugins.get(\"ClipboardPipeline\");\n\t\tthis.listenTo(clipboardPipeline, \"inputTransformation\", () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange();\n\t\t\tconst leftLivePosition = ModelLivePosition.fromPosition(firstRange.start);\n\t\t\tleftLivePosition.stickiness = \"toPrevious\";\n\t\t\tconst rightLivePosition = ModelLivePosition.fromPosition(firstRange.end);\n\t\t\trightLivePosition.stickiness = \"toNext\";\n\t\t\tmodelDocument.once(\"change:data\", () => {\n\t\t\t\tthis._embedMediaBetweenPositions(leftLivePosition, rightLivePosition);\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: \"high\" });\n\t\t});\n\t\teditor.commands.get(\"undo\").on(\"execute\", () => {\n\t\t\tif (this._timeoutId) {\n\t\t\t\tglobal.window.clearTimeout(this._timeoutId);\n\t\t\t\tthis._positionToInsert.detach();\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Analyzes the part of the document between provided positions in search for a URL representing media.\n\t* When the URL is found, it is automatically converted into media.\n\t*\n\t* @param leftPosition Left position of the selection.\n\t* @param rightPosition Right position of the selection.\n\t*/\n\t_embedMediaBetweenPositions(leftPosition, rightPosition) {\n\t\tconst editor = this.editor;\n\t\tconst mediaRegistry = editor.plugins.get(MediaEmbedEditing).registry;\n\t\tconst urlRange = new ModelLiveRange(leftPosition, rightPosition);\n\t\tconst walker = urlRange.getWalker({ ignoreElementEnd: true });\n\t\tlet url = \"\";\n\t\tfor (const node of walker) if (node.item.is(\"$textProxy\")) url += node.item.data;\n\t\turl = url.trim();\n\t\tif (!url.match(URL_REGEXP)) {\n\t\t\turlRange.detach();\n\t\t\treturn;\n\t\t}\n\t\tif (!mediaRegistry.hasMedia(url)) {\n\t\t\turlRange.detach();\n\t\t\treturn;\n\t\t}\n\t\tif (!editor.commands.get(\"mediaEmbed\").isEnabled) {\n\t\t\turlRange.detach();\n\t\t\treturn;\n\t\t}\n\t\tthis._positionToInsert = ModelLivePosition.fromPosition(leftPosition);\n\t\tthis._timeoutId = global.window.setTimeout(() => {\n\t\t\teditor.model.change((writer) => {\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\twriter.remove(urlRange);\n\t\t\t\turlRange.detach();\n\t\t\t\tlet insertionPosition = null;\n\t\t\t\tif (this._positionToInsert.root.rootName !== \"$graveyard\") insertionPosition = this._positionToInsert;\n\t\t\t\tinsertMedia(editor.model, url, insertionPosition, false);\n\t\t\t\tthis._positionToInsert.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t});\n\t\t\teditor.plugins.get(Delete).requestUndoOnBackspace();\n\t\t}, 100);\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 media-embed/ui/mediaformview\n*/\n/**\n* The media form view controller class.\n*\n* See {@link module:media-embed/ui/mediaformview~MediaFormView}.\n*/\nvar MediaFormView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the form.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* The URL input view.\n\t*/\n\turlInputView;\n\t/**\n\t* An array of form validators used by {@link #isValid}.\n\t*/\n\t_validators;\n\t/**\n\t* The default info text for the {@link #urlInputView}.\n\t*/\n\t_urlInputViewInfoDefault;\n\t/**\n\t* The info text with an additional tip for the {@link #urlInputView},\n\t* displayed when the input has some value.\n\t*/\n\t_urlInputViewInfoTip;\n\t/**\n\t* @param validators Form validators used by {@link #isValid}.\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(validators, locale) {\n\t\tsuper(locale);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.set(\"mediaURLInputValue\", \"\");\n\t\tthis.urlInputView = this._createUrlInput();\n\t\tthis._validators = validators;\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-media-form\",\n\t\t\t\t\t\"ck-responsive-form\"\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: [this.urlInputView]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\tthis.focusTracker.add(this.urlInputView.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the {@link #urlInputView}.\n\t*/\n\tfocus() {\n\t\tthis.urlInputView.focus();\n\t}\n\t/**\n\t* The native DOM `value` of the {@link #urlInputView} element.\n\t*\n\t* **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t* which works one way only and may not represent the actual state of the component in the DOM.\n\t*/\n\tget url() {\n\t\treturn this.urlInputView.fieldView.element.value.trim();\n\t}\n\tset url(url) {\n\t\tthis.urlInputView.fieldView.value = url.trim();\n\t}\n\t/**\n\t* Validates the form and returns `false` when some fields are invalid.\n\t*/\n\tisValid() {\n\t\tthis.resetFormStatus();\n\t\tfor (const validator of this._validators) {\n\t\t\tconst errorText = validator(this);\n\t\t\tif (errorText) {\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t* bringing them back to the state when the form has been displayed for the first time.\n\t*\n\t* See {@link #isValid}.\n\t*/\n\tresetFormStatus() {\n\t\tthis.urlInputView.errorText = null;\n\t\tthis.urlInputView.infoText = this._urlInputViewInfoDefault;\n\t}\n\t/**\n\t* Creates a labeled input view.\n\t*\n\t* @returns Labeled input view instance.\n\t*/\n\t_createUrlInput() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n\t\tconst inputField = labeledInput.fieldView;\n\t\tthis._urlInputViewInfoDefault = t(\"Paste the media URL in the input.\");\n\t\tthis._urlInputViewInfoTip = t(\"Tip: Paste the URL into the content to embed faster.\");\n\t\tlabeledInput.label = t(\"Media URL\");\n\t\tlabeledInput.infoText = this._urlInputViewInfoDefault;\n\t\tinputField.inputMode = \"url\";\n\t\tinputField.on(\"input\", () => {\n\t\t\tlabeledInput.infoText = inputField.element.value ? this._urlInputViewInfoTip : this._urlInputViewInfoDefault;\n\t\t\tthis.mediaURLInputValue = inputField.element.value.trim();\n\t\t});\n\t\treturn labeledInput;\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 media-embed/mediaembedui\n*/\n/**\n* The media embed UI plugin.\n*/\nvar MediaEmbedUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [MediaEmbedEditing, Dialog];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t_formView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(\"mediaEmbed\", () => {\n\t\t\tconst t = this.editor.locale.t;\n\t\t\tconst button = this._createDialogButton(ButtonView);\n\t\t\tbutton.tooltip = true;\n\t\t\tbutton.label = t(\"Insert media\");\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:mediaEmbed\", () => {\n\t\t\tconst t = this.editor.locale.t;\n\t\t\tconst button = this._createDialogButton(MenuBarMenuListItemButtonView);\n\t\t\tbutton.label = t(\"Media\");\n\t\t\treturn button;\n\t\t});\n\t}\n\t/**\n\t* Creates a button for menu bar that will show media embed dialog.\n\t*/\n\t_createDialogButton(ButtonClass) {\n\t\tconst editor = this.editor;\n\t\tconst buttonView = new ButtonClass(editor.locale);\n\t\tconst command = editor.commands.get(\"mediaEmbed\");\n\t\tconst dialogPlugin = this.editor.plugins.get(\"Dialog\");\n\t\tbuttonView.icon = IconMedia;\n\t\tbuttonView.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\tbuttonView.on(\"execute\", () => {\n\t\t\tif (dialogPlugin.id === \"mediaEmbed\") dialogPlugin.hide();\n\t\t\telse this._showDialog();\n\t\t});\n\t\treturn buttonView;\n\t}\n\t_showDialog() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get(\"Dialog\");\n\t\tconst command = editor.commands.get(\"mediaEmbed\");\n\t\tconst t = editor.locale.t;\n\t\tconst isMediaSelected = command.value !== void 0;\n\t\tif (!this._formView) {\n\t\t\tconst registry = editor.plugins.get(MediaEmbedEditing).registry;\n\t\t\tthis._formView = new (CssTransitionDisablerMixin(MediaFormView))(getFormValidators$1(editor.t, registry), editor.locale);\n\t\t\tthis._formView.on(\"submit\", () => this._handleSubmitForm());\n\t\t}\n\t\tdialog.show({\n\t\t\tid: \"mediaEmbed\",\n\t\t\ttitle: t(\"Media embed\"),\n\t\t\tcontent: this._formView,\n\t\t\tisModal: true,\n\t\t\tonShow: () => {\n\t\t\t\tthis._formView.url = command.value || \"\";\n\t\t\t\tthis._formView.resetFormStatus();\n\t\t\t\tthis._formView.urlInputView.fieldView.select();\n\t\t\t},\n\t\t\tactionButtons: [{\n\t\t\t\tlabel: t(\"Cancel\"),\n\t\t\t\twithText: true,\n\t\t\t\tonExecute: () => dialog.hide()\n\t\t\t}, {\n\t\t\t\tlabel: isMediaSelected ? t(\"Save\") : t(\"Insert\"),\n\t\t\t\tclass: \"ck-button-action\",\n\t\t\t\twithText: true,\n\t\t\t\tonExecute: () => this._handleSubmitForm()\n\t\t\t}]\n\t\t});\n\t}\n\t_handleSubmitForm() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get(\"Dialog\");\n\t\tif (this._formView.isValid()) {\n\t\t\teditor.execute(\"mediaEmbed\", this._formView.url);\n\t\t\tdialog.hide();\n\t\t\teditor.editing.view.focus();\n\t\t}\n\t}\n};\nfunction getFormValidators$1(t, registry) {\n\treturn [(form) => {\n\t\tif (!form.url.length) return t(\"The URL must not be empty.\");\n\t}, (form) => {\n\t\tif (!registry.hasMedia(form.url)) return t(\"This media URL is not supported.\");\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 media-embed/mediaembed\n*/\n/**\n* The media embed plugin.\n*\n* For a detailed overview, check the {@glink features/media-embed/media-embed Media Embed feature documentation}.\n*\n* This is a \"glue\" plugin which loads the following plugins:\n*\n* * The {@link module:media-embed/mediaembedediting~MediaEmbedEditing media embed editing feature},\n* * The {@link module:media-embed/mediaembedui~MediaEmbedUI media embed UI feature} and\n* * The {@link module:media-embed/automediaembed~AutoMediaEmbed auto-media embed feature}.\n*/\nvar MediaEmbed = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tMediaEmbedEditing,\n\t\t\tMediaEmbedUI,\n\t\t\tAutoMediaEmbed,\n\t\t\tWidget\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbed\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 media-embed/mediaembedstyle/constants\n*/\n/**\n* Built-in style options provided by the plugin. Integrators can refer to these by\n* name in {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n* to opt out, override individual fields, or coexist with custom styles.\n*\n* @internal\n*/\nconst DEFAULT_OPTIONS = {\n\talignLeft: {\n\t\tname: \"alignLeft\",\n\t\ttitle: \"Left aligned media\",\n\t\ticon: IconObjectInlineLeft,\n\t\tclassName: \"media-style-align-left\"\n\t},\n\talignBlockLeft: {\n\t\tname: \"alignBlockLeft\",\n\t\ttitle: \"Left aligned media\",\n\t\ticon: IconObjectLeft,\n\t\tclassName: \"media-style-block-align-left\"\n\t},\n\talignCenter: {\n\t\tname: \"alignCenter\",\n\t\ttitle: \"Centered media\",\n\t\ticon: IconObjectCenter,\n\t\tisDefault: true\n\t},\n\talignBlockRight: {\n\t\tname: \"alignBlockRight\",\n\t\ttitle: \"Right aligned media\",\n\t\ticon: IconObjectRight,\n\t\tclassName: \"media-style-block-align-right\"\n\t},\n\talignRight: {\n\t\tname: \"alignRight\",\n\t\ttitle: \"Right aligned media\",\n\t\ticon: IconObjectInlineRight,\n\t\tclassName: \"media-style-align-right\"\n\t}\n};\n/**\n* Short icon-name aliases that can be used as the `icon` value in a media style\n* option definition. Matches the alias set exposed by the image styles feature so\n* the two APIs feel symmetrical.\n*\n* @internal\n*/\nconst DEFAULT_ICONS = {\n\tinlineLeft: IconObjectInlineLeft,\n\tleft: IconObjectLeft,\n\tcenter: IconObjectCenter,\n\tright: IconObjectRight,\n\tinlineRight: IconObjectInlineRight\n};\n/**\n* Built-in dropdown groupings. Each entry references built-in style component names. If any\n* items are filtered out by configuration, the dropdown is rebuilt from the remaining names\n* (or skipped entirely if fewer than two remain).\n*\n* @internal\n*/\nconst DEFAULT_DROPDOWN_DEFINITIONS = [{\n\tname: \"mediaEmbed:wrapText\",\n\ttitle: \"Wrap text\",\n\titems: [\"mediaEmbed:alignLeft\", \"mediaEmbed:alignRight\"],\n\tdefaultItem: \"mediaEmbed:alignLeft\"\n}, {\n\tname: \"mediaEmbed:breakText\",\n\ttitle: \"Break text\",\n\titems: [\n\t\t\"mediaEmbed:alignBlockLeft\",\n\t\t\"mediaEmbed:alignCenter\",\n\t\t\"mediaEmbed:alignBlockRight\"\n\t],\n\tdefaultItem: \"mediaEmbed:alignCenter\"\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 media-embed/mediaembedstyle/utils\n*/\n/**\n* Normalizes the {@link module:media-embed/mediaembedconfig~MediaStyleConfig#options style options}\n* provided by the integrator. Each entry is resolved into a full\n* {@link module:media-embed/mediaembedconfig~MediaStyleOptionDefinition} and invalid entries\n* are filtered out with a console warning.\n*\n* @internal\n*/\nfunction normalizeStyles(configuredStyles) {\n\treturn (configuredStyles.options || []).map((entry) => normalizeDefinition(entry)).filter((entry) => isValidOption(entry));\n}\n/**\n* Resolves a single config entry into a style option definition. A string entry is first\n* promoted to its object form (`{ name }`) and then shallow-merged on top of the matching\n* built-in default — entries without a matching built-in pass through unchanged and are\n* rejected by {@link ~isValidOption} if they lack required fields.\n*\n* Also resolves icon-name aliases (`'left'`, `'inlineLeft'`, etc.) to the corresponding\n* SVG sources from {@link module:media-embed/mediaembedstyle/constants~DEFAULT_ICONS}.\n*/\nfunction normalizeDefinition(entry) {\n\tconst override = typeof entry === \"string\" ? { name: entry } : entry;\n\tconst definition = {\n\t\t...DEFAULT_OPTIONS[override.name],\n\t\t...override\n\t};\n\tif (typeof definition.icon === \"string\" && DEFAULT_ICONS[definition.icon]) definition.icon = DEFAULT_ICONS[definition.icon];\n\treturn definition;\n}\n/**\n* Validates a normalized style option. `name`, `title`, and `icon` are always required.\n* `className` is required unless the entry is the default style (defaults encode as\n* attribute-absence and intentionally have no class). Emits a console warning and returns\n* `false` when any of these checks fails.\n*/\nfunction isValidOption(option) {\n\tif (!option.name || !option.title || !option.icon || !option.isDefault && !option.className) {\n\t\twarnInvalidStyle({ style: option });\n\t\treturn false;\n\t}\n\treturn true;\n}\nfunction warnInvalidStyle(info) {\n\t/**\n\t* The media style configuration provided in the editor config is invalid. The warning is\n\t* emitted in two situations:\n\t*\n\t* * An entry in {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles.options`}\n\t*   does not reference a built-in style by name (`'alignLeft'`, `'alignBlockLeft'`,\n\t*   `'alignCenter'`, `'alignBlockRight'`, `'alignRight'`) and does not follow the\n\t*   {@link module:media-embed/mediaembedconfig~MediaStyleOptionDefinition} shape —\n\t*   `name`, `title`, `icon`, and (unless `isDefault: true`) `className` are required.\n\t*   The offending entry is reported under the `style` parameter.\n\t* * A dropdown entry placed inline in\n\t*   {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `config.mediaEmbed.toolbar`}\n\t*   does not follow the {@link module:media-embed/mediaembedconfig~MediaStyleDropdownDefinition} shape\n\t*   (`name` and every `items[]` entry must use the full `mediaEmbed:` prefix, `defaultItem` must\n\t*   be one of the `items`, `title` must be a non-empty string), or its `items[]` reference styles\n\t*   that are not in the resolved\n\t*   {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`} list.\n\t*   The offending entry is reported under the `dropdown` parameter.\n\t*\n\t* @error media-style-configuration-definition-invalid\n\t*/\n\tlogWarning(\"media-style-configuration-definition-invalid\", info);\n}\n/**\n* Type guard for toolbar config entries shaped like a media style dropdown definition. The\n* discriminator is `defaultItem` — generic toolbar groupings use `items` + `label` and never\n* carry a `defaultItem` field.\n*\n* @internal\n*/\nfunction isMediaStyleDropdown(item) {\n\treturn typeof item === \"object\" && item !== null && typeof item.defaultItem === \"string\";\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 media-embed/mediaembedtoolbar\n*/\n/**\n* The media embed toolbar plugin. It creates a toolbar for media embed that shows up when the media element is selected.\n*\n* Instances of toolbar components (e.g. buttons) are created based on the\n* {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `media.toolbar` configuration option}.\n*/\nvar MediaEmbedToolbar = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [WidgetToolbarRepository];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\teditor.plugins.get(WidgetToolbarRepository).register(\"mediaEmbed\", {\n\t\t\tariaLabel: t(\"Media toolbar\"),\n\t\t\titems: normalizeDeclarativeConfig(editor.ui.componentFactory, editor.config.get(\"mediaEmbed.toolbar\") || []),\n\t\t\tgetRelatedElement: getSelectedMediaViewWidget\n\t\t});\n\t}\n};\n/**\n* Flattens dropdown definitions to their factory names, dropping any `mediaEmbed:`-prefixed\n* name the style UI did not register — otherwise the toolbar crashes with `componentfactory-item-missing`.\n* Non-string entries (e.g. generic `{ label, items }` toolbar groupings) pass through unchanged.\n*/\nfunction normalizeDeclarativeConfig(factory, config) {\n\treturn config.map((item) => isMediaStyleDropdown(item) ? item.name : item).filter((item) => typeof item !== \"string\" || !item.startsWith(\"mediaEmbed:\") || factory.has(item));\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 media-embed/mediaembedresize/resizemediaembedcommand\n*/\n/**\n* The resize media embed command.\n*/\nvar ResizeMediaEmbedCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst element = getSelectedMediaModelWidget(this.editor.model.document.selection);\n\t\tthis.isEnabled = !!element;\n\t\tif (!element || !element.hasAttribute(\"resizedWidth\")) this.value = null;\n\t\telse this.value = element.getAttribute(\"resizedWidth\");\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* ```ts\n\t* // Sets the width as a percentage of the parent width:\n\t* editor.execute( 'resizeMediaEmbed', { width: '50%' } );\n\t*\n\t* // Removes the resize and restores the default width:\n\t* editor.execute( 'resizeMediaEmbed', { width: null } );\n\t* ```\n\t*\n\t* @param options\n\t* @param options.width The new width of the media embed as a CSS `width` value\n\t* (e.g. `'50%'`), or `null` to remove the resize.\n\t* @fires execute\n\t*/\n\texecute(options) {\n\t\tconst model = this.editor.model;\n\t\tconst mediaElement = getSelectedMediaModelWidget(model.document.selection);\n\t\tif (mediaElement) model.change((writer) => {\n\t\t\twriter.setAttribute(\"resizedWidth\", options.width, mediaElement);\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 media-embed/mediaembedresize/constants\n*/\n/**\n* The view class applied to a resized media embed figure.\n*\n* Shared between the editing plugin (which toggles it via downcast of `resizedWidth` and consumes\n* it on upcast) and the handles plugin (which adds it during drag and strips it on commit), so\n* both layers agree on the exact class name.\n*\n* @internal\n*/\nconst RESIZED_MEDIA_CLASS = \"media_resized\";\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* The media embed resize editing feature.\n*\n* It adds the ability to resize each media embed using handles.\n*/\nvar MediaEmbedResizeEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [MediaEmbedEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedResizeEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"MER\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"mediaEmbed\", {\n\t\t\tresizeUnit: \"%\",\n\t\t\tresizeOptions: [\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeMediaEmbed:original\",\n\t\t\t\t\tvalue: null,\n\t\t\t\t\ticon: \"original\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeMediaEmbed:custom\",\n\t\t\t\t\tvalue: \"custom\",\n\t\t\t\t\ticon: \"custom\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeMediaEmbed:25\",\n\t\t\t\t\tvalue: \"25\",\n\t\t\t\t\ticon: \"small\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeMediaEmbed:50\",\n\t\t\t\t\tvalue: \"50\",\n\t\t\t\t\ticon: \"medium\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"resizeMediaEmbed:75\",\n\t\t\t\t\tvalue: \"75\",\n\t\t\t\t\ticon: \"large\"\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.commands.add(\"resizeMediaEmbed\", new ResizeMediaEmbedCommand(editor));\n\t\tthis._registerConverters();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tthis._registerSchema();\n\t}\n\t_registerSchema() {\n\t\tconst schema = this.editor.model.schema;\n\t\tschema.extend(\"media\", { allowAttributes: [\"resizedWidth\"] });\n\t\tschema.setAttributeProperties(\"resizedWidth\", { isFormatting: true });\n\t}\n\t/**\n\t* Registers media embed resize converters.\n\t*/\n\t_registerConverters() {\n\t\tconst editor = this.editor;\n\t\teditor.conversion.for(\"downcast\").add((dispatcher) => dispatcher.on(\"attribute:resizedWidth:media\", (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst figure = conversionApi.mapper.toViewElement(data.item);\n\t\t\tif (data.attributeNewValue !== null) {\n\t\t\t\tviewWriter.setStyle(\"width\", data.attributeNewValue, figure);\n\t\t\t\tviewWriter.addClass(RESIZED_MEDIA_CLASS, figure);\n\t\t\t} else {\n\t\t\t\tviewWriter.removeStyle(\"width\", figure);\n\t\t\t\tviewWriter.removeClass(RESIZED_MEDIA_CLASS, figure);\n\t\t\t}\n\t\t}));\n\t\teditor.conversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"figure\",\n\t\t\t\tstyles: { width: /.+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"resizedWidth\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tif (!viewElement.hasClass(\"media\")) return null;\n\t\t\t\t\treturn viewElement.getStyle(\"width\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:figure\", (evt, data, conversionApi) => {\n\t\t\t\tconversionApi.consumable.consume(data.viewItem, { classes: [RESIZED_MEDIA_CLASS] });\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* The media embed resize by handles feature.\n*\n* It adds the ability to resize each media embed using handles.\n*/\nvar MediaEmbedResizeHandles = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [WidgetResize];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedResizeHandles\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst command = this.editor.commands.get(\"resizeMediaEmbed\");\n\t\tthis.bind(\"isEnabled\").to(command);\n\t\tthis._setupResizerCreator();\n\t}\n\t/**\n\t* Attaches a resizer to every newly inserted media widget. Walks only the ranges\n\t* reported by the differ — never the whole document — so unrelated inserts (e.g.\n\t* pressing Enter to create a paragraph) cost only the differ check.\n\t*\n\t* Each resizer's `isEnabled` is bound to the plugin in {@link #_attachResizer},\n\t* so it auto-tracks the resize command's state.\n\t*/\n\t_setupResizerCreator() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst widgetResize = editor.plugins.get(WidgetResize);\n\t\tthis.listenTo(model.document, \"change:data\", () => {\n\t\t\tfor (const change of model.document.differ.getChanges()) {\n\t\t\t\tif (change.type !== \"insert\" || change.name === \"$text\") continue;\n\t\t\t\tconst insertedRange = model.createRange(change.position, change.position.getShiftedBy(change.length));\n\t\t\t\tfor (const item of insertedRange.getItems()) {\n\t\t\t\t\tif (!item.is(\"element\", \"media\")) continue;\n\t\t\t\t\tconst viewElement = editor.editing.mapper.toViewElement(item);\n\t\t\t\t\t/* v8 ignore next -- @preserve */\n\t\t\t\t\tif (!viewElement) continue;\n\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\tif (!widgetResize.getResizerByViewElement(viewElement)) this._attachResizer(item, viewElement);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Attaches a resizer to a single media widget.\n\t*/\n\t_attachResizer(modelElement, widgetView) {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst resizer = editor.plugins.get(WidgetResize).attachTo({\n\t\t\tunit: editor.config.get(\"mediaEmbed.resizeUnit\"),\n\t\t\tmodelElement,\n\t\t\tviewElement: widgetView,\n\t\t\teditor,\n\t\t\tgetHandleHost: (domWidgetElement) => domWidgetElement.querySelector(\".ck-media__wrapper\"),\n\t\t\tgetResizeHost: (domWidgetElement) => domWidgetElement,\n\t\t\tonCommit: (newValue) => {\n\t\t\t\teditingView.change((writer) => writer.removeClass(RESIZED_MEDIA_CLASS, widgetView));\n\t\t\t\teditor.execute(\"resizeMediaEmbed\", { width: newValue });\n\t\t\t}\n\t\t});\n\t\tresizer.bind(\"isEnabled\").to(this);\n\t\tresizer.on(\"updateSize\", () => {\n\t\t\tif (!widgetView.hasClass(\"media_resized\")) editingView.change((writer) => writer.addClass(RESIZED_MEDIA_CLASS, widgetView));\n\t\t});\n\t\teditingView.once(\"render\", () => resizer.redraw());\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 media-embed/mediaembedresize/mediaembedresizebuttons\n*/\nconst RESIZE_ICONS = /* #__PURE__ */ (() => ({\n\tsmall: IconObjectSizeSmall,\n\tmedium: IconObjectSizeMedium,\n\tlarge: IconObjectSizeLarge,\n\tcustom: IconObjectSizeCustom,\n\toriginal: IconObjectSizeFull\n}))();\n/**\n* The media embed resize buttons plugin.\n*\n* It adds a possibility to resize media embeds using the toolbar dropdown or individual buttons,\n* depending on the plugin configuration.\n*/\nvar MediaEmbedResizeButtons = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [MediaEmbedResizeEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedResizeButtons\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t_resizeUnit;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._resizeUnit = editor.config.get(\"mediaEmbed.resizeUnit\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst options = editor.config.get(\"mediaEmbed.resizeOptions\");\n\t\tconst command = editor.commands.get(\"resizeMediaEmbed\");\n\t\tthis.bind(\"isEnabled\").to(command);\n\t\tfor (const option of options) this._registerMediaEmbedResizeButton(option);\n\t\tthis._registerMediaEmbedResizeDropdown(options);\n\t}\n\t/**\n\t* Creates a standalone button component for the given resize option.\n\t*/\n\t_registerMediaEmbedResizeButton(option) {\n\t\tconst editor = this.editor;\n\t\tconst { name, value, icon } = option;\n\t\teditor.ui.componentFactory.add(name, (locale) => {\n\t\t\tconst button = new ButtonView(locale);\n\t\t\tconst command = editor.commands.get(\"resizeMediaEmbed\");\n\t\t\tconst labelText = this._getOptionLabelValue(option, true);\n\t\t\tif (!RESIZE_ICONS[icon])\n /**\n\t\t\t* When configuring {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#resizeOptions\n\t\t\t* `config.mediaEmbed.resizeOptions`} for standalone buttons, a valid `icon` token must be set for each option.\n\t\t\t*\n\t\t\t* See all valid options described in the\n\t\t\t* {@link module:media-embed/mediaembedconfig~MediaEmbedResizeOption plugin configuration}.\n\t\t\t*\n\t\t\t* @error mediaembedresizebuttons-missing-icon\n\t\t\t* @param {module:media-embed/mediaembedconfig~MediaEmbedResizeOption} option Invalid media embed resize option.\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"mediaembedresizebuttons-missing-icon\", editor, option);\n\t\t\tbutton.set({\n\t\t\t\tlabel: labelText,\n\t\t\t\ticon: RESIZE_ICONS[icon],\n\t\t\t\ttooltip: labelText,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tbutton.bind(\"isEnabled\").to(this);\n\t\t\tif (editor.plugins.has(\"MediaEmbedCustomResizeUI\") && isCustomMediaEmbedResizeOption(option)) {\n\t\t\t\tconst customResizeUI = editor.plugins.get(\"MediaEmbedCustomResizeUI\");\n\t\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\t\tcustomResizeUI._showForm(this._resizeUnit);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst optionValueWithUnit = value ? value + this._resizeUnit : null;\n\t\t\t\tbutton.bind(\"isOn\").to(command, \"value\", command, \"isEnabled\", getIsOnButtonCallback(optionValueWithUnit));\n\t\t\t\tthis.listenTo(button, \"execute\", () => {\n\t\t\t\t\teditor.execute(\"resizeMediaEmbed\", { width: optionValueWithUnit });\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn button;\n\t\t});\n\t}\n\t/**\n\t* Creates the dropdown component containing all resize options.\n\t*/\n\t_registerMediaEmbedResizeDropdown(options) {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst originalSizeOption = options.find((option) => !option.value);\n\t\tconst componentCreator = (locale) => {\n\t\t\tconst command = editor.commands.get(\"resizeMediaEmbed\");\n\t\t\tconst dropdownView = createDropdown(locale, DropdownButtonView);\n\t\t\tconst dropdownButton = dropdownView.buttonView;\n\t\t\tconst accessibleLabel = t(\"Resize media\");\n\t\t\tdropdownButton.set({\n\t\t\t\ttooltip: accessibleLabel,\n\t\t\t\tcommandValue: originalSizeOption ? originalSizeOption.value : null,\n\t\t\t\ticon: RESIZE_ICONS.medium,\n\t\t\t\tisToggleable: true,\n\t\t\t\tlabel: originalSizeOption ? this._getOptionLabelValue(originalSizeOption) : \"\",\n\t\t\t\twithText: true,\n\t\t\t\tclass: \"ck-resize-media-embed-button\",\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\tariaLabelledBy: void 0\n\t\t\t});\n\t\t\tdropdownButton.bind(\"label\").to(command, \"value\", (commandValue) => {\n\t\t\t\tif (commandValue) return commandValue;\n\t\t\t\treturn originalSizeOption ? this._getOptionLabelValue(originalSizeOption) : \"\";\n\t\t\t});\n\t\t\tdropdownView.bind(\"isEnabled\").to(this);\n\t\t\taddListToDropdown(dropdownView, () => this._getResizeDropdownListItemDefinitions(options, command), {\n\t\t\t\tariaLabel: t(\"Media resize list\"),\n\t\t\t\trole: \"menu\"\n\t\t\t});\n\t\t\tthis.listenTo(dropdownView, \"execute\", (evt) => {\n\t\t\t\tif (\"onClick\" in evt.source) evt.source.onClick();\n\t\t\t\telse {\n\t\t\t\t\teditor.execute(evt.source.commandName, { width: evt.source.commandValue });\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t};\n\t\teditor.ui.componentFactory.add(\"resizeMediaEmbed\", componentCreator);\n\t}\n\t/**\n\t* Returns a label for the given resize option.\n\t*/\n\t_getOptionLabelValue(option, forTooltip = false) {\n\t\tconst t = this.editor.t;\n\t\tif (option.label) return option.label;\n\t\tconst isCustom = isCustomMediaEmbedResizeOption(option);\n\t\tif (forTooltip) {\n\t\t\tif (isCustom) return t(\"Custom media size\");\n\t\t\treturn option.value ? t(\"Resize media to %0\", option.value + this._resizeUnit) : t(\"Resize media to the original size\");\n\t\t}\n\t\tif (isCustom) return t(\"Custom\");\n\t\treturn option.value ? option.value + this._resizeUnit : t(\"Original\");\n\t}\n\t/**\n\t* Returns list item definitions for the resize dropdown.\n\t*/\n\t_getResizeDropdownListItemDefinitions(options, command) {\n\t\tconst { editor } = this;\n\t\tconst itemDefinitions = new Collection();\n\t\tconst optionsWithSerializedValues = options.map((option) => {\n\t\t\tif (isCustomMediaEmbedResizeOption(option)) return {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: \"custom\"\n\t\t\t};\n\t\t\tif (!option.value) return {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: null\n\t\t\t};\n\t\t\treturn {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: `${option.value}${this._resizeUnit}`\n\t\t\t};\n\t\t});\n\t\tfor (const option of optionsWithSerializedValues) {\n\t\t\tlet definition;\n\t\t\tif (editor.plugins.has(\"MediaEmbedCustomResizeUI\") && isCustomMediaEmbedResizeOption(option)) {\n\t\t\t\tconst customResizeUI = editor.plugins.get(\"MediaEmbedCustomResizeUI\");\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: new UIModel({\n\t\t\t\t\t\tlabel: this._getOptionLabelValue(option),\n\t\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null,\n\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\tcustomResizeUI._showForm(this._resizeUnit);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\tconst allDropdownValues = Object.values(optionsWithSerializedValues).map((option) => option.valueWithUnits);\n\t\t\t\tdefinition.model.bind(\"isOn\").to(command, \"value\", command, \"isEnabled\", getIsOnCustomButtonCallback(allDropdownValues));\n\t\t\t} else {\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: new UIModel({\n\t\t\t\t\t\tcommandName: \"resizeMediaEmbed\",\n\t\t\t\t\t\tcommandValue: option.valueWithUnits,\n\t\t\t\t\t\tlabel: this._getOptionLabelValue(option),\n\t\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\tdefinition.model.bind(\"isOn\").to(command, \"value\", command, \"isEnabled\", getIsOnButtonCallback(option.valueWithUnits));\n\t\t\t}\n\t\t\tdefinition.model.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\t\titemDefinitions.add(definition);\n\t\t}\n\t\treturn itemDefinitions;\n\t}\n};\nfunction isCustomMediaEmbedResizeOption(option) {\n\treturn option.value === \"custom\";\n}\nfunction getIsOnButtonCallback(value) {\n\treturn (commandValue, isEnabled) => {\n\t\tif (commandValue === void 0 || !isEnabled) return false;\n\t\treturn commandValue === value;\n\t};\n}\nfunction getIsOnCustomButtonCallback(allDropdownValues) {\n\treturn (commandValue, isEnabled) => !allDropdownValues.some((dropdownValue) => getIsOnButtonCallback(dropdownValue)(commandValue, isEnabled));\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 model, view and DOM element for selected media embed element.\n* Returns `null` if there is no media embed selected.\n*\n* @param editor Editor instance.\n* @internal\n*/\nfunction getSelectedMediaEmbedEditorNodes(editor) {\n\tconst { editing } = editor;\n\tconst mediaModelElement = getSelectedMediaModelWidget(editor.model.document.selection);\n\tif (!mediaModelElement) return null;\n\tconst mediaViewElement = editing.mapper.toViewElement(mediaModelElement);\n\treturn {\n\t\tmodel: mediaModelElement,\n\t\tview: mediaViewElement,\n\t\tdom: editing.view.domConverter.mapViewToDom(mediaViewElement)\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 media-embed/mediaembedresize/utils/getselectedmediaembedwidthinunits\n*/\n/**\n* Returns media embed width in specified units after resize.\n*\n* \t* If no media embed is selected or command is disabled, `null` will be returned.\n*\t* If `targetUnit` percentage is passed then it will return width percentage relative to its ancestor.\n*\n* @param editor Editor instance.\n* @param targetUnit Unit in which dimension will be returned.\n* @returns Parsed media embed width after resize (with unit).\n* @internal\n*/\nfunction getSelectedMediaEmbedWidthInUnits(editor, targetUnit) {\n\tconst mediaNodes = getSelectedMediaEmbedEditorNodes(editor);\n\tif (!mediaNodes) return null;\n\tconst parsedResizedWidth = _tryParseDimensionWithUnit(mediaNodes.model.getAttribute(\"resizedWidth\") || null);\n\tif (!parsedResizedWidth) return null;\n\tif (parsedResizedWidth.unit === targetUnit) return parsedResizedWidth;\n\tconst mediaParentWidthPx = calculateResizeHostAncestorWidth(mediaNodes.dom);\n\tconst mediaHolderDimension = {\n\t\tunit: \"px\",\n\t\tvalue: new Rect(mediaNodes.dom).width\n\t};\n\treturn _tryCastDimensionsToUnit(mediaParentWidthPx, mediaHolderDimension, targetUnit);\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* Returns the min and max resize values for the selected media embed in the specified unit.\n*\n* @param editor Editor instance.\n* @param targetUnit Unit in which dimension will be returned.\n* @returns Possible resize range in numeric form.\n* @internal\n*/\nfunction getSelectedMediaEmbedPossibleResizeRange(editor, targetUnit) {\n\tconst mediaNodes = getSelectedMediaEmbedEditorNodes(editor);\n\tif (!mediaNodes) return null;\n\tconst mediaParentWidthPx = calculateResizeHostAncestorWidth(mediaNodes.dom);\n\tconst minimumMediaWidth = _tryParseDimensionWithUnit(window.getComputedStyle(mediaNodes.dom).minWidth) || {\n\t\tvalue: 1,\n\t\tunit: \"px\"\n\t};\n\treturn {\n\t\tunit: targetUnit,\n\t\tlower: Math.max(.1, _tryCastDimensionsToUnit(mediaParentWidthPx, minimumMediaWidth, targetUnit).value),\n\t\tupper: targetUnit === \"px\" ? mediaParentWidthPx : 100\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 media-embed/mediaembedresize/ui/mediaembedcustomresizeformview\n*/\n/**\n* The MediaEmbedCustomResizeFormView class.\n*\n* @internal\n*/\nvar MediaEmbedCustomResizeFormView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the form.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Resize unit shortcut.\n\t*/\n\tunit;\n\t/**\n\t* The Back button view displayed in the header.\n\t*/\n\tbackButtonView;\n\t/**\n\t* A button used to submit the form.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* An input with a label.\n\t*/\n\tlabeledInput;\n\t/**\n\t* A collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of views which can be focused in the form.\n\t*/\n\t_focusables;\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* An array of form validators used by {@link #isValid}.\n\t*/\n\t_validators;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, unit, validators) {\n\t\tsuper(locale);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.unit = unit;\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\t\tthis.labeledInput = this._createLabeledInputView();\n\t\tthis.children = this.createCollection([this._createHeaderView()]);\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tchildren: [this.labeledInput, this.saveButtonView],\n\t\t\tclass: [\"ck-form__row_with-submit\", \"ck-form__row_large-top-padding\"]\n\t\t}));\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._validators = validators;\n\t\tthis.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis.fire(\"cancel\");\n\t\t\tcancel();\n\t\t});\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-form\",\n\t\t\t\t\t\"ck-media-embed-custom-resize-form\",\n\t\t\t\t\t\"ck-responsive-form\"\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\t[\n\t\t\tthis.backButtonView,\n\t\t\tthis.labeledInput,\n\t\t\tthis.saveButtonView\n\t\t].forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis.focusTracker.add(v.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn backButton;\n\t}\n\t_createSaveButton() {\n\t\tconst t = this.locale.t;\n\t\tconst saveButton = new ButtonView(this.locale);\n\t\tsaveButton.set({\n\t\t\tlabel: t(\"Save\"),\n\t\t\twithText: true,\n\t\t\ttype: \"submit\",\n\t\t\tclass: \"ck-button-action ck-button-bold\"\n\t\t});\n\t\treturn saveButton;\n\t}\n\t_createHeaderView() {\n\t\tconst t = this.locale.t;\n\t\tconst header = new FormHeaderView(this.locale, { label: t(\"Media Resize\") });\n\t\theader.children.add(this.backButtonView, 0);\n\t\treturn header;\n\t}\n\t_createLabeledInputView() {\n\t\tconst t = this.locale.t;\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputNumber);\n\t\tlabeledInput.label = t(\"Resize media (in %0)\", this.unit);\n\t\tlabeledInput.class = \"ck-labeled-field-view_full-width\";\n\t\tlabeledInput.fieldView.set({\n\t\t\tmin: .1,\n\t\t\tstep: .1\n\t\t});\n\t\treturn labeledInput;\n\t}\n\t/**\n\t* Validates the form and returns `false` when some fields are invalid.\n\t*/\n\tisValid() {\n\t\tthis.resetFormStatus();\n\t\tfor (const validator of this._validators) {\n\t\t\tconst errorText = validator(this);\n\t\t\tif (errorText) {\n\t\t\t\tthis.labeledInput.errorText = errorText;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Cleans up error and information text of {@link #labeledInput}.\n\t*/\n\tresetFormStatus() {\n\t\tthis.labeledInput.errorText = null;\n\t}\n\t/**\n\t* The native DOM `value` of the input element of {@link #labeledInput}.\n\t*/\n\tget rawSize() {\n\t\tconst { element } = this.labeledInput.fieldView;\n\t\tif (!element) return null;\n\t\treturn element.value;\n\t}\n\t/**\n\t* Get numeric value of size. Returns `null` if value is not a number.\n\t*/\n\tget parsedSize() {\n\t\tconst { rawSize } = this;\n\t\tif (rawSize === null) return null;\n\t\tconst parsed = Number.parseFloat(rawSize);\n\t\tif (Number.isNaN(parsed)) return null;\n\t\treturn parsed;\n\t}\n\t/**\n\t* Returns serialized media embed input size with unit.\n\t* Returns `null` if value is not a number.\n\t*/\n\tget sizeWithUnits() {\n\t\tconst { parsedSize, unit } = this;\n\t\tif (parsedSize === null) return null;\n\t\treturn `${parsedSize}${unit}`;\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 media-embed/mediaembedresize/mediaembedcustomresizeui\n*/\n/**\n* The custom resize media embed UI plugin.\n*\n* The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n*/\nvar MediaEmbedCustomResizeUI = class extends Plugin {\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* A form used to set the custom resize width.\n\t*/\n\t_form;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedCustomResizeUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this._form) this._form.destroy();\n\t}\n\t/**\n\t* Creates the {@link module:media-embed/mediaembedresize/ui/mediaembedcustomresizeformview~MediaEmbedCustomResizeFormView} form.\n\t*/\n\t_createForm(unit) {\n\t\tconst editor = this.editor;\n\t\tthis._balloon = this.editor.plugins.get(\"ContextualBalloon\");\n\t\tconst FormViewClass = CssTransitionDisablerMixin(MediaEmbedCustomResizeFormView);\n\t\tthis._form = new FormViewClass(editor.locale, unit, getFormValidators(editor));\n\t\tthis._form.render();\n\t\tthis.listenTo(this._form, \"submit\", () => {\n\t\t\tif (this._form.isValid()) {\n\t\t\t\teditor.execute(\"resizeMediaEmbed\", { width: this._form.sizeWithUnits });\n\t\t\t\tthis._hideForm(true);\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(this._form.labeledInput, \"change:errorText\", () => {\n\t\t\teditor.ui.update();\n\t\t});\n\t\tthis.listenTo(this._form, \"cancel\", () => {\n\t\t\tthis._hideForm(true);\n\t\t});\n\t\tclickOutsideHandler({\n\t\t\temitter: this._form,\n\t\t\tactivator: () => this._isVisible,\n\t\t\tcontextElements: () => [this._balloon.view.element],\n\t\t\tcallback: () => this._hideForm()\n\t\t});\n\t}\n\t/**\n\t* Shows the {@link #_form} in the {@link #_balloon}.\n\t*\n\t* @internal\n\t*/\n\t_showForm(unit) {\n\t\tif (this._isVisible) return;\n\t\tif (!this._form) this._createForm(unit);\n\t\tconst editor = this.editor;\n\t\tconst labeledInput = this._form.labeledInput;\n\t\tthis._form.disableCssTransitions();\n\t\tthis._form.resetFormStatus();\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (!this._isInBalloon) this._balloon.add({\n\t\t\tview: this._form,\n\t\t\tposition: getBalloonPositionData(editor)\n\t\t});\n\t\tconst currentParsedWidth = getSelectedMediaEmbedWidthInUnits(editor, unit);\n\t\tconst initialInputValue = currentParsedWidth ? currentParsedWidth.value.toFixed(1) : \"\";\n\t\tconst possibleRange = getSelectedMediaEmbedPossibleResizeRange(editor, unit);\n\t\tlabeledInput.fieldView.value = labeledInput.fieldView.element.value = initialInputValue;\n\t\tif (possibleRange) Object.assign(labeledInput.fieldView, {\n\t\t\tmin: possibleRange.lower.toFixed(1),\n\t\t\tmax: Math.ceil(possibleRange.upper).toFixed(1)\n\t\t});\n\t\tthis._form.labeledInput.fieldView.select();\n\t\tthis._form.enableCssTransitions();\n\t}\n\t/**\n\t* Removes the {@link #_form} from the {@link #_balloon}.\n\t*\n\t* @param focusEditable Controls whether the editing view is focused afterwards.\n\t*/\n\t_hideForm(focusEditable = false) {\n\t\tif (!this._isInBalloon) return;\n\t\tif (this._form.focusTracker.isFocused) this._form.saveButtonView.focus();\n\t\tthis._balloon.remove(this._form);\n\t\tif (focusEditable) this.editor.editing.view.focus();\n\t}\n\t/**\n\t* Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t*/\n\tget _isVisible() {\n\t\treturn !!this._balloon && this._balloon.visibleView === this._form;\n\t}\n\t/**\n\t* Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t*/\n\tget _isInBalloon() {\n\t\treturn !!this._balloon && this._balloon.hasView(this._form);\n\t}\n};\nfunction getBalloonPositionData(editor) {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\treturn {\n\t\ttarget: editingView.domConverter.mapViewToDom(getSelectedMediaViewWidget(editingView.document.selection)),\n\t\tpositions: [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\tdefaultPositions.viewportStickyNorth\n\t\t]\n\t};\n}\nfunction getFormValidators(editor) {\n\tconst t = editor.t;\n\treturn [(form) => {\n\t\tif (form.rawSize.trim() === \"\") return t(\"The value must not be empty.\");\n\t\tif (form.parsedSize === null) return t(\"The value should be a plain number.\");\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 media-embed/mediaembedresize\n*/\n/**\n* The media embed resize plugin.\n*\n* It adds a possibility to resize each media embed using handles, toolbar buttons,\n* or a balloon-hosted custom-width input.\n*/\nvar MediaEmbedResize = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tMediaEmbedResizeEditing,\n\t\t\tMediaEmbedResizeHandles,\n\t\t\tMediaEmbedCustomResizeUI,\n\t\t\tMediaEmbedResizeButtons\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedResize\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 media-embed/mediaembedstyle/mediaembedstylecommand\n*/\n/**\n* The media embed style command. It is used to apply a style option (e.g. an alignment) to a\n* selected media embed.\n*\n* The set of accepted style values comes from the resolved\n* {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n* options. Values not in that set are silently rejected by {@link #execute}.\n*/\nvar MediaEmbedStyleCommand = class extends Command {\n\t/**\n\t* Resolved styles indexed by `name`. Used to look up the `isDefault` flag at execute time\n\t* (any default-marked style clears the attribute) and to validate that a requested style\n\t* is part of the resolved options list.\n\t*/\n\t_styles;\n\t/**\n\t* The `name` of the first style with `isDefault: true` in the resolved options, or `null`\n\t* when the integrator did not designate a default. Exposed via {@link #value} when the\n\t* selected media has no `mediaStyle` attribute, so the default-state UI button can light up.\n\t* Does not gate the \"clear attribute\" branch in {@link #execute} — that uses the per-style\n\t* `isDefault` flag so multi-default configs behave consistently with the downcast.\n\t*/\n\t_defaultStyleName;\n\t/**\n\t* Creates an instance of the media embed style command.\n\t*\n\t* @param editor The editor instance.\n\t* @param styles The resolved list of style options that this command will accept.\n\t*/\n\tconstructor(editor, styles) {\n\t\tsuper(editor);\n\t\tthis._styles = new Map(styles.map((style) => [style.name, style]));\n\t\tconst defaultStyle = styles.find((style) => style.isDefault);\n\t\tthis._defaultStyleName = defaultStyle ? defaultStyle.name : null;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst element = getSelectedMediaModelWidget(this.editor.model.document.selection);\n\t\tthis.isEnabled = !!element;\n\t\tif (!element) this.value = false;\n\t\telse if (element.hasAttribute(\"mediaStyle\")) {\n\t\t\tconst styleName = element.getAttribute(\"mediaStyle\");\n\t\t\tthis.value = this._styles.has(styleName) ? styleName : this._defaultStyleName ?? false;\n\t\t} else this.value = this._defaultStyleName ?? false;\n\t}\n\t/**\n\t* Executes the command and applies the chosen style to the currently selected media embed.\n\t*\n\t* ```ts\n\t* editor.execute( 'mediaStyle', { value: 'alignLeft' } );\n\t* editor.execute( 'mediaStyle', { value: 'alignCenter' } ); // removes the attribute — alignCenter is the built-in default\n\t* editor.execute( 'mediaStyle', { value: null } );          // removes the attribute\n\t* ```\n\t*\n\t* The default style is encoded on the model as the absence of the `mediaStyle` attribute.\n\t* Passing any `isDefault: true` style name (or `null`) therefore clears the attribute. Values\n\t* that are neither falsy, an `isDefault` style, nor present in the resolved options list are\n\t* silently rejected.\n\t*\n\t* @param options\n\t* @param options.value The name of the style to apply, or `null` to clear the alignment.\n\t* @fires execute\n\t*/\n\texecute(options) {\n\t\tconst model = this.editor.model;\n\t\tconst element = getSelectedMediaModelWidget(model.document.selection);\n\t\tconst requestedStyle = options.value;\n\t\tif (!requestedStyle || this._styles.get(requestedStyle)?.isDefault) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.removeAttribute(\"mediaStyle\", element);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (!this._styles.has(requestedStyle)) return;\n\t\tmodel.change((writer) => {\n\t\t\twriter.setAttribute(\"mediaStyle\", requestedStyle, element);\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 media-embed/mediaembedstyle/mediaembedstyleediting\n*/\n/**\n* The media embed style engine plugin. It extends the schema with the `mediaStyle` attribute,\n* registers the {@link module:media-embed/mediaembedstyle/mediaembedstylecommand~MediaEmbedStyleCommand} command,\n* and adds the converters that apply alignment CSS classes to the figure.\n*/\nvar MediaEmbedStyleEditing = class extends Plugin {\n\t/**\n\t* The resolved list of media style options. Built once from\n\t* {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n\t* during {@link #init} and consumed by both the command and the UI plugin (single source of truth).\n\t*\n\t* @internal\n\t* @readonly\n\t*/\n\tnormalizedStyles;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [MediaEmbedEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedStyleEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\teditor.config.define(\"mediaEmbed.styles\", { options: Object.keys(DEFAULT_OPTIONS) });\n\t\tthis.normalizedStyles = normalizeStyles(editor.config.get(\"mediaEmbed.styles\"));\n\t\tschema.extend(\"media\", { allowAttributes: [\"mediaStyle\"] });\n\t\tschema.setAttributeProperties(\"mediaStyle\", { isFormatting: true });\n\t\teditor.commands.add(\"mediaStyle\", new MediaEmbedStyleCommand(editor, this.normalizedStyles));\n\t\tthis._registerConverters();\n\t}\n\t/**\n\t* Registers the downcast and upcast converters for the `mediaStyle` attribute.\n\t*/\n\t_registerConverters() {\n\t\tconst editor = this.editor;\n\t\tconst styleClassMap = new Map(this.normalizedStyles.filter((style) => !style.isDefault && style.className).map((style) => [style.name, style.className]));\n\t\teditor.conversion.for(\"downcast\").add((dispatcher) => dispatcher.on(\"attribute:mediaStyle:media\", (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\tconst figure = conversionApi.mapper.toViewElement(data.item);\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst oldClass = styleClassMap.get(data.attributeOldValue);\n\t\t\tconst newClass = styleClassMap.get(data.attributeNewValue);\n\t\t\tif (oldClass) viewWriter.removeClass(oldClass, figure);\n\t\t\tif (newClass) viewWriter.addClass(newClass, figure);\n\t\t}));\n\t\teditor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:figure\", (_evt, data, conversionApi) => {\n\t\t\t\tif (!data.modelRange) return;\n\t\t\t\tconst modelElement = first(data.modelRange.getItems());\n\t\t\t\tif (!modelElement || !modelElement.is(\"element\", \"media\")) return;\n\t\t\t\tfor (const [styleName, className] of styleClassMap) if (conversionApi.consumable.consume(data.viewItem, { classes: className })) conversionApi.writer.setAttribute(\"mediaStyle\", styleName, modelElement);\n\t\t\t}, { priority: \"low\" });\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 media-embed/mediaembedstyle/mediaembedstyleui\n*/\n/**\n* The media embed style UI plugin.\n*\n* It registers a button for every style in the resolved\n* {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n* list, and the default split-button dropdowns (`mediaEmbed:wrapText`, `mediaEmbed:breakText`)\n* — filtered to the styles that survived configuration. The resulting components can be placed\n* in the {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar media embed toolbar}.\n*/\nvar MediaEmbedStyleUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [MediaEmbedStyleEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedStyleUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst titles = this._getLocalizedTitles();\n\t\tfor (const button of this._getButtonDefinitions(titles)) this._createButton(button);\n\t\tfor (const dropdown of this._getDropdownDefinitions(titles)) this._createDropdown(dropdown);\n\t}\n\t/**\n\t* Returns the alignment button definitions sourced from the resolved options list.\n\t*/\n\t_getButtonDefinitions(titles) {\n\t\treturn this.editor.plugins.get(MediaEmbedStyleEditing).normalizedStyles.map((option) => ({\n\t\t\tname: option.name,\n\t\t\tlabel: titles[option.title] || option.title,\n\t\t\ticon: option.icon\n\t\t}));\n\t}\n\t/**\n\t* Returns the localized titles of the built-in styles and dropdowns.\n\t*/\n\t_getLocalizedTitles() {\n\t\tconst t = this.editor.t;\n\t\treturn {\n\t\t\t\"Left aligned media\": t(\"Left aligned media\"),\n\t\t\t\"Centered media\": t(\"Centered media\"),\n\t\t\t\"Right aligned media\": t(\"Right aligned media\"),\n\t\t\t\"Wrap text\": t(\"Wrap text\"),\n\t\t\t\"Break text\": t(\"Break text\")\n\t\t};\n\t}\n\t/**\n\t* Returns the split-button dropdown definitions, filtered to the styles present in the\n\t* resolved options list. Combines the {@link module:media-embed/mediaembedstyle/constants~DEFAULT_DROPDOWN_DEFINITIONS\n\t* built-in dropdowns} with custom dropdowns declared inline in\n\t* {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `config.mediaEmbed.toolbar`}.\n\t*\n\t* A dropdown with fewer than two items is skipped — a single-item dropdown carries no value\n\t* over the flat button. If the configured `defaultItem` was filtered out, the first surviving\n\t* item becomes the default.\n\t*\n\t* When a *custom* dropdown's items reference styles that are not in the resolved options list,\n\t* a console warning is emitted (the integrator's config was not fully honored). Built-in\n\t* dropdowns auto-skip silently — they are added by the plugin, not the integrator.\n\t*/\n\t_getDropdownDefinitions(titles) {\n\t\tconst editing = this.editor.plugins.get(MediaEmbedStyleEditing);\n\t\tconst availableComponentNames = new Set(editing.normalizedStyles.map(({ name }) => `mediaEmbed:${name}`));\n\t\tconst dropdowns = [];\n\t\tconst resolveDropdown = (definition, warnOnFilter) => {\n\t\t\tconst items = definition.items.filter((itemName) => availableComponentNames.has(itemName));\n\t\t\tif (warnOnFilter && items.length !== definition.items.length) warnInvalidDropdown({ dropdown: definition });\n\t\t\tif (items.length < 2) return;\n\t\t\tconst defaultItem = availableComponentNames.has(definition.defaultItem) ? definition.defaultItem : items[0];\n\t\t\tdropdowns.push({\n\t\t\t\tname: definition.name,\n\t\t\t\ttitle: titles[definition.title] || definition.title,\n\t\t\t\titems,\n\t\t\t\tdefaultItem\n\t\t\t});\n\t\t};\n\t\tfor (const definition of DEFAULT_DROPDOWN_DEFINITIONS) resolveDropdown(definition, false);\n\t\tfor (const definition of this._collectCustomDropdowns()) resolveDropdown(definition, true);\n\t\treturn dropdowns;\n\t}\n\t/**\n\t* Scans `config.mediaEmbed.toolbar` for entries shaped like a dropdown definition\n\t* (objects with both `items` and `defaultItem`) and returns the valid ones. `defaultItem`\n\t* is the discriminator between our split-button dropdowns and generic toolbar groupings\n\t* (which use `items` + `label` and have no `defaultItem`).\n\t*\n\t* Invalid entries (wrong name prefix, `defaultItem` missing from `items`) are warned and\n\t* dropped here. Items that reference filtered-out styles are filtered later by\n\t* {@link #_getDropdownDefinitions}, alongside the same logic that applies to built-in\n\t* dropdowns.\n\t*/\n\t_collectCustomDropdowns() {\n\t\treturn (this.editor.config.get(\"mediaEmbed.toolbar\") || []).filter((item) => isMediaStyleDropdown(item) && isValidCustomDropdown(item));\n\t}\n\t/**\n\t* Registers a single alignment toggle button in the component factory.\n\t*/\n\t_createButton(definition) {\n\t\tconst editor = this.editor;\n\t\tconst componentName = `mediaEmbed:${definition.name}`;\n\t\teditor.ui.componentFactory.add(componentName, (locale) => {\n\t\t\tconst command = editor.commands.get(\"mediaStyle\");\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tview.set({\n\t\t\t\tlabel: definition.label,\n\t\t\t\ticon: definition.icon,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\t\tview.bind(\"isOn\").to(command, \"value\", (value) => value === definition.name);\n\t\t\tview.on(\"execute\", () => {\n\t\t\t\teditor.execute(\"mediaStyle\", { value: definition.name });\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn view;\n\t\t});\n\t}\n\t/**\n\t* Registers a split-button dropdown grouping a set of alignment buttons. The action button\n\t* reflects whichever child option is currently `isOn`, falling back to the dropdown's\n\t* `defaultItem` when nothing is active.\n\t*/\n\t_createDropdown(definition) {\n\t\tconst editor = this.editor;\n\t\tconst factory = editor.ui.componentFactory;\n\t\tfactory.add(definition.name, (locale) => {\n\t\t\tconst buttonViews = definition.items.map((itemName) => factory.create(itemName));\n\t\t\tconst defaultButton = buttonViews[definition.items.indexOf(definition.defaultItem)];\n\t\t\tconst activeOrDefault = (...areOn) => {\n\t\t\t\tconst index = areOn.findIndex(Boolean);\n\t\t\t\treturn index < 0 ? defaultButton : buttonViews[index];\n\t\t\t};\n\t\t\tconst dropdownView = createDropdown(locale, SplitButtonView);\n\t\t\tconst splitButtonView = dropdownView.buttonView;\n\t\t\taddToolbarToDropdown(dropdownView, buttonViews, { enableActiveItemFocusOnDropdownOpen: true });\n\t\t\tsplitButtonView.set({\n\t\t\t\tlabel: getDropdownButtonTitle(definition.title, defaultButton.label),\n\t\t\t\tclass: null,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tsplitButtonView.arrowView.unbind(\"label\");\n\t\t\tsplitButtonView.arrowView.set({ label: definition.title });\n\t\t\tsplitButtonView.bind(\"icon\").toMany(buttonViews, \"isOn\", (...areOn) => activeOrDefault(...areOn).icon);\n\t\t\tsplitButtonView.bind(\"label\").toMany(buttonViews, \"isOn\", (...areOn) => getDropdownButtonTitle(definition.title, activeOrDefault(...areOn).label));\n\t\t\tsplitButtonView.bind(\"isOn\").toMany(buttonViews, \"isOn\", (...areOn) => areOn.some(Boolean));\n\t\t\tsplitButtonView.bind(\"class\").toMany(buttonViews, \"isOn\", (...areOn) => areOn.some(Boolean) ? \"ck-splitbutton_flatten\" : void 0);\n\t\t\tthis.listenTo(splitButtonView, \"execute\", () => {\n\t\t\t\tif (buttonViews.some(({ isOn }) => isOn)) dropdownView.isOpen = !dropdownView.isOpen;\n\t\t\t\telse defaultButton.fire(\"execute\");\n\t\t\t});\n\t\t\tdropdownView.bind(\"isEnabled\").toMany(buttonViews, \"isEnabled\", (...areEnabled) => areEnabled.some(Boolean));\n\t\t\tthis.listenTo(dropdownView, \"execute\", () => {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t}\n};\n/**\n* Combines the dropdown title and the default action item label for the split-button label.\n*/\nfunction getDropdownButtonTitle(dropdownTitle, buttonTitle) {\n\treturn `${dropdownTitle}: ${buttonTitle}`;\n}\n/**\n* Validates a user-supplied dropdown definition. Emits a console warning under\n* `media-style-configuration-definition-invalid` and returns `false` when any of these rules is\n* broken: `name` must start with `mediaEmbed:`, `title` must be a non-empty string, `items` must\n* be non-empty and every entry must be a `mediaEmbed:`-prefixed string, and `defaultItem` must be\n* one of the `items`.\n*\n* Item-membership against the resolved styles is checked separately, downstream, alongside the\n* same logic that applies to built-in dropdowns.\n*/\nfunction isValidCustomDropdown(definition) {\n\tconst valid = definition.name.startsWith(\"mediaEmbed:\") && typeof definition.title === \"string\" && definition.title.length > 0 && definition.items.length > 0 && definition.items.every((name) => typeof name === \"string\" && name.startsWith(\"mediaEmbed:\")) && definition.items.includes(definition.defaultItem);\n\tif (!valid) warnInvalidDropdown({ dropdown: definition });\n\treturn valid;\n}\n/**\n* Emits a console warning under `media-style-configuration-definition-invalid` for an invalid\n* or partially-honored dropdown definition. Called from {@link ~isValidCustomDropdown} for\n* structural problems and from {@link MediaEmbedStyleUI#_getDropdownDefinitions} when items\n* reference styles that are not in the resolved options list.\n*/\nfunction warnInvalidDropdown(info) {\n\tlogWarning(\"media-style-configuration-definition-invalid\", info);\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 media-embed/mediaembedstyle\n*/\n/**\n* The media embed style plugin.\n*\n* This is a \"glue\" plugin which loads the following plugins:\n* * {@link module:media-embed/mediaembedstyle/mediaembedstyleediting~MediaEmbedStyleEditing},\n* * {@link module:media-embed/mediaembedstyle/mediaembedstyleui~MediaEmbedStyleUI}\n*\n* For a detailed overview, check the {@glink features/media-embed/media-embed-styles Media embed styles feature documentation}.\n*/\nvar MediaEmbedStyle = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [MediaEmbedStyleEditing, MediaEmbedStyleUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"MediaEmbedStyle\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { AutoMediaEmbed, MediaEmbed, MediaEmbedCommand, MediaEmbedCustomResizeUI, MediaEmbedEditing, MediaEmbedResize, MediaEmbedResizeButtons, MediaEmbedResizeEditing, MediaEmbedResizeHandles, MediaEmbedStyle, MediaEmbedStyleCommand, MediaEmbedStyleEditing, MediaEmbedStyleUI, MediaEmbedToolbar, MediaEmbedUI, MediaRegistry, ResizeMediaEmbedCommand, MediaFormView as _MediaFormView, createMediaFigureElement as _createMediaFigureElement, getSelectedMediaModelWidget as _getSelectedMediaModelWidget, getSelectedMediaViewWidget as _getSelectedMediaViewWidget, insertMedia as _insertMedia, isMediaWidget as _isMediaWidget, modelToViewUrlAttributeConverter as _modelToViewUrlAttributeMediaConverter, toMediaWidget as _toMediaWidget };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module media-embed/converters\n */\n\nimport type { GetCallback } from '@ckeditor/ckeditor5-utils';\nimport type { DowncastAttributeEvent, DowncastDispatcher, ModelElement, ViewElement } from '@ckeditor/ckeditor5-engine';\nimport { type MediaRegistry } from './mediaregistry.js';\nimport type { MediaOptions } from './utils.js';\n\n/**\n * Returns a function that converts the model \"url\" attribute to the view representation.\n *\n * Depending on the configuration, the view representation can be \"semantic\" (for the data pipeline):\n *\n * ```html\n * <figure class=\"media\">\n * \t<oembed url=\"foo\"></oembed>\n * </figure>\n * ```\n *\n * or \"non-semantic\" (for the editing view pipeline):\n *\n * ```html\n * <figure class=\"media\">\n * \t<div data-oembed-url=\"foo\">[ non-semantic media preview for \"foo\" ]</div>\n * </figure>\n * ```\n *\n * **Note:** Changing the model \"url\" attribute replaces the entire content of the\n * `<figure>` in the view.\n *\n * @param registry The registry providing\n * the media and their content.\n * @param options options object with following properties:\n * - elementName When set, overrides the default element name for semantic media embeds.\n * - renderMediaPreview When `true`, the converter will create the view in the non-semantic form.\n * - renderForEditingView When `true`, the converter will create a view specific for the\n * editing pipeline (e.g. including CSS classes, content placeholders).\n *\n * @internal\n */\nexport function modelToViewUrlAttributeConverter(\n\tregistry: MediaRegistry,\n\toptions: MediaOptions\n): ( dispatcher: DowncastDispatcher ) => void {\n\tconst converter: GetCallback<DowncastAttributeEvent> = ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst url = data.attributeNewValue as string;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst figure = conversionApi.mapper.toViewElement( data.item as ModelElement )!;\n\t\tconst mediaContentElement = [ ...figure.getChildren() ]\n\t\t\t.find( child => ( child as ViewElement ).getCustomProperty( 'media-content' ) )!;\n\n\t\t// TODO: removing the wrapper and creating it from scratch is a hack. We can do better than that.\n\t\tviewWriter.remove( mediaContentElement );\n\n\t\tconst mediaViewElement = registry.getMediaViewElement( viewWriter, url, options );\n\n\t\tviewWriter.insert( viewWriter.createPositionAt( figure, 0 ), mediaViewElement );\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on<DowncastAttributeEvent>( 'attribute:url:media', converter );\n\t};\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/**\n * @module media-embed/utils\n */\n\nimport type {\n\tViewContainerElement,\n\tModelElement,\n\tModel,\n\tModelSelectable,\n\tModelSelection,\n\tViewDowncastWriter,\n\tViewDocumentSelection,\n\tViewElement,\n\tModelDocumentSelection\n} from '@ckeditor/ckeditor5-engine';\nimport { isWidget, toWidget } from '@ckeditor/ckeditor5-widget';\nimport { type MediaRegistry } from './mediaregistry.js';\n\n/**\n * Converts a given {@link module:engine/view/element~ViewElement} to a media embed widget:\n * * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}\n * allowing to recognize the media widget element.\n * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n *\n * @param writer An instance of the view writer.\n * @param label The element's label.\n * @internal\n */\nexport function toMediaWidget( viewElement: ViewElement, writer: ViewDowncastWriter, label: string ): ViewElement {\n\twriter.setCustomProperty( 'media', true, viewElement );\n\n\treturn toWidget( viewElement, writer, { label } );\n}\n\n/**\n * Returns a media widget editing view element if one is selected.\n *\n * @internal\n */\nexport function getSelectedMediaViewWidget( selection: ViewDocumentSelection ): ViewElement | null {\n\tconst viewElement = selection.getSelectedElement();\n\n\tif ( viewElement && isMediaWidget( viewElement ) ) {\n\t\treturn viewElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Checks if a given view element is a media widget.\n *\n * @internal\n */\nexport function isMediaWidget( viewElement: ViewElement ): boolean {\n\treturn !!viewElement.getCustomProperty( 'media' ) && isWidget( viewElement );\n}\n\n/**\n * Creates a view element representing the media. Either a \"semantic\" one for the data pipeline:\n *\n * ```html\n * <figure class=\"media\">\n * \t<oembed url=\"foo\"></oembed>\n * </figure>\n * ```\n *\n * or a \"non-semantic\" (for the editing view pipeline):\n *\n * ```html\n * <figure class=\"media\">\n * \t<div data-oembed-url=\"foo\">[ non-semantic media preview for \"foo\" ]</div>\n * </figure>\n * ```\n *\n * @internal\n */\nexport function createMediaFigureElement(\n\twriter: ViewDowncastWriter,\n\tregistry: MediaRegistry,\n\turl: string,\n\toptions: MediaOptions\n): ViewContainerElement {\n\treturn writer.createContainerElement( 'figure', { class: 'media' }, [\n\t\tregistry.getMediaViewElement( writer, url, options ),\n\t\twriter.createSlot()\n\t] );\n}\n\n/**\n * Returns a selected media element in the model, if any.\n *\n * @internal\n */\nexport function getSelectedMediaModelWidget( selection: ModelSelection | ModelDocumentSelection ): ModelElement | null {\n\tconst selectedElement = selection.getSelectedElement();\n\n\tif ( selectedElement && selectedElement.is( 'element', 'media' ) ) {\n\t\treturn selectedElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Creates a media element and inserts it into the model.\n *\n * **Note**: This method will use {@link module:engine/model/model~Model#insertContent `model.insertContent()`} logic of inserting content\n * if no `insertPosition` is passed.\n *\n * @param url An URL of an embeddable media.\n * @param findOptimalPosition If true it will try to find optimal position to insert media without breaking content\n * in which a selection is.\n * @internal\n */\nexport function insertMedia( model: Model, url: string, selectable: ModelSelectable, findOptimalPosition: boolean ): void {\n\tmodel.change( writer => {\n\t\tconst mediaElement = writer.createElement( 'media', { url } );\n\n\t\tmodel.insertObject( mediaElement, selectable, null, {\n\t\t\tsetSelection: 'on',\n\t\t\tfindOptimalPosition: findOptimalPosition ? 'auto' : undefined\n\t\t} );\n\t} );\n}\n\n/**\n * Type for commonly grouped function parameters across this package.\n */\nexport type MediaOptions = {\n\telementName: string;\n\trenderMediaPreview?: boolean;\n\trenderForEditingView?: boolean;\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/**\n * @module media-embed/mediaembedcommand\n */\n\nimport type { ModelDocumentSelection, ModelElement, Model, ModelSelection } from '@ckeditor/ckeditor5-engine';\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { findOptimalInsertionRange } from '@ckeditor/ckeditor5-widget';\n\nimport { getSelectedMediaModelWidget, insertMedia } from './utils.js';\n\n/**\n * The insert media command.\n *\n * The command is registered by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} as `'mediaEmbed'`.\n *\n * To insert media at the current selection, execute the command and specify the URL:\n *\n * ```ts\n * editor.execute( 'mediaEmbed', 'http://url.to.the/media' );\n * ```\n */\nexport class MediaEmbedCommand extends Command {\n\t/**\n\t * Media url.\n\t */\n\tdeclare public value: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedMedia = getSelectedMediaModelWidget( selection );\n\n\t\tthis.value = selectedMedia ? selectedMedia.getAttribute( 'url' ) as string : undefined;\n\n\t\tthis.isEnabled = isMediaSelected( selection ) || isAllowedInParent( selection, model );\n\t}\n\n\t/**\n\t * Executes the command, which either:\n\t *\n\t * * updates the URL of the selected media,\n\t * * inserts the new media into the editor and puts the selection around it.\n\t *\n\t * @fires execute\n\t * @param url The URL of the media.\n\t */\n\tpublic override execute( url: string ): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedMedia = getSelectedMediaModelWidget( selection );\n\n\t\tif ( selectedMedia ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setAttribute( 'url', url, selectedMedia );\n\t\t\t} );\n\t\t} else {\n\t\t\tinsertMedia( model, url, selection, true );\n\t\t}\n\t}\n}\n\n/**\n * Checks if the media embed is allowed in the parent.\n */\nfunction isAllowedInParent( selection: ModelSelection | ModelDocumentSelection, model: Model ): boolean {\n\tconst insertionRange = findOptimalInsertionRange( selection, model );\n\tlet parent = insertionRange.start.parent as ModelElement;\n\n\t// The model.insertContent() will remove empty parent (unless it is a $root or a limit).\n\tif ( parent.isEmpty && !model.schema.isLimit( parent ) ) {\n\t\tparent = parent.parent as ModelElement;\n\t}\n\n\treturn model.schema.checkChild( parent, 'media' );\n}\n\n/**\n * Checks if the media object is selected.\n */\nfunction isMediaSelected( selection: ModelSelection | ModelDocumentSelection ): boolean {\n\tconst element = selection.getSelectedElement();\n\treturn !!element && element.name === 'media';\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/**\n * @module media-embed/mediaregistry\n */\n\nimport { IconView, Template } from '@ckeditor/ckeditor5-ui';\nimport { IconMediaPlaceholder } from '@ckeditor/ckeditor5-icons';\nimport { logWarning, toArray, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport type { ViewDowncastWriter, ViewElement } from '@ckeditor/ckeditor5-engine';\nimport type { MediaEmbedConfig, MediaEmbedProvider } from './mediaembedconfig.js';\nimport type { MediaOptions } from './utils.js';\n\nconst mediaPlaceholderIconViewBox = '0 0 64 42';\n\n/**\n * A bridge between the raw media content provider definitions and the editor view content.\n *\n * It helps translating media URLs to corresponding {@link module:engine/view/element~ViewElement view elements}.\n *\n * Mostly used by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} plugin.\n */\nexport class MediaRegistry {\n\t/**\n\t * The {@link module:utils/locale~Locale} instance.\n\t */\n\tpublic locale: Locale;\n\n\t/**\n\t * The media provider definitions available for the registry. Usually corresponding with the\n\t * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig media configuration}.\n\t */\n\tpublic providerDefinitions: Array<MediaEmbedProvider>;\n\n\t/**\n\t * Creates an instance of the {@link module:media-embed/mediaregistry~MediaRegistry} class.\n\t *\n\t * @param locale The localization services instance.\n\t * @param config The configuration of the media embed feature.\n\t */\n\tconstructor( locale: Locale, config: MediaEmbedConfig ) {\n\t\tconst providers = config.providers!;\n\t\tconst extraProviders = config.extraProviders || [];\n\t\tconst removedProviders = new Set( config.removeProviders );\n\t\tconst providerDefinitions = providers\n\t\t\t.concat( extraProviders )\n\t\t\t.filter( provider => {\n\t\t\t\tconst name = provider.name;\n\n\t\t\t\tif ( !name ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * One of the providers (or extra providers) specified in the media embed configuration\n\t\t\t\t\t * has no name and will not be used by the editor. In order to get this media\n\t\t\t\t\t * provider working, double check your editor configuration.\n\t\t\t\t\t *\n\t\t\t\t\t * @error media-embed-no-provider-name\n\t\t\t\t\t */\n\t\t\t\t\tlogWarning( 'media-embed-no-provider-name', { provider } );\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn !removedProviders.has( name );\n\t\t\t} );\n\n\t\tthis.locale = locale;\n\t\tthis.providerDefinitions = providerDefinitions;\n\t}\n\n\t/**\n\t * Checks whether the passed URL is representing a certain media type allowed in the editor.\n\t *\n\t * @param url The URL to be checked\n\t */\n\tpublic hasMedia( url: string ): boolean {\n\t\treturn !!this._getMedia( url );\n\t}\n\n\t/**\n\t * For the given media URL string and options, it returns the {@link module:engine/view/element~ViewElement view element}\n\t * representing that media.\n\t *\n\t * **Note:** If no URL is specified, an empty view element is returned.\n\t *\n\t * @param writer The view writer used to produce a view element.\n\t * @param url The URL to be translated into a view element.\n\t */\n\tpublic getMediaViewElement(\n\t\twriter: ViewDowncastWriter,\n\t\turl: string,\n\t\toptions: MediaOptions\n\t): ViewElement {\n\t\treturn this._getMedia( url )!.getViewElement( writer, options );\n\t}\n\n\t/**\n\t * Returns a `Media` instance for the given URL.\n\t *\n\t * @param url The URL of the media.\n\t * @returns The `Media` instance or `null` when there is none.\n\t */\n\tprivate _getMedia( url: string ): Media | null {\n\t\tif ( !url ) {\n\t\t\treturn new Media( this.locale );\n\t\t}\n\n\t\turl = url.trim();\n\n\t\tfor ( const definition of this.providerDefinitions ) {\n\t\t\tconst previewRenderer = definition.html!;\n\t\t\tconst pattern = toArray( definition.url );\n\n\t\t\tfor ( const subPattern of pattern ) {\n\t\t\t\tconst match = this._getUrlMatches( url, subPattern );\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\treturn new Media( this.locale, url, match, previewRenderer );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Tries to match `url` to `pattern`.\n\t *\n\t * @param url The URL of the media.\n\t * @param pattern The pattern that should accept the media URL.\n\t */\n\tprivate _getUrlMatches( url: string, pattern: RegExp ): RegExpMatchArray | null {\n\t\t// 1. Try to match without stripping the protocol and \"www\" subdomain.\n\t\tlet match = url.match( pattern );\n\n\t\tif ( match ) {\n\t\t\treturn match;\n\t\t}\n\n\t\t// 2. Try to match after stripping the protocol.\n\t\tlet rawUrl = url.replace( /^https?:\\/\\//, '' );\n\t\tmatch = rawUrl.match( pattern );\n\n\t\tif ( match ) {\n\t\t\treturn match;\n\t\t}\n\n\t\t// 3. Try to match after stripping the \"www\" subdomain.\n\t\trawUrl = rawUrl.replace( /^www\\./, '' );\n\t\tmatch = rawUrl.match( pattern );\n\n\t\tif ( match ) {\n\t\t\treturn match;\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * Represents media defined by the provider configuration.\n *\n * It can be rendered to the {@link module:engine/view/element~ViewElement view element} and used in the editing or data pipeline.\n */\nclass Media {\n\t/**\n\t * The URL this Media instance represents.\n\t */\n\tpublic url: string | null;\n\n\t/**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t *\n\t * @see module:utils/locale~Locale#t\n\t */\n\tprivate _locale: Locale;\n\n\t/**\n\t * The output of the `RegExp.match` which validated the {@link #url} of this media.\n\t */\n\tprivate _match?: RegExpMatchArray;\n\n\t/**\n\t * The function returning the HTML string preview of this media.\n\t */\n\tprivate _previewRenderer?: ( match: RegExpMatchArray ) => string;\n\n\tconstructor( locale: Locale, url?: string, match?: RegExpMatchArray, previewRenderer?: ( match: RegExpMatchArray ) => string ) {\n\t\tthis.url = this._getValidUrl( url );\n\t\tthis._locale = locale;\n\t\tthis._match = match;\n\t\tthis._previewRenderer = previewRenderer;\n\t}\n\n\t/**\n\t * Returns the view element representation of the media.\n\t *\n\t * @param writer The view writer used to produce a view element.\n\t */\n\tpublic getViewElement(\n\t\twriter: ViewDowncastWriter,\n\t\toptions: MediaOptions\n\t): ViewElement {\n\t\tconst attributes: Record<string, unknown> = {};\n\t\tlet viewElement;\n\n\t\tif ( options.renderForEditingView || ( options.renderMediaPreview && this.url && this._previewRenderer ) ) {\n\t\t\tif ( this.url ) {\n\t\t\t\tattributes[ 'data-oembed-url' ] = this.url;\n\t\t\t}\n\n\t\t\tif ( options.renderForEditingView ) {\n\t\t\t\tattributes.class = 'ck-media__wrapper';\n\t\t\t}\n\n\t\t\tconst mediaHtml = this._getPreviewHtml( options );\n\n\t\t\tviewElement = writer.createRawElement( 'div', attributes, ( domElement, domConverter ) => {\n\t\t\t\tdomConverter!.setContentOf( domElement, mediaHtml );\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( this.url ) {\n\t\t\t\tattributes.url = this.url;\n\t\t\t}\n\n\t\t\tviewElement = writer.createEmptyElement( options.elementName, attributes );\n\t\t}\n\n\t\twriter.setCustomProperty( 'media-content', true, viewElement );\n\n\t\treturn viewElement;\n\t}\n\n\t/**\n\t * Returns the HTML string of the media content preview.\n\t */\n\tprivate _getPreviewHtml( options: { renderForEditingView?: boolean } ): string {\n\t\tif ( this._previewRenderer ) {\n\t\t\treturn this._previewRenderer( this._match! );\n\t\t} else {\n\t\t\t// The placeholder only makes sense for editing view and media which have URLs.\n\t\t\t// Placeholder is never displayed in data and URL-less media have no content.\n\t\t\tif ( this.url && options.renderForEditingView ) {\n\t\t\t\treturn this._getPlaceholderHtml();\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * Returns the placeholder HTML when the media has no content preview.\n\t */\n\tprivate _getPlaceholderHtml(): string {\n\t\tconst icon = new IconView();\n\t\tconst t = this._locale.t;\n\n\t\ticon.content = IconMediaPlaceholder;\n\t\ticon.viewBox = mediaPlaceholderIconViewBox;\n\n\t\tconst placeholder = new Template( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck ck-reset_all ck-media__placeholder'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-media__placeholder__icon'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [ icon ]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-media__placeholder__url',\n\t\t\t\t\t\ttarget: '_blank',\n\t\t\t\t\t\trel: 'noopener noreferrer',\n\t\t\t\t\t\thref: this.url,\n\t\t\t\t\t\t'data-cke-tooltip-text': t( 'Open media in new tab' )\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttag: 'span',\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\tclass: 'ck-media__placeholder__url__text'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tchildren: [ this.url ]\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t} ).render() as HTMLElement;\n\n\t\treturn placeholder.outerHTML;\n\t}\n\n\t/**\n\t * Returns the full URL to the specified media.\n\t *\n\t * @param url The URL of the media.\n\t */\n\tprivate _getValidUrl( url: string | undefined ): string | null {\n\t\tif ( !url ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( url.match( /^https?/ ) ) {\n\t\t\treturn url;\n\t\t}\n\n\t\treturn 'https://' + url;\n\t}\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/**\n * @module media-embed/mediaembedediting\n */\n\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { UpcastElementEvent } from '@ckeditor/ckeditor5-engine';\nimport { first, type GetCallback } from '@ckeditor/ckeditor5-utils';\n\nimport { modelToViewUrlAttributeConverter } from './converters.js';\nimport type { MediaEmbedConfig } from './mediaembedconfig.js';\nimport { MediaEmbedCommand } from './mediaembedcommand.js';\nimport { MediaRegistry } from './mediaregistry.js';\nimport { toMediaWidget, createMediaFigureElement } from './utils.js';\n\n/**\n * The media embed editing feature.\n */\nexport class MediaEmbedEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * The media registry managing the media providers in the editor.\n\t */\n\tpublic registry: MediaRegistry;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\t\teditor.config.define( 'mediaEmbed', {\n\t\t\telementName: 'oembed',\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tname: 'dailymotion',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^dailymotion\\.com\\/video\\/(\\w+)/,\n\t\t\t\t\t\t/^dai.ly\\/(\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'<div>' +\n\t\t\t\t\t\t\t\t`<iframe src=\"https://www.dailymotion.com/embed/video/${ id }\" ` +\n\t\t\t\t\t\t\t\t\t'width=\"1280\" height=\"720\" ' +\n\t\t\t\t\t\t\t\t\t'style=\"width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display: block;\" ' +\n\t\t\t\t\t\t\t\t\t'frameborder=\"0\" allowfullscreen allow=\"autoplay\">' +\n\t\t\t\t\t\t\t\t'</iframe>' +\n\t\t\t\t\t\t\t'</div>'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'spotify',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(artist\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(album\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(track\\/\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\t\t\t\t\t\tconst isTrack = id.startsWith( 'track/' );\n\t\t\t\t\t\tconst iframeStyle = isTrack ?\n\t\t\t\t\t\t\t'width: 100%; height: 80px; border: 0; display: block;' :\n\t\t\t\t\t\t\t'width: 100%; height: auto; aspect-ratio: 100 / 126; border: 0; display: block;';\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'<div>' +\n\t\t\t\t\t\t\t\t`<iframe src=\"https://open.spotify.com/embed/${ id }\" ` +\n\t\t\t\t\t\t\t\t\t`width=\"300\" height=\"${ isTrack ? '80' : '378' }\" ` +\n\t\t\t\t\t\t\t\t\t`style=\"${ iframeStyle }\" ` +\n\t\t\t\t\t\t\t\t\t'frameborder=\"0\" allowtransparency=\"true\" allow=\"encrypted-media\">' +\n\t\t\t\t\t\t\t\t'</iframe>' +\n\t\t\t\t\t\t\t'</div>'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'youtube',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)(?:&t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/shorts\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^youtube\\.com\\/embed\\/([\\w-]+)(?:\\?start=(\\d+))?/,\n\t\t\t\t\t\t/^youtu\\.be\\/([\\w-]+)(?:\\?t=(\\d+))?/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\t\t\t\t\t\tconst time = match[ 2 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'<div>' +\n\t\t\t\t\t\t\t\t`<iframe src=\"https://www.youtube.com/embed/${ id }${ time ? `?start=${ time }` : '' }\" ` +\n\t\t\t\t\t\t\t\t\t'width=\"1280\" height=\"720\" ' +\n\t\t\t\t\t\t\t\t\t'style=\"width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display: block;\" ' +\n\t\t\t\t\t\t\t\t\t'frameborder=\"0\" allow=\"autoplay; encrypted-media\" referrerpolicy=\"strict-origin-when-cross-origin\" ' +\n\t\t\t\t\t\t\t\t\t'allowfullscreen>' +\n\t\t\t\t\t\t\t\t'</iframe>' +\n\t\t\t\t\t\t\t'</div>'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'vimeo',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^vimeo\\.com\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^player\\.vimeo\\.com\\/video\\/(\\d+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'<div>' +\n\t\t\t\t\t\t\t\t`<iframe src=\"https://player.vimeo.com/video/${ id }\" ` +\n\t\t\t\t\t\t\t\t\t'width=\"1280\" height=\"720\" ' +\n\t\t\t\t\t\t\t\t\t'style=\"width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; display: block;\" ' +\n\t\t\t\t\t\t\t\t\t'frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen>' +\n\t\t\t\t\t\t\t\t'</iframe>' +\n\t\t\t\t\t\t\t'</div>'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'instagram',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^instagram\\.com\\/p\\/(\\w+)/,\n\t\t\t\t\t\t/^instagram\\.com\\/reel\\/(\\w+)/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'twitter',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^twitter\\.com/,\n\t\t\t\t\t\t/^x\\.com/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'googleMaps',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^google\\.com\\/maps/,\n\t\t\t\t\t\t/^goo\\.gl\\/maps/,\n\t\t\t\t\t\t/^maps\\.google\\.com/,\n\t\t\t\t\t\t/^maps\\.app\\.goo\\.gl/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'flickr',\n\t\t\t\t\turl: /^flickr\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'facebook',\n\t\t\t\t\turl: /^facebook\\.com/\n\t\t\t\t}\n\t\t\t]\n\t\t} as MediaEmbedConfig );\n\n\t\tthis.registry = new MediaRegistry( editor.locale, editor.config.get( 'mediaEmbed' )! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst renderMediaPreview = editor.config.get( 'mediaEmbed.previewsInData' );\n\t\tconst elementName = editor.config.get( 'mediaEmbed.elementName' )!;\n\n\t\tconst registry = this.registry;\n\n\t\teditor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );\n\n\t\t// Configure the schema.\n\t\tschema.register( 'media', {\n\t\t\tinheritAllFrom: '$blockObject',\n\t\t\tallowAttributes: [ 'url' ]\n\t\t} );\n\n\t\t// Model -> Data\n\t\tconversion.for( 'dataDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\n\t\t\t\treturn createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderMediaPreview: !!url && renderMediaPreview\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> Data (url -> data-oembed-url)\n\t\tconversion.for( 'dataDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderMediaPreview\n\t\t\t} ) );\n\n\t\t// Model -> View (element)\n\t\tconversion.for( 'editingDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\t\t\t\tconst figure = createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderForEditingView: true\n\t\t\t\t} );\n\n\t\t\t\treturn toMediaWidget( figure, writer, t( 'media widget' ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> View (url -> data-oembed-url)\n\t\tconversion.for( 'editingDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderForEditingView: true\n\t\t\t} ) );\n\n\t\t// View -> Model (data-oembed-url -> url)\n\t\tconversion.for( 'upcast' )\n\t\t\t// Upcast semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: element => [ 'oembed', elementName ].includes( element.name ) && element.getAttribute( 'url' ) ?\n\t\t\t\t\t{ name: true } :\n\t\t\t\t\tnull,\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Upcast non-semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t'data-oembed-url': true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'data-oembed-url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Consume `<figure class=\"media\">` elements, that were left after upcast.\n\t\t\t.add( dispatcher => {\n\t\t\t\tconst converter: GetCallback<UpcastElementEvent> = ( evt, data, conversionApi ) => {\n\t\t\t\t\tif ( !conversionApi.consumable.consume( data.viewItem, { name: true, classes: 'media' } ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\n\t\t\t\t\tdata.modelRange = modelRange;\n\t\t\t\t\tdata.modelCursor = modelCursor;\n\n\t\t\t\t\tconst modelElement = first( modelRange!.getItems() );\n\n\t\t\t\t\tif ( !modelElement ) {\n\t\t\t\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\t\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'media' } );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdispatcher.on<UpcastElementEvent>( 'element:figure', converter );\n\t\t\t} );\n\t}\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/**\n * @module media-embed/automediaembed\n */\n\nimport { type Editor, Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ModelLiveRange, ModelLivePosition } from '@ckeditor/ckeditor5-engine';\nimport { Clipboard, type ClipboardInputTransformationEvent, type ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard';\nimport { Delete } from '@ckeditor/ckeditor5-typing';\nimport { Undo, type UndoCommand } from '@ckeditor/ckeditor5-undo';\nimport { global } from '@ckeditor/ckeditor5-utils';\n\nimport { MediaEmbedEditing } from './mediaembedediting.js';\nimport { insertMedia } from './utils.js';\nimport { type MediaEmbedCommand } from './mediaembedcommand.js';\n\nconst URL_REGEXP = /^(?:http(s)?:\\/\\/)?[\\w-]+\\.[\\w-.~:/?#[\\]@!$&'()*+,;=%]+$/;\n\n/**\n * The auto-media embed plugin. It recognizes media links in the pasted content and embeds\n * them shortly after they are injected into the document.\n */\nexport class AutoMediaEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Clipboard, Delete, Undo ]> {\n\t\treturn [ Clipboard, Delete, Undo ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AutoMediaEmbed' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t * cleaning of the timeout.\n\t */\n\tprivate _timeoutId: number | null;\n\n\t/**\n\t * The position where the `<media>` element will be inserted after the timeout,\n\t * determined each time the new content is pasted into the document.\n\t */\n\tprivate _positionToInsert: ModelLivePosition | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._timeoutId = null;\n\t\tthis._positionToInsert = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\n\t\t// We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n\t\t// After pasting, the content between those positions will be checked for a URL that could be transformed\n\t\t// into media.\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\t\tthis.listenTo<ClipboardInputTransformationEvent>( clipboardPipeline, 'inputTransformation', () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange()!;\n\n\t\t\tconst leftLivePosition = ModelLivePosition.fromPosition( firstRange.start );\n\t\t\tleftLivePosition.stickiness = 'toPrevious';\n\n\t\t\tconst rightLivePosition = ModelLivePosition.fromPosition( firstRange.end );\n\t\t\trightLivePosition.stickiness = 'toNext';\n\n\t\t\tmodelDocument.once( 'change:data', () => {\n\t\t\t\tthis._embedMediaBetweenPositions( leftLivePosition, rightLivePosition );\n\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\n\t\tconst undoCommand: UndoCommand = editor.commands.get( 'undo' )!;\n\t\tundoCommand.on( 'execute', () => {\n\t\t\tif ( this._timeoutId ) {\n\t\t\t\tglobal.window.clearTimeout( this._timeoutId );\n\t\t\t\tthis._positionToInsert!.detach();\n\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Analyzes the part of the document between provided positions in search for a URL representing media.\n\t * When the URL is found, it is automatically converted into media.\n\t *\n\t * @param leftPosition Left position of the selection.\n\t * @param rightPosition Right position of the selection.\n\t */\n\tprivate _embedMediaBetweenPositions( leftPosition: ModelLivePosition, rightPosition: ModelLivePosition ): void {\n\t\tconst editor = this.editor;\n\t\tconst mediaRegistry = editor.plugins.get( MediaEmbedEditing ).registry;\n\t\t// TODO: Use marker instead of ModelLiveRange & LivePositions.\n\t\tconst urlRange = new ModelLiveRange( leftPosition, rightPosition );\n\t\tconst walker = urlRange.getWalker( { ignoreElementEnd: true } );\n\n\t\tlet url = '';\n\n\t\tfor ( const node of walker ) {\n\t\t\tif ( node.item.is( '$textProxy' ) ) {\n\t\t\t\turl += node.item.data;\n\t\t\t}\n\t\t}\n\n\t\turl = url.trim();\n\n\t\t// If the URL does not match to universal URL regexp, let's skip that.\n\t\tif ( !url.match( URL_REGEXP ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If the URL represents a media, let's use it.\n\t\tif ( !mediaRegistry.hasMedia( url ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaEmbedCommand: MediaEmbedCommand = editor.commands.get( 'mediaEmbed' )!;\n\n\t\t// Do not anything if media element cannot be inserted at the current position.\n\t\t// See https://github.com/ckeditor/ckeditor5-media-embed/issues/47.\n\t\tif ( !mediaEmbedCommand.isEnabled ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Position won't be available in the `setTimeout` function so let's clone it.\n\t\tthis._positionToInsert = ModelLivePosition.fromPosition( leftPosition );\n\n\t\t// This action mustn't be executed if undo was called between pasting and auto-embedding.\n\t\tthis._timeoutId = global.window.setTimeout( () => {\n\t\t\teditor.model.change( writer => {\n\t\t\t\tthis._timeoutId = null;\n\n\t\t\t\twriter.remove( urlRange );\n\t\t\t\turlRange.detach();\n\n\t\t\t\tlet insertionPosition: ModelLivePosition | null = null;\n\n\t\t\t\t// Check if position where the media element should be inserted is still valid.\n\t\t\t\t// Otherwise leave it as undefined to use document.selection - default behavior of model.insertContent().\n\t\t\t\tif ( this._positionToInsert!.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tinsertionPosition = this._positionToInsert;\n\t\t\t\t}\n\n\t\t\t\tinsertMedia( editor.model, url, insertionPosition, false );\n\n\t\t\t\tthis._positionToInsert!.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t} );\n\n\t\t\teditor.plugins.get( Delete ).requestUndoOnBackspace();\n\t\t}, 100 );\n\t}\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/**\n * @module media-embed/ui/mediaformview\n */\n\nimport {\n\ttype InputTextView,\n\tLabeledFieldView,\n\tView,\n\tcreateLabeledInputText,\n\tsubmitHandler\n} from '@ckeditor/ckeditor5-ui';\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The media form view controller class.\n *\n * See {@link module:media-embed/ui/mediaformview~MediaFormView}.\n */\nexport class MediaFormView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * The value of the URL input.\n\t */\n\tdeclare public mediaURLInputValue: string;\n\n\t/**\n\t * The URL input view.\n\t */\n\tpublic urlInputView: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * An array of form validators used by {@link #isValid}.\n\t */\n\tprivate readonly _validators: Array<( v: MediaFormView ) => string | undefined>;\n\n\t/**\n\t * The default info text for the {@link #urlInputView}.\n\t */\n\tprivate _urlInputViewInfoDefault?: string;\n\n\t/**\n\t * The info text with an additional tip for the {@link #urlInputView},\n\t * displayed when the input has some value.\n\t */\n\tprivate _urlInputViewInfoTip?: string;\n\n\t/**\n\t * @param validators Form validators used by {@link #isValid}.\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( validators: Array<( v: MediaFormView ) => string | undefined>, locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.set( 'mediaURLInputValue', '' );\n\t\tthis.urlInputView = this._createUrlInput();\n\n\t\tthis._validators = validators;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-media-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\t// Register the view in the focus tracker.\n\t\tthis.focusTracker.add( this.urlInputView.element! );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the {@link #urlInputView}.\n\t */\n\tpublic focus(): void {\n\t\tthis.urlInputView.focus();\n\t}\n\n\t/**\n\t * The native DOM `value` of the {@link #urlInputView} element.\n\t *\n\t * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t * which works one way only and may not represent the actual state of the component in the DOM.\n\t */\n\tpublic get url(): string {\n\t\treturn this.urlInputView.fieldView.element!.value.trim();\n\t}\n\n\tpublic set url( url: string ) {\n\t\tthis.urlInputView.fieldView.value = url.trim();\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\t// One error per field is enough.\n\t\t\tif ( errorText ) {\n\t\t\t\t// Apply updated error.\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tpublic resetFormStatus(): void {\n\t\tthis.urlInputView.errorText = null;\n\t\tthis.urlInputView.infoText = this._urlInputViewInfoDefault!;\n\t}\n\n\t/**\n\t * Creates a labeled input view.\n\t *\n\t * @returns Labeled input view instance.\n\t */\n\tprivate _createUrlInput(): LabeledFieldView<InputTextView> {\n\t\tconst t = this.locale!.t;\n\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\t\tconst inputField = labeledInput.fieldView;\n\n\t\tthis._urlInputViewInfoDefault = t( 'Paste the media URL in the input.' );\n\t\tthis._urlInputViewInfoTip = t( 'Tip: Paste the URL into the content to embed faster.' );\n\n\t\tlabeledInput.label = t( 'Media URL' );\n\t\tlabeledInput.infoText = this._urlInputViewInfoDefault;\n\n\t\tinputField.inputMode = 'url';\n\t\tinputField.on( 'input', () => {\n\t\t\t// Display the tip text only when there is some value. Otherwise fall back to the default info text.\n\t\t\tlabeledInput.infoText = inputField.element!.value ? this._urlInputViewInfoTip! : this._urlInputViewInfoDefault!;\n\t\t\tthis.mediaURLInputValue = inputField.element!.value.trim();\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\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/**\n * @module media-embed/mediaembedui\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { IconMedia } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, CssTransitionDisablerMixin, MenuBarMenuListItemButtonView, Dialog } from '@ckeditor/ckeditor5-ui';\n\nimport { MediaFormView } from './ui/mediaformview.js';\nimport { MediaEmbedEditing } from './mediaembedediting.js';\nimport type { LocaleTranslate } from '@ckeditor/ckeditor5-utils';\nimport { type MediaRegistry } from './mediaregistry.js';\n\n/**\n * The media embed UI plugin.\n */\nexport class MediaEmbedUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MediaEmbedEditing, Dialog ]> {\n\t\treturn [ MediaEmbedEditing, Dialog ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\tprivate _formView: MediaFormView | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( 'mediaEmbed', () => {\n\t\t\tconst t = this.editor.locale.t;\n\t\t\tconst button = this._createDialogButton( ButtonView );\n\n\t\t\tbutton.tooltip = true;\n\t\t\tbutton.label = t( 'Insert media' );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:mediaEmbed', () => {\n\t\t\tconst t = this.editor.locale.t;\n\t\t\tconst button = this._createDialogButton( MenuBarMenuListItemButtonView );\n\n\t\t\tbutton.label = t( 'Media' );\n\n\t\t\treturn button;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a button for menu bar that will show media embed dialog.\n\t */\n\tprivate _createDialogButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>( ButtonClass: T ): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst buttonView = new ButtonClass( editor.locale ) as InstanceType<T>;\n\t\tconst command = editor.commands.get( 'mediaEmbed' )!;\n\t\tconst dialogPlugin = this.editor.plugins.get( 'Dialog' );\n\n\t\tbuttonView.icon = IconMedia;\n\n\t\tbuttonView.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\tbuttonView.on( 'execute', () => {\n\t\t\tif ( dialogPlugin.id === 'mediaEmbed' ) {\n\t\t\t\tdialogPlugin.hide();\n\t\t\t} else {\n\t\t\t\tthis._showDialog();\n\t\t\t}\n\t\t} );\n\n\t\treturn buttonView;\n\t}\n\n\tprivate _showDialog() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get( 'Dialog' );\n\t\tconst command = editor.commands.get( 'mediaEmbed' )!;\n\t\tconst t = editor.locale.t;\n\n\t\tconst isMediaSelected = command.value !== undefined;\n\n\t\tif ( !this._formView ) {\n\t\t\tconst registry = editor.plugins.get( MediaEmbedEditing ).registry;\n\n\t\t\tthis._formView = new ( CssTransitionDisablerMixin( MediaFormView ) )( getFormValidators( editor.t, registry ), editor.locale );\n\t\t\tthis._formView.on( 'submit', () => this._handleSubmitForm() );\n\t\t}\n\n\t\tdialog.show( {\n\t\t\tid: 'mediaEmbed',\n\t\t\ttitle: t( 'Media embed' ),\n\t\t\tcontent: this._formView,\n\t\t\tisModal: true,\n\t\t\tonShow: () => {\n\t\t\t\tthis._formView!.url = command.value || '';\n\t\t\t\tthis._formView!.resetFormStatus();\n\t\t\t\tthis._formView!.urlInputView.fieldView.select();\n\t\t\t},\n\t\t\tactionButtons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Cancel' ),\n\t\t\t\t\twithText: true,\n\t\t\t\t\tonExecute: () => dialog.hide()\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: isMediaSelected ? t( 'Save' ) : t( 'Insert' ),\n\t\t\t\t\tclass: 'ck-button-action',\n\t\t\t\t\twithText: true,\n\t\t\t\t\tonExecute: () => this._handleSubmitForm()\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\tprivate _handleSubmitForm() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get( 'Dialog' );\n\n\t\tif ( this._formView!.isValid() ) {\n\t\t\teditor.execute( 'mediaEmbed', this._formView!.url );\n\t\t\tdialog.hide();\n\t\t\teditor.editing.view.focus();\n\t\t}\n\t}\n}\n\nfunction getFormValidators( t: LocaleTranslate, registry: MediaRegistry ): Array<( v: MediaFormView ) => string | undefined> {\n\treturn [\n\t\tform => {\n\t\t\tif ( !form.url.length ) {\n\t\t\t\treturn t( 'The URL must not be empty.' );\n\t\t\t}\n\t\t},\n\t\tform => {\n\t\t\tif ( !registry.hasMedia( form.url ) ) {\n\t\t\t\treturn t( 'This media URL is not supported.' );\n\t\t\t}\n\t\t}\n\t];\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/**\n * @module media-embed/mediaembed\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { Widget } from '@ckeditor/ckeditor5-widget';\n\nimport { MediaEmbedEditing } from './mediaembedediting.js';\nimport { AutoMediaEmbed } from './automediaembed.js';\nimport { MediaEmbedUI } from './mediaembedui.js';\n\n/**\n * The media embed plugin.\n *\n * For a detailed overview, check the {@glink features/media-embed/media-embed Media Embed feature documentation}.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * The {@link module:media-embed/mediaembedediting~MediaEmbedEditing media embed editing feature},\n * * The {@link module:media-embed/mediaembedui~MediaEmbedUI media embed UI feature} and\n * * The {@link module:media-embed/automediaembed~AutoMediaEmbed auto-media embed feature}.\n */\nexport class MediaEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MediaEmbedEditing, MediaEmbedUI, AutoMediaEmbed, Widget ]> {\n\t\treturn [ MediaEmbedEditing, MediaEmbedUI, AutoMediaEmbed, Widget ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbed' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module media-embed/mediaembedstyle/constants\n */\n\nimport {\n\tIconObjectCenter,\n\tIconObjectInlineLeft,\n\tIconObjectInlineRight,\n\tIconObjectLeft,\n\tIconObjectRight\n} from '@ckeditor/ckeditor5-icons';\nimport type { MediaStyleDropdownDefinition, NormalizedMediaStyleOption } from '../mediaembedconfig.js';\n\n/**\n * Built-in style options provided by the plugin. Integrators can refer to these by\n * name in {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n * to opt out, override individual fields, or coexist with custom styles.\n *\n * @internal\n */\nexport const DEFAULT_OPTIONS: Record<string, NormalizedMediaStyleOption> = {\n\talignLeft: {\n\t\tname: 'alignLeft',\n\t\ttitle: 'Left aligned media',\n\t\ticon: IconObjectInlineLeft,\n\t\tclassName: 'media-style-align-left'\n\t},\n\talignBlockLeft: {\n\t\tname: 'alignBlockLeft',\n\t\ttitle: 'Left aligned media',\n\t\ticon: IconObjectLeft,\n\t\tclassName: 'media-style-block-align-left'\n\t},\n\talignCenter: {\n\t\tname: 'alignCenter',\n\t\ttitle: 'Centered media',\n\t\ticon: IconObjectCenter,\n\t\tisDefault: true\n\t},\n\talignBlockRight: {\n\t\tname: 'alignBlockRight',\n\t\ttitle: 'Right aligned media',\n\t\ticon: IconObjectRight,\n\t\tclassName: 'media-style-block-align-right'\n\t},\n\talignRight: {\n\t\tname: 'alignRight',\n\t\ttitle: 'Right aligned media',\n\t\ticon: IconObjectInlineRight,\n\t\tclassName: 'media-style-align-right'\n\t}\n};\n\n/**\n * Short icon-name aliases that can be used as the `icon` value in a media style\n * option definition. Matches the alias set exposed by the image styles feature so\n * the two APIs feel symmetrical.\n *\n * @internal\n */\nexport const DEFAULT_ICONS: Record<string, string> = {\n\tinlineLeft: IconObjectInlineLeft,\n\tleft: IconObjectLeft,\n\tcenter: IconObjectCenter,\n\tright: IconObjectRight,\n\tinlineRight: IconObjectInlineRight\n};\n\n/**\n * Built-in dropdown groupings. Each entry references built-in style component names. If any\n * items are filtered out by configuration, the dropdown is rebuilt from the remaining names\n * (or skipped entirely if fewer than two remain).\n *\n * @internal\n */\nexport const DEFAULT_DROPDOWN_DEFINITIONS: Array<MediaStyleDropdownDefinition> = [\n\t{\n\t\tname: 'mediaEmbed:wrapText',\n\t\ttitle: 'Wrap text',\n\t\titems: [ 'mediaEmbed:alignLeft', 'mediaEmbed:alignRight' ],\n\t\tdefaultItem: 'mediaEmbed:alignLeft'\n\t},\n\t{\n\t\tname: 'mediaEmbed:breakText',\n\t\ttitle: 'Break text',\n\t\titems: [ 'mediaEmbed:alignBlockLeft', 'mediaEmbed:alignCenter', 'mediaEmbed:alignBlockRight' ],\n\t\tdefaultItem: 'mediaEmbed:alignCenter'\n\t}\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/**\n * @module media-embed/mediaembedstyle/utils\n */\n\nimport { logWarning } from '@ckeditor/ckeditor5-utils';\nimport type { ToolbarConfigItem } from '@ckeditor/ckeditor5-core';\nimport type {\n\tMediaStyleConfig,\n\tMediaStyleDropdownDefinition,\n\tMediaStyleOptionDefinition,\n\tNormalizedMediaStyleOption\n} from '../mediaembedconfig.js';\nimport { DEFAULT_ICONS, DEFAULT_OPTIONS } from './constants.js';\n\n/**\n * In-flight shape used inside the normalizer. After string-to-default resolution every entry\n * carries at least a `name`. The remaining required fields (`title`, `icon`, `className` unless\n * `isDefault`) are checked by {@link ~isValidOption} before the entry reaches the resolved list.\n */\ntype DraftStyle = Partial<MediaStyleOptionDefinition> & { name: string };\n\n/**\n * Normalizes the {@link module:media-embed/mediaembedconfig~MediaStyleConfig#options style options}\n * provided by the integrator. Each entry is resolved into a full\n * {@link module:media-embed/mediaembedconfig~MediaStyleOptionDefinition} and invalid entries\n * are filtered out with a console warning.\n *\n * @internal\n */\nexport function normalizeStyles( configuredStyles: MediaStyleConfig ): Array<NormalizedMediaStyleOption> {\n\tconst configured = configuredStyles.options || [];\n\n\treturn configured\n\t\t.map( entry => normalizeDefinition( entry ) )\n\t\t.filter( ( entry ): entry is NormalizedMediaStyleOption => isValidOption( entry ) );\n}\n\n/**\n * Resolves a single config entry into a style option definition. A string entry is first\n * promoted to its object form (`{ name }`) and then shallow-merged on top of the matching\n * built-in default — entries without a matching built-in pass through unchanged and are\n * rejected by {@link ~isValidOption} if they lack required fields.\n *\n * Also resolves icon-name aliases (`'left'`, `'inlineLeft'`, etc.) to the corresponding\n * SVG sources from {@link module:media-embed/mediaembedstyle/constants~DEFAULT_ICONS}.\n */\nfunction normalizeDefinition( entry: string | DraftStyle ): DraftStyle {\n\t// Spread of `undefined` is a no-op, so unknown-name overrides produce a clean passthrough.\n\tconst override: DraftStyle = typeof entry === 'string' ? { name: entry } : entry;\n\tconst definition: DraftStyle = { ...DEFAULT_OPTIONS[ override.name ], ...override };\n\n\tif ( typeof definition.icon === 'string' && DEFAULT_ICONS[ definition.icon ] ) {\n\t\tdefinition.icon = DEFAULT_ICONS[ definition.icon ];\n\t}\n\n\treturn definition;\n}\n\n/**\n * Validates a normalized style option. `name`, `title`, and `icon` are always required.\n * `className` is required unless the entry is the default style (defaults encode as\n * attribute-absence and intentionally have no class). Emits a console warning and returns\n * `false` when any of these checks fails.\n */\nfunction isValidOption( option: DraftStyle ): boolean {\n\tif ( !option.name || !option.title || !option.icon || ( !option.isDefault && !option.className ) ) {\n\t\twarnInvalidStyle( { style: option } );\n\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nfunction warnInvalidStyle( info: object ): void {\n\t/**\n\t * The media style configuration provided in the editor config is invalid. The warning is\n\t * emitted in two situations:\n\t *\n\t * * An entry in {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles.options`}\n\t *   does not reference a built-in style by name (`'alignLeft'`, `'alignBlockLeft'`,\n\t *   `'alignCenter'`, `'alignBlockRight'`, `'alignRight'`) and does not follow the\n\t *   {@link module:media-embed/mediaembedconfig~MediaStyleOptionDefinition} shape —\n\t *   `name`, `title`, `icon`, and (unless `isDefault: true`) `className` are required.\n\t *   The offending entry is reported under the `style` parameter.\n\t * * A dropdown entry placed inline in\n\t *   {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `config.mediaEmbed.toolbar`}\n\t *   does not follow the {@link module:media-embed/mediaembedconfig~MediaStyleDropdownDefinition} shape\n\t *   (`name` and every `items[]` entry must use the full `mediaEmbed:` prefix, `defaultItem` must\n\t *   be one of the `items`, `title` must be a non-empty string), or its `items[]` reference styles\n\t *   that are not in the resolved\n\t *   {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`} list.\n\t *   The offending entry is reported under the `dropdown` parameter.\n\t *\n\t * @error media-style-configuration-definition-invalid\n\t */\n\tlogWarning( 'media-style-configuration-definition-invalid', info );\n}\n\n/**\n * Type guard for toolbar config entries shaped like a media style dropdown definition. The\n * discriminator is `defaultItem` — generic toolbar groupings use `items` + `label` and never\n * carry a `defaultItem` field.\n *\n * @internal\n */\nexport function isMediaStyleDropdown(\n\titem: ToolbarConfigItem | MediaStyleDropdownDefinition\n): item is MediaStyleDropdownDefinition {\n\treturn typeof item === 'object' && item !== null && typeof ( item as MediaStyleDropdownDefinition ).defaultItem === 'string';\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/**\n * @module media-embed/mediaembedtoolbar\n */\n\nimport { Plugin, type PluginDependenciesOf, type ToolbarConfigItem } from '@ckeditor/ckeditor5-core';\nimport type { ComponentFactory } from '@ckeditor/ckeditor5-ui';\nimport { WidgetToolbarRepository } from '@ckeditor/ckeditor5-widget';\n\nimport { getSelectedMediaViewWidget } from './utils.js';\nimport { isMediaStyleDropdown } from './mediaembedstyle/utils.js';\nimport type { MediaStyleDropdownDefinition } from './mediaembedconfig.js';\n\n/**\n * The media embed toolbar plugin. It creates a toolbar for media embed that shows up when the media element is selected.\n *\n * Instances of toolbar components (e.g. buttons) are created based on the\n * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `media.toolbar` configuration option}.\n */\nexport class MediaEmbedToolbar extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ WidgetToolbarRepository ]> {\n\t\treturn [ WidgetToolbarRepository ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n\t\twidgetToolbarRepository.register( 'mediaEmbed', {\n\t\t\tariaLabel: t( 'Media toolbar' ),\n\t\t\titems: normalizeDeclarativeConfig(\n\t\t\t\teditor.ui.componentFactory,\n\t\t\t\teditor.config.get( 'mediaEmbed.toolbar' ) || []\n\t\t\t),\n\t\t\tgetRelatedElement: getSelectedMediaViewWidget\n\t\t} );\n\t}\n}\n\n/**\n * Flattens dropdown definitions to their factory names, dropping any `mediaEmbed:`-prefixed\n * name the style UI did not register — otherwise the toolbar crashes with `componentfactory-item-missing`.\n * Non-string entries (e.g. generic `{ label, items }` toolbar groupings) pass through unchanged.\n */\nfunction normalizeDeclarativeConfig(\n\tfactory: ComponentFactory,\n\tconfig: ReadonlyArray<ToolbarConfigItem | MediaStyleDropdownDefinition>\n): Array<ToolbarConfigItem> {\n\treturn config\n\t\t.map( item => isMediaStyleDropdown( item ) ? item.name : item )\n\t\t.filter( item =>\n\t\t\ttypeof item !== 'string' || !item.startsWith( 'mediaEmbed:' ) || factory.has( item )\n\t\t);\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/**\n * @module media-embed/mediaembedresize/resizemediaembedcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { getSelectedMediaModelWidget } from '../utils.js';\n\n/**\n * The resize media embed command.\n */\nexport class ResizeMediaEmbedCommand extends Command {\n\t/**\n\t * The current width of the selected media embed, or `null` if not resized.\n\t */\n\tdeclare public value: string | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst element = getSelectedMediaModelWidget( this.editor.model.document.selection );\n\n\t\tthis.isEnabled = !!element;\n\n\t\tif ( !element || !element.hasAttribute( 'resizedWidth' ) ) {\n\t\t\tthis.value = null;\n\t\t} else {\n\t\t\tthis.value = element.getAttribute( 'resizedWidth' ) as string;\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * ```ts\n\t * // Sets the width as a percentage of the parent width:\n\t * editor.execute( 'resizeMediaEmbed', { width: '50%' } );\n\t *\n\t * // Removes the resize and restores the default width:\n\t * editor.execute( 'resizeMediaEmbed', { width: null } );\n\t * ```\n\t *\n\t * @param options\n\t * @param options.width The new width of the media embed as a CSS `width` value\n\t * (e.g. `'50%'`), or `null` to remove the resize.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { width: string | null } ): void {\n\t\tconst model = this.editor.model;\n\t\tconst mediaElement = getSelectedMediaModelWidget( model.document.selection );\n\n\t\tif ( mediaElement ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setAttribute( 'resizedWidth', options.width, mediaElement );\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module media-embed/mediaembedresize/constants\n */\n\n/**\n * The view class applied to a resized media embed figure.\n *\n * Shared between the editing plugin (which toggles it via downcast of `resizedWidth` and consumes\n * it on upcast) and the handles plugin (which adds it during drag and strips it on commit), so\n * both layers agree on the exact class name.\n *\n * @internal\n */\nexport const RESIZED_MEDIA_CLASS = 'media_resized';\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/**\n * @module media-embed/mediaembedresize/mediaembedresizeediting\n */\n\nimport type { ViewElement } from '@ckeditor/ckeditor5-engine';\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { MediaEmbedEditing } from '../mediaembedediting.js';\nimport { ResizeMediaEmbedCommand } from './resizemediaembedcommand.js';\nimport { RESIZED_MEDIA_CLASS } from './constants.js';\n\n/**\n * The media embed resize editing feature.\n *\n * It adds the ability to resize each media embed using handles.\n */\nexport class MediaEmbedResizeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MediaEmbedEditing ]> {\n\t\treturn [ MediaEmbedEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedResizeEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'MER';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'mediaEmbed', {\n\t\t\tresizeUnit: '%',\n\t\t\tresizeOptions: [\n\t\t\t\t{ name: 'resizeMediaEmbed:original', value: null, icon: 'original' },\n\t\t\t\t{ name: 'resizeMediaEmbed:custom', value: 'custom', icon: 'custom' },\n\t\t\t\t{ name: 'resizeMediaEmbed:25', value: '25', icon: 'small' },\n\t\t\t\t{ name: 'resizeMediaEmbed:50', value: '50', icon: 'medium' },\n\t\t\t\t{ name: 'resizeMediaEmbed:75', value: '75', icon: 'large' }\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.commands.add( 'resizeMediaEmbed', new ResizeMediaEmbedCommand( editor ) );\n\n\t\tthis._registerConverters();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tthis._registerSchema();\n\t}\n\n\tprivate _registerSchema(): void {\n\t\tconst schema = this.editor.model.schema;\n\n\t\tschema.extend( 'media', { allowAttributes: [ 'resizedWidth' ] } );\n\t\tschema.setAttributeProperties( 'resizedWidth', { isFormatting: true } );\n\t}\n\n\t/**\n\t * Registers media embed resize converters.\n\t */\n\tprivate _registerConverters(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Downcast (model → view): resizedWidth → style.width + class on <figure>.\n\t\teditor.conversion.for( 'downcast' ).add( dispatcher =>\n\t\t\tdispatcher.on( 'attribute:resizedWidth:media', ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst figure = conversionApi.mapper.toViewElement( data.item );\n\n\t\t\t\tif ( data.attributeNewValue !== null ) {\n\t\t\t\t\tviewWriter.setStyle( 'width', data.attributeNewValue, figure );\n\t\t\t\t\tviewWriter.addClass( RESIZED_MEDIA_CLASS, figure );\n\t\t\t\t} else {\n\t\t\t\t\tviewWriter.removeStyle( 'width', figure );\n\t\t\t\t\tviewWriter.removeClass( RESIZED_MEDIA_CLASS, figure );\n\t\t\t\t}\n\t\t\t} )\n\t\t);\n\n\t\t// Upcast: style.width on <figure class=\"media\"> → resizedWidth.\n\t\t//\n\t\t// The `hasClass` guard lives in the value callback (not the matcher) because the `media`\n\t\t// class is already consumed upstream by MediaEmbedEditing. Without the guard, any figure\n\t\t// with a width style would match and could race image resize's upcast on image figures.\n\t\teditor.conversion.for( 'upcast' )\n\t\t\t.attributeToAttribute( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'figure',\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\twidth: /.+/\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: {\n\t\t\t\t\tkey: 'resizedWidth',\n\t\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\t\tif ( !viewElement.hasClass( 'media' ) ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn viewElement.getStyle( 'width' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t// Consume the media_resized class during upcast so it does not cause conversion issues.\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on( 'element:figure', ( evt, data, conversionApi ) => {\n\t\t\t\tconversionApi.consumable.consume( data.viewItem, { classes: [ RESIZED_MEDIA_CLASS ] } );\n\t\t\t} );\n\t\t} );\n\t}\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/**\n * @module media-embed/mediaembedresize/mediaembedresizehandles\n */\n\nimport type { ModelElement, ViewContainerElement } from '@ckeditor/ckeditor5-engine';\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { WidgetResize } from '@ckeditor/ckeditor5-widget';\nimport type { ResizeMediaEmbedCommand } from './resizemediaembedcommand.js';\nimport { RESIZED_MEDIA_CLASS } from './constants.js';\n\n/**\n * The media embed resize by handles feature.\n *\n * It adds the ability to resize each media embed using handles.\n */\nexport class MediaEmbedResizeHandles extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ WidgetResize ]> {\n\t\treturn [ WidgetResize ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedResizeHandles' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst command: ResizeMediaEmbedCommand = this.editor.commands.get( 'resizeMediaEmbed' )!;\n\t\tthis.bind( 'isEnabled' ).to( command );\n\n\t\tthis._setupResizerCreator();\n\t}\n\n\t/**\n\t * Attaches a resizer to every newly inserted media widget. Walks only the ranges\n\t * reported by the differ — never the whole document — so unrelated inserts (e.g.\n\t * pressing Enter to create a paragraph) cost only the differ check.\n\t *\n\t * Each resizer's `isEnabled` is bound to the plugin in {@link #_attachResizer},\n\t * so it auto-tracks the resize command's state.\n\t */\n\tprivate _setupResizerCreator(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst widgetResize = editor.plugins.get( WidgetResize );\n\n\t\t// Low priority ensures downcast has run before we look up view elements.\n\t\tthis.listenTo( model.document, 'change:data', () => {\n\t\t\tfor ( const change of model.document.differ.getChanges() ) {\n\t\t\t\tif ( change.type !== 'insert' || change.name === '$text' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst insertedRange = model.createRange(\n\t\t\t\t\tchange.position,\n\t\t\t\t\tchange.position.getShiftedBy( change.length )\n\t\t\t\t);\n\n\t\t\t\tfor ( const item of insertedRange.getItems() ) {\n\t\t\t\t\tif ( !item.is( 'element', 'media' ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst viewElement = editor.editing.mapper.toViewElement( item ) as ViewContainerElement | undefined;\n\n\t\t\t\t\t/* v8 ignore next -- @preserve */\n\t\t\t\t\tif ( !viewElement ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\tif ( !widgetResize.getResizerByViewElement( viewElement ) ) {\n\t\t\t\t\t\tthis._attachResizer( item, viewElement );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t}\n\n\t/**\n\t * Attaches a resizer to a single media widget.\n\t */\n\tprivate _attachResizer( modelElement: ModelElement, widgetView: ViewContainerElement ) {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\n\t\tconst resizer = editor.plugins.get( WidgetResize ).attachTo( {\n\t\t\tunit: editor.config.get( 'mediaEmbed.resizeUnit' )!,\n\t\t\tmodelElement,\n\t\t\tviewElement: widgetView,\n\t\t\teditor,\n\n\t\t\tgetHandleHost: domWidgetElement => domWidgetElement.querySelector( '.ck-media__wrapper' )!,\n\t\t\tgetResizeHost: domWidgetElement => domWidgetElement,\n\n\t\t\tonCommit: newValue => {\n\t\t\t\teditingView.change( writer => writer.removeClass( RESIZED_MEDIA_CLASS, widgetView ) );\n\t\t\t\teditor.execute( 'resizeMediaEmbed', { width: newValue } );\n\t\t\t}\n\t\t} );\n\n\t\tresizer.bind( 'isEnabled' ).to( this );\n\n\t\tresizer.on( 'updateSize', () => {\n\t\t\tif ( !widgetView.hasClass( RESIZED_MEDIA_CLASS ) ) {\n\t\t\t\teditingView.change( writer => writer.addClass( RESIZED_MEDIA_CLASS, widgetView ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Redraw once the view has flushed to DOM — otherwise the freshly inserted resizer\n\t\t// UIElement has no inline styles and handles cluster at the top-left corner (visible\n\t\t// after drag-and-drop until another event eventually triggers a redraw).\n\t\teditingView.once( 'render', () => resizer.redraw() );\n\t}\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/**\n * @module media-embed/mediaembedresize/mediaembedresizebuttons\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tButtonView,\n\tDropdownButtonView,\n\tUIModel,\n\tcreateDropdown,\n\taddListToDropdown,\n\ttype ListDropdownItemDefinition\n} from '@ckeditor/ckeditor5-ui';\nimport { CKEditorError, Collection, type Locale } from '@ckeditor/ckeditor5-utils';\nimport {\n\tIconObjectSizeCustom,\n\tIconObjectSizeFull,\n\tIconObjectSizeLarge,\n\tIconObjectSizeMedium,\n\tIconObjectSizeSmall\n} from '@ckeditor/ckeditor5-icons';\n\nimport { MediaEmbedResizeEditing } from './mediaembedresizeediting.js';\nimport type { ResizeMediaEmbedCommand } from './resizemediaembedcommand.js';\nimport type { MediaEmbedResizeOption } from '../mediaembedconfig.js';\n\nconst RESIZE_ICONS = /* #__PURE__ */ ( () => ( {\n\tsmall: IconObjectSizeSmall,\n\tmedium: IconObjectSizeMedium,\n\tlarge: IconObjectSizeLarge,\n\tcustom: IconObjectSizeCustom,\n\toriginal: IconObjectSizeFull\n} ) )();\n\n/**\n * The media embed resize buttons plugin.\n *\n * It adds a possibility to resize media embeds using the toolbar dropdown or individual buttons,\n * depending on the plugin configuration.\n */\nexport class MediaEmbedResizeButtons extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MediaEmbedResizeEditing ]> {\n\t\treturn [ MediaEmbedResizeEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedResizeButtons' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\tprivate readonly _resizeUnit: 'px' | '%';\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._resizeUnit = editor.config.get( 'mediaEmbed.resizeUnit' )!;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst options = editor.config.get( 'mediaEmbed.resizeOptions' )!;\n\t\tconst command: ResizeMediaEmbedCommand = editor.commands.get( 'resizeMediaEmbed' )!;\n\n\t\tthis.bind( 'isEnabled' ).to( command );\n\n\t\tfor ( const option of options ) {\n\t\t\tthis._registerMediaEmbedResizeButton( option );\n\t\t}\n\n\t\tthis._registerMediaEmbedResizeDropdown( options );\n\t}\n\n\t/**\n\t * Creates a standalone button component for the given resize option.\n\t */\n\tprivate _registerMediaEmbedResizeButton( option: MediaEmbedResizeOption ): void {\n\t\tconst editor = this.editor;\n\t\tconst { name, value, icon } = option;\n\n\t\teditor.ui.componentFactory.add( name, locale => {\n\t\t\tconst button = new ButtonView( locale );\n\t\t\tconst command: ResizeMediaEmbedCommand = editor.commands.get( 'resizeMediaEmbed' )!;\n\t\t\tconst labelText = this._getOptionLabelValue( option, true );\n\n\t\t\tif ( !RESIZE_ICONS[ icon as keyof typeof RESIZE_ICONS ] ) {\n\t\t\t\t/**\n\t\t\t\t * When configuring {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#resizeOptions\n\t\t\t\t * `config.mediaEmbed.resizeOptions`} for standalone buttons, a valid `icon` token must be set for each option.\n\t\t\t\t *\n\t\t\t\t * See all valid options described in the\n\t\t\t\t * {@link module:media-embed/mediaembedconfig~MediaEmbedResizeOption plugin configuration}.\n\t\t\t\t *\n\t\t\t\t * @error mediaembedresizebuttons-missing-icon\n\t\t\t\t * @param {module:media-embed/mediaembedconfig~MediaEmbedResizeOption} option Invalid media embed resize option.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t'mediaembedresizebuttons-missing-icon',\n\t\t\t\t\teditor,\n\t\t\t\t\toption\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tbutton.set( {\n\t\t\t\tlabel: labelText,\n\t\t\t\ticon: RESIZE_ICONS[ icon as keyof typeof RESIZE_ICONS ],\n\t\t\t\ttooltip: labelText,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\tbutton.bind( 'isEnabled' ).to( this );\n\n\t\t\tif ( editor.plugins.has( 'MediaEmbedCustomResizeUI' ) && isCustomMediaEmbedResizeOption( option ) ) {\n\t\t\t\tconst customResizeUI = editor.plugins.get( 'MediaEmbedCustomResizeUI' );\n\n\t\t\t\tthis.listenTo( button, 'execute', () => {\n\t\t\t\t\tcustomResizeUI._showForm( this._resizeUnit );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst optionValueWithUnit = value ? value + this._resizeUnit : null;\n\n\t\t\t\tbutton.bind( 'isOn' ).to(\n\t\t\t\t\tcommand, 'value',\n\t\t\t\t\tcommand, 'isEnabled',\n\t\t\t\t\tgetIsOnButtonCallback( optionValueWithUnit )\n\t\t\t\t);\n\n\t\t\t\tthis.listenTo( button, 'execute', () => {\n\t\t\t\t\teditor.execute( 'resizeMediaEmbed', { width: optionValueWithUnit } );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn button;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates the dropdown component containing all resize options.\n\t */\n\tprivate _registerMediaEmbedResizeDropdown( options: Array<MediaEmbedResizeOption> ): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst originalSizeOption = options.find( option => !option.value )!;\n\n\t\tconst componentCreator = ( locale: Locale ) => {\n\t\t\tconst command: ResizeMediaEmbedCommand = editor.commands.get( 'resizeMediaEmbed' )!;\n\t\t\tconst dropdownView = createDropdown( locale, DropdownButtonView );\n\t\t\tconst dropdownButton: typeof dropdownView.buttonView & { commandValue?: string | null } = dropdownView.buttonView;\n\t\t\tconst accessibleLabel = t( 'Resize media' );\n\n\t\t\tdropdownButton.set( {\n\t\t\t\ttooltip: accessibleLabel,\n\t\t\t\tcommandValue: originalSizeOption ? originalSizeOption.value : null,\n\t\t\t\ticon: RESIZE_ICONS.medium,\n\t\t\t\tisToggleable: true,\n\t\t\t\tlabel: originalSizeOption ? this._getOptionLabelValue( originalSizeOption ) : '',\n\t\t\t\twithText: true,\n\t\t\t\tclass: 'ck-resize-media-embed-button',\n\t\t\t\tariaLabel: accessibleLabel,\n\t\t\t\tariaLabelledBy: undefined\n\t\t\t} );\n\n\t\t\tdropdownButton.bind( 'label' ).to( command, 'value', commandValue => {\n\t\t\t\tif ( commandValue ) {\n\t\t\t\t\treturn commandValue;\n\t\t\t\t}\n\n\t\t\t\treturn originalSizeOption ? this._getOptionLabelValue( originalSizeOption ) : '';\n\t\t\t} );\n\t\t\tdropdownView.bind( 'isEnabled' ).to( this );\n\n\t\t\taddListToDropdown( dropdownView, () => this._getResizeDropdownListItemDefinitions( options, command ), {\n\t\t\t\tariaLabel: t( 'Media resize list' ),\n\t\t\t\trole: 'menu'\n\t\t\t} );\n\n\t\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\t\tif ( 'onClick' in evt.source ) {\n\t\t\t\t\t( evt.source as any ).onClick();\n\t\t\t\t} else {\n\t\t\t\t\teditor.execute( ( evt.source as any ).commandName, { width: ( evt.source as any ).commandValue } );\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t};\n\n\t\teditor.ui.componentFactory.add( 'resizeMediaEmbed', componentCreator );\n\t}\n\n\t/**\n\t * Returns a label for the given resize option.\n\t */\n\tprivate _getOptionLabelValue( option: MediaEmbedResizeOption, forTooltip: boolean = false ): string {\n\t\tconst t = this.editor.t;\n\n\t\tif ( option.label ) {\n\t\t\treturn option.label;\n\t\t}\n\n\t\tconst isCustom = isCustomMediaEmbedResizeOption( option );\n\n\t\tif ( forTooltip ) {\n\t\t\tif ( isCustom ) {\n\t\t\t\treturn t( 'Custom media size' );\n\t\t\t}\n\n\t\t\treturn option.value ?\n\t\t\t\tt( 'Resize media to %0', option.value + this._resizeUnit ) :\n\t\t\t\tt( 'Resize media to the original size' );\n\t\t}\n\n\t\tif ( isCustom ) {\n\t\t\treturn t( 'Custom' );\n\t\t}\n\n\t\treturn option.value ?\n\t\t\toption.value + this._resizeUnit :\n\t\t\tt( 'Original' );\n\t}\n\n\t/**\n\t * Returns list item definitions for the resize dropdown.\n\t */\n\tprivate _getResizeDropdownListItemDefinitions(\n\t\toptions: Array<MediaEmbedResizeOption>,\n\t\tcommand: ResizeMediaEmbedCommand\n\t): Collection<ListDropdownItemDefinition> {\n\t\tconst { editor } = this;\n\t\tconst itemDefinitions = new Collection<ListDropdownItemDefinition>();\n\n\t\tconst optionsWithSerializedValues = options.map( option => {\n\t\t\tif ( isCustomMediaEmbedResizeOption( option ) ) {\n\t\t\t\treturn {\n\t\t\t\t\t...option,\n\t\t\t\t\tvalueWithUnits: 'custom'\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif ( !option.value ) {\n\t\t\t\treturn {\n\t\t\t\t\t...option,\n\t\t\t\t\tvalueWithUnits: null\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...option,\n\t\t\t\tvalueWithUnits: `${ option.value }${ this._resizeUnit }`\n\t\t\t};\n\t\t} );\n\n\t\tfor ( const option of optionsWithSerializedValues ) {\n\t\t\tlet definition: ListDropdownItemDefinition | null;\n\n\t\t\tif ( editor.plugins.has( 'MediaEmbedCustomResizeUI' ) && isCustomMediaEmbedResizeOption( option ) ) {\n\t\t\t\tconst customResizeUI = editor.plugins.get( 'MediaEmbedCustomResizeUI' );\n\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: new UIModel( {\n\t\t\t\t\t\tlabel: this._getOptionLabelValue( option ),\n\t\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null,\n\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\tcustomResizeUI._showForm( this._resizeUnit );\n\t\t\t\t\t\t}\n\t\t\t\t\t} )\n\t\t\t\t};\n\n\t\t\t\tconst allDropdownValues = Object.values( optionsWithSerializedValues ).map( option => option.valueWithUnits );\n\n\t\t\t\tdefinition.model.bind( 'isOn' ).to(\n\t\t\t\t\tcommand, 'value',\n\t\t\t\t\tcommand, 'isEnabled',\n\t\t\t\t\tgetIsOnCustomButtonCallback( allDropdownValues )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdefinition = {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: new UIModel( {\n\t\t\t\t\t\tcommandName: 'resizeMediaEmbed',\n\t\t\t\t\t\tcommandValue: option.valueWithUnits,\n\t\t\t\t\t\tlabel: this._getOptionLabelValue( option ),\n\t\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\t\twithText: true,\n\t\t\t\t\t\ticon: null\n\t\t\t\t\t} )\n\t\t\t\t};\n\n\t\t\t\tdefinition.model.bind( 'isOn' ).to(\n\t\t\t\t\tcommand, 'value',\n\t\t\t\t\tcommand, 'isEnabled',\n\t\t\t\t\tgetIsOnButtonCallback( option.valueWithUnits )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tdefinition.model.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\t\titemDefinitions.add( definition );\n\t\t}\n\n\t\treturn itemDefinitions;\n\t}\n}\n\nfunction isCustomMediaEmbedResizeOption( option: MediaEmbedResizeOption ) {\n\treturn option.value === 'custom';\n}\n\nfunction getIsOnButtonCallback( value: string | null ) {\n\treturn ( commandValue: ResizeMediaEmbedCommand['value'], isEnabled: boolean ): boolean => {\n\t\tif ( commandValue === undefined || !isEnabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn commandValue === value;\n\t};\n}\n\nfunction getIsOnCustomButtonCallback( allDropdownValues: Array<string | null> ) {\n\treturn ( commandValue: ResizeMediaEmbedCommand['value'], isEnabled: boolean ): boolean => !allDropdownValues.some(\n\t\tdropdownValue => getIsOnButtonCallback( dropdownValue )( commandValue, isEnabled )\n\t);\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/**\n * @module media-embed/mediaembedresize/utils/getselectedmediaembededitornodes\n */\n\nimport type { ViewElement, ModelElement } from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { getSelectedMediaModelWidget } from '../../utils.js';\n\n/**\n * Finds model, view and DOM element for selected media embed element.\n * Returns `null` if there is no media embed selected.\n *\n * @param editor Editor instance.\n * @internal\n */\nexport function getSelectedMediaEmbedEditorNodes( editor: Editor ): MediaEmbedEditorNodes | null {\n\tconst { editing } = editor;\n\n\tconst mediaModelElement = getSelectedMediaModelWidget( editor.model.document.selection );\n\n\tif ( !mediaModelElement ) {\n\t\treturn null;\n\t}\n\n\tconst mediaViewElement = editing.mapper.toViewElement( mediaModelElement )!;\n\tconst mediaDOMElement = editing.view.domConverter.mapViewToDom( mediaViewElement )!;\n\n\treturn {\n\t\tmodel: mediaModelElement,\n\t\tview: mediaViewElement,\n\t\tdom: mediaDOMElement\n\t};\n}\n\ntype MediaEmbedEditorNodes = {\n\tmodel: ModelElement;\n\tview: ViewElement;\n\tdom: HTMLElement;\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/**\n * @module media-embed/mediaembedresize/utils/getselectedmediaembedwidthinunits\n */\n\nimport { Rect, _tryCastDimensionsToUnit, _tryParseDimensionWithUnit, type _DimensionWithUnit } from '@ckeditor/ckeditor5-utils';\nimport { calculateResizeHostAncestorWidth } from '@ckeditor/ckeditor5-widget';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { getSelectedMediaEmbedEditorNodes } from './getselectedmediaembededitornodes.js';\n\n/**\n * Returns media embed width in specified units after resize.\n *\n * \t* If no media embed is selected or command is disabled, `null` will be returned.\n *\t* If `targetUnit` percentage is passed then it will return width percentage relative to its ancestor.\n *\n * @param editor Editor instance.\n * @param targetUnit Unit in which dimension will be returned.\n * @returns Parsed media embed width after resize (with unit).\n * @internal\n */\nexport function getSelectedMediaEmbedWidthInUnits( editor: Editor, targetUnit: string ): _DimensionWithUnit | null {\n\tconst mediaNodes = getSelectedMediaEmbedEditorNodes( editor );\n\n\tif ( !mediaNodes ) {\n\t\treturn null;\n\t}\n\n\tconst parsedResizedWidth = _tryParseDimensionWithUnit(\n\t\tmediaNodes.model.getAttribute( 'resizedWidth' ) as string || null\n\t);\n\n\tif ( !parsedResizedWidth ) {\n\t\treturn null;\n\t}\n\n\tif ( parsedResizedWidth.unit === targetUnit ) {\n\t\treturn parsedResizedWidth;\n\t}\n\n\tconst mediaParentWidthPx = calculateResizeHostAncestorWidth( mediaNodes.dom );\n\tconst mediaHolderDimension = {\n\t\tunit: 'px',\n\t\tvalue: new Rect( mediaNodes.dom ).width\n\t};\n\n\treturn _tryCastDimensionsToUnit( mediaParentWidthPx, mediaHolderDimension, targetUnit );\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/**\n * @module media-embed/mediaembedresize/utils/getselectedmediaembedpossibleresizerange\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { calculateResizeHostAncestorWidth } from '@ckeditor/ckeditor5-widget';\nimport { _tryCastDimensionsToUnit, _tryParseDimensionWithUnit } from '@ckeditor/ckeditor5-utils';\n\nimport { getSelectedMediaEmbedEditorNodes } from './getselectedmediaembededitornodes.js';\n\n/**\n * Returns the min and max resize values for the selected media embed in the specified unit.\n *\n * @param editor Editor instance.\n * @param targetUnit Unit in which dimension will be returned.\n * @returns Possible resize range in numeric form.\n * @internal\n */\nexport function getSelectedMediaEmbedPossibleResizeRange( editor: Editor, targetUnit: string ): PossibleResizeMediaEmbedRange | null {\n\tconst mediaNodes = getSelectedMediaEmbedEditorNodes( editor );\n\n\tif ( !mediaNodes ) {\n\t\treturn null;\n\t}\n\n\tconst mediaParentWidthPx = calculateResizeHostAncestorWidth( mediaNodes.dom );\n\tconst minimumMediaWidth = _tryParseDimensionWithUnit( window.getComputedStyle( mediaNodes.dom ).minWidth ) || {\n\t\tvalue: 1,\n\t\tunit: 'px'\n\t};\n\n\tconst lower = Math.max( 0.1, _tryCastDimensionsToUnit( mediaParentWidthPx, minimumMediaWidth, targetUnit ).value );\n\tconst upper = targetUnit === 'px' ? mediaParentWidthPx : 100;\n\n\treturn {\n\t\tunit: targetUnit,\n\t\tlower,\n\t\tupper\n\t};\n}\n\n/**\n * @internal\n */\nexport type PossibleResizeMediaEmbedRange = {\n\tunit: string;\n\tlower: number;\n\tupper: number;\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/**\n * @module media-embed/mediaembedresize/ui/mediaembedcustomresizeformview\n */\n\nimport {\n\tButtonView,\n\tFocusCycler,\n\tFormHeaderView,\n\tFormRowView,\n\tLabeledFieldView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputNumber,\n\tsubmitHandler,\n\ttype FocusableView,\n\ttype InputNumberView\n} from '@ckeditor/ckeditor5-ui';\n\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\nimport { IconPreviousArrow } from '@ckeditor/ckeditor5-icons';\n\n/**\n * The MediaEmbedCustomResizeFormView class.\n *\n * @internal\n */\nexport class MediaEmbedCustomResizeFormView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Resize unit shortcut.\n\t */\n\tpublic readonly unit: string;\n\n\t/**\n\t * The Back button view displayed in the header.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * A button used to submit the form.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * An input with a label.\n\t */\n\tpublic labeledInput: LabeledFieldView<InputNumberView>;\n\n\t/**\n\t * A collection of child views.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A collection of views which can be focused in the form.\n\t */\n\tprotected readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprotected readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * An array of form validators used by {@link #isValid}.\n\t */\n\tprivate readonly _validators: Array<MediaEmbedCustomResizeFormValidatorCallback>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale, unit: string, validators: Array<MediaEmbedCustomResizeFormValidatorCallback> ) {\n\t\tsuper( locale );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.unit = unit;\n\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis.saveButtonView = this._createSaveButton();\n\t\tthis.labeledInput = this._createLabeledInputView();\n\n\t\tthis.children = this.createCollection( [ this._createHeaderView() ] );\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\tthis.labeledInput,\n\t\t\t\tthis.saveButtonView\n\t\t\t],\n\t\t\tclass: [\n\t\t\t\t'ck-form__row_with-submit',\n\t\t\t\t'ck-form__row_large-top-padding'\n\t\t\t]\n\t\t} ) );\n\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._validators = validators;\n\n\t\tthis.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis.fire<MediaEmbedCustomResizeFormViewCancelEvent>( 'cancel' );\n\t\t\tcancel();\n\t\t} );\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: 'shift + tab',\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form',\n\t\t\t\t\t'ck-media-embed-custom-resize-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-image/issues/40\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.backButtonView,\n\t\t\tthis.labeledInput,\n\t\t\tthis.saveButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\tthis._focusables.add( v );\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn backButton;\n\t}\n\n\tprivate _createSaveButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst saveButton = new ButtonView( this.locale );\n\n\t\tsaveButton.set( {\n\t\t\tlabel: t( 'Save' ),\n\t\t\twithText: true,\n\t\t\ttype: 'submit',\n\t\t\tclass: 'ck-button-action ck-button-bold'\n\t\t} );\n\n\t\treturn saveButton;\n\t}\n\n\tprivate _createHeaderView(): FormHeaderView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst header = new FormHeaderView( this.locale, {\n\t\t\tlabel: t( 'Media Resize' )\n\t\t} );\n\n\t\theader.children.add( this.backButtonView, 0 );\n\n\t\treturn header;\n\t}\n\n\tprivate _createLabeledInputView(): LabeledFieldView<InputNumberView> {\n\t\tconst t = this.locale!.t;\n\t\tconst labeledInput = new LabeledFieldView<InputNumberView>( this.locale, createLabeledInputNumber );\n\n\t\tlabeledInput.label = t( 'Resize media (in %0)', this.unit );\n\t\tlabeledInput.class = 'ck-labeled-field-view_full-width';\n\t\tlabeledInput.fieldView.set( {\n\t\t\tmin: 0.1,\n\t\t\tstep: 0.1\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\tif ( errorText ) {\n\t\t\t\tthis.labeledInput.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up error and information text of {@link #labeledInput}.\n\t */\n\tpublic resetFormStatus(): void {\n\t\tthis.labeledInput.errorText = null;\n\t}\n\n\t/**\n\t * The native DOM `value` of the input element of {@link #labeledInput}.\n\t */\n\tpublic get rawSize(): string | null {\n\t\tconst { element } = this.labeledInput.fieldView;\n\n\t\tif ( !element ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn element.value;\n\t}\n\n\t/**\n\t * Get numeric value of size. Returns `null` if value is not a number.\n\t */\n\tpublic get parsedSize(): number | null {\n\t\tconst { rawSize } = this;\n\n\t\tif ( rawSize === null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst parsed = Number.parseFloat( rawSize );\n\n\t\tif ( Number.isNaN( parsed ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn parsed;\n\t}\n\n\t/**\n\t * Returns serialized media embed input size with unit.\n\t * Returns `null` if value is not a number.\n\t */\n\tpublic get sizeWithUnits(): string | null {\n\t\tconst { parsedSize, unit } = this;\n\n\t\tif ( parsedSize === null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn `${ parsedSize }${ unit }`;\n\t}\n}\n\n/**\n * Callback used by {@link ~MediaEmbedCustomResizeFormView} to check if passed form value is valid.\n *\n * @internal\n */\nexport type MediaEmbedCustomResizeFormValidatorCallback = ( form: MediaEmbedCustomResizeFormView ) => string | undefined;\n\n/**\n * Fired when the form view is submitted.\n *\n * @eventName ~MediaEmbedCustomResizeFormView#submit\n */\nexport type MediaEmbedCustomResizeFormViewSubmitEvent = {\n\tname: 'submit';\n\targs: [];\n};\n\n/**\n * Fired when the form view is canceled.\n *\n * @eventName ~MediaEmbedCustomResizeFormView#cancel\n */\nexport type MediaEmbedCustomResizeFormViewCancelEvent = {\n\tname: 'cancel';\n\targs: [];\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/**\n * @module media-embed/mediaembedresize/mediaembedcustomresizeui\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tContextualBalloon,\n\tBalloonPanelView,\n\tclickOutsideHandler,\n\tCssTransitionDisablerMixin,\n\ttype ViewWithCssTransitionDisabler\n} from '@ckeditor/ckeditor5-ui';\nimport type { DomOptimalPositionOptions } from '@ckeditor/ckeditor5-utils';\n\nimport { getSelectedMediaViewWidget } from '../utils.js';\nimport { getSelectedMediaEmbedWidthInUnits } from './utils/getselectedmediaembedwidthinunits.js';\nimport { getSelectedMediaEmbedPossibleResizeRange } from './utils/getselectedmediaembedpossibleresizerange.js';\n\nimport {\n\tMediaEmbedCustomResizeFormView,\n\ttype MediaEmbedCustomResizeFormValidatorCallback,\n\ttype MediaEmbedCustomResizeFormViewCancelEvent,\n\ttype MediaEmbedCustomResizeFormViewSubmitEvent\n} from './ui/mediaembedcustomresizeformview.js';\n\n/**\n * The custom resize media embed UI plugin.\n *\n * The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n */\nexport class MediaEmbedCustomResizeUI extends Plugin {\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon?: ContextualBalloon;\n\n\t/**\n\t * A form used to set the custom resize width.\n\t */\n\tprivate _form?: MediaEmbedCustomResizeFormView & ViewWithCssTransitionDisabler;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedCustomResizeUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tif ( this._form ) {\n\t\t\tthis._form.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the {@link module:media-embed/mediaembedresize/ui/mediaembedcustomresizeformview~MediaEmbedCustomResizeFormView} form.\n\t */\n\tprivate _createForm( unit: string ): void {\n\t\tconst editor = this.editor;\n\n\t\tthis._balloon = this.editor.plugins.get( 'ContextualBalloon' );\n\n\t\tconst FormViewClass = CssTransitionDisablerMixin( MediaEmbedCustomResizeFormView );\n\n\t\tthis._form = new FormViewClass( editor.locale, unit, getFormValidators( editor ) );\n\n\t\tthis._form.render();\n\n\t\tthis.listenTo<MediaEmbedCustomResizeFormViewSubmitEvent>( this._form, 'submit', () => {\n\t\t\tif ( this._form!.isValid() ) {\n\t\t\t\teditor.execute( 'resizeMediaEmbed', {\n\t\t\t\t\twidth: this._form!.sizeWithUnits\n\t\t\t\t} );\n\n\t\t\t\tthis._hideForm( true );\n\t\t\t}\n\t\t} );\n\n\t\tthis.listenTo( this._form.labeledInput, 'change:errorText', () => {\n\t\t\teditor.ui.update();\n\t\t} );\n\n\t\tthis.listenTo<MediaEmbedCustomResizeFormViewCancelEvent>( this._form, 'cancel', () => {\n\t\t\tthis._hideForm( true );\n\t\t} );\n\n\t\tclickOutsideHandler( {\n\t\t\temitter: this._form,\n\t\t\tactivator: () => this._isVisible,\n\t\t\tcontextElements: () => [ this._balloon!.view.element! ],\n\t\t\tcallback: () => this._hideForm()\n\t\t} );\n\t}\n\n\t/**\n\t * Shows the {@link #_form} in the {@link #_balloon}.\n\t *\n\t * @internal\n\t */\n\tpublic _showForm( unit: string ): void {\n\t\tif ( this._isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._form ) {\n\t\t\tthis._createForm( unit );\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst labeledInput = this._form!.labeledInput;\n\n\t\tthis._form!.disableCssTransitions();\n\t\tthis._form!.resetFormStatus();\n\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( !this._isInBalloon ) {\n\t\t\tthis._balloon!.add( {\n\t\t\t\tview: this._form!,\n\t\t\t\tposition: getBalloonPositionData( editor )\n\t\t\t} );\n\t\t}\n\n\t\tconst currentParsedWidth = getSelectedMediaEmbedWidthInUnits( editor, unit );\n\t\tconst initialInputValue = currentParsedWidth ? currentParsedWidth.value.toFixed( 1 ) : '';\n\t\tconst possibleRange = getSelectedMediaEmbedPossibleResizeRange( editor, unit );\n\n\t\tlabeledInput.fieldView.value = labeledInput.fieldView.element!.value = initialInputValue;\n\n\t\tif ( possibleRange ) {\n\t\t\tObject.assign( labeledInput.fieldView, {\n\t\t\t\tmin: possibleRange.lower.toFixed( 1 ),\n\t\t\t\tmax: Math.ceil( possibleRange.upper ).toFixed( 1 )\n\t\t\t} );\n\t\t}\n\n\t\tthis._form!.labeledInput.fieldView.select();\n\t\tthis._form!.enableCssTransitions();\n\t}\n\n\t/**\n\t * Removes the {@link #_form} from the {@link #_balloon}.\n\t *\n\t * @param focusEditable Controls whether the editing view is focused afterwards.\n\t */\n\tprivate _hideForm( focusEditable: boolean = false ): void {\n\t\tif ( !this._isInBalloon ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._form!.focusTracker.isFocused ) {\n\t\t\tthis._form!.saveButtonView.focus();\n\t\t}\n\n\t\tthis._balloon!.remove( this._form! );\n\n\t\tif ( focusEditable ) {\n\t\t\tthis.editor.editing.view.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t */\n\tprivate get _isVisible(): boolean {\n\t\treturn !!this._balloon && this._balloon.visibleView === this._form;\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t */\n\tprivate get _isInBalloon(): boolean {\n\t\treturn !!this._balloon && this._balloon.hasView( this._form! );\n\t}\n}\n\nfunction getBalloonPositionData( editor: Editor ): Partial<DomOptimalPositionOptions> {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\n\treturn {\n\t\ttarget: editingView.domConverter.mapViewToDom(\n\t\t\tgetSelectedMediaViewWidget( editingView.document.selection )!\n\t\t) as HTMLElement,\n\t\tpositions: [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\tdefaultPositions.viewportStickyNorth\n\t\t]\n\t};\n}\n\nfunction getFormValidators( editor: Editor ): Array<MediaEmbedCustomResizeFormValidatorCallback> {\n\tconst t = editor.t;\n\n\treturn [\n\t\tform => {\n\t\t\tif ( form.rawSize!.trim() === '' ) {\n\t\t\t\treturn t( 'The value must not be empty.' );\n\t\t\t}\n\n\t\t\tif ( form.parsedSize === null ) {\n\t\t\t\treturn t( 'The value should be a plain number.' );\n\t\t\t}\n\t\t}\n\t];\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/**\n * @module media-embed/mediaembedresize\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { MediaEmbedResizeEditing } from './mediaembedresize/mediaembedresizeediting.js';\nimport { MediaEmbedResizeHandles } from './mediaembedresize/mediaembedresizehandles.js';\nimport { MediaEmbedResizeButtons } from './mediaembedresize/mediaembedresizebuttons.js';\nimport { MediaEmbedCustomResizeUI } from './mediaembedresize/mediaembedcustomresizeui.js';\n\n/**\n * The media embed resize plugin.\n *\n * It adds a possibility to resize each media embed using handles, toolbar buttons,\n * or a balloon-hosted custom-width input.\n */\nexport class MediaEmbedResize extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[\n\t\tMediaEmbedResizeEditing,\n\t\tMediaEmbedResizeHandles,\n\t\tMediaEmbedCustomResizeUI,\n\t\tMediaEmbedResizeButtons\n\t]> {\n\t\treturn [\n\t\t\tMediaEmbedResizeEditing,\n\t\t\tMediaEmbedResizeHandles,\n\t\t\tMediaEmbedCustomResizeUI,\n\t\t\tMediaEmbedResizeButtons\n\t\t];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedResize' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module media-embed/mediaembedstyle/mediaembedstylecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { getSelectedMediaModelWidget } from '../utils.js';\nimport type { NormalizedMediaStyleOption } from '../mediaembedconfig.js';\n\n/**\n * The media embed style command. It is used to apply a style option (e.g. an alignment) to a\n * selected media embed.\n *\n * The set of accepted style values comes from the resolved\n * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n * options. Values not in that set are silently rejected by {@link #execute}.\n */\nexport class MediaEmbedStyleCommand extends Command {\n\t/**\n\t * The currently-applied style name. `false` when no style applies — either no media is\n\t * selected, or the selected media has no `mediaStyle` attribute and no style in\n\t * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n\t * is marked `isDefault: true`.\n\t */\n\tdeclare public value: string | false;\n\n\t/**\n\t * Resolved styles indexed by `name`. Used to look up the `isDefault` flag at execute time\n\t * (any default-marked style clears the attribute) and to validate that a requested style\n\t * is part of the resolved options list.\n\t */\n\tprivate readonly _styles: Map<string, NormalizedMediaStyleOption>;\n\n\t/**\n\t * The `name` of the first style with `isDefault: true` in the resolved options, or `null`\n\t * when the integrator did not designate a default. Exposed via {@link #value} when the\n\t * selected media has no `mediaStyle` attribute, so the default-state UI button can light up.\n\t * Does not gate the \"clear attribute\" branch in {@link #execute} — that uses the per-style\n\t * `isDefault` flag so multi-default configs behave consistently with the downcast.\n\t */\n\tprivate readonly _defaultStyleName: string | null;\n\n\t/**\n\t * Creates an instance of the media embed style command.\n\t *\n\t * @param editor The editor instance.\n\t * @param styles The resolved list of style options that this command will accept.\n\t */\n\tconstructor( editor: Editor, styles: Array<NormalizedMediaStyleOption> ) {\n\t\tsuper( editor );\n\n\t\tthis._styles = new Map( styles.map( style => [ style.name, style ] ) );\n\n\t\tconst defaultStyle = styles.find( style => style.isDefault );\n\n\t\tthis._defaultStyleName = defaultStyle ? defaultStyle.name : null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst element = getSelectedMediaModelWidget( this.editor.model.document.selection );\n\n\t\tthis.isEnabled = !!element;\n\n\t\tif ( !element ) {\n\t\t\tthis.value = false;\n\t\t} else if ( element.hasAttribute( 'mediaStyle' ) ) {\n\t\t\tconst styleName = element.getAttribute( 'mediaStyle' ) as string;\n\n\t\t\t// A previously-applied style may have been dropped from the resolved options list\n\t\t\t// (e.g. by a config change). Fall back to the effective default so the UI stays\n\t\t\t// consistent with what the downcast actually renders (no class for unknown names).\n\t\t\tthis.value = this._styles.has( styleName ) ? styleName : ( this._defaultStyleName ?? false );\n\t\t} else {\n\t\t\tthis.value = this._defaultStyleName ?? false;\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command and applies the chosen style to the currently selected media embed.\n\t *\n\t * ```ts\n\t * editor.execute( 'mediaStyle', { value: 'alignLeft' } );\n\t * editor.execute( 'mediaStyle', { value: 'alignCenter' } ); // removes the attribute — alignCenter is the built-in default\n\t * editor.execute( 'mediaStyle', { value: null } );          // removes the attribute\n\t * ```\n\t *\n\t * The default style is encoded on the model as the absence of the `mediaStyle` attribute.\n\t * Passing any `isDefault: true` style name (or `null`) therefore clears the attribute. Values\n\t * that are neither falsy, an `isDefault` style, nor present in the resolved options list are\n\t * silently rejected.\n\t *\n\t * @param options\n\t * @param options.value The name of the style to apply, or `null` to clear the alignment.\n\t * @fires execute\n\t */\n\tpublic override execute( options: { value: string | null } ): void {\n\t\tconst model = this.editor.model;\n\t\tconst element = getSelectedMediaModelWidget( model.document.selection )!;\n\t\tconst requestedStyle = options.value;\n\n\t\t// Falsy value or any `isDefault: true` style clears the attribute. Default styles encode\n\t\t// as attribute-absence on the model. The downcast emits no class for them.\n\t\tif ( !requestedStyle || this._styles.get( requestedStyle )?.isDefault ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.removeAttribute( 'mediaStyle', element );\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Reject names that are not part of the resolved options list.\n\t\tif ( !this._styles.has( requestedStyle ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setAttribute( 'mediaStyle', requestedStyle, element );\n\t\t} );\n\t}\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/**\n * @module media-embed/mediaembedstyle/mediaembedstyleediting\n */\n\nimport { first } from '@ckeditor/ckeditor5-utils';\nimport type { UpcastElementEvent } from '@ckeditor/ckeditor5-engine';\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { MediaEmbedEditing } from '../mediaembedediting.js';\nimport { MediaEmbedStyleCommand } from './mediaembedstylecommand.js';\nimport type { NormalizedMediaStyleOption } from '../mediaembedconfig.js';\nimport { DEFAULT_OPTIONS } from './constants.js';\nimport { normalizeStyles } from './utils.js';\n\n/**\n * The media embed style engine plugin. It extends the schema with the `mediaStyle` attribute,\n * registers the {@link module:media-embed/mediaembedstyle/mediaembedstylecommand~MediaEmbedStyleCommand} command,\n * and adds the converters that apply alignment CSS classes to the figure.\n */\nexport class MediaEmbedStyleEditing extends Plugin {\n\t/**\n\t * The resolved list of media style options. Built once from\n\t * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n\t * during {@link #init} and consumed by both the command and the UI plugin (single source of truth).\n\t *\n\t * @internal\n\t * @readonly\n\t */\n\tpublic normalizedStyles!: Array<NormalizedMediaStyleOption>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MediaEmbedEditing ]> {\n\t\treturn [ MediaEmbedEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedStyleEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\teditor.config.define( 'mediaEmbed.styles', { options: Object.keys( DEFAULT_OPTIONS ) } );\n\n\t\tthis.normalizedStyles = normalizeStyles( editor.config.get( 'mediaEmbed.styles' )! );\n\n\t\tschema.extend( 'media', { allowAttributes: [ 'mediaStyle' ] } );\n\t\tschema.setAttributeProperties( 'mediaStyle', { isFormatting: true } );\n\n\t\teditor.commands.add( 'mediaStyle', new MediaEmbedStyleCommand( editor, this.normalizedStyles ) );\n\n\t\tthis._registerConverters();\n\t}\n\n\t/**\n\t * Registers the downcast and upcast converters for the `mediaStyle` attribute.\n\t */\n\tprivate _registerConverters(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Runtime lookup of style `name` → CSS `className`. Excludes the default style, which is\n\t\t// encoded as the absence of the attribute (no class). Iteration order follows the configured\n\t\t// options order — the upcast relies on this so the last matching class wins on a figure\n\t\t// that has multiple alignment classes.\n\t\tconst styleClassMap = new Map(\n\t\t\tthis.normalizedStyles\n\t\t\t\t.filter( style => !style.isDefault && style.className )\n\t\t\t\t.map( style => [ style.name, style.className! ] )\n\t\t);\n\n\t\t// Downcast: `mediaStyle` → CSS class on the <figure>. Covers both editing and data pipelines.\n\t\teditor.conversion.for( 'downcast' ).add( dispatcher =>\n\t\t\tdispatcher.on( 'attribute:mediaStyle:media', ( evt, data, conversionApi ) => {\n\t\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst figure = conversionApi.mapper.toViewElement( data.item )!;\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tconst oldClass = styleClassMap.get( data.attributeOldValue as string );\n\t\t\t\tconst newClass = styleClassMap.get( data.attributeNewValue as string );\n\n\t\t\t\tif ( oldClass ) {\n\t\t\t\t\tviewWriter.removeClass( oldClass, figure );\n\t\t\t\t}\n\n\t\t\t\tif ( newClass ) {\n\t\t\t\t\tviewWriter.addClass( newClass, figure );\n\t\t\t\t}\n\t\t\t} )\n\t\t);\n\n\t\t// Upcast: alignment class on a media <figure> → `mediaStyle` attribute. Runs at `low`\n\t\t// priority so the main media upcast creates the `media` model element first.\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on<UpcastElementEvent>( 'element:figure', ( _evt, data, conversionApi ) => {\n\t\t\t\tif ( !data.modelRange ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst modelElement = first( data.modelRange.getItems() );\n\n\t\t\t\tif ( !modelElement || !modelElement.is( 'element', 'media' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Iterate in insertion order — last consumed class wins when multiple\n\t\t\t\t// alignment classes are present on the same figure.\n\t\t\t\tfor ( const [ styleName, className ] of styleClassMap ) {\n\t\t\t\t\tif ( conversionApi.consumable.consume( data.viewItem, { classes: className } ) ) {\n\t\t\t\t\t\tconversionApi.writer.setAttribute( 'mediaStyle', styleName, modelElement );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, { priority: 'low' } );\n\t\t} );\n\t}\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/**\n * @module media-embed/mediaembedstyle/mediaembedstyleui\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { ButtonView, createDropdown, addToolbarToDropdown, SplitButtonView } from '@ckeditor/ckeditor5-ui';\nimport { logWarning } from '@ckeditor/ckeditor5-utils';\nimport { MediaEmbedStyleEditing } from './mediaembedstyleediting.js';\nimport { type MediaEmbedStyleCommand } from './mediaembedstylecommand.js';\nimport { DEFAULT_DROPDOWN_DEFINITIONS } from './constants.js';\nimport { isMediaStyleDropdown } from './utils.js';\nimport type { MediaStyleDropdownDefinition } from '../mediaembedconfig.js';\n\n/**\n * Definition of a single alignment button registered by `MediaEmbedStyleUI`.\n */\ntype ButtonDefinition = {\n\tname: string;\n\tlabel: string;\n\ticon: string;\n};\n\n/**\n * The media embed style UI plugin.\n *\n * It registers a button for every style in the resolved\n * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}\n * list, and the default split-button dropdowns (`mediaEmbed:wrapText`, `mediaEmbed:breakText`)\n * — filtered to the styles that survived configuration. The resulting components can be placed\n * in the {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar media embed toolbar}.\n */\nexport class MediaEmbedStyleUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MediaEmbedStyleEditing ]> {\n\t\treturn [ MediaEmbedStyleEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedStyleUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst titles = this._getLocalizedTitles();\n\n\t\tfor ( const button of this._getButtonDefinitions( titles ) ) {\n\t\t\tthis._createButton( button );\n\t\t}\n\n\t\tfor ( const dropdown of this._getDropdownDefinitions( titles ) ) {\n\t\t\tthis._createDropdown( dropdown );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the alignment button definitions sourced from the resolved options list.\n\t */\n\tprivate _getButtonDefinitions( titles: Record<string, string> ): Array<ButtonDefinition> {\n\t\tconst editing = this.editor.plugins.get( MediaEmbedStyleEditing );\n\n\t\treturn editing.normalizedStyles.map( option => ( {\n\t\t\tname: option.name,\n\t\t\tlabel: titles[ option.title ] || option.title,\n\t\t\ticon: option.icon\n\t\t} ) );\n\t}\n\n\t/**\n\t * Returns the localized titles of the built-in styles and dropdowns.\n\t */\n\tprivate _getLocalizedTitles(): Record<string, string> {\n\t\tconst t = this.editor.t;\n\n\t\treturn {\n\t\t\t'Left aligned media': t( 'Left aligned media' ),\n\t\t\t'Centered media': t( 'Centered media' ),\n\t\t\t'Right aligned media': t( 'Right aligned media' ),\n\t\t\t'Wrap text': t( 'Wrap text' ),\n\t\t\t'Break text': t( 'Break text' )\n\t\t};\n\t}\n\n\t/**\n\t * Returns the split-button dropdown definitions, filtered to the styles present in the\n\t * resolved options list. Combines the {@link module:media-embed/mediaembedstyle/constants~DEFAULT_DROPDOWN_DEFINITIONS\n\t * built-in dropdowns} with custom dropdowns declared inline in\n\t * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `config.mediaEmbed.toolbar`}.\n\t *\n\t * A dropdown with fewer than two items is skipped — a single-item dropdown carries no value\n\t * over the flat button. If the configured `defaultItem` was filtered out, the first surviving\n\t * item becomes the default.\n\t *\n\t * When a *custom* dropdown's items reference styles that are not in the resolved options list,\n\t * a console warning is emitted (the integrator's config was not fully honored). Built-in\n\t * dropdowns auto-skip silently — they are added by the plugin, not the integrator.\n\t */\n\tprivate _getDropdownDefinitions( titles: Record<string, string> ): Array<MediaStyleDropdownDefinition> {\n\t\tconst editor = this.editor;\n\t\tconst editing = editor.plugins.get( MediaEmbedStyleEditing );\n\t\tconst availableComponentNames = new Set(\n\t\t\tediting.normalizedStyles.map( ( { name } ) => `mediaEmbed:${ name }` )\n\t\t);\n\n\t\tconst dropdowns: Array<MediaStyleDropdownDefinition> = [];\n\n\t\tconst resolveDropdown = ( definition: MediaStyleDropdownDefinition, warnOnFilter: boolean ): void => {\n\t\t\tconst items = definition.items.filter( itemName => availableComponentNames.has( itemName ) );\n\n\t\t\tif ( warnOnFilter && items.length !== definition.items.length ) {\n\t\t\t\twarnInvalidDropdown( { dropdown: definition } );\n\t\t\t}\n\n\t\t\tif ( items.length < 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst defaultItem = availableComponentNames.has( definition.defaultItem ) ?\n\t\t\t\tdefinition.defaultItem :\n\t\t\t\titems[ 0 ];\n\n\t\t\tdropdowns.push( {\n\t\t\t\tname: definition.name,\n\t\t\t\ttitle: titles[ definition.title ] || definition.title,\n\t\t\t\titems,\n\t\t\t\tdefaultItem\n\t\t\t} );\n\t\t};\n\n\t\tfor ( const definition of DEFAULT_DROPDOWN_DEFINITIONS ) {\n\t\t\tresolveDropdown( definition, false );\n\t\t}\n\n\t\tfor ( const definition of this._collectCustomDropdowns() ) {\n\t\t\tresolveDropdown( definition, true );\n\t\t}\n\n\t\treturn dropdowns;\n\t}\n\n\t/**\n\t * Scans `config.mediaEmbed.toolbar` for entries shaped like a dropdown definition\n\t * (objects with both `items` and `defaultItem`) and returns the valid ones. `defaultItem`\n\t * is the discriminator between our split-button dropdowns and generic toolbar groupings\n\t * (which use `items` + `label` and have no `defaultItem`).\n\t *\n\t * Invalid entries (wrong name prefix, `defaultItem` missing from `items`) are warned and\n\t * dropped here. Items that reference filtered-out styles are filtered later by\n\t * {@link #_getDropdownDefinitions}, alongside the same logic that applies to built-in\n\t * dropdowns.\n\t */\n\tprivate _collectCustomDropdowns(): Array<MediaStyleDropdownDefinition> {\n\t\tconst toolbarConfig = this.editor.config.get( 'mediaEmbed.toolbar' ) || [];\n\n\t\treturn toolbarConfig.filter( ( item ): item is MediaStyleDropdownDefinition =>\n\t\t\tisMediaStyleDropdown( item ) && isValidCustomDropdown( item )\n\t\t);\n\t}\n\n\t/**\n\t * Registers a single alignment toggle button in the component factory.\n\t */\n\tprivate _createButton( definition: ButtonDefinition ): void {\n\t\tconst editor = this.editor;\n\t\tconst componentName = `mediaEmbed:${ definition.name }`;\n\n\t\teditor.ui.componentFactory.add( componentName, locale => {\n\t\t\tconst command: MediaEmbedStyleCommand = editor.commands.get( 'mediaStyle' )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: definition.label,\n\t\t\t\ticon: definition.icon,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\t\tview.bind( 'isOn' ).to( command, 'value', value => value === definition.name );\n\n\t\t\tview.on( 'execute', () => {\n\t\t\t\teditor.execute( 'mediaStyle', { value: definition.name } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a split-button dropdown grouping a set of alignment buttons. The action button\n\t * reflects whichever child option is currently `isOn`, falling back to the dropdown's\n\t * `defaultItem` when nothing is active.\n\t */\n\tprivate _createDropdown( definition: MediaStyleDropdownDefinition ): void {\n\t\tconst editor = this.editor;\n\t\tconst factory = editor.ui.componentFactory;\n\n\t\tfactory.add( definition.name, locale => {\n\t\t\t// Build child buttons via the factory; pick the default by name.\n\t\t\tconst buttonViews = definition.items.map(\n\t\t\t\titemName => factory.create( itemName ) as ButtonView\n\t\t\t);\n\t\t\tconst defaultButton = buttonViews[ definition.items.indexOf( definition.defaultItem ) ];\n\n\t\t\t// Resolve the currently-active child or fall back to the default. Used by the\n\t\t\t// reactive `icon` and `label` bindings on the split button.\n\t\t\tconst activeOrDefault = ( ...areOn: Array<boolean> ): ButtonView => {\n\t\t\t\tconst index = areOn.findIndex( Boolean );\n\n\t\t\t\treturn index < 0 ? defaultButton : buttonViews[ index ];\n\t\t\t};\n\n\t\t\t// Build the dropdown shell.\n\t\t\tconst dropdownView = createDropdown( locale, SplitButtonView );\n\t\t\tconst splitButtonView = dropdownView.buttonView as SplitButtonView;\n\n\t\t\taddToolbarToDropdown( dropdownView, buttonViews, { enableActiveItemFocusOnDropdownOpen: true } );\n\n\t\t\tsplitButtonView.set( {\n\t\t\t\tlabel: getDropdownButtonTitle( definition.title, defaultButton.label! ),\n\t\t\t\tclass: null,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tsplitButtonView.arrowView.unbind( 'label' );\n\t\t\tsplitButtonView.arrowView.set( { label: definition.title } );\n\n\t\t\t// Reactive: action button mirrors the active child's icon and label.\n\t\t\tsplitButtonView.bind( 'icon' ).toMany( buttonViews, 'isOn',\n\t\t\t\t( ...areOn ) => activeOrDefault( ...areOn ).icon\n\t\t\t);\n\n\t\t\tsplitButtonView.bind( 'label' ).toMany( buttonViews, 'isOn',\n\t\t\t\t( ...areOn ) => getDropdownButtonTitle( definition.title, activeOrDefault( ...areOn ).label! )\n\t\t\t);\n\n\t\t\t// Reactive: split button shows the \"active\" state when any child is on.\n\t\t\tsplitButtonView.bind( 'isOn' ).toMany( buttonViews, 'isOn', ( ...areOn ) => areOn.some( Boolean ) );\n\n\t\t\tsplitButtonView.bind( 'class' ).toMany( buttonViews, 'isOn',\n\t\t\t\t( ...areOn ) => areOn.some( Boolean ) ? 'ck-splitbutton_flatten' : undefined\n\t\t\t);\n\n\t\t\t// Action click: re-fire the default child when nothing is active; otherwise toggle the dropdown.\n\t\t\tthis.listenTo( splitButtonView, 'execute', () => {\n\t\t\t\tif ( buttonViews.some( ( { isOn } ) => isOn ) ) {\n\t\t\t\t\tdropdownView.isOpen = !dropdownView.isOpen;\n\t\t\t\t} else {\n\t\t\t\t\tdefaultButton.fire( 'execute' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Reactive: dropdown is enabled when any child is enabled.\n\t\t\tdropdownView.bind( 'isEnabled' ).toMany( buttonViews, 'isEnabled',\n\t\t\t\t( ...areEnabled ) => areEnabled.some( Boolean )\n\t\t\t);\n\n\t\t\t// Refocus the editing view so the dropdown action doesn't steal caret position.\n\t\t\tthis.listenTo( dropdownView, 'execute', () => {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\t}\n}\n\n/**\n * Combines the dropdown title and the default action item label for the split-button label.\n */\nfunction getDropdownButtonTitle( dropdownTitle: string, buttonTitle: string ): string {\n\treturn `${ dropdownTitle }: ${ buttonTitle }`;\n}\n\n/**\n * Validates a user-supplied dropdown definition. Emits a console warning under\n * `media-style-configuration-definition-invalid` and returns `false` when any of these rules is\n * broken: `name` must start with `mediaEmbed:`, `title` must be a non-empty string, `items` must\n * be non-empty and every entry must be a `mediaEmbed:`-prefixed string, and `defaultItem` must be\n * one of the `items`.\n *\n * Item-membership against the resolved styles is checked separately, downstream, alongside the\n * same logic that applies to built-in dropdowns.\n */\nfunction isValidCustomDropdown( definition: MediaStyleDropdownDefinition ): boolean {\n\tconst valid =\n\t\tdefinition.name.startsWith( 'mediaEmbed:' ) &&\n\t\ttypeof definition.title === 'string' && definition.title.length > 0 &&\n\t\tdefinition.items.length > 0 &&\n\t\tdefinition.items.every( name => typeof name === 'string' && name.startsWith( 'mediaEmbed:' ) ) &&\n\t\tdefinition.items.includes( definition.defaultItem );\n\n\tif ( !valid ) {\n\t\twarnInvalidDropdown( { dropdown: definition } );\n\t}\n\n\treturn valid;\n}\n\n/**\n * Emits a console warning under `media-style-configuration-definition-invalid` for an invalid\n * or partially-honored dropdown definition. Called from {@link ~isValidCustomDropdown} for\n * structural problems and from {@link MediaEmbedStyleUI#_getDropdownDefinitions} when items\n * reference styles that are not in the resolved options list.\n */\nfunction warnInvalidDropdown( info: object ): void {\n\tlogWarning( 'media-style-configuration-definition-invalid', info );\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/**\n * @module media-embed/mediaembedstyle\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { MediaEmbedStyleEditing } from './mediaembedstyle/mediaembedstyleediting.js';\nimport { MediaEmbedStyleUI } from './mediaembedstyle/mediaembedstyleui.js';\n\n/**\n * The media embed style plugin.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n * * {@link module:media-embed/mediaembedstyle/mediaembedstyleediting~MediaEmbedStyleEditing},\n * * {@link module:media-embed/mediaembedstyle/mediaembedstyleui~MediaEmbedStyleUI}\n *\n * For a detailed overview, check the {@glink features/media-embed/media-embed-styles Media embed styles feature documentation}.\n */\nexport class MediaEmbedStyle extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ MediaEmbedStyleEditing, MediaEmbedStyleUI ]> {\n\t\treturn [ MediaEmbedStyleEditing, MediaEmbedStyleUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedStyle' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { insertToPriorityArray, priorities } from \"@ckeditor/ckeditor5-utils\";\nimport { ClipboardPipeline } from \"@ckeditor/ckeditor5-clipboard\";\nimport { Matcher, ViewDocument, ViewDomConverter, ViewUpcastWriter } from \"@ckeditor/ckeditor5-engine\";\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* Transforms `<a>` elements which are bookmarks by moving their children after the element.\n*\n* @internal\n*/\nfunction transformBookmarks(documentFragment, writer) {\n\tconst elementsToChange = [];\n\tfor (const value of writer.createRangeIn(documentFragment)) {\n\t\tconst element = value.item;\n\t\tif (element.is(\"element\", \"a\") && !element.hasAttribute(\"href\") && (element.hasAttribute(\"id\") || element.hasAttribute(\"name\"))) elementsToChange.push(element);\n\t}\n\tfor (const element of elementsToChange) {\n\t\tconst index = element.parent.getChildIndex(element) + 1;\n\t\tconst children = element.getChildren();\n\t\twriter.insertChild(index, children, element.parent);\n\t\tif (isHiddenBookmarkAnchor(element)) writer.remove(element);\n\t}\n}\n/**\n* Checks whether the given element is a hidden or auto-generated bookmark anchor.\n*\n* Editors like MS Word and Google Docs use the `name` attribute (rather than `id`)\n* for bookmarks. Furthermore, they reserve `_`-prefixed bookmark names for\n* auto-generated anchors (e.g., Table of Contents or internal hyperlinks) and\n* do not allow users to manually create custom bookmarks starting with an underscore.\n*\n* @param element The element to check.\n* @returns True if the element is a hidden bookmark anchor, false otherwise.\n*/\nfunction isHiddenBookmarkAnchor(element) {\n\tconst name = element.getAttribute(\"name\");\n\treturn !!name && name.startsWith(\"_\");\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 paste-from-office/filters/utils\n*/\n/**\n* Normalizes CSS length value to 'px'.\n*\n* @internal\n*/\nfunction convertCssLengthToPx(value) {\n\tconst numericValue = parseFloat(value);\n\tif (value.endsWith(\"pt\")) return toPx(numericValue * 96 / 72);\n\telse if (value.endsWith(\"pc\")) return toPx(numericValue * 12 * 96 / 72);\n\telse if (value.endsWith(\"in\")) return toPx(numericValue * 96);\n\telse if (value.endsWith(\"cm\")) return toPx(numericValue * 96 / 2.54);\n\telse if (value.endsWith(\"mm\")) return toPx(numericValue / 10 * 96 / 2.54);\n\treturn value;\n}\n/**\n* Returns true for value with 'px' unit.\n*\n* @internal\n*/\nfunction isPx(value) {\n\treturn value !== void 0 && value.endsWith(\"px\");\n}\n/**\n* Returns a rounded 'px' value.\n*\n* @internal\n*/\nfunction toPx(value) {\n\treturn Math.round(value) + \"px\";\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 paste-from-office/filters/list\n*/\n/**\n* Transforms Word specific list-like elements to the semantic HTML lists.\n*\n* Lists in Word are represented by block elements with special attributes like:\n*\n* ```xml\n* <p class=MsoListParagraphCxSpFirst style='mso-list:l1 level1 lfo1'>...</p> // Paragraph based list.\n* <h1 style='mso-list:l0 level1 lfo1'>...</h1> // Heading 1 based list.\n* ```\n*\n* @param documentFragment The view structure to be transformed.\n* @param stylesString Styles from which list-like elements styling will be extracted.\n* @param hasMultiLevelListPlugin Whether the editor has the multi-level list plugin enabled.\n* @param enableSkipLevelLists Whether to enable skip-level lists.\n* @internal\n*/\nfunction transformListItemLikeElementsIntoLists(documentFragment, stylesString, hasMultiLevelListPlugin, enableSkipLevelLists = false) {\n\tif (!documentFragment.childCount) return;\n\tconst writer = new ViewUpcastWriter(documentFragment.document);\n\tconst itemLikeElements = findAllItemLikeElements(documentFragment, writer);\n\tif (!itemLikeElements.length) return;\n\tconst encounteredLists = [];\n\tconst stack = [];\n\tlet topLevelListInfo = createTopLevelListInfo();\n\tfor (const itemLikeElement of itemLikeElements) if (itemLikeElement.indent !== void 0) {\n\t\tif (!isListContinuation(itemLikeElement)) {\n\t\t\tapplyIndentationToTopLevelList(writer, stack, topLevelListInfo);\n\t\t\ttopLevelListInfo = createTopLevelListInfo();\n\t\t\tencounteredLists.length = 1;\n\t\t\tstack.length = 0;\n\t\t}\n\t\tconst originalListId = `${itemLikeElement.id}:${itemLikeElement.indent}`;\n\t\tconst indent = enableSkipLevelLists ? itemLikeElement.indent - 1 : Math.min(itemLikeElement.indent - 1, stack.length);\n\t\tif (indent < stack.length && stack[indent].id !== itemLikeElement.id) {\n\t\t\tif (indent == 0 && topLevelListInfo.canApplyMarginOnList && topLevelListInfo.topLevelListItemElements.length > 0) {\n\t\t\t\tapplyIndentationToTopLevelList(writer, stack, topLevelListInfo);\n\t\t\t\ttopLevelListInfo = createTopLevelListInfo();\n\t\t\t}\n\t\t\tencounteredLists.length = indent;\n\t\t\tstack.length = indent;\n\t\t}\n\t\tif (indent < stack.length - 1) {\n\t\t\tencounteredLists.length = indent + 1;\n\t\t\tstack.length = indent + 1;\n\t\t}\n\t\tconst listStyle = detectListStyle(itemLikeElement, stylesString);\n\t\twhile (stack.length < indent) {\n\t\t\tconst intermediateList = writer.createElement(listStyle.type);\n\t\t\tconst intermediateListItem = writer.createElement(\"li\");\n\t\t\twriter.setStyle(\"list-style-type\", \"none\", intermediateListItem);\n\t\t\tif (stack.length == 0) {\n\t\t\t\tconst parent = itemLikeElement.element.parent;\n\t\t\t\tconst index = parent.getChildIndex(itemLikeElement.element) + 1;\n\t\t\t\twriter.insertChild(index, intermediateList, parent);\n\t\t\t} else {\n\t\t\t\tconst parentListItems = stack[stack.length - 1].listItemElements;\n\t\t\t\twriter.appendChild(intermediateList, parentListItems[parentListItems.length - 1]);\n\t\t\t}\n\t\t\twriter.appendChild(intermediateListItem, intermediateList);\n\t\t\tstack.push({\n\t\t\t\t...itemLikeElement,\n\t\t\t\tlistElement: intermediateList,\n\t\t\t\tlistItemElements: [intermediateListItem],\n\t\t\t\tisIntermediate: true,\n\t\t\t\tmarginLeft: void 0\n\t\t\t});\n\t\t}\n\t\tif (indent > stack.length - 1 || stack[indent].listElement.name != listStyle.type) {\n\t\t\tif (listStyle.type == \"ol\" && itemLikeElement.id !== void 0 && encounteredLists[indent] && encounteredLists[indent][originalListId]) listStyle.startIndex = encounteredLists[indent][originalListId];\n\t\t\tconst listElement = createNewEmptyList(listStyle, writer, hasMultiLevelListPlugin);\n\t\t\tif (stack.length == 0) {\n\t\t\t\tconst parent = itemLikeElement.element.parent;\n\t\t\t\tconst index = parent.getChildIndex(itemLikeElement.element) + 1;\n\t\t\t\twriter.insertChild(index, listElement, parent);\n\t\t\t} else if (indent == 0) {\n\t\t\t\tconst existingList = stack[0].listElement;\n\t\t\t\tconst listParent = existingList.parent;\n\t\t\t\tconst insertIndex = listParent.getChildIndex(existingList) + 1;\n\t\t\t\twriter.insertChild(insertIndex, listElement, listParent);\n\t\t\t} else {\n\t\t\t\tconst parentListItems = stack[indent - 1].listItemElements;\n\t\t\t\twriter.appendChild(listElement, parentListItems[parentListItems.length - 1]);\n\t\t\t}\n\t\t\tstack[indent] = {\n\t\t\t\t...itemLikeElement,\n\t\t\t\tlistElement,\n\t\t\t\tlistItemElements: []\n\t\t\t};\n\t\t\tif (itemLikeElement.id !== void 0) {\n\t\t\t\tif (!encounteredLists[indent]) encounteredLists[indent] = {};\n\t\t\t\tencounteredLists[indent][originalListId] = listStyle.startIndex || 1;\n\t\t\t}\n\t\t} else if (stack[indent].isIntermediate) {\n\t\t\tapplyListStyleToElement(stack[indent].listElement, listStyle, writer, hasMultiLevelListPlugin);\n\t\t\tstack[indent] = {\n\t\t\t\t...itemLikeElement,\n\t\t\t\tlistElement: stack[indent].listElement,\n\t\t\t\tlistItemElements: stack[indent].listItemElements\n\t\t\t};\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (itemLikeElement.id !== void 0) {\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif (!encounteredLists[indent]) encounteredLists[indent] = {};\n\t\t\t\tencounteredLists[indent][originalListId] = listStyle.startIndex || 1;\n\t\t\t}\n\t\t}\n\t\tconst listItem = itemLikeElement.element.name == \"li\" ? itemLikeElement.element : writer.createElement(\"li\");\n\t\tapplyListItemMarginLeftAndUpdateTopLevelInfo(writer, stack, topLevelListInfo, itemLikeElement, listItem, indent);\n\t\twriter.appendChild(listItem, stack[indent].listElement);\n\t\tstack[indent].listItemElements.push(listItem);\n\t\tif (itemLikeElement.id !== void 0 && encounteredLists[indent]) encounteredLists[indent][originalListId]++;\n\t\tif (itemLikeElement.element != listItem) writer.appendChild(itemLikeElement.element, listItem);\n\t\tremoveBulletElement(itemLikeElement.element, writer);\n\t\twriter.removeStyle(\"text-indent\", itemLikeElement.element);\n\t\twriter.removeStyle(\"margin-left\", itemLikeElement.element);\n\t} else {\n\t\tconst stackItem = stack.find((stackItem) => stackItem.marginLeft == itemLikeElement.marginLeft);\n\t\tif (stackItem) {\n\t\t\tconst listItems = stackItem.listItemElements;\n\t\t\twriter.appendChild(itemLikeElement.element, listItems[listItems.length - 1]);\n\t\t\twriter.removeStyle(\"margin-left\", itemLikeElement.element);\n\t\t\tstack.length = stack.indexOf(stackItem) + 1;\n\t\t\tencounteredLists.length = stack.length + 1;\n\t\t} else {\n\t\t\tapplyIndentationToTopLevelList(writer, stack, topLevelListInfo);\n\t\t\ttopLevelListInfo = createTopLevelListInfo();\n\t\t\tstack.length = 0;\n\t\t}\n\t}\n\tapplyIndentationToTopLevelList(writer, stack, topLevelListInfo);\n}\nfunction applyListItemMarginLeftAndUpdateTopLevelInfo(writer, stack, topLevelListInfo, itemLikeElement, listItem, indent) {\n\tif (itemLikeElement.marginLeft === void 0) {\n\t\tif (indent == 0) topLevelListInfo.canApplyMarginOnList = false;\n\t\treturn;\n\t}\n\tconst listItemBlockMarginLeft = parseFloat(itemLikeElement.marginLeft);\n\tlet currentListBlockIndent = 0;\n\tfor (let ancestorIndex = 0; ancestorIndex < stack.length - 1; ancestorIndex++) {\n\t\tconst ancestorListItems = stack[ancestorIndex].listItemElements;\n\t\tconst ancestorMargin = ancestorListItems[ancestorListItems.length - 1].getStyle(\"margin-left\");\n\t\tif (ancestorMargin !== void 0) currentListBlockIndent += parseFloat(ancestorMargin);\n\t}\n\tcurrentListBlockIndent += stack.length * 40;\n\tconst adjustedListItemIndent = listItemBlockMarginLeft - currentListBlockIndent;\n\tconst listItemBlockMarginLeftPx = adjustedListItemIndent !== 0 ? toPx(adjustedListItemIndent) : void 0;\n\tif (listItemBlockMarginLeftPx) {\n\t\twriter.setStyle(\"margin-left\", listItemBlockMarginLeftPx, listItem);\n\t\tif (indent == 0 && topLevelListInfo.canApplyMarginOnList) {\n\t\t\tif (topLevelListInfo.marginLeft === void 0) topLevelListInfo.marginLeft = listItemBlockMarginLeftPx;\n\t\t\tif (listItemBlockMarginLeftPx !== topLevelListInfo.marginLeft) topLevelListInfo.canApplyMarginOnList = false;\n\t\t\ttopLevelListInfo.topLevelListItemElements.push(listItem);\n\t\t}\n\t}\n}\nfunction createTopLevelListInfo() {\n\treturn {\n\t\tmarginLeft: void 0,\n\t\tcanApplyMarginOnList: true,\n\t\ttopLevelListItemElements: []\n\t};\n}\n/**\n* Sets margin-left style to the top-level list if all its items have the same margin-left.\n* If margin-left is set on the list, it is removed from all its items to avoid doubling of margins.\n*/\nfunction applyIndentationToTopLevelList(writer, stack, topLevelListInfo) {\n\tif (topLevelListInfo.canApplyMarginOnList && topLevelListInfo.marginLeft && topLevelListInfo.topLevelListItemElements.length > 0) {\n\t\twriter.setStyle(\"margin-left\", topLevelListInfo.marginLeft, stack[0].listElement);\n\t\tfor (const topLevelListItem of topLevelListInfo.topLevelListItemElements) writer.removeStyle(\"margin-left\", topLevelListItem);\n\t}\n}\n/**\n* Removes paragraph wrapping content inside a list item.\n*\n* @internal\n*/\nfunction unwrapParagraphInListItem(documentFragment, writer) {\n\tfor (const value of writer.createRangeIn(documentFragment)) {\n\t\tconst element = value.item;\n\t\tif (element.is(\"element\", \"li\")) {\n\t\t\tconst firstChild = element.getChild(0);\n\t\t\tif (firstChild && firstChild.is(\"element\", \"p\")) writer.unwrapElement(firstChild);\n\t\t}\n\t}\n}\n/**\n* Finds all list-like elements in a given document fragment.\n*\n* @param documentFragment Document fragment in which to look for list-like nodes.\n* @returns Array of found list-like items. Each item is an object containing\n* @internal\n*/\nfunction findAllItemLikeElements(documentFragment, writer) {\n\tconst range = writer.createRangeIn(documentFragment);\n\tconst itemLikeElements = [];\n\tconst foundMargins = /* @__PURE__ */ new Set();\n\tfor (const item of range.getItems()) {\n\t\tif (!item.is(\"element\") || !item.name.match(/^(p|h\\d+|li|div)$/)) continue;\n\t\tlet marginLeft = getMarginLeftNormalized(item);\n\t\tif (marginLeft !== void 0 && parseFloat(marginLeft) == 0 && !Array.from(item.getClassNames()).find((className) => className.startsWith(\"MsoList\"))) marginLeft = void 0;\n\t\tif (item.hasStyle(\"mso-list\") && item.getStyle(\"mso-list\") !== \"none\" || marginLeft !== void 0 && foundMargins.has(marginLeft)) {\n\t\t\tconst itemData = getListItemData(item);\n\t\t\titemLikeElements.push({\n\t\t\t\telement: item,\n\t\t\t\tid: itemData.id,\n\t\t\t\torder: itemData.order,\n\t\t\t\tindent: itemData.indent,\n\t\t\t\tmarginLeft\n\t\t\t});\n\t\t\tif (marginLeft !== void 0) foundMargins.add(marginLeft);\n\t\t} else foundMargins.clear();\n\t}\n\treturn itemLikeElements;\n}\n/**\n* Whether the given element is possibly a list continuation. Previous element was wrapped into a list\n* or the current element already is inside a list.\n*/\nfunction isListContinuation(currentItem) {\n\tlet previousSibling = currentItem.element.previousSibling;\n\twhile (previousSibling && isStrayInlineMarker(previousSibling)) previousSibling = previousSibling.previousSibling;\n\tif (!previousSibling) {\n\t\tconst parent = currentItem.element.parent;\n\t\treturn isList(parent) && (!parent.previousSibling || isList(parent.previousSibling));\n\t}\n\treturn isList(previousSibling);\n}\n/**\n* True for empty inline elements Word emits as residue between paragraphs (`<span>`, `<a>`, `<o:p>`).\n* Used by `isListContinuation` to look past these when checking whether the prior block is a list —\n* they're layout artefacts, not real content.\n*/\nfunction isStrayInlineMarker(node) {\n\treturn node.is(\"element\") && node.childCount === 0 && /^(?:span|a|o:p)$/.test(node.name);\n}\nfunction isList(element) {\n\treturn element.is(\"element\", \"ol\") || element.is(\"element\", \"ul\");\n}\n/**\n* Extracts list item style from the provided CSS.\n*\n* List item style is extracted from the CSS stylesheet. Each list with its specific style attribute\n* value (`mso-list:l1 level1 lfo1`) has its dedicated properties in a CSS stylesheet defined with a selector like:\n*\n* ```css\n* @list l1:level1 { ... }\n* ```\n*\n* It contains `mso-level-number-format` property which defines list numbering/bullet style. If this property\n* is not defined it means default `decimal` numbering.\n*\n* Here CSS string representation is used as `mso-level-number-format` property is an invalid CSS property\n* and will be removed during CSS parsing.\n*\n* @param listLikeItem List-like item for which list style will be searched for. Usually\n* a result of `findAllItemLikeElements()` function.\n* @param stylesString CSS stylesheet.\n* @returns An object with properties:\n*\n* * type - List type, could be `ul` or `ol`.\n* * startIndex - List start index, valid only for ordered lists.\n* * style - List style, for example: `decimal`, `lower-roman`, etc. It is extracted\n*     directly from Word stylesheet and adjusted to represent proper values for the CSS `list-style-type` property.\n*     If it cannot be adjusted, the `null` value is returned.\n*/\nfunction detectListStyle(listLikeItem, stylesString) {\n\tconst listStyleRegexp = new RegExp(`@list l${listLikeItem.id}:level${listLikeItem.indent}\\\\s*({[^}]*)`, \"gi\");\n\tconst listStyleTypeRegex = /mso-level-number-format:([^;]{0,100});/gi;\n\tconst listStartIndexRegex = /mso-level-start-at:\\s{0,100}([0-9]{0,10})\\s{0,100};/gi;\n\tconst legalStyleListRegex = new RegExp(`@list\\\\s+l${listLikeItem.id}:level\\\\d\\\\s*{[^{]*mso-level-text:\"%\\\\d\\\\\\\\.`, \"gi\");\n\tconst multiLevelNumberFormatTypeRegex = new RegExp(`@list l${listLikeItem.id}:level\\\\d\\\\s*{[^{]*mso-level-number-format:`, \"gi\");\n\tconst legalStyleListMatch = legalStyleListRegex.exec(stylesString);\n\tconst multiLevelNumberFormatMatch = multiLevelNumberFormatTypeRegex.exec(stylesString);\n\tconst islegalStyleList = legalStyleListMatch && !multiLevelNumberFormatMatch;\n\tconst listStyleMatch = listStyleRegexp.exec(stylesString);\n\tlet listStyleType = \"decimal\";\n\tlet type = \"ol\";\n\tlet startIndex = null;\n\tif (listStyleMatch && listStyleMatch[1]) {\n\t\tconst listStyleTypeMatch = listStyleTypeRegex.exec(listStyleMatch[1]);\n\t\tif (listStyleTypeMatch && listStyleTypeMatch[1]) {\n\t\t\tlistStyleType = listStyleTypeMatch[1].trim();\n\t\t\ttype = listStyleType !== \"bullet\" && listStyleType !== \"image\" ? \"ol\" : \"ul\";\n\t\t}\n\t\tif (listStyleType === \"bullet\") {\n\t\t\tconst bulletedStyle = findBulletedListStyle(listLikeItem.element);\n\t\t\tif (bulletedStyle) listStyleType = bulletedStyle;\n\t\t} else {\n\t\t\tconst listStartIndexMatch = listStartIndexRegex.exec(listStyleMatch[1]);\n\t\t\tif (listStartIndexMatch && listStartIndexMatch[1]) startIndex = parseInt(listStartIndexMatch[1]);\n\t\t}\n\t\tif (islegalStyleList) type = \"ol\";\n\t}\n\treturn {\n\t\ttype,\n\t\tstartIndex,\n\t\tstyle: mapListStyleDefinition(listStyleType),\n\t\tisLegalStyleList: islegalStyleList\n\t};\n}\n/**\n* Tries to extract the `list-style-type` value based on the marker element for bulleted list.\n*/\nfunction findBulletedListStyle(element) {\n\tif (element.name == \"li\" && element.parent.name == \"ul\" && element.parent.hasAttribute(\"type\")) return element.parent.getAttribute(\"type\");\n\tconst listMarkerElement = findListMarkerNode(element);\n\tif (!listMarkerElement) return null;\n\tconst listMarker = listMarkerElement._data;\n\tif (listMarker === \"o\") return \"circle\";\n\telse if (listMarker === \"·\") return \"disc\";\n\telse if (listMarker === \"§\") return \"square\";\n\treturn null;\n}\n/**\n* Tries to find a text node that represents the marker element (list-style-type).\n*/\nfunction findListMarkerNode(element) {\n\tif (element.getChild(0).is(\"$text\")) return null;\n\tfor (const childNode of element.getChildren()) {\n\t\tif (!childNode.is(\"element\", \"span\")) continue;\n\t\tconst textNodeOrElement = childNode.getChild(0);\n\t\tif (!textNodeOrElement) continue;\n\t\tif (textNodeOrElement.is(\"$text\")) return textNodeOrElement;\n\t\treturn textNodeOrElement.getChild(0);\n\t}\n\t/* v8 ignore next -- @preserve */\n\treturn null;\n}\n/**\n* Parses the `list-style-type` value extracted directly from the Word CSS stylesheet and returns proper CSS definition.\n*/\nfunction mapListStyleDefinition(value) {\n\tif (value.startsWith(\"arabic-leading-zero\")) return \"decimal-leading-zero\";\n\tswitch (value) {\n\t\tcase \"alpha-upper\": return \"upper-alpha\";\n\t\tcase \"alpha-lower\": return \"lower-alpha\";\n\t\tcase \"roman-upper\": return \"upper-roman\";\n\t\tcase \"roman-lower\": return \"lower-roman\";\n\t\tcase \"circle\":\n\t\tcase \"disc\":\n\t\tcase \"square\": return value;\n\t\tdefault: return null;\n\t}\n}\n/**\n* Creates a new list OL/UL element.\n*/\nfunction createNewEmptyList(listStyle, writer, hasMultiLevelListPlugin) {\n\tconst list = writer.createElement(listStyle.type);\n\tapplyListStyleToElement(list, listStyle, writer, hasMultiLevelListPlugin);\n\treturn list;\n}\n/**\n* Applies `list-style-type`, `start`, and the `legal-list` class to a list element based on the detected\n* list style. Used both when creating a fresh list and when a real item claims a previously-intermediate\n* wrapper (which was created without any of these).\n*/\nfunction applyListStyleToElement(list, listStyle, writer, hasMultiLevelListPlugin) {\n\tif (listStyle.style) writer.setStyle(\"list-style-type\", listStyle.style, list);\n\tif (listStyle.startIndex && listStyle.startIndex > 1) writer.setAttribute(\"start\", listStyle.startIndex, list);\n\tif (listStyle.isLegalStyleList && hasMultiLevelListPlugin) writer.addClass(\"legal-list\", list);\n}\n/**\n* Extracts list item information from Word specific list-like element style:\n*\n* ```\n* `style=\"mso-list:l1 level1 lfo1\"`\n* ```\n*\n* where:\n*\n* ```\n* * `l1` is a list id (however it does not mean this is a continuous list - see https://github.com/ckeditor/ckeditor5/issues/43),\n* * `level1` is a list item indentation level,\n* * `lfo1` is a list insertion order in a document.\n* ```\n*\n* @param element Element from which style data is extracted.\n*/\nfunction getListItemData(element) {\n\tconst listStyle = element.getStyle(\"mso-list\");\n\tif (listStyle === void 0) return {};\n\tconst idMatch = listStyle.match(/(^|\\s{1,100})l(\\d+)/i);\n\tconst orderMatch = listStyle.match(/\\s{0,100}lfo(\\d+)/i);\n\tconst indentMatch = listStyle.match(/\\s{0,100}level(\\d+)/i);\n\tif (idMatch && orderMatch && indentMatch) return {\n\t\tid: idMatch[2],\n\t\torder: orderMatch[1],\n\t\tindent: parseInt(indentMatch[1])\n\t};\n\treturn { indent: 1 };\n}\n/**\n* Removes span with a numbering/bullet from a given element.\n*/\nfunction removeBulletElement(element, writer) {\n\tconst bulletMatcher = new Matcher({\n\t\tname: \"span\",\n\t\tstyles: { \"mso-list\": \"Ignore\" }\n\t});\n\tconst range = writer.createRangeIn(element);\n\tfor (const value of range) if (value.type === \"elementStart\" && bulletMatcher.match(value.item)) writer.remove(value.item);\n}\n/**\n* Returns element left margin normalized to 'px' if possible.\n*/\nfunction getMarginLeftNormalized(element) {\n\tconst value = element.getStyle(\"margin-left\");\n\tif (value === void 0 || value.endsWith(\"px\")) return value;\n\treturn convertCssLengthToPx(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 paste-from-office/filters/image\n*/\n/**\n* Replaces source attribute of all `<img>` elements representing regular\n* images (not the Word shapes) with inlined base64 image representation extracted from RTF or Blob data.\n*\n* @param documentFragment Document fragment on which transform images.\n* @param rtfData The RTF data from which images representation will be used.\n* @internal\n*/\nfunction replaceImagesSourceWithBase64(documentFragment, rtfData) {\n\tif (!documentFragment.childCount) return;\n\tconst upcastWriter = new ViewUpcastWriter(documentFragment.document);\n\tconst shapesIds = findAllShapesIds(documentFragment, upcastWriter);\n\tremoveAllImgElementsRepresentingShapes(shapesIds, documentFragment, upcastWriter);\n\tinsertMissingImgs(shapesIds, documentFragment, upcastWriter);\n\tremoveAllShapeElements(documentFragment, upcastWriter);\n\tconst images = findAllImageElementsWithLocalSource(documentFragment, upcastWriter);\n\tif (images.length) replaceImagesFileSourceWithInlineRepresentation(images, extractImageDataFromRtf(rtfData), upcastWriter);\n}\n/**\n* Converts given HEX string to base64 representation.\n*\n* @internal\n* @param hexString The HEX string to be converted.\n* @returns Base64 representation of a given HEX string.\n*/\nfunction _convertHexToBase64(hexString) {\n\treturn btoa(hexString.match(/\\w{2}/g).map((char) => {\n\t\treturn String.fromCharCode(parseInt(char, 16));\n\t}).join(\"\"));\n}\n/**\n* Finds all shapes (`<v:*>...</v:*>`) ids. Shapes can represent images (canvas)\n* or Word shapes (which does not have RTF or Blob representation).\n*\n* @param documentFragment Document fragment from which to extract shape ids.\n* @returns Array of shape ids.\n*/\nfunction findAllShapesIds(documentFragment, writer) {\n\tconst range = writer.createRangeIn(documentFragment);\n\tconst shapeElementsMatcher = new Matcher({ name: /v:(.+)/ });\n\tconst shapesIds = [];\n\tfor (const value of range) {\n\t\tif (value.type != \"elementStart\") continue;\n\t\tconst el = value.item;\n\t\tconst previousSibling = el.previousSibling;\n\t\tconst prevSiblingName = previousSibling && previousSibling.is(\"element\") ? previousSibling.name : null;\n\t\tconst exceptionIds = [\"Chart\"];\n\t\tconst isElementAShape = shapeElementsMatcher.match(el);\n\t\tconst hasElementGfxdataAttribute = el.getAttribute(\"o:gfxdata\");\n\t\tconst isPreviousSiblingAShapeType = prevSiblingName === \"v:shapetype\";\n\t\tconst isElementIdInExceptionsArray = hasElementGfxdataAttribute && exceptionIds.some((item) => el.getAttribute(\"id\").includes(item));\n\t\tif (isElementAShape && hasElementGfxdataAttribute && !isPreviousSiblingAShapeType && !isElementIdInExceptionsArray) shapesIds.push(value.item.getAttribute(\"id\"));\n\t}\n\treturn shapesIds;\n}\n/**\n* Removes all `<img>` elements which represents Word shapes and not regular images.\n*\n* @param shapesIds Shape ids which will be checked against `<img>` elements.\n* @param documentFragment Document fragment from which to remove `<img>` elements.\n*/\nfunction removeAllImgElementsRepresentingShapes(shapesIds, documentFragment, writer) {\n\tconst range = writer.createRangeIn(documentFragment);\n\tconst imageElementsMatcher = new Matcher({ name: \"img\" });\n\tconst imgs = [];\n\tfor (const value of range) if (value.item.is(\"element\") && imageElementsMatcher.match(value.item)) {\n\t\tconst el = value.item;\n\t\tconst shapes = el.getAttribute(\"v:shapes\") ? el.getAttribute(\"v:shapes\").split(\" \") : [];\n\t\tif (shapes.length && shapes.every((shape) => shapesIds.indexOf(shape) > -1)) imgs.push(el);\n\t\telse if (!el.getAttribute(\"src\")) imgs.push(el);\n\t}\n\tfor (const img of imgs) writer.remove(img);\n}\n/**\n* Removes all shape elements (`<v:*>...</v:*>`) so they do not pollute the output structure.\n*\n* @param documentFragment Document fragment from which to remove shape elements.\n*/\nfunction removeAllShapeElements(documentFragment, writer) {\n\tconst range = writer.createRangeIn(documentFragment);\n\tconst shapeElementsMatcher = new Matcher({ name: /v:(.+)/ });\n\tconst shapes = [];\n\tfor (const value of range) if (value.type == \"elementStart\" && shapeElementsMatcher.match(value.item)) shapes.push(value.item);\n\tfor (const shape of shapes) writer.remove(shape);\n}\n/**\n* Inserts `img` tags if there is none after a shape.\n*/\nfunction insertMissingImgs(shapeIds, documentFragment, writer) {\n\tconst range = writer.createRangeIn(documentFragment);\n\tconst shapes = [];\n\tfor (const value of range) if (value.type == \"elementStart\" && value.item.is(\"element\", \"v:shape\")) {\n\t\tconst id = value.item.getAttribute(\"id\");\n\t\tif (shapeIds.includes(id)) continue;\n\t\tif (!containsMatchingImg(value.item.parent.getChildren(), id)) shapes.push(value.item);\n\t}\n\tfor (const shape of shapes) {\n\t\tconst attrs = { src: findSrc(shape) };\n\t\tif (shape.hasAttribute(\"alt\")) attrs.alt = shape.getAttribute(\"alt\");\n\t\tconst img = writer.createElement(\"img\", attrs);\n\t\twriter.insertChild(shape.index + 1, img, shape.parent);\n\t}\n\tfunction containsMatchingImg(nodes, id) {\n\t\tfor (const node of nodes)\n /* v8 ignore else -- @preserve */\n\t\tif (node.is(\"element\")) {\n\t\t\tif (node.name == \"img\" && node.getAttribute(\"v:shapes\") == id) return true;\n\t\t\tif (containsMatchingImg(node.getChildren(), id)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\tfunction findSrc(shape) {\n\t\tfor (const child of shape.getChildren())\n /* v8 ignore else -- @preserve */\n\t\tif (child.is(\"element\") && child.getAttribute(\"src\")) return child.getAttribute(\"src\");\n\t}\n}\n/**\n* Finds all `<img>` elements in a given document fragment which have source pointing to local `file://` resource.\n* This function also tracks the index position of each image in the document, which is essential for\n* precise matching with hexadecimal representations in RTF data.\n*\n* @param documentFragment Document fragment in which to look for `<img>` elements.\n* @returns Array of found images along with their position index in the document.\n*/\nfunction findAllImageElementsWithLocalSource(documentFragment, writer) {\n\tconst range = writer.createRangeIn(documentFragment);\n\tconst imageElementsMatcher = new Matcher({ name: \"img\" });\n\tconst imgs = [];\n\tlet currentImageIndex = 0;\n\tfor (const value of range) if (value.item.is(\"element\") && imageElementsMatcher.match(value.item)) {\n\t\tif (value.item.getAttribute(\"src\").startsWith(\"file://\")) imgs.push({\n\t\t\telement: value.item,\n\t\t\timageIndex: currentImageIndex\n\t\t});\n\t\tcurrentImageIndex++;\n\t}\n\treturn imgs;\n}\n/**\n* Extracts all images HEX representations from a given RTF data.\n*\n* @param rtfData The RTF data from which to extract images HEX representation.\n* @returns Array of found HEX representations. Each array item is an object containing:\n*\n* * hex Image representation in HEX format.\n* * type Type of image, `image/png` or `image/jpeg`.\n*/\nfunction extractImageDataFromRtf(rtfData) {\n\tif (!rtfData) return [];\n\tconst regexPictureHeader = /{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?({\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s}]*?/;\n\tconst regexPicture = new RegExp(\"(?:(\" + regexPictureHeader.source + \"))([\\\\da-fA-F\\\\s]+)\\\\}\", \"g\");\n\tconst images = rtfData.match(regexPicture);\n\tconst result = [];\n\tif (images) for (const image of images) {\n\t\tlet imageType = false;\n\t\tif (image.includes(\"\\\\pngblip\")) imageType = \"image/png\";\n\t\telse if (image.includes(\"\\\\jpegblip\")) imageType = \"image/jpeg\";\n\t\tif (imageType) result.push({\n\t\t\thex: image.replace(regexPictureHeader, \"\").replace(/[^\\da-fA-F]/g, \"\"),\n\t\t\ttype: imageType\n\t\t});\n\t}\n\treturn result;\n}\n/**\n* Replaces `src` attribute value of all given images with the corresponding base64 image representation.\n* Uses the image index to precisely match with the correct hexadecimal representation from RTF data.\n*\n* @param imageElements Array of image elements along with their indices which will have their sources replaced.\n* @param imagesHexSources Array of images hex sources (usually the result of `extractImageDataFromRtf()` function).\n* Contains hexadecimal representations of ALL images in the document, not just those with `file://` URLs.\n* In XML documents, the same image might be defined both as base64 in HTML and as hexadecimal in RTF data.\n*/\nfunction replaceImagesFileSourceWithInlineRepresentation(imageElements, imagesHexSources, writer) {\n\tfor (let i = 0; i < imageElements.length; i++) {\n\t\tconst { element, imageIndex } = imageElements[i];\n\t\tconst rtfHexSource = imagesHexSources[imageIndex];\n\t\tif (rtfHexSource) {\n\t\t\tconst newSrc = `data:${rtfHexSource.type};base64,${_convertHexToBase64(rtfHexSource.hex)}`;\n\t\t\twriter.setAttribute(\"src\", newSrc, element);\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 paste-from-office/filters/removemsattributes\n*/\n/**\n* Cleanup MS attributes like styles, attributes and elements.\n*\n* @param documentFragment element `data.content` obtained from clipboard.\n* @internal\n*/\nfunction removeMSAttributes(documentFragment) {\n\tconst elementsToUnwrap = [];\n\tconst writer = new ViewUpcastWriter(documentFragment.document);\n\tfor (const { item } of writer.createRangeIn(documentFragment)) {\n\t\tif (!item.is(\"element\")) continue;\n\t\tfor (const className of item.getClassNames()) if (/\\bmso/gi.exec(className)) writer.removeClass(className, item);\n\t\tfor (const styleName of item.getStyleNames()) if (/\\bmso/gi.exec(styleName)) writer.removeStyle(styleName, item);\n\t\tif (item.is(\"element\", \"w:sdt\") || item.is(\"element\", \"w:sdtpr\") && item.isEmpty || item.is(\"element\", \"o:p\") && item.isEmpty) elementsToUnwrap.push(item);\n\t}\n\tfor (const item of elementsToUnwrap) {\n\t\tconst itemParent = item.parent;\n\t\tconst childIndex = itemParent.getChildIndex(item);\n\t\twriter.insertChild(childIndex, item.getChildren(), itemParent);\n\t\twriter.remove(item);\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* Applies border none for table and cells without a border specified.\n* Normalizes style length units to px.\n* Handles left block table alignment.\n*\n* @internal\n*/\nfunction transformTables(documentFragment, writer, hasTablePropertiesPlugin = false) {\n\tfor (const item of writer.createRangeIn(documentFragment).getItems()) {\n\t\tif (!item.is(\"element\", \"table\") && !item.is(\"element\", \"td\") && !item.is(\"element\", \"th\")) continue;\n\t\tif (hasTablePropertiesPlugin && item.is(\"element\", \"table\")) {\n\t\t\tconst directParent = item.parent?.is(\"element\", \"div\") ? item.parent : null;\n\t\t\tconst grandParent = item.parent?.parent?.is(\"element\", \"div\") ? item.parent.parent : null;\n\t\t\tconst divParent = directParent ?? grandParent;\n\t\t\tif (divParent && divParent.getAttribute(\"align\") === \"center\" && !item.getAttribute(\"align\")) {\n\t\t\t\twriter.setStyle(\"margin-left\", \"auto\", item);\n\t\t\t\twriter.setStyle(\"margin-right\", \"auto\", item);\n\t\t\t} else if (divParent && divParent.getAttribute(\"align\") === \"right\" && !item.getAttribute(\"align\")) {\n\t\t\t\twriter.setStyle(\"margin-left\", \"auto\", item);\n\t\t\t\twriter.setStyle(\"margin-right\", \"0\", item);\n\t\t\t} else if (!divParent && !item.getAttribute(\"align\")) {\n\t\t\t\twriter.setStyle(\"margin-left\", \"0\", item);\n\t\t\t\twriter.setStyle(\"margin-right\", \"auto\", item);\n\t\t\t}\n\t\t}\n\t\tconst sides = [\n\t\t\t\"left\",\n\t\t\t\"top\",\n\t\t\t\"right\",\n\t\t\t\"bottom\"\n\t\t];\n\t\tif (sides.every((side) => !item.hasStyle(`border-${side}-style`))) writer.setStyle(\"border-style\", \"none\", item);\n\t\telse for (const side of sides) if (!item.hasStyle(`border-${side}-style`)) writer.setStyle(`border-${side}-style`, \"none\", item);\n\t\tconst props = [\n\t\t\t\"width\",\n\t\t\t\"height\",\n\t\t\t...sides.map((side) => `border-${side}-width`),\n\t\t\t...sides.map((side) => `padding-${side}`)\n\t\t];\n\t\tfor (const prop of props) if (item.hasStyle(prop)) writer.setStyle(prop, convertCssLengthToPx(item.getStyle(prop)), item);\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* Removes the `width:0px` style from table pasted from Google Sheets and `width=\"0\"` attribute from Word tables.\n*\n* @param documentFragment element `data.content` obtained from clipboard\n* @internal\n*/\nfunction removeInvalidTableWidth(documentFragment, writer) {\n\tfor (const child of writer.createRangeIn(documentFragment).getItems()) if (child.is(\"element\", \"table\")) {\n\t\tif (child.getStyle(\"width\") === \"0px\") writer.removeStyle(\"width\", child);\n\t\tif (child.getAttribute(\"width\") === \"0\") writer.removeAttribute(\"width\", child);\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* Replaces MS Word specific footnotes references and definitions with proper elements.\n*\n* Things to know about MS Word footnotes:\n*\n* * Footnote references in Word are marked with `mso-footnote-id` style.\n* * Word does not support nested footnotes, so references within definitions are ignored.\n* * Word appends extra spaces after footnote references within definitions, which are trimmed.\n* * Footnote definitions list is marked with `mso-element: footnote-list` style it contain `mso-element: footnote` elements.\n* * Footnote definition might contain tables, lists and other elements, not only text. They are placed directly within `li` element,\n* without any wrapper (in opposition to text content of the definition, which is placed within `MsoFootnoteText` element).\n*\n* Example pseudo document showing MS Word footnote structure:\n*\n* ```html\n* <p>Text with footnote<a style='mso-footnote-id:ftn1'>[1]</a> reference.</p>\n*\n* <div style='mso-element:footnote-list'>\n* \t<div style='mso-element:footnote' id=ftn1>\n* \t\t<p class=MsoFootnoteText><a style='mso-footnote-id:ftn1'>[1]</a> Footnote content</p>\n* \t\t<table class=\"MsoTableGrid\">...</table>\n* \t</div>\n* </div>\n* ```\n*\n* Will be transformed into:\n*\n* ```html\n* <p>Text with footnote<sup class=\"footnote\"><a id=\"ref-footnote-ftn1\" href=\"#footnote-ftn1\">1</a></sup> reference.</p>\n*\n* <div class=\"footnotes\">\n* \t<hr class=\"footnotes-divider\">\n* \t<ol class=\"footnotes-list\">\n* \t\t<li class=\"footnote-definition\" id=\"footnote-ftn1\">\n* \t\t\t<a href=\"#ref-footnote-ftn1\" class=\"footnote-backlink\">^</a>\n* \t\t\t<div class=\"footnote-content\">\n* \t\t\t\t<p>Footnote content</p>\n* \t\t\t\t<table>...</table>\n* \t\t\t</div>\n* \t\t</li>\n* \t</ol>\n* </div>\n* ```\n*\n* @param documentFragment `data.content` obtained from clipboard.\n* @param writer The view writer instance.\n* @internal\n*/\nfunction replaceMSFootnotes(documentFragment, writer) {\n\tconst msFootnotesRefs = /* @__PURE__ */ new Map();\n\tconst msFootnotesDefs = /* @__PURE__ */ new Map();\n\tlet msFootnotesDefinitionsList = null;\n\tfor (const { item } of writer.createRangeIn(documentFragment)) {\n\t\tif (!item.is(\"element\")) continue;\n\t\tif (item.getStyle(\"mso-element\") === \"footnote-list\") {\n\t\t\tmsFootnotesDefinitionsList = item;\n\t\t\tcontinue;\n\t\t}\n\t\tif (item.hasStyle(\"mso-footnote-id\")) {\n\t\t\tconst msFootnoteDef = item.findAncestor(\"element\", (el) => el.getStyle(\"mso-element\") === \"footnote\");\n\t\t\tif (msFootnoteDef) {\n\t\t\t\tconst msFootnoteDefId = msFootnoteDef.getAttribute(\"id\");\n\t\t\t\tmsFootnotesDefs.set(msFootnoteDefId, msFootnoteDef);\n\t\t\t} else {\n\t\t\t\tconst msFootnoteRefId = item.getStyle(\"mso-footnote-id\");\n\t\t\t\tmsFootnotesRefs.set(msFootnoteRefId, item);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t}\n\tif (!msFootnotesRefs.size || !msFootnotesDefinitionsList) return;\n\tconst footnotesList = createFootnotesListContainerElement(writer);\n\twriter.replace(msFootnotesDefinitionsList, footnotesList.wrapper);\n\tfor (const [footnoteId, msFootnoteRef] of msFootnotesRefs) {\n\t\tconst msFootnoteDef = msFootnotesDefs.get(footnoteId);\n\t\tif (!msFootnoteDef) continue;\n\t\twriter.replace(msFootnoteRef, createFootnoteRefViewElement(writer, footnoteId));\n\t\tconst defElements = createFootnoteDefViewElement(writer, footnoteId);\n\t\tremoveMSReferences(writer, msFootnoteDef);\n\t\tfor (const child of msFootnoteDef.getChildren()) {\n\t\t\tlet clonedChild = child;\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (child.is(\"element\")) clonedChild = writer.clone(child, true);\n\t\t\twriter.appendChild(clonedChild, defElements.content);\n\t\t}\n\t\twriter.appendChild(defElements.listItem, footnotesList.list);\n\t}\n}\n/**\n* Removes all MS Office specific references from the given element.\n*\n* It also removes leading space from text nodes following the references, as MS Word adds\n* them to separate the reference from the rest of the text.\n*\n* @param writer The view writer.\n* @param element The element to trim.\n* @returns The trimmed element.\n*/\nfunction removeMSReferences(writer, element) {\n\tconst elementsToRemove = [];\n\tconst textNodesToTrim = [];\n\tfor (const { item } of writer.createRangeIn(element)) if (item.is(\"element\") && item.getStyle(\"mso-footnote-id\")) {\n\t\telementsToRemove.unshift(item);\n\t\tconst { nextSibling } = item;\n\t\tif (nextSibling?.is(\"$text\") && nextSibling.data.startsWith(\" \")) textNodesToTrim.unshift(nextSibling);\n\t}\n\tfor (const element of elementsToRemove) writer.remove(element);\n\tfor (const textNode of textNodesToTrim) {\n\t\tconst trimmedData = textNode.data.substring(1);\n\t\tif (trimmedData.length > 0) {\n\t\t\tconst parent = textNode.parent;\n\t\t\tconst index = parent.getChildIndex(textNode);\n\t\t\tconst newTextNode = writer.createText(trimmedData);\n\t\t\twriter.remove(textNode);\n\t\t\twriter.insertChild(index, newTextNode, parent);\n\t\t} else writer.remove(textNode);\n\t}\n\treturn element;\n}\n/**\n* Creates a footnotes list container element.\n*\n* @param writer The view writer instance.\n* @returns The footnotes list container element and list itself.\n*/\nfunction createFootnotesListContainerElement(writer) {\n\tconst divider = writer.createElement(\"hr\", { class: \"footnotes-divider\" });\n\tconst list = writer.createElement(\"ol\", { class: \"footnotes-list\" });\n\treturn {\n\t\tlist,\n\t\twrapper: writer.createElement(\"div\", { class: \"footnotes\" }, [divider, list])\n\t};\n}\n/**\n* Creates a footnote reference view element.\n*\n* @param writer The view writer instance.\n* @param footnoteId The footnote ID.\n* @returns The footnote reference view element.\n*/\nfunction createFootnoteRefViewElement(writer, footnoteId) {\n\tconst sup = writer.createElement(\"sup\", { class: \"footnote\" });\n\tconst link = writer.createElement(\"a\", {\n\t\tid: `ref-${footnoteId}`,\n\t\thref: `#${footnoteId}`\n\t});\n\twriter.appendChild(link, sup);\n\treturn sup;\n}\n/**\n* Creates a footnote definition view element with a backlink and a content container.\n*\n* @param writer The view writer instance.\n* @param footnoteId The footnote ID.\n* @returns An object containing the list item element, backlink and content container.\n*/\nfunction createFootnoteDefViewElement(writer, footnoteId) {\n\tconst listItem = writer.createElement(\"li\", {\n\t\tid: footnoteId,\n\t\tclass: \"footnote-definition\"\n\t});\n\tconst backLink = writer.createElement(\"a\", {\n\t\thref: `#ref-${footnoteId}`,\n\t\tclass: \"footnote-backlink\"\n\t});\n\tconst content = writer.createElement(\"div\", { class: \"footnote-content\" });\n\twriter.appendChild(writer.createText(\"^\"), backLink);\n\twriter.appendChild(backLink, listItem);\n\twriter.appendChild(content, listItem);\n\treturn {\n\t\tlistItem,\n\t\tcontent\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*/\nconst msWordMatch1 = /<meta\\s*name=\"?generator\"?\\s*content=\"?microsoft\\s*word\\s*\\d+\"?\\/?>/i;\nconst msWordMatch2 = /xmlns:o=\"urn:schemas-microsoft-com/i;\nconst msExcelMatch = /<meta\\s*name=\"?generator\"?\\s*content=\"?microsoft\\s*excel\\s*\\d+\"?\\/?>/i;\n/**\n* Normalizer for the content pasted from Microsoft Word.\n*/\nvar PasteFromOfficeMSWordNormalizer = class {\n\tdocument;\n\thasMultiLevelListPlugin;\n\thasTablePropertiesPlugin;\n\tenableSkipLevelLists;\n\t/**\n\t* Creates a new `PasteFromOfficeMSWordNormalizer` instance.\n\t*\n\t* @param document View document.\n\t*/\n\tconstructor(document, hasMultiLevelListPlugin = false, hasTablePropertiesPlugin = false, enableSkipLevelLists = false) {\n\t\tthis.document = document;\n\t\tthis.hasMultiLevelListPlugin = hasMultiLevelListPlugin;\n\t\tthis.hasTablePropertiesPlugin = hasTablePropertiesPlugin;\n\t\tthis.enableSkipLevelLists = enableSkipLevelLists;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tisActive(htmlString) {\n\t\treturn msWordMatch1.test(htmlString) || msWordMatch2.test(htmlString) || msExcelMatch.test(htmlString);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute(data) {\n\t\tconst writer = new ViewUpcastWriter(this.document);\n\t\tconst stylesString = data.extraContent.stylesString;\n\t\ttransformBookmarks(data.content, writer);\n\t\ttransformListItemLikeElementsIntoLists(data.content, stylesString, this.hasMultiLevelListPlugin, this.enableSkipLevelLists);\n\t\treplaceImagesSourceWithBase64(data.content, data.dataTransfer.getData(\"text/rtf\"));\n\t\ttransformTables(data.content, writer, this.hasTablePropertiesPlugin);\n\t\tremoveInvalidTableWidth(data.content, writer);\n\t\treplaceMSFootnotes(data.content, writer);\n\t\tremoveMSAttributes(data.content);\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* Removes the `<b>` tag wrapper added by Google Docs to a copied content.\n*\n* @param documentFragment element `data.content` obtained from clipboard\n* @internal\n*/\nfunction removeBoldWrapper(documentFragment, writer) {\n\tfor (const child of documentFragment.getChildren()) if (child.is(\"element\", \"b\") && child.getStyle(\"font-weight\") === \"normal\") {\n\t\tconst childIndex = documentFragment.getChildIndex(child);\n\t\twriter.remove(child);\n\t\twriter.insertChild(childIndex, child.getChildren(), documentFragment);\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 paste-from-office/filters/br\n*/\n/**\n* Transforms `<br>` elements that are siblings to some block element into a paragraphs.\n*\n* @param documentFragment The view structure to be transformed.\n* @internal\n*/\nfunction transformBlockBrsToParagraphs(documentFragment, writer) {\n\tconst viewDocument = new ViewDocument(writer.document.stylesProcessor);\n\tconst domConverter = new ViewDomConverter(viewDocument, { renderingMode: \"data\" });\n\tconst blockElements = domConverter.blockElements;\n\tconst inlineObjectElements = domConverter.inlineObjectElements;\n\tconst elementsToReplace = [];\n\tfor (const value of writer.createRangeIn(documentFragment)) {\n\t\tconst element = value.item;\n\t\tif (element.is(\"element\", \"br\")) {\n\t\t\tconst nextSibling = findSibling(element, \"forward\", writer, {\n\t\t\t\tblockElements,\n\t\t\t\tinlineObjectElements\n\t\t\t});\n\t\t\tconst previousSibling = findSibling(element, \"backward\", writer, {\n\t\t\t\tblockElements,\n\t\t\t\tinlineObjectElements\n\t\t\t});\n\t\t\tconst nextSiblingIsBlock = isBlockViewElement(nextSibling, blockElements);\n\t\t\tif (isBlockViewElement(previousSibling, blockElements) || nextSiblingIsBlock) elementsToReplace.push(element);\n\t\t}\n\t}\n\tfor (const element of elementsToReplace) if (element.hasClass(\"Apple-interchange-newline\")) writer.remove(element);\n\telse writer.replace(element, writer.createElement(\"p\"));\n}\n/**\n* Returns sibling node, threats inline elements as transparent (but should stop on an inline objects).\n*/\nfunction findSibling(viewElement, direction, writer, { blockElements, inlineObjectElements }) {\n\tlet position = writer.createPositionAt(viewElement, direction == \"forward\" ? \"after\" : \"before\");\n\tposition = position.getLastMatchingPosition(({ item }) => item.is(\"element\") && !blockElements.includes(item.name) && !inlineObjectElements.includes(item.name), { direction });\n\treturn direction == \"forward\" ? position.nodeAfter : position.nodeBefore;\n}\n/**\n* Returns true for view elements that are listed as block view elements.\n*/\nfunction isBlockViewElement(node, blockElements) {\n\treturn !!node && node.is(\"element\") && blockElements.includes(node.name);\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* Replaces tab characters with spaces in text nodes that are inside elements styled with `white-space: pre-wrap`.\n*\n* This is a workaround for incorrect detection of pre-like formatting in the DOM converter for pasted Google Docs documents.\n* When an element uses `white-space: pre-wrap`, the editor reduces tab characters to a single space, causing\n* inconsistent spacing in pasted content. This function replaces tabs with spaces to ensure visual consistency.\n* This is intended as a temporary solution.\n*\n* See: https://github.com/ckeditor/ckeditor5/issues/18995\n*\n* @param documentFragment The `data.content` element obtained from the clipboard.\n* @param writer The upcast writer used to manipulate the view structure.\n* @param tabWidth The number of spaces to replace each tab with. Defaults to 8.\n* @internal\n*/\nfunction replaceTabsWithinPreWithSpaces(documentFragment, writer, tabWidth) {\n\tconst textNodesToReplace = /* @__PURE__ */ new Set();\n\tfor (const child of writer.createRangeIn(documentFragment).getItems()) {\n\t\tif (!child.is(\"view:$textProxy\") || !child.data.includes(\"\t\")) continue;\n\t\tif (hasPreWrapParent(child.parent)) textNodesToReplace.add(child.textNode);\n\t}\n\tfor (const textNode of textNodesToReplace) replaceTabsInTextNode(textNode, writer, tabWidth);\n}\n/**\n* Checks if element or any of its parents has `white-space: pre-wrap` style.\n*/\nfunction hasPreWrapParent(element) {\n\tlet parent = element;\n\twhile (parent) {\n\t\tif (parent.is(\"element\")) {\n\t\t\tif (parent.getStyle?.(\"white-space\") === \"pre-wrap\") return true;\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\treturn false;\n}\n/**\n* Replaces all tabs with spaces in the given text node.\n*/\nfunction replaceTabsInTextNode(textNode, writer, tabWidth) {\n\tconst { parent, data } = textNode;\n\tconst replacedData = data.replaceAll(\"\t\", \" \".repeat(tabWidth));\n\tconst index = parent.getChildIndex(textNode);\n\twriter.remove(textNode);\n\twriter.insertChild(index, writer.createText(replacedData), parent);\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 paste-from-office/normalizers/googledocsnormalizer\n*/\nconst googleDocsMatch = /id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;\n/**\n* Normalizer for the content pasted from Google Docs.\n*\n* @internal\n*/\nvar GoogleDocsNormalizer = class {\n\tdocument;\n\t/**\n\t* Creates a new `GoogleDocsNormalizer` instance.\n\t*\n\t* @param document View document.\n\t*/\n\tconstructor(document) {\n\t\tthis.document = document;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tisActive(htmlString) {\n\t\treturn googleDocsMatch.test(htmlString);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute(data) {\n\t\tconst writer = new ViewUpcastWriter(this.document);\n\t\tremoveBoldWrapper(data.content, writer);\n\t\tunwrapParagraphInListItem(data.content, writer);\n\t\ttransformBlockBrsToParagraphs(data.content, writer);\n\t\treplaceTabsWithinPreWithSpaces(data.content, writer, 8);\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* Removes the `xmlns` attribute from table pasted from Google Sheets.\n*\n* @param documentFragment element `data.content` obtained from clipboard\n* @internal\n*/\nfunction removeXmlns(documentFragment, writer) {\n\tfor (const child of documentFragment.getChildren()) if (child.is(\"element\", \"table\") && child.hasAttribute(\"xmlns\")) writer.removeAttribute(\"xmlns\", child);\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* Removes the `<google-sheets-html-origin>` tag wrapper added by Google Sheets to a copied content.\n*\n* @param documentFragment element `data.content` obtained from clipboard\n* @internal\n*/\nfunction removeGoogleSheetsTag(documentFragment, writer) {\n\tfor (const child of documentFragment.getChildren())\n /* v8 ignore else -- @preserve */\n\tif (child.is(\"element\", \"google-sheets-html-origin\")) {\n\t\tconst childIndex = documentFragment.getChildIndex(child);\n\t\twriter.remove(child);\n\t\twriter.insertChild(childIndex, child.getChildren(), documentFragment);\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* Removes `<style>` block added by Google Sheets to a copied content.\n*\n* @param documentFragment element `data.content` obtained from clipboard\n* @internal\n*/\nfunction removeStyleBlock(documentFragment, writer) {\n\tfor (const child of Array.from(documentFragment.getChildren())) if (child.is(\"element\", \"style\")) writer.remove(child);\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 paste-from-office/normalizers/googlesheetsnormalizer\n*/\nconst googleSheetsMatch = /<google-sheets-html-origin/i;\n/**\n* Normalizer for the content pasted from Google Sheets.\n*\n* @internal\n*/\nvar GoogleSheetsNormalizer = class {\n\tdocument;\n\t/**\n\t* Creates a new `GoogleSheetsNormalizer` instance.\n\t*\n\t* @param document View document.\n\t*/\n\tconstructor(document) {\n\t\tthis.document = document;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tisActive(htmlString) {\n\t\treturn googleSheetsMatch.test(htmlString);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute(data) {\n\t\tconst writer = new ViewUpcastWriter(this.document);\n\t\tremoveGoogleSheetsTag(data.content, writer);\n\t\tremoveXmlns(data.content, writer);\n\t\tremoveInvalidTableWidth(data.content, writer);\n\t\tremoveStyleBlock(data.content, writer);\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 paste-from-office/filters/space\n*/\n/**\n* Replaces last space preceding elements closing tag with `&nbsp;`. Such operation prevents spaces from being removed\n* during further DOM/View processing (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDomInlineNodes}).\n* This method also takes into account Word specific `<o:p></o:p>` empty tags.\n* Additionally multiline sequences of spaces and new lines between tags are removed (see\n* https://github.com/ckeditor/ckeditor5-paste-from-office/issues/39\n* and https://github.com/ckeditor/ckeditor5-paste-from-office/issues/40).\n*\n* @param htmlString HTML string in which spacing should be normalized.\n* @returns Input HTML with spaces normalized.\n* @internal\n*/\nfunction normalizeSpacing(htmlString) {\n\treturn normalizeSafariSpaceSpans(normalizeSafariSpaceSpans(htmlString)).replace(/(<span\\s+style=['\"]mso-spacerun:yes['\"]>[^\\S\\r\\n]*?)[\\r\\n]+([^\\S\\r\\n]*<\\/span>)/g, \"$1$2\").replace(/<span\\s+style=['\"]mso-spacerun:yes['\"]><\\/span>/g, \"\").replace(/(<span\\s+style=['\"]letter-spacing:[^'\"]+?['\"]>)[\\r\\n]+(<\\/span>)/g, \"$1 $2\").replace(/ <\\//g, \"\\xA0</\").replace(/ <o:p><\\/o:p>/g, \"\\xA0<o:p></o:p>\").replace(/<o:p>(&nbsp;|\\u00A0)<\\/o:p>/g, \"\").replace(/>([^\\S\\r\\n]*[\\r\\n]\\s*)</g, \"><\");\n}\n/**\n* Normalizes spacing in special Word `spacerun spans` (`<span style='mso-spacerun:yes'>\\s+</span>`) by replacing\n* all spaces with `&nbsp; ` pairs. This prevents spaces from being removed during further DOM/View processing\n* (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDomInlineNodes}).\n*\n* @param htmlDocument Native `Document` object in which spacing should be normalized.\n* @internal\n*/\nfunction normalizeSpacerunSpans(htmlDocument) {\n\thtmlDocument.querySelectorAll(\"span[style*=spacerun]\").forEach((el) => {\n\t\tconst htmlElement = el;\n\t\tconst innerTextLength = htmlElement.innerText.length || 0;\n\t\thtmlElement.innerText = Array(innerTextLength + 1).join(\"\\xA0 \").substr(0, innerTextLength);\n\t});\n}\n/**\n* Normalizes specific spacing generated by Safari when content pasted from Word (`<span class=\"Apple-converted-space\"> </span>`)\n* by replacing all spaces sequences longer than 1 space with `&nbsp; ` pairs. This prevents spaces from being removed during\n* further DOM/View processing (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDataFromDomText}).\n*\n* This function is similar to {@link module:clipboard/utils/normalizeclipboarddata normalizeClipboardData util} but uses\n* regular spaces / &nbsp; sequence for replacement.\n*\n* @param htmlString HTML string in which spacing should be normalized\n* @returns Input HTML with spaces normalized.\n* @internal\n*/\nfunction normalizeSafariSpaceSpans(htmlString) {\n\treturn htmlString.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g, (fullMatch, spaces) => {\n\t\treturn spaces.length === 1 ? \" \" : Array(spaces.length + 1).join(\"\\xA0 \").substr(0, spaces.length);\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 paste-from-office/filters/parse\n*/\n/**\n* Parses the provided HTML extracting contents of `<body>` and `<style>` tags.\n*\n* @param htmlString HTML string to be parsed.\n*/\nfunction parsePasteOfficeHtml(htmlString, stylesProcessor) {\n\tconst domParser = new DOMParser();\n\thtmlString = htmlString.replace(/<!--\\[if gte vml 1]>/g, \"\");\n\thtmlString = htmlString.replace(/<o:SmartTagType(?:\\s+[^\\s>=]+(?:=\"[^\"]*\")?)*\\s*\\/?>/gi, \"\");\n\tconst normalizedHtml = normalizeSpacing(cleanContentAfterBody(htmlString));\n\tconst htmlDocument = domParser.parseFromString(normalizedHtml, \"text/html\");\n\tnormalizeSpacerunSpans(htmlDocument);\n\tremoveInBodyStyleBlocks(htmlDocument);\n\tconst bodyString = htmlDocument.body.innerHTML;\n\tconst bodyView = documentToView(htmlDocument, stylesProcessor);\n\tconst stylesObject = extractStyles(htmlDocument);\n\treturn {\n\t\tbody: bodyView,\n\t\tbodyString,\n\t\tstyles: stylesObject.styles,\n\t\tstylesString: stylesObject.stylesString\n\t};\n}\n/**\n* Transforms native `Document` object into {@link module:engine/view/documentfragment~ViewDocumentFragment}. Comments are skipped.\n*\n* @param htmlDocument Native `Document` object to be transformed.\n*/\nfunction documentToView(htmlDocument, stylesProcessor) {\n\tconst viewDocument = new ViewDocument(stylesProcessor);\n\tconst domConverter = new ViewDomConverter(viewDocument, { renderingMode: \"data\" });\n\tconst fragment = htmlDocument.createDocumentFragment();\n\tconst nodes = htmlDocument.body.childNodes;\n\twhile (nodes.length > 0) fragment.appendChild(nodes[0]);\n\treturn domConverter.domToView(fragment, { skipComments: true });\n}\n/**\n* Removes all `<style>` elements found inside the `<body>` of the provided `htmlDocument`.\n*\n* This guards against sources that place (or flatten) a `<style>` block into the body, where its CSS text\n* would otherwise be converted to visible text. Styles located in the `<head>` are not affected.\n*\n* @param htmlDocument Native `Document` object to be cleaned.\n*/\nfunction removeInBodyStyleBlocks(htmlDocument) {\n\tfor (const style of Array.from(htmlDocument.body.querySelectorAll(\"style\"))) style.remove();\n}\n/**\n* Extracts both `CSSStyleSheet` and string representation from all `style` elements available in a provided `htmlDocument`.\n*\n* @param htmlDocument Native `Document` object from which styles will be extracted.\n*/\nfunction extractStyles(htmlDocument) {\n\tconst styles = [];\n\tconst stylesString = [];\n\tconst styleTags = Array.from(htmlDocument.getElementsByTagName(\"style\"));\n\tfor (const style of styleTags) if (style.sheet && style.sheet.cssRules && style.sheet.cssRules.length) {\n\t\tstyles.push(style.sheet);\n\t\tstylesString.push(style.innerHTML);\n\t}\n\treturn {\n\t\tstyles,\n\t\tstylesString: stylesString.join(\" \")\n\t};\n}\n/**\n* Removes leftover content from between closing </body> and closing </html> tag:\n*\n* ```html\n* <html><body><p>Foo Bar</p></body><span>Fo</span></html> -> <html><body><p>Foo Bar</p></body></html>\n* ```\n*\n* This function is used as specific browsers (Edge) add some random content after `body` tag when pasting from Word.\n* @param htmlString The HTML string to be cleaned.\n* @returns The HTML string with leftover content removed.\n*/\nfunction cleanContentAfterBody(htmlString) {\n\tconst bodyCloseTag = \"</body>\";\n\tconst htmlCloseTag = \"</html>\";\n\tconst bodyCloseIndex = htmlString.indexOf(bodyCloseTag);\n\tif (bodyCloseIndex < 0) return htmlString;\n\tconst htmlCloseIndex = htmlString.indexOf(htmlCloseTag, bodyCloseIndex + 7);\n\treturn htmlString.substring(0, bodyCloseIndex + 7) + (htmlCloseIndex >= 0 ? htmlString.substring(htmlCloseIndex) : \"\");\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 paste-from-office/pastefromoffice\n*/\n/**\n* The Paste from Office plugin.\n*\n* This plugin handles content pasted from Office apps and transforms it (if necessary)\n* to a valid structure which can then be understood by the editor features.\n*\n* Transformation is made by a set of predefined {@link module:paste-from-office/normalizer~PasteFromOfficeNormalizer normalizers}.\n* This plugin includes following normalizers:\n* * {@link module:paste-from-office/normalizers/mswordnormalizer~PasteFromOfficeMSWordNormalizer Microsoft Word normalizer}\n* * {@link module:paste-from-office/normalizers/googledocsnormalizer~GoogleDocsNormalizer Google Docs normalizer}\n*\n* For more information about this feature check the {@glink api/paste-from-office package page}.\n*/\nvar PasteFromOffice = class extends Plugin {\n\t/**\n\t* The priority array of registered normalizers.\n\t*/\n\t_normalizers = [];\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"PasteFromOffice\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"PFO\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ClipboardPipeline];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst clipboardPipeline = editor.plugins.get(\"ClipboardPipeline\");\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tconst hasMultiLevelListPlugin = this.editor.plugins.has(\"MultiLevelListEditing\");\n\t\tconst hasTablePropertiesPlugin = this.editor.plugins.has(\"TablePropertiesEditing\");\n\t\tconst enableSkipLevelLists = !!this.editor.config.get(\"list.enableSkipLevelLists\");\n\t\tthis.registerNormalizer(new PasteFromOfficeMSWordNormalizer(viewDocument, hasMultiLevelListPlugin, hasTablePropertiesPlugin, enableSkipLevelLists));\n\t\tthis.registerNormalizer(new GoogleDocsNormalizer(viewDocument));\n\t\tthis.registerNormalizer(new GoogleSheetsNormalizer(viewDocument));\n\t\tviewDocument.on(\"clipboardInput\", (evt, data) => {\n\t\t\tif (typeof data.content != \"string\") return;\n\t\t\tconst htmlString = data.dataTransfer.getData(\"text/html\");\n\t\t\tif (this._normalizers.find(({ normalizer }) => normalizer.isActive(htmlString))) {\n\t\t\t\tconst parsedData = parsePasteOfficeHtml(data.content, viewDocument.stylesProcessor);\n\t\t\t\tdata.content = parsedData.body;\n\t\t\t\tdata.extraContent = {\n\t\t\t\t\t...parsedData,\n\t\t\t\t\tisTransformedWithPasteFromOffice: true\n\t\t\t\t};\n\t\t\t}\n\t\t}, { priority: priorities.low + 10 });\n\t\tclipboardPipeline.on(\"inputTransformation\", (evt, data) => {\n\t\t\tif (!data.extraContent || !data.extraContent.isTransformedWithPasteFromOffice) return;\n\t\t\tconst htmlString = data.dataTransfer.getData(\"text/html\");\n\t\t\tconst normalizers = this._normalizers.filter(({ normalizer }) => normalizer.isActive(htmlString));\n\t\t\tfor (const { normalizer } of normalizers) normalizer.execute(data);\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Registers a normalizer with the given priority.\n\t*/\n\tregisterNormalizer(normalizer, priority) {\n\t\tinsertToPriorityArray(this._normalizers, {\n\t\t\tnormalizer,\n\t\t\tpriority: priorities.get(priority)\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\nexport { PasteFromOffice, GoogleDocsNormalizer as PasteFromOfficeGoogleDocsNormalizer, GoogleSheetsNormalizer as PasteFromOfficeGoogleSheetsNormalizer, PasteFromOfficeMSWordNormalizer, _convertHexToBase64, convertCssLengthToPx as _convertPasteOfficeCssLengthToPx, isPx as _isPasteOfficePxValue, normalizeSpacerunSpans as _normalizePasteOfficeSpaceRunSpans, normalizeSpacing as _normalizePasteOfficeSpacing, removeGoogleSheetsTag as _removePasteGoogleOfficeSheetsTag, removeMSAttributes as _removePasteMSOfficeAttributes, removeBoldWrapper as _removePasteOfficeBoldWrapper, removeInvalidTableWidth as _removePasteOfficeInvalidTableWidths, removeStyleBlock as _removePasteOfficeStyleBlock, removeXmlns as _removePasteOfficeXmlnsAttributes, replaceImagesSourceWithBase64 as _replacePasteOfficeImagesSourceWithBase64, toPx as _toPasteOfficePxValue, transformBlockBrsToParagraphs as _transformPasteOfficeBlockBrsToParagraphs, transformBookmarks as _transformPasteOfficeBookmarks, transformListItemLikeElementsIntoLists as _transformPasteOfficeListItemLikeElementsIntoLists, transformTables as _transformPasteOfficeTables, unwrapParagraphInListItem as _unwrapPasteOfficeParagraphInListItem, parsePasteOfficeHtml };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module paste-from-office/filters/bookmark\n */\n\nimport type {\n\tViewUpcastWriter,\n\tViewDocumentFragment,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Transforms `<a>` elements which are bookmarks by moving their children after the element.\n *\n * @internal\n */\nexport function transformBookmarks(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter\n): void {\n\tconst elementsToChange = [];\n\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif (\n\t\t\telement.is( 'element', 'a' ) &&\n\t\t\t!element.hasAttribute( 'href' ) &&\n\t\t\t( element.hasAttribute( 'id' ) || element.hasAttribute( 'name' ) ) )\n\t\t{\n\t\t\telementsToChange.push( element );\n\t\t}\n\t}\n\n\tfor ( const element of elementsToChange ) {\n\t\tconst index = element.parent!.getChildIndex( element ) + 1;\n\t\tconst children = element.getChildren();\n\n\t\twriter.insertChild( index, children, element.parent! );\n\n\t\tif ( isHiddenBookmarkAnchor( element ) ) {\n\t\t\twriter.remove( element );\n\t\t}\n\t}\n}\n\n/**\n * Checks whether the given element is a hidden or auto-generated bookmark anchor.\n *\n * Editors like MS Word and Google Docs use the `name` attribute (rather than `id`)\n * for bookmarks. Furthermore, they reserve `_`-prefixed bookmark names for\n * auto-generated anchors (e.g., Table of Contents or internal hyperlinks) and\n * do not allow users to manually create custom bookmarks starting with an underscore.\n *\n * @param element The element to check.\n * @returns True if the element is a hidden bookmark anchor, false otherwise.\n */\nfunction isHiddenBookmarkAnchor( element: ViewElement ) {\n\tconst name = element.getAttribute( 'name' );\n\n\treturn !!name && name.startsWith( '_' );\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/**\n * @module paste-from-office/filters/utils\n */\n\n/**\n * Normalizes CSS length value to 'px'.\n *\n * @internal\n */\nexport function convertCssLengthToPx( value: string ): string {\n\tconst numericValue = parseFloat( value );\n\n\tif ( value.endsWith( 'pt' ) ) {\n\t\t// 1pt = 1in / 72\n\t\treturn toPx( numericValue * 96 / 72 );\n\t}\n\telse if ( value.endsWith( 'pc' ) ) {\n\t\t// 1pc = 12pt = 1in / 6.\n\t\treturn toPx( numericValue * 12 * 96 / 72 );\n\t}\n\telse if ( value.endsWith( 'in' ) ) {\n\t\t// 1in = 2.54cm = 96px\n\t\treturn toPx( numericValue * 96 );\n\t}\n\telse if ( value.endsWith( 'cm' ) ) {\n\t\t// 1cm = 96px / 2.54\n\t\treturn toPx( numericValue * 96 / 2.54 );\n\t}\n\telse if ( value.endsWith( 'mm' ) ) {\n\t\t// 1mm = 1cm / 10\n\t\treturn toPx( numericValue / 10 * 96 / 2.54 );\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns true for value with 'px' unit.\n *\n * @internal\n */\nexport function isPx( value?: string ): value is string {\n\treturn value !== undefined && value.endsWith( 'px' );\n}\n\n/**\n * Returns a rounded 'px' value.\n *\n * @internal\n */\nexport function toPx( value: number ): string {\n\treturn Math.round( value ) + 'px';\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/**\n * @module paste-from-office/filters/list\n */\n\nimport {\n\tMatcher,\n\tViewUpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode,\n\ttype ViewText\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tconvertCssLengthToPx,\n\ttoPx\n} from './utils.js';\n\n/**\n * Transforms Word specific list-like elements to the semantic HTML lists.\n *\n * Lists in Word are represented by block elements with special attributes like:\n *\n * ```xml\n * <p class=MsoListParagraphCxSpFirst style='mso-list:l1 level1 lfo1'>...</p> // Paragraph based list.\n * <h1 style='mso-list:l0 level1 lfo1'>...</h1> // Heading 1 based list.\n * ```\n *\n * @param documentFragment The view structure to be transformed.\n * @param stylesString Styles from which list-like elements styling will be extracted.\n * @param hasMultiLevelListPlugin Whether the editor has the multi-level list plugin enabled.\n * @param enableSkipLevelLists Whether to enable skip-level lists.\n * @internal\n */\nexport function transformListItemLikeElementsIntoLists(\n\tdocumentFragment: ViewDocumentFragment,\n\tstylesString: string,\n\thasMultiLevelListPlugin: boolean,\n\tenableSkipLevelLists: boolean = false\n): void {\n\tif ( !documentFragment.childCount ) {\n\t\treturn;\n\t}\n\n\tconst writer = new ViewUpcastWriter( documentFragment.document );\n\tconst itemLikeElements = findAllItemLikeElements( documentFragment, writer );\n\n\tif ( !itemLikeElements.length ) {\n\t\treturn;\n\t}\n\n\t// Tracks how many items have been added to each encountered list, keyed by indent level and list ID.\n\t// Used to set the `start` attribute on a new <ol> when a list at a given indent is interrupted by\n\t// a non-list block (e.g. a paragraph) and then resumed.\n\t// Structure: [ { [listId:level]: itemCount } ] (array index is the indent level)\n\t// Example: [ { '1:1': 3 }, { '0:2': 2 } ] means the top-level list (id=1) has 3 items,\n\t// and the nested list (id=0) has 2 items so the next continuation should start at 3.\n\tconst encounteredLists: Array<Record<string, number>> = [];\n\n\tconst stack: ListStack = [];\n\n\tlet topLevelListInfo: TopLevelListInfo = createTopLevelListInfo();\n\n\tfor ( const itemLikeElement of itemLikeElements ) {\n\t\tif ( itemLikeElement.indent !== undefined ) {\n\t\t\tif ( !isListContinuation( itemLikeElement ) ) {\n\t\t\t\tapplyIndentationToTopLevelList( writer, stack, topLevelListInfo );\n\t\t\t\ttopLevelListInfo = createTopLevelListInfo();\n\t\t\t\t// Clear counters for nested levels only. The top-level counter (index 0) must survive\n\t\t\t\t// so that a resumed top-level list (same id, interrupted by a paragraph) can still\n\t\t\t\t// receive the correct `start` attribute. Nested counters must be cleared because\n\t\t\t\t// a sibling top-level list item should not inherit the nested list counts from\n\t\t\t\t// a previous top-level list item.\n\t\t\t\tencounteredLists.length = 1;\n\t\t\t\tstack.length = 0;\n\t\t\t}\n\n\t\t\t// Key used to look up this list inside `encounteredLists[indent]`.\n\t\t\t// Combines the list id and level so that two different lists at the same indent\n\t\t\t// level (e.g. first an <ol>, then a <ul> after a paragraph break) don't share a counter.\n\t\t\tconst originalListId = `${ itemLikeElement.id }:${ itemLikeElement.indent }`;\n\n\t\t\t// When the editor opts into skip-level lists, preserve Word indent gaps (the fill loop below\n\t\t\t// inserts `<li style=\"list-style-type:none\">` wrappers for them). Otherwise clamp to one\n\t\t\t// level below the current stack top — the original pre-skip-level behavior — so the editor's\n\t\t\t// list post-fixer doesn't have to bridge the gap with empty filler paragraphs.\n\t\t\tconst indent = enableSkipLevelLists ?\n\t\t\t\titemLikeElement.indent - 1 :\n\t\t\t\tMath.min( itemLikeElement.indent - 1, stack.length );\n\n\t\t\t// Trimming of the list stack on list ID change.\n\t\t\tif ( indent < stack.length && stack[ indent ].id !== itemLikeElement.id ) {\n\t\t\t\t// A different list at the top level starts here. `isListContinuation` returned true\n\t\t\t\t// (the previous sibling in the DOM is the prior list's `<ol>/<ul>`), so the outer reset\n\t\t\t\t// path didn't run. Flush the prior list's accumulated margin onto its own `<ol>/<ul>`\n\t\t\t\t// BEFORE the stack reference is replaced — otherwise a later flush would hoist that\n\t\t\t\t// margin onto the wrong (interrupting) list and strip it from the original list's\n\t\t\t\t// `<li>`s. The flush is a no-op unless the prior list actually had uniform-margin\n\t\t\t\t// items pushed, so single-item / mixed-margin lists keep their pre-existing\n\t\t\t\t// per-`<li>` margin semantics.\n\t\t\t\tif (\n\t\t\t\t\tindent == 0 &&\n\t\t\t\t\ttopLevelListInfo.canApplyMarginOnList &&\n\t\t\t\t\ttopLevelListInfo.topLevelListItemElements.length > 0\n\t\t\t\t) {\n\t\t\t\t\tapplyIndentationToTopLevelList( writer, stack, topLevelListInfo );\n\t\t\t\t\ttopLevelListInfo = createTopLevelListInfo();\n\t\t\t\t}\n\n\t\t\t\t// A different list started at this indent level — counters for this level and deeper\n\t\t\t\t// belong to the previous list context and must not carry over.\n\t\t\t\tencounteredLists.length = indent;\n\t\t\t\tstack.length = indent;\n\t\t\t}\n\n\t\t\t// Trimming of the list stack on lower indent list encountered.\n\t\t\tif ( indent < stack.length - 1 ) {\n\t\t\t\t// We jumped back to a shallower indent — any counters deeper than the new top are stale.\n\t\t\t\tencounteredLists.length = indent + 1;\n\t\t\t\tstack.length = indent + 1;\n\t\t\t}\n\n\t\t\tconst listStyle = detectListStyle( itemLikeElement, stylesString );\n\n\t\t\t// Word can jump indent levels (e.g. from level 1 directly to level 3) without producing\n\t\t\t// items for the in-between levels. Fill the missing levels with intermediate wrappers —\n\t\t\t// an `<ol>`/`<ul>` of the deepest item's type containing a single `<li style=\"list-style-type:none\">` —\n\t\t\t// so the resulting view matches the shape the skip-level upcast (`listItemSkipLevelConsumer`) expects.\n\t\t\twhile ( stack.length < indent ) {\n\t\t\t\tconst intermediateList = writer.createElement( listStyle.type );\n\t\t\t\tconst intermediateListItem = writer.createElement( 'li' );\n\n\t\t\t\twriter.setStyle( 'list-style-type', 'none', intermediateListItem );\n\n\t\t\t\tif ( stack.length == 0 ) {\n\t\t\t\t\tconst parent = itemLikeElement.element.parent!;\n\t\t\t\t\tconst index = parent.getChildIndex( itemLikeElement.element ) + 1;\n\n\t\t\t\t\twriter.insertChild( index, intermediateList, parent );\n\t\t\t\t} else {\n\t\t\t\t\tconst parentListItems = stack[ stack.length - 1 ].listItemElements;\n\n\t\t\t\t\twriter.appendChild( intermediateList, parentListItems[ parentListItems.length - 1 ] );\n\t\t\t\t}\n\n\t\t\t\twriter.appendChild( intermediateListItem, intermediateList );\n\n\t\t\t\tstack.push( {\n\t\t\t\t\t...itemLikeElement,\n\t\t\t\t\tlistElement: intermediateList,\n\t\t\t\t\tlistItemElements: [ intermediateListItem ],\n\t\t\t\t\tisIntermediate: true,\n\t\t\t\t\t// Intermediate wrappers hold no real list item, so they must not pretend to \"own\" the\n\t\t\t\t\t// deep item's `margin-left` — otherwise `stack.find` (matching non-list multi-block\n\t\t\t\t\t// continuations by margin) returns the shallower intermediate before the real item.\n\t\t\t\t\tmarginLeft: undefined\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Create a new OL/UL if required (greater indent or different list type).\n\t\t\tif (\n\t\t\t\tindent > stack.length - 1 ||\n\t\t\t\tstack[ indent ].listElement.name != listStyle.type\n\t\t\t) {\n\t\t\t\t// If this list was seen before at this indent (i.e. it was interrupted by a non-list block\n\t\t\t\t// and is now resuming), set `start` so the numbering continues from where it left off.\n\t\t\t\tif (\n\t\t\t\t\tlistStyle.type == 'ol' &&\n\t\t\t\t\titemLikeElement.id !== undefined &&\n\t\t\t\t\tencounteredLists[ indent ] &&\n\t\t\t\t\tencounteredLists[ indent ][ originalListId ]\n\t\t\t\t) {\n\t\t\t\t\tlistStyle.startIndex = encounteredLists[ indent ][ originalListId ];\n\t\t\t\t}\n\n\t\t\t\tconst listElement = createNewEmptyList( listStyle, writer, hasMultiLevelListPlugin );\n\n\t\t\t\t// Insert the new OL/UL.\n\t\t\t\tif ( stack.length == 0 ) {\n\t\t\t\t\tconst parent = itemLikeElement.element.parent!;\n\t\t\t\t\tconst index = parent.getChildIndex( itemLikeElement.element ) + 1;\n\n\t\t\t\t\twriter.insertChild( index, listElement, parent );\n\t\t\t\t} else if ( indent == 0 ) {\n\t\t\t\t\t// A real list at root indent while a skip-level intermediate of a different type\n\t\t\t\t\t// already sits there — insert the new list as a sibling of the intermediate in the\n\t\t\t\t\t// same parent (can't merge two lists of different types).\n\t\t\t\t\tconst existingList = stack[ 0 ].listElement;\n\t\t\t\t\tconst listParent = existingList.parent!;\n\t\t\t\t\tconst insertIndex = listParent.getChildIndex( existingList ) + 1;\n\n\t\t\t\t\twriter.insertChild( insertIndex, listElement, listParent );\n\t\t\t\t} else {\n\t\t\t\t\tconst parentListItems = stack[ indent - 1 ].listItemElements;\n\n\t\t\t\t\twriter.appendChild( listElement, parentListItems[ parentListItems.length - 1 ] );\n\t\t\t\t}\n\n\t\t\t\t// Update the list stack for other items to reference.\n\t\t\t\tstack[ indent ] = {\n\t\t\t\t\t...itemLikeElement,\n\t\t\t\t\tlistElement,\n\t\t\t\t\tlistItemElements: []\n\t\t\t\t};\n\n\t\t\t\t// Record the starting value for this list so that if it is interrupted and resumed later,\n\t\t\t\t// the continuation list can pick up numbering from the right value.\n\t\t\t\t// For a fresh list `listStyle.startIndex` is undefined, so we fall back to 1.\n\t\t\t\tif ( itemLikeElement.id !== undefined ) {\n\t\t\t\t\tif ( !encounteredLists[ indent ] ) {\n\t\t\t\t\t\tencounteredLists[ indent ] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tencounteredLists[ indent ][ originalListId ] = listStyle.startIndex || 1;\n\t\t\t\t}\n\t\t\t} else if ( stack[ indent ].isIntermediate ) {\n\t\t\t\t// Same type as the intermediate — reuse its `<ol>`/`<ul>`. The intermediate was created\n\t\t\t\t// without `list-style-type`, `start`, or the `legal-list` class (the fill loop only sets\n\t\t\t\t// the tag name); apply them now from the claiming item so the reused element no longer\n\t\t\t\t// looks like a styleless wrapper.\n\t\t\t\tapplyListStyleToElement( stack[ indent ].listElement, listStyle, writer, hasMultiLevelListPlugin );\n\n\t\t\t\t// Update the wrapper to represent the claiming item (id, marginLeft, …) so later lookups\n\t\t\t\t// don't see stale data from the deep item that originally seeded the intermediate.\n\t\t\t\tstack[ indent ] = {\n\t\t\t\t\t...itemLikeElement,\n\t\t\t\t\tlistElement: stack[ indent ].listElement,\n\t\t\t\t\tlistItemElements: stack[ indent ].listItemElements\n\t\t\t\t};\n\n\t\t\t\t// Same as the create-new path: track this list so that if it is interrupted (e.g. by a\n\t\t\t\t// multi-block paragraph matched against an ancestor frame) and later resumed via a fresh\n\t\t\t\t// `<ol>`, the continuation can set the correct `start` attribute instead of restarting from 1.\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( itemLikeElement.id !== undefined ) {\n\t\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\t\tif ( !encounteredLists[ indent ] ) {\n\t\t\t\t\t\tencounteredLists[ indent ] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tencounteredLists[ indent ][ originalListId ] = listStyle.startIndex || 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Use LI if it is already it or create a new LI element.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/15964\n\t\t\tconst listItem = itemLikeElement.element.name == 'li' ? itemLikeElement.element : writer.createElement( 'li' );\n\n\t\t\tapplyListItemMarginLeftAndUpdateTopLevelInfo( writer, stack, topLevelListInfo, itemLikeElement, listItem, indent );\n\n\t\t\t// Append the LI to OL/UL.\n\t\t\twriter.appendChild( listItem, stack[ indent ].listElement );\n\t\t\tstack[ indent ].listItemElements.push( listItem );\n\n\t\t\t// Count the item so that `encounteredLists` always holds the value the *next* continuation list should start at.\n\t\t\tif ( itemLikeElement.id !== undefined && encounteredLists[ indent ] ) {\n\t\t\t\tencounteredLists[ indent ][ originalListId ]++;\n\t\t\t}\n\n\t\t\t// Append list block to LI.\n\t\t\tif ( itemLikeElement.element != listItem ) {\n\t\t\t\twriter.appendChild( itemLikeElement.element, listItem );\n\t\t\t}\n\n\t\t\t// Clean list block.\n\t\t\tremoveBulletElement( itemLikeElement.element, writer );\n\t\t\twriter.removeStyle( 'text-indent', itemLikeElement.element ); // #12361\n\t\t\twriter.removeStyle( 'margin-left', itemLikeElement.element );\n\t\t}\n\t\telse {\n\t\t\t// Other blocks in a list item.\n\t\t\tconst stackItem = stack.find( stackItem => stackItem.marginLeft == itemLikeElement.marginLeft );\n\n\t\t\t// A non-list block (e.g. a plain paragraph) whose margin-left matches one of the active list items.\n\t\t\t// The match is done by margin-left value — nested list items sometimes have no explicit margin-left,\n\t\t\t// so the match typically resolves to an ancestor <li> rather than the deepest one.\n\t\t\tif ( stackItem ) {\n\t\t\t\tconst listItems = stackItem.listItemElements;\n\n\t\t\t\t// Append block to LI.\n\t\t\t\twriter.appendChild( itemLikeElement.element, listItems[ listItems.length - 1 ] );\n\t\t\t\twriter.removeStyle( 'margin-left', itemLikeElement.element );\n\n\t\t\t\t// Trim the stack to the matched level. Without this, the next nested list item would\n\t\t\t\t// be appended to the existing nested <ol>/<ul> that appears *before* this paragraph\n\t\t\t\t// in the DOM, instead of creating a new one *after* it.\n\t\t\t\tstack.length = stack.indexOf( stackItem ) + 1;\n\t\t\t\t// Clear counters only for levels deeper than the direct children of the matched <li>.\n\t\t\t\t// The counter at `stack.length` must survive so the next nested list can continue\n\t\t\t\t// numbering from where it left off (e.g. <ol start=\"3\">).\n\t\t\t\tencounteredLists.length = stack.length + 1;\n\t\t\t} else {\n\t\t\t\t// A non-list block whose margin matches no active list wrapper fully interrupts the\n\t\t\t\t// current top-level list. Flush the pending uniform margin onto that list (while\n\t\t\t\t// `stack[ 0 ]` still exists) and reset the info, mirroring the non-continuation reset\n\t\t\t\t// above — otherwise the stale `topLevelListInfo` would later be flushed against an\n\t\t\t\t// already-cleared stack, dereferencing `stack[ 0 ]` when it is `undefined`.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5-commercial/issues/10255.\n\t\t\t\tapplyIndentationToTopLevelList( writer, stack, topLevelListInfo );\n\t\t\t\ttopLevelListInfo = createTopLevelListInfo();\n\t\t\t\tstack.length = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tapplyIndentationToTopLevelList( writer, stack, topLevelListInfo );\n}\n\nfunction applyListItemMarginLeftAndUpdateTopLevelInfo(\n\twriter: ViewUpcastWriter,\n\tstack: ListStack,\n\ttopLevelListInfo: TopLevelListInfo,\n\titemLikeElement: ListLikeElement,\n\tlistItem: ViewElement,\n\tindent: number\n) {\n\tif ( itemLikeElement.marginLeft === undefined ) {\n\t\t// If at least one of the list items at indent = 0 does not have margin-left style, we cannot set margin-left on the list.\n\t\tif ( indent == 0 ) {\n\t\t\ttopLevelListInfo.canApplyMarginOnList = false;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tconst listItemBlockMarginLeft = parseFloat( itemLikeElement.marginLeft );\n\n\tlet currentListBlockIndent = 0;\n\n\t// Sum the relative `margin-left` of the last `<li>` in every ancestor stack frame.\n\t// Browser nesting cumulates: each ancestor `<li>`'s margin pushes its descendants further right,\n\t// so to convert Word's absolute `margin-left` into the editor's relative value we have to subtract\n\t// every ancestor's contribution — not only the immediate parent. Skip-level intermediate wrappers\n\t// contribute 0 (no margin set) and so naturally drop out of the sum.\n\tfor ( let ancestorIndex = 0; ancestorIndex < stack.length - 1; ancestorIndex++ ) {\n\t\tconst ancestorListItems = stack[ ancestorIndex ].listItemElements;\n\t\tconst ancestorMargin = ancestorListItems[ ancestorListItems.length - 1 ].getStyle( 'margin-left' );\n\n\t\tif ( ancestorMargin !== undefined ) {\n\t\t\tcurrentListBlockIndent += parseFloat( ancestorMargin );\n\t\t}\n\t}\n\n\t// Add 40px for each indent level because by default HTML lists have 40px indentation (padding-inline-start: 40px).\n\t// So every nested list is indented by another 40px.\n\tcurrentListBlockIndent += stack.length * 40;\n\n\t// Calculate relative list item indentation to the list it is in.\n\tconst adjustedListItemIndent = listItemBlockMarginLeft - currentListBlockIndent;\n\tconst listItemBlockMarginLeftPx = adjustedListItemIndent !== 0 ? toPx( adjustedListItemIndent ) : undefined;\n\n\tif ( listItemBlockMarginLeftPx ) {\n\t\twriter.setStyle( 'margin-left', listItemBlockMarginLeftPx, listItem );\n\n\t\tif ( indent == 0 && topLevelListInfo.canApplyMarginOnList ) {\n\t\t\tif ( topLevelListInfo.marginLeft === undefined ) {\n\t\t\t\ttopLevelListInfo.marginLeft = listItemBlockMarginLeftPx;\n\t\t\t}\n\n\t\t\tif ( listItemBlockMarginLeftPx !== topLevelListInfo.marginLeft ) {\n\t\t\t\ttopLevelListInfo.canApplyMarginOnList = false;\n\t\t\t}\n\n\t\t\ttopLevelListInfo.topLevelListItemElements.push( listItem );\n\t\t}\n\t}\n}\n\nfunction createTopLevelListInfo(): TopLevelListInfo {\n\treturn {\n\t\tmarginLeft: undefined,\n\t\tcanApplyMarginOnList: true,\n\t\ttopLevelListItemElements: []\n\t};\n}\n\n/**\n * Sets margin-left style to the top-level list if all its items have the same margin-left.\n * If margin-left is set on the list, it is removed from all its items to avoid doubling of margins.\n */\nfunction applyIndentationToTopLevelList( writer: ViewUpcastWriter, stack: ListStack, topLevelListInfo: TopLevelListInfo ) {\n\tif (\n\t\ttopLevelListInfo.canApplyMarginOnList &&\n\t\ttopLevelListInfo.marginLeft &&\n\t\ttopLevelListInfo.topLevelListItemElements.length > 0\n\t) {\n\t\t// Apply margin-left to the top-level list if all its items have the same margin-left.\n\t\twriter.setStyle( 'margin-left', topLevelListInfo.marginLeft, stack[ 0 ].listElement );\n\n\t\t// Remove margin-left from all top-level list items.\n\t\tfor ( const topLevelListItem of topLevelListInfo.topLevelListItemElements ) {\n\t\t\twriter.removeStyle( 'margin-left', topLevelListItem );\n\t\t}\n\t}\n}\n\n/**\n * Removes paragraph wrapping content inside a list item.\n *\n * @internal\n */\nexport function unwrapParagraphInListItem(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter\n): void {\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif ( element.is( 'element', 'li' ) ) {\n\t\t\t// Google Docs allows for single paragraph inside LI.\n\t\t\tconst firstChild = element.getChild( 0 );\n\n\t\t\tif ( firstChild && firstChild.is( 'element', 'p' ) ) {\n\t\t\t\twriter.unwrapElement( firstChild );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Finds all list-like elements in a given document fragment.\n *\n * @param documentFragment Document fragment in which to look for list-like nodes.\n * @returns Array of found list-like items. Each item is an object containing\n * @internal\n */\nfunction findAllItemLikeElements(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter\n): Array<ListLikeElement> {\n\tconst range = writer.createRangeIn( documentFragment );\n\tconst itemLikeElements: Array<ListLikeElement> = [];\n\tconst foundMargins = new Set<string>();\n\n\tfor ( const item of range.getItems() ) {\n\t\t// https://github.com/ckeditor/ckeditor5/issues/15964\n\t\tif ( !item.is( 'element' ) || !item.name.match( /^(p|h\\d+|li|div)$/ ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Try to rely on margin-left style to find paragraphs visually aligned with previously encountered list item.\n\t\tlet marginLeft = getMarginLeftNormalized( item );\n\n\t\t// Ignore margin-left 0 style if there is no MsoList... class.\n\t\tif (\n\t\t\tmarginLeft !== undefined &&\n\t\t\tparseFloat( marginLeft ) == 0 &&\n\t\t\t!Array.from( item.getClassNames() ).find( className => className.startsWith( 'MsoList' ) )\n\t\t) {\n\t\t\tmarginLeft = undefined;\n\t\t}\n\n\t\t// List item or a following list item block.\n\t\tif (\n\t\t\t( item.hasStyle( 'mso-list' ) && item.getStyle( 'mso-list' ) !== 'none' ) ||\n\t\t\t( marginLeft !== undefined && foundMargins.has( marginLeft ) )\n\t\t) {\n\t\t\tconst itemData = getListItemData( item );\n\n\t\t\titemLikeElements.push( {\n\t\t\t\telement: item,\n\t\t\t\tid: itemData.id,\n\t\t\t\torder: itemData.order,\n\t\t\t\tindent: itemData.indent,\n\t\t\t\tmarginLeft\n\t\t\t} );\n\n\t\t\tif ( marginLeft !== undefined ) {\n\t\t\t\tfoundMargins.add( marginLeft );\n\t\t\t}\n\t\t}\n\t\t// Clear found margins as we found block after a list.\n\t\telse {\n\t\t\tfoundMargins.clear();\n\t\t}\n\t}\n\n\treturn itemLikeElements;\n}\n\n/**\n * Whether the given element is possibly a list continuation. Previous element was wrapped into a list\n * or the current element already is inside a list.\n */\nfunction isListContinuation( currentItem: ListLikeElement ) {\n\tlet previousSibling = currentItem.element.previousSibling;\n\n\t// Skip past stray inline markers that Word leaves between list paragraphs (e.g. empty\n\t// `<span style='mso-bookmark:...'></span>` or empty `<o:p></o:p>`). They have no visual effect\n\t// but would otherwise break list continuity here — which matters most for nested items pasted\n\t// right after their parent, where breaking the chain causes PFO to clamp the deeper item to\n\t// indent 0 instead of nesting it.\n\twhile ( previousSibling && isStrayInlineMarker( previousSibling ) ) {\n\t\tpreviousSibling = previousSibling.previousSibling;\n\t}\n\n\tif ( !previousSibling ) {\n\t\tconst parent = currentItem.element.parent as ViewElement;\n\n\t\t// If it's a li inside ul or ol like in here: https://github.com/ckeditor/ckeditor5/issues/15964.\n\t\t// If the parent has previous sibling, which is not a list, then it is not a continuation.\n\t\treturn isList( parent ) && ( !parent.previousSibling || isList( parent.previousSibling ) );\n\t}\n\n\t// Even with the same id the list does not have to be continuous (https://github.com/ckeditor/ckeditor5/issues/43).\n\treturn isList( previousSibling );\n}\n\n/**\n * True for empty inline elements Word emits as residue between paragraphs (`<span>`, `<a>`, `<o:p>`).\n * Used by `isListContinuation` to look past these when checking whether the prior block is a list —\n * they're layout artefacts, not real content.\n */\nfunction isStrayInlineMarker( node: ViewNode ): boolean {\n\treturn (\n\t\tnode.is( 'element' ) &&\n\t\tnode.childCount === 0 &&\n\t\t/^(?:span|a|o:p)$/.test( node.name )\n\t);\n}\n\nfunction isList( element: ViewNode ) {\n\treturn element.is( 'element', 'ol' ) || element.is( 'element', 'ul' );\n}\n\n/**\n * Extracts list item style from the provided CSS.\n *\n * List item style is extracted from the CSS stylesheet. Each list with its specific style attribute\n * value (`mso-list:l1 level1 lfo1`) has its dedicated properties in a CSS stylesheet defined with a selector like:\n *\n * ```css\n * @list l1:level1 { ... }\n * ```\n *\n * It contains `mso-level-number-format` property which defines list numbering/bullet style. If this property\n * is not defined it means default `decimal` numbering.\n *\n * Here CSS string representation is used as `mso-level-number-format` property is an invalid CSS property\n * and will be removed during CSS parsing.\n *\n * @param listLikeItem List-like item for which list style will be searched for. Usually\n * a result of `findAllItemLikeElements()` function.\n * @param stylesString CSS stylesheet.\n * @returns An object with properties:\n *\n * * type - List type, could be `ul` or `ol`.\n * * startIndex - List start index, valid only for ordered lists.\n * * style - List style, for example: `decimal`, `lower-roman`, etc. It is extracted\n *     directly from Word stylesheet and adjusted to represent proper values for the CSS `list-style-type` property.\n *     If it cannot be adjusted, the `null` value is returned.\n */\nfunction detectListStyle( listLikeItem: ListLikeElement, stylesString: string ) {\n\tconst listStyleRegexp = new RegExp( `@list l${ listLikeItem.id }:level${ listLikeItem.indent }\\\\s*({[^}]*)`, 'gi' );\n\tconst listStyleTypeRegex = /mso-level-number-format:([^;]{0,100});/gi;\n\tconst listStartIndexRegex = /mso-level-start-at:\\s{0,100}([0-9]{0,10})\\s{0,100};/gi;\n\tconst legalStyleListRegex = new RegExp( `@list\\\\s+l${ listLikeItem.id }:level\\\\d\\\\s*{[^{]*mso-level-text:\"%\\\\d\\\\\\\\.`, 'gi' );\n\tconst multiLevelNumberFormatTypeRegex = new RegExp( `@list l${ listLikeItem.id }:level\\\\d\\\\s*{[^{]*mso-level-number-format:`, 'gi' );\n\n\tconst legalStyleListMatch = legalStyleListRegex.exec( stylesString );\n\tconst multiLevelNumberFormatMatch = multiLevelNumberFormatTypeRegex.exec( stylesString );\n\n\t// Multi level lists in Word have mso-level-number-format attribute except legal lists,\n\t// so we used that. If list has legal list match and doesn't has mso-level-number-format\n\t// then this is legal-list.\n\tconst islegalStyleList = legalStyleListMatch && !multiLevelNumberFormatMatch;\n\n\tconst listStyleMatch = listStyleRegexp.exec( stylesString );\n\n\tlet listStyleType = 'decimal'; // Decimal is default one.\n\tlet type = 'ol'; // <ol> is default list.\n\tlet startIndex = null;\n\n\tif ( listStyleMatch && listStyleMatch[ 1 ] ) {\n\t\tconst listStyleTypeMatch = listStyleTypeRegex.exec( listStyleMatch[ 1 ] );\n\n\t\tif ( listStyleTypeMatch && listStyleTypeMatch[ 1 ] ) {\n\t\t\tlistStyleType = listStyleTypeMatch[ 1 ].trim();\n\t\t\ttype = listStyleType !== 'bullet' && listStyleType !== 'image' ? 'ol' : 'ul';\n\t\t}\n\n\t\t// Styles for the numbered lists are always defined in the Word CSS stylesheet.\n\t\t// Unordered lists MAY contain a value for the Word CSS definition `mso-level-text` but sometimes\n\t\t// this tag is missing. And because of that, we cannot depend on that. We need to predict the list style value\n\t\t// based on the list style marker element.\n\t\tif ( listStyleType === 'bullet' ) {\n\t\t\tconst bulletedStyle = findBulletedListStyle( listLikeItem.element );\n\n\t\t\tif ( bulletedStyle ) {\n\t\t\t\tlistStyleType = bulletedStyle;\n\t\t\t}\n\t\t} else {\n\t\t\tconst listStartIndexMatch = listStartIndexRegex.exec( listStyleMatch[ 1 ] );\n\n\t\t\tif ( listStartIndexMatch && listStartIndexMatch[ 1 ] ) {\n\t\t\t\tstartIndex = parseInt( listStartIndexMatch[ 1 ] );\n\t\t\t}\n\t\t}\n\n\t\tif ( islegalStyleList ) {\n\t\t\ttype = 'ol';\n\t\t}\n\t}\n\n\treturn {\n\t\ttype,\n\t\tstartIndex,\n\t\tstyle: mapListStyleDefinition( listStyleType ),\n\t\tisLegalStyleList: islegalStyleList\n\t};\n}\n\n/**\n * Tries to extract the `list-style-type` value based on the marker element for bulleted list.\n */\nfunction findBulletedListStyle( element: ViewElement ) {\n\t// https://github.com/ckeditor/ckeditor5/issues/15964\n\tif ( element.name == 'li' && element.parent!.name == 'ul' && element.parent!.hasAttribute( 'type' ) ) {\n\t\treturn element.parent!.getAttribute( 'type' );\n\t}\n\n\tconst listMarkerElement = findListMarkerNode( element );\n\n\tif ( !listMarkerElement ) {\n\t\treturn null;\n\t}\n\n\tconst listMarker = listMarkerElement._data;\n\n\tif ( listMarker === 'o' ) {\n\t\treturn 'circle';\n\t} else if ( listMarker === '·' ) {\n\t\treturn 'disc';\n\t}\n\t// Word returns '§' instead of '■' for the square list style.\n\telse if ( listMarker === '§' ) {\n\t\treturn 'square';\n\t}\n\n\treturn null;\n}\n\n/**\n * Tries to find a text node that represents the marker element (list-style-type).\n */\nfunction findListMarkerNode( element: ViewElement ): ViewText | null {\n\t// If the first child is a text node, it is the data for the element.\n\t// The list-style marker is not present here.\n\tif ( element.getChild( 0 )!.is( '$text' ) ) {\n\t\treturn null;\n\t}\n\n\tfor ( const childNode of element.getChildren() ) {\n\t\t// The list-style marker will be inside the `<span>` element. Let's ignore all non-span elements.\n\t\t// It may happen that the `<a>` element is added as the first child. Most probably, it's an anchor element.\n\t\tif ( !childNode.is( 'element', 'span' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst textNodeOrElement = childNode.getChild( 0 );\n\n\t\tif ( !textNodeOrElement ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If already found the marker element, use it.\n\t\tif ( textNodeOrElement.is( '$text' ) ) {\n\t\t\treturn textNodeOrElement;\n\t\t}\n\n\t\treturn ( textNodeOrElement as any ).getChild( 0 );\n\t}\n\n\t/* v8 ignore next -- @preserve */\n\treturn null;\n}\n\n/**\n * Parses the `list-style-type` value extracted directly from the Word CSS stylesheet and returns proper CSS definition.\n */\nfunction mapListStyleDefinition( value: string ) {\n\tif ( value.startsWith( 'arabic-leading-zero' ) ) {\n\t\treturn 'decimal-leading-zero';\n\t}\n\n\tswitch ( value ) {\n\t\tcase 'alpha-upper':\n\t\t\treturn 'upper-alpha';\n\t\tcase 'alpha-lower':\n\t\t\treturn 'lower-alpha';\n\t\tcase 'roman-upper':\n\t\t\treturn 'upper-roman';\n\t\tcase 'roman-lower':\n\t\t\treturn 'lower-roman';\n\t\tcase 'circle':\n\t\tcase 'disc':\n\t\tcase 'square':\n\t\t\treturn value;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/**\n * Creates a new list OL/UL element.\n */\nfunction createNewEmptyList(\n\tlistStyle: ReturnType<typeof detectListStyle>,\n\twriter: ViewUpcastWriter,\n\thasMultiLevelListPlugin: boolean\n) {\n\tconst list = writer.createElement( listStyle.type );\n\n\tapplyListStyleToElement( list, listStyle, writer, hasMultiLevelListPlugin );\n\n\treturn list;\n}\n\n/**\n * Applies `list-style-type`, `start`, and the `legal-list` class to a list element based on the detected\n * list style. Used both when creating a fresh list and when a real item claims a previously-intermediate\n * wrapper (which was created without any of these).\n */\nfunction applyListStyleToElement(\n\tlist: ViewElement,\n\tlistStyle: ReturnType<typeof detectListStyle>,\n\twriter: ViewUpcastWriter,\n\thasMultiLevelListPlugin: boolean\n) {\n\t// We do not support modifying the marker for a particular list item.\n\t// Set the value for the `list-style-type` property directly to the list container.\n\tif ( listStyle.style ) {\n\t\twriter.setStyle( 'list-style-type', listStyle.style, list );\n\t}\n\n\tif ( listStyle.startIndex && listStyle.startIndex > 1 ) {\n\t\twriter.setAttribute( 'start', listStyle.startIndex, list );\n\t}\n\n\tif ( listStyle.isLegalStyleList && hasMultiLevelListPlugin ) {\n\t\twriter.addClass( 'legal-list', list );\n\t}\n}\n\n/**\n * Extracts list item information from Word specific list-like element style:\n *\n * ```\n * `style=\"mso-list:l1 level1 lfo1\"`\n * ```\n *\n * where:\n *\n * ```\n * * `l1` is a list id (however it does not mean this is a continuous list - see https://github.com/ckeditor/ckeditor5/issues/43),\n * * `level1` is a list item indentation level,\n * * `lfo1` is a list insertion order in a document.\n * ```\n *\n * @param element Element from which style data is extracted.\n */\nfunction getListItemData( element: ViewElement ): ListItemData {\n\tconst listStyle = element.getStyle( 'mso-list' );\n\n\tif ( listStyle === undefined ) {\n\t\treturn {};\n\t}\n\n\tconst idMatch = listStyle.match( /(^|\\s{1,100})l(\\d+)/i );\n\tconst orderMatch = listStyle.match( /\\s{0,100}lfo(\\d+)/i );\n\tconst indentMatch = listStyle.match( /\\s{0,100}level(\\d+)/i );\n\n\tif ( idMatch && orderMatch && indentMatch ) {\n\t\treturn {\n\t\t\tid: idMatch[ 2 ],\n\t\t\torder: orderMatch[ 1 ],\n\t\t\tindent: parseInt( indentMatch[ 1 ] )\n\t\t};\n\t}\n\n\treturn {\n\t\tindent: 1 // Handle empty mso-list style as a marked for default list item.\n\t};\n}\n\n/**\n * Removes span with a numbering/bullet from a given element.\n */\nfunction removeBulletElement( element: ViewElement, writer: ViewUpcastWriter ) {\n\t// Matcher for finding `span` elements holding lists numbering/bullets.\n\tconst bulletMatcher = new Matcher( {\n\t\tname: 'span',\n\t\tstyles: {\n\t\t\t'mso-list': 'Ignore'\n\t\t}\n\t} );\n\n\tconst range = writer.createRangeIn( element );\n\n\tfor ( const value of range ) {\n\t\tif ( value.type === 'elementStart' && bulletMatcher.match( value.item as ViewElement ) ) {\n\t\t\twriter.remove( value.item as ViewElement );\n\t\t}\n\t}\n}\n\n/**\n * Returns element left margin normalized to 'px' if possible.\n */\nfunction getMarginLeftNormalized( element: ViewElement ): string | undefined {\n\tconst value = element.getStyle( 'margin-left' );\n\n\tif ( value === undefined || value.endsWith( 'px' ) ) {\n\t\treturn value;\n\t}\n\n\treturn convertCssLengthToPx( value );\n}\n\ninterface ListItemData {\n\n\t/**\n\t * Parent list id.\n\t */\n\tid?: string;\n\n\t/**\n\t * List item creation order.\n\t */\n\torder?: string;\n\n\t/**\n\t * List item indentation level.\n\t */\n\tindent?: number;\n}\n\ninterface ListLikeElement extends ListItemData {\n\n\t/**\n\t * List-like element.\n\t */\n\telement: ViewElement;\n\n\t/**\n\t * The margin-left normalized to 'px' if possible.\n\t */\n\tmarginLeft?: string;\n}\n\ntype ListStack = Array<ListLikeElement & {\n\tlistElement: ViewElement;\n\tlistItemElements: Array<ViewElement>;\n\n\t/**\n\t * Set on frames created by the skip-level fill loop to mark them as intermediate wrappers\n\t * for indent levels Word jumped over. A real list item arriving at this indent (e.g. after\n\t * a deeper item) replaces the frame with a real one of the correct type.\n\t */\n\tisIntermediate?: boolean;\n}>;\n\ntype TopLevelListInfo = {\n\tmarginLeft: string | undefined;\n\tcanApplyMarginOnList: boolean;\n\ttopLevelListItemElements: Array<ViewElement>;\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/**\n * @module paste-from-office/filters/image\n */\n\nimport {\n\tMatcher,\n\tViewUpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Replaces source attribute of all `<img>` elements representing regular\n * images (not the Word shapes) with inlined base64 image representation extracted from RTF or Blob data.\n *\n * @param documentFragment Document fragment on which transform images.\n * @param rtfData The RTF data from which images representation will be used.\n * @internal\n */\nexport function replaceImagesSourceWithBase64( documentFragment: ViewDocumentFragment, rtfData: string ): void {\n\tif ( !documentFragment.childCount ) {\n\t\treturn;\n\t}\n\n\tconst upcastWriter = new ViewUpcastWriter( documentFragment.document );\n\tconst shapesIds = findAllShapesIds( documentFragment, upcastWriter );\n\n\tremoveAllImgElementsRepresentingShapes( shapesIds, documentFragment, upcastWriter );\n\tinsertMissingImgs( shapesIds, documentFragment, upcastWriter );\n\tremoveAllShapeElements( documentFragment, upcastWriter );\n\n\tconst images = findAllImageElementsWithLocalSource( documentFragment, upcastWriter );\n\n\tif ( images.length ) {\n\t\treplaceImagesFileSourceWithInlineRepresentation( images, extractImageDataFromRtf( rtfData ), upcastWriter );\n\t}\n}\n\n/**\n * Converts given HEX string to base64 representation.\n *\n * @internal\n * @param hexString The HEX string to be converted.\n * @returns Base64 representation of a given HEX string.\n */\nexport function _convertHexToBase64( hexString: string ): string {\n\treturn btoa( hexString.match( /\\w{2}/g )!.map( char => {\n\t\treturn String.fromCharCode( parseInt( char, 16 ) );\n\t} ).join( '' ) );\n}\n\n/**\n * Finds all shapes (`<v:*>...</v:*>`) ids. Shapes can represent images (canvas)\n * or Word shapes (which does not have RTF or Blob representation).\n *\n * @param documentFragment Document fragment from which to extract shape ids.\n * @returns Array of shape ids.\n */\nfunction findAllShapesIds( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ): Array<string> {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapeElementsMatcher = new Matcher( {\n\t\tname: /v:(.+)/\n\t} );\n\n\tconst shapesIds = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type != 'elementStart' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst el = value.item as ViewElement;\n\t\tconst previousSibling = el.previousSibling;\n\t\tconst prevSiblingName = previousSibling && previousSibling.is( 'element' ) ? previousSibling.name : null;\n\t\t// List of ids which should not be considered as shapes.\n\t\t// https://github.com/ckeditor/ckeditor5/pull/15847#issuecomment-1941543983\n\t\tconst exceptionIds = [ 'Chart' ];\n\n\t\tconst isElementAShape = shapeElementsMatcher.match( el );\n\t\tconst hasElementGfxdataAttribute = el.getAttribute( 'o:gfxdata' );\n\t\tconst isPreviousSiblingAShapeType = prevSiblingName === 'v:shapetype';\n\t\tconst isElementIdInExceptionsArray = hasElementGfxdataAttribute &&\n\t\t\texceptionIds.some( item => el.getAttribute( 'id' )!.includes( item ) );\n\n\t\t// If shape element has 'o:gfxdata' attribute and is not directly before\n\t\t// `<v:shapetype>` element it means that it represents a Word shape.\n\t\tif (\n\t\t\tisElementAShape &&\n\t\t\thasElementGfxdataAttribute &&\n\t\t\t!isPreviousSiblingAShapeType &&\n\t\t\t!isElementIdInExceptionsArray\n\t\t) {\n\t\t\tshapesIds.push( ( value.item as ViewElement ).getAttribute( 'id' )! );\n\t\t}\n\t}\n\n\treturn shapesIds;\n}\n\n/**\n * Removes all `<img>` elements which represents Word shapes and not regular images.\n *\n * @param shapesIds Shape ids which will be checked against `<img>` elements.\n * @param documentFragment Document fragment from which to remove `<img>` elements.\n */\nfunction removeAllImgElementsRepresentingShapes(\n\tshapesIds: Array<string>,\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter\n): void {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst imageElementsMatcher = new Matcher( {\n\t\tname: 'img'\n\t} );\n\n\tconst imgs = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'element' ) && imageElementsMatcher.match( value.item ) ) {\n\t\t\tconst el = value.item;\n\t\t\tconst shapes = el.getAttribute( 'v:shapes' ) ? el.getAttribute( 'v:shapes' )!.split( ' ' ) : [];\n\n\t\t\tif ( shapes.length && shapes.every( shape => shapesIds.indexOf( shape ) > -1 ) ) {\n\t\t\t\timgs.push( el );\n\t\t\t// Shapes may also have empty source while content is paste in some browsers (Safari).\n\t\t\t} else if ( !el.getAttribute( 'src' ) ) {\n\t\t\t\timgs.push( el );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const img of imgs ) {\n\t\twriter.remove( img );\n\t}\n}\n\n/**\n * Removes all shape elements (`<v:*>...</v:*>`) so they do not pollute the output structure.\n *\n * @param documentFragment Document fragment from which to remove shape elements.\n */\nfunction removeAllShapeElements( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ) {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapeElementsMatcher = new Matcher( {\n\t\tname: /v:(.+)/\n\t} );\n\n\tconst shapes = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type == 'elementStart' && shapeElementsMatcher.match( value.item as ViewElement ) ) {\n\t\t\tshapes.push( value.item as ViewElement );\n\t\t}\n\t}\n\n\tfor ( const shape of shapes ) {\n\t\twriter.remove( shape );\n\t}\n}\n\n/**\n * Inserts `img` tags if there is none after a shape.\n */\nfunction insertMissingImgs( shapeIds: Array<string>, documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ) {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapes: Array<ViewElement> = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type == 'elementStart' && value.item.is( 'element', 'v:shape' ) ) {\n\t\t\tconst id = value.item.getAttribute( 'id' )!;\n\n\t\t\tif ( shapeIds.includes( id ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !containsMatchingImg( value.item.parent!.getChildren(), id ) ) {\n\t\t\t\tshapes.push( value.item );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const shape of shapes ) {\n\t\tconst attrs: Record<string, unknown> = {\n\t\t\tsrc: findSrc( shape )\n\t\t};\n\n\t\tif ( shape.hasAttribute( 'alt' ) ) {\n\t\t\tattrs.alt = shape.getAttribute( 'alt' );\n\t\t}\n\n\t\tconst img = writer.createElement( 'img', attrs );\n\n\t\twriter.insertChild( shape.index! + 1, img, shape.parent! );\n\t}\n\n\tfunction containsMatchingImg( nodes: Iterable<ViewNode>, id: string ): boolean {\n\t\tfor ( const node of nodes ) {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( node.is( 'element' ) ) {\n\t\t\t\tif ( node.name == 'img' && node.getAttribute( 'v:shapes' ) == id ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( containsMatchingImg( node.getChildren(), id ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction findSrc( shape: ViewElement ) {\n\t\tfor ( const child of shape.getChildren() ) {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( child.is( 'element' ) && child.getAttribute( 'src' ) ) {\n\t\t\t\treturn child.getAttribute( 'src' );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Finds all `<img>` elements in a given document fragment which have source pointing to local `file://` resource.\n * This function also tracks the index position of each image in the document, which is essential for\n * precise matching with hexadecimal representations in RTF data.\n *\n * @param documentFragment Document fragment in which to look for `<img>` elements.\n * @returns Array of found images along with their position index in the document.\n */\nfunction findAllImageElementsWithLocalSource(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter\n): Array<ImageWithIndex> {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst imageElementsMatcher = new Matcher( {\n\t\tname: 'img'\n\t} );\n\n\tconst imgs: Array<ImageWithIndex> = [];\n\tlet currentImageIndex = 0;\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'element' ) && imageElementsMatcher.match( value.item ) ) {\n\t\t\tif ( value.item.getAttribute( 'src' )!.startsWith( 'file://' ) ) {\n\t\t\t\timgs.push( {\n\t\t\t\t\telement: value.item,\n\t\t\t\t\timageIndex: currentImageIndex\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcurrentImageIndex++;\n\t\t}\n\t}\n\n\treturn imgs;\n}\n\n/**\n * Represents an image element with its index position in the document.\n * This index is crucial for correctly matching images with their\n * corresponding hexadecimal representations in RTF data.\n */\ntype ImageWithIndex = {\n\n\t/**\n     * The position index of the image in the document.\n     * Used to map the image to its corresponding hexadecimal representation in RTF data.\n     * RTF data contains hexadecimal representations of ALL images in the document,\n     * not just those with file:// URLs.\n     */\n\timageIndex: number;\n\n\t/**\n     * The image element.\n     */\n\telement: ViewElement;\n};\n\n/**\n * Extracts all images HEX representations from a given RTF data.\n *\n * @param rtfData The RTF data from which to extract images HEX representation.\n * @returns Array of found HEX representations. Each array item is an object containing:\n *\n * * hex Image representation in HEX format.\n * * type Type of image, `image/png` or `image/jpeg`.\n */\nfunction extractImageDataFromRtf( rtfData: string ): Array<{ hex: string; type: string }> {\n\tif ( !rtfData ) {\n\t\treturn [];\n\t}\n\n\tconst regexPictureHeader = /{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?({\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s}]*?/;\n\tconst regexPicture = new RegExp( '(?:(' + regexPictureHeader.source + '))([\\\\da-fA-F\\\\s]+)\\\\}', 'g' );\n\tconst images = rtfData.match( regexPicture );\n\tconst result = [];\n\n\tif ( images ) {\n\t\tfor ( const image of images ) {\n\t\t\tlet imageType: string | false = false;\n\n\t\t\tif ( image.includes( '\\\\pngblip' ) ) {\n\t\t\t\timageType = 'image/png';\n\t\t\t} else if ( image.includes( '\\\\jpegblip' ) ) {\n\t\t\t\timageType = 'image/jpeg';\n\t\t\t}\n\n\t\t\tif ( imageType ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\thex: image.replace( regexPictureHeader, '' ).replace( /[^\\da-fA-F]/g, '' ),\n\t\t\t\t\ttype: imageType\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Replaces `src` attribute value of all given images with the corresponding base64 image representation.\n * Uses the image index to precisely match with the correct hexadecimal representation from RTF data.\n *\n * @param imageElements Array of image elements along with their indices which will have their sources replaced.\n * @param imagesHexSources Array of images hex sources (usually the result of `extractImageDataFromRtf()` function).\n * Contains hexadecimal representations of ALL images in the document, not just those with `file://` URLs.\n * In XML documents, the same image might be defined both as base64 in HTML and as hexadecimal in RTF data.\n */\nfunction replaceImagesFileSourceWithInlineRepresentation(\n\timageElements: Array<ImageWithIndex>,\n\timagesHexSources: ReturnType<typeof extractImageDataFromRtf>,\n\twriter: ViewUpcastWriter\n) {\n\tfor ( let i = 0; i < imageElements.length; i++ ) {\n\t\tconst { element, imageIndex } = imageElements[ i ];\n\t\tconst rtfHexSource = imagesHexSources[ imageIndex ];\n\n\t\tif ( rtfHexSource ) {\n\t\t\tconst newSrc = `data:${ rtfHexSource.type };base64,${ _convertHexToBase64( rtfHexSource.hex ) }`;\n\t\t\twriter.setAttribute( 'src', newSrc, element );\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/removemsattributes\n */\n\nimport { ViewUpcastWriter, type ViewDocumentFragment, type ViewElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Cleanup MS attributes like styles, attributes and elements.\n *\n * @param documentFragment element `data.content` obtained from clipboard.\n * @internal\n */\nexport function removeMSAttributes( documentFragment: ViewDocumentFragment ): void {\n\tconst elementsToUnwrap: Array<ViewElement> = [];\n\n\tconst writer = new ViewUpcastWriter( documentFragment.document );\n\n\tfor ( const { item } of writer.createRangeIn( documentFragment ) ) {\n\t\tif ( !item.is( 'element' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor ( const className of item.getClassNames() ) {\n\t\t\tif ( /\\bmso/gi.exec( className ) ) {\n\t\t\t\twriter.removeClass( className, item );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const styleName of item.getStyleNames() ) {\n\t\t\tif ( /\\bmso/gi.exec( styleName ) ) {\n\t\t\t\twriter.removeStyle( styleName, item );\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\titem.is( 'element', 'w:sdt' ) ||\n\t\t\titem.is( 'element', 'w:sdtpr' ) && item.isEmpty ||\n\t\t\titem.is( 'element', 'o:p' ) && item.isEmpty\n\t\t) {\n\t\t\telementsToUnwrap.push( item );\n\t\t}\n\t}\n\n\tfor ( const item of elementsToUnwrap ) {\n\t\tconst itemParent = item.parent!;\n\t\tconst childIndex = itemParent.getChildIndex( item );\n\n\t\twriter.insertChild( childIndex, item.getChildren(), itemParent );\n\t\twriter.remove( item );\n\t}\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/**\n * @module paste-from-office/filters/table\n */\n\nimport {\n\ttype ViewUpcastWriter,\n\ttype ViewDocumentFragment\n} from '@ckeditor/ckeditor5-engine';\n\nimport { convertCssLengthToPx } from './utils.js';\n\n/**\n * Applies border none for table and cells without a border specified.\n * Normalizes style length units to px.\n * Handles left block table alignment.\n *\n * @internal\n */\nexport function transformTables(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter,\n\thasTablePropertiesPlugin: boolean = false\n): void {\n\tfor ( const item of writer.createRangeIn( documentFragment ).getItems() ) {\n\t\tif (\n\t\t\t!item.is( 'element', 'table' ) &&\n\t\t\t!item.is( 'element', 'td' ) &&\n\t\t\t!item.is( 'element', 'th' )\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// In MS Word, left-aligned tables (default) have no align attribute on the `<table>` and are not wrapped in a `<div>`.\n\t\t// In such cases, we need to set `margin-left: 0` and `margin-right: auto` to indicate to the editor that\n\t\t// the table is block-aligned to the left.\n\t\t//\n\t\t// Center- and right-aligned tables in MS Word are wrapped in a `<div>` with the `align` attribute set to\n\t\t// `center` or `right`, respectively with no align attribute on the `<table>` itself.\n\t\t//\n\t\t// Additionally, the structure may change when pasting content from MS Word.\n\t\t// Some browsers (e.g., Safari) may insert extra elements around the table (e.g., a <span>),\n\t\t// so the surrounding `<div>` with the `align` attribute may end up being the table's grandparent.\n\n\t\tif ( hasTablePropertiesPlugin && item.is( 'element', 'table' ) ) {\n\t\t\tconst directParent = item.parent?.is( 'element', 'div' ) ? item.parent : null;\n\t\t\tconst grandParent = item.parent?.parent?.is( 'element', 'div' ) ? item.parent.parent : null;\n\t\t\tconst divParent = directParent ?? grandParent;\n\n\t\t\t// Center block table alignment.\n\t\t\tif ( divParent && divParent.getAttribute( 'align' ) === 'center' && !item.getAttribute( 'align' ) ) {\n\t\t\t\twriter.setStyle( 'margin-left', 'auto', item );\n\t\t\t\twriter.setStyle( 'margin-right', 'auto', item );\n\t\t\t// Right block table alignment.\n\t\t\t} else if ( divParent && divParent.getAttribute( 'align' ) === 'right' && !item.getAttribute( 'align' ) ) {\n\t\t\t\twriter.setStyle( 'margin-left', 'auto', item );\n\t\t\t\twriter.setStyle( 'margin-right', '0', item );\n\t\t\t// Left block table alignment.\n\t\t\t} else {\n\t\t\t\t/* v8 ignore else -- @preserve */\n\t\t\t\tif ( !divParent && !item.getAttribute( 'align' ) ) {\n\t\t\t\t\twriter.setStyle( 'margin-left', '0', item );\n\t\t\t\t\twriter.setStyle( 'margin-right', 'auto', item );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst sides = [ 'left', 'top', 'right', 'bottom' ];\n\n\t\t// As this is a pasted table, we do not want default table styles to apply here\n\t\t// so we set border node for sides that does not have any border style.\n\t\t// It is enough to verify border style as border color and border width properties have default values in DOM.\n\t\tif ( sides.every( side => !item.hasStyle( `border-${ side }-style` ) ) ) {\n\t\t\twriter.setStyle( 'border-style', 'none', item );\n\t\t} else {\n\t\t\tfor ( const side of sides ) {\n\t\t\t\tif ( !item.hasStyle( `border-${ side }-style` ) ) {\n\t\t\t\t\twriter.setStyle( `border-${ side }-style`, 'none', item );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Translate style length units to px.\n\t\tconst props = [\n\t\t\t'width',\n\t\t\t'height',\n\t\t\t...sides.map( side => `border-${ side }-width` ),\n\t\t\t...sides.map( side => `padding-${ side }` )\n\t\t];\n\n\t\tfor ( const prop of props ) {\n\t\t\tif ( item.hasStyle( prop ) ) {\n\t\t\t\twriter.setStyle( prop, convertCssLengthToPx( item.getStyle( prop )! ), item );\n\t\t\t}\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/removeinvalidtablewidth\n */\n\nimport type { ViewUpcastWriter, ViewDocumentFragment } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Removes the `width:0px` style from table pasted from Google Sheets and `width=\"0\"` attribute from Word tables.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n * @internal\n */\nexport function removeInvalidTableWidth( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ): void {\n\tfor ( const child of writer.createRangeIn( documentFragment ).getItems() ) {\n\t\tif ( child.is( 'element', 'table' ) ) {\n\t\t\t// Remove invalid width style (Google Sheets: width:0px).\n\t\t\tif ( child.getStyle( 'width' ) === '0px' ) {\n\t\t\t\twriter.removeStyle( 'width', child );\n\t\t\t}\n\n\t\t\t// Remove invalid width attribute (Word: width=\"0\").\n\t\t\tif ( child.getAttribute( 'width' ) === '0' ) {\n\t\t\t\twriter.removeAttribute( 'width', child );\n\t\t\t}\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/replacemsfootnotes\n */\n\nimport type { ViewDocumentFragment, ViewElement, ViewText, ViewUpcastWriter } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Replaces MS Word specific footnotes references and definitions with proper elements.\n *\n * Things to know about MS Word footnotes:\n *\n * * Footnote references in Word are marked with `mso-footnote-id` style.\n * * Word does not support nested footnotes, so references within definitions are ignored.\n * * Word appends extra spaces after footnote references within definitions, which are trimmed.\n * * Footnote definitions list is marked with `mso-element: footnote-list` style it contain `mso-element: footnote` elements.\n * * Footnote definition might contain tables, lists and other elements, not only text. They are placed directly within `li` element,\n * without any wrapper (in opposition to text content of the definition, which is placed within `MsoFootnoteText` element).\n *\n * Example pseudo document showing MS Word footnote structure:\n *\n * ```html\n * <p>Text with footnote<a style='mso-footnote-id:ftn1'>[1]</a> reference.</p>\n *\n * <div style='mso-element:footnote-list'>\n * \t<div style='mso-element:footnote' id=ftn1>\n * \t\t<p class=MsoFootnoteText><a style='mso-footnote-id:ftn1'>[1]</a> Footnote content</p>\n * \t\t<table class=\"MsoTableGrid\">...</table>\n * \t</div>\n * </div>\n * ```\n *\n * Will be transformed into:\n *\n * ```html\n * <p>Text with footnote<sup class=\"footnote\"><a id=\"ref-footnote-ftn1\" href=\"#footnote-ftn1\">1</a></sup> reference.</p>\n *\n * <div class=\"footnotes\">\n * \t<hr class=\"footnotes-divider\">\n * \t<ol class=\"footnotes-list\">\n * \t\t<li class=\"footnote-definition\" id=\"footnote-ftn1\">\n * \t\t\t<a href=\"#ref-footnote-ftn1\" class=\"footnote-backlink\">^</a>\n * \t\t\t<div class=\"footnote-content\">\n * \t\t\t\t<p>Footnote content</p>\n * \t\t\t\t<table>...</table>\n * \t\t\t</div>\n * \t\t</li>\n * \t</ol>\n * </div>\n * ```\n *\n * @param documentFragment `data.content` obtained from clipboard.\n * @param writer The view writer instance.\n * @internal\n */\nexport function replaceMSFootnotes( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ): void {\n\tconst msFootnotesRefs = new Map<string, ViewElement>();\n\tconst msFootnotesDefs = new Map<string, ViewElement>();\n\tlet msFootnotesDefinitionsList: ViewElement | null = null;\n\n\t// Phase 1: Collect all footnotes references and definitions. Find the footnotes definitions list element.\n\tfor ( const { item } of writer.createRangeIn( documentFragment ) ) {\n\t\tif ( !item.is( 'element' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If spot a footnotes definitions element, let's store it. It'll be replaced later.\n\t\t// There should be only one such element in the document.\n\t\tif ( item.getStyle( 'mso-element' ) === 'footnote-list' ) {\n\t\t\tmsFootnotesDefinitionsList = item;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If spot a footnote reference or definition, store it in the corresponding map.\n\t\tif ( item.hasStyle( 'mso-footnote-id' ) ) {\n\t\t\tconst msFootnoteDef = item.findAncestor( 'element', el => el.getStyle( 'mso-element' ) === 'footnote' );\n\n\t\t\tif ( msFootnoteDef ) {\n\t\t\t\t// If it's a reference within a definition, ignore it and track only the definition.\n\t\t\t\t// MS Word do not support nested footnotes, so it's safe to assume that all references within\n\t\t\t\t// a definition point to the same definition.\n\t\t\t\tconst msFootnoteDefId = msFootnoteDef.getAttribute( 'id' )!;\n\n\t\t\t\tmsFootnotesDefs.set( msFootnoteDefId, msFootnoteDef );\n\t\t\t} else {\n\t\t\t\t// If it's a reference outside of a definition, track it as a reference.\n\t\t\t\tconst msFootnoteRefId = item.getStyle( 'mso-footnote-id' )!;\n\n\t\t\t\tmsFootnotesRefs.set( msFootnoteRefId, item );\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\t}\n\n\t// If there are no footnotes references or definitions, or no definitions list, there's nothing to normalize.\n\tif ( !msFootnotesRefs.size || !msFootnotesDefinitionsList ) {\n\t\treturn;\n\t}\n\n\t// Phase 2: Replace footnotes definitions list with proper element.\n\tconst footnotesList = createFootnotesListContainerElement( writer );\n\n\twriter.replace( msFootnotesDefinitionsList, footnotesList.wrapper );\n\n\t// Phase 3: Replace all footnotes references and add matching definitions to the definitions list.\n\tfor ( const [ footnoteId, msFootnoteRef ] of msFootnotesRefs ) {\n\t\tconst msFootnoteDef = msFootnotesDefs.get( footnoteId );\n\n\t\tif ( !msFootnoteDef ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Replace footnote reference.\n\t\twriter.replace( msFootnoteRef, createFootnoteRefViewElement( writer, footnoteId ) );\n\n\t\t// Append found matching definition to the definitions list.\n\t\t// Order doesn't matter here, as it'll be fixed in the post-fixer.\n\t\tconst defElements = createFootnoteDefViewElement( writer, footnoteId );\n\n\t\tremoveMSReferences( writer, msFootnoteDef );\n\n\t\t// Insert content within the `MsoFootnoteText` element. It's usually a definition text content.\n\t\tfor ( const child of msFootnoteDef.getChildren() ) {\n\t\t\tlet clonedChild = child;\n\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( child.is( 'element' ) ) {\n\t\t\t\tclonedChild = writer.clone( child, true );\n\t\t\t}\n\n\t\t\twriter.appendChild( clonedChild, defElements.content );\n\t\t}\n\n\t\twriter.appendChild( defElements.listItem, footnotesList.list );\n\t}\n}\n\n/**\n * Removes all MS Office specific references from the given element.\n *\n * It also removes leading space from text nodes following the references, as MS Word adds\n * them to separate the reference from the rest of the text.\n *\n * @param writer The view writer.\n * @param element The element to trim.\n * @returns The trimmed element.\n */\nfunction removeMSReferences( writer: ViewUpcastWriter, element: ViewElement ): ViewElement {\n\tconst elementsToRemove: Array<ViewElement> = [];\n\tconst textNodesToTrim: Array<ViewText> = [];\n\n\tfor ( const { item } of writer.createRangeIn( element ) ) {\n\t\tif ( item.is( 'element' ) && item.getStyle( 'mso-footnote-id' ) ) {\n\t\t\telementsToRemove.unshift( item );\n\n\t\t\t// MS Word used to add spaces after footnote references within definitions. Let's check if there's a space after\n\t\t\t// the footnote reference and mark it for trimming.\n\t\t\tconst { nextSibling } = item;\n\n\t\t\tif ( nextSibling?.is( '$text' ) && nextSibling.data.startsWith( ' ' ) ) {\n\t\t\t\ttextNodesToTrim.unshift( nextSibling );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const element of elementsToRemove ) {\n\t\twriter.remove( element );\n\t}\n\n\t// Remove only the leading space from text nodes following reference within definition, preserve the rest of the text.\n\tfor ( const textNode of textNodesToTrim ) {\n\t\tconst trimmedData = textNode.data.substring( 1 );\n\n\t\tif ( trimmedData.length > 0 ) {\n\t\t\t// Create a new text node and replace the old one.\n\t\t\tconst parent = textNode.parent!;\n\t\t\tconst index = parent.getChildIndex( textNode );\n\t\t\tconst newTextNode = writer.createText( trimmedData );\n\n\t\t\twriter.remove( textNode );\n\t\t\twriter.insertChild( index, newTextNode, parent );\n\t\t} else {\n\t\t\t// If the text node contained only a space, remove it entirely.\n\t\t\twriter.remove( textNode );\n\t\t}\n\t}\n\n\treturn element;\n}\n\n/**\n * Creates a footnotes list container element.\n *\n * @param writer The view writer instance.\n * @returns The footnotes list container element and list itself.\n */\nfunction createFootnotesListContainerElement( writer: ViewUpcastWriter ) {\n\tconst divider = writer.createElement( 'hr', { class: 'footnotes-divider' } );\n\tconst list = writer.createElement( 'ol', { class: 'footnotes-list' } );\n\n\tconst wrapper = writer.createElement( 'div', { class: 'footnotes' }, [\n\t\tdivider,\n\t\tlist\n\t] );\n\n\treturn {\n\t\tlist,\n\t\twrapper\n\t};\n}\n\n/**\n * Creates a footnote reference view element.\n *\n * @param writer The view writer instance.\n * @param footnoteId The footnote ID.\n * @returns The footnote reference view element.\n */\nfunction createFootnoteRefViewElement( writer: ViewUpcastWriter, footnoteId: string ): ViewElement {\n\tconst sup = writer.createElement( 'sup', { class: 'footnote' } );\n\tconst link = writer.createElement( 'a', {\n\t\tid: `ref-${ footnoteId }`,\n\t\thref: `#${ footnoteId }`\n\t} );\n\n\twriter.appendChild( link, sup );\n\n\treturn sup;\n}\n\n/**\n * Creates a footnote definition view element with a backlink and a content container.\n *\n * @param writer The view writer instance.\n * @param footnoteId The footnote ID.\n * @returns An object containing the list item element, backlink and content container.\n */\nfunction createFootnoteDefViewElement( writer: ViewUpcastWriter, footnoteId: string ): {\n\tlistItem: ViewElement;\n\tcontent: ViewElement;\n} {\n\tconst listItem = writer.createElement( 'li', {\n\t\tid: footnoteId,\n\t\tclass: 'footnote-definition'\n\t} );\n\n\tconst backLink = writer.createElement( 'a', {\n\t\thref: `#ref-${ footnoteId }`,\n\t\tclass: 'footnote-backlink'\n\t} );\n\n\tconst content = writer.createElement( 'div', {\n\t\tclass: 'footnote-content'\n\t} );\n\n\twriter.appendChild( writer.createText( '^' ), backLink );\n\twriter.appendChild( backLink, listItem );\n\twriter.appendChild( content, listItem );\n\n\treturn {\n\t\tlistItem,\n\t\tcontent\n\t};\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/**\n * @module paste-from-office/normalizers/mswordnormalizer\n */\n\nimport type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';\n\nimport { transformBookmarks } from '../filters/bookmark.js';\nimport { transformListItemLikeElementsIntoLists } from '../filters/list.js';\nimport { replaceImagesSourceWithBase64 } from '../filters/image.js';\nimport { removeMSAttributes } from '../filters/removemsattributes.js';\nimport { transformTables } from '../filters/table.js';\nimport { removeInvalidTableWidth } from '../filters/removeinvalidtablewidth.js';\nimport { replaceMSFootnotes } from '../filters/replacemsfootnotes.js';\nimport { ViewUpcastWriter, type ViewDocument } from '@ckeditor/ckeditor5-engine';\nimport type { PasteFromOfficeNormalizer } from '../normalizer.js';\n\nconst msWordMatch1 = /<meta\\s*name=\"?generator\"?\\s*content=\"?microsoft\\s*word\\s*\\d+\"?\\/?>/i;\nconst msWordMatch2 = /xmlns:o=\"urn:schemas-microsoft-com/i;\n\n// Matches content copied from MS Excel, including Excel Online which is not wrapped in the `xmlns:o` namespace.\n// See https://github.com/ckeditor/ckeditor5/issues/20188.\nconst msExcelMatch = /<meta\\s*name=\"?generator\"?\\s*content=\"?microsoft\\s*excel\\s*\\d+\"?\\/?>/i;\n\n/**\n * Normalizer for the content pasted from Microsoft Word.\n */\nexport class PasteFromOfficeMSWordNormalizer implements PasteFromOfficeNormalizer {\n\tpublic readonly document: ViewDocument;\n\n\tpublic readonly hasMultiLevelListPlugin: boolean;\n\n\tpublic readonly hasTablePropertiesPlugin: boolean;\n\n\tpublic readonly enableSkipLevelLists: boolean;\n\n\t/**\n\t * Creates a new `PasteFromOfficeMSWordNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */\n\tconstructor(\n\t\tdocument: ViewDocument,\n\t\thasMultiLevelListPlugin: boolean = false,\n\t\thasTablePropertiesPlugin: boolean = false,\n\t\tenableSkipLevelLists: boolean = false\n\t) {\n\t\tthis.document = document;\n\t\tthis.hasMultiLevelListPlugin = hasMultiLevelListPlugin;\n\t\tthis.hasTablePropertiesPlugin = hasTablePropertiesPlugin;\n\t\tthis.enableSkipLevelLists = enableSkipLevelLists;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic isActive( htmlString: string ): boolean {\n\t\treturn msWordMatch1.test( htmlString ) || msWordMatch2.test( htmlString ) || msExcelMatch.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic execute( data: ClipboardInputTransformationData ): void {\n\t\tconst writer = new ViewUpcastWriter( this.document );\n\t\tconst stylesString = ( data.extraContent as { stylesString: string } ).stylesString;\n\n\t\ttransformBookmarks( data.content, writer );\n\t\ttransformListItemLikeElementsIntoLists( data.content, stylesString, this.hasMultiLevelListPlugin, this.enableSkipLevelLists );\n\t\treplaceImagesSourceWithBase64( data.content, data.dataTransfer.getData( 'text/rtf' ) );\n\t\ttransformTables( data.content, writer, this.hasTablePropertiesPlugin );\n\t\tremoveInvalidTableWidth( data.content, writer );\n\t\treplaceMSFootnotes( data.content, writer );\n\t\tremoveMSAttributes( data.content );\n\t}\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/**\n * @module paste-from-office/filters/removeboldwrapper\n */\n\nimport type { ViewUpcastWriter, ViewDocumentFragment } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Removes the `<b>` tag wrapper added by Google Docs to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n * @internal\n */\nexport function removeBoldWrapper( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'b' ) && child.getStyle( 'font-weight' ) === 'normal' ) {\n\t\t\tconst childIndex = documentFragment.getChildIndex( child );\n\n\t\t\twriter.remove( child );\n\t\t\twriter.insertChild( childIndex, child.getChildren(), documentFragment );\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/br\n */\n\nimport {\n\tViewDomConverter,\n\tViewDocument,\n\ttype ViewUpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Transforms `<br>` elements that are siblings to some block element into a paragraphs.\n *\n * @param documentFragment The view structure to be transformed.\n * @internal\n */\nexport function transformBlockBrsToParagraphs(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter\n): void {\n\tconst viewDocument = new ViewDocument( writer.document.stylesProcessor );\n\tconst domConverter = new ViewDomConverter( viewDocument, { renderingMode: 'data' } );\n\n\tconst blockElements = domConverter.blockElements;\n\tconst inlineObjectElements = domConverter.inlineObjectElements;\n\n\tconst elementsToReplace = [];\n\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif ( element.is( 'element', 'br' ) ) {\n\t\t\tconst nextSibling = findSibling( element, 'forward', writer, { blockElements, inlineObjectElements } );\n\t\t\tconst previousSibling = findSibling( element, 'backward', writer, { blockElements, inlineObjectElements } );\n\n\t\t\tconst nextSiblingIsBlock = isBlockViewElement( nextSibling, blockElements );\n\t\t\tconst previousSiblingIsBlock = isBlockViewElement( previousSibling, blockElements );\n\n\t\t\t// If the <br> is surrounded by blocks then convert it to a paragraph:\n\t\t\t// * <p>foo</p>[<br>]<p>bar</p> -> <p>foo</p>[<p></p>]<p>bar</p>\n\t\t\t// * <p>foo</p>[<br>] -> <p>foo</p>[<p></p>]\n\t\t\t// * [<br>]<p>foo</p> -> [<p></p>]<p>foo</p>\n\t\t\tif ( previousSiblingIsBlock || nextSiblingIsBlock ) {\n\t\t\t\telementsToReplace.push( element );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const element of elementsToReplace ) {\n\t\tif ( element.hasClass( 'Apple-interchange-newline' ) ) {\n\t\t\twriter.remove( element );\n\t\t} else {\n\t\t\twriter.replace( element, writer.createElement( 'p' ) );\n\t\t}\n\t}\n}\n\n/**\n * Returns sibling node, threats inline elements as transparent (but should stop on an inline objects).\n */\nfunction findSibling(\n\tviewElement: ViewElement,\n\tdirection: 'forward' | 'backward',\n\twriter: ViewUpcastWriter,\n\t{ blockElements, inlineObjectElements }: { blockElements: Array<string>; inlineObjectElements: Array<string> }\n) {\n\tlet position = writer.createPositionAt( viewElement, direction == 'forward' ? 'after' : 'before' );\n\n\t// Find first position that is just before a first:\n\t// * text node,\n\t// * block element,\n\t// * inline object element.\n\t// It's ignoring any inline (non-object) elements like span, strong, etc.\n\tposition = position.getLastMatchingPosition( ( { item } ) => (\n\t\titem.is( 'element' ) &&\n\t\t!blockElements.includes( item.name ) &&\n\t\t!inlineObjectElements.includes( item.name )\n\t), { direction } );\n\n\treturn direction == 'forward' ? position.nodeAfter : position.nodeBefore;\n}\n\n/**\n * Returns true for view elements that are listed as block view elements.\n */\nfunction isBlockViewElement( node: ViewNode | null, blockElements: Array<string> ) {\n\treturn !!node && node.is( 'element' ) && blockElements.includes( node.name );\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/**\n * @module paste-from-office/filters/replacetabswithinprewithspaces\n */\n\nimport type { ViewDocumentFragment, ViewUpcastWriter, ViewText, ViewElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Replaces tab characters with spaces in text nodes that are inside elements styled with `white-space: pre-wrap`.\n *\n * This is a workaround for incorrect detection of pre-like formatting in the DOM converter for pasted Google Docs documents.\n * When an element uses `white-space: pre-wrap`, the editor reduces tab characters to a single space, causing\n * inconsistent spacing in pasted content. This function replaces tabs with spaces to ensure visual consistency.\n * This is intended as a temporary solution.\n *\n * See: https://github.com/ckeditor/ckeditor5/issues/18995\n *\n * @param documentFragment The `data.content` element obtained from the clipboard.\n * @param writer The upcast writer used to manipulate the view structure.\n * @param tabWidth The number of spaces to replace each tab with. Defaults to 8.\n * @internal\n */\nexport function replaceTabsWithinPreWithSpaces(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: ViewUpcastWriter,\n\ttabWidth: number\n): void {\n\t// Collect all text nodes with tabs that are inside pre-wrap elements.\n\tconst textNodesToReplace: Set<ViewText> = new Set();\n\n\tfor ( const child of writer.createRangeIn( documentFragment ).getItems() ) {\n\t\tif ( !child.is( 'view:$textProxy' ) || !child.data.includes( '\\t' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Check if any parent has `white-space: pre-wrap`.\n\t\tif ( hasPreWrapParent( child.parent ) ) {\n\t\t\ttextNodesToReplace.add( child.textNode );\n\t\t}\n\t}\n\n\t// Replace tabs in each collected text node.\n\tfor ( const textNode of textNodesToReplace ) {\n\t\treplaceTabsInTextNode( textNode, writer, tabWidth );\n\t}\n}\n\n/**\n * Checks if element or any of its parents has `white-space: pre-wrap` style.\n */\nfunction hasPreWrapParent( element: ViewDocumentFragment | ViewElement | null ): boolean {\n\tlet parent = element;\n\n\twhile ( parent ) {\n\t\tif ( parent.is( 'element' ) ) {\n\t\t\tconst whiteSpace = parent.getStyle?.( 'white-space' );\n\n\t\t\tif ( whiteSpace === 'pre-wrap' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tparent = parent.parent;\n\t}\n\n\treturn false;\n}\n\n/**\n * Replaces all tabs with spaces in the given text node.\n */\nfunction replaceTabsInTextNode( textNode: ViewText, writer: ViewUpcastWriter, tabWidth: number ): void {\n\tconst { parent, data } = textNode;\n\n\tconst replacedData = data.replaceAll( '\\t', ' '.repeat( tabWidth ) );\n\tconst index = parent!.getChildIndex( textNode );\n\n\t// Remove old node and insert new one with replaced tabs.\n\twriter.remove( textNode );\n\twriter.insertChild( index, writer.createText( replacedData ), parent! );\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/**\n * @module paste-from-office/normalizers/googledocsnormalizer\n */\n\nimport { ViewUpcastWriter, type ViewDocument } from '@ckeditor/ckeditor5-engine';\nimport type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';\n\nimport { removeBoldWrapper } from '../filters/removeboldwrapper.js';\nimport { transformBlockBrsToParagraphs } from '../filters/br.js';\nimport { unwrapParagraphInListItem } from '../filters/list.js';\nimport { replaceTabsWithinPreWithSpaces } from '../filters/replacetabswithinprewithspaces.js';\nimport type { PasteFromOfficeNormalizer } from '../normalizer.js';\n\nconst googleDocsMatch = /id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;\n\n/**\n * Normalizer for the content pasted from Google Docs.\n *\n * @internal\n */\nexport class GoogleDocsNormalizer implements PasteFromOfficeNormalizer {\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Creates a new `GoogleDocsNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic isActive( htmlString: string ): boolean {\n\t\treturn googleDocsMatch.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic execute( data: ClipboardInputTransformationData ): void {\n\t\tconst writer = new ViewUpcastWriter( this.document );\n\n\t\tremoveBoldWrapper( data.content, writer );\n\t\tunwrapParagraphInListItem( data.content, writer );\n\t\ttransformBlockBrsToParagraphs( data.content, writer );\n\t\treplaceTabsWithinPreWithSpaces( data.content, writer, 8 );\n\t}\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/**\n * @module paste-from-office/filters/removexmlns\n */\n\nimport type { ViewUpcastWriter, ViewDocumentFragment } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Removes the `xmlns` attribute from table pasted from Google Sheets.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n * @internal\n */\nexport function removeXmlns( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'table' ) && child.hasAttribute( 'xmlns' ) ) {\n\t\t\twriter.removeAttribute( 'xmlns', child );\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/removegooglesheetstag\n */\n\nimport type { ViewUpcastWriter, ViewDocumentFragment } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Removes the `<google-sheets-html-origin>` tag wrapper added by Google Sheets to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n * @internal\n */\nexport function removeGoogleSheetsTag( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif ( child.is( 'element', 'google-sheets-html-origin' ) ) {\n\t\t\tconst childIndex = documentFragment.getChildIndex( child );\n\n\t\t\twriter.remove( child );\n\t\t\twriter.insertChild( childIndex, child.getChildren(), documentFragment );\n\t\t}\n\t}\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/**\n * @module paste-from-office/filters/removestyleblock\n */\n\nimport type { ViewUpcastWriter, ViewDocumentFragment } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Removes `<style>` block added by Google Sheets to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n * @internal\n */\nexport function removeStyleBlock( documentFragment: ViewDocumentFragment, writer: ViewUpcastWriter ): void {\n\tfor ( const child of Array.from( documentFragment.getChildren() ) ) {\n\t\tif ( child.is( 'element', 'style' ) ) {\n\t\t\twriter.remove( child );\n\t\t}\n\t}\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/**\n * @module paste-from-office/normalizers/googlesheetsnormalizer\n */\n\nimport { ViewUpcastWriter, type ViewDocument } from '@ckeditor/ckeditor5-engine';\nimport type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';\n\nimport { removeXmlns } from '../filters/removexmlns.js';\nimport { removeGoogleSheetsTag } from '../filters/removegooglesheetstag.js';\nimport { removeInvalidTableWidth } from '../filters/removeinvalidtablewidth.js';\nimport { removeStyleBlock } from '../filters/removestyleblock.js';\nimport type { PasteFromOfficeNormalizer } from '../normalizer.js';\n\nconst googleSheetsMatch = /<google-sheets-html-origin/i;\n\n/**\n * Normalizer for the content pasted from Google Sheets.\n *\n * @internal\n */\nexport class GoogleSheetsNormalizer implements PasteFromOfficeNormalizer {\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Creates a new `GoogleSheetsNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic isActive( htmlString: string ): boolean {\n\t\treturn googleSheetsMatch.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic execute( data: ClipboardInputTransformationData ): void {\n\t\tconst writer = new ViewUpcastWriter( this.document );\n\n\t\tremoveGoogleSheetsTag( data.content, writer );\n\t\tremoveXmlns( data.content, writer );\n\t\tremoveInvalidTableWidth( data.content, writer );\n\t\tremoveStyleBlock( data.content, writer );\n\t}\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/**\n * @module paste-from-office/filters/space\n */\n\n/**\n * Replaces last space preceding elements closing tag with `&nbsp;`. Such operation prevents spaces from being removed\n * during further DOM/View processing (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDomInlineNodes}).\n * This method also takes into account Word specific `<o:p></o:p>` empty tags.\n * Additionally multiline sequences of spaces and new lines between tags are removed (see\n * https://github.com/ckeditor/ckeditor5-paste-from-office/issues/39\n * and https://github.com/ckeditor/ckeditor5-paste-from-office/issues/40).\n *\n * @param htmlString HTML string in which spacing should be normalized.\n * @returns Input HTML with spaces normalized.\n * @internal\n */\nexport function normalizeSpacing( htmlString: string ): string {\n\t// Run normalizeSafariSpaceSpans() two times to cover nested spans.\n\treturn normalizeSafariSpaceSpans( normalizeSafariSpaceSpans( htmlString ) )\n\t\t// Remove all \\r\\n from \"spacerun spans\" so the last replace line doesn't strip all whitespaces.\n\t\t.replace( /(<span\\s+style=['\"]mso-spacerun:yes['\"]>[^\\S\\r\\n]*?)[\\r\\n]+([^\\S\\r\\n]*<\\/span>)/g, '$1$2' )\n\t\t.replace( /<span\\s+style=['\"]mso-spacerun:yes['\"]><\\/span>/g, '' )\n\t\t.replace( /(<span\\s+style=['\"]letter-spacing:[^'\"]+?['\"]>)[\\r\\n]+(<\\/span>)/g, '$1 $2' )\n\t\t.replace( / <\\//g, '\\u00A0</' )\n\t\t.replace( / <o:p><\\/o:p>/g, '\\u00A0<o:p></o:p>' )\n\t\t// Remove <o:p> block filler from empty paragraph. Safari uses \\u00A0 instead of &nbsp;.\n\t\t.replace( /<o:p>(&nbsp;|\\u00A0)<\\/o:p>/g, '' )\n\t\t// Remove all whitespaces when they contain any \\r or \\n.\n\t\t.replace( />([^\\S\\r\\n]*[\\r\\n]\\s*)</g, '><' );\n}\n\n/**\n * Normalizes spacing in special Word `spacerun spans` (`<span style='mso-spacerun:yes'>\\s+</span>`) by replacing\n * all spaces with `&nbsp; ` pairs. This prevents spaces from being removed during further DOM/View processing\n * (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDomInlineNodes}).\n *\n * @param htmlDocument Native `Document` object in which spacing should be normalized.\n * @internal\n */\nexport function normalizeSpacerunSpans( htmlDocument: Document ): void {\n\thtmlDocument.querySelectorAll( 'span[style*=spacerun]' ).forEach( el => {\n\t\tconst htmlElement = el as HTMLElement;\n\t\tconst innerTextLength = htmlElement.innerText.length || 0;\n\n\t\thtmlElement.innerText = Array( innerTextLength + 1 ).join( '\\u00A0 ' ).substr( 0, innerTextLength );\n\t} );\n}\n\n/**\n * Normalizes specific spacing generated by Safari when content pasted from Word (`<span class=\"Apple-converted-space\"> </span>`)\n * by replacing all spaces sequences longer than 1 space with `&nbsp; ` pairs. This prevents spaces from being removed during\n * further DOM/View processing (see especially {@link module:engine/view/domconverter~ViewDomConverter#_processDataFromDomText}).\n *\n * This function is similar to {@link module:clipboard/utils/normalizeclipboarddata normalizeClipboardData util} but uses\n * regular spaces / &nbsp; sequence for replacement.\n *\n * @param htmlString HTML string in which spacing should be normalized\n * @returns Input HTML with spaces normalized.\n * @internal\n */\nfunction normalizeSafariSpaceSpans( htmlString: string ) {\n\treturn htmlString.replace( /<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g, ( fullMatch, spaces ) => {\n\t\treturn spaces.length === 1 ? ' ' : Array( spaces.length + 1 ).join( '\\u00A0 ' ).substr( 0, spaces.length );\n\t} );\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/**\n * @module paste-from-office/filters/parse\n */\n\nimport {\n\tViewDomConverter,\n\tViewDocument,\n\ttype StylesProcessor,\n\ttype ViewDocumentFragment\n} from '@ckeditor/ckeditor5-engine';\n\nimport { normalizeSpacing, normalizeSpacerunSpans } from './space.js';\n\n/**\n * Parses the provided HTML extracting contents of `<body>` and `<style>` tags.\n *\n * @param htmlString HTML string to be parsed.\n */\nexport function parsePasteOfficeHtml( htmlString: string, stylesProcessor: StylesProcessor ): PasteOfficeHtmlParseResult {\n\tconst domParser = new DOMParser();\n\n\t// Remove Word specific \"if comments\" so content inside is not omitted by the parser.\n\thtmlString = htmlString.replace( /<!--\\[if gte vml 1]>/g, '' );\n\n\t// Clean the <head> section of MS Windows specific tags. See https://github.com/ckeditor/ckeditor5/issues/15333.\n\t// The regular expression matches the <o:SmartTagType> tag with optional attributes (with or without values).\n\thtmlString = htmlString.replace( /<o:SmartTagType(?:\\s+[^\\s>=]+(?:=\"[^\"]*\")?)*\\s*\\/?>/gi, '' );\n\n\tconst normalizedHtml = normalizeSpacing( cleanContentAfterBody( htmlString ) );\n\n\t// Parse htmlString as native Document object.\n\tconst htmlDocument = domParser.parseFromString( normalizedHtml, 'text/html' );\n\n\tnormalizeSpacerunSpans( htmlDocument );\n\n\t// Remove `<style>` blocks that ended up inside the `<body>`. Some sources (e.g. Excel Online) wrap a whole\n\t// `<html>` document inside a `<div>`, which makes the browser flatten the document's `<style>` into the body.\n\t// Such a `<style>` is not a usable stylesheet there and would otherwise be pasted as visible text.\n\t// See https://github.com/ckeditor/ckeditor5/issues/20188.\n\t// In-`<head>` styles are left untouched and are still collected by `extractStyles()` below.\n\tremoveInBodyStyleBlocks( htmlDocument );\n\n\t// Get `innerHTML` first as transforming to View modifies the source document.\n\tconst bodyString = htmlDocument.body.innerHTML;\n\n\t// Transform document.body to View.\n\tconst bodyView = documentToView( htmlDocument, stylesProcessor );\n\n\t// Extract stylesheets.\n\tconst stylesObject = extractStyles( htmlDocument );\n\n\treturn {\n\t\tbody: bodyView,\n\t\tbodyString,\n\t\tstyles: stylesObject.styles,\n\t\tstylesString: stylesObject.stylesString\n\t};\n}\n\n/**\n * The result of {@link ~parsePasteOfficeHtml}.\n */\nexport interface PasteOfficeHtmlParseResult {\n\n\t/**\n\t * Parsed body content as a traversable structure.\n\t */\n\tbody: ViewDocumentFragment;\n\n\t/**\n\t * Entire body content as a string.\n\t */\n\tbodyString: string;\n\n\t/**\n\t * Array of native `CSSStyleSheet` objects, each representing separate `style` tag from the source HTML.\n\t */\n\tstyles: Array<CSSStyleSheet>;\n\n\t/**\n\t * All `style` tags contents combined in the order of occurrence into one string.\n\t */\n\tstylesString: string;\n}\n\n/**\n * Transforms native `Document` object into {@link module:engine/view/documentfragment~ViewDocumentFragment}. Comments are skipped.\n *\n * @param htmlDocument Native `Document` object to be transformed.\n */\nfunction documentToView( htmlDocument: Document, stylesProcessor: StylesProcessor ) {\n\tconst viewDocument = new ViewDocument( stylesProcessor );\n\tconst domConverter = new ViewDomConverter( viewDocument, { renderingMode: 'data' } );\n\tconst fragment = htmlDocument.createDocumentFragment();\n\tconst nodes = htmlDocument.body.childNodes;\n\n\twhile ( nodes.length > 0 ) {\n\t\tfragment.appendChild( nodes[ 0 ] );\n\t}\n\n\treturn domConverter.domToView( fragment, { skipComments: true } ) as ViewDocumentFragment;\n}\n\n/**\n * Removes all `<style>` elements found inside the `<body>` of the provided `htmlDocument`.\n *\n * This guards against sources that place (or flatten) a `<style>` block into the body, where its CSS text\n * would otherwise be converted to visible text. Styles located in the `<head>` are not affected.\n *\n * @param htmlDocument Native `Document` object to be cleaned.\n */\nfunction removeInBodyStyleBlocks( htmlDocument: Document ): void {\n\tfor ( const style of Array.from( htmlDocument.body.querySelectorAll( 'style' ) ) ) {\n\t\tstyle.remove();\n\t}\n}\n\n/**\n * Extracts both `CSSStyleSheet` and string representation from all `style` elements available in a provided `htmlDocument`.\n *\n * @param htmlDocument Native `Document` object from which styles will be extracted.\n */\nfunction extractStyles( htmlDocument: Document ): { styles: Array<CSSStyleSheet>; stylesString: string } {\n\tconst styles = [];\n\tconst stylesString = [];\n\tconst styleTags = Array.from( htmlDocument.getElementsByTagName( 'style' ) );\n\n\tfor ( const style of styleTags ) {\n\t\tif ( style.sheet && style.sheet.cssRules && style.sheet.cssRules.length ) {\n\t\t\tstyles.push( style.sheet );\n\t\t\tstylesString.push( style.innerHTML );\n\t\t}\n\t}\n\n\treturn {\n\t\tstyles,\n\t\tstylesString: stylesString.join( ' ' )\n\t};\n}\n\n/**\n * Removes leftover content from between closing </body> and closing </html> tag:\n *\n * ```html\n * <html><body><p>Foo Bar</p></body><span>Fo</span></html> -> <html><body><p>Foo Bar</p></body></html>\n * ```\n *\n * This function is used as specific browsers (Edge) add some random content after `body` tag when pasting from Word.\n * @param htmlString The HTML string to be cleaned.\n * @returns The HTML string with leftover content removed.\n */\nfunction cleanContentAfterBody( htmlString: string ) {\n\tconst bodyCloseTag = '</body>';\n\tconst htmlCloseTag = '</html>';\n\n\tconst bodyCloseIndex = htmlString.indexOf( bodyCloseTag );\n\n\tif ( bodyCloseIndex < 0 ) {\n\t\treturn htmlString;\n\t}\n\n\tconst htmlCloseIndex = htmlString.indexOf( htmlCloseTag, bodyCloseIndex + bodyCloseTag.length );\n\n\treturn htmlString.substring( 0, bodyCloseIndex + bodyCloseTag.length ) +\n\t\t( htmlCloseIndex >= 0 ? htmlString.substring( htmlCloseIndex ) : '' );\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/**\n * @module paste-from-office/pastefromoffice\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { insertToPriorityArray, priorities, type PriorityString } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tClipboardPipeline,\n\ttype ClipboardInputTransformationEvent,\n\ttype ViewDocumentClipboardInputEvent\n} from '@ckeditor/ckeditor5-clipboard';\n\nimport { PasteFromOfficeMSWordNormalizer } from './normalizers/mswordnormalizer.js';\nimport { GoogleDocsNormalizer } from './normalizers/googledocsnormalizer.js';\nimport { GoogleSheetsNormalizer } from './normalizers/googlesheetsnormalizer.js';\n\nimport { parsePasteOfficeHtml } from './filters/parse.js';\nimport type { PasteFromOfficeNormalizer } from './normalizer.js';\n\n/**\n * The Paste from Office plugin.\n *\n * This plugin handles content pasted from Office apps and transforms it (if necessary)\n * to a valid structure which can then be understood by the editor features.\n *\n * Transformation is made by a set of predefined {@link module:paste-from-office/normalizer~PasteFromOfficeNormalizer normalizers}.\n * This plugin includes following normalizers:\n * * {@link module:paste-from-office/normalizers/mswordnormalizer~PasteFromOfficeMSWordNormalizer Microsoft Word normalizer}\n * * {@link module:paste-from-office/normalizers/googledocsnormalizer~GoogleDocsNormalizer Google Docs normalizer}\n *\n * For more information about this feature check the {@glink api/paste-from-office package page}.\n */\nexport class PasteFromOffice extends Plugin {\n\t/**\n\t * The priority array of registered normalizers.\n\t */\n\tprivate _normalizers = [] as Array<{\n\t\tnormalizer: PasteFromOfficeNormalizer;\n\t\tpriority: PriorityString;\n\t}>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'PasteFromOffice' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'PFO';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ClipboardPipeline ]> {\n\t\treturn [ ClipboardPipeline ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tconst hasMultiLevelListPlugin = this.editor.plugins.has( 'MultiLevelListEditing' );\n\t\tconst hasTablePropertiesPlugin = this.editor.plugins.has( 'TablePropertiesEditing' );\n\t\tconst enableSkipLevelLists = !!this.editor.config.get( 'list.enableSkipLevelLists' );\n\n\t\tthis.registerNormalizer(\n\t\t\tnew PasteFromOfficeMSWordNormalizer(\n\t\t\t\tviewDocument,\n\t\t\t\thasMultiLevelListPlugin,\n\t\t\t\thasTablePropertiesPlugin,\n\t\t\t\tenableSkipLevelLists\n\t\t\t)\n\t\t);\n\n\t\tthis.registerNormalizer( new GoogleDocsNormalizer( viewDocument ) );\n\t\tthis.registerNormalizer( new GoogleSheetsNormalizer( viewDocument ) );\n\n\t\tviewDocument.on<ViewDocumentClipboardInputEvent>( 'clipboardInput', ( evt, data ) => {\n\t\t\tif ( typeof data.content != 'string' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The `htmlString` is used only to detect (match) the active normalizer.\n\t\t\t// The actual content processing is happening on `data.content` below.\n\t\t\tconst htmlString = data.dataTransfer.getData( 'text/html' );\n\t\t\tconst activeNormalizer = this._normalizers.find( ( { normalizer } ) => normalizer.isActive( htmlString ) );\n\n\t\t\tif ( activeNormalizer ) {\n\t\t\t\tconst parsedData = parsePasteOfficeHtml( data.content, viewDocument.stylesProcessor );\n\n\t\t\t\tdata.content = parsedData.body;\n\t\t\t\tdata.extraContent = { ...parsedData, isTransformedWithPasteFromOffice: true };\n\t\t\t}\n\t\t}, { priority: priorities.low + 10 } );\n\n\t\tclipboardPipeline.on<ClipboardInputTransformationEvent>( 'inputTransformation', ( evt, data ) => {\n\t\t\tif ( !data.extraContent || !( data.extraContent as any ).isTransformedWithPasteFromOffice ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The `htmlString` is used only to detect (match) the active normalizers, not for processing.\n\t\t\tconst htmlString = data.dataTransfer.getData( 'text/html' );\n\t\t\tconst normalizers = this._normalizers.filter( ( { normalizer } ) => normalizer.isActive( htmlString ) );\n\n\t\t\tfor ( const { normalizer } of normalizers ) {\n\t\t\t\tnormalizer.execute( data );\n\t\t\t}\n\t\t},\n\t\t{ priority: 'high' } );\n\t}\n\n\t/**\n\t * Registers a normalizer with the given priority.\n\t */\n\tpublic registerNormalizer(\n\t\tnormalizer: PasteFromOfficeNormalizer,\n\t\tpriority?: PriorityString\n\t): void {\n\t\tinsertToPriorityArray( this._normalizers, {\n\t\t\tnormalizer,\n\t\t\tpriority: priorities.get( priority )\n\t\t} );\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { IconRemoveFormat } from \"@ckeditor/ckeditor5-icons\";\nimport { ButtonView, MenuBarMenuListItemButtonView } from \"@ckeditor/ckeditor5-ui\";\nimport { first } from \"@ckeditor/ckeditor5-utils\";\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 remove-format/removeformatui\n*/\nconst REMOVE_FORMAT = \"removeFormat\";\n/**\n* The remove format UI plugin. It registers the `'removeFormat'` button which can be\n* used in the toolbar.\n*/\nvar RemoveFormatUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"RemoveFormatUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.ui.componentFactory.add(REMOVE_FORMAT, () => {\n\t\t\tconst view = this._createButton(ButtonView);\n\t\t\tview.set({ tooltip: true });\n\t\t\treturn view;\n\t\t});\n\t\teditor.ui.componentFactory.add(`menuBar:${REMOVE_FORMAT}`, () => this._createButton(MenuBarMenuListItemButtonView));\n\t}\n\t/**\n\t* Creates a button for remove format command to use either in toolbar or in menu bar.\n\t*/\n\t_createButton(ButtonClass) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command = editor.commands.get(REMOVE_FORMAT);\n\t\tconst view = new ButtonClass(editor.locale);\n\t\tconst t = locale.t;\n\t\tview.set({\n\t\t\tlabel: t(\"Remove Format\"),\n\t\t\ticon: IconRemoveFormat\n\t\t});\n\t\tview.bind(\"isEnabled\").to(command, \"isEnabled\");\n\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\teditor.execute(REMOVE_FORMAT);\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn view;\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* The remove format command.\n*\n* It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}\n* to clear the formatting in the selection.\n*\n* ```ts\n* editor.execute( 'removeFormat' );\n* ```\n*/\nvar RemoveFormatCommand = class extends Command {\n\t/**\n\t* List of all registered custom attribute handlers.\n\t*/\n\t_customAttributesHandlers = [];\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tthis.isEnabled = !!first(this._getFormattingItems(model.document.selection));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tmodel.change((writer) => {\n\t\t\tfor (const item of this._getFormattingItems(model.document.selection)) if (item.is(\"selection\")) for (const attributeName of this._getFormattingAttributes(item)) writer.removeSelectionAttribute(attributeName);\n\t\t\telse {\n\t\t\t\tconst itemRange = writer.createRangeOn(item);\n\t\t\t\tfor (const attributeName of this._getFormattingAttributes(item)) this._removeFormatting(attributeName, item, itemRange, writer);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Registers a custom attribute handler that will be used to determine if an attribute is formatting and how to remove it.\n\t*\n\t* @internal\n\t*/\n\tregisterCustomAttribute(isFormatting, removeFormatting) {\n\t\tthis._customAttributesHandlers.push({\n\t\t\tisFormatting,\n\t\t\tremoveFormatting\n\t\t});\n\t}\n\t/**\n\t* Helper method that removes a formatting attribute from an item either using custom callbacks or writer remove attribute.\n\t*/\n\t_removeFormatting(attributeName, item, itemRange, writer) {\n\t\tlet customHandled = false;\n\t\tconst nonSelectionAttributeName = toNonSelectionAttribute(attributeName);\n\t\tfor (const { isFormatting, removeFormatting } of this._customAttributesHandlers) if (isFormatting(nonSelectionAttributeName, item)) {\n\t\t\tremoveFormatting(attributeName, itemRange, writer);\n\t\t\tcustomHandled = true;\n\t\t}\n\t\tif (!customHandled) writer.removeAttribute(attributeName, itemRange);\n\t}\n\t/**\n\t* Returns an iterable of items in a selection (including the selection itself) that have formatting model\n\t* attributes to be removed by the feature.\n\t*/\n\t*_getFormattingItems(selection) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst itemHasRemovableFormatting = (item) => {\n\t\t\treturn !!first(this._getFormattingAttributes(item));\n\t\t};\n\t\tfor (const curRange of selection.getRanges()) for (const item of curRange.getItems()) {\n\t\t\tif (schema.isBlock(item) && curRange.end.isTouching(model.createPositionAt(item, 0))) continue;\n\t\t\tif (itemHasRemovableFormatting(item)) yield item;\n\t\t}\n\t\tfor (const block of selection.getSelectedBlocks()) if (itemHasRemovableFormatting(block)) yield block;\n\t\tif (itemHasRemovableFormatting(selection)) yield selection;\n\t}\n\t/**\n\t* Returns an iterable of formatting attributes of a given model item.\n\t*\n\t* **Note:** Formatting items have the `isFormatting` property set to `true`.\n\t*\n\t* @returns The names of formatting attributes found in a given item.\n\t*/\n\t*_getFormattingAttributes(item) {\n\t\tconst { schema } = this.editor.model;\n\t\tfor (const [attributeName] of item.getAttributes()) {\n\t\t\tconst nonSelectionAttributeName = toNonSelectionAttribute(attributeName);\n\t\t\tfor (const { isFormatting } of this._customAttributesHandlers) if (isFormatting(nonSelectionAttributeName, item)) yield attributeName;\n\t\t\tconst attributeProperties = schema.getAttributeProperties(nonSelectionAttributeName);\n\t\t\tif (attributeProperties && attributeProperties.isFormatting) yield attributeName;\n\t\t}\n\t}\n};\n/**\n* Helper function that converts a selection attribute name to a non-selection one. E.g. `selection:bold` to `bold`.\n*/\nfunction toNonSelectionAttribute(attributeName) {\n\treturn attributeName.replace(/^selection:/, \"\");\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 remove-format/removeformatediting\n*/\n/**\n* The remove format editing plugin.\n*\n* It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n*/\nvar RemoveFormatEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"RemoveFormatEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"RF\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\teditor.commands.add(\"removeFormat\", new RemoveFormatCommand(editor));\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 remove-format/removeformat\n*/\n/**\n* The remove format plugin.\n*\n* This is a \"glue\" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}\n* and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.\n*\n* For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.\n*/\nvar RemoveFormat = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [RemoveFormatEditing, RemoveFormatUI];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"RemoveFormat\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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\nexport { RemoveFormat, RemoveFormatCommand, RemoveFormatEditing, RemoveFormatUI };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module remove-format/removeformatui\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconRemoveFormat } from '@ckeditor/ckeditor5-icons';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';\n\nimport { type RemoveFormatCommand } from './removeformatcommand.js';\n\nconst REMOVE_FORMAT = 'removeFormat';\n\n/**\n * The remove format UI plugin. It registers the `'removeFormat'` button which can be\n * used in the toolbar.\n */\nexport class RemoveFormatUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormatUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( REMOVE_FORMAT, () => {\n\t\t\tconst view = this._createButton( ButtonView );\n\n\t\t\tview.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( `menuBar:${ REMOVE_FORMAT }`, () => this._createButton( MenuBarMenuListItemButtonView ) );\n\t}\n\n\t/**\n\t * Creates a button for remove format command to use either in toolbar or in menu bar.\n\t */\n\tprivate _createButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>( ButtonClass: T ): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command: RemoveFormatCommand = editor.commands.get( REMOVE_FORMAT )!;\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\t\tconst t = locale.t;\n\n\t\tview.set( {\n\t\t\tlabel: t( 'Remove Format' ),\n\t\t\ticon: IconRemoveFormat\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t// Execute the command.\n\t\tthis.listenTo( view, 'execute', () => {\n\t\t\teditor.execute( REMOVE_FORMAT );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn view;\n\t}\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/**\n * @module remove-format/removeformatcommand\n */\n\nimport type { ModelDocumentSelection, ModelItem, ModelRange, ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The remove format command.\n *\n * It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}\n * to clear the formatting in the selection.\n *\n * ```ts\n * editor.execute( 'removeFormat' );\n * ```\n */\nexport class RemoveFormatCommand extends Command {\n\tdeclare public value: boolean;\n\n\t/**\n\t * List of all registered custom attribute handlers.\n\t */\n\tprivate _customAttributesHandlers: Array<{\n\t\tisFormatting: IsFormattingCallback;\n\t\tremoveFormatting: RemoveFormattingCallback;\n\t}> = [];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\n\t\tthis.isEnabled = !!first( this._getFormattingItems( model.document.selection ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const item of this._getFormattingItems( model.document.selection ) ) {\n\t\t\t\tif ( item.is( 'selection' ) ) {\n\t\t\t\t\tfor ( const attributeName of this._getFormattingAttributes( item ) ) {\n\t\t\t\t\t\twriter.removeSelectionAttribute( attributeName );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Workaround for items with multiple removable attributes. See\n\t\t\t\t\t// https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609\n\t\t\t\t\tconst itemRange = writer.createRangeOn( item );\n\n\t\t\t\t\tfor ( const attributeName of this._getFormattingAttributes( item ) ) {\n\t\t\t\t\t\tthis._removeFormatting( attributeName, item, itemRange, writer );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a custom attribute handler that will be used to determine if an attribute is formatting and how to remove it.\n\t *\n\t * @internal\n\t */\n\tpublic registerCustomAttribute( isFormatting: IsFormattingCallback, removeFormatting: RemoveFormattingCallback ): void {\n\t\tthis._customAttributesHandlers.push( {\n\t\t\tisFormatting,\n\t\t\tremoveFormatting\n\t\t} );\n\t}\n\n\t/**\n\t * Helper method that removes a formatting attribute from an item either using custom callbacks or writer remove attribute.\n\t */\n\tprivate _removeFormatting( attributeName: string, item: ModelItem, itemRange: ModelRange, writer: ModelWriter ) {\n\t\tlet customHandled = false;\n\t\tconst nonSelectionAttributeName = toNonSelectionAttribute( attributeName );\n\n\t\tfor ( const { isFormatting, removeFormatting } of this._customAttributesHandlers ) {\n\t\t\tif ( isFormatting( nonSelectionAttributeName, item ) ) {\n\t\t\t\tremoveFormatting( attributeName, itemRange, writer );\n\t\t\t\tcustomHandled = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( !customHandled ) {\n\t\t\twriter.removeAttribute( attributeName, itemRange );\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterable of items in a selection (including the selection itself) that have formatting model\n\t * attributes to be removed by the feature.\n\t */\n\tprivate* _getFormattingItems( selection: ModelDocumentSelection ) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\n\t\tconst itemHasRemovableFormatting = ( item: ModelItem | ModelDocumentSelection ) => {\n\t\t\treturn !!first( this._getFormattingAttributes( item ) );\n\t\t};\n\n\t\t// Check formatting on selected items.\n\t\tfor ( const curRange of selection.getRanges() ) {\n\t\t\tfor ( const item of curRange.getItems() ) {\n\t\t\t\t// Ignore last block if range ends at the beginning of it.\n\t\t\t\tif ( schema.isBlock( item ) && curRange.end.isTouching( model.createPositionAt( item, 0 ) ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( itemHasRemovableFormatting( item ) ) {\n\t\t\t\t\tyield item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check formatting from selected blocks (to include partly selected blocks).\n\t\tfor ( const block of selection.getSelectedBlocks() ) {\n\t\t\tif ( itemHasRemovableFormatting( block ) ) {\n\t\t\t\tyield block;\n\t\t\t}\n\t\t}\n\n\t\t// Finally the selection might be formatted as well, so make sure to check it.\n\t\tif ( itemHasRemovableFormatting( selection ) ) {\n\t\t\tyield selection;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterable of formatting attributes of a given model item.\n\t *\n\t * **Note:** Formatting items have the `isFormatting` property set to `true`.\n\t *\n\t * @returns The names of formatting attributes found in a given item.\n\t */\n\tprivate* _getFormattingAttributes( item: ModelItem | ModelDocumentSelection ) {\n\t\tconst { schema } = this.editor.model;\n\n\t\tfor ( const [ attributeName ] of item.getAttributes() ) {\n\t\t\tconst nonSelectionAttributeName = toNonSelectionAttribute( attributeName );\n\n\t\t\tfor ( const { isFormatting } of this._customAttributesHandlers ) {\n\t\t\t\tif ( isFormatting( nonSelectionAttributeName, item ) ) {\n\t\t\t\t\tyield attributeName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst attributeProperties = schema.getAttributeProperties( nonSelectionAttributeName );\n\n\t\t\tif ( attributeProperties && attributeProperties.isFormatting ) {\n\t\t\t\tyield attributeName;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Helper function that converts a selection attribute name to a non-selection one. E.g. `selection:bold` to `bold`.\n */\nfunction toNonSelectionAttribute( attributeName: string ) {\n\treturn attributeName.replace( /^selection:/, '' );\n}\n\n/**\n * Callback that checks if an attribute is a formatting attribute.\n *\n * @internal\n */\nexport type IsFormattingCallback = ( attributeName: string, item: ModelItem | ModelDocumentSelection ) => boolean;\n\n/**\n * Callback that removes formatting from an item.\n *\n * @internal\n */\nexport type RemoveFormattingCallback = ( attributeName: string, range: ModelRange, writer: ModelWriter ) => void;\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/**\n * @module remove-format/removeformatediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\nimport { RemoveFormatCommand } from './removeformatcommand.js';\n\n/**\n * The remove format editing plugin.\n *\n * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n */\nexport class RemoveFormatEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormatEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'RF';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.commands.add( 'removeFormat', new RemoveFormatCommand( editor ) );\n\t}\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/**\n * @module remove-format/removeformat\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { RemoveFormatUI } from './removeformatui.js';\nimport { RemoveFormatEditing } from './removeformatediting.js';\n\n/**\n * The remove format plugin.\n *\n * This is a \"glue\" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}\n * and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.\n *\n * For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.\n */\nexport class RemoveFormat extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ RemoveFormatEditing, RemoveFormatUI ]> {\n\t\treturn [ RemoveFormatEditing, RemoveFormatUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormat' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "import { Command, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Widget, WidgetToolbarRepository, isWidget, toWidget, toWidgetEditable } from \"@ckeditor/ckeditor5-widget\";\nimport { CKEditorError, Collection, DomEmitterMixin, FocusTracker, KeystrokeHandler, Rect, first, getLocalizedArrowKeyCodeDirection, global, priorities, toUnit, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { debounce, isEqual, isObject, throttle } from \"es-toolkit/compat\";\nimport { DomEventObserver, Matcher, ModelDocumentSelection, ModelElement, addBackgroundStylesRules, addBorderStylesRules, addMarginStylesRules, addPaddingStylesRules, enableViewPlaceholder, isColorStyleValue, isLengthStyleValue, isPercentageStyleValue } from \"@ckeditor/ckeditor5-engine\";\nimport { _getCopyOnEnterAttributes } from \"@ckeditor/ckeditor5-enter\";\nimport { IconAlignBottom, IconAlignCenter, IconAlignJustify, IconAlignLeft, IconAlignMiddle, IconAlignRight, IconAlignTop, IconCaption, IconObjectCenter, IconObjectInlineLeft, IconObjectInlineRight, IconObjectLeft, IconObjectRight, IconPreviousArrow, IconTable, IconTableCellProperties, IconTableColumn, IconTableLayout, IconTableMergeCell, IconTableProperties, IconTableRow } from \"@ckeditor/ckeditor5-icons\";\nimport { BalloonPanelView, ButtonView, ColorSelectorView, ContextualBalloon, DropdownButtonView, FocusCycler, FormHeaderView, FormRowView, InputTextView, LabelView, LabeledFieldView, MenuBarMenuView, SplitButtonView, SwitchButtonView, ToolbarView, UIModel, View, ViewCollection, addKeyboardHandlingForGrid, addListToDropdown, clickOutsideHandler, createDropdown, createLabeledDropdown, createLabeledInputText, getLocalizedColorOptions, normalizeColorOptions, submitHandler } from \"@ckeditor/ckeditor5-ui\";\nimport { ClipboardMarkersUtils, ClipboardPipeline } from \"@ckeditor/ckeditor5-clipboard\";\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 ALIGN_VALUES_REG_EXP$1 = /^(left|center|right)$/;\nconst FLOAT_VALUES_REG_EXP = /^(left|none|right)$/;\n/**\n* Conversion helper for upcasting attributes using normalized styles.\n*\n* @param options.modelAttribute The attribute to set.\n* @param options.styleName The style name to convert.\n* @param options.attributeName The HTML attribute name to convert.\n* @param options.attributeType The HTML attribute type for value normalization.\n* @param options.viewElement The view element name that should be converted.\n* @param options.defaultValue The default value for the specified `modelAttribute`.\n* @param options.shouldUpcast The function which returns `true` if style should be upcasted from this element.\n* @internal\n*/\nfunction upcastStyleToAttribute(conversion, options) {\n\tconst { modelAttribute, styleName, attributeName, attributeType, viewElement, defaultValue, shouldUpcast = () => true, reduceBoxSides = false } = options;\n\tconversion.for(\"upcast\").attributeToAttribute({\n\t\tview: {\n\t\t\tname: viewElement,\n\t\t\tstyles: { [styleName]: /[\\s\\S]+/ }\n\t\t},\n\t\tmodel: {\n\t\t\tkey: modelAttribute,\n\t\t\tvalue: (viewElement, conversionApi, data) => {\n\t\t\t\tif (!shouldUpcast(viewElement)) return;\n\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted(defaultValue, \"\", data);\n\t\t\t\tconst normalized = viewElement.getNormalizedStyle(styleName);\n\t\t\t\tconst value = reduceBoxSides ? reduceBoxSidesValue(normalized) : normalized;\n\t\t\t\tif (localDefaultValue !== value) return value;\n\t\t\t\tconversionApi.consumable.consume(viewElement, { styles: styleName });\n\t\t\t}\n\t\t}\n\t});\n\tif (attributeName) conversion.for(\"upcast\").attributeToAttribute({\n\t\tview: {\n\t\t\tname: viewElement,\n\t\t\tattributes: { [attributeName]: /.+/ }\n\t\t},\n\t\tmodel: {\n\t\t\tkey: modelAttribute,\n\t\t\tvalue: (viewElement, conversionApi, data) => {\n\t\t\t\tif (viewElement.name == \"figure\" || viewElement.hasStyle(styleName) || viewElement.name == \"table\" && viewElement.parent.name == \"figure\" && viewElement.parent.hasStyle(styleName)) return;\n\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted(defaultValue, \"\", data);\n\t\t\t\tlet value = viewElement.getAttribute(attributeName);\n\t\t\t\tif (value && attributeType == \"length\") {\n\t\t\t\t\tconst parsedValue = parseFloat(value);\n\t\t\t\t\tif (isNaN(parsedValue)) value = localDefaultValue;\n\t\t\t\t\telse value = parsedValue + (value.includes(\"%\") ? \"%\" : \"px\");\n\t\t\t\t}\n\t\t\t\tif (localDefaultValue !== value) return value;\n\t\t\t\tconversionApi.consumable.consume(viewElement, { attributes: attributeName });\n\t\t\t}\n\t\t}\n\t});\n}\n/**\n* Conversion helper for upcasting border styles for view elements.\n*\n* @param editor The editor instance.\n* @param defaultBorder The default border values.\n* @param defaultBorder.color The default `borderColor` value.\n* @param defaultBorder.style The default `borderStyle` value.\n* @param defaultBorder.width The default `borderWidth` value.\n* @internal\n*/\nfunction upcastBorderStyles(editor, viewElementName, modelAttributes, defaultBorder) {\n\tconst { conversion } = editor;\n\tconversion.for(\"upcast\").add((dispatcher) => {\n\t\tdispatcher.on(`element:${viewElementName}`, (evt, data, conversionApi) => {\n\t\t\tconst { modelRange, viewItem } = data;\n\t\t\tif (!modelRange) return;\n\t\t\tconst stylesToConsume = [\n\t\t\t\t\"border-top-width\",\n\t\t\t\t\"border-top-color\",\n\t\t\t\t\"border-top-style\",\n\t\t\t\t\"border-bottom-width\",\n\t\t\t\t\"border-bottom-color\",\n\t\t\t\t\"border-bottom-style\",\n\t\t\t\t\"border-right-width\",\n\t\t\t\t\"border-right-color\",\n\t\t\t\t\"border-right-style\",\n\t\t\t\t\"border-left-width\",\n\t\t\t\t\"border-left-color\",\n\t\t\t\t\"border-left-style\"\n\t\t\t].filter((styleName) => viewItem.hasStyle(styleName));\n\t\t\tconst viewTable = viewItem.is(\"element\", \"table\") ? viewItem : viewItem.findAncestor(\"table\");\n\t\t\tconst hasTableBorderAttribute = viewTable.hasAttribute(\"border\");\n\t\t\tif (!stylesToConsume.length && !hasTableBorderAttribute) return;\n\t\t\tconst matcherPattern = { styles: stylesToConsume };\n\t\t\tif (!conversionApi.consumable.test(viewItem, matcherPattern)) return;\n\t\t\tconst modelElement = first(modelRange.getItems({ shallow: true }));\n\t\t\tconst tableModelElement = modelElement.findAncestor(\"table\", { includeSelf: true });\n\t\t\tlet localDefaultBorder = defaultBorder;\n\t\t\tif (tableModelElement && tableModelElement.getAttribute(\"tableType\") == \"layout\") localDefaultBorder = {\n\t\t\t\tstyle: \"none\",\n\t\t\t\tcolor: \"\",\n\t\t\t\twidth: \"\"\n\t\t\t};\n\t\t\tconversionApi.consumable.consume(viewItem, matcherPattern);\n\t\t\tconst normalizedBorder = {\n\t\t\t\tstyle: viewItem.getNormalizedStyle(\"border-style\"),\n\t\t\t\tcolor: viewItem.getNormalizedStyle(\"border-color\"),\n\t\t\t\twidth: viewItem.getNormalizedStyle(\"border-width\")\n\t\t\t};\n\t\t\tif (hasTableBorderAttribute && conversionApi.consumable.test(viewTable, { attributes: \"border\" })) {\n\t\t\t\tconst borderValue = parseFloat(viewTable.getAttribute(\"border\") || \"1\");\n\t\t\t\tconst borderPx = Number.isNaN(borderValue) || !Number.isFinite(borderValue) || borderValue < 0 || viewItem.name != \"table\" && borderValue > 1 ? \"1px\" : `${borderValue}px`;\n\t\t\t\tnormalizedBorder.width = {\n\t\t\t\t\ttop: borderPx,\n\t\t\t\t\tbottom: borderPx,\n\t\t\t\t\tright: borderPx,\n\t\t\t\t\tleft: borderPx,\n\t\t\t\t\t...normalizedBorder.width || {}\n\t\t\t\t};\n\t\t\t\tif (viewItem.is(\"element\", \"table\")) conversionApi.consumable.consume(viewTable, { attributes: \"border\" });\n\t\t\t}\n\t\t\tconst reducedBorder = {\n\t\t\t\tstyle: reduceBoxSidesValue(normalizedBorder.style),\n\t\t\t\tcolor: reduceBoxSidesValue(normalizedBorder.color),\n\t\t\t\twidth: reduceBoxSidesValue(normalizedBorder.width)\n\t\t\t};\n\t\t\tif (reducedBorder.style !== localDefaultBorder.style) conversionApi.writer.setAttribute(modelAttributes.style, reducedBorder.style, modelElement);\n\t\t\tif (reducedBorder.color !== localDefaultBorder.color) conversionApi.writer.setAttribute(modelAttributes.color, reducedBorder.color, modelElement);\n\t\t\tif (reducedBorder.width !== localDefaultBorder.width) conversionApi.writer.setAttribute(modelAttributes.width, reducedBorder.width, modelElement);\n\t\t});\n\t});\n}\n/**\n* Conversion helper for downcasting an attribute to a style.\n*\n* @internal\n*/\nfunction downcastAttributeToStyle(conversion, options) {\n\tconst { modelElement, modelAttribute, styleName } = options;\n\tconversion.for(\"downcast\").attributeToAttribute({\n\t\tmodel: {\n\t\t\tname: modelElement,\n\t\t\tkey: modelAttribute\n\t\t},\n\t\tview: (modelAttributeValue) => ({\n\t\t\tkey: \"style\",\n\t\t\tvalue: { [styleName]: modelAttributeValue }\n\t\t})\n\t});\n}\n/**\n* Conversion helper for downcasting attributes from the model table to a view table (not to `<figure>`).\n*\n* @internal\n*/\nfunction downcastTableAttribute(conversion, options) {\n\tconst { modelAttribute, styleName } = options;\n\tconversion.for(\"downcast\").add((dispatcher) => {\n\t\tdispatcher.on(`attribute:${modelAttribute}:table`, (evt, data, conversionApi) => {\n\t\t\tconst { item, attributeNewValue } = data;\n\t\t\tconst { mapper, writer } = conversionApi;\n\t\t\tif (!conversionApi.consumable.consume(data.item, evt.name)) return;\n\t\t\tconst table = Array.from(mapper.toViewElement(item).getChildren()).find((child) => child.is(\"element\", \"table\"));\n\t\t\tif (attributeNewValue) writer.setStyle(styleName, attributeNewValue, table);\n\t\t\telse writer.removeStyle(styleName, table);\n\t\t});\n\t});\n}\n/**\n* Returns the default value for table or table cell property adjusted for layout tables.\n*\n* @internal\n*/\nfunction getDefaultValueAdjusted(defaultValue, layoutTableDefault, data) {\n\tconst modelElement = data.modelRange && first(data.modelRange.getItems({ shallow: true }));\n\tconst tableElement = modelElement && modelElement.is(\"element\") && modelElement.findAncestor(\"table\", { includeSelf: true });\n\tif (tableElement && tableElement.getAttribute(\"tableType\") === \"layout\") return layoutTableDefault;\n\treturn defaultValue;\n}\n/**\n* Reduces the full top, right, bottom, left object to a single string if all sides are equal.\n* Returns original style otherwise.\n*/\nfunction reduceBoxSidesValue(style) {\n\tif (!style) return;\n\tconst sides = [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t];\n\tif (!sides.every((side) => style[side])) return style;\n\tconst topSideStyle = style.top;\n\tif (!sides.every((side) => style[side] === topSideStyle)) return style;\n\treturn topSideStyle;\n}\n/**\n* Conversion helper for upcasting the `cellpadding` table attribute.\n*\n* @param editor The editor instance.\n* @param viewElementName The view element name that should be converted.\n* @param defaultPadding The default padding value.\n* @internal\n*/\nfunction upcastTableCellPaddingAttribute(editor, viewElementName, defaultPadding) {\n\tconst { conversion } = editor;\n\tconversion.for(\"upcast\").add((dispatcher) => {\n\t\tdispatcher.on(`element:${viewElementName}`, (evt, data, conversionApi) => {\n\t\t\tconst { modelRange, viewItem } = data;\n\t\t\tif (!modelRange) return;\n\t\t\tif (viewItem.is(\"element\", \"table\")) {\n\t\t\t\tconversionApi.consumable.consume(viewItem, { attributes: \"cellpadding\" });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst viewTable = viewItem.findAncestor(\"table\");\n\t\t\tif (!viewTable.hasAttribute(\"cellpadding\") || !conversionApi.consumable.test(viewTable, { attributes: \"cellpadding\" })) return;\n\t\t\tconst modelElement = modelRange?.start?.nodeAfter;\n\t\t\tconst cellpaddingValue = parseFloat(viewTable.getAttribute(\"cellpadding\") || \"1\");\n\t\t\tconst cellpaddingPx = Number.isNaN(cellpaddingValue) || !Number.isFinite(cellpaddingValue) || cellpaddingValue < 0 ? \"0px\" : `${cellpaddingValue}px`;\n\t\t\tconst tableCellPaddings = modelElement.getAttribute(\"tableCellPadding\");\n\t\t\tif (!tableCellPaddings) {\n\t\t\t\tif (defaultPadding !== cellpaddingPx) conversionApi.writer.setAttribute(\"tableCellPadding\", cellpaddingPx, modelElement);\n\t\t\t} else if (typeof tableCellPaddings === \"object\") {\n\t\t\t\tconst normalizedPaddings = {\n\t\t\t\t\t...defaultPadding !== cellpaddingPx && { top: cellpaddingPx },\n\t\t\t\t\t...defaultPadding !== cellpaddingPx && { right: cellpaddingPx },\n\t\t\t\t\t...defaultPadding !== cellpaddingPx && { bottom: cellpaddingPx },\n\t\t\t\t\t...defaultPadding !== cellpaddingPx && { left: cellpaddingPx },\n\t\t\t\t\t...tableCellPaddings\n\t\t\t\t};\n\t\t\t\tconversionApi.writer.setAttribute(\"tableCellPadding\", normalizedPaddings, modelElement);\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t});\n}\n/**\n* Default table alignment options.\n*/\nconst DEFAULT_TABLE_ALIGNMENT_OPTIONS = {\n\tleft: { className: \"table-style-align-left\" },\n\tcenter: { className: \"table-style-align-center\" },\n\tright: { className: \"table-style-align-right\" },\n\tblockLeft: { className: \"table-style-block-align-left\" },\n\tblockRight: { className: \"table-style-block-align-right\" }\n};\n/**\n* Configuration for upcasting table alignment from view to model.\n*/\nconst upcastTableAlignmentConfig = [\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: { float: FLOAT_VALUES_REG_EXP }\n\t\t},\n\t\tgetAlign: (viewElement) => {\n\t\t\tlet align = viewElement.getStyle(\"float\");\n\t\t\tif (align === \"none\") align = \"center\";\n\t\t\treturn align;\n\t\t},\n\t\tgetConsumables(viewElement) {\n\t\t\tconst float = viewElement.getStyle(\"float\");\n\t\t\tconst styles = [\"float\"];\n\t\t\tif (float === \"left\" && viewElement.hasStyle(\"margin-right\")) styles.push(\"margin-right\");\n\t\t\telse if (float === \"right\" && viewElement.hasStyle(\"margin-left\")) styles.push(\"margin-left\");\n\t\t\treturn { styles };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: {\n\t\t\t\t\"margin-left\": \"auto\",\n\t\t\t\t\"margin-right\": \"auto\"\n\t\t\t}\n\t\t},\n\t\tgetAlign: () => \"center\",\n\t\tgetConsumables: () => {\n\t\t\treturn { styles: [\"margin-left\", \"margin-right\"] };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: \"class\",\n\t\t\tvalue: \"table-style-align-left\"\n\t\t},\n\t\tgetAlign: () => \"left\",\n\t\tgetConsumables() {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.left.className };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: \"class\",\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.right.className\n\t\t},\n\t\tgetAlign: () => \"right\",\n\t\tgetConsumables() {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.right.className };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: \"class\",\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.center.className\n\t\t},\n\t\tgetAlign: () => \"center\",\n\t\tgetConsumables() {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.center.className };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: \"class\",\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className\n\t\t},\n\t\tgetAlign: () => \"blockLeft\",\n\t\tgetConsumables() {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: \"class\",\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className\n\t\t},\n\t\tgetAlign: () => \"blockRight\",\n\t\tgetConsumables() {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: {\n\t\t\t\t\"margin-left\": \"0\",\n\t\t\t\t\"margin-right\": \"auto\"\n\t\t\t}\n\t\t},\n\t\tgetAlign: () => \"blockLeft\",\n\t\tgetConsumables() {\n\t\t\treturn { styles: [\"margin-left\", \"margin-right\"] };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: {\n\t\t\t\t\"margin-left\": \"auto\",\n\t\t\t\t\"margin-right\": \"0\"\n\t\t\t}\n\t\t},\n\t\tgetAlign: () => \"blockRight\",\n\t\tgetConsumables() {\n\t\t\treturn { styles: [\"margin-left\", \"margin-right\"] };\n\t\t}\n\t},\n\t{\n\t\tview: {\n\t\t\tname: \"table\",\n\t\t\tattributes: { align: ALIGN_VALUES_REG_EXP$1 }\n\t\t},\n\t\tgetAlign: (viewElement) => viewElement.getAttribute(\"align\"),\n\t\tgetConsumables() {\n\t\t\treturn { attributes: \"align\" };\n\t\t}\n\t}\n];\nconst downcastTableAlignmentConfig = {\n\tcenter: {\n\t\talign: \"center\",\n\t\tstyle: \"margin-left: auto; margin-right: auto;\",\n\t\tclassName: \"table-style-align-center\"\n\t},\n\tleft: {\n\t\talign: \"left\",\n\t\tstyle: \"float: left;\",\n\t\tclassName: \"table-style-align-left\"\n\t},\n\tright: {\n\t\talign: \"right\",\n\t\tstyle: \"float: right;\",\n\t\tclassName: \"table-style-align-right\"\n\t},\n\tblockLeft: {\n\t\talign: void 0,\n\t\tstyle: \"margin-left: 0; margin-right: auto;\",\n\t\tclassName: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className\n\t},\n\tblockRight: {\n\t\talign: void 0,\n\t\tstyle: \"margin-left: auto; margin-right: 0;\",\n\t\tclassName: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className\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* The table iterator class. It allows to iterate over table cells. For each cell the iterator yields\n* {@link module:table/tablewalker~TableSlot} with proper table cell attributes.\n*/\nvar TableWalker = class {\n\t/**\n\t* The walker's table element.\n\t*\n\t* @internal\n\t*/\n\t_table;\n\t/**\n\t* A row index from which this iterator will start.\n\t*/\n\t_startRow;\n\t/**\n\t* A row index at which this iterator will end.\n\t*/\n\t_endRow;\n\t/**\n\t* If set, the table walker will only output cells from a given column and following ones or cells that overlap them.\n\t*/\n\t_startColumn;\n\t/**\n\t* If set, the table walker will only output cells up to a given column.\n\t*/\n\t_endColumn;\n\t/**\n\t* Enables output of spanned cells that are normally not yielded.\n\t*/\n\t_includeAllSlots;\n\t/**\n\t* Row indexes to skip from the iteration.\n\t*/\n\t_skipRows;\n\t/**\n\t* The current row index.\n\t*\n\t* @internal\n\t*/\n\t_row;\n\t/**\n\t* The index of the current row element in the table.\n\t*\n\t* @internal\n\t*/\n\t_rowIndex;\n\t/**\n\t* The current column index.\n\t*\n\t* @internal\n\t*/\n\t_column;\n\t/**\n\t* The cell index in a parent row. For spanned cells when {@link #_includeAllSlots} is set to `true`,\n\t* this represents the index of the next table cell.\n\t*\n\t* @internal\n\t*/\n\t_cellIndex;\n\t/**\n\t* Holds a map of spanned cells in a table.\n\t*/\n\t_spannedCells;\n\t/**\n\t* Index of the next column where a cell is anchored.\n\t*/\n\t_nextCellAtColumn;\n\t/**\n\t* Indicates whether the iterator jumped to (or close to) the start row, ignoring rows that don't need to be traversed.\n\t*/\n\t_jumpedToStartRow = false;\n\t/**\n\t* Creates an instance of the table walker.\n\t*\n\t* The table walker iterates internally by traversing the table from row index = 0 and column index = 0.\n\t* It walks row by row and column by column in order to output values defined in the constructor.\n\t* By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,\n\t* pass the `includeAllSlots` option to the constructor.\n\t*\n\t* The most important values of the iterator are column and row indexes of a cell.\n\t*\n\t* See {@link module:table/tablewalker~TableSlot} what values are returned by the table walker.\n\t*\n\t* To iterate over a given row:\n\t*\n\t* ```ts\n\t* const tableWalker = new TableWalker( table, { startRow: 1, endRow: 2 } );\n\t*\n\t* for ( const tableSlot of tableWalker ) {\n\t*   console.log( 'A cell at row', tableSlot.row, 'and column', tableSlot.column );\n\t* }\n\t* ```\n\t*\n\t* For instance the code above for the following table:\n\t*\n\t*  +----+----+----+----+----+----+\n\t*  | 00      | 02 | 03 | 04 | 05 |\n\t*  |         +----+----+----+----+\n\t*  |         | 12      | 14 | 15 |\n\t*  |         +----+----+----+    +\n\t*  |         | 22           |    |\n\t*  |----+----+----+----+----+    +\n\t*  | 30 | 31 | 32 | 33 | 34 |    |\n\t*  +----+----+----+----+----+----+\n\t*\n\t* will log in the console:\n\t*\n\t*  'A cell at row 1 and column 2'\n\t*  'A cell at row 1 and column 4'\n\t*  'A cell at row 1 and column 5'\n\t*  'A cell at row 2 and column 2'\n\t*\n\t* To also iterate over spanned cells:\n\t*\n\t* ```ts\n\t* const tableWalker = new TableWalker( table, { row: 1, includeAllSlots: true } );\n\t*\n\t* for ( const tableSlot of tableWalker ) {\n\t*   console.log( 'Slot at', tableSlot.row, 'x', tableSlot.column, ':', tableSlot.isAnchor ? 'is anchored' : 'is spanned' );\n\t* }\n\t* ```\n\t*\n\t* will log in the console for the table from the previous example:\n\t*\n\t*  'Cell at 1 x 0 : is spanned'\n\t*  'Cell at 1 x 1 : is spanned'\n\t*  'Cell at 1 x 2 : is anchored'\n\t*  'Cell at 1 x 3 : is spanned'\n\t*  'Cell at 1 x 4 : is anchored'\n\t*  'Cell at 1 x 5 : is anchored'\n\t*\n\t* **Note**: Option `row` is a shortcut that sets both `startRow` and `endRow` to the same row.\n\t* (Use either `row` or `startRow` and `endRow` but never together). Similarly the `column` option sets both `startColumn`\n\t* and `endColumn` to the same column (Use either `column` or `startColumn` and `endColumn` but never together).\n\t*\n\t* @param table A table over which the walker iterates.\n\t* @param options An object with configuration.\n\t* @param options.row A row index for which this iterator will output cells. Can't be used together with `startRow` and `endRow`.\n\t* @param options.startRow A row index from which this iterator should start. Can't be used together with `row`. Default value is 0.\n\t* @param options.endRow A row index at which this iterator should end. Can't be used together with `row`.\n\t* @param options.column A column index for which this iterator will output cells.\n\t* Can't be used together with `startColumn` and `endColumn`.\n\t* @param options.startColumn A column index from which this iterator should start.\n\t* Can't be used together with `column`. Default value is 0.\n\t* @param options.endColumn A column index at which this iterator should end. Can't be used together with `column`.\n\t* @param options.includeAllSlots Also return values for spanned cells. Default value is \"false\".\n\t*/\n\tconstructor(table, options = {}) {\n\t\tthis._table = table;\n\t\tthis._startRow = options.row !== void 0 ? options.row : options.startRow || 0;\n\t\tthis._endRow = options.row !== void 0 ? options.row : options.endRow;\n\t\tthis._startColumn = options.column !== void 0 ? options.column : options.startColumn || 0;\n\t\tthis._endColumn = options.column !== void 0 ? options.column : options.endColumn;\n\t\tthis._includeAllSlots = !!options.includeAllSlots;\n\t\tthis._skipRows = /* @__PURE__ */ new Set();\n\t\tthis._row = 0;\n\t\tthis._rowIndex = 0;\n\t\tthis._column = 0;\n\t\tthis._cellIndex = 0;\n\t\tthis._spannedCells = /* @__PURE__ */ new Map();\n\t\tthis._nextCellAtColumn = -1;\n\t}\n\t/**\n\t* Iterable interface.\n\t*/\n\t[Symbol.iterator]() {\n\t\treturn this;\n\t}\n\t/**\n\t* Gets the next table walker's value.\n\t*\n\t* @returns The next table walker's value.\n\t*/\n\tnext() {\n\t\tif (this._canJumpToStartRow()) this._jumpToNonSpannedRowClosestToStartRow();\n\t\tconst row = this._table.getChild(this._rowIndex);\n\t\tif (!row || this._isOverEndRow()) return {\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t};\n\t\tif (!row.is(\"element\", \"tableRow\")) {\n\t\t\tthis._rowIndex++;\n\t\t\treturn this.next();\n\t\t}\n\t\tif (this._isOverEndColumn()) return this._advanceToNextRow();\n\t\tlet outValue = null;\n\t\tconst spanData = this._getSpanned();\n\t\tif (spanData) {\n\t\t\tif (this._includeAllSlots && !this._shouldSkipSlot()) outValue = this._formatOutValue(spanData.cell, spanData.row, spanData.column);\n\t\t} else {\n\t\t\tconst cell = row.getChild(this._cellIndex);\n\t\t\tif (!cell) return this._advanceToNextRow();\n\t\t\tconst colspan = parseInt(cell.getAttribute(\"colspan\") || \"1\");\n\t\t\tconst rowspan = parseInt(cell.getAttribute(\"rowspan\") || \"1\");\n\t\t\tif (colspan > 1 || rowspan > 1) this._recordSpans(cell, rowspan, colspan);\n\t\t\tif (!this._shouldSkipSlot()) outValue = this._formatOutValue(cell);\n\t\t\tthis._nextCellAtColumn = this._column + colspan;\n\t\t}\n\t\tthis._column++;\n\t\tif (this._column == this._nextCellAtColumn) this._cellIndex++;\n\t\treturn outValue || this.next();\n\t}\n\t/**\n\t* Marks a row to skip in the next iteration. It will also skip cells from the current row if there are any cells from the current row\n\t* to output.\n\t*\n\t* @param row The row index to skip.\n\t*/\n\tskipRow(row) {\n\t\tthis._skipRows.add(row);\n\t}\n\t/**\n\t* Advances internal cursor to the next row.\n\t*/\n\t_advanceToNextRow() {\n\t\tthis._row++;\n\t\tthis._rowIndex++;\n\t\tthis._column = 0;\n\t\tthis._cellIndex = 0;\n\t\tthis._nextCellAtColumn = -1;\n\t\treturn this.next();\n\t}\n\t/**\n\t* Checks if the current row is over {@link #_endRow}.\n\t*/\n\t_isOverEndRow() {\n\t\treturn this._endRow !== void 0 && this._row > this._endRow;\n\t}\n\t/**\n\t* Checks if the current cell is over {@link #_endColumn}\n\t*/\n\t_isOverEndColumn() {\n\t\treturn this._endColumn !== void 0 && this._column > this._endColumn;\n\t}\n\t/**\n\t* A common method for formatting the iterator's output value.\n\t*\n\t* @param cell The table cell to output.\n\t* @param anchorRow The row index of a cell anchor slot.\n\t* @param anchorColumn The column index of a cell anchor slot.\n\t*/\n\t_formatOutValue(cell, anchorRow = this._row, anchorColumn = this._column) {\n\t\treturn {\n\t\t\tdone: false,\n\t\t\tvalue: new TableSlot(this, cell, anchorRow, anchorColumn)\n\t\t};\n\t}\n\t/**\n\t* Checks if the current slot should be skipped.\n\t*/\n\t_shouldSkipSlot() {\n\t\tconst rowIsMarkedAsSkipped = this._skipRows.has(this._row);\n\t\tconst rowIsBeforeStartRow = this._row < this._startRow;\n\t\tconst columnIsBeforeStartColumn = this._column < this._startColumn;\n\t\tconst columnIsAfterEndColumn = this._endColumn !== void 0 && this._column > this._endColumn;\n\t\treturn rowIsMarkedAsSkipped || rowIsBeforeStartRow || columnIsBeforeStartColumn || columnIsAfterEndColumn;\n\t}\n\t/**\n\t* Returns the cell element that is spanned over the current cell location.\n\t*/\n\t_getSpanned() {\n\t\tconst rowMap = this._spannedCells.get(this._row);\n\t\tif (!rowMap) return null;\n\t\treturn rowMap.get(this._column) || null;\n\t}\n\t/**\n\t* Updates spanned cells map relative to the current cell location and its span dimensions.\n\t*\n\t* @param cell A cell that is spanned.\n\t* @param rowspan Cell height.\n\t* @param colspan Cell width.\n\t*/\n\t_recordSpans(cell, rowspan, colspan) {\n\t\tconst data = {\n\t\t\tcell,\n\t\t\trow: this._row,\n\t\t\tcolumn: this._column\n\t\t};\n\t\tfor (let rowToUpdate = this._row; rowToUpdate < this._row + rowspan; rowToUpdate++) for (let columnToUpdate = this._column; columnToUpdate < this._column + colspan; columnToUpdate++) if (rowToUpdate != this._row || columnToUpdate != this._column) this._markSpannedCell(rowToUpdate, columnToUpdate, data);\n\t}\n\t/**\n\t* Marks the cell location as spanned by another cell.\n\t*\n\t* @param row The row index of the cell location.\n\t* @param column The column index of the cell location.\n\t* @param data A spanned cell details (cell element, anchor row and column).\n\t*/\n\t_markSpannedCell(row, column, data) {\n\t\tif (!this._spannedCells.has(row)) this._spannedCells.set(row, /* @__PURE__ */ new Map());\n\t\tthis._spannedCells.get(row).set(column, data);\n\t}\n\t/**\n\t* Checks if part of the table can be skipped.\n\t*/\n\t_canJumpToStartRow() {\n\t\treturn !!this._startRow && this._startRow > 0 && !this._jumpedToStartRow;\n\t}\n\t/**\n\t* Sets the current row to `this._startRow` or the first row before it that has the number of cells\n\t* equal to the number of columns in the table.\n\t*\n\t* Example:\n\t* \t+----+----+----+\n\t*  | 00 | 01 | 02 |\n\t*  |----+----+----+\n\t*  | 10      | 12 |\n\t*  |         +----+\n\t*  |         | 22 |\n\t*  |         +----+\n\t*  |         | 32 | <--- Start row\n\t*  +----+----+----+\n\t*  | 40 | 41 | 42 |\n\t*  +----+----+----+\n\t*\n\t* If the 4th row is a `this._startRow`, this method will:\n\t* 1.) Count the number of columns this table has based on the first row (3 columns in this case).\n\t* 2.) Check if the 4th row contains 3 cells. It doesn't, so go to the row before it.\n\t* 3.) Check if the 3rd row contains 3 cells. It doesn't, so go to the row before it.\n\t* 4.) Check if the 2nd row contains 3 cells. It does, so set the current row to that row.\n\t*\n\t* Setting the current row this way is necessary to let the `next()`  method loop over the cells\n\t* spanning multiple rows or columns and update the `this._spannedCells` property.\n\t*/\n\t_jumpToNonSpannedRowClosestToStartRow() {\n\t\tconst firstRowLength = this._getRowLength(0);\n\t\tfor (let i = this._startRow; !this._jumpedToStartRow; i--) if (firstRowLength === this._getRowLength(i)) {\n\t\t\tthis._row = i;\n\t\t\tthis._rowIndex = i;\n\t\t\tthis._jumpedToStartRow = true;\n\t\t}\n\t}\n\t/**\n\t* Returns a number of columns in a row taking `colspan` into consideration.\n\t*/\n\t_getRowLength(rowIndex) {\n\t\treturn [...this._table.getChild(rowIndex).getChildren()].reduce((cols, row) => {\n\t\t\treturn cols + parseInt(row.getAttribute(\"colspan\") || \"1\");\n\t\t}, 0);\n\t}\n};\n/**\n* An object returned by {@link module:table/tablewalker~TableWalker} when traversing table cells.\n*/\nvar TableSlot = class {\n\t/**\n\t* The current table cell.\n\t*/\n\tcell;\n\t/**\n\t* The row index of a table slot.\n\t*/\n\trow;\n\t/**\n\t* The column index of a table slot.\n\t*/\n\tcolumn;\n\t/**\n\t* The row index of a cell anchor slot.\n\t*/\n\tcellAnchorRow;\n\t/**\n\t* The column index of a cell anchor slot.\n\t*/\n\tcellAnchorColumn;\n\t/**\n\t* The index of the current cell in the parent row.\n\t*/\n\t_cellIndex;\n\t/**\n\t* The index of the current row element in the table.\n\t*/\n\t_rowIndex;\n\t/**\n\t* The table element.\n\t*/\n\t_table;\n\t/**\n\t* Creates an instance of the table walker value.\n\t*\n\t* @param tableWalker The table walker instance.\n\t* @param cell The current table cell.\n\t* @param anchorRow The row index of a cell anchor slot.\n\t* @param anchorColumn The column index of a cell anchor slot.\n\t*/\n\tconstructor(tableWalker, cell, anchorRow, anchorColumn) {\n\t\tthis.cell = cell;\n\t\tthis.row = tableWalker._row;\n\t\tthis.column = tableWalker._column;\n\t\tthis.cellAnchorRow = anchorRow;\n\t\tthis.cellAnchorColumn = anchorColumn;\n\t\tthis._cellIndex = tableWalker._cellIndex;\n\t\tthis._rowIndex = tableWalker._rowIndex;\n\t\tthis._table = tableWalker._table;\n\t}\n\t/**\n\t* Whether the cell is anchored in the current slot.\n\t*/\n\tget isAnchor() {\n\t\treturn this.row === this.cellAnchorRow && this.column === this.cellAnchorColumn;\n\t}\n\t/**\n\t* The width of a cell defined by a `colspan` attribute. If the model attribute is not present, it is set to `1`.\n\t*/\n\tget cellWidth() {\n\t\treturn parseInt(this.cell.getAttribute(\"colspan\") || \"1\");\n\t}\n\t/**\n\t* The height of a cell defined by a `rowspan` attribute. If the model attribute is not present, it is set to `1`.\n\t*/\n\tget cellHeight() {\n\t\treturn parseInt(this.cell.getAttribute(\"rowspan\") || \"1\");\n\t}\n\t/**\n\t* The index of the current row element in the table.\n\t*/\n\tget rowIndex() {\n\t\treturn this._rowIndex;\n\t}\n\t/**\n\t* Returns the {@link module:engine/model/position~ModelPosition} before the table slot.\n\t*/\n\tgetPositionBefore() {\n\t\treturn this._table.root.document.model.createPositionAt(this._table.getChild(this.row), this._cellIndex);\n\t}\n};\n/**\n* This `TableSlot`'s getter (property) was removed in CKEditor 5 v20.0.0.\n*\n* Check out the new `TableWalker`'s API in the documentation.\n*\n* @error tableslot-getter-removed\n* @param getterName\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* Checks if the given cell type represents a header cell.\n*\n* @param cellType The type of the table cell.\n* @returns `true` if the cell type represents a header cell, `false` otherwise.\n*/\nfunction isTableHeaderCellType(cellType) {\n\treturn cellType === \"header\" || cellType === \"header-row\" || cellType === \"header-column\";\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* A common method to update the numeric value. If a value is the default one, it will be unset.\n*\n* @internal\n* @param key An attribute key.\n* @param value The new attribute value.\n* @param item A model item on which the attribute will be set.\n* @param defaultValue The default attribute value. If a value is lower or equal, it will be unset.\n*/\nfunction updateNumericAttribute(key, value, item, writer, defaultValue = 1) {\n\tif (value !== void 0 && value !== null && defaultValue !== void 0 && defaultValue !== null && value > defaultValue) writer.setAttribute(key, value, item);\n\telse writer.removeAttribute(key, item);\n}\n/**\n* A common method to create an empty table cell. It creates a proper model structure as a table cell must have at least one block inside.\n*\n* @internal\n* @param writer The model writer.\n* @param insertPosition The position at which the table cell should be inserted.\n* @param attributes The element attributes.\n* @returns Created table cell.\n*/\nfunction createEmptyTableCell(writer, insertPosition, attributes = {}) {\n\tconst tableCell = writer.createElement(\"tableCell\", attributes);\n\twriter.insertElement(\"paragraph\", tableCell);\n\twriter.insert(tableCell, insertPosition);\n\treturn tableCell;\n}\n/**\n* Checks if a table cell belongs to the heading column section.\n*\n* @internal\n*/\nfunction isHeadingColumnCell(tableUtils, tableCell) {\n\tconst table = tableCell.parent.parent;\n\tconst headingColumns = parseInt(table.getAttribute(\"headingColumns\") || \"0\");\n\tconst { column } = tableUtils.getCellLocation(tableCell);\n\treturn !!headingColumns && column < headingColumns;\n}\n/**\n* Enables conversion for an attribute for simple view-model mappings.\n*\n* @internal\n* @param options.defaultValue The default value for the specified `modelAttribute`.\n*/\nfunction enableProperty(schema, conversion, options) {\n\tconst { modelAttribute } = options;\n\tschema.extend(\"tableCell\", { allowAttributes: [modelAttribute] });\n\tschema.setAttributeProperties(modelAttribute, { isFormatting: true });\n\tupcastStyleToAttribute(conversion, {\n\t\tviewElement: /^(td|th)$/,\n\t\t...options\n\t});\n\tdowncastAttributeToStyle(conversion, {\n\t\tmodelElement: \"tableCell\",\n\t\t...options\n\t});\n}\n/**\n* Depending on the position of the selection we either return the table under cursor or look for the table higher in the hierarchy.\n*\n* @internal\n*/\nfunction getSelectionAffectedTable(selection) {\n\tconst selectedElement = selection.getSelectedElement();\n\tif (selectedElement && selectedElement.is(\"element\", \"table\")) return selectedElement;\n\treturn selection.getFirstPosition().findAncestor(\"table\");\n}\n/**\n* Groups table cells by their parent table.\n*\n* @internal\n*/\nfunction groupCellsByTable(tableCells) {\n\tconst tableMap = /* @__PURE__ */ new Map();\n\tfor (const tableCell of tableCells) {\n\t\tconst table = tableCell.findAncestor(\"table\");\n\t\tif (!tableMap.has(table)) tableMap.set(table, []);\n\t\ttableMap.get(table).push(tableCell);\n\t}\n\treturn tableMap;\n}\n/**\n* Checks if all cells in a given row or column are header cells.\n*\n* @internal\n*/\nfunction isEntireCellsLineHeader({ table, row, column }) {\n\tconst tableWalker = new TableWalker(table, {\n\t\trow,\n\t\tcolumn\n\t});\n\tfor (const { cell } of tableWalker) {\n\t\tconst cellType = cell.getAttribute(\"tableCellType\");\n\t\tif (!isTableHeaderCellType(cellType)) return false;\n\t}\n\treturn true;\n}\n/**\n* Checks whether the `tableCellType` attribute is enabled in the editor schema and the experimental flag is set.\n*\n* @internal\n*/\nfunction isTableCellTypeEnabled(editor) {\n\treturn editor.model.schema.checkAttribute(\"tableCell\", \"tableCellType\");\n}\n/**\n* Yields every empty block (typically a `paragraph`) found inside the given table's cells.\n*\n* @internal\n*/\nfunction* getEmptyTableCellBlocks(table) {\n\tfor (const row of table.getChildren()) {\n\t\tif (!row.is(\"element\", \"tableRow\")) continue;\n\t\tfor (const cell of row.getChildren()) {\n\t\t\tif (!cell.is(\"element\", \"tableCell\")) continue;\n\t\t\tfor (const block of cell.getChildren()) if (block.is(\"element\") && block.isEmpty) yield block;\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* Returns a cropped table according to given dimensions.\n\n* To return a cropped table that starts at first row and first column and end in third row and column:\n*\n* ```ts\n* const croppedTable = cropTableToDimensions( table, {\n*   startRow: 1,\n*   endRow: 3,\n*   startColumn: 1,\n*   endColumn: 3\n* }, writer );\n* ```\n*\n* Calling the code above for the table below:\n*\n*        0   1   2   3   4                      0   1   2\n*      ┌───┬───┬───┬───┬───┐\n*   0  │ a │ b │ c │ d │ e │\n*      ├───┴───┤   ├───┴───┤                  ┌───┬───┬───┐\n*   1  │ f     │   │ g     │                  │   │   │ g │  0\n*      ├───┬───┴───┼───┬───┤   will return:   ├───┴───┼───┤\n*   2  │ h │ i     │ j │ k │                  │ i     │ j │  1\n*      ├───┤       ├───┤   │                  │       ├───┤\n*   3  │ l │       │ m │   │                  │       │ m │  2\n*      ├───┼───┬───┤   ├───┤                  └───────┴───┘\n*   4  │ n │ o │ p │   │ q │\n*      └───┴───┴───┴───┴───┘\n*\n* @internal\n*/\nfunction cropTableToDimensions(sourceTable, cropDimensions, writer) {\n\tconst { startRow, startColumn, endRow, endColumn } = cropDimensions;\n\tconst croppedTable = writer.createElement(\"table\");\n\tconst sourceTableType = sourceTable.getAttribute(\"tableType\");\n\tif (sourceTableType) writer.setAttribute(\"tableType\", sourceTableType, croppedTable);\n\tconst cropHeight = endRow - startRow + 1;\n\tfor (let i = 0; i < cropHeight; i++) writer.insertElement(\"tableRow\", croppedTable, \"end\");\n\tconst tableMap = [...new TableWalker(sourceTable, {\n\t\tstartRow,\n\t\tendRow,\n\t\tstartColumn,\n\t\tendColumn,\n\t\tincludeAllSlots: true\n\t})];\n\tfor (const { row: sourceRow, column: sourceColumn, cell: tableCell, isAnchor, cellAnchorRow, cellAnchorColumn } of tableMap) {\n\t\tconst rowInCroppedTable = sourceRow - startRow;\n\t\tconst row = croppedTable.getChild(rowInCroppedTable);\n\t\tif (!isAnchor) {\n\t\t\tif (cellAnchorRow < startRow || cellAnchorColumn < startColumn) createEmptyTableCell(writer, writer.createPositionAt(row, \"end\"));\n\t\t} else {\n\t\t\tconst tableCellCopy = writer.cloneElement(tableCell);\n\t\t\twriter.append(tableCellCopy, row);\n\t\t\ttrimTableCellIfNeeded(tableCellCopy, sourceRow, sourceColumn, endRow, endColumn, writer);\n\t\t}\n\t}\n\taddHeadingsToCroppedTable(croppedTable, sourceTable, startRow, startColumn, writer);\n\taddFootersToCroppedTable(croppedTable, sourceTable, startRow, endRow, writer);\n\treturn croppedTable;\n}\n/**\n* Returns slot info of cells that starts above and overlaps a given row.\n*\n* In a table below, passing `overlapRow = 3`\n*\n*     ┌───┬───┬───┬───┬───┐\n*  0  │ a │ b │ c │ d │ e │\n*     │   ├───┼───┼───┼───┤\n*  1  │   │ f │ g │ h │ i │\n*     ├───┤   ├───┼───┤   │\n*  2  │ j │   │ k │ l │   │\n*     │   │   │   ├───┼───┤\n*  3  │   │   │   │ m │ n │  <- overlap row to check\n*     ├───┼───┤   │   ├───│\n*  4  │ o │ p │   │   │ q │\n*     └───┴───┴───┴───┴───┘\n*\n* will return slot info for cells: \"j\", \"f\", \"k\".\n*\n* @internal\n* @param table The table to check.\n* @param overlapRow The index of the row to check.\n* @param startRow row to start analysis. Use it when it is known that the cells above that row will not overlap. Default value is 0.\n*/\nfunction getVerticallyOverlappingCells(table, overlapRow, startRow = 0) {\n\tconst cells = [];\n\tconst tableWalker = new TableWalker(table, {\n\t\tstartRow,\n\t\tendRow: overlapRow - 1\n\t});\n\tfor (const slotInfo of tableWalker) {\n\t\tconst { row, cellHeight } = slotInfo;\n\t\tconst cellEndRow = row + cellHeight - 1;\n\t\tif (row < overlapRow && overlapRow <= cellEndRow) cells.push(slotInfo);\n\t}\n\treturn cells;\n}\n/**\n* Splits the table cell horizontally.\n*\n* @internal\n* @returns Created table cell, if any were created.\n*/\nfunction splitHorizontally(tableCell, splitRow, writer) {\n\tconst tableRow = tableCell.parent;\n\tconst table = tableRow.parent;\n\tconst rowIndex = tableRow.index;\n\tconst rowspan = parseInt(tableCell.getAttribute(\"rowspan\"));\n\tconst newRowspan = splitRow - rowIndex;\n\tconst newCellAttributes = {};\n\tconst newCellRowSpan = rowspan - newRowspan;\n\tif (newCellRowSpan > 1) newCellAttributes.rowspan = newCellRowSpan;\n\tconst colspan = parseInt(tableCell.getAttribute(\"colspan\") || \"1\");\n\tif (colspan > 1) newCellAttributes.colspan = colspan;\n\tconst startRow = rowIndex;\n\tconst endRow = startRow + newRowspan;\n\tconst tableMap = [...new TableWalker(table, {\n\t\tstartRow,\n\t\tendRow,\n\t\tincludeAllSlots: true\n\t})];\n\tlet newCell = null;\n\tlet columnIndex;\n\tfor (const tableSlot of tableMap) {\n\t\tconst { row, column, cell } = tableSlot;\n\t\tif (cell === tableCell && columnIndex === void 0) columnIndex = column;\n\t\tif (columnIndex !== void 0 && columnIndex === column && row === endRow) newCell = createEmptyTableCell(writer, tableSlot.getPositionBefore(), newCellAttributes);\n\t}\n\tupdateNumericAttribute(\"rowspan\", newRowspan, tableCell, writer);\n\treturn newCell;\n}\n/**\n* Returns slot info of cells that starts before and overlaps a given column.\n*\n* In a table below, passing `overlapColumn = 3`\n*\n*    0   1   2   3   4\n*  ┌───────┬───────┬───┐\n*  │ a     │ b     │ c │\n*  │───┬───┴───────┼───┤\n*  │ d │ e         │ f │\n*  ├───┼───┬───────┴───┤\n*  │ g │ h │ i         │\n*  ├───┼───┼───┬───────┤\n*  │ j │ k │ l │ m     │\n*  ├───┼───┴───┼───┬───┤\n*  │ n │ o     │ p │ q │\n*  └───┴───────┴───┴───┘\n*                ^\n*                Overlap column to check\n*\n* will return slot info for cells: \"b\", \"e\", \"i\".\n*\n* @internal\n* @param table The table to check.\n* @param overlapColumn The index of the column to check.\n*/\nfunction getHorizontallyOverlappingCells(table, overlapColumn) {\n\tconst cellsToSplit = [];\n\tconst tableWalker = new TableWalker(table);\n\tfor (const slotInfo of tableWalker) {\n\t\tconst { column, cellWidth } = slotInfo;\n\t\tconst cellEndColumn = column + cellWidth - 1;\n\t\tif (column < overlapColumn && overlapColumn <= cellEndColumn) cellsToSplit.push(slotInfo);\n\t}\n\treturn cellsToSplit;\n}\n/**\n* Splits the table cell vertically.\n*\n* @internal\n* @param columnIndex The table cell column index.\n* @param splitColumn The index of column to split cell on.\n* @returns Created table cell.\n*/\nfunction splitVertically(tableCell, columnIndex, splitColumn, writer) {\n\tconst colspan = parseInt(tableCell.getAttribute(\"colspan\"));\n\tconst newColspan = splitColumn - columnIndex;\n\tconst newCellAttributes = {};\n\tconst newCellColSpan = colspan - newColspan;\n\tif (newCellColSpan > 1) newCellAttributes.colspan = newCellColSpan;\n\tconst rowspan = parseInt(tableCell.getAttribute(\"rowspan\") || \"1\");\n\tif (rowspan > 1) newCellAttributes.rowspan = rowspan;\n\tconst newCell = createEmptyTableCell(writer, writer.createPositionAfter(tableCell), newCellAttributes);\n\tupdateNumericAttribute(\"colspan\", newColspan, tableCell, writer);\n\treturn newCell;\n}\n/**\n* Adjusts table cell dimensions to not exceed limit row and column.\n*\n* If table cell width (or height) covers a column (or row) that is after a limit column (or row)\n* this method will trim \"colspan\" (or \"rowspan\") attribute so the table cell will fit in a defined limits.\n*\n* @internal\n*/\nfunction trimTableCellIfNeeded(tableCell, cellRow, cellColumn, limitRow, limitColumn, writer) {\n\tconst colspan = parseInt(tableCell.getAttribute(\"colspan\") || \"1\");\n\tconst rowspan = parseInt(tableCell.getAttribute(\"rowspan\") || \"1\");\n\tif (cellColumn + colspan - 1 > limitColumn) {\n\t\tconst trimmedSpan = limitColumn - cellColumn + 1;\n\t\tupdateNumericAttribute(\"colspan\", trimmedSpan, tableCell, writer, 1);\n\t}\n\tif (cellRow + rowspan - 1 > limitRow) {\n\t\tconst trimmedSpan = limitRow - cellRow + 1;\n\t\tupdateNumericAttribute(\"rowspan\", trimmedSpan, tableCell, writer, 1);\n\t}\n}\n/**\n* Sets proper heading attributes to a cropped table.\n*/\nfunction addHeadingsToCroppedTable(croppedTable, sourceTable, startRow, startColumn, writer) {\n\tconst headingRows = parseInt(sourceTable.getAttribute(\"headingRows\") || \"0\");\n\tif (headingRows > 0) {\n\t\tconst headingRowsInCrop = headingRows - startRow;\n\t\tupdateNumericAttribute(\"headingRows\", headingRowsInCrop, croppedTable, writer, 0);\n\t}\n\tconst headingColumns = parseInt(sourceTable.getAttribute(\"headingColumns\") || \"0\");\n\tif (headingColumns > 0) {\n\t\tconst headingColumnsInCrop = headingColumns - startColumn;\n\t\tupdateNumericAttribute(\"headingColumns\", headingColumnsInCrop, croppedTable, writer, 0);\n\t}\n}\n/**\n* Sets footer row attributes to a cropped table.\n*/\nfunction addFootersToCroppedTable(croppedTable, sourceTable, startRow, endRow, writer) {\n\tconst maxRows = Array.from(sourceTable.getChildren()).reduce((count, row) => row.is(\"element\", \"tableRow\") ? count + 1 : count, 0);\n\tconst footerRows = parseInt(sourceTable.getAttribute(\"footerRows\") || \"0\");\n\tconst footerIndex = maxRows - footerRows;\n\tif (footerRows < 1) return;\n\tlet footerRowsInCrop = 0;\n\tif (endRow >= footerIndex) footerRowsInCrop = endRow - Math.max(footerIndex, startRow) + 1;\n\tupdateNumericAttribute(\"footerRows\", footerRowsInCrop, croppedTable, writer, 0);\n}\n/**\n* Removes columns that have no cells anchored.\n*\n* In table below:\n*\n*     +----+----+----+----+----+----+----+\n*     | 00 | 01      | 03 | 04      | 06 |\n*     +----+----+----+----+         +----+\n*     | 10 | 11      | 13 |         | 16 |\n*     +----+----+----+----+----+----+----+\n*     | 20 | 21      | 23 | 24      | 26 |\n*     +----+----+----+----+----+----+----+\n*                  ^--- empty ---^\n*\n* Will remove columns 2 and 5.\n*\n* **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n* To remove a column from a table use {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`}.\n*\n* @internal\n* @returns True if removed some columns.\n*/\nfunction removeEmptyColumns(table, tableUtils) {\n\tconst width = tableUtils.getColumns(table);\n\tconst columnsMap = new Array(width).fill(0);\n\tfor (const { column } of new TableWalker(table)) columnsMap[column]++;\n\tconst emptyColumns = columnsMap.reduce((result, cellsCount, column) => {\n\t\treturn cellsCount ? result : [...result, column];\n\t}, []);\n\tif (emptyColumns.length > 0) {\n\t\tconst emptyColumn = emptyColumns[emptyColumns.length - 1];\n\t\ttableUtils.removeColumns(table, { at: emptyColumn });\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* Removes rows that have no cells anchored.\n*\n* In table below:\n*\n*     +----+----+----+\n*     | 00 | 01 | 02 |\n*     +----+----+----+\n*     | 10 | 11 | 12 |\n*     +    +    +    +\n*     |    |    |    | <-- empty\n*     +----+----+----+\n*     | 30 | 31 | 32 |\n*     +----+----+----+\n*     | 40      | 42 |\n*     +         +    +\n*     |         |    | <-- empty\n*     +----+----+----+\n*     | 60 | 61 | 62 |\n*     +----+----+----+\n*\n* Will remove rows 2 and 5.\n*\n* **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n* To remove a row from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`}.\n*\n* @internal\n* @returns True if removed some rows.\n*/\nfunction removeEmptyRows(table, tableUtils) {\n\tconst emptyRows = [];\n\tconst tableRowCount = tableUtils.getRows(table);\n\tfor (let rowIndex = 0; rowIndex < tableRowCount; rowIndex++) if (table.getChild(rowIndex).isEmpty) emptyRows.push(rowIndex);\n\tif (emptyRows.length > 0) {\n\t\tconst emptyRow = emptyRows[emptyRows.length - 1];\n\t\ttableUtils.removeRows(table, { at: emptyRow });\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* Removes rows and columns that have no cells anchored.\n*\n* In table below:\n*\n*     +----+----+----+----+\n*     | 00      | 02      |\n*     +----+----+         +\n*     | 10      |         |\n*     +----+----+----+----+\n*     | 20      | 22 | 23 |\n*     +         +    +    +\n*     |         |    |    | <-- empty row\n*     +----+----+----+----+\n*             ^--- empty column\n*\n* Will remove row 3 and column 1.\n*\n* **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n* To remove a rows from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`} and\n* {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`} to remove a column.\n*\n* @internal\n*/\nfunction removeEmptyRowsColumns(table, tableUtils) {\n\tif (!removeEmptyColumns(table, tableUtils)) removeEmptyRows(table, tableUtils);\n}\n/**\n* Returns adjusted last row index if selection covers part of a row with empty slots (spanned by other cells).\n* The `dimensions.lastRow` is equal to last row index but selection might be bigger.\n*\n* This happens *only* on rectangular selection so we analyze a case like this:\n*\n*        +---+---+---+---+\n*      0 | a | b | c | d |\n*        +   +   +---+---+\n*      1 |   | e | f | g |\n*        +   +---+   +---+\n*      2 |   | h |   | i | <- last row, each cell has rowspan = 2,\n*        +   +   +   +   +    so we need to return 3, not 2\n*      3 |   |   |   |   |\n*        +---+---+---+---+\n*\n* @internal\n* @returns Adjusted last row index.\n*/\nfunction adjustLastRowIndex(table, dimensions) {\n\tconst lastRowMap = Array.from(new TableWalker(table, {\n\t\tstartColumn: dimensions.firstColumn,\n\t\tendColumn: dimensions.lastColumn,\n\t\trow: dimensions.lastRow\n\t}));\n\tif (lastRowMap.every(({ cellHeight }) => cellHeight === 1)) return dimensions.lastRow;\n\tconst rowspanAdjustment = lastRowMap[0].cellHeight - 1;\n\treturn dimensions.lastRow + rowspanAdjustment;\n}\n/**\n* Returns adjusted last column index if selection covers part of a column with empty slots (spanned by other cells).\n* The `dimensions.lastColumn` is equal to last column index but selection might be bigger.\n*\n* This happens *only* on rectangular selection so we analyze a case like this:\n*\n*       0   1   2   3\n*     +---+---+---+---+\n*     | a             |\n*     +---+---+---+---+\n*     | b | c | d     |\n*     +---+---+---+---+\n*     | e     | f     |\n*     +---+---+---+---+\n*     | g | h         |\n*     +---+---+---+---+\n*               ^\n*              last column, each cell has colspan = 2, so we need to return 3, not 2\n*\n* @internal\n* @returns Adjusted last column index.\n*/\nfunction adjustLastColumnIndex(table, dimensions) {\n\tconst lastColumnMap = Array.from(new TableWalker(table, {\n\t\tstartRow: dimensions.firstRow,\n\t\tendRow: dimensions.lastRow,\n\t\tcolumn: dimensions.lastColumn\n\t}));\n\tif (lastColumnMap.every(({ cellWidth }) => cellWidth === 1)) return dimensions.lastColumn;\n\tconst colspanAdjustment = lastColumnMap[0].cellWidth - 1;\n\treturn dimensions.lastColumn + colspanAdjustment;\n}\n/**\n* Get view `<table>` element from the wrapper.\n*/\nfunction getViewTableFromWrapper(wrapperView) {\n\tfor (const wrapperChild of wrapperView.getChildren()) if (wrapperChild.is(\"element\", \"table\")) return wrapperChild;\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* Returns a function that converts the table view representation:\n*\n* ```xml\n* <figure class=\"table\"><table>...</table></figure>\n* ```\n*\n* to the model representation:\n*\n* ```xml\n* <table></table>\n* ```\n*\n* @internal\n*/\nfunction upcastTableFigure() {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:figure\", (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.test(data.viewItem, {\n\t\t\t\tname: true,\n\t\t\t\tclasses: \"table\"\n\t\t\t})) return;\n\t\t\tconst viewTable = getViewTableFromWrapper(data.viewItem);\n\t\t\tif (!viewTable || !conversionApi.consumable.test(viewTable, { name: true })) return;\n\t\t\tconversionApi.consumable.consume(data.viewItem, {\n\t\t\t\tname: true,\n\t\t\t\tclasses: \"table\"\n\t\t\t});\n\t\t\tconst conversionResult = conversionApi.convertItem(viewTable, data.modelCursor);\n\t\t\t/* istanbul ignore if: defensive guard for the `ModelRange | null` return type -- @preserve */\n\t\t\tif (!conversionResult.modelRange) {\n\t\t\t\tconversionApi.consumable.revert(data.viewItem, {\n\t\t\t\t\tname: true,\n\t\t\t\t\tclasses: \"table\"\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst modelTable = first(conversionResult.modelRange.getItems());\n\t\t\tif (!modelTable || !modelTable.is(\"element\", \"table\")) {\n\t\t\t\tconversionApi.consumable.revert(data.viewItem, {\n\t\t\t\t\tname: true,\n\t\t\t\t\tclasses: \"table\"\n\t\t\t\t});\n\t\t\t\tif (!conversionResult.modelRange.isCollapsed) {\n\t\t\t\t\tdata.modelRange = conversionResult.modelRange;\n\t\t\t\t\tdata.modelCursor = conversionResult.modelCursor;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconversionApi.convertChildren(data.viewItem, conversionApi.writer.createPositionAt(modelTable, \"end\"));\n\t\t\tconversionApi.updateConversionResult(modelTable, data);\n\t\t});\n\t};\n}\n/**\n* View table element to model table element conversion helper.\n*\n* This conversion helper converts the table element as well as table rows.\n*\n* @param options Conversion options.\n* @param options.enableFooters If set to `true` the `footerRows` attribute will be upcasted.\n* @returns Conversion helper.\n* @internal\n*/\nfunction upcastTable(options) {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:table\", (evt, data, conversionApi) => {\n\t\t\tconst viewTable = data.viewItem;\n\t\t\tif (!conversionApi.consumable.test(viewTable, { name: true })) return;\n\t\t\tconst { rows, headingRows, headingColumns, footerRows } = scanTable(viewTable);\n\t\t\tconst attributes = {};\n\t\t\tif (headingColumns) attributes.headingColumns = headingColumns;\n\t\t\tif (headingRows) attributes.headingRows = headingRows;\n\t\t\tif (options.enableFooters && footerRows) attributes.footerRows = footerRows;\n\t\t\tconst table = conversionApi.writer.createElement(\"table\", attributes);\n\t\t\tif (!conversionApi.safeInsert(table, data.modelCursor)) return;\n\t\t\tconversionApi.consumable.consume(viewTable, { name: true });\n\t\t\trows.forEach((row) => conversionApi.convertItem(row, conversionApi.writer.createPositionAt(table, \"end\")));\n\t\t\tconversionApi.convertChildren(viewTable, conversionApi.writer.createPositionAt(table, \"end\"));\n\t\t\tif (table.isEmpty) {\n\t\t\t\tconst row = conversionApi.writer.createElement(\"tableRow\");\n\t\t\t\tconversionApi.writer.insert(row, conversionApi.writer.createPositionAt(table, \"end\"));\n\t\t\t\tcreateEmptyTableCell(conversionApi.writer, conversionApi.writer.createPositionAt(row, \"end\"));\n\t\t\t}\n\t\t\tconversionApi.updateConversionResult(table, data);\n\t\t});\n\t};\n}\n/**\n* A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.\n*\n* An empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells\n* and empty TR-s are used to maintain the table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only\n* rows that have related `tableRow` elements).\n*\n* *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue\n* of an improper table with all empty rows.\n*\n* @internal\n* @returns Conversion helper.\n*/\nfunction skipEmptyTableRow() {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:tr\", (evt, data) => {\n\t\t\tif (data.viewItem.isEmpty && data.modelCursor.index == 0) evt.stop();\n\t\t}, { priority: \"high\" });\n\t};\n}\n/**\n* A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.\n*\n* @internal\n* @returns Conversion helper.\n*/\nfunction ensureParagraphInTableCell(elementName) {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(`element:${elementName}`, (evt, data, { writer }) => {\n\t\t\tif (!data.modelRange) return;\n\t\t\tconst tableCell = data.modelRange.start.nodeAfter;\n\t\t\tconst modelCursor = writer.createPositionAt(tableCell, 0);\n\t\t\tif (data.viewItem.isEmpty) {\n\t\t\t\twriter.insertElement(\"paragraph\", modelCursor);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst childNodes = Array.from(tableCell.getChildren());\n\t\t\tif (childNodes.every((node) => node.is(\"element\", \"$marker\"))) {\n\t\t\t\tconst paragraph = writer.createElement(\"paragraph\");\n\t\t\t\twriter.insert(paragraph, writer.createPositionAt(tableCell, 0));\n\t\t\t\tfor (const node of childNodes) writer.move(writer.createRangeOn(node), writer.createPositionAt(paragraph, \"end\"));\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t};\n}\n/**\n* Scans table rows and extracts required metadata from the table:\n*\n* headingRows    - The number of rows that go as table headers.\n* headingColumns - The maximum number of row headings.\n* rows           - Sorted `<tr>` elements as they should go into the model - ie. if `<thead>` is inserted after `<tbody>` in the view.\n*\n* @param viewTable The view table element.\n* @returns The table metadata.\n*/\nfunction scanTable(viewTable) {\n\tlet headingColumns = void 0;\n\tlet shouldAccumulateHeadingRows = true;\n\tconst headRows = [];\n\tconst bodyRows = [];\n\tconst footRows = [];\n\tlet firstTheadElement = null;\n\tlet firstTfoot = null;\n\tconst tableChildren = Array.from(viewTable.getChildren());\n\tfor (let childIndex = 0; childIndex < tableChildren.length; childIndex++) {\n\t\tconst tableChild = tableChildren[childIndex];\n\t\tif (tableChild.name !== \"tbody\" && tableChild.name !== \"thead\" && tableChild.name !== \"tfoot\") continue;\n\t\tif (tableChild.name === \"thead\" && !firstTheadElement) {\n\t\t\tshouldAccumulateHeadingRows = true;\n\t\t\tfirstTheadElement = tableChild;\n\t\t}\n\t\tconst trs = Array.from(tableChild.getChildren()).filter((el) => el.is(\"element\", \"tr\"));\n\t\tlet maxPrevColumns = null;\n\t\tlet arePrecedingChildrenFooters = null;\n\t\tfor (const tr of trs) {\n\t\t\tconst trColumns = Array.from(tr.getChildren()).filter((el) => el.is(\"element\", \"td\") || el.is(\"element\", \"th\"));\n\t\t\tif (tableChild.name === \"tfoot\") {\n\t\t\t\tfirstTfoot ||= {\n\t\t\t\t\telement: tableChild,\n\t\t\t\t\trows: trs\n\t\t\t\t};\n\t\t\t\tshouldAccumulateHeadingRows = false;\n\t\t\t\tconst isFirstTfoot = firstTfoot.element === tableChild;\n\t\t\t\tif (!isFirstTfoot && arePrecedingChildrenFooters === null) for (let i = childIndex; i < tableChildren.length; i++) {\n\t\t\t\t\tarePrecedingChildrenFooters = tableChildren[i].name === \"tfoot\";\n\t\t\t\t\tif (!arePrecedingChildrenFooters) break;\n\t\t\t\t}\n\t\t\t\tif (isFirstTfoot) {\n\t\t\t\t\tfootRows.push(tr);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (arePrecedingChildrenFooters !== false) {\n\t\t\t\t\tfootRows.splice(footRows.length - firstTfoot.rows.length, 0, tr);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (firstTheadElement && tableChild === firstTheadElement || tableChild.name === \"tbody\" && trColumns.length > 0 && (maxPrevColumns === null || trColumns.length === maxPrevColumns) && trColumns.every((e) => e.is(\"element\", \"th\")) && shouldAccumulateHeadingRows) {\n\t\t\t\theadRows.push(tr);\n\t\t\t\tshouldAccumulateHeadingRows = true;\n\t\t\t} else {\n\t\t\t\tbodyRows.push(tr);\n\t\t\t\tshouldAccumulateHeadingRows = false;\n\t\t\t}\n\t\t\tmaxPrevColumns = Math.max(maxPrevColumns || 0, trColumns.length);\n\t\t}\n\t}\n\tconst bodyMatrix = generateCellMatrix(bodyRows);\n\tfor (const rowSlots of bodyMatrix) {\n\t\tlet index = 0;\n\t\twhile (index < rowSlots.length) {\n\t\t\tif (rowSlots[index]?.name !== \"th\") break;\n\t\t\tindex += 1;\n\t\t}\n\t\tif (headingColumns === void 0 || index < headingColumns) headingColumns = index;\n\t}\n\treturn {\n\t\theadingRows: headRows.length,\n\t\theadingColumns: headingColumns || 0,\n\t\tfooterRows: footRows.length,\n\t\trows: [\n\t\t\t...headRows,\n\t\t\t...bodyRows,\n\t\t\t...footRows\n\t\t]\n\t};\n}\n/**\n* Takes an array of `<tr>` elements and generates a \"matrix\" (square\n* two-dimensional array) describing which `<th>`s and `<td>`s fill which\n* \"slots\", factoring in `rowspan`s and `colspan`s. For example, given\n*\n* ```xml\n* <table>\n*   <tr> <td>11</td> <td rowspan=\"2\">12-22</td> <td>13</td> </tr>\n*   <tr> <td>21</td> <td>23</td> </tr>\n*   <tr> <td colspan=\"2\">31-32</td> <td>33</rd> </tr>\n* </table>\n* ```\n*\n* The result would be (with cell elements' text content in place of the element\n* objects for readability):\n*\n* ```js\n* [\n*   [ '11', '12-22', '13' ],\n*   [ '21', '12-22', '23' ],\n*   [ '31-32', '31-32', '33' ],\n* ]\n* ```\n*\n* This allows for a computation of heading columns that factors in the case\n* where a cell from a previous rows with a `rowspan` attribute effectively adds\n* an additional header cell to a subsequent row.\n*\n* There are also cases where cells are \"missing\" from a row. A simple one is\n* the case where a row simply has fewer cells than another row in the same\n* table. But another is one where a row has a cell with a `rowspan` that\n* effectively adds a cell to a subsequent row \"off the end\" of the row. In this\n* case, there will be a `null` value instead of an element object in that\n* position. For example,\n*\n* ```xml\n* <table>\n*   <tr> <td>11</td> <td>12</td> <td rowspan=\"2\">13-23</td> </tr>\n*   <tr> <td>21</td> </tr>\n*   <tr> <td>31</td> </tr>\n* </table>\n* ```\n*\n* would result in\n*\n* ```js\n* [\n*   [ '11', '12', '13-23' ],\n*   [ '21', null, '13-23' ],\n*   [ '31', null, null ]\n* ]\n* ```\n*\n* @param trs the array of `<tr>` elements\n* @returns the cell matrix\n*/\nfunction generateCellMatrix(trs) {\n\tlet prevRowspans = /* @__PURE__ */ new Map();\n\tlet maxColumns = 0;\n\tconst slots = trs.map((tr) => {\n\t\tconst curSlots = [];\n\t\tconst children = Array.from(tr.getChildren()).filter((child) => child.name === \"th\" || child.name === \"td\");\n\t\tconst curRowspans = /* @__PURE__ */ new Map();\n\t\twhile (children.length || curSlots.length < maxColumns) {\n\t\t\tconst rowSpan = prevRowspans.get(curSlots.length);\n\t\t\tif (rowSpan && rowSpan.remaining > 0) curSlots.push(rowSpan.cell);\n\t\t\telse {\n\t\t\t\tconst cell = children.shift();\n\t\t\t\tif (cell) {\n\t\t\t\t\tconst colspan = parseInt(cell.getAttribute(\"colspan\") || \"1\");\n\t\t\t\t\tconst rowspan = parseInt(cell.getAttribute(\"rowspan\") || \"1\");\n\t\t\t\t\tfor (let i = 0; i < colspan; i++) {\n\t\t\t\t\t\tif (rowspan > 1) curRowspans.set(curSlots.length, {\n\t\t\t\t\t\t\tcell,\n\t\t\t\t\t\t\tremaining: rowspan - 1\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcurSlots.push(cell);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcurSlots.push(null);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const [index, entry] of prevRowspans.entries()) {\n\t\t\tentry.remaining -= 1;\n\t\t\tif (entry.remaining > 0 && !curRowspans.has(index)) curRowspans.set(index, entry);\n\t\t}\n\t\tprevRowspans = curRowspans;\n\t\tmaxColumns = Math.max(maxColumns, curSlots.length);\n\t\treturn curSlots;\n\t});\n\tfor (const rowSlots of slots) while (rowSlots.length < maxColumns) rowSlots.push(null);\n\treturn slots;\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 table/tablecolumnresize/constants\n*/\n/**\n* The minimum column width given as a percentage value. Used in situations when the table is not yet rendered, so it is impossible to\n* calculate how many percentage of the table width would be {@link ~COLUMN_MIN_WIDTH_IN_PIXELS minimum column width in pixels}.\n*\n* @internal\n*/\nconst COLUMN_MIN_WIDTH_AS_PERCENTAGE = 5;\n/**\n* The minimum column width in pixels when the maximum table width is known.\n* This value is an equivalent of `10%` of the default editor width (600px).\n*\n* @internal\n*/\nconst COLUMN_MIN_WIDTH_IN_PIXELS = 40;\n/**\n* Determines how many digits after the decimal point are used to store the column width as a percentage value.\n*\n* @internal\n*/\nconst COLUMN_WIDTH_PRECISION = 2;\n/**\n* The distance in pixels that the mouse has to move to start resizing the column.\n*\n* @internal\n*/\nconst COLUMN_RESIZE_DISTANCE_THRESHOLD = 3;\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* Returns all the inserted or changed table model elements in a given change set. Only the tables\n* with 'columnsWidth' attribute are taken into account. The returned set may be empty.\n*\n* Most notably if an entire table is removed it will not be included in returned set.\n*\n* @internal\n* @param model The model to collect the affected elements from.\n* @returns A set of table model elements.\n*/\nfunction getChangedResizedTables(model) {\n\tconst affectedTables = /* @__PURE__ */ new Set();\n\tfor (const change of model.document.differ.getChanges()) {\n\t\tlet referencePosition = null;\n\t\tswitch (change.type) {\n\t\t\tcase \"insert\":\n\t\t\t\treferencePosition = [\n\t\t\t\t\t\"table\",\n\t\t\t\t\t\"tableRow\",\n\t\t\t\t\t\"tableCell\"\n\t\t\t\t].includes(change.name) ? change.position : null;\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\treferencePosition = [\"tableRow\", \"tableCell\"].includes(change.name) ? change.position : null;\n\t\t\t\tbreak;\n\t\t\tcase \"attribute\": if (change.range.start.nodeAfter) referencePosition = [\n\t\t\t\t\"table\",\n\t\t\t\t\"tableRow\",\n\t\t\t\t\"tableCell\"\n\t\t\t].includes(change.range.start.nodeAfter.name) ? change.range.start : null;\n\t\t}\n\t\tif (!referencePosition) continue;\n\t\tconst tableNode = referencePosition.nodeAfter && referencePosition.nodeAfter.is(\"element\", \"table\") ? referencePosition.nodeAfter : referencePosition.findAncestor(\"table\");\n\t\tfor (const node of model.createRangeOn(tableNode).getItems()) {\n\t\t\tif (!node.is(\"element\", \"table\")) continue;\n\t\t\tif (!getColumnGroupElement(node)) continue;\n\t\t\taffectedTables.add(node);\n\t\t}\n\t}\n\treturn affectedTables;\n}\n/**\n* Calculates the percentage of the minimum column width given in pixels for a given table.\n*\n* @internal\n* @param modelTable A table model element.\n* @param editor The editor instance.\n* @returns The minimal column width in percentage.\n*/\nfunction getColumnMinWidthAsPercentage(modelTable, editor) {\n\treturn 40 * 100 / getTableWidthInPixels(modelTable, editor);\n}\n/**\n* Calculates the table width in pixels.\n*\n* @internal\n* @param modelTable A table model element.\n* @param editor The editor instance.\n* @returns The width of the table in pixels.\n*/\nfunction getTableWidthInPixels(modelTable, editor) {\n\tconst referenceElement = getChildrenViewElement(modelTable, \"tbody\", editor) || getChildrenViewElement(modelTable, \"thead\", editor) || getChildrenViewElement(modelTable, \"tfoot\", editor);\n\treturn getElementWidthInPixels(editor.editing.view.domConverter.mapViewToDom(referenceElement));\n}\n/**\n* Returns the a view element with a given name that is nested directly in a `<table>` element\n* related to a given `modelTable`.\n*\n* @param elementName Name of a view to be looked for, e.g. `'colgroup`', `'thead`'.\n* @returns Matched view or `undefined` otherwise.\n*/\nfunction getChildrenViewElement(modelTable, elementName, editor) {\n\treturn [...[...editor.editing.mapper.toViewElement(modelTable).getChildren()].find((node) => node.is(\"element\", \"table\")).getChildren()].find((node) => node.is(\"element\", elementName));\n}\n/**\n* Returns the computed width (in pixels) of the DOM element without padding and borders.\n*\n* @internal\n* @param domElement A DOM element.\n* @returns The width of the DOM element in pixels.\n*/\nfunction getElementWidthInPixels(domElement) {\n\tconst styles = global.window.getComputedStyle(domElement);\n\tif (styles.boxSizing === \"border-box\") return parseFloat(styles.width) - parseFloat(styles.paddingLeft) - parseFloat(styles.paddingRight) - parseFloat(styles.borderLeftWidth) - parseFloat(styles.borderRightWidth);\n\telse return parseFloat(styles.width);\n}\n/**\n* Returns the width (in pixels) of a given DOM element's content that's actually available to its children -\n* with the element's own vertical scrollbar subtracted where that's still needed.\n*\n* @internal\n* @param domElement A DOM element.\n* @returns The width available to the element's children, in pixels.\n*/\nfunction getContainerContentWidth(domElement) {\n\tconst styles = global.window.getComputedStyle(domElement);\n\tconst width = getElementWidthInPixels(domElement);\n\tif (styles.boxSizing !== \"border-box\") return width;\n\treturn width - Math.max(domElement.offsetWidth - domElement.clientWidth - parseFloat(styles.borderLeftWidth) - parseFloat(styles.borderRightWidth), 0);\n}\n/**\n* Returns the inner pixel width of a given editing root, or `null` if the root has no\n* DOM element attached yet (e.g. it hasn't been rendered for the first time).\n*\n* @internal\n*/\nfunction getEditableContentWidth(editor, rootName) {\n\tconst domRoot = editor.editing.view.getDomRoot(rootName);\n\tif (!domRoot) return null;\n\treturn getContainerContentWidth(domRoot);\n}\n/**\n* Returns the column indexes on the left and right edges of a cell. They differ if the cell spans\n* across multiple columns.\n*\n* @internal\n* @param cell A table cell model element.\n* @param tableUtils The Table Utils plugin instance.\n* @returns An object containing the indexes of the left and right edges of the cell.\n*/\nfunction getColumnEdgesIndexes(cell, tableUtils) {\n\tconst cellColumnIndex = tableUtils.getCellLocation(cell).column;\n\treturn {\n\t\tleftEdge: cellColumnIndex,\n\t\trightEdge: cellColumnIndex + (cell.getAttribute(\"colspan\") || 1) - 1\n\t};\n}\n/**\n* Rounds the provided value to a fixed-point number with defined number of digits after the decimal point.\n*\n* @internal\n* @param value A number to be rounded.\n* @returns The rounded number.\n*/\nfunction toPrecision(value) {\n\tconst multiplier = Math.pow(10, 2);\n\treturn Math.round((typeof value === \"number\" ? value : parseFloat(value)) * multiplier) / multiplier;\n}\n/**\n* Clamps the number within the inclusive lower (min) and upper (max) bounds. Returned number is rounded using the\n* {@link ~toPrecision `toPrecision()`} function.\n*\n* @internal\n* @param number A number to be clamped.\n* @param min A lower bound.\n* @param max An upper bound.\n* @returns The clamped number.\n*/\nfunction clamp(number, min, max) {\n\tif (number <= min) return toPrecision(min);\n\tif (number >= max) return toPrecision(max);\n\treturn toPrecision(number);\n}\n/**\n* Creates an array with defined length and fills all elements with defined value.\n*\n* @internal\n* @param length The length of the array.\n* @param value The value to fill the array with.\n* @returns An array with defined length and filled with defined value.\n*/\nfunction createFilledArray(length, value) {\n\treturn Array(length).fill(value);\n}\n/**\n* Sums all array values that can be parsed to a float.\n*\n* @internal\n* @param array An array of numbers.\n* @returns The sum of all array values.\n*/\nfunction sumArray(array) {\n\treturn array.map((value) => typeof value === \"number\" ? value : parseFloat(value)).filter((value) => !Number.isNaN(value)).reduce((result, item) => result + item, 0);\n}\n/**\n* Makes sure that the sum of the widths from all columns is 100%. If the sum of all the widths is not equal 100%, all the widths are\n* changed proportionally so that they all sum back to 100%. If there are columns without specified width, the amount remaining\n* after assigning the known widths will be distributed equally between them.\n*\n* @internal\n* @param columnWidths An array of column widths.\n* @returns An array of column widths guaranteed to sum up to 100%.\n*/\nfunction normalizeColumnWidths(columnWidths) {\n\tconst hasPixels = columnWidths.some((width) => typeof width === \"string\" && width.endsWith(\"px\"));\n\tconst hasPercentages = columnWidths.some((width) => typeof width === \"string\" && width.endsWith(\"%\"));\n\tif (hasPixels && !hasPercentages) return columnWidths.map((width) => width === \"auto\" || width === void 0 ? \"auto\" : `${toPrecision(width)}px`);\n\tlet normalizedWidths = calculateMissingColumnWidths(columnWidths.map((width) => {\n\t\tif (width === \"auto\" || width === void 0) return \"auto\";\n\t\treturn parseFloat(width.replace(\"%\", \"\"));\n\t}));\n\tconst totalWidth = sumArray(normalizedWidths);\n\tif (totalWidth !== 100) normalizedWidths = normalizedWidths.map((width) => toPrecision(width * 100 / totalWidth)).map((columnWidth, columnIndex, width) => {\n\t\tif (!(columnIndex === width.length - 1)) return columnWidth;\n\t\tconst totalWidth = sumArray(width);\n\t\treturn toPrecision(columnWidth + 100 - totalWidth);\n\t});\n\treturn normalizedWidths.map((width) => width + \"%\");\n}\n/**\n* Initializes the column widths by parsing the attribute value and calculating the uninitialized column widths. The special value 'auto'\n* indicates that width for the column must be calculated. The width of such uninitialized column is calculated as follows:\n* - If there is enough free space in the table for all uninitialized columns to have at least the minimum allowed width for all of them,\n*   then set this width equally for all uninitialized columns.\n* - Otherwise, just set the minimum allowed width for all uninitialized columns. The sum of all column widths will be greater than 100%,\n*   but then it will be adjusted proportionally to 100% in {@link #normalizeColumnWidths `normalizeColumnWidths()`}.\n*\n* @param columnWidths An array of column widths.\n* @returns An array with 'auto' values replaced with calculated widths.\n*/\nfunction calculateMissingColumnWidths(columnWidths) {\n\tconst numberOfUninitializedColumns = columnWidths.filter((columnWidth) => columnWidth === \"auto\").length;\n\tif (numberOfUninitializedColumns === 0) return columnWidths.map((columnWidth) => toPrecision(columnWidth));\n\tconst totalWidthOfInitializedColumns = sumArray(columnWidths);\n\tconst widthForUninitializedColumn = Math.max((100 - totalWidthOfInitializedColumns) / numberOfUninitializedColumns, 5);\n\treturn columnWidths.map((columnWidth) => columnWidth === \"auto\" ? widthForUninitializedColumn : columnWidth).map((columnWidth) => toPrecision(columnWidth));\n}\n/**\n* Calculates the total horizontal space taken by the cell. That includes:\n*  * width,\n*  * left and red padding,\n*  * border width.\n*\n* @internal\n* @param domCell A DOM cell element.\n* @returns Width in pixels without `px` at the end.\n*/\nfunction getDomCellOuterWidth(domCell) {\n\tconst styles = global.window.getComputedStyle(domCell);\n\tif (styles.boxSizing === \"border-box\") return parseInt(styles.width);\n\telse return parseFloat(styles.width) + parseFloat(styles.paddingLeft) + parseFloat(styles.paddingRight) + parseFloat(styles.borderWidth);\n}\n/**\n* Updates column elements to match columns widths.\n*\n* @internal\n* @param columns\n* @param tableColumnGroup\n* @param normalizedWidths\n* @param writer\n*/\nfunction updateColumnElements(columns, tableColumnGroup, normalizedWidths, writer) {\n\tfor (let i = 0; i < Math.max(normalizedWidths.length, columns.length); i++) {\n\t\tconst column = columns[i];\n\t\tconst columnWidth = normalizedWidths[i];\n\t\tif (!columnWidth) writer.remove(column);\n\t\telse if (!column) writer.appendElement(\"tableColumn\", { columnWidth }, tableColumnGroup);\n\t\telse writer.setAttribute(\"columnWidth\", columnWidth, column);\n\t}\n}\n/**\n* Returns a 'tableColumnGroup' element from the 'table'.\n*\n* @internal\n* @param element A 'table' or 'tableColumnGroup' element.\n* @returns A 'tableColumnGroup' element.\n*/\nfunction getColumnGroupElement(element) {\n\tif (element.is(\"element\", \"tableColumnGroup\")) return element;\n\tconst children = element.getChildren();\n\treturn Array.from(children).find((element) => element.is(\"element\", \"tableColumnGroup\"));\n}\n/**\n* Returns an array of 'tableColumn' elements. It may be empty if there's no `tableColumnGroup` element.\n*\n* @internal\n* @param element A 'table' or 'tableColumnGroup' element.\n* @returns An array of 'tableColumn' elements.\n*/\nfunction getTableColumnElements(element) {\n\tconst columnGroupElement = getColumnGroupElement(element);\n\tif (!columnGroupElement) return [];\n\treturn Array.from(columnGroupElement.getChildren());\n}\n/**\n* Returns an array of table column widths.\n*\n* @internal\n* @param element A 'table' or 'tableColumnGroup' element.\n* @returns An array of table column widths.\n*/\nfunction getTableColumnsWidths(element) {\n\treturn getTableColumnElements(element).map((column) => column.getAttribute(\"columnWidth\"));\n}\n/**\n* Tells whether a table is in the pixel width mode, that is, its `tableWidth` attribute is expressed in pixels.\n* The `tableWidth` unit is the single source of truth for the whole table's width mode.\n*\n* @internal\n* @param table A 'table' model element.\n*/\nfunction isTableWidthInPixels(table) {\n\tconst tableWidth = table.getAttribute(\"tableWidth\");\n\treturn typeof tableWidth === \"string\" && tableWidth.trim().endsWith(\"px\");\n}\n/**\n* Tells whether the given column widths are expressed in pixels.\n*\n* @internal\n* @param columnWidths An array of column widths.\n*/\nfunction isColumnWidthsInPixels(columnWidths) {\n\treturn columnWidths.some((width) => typeof width === \"string\" && width.endsWith(\"px\"));\n}\n/**\n* Translates the `colSpan` model attribute into additional column widths and returns the resulting array.\n*\n* @internal\n* @param element A 'table' or 'tableColumnGroup' element.\n* @param writer A writer instance.\n* @returns An array of table column widths.\n*/\nfunction translateColSpanAttribute(element, writer) {\n\treturn getTableColumnElements(element).reduce((acc, element) => {\n\t\tconst columnWidth = element.getAttribute(\"columnWidth\");\n\t\tconst colSpan = element.getAttribute(\"colSpan\");\n\t\tif (!colSpan) {\n\t\t\tacc.push(columnWidth);\n\t\t\treturn acc;\n\t\t}\n\t\tfor (let i = 0; i < colSpan; i++) acc.push(columnWidth);\n\t\twriter.removeAttribute(\"colSpan\", element);\n\t\treturn acc;\n\t}, []);\n}\n/**\n* Removes the `tableCellWidth` attribute from every cell of the given table. Once a column is resized (with the resize\n* handler or the column-width command), a per-cell width is obsolete - the column width governs the layout - so it is\n* dropped to keep the model clean.\n*\n* @internal\n*/\nfunction removeCellWidthsFromTable(writer, table) {\n\tfor (const row of table.getChildren()) {\n\t\tif (!row.is(\"element\", \"tableRow\")) continue;\n\t\tfor (const cell of row.getChildren()) writer.removeAttribute(\"tableCellWidth\", cell);\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 table/tableutils\n*/\n/**\n* The table utilities plugin.\n*/\nvar TableUtils = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableUtils\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.decorate(\"insertColumns\");\n\t\tthis.decorate(\"insertRows\");\n\t}\n\t/**\n\t* Returns the table cell location as an object with table row and table column indexes.\n\t*\n\t* For instance, in the table below:\n\t*\n\t*      0   1   2   3\n\t*    +---+---+---+---+\n\t*  0 | a     | b | c |\n\t*    +       +   +---+\n\t*  1 |       |   | d |\n\t*    +---+---+   +---+\n\t*  2 | e     |   | f |\n\t*    +---+---+---+---+\n\t*\n\t* the method will return:\n\t*\n\t* ```ts\n\t* const cellA = table.getNodeByPath( [ 0, 0 ] );\n\t* editor.plugins.get( 'TableUtils' ).getCellLocation( cellA );\n\t* // will return { row: 0, column: 0 }\n\t*\n\t* const cellD = table.getNodeByPath( [ 1, 0 ] );\n\t* editor.plugins.get( 'TableUtils' ).getCellLocation( cellD );\n\t* // will return { row: 1, column: 3 }\n\t* ```\n\t*\n\t* @returns Returns a `{row, column}` object.\n\t*/\n\tgetCellLocation(tableCell) {\n\t\tconst tableRow = tableCell.parent;\n\t\tconst table = tableRow.parent;\n\t\tconst rowIndex = table.getChildIndex(tableRow);\n\t\tconst tableWalker = new TableWalker(table, { row: rowIndex });\n\t\tfor (const { cell, row, column } of tableWalker) if (cell === tableCell) return {\n\t\t\trow,\n\t\t\tcolumn\n\t\t};\n\t}\n\t/**\n\t* Creates an empty table with a proper structure. The table needs to be inserted into the model,\n\t* for example, by using the {@link module:engine/model/model~Model#insertContent} function.\n\t*\n\t* ```ts\n\t* model.change( ( writer ) => {\n\t*   // Create a table of 2 rows and 7 columns:\n\t*   const table = tableUtils.createTable( writer, { rows: 2, columns: 7 } );\n\t*\n\t*   // Insert a table to the model at the best position taking the current selection:\n\t*   model.insertContent( table );\n\t* }\n\t* ```\n\t*\n\t* @param writer The model writer.\n\t* @param options.rows The number of rows to create. Default value is 2.\n\t* @param options.columns The number of columns to create. Default value is 2.\n\t* @param options.headingRows The number of heading rows. Default value is 0.\n\t* @param options.headingColumns The number of heading columns. Default value is 0.\n\t* @param options.footerRows The number of footer rows. Default value is 0.\n\t* @returns The created table element.\n\t*/\n\tcreateTable(writer, options) {\n\t\tconst table = writer.createElement(\"table\");\n\t\tcreateEmptyRows(writer, table, 0, options.rows || 2, options.columns || 2);\n\t\tif (options.footerRows) this.setFooterRowsCount(writer, table, options.footerRows);\n\t\tif (options.headingRows) this.setHeadingRowsCount(writer, table, options.headingRows);\n\t\tif (options.headingColumns) this.setHeadingColumnsCount(writer, table, options.headingColumns);\n\t\treturn table;\n\t}\n\t/**\n\t* Inserts rows into a table.\n\t*\n\t* ```ts\n\t* editor.plugins.get( 'TableUtils' ).insertRows( table, { at: 1, rows: 2 } );\n\t* ```\n\t*\n\t* Assuming the table on the left, the above code will transform it to the table on the right:\n\t*\n\t*  row index\n\t*    0 +---+---+---+       `at` = 1,      +---+---+---+ 0\n\t*      | a | b | c |       `rows` = 2,    | a | b | c |\n\t*    1 +   +---+---+   <-- insert here    +   +---+---+ 1\n\t*      |   | d | e |                      |   |   |   |\n\t*    2 +   +---+---+       will give:     +   +---+---+ 2\n\t*      |   | f | g |                      |   |   |   |\n\t*    3 +---+---+---+                      +   +---+---+ 3\n\t*                                         |   | d | e |\n\t*                                         +   +---+---+ 4\n\t*                                         +   + f | g |\n\t*                                         +---+---+---+ 5\n\t*\n\t* @param table The table model element where the rows will be inserted.\n\t* @param options.at The row index at which the rows will be inserted.  Default value is 0.\n\t* @param options.rows The number of rows to insert.  Default value is 1.\n\t* @param options.copyStructureFromAbove The flag for copying row structure. Note that\n\t* the row structure will not be copied if this option is not provided.\n\t*/\n\tinsertRows(table, options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst insertAt = options.at || 0;\n\t\tconst rowsToInsert = options.rows || 1;\n\t\tconst isCopyStructure = options.copyStructureFromAbove !== void 0;\n\t\tconst copyStructureFrom = options.copyStructureFromAbove ? insertAt - 1 : insertAt;\n\t\tconst cellTypeEnabled = isTableCellTypeEnabled(this.editor);\n\t\tconst scopedHeaders = !!this.editor.config.get(\"table.tableCellProperties.scopedHeaders\");\n\t\tconst rows = this.getRows(table);\n\t\tconst columns = this.getColumns(table);\n\t\tif (insertAt > rows)\n /**\n\t\t* The `options.at` points at a row position that does not exist.\n\t\t*\n\t\t* @error tableutils-insertrows-insert-out-of-range\n\t\t*/\n\t\tthrow new CKEditorError(\"tableutils-insertrows-insert-out-of-range\", this, { options });\n\t\tmodel.change((writer) => {\n\t\t\tlet headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\t\tlet footerRows = table.getAttribute(\"footerRows\") || 0;\n\t\t\tif (headingRows > insertAt) headingRows += rowsToInsert;\n\t\t\tif (footerRows && insertAt > rows - footerRows) footerRows += rowsToInsert;\n\t\t\tif (!isCopyStructure && (insertAt === 0 || insertAt === rows)) {\n\t\t\t\tconst rows = createEmptyRows(writer, table, insertAt, rowsToInsert, columns);\n\t\t\t\tif (cellTypeEnabled) for (let rowOffset = 0; rowOffset < rows.length; rowOffset++) {\n\t\t\t\t\tconst row = rows[rowOffset];\n\t\t\t\t\tfor (let columnIndex = 0; columnIndex < columns; columnIndex++) updateTableCellType({\n\t\t\t\t\t\ttable,\n\t\t\t\t\t\twriter,\n\t\t\t\t\t\tcell: row[columnIndex],\n\t\t\t\t\t\trow: insertAt + rowOffset,\n\t\t\t\t\t\tcolumn: columnIndex,\n\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst tableIterator = new TableWalker(table, { endRow: isCopyStructure ? Math.max(insertAt, copyStructureFrom) : insertAt });\n\t\t\t\tconst rowColSpansMap = new Array(columns).fill(1);\n\t\t\t\tfor (const { row, column, cellHeight, cellWidth, cell } of tableIterator) {\n\t\t\t\t\tconst lastCellRow = row + cellHeight - 1;\n\t\t\t\t\tconst isOverlappingInsertedRow = row < insertAt && insertAt <= lastCellRow;\n\t\t\t\t\tconst isReferenceRow = row <= copyStructureFrom && copyStructureFrom <= lastCellRow;\n\t\t\t\t\tif (isOverlappingInsertedRow) {\n\t\t\t\t\t\twriter.setAttribute(\"rowspan\", cellHeight + rowsToInsert, cell);\n\t\t\t\t\t\trowColSpansMap[column] = -cellWidth;\n\t\t\t\t\t} else if (isCopyStructure && isReferenceRow) rowColSpansMap[column] = cellWidth;\n\t\t\t\t}\n\t\t\t\tfor (let rowIndex = 0; rowIndex < rowsToInsert; rowIndex++) {\n\t\t\t\t\tconst tableRow = writer.createElement(\"tableRow\");\n\t\t\t\t\twriter.insert(tableRow, table, insertAt);\n\t\t\t\t\tfor (let cellIndex = 0; cellIndex < rowColSpansMap.length; cellIndex++) {\n\t\t\t\t\t\tconst colspan = rowColSpansMap[cellIndex];\n\t\t\t\t\t\tconst insertPosition = writer.createPositionAt(tableRow, \"end\");\n\t\t\t\t\t\tif (colspan > 0) {\n\t\t\t\t\t\t\tconst insertedCell = createEmptyTableCell(writer, insertPosition, colspan > 1 ? { colspan } : void 0);\n\t\t\t\t\t\t\tif (cellTypeEnabled) updateTableCellType({\n\t\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\t\tcell: insertedCell,\n\t\t\t\t\t\t\t\trow: insertAt + rowIndex,\n\t\t\t\t\t\t\t\tcolumn: cellIndex,\n\t\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcellIndex += Math.abs(colspan) - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setFooterRowsCount(writer, table, footerRows);\n\t\t\tthis.setHeadingRowsCount(writer, table, headingRows, { updateCellType: false });\n\t\t});\n\t}\n\t/**\n\t* Inserts columns into a table.\n\t*\n\t* ```ts\n\t* editor.plugins.get( 'TableUtils' ).insertColumns( table, { at: 1, columns: 2 } );\n\t* ```\n\t*\n\t* Assuming the table on the left, the above code will transform it to the table on the right:\n\t*\n\t*  0   1   2   3                   0   1   2   3   4   5\n\t*  +---+---+---+                   +---+---+---+---+---+\n\t*  | a     | b |                   | a             | b |\n\t*  +       +---+                   +               +---+\n\t*  |       | c |                   |               | c |\n\t*  +---+---+---+     will give:    +---+---+---+---+---+\n\t*  | d | e | f |                   | d |   |   | e | f |\n\t*  +---+   +---+                   +---+---+---+   +---+\n\t*  | g |   | h |                   | g |   |   |   | h |\n\t*  +---+---+---+                   +---+---+---+---+---+\n\t*  | i         |                   | i                 |\n\t*  +---+---+---+                   +---+---+---+---+---+\n\t*      ^---- insert here, `at` = 1, `columns` = 2\n\t*\n\t* @param table The table model element where the columns will be inserted.\n\t* @param options.at The column index at which the columns will be inserted. Default value is 0.\n\t* @param options.columns The number of columns to insert. Default value is 1.\n\t*/\n\tinsertColumns(table, options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst insertAt = options.at || 0;\n\t\tconst columnsToInsert = options.columns || 1;\n\t\tconst cellTypeEnabled = isTableCellTypeEnabled(this.editor);\n\t\tconst scopedHeaders = !!this.editor.config.get(\"table.tableCellProperties.scopedHeaders\");\n\t\tmodel.change((writer) => {\n\t\t\tlet headingColumns = table.getAttribute(\"headingColumns\");\n\t\t\tif (insertAt < headingColumns) headingColumns += columnsToInsert;\n\t\t\tconst tableColumns = this.getColumns(table);\n\t\t\tif (insertAt === 0 || tableColumns === insertAt) {\n\t\t\t\tlet rowIndex = 0;\n\t\t\t\tfor (const tableRow of table.getChildren()) {\n\t\t\t\t\tif (!tableRow.is(\"element\", \"tableRow\")) continue;\n\t\t\t\t\tconst insertedCells = createCells(columnsToInsert, writer, writer.createPositionAt(tableRow, insertAt ? \"end\" : 0));\n\t\t\t\t\tif (cellTypeEnabled) for (let columnOffset = 0; columnOffset < insertedCells.length; columnOffset++) updateTableCellType({\n\t\t\t\t\t\ttable,\n\t\t\t\t\t\twriter,\n\t\t\t\t\t\tcell: insertedCells[columnOffset],\n\t\t\t\t\t\trow: rowIndex,\n\t\t\t\t\t\tcolumn: insertAt + columnOffset,\n\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t});\n\t\t\t\t\trowIndex++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst tableWalker = new TableWalker(table, {\n\t\t\t\t\tcolumn: insertAt,\n\t\t\t\t\tincludeAllSlots: true\n\t\t\t\t});\n\t\t\t\tfor (const tableSlot of tableWalker) {\n\t\t\t\t\tconst { row, cell, cellAnchorColumn, cellAnchorRow, cellWidth, cellHeight } = tableSlot;\n\t\t\t\t\tif (cellAnchorColumn < insertAt) {\n\t\t\t\t\t\twriter.setAttribute(\"colspan\", cellWidth + columnsToInsert, cell);\n\t\t\t\t\t\tconst lastCellRow = cellAnchorRow + cellHeight - 1;\n\t\t\t\t\t\tfor (let i = row; i <= lastCellRow; i++) tableWalker.skipRow(i);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst insertedCells = createCells(columnsToInsert, writer, tableSlot.getPositionBefore());\n\t\t\t\t\t\tif (cellTypeEnabled) for (let columnOffset = 0; columnOffset < insertedCells.length; columnOffset++) updateTableCellType({\n\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\tcell: insertedCells[columnOffset],\n\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\tcolumn: insertAt + columnOffset,\n\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setHeadingColumnsCount(writer, table, headingColumns, { updateCellType: false });\n\t\t});\n\t}\n\t/**\n\t* Removes rows from the given `table`.\n\t*\n\t* This method re-calculates the table geometry including `rowspan` attribute of table cells overlapping removed rows\n\t* and table headings values.\n\t*\n\t* ```ts\n\t* editor.plugins.get( 'TableUtils' ).removeRows( table, { at: 1, rows: 2 } );\n\t* ```\n\t*\n\t* Executing the above code in the context of the table on the left will transform its structure as presented on the right:\n\t*\n\t*  row index\n\t*      ┌───┬───┬───┐        `at` = 1        ┌───┬───┬───┐\n\t*    0 │ a │ b │ c │        `rows` = 2      │ a │ b │ c │ 0\n\t*      │   ├───┼───┤                        │   ├───┼───┤\n\t*    1 │   │ d │ e │  <-- remove from here  │   │ d │ g │ 1\n\t*      │   │   ├───┤        will give:      ├───┼───┼───┤\n\t*    2 │   │   │ f │                        │ h │ i │ j │ 2\n\t*      │   │   ├───┤                        └───┴───┴───┘\n\t*    3 │   │   │ g │\n\t*      ├───┼───┼───┤\n\t*    4 │ h │ i │ j │\n\t*      └───┴───┴───┘\n\t*\n\t* @param options.at The row index at which the removing rows will start.\n\t* @param options.rows The number of rows to remove. Default value is 1.\n\t*/\n\tremoveRows(table, options) {\n\t\tconst model = this.editor.model;\n\t\tconst rowsToRemove = options.rows || 1;\n\t\tconst rowCount = this.getRows(table);\n\t\tconst first = options.at;\n\t\tconst last = first + rowsToRemove - 1;\n\t\tif (last > rowCount - 1)\n /**\n\t\t* The `options.at` param must point at existing row and `options.rows` must not exceed the rows in the table.\n\t\t*\n\t\t* @error tableutils-removerows-row-index-out-of-range\n\t\t*/\n\t\tthrow new CKEditorError(\"tableutils-removerows-row-index-out-of-range\", this, {\n\t\t\ttable,\n\t\t\toptions\n\t\t});\n\t\tmodel.change((writer) => {\n\t\t\tconst indexesObject = {\n\t\t\t\tfirst,\n\t\t\t\tlast\n\t\t\t};\n\t\t\tconst { cellsToMove, cellsToTrim } = getCellsToMoveAndTrimOnRemoveRow(table, indexesObject);\n\t\t\tif (cellsToMove.size) moveCellsToRow(table, last + 1, cellsToMove, writer);\n\t\t\tfor (let i = last; i >= first; i--) writer.remove(table.getChild(i));\n\t\t\tfor (const { rowspan, cell } of cellsToTrim) updateNumericAttribute(\"rowspan\", rowspan, cell, writer);\n\t\t\tupdateHeadingRows(table, indexesObject, writer);\n\t\t\tupdateFooterRows(table, rowCount, indexesObject, writer);\n\t\t\tif (!removeEmptyColumns(table, this)) removeEmptyRows(table, this);\n\t\t\tif (isTableCellTypeEnabled(this.editor)) {\n\t\t\t\tlet headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\t\t\tconst totalRows = this.getRows(table);\n\t\t\t\twhile (headingRows < totalRows && isEntireCellsLineHeader({\n\t\t\t\t\ttable,\n\t\t\t\t\trow: headingRows\n\t\t\t\t})) headingRows++;\n\t\t\t\tthis.setHeadingRowsCount(writer, table, headingRows, { updateCellType: false });\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Removes columns from the given `table`.\n\t*\n\t* This method re-calculates the table geometry including the `colspan` attribute of table cells overlapping removed columns\n\t* and table headings values.\n\t*\n\t* ```ts\n\t* editor.plugins.get( 'TableUtils' ).removeColumns( table, { at: 1, columns: 2 } );\n\t* ```\n\t*\n\t* Executing the above code in the context of the table on the left will transform its structure as presented on the right:\n\t*\n\t*    0   1   2   3   4                       0   1   2\n\t*  ┌───────────────┬───┐                   ┌───────┬───┐\n\t*  │ a             │ b │                   │ a     │ b │\n\t*  │               ├───┤                   │       ├───┤\n\t*  │               │ c │                   │       │ c │\n\t*  ├───┬───┬───┬───┼───┤     will give:    ├───┬───┼───┤\n\t*  │ d │ e │ f │ g │ h │                   │ d │ g │ h │\n\t*  ├───┼───┼───┤   ├───┤                   ├───┤   ├───┤\n\t*  │ i │ j │ k │   │ l │                   │ i │   │ l │\n\t*  ├───┴───┴───┴───┴───┤                   ├───┴───┴───┤\n\t*  │ m                 │                   │ m         │\n\t*  └───────────────────┘                   └───────────┘\n\t*        ^---- remove from here, `at` = 1, `columns` = 2\n\t*\n\t* @param options.at The row index at which the removing columns will start.\n\t* @param options.columns The number of columns to remove.\n\t*/\n\tremoveColumns(table, options) {\n\t\tconst model = this.editor.model;\n\t\tconst first = options.at;\n\t\tconst columnsToRemove = options.columns || 1;\n\t\tconst last = options.at + columnsToRemove - 1;\n\t\tmodel.change((writer) => {\n\t\t\tadjustHeadingColumns(table, {\n\t\t\t\tfirst,\n\t\t\t\tlast\n\t\t\t}, writer);\n\t\t\tconst tableColumns = getTableColumnElements(table);\n\t\t\tfor (let removedColumnIndex = last; removedColumnIndex >= first; removedColumnIndex--) {\n\t\t\t\tfor (const { cell, column, cellWidth } of [...new TableWalker(table)]) if (column <= removedColumnIndex && cellWidth > 1 && column + cellWidth > removedColumnIndex) updateNumericAttribute(\"colspan\", cellWidth - 1, cell, writer);\n\t\t\t\telse if (column === removedColumnIndex) writer.remove(cell);\n\t\t\t\tif (tableColumns[removedColumnIndex]) {\n\t\t\t\t\tconst adjacentColumn = removedColumnIndex === 0 ? tableColumns[1] : tableColumns[removedColumnIndex - 1];\n\t\t\t\t\tconst removedColumnWidthAttribute = tableColumns[removedColumnIndex].getAttribute(\"columnWidth\");\n\t\t\t\t\tconst removedColumnWidth = parseFloat(removedColumnWidthAttribute);\n\t\t\t\t\tconst adjacentColumnWidth = parseFloat(adjacentColumn.getAttribute(\"columnWidth\"));\n\t\t\t\t\twriter.remove(tableColumns[removedColumnIndex]);\n\t\t\t\t\tconst unit = removedColumnWidthAttribute.trim().endsWith(\"px\") ? \"px\" : \"%\";\n\t\t\t\t\twriter.setAttribute(\"columnWidth\", `${removedColumnWidth + adjacentColumnWidth}${unit}`, adjacentColumn);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!removeEmptyRows(table, this)) removeEmptyColumns(table, this);\n\t\t\tif (isTableCellTypeEnabled(this.editor)) {\n\t\t\t\tlet headingColumns = table.getAttribute(\"headingColumns\") || 0;\n\t\t\t\tconst totalColumns = this.getColumns(table);\n\t\t\t\twhile (headingColumns < totalColumns && isEntireCellsLineHeader({\n\t\t\t\t\ttable,\n\t\t\t\t\tcolumn: headingColumns\n\t\t\t\t})) headingColumns++;\n\t\t\t\tthis.setHeadingColumnsCount(writer, table, headingColumns, { updateCellType: false });\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Divides a table cell vertically into several ones.\n\t*\n\t* The cell will be visually split into more cells by updating colspans of other cells in a column\n\t* and inserting cells (columns) after that cell.\n\t*\n\t* In the table below, if cell \"a\" is split into 3 cells:\n\t*\n\t*  +---+---+---+\n\t*  | a | b | c |\n\t*  +---+---+---+\n\t*  | d | e | f |\n\t*  +---+---+---+\n\t*\n\t* it will result in the table below:\n\t*\n\t*  +---+---+---+---+---+\n\t*  | a |   |   | b | c |\n\t*  +---+---+---+---+---+\n\t*  | d         | e | f |\n\t*  +---+---+---+---+---+\n\t*\n\t* So cell \"d\" will get its `colspan` updated to `3` and 2 cells will be added (2 columns will be created).\n\t*\n\t* Splitting a cell that already has a `colspan` attribute set will distribute the cell `colspan` evenly and the remainder\n\t* will be left to the original cell:\n\t*\n\t*  +---+---+---+\n\t*  | a         |\n\t*  +---+---+---+\n\t*  | b | c | d |\n\t*  +---+---+---+\n\t*\n\t* Splitting cell \"a\" with `colspan=3` into 2 cells will create 1 cell with a `colspan=a` and cell \"a\" that will have `colspan=2`:\n\t*\n\t*  +---+---+---+\n\t*  | a     |   |\n\t*  +---+---+---+\n\t*  | b | c | d |\n\t*  +---+---+---+\n\t*/\n\tsplitCellVertically(tableCell, numberOfCells = 2) {\n\t\tconst model = this.editor.model;\n\t\tconst table = tableCell.parent.parent;\n\t\tconst rowspan = parseInt(tableCell.getAttribute(\"rowspan\") || \"1\");\n\t\tconst colspan = parseInt(tableCell.getAttribute(\"colspan\") || \"1\");\n\t\tmodel.change((writer) => {\n\t\t\tif (colspan > 1) {\n\t\t\t\tconst { newCellsSpan, updatedSpan } = breakSpanEvenly(colspan, numberOfCells);\n\t\t\t\tupdateNumericAttribute(\"colspan\", updatedSpan, tableCell, writer);\n\t\t\t\tconst newCellsAttributes = {};\n\t\t\t\tif (newCellsSpan > 1) newCellsAttributes.colspan = newCellsSpan;\n\t\t\t\tif (rowspan > 1) newCellsAttributes.rowspan = rowspan;\n\t\t\t\tcreateCells(colspan > numberOfCells ? numberOfCells - 1 : colspan - 1, writer, writer.createPositionAfter(tableCell), newCellsAttributes);\n\t\t\t}\n\t\t\tif (colspan < numberOfCells) {\n\t\t\t\tconst cellsToInsert = numberOfCells - colspan;\n\t\t\t\tconst tableMap = [...new TableWalker(table)];\n\t\t\t\tconst { column: splitCellColumn } = tableMap.find(({ cell }) => cell === tableCell);\n\t\t\t\tconst cellsToUpdate = tableMap.filter(({ cell, cellWidth, column }) => {\n\t\t\t\t\tconst isOnSameColumn = cell !== tableCell && column === splitCellColumn;\n\t\t\t\t\tconst spansOverColumn = column < splitCellColumn && column + cellWidth > splitCellColumn;\n\t\t\t\t\treturn isOnSameColumn || spansOverColumn;\n\t\t\t\t});\n\t\t\t\tfor (const { cell, cellWidth } of cellsToUpdate) writer.setAttribute(\"colspan\", cellWidth + cellsToInsert, cell);\n\t\t\t\tconst newCellsAttributes = {};\n\t\t\t\tif (rowspan > 1) newCellsAttributes.rowspan = rowspan;\n\t\t\t\tcreateCells(cellsToInsert, writer, writer.createPositionAfter(tableCell), newCellsAttributes);\n\t\t\t\tconst headingColumns = table.getAttribute(\"headingColumns\") || 0;\n\t\t\t\tif (headingColumns > splitCellColumn) updateNumericAttribute(\"headingColumns\", headingColumns + cellsToInsert, table, writer);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Divides a table cell horizontally into several ones.\n\t*\n\t* The cell will be visually split into more cells by updating rowspans of other cells in the row and inserting rows with a single cell\n\t* below.\n\t*\n\t* If in the table below cell \"b\" is split into 3 cells:\n\t*\n\t*  +---+---+---+\n\t*  | a | b | c |\n\t*  +---+---+---+\n\t*  | d | e | f |\n\t*  +---+---+---+\n\t*\n\t* It will result in the table below:\n\t*\n\t*  +---+---+---+\n\t*  | a | b | c |\n\t*  +   +---+   +\n\t*  |   |   |   |\n\t*  +   +---+   +\n\t*  |   |   |   |\n\t*  +---+---+---+\n\t*  | d | e | f |\n\t*  +---+---+---+\n\t*\n\t* So cells \"a\" and \"b\" will get their `rowspan` updated to `3` and 2 rows with a single cell will be added.\n\t*\n\t* Splitting a cell that already has a `rowspan` attribute set will distribute the cell `rowspan` evenly and the remainder\n\t* will be left to the original cell:\n\t*\n\t*  +---+---+---+\n\t*  | a | b | c |\n\t*  +   +---+---+\n\t*  |   | d | e |\n\t*  +   +---+---+\n\t*  |   | f | g |\n\t*  +   +---+---+\n\t*  |   | h | i |\n\t*  +---+---+---+\n\t*\n\t* Splitting cell \"a\" with `rowspan=4` into 3 cells will create 2 cells with a `rowspan=1` and cell \"a\" will have `rowspan=2`:\n\t*\n\t*  +---+---+---+\n\t*  | a | b | c |\n\t*  +   +---+---+\n\t*  |   | d | e |\n\t*  +---+---+---+\n\t*  |   | f | g |\n\t*  +---+---+---+\n\t*  |   | h | i |\n\t*  +---+---+---+\n\t*/\n\tsplitCellHorizontally(tableCell, numberOfCells = 2) {\n\t\tconst model = this.editor.model;\n\t\tconst tableRow = tableCell.parent;\n\t\tconst table = tableRow.parent;\n\t\tconst splitCellRow = table.getChildIndex(tableRow);\n\t\tconst rowspan = parseInt(tableCell.getAttribute(\"rowspan\") || \"1\");\n\t\tconst colspan = parseInt(tableCell.getAttribute(\"colspan\") || \"1\");\n\t\tmodel.change((writer) => {\n\t\t\tif (rowspan > 1) {\n\t\t\t\tconst tableMap = [...new TableWalker(table, {\n\t\t\t\t\tstartRow: splitCellRow,\n\t\t\t\t\tendRow: splitCellRow + rowspan - 1,\n\t\t\t\t\tincludeAllSlots: true\n\t\t\t\t})];\n\t\t\t\tconst { newCellsSpan, updatedSpan } = breakSpanEvenly(rowspan, numberOfCells);\n\t\t\t\tupdateNumericAttribute(\"rowspan\", updatedSpan, tableCell, writer);\n\t\t\t\tconst { column: cellColumn } = tableMap.find(({ cell }) => cell === tableCell);\n\t\t\t\tconst newCellsAttributes = {};\n\t\t\t\tif (newCellsSpan > 1) newCellsAttributes.rowspan = newCellsSpan;\n\t\t\t\tif (colspan > 1) newCellsAttributes.colspan = colspan;\n\t\t\t\tlet distanceFromLastCellSpan = 0;\n\t\t\t\tfor (const tableSlot of tableMap) {\n\t\t\t\t\tconst { column, row } = tableSlot;\n\t\t\t\t\tconst isAfterSplitCell = row >= splitCellRow + updatedSpan;\n\t\t\t\t\tconst isOnSameColumn = column === cellColumn;\n\t\t\t\t\tif (distanceFromLastCellSpan >= newCellsSpan && isOnSameColumn) distanceFromLastCellSpan = 0;\n\t\t\t\t\tif (isAfterSplitCell && isOnSameColumn) {\n\t\t\t\t\t\tif (!distanceFromLastCellSpan) createCells(1, writer, tableSlot.getPositionBefore(), newCellsAttributes);\n\t\t\t\t\t\tdistanceFromLastCellSpan++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (rowspan < numberOfCells) {\n\t\t\t\tconst cellsToInsert = numberOfCells - rowspan;\n\t\t\t\tconst rowCountBefore = this.getRows(table);\n\t\t\t\tconst tableMap = [...new TableWalker(table, {\n\t\t\t\t\tstartRow: 0,\n\t\t\t\t\tendRow: splitCellRow\n\t\t\t\t})];\n\t\t\t\tfor (const { cell, cellHeight, row } of tableMap) if (cell !== tableCell && row + cellHeight > splitCellRow) {\n\t\t\t\t\tconst rowspanToSet = cellHeight + cellsToInsert;\n\t\t\t\t\twriter.setAttribute(\"rowspan\", rowspanToSet, cell);\n\t\t\t\t}\n\t\t\t\tconst newCellsAttributes = {};\n\t\t\t\tif (colspan > 1) newCellsAttributes.colspan = colspan;\n\t\t\t\tcreateEmptyRows(writer, table, splitCellRow + 1, cellsToInsert, 1, newCellsAttributes);\n\t\t\t\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\t\t\tif (headingRows > splitCellRow) updateNumericAttribute(\"headingRows\", headingRows + cellsToInsert, table, writer);\n\t\t\t\tconst footerRows = table.getAttribute(\"footerRows\") || 0;\n\t\t\t\tif (rowCountBefore - footerRows <= splitCellRow) updateNumericAttribute(\"footerRows\", footerRows + cellsToInsert, table, writer);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Returns the number of columns for a given table.\n\t*\n\t* ```ts\n\t* editor.plugins.get( 'TableUtils' ).getColumns( table );\n\t* ```\n\t*\n\t* @param table The table to analyze.\n\t*/\n\tgetColumns(table) {\n\t\treturn [...table.getChild(0).getChildren()].filter((node) => node.is(\"element\", \"tableCell\")).reduce((columns, row) => {\n\t\t\treturn columns + parseInt(row.getAttribute(\"colspan\") || \"1\");\n\t\t}, 0);\n\t}\n\t/**\n\t* Returns the number of rows for a given table. Any other element present in the table model is omitted.\n\t*\n\t* ```ts\n\t* editor.plugins.get( 'TableUtils' ).getRows( table );\n\t* ```\n\t*\n\t* @param table The table to analyze.\n\t*/\n\tgetRows(table) {\n\t\treturn Array.from(table.getChildren()).reduce((rowCount, child) => child.is(\"element\", \"tableRow\") ? rowCount + 1 : rowCount, 0);\n\t}\n\t/**\n\t* Creates an instance of the table walker.\n\t*\n\t* The table walker iterates internally by traversing the table from row index = 0 and column index = 0.\n\t* It walks row by row and column by column in order to output values defined in the options.\n\t* By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,\n\t* pass the `includeAllSlots` option.\n\t*\n\t* @internal\n\t* @param table A table over which the walker iterates.\n\t* @param options An object with configuration.\n\t*/\n\tcreateTableWalker(table, options = {}) {\n\t\treturn new TableWalker(table, options);\n\t}\n\t/**\n\t* Returns all model table cells that are fully selected (from the outside)\n\t* within the provided model selection's ranges.\n\t*\n\t* To obtain the cells selected from the inside, use\n\t* {@link #getTableCellsContainingSelection}.\n\t*/\n\tgetSelectedTableCells(selection) {\n\t\tconst cells = [];\n\t\tfor (const range of this.sortRanges(selection.getRanges())) {\n\t\t\tconst element = range.getContainedElement();\n\t\t\tif (element && element.is(\"element\", \"tableCell\")) cells.push(element);\n\t\t}\n\t\treturn cells;\n\t}\n\t/**\n\t* Sets the number of footer rows for the given `table`.\n\t*\n\t* * If number of footer rows is greater than the number of rows in the table, it will be truncated to the number of rows.\n\t* * If footer rows and heading rows overlap, the number of heading rows will be adjusted\n\t*\n\t* It'll have no effect if {@link module:table/tableconfig~TableConfig#enableFooters `table.enableFooters`} is set to `false`.\n\t*\n\t* @param writer The model writer.\n\t* @param table The table model element.\n\t* @param footerRows The number of footer rows to set.\n\t*/\n\tsetFooterRowsCount(writer, table, footerRows) {\n\t\tif (!this.editor.config.get(\"table.enableFooters\")) return;\n\t\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\tconst totalRows = this.getRows(table);\n\t\tconst truncatedFooterRows = Math.min(footerRows, totalRows);\n\t\tupdateNumericAttribute(\"footerRows\", truncatedFooterRows, table, writer, 0);\n\t\tif (headingRows + truncatedFooterRows > totalRows) {\n\t\t\tconst newHeadingRows = totalRows - truncatedFooterRows;\n\t\t\tthis.setHeadingRowsCount(writer, table, newHeadingRows);\n\t\t}\n\t}\n\t/**\n\t* Sets the number of heading rows for the given `table`.\n\t*\n\t* If number of heading rows is greater than the number of rows in the table,\n\t* it will be truncated to the number of rows.\n\t*\n\t* @param writer The model writer.\n\t* @param table The table model element.\n\t* @param headingRows The number of heading rows to set.\n\t* @param options Additional options.\n\t* @param options.updateCellType If set to `false` it will only update the `headingRows` attribute\n\t* without updating the cell types in the table. Default is `true`.\n\t* @param options.resetFormerHeadingCells If set to `true`, it will check if the rows that are no longer in the heading section\n\t* should be updated to body cells. Default is `true`.\n\t* @param options.autoExpand If set to `true`, it will check if the following rows look like a header and expand the heading section.\n\t* Default is `true`.\n\t*/\n\tsetHeadingRowsCount(writer, table, headingRows, options = {}) {\n\t\tconst { updateCellType = true, resetFormerHeadingCells = true, autoExpand = true } = options;\n\t\tconst totalRows = this.getRows(table);\n\t\tconst scopedHeaders = !!this.editor.config.get(\"table.tableCellProperties.scopedHeaders\");\n\t\tconst oldHeadingRows = table.getAttribute(\"headingRows\") || 0;\n\t\tlet truncatedHeadingRows = Math.min(headingRows, totalRows);\n\t\tif (truncatedHeadingRows === oldHeadingRows) return;\n\t\tupdateNumericAttribute(\"headingRows\", truncatedHeadingRows, table, writer, 0);\n\t\tconst footerRows = table.getAttribute(\"footerRows\") || 0;\n\t\tif (truncatedHeadingRows + footerRows > totalRows) {\n\t\t\tconst newFooterRows = totalRows - truncatedHeadingRows;\n\t\t\tthis.setFooterRowsCount(writer, table, newFooterRows);\n\t\t}\n\t\tif (!isTableCellTypeEnabled(this.editor)) return;\n\t\tif (updateCellType) {\n\t\t\tfor (const { cell, row, column } of new TableWalker(table, { endRow: truncatedHeadingRows - 1 })) updateTableCellType({\n\t\t\t\ttable,\n\t\t\t\twriter,\n\t\t\t\tcell,\n\t\t\t\trow,\n\t\t\t\tcolumn,\n\t\t\t\tscopedHeaders\n\t\t\t});\n\t\t\tif (resetFormerHeadingCells && truncatedHeadingRows < oldHeadingRows) for (let row = truncatedHeadingRows; row < oldHeadingRows; row++) {\n\t\t\t\tif (!isEntireCellsLineHeader({\n\t\t\t\t\ttable,\n\t\t\t\t\trow\n\t\t\t\t})) break;\n\t\t\t\tfor (const { cell, row: cellRow, column } of new TableWalker(table, { row })) updateTableCellType({\n\t\t\t\t\ttable,\n\t\t\t\t\twriter,\n\t\t\t\t\tcell,\n\t\t\t\t\trow: cellRow,\n\t\t\t\t\tcolumn,\n\t\t\t\t\tscopedHeaders\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (autoExpand && truncatedHeadingRows > oldHeadingRows) {\n\t\t\twhile (truncatedHeadingRows < totalRows && isEntireCellsLineHeader({\n\t\t\t\ttable,\n\t\t\t\trow: truncatedHeadingRows\n\t\t\t})) truncatedHeadingRows++;\n\t\t\tupdateNumericAttribute(\"headingRows\", truncatedHeadingRows, table, writer, 0);\n\t\t}\n\t}\n\t/**\n\t* Sets the number of heading columns for the given `table`.\n\t*\n\t* If number of heading columns is greater than the number of columns in the table,\n\t* it will be truncated to the number of columns.\n\t*\n\t* @param writer The model writer to use.\n\t* @param table The table model element.\n\t* @param headingColumns The number of heading columns to set.\n\t* @param options Additional options.\n\t* @param options.updateCellType If set to `false` it will only update the `headingColumns` attribute\n\t* without updating the cell types in the table. Default is `true`.\n\t* @param options.resetFormerHeadingCells If set to `true`, it will check if the columns that are no longer in the heading section\n\t* should be updated to body cells. Default is `true`.\n\t* @param options.autoExpand If set to `true`, it will check if the following columns look like a header and expand the heading section.\n\t* Default is `true`.\n\t*/\n\tsetHeadingColumnsCount(writer, table, headingColumns, options = {}) {\n\t\tconst { updateCellType = true, resetFormerHeadingCells = true, autoExpand = true } = options;\n\t\tconst totalColumns = this.getColumns(table);\n\t\tconst oldHeadingColumns = table.getAttribute(\"headingColumns\") || 0;\n\t\tconst scopedHeaders = !!this.editor.config.get(\"table.tableCellProperties.scopedHeaders\");\n\t\tlet truncatedHeadingColumns = Math.min(headingColumns, totalColumns);\n\t\tif (truncatedHeadingColumns === oldHeadingColumns) return;\n\t\tupdateNumericAttribute(\"headingColumns\", truncatedHeadingColumns, table, writer, 0);\n\t\tif (!isTableCellTypeEnabled(this.editor)) return;\n\t\tif (updateCellType) {\n\t\t\tfor (const { cell, row, column } of new TableWalker(table, { endColumn: truncatedHeadingColumns - 1 })) updateTableCellType({\n\t\t\t\ttable,\n\t\t\t\twriter,\n\t\t\t\tcell,\n\t\t\t\trow,\n\t\t\t\tcolumn,\n\t\t\t\tscopedHeaders\n\t\t\t});\n\t\t\tif (resetFormerHeadingCells && truncatedHeadingColumns < oldHeadingColumns) for (let column = truncatedHeadingColumns; column < oldHeadingColumns; column++) {\n\t\t\t\tif (!isEntireCellsLineHeader({\n\t\t\t\t\ttable,\n\t\t\t\t\tcolumn\n\t\t\t\t})) break;\n\t\t\t\tfor (const { cell, row, column: cellColumn } of new TableWalker(table, { column })) updateTableCellType({\n\t\t\t\t\ttable,\n\t\t\t\t\twriter,\n\t\t\t\t\tcell,\n\t\t\t\t\trow,\n\t\t\t\t\tcolumn: cellColumn,\n\t\t\t\t\tscopedHeaders\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (autoExpand && truncatedHeadingColumns > oldHeadingColumns) {\n\t\t\twhile (truncatedHeadingColumns < totalColumns && isEntireCellsLineHeader({\n\t\t\t\ttable,\n\t\t\t\tcolumn: truncatedHeadingColumns\n\t\t\t})) truncatedHeadingColumns++;\n\t\t\tupdateNumericAttribute(\"headingColumns\", truncatedHeadingColumns, table, writer, 0);\n\t\t}\n\t}\n\t/**\n\t* Returns all model table cells that the provided model selection's ranges\n\t* {@link module:engine/model/range~ModelRange#start} inside.\n\t*\n\t* To obtain the cells selected from the outside, use\n\t* {@link #getSelectedTableCells}.\n\t*/\n\tgetTableCellsContainingSelection(selection) {\n\t\tconst cells = [];\n\t\tfor (const range of selection.getRanges()) {\n\t\t\tconst cellWithSelection = range.start.findAncestor(\"tableCell\");\n\t\t\tif (cellWithSelection) cells.push(cellWithSelection);\n\t\t}\n\t\treturn cells;\n\t}\n\t/**\n\t* Returns all model table cells that are either completely selected\n\t* by selection ranges or host selection range\n\t* {@link module:engine/model/range~ModelRange#start start positions} inside them.\n\t*\n\t* Combines {@link #getTableCellsContainingSelection} and\n\t* {@link #getSelectedTableCells}.\n\t*/\n\tgetSelectionAffectedTableCells(selection) {\n\t\tconst selectedCells = this.getSelectedTableCells(selection);\n\t\tif (selectedCells.length) return selectedCells;\n\t\treturn this.getTableCellsContainingSelection(selection);\n\t}\n\t/**\n\t* Returns an object with the `first` and `last` row index contained in the given `tableCells`.\n\t*\n\t* ```ts\n\t* const selectedTableCells = getSelectedTableCells( editor.model.document.selection );\n\t*\n\t* const { first, last } = getRowIndexes( selectedTableCells );\n\t*\n\t* console.log( `Selected rows: ${ first } to ${ last }` );\n\t* ```\n\t*\n\t* @returns Returns an object with the `first` and `last` table row indexes.\n\t*/\n\tgetRowIndexes(tableCells) {\n\t\tconst indexes = tableCells.map((cell) => cell.parent.index);\n\t\treturn this._getFirstLastIndexesObject(indexes);\n\t}\n\t/**\n\t* Returns an object with the `first` and `last` column index contained in the given `tableCells`.\n\t*\n\t* ```ts\n\t* const selectedTableCells = getSelectedTableCells( editor.model.document.selection );\n\t*\n\t* const { first, last } = getColumnIndexes( selectedTableCells );\n\t*\n\t* console.log( `Selected columns: ${ first } to ${ last }` );\n\t* ```\n\t*\n\t* @returns Returns an object with the `first` and `last` table column indexes.\n\t*/\n\tgetColumnIndexes(tableCells) {\n\t\tconst table = tableCells[0].findAncestor(\"table\");\n\t\tconst indexes = [...new TableWalker(table)].filter((entry) => tableCells.includes(entry.cell)).map((entry) => entry.column);\n\t\treturn this._getFirstLastIndexesObject(indexes);\n\t}\n\t/**\n\t* Checks if the selection contains cells that do not exceed rectangular selection.\n\t*\n\t* In a table below:\n\t*\n\t*  ┌───┬───┬───┬───┐\n\t*  │ a │ b │ c │ d │\n\t*  ├───┴───┼───┤   │\n\t*  │ e     │ f │   │\n\t*  │       ├───┼───┤\n\t*  │       │ g │ h │\n\t*  └───────┴───┴───┘\n\t*\n\t* Valid selections are these which create a solid rectangle (without gaps), such as:\n\t*   - a, b (two horizontal cells)\n\t*   - c, f (two vertical cells)\n\t*   - a, b, e (cell \"e\" spans over four cells)\n\t*   - c, d, f (cell d spans over a cell in the row below)\n\t*\n\t* While an invalid selection would be:\n\t*   - a, c (the unselected cell \"b\" creates a gap)\n\t*   - f, g, h (cell \"d\" spans over a cell from the row of \"f\" cell - thus creates a gap)\n\t*/\n\tisSelectionRectangular(selectedTableCells) {\n\t\tif (selectedTableCells.length < 2 || !this._areCellInTheSameTableSection(selectedTableCells)) return false;\n\t\tconst rows = /* @__PURE__ */ new Set();\n\t\tconst columns = /* @__PURE__ */ new Set();\n\t\tlet areaOfSelectedCells = 0;\n\t\tfor (const tableCell of selectedTableCells) {\n\t\t\tconst { row, column } = this.getCellLocation(tableCell);\n\t\t\tconst rowspan = parseInt(tableCell.getAttribute(\"rowspan\")) || 1;\n\t\t\tconst colspan = parseInt(tableCell.getAttribute(\"colspan\")) || 1;\n\t\t\trows.add(row);\n\t\t\tcolumns.add(column);\n\t\t\tif (rowspan > 1) rows.add(row + rowspan - 1);\n\t\t\tif (colspan > 1) columns.add(column + colspan - 1);\n\t\t\tareaOfSelectedCells += rowspan * colspan;\n\t\t}\n\t\treturn getBiggestRectangleArea(rows, columns) == areaOfSelectedCells;\n\t}\n\t/**\n\t* Returns array of sorted ranges.\n\t*/\n\tsortRanges(ranges) {\n\t\treturn Array.from(ranges).sort(compareRangeOrder);\n\t}\n\t/**\n\t* Helper method to get an object with `first` and `last` indexes from an unsorted array of indexes.\n\t*/\n\t_getFirstLastIndexesObject(indexes) {\n\t\tconst allIndexesSorted = indexes.sort((indexA, indexB) => indexA - indexB);\n\t\treturn {\n\t\t\tfirst: allIndexesSorted[0],\n\t\t\tlast: allIndexesSorted[allIndexesSorted.length - 1]\n\t\t};\n\t}\n\t/**\n\t* Checks if the selection does not mix a header (column or row) with other cells.\n\t*\n\t* For instance, in the table below valid selections consist of cells with the same letter only.\n\t* So, a-a (same heading row and column) or d-d (body cells) are valid while c-d or a-b are not.\n\t*\n\t* header columns\n\t*    ↓   ↓\n\t*  ┌───┬───┬───┬───┐\n\t*  │ a │ a │ b │ b │  ← header row\n\t*  ├───┼───┼───┼───┤\n\t*  │ c │ c │ d │ d │\n\t*  ├───┼───┼───┼───┤\n\t*  │ c │ c │ d │ d │\n\t*  └───┴───┴───┴───┘\n\t*/\n\t_areCellInTheSameTableSection(tableCells) {\n\t\tconst table = tableCells[0].findAncestor(\"table\");\n\t\tconst totalRows = this.getRows(table);\n\t\tconst rowIndexes = this.getRowIndexes(tableCells);\n\t\tconst headingRows = parseInt(table.getAttribute(\"headingRows\")) || 0;\n\t\tconst footerRows = parseInt(table.getAttribute(\"footerRows\")) || 0;\n\t\tif (!this._areIndexesInSameHeadingSection(rowIndexes, headingRows) || !this._areIndexesInSameFooterSection(rowIndexes, totalRows, footerRows)) return false;\n\t\tconst columnIndexes = this.getColumnIndexes(tableCells);\n\t\tconst headingColumns = parseInt(table.getAttribute(\"headingColumns\")) || 0;\n\t\treturn this._areIndexesInSameHeadingSection(columnIndexes, headingColumns);\n\t}\n\t/**\n\t* Unified check if table rows/columns indexes are in the same heading/body section.\n\t*/\n\t_areIndexesInSameHeadingSection({ first, last }, headingSectionSize) {\n\t\treturn first < headingSectionSize === last < headingSectionSize;\n\t}\n\t/**\n\t* Unified check if table rows indexes are in the same footer/body section.\n\t*/\n\t_areIndexesInSameFooterSection({ first, last }, totalRows, footerRows) {\n\t\tconst footerStartIndex = totalRows - footerRows;\n\t\treturn first >= footerStartIndex === last >= footerStartIndex;\n\t}\n};\n/**\n* Creates empty rows at the given index in an existing table.\n*\n* @param insertAt The row index of row insertion.\n* @param rows The number of rows to create.\n* @param tableCellToInsert The number of cells to insert in each row.\n*/\nfunction createEmptyRows(writer, table, insertAt, rows, tableCellToInsert, attributes = {}) {\n\tconst insertedRows = [];\n\tfor (let i = 0; i < rows; i++) {\n\t\tconst tableRow = writer.createElement(\"tableRow\");\n\t\twriter.insert(tableRow, table, insertAt);\n\t\tinsertedRows.push(createCells(tableCellToInsert, writer, writer.createPositionAt(tableRow, \"end\"), attributes));\n\t}\n\treturn insertedRows;\n}\n/**\n* Creates cells at a given position.\n*\n* @param cells The number of cells to create\n*/\nfunction createCells(cells, writer, insertPosition, attributes = {}) {\n\tconst createdCells = [];\n\tlet currentPosition = insertPosition;\n\tfor (let i = 0; i < cells; i++) {\n\t\tconst cell = createEmptyTableCell(writer, currentPosition, attributes);\n\t\tcreatedCells.push(cell);\n\t\tcurrentPosition = writer.createPositionAfter(cell);\n\t}\n\treturn createdCells;\n}\n/**\n* Evenly distributes the span of a cell to a number of provided cells.\n* The resulting spans will always be integer values.\n*\n* For instance breaking a span of 7 into 3 cells will return:\n*\n* ```ts\n* { newCellsSpan: 2, updatedSpan: 3 }\n* ```\n*\n* as two cells will have a span of 2 and the remainder will go the first cell so its span will change to 3.\n*\n* @param span The span value do break.\n* @param numberOfCells The number of resulting spans.\n*/\nfunction breakSpanEvenly(span, numberOfCells) {\n\tif (span < numberOfCells) return {\n\t\tnewCellsSpan: 1,\n\t\tupdatedSpan: 1\n\t};\n\tconst newCellsSpan = Math.floor(span / numberOfCells);\n\treturn {\n\t\tnewCellsSpan,\n\t\tupdatedSpan: span - newCellsSpan * numberOfCells + newCellsSpan\n\t};\n}\n/**\n* Updates heading columns attribute if removing a row from head section.\n*/\nfunction adjustHeadingColumns(table, removedColumnIndexes, writer) {\n\tconst headingColumns = table.getAttribute(\"headingColumns\") || 0;\n\tif (headingColumns && removedColumnIndexes.first < headingColumns) {\n\t\tconst headingsRemoved = Math.min(headingColumns - 1, removedColumnIndexes.last) - removedColumnIndexes.first + 1;\n\t\twriter.setAttribute(\"headingColumns\", headingColumns - headingsRemoved, table);\n\t}\n}\n/**\n* Calculates a new heading rows value for removing rows from heading section.\n*/\nfunction updateHeadingRows(table, { first, last }, writer) {\n\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\tif (first < headingRows) {\n\t\tconst newRows = last < headingRows ? headingRows - (last - first + 1) : first;\n\t\tupdateNumericAttribute(\"headingRows\", newRows, table, writer, 0);\n\t}\n}\n/**\n* Calculates a new footer rows value for removing rows from footer section.\n*/\nfunction updateFooterRows(table, totalRows, { first, last }, writer) {\n\tif (!table.hasAttribute(\"footerRows\")) return;\n\tconst footerRows = table.getAttribute(\"footerRows\");\n\tconst footerIndex = totalRows - footerRows;\n\tif (last >= footerIndex) {\n\t\tconst newRows = first >= footerIndex ? footerRows - (last - first + 1) : totalRows - 1 - last;\n\t\tupdateNumericAttribute(\"footerRows\", newRows, table, writer, 0);\n\t}\n}\n/**\n* Finds cells that will be:\n* - trimmed - Cells that are \"above\" removed rows sections and overlap the removed section - their rowspan must be trimmed.\n* - moved - Cells from removed rows section might stick out of. These cells are moved to the next row after a removed section.\n*\n* Sample table with overlapping & sticking out cells:\n*\n*      +----+----+----+----+----+\n*      | 00 | 01 | 02 | 03 | 04 |\n*      +----+    +    +    +    +\n*      | 10 |    |    |    |    |\n*      +----+----+    +    +    +\n*      | 20 | 21 |    |    |    | <-- removed row\n*      +    +    +----+    +    +\n*      |    |    | 32 |    |    | <-- removed row\n*      +----+    +    +----+    +\n*      | 40 |    |    | 43 |    |\n*      +----+----+----+----+----+\n*\n* In a table above:\n* - cells to trim: '02', '03' & '04'.\n* - cells to move: '21' & '32'.\n*/\nfunction getCellsToMoveAndTrimOnRemoveRow(table, { first, last }) {\n\tconst cellsToMove = /* @__PURE__ */ new Map();\n\tconst cellsToTrim = [];\n\tfor (const { row, column, cellHeight, cell } of new TableWalker(table, { endRow: last })) {\n\t\tconst lastRowOfCell = row + cellHeight - 1;\n\t\tif (row >= first && row <= last && lastRowOfCell > last) {\n\t\t\tconst rowSpanToSet = cellHeight - (last - row + 1);\n\t\t\tcellsToMove.set(column, {\n\t\t\t\tcell,\n\t\t\t\trowspan: rowSpanToSet\n\t\t\t});\n\t\t}\n\t\tif (row < first && lastRowOfCell >= first) {\n\t\t\tlet rowspanAdjustment;\n\t\t\tif (lastRowOfCell >= last) rowspanAdjustment = last - first + 1;\n\t\t\telse rowspanAdjustment = lastRowOfCell - first + 1;\n\t\t\tcellsToTrim.push({\n\t\t\t\tcell,\n\t\t\t\trowspan: cellHeight - rowspanAdjustment\n\t\t\t});\n\t\t}\n\t}\n\treturn {\n\t\tcellsToMove,\n\t\tcellsToTrim\n\t};\n}\nfunction moveCellsToRow(table, targetRowIndex, cellsToMove, writer) {\n\tconst tableRowMap = [...new TableWalker(table, {\n\t\tincludeAllSlots: true,\n\t\trow: targetRowIndex\n\t})];\n\tconst row = table.getChild(targetRowIndex);\n\tlet previousCell;\n\tfor (const { column, cell, isAnchor } of tableRowMap) if (cellsToMove.has(column)) {\n\t\tconst { cell: cellToMove, rowspan } = cellsToMove.get(column);\n\t\tconst targetPosition = previousCell ? writer.createPositionAfter(previousCell) : writer.createPositionAt(row, 0);\n\t\twriter.move(writer.createRangeOn(cellToMove), targetPosition);\n\t\tupdateNumericAttribute(\"rowspan\", rowspan, cellToMove, writer);\n\t\tpreviousCell = cellToMove;\n\t} else if (isAnchor) previousCell = cell;\n}\nfunction compareRangeOrder(rangeA, rangeB) {\n\tconst posA = rangeA.start;\n\tconst posB = rangeB.start;\n\treturn posA.isBefore(posB) ? -1 : 1;\n}\n/**\n* Calculates the area of a maximum rectangle that can span over the provided row & column indexes.\n*/\nfunction getBiggestRectangleArea(rows, columns) {\n\tconst rowsIndexes = Array.from(rows.values());\n\tconst columnIndexes = Array.from(columns.values());\n\tconst lastRow = Math.max(...rowsIndexes);\n\tconst firstRow = Math.min(...rowsIndexes);\n\tconst lastColumn = Math.max(...columnIndexes);\n\tconst firstColumn = Math.min(...columnIndexes);\n\treturn (lastRow - firstRow + 1) * (lastColumn - firstColumn + 1);\n}\n/**\n* Updates the `tableCellType` attribute of a table cell based on its position in the table\n* and the table's `headingRows` and `headingColumns` attributes.\n*/\nfunction updateTableCellType({ writer, table, row, column, cell, scopedHeaders }) {\n\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\tconst headingColumns = table.getAttribute(\"headingColumns\") || 0;\n\tif (row >= headingRows && column >= headingColumns) {\n\t\twriter.removeAttribute(\"tableCellType\", cell);\n\t\treturn;\n\t}\n\tlet headerCellType = \"header\";\n\tif (scopedHeaders) {\n\t\tif (row < headingRows) headerCellType = \"header-column\";\n\t\telse headerCellType = \"header-row\";\n\t}\n\twriter.setAttribute(\"tableCellType\", headerCellType, cell);\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* Returns a string if all four values of box sides are equal.\n*\n* If a string is passed, it is treated as a single value (pass-through).\n*\n* ```ts\n* // Returns 'foo':\n* getSingleValue( { top: 'foo', right: 'foo', bottom: 'foo', left: 'foo' } );\n* getSingleValue( 'foo' );\n*\n* // Returns undefined:\n* getSingleValue( { top: 'foo', right: 'foo', bottom: 'bar', left: 'foo' } );\n* getSingleValue( { top: 'foo', right: 'foo' } );\n* ```\n*\n* @internal\n*/\nfunction getSingleValue(objectOrString) {\n\tif (!objectOrString || !isObject(objectOrString)) return objectOrString;\n\tconst { top, right, bottom, left } = objectOrString;\n\tif (top == right && right == bottom && bottom == left) return top;\n}\n/**\n* Adds a unit to a value if the value is a number or a string representing a number.\n*\n* **Note**: It does nothing to non-numeric values.\n*\n* ```ts\n* getSingleValue( 25, 'px' ); // '25px'\n* getSingleValue( 25, 'em' ); // '25em'\n* getSingleValue( '25em', 'px' ); // '25em'\n* getSingleValue( 'foo', 'px' ); // 'foo'\n* ```\n*\n* @internal\n* @param defaultUnit A default unit added to a numeric value.\n*/\nfunction addDefaultUnitToNumericValue(value, defaultUnit) {\n\tconst numericValue = parseFloat(value);\n\tif (Number.isNaN(numericValue)) return value;\n\tif (String(numericValue) !== String(value)) return value;\n\treturn `${numericValue}${defaultUnit}`;\n}\n/**\n* Returns the normalized configuration.\n*\n* @internal\n* @param config The configuration to normalize.\n* @param options Options used to determine which properties should be added.\n*/\nfunction getNormalizedDefaultProperties(config, options = {}) {\n\tconst normalizedConfig = {\n\t\tborderStyle: \"none\",\n\t\tborderWidth: \"\",\n\t\tborderColor: \"\",\n\t\tbackgroundColor: \"\",\n\t\twidth: \"\",\n\t\theight: \"\",\n\t\t...config\n\t};\n\tif (options.includeAlignmentProperty && !normalizedConfig.alignment) normalizedConfig.alignment = \"center\";\n\tif (options.includePaddingProperty && !normalizedConfig.padding) normalizedConfig.padding = \"\";\n\tif (options.includeVerticalAlignmentProperty && !normalizedConfig.verticalAlignment) normalizedConfig.verticalAlignment = \"middle\";\n\tif (options.includeHorizontalAlignmentProperty && !normalizedConfig.horizontalAlignment) normalizedConfig.horizontalAlignment = options.isRightToLeftContent ? \"right\" : \"left\";\n\treturn normalizedConfig;\n}\n/**\n* Returns the normalized default table properties.\n*\n* @internal\n* @param config The configuration to normalize.\n* @param options Options used to determine which properties should be added.\n*/\nfunction getNormalizedDefaultTableProperties(config, options) {\n\treturn getNormalizedDefaultProperties({\n\t\tborderStyle: \"double\",\n\t\tborderColor: \"hsl(0, 0%, 70%)\",\n\t\tborderWidth: \"1px\",\n\t\t...config\n\t}, options);\n}\n/**\n* Returns the normalized default cell properties.\n*\n* @internal\n* @param config The configuration to normalize.\n* @param options Options used to determine which properties should be added.\n*/\nfunction getNormalizedDefaultCellProperties(config, options) {\n\treturn getNormalizedDefaultProperties({\n\t\tborderStyle: \"solid\",\n\t\tborderColor: \"hsl(0, 0%, 75%)\",\n\t\tborderWidth: \"1px\",\n\t\t...config\n\t}, options);\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* Model table element to view table element conversion helper.\n*\n* @internal\n*/\nfunction downcastTable(tableUtils, options) {\n\treturn (table, { writer }) => {\n\t\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\tconst footerRows = table.getAttribute(\"footerRows\") || 0;\n\t\tconst tableElement = writer.createContainerElement(\"table\", null, []);\n\t\tconst figureElement = writer.createContainerElement(\"figure\", { class: \"table\" }, tableElement);\n\t\tconst totalRows = tableUtils.getRows(table);\n\t\tif (headingRows > 0) writer.insert(writer.createPositionAt(tableElement, \"end\"), writer.createContainerElement(\"thead\", null, writer.createSlot((element) => element.is(\"element\", \"tableRow\") && element.index < headingRows)));\n\t\tif (headingRows + footerRows < totalRows) writer.insert(writer.createPositionAt(tableElement, \"end\"), writer.createContainerElement(\"tbody\", null, writer.createSlot((element) => element.is(\"element\", \"tableRow\") && element.index >= headingRows && element.index < totalRows - footerRows)));\n\t\tif (footerRows > 0) writer.insert(writer.createPositionAt(tableElement, \"end\"), writer.createContainerElement(\"tfoot\", null, writer.createSlot((element) => element.is(\"element\", \"tableRow\") && element.index >= totalRows - footerRows)));\n\t\tfor (const { positionOffset, filter } of options.additionalSlots) writer.insert(writer.createPositionAt(tableElement, positionOffset), writer.createSlot(filter));\n\t\twriter.insert(writer.createPositionAt(tableElement, \"after\"), writer.createSlot((element) => {\n\t\t\tif (element.is(\"element\", \"tableRow\")) return false;\n\t\t\treturn !options.additionalSlots.some(({ filter }) => filter(element));\n\t\t}));\n\t\treturn options.asWidget ? toTableWidget(figureElement, writer) : figureElement;\n\t};\n}\n/**\n* Model table row element to view `<tr>` element conversion helper.\n*\n* @internal\n* @returns Element creator.\n*/\nfunction downcastRow() {\n\treturn (tableRow, { writer }) => {\n\t\treturn tableRow.isEmpty ? writer.createEmptyElement(\"tr\") : writer.createContainerElement(\"tr\");\n\t};\n}\n/**\n* Model table cell element to view `<td>` or `<th>` element conversion helper.\n*\n* This conversion helper will create proper `<th>` elements for table cells that are in the heading section (heading row or column)\n* and `<td>` otherwise.\n*\n* @internal\n* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.\n* @param options.cellTypeEnabled If returns `true`, the downcast conversion will use the `tableCellType` attribute to determine cell type.\n* @returns Element creator.\n*/\nfunction downcastCell(options) {\n\treturn (tableCell, { writer }) => {\n\t\tif (options.cellTypeEnabled?.()) {\n\t\t\tconst tableCellType = tableCell.getAttribute(\"tableCellType\");\n\t\t\treturn createCellElement(writer, isTableHeaderCellType(tableCellType) ? \"th\" : \"td\");\n\t\t}\n\t\tconst tableRow = tableCell.parent;\n\t\tconst table = tableRow.parent;\n\t\tconst rowIndex = table.getChildIndex(tableRow);\n\t\tconst tableWalker = new TableWalker(table, { row: rowIndex });\n\t\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\tconst headingColumns = table.getAttribute(\"headingColumns\") || 0;\n\t\tlet result = null;\n\t\tfor (const tableSlot of tableWalker) if (tableSlot.cell == tableCell) {\n\t\t\tresult = createCellElement(writer, tableSlot.row < headingRows || tableSlot.column < headingColumns ? \"th\" : \"td\");\n\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t};\n\tfunction createCellElement(writer, name) {\n\t\treturn options.asWidget ? toWidgetEditable(writer.createEditableElement(name), writer, { withAriaRole: false }) : writer.createContainerElement(name);\n\t}\n}\n/**\n* Overrides paragraph inside table cell conversion.\n*\n* This converter:\n* * should be used to override default paragraph conversion.\n* * It will only convert `<paragraph>` placed directly inside `<tableCell>`.\n* * For a single paragraph without attributes it returns `<span>` to simulate data table.\n* * For all other cases it returns `<p>` element.\n*\n* @internal\n* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.\n* @returns Element creator.\n*/\nfunction convertParagraphInTableCell(options = {}) {\n\treturn (modelElement, { writer }) => {\n\t\tif (!modelElement.parent.is(\"element\", \"tableCell\")) return null;\n\t\tif (!isSingleParagraphWithoutAttributes(modelElement)) return null;\n\t\tif (options.asWidget) return writer.createContainerElement(\"span\", { class: \"ck-table-bogus-paragraph\" });\n\t\telse {\n\t\t\tconst viewElement = writer.createContainerElement(\"p\");\n\t\t\twriter.setCustomProperty(\"dataPipeline:transparentRendering\", true, viewElement);\n\t\t\treturn viewElement;\n\t\t}\n\t};\n}\n/**\n* Checks if given model `<paragraph>` is an only child of a parent (`<tableCell>`) and if it has any attribute set.\n*\n* The paragraph should be converted in the editing view to:\n*\n* * If returned `true` - to a `<span class=\"ck-table-bogus-paragraph\">`\n* * If returned `false` - to a `<p>`\n*\n* @internal\n*/\nfunction isSingleParagraphWithoutAttributes(modelElement) {\n\treturn modelElement.parent.childCount == 1 && !hasAnyAttribute(modelElement);\n}\n/**\n* Converts a given {@link module:engine/view/element~ViewElement} to a table widget:\n* * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}\n* allowing to recognize the table widget element.\n* * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n*\n* @param writer An instance of the view writer.\n* @param label The element's label. It will be concatenated with the table `alt` attribute if one is present.\n*/\nfunction toTableWidget(viewElement, writer) {\n\twriter.setCustomProperty(\"table\", true, viewElement);\n\treturn toWidget(viewElement, writer, { hasSelectionHandle: true });\n}\n/**\n* Checks if an element has any attributes set.\n*/\nfunction hasAnyAttribute(element) {\n\tfor (const attributeKey of element.getAttributeKeys()) {\n\t\tif (attributeKey.startsWith(\"selection:\") || attributeKey == \"htmlEmptyBlock\") continue;\n\t\treturn true;\n\t}\n\treturn false;\n}\n/**\n* Downcasts a plain table (also used in the clipboard pipeline).\n*/\nfunction convertPlainTable(editor) {\n\treturn (table, conversionApi) => {\n\t\tconst hasPlainTableOutput = editor.plugins.has(\"PlainTableOutput\");\n\t\tconst isClipboardPipeline = conversionApi.options.isClipboardPipeline;\n\t\tconst stripFigureTagWithLayoutTable = shouldStripFigureTagWithLayoutTable(editor, table);\n\t\tif (hasPlainTableOutput || stripFigureTagWithLayoutTable || isClipboardPipeline) return downcastPlainTable(table, conversionApi, editor);\n\t\treturn null;\n\t};\n}\n/**\n* Downcasts a plain table caption (also used in the clipboard pipeline).\n*/\nfunction convertPlainTableCaption(editor) {\n\treturn (modelElement, { writer, options }) => {\n\t\tconst hasPlainTableOutput = editor.plugins.has(\"PlainTableOutput\");\n\t\tconst isClipboardPipeline = options.isClipboardPipeline;\n\t\tconst stripFigureTagWithLayoutTable = shouldStripFigureTagWithLayoutTable(editor, modelElement);\n\t\tif (!(hasPlainTableOutput || stripFigureTagWithLayoutTable || isClipboardPipeline)) return null;\n\t\tif (modelElement.parent.name === \"table\") return writer.createContainerElement(\"caption\");\n\t\treturn null;\n\t};\n}\n/**\n* Downcasts a plain table.\n*\n* @param table Table model element.\n* @param conversionApi The conversion API object.\n* @param editor The editor instance.\n* @returns Created element.\n*/\nfunction downcastPlainTable(table, conversionApi, editor) {\n\tconst tableUtils = editor.plugins.get(TableUtils);\n\tconst writer = conversionApi.writer;\n\tconst totalRows = tableUtils.getRows(table);\n\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\tconst footerRows = table.getAttribute(\"footerRows\") || 0;\n\tconst footerIndex = totalRows - footerRows;\n\tconst headRowsSlot = writer.createSlot((element) => element.is(\"element\", \"tableRow\") && element.index < headingRows);\n\tconst bodyRowsSlot = writer.createSlot((element) => element.is(\"element\", \"tableRow\") && element.index >= headingRows && element.index < footerIndex);\n\tconst footerRowsSlot = writer.createSlot((element) => element.is(\"element\", \"tableRow\") && element.index >= footerIndex);\n\tconst childrenSlot = writer.createSlot((element) => !element.is(\"element\", \"tableRow\"));\n\tconst theadElement = writer.createContainerElement(\"thead\", null, headRowsSlot);\n\tconst tbodyElement = writer.createContainerElement(\"tbody\", null, bodyRowsSlot);\n\tconst tfootElement = writer.createContainerElement(\"tfoot\", null, footerRowsSlot);\n\tconst tableContentElements = [];\n\tif (headingRows) tableContentElements.push(theadElement);\n\tif (headingRows + footerRows < totalRows) tableContentElements.push(tbodyElement);\n\tif (footerRows) tableContentElements.push(tfootElement);\n\tconst tableAttributes = { class: \"table\" };\n\tif (editor.plugins.has(\"TablePropertiesEditing\") && conversionApi.options.isClipboardPipeline) {\n\t\tconst defaultTableProperties = getNormalizedDefaultTableProperties(editor.config.get(\"table.tableProperties.defaultProperties\"), { includeAlignmentProperty: true });\n\t\tconst tableAlignment = table.getAttribute(\"tableAlignment\");\n\t\tlet localDefaultValue = defaultTableProperties.alignment;\n\t\tif (table.getAttribute(\"tableType\") === \"layout\") localDefaultValue = \"\";\n\t\tconst tableAlignmentValue = tableAlignment || localDefaultValue;\n\t\tif (tableAlignmentValue) {\n\t\t\ttableAttributes.class += \" \" + downcastTableAlignmentConfig[tableAlignmentValue].className;\n\t\t\ttableAttributes.style = downcastTableAlignmentConfig[tableAlignmentValue].style;\n\t\t\tif (downcastTableAlignmentConfig[tableAlignmentValue].align !== void 0) tableAttributes.align = downcastTableAlignmentConfig[tableAlignmentValue].align;\n\t\t}\n\t}\n\treturn writer.createContainerElement(\"table\", tableAttributes, [childrenSlot, ...tableContentElements]);\n}\n/**\n* Registers border and background attributes converters for plain tables or when the clipboard pipeline is used.\n*/\nfunction downcastTableBorderAndBackgroundAttributes(editor) {\n\tfor (const [styleName, modelAttribute] of Object.entries({\n\t\t\"border-width\": \"tableBorderWidth\",\n\t\t\"border-color\": \"tableBorderColor\",\n\t\t\"border-style\": \"tableBorderStyle\",\n\t\t\"background-color\": \"tableBackgroundColor\"\n\t})) editor.conversion.for(\"dataDowncast\").add((dispatcher) => {\n\t\treturn dispatcher.on(`attribute:${modelAttribute}:table`, (evt, data, conversionApi) => {\n\t\t\tconst { item, attributeNewValue } = data;\n\t\t\tconst { mapper, writer } = conversionApi;\n\t\t\tconst hasPlainTableOutput = editor.plugins.has(\"PlainTableOutput\");\n\t\t\tconst isClipboardPipeline = conversionApi.options.isClipboardPipeline;\n\t\t\tconst stripFigureTagWithLayoutTable = shouldStripFigureTagWithLayoutTable(editor, item);\n\t\t\tif (!(hasPlainTableOutput || stripFigureTagWithLayoutTable || isClipboardPipeline)) return;\n\t\t\tif (!conversionApi.consumable.consume(item, evt.name)) return;\n\t\t\tconst table = mapper.toViewElement(item);\n\t\t\tif (attributeNewValue) writer.setStyle(styleName, attributeNewValue, table);\n\t\t\telse writer.removeStyle(styleName, table);\n\t\t}, { priority: \"high\" });\n\t});\n}\n/**\n* Returns `true` if the figure tag should be stripped when using layout tables and when `tableType` is `layout`\n* or `stripFigureFromContentTable` option is set to `true`, `false` otherwise.\n*\n* @param editor The editor instance.\n* @param modelElement The model element to check.\n* @returns `true` if the figure tag should be stripped, `false` otherwise.\n*/\nfunction shouldStripFigureTagWithLayoutTable(editor, modelElement) {\n\tconst hasTableLayout = editor.plugins.has(\"TableLayoutEditing\");\n\tconst stripFigureFromContentTable = editor.config.get(\"table.tableLayout.stripFigureFromContentTable\") ?? false;\n\tconst tableType = modelElement.findAncestor(\"table\", { includeSelf: true })?.getAttribute(\"tableType\");\n\treturn hasTableLayout && (stripFigureFromContentTable || tableType === \"layout\");\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 table/commands/inserttablecommand\n*/\n/**\n* The insert table command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTable'` editor command.\n*\n* To insert a table at the current selection, execute the command and specify the dimensions:\n*\n* ```ts\n* editor.execute( 'insertTable', { rows: 20, columns: 5 } );\n* ```\n*/\nvar InsertTableCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tthis.isEnabled = isAllowedInParent$1(selection, schema);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* Inserts a table with the given number of rows and columns into the editor.\n\t*\n\t* @param options.rows The number of rows to create in the inserted table. Default value is 2.\n\t* @param options.columns The number of columns to create in the inserted table. Default value is 2.\n\t* @param options.headingRows The number of heading rows. If not provided it will default to\n\t* {@link module:table/tableconfig~TableConfig#defaultHeadings `config.table.defaultHeadings.rows`} table config.\n\t* @param options.headingColumns The number of heading columns. If not provided it will default to\n\t* {@link module:table/tableconfig~TableConfig#defaultHeadings `config.table.defaultHeadings.columns`} table config.\n\t* @param options.footerRows The number of footer rows. If not provided it will default to\n\t* {@link module:table/tableconfig~TableConfig#defaultFooters `config.table.defaultFooters`} table config.\n\t* This option is ignored when {@link module:table/tableconfig~TableConfig#enableFooters `config.table.enableFooters`} is `false`.\n\t* @param options.inheritTextFormattingAttributes Whether every empty cell should inherit the `copyOnEnter` text\n\t* formatting attributes (e.g. bold, font color) that were uniformly active in the content right before\n\t* the table, so that whichever cell the user starts typing in first continues that formatting. Defaults\n\t* to `true`.\n\t* @fires execute\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst tableUtils = editor.plugins.get(\"TableUtils\");\n\t\tconst areTableFootersEnabled = !!editor.config.get(\"table.enableFooters\");\n\t\tconst defaultRows = editor.config.get(\"table.defaultHeadings.rows\");\n\t\tconst defaultColumns = editor.config.get(\"table.defaultHeadings.columns\");\n\t\tconst defaultFooterRows = editor.config.get(\"table.defaultFooters\");\n\t\tif (options.headingRows === void 0 && defaultRows) options.headingRows = defaultRows;\n\t\tif (options.headingColumns === void 0 && defaultColumns) options.headingColumns = defaultColumns;\n\t\tif (areTableFootersEnabled && options.footerRows === void 0 && defaultFooterRows) options.footerRows = defaultFooterRows;\n\t\tif (!areTableFootersEnabled && \"footerRows\" in options) delete options.footerRows;\n\t\tmodel.change((writer) => {\n\t\t\tconst selectionAttributesToCopy = Array.from(_getCopyOnEnterAttributes(model.schema, selection.getAttributes()));\n\t\t\tconst table = tableUtils.createTable(writer, options);\n\t\t\tmodel.insertObject(table, null, null, { findOptimalPosition: \"auto\" });\n\t\t\twriter.setSelection(writer.createPositionAt(table.getNodeByPath([\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t]), 0));\n\t\t\tif (options.inheritTextFormattingAttributes !== false && selectionAttributesToCopy.length) for (const cellBlock of getEmptyTableCellBlocks(table)) for (const [key, value] of selectionAttributesToCopy) writer.setAttribute(ModelDocumentSelection._getStoreAttributeKey(key), value, cellBlock);\n\t\t});\n\t}\n};\n/**\n* Checks if the table is allowed in the parent.\n*/\nfunction isAllowedInParent$1(selection, schema) {\n\tconst positionParent = selection.getFirstPosition().parent;\n\tconst validParent = positionParent === positionParent.root ? positionParent : positionParent.parent;\n\treturn schema.checkChild(validParent, \"table\");\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 table/commands/insertrowcommand\n*/\n/**\n* The insert row command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTableRowBelow'` and\n* `'insertTableRowAbove'` editor commands.\n*\n* To insert a row below the selected cell, execute the following command:\n*\n* ```ts\n* editor.execute( 'insertTableRowBelow' );\n* ```\n*\n* To insert a row above the selected cell, execute the following command:\n*\n* ```ts\n* editor.execute( 'insertTableRowAbove' );\n* ```\n*/\nvar InsertRowCommand = class extends Command {\n\t/**\n\t* The order of insertion relative to the row in which the caret is located.\n\t*/\n\torder;\n\t/**\n\t* Creates a new `InsertRowCommand` instance.\n\t*\n\t* @param editor The editor on which this command will be used.\n\t* @param options.order The order of insertion relative to the row in which the caret is located.\n\t* Possible values: `\"above\"` and `\"below\"`. Default value is \"below\"\n\t*/\n\tconstructor(editor, options = {}) {\n\t\tsuper(editor);\n\t\tthis.order = options.order || \"below\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst isAnyCellSelected = !!this.editor.plugins.get(\"TableUtils\").getSelectionAffectedTableCells(selection).length;\n\t\tthis.isEnabled = isAnyCellSelected;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* Depending on the command's {@link #order} value, it inserts a row `'below'` or `'above'` the row in which selection is set.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst tableUtils = editor.plugins.get(\"TableUtils\");\n\t\tconst insertAbove = this.order === \"above\";\n\t\tconst affectedTableCells = tableUtils.getSelectionAffectedTableCells(selection);\n\t\tconst rowIndexes = tableUtils.getRowIndexes(affectedTableCells);\n\t\tconst row = insertAbove ? rowIndexes.first : rowIndexes.last;\n\t\tconst table = affectedTableCells[0].findAncestor(\"table\");\n\t\ttableUtils.insertRows(table, {\n\t\t\tat: insertAbove ? row : row + 1,\n\t\t\tcopyStructureFromAbove: !insertAbove\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 table/commands/insertcolumncommand\n*/\n/**\n* The insert column command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTableColumnLeft'` and\n* `'insertTableColumnRight'` editor commands.\n*\n* To insert a column to the left of the selected cell, execute the following command:\n*\n* ```ts\n* editor.execute( 'insertTableColumnLeft' );\n* ```\n*\n* To insert a column to the right of the selected cell, execute the following command:\n*\n* ```ts\n* editor.execute( 'insertTableColumnRight' );\n* ```\n*/\nvar InsertColumnCommand = class extends Command {\n\t/**\n\t* The order of insertion relative to the column in which the caret is located.\n\t*/\n\torder;\n\t/**\n\t* Creates a new `InsertColumnCommand` instance.\n\t*\n\t* @param editor An editor on which this command will be used.\n\t* @param options.order The order of insertion relative to the column in which the caret is located.\n\t* Possible values: `\"left\"` and `\"right\"`. Default value is \"right\".\n\t*/\n\tconstructor(editor, options = {}) {\n\t\tsuper(editor);\n\t\tthis.order = options.order || \"right\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst isAnyCellSelected = !!this.editor.plugins.get(\"TableUtils\").getSelectionAffectedTableCells(selection).length;\n\t\tthis.isEnabled = isAnyCellSelected;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* Depending on the command's {@link #order} value, it inserts a column to the `'left'` or `'right'` of the column\n\t* in which the selection is set.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst tableUtils = editor.plugins.get(\"TableUtils\");\n\t\tconst insertBefore = this.order === \"left\";\n\t\tconst affectedTableCells = tableUtils.getSelectionAffectedTableCells(selection);\n\t\tconst columnIndexes = tableUtils.getColumnIndexes(affectedTableCells);\n\t\tconst column = insertBefore ? columnIndexes.first : columnIndexes.last;\n\t\tconst table = affectedTableCells[0].findAncestor(\"table\");\n\t\ttableUtils.insertColumns(table, {\n\t\t\tcolumns: 1,\n\t\t\tat: insertBefore ? column : column + 1\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 table/commands/splitcellcommand\n*/\n/**\n* The split cell command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'splitTableCellVertically'`\n* and `'splitTableCellHorizontally'`  editor commands.\n*\n* You can split any cell vertically or horizontally by executing this command. When multiple cells are selected, each of them\n* is split, and the whole operation is a single undo step. For example, to split the selected table cells vertically:\n*\n* ```ts\n* editor.execute( 'splitTableCellVertically' );\n* ```\n*/\nvar SplitCellCommand = class extends Command {\n\t/**\n\t* The direction that indicates which cell will be split.\n\t*/\n\tdirection;\n\t/**\n\t* Creates a new `SplitCellCommand` instance.\n\t*\n\t* @param editor The editor on which this command will be used.\n\t* @param options.direction Indicates whether the command should split cells `'horizontally'` or `'vertically'`.\n\t*/\n\tconstructor(editor, options = {}) {\n\t\tsuper(editor);\n\t\tthis.direction = options.direction || \"horizontally\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selectedCells = this.editor.plugins.get(\"TableUtils\").getSelectionAffectedTableCells(this.editor.model.document.selection);\n\t\tthis.isEnabled = selectedCells.length > 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst tableCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n\t\tconst isHorizontal = this.direction === \"horizontally\";\n\t\tthis.editor.model.change(() => {\n\t\t\tfor (const tableCell of tableCells) if (isHorizontal) tableUtils.splitCellHorizontally(tableCell, 2);\n\t\t\telse tableUtils.splitCellVertically(tableCell, 2);\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* The merge cell command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'mergeTableCellRight'`, `'mergeTableCellLeft'`,\n* `'mergeTableCellUp'` and `'mergeTableCellDown'` editor commands.\n*\n* To merge a table cell at the current selection with another cell, execute the command corresponding with the preferred direction.\n*\n* For example, to merge with a cell to the right:\n*\n* ```ts\n* editor.execute( 'mergeTableCellRight' );\n* ```\n*\n* **Note**: If a table cell has a different [`rowspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-rowspan)\n* (for `'mergeTableCellRight'` and `'mergeTableCellLeft'`) or [`colspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-colspan)\n* (for `'mergeTableCellUp'` and `'mergeTableCellDown'`), the command will be disabled.\n*/\nvar MergeCellCommand = class extends Command {\n\t/**\n\t* The direction that indicates which cell will be merged with the currently selected one.\n\t*/\n\tdirection;\n\t/**\n\t* Whether the merge is horizontal (left/right) or vertical (up/down).\n\t*/\n\tisHorizontal;\n\t/**\n\t* Creates a new `MergeCellCommand` instance.\n\t*\n\t* @param editor The editor on which this command will be used.\n\t* @param options.direction Indicates which cell to merge with the currently selected one.\n\t* Possible values are: `'left'`, `'right'`, `'up'` and `'down'`.\n\t*/\n\tconstructor(editor, options) {\n\t\tsuper(editor);\n\t\tthis.direction = options.direction;\n\t\tthis.isHorizontal = this.direction == \"right\" || this.direction == \"left\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst cellToMerge = this._getMergeableCell();\n\t\tthis.value = cellToMerge;\n\t\tthis.isEnabled = !!cellToMerge;\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* Depending on the command's {@link #direction} value, it will merge the cell that is to the `'left'`, `'right'`, `'up'` or `'down'`.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst tableCell = this.editor.plugins.get(\"TableUtils\").getTableCellsContainingSelection(doc.selection)[0];\n\t\tconst cellToMerge = this.value;\n\t\tconst direction = this.direction;\n\t\tmodel.change((writer) => {\n\t\t\tconst isMergeNext = direction == \"right\" || direction == \"down\";\n\t\t\tconst cellToExpand = isMergeNext ? tableCell : cellToMerge;\n\t\t\tconst cellToRemove = isMergeNext ? cellToMerge : tableCell;\n\t\t\tconst removedTableCellRow = cellToRemove.parent;\n\t\t\tmergeTableCells$1(cellToRemove, cellToExpand, writer);\n\t\t\tconst spanAttribute = this.isHorizontal ? \"colspan\" : \"rowspan\";\n\t\t\tconst cellSpan = parseInt(tableCell.getAttribute(spanAttribute) || \"1\");\n\t\t\tconst cellToMergeSpan = parseInt(cellToMerge.getAttribute(spanAttribute) || \"1\");\n\t\t\twriter.setAttribute(spanAttribute, cellSpan + cellToMergeSpan, cellToExpand);\n\t\t\twriter.setSelection(writer.createRangeIn(cellToExpand));\n\t\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\t\tconst table = removedTableCellRow.findAncestor(\"table\");\n\t\t\tremoveEmptyRowsColumns(table, tableUtils);\n\t\t});\n\t}\n\t/**\n\t* Returns a cell that can be merged with the current cell depending on the command's direction.\n\t*/\n\t_getMergeableCell() {\n\t\tconst doc = this.editor.model.document;\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst tableCell = tableUtils.getTableCellsContainingSelection(doc.selection)[0];\n\t\tif (!tableCell) return;\n\t\tconst cellToMerge = this.isHorizontal ? getHorizontalCell(tableCell, this.direction, tableUtils) : getVerticalCell(tableCell, this.direction, tableUtils);\n\t\tif (!cellToMerge) return;\n\t\tconst spanAttribute = this.isHorizontal ? \"rowspan\" : \"colspan\";\n\t\tconst span = parseInt(tableCell.getAttribute(spanAttribute) || \"1\");\n\t\tif (parseInt(cellToMerge.getAttribute(spanAttribute) || \"1\") === span) return cellToMerge;\n\t}\n};\n/**\n* Returns the cell that can be merged horizontally.\n*/\nfunction getHorizontalCell(tableCell, direction, tableUtils) {\n\tconst table = tableCell.parent.parent;\n\tconst horizontalCell = direction == \"right\" ? tableCell.nextSibling : tableCell.previousSibling;\n\tconst hasHeadingColumns = (table.getAttribute(\"headingColumns\") || 0) > 0;\n\tif (!horizontalCell) return;\n\tconst cellOnLeft = direction == \"right\" ? tableCell : horizontalCell;\n\tconst cellOnRight = direction == \"right\" ? horizontalCell : tableCell;\n\tconst { column: leftCellColumn } = tableUtils.getCellLocation(cellOnLeft);\n\tconst { column: rightCellColumn } = tableUtils.getCellLocation(cellOnRight);\n\tconst leftCellSpan = parseInt(cellOnLeft.getAttribute(\"colspan\") || \"1\");\n\tconst isCellOnLeftInHeadingColumn = isHeadingColumnCell(tableUtils, cellOnLeft);\n\tconst isCellOnRightInHeadingColumn = isHeadingColumnCell(tableUtils, cellOnRight);\n\tif (hasHeadingColumns && isCellOnLeftInHeadingColumn != isCellOnRightInHeadingColumn) return;\n\treturn leftCellColumn + leftCellSpan === rightCellColumn ? horizontalCell : void 0;\n}\n/**\n* Returns the cell that can be merged vertically.\n*/\nfunction getVerticalCell(tableCell, direction, tableUtils) {\n\tconst tableRow = tableCell.parent;\n\tconst table = tableRow.parent;\n\tconst rowIndex = table.getChildIndex(tableRow);\n\tconst rows = tableUtils.getRows(table);\n\tif (direction == \"down\" && rowIndex === rows - 1 || direction == \"up\" && rowIndex === 0) return null;\n\tconst rowspan = parseInt(tableCell.getAttribute(\"rowspan\") || \"1\");\n\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\tconst footerRows = table.getAttribute(\"footerRows\") || 0;\n\tconst footerIndex = rows - footerRows;\n\tconst isMergeUpWithBodyCell = direction == \"up\" && rowIndex === footerIndex;\n\tconst isMergeUpWithHeadCell = direction == \"up\" && rowIndex === headingRows;\n\tconst isMergeDownWithBodyCell = direction == \"down\" && rowIndex + rowspan === headingRows;\n\tconst isMergeDownWithFootCell = direction == \"down\" && rowIndex + rowspan === footerIndex;\n\tif (headingRows && (isMergeDownWithBodyCell || isMergeUpWithHeadCell)) return null;\n\tif (footerRows && (isMergeUpWithBodyCell || isMergeDownWithFootCell)) return null;\n\tconst currentCellRowSpan = parseInt(tableCell.getAttribute(\"rowspan\") || \"1\");\n\tconst rowOfCellToMerge = direction == \"down\" ? rowIndex + currentCellRowSpan : rowIndex;\n\tconst tableMap = [...new TableWalker(table, { endRow: rowOfCellToMerge })];\n\tconst mergeColumn = tableMap.find((value) => value.cell === tableCell).column;\n\tconst cellToMergeData = tableMap.find(({ row, cellHeight, column }) => {\n\t\tif (column !== mergeColumn) return false;\n\t\tif (direction == \"down\") return row === rowOfCellToMerge;\n\t\telse return rowOfCellToMerge === row + cellHeight;\n\t});\n\treturn cellToMergeData && cellToMergeData.cell ? cellToMergeData.cell : null;\n}\n/**\n* Merges two table cells. It will ensure that after merging cells with an empty paragraph, the resulting table cell will only have one\n* paragraph. If one of the merged table cells is empty, the merged table cell will have the contents of the non-empty table cell.\n* If both are empty, the merged table cell will have only one empty paragraph.\n*/\nfunction mergeTableCells$1(cellToRemove, cellToExpand, writer) {\n\tif (!isEmpty$2(cellToRemove)) {\n\t\tif (isEmpty$2(cellToExpand)) writer.remove(writer.createRangeIn(cellToExpand));\n\t\twriter.move(writer.createRangeIn(cellToRemove), writer.createPositionAt(cellToExpand, \"end\"));\n\t}\n\twriter.remove(cellToRemove);\n}\n/**\n* Checks if the passed table cell contains an empty paragraph.\n*/\nfunction isEmpty$2(tableCell) {\n\tconst firstTableChild = tableCell.getChild(0);\n\treturn tableCell.childCount == 1 && firstTableChild.is(\"element\", \"paragraph\") && firstTableChild.isEmpty;\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 table/commands/removerowcommand\n*/\n/**\n* The remove row command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'removeTableRow'` editor command.\n*\n* To remove the row containing the selected cell, execute the command:\n*\n* ```ts\n* editor.execute( 'removeTableRow' );\n* ```\n*/\nvar RemoveRowCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n\t\tconst firstCell = selectedCells[0];\n\t\tif (firstCell) {\n\t\t\tconst table = firstCell.findAncestor(\"table\");\n\t\t\tconst lastRowIndex = tableUtils.getRows(table) - 1;\n\t\t\tconst selectedRowIndexes = tableUtils.getRowIndexes(selectedCells);\n\t\t\tconst areAllRowsSelected = selectedRowIndexes.first === 0 && selectedRowIndexes.last === lastRowIndex;\n\t\t\tthis.isEnabled = !areAllRowsSelected;\n\t\t} else this.isEnabled = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst referenceCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tconst removedRowIndexes = tableUtils.getRowIndexes(referenceCells);\n\t\tconst firstCell = referenceCells[0];\n\t\tconst table = firstCell.findAncestor(\"table\");\n\t\tconst columnIndexToFocus = tableUtils.getCellLocation(firstCell).column;\n\t\tmodel.change((writer) => {\n\t\t\tconst rowsToRemove = removedRowIndexes.last - removedRowIndexes.first + 1;\n\t\t\ttableUtils.removeRows(table, {\n\t\t\t\tat: removedRowIndexes.first,\n\t\t\t\trows: rowsToRemove\n\t\t\t});\n\t\t\tconst cellToFocus = getCellToFocus$1(table, removedRowIndexes.first, columnIndexToFocus, tableUtils.getRows(table));\n\t\t\twriter.setSelection(writer.createPositionAt(cellToFocus, 0));\n\t\t});\n\t}\n};\n/**\n* Returns a cell that should be focused before removing the row, belonging to the same column as the currently focused cell.\n* - If the row was not the last one, the cell to focus will be in the row that followed it (before removal).\n* - If the row was the last one, the cell to focus will be in the row that preceded it (before removal).\n*/\nfunction getCellToFocus$1(table, removedRowIndex, columnToFocus, tableRowCount) {\n\tconst row = table.getChild(Math.min(removedRowIndex, tableRowCount - 1));\n\tlet cellToFocus = row.getChild(0);\n\tlet column = 0;\n\tfor (const tableCell of row.getChildren()) {\n\t\tif (column > columnToFocus) return cellToFocus;\n\t\tcellToFocus = tableCell;\n\t\tcolumn += parseInt(tableCell.getAttribute(\"colspan\") || \"1\");\n\t}\n\treturn cellToFocus;\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 table/commands/removecolumncommand\n*/\n/**\n* The remove column command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'removeTableColumn'` editor command.\n*\n* To remove the column containing the selected cell, execute the command:\n*\n* ```ts\n* editor.execute( 'removeTableColumn' );\n* ```\n*/\nvar RemoveColumnCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n\t\tconst firstCell = selectedCells[0];\n\t\tif (firstCell) {\n\t\t\tconst table = firstCell.findAncestor(\"table\");\n\t\t\tconst tableColumnCount = tableUtils.getColumns(table);\n\t\t\tconst { first, last } = tableUtils.getColumnIndexes(selectedCells);\n\t\t\tthis.isEnabled = last - first < tableColumnCount - 1;\n\t\t} else this.isEnabled = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst [firstCell, lastCell] = getBoundaryCells(this.editor.model.document.selection, tableUtils);\n\t\tconst table = firstCell.parent.parent;\n\t\tconst tableMap = [...new TableWalker(table)];\n\t\tconst removedColumnIndexes = {\n\t\t\tfirst: tableMap.find((value) => value.cell === firstCell).column,\n\t\t\tlast: tableMap.find((value) => value.cell === lastCell).column\n\t\t};\n\t\tconst cellToFocus = getCellToFocus(tableMap, firstCell, lastCell, removedColumnIndexes);\n\t\tthis.editor.model.change((writer) => {\n\t\t\tconst columnsToRemove = removedColumnIndexes.last - removedColumnIndexes.first + 1;\n\t\t\ttableUtils.removeColumns(table, {\n\t\t\t\tat: removedColumnIndexes.first,\n\t\t\t\tcolumns: columnsToRemove\n\t\t\t});\n\t\t\twriter.setSelection(writer.createPositionAt(cellToFocus, 0));\n\t\t});\n\t}\n};\n/**\n* Returns a proper table cell to focus after removing a column.\n* - selection is on last table cell it will return previous cell.\n*/\nfunction getCellToFocus(tableMap, firstCell, lastCell, removedColumnIndexes) {\n\tif (parseInt(lastCell.getAttribute(\"colspan\") || \"1\") > 1) return lastCell;\n\telse if (firstCell.previousSibling || lastCell.nextSibling) return lastCell.nextSibling || firstCell.previousSibling;\n\telse if (removedColumnIndexes.first) return tableMap.reverse().find(({ column }) => {\n\t\treturn column < removedColumnIndexes.first;\n\t}).cell;\n\telse return tableMap.reverse().find(({ column }) => {\n\t\treturn column > removedColumnIndexes.last;\n\t}).cell;\n}\n/**\n* Returns helper object returning the first and the last cell contained in given selection, based on DOM order.\n*/\nfunction getBoundaryCells(selection, tableUtils) {\n\tconst referenceCells = tableUtils.getSelectionAffectedTableCells(selection);\n\tconst firstCell = referenceCells[0];\n\tconst lastCell = referenceCells.pop();\n\tconst returnValue = [firstCell, lastCell];\n\treturn firstCell.isBefore(lastCell) ? returnValue : returnValue.reverse();\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 table/commands/setheaderrowcommand\n*/\n/**\n* The header row command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableColumnHeader'` editor command.\n*\n* You can make the row containing the selected cell a [header](https://www.w3.org/TR/html50/tabular-data.html#the-th-element) by executing:\n*\n* ```ts\n* editor.execute( 'setTableRowHeader' );\n* ```\n*\n* **Note:** All preceding rows will also become headers. If the current row is already a header, executing this command\n* will make it a regular row back again (including the following rows).\n*/\nvar SetHeaderRowCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst model = this.editor.model;\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tif (selectedCells.length === 0) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\t\t\treturn;\n\t\t}\n\t\tconst table = selectedCells[0].findAncestor(\"table\");\n\t\tthis.isEnabled = model.schema.checkAttribute(table, \"headingRows\");\n\t\tthis.value = selectedCells.every((cell) => this._isInHeading(cell, cell.parent.parent));\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* When the selection is in a non-header row, the command will set the `headingRows` table attribute to cover that row.\n\t*\n\t* When the selection is already in a header row, it will set `headingRows` so the heading section will end before that row.\n\t*\n\t* @fires execute\n\t* @param options.forceValue If set, the command will set (`true`) or unset (`false`) the header rows according to\n\t* the `forceValue` parameter instead of the current model state.\n\t*/\n\texecute(options = {}) {\n\t\tif (options.forceValue === this.value) return;\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst model = this.editor.model;\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tconst table = selectedCells[0].findAncestor(\"table\");\n\t\tconst { first, last } = tableUtils.getRowIndexes(selectedCells);\n\t\tconst headingRowsToSet = this.value ? first : last + 1;\n\t\tconst currentHeadingRows = table.getAttribute(\"headingRows\") || 0;\n\t\tmodel.change((writer) => {\n\t\t\tif (headingRowsToSet) {\n\t\t\t\tconst overlappingCells = getVerticallyOverlappingCells(table, headingRowsToSet, headingRowsToSet > currentHeadingRows ? currentHeadingRows : 0);\n\t\t\t\tfor (const { cell } of overlappingCells) splitHorizontally(cell, headingRowsToSet, writer);\n\t\t\t}\n\t\t\ttableUtils.setHeadingRowsCount(writer, table, headingRowsToSet);\n\t\t});\n\t}\n\t/**\n\t* Checks if a table cell is in the heading section.\n\t*/\n\t_isInHeading(tableCell, table) {\n\t\tconst headingRows = parseInt(table.getAttribute(\"headingRows\") || \"0\");\n\t\treturn !!headingRows && tableCell.parent.index < headingRows;\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 table/commands/setfooterrowcommand\n*/\n/**\n* The footer row command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableFooterRow'` editor command.\n*\n* You can make the row containing the selected cell a footer by executing:\n*\n* ```ts\n* editor.execute( 'setTableFooterRow' );\n* ```\n*\n* **Note:** All following rows will also become footers. If the current row is already a footer, executing this command\n* will make it a regular row back again (including the preceding rows).\n*/\nvar SetFooterRowCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst model = this.editor.model;\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tif (selectedCells.length === 0) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\t\t\treturn;\n\t\t}\n\t\tconst table = selectedCells[0].findAncestor(\"table\");\n\t\tthis.isEnabled = model.schema.checkAttribute(table, \"footerRows\");\n\t\tthis.value = selectedCells.every((cell) => this._isInFooter(cell, table));\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* When the selection is in a non-footer row, the command will set the `footerRows` table attribute to cover that row.\n\t*\n\t* When the selection is already in a footer row, it will set `footerRows` so the footer section will start after that row.\n\t*\n\t* @fires execute\n\t* @param options.forceValue If set, the command will set (`true`) or unset (`false`) the footer rows according to\n\t* the `forceValue` parameter instead of the current model state.\n\t*/\n\texecute(options = {}) {\n\t\tif (options.forceValue === this.value) return;\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst model = this.editor.model;\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tconst table = selectedCells[0].findAncestor(\"table\");\n\t\tconst { first, last } = tableUtils.getRowIndexes(selectedCells);\n\t\tconst totalRows = tableUtils.getRows(table);\n\t\tconst footerRowsToSet = this.value ? totalRows - (last + 1) : totalRows - first;\n\t\tconst currentFooterRows = table.getAttribute(\"footerRows\") || 0;\n\t\tmodel.change((writer) => {\n\t\t\tif (footerRowsToSet) {\n\t\t\t\tconst splitRow = totalRows - footerRowsToSet;\n\t\t\t\tconst currentSplitRow = totalRows - currentFooterRows;\n\t\t\t\tconst overlappingCells = getVerticallyOverlappingCells(table, splitRow, splitRow > currentSplitRow ? currentSplitRow : 0);\n\t\t\t\tfor (const { cell } of overlappingCells) splitHorizontally(cell, splitRow, writer);\n\t\t\t}\n\t\t\ttableUtils.setFooterRowsCount(writer, table, footerRowsToSet);\n\t\t});\n\t}\n\t/**\n\t* Checks if a table cell is in the footer section.\n\t*/\n\t_isInFooter(tableCell, table) {\n\t\tconst footerRows = parseInt(table.getAttribute(\"footerRows\") || \"0\");\n\t\tconst totalRows = this.editor.plugins.get(\"TableUtils\").getRows(table);\n\t\tconst rowIndex = tableCell.parent.index;\n\t\treturn !!footerRows && rowIndex >= totalRows - footerRows;\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 table/commands/setheadercolumncommand\n*/\n/**\n* The header column command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableColumnHeader'` editor command.\n*\n* You can make the column containing the selected cell a [header](https://www.w3.org/TR/html50/tabular-data.html#the-th-element)\n* by executing:\n*\n* ```ts\n* editor.execute( 'setTableColumnHeader' );\n* ```\n*\n* **Note:** All preceding columns will also become headers. If the current column is already a header, executing this command\n* will make it a regular column back again (including the following columns).\n*/\nvar SetHeaderColumnCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst model = this.editor.model;\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tif (selectedCells.length === 0) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\t\t\treturn;\n\t\t}\n\t\tconst table = selectedCells[0].findAncestor(\"table\");\n\t\tthis.isEnabled = model.schema.checkAttribute(table, \"headingColumns\");\n\t\tthis.value = selectedCells.every((cell) => isHeadingColumnCell(tableUtils, cell));\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* When the selection is in a non-header column, the command will set the `headingColumns` table attribute to cover that column.\n\t*\n\t* When the selection is already in a header column, it will set `headingColumns` so the heading section will end before that column.\n\t*\n\t* @fires execute\n\t* @param options.forceValue If set, the command will set (`true`) or unset (`false`) the header columns according to\n\t* the `forceValue` parameter instead of the current model state.\n\t*/\n\texecute(options = {}) {\n\t\tif (options.forceValue === this.value) return;\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst model = this.editor.model;\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tconst table = selectedCells[0].findAncestor(\"table\");\n\t\tconst { first, last } = tableUtils.getColumnIndexes(selectedCells);\n\t\tconst headingColumnsToSet = this.value ? first : last + 1;\n\t\tmodel.change((writer) => {\n\t\t\tif (headingColumnsToSet) {\n\t\t\t\tconst overlappingCells = getHorizontallyOverlappingCells(table, headingColumnsToSet);\n\t\t\t\tfor (const { cell, column } of overlappingCells) splitVertically(cell, column, headingColumnsToSet, writer);\n\t\t\t}\n\t\t\ttableUtils.setHeadingColumnsCount(writer, table, headingColumnsToSet);\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* The merge cells command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'mergeTableCells'` editor command.\n*\n* For example, to merge selected table cells:\n*\n* ```ts\n* editor.execute( 'mergeTableCells' );\n* ```\n*/\nvar MergeCellsCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst selectedTableCells = tableUtils.getSelectedTableCells(this.editor.model.document.selection);\n\t\tthis.isEnabled = tableUtils.isSelectionRectangular(selectedTableCells);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tmodel.change((writer) => {\n\t\t\tconst selectedTableCells = tableUtils.getSelectedTableCells(model.document.selection);\n\t\t\tconst firstTableCell = selectedTableCells.shift();\n\t\t\tconst { mergeWidth, mergeHeight } = getMergeDimensions(firstTableCell, selectedTableCells, tableUtils);\n\t\t\tupdateNumericAttribute(\"colspan\", mergeWidth, firstTableCell, writer);\n\t\t\tupdateNumericAttribute(\"rowspan\", mergeHeight, firstTableCell, writer);\n\t\t\tfor (const tableCell of selectedTableCells) mergeTableCells(tableCell, firstTableCell, writer);\n\t\t\tconst table = firstTableCell.findAncestor(\"table\");\n\t\t\tremoveEmptyRowsColumns(table, tableUtils);\n\t\t\twriter.setSelection(firstTableCell, \"in\");\n\t\t});\n\t}\n};\n/**\n*  Merges two table cells. It will ensure that after merging cells with empty paragraphs the resulting table cell will only have one\n* paragraph. If one of the merged table cells is empty, the merged table cell will have contents of the non-empty table cell.\n* If both are empty, the merged table cell will have only one empty paragraph.\n*/\nfunction mergeTableCells(cellBeingMerged, targetCell, writer) {\n\tif (!isEmpty$1(cellBeingMerged)) {\n\t\tif (isEmpty$1(targetCell)) writer.remove(writer.createRangeIn(targetCell));\n\t\twriter.move(writer.createRangeIn(cellBeingMerged), writer.createPositionAt(targetCell, \"end\"));\n\t}\n\twriter.remove(cellBeingMerged);\n}\n/**\n* Checks if the passed table cell contains an empty paragraph.\n*/\nfunction isEmpty$1(tableCell) {\n\tconst firstTableChild = tableCell.getChild(0);\n\treturn tableCell.childCount == 1 && firstTableChild.is(\"element\", \"paragraph\") && firstTableChild.isEmpty;\n}\nfunction getMergeDimensions(firstTableCell, selectedTableCells, tableUtils) {\n\tlet maxWidthOffset = 0;\n\tlet maxHeightOffset = 0;\n\tfor (const tableCell of selectedTableCells) {\n\t\tconst { row, column } = tableUtils.getCellLocation(tableCell);\n\t\tmaxWidthOffset = getMaxOffset(tableCell, column, maxWidthOffset, \"colspan\");\n\t\tmaxHeightOffset = getMaxOffset(tableCell, row, maxHeightOffset, \"rowspan\");\n\t}\n\tconst { row: firstCellRow, column: firstCellColumn } = tableUtils.getCellLocation(firstTableCell);\n\treturn {\n\t\tmergeWidth: maxWidthOffset - firstCellColumn,\n\t\tmergeHeight: maxHeightOffset - firstCellRow\n\t};\n}\nfunction getMaxOffset(tableCell, start, currentMaxOffset, which) {\n\tconst dimensionValue = parseInt(tableCell.getAttribute(which) || \"1\");\n\treturn Math.max(currentMaxOffset, start + dimensionValue);\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 table/commands/selectrowcommand\n*/\n/**\n* The select row command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'selectTableRow'` editor command.\n*\n* To select the rows containing the selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'selectTableRow' );\n* ```\n*/\nvar SelectRowCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.affectsData = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selectedCells = this.editor.plugins.get(\"TableUtils\").getSelectionAffectedTableCells(this.editor.model.document.selection);\n\t\tthis.isEnabled = selectedCells.length > 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst referenceCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tconst rowIndexes = tableUtils.getRowIndexes(referenceCells);\n\t\tconst table = referenceCells[0].findAncestor(\"table\");\n\t\tconst rangesToSelect = [];\n\t\tfor (let rowIndex = rowIndexes.first; rowIndex <= rowIndexes.last; rowIndex++) for (const cell of table.getChild(rowIndex).getChildren()) rangesToSelect.push(model.createRangeOn(cell));\n\t\tmodel.change((writer) => {\n\t\t\twriter.setSelection(rangesToSelect);\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 table/commands/selectcolumncommand\n*/\n/**\n* The select column command.\n*\n* The command is registered by {@link module:table/tableediting~TableEditing} as the `'selectTableColumn'` editor command.\n*\n* To select the columns containing the selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'selectTableColumn' );\n* ```\n*/\nvar SelectColumnCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.affectsData = false;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selectedCells = this.editor.plugins.get(\"TableUtils\").getSelectionAffectedTableCells(this.editor.model.document.selection);\n\t\tthis.isEnabled = selectedCells.length > 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute() {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst model = this.editor.model;\n\t\tconst referenceCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tconst firstCell = referenceCells[0];\n\t\tconst lastCell = referenceCells.pop();\n\t\tconst table = firstCell.findAncestor(\"table\");\n\t\tconst startLocation = tableUtils.getCellLocation(firstCell);\n\t\tconst endLocation = tableUtils.getCellLocation(lastCell);\n\t\tconst startColumn = Math.min(startLocation.column, endLocation.column);\n\t\tconst endColumn = Math.max(startLocation.column, endLocation.column);\n\t\tconst rangesToSelect = [];\n\t\tfor (const cellInfo of new TableWalker(table, {\n\t\t\tstartColumn,\n\t\t\tendColumn\n\t\t})) rangesToSelect.push(model.createRangeOn(cellInfo.cell));\n\t\tmodel.change((writer) => {\n\t\t\twriter.setSelection(rangesToSelect);\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* Injects a table layout post-fixer into the model.\n*\n* The role of the table layout post-fixer is to ensure that the table rows have the correct structure\n* after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n*\n* The correct structure means that:\n*\n* * All table rows have the same size.\n* * None of the table cells extend vertically beyond their section (either header or body).\n* * A table cell has always at least one element as a child.\n*\n* If the table structure is not correct, the post-fixer will automatically correct it in two steps:\n*\n* 1. It will clip table cells that extend beyond their section.\n* 2. It will add empty table cells to the rows that are narrower than the widest table row.\n*\n* ## Clipping overlapping table cells\n*\n* Such situation may occur when pasting a table (or a part of a table) to the editor from external sources.\n*\n* For example, see the following table which has a cell (FOO) with the rowspan attribute (2):\n*\n* ```xml\n* <table headingRows=\"1\">\n*   <tableRow>\n*     <tableCell rowspan=\"2\"><paragraph>FOO</paragraph></tableCell>\n*     <tableCell colspan=\"2\"><paragraph>BAR</paragraph></tableCell>\n*   </tableRow>\n*   <tableRow>\n*     <tableCell><paragraph>BAZ</paragraph></tableCell>\n*     <tableCell><paragraph>XYZ</paragraph></tableCell>\n*   </tableRow>\n* </table>\n* ```\n*\n* It will be rendered in the view as:\n*\n* ```xml\n* <table>\n*   <thead>\n*     <tr>\n*       <td rowspan=\"2\">FOO</td>\n*       <td colspan=\"2\">BAR</td>\n*     </tr>\n*   </thead>\n*   <tbody>\n*     <tr>\n*       <td>BAZ</td>\n*       <td>XYZ</td>\n*     </tr>\n*   </tbody>\n* </table>\n* ```\n*\n* In the above example the table will be rendered as a table with two rows: one in the header and second one in the body.\n* The table cell (FOO) cannot span over multiple rows as it would extend from the header to the body section.\n* The `rowspan` attribute must be changed to (1). The value (1) is the default value of the `rowspan` attribute\n* so the `rowspan` attribute will be removed from the model.\n*\n* The table cell with BAZ in the content will be in the first column of the table.\n*\n* ## Adding missing table cells\n*\n* The table post-fixer will insert empty table cells to equalize table row sizes (the number of columns).\n* The size of a table row is calculated by counting column spans of table cells, both horizontal (from the same row) and\n* vertical (from the rows above).\n*\n* In the above example, the table row in the body section of the table is narrower then the row from the header: it has two cells\n* with the default colspan (1). The header row has one cell with colspan (1) and the second with colspan (2).\n* The table cell (FOO) does not extend beyond the head section (and as such will be fixed in the first step of this post-fixer).\n* The post-fixer will add a missing table cell to the row in the body section of the table.\n*\n* The table from the above example will be fixed and rendered to the view as below:\n*\n* ```xml\n* <table>\n*   <thead>\n*     <tr>\n*       <td rowspan=\"2\">FOO</td>\n*       <td colspan=\"2\">BAR</td>\n*     </tr>\n*   </thead>\n*   <tbody>\n*     <tr>\n*       <td>BAZ</td>\n*       <td>XYZ</td>\n*     </tr>\n*   </tbody>\n* </table>\n* ```\n*\n* ## Collaboration and undo - Expectations vs post-fixer results\n*\n* The table post-fixer only ensures proper structure without a deeper analysis of the nature of the change. As such, it might lead\n* to a structure which was not intended by the user. In particular, it will also fix undo steps (in conjunction with collaboration)\n* in which the editor content might not return to the original state.\n*\n* This will usually happen when one or more users change the size of the table.\n*\n* As an example see the table below:\n*\n* ```xml\n* <table>\n*   <tbody>\n*     <tr>\n*       <td>11</td>\n*       <td>12</td>\n*     </tr>\n*     <tr>\n*       <td>21</td>\n*       <td>22</td>\n*     </tr>\n*   </tbody>\n* </table>\n* ```\n*\n* and the user actions:\n*\n* 1. Both users have a table with two rows and two columns.\n* 2. User A adds a column at the end of the table. This will insert empty table cells to two rows.\n* 3. User B adds a row at the end of the table. This will insert a row with two empty table cells.\n* 4. Both users will have a table as below:\n*\n* ```xml\n* <table>\n*   <tbody>\n*     <tr>\n*       <td>11</td>\n*       <td>12</td>\n*       <td>(empty, inserted by A)</td>\n*     </tr>\n*     <tr>\n*       <td>21</td>\n*       <td>22</td>\n*       <td>(empty, inserted by A)</td>\n*     </tr>\n*     <tr>\n*       <td>(empty, inserted by B)</td>\n*       <td>(empty, inserted by B)</td>\n*     </tr>\n*   </tbody>\n* </table>\n* ```\n*\n* The last row is shorter then others so the table post-fixer will add an empty row to the last row:\n*\n* ```xml\n* <table>\n*   <tbody>\n*     <tr>\n*       <td>11</td>\n*       <td>12</td>\n*       <td>(empty, inserted by A)</td>\n*     </tr>\n*     <tr>\n*       <td>21</td>\n*       <td>22</td>\n*       <td>(empty, inserted by A)</td>\n*     </tr>\n*     <tr>\n*       <td>(empty, inserted by B)</td>\n*       <td>(empty, inserted by B)</td>\n*       <td>(empty, inserted by the post-fixer)</td>\n*     </tr>\n*   </tbody>\n* </table>\n* ```\n*\n* Unfortunately undo does not know the nature of the changes and depending on which user applies the post-fixer changes, undoing them\n* might lead to a broken table. If User B undoes inserting the column to the table, the undo engine will undo only the operations of\n* inserting empty cells to rows from the initial table state (row 1 and 2) but the cell in the post-fixed row will remain:\n*\n* ```xml\n* <table>\n*   <tbody>\n*     <tr>\n*       <td>11</td>\n*       <td>12</td>\n*     </tr>\n*     <tr>\n*       <td>21</td>\n*       <td>22</td>\n*     </tr>\n*     <tr>\n*       <td>(empty, inserted by B)</td>\n*       <td>(empty, inserted by B)</td>\n*       <td>(empty, inserted by a post-fixer)</td>\n*     </tr>\n*   </tbody>\n* </table>\n* ```\n*\n* After undo, the table post-fixer will detect that two rows are shorter than others and will fix the table to:\n*\n* ```xml\n* <table>\n*   <tbody>\n*     <tr>\n*       <td>11</td>\n*       <td>12</td>\n*       <td>(empty, inserted by a post-fixer after undo)</td>\n*     </tr>\n*     <tr>\n*       <td>21</td>\n*       <td>22</td>\n*       <td>(empty, inserted by a post-fixer after undo)</td>\n*     </tr>\n*     <tr>\n*       <td>(empty, inserted by B)</td>\n*       <td>(empty, inserted by B)</td>\n*       <td>(empty, inserted by a post-fixer)</td>\n*     </tr>\n*   </tbody>\n* </table>\n* ```\n*\n* @internal\n*/\nfunction injectTableLayoutPostFixer(model) {\n\tmodel.document.registerPostFixer((writer) => tableLayoutPostFixer(writer, model));\n}\n/**\n* The table layout post-fixer.\n*/\nfunction tableLayoutPostFixer(writer, model) {\n\tconst changes = model.document.differ.getChanges();\n\tlet wasFixed = false;\n\tconst analyzedTables = /* @__PURE__ */ new Set();\n\tfor (const entry of changes) {\n\t\tlet table = null;\n\t\tif (entry.type == \"insert\" && entry.name == \"table\") table = entry.position.nodeAfter;\n\t\tif ((entry.type == \"insert\" || entry.type == \"remove\") && (entry.name == \"tableRow\" || entry.name == \"tableCell\")) table = entry.position.findAncestor(\"table\");\n\t\tif (isTableAttributeEntry(entry)) table = entry.range.start.findAncestor(\"table\");\n\t\tif (table && !analyzedTables.has(table)) {\n\t\t\twasFixed = fixTableCellsRowspan(table, writer) || wasFixed;\n\t\t\twasFixed = fixTableRowsSizes(table, writer) || wasFixed;\n\t\t\tanalyzedTables.add(table);\n\t\t}\n\t}\n\treturn wasFixed;\n}\n/**\n* Fixes the invalid value of the `rowspan` attribute because a table cell cannot vertically extend beyond the table section it belongs to.\n*\n* @returns Returns `true` if the table was fixed.\n*/\nfunction fixTableCellsRowspan(table, writer) {\n\tlet wasFixed = false;\n\tconst cellsToTrim = findCellsToTrim(table);\n\tif (cellsToTrim.length) {\n\t\twasFixed = true;\n\t\tfor (const data of cellsToTrim) updateNumericAttribute(\"rowspan\", data.rowspan, data.cell, writer, 1);\n\t}\n\treturn wasFixed;\n}\n/**\n* Makes all table rows in a table the same size.\n*\n* @returns Returns `true` if the table was fixed.\n*/\nfunction fixTableRowsSizes(table, writer) {\n\tlet wasFixed = false;\n\tconst childrenLengths = getChildrenLengths(table);\n\tconst rowsToRemove = [];\n\tfor (const [rowIndex, size] of childrenLengths.entries()) if (!size && table.getChild(rowIndex).is(\"element\", \"tableRow\")) rowsToRemove.push(rowIndex);\n\tif (rowsToRemove.length) {\n\t\twasFixed = true;\n\t\tfor (const rowIndex of rowsToRemove.reverse()) {\n\t\t\twriter.remove(table.getChild(rowIndex));\n\t\t\tchildrenLengths.splice(rowIndex, 1);\n\t\t}\n\t}\n\tconst rowsLengths = childrenLengths.filter((row, rowIndex) => table.getChild(rowIndex).is(\"element\", \"tableRow\"));\n\tconst tableSize = rowsLengths[0];\n\tif (!rowsLengths.every((length) => length === tableSize)) {\n\t\tconst maxColumns = rowsLengths.reduce((prev, current) => current > prev ? current : prev, 0);\n\t\tfor (const [rowIndex, size] of rowsLengths.entries()) {\n\t\t\tconst columnsToInsert = maxColumns - size;\n\t\t\tif (columnsToInsert) {\n\t\t\t\tfor (let i = 0; i < columnsToInsert; i++) createEmptyTableCell(writer, writer.createPositionAt(table.getChild(rowIndex), \"end\"));\n\t\t\t\twasFixed = true;\n\t\t\t}\n\t\t}\n\t}\n\treturn wasFixed;\n}\n/**\n* Searches for table cells that extend beyond the table section to which they belong to. It will return an array of objects\n* that stores table cells to be trimmed and the correct value of the `rowspan` attribute to set.\n*/\nfunction findCellsToTrim(table) {\n\tconst headingRows = parseInt(table.getAttribute(\"headingRows\") || \"0\");\n\tconst footerRows = parseInt(table.getAttribute(\"footerRows\") || \"0\");\n\tconst maxRows = Array.from(table.getChildren()).reduce((count, row) => row.is(\"element\", \"tableRow\") ? count + 1 : count, 0);\n\tconst footerIndex = maxRows - footerRows;\n\tconst cellsToTrim = [];\n\tfor (const { row, cell, cellHeight } of new TableWalker(table)) {\n\t\tif (cellHeight < 2) continue;\n\t\tconst isInHeader = row < headingRows;\n\t\tconst isInFooter = row >= footerIndex;\n\t\tlet rowLimit;\n\t\tif (isInHeader) rowLimit = headingRows;\n\t\telse if (isInFooter) rowLimit = maxRows;\n\t\telse rowLimit = footerIndex;\n\t\tif (row + cellHeight > rowLimit) {\n\t\t\tconst newRowspan = rowLimit - row;\n\t\t\tcellsToTrim.push({\n\t\t\t\tcell,\n\t\t\t\trowspan: newRowspan\n\t\t\t});\n\t\t}\n\t}\n\treturn cellsToTrim;\n}\n/**\n* Returns an array with lengths of rows assigned to the corresponding row index.\n*/\nfunction getChildrenLengths(table) {\n\tconst lengths = new Array(table.childCount).fill(0);\n\tfor (const { rowIndex } of new TableWalker(table, { includeAllSlots: true })) lengths[rowIndex]++;\n\treturn lengths;\n}\n/**\n* Checks if the differ entry for an attribute change is one of the table's attributes.\n*/\nfunction isTableAttributeEntry(entry) {\n\tif (entry.type !== \"attribute\") return false;\n\tconst key = entry.attributeKey;\n\treturn key === \"headingRows\" || key === \"colspan\" || key === \"rowspan\";\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* Injects a table cell post-fixer into the model which inserts a `paragraph` element into empty table cells.\n*\n* A table cell must contain at least one block element as a child. An empty table cell will have an empty `paragraph` as a child.\n*\n* ```xml\n* <table>\n*   <tableRow>\n*      <tableCell></tableCell>\n*   </tableRow>\n* </table>\n* ```\n*\n* Will be fixed to:\n*\n* ```xml\n* <table>\n*   <tableRow>\n*      <tableCell><paragraph></paragraph></tableCell>\n*   </tableRow>\n* </table>\n* ```\n*\n* @internal\n*/\nfunction injectTableCellParagraphPostFixer(model) {\n\tmodel.document.registerPostFixer((writer) => tableCellContentsPostFixer(writer, model));\n}\n/**\n* The table cell contents post-fixer.\n*/\nfunction tableCellContentsPostFixer(writer, model) {\n\tconst changes = model.document.differ.getChanges();\n\tlet wasFixed = false;\n\tfor (const entry of changes) {\n\t\tif (entry.type == \"insert\" && entry.name == \"table\") wasFixed = fixTable(entry.position.nodeAfter, writer) || wasFixed;\n\t\tif (entry.type == \"insert\" && entry.name == \"tableRow\") wasFixed = fixTableRow(entry.position.nodeAfter, writer) || wasFixed;\n\t\tif (entry.type == \"insert\" && entry.name == \"tableCell\") wasFixed = fixTableCellContent(entry.position.nodeAfter, writer) || wasFixed;\n\t\tif ((entry.type == \"remove\" || entry.type == \"insert\") && checkTableCellChange(entry)) wasFixed = fixTableCellContent(entry.position.parent, writer) || wasFixed;\n\t}\n\treturn wasFixed;\n}\n/**\n* Fixes all table cells in a table.\n*/\nfunction fixTable(table, writer) {\n\tlet wasFixed = false;\n\tfor (const row of table.getChildren()) if (row.is(\"element\", \"tableRow\")) wasFixed = fixTableRow(row, writer) || wasFixed;\n\treturn wasFixed;\n}\n/**\n* Fixes all table cells in a table row.\n*/\nfunction fixTableRow(tableRow, writer) {\n\tlet wasFixed = false;\n\tfor (const tableCell of tableRow.getChildren()) wasFixed = fixTableCellContent(tableCell, writer) || wasFixed;\n\treturn wasFixed;\n}\n/**\n* Fixes all table cell content by:\n* - Adding a paragraph to a table cell without any child.\n* - Wrapping direct $text in a `<paragraph>`.\n*/\nfunction fixTableCellContent(tableCell, writer) {\n\tif (tableCell.childCount == 0) {\n\t\twriter.insertElement(\"paragraph\", tableCell);\n\t\treturn true;\n\t}\n\tconst textNodes = Array.from(tableCell.getChildren()).filter((child) => child.is(\"$text\"));\n\tfor (const child of textNodes) writer.wrap(writer.createRangeOn(child), \"paragraph\");\n\treturn !!textNodes.length;\n}\n/**\n* Checks if a differ change should fix the table cell. This happens on:\n* - Removing content from the table cell (i.e. `tableCell` can be left empty).\n* - Adding a text node directly into a table cell.\n*/\nfunction checkTableCellChange(entry) {\n\tif (!entry.position.parent.is(\"element\", \"tableCell\")) return false;\n\treturn entry.type == \"insert\" && entry.name == \"$text\" || entry.type == \"remove\";\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* Injects a table structure post-fixer into the model.\n*\n* It checks if the `headingRows` and `footerRows` attributes do not overlap.\n* If they overlap, the `footerRows` attribute is corrected.\n*\n* We prefer `headingRows` over `footerRows` because changing `headingRows` would require updating\n* the `tableCellType` attribute of the cells in the row, which is not required when changing `footerRows`.\n*\n* @param editor The editor instance.\n*/\nfunction injectTableStructurePostFixer(editor) {\n\tconst { model } = editor;\n\tconst tableUtils = editor.plugins.get(TableUtils);\n\tmodel.document.registerPostFixer((writer) => {\n\t\tlet changed = false;\n\t\tconst changes = model.document.differ.getChanges();\n\t\tconst tables = /* @__PURE__ */ new Set();\n\t\tfor (const entry of changes) {\n\t\t\tlet table = null;\n\t\t\tif (entry.type == \"attribute\" && (entry.attributeKey == \"headingRows\" || entry.attributeKey == \"footerRows\")) table = entry.range.start.nodeAfter;\n\t\t\telse if (entry.type == \"insert\" && entry.name == \"tableRow\") table = entry.position.parent;\n\t\t\telse if (entry.type == \"remove\" && entry.name == \"tableRow\") table = entry.position.parent;\n\t\t\tif (table && table.is(\"element\", \"table\")) tables.add(table);\n\t\t}\n\t\tfor (const table of tables) if (fixTableSections(tableUtils, writer, table)) changed = true;\n\t\treturn changed;\n\t});\n}\n/**\n* Fixes table sections by ensuring that `headingRows` and `footerRows` do not overlap.\n*/\nfunction fixTableSections(tableUtils, writer, table) {\n\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\tconst footerRows = table.getAttribute(\"footerRows\") || 0;\n\tconst rows = tableUtils.getRows(table);\n\tif (headingRows + footerRows > rows) {\n\t\tconst value = Math.max(0, rows - headingRows);\n\t\tupdateNumericAttribute(\"footerRows\", value, table, writer, 0);\n\t\treturn true;\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* A table headings refresh handler which marks the table cells or rows in the differ to have it re-rendered\n* if the headings attribute changed.\n*\n* Table heading rows and heading columns are represented in the model by a `headingRows` and `headingColumns` attributes.\n*\n* When table headings attribute changes, all the cells/rows are marked to re-render to change between `<td>` and `<th>`.\n*\n* @internal\n*/\nfunction tableStructureRefreshHandler(model, editing) {\n\tconst differ = model.document.differ;\n\tconst movedRows = /* @__PURE__ */ new Set();\n\tconst rowsToReconvert = /* @__PURE__ */ new Set();\n\tconst cellsToReconvert = /* @__PURE__ */ new Set();\n\tfor (const change of differ.getChanges()) {\n\t\tlet table;\n\t\tif (change.type == \"attribute\") {\n\t\t\tconst element = change.range.start.nodeAfter;\n\t\t\tif (!element || !element.is(\"element\", \"table\")) continue;\n\t\t\tif (change.attributeKey != \"headingRows\" && change.attributeKey != \"headingColumns\" && change.attributeKey != \"footerRows\") continue;\n\t\t\ttable = element;\n\t\t} else if (change.name == \"tableRow\" || change.name == \"tableCell\") table = change.position.findAncestor(\"table\");\n\t\tif (!table) continue;\n\t\tif (change.type == \"insert\" && change.name == \"tableRow\" && editing.mapper.toViewElement(change.position.nodeAfter)) movedRows.add(change.position.nodeAfter);\n\t\tconst headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\tconst headingColumns = table.getAttribute(\"headingColumns\") || 0;\n\t\tconst tableWalker = new TableWalker(table);\n\t\tfor (const tableSlot of tableWalker) {\n\t\t\tconst viewElement = editing.mapper.toViewElement(tableSlot.cell);\n\t\t\tif (!viewElement || !viewElement.is(\"element\")) continue;\n\t\t\tconst expectedElementName = tableSlot.row < headingRows || tableSlot.column < headingColumns ? \"th\" : \"td\";\n\t\t\tif (viewElement.name != expectedElementName) {\n\t\t\t\tcellsToReconvert.add(tableSlot.cell);\n\t\t\t\tif (movedRows.has(tableSlot.cell.parent)) rowsToReconvert.add(tableSlot.cell.parent);\n\t\t\t}\n\t\t}\n\t}\n\tfor (const item of rowsToReconvert) editing.reconvertItem(item);\n\tfor (const item of cellsToReconvert) editing.reconvertItem(item);\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* A table cell refresh handler which marks the table cell in the differ to have it re-rendered.\n*\n* Model `paragraph` inside a table cell can be rendered as `<span>` or `<p>`. It is rendered as `<span>` if this is the only block\n* element in that table cell and it does not have any attributes. It is rendered as `<p>` otherwise.\n*\n* When table cell content changes, for example a second `paragraph` element is added, we need to ensure that the first `paragraph` is\n* re-rendered so it changes from `<span>` to `<p>`. The easiest way to do it is to re-render the entire table cell.\n*\n* @internal\n*/\nfunction tableCellRefreshHandler(model, editing) {\n\tconst differ = model.document.differ;\n\tconst cellsToCheck = /* @__PURE__ */ new Set();\n\tfor (const change of differ.getChanges()) {\n\t\tconst parent = change.type == \"attribute\" ? change.range.start.parent : change.position.parent;\n\t\tif (parent.is(\"element\", \"tableCell\")) cellsToCheck.add(parent);\n\t}\n\tfor (const tableCell of cellsToCheck.values()) {\n\t\tconst paragraphsToRefresh = Array.from(tableCell.getChildren()).filter((child) => shouldRefresh(child, editing.mapper));\n\t\tfor (const paragraph of paragraphsToRefresh) editing.reconvertItem(paragraph);\n\t}\n}\n/**\n* Check if given model element needs refreshing.\n*/\nfunction shouldRefresh(child, mapper) {\n\tif (!child.is(\"element\", \"paragraph\")) return false;\n\tconst viewElement = mapper.toViewElement(child);\n\tif (!viewElement) return false;\n\treturn isSingleParagraphWithoutAttributes(child) !== viewElement.is(\"element\", \"span\");\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 table/tableediting\n*/\n/**\n* The table editing feature.\n*/\nvar TableEditing = class extends Plugin {\n\t/**\n\t* Handlers for creating additional slots in the table.\n\t*/\n\t_additionalSlots;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._additionalSlots = [];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst conversion = editor.conversion;\n\t\tconst tableUtils = editor.plugins.get(TableUtils);\n\t\teditor.config.define(\"table.enableFooters\", false);\n\t\tconst useFooterElement = !!editor.config.get(\"table.enableFooters\");\n\t\tschema.register(\"table\", {\n\t\t\tinheritAllFrom: \"$blockObject\",\n\t\t\tallowAttributes: [\n\t\t\t\t\"headingRows\",\n\t\t\t\t\"headingColumns\",\n\t\t\t\t...useFooterElement ? [\"footerRows\"] : []\n\t\t\t]\n\t\t});\n\t\tschema.register(\"tableRow\", {\n\t\t\tallowIn: \"table\",\n\t\t\tisLimit: true\n\t\t});\n\t\tschema.register(\"tableCell\", {\n\t\t\tallowContentOf: \"$container\",\n\t\t\tallowIn: \"tableRow\",\n\t\t\tallowAttributes: [\"colspan\", \"rowspan\"],\n\t\t\tisLimit: true,\n\t\t\tisSelectable: true\n\t\t});\n\t\tconversion.for(\"upcast\").add(upcastTableFigure());\n\t\tconversion.for(\"upcast\").add(upcastTable({ enableFooters: useFooterElement }));\n\t\tconversion.for(\"editingDowncast\").elementToStructure({\n\t\t\tmodel: {\n\t\t\t\tname: \"table\",\n\t\t\t\tattributes: [\"headingRows\", ...useFooterElement ? [\"footerRows\"] : []]\n\t\t\t},\n\t\t\tview: downcastTable(tableUtils, {\n\t\t\t\tasWidget: true,\n\t\t\t\tadditionalSlots: this._additionalSlots\n\t\t\t})\n\t\t});\n\t\tconversion.for(\"dataDowncast\").elementToStructure({\n\t\t\tmodel: {\n\t\t\t\tname: \"table\",\n\t\t\t\tattributes: [\"headingRows\", ...useFooterElement ? [\"footerRows\"] : []]\n\t\t\t},\n\t\t\tview: downcastTable(tableUtils, { additionalSlots: this._additionalSlots })\n\t\t});\n\t\tconversion.for(\"upcast\").elementToElement({\n\t\t\tmodel: \"tableRow\",\n\t\t\tview: \"tr\"\n\t\t});\n\t\tconversion.for(\"upcast\").add(skipEmptyTableRow());\n\t\tconversion.for(\"downcast\").elementToElement({\n\t\t\tmodel: \"tableRow\",\n\t\t\tview: downcastRow()\n\t\t});\n\t\tconversion.for(\"upcast\").elementToElement({\n\t\t\tmodel: \"tableCell\",\n\t\t\tview: \"td\"\n\t\t});\n\t\tconversion.for(\"upcast\").elementToElement({\n\t\t\tmodel: \"tableCell\",\n\t\t\tview: \"th\"\n\t\t});\n\t\tconversion.for(\"upcast\").add(ensureParagraphInTableCell(\"td\"));\n\t\tconversion.for(\"upcast\").add(ensureParagraphInTableCell(\"th\"));\n\t\tconversion.for(\"editingDowncast\").elementToElement({\n\t\t\tmodel: \"tableCell\",\n\t\t\tview: downcastCell({\n\t\t\t\tasWidget: true,\n\t\t\t\tcellTypeEnabled: () => isTableCellTypeEnabled(this.editor)\n\t\t\t})\n\t\t});\n\t\tconversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: \"tableCell\",\n\t\t\tview: downcastCell({ cellTypeEnabled: () => isTableCellTypeEnabled(this.editor) })\n\t\t});\n\t\tconversion.for(\"editingDowncast\").elementToElement({\n\t\t\tmodel: \"paragraph\",\n\t\t\tview: convertParagraphInTableCell({ asWidget: true }),\n\t\t\tconverterPriority: \"high\"\n\t\t});\n\t\tconversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: \"paragraph\",\n\t\t\tview: convertParagraphInTableCell(),\n\t\t\tconverterPriority: \"high\"\n\t\t});\n\t\tconversion.for(\"downcast\").attributeToAttribute({\n\t\t\tmodel: \"colspan\",\n\t\t\tview: \"colspan\"\n\t\t});\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: \"colspan\",\n\t\t\t\tvalue: upcastCellSpan(\"colspan\")\n\t\t\t},\n\t\t\tview: \"colspan\"\n\t\t});\n\t\tconversion.for(\"downcast\").attributeToAttribute({\n\t\t\tmodel: \"rowspan\",\n\t\t\tview: \"rowspan\"\n\t\t});\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: \"rowspan\",\n\t\t\t\tvalue: upcastCellSpan(\"rowspan\")\n\t\t\t},\n\t\t\tview: \"rowspan\"\n\t\t});\n\t\tthis._addPlainTableOutputConverters();\n\t\teditor.config.define(\"table.defaultHeadings.rows\", 0);\n\t\teditor.config.define(\"table.defaultHeadings.columns\", 0);\n\t\teditor.config.define(\"table.defaultFooters\", 0);\n\t\teditor.config.define(\"table.showHiddenBorders\", true);\n\t\tif (editor.config.get(\"table.showHiddenBorders\")) editor.editing.view.change((writer) => {\n\t\t\tfor (const root of editor.editing.view.document.roots) writer.addClass(\"ck-table-show-hidden-borders\", root);\n\t\t});\n\t\teditor.commands.add(\"insertTable\", new InsertTableCommand(editor));\n\t\teditor.commands.add(\"insertTableRowAbove\", new InsertRowCommand(editor, { order: \"above\" }));\n\t\teditor.commands.add(\"insertTableRowBelow\", new InsertRowCommand(editor, { order: \"below\" }));\n\t\teditor.commands.add(\"insertTableColumnLeft\", new InsertColumnCommand(editor, { order: \"left\" }));\n\t\teditor.commands.add(\"insertTableColumnRight\", new InsertColumnCommand(editor, { order: \"right\" }));\n\t\teditor.commands.add(\"removeTableRow\", new RemoveRowCommand(editor));\n\t\teditor.commands.add(\"removeTableColumn\", new RemoveColumnCommand(editor));\n\t\teditor.commands.add(\"splitTableCellVertically\", new SplitCellCommand(editor, { direction: \"vertically\" }));\n\t\teditor.commands.add(\"splitTableCellHorizontally\", new SplitCellCommand(editor, { direction: \"horizontally\" }));\n\t\teditor.commands.add(\"mergeTableCells\", new MergeCellsCommand(editor));\n\t\teditor.commands.add(\"mergeTableCellRight\", new MergeCellCommand(editor, { direction: \"right\" }));\n\t\teditor.commands.add(\"mergeTableCellLeft\", new MergeCellCommand(editor, { direction: \"left\" }));\n\t\teditor.commands.add(\"mergeTableCellDown\", new MergeCellCommand(editor, { direction: \"down\" }));\n\t\teditor.commands.add(\"mergeTableCellUp\", new MergeCellCommand(editor, { direction: \"up\" }));\n\t\teditor.commands.add(\"setTableColumnHeader\", new SetHeaderColumnCommand(editor));\n\t\teditor.commands.add(\"setTableRowHeader\", new SetHeaderRowCommand(editor));\n\t\tif (useFooterElement) editor.commands.add(\"setTableFooterRow\", new SetFooterRowCommand(editor));\n\t\teditor.commands.add(\"selectTableRow\", new SelectRowCommand(editor));\n\t\teditor.commands.add(\"selectTableColumn\", new SelectColumnCommand(editor));\n\t\tinjectTableLayoutPostFixer(model);\n\t\tinjectTableCellParagraphPostFixer(model);\n\t\tif (useFooterElement) injectTableStructurePostFixer(editor);\n\t\tthis.listenTo(model.document, \"change:data\", () => {\n\t\t\tif (!isTableCellTypeEnabled(editor)) tableStructureRefreshHandler(model, editor.editing);\n\t\t\ttableCellRefreshHandler(model, editor.editing);\n\t\t});\n\t}\n\t/**\n\t* Registers downcast handler for the additional table slot.\n\t*/\n\tregisterAdditionalSlot(slotHandler) {\n\t\tthis._additionalSlots.push(slotHandler);\n\t}\n\t/**\n\t* Adds converters for plain table output. These converters are used either when the `PlainTableOutput` plugin is loaded\n\t* or when content is processed by the clipboard pipeline, ensuring that pasted tables are not wrapped in a <figure> element.\n\t*/\n\t_addPlainTableOutputConverters() {\n\t\tconst editor = this.editor;\n\t\teditor.conversion.for(\"dataDowncast\").elementToStructure({\n\t\t\tmodel: \"table\",\n\t\t\tview: convertPlainTable(editor),\n\t\t\tconverterPriority: \"high\"\n\t\t});\n\t\tif (editor.plugins.has(\"TableCaptionEditing\")) editor.conversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: \"caption\",\n\t\t\tview: convertPlainTableCaption(editor),\n\t\t\tconverterPriority: \"high\"\n\t\t});\n\t\tif (editor.plugins.has(\"TablePropertiesEditing\")) downcastTableBorderAndBackgroundAttributes(editor);\n\t}\n};\n/**\n* Returns fixed colspan and rowspan attrbutes values.\n*\n* @param type colspan or rowspan.\n* @returns conversion value function.\n*/\nfunction upcastCellSpan(type) {\n\treturn (cell) => {\n\t\tconst span = parseInt(cell.getAttribute(type));\n\t\tif (Number.isNaN(span) || span <= 0) return null;\n\t\treturn span;\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 table/ui/inserttableview\n*/\n/**\n* The table size view.\n*\n* It renders a 10x10 grid to choose the inserted table size.\n*\n* @internal\n*/\nvar InsertTableView = class extends View {\n\t/**\n\t* A collection of table size box items.\n\t*/\n\titems;\n\t/**\n\t* Listen to `keydown` events fired in this view's main element.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Tracks information about the DOM focus in the grid.\n\t*/\n\tfocusTracker;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.items = this._createGridCollection();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.set(\"rows\", 0);\n\t\tthis.set(\"columns\", 0);\n\t\tthis.bind(\"label\").to(this, \"columns\", this, \"rows\", (columns, rows) => `${rows} × ${columns}`);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\"] },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: [\"ck-insert-table-dropdown__grid\"] },\n\t\t\t\ton: { \"mouseover@.ck-insert-table-dropdown-grid-box\": bind.to(\"boxover\") },\n\t\t\t\tchildren: this.items\n\t\t\t}, {\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\"ck\", \"ck-insert-table-dropdown__label\"],\n\t\t\t\t\t\"aria-hidden\": true\n\t\t\t\t},\n\t\t\t\tchildren: [{ text: bind.to(\"label\") }]\n\t\t\t}],\n\t\t\ton: {\n\t\t\t\tmousedown: bind.to((evt) => {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t}),\n\t\t\t\tclick: bind.to(() => {\n\t\t\t\t\tthis.fire(\"execute\");\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\t\tthis.on(\"boxover\", (evt, domEvt) => {\n\t\t\tconst { row, column } = domEvt.target.dataset;\n\t\t\tthis.items.get((parseInt(row, 10) - 1) * 10 + (parseInt(column, 10) - 1)).focus();\n\t\t});\n\t\tthis.focusTracker.on(\"change:focusedElement\", (evt, name, focusedElement) => {\n\t\t\tif (!focusedElement) return;\n\t\t\tconst { row, column } = focusedElement.dataset;\n\t\t\tthis.set({\n\t\t\t\trows: parseInt(row),\n\t\t\t\tcolumns: parseInt(column)\n\t\t\t});\n\t\t});\n\t\tthis.on(\"change:columns\", () => this._highlightGridBoxes());\n\t\tthis.on(\"change:rows\", () => this._highlightGridBoxes());\n\t}\n\trender() {\n\t\tsuper.render();\n\t\taddKeyboardHandlingForGrid({\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tgridItems: this.items,\n\t\t\tnumberOfColumns: 10,\n\t\t\tuiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n\t\t});\n\t\tfor (const item of this.items) this.focusTracker.add(item.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* Resets the rows and columns selection.\n\t*/\n\treset() {\n\t\tthis.set({\n\t\t\trows: 1,\n\t\t\tcolumns: 1\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.items.get(0).focus();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocusLast() {\n\t\tthis.items.get(0).focus();\n\t}\n\t/**\n\t* Highlights grid boxes depending on rows and columns selected.\n\t*/\n\t_highlightGridBoxes() {\n\t\tconst rows = this.rows;\n\t\tconst columns = this.columns;\n\t\tthis.items.map((boxView, index) => {\n\t\t\tconst itemRow = Math.floor(index / 10);\n\t\t\tconst itemColumn = index % 10;\n\t\t\tconst isOn = itemRow < rows && itemColumn < columns;\n\t\t\tboxView.set(\"isOn\", isOn);\n\t\t});\n\t}\n\t/**\n\t* Creates a new Button for the grid.\n\t*\n\t* @param locale The locale instance.\n\t* @param row Row number.\n\t* @param column Column number.\n\t* @param label The grid button label.\n\t*/\n\t_createGridButton(locale, row, column, label) {\n\t\tconst button = new ButtonView(locale);\n\t\tbutton.set({\n\t\t\tlabel,\n\t\t\tclass: \"ck-insert-table-dropdown-grid-box\"\n\t\t});\n\t\tbutton.extendTemplate({ attributes: {\n\t\t\t\"data-row\": row,\n\t\t\t\"data-column\": column\n\t\t} });\n\t\treturn button;\n\t}\n\t/**\n\t* @returns A view collection containing boxes to be placed in a table grid.\n\t*/\n\t_createGridCollection() {\n\t\tconst boxes = [];\n\t\tfor (let index = 0; index < 100; index++) {\n\t\t\tconst row = Math.floor(index / 10);\n\t\t\tconst column = index % 10;\n\t\t\tconst label = `${row + 1} × ${column + 1}`;\n\t\t\tboxes.push(this._createGridButton(this.locale, row + 1, column + 1, label));\n\t\t}\n\t\treturn this.createCollection(boxes);\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 table/tableui\n*/\n/**\n* The table UI plugin. It introduces:\n*\n* * The `'insertTable'` dropdown,\n* * The `'menuBar:insertTable'` menu bar menu,\n* * The `'tableColumn'` dropdown,\n* * The `'tableRow'` dropdown,\n* * The `'mergeTableCells'` split button.\n*\n* The `'tableColumn'`, `'tableRow'` and `'mergeTableCells'` dropdowns work best with {@link module:table/tabletoolbar~TableToolbar}.\n*/\nvar TableUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\tconst isContentLtr = editor.locale.contentLanguageDirection === \"ltr\";\n\t\tconst areTableFootersEnabled = !!editor.config.get(\"table.enableFooters\");\n\t\teditor.ui.componentFactory.add(\"insertTable\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"insertTable\");\n\t\t\tconst dropdownView = createDropdown(locale);\n\t\t\tdropdownView.bind(\"isEnabled\").to(command);\n\t\t\tdropdownView.buttonView.set({\n\t\t\t\ticon: IconTable,\n\t\t\t\tlabel: t(\"Insert table\"),\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tlet insertTableView;\n\t\t\tdropdownView.on(\"change:isOpen\", () => {\n\t\t\t\tif (insertTableView) return;\n\t\t\t\tinsertTableView = new InsertTableView(locale);\n\t\t\t\tdropdownView.panelView.children.add(insertTableView);\n\t\t\t\tinsertTableView.delegate(\"execute\").to(dropdownView);\n\t\t\t\tdropdownView.on(\"execute\", () => {\n\t\t\t\t\teditor.execute(\"insertTable\", {\n\t\t\t\t\t\trows: insertTableView.rows,\n\t\t\t\t\t\tcolumns: insertTableView.columns\n\t\t\t\t\t});\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:insertTable\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"insertTable\");\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tconst insertTableView = new InsertTableView(locale);\n\t\t\tinsertTableView.delegate(\"execute\").to(menuView);\n\t\t\tmenuView.on(\"change:isOpen\", (event, name, isOpen) => {\n\t\t\t\tif (!isOpen) insertTableView.reset();\n\t\t\t});\n\t\t\tinsertTableView.on(\"execute\", () => {\n\t\t\t\teditor.execute(\"insertTable\", {\n\t\t\t\t\trows: insertTableView.rows,\n\t\t\t\t\tcolumns: insertTableView.columns\n\t\t\t\t});\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\tmenuView.buttonView.set({\n\t\t\t\tlabel: t(\"Table\"),\n\t\t\t\ticon: IconTable\n\t\t\t});\n\t\t\tmenuView.panelView.children.add(insertTableView);\n\t\t\tmenuView.bind(\"isEnabled\").to(command);\n\t\t\treturn menuView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"tableColumn\", (locale) => {\n\t\t\tconst options = [\n\t\t\t\t{\n\t\t\t\t\ttype: \"switchbutton\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"setTableColumnHeader\",\n\t\t\t\t\t\tlabel: t(\"Header column\"),\n\t\t\t\t\t\tbindIsOn: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ type: \"separator\" },\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? \"insertTableColumnLeft\" : \"insertTableColumnRight\",\n\t\t\t\t\t\tlabel: t(\"Insert column left\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? \"insertTableColumnRight\" : \"insertTableColumnLeft\",\n\t\t\t\t\t\tlabel: t(\"Insert column right\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"removeTableColumn\",\n\t\t\t\t\t\tlabel: t(\"Delete column\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"selectTableColumn\",\n\t\t\t\t\t\tlabel: t(\"Select column\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t];\n\t\t\treturn this._prepareDropdown(t(\"Column\"), IconTableColumn, options, locale);\n\t\t});\n\t\teditor.ui.componentFactory.add(\"tableRow\", (locale) => {\n\t\t\tconst options = [\n\t\t\t\t{\n\t\t\t\t\ttype: \"switchbutton\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"setTableRowHeader\",\n\t\t\t\t\t\tlabel: t(\"Header row\"),\n\t\t\t\t\t\tbindIsOn: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tareTableFootersEnabled && {\n\t\t\t\t\ttype: \"switchbutton\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"setTableFooterRow\",\n\t\t\t\t\t\tlabel: t(\"Footer row\"),\n\t\t\t\t\t\tbindIsOn: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ type: \"separator\" },\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"insertTableRowAbove\",\n\t\t\t\t\t\tlabel: t(\"Insert row above\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"insertTableRowBelow\",\n\t\t\t\t\t\tlabel: t(\"Insert row below\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"removeTableRow\",\n\t\t\t\t\t\tlabel: t(\"Delete row\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"selectTableRow\",\n\t\t\t\t\t\tlabel: t(\"Select row\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t].filter(Boolean);\n\t\t\treturn this._prepareDropdown(t(\"Row\"), IconTableRow, options, locale);\n\t\t});\n\t\teditor.ui.componentFactory.add(\"mergeTableCells\", (locale) => {\n\t\t\tconst options = [\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"mergeTableCellUp\",\n\t\t\t\t\t\tlabel: t(\"Merge cell up\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? \"mergeTableCellRight\" : \"mergeTableCellLeft\",\n\t\t\t\t\t\tlabel: t(\"Merge cell right\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"mergeTableCellDown\",\n\t\t\t\t\t\tlabel: t(\"Merge cell down\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? \"mergeTableCellLeft\" : \"mergeTableCellRight\",\n\t\t\t\t\t\tlabel: t(\"Merge cell left\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ type: \"separator\" },\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"splitTableCellVertically\",\n\t\t\t\t\t\tlabel: t(\"Split cell vertically\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"button\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: \"splitTableCellHorizontally\",\n\t\t\t\t\t\tlabel: t(\"Split cell horizontally\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t];\n\t\t\treturn this._prepareMergeSplitButtonDropdown(t(\"Merge cells\"), IconTableMergeCell, options, locale);\n\t\t});\n\t}\n\t/**\n\t* Creates a dropdown view from a set of options.\n\t*\n\t* @param label The dropdown button label.\n\t* @param icon An icon for the dropdown button.\n\t* @param options The list of options for the dropdown.\n\t*/\n\t_prepareDropdown(label, icon, options, locale) {\n\t\tconst editor = this.editor;\n\t\tconst dropdownView = createDropdown(locale);\n\t\tconst commands = this._fillDropdownWithListOptions(dropdownView, options);\n\t\tdropdownView.buttonView.set({\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t});\n\t\tdropdownView.bind(\"isEnabled\").toMany(commands, \"isEnabled\", (...areEnabled) => {\n\t\t\treturn areEnabled.some((isEnabled) => isEnabled);\n\t\t});\n\t\tthis.listenTo(dropdownView, \"execute\", (evt) => {\n\t\t\teditor.execute(evt.source.commandName);\n\t\t\tif (!(evt.source instanceof SwitchButtonView)) editor.editing.view.focus();\n\t\t});\n\t\treturn dropdownView;\n\t}\n\t/**\n\t* Creates a dropdown view with a {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} for\n\t* merge (and split)–related commands.\n\t*\n\t* @param label The dropdown button label.\n\t* @param icon An icon for the dropdown button.\n\t* @param options The list of options for the dropdown.\n\t*/\n\t_prepareMergeSplitButtonDropdown(label, icon, options, locale) {\n\t\tconst editor = this.editor;\n\t\tconst dropdownView = createDropdown(locale, SplitButtonView);\n\t\tconst mergeCommandName = \"mergeTableCells\";\n\t\tconst mergeCommand = editor.commands.get(mergeCommandName);\n\t\tconst commands = this._fillDropdownWithListOptions(dropdownView, options);\n\t\tdropdownView.buttonView.set({\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true,\n\t\t\tisEnabled: true\n\t\t});\n\t\tdropdownView.bind(\"isEnabled\").toMany([mergeCommand, ...commands], \"isEnabled\", (...areEnabled) => {\n\t\t\treturn areEnabled.some((isEnabled) => isEnabled);\n\t\t});\n\t\tthis.listenTo(dropdownView.buttonView, \"execute\", () => {\n\t\t\teditor.execute(mergeCommandName);\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\tthis.listenTo(dropdownView, \"execute\", (evt) => {\n\t\t\teditor.execute(evt.source.commandName);\n\t\t\teditor.editing.view.focus();\n\t\t});\n\t\treturn dropdownView;\n\t}\n\t/**\n\t* Injects a {@link module:ui/list/listview~ListView} into the passed dropdown with buttons\n\t* which execute editor commands as configured in passed options.\n\t*\n\t* @param options The list of options for the dropdown.\n\t* @returns Commands the list options are interacting with.\n\t*/\n\t_fillDropdownWithListOptions(dropdownView, options) {\n\t\tconst editor = this.editor;\n\t\tconst commands = [];\n\t\tconst itemDefinitions = new Collection();\n\t\tfor (const option of options) addListOption(option, editor, commands, itemDefinitions);\n\t\taddListToDropdown(dropdownView, itemDefinitions);\n\t\treturn commands;\n\t}\n};\n/**\n* Adds an option to a list view.\n*\n* @param option A configuration option.\n* @param commands The list of commands to update.\n* @param itemDefinitions A collection of dropdown items to update with the given option.\n*/\nfunction addListOption(option, editor, commands, itemDefinitions) {\n\tif (option.type === \"button\" || option.type === \"switchbutton\") {\n\t\tconst model = option.model = new UIModel(option.model);\n\t\tconst { commandName, bindIsOn } = option.model;\n\t\tconst command = editor.commands.get(commandName);\n\t\tcommands.push(command);\n\t\tmodel.set({ commandName });\n\t\tmodel.bind(\"isEnabled\").to(command);\n\t\tif (bindIsOn) model.bind(\"isOn\").to(command, \"value\");\n\t\tmodel.set({ withText: true });\n\t}\n\titemDefinitions.add(option);\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 table/tableselection\n*/\n/**\n* This plugin enables the advanced table cells, rows and columns selection.\n* It is loaded automatically by the {@link module:table/table~Table} plugin.\n*/\nvar TableSelection = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableSelection\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableUtils, TableUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tthis.listenTo(model, \"deleteContent\", (evt, args) => this._handleDeleteContent(evt, args), { priority: \"high\" });\n\t\tthis.listenTo(view.document, \"insertText\", (evt, data) => this._handleInsertTextEvent(evt, data), { priority: \"high\" });\n\t\tthis._defineSelectionConverter();\n\t\tthis._enablePluginDisabling();\n\t}\n\t/**\n\t* Returns the currently selected table cells or `null` if it is not a table cells selection.\n\t*/\n\tgetSelectedTableCells() {\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst selectedCells = tableUtils.getSelectedTableCells(selection);\n\t\tif (selectedCells.length == 0) return null;\n\t\treturn selectedCells;\n\t}\n\t/**\n\t* Returns the selected table fragment as a document fragment.\n\t*/\n\tgetSelectionAsFragment() {\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst selectedCells = this.getSelectedTableCells();\n\t\tif (!selectedCells) return null;\n\t\treturn this.editor.model.change((writer) => {\n\t\t\tconst documentFragment = writer.createDocumentFragment();\n\t\t\tconst { first: firstColumn, last: lastColumn } = tableUtils.getColumnIndexes(selectedCells);\n\t\t\tconst { first: firstRow, last: lastRow } = tableUtils.getRowIndexes(selectedCells);\n\t\t\tconst sourceTable = selectedCells[0].findAncestor(\"table\");\n\t\t\tlet adjustedLastRow = lastRow;\n\t\t\tlet adjustedLastColumn = lastColumn;\n\t\t\tif (tableUtils.isSelectionRectangular(selectedCells)) {\n\t\t\t\tconst dimensions = {\n\t\t\t\t\tfirstColumn,\n\t\t\t\t\tlastColumn,\n\t\t\t\t\tfirstRow,\n\t\t\t\t\tlastRow\n\t\t\t\t};\n\t\t\t\tadjustedLastRow = adjustLastRowIndex(sourceTable, dimensions);\n\t\t\t\tadjustedLastColumn = adjustLastColumnIndex(sourceTable, dimensions);\n\t\t\t}\n\t\t\tconst table = cropTableToDimensions(sourceTable, {\n\t\t\t\tstartRow: firstRow,\n\t\t\t\tstartColumn: firstColumn,\n\t\t\t\tendRow: adjustedLastRow,\n\t\t\t\tendColumn: adjustedLastColumn\n\t\t\t}, writer);\n\t\t\twriter.insert(table, documentFragment, 0);\n\t\t\treturn documentFragment;\n\t\t});\n\t}\n\t/**\n\t* Sets the model selection based on given anchor and target cells (can be the same cell).\n\t* Takes care of setting the backward flag.\n\t*\n\t* ```ts\n\t* const modelRoot = editor.model.document.getRoot();\n\t* const firstCell = modelRoot.getNodeByPath( [ 0, 0, 0 ] );\n\t* const lastCell = modelRoot.getNodeByPath( [ 0, 0, 1 ] );\n\t*\n\t* const tableSelection = editor.plugins.get( 'TableSelection' );\n\t* tableSelection.setCellSelection( firstCell, lastCell );\n\t* ```\n\t*/\n\tsetCellSelection(anchorCell, targetCell) {\n\t\tconst cellsToSelect = this._getCellsToSelect(anchorCell, targetCell);\n\t\tthis.editor.model.change((writer) => {\n\t\t\twriter.setSelection(cellsToSelect.cells.map((cell) => writer.createRangeOn(cell)), { backward: cellsToSelect.backward });\n\t\t});\n\t}\n\t/**\n\t* Returns the focus cell from the current selection.\n\t*/\n\tgetFocusCell() {\n\t\tconst element = [...this.editor.model.document.selection.getRanges()].pop().getContainedElement();\n\t\tif (element && element.is(\"element\", \"tableCell\")) return element;\n\t\treturn null;\n\t}\n\t/**\n\t* Returns the anchor cell from the current selection.\n\t*/\n\tgetAnchorCell() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst element = first(selection.getRanges()).getContainedElement();\n\t\tif (element && element.is(\"element\", \"tableCell\")) return element;\n\t\treturn null;\n\t}\n\t/**\n\t* Defines a selection converter which marks the selected cells with a specific class.\n\t*\n\t* The real DOM selection is put in the last cell. Since the order of ranges is dependent on whether the\n\t* selection is backward or not, the last cell will usually be close to the \"focus\" end of the selection\n\t* (a selection has anchor and focus).\n\t*\n\t* The real DOM selection is then hidden with CSS.\n\t*/\n\t_defineSelectionConverter() {\n\t\tconst editor = this.editor;\n\t\tconst highlighted = /* @__PURE__ */ new Set();\n\t\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => dispatcher.on(\"selection\", (evt, data, conversionApi) => {\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tclearHighlightedTableCells(viewWriter);\n\t\t\tconst selectedCells = this.getSelectedTableCells();\n\t\t\tif (!selectedCells) return;\n\t\t\tfor (const tableCell of selectedCells) {\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement(tableCell);\n\t\t\t\tviewWriter.addClass(\"ck-editor__editable_selected\", viewElement);\n\t\t\t\thighlighted.add(viewElement);\n\t\t\t}\n\t\t\tconst lastViewCell = conversionApi.mapper.toViewElement(selectedCells[selectedCells.length - 1]);\n\t\t\tviewWriter.setSelection(lastViewCell, 0);\n\t\t}, { priority: \"lowest\" }));\n\t\tfunction clearHighlightedTableCells(viewWriter) {\n\t\t\tfor (const previouslyHighlighted of highlighted) viewWriter.removeClass(\"ck-editor__editable_selected\", previouslyHighlighted);\n\t\t\thighlighted.clear();\n\t\t}\n\t}\n\t/**\n\t* Creates a listener that reacts to changes in {@link #isEnabled} and, if the plugin was disabled,\n\t* it collapses the multi-cell selection to a regular selection placed inside a table cell.\n\t*\n\t* This listener helps features that disable the table selection plugin bring the selection\n\t* to a clear state they can work with (for instance, because they don't support multiple cell selection).\n\t*/\n\t_enablePluginDisabling() {\n\t\tconst editor = this.editor;\n\t\tthis.on(\"change:isEnabled\", () => {\n\t\t\tif (!this.isEnabled) {\n\t\t\t\tconst selectedCells = this.getSelectedTableCells();\n\t\t\t\tif (!selectedCells) return;\n\t\t\t\teditor.model.change((writer) => {\n\t\t\t\t\tconst position = writer.createPositionAt(selectedCells[0], 0);\n\t\t\t\t\tconst range = editor.model.schema.getNearestSelectionRange(position);\n\t\t\t\t\twriter.setSelection(range);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Overrides the default `model.deleteContent()` behavior over a selected table fragment.\n\t*\n\t* @param args Delete content method arguments.\n\t*/\n\t_handleDeleteContent(event, args) {\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst selection = args[0];\n\t\tconst options = args[1];\n\t\tconst model = this.editor.model;\n\t\tconst isBackward = !options || options.direction == \"backward\";\n\t\tconst selectedTableCells = tableUtils.getSelectedTableCells(selection);\n\t\tif (!selectedTableCells.length) return;\n\t\tevent.stop();\n\t\tmodel.change((writer) => {\n\t\t\tconst tableCellToSelect = selectedTableCells[isBackward ? selectedTableCells.length - 1 : 0];\n\t\t\tmodel.change((writer) => {\n\t\t\t\tfor (const tableCell of selectedTableCells) model.deleteContent(writer.createSelection(tableCell, \"in\"));\n\t\t\t});\n\t\t\tconst rangeToSelect = model.schema.getNearestSelectionRange(writer.createPositionAt(tableCellToSelect, 0));\n\t\t\tif (selection.is(\"documentSelection\")) writer.setSelection(rangeToSelect);\n\t\t\telse selection.setTo(rangeToSelect);\n\t\t});\n\t}\n\t/**\n\t* This handler makes it possible to remove the content of all selected cells by starting to type.\n\t* If you take a look at {@link #_defineSelectionConverter} you will find out that despite the multi-cell selection being set\n\t* in the model, the view selection is collapsed in the last cell (because most browsers are unable to render multi-cell selections;\n\t* yes, it's a hack).\n\t*\n\t* When multiple cells are selected in the model and the user starts to type, the\n\t* {@link module:engine/view/document~ViewDocument#event:insertText} event carries information provided by the\n\t* beforeinput DOM  event, that in turn only knows about this collapsed DOM selection in the last cell.\n\t*\n\t* As a result, the selected cells have no chance to be cleaned up. To fix this, this listener intercepts\n\t* the event and injects the custom view selection in the data that translates correctly to the actual state\n\t* of the multi-cell selection in the model.\n\t*\n\t* @param data Insert text event data.\n\t*/\n\t_handleInsertTextEvent(evt, data) {\n\t\tconst editor = this.editor;\n\t\tconst selectedCells = this.getSelectedTableCells();\n\t\tif (!selectedCells) return;\n\t\tconst view = editor.editing.view;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst viewRanges = selectedCells.map((tableCell) => view.createRangeOn(mapper.toViewElement(tableCell)));\n\t\tdata.selection = view.createSelection(viewRanges);\n\t\tdata.preventDefault();\n\t}\n\t/**\n\t* Returns an array of table cells that should be selected based on the\n\t* given anchor cell and target (focus) cell.\n\t*\n\t* The cells are returned in a reverse direction if the selection is backward.\n\t*/\n\t_getCellsToSelect(anchorCell, targetCell) {\n\t\tconst tableUtils = this.editor.plugins.get(\"TableUtils\");\n\t\tconst startLocation = tableUtils.getCellLocation(anchorCell);\n\t\tconst endLocation = tableUtils.getCellLocation(targetCell);\n\t\tconst startRow = Math.min(startLocation.row, endLocation.row);\n\t\tconst endRow = Math.max(startLocation.row, endLocation.row);\n\t\tconst startColumn = Math.min(startLocation.column, endLocation.column);\n\t\tconst endColumnExtraColspan = parseInt(targetCell.getAttribute(\"colspan\") || \"1\") - 1;\n\t\tconst endColumn = Math.max(startLocation.column, endLocation.column + endColumnExtraColspan);\n\t\tconst selectionMap = new Array(endRow - startRow + 1).fill(null).map(() => []);\n\t\tconst walkerOptions = {\n\t\t\tstartRow,\n\t\t\tendRow,\n\t\t\tstartColumn,\n\t\t\tendColumn\n\t\t};\n\t\tfor (const { row, cell } of new TableWalker(anchorCell.findAncestor(\"table\"), walkerOptions)) selectionMap[row - startRow].push(cell);\n\t\tconst flipVertically = endLocation.row < startLocation.row;\n\t\tconst flipHorizontally = endLocation.column < startLocation.column;\n\t\tif (flipVertically) selectionMap.reverse();\n\t\tif (flipHorizontally) selectionMap.forEach((row) => row.reverse());\n\t\treturn {\n\t\t\tcells: selectionMap.flat(),\n\t\t\tbackward: flipVertically || flipHorizontally\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* This plugin adds support for copying/cutting/pasting fragments of tables.\n* It is loaded automatically by the {@link module:table/table~Table} plugin.\n*/\nvar TableClipboard = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableClipboard\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tClipboardMarkersUtils,\n\t\t\tClipboardPipeline,\n\t\t\tTableSelection,\n\t\t\tTableUtils\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst viewDocument = this.editor.editing.view.document;\n\t\tthis.listenTo(viewDocument, \"copy\", (evt, data) => this._onCopyCut(evt, data));\n\t\tthis.listenTo(viewDocument, \"cut\", (evt, data) => this._onCopyCut(evt, data));\n\t\tthis._listenToContentInsertion();\n\t\tthis.decorate(\"_replaceTableSlotCell\");\n\t}\n\t/**\n\t* Sets up listening for events from the clipboard pipeline to properly handle\n\t* table content merging during paste/drop operations.\n\t*\n\t* When a user is dragging and dropping a table, we want to insert the entire table into\n\t* a table cell instead of merging table contents. For paste and other events,\n\t* the normal table merge behavior is applied.\n\t*/\n\t_listenToContentInsertion() {\n\t\tconst { editor } = this;\n\t\tconst clipboardPipeline = editor.plugins.get(ClipboardPipeline);\n\t\tconst tableSelection = editor.plugins.get(TableSelection);\n\t\tlet isPaste = false;\n\t\tclipboardPipeline.on(\"contentInsertion\", (evt, data) => {\n\t\t\tisPaste = data.method === \"paste\";\n\t\t});\n\t\tthis.listenTo(editor.model, \"insertContent\", (evt, [content, selectable]) => {\n\t\t\tif (isPaste || tableSelection.getSelectedTableCells() !== null) this._onInsertContent(evt, content, selectable);\n\t\t}, { priority: \"high\" });\n\t\tclipboardPipeline.on(\"contentInsertion\", () => {\n\t\t\tisPaste = false;\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* Copies table content to a clipboard on \"copy\" & \"cut\" events.\n\t*\n\t* @param evt An object containing information about the handled event.\n\t* @param data Clipboard event data.\n\t*/\n\t_onCopyCut(evt, data) {\n\t\tconst view = this.editor.editing.view;\n\t\tconst tableSelection = this.editor.plugins.get(TableSelection);\n\t\tconst clipboardMarkersUtils = this.editor.plugins.get(ClipboardMarkersUtils);\n\t\tif (!tableSelection.getSelectedTableCells()) return;\n\t\tif (evt.name == \"cut\" && !this.editor.model.canEditAt(this.editor.model.document.selection)) return;\n\t\tdata.preventDefault();\n\t\tevt.stop();\n\t\tthis.editor.model.enqueueChange({ isUndoable: evt.name === \"cut\" }, () => {\n\t\t\tconst documentFragment = clipboardMarkersUtils._copySelectedFragmentWithMarkers(evt.name, this.editor.model.document.selection, () => tableSelection.getSelectionAsFragment());\n\t\t\tview.document.fire(\"clipboardOutput\", {\n\t\t\t\tdataTransfer: data.dataTransfer,\n\t\t\t\tcontent: this.editor.data.toView(documentFragment),\n\t\t\t\tmethod: evt.name\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Overrides default {@link module:engine/model/model~Model#insertContent `model.insertContent()`} method to handle pasting table inside\n\t* selected table fragment.\n\t*\n\t* Depending on selected table fragment:\n\t* - If a selected table fragment is smaller than paste table it will crop pasted table to match dimensions.\n\t* - If dimensions are equal it will replace selected table fragment with a pasted table contents.\n\t*\n\t* @param content The content to insert.\n\t* @param selectable The selection into which the content should be inserted.\n\t* If not provided the current model document selection will be used.\n\t*/\n\t_onInsertContent(evt, content, selectable) {\n\t\tif (selectable && !selectable.is(\"documentSelection\")) return;\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst clipboardMarkersUtils = this.editor.plugins.get(ClipboardMarkersUtils);\n\t\tconst pastedTable = this.getTableIfOnlyTableInContent(content, model);\n\t\tif (!pastedTable) return;\n\t\tconst selectedTableCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tif (!selectedTableCells.length) {\n\t\t\tremoveEmptyRowsColumns(pastedTable, tableUtils);\n\t\t\treturn;\n\t\t}\n\t\tevt.stop();\n\t\tif (content.is(\"documentFragment\")) clipboardMarkersUtils._pasteMarkersIntoTransformedElement(content.markers, (writer) => this._replaceSelectedCells(pastedTable, selectedTableCells, writer));\n\t\telse this.editor.model.change((writer) => {\n\t\t\tthis._replaceSelectedCells(pastedTable, selectedTableCells, writer);\n\t\t});\n\t}\n\t/**\n\t* Inserts provided `selectedTableCells` into `pastedTable`.\n\t*/\n\t_replaceSelectedCells(pastedTable, selectedTableCells, writer) {\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst pastedDimensions = {\n\t\t\twidth: tableUtils.getColumns(pastedTable),\n\t\t\theight: tableUtils.getRows(pastedTable)\n\t\t};\n\t\tconst selection = prepareTableForPasting(selectedTableCells, pastedDimensions, writer, tableUtils);\n\t\tconst selectionHeight = selection.lastRow - selection.firstRow + 1;\n\t\tconst selectionWidth = selection.lastColumn - selection.firstColumn + 1;\n\t\tconst cropDimensions = {\n\t\t\tstartRow: 0,\n\t\t\tstartColumn: 0,\n\t\t\tendRow: Math.min(selectionHeight, pastedDimensions.height) - 1,\n\t\t\tendColumn: Math.min(selectionWidth, pastedDimensions.width) - 1\n\t\t};\n\t\tpastedTable = cropTableToDimensions(pastedTable, cropDimensions, writer);\n\t\tconst selectedTable = selectedTableCells[0].findAncestor(\"table\");\n\t\tconst cellsToSelect = this._replaceSelectedCellsWithPasted(pastedTable, pastedDimensions, selectedTable, selection, writer, tableUtils);\n\t\tif (this.editor.plugins.get(\"TableSelection\").isEnabled) {\n\t\t\tconst selectionRanges = tableUtils.sortRanges(cellsToSelect.map((cell) => writer.createRangeOn(cell)));\n\t\t\twriter.setSelection(selectionRanges);\n\t\t} else writer.setSelection(cellsToSelect[0], 0);\n\t\treturn selectedTable;\n\t}\n\t/**\n\t* Replaces the part of selectedTable with pastedTable.\n\t*/\n\t_replaceSelectedCellsWithPasted(pastedTable, pastedDimensions, selectedTable, selection, writer, tableUtils) {\n\t\tconst { width: pastedWidth, height: pastedHeight } = pastedDimensions;\n\t\tconst pastedTableLocationMap = createLocationMap(pastedTable, pastedWidth, pastedHeight);\n\t\tconst selectedTableMap = [...new TableWalker(selectedTable, {\n\t\t\tstartRow: selection.firstRow,\n\t\t\tendRow: selection.lastRow,\n\t\t\tstartColumn: selection.firstColumn,\n\t\t\tendColumn: selection.lastColumn,\n\t\t\tincludeAllSlots: true\n\t\t})];\n\t\tconst cellsToSelect = [];\n\t\tlet insertPosition;\n\t\tfor (const tableSlot of selectedTableMap) {\n\t\t\tconst { row, column } = tableSlot;\n\t\t\tif (column === selection.firstColumn) insertPosition = tableSlot.getPositionBefore();\n\t\t\tconst pastedRow = row - selection.firstRow;\n\t\t\tconst pastedColumn = column - selection.firstColumn;\n\t\t\tconst pastedCell = pastedTableLocationMap[pastedRow % pastedHeight][pastedColumn % pastedWidth];\n\t\t\tconst cellToInsert = pastedCell ? writer.cloneElement(pastedCell) : null;\n\t\t\tconst newTableCell = this._replaceTableSlotCell(tableSlot, cellToInsert, insertPosition, writer);\n\t\t\tif (!newTableCell) continue;\n\t\t\ttrimTableCellIfNeeded(newTableCell, row, column, selection.lastRow, selection.lastColumn, writer);\n\t\t\tcellsToSelect.push(newTableCell);\n\t\t\tinsertPosition = writer.createPositionAfter(newTableCell);\n\t\t}\n\t\tconst headingRows = parseInt(selectedTable.getAttribute(\"headingRows\") || \"0\");\n\t\tconst headingColumns = parseInt(selectedTable.getAttribute(\"headingColumns\") || \"0\");\n\t\tconst footerRows = parseInt(selectedTable.getAttribute(\"footerRows\") || \"0\");\n\t\tconst footerIndex = tableUtils.getRows(selectedTable) - footerRows;\n\t\tconst areHeadingRowsIntersectingSelection = selection.firstRow < headingRows && headingRows <= selection.lastRow;\n\t\tconst areHeadingColumnsIntersectingSelection = selection.firstColumn < headingColumns && headingColumns <= selection.lastColumn;\n\t\tconst areFooterRowsIntersectingSelection = selection.firstRow < footerIndex && footerIndex <= selection.lastRow;\n\t\tif (areHeadingRowsIntersectingSelection) {\n\t\t\tconst newCells = doHorizontalSplit(selectedTable, headingRows, {\n\t\t\t\tfirst: selection.firstColumn,\n\t\t\t\tlast: selection.lastColumn\n\t\t\t}, writer, selection.firstRow);\n\t\t\tcellsToSelect.push(...newCells);\n\t\t}\n\t\tif (areHeadingColumnsIntersectingSelection) {\n\t\t\tconst newCells = doVerticalSplit(selectedTable, headingColumns, {\n\t\t\t\tfirst: selection.firstRow,\n\t\t\t\tlast: selection.lastRow\n\t\t\t}, writer);\n\t\t\tcellsToSelect.push(...newCells);\n\t\t}\n\t\tif (areFooterRowsIntersectingSelection) {\n\t\t\tconst newCells = doHorizontalSplit(selectedTable, footerIndex, {\n\t\t\t\tfirst: selection.firstColumn,\n\t\t\t\tlast: selection.lastColumn\n\t\t\t}, writer, selection.firstRow);\n\t\t\tcellsToSelect.push(...newCells);\n\t\t}\n\t\treturn cellsToSelect;\n\t}\n\t/**\n\t* Replaces a single table slot.\n\t*\n\t* @returns Inserted table cell or null if slot should remain empty.\n\t* @private\n\t*/\n\t_replaceTableSlotCell(tableSlot, cellToInsert, insertPosition, writer) {\n\t\tconst { cell, isAnchor } = tableSlot;\n\t\tif (isAnchor) writer.remove(cell);\n\t\tif (!cellToInsert) return null;\n\t\twriter.insert(cellToInsert, insertPosition);\n\t\treturn cellToInsert;\n\t}\n\t/**\n\t* Extracts the table for pasting into a table.\n\t*\n\t* @param content The content to insert.\n\t* @param model The editor model.\n\t*/\n\tgetTableIfOnlyTableInContent(content, model) {\n\t\tif (!content.is(\"documentFragment\") && !content.is(\"element\")) return null;\n\t\tif (content.is(\"element\", \"table\")) return content;\n\t\tif (content.childCount == 1 && content.getChild(0).is(\"element\", \"table\")) return content.getChild(0);\n\t\tconst contentRange = model.createRangeIn(content);\n\t\tfor (const element of contentRange.getItems()) if (element.is(\"element\", \"table\")) {\n\t\t\tconst rangeBefore = model.createRange(contentRange.start, model.createPositionBefore(element));\n\t\t\tif (model.hasContent(rangeBefore, { ignoreWhitespaces: true })) return null;\n\t\t\tconst rangeAfter = model.createRange(model.createPositionAfter(element), contentRange.end);\n\t\t\tif (model.hasContent(rangeAfter, { ignoreWhitespaces: true })) return null;\n\t\t\treturn element;\n\t\t}\n\t\treturn null;\n\t}\n};\n/**\n* Prepares a table for pasting and returns adjusted selection dimensions.\n*/\nfunction prepareTableForPasting(selectedTableCells, pastedDimensions, writer, tableUtils) {\n\tconst selectedTable = selectedTableCells[0].findAncestor(\"table\");\n\tconst columnIndexes = tableUtils.getColumnIndexes(selectedTableCells);\n\tconst rowIndexes = tableUtils.getRowIndexes(selectedTableCells);\n\tconst selection = {\n\t\tfirstColumn: columnIndexes.first,\n\t\tlastColumn: columnIndexes.last,\n\t\tfirstRow: rowIndexes.first,\n\t\tlastRow: rowIndexes.last\n\t};\n\tconst shouldExpandSelection = selectedTableCells.length === 1;\n\tif (shouldExpandSelection) {\n\t\tselection.lastRow += pastedDimensions.height - 1;\n\t\tselection.lastColumn += pastedDimensions.width - 1;\n\t\texpandTableSize(selectedTable, selection.lastRow + 1, selection.lastColumn + 1, tableUtils);\n\t}\n\tif (shouldExpandSelection || !tableUtils.isSelectionRectangular(selectedTableCells)) splitCellsToRectangularSelection(selectedTable, selection, writer);\n\telse {\n\t\tselection.lastRow = adjustLastRowIndex(selectedTable, selection);\n\t\tselection.lastColumn = adjustLastColumnIndex(selectedTable, selection);\n\t}\n\treturn selection;\n}\n/**\n* Expand table (in place) to expected size.\n*/\nfunction expandTableSize(table, expectedHeight, expectedWidth, tableUtils) {\n\tconst tableWidth = tableUtils.getColumns(table);\n\tconst tableHeight = tableUtils.getRows(table);\n\tif (expectedWidth > tableWidth) tableUtils.insertColumns(table, {\n\t\tat: tableWidth,\n\t\tcolumns: expectedWidth - tableWidth\n\t});\n\tif (expectedHeight > tableHeight) tableUtils.insertRows(table, {\n\t\tat: tableHeight,\n\t\trows: expectedHeight - tableHeight\n\t});\n}\n/**\n* Returns two-dimensional array that is addressed by [ row ][ column ] that stores cells anchored at given location.\n*\n* At given row & column location it might be one of:\n*\n* * cell - cell from pasted table anchored at this location.\n* * null - if no cell is anchored at this location.\n*\n* For instance, from a table below:\n*\n*   +----+----+----+----+\n*   | 00 | 01 | 02 | 03 |\n*   +    +----+----+----+\n*   |    | 11      | 13 |\n*   +----+         +----+\n*   | 20 |         | 23 |\n*   +----+----+----+----+\n*\n* The method will return an array (numbers represents cell element):\n*\n* ```ts\n* const map = [\n*   [ '00', '01', '02', '03' ],\n*   [ null, '11', null, '13' ],\n*   [ '20', null, null, '23' ]\n* ]\n* ```\n*\n* This allows for a quick access to table at give row & column. For instance to access table cell \"13\" from pasted table call:\n*\n* ```ts\n* const cell = map[ 1 ][ 3 ]\n* ```\n*/\nfunction createLocationMap(table, width, height) {\n\tconst map = new Array(height).fill(null).map(() => new Array(width).fill(null));\n\tfor (const { column, row, cell } of new TableWalker(table)) map[row][column] = cell;\n\treturn map;\n}\n/**\n* Make selected cells rectangular by splitting the cells that stand out from a rectangular selection.\n*\n* In the table below a selection is shown with \"::\" and slots with anchor cells are named.\n*\n* +----+----+----+----+----+                    +----+----+----+----+----+\n* | 00 | 01 | 02 | 03      |                    | 00 | 01 | 02 | 03      |\n* +    +----+    +----+----+                    |    ::::::::::::::::----+\n* |    | 11 |    | 13 | 14 |                    |    ::11 |    | 13:: 14 |    <- first row\n* +----+----+    +    +----+                    +----::---|    |   ::----+\n* | 20 | 21 |    |    | 24 |   select cells:    | 20 ::21 |    |   :: 24 |\n* +----+----+    +----+----+     11 -> 33       +----::---|    |---::----+\n* | 30      |    | 33 | 34 |                    | 30 ::   |    | 33:: 34 |    <- last row\n* +         +    +----+    +                    |    ::::::::::::::::    +\n* |         |    | 43 |    |                    |         |    | 43 |    |\n* +----+----+----+----+----+                    +----+----+----+----+----+\n*                                                      ^          ^\n*                                                     first & last columns\n*\n* Will update table to:\n*\n*                       +----+----+----+----+----+\n*                       | 00 | 01 | 02 | 03      |\n*                       +    +----+----+----+----+\n*                       |    | 11 |    | 13 | 14 |\n*                       +----+----+    +    +----+\n*                       | 20 | 21 |    |    | 24 |\n*                       +----+----+    +----+----+\n*                       | 30 |    |    | 33 | 34 |\n*                       +    +----+----+----+    +\n*                       |    |    |    | 43 |    |\n*                       +----+----+----+----+----+\n*\n* In th example above:\n* - Cell \"02\" which have `rowspan = 4` must be trimmed at first and at after last row.\n* - Cell \"03\" which have `rowspan = 2` and `colspan = 2` must be trimmed at first column and after last row.\n* - Cells \"00\", \"03\" & \"30\" which cannot be cut by this algorithm as they are outside the trimmed area.\n* - Cell \"13\" cannot be cut as it is inside the trimmed area.\n*/\nfunction splitCellsToRectangularSelection(table, dimensions, writer) {\n\tconst { firstRow, lastRow, firstColumn, lastColumn } = dimensions;\n\tconst rowIndexes = {\n\t\tfirst: firstRow,\n\t\tlast: lastRow\n\t};\n\tconst columnIndexes = {\n\t\tfirst: firstColumn,\n\t\tlast: lastColumn\n\t};\n\tdoVerticalSplit(table, firstColumn, rowIndexes, writer);\n\tdoVerticalSplit(table, lastColumn + 1, rowIndexes, writer);\n\tdoHorizontalSplit(table, firstRow, columnIndexes, writer);\n\tdoHorizontalSplit(table, lastRow + 1, columnIndexes, writer, firstRow);\n}\nfunction doHorizontalSplit(table, splitRow, limitColumns, writer, startRow = 0) {\n\tif (splitRow < 1) return;\n\treturn getVerticallyOverlappingCells(table, splitRow, startRow).filter(({ column, cellWidth }) => isAffectedBySelection(column, cellWidth, limitColumns)).map(({ cell }) => splitHorizontally(cell, splitRow, writer));\n}\nfunction doVerticalSplit(table, splitColumn, limitRows, writer) {\n\tif (splitColumn < 1) return;\n\treturn getHorizontallyOverlappingCells(table, splitColumn).filter(({ row, cellHeight }) => isAffectedBySelection(row, cellHeight, limitRows)).map(({ cell, column }) => splitVertically(cell, column, splitColumn, writer));\n}\n/**\n* Checks if cell at given row (column) is affected by a rectangular selection defined by first/last column (row).\n*\n* The same check is used for row as for column.\n*/\nfunction isAffectedBySelection(index, span, limit) {\n\tconst endIndex = index + span - 1;\n\tconst { first, last } = limit;\n\treturn index >= first && index <= last || index < first && endIndex >= first;\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 table/tablekeyboard\n*/\n/**\n* This plugin enables keyboard navigation for tables.\n* It is loaded automatically by the {@link module:table/table~Table} plugin.\n*/\nvar TableKeyboard = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableKeyboard\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableSelection, TableUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tconst t = editor.t;\n\t\tthis.listenTo(viewDocument, \"arrowKey\", (...args) => this._onArrowKey(...args), { context: \"table\" });\n\t\tthis.listenTo(viewDocument, \"tab\", (...args) => this._handleTabOnSelectedTable(...args), { context: \"figure\" });\n\t\tthis.listenTo(viewDocument, \"tab\", (...args) => this._handleTab(...args), { context: [\"th\", \"td\"] });\n\t\teditor.accessibility.addKeystrokeInfoGroup({\n\t\t\tid: \"table\",\n\t\t\tlabel: t(\"Keystrokes that can be used in a table cell\"),\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move the selection to the next cell\"),\n\t\t\t\t\tkeystroke: \"Tab\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move the selection to the previous cell\"),\n\t\t\t\t\tkeystroke: \"Shift+Tab\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Insert a new table row (when in the last cell of a table)\"),\n\t\t\t\t\tkeystroke: \"Tab\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Navigate through the table\"),\n\t\t\t\t\tkeystroke: [\n\t\t\t\t\t\t[\"arrowup\"],\n\t\t\t\t\t\t[\"arrowright\"],\n\t\t\t\t\t\t[\"arrowdown\"],\n\t\t\t\t\t\t[\"arrowleft\"]\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:tab tab} events for the <kbd>Tab</kbd> key executed\n\t* when the table widget is selected.\n\t*/\n\t_handleTabOnSelectedTable(bubblingEventInfo, domEventData) {\n\t\tconst selectedElement = this.editor.model.document.selection.getSelectedElement();\n\t\tif (!selectedElement || !selectedElement.is(\"element\", \"table\")) return;\n\t\tdomEventData.stopPropagation();\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:tab tab} events for the <kbd>Tab</kbd> key executed\n\t* inside table cells.\n\t*/\n\t_handleTab(bubblingEventInfo, domEventData) {\n\t\tconst editor = this.editor;\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst tableSelection = this.editor.plugins.get(\"TableSelection\");\n\t\tconst selection = editor.model.document.selection;\n\t\tconst isForward = !domEventData.shiftKey;\n\t\tlet tableCell = tableUtils.getTableCellsContainingSelection(selection)[0];\n\t\tif (!tableCell) tableCell = tableSelection.getFocusCell();\n\t\tif (!tableCell) return;\n\t\tdomEventData.stopPropagation();\n\t\tconst tableRow = tableCell.parent;\n\t\tconst table = tableRow.parent;\n\t\tconst currentRowIndex = table.getChildIndex(tableRow);\n\t\tconst isLastCellInRow = tableRow.getChildIndex(tableCell) === tableRow.childCount - 1;\n\t\tconst isLastRow = currentRowIndex === tableUtils.getRows(table) - 1;\n\t\tif (isForward && isLastRow && isLastCellInRow) editor.execute(\"insertTableRowBelow\");\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events.\n\t*/\n\t_onArrowKey(eventInfo, domEventData) {\n\t\tconst editor = this.editor;\n\t\tconst keyCode = domEventData.keyCode;\n\t\tconst direction = getLocalizedArrowKeyCodeDirection(keyCode, editor.locale.contentLanguageDirection);\n\t\tif (this._handleArrowKeys(direction, domEventData.shiftKey)) {\n\t\t\tdomEventData.preventDefault();\n\t\t\tdomEventData.stopPropagation();\n\t\t\teventInfo.stop();\n\t\t}\n\t}\n\t/**\n\t* Handles arrow keys to move the selection around the table.\n\t*\n\t* @param direction The direction of the arrow key.\n\t* @param expandSelection If the current selection should be expanded.\n\t* @returns Returns `true` if key was handled.\n\t*/\n\t_handleArrowKeys(direction, expandSelection) {\n\t\tconst tableUtils = this.editor.plugins.get(TableUtils);\n\t\tconst tableSelection = this.editor.plugins.get(\"TableSelection\");\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst isForward = [\"right\", \"down\"].includes(direction);\n\t\tconst selectedCells = tableUtils.getSelectedTableCells(selection);\n\t\tif (selectedCells.length) {\n\t\t\tlet focusCell;\n\t\t\tif (expandSelection) focusCell = tableSelection.getFocusCell();\n\t\t\telse focusCell = isForward ? selectedCells[selectedCells.length - 1] : selectedCells[0];\n\t\t\tthis._navigateFromCellInDirection(focusCell, direction, expandSelection);\n\t\t\treturn true;\n\t\t}\n\t\tconst tableCell = selection.focus.findAncestor(\"tableCell\");\n\t\t/* istanbul ignore if: paranoid check -- @preserve */\n\t\tif (!tableCell) return false;\n\t\tif (!selection.isCollapsed) {\n\t\t\tif (expandSelection) {\n\t\t\t\tif (selection.isBackward == isForward && !selection.containsEntireContent(tableCell)) return false;\n\t\t\t} else {\n\t\t\t\tconst selectedElement = selection.getSelectedElement();\n\t\t\t\tif (!selectedElement || !model.schema.isObject(selectedElement)) return false;\n\t\t\t}\n\t\t}\n\t\tif (this._isSelectionAtCellEdge(selection, tableCell, isForward)) {\n\t\t\tthis._navigateFromCellInDirection(tableCell, direction, expandSelection);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Returns `true` if the selection is at the boundary of a table cell according to the navigation direction.\n\t*\n\t* @param selection The current selection.\n\t* @param tableCell The current table cell element.\n\t* @param isForward The expected navigation direction.\n\t*/\n\t_isSelectionAtCellEdge(selection, tableCell, isForward) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = this.editor.model.schema;\n\t\tconst focus = isForward ? selection.getLastPosition() : selection.getFirstPosition();\n\t\tif (!schema.getLimitElement(focus).is(\"element\", \"tableCell\")) return model.createPositionAt(tableCell, isForward ? \"end\" : 0).isTouching(focus);\n\t\tconst probe = model.createSelection(focus);\n\t\tmodel.modifySelection(probe, { direction: isForward ? \"forward\" : \"backward\" });\n\t\treturn focus.isEqual(probe.focus);\n\t}\n\t/**\n\t* Moves the selection from the given table cell in the specified direction.\n\t*\n\t* @param focusCell The table cell that is current multi-cell selection focus.\n\t* @param direction Direction in which selection should move.\n\t* @param expandSelection If the current selection should be expanded. Default value is false.\n\t*/\n\t_navigateFromCellInDirection(focusCell, direction, expandSelection = false) {\n\t\tconst model = this.editor.model;\n\t\tconst table = focusCell.findAncestor(\"table\");\n\t\tconst tableMap = [...new TableWalker(table, { includeAllSlots: true })];\n\t\tconst { row: lastRow, column: lastColumn } = tableMap[tableMap.length - 1];\n\t\tconst currentCellInfo = tableMap.find(({ cell }) => cell == focusCell);\n\t\tlet { row, column } = currentCellInfo;\n\t\tswitch (direction) {\n\t\t\tcase \"left\":\n\t\t\t\tcolumn--;\n\t\t\t\tbreak;\n\t\t\tcase \"up\":\n\t\t\t\trow--;\n\t\t\t\tbreak;\n\t\t\tcase \"right\":\n\t\t\t\tcolumn += currentCellInfo.cellWidth;\n\t\t\t\tbreak;\n\t\t\tcase \"down\": row += currentCellInfo.cellHeight;\n\t\t}\n\t\tif (row < 0 || row > lastRow || column < 0 && row <= 0 || column > lastColumn && row >= lastRow) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(writer.createRangeOn(table));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (column < 0) {\n\t\t\tcolumn = expandSelection ? 0 : lastColumn;\n\t\t\trow--;\n\t\t} else if (column > lastColumn) {\n\t\t\tcolumn = expandSelection ? lastColumn : 0;\n\t\t\trow++;\n\t\t}\n\t\tconst cellToSelect = tableMap.find((cellInfo) => cellInfo.row == row && cellInfo.column == column).cell;\n\t\tconst isForward = [\"right\", \"down\"].includes(direction);\n\t\tconst tableSelection = this.editor.plugins.get(\"TableSelection\");\n\t\tif (expandSelection && tableSelection.isEnabled) {\n\t\t\tconst anchorCell = tableSelection.getAnchorCell() || focusCell;\n\t\t\ttableSelection.setCellSelection(anchorCell, cellToSelect);\n\t\t} else {\n\t\t\tconst positionToSelect = model.createPositionAt(cellToSelect, isForward ? 0 : \"end\");\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(positionToSelect);\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 table/tablemouse/mouseeventsobserver\n*/\n/**\n* The mouse selection event observer.\n*\n* It registers listeners for the following DOM events:\n*\n* - `'mousemove'`\n* - `'mouseleave'`\n*\n* Note that this observer is disabled by default. To enable this observer, it needs to be added to\n* {@link module:engine/view/view~EditingView} using the {@link module:engine/view/view~EditingView#addObserver} method.\n*\n* The observer is registered by the {@link module:table/tableselection~TableSelection} plugin.\n*\n* @internal\n*/\nvar MouseEventsObserver = class extends DomEventObserver {\n\tdomEventType = [\"mousemove\", \"mouseleave\"];\n\t/**\n\t* @inheritDoc\n\t*/\n\tonDomEvent(domEvent) {\n\t\tthis.fire(domEvent.type, domEvent);\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 table/tablemouse\n*/\n/**\n* This plugin enables a table cells' selection with the mouse.\n* It is loaded automatically by the {@link module:table/table~Table} plugin.\n*/\nvar TableMouse = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableMouse\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableSelection, TableUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.editor.editing.view.addObserver(MouseEventsObserver);\n\t\tthis._enableShiftClickSelection();\n\t\tthis._enableMouseDragSelection();\n\t}\n\t/**\n\t* Enables making cells selection by <kbd>Shift</kbd>+click. Creates a selection from the cell which previously held\n\t* the selection to the cell which was clicked. It can be the same cell, in which case it selects a single cell.\n\t*/\n\t_enableShiftClickSelection() {\n\t\tconst editor = this.editor;\n\t\tconst tableUtils = editor.plugins.get(TableUtils);\n\t\tlet blockSelectionChange = false;\n\t\tconst tableSelection = editor.plugins.get(TableSelection);\n\t\tthis.listenTo(editor.editing.view.document, \"mousedown\", (evt, domEventData) => {\n\t\t\tconst selection = editor.model.document.selection;\n\t\t\tif (!this.isEnabled || !tableSelection.isEnabled) return;\n\t\t\tif (!domEventData.domEvent.shiftKey) return;\n\t\t\tconst anchorCell = tableSelection.getAnchorCell() || tableUtils.getTableCellsContainingSelection(selection)[0];\n\t\t\tif (!anchorCell) return;\n\t\t\tconst targetCell = this._getModelTableCellFromDomEvent(domEventData);\n\t\t\tif (targetCell && haveSameTableParent(anchorCell, targetCell)) {\n\t\t\t\tblockSelectionChange = true;\n\t\t\t\ttableSelection.setCellSelection(anchorCell, targetCell);\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t}\n\t\t});\n\t\tthis.listenTo(editor.editing.view.document, \"mouseup\", () => {\n\t\t\tblockSelectionChange = false;\n\t\t});\n\t\tthis.listenTo(editor.editing.view.document, \"selectionChange\", (evt) => {\n\t\t\tif (blockSelectionChange) evt.stop();\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* Enables making cells selection by dragging.\n\t*\n\t* The selection is made only on mousemove. Mouse tracking is started on mousedown.\n\t* However, the cells selection is enabled only after the mouse cursor left the anchor cell.\n\t* Thanks to that normal text selection within one cell works just fine. However, you can still select\n\t* just one cell by leaving the anchor cell and moving back to it.\n\t*/\n\t_enableMouseDragSelection() {\n\t\tconst editor = this.editor;\n\t\tlet anchorCell, targetCell;\n\t\tlet beganCellSelection = false;\n\t\tlet blockSelectionChange = false;\n\t\tconst tableSelection = editor.plugins.get(TableSelection);\n\t\tthis.listenTo(editor.editing.view.document, \"mousedown\", (evt, domEventData) => {\n\t\t\tif (!this.isEnabled || !tableSelection.isEnabled) return;\n\t\t\tif (domEventData.domEvent.shiftKey || domEventData.domEvent.ctrlKey || domEventData.domEvent.altKey) return;\n\t\t\tanchorCell = this._getModelTableCellFromDomEvent(domEventData);\n\t\t});\n\t\tthis.listenTo(editor.editing.view.document, \"mousemove\", (evt, domEventData) => {\n\t\t\tif (!domEventData.domEvent.buttons) return;\n\t\t\tif (!anchorCell) return;\n\t\t\tconst newTargetCell = this._getModelTableCellFromDomEvent(domEventData);\n\t\t\tif (newTargetCell && haveSameTableParent(anchorCell, newTargetCell)) {\n\t\t\t\ttargetCell = newTargetCell;\n\t\t\t\tif (!beganCellSelection && targetCell != anchorCell) beganCellSelection = true;\n\t\t\t}\n\t\t\tif (!beganCellSelection) return;\n\t\t\tblockSelectionChange = true;\n\t\t\ttableSelection.setCellSelection(anchorCell, targetCell);\n\t\t\tdomEventData.preventDefault();\n\t\t});\n\t\tthis.listenTo(editor.editing.view.document, \"mouseup\", () => {\n\t\t\tbeganCellSelection = false;\n\t\t\tblockSelectionChange = false;\n\t\t\tanchorCell = null;\n\t\t\ttargetCell = null;\n\t\t});\n\t\tthis.listenTo(editor.editing.view.document, \"selectionChange\", (evt) => {\n\t\t\tif (blockSelectionChange) evt.stop();\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* Returns the model table cell element based on the target element of the passed DOM event.\n\t*\n\t* @returns Returns the table cell or `undefined`.\n\t*/\n\t_getModelTableCellFromDomEvent(domEventData) {\n\t\tconst viewTargetElement = domEventData.target;\n\t\tconst viewPosition = this.editor.editing.view.createPositionAt(viewTargetElement, 0);\n\t\treturn this.editor.editing.mapper.toModelPosition(viewPosition).parent.findAncestor(\"tableCell\", { includeSelf: true });\n\t}\n};\nfunction haveSameTableParent(cellA, cellB) {\n\treturn cellA.parent.parent == cellB.parent.parent;\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 table/table\n*/\n/**\n* The table plugin.\n*\n* For a detailed overview, check the {@glink features/tables/tables Table feature documentation}.\n*\n* This is a \"glue\" plugin that loads the following table features:\n*\n* * {@link module:table/tableediting~TableEditing editing feature},\n* * {@link module:table/tableselection~TableSelection selection feature},\n* * {@link module:table/tablekeyboard~TableKeyboard keyboard navigation feature},\n* * {@link module:table/tablemouse~TableMouse mouse selection feature},\n* * {@link module:table/tableclipboard~TableClipboard clipboard feature},\n* * {@link module:table/tableui~TableUI UI feature}.\n*/\nvar Table = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tTableEditing,\n\t\t\tTableUI,\n\t\t\tTableSelection,\n\t\t\tTableMouse,\n\t\t\tTableKeyboard,\n\t\t\tTableClipboard,\n\t\t\tWidget\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Table\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 table/plaintableoutput\n*/\n/**\n* The plain table output feature.\n*\n* This feature strips the `<figure>` tag from the table data. This is because this tag is not supported\n* by most popular email clients and removing it ensures compatibility.\n*/\nvar PlainTableOutput = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"PlainTableOutput\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Table];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.editor.conversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:table\", (evt, data, conversionApi) => {\n\t\t\t\tconversionApi.consumable.consume(data.viewItem, { classes: \"table\" });\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* Depending on the position of the selection either return the selected table or the table higher in the hierarchy.\n*\n* @internal\n*/\nfunction getSelectionAffectedTableWidget(selection) {\n\tconst selectedTable = getSelectedTableWidget(selection);\n\tif (selectedTable) return selectedTable;\n\treturn getTableWidgetAncestor(selection);\n}\n/**\n* Returns a table widget editing view element if one is selected.\n*\n* @internal\n*/\nfunction getSelectedTableWidget(selection) {\n\tconst viewElement = selection.getSelectedElement();\n\tif (viewElement && isTableWidget(viewElement)) return viewElement;\n\treturn null;\n}\n/**\n* Returns a table widget editing view element if one is among the selection's ancestors.\n*\n* @internal\n*/\nfunction getTableWidgetAncestor(selection) {\n\tconst selectionPosition = selection.getFirstPosition();\n\tif (!selectionPosition) return null;\n\tlet parent = selectionPosition.parent;\n\twhile (parent) {\n\t\tif (parent.is(\"element\") && isTableWidget(parent)) return parent;\n\t\tparent = parent.parent;\n\t}\n\treturn null;\n}\n/**\n* Checks if a given view element is a table widget.\n*\n* @internal\n*/\nfunction isTableWidget(viewNode) {\n\treturn viewNode.is(\"element\") && !!viewNode.getCustomProperty(\"table\") && isWidget(viewNode);\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 table/tabletoolbar\n*/\n/**\n* The table toolbar class. It creates toolbars for the table feature and its content (for now only for the table cell content).\n*\n* The table toolbar shows up when a table widget is selected. Its components (e.g. buttons) are created based on the\n* {@link module:table/tableconfig~TableConfig#tableToolbar `table.tableToolbar` configuration option}.\n*\n* Table content toolbar shows up when the selection is inside the content of a table. It creates its component based on the\n* {@link module:table/tableconfig~TableConfig#contentToolbar `table.contentToolbar` configuration option}.\n*/\nvar TableToolbar = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [WidgetToolbarRepository];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst widgetToolbarRepository = editor.plugins.get(WidgetToolbarRepository);\n\t\tconst tableContentToolbarItems = editor.config.get(\"table.contentToolbar\");\n\t\tconst tableToolbarItems = editor.config.get(\"table.tableToolbar\");\n\t\tif (tableContentToolbarItems) widgetToolbarRepository.register(\"tableContent\", {\n\t\t\tariaLabel: t(\"Table toolbar\"),\n\t\t\titems: tableContentToolbarItems,\n\t\t\tgetRelatedElement: getTableWidgetAncestor\n\t\t});\n\t\tif (tableToolbarItems) widgetToolbarRepository.register(\"table\", {\n\t\t\tariaLabel: t(\"Table toolbar\"),\n\t\t\titems: tableToolbarItems,\n\t\t\tgetRelatedElement: getSelectedTableWidget\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 table/ui/colorinputview\n*/\n/**\n* The color input view class. It allows the user to type in a color (hex, rgb, etc.)\n* or choose it from the configurable color palette with a preview.\n*\n* @internal\n*/\nvar ColorInputView = class extends View {\n\t/**\n\t* A cached reference to the options passed to the constructor.\n\t*/\n\toptions;\n\t/**\n\t* Tracks information about the DOM focus in the view.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Helps cycling over focusable children in the input view.\n\t*/\n\tfocusCycler;\n\t/**\n\t* A collection of views that can be focused in the view.\n\t*/\n\t_focusables;\n\t/**\n\t* An instance of the dropdown allowing to select a color from a grid.\n\t*/\n\tdropdownView;\n\t/**\n\t* An instance of the input allowing the user to type a color value.\n\t*/\n\tinputView;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* The flag that indicates whether the user is still typing.\n\t* If set to true, it means that the text input field ({@link #inputView}) still has the focus.\n\t* So, we should interrupt the user by replacing the input's value.\n\t*/\n\t_stillTyping;\n\t/**\n\t* Creates an instance of the color input view.\n\t*\n\t* @param locale The locale instance.\n\t* @param options The input options.\n\t* @param options.colorDefinitions The colors to be displayed in the palette inside the input's dropdown.\n\t* @param options.columns The number of columns in which the colors will be displayed.\n\t* @param options.defaultColorValue If specified, the color input view will replace the \"Remove color\" button with\n\t* the \"Restore default\" button. Instead of clearing the input field, the default color value will be set.\n\t*/\n\tconstructor(locale, options) {\n\t\tsuper(locale);\n\t\tthis.set(\"value\", \"\");\n\t\tthis.set(\"isReadOnly\", false);\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"isEmpty\", true);\n\t\tthis.options = options;\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.dropdownView = this._createDropdownView();\n\t\tthis.inputView = this._createInputTextView();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._stillTyping = false;\n\t\tthis.focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-input-color\"] },\n\t\t\tchildren: [this.dropdownView, this.inputView]\n\t\t});\n\t\tthis.on(\"change:value\", (evt, name, inputValue) => this._setInputValue(inputValue));\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\t[this.inputView, this.dropdownView.buttonView].forEach((view) => {\n\t\t\tthis.focusTracker.add(view.element);\n\t\t\tthis._focusables.add(view);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* Focuses the view.\n\t*/\n\tfocus(direction) {\n\t\tif (direction === -1) this.focusCycler.focusLast();\n\t\telse this.focusCycler.focusFirst();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Creates and configures the {@link #dropdownView}.\n\t*/\n\t_createDropdownView() {\n\t\tconst locale = this.locale;\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\t\tconst colorSelector = this._createColorSelector(locale);\n\t\tconst dropdown = createDropdown(locale);\n\t\tconst colorPreview = new View();\n\t\tcolorPreview.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-input-color__button__preview\"],\n\t\t\t\tstyle: { backgroundColor: bind.to(\"value\") }\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-input-color__button__preview__no-color-indicator\",\n\t\t\t\t\tbind.if(\"value\", \"ck-hidden\", (value) => value != \"\")\n\t\t\t\t] }\n\t\t\t}]\n\t\t});\n\t\tdropdown.buttonView.extendTemplate({ attributes: { class: \"ck-input-color__button\" } });\n\t\tdropdown.buttonView.children.add(colorPreview);\n\t\tdropdown.buttonView.label = t(\"Color picker\");\n\t\tdropdown.buttonView.tooltip = true;\n\t\tdropdown.panelPosition = locale.uiLanguageDirection === \"rtl\" ? \"se\" : \"sw\";\n\t\tdropdown.panelView.children.add(colorSelector);\n\t\tdropdown.bind(\"isEnabled\").to(this, \"isReadOnly\", (value) => !value);\n\t\tdropdown.on(\"change:isOpen\", (evt, name, isVisible) => {\n\t\t\tif (isVisible) {\n\t\t\t\tcolorSelector.updateSelectedColors();\n\t\t\t\tcolorSelector.showColorGridsFragment();\n\t\t\t}\n\t\t});\n\t\treturn dropdown;\n\t}\n\t/**\n\t* Creates and configures an instance of {@link module:ui/inputtext/inputtextview~InputTextView}.\n\t*\n\t* @returns A configured instance to be set as {@link #inputView}.\n\t*/\n\t_createInputTextView() {\n\t\tconst locale = this.locale;\n\t\tconst inputView = new InputTextView(locale);\n\t\tinputView.extendTemplate({ on: { blur: inputView.bindTemplate.to(\"blur\") } });\n\t\tinputView.value = this.value;\n\t\tinputView.bind(\"isReadOnly\", \"hasError\").to(this);\n\t\tthis.bind(\"isFocused\", \"isEmpty\").to(inputView);\n\t\tinputView.on(\"input\", () => {\n\t\t\tconst inputValue = inputView.element.value;\n\t\t\tconst mappedColor = this.options.colorDefinitions.find((def) => inputValue === def.label);\n\t\t\tthis._stillTyping = true;\n\t\t\tthis.value = mappedColor && mappedColor.color || inputValue;\n\t\t});\n\t\tinputView.on(\"blur\", () => {\n\t\t\tthis._stillTyping = false;\n\t\t\tthis._setInputValue(inputView.element.value);\n\t\t});\n\t\tinputView.delegate(\"input\").to(this);\n\t\treturn inputView;\n\t}\n\t/**\n\t* Creates and configures the panel with \"color grid\" and \"color picker\" inside the {@link #dropdownView}.\n\t*/\n\t_createColorSelector(locale) {\n\t\tconst t = locale.t;\n\t\tconst defaultColor = this.options.defaultColorValue || \"\";\n\t\tconst removeColorButtonLabel = defaultColor ? t(\"Restore default\") : t(\"Remove color\");\n\t\tconst colorSelector = new ColorSelectorView(locale, {\n\t\t\tcolors: this.options.colorDefinitions,\n\t\t\tcolumns: this.options.columns,\n\t\t\tremoveButtonLabel: removeColorButtonLabel,\n\t\t\tcolorPickerLabel: t(\"Color picker\"),\n\t\t\tcolorPickerViewConfig: this.options.colorPickerConfig === false ? false : {\n\t\t\t\t...this.options.colorPickerConfig,\n\t\t\t\thideInput: true\n\t\t\t}\n\t\t});\n\t\tcolorSelector.appendUI();\n\t\tcolorSelector.on(\"execute\", (evt, data) => {\n\t\t\tif (data.source === \"colorPickerSaveButton\") {\n\t\t\t\tthis.dropdownView.isOpen = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.value = data.value || defaultColor;\n\t\t\tthis.fire(\"input\");\n\t\t\tif (data.source !== \"colorPicker\") this.dropdownView.isOpen = false;\n\t\t});\n\t\t/**\n\t\t* Color is saved before changes in color picker. In case \"cancel button\" is pressed\n\t\t* this color will be applied.\n\t\t*/\n\t\tlet backupColor = this.value;\n\t\tcolorSelector.on(\"colorPicker:cancel\", () => {\n\t\t\t/**\n\t\t\t* Revert color to previous value before changes in color picker.\n\t\t\t*/\n\t\t\tthis.value = backupColor;\n\t\t\tthis.fire(\"input\");\n\t\t\tthis.dropdownView.isOpen = false;\n\t\t});\n\t\tcolorSelector.colorGridsFragmentView.colorPickerButtonView.on(\"execute\", () => {\n\t\t\t/**\n\t\t\t* Save color value before changes in color picker.\n\t\t\t*/\n\t\t\tbackupColor = this.value;\n\t\t});\n\t\tcolorSelector.bind(\"selectedColor\").to(this, \"value\");\n\t\treturn colorSelector;\n\t}\n\t/**\n\t* Sets {@link #inputView}'s value property to the color value or color label,\n\t* if there is one and the user is not typing.\n\t*\n\t* Handles cases like:\n\t*\n\t* * Someone picks the color in the grid.\n\t* * The color is set from the plugin level.\n\t*\n\t* @param inputValue Color value to be set.\n\t*/\n\t_setInputValue(inputValue) {\n\t\tif (!this._stillTyping) {\n\t\t\tconst normalizedInputValue = normalizeColor(inputValue);\n\t\t\tconst mappedColor = this.options.colorDefinitions.find((def) => normalizedInputValue === normalizeColor(def.color));\n\t\t\tif (mappedColor) this.inputView.value = mappedColor.label;\n\t\t\telse this.inputView.value = inputValue || \"\";\n\t\t}\n\t}\n};\n/**\n* Normalizes color value, by stripping extensive whitespace.\n* For example., transforms:\n* * `   rgb(  25 50    0 )` to `rgb(25 50 0)`,\n* * \"\\t  rgb(  25 ,  50,0 )\t\t\" to `rgb(25 50 0)`.\n*\n* @param colorString The value to be normalized.\n*/\nfunction normalizeColor(colorString) {\n\treturn colorString.replace(/([(,])\\s+/g, \"$1\").replace(/^\\s+|\\s+(?=[),\\s]|$)/g, \"\").replace(/,|\\s/g, \" \");\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 table/utils/ui/table-properties\n*/\nconst isEmpty = (val) => val === \"\";\n/**\n* Returns an object containing pairs of CSS border style values and their localized UI\n* labels. Used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}\n* and {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView}.\n*\n* @internal\n* @param t The \"t\" function provided by the editor that is used to localize strings.\n*/\nfunction getBorderStyleLabels(t) {\n\treturn {\n\t\tnone: t(\"None\"),\n\t\tsolid: t(\"Solid\"),\n\t\tdotted: t(\"Dotted\"),\n\t\tdashed: t(\"Dashed\"),\n\t\tdouble: t(\"Double\"),\n\t\tgroove: t(\"Groove\"),\n\t\tridge: t(\"Ridge\"),\n\t\tinset: t(\"Inset\"),\n\t\toutset: t(\"Outset\")\n\t};\n}\n/**\n* Returns a localized error string that can be displayed next to color (background, border)\n* fields that have an invalid value.\n*\n* @internal\n* @param t The \"t\" function provided by the editor that is used to localize strings.\n*/\nfunction getLocalizedColorErrorText(t) {\n\treturn t(\"The color is invalid. Try \\\"#FF0000\\\" or \\\"rgb(255,0,0)\\\" or \\\"red\\\".\");\n}\n/**\n* Returns a localized error string that can be displayed next to length (padding, border width)\n* fields that have an invalid value.\n*\n* @internal\n* @param t The \"t\" function provided by the editor that is used to localize strings.\n*/\nfunction getLocalizedLengthErrorText(t) {\n\treturn t(\"The value is invalid. Try \\\"10px\\\" or \\\"2em\\\" or simply \\\"2\\\".\");\n}\n/**\n* Returns `true` when the passed value is an empty string or a valid CSS color expression.\n* Otherwise, `false` is returned.\n*\n* See {@link module:engine/view/styles/utils~isColorStyleValue}.\n*\n* @internal\n*/\nfunction colorFieldValidator(value) {\n\tvalue = value.trim().toLowerCase();\n\treturn isEmpty(value) || isColorStyleValue(value);\n}\n/**\n* Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.\n* Otherwise, `false` is returned.\n*\n* See {@link module:engine/view/styles/utils~isLengthStyleValue}.\n* See {@link module:engine/view/styles/utils~isPercentageStyleValue}.\n*\n* @internal\n*/\nfunction lengthFieldValidator(value) {\n\tvalue = value.trim();\n\treturn isEmpty(value) || isNumberString(value) || isLengthStyleValue(value) || isPercentageStyleValue(value);\n}\n/**\n* Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.\n* Otherwise, `false` is returned.\n*\n* See {@link module:engine/view/styles/utils~isLengthStyleValue}.\n*\n* @internal\n*/\nfunction lineWidthFieldValidator(value) {\n\tvalue = value.trim();\n\treturn isEmpty(value) || isNumberString(value) || isLengthStyleValue(value);\n}\n/**\n* Generates item definitions for a UI dropdown that allows changing the border style of a table or a table cell.\n*\n* @internal\n* @param defaultStyle The default border.\n*/\nfunction getBorderStyleDefinitions(view, defaultStyle) {\n\tconst itemDefinitions = new Collection();\n\tconst styleLabels = getBorderStyleLabels(view.t);\n\tfor (const style in styleLabels) {\n\t\tconst definition = {\n\t\t\ttype: \"button\",\n\t\t\tmodel: new UIModel({\n\t\t\t\t_borderStyleValue: style,\n\t\t\t\tlabel: styleLabels[style],\n\t\t\t\trole: \"menuitemradio\",\n\t\t\t\twithText: true\n\t\t\t})\n\t\t};\n\t\tif (style === \"none\") definition.model.bind(\"isOn\").to(view, \"borderStyle\", (value) => {\n\t\t\tif (defaultStyle === \"none\") return !value;\n\t\t\treturn value === style;\n\t\t});\n\t\telse definition.model.bind(\"isOn\").to(view, \"borderStyle\", (value) => {\n\t\t\treturn value === style;\n\t\t});\n\t\titemDefinitions.add(definition);\n\t}\n\treturn itemDefinitions;\n}\n/**\n* A helper that fills a toolbar with buttons that:\n*\n* * have some labels,\n* * have some icons,\n* * set a certain UI view property value upon execution.\n*\n* @internal\n* @param options Configuration options\n* @param options.view The view that has the observable property.\n* @param options.icons Object with button icons.\n* @param options.toolbar The toolbar to fill with buttons.\n* @param options.labels Object with button labels.\n* @param options.propertyName The name of the observable property in the view.\n* @param options.nameToValue A function that maps a button name to a value. By default names are the same as values.\n* @param options.defaultValue Default value for the property.\n*/\nfunction fillToolbar(options) {\n\tconst { view, icons, toolbar, labels, propertyName, nameToValue, defaultValue } = options;\n\tfor (const name in labels) {\n\t\tconst button = new ButtonView(view.locale);\n\t\tbutton.set({\n\t\t\trole: \"radio\",\n\t\t\tisToggleable: true,\n\t\t\tlabel: labels[name],\n\t\t\ticon: icons[name],\n\t\t\ttooltip: labels[name]\n\t\t});\n\t\tconst buttonValue = nameToValue ? nameToValue(name) : name;\n\t\tbutton.bind(\"isOn\").to(view, propertyName, (value) => {\n\t\t\tlet valueToCompare = value;\n\t\t\tif (value === \"\" && defaultValue) valueToCompare = defaultValue;\n\t\t\treturn buttonValue === valueToCompare;\n\t\t});\n\t\tbutton.on(\"execute\", () => {\n\t\t\tif (!defaultValue && buttonValue && view[propertyName] === buttonValue) view[propertyName] = void 0;\n\t\t\telse view[propertyName] = buttonValue;\n\t\t});\n\t\ttoolbar.items.add(button);\n\t}\n}\n/**\n* A default color palette used by various user interfaces related to tables, for instance,\n* by {@link module:table/tablecellproperties/tablecellpropertiesui~TableCellPropertiesUI} or\n* {@link module:table/tableproperties/tablepropertiesui~TablePropertiesUI}.\n*\n* The color palette follows the {@link module:table/tableconfig~TableColorConfig table color configuration format}\n* and contains the following color definitions:\n*\n* ```ts\n* const defaultColors = [\n*   {\n*     color: 'hsl(0, 0%, 0%)',\n*     label: 'Black'\n*   },\n*   {\n*     color: 'hsl(0, 0%, 30%)',\n*     label: 'Dim grey'\n*   },\n*   {\n*     color: 'hsl(0, 0%, 60%)',\n*     label: 'Grey'\n*   },\n*   {\n*     color: 'hsl(0, 0%, 90%)',\n*     label: 'Light grey'\n*   },\n*   {\n*     color: 'hsl(0, 0%, 100%)',\n*     label: 'White',\n*     hasBorder: true\n*   },\n*   {\n*     color: 'hsl(0, 75%, 60%)',\n*     label: 'Red'\n*   },\n*   {\n*     color: 'hsl(30, 75%, 60%)',\n*     label: 'Orange'\n*   },\n*   {\n*     color: 'hsl(60, 75%, 60%)',\n*     label: 'Yellow'\n*   },\n*   {\n*     color: 'hsl(90, 75%, 60%)',\n*     label: 'Light green'\n*   },\n*   {\n*     color: 'hsl(120, 75%, 60%)',\n*     label: 'Green'\n*   },\n*   {\n*     color: 'hsl(150, 75%, 60%)',\n*     label: 'Aquamarine'\n*   },\n*   {\n*     color: 'hsl(180, 75%, 60%)',\n*     label: 'Turquoise'\n*   },\n*   {\n*     color: 'hsl(210, 75%, 60%)',\n*     label: 'Light blue'\n*   },\n*   {\n*     color: 'hsl(240, 75%, 60%)',\n*     label: 'Blue'\n*   },\n*   {\n*     color: 'hsl(270, 75%, 60%)',\n*     label: 'Purple'\n*   }\n* ];\n* ```\n*\n* @internal\n*/\nconst defaultColors = [\n\t{\n\t\tcolor: \"hsl(0, 0%, 0%)\",\n\t\tlabel: \"Black\"\n\t},\n\t{\n\t\tcolor: \"hsl(0, 0%, 30%)\",\n\t\tlabel: \"Dim grey\"\n\t},\n\t{\n\t\tcolor: \"hsl(0, 0%, 60%)\",\n\t\tlabel: \"Grey\"\n\t},\n\t{\n\t\tcolor: \"hsl(0, 0%, 90%)\",\n\t\tlabel: \"Light grey\"\n\t},\n\t{\n\t\tcolor: \"hsl(0, 0%, 100%)\",\n\t\tlabel: \"White\",\n\t\thasBorder: true\n\t},\n\t{\n\t\tcolor: \"hsl(0, 75%, 60%)\",\n\t\tlabel: \"Red\"\n\t},\n\t{\n\t\tcolor: \"hsl(30, 75%, 60%)\",\n\t\tlabel: \"Orange\"\n\t},\n\t{\n\t\tcolor: \"hsl(60, 75%, 60%)\",\n\t\tlabel: \"Yellow\"\n\t},\n\t{\n\t\tcolor: \"hsl(90, 75%, 60%)\",\n\t\tlabel: \"Light green\"\n\t},\n\t{\n\t\tcolor: \"hsl(120, 75%, 60%)\",\n\t\tlabel: \"Green\"\n\t},\n\t{\n\t\tcolor: \"hsl(150, 75%, 60%)\",\n\t\tlabel: \"Aquamarine\"\n\t},\n\t{\n\t\tcolor: \"hsl(180, 75%, 60%)\",\n\t\tlabel: \"Turquoise\"\n\t},\n\t{\n\t\tcolor: \"hsl(210, 75%, 60%)\",\n\t\tlabel: \"Light blue\"\n\t},\n\t{\n\t\tcolor: \"hsl(240, 75%, 60%)\",\n\t\tlabel: \"Blue\"\n\t},\n\t{\n\t\tcolor: \"hsl(270, 75%, 60%)\",\n\t\tlabel: \"Purple\"\n\t}\n];\n/**\n* Returns a creator for a color input with a label.\n*\n* For given options, it returns a function that creates an instance of a\n* {@link module:table/ui/colorinputview~ColorInputView color input} logically related to\n* a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in the DOM.\n*\n* The helper does the following:\n*\n* * It sets the color input `id` and `ariaDescribedById` attributes.\n* * It binds the color input `isReadOnly` to the labeled view.\n* * It binds the color input `hasError` to the labeled view.\n* * It enables a logic that cleans up the error when the user starts typing in the color input.\n*\n* Usage:\n*\n* ```ts\n* const colorInputCreator = getLabeledColorInputCreator( {\n*   colorConfig: [ ... ],\n*   columns: 3,\n* } );\n*\n* const labeledInputView = new LabeledFieldView( locale, colorInputCreator );\n* console.log( labeledInputView.view ); // A color input instance.\n* ```\n*\n* @internal\n* @param options Color input options.\n* @param options.colorConfig The configuration of the color palette displayed in the input's dropdown.\n* @param options.columns The configuration of the number of columns the color palette consists of in the input's dropdown.\n* @param options.defaultColorValue If specified, the color input view will replace the \"Remove color\" button with\n* the \"Restore default\" button. Instead of clearing the input field, the default color value will be set.\n* @param options.colorPickerConfig The configuration of the color picker. You could disable it or define your output format.\n*/\nfunction getLabeledColorInputCreator(options) {\n\treturn (labeledFieldView, viewUid, statusUid) => {\n\t\tconst colorInputView = new ColorInputView(labeledFieldView.locale, {\n\t\t\tcolorDefinitions: colorConfigToColorGridDefinitions(options.colorConfig),\n\t\t\tcolumns: options.columns,\n\t\t\tdefaultColorValue: options.defaultColorValue,\n\t\t\tcolorPickerConfig: options.colorPickerConfig\n\t\t});\n\t\tcolorInputView.inputView.set({\n\t\t\tid: viewUid,\n\t\t\tariaDescribedById: statusUid\n\t\t});\n\t\tcolorInputView.bind(\"isReadOnly\").to(labeledFieldView, \"isEnabled\", (value) => !value);\n\t\tcolorInputView.bind(\"hasError\").to(labeledFieldView, \"errorText\", (value) => !!value);\n\t\tcolorInputView.on(\"input\", () => {\n\t\t\tlabeledFieldView.errorText = null;\n\t\t});\n\t\tlabeledFieldView.bind(\"isEmpty\", \"isFocused\").to(colorInputView);\n\t\treturn colorInputView;\n\t};\n}\n/**\n* A simple helper method to detect number strings.\n* I allows full number notation, so omitting 0 is not allowed:\n*/\nfunction isNumberString(value) {\n\tconst parsedValue = parseFloat(value);\n\treturn !Number.isNaN(parsedValue) && value === String(parsedValue);\n}\nfunction colorConfigToColorGridDefinitions(colorConfig) {\n\treturn colorConfig.map((item) => ({\n\t\tcolor: item.model,\n\t\tlabel: item.label,\n\t\toptions: { hasBorder: item.hasBorder }\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 table/tablecellproperties/ui/tablecellpropertiesview\n*/\n/**\n* The class representing a table cell properties form, allowing users to customize\n* certain style aspects of a table cell, for instance, border, padding, text alignment, etc..\n*/\nvar TableCellPropertiesView = class extends View {\n\t/**\n\t* Options passed to the view. See {@link #constructor} to learn more.\n\t*/\n\toptions;\n\t/**\n\t* Tracks information about the DOM focus in the form.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A collection of child views in the form.\n\t*/\n\tchildren;\n\t/**\n\t* A dropdown that allows selecting the style of the table cell border.\n\t*/\n\tborderStyleDropdown;\n\t/**\n\t* An input that allows specifying the width of the table cell border.\n\t*/\n\tborderWidthInput;\n\t/**\n\t* An input that allows specifying the color of the table cell border.\n\t*/\n\tborderColorInput;\n\t/**\n\t* An input that allows specifying the table cell background color.\n\t*/\n\tbackgroundInput;\n\t/**\n\t* A dropdown that allows selecting the type of the table cell (data or header).\n\t*/\n\tcellTypeDropdown;\n\t/**\n\t* An input that allows specifying the table cell padding.\n\t*/\n\tpaddingInput;\n\t/**\n\t* An input that allows specifying the table cell width.\n\t*/\n\twidthInput;\n\t/**\n\t* An input that allows specifying the table cell height.\n\t*/\n\theightInput;\n\t/**\n\t* A toolbar with buttons that allow changing the horizontal text alignment in a table cell.\n\t*/\n\thorizontalAlignmentToolbar;\n\t/**\n\t* A toolbar with buttons that allow changing the vertical text alignment in a table cell.\n\t*/\n\tverticalAlignmentToolbar;\n\t/**\n\t* The \"Save\" button view.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* The \"Cancel\" button view.\n\t*/\n\tcancelButtonView;\n\t/**\n\t* The \"Back\" button view.\n\t*/\n\tbackButtonView;\n\t/**\n\t* A collection of views that can be focused in the form.\n\t*/\n\t_focusables;\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param options Additional configuration of the view.\n\t* @param options.borderColors A configuration of the border color palette used by the\n\t* {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#borderColorInput}.\n\t* @param options.backgroundColors A configuration of the background color palette used by the\n\t* {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#backgroundInput}.\n\t* @param options.defaultTableCellProperties The default table cell properties.\n\t*/\n\tconstructor(locale, options) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\tborderStyle: \"\",\n\t\t\tborderWidth: \"\",\n\t\t\tborderColor: \"\",\n\t\t\tpadding: \"\",\n\t\t\tbackgroundColor: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t\thorizontalAlignment: \"\",\n\t\t\tverticalAlignment: \"\",\n\t\t\tcellType: \"\"\n\t\t});\n\t\tthis.options = options;\n\t\tconst { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();\n\t\tconst { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();\n\t\tconst { cellTypeRowLabel, cellTypeDropdown } = this._createCellTypeField();\n\t\tconst { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();\n\t\tconst { horizontalAlignmentToolbar, verticalAlignmentToolbar, alignmentLabel } = this._createAlignmentFields();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.children = this.createCollection();\n\t\tthis.borderStyleDropdown = borderStyleDropdown;\n\t\tthis.borderWidthInput = borderWidthInput;\n\t\tthis.borderColorInput = borderColorInput;\n\t\tthis.backgroundInput = backgroundInput;\n\t\tthis.cellTypeDropdown = cellTypeDropdown;\n\t\tthis.paddingInput = this._createPaddingField();\n\t\tthis.widthInput = widthInput;\n\t\tthis.heightInput = heightInput;\n\t\tthis.horizontalAlignmentToolbar = horizontalAlignmentToolbar;\n\t\tthis.verticalAlignmentToolbar = verticalAlignmentToolbar;\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tconst header = new FormHeaderView(locale, { label: this.t(\"Cell properties\") });\n\t\theader.children.add(this.backButtonView, 0);\n\t\tthis.children.add(header);\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tlabelView: borderRowLabel,\n\t\t\tchildren: [\n\t\t\t\tborderRowLabel,\n\t\t\t\tborderStyleDropdown,\n\t\t\t\tborderWidthInput,\n\t\t\t\tborderColorInput\n\t\t\t],\n\t\t\tclass: \"ck-table-form__border-row\"\n\t\t}));\n\t\tthis.children.add(new FormRowView(locale, { children: [new FormRowView(locale, {\n\t\t\tlabelView: cellTypeRowLabel,\n\t\t\tchildren: [cellTypeRowLabel, cellTypeDropdown],\n\t\t\tclass: \"ck-table-form__cell-type-row\"\n\t\t}), new FormRowView(locale, {\n\t\t\tlabelView: backgroundRowLabel,\n\t\t\tchildren: [backgroundRowLabel, backgroundInput],\n\t\t\tclass: \"ck-table-form__background-row\"\n\t\t})] }));\n\t\tthis.children.add(new FormRowView(locale, { children: [new FormRowView(locale, {\n\t\t\tlabelView: dimensionsLabel,\n\t\t\tchildren: [\n\t\t\t\tdimensionsLabel,\n\t\t\t\twidthInput,\n\t\t\t\toperatorLabel,\n\t\t\t\theightInput\n\t\t\t],\n\t\t\tclass: \"ck-table-form__dimensions-row\"\n\t\t}), new FormRowView(locale, {\n\t\t\tchildren: [this.paddingInput],\n\t\t\tclass: \"ck-table-cell-properties-form__padding-row\"\n\t\t})] }));\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tlabelView: alignmentLabel,\n\t\t\tchildren: [\n\t\t\t\talignmentLabel,\n\t\t\t\thorizontalAlignmentToolbar,\n\t\t\t\tverticalAlignmentToolbar\n\t\t\t],\n\t\t\tclass: \"ck-table-cell-properties-form__alignment-row\"\n\t\t}));\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tchildren: [this.cancelButtonView, this.saveButtonView],\n\t\t\tclass: \"ck-table-form__action-row\"\n\t\t}));\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-form\",\n\t\t\t\t\t\"ck-table-form\",\n\t\t\t\t\t\"ck-table-cell-properties-form\"\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\t[this.borderColorInput, this.backgroundInput].forEach((view) => {\n\t\t\tthis._focusCycler.chain(view.fieldView.focusCycler);\n\t\t});\n\t\t[\n\t\t\tthis.borderStyleDropdown,\n\t\t\tthis.borderColorInput,\n\t\t\tthis.borderWidthInput,\n\t\t\tthis.cellTypeDropdown,\n\t\t\tthis.backgroundInput,\n\t\t\tthis.widthInput,\n\t\t\tthis.heightInput,\n\t\t\tthis.paddingInput,\n\t\t\tthis.horizontalAlignmentToolbar,\n\t\t\tthis.verticalAlignmentToolbar,\n\t\t\tthis.cancelButtonView,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.backButtonView\n\t\t].forEach((view) => {\n\t\t\tthis._focusables.add(view);\n\t\t\tthis.focusTracker.add(view.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the fist focusable field in the form.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #borderStyleDropdown},\n\t* * {@link #borderWidthInput},\n\t* * {@link #borderColorInput}.\n\t*/\n\t_createBorderFields() {\n\t\tconst defaultTableCellProperties = this.options.defaultTableCellProperties;\n\t\tconst defaultBorder = {\n\t\t\tstyle: defaultTableCellProperties.borderStyle,\n\t\t\twidth: defaultTableCellProperties.borderWidth,\n\t\t\tcolor: defaultTableCellProperties.borderColor\n\t\t};\n\t\tconst colorInputCreator = getLabeledColorInputCreator({\n\t\t\tcolorConfig: this.options.borderColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: defaultBorder.color,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t});\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst accessibleLabel = t(\"Style\");\n\t\tconst borderRowLabel = new LabelView(locale);\n\t\tborderRowLabel.text = t(\"Border\");\n\t\tconst styleLabels = getBorderStyleLabels(t);\n\t\tconst borderStyleDropdown = new LabeledFieldView(locale, createLabeledDropdown);\n\t\tborderStyleDropdown.set({\n\t\t\tlabel: accessibleLabel,\n\t\t\tclass: \"ck-table-form__border-style\"\n\t\t});\n\t\tborderStyleDropdown.fieldView.buttonView.set({\n\t\t\tariaLabel: accessibleLabel,\n\t\t\tariaLabelledBy: void 0,\n\t\t\tisOn: false,\n\t\t\twithText: true,\n\t\t\ttooltip: accessibleLabel\n\t\t});\n\t\tborderStyleDropdown.fieldView.buttonView.bind(\"label\").to(this, \"borderStyle\", (value) => {\n\t\t\treturn styleLabels[value ? value : \"none\"];\n\t\t});\n\t\tborderStyleDropdown.fieldView.on(\"execute\", (evt) => {\n\t\t\tthis.borderStyle = evt.source._borderStyleValue;\n\t\t});\n\t\tborderStyleDropdown.bind(\"isEmpty\").to(this, \"borderStyle\", (value) => !value);\n\t\taddListToDropdown(borderStyleDropdown.fieldView, getBorderStyleDefinitions(this, defaultBorder.style), {\n\t\t\trole: \"menu\",\n\t\t\tariaLabel: accessibleLabel\n\t\t});\n\t\tconst borderWidthInput = new LabeledFieldView(locale, createLabeledInputText);\n\t\tborderWidthInput.set({\n\t\t\tlabel: t(\"Width\"),\n\t\t\tclass: \"ck-table-form__border-width\"\n\t\t});\n\t\tborderWidthInput.fieldView.bind(\"value\").to(this, \"borderWidth\");\n\t\tborderWidthInput.bind(\"isEnabled\").to(this, \"borderStyle\", isBorderStyleSet$1);\n\t\tborderWidthInput.fieldView.on(\"input\", () => {\n\t\t\tthis.borderWidth = borderWidthInput.fieldView.element.value;\n\t\t});\n\t\tconst borderColorInput = new LabeledFieldView(locale, colorInputCreator);\n\t\tborderColorInput.set({\n\t\t\tlabel: t(\"Color\"),\n\t\t\tclass: \"ck-table-form__border-color\"\n\t\t});\n\t\tborderColorInput.fieldView.bind(\"value\").to(this, \"borderColor\");\n\t\tborderColorInput.bind(\"isEnabled\").to(this, \"borderStyle\", isBorderStyleSet$1);\n\t\tborderColorInput.fieldView.on(\"input\", () => {\n\t\t\tthis.borderColor = borderColorInput.fieldView.value;\n\t\t});\n\t\tthis.on(\"change:borderStyle\", (evt, name, newValue, oldValue) => {\n\t\t\tif (!isBorderStyleSet$1(newValue)) {\n\t\t\t\tthis.borderColor = \"\";\n\t\t\t\tthis.borderWidth = \"\";\n\t\t\t}\n\t\t\tif (!isBorderStyleSet$1(oldValue)) {\n\t\t\t\tthis.borderColor = defaultBorder.color;\n\t\t\t\tthis.borderWidth = defaultBorder.width;\n\t\t\t}\n\t\t});\n\t\treturn {\n\t\t\tborderRowLabel,\n\t\t\tborderStyleDropdown,\n\t\t\tborderColorInput,\n\t\t\tborderWidthInput\n\t\t};\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #backgroundInput}.\n\t*/\n\t_createBackgroundFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst backgroundRowLabel = new LabelView(locale);\n\t\tbackgroundRowLabel.text = t(\"Background\");\n\t\tconst colorInputCreator = getLabeledColorInputCreator({\n\t\t\tcolorConfig: this.options.backgroundColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: this.options.defaultTableCellProperties.backgroundColor,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t});\n\t\tconst backgroundInput = new LabeledFieldView(locale, colorInputCreator);\n\t\tbackgroundInput.set({\n\t\t\tlabel: t(\"Color\"),\n\t\t\tclass: \"ck-table-cell-properties-form__background\"\n\t\t});\n\t\tbackgroundInput.fieldView.bind(\"value\").to(this, \"backgroundColor\");\n\t\tbackgroundInput.fieldView.on(\"input\", () => {\n\t\t\tthis.backgroundColor = backgroundInput.fieldView.value;\n\t\t});\n\t\treturn {\n\t\t\tbackgroundRowLabel,\n\t\t\tbackgroundInput\n\t\t};\n\t}\n\t/**\n\t* Create cell type field.\n\t*\n\t* * {@link #cellTypeDropdown}.\n\t*\n\t* @internal\n\t*/\n\t_createCellTypeField() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst cellTypeRowLabel = new LabelView(locale);\n\t\tcellTypeRowLabel.text = t(\"Cell type\");\n\t\tconst cellTypeLabels = this._cellTypeLabels;\n\t\tconst cellTypeDropdown = new LabeledFieldView(locale, createLabeledDropdown);\n\t\tcellTypeDropdown.set({\n\t\t\tlabel: t(\"Cell type\"),\n\t\t\tclass: \"ck-table-cell-properties-form__cell-type\"\n\t\t});\n\t\tcellTypeDropdown.fieldView.buttonView.set({\n\t\t\tariaLabel: t(\"Cell type\"),\n\t\t\tariaLabelledBy: void 0,\n\t\t\tisOn: false,\n\t\t\twithText: true,\n\t\t\ttooltip: t(\"Cell type\")\n\t\t});\n\t\tcellTypeDropdown.fieldView.buttonView.bind(\"label\").to(this, \"cellType\", (value) => {\n\t\t\treturn cellTypeLabels[value || \"data\"];\n\t\t});\n\t\tcellTypeDropdown.fieldView.on(\"execute\", (evt) => {\n\t\t\tthis.cellType = evt.source._cellTypeValue;\n\t\t});\n\t\tcellTypeDropdown.bind(\"isEmpty\").to(this, \"cellType\", (value) => !value);\n\t\taddListToDropdown(cellTypeDropdown.fieldView, this._getCellTypeDefinitions(), {\n\t\t\trole: \"menu\",\n\t\t\tariaLabel: t(\"Cell type\")\n\t\t});\n\t\treturn {\n\t\t\tcellTypeRowLabel,\n\t\t\tcellTypeDropdown\n\t\t};\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #widthInput}.\n\t* * {@link #heightInput}.\n\t*/\n\t_createDimensionFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst dimensionsLabel = new LabelView(locale);\n\t\tdimensionsLabel.text = t(\"Dimensions\");\n\t\tconst widthInput = new LabeledFieldView(locale, createLabeledInputText);\n\t\twidthInput.set({\n\t\t\tlabel: t(\"Width\"),\n\t\t\tclass: \"ck-table-form__dimensions-row__width\"\n\t\t});\n\t\twidthInput.fieldView.bind(\"value\").to(this, \"width\");\n\t\twidthInput.fieldView.on(\"input\", () => {\n\t\t\tthis.width = widthInput.fieldView.element.value;\n\t\t});\n\t\tconst operatorLabel = new View(locale);\n\t\toperatorLabel.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck-table-form__dimension-operator\"] },\n\t\t\tchildren: [{ text: \"×\" }]\n\t\t});\n\t\tconst heightInput = new LabeledFieldView(locale, createLabeledInputText);\n\t\theightInput.set({\n\t\t\tlabel: t(\"Height\"),\n\t\t\tclass: \"ck-table-form__dimensions-row__height\"\n\t\t});\n\t\theightInput.fieldView.bind(\"value\").to(this, \"height\");\n\t\theightInput.fieldView.on(\"input\", () => {\n\t\t\tthis.height = heightInput.fieldView.element.value;\n\t\t});\n\t\treturn {\n\t\t\tdimensionsLabel,\n\t\t\twidthInput,\n\t\t\toperatorLabel,\n\t\t\theightInput\n\t\t};\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #paddingInput}.\n\t*/\n\t_createPaddingField() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst paddingInput = new LabeledFieldView(locale, createLabeledInputText);\n\t\tpaddingInput.set({\n\t\t\tlabel: t(\"Padding\"),\n\t\t\tclass: \"ck-table-cell-properties-form__padding\"\n\t\t});\n\t\tpaddingInput.fieldView.bind(\"value\").to(this, \"padding\");\n\t\tpaddingInput.fieldView.on(\"input\", () => {\n\t\t\tthis.padding = paddingInput.fieldView.element.value;\n\t\t});\n\t\treturn paddingInput;\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #horizontalAlignmentToolbar},\n\t* * {@link #verticalAlignmentToolbar}.\n\t*/\n\t_createAlignmentFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst alignmentLabel = new LabelView(locale);\n\t\tconst ALIGNMENT_ICONS = {\n\t\t\tleft: IconAlignLeft,\n\t\t\tcenter: IconAlignCenter,\n\t\t\tright: IconAlignRight,\n\t\t\tjustify: IconAlignJustify,\n\t\t\ttop: IconAlignTop,\n\t\t\tmiddle: IconAlignMiddle,\n\t\t\tbottom: IconAlignBottom\n\t\t};\n\t\talignmentLabel.text = t(\"Table cell text alignment\");\n\t\tconst horizontalAlignmentToolbar = new ToolbarView(locale);\n\t\tconst isContentRTL = locale.contentLanguageDirection === \"rtl\";\n\t\thorizontalAlignmentToolbar.set({\n\t\t\tisCompact: true,\n\t\t\trole: \"radiogroup\",\n\t\t\tariaLabel: t(\"Horizontal text alignment toolbar\"),\n\t\t\tclass: \"ck-table-cell-properties-form__horizontal-alignment-toolbar\"\n\t\t});\n\t\tfillToolbar({\n\t\t\tview: this,\n\t\t\ticons: ALIGNMENT_ICONS,\n\t\t\ttoolbar: horizontalAlignmentToolbar,\n\t\t\tlabels: this._horizontalAlignmentLabels,\n\t\t\tpropertyName: \"horizontalAlignment\",\n\t\t\tnameToValue: (name) => {\n\t\t\t\tif (isContentRTL) {\n\t\t\t\t\tif (name === \"left\") return \"right\";\n\t\t\t\t\telse if (name === \"right\") return \"left\";\n\t\t\t\t}\n\t\t\t\treturn name;\n\t\t\t},\n\t\t\tdefaultValue: this.options.defaultTableCellProperties.horizontalAlignment\n\t\t});\n\t\tconst verticalAlignmentToolbar = new ToolbarView(locale);\n\t\tverticalAlignmentToolbar.set({\n\t\t\tisCompact: true,\n\t\t\trole: \"radiogroup\",\n\t\t\tariaLabel: t(\"Vertical text alignment toolbar\"),\n\t\t\tclass: \"ck-table-cell-properties-form__vertical-alignment-toolbar\"\n\t\t});\n\t\tfillToolbar({\n\t\t\tview: this,\n\t\t\ticons: ALIGNMENT_ICONS,\n\t\t\ttoolbar: verticalAlignmentToolbar,\n\t\t\tlabels: this._verticalAlignmentLabels,\n\t\t\tpropertyName: \"verticalAlignment\",\n\t\t\tdefaultValue: this.options.defaultTableCellProperties.verticalAlignment\n\t\t});\n\t\treturn {\n\t\t\thorizontalAlignmentToolbar,\n\t\t\tverticalAlignmentToolbar,\n\t\t\talignmentLabel\n\t\t};\n\t}\n\t/**\n\t* Creates the following form controls:\n\t*\n\t* * {@link #saveButtonView},\n\t* * {@link #cancelButtonView}.\n\t*/\n\t_createActionButtons() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst saveButtonView = new ButtonView(locale);\n\t\tconst cancelButtonView = new ButtonView(locale);\n\t\tconst fieldsThatShouldValidateToSave = [\n\t\t\tthis.borderWidthInput,\n\t\t\tthis.borderColorInput,\n\t\t\tthis.backgroundInput,\n\t\t\tthis.paddingInput\n\t\t];\n\t\tsaveButtonView.set({\n\t\t\tlabel: t(\"Save\"),\n\t\t\tclass: \"ck-button-action\",\n\t\t\ttype: \"submit\",\n\t\t\twithText: true\n\t\t});\n\t\tsaveButtonView.bind(\"isEnabled\").toMany(fieldsThatShouldValidateToSave, \"errorText\", (...errorTexts) => {\n\t\t\treturn errorTexts.every((errorText) => !errorText);\n\t\t});\n\t\tcancelButtonView.set({\n\t\t\tlabel: t(\"Cancel\"),\n\t\t\twithText: true\n\t\t});\n\t\tcancelButtonView.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn {\n\t\t\tsaveButtonView,\n\t\t\tcancelButtonView\n\t\t};\n\t}\n\t/**\n\t* Creates a back button view that cancels the form.\n\t*/\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn backButton;\n\t}\n\t/**\n\t* Creates the cell type dropdown definitions.\n\t*/\n\t_getCellTypeDefinitions() {\n\t\tconst itemDefinitions = new Collection();\n\t\tconst labels = this._cellTypeLabels;\n\t\tconst types = [\"data\", \"header\"];\n\t\tif (this.options.showScopedHeaderOptions) types.push(\"header-column\", \"header-row\");\n\t\tfor (const type of types) {\n\t\t\tconst definition = {\n\t\t\t\ttype: \"button\",\n\t\t\t\tmodel: new UIModel({\n\t\t\t\t\t_cellTypeValue: type,\n\t\t\t\t\tlabel: labels[type],\n\t\t\t\t\trole: \"menuitemradio\",\n\t\t\t\t\twithText: true\n\t\t\t\t})\n\t\t\t};\n\t\t\tdefinition.model.bind(\"isOn\").to(this, \"cellType\", (value) => value === type);\n\t\t\titemDefinitions.add(definition);\n\t\t}\n\t\treturn itemDefinitions;\n\t}\n\t/**\n\t* Provides localized labels for {@link #horizontalAlignmentToolbar} buttons.\n\t*/\n\tget _horizontalAlignmentLabels() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst left = t(\"Align cell text to the left\");\n\t\tconst center = t(\"Align cell text to the center\");\n\t\tconst right = t(\"Align cell text to the right\");\n\t\tconst justify = t(\"Justify cell text\");\n\t\tif (locale.uiLanguageDirection === \"rtl\") return {\n\t\t\tright,\n\t\t\tcenter,\n\t\t\tleft,\n\t\t\tjustify\n\t\t};\n\t\telse return {\n\t\t\tleft,\n\t\t\tcenter,\n\t\t\tright,\n\t\t\tjustify\n\t\t};\n\t}\n\t/**\n\t* Provides localized labels for {@link #verticalAlignmentToolbar} buttons.\n\t*/\n\tget _verticalAlignmentLabels() {\n\t\tconst t = this.t;\n\t\treturn {\n\t\t\ttop: t(\"Align cell text to the top\"),\n\t\t\tmiddle: t(\"Align cell text to the middle\"),\n\t\t\tbottom: t(\"Align cell text to the bottom\")\n\t\t};\n\t}\n\t/**\n\t* Provides localized labels for {@link #cellTypeDropdown}.\n\t*/\n\tget _cellTypeLabels() {\n\t\tconst t = this.t;\n\t\treturn {\n\t\t\tdata: t(\"Data cell\"),\n\t\t\theader: t(\"Header cell\"),\n\t\t\t\"header-column\": t(\"Column header\"),\n\t\t\t\"header-row\": t(\"Row header\")\n\t\t};\n\t}\n};\nfunction isBorderStyleSet$1(value) {\n\treturn value !== \"none\";\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 table/utils/ui/contextualballoon\n*/\nconst BALLOON_POSITIONS = /* #__PURE__ */ (() => [\n\tBalloonPanelView.defaultPositions.northArrowSouth,\n\tBalloonPanelView.defaultPositions.northArrowSouthWest,\n\tBalloonPanelView.defaultPositions.northArrowSouthEast,\n\tBalloonPanelView.defaultPositions.southArrowNorth,\n\tBalloonPanelView.defaultPositions.southArrowNorthWest,\n\tBalloonPanelView.defaultPositions.southArrowNorthEast,\n\tBalloonPanelView.defaultPositions.viewportStickyNorth\n])();\n/**\n* A helper utility that positions the\n* {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance\n* with respect to the table in the editor content, if one is selected.\n*\n* @internal\n* @param editor The editor instance.\n* @param target Either \"cell\" or \"table\". Determines the target the balloon will be attached to.\n*/\nfunction repositionContextualBalloon(editor, target) {\n\tconst balloon = editor.plugins.get(\"ContextualBalloon\");\n\tconst selection = editor.editing.view.document.selection;\n\tlet position;\n\tif (target === \"cell\") {\n\t\tif (getTableWidgetAncestor(selection)) position = getBalloonCellPositionData(editor);\n\t} else if (getSelectionAffectedTableWidget(selection)) position = getBalloonTablePositionData(editor);\n\tif (position) balloon.updatePosition(position);\n}\n/**\n* Returns the positioning options that control the geometry of the\n* {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n* to the selected table in the editor content.\n*\n* @param editor The editor instance.\n*/\nfunction getBalloonTablePositionData(editor) {\n\tconst selection = editor.model.document.selection;\n\tconst modelTable = getSelectionAffectedTable(selection);\n\tconst viewTable = editor.editing.mapper.toViewElement(modelTable);\n\treturn {\n\t\ttarget: editor.editing.view.domConverter.mapViewToDom(viewTable),\n\t\tpositions: BALLOON_POSITIONS\n\t};\n}\n/**\n* Returns the positioning options that control the geometry of the\n* {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n* to the selected table cell in the editor content.\n*\n* @param editor The editor instance.\n* @internal\n*/\nfunction getBalloonCellPositionData(editor) {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\tconst selection = editor.model.document.selection;\n\tif (selection.rangeCount > 1) return {\n\t\ttarget: () => createBoundingRect(selection.getRanges(), editor),\n\t\tpositions: BALLOON_POSITIONS\n\t};\n\tconst modelTableCell = getTableCellAtPosition(selection.getFirstPosition());\n\tconst viewTableCell = mapper.toViewElement(modelTableCell);\n\treturn {\n\t\ttarget: domConverter.mapViewToDom(viewTableCell),\n\t\tpositions: BALLOON_POSITIONS\n\t};\n}\n/**\n* Returns the first selected table cell from a multi-cell or in-cell selection.\n*\n* @param position Document position.\n*/\nfunction getTableCellAtPosition(position) {\n\treturn position.nodeAfter && position.nodeAfter.is(\"element\", \"tableCell\") ? position.nodeAfter : position.findAncestor(\"tableCell\");\n}\n/**\n* Returns bounding rectangle for given model ranges.\n*\n* @param ranges Model ranges that the bounding rect should be returned for.\n* @param editor The editor instance.\n*/\nfunction createBoundingRect(ranges, editor) {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\tconst rects = Array.from(ranges).map((range) => {\n\t\tconst modelTableCell = getTableCellAtPosition(range.start);\n\t\tconst viewTableCell = mapper.toViewElement(modelTableCell);\n\t\treturn new Rect(domConverter.mapViewToDom(viewTableCell));\n\t});\n\treturn Rect.getBoundingRect(rects);\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 table/tablecellproperties/tablecellpropertiesui\n*/\nconst ERROR_TEXT_TIMEOUT$1 = 500;\nconst propertyToCommandMap$1 = {\n\tborderStyle: \"tableCellBorderStyle\",\n\tborderColor: \"tableCellBorderColor\",\n\tborderWidth: \"tableCellBorderWidth\",\n\theight: \"tableCellHeight\",\n\twidth: \"tableCellWidth\",\n\tpadding: \"tableCellPadding\",\n\tbackgroundColor: \"tableCellBackgroundColor\",\n\thorizontalAlignment: \"tableCellHorizontalAlignment\",\n\tverticalAlignment: \"tableCellVerticalAlignment\",\n\tcellType: \"tableCellType\"\n};\n/**\n* The table cell properties UI plugin. It introduces the `'tableCellProperties'` button\n* that opens a form allowing to specify the visual styling of a table cell.\n*\n* It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n*/\nvar TableCellPropertiesUI = class extends Plugin {\n\t/**\n\t* The default table cell properties.\n\t*/\n\t_defaultContentTableCellProperties;\n\t/**\n\t* The default layout table cell properties.\n\t*/\n\t_defaultLayoutTableCellProperties;\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* The cell properties form view displayed inside the balloon.\n\t*/\n\tview;\n\t/**\n\t* The cell properties form view displayed inside the balloon (content table).\n\t*/\n\t_viewWithContentTableDefaults;\n\t/**\n\t* The cell properties form view displayed inside the balloon (layout table).\n\t*/\n\t_viewWithLayoutTableDefaults;\n\t/**\n\t* The batch used to undo all changes made by the form (which are live, as the user types)\n\t* when \"Cancel\" was pressed. Each time the view is shown, a new batch is created.\n\t*/\n\t_undoStepBatch;\n\t/**\n\t* Flag used to indicate whether view is ready to execute update commands\n\t* (it finished loading initial data).\n\t*/\n\t_isReady;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableCellPropertiesUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"table.tableCellProperties\", {\n\t\t\tborderColors: defaultColors,\n\t\t\tbackgroundColors: defaultColors\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tthis._defaultContentTableCellProperties = getNormalizedDefaultCellProperties(editor.config.get(\"table.tableCellProperties.defaultProperties\"), {\n\t\t\tincludeVerticalAlignmentProperty: true,\n\t\t\tincludeHorizontalAlignmentProperty: true,\n\t\t\tincludePaddingProperty: true,\n\t\t\tisRightToLeftContent: editor.locale.contentLanguageDirection === \"rtl\"\n\t\t});\n\t\tthis._defaultLayoutTableCellProperties = getNormalizedDefaultProperties(void 0, {\n\t\t\tincludeVerticalAlignmentProperty: true,\n\t\t\tincludeHorizontalAlignmentProperty: true,\n\t\t\tisRightToLeftContent: editor.locale.contentLanguageDirection === \"rtl\"\n\t\t});\n\t\tthis._balloon = editor.plugins.get(ContextualBalloon);\n\t\tthis.view = null;\n\t\tthis._isReady = false;\n\t\teditor.ui.componentFactory.add(\"tableCellProperties\", (locale) => {\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tview.set({\n\t\t\t\tlabel: t(\"Cell properties\"),\n\t\t\t\ticon: IconTableCellProperties,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tthis.listenTo(view, \"execute\", () => this._showView());\n\t\t\tconst commands = Object.values(propertyToCommandMap$1).map((commandName) => editor.commands.get(commandName)).filter((val) => !!val);\n\t\t\tview.bind(\"isEnabled\").toMany(commands, \"isEnabled\", (...areEnabled) => areEnabled.some((isCommandEnabled) => isCommandEnabled));\n\t\t\treturn view;\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this.view) this.view.destroy();\n\t}\n\t/**\n\t* Creates the {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView} instance.\n\t*\n\t* @returns The cell properties form view instance.\n\t*/\n\t_createPropertiesView(defaultTableCellProperties) {\n\t\tconst editor = this.editor;\n\t\tconst config = editor.config.get(\"table.tableCellProperties\");\n\t\tconst scopedHeaders = !!editor.config.get(\"table.tableCellProperties.scopedHeaders\");\n\t\tconst borderColorsConfig = normalizeColorOptions(config.borderColors);\n\t\tconst localizedBorderColors = getLocalizedColorOptions(editor.locale, borderColorsConfig);\n\t\tconst backgroundColorsConfig = normalizeColorOptions(config.backgroundColors);\n\t\tconst localizedBackgroundColors = getLocalizedColorOptions(editor.locale, backgroundColorsConfig);\n\t\tconst hasColorPicker = config.colorPicker !== false;\n\t\tconst view = new TableCellPropertiesView(editor.locale, {\n\t\t\tborderColors: localizedBorderColors,\n\t\t\tbackgroundColors: localizedBackgroundColors,\n\t\t\tdefaultTableCellProperties,\n\t\t\tcolorPickerConfig: hasColorPicker ? config.colorPicker || {} : false,\n\t\t\tshowScopedHeaderOptions: scopedHeaders\n\t\t});\n\t\tconst t = editor.t;\n\t\tview.render();\n\t\tthis.listenTo(view, \"submit\", () => {\n\t\t\tthis._hideView();\n\t\t});\n\t\tthis.listenTo(view, \"cancel\", () => {\n\t\t\tif (this._undoStepBatch.operations.length) editor.execute(\"undo\", this._undoStepBatch);\n\t\t\tthis._hideView();\n\t\t});\n\t\tview.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis._hideView();\n\t\t\tcancel();\n\t\t});\n\t\tclickOutsideHandler({\n\t\t\temitter: view,\n\t\t\tactivator: () => this._isViewInBalloon,\n\t\t\tcontextElements: [this._balloon.view.element],\n\t\t\tcallback: () => this._hideView()\n\t\t});\n\t\tconst colorErrorText = getLocalizedColorErrorText(t);\n\t\tconst lengthErrorText = getLocalizedLengthErrorText(t);\n\t\tview.on(\"change:borderStyle\", this._getPropertyChangeCallback(\"tableCellBorderStyle\"));\n\t\tview.on(\"change:borderColor\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.borderColorInput,\n\t\t\tcommandName: \"tableCellBorderColor\",\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t}));\n\t\tview.on(\"change:borderWidth\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.borderWidthInput,\n\t\t\tcommandName: \"tableCellBorderWidth\",\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lineWidthFieldValidator\n\t\t}));\n\t\tview.on(\"change:padding\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.paddingInput,\n\t\t\tcommandName: \"tableCellPadding\",\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t}));\n\t\tview.on(\"change:width\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.widthInput,\n\t\t\tcommandName: \"tableCellWidth\",\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t}));\n\t\tview.on(\"change:height\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.heightInput,\n\t\t\tcommandName: \"tableCellHeight\",\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t}));\n\t\tview.on(\"change:backgroundColor\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.backgroundInput,\n\t\t\tcommandName: \"tableCellBackgroundColor\",\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t}));\n\t\tview.on(\"change:horizontalAlignment\", this._getPropertyChangeCallback(\"tableCellHorizontalAlignment\"));\n\t\tview.on(\"change:verticalAlignment\", this._getPropertyChangeCallback(\"tableCellVerticalAlignment\"));\n\t\tconst cellTypeCommand = editor.commands.get(\"tableCellType\");\n\t\tif (cellTypeCommand) {\n\t\t\tview.cellTypeDropdown.bind(\"isEnabled\").to(cellTypeCommand, \"isEnabled\");\n\t\t\tview.on(\"change:cellType\", this._getPropertyChangeCallback(\"tableCellType\"));\n\t\t}\n\t\treturn view;\n\t}\n\t/**\n\t* In this method the \"editor data -> UI\" binding is happening.\n\t*\n\t* When executed, this method obtains selected cell property values from various table commands\n\t* and passes them to the {@link #view}.\n\t*\n\t* This way, the UI stays up–to–date with the editor data.\n\t*/\n\t_fillViewFormFromCommandValues() {\n\t\tconst commands = this.editor.commands;\n\t\tconst borderStyleCommand = commands.get(\"tableCellBorderStyle\");\n\t\tObject.entries(propertyToCommandMap$1).flatMap(([property, commandName]) => {\n\t\t\tconst effectiveCommandName = property === \"width\" ? this._getWidthCommandName() : commandName;\n\t\t\tconst command = commands.get(effectiveCommandName);\n\t\t\tif (!command) return [];\n\t\t\tconst propertyKey = property;\n\t\t\tlet defaultValue;\n\t\t\tif (propertyKey === \"cellType\") defaultValue = \"\";\n\t\t\telse defaultValue = this.view === this._viewWithContentTableDefaults ? this._defaultContentTableCellProperties[propertyKey] || \"\" : this._defaultLayoutTableCellProperties[propertyKey] || \"\";\n\t\t\treturn [[property, command.value || defaultValue]];\n\t\t}).forEach(([property, value]) => {\n\t\t\tif ((property === \"borderColor\" || property === \"borderWidth\") && borderStyleCommand.value === \"none\") return;\n\t\t\tthis.view.set(property, value);\n\t\t});\n\t\tthis._isReady = true;\n\t}\n\t/**\n\t* Shows the {@link #view} in the {@link #_balloon}.\n\t*\n\t* **Note**: Each time a view is shown, a new {@link #_undoStepBatch} is created. It contains\n\t* all changes made to the document when the view is visible, allowing a single undo step\n\t* for all of them.\n\t*/\n\t_showView() {\n\t\tconst editor = this.editor;\n\t\tconst viewTable = getSelectionAffectedTableWidget(editor.editing.view.document.selection);\n\t\tconst modelTable = viewTable && editor.editing.mapper.toModelElement(viewTable);\n\t\tconst useDefaults = !modelTable || modelTable.getAttribute(\"tableType\") !== \"layout\";\n\t\tif (useDefaults && !this._viewWithContentTableDefaults) this._viewWithContentTableDefaults = this._createPropertiesView(this._defaultContentTableCellProperties);\n\t\telse if (!useDefaults && !this._viewWithLayoutTableDefaults) this._viewWithLayoutTableDefaults = this._createPropertiesView(this._defaultLayoutTableCellProperties);\n\t\tthis.view = useDefaults ? this._viewWithContentTableDefaults : this._viewWithLayoutTableDefaults;\n\t\tthis.listenTo(editor.ui, \"update\", () => {\n\t\t\tthis._updateView();\n\t\t});\n\t\tthis._fillViewFormFromCommandValues();\n\t\tthis._balloon.add({\n\t\t\tview: this.view,\n\t\t\tposition: getBalloonCellPositionData(editor)\n\t\t});\n\t\tthis._undoStepBatch = editor.model.createBatch();\n\t\tthis.view.focus();\n\t}\n\t/**\n\t* Removes the {@link #view} from the {@link #_balloon}.\n\t*/\n\t_hideView() {\n\t\tconst editor = this.editor;\n\t\tthis.stopListening(editor.ui, \"update\");\n\t\tthis._isReady = false;\n\t\tthis.view.saveButtonView.focus();\n\t\tthis._balloon.remove(this.view);\n\t\tthis.editor.editing.view.focus();\n\t}\n\t/**\n\t* Repositions the {@link #_balloon} or hides the {@link #view} if a table cell is no longer selected.\n\t*/\n\t_updateView() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tif (!getTableWidgetAncestor(viewDocument.selection)) this._hideView();\n\t\telse if (this._isViewVisible) repositionContextualBalloon(editor, \"cell\");\n\t}\n\t/**\n\t* Returns `true` when the {@link #view} is visible in the {@link #_balloon}.\n\t*/\n\tget _isViewVisible() {\n\t\treturn !!this.view && this._balloon.visibleView === this.view;\n\t}\n\t/**\n\t* Returns `true` when the {@link #view} is in the {@link #_balloon}.\n\t*/\n\tget _isViewInBalloon() {\n\t\treturn !!this.view && this._balloon.hasView(this.view);\n\t}\n\t/**\n\t* Creates a callback that when executed upon the {@link #view view's} property change\n\t* executes a related editor command with the new property value.\n\t*\n\t* @param commandName The default value of the command.\n\t*/\n\t_getPropertyChangeCallback(commandName) {\n\t\treturn (evt, propertyName, newValue) => {\n\t\t\tif (!this._isReady) return;\n\t\t\tthis.editor.execute(commandName, {\n\t\t\t\tvalue: newValue,\n\t\t\t\tbatch: this._undoStepBatch\n\t\t\t});\n\t\t};\n\t}\n\t/**\n\t* Creates a callback that when executed upon the {@link #view view's} property change:\n\t* * Executes a related editor command with the new property value if the value is valid,\n\t* * Or sets the error text next to the invalid field, if the value did not pass the validation.\n\t*/\n\t_getValidatedPropertyChangeCallback(options) {\n\t\tconst { commandName, viewField, validator, errorText } = options;\n\t\tconst setErrorTextDebounced = debounce(() => {\n\t\t\tviewField.errorText = errorText;\n\t\t}, ERROR_TEXT_TIMEOUT$1);\n\t\treturn (evt, propertyName, newValue) => {\n\t\t\tsetErrorTextDebounced.cancel();\n\t\t\tif (!this._isReady) return;\n\t\t\tif (validator(newValue)) {\n\t\t\t\tconst executedCommandName = commandName === \"tableCellWidth\" ? this._getWidthCommandName() : commandName;\n\t\t\t\tthis.editor.execute(executedCommandName, {\n\t\t\t\t\tvalue: newValue,\n\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t});\n\t\t\t\tviewField.errorText = null;\n\t\t\t} else setErrorTextDebounced();\n\t\t};\n\t}\n\t/**\n\t* Returns the command that drives the width field. When the table is resized and the selection maps onto a single\n\t* column, the width field is bound to (and executes) the `'tableColumnWidth'` command, so the width applies to the\n\t* column instead of being set as a per-cell width that the column group would shadow. Otherwise it falls back to\n\t* the `'tableCellWidth'` command.\n\t*/\n\t_getWidthCommandName() {\n\t\tconst columnWidthCommand = this.editor.commands.get(\"tableColumnWidth\");\n\t\treturn columnWidthCommand && columnWidthCommand.isEnabled ? \"tableColumnWidth\" : \"tableCellWidth\";\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 table/tablecellproperties/commands/tablecellpropertycommand\n*/\n/**\n* The table cell attribute command.\n*\n* The command is a base command for other table cell property commands.\n*/\nvar TableCellPropertyCommand = class extends Command {\n\t/**\n\t* The attribute that will be set by the command.\n\t*/\n\tattributeName;\n\t/**\n\t* The default value for the attribute.\n\t*\n\t* @readonly\n\t*/\n\t_defaultValue;\n\t/**\n\t* The default value for the attribute for the content table.\n\t*/\n\t_defaultContentTableValue;\n\t/**\n\t* The default value for the attribute for the layout table.\n\t*/\n\t_defaultLayoutTableValue;\n\t/**\n\t* Creates a new `TableCellPropertyCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param attributeName Table cell attribute name.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, attributeName, defaultValue) {\n\t\tsuper(editor);\n\t\tthis.attributeName = attributeName;\n\t\tthis._defaultContentTableValue = defaultValue;\n\t\tswitch (attributeName) {\n\t\t\tcase \"tableCellType\":\n\t\t\t\tthis._defaultLayoutTableValue = \"data\";\n\t\t\t\tbreak;\n\t\t\tcase \"tableCellBorderStyle\":\n\t\t\t\tthis._defaultLayoutTableValue = \"none\";\n\t\t\t\tbreak;\n\t\t\tcase \"tableCellHorizontalAlignment\":\n\t\t\t\tthis._defaultLayoutTableValue = \"left\";\n\t\t\t\tbreak;\n\t\t\tcase \"tableCellVerticalAlignment\":\n\t\t\t\tthis._defaultLayoutTableValue = \"middle\";\n\t\t\t\tbreak;\n\t\t\tdefault: this._defaultLayoutTableValue = void 0;\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst selectedTableCells = this.editor.plugins.get(\"TableUtils\").getSelectionAffectedTableCells(selection);\n\t\tconst table = getSelectionAffectedTable(selection);\n\t\tthis._defaultValue = !table || table.getAttribute(\"tableType\") !== \"layout\" ? this._defaultContentTableValue : this._defaultLayoutTableValue;\n\t\tthis.isEnabled = !!selectedTableCells.length;\n\t\tthis.value = this._getSingleValue(selectedTableCells);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options.value If set, the command will set the attribute on selected table cells.\n\t* If it is not set, the command will remove the attribute from the selected table cells.\n\t* @param options.batch Pass the model batch instance to the command to aggregate changes,\n\t* for example to allow a single undo step for multiple executions.\n\t*/\n\texecute(options = {}) {\n\t\tconst { value, batch } = options;\n\t\tconst model = this.editor.model;\n\t\tconst tableCells = this.editor.plugins.get(\"TableUtils\").getSelectionAffectedTableCells(model.document.selection);\n\t\tconst valueToSet = this._getValueToSet(value);\n\t\tmodel.enqueueChange(batch, (writer) => {\n\t\t\tif (valueToSet) tableCells.forEach((tableCell) => writer.setAttribute(this.attributeName, valueToSet, tableCell));\n\t\t\telse tableCells.forEach((tableCell) => writer.removeAttribute(this.attributeName, tableCell));\n\t\t\tthis.fire(\"afterExecute\", {\n\t\t\t\twriter,\n\t\t\t\ttableCells,\n\t\t\t\tvalueToSet\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Returns the attribute value for a table cell.\n\t*/\n\t_getAttribute(tableCell) {\n\t\tif (!tableCell) return;\n\t\tconst value = tableCell.getAttribute(this.attributeName);\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\n\t}\n\t/**\n\t* Returns the proper model value. It can be used to add a default unit to numeric values.\n\t*/\n\t_getValueToSet(value) {\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\n\t}\n\t/**\n\t* Returns a single value for all selected table cells. If the value is the same for all cells,\n\t* it will be returned (`undefined` otherwise).\n\t*/\n\t_getSingleValue(tableCells) {\n\t\tconst firstCellValue = this._getAttribute(tableCells[0]);\n\t\treturn tableCells.every((tableCells) => this._getAttribute(tableCells) === firstCellValue) ? firstCellValue : void 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* The table cell width command.\n*\n* The command is registered by the {@link module:table/tablecellwidth/tablecellwidthediting~TableCellWidthEditing} as\n* the `'tableCellWidth'` editor command.\n*\n* To change the width of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellWidth', {\n*   value: '50px'\n* } );\n* ```\n*\n* **Note**: This command adds a default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableCellWidth', {\n*   value: '50'\n* } );\n* ```\n*\n* will set the `width` attribute to `'50px'` in the model.\n*/\nvar TableCellWidthCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellWidthCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellWidth\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValueToSet(value) {\n\t\tvalue = addDefaultUnitToNumericValue(value, \"px\");\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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 table/tablecellwidth/tablecellwidthediting\n*/\n/**\n* The table cell width editing feature.\n*\n* Introduces `tableCellWidth` table cell model attribute alongside with its converters\n* and a command.\n*/\nvar TableCellWidthEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableCellWidthEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst defaultTableCellProperties = getNormalizedDefaultCellProperties(editor.config.get(\"table.tableCellProperties.defaultProperties\"));\n\t\tenableProperty(editor.model.schema, editor.conversion, {\n\t\t\tmodelAttribute: \"tableCellWidth\",\n\t\t\tstyleName: \"width\",\n\t\t\tattributeName: \"width\",\n\t\t\tattributeType: \"length\",\n\t\t\tdefaultValue: defaultTableCellProperties.width\n\t\t});\n\t\teditor.commands.add(\"tableCellWidth\", new TableCellWidthCommand(editor, defaultTableCellProperties.width));\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* The table cell padding command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellPadding'` editor command.\n*\n* To change the padding of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellPadding', {\n*   value: '5px'\n* } );\n* ```\n*\n* **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableCellPadding', {\n*   value: '5'\n* } );\n* ```\n*\n* will set the `padding` attribute to `'5px'` in the model.\n*/\nvar TableCellPaddingCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellPaddingCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellPadding\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getAttribute(tableCell) {\n\t\tif (!tableCell) return;\n\t\tconst value = getSingleValue(tableCell.getAttribute(this.attributeName));\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValueToSet(value) {\n\t\tconst newValue = addDefaultUnitToNumericValue(value, \"px\");\n\t\tif (newValue === this._defaultValue) return;\n\t\treturn newValue;\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* The table cell height command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellHeight'` editor command.\n*\n* To change the height of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellHeight', {\n*   value: '50px'\n* } );\n* ```\n*\n* **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableCellHeight', {\n*   value: '50'\n* } );\n* ```\n*\n* will set the `height` attribute to `'50px'` in the model.\n*/\nvar TableCellHeightCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellHeightCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellHeight\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValueToSet(value) {\n\t\tconst newValue = addDefaultUnitToNumericValue(value, \"px\");\n\t\tif (newValue === this._defaultValue) return;\n\t\treturn newValue;\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* The table cell background color command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellBackgroundColor'` editor command.\n*\n* To change the background color of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellBackgroundColor', {\n*   value: '#f00'\n* } );\n* ```\n*/\nvar TableCellBackgroundColorCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellBackgroundColorCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellBackgroundColor\", defaultValue);\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* The table cell vertical alignment command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellVerticalAlignment'` editor command.\n*\n* To change the vertical text alignment of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellVerticalAlignment', {\n*   value: 'top'\n* } );\n* ```\n*\n* The following values, corresponding to the\n* [`vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align), are allowed:\n*\n* * `'top'`\n* * `'bottom'`\n*\n* The `'middle'` value is the default one so there is no need to set it.\n*/\nvar TableCellVerticalAlignmentCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellVerticalAlignmentCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value for the \"alignment\" attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellVerticalAlignment\", defaultValue);\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* The table cell horizontal alignment command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellHorizontalAlignment'` editor command.\n*\n* To change the horizontal text alignment of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellHorizontalAlignment', {\n*  value: 'right'\n* } );\n* ```\n*/\nvar TableCellHorizontalAlignmentCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellHorizontalAlignmentCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value for the \"alignment\" attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellHorizontalAlignment\", defaultValue);\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* The table cell border style command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellBorderStyle'` editor command.\n*\n* To change the border style of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellBorderStyle', {\n*   value: 'dashed'\n* } );\n* ```\n*/\nvar TableCellBorderStyleCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellBorderStyleCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellBorderStyle\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getAttribute(tableCell) {\n\t\tif (!tableCell) return;\n\t\tconst value = getSingleValue(tableCell.getAttribute(this.attributeName));\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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* The table cell border color command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellBorderColor'` editor command.\n*\n* To change the border color of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellBorderColor', {\n*   value: '#f00'\n* } );\n* ```\n*/\nvar TableCellBorderColorCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellBorderColorCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellBorderColor\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getAttribute(tableCell) {\n\t\tif (!tableCell) return;\n\t\tconst value = getSingleValue(tableCell.getAttribute(this.attributeName));\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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* The table cell border width command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellBorderWidth'` editor command.\n*\n* To change the border width of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellBorderWidth', {\n*   value: '5px'\n* } );\n* ```\n*\n* **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableCellBorderWidth', {\n*   value: '5'\n* } );\n* ```\n*\n* will set the `borderWidth` attribute to `'5px'` in the model.\n*/\nvar TableCellBorderWidthCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellBorderWidthCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableCellBorderWidth\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getAttribute(tableCell) {\n\t\tif (!tableCell) return;\n\t\tconst value = getSingleValue(tableCell.getAttribute(this.attributeName));\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValueToSet(value) {\n\t\tconst newValue = addDefaultUnitToNumericValue(value, \"px\");\n\t\tif (newValue === this._defaultValue) return;\n\t\treturn newValue;\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* The table cell type command.\n*\n* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n* the `'tableCellType'` editor command.\n*\n* To change the type of selected cells, execute the command:\n*\n* ```ts\n* editor.execute( 'tableCellType', {\n*   value: 'header'\n* } );\n* ```\n*\n* The `value` can be either `'header'` or `'data'`.\n* It'll return `undefined` if multiple types are selected.\n*/\nvar TableCellTypeCommand = class extends TableCellPropertyCommand {\n\t/**\n\t* Creates a new `TableCellTypeCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor, \"tableCellType\", \"data\");\n\t\tthis.on(\"afterExecute\", (_, data) => {\n\t\t\tconst { writer, tableCells } = data;\n\t\t\tupdateTablesHeadingAttributes(this.editor.plugins.get(TableUtils), writer, groupCellsByTable(tableCells).keys());\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tsuper.refresh();\n\t\tconst table = getSelectionAffectedTable(this.editor.model.document.selection);\n\t\tif (this.isEnabled && table && table.getAttribute(\"tableType\") === \"layout\") this.isEnabled = false;\n\t}\n\t/**\n\t* Returns the attribute value for a table cell.\n\t*/\n\t_getAttribute(tableCell) {\n\t\treturn tableCell?.getAttribute(this.attributeName) || \"data\";\n\t}\n};\n/**\n* Updates the `headingRows` and `headingColumns` attributes of the given tables\n* based on the `tableCellType` of their cells.\n*/\nfunction updateTablesHeadingAttributes(tableUtils, writer, tables) {\n\tlet changed = false;\n\tfor (const table of tables) {\n\t\tlet headingRows = table.getAttribute(\"headingRows\") || 0;\n\t\tlet headingColumns = table.getAttribute(\"headingColumns\") || 0;\n\t\tconst footerRows = table.getAttribute(\"footerRows\") || 0;\n\t\tconst footerIndex = tableUtils.getRows(table) - footerRows;\n\t\tconst processColumnsFirst = headingColumns > headingRows;\n\t\tif (processColumnsFirst) {\n\t\t\tconst newHeadingColumns = getAdjustedHeadingSectionSize(tableUtils, table, \"column\", headingColumns, headingRows);\n\t\t\tif (newHeadingColumns !== headingColumns) {\n\t\t\t\ttableUtils.setHeadingColumnsCount(writer, table, newHeadingColumns, { updateCellType: false });\n\t\t\t\theadingColumns = newHeadingColumns;\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\tlet newHeadingRows = getAdjustedHeadingSectionSize(tableUtils, table, \"row\", headingRows, headingColumns);\n\t\tif (footerRows > 0) newHeadingRows = Math.min(newHeadingRows, footerIndex);\n\t\tif (newHeadingRows !== headingRows) {\n\t\t\ttableUtils.setHeadingRowsCount(writer, table, newHeadingRows, { updateCellType: false });\n\t\t\theadingRows = newHeadingRows;\n\t\t\tchanged = true;\n\t\t}\n\t\tif (!processColumnsFirst) {\n\t\t\tconst newHeadingColumns = getAdjustedHeadingSectionSize(tableUtils, table, \"column\", headingColumns, headingRows);\n\t\t\tif (newHeadingColumns !== headingColumns) {\n\t\t\t\ttableUtils.setHeadingColumnsCount(writer, table, newHeadingColumns, { updateCellType: false });\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t}\n\treturn changed;\n}\n/**\n* Calculates the adjusted size of a heading section (rows or columns).\n*\n* The algorithm iterates through rows (or columns) to determine if they should be part of the heading section.\n* A row/column is included if:\n* 1. All its cells are of type 'header'.\n* 2. AND it contains at least one header cell that is NOT already covered by the perpendicular heading section.\n*\n* This check prevents the algorithm from aggressively expanding the heading section when cells are already\n* headers due to the other dimension.\n*\n* Consider a 2x2 table where all cells are headers:\n*\n* ```\n*    C0  C1\n*   +---+---+\n* R0| H | H |\n*   +---+---+\n* R1| H | H |\n*   +---+---+\n* ```\n*\n* If `headingColumns=2`, both C0 and C1 are heading columns.\n* If we want `headingRows=1` (only R0), the algorithm must NOT include R1, even though R1 consists of header cells.\n* R1's cells are headers because of C0 and C1.\n*\n* Without this check, the algorithm would see that R1 is all headers and force `headingRows` to 2.\n* This would prevent the user from reducing `headingRows` from 2 to 1 without converting R1 cells to 'data'\n* (which would incorrectly break C0 and C1).\n*/\nfunction getAdjustedHeadingSectionSize(tableUtils, table, mode, currentSize, perpendicularHeadingSize) {\n\tconst totalRowsOrColumns = mode === \"row\" ? tableUtils.getRows(table) : tableUtils.getColumns(table);\n\tlet size = currentSize;\n\tfor (let currentIndex = 0; currentIndex < totalRowsOrColumns; currentIndex++) {\n\t\tconst walker = new TableWalker(table, { [mode]: currentIndex });\n\t\tlet allCellsAreHeaders = true;\n\t\tlet hasHeaderOutsidePerpendicularSection = false;\n\t\tfor (const { cell, row, column } of walker) {\n\t\t\tif (!isTableHeaderCellType(cell.getAttribute(\"tableCellType\"))) {\n\t\t\t\tallCellsAreHeaders = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ((mode === \"row\" ? column : row) >= perpendicularHeadingSize) hasHeaderOutsidePerpendicularSection = true;\n\t\t}\n\t\tif (!allCellsAreHeaders) return Math.min(size, currentIndex);\n\t\tif (hasHeaderOutsidePerpendicularSection) size = Math.max(size, currentIndex + 1);\n\t}\n\treturn Math.min(size, totalRowsOrColumns);\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 table/tablecellproperties/tablecellpropertiesediting\n*/\nconst VALIGN_VALUES_REG_EXP = /^(top|middle|bottom)$/;\nconst ALIGN_VALUES_REG_EXP = /^(left|center|right|justify)$/;\n/**\n* The table cell properties editing feature.\n*\n* Introduces table cell model attributes and their conversion:\n*\n* - border: `tableCellBorderStyle`, `tableCellBorderColor` and `tableCellBorderWidth`\n* - background color: `tableCellBackgroundColor`\n* - cell padding: `tableCellPadding`\n* - horizontal and vertical alignment: `tableCellHorizontalAlignment`, `tableCellVerticalAlignment`\n* - cell width and height: `tableCellWidth`, `tableCellHeight`\n*\n* It also registers commands used to manipulate the above attributes:\n*\n* - border: the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` commands\n* - background color: the `'tableCellBackgroundColor'` command\n* - cell padding: the `'tableCellPadding'` command\n* - horizontal and vertical alignment: the `'tableCellHorizontalAlignment'` and `'tableCellVerticalAlignment'` commands\n* - width and height: the `'tableCellWidth'` and `'tableCellHeight'` commands\n*/\nvar TableCellPropertiesEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableCellPropertiesEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"TCP\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableEditing, TableCellWidthEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst conversion = editor.conversion;\n\t\teditor.config.define(\"table.tableCellProperties.defaultProperties\", {});\n\t\tconst defaultTableCellProperties = getNormalizedDefaultCellProperties(editor.config.get(\"table.tableCellProperties.defaultProperties\"), {\n\t\t\tincludeVerticalAlignmentProperty: true,\n\t\t\tincludeHorizontalAlignmentProperty: true,\n\t\t\tincludePaddingProperty: true,\n\t\t\tisRightToLeftContent: editor.locale.contentLanguageDirection === \"rtl\"\n\t\t});\n\t\teditor.data.addStyleProcessorRules(addBorderStylesRules);\n\t\tenableBorderProperties$1(editor, {\n\t\t\tcolor: defaultTableCellProperties.borderColor,\n\t\t\tstyle: defaultTableCellProperties.borderStyle,\n\t\t\twidth: defaultTableCellProperties.borderWidth\n\t\t});\n\t\teditor.commands.add(\"tableCellBorderStyle\", new TableCellBorderStyleCommand(editor, defaultTableCellProperties.borderStyle));\n\t\teditor.commands.add(\"tableCellBorderColor\", new TableCellBorderColorCommand(editor, defaultTableCellProperties.borderColor));\n\t\teditor.commands.add(\"tableCellBorderWidth\", new TableCellBorderWidthCommand(editor, defaultTableCellProperties.borderWidth));\n\t\tenableProperty(schema, conversion, {\n\t\t\tmodelAttribute: \"tableCellHeight\",\n\t\t\tstyleName: \"height\",\n\t\t\tattributeName: \"height\",\n\t\t\tattributeType: \"length\",\n\t\t\tdefaultValue: defaultTableCellProperties.height\n\t\t});\n\t\teditor.commands.add(\"tableCellHeight\", new TableCellHeightCommand(editor, defaultTableCellProperties.height));\n\t\teditor.data.addStyleProcessorRules(addPaddingStylesRules);\n\t\tenableProperty(schema, conversion, {\n\t\t\tmodelAttribute: \"tableCellPadding\",\n\t\t\tstyleName: \"padding\",\n\t\t\treduceBoxSides: true,\n\t\t\tdefaultValue: defaultTableCellProperties.padding\n\t\t});\n\t\tenableTableCellPaddingAttribute(editor, defaultTableCellProperties.padding);\n\t\teditor.commands.add(\"tableCellPadding\", new TableCellPaddingCommand(editor, defaultTableCellProperties.padding));\n\t\teditor.data.addStyleProcessorRules(addBackgroundStylesRules);\n\t\tenableProperty(schema, conversion, {\n\t\t\tmodelAttribute: \"tableCellBackgroundColor\",\n\t\t\tstyleName: \"background-color\",\n\t\t\tattributeName: \"bgcolor\",\n\t\t\tattributeType: \"color\",\n\t\t\tdefaultValue: defaultTableCellProperties.backgroundColor\n\t\t});\n\t\teditor.commands.add(\"tableCellBackgroundColor\", new TableCellBackgroundColorCommand(editor, defaultTableCellProperties.backgroundColor));\n\t\tenableHorizontalAlignmentProperty(schema, conversion, defaultTableCellProperties.horizontalAlignment);\n\t\tenableLegacyHorizontalAlignmentAttribute(conversion);\n\t\teditor.commands.add(\"tableCellHorizontalAlignment\", new TableCellHorizontalAlignmentCommand(editor, defaultTableCellProperties.horizontalAlignment));\n\t\tenableVerticalAlignmentProperty(schema, conversion, defaultTableCellProperties.verticalAlignment);\n\t\teditor.commands.add(\"tableCellVerticalAlignment\", new TableCellVerticalAlignmentCommand(editor, defaultTableCellProperties.verticalAlignment));\n\t\tenableCellTypeProperty(editor);\n\t\teditor.commands.add(\"tableCellType\", new TableCellTypeCommand(editor));\n\t}\n};\n/**\n* Enables the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` attributes for table cells.\n*\n* @param editor The editor instance.\n* @param defaultBorder The default border values.\n* @param defaultBorder.color The default `tableCellBorderColor` value.\n* @param defaultBorder.style The default `tableCellBorderStyle` value.\n* @param defaultBorder.width The default `tableCellBorderWidth` value.\n*/\nfunction enableBorderProperties$1(editor, defaultBorder) {\n\tconst { conversion } = editor;\n\tconst { schema } = editor.model;\n\tconst modelAttributes = {\n\t\twidth: \"tableCellBorderWidth\",\n\t\tcolor: \"tableCellBorderColor\",\n\t\tstyle: \"tableCellBorderStyle\"\n\t};\n\tschema.extend(\"tableCell\", { allowAttributes: Object.values(modelAttributes) });\n\tfor (const modelAttribute of Object.values(modelAttributes)) schema.setAttributeProperties(modelAttribute, { isFormatting: true });\n\tupcastBorderStyles(editor, \"td\", modelAttributes, defaultBorder);\n\tupcastBorderStyles(editor, \"th\", modelAttributes, defaultBorder);\n\tdowncastAttributeToStyle(conversion, {\n\t\tmodelElement: \"tableCell\",\n\t\tmodelAttribute: modelAttributes.style,\n\t\tstyleName: \"border-style\"\n\t});\n\tdowncastAttributeToStyle(conversion, {\n\t\tmodelElement: \"tableCell\",\n\t\tmodelAttribute: modelAttributes.color,\n\t\tstyleName: \"border-color\"\n\t});\n\tdowncastAttributeToStyle(conversion, {\n\t\tmodelElement: \"tableCell\",\n\t\tmodelAttribute: modelAttributes.width,\n\t\tstyleName: \"border-width\"\n\t});\n}\n/**\n* Enables the `'tableCellHorizontalAlignment'` attribute for table cells.\n*\n* @param defaultValue The default horizontal alignment value.\n*/\nfunction enableHorizontalAlignmentProperty(schema, conversion, defaultValue) {\n\tschema.extend(\"tableCell\", { allowAttributes: [\"tableCellHorizontalAlignment\"] });\n\tschema.setAttributeProperties(\"tableCellHorizontalAlignment\", { isFormatting: true });\n\tconversion.for(\"downcast\").attributeToAttribute({\n\t\tmodel: {\n\t\t\tname: \"tableCell\",\n\t\t\tkey: \"tableCellHorizontalAlignment\"\n\t\t},\n\t\tview: (alignment) => ({\n\t\t\tkey: \"style\",\n\t\t\tvalue: { \"text-align\": alignment }\n\t\t})\n\t});\n\tconversion.for(\"upcast\").attributeToAttribute({\n\t\tview: {\n\t\t\tname: /^(td|th)$/,\n\t\t\tstyles: { \"text-align\": ALIGN_VALUES_REG_EXP }\n\t\t},\n\t\tmodel: {\n\t\t\tkey: \"tableCellHorizontalAlignment\",\n\t\t\tvalue: (viewElement, conversionApi, data) => {\n\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted(defaultValue, \"left\", data);\n\t\t\t\tconst align = viewElement.getStyle(\"text-align\");\n\t\t\t\tif (align !== localDefaultValue) return align;\n\t\t\t\tconversionApi.consumable.consume(viewElement, { styles: \"text-align\" });\n\t\t\t}\n\t\t}\n\t});\n}\n/**\n* Upcasts legacy `td[align]` property to proper block alignment attributes in child elements.\n* If there is no block alignment property supported on the element, then the `alignment` fallback will be used.\n*\n* See: https://github.com/ckeditor/ckeditor5/issues/20042\n*/\nfunction enableLegacyHorizontalAlignmentAttribute(conversion) {\n\tconversion.for(\"upcast\").add((dispatcher) => {\n\t\tconst matcher = new Matcher({\n\t\t\tname: /^(td|th)$/,\n\t\t\tattributes: { align: ALIGN_VALUES_REG_EXP }\n\t\t});\n\t\tdispatcher.on(\"element\", (evt, data, conversionApi) => {\n\t\t\tif (!matcher.match(data.viewItem)) return;\n\t\t\tconst modelElement = data.modelRange?.start.nodeAfter;\n\t\t\t/* istanbul ignore if -- @preserve */\n\t\t\tif (!modelElement?.is(\"element\")) return;\n\t\t\tconst alignValue = data.viewItem.getAttribute(\"align\");\n\t\t\tif (!conversionApi.consumable.consume(data.viewItem, { attributes: [\"align\"] })) return;\n\t\t\tfor (const child of modelElement.getChildren())\n /* v8 ignore else -- A table cell only contains block elements, so its children are always elements. */\n\t\t\tif (child.is(\"element\")) applyAlignmentToChild(child, alignValue, conversionApi);\n\t\t}, { priority: \"low\" });\n\t});\n\tfunction applyAlignmentToChild(child, alignValue, { schema, writer }) {\n\t\tconst definition = schema.getDefinition(child);\n\t\t/* v8 ignore else -- A converted child element is always registered in the schema, so it always has a definition. */\n\t\tif (definition) for (const attrName of definition.allowAttributes) {\n\t\t\tif (child.hasAttribute(attrName)) continue;\n\t\t\tconst { blockAlignment } = schema.getAttributeProperties(attrName);\n\t\t\tif (!blockAlignment) continue;\n\t\t\tconst mappedValue = (typeof blockAlignment === \"function\" ? blockAlignment(child) : blockAlignment)[alignValue];\n\t\t\tif (mappedValue && !mappedValue.isDefault) writer.setAttribute(attrName, mappedValue.value, child);\n\t\t\treturn;\n\t\t}\n\t}\n}\n/**\n* Enables the `'verticalAlignment'` attribute for table cells.\n*\n* @param defaultValue The default vertical alignment value.\n*/\nfunction enableVerticalAlignmentProperty(schema, conversion, defaultValue) {\n\tschema.extend(\"tableCell\", { allowAttributes: [\"tableCellVerticalAlignment\"] });\n\tschema.setAttributeProperties(\"tableCellVerticalAlignment\", { isFormatting: true });\n\tconversion.for(\"downcast\").attributeToAttribute({\n\t\tmodel: {\n\t\t\tname: \"tableCell\",\n\t\t\tkey: \"tableCellVerticalAlignment\"\n\t\t},\n\t\tview: (alignment) => ({\n\t\t\tkey: \"style\",\n\t\t\tvalue: { \"vertical-align\": alignment }\n\t\t})\n\t});\n\tconversion.for(\"upcast\").attributeToAttribute({\n\t\tview: {\n\t\t\tname: /^(td|th)$/,\n\t\t\tstyles: { \"vertical-align\": VALIGN_VALUES_REG_EXP }\n\t\t},\n\t\tmodel: {\n\t\t\tkey: \"tableCellVerticalAlignment\",\n\t\t\tvalue: (viewElement, conversionApi, data) => {\n\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted(defaultValue, \"middle\", data);\n\t\t\t\tconst align = viewElement.getStyle(\"vertical-align\");\n\t\t\t\tif (align !== localDefaultValue) return align;\n\t\t\t\tconversionApi.consumable.consume(viewElement, { styles: \"vertical-align\" });\n\t\t\t}\n\t\t}\n\t}).attributeToAttribute({\n\t\tview: {\n\t\t\tname: /^(td|th)$/,\n\t\t\tattributes: { valign: VALIGN_VALUES_REG_EXP }\n\t\t},\n\t\tmodel: {\n\t\t\tkey: \"tableCellVerticalAlignment\",\n\t\t\tvalue: (viewElement, conversionApi, data) => {\n\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted(defaultValue, \"middle\", data);\n\t\t\t\tconst valign = viewElement.getAttribute(\"valign\");\n\t\t\t\tif (valign !== localDefaultValue) return valign;\n\t\t\t\tconversionApi.consumable.consume(viewElement, { attributes: \"valign\" });\n\t\t\t}\n\t\t}\n\t});\n}\n/**\n* Enables the `tableCellType` attribute for table cells.\n*/\nfunction enableCellTypeProperty(editor) {\n\tconst { model, conversion, editing, config } = editor;\n\tconst { schema } = model;\n\tconfig.define(\"table.tableCellProperties.scopedHeaders\", true);\n\tconst scopedHeaders = !!config.get(\"table.tableCellProperties.scopedHeaders\");\n\tconst tableUtils = editor.plugins.get(TableUtils);\n\tschema.extend(\"tableCell\", { allowAttributes: [\"tableCellType\"] });\n\tschema.setAttributeProperties(\"tableCellType\", { isFormatting: true });\n\tschema.addAttributeCheck((context) => {\n\t\tif (Array.from(context).reverse().find((item) => item.name === \"table\")?.getAttribute(\"tableType\") === \"layout\") return false;\n\t}, \"tableCellType\");\n\tconversion.for(\"upcast\").add((dispatcher) => {\n\t\tdispatcher.on(\"element:th\", (evt, data, conversionApi) => {\n\t\t\tconst { writer } = conversionApi;\n\t\t\tconst { modelRange } = data;\n\t\t\tconst modelElement = modelRange?.start.nodeAfter;\n\t\t\tif (modelElement?.is(\"element\", \"tableCell\") && !modelElement.hasAttribute(\"tableCellType\")) writer.setAttribute(\"tableCellType\", \"header\", modelElement);\n\t\t});\n\t\tdispatcher.on(\"element:table\", (evt, data, conversionApi) => {\n\t\t\tconst { writer } = conversionApi;\n\t\t\tconst { modelRange } = data;\n\t\t\tconst modelElement = modelRange?.start.nodeAfter;\n\t\t\tif (modelElement?.is(\"element\", \"table\") && modelElement.getAttribute(\"tableType\") === \"layout\") for (const { cell } of new TableWalker(modelElement)) {\n\t\t\t\tconst tableCellType = cell.getAttribute(\"tableCellType\");\n\t\t\t\tif (isTableHeaderCellType(tableCellType)) {\n\t\t\t\t\twriter.setAttribute(\"tableType\", \"content\", modelElement);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: priorities.low - 1 });\n\t});\n\tif (scopedHeaders) {\n\t\tconversion.for(\"downcast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tname: \"tableCell\",\n\t\t\t\tkey: \"tableCellType\"\n\t\t\t},\n\t\t\tview: (modelAttributeValue) => {\n\t\t\t\tswitch (modelAttributeValue) {\n\t\t\t\t\tcase \"header-row\": return {\n\t\t\t\t\t\tkey: \"scope\",\n\t\t\t\t\t\tvalue: \"row\"\n\t\t\t\t\t};\n\t\t\t\t\tcase \"header-column\": return {\n\t\t\t\t\t\tkey: \"scope\",\n\t\t\t\t\t\tvalue: \"col\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconversion.for(\"upcast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"element:th\", (_, data, conversionApi) => {\n\t\t\t\tconst { writer, consumable } = conversionApi;\n\t\t\t\tconst { viewItem, modelRange } = data;\n\t\t\t\tconst modelElement = modelRange?.start.nodeAfter;\n\t\t\t\tif (!modelElement) return;\n\t\t\t\tif (modelElement.getAttribute(\"tableCellType\") === \"header\" && consumable.consume(viewItem, { attributes: [\"scope\"] })) switch (viewItem.getAttribute(\"scope\")) {\n\t\t\t\t\tcase \"row\":\n\t\t\t\t\t\twriter.setAttribute(\"tableCellType\", \"header-row\", modelElement);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"col\": writer.setAttribute(\"tableCellType\", \"header-column\", modelElement);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\tmodel.document.registerPostFixer((writer) => {\n\t\tconst changes = model.document.differ.getChanges();\n\t\tconst tablesToCheck = /* @__PURE__ */ new Set();\n\t\tfor (const change of changes) {\n\t\t\tif (change.type === \"attribute\" && (change.attributeKey === \"headingRows\" || change.attributeKey === \"headingColumns\")) {\n\t\t\t\tconst table = change.range.start.nodeAfter;\n\t\t\t\tif (table?.is(\"element\", \"table\") && table.root.rootName !== \"$graveyard\") tablesToCheck.add(table);\n\t\t\t}\n\t\t\tif (change.type === \"attribute\" && change.attributeKey === \"tableCellType\") {\n\t\t\t\tconst cell = change.range.start.nodeAfter;\n\t\t\t\tif (cell?.is(\"element\", \"tableCell\") && cell.root.rootName !== \"$graveyard\") {\n\t\t\t\t\tconst table = cell.findAncestor(\"table\");\n\t\t\t\t\t/* v8 ignore else -- A table cell always lives inside a table, so it always has a table ancestor here. */\n\t\t\t\t\tif (table) tablesToCheck.add(table);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (change.type === \"insert\" && change.position.nodeAfter) {\n\t\t\t\tfor (const { item } of model.createRangeOn(change.position.nodeAfter)) if (item.is(\"element\", \"tableCell\") && item.getAttribute(\"tableCellType\") && item.root.rootName !== \"$graveyard\") {\n\t\t\t\t\tconst table = item.findAncestor(\"table\");\n\t\t\t\t\t/* v8 ignore else -- An inserted table cell always lives inside a table, so it always has a table ancestor here. */\n\t\t\t\t\tif (table) tablesToCheck.add(table);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn updateTablesHeadingAttributes(tableUtils, writer, tablesToCheck);\n\t});\n\tmodel.document.on(\"change:data\", () => {\n\t\tconst { differ } = model.document;\n\t\tconst cellsToReconvert = /* @__PURE__ */ new Set();\n\t\tfor (const change of differ.getChanges()) if (change.type === \"attribute\" && change.attributeKey === \"tableCellType\") {\n\t\t\tconst tableCell = change.range.start.nodeAfter;\n\t\t\tif (tableCell.is(\"element\", \"tableCell\")) cellsToReconvert.add(tableCell);\n\t\t}\n\t\tfor (const tableCell of cellsToReconvert) {\n\t\t\tconst viewElement = editing.mapper.toViewElement(tableCell);\n\t\t\tconst cellType = tableCell.getAttribute(\"tableCellType\");\n\t\t\tconst expectedElementName = isTableHeaderCellType(cellType) ? \"th\" : \"td\";\n\t\t\tif (viewElement?.name !== expectedElementName) editing.reconvertItem(tableCell);\n\t\t}\n\t});\n}\n/**\n* Enables the upcasting of the `cellpadding` attribute from table to table cells padding.\n*\n* @param editor The editor instance.\n* @param defaultPadding The default padding value.\n*/\nfunction enableTableCellPaddingAttribute(editor, defaultPadding) {\n\tupcastTableCellPaddingAttribute(editor, \"td\", defaultPadding);\n\tupcastTableCellPaddingAttribute(editor, \"th\", defaultPadding);\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 table/tablecellproperties\n*/\n/**\n* The table cell properties feature. Enables support for setting properties of table cells (size, border, background, etc.).\n*\n* Read more in the {@glink features/tables/tables-styling Table and cell styling tools} section.\n* See also the {@link module:table/tableproperties~TableProperties} plugin.\n*\n* This is a \"glue\" plugin that loads the\n* {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing table cell properties editing feature} and\n* the {@link module:table/tablecellproperties/tablecellpropertiesui~TableCellPropertiesUI table cell properties UI feature}.\n*/\nvar TableCellProperties = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableCellProperties\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableCellPropertiesEditing, TableCellPropertiesUI];\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 table/tablelayout/tablelayoutui\n*/\n/**\n* The table layout UI plugin. It introduces:\n*\n* * The `'insertTableLayout'` dropdown,\n* * The `'menuBar:insertTableLayout'` menu bar menu.\n*/\nvar TableLayoutUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableLayoutUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\teditor.ui.componentFactory.add(\"insertTableLayout\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"insertTableLayout\");\n\t\t\tconst dropdownView = createDropdown(locale);\n\t\t\tdropdownView.bind(\"isEnabled\").to(command);\n\t\t\tdropdownView.buttonView.set({\n\t\t\t\ticon: IconTableLayout,\n\t\t\t\tlabel: t(\"Insert table layout\"),\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tlet insertTableLayoutView;\n\t\t\tdropdownView.on(\"change:isOpen\", () => {\n\t\t\t\tif (insertTableLayoutView) return;\n\t\t\t\tinsertTableLayoutView = new InsertTableView(locale);\n\t\t\t\tdropdownView.panelView.children.add(insertTableLayoutView);\n\t\t\t\tinsertTableLayoutView.delegate(\"execute\").to(dropdownView);\n\t\t\t\tdropdownView.on(\"execute\", () => {\n\t\t\t\t\teditor.execute(\"insertTableLayout\", {\n\t\t\t\t\t\trows: insertTableLayoutView.rows,\n\t\t\t\t\t\tcolumns: insertTableLayoutView.columns\n\t\t\t\t\t});\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn dropdownView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:insertTableLayout\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"insertTableLayout\");\n\t\t\tconst menuView = new MenuBarMenuView(locale);\n\t\t\tconst insertTableLayoutView = new InsertTableView(locale);\n\t\t\tinsertTableLayoutView.delegate(\"execute\").to(menuView);\n\t\t\tmenuView.on(\"change:isOpen\", (event, name, isOpen) => {\n\t\t\t\tif (!isOpen) insertTableLayoutView.reset();\n\t\t\t});\n\t\t\tinsertTableLayoutView.on(\"execute\", () => {\n\t\t\t\teditor.execute(\"insertTableLayout\", {\n\t\t\t\t\trows: insertTableLayoutView.rows,\n\t\t\t\t\tcolumns: insertTableLayoutView.columns\n\t\t\t\t});\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\tmenuView.buttonView.set({\n\t\t\t\tlabel: t(\"Table layout\"),\n\t\t\t\ticon: IconTableLayout\n\t\t\t});\n\t\t\tmenuView.panelView.children.add(insertTableLayoutView);\n\t\t\tmenuView.bind(\"isEnabled\").to(command);\n\t\t\treturn menuView;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"tableType\", () => {\n\t\t\tconst editor = this.editor;\n\t\t\tconst t = editor.t;\n\t\t\tconst button = new DropdownButtonView(editor.locale);\n\t\t\tbutton.set({\n\t\t\t\tlabel: t(\"Table type\"),\n\t\t\t\ticon: IconTableProperties,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\treturn createTableTypeDropdown(editor, button);\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst { editor } = this;\n\t\tconst { ui, plugins } = editor;\n\t\tif (!editor.plugins.has(\"TablePropertiesUI\")) return;\n\t\tconst tablePropertiesUI = plugins.get(\"TablePropertiesUI\");\n\t\tui.componentFactory.add(\"tableProperties\", (locale) => {\n\t\t\tconst baseButton = tablePropertiesUI._createTablePropertiesButton();\n\t\t\tconst splitButtonView = new SplitButtonView(locale, baseButton);\n\t\t\treturn createTableTypeDropdown(editor, splitButtonView);\n\t\t});\n\t}\n};\n/**\n* Creates a dropdown for the table type selection.\n*\n* @param editor The editor instance.\n* @param dropdownButton The button view that will be used as the dropdown trigger.\n* @returns A dropdown view containing table type options.\n*/\nfunction createTableTypeDropdown(editor, dropdownButton) {\n\tconst t = editor.t;\n\tconst locale = editor.locale;\n\tconst tableTypeCommand = editor.commands.get(\"tableType\");\n\tconst dropdownView = createDropdown(locale, dropdownButton);\n\tconst itemsDefinitions = createTableLayoutTypeDropdownItems(editor);\n\taddListToDropdown(dropdownView, itemsDefinitions, {\n\t\tariaLabel: t(\"Table type options\"),\n\t\trole: \"menu\"\n\t});\n\tdropdownButton.tooltip = t(\"Choose table type\");\n\tdropdownView.on(\"execute\", (evt) => {\n\t\tconst tableType = evt.source.tableType;\n\t\tif (tableType) tableTypeCommand.execute(tableType);\n\t});\n\treturn dropdownView;\n}\n/**\n* Creates dropdown items for table type selection.\n*\n* @param editor The editor instance.\n* @returns A collection of dropdown items for the table type dropdown.\n*/\nfunction createTableLayoutTypeDropdownItems(editor) {\n\tconst t = editor.t;\n\tconst tableTypeCommand = editor.commands.get(\"tableType\");\n\tconst itemDefinitions = new Collection();\n\titemDefinitions.add(createTableTypeDropdownItem(tableTypeCommand, \"layout\", t(\"Layout table\")));\n\titemDefinitions.add(createTableTypeDropdownItem(tableTypeCommand, \"content\", t(\"Content table\")));\n\treturn itemDefinitions;\n}\n/**\n* Creates a dropdown item for a specific table type.\n*\n* @param tableTypeCommand The table type command.\n* @param type The table type value ('layout' or 'content').\n* @param label The localized label for the dropdown item.\n* @returns The dropdown item definition.\n*/\nfunction createTableTypeDropdownItem(tableTypeCommand, type, label) {\n\tconst model = new UIModel({\n\t\tlabel,\n\t\trole: \"menuitemradio\",\n\t\twithText: true,\n\t\ttableType: type\n\t});\n\tmodel.bind(\"isEnabled\").to(tableTypeCommand, \"isEnabled\");\n\tmodel.bind(\"isOn\").to(tableTypeCommand, \"value\", (value) => value === type);\n\treturn {\n\t\ttype: \"button\",\n\t\tmodel\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 table/commands/inserttablelayoutcommand\n*/\n/**\n* The insert table layout command.\n*\n* The command is registered by {@link module:table/tablelayout/tablelayoutediting~TableLayoutEditing}\n* as the `'insertTableLayout'` editor command.\n*\n* To insert a layout table at the current selection, execute the command and specify the dimensions:\n*\n* ```ts\n* editor.execute( 'insertTableLayout', { rows: 20, columns: 5 } );\n* ```\n*/\nvar InsertTableLayoutCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tthis.isEnabled = isAllowedInParent(selection, schema);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* Inserts a layout table with the given number of rows and columns into the editor.\n\t*\n\t* @param options.rows The number of rows to create in the inserted table. Default value is 2.\n\t* @param options.columns The number of columns to create in the inserted table. Default value is 2.\n\t* @param options.inheritTextFormattingAttributes Whether every empty cell should inherit the `copyOnEnter` text\n\t* formatting attributes (e.g. bold, font color) that were uniformly active in the content right before\n\t* the table, so that whichever cell the user starts typing in first continues that formatting. Defaults\n\t* to `true`.\n\t* @fires execute\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst tableUtils = editor.plugins.get(\"TableUtils\");\n\t\tmodel.change((writer) => {\n\t\t\tconst selectionAttributesToCopy = Array.from(_getCopyOnEnterAttributes(model.schema, selection.getAttributes()));\n\t\t\tconst normalizedOptions = {\n\t\t\t\trows: options.rows || 2,\n\t\t\t\tcolumns: options.columns || 2\n\t\t\t};\n\t\t\tconst table = tableUtils.createTable(writer, normalizedOptions);\n\t\t\twriter.setAttribute(\"tableType\", \"layout\", table);\n\t\t\tmodel.insertObject(table, null, null, { findOptimalPosition: \"auto\" });\n\t\t\tconst singleColumnWidth = `${100 / normalizedOptions.columns}%`;\n\t\t\tconst columnWidths = Array(normalizedOptions.columns).fill(singleColumnWidth);\n\t\t\teditor.commands.get(\"resizeColumnWidths\").execute({\n\t\t\t\ttableWidth: \"100%\",\n\t\t\t\tcolumnWidths,\n\t\t\t\ttable\n\t\t\t});\n\t\t\twriter.setSelection(writer.createPositionAt(table.getNodeByPath([\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t]), 0));\n\t\t\tif (options.inheritTextFormattingAttributes !== false && selectionAttributesToCopy.length) for (const cellBlock of getEmptyTableCellBlocks(table)) for (const [key, value] of selectionAttributesToCopy) writer.setAttribute(ModelDocumentSelection._getStoreAttributeKey(key), value, cellBlock);\n\t\t});\n\t}\n};\n/**\n* Checks if the table is allowed in the parent.\n*/\nfunction isAllowedInParent(selection, schema) {\n\tconst positionParent = selection.getFirstPosition().parent;\n\tconst validParent = positionParent === positionParent.root ? positionParent : positionParent.parent;\n\treturn schema.checkChild(validParent, \"table\");\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* Command used by the {@link module:table/tablecolumnresize~TableColumnResize Table column resize feature} that\n* updates the width of the whole table as well as its individual columns.\n*/\nvar TableWidthsCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tthis.isEnabled = true;\n\t}\n\t/**\n\t* Updated the `tableWidth` attribute of the table and the `columnWidth` attribute of the columns of that table.\n\t*/\n\texecute(options = {}) {\n\t\tconst { model, plugins } = this.editor;\n\t\tlet { table = model.document.selection.getSelectedElement(), columnWidths, tableWidth } = options;\n\t\tif (columnWidths) columnWidths = Array.isArray(columnWidths) ? columnWidths : columnWidths.split(\",\");\n\t\tmodel.change((writer) => {\n\t\t\tif (tableWidth) writer.setAttribute(\"tableWidth\", tableWidth, table);\n\t\t\telse writer.removeAttribute(\"tableWidth\", table);\n\t\t\tconst tableColumnGroup = plugins.get(\"TableColumnResizeEditing\").getColumnGroupElement(table);\n\t\t\tif (!columnWidths && !tableColumnGroup) return;\n\t\t\tif (!columnWidths) return writer.remove(tableColumnGroup);\n\t\t\tconst widths = normalizeColumnWidths(columnWidths);\n\t\t\tremoveCellWidthsFromTable(writer, table);\n\t\t\tif (!tableColumnGroup) {\n\t\t\t\tconst colGroupElement = writer.createElement(\"tableColumnGroup\");\n\t\t\t\twidths.forEach((columnWidth) => writer.appendElement(\"tableColumn\", { columnWidth }, colGroupElement));\n\t\t\t\twriter.append(colGroupElement, table);\n\t\t\t} else Array.from(tableColumnGroup.getChildren()).forEach((column, index) => writer.setAttribute(\"columnWidth\", widths[index], column));\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 table/tablecolumnresize/commands/tablecolumnwidthcommand\n*/\n/**\n* The table column width command.\n*\n* The command is registered by the {@link module:table/tablecolumnresize/tablecolumnresizeediting~TableColumnResizeEditing}\n* as the `'tableColumnWidth'` editor command.\n*\n* It sets the width of every column covered by the selected cells (keeping the whole table's width mode consistent),\n* so the change actually takes effect in a resized table - where a per-cell width would be shadowed by the column\n* group. The command is enabled whenever the selection maps onto the columns of a resized, regular table.\n*\n* ```ts\n* editor.execute( 'tableColumnWidth', {\n*   value: '150px'\n* } );\n* ```\n*\n* **Note**: This command adds a default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableColumnWidth', {\n*   value: '150'\n* } );\n* ```\n*\n* will set the column width to `'150px'`.\n*/\nvar TableColumnWidthCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst tableUtils = editor.plugins.get(\"TableUtils\");\n\t\tconst tableColumnResize = editor.plugins.get(\"TableColumnResizeEditing\");\n\t\tconst tableCells = tableUtils.getSelectionAffectedTableCells(editor.model.document.selection);\n\t\tconst columns = tableColumnResize.getColumnIndexesForCells(tableCells);\n\t\tif (!columns) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = null;\n\t\t\treturn;\n\t\t}\n\t\tthis.isEnabled = true;\n\t\tthis.value = tableColumnResize.getTableColumnElements(columns.table)[columns.columnIndexes[0]].getAttribute(\"columnWidth\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\texecute(options = {}) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst tableUtils = editor.plugins.get(\"TableUtils\");\n\t\tconst tableColumnResize = editor.plugins.get(\"TableColumnResizeEditing\");\n\t\tconst value = addDefaultUnitToNumericValue(options.value, \"px\");\n\t\tconst tableCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n\t\tconst columns = tableColumnResize.getColumnIndexesForCells(tableCells);\n\t\tif (!value || !columns || Number.isNaN(parseFloat(value))) return;\n\t\tmodel.enqueueChange(options.batch, (writer) => {\n\t\t\ttableColumnResize.applyColumnWidths(writer, columns.table, columns.columnIndexes, value);\n\t\t\tremoveCellWidthsFromTable(writer, columns.table);\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* Returns a upcast helper that ensures the number of `<tableColumn>` elements corresponds to the actual number of columns in the table,\n* because the input data might have too few or too many <col> elements.\n*\n* @internal\n*/\nfunction upcastColgroupElement(tableUtilsPlugin) {\n\treturn (dispatcher) => dispatcher.on(\"element:colgroup\", (evt, data, conversionApi) => {\n\t\tconst modelTable = data.modelCursor.findAncestor(\"table\");\n\t\tconst tableColumnGroup = getColumnGroupElement(modelTable);\n\t\tif (!tableColumnGroup) return;\n\t\tconst columnElements = getTableColumnElements(tableColumnGroup);\n\t\tconst columnsCount = tableUtilsPlugin.getColumns(modelTable);\n\t\tlet columnWidths = translateColSpanAttribute(tableColumnGroup, conversionApi.writer);\n\t\tcolumnWidths = Array.from({ length: columnsCount }, (_, index) => columnWidths[index] || \"auto\");\n\t\tif (columnWidths.length != columnElements.length || columnWidths.includes(\"auto\")) updateColumnElements(columnElements, tableColumnGroup, normalizeColumnWidths(columnWidths), conversionApi.writer);\n\t}, { priority: \"low\" });\n}\n/**\n* Returns downcast helper for adding `ck-table-resized` class if there is a `<tableColumnGroup>` element inside the table.\n*\n* @internal\n*/\nfunction downcastTableResizedClass() {\n\treturn (dispatcher) => dispatcher.on(\"insert:table\", (evt, data, conversionApi) => {\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst modelTable = data.item;\n\t\tconst viewElement = conversionApi.mapper.toViewElement(modelTable);\n\t\tconst viewTable = viewElement.is(\"element\", \"table\") ? viewElement : Array.from(viewElement.getChildren()).find((viewChild) => viewChild.is(\"element\", \"table\"));\n\t\tif (getColumnGroupElement(modelTable)) viewWriter.addClass(\"ck-table-resized\", viewTable);\n\t\telse viewWriter.removeClass(\"ck-table-resized\", viewTable);\n\t}, { priority: \"low\" });\n}\n/**\n* Returns a upcast helper that removes the `ck-table-resized` class from the table element.\n*\n* @internal\n*/\nfunction upcastTableResizedClass() {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:table\", (evt, data, conversionApi) => {\n\t\t\tconversionApi.consumable.consume(data.viewItem, { classes: \"ck-table-resized\" });\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 table/tablecolumnresize/tablecolumnresizeediting\n*/\nconst toPx = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The table column resize editing plugin.\n*/\nvar TableColumnResizeEditing = class extends Plugin {\n\t/**\n\t* A temporary storage for the required data needed to correctly calculate the widths of the resized columns. This storage is\n\t* initialized when column resizing begins, and is purged upon completion.\n\t*/\n\t_resizingData;\n\t/**\n\t* DOM emitter.\n\t*/\n\t_domEmitter;\n\t/**\n\t* A local reference to the {@link module:table/tableutils~TableUtils} plugin.\n\t*/\n\t_tableUtilsPlugin;\n\t/**\n\t* Starting mouse position data used to add a threshold to the resizing process.\n\t*/\n\t_initialMouseEventData = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableEditing, TableUtils];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableColumnResizeEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"TCR\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.set(\"_isResizingActive\", false);\n\t\tthis.set(\"_isResizingAllowed\", true);\n\t\tthis._resizingData = null;\n\t\tthis._domEmitter = new (DomEmitterMixin())();\n\t\tthis._tableUtilsPlugin = editor.plugins.get(\"TableUtils\");\n\t\tthis.on(\"change:_isResizingAllowed\", (evt, name, value) => {\n\t\t\tconst classAction = value ? \"removeClass\" : \"addClass\";\n\t\t\teditor.editing.view.change((writer) => {\n\t\t\t\tfor (const root of editor.editing.view.document.roots) writer[classAction](\"ck-column-resize_disabled\", editor.editing.view.document.getRoot(root.rootName));\n\t\t\t});\n\t\t});\n\t\tthis.on(\"change:_isResizingActive\", (evt, name, value) => {\n\t\t\tconst classAction = value ? \"add\" : \"remove\";\n\t\t\tglobal.document.body.classList[classAction](\"ck-table-column-resize__resizing-cursor\");\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis._extendSchema();\n\t\tthis._registerPostFixer();\n\t\tthis._registerConverters();\n\t\tthis._registerResizingListeners();\n\t\tthis._registerResizerInserter();\n\t\tthis.decorate(\"_setResizingTableWidth\");\n\t\tthis.decorate(\"_getResizingTableWidth\");\n\t\tconst editor = this.editor;\n\t\tconst columnResizePlugin = editor.plugins.get(\"TableColumnResize\");\n\t\teditor.plugins.get(\"TableEditing\").registerAdditionalSlot({\n\t\t\tfilter: (element) => element.is(\"element\", \"tableColumnGroup\"),\n\t\t\tpositionOffset: 0\n\t\t});\n\t\tconst tableWidthsCommand = new TableWidthsCommand(editor);\n\t\teditor.commands.add(\"resizeTableWidth\", tableWidthsCommand);\n\t\teditor.commands.add(\"resizeColumnWidths\", tableWidthsCommand);\n\t\teditor.commands.add(\"tableColumnWidth\", new TableColumnWidthCommand(editor));\n\t\tthis.bind(\"_isResizingAllowed\").to(editor, \"isReadOnly\", columnResizePlugin, \"isEnabled\", tableWidthsCommand, \"isEnabled\", (isEditorReadOnly, isPluginEnabled, isTableWidthsCommandCommandEnabled) => !isEditorReadOnly && isPluginEnabled && isTableWidthsCommandCommandEnabled);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tafterInit() {\n\t\tconst editor = this.editor;\n\t\tconst tableWidthCommand = editor.commands.get(\"tableWidth\");\n\t\tif (tableWidthCommand) {\n\t\t\tthis.listenTo(tableWidthCommand, \"execute\", (evt, args) => {\n\t\t\t\tconst options = args[0] || (args[0] = {});\n\t\t\t\tif (!options.batch) options.batch = editor.model.createBatch();\n\t\t\t}, { priority: \"high\" });\n\t\t\tthis.listenTo(tableWidthCommand, \"execute\", (evt, args) => {\n\t\t\t\tconst options = args[0];\n\t\t\t\tconst table = getSelectionAffectedTable(editor.model.document.selection);\n\t\t\t\teditor.model.enqueueChange(options.batch, (writer) => this._reconcileColumnUnits(writer, table));\n\t\t\t}, { priority: \"low\" });\n\t\t}\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._domEmitter.stopListening();\n\t\tthis._isResizingActive = false;\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* The table for which a column resize is currently in progress, or `null` if no resize is active.\n\t* Only one table can be resized at a time.\n\t*/\n\tget resizingTable() {\n\t\treturn this._resizingData ? this._resizingData.elements.modelTable : null;\n\t}\n\t/**\n\t* Returns a 'tableColumnGroup' element from the 'table'.\n\t*\n\t* @param element A 'table' or 'tableColumnGroup' element.\n\t* @returns A 'tableColumnGroup' element.\n\t*/\n\tgetColumnGroupElement(element) {\n\t\treturn getColumnGroupElement(element);\n\t}\n\t/**\n\t* Returns an array of 'tableColumn' elements.\n\t*\n\t* @param element A 'table' or 'tableColumnGroup' element.\n\t* @returns An array of 'tableColumn' elements.\n\t*/\n\tgetTableColumnElements(element) {\n\t\treturn getTableColumnElements(element);\n\t}\n\t/**\n\t* Returns an array of table column widths.\n\t*\n\t* @param element A 'table' or 'tableColumnGroup' element.\n\t* @returns An array of table column widths.\n\t*/\n\tgetTableColumnsWidths(element) {\n\t\treturn getTableColumnsWidths(element);\n\t}\n\t/**\n\t* Returns the table and the sorted, unique indexes of the columns covered by the given cells (a `colspan` cell\n\t* covers several columns). Returns `null` when the selection cannot be mapped onto columns - a non-resized table\n\t* or an irregular column structure.\n\t*\n\t* @param cells An array of 'tableCell' model elements.\n\t*/\n\tgetColumnIndexesForCells(cells) {\n\t\tconst table = cells.length ? cells[0].findAncestor(\"table\") : null;\n\t\tif (!table) return null;\n\t\tconst columns = getTableColumnElements(table);\n\t\tif (!columns.length || columns.length !== this._tableUtilsPlugin.getColumns(table) || columns.some((column) => column.hasAttribute(\"colSpan\"))) return null;\n\t\tconst columnIndexes = /* @__PURE__ */ new Set();\n\t\tfor (const cell of cells) {\n\t\t\tconst { leftEdge, rightEdge } = getColumnEdgesIndexes(cell, this._tableUtilsPlugin);\n\t\t\tfor (let index = leftEdge; index <= rightEdge; index++) columnIndexes.add(index);\n\t\t}\n\t\treturn {\n\t\t\ttable,\n\t\t\tcolumnIndexes: Array.from(columnIndexes).sort((indexA, indexB) => indexA - indexB)\n\t\t};\n\t}\n\t/**\n\t* Applies the given width to every column in `columnIndexes`, keeping the whole table's width mode consistent\n\t* (see {@link module:table/tablecolumnresize/utils~isTableWidthInPixels}).\n\t*\n\t* @param writer A model writer instance.\n\t* @param table A 'table' model element.\n\t* @param columnIndexes Indexes of the columns the width is applied to.\n\t* @param value The width to apply. May be expressed in pixels or as a percentage.\n\t*/\n\tapplyColumnWidths(writer, table, columnIndexes, value) {\n\t\tif (isTableWidthInPixels(table)) applyPixelColumnWidths(writer, table, columnIndexes, value);\n\t\telse this._applyPercentageColumnWidths(writer, table, columnIndexes, value);\n\t}\n\t/**\n\t* Converts the column widths of a resized table to the unit of the table's own width (`px` or `%`), so a table\n\t* width change (in the table properties) also switches the columns' unit. It is a no-op when the table is not\n\t* resized or the columns already use that unit.\n\t*/\n\t_reconcileColumnUnits(writer, table) {\n\t\tconst tableColumnGroup = getColumnGroupElement(table);\n\t\tif (!tableColumnGroup) return;\n\t\tconst columnWidths = getTableColumnsWidths(tableColumnGroup);\n\t\tconst tableIsPixels = isTableWidthInPixels(table);\n\t\tif (tableIsPixels === isColumnWidthsInPixels(columnWidths)) return;\n\t\tlet reconciledWidths;\n\t\tif (tableIsPixels) {\n\t\t\tconst tableWidthInPixels = parseFloat(table.getAttribute(\"tableWidth\"));\n\t\t\treconciledWidths = columnWidths.map((width) => `${toPrecision(parseFloat(width) / 100 * tableWidthInPixels)}px`);\n\t\t} else {\n\t\t\tconst totalWidth = sumArray(columnWidths.map((width) => parseFloat(width)));\n\t\t\treconciledWidths = columnWidths.map((width) => `${toPrecision(parseFloat(width) / totalWidth * 100)}%`);\n\t\t}\n\t\tupdateColumnElements(getTableColumnElements(tableColumnGroup), tableColumnGroup, reconciledWidths, writer);\n\t}\n\t/**\n\t* Applies a column width in the percentage mode: the target column gets the (clamped) percentage and the remaining\n\t* columns are redistributed proportionally so that all the widths keep summing up to 100%.\n\t*/\n\t_applyPercentageColumnWidths(writer, table, columnIndexes, value) {\n\t\tconst columns = getTableColumnElements(table);\n\t\tconst widths = getTableColumnsWidths(table).map((width) => parseFloat(width));\n\t\tif (columnIndexes.includes(columns.length - 1)) {\n\t\t\tthis._growTableToColumnWidths(writer, table, columns, widths, columnIndexes, value);\n\t\t\treturn;\n\t\t}\n\t\tconst targetPercentage = value.trim().endsWith(\"%\") ? parseFloat(value) : parseFloat(value) / getTableWidthInPixels(table, this.editor) * 100;\n\t\tconst nextWidths = widths.slice();\n\t\tfor (const band of getContiguousBands(columnIndexes)) {\n\t\t\tconst neighbor = band.end + 1;\n\t\t\tconst bandCount = band.indexes.length;\n\t\t\tconst available = band.indexes.reduce((sum, index) => sum + widths[index], widths[neighbor]);\n\t\t\tif (available < 5 * (bandCount + 1)) {\n\t\t\t\tconst equalWidth = available / (bandCount + 1);\n\t\t\t\tfor (const index of band.indexes) nextWidths[index] = equalWidth;\n\t\t\t\tnextWidths[neighbor] = equalWidth;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst target = clamp(targetPercentage, 5, (available - 5) / bandCount);\n\t\t\tfor (const index of band.indexes) nextWidths[index] = target;\n\t\t\tnextWidths[neighbor] = available - target * bandCount;\n\t\t}\n\t\tcolumns.forEach((columnElement, index) => {\n\t\t\twriter.setAttribute(\"columnWidth\", `${toPrecision(nextWidths[index])}%`, columnElement);\n\t\t});\n\t}\n\t/**\n\t* Applies a width to the target columns in the percentage mode when the selection reaches the last column. As\n\t* there is no next column to balance against, the table itself grows or shrinks (like dragging the last column's\n\t* right edge): every other column keeps its absolute width, so expressed against the resized table their\n\t* percentages scale, and the table's own width scales by the inverse.\n\t*/\n\t_growTableToColumnWidths(writer, table, columns, widths, columnIndexes, value) {\n\t\tconst targetColumns = new Set(columnIndexes);\n\t\tconst targetCount = columnIndexes.length;\n\t\tconst otherColumnsShare = 100 - columnIndexes.reduce((sum, index) => sum + widths[index], 0);\n\t\tif (otherColumnsShare <= 0) {\n\t\t\tconst equalWidth = 100 / columns.length;\n\t\t\tcolumns.forEach((columnElement) => {\n\t\t\t\twriter.setAttribute(\"columnWidth\", `${toPrecision(equalWidth)}%`, columnElement);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet targetPercentage;\n\t\tif (value.trim().endsWith(\"%\")) targetPercentage = parseFloat(value);\n\t\telse {\n\t\t\tconst pixelWidth = parseFloat(value);\n\t\t\ttargetPercentage = pixelWidth / (otherColumnsShare / 100 * getTableWidthInPixels(table, this.editor) + targetCount * pixelWidth) * 100;\n\t\t}\n\t\tconst target = clamp(targetPercentage, 5, Math.max(5, (100 - 5 * (columns.length - targetCount)) / targetCount));\n\t\tconst scale = (100 - target * targetCount) / otherColumnsShare;\n\t\tcolumns.forEach((columnElement, index) => {\n\t\t\tconst next = targetColumns.has(index) ? target : widths[index] * scale;\n\t\t\twriter.setAttribute(\"columnWidth\", `${toPrecision(next)}%`, columnElement);\n\t\t});\n\t\tconst tableWidth = parseFloat(table.getAttribute(\"tableWidth\"));\n\t\tif (!Number.isNaN(tableWidth)) writer.setAttribute(\"tableWidth\", `${toPrecision(tableWidth / scale)}%`, table);\n\t}\n\t/**\n\t* Applies `width` to whichever element currently represents the table's actual width - by default the\n\t* widget's `<figure>`. Passing `null` clears it instead of setting anything.\n\t*\n\t* @internal\n\t*/\n\t_setResizingTableWidth(writer, viewFigure, width) {\n\t\tif (width === null) writer.removeStyle(\"width\", viewFigure);\n\t\telse writer.setStyle(\"width\", width, viewFigure);\n\t}\n\t/**\n\t* Returns the table's current actual width, read from whichever element holds it - by default the\n\t* widget's `<figure>`.\n\t*\n\t* @internal\n\t*/\n\t_getResizingTableWidth(viewFigure) {\n\t\treturn viewFigure.getStyle(\"width\");\n\t}\n\t/**\n\t* Registers new attributes for a table model element.\n\t*/\n\t_extendSchema() {\n\t\tconst schema = this.editor.model.schema;\n\t\tschema.extend(\"table\", { allowAttributes: [\"tableWidth\"] });\n\t\tschema.register(\"tableColumnGroup\", {\n\t\t\tallowIn: \"table\",\n\t\t\tisLimit: true\n\t\t});\n\t\tschema.register(\"tableColumn\", {\n\t\t\tallowIn: \"tableColumnGroup\",\n\t\t\tallowAttributes: [\"columnWidth\", \"colSpan\"],\n\t\t\tisLimit: true\n\t\t});\n\t\tschema.setAttributeProperties(\"columnWidth\", { isFormatting: true });\n\t}\n\t/**\n\t* Registers table column resize post-fixer.\n\t*\n\t* It checks if the change from the differ concerns a table-related element or attribute. For detected changes it:\n\t*  * Adjusts the `columnWidths` attribute to guarantee that the sum of the widths from all columns is 100%.\n\t*  * Checks if the `columnWidths` attribute gets updated accordingly after columns have been added or removed.\n\t*/\n\t_registerPostFixer() {\n\t\tconst model = this.editor.model;\n\t\tmodel.document.registerPostFixer((writer) => {\n\t\t\tlet changed = false;\n\t\t\tfor (const table of getChangedResizedTables(model)) {\n\t\t\t\tconst tableColumnGroup = this.getColumnGroupElement(table);\n\t\t\t\tconst columns = this.getTableColumnElements(tableColumnGroup);\n\t\t\t\tconst columnWidths = this.getTableColumnsWidths(tableColumnGroup);\n\t\t\t\tconst isPixelMode = isColumnWidthsInPixels(columnWidths);\n\t\t\t\tlet normalizedWidths = isPixelMode ? normalizePixelColumnWidths(columnWidths, table) : normalizeColumnWidths(columnWidths);\n\t\t\t\tnormalizedWidths = adjustColumnWidths(normalizedWidths, table, this);\n\t\t\t\tif (isPixelMode && normalizedWidths.length !== columnWidths.length) writer.setAttribute(\"tableWidth\", `${toPrecision(sumArray(normalizedWidths))}px`, table);\n\t\t\t\telse normalizedWidths = scalePixelColumnsToTableWidth(normalizedWidths, table);\n\t\t\t\tif (isEqual(columnWidths, normalizedWidths)) continue;\n\t\t\t\tupdateColumnElements(columns, tableColumnGroup, normalizedWidths, writer);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\treturn changed;\n\t\t});\n\t\t/**\n\t\t* Adjusts if necessary the `columnWidths` in case if the number of column has changed.\n\t\t*\n\t\t* @param columnWidths Note: this array **may be modified** by the function.\n\t\t* @param table Table to be checked.\n\t\t*/\n\t\tfunction adjustColumnWidths(columnWidths, table, plugin) {\n\t\t\tconst newTableColumnsCount = plugin._tableUtilsPlugin.getColumns(table);\n\t\t\tif (newTableColumnsCount - columnWidths.length === 0) return columnWidths;\n\t\t\tconst isPixelMode = isColumnWidthsInPixels(columnWidths);\n\t\t\tconst widths = columnWidths.map((width) => parseFloat(width));\n\t\t\tconst cellSet = getAffectedCells(plugin.editor.model.document.differ, table);\n\t\t\tfor (const cell of cellSet) {\n\t\t\t\tconst currentColumnsDelta = newTableColumnsCount - widths.length;\n\t\t\t\tif (currentColumnsDelta === 0) continue;\n\t\t\t\tconst hasMoreColumns = currentColumnsDelta > 0;\n\t\t\t\tconst currentColumnIndex = plugin._tableUtilsPlugin.getCellLocation(cell).column;\n\t\t\t\tif (hasMoreColumns) {\n\t\t\t\t\tconst insertedColumnWidth = isPixelMode ? 40 : getColumnMinWidthAsPercentage(table, plugin.editor);\n\t\t\t\t\tconst columnWidthsToInsert = createFilledArray(currentColumnsDelta, insertedColumnWidth);\n\t\t\t\t\twidths.splice(currentColumnIndex, 0, ...columnWidthsToInsert);\n\t\t\t\t} else {\n\t\t\t\t\tconst removedColumnWidths = widths.splice(currentColumnIndex, Math.abs(currentColumnsDelta));\n\t\t\t\t\twidths[currentColumnIndex] += sumArray(removedColumnWidths);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn widths.map((width) => `${width}${isPixelMode ? \"px\" : \"%\"}`);\n\t\t}\n\t\t/**\n\t\t* Returns a set of cells that have been changed in a given table.\n\t\t*/\n\t\tfunction getAffectedCells(differ, table) {\n\t\t\tconst cellSet = /* @__PURE__ */ new Set();\n\t\t\tfor (const change of differ.getChanges()) if (change.type == \"insert\" && change.position.nodeAfter && change.position.nodeAfter.name == \"tableCell\" && change.position.nodeAfter.getAncestors().includes(table)) cellSet.add(change.position.nodeAfter);\n\t\t\telse if (change.type == \"remove\") {\n\t\t\t\tconst referenceNode = change.position.nodeBefore || change.position.nodeAfter;\n\t\t\t\tif (referenceNode.name == \"tableCell\" && referenceNode.getAncestors().includes(table)) cellSet.add(referenceNode);\n\t\t\t}\n\t\t\treturn cellSet;\n\t\t}\n\t}\n\t/**\n\t* Registers table column resize converters.\n\t*/\n\t_registerConverters() {\n\t\tconst conversion = this.editor.conversion;\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: /^(figure|table)$/,\n\t\t\t\tstyles: { width: /[\\s\\S]+/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"tableWidth\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tif (viewElement.parent.is(\"element\", \"figure\")) return;\n\t\t\t\t\treturn viewElement.getStyle(\"width\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconversion.for(\"downcast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tname: \"table\",\n\t\t\t\tkey: \"tableWidth\"\n\t\t\t},\n\t\t\tview: (width) => ({\n\t\t\t\tname: \"figure\",\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: { width }\n\t\t\t})\n\t\t});\n\t\tconversion.elementToElement({\n\t\t\tmodel: \"tableColumnGroup\",\n\t\t\tview: \"colgroup\"\n\t\t});\n\t\tconversion.elementToElement({\n\t\t\tmodel: \"tableColumn\",\n\t\t\tview: \"col\"\n\t\t});\n\t\tconversion.for(\"downcast\").add(downcastTableResizedClass());\n\t\tconversion.for(\"upcast\").add(upcastTableResizedClass());\n\t\tconversion.for(\"upcast\").add(upcastColgroupElement(this._tableUtilsPlugin));\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"col\",\n\t\t\t\tstyles: { width: /.*/ }\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: \"columnWidth\",\n\t\t\t\tvalue: (viewElement) => {\n\t\t\t\t\tconst viewColWidth = viewElement.getStyle(\"width\");\n\t\t\t\t\tif (!viewColWidth || !viewColWidth.endsWith(\"%\") && !viewColWidth.endsWith(\"pt\") && !(viewColWidth.endsWith(\"px\") && isViewTableWidthInPixels(viewElement))) return \"auto\";\n\t\t\t\t\treturn viewColWidth;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: {\n\t\t\t\tname: \"col\",\n\t\t\t\tkey: \"span\"\n\t\t\t},\n\t\t\tmodel: \"colSpan\"\n\t\t});\n\t\tconversion.for(\"downcast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tname: \"tableColumn\",\n\t\t\t\tkey: \"columnWidth\"\n\t\t\t},\n\t\t\tview: (width) => ({\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: { width }\n\t\t\t})\n\t\t});\n\t}\n\t/**\n\t* Registers listeners to handle resizing process.\n\t*/\n\t_registerResizingListeners() {\n\t\tconst editingView = this.editor.editing.view;\n\t\teditingView.addObserver(MouseEventsObserver);\n\t\teditingView.document.on(\"mouseover\", this._onMouseOverHandler.bind(this), { priority: \"high\" });\n\t\teditingView.document.on(\"mousedown\", this._onMouseDownHandler.bind(this), { priority: \"high\" });\n\t\teditingView.document.on(\"mouseout\", this._onMouseOutHandler.bind(this), { priority: \"high\" });\n\t\tthis._domEmitter.listenTo(global.window.document, \"mousemove\", throttle(this._onMouseMoveHandler.bind(this), 50));\n\t\tthis._domEmitter.listenTo(global.window.document, \"mouseup\", this._onMouseUpHandler.bind(this));\n\t}\n\t/**\n\t* Calculate and set `top` and `bottom` styles to the column resizer element to fit the height of the table.\n\t*\n\t* @param viewResizer The column resizer element.\n\t*/\n\t_recalculateResizerElement(viewResizer) {\n\t\tconst editor = this.editor;\n\t\tconst domConverter = editor.editing.view.domConverter;\n\t\tconst domTable = domConverter.mapViewToDom(viewResizer.findAncestor(\"table\"));\n\t\tconst domCell = domConverter.mapViewToDom(viewResizer.findAncestor((item) => [\"td\", \"th\"].includes(item.name)));\n\t\tconst rectTable = new Rect(domTable);\n\t\tconst rectCell = new Rect(domCell);\n\t\tconst targetTopPosition = toPx(Number((rectTable.top - rectCell.top).toFixed(4)));\n\t\tconst targetBottomPosition = toPx(Number((rectCell.bottom - rectTable.bottom).toFixed(4)));\n\t\teditor.editing.view.change((viewWriter) => {\n\t\t\tviewWriter.setStyle(\"top\", targetTopPosition, viewResizer);\n\t\t\tviewWriter.setStyle(\"bottom\", targetBottomPosition, viewResizer);\n\t\t});\n\t}\n\t/**\n\t* Remove `top` and `bottom` styles of the column resizer element.\n\t*\n\t* @param viewResizer The column resizer element.\n\t*/\n\t_resetResizerStyles(viewResizer) {\n\t\tthis.editor.editing.view.change((viewWriter) => {\n\t\t\tviewWriter.removeStyle(\"top\", viewResizer);\n\t\t\tviewWriter.removeStyle(\"bottom\", viewResizer);\n\t\t});\n\t}\n\t/**\n\t* Handles the `mouseover` event on column resizer element.\n\t* Recalculates the `top` and `bottom` styles of the column resizer element to fit the height of the table.\n\t*\n\t* @param eventInfo An object containing information about the fired event.\n\t* @param domEventData The data related to the DOM event.\n\t*/\n\t_onMouseOverHandler(eventInfo, domEventData) {\n\t\tconst target = domEventData.target;\n\t\tif (!target.hasClass(\"ck-table-column-resizer\")) return;\n\t\tif (!this._isResizingAllowed) return;\n\t\tthis._recalculateResizerElement(target);\n\t}\n\t/**\n\t* Handles the `mouseout` event on column resizer element.\n\t* When resizing is not active, it resets the `top` and `bottom` styles of the column resizer element.\n\t*\n\t* @param eventInfo An object containing information about the fired event.\n\t* @param domEventData The data related to the DOM event.\n\t*/\n\t_onMouseOutHandler(eventInfo, domEventData) {\n\t\tconst target = domEventData.target;\n\t\tif (!target.hasClass(\"ck-table-column-resizer\")) return;\n\t\tif (!this._isResizingAllowed) return;\n\t\tif (this._isResizingActive) return;\n\t\tthis._resetResizerStyles(target);\n\t}\n\t/**\n\t* Handles the `mousedown` event on column resizer element:\n\t*  * calculates the initial column pixel widths,\n\t*  * inserts the `<colgroup>` element if it is not present in the `<table>`,\n\t*  * puts the necessary data in the temporary storage,\n\t*  * applies the attributes to the `<table>` view element.\n\t*\n\t* @param eventInfo An object containing information about the fired event.\n\t* @param domEventData The data related to the DOM event.\n\t*/\n\t_onMouseDownHandler(eventInfo, domEventData) {\n\t\tconst target = domEventData.target;\n\t\tif (!target.hasClass(\"ck-table-column-resizer\")) return;\n\t\tif (!this._isResizingAllowed) return;\n\t\tconst editor = this.editor;\n\t\tconst modelTable = editor.editing.mapper.toModelElement(target.findAncestor(\"figure\"));\n\t\tif (!editor.model.canEditAt(modelTable)) return;\n\t\tdomEventData.preventDefault();\n\t\teventInfo.stop();\n\t\tthis._initialMouseEventData = domEventData;\n\t}\n\t/**\n\t* Starts the resizing process after the threshold is reached.\n\t*/\n\t_startResizingAfterThreshold() {\n\t\tconst domEventData = this._initialMouseEventData;\n\t\tconst { target } = domEventData;\n\t\tconst modelTable = this.editor.editing.mapper.toModelElement(target.findAncestor(\"figure\"));\n\t\tconst viewTable = target.findAncestor(\"table\");\n\t\tconst viewFigure = target.findAncestor(\"figure\");\n\t\tconst isPixelMode = isTableWidthInPixels(modelTable);\n\t\tconst columnWidthsInPx = _calculateDomColumnWidths(modelTable, this._tableUtilsPlugin, this.editor);\n\t\tif (!Array.from(viewTable.getChildren()).find((viewCol) => viewCol.is(\"element\", \"colgroup\"))) this.editor.editing.view.change((viewWriter) => {\n\t\t\t_insertColgroupElement(viewWriter, columnWidthsInPx, viewTable, isPixelMode);\n\t\t});\n\t\tthis._isResizingActive = true;\n\t\tthis._resizingData = this._getResizingData(domEventData, columnWidthsInPx);\n\t\tthis.editor.editing.view.change((writer) => {\n\t\t\tconst initialWidth = _applyResizingAttributesToTable(writer, viewTable, this._resizingData);\n\t\t\tthis._setResizingTableWidth(writer, viewFigure, initialWidth);\n\t\t});\n\t\t/**\n\t\t* Calculates the DOM columns' widths. It is done by taking the width of the widest cell\n\t\t* from each table column (we rely on the  {@link module:table/tablewalker~TableWalker}\n\t\t* to determine which column the cell belongs to).\n\t\t*\n\t\t* @param modelTable A table which columns should be measured.\n\t\t* @param tableUtils The Table Utils plugin instance.\n\t\t* @param editor The editor instance.\n\t\t* @returns Columns' widths expressed in pixels (without unit).\n\t\t*/\n\t\tfunction _calculateDomColumnWidths(modelTable, tableUtilsPlugin, editor) {\n\t\t\tconst columnWidthsInPx = Array(tableUtilsPlugin.getColumns(modelTable));\n\t\t\tconst tableWalker = new TableWalker(modelTable);\n\t\t\tfor (const cellSlot of tableWalker) {\n\t\t\t\tconst viewCell = editor.editing.mapper.toViewElement(cellSlot.cell);\n\t\t\t\tconst domCell = editor.editing.view.domConverter.mapViewToDom(viewCell);\n\t\t\t\tconst domCellWidth = getDomCellOuterWidth(domCell);\n\t\t\t\tif (!columnWidthsInPx[cellSlot.column] || domCellWidth < columnWidthsInPx[cellSlot.column]) columnWidthsInPx[cellSlot.column] = toPrecision(domCellWidth);\n\t\t\t}\n\t\t\treturn columnWidthsInPx;\n\t\t}\n\t\t/**\n\t\t* Creates a `<colgroup>` element with `<col>`s and inserts it into a given view table.\n\t\t*\n\t\t* @param viewWriter A writer instance.\n\t\t* @param columnWidthsInPx Column widths.\n\t\t* @param viewTable A table view element.\n\t\t*/\n\t\tfunction _insertColgroupElement(viewWriter, columnWidthsInPx, viewTable, isPixelMode) {\n\t\t\tconst colgroup = viewWriter.createContainerElement(\"colgroup\");\n\t\t\tfor (let i = 0; i < columnWidthsInPx.length; i++) {\n\t\t\t\tconst viewColElement = viewWriter.createEmptyElement(\"col\");\n\t\t\t\tconst columnWidth = isPixelMode ? `${toPrecision(columnWidthsInPx[i])}px` : `${toPrecision(columnWidthsInPx[i] / sumArray(columnWidthsInPx) * 100)}%`;\n\t\t\t\tviewWriter.setStyle(\"width\", columnWidth, viewColElement);\n\t\t\t\tviewWriter.insert(viewWriter.createPositionAt(colgroup, \"end\"), viewColElement);\n\t\t\t}\n\t\t\tviewWriter.insert(viewWriter.createPositionAt(viewTable, 0), colgroup);\n\t\t}\n\t\t/**\n\t\t* Applies the classes to the view table as the resizing begun, and computes the initial live width.\n\t\t*\n\t\t* @param viewWriter A writer instance.\n\t\t* @param viewTable A table containing the clicked resizer.\n\t\t* @param resizingData Data related to the resizing.\n\t\t* @returns The table's current width as a `%` string, e.g. for seeding {@link #_setResizingTableWidth}.\n\t\t*/\n\t\tfunction _applyResizingAttributesToTable(viewWriter, viewTable, resizingData) {\n\t\t\tviewWriter.addClass(\"ck-table-resized\", viewTable);\n\t\t\tviewWriter.addClass(\"ck-table-column-resizer__active\", resizingData.elements.viewResizer);\n\t\t\tif (resizingData.flags.isPixelMode) return `${toPrecision(parseFloat(resizingData.elements.modelTable.getAttribute(\"tableWidth\")))}px`;\n\t\t\tconst figureWidth = Math.max(resizingData.widths.tableWidth, resizingData.widths.viewFigureWidth);\n\t\t\treturn `${toPrecision(figureWidth / resizingData.widths.viewFigureParentWidth * 100)}%`;\n\t\t}\n\t}\n\t/**\n\t* Handles the `mousemove` event.\n\t*  * If resizing process is not in progress, it does nothing.\n\t*  * If resizing is active but not allowed, it stops the resizing process instantly calling the `mousedown` event handler.\n\t*  * Otherwise it dynamically updates the widths of the resized columns.\n\t*\n\t* @param eventInfo An object containing information about the fired event.\n\t* @param mouseEventData The native DOM event.\n\t*/\n\t_onMouseMoveHandler(eventInfo, mouseEventData) {\n\t\tif (this._initialMouseEventData) {\n\t\t\tconst mouseEvent = this._initialMouseEventData.domEvent;\n\t\t\tif (Math.abs(mouseEventData.clientX - mouseEvent.clientX) >= 3) {\n\t\t\t\tthis._startResizingAfterThreshold();\n\t\t\t\tthis._initialMouseEventData = null;\n\t\t\t} else return;\n\t\t}\n\t\tif (!this._isResizingActive) return;\n\t\tif (!this._isResizingAllowed) {\n\t\t\tthis._onMouseUpHandler();\n\t\t\treturn;\n\t\t}\n\t\tconst { plugins } = this.editor;\n\t\tconst { columnPosition, flags: { isRightEdge, isTableCentered, isLtrContent, isPixelMode, isTableWidthWithinContainerAtDragStart, isTableScrollAllowed }, elements: { modelTable, viewFigure, viewLeftColumn, viewRightColumn, viewResizer }, widths: { viewFigureParentWidth, tableWidth, leftColumnWidth, rightColumnWidth } } = this._resizingData;\n\t\tconst dxLowerBound = -leftColumnWidth + 40;\n\t\tconst isTableScrollActive = !!(plugins.has(\"TableScrollEditing\") ? plugins.get(\"TableScrollEditing\") : null) && isTableScrollAllowed;\n\t\tconst containerWidth = getEditableContentWidth(this.editor, modelTable.root.rootName);\n\t\tlet dxUpperBound;\n\t\tif (isRightEdge) dxUpperBound = isTableScrollActive ? Infinity : viewFigureParentWidth - tableWidth;\n\t\telse dxUpperBound = rightColumnWidth - 40;\n\t\tconst rawDx = mouseEventData.clientX - columnPosition;\n\t\tconst ltrSign = isLtrContent ? 1 : -1;\n\t\tconst isCenteredRightEdge = isRightEdge && isTableCentered;\n\t\tlet dx;\n\t\tif (isTableScrollActive && isCenteredRightEdge) {\n\t\t\tconst mouseDelta = rawDx * ltrSign;\n\t\t\tlet newTableWidth;\n\t\t\tif (isTableWidthWithinContainerAtDragStart) {\n\t\t\t\tconst crossoverPoint = (containerWidth - tableWidth) / 2;\n\t\t\t\tnewTableWidth = mouseDelta <= crossoverPoint ? tableWidth + 2 * mouseDelta : containerWidth + (mouseDelta - crossoverPoint);\n\t\t\t} else {\n\t\t\t\tconst crossoverPoint = containerWidth - tableWidth;\n\t\t\t\tnewTableWidth = mouseDelta >= crossoverPoint ? tableWidth + mouseDelta : containerWidth + 2 * (mouseDelta - crossoverPoint);\n\t\t\t}\n\t\t\tdx = newTableWidth - tableWidth;\n\t\t} else dx = rawDx * (ltrSign * (isCenteredRightEdge ? 2 : 1));\n\t\tdx = clamp(dx, Math.min(dxLowerBound, 0), Math.max(dxUpperBound, 0));\n\t\tif (isTableScrollActive && isRightEdge) {\n\t\t\tconst resistedTableWidth = applyContainerWidthResistance(tableWidth + dx, containerWidth);\n\t\t\tdx = clamp(resistedTableWidth - tableWidth, Math.min(dxLowerBound, 0), Math.max(dxUpperBound, 0));\n\t\t}\n\t\tif (dx === 0) return;\n\t\tthis.editor.editing.view.change((writer) => {\n\t\t\tconst toWidthValue = (widthInPx, basisInPx) => isPixelMode ? `${toPrecision(widthInPx)}px` : `${toPrecision(widthInPx * 100 / basisInPx)}%`;\n\t\t\twriter.setStyle(\"width\", toWidthValue(leftColumnWidth + dx, tableWidth), viewLeftColumn);\n\t\t\tif (isRightEdge) {\n\t\t\t\tconst tableFigureWidth = isPixelMode ? `${toPrecision(tableWidth + dx)}px` : `${toPrecision((tableWidth + dx) * 100 / viewFigureParentWidth)}%`;\n\t\t\t\tthis._setResizingTableWidth(writer, viewFigure, tableFigureWidth);\n\t\t\t} else writer.setStyle(\"width\", toWidthValue(rightColumnWidth - dx, tableWidth), viewRightColumn);\n\t\t});\n\t\tthis._recalculateResizerElement(viewResizer);\n\t}\n\t/**\n\t* Handles the `mouseup` event.\n\t*  * If resizing process is not in progress, it does nothing.\n\t*  * If resizing is active but not allowed, it cancels the resizing process restoring the original widths.\n\t*  * Otherwise it propagates the changes from view to the model by executing the adequate commands.\n\t*/\n\t_onMouseUpHandler() {\n\t\tthis._initialMouseEventData = null;\n\t\tif (!this._isResizingActive) return;\n\t\tconst { viewResizer, modelTable, viewFigure, viewTable, viewColgroup } = this._resizingData.elements;\n\t\tconst { isPixelMode } = this._resizingData.flags;\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst tableColumnGroup = this.getColumnGroupElement(modelTable);\n\t\tconst viewColumns = Array.from(viewColgroup.getChildren()).filter((column) => column.is(\"view:element\"));\n\t\tconst columnWidthsAttributeOld = tableColumnGroup ? this.getTableColumnsWidths(tableColumnGroup) : null;\n\t\tconst columnWidthsAttributeNew = viewColumns.map((column) => column.getStyle(\"width\"));\n\t\tconst isColumnWidthsAttributeChanged = !isEqual(columnWidthsAttributeOld, columnWidthsAttributeNew);\n\t\tconst tableWidthAttributeOld = modelTable.getAttribute(\"tableWidth\");\n\t\tconst tableWidthAttributeNew = this._getResizingTableWidth(viewFigure);\n\t\tconst isTableWidthAttributeChanged = tableWidthAttributeOld !== tableWidthAttributeNew;\n\t\tif (isColumnWidthsAttributeChanged || isTableWidthAttributeChanged) {\n\t\t\tif (this._isResizingAllowed) {\n\t\t\t\tconst tableWidthInPixels = toPrecision(tableWidthAttributeNew);\n\t\t\t\tconst tableWidthInPixelsBeforeResize = toPrecision(tableWidthAttributeOld);\n\t\t\t\tconst columnWidths = isPixelMode ? columnWidthsAttributeNew.map((width) => typeof width === \"string\" && !width.endsWith(\"px\") ? `${toPrecision(parseFloat(width) / 100 * tableWidthInPixelsBeforeResize)}px` : width) : columnWidthsAttributeNew;\n\t\t\t\teditor.execute(\"resizeTableWidth\", {\n\t\t\t\t\ttable: modelTable,\n\t\t\t\t\ttableWidth: isPixelMode ? `${toPrecision(tableWidthInPixels)}px` : `${toPrecision(tableWidthAttributeNew)}%`,\n\t\t\t\t\tcolumnWidths\n\t\t\t\t});\n\t\t\t} else editingView.change((writer) => {\n\t\t\t\tif (columnWidthsAttributeOld) for (const viewCol of viewColumns) writer.setStyle(\"width\", columnWidthsAttributeOld.shift(), viewCol);\n\t\t\t\telse writer.remove(viewColgroup);\n\t\t\t\tif (isTableWidthAttributeChanged) this._setResizingTableWidth(writer, viewFigure, tableWidthAttributeOld || null);\n\t\t\t\tif (!columnWidthsAttributeOld && !tableWidthAttributeOld) writer.removeClass(\"ck-table-resized\", viewTable);\n\t\t\t});\n\t\t}\n\t\teditingView.change((writer) => {\n\t\t\twriter.removeClass(\"ck-table-column-resizer__active\", viewResizer);\n\t\t});\n\t\tif (!editingView.domConverter.mapViewToDom(viewResizer).matches(\":hover\")) this._resetResizerStyles(viewResizer);\n\t\tthis._isResizingActive = false;\n\t\tthis._resizingData = null;\n\t}\n\t/**\n\t* Retrieves and returns required data needed for the resizing process.\n\t*\n\t* @param domEventData The data of the `mousedown` event.\n\t* @param columnWidths The current widths of the columns.\n\t* @returns The data needed for the resizing process.\n\t*/\n\t_getResizingData(domEventData, columnWidths) {\n\t\tconst editor = this.editor;\n\t\tconst columnPosition = domEventData.domEvent.clientX;\n\t\tconst viewResizer = domEventData.target;\n\t\tconst viewLeftCell = viewResizer.findAncestor((element) => element.is(\"element\", \"td\") || element.is(\"element\", \"th\"));\n\t\tconst modelLeftCell = editor.editing.mapper.toModelElement(viewLeftCell);\n\t\tconst modelTable = modelLeftCell.findAncestor(\"table\");\n\t\tconst leftColumnIndex = getColumnEdgesIndexes(modelLeftCell, this._tableUtilsPlugin).rightEdge;\n\t\tconst lastColumnIndex = this._tableUtilsPlugin.getColumns(modelTable) - 1;\n\t\tlet tableAlignment = modelTable.getAttribute(\"tableAlignment\");\n\t\tif (modelTable.getAttribute(\"tableType\") !== \"layout\") {\n\t\t\ttableAlignment ||= editor.config.get(\"table.tableProperties.defaultProperties.alignment\");\n\t\t\ttableAlignment ||= \"center\";\n\t\t}\n\t\tconst isRightEdge = leftColumnIndex === lastColumnIndex;\n\t\tconst isLtrContent = editor.locale.contentLanguageDirection !== \"rtl\";\n\t\tconst isTableCentered = tableAlignment === \"center\";\n\t\tconst isPixelMode = isTableWidthInPixels(modelTable);\n\t\tconst viewTable = viewLeftCell.findAncestor(\"table\");\n\t\tconst viewFigure = viewTable.findAncestor(\"figure\");\n\t\tconst viewColgroup = [...viewTable.getChildren()].find((viewCol) => viewCol.is(\"element\", \"colgroup\"));\n\t\tconst viewLeftColumn = viewColgroup.getChild(leftColumnIndex);\n\t\tconst viewRightColumn = isRightEdge ? void 0 : viewColgroup.getChild(leftColumnIndex + 1);\n\t\tconst domFigureParent = editor.editing.view.domConverter.mapViewToDom(viewFigure.parent);\n\t\tconst viewFigureParentWidth = getContainerContentWidth(domFigureParent);\n\t\tconst viewFigureWidth = getElementWidthInPixels(editor.editing.view.domConverter.mapViewToDom(viewFigure));\n\t\tconst tableWidth = getTableWidthInPixels(modelTable, editor);\n\t\tconst leftColumnWidth = columnWidths[leftColumnIndex];\n\t\tconst rightColumnWidth = isRightEdge ? void 0 : columnWidths[leftColumnIndex + 1];\n\t\tconst isTableWidthWithinContainerAtDragStart = tableWidth <= getEditableContentWidth(editor, modelTable.root.rootName);\n\t\tconst tableScrollPlugin = editor.plugins.has(\"TableScrollEditing\") ? editor.plugins.get(\"TableScrollEditing\") : null;\n\t\treturn {\n\t\t\tcolumnPosition,\n\t\t\tflags: {\n\t\t\t\tisRightEdge,\n\t\t\t\tisTableCentered,\n\t\t\t\tisLtrContent,\n\t\t\t\tisPixelMode,\n\t\t\t\tisTableWidthWithinContainerAtDragStart,\n\t\t\t\tisTableScrollAllowed: !!tableScrollPlugin && tableScrollPlugin._isTableScrollable(modelTable)\n\t\t\t},\n\t\t\telements: {\n\t\t\t\tviewResizer,\n\t\t\t\tmodelTable,\n\t\t\t\tviewFigure,\n\t\t\t\tviewTable,\n\t\t\t\tviewColgroup,\n\t\t\t\tviewLeftColumn,\n\t\t\t\tviewRightColumn\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tviewFigureWidth,\n\t\t\t\tviewFigureParentWidth,\n\t\t\t\ttableWidth,\n\t\t\t\tleftColumnWidth,\n\t\t\t\trightColumnWidth\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Registers a listener ensuring that each resizable cell have a resizer handle.\n\t*/\n\t_registerResizerInserter() {\n\t\tthis.editor.conversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"insert:tableCell\", (evt, data, conversionApi) => {\n\t\t\t\tconst modelElement = data.item;\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement(modelElement);\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\t\tviewWriter.insert(viewWriter.createPositionAt(viewElement, \"end\"), viewWriter.createUIElement(\"div\", { class: \"ck-table-column-resizer\" }));\n\t\t\t}, { priority: \"lowest\" });\n\t\t});\n\t}\n};\n/**\n* Tells whether the table wrapping the given view `<col>` element is sized in pixels. The width is read from the\n* column's own table (or its wrapping `<figure>`), never from an ancestor further up, so a width-less table nested\n* inside a wider one is not mistaken for a pixel table.\n*/\nfunction isViewTableWidthInPixels(viewColElement) {\n\tconst viewTable = viewColElement.findAncestor((element) => element.is(\"element\", \"table\"));\n\tconst viewParent = viewTable.parent;\n\tconst width = (viewParent.is(\"element\", \"figure\") ? viewParent : viewTable).getStyle(\"width\");\n\treturn typeof width === \"string\" && width.trim().endsWith(\"px\");\n}\n/**\n* In the pixel mode keeps the sum of the column widths equal to the table width. If they differ (for example after a\n* manual table width change), the columns are scaled proportionally so that they sum up to the table width. In the\n* percentage mode (or when the columns already sum to the table width) it is a no-op.\n*/\nfunction scalePixelColumnsToTableWidth(columnWidths, table) {\n\tif (!isTableWidthInPixels(table) || !isColumnWidthsInPixels(columnWidths)) return columnWidths;\n\tconst tableWidthInPixels = parseFloat(table.getAttribute(\"tableWidth\"));\n\tconst totalWidth = sumArray(columnWidths);\n\tif (!totalWidth || Math.abs(totalWidth - tableWidthInPixels) < .5) return columnWidths;\n\tconst factor = tableWidthInPixels / totalWidth;\n\treturn columnWidths.map((width) => `${toPrecision(parseFloat(width) * factor)}px`);\n}\n/**\n* Normalizes a pixel-mode column group to concrete pixel widths. It mirrors {@link ~normalizeColumnWidths} (the\n* percentage path): percentages are resolved against the table width, and missing (`auto`/`undefined`) columns are\n* filled from the width left over in the table - so the column group never keeps `auto` widths or mixes units, and\n* downstream arithmetic never sees a non-pixel value.\n*/\nfunction normalizePixelColumnWidths(columnWidths, table) {\n\tconst tableWidthInPixels = parseFloat(table.getAttribute(\"tableWidth\"));\n\tconst pixelWidths = columnWidths.map((width) => {\n\t\tif (width === \"auto\" || width === void 0) return null;\n\t\treturn width.endsWith(\"%\") ? parseFloat(width) / 100 * tableWidthInPixels : parseFloat(width);\n\t});\n\tconst missingColumns = pixelWidths.filter((width) => width === null).length;\n\tif (missingColumns) {\n\t\tconst knownWidth = pixelWidths.reduce((sum, width) => width === null ? sum : sum + width, 0);\n\t\tconst widthForMissingColumn = Math.max((tableWidthInPixels - knownWidth) / missingColumns, 40);\n\t\treturn pixelWidths.map((width) => `${toPrecision(width === null ? widthForMissingColumn : width)}px`);\n\t}\n\treturn pixelWidths.map((width) => `${toPrecision(width)}px`);\n}\n/**\n* Applies a column width in the pixel mode: the target column gets the absolute width and the table's own width\n* grows or shrinks to the sum of all column widths.\n*/\nfunction applyPixelColumnWidths(writer, table, columnIndexes, value) {\n\tconst columns = getTableColumnElements(table);\n\tconst tableWidthInPixels = parseFloat(table.getAttribute(\"tableWidth\"));\n\tconst toPixels = (width) => width.trim().endsWith(\"%\") ? parseFloat(width) / 100 * tableWidthInPixels : parseFloat(width);\n\tconst targetPixels = Math.max(toPixels(value), 40);\n\tconst widths = getTableColumnsWidths(table).map(toPixels);\n\tfor (const index of columnIndexes) widths[index] = targetPixels;\n\tconst roundedWidths = widths.map((width) => toPrecision(width));\n\tcolumns.forEach((columnElement, index) => {\n\t\twriter.setAttribute(\"columnWidth\", `${roundedWidths[index]}px`, columnElement);\n\t});\n\twriter.setAttribute(\"tableWidth\", `${toPrecision(sumArray(roundedWidths))}px`, table);\n}\n/**\n* Splits a sorted list of column indexes into maximal contiguous bands, for example `[ 0, 1, 3 ]` into `[ 0, 1 ]`\n* and `[ 3 ]`.\n*/\nfunction getContiguousBands(columnIndexes) {\n\tconst bands = [];\n\tfor (const index of columnIndexes) {\n\t\tconst lastBand = bands[bands.length - 1];\n\t\tif (lastBand && index === lastBand.end + 1) {\n\t\t\tlastBand.indexes.push(index);\n\t\t\tlastBand.end = index;\n\t\t} else bands.push({\n\t\t\tindexes: [index],\n\t\t\tend: index\n\t\t});\n\t}\n\treturn bands;\n}\n/**\n* Given the table width a drag would naturally produce, returns the width that should actually be applied\n* once snapping and growth resistance around the container's width are taken into account:\n*\n*  * if the natural width lands close to the container's width (on either side), it's pulled to exactly\n*    match it,\n*  * if the natural width is past the container's width, it stays pinned at the container's width until the\n*    drag has gone far enough beyond it (the \"resistance\" zone) - past that point it keeps growing 1:1,\n*    continuing smoothly from where the resistance was overcome instead of jumping,\n*  * shrinking below the container's width is never resisted, only snapped when close.\n*\n* @internal\n*/\nfunction applyContainerWidthResistance(naturalTableWidth, containerWidth) {\n\tconst distance = naturalTableWidth - containerWidth;\n\tif (distance < 0) return -distance <= 5 ? containerWidth : naturalTableWidth;\n\tconst resistanceZone = 5 + 10;\n\treturn distance <= resistanceZone ? containerWidth : containerWidth + (distance - resistanceZone);\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 table/tablecolumnresize\n*/\n/**\n* The table column resize feature.\n*\n* It provides the possibility to set the width of each column in a table using a resize handler.\n*/\nvar TableColumnResize = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableColumnResizeEditing, TableCellWidthEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableColumnResize\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn 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 table/tablelayout/commands/tabletypecommand\n*/\n/**\n* The set table type command.\n*\n* The command is registered by {@link module:table/tablelayout/tablelayoutediting~TableLayoutEditing}\n* as the `'tableType'` editor command.\n*\n* To set the table type at the current selection, execute the command and specify the table type:\n*\n* ```ts\n* editor.execute( 'tableType', 'layout' );\n* ```\n*/\nvar TableTypeCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst selectedTable = getSelectionAffectedTable(selection);\n\t\tif (selectedTable) {\n\t\t\tthis.isEnabled = true;\n\t\t\tthis.value = selectedTable.getAttribute(\"tableType\");\n\t\t} else {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = null;\n\t\t}\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* Set table type by the given table type parameter.\n\t*\n\t* @param tableType The type of table it should become.\n\t* @fires execute\n\t*/\n\texecute(tableType) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst table = getSelectionAffectedTable(selection);\n\t\tif (table.getAttribute(\"tableType\") === tableType) return;\n\t\tmodel.change((writer) => {\n\t\t\twriter.setAttribute(\"tableType\", tableType, table);\n\t\t\tmodel.schema.removeDisallowedAttributes([table], writer);\n\t\t\tconst tableChildren = table.getChildren();\n\t\t\tfor (const child of tableChildren) if (!model.schema.checkChild(table, child)) writer.remove(child);\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 table/tablelayout/tablelayoutediting\n*/\nconst TABLE_TYPES = [\"content\", \"layout\"];\n/**\n* The table layout editing plugin.\n*/\nvar TableLayoutEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableLayoutEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"TL\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableColumnResize];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis._defineSchema();\n\t\tthis._defineConverters();\n\t\tthis._defineClipboardPasteHandlers();\n\t\tthis._registerTableTypeAttributePostfixer();\n\t\tthis.editor.commands.add(\"insertTableLayout\", new InsertTableLayoutCommand(this.editor));\n\t\tthis.editor.commands.add(\"tableType\", new TableTypeCommand(this.editor));\n\t}\n\t/**\n\t* Defines the schema for the table layout feature.\n\t*/\n\t_defineSchema() {\n\t\tconst { schema } = this.editor.model;\n\t\tschema.extend(\"table\", { allowAttributes: \"tableType\" });\n\t\tschema.addChildCheck(layoutTableCheck, \"caption\");\n\t\tschema.addAttributeCheck(layoutTableCheck, \"headingRows\");\n\t\tschema.addAttributeCheck(layoutTableCheck, \"headingColumns\");\n\t\tschema.addAttributeCheck(layoutTableCheck, \"footerRows\");\n\t}\n\t/**\n\t* Defines the converters for the table layout feature.\n\t*/\n\t_defineConverters() {\n\t\tconst { editor } = this;\n\t\tconst { conversion } = editor;\n\t\tconst preferredExternalTableType = editor.config.get(\"table.tableLayout.preferredExternalTableType\");\n\t\tconversion.for(\"upcast\").add(upcastLayoutTable(editor, preferredExternalTableType));\n\t\tconversion.for(\"dataDowncast\").add(dataDowncastLayoutTable());\n\t\tconversion.for(\"editingDowncast\").attributeToAttribute({\n\t\t\tmodel: {\n\t\t\t\tkey: \"tableType\",\n\t\t\t\tvalues: [\"layout\", \"content\"]\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tlayout: {\n\t\t\t\t\tkey: \"class\",\n\t\t\t\t\tvalue: [\"layout-table\"]\n\t\t\t\t},\n\t\t\t\tcontent: {\n\t\t\t\t\tkey: \"class\",\n\t\t\t\t\tvalue: [\"content-table\"]\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Handles the clipboard content insertion events.\n\t*\n\t* - If the content is from another editor, do not override the table type.\n\t* - If the content is from another source, set the table type to 'content'.\n\t*\n\t* It handles the scenario when user copies `<table></table>` from Word. We do not want to\n\t* change the table type to `layout` because it is really `content` table.\n\t*/\n\t_defineClipboardPasteHandlers() {\n\t\tconst { plugins } = this.editor;\n\t\tif (!plugins.has(\"ClipboardPipeline\")) return;\n\t\tconst clipboardPipeline = plugins.get(\"ClipboardPipeline\");\n\t\tthis.listenTo(clipboardPipeline, \"contentInsertion\", (evt, data) => {\n\t\t\tif (data.sourceEditorId) return;\n\t\t\tthis.editor.model.change((writer) => {\n\t\t\t\tfor (const { item } of writer.createRangeIn(data.content)) if (item.is(\"element\", \"table\")) writer.setAttribute(\"tableType\", \"content\", item);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Registers a post-fixer that sets the `tableType` attribute to `content` for inserted \"default\" tables.\n\t* Also fixes potential issues with the table structure when the `tableType` attribute has been changed.\n\t*/\n\t_registerTableTypeAttributePostfixer() {\n\t\tconst editor = this.editor;\n\t\teditor.model.document.registerPostFixer((writer) => {\n\t\t\tconst changes = editor.model.document.differ.getChanges();\n\t\t\tlet hasChanged = false;\n\t\t\tfor (const entry of changes) {\n\t\t\t\tif (entry.type == \"insert\" && entry.name != \"$text\") {\n\t\t\t\t\tconst element = entry.position.nodeAfter;\n\t\t\t\t\tconst range = writer.createRangeOn(element);\n\t\t\t\t\tfor (const item of range.getItems()) if (item.is(\"element\", \"table\") && !item.hasAttribute(\"tableType\")) {\n\t\t\t\t\t\twriter.setAttribute(\"tableType\", \"content\", item);\n\t\t\t\t\t\thasChanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (entry.type == \"attribute\" && entry.attributeKey == \"tableType\") {\n\t\t\t\t\tfor (const item of entry.range.getItems())\n /* v8 ignore else -- `tableType` is only ever set on a single `table`, so the range holds no other items. */\n\t\t\t\t\tif (item.is(\"element\", \"table\")) {\n\t\t\t\t\t\teditor.model.schema.removeDisallowedAttributes([item], writer);\n\t\t\t\t\t\tconst tableChildren = item.getChildren();\n\t\t\t\t\t\tfor (const child of tableChildren) if (!editor.model.schema.checkChild(item, child)) {\n\t\t\t\t\t\t\twriter.remove(child);\n\t\t\t\t\t\t\thasChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn hasChanged;\n\t\t});\n\t}\n};\n/**\n* View table element to model table element conversion helper.\n*\n* This conversion helper overrides the default table converter to meet table layout conditions.\n*\n* @param editor Editor instance.\n* @returns Conversion helper.\n*/\nfunction upcastLayoutTable(editor, preferredExternalTableType) {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:table\", (evt, data, conversionApi) => {\n\t\t\tconst viewTable = data.viewItem;\n\t\t\tif (!conversionApi.consumable.test(viewTable, { name: true })) return;\n\t\t\tif (resolveTableType(viewTable, preferredExternalTableType) == \"content\") return;\n\t\t\tconst table = conversionApi.writer.createElement(\"table\", { tableType: \"layout\" });\n\t\t\tif (!conversionApi.safeInsert(table, data.modelCursor)) return;\n\t\t\tconversionApi.consumable.consume(viewTable, { name: true });\n\t\t\tconversionApi.consumable.consume(viewTable, { attributes: [\"role\"] });\n\t\t\tconversionApi.consumable.consume(viewTable, { classes: [\"layout-table\"] });\n\t\t\tif (viewTable.getAttribute(\"border\") === \"0\") conversionApi.consumable.consume(viewTable, { attributes: [\"border\"] });\n\t\t\tfor (const tableChild of viewTable.getChildren()) if (tableChild.is(\"element\")) {\n\t\t\t\tfor (const row of tableChild.getChildren()) if (row.is(\"element\", \"tr\")) conversionApi.convertItem(row, conversionApi.writer.createPositionAt(table, \"end\"));\n\t\t\t}\n\t\t\tconversionApi.convertChildren(viewTable, conversionApi.writer.createPositionAt(table, \"end\"));\n\t\t\tif (table.isEmpty) {\n\t\t\t\tconst row = conversionApi.writer.createElement(\"tableRow\");\n\t\t\t\tconversionApi.writer.insert(row, conversionApi.writer.createPositionAt(table, \"end\"));\n\t\t\t\tcreateEmptyTableCell(conversionApi.writer, conversionApi.writer.createPositionAt(row, \"end\"));\n\t\t\t}\n\t\t\tconversionApi.updateConversionResult(table, data);\n\t\t}, { priority: \"high\" });\n\t\tdispatcher.on(\"element:table\", (evt, data, conversionApi) => {\n\t\t\tconst { viewItem, modelRange } = data;\n\t\t\tif (modelRange) {\n\t\t\t\tconst resolvedType = resolveTableType(viewItem, preferredExternalTableType);\n\t\t\t\tconversionApi.writer.setAttribute(\"tableType\", resolvedType, modelRange);\n\t\t\t\tconsumeViewTableClasses(conversionApi.consumable, viewItem);\n\t\t\t\tif (resolvedType === \"content\" && viewItem.parent?.is(\"element\", \"figure\")) consumeViewTableClasses(conversionApi.consumable, viewItem.parent);\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t};\n}\n/**\n* Consume all possible classes that determine type of table on provided view item.\n*/\nfunction consumeViewTableClasses(consumable, viewItem) {\n\tconsumable.consume(viewItem, { classes: [\"layout-table\"] });\n\tconsumable.consume(viewItem, { classes: [\"content-table\"] });\n}\n/**\n* Model table container element to view table element conversion helper.\n*\n* @returns Conversion helper.\n*/\nfunction dataDowncastLayoutTable() {\n\treturn (dispatcher) => {\n\t\treturn dispatcher.on(\"attribute:tableType:table\", (evt, data, conversionApi) => {\n\t\t\tconst { item, attributeNewValue } = data;\n\t\t\tconst { mapper, writer } = conversionApi;\n\t\t\tif (!conversionApi.consumable.test(item, evt.name)) return;\n\t\t\tconst table = mapper.toViewElement(item);\n\t\t\twriter.addClass(`${attributeNewValue}-table`, table);\n\t\t\tif (attributeNewValue == \"layout\") writer.setAttribute(\"role\", \"presentation\", table);\n\t\t\tconversionApi.consumable.consume(item, evt.name);\n\t\t});\n\t};\n}\n/**\n* Resolves the table type based on the view table element and the preferred external table type.\n*/\nfunction resolveTableType(viewTable, preferredExternalTableType) {\n\tif (viewTable.hasClass(\"content-table\")) return \"content\";\n\tif (viewTable.hasClass(\"layout-table\")) return \"layout\";\n\tif (preferredExternalTableType && TABLE_TYPES.includes(preferredExternalTableType)) return preferredExternalTableType;\n\t/**\n\t* Checks if the table is a content table if any of the following conditions are met:\n\t* - the `<table>` is wrapped with `<figure>`,\n\t* - the `<table>` has a `<caption>` element.\n\t*/\n\tif (viewTable.parent.is(\"element\", \"figure\") || Array.from(viewTable.getChildren()).some((child) => child.is(\"element\", \"caption\"))) return \"content\";\n\treturn \"layout\";\n}\n/**\n* Checks if the element is a layout table.\n* It is used to disallow attributes or children that is managed by `Schema`.\n*/\nfunction layoutTableCheck(context) {\n\tif (context.endsWith(\"table\") && context.last.getAttribute(\"tableType\") == \"layout\") 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* @module table/tablelayout\n*/\n/**\n* The table plugin.\n*\n* For a detailed overview, check the {@glink features/tables/layout-tables Layout table feature documentation}.\n*/\nvar TableLayout = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableLayout\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [\n\t\t\tTableColumnResize,\n\t\t\tTableLayoutEditing,\n\t\t\tTableLayoutUI\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* The table cell attribute command.\n*\n* This command is a base command for other table property commands.\n*/\nvar TablePropertyCommand = class extends Command {\n\t/**\n\t* The attribute that will be set by the command.\n\t*/\n\tattributeName;\n\t/**\n\t* The default value for the attribute.\n\t*\n\t* @readonly\n\t*/\n\t_defaultValue;\n\t/**\n\t* The default value for the attribute for the content table.\n\t*/\n\t_defaultContentTableValue;\n\t/**\n\t* The default value for the attribute for the layout table.\n\t*/\n\t_defaultLayoutTableValue;\n\t/**\n\t* Creates a new `TablePropertyCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param attributeName Table cell attribute name.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, attributeName, defaultValue) {\n\t\tsuper(editor);\n\t\tthis.attributeName = attributeName;\n\t\tthis._defaultContentTableValue = defaultValue;\n\t\tthis._defaultLayoutTableValue = attributeName === \"tableBorderStyle\" ? \"none\" : void 0;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst table = getSelectionAffectedTable(selection);\n\t\tthis._defaultValue = !table || table.getAttribute(\"tableType\") !== \"layout\" ? this._defaultContentTableValue : this._defaultLayoutTableValue;\n\t\tthis.isEnabled = !!table;\n\t\tthis.value = this._getValue(table);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* @fires execute\n\t* @param options.value If set, the command will set the attribute on the selected table.\n\t* If not set, the command will remove the attribute from the selected table.\n\t* @param options.batch Pass the model batch instance to the command to aggregate changes,\n\t* for example, to allow a single undo step for multiple executions.\n\t*/\n\texecute(options = {}) {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst { value, batch } = options;\n\t\tconst table = getSelectionAffectedTable(selection);\n\t\tconst valueToSet = this._getValueToSet(value);\n\t\tmodel.enqueueChange(batch, (writer) => {\n\t\t\tif (valueToSet) writer.setAttribute(this.attributeName, valueToSet, table);\n\t\t\telse writer.removeAttribute(this.attributeName, table);\n\t\t});\n\t}\n\t/**\n\t* Returns the attribute value for a table.\n\t*/\n\t_getValue(table) {\n\t\tif (!table) return;\n\t\tconst value = table.getAttribute(this.attributeName);\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\n\t}\n\t/**\n\t* Returns the proper model value. It can be used to add a default unit to numeric values.\n\t*/\n\t_getValueToSet(value) {\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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* The table background color command.\n*\n* The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n* the `'tableBackgroundColor'` editor command.\n*\n* To change the background color of the selected table, execute the command:\n*\n* ```ts\n* editor.execute( 'tableBackgroundColor', {\n*   value: '#f00'\n* } );\n* ```\n*/\nvar TableBackgroundColorCommand = class extends TablePropertyCommand {\n\t/**\n\t* Creates a new `TableBackgroundColorCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableBackgroundColor\", defaultValue);\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* The table border color command.\n*\n* The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n* the `'tableBorderColor'` editor command.\n*\n* To change the border color of the selected table, execute the command:\n*\n* ```ts\n* editor.execute( 'tableBorderColor', {\n*   value: '#f00'\n* } );\n* ```\n*/\nvar TableBorderColorCommand = class extends TablePropertyCommand {\n\t/**\n\t* Creates a new `TableBorderColorCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableBorderColor\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValue(table) {\n\t\tif (!table) return;\n\t\tconst value = getSingleValue(table.getAttribute(this.attributeName));\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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* The table style border command.\n*\n* The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n* the `'tableBorderStyle'` editor command.\n*\n* To change the border style of the selected table, execute the command:\n*\n* ```ts\n* editor.execute( 'tableBorderStyle', {\n*   value: 'dashed'\n* } );\n* ```\n*/\nvar TableBorderStyleCommand = class extends TablePropertyCommand {\n\t/**\n\t* Creates a new `TableBorderStyleCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableBorderStyle\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValue(table) {\n\t\tif (!table) return;\n\t\tconst value = getSingleValue(table.getAttribute(this.attributeName));\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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* The table width border command.\n*\n* The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n* the `'tableBorderWidth'` editor command.\n*\n* To change the border width of the selected table, execute the command:\n*\n* ```ts\n* editor.execute( 'tableBorderWidth', {\n*   value: '5px'\n* } );\n* ```\n*\n* **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableBorderWidth', {\n*   value: '5'\n* } );\n* ```\n*\n* will set the `borderWidth` attribute to `'5px'` in the model.\n*/\nvar TableBorderWidthCommand = class extends TablePropertyCommand {\n\t/**\n\t* Creates a new `TableBorderWidthCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableBorderWidth\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValue(table) {\n\t\tif (!table) return;\n\t\tconst value = getSingleValue(table.getAttribute(this.attributeName));\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValueToSet(value) {\n\t\tconst newValue = addDefaultUnitToNumericValue(value, \"px\");\n\t\tif (newValue === this._defaultValue) return;\n\t\treturn newValue;\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 table/tableproperties/commands/tablewidthcommand\n*/\n/**\n* The table width command.\n*\n* The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n* the `'tableWidth'` editor command.\n*\n* To change the width of the selected table, execute the command:\n*\n* ```ts\n* editor.execute( 'tableWidth', {\n*   value: '400px'\n* } );\n* ```\n*\n* **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableWidth', {\n*   value: '50'\n* } );\n* ```\n*\n* will set the `width` attribute to `'50px'` in the model.\n*/\nvar TableWidthCommand = class extends TablePropertyCommand {\n\t/**\n\t* Creates a new `TableWidthCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableWidth\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValueToSet(value) {\n\t\tvalue = addDefaultUnitToNumericValue(value, \"px\");\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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 table/tableproperties/commands/tableheightcommand\n*/\n/**\n* The table height command.\n*\n* The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n* the `'tableHeight'` editor command.\n*\n* To change the height of the selected table, execute the command:\n*\n* ```ts\n* editor.execute( 'tableHeight', {\n*   value: '500px'\n* } );\n* ```\n*\n* **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n*\n* ```ts\n* editor.execute( 'tableHeight', {\n*   value: '50'\n* } );\n* ```\n*\n* will set the `height` attribute to `'50px'` in the model.\n*/\nvar TableHeightCommand = class extends TablePropertyCommand {\n\t/**\n\t* Creates a new `TableHeightCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value of the attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableHeight\", defaultValue);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\t_getValueToSet(value) {\n\t\tvalue = addDefaultUnitToNumericValue(value, \"px\");\n\t\tif (value === this._defaultValue) return;\n\t\treturn value;\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* The table alignment command.\n*\n* The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n* the `'tableAlignment'` editor command.\n*\n* To change the alignment of the selected table, execute the command:\n*\n* ```ts\n* editor.execute( 'tableAlignment', {\n*   value: 'right'\n* } );\n* ```\n*/\nvar TableAlignmentCommand = class extends TablePropertyCommand {\n\t/**\n\t* Creates a new `TableAlignmentCommand` instance.\n\t*\n\t* @param editor An editor in which this command will be used.\n\t* @param defaultValue The default value for the \"alignment\" attribute.\n\t*/\n\tconstructor(editor, defaultValue) {\n\t\tsuper(editor, \"tableAlignment\", defaultValue);\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 table/tableproperties/tablepropertiesediting\n*/\n/**\n* The table properties editing feature.\n*\n* Introduces table's model attributes and their conversion:\n*\n* - border: `tableBorderStyle`, `tableBorderColor` and `tableBorderWidth`\n* - background color: `tableBackgroundColor`\n* - horizontal alignment: `tableAlignment`\n* - width & height: `tableWidth` & `tableHeight`\n*\n* It also registers commands used to manipulate the above attributes:\n*\n* - border: `'tableBorderStyle'`, `'tableBorderColor'` and `'tableBorderWidth'` commands\n* - background color: `'tableBackgroundColor'`\n* - horizontal alignment: `'tableAlignment'`\n* - width & height: `'tableWidth'` & `'tableHeight'`\n*/\nvar TablePropertiesEditing = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TablePropertiesEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"TCP\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst conversion = editor.conversion;\n\t\teditor.config.define(\"table.tableProperties.defaultProperties\", {});\n\t\tconst defaultTableProperties = getNormalizedDefaultTableProperties(editor.config.get(\"table.tableProperties.defaultProperties\"), { includeAlignmentProperty: true });\n\t\tconst useInlineStyles = editor.config.get(\"table.tableProperties.alignment.useInlineStyles\") === true;\n\t\teditor.data.addStyleProcessorRules(addMarginStylesRules);\n\t\teditor.data.addStyleProcessorRules(addBorderStylesRules);\n\t\tenableBorderProperties(editor, {\n\t\t\tcolor: defaultTableProperties.borderColor,\n\t\t\tstyle: defaultTableProperties.borderStyle,\n\t\t\twidth: defaultTableProperties.borderWidth\n\t\t});\n\t\teditor.commands.add(\"tableBorderColor\", new TableBorderColorCommand(editor, defaultTableProperties.borderColor));\n\t\teditor.commands.add(\"tableBorderStyle\", new TableBorderStyleCommand(editor, defaultTableProperties.borderStyle));\n\t\teditor.commands.add(\"tableBorderWidth\", new TableBorderWidthCommand(editor, defaultTableProperties.borderWidth));\n\t\tenableAlignmentProperty(schema, conversion, defaultTableProperties.alignment, useInlineStyles);\n\t\teditor.commands.add(\"tableAlignment\", new TableAlignmentCommand(editor, defaultTableProperties.alignment));\n\t\tenableTableToFigureProperty(schema, conversion, {\n\t\t\tmodelAttribute: \"tableWidth\",\n\t\t\tstyleName: \"width\",\n\t\t\tattributeName: \"width\",\n\t\t\tattributeType: \"length\",\n\t\t\tdefaultValue: defaultTableProperties.width\n\t\t});\n\t\teditor.commands.add(\"tableWidth\", new TableWidthCommand(editor, defaultTableProperties.width));\n\t\tenableTableToFigureProperty(schema, conversion, {\n\t\t\tmodelAttribute: \"tableHeight\",\n\t\t\tstyleName: \"height\",\n\t\t\tattributeName: \"height\",\n\t\t\tattributeType: \"length\",\n\t\t\tdefaultValue: defaultTableProperties.height\n\t\t});\n\t\teditor.commands.add(\"tableHeight\", new TableHeightCommand(editor, defaultTableProperties.height));\n\t\teditor.data.addStyleProcessorRules(addBackgroundStylesRules);\n\t\tenableProperty$1(schema, conversion, {\n\t\t\tmodelAttribute: \"tableBackgroundColor\",\n\t\t\tstyleName: \"background-color\",\n\t\t\tattributeName: \"bgcolor\",\n\t\t\tattributeType: \"color\",\n\t\t\tdefaultValue: defaultTableProperties.backgroundColor\n\t\t});\n\t\teditor.commands.add(\"tableBackgroundColor\", new TableBackgroundColorCommand(editor, defaultTableProperties.backgroundColor));\n\t\tupcastTableCellPaddingAttribute(editor, \"table\");\n\t\tconst viewDoc = editor.editing.view.document;\n\t\tthis.listenTo(viewDoc, \"clipboardOutput\", (evt, data) => {\n\t\t\teditor.editing.view.change((writer) => {\n\t\t\t\tfor (const { item } of writer.createRangeIn(data.content)) wrapInDivIfNeeded(item, writer);\n\t\t\t\tdata.dataTransfer.setData(\"text/html\", this.editor.data.htmlProcessor.toData(data.content));\n\t\t\t});\n\t\t}, { priority: \"lowest\" });\n\t}\n};\n/**\n* Checks whether the view element is a table and if it needs to be wrapped in a div for alignment purposes.\n* If so, it wraps it in a div and inserts it into the data content.\n*/\nfunction wrapInDivIfNeeded(viewItem, writer) {\n\tif (!viewItem.is(\"element\", \"table\")) return;\n\tconst alignAttribute = viewItem.getAttribute(\"align\");\n\tconst floatAttribute = viewItem.getStyle(\"float\");\n\tconst marginLeft = viewItem.getStyle(\"margin-left\");\n\tconst marginRight = viewItem.getStyle(\"margin-right\");\n\tif (alignAttribute && alignAttribute === \"center\" || floatAttribute && floatAttribute === \"right\" && alignAttribute && alignAttribute === \"right\") {\n\t\tinsertWrapperWithAlignment(writer, alignAttribute, viewItem);\n\t\treturn;\n\t}\n\tif (floatAttribute === void 0 && marginLeft === \"auto\" && marginRight === \"0\") insertWrapperWithAlignment(writer, \"right\", viewItem);\n}\nfunction insertWrapperWithAlignment(writer, align, table) {\n\tconst position = writer.createPositionBefore(table);\n\tconst wrapper = writer.createContainerElement(\"div\", { align }, table);\n\twriter.insert(position, wrapper);\n}\n/**\n* Enables `tableBorderStyle'`, `tableBorderColor'` and `tableBorderWidth'` attributes for table.\n*\n* @param defaultBorder The default border values.\n* @param defaultBorder.color The default `tableBorderColor` value.\n* @param defaultBorder.style The default `tableBorderStyle` value.\n* @param defaultBorder.width The default `tableBorderWidth` value.\n*/\nfunction enableBorderProperties(editor, defaultBorder) {\n\tconst { conversion } = editor;\n\tconst { schema } = editor.model;\n\tconst modelAttributes = {\n\t\twidth: \"tableBorderWidth\",\n\t\tcolor: \"tableBorderColor\",\n\t\tstyle: \"tableBorderStyle\"\n\t};\n\tschema.extend(\"table\", { allowAttributes: Object.values(modelAttributes) });\n\tfor (const modelAttribute of Object.values(modelAttributes)) schema.setAttributeProperties(modelAttribute, { isFormatting: true });\n\tupcastBorderStyles(editor, \"table\", modelAttributes, defaultBorder);\n\tdowncastTableAttribute(conversion, {\n\t\tmodelAttribute: modelAttributes.color,\n\t\tstyleName: \"border-color\"\n\t});\n\tdowncastTableAttribute(conversion, {\n\t\tmodelAttribute: modelAttributes.style,\n\t\tstyleName: \"border-style\"\n\t});\n\tdowncastTableAttribute(conversion, {\n\t\tmodelAttribute: modelAttributes.width,\n\t\tstyleName: \"border-width\"\n\t});\n}\n/**\n* Enables the `'alignment'` attribute for table.\n*\n* @param defaultValue The default alignment value.\n*/\nfunction enableAlignmentProperty(schema, conversion, defaultValue, useInlineStyles) {\n\tschema.extend(\"table\", { allowAttributes: [\"tableAlignment\"] });\n\tschema.setAttributeProperties(\"tableAlignment\", {\n\t\tisFormatting: true,\n\t\tblockAlignment: (modelElement) => ({\n\t\t\tleft: { value: \"blockLeft\" },\n\t\t\tright: { value: \"blockRight\" },\n\t\t\tcenter: {\n\t\t\t\tvalue: \"center\",\n\t\t\t\tisDefault: modelElement.getAttribute(\"tableType\") !== \"layout\"\n\t\t\t}\n\t\t})\n\t});\n\tconversion.for(\"downcast\").attributeToAttribute({\n\t\tmodel: {\n\t\t\tname: \"table\",\n\t\t\tkey: \"tableAlignment\",\n\t\t\tvalues: [\n\t\t\t\t\"left\",\n\t\t\t\t\"center\",\n\t\t\t\t\"right\",\n\t\t\t\t\"blockLeft\",\n\t\t\t\t\"blockRight\"\n\t\t\t]\n\t\t},\n\t\tview: {\n\t\t\tleft: useInlineStyles ? {\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: {\n\t\t\t\t\tfloat: \"left\",\n\t\t\t\t\t\"margin-right\": \"var(--ck-content-table-style-spacing, 1.5em)\"\n\t\t\t\t}\n\t\t\t} : {\n\t\t\t\tkey: \"class\",\n\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.left.className\n\t\t\t},\n\t\t\tright: useInlineStyles ? {\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: {\n\t\t\t\t\tfloat: \"right\",\n\t\t\t\t\t\"margin-left\": \"var(--ck-content-table-style-spacing, 1.5em)\"\n\t\t\t\t}\n\t\t\t} : {\n\t\t\t\tkey: \"class\",\n\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.right.className\n\t\t\t},\n\t\t\tcenter: useInlineStyles ? {\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: {\n\t\t\t\t\t\"margin-left\": \"auto\",\n\t\t\t\t\t\"margin-right\": \"auto\"\n\t\t\t\t}\n\t\t\t} : {\n\t\t\t\tkey: \"class\",\n\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.center.className\n\t\t\t},\n\t\t\tblockLeft: useInlineStyles ? {\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: {\n\t\t\t\t\t\"margin-left\": \"0\",\n\t\t\t\t\t\"margin-right\": \"auto\"\n\t\t\t\t}\n\t\t\t} : {\n\t\t\t\tkey: \"class\",\n\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className\n\t\t\t},\n\t\t\tblockRight: useInlineStyles ? {\n\t\t\t\tkey: \"style\",\n\t\t\t\tvalue: {\n\t\t\t\t\t\"margin-left\": \"auto\",\n\t\t\t\t\t\"margin-right\": \"0\"\n\t\t\t\t}\n\t\t\t} : {\n\t\t\t\tkey: \"class\",\n\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className\n\t\t\t}\n\t\t},\n\t\tconverterPriority: \"high\"\n\t});\n\t/**\n\t* Enables upcasting of the `tableAlignment` attribute.\n\t*/\n\tupcastTableAlignmentConfig.forEach((config) => {\n\t\tconversion.for(\"upcast\").attributeToAttribute({\n\t\t\tview: config.view,\n\t\t\tmodel: {\n\t\t\t\tkey: \"tableAlignment\",\n\t\t\t\tvalue: (viewElement, conversionApi, data) => {\n\t\t\t\t\tif (isNonTableFigureElement(viewElement)) return;\n\t\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted(defaultValue, \"\", data);\n\t\t\t\t\tconst align = config.getAlign(viewElement);\n\t\t\t\t\tconst consumables = config.getConsumables(viewElement);\n\t\t\t\t\tconversionApi.consumable.consume(viewElement, consumables);\n\t\t\t\t\tif (align !== localDefaultValue) return align;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\tconversion.for(\"upcast\").add(upcastTableAlignedDiv(defaultValue));\n}\n/**\n* Returns a function that converts the table view representation:\n*\n* ```html\n* <div align=\"right\"><table>...</table></div>\n* <!-- or -->\n* <div align=\"center\"><table>...</table></div>\n* <!-- or -->\n* <div align=\"left\"><table>...</table></div>\n* ```\n*\n* to the model representation:\n*\n* ```xml\n* <table tableAlignment=\"right|center|left\"></table>\n* ```\n*\n* @internal\n*/\nfunction upcastTableAlignedDiv(defaultValue) {\n\treturn (dispatcher) => {\n\t\tdispatcher.on(\"element:div\", (evt, data, conversionApi) => {\n\t\t\tif (!conversionApi.consumable.test(data.viewItem, {\n\t\t\t\tname: true,\n\t\t\t\tattributes: \"align\"\n\t\t\t})) return;\n\t\t\tconst significantChildren = Array.from(data.viewItem.getChildren()).filter((child) => {\n\t\t\t\tif (child.is(\"$text\") || child.is(\"$textProxy\")) return child.data.trim() !== \"\";\n\t\t\t\treturn true;\n\t\t\t});\n\t\t\tif (significantChildren.length !== 1 || !significantChildren[0].is(\"element\", \"table\")) return;\n\t\t\tconst [viewTable] = significantChildren;\n\t\t\tif (!conversionApi.consumable.test(viewTable, { name: true })) return;\n\t\t\tconversionApi.consumable.consume(data.viewItem, {\n\t\t\t\tname: true,\n\t\t\t\tattributes: \"align\"\n\t\t\t});\n\t\t\tconst conversionResult = conversionApi.convertItem(viewTable, data.modelCursor);\n\t\t\tconst modelTable = first(conversionResult.modelRange.getItems());\n\t\t\tif (!modelTable || !modelTable.is(\"element\", \"table\")) {\n\t\t\t\tconversionApi.consumable.revert(data.viewItem, {\n\t\t\t\t\tname: true,\n\t\t\t\t\tattributes: \"align\"\n\t\t\t\t});\n\t\t\t\tif (conversionResult.modelRange && !conversionResult.modelRange.isCollapsed) {\n\t\t\t\t\tdata.modelRange = conversionResult.modelRange;\n\t\t\t\t\tdata.modelCursor = conversionResult.modelCursor;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst align = convertToTableAlignment(data.viewItem.getAttribute(\"align\"), viewTable.getAttribute(\"align\"), getDefaultValueAdjusted(defaultValue, \"\", data));\n\t\t\tif (align) conversionApi.writer.setAttribute(\"tableAlignment\", align, modelTable);\n\t\t\tconversionApi.updateConversionResult(modelTable, data);\n\t\t});\n\t};\n}\n/**\n* Converts div `align` and table `align` attributes to the model `tableAlignment` attribute.\n*\n* @param divAlign The value of the div `align` attribute.\n* @param tableAlign The value of the table `align` attribute.\n* @param defaultValue The default alignment value.\n* @returns The model `tableAlignment` value or `undefined` if no conversion is needed.\n*/\nfunction convertToTableAlignment(divAlign, tableAlign, defaultValue) {\n\tif (divAlign) switch (divAlign) {\n\t\tcase \"right\": if (tableAlign === \"right\") return \"right\";\n\t\telse if (tableAlign === \"left\") return \"left\";\n\t\telse return \"blockRight\";\n\t\tcase \"center\": return \"center\";\n\t\tcase \"left\": return tableAlign === void 0 ? \"blockLeft\" : \"left\";\n\t\tdefault: return defaultValue;\n\t}\n}\n/**\n* Enables conversion for an attribute for simple view-model mappings.\n*\n* @param options.defaultValue The default value for the specified `modelAttribute`.\n*/\nfunction enableProperty$1(schema, conversion, options) {\n\tconst { modelAttribute } = options;\n\tschema.extend(\"table\", { allowAttributes: [modelAttribute] });\n\tschema.setAttributeProperties(modelAttribute, { isFormatting: true });\n\tupcastStyleToAttribute(conversion, {\n\t\tviewElement: \"table\",\n\t\t...options\n\t});\n\tdowncastTableAttribute(conversion, options);\n}\n/**\n* Enables conversion for an attribute for simple view (figure) to model (table) mappings.\n*/\nfunction enableTableToFigureProperty(schema, conversion, options) {\n\tconst { modelAttribute } = options;\n\tschema.extend(\"table\", { allowAttributes: [modelAttribute] });\n\tschema.setAttributeProperties(modelAttribute, { isFormatting: true });\n\tupcastStyleToAttribute(conversion, {\n\t\tviewElement: /^(table|figure)$/,\n\t\tshouldUpcast: (viewElement) => !(viewElement.name == \"table\" && viewElement.parent.name == \"figure\" || viewElement.name == \"figure\" && !viewElement.hasClass(\"table\")),\n\t\t...options\n\t});\n\tdowncastAttributeToStyle(conversion, {\n\t\tmodelElement: \"table\",\n\t\t...options\n\t});\n}\n/**\n* Checks whether a given figure element should be ignored when upcasting table properties.\n*/\nfunction isNonTableFigureElement(viewElement) {\n\treturn viewElement.name == \"figure\" && !viewElement.hasClass(\"table\");\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 table/tableproperties/ui/tablepropertiesview\n*/\n/**\n* The class representing a table properties form, allowing users to customize\n* certain style aspects of a table, for instance, border, background color, alignment, etc..\n*/\nvar TablePropertiesView = class extends View {\n\t/**\n\t* Options passed to the view. See {@link #constructor} to learn more.\n\t*/\n\toptions;\n\t/**\n\t* Tracks information about the DOM focus in the form.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A collection of child views in the form.\n\t*/\n\tchildren;\n\t/**\n\t* A dropdown that allows selecting the style of the table border.\n\t*/\n\tborderStyleDropdown;\n\t/**\n\t* An input that allows specifying the width of the table border.\n\t*/\n\tborderWidthInput;\n\t/**\n\t* An input that allows specifying the color of the table border.\n\t*/\n\tborderColorInput;\n\t/**\n\t* An input that allows specifying the table background color.\n\t*/\n\tbackgroundInput;\n\t/**\n\t* An input that allows specifying the table width.\n\t*/\n\twidthInput;\n\t/**\n\t* An input that allows specifying the table height.\n\t*/\n\theightInput;\n\t/**\n\t* A toolbar with buttons that allow changing the alignment of an entire table.\n\t*/\n\talignmentToolbar;\n\t/**\n\t* The \"Save\" button view.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* The \"Cancel\" button view.\n\t*/\n\tcancelButtonView;\n\t/**\n\t* The Back button view displayed in the header.\n\t*/\n\tbackButtonView;\n\t/**\n\t* A collection of views that can be focused in the form.\n\t*/\n\t_focusables;\n\t/**\n\t* Helps cycling over {@link #_focusables} in the form.\n\t*/\n\t_focusCycler;\n\t/**\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param options Additional configuration of the view.\n\t*/\n\tconstructor(locale, options) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\tborderStyle: \"\",\n\t\t\tborderWidth: \"\",\n\t\t\tborderColor: \"\",\n\t\t\tbackgroundColor: \"\",\n\t\t\twidth: \"\",\n\t\t\theight: \"\",\n\t\t\talignment: \"\"\n\t\t});\n\t\tthis.options = options;\n\t\tconst { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();\n\t\tconst { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();\n\t\tconst { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();\n\t\tconst { alignmentToolbar, alignmentLabel } = this._createAlignmentFields();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.children = this.createCollection();\n\t\tthis.borderStyleDropdown = borderStyleDropdown;\n\t\tthis.borderWidthInput = borderWidthInput;\n\t\tthis.borderColorInput = borderColorInput;\n\t\tthis.backgroundInput = backgroundInput;\n\t\tthis.widthInput = widthInput;\n\t\tthis.heightInput = heightInput;\n\t\tthis.alignmentToolbar = alignmentToolbar;\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.backButtonView = this._createBackButton();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tconst headerView = new FormHeaderView(locale, { label: this.t(\"Table properties\") });\n\t\theaderView.children.add(this.backButtonView, 0);\n\t\tthis.children.add(headerView);\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tlabelView: borderRowLabel,\n\t\t\tchildren: [\n\t\t\t\tborderRowLabel,\n\t\t\t\tborderStyleDropdown,\n\t\t\t\tborderWidthInput,\n\t\t\t\tborderColorInput\n\t\t\t],\n\t\t\tclass: \"ck-table-form__border-row\"\n\t\t}));\n\t\tthis.children.add(new FormRowView(locale, { children: [new FormRowView(locale, {\n\t\t\tlabelView: dimensionsLabel,\n\t\t\tchildren: [\n\t\t\t\tdimensionsLabel,\n\t\t\t\twidthInput,\n\t\t\t\toperatorLabel,\n\t\t\t\theightInput\n\t\t\t],\n\t\t\tclass: \"ck-table-form__dimensions-row\"\n\t\t}), new FormRowView(locale, {\n\t\t\tlabelView: backgroundRowLabel,\n\t\t\tchildren: [backgroundRowLabel, backgroundInput],\n\t\t\tclass: \"ck-table-form__background-row\"\n\t\t})] }));\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tlabelView: alignmentLabel,\n\t\t\tchildren: [alignmentLabel, alignmentToolbar],\n\t\t\tclass: \"ck-table-properties-form__alignment-row\"\n\t\t}));\n\t\tthis.children.add(new FormRowView(locale, {\n\t\t\tchildren: [this.cancelButtonView, this.saveButtonView],\n\t\t\tclass: \"ck-table-form__action-row\"\n\t\t}));\n\t\tthis.setTemplate({\n\t\t\ttag: \"form\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-form\",\n\t\t\t\t\t\"ck-table-form\",\n\t\t\t\t\t\"ck-table-properties-form\"\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tsubmitHandler({ view: this });\n\t\t[this.borderColorInput, this.backgroundInput].forEach((view) => {\n\t\t\tthis._focusCycler.chain(view.fieldView.focusCycler);\n\t\t});\n\t\t[\n\t\t\tthis.borderStyleDropdown,\n\t\t\tthis.borderWidthInput,\n\t\t\tthis.borderColorInput,\n\t\t\tthis.widthInput,\n\t\t\tthis.heightInput,\n\t\t\tthis.backgroundInput,\n\t\t\tthis.alignmentToolbar,\n\t\t\tthis.cancelButtonView,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.backButtonView\n\t\t].forEach((view) => {\n\t\t\tthis._focusables.add(view);\n\t\t\tthis.focusTracker.add(view.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the fist focusable field in the form.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #borderStyleDropdown},\n\t* * {@link #borderWidthInput},\n\t* * {@link #borderColorInput}.\n\t*/\n\t_createBorderFields() {\n\t\tconst defaultTableProperties = this.options.defaultTableProperties;\n\t\tconst defaultBorder = {\n\t\t\tstyle: defaultTableProperties.borderStyle,\n\t\t\twidth: defaultTableProperties.borderWidth,\n\t\t\tcolor: defaultTableProperties.borderColor\n\t\t};\n\t\tconst colorInputCreator = getLabeledColorInputCreator({\n\t\t\tcolorConfig: this.options.borderColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: defaultBorder.color,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t});\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst accessibleLabel = t(\"Style\");\n\t\tconst borderRowLabel = new LabelView(locale);\n\t\tborderRowLabel.text = t(\"Border\");\n\t\tconst styleLabels = getBorderStyleLabels(t);\n\t\tconst borderStyleDropdown = new LabeledFieldView(locale, createLabeledDropdown);\n\t\tborderStyleDropdown.set({\n\t\t\tlabel: accessibleLabel,\n\t\t\tclass: \"ck-table-form__border-style\"\n\t\t});\n\t\tborderStyleDropdown.fieldView.buttonView.set({\n\t\t\tariaLabel: accessibleLabel,\n\t\t\tariaLabelledBy: void 0,\n\t\t\tisOn: false,\n\t\t\twithText: true,\n\t\t\ttooltip: accessibleLabel\n\t\t});\n\t\tborderStyleDropdown.fieldView.buttonView.bind(\"label\").to(this, \"borderStyle\", (value) => {\n\t\t\treturn styleLabels[value ? value : \"none\"];\n\t\t});\n\t\tborderStyleDropdown.fieldView.on(\"execute\", (evt) => {\n\t\t\tthis.borderStyle = evt.source._borderStyleValue;\n\t\t});\n\t\tborderStyleDropdown.bind(\"isEmpty\").to(this, \"borderStyle\", (value) => !value);\n\t\taddListToDropdown(borderStyleDropdown.fieldView, getBorderStyleDefinitions(this, defaultBorder.style), {\n\t\t\trole: \"menu\",\n\t\t\tariaLabel: accessibleLabel\n\t\t});\n\t\tconst borderWidthInput = new LabeledFieldView(locale, createLabeledInputText);\n\t\tborderWidthInput.set({\n\t\t\tlabel: t(\"Width\"),\n\t\t\tclass: \"ck-table-form__border-width\"\n\t\t});\n\t\tborderWidthInput.fieldView.bind(\"value\").to(this, \"borderWidth\");\n\t\tborderWidthInput.bind(\"isEnabled\").to(this, \"borderStyle\", isBorderStyleSet);\n\t\tborderWidthInput.fieldView.on(\"input\", () => {\n\t\t\tthis.borderWidth = borderWidthInput.fieldView.element.value;\n\t\t});\n\t\tconst borderColorInput = new LabeledFieldView(locale, colorInputCreator);\n\t\tborderColorInput.set({\n\t\t\tlabel: t(\"Color\"),\n\t\t\tclass: \"ck-table-form__border-color\"\n\t\t});\n\t\tborderColorInput.fieldView.bind(\"value\").to(this, \"borderColor\");\n\t\tborderColorInput.bind(\"isEnabled\").to(this, \"borderStyle\", isBorderStyleSet);\n\t\tborderColorInput.fieldView.on(\"input\", () => {\n\t\t\tthis.borderColor = borderColorInput.fieldView.value;\n\t\t});\n\t\tthis.on(\"change:borderStyle\", (evt, name, newValue, oldValue) => {\n\t\t\tif (!isBorderStyleSet(newValue)) {\n\t\t\t\tthis.borderColor = \"\";\n\t\t\t\tthis.borderWidth = \"\";\n\t\t\t}\n\t\t\tif (!isBorderStyleSet(oldValue)) {\n\t\t\t\tthis.borderColor = defaultBorder.color;\n\t\t\t\tthis.borderWidth = defaultBorder.width;\n\t\t\t}\n\t\t});\n\t\treturn {\n\t\t\tborderRowLabel,\n\t\t\tborderStyleDropdown,\n\t\t\tborderColorInput,\n\t\t\tborderWidthInput\n\t\t};\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #backgroundInput}.\n\t*/\n\t_createBackgroundFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst backgroundRowLabel = new LabelView(locale);\n\t\tbackgroundRowLabel.text = t(\"Background\");\n\t\tconst backgroundInputCreator = getLabeledColorInputCreator({\n\t\t\tcolorConfig: this.options.backgroundColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: this.options.defaultTableProperties.backgroundColor,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t});\n\t\tconst backgroundInput = new LabeledFieldView(locale, backgroundInputCreator);\n\t\tbackgroundInput.set({\n\t\t\tlabel: t(\"Color\"),\n\t\t\tclass: \"ck-table-properties-form__background\"\n\t\t});\n\t\tbackgroundInput.fieldView.bind(\"value\").to(this, \"backgroundColor\");\n\t\tbackgroundInput.fieldView.on(\"input\", () => {\n\t\t\tthis.backgroundColor = backgroundInput.fieldView.value;\n\t\t});\n\t\treturn {\n\t\t\tbackgroundRowLabel,\n\t\t\tbackgroundInput\n\t\t};\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #widthInput},\n\t* * {@link #heightInput}.\n\t*/\n\t_createDimensionFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst dimensionsLabel = new LabelView(locale);\n\t\tdimensionsLabel.text = t(\"Dimensions\");\n\t\tconst widthInput = new LabeledFieldView(locale, createLabeledInputText);\n\t\twidthInput.set({\n\t\t\tlabel: t(\"Width\"),\n\t\t\tclass: \"ck-table-form__dimensions-row__width\"\n\t\t});\n\t\twidthInput.fieldView.bind(\"value\").to(this, \"width\");\n\t\twidthInput.fieldView.on(\"input\", () => {\n\t\t\tthis.width = widthInput.fieldView.element.value;\n\t\t});\n\t\tconst operatorLabel = new View(locale);\n\t\toperatorLabel.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck-table-form__dimension-operator\"] },\n\t\t\tchildren: [{ text: \"×\" }]\n\t\t});\n\t\tconst heightInput = new LabeledFieldView(locale, createLabeledInputText);\n\t\theightInput.set({\n\t\t\tlabel: t(\"Height\"),\n\t\t\tclass: \"ck-table-form__dimensions-row__height\"\n\t\t});\n\t\theightInput.fieldView.bind(\"value\").to(this, \"height\");\n\t\theightInput.fieldView.on(\"input\", () => {\n\t\t\tthis.height = heightInput.fieldView.element.value;\n\t\t});\n\t\treturn {\n\t\t\tdimensionsLabel,\n\t\t\twidthInput,\n\t\t\toperatorLabel,\n\t\t\theightInput\n\t\t};\n\t}\n\t/**\n\t* Creates the following form fields:\n\t*\n\t* * {@link #alignmentToolbar}.\n\t*/\n\t_createAlignmentFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst alignmentLabel = new LabelView(locale);\n\t\talignmentLabel.text = t(\"Table Alignment\");\n\t\tconst alignmentToolbar = new ToolbarView(locale);\n\t\talignmentToolbar.set({\n\t\t\trole: \"radiogroup\",\n\t\t\tisCompact: true,\n\t\t\tariaLabel: t(\"Table alignment toolbar\")\n\t\t});\n\t\tfillToolbar({\n\t\t\tview: this,\n\t\t\ticons: {\n\t\t\t\tleft: IconObjectInlineLeft,\n\t\t\t\tcenter: IconObjectCenter,\n\t\t\t\tright: IconObjectInlineRight,\n\t\t\t\tblockLeft: IconObjectLeft,\n\t\t\t\tblockRight: IconObjectRight\n\t\t\t},\n\t\t\ttoolbar: alignmentToolbar,\n\t\t\tlabels: this._alignmentLabels,\n\t\t\tpropertyName: \"alignment\",\n\t\t\tdefaultValue: this.options.defaultTableProperties.alignment\n\t\t});\n\t\treturn {\n\t\t\talignmentLabel,\n\t\t\talignmentToolbar\n\t\t};\n\t}\n\t/**\n\t* Creates the following form controls:\n\t*\n\t* * {@link #saveButtonView},\n\t* * {@link #cancelButtonView}.\n\t*/\n\t_createActionButtons() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst saveButtonView = new ButtonView(locale);\n\t\tconst cancelButtonView = new ButtonView(locale);\n\t\tconst fieldsThatShouldValidateToSave = [\n\t\t\tthis.borderWidthInput,\n\t\t\tthis.borderColorInput,\n\t\t\tthis.backgroundInput,\n\t\t\tthis.widthInput,\n\t\t\tthis.heightInput\n\t\t];\n\t\tsaveButtonView.set({\n\t\t\tlabel: t(\"Save\"),\n\t\t\tclass: \"ck-button-action\",\n\t\t\ttype: \"submit\",\n\t\t\twithText: true\n\t\t});\n\t\tsaveButtonView.bind(\"isEnabled\").toMany(fieldsThatShouldValidateToSave, \"errorText\", (...errorTexts) => {\n\t\t\treturn errorTexts.every((errorText) => !errorText);\n\t\t});\n\t\tcancelButtonView.set({\n\t\t\tlabel: t(\"Cancel\"),\n\t\t\twithText: true\n\t\t});\n\t\tcancelButtonView.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn {\n\t\t\tsaveButtonView,\n\t\t\tcancelButtonView\n\t\t};\n\t}\n\t/**\n\t* Creates a back button view that cancels the form.\n\t*/\n\t_createBackButton() {\n\t\tconst t = this.locale.t;\n\t\tconst backButton = new ButtonView(this.locale);\n\t\tbackButton.set({\n\t\t\tclass: \"ck-button-back\",\n\t\t\tlabel: t(\"Back\"),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t});\n\t\tbackButton.delegate(\"execute\").to(this, \"cancel\");\n\t\treturn backButton;\n\t}\n\t/**\n\t* Provides localized labels for {@link #alignmentToolbar} buttons.\n\t*/\n\tget _alignmentLabels() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t;\n\t\tconst blockLeft = t(\"Align table to the left with no text wrapping\");\n\t\tconst blockRight = t(\"Align table to the right with no text wrapping\");\n\t\tconst left = t(\"Align table to the left with text wrapping\");\n\t\tconst center = t(\"Center table with no text wrapping\");\n\t\tconst right = t(\"Align table to the right with text wrapping\");\n\t\tif (locale.uiLanguageDirection === \"rtl\") return {\n\t\t\tright,\n\t\t\tleft,\n\t\t\tblockRight,\n\t\t\tcenter,\n\t\t\tblockLeft\n\t\t};\n\t\treturn {\n\t\t\tblockLeft,\n\t\t\tcenter,\n\t\t\tblockRight,\n\t\t\tleft,\n\t\t\tright\n\t\t};\n\t}\n};\nfunction isBorderStyleSet(value) {\n\treturn value !== \"none\";\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 table/tableproperties/tablepropertiesui\n*/\nconst ERROR_TEXT_TIMEOUT = 500;\nconst propertyToCommandMap = {\n\tborderStyle: \"tableBorderStyle\",\n\tborderColor: \"tableBorderColor\",\n\tborderWidth: \"tableBorderWidth\",\n\tbackgroundColor: \"tableBackgroundColor\",\n\twidth: \"tableWidth\",\n\theight: \"tableHeight\",\n\talignment: \"tableAlignment\"\n};\n/**\n* The table properties UI plugin. It introduces the `'tableProperties'` button\n* that opens a form allowing to specify visual styling of an entire table.\n*\n* It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n*/\nvar TablePropertiesUI = class extends Plugin {\n\t/**\n\t* The default table properties.\n\t*/\n\t_defaultContentTableProperties;\n\t/**\n\t* The default layout table properties.\n\t*/\n\t_defaultLayoutTableProperties;\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* The properties form view displayed inside the balloon.\n\t*/\n\tview = null;\n\t/**\n\t* The properties form view displayed inside the balloon (content table).\n\t*/\n\t_viewWithContentTableDefaults = null;\n\t/**\n\t* The properties form view displayed inside the balloon (layout table).\n\t*/\n\t_viewWithLayoutTableDefaults = null;\n\t/**\n\t* The batch used to undo all changes made by the form (which are live, as the user types)\n\t* when \"Cancel\" was pressed. Each time the view is shown, a new batch is created.\n\t*/\n\t_undoStepBatch;\n\t/**\n\t* Flag used to indicate whether view is ready to execute update commands\n\t* (it finished loading initial data).\n\t*/\n\t_isReady;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TablePropertiesUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"table.tableProperties\", {\n\t\t\tborderColors: defaultColors,\n\t\t\tbackgroundColors: defaultColors\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tthis._defaultContentTableProperties = getNormalizedDefaultTableProperties(editor.config.get(\"table.tableProperties.defaultProperties\"), { includeAlignmentProperty: true });\n\t\tthis._defaultLayoutTableProperties = getNormalizedDefaultProperties();\n\t\tthis._balloon = editor.plugins.get(ContextualBalloon);\n\t\teditor.ui.componentFactory.add(\"tableProperties\", () => this._createTablePropertiesButton());\n\t}\n\t/**\n\t* Creates the table properties button.\n\t*\n\t* @internal\n\t*/\n\t_createTablePropertiesButton() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst view = new ButtonView(editor.locale);\n\t\tview.set({\n\t\t\tlabel: t(\"Table properties\"),\n\t\t\ticon: IconTableProperties,\n\t\t\ttooltip: true\n\t\t});\n\t\tthis.listenTo(view, \"execute\", () => this._showView());\n\t\tconst commands = Object.values(propertyToCommandMap).map((commandName) => editor.commands.get(commandName));\n\t\tview.bind(\"isEnabled\").toMany(commands, \"isEnabled\", (...areEnabled) => areEnabled.some((isCommandEnabled) => isCommandEnabled));\n\t\treturn view;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this.view) this.view.destroy();\n\t}\n\t/**\n\t* Creates the {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView} instance.\n\t*\n\t* @returns The table properties form view instance.\n\t*/\n\t_createPropertiesView(defaultTableProperties) {\n\t\tconst editor = this.editor;\n\t\tconst config = editor.config.get(\"table.tableProperties\");\n\t\tconst borderColorsConfig = normalizeColorOptions(config.borderColors);\n\t\tconst localizedBorderColors = getLocalizedColorOptions(editor.locale, borderColorsConfig);\n\t\tconst backgroundColorsConfig = normalizeColorOptions(config.backgroundColors);\n\t\tconst localizedBackgroundColors = getLocalizedColorOptions(editor.locale, backgroundColorsConfig);\n\t\tconst hasColorPicker = config.colorPicker !== false;\n\t\tconst view = new TablePropertiesView(editor.locale, {\n\t\t\tborderColors: localizedBorderColors,\n\t\t\tbackgroundColors: localizedBackgroundColors,\n\t\t\tdefaultTableProperties,\n\t\t\tcolorPickerConfig: hasColorPicker ? config.colorPicker || {} : false\n\t\t});\n\t\tconst t = editor.t;\n\t\tview.render();\n\t\tthis.listenTo(view, \"submit\", () => {\n\t\t\tthis._hideView();\n\t\t});\n\t\tthis.listenTo(view, \"cancel\", () => {\n\t\t\tif (this._undoStepBatch.operations.length) editor.execute(\"undo\", this._undoStepBatch);\n\t\t\tthis._hideView();\n\t\t});\n\t\tview.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tthis._hideView();\n\t\t\tcancel();\n\t\t});\n\t\tclickOutsideHandler({\n\t\t\temitter: view,\n\t\t\tactivator: () => this._isViewInBalloon,\n\t\t\tcontextElements: [this._balloon.view.element],\n\t\t\tcallback: () => this._hideView()\n\t\t});\n\t\tconst colorErrorText = getLocalizedColorErrorText(t);\n\t\tconst lengthErrorText = getLocalizedLengthErrorText(t);\n\t\tview.on(\"change:borderStyle\", this._getPropertyChangeCallback(\"tableBorderStyle\"));\n\t\tview.on(\"change:borderColor\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.borderColorInput,\n\t\t\tcommandName: \"tableBorderColor\",\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t}));\n\t\tview.on(\"change:borderWidth\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.borderWidthInput,\n\t\t\tcommandName: \"tableBorderWidth\",\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lineWidthFieldValidator\n\t\t}));\n\t\tview.on(\"change:backgroundColor\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.backgroundInput,\n\t\t\tcommandName: \"tableBackgroundColor\",\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t}));\n\t\tview.on(\"change:width\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.widthInput,\n\t\t\tcommandName: \"tableWidth\",\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t}));\n\t\tview.on(\"change:height\", this._getValidatedPropertyChangeCallback({\n\t\t\tviewField: view.heightInput,\n\t\t\tcommandName: \"tableHeight\",\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t}));\n\t\tview.on(\"change:alignment\", this._getPropertyChangeCallback(\"tableAlignment\"));\n\t\treturn view;\n\t}\n\t/**\n\t* In this method the \"editor data -> UI\" binding is happening.\n\t*\n\t* When executed, this method obtains selected table property values from various table commands\n\t* and passes them to the {@link #view}.\n\t*\n\t* This way, the UI stays up–to–date with the editor data.\n\t*/\n\t_fillViewFormFromCommandValues() {\n\t\tconst commands = this.editor.commands;\n\t\tconst borderStyleCommand = commands.get(\"tableBorderStyle\");\n\t\tObject.entries(propertyToCommandMap).map(([property, commandName]) => {\n\t\t\tconst propertyKey = property;\n\t\t\tconst defaultValue = this.view === this._viewWithContentTableDefaults ? this._defaultContentTableProperties[propertyKey] || \"\" : this._defaultLayoutTableProperties[propertyKey] || \"\";\n\t\t\treturn [propertyKey, commands.get(commandName).value || defaultValue];\n\t\t}).forEach(([property, value]) => {\n\t\t\tif ((property === \"borderColor\" || property === \"borderWidth\") && borderStyleCommand.value === \"none\") return;\n\t\t\tthis.view.set(property, value);\n\t\t});\n\t\tthis._isReady = true;\n\t}\n\t/**\n\t* Shows the {@link #view} in the {@link #_balloon}.\n\t*\n\t* **Note**: Each time a view is shown, the new {@link #_undoStepBatch} is created that contains\n\t* all changes made to the document when the view is visible, allowing a single undo step\n\t* for all of them.\n\t*/\n\t_showView() {\n\t\tconst editor = this.editor;\n\t\tconst viewTable = getSelectionAffectedTableWidget(editor.editing.view.document.selection);\n\t\tconst modelTable = viewTable && editor.editing.mapper.toModelElement(viewTable);\n\t\tconst useDefaults = !modelTable || modelTable.getAttribute(\"tableType\") !== \"layout\";\n\t\tif (useDefaults && !this._viewWithContentTableDefaults) this._viewWithContentTableDefaults = this._createPropertiesView(this._defaultContentTableProperties);\n\t\telse if (!useDefaults && !this._viewWithLayoutTableDefaults) this._viewWithLayoutTableDefaults = this._createPropertiesView(this._defaultLayoutTableProperties);\n\t\tthis.view = useDefaults ? this._viewWithContentTableDefaults : this._viewWithLayoutTableDefaults;\n\t\tthis.listenTo(editor.ui, \"update\", () => {\n\t\t\tthis._updateView();\n\t\t});\n\t\tthis._fillViewFormFromCommandValues();\n\t\tthis._balloon.add({\n\t\t\tview: this.view,\n\t\t\tposition: getBalloonTablePositionData(editor)\n\t\t});\n\t\tthis._undoStepBatch = editor.model.createBatch();\n\t\tthis.view.focus();\n\t}\n\t/**\n\t* Removes the {@link #view} from the {@link #_balloon}.\n\t*/\n\t_hideView() {\n\t\tconst editor = this.editor;\n\t\tthis.stopListening(editor.ui, \"update\");\n\t\tthis._isReady = false;\n\t\tthis.view.saveButtonView.focus();\n\t\tthis._balloon.remove(this.view);\n\t\tthis.editor.editing.view.focus();\n\t}\n\t/**\n\t* Repositions the {@link #_balloon} or hides the {@link #view} if a table is no longer selected.\n\t*/\n\t_updateView() {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\t\tif (!getSelectionAffectedTableWidget(viewDocument.selection)) this._hideView();\n\t\telse if (this._isViewVisible) repositionContextualBalloon(editor, \"table\");\n\t}\n\t/**\n\t* Returns `true` when the {@link #view} is the visible in the {@link #_balloon}.\n\t*/\n\tget _isViewVisible() {\n\t\treturn !!this.view && this._balloon.visibleView === this.view;\n\t}\n\t/**\n\t* Returns `true` when the {@link #view} is in the {@link #_balloon}.\n\t*/\n\tget _isViewInBalloon() {\n\t\treturn !!this.view && this._balloon.hasView(this.view);\n\t}\n\t/**\n\t* Creates a callback that when executed upon {@link #view view's} property change\n\t* executes a related editor command with the new property value.\n\t*\n\t* If new value will be set to the default value, the command will not be executed.\n\t*\n\t* @param commandName The command that will be executed.\n\t*/\n\t_getPropertyChangeCallback(commandName) {\n\t\treturn (evt, propertyName, newValue) => {\n\t\t\tif (!this._isReady) return;\n\t\t\tthis.editor.execute(commandName, {\n\t\t\t\tvalue: newValue,\n\t\t\t\tbatch: this._undoStepBatch\n\t\t\t});\n\t\t};\n\t}\n\t/**\n\t* Creates a callback that when executed upon {@link #view view's} property change:\n\t* * executes a related editor command with the new property value if the value is valid,\n\t* * or sets the error text next to the invalid field, if the value did not pass the validation.\n\t*/\n\t_getValidatedPropertyChangeCallback(options) {\n\t\tconst { commandName, viewField, validator, errorText } = options;\n\t\tconst setErrorTextDebounced = debounce(() => {\n\t\t\tviewField.errorText = errorText;\n\t\t}, ERROR_TEXT_TIMEOUT);\n\t\treturn (evt, propertyName, newValue) => {\n\t\t\tsetErrorTextDebounced.cancel();\n\t\t\tif (!this._isReady) return;\n\t\t\tif (validator(newValue)) {\n\t\t\t\tthis.editor.execute(commandName, {\n\t\t\t\t\tvalue: newValue,\n\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t});\n\t\t\t\tviewField.errorText = null;\n\t\t\t} else setErrorTextDebounced();\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 table/tableproperties\n*/\n/**\n* The table properties feature. Enables support for setting properties of tables (size, border, background, etc.).\n*\n* Read more in the {@glink features/tables/tables-styling Table and cell styling tools} section.\n* See also the {@link module:table/tablecellproperties~TableCellProperties} plugin.\n*\n* This is a \"glue\" plugin that loads the\n* {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing table properties editing feature} and\n* the {@link module:table/tableproperties/tablepropertiesui~TablePropertiesUI table properties UI feature}.\n*/\nvar TableProperties = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableProperties\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TablePropertiesEditing, TablePropertiesUI];\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* Injects a table caption post-fixer into the model.\n*\n* The role of the table caption post-fixer is to ensure that the table with caption have the correct structure\n* after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n*\n* The correct structure means that:\n*\n* * If there are many caption model element, they are merged into one model.\n* * A final, merged caption model is placed at the end of the table.\n*\n* @internal\n*/\nfunction injectTableCaptionPostFixer(model) {\n\tmodel.document.registerPostFixer((writer) => tableCaptionPostFixer(writer, model));\n}\n/**\n* The table caption post-fixer.\n*/\nfunction tableCaptionPostFixer(writer, model) {\n\tconst changes = model.document.differ.getChanges();\n\tlet wasFixed = false;\n\tfor (const entry of changes) {\n\t\tif (entry.type != \"insert\") continue;\n\t\tconst positionParent = entry.position.parent;\n\t\tif (positionParent.is(\"element\", \"table\") || entry.name == \"table\") {\n\t\t\tconst table = entry.name == \"table\" ? entry.position.nodeAfter : positionParent;\n\t\t\tconst captionsToMerge = Array.from(table.getChildren()).filter((child) => child.is(\"element\", \"caption\"));\n\t\t\tconst firstCaption = captionsToMerge.shift();\n\t\t\tif (!firstCaption) continue;\n\t\t\tfor (const caption of captionsToMerge) {\n\t\t\t\twriter.move(writer.createRangeIn(caption), firstCaption, \"end\");\n\t\t\t\twriter.remove(caption);\n\t\t\t}\n\t\t\tif (firstCaption.nextSibling) {\n\t\t\t\twriter.move(writer.createRangeOn(firstCaption), table, \"end\");\n\t\t\t\twasFixed = true;\n\t\t\t}\n\t\t\twasFixed = !!captionsToMerge.length || wasFixed;\n\t\t}\n\t}\n\treturn wasFixed;\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* Checks if the provided model element is a `table`.\n*\n* @param modelElement Element to check if it is a table.\n* @internal\n*/\nfunction isTable(modelElement) {\n\treturn !!modelElement && modelElement.is(\"element\", \"table\");\n}\n/**\n* Returns the caption model element from a given table element. Returns `null` if no caption is found.\n*\n* @param tableModelElement Table element in which we will try to find a caption element.\n* @internal\n*/\nfunction getCaptionFromTableModelElement(tableModelElement) {\n\tfor (const node of tableModelElement.getChildren()) if (node.is(\"element\", \"caption\")) return node;\n\treturn null;\n}\n/**\n* Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.\n*\n* @param selection The selection checked for caption presence.\n* @internal\n*/\nfunction getCaptionFromModelSelection(selection) {\n\tconst tableElement = getSelectionAffectedTable(selection);\n\tif (!tableElement) return null;\n\treturn getCaptionFromTableModelElement(tableElement);\n}\n/**\n* {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a caption.\n*\n* There are two possible forms of the valid caption:\n*  - A `<figcaption>` element inside a `<figure class=\"table\">` element.\n*  - A `<caption>` inside a <table>.\n*\n* @returns Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element cannot be matched.\n* @internal\n*/\nfunction matchTableCaptionViewElement(element) {\n\tconst parent = element.parent;\n\tif (element.name == \"figcaption\" && parent && parent.is(\"element\", \"figure\") && parent.hasClass(\"table\")) return { name: true };\n\tif (element.name == \"caption\" && parent && parent.is(\"element\", \"table\")) return { name: true };\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 table/tablecaption/toggletablecaptioncommand\n*/\n/**\n* The toggle table caption command.\n*\n* This command is registered by {@link module:table/tablecaption/tablecaptionediting~TableCaptionEditing} as the\n* `'toggleTableCaption'` editor command.\n*\n* Executing this command:\n*\n* * either adds or removes the table caption of a selected table (depending on whether the caption is present or not),\n* * removes the table caption if the selection is anchored in one.\n*\n* ```ts\n* // Toggle the presence of the caption.\n* editor.execute( 'toggleTableCaption' );\n* ```\n*\n* **Note**: You can move the selection to the caption right away as it shows up upon executing this command by using\n* the `focusCaptionOnShow` option:\n*\n* ```ts\n* editor.execute( 'toggleTableCaption', { focusCaptionOnShow: true } );\n* ```\n*/\nvar ToggleTableCaptionCommand = class extends Command {\n\t/**\n\t* @inheritDoc\n\t*/\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst tableElement = getSelectionAffectedTable(editor.model.document.selection);\n\t\tthis.isEnabled = !!tableElement && editor.model.schema.checkChild(tableElement, \"caption\");\n\t\tif (!this.isEnabled) this.value = false;\n\t\telse this.value = !!getCaptionFromTableModelElement(tableElement);\n\t}\n\t/**\n\t* Executes the command.\n\t*\n\t* ```ts\n\t* editor.execute( 'toggleTableCaption' );\n\t* ```\n\t*\n\t* @param options Options for the executed command.\n\t* @param options.focusCaptionOnShow When true and the caption shows up, the selection will be moved into it straight away.\n\t* @fires execute\n\t*/\n\texecute({ focusCaptionOnShow = false } = {}) {\n\t\tthis.editor.model.change((writer) => {\n\t\t\tif (this.value) this._hideTableCaption(writer);\n\t\t\telse this._showTableCaption(writer, focusCaptionOnShow);\n\t\t});\n\t}\n\t/**\n\t* Shows the table caption. Also:\n\t*\n\t* * it attempts to restore the caption content from the `TableCaptionEditing` caption registry,\n\t* * it moves the selection to the caption right away, it the `focusCaptionOnShow` option was set.\n\t*\n\t* @param focusCaptionOnShow Default focus behavior when showing the caption.\n\t*/\n\t_showTableCaption(writer, focusCaptionOnShow) {\n\t\tconst model = this.editor.model;\n\t\tconst tableElement = getSelectionAffectedTable(model.document.selection);\n\t\tconst newCaptionElement = this.editor.plugins.get(\"TableCaptionEditing\")._getSavedCaption(tableElement) || writer.createElement(\"caption\");\n\t\tmodel.insertContent(newCaptionElement, tableElement, \"end\");\n\t\tif (focusCaptionOnShow) writer.setSelection(newCaptionElement, \"in\");\n\t}\n\t/**\n\t* Hides the caption of a selected table (or an table caption the selection is anchored to).\n\t*\n\t* The content of the caption is stored in the `TableCaptionEditing` caption registry to make this\n\t* a reversible action.\n\t*/\n\t_hideTableCaption(writer) {\n\t\tconst model = this.editor.model;\n\t\tconst tableElement = getSelectionAffectedTable(model.document.selection);\n\t\tconst tableCaptionEditing = this.editor.plugins.get(\"TableCaptionEditing\");\n\t\tconst captionElement = getCaptionFromTableModelElement(tableElement);\n\t\ttableCaptionEditing._saveCaption(tableElement, captionElement);\n\t\tmodel.deleteContent(writer.createSelection(captionElement, \"on\"));\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 table/tablecaption/tablecaptionediting\n*/\n/**\n* The table caption editing plugin.\n*/\nvar TableCaptionEditing = class extends Plugin {\n\t/**\n\t* A map that keeps saved JSONified table captions and table model elements they are\n\t* associated with.\n\t*\n\t* To learn more about this system, see {@link #_saveCaption}.\n\t*/\n\t_savedCaptionsMap = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* A map that keeps generated ids for table captions to reuse them if the same caption is rendered again.\n\t*/\n\t_captionIdsMapping = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableCaptionEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst view = editor.editing.view;\n\t\tconst t = editor.t;\n\t\tconst useCaptionElement = editor.config.get(\"table.tableCaption.useCaptionElement\");\n\t\tif (!schema.isRegistered(\"caption\")) schema.register(\"caption\", {\n\t\t\tallowIn: \"table\",\n\t\t\tallowContentOf: \"$block\",\n\t\t\tisLimit: true\n\t\t});\n\t\telse schema.extend(\"caption\", { allowIn: \"table\" });\n\t\teditor.commands.add(\"toggleTableCaption\", new ToggleTableCaptionCommand(this.editor));\n\t\tif (useCaptionElement) editor.plugins.get(\"TableEditing\").registerAdditionalSlot({\n\t\t\tfilter: (element) => element.is(\"element\", \"caption\"),\n\t\t\tpositionOffset: \"end\"\n\t\t});\n\t\teditor.conversion.for(\"upcast\").elementToElement({\n\t\t\tview: matchTableCaptionViewElement,\n\t\t\tmodel: \"caption\"\n\t\t});\n\t\teditor.conversion.for(\"dataDowncast\").elementToElement({\n\t\t\tmodel: \"caption\",\n\t\t\tview: (modelElement, { writer }) => {\n\t\t\t\tif (!isTable(modelElement.parent)) return null;\n\t\t\t\treturn writer.createContainerElement(useCaptionElement ? \"caption\" : \"figcaption\");\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").elementToElement({\n\t\t\tmodel: \"caption\",\n\t\t\tview: (modelElement, { writer }) => {\n\t\t\t\tif (!isTable(modelElement.parent)) return null;\n\t\t\t\tconst captionElement = writer.createEditableElement(useCaptionElement ? \"caption\" : \"figcaption\");\n\t\t\t\twriter.setCustomProperty(\"tableCaption\", true, captionElement);\n\t\t\t\tcaptionElement.placeholder = t(\"Enter table caption\");\n\t\t\t\tenableViewPlaceholder({\n\t\t\t\t\tview,\n\t\t\t\t\telement: captionElement,\n\t\t\t\t\tkeepOnFocus: true\n\t\t\t\t});\n\t\t\t\treturn toWidgetEditable(captionElement, writer);\n\t\t\t}\n\t\t});\n\t\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"insert:table\", (evt, data, { writer, mapper }) => {\n\t\t\t\tconst modelTable = data.item;\n\t\t\t\tconst viewFigure = mapper.toViewElement(modelTable);\n\t\t\t\tif (!viewFigure) return;\n\t\t\t\tconst viewTable = Array.from(viewFigure.getChildren()).find((child) => child.is(\"element\", \"table\"));\n\t\t\t\tif (!viewTable) return;\n\t\t\t\tconst modelCaption = getCaptionFromTableModelElement(modelTable);\n\t\t\t\tif (!modelCaption) {\n\t\t\t\t\twriter.removeAttribute(\"aria-labelledby\", viewTable);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst viewCaption = mapper.toViewElement(modelCaption);\n\t\t\t\tif (!viewCaption) return;\n\t\t\t\tlet captionId;\n\t\t\t\tif (viewCaption.hasAttribute(\"id\")) captionId = viewCaption.getAttribute(\"id\");\n\t\t\t\telse captionId = this._captionIdsMapping.get(modelCaption) ?? `ck-editor__caption_${uid()}`;\n\t\t\t\tthis._captionIdsMapping.set(modelCaption, captionId);\n\t\t\t\twriter.setAttribute(\"id\", captionId, viewCaption);\n\t\t\t\twriter.setAttribute(\"aria-labelledby\", captionId, viewTable);\n\t\t\t}, { priority: \"low\" });\n\t\t});\n\t\tinjectTableCaptionPostFixer(editor.model);\n\t}\n\t/**\n\t* Returns the saved {@link module:engine/model/element~ModelElement#toJSON JSONified} caption\n\t* of a table model element.\n\t*\n\t* See {@link #_saveCaption}.\n\t*\n\t* @internal\n\t* @param tableModelElement The model element the caption should be returned for.\n\t* @returns The model caption element or `null` if there is none.\n\t*/\n\t_getSavedCaption(tableModelElement) {\n\t\tconst jsonObject = this._savedCaptionsMap.get(tableModelElement);\n\t\treturn jsonObject ? ModelElement.fromJSON(jsonObject) : null;\n\t}\n\t/**\n\t* Saves a {@link module:engine/model/element~ModelElement#toJSON JSONified} caption for\n\t* a table element to allow restoring it in the future.\n\t*\n\t* A caption is saved every time it gets hidden. The\n\t* user should be able to restore it on demand.\n\t*\n\t* **Note**: The caption cannot be stored in the table model element attribute because,\n\t* for instance, when the model state propagates to collaborators, the attribute would get\n\t* lost (mainly because it does not convert to anything when the caption is hidden) and\n\t* the states of collaborators' models would de-synchronize causing numerous issues.\n\t*\n\t* See {@link #_getSavedCaption}.\n\t*\n\t* @internal\n\t* @param tableModelElement The model element the caption is saved for.\n\t* @param caption The caption model element to be saved.\n\t*/\n\t_saveCaption(tableModelElement, caption) {\n\t\tthis._savedCaptionsMap.set(tableModelElement, caption.toJSON());\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 table/tablecaption/tablecaptionui\n*/\n/**\n* The table caption UI plugin. It introduces the `'toggleTableCaption'` UI button.\n*/\nvar TableCaptionUI = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableCaptionUI\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst t = editor.t;\n\t\teditor.ui.componentFactory.add(\"toggleTableCaption\", (locale) => {\n\t\t\tconst command = editor.commands.get(\"toggleTableCaption\");\n\t\t\tconst view = new ButtonView(locale);\n\t\t\tview.set({\n\t\t\t\ticon: IconCaption,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t});\n\t\t\tview.bind(\"isOn\", \"isEnabled\").to(command, \"value\", \"isEnabled\");\n\t\t\tview.bind(\"label\").to(command, \"value\", (value) => value ? t(\"Toggle caption off\") : t(\"Toggle caption on\"));\n\t\t\tthis.listenTo(view, \"execute\", () => {\n\t\t\t\teditor.execute(\"toggleTableCaption\", { focusCaptionOnShow: true });\n\t\t\t\tif (command.value) {\n\t\t\t\t\tconst modelCaptionElement = getCaptionFromModelSelection(editor.model.document.selection);\n\t\t\t\t\tconst figcaptionElement = editor.editing.mapper.toViewElement(modelCaptionElement);\n\t\t\t\t\tif (!figcaptionElement) return;\n\t\t\t\t\teditingView.scrollToTheSelection();\n\t\t\t\t\teditingView.change((writer) => {\n\t\t\t\t\t\twriter.addClass(\"table__caption_highlighted\", figcaptionElement);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\teditor.editing.view.focus();\n\t\t\t});\n\t\t\treturn view;\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 table/tablecaption\n*/\n/**\n* The table caption plugin.\n*/\nvar TableCaption = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableCaption\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableCaptionEditing, TableCaptionUI];\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 table/tablescroll/watchers\n*/\n/**\n* Creates a live collection of all `table` model elements present in the document and keeps it\n* up to date as tables are inserted, moved, or removed.\n*\n* @internal\n*/\nfunction watchTableModelElements(model) {\n\tconst tables = new Collection();\n\tmodel.document.on(\"change\", () => {\n\t\tconst documentChanges = model.document.differ.getChanges();\n\t\tconst insertedTables = /* @__PURE__ */ new Set();\n\t\tconst movedTables = /* @__PURE__ */ new Set();\n\t\tfor (const change of documentChanges) if (change.type === \"insert\" && change.name !== \"$text\" && change.position.nodeAfter) {\n\t\t\tconst range = model.createRangeOn(change.position.nodeAfter);\n\t\t\tfor (const item of range.getItems()) {\n\t\t\t\tif (!item.is(\"element\", \"table\")) continue;\n\t\t\t\tif (tables.has(item)) movedTables.add(item);\n\t\t\t\telse insertedTables.add(item);\n\t\t\t}\n\t\t}\n\t\tfor (const table of Array.from(tables)) {\n\t\t\tif (table.root.rootName !== \"$graveyard\") continue;\n\t\t\tinsertedTables.delete(table);\n\t\t\tmovedTables.delete(table);\n\t\t\tif (tables.has(table)) tables.remove(table);\n\t\t}\n\t\tfor (const table of movedTables)\n /* v8 ignore else -- @preserve */\n\t\tif (tables.has(table)) tables.remove(table);\n\t\tif (insertedTables.size || movedTables.size) tables.addMany([...insertedTables, ...movedTables]);\n\t});\n\treturn tables;\n}\n/**\n* Observes the DOM width of every editing root and calls `onResize` whenever any of them changes width.\n* Height-only changes are ignored, since only a root's width can make a table overflow it.\n*\n* @internal\n*/\nfunction watchRootsWidthResize(view, onResize) {\n\tconst { roots } = view.document;\n\tconst observedRoots = /* @__PURE__ */ new Map();\n\tconst lastKnownWidths = /* @__PURE__ */ new Map();\n\tconst attachRoot = (rootName) => {\n\t\tif (observedRoots.has(rootName)) return;\n\t\tconst domRoot = view.getDomRoot(rootName);\n\t\tif (!domRoot) return;\n\t\tconst observer = new ResizeObserver((entries) => {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst width = entry.contentRect.width;\n\t\t\t\tif (lastKnownWidths.get(rootName) === width) continue;\n\t\t\t\tlastKnownWidths.set(rootName, width);\n\t\t\t\tonResize();\n\t\t\t}\n\t\t});\n\t\tobserver.observe(domRoot);\n\t\tobservedRoots.set(rootName, observer);\n\t};\n\tconst detachRoot = (rootName) => {\n\t\tconst observer = observedRoots.get(rootName);\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobservedRoots.delete(rootName);\n\t\t\tlastKnownWidths.delete(rootName);\n\t\t}\n\t};\n\tconst onRootAdd = (evt, viewRoot) => attachRoot(viewRoot.rootName);\n\tconst onRootRemove = (evt, viewRoot) => detachRoot(viewRoot.rootName);\n\tconst attachAllRoots = () => {\n\t\tfor (const root of roots) attachRoot(root.rootName);\n\t};\n\tattachAllRoots();\n\troots.on(\"add\", onRootAdd);\n\troots.on(\"remove\", onRootRemove);\n\tview.on(\"render\", attachAllRoots);\n\treturn () => {\n\t\troots.off(\"add\", onRootAdd);\n\t\troots.off(\"remove\", onRootRemove);\n\t\tview.off(\"render\", attachAllRoots);\n\t\tfor (const observer of observedRoots.values()) observer.disconnect();\n\t\tobservedRoots.clear();\n\t\tlastKnownWidths.clear();\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 table/tablescroll/tablescrollediting\n*/\n/**\n* The table scrolling editing plugin.\n*/\nvar TableScrollEditing = class extends Plugin {\n\t/**\n\t* Used to listen to native DOM events.\n\t*/\n\t_domEmitter = new (DomEmitterMixin())();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableScrollEditing\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableEditing];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\teditor.config.define(\"table.tableScroll.tableTypes\", [\"content\"]);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst { editor } = this;\n\t\tconst tables = watchTableModelElements(editor.model);\n\t\tthis._watchNewTables(tables);\n\t\tthis._watchRootEditables(tables);\n\t\tthis._registerConversion();\n\t\tthis._watchColumnResize();\n\t\tthis._watchFiguresScroll();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._domEmitter.stopListening();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Whether a given table may overflow its container and become horizontally scrollable, and whether\n\t* column/table resizing is allowed to grow it past the container's width.\n\t*\n\t* @internal\n\t*/\n\t_isTableScrollable(table) {\n\t\tif (table.parent !== table.root) return false;\n\t\tconst tableType = table.getAttribute(\"tableType\") || \"content\";\n\t\treturn this.editor.config.get(\"table.tableScroll.tableTypes\").includes(tableType);\n\t}\n\t/**\n\t* Determines whether a table overflows its container and applies the corresponding view state:\n\t* the `ck-table-overflowing` class on the figure, and the actual (possibly container-exceeding)\n\t* width on the inner `<table>` and a sibling `<figcaption>`, if present.\n\t*\n\t* @internal\n\t*/\n\t_updateTableScrollOverflowState(table, tableWidthOverride) {\n\t\tconst { editor } = this;\n\t\tconst containerWidth = getEditableContentWidth(editor, table.root.rootName);\n\t\tif (containerWidth === null) return;\n\t\tconst viewFigure = editor.editing.mapper.toViewElement(table);\n\t\tif (!viewFigure) return;\n\t\tconst viewTable = findChildElement(viewFigure, \"table\");\n\t\tif (!viewTable) return;\n\t\tconst viewFigcaption = findChildElement(viewFigure, \"figcaption\");\n\t\tlet tableWidth = null;\n\t\tlet hasTableWidthSource = false;\n\t\tif (tableWidthOverride !== void 0) {\n\t\t\ttableWidth = tableWidthOverride;\n\t\t\thasTableWidthSource = true;\n\t\t} else if (table.hasAttribute(\"tableWidth\")) {\n\t\t\ttableWidth = table.getAttribute(\"tableWidth\");\n\t\t\thasTableWidthSource = true;\n\t\t}\n\t\tif (!hasTableWidthSource) return;\n\t\tconst isOverflowing = !!tableWidth && this._isTableScrollable(table) && isTableWidthOverflowing(tableWidth, containerWidth);\n\t\tif (isOverflowing) this._scheduleScrollOffsetSync(viewFigure);\n\t\teditor.editing.view.change((writer) => {\n\t\t\tif (isOverflowing) {\n\t\t\t\twriter.removeStyle(\"width\", viewFigure);\n\t\t\t\twriter.addClass(\"ck-table-overflowing\", viewFigure);\n\t\t\t\twriter.setStyle(\"width\", tableWidth, viewTable);\n\t\t\t\tif (viewFigcaption) writer.setStyle(\"width\", tableWidth, viewFigcaption);\n\t\t\t} else {\n\t\t\t\tif (tableWidth) writer.setStyle(\"width\", tableWidth, viewFigure);\n\t\t\t\telse writer.removeStyle(\"width\", viewFigure);\n\t\t\t\tif (viewFigcaption) writer.removeStyle(\"width\", viewFigcaption);\n\t\t\t\twriter.removeClass(\"ck-table-overflowing\", viewFigure);\n\t\t\t\twriter.removeStyle(\"width\", viewTable);\n\t\t\t\twriter.removeStyle(\"--ck-table-scroll-offset\", viewFigure);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Schedules a re-read of the widget figure's actual `scrollLeft` into `--ck-table-scroll-offset`, once\n\t* the render reflecting the change that triggered it has actually happened - see the call site for why\n\t* this can't just read (and force a reflow for) `scrollLeft` immediately instead.\n\t*/\n\t_scheduleScrollOffsetSync(viewFigure) {\n\t\tconst { view } = this.editor.editing;\n\t\tview.once(\"render\", () => {\n\t\t\tconst domFigure = view.domConverter.mapViewToDom(viewFigure);\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (domFigure) view.change((writer) => {\n\t\t\t\twriter.setStyle(\"--ck-table-scroll-offset\", `${domFigure.scrollLeft}px`, viewFigure);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Registers editing-only downcast listeners that keep overflow state in sync.\n\t*/\n\t_registerConversion() {\n\t\tconst { editor } = this;\n\t\teditor.conversion.for(\"editingDowncast\").add((dispatcher) => {\n\t\t\tdispatcher.on(\"attribute:tableWidth:table\", (evt, data) => {\n\t\t\t\tthis._updateTableScrollOverflowState(data.item, data.attributeNewValue);\n\t\t\t}, { priority: \"low\" });\n\t\t\tdispatcher.on(\"attribute:tableType:table\", (evt, data) => {\n\t\t\t\tthis._updateTableScrollOverflowState(data.item);\n\t\t\t}, { priority: \"low\" });\n\t\t\tdispatcher.on(\"insert:caption\", (evt, data) => {\n\t\t\t\tconst modelTable = data.item.parent;\n\t\t\t\tif (modelTable?.is(\"element\", \"table\")) this._updateTableScrollOverflowState(modelTable);\n\t\t\t}, { priority: \"lowest\" });\n\t\t\tdispatcher.on(\"insert:table\", (evt, data) => {\n\t\t\t\tthis._updateTableScrollOverflowState(data.item);\n\t\t\t}, { priority: \"lowest\" });\n\t\t});\n\t}\n\t/**\n\t* Keeps every overflowing table's `--ck-table-scroll-offset` custom property in sync with its\n\t* `scrollLeft`, using a single delegated listener instead of one native listener per table.\n\t*/\n\t_watchFiguresScroll() {\n\t\tconst { editor } = this;\n\t\tconst { view } = editor.editing;\n\t\tconst onScroll = (evt, domEvent) => {\n\t\t\tconst domFigure = domEvent.target;\n\t\t\tif (!domFigure.classList?.contains(\"ck-table-overflowing\")) return;\n\t\t\tconst viewFigure = view.domConverter.mapDomToView(domFigure);\n\t\t\tif (!viewFigure) return;\n\t\t\tview.change((writer) => {\n\t\t\t\twriter.setStyle(\"--ck-table-scroll-offset\", `${domFigure.scrollLeft}px`, viewFigure);\n\t\t\t});\n\t\t};\n\t\tthis._domEmitter.listenTo(global.document, \"scroll\", onScroll, { useCapture: true });\n\t}\n\t/**\n\t* Listen for column resize events and updates proper view element size.\n\t*/\n\t_watchColumnResize() {\n\t\tconst { editor } = this;\n\t\tconst { plugins } = editor;\n\t\tif (!plugins.has(\"TableColumnResizeEditing\")) return;\n\t\tconst columnResizeEditing = plugins.get(\"TableColumnResizeEditing\");\n\t\tthis.listenTo(columnResizeEditing, \"_setResizingTableWidth\", (evt, [, viewFigure, width]) => {\n\t\t\tevt.stop();\n\t\t\tconst modelTable = editor.editing.mapper.toModelElement(viewFigure);\n\t\t\tthis._updateTableScrollOverflowState(modelTable, width);\n\t\t}, { priority: \"high\" });\n\t\tthis.listenTo(columnResizeEditing, \"_getResizingTableWidth\", (evt, [viewFigure]) => {\n\t\t\tevt.stop();\n\t\t\tevt.return = getWidthHoldingElement(viewFigure).getStyle(\"width\");\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Re-evaluates the overflow state of every table whenever the window or an editing root is resized.\n\t*/\n\t_watchRootEditables(tables) {\n\t\tconst { editor } = this;\n\t\tconst recalculateAll = () => {\n\t\t\tconst resizingTable = getCurrentlyResizingTable(editor);\n\t\t\tfor (const table of tables) {\n\t\t\t\tif (table === resizingTable) continue;\n\t\t\t\tthis._updateTableScrollOverflowState(table);\n\t\t\t}\n\t\t};\n\t\tconst throttledRecalculateAll = throttle(recalculateAll, 100);\n\t\tconst stopWatchingRootsResize = watchRootsWidthResize(editor.editing.view, throttledRecalculateAll);\n\t\teditor.ui.view.listenTo(global.window, \"resize\", throttledRecalculateAll);\n\t\teditor.once(\"ready\", recalculateAll);\n\t\tthis.listenTo(editor, \"destroy\", () => {\n\t\t\tthrottledRecalculateAll.cancel();\n\t\t\tstopWatchingRootsResize();\n\t\t});\n\t}\n\t/**\n\t* Evaluates the overflow state of every newly inserted table.\n\t*/\n\t_watchNewTables(tables) {\n\t\tthis.listenTo(tables, \"change\", (evt, data) => {\n\t\t\tfor (const table of data.added) this._updateTableScrollOverflowState(table);\n\t\t});\n\t}\n};\n/**\n* Returns the table for which a column resize is currently in progress, if the\n* `TableColumnResizeEditing` plugin is loaded and such a resize is active.\n*/\nfunction getCurrentlyResizingTable(editor) {\n\tconst { plugins } = editor;\n\tif (!plugins.has(\"TableColumnResizeEditing\")) return null;\n\treturn plugins.get(\"TableColumnResizeEditing\").resizingTable;\n}\n/**\n* Checks if given table width overflows container width.\n*/\nfunction isTableWidthOverflowing(tableWidth, containerWidth) {\n\tif (tableWidth.endsWith(\"%\")) return parseFloat(tableWidth) > 100;\n\tif (tableWidth.endsWith(\"px\")) return parseFloat(tableWidth) > containerWidth;\n\treturn false;\n}\n/**\n* Returns whichever element - the widget's `<figure>` or its inner `<table>` - currently holds the\n* table's actual (possibly container-exceeding) width: the `<table>` while overflowing, the `<figure>`\n* otherwise.\n*/\nfunction getWidthHoldingElement(viewFigure) {\n\treturn viewFigure.hasClass(\"ck-table-overflowing\") ? findChildElement(viewFigure, \"table\") : viewFigure;\n}\n/**\n* Finds a direct child element of `parent` by its name.\n*/\nfunction findChildElement(parent, elementName) {\n\treturn Array.from(parent.getChildren()).find((child) => child.is(\"element\", elementName));\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 table/tablescroll\n*/\nvar TableScroll = class extends Plugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"TableScroll\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [TableScrollEditing];\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 { InsertColumnCommand, InsertRowCommand, InsertTableCommand, InsertTableLayoutCommand, MergeCellCommand, MergeCellsCommand, PlainTableOutput, RemoveColumnCommand, RemoveRowCommand, SelectColumnCommand, SelectRowCommand, SetFooterRowCommand, SetHeaderColumnCommand, SetHeaderRowCommand, SplitCellCommand, Table, TableAlignmentCommand, TableBackgroundColorCommand, TableBorderColorCommand, TableBorderStyleCommand, TableBorderWidthCommand, TableCaption, TableCaptionEditing, TableCaptionUI, TableCellBackgroundColorCommand, TableCellBorderColorCommand, TableCellBorderStyleCommand, TableCellBorderWidthCommand, TableCellHeightCommand, TableCellHorizontalAlignmentCommand, TableCellPaddingCommand, TableCellProperties, TableCellPropertiesEditing, TableCellPropertiesUI, TableCellPropertiesView, TableCellPropertyCommand, TableCellTypeCommand, TableCellVerticalAlignmentCommand, TableCellWidthCommand, TableCellWidthEditing, TableClipboard, TableColumnResize, TableColumnResizeEditing, TableColumnWidthCommand, TableEditing, TableHeightCommand, TableKeyboard, TableLayout, TableLayoutEditing, TableLayoutUI, TableMouse, TableProperties, TablePropertiesEditing, TablePropertiesUI, TablePropertiesView, TablePropertyCommand, TableScroll, TableScrollEditing, TableSelection, TableSlot, TableToolbar, TableTypeCommand, TableUI, TableUtils, TableWalker, TableWidthCommand, TableWidthsCommand, ToggleTableCaptionCommand, InsertTableView as _InsertTableView, COLUMN_MIN_WIDTH_AS_PERCENTAGE as _TABLE_COLUMN_MIN_WIDTH_AS_PERCENTAGE, COLUMN_MIN_WIDTH_IN_PIXELS as _TABLE_COLUMN_MIN_WIDTH_IN_PIXELS, COLUMN_RESIZE_DISTANCE_THRESHOLD as _TABLE_COLUMN_RESIZE_DISTANCE_THRESHOLD, COLUMN_WIDTH_PRECISION as _TABLE_COLUMN_WIDTH_PRECISION, defaultColors as _TABLE_DEFAULT_COLORS, ColorInputView as _TableColorInputView, MouseEventsObserver as _TableMouseEventsObserver, addDefaultUnitToNumericValue as _addDefaultUnitToNumericValue, adjustLastColumnIndex as _adjustLastTableColumnIndex, adjustLastRowIndex as _adjustLastTableRowIndex, clamp as _clamp, colorFieldValidator as _colorTableFieldValidator, convertParagraphInTableCell as _convertParagraphInTableCell, createEmptyTableCell as _createEmptyTableCell, createFilledArray as _createFilledArray, cropTableToDimensions as _cropTableToDimensions, downcastTable as _downcastTable, downcastTableAttribute as _downcastTableAttribute, downcastAttributeToStyle as _downcastTableAttributeToStyle, downcastCell as _downcastTableCell, downcastTableResizedClass as _downcastTableResizedClass, downcastRow as _downcastTableRow, enableProperty as _enableTableCellProperty, ensureParagraphInTableCell as _ensureParagraphInTableCell, fillToolbar as _fillTableOrCellToolbar, getBalloonCellPositionData as _getBalloonTableCellPositionData, getBalloonTablePositionData as _getBalloonTablePositionData, getBorderStyleLabels as _getBorderTableStyleLabels, getChangedResizedTables as _getChangedResizedTables, getDefaultValueAdjusted as _getDefaultTableValueAdjusted, getDomCellOuterWidth as _getDomTableCellOuterWidth, getElementWidthInPixels as _getElementWidthInPixels, getHorizontallyOverlappingCells as _getHorizontallyOverlappingTableCells, getLabeledColorInputCreator as _getLabeledTableColorInputCreator, getLocalizedColorErrorText as _getLocalizedTableColorErrorText, getLocalizedLengthErrorText as _getLocalizedTableLengthErrorText, getNormalizedDefaultProperties as _getNormalizedDefaultTableBaseProperties, getNormalizedDefaultCellProperties as _getNormalizedDefaultTableCellProperties, getNormalizedDefaultTableProperties as _getNormalizedDefaultTableProperties, getSelectedTableWidget as _getSelectedTableWidget, getSelectionAffectedTable as _getSelectionAffectedTable, getSelectionAffectedTableWidget as _getSelectionAffectedTableWidget, getSingleValue as _getTableBorderBoxSingleValue, getCaptionFromTableModelElement as _getTableCaptionFromModelElement, getCaptionFromModelSelection as _getTableCaptionFromModelSelection, getColumnEdgesIndexes as _getTableColumnEdgesIndexes, getTableColumnElements as _getTableColumnElements, getColumnGroupElement as _getTableColumnGroupElement, getColumnMinWidthAsPercentage as _getTableColumnMinWidthAsPercentage, getTableColumnsWidths as _getTableColumnsWidths, getBorderStyleDefinitions as _getTableOrCellBorderStyleDefinitions, getTableWidgetAncestor as _getTableWidgetAncestor, getTableWidthInPixels as _getTableWidthInPixels, getVerticallyOverlappingCells as _getVerticallyOverlappingTableCells, injectTableCaptionPostFixer as _injectTableCaptionPostFixer, injectTableCellParagraphPostFixer as _injectTableCellParagraphPostFixer, injectTableLayoutPostFixer as _injectTableLayoutPostFixer, isSingleParagraphWithoutAttributes as _isSingleTableParagraphWithoutAttributes, isHeadingColumnCell as _isTableHeadingColumnCell, isTable as _isTableModelElement, lengthFieldValidator as _lengthTableFieldValidator, lineWidthFieldValidator as _lineWidthTableFieldValidator, matchTableCaptionViewElement as _matchTableCaptionViewElement, normalizeColumnWidths as _normalizeTableColumnWidths, removeEmptyColumns as _removeEmptyTableColumns, removeEmptyRows as _removeEmptyTableRows, removeEmptyRowsColumns as _removeEmptyTableRowsColumns, repositionContextualBalloon as _repositionTableContextualBalloon, skipEmptyTableRow as _skipEmptyTableRow, splitHorizontally as _splitTableCellHorizontally, splitVertically as _splitTableCellVertically, sumArray as _sumArray, tableCellRefreshHandler as _tableCellRefreshHandler, tableStructureRefreshHandler as _tableStructureRefreshHandler, toPrecision as _toPrecision, translateColSpanAttribute as _translateTableColspanAttribute, trimTableCellIfNeeded as _trimTableCellIfNeeded, upcastStyleToAttribute as _upcastNormalizedTableStyleToAttribute, upcastTable as _upcastTable, upcastBorderStyles as _upcastTableBorderStyles, upcastColgroupElement as _upcastTableColgroupElement, upcastTableFigure as _upcastTableFigure, updateColumnElements as _updateTableColumnElements, updateNumericAttribute as _updateTableNumericAttribute, isTableHeaderCellType };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module table/converters/tableproperties\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type {\n\tConversion,\n\tUpcastConversionApi,\n\tUpcastConversionData,\n\tViewElement,\n\tModelElement,\n\tUpcastElementEvent,\n\tConsumables,\n\tStyleValue,\n\tBoxStyleSides,\n\tDowncastAttributeEvent\n} from '@ckeditor/ckeditor5-engine';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\nconst ALIGN_VALUES_REG_EXP = /^(left|center|right)$/;\nconst FLOAT_VALUES_REG_EXP = /^(left|none|right)$/;\n\n/**\n * Conversion helper for upcasting attributes using normalized styles.\n *\n * @param options.modelAttribute The attribute to set.\n * @param options.styleName The style name to convert.\n * @param options.attributeName The HTML attribute name to convert.\n * @param options.attributeType The HTML attribute type for value normalization.\n * @param options.viewElement The view element name that should be converted.\n * @param options.defaultValue The default value for the specified `modelAttribute`.\n * @param options.shouldUpcast The function which returns `true` if style should be upcasted from this element.\n * @internal\n */\nexport function upcastStyleToAttribute(\n\tconversion: Conversion,\n\toptions: {\n\t\tmodelAttribute: string;\n\t\tstyleName: string;\n\t\tattributeName?: string;\n\t\tattributeType?: 'length' | 'color';\n\t\tviewElement: string | RegExp;\n\t\tdefaultValue: string;\n\t\treduceBoxSides?: boolean;\n\t\tshouldUpcast?: ( viewElement: ViewElement ) => boolean;\n\t}\n): void {\n\tconst {\n\t\tmodelAttribute,\n\t\tstyleName,\n\t\tattributeName,\n\t\tattributeType,\n\t\tviewElement,\n\t\tdefaultValue,\n\t\tshouldUpcast = () => true,\n\t\treduceBoxSides = false\n\t} = options;\n\n\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\tview: {\n\t\t\tname: viewElement,\n\t\t\tstyles: {\n\t\t\t\t[ styleName ]: /[\\s\\S]+/\n\t\t\t}\n\t\t},\n\t\tmodel: {\n\t\t\tkey: modelAttribute,\n\t\t\tvalue: ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => {\n\t\t\t\t// Ignore table elements inside figures and figures without the table class.\n\t\t\t\tif ( !shouldUpcast( viewElement ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted( defaultValue, '', data );\n\n\t\t\t\tconst normalized = viewElement.getNormalizedStyle( styleName ) as BoxStyleSides;\n\t\t\t\tconst value = reduceBoxSides ? reduceBoxSidesValue( normalized ) : normalized;\n\n\t\t\t\tif ( localDefaultValue !== value ) {\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\n\t\t\t\t// Consume the style even if not applied to the element so it won't be processed by other converters.\n\t\t\t\tconversionApi.consumable.consume( viewElement, { styles: styleName } );\n\t\t\t}\n\t\t}\n\t} );\n\n\tif ( attributeName ) {\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: viewElement,\n\t\t\t\tattributes: {\n\t\t\t\t\t[ attributeName ]: /.+/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: modelAttribute,\n\t\t\t\tvalue: ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => {\n\t\t\t\t\t// Convert attributes of table and table cell elements, ignore figure.\n\t\t\t\t\t// Do not convert attribute if related style is set as it has a higher priority.\n\t\t\t\t\t// Do not convert attribute if the element is a table inside a figure with the related style set.\n\t\t\t\t\tif (\n\t\t\t\t\t\tviewElement.name == 'figure' ||\n\t\t\t\t\t\tviewElement.hasStyle( styleName ) ||\n\t\t\t\t\t\tviewElement.name == 'table' && viewElement.parent!.name == 'figure' && viewElement.parent!.hasStyle( styleName )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted( defaultValue, '', data );\n\t\t\t\t\tlet value = viewElement.getAttribute( attributeName );\n\n\t\t\t\t\tif ( value && attributeType == 'length' ) {\n\t\t\t\t\t\tconst parsedValue = parseFloat( value );\n\n\t\t\t\t\t\tif ( isNaN( parsedValue ) ) {\n\t\t\t\t\t\t\tvalue = localDefaultValue;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvalue = parsedValue + ( value.includes( '%' ) ? '%' : 'px' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( localDefaultValue !== value ) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Consume the attribute even if not applied to the element so it won't be processed by other converters.\n\t\t\t\t\tconversionApi.consumable.consume( viewElement, { attributes: attributeName } );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * The style values for border styles.\n *\n * @internal\n */\nexport interface StyleValues {\n\tcolor: string;\n\tstyle: string;\n\twidth: string;\n}\n\n/**\n * Conversion helper for upcasting border styles for view elements.\n *\n * @param editor The editor instance.\n * @param defaultBorder The default border values.\n * @param defaultBorder.color The default `borderColor` value.\n * @param defaultBorder.style The default `borderStyle` value.\n * @param defaultBorder.width The default `borderWidth` value.\n * @internal\n */\nexport function upcastBorderStyles(\n\teditor: Editor,\n\tviewElementName: string,\n\tmodelAttributes: StyleValues,\n\tdefaultBorder: StyleValues\n): void {\n\tconst { conversion } = editor;\n\n\tconversion.for( 'upcast' ).add( dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( `element:${ viewElementName }`, ( evt, data, conversionApi ) => {\n\t\t\tconst { modelRange, viewItem } = data;\n\t\t\t// If the element was not converted by element-to-element converter,\n\t\t\t// we should not try to convert the style. See https://github.com/ckeditor/ckeditor5/issues/8393.\n\t\t\tif ( !modelRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check the most detailed properties. These will be always set directly or\n\t\t\t// when using the \"group\" properties like: `border-(top|right|bottom|left)` or `border`.\n\t\t\tconst stylesToConsume = [\n\t\t\t\t'border-top-width',\n\t\t\t\t'border-top-color',\n\t\t\t\t'border-top-style',\n\t\t\t\t'border-bottom-width',\n\t\t\t\t'border-bottom-color',\n\t\t\t\t'border-bottom-style',\n\t\t\t\t'border-right-width',\n\t\t\t\t'border-right-color',\n\t\t\t\t'border-right-style',\n\t\t\t\t'border-left-width',\n\t\t\t\t'border-left-color',\n\t\t\t\t'border-left-style'\n\t\t\t].filter( styleName => viewItem.hasStyle( styleName ) );\n\n\t\t\tconst viewTable = (\n\t\t\t\tviewItem.is( 'element', 'table' ) ?\n\t\t\t\t\tviewItem :\n\t\t\t\t\tviewItem.findAncestor( 'table' )\n\t\t\t)!;\n\n\t\t\tconst hasTableBorderAttribute = viewTable.hasAttribute( 'border' );\n\n\t\t\tif ( !stylesToConsume.length && !hasTableBorderAttribute ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst matcherPattern = {\n\t\t\t\tstyles: stylesToConsume\n\t\t\t};\n\n\t\t\t// Try to consume appropriate values from consumable values list.\n\t\t\t// The border attribute should be ignored if the styles are already consumed, so it won't be converted to the border width.\n\t\t\tif ( !conversionApi.consumable.test( viewItem, matcherPattern ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst modelElement = first( modelRange.getItems( { shallow: true } ) ) as ModelElement;\n\t\t\tconst tableModelElement = modelElement.findAncestor( 'table', { includeSelf: true } );\n\n\t\t\tlet localDefaultBorder = defaultBorder;\n\n\t\t\tif ( tableModelElement && tableModelElement.getAttribute( 'tableType' ) == 'layout' ) {\n\t\t\t\tlocalDefaultBorder = {\n\t\t\t\t\tstyle: 'none',\n\t\t\t\t\tcolor: '',\n\t\t\t\t\twidth: ''\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconversionApi.consumable.consume( viewItem, matcherPattern );\n\n\t\t\tconst normalizedBorder = {\n\t\t\t\tstyle: viewItem.getNormalizedStyle( 'border-style' ) as BoxStyleSides | undefined,\n\t\t\t\tcolor: viewItem.getNormalizedStyle( 'border-color' ) as BoxStyleSides | undefined,\n\t\t\t\twidth: viewItem.getNormalizedStyle( 'border-width' ) as BoxStyleSides | undefined\n\t\t\t};\n\n\t\t\t// When `border` attribute is present on the table element, it should be converted to the border width,\n\t\t\t// merged with current inline `border-width` styles and then consumed.\n\t\t\tif (\n\t\t\t\thasTableBorderAttribute &&\n\t\t\t\tconversionApi.consumable.test( viewTable, { attributes: 'border' } )\n\t\t\t) {\n\t\t\t\t// If the `border` attribute has no value or has invalid value, it should be treated as `border=\"1\"`.\n\t\t\t\tconst borderValue = parseFloat( viewTable.getAttribute( 'border' ) || '1' );\n\n\t\t\t\t// If the `border` value is invalid (e.g. negative, infinite or non-numeric), it should be treated as `1`.\n\t\t\t\tconst shouldBeOne = Number.isNaN( borderValue ) || !Number.isFinite( borderValue ) || borderValue < 0;\n\n\t\t\t\t// For table cells the `border` attribute should be clamped to 1px as higher values are not rendered in browsers.\n\t\t\t\tconst borderPx = shouldBeOne || viewItem.name != 'table' && borderValue > 1 ?\n\t\t\t\t\t'1px' :\n\t\t\t\t\t`${ borderValue }px`;\n\n\t\t\t\tnormalizedBorder.width = {\n\t\t\t\t\ttop: borderPx,\n\t\t\t\t\tbottom: borderPx,\n\t\t\t\t\tright: borderPx,\n\t\t\t\t\tleft: borderPx,\n\n\t\t\t\t\t...( normalizedBorder.width || {} )\n\t\t\t\t};\n\n\t\t\t\tif ( viewItem.is( 'element', 'table' ) ) {\n\t\t\t\t\tconversionApi.consumable.consume( viewTable, { attributes: 'border' } );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst reducedBorder = {\n\t\t\t\tstyle: reduceBoxSidesValue( normalizedBorder.style ),\n\t\t\t\tcolor: reduceBoxSidesValue( normalizedBorder.color ),\n\t\t\t\twidth: reduceBoxSidesValue( normalizedBorder.width )\n\t\t\t};\n\n\t\t\tif ( reducedBorder.style !== localDefaultBorder.style ) {\n\t\t\t\tconversionApi.writer.setAttribute( modelAttributes.style, reducedBorder.style, modelElement );\n\t\t\t}\n\n\t\t\tif ( reducedBorder.color !== localDefaultBorder.color ) {\n\t\t\t\tconversionApi.writer.setAttribute( modelAttributes.color, reducedBorder.color, modelElement );\n\t\t\t}\n\n\t\t\tif ( reducedBorder.width !== localDefaultBorder.width ) {\n\t\t\t\tconversionApi.writer.setAttribute( modelAttributes.width, reducedBorder.width, modelElement );\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Conversion helper for downcasting an attribute to a style.\n *\n * @internal\n */\nexport function downcastAttributeToStyle(\n\tconversion: Conversion,\n\toptions: {\n\t\tmodelElement: string;\n\t\tmodelAttribute: string;\n\t\tstyleName: string;\n\t}\n): void {\n\tconst { modelElement, modelAttribute, styleName } = options;\n\n\tconversion.for( 'downcast' ).attributeToAttribute( {\n\t\tmodel: {\n\t\t\tname: modelElement,\n\t\t\tkey: modelAttribute\n\t\t},\n\t\tview: modelAttributeValue => ( {\n\t\t\tkey: 'style',\n\t\t\tvalue: {\n\t\t\t\t[ styleName ]: modelAttributeValue\n\t\t\t}\n\t\t} )\n\t} );\n}\n\n/**\n * Conversion helper for downcasting attributes from the model table to a view table (not to `<figure>`).\n *\n * @internal\n */\nexport function downcastTableAttribute(\n\tconversion: Conversion,\n\toptions: {\n\t\tmodelAttribute: string;\n\t\tstyleName: string;\n\t}\n): void {\n\tconst { modelAttribute, styleName } = options;\n\n\tconversion.for( 'downcast' ).add( dispatcher => {\n\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( `attribute:${ modelAttribute }:table`, ( evt, data, conversionApi ) => {\n\t\t\tconst { item, attributeNewValue } = data;\n\t\t\tconst { mapper, writer } = conversionApi;\n\n\t\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst table = Array.from( mapper.toViewElement( item )!.getChildren() )\n\t\t\t\t.find( ( child ): child is ViewElement => child.is( 'element', 'table' ) )!;\n\n\t\t\tif ( attributeNewValue ) {\n\t\t\t\twriter.setStyle( styleName, attributeNewValue as StyleValue, table );\n\t\t\t} else {\n\t\t\t\twriter.removeStyle( styleName, table );\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Returns the default value for table or table cell property adjusted for layout tables.\n *\n * @internal\n */\nexport function getDefaultValueAdjusted(\n\tdefaultValue: string,\n\tlayoutTableDefault: string,\n\tdata: UpcastConversionData<ViewElement>\n): string {\n\tconst modelElement = data.modelRange && first( data.modelRange.getItems( { shallow: true } ) );\n\tconst tableElement = modelElement && modelElement.is( 'element' ) && modelElement.findAncestor( 'table', { includeSelf: true } );\n\n\tif ( tableElement && tableElement.getAttribute( 'tableType' ) === 'layout' ) {\n\t\treturn layoutTableDefault;\n\t}\n\n\treturn defaultValue;\n}\n\n/**\n * Reduces the full top, right, bottom, left object to a single string if all sides are equal.\n * Returns original style otherwise.\n */\nfunction reduceBoxSidesValue( style?: BoxStyleSides ): undefined | string | BoxStyleSides {\n\tif ( !style ) {\n\t\treturn;\n\t}\n\n\tconst sides = [ 'top', 'right', 'bottom', 'left' ] as const;\n\tconst allSidesDefined = sides.every( side => style[ side ] );\n\n\tif ( !allSidesDefined ) {\n\t\treturn style;\n\t}\n\n\tconst topSideStyle = style.top;\n\tconst allSidesEqual = sides.every( side => style[ side ] === topSideStyle );\n\n\tif ( !allSidesEqual ) {\n\t\treturn style;\n\t}\n\n\treturn topSideStyle;\n}\n\n/**\n * Conversion helper for upcasting the `cellpadding` table attribute.\n *\n * @param editor The editor instance.\n * @param viewElementName The view element name that should be converted.\n * @param defaultPadding The default padding value.\n * @internal\n */\nexport function upcastTableCellPaddingAttribute(\n\teditor: Editor,\n\tviewElementName: string,\n\tdefaultPadding?: string\n): void {\n\tconst { conversion } = editor;\n\n\tconversion.for( 'upcast' ).add( dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( `element:${ viewElementName }`, ( evt, data, conversionApi ) => {\n\t\t\tconst { modelRange, viewItem } = data;\n\t\t\t// If the element was not converted by element-to-element converter,\n\t\t\t// we should not try to convert the style. See https://github.com/ckeditor/ckeditor5/issues/8393.\n\t\t\tif ( !modelRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( viewItem.is( 'element', 'table' ) ) {\n\t\t\t\tconversionApi.consumable.consume( viewItem, { attributes: 'cellpadding' } );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewTable = viewItem.findAncestor( 'table' )!;\n\t\t\tconst hasTableCellPaddingAttribute = viewTable.hasAttribute( 'cellpadding' );\n\n\t\t\tif (\n\t\t\t\t!hasTableCellPaddingAttribute ||\n\t\t\t\t!conversionApi.consumable.test( viewTable, { attributes: 'cellpadding' } )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst modelElement = modelRange?.start?.nodeAfter as ModelElement;\n\n\t\t\t// If the `cellpadding` attribute has no value or has invalid value, it should be treated as `cellpadding=\"1\"`.\n\t\t\tconst cellpaddingValue = parseFloat( viewTable.getAttribute( 'cellpadding' ) || '1' );\n\t\t\t// If the `cellpadding` value is invalid (e.g. negative, infinite or non-numeric), it should be treated as `0`.\n\t\t\tconst shouldBeZero = Number.isNaN( cellpaddingValue ) || !Number.isFinite( cellpaddingValue ) || cellpaddingValue < 0;\n\t\t\tconst cellpaddingPx = shouldBeZero ? '0px' : `${ cellpaddingValue }px`;\n\n\t\t\tconst tableCellPaddings = modelElement.getAttribute( 'tableCellPadding' );\n\n\t\t\tif ( !tableCellPaddings ) {\n\t\t\t\tif ( defaultPadding !== cellpaddingPx ) {\n\t\t\t\t\tconversionApi.writer.setAttribute( 'tableCellPadding', cellpaddingPx, modelElement );\n\t\t\t\t}\n\t\t\t} else if ( typeof tableCellPaddings === 'object' ) {\n\t\t\t\tconst normalizedPaddings = {\n\t\t\t\t\t...( defaultPadding !== cellpaddingPx && { top: cellpaddingPx } ),\n\t\t\t\t\t...( defaultPadding !== cellpaddingPx && { right: cellpaddingPx } ),\n\t\t\t\t\t...( defaultPadding !== cellpaddingPx && { bottom: cellpaddingPx } ),\n\t\t\t\t\t...( defaultPadding !== cellpaddingPx && { left: cellpaddingPx } ),\n\n\t\t\t\t\t...tableCellPaddings\n\t\t\t\t};\n\n\t\t\t\tconversionApi.writer.setAttribute( 'tableCellPadding', normalizedPaddings, modelElement );\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t} );\n}\n\n/**\n * Default table alignment options.\n */\nexport const DEFAULT_TABLE_ALIGNMENT_OPTIONS = {\n\tleft: { className: 'table-style-align-left' },\n\tcenter: { className: 'table-style-align-center' },\n\tright: { className: 'table-style-align-right' },\n\tblockLeft: { className: 'table-style-block-align-left' },\n\tblockRight: { className: 'table-style-block-align-right' }\n};\n\n/**\n * Configuration for upcasting table alignment from view to model.\n */\nexport const upcastTableAlignmentConfig: Array<UpcastTableAlignmentConfig> = [\n\t// Support for the `float:*;` CSS definition for the table alignment.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: {\n\t\t\t\tfloat: FLOAT_VALUES_REG_EXP\n\t\t\t}\n\t\t},\n\t\tgetAlign: ( viewElement: ViewElement ): string | undefined => {\n\t\t\tlet align = viewElement.getStyle( 'float' );\n\n\t\t\tif ( align === 'none' ) {\n\t\t\t\talign = 'center';\n\t\t\t}\n\n\t\t\treturn align;\n\t\t},\n\t\tgetConsumables( viewElement: ViewElement ): Consumables {\n\t\t\tconst float = viewElement.getStyle( 'float' );\n\t\t\tconst styles: Array<string> = [ 'float' ];\n\n\t\t\tif ( float === 'left' && viewElement.hasStyle( 'margin-right' ) ) {\n\t\t\t\tstyles.push( 'margin-right' );\n\t\t\t} else if ( float === 'right' && viewElement.hasStyle( 'margin-left' ) ) {\n\t\t\t\tstyles.push( 'margin-left' );\n\t\t\t}\n\n\t\t\treturn { styles };\n\t\t}\n\t},\n\t// Support for the `margin-left:auto; margin-right:auto;` CSS definition for the table alignment.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: {\n\t\t\t\t'margin-left': 'auto',\n\t\t\t\t'margin-right': 'auto'\n\t\t\t}\n\t\t},\n\t\tgetAlign: (): string => 'center',\n\t\tgetConsumables: (): Consumables => {\n\t\t\treturn { styles: [ 'margin-left', 'margin-right' ] };\n\t\t}\n\t},\n\t// Support for the left alignment using CSS classes.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: 'class',\n\t\t\tvalue: 'table-style-align-left'\n\t\t},\n\t\tgetAlign: (): string => 'left',\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.left.className };\n\t\t}\n\t},\n\t// Support for the right alignment using CSS classes.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: 'class',\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.right.className\n\t\t},\n\t\tgetAlign: (): string => 'right',\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.right.className };\n\t\t}\n\t},\n\t// Support for the center alignment using CSS classes.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: 'class',\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.center.className\n\t\t},\n\t\tgetAlign: (): string => 'center',\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.center.className };\n\t\t}\n\t},\n\t// Support for the block alignment left using CSS classes.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: 'class',\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className\n\t\t},\n\t\tgetAlign: (): string => 'blockLeft',\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className };\n\t\t}\n\t},\n\t// Support for the block alignment right using CSS classes.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tkey: 'class',\n\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className\n\t\t},\n\t\tgetAlign: (): string => 'blockRight',\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { classes: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className };\n\t\t}\n\t},\n\t// Support for the block alignment left using margin CSS styles.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: {\n\t\t\t\t'margin-left': '0',\n\t\t\t\t'margin-right': 'auto'\n\t\t\t}\n\t\t},\n\t\tgetAlign: (): string => 'blockLeft',\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { styles: [ 'margin-left', 'margin-right' ] };\n\t\t}\n\t},\n\t// Support for the block alignment right using margin CSS styles.\n\t{\n\t\tview: {\n\t\t\tname: /^(table|figure)$/,\n\t\t\tstyles: {\n\t\t\t\t'margin-left': 'auto',\n\t\t\t\t'margin-right': '0'\n\t\t\t}\n\t\t},\n\t\tgetAlign: (): string => 'blockRight',\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { styles: [ 'margin-left', 'margin-right' ] };\n\t\t}\n\t},\n\t// Support for the `align` attribute as the backward compatibility while pasting from other sources.\n\t{\n\t\tview: {\n\t\t\tname: 'table',\n\t\t\tattributes: {\n\t\t\t\talign: ALIGN_VALUES_REG_EXP\n\t\t\t}\n\t\t},\n\t\tgetAlign: ( viewElement: ViewElement ): string | undefined => viewElement.getAttribute( 'align' ),\n\t\tgetConsumables(): Consumables {\n\t\t\treturn { attributes: 'align' };\n\t\t}\n\t}\n];\n\nexport const downcastTableAlignmentConfig: Record<TableAlignmentValues, { align: string | undefined; style: string; className: string }> = {\n\tcenter: {\n\t\talign: 'center',\n\t\tstyle: 'margin-left: auto; margin-right: auto;',\n\t\tclassName: 'table-style-align-center'\n\t},\n\tleft: {\n\t\talign: 'left',\n\t\tstyle: 'float: left;',\n\t\tclassName: 'table-style-align-left'\n\t},\n\tright: {\n\t\talign: 'right',\n\t\tstyle: 'float: right;',\n\t\tclassName: 'table-style-align-right'\n\t},\n\tblockLeft: {\n\t\talign: undefined,\n\t\tstyle: 'margin-left: 0; margin-right: auto;',\n\t\tclassName: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className\n\t},\n\tblockRight: {\n\t\talign: undefined,\n\t\tstyle: 'margin-left: auto; margin-right: 0;',\n\t\tclassName: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className\n\t}\n};\n\ntype UpcastTableAlignmentConfig = {\n\tview: {\n\t\tname: RegExp | string;\n\t\tstyles?: Record<string, RegExp | string>;\n\t\tattributes?: Record<string, RegExp | string>;\n\t\tkey?: string;\n\t\tvalue?: RegExp | string;\n\t};\n\tgetAlign: ( ( viewElement: ViewElement ) => string | undefined ) | ( () => string );\n\tgetConsumables: ( viewElement: ViewElement ) => Consumables;\n};\n\nexport type TableAlignmentValues = 'left' | 'center' | 'right' | 'blockLeft' | 'blockRight';\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/**\n * @module table/tablewalker\n */\nimport type { ModelElement, ModelPosition } from '@ckeditor/ckeditor5-engine';\n\n// @if CK_DEBUG // import { CKEditorError } from '@ckeditor/ckeditor5-utils/src/ckeditorerror.js';\n\ninterface CellData {\n\tcell: ModelElement;\n\trow: number;\n\tcolumn: number;\n}\n\n/**\n * An object with configuration for `TableWalker`.\n */\nexport interface TableWalkerOptions {\n\n\t/**\n\t * A row index for which this iterator will output cells. Can't be used together with `startRow` and `endRow`.\n\t */\n\trow?: number | null;\n\n\t/**\n\t * A row index from which this iterator should start. Can't be used together with `row`. Default value is 0.\n\t */\n\tstartRow?: number;\n\n\t/**\n\t * A row index at which this iterator should end. Can't be used together with `row`.\n\t */\n\tendRow?: number;\n\n\t/**\n\t * A column index for which this iterator will output cells. Can't be used together with `startColumn` and `endColumn`.\n\t */\n\tcolumn?: number;\n\n\t/**\n\t * A column index from which this iterator should start. Can't be used together with `column`. Default value is 0.\n\t */\n\tstartColumn?: number;\n\n\t/**\n\t * A column index at which this iterator should end. Can't be used together with `column`.\n\t */\n\tendColumn?: number;\n\n\t/**\n\t * Also return values for spanned cells. Default value is false.\n\t */\n\tincludeAllSlots?: boolean;\n}\n\n/**\n * The table iterator class. It allows to iterate over table cells. For each cell the iterator yields\n * {@link module:table/tablewalker~TableSlot} with proper table cell attributes.\n */\nexport class TableWalker implements IterableIterator<TableSlot> {\n\t/**\n\t * The walker's table element.\n\t *\n\t * @internal\n\t */\n\tpublic readonly _table: ModelElement;\n\n\t/**\n\t * A row index from which this iterator will start.\n\t */\n\tprivate readonly _startRow: number | null;\n\n\t/**\n\t * A row index at which this iterator will end.\n\t */\n\tprivate readonly _endRow?: number | null;\n\n\t/**\n\t * If set, the table walker will only output cells from a given column and following ones or cells that overlap them.\n\t */\n\tprivate readonly _startColumn: number;\n\n\t/**\n\t * If set, the table walker will only output cells up to a given column.\n\t */\n\tprivate readonly _endColumn?: number;\n\n\t/**\n\t * Enables output of spanned cells that are normally not yielded.\n\t */\n\tprivate readonly _includeAllSlots: boolean;\n\n\t/**\n\t * Row indexes to skip from the iteration.\n\t */\n\tprivate readonly _skipRows: Set<number>;\n\n\t/**\n\t * The current row index.\n\t *\n\t * @internal\n\t */\n\tpublic _row: number;\n\n\t/**\n\t * The index of the current row element in the table.\n\t *\n\t * @internal\n\t */\n\tpublic _rowIndex: number;\n\n\t/**\n\t * The current column index.\n\t *\n\t * @internal\n\t */\n\tpublic _column: number;\n\n\t/**\n\t * The cell index in a parent row. For spanned cells when {@link #_includeAllSlots} is set to `true`,\n\t * this represents the index of the next table cell.\n\t *\n\t * @internal\n\t */\n\tpublic _cellIndex: number;\n\n\t/**\n\t * Holds a map of spanned cells in a table.\n\t */\n\tprivate readonly _spannedCells: Map<number, Map<number, CellData>>;\n\n\t/**\n\t * Index of the next column where a cell is anchored.\n\t */\n\tprivate _nextCellAtColumn: number;\n\n\t/**\n\t * Indicates whether the iterator jumped to (or close to) the start row, ignoring rows that don't need to be traversed.\n\t */\n\tprivate _jumpedToStartRow = false;\n\n\t/**\n\t * Creates an instance of the table walker.\n\t *\n\t * The table walker iterates internally by traversing the table from row index = 0 and column index = 0.\n\t * It walks row by row and column by column in order to output values defined in the constructor.\n\t * By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,\n\t * pass the `includeAllSlots` option to the constructor.\n\t *\n\t * The most important values of the iterator are column and row indexes of a cell.\n\t *\n\t * See {@link module:table/tablewalker~TableSlot} what values are returned by the table walker.\n\t *\n\t * To iterate over a given row:\n\t *\n\t * ```ts\n\t * const tableWalker = new TableWalker( table, { startRow: 1, endRow: 2 } );\n\t *\n\t * for ( const tableSlot of tableWalker ) {\n\t *   console.log( 'A cell at row', tableSlot.row, 'and column', tableSlot.column );\n\t * }\n\t * ```\n\t *\n\t * For instance the code above for the following table:\n\t *\n\t *  +----+----+----+----+----+----+\n\t *  | 00      | 02 | 03 | 04 | 05 |\n\t *  |         +----+----+----+----+\n\t *  |         | 12      | 14 | 15 |\n\t *  |         +----+----+----+    +\n\t *  |         | 22           |    |\n\t *  |----+----+----+----+----+    +\n\t *  | 30 | 31 | 32 | 33 | 34 |    |\n\t *  +----+----+----+----+----+----+\n\t *\n\t * will log in the console:\n\t *\n\t *  'A cell at row 1 and column 2'\n\t *  'A cell at row 1 and column 4'\n\t *  'A cell at row 1 and column 5'\n\t *  'A cell at row 2 and column 2'\n\t *\n\t * To also iterate over spanned cells:\n\t *\n\t * ```ts\n\t * const tableWalker = new TableWalker( table, { row: 1, includeAllSlots: true } );\n\t *\n\t * for ( const tableSlot of tableWalker ) {\n\t *   console.log( 'Slot at', tableSlot.row, 'x', tableSlot.column, ':', tableSlot.isAnchor ? 'is anchored' : 'is spanned' );\n\t * }\n\t * ```\n\t *\n\t * will log in the console for the table from the previous example:\n\t *\n\t *  'Cell at 1 x 0 : is spanned'\n\t *  'Cell at 1 x 1 : is spanned'\n\t *  'Cell at 1 x 2 : is anchored'\n\t *  'Cell at 1 x 3 : is spanned'\n\t *  'Cell at 1 x 4 : is anchored'\n\t *  'Cell at 1 x 5 : is anchored'\n\t *\n\t * **Note**: Option `row` is a shortcut that sets both `startRow` and `endRow` to the same row.\n\t * (Use either `row` or `startRow` and `endRow` but never together). Similarly the `column` option sets both `startColumn`\n\t * and `endColumn` to the same column (Use either `column` or `startColumn` and `endColumn` but never together).\n\t *\n\t * @param table A table over which the walker iterates.\n\t * @param options An object with configuration.\n\t * @param options.row A row index for which this iterator will output cells. Can't be used together with `startRow` and `endRow`.\n\t * @param options.startRow A row index from which this iterator should start. Can't be used together with `row`. Default value is 0.\n\t * @param options.endRow A row index at which this iterator should end. Can't be used together with `row`.\n\t * @param options.column A column index for which this iterator will output cells.\n\t * Can't be used together with `startColumn` and `endColumn`.\n\t * @param options.startColumn A column index from which this iterator should start.\n\t * Can't be used together with `column`. Default value is 0.\n\t * @param options.endColumn A column index at which this iterator should end. Can't be used together with `column`.\n\t * @param options.includeAllSlots Also return values for spanned cells. Default value is \"false\".\n\t */\n\tconstructor( table: ModelElement, options: TableWalkerOptions = {} ) {\n\t\tthis._table = table;\n\t\tthis._startRow = options.row !== undefined ? options.row : options.startRow || 0;\n\t\tthis._endRow = options.row !== undefined ? options.row : options.endRow;\n\t\tthis._startColumn = options.column !== undefined ? options.column : options.startColumn || 0;\n\t\tthis._endColumn = options.column !== undefined ? options.column : options.endColumn;\n\t\tthis._includeAllSlots = !!options.includeAllSlots;\n\t\tthis._skipRows = new Set();\n\t\tthis._row = 0;\n\t\tthis._rowIndex = 0;\n\t\tthis._column = 0;\n\t\tthis._cellIndex = 0;\n\t\tthis._spannedCells = new Map();\n\t\tthis._nextCellAtColumn = -1;\n\t}\n\n\t/**\n\t * Iterable interface.\n\t */\n\tpublic [ Symbol.iterator ](): IterableIterator<TableSlot> {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Gets the next table walker's value.\n\t *\n\t * @returns The next table walker's value.\n\t */\n\tpublic next(): IteratorResult<TableSlot, undefined> {\n\t\tif ( this._canJumpToStartRow() ) {\n\t\t\tthis._jumpToNonSpannedRowClosestToStartRow();\n\t\t}\n\n\t\tconst row = this._table.getChild( this._rowIndex );\n\n\t\t// Iterator is done when there's no row (table ended) or the row is after `endRow` limit.\n\t\tif ( !row || this._isOverEndRow() ) {\n\t\t\treturn { done: true, value: undefined };\n\t\t}\n\n\t\t// We step over current element when it is not a tableRow instance.\n\t\tif ( !row.is( 'element', 'tableRow' ) ) {\n\t\t\tthis._rowIndex++;\n\n\t\t\treturn this.next();\n\t\t}\n\n\t\tif ( this._isOverEndColumn() ) {\n\t\t\treturn this._advanceToNextRow();\n\t\t}\n\n\t\tlet outValue: IteratorYieldResult<TableSlot> | null = null;\n\n\t\tconst spanData = this._getSpanned();\n\n\t\tif ( spanData ) {\n\t\t\tif ( this._includeAllSlots && !this._shouldSkipSlot() ) {\n\t\t\t\toutValue = this._formatOutValue( spanData.cell, spanData.row, spanData.column );\n\t\t\t}\n\t\t} else {\n\t\t\tconst cell = row.getChild( this._cellIndex ) as ModelElement;\n\n\t\t\tif ( !cell ) {\n\t\t\t\t// If there are no more cells left in row advance to the next row.\n\t\t\t\treturn this._advanceToNextRow();\n\t\t\t}\n\n\t\t\tconst colspan = parseInt( cell.getAttribute( 'colspan' ) as string || '1' );\n\t\t\tconst rowspan = parseInt( cell.getAttribute( 'rowspan' ) as string || '1' );\n\n\t\t\t// Record this cell spans if it's not 1x1 cell.\n\t\t\tif ( colspan > 1 || rowspan > 1 ) {\n\t\t\t\tthis._recordSpans( cell, rowspan, colspan );\n\t\t\t}\n\n\t\t\tif ( !this._shouldSkipSlot() ) {\n\t\t\t\toutValue = this._formatOutValue( cell );\n\t\t\t}\n\n\t\t\tthis._nextCellAtColumn = this._column + colspan;\n\t\t}\n\n\t\t// Advance to the next column before returning value.\n\t\tthis._column++;\n\n\t\tif ( this._column == this._nextCellAtColumn ) {\n\t\t\tthis._cellIndex++;\n\t\t}\n\n\t\t// The current value will be returned only if current row and column are not skipped.\n\t\treturn outValue || this.next();\n\t}\n\n\t/**\n\t * Marks a row to skip in the next iteration. It will also skip cells from the current row if there are any cells from the current row\n\t * to output.\n\t *\n\t * @param row The row index to skip.\n\t */\n\tpublic skipRow( row: number ): void {\n\t\tthis._skipRows.add( row );\n\t}\n\n\t/**\n\t * Advances internal cursor to the next row.\n\t */\n\tprivate _advanceToNextRow() {\n\t\tthis._row++;\n\t\tthis._rowIndex++;\n\t\tthis._column = 0;\n\t\tthis._cellIndex = 0;\n\t\tthis._nextCellAtColumn = -1;\n\n\t\treturn this.next();\n\t}\n\n\t/**\n\t * Checks if the current row is over {@link #_endRow}.\n\t */\n\tprivate _isOverEndRow() {\n\t\t// If #_endRow is defined skip all rows after it.\n\t\treturn this._endRow !== undefined && this._row > this._endRow!;\n\t}\n\n\t/**\n\t * Checks if the current cell is over {@link #_endColumn}\n\t */\n\tprivate _isOverEndColumn() {\n\t\t// If #_endColumn is defined skip all cells after it.\n\t\treturn this._endColumn !== undefined && this._column > this._endColumn;\n\t}\n\n\t/**\n\t * A common method for formatting the iterator's output value.\n\t *\n\t * @param cell The table cell to output.\n\t * @param anchorRow The row index of a cell anchor slot.\n\t * @param anchorColumn The column index of a cell anchor slot.\n\t */\n\tprivate _formatOutValue( cell: ModelElement, anchorRow = this._row, anchorColumn = this._column ): IteratorYieldResult<TableSlot> {\n\t\treturn {\n\t\t\tdone: false,\n\t\t\tvalue: new TableSlot( this, cell, anchorRow, anchorColumn )\n\t\t};\n\t}\n\n\t/**\n\t * Checks if the current slot should be skipped.\n\t */\n\tprivate _shouldSkipSlot(): boolean {\n\t\tconst rowIsMarkedAsSkipped = this._skipRows.has( this._row );\n\t\tconst rowIsBeforeStartRow = this._row < this._startRow!;\n\n\t\tconst columnIsBeforeStartColumn = this._column < this._startColumn;\n\t\tconst columnIsAfterEndColumn = this._endColumn !== undefined && this._column > this._endColumn;\n\n\t\treturn rowIsMarkedAsSkipped || rowIsBeforeStartRow || columnIsBeforeStartColumn || columnIsAfterEndColumn;\n\t}\n\n\t/**\n\t * Returns the cell element that is spanned over the current cell location.\n\t */\n\tprivate _getSpanned(): CellData | null {\n\t\tconst rowMap = this._spannedCells.get( this._row );\n\n\t\t// No spans for given row.\n\t\tif ( !rowMap ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// If spans for given rows has entry for column it means that this location if spanned by other cell.\n\t\treturn rowMap.get( this._column ) || null;\n\t}\n\n\t/**\n\t * Updates spanned cells map relative to the current cell location and its span dimensions.\n\t *\n\t * @param cell A cell that is spanned.\n\t * @param rowspan Cell height.\n\t * @param colspan Cell width.\n\t */\n\tprivate _recordSpans( cell: ModelElement, rowspan: number, colspan: number ) {\n\t\tconst data = {\n\t\t\tcell,\n\t\t\trow: this._row,\n\t\t\tcolumn: this._column\n\t\t};\n\n\t\tfor ( let rowToUpdate = this._row; rowToUpdate < this._row + rowspan; rowToUpdate++ ) {\n\t\t\tfor ( let columnToUpdate = this._column; columnToUpdate < this._column + colspan; columnToUpdate++ ) {\n\t\t\t\tif ( rowToUpdate != this._row || columnToUpdate != this._column ) {\n\t\t\t\t\tthis._markSpannedCell( rowToUpdate, columnToUpdate, data );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Marks the cell location as spanned by another cell.\n\t *\n\t * @param row The row index of the cell location.\n\t * @param column The column index of the cell location.\n\t * @param data A spanned cell details (cell element, anchor row and column).\n\t */\n\tprivate _markSpannedCell( row: number, column: number, data: CellData ) {\n\t\tif ( !this._spannedCells.has( row ) ) {\n\t\t\tthis._spannedCells.set( row, new Map() );\n\t\t}\n\n\t\tconst rowSpans = this._spannedCells.get( row )!;\n\n\t\trowSpans.set( column, data );\n\t}\n\n\t/**\n\t * Checks if part of the table can be skipped.\n\t */\n\tprivate _canJumpToStartRow(): boolean {\n\t\treturn !!this._startRow &&\n\t\t\tthis._startRow > 0 &&\n\t\t\t!this._jumpedToStartRow;\n\t}\n\n\t/**\n\t * Sets the current row to `this._startRow` or the first row before it that has the number of cells\n\t * equal to the number of columns in the table.\n\t *\n\t * Example:\n\t * \t+----+----+----+\n\t *  | 00 | 01 | 02 |\n\t *  |----+----+----+\n\t *  | 10      | 12 |\n\t *  |         +----+\n\t *  |         | 22 |\n\t *  |         +----+\n\t *  |         | 32 | <--- Start row\n\t *  +----+----+----+\n\t *  | 40 | 41 | 42 |\n\t *  +----+----+----+\n\t *\n\t * If the 4th row is a `this._startRow`, this method will:\n\t * 1.) Count the number of columns this table has based on the first row (3 columns in this case).\n\t * 2.) Check if the 4th row contains 3 cells. It doesn't, so go to the row before it.\n\t * 3.) Check if the 3rd row contains 3 cells. It doesn't, so go to the row before it.\n\t * 4.) Check if the 2nd row contains 3 cells. It does, so set the current row to that row.\n\t *\n\t * Setting the current row this way is necessary to let the `next()`  method loop over the cells\n\t * spanning multiple rows or columns and update the `this._spannedCells` property.\n\t */\n\tprivate _jumpToNonSpannedRowClosestToStartRow(): void {\n\t\tconst firstRowLength = this._getRowLength( 0 );\n\n\t\tfor ( let i = this._startRow!; !this._jumpedToStartRow; i-- ) {\n\t\t\tif ( firstRowLength === this._getRowLength( i ) ) {\n\t\t\t\tthis._row = i;\n\t\t\t\tthis._rowIndex = i;\n\t\t\t\tthis._jumpedToStartRow = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a number of columns in a row taking `colspan` into consideration.\n\t */\n\tprivate _getRowLength( rowIndex: number ): number {\n\t\tconst row = this._table.getChild( rowIndex ) as ModelElement;\n\n\t\treturn [ ...row.getChildren() ].reduce( ( cols, row ) => {\n\t\t\treturn cols + parseInt( row.getAttribute( 'colspan' ) as string || '1' );\n\t\t}, 0 );\n\t}\n}\n\n/**\n * An object returned by {@link module:table/tablewalker~TableWalker} when traversing table cells.\n */\nclass TableSlot {\n\t/**\n\t * The current table cell.\n\t */\n\tpublic readonly cell: ModelElement;\n\n\t/**\n\t * The row index of a table slot.\n\t */\n\tpublic readonly row: number;\n\n\t/**\n\t * The column index of a table slot.\n\t */\n\tpublic readonly column: number;\n\n\t/**\n\t * The row index of a cell anchor slot.\n\t */\n\tpublic readonly cellAnchorRow: number;\n\n\t/**\n\t * The column index of a cell anchor slot.\n\t */\n\tpublic readonly cellAnchorColumn: number;\n\n\t/**\n\t * The index of the current cell in the parent row.\n\t */\n\tprivate readonly _cellIndex: number;\n\n\t/**\n\t * The index of the current row element in the table.\n\t */\n\tprivate readonly _rowIndex: number;\n\n\t/**\n\t * The table element.\n\t */\n\tprivate readonly _table: ModelElement;\n\n\t/**\n\t * Creates an instance of the table walker value.\n\t *\n\t * @param tableWalker The table walker instance.\n\t * @param cell The current table cell.\n\t * @param anchorRow The row index of a cell anchor slot.\n\t * @param anchorColumn The column index of a cell anchor slot.\n\t */\n\tconstructor( tableWalker: TableWalker, cell: ModelElement, anchorRow: number, anchorColumn: number ) {\n\t\tthis.cell = cell;\n\t\tthis.row = tableWalker._row;\n\t\tthis.column = tableWalker._column;\n\t\tthis.cellAnchorRow = anchorRow;\n\t\tthis.cellAnchorColumn = anchorColumn;\n\t\tthis._cellIndex = tableWalker._cellIndex;\n\t\tthis._rowIndex = tableWalker._rowIndex;\n\t\tthis._table = tableWalker._table;\n\t}\n\n\t// @if CK_DEBUG // public get isSpanned(): unknown { return throwMissingGetterError( 'isSpanned' ); }\n\t// @if CK_DEBUG // public get colspan(): unknown { return throwMissingGetterError( 'colspan' ); }\n\t// @if CK_DEBUG // public get rowspan(): unknown { return throwMissingGetterError( 'rowspan' ); }\n\t// @if CK_DEBUG // public get cellIndex(): unknown { return throwMissingGetterError( 'cellIndex' ); }\n\n\t/**\n\t * Whether the cell is anchored in the current slot.\n\t */\n\tpublic get isAnchor(): boolean {\n\t\treturn this.row === this.cellAnchorRow && this.column === this.cellAnchorColumn;\n\t}\n\n\t/**\n\t * The width of a cell defined by a `colspan` attribute. If the model attribute is not present, it is set to `1`.\n\t */\n\tpublic get cellWidth(): number {\n\t\treturn parseInt( this.cell.getAttribute( 'colspan' ) as string || '1' );\n\t}\n\n\t/**\n\t * The height of a cell defined by a `rowspan` attribute. If the model attribute is not present, it is set to `1`.\n\t */\n\tpublic get cellHeight(): number {\n\t\treturn parseInt( this.cell.getAttribute( 'rowspan' ) as string || '1' );\n\t}\n\n\t/**\n\t * The index of the current row element in the table.\n\t */\n\tpublic get rowIndex(): number {\n\t\treturn this._rowIndex;\n\t}\n\n\t/**\n\t * Returns the {@link module:engine/model/position~ModelPosition} before the table slot.\n\t */\n\tpublic getPositionBefore(): ModelPosition {\n\t\tconst model = this._table.root.document!.model;\n\n\t\treturn model.createPositionAt( this._table.getChild( this.row ) as ModelElement, this._cellIndex );\n\t}\n}\n\nexport { TableSlot };\n\n/**\n * This `TableSlot`'s getter (property) was removed in CKEditor 5 v20.0.0.\n *\n * Check out the new `TableWalker`'s API in the documentation.\n *\n * @error tableslot-getter-removed\n * @param getterName\n */\n// @if CK_DEBUG // function throwMissingGetterError( getterName: string ): void {\n// @if CK_DEBUG //\t\tthrow new CKEditorError( 'tableslot-getter-removed', null, {\n// @if CK_DEBUG //\t\t\tgetterName\n// @if CK_DEBUG //\t\t} );\n// @if CK_DEBUG // }\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/**\n * @module table/tablecellproperties/tablecellpropertiesutils\n */\n\n/**\n * Type of the table cell.\n */\nexport type TableCellType = 'data' | 'header' | `header-${ 'row' | 'column' }`;\n\n/**\n * Checks if the given cell type represents a header cell.\n *\n * @param cellType The type of the table cell.\n * @returns `true` if the cell type represents a header cell, `false` otherwise.\n */\nexport function isTableHeaderCellType( cellType: TableCellType | undefined ): boolean {\n\treturn (\n\t\tcellType === 'header' ||\n\t\tcellType === 'header-row' ||\n\t\tcellType === 'header-column'\n\t);\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/**\n * @module table/utils/common\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type {\n\tConversion,\n\tModelElement,\n\tModelItem,\n\tModelPosition,\n\tModelSchema,\n\tModelWriter,\n\tModelDocumentSelection\n} from '@ckeditor/ckeditor5-engine';\n\nimport { downcastAttributeToStyle, upcastStyleToAttribute } from '../converters/tableproperties.js';\nimport { type TableUtils } from '../tableutils.js';\nimport { TableWalker } from '../tablewalker.js';\nimport { isTableHeaderCellType, type TableCellType } from '../tablecellproperties/tablecellpropertiesutils.js';\n\n/**\n * A common method to update the numeric value. If a value is the default one, it will be unset.\n *\n * @internal\n * @param key An attribute key.\n * @param value The new attribute value.\n * @param item A model item on which the attribute will be set.\n * @param defaultValue The default attribute value. If a value is lower or equal, it will be unset.\n */\nexport function updateNumericAttribute(\n\tkey: string, value: unknown, item: ModelItem, writer: ModelWriter, defaultValue: unknown = 1\n): void {\n\tif ( value !== undefined && value !== null && defaultValue !== undefined && defaultValue !== null && value > defaultValue ) {\n\t\twriter.setAttribute( key, value, item );\n\t} else {\n\t\twriter.removeAttribute( key, item );\n\t}\n}\n\n/**\n * A common method to create an empty table cell. It creates a proper model structure as a table cell must have at least one block inside.\n *\n * @internal\n * @param writer The model writer.\n * @param insertPosition The position at which the table cell should be inserted.\n * @param attributes The element attributes.\n * @returns Created table cell.\n */\nexport function createEmptyTableCell(\n\twriter: ModelWriter,\n\tinsertPosition: ModelPosition,\n\tattributes: Record<string, unknown> = {}\n): ModelElement {\n\tconst tableCell = writer.createElement( 'tableCell', attributes );\n\n\twriter.insertElement( 'paragraph', tableCell );\n\twriter.insert( tableCell, insertPosition );\n\n\treturn tableCell;\n}\n\n/**\n * Checks if a table cell belongs to the heading column section.\n *\n * @internal\n */\nexport function isHeadingColumnCell( tableUtils: TableUtils, tableCell: ModelElement ): boolean {\n\tconst table = tableCell.parent!.parent as ModelElement;\n\tconst headingColumns = parseInt( table.getAttribute( 'headingColumns' ) as string || '0' );\n\tconst { column } = tableUtils.getCellLocation( tableCell );\n\n\treturn !!headingColumns && column < headingColumns;\n}\n\n/**\n * Enables conversion for an attribute for simple view-model mappings.\n *\n * @internal\n * @param options.defaultValue The default value for the specified `modelAttribute`.\n */\nexport function enableProperty(\n\tschema: ModelSchema,\n\tconversion: Conversion,\n\toptions: {\n\t\tmodelAttribute: string;\n\t\tstyleName: string;\n\t\tattributeName?: string;\n\t\tattributeType?: 'length' | 'color';\n\t\tdefaultValue: string;\n\t\treduceBoxSides?: boolean;\n\t}\n): void {\n\tconst { modelAttribute } = options;\n\n\tschema.extend( 'tableCell', {\n\t\tallowAttributes: [ modelAttribute ]\n\t} );\n\n\tschema.setAttributeProperties( modelAttribute, { isFormatting: true } );\n\n\tupcastStyleToAttribute( conversion, { viewElement: /^(td|th)$/, ...options } );\n\tdowncastAttributeToStyle( conversion, { modelElement: 'tableCell', ...options } );\n}\n\n/**\n * Depending on the position of the selection we either return the table under cursor or look for the table higher in the hierarchy.\n *\n * @internal\n */\nexport function getSelectionAffectedTable( selection: ModelDocumentSelection ): ModelElement {\n\tconst selectedElement = selection.getSelectedElement();\n\n\t// Is the command triggered from the `tableToolbar`?\n\tif ( selectedElement && selectedElement.is( 'element', 'table' ) ) {\n\t\treturn selectedElement;\n\t}\n\n\treturn selection.getFirstPosition()!.findAncestor( 'table' )!;\n}\n\n/**\n * Groups table cells by their parent table.\n *\n * @internal\n */\nexport function groupCellsByTable( tableCells: Array<ModelElement> ): Map<ModelElement, Array<ModelElement>> {\n\tconst tableMap = new Map<ModelElement, Array<ModelElement>>();\n\n\tfor ( const tableCell of tableCells ) {\n\t\tconst table = tableCell.findAncestor( 'table' ) as ModelElement;\n\n\t\tif ( !tableMap.has( table ) ) {\n\t\t\ttableMap.set( table, [] );\n\t\t}\n\n\t\ttableMap.get( table )!.push( tableCell );\n\t}\n\n\treturn tableMap;\n}\n\n/**\n * Checks if all cells in a given row or column are header cells.\n *\n * @internal\n */\nexport function isEntireCellsLineHeader(\n\t{\n\t\ttable,\n\t\trow,\n\t\tcolumn\n\t}: {\n\t\ttable: ModelElement;\n\t\trow?: number;\n\t\tcolumn?: number;\n\t}\n): boolean {\n\tconst tableWalker = new TableWalker( table, { row, column } );\n\n\tfor ( const { cell } of tableWalker ) {\n\t\tconst cellType = cell.getAttribute( 'tableCellType' ) as TableCellType;\n\n\t\tif ( !isTableHeaderCellType( cellType ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Checks whether the `tableCellType` attribute is enabled in the editor schema and the experimental flag is set.\n *\n * @internal\n */\nexport function isTableCellTypeEnabled( editor: Editor ): boolean {\n\treturn editor.model.schema.checkAttribute( 'tableCell', 'tableCellType' );\n}\n\n/**\n * Yields every empty block (typically a `paragraph`) found inside the given table's cells.\n *\n * @internal\n */\nexport function* getEmptyTableCellBlocks( table: ModelElement ): IterableIterator<ModelElement> {\n\tfor ( const row of table.getChildren() ) {\n\t\tif ( !row.is( 'element', 'tableRow' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor ( const cell of row.getChildren() ) {\n\t\t\tif ( !cell.is( 'element', 'tableCell' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor ( const block of cell.getChildren() ) {\n\t\t\t\tif ( block.is( 'element' ) && block.isEmpty ) {\n\t\t\t\t\tyield block as ModelElement;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\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/**\n * @module table/utils/structure\n */\n\nimport type { ModelElement, ModelNode, ModelWriter, ViewElement } from '@ckeditor/ckeditor5-engine';\n\nimport { TableWalker, type TableSlot } from '../tablewalker.js';\nimport { createEmptyTableCell, updateNumericAttribute } from './common.js';\nimport { type TableUtils } from '../tableutils.js';\n\ntype CellAttributes = {\n\trowspan?: number;\n\tcolspan?: number;\n};\n\n/**\n * Returns a cropped table according to given dimensions.\n\n * To return a cropped table that starts at first row and first column and end in third row and column:\n *\n * ```ts\n * const croppedTable = cropTableToDimensions( table, {\n *   startRow: 1,\n *   endRow: 3,\n *   startColumn: 1,\n *   endColumn: 3\n * }, writer );\n * ```\n *\n * Calling the code above for the table below:\n *\n *        0   1   2   3   4                      0   1   2\n *      ┌───┬───┬───┬───┬───┐\n *   0  │ a │ b │ c │ d │ e │\n *      ├───┴───┤   ├───┴───┤                  ┌───┬───┬───┐\n *   1  │ f     │   │ g     │                  │   │   │ g │  0\n *      ├───┬───┴───┼───┬───┤   will return:   ├───┴───┼───┤\n *   2  │ h │ i     │ j │ k │                  │ i     │ j │  1\n *      ├───┤       ├───┤   │                  │       ├───┤\n *   3  │ l │       │ m │   │                  │       │ m │  2\n *      ├───┼───┬───┤   ├───┤                  └───────┴───┘\n *   4  │ n │ o │ p │   │ q │\n *      └───┴───┴───┴───┴───┘\n *\n * @internal\n */\nexport function cropTableToDimensions(\n\tsourceTable: ModelElement,\n\tcropDimensions: {\n\t\tstartRow: number;\n\t\tstartColumn: number;\n\t\tendRow: number;\n\t\tendColumn: number;\n\t},\n\twriter: ModelWriter\n): ModelElement {\n\tconst { startRow, startColumn, endRow, endColumn } = cropDimensions;\n\n\t// Initialize the cropped table element.\n\tconst croppedTable = writer.createElement( 'table' );\n\n\t// Copy table type attribute if present.\n\tconst sourceTableType = sourceTable.getAttribute( 'tableType' );\n\n\tif ( sourceTableType ) {\n\t\twriter.setAttribute( 'tableType', sourceTableType, croppedTable );\n\t}\n\n\t// Create empty table with empty rows equal to crop height.\n\tconst cropHeight = endRow - startRow + 1;\n\n\tfor ( let i = 0; i < cropHeight; i++ ) {\n\t\twriter.insertElement( 'tableRow', croppedTable, 'end' );\n\t}\n\n\tconst tableMap = [ ...new TableWalker( sourceTable, { startRow, endRow, startColumn, endColumn, includeAllSlots: true } ) ];\n\n\t// Iterate over source table slots (including empty - spanned - ones).\n\tfor ( const { row: sourceRow, column: sourceColumn, cell: tableCell, isAnchor, cellAnchorRow, cellAnchorColumn } of tableMap ) {\n\t\t// Row index in cropped table.\n\t\tconst rowInCroppedTable = sourceRow - startRow;\n\t\tconst row = croppedTable.getChild( rowInCroppedTable ) as ModelElement;\n\n\t\t// For empty slots: fill the gap with empty table cell.\n\t\tif ( !isAnchor ) {\n\t\t\t// But fill the gap only if the spanning cell is anchored outside cropped area.\n\t\t\t// In the table from method jsdoc those cells are: \"c\" & \"f\".\n\t\t\tif ( cellAnchorRow < startRow || cellAnchorColumn < startColumn ) {\n\t\t\t\tcreateEmptyTableCell( writer, writer.createPositionAt( row, 'end' ) );\n\t\t\t}\n\t\t}\n\t\t// Otherwise clone the cell with all children and trim if it exceeds cropped area.\n\t\telse {\n\t\t\tconst tableCellCopy = writer.cloneElement( tableCell );\n\n\t\t\twriter.append( tableCellCopy, row );\n\n\t\t\t// Trim table if it exceeds cropped area.\n\t\t\t// In the table from method jsdoc those cells are: \"g\" & \"m\".\n\t\t\ttrimTableCellIfNeeded( tableCellCopy, sourceRow, sourceColumn, endRow, endColumn, writer );\n\t\t}\n\t}\n\n\t// Adjust heading rows & columns in cropped table if crop selection includes headings parts.\n\taddHeadingsToCroppedTable( croppedTable, sourceTable, startRow, startColumn, writer );\n\n\t// Adjust footer rows in cropped table if crop selection includes footer rows.\n\taddFootersToCroppedTable( croppedTable, sourceTable, startRow, endRow, writer );\n\n\treturn croppedTable;\n}\n\n/**\n * Returns slot info of cells that starts above and overlaps a given row.\n *\n * In a table below, passing `overlapRow = 3`\n *\n *     ┌───┬───┬───┬───┬───┐\n *  0  │ a │ b │ c │ d │ e │\n *     │   ├───┼───┼───┼───┤\n *  1  │   │ f │ g │ h │ i │\n *     ├───┤   ├───┼───┤   │\n *  2  │ j │   │ k │ l │   │\n *     │   │   │   ├───┼───┤\n *  3  │   │   │   │ m │ n │  <- overlap row to check\n *     ├───┼───┤   │   ├───│\n *  4  │ o │ p │   │   │ q │\n *     └───┴───┴───┴───┴───┘\n *\n * will return slot info for cells: \"j\", \"f\", \"k\".\n *\n * @internal\n * @param table The table to check.\n * @param overlapRow The index of the row to check.\n * @param startRow row to start analysis. Use it when it is known that the cells above that row will not overlap. Default value is 0.\n */\nexport function getVerticallyOverlappingCells( table: ModelElement, overlapRow: number, startRow: number = 0 ): Array<TableSlot> {\n\tconst cells: Array<TableSlot> = [];\n\n\tconst tableWalker = new TableWalker( table, { startRow, endRow: overlapRow - 1 } );\n\n\tfor ( const slotInfo of tableWalker ) {\n\t\tconst { row, cellHeight } = slotInfo;\n\t\tconst cellEndRow = row + cellHeight - 1;\n\n\t\tif ( row < overlapRow && overlapRow <= cellEndRow ) {\n\t\t\tcells.push( slotInfo );\n\t\t}\n\t}\n\n\treturn cells;\n}\n\n/**\n * Splits the table cell horizontally.\n *\n * @internal\n * @returns Created table cell, if any were created.\n */\nexport function splitHorizontally( tableCell: ModelElement, splitRow: number, writer: ModelWriter ): ModelElement | null {\n\tconst tableRow = tableCell.parent as ModelNode;\n\tconst table = tableRow.parent as ModelElement;\n\tconst rowIndex = tableRow.index!;\n\n\tconst rowspan = parseInt( tableCell.getAttribute( 'rowspan' ) as string );\n\tconst newRowspan = splitRow - rowIndex;\n\n\tconst newCellAttributes: CellAttributes = {};\n\tconst newCellRowSpan = rowspan - newRowspan;\n\n\tif ( newCellRowSpan > 1 ) {\n\t\tnewCellAttributes.rowspan = newCellRowSpan;\n\t}\n\n\tconst colspan = parseInt( tableCell.getAttribute( 'colspan' ) as string || '1' );\n\n\tif ( colspan > 1 ) {\n\t\tnewCellAttributes.colspan = colspan;\n\t}\n\n\tconst startRow = rowIndex;\n\tconst endRow = startRow + newRowspan;\n\tconst tableMap = [ ...new TableWalker( table, { startRow, endRow, includeAllSlots: true } ) ];\n\n\tlet newCell = null;\n\tlet columnIndex;\n\n\tfor ( const tableSlot of tableMap ) {\n\t\tconst { row, column, cell } = tableSlot;\n\n\t\tif ( cell === tableCell && columnIndex === undefined ) {\n\t\t\tcolumnIndex = column;\n\t\t}\n\n\t\tif ( columnIndex !== undefined && columnIndex === column && row === endRow ) {\n\t\t\tnewCell = createEmptyTableCell( writer, tableSlot.getPositionBefore(), newCellAttributes );\n\t\t}\n\t}\n\n\t// Update the rowspan attribute after updating table.\n\tupdateNumericAttribute( 'rowspan', newRowspan, tableCell, writer );\n\n\treturn newCell;\n}\n\n/**\n * Returns slot info of cells that starts before and overlaps a given column.\n *\n * In a table below, passing `overlapColumn = 3`\n *\n *    0   1   2   3   4\n *  ┌───────┬───────┬───┐\n *  │ a     │ b     │ c │\n *  │───┬───┴───────┼───┤\n *  │ d │ e         │ f │\n *  ├───┼───┬───────┴───┤\n *  │ g │ h │ i         │\n *  ├───┼───┼───┬───────┤\n *  │ j │ k │ l │ m     │\n *  ├───┼───┴───┼───┬───┤\n *  │ n │ o     │ p │ q │\n *  └───┴───────┴───┴───┘\n *                ^\n *                Overlap column to check\n *\n * will return slot info for cells: \"b\", \"e\", \"i\".\n *\n * @internal\n * @param table The table to check.\n * @param overlapColumn The index of the column to check.\n */\nexport function getHorizontallyOverlappingCells( table: ModelElement, overlapColumn: number ): Array<TableSlot> {\n\tconst cellsToSplit = [];\n\n\tconst tableWalker = new TableWalker( table );\n\n\tfor ( const slotInfo of tableWalker ) {\n\t\tconst { column, cellWidth } = slotInfo;\n\t\tconst cellEndColumn = column + cellWidth - 1;\n\n\t\tif ( column < overlapColumn && overlapColumn <= cellEndColumn ) {\n\t\t\tcellsToSplit.push( slotInfo );\n\t\t}\n\t}\n\n\treturn cellsToSplit;\n}\n\n/**\n * Splits the table cell vertically.\n *\n * @internal\n * @param columnIndex The table cell column index.\n * @param splitColumn The index of column to split cell on.\n * @returns Created table cell.\n */\nexport function splitVertically( tableCell: ModelElement, columnIndex: number, splitColumn: number, writer: ModelWriter ): ModelElement {\n\tconst colspan = parseInt( tableCell.getAttribute( 'colspan' ) as string );\n\tconst newColspan = splitColumn - columnIndex;\n\n\tconst newCellAttributes: CellAttributes = {};\n\tconst newCellColSpan = colspan - newColspan;\n\n\tif ( newCellColSpan > 1 ) {\n\t\tnewCellAttributes.colspan = newCellColSpan;\n\t}\n\n\tconst rowspan = parseInt( tableCell.getAttribute( 'rowspan' ) as string || '1' );\n\n\tif ( rowspan > 1 ) {\n\t\tnewCellAttributes.rowspan = rowspan;\n\t}\n\n\tconst newCell = createEmptyTableCell( writer, writer.createPositionAfter( tableCell ), newCellAttributes );\n\n\t// Update the colspan attribute after updating table.\n\tupdateNumericAttribute( 'colspan', newColspan, tableCell, writer );\n\n\treturn newCell;\n}\n\n/**\n * Adjusts table cell dimensions to not exceed limit row and column.\n *\n * If table cell width (or height) covers a column (or row) that is after a limit column (or row)\n * this method will trim \"colspan\" (or \"rowspan\") attribute so the table cell will fit in a defined limits.\n *\n * @internal\n */\nexport function trimTableCellIfNeeded(\n\ttableCell: ModelElement,\n\tcellRow: number,\n\tcellColumn: number,\n\tlimitRow: number,\n\tlimitColumn: number,\n\twriter: ModelWriter\n): void {\n\tconst colspan = parseInt( tableCell.getAttribute( 'colspan' ) as string || '1' );\n\tconst rowspan = parseInt( tableCell.getAttribute( 'rowspan' ) as string || '1' );\n\n\tconst endColumn = cellColumn + colspan - 1;\n\n\tif ( endColumn > limitColumn ) {\n\t\tconst trimmedSpan = limitColumn - cellColumn + 1;\n\n\t\tupdateNumericAttribute( 'colspan', trimmedSpan, tableCell, writer, 1 );\n\t}\n\n\tconst endRow = cellRow + rowspan - 1;\n\n\tif ( endRow > limitRow ) {\n\t\tconst trimmedSpan = limitRow - cellRow + 1;\n\n\t\tupdateNumericAttribute( 'rowspan', trimmedSpan, tableCell, writer, 1 );\n\t}\n}\n\n/**\n * Sets proper heading attributes to a cropped table.\n */\nfunction addHeadingsToCroppedTable(\n\tcroppedTable: ModelElement,\n\tsourceTable: ModelElement,\n\tstartRow: number,\n\tstartColumn: number,\n\twriter: ModelWriter\n) {\n\tconst headingRows = parseInt( sourceTable.getAttribute( 'headingRows' ) as string || '0' );\n\n\tif ( headingRows > 0 ) {\n\t\tconst headingRowsInCrop = headingRows - startRow;\n\t\tupdateNumericAttribute( 'headingRows', headingRowsInCrop, croppedTable, writer, 0 );\n\t}\n\n\tconst headingColumns = parseInt( sourceTable.getAttribute( 'headingColumns' ) as string || '0' );\n\n\tif ( headingColumns > 0 ) {\n\t\tconst headingColumnsInCrop = headingColumns - startColumn;\n\t\tupdateNumericAttribute( 'headingColumns', headingColumnsInCrop, croppedTable, writer, 0 );\n\t}\n}\n\n/**\n * Sets footer row attributes to a cropped table.\n */\nfunction addFootersToCroppedTable(\n\tcroppedTable: ModelElement,\n\tsourceTable: ModelElement,\n\tstartRow: number,\n\tendRow: number,\n\twriter: ModelWriter\n) {\n\tconst maxRows = Array\n\t\t.from( sourceTable.getChildren() )\n\t\t.reduce( ( count, row ) => row.is( 'element', 'tableRow' ) ? count + 1 : count, 0 );\n\n\tconst footerRows = parseInt( sourceTable.getAttribute( 'footerRows' ) as string || '0' );\n\tconst footerIndex = maxRows - footerRows;\n\n\tif ( footerRows < 1 ) {\n\t\treturn;\n\t}\n\n\tlet footerRowsInCrop = 0;\n\n\tif ( endRow >= footerIndex ) {\n\t\tfooterRowsInCrop = endRow - Math.max( footerIndex, startRow ) + 1;\n\t}\n\n\tupdateNumericAttribute( 'footerRows', footerRowsInCrop, croppedTable, writer, 0 );\n}\n\n/**\n * Removes columns that have no cells anchored.\n *\n * In table below:\n *\n *     +----+----+----+----+----+----+----+\n *     | 00 | 01      | 03 | 04      | 06 |\n *     +----+----+----+----+         +----+\n *     | 10 | 11      | 13 |         | 16 |\n *     +----+----+----+----+----+----+----+\n *     | 20 | 21      | 23 | 24      | 26 |\n *     +----+----+----+----+----+----+----+\n *                  ^--- empty ---^\n *\n * Will remove columns 2 and 5.\n *\n * **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n * To remove a column from a table use {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`}.\n *\n * @internal\n * @returns True if removed some columns.\n */\nexport function removeEmptyColumns( table: ModelElement, tableUtils: TableUtils ): boolean {\n\tconst width = tableUtils.getColumns( table );\n\tconst columnsMap = new Array( width ).fill( 0 );\n\n\tfor ( const { column } of new TableWalker( table ) ) {\n\t\tcolumnsMap[ column ]++;\n\t}\n\n\tconst emptyColumns = columnsMap.reduce( ( result, cellsCount, column ) => {\n\t\treturn cellsCount ? result : [ ...result, column ];\n\t}, [] );\n\n\tif ( emptyColumns.length > 0 ) {\n\t\t// Remove only last empty column because it will recurrently trigger removing empty rows.\n\t\tconst emptyColumn = emptyColumns[ emptyColumns.length - 1 ];\n\n\t\t// @if CK_DEBUG_TABLE // console.log( `Removing empty column: ${ emptyColumn }.` );\n\t\ttableUtils.removeColumns( table, { at: emptyColumn } );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Removes rows that have no cells anchored.\n *\n * In table below:\n *\n *     +----+----+----+\n *     | 00 | 01 | 02 |\n *     +----+----+----+\n *     | 10 | 11 | 12 |\n *     +    +    +    +\n *     |    |    |    | <-- empty\n *     +----+----+----+\n *     | 30 | 31 | 32 |\n *     +----+----+----+\n *     | 40      | 42 |\n *     +         +    +\n *     |         |    | <-- empty\n *     +----+----+----+\n *     | 60 | 61 | 62 |\n *     +----+----+----+\n *\n * Will remove rows 2 and 5.\n *\n * **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n * To remove a row from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`}.\n *\n * @internal\n * @returns True if removed some rows.\n */\nexport function removeEmptyRows( table: ModelElement, tableUtils: TableUtils ): boolean {\n\tconst emptyRows = [];\n\tconst tableRowCount = tableUtils.getRows( table );\n\n\tfor ( let rowIndex = 0; rowIndex < tableRowCount; rowIndex++ ) {\n\t\tconst tableRow = table.getChild( rowIndex ) as ModelElement;\n\n\t\tif ( tableRow.isEmpty ) {\n\t\t\temptyRows.push( rowIndex );\n\t\t}\n\t}\n\n\tif ( emptyRows.length > 0 ) {\n\t\t// Remove only last empty row because it will recurrently trigger removing empty columns.\n\t\tconst emptyRow = emptyRows[ emptyRows.length - 1 ];\n\n\t\t// @if CK_DEBUG_TABLE // console.log( `Removing empty row: ${ emptyRow }.` );\n\t\ttableUtils.removeRows( table, { at: emptyRow } );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Removes rows and columns that have no cells anchored.\n *\n * In table below:\n *\n *     +----+----+----+----+\n *     | 00      | 02      |\n *     +----+----+         +\n *     | 10      |         |\n *     +----+----+----+----+\n *     | 20      | 22 | 23 |\n *     +         +    +    +\n *     |         |    |    | <-- empty row\n *     +----+----+----+----+\n *             ^--- empty column\n *\n * Will remove row 3 and column 1.\n *\n * **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n * To remove a rows from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`} and\n * {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`} to remove a column.\n *\n * @internal\n */\nexport function removeEmptyRowsColumns( table: ModelElement, tableUtils: TableUtils ): void {\n\tconst removedColumns = removeEmptyColumns( table, tableUtils );\n\n\t// If there was some columns removed then cleaning empty rows was already triggered.\n\tif ( !removedColumns ) {\n\t\tremoveEmptyRows( table, tableUtils );\n\t}\n}\n\n/**\n * Returns adjusted last row index if selection covers part of a row with empty slots (spanned by other cells).\n * The `dimensions.lastRow` is equal to last row index but selection might be bigger.\n *\n * This happens *only* on rectangular selection so we analyze a case like this:\n *\n *        +---+---+---+---+\n *      0 | a | b | c | d |\n *        +   +   +---+---+\n *      1 |   | e | f | g |\n *        +   +---+   +---+\n *      2 |   | h |   | i | <- last row, each cell has rowspan = 2,\n *        +   +   +   +   +    so we need to return 3, not 2\n *      3 |   |   |   |   |\n *        +---+---+---+---+\n *\n * @internal\n * @returns Adjusted last row index.\n */\nexport function adjustLastRowIndex(\n\ttable: ModelElement,\n\tdimensions: {\n\t\tfirstRow: number;\n\t\tfirstColumn: number;\n\t\tlastRow: number;\n\t\tlastColumn: number;\n\t}\n): number {\n\tconst lastRowMap = Array.from( new TableWalker( table, {\n\t\tstartColumn: dimensions.firstColumn,\n\t\tendColumn: dimensions.lastColumn,\n\t\trow: dimensions.lastRow\n\t} ) );\n\n\tconst everyCellHasSingleRowspan = lastRowMap.every( ( { cellHeight } ) => cellHeight === 1 );\n\n\t// It is a \"flat\" row, so the last row index is OK.\n\tif ( everyCellHasSingleRowspan ) {\n\t\treturn dimensions.lastRow;\n\t}\n\n\t// Otherwise get any cell's rowspan and adjust the last row index.\n\tconst rowspanAdjustment = lastRowMap[ 0 ].cellHeight - 1;\n\treturn dimensions.lastRow + rowspanAdjustment;\n}\n\n/**\n * Returns adjusted last column index if selection covers part of a column with empty slots (spanned by other cells).\n * The `dimensions.lastColumn` is equal to last column index but selection might be bigger.\n *\n * This happens *only* on rectangular selection so we analyze a case like this:\n *\n *       0   1   2   3\n *     +---+---+---+---+\n *     | a             |\n *     +---+---+---+---+\n *     | b | c | d     |\n *     +---+---+---+---+\n *     | e     | f     |\n *     +---+---+---+---+\n *     | g | h         |\n *     +---+---+---+---+\n *               ^\n *              last column, each cell has colspan = 2, so we need to return 3, not 2\n *\n * @internal\n * @returns Adjusted last column index.\n */\nexport function adjustLastColumnIndex(\n\ttable: ModelElement,\n\tdimensions: {\n\t\tfirstRow: number;\n\t\tfirstColumn: number;\n\t\tlastRow: number;\n\t\tlastColumn: number;\n\t}\n): number {\n\tconst lastColumnMap = Array.from( new TableWalker( table, {\n\t\tstartRow: dimensions.firstRow,\n\t\tendRow: dimensions.lastRow,\n\t\tcolumn: dimensions.lastColumn\n\t} ) );\n\n\tconst everyCellHasSingleColspan = lastColumnMap.every( ( { cellWidth } ) => cellWidth === 1 );\n\n\t// It is a \"flat\" column, so the last column index is OK.\n\tif ( everyCellHasSingleColspan ) {\n\t\treturn dimensions.lastColumn;\n\t}\n\n\t// Otherwise get any cell's colspan and adjust the last column index.\n\tconst colspanAdjustment = lastColumnMap[ 0 ].cellWidth - 1;\n\treturn dimensions.lastColumn + colspanAdjustment;\n}\n\n/**\n * Get view `<table>` element from the wrapper.\n */\nexport function getViewTableFromWrapper( wrapperView: ViewElement ): ViewElement | undefined {\n\tfor ( const wrapperChild of wrapperView.getChildren() ) {\n\t\tif ( wrapperChild.is( 'element', 'table' ) ) {\n\t\t\treturn wrapperChild;\n\t\t}\n\t}\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/**\n * @module table/converters/upcasttable\n */\n\nimport type { ModelElement, UpcastDispatcher, UpcastElementEvent, ViewElement, ViewNode } from '@ckeditor/ckeditor5-engine';\n\nimport { createEmptyTableCell } from '../utils/common.js';\nimport { getViewTableFromWrapper } from '../utils/structure.js';\nimport { first } from '@ckeditor/ckeditor5-utils';\n\n/**\n * Returns a function that converts the table view representation:\n *\n * ```xml\n * <figure class=\"table\"><table>...</table></figure>\n * ```\n *\n * to the model representation:\n *\n * ```xml\n * <table></table>\n * ```\n *\n * @internal\n */\nexport function upcastTableFigure() {\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:figure', ( evt, data, conversionApi ) => {\n\t\t\t// Do not convert if this is not a \"table figure\".\n\t\t\tif ( !conversionApi.consumable.test( data.viewItem, { name: true, classes: 'table' } ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Find a table element inside the figure element.\n\t\t\tconst viewTable = getViewTableFromWrapper( data.viewItem );\n\n\t\t\t// Do not convert if table element is absent or was already converted.\n\t\t\tif ( !viewTable || !conversionApi.consumable.test( viewTable, { name: true } ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Consume the figure to prevent other converters from processing it again.\n\t\t\tconversionApi.consumable.consume( data.viewItem, { name: true, classes: 'table' } );\n\n\t\t\t// Convert view table to model table.\n\t\t\tconst conversionResult = conversionApi.convertItem( viewTable, data.modelCursor );\n\n\t\t\t// When nothing was converted there is no model table to attach the figure's children to.\n\t\t\t/* istanbul ignore if: defensive guard for the `ModelRange | null` return type -- @preserve */\n\t\t\tif ( !conversionResult.modelRange ) {\n\t\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'table' } );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Get table element from conversion result.\n\t\t\tconst modelTable = first( conversionResult.modelRange.getItems() as Iterator<ModelElement> );\n\n\t\t\t// When table wasn't successfully converted then finish conversion.\n\t\t\tif ( !modelTable || !modelTable.is( 'element', 'table' ) ) {\n\t\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'table' } );\n\n\t\t\t\t// If anyway some table content was converted, we have to pass the model range and cursor.\n\t\t\t\tif ( !conversionResult.modelRange.isCollapsed ) {\n\t\t\t\t\tdata.modelRange = conversionResult.modelRange;\n\t\t\t\t\tdata.modelCursor = conversionResult.modelCursor;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconversionApi.convertChildren( data.viewItem, conversionApi.writer.createPositionAt( modelTable, 'end' ) );\n\t\t\tconversionApi.updateConversionResult( modelTable, data );\n\t\t} );\n\t};\n}\n\n/**\n * View table element to model table element conversion helper.\n *\n * This conversion helper converts the table element as well as table rows.\n *\n * @param options Conversion options.\n * @param options.enableFooters If set to `true` the `footerRows` attribute will be upcasted.\n * @returns Conversion helper.\n * @internal\n */\nexport function upcastTable( options: { enableFooters?: boolean } ) {\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:table', ( evt, data, conversionApi ) => {\n\t\t\tconst viewTable = data.viewItem;\n\n\t\t\t// When element was already consumed then skip it.\n\t\t\tif ( !conversionApi.consumable.test( viewTable, { name: true } ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { rows, headingRows, headingColumns, footerRows } = scanTable( viewTable );\n\n\t\t\t// Only set attributes if values is greater then 0.\n\t\t\tconst attributes: { headingColumns?: number; headingRows?: number; footerRows?: number } = {};\n\n\t\t\tif ( headingColumns ) {\n\t\t\t\tattributes.headingColumns = headingColumns;\n\t\t\t}\n\n\t\t\tif ( headingRows ) {\n\t\t\t\tattributes.headingRows = headingRows;\n\t\t\t}\n\n\t\t\tif ( options.enableFooters && footerRows ) {\n\t\t\t\tattributes.footerRows = footerRows;\n\t\t\t}\n\n\t\t\tconst table = conversionApi.writer.createElement( 'table', attributes );\n\n\t\t\tif ( !conversionApi.safeInsert( table, data.modelCursor ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconversionApi.consumable.consume( viewTable, { name: true } );\n\n\t\t\t// Upcast table rows in proper order (heading rows first).\n\t\t\trows.forEach( row => conversionApi.convertItem( row, conversionApi.writer.createPositionAt( table, 'end' ) ) );\n\n\t\t\t// Convert everything else.\n\t\t\tconversionApi.convertChildren( viewTable, conversionApi.writer.createPositionAt( table, 'end' ) );\n\n\t\t\t// Create one row and one table cell for empty table.\n\t\t\tif ( table.isEmpty ) {\n\t\t\t\tconst row = conversionApi.writer.createElement( 'tableRow' );\n\t\t\t\tconversionApi.writer.insert( row, conversionApi.writer.createPositionAt( table, 'end' ) );\n\n\t\t\t\tcreateEmptyTableCell( conversionApi.writer, conversionApi.writer.createPositionAt( row, 'end' ) );\n\t\t\t}\n\n\t\t\tconversionApi.updateConversionResult( table, data );\n\t\t} );\n\t};\n}\n\n/**\n * A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.\n *\n * An empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells\n * and empty TR-s are used to maintain the table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only\n * rows that have related `tableRow` elements).\n *\n * *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue\n * of an improper table with all empty rows.\n *\n * @internal\n * @returns Conversion helper.\n */\nexport function skipEmptyTableRow() {\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:tr', ( evt, data ) => {\n\t\t\tif ( data.viewItem.isEmpty && data.modelCursor.index == 0 ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t};\n}\n\n/**\n * A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.\n *\n * @internal\n * @returns Conversion helper.\n */\nexport function ensureParagraphInTableCell( elementName: string ) {\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>( `element:${ elementName }`, ( evt, data, { writer } ) => {\n\t\t\t// The default converter will create a model range on converted table cell.\n\t\t\tif ( !data.modelRange ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst tableCell = data.modelRange.start.nodeAfter as ModelElement;\n\t\t\tconst modelCursor = writer.createPositionAt( tableCell, 0 );\n\n\t\t\t// Ensure a paragraph in the model for empty table cells for converted table cells.\n\t\t\tif ( data.viewItem.isEmpty ) {\n\t\t\t\twriter.insertElement( 'paragraph', modelCursor );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst childNodes = Array.from( tableCell.getChildren() );\n\n\t\t\t// In case there are only markers inside the table cell then move them to the paragraph.\n\t\t\tif ( childNodes.every( node => node.is( 'element', '$marker' ) ) ) {\n\t\t\t\tconst paragraph = writer.createElement( 'paragraph' );\n\n\t\t\t\twriter.insert( paragraph, writer.createPositionAt( tableCell, 0 ) );\n\n\t\t\t\tfor ( const node of childNodes ) {\n\t\t\t\t\twriter.move( writer.createRangeOn( node ), writer.createPositionAt( paragraph, 'end' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t};\n}\n\n/**\n * Scans table rows and extracts required metadata from the table:\n *\n * headingRows    - The number of rows that go as table headers.\n * headingColumns - The maximum number of row headings.\n * rows           - Sorted `<tr>` elements as they should go into the model - ie. if `<thead>` is inserted after `<tbody>` in the view.\n *\n * @param viewTable The view table element.\n * @returns The table metadata.\n */\nfunction scanTable( viewTable: ViewElement ) {\n\tlet headingColumns: number | undefined = undefined;\n\tlet shouldAccumulateHeadingRows: boolean = true;\n\n\t// The `<tbody>` and `<thead>` sections in the DOM do not have to be in order `<thead>` -> `<tbody>` and there might be more than one\n\t// of them.\n\t// As the model does not have these sections, rows from different sections must be sorted.\n\t// For example, below is a valid HTML table:\n\t//\n\t// <table>\n\t//   <tbody><tr><td>2</td></tr></tbody>\n\t//   <thead><tr><td>1</td></tr></thead>\n\t//   <tbody><tr><td>3</td></tr></tbody>\n\t// </table>\n\t//\n\t// But browsers will render rows in order as: 1 as the heading and 2 and 3 as the body.\n\tconst headRows: Array<ViewElement> = [];\n\tconst bodyRows: Array<ViewElement> = [];\n\tconst footRows: Array<ViewElement> = [];\n\n\t// Currently the editor does not support more then one <thead> section.\n\t// Only the first <thead> from the view will be used as a heading row and the others will be converted to body rows.\n\tlet firstTheadElement: ViewElement | null = null;\n\tlet firstTfoot: { element: ViewElement | null; rows: Array<ViewElement> } | null = null;\n\n\tconst tableChildren = Array.from( viewTable.getChildren() as IterableIterator<ViewElement> );\n\n\tfor ( let childIndex = 0; childIndex < tableChildren.length; childIndex++ ) {\n\t\tconst tableChild = tableChildren[ childIndex ];\n\n\t\t// Only `<thead>`, `<tbody>` & `<tfoot>` from allowed table children can have `<tr>`s.\n\t\t// The else is for future purposes (mainly `<caption>`).\n\t\tif ( tableChild.name !== 'tbody' && tableChild.name !== 'thead' && tableChild.name !== 'tfoot' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Save the first `<thead>` in the table as table header - all other ones will be converted to table body rows.\n\t\tif ( tableChild.name === 'thead' && !firstTheadElement ) {\n\t\t\tshouldAccumulateHeadingRows = true;\n\t\t\tfirstTheadElement = tableChild;\n\t\t}\n\n\t\t// There might be some extra empty text nodes between the `<tr>`s.\n\t\t// Make sure further code operates on `tr`s only. (https://github.com/ckeditor/ckeditor5/issues/145)\n\t\tconst trs = Array.from( tableChild.getChildren() ).filter(\n\t\t\t( el: ViewNode ): el is ViewElement & { name: 'tr' } => el.is( 'element', 'tr' )\n\t\t);\n\n\t\t// Keep tracking of the previous row columns count to improve detection of heading rows.\n\t\tlet maxPrevColumns = null;\n\n\t\t// Let's lazy evaluate whether all preceding rows are footers.\n\t\t// We don't want to perform this check for each row if not needed.\n\t\tlet arePrecedingChildrenFooters: boolean | null = null;\n\n\t\tfor ( const tr of trs ) {\n\t\t\tconst trColumns = Array\n\t\t\t\t.from( tr.getChildren() )\n\t\t\t\t.filter( el => el.is( 'element', 'td' ) || el.is( 'element', 'th' ) );\n\n\t\t\t// There's tricky part. Having multiple `<tfoot>` elements is invalid HTML, However, browsers\n\t\t\t// will handle them anyway and render them at the specific positions in the table (it ignores order of `tfoot` tags).\n\t\t\t//\n\t\t\t// Let's consider the following table:\n\t\t\t//\n\t\t\t// <table>\n\t\t\t//   <tfoot><!-- FOOT-ROW-1 --></tfoot>\n\t\t\t//   <tfoot><!-- FOOT-ROW-2 --></tfoot>\n\t\t\t//   <thead><!-- HEAD-ROW-1 --></thead>\n\t\t\t//   <tbody><!-- BODY-ROW-1 --></tbody>\n\t\t\t//   <tfoot><!-- FOOT-ROW-3 --></tfoot>\n\t\t\t// </table>\n\t\t\t//\n\t\t\t// Browsers tend to use first encountered `<tfoot>` as the actual footer and render it at the bottom of the table. Other\n\t\t\t// `<tfoot>` elements are rendered at the position they appear in the DOM. In other words, the `FOOT-ROW-1` will be\n\t\t\t// rendered after all body rows and `FOOT-ROW-3`.\n\t\t\t//\n\t\t\t// The tricky part is that from the user perspective, `FOOT-ROW-3` and moved to the bottom `FOOT-ROW-1`, are visually\n\t\t\t// the same footer. So we should merge them together into `footRows` array and set proper `footerRows` attribute.\n\t\t\t//\n\t\t\t// The rest of foot rows (`FOOT-ROW-2` in the example) should be treated as normal body rows.\n\t\t\t//\n\t\t\t// The problem is that we iterate over table children in order, so we don't know if there will be another `<tfoot>`\n\t\t\t// later in the table. We'll lazy look ahead to check if all following siblings are `<tfoot>` elements.\n\t\t\tif ( tableChild.name === 'tfoot' ) {\n\t\t\t\tfirstTfoot ||= { element: tableChild, rows: trs };\n\t\t\t\tshouldAccumulateHeadingRows = false;\n\n\t\t\t\t// Fast check - is this the first `<tfoot>` element? If so, then it's definitely a footer row.\n\t\t\t\tconst isFirstTfoot = firstTfoot.element === tableChild;\n\n\t\t\t\t// Slow check - are all preceding rows foot rows?\n\t\t\t\tif ( !isFirstTfoot && arePrecedingChildrenFooters === null ) {\n\t\t\t\t\tfor ( let i = childIndex; i < tableChildren.length; i++ ) {\n\t\t\t\t\t\tarePrecedingChildrenFooters = tableChildren[ i ].name === 'tfoot';\n\n\t\t\t\t\t\tif ( !arePrecedingChildrenFooters ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If it's the first `<tfoot>` we can just put the row in `footRows`.\n\t\t\t\tif ( isFirstTfoot ) {\n\t\t\t\t\tfootRows.push( tr );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// However, if it's not the first `<tfoot>` we need to put it's children before the first row of the first `<tfoot>`.\n\t\t\t\tif ( arePrecedingChildrenFooters !== false ) {\n\t\t\t\t\tfootRows.splice( footRows.length - firstTfoot.rows.length, 0, tr );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// This <tr> is a child of a first <thead> element.\n\t\t\tif (\n\t\t\t\t( firstTheadElement && tableChild === firstTheadElement ) ||\n\t\t\t\t(\n\t\t\t\t\ttableChild.name === 'tbody' &&\n\t\t\t\t\ttrColumns.length > 0 &&\n\t\t\t\t\t// These conditions handles the case when the first column is a <th> element and it's the only column in the row.\n\t\t\t\t\t// This case is problematic because it's not clear if this row should be a heading row or not, as it may be result\n\t\t\t\t\t// of the cell span from the previous row.\n\t\t\t\t\t// Issue: https://github.com/ckeditor/ckeditor5/issues/17556\n\t\t\t\t\t( maxPrevColumns === null || trColumns.length === maxPrevColumns ) &&\n\t\t\t\t\ttrColumns.every( e => e.is( 'element', 'th' ) ) &&\n\t\t\t\t\t// If there is at least one \"normal\" table row between heading rows, then stop accumulating heading rows.\n\t\t\t\t\tshouldAccumulateHeadingRows\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\theadRows.push( tr );\n\t\t\t\tshouldAccumulateHeadingRows = true;\n\t\t\t} else {\n\t\t\t\tbodyRows.push( tr );\n\t\t\t\tshouldAccumulateHeadingRows = false;\n\t\t\t}\n\n\t\t\t// We use the maximum number of columns to avoid false positives when detecting\n\t\t\t// multiple rows with single column within `rowspan`. Without it the last row of `rowspan=3`\n\t\t\t// would be detected as a heading row because it has only one column (identical to the previous row).\n\t\t\tmaxPrevColumns = Math.max( maxPrevColumns || 0, trColumns.length );\n\t\t}\n\t}\n\n\t// Generate the cell matrix so we can calculate the heading columns.\n\tconst bodyMatrix = generateCellMatrix( bodyRows );\n\n\tfor ( const rowSlots of bodyMatrix ) {\n\t\t// Look for the first non-`<th>` entry (either a `<td>` or a missing cell).\n\t\tlet index = 0;\n\n\t\twhile ( index < rowSlots.length ) {\n\t\t\tif ( rowSlots[ index ]?.name !== 'th' ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tindex += 1;\n\t\t}\n\n\t\t// Update headingColumns.\n\t\tif ( headingColumns === undefined || index < headingColumns ) {\n\t\t\theadingColumns = index;\n\t\t}\n\t}\n\n\treturn {\n\t\theadingRows: headRows.length,\n\t\theadingColumns: headingColumns || 0,\n\t\tfooterRows: footRows.length,\n\t\trows: [ ...headRows, ...bodyRows, ...footRows ]\n\t};\n}\n\n/**\n * Takes an array of `<tr>` elements and generates a \"matrix\" (square\n * two-dimensional array) describing which `<th>`s and `<td>`s fill which\n * \"slots\", factoring in `rowspan`s and `colspan`s. For example, given\n *\n * ```xml\n * <table>\n *   <tr> <td>11</td> <td rowspan=\"2\">12-22</td> <td>13</td> </tr>\n *   <tr> <td>21</td> <td>23</td> </tr>\n *   <tr> <td colspan=\"2\">31-32</td> <td>33</rd> </tr>\n * </table>\n * ```\n *\n * The result would be (with cell elements' text content in place of the element\n * objects for readability):\n *\n * ```js\n * [\n *   [ '11', '12-22', '13' ],\n *   [ '21', '12-22', '23' ],\n *   [ '31-32', '31-32', '33' ],\n * ]\n * ```\n *\n * This allows for a computation of heading columns that factors in the case\n * where a cell from a previous rows with a `rowspan` attribute effectively adds\n * an additional header cell to a subsequent row.\n *\n * There are also cases where cells are \"missing\" from a row. A simple one is\n * the case where a row simply has fewer cells than another row in the same\n * table. But another is one where a row has a cell with a `rowspan` that\n * effectively adds a cell to a subsequent row \"off the end\" of the row. In this\n * case, there will be a `null` value instead of an element object in that\n * position. For example,\n *\n * ```xml\n * <table>\n *   <tr> <td>11</td> <td>12</td> <td rowspan=\"2\">13-23</td> </tr>\n *   <tr> <td>21</td> </tr>\n *   <tr> <td>31</td> </tr>\n * </table>\n * ```\n *\n * would result in\n *\n * ```js\n * [\n *   [ '11', '12', '13-23' ],\n *   [ '21', null, '13-23' ],\n *   [ '31', null, null ]\n * ]\n * ```\n *\n * @param trs the array of `<tr>` elements\n * @returns the cell matrix\n */\nfunction generateCellMatrix( trs: Array<ViewElement> ) {\n\t// As we iterate, we keep track of cells with rowspans >1 so later rows can\n\t// factor them in. This trackes any such cells from previous rows.\n\tlet prevRowspans = new Map<number, { cell: ViewElement; remaining: number }>();\n\n\t// This is the maximum number of columns we've encountered.\n\tlet maxColumns = 0;\n\n\tconst slots = trs.map( tr => {\n\t\t// This will be the slots that are in this row, including cells from\n\t\t// previous rows with a big enough \"rowspan\" to affect this row.\n\t\tconst curSlots: Array<ViewElement | null> = [];\n\n\t\t// Get the cell elements\n\t\tconst children = Array.from( tr.getChildren() as IterableIterator<ViewElement> )\n\t\t\t.filter( child => child.name === 'th' || child.name === 'td' );\n\n\t\t// This will be any cells in this row that have a rowspan >1, so we can\n\t\t// combine it with `prevRowspans` when we're done processing this row.\n\t\tconst curRowspans = new Map<number, { cell: ViewElement; remaining: number }>();\n\n\t\t// We need to process all the cells in this row, but also previous rows'\n\t\t// cells with rowspans might add additional slots to the end of this row, so\n\t\t// we need to iterate until we've both consumed all the children _and_\n\t\t// filled out slots to the max number of columns we've encountered so far.\n\t\twhile ( children.length || curSlots.length < maxColumns ) {\n\t\t\tconst rowSpan = prevRowspans.get( curSlots.length );\n\t\t\tif ( rowSpan && rowSpan.remaining > 0 ) {\n\t\t\t\t// We have a cell at this index in a previous row whose rowspan extends\n\t\t\t\t// it into this row, so we insert a copy of it here.\n\t\t\t\tcurSlots.push( rowSpan.cell );\n\t\t\t} else {\n\t\t\t\t// See if we have more cells in the row.\n\t\t\t\tconst cell = children.shift();\n\t\t\t\tif ( cell ) {\n\t\t\t\t\t// We do, so process it\n\t\t\t\t\tconst colspan = parseInt( cell.getAttribute( 'colspan' ) as string || '1' );\n\t\t\t\t\tconst rowspan = parseInt( cell.getAttribute( 'rowspan' ) as string || '1' );\n\n\t\t\t\t\t// Process this cell as many times as needed according to its colspan.\n\t\t\t\t\tfor ( let i = 0; i < colspan; i++ ) {\n\t\t\t\t\t\t// if we have a >1 rowspan, create a record in the rowSpans map for\n\t\t\t\t\t\t// this column index keeping track of it.\n\t\t\t\t\t\tif ( rowspan > 1 ) {\n\t\t\t\t\t\t\tcurRowspans.set( curSlots.length, { cell, remaining: rowspan - 1 } );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurSlots.push( cell );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No remaining children in this row, so no cell in this slot.\n\t\t\t\t\tcurSlots.push( null );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now update the row spans. In weird edge cases where colspan and rowspan\n\t\t// conflict, we can end up with a cell in a column in this row that\n\t\t// \"truncates\" a row-spanning cell from a previous column, so make sure in\n\t\t// those cases, the value in `curRowspans` always \"wins\". We do this by\n\t\t// copying (and decrementing) values from `prevRowspans` into `curRowspans`\n\t\t// as long as there is no conflict, and then re-assigning `prevRowspans`.\n\t\tfor ( const [ index, entry ] of prevRowspans.entries() ) {\n\t\t\tentry.remaining -= 1;\n\t\t\tif ( entry.remaining > 0 && !curRowspans.has( index ) ) {\n\t\t\t\tcurRowspans.set( index, entry );\n\t\t\t}\n\t\t}\n\t\tprevRowspans = curRowspans;\n\n\t\t// Finally, update `maxColumns`.\n\t\tmaxColumns = Math.max( maxColumns, curSlots.length );\n\t\treturn curSlots;\n\t} );\n\n\t// Now expand any rows that have fewer than `maxColumns` with nulls so we have\n\t// a proper matrix.\n\tfor ( const rowSlots of slots ) {\n\t\twhile ( rowSlots.length < maxColumns ) {\n\t\t\trowSlots.push( null );\n\t\t}\n\t}\n\n\treturn slots;\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/**\n * @module table/tablecolumnresize/constants\n */\n\n/**\n * The minimum column width given as a percentage value. Used in situations when the table is not yet rendered, so it is impossible to\n * calculate how many percentage of the table width would be {@link ~COLUMN_MIN_WIDTH_IN_PIXELS minimum column width in pixels}.\n *\n * @internal\n */\nexport const COLUMN_MIN_WIDTH_AS_PERCENTAGE = 5;\n\n/**\n * The minimum column width in pixels when the maximum table width is known.\n * This value is an equivalent of `10%` of the default editor width (600px).\n *\n * @internal\n */\nexport const COLUMN_MIN_WIDTH_IN_PIXELS = 40;\n\n/**\n * Determines how many digits after the decimal point are used to store the column width as a percentage value.\n *\n * @internal\n */\nexport const COLUMN_WIDTH_PRECISION = 2;\n\n/**\n * The distance in pixels that the mouse has to move to start resizing the column.\n *\n * @internal\n */\nexport const COLUMN_RESIZE_DISTANCE_THRESHOLD = 3;\n\n/**\n * The distance (in pixels) around the container's width within which a dragged table edge snaps to exactly\n * 100% of the container width, in either direction - making it easy to precisely land on that value.\n *\n * @internal\n */\nexport const TABLE_WIDTH_SNAP_THRESHOLD_IN_PIXELS = 5;\n\n/**\n * How much further (in pixels, on top of the snap threshold above) a table edge has to be dragged past the\n * container's width before it actually starts growing past 100% again. This is what makes 100% \"sticky\" -\n * while still letting the table grow past it with a deliberate, longer drag.\n *\n * @internal\n */\nexport const TABLE_WIDTH_GROWTH_RESISTANCE_IN_PIXELS = 10;\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/**\n * @module table/tablecolumnresize/utils\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, Model, ViewElement, ViewNode, ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { global } from '@ckeditor/ckeditor5-utils';\nimport { type TableUtils } from '../tableutils.js';\nimport {\n\tCOLUMN_WIDTH_PRECISION,\n\tCOLUMN_MIN_WIDTH_AS_PERCENTAGE,\n\tCOLUMN_MIN_WIDTH_IN_PIXELS\n} from './constants.js';\n\n/**\n * Returns all the inserted or changed table model elements in a given change set. Only the tables\n * with 'columnsWidth' attribute are taken into account. The returned set may be empty.\n *\n * Most notably if an entire table is removed it will not be included in returned set.\n *\n * @internal\n * @param model The model to collect the affected elements from.\n * @returns A set of table model elements.\n */\nexport function getChangedResizedTables( model: Model ): Set<ModelElement> {\n\tconst affectedTables: Set<ModelElement> = new Set();\n\n\tfor ( const change of model.document.differ.getChanges() ) {\n\t\tlet referencePosition = null;\n\n\t\t// Checks if the particular change from the differ is:\n\t\t// - an insertion or removal of a table, a row or a cell,\n\t\t// - an attribute change on a table, a row or a cell.\n\t\tswitch ( change.type ) {\n\t\t\tcase 'insert':\n\t\t\t\treferencePosition = [ 'table', 'tableRow', 'tableCell' ].includes( change.name ) ?\n\t\t\t\t\tchange.position :\n\t\t\t\t\tnull;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'remove':\n\t\t\t\t// If the whole table is removed, there's no need to update its column widths.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/12201.\n\t\t\t\treferencePosition = [ 'tableRow', 'tableCell' ].includes( change.name ) ?\n\t\t\t\t\tchange.position :\n\t\t\t\t\tnull;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'attribute':\n\t\t\t\tif ( change.range.start.nodeAfter ) {\n\t\t\t\t\treferencePosition = [ 'table', 'tableRow', 'tableCell' ].includes(\n\t\t\t\t\t\t( change.range.start.nodeAfter as ModelElement ).name\n\t\t\t\t\t) ?\n\t\t\t\t\t\tchange.range.start :\n\t\t\t\t\t\tnull;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( !referencePosition ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst tableNode = ( referencePosition.nodeAfter && referencePosition.nodeAfter.is( 'element', 'table' ) ) ?\n\t\t\treferencePosition.nodeAfter : referencePosition.findAncestor( 'table' )!;\n\n\t\t// We iterate over the whole table looking for the nested tables that are also affected.\n\t\tfor ( const node of model.createRangeOn( tableNode ).getItems() ) {\n\t\t\tif ( !node.is( 'element', 'table' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !getColumnGroupElement( node ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\taffectedTables.add( node );\n\t\t}\n\t}\n\n\treturn affectedTables;\n}\n\n/**\n * Calculates the percentage of the minimum column width given in pixels for a given table.\n *\n * @internal\n * @param modelTable A table model element.\n * @param editor The editor instance.\n * @returns The minimal column width in percentage.\n */\nexport function getColumnMinWidthAsPercentage( modelTable: ModelElement, editor: Editor ): number {\n\treturn COLUMN_MIN_WIDTH_IN_PIXELS * 100 / getTableWidthInPixels( modelTable, editor );\n}\n\n/**\n * Calculates the table width in pixels.\n *\n * @internal\n * @param modelTable A table model element.\n * @param editor The editor instance.\n * @returns The width of the table in pixels.\n */\nexport function getTableWidthInPixels( modelTable: ModelElement, editor: Editor ): number {\n\t// It is possible for a table to not have a <tbody> element - see https://github.com/ckeditor/ckeditor5/issues/11878.\n\tconst referenceElement =\n\t\tgetChildrenViewElement( modelTable, 'tbody', editor ) ||\n\t\tgetChildrenViewElement( modelTable, 'thead', editor ) ||\n\t\tgetChildrenViewElement( modelTable, 'tfoot', editor );\n\n\tconst domReferenceElement = editor.editing.view.domConverter.mapViewToDom( referenceElement! )!;\n\n\treturn getElementWidthInPixels( domReferenceElement );\n}\n\n/**\n * Returns the a view element with a given name that is nested directly in a `<table>` element\n * related to a given `modelTable`.\n *\n * @param elementName Name of a view to be looked for, e.g. `'colgroup`', `'thead`'.\n * @returns Matched view or `undefined` otherwise.\n */\nfunction getChildrenViewElement( modelTable: ModelElement, elementName: string, editor: Editor ) {\n\tconst viewFigure = editor.editing.mapper.toViewElement( modelTable )!;\n\tconst viewTable = [ ...viewFigure.getChildren() ]\n\t\t.find( ( node: ViewNode ): node is ViewElement & { name: 'table' } => node.is( 'element', 'table' ) )!;\n\n\treturn [ ...viewTable.getChildren() ]\n\t\t.find( ( node: ViewNode ): node is ViewElement => node.is( 'element', elementName ) );\n}\n\n/**\n * Returns the computed width (in pixels) of the DOM element without padding and borders.\n *\n * @internal\n * @param domElement A DOM element.\n * @returns The width of the DOM element in pixels.\n */\nexport function getElementWidthInPixels( domElement: HTMLElement ): number {\n\tconst styles = global.window.getComputedStyle( domElement );\n\n\t// In the 'border-box' box sizing algorithm, the element's width\n\t// already includes the padding and border width (https://github.com/ckeditor/ckeditor5/issues/12335).\n\tif ( styles.boxSizing === 'border-box' ) {\n\t\treturn parseFloat( styles.width ) -\n\t\t\tparseFloat( styles.paddingLeft ) -\n\t\t\tparseFloat( styles.paddingRight ) -\n\t\t\tparseFloat( styles.borderLeftWidth ) -\n\t\t\tparseFloat( styles.borderRightWidth );\n\t} else {\n\t\treturn parseFloat( styles.width );\n\t}\n}\n\n/**\n * Returns the width (in pixels) of a given DOM element's content that's actually available to its children -\n * with the element's own vertical scrollbar subtracted where that's still needed.\n *\n * @internal\n * @param domElement A DOM element.\n * @returns The width available to the element's children, in pixels.\n */\nexport function getContainerContentWidth( domElement: HTMLElement ): number {\n\tconst styles = global.window.getComputedStyle( domElement );\n\tconst width = getElementWidthInPixels( domElement );\n\n\tif ( styles.boxSizing !== 'border-box' ) {\n\t\treturn width;\n\t}\n\n\tconst scrollbarWidth = Math.max(\n\t\tdomElement.offsetWidth -\n\t\t\tdomElement.clientWidth -\n\t\t\tparseFloat( styles.borderLeftWidth ) -\n\t\t\tparseFloat( styles.borderRightWidth ),\n\t\t0\n\t);\n\n\treturn width - scrollbarWidth;\n}\n\n/**\n * Returns the inner pixel width of a given editing root, or `null` if the root has no\n * DOM element attached yet (e.g. it hasn't been rendered for the first time).\n *\n * @internal\n */\nexport function getEditableContentWidth( editor: Editor, rootName: string ): number | null {\n\tconst domRoot = editor.editing.view.getDomRoot( rootName ) as HTMLElement | undefined;\n\n\tif ( !domRoot ) {\n\t\treturn null;\n\t}\n\n\treturn getContainerContentWidth( domRoot );\n}\n\n/**\n * Returns the column indexes on the left and right edges of a cell. They differ if the cell spans\n * across multiple columns.\n *\n * @internal\n * @param cell A table cell model element.\n * @param tableUtils The Table Utils plugin instance.\n * @returns An object containing the indexes of the left and right edges of the cell.\n */\nexport function getColumnEdgesIndexes( cell: ModelElement, tableUtils: TableUtils ): { leftEdge: number; rightEdge: number } {\n\tconst cellColumnIndex = tableUtils.getCellLocation( cell ).column;\n\tconst cellWidth = cell.getAttribute( 'colspan' ) as number || 1;\n\n\treturn {\n\t\tleftEdge: cellColumnIndex,\n\t\trightEdge: cellColumnIndex + cellWidth - 1\n\t};\n}\n\n/**\n * Rounds the provided value to a fixed-point number with defined number of digits after the decimal point.\n *\n * @internal\n * @param value A number to be rounded.\n * @returns The rounded number.\n */\nexport function toPrecision( value: number | string ): number {\n\tconst multiplier = Math.pow( 10, COLUMN_WIDTH_PRECISION );\n\tconst number = typeof value === 'number' ? value : parseFloat( value );\n\n\treturn Math.round( number * multiplier ) / multiplier;\n}\n\n/**\n * Clamps the number within the inclusive lower (min) and upper (max) bounds. Returned number is rounded using the\n * {@link ~toPrecision `toPrecision()`} function.\n *\n * @internal\n * @param number A number to be clamped.\n * @param min A lower bound.\n * @param max An upper bound.\n * @returns The clamped number.\n */\nexport function clamp( number: number, min: number, max: number ): number {\n\tif ( number <= min ) {\n\t\treturn toPrecision( min );\n\t}\n\n\tif ( number >= max ) {\n\t\treturn toPrecision( max );\n\t}\n\n\treturn toPrecision( number );\n}\n\n/**\n * Creates an array with defined length and fills all elements with defined value.\n *\n * @internal\n * @param length The length of the array.\n * @param value The value to fill the array with.\n * @returns An array with defined length and filled with defined value.\n */\nexport function createFilledArray<T>( length: number, value: T ): Array<T> {\n\treturn Array( length ).fill( value );\n}\n\n/**\n * Sums all array values that can be parsed to a float.\n *\n * @internal\n * @param array An array of numbers.\n * @returns The sum of all array values.\n */\nexport function sumArray( array: Array<number | string> ): number {\n\treturn array\n\t\t.map( value => typeof value === 'number' ? value : parseFloat( value ) )\n\t\t.filter( value => !Number.isNaN( value ) )\n\t\t.reduce( ( result, item ) => result + item, 0 );\n}\n\n/**\n * Makes sure that the sum of the widths from all columns is 100%. If the sum of all the widths is not equal 100%, all the widths are\n * changed proportionally so that they all sum back to 100%. If there are columns without specified width, the amount remaining\n * after assigning the known widths will be distributed equally between them.\n *\n * @internal\n * @param columnWidths An array of column widths.\n * @returns An array of column widths guaranteed to sum up to 100%.\n */\nexport function normalizeColumnWidths( columnWidths: Array<string> ): Array<string> {\n\t// In the pixel mode the \"sum must equal 100%\" invariant does not apply - pixel widths are absolute.\n\t// Keep them as-is (only rounded), so the column group can round-trip pixels. The pixel branch is taken\n\t// only when there are no percentage values, so a stray '%' never gets a 'px' suffix slapped onto its\n\t// numeric value (which would silently reinterpret e.g. '20%' as '20px').\n\tconst hasPixels = columnWidths.some( width => typeof width === 'string' && width.endsWith( 'px' ) );\n\tconst hasPercentages = columnWidths.some( width => typeof width === 'string' && width.endsWith( '%' ) );\n\n\tif ( hasPixels && !hasPercentages ) {\n\t\t// Coerce `undefined` to `'auto'` (like the percentage path below) so a widthless column is not later\n\t\t// treated as missing and removed by `updateColumnElements`.\n\t\treturn columnWidths.map( width => width === 'auto' || width === undefined ? 'auto' : `${ toPrecision( width ) }px` );\n\t}\n\n\tconst widths: Array<number | 'auto'> = columnWidths.map( width => {\n\t\tif ( width === 'auto' || width === undefined ) {\n\t\t\treturn 'auto';\n\t\t}\n\n\t\treturn parseFloat( width.replace( '%', '' ) );\n\t} );\n\n\tlet normalizedWidths: Array<number> = calculateMissingColumnWidths( widths );\n\tconst totalWidth = sumArray( normalizedWidths );\n\n\tif ( totalWidth !== 100 ) {\n\t\tnormalizedWidths = normalizedWidths\n\t\t\t// Adjust all the columns proportionally.\n\t\t\t.map( width => toPrecision( width * 100 / totalWidth ) )\n\t\t\t// Due to rounding of numbers it may happen that the sum of the widths of all columns will not be exactly 100%.\n\t\t\t// Therefore, the width of the last column is explicitly adjusted (narrowed or expanded), since all the columns\n\t\t\t// have been proportionally changed already.\n\t\t\t.map( ( columnWidth, columnIndex, width ) => {\n\t\t\t\tconst isLastColumn = columnIndex === width.length - 1;\n\n\t\t\t\tif ( !isLastColumn ) {\n\t\t\t\t\treturn columnWidth;\n\t\t\t\t}\n\n\t\t\t\tconst totalWidth = sumArray( width );\n\n\t\t\t\treturn toPrecision( columnWidth + 100 - totalWidth );\n\t\t\t} );\n\t}\n\n\treturn normalizedWidths.map( width => width + '%' );\n}\n\n/**\n * Initializes the column widths by parsing the attribute value and calculating the uninitialized column widths. The special value 'auto'\n * indicates that width for the column must be calculated. The width of such uninitialized column is calculated as follows:\n * - If there is enough free space in the table for all uninitialized columns to have at least the minimum allowed width for all of them,\n *   then set this width equally for all uninitialized columns.\n * - Otherwise, just set the minimum allowed width for all uninitialized columns. The sum of all column widths will be greater than 100%,\n *   but then it will be adjusted proportionally to 100% in {@link #normalizeColumnWidths `normalizeColumnWidths()`}.\n *\n * @param columnWidths An array of column widths.\n * @returns An array with 'auto' values replaced with calculated widths.\n */\nfunction calculateMissingColumnWidths( columnWidths: Array<number | string> ): Array<number> {\n\tconst numberOfUninitializedColumns = columnWidths.filter( columnWidth => columnWidth === 'auto' ).length;\n\n\tif ( numberOfUninitializedColumns === 0 ) {\n\t\treturn columnWidths.map( columnWidth => toPrecision( columnWidth ) );\n\t}\n\n\tconst totalWidthOfInitializedColumns = sumArray( columnWidths );\n\n\tconst widthForUninitializedColumn = Math.max(\n\t\t( 100 - totalWidthOfInitializedColumns ) / numberOfUninitializedColumns,\n\t\tCOLUMN_MIN_WIDTH_AS_PERCENTAGE\n\t);\n\n\treturn columnWidths\n\t\t.map( columnWidth => columnWidth === 'auto' ? widthForUninitializedColumn : columnWidth )\n\t\t.map( columnWidth => toPrecision( columnWidth ) );\n}\n\n/**\n * Calculates the total horizontal space taken by the cell. That includes:\n *  * width,\n *  * left and red padding,\n *  * border width.\n *\n * @internal\n * @param domCell A DOM cell element.\n * @returns Width in pixels without `px` at the end.\n */\nexport function getDomCellOuterWidth( domCell: HTMLElement ): number {\n\tconst styles = global.window.getComputedStyle( domCell );\n\n\t// In the 'border-box' box sizing algorithm, the element's width\n\t// already includes the padding and border width (https://github.com/ckeditor/ckeditor5/issues/12335).\n\tif ( styles.boxSizing === 'border-box' ) {\n\t\treturn parseInt( styles.width );\n\t} else {\n\t\treturn parseFloat( styles.width ) +\n\t\t\tparseFloat( styles.paddingLeft ) +\n\t\t\tparseFloat( styles.paddingRight ) +\n\t\t\tparseFloat( styles.borderWidth );\n\t}\n}\n\n/**\n * Updates column elements to match columns widths.\n *\n * @internal\n * @param columns\n * @param tableColumnGroup\n * @param normalizedWidths\n * @param writer\n */\nexport function updateColumnElements(\n\tcolumns: Array<ModelElement>,\n\ttableColumnGroup: ModelElement,\n\tnormalizedWidths: Array<string>,\n\twriter: ModelWriter\n): void {\n\tfor ( let i = 0; i < Math.max( normalizedWidths.length, columns.length ); i++ ) {\n\t\tconst column = columns[ i ];\n\t\tconst columnWidth = normalizedWidths[ i ];\n\n\t\tif ( !columnWidth ) {\n\t\t\t// Number of `<tableColumn>` elements exceeds actual number of columns.\n\t\t\twriter.remove( column );\n\t\t} else if ( !column ) {\n\t\t\t// There is fewer `<tableColumn>` elements than actual columns.\n\t\t\twriter.appendElement( 'tableColumn', { columnWidth }, tableColumnGroup );\n\t\t} else {\n\t\t\t// Update column width.\n\t\t\twriter.setAttribute( 'columnWidth', columnWidth, column );\n\t\t}\n\t}\n}\n\n/**\n * Returns a 'tableColumnGroup' element from the 'table'.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @returns A 'tableColumnGroup' element.\n */\nexport function getColumnGroupElement( element: ModelElement ): ModelElement {\n\tif ( element.is( 'element', 'tableColumnGroup' ) ) {\n\t\treturn element;\n\t}\n\n\tconst children = element.getChildren()!;\n\n\treturn Array\n\t\t.from( children )\n\t\t.find( element => element.is( 'element', 'tableColumnGroup' ) )! as ModelElement;\n}\n\n/**\n * Returns an array of 'tableColumn' elements. It may be empty if there's no `tableColumnGroup` element.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @returns An array of 'tableColumn' elements.\n */\nexport function getTableColumnElements( element: ModelElement ): Array<ModelElement> {\n\tconst columnGroupElement = getColumnGroupElement( element );\n\n\tif ( !columnGroupElement ) {\n\t\treturn [];\n\t}\n\n\treturn Array.from( columnGroupElement.getChildren() as IterableIterator<ModelElement> );\n}\n\n/**\n * Returns an array of table column widths.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @returns An array of table column widths.\n */\nexport function getTableColumnsWidths( element: ModelElement ): Array<string> {\n\treturn getTableColumnElements( element ).map( column => column.getAttribute( 'columnWidth' ) as string );\n}\n\n/**\n * Tells whether a table is in the pixel width mode, that is, its `tableWidth` attribute is expressed in pixels.\n * The `tableWidth` unit is the single source of truth for the whole table's width mode.\n *\n * @internal\n * @param table A 'table' model element.\n */\nexport function isTableWidthInPixels( table: ModelElement ): boolean {\n\tconst tableWidth = table.getAttribute( 'tableWidth' ) as string | undefined;\n\n\treturn typeof tableWidth === 'string' && tableWidth.trim().endsWith( 'px' );\n}\n\n/**\n * Tells whether the given column widths are expressed in pixels.\n *\n * @internal\n * @param columnWidths An array of column widths.\n */\nexport function isColumnWidthsInPixels( columnWidths: Array<string> ): boolean {\n\treturn columnWidths.some( width => typeof width === 'string' && width.endsWith( 'px' ) );\n}\n\n/**\n * Translates the `colSpan` model attribute into additional column widths and returns the resulting array.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @param writer A writer instance.\n * @returns An array of table column widths.\n */\nexport function translateColSpanAttribute( element: ModelElement, writer: ModelWriter ): Array<string> {\n\tconst tableColumnElements = getTableColumnElements( element );\n\n\treturn tableColumnElements.reduce( ( acc: Array<string>, element ) => {\n\t\tconst columnWidth = element.getAttribute( 'columnWidth' ) as string;\n\t\tconst colSpan = element.getAttribute( 'colSpan' ) as number | undefined;\n\n\t\tif ( !colSpan ) {\n\t\t\tacc.push( columnWidth );\n\t\t\treturn acc;\n\t\t}\n\n\t\t// Translate the `colSpan` model attribute on to the proper number of column widths\n\t\t// and remove it from the element.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for more details.\n\t\tfor ( let i = 0; i < colSpan; i++ ) {\n\t\t\tacc.push( columnWidth );\n\t\t}\n\n\t\twriter.removeAttribute( 'colSpan', element );\n\n\t\treturn acc;\n\t}, [] );\n}\n\n/**\n * Removes the `tableCellWidth` attribute from every cell of the given table. Once a column is resized (with the resize\n * handler or the column-width command), a per-cell width is obsolete - the column width governs the layout - so it is\n * dropped to keep the model clean.\n *\n * @internal\n */\nexport function removeCellWidthsFromTable( writer: ModelWriter, table: ModelElement ): void {\n\tfor ( const row of table.getChildren() ) {\n\t\tif ( !row.is( 'element', 'tableRow' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor ( const cell of row.getChildren() ) {\n\t\t\twriter.removeAttribute( 'tableCellWidth', cell );\n\t\t}\n\t}\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/**\n * @module table/tableutils\n */\n\nimport { CKEditorError } from '@ckeditor/ckeditor5-utils';\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport type {\n\tModelDocumentSelection,\n\tModelElement,\n\tModelNode,\n\tModelPosition,\n\tModelRange,\n\tModelSelection,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableWalker, type TableWalkerOptions } from './tablewalker.js';\nimport { createEmptyTableCell, updateNumericAttribute, isEntireCellsLineHeader, isTableCellTypeEnabled } from './utils/common.js';\nimport { removeEmptyColumns, removeEmptyRows } from './utils/structure.js';\nimport { getTableColumnElements } from './tablecolumnresize/utils.js';\nimport type { TableCellType } from './tablecellproperties/tablecellpropertiesutils.js';\n\ntype Cell = { cell: ModelElement; rowspan: number };\ntype CellsToMove = Map<number, Cell>;\ntype CellsToTrim = Array<Cell>;\n\nexport type TableIndexesObject = { first: number; last: number };\n\n/**\n * The table utilities plugin.\n */\nexport class TableUtils extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableUtils' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis.decorate( 'insertColumns' );\n\t\tthis.decorate( 'insertRows' );\n\t}\n\n\t/**\n\t * Returns the table cell location as an object with table row and table column indexes.\n\t *\n\t * For instance, in the table below:\n\t *\n\t *      0   1   2   3\n\t *    +---+---+---+---+\n\t *  0 | a     | b | c |\n\t *    +       +   +---+\n\t *  1 |       |   | d |\n\t *    +---+---+   +---+\n\t *  2 | e     |   | f |\n\t *    +---+---+---+---+\n\t *\n\t * the method will return:\n\t *\n\t * ```ts\n\t * const cellA = table.getNodeByPath( [ 0, 0 ] );\n\t * editor.plugins.get( 'TableUtils' ).getCellLocation( cellA );\n\t * // will return { row: 0, column: 0 }\n\t *\n\t * const cellD = table.getNodeByPath( [ 1, 0 ] );\n\t * editor.plugins.get( 'TableUtils' ).getCellLocation( cellD );\n\t * // will return { row: 1, column: 3 }\n\t * ```\n\t *\n\t * @returns Returns a `{row, column}` object.\n\t */\n\tpublic getCellLocation( tableCell: ModelElement ): { row: number; column: number } {\n\t\tconst tableRow = tableCell.parent!;\n\t\tconst table = tableRow.parent as ModelElement;\n\n\t\tconst rowIndex = table.getChildIndex( tableRow as ModelNode );\n\n\t\tconst tableWalker = new TableWalker( table, { row: rowIndex } );\n\n\t\tfor ( const { cell, row, column } of tableWalker ) {\n\t\t\tif ( cell === tableCell ) {\n\t\t\t\treturn { row, column };\n\t\t\t}\n\t\t}\n\n\t\t// Should be unreachable code.\n\t\t/* istanbul ignore next -- @preserve */\n\t\treturn undefined as any;\n\t}\n\n\t/**\n\t * Creates an empty table with a proper structure. The table needs to be inserted into the model,\n\t * for example, by using the {@link module:engine/model/model~Model#insertContent} function.\n\t *\n\t * ```ts\n\t * model.change( ( writer ) => {\n\t *   // Create a table of 2 rows and 7 columns:\n\t *   const table = tableUtils.createTable( writer, { rows: 2, columns: 7 } );\n\t *\n\t *   // Insert a table to the model at the best position taking the current selection:\n\t *   model.insertContent( table );\n\t * }\n\t * ```\n\t *\n\t * @param writer The model writer.\n\t * @param options.rows The number of rows to create. Default value is 2.\n\t * @param options.columns The number of columns to create. Default value is 2.\n\t * @param options.headingRows The number of heading rows. Default value is 0.\n\t * @param options.headingColumns The number of heading columns. Default value is 0.\n\t * @param options.footerRows The number of footer rows. Default value is 0.\n\t * @returns The created table element.\n\t */\n\tpublic createTable(\n\t\twriter: ModelWriter,\n\t\toptions: {\n\t\t\trows?: number;\n\t\t\tcolumns?: number;\n\t\t\theadingRows?: number;\n\t\t\theadingColumns?: number;\n\t\t\tfooterRows?: number;\n\t\t}\n\t): ModelElement {\n\t\tconst table = writer.createElement( 'table' );\n\n\t\tconst rows = options.rows || 2;\n\t\tconst columns = options.columns || 2;\n\n\t\tcreateEmptyRows( writer, table, 0, rows, columns );\n\n\t\tif ( options.footerRows ) {\n\t\t\tthis.setFooterRowsCount( writer, table, options.footerRows );\n\t\t}\n\n\t\tif ( options.headingRows ) {\n\t\t\tthis.setHeadingRowsCount( writer, table, options.headingRows );\n\t\t}\n\n\t\tif ( options.headingColumns ) {\n\t\t\tthis.setHeadingColumnsCount( writer, table, options.headingColumns );\n\t\t}\n\n\t\treturn table;\n\t}\n\n\t/**\n\t * Inserts rows into a table.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).insertRows( table, { at: 1, rows: 2 } );\n\t * ```\n\t *\n\t * Assuming the table on the left, the above code will transform it to the table on the right:\n\t *\n\t *  row index\n\t *    0 +---+---+---+       `at` = 1,      +---+---+---+ 0\n\t *      | a | b | c |       `rows` = 2,    | a | b | c |\n\t *    1 +   +---+---+   <-- insert here    +   +---+---+ 1\n\t *      |   | d | e |                      |   |   |   |\n\t *    2 +   +---+---+       will give:     +   +---+---+ 2\n\t *      |   | f | g |                      |   |   |   |\n\t *    3 +---+---+---+                      +   +---+---+ 3\n\t *                                         |   | d | e |\n\t *                                         +   +---+---+ 4\n\t *                                         +   + f | g |\n\t *                                         +---+---+---+ 5\n\t *\n\t * @param table The table model element where the rows will be inserted.\n\t * @param options.at The row index at which the rows will be inserted.  Default value is 0.\n\t * @param options.rows The number of rows to insert.  Default value is 1.\n\t * @param options.copyStructureFromAbove The flag for copying row structure. Note that\n\t * the row structure will not be copied if this option is not provided.\n\t */\n\tpublic insertRows( table: ModelElement, options: { at?: number; rows?: number; copyStructureFromAbove?: boolean } = {} ): void {\n\t\tconst model = this.editor.model;\n\n\t\tconst insertAt = options.at || 0;\n\t\tconst rowsToInsert = options.rows || 1;\n\t\tconst isCopyStructure = options.copyStructureFromAbove !== undefined;\n\t\tconst copyStructureFrom = options.copyStructureFromAbove ? insertAt - 1 : insertAt;\n\t\tconst cellTypeEnabled = isTableCellTypeEnabled( this.editor );\n\t\tconst scopedHeaders = !!this.editor.config.get( 'table.tableCellProperties.scopedHeaders' );\n\n\t\tconst rows = this.getRows( table );\n\t\tconst columns = this.getColumns( table );\n\n\t\tif ( insertAt > rows ) {\n\t\t\t/**\n\t\t\t * The `options.at` points at a row position that does not exist.\n\t\t\t *\n\t\t\t * @error tableutils-insertrows-insert-out-of-range\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'tableutils-insertrows-insert-out-of-range',\n\t\t\t\tthis,\n\t\t\t\t{ options }\n\t\t\t);\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tlet headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\t\t\tlet footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\n\t\t\t// Inserting rows inside heading section requires to update `headingRows` attribute as the heading section will grow.\n\t\t\tif ( headingRows > insertAt ) {\n\t\t\t\theadingRows += rowsToInsert;\n\t\t\t}\n\n\t\t\t// Inserting rows inside footer section requires to update `footerRows` attribute as the footer section will grow.\n\t\t\tif ( footerRows && insertAt > rows - footerRows ) {\n\t\t\t\tfooterRows += rowsToInsert;\n\t\t\t}\n\n\t\t\t// Inserting at the end or at the beginning of a table doesn't require to calculate anything special.\n\t\t\tif ( !isCopyStructure && ( insertAt === 0 || insertAt === rows ) ) {\n\t\t\t\tconst rows = createEmptyRows( writer, table, insertAt, rowsToInsert, columns );\n\n\t\t\t\tif ( cellTypeEnabled ) {\n\t\t\t\t\tfor ( let rowOffset = 0; rowOffset < rows.length; rowOffset++ ) {\n\t\t\t\t\t\tconst row = rows[ rowOffset ];\n\n\t\t\t\t\t\tfor ( let columnIndex = 0; columnIndex < columns; columnIndex++ ) {\n\t\t\t\t\t\t\tupdateTableCellType( {\n\t\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\t\tcell: row[ columnIndex ],\n\t\t\t\t\t\t\t\trow: insertAt + rowOffset,\n\t\t\t\t\t\t\t\tcolumn: columnIndex,\n\t\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Iterate over all the rows above the inserted rows in order to check for the row-spanned cells.\n\t\t\t\tconst walkerEndRow = isCopyStructure ? Math.max( insertAt, copyStructureFrom ) : insertAt;\n\t\t\t\tconst tableIterator = new TableWalker( table, { endRow: walkerEndRow } );\n\n\t\t\t\t// Store spans of the reference row to reproduce it's structure. This array is column number indexed.\n\t\t\t\tconst rowColSpansMap = new Array( columns ).fill( 1 );\n\n\t\t\t\tfor ( const { row, column, cellHeight, cellWidth, cell } of tableIterator ) {\n\t\t\t\t\tconst lastCellRow = row + cellHeight - 1;\n\n\t\t\t\t\tconst isOverlappingInsertedRow = row < insertAt && insertAt <= lastCellRow;\n\t\t\t\t\tconst isReferenceRow = row <= copyStructureFrom && copyStructureFrom <= lastCellRow;\n\n\t\t\t\t\t// If the cell is row-spanned and overlaps the inserted row, then reserve space for it in the row map.\n\t\t\t\t\tif ( isOverlappingInsertedRow ) {\n\t\t\t\t\t\t// This cell overlaps the inserted rows so we need to expand it further.\n\t\t\t\t\t\twriter.setAttribute( 'rowspan', cellHeight + rowsToInsert, cell );\n\n\t\t\t\t\t\t// Mark this cell with negative number to indicate how many cells should be skipped when adding the new cells.\n\t\t\t\t\t\trowColSpansMap[ column ] = -cellWidth;\n\t\t\t\t\t}\n\t\t\t\t\t// Store the colspan from reference row.\n\t\t\t\t\telse if ( isCopyStructure && isReferenceRow ) {\n\t\t\t\t\t\trowColSpansMap[ column ] = cellWidth;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor ( let rowIndex = 0; rowIndex < rowsToInsert; rowIndex++ ) {\n\t\t\t\t\tconst tableRow = writer.createElement( 'tableRow' );\n\n\t\t\t\t\twriter.insert( tableRow, table, insertAt );\n\n\t\t\t\t\tfor ( let cellIndex = 0; cellIndex < rowColSpansMap.length; cellIndex++ ) {\n\t\t\t\t\t\tconst colspan = rowColSpansMap[ cellIndex ];\n\t\t\t\t\t\tconst insertPosition = writer.createPositionAt( tableRow, 'end' );\n\n\t\t\t\t\t\t// Insert the empty cell only if this slot is not row-spanned from any other cell.\n\t\t\t\t\t\tif ( colspan > 0 ) {\n\t\t\t\t\t\t\tconst insertedCell = createEmptyTableCell( writer, insertPosition, colspan > 1 ? { colspan } : undefined );\n\n\t\t\t\t\t\t\tif ( cellTypeEnabled ) {\n\t\t\t\t\t\t\t\tupdateTableCellType( {\n\t\t\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\t\t\tcell: insertedCell,\n\t\t\t\t\t\t\t\t\trow: insertAt + rowIndex,\n\t\t\t\t\t\t\t\t\tcolumn: cellIndex,\n\t\t\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Skip the col-spanned slots, there won't be any cells.\n\t\t\t\t\t\tcellIndex += Math.abs( colspan ) - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.setFooterRowsCount( writer, table, footerRows );\n\t\t\tthis.setHeadingRowsCount( writer, table, headingRows, {\n\t\t\t\t// No need to update cell types again, as they were already set during insertion.\n\t\t\t\tupdateCellType: false\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Inserts columns into a table.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).insertColumns( table, { at: 1, columns: 2 } );\n\t * ```\n\t *\n\t * Assuming the table on the left, the above code will transform it to the table on the right:\n\t *\n\t *  0   1   2   3                   0   1   2   3   4   5\n\t *  +---+---+---+                   +---+---+---+---+---+\n\t *  | a     | b |                   | a             | b |\n\t *  +       +---+                   +               +---+\n\t *  |       | c |                   |               | c |\n\t *  +---+---+---+     will give:    +---+---+---+---+---+\n\t *  | d | e | f |                   | d |   |   | e | f |\n\t *  +---+   +---+                   +---+---+---+   +---+\n\t *  | g |   | h |                   | g |   |   |   | h |\n\t *  +---+---+---+                   +---+---+---+---+---+\n\t *  | i         |                   | i                 |\n\t *  +---+---+---+                   +---+---+---+---+---+\n\t *      ^---- insert here, `at` = 1, `columns` = 2\n\t *\n\t * @param table The table model element where the columns will be inserted.\n\t * @param options.at The column index at which the columns will be inserted. Default value is 0.\n\t * @param options.columns The number of columns to insert. Default value is 1.\n\t */\n\tpublic insertColumns( table: ModelElement, options: { at?: number; columns?: number } = {} ): void {\n\t\tconst model = this.editor.model;\n\n\t\tconst insertAt = options.at || 0;\n\t\tconst columnsToInsert = options.columns || 1;\n\t\tconst cellTypeEnabled = isTableCellTypeEnabled( this.editor );\n\t\tconst scopedHeaders = !!this.editor.config.get( 'table.tableCellProperties.scopedHeaders' );\n\n\t\tmodel.change( writer => {\n\t\t\tlet headingColumns = table.getAttribute( 'headingColumns' ) as number;\n\n\t\t\t// Inserting columns inside heading section requires to update `headingColumns` attribute as the heading section will grow.\n\t\t\tif ( insertAt < headingColumns ) {\n\t\t\t\theadingColumns += columnsToInsert;\n\t\t\t}\n\n\t\t\tconst tableColumns = this.getColumns( table );\n\n\t\t\t// Inserting at the end and at the beginning of a table doesn't require to calculate anything special.\n\t\t\tif ( insertAt === 0 || tableColumns === insertAt ) {\n\t\t\t\tlet rowIndex = 0;\n\n\t\t\t\tfor ( const tableRow of table.getChildren() ) {\n\t\t\t\t\t// Ignore non-row elements inside the table (e.g. caption).\n\t\t\t\t\tif ( !tableRow.is( 'element', 'tableRow' ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst insertedCells = createCells( columnsToInsert, writer, writer.createPositionAt( tableRow, insertAt ? 'end' : 0 ) );\n\n\t\t\t\t\tif ( cellTypeEnabled ) {\n\t\t\t\t\t\t// If we insert column in heading section, set proper cell type.\n\t\t\t\t\t\tfor ( let columnOffset = 0; columnOffset < insertedCells.length; columnOffset++ ) {\n\t\t\t\t\t\t\tupdateTableCellType( {\n\t\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\t\tcell: insertedCells[ columnOffset ],\n\t\t\t\t\t\t\t\trow: rowIndex,\n\t\t\t\t\t\t\t\tcolumn: insertAt + columnOffset,\n\t\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\trowIndex++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst tableWalker = new TableWalker( table, { column: insertAt, includeAllSlots: true } );\n\n\t\t\t\tfor ( const tableSlot of tableWalker ) {\n\t\t\t\t\tconst { row, cell, cellAnchorColumn, cellAnchorRow, cellWidth, cellHeight } = tableSlot;\n\n\t\t\t\t\t// When iterating over column the table walker outputs either:\n\t\t\t\t\t// - cells at given column index (cell \"e\" from method docs),\n\t\t\t\t\t// - spanned columns (spanned cell from row between cells \"g\" and \"h\" - spanned by \"e\", only\n\t\t\t\t\t// if `includeAllSlots: true`),\n\t\t\t\t\t// - or a cell from the same row which spans over this column (cell \"a\").\n\n\t\t\t\t\tif ( cellAnchorColumn < insertAt ) {\n\t\t\t\t\t\t// If cell is anchored in previous column, it is a cell that spans over an inserted column (cell \"a\" & \"i\").\n\t\t\t\t\t\t// For such cells expand them by a number of columns inserted.\n\t\t\t\t\t\twriter.setAttribute( 'colspan', cellWidth + columnsToInsert, cell );\n\n\t\t\t\t\t\t// This cell will overlap cells in rows below so skip them (because of `includeAllSlots` option) - (cell \"a\")\n\t\t\t\t\t\tconst lastCellRow = cellAnchorRow + cellHeight - 1;\n\n\t\t\t\t\t\tfor ( let i = row; i <= lastCellRow; i++ ) {\n\t\t\t\t\t\t\ttableWalker.skipRow( i );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// It's either cell at this column index or spanned cell by a row-spanned cell from row above.\n\t\t\t\t\t\t// In table above it's cell \"e\" and a spanned position from row below (empty cell between cells \"g\" and \"h\")\n\t\t\t\t\t\tconst insertedCells = createCells( columnsToInsert, writer, tableSlot.getPositionBefore() );\n\n\t\t\t\t\t\t// If we insert column in heading section, set proper cell type.\n\t\t\t\t\t\tif ( cellTypeEnabled ) {\n\t\t\t\t\t\t\tfor ( let columnOffset = 0; columnOffset < insertedCells.length; columnOffset++ ) {\n\t\t\t\t\t\t\t\tupdateTableCellType( {\n\t\t\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\t\t\tcell: insertedCells[ columnOffset ],\n\t\t\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\t\t\tcolumn: insertAt + columnOffset,\n\t\t\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.setHeadingColumnsCount( writer, table, headingColumns, {\n\t\t\t\t// No need to update cell types again, as they were already set during insertion.\n\t\t\t\tupdateCellType: false\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Removes rows from the given `table`.\n\t *\n\t * This method re-calculates the table geometry including `rowspan` attribute of table cells overlapping removed rows\n\t * and table headings values.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).removeRows( table, { at: 1, rows: 2 } );\n\t * ```\n\t *\n\t * Executing the above code in the context of the table on the left will transform its structure as presented on the right:\n\t *\n\t *  row index\n\t *      ┌───┬───┬───┐        `at` = 1        ┌───┬───┬───┐\n\t *    0 │ a │ b │ c │        `rows` = 2      │ a │ b │ c │ 0\n\t *      │   ├───┼───┤                        │   ├───┼───┤\n\t *    1 │   │ d │ e │  <-- remove from here  │   │ d │ g │ 1\n\t *      │   │   ├───┤        will give:      ├───┼───┼───┤\n\t *    2 │   │   │ f │                        │ h │ i │ j │ 2\n\t *      │   │   ├───┤                        └───┴───┴───┘\n\t *    3 │   │   │ g │\n\t *      ├───┼───┼───┤\n\t *    4 │ h │ i │ j │\n\t *      └───┴───┴───┘\n\t *\n\t * @param options.at The row index at which the removing rows will start.\n\t * @param options.rows The number of rows to remove. Default value is 1.\n\t */\n\tpublic removeRows( table: ModelElement, options: { at: number; rows?: number } ): void {\n\t\tconst model = this.editor.model;\n\n\t\tconst rowsToRemove = options.rows || 1;\n\t\tconst rowCount = this.getRows( table );\n\t\tconst first = options.at;\n\t\tconst last = first + rowsToRemove - 1;\n\n\t\tif ( last > rowCount - 1 ) {\n\t\t\t/**\n\t\t\t * The `options.at` param must point at existing row and `options.rows` must not exceed the rows in the table.\n\t\t\t *\n\t\t\t * @error tableutils-removerows-row-index-out-of-range\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'tableutils-removerows-row-index-out-of-range',\n\t\t\t\tthis,\n\t\t\t\t{ table, options }\n\t\t\t);\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst indexesObject = { first, last };\n\n\t\t\t// Removing rows from the table require that most calculations to be done prior to changing table structure.\n\t\t\t// Preparations must be done in the same enqueueChange callback to use the current table structure.\n\n\t\t\t// 1. Preparation - get row-spanned cells that have to be modified after removing rows.\n\t\t\tconst { cellsToMove, cellsToTrim } = getCellsToMoveAndTrimOnRemoveRow( table, indexesObject );\n\n\t\t\t// 2. Execution\n\n\t\t\t// 2a. Move cells from removed rows that extends over a removed section - must be done before removing rows.\n\t\t\t// This will fill any gaps in a rows below that previously were empty because of row-spanned cells.\n\t\t\tif ( cellsToMove.size ) {\n\t\t\t\tconst rowAfterRemovedSection = last + 1;\n\t\t\t\tmoveCellsToRow( table, rowAfterRemovedSection, cellsToMove, writer );\n\t\t\t}\n\n\t\t\t// 2b. Remove all required rows.\n\t\t\tfor ( let i = last; i >= first; i-- ) {\n\t\t\t\twriter.remove( table.getChild( i )! );\n\t\t\t}\n\n\t\t\t// 2c. Update cells from rows above that overlap removed section. Similar to step 2 but does not involve moving cells.\n\t\t\tfor ( const { rowspan, cell } of cellsToTrim ) {\n\t\t\t\tupdateNumericAttribute( 'rowspan', rowspan, cell, writer );\n\t\t\t}\n\n\t\t\t// 2d. Adjust heading rows if removed rows were in a heading section.\n\t\t\tupdateHeadingRows( table, indexesObject, writer );\n\n\t\t\t// 2e. Adjust footer rows if removed rows were in a footer section.\n\t\t\tupdateFooterRows( table, rowCount, indexesObject, writer );\n\n\t\t\t// 2f. Remove empty columns (without anchored cells) if there are any.\n\t\t\tif ( !removeEmptyColumns( table, this ) ) {\n\t\t\t\t// If there wasn't any empty columns then we still need to check if this wasn't called\n\t\t\t\t// because of cleaning empty rows and we only removed one of them.\n\t\t\t\tremoveEmptyRows( table, this );\n\t\t\t}\n\n\t\t\t// 3. If next rows are entirely header, adjust heading rows count.\n\t\t\tif ( isTableCellTypeEnabled( this.editor ) ) {\n\t\t\t\tlet headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\t\t\t\tconst totalRows = this.getRows( table );\n\n\t\t\t\twhile ( headingRows < totalRows && isEntireCellsLineHeader( { table, row: headingRows } ) ) {\n\t\t\t\t\theadingRows++;\n\t\t\t\t}\n\n\t\t\t\tthis.setHeadingRowsCount( writer, table, headingRows, {\n\t\t\t\t\tupdateCellType: false\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Removes columns from the given `table`.\n\t *\n\t * This method re-calculates the table geometry including the `colspan` attribute of table cells overlapping removed columns\n\t * and table headings values.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).removeColumns( table, { at: 1, columns: 2 } );\n\t * ```\n\t *\n\t * Executing the above code in the context of the table on the left will transform its structure as presented on the right:\n\t *\n\t *    0   1   2   3   4                       0   1   2\n\t *  ┌───────────────┬───┐                   ┌───────┬───┐\n\t *  │ a             │ b │                   │ a     │ b │\n\t *  │               ├───┤                   │       ├───┤\n\t *  │               │ c │                   │       │ c │\n\t *  ├───┬───┬───┬───┼───┤     will give:    ├───┬───┼───┤\n\t *  │ d │ e │ f │ g │ h │                   │ d │ g │ h │\n\t *  ├───┼───┼───┤   ├───┤                   ├───┤   ├───┤\n\t *  │ i │ j │ k │   │ l │                   │ i │   │ l │\n\t *  ├───┴───┴───┴───┴───┤                   ├───┴───┴───┤\n\t *  │ m                 │                   │ m         │\n\t *  └───────────────────┘                   └───────────┘\n\t *        ^---- remove from here, `at` = 1, `columns` = 2\n\t *\n\t * @param options.at The row index at which the removing columns will start.\n\t * @param options.columns The number of columns to remove.\n\t */\n\tpublic removeColumns( table: ModelElement, options: { at: number; columns?: number } ): void {\n\t\tconst model = this.editor.model;\n\t\tconst first = options.at;\n\t\tconst columnsToRemove = options.columns || 1;\n\t\tconst last = options.at + columnsToRemove - 1;\n\n\t\tmodel.change( writer => {\n\t\t\tadjustHeadingColumns( table, { first, last }, writer );\n\t\t\tconst tableColumns = getTableColumnElements( table );\n\n\t\t\tfor ( let removedColumnIndex = last; removedColumnIndex >= first; removedColumnIndex-- ) {\n\t\t\t\tfor ( const { cell, column, cellWidth } of [ ...new TableWalker( table ) ] ) {\n\t\t\t\t\t// If colspaned cell overlaps removed column decrease its span.\n\t\t\t\t\tif ( column <= removedColumnIndex && cellWidth > 1 && column + cellWidth > removedColumnIndex ) {\n\t\t\t\t\t\tupdateNumericAttribute( 'colspan', cellWidth - 1, cell, writer );\n\t\t\t\t\t} else if ( column === removedColumnIndex ) {\n\t\t\t\t\t\t// The cell in removed column has colspan of 1.\n\t\t\t\t\t\twriter.remove( cell );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If table has `tableColumn` elements, we need to update it manually.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for details.\n\t\t\t\tif ( tableColumns[ removedColumnIndex ] ) {\n\t\t\t\t\t// If the removed column is the first one then we need to add its width to the next column.\n\t\t\t\t\t// Otherwise we add it to the previous column.\n\t\t\t\t\tconst adjacentColumn = removedColumnIndex === 0 ? tableColumns[ 1 ] : tableColumns[ removedColumnIndex - 1 ];\n\n\t\t\t\t\tconst removedColumnWidthAttribute = tableColumns[ removedColumnIndex ].getAttribute( 'columnWidth' ) as string;\n\t\t\t\t\tconst removedColumnWidth = parseFloat( removedColumnWidthAttribute );\n\t\t\t\t\tconst adjacentColumnWidth = parseFloat( adjacentColumn.getAttribute( 'columnWidth' ) as string );\n\n\t\t\t\t\twriter.remove( tableColumns[ removedColumnIndex ] );\n\n\t\t\t\t\t// Add the removed column width to the adjacent column, preserving the width unit ('px' or '%')\n\t\t\t\t\t// so that a pixel-width table's column group is not turned into percentages.\n\t\t\t\t\tconst unit = removedColumnWidthAttribute.trim().endsWith( 'px' ) ? 'px' : '%';\n\n\t\t\t\t\twriter.setAttribute( 'columnWidth', `${ removedColumnWidth + adjacentColumnWidth }${ unit }`, adjacentColumn );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove empty rows that could appear after removing columns.\n\t\t\tif ( !removeEmptyRows( table, this ) ) {\n\t\t\t\t// If there wasn't any empty rows then we still need to check if this wasn't called\n\t\t\t\t// because of cleaning empty columns and we only removed one of them.\n\t\t\t\tremoveEmptyColumns( table, this );\n\t\t\t}\n\n\t\t\t// If next columns are entirely header, adjust heading columns count.\n\t\t\tif ( isTableCellTypeEnabled( this.editor ) ) {\n\t\t\t\tlet headingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\t\t\t\tconst totalColumns = this.getColumns( table );\n\n\t\t\t\twhile ( headingColumns < totalColumns && isEntireCellsLineHeader( { table, column: headingColumns } ) ) {\n\t\t\t\t\theadingColumns++;\n\t\t\t\t}\n\n\t\t\t\tthis.setHeadingColumnsCount( writer, table, headingColumns, {\n\t\t\t\t\tupdateCellType: false\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Divides a table cell vertically into several ones.\n\t *\n\t * The cell will be visually split into more cells by updating colspans of other cells in a column\n\t * and inserting cells (columns) after that cell.\n\t *\n\t * In the table below, if cell \"a\" is split into 3 cells:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +---+---+---+\n\t *  | d | e | f |\n\t *  +---+---+---+\n\t *\n\t * it will result in the table below:\n\t *\n\t *  +---+---+---+---+---+\n\t *  | a |   |   | b | c |\n\t *  +---+---+---+---+---+\n\t *  | d         | e | f |\n\t *  +---+---+---+---+---+\n\t *\n\t * So cell \"d\" will get its `colspan` updated to `3` and 2 cells will be added (2 columns will be created).\n\t *\n\t * Splitting a cell that already has a `colspan` attribute set will distribute the cell `colspan` evenly and the remainder\n\t * will be left to the original cell:\n\t *\n\t *  +---+---+---+\n\t *  | a         |\n\t *  +---+---+---+\n\t *  | b | c | d |\n\t *  +---+---+---+\n\t *\n\t * Splitting cell \"a\" with `colspan=3` into 2 cells will create 1 cell with a `colspan=a` and cell \"a\" that will have `colspan=2`:\n\t *\n\t *  +---+---+---+\n\t *  | a     |   |\n\t *  +---+---+---+\n\t *  | b | c | d |\n\t *  +---+---+---+\n\t */\n\tpublic splitCellVertically( tableCell: ModelElement, numberOfCells = 2 ): void {\n\t\tconst model = this.editor.model;\n\t\tconst tableRow = tableCell.parent!;\n\t\tconst table = tableRow.parent as ModelElement;\n\n\t\tconst rowspan = parseInt( tableCell.getAttribute( 'rowspan' ) as string || '1' );\n\t\tconst colspan = parseInt( tableCell.getAttribute( 'colspan' ) as string || '1' );\n\n\t\tmodel.change( writer => {\n\t\t\t// First check - the cell spans over multiple rows so before doing anything else just split this cell.\n\t\t\tif ( colspan > 1 ) {\n\t\t\t\t// Get spans of new (inserted) cells and span to update of split cell.\n\t\t\t\tconst { newCellsSpan, updatedSpan } = breakSpanEvenly( colspan, numberOfCells );\n\n\t\t\t\tupdateNumericAttribute( 'colspan', updatedSpan, tableCell, writer );\n\n\t\t\t\t// Each inserted cell will have the same attributes:\n\t\t\t\tconst newCellsAttributes: { colspan?: number; rowspan?: number } = {};\n\n\t\t\t\t// Do not store default value in the model.\n\t\t\t\tif ( newCellsSpan > 1 ) {\n\t\t\t\t\tnewCellsAttributes.colspan = newCellsSpan;\n\t\t\t\t}\n\n\t\t\t\t// Copy rowspan of split cell.\n\t\t\t\tif ( rowspan > 1 ) {\n\t\t\t\t\tnewCellsAttributes.rowspan = rowspan;\n\t\t\t\t}\n\n\t\t\t\tconst cellsToInsert = colspan > numberOfCells ? numberOfCells - 1 : colspan - 1;\n\t\t\t\tcreateCells( cellsToInsert, writer, writer.createPositionAfter( tableCell ), newCellsAttributes );\n\t\t\t}\n\n\t\t\t// Second check - the cell has colspan of 1 or we need to create more cells then the currently one spans over.\n\t\t\tif ( colspan < numberOfCells ) {\n\t\t\t\tconst cellsToInsert = numberOfCells - colspan;\n\n\t\t\t\t// First step: expand cells on the same column as split cell.\n\t\t\t\tconst tableMap = [ ...new TableWalker( table ) ];\n\n\t\t\t\t// Get the column index of split cell.\n\t\t\t\tconst { column: splitCellColumn } = tableMap.find( ( { cell } ) => cell === tableCell )!;\n\n\t\t\t\t// Find cells which needs to be expanded vertically - those on the same column or those that spans over split cell's column.\n\t\t\t\tconst cellsToUpdate = tableMap.filter( ( { cell, cellWidth, column } ) => {\n\t\t\t\t\tconst isOnSameColumn = cell !== tableCell && column === splitCellColumn;\n\t\t\t\t\tconst spansOverColumn = ( column < splitCellColumn && column + cellWidth > splitCellColumn );\n\n\t\t\t\t\treturn isOnSameColumn || spansOverColumn;\n\t\t\t\t} );\n\n\t\t\t\t// Expand cells vertically.\n\t\t\t\tfor ( const { cell, cellWidth } of cellsToUpdate ) {\n\t\t\t\t\twriter.setAttribute( 'colspan', cellWidth + cellsToInsert, cell );\n\t\t\t\t}\n\n\t\t\t\t// Second step: create columns after split cell.\n\n\t\t\t\t// Each inserted cell will have the same attributes:\n\t\t\t\tconst newCellsAttributes: { rowspan?: number } = {};\n\n\t\t\t\t// Do not store default value in the model.\n\n\t\t\t\t// Copy rowspan of split cell.\n\t\t\t\tif ( rowspan > 1 ) {\n\t\t\t\t\tnewCellsAttributes.rowspan = rowspan;\n\t\t\t\t}\n\n\t\t\t\tcreateCells( cellsToInsert, writer, writer.createPositionAfter( tableCell ), newCellsAttributes );\n\n\t\t\t\tconst headingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\n\t\t\t\t// Update heading section if split cell is in heading section.\n\t\t\t\tif ( headingColumns > splitCellColumn ) {\n\t\t\t\t\tupdateNumericAttribute( 'headingColumns', headingColumns + cellsToInsert, table, writer );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Divides a table cell horizontally into several ones.\n\t *\n\t * The cell will be visually split into more cells by updating rowspans of other cells in the row and inserting rows with a single cell\n\t * below.\n\t *\n\t * If in the table below cell \"b\" is split into 3 cells:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +---+---+---+\n\t *  | d | e | f |\n\t *  +---+---+---+\n\t *\n\t * It will result in the table below:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +   +---+   +\n\t *  |   |   |   |\n\t *  +   +---+   +\n\t *  |   |   |   |\n\t *  +---+---+---+\n\t *  | d | e | f |\n\t *  +---+---+---+\n\t *\n\t * So cells \"a\" and \"b\" will get their `rowspan` updated to `3` and 2 rows with a single cell will be added.\n\t *\n\t * Splitting a cell that already has a `rowspan` attribute set will distribute the cell `rowspan` evenly and the remainder\n\t * will be left to the original cell:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +   +---+---+\n\t *  |   | d | e |\n\t *  +   +---+---+\n\t *  |   | f | g |\n\t *  +   +---+---+\n\t *  |   | h | i |\n\t *  +---+---+---+\n\t *\n\t * Splitting cell \"a\" with `rowspan=4` into 3 cells will create 2 cells with a `rowspan=1` and cell \"a\" will have `rowspan=2`:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +   +---+---+\n\t *  |   | d | e |\n\t *  +---+---+---+\n\t *  |   | f | g |\n\t *  +---+---+---+\n\t *  |   | h | i |\n\t *  +---+---+---+\n\t */\n\tpublic splitCellHorizontally( tableCell: ModelElement, numberOfCells = 2 ): void {\n\t\tconst model = this.editor.model;\n\n\t\tconst tableRow = tableCell.parent as ModelNode;\n\t\tconst table = tableRow.parent! as ModelElement;\n\t\tconst splitCellRow = table.getChildIndex( tableRow )!;\n\n\t\tconst rowspan = parseInt( tableCell.getAttribute( 'rowspan' ) as string || '1' );\n\t\tconst colspan = parseInt( tableCell.getAttribute( 'colspan' ) as string || '1' );\n\n\t\tmodel.change( writer => {\n\t\t\t// First check - the cell spans over multiple rows so before doing anything else just split this cell.\n\t\t\tif ( rowspan > 1 ) {\n\t\t\t\t// Cache table map before updating table.\n\t\t\t\tconst tableMap = [ ...new TableWalker( table, {\n\t\t\t\t\tstartRow: splitCellRow,\n\t\t\t\t\tendRow: splitCellRow + rowspan - 1,\n\t\t\t\t\tincludeAllSlots: true\n\t\t\t\t} ) ];\n\n\t\t\t\t// Get spans of new (inserted) cells and span to update of split cell.\n\t\t\t\tconst { newCellsSpan, updatedSpan } = breakSpanEvenly( rowspan, numberOfCells );\n\n\t\t\t\tupdateNumericAttribute( 'rowspan', updatedSpan, tableCell, writer );\n\n\t\t\t\tconst { column: cellColumn } = tableMap.find( ( { cell } ) => cell === tableCell )!;\n\n\t\t\t\t// Each inserted cell will have the same attributes:\n\t\t\t\tconst newCellsAttributes: { rowspan?: number; colspan?: number } = {};\n\n\t\t\t\t// Do not store default value in the model.\n\t\t\t\tif ( newCellsSpan > 1 ) {\n\t\t\t\t\tnewCellsAttributes.rowspan = newCellsSpan;\n\t\t\t\t}\n\n\t\t\t\t// Copy colspan of split cell.\n\t\t\t\tif ( colspan > 1 ) {\n\t\t\t\t\tnewCellsAttributes.colspan = colspan;\n\t\t\t\t}\n\n\t\t\t\t// Accumulator that stores distance from the last inserted cell span.\n\t\t\t\t// It helps with evenly splitting larger cell spans (for example 10 cells collapsing into 3 cells).\n\t\t\t\t// We split these cells into 3, 3, 4 cells and we have to call `createCells` only when distance between\n\t\t\t\t// these cells is equal or greater than the new cells span size.\n\t\t\t\tlet distanceFromLastCellSpan = 0;\n\n\t\t\t\tfor ( const tableSlot of tableMap ) {\n\t\t\t\t\tconst { column, row } = tableSlot;\n\n\t\t\t\t\t// As both newly created cells and the split cell might have rowspan,\n\t\t\t\t\t// the insertion of new cells must go to appropriate rows:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. It's a row after split cell + it's height.\n\t\t\t\t\tconst isAfterSplitCell = row >= splitCellRow + updatedSpan;\n\n\t\t\t\t\t// 2. Is on the same column.\n\t\t\t\t\tconst isOnSameColumn = column === cellColumn;\n\n\t\t\t\t\t// Reset distance from the last cell span if we are on the same column and we exceeded the new cells span size.\n\t\t\t\t\tif ( distanceFromLastCellSpan >= newCellsSpan && isOnSameColumn ) {\n\t\t\t\t\t\tdistanceFromLastCellSpan = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isAfterSplitCell && isOnSameColumn ) {\n\t\t\t\t\t\t// Create new cells only if the distance from the last cell span is equal or greater than the new cells span.\n\t\t\t\t\t\tif ( !distanceFromLastCellSpan ) {\n\t\t\t\t\t\t\tcreateCells( 1, writer, tableSlot.getPositionBefore(), newCellsAttributes );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Increase the distance from the last cell span.\n\t\t\t\t\t\tdistanceFromLastCellSpan++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Second check - the cell has rowspan of 1 or we need to create more cells than the current cell spans over.\n\t\t\tif ( rowspan < numberOfCells ) {\n\t\t\t\t// We already split the cell in check one so here we split to the remaining number of cells only.\n\t\t\t\tconst cellsToInsert = numberOfCells - rowspan;\n\t\t\t\tconst rowCountBefore = this.getRows( table );\n\n\t\t\t\t// This check is needed since we need to check if there are any cells from previous rows than spans over this cell's row.\n\t\t\t\tconst tableMap = [ ...new TableWalker( table, { startRow: 0, endRow: splitCellRow } ) ];\n\n\t\t\t\t// First step: expand cells.\n\t\t\t\tfor ( const { cell, cellHeight, row } of tableMap ) {\n\t\t\t\t\t// Expand rowspan of cells that are either:\n\t\t\t\t\t// - on the same row as current cell,\n\t\t\t\t\t// - or are below split cell row and overlaps that row.\n\t\t\t\t\tif ( cell !== tableCell && row + cellHeight > splitCellRow ) {\n\t\t\t\t\t\tconst rowspanToSet = cellHeight + cellsToInsert;\n\n\t\t\t\t\t\twriter.setAttribute( 'rowspan', rowspanToSet, cell );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Second step: create rows with single cell below split cell.\n\t\t\t\tconst newCellsAttributes: { colspan?: number } = {};\n\n\t\t\t\t// Copy colspan of split cell.\n\t\t\t\tif ( colspan > 1 ) {\n\t\t\t\t\tnewCellsAttributes.colspan = colspan;\n\t\t\t\t}\n\n\t\t\t\tcreateEmptyRows( writer, table, splitCellRow + 1, cellsToInsert, 1, newCellsAttributes );\n\n\t\t\t\t// Update heading section if split cell is in heading section.\n\t\t\t\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\n\t\t\t\tif ( headingRows > splitCellRow ) {\n\t\t\t\t\tupdateNumericAttribute( 'headingRows', headingRows + cellsToInsert, table, writer );\n\t\t\t\t}\n\n\t\t\t\t// Update footer rows if split cell is in footer section.\n\t\t\t\tconst footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\t\t\t\tconst footerIndex = rowCountBefore - footerRows;\n\n\t\t\t\tif ( footerIndex <= splitCellRow ) {\n\t\t\t\t\tupdateNumericAttribute( 'footerRows', footerRows + cellsToInsert, table, writer );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the number of columns for a given table.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).getColumns( table );\n\t * ```\n\t *\n\t * @param table The table to analyze.\n\t */\n\tpublic getColumns( table: ModelElement ): number {\n\t\t// Analyze first row only as all the rows should have the same width.\n\t\t// Using the first row without checking if it's a tableRow because we expect\n\t\t// that table will have only tableRow model elements at the beginning.\n\t\tconst row = table.getChild( 0 ) as ModelElement;\n\n\t\treturn [ ...row.getChildren() ]\n\t\t\t// $marker elements can also be children of a row too (when TrackChanges is on). Don't include them in the count.\n\t\t\t.filter( node => node.is( 'element', 'tableCell' ) )\n\t\t\t.reduce( ( columns, row ) => {\n\t\t\t\tconst columnWidth = parseInt( row.getAttribute( 'colspan' ) as string || '1' );\n\n\t\t\t\treturn columns + columnWidth;\n\t\t\t}, 0 );\n\t}\n\n\t/**\n\t * Returns the number of rows for a given table. Any other element present in the table model is omitted.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).getRows( table );\n\t * ```\n\t *\n\t * @param table The table to analyze.\n\t */\n\tpublic getRows( table: ModelElement ): number {\n\t\t// Rowspan not included due to #6427.\n\t\treturn Array.from( table.getChildren() )\n\t\t\t.reduce( ( rowCount, child ) => child.is( 'element', 'tableRow' ) ? rowCount + 1 : rowCount, 0 );\n\t}\n\n\t/**\n\t * Creates an instance of the table walker.\n\t *\n\t * The table walker iterates internally by traversing the table from row index = 0 and column index = 0.\n\t * It walks row by row and column by column in order to output values defined in the options.\n\t * By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,\n\t * pass the `includeAllSlots` option.\n\t *\n\t * @internal\n\t * @param table A table over which the walker iterates.\n\t * @param options An object with configuration.\n\t */\n\tpublic createTableWalker( table: ModelElement, options: TableWalkerOptions = {} ): TableWalker {\n\t\treturn new TableWalker( table, options );\n\t}\n\n\t/**\n\t * Returns all model table cells that are fully selected (from the outside)\n\t * within the provided model selection's ranges.\n\t *\n\t * To obtain the cells selected from the inside, use\n\t * {@link #getTableCellsContainingSelection}.\n\t */\n\tpublic getSelectedTableCells( selection: ModelSelection | ModelDocumentSelection ): Array<ModelElement> {\n\t\tconst cells = [];\n\n\t\tfor ( const range of this.sortRanges( selection.getRanges() ) ) {\n\t\t\tconst element = range.getContainedElement();\n\n\t\t\tif ( element && element.is( 'element', 'tableCell' ) ) {\n\t\t\t\tcells.push( element );\n\t\t\t}\n\t\t}\n\n\t\treturn cells;\n\t}\n\n\t/**\n\t * Sets the number of footer rows for the given `table`.\n\t *\n\t * * If number of footer rows is greater than the number of rows in the table, it will be truncated to the number of rows.\n\t * * If footer rows and heading rows overlap, the number of heading rows will be adjusted\n\t *\n\t * It'll have no effect if {@link module:table/tableconfig~TableConfig#enableFooters `table.enableFooters`} is set to `false`.\n\t *\n\t * @param writer The model writer.\n\t * @param table The table model element.\n\t * @param footerRows The number of footer rows to set.\n\t */\n\tpublic setFooterRowsCount( writer: ModelWriter, table: ModelElement, footerRows: number ): void {\n\t\tif ( !this.editor.config.get( 'table.enableFooters' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\t\tconst totalRows = this.getRows( table );\n\n\t\tconst truncatedFooterRows = Math.min( footerRows, totalRows );\n\n\t\tupdateNumericAttribute( 'footerRows', truncatedFooterRows, table, writer, 0 );\n\n\t\t// If footer rows and heading rows overlap, adjust heading rows.\n\t\tif ( headingRows + truncatedFooterRows > totalRows ) {\n\t\t\tconst newHeadingRows = totalRows - truncatedFooterRows;\n\n\t\t\tthis.setHeadingRowsCount( writer, table, newHeadingRows );\n\t\t}\n\t}\n\n\t/**\n\t * Sets the number of heading rows for the given `table`.\n\t *\n\t * If number of heading rows is greater than the number of rows in the table,\n\t * it will be truncated to the number of rows.\n\t *\n\t * @param writer The model writer.\n\t * @param table The table model element.\n\t * @param headingRows The number of heading rows to set.\n\t * @param options Additional options.\n\t * @param options.updateCellType If set to `false` it will only update the `headingRows` attribute\n\t * without updating the cell types in the table. Default is `true`.\n\t * @param options.resetFormerHeadingCells If set to `true`, it will check if the rows that are no longer in the heading section\n\t * should be updated to body cells. Default is `true`.\n\t * @param options.autoExpand If set to `true`, it will check if the following rows look like a header and expand the heading section.\n\t * Default is `true`.\n\t */\n\tpublic setHeadingRowsCount(\n\t\twriter: ModelWriter,\n\t\ttable: ModelElement,\n\t\theadingRows: number,\n\t\toptions: UpdateTableHeadingsOptions = {}\n\t): void {\n\t\tconst {\n\t\t\tupdateCellType = true,\n\t\t\tresetFormerHeadingCells = true,\n\t\t\tautoExpand = true\n\t\t} = options;\n\n\t\tconst totalRows = this.getRows( table );\n\t\tconst scopedHeaders = !!this.editor.config.get( 'table.tableCellProperties.scopedHeaders' );\n\t\tconst oldHeadingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\n\t\tlet truncatedHeadingRows = Math.min( headingRows, totalRows );\n\n\t\tif ( truncatedHeadingRows === oldHeadingRows ) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdateNumericAttribute( 'headingRows', truncatedHeadingRows, table, writer, 0 );\n\n\t\t// Check if footer rows and heading rows overlap. If so, adjust footer rows.\n\t\tconst footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\n\t\tif ( truncatedHeadingRows + footerRows > totalRows ) {\n\t\t\tconst newFooterRows = totalRows - truncatedHeadingRows;\n\n\t\t\tthis.setFooterRowsCount( writer, table, newFooterRows );\n\t\t}\n\n\t\t// Further processing is not needed if cell type management is disabled. It's impossible to auto-expand\n\t\t// heading rows without knowing cell types.\n\t\tif ( !isTableCellTypeEnabled( this.editor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( updateCellType ) {\n\t\t\t// Set header type to all cells in new heading rows.\n\t\t\tfor ( const { cell, row, column } of new TableWalker( table, { endRow: truncatedHeadingRows - 1 } ) ) {\n\t\t\t\tupdateTableCellType( {\n\t\t\t\t\ttable,\n\t\t\t\t\twriter,\n\t\t\t\t\tcell,\n\t\t\t\t\trow,\n\t\t\t\t\tcolumn,\n\t\t\t\t\tscopedHeaders\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// If heading rows were reduced, set body type to all cells in rows that are no longer in heading section.\n\t\t\tif ( resetFormerHeadingCells && truncatedHeadingRows < oldHeadingRows ) {\n\t\t\t\tfor ( let row = truncatedHeadingRows; row < oldHeadingRows; row++ ) {\n\t\t\t\t\t// Handle edge case when some cells were already changed to body type manually,\n\t\t\t\t\t// before changing heading rows count.\n\t\t\t\t\tif ( !isEntireCellsLineHeader( { table, row } ) ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( const { cell, row: cellRow, column } of new TableWalker( table, { row } ) ) {\n\t\t\t\t\t\tupdateTableCellType( {\n\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\tcell,\n\t\t\t\t\t\t\trow: cellRow,\n\t\t\t\t\t\t\tcolumn,\n\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If following rows looks like header, expand heading rows to cover them.\n\t\tif ( autoExpand && truncatedHeadingRows > oldHeadingRows ) {\n\t\t\twhile ( truncatedHeadingRows < totalRows && isEntireCellsLineHeader( { table, row: truncatedHeadingRows } ) ) {\n\t\t\t\ttruncatedHeadingRows++;\n\t\t\t}\n\n\t\t\tupdateNumericAttribute( 'headingRows', truncatedHeadingRows, table, writer, 0 );\n\t\t}\n\t}\n\n\t/**\n\t * Sets the number of heading columns for the given `table`.\n\t *\n\t * If number of heading columns is greater than the number of columns in the table,\n\t * it will be truncated to the number of columns.\n\t *\n\t * @param writer The model writer to use.\n\t * @param table The table model element.\n\t * @param headingColumns The number of heading columns to set.\n\t * @param options Additional options.\n\t * @param options.updateCellType If set to `false` it will only update the `headingColumns` attribute\n\t * without updating the cell types in the table. Default is `true`.\n\t * @param options.resetFormerHeadingCells If set to `true`, it will check if the columns that are no longer in the heading section\n\t * should be updated to body cells. Default is `true`.\n\t * @param options.autoExpand If set to `true`, it will check if the following columns look like a header and expand the heading section.\n\t * Default is `true`.\n\t */\n\tpublic setHeadingColumnsCount(\n\t\twriter: ModelWriter,\n\t\ttable: ModelElement,\n\t\theadingColumns: number,\n\t\toptions: UpdateTableHeadingsOptions = {}\n\t): void {\n\t\tconst {\n\t\t\tupdateCellType = true,\n\t\t\tresetFormerHeadingCells = true,\n\t\t\tautoExpand = true\n\t\t} = options;\n\n\t\tconst totalColumns = this.getColumns( table );\n\t\tconst oldHeadingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\t\tconst scopedHeaders = !!this.editor.config.get( 'table.tableCellProperties.scopedHeaders' );\n\n\t\tlet truncatedHeadingColumns = Math.min( headingColumns, totalColumns );\n\n\t\tif ( truncatedHeadingColumns === oldHeadingColumns ) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdateNumericAttribute( 'headingColumns', truncatedHeadingColumns, table, writer, 0 );\n\n\t\t// Further processing is not needed if cell type management is disabled. It's impossible to auto-expand\n\t\t// heading columns without knowing cell types.\n\t\tif ( !isTableCellTypeEnabled( this.editor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update cell types only when needed.\n\t\tif ( updateCellType ) {\n\t\t\t// Set header type to all cells in new heading columns.\n\t\t\tfor ( const { cell, row, column } of new TableWalker( table, { endColumn: truncatedHeadingColumns - 1 } ) ) {\n\t\t\t\tupdateTableCellType( {\n\t\t\t\t\ttable,\n\t\t\t\t\twriter,\n\t\t\t\t\tcell,\n\t\t\t\t\trow,\n\t\t\t\t\tcolumn,\n\t\t\t\t\tscopedHeaders\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// If heading columns were reduced, set body type to all cells in columns that are no longer in heading section.\n\t\t\tif ( resetFormerHeadingCells && truncatedHeadingColumns < oldHeadingColumns ) {\n\t\t\t\tfor ( let column = truncatedHeadingColumns; column < oldHeadingColumns; column++ ) {\n\t\t\t\t\t// Handle edge case when some cells were already changed to body type manually,\n\t\t\t\t\t// before changing heading columns count.\n\t\t\t\t\tif ( !isEntireCellsLineHeader( { table, column } ) ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( const { cell, row, column: cellColumn } of new TableWalker( table, { column } ) ) {\n\t\t\t\t\t\tupdateTableCellType( {\n\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\twriter,\n\t\t\t\t\t\t\tcell,\n\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\tcolumn: cellColumn,\n\t\t\t\t\t\t\tscopedHeaders\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If following columns looks like header, expand heading columns to cover them.\n\t\tif ( autoExpand && truncatedHeadingColumns > oldHeadingColumns ) {\n\t\t\twhile ( truncatedHeadingColumns < totalColumns && isEntireCellsLineHeader( { table, column: truncatedHeadingColumns } ) ) {\n\t\t\t\ttruncatedHeadingColumns++;\n\t\t\t}\n\n\t\t\tupdateNumericAttribute( 'headingColumns', truncatedHeadingColumns, table, writer, 0 );\n\t\t}\n\t}\n\n\t/**\n\t * Returns all model table cells that the provided model selection's ranges\n\t * {@link module:engine/model/range~ModelRange#start} inside.\n\t *\n\t * To obtain the cells selected from the outside, use\n\t * {@link #getSelectedTableCells}.\n\t */\n\tpublic getTableCellsContainingSelection( selection: ModelSelection | ModelDocumentSelection ): Array<ModelElement> {\n\t\tconst cells = [];\n\n\t\tfor ( const range of selection.getRanges() ) {\n\t\t\tconst cellWithSelection = range.start.findAncestor( 'tableCell' );\n\n\t\t\tif ( cellWithSelection ) {\n\t\t\t\tcells.push( cellWithSelection );\n\t\t\t}\n\t\t}\n\n\t\treturn cells;\n\t}\n\n\t/**\n\t * Returns all model table cells that are either completely selected\n\t * by selection ranges or host selection range\n\t * {@link module:engine/model/range~ModelRange#start start positions} inside them.\n\t *\n\t * Combines {@link #getTableCellsContainingSelection} and\n\t * {@link #getSelectedTableCells}.\n\t */\n\tpublic getSelectionAffectedTableCells( selection: ModelSelection | ModelDocumentSelection ): Array<ModelElement> {\n\t\tconst selectedCells = this.getSelectedTableCells( selection );\n\n\t\tif ( selectedCells.length ) {\n\t\t\treturn selectedCells;\n\t\t}\n\n\t\treturn this.getTableCellsContainingSelection( selection );\n\t}\n\n\t/**\n\t * Returns an object with the `first` and `last` row index contained in the given `tableCells`.\n\t *\n\t * ```ts\n\t * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );\n\t *\n\t * const { first, last } = getRowIndexes( selectedTableCells );\n\t *\n\t * console.log( `Selected rows: ${ first } to ${ last }` );\n\t * ```\n\t *\n\t * @returns Returns an object with the `first` and `last` table row indexes.\n\t */\n\tpublic getRowIndexes( tableCells: Array<ModelElement> ): TableIndexesObject {\n\t\tconst indexes = tableCells.map( cell => ( cell.parent as ModelElement ).index! );\n\n\t\treturn this._getFirstLastIndexesObject( indexes );\n\t}\n\n\t/**\n\t * Returns an object with the `first` and `last` column index contained in the given `tableCells`.\n\t *\n\t * ```ts\n\t * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );\n\t *\n\t * const { first, last } = getColumnIndexes( selectedTableCells );\n\t *\n\t * console.log( `Selected columns: ${ first } to ${ last }` );\n\t * ```\n\t *\n\t * @returns Returns an object with the `first` and `last` table column indexes.\n\t */\n\tpublic getColumnIndexes( tableCells: Array<ModelElement> ): TableIndexesObject {\n\t\tconst table = tableCells[ 0 ].findAncestor( 'table' )!;\n\t\tconst tableMap = [ ...new TableWalker( table ) ];\n\n\t\tconst indexes = tableMap\n\t\t\t.filter( entry => tableCells.includes( entry.cell ) )\n\t\t\t.map( entry => entry.column );\n\n\t\treturn this._getFirstLastIndexesObject( indexes );\n\t}\n\n\t/**\n\t * Checks if the selection contains cells that do not exceed rectangular selection.\n\t *\n\t * In a table below:\n\t *\n\t *  ┌───┬───┬───┬───┐\n\t *  │ a │ b │ c │ d │\n\t *  ├───┴───┼───┤   │\n\t *  │ e     │ f │   │\n\t *  │       ├───┼───┤\n\t *  │       │ g │ h │\n\t *  └───────┴───┴───┘\n\t *\n\t * Valid selections are these which create a solid rectangle (without gaps), such as:\n\t *   - a, b (two horizontal cells)\n\t *   - c, f (two vertical cells)\n\t *   - a, b, e (cell \"e\" spans over four cells)\n\t *   - c, d, f (cell d spans over a cell in the row below)\n\t *\n\t * While an invalid selection would be:\n\t *   - a, c (the unselected cell \"b\" creates a gap)\n\t *   - f, g, h (cell \"d\" spans over a cell from the row of \"f\" cell - thus creates a gap)\n\t */\n\tpublic isSelectionRectangular( selectedTableCells: Array<ModelElement> ): boolean {\n\t\tif ( selectedTableCells.length < 2 || !this._areCellInTheSameTableSection( selectedTableCells ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// A valid selection is a fully occupied rectangle composed of table cells.\n\t\t// Below we will calculate the area of a selected table cells and the area of valid selection.\n\t\t// The area of a valid selection is defined by top-left and bottom-right cells.\n\t\tconst rows: Set<number> = new Set();\n\t\tconst columns: Set<number> = new Set();\n\n\t\tlet areaOfSelectedCells = 0;\n\n\t\tfor ( const tableCell of selectedTableCells ) {\n\t\t\tconst { row, column } = this.getCellLocation( tableCell );\n\t\t\tconst rowspan = parseInt( tableCell.getAttribute( 'rowspan' ) as string ) || 1;\n\t\t\tconst colspan = parseInt( tableCell.getAttribute( 'colspan' ) as string ) || 1;\n\n\t\t\t// Record row & column indexes of current cell.\n\t\t\trows.add( row );\n\t\t\tcolumns.add( column );\n\n\t\t\t// For cells that spans over multiple rows add also the last row that this cell spans over.\n\t\t\tif ( rowspan > 1 ) {\n\t\t\t\trows.add( row + rowspan - 1 );\n\t\t\t}\n\n\t\t\t// For cells that spans over multiple columns add also the last column that this cell spans over.\n\t\t\tif ( colspan > 1 ) {\n\t\t\t\tcolumns.add( column + colspan - 1 );\n\t\t\t}\n\n\t\t\tareaOfSelectedCells += ( rowspan * colspan );\n\t\t}\n\n\t\t// We can only merge table cells that are in adjacent rows...\n\t\tconst areaOfValidSelection = getBiggestRectangleArea( rows, columns );\n\n\t\treturn areaOfValidSelection == areaOfSelectedCells;\n\t}\n\n\t/**\n\t * Returns array of sorted ranges.\n\t */\n\tpublic sortRanges( ranges: Iterable<ModelRange> ): Array<ModelRange> {\n\t\treturn Array.from( ranges ).sort( compareRangeOrder );\n\t}\n\n\t/**\n\t * Helper method to get an object with `first` and `last` indexes from an unsorted array of indexes.\n\t */\n\tprivate _getFirstLastIndexesObject( indexes: Array<number> ): TableIndexesObject {\n\t\tconst allIndexesSorted = indexes.sort( ( indexA, indexB ) => indexA - indexB );\n\n\t\tconst first = allIndexesSorted[ 0 ];\n\t\tconst last = allIndexesSorted[ allIndexesSorted.length - 1 ];\n\n\t\treturn { first, last };\n\t}\n\n\t/**\n\t * Checks if the selection does not mix a header (column or row) with other cells.\n\t *\n\t * For instance, in the table below valid selections consist of cells with the same letter only.\n\t * So, a-a (same heading row and column) or d-d (body cells) are valid while c-d or a-b are not.\n\t *\n\t * header columns\n\t *    ↓   ↓\n\t *  ┌───┬───┬───┬───┐\n\t *  │ a │ a │ b │ b │  ← header row\n\t *  ├───┼───┼───┼───┤\n\t *  │ c │ c │ d │ d │\n\t *  ├───┼───┼───┼───┤\n\t *  │ c │ c │ d │ d │\n\t *  └───┴───┴───┴───┘\n\t */\n\tprivate _areCellInTheSameTableSection( tableCells: Array<ModelElement> ): boolean {\n\t\tconst table = tableCells[ 0 ].findAncestor( 'table' )!;\n\t\tconst totalRows = this.getRows( table );\n\n\t\tconst rowIndexes = this.getRowIndexes( tableCells );\n\t\tconst headingRows = parseInt( table.getAttribute( 'headingRows' ) as string ) || 0;\n\t\tconst footerRows = parseInt( table.getAttribute( 'footerRows' ) as string ) || 0;\n\n\t\t// Calculating row indexes is a bit cheaper so if this check fails we can't merge.\n\t\tif (\n\t\t\t!this._areIndexesInSameHeadingSection( rowIndexes, headingRows ) ||\n\t\t\t!this._areIndexesInSameFooterSection( rowIndexes, totalRows, footerRows )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst columnIndexes = this.getColumnIndexes( tableCells );\n\t\tconst headingColumns = parseInt( table.getAttribute( 'headingColumns' ) as string ) || 0;\n\n\t\t// Similarly cells must be in same column section.\n\t\treturn this._areIndexesInSameHeadingSection( columnIndexes, headingColumns );\n\t}\n\n\t/**\n\t * Unified check if table rows/columns indexes are in the same heading/body section.\n\t */\n\tprivate _areIndexesInSameHeadingSection( { first, last }: TableIndexesObject, headingSectionSize: number ): boolean {\n\t\tconst firstCellIsInHeading = first < headingSectionSize;\n\t\tconst lastCellIsInHeading = last < headingSectionSize;\n\n\t\treturn firstCellIsInHeading === lastCellIsInHeading;\n\t}\n\n\t/**\n\t * Unified check if table rows indexes are in the same footer/body section.\n\t */\n\tprivate _areIndexesInSameFooterSection( { first, last }: TableIndexesObject, totalRows: number, footerRows: number ): boolean {\n\t\tconst footerStartIndex = totalRows - footerRows;\n\n\t\tconst firstCellIsInFooter = first >= footerStartIndex;\n\t\tconst lastCellIsInFooter = last >= footerStartIndex;\n\n\t\treturn firstCellIsInFooter === lastCellIsInFooter;\n\t}\n}\n\n/**\n * Options for the {@link module:table/tableutils~TableUtils#setHeadingRowsCount} and\n * {@link module:table/tableutils~TableUtils#setHeadingColumnsCount} methods.\n */\nexport type UpdateTableHeadingsOptions = {\n\n\t/**\n\t * If set to `false` it will only update the `headingRows`/`headingColumns` attribute\n\t * without updating the cell types in the table.\n\t *\n\t * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}\n\t * is not loaded.\n\t *\n\t * @default true\n\t */\n\tupdateCellType?: boolean;\n\n\t/**\n\t * If set to `true`, it will check if the rows/columns that are no longer in the heading section\n\t * should be updated to body cells.\n\t *\n\t * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}\n\t * is not loaded.\n\t *\n\t * @default true\n\t */\n\tresetFormerHeadingCells?: boolean;\n\n\t/**\n\t * If set to `true`, it will check if the following rows/columns look like a header and expand the heading section.\n\t *\n\t * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}\n\t * is not loaded.\n\t *\n\t * @default true\n\t */\n\tautoExpand?: boolean;\n};\n\n/**\n * Creates empty rows at the given index in an existing table.\n *\n * @param insertAt The row index of row insertion.\n * @param rows The number of rows to create.\n * @param tableCellToInsert The number of cells to insert in each row.\n */\nfunction createEmptyRows(\n\twriter: ModelWriter, table: ModelElement, insertAt: number, rows: number, tableCellToInsert: number, attributes = {}\n) {\n\tconst insertedRows: Array<Array<ModelElement>> = [];\n\n\tfor ( let i = 0; i < rows; i++ ) {\n\t\tconst tableRow = writer.createElement( 'tableRow' );\n\n\t\twriter.insert( tableRow, table, insertAt );\n\n\t\tinsertedRows.push(\n\t\t\tcreateCells( tableCellToInsert, writer, writer.createPositionAt( tableRow, 'end' ), attributes )\n\t\t);\n\t}\n\n\treturn insertedRows;\n}\n\n/**\n * Creates cells at a given position.\n *\n * @param cells The number of cells to create\n */\nfunction createCells( cells: number, writer: ModelWriter, insertPosition: ModelPosition, attributes = {} ) {\n\tconst createdCells: Array<ModelElement> = [];\n\tlet currentPosition = insertPosition;\n\n\tfor ( let i = 0; i < cells; i++ ) {\n\t\tconst cell = createEmptyTableCell( writer, currentPosition, attributes );\n\n\t\tcreatedCells.push( cell );\n\n\t\tcurrentPosition = writer.createPositionAfter( cell );\n\t}\n\n\treturn createdCells;\n}\n\n/**\n * Evenly distributes the span of a cell to a number of provided cells.\n * The resulting spans will always be integer values.\n *\n * For instance breaking a span of 7 into 3 cells will return:\n *\n * ```ts\n * { newCellsSpan: 2, updatedSpan: 3 }\n * ```\n *\n * as two cells will have a span of 2 and the remainder will go the first cell so its span will change to 3.\n *\n * @param span The span value do break.\n * @param numberOfCells The number of resulting spans.\n */\nfunction breakSpanEvenly( span: number, numberOfCells: number ): { newCellsSpan: number; updatedSpan: number } {\n\tif ( span < numberOfCells ) {\n\t\treturn { newCellsSpan: 1, updatedSpan: 1 };\n\t}\n\n\tconst newCellsSpan = Math.floor( span / numberOfCells );\n\tconst updatedSpan = ( span - newCellsSpan * numberOfCells ) + newCellsSpan;\n\n\treturn { newCellsSpan, updatedSpan };\n}\n\n/**\n * Updates heading columns attribute if removing a row from head section.\n */\nfunction adjustHeadingColumns( table: ModelElement, removedColumnIndexes: TableIndexesObject, writer: ModelWriter ) {\n\tconst headingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\n\tif ( headingColumns && removedColumnIndexes.first < headingColumns ) {\n\t\tconst headingsRemoved = Math.min( headingColumns - 1 /* Other numbers are 0-based */, removedColumnIndexes.last ) -\n\t\t\tremovedColumnIndexes.first + 1;\n\n\t\twriter.setAttribute( 'headingColumns', headingColumns - headingsRemoved, table );\n\t}\n}\n\n/**\n * Calculates a new heading rows value for removing rows from heading section.\n */\nfunction updateHeadingRows( table: ModelElement, { first, last }: TableIndexesObject, writer: ModelWriter ) {\n\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\n\tif ( first < headingRows ) {\n\t\tconst newRows = last < headingRows ? headingRows - ( last - first + 1 ) : first;\n\n\t\tupdateNumericAttribute( 'headingRows', newRows, table, writer, 0 );\n\t}\n}\n\n/**\n * Calculates a new footer rows value for removing rows from footer section.\n */\nfunction updateFooterRows( table: ModelElement, totalRows: number, { first, last }: TableIndexesObject, writer: ModelWriter ) {\n\tif ( !table.hasAttribute( 'footerRows' ) ) {\n\t\treturn;\n\t}\n\n\tconst footerRows = table.getAttribute( 'footerRows' ) as number;\n\tconst footerIndex = totalRows - footerRows;\n\n\tif ( last >= footerIndex ) {\n\t\tconst newRows = first >= footerIndex ? footerRows - ( last - first + 1 ) : totalRows - 1 - last;\n\n\t\tupdateNumericAttribute( 'footerRows', newRows, table, writer, 0 );\n\t}\n}\n\n/**\n * Finds cells that will be:\n * - trimmed - Cells that are \"above\" removed rows sections and overlap the removed section - their rowspan must be trimmed.\n * - moved - Cells from removed rows section might stick out of. These cells are moved to the next row after a removed section.\n *\n * Sample table with overlapping & sticking out cells:\n *\n *      +----+----+----+----+----+\n *      | 00 | 01 | 02 | 03 | 04 |\n *      +----+    +    +    +    +\n *      | 10 |    |    |    |    |\n *      +----+----+    +    +    +\n *      | 20 | 21 |    |    |    | <-- removed row\n *      +    +    +----+    +    +\n *      |    |    | 32 |    |    | <-- removed row\n *      +----+    +    +----+    +\n *      | 40 |    |    | 43 |    |\n *      +----+----+----+----+----+\n *\n * In a table above:\n * - cells to trim: '02', '03' & '04'.\n * - cells to move: '21' & '32'.\n */\nfunction getCellsToMoveAndTrimOnRemoveRow( table: ModelElement, { first, last }: TableIndexesObject ) {\n\tconst cellsToMove: CellsToMove = new Map();\n\tconst cellsToTrim: CellsToTrim = [];\n\n\tfor ( const { row, column, cellHeight, cell } of new TableWalker( table, { endRow: last } ) ) {\n\t\tconst lastRowOfCell = row + cellHeight - 1;\n\n\t\tconst isCellStickingOutFromRemovedRows = row >= first && row <= last && lastRowOfCell > last;\n\n\t\tif ( isCellStickingOutFromRemovedRows ) {\n\t\t\tconst rowspanInRemovedSection = last - row + 1;\n\t\t\tconst rowSpanToSet = cellHeight - rowspanInRemovedSection;\n\n\t\t\tcellsToMove.set( column, {\n\t\t\t\tcell,\n\t\t\t\trowspan: rowSpanToSet\n\t\t\t} );\n\t\t}\n\n\t\tconst isCellOverlappingRemovedRows = row < first && lastRowOfCell >= first;\n\n\t\tif ( isCellOverlappingRemovedRows ) {\n\t\t\tlet rowspanAdjustment;\n\n\t\t\t// Cell fully covers removed section - trim it by removed rows count.\n\t\t\tif ( lastRowOfCell >= last ) {\n\t\t\t\trowspanAdjustment = last - first + 1;\n\t\t\t}\n\t\t\t// Cell partially overlaps removed section - calculate cell's span that is in removed section.\n\t\t\telse {\n\t\t\t\trowspanAdjustment = lastRowOfCell - first + 1;\n\t\t\t}\n\n\t\t\tcellsToTrim.push( {\n\t\t\t\tcell,\n\t\t\t\trowspan: cellHeight - rowspanAdjustment\n\t\t\t} );\n\t\t}\n\t}\n\n\treturn { cellsToMove, cellsToTrim };\n}\n\nfunction moveCellsToRow( table: ModelElement, targetRowIndex: number, cellsToMove: CellsToMove, writer: ModelWriter ) {\n\tconst tableWalker = new TableWalker( table, {\n\t\tincludeAllSlots: true,\n\t\trow: targetRowIndex\n\t} );\n\n\tconst tableRowMap = [ ...tableWalker ];\n\tconst row = table.getChild( targetRowIndex )!;\n\n\tlet previousCell;\n\n\tfor ( const { column, cell, isAnchor } of tableRowMap ) {\n\t\tif ( cellsToMove.has( column ) ) {\n\t\t\tconst { cell: cellToMove, rowspan } = cellsToMove.get( column )!;\n\n\t\t\tconst targetPosition = previousCell ?\n\t\t\t\twriter.createPositionAfter( previousCell ) :\n\t\t\t\twriter.createPositionAt( row, 0 );\n\n\t\t\twriter.move( writer.createRangeOn( cellToMove ), targetPosition );\n\t\t\tupdateNumericAttribute( 'rowspan', rowspan, cellToMove, writer );\n\n\t\t\tpreviousCell = cellToMove;\n\t\t} else if ( isAnchor ) {\n\t\t\t// If cell is spanned then `cell` holds reference to overlapping cell. See https://github.com/ckeditor/ckeditor5/issues/6502.\n\t\t\tpreviousCell = cell;\n\t\t}\n\t}\n}\n\nfunction compareRangeOrder( rangeA: ModelRange, rangeB: ModelRange ) {\n\t// Since table cell ranges are disjoint, it's enough to check their start positions.\n\tconst posA = rangeA.start;\n\tconst posB = rangeB.start;\n\n\t// Checking for equal position (returning 0) is not needed because this would be either:\n\t// a. Intersecting range (not allowed by model)\n\t// b. Collapsed range on the same position (allowed by model but should not happen).\n\treturn posA.isBefore( posB ) ? -1 : 1;\n}\n\n/**\n * Calculates the area of a maximum rectangle that can span over the provided row & column indexes.\n */\nfunction getBiggestRectangleArea( rows: Set<number>, columns: Set<number> ): number {\n\tconst rowsIndexes = Array.from( rows.values() );\n\tconst columnIndexes = Array.from( columns.values() );\n\n\tconst lastRow = Math.max( ...rowsIndexes );\n\tconst firstRow = Math.min( ...rowsIndexes );\n\tconst lastColumn = Math.max( ...columnIndexes );\n\tconst firstColumn = Math.min( ...columnIndexes );\n\n\treturn ( lastRow - firstRow + 1 ) * ( lastColumn - firstColumn + 1 );\n}\n\n/**\n * Updates the `tableCellType` attribute of a table cell based on its position in the table\n * and the table's `headingRows` and `headingColumns` attributes.\n */\nfunction updateTableCellType(\n\t{\n\t\twriter,\n\t\ttable,\n\t\trow,\n\t\tcolumn,\n\t\tcell,\n\t\tscopedHeaders\n\t}: {\n\t\twriter: ModelWriter;\n\t\ttable: ModelElement;\n\t\trow: number;\n\t\tcolumn: number;\n\t\tcell: ModelElement;\n\t\tscopedHeaders?: boolean;\n\t}\n) {\n\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\tconst headingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\n\tif ( row >= headingRows && column >= headingColumns ) {\n\t\twriter.removeAttribute( 'tableCellType', cell );\n\t\treturn;\n\t}\n\n\tlet headerCellType: TableCellType = 'header';\n\n\t// If scoped headers are enabled, we prefer to set 'row' or 'column' header types depending on the position.\n\tif ( scopedHeaders ) {\n\t\tif ( row < headingRows ) {\n\t\t\theaderCellType = 'header-column';\n\t\t} else {\n\t\t\theaderCellType = 'header-row';\n\t\t}\n\t}\n\n\twriter.setAttribute( 'tableCellType', headerCellType, cell );\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/**\n * @module table/utils/table-properties\n */\n\nimport type { BoxStyleSides } from '@ckeditor/ckeditor5-engine';\nimport { isObject } from 'es-toolkit/compat';\n\n/**\n * Returns a string if all four values of box sides are equal.\n *\n * If a string is passed, it is treated as a single value (pass-through).\n *\n * ```ts\n * // Returns 'foo':\n * getSingleValue( { top: 'foo', right: 'foo', bottom: 'foo', left: 'foo' } );\n * getSingleValue( 'foo' );\n *\n * // Returns undefined:\n * getSingleValue( { top: 'foo', right: 'foo', bottom: 'bar', left: 'foo' } );\n * getSingleValue( { top: 'foo', right: 'foo' } );\n * ```\n *\n * @internal\n */\nexport function getSingleValue( objectOrString: BoxStyleSides | string | undefined ): string | undefined {\n\tif ( !objectOrString || !isObject( objectOrString ) ) {\n\t\treturn objectOrString;\n\t}\n\n\tconst { top, right, bottom, left } = objectOrString;\n\n\tif ( top == right && right == bottom && bottom == left ) {\n\t\treturn top!;\n\t}\n}\n\n/**\n * Adds a unit to a value if the value is a number or a string representing a number.\n *\n * **Note**: It does nothing to non-numeric values.\n *\n * ```ts\n * getSingleValue( 25, 'px' ); // '25px'\n * getSingleValue( 25, 'em' ); // '25em'\n * getSingleValue( '25em', 'px' ); // '25em'\n * getSingleValue( 'foo', 'px' ); // 'foo'\n * ```\n *\n * @internal\n * @param defaultUnit A default unit added to a numeric value.\n */\nexport function addDefaultUnitToNumericValue( value: string | number | undefined, defaultUnit: string ): string | number | undefined {\n\tconst numericValue = parseFloat( value as any );\n\n\tif ( Number.isNaN( numericValue ) ) {\n\t\treturn value;\n\t}\n\n\tif ( String( numericValue ) !== String( value ) ) {\n\t\treturn value;\n\t}\n\n\treturn `${ numericValue }${ defaultUnit }`;\n}\n\n/**\n * Interface representing the normalized default properties for table and cell elements.\n *\n * @internal\n */\nexport interface NormalizedDefaultProperties {\n\tborderStyle: string;\n\tborderWidth: string;\n\tborderColor: string;\n\tbackgroundColor: string;\n\twidth: string;\n\theight: string;\n\talignment?: string;\n\tpadding?: string;\n\tverticalAlignment?: string;\n\thorizontalAlignment?: string;\n}\n\n/**\n * Options used to determine which properties should be added to the normalized configuration.\n *\n * @internal\n */\nexport type NormalizeTableDefaultPropertiesOptions = {\n\n\t/**\n\t * Whether the \"alignment\" property should be added.\n\t */\n\tincludeAlignmentProperty?: boolean;\n\n\t/**\n\t * Whether the \"padding\" property should be added.\n\t */\n\tincludePaddingProperty?: boolean;\n\n\t/**\n\t * Whether the \"verticalAlignment\" property should be added.\n\t */\n\tincludeVerticalAlignmentProperty?: boolean;\n\n\t/**\n\t * Whether the \"horizontalAlignment\" property should be added.\n\t */\n\tincludeHorizontalAlignmentProperty?: boolean;\n\n\t/**\n\t * Whether the content is right-to-left.\n\t */\n\tisRightToLeftContent?: boolean;\n};\n\n/**\n * Returns the normalized configuration.\n *\n * @internal\n * @param config The configuration to normalize.\n * @param options Options used to determine which properties should be added.\n */\nexport function getNormalizedDefaultProperties(\n\tconfig?: Partial<NormalizedDefaultProperties>,\n\toptions: NormalizeTableDefaultPropertiesOptions = {}\n): NormalizedDefaultProperties {\n\tconst normalizedConfig: NormalizedDefaultProperties = {\n\t\tborderStyle: 'none',\n\t\tborderWidth: '',\n\t\tborderColor: '',\n\t\tbackgroundColor: '',\n\t\twidth: '',\n\t\theight: '',\n\t\t...config\n\t};\n\n\tif ( options.includeAlignmentProperty && !normalizedConfig.alignment ) {\n\t\tnormalizedConfig.alignment = 'center';\n\t}\n\n\tif ( options.includePaddingProperty && !normalizedConfig.padding ) {\n\t\tnormalizedConfig.padding = '';\n\t}\n\n\tif ( options.includeVerticalAlignmentProperty && !normalizedConfig.verticalAlignment ) {\n\t\tnormalizedConfig.verticalAlignment = 'middle';\n\t}\n\n\tif ( options.includeHorizontalAlignmentProperty && !normalizedConfig.horizontalAlignment ) {\n\t\tnormalizedConfig.horizontalAlignment = options.isRightToLeftContent ? 'right' : 'left';\n\t}\n\n\treturn normalizedConfig;\n}\n\n/**\n * Returns the normalized default table properties.\n *\n * @internal\n * @param config The configuration to normalize.\n * @param options Options used to determine which properties should be added.\n */\nexport function getNormalizedDefaultTableProperties(\n\tconfig?: Partial<NormalizedDefaultProperties>,\n\toptions?: NormalizeTableDefaultPropertiesOptions\n): NormalizedDefaultProperties {\n\treturn getNormalizedDefaultProperties( {\n\t\t// It adds support for border none in the table element, keep it in sync with the content styles\n\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/6841#issuecomment-1959195608\n\t\tborderStyle: 'double',\n\t\tborderColor: 'hsl(0, 0%, 70%)',\n\t\tborderWidth: '1px',\n\t\t...config\n\t}, options );\n}\n\n/**\n * Returns the normalized default cell properties.\n *\n * @internal\n * @param config The configuration to normalize.\n * @param options Options used to determine which properties should be added.\n */\nexport function getNormalizedDefaultCellProperties(\n\tconfig?: Partial<NormalizedDefaultProperties>,\n\toptions?: NormalizeTableDefaultPropertiesOptions\n): NormalizedDefaultProperties {\n\treturn getNormalizedDefaultProperties( {\n\t\t// It adds support for border none in the table element, keep it in sync with the content styles\n\t\t// See more: https://github.com/ckeditor/ckeditor5/issues/6841#issuecomment-1959195608\n\t\tborderStyle: 'solid',\n\t\tborderColor: 'hsl(0, 0%, 75%)',\n\t\tborderWidth: '1px',\n\t\t...config\n\t}, options );\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/**\n * @module table/converters/downcast\n */\n\nimport { type Editor } from '@ckeditor/ckeditor5-core';\nimport { toWidget, toWidgetEditable } from '@ckeditor/ckeditor5-widget';\nimport type {\n\tModelNode,\n\tViewElement,\n\tViewElementAttributes,\n\tModelElement,\n\tViewDowncastWriter,\n\tDowncastElementCreatorFunction,\n\tViewContainerElement,\n\tDowncastConversionApi\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableUtils } from '../tableutils.js';\nimport type { TableConversionAdditionalSlot } from '../tableediting.js';\nimport { downcastTableAlignmentConfig, type TableAlignmentValues } from './tableproperties.js';\nimport { getNormalizedDefaultTableProperties } from '../utils/table-properties.js';\nimport { TableWalker } from '../tablewalker.js';\nimport { isTableHeaderCellType, type TableCellType } from '../tablecellproperties/tablecellpropertiesutils.js';\n\n/**\n * Model table element to view table element conversion helper.\n *\n * @internal\n */\nexport function downcastTable( tableUtils: TableUtils, options: DowncastTableOptions ): DowncastElementCreatorFunction {\n\treturn ( table, { writer } ) => {\n\t\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\t\tconst footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\t\tconst tableElement = writer.createContainerElement( 'table', null, [] );\n\t\tconst figureElement = writer.createContainerElement( 'figure', { class: 'table' }, tableElement );\n\t\tconst totalRows = tableUtils.getRows( table );\n\n\t\t// Table head slot.\n\t\tif ( headingRows > 0 ) {\n\t\t\twriter.insert(\n\t\t\t\twriter.createPositionAt( tableElement, 'end' ),\n\t\t\t\twriter.createContainerElement(\n\t\t\t\t\t'thead',\n\t\t\t\t\tnull,\n\t\t\t\t\twriter.createSlot( element => element.is( 'element', 'tableRow' ) && element.index! < headingRows )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Table body slot.\n\t\tif ( headingRows + footerRows < totalRows ) {\n\t\t\twriter.insert(\n\t\t\t\twriter.createPositionAt( tableElement, 'end' ),\n\t\t\t\twriter.createContainerElement(\n\t\t\t\t\t'tbody',\n\t\t\t\t\tnull,\n\t\t\t\t\twriter.createSlot( element =>\n\t\t\t\t\t\telement.is( 'element', 'tableRow' ) &&\n\t\t\t\t\t\telement.index! >= headingRows &&\n\t\t\t\t\t\telement.index! < totalRows - footerRows\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Table foot slot.\n\t\tif ( footerRows > 0 ) {\n\t\t\twriter.insert(\n\t\t\t\twriter.createPositionAt( tableElement, 'end' ),\n\t\t\t\twriter.createContainerElement(\n\t\t\t\t\t'tfoot',\n\t\t\t\t\tnull,\n\t\t\t\t\twriter.createSlot( element =>\n\t\t\t\t\t\telement.is( 'element', 'tableRow' ) &&\n\t\t\t\t\t\telement.index! >= totalRows - footerRows\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Dynamic slots.\n\t\tfor ( const { positionOffset, filter } of options.additionalSlots ) {\n\t\t\twriter.insert(\n\t\t\t\twriter.createPositionAt( tableElement, positionOffset ),\n\t\t\t\twriter.createSlot( filter )\n\t\t\t);\n\t\t}\n\n\t\t// Create a slot with items that don't fit into the table.\n\t\twriter.insert(\n\t\t\twriter.createPositionAt( tableElement, 'after' ),\n\t\t\twriter.createSlot( element => {\n\t\t\t\tif ( element.is( 'element', 'tableRow' ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn !options.additionalSlots.some( ( { filter } ) => filter( element ) );\n\t\t\t} )\n\t\t);\n\n\t\treturn options.asWidget ? toTableWidget( figureElement, writer ) : figureElement;\n\t};\n}\n\n/**\n * Model table row element to view `<tr>` element conversion helper.\n *\n * @internal\n * @returns Element creator.\n */\nexport function downcastRow(): DowncastElementCreatorFunction {\n\treturn ( tableRow, { writer } ) => {\n\t\treturn tableRow.isEmpty ?\n\t\t\twriter.createEmptyElement( 'tr' ) :\n\t\t\twriter.createContainerElement( 'tr' );\n\t};\n}\n\n/**\n * Model table cell element to view `<td>` or `<th>` element conversion helper.\n *\n * This conversion helper will create proper `<th>` elements for table cells that are in the heading section (heading row or column)\n * and `<td>` otherwise.\n *\n * @internal\n * @param options.asWidget If set to `true`, the downcast conversion will produce a widget.\n * @param options.cellTypeEnabled If returns `true`, the downcast conversion will use the `tableCellType` attribute to determine cell type.\n * @returns Element creator.\n */\nexport function downcastCell( options: { asWidget?: boolean; cellTypeEnabled: () => boolean } ): DowncastElementCreatorFunction {\n\treturn ( tableCell, { writer } ) => {\n\t\t// If the table cell type feature is enabled, then we can simply check the cell type attribute.\n\t\tif ( options.cellTypeEnabled?.() ) {\n\t\t\tconst tableCellType = tableCell.getAttribute( 'tableCellType' ) as TableCellType;\n\t\t\tconst cellElementName: 'td' | 'th' = (\n\t\t\t\tisTableHeaderCellType( tableCellType ) ?\n\t\t\t\t\t'th' :\n\t\t\t\t\t'td'\n\t\t\t);\n\n\t\t\treturn createCellElement( writer, cellElementName );\n\t\t}\n\n\t\t// If the table cell type feature is not enabled, we should iterate through the table structure\n\t\t// to determine whether the cell is in the heading section.\n\t\tconst tableRow = tableCell.parent as ModelElement;\n\t\tconst table = tableRow.parent as ModelElement;\n\t\tconst rowIndex = table.getChildIndex( tableRow )!;\n\n\t\tconst tableWalker = new TableWalker( table, { row: rowIndex } );\n\t\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\t\tconst headingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\n\t\tlet result: ViewElement | null = null;\n\n\t\t// We need to iterate over a table in order to get proper row & column values from a walker.\n\t\tfor ( const tableSlot of tableWalker ) {\n\t\t\tif ( tableSlot.cell == tableCell ) {\n\t\t\t\tconst isHeading = tableSlot.row < headingRows || tableSlot.column < headingColumns;\n\n\t\t\t\tresult = createCellElement( writer, isHeading ? 'th' : 'td' );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tfunction createCellElement( writer: ViewDowncastWriter, name: string ) {\n\t\treturn (\n\t\t\toptions.asWidget ?\n\t\t\t\ttoWidgetEditable( writer.createEditableElement( name ), writer, { withAriaRole: false } ) :\n\t\t\t\twriter.createContainerElement( name )\n\t\t);\n\t}\n}\n\n/**\n * Overrides paragraph inside table cell conversion.\n *\n * This converter:\n * * should be used to override default paragraph conversion.\n * * It will only convert `<paragraph>` placed directly inside `<tableCell>`.\n * * For a single paragraph without attributes it returns `<span>` to simulate data table.\n * * For all other cases it returns `<p>` element.\n *\n * @internal\n * @param options.asWidget If set to `true`, the downcast conversion will produce a widget.\n * @returns Element creator.\n */\nexport function convertParagraphInTableCell( options: { asWidget?: boolean } = {} ): DowncastElementCreatorFunction {\n\treturn ( modelElement, { writer } ) => {\n\t\tif ( !modelElement.parent!.is( 'element', 'tableCell' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( !isSingleParagraphWithoutAttributes( modelElement ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( options.asWidget ) {\n\t\t\treturn writer.createContainerElement( 'span', { class: 'ck-table-bogus-paragraph' } );\n\t\t} else {\n\t\t\t// Using `<p>` in case there are some markers on it and transparentRendering will render it anyway.\n\t\t\tconst viewElement = writer.createContainerElement( 'p' );\n\n\t\t\twriter.setCustomProperty( 'dataPipeline:transparentRendering', true, viewElement );\n\n\t\t\treturn viewElement;\n\t\t}\n\t};\n}\n\n/**\n * Checks if given model `<paragraph>` is an only child of a parent (`<tableCell>`) and if it has any attribute set.\n *\n * The paragraph should be converted in the editing view to:\n *\n * * If returned `true` - to a `<span class=\"ck-table-bogus-paragraph\">`\n * * If returned `false` - to a `<p>`\n *\n * @internal\n */\nexport function isSingleParagraphWithoutAttributes( modelElement: ModelElement ): boolean {\n\tconst tableCell = modelElement.parent!;\n\n\tconst isSingleParagraph = tableCell.childCount == 1;\n\n\treturn isSingleParagraph && !hasAnyAttribute( modelElement );\n}\n\n/**\n * Converts a given {@link module:engine/view/element~ViewElement} to a table widget:\n * * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}\n * allowing to recognize the table widget element.\n * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n *\n * @param writer An instance of the view writer.\n * @param label The element's label. It will be concatenated with the table `alt` attribute if one is present.\n */\nfunction toTableWidget( viewElement: ViewElement, writer: ViewDowncastWriter ): ViewElement {\n\twriter.setCustomProperty( 'table', true, viewElement );\n\n\treturn toWidget( viewElement, writer, { hasSelectionHandle: true } );\n}\n\n/**\n * Checks if an element has any attributes set.\n */\nfunction hasAnyAttribute( element: ModelNode ): boolean {\n\tfor ( const attributeKey of element.getAttributeKeys() ) {\n\t\t// Ignore selection attributes stored on block elements.\n\t\tif ( attributeKey.startsWith( 'selection:' ) || attributeKey == 'htmlEmptyBlock' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * Downcasts a plain table (also used in the clipboard pipeline).\n */\nexport function convertPlainTable( editor: Editor ): DowncastElementCreatorFunction {\n\treturn ( table, conversionApi ) => {\n\t\tconst hasPlainTableOutput = editor.plugins.has( 'PlainTableOutput' );\n\t\tconst isClipboardPipeline = conversionApi.options.isClipboardPipeline;\n\t\tconst stripFigureTagWithLayoutTable = shouldStripFigureTagWithLayoutTable( editor, table );\n\n\t\tif (\n\t\t\thasPlainTableOutput ||\n\t\t\tstripFigureTagWithLayoutTable ||\n\t\t\tisClipboardPipeline\n\t\t) {\n\t\t\treturn downcastPlainTable( table, conversionApi, editor );\n\t\t}\n\n\t\treturn null;\n\t};\n}\n\n/**\n * Downcasts a plain table caption (also used in the clipboard pipeline).\n */\nexport function convertPlainTableCaption( editor: Editor ): DowncastElementCreatorFunction {\n\treturn ( modelElement, { writer, options } ) => {\n\t\tconst hasPlainTableOutput = editor.plugins.has( 'PlainTableOutput' );\n\t\tconst isClipboardPipeline = options.isClipboardPipeline;\n\t\tconst stripFigureTagWithLayoutTable = shouldStripFigureTagWithLayoutTable( editor, modelElement );\n\n\t\tif (\n\t\t\t!(\n\t\t\t\thasPlainTableOutput ||\n\t\t\t\tstripFigureTagWithLayoutTable ||\n\t\t\t\tisClipboardPipeline\n\t\t\t)\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( modelElement.parent!.name === 'table' ) {\n\t\t\treturn writer.createContainerElement( 'caption' );\n\t\t}\n\n\t\treturn null;\n\t};\n}\n\n/**\n * Downcasts a plain table.\n *\n * @param table Table model element.\n * @param conversionApi The conversion API object.\n * @param editor The editor instance.\n * @returns Created element.\n */\nexport function downcastPlainTable(\n\ttable: ModelElement,\n\tconversionApi: DowncastConversionApi,\n\teditor: Editor\n): ViewElement {\n\tconst tableUtils = editor.plugins.get( TableUtils );\n\n\tconst writer = conversionApi.writer;\n\tconst totalRows = tableUtils.getRows( table );\n\n\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\tconst footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\tconst footerIndex = totalRows - footerRows;\n\n\t// Table head rows slot.\n\tconst headRowsSlot = writer.createSlot( ( element: ModelNode ) =>\n\t\telement.is( 'element', 'tableRow' ) && element.index! < headingRows\n\t);\n\n\t// Table body rows slot.\n\tconst bodyRowsSlot = writer.createSlot(\n\t\t( element: ModelNode ) =>\n\t\t\telement.is( 'element', 'tableRow' ) &&\n\t\t\telement.index! >= headingRows &&\n\t\t\telement.index! < footerIndex\n\t);\n\n\tconst footerRowsSlot = writer.createSlot( ( element: ModelNode ) =>\n\t\telement.is( 'element', 'tableRow' ) && element.index! >= footerIndex\n\t);\n\n\t// Table children slot.\n\tconst childrenSlot = writer.createSlot( ( element: ModelNode ) => !element.is( 'element', 'tableRow' ) );\n\n\t// Table <thead> element with all the heading rows.\n\tconst theadElement = writer.createContainerElement( 'thead', null, headRowsSlot );\n\n\t// Table <tbody> element with all the body rows.\n\tconst tbodyElement = writer.createContainerElement( 'tbody', null, bodyRowsSlot );\n\n\t// Table <tfoot> element with all the footer rows.\n\tconst tfootElement = writer.createContainerElement( 'tfoot', null, footerRowsSlot );\n\n\t// Table contents element containing <thead> and <tbody> when necessary.\n\tconst tableContentElements: Array<ViewContainerElement> = [];\n\n\tif ( headingRows ) {\n\t\ttableContentElements.push( theadElement );\n\t}\n\n\tif ( headingRows + footerRows < totalRows ) {\n\t\ttableContentElements.push( tbodyElement );\n\t}\n\n\tif ( footerRows ) {\n\t\ttableContentElements.push( tfootElement );\n\t}\n\n\tconst tableAttributes: ViewElementAttributes = { class: 'table' };\n\n\tif ( editor.plugins.has( 'TablePropertiesEditing' ) && conversionApi.options.isClipboardPipeline ) {\n\t\tconst defaultTableProperties = getNormalizedDefaultTableProperties(\n\t\t\teditor.config.get( 'table.tableProperties.defaultProperties' )!,\n\t\t\t{\n\t\t\t\tincludeAlignmentProperty: true\n\t\t\t}\n\t\t);\n\n\t\tconst tableAlignment = table.getAttribute( 'tableAlignment' ) as TableAlignmentValues | undefined;\n\n\t\tlet localDefaultValue = defaultTableProperties.alignment;\n\n\t\tif ( table.getAttribute( 'tableType' ) === 'layout' ) {\n\t\t\tlocalDefaultValue = '';\n\t\t}\n\n\t\tconst tableAlignmentValue = tableAlignment || localDefaultValue as TableAlignmentValues | undefined;\n\n\t\tif ( tableAlignmentValue ) {\n\t\t\ttableAttributes.class += ' ' + downcastTableAlignmentConfig[ tableAlignmentValue ].className;\n\t\t\ttableAttributes.style = downcastTableAlignmentConfig[ tableAlignmentValue ].style;\n\n\t\t\tif ( downcastTableAlignmentConfig[ tableAlignmentValue ].align !== undefined ) {\n\t\t\t\ttableAttributes.align = downcastTableAlignmentConfig[ tableAlignmentValue ].align;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Create table structure.\n\t//\n\t// <table>\n\t//    {children-slot-like-caption}\n\t//    <thead>\n\t//        {table-head-rows-slot}\n\t//    </thead>\n\t//    <tbody>\n\t//        {table-body-rows-slot}\n\t//    </tbody>\n\t//    <tfoot>\n\t//        {table-foot-rows-slot}\n\t//    </tfoot>\n\t// </table>\n\treturn writer.createContainerElement( 'table', tableAttributes, [ childrenSlot, ...tableContentElements ] );\n}\n\n/**\n * Registers border and background attributes converters for plain tables or when the clipboard pipeline is used.\n */\nexport function downcastTableBorderAndBackgroundAttributes( editor: Editor ): void {\n\tconst modelAttributes = {\n\t\t'border-width': 'tableBorderWidth',\n\t\t'border-color': 'tableBorderColor',\n\t\t'border-style': 'tableBorderStyle',\n\t\t'background-color': 'tableBackgroundColor'\n\t};\n\n\tfor ( const [ styleName, modelAttribute ] of Object.entries( modelAttributes ) ) {\n\t\teditor.conversion.for( 'dataDowncast' ).add( dispatcher => {\n\t\t\treturn dispatcher.on( `attribute:${ modelAttribute }:table`, ( evt, data, conversionApi ) => {\n\t\t\t\tconst { item, attributeNewValue } = data;\n\t\t\t\tconst { mapper, writer } = conversionApi;\n\n\t\t\t\tconst hasPlainTableOutput = editor.plugins.has( 'PlainTableOutput' );\n\t\t\t\tconst isClipboardPipeline = conversionApi.options.isClipboardPipeline;\n\t\t\t\tconst stripFigureTagWithLayoutTable = shouldStripFigureTagWithLayoutTable( editor, item );\n\n\t\t\t\tif (\n\t\t\t\t\t!(\n\t\t\t\t\t\thasPlainTableOutput ||\n\t\t\t\t\t\tstripFigureTagWithLayoutTable ||\n\t\t\t\t\t\tisClipboardPipeline\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( !conversionApi.consumable.consume( item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst table = mapper.toViewElement( item );\n\n\t\t\t\tif ( attributeNewValue ) {\n\t\t\t\t\twriter.setStyle( styleName, attributeNewValue, table );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeStyle( styleName, table );\n\t\t\t\t}\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\t}\n}\n\n/**\n * Returns `true` if the figure tag should be stripped when using layout tables and when `tableType` is `layout`\n * or `stripFigureFromContentTable` option is set to `true`, `false` otherwise.\n *\n * @param editor The editor instance.\n * @param modelElement The model element to check.\n * @returns `true` if the figure tag should be stripped, `false` otherwise.\n */\nfunction shouldStripFigureTagWithLayoutTable( editor: Editor, modelElement: ModelElement ) {\n\tconst hasTableLayout = editor.plugins.has( 'TableLayoutEditing' );\n\tconst stripFigureFromContentTable = editor.config.get( 'table.tableLayout.stripFigureFromContentTable' ) ?? false;\n\tconst tableModelElement = modelElement.findAncestor( 'table', { includeSelf: true } );\n\tconst tableType = tableModelElement?.getAttribute( 'tableType' );\n\n\treturn hasTableLayout && ( stripFigureFromContentTable || tableType === 'layout' );\n}\n\n/**\n * Options for the downcast table conversion.\n *\n * @internal\n */\nexport interface DowncastTableOptions {\n\n\t/**\n\t * If set to `true`, the downcast conversion will produce a widget.\n\t */\n\tasWidget?: boolean;\n\n\t/**\n\t * Array of additional slot handlers.\n\t */\n\tadditionalSlots: Array<TableConversionAdditionalSlot>;\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/**\n * @module table/commands/inserttablecommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tModelDocumentSelection,\n\ttype ModelSchema,\n\ttype ModelSelection,\n\ttype ModelElement\n} from '@ckeditor/ckeditor5-engine';\nimport { _getCopyOnEnterAttributes } from '@ckeditor/ckeditor5-enter';\nimport { type TableUtils } from '../tableutils.js';\nimport { getEmptyTableCellBlocks } from '../utils/common.js';\n\n/**\n * The insert table command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTable'` editor command.\n *\n * To insert a table at the current selection, execute the command and specify the dimensions:\n *\n * ```ts\n * editor.execute( 'insertTable', { rows: 20, columns: 5 } );\n * ```\n */\nexport class InsertTableCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst schema = model.schema;\n\n\t\tthis.isEnabled = isAllowedInParent( selection, schema );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * Inserts a table with the given number of rows and columns into the editor.\n\t *\n\t * @param options.rows The number of rows to create in the inserted table. Default value is 2.\n\t * @param options.columns The number of columns to create in the inserted table. Default value is 2.\n\t * @param options.headingRows The number of heading rows. If not provided it will default to\n\t * {@link module:table/tableconfig~TableConfig#defaultHeadings `config.table.defaultHeadings.rows`} table config.\n\t * @param options.headingColumns The number of heading columns. If not provided it will default to\n\t * {@link module:table/tableconfig~TableConfig#defaultHeadings `config.table.defaultHeadings.columns`} table config.\n\t * @param options.footerRows The number of footer rows. If not provided it will default to\n\t * {@link module:table/tableconfig~TableConfig#defaultFooters `config.table.defaultFooters`} table config.\n\t * This option is ignored when {@link module:table/tableconfig~TableConfig#enableFooters `config.table.enableFooters`} is `false`.\n\t * @param options.inheritTextFormattingAttributes Whether every empty cell should inherit the `copyOnEnter` text\n\t * formatting attributes (e.g. bold, font color) that were uniformly active in the content right before\n\t * the table, so that whichever cell the user starts typing in first continues that formatting. Defaults\n\t * to `true`.\n\t * @fires execute\n\t */\n\tpublic override execute(\n\t\toptions: {\n\t\t\trows?: number;\n\t\t\tcolumns?: number;\n\t\t\theadingRows?: number;\n\t\t\theadingColumns?: number;\n\t\t\tfooterRows?: number;\n\t\t\tinheritTextFormattingAttributes?: boolean;\n\t\t} = {}\n\t): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\tconst tableUtils: TableUtils = editor.plugins.get( 'TableUtils' );\n\t\tconst areTableFootersEnabled = !!editor.config.get( 'table.enableFooters' );\n\n\t\tconst defaultRows = editor.config.get( 'table.defaultHeadings.rows' );\n\t\tconst defaultColumns = editor.config.get( 'table.defaultHeadings.columns' );\n\t\tconst defaultFooterRows = editor.config.get( 'table.defaultFooters' );\n\n\t\tif ( options.headingRows === undefined && defaultRows ) {\n\t\t\toptions.headingRows = defaultRows;\n\t\t}\n\n\t\tif ( options.headingColumns === undefined && defaultColumns ) {\n\t\t\toptions.headingColumns = defaultColumns;\n\t\t}\n\n\t\tif ( areTableFootersEnabled && options.footerRows === undefined && defaultFooterRows ) {\n\t\t\toptions.footerRows = defaultFooterRows;\n\t\t}\n\n\t\tif ( !areTableFootersEnabled && 'footerRows' in options ) {\n\t\t\tdelete options.footerRows;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst selectionAttributesToCopy = Array.from(\n\t\t\t\t_getCopyOnEnterAttributes( model.schema, selection.getAttributes() )\n\t\t\t);\n\n\t\t\tconst table = tableUtils.createTable( writer, options );\n\n\t\t\tmodel.insertObject( table, null, null, { findOptimalPosition: 'auto' } );\n\n\t\t\twriter.setSelection( writer.createPositionAt( table.getNodeByPath( [ 0, 0, 0 ] ), 0 ) );\n\n\t\t\tif ( options.inheritTextFormattingAttributes !== false && selectionAttributesToCopy.length ) {\n\t\t\t\tfor ( const cellBlock of getEmptyTableCellBlocks( table ) ) {\n\t\t\t\t\tfor ( const [ key, value ] of selectionAttributesToCopy ) {\n\t\t\t\t\t\twriter.setAttribute( ModelDocumentSelection._getStoreAttributeKey( key ), value, cellBlock );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Checks if the table is allowed in the parent.\n */\nfunction isAllowedInParent( selection: ModelSelection | ModelDocumentSelection, schema: ModelSchema ) {\n\tconst positionParent = selection.getFirstPosition()!.parent;\n\tconst validParent = positionParent === positionParent.root ? positionParent : positionParent.parent;\n\n\treturn schema.checkChild( validParent as ModelElement, 'table' );\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/**\n * @module table/commands/insertrowcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { type TableUtils } from '../tableutils.js';\n\n/**\n * The insert row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTableRowBelow'` and\n * `'insertTableRowAbove'` editor commands.\n *\n * To insert a row below the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableRowBelow' );\n * ```\n *\n * To insert a row above the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableRowAbove' );\n * ```\n */\nexport class InsertRowCommand extends Command {\n\t/**\n\t * The order of insertion relative to the row in which the caret is located.\n\t */\n\tpublic readonly order: 'above' | 'below';\n\n\t/**\n\t * Creates a new `InsertRowCommand` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t * @param options.order The order of insertion relative to the row in which the caret is located.\n\t * Possible values: `\"above\"` and `\"below\"`. Default value is \"below\"\n\t */\n\tconstructor( editor: Editor, options: { order?: 'above' | 'below' } = {} ) {\n\t\tsuper( editor );\n\n\t\tthis.order = options.order || 'below';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst isAnyCellSelected = !!tableUtils.getSelectionAffectedTableCells( selection ).length;\n\n\t\tthis.isEnabled = isAnyCellSelected;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * Depending on the command's {@link #order} value, it inserts a row `'below'` or `'above'` the row in which selection is set.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst tableUtils: TableUtils = editor.plugins.get( 'TableUtils' );\n\t\tconst insertAbove = this.order === 'above';\n\n\t\tconst affectedTableCells = tableUtils.getSelectionAffectedTableCells( selection );\n\t\tconst rowIndexes = tableUtils.getRowIndexes( affectedTableCells );\n\n\t\tconst row = insertAbove ? rowIndexes.first : rowIndexes.last;\n\t\tconst table = affectedTableCells[ 0 ].findAncestor( 'table' )!;\n\n\t\ttableUtils.insertRows( table, { at: insertAbove ? row : row + 1, copyStructureFromAbove: !insertAbove } );\n\t}\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/**\n * @module table/commands/insertcolumncommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { type TableUtils } from '../tableutils.js';\n\n/**\n * The insert column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTableColumnLeft'` and\n * `'insertTableColumnRight'` editor commands.\n *\n * To insert a column to the left of the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableColumnLeft' );\n * ```\n *\n * To insert a column to the right of the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableColumnRight' );\n * ```\n */\nexport class InsertColumnCommand extends Command {\n\t/**\n\t * The order of insertion relative to the column in which the caret is located.\n\t */\n\tpublic readonly order: 'left' | 'right';\n\n\t/**\n\t * Creates a new `InsertColumnCommand` instance.\n\t *\n\t * @param editor An editor on which this command will be used.\n\t * @param options.order The order of insertion relative to the column in which the caret is located.\n\t * Possible values: `\"left\"` and `\"right\"`. Default value is \"right\".\n\t */\n\tconstructor( editor: Editor, options: { order?: 'left' | 'right' } = {} ) {\n\t\tsuper( editor );\n\n\t\tthis.order = options.order || 'right';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst isAnyCellSelected = !!tableUtils.getSelectionAffectedTableCells( selection ).length;\n\n\t\tthis.isEnabled = isAnyCellSelected;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * Depending on the command's {@link #order} value, it inserts a column to the `'left'` or `'right'` of the column\n\t * in which the selection is set.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst tableUtils: TableUtils = editor.plugins.get( 'TableUtils' );\n\t\tconst insertBefore = this.order === 'left';\n\n\t\tconst affectedTableCells = tableUtils.getSelectionAffectedTableCells( selection );\n\t\tconst columnIndexes = tableUtils.getColumnIndexes( affectedTableCells );\n\n\t\tconst column = insertBefore ? columnIndexes.first : columnIndexes.last;\n\t\tconst table = affectedTableCells[ 0 ].findAncestor( 'table' )!;\n\n\t\ttableUtils.insertColumns( table, { columns: 1, at: insertBefore ? column : column + 1 } );\n\t}\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/**\n * @module table/commands/splitcellcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { type TableUtils } from '../tableutils.js';\n\n/**\n * The split cell command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'splitTableCellVertically'`\n * and `'splitTableCellHorizontally'`  editor commands.\n *\n * You can split any cell vertically or horizontally by executing this command. When multiple cells are selected, each of them\n * is split, and the whole operation is a single undo step. For example, to split the selected table cells vertically:\n *\n * ```ts\n * editor.execute( 'splitTableCellVertically' );\n * ```\n */\nexport class SplitCellCommand extends Command {\n\t/**\n\t * The direction that indicates which cell will be split.\n\t */\n\tpublic readonly direction: 'horizontally' | 'vertically';\n\n\t/**\n\t * Creates a new `SplitCellCommand` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t * @param options.direction Indicates whether the command should split cells `'horizontally'` or `'vertically'`.\n\t */\n\tconstructor( editor: Editor, options: { direction?: 'horizontally' | 'vertically' } = {} ) {\n\t\tsuper( editor );\n\n\t\tthis.direction = options.direction || 'horizontally';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( this.editor.model.document.selection );\n\n\t\tthis.isEnabled = selectedCells.length > 0;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst tableCells = tableUtils.getSelectionAffectedTableCells( this.editor.model.document.selection );\n\t\tconst isHorizontal = this.direction === 'horizontally';\n\n\t\t// A single change block makes all the splits a single undo step.\n\t\tthis.editor.model.change( () => {\n\t\t\tfor ( const tableCell of tableCells ) {\n\t\t\t\tif ( isHorizontal ) {\n\t\t\t\t\ttableUtils.splitCellHorizontally( tableCell, 2 );\n\t\t\t\t} else {\n\t\t\t\t\ttableUtils.splitCellVertically( tableCell, 2 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module table/commands/mergecellcommand\n */\n\nimport type {\n\tModelElement,\n\tModelNode,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { TableWalker } from '../tablewalker.js';\nimport { isHeadingColumnCell } from '../utils/common.js';\nimport { removeEmptyRowsColumns } from '../utils/structure.js';\nimport type { ArrowKeyCodeDirection } from '@ckeditor/ckeditor5-utils';\n\nimport { type TableUtils } from '../tableutils.js';\n\n/**\n * The merge cell command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'mergeTableCellRight'`, `'mergeTableCellLeft'`,\n * `'mergeTableCellUp'` and `'mergeTableCellDown'` editor commands.\n *\n * To merge a table cell at the current selection with another cell, execute the command corresponding with the preferred direction.\n *\n * For example, to merge with a cell to the right:\n *\n * ```ts\n * editor.execute( 'mergeTableCellRight' );\n * ```\n *\n * **Note**: If a table cell has a different [`rowspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-rowspan)\n * (for `'mergeTableCellRight'` and `'mergeTableCellLeft'`) or [`colspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-colspan)\n * (for `'mergeTableCellUp'` and `'mergeTableCellDown'`), the command will be disabled.\n */\nexport class MergeCellCommand extends Command {\n\t/**\n\t * The direction that indicates which cell will be merged with the currently selected one.\n\t */\n\tpublic readonly direction: ArrowKeyCodeDirection;\n\n\t/**\n\t * Whether the merge is horizontal (left/right) or vertical (up/down).\n\t */\n\tpublic readonly isHorizontal: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic declare value: ModelNode | undefined;\n\n\t/**\n\t * Creates a new `MergeCellCommand` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t * @param options.direction Indicates which cell to merge with the currently selected one.\n\t * Possible values are: `'left'`, `'right'`, `'up'` and `'down'`.\n\t */\n\tconstructor( editor: Editor, options: { direction: ArrowKeyCodeDirection } ) {\n\t\tsuper( editor );\n\n\t\tthis.direction = options.direction;\n\t\tthis.isHorizontal = this.direction == 'right' || this.direction == 'left';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst cellToMerge = this._getMergeableCell();\n\n\t\tthis.value = cellToMerge;\n\t\tthis.isEnabled = !!cellToMerge;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * Depending on the command's {@link #direction} value, it will merge the cell that is to the `'left'`, `'right'`, `'up'` or `'down'`.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst tableCell = tableUtils.getTableCellsContainingSelection( doc.selection )[ 0 ];\n\n\t\tconst cellToMerge = this.value!;\n\t\tconst direction = this.direction;\n\n\t\tmodel.change( writer => {\n\t\t\tconst isMergeNext = direction == 'right' || direction == 'down';\n\n\t\t\t// The merge mechanism is always the same so sort cells to be merged.\n\t\t\tconst cellToExpand = ( isMergeNext ? tableCell : cellToMerge ) as ModelElement;\n\t\t\tconst cellToRemove = ( isMergeNext ? cellToMerge : tableCell ) as ModelElement;\n\n\t\t\t// Cache the parent of cell to remove for later check.\n\t\t\tconst removedTableCellRow = cellToRemove.parent as ModelElement;\n\n\t\t\tmergeTableCells( cellToRemove, cellToExpand, writer );\n\n\t\t\tconst spanAttribute = this.isHorizontal ? 'colspan' : 'rowspan';\n\t\t\tconst cellSpan = parseInt( tableCell.getAttribute( spanAttribute ) as string || '1' );\n\t\t\tconst cellToMergeSpan = parseInt( cellToMerge.getAttribute( spanAttribute ) as string || '1' );\n\n\t\t\t// Update table cell span attribute and merge set selection on merged contents.\n\t\t\twriter.setAttribute( spanAttribute, cellSpan + cellToMergeSpan, cellToExpand );\n\t\t\twriter.setSelection( writer.createRangeIn( cellToExpand ) );\n\n\t\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\t\tconst table = removedTableCellRow.findAncestor( 'table' )!;\n\n\t\t\t// Remove empty rows and columns after merging.\n\t\t\tremoveEmptyRowsColumns( table, tableUtils );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns a cell that can be merged with the current cell depending on the command's direction.\n\t */\n\tprivate _getMergeableCell(): ModelNode | undefined {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst tableCell = tableUtils.getTableCellsContainingSelection( doc.selection )[ 0 ];\n\n\t\tif ( !tableCell ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// First get the cell on proper direction.\n\t\tconst cellToMerge = this.isHorizontal ?\n\t\t\tgetHorizontalCell( tableCell, this.direction, tableUtils ) :\n\t\t\tgetVerticalCell( tableCell, this.direction, tableUtils );\n\n\t\tif ( !cellToMerge ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If found check if the span perpendicular to merge direction is equal on both cells.\n\t\tconst spanAttribute = this.isHorizontal ? 'rowspan' : 'colspan';\n\t\tconst span = parseInt( tableCell.getAttribute( spanAttribute ) as string || '1' );\n\n\t\tconst cellToMergeSpan = parseInt( cellToMerge.getAttribute( spanAttribute ) as string || '1' );\n\n\t\tif ( cellToMergeSpan === span ) {\n\t\t\treturn cellToMerge;\n\t\t}\n\t}\n}\n\n/**\n * Returns the cell that can be merged horizontally.\n */\nfunction getHorizontalCell( tableCell: ModelElement, direction: ArrowKeyCodeDirection, tableUtils: TableUtils ) {\n\tconst tableRow = tableCell.parent!;\n\tconst table = tableRow.parent as ModelElement;\n\tconst horizontalCell = direction == 'right' ? tableCell.nextSibling : tableCell.previousSibling;\n\tconst hasHeadingColumns = ( table.getAttribute( 'headingColumns' ) as number || 0 ) > 0;\n\n\tif ( !horizontalCell ) {\n\t\treturn;\n\t}\n\n\t// Sort cells:\n\tconst cellOnLeft = ( direction == 'right' ? tableCell : horizontalCell ) as ModelElement;\n\tconst cellOnRight = ( direction == 'right' ? horizontalCell : tableCell ) as ModelElement;\n\n\t// Get their column indexes:\n\tconst { column: leftCellColumn } = tableUtils.getCellLocation( cellOnLeft );\n\tconst { column: rightCellColumn } = tableUtils.getCellLocation( cellOnRight );\n\n\tconst leftCellSpan = parseInt( cellOnLeft.getAttribute( 'colspan' ) as string || '1' );\n\n\tconst isCellOnLeftInHeadingColumn = isHeadingColumnCell( tableUtils, cellOnLeft );\n\tconst isCellOnRightInHeadingColumn = isHeadingColumnCell( tableUtils, cellOnRight );\n\n\t// We cannot merge heading columns cells with regular cells.\n\tif ( hasHeadingColumns && isCellOnLeftInHeadingColumn != isCellOnRightInHeadingColumn ) {\n\t\treturn;\n\t}\n\n\t// The cell on the right must have index that is distant to the cell on the left by the left cell's width (colspan).\n\tconst cellsAreTouching = leftCellColumn + leftCellSpan === rightCellColumn;\n\n\t// If the right cell's column index is different it means that there are rowspanned cells between them.\n\treturn cellsAreTouching ? horizontalCell : undefined;\n}\n\n/**\n * Returns the cell that can be merged vertically.\n */\nfunction getVerticalCell( tableCell: ModelElement, direction: ArrowKeyCodeDirection, tableUtils: TableUtils ): ModelNode | null {\n\tconst tableRow = tableCell.parent as ModelElement;\n\tconst table = tableRow.parent as ModelElement;\n\n\tconst rowIndex = table.getChildIndex( tableRow )!;\n\tconst rows = tableUtils.getRows( table );\n\n\t// Don't search for mergeable cell if direction points out of the table.\n\tif ( ( direction == 'down' && rowIndex === rows - 1 ) || ( direction == 'up' && rowIndex === 0 ) ) {\n\t\treturn null;\n\t}\n\n\tconst rowspan = parseInt( tableCell.getAttribute( 'rowspan' ) as string || '1' );\n\tconst headingRows = table.getAttribute( 'headingRows' ) || 0;\n\n\tconst footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\tconst footerIndex = rows - footerRows;\n\n\tconst isMergeUpWithBodyCell = direction == 'up' && rowIndex === footerIndex;\n\tconst isMergeUpWithHeadCell = direction == 'up' && rowIndex === headingRows;\n\n\tconst isMergeDownWithBodyCell = direction == 'down' && ( rowIndex + rowspan ) === headingRows;\n\tconst isMergeDownWithFootCell = direction == 'down' && ( rowIndex + rowspan ) === footerIndex;\n\n\t// Don't search for mergeable cell if direction points out of the current table section.\n\tif ( headingRows && ( isMergeDownWithBodyCell || isMergeUpWithHeadCell ) ) {\n\t\treturn null;\n\t}\n\n\tif ( footerRows && ( isMergeUpWithBodyCell || isMergeDownWithFootCell ) ) {\n\t\treturn null;\n\t}\n\n\tconst currentCellRowSpan = parseInt( tableCell.getAttribute( 'rowspan' ) as string || '1' );\n\tconst rowOfCellToMerge = direction == 'down' ? rowIndex + currentCellRowSpan : rowIndex;\n\n\tconst tableMap = [ ...new TableWalker( table, { endRow: rowOfCellToMerge } ) ];\n\n\tconst currentCellData = tableMap.find( value => value.cell === tableCell )!;\n\tconst mergeColumn = currentCellData.column;\n\n\tconst cellToMergeData = tableMap.find( ( { row, cellHeight, column } ) => {\n\t\tif ( column !== mergeColumn ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( direction == 'down' ) {\n\t\t\t// If merging a cell below the mergeRow is already calculated.\n\t\t\treturn row === rowOfCellToMerge;\n\t\t} else {\n\t\t\t// If merging a cell above calculate if it spans to mergeRow.\n\t\t\treturn rowOfCellToMerge === row + cellHeight;\n\t\t}\n\t} );\n\n\treturn cellToMergeData && cellToMergeData.cell ? cellToMergeData.cell : null;\n}\n\n/**\n * Merges two table cells. It will ensure that after merging cells with an empty paragraph, the resulting table cell will only have one\n * paragraph. If one of the merged table cells is empty, the merged table cell will have the contents of the non-empty table cell.\n * If both are empty, the merged table cell will have only one empty paragraph.\n */\nfunction mergeTableCells( cellToRemove: ModelElement, cellToExpand: ModelElement, writer: ModelWriter ) {\n\tif ( !isEmpty( cellToRemove ) ) {\n\t\tif ( isEmpty( cellToExpand ) ) {\n\t\t\twriter.remove( writer.createRangeIn( cellToExpand ) );\n\t\t}\n\n\t\twriter.move( writer.createRangeIn( cellToRemove ), writer.createPositionAt( cellToExpand, 'end' ) );\n\t}\n\n\t// Remove merged table cell.\n\twriter.remove( cellToRemove );\n}\n\n/**\n * Checks if the passed table cell contains an empty paragraph.\n */\nfunction isEmpty( tableCell: ModelElement ): boolean {\n\tconst firstTableChild = tableCell.getChild( 0 ) as ModelElement;\n\n\treturn tableCell.childCount == 1 && firstTableChild.is( 'element', 'paragraph' ) && firstTableChild.isEmpty;\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/**\n * @module table/commands/removerowcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, ModelNode } from '@ckeditor/ckeditor5-engine';\nimport { type TableUtils } from '../tableutils.js';\n\n/**\n * The remove row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'removeTableRow'` editor command.\n *\n * To remove the row containing the selected cell, execute the command:\n *\n * ```ts\n * editor.execute( 'removeTableRow' );\n * ```\n */\nexport class RemoveRowCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( this.editor.model.document.selection );\n\t\tconst firstCell = selectedCells[ 0 ];\n\n\t\tif ( firstCell ) {\n\t\t\tconst table = firstCell.findAncestor( 'table' )!;\n\t\t\tconst tableRowCount = tableUtils.getRows( table );\n\t\t\tconst lastRowIndex = tableRowCount - 1;\n\n\t\t\tconst selectedRowIndexes = tableUtils.getRowIndexes( selectedCells );\n\n\t\t\tconst areAllRowsSelected = selectedRowIndexes.first === 0 && selectedRowIndexes.last === lastRowIndex;\n\n\t\t\t// Disallow selecting whole table -> delete whole table should be used instead.\n\t\t\tthis.isEnabled = !areAllRowsSelected;\n\t\t} else {\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\n\t\tconst referenceCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst removedRowIndexes = tableUtils.getRowIndexes( referenceCells );\n\n\t\tconst firstCell = referenceCells[ 0 ];\n\t\tconst table = firstCell.findAncestor( 'table' )!;\n\n\t\tconst columnIndexToFocus = tableUtils.getCellLocation( firstCell ).column;\n\n\t\tmodel.change( writer => {\n\t\t\tconst rowsToRemove = removedRowIndexes.last - removedRowIndexes.first + 1;\n\n\t\t\ttableUtils.removeRows( table, {\n\t\t\t\tat: removedRowIndexes.first,\n\t\t\t\trows: rowsToRemove\n\t\t\t} );\n\n\t\t\tconst cellToFocus = getCellToFocus( table, removedRowIndexes.first, columnIndexToFocus, tableUtils.getRows( table ) );\n\n\t\t\twriter.setSelection( writer.createPositionAt( cellToFocus, 0 ) );\n\t\t} );\n\t}\n}\n\n/**\n * Returns a cell that should be focused before removing the row, belonging to the same column as the currently focused cell.\n * - If the row was not the last one, the cell to focus will be in the row that followed it (before removal).\n * - If the row was the last one, the cell to focus will be in the row that preceded it (before removal).\n */\nfunction getCellToFocus( table: ModelElement, removedRowIndex: number, columnToFocus: number, tableRowCount: number ): ModelNode {\n\t// Don't go beyond last row's index.\n\tconst row = table.getChild( Math.min( removedRowIndex, tableRowCount - 1 ) ) as ModelElement;\n\n\t// Default to first table cell.\n\tlet cellToFocus = row.getChild( 0 )!;\n\tlet column = 0;\n\n\tfor ( const tableCell of row.getChildren() ) {\n\t\tif ( column > columnToFocus ) {\n\t\t\treturn cellToFocus;\n\t\t}\n\n\t\tcellToFocus = tableCell;\n\t\tcolumn += parseInt( tableCell.getAttribute( 'colspan' ) as string || '1' );\n\t}\n\n\treturn cellToFocus;\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/**\n * @module table/commands/removecolumncommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport type {\n\tModelDocumentSelection,\n\tModelElement,\n\tModelSelection\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableWalker, type TableSlot } from '../tablewalker.js';\nimport { type TableUtils } from '../tableutils.js';\n\n/**\n * The remove column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'removeTableColumn'` editor command.\n *\n * To remove the column containing the selected cell, execute the command:\n *\n * ```ts\n * editor.execute( 'removeTableColumn' );\n * ```\n */\nexport class RemoveColumnCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( this.editor.model.document.selection );\n\t\tconst firstCell = selectedCells[ 0 ];\n\n\t\tif ( firstCell ) {\n\t\t\tconst table = firstCell.findAncestor( 'table' )!;\n\t\t\tconst tableColumnCount = tableUtils.getColumns( table );\n\n\t\t\tconst { first, last } = tableUtils.getColumnIndexes( selectedCells );\n\n\t\t\tthis.isEnabled = last - first < ( tableColumnCount - 1 );\n\t\t} else {\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst [ firstCell, lastCell ] = getBoundaryCells( this.editor.model.document.selection, tableUtils );\n\t\tconst table = firstCell.parent!.parent as ModelElement;\n\n\t\t// Cache the table before removing or updating colspans.\n\t\tconst tableMap = [ ...new TableWalker( table ) ];\n\n\t\t// Store column indexes of removed columns.\n\t\tconst removedColumnIndexes = {\n\t\t\tfirst: tableMap.find( value => value.cell === firstCell )!.column,\n\t\t\tlast: tableMap.find( value => value.cell === lastCell )!.column\n\t\t};\n\n\t\tconst cellToFocus = getCellToFocus( tableMap, firstCell, lastCell, removedColumnIndexes )!;\n\n\t\tthis.editor.model.change( writer => {\n\t\t\tconst columnsToRemove = removedColumnIndexes.last - removedColumnIndexes.first + 1;\n\n\t\t\ttableUtils.removeColumns( table, {\n\t\t\t\tat: removedColumnIndexes.first,\n\t\t\t\tcolumns: columnsToRemove\n\t\t\t} );\n\n\t\t\twriter.setSelection( writer.createPositionAt( cellToFocus, 0 ) );\n\t\t} );\n\t}\n}\n\n/**\n * Returns a proper table cell to focus after removing a column.\n * - selection is on last table cell it will return previous cell.\n */\nfunction getCellToFocus(\n\ttableMap: Array<TableSlot>,\n\tfirstCell: ModelElement,\n\tlastCell: ModelElement,\n\tremovedColumnIndexes: {\n\t\tfirst: number;\n\t\tlast: number;\n\t}\n) {\n\tconst colspan = parseInt( lastCell.getAttribute( 'colspan' ) as string || '1' );\n\n\t// If the table cell is spanned over 2+ columns - it will be truncated so the selection should\n\t// stay in that cell.\n\tif ( colspan > 1 ) {\n\t\treturn lastCell;\n\t}\n\t// Normally, look for the cell in the same row that precedes the first cell to put selection there (\"column on the left\").\n\t// If the deleted column is the first column of the table, there will be no predecessor: use the cell\n\t// from the column that follows then (also in the same row).\n\telse if ( firstCell.previousSibling || lastCell.nextSibling ) {\n\t\treturn lastCell.nextSibling || firstCell.previousSibling;\n\t}\n\t// It can happen that table cells have no siblings in a row, for instance, when there are row spans\n\t// in the table (in the previous row). Then just look for the closest cell that is in a column\n\t// that will not be removed to put the selection there.\n\telse {\n\t\t// Look for any cell in a column that precedes the first removed column.\n\t\tif ( removedColumnIndexes.first ) {\n\t\t\treturn tableMap.reverse().find( ( { column } ) => {\n\t\t\t\treturn column < removedColumnIndexes.first;\n\t\t\t} )!.cell;\n\t\t}\n\t\t// If the first removed column is the first column of the table, then\n\t\t// look for any cell that is in a column that follows the last removed column.\n\t\telse {\n\t\t\treturn tableMap.reverse().find( ( { column } ) => {\n\t\t\t\treturn column > removedColumnIndexes.last;\n\t\t\t} )!.cell;\n\t\t}\n\t}\n}\n\n/**\n * Returns helper object returning the first and the last cell contained in given selection, based on DOM order.\n */\nfunction getBoundaryCells( selection: ModelSelection | ModelDocumentSelection, tableUtils: TableUtils ) {\n\tconst referenceCells = tableUtils.getSelectionAffectedTableCells( selection );\n\tconst firstCell = referenceCells[ 0 ];\n\tconst lastCell = referenceCells.pop()!;\n\n\tconst returnValue = [ firstCell, lastCell ];\n\n\treturn firstCell.isBefore( lastCell ) ? returnValue : returnValue.reverse();\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/**\n * @module table/commands/setheaderrowcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { type TableUtils } from '../tableutils.js';\n\nimport { getVerticallyOverlappingCells, splitHorizontally } from '../utils/structure.js';\n\n/**\n * The header row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableColumnHeader'` editor command.\n *\n * You can make the row containing the selected cell a [header](https://www.w3.org/TR/html50/tabular-data.html#the-th-element) by executing:\n *\n * ```ts\n * editor.execute( 'setTableRowHeader' );\n * ```\n *\n * **Note:** All preceding rows will also become headers. If the current row is already a header, executing this command\n * will make it a regular row back again (including the following rows).\n */\nexport class SetHeaderRowCommand extends Command {\n\t/**\n\t * Flag indicating whether the command is active. The command is active when the\n\t * {@link module:engine/model/selection~ModelSelection} is in a header row.\n\t *\n\t * @observable\n\t */\n\tpublic declare value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst model = this.editor.model;\n\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\n\t\tif ( selectedCells.length === 0 ) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst table = selectedCells[ 0 ].findAncestor( 'table' )!;\n\n\t\tthis.isEnabled = model.schema.checkAttribute( table, 'headingRows' );\n\t\tthis.value = selectedCells.every( cell => this._isInHeading( cell, cell.parent!.parent as ModelElement ) );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * When the selection is in a non-header row, the command will set the `headingRows` table attribute to cover that row.\n\t *\n\t * When the selection is already in a header row, it will set `headingRows` so the heading section will end before that row.\n\t *\n\t * @fires execute\n\t * @param options.forceValue If set, the command will set (`true`) or unset (`false`) the header rows according to\n\t * the `forceValue` parameter instead of the current model state.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tif ( options.forceValue === this.value ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst model = this.editor.model;\n\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst table = selectedCells[ 0 ].findAncestor( 'table' )!;\n\n\t\tconst { first, last } = tableUtils.getRowIndexes( selectedCells );\n\t\tconst headingRowsToSet = this.value ? first : last + 1;\n\t\tconst currentHeadingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\n\t\tmodel.change( writer => {\n\t\t\tif ( headingRowsToSet ) {\n\t\t\t\t// Changing heading rows requires to check if any of a heading cell is overlapping vertically the table head.\n\t\t\t\t// Any table cell that has a rowspan attribute > 1 will not exceed the table head so we need to fix it in rows below.\n\t\t\t\tconst startRow = headingRowsToSet > currentHeadingRows ? currentHeadingRows : 0;\n\t\t\t\tconst overlappingCells = getVerticallyOverlappingCells( table, headingRowsToSet, startRow );\n\n\t\t\t\tfor ( const { cell } of overlappingCells ) {\n\t\t\t\t\tsplitHorizontally( cell, headingRowsToSet, writer );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttableUtils.setHeadingRowsCount( writer, table, headingRowsToSet );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks if a table cell is in the heading section.\n\t */\n\tprivate _isInHeading( tableCell: ModelElement, table: ModelElement ): boolean {\n\t\tconst headingRows = parseInt( table.getAttribute( 'headingRows' ) as string || '0' );\n\n\t\treturn !!headingRows && ( tableCell.parent as ModelElement ).index! < headingRows;\n\t}\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/**\n * @module table/commands/setfooterrowcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport type { TableUtils } from '../tableutils.js';\n\nimport { getVerticallyOverlappingCells, splitHorizontally } from '../utils/structure.js';\n\n/**\n * The footer row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableFooterRow'` editor command.\n *\n * You can make the row containing the selected cell a footer by executing:\n *\n * ```ts\n * editor.execute( 'setTableFooterRow' );\n * ```\n *\n * **Note:** All following rows will also become footers. If the current row is already a footer, executing this command\n * will make it a regular row back again (including the preceding rows).\n */\nexport class SetFooterRowCommand extends Command {\n\t/**\n\t * Flag indicating whether the command is active. The command is active when the\n\t * {@link module:engine/model/selection~ModelSelection} is in a footer row.\n\t *\n\t * @observable\n\t */\n\tpublic declare value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst model = this.editor.model;\n\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\n\t\tif ( selectedCells.length === 0 ) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst table = selectedCells[ 0 ].findAncestor( 'table' )!;\n\n\t\tthis.isEnabled = model.schema.checkAttribute( table, 'footerRows' );\n\t\tthis.value = selectedCells.every( cell => this._isInFooter( cell, table ) );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * When the selection is in a non-footer row, the command will set the `footerRows` table attribute to cover that row.\n\t *\n\t * When the selection is already in a footer row, it will set `footerRows` so the footer section will start after that row.\n\t *\n\t * @fires execute\n\t * @param options.forceValue If set, the command will set (`true`) or unset (`false`) the footer rows according to\n\t * the `forceValue` parameter instead of the current model state.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tif ( options.forceValue === this.value ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst model = this.editor.model;\n\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst table = selectedCells[ 0 ].findAncestor( 'table' )!;\n\n\t\tconst { first, last } = tableUtils.getRowIndexes( selectedCells );\n\t\tconst totalRows = tableUtils.getRows( table );\n\t\tconst footerRowsToSet = this.value ? totalRows - ( last + 1 ) : totalRows - first;\n\t\tconst currentFooterRows = table.getAttribute( 'footerRows' ) as number || 0;\n\n\t\tmodel.change( writer => {\n\t\t\tif ( footerRowsToSet ) {\n\t\t\t\t// Changing footer rows requires to check if any of a footer cell is overlapping vertically the table footer.\n\t\t\t\tconst splitRow = totalRows - footerRowsToSet;\n\t\t\t\tconst currentSplitRow = totalRows - currentFooterRows;\n\t\t\t\tconst startRow = splitRow > currentSplitRow ? currentSplitRow : 0;\n\n\t\t\t\tconst overlappingCells = getVerticallyOverlappingCells( table, splitRow, startRow );\n\n\t\t\t\tfor ( const { cell } of overlappingCells ) {\n\t\t\t\t\tsplitHorizontally( cell, splitRow, writer );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttableUtils.setFooterRowsCount( writer, table, footerRowsToSet );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks if a table cell is in the footer section.\n\t */\n\tprivate _isInFooter( tableCell: ModelElement, table: ModelElement ): boolean {\n\t\tconst footerRows = parseInt( table.getAttribute( 'footerRows' ) as string || '0' );\n\t\tconst totalRows = this.editor.plugins.get( 'TableUtils' ).getRows( table );\n\t\tconst rowIndex = ( tableCell.parent as ModelElement ).index!;\n\n\t\treturn !!footerRows && rowIndex >= ( totalRows - footerRows );\n\t}\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/**\n * @module table/commands/setheadercolumncommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { type TableUtils } from '../tableutils.js';\n\nimport { isHeadingColumnCell } from '../utils/common.js';\nimport { getHorizontallyOverlappingCells, splitVertically } from '../utils/structure.js';\n\n/**\n * The header column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableColumnHeader'` editor command.\n *\n * You can make the column containing the selected cell a [header](https://www.w3.org/TR/html50/tabular-data.html#the-th-element)\n * by executing:\n *\n * ```ts\n * editor.execute( 'setTableColumnHeader' );\n * ```\n *\n * **Note:** All preceding columns will also become headers. If the current column is already a header, executing this command\n * will make it a regular column back again (including the following columns).\n */\nexport class SetHeaderColumnCommand extends Command {\n\t/**\n\t * Flag indicating whether the command is active. The command is active when the\n\t * {@link module:engine/model/selection~ModelSelection} is in a header column.\n\t *\n\t * @observable\n\t */\n\tpublic declare value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst model = this.editor.model;\n\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\n\t\tif ( selectedCells.length === 0 ) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst table = selectedCells[ 0 ].findAncestor( 'table' )!;\n\n\t\tthis.isEnabled = model.schema.checkAttribute( table, 'headingColumns' );\n\t\tthis.value = selectedCells.every( cell => isHeadingColumnCell( tableUtils, cell ) );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * When the selection is in a non-header column, the command will set the `headingColumns` table attribute to cover that column.\n\t *\n\t * When the selection is already in a header column, it will set `headingColumns` so the heading section will end before that column.\n\t *\n\t * @fires execute\n\t * @param options.forceValue If set, the command will set (`true`) or unset (`false`) the header columns according to\n\t * the `forceValue` parameter instead of the current model state.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tif ( options.forceValue === this.value ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst model = this.editor.model;\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst table = selectedCells[ 0 ].findAncestor( 'table' )!;\n\n\t\tconst { first, last } = tableUtils.getColumnIndexes( selectedCells );\n\t\tconst headingColumnsToSet = this.value ? first : last + 1;\n\n\t\tmodel.change( writer => {\n\t\t\tif ( headingColumnsToSet ) {\n\t\t\t\t// Changing heading columns requires to check if any of a heading cell is overlapping horizontally the table head.\n\t\t\t\t// Any table cell that has a colspan attribute > 1 will not exceed the table head so we need to fix it in columns before.\n\t\t\t\tconst overlappingCells = getHorizontallyOverlappingCells( table, headingColumnsToSet );\n\n\t\t\t\tfor ( const { cell, column } of overlappingCells ) {\n\t\t\t\t\tsplitVertically( cell, column, headingColumnsToSet, writer );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttableUtils.setHeadingColumnsCount( writer, table, headingColumnsToSet );\n\t\t} );\n\t}\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/**\n * @module table/commands/mergecellscommand\n */\n\nimport type {\n\tModelElement,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { TableUtils } from '../tableutils.js';\nimport { updateNumericAttribute } from '../utils/common.js';\nimport { removeEmptyRowsColumns } from '../utils/structure.js';\n\n/**\n * The merge cells command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'mergeTableCells'` editor command.\n *\n * For example, to merge selected table cells:\n *\n * ```ts\n * editor.execute( 'mergeTableCells' );\n * ```\n */\nexport class MergeCellsCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\n\t\tconst selectedTableCells = tableUtils.getSelectedTableCells( this.editor.model.document.selection );\n\t\tthis.isEnabled = tableUtils.isSelectionRectangular( selectedTableCells );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\n\t\tmodel.change( writer => {\n\t\t\tconst selectedTableCells = tableUtils.getSelectedTableCells( model.document.selection );\n\n\t\t\t// All cells will be merged into the first one.\n\t\t\tconst firstTableCell = selectedTableCells.shift()!;\n\n\t\t\t// Update target cell dimensions.\n\t\t\tconst { mergeWidth, mergeHeight } = getMergeDimensions( firstTableCell, selectedTableCells, tableUtils );\n\t\t\tupdateNumericAttribute( 'colspan', mergeWidth, firstTableCell, writer );\n\t\t\tupdateNumericAttribute( 'rowspan', mergeHeight, firstTableCell, writer );\n\n\t\t\tfor ( const tableCell of selectedTableCells ) {\n\t\t\t\tmergeTableCells( tableCell, firstTableCell, writer );\n\t\t\t}\n\n\t\t\tconst table = firstTableCell.findAncestor( 'table' )!;\n\n\t\t\t// Remove rows and columns that become empty (have no anchored cells).\n\t\t\tremoveEmptyRowsColumns( table, tableUtils );\n\n\t\t\twriter.setSelection( firstTableCell, 'in' );\n\t\t} );\n\t}\n}\n\n/**\n *  Merges two table cells. It will ensure that after merging cells with empty paragraphs the resulting table cell will only have one\n * paragraph. If one of the merged table cells is empty, the merged table cell will have contents of the non-empty table cell.\n * If both are empty, the merged table cell will have only one empty paragraph.\n */\nfunction mergeTableCells( cellBeingMerged: ModelElement, targetCell: ModelElement, writer: ModelWriter ) {\n\tif ( !isEmpty( cellBeingMerged ) ) {\n\t\tif ( isEmpty( targetCell ) ) {\n\t\t\twriter.remove( writer.createRangeIn( targetCell ) );\n\t\t}\n\n\t\twriter.move( writer.createRangeIn( cellBeingMerged ), writer.createPositionAt( targetCell, 'end' ) );\n\t}\n\n\t// Remove merged table cell.\n\twriter.remove( cellBeingMerged );\n}\n\n/**\n * Checks if the passed table cell contains an empty paragraph.\n */\nfunction isEmpty( tableCell: ModelElement ): boolean {\n\tconst firstTableChild = tableCell.getChild( 0 );\n\n\treturn tableCell.childCount == 1 && firstTableChild!.is( 'element', 'paragraph' ) && firstTableChild.isEmpty;\n}\n\nfunction getMergeDimensions( firstTableCell: ModelElement, selectedTableCells: Array<ModelElement>, tableUtils: TableUtils ) {\n\tlet maxWidthOffset = 0;\n\tlet maxHeightOffset = 0;\n\n\tfor ( const tableCell of selectedTableCells ) {\n\t\tconst { row, column } = tableUtils.getCellLocation( tableCell );\n\n\t\tmaxWidthOffset = getMaxOffset( tableCell, column, maxWidthOffset, 'colspan' );\n\t\tmaxHeightOffset = getMaxOffset( tableCell, row, maxHeightOffset, 'rowspan' );\n\t}\n\n\t// Update table cell span attribute and merge set selection on a merged contents.\n\tconst { row: firstCellRow, column: firstCellColumn } = tableUtils.getCellLocation( firstTableCell );\n\n\tconst mergeWidth = maxWidthOffset - firstCellColumn;\n\tconst mergeHeight = maxHeightOffset - firstCellRow;\n\n\treturn { mergeWidth, mergeHeight };\n}\n\nfunction getMaxOffset( tableCell: ModelElement, start: number, currentMaxOffset: number, which: string ) {\n\tconst dimensionValue = parseInt( tableCell.getAttribute( which ) as string || '1' );\n\n\treturn Math.max( currentMaxOffset, start + dimensionValue );\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/**\n * @module table/commands/selectrowcommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelRange, ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { type TableUtils } from '../tableutils.js';\n\n/**\n * The select row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'selectTableRow'` editor command.\n *\n * To select the rows containing the selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'selectTableRow' );\n * ```\n */\nexport class SelectRowCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// It does not affect data so should be enabled in read-only mode.\n\t\tthis.affectsData = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( this.editor.model.document.selection );\n\n\t\tthis.isEnabled = selectedCells.length > 0;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst referenceCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst rowIndexes = tableUtils.getRowIndexes( referenceCells );\n\n\t\tconst table = referenceCells[ 0 ].findAncestor( 'table' )!;\n\t\tconst rangesToSelect: Array<ModelRange> = [];\n\n\t\tfor ( let rowIndex = rowIndexes.first; rowIndex <= rowIndexes.last; rowIndex++ ) {\n\t\t\tfor ( const cell of ( table.getChild( rowIndex ) as ModelElement ).getChildren() ) {\n\t\t\t\trangesToSelect.push( model.createRangeOn( cell ) );\n\t\t\t}\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setSelection( rangesToSelect );\n\t\t} );\n\t}\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/**\n * @module table/commands/selectcolumncommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelRange } from '@ckeditor/ckeditor5-engine';\nimport { type TableUtils } from '../tableutils.js';\n\nimport { TableWalker } from '../tablewalker.js';\n\n/**\n * The select column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'selectTableColumn'` editor command.\n *\n * To select the columns containing the selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'selectTableColumn' );\n * ```\n */\nexport class SelectColumnCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// It does not affect data so should be enabled in read-only mode.\n\t\tthis.affectsData = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst selectedCells = tableUtils.getSelectionAffectedTableCells( this.editor.model.document.selection );\n\n\t\tthis.isEnabled = selectedCells.length > 0;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst model = this.editor.model;\n\t\tconst referenceCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst firstCell = referenceCells[ 0 ];\n\t\tconst lastCell = referenceCells.pop()!;\n\t\tconst table = firstCell.findAncestor( 'table' )!;\n\n\t\tconst startLocation = tableUtils.getCellLocation( firstCell );\n\t\tconst endLocation = tableUtils.getCellLocation( lastCell );\n\n\t\tconst startColumn = Math.min( startLocation.column, endLocation.column );\n\t\tconst endColumn = Math.max( startLocation.column, endLocation.column );\n\n\t\tconst rangesToSelect: Array<ModelRange> = [];\n\n\t\tfor ( const cellInfo of new TableWalker( table, { startColumn, endColumn } ) ) {\n\t\t\trangesToSelect.push( model.createRangeOn( cellInfo.cell ) );\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setSelection( rangesToSelect );\n\t\t} );\n\t}\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/**\n * @module table/converters/table-layout-post-fixer\n */\n\nimport type {\n\tModelElement,\n\tModel,\n\tModelWriter,\n\tDifferItem,\n\tDifferItemAttribute\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableWalker } from './../tablewalker.js';\nimport { createEmptyTableCell, updateNumericAttribute } from '../utils/common.js';\n\n/**\n * Injects a table layout post-fixer into the model.\n *\n * The role of the table layout post-fixer is to ensure that the table rows have the correct structure\n * after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n *\n * The correct structure means that:\n *\n * * All table rows have the same size.\n * * None of the table cells extend vertically beyond their section (either header or body).\n * * A table cell has always at least one element as a child.\n *\n * If the table structure is not correct, the post-fixer will automatically correct it in two steps:\n *\n * 1. It will clip table cells that extend beyond their section.\n * 2. It will add empty table cells to the rows that are narrower than the widest table row.\n *\n * ## Clipping overlapping table cells\n *\n * Such situation may occur when pasting a table (or a part of a table) to the editor from external sources.\n *\n * For example, see the following table which has a cell (FOO) with the rowspan attribute (2):\n *\n * ```xml\n * <table headingRows=\"1\">\n *   <tableRow>\n *     <tableCell rowspan=\"2\"><paragraph>FOO</paragraph></tableCell>\n *     <tableCell colspan=\"2\"><paragraph>BAR</paragraph></tableCell>\n *   </tableRow>\n *   <tableRow>\n *     <tableCell><paragraph>BAZ</paragraph></tableCell>\n *     <tableCell><paragraph>XYZ</paragraph></tableCell>\n *   </tableRow>\n * </table>\n * ```\n *\n * It will be rendered in the view as:\n *\n * ```xml\n * <table>\n *   <thead>\n *     <tr>\n *       <td rowspan=\"2\">FOO</td>\n *       <td colspan=\"2\">BAR</td>\n *     </tr>\n *   </thead>\n *   <tbody>\n *     <tr>\n *       <td>BAZ</td>\n *       <td>XYZ</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * In the above example the table will be rendered as a table with two rows: one in the header and second one in the body.\n * The table cell (FOO) cannot span over multiple rows as it would extend from the header to the body section.\n * The `rowspan` attribute must be changed to (1). The value (1) is the default value of the `rowspan` attribute\n * so the `rowspan` attribute will be removed from the model.\n *\n * The table cell with BAZ in the content will be in the first column of the table.\n *\n * ## Adding missing table cells\n *\n * The table post-fixer will insert empty table cells to equalize table row sizes (the number of columns).\n * The size of a table row is calculated by counting column spans of table cells, both horizontal (from the same row) and\n * vertical (from the rows above).\n *\n * In the above example, the table row in the body section of the table is narrower then the row from the header: it has two cells\n * with the default colspan (1). The header row has one cell with colspan (1) and the second with colspan (2).\n * The table cell (FOO) does not extend beyond the head section (and as such will be fixed in the first step of this post-fixer).\n * The post-fixer will add a missing table cell to the row in the body section of the table.\n *\n * The table from the above example will be fixed and rendered to the view as below:\n *\n * ```xml\n * <table>\n *   <thead>\n *     <tr>\n *       <td rowspan=\"2\">FOO</td>\n *       <td colspan=\"2\">BAR</td>\n *     </tr>\n *   </thead>\n *   <tbody>\n *     <tr>\n *       <td>BAZ</td>\n *       <td>XYZ</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * ## Collaboration and undo - Expectations vs post-fixer results\n *\n * The table post-fixer only ensures proper structure without a deeper analysis of the nature of the change. As such, it might lead\n * to a structure which was not intended by the user. In particular, it will also fix undo steps (in conjunction with collaboration)\n * in which the editor content might not return to the original state.\n *\n * This will usually happen when one or more users change the size of the table.\n *\n * As an example see the table below:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * and the user actions:\n *\n * 1. Both users have a table with two rows and two columns.\n * 2. User A adds a column at the end of the table. This will insert empty table cells to two rows.\n * 3. User B adds a row at the end of the table. This will insert a row with two empty table cells.\n * 4. Both users will have a table as below:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * The last row is shorter then others so the table post-fixer will add an empty row to the last row:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by the post-fixer)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * Unfortunately undo does not know the nature of the changes and depending on which user applies the post-fixer changes, undoing them\n * might lead to a broken table. If User B undoes inserting the column to the table, the undo engine will undo only the operations of\n * inserting empty cells to rows from the initial table state (row 1 and 2) but the cell in the post-fixed row will remain:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by a post-fixer)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * After undo, the table post-fixer will detect that two rows are shorter than others and will fix the table to:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *       <td>(empty, inserted by a post-fixer after undo)</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *       <td>(empty, inserted by a post-fixer after undo)</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by a post-fixer)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * @internal\n */\nexport function injectTableLayoutPostFixer( model: Model ): void {\n\tmodel.document.registerPostFixer( writer => tableLayoutPostFixer( writer, model ) );\n}\n\n/**\n * The table layout post-fixer.\n */\nfunction tableLayoutPostFixer( writer: ModelWriter, model: Model ) {\n\tconst changes = model.document.differ.getChanges();\n\n\tlet wasFixed = false;\n\n\t// Do not analyze the same table more then once - may happen for multiple changes in the same table.\n\tconst analyzedTables = new Set();\n\n\tfor ( const entry of changes ) {\n\t\tlet table: ModelElement | null = null;\n\n\t\tif ( entry.type == 'insert' && entry.name == 'table' ) {\n\t\t\ttable = entry.position.nodeAfter as ModelElement;\n\t\t}\n\n\t\t// Fix table on adding/removing table cells and rows.\n\t\tif ( ( entry.type == 'insert' || entry.type == 'remove' ) && ( entry.name == 'tableRow' || entry.name == 'tableCell' ) ) {\n\t\t\ttable = entry.position.findAncestor( 'table' );\n\t\t}\n\n\t\t// Fix table on any table's attribute change - including attributes of table cells.\n\t\tif ( isTableAttributeEntry( entry ) ) {\n\t\t\ttable = entry.range.start.findAncestor( 'table' );\n\t\t}\n\n\t\tif ( table && !analyzedTables.has( table ) ) {\n\t\t\t// Step 1: correct rowspans of table cells if necessary.\n\t\t\t// The wasFixed flag should be true if any of tables in batch was fixed - might be more then one.\n\t\t\twasFixed = fixTableCellsRowspan( table, writer ) || wasFixed;\n\t\t\t// Step 2: fix table rows sizes.\n\t\t\twasFixed = fixTableRowsSizes( table, writer ) || wasFixed;\n\n\t\t\tanalyzedTables.add( table );\n\t\t}\n\t}\n\n\treturn wasFixed;\n}\n\n/**\n * Fixes the invalid value of the `rowspan` attribute because a table cell cannot vertically extend beyond the table section it belongs to.\n *\n * @returns Returns `true` if the table was fixed.\n */\nfunction fixTableCellsRowspan( table: ModelElement, writer: ModelWriter ) {\n\tlet wasFixed = false;\n\n\tconst cellsToTrim = findCellsToTrim( table );\n\n\tif ( cellsToTrim.length ) {\n\t\t// @if CK_DEBUG_TABLE // console.log( `Post-fixing table: trimming cells row-spans (${ cellsToTrim.length }).` );\n\n\t\twasFixed = true;\n\n\t\tfor ( const data of cellsToTrim ) {\n\t\t\tupdateNumericAttribute( 'rowspan', data.rowspan, data.cell, writer, 1 );\n\t\t}\n\t}\n\n\treturn wasFixed;\n}\n\n/**\n * Makes all table rows in a table the same size.\n *\n * @returns Returns `true` if the table was fixed.\n */\nfunction fixTableRowsSizes( table: ModelElement, writer: ModelWriter ) {\n\tlet wasFixed = false;\n\n\tconst childrenLengths = getChildrenLengths( table );\n\tconst rowsToRemove = [];\n\n\t// Find empty rows.\n\tfor ( const [ rowIndex, size ] of childrenLengths.entries() ) {\n\t\t// Ignore all non-row models.\n\t\tif ( !size && table.getChild( rowIndex )!.is( 'element', 'tableRow' ) ) {\n\t\t\trowsToRemove.push( rowIndex );\n\t\t}\n\t}\n\n\t// Remove empty rows.\n\tif ( rowsToRemove.length ) {\n\t\t// @if CK_DEBUG_TABLE // console.log( `Post-fixing table: remove empty rows (${ rowsToRemove.length }).` );\n\n\t\twasFixed = true;\n\n\t\tfor ( const rowIndex of rowsToRemove.reverse() ) {\n\t\t\twriter.remove( table.getChild( rowIndex )! );\n\t\t\tchildrenLengths.splice( rowIndex, 1 );\n\t\t}\n\t}\n\n\t// Filter out everything that's not a table row.\n\tconst rowsLengths = childrenLengths.filter( ( row, rowIndex ) => table.getChild( rowIndex )!.is( 'element', 'tableRow' ) );\n\n\t// Verify if all the rows have the same number of columns.\n\tconst tableSize = rowsLengths[ 0 ];\n\tconst isValid = rowsLengths.every( length => length === tableSize );\n\n\tif ( !isValid ) {\n\t\t// @if CK_DEBUG_TABLE // console.log( 'Post-fixing table: adding missing cells.' );\n\n\t\t// Find the maximum number of columns.\n\t\tconst maxColumns = rowsLengths.reduce( ( prev, current ) => current > prev ? current : prev, 0 );\n\n\t\tfor ( const [ rowIndex, size ] of rowsLengths.entries() ) {\n\t\t\tconst columnsToInsert = maxColumns - size;\n\n\t\t\tif ( columnsToInsert ) {\n\t\t\t\tfor ( let i = 0; i < columnsToInsert; i++ ) {\n\t\t\t\t\tcreateEmptyTableCell( writer, writer.createPositionAt( table.getChild( rowIndex )!, 'end' ) );\n\t\t\t\t}\n\n\t\t\t\twasFixed = true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn wasFixed;\n}\n\n/**\n * Searches for table cells that extend beyond the table section to which they belong to. It will return an array of objects\n * that stores table cells to be trimmed and the correct value of the `rowspan` attribute to set.\n */\nfunction findCellsToTrim( table: ModelElement ) {\n\tconst headingRows = parseInt( table.getAttribute( 'headingRows' ) as string || '0' );\n\tconst footerRows = parseInt( table.getAttribute( 'footerRows' ) as string || '0' );\n\n\tconst maxRows = Array.from( table.getChildren() )\n\t\t.reduce( ( count, row ) => row.is( 'element', 'tableRow' ) ? count + 1 : count, 0 );\n\n\tconst footerIndex = maxRows - footerRows;\n\tconst cellsToTrim = [];\n\n\tfor ( const { row, cell, cellHeight } of new TableWalker( table ) ) {\n\t\t// Skip cells that do not expand over its row.\n\t\tif ( cellHeight < 2 ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst isInHeader = row < headingRows;\n\t\tconst isInFooter = row >= footerIndex;\n\n\t\t// Row limit is either end of header section or whole table as table body is after the header.\n\t\tlet rowLimit;\n\n\t\t// If in header, row limit is the end of header section.\n\t\tif ( isInHeader ) {\n\t\t\trowLimit = headingRows;\n\t\t}\n\t\t// If in footer, row limit is the end of the table.\n\t\telse if ( isInFooter ) {\n\t\t\trowLimit = maxRows;\n\t\t}\n\t\t// If in body, row limit is the start of the footer section.\n\t\telse {\n\t\t\trowLimit = footerIndex;\n\t\t}\n\n\t\t// If table cell expands over its limit reduce it height to proper value.\n\t\tif ( row + cellHeight > rowLimit ) {\n\t\t\tconst newRowspan = rowLimit - row;\n\n\t\t\tcellsToTrim.push( { cell, rowspan: newRowspan } );\n\t\t}\n\t}\n\n\treturn cellsToTrim;\n}\n\n/**\n * Returns an array with lengths of rows assigned to the corresponding row index.\n */\nfunction getChildrenLengths( table: ModelElement ) {\n\t// TableWalker will not provide items for the empty rows, we need to pre-fill this array.\n\tconst lengths = new Array( table.childCount ).fill( 0 );\n\n\tfor ( const { rowIndex } of new TableWalker( table, { includeAllSlots: true } ) ) {\n\t\tlengths[ rowIndex ]++;\n\t}\n\n\treturn lengths;\n}\n\n/**\n * Checks if the differ entry for an attribute change is one of the table's attributes.\n */\nfunction isTableAttributeEntry( entry: DifferItem ): entry is DifferItemAttribute {\n\tif ( entry.type !== 'attribute' ) {\n\t\treturn false;\n\t}\n\n\tconst key = entry.attributeKey;\n\n\treturn key === 'headingRows' || key === 'colspan' || key === 'rowspan';\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/**\n * @module table/converters/table-cell-paragraph-post-fixer\n */\n\nimport type { Model, ModelWriter, ModelElement, DifferItemInsert, DifferItemRemove } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Injects a table cell post-fixer into the model which inserts a `paragraph` element into empty table cells.\n *\n * A table cell must contain at least one block element as a child. An empty table cell will have an empty `paragraph` as a child.\n *\n * ```xml\n * <table>\n *   <tableRow>\n *      <tableCell></tableCell>\n *   </tableRow>\n * </table>\n * ```\n *\n * Will be fixed to:\n *\n * ```xml\n * <table>\n *   <tableRow>\n *      <tableCell><paragraph></paragraph></tableCell>\n *   </tableRow>\n * </table>\n * ```\n *\n * @internal\n */\nexport function injectTableCellParagraphPostFixer( model: Model ): void {\n\tmodel.document.registerPostFixer( writer => tableCellContentsPostFixer( writer, model ) );\n}\n\n/**\n * The table cell contents post-fixer.\n */\nfunction tableCellContentsPostFixer( writer: ModelWriter, model: Model ) {\n\tconst changes = model.document.differ.getChanges();\n\n\tlet wasFixed = false;\n\n\tfor ( const entry of changes ) {\n\t\tif ( entry.type == 'insert' && entry.name == 'table' ) {\n\t\t\twasFixed = fixTable( entry.position.nodeAfter as ModelElement, writer ) || wasFixed;\n\t\t}\n\n\t\tif ( entry.type == 'insert' && entry.name == 'tableRow' ) {\n\t\t\twasFixed = fixTableRow( entry.position.nodeAfter as ModelElement, writer ) || wasFixed;\n\t\t}\n\n\t\tif ( entry.type == 'insert' && entry.name == 'tableCell' ) {\n\t\t\twasFixed = fixTableCellContent( entry.position.nodeAfter as ModelElement, writer ) || wasFixed;\n\t\t}\n\n\t\tif ( ( entry.type == 'remove' || entry.type == 'insert' ) && checkTableCellChange( entry ) ) {\n\t\t\twasFixed = fixTableCellContent( entry.position.parent as ModelElement, writer ) || wasFixed;\n\t\t}\n\t}\n\n\treturn wasFixed;\n}\n\n/**\n * Fixes all table cells in a table.\n */\nfunction fixTable( table: ModelElement, writer: ModelWriter ) {\n\tlet wasFixed = false;\n\n\tfor ( const row of table.getChildren() ) {\n\t\tif ( row.is( 'element', 'tableRow' ) ) {\n\t\t\twasFixed = fixTableRow( row, writer ) || wasFixed;\n\t\t}\n\t}\n\n\treturn wasFixed;\n}\n\n/**\n * Fixes all table cells in a table row.\n */\nfunction fixTableRow( tableRow: ModelElement, writer: ModelWriter ) {\n\tlet wasFixed = false;\n\n\tfor ( const tableCell of tableRow.getChildren() as IterableIterator<ModelElement> ) {\n\t\twasFixed = fixTableCellContent( tableCell, writer ) || wasFixed;\n\t}\n\n\treturn wasFixed;\n}\n\n/**\n * Fixes all table cell content by:\n * - Adding a paragraph to a table cell without any child.\n * - Wrapping direct $text in a `<paragraph>`.\n */\nfunction fixTableCellContent( tableCell: ModelElement, writer: ModelWriter ) {\n\t// Insert paragraph to an empty table cell.\n\tif ( tableCell.childCount == 0 ) {\n\t\t// @if CK_DEBUG_TABLE // console.log( 'Post-fixing table: insert paragraph in empty cell.' );\n\n\t\twriter.insertElement( 'paragraph', tableCell );\n\n\t\treturn true;\n\t}\n\n\t// Check table cell children for directly placed text nodes.\n\t// Temporary solution. See https://github.com/ckeditor/ckeditor5/issues/1464.\n\tconst textNodes = Array.from( tableCell.getChildren() ).filter( child => child.is( '$text' ) );\n\n\t// @if CK_DEBUG_TABLE // textNodes.length && console.log( 'Post-fixing table: wrap cell content with paragraph.' );\n\n\tfor ( const child of textNodes ) {\n\t\twriter.wrap( writer.createRangeOn( child ), 'paragraph' );\n\t}\n\n\t// Return true when there were text nodes to fix.\n\treturn !!textNodes.length;\n}\n\n/**\n * Checks if a differ change should fix the table cell. This happens on:\n * - Removing content from the table cell (i.e. `tableCell` can be left empty).\n * - Adding a text node directly into a table cell.\n */\nfunction checkTableCellChange( entry: DifferItemInsert | DifferItemRemove ) {\n\tif ( !entry.position.parent.is( 'element', 'tableCell' ) ) {\n\t\treturn false;\n\t}\n\n\treturn entry.type == 'insert' && entry.name == '$text' || entry.type == 'remove';\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/**\n * @module table/converters/table-structure-post-fixer\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type {\n\tModelElement,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableUtils } from '../tableutils.js';\nimport { updateNumericAttribute } from '../utils/common.js';\n\n/**\n * Injects a table structure post-fixer into the model.\n *\n * It checks if the `headingRows` and `footerRows` attributes do not overlap.\n * If they overlap, the `footerRows` attribute is corrected.\n *\n * We prefer `headingRows` over `footerRows` because changing `headingRows` would require updating\n * the `tableCellType` attribute of the cells in the row, which is not required when changing `footerRows`.\n *\n * @param editor The editor instance.\n */\nexport function injectTableStructurePostFixer( editor: Editor ): void {\n\tconst { model } = editor;\n\tconst tableUtils = editor.plugins.get( TableUtils );\n\n\tmodel.document.registerPostFixer( writer => {\n\t\tlet changed = false;\n\n\t\tconst changes = model.document.differ.getChanges();\n\t\tconst tables = new Set<ModelElement>();\n\n\t\tfor ( const entry of changes ) {\n\t\t\tlet table: ModelElement | null = null;\n\n\t\t\tif ( entry.type == 'attribute' && ( entry.attributeKey == 'headingRows' || entry.attributeKey == 'footerRows' ) ) {\n\t\t\t\ttable = entry.range.start.nodeAfter as ModelElement;\n\t\t\t} else if ( entry.type == 'insert' && entry.name == 'tableRow' ) {\n\t\t\t\ttable = entry.position.parent as ModelElement;\n\t\t\t} else if ( entry.type == 'remove' && entry.name == 'tableRow' ) {\n\t\t\t\ttable = entry.position.parent as ModelElement;\n\t\t\t}\n\n\t\t\tif ( table && table.is( 'element', 'table' ) ) {\n\t\t\t\ttables.add( table );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const table of tables ) {\n\t\t\tif ( fixTableSections( tableUtils, writer, table ) ) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t} );\n}\n\n/**\n * Fixes table sections by ensuring that `headingRows` and `footerRows` do not overlap.\n */\nfunction fixTableSections( tableUtils: TableUtils, writer: ModelWriter, table: ModelElement ): boolean {\n\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\tconst footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\tconst rows = tableUtils.getRows( table );\n\n\t// If heading rows and footer rows overlap, prefer heading rows. It's easier to change footer rows\n\t// because it doesn't require changing cell types.\n\tif ( ( headingRows + footerRows ) > rows ) {\n\t\tconst value = Math.max( 0, rows - headingRows );\n\n\t\tupdateNumericAttribute( 'footerRows', value, table, writer, 0 );\n\n\t\treturn true;\n\t}\n\n\treturn false;\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/**\n * @module table/converters/table-structure-refresh-handler\n */\n\nimport type {\n\tEditingController,\n\tModelElement,\n\tModel\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableWalker } from '../tablewalker.js';\n\n/**\n * A table headings refresh handler which marks the table cells or rows in the differ to have it re-rendered\n * if the headings attribute changed.\n *\n * Table heading rows and heading columns are represented in the model by a `headingRows` and `headingColumns` attributes.\n *\n * When table headings attribute changes, all the cells/rows are marked to re-render to change between `<td>` and `<th>`.\n *\n * @internal\n */\nexport function tableStructureRefreshHandler( model: Model, editing: EditingController ): void {\n\tconst differ = model.document.differ;\n\tconst movedRows = new Set<ModelElement>();\n\tconst rowsToReconvert = new Set<ModelElement>();\n\tconst cellsToReconvert = new Set<ModelElement>();\n\n\tfor ( const change of differ.getChanges() ) {\n\t\tlet table;\n\n\t\tif ( change.type == 'attribute' ) {\n\t\t\tconst element = change.range.start.nodeAfter;\n\n\t\t\tif ( !element || !element.is( 'element', 'table' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tchange.attributeKey != 'headingRows' &&\n\t\t\t\tchange.attributeKey != 'headingColumns' &&\n\t\t\t\tchange.attributeKey != 'footerRows'\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttable = element;\n\t\t}\n\t\telse if ( change.name == 'tableRow' || change.name == 'tableCell' ) {\n\t\t\ttable = change.position.findAncestor( 'table' );\n\t\t}\n\n\t\tif ( !table ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Mark row to be reconverted when it was moved around so that `<th>` and `<td>` elements can be updated.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/19671.\n\t\tif (\n\t\t\tchange.type == 'insert' &&\n\t\t\tchange.name == 'tableRow' &&\n\t\t\tediting.mapper.toViewElement( change.position.nodeAfter as ModelElement )\n\t\t) {\n\t\t\tmovedRows.add( change.position.nodeAfter as ModelElement );\n\t\t}\n\n\t\tconst headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\t\tconst headingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\n\t\tconst tableWalker = new TableWalker( table );\n\n\t\tfor ( const tableSlot of tableWalker ) {\n\t\t\tconst viewElement = editing.mapper.toViewElement( tableSlot.cell );\n\n\t\t\tif ( !viewElement || !viewElement.is( 'element' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst isHeading = tableSlot.row < headingRows || tableSlot.column < headingColumns;\n\t\t\tconst expectedElementName = isHeading ? 'th' : 'td';\n\n\t\t\tif ( viewElement.name != expectedElementName ) {\n\t\t\t\tcellsToReconvert.add( tableSlot.cell );\n\n\t\t\t\t// Reconvert rows that were just inserted (moved) as marking cells inside for reconversion does not work.\n\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/19671.\n\t\t\t\tif ( movedRows.has( tableSlot.cell.parent as ModelElement ) ) {\n\t\t\t\t\trowsToReconvert.add( tableSlot.cell.parent as ModelElement );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const item of rowsToReconvert ) {\n\t\tediting.reconvertItem( item );\n\t}\n\n\tfor ( const item of cellsToReconvert ) {\n\t\tediting.reconvertItem( item );\n\t}\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/**\n * @module table/converters/table-cell-refresh-handler\n */\n\nimport type {\n\tEditingController,\n\tModelElement,\n\tMapper,\n\tModel\n} from '@ckeditor/ckeditor5-engine';\n\nimport { isSingleParagraphWithoutAttributes } from './downcast.js';\n\n/**\n * A table cell refresh handler which marks the table cell in the differ to have it re-rendered.\n *\n * Model `paragraph` inside a table cell can be rendered as `<span>` or `<p>`. It is rendered as `<span>` if this is the only block\n * element in that table cell and it does not have any attributes. It is rendered as `<p>` otherwise.\n *\n * When table cell content changes, for example a second `paragraph` element is added, we need to ensure that the first `paragraph` is\n * re-rendered so it changes from `<span>` to `<p>`. The easiest way to do it is to re-render the entire table cell.\n *\n * @internal\n */\nexport function tableCellRefreshHandler( model: Model, editing: EditingController ): void {\n\tconst differ = model.document.differ;\n\n\t// Stores cells to be refreshed, so the table cell will be refreshed once for multiple changes.\n\tconst cellsToCheck = new Set();\n\n\tfor ( const change of differ.getChanges() ) {\n\t\tconst parent = change.type == 'attribute' ? change.range.start.parent : change.position.parent;\n\n\t\tif ( parent.is( 'element', 'tableCell' ) ) {\n\t\t\tcellsToCheck.add( parent );\n\t\t}\n\t}\n\n\tfor ( const tableCell of cellsToCheck.values() as Iterable<ModelElement> ) {\n\t\tconst paragraphsToRefresh = Array.from( tableCell.getChildren() )\n\t\t\t.filter( child => shouldRefresh( child as ModelElement, editing.mapper ) );\n\n\t\tfor ( const paragraph of paragraphsToRefresh ) {\n\t\t\tediting.reconvertItem( paragraph );\n\t\t}\n\t}\n}\n\n/**\n * Check if given model element needs refreshing.\n */\nfunction shouldRefresh( child: ModelElement, mapper: Mapper ) {\n\tif ( !child.is( 'element', 'paragraph' ) ) {\n\t\treturn false;\n\t}\n\n\tconst viewElement = mapper.toViewElement( child );\n\n\tif ( !viewElement ) {\n\t\treturn false;\n\t}\n\n\treturn isSingleParagraphWithoutAttributes( child ) !== viewElement.is( 'element', 'span' );\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/**\n * @module table/tableediting\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { ModelPositionOffset, ViewElement, DowncastSlotFilter } from '@ckeditor/ckeditor5-engine';\n\nimport { upcastTable, ensureParagraphInTableCell, skipEmptyTableRow, upcastTableFigure } from './converters/upcasttable.js';\nimport {\n\tconvertParagraphInTableCell,\n\tdowncastCell,\n\tdowncastRow,\n\tdowncastTable,\n\tdowncastTableBorderAndBackgroundAttributes,\n\tconvertPlainTable,\n\tconvertPlainTableCaption\n} from './converters/downcast.js';\n\nimport { InsertTableCommand } from './commands/inserttablecommand.js';\nimport { InsertRowCommand } from './commands/insertrowcommand.js';\nimport { InsertColumnCommand } from './commands/insertcolumncommand.js';\nimport { SplitCellCommand } from './commands/splitcellcommand.js';\nimport { MergeCellCommand } from './commands/mergecellcommand.js';\nimport { RemoveRowCommand } from './commands/removerowcommand.js';\nimport { RemoveColumnCommand } from './commands/removecolumncommand.js';\nimport { SetHeaderRowCommand } from './commands/setheaderrowcommand.js';\nimport { SetFooterRowCommand } from './commands/setfooterrowcommand.js';\nimport { SetHeaderColumnCommand } from './commands/setheadercolumncommand.js';\nimport { MergeCellsCommand } from './commands/mergecellscommand.js';\nimport { SelectRowCommand } from './commands/selectrowcommand.js';\nimport { SelectColumnCommand } from './commands/selectcolumncommand.js';\nimport { TableUtils } from './tableutils.js';\n\nimport { injectTableLayoutPostFixer } from './converters/table-layout-post-fixer.js';\nimport { injectTableCellParagraphPostFixer } from './converters/table-cell-paragraph-post-fixer.js';\nimport { injectTableStructurePostFixer } from './converters/table-structure-post-fixer.js';\n\nimport { tableStructureRefreshHandler } from './converters/table-structure-refresh-handler.js';\nimport { tableCellRefreshHandler } from './converters/table-cell-refresh-handler.js';\nimport { isTableCellTypeEnabled } from './utils/common.js';\n\n/**\n * The table editing feature.\n */\nexport class TableEditing extends Plugin {\n\t/**\n\t * Handlers for creating additional slots in the table.\n\t */\n\tprivate _additionalSlots: Array<TableConversionAdditionalSlot>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableUtils ]> {\n\t\treturn [ TableUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._additionalSlots = [];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst conversion = editor.conversion;\n\t\tconst tableUtils = editor.plugins.get( TableUtils );\n\n\t\teditor.config.define( 'table.enableFooters', false );\n\n\t\tconst useFooterElement = !!editor.config.get( 'table.enableFooters' );\n\n\t\tschema.register( 'table', {\n\t\t\tinheritAllFrom: '$blockObject',\n\t\t\tallowAttributes: [\n\t\t\t\t'headingRows',\n\t\t\t\t'headingColumns',\n\t\t\t\t...useFooterElement ? [ 'footerRows' ] : []\n\t\t\t]\n\t\t} );\n\n\t\tschema.register( 'tableRow', {\n\t\t\tallowIn: 'table',\n\t\t\tisLimit: true\n\t\t} );\n\n\t\tschema.register( 'tableCell', {\n\t\t\tallowContentOf: '$container',\n\t\t\tallowIn: 'tableRow',\n\t\t\tallowAttributes: [ 'colspan', 'rowspan' ],\n\t\t\tisLimit: true,\n\t\t\tisSelectable: true\n\t\t} );\n\n\t\t// Figure conversion.\n\t\tconversion.for( 'upcast' ).add( upcastTableFigure() );\n\n\t\t// Table conversion.\n\t\tconversion.for( 'upcast' ).add( upcastTable( { enableFooters: useFooterElement } ) );\n\n\t\tconversion.for( 'editingDowncast' ).elementToStructure( {\n\t\t\tmodel: {\n\t\t\t\tname: 'table',\n\t\t\t\tattributes: [\n\t\t\t\t\t'headingRows',\n\t\t\t\t\t...useFooterElement ? [ 'footerRows' ] : []\n\t\t\t\t]\n\t\t\t},\n\t\t\tview: downcastTable( tableUtils, {\n\t\t\t\tasWidget: true,\n\t\t\t\tadditionalSlots: this._additionalSlots\n\t\t\t} )\n\t\t} );\n\t\tconversion.for( 'dataDowncast' ).elementToStructure( {\n\t\t\tmodel: {\n\t\t\t\tname: 'table',\n\t\t\t\tattributes: [\n\t\t\t\t\t'headingRows',\n\t\t\t\t\t...useFooterElement ? [ 'footerRows' ] : []\n\t\t\t\t]\n\t\t\t},\n\t\t\tview: downcastTable( tableUtils, {\n\t\t\t\tadditionalSlots: this._additionalSlots\n\t\t\t} )\n\t\t} );\n\n\t\t// Table row conversion.\n\t\tconversion.for( 'upcast' ).elementToElement( { model: 'tableRow', view: 'tr' } );\n\t\tconversion.for( 'upcast' ).add( skipEmptyTableRow() );\n\n\t\tconversion.for( 'downcast' ).elementToElement( {\n\t\t\tmodel: 'tableRow',\n\t\t\tview: downcastRow()\n\t\t} );\n\n\t\t// Table cell conversion.\n\t\tconversion.for( 'upcast' ).elementToElement( { model: 'tableCell', view: 'td' } );\n\t\tconversion.for( 'upcast' ).elementToElement( { model: 'tableCell', view: 'th' } );\n\t\tconversion.for( 'upcast' ).add( ensureParagraphInTableCell( 'td' ) );\n\t\tconversion.for( 'upcast' ).add( ensureParagraphInTableCell( 'th' ) );\n\n\t\tconversion.for( 'editingDowncast' ).elementToElement( {\n\t\t\tmodel: 'tableCell',\n\t\t\tview: downcastCell( {\n\t\t\t\tasWidget: true,\n\t\t\t\tcellTypeEnabled: () => isTableCellTypeEnabled( this.editor )\n\t\t\t} )\n\t\t} );\n\t\tconversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'tableCell',\n\t\t\tview: downcastCell( {\n\t\t\t\tcellTypeEnabled: () => isTableCellTypeEnabled( this.editor )\n\t\t\t} )\n\t\t} );\n\n\t\t// Duplicates code - needed to properly refresh paragraph inside a table cell.\n\t\tconversion.for( 'editingDowncast' ).elementToElement( {\n\t\t\tmodel: 'paragraph',\n\t\t\tview: convertParagraphInTableCell( { asWidget: true } ),\n\t\t\tconverterPriority: 'high'\n\t\t} );\n\t\tconversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'paragraph',\n\t\t\tview: convertParagraphInTableCell(),\n\t\t\tconverterPriority: 'high'\n\t\t} );\n\n\t\t// Table attributes conversion.\n\t\tconversion.for( 'downcast' ).attributeToAttribute( { model: 'colspan', view: 'colspan' } );\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tmodel: { key: 'colspan', value: upcastCellSpan( 'colspan' ) },\n\t\t\tview: 'colspan'\n\t\t} );\n\n\t\tconversion.for( 'downcast' ).attributeToAttribute( { model: 'rowspan', view: 'rowspan' } );\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tmodel: { key: 'rowspan', value: upcastCellSpan( 'rowspan' ) },\n\t\t\tview: 'rowspan'\n\t\t} );\n\n\t\t// Plain table output converters (also used in the clipboard pipeline).\n\t\tthis._addPlainTableOutputConverters();\n\n\t\t// Define the config.\n\t\teditor.config.define( 'table.defaultHeadings.rows', 0 );\n\t\teditor.config.define( 'table.defaultHeadings.columns', 0 );\n\t\teditor.config.define( 'table.defaultFooters', 0 );\n\t\teditor.config.define( 'table.showHiddenBorders', true );\n\n\t\tif ( editor.config.get( 'table.showHiddenBorders' ) ) {\n\t\t\teditor.editing.view.change( writer => {\n\t\t\t\tfor ( const root of editor.editing.view.document.roots ) {\n\t\t\t\t\twriter.addClass( 'ck-table-show-hidden-borders', root );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Define all the commands.\n\t\teditor.commands.add( 'insertTable', new InsertTableCommand( editor ) );\n\t\teditor.commands.add( 'insertTableRowAbove', new InsertRowCommand( editor, { order: 'above' } ) );\n\t\teditor.commands.add( 'insertTableRowBelow', new InsertRowCommand( editor, { order: 'below' } ) );\n\t\teditor.commands.add( 'insertTableColumnLeft', new InsertColumnCommand( editor, { order: 'left' } ) );\n\t\teditor.commands.add( 'insertTableColumnRight', new InsertColumnCommand( editor, { order: 'right' } ) );\n\n\t\teditor.commands.add( 'removeTableRow', new RemoveRowCommand( editor ) );\n\t\teditor.commands.add( 'removeTableColumn', new RemoveColumnCommand( editor ) );\n\n\t\teditor.commands.add( 'splitTableCellVertically', new SplitCellCommand( editor, { direction: 'vertically' } ) );\n\t\teditor.commands.add( 'splitTableCellHorizontally', new SplitCellCommand( editor, { direction: 'horizontally' } ) );\n\n\t\teditor.commands.add( 'mergeTableCells', new MergeCellsCommand( editor ) );\n\n\t\teditor.commands.add( 'mergeTableCellRight', new MergeCellCommand( editor, { direction: 'right' } ) );\n\t\teditor.commands.add( 'mergeTableCellLeft', new MergeCellCommand( editor, { direction: 'left' } ) );\n\t\teditor.commands.add( 'mergeTableCellDown', new MergeCellCommand( editor, { direction: 'down' } ) );\n\t\teditor.commands.add( 'mergeTableCellUp', new MergeCellCommand( editor, { direction: 'up' } ) );\n\n\t\teditor.commands.add( 'setTableColumnHeader', new SetHeaderColumnCommand( editor ) );\n\t\teditor.commands.add( 'setTableRowHeader', new SetHeaderRowCommand( editor ) );\n\n\t\tif ( useFooterElement ) {\n\t\t\teditor.commands.add( 'setTableFooterRow', new SetFooterRowCommand( editor ) );\n\t\t}\n\n\t\teditor.commands.add( 'selectTableRow', new SelectRowCommand( editor ) );\n\t\teditor.commands.add( 'selectTableColumn', new SelectColumnCommand( editor ) );\n\n\t\tinjectTableLayoutPostFixer( model );\n\t\tinjectTableCellParagraphPostFixer( model );\n\n\t\tif ( useFooterElement ) {\n\t\t\tinjectTableStructurePostFixer( editor );\n\t\t}\n\n\t\tthis.listenTo( model.document, 'change:data', () => {\n\t\t\t// It's no longer needed to refresh table headings on every data change if table cell type feature is enabled.\n\t\t\t// It's because headings rows / columns are updated based on cell types which triggers their own refresh handler.\n\t\t\tif ( !isTableCellTypeEnabled( editor ) ) {\n\t\t\t\ttableStructureRefreshHandler( model, editor.editing );\n\t\t\t}\n\n\t\t\ttableCellRefreshHandler( model, editor.editing );\n\t\t} );\n\t}\n\n\t/**\n\t * Registers downcast handler for the additional table slot.\n\t */\n\tpublic registerAdditionalSlot( slotHandler: TableConversionAdditionalSlot ): void {\n\t\tthis._additionalSlots.push( slotHandler );\n\t}\n\n\t/**\n\t * Adds converters for plain table output. These converters are used either when the `PlainTableOutput` plugin is loaded\n\t * or when content is processed by the clipboard pipeline, ensuring that pasted tables are not wrapped in a <figure> element.\n\t */\n\tprivate _addPlainTableOutputConverters(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Override default table data downcast converter.\n\t\teditor.conversion.for( 'dataDowncast' ).elementToStructure( {\n\t\t\tmodel: 'table',\n\t\t\tview: convertPlainTable( editor ),\n\t\t\tconverterPriority: 'high'\n\t\t} );\n\n\t\t// Make sure table <caption> is downcasted into <caption> in the data pipeline when necessary.\n\t\tif ( editor.plugins.has( 'TableCaptionEditing' ) ) {\n\t\t\teditor.conversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\t\tmodel: 'caption',\n\t\t\t\tview: convertPlainTableCaption( editor ),\n\t\t\t\tconverterPriority: 'high'\n\t\t\t} );\n\t\t}\n\n\t\t// Handle border-style, border-color, border-width and background-color table attributes.\n\t\tif ( editor.plugins.has( 'TablePropertiesEditing' ) ) {\n\t\t\tdowncastTableBorderAndBackgroundAttributes( editor );\n\t\t}\n\t}\n}\n\n/**\n * Returns fixed colspan and rowspan attrbutes values.\n *\n * @param type colspan or rowspan.\n * @returns conversion value function.\n */\nfunction upcastCellSpan( type: string ) {\n\treturn ( cell: ViewElement ) => {\n\t\tconst span = parseInt( cell.getAttribute( type )! );\n\n\t\tif ( Number.isNaN( span ) || span <= 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn span;\n\t};\n}\n\n/**\n * By default, only the `tableRow` elements from the `table` model are downcast inside the `<table>` and\n * all other elements are pushed outside the table. This handler allows creating additional slots inside\n * the table for other elements.\n *\n * Take this model as an example:\n *\n * ```xml\n * <table>\n *   <tableRow>...</tableRow>\n *   <tableRow>...</tableRow>\n *   <tableColumnGroup>...</tableColumnGroup>\n * </table>\n * ```\n *\n * By default, downcasting result will be:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>...</tr>\n *     <tr>...</tr>\n *   </tbody>\n * </table>\n * <colgroup>...</colgroup>\n * ```\n *\n * To allow the `tableColumnGroup` element at the end of the table, use the following configuration:\n *\n * ```ts\n * const additionalSlot = {\n *   filter: element => element.is( 'element', 'tableColumnGroup' ),\n *   positionOffset: 'end'\n * }\n * ```\n *\n * Now, the downcast result will be:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>...</tr>\n *     <tr>...</tr>\n *   </tbody>\n *   <colgroup>...</colgroup>\n * </table>\n * ```\n */\nexport interface TableConversionAdditionalSlot {\n\n\t/**\n\t * Filter for elements that should be placed inside given slot.\n\t */\n\tfilter: DowncastSlotFilter;\n\n\t/**\n\t * Position of the slot within the table.\n\t */\n\tpositionOffset: ModelPositionOffset;\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/**\n * @module table/ui/inserttableview\n */\n\nimport { View, ButtonView, addKeyboardHandlingForGrid, type ViewCollection } from '@ckeditor/ckeditor5-ui';\n\nimport { KeystrokeHandler, FocusTracker, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The table size view.\n *\n * It renders a 10x10 grid to choose the inserted table size.\n *\n * @internal\n */\nexport class InsertTableView extends View {\n\t/**\n\t * A collection of table size box items.\n\t */\n\tpublic readonly items: ViewCollection<ButtonView>;\n\n\t/**\n\t * Listen to `keydown` events fired in this view's main element.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * Tracks information about the DOM focus in the grid.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * The currently selected number of rows of the new table.\n\t *\n\t * @observable\n\t */\n\tdeclare public rows: number;\n\n\t/**\n\t * The currently selected number of columns of the new table.\n\t *\n\t * @observable\n\t */\n\tdeclare public columns: number;\n\n\t/**\n\t * The label text displayed under the boxes.\n\t *\n\t * @observable\n\t */\n\tdeclare public label: string;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\t\tthis.items = this._createGridCollection();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.set( 'rows', 0 );\n\t\tthis.set( 'columns', 0 );\n\t\tthis.bind( 'label' ).to( this, 'columns', this, 'rows', ( columns, rows ) => `${ rows } × ${ columns }` );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [ 'ck' ]\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [ 'ck-insert-table-dropdown__grid' ]\n\t\t\t\t\t},\n\t\t\t\t\ton: {\n\t\t\t\t\t\t'mouseover@.ck-insert-table-dropdown-grid-box': bind.to( 'boxover' )\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.items\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t\t'ck-insert-table-dropdown__label'\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'aria-hidden': true\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: bind.to( 'label' )\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t],\n\n\t\t\ton: {\n\t\t\t\tmousedown: bind.to( evt => {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t} ),\n\n\t\t\t\tclick: bind.to( () => {\n\t\t\t\t\tthis.fire( 'execute' );\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\n\t\t// #rows and #columns are set via changes to #focusTracker on mouse over.\n\t\tthis.on( 'boxover', ( evt, domEvt ) => {\n\t\t\tconst { row, column } = domEvt.target.dataset;\n\t\t\tthis.items.get( ( parseInt( row, 10 ) - 1 ) * 10 + ( parseInt( column, 10 ) - 1 ) )!.focus();\n\t\t} );\n\n\t\t// This allows the #rows and #columns to be updated when:\n\t\t// * the user navigates the grid using the keyboard,\n\t\t// * the user moves the mouse over grid items.\n\t\tthis.focusTracker.on( 'change:focusedElement', ( evt, name, focusedElement ) => {\n\t\t\tif ( !focusedElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { row, column } = focusedElement.dataset;\n\n\t\t\t// As row & column indexes are zero-based transform it to number of selected rows & columns.\n\t\t\tthis.set( {\n\t\t\t\trows: parseInt( row ),\n\t\t\t\tcolumns: parseInt( column )\n\t\t\t} );\n\t\t} );\n\n\t\tthis.on( 'change:columns', () => this._highlightGridBoxes() );\n\t\tthis.on( 'change:rows', () => this._highlightGridBoxes() );\n\t}\n\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\taddKeyboardHandlingForGrid( {\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tgridItems: this.items,\n\t\t\tnumberOfColumns: 10,\n\t\t\tuiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n\t\t} );\n\n\t\tfor ( const item of this.items ) {\n\t\t\tthis.focusTracker.add( item.element! );\n\t\t}\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * Resets the rows and columns selection.\n\t */\n\tpublic reset(): void {\n\t\tthis.set( {\n\t\t\trows: 1,\n\t\t\tcolumns: 1\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focus(): void {\n\t\tthis.items.get( 0 )!.focus();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic focusLast(): void {\n\t\tthis.items.get( 0 )!.focus();\n\t}\n\n\t/**\n\t * Highlights grid boxes depending on rows and columns selected.\n\t */\n\tprivate _highlightGridBoxes() {\n\t\tconst rows = this.rows;\n\t\tconst columns = this.columns;\n\n\t\tthis.items.map( ( boxView, index ) => {\n\t\t\t// Translate box index to the row & column index.\n\t\t\tconst itemRow = Math.floor( index / 10 );\n\t\t\tconst itemColumn = index % 10;\n\n\t\t\t// Grid box is highlighted when its row & column index belongs to selected number of rows & columns.\n\t\t\tconst isOn = itemRow < rows && itemColumn < columns;\n\n\t\t\tboxView.set( 'isOn', isOn );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a new Button for the grid.\n\t *\n\t * @param locale The locale instance.\n\t * @param row Row number.\n\t * @param column Column number.\n\t * @param label The grid button label.\n\t */\n\tprivate _createGridButton( locale: Locale, row: number, column: number, label: string ): ButtonView {\n\t\tconst button = new ButtonView( locale );\n\n\t\tbutton.set( {\n\t\t\tlabel,\n\t\t\tclass: 'ck-insert-table-dropdown-grid-box'\n\t\t} );\n\n\t\tbutton.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\t'data-row': row,\n\t\t\t\t'data-column': column\n\t\t\t}\n\t\t} );\n\n\t\treturn button;\n\t}\n\n\t/**\n\t * @returns A view collection containing boxes to be placed in a table grid.\n\t */\n\tprivate _createGridCollection() {\n\t\tconst boxes = [];\n\n\t\t// Add grid boxes to table selection view.\n\t\tfor ( let index = 0; index < 100; index++ ) {\n\t\t\tconst row = Math.floor( index / 10 );\n\t\t\tconst column = index % 10;\n\t\t\tconst label = `${ row + 1 } × ${ column + 1 }`;\n\n\t\t\tboxes.push( this._createGridButton( this.locale!, row + 1, column + 1, label ) );\n\t\t}\n\n\t\treturn this.createCollection( boxes );\n\t}\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/**\n * @module table/tableui\n */\n\nimport { Plugin, type Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { IconTable, IconTableColumn, IconTableRow, IconTableMergeCell } from '@ckeditor/ckeditor5-icons';\nimport {\n\taddListToDropdown,\n\tcreateDropdown,\n\tUIModel,\n\tSplitButtonView,\n\tSwitchButtonView,\n\ttype DropdownView,\n\ttype ListDropdownItemDefinition,\n\tMenuBarMenuView\n} from '@ckeditor/ckeditor5-ui';\nimport { Collection, type ObservableChangeEvent, type Locale } from '@ckeditor/ckeditor5-utils';\n\nimport { InsertTableView } from './ui/inserttableview.js';\n\nimport { type InsertTableCommand } from './commands/inserttablecommand.js';\nimport { type MergeCellsCommand } from './commands/mergecellscommand.js';\n\n/**\n * The table UI plugin. It introduces:\n *\n * * The `'insertTable'` dropdown,\n * * The `'menuBar:insertTable'` menu bar menu,\n * * The `'tableColumn'` dropdown,\n * * The `'tableRow'` dropdown,\n * * The `'mergeTableCells'` split button.\n *\n * The `'tableColumn'`, `'tableRow'` and `'mergeTableCells'` dropdowns work best with {@link module:table/tabletoolbar~TableToolbar}.\n */\nexport class TableUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\t\tconst contentLanguageDirection = editor.locale.contentLanguageDirection;\n\t\tconst isContentLtr = contentLanguageDirection === 'ltr';\n\t\tconst areTableFootersEnabled = !!editor.config.get( 'table.enableFooters' );\n\n\t\teditor.ui.componentFactory.add( 'insertTable', locale => {\n\t\t\tconst command: InsertTableCommand = editor.commands.get( 'insertTable' )!;\n\t\t\tconst dropdownView = createDropdown( locale );\n\n\t\t\tdropdownView.bind( 'isEnabled' ).to( command );\n\n\t\t\t// Decorate dropdown's button.\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\ticon: IconTable,\n\t\t\t\tlabel: t( 'Insert table' ),\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tlet insertTableView: InsertTableView;\n\n\t\t\tdropdownView.on( 'change:isOpen', () => {\n\t\t\t\tif ( insertTableView ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prepare custom view for dropdown's panel.\n\t\t\t\tinsertTableView = new InsertTableView( locale );\n\t\t\t\tdropdownView.panelView.children.add( insertTableView );\n\n\t\t\t\tinsertTableView.delegate( 'execute' ).to( dropdownView );\n\n\t\t\t\tdropdownView.on( 'execute', () => {\n\t\t\t\t\teditor.execute( 'insertTable', { rows: insertTableView.rows, columns: insertTableView.columns } );\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:insertTable', locale => {\n\t\t\tconst command: InsertTableCommand = editor.commands.get( 'insertTable' )!;\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\t\t\tconst insertTableView = new InsertTableView( locale );\n\n\t\t\tinsertTableView.delegate( 'execute' ).to( menuView );\n\n\t\t\tmenuView.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( event, name, isOpen ) => {\n\t\t\t\tif ( !isOpen ) {\n\t\t\t\t\tinsertTableView.reset();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tinsertTableView.on( 'execute', () => {\n\t\t\t\teditor.execute( 'insertTable', { rows: insertTableView.rows, columns: insertTableView.columns } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\tlabel: t( 'Table' ),\n\t\t\t\ticon: IconTable\n\t\t\t} );\n\n\t\t\tmenuView.panelView.children.add( insertTableView );\n\n\t\t\tmenuView.bind( 'isEnabled' ).to( command );\n\n\t\t\treturn menuView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'tableColumn', locale => {\n\t\t\tconst options = [\n\t\t\t\t{\n\t\t\t\t\ttype: 'switchbutton',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'setTableColumnHeader',\n\t\t\t\t\t\tlabel: t( 'Header column' ),\n\t\t\t\t\t\tbindIsOn: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ type: 'separator' },\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? 'insertTableColumnLeft' : 'insertTableColumnRight',\n\t\t\t\t\t\tlabel: t( 'Insert column left' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? 'insertTableColumnRight' : 'insertTableColumnLeft',\n\t\t\t\t\t\tlabel: t( 'Insert column right' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'removeTableColumn',\n\t\t\t\t\t\tlabel: t( 'Delete column' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'selectTableColumn',\n\t\t\t\t\t\tlabel: t( 'Select column' )\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t] as Array<ListDropdownItemDefinition>;\n\n\t\t\treturn this._prepareDropdown( t( 'Column' ), IconTableColumn, options, locale );\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'tableRow', locale => {\n\t\t\tconst options = [\n\t\t\t\t{\n\t\t\t\t\ttype: 'switchbutton',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'setTableRowHeader',\n\t\t\t\t\t\tlabel: t( 'Header row' ),\n\t\t\t\t\t\tbindIsOn: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tareTableFootersEnabled && {\n\t\t\t\t\ttype: 'switchbutton',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'setTableFooterRow',\n\t\t\t\t\t\tlabel: t( 'Footer row' ),\n\t\t\t\t\t\tbindIsOn: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ type: 'separator' },\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'insertTableRowAbove',\n\t\t\t\t\t\tlabel: t( 'Insert row above' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'insertTableRowBelow',\n\t\t\t\t\t\tlabel: t( 'Insert row below' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'removeTableRow',\n\t\t\t\t\t\tlabel: t( 'Delete row' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'selectTableRow',\n\t\t\t\t\t\tlabel: t( 'Select row' )\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t].filter( Boolean ) as Array<ListDropdownItemDefinition>;\n\n\t\t\treturn this._prepareDropdown( t( 'Row' ), IconTableRow, options, locale );\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'mergeTableCells', locale => {\n\t\t\tconst options = [\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'mergeTableCellUp',\n\t\t\t\t\t\tlabel: t( 'Merge cell up' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? 'mergeTableCellRight' : 'mergeTableCellLeft',\n\t\t\t\t\t\tlabel: t( 'Merge cell right' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'mergeTableCellDown',\n\t\t\t\t\t\tlabel: t( 'Merge cell down' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: isContentLtr ? 'mergeTableCellLeft' : 'mergeTableCellRight',\n\t\t\t\t\t\tlabel: t( 'Merge cell left' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ type: 'separator' },\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'splitTableCellVertically',\n\t\t\t\t\t\tlabel: t( 'Split cell vertically' )\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tcommandName: 'splitTableCellHorizontally',\n\t\t\t\t\t\tlabel: t( 'Split cell horizontally' )\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t] as Array<ListDropdownItemDefinition>;\n\n\t\t\treturn this._prepareMergeSplitButtonDropdown( t( 'Merge cells' ), IconTableMergeCell, options, locale );\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a dropdown view from a set of options.\n\t *\n\t * @param label The dropdown button label.\n\t * @param icon An icon for the dropdown button.\n\t * @param options The list of options for the dropdown.\n\t */\n\tprivate _prepareDropdown( label: string, icon: string, options: Array<ListDropdownItemDefinition>, locale: Locale ) {\n\t\tconst editor = this.editor;\n\t\tconst dropdownView = createDropdown( locale );\n\t\tconst commands = this._fillDropdownWithListOptions( dropdownView, options );\n\n\t\t// Decorate dropdown's button.\n\t\tdropdownView.buttonView.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\t// Make dropdown button disabled when all options are disabled.\n\t\tdropdownView.bind( 'isEnabled' ).toMany( commands, 'isEnabled', ( ...areEnabled ) => {\n\t\t\treturn areEnabled.some( isEnabled => isEnabled );\n\t\t} );\n\n\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\teditor.execute( ( evt.source as any ).commandName );\n\n\t\t\t// Toggling a switch button view should not move the focus to the editable.\n\t\t\tif ( !( evt.source instanceof SwitchButtonView ) ) {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t}\n\t\t} );\n\n\t\treturn dropdownView;\n\t}\n\n\t/**\n\t * Creates a dropdown view with a {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} for\n\t * merge (and split)–related commands.\n\t *\n\t * @param label The dropdown button label.\n\t * @param icon An icon for the dropdown button.\n\t * @param options The list of options for the dropdown.\n\t */\n\tprivate _prepareMergeSplitButtonDropdown( label: string, icon: string, options: Array<ListDropdownItemDefinition>, locale: Locale ) {\n\t\tconst editor = this.editor;\n\t\tconst dropdownView = createDropdown( locale, SplitButtonView );\n\t\tconst mergeCommandName = 'mergeTableCells';\n\n\t\t// Main command.\n\t\tconst mergeCommand: MergeCellsCommand = editor.commands.get( mergeCommandName )!;\n\n\t\t// Subcommands in the dropdown.\n\t\tconst commands = this._fillDropdownWithListOptions( dropdownView, options );\n\n\t\tdropdownView.buttonView.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true,\n\t\t\tisEnabled: true\n\t\t} );\n\n\t\t// Make dropdown button disabled when all options are disabled together with the main command.\n\t\tdropdownView.bind( 'isEnabled' ).toMany( [ mergeCommand, ...commands ], 'isEnabled', ( ...areEnabled ) => {\n\t\t\treturn areEnabled.some( isEnabled => isEnabled );\n\t\t} );\n\n\t\t// Merge selected table cells when the main part of the split button is clicked.\n\t\tthis.listenTo( dropdownView.buttonView, 'execute', () => {\n\t\t\teditor.execute( mergeCommandName );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\t// Execute commands for events coming from the list in the dropdown panel.\n\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\teditor.execute( ( evt.source as any ).commandName );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn dropdownView;\n\t}\n\n\t/**\n\t * Injects a {@link module:ui/list/listview~ListView} into the passed dropdown with buttons\n\t * which execute editor commands as configured in passed options.\n\t *\n\t * @param options The list of options for the dropdown.\n\t * @returns Commands the list options are interacting with.\n\t */\n\tprivate _fillDropdownWithListOptions( dropdownView: DropdownView, options: Array<ListDropdownItemDefinition> ) {\n\t\tconst editor = this.editor;\n\t\tconst commands: Array<Command> = [];\n\t\tconst itemDefinitions = new Collection<ListDropdownItemDefinition>();\n\n\t\tfor ( const option of options ) {\n\t\t\taddListOption( option, editor, commands, itemDefinitions );\n\t\t}\n\n\t\taddListToDropdown( dropdownView, itemDefinitions );\n\n\t\treturn commands;\n\t}\n}\n\n/**\n * Adds an option to a list view.\n *\n * @param option A configuration option.\n * @param commands The list of commands to update.\n * @param itemDefinitions A collection of dropdown items to update with the given option.\n */\nfunction addListOption(\n\toption: ListDropdownItemDefinition,\n\teditor: Editor,\n\tcommands: Array<Command>,\n\titemDefinitions: Collection<ListDropdownItemDefinition>\n) {\n\tif ( option.type === 'button' || option.type === 'switchbutton' ) {\n\t\tconst model = option.model = new UIModel( option.model );\n\t\tconst { commandName, bindIsOn } = option.model;\n\t\tconst command = editor.commands.get( commandName as string )!;\n\n\t\tcommands.push( command );\n\n\t\tmodel.set( { commandName } );\n\n\t\tmodel.bind( 'isEnabled' ).to( command );\n\n\t\tif ( bindIsOn ) {\n\t\t\tmodel.bind( 'isOn' ).to( command, 'value' );\n\t\t}\n\n\t\tmodel.set( {\n\t\t\twithText: true\n\t\t} );\n\t}\n\n\titemDefinitions.add( option );\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/**\n * @module table/tableselection\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { type EventInfo, first } from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tModelElement,\n\tModelDocumentFragment,\n\tModelSelection,\n\tViewDowncastWriter,\n\tViewElement,\n\tModelDeleteContentEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport type {\n\tViewDocumentInsertTextEvent,\n\tInsertTextEventData\n} from '@ckeditor/ckeditor5-typing';\n\nimport { TableWalker } from './tablewalker.js';\nimport { TableUtils } from './tableutils.js';\n\nimport { cropTableToDimensions, adjustLastRowIndex, adjustLastColumnIndex } from './utils/structure.js';\n\n/**\n * This plugin enables the advanced table cells, rows and columns selection.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */\nexport class TableSelection extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableSelection' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableUtils, TableUtils ]> {\n\t\treturn [ TableUtils, TableUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\n\t\tthis.listenTo<ModelDeleteContentEvent>(\n\t\t\tmodel,\n\t\t\t'deleteContent',\n\t\t\t( evt, args ) => this._handleDeleteContent( evt, args ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\n\t\tthis.listenTo<ViewDocumentInsertTextEvent>(\n\t\t\tview.document,\n\t\t\t'insertText',\n\t\t\t( evt, data ) => this._handleInsertTextEvent( evt, data ),\n\t\t\t{ priority: 'high' }\n\t\t);\n\n\t\tthis._defineSelectionConverter();\n\t\tthis._enablePluginDisabling(); // sic!\n\t}\n\n\t/**\n\t * Returns the currently selected table cells or `null` if it is not a table cells selection.\n\t */\n\tpublic getSelectedTableCells(): Array<ModelElement> | null {\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\t\tconst selection = this.editor.model.document.selection;\n\n\t\tconst selectedCells = tableUtils.getSelectedTableCells( selection );\n\n\t\tif ( selectedCells.length == 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// This should never happen, but let's know if it ever happens.\n\t\t// @if CK_DEBUG //\tif ( selectedCells.length != selection.rangeCount ) {\n\t\t// @if CK_DEBUG //\t\tconsole.warn( 'Mixed selection warning. The selection contains table cells and some other ranges.' );\n\t\t// @if CK_DEBUG //\t}\n\n\t\treturn selectedCells;\n\t}\n\n\t/**\n\t * Returns the selected table fragment as a document fragment.\n\t */\n\tpublic getSelectionAsFragment(): ModelDocumentFragment | null {\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\t\tconst selectedCells = this.getSelectedTableCells();\n\n\t\tif ( !selectedCells ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.editor.model.change( writer => {\n\t\t\tconst documentFragment = writer.createDocumentFragment();\n\n\t\t\tconst { first: firstColumn, last: lastColumn } = tableUtils.getColumnIndexes( selectedCells );\n\t\t\tconst { first: firstRow, last: lastRow } = tableUtils.getRowIndexes( selectedCells );\n\n\t\t\tconst sourceTable = selectedCells[ 0 ].findAncestor( 'table' )!;\n\n\t\t\tlet adjustedLastRow = lastRow;\n\t\t\tlet adjustedLastColumn = lastColumn;\n\n\t\t\t// If the selection is rectangular there could be a case of all cells in the last row/column spanned over\n\t\t\t// next row/column so the real lastRow/lastColumn should be updated.\n\t\t\tif ( tableUtils.isSelectionRectangular( selectedCells ) ) {\n\t\t\t\tconst dimensions = {\n\t\t\t\t\tfirstColumn,\n\t\t\t\t\tlastColumn,\n\t\t\t\t\tfirstRow,\n\t\t\t\t\tlastRow\n\t\t\t\t};\n\n\t\t\t\tadjustedLastRow = adjustLastRowIndex( sourceTable, dimensions );\n\t\t\t\tadjustedLastColumn = adjustLastColumnIndex( sourceTable, dimensions );\n\t\t\t}\n\n\t\t\tconst cropDimensions = {\n\t\t\t\tstartRow: firstRow,\n\t\t\t\tstartColumn: firstColumn,\n\t\t\t\tendRow: adjustedLastRow,\n\t\t\t\tendColumn: adjustedLastColumn\n\t\t\t};\n\n\t\t\tconst table = cropTableToDimensions( sourceTable, cropDimensions, writer );\n\t\t\twriter.insert( table, documentFragment, 0 );\n\n\t\t\treturn documentFragment;\n\t\t} );\n\t}\n\n\t/**\n\t * Sets the model selection based on given anchor and target cells (can be the same cell).\n\t * Takes care of setting the backward flag.\n\t *\n\t * ```ts\n\t * const modelRoot = editor.model.document.getRoot();\n\t * const firstCell = modelRoot.getNodeByPath( [ 0, 0, 0 ] );\n\t * const lastCell = modelRoot.getNodeByPath( [ 0, 0, 1 ] );\n\t *\n\t * const tableSelection = editor.plugins.get( 'TableSelection' );\n\t * tableSelection.setCellSelection( firstCell, lastCell );\n\t * ```\n\t */\n\tpublic setCellSelection( anchorCell: ModelElement, targetCell: ModelElement ): void {\n\t\tconst cellsToSelect = this._getCellsToSelect( anchorCell, targetCell );\n\n\t\tthis.editor.model.change( writer => {\n\t\t\twriter.setSelection(\n\t\t\t\tcellsToSelect.cells.map( cell => writer.createRangeOn( cell ) ),\n\t\t\t\t{ backward: cellsToSelect.backward }\n\t\t\t);\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the focus cell from the current selection.\n\t */\n\tpublic getFocusCell(): ModelElement | null {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst focusCellRange = [ ...selection.getRanges() ].pop()!;\n\t\tconst element = focusCellRange.getContainedElement();\n\n\t\tif ( element && element.is( 'element', 'tableCell' ) ) {\n\t\t\treturn element;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns the anchor cell from the current selection.\n\t */\n\tpublic getAnchorCell(): ModelElement | null {\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst anchorCellRange = first( selection.getRanges() )!;\n\t\tconst element = anchorCellRange.getContainedElement();\n\n\t\tif ( element && element.is( 'element', 'tableCell' ) ) {\n\t\t\treturn element;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Defines a selection converter which marks the selected cells with a specific class.\n\t *\n\t * The real DOM selection is put in the last cell. Since the order of ranges is dependent on whether the\n\t * selection is backward or not, the last cell will usually be close to the \"focus\" end of the selection\n\t * (a selection has anchor and focus).\n\t *\n\t * The real DOM selection is then hidden with CSS.\n\t */\n\tprivate _defineSelectionConverter() {\n\t\tconst editor = this.editor;\n\t\tconst highlighted: Set<ViewElement> = new Set();\n\n\t\teditor.conversion.for( 'editingDowncast' ).add( dispatcher => dispatcher.on( 'selection', ( evt, data, conversionApi ) => {\n\t\t\tconst viewWriter = conversionApi.writer;\n\n\t\t\tclearHighlightedTableCells( viewWriter );\n\n\t\t\tconst selectedCells = this.getSelectedTableCells();\n\n\t\t\tif ( !selectedCells ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( const tableCell of selectedCells ) {\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement( tableCell )!;\n\n\t\t\t\tviewWriter.addClass( 'ck-editor__editable_selected', viewElement );\n\t\t\t\thighlighted.add( viewElement );\n\t\t\t}\n\n\t\t\tconst lastViewCell = conversionApi.mapper.toViewElement( selectedCells[ selectedCells.length - 1 ] );\n\t\t\tviewWriter.setSelection( lastViewCell, 0 );\n\t\t}, { priority: 'lowest' } ) );\n\n\t\tfunction clearHighlightedTableCells( viewWriter: ViewDowncastWriter ) {\n\t\t\tfor ( const previouslyHighlighted of highlighted ) {\n\t\t\t\tviewWriter.removeClass( 'ck-editor__editable_selected', previouslyHighlighted );\n\t\t\t}\n\n\t\t\thighlighted.clear();\n\t\t}\n\t}\n\n\t/**\n\t * Creates a listener that reacts to changes in {@link #isEnabled} and, if the plugin was disabled,\n\t * it collapses the multi-cell selection to a regular selection placed inside a table cell.\n\t *\n\t * This listener helps features that disable the table selection plugin bring the selection\n\t * to a clear state they can work with (for instance, because they don't support multiple cell selection).\n\t */\n\tprivate _enablePluginDisabling() {\n\t\tconst editor = this.editor;\n\n\t\tthis.on( 'change:isEnabled', () => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\tconst selectedCells = this.getSelectedTableCells();\n\n\t\t\t\tif ( !selectedCells ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\tconst position = writer.createPositionAt( selectedCells[ 0 ], 0 );\n\t\t\t\t\tconst range = editor.model.schema.getNearestSelectionRange( position );\n\n\t\t\t\t\twriter.setSelection( range );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Overrides the default `model.deleteContent()` behavior over a selected table fragment.\n\t *\n\t * @param args Delete content method arguments.\n\t */\n\tprivate _handleDeleteContent( event: EventInfo, args: Array<unknown> ) {\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\t\tconst selection = args[ 0 ] as ModelSelection;\n\t\tconst options = args[ 1 ] as { direction?: string };\n\t\tconst model = this.editor.model;\n\t\tconst isBackward = !options || options.direction == 'backward';\n\t\tconst selectedTableCells = tableUtils.getSelectedTableCells( selection );\n\n\t\tif ( !selectedTableCells.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.stop();\n\n\t\tmodel.change( writer => {\n\t\t\tconst tableCellToSelect = selectedTableCells[ isBackward ? selectedTableCells.length - 1 : 0 ];\n\n\t\t\tmodel.change( writer => {\n\t\t\t\tfor ( const tableCell of selectedTableCells ) {\n\t\t\t\t\tmodel.deleteContent( writer.createSelection( tableCell, 'in' ) );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst rangeToSelect = model.schema.getNearestSelectionRange( writer.createPositionAt( tableCellToSelect, 0 ) );\n\n\t\t\t// Note: we ignore the case where rangeToSelect may be null because deleteContent() will always (unless someone broke it)\n\t\t\t// create an empty paragraph to accommodate the selection.\n\n\t\t\tif ( selection.is( 'documentSelection' ) ) {\n\t\t\t\twriter.setSelection( rangeToSelect );\n\t\t\t} else {\n\t\t\t\tselection.setTo( rangeToSelect );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * This handler makes it possible to remove the content of all selected cells by starting to type.\n\t * If you take a look at {@link #_defineSelectionConverter} you will find out that despite the multi-cell selection being set\n\t * in the model, the view selection is collapsed in the last cell (because most browsers are unable to render multi-cell selections;\n\t * yes, it's a hack).\n\t *\n\t * When multiple cells are selected in the model and the user starts to type, the\n\t * {@link module:engine/view/document~ViewDocument#event:insertText} event carries information provided by the\n\t * beforeinput DOM  event, that in turn only knows about this collapsed DOM selection in the last cell.\n\t *\n\t * As a result, the selected cells have no chance to be cleaned up. To fix this, this listener intercepts\n\t * the event and injects the custom view selection in the data that translates correctly to the actual state\n\t * of the multi-cell selection in the model.\n\t *\n\t * @param data Insert text event data.\n\t */\n\tprivate _handleInsertTextEvent( evt: EventInfo, data: InsertTextEventData ) {\n\t\tconst editor = this.editor;\n\t\tconst selectedCells = this.getSelectedTableCells();\n\n\t\tif ( !selectedCells ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst view = editor.editing.view;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst viewRanges = selectedCells.map( tableCell => view.createRangeOn( mapper.toViewElement( tableCell )! ) );\n\n\t\tdata.selection = view.createSelection( viewRanges );\n\n\t\t// Do not let the browser handle it itself. We must modify the model and then apply changes to the view and DOM.\n\t\tdata.preventDefault();\n\t}\n\n\t/**\n\t * Returns an array of table cells that should be selected based on the\n\t * given anchor cell and target (focus) cell.\n\t *\n\t * The cells are returned in a reverse direction if the selection is backward.\n\t */\n\tprivate _getCellsToSelect( anchorCell: ModelElement, targetCell: ModelElement ) {\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\n\t\tconst startLocation = tableUtils.getCellLocation( anchorCell );\n\t\tconst endLocation = tableUtils.getCellLocation( targetCell );\n\n\t\tconst startRow = Math.min( startLocation.row, endLocation.row );\n\t\tconst endRow = Math.max( startLocation.row, endLocation.row );\n\n\t\tconst startColumn = Math.min( startLocation.column, endLocation.column );\n\n\t\t// Adjust the selection to include the entire row if a cell with colspan is selected.\n\t\t// This ensures that the selection covers the full width of the colspan cell.\n\t\t//\n\t\t// Example:\n\t\t// +---+---+---+---+\n\t\t// | A | B | C | D |\n\t\t// +---+---+---+---+\n\t\t// | E             |\n\t\t// +---+---+---+---+\n\t\t//\n\t\t// If the selection starts at `B` and ends at `E`, the entire first row should be selected.\n\t\t//\n\t\t// In other words, the selection will represent the following cells:\n\t\t// \t* Without this adjustment, only `B`, `A` and `E` would be selected.\n\t\t// \t* With this adjustment, `A`, `B`, `C`, `D`, and `E` are selected.\n\t\t//\n\t\t// See: https://github.com/ckeditor/ckeditor5/issues/17538\n\t\tconst endColumnExtraColspan = ( parseInt( targetCell.getAttribute( 'colspan' ) as string || '1' ) - 1 );\n\t\tconst endColumn = Math.max( startLocation.column, endLocation.column + endColumnExtraColspan );\n\n\t\t// 2-dimensional array of the selected cells to ease flipping the order of cells for backward selections.\n\t\tconst selectionMap: Array<Array<ModelElement>> = new Array( endRow - startRow + 1 ).fill( null ).map( () => [] );\n\t\tconst walkerOptions = {\n\t\t\tstartRow,\n\t\t\tendRow,\n\t\t\tstartColumn,\n\t\t\tendColumn\n\t\t};\n\n\t\tfor ( const { row, cell } of new TableWalker( anchorCell.findAncestor( 'table' )!, walkerOptions ) ) {\n\t\t\tselectionMap[ row - startRow ].push( cell );\n\t\t}\n\n\t\tconst flipVertically = endLocation.row < startLocation.row;\n\t\tconst flipHorizontally = endLocation.column < startLocation.column;\n\n\t\tif ( flipVertically ) {\n\t\t\tselectionMap.reverse();\n\t\t}\n\n\t\tif ( flipHorizontally ) {\n\t\t\tselectionMap.forEach( row => row.reverse() );\n\t\t}\n\n\t\treturn {\n\t\t\tcells: selectionMap.flat(),\n\t\t\tbackward: flipVertically || flipHorizontally\n\t\t};\n\t}\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/**\n * @module table/tableclipboard\n */\n\nimport type { EventInfo } from '@ckeditor/ckeditor5-utils';\n\nimport {\n\tClipboardPipeline,\n\tClipboardMarkersUtils,\n\ttype ClipboardEventData,\n\ttype ViewDocumentCopyEvent,\n\ttype ViewDocumentCutEvent,\n\ttype ViewDocumentClipboardOutputEvent,\n\ttype ClipboardContentInsertionEvent\n} from '@ckeditor/ckeditor5-clipboard';\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tModelDocumentFragment,\n\tModelDocumentSelection,\n\tViewDocumentDomEventData,\n\tModelElement,\n\tModelItem,\n\tModel,\n\tModelInsertContentEvent,\n\tModelPosition,\n\tModelSelection,\n\tModelWriter\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableSelection } from './tableselection.js';\nimport { TableWalker, type TableSlot } from './tablewalker.js';\nimport { TableUtils } from './tableutils.js';\nimport {\n\tcropTableToDimensions,\n\tgetHorizontallyOverlappingCells,\n\tgetVerticallyOverlappingCells,\n\tremoveEmptyRowsColumns,\n\tsplitHorizontally,\n\tsplitVertically,\n\ttrimTableCellIfNeeded,\n\tadjustLastRowIndex,\n\tadjustLastColumnIndex\n} from './utils/structure.js';\n\n/**\n * This plugin adds support for copying/cutting/pasting fragments of tables.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */\nexport class TableClipboard extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableClipboard' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ClipboardMarkersUtils, ClipboardPipeline, TableSelection, TableUtils ]> {\n\t\treturn [ ClipboardMarkersUtils, ClipboardPipeline, TableSelection, TableUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\n\t\tthis.listenTo<ViewDocumentCopyEvent>( viewDocument, 'copy', ( evt, data ) => this._onCopyCut( evt, data ) );\n\t\tthis.listenTo<ViewDocumentCutEvent>( viewDocument, 'cut', ( evt, data ) => this._onCopyCut( evt, data ) );\n\t\tthis._listenToContentInsertion();\n\n\t\tthis.decorate( '_replaceTableSlotCell' );\n\t}\n\n\t/**\n\t * Sets up listening for events from the clipboard pipeline to properly handle\n\t * table content merging during paste/drop operations.\n\t *\n\t * When a user is dragging and dropping a table, we want to insert the entire table into\n\t * a table cell instead of merging table contents. For paste and other events,\n\t * the normal table merge behavior is applied.\n\t */\n\tprivate _listenToContentInsertion() {\n\t\tconst { editor } = this;\n\t\tconst clipboardPipeline = editor.plugins.get( ClipboardPipeline );\n\t\tconst tableSelection = editor.plugins.get( TableSelection );\n\n\t\tlet isPaste = false;\n\n\t\tclipboardPipeline.on<ClipboardContentInsertionEvent>( 'contentInsertion', ( evt, data ) => {\n\t\t\tisPaste = data.method === 'paste';\n\t\t} );\n\n\t\tthis.listenTo<ModelInsertContentEvent>(\n\t\t\teditor.model,\n\t\t\t'insertContent',\n\t\t\t( evt, [ content, selectable ] ) => {\n\t\t\t\t// Handles drag-and-drop of tables, where tables are inserted into selected cells rather than merged.\n\t\t\t\t// The `isPaste` flag handles scenarios where other features (e.g., Templates) insert tables into specific cells.\n\t\t\t\tif ( isPaste || tableSelection.getSelectedTableCells() !== null ) {\n\t\t\t\t\tthis._onInsertContent( evt, content, selectable );\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ priority: 'high' }\n\t\t);\n\n\t\tclipboardPipeline.on<ClipboardContentInsertionEvent>( 'contentInsertion', () => {\n\t\t\tisPaste = false;\n\t\t}, { priority: 'lowest' } );\n\t}\n\n\t/**\n\t * Copies table content to a clipboard on \"copy\" & \"cut\" events.\n\t *\n\t * @param evt An object containing information about the handled event.\n\t * @param data Clipboard event data.\n\t */\n\tprivate _onCopyCut( evt: EventInfo<'copy' | 'cut'>, data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData ) {\n\t\tconst view = this.editor.editing.view;\n\t\tconst tableSelection = this.editor.plugins.get( TableSelection );\n\t\tconst clipboardMarkersUtils = this.editor.plugins.get( ClipboardMarkersUtils );\n\n\t\tif ( !tableSelection.getSelectedTableCells() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( evt.name == 'cut' && !this.editor.model.canEditAt( this.editor.model.document.selection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdata.preventDefault();\n\t\tevt.stop();\n\n\t\tthis.editor.model.enqueueChange( { isUndoable: evt.name === 'cut' }, () => {\n\t\t\tconst documentFragment = clipboardMarkersUtils._copySelectedFragmentWithMarkers(\n\t\t\t\tevt.name,\n\t\t\t\tthis.editor.model.document.selection,\n\t\t\t\t() => tableSelection.getSelectionAsFragment()!\n\t\t\t);\n\n\t\t\tview.document.fire<ViewDocumentClipboardOutputEvent>( 'clipboardOutput', {\n\t\t\t\tdataTransfer: data.dataTransfer,\n\t\t\t\tcontent: this.editor.data.toView( documentFragment ),\n\t\t\t\tmethod: evt.name\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Overrides default {@link module:engine/model/model~Model#insertContent `model.insertContent()`} method to handle pasting table inside\n\t * selected table fragment.\n\t *\n\t * Depending on selected table fragment:\n\t * - If a selected table fragment is smaller than paste table it will crop pasted table to match dimensions.\n\t * - If dimensions are equal it will replace selected table fragment with a pasted table contents.\n\t *\n\t * @param content The content to insert.\n\t * @param selectable The selection into which the content should be inserted.\n\t * If not provided the current model document selection will be used.\n\t */\n\tprivate _onInsertContent(\n\t\tevt: EventInfo,\n\t\tcontent: ModelDocumentFragment | ModelItem,\n\t\tselectable: ModelSelection | ModelDocumentSelection | undefined\n\t) {\n\t\tif ( selectable && !selectable.is( 'documentSelection' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\t\tconst clipboardMarkersUtils = this.editor.plugins.get( ClipboardMarkersUtils );\n\n\t\t// We might need to crop table before inserting so reference might change.\n\t\tconst pastedTable = this.getTableIfOnlyTableInContent( content, model )!;\n\n\t\tif ( !pastedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst selectedTableCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\n\t\tif ( !selectedTableCells.length ) {\n\t\t\tremoveEmptyRowsColumns( pastedTable, tableUtils );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Override default model.insertContent() handling at this point.\n\t\tevt.stop();\n\n\t\tif ( content.is( 'documentFragment' ) ) {\n\t\t\tclipboardMarkersUtils._pasteMarkersIntoTransformedElement(\n\t\t\t\tcontent.markers,\n\t\t\t\twriter => this._replaceSelectedCells( pastedTable, selectedTableCells, writer )\n\t\t\t);\n\t\t} else {\n\t\t\tthis.editor.model.change( writer => {\n\t\t\t\tthis._replaceSelectedCells( pastedTable, selectedTableCells, writer );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Inserts provided `selectedTableCells` into `pastedTable`.\n\t */\n\tprivate _replaceSelectedCells( pastedTable: ModelElement, selectedTableCells: Array<ModelElement>, writer: ModelWriter ) {\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\n\t\tconst pastedDimensions = {\n\t\t\twidth: tableUtils.getColumns( pastedTable ),\n\t\t\theight: tableUtils.getRows( pastedTable )\n\t\t};\n\n\t\t// Prepare the table for pasting.\n\t\tconst selection = prepareTableForPasting( selectedTableCells, pastedDimensions, writer, tableUtils );\n\n\t\t// Beyond this point we operate on a fixed content table with rectangular selection and proper last row/column values.\n\n\t\tconst selectionHeight = selection.lastRow - selection.firstRow + 1;\n\t\tconst selectionWidth = selection.lastColumn - selection.firstColumn + 1;\n\n\t\t// Crop pasted table if:\n\t\t// - Pasted table dimensions exceeds selection area.\n\t\t// - Pasted table has broken layout (ie some cells sticks out by the table dimensions established by the first and last row).\n\t\t//\n\t\t// Note: The table dimensions are established by the width of the first row and the total number of rows.\n\t\t// It is possible to programmatically create a table that has rows which would have cells anchored beyond first row width but\n\t\t// such table will not be created by other editing solutions.\n\t\tconst cropDimensions = {\n\t\t\tstartRow: 0,\n\t\t\tstartColumn: 0,\n\t\t\tendRow: Math.min( selectionHeight, pastedDimensions.height ) - 1,\n\t\t\tendColumn: Math.min( selectionWidth, pastedDimensions.width ) - 1\n\t\t};\n\n\t\tpastedTable = cropTableToDimensions( pastedTable, cropDimensions, writer );\n\n\t\t// Content table to which we insert a pasted table.\n\t\tconst selectedTable = selectedTableCells[ 0 ].findAncestor( 'table' )!;\n\n\t\tconst cellsToSelect = this._replaceSelectedCellsWithPasted(\n\t\t\tpastedTable,\n\t\t\tpastedDimensions,\n\t\t\tselectedTable,\n\t\t\tselection,\n\t\t\twriter,\n\t\t\ttableUtils\n\t\t);\n\n\t\tif ( this.editor.plugins.get( 'TableSelection' ).isEnabled ) {\n\t\t\t// Selection ranges must be sorted because the first and last selection ranges are considered\n\t\t\t// as anchor/focus cell ranges for multi-cell selection.\n\t\t\tconst selectionRanges = tableUtils.sortRanges( cellsToSelect.map( cell => writer.createRangeOn( cell ) ) );\n\n\t\t\twriter.setSelection( selectionRanges );\n\t\t} else {\n\t\t\t// Set selection inside first cell if multi-cell selection is disabled.\n\t\t\twriter.setSelection( cellsToSelect[ 0 ], 0 );\n\t\t}\n\n\t\treturn selectedTable;\n\t}\n\n\t/**\n\t * Replaces the part of selectedTable with pastedTable.\n\t */\n\tprivate _replaceSelectedCellsWithPasted(\n\t\tpastedTable: ModelElement,\n\t\tpastedDimensions: Record<string, number>,\n\t\tselectedTable: ModelElement,\n\t\tselection: Record<string, number>,\n\t\twriter: ModelWriter,\n\t\ttableUtils: TableUtils\n\t) {\n\t\tconst { width: pastedWidth, height: pastedHeight } = pastedDimensions;\n\n\t\t// Holds two-dimensional array that is addressed by [ row ][ column ] that stores cells anchored at given location.\n\t\tconst pastedTableLocationMap = createLocationMap( pastedTable, pastedWidth, pastedHeight );\n\n\t\tconst selectedTableMap = [ ...new TableWalker( selectedTable, {\n\t\t\tstartRow: selection.firstRow,\n\t\t\tendRow: selection.lastRow,\n\t\t\tstartColumn: selection.firstColumn,\n\t\t\tendColumn: selection.lastColumn,\n\t\t\tincludeAllSlots: true\n\t\t} ) ];\n\n\t\t// Selection must be set to pasted cells (some might be removed or new created).\n\t\tconst cellsToSelect: Array<ModelElement> = [];\n\n\t\t// Store next cell insert position.\n\t\tlet insertPosition: ModelPosition;\n\n\t\t// Content table replace cells algorithm iterates over a selected table fragment and:\n\t\t//\n\t\t// - Removes existing table cells at current slot (location).\n\t\t// - Inserts cell from a pasted table for a matched slots.\n\t\t//\n\t\t// This ensures proper table geometry after the paste\n\t\tfor ( const tableSlot of selectedTableMap ) {\n\t\t\tconst { row, column } = tableSlot;\n\n\t\t\t// Save the insert position for current row start.\n\t\t\tif ( column === selection.firstColumn ) {\n\t\t\t\tinsertPosition = tableSlot.getPositionBefore();\n\t\t\t}\n\n\t\t\t// Map current table slot location to an pasted table slot location.\n\t\t\tconst pastedRow = row - selection.firstRow;\n\t\t\tconst pastedColumn = column - selection.firstColumn;\n\t\t\tconst pastedCell = pastedTableLocationMap[ pastedRow % pastedHeight ][ pastedColumn % pastedWidth ];\n\n\t\t\t// Clone cell to insert (to duplicate its attributes and children).\n\t\t\t// Cloning is required to support repeating pasted table content when inserting to a bigger selection.\n\t\t\tconst cellToInsert = pastedCell ? writer.cloneElement( pastedCell ) : null;\n\n\t\t\t// Replace the cell from the current slot with new table cell.\n\t\t\tconst newTableCell = this._replaceTableSlotCell( tableSlot, cellToInsert, insertPosition!, writer );\n\n\t\t\t// The cell was only removed.\n\t\t\tif ( !newTableCell ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Trim the cell if it's row/col-spans would exceed selection area.\n\t\t\ttrimTableCellIfNeeded( newTableCell, row, column, selection.lastRow, selection.lastColumn, writer );\n\n\t\t\tcellsToSelect.push( newTableCell );\n\n\t\t\tinsertPosition = writer.createPositionAfter( newTableCell );\n\t\t}\n\n\t\t// If there are any headings, all the cells that overlap from heading must be splitted.\n\t\tconst headingRows = parseInt( selectedTable.getAttribute( 'headingRows' ) as string || '0' );\n\t\tconst headingColumns = parseInt( selectedTable.getAttribute( 'headingColumns' ) as string || '0' );\n\n\t\tconst footerRows = parseInt( selectedTable.getAttribute( 'footerRows' ) as string || '0' );\n\t\tconst footerIndex = tableUtils.getRows( selectedTable ) - footerRows;\n\n\t\tconst areHeadingRowsIntersectingSelection = selection.firstRow < headingRows && headingRows <= selection.lastRow;\n\t\tconst areHeadingColumnsIntersectingSelection = selection.firstColumn < headingColumns && headingColumns <= selection.lastColumn;\n\t\tconst areFooterRowsIntersectingSelection = selection.firstRow < footerIndex && footerIndex <= selection.lastRow;\n\n\t\tif ( areHeadingRowsIntersectingSelection ) {\n\t\t\tconst columnsLimit = { first: selection.firstColumn, last: selection.lastColumn };\n\t\t\tconst newCells = doHorizontalSplit(\n\t\t\t\tselectedTable, headingRows, columnsLimit, writer, selection.firstRow\n\t\t\t) as Array<ModelElement>;\n\n\t\t\tcellsToSelect.push( ...newCells );\n\t\t}\n\n\t\tif ( areHeadingColumnsIntersectingSelection ) {\n\t\t\tconst rowsLimit = { first: selection.firstRow, last: selection.lastRow };\n\t\t\tconst newCells = doVerticalSplit( selectedTable, headingColumns, rowsLimit, writer ) as Array<ModelElement>;\n\n\t\t\tcellsToSelect.push( ...newCells );\n\t\t}\n\n\t\tif ( areFooterRowsIntersectingSelection ) {\n\t\t\tconst columnsLimit = { first: selection.firstColumn, last: selection.lastColumn };\n\t\t\tconst newCells = doHorizontalSplit(\n\t\t\t\tselectedTable,\n\t\t\t\tfooterIndex,\n\t\t\t\tcolumnsLimit,\n\t\t\t\twriter,\n\t\t\t\tselection.firstRow\n\t\t\t) as Array<ModelElement>;\n\n\t\t\tcellsToSelect.push( ...newCells );\n\t\t}\n\n\t\treturn cellsToSelect;\n\t}\n\n\t/**\n\t * Replaces a single table slot.\n\t *\n\t * @returns Inserted table cell or null if slot should remain empty.\n\t * @private\n\t */\n\tpublic _replaceTableSlotCell(\n\t\ttableSlot: TableSlot,\n\t\tcellToInsert: ModelElement | null,\n\t\tinsertPosition: ModelPosition,\n\t\twriter: ModelWriter\n\t): ModelElement | null {\n\t\tconst { cell, isAnchor } = tableSlot;\n\n\t\t// If the slot is occupied by a cell in a selected table - remove it.\n\t\t// The slot of this cell will be either:\n\t\t// - Replaced by a pasted table cell.\n\t\t// - Spanned by a previously pasted table cell.\n\t\tif ( isAnchor ) {\n\t\t\twriter.remove( cell );\n\t\t}\n\n\t\t// There is no cell to insert (might be spanned by other cell in a pasted table) - advance to the next content table slot.\n\t\tif ( !cellToInsert ) {\n\t\t\treturn null;\n\t\t}\n\n\t\twriter.insert( cellToInsert, insertPosition );\n\n\t\treturn cellToInsert;\n\t}\n\n\t/**\n\t * Extracts the table for pasting into a table.\n\t *\n\t * @param content The content to insert.\n\t * @param model The editor model.\n\t */\n\tpublic getTableIfOnlyTableInContent( content: ModelDocumentFragment | ModelItem, model: Model ): ModelElement | null {\n\t\tif ( !content.is( 'documentFragment' ) && !content.is( 'element' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Table passed directly.\n\t\tif ( content.is( 'element', 'table' ) ) {\n\t\t\treturn content;\n\t\t}\n\n\t\t// We do not support mixed content when pasting table into table.\n\t\t// See: https://github.com/ckeditor/ckeditor5/issues/6817.\n\t\tif ( content.childCount == 1 && content.getChild( 0 )!.is( 'element', 'table' ) ) {\n\t\t\treturn content.getChild( 0 ) as ModelElement;\n\t\t}\n\n\t\t// If there are only whitespaces around a table then use that table for pasting.\n\n\t\tconst contentRange = model.createRangeIn( content );\n\n\t\tfor ( const element of contentRange.getItems() ) {\n\t\t\tif ( element.is( 'element', 'table' ) ) {\n\t\t\t\t// Stop checking if there is some content before table.\n\t\t\t\tconst rangeBefore = model.createRange( contentRange.start, model.createPositionBefore( element ) );\n\n\t\t\t\tif ( model.hasContent( rangeBefore, { ignoreWhitespaces: true } ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Stop checking if there is some content after table.\n\t\t\t\tconst rangeAfter = model.createRange( model.createPositionAfter( element ), contentRange.end );\n\n\t\t\t\tif ( model.hasContent( rangeAfter, { ignoreWhitespaces: true } ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// There wasn't any content neither before nor after.\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * Prepares a table for pasting and returns adjusted selection dimensions.\n */\nfunction prepareTableForPasting(\n\tselectedTableCells: Array<ModelElement>,\n\tpastedDimensions: {\n\t\theight: number;\n\t\twidth: number;\n\t},\n\twriter: ModelWriter,\n\ttableUtils: TableUtils\n) {\n\tconst selectedTable = selectedTableCells[ 0 ].findAncestor( 'table' )!;\n\n\tconst columnIndexes = tableUtils.getColumnIndexes( selectedTableCells );\n\tconst rowIndexes = tableUtils.getRowIndexes( selectedTableCells );\n\n\tconst selection = {\n\t\tfirstColumn: columnIndexes.first,\n\t\tlastColumn: columnIndexes.last,\n\t\tfirstRow: rowIndexes.first,\n\t\tlastRow: rowIndexes.last\n\t};\n\n\t// Single cell selected - expand selection to pasted table dimensions.\n\tconst shouldExpandSelection = selectedTableCells.length === 1;\n\n\tif ( shouldExpandSelection ) {\n\t\tselection.lastRow += pastedDimensions.height - 1;\n\t\tselection.lastColumn += pastedDimensions.width - 1;\n\n\t\texpandTableSize( selectedTable, selection.lastRow + 1, selection.lastColumn + 1, tableUtils );\n\t}\n\n\t// In case of expanding selection we do not reset the selection so in this case we will always try to fix selection\n\t// like in the case of a non-rectangular area. This might be fixed by re-setting selected cells array but this shortcut is safe.\n\tif ( shouldExpandSelection || !tableUtils.isSelectionRectangular( selectedTableCells ) ) {\n\t\t// For a non-rectangular selection (ie in which some cells sticks out from a virtual selection rectangle) we need to create\n\t\t// a table layout that has a rectangular selection. This will split cells so the selection become rectangular.\n\t\t// Beyond this point we will operate on fixed content table.\n\t\tsplitCellsToRectangularSelection( selectedTable, selection, writer );\n\t}\n\t// However a selected table fragment might be invalid if examined alone. Ie such table fragment:\n\t//\n\t//    +---+---+---+---+\n\t//  0 | a | b | c | d |\n\t//    +   +   +---+---+\n\t//  1 |   | e | f | g |\n\t//    +   +---+   +---+\n\t//  2 |   | h |   | i | <- last row, each cell has rowspan = 2,\n\t//    +   +   +   +   +    so we need to return 3, not 2\n\t//  3 |   |   |   |   |\n\t//    +---+---+---+---+\n\t//\n\t// is invalid as the cells \"h\" and \"i\" have rowspans.\n\t// This case needs only adjusting the selection dimension as the rest of the algorithm operates on empty slots also.\n\telse {\n\t\tselection.lastRow = adjustLastRowIndex( selectedTable, selection );\n\t\tselection.lastColumn = adjustLastColumnIndex( selectedTable, selection );\n\t}\n\n\treturn selection;\n}\n\n/**\n * Expand table (in place) to expected size.\n */\nfunction expandTableSize( table: ModelElement, expectedHeight: number, expectedWidth: number, tableUtils: TableUtils ) {\n\tconst tableWidth = tableUtils.getColumns( table );\n\tconst tableHeight = tableUtils.getRows( table );\n\n\tif ( expectedWidth > tableWidth ) {\n\t\ttableUtils.insertColumns( table, {\n\t\t\tat: tableWidth,\n\t\t\tcolumns: expectedWidth - tableWidth\n\t\t} );\n\t}\n\n\tif ( expectedHeight > tableHeight ) {\n\t\ttableUtils.insertRows( table, {\n\t\t\tat: tableHeight,\n\t\t\trows: expectedHeight - tableHeight\n\t\t} );\n\t}\n}\n\n/**\n * Returns two-dimensional array that is addressed by [ row ][ column ] that stores cells anchored at given location.\n *\n * At given row & column location it might be one of:\n *\n * * cell - cell from pasted table anchored at this location.\n * * null - if no cell is anchored at this location.\n *\n * For instance, from a table below:\n *\n *   +----+----+----+----+\n *   | 00 | 01 | 02 | 03 |\n *   +    +----+----+----+\n *   |    | 11      | 13 |\n *   +----+         +----+\n *   | 20 |         | 23 |\n *   +----+----+----+----+\n *\n * The method will return an array (numbers represents cell element):\n *\n * ```ts\n * const map = [\n *   [ '00', '01', '02', '03' ],\n *   [ null, '11', null, '13' ],\n *   [ '20', null, null, '23' ]\n * ]\n * ```\n *\n * This allows for a quick access to table at give row & column. For instance to access table cell \"13\" from pasted table call:\n *\n * ```ts\n * const cell = map[ 1 ][ 3 ]\n * ```\n */\nfunction createLocationMap( table: ModelElement, width: number, height: number ) {\n\t// Create height x width (row x column) two-dimensional table to store cells.\n\tconst map = new Array( height ).fill( null )\n\t\t.map( () => new Array( width ).fill( null ) );\n\n\tfor ( const { column, row, cell } of new TableWalker( table ) ) {\n\t\tmap[ row ][ column ] = cell;\n\t}\n\n\treturn map;\n}\n\n/**\n * Make selected cells rectangular by splitting the cells that stand out from a rectangular selection.\n *\n * In the table below a selection is shown with \"::\" and slots with anchor cells are named.\n *\n * +----+----+----+----+----+                    +----+----+----+----+----+\n * | 00 | 01 | 02 | 03      |                    | 00 | 01 | 02 | 03      |\n * +    +----+    +----+----+                    |    ::::::::::::::::----+\n * |    | 11 |    | 13 | 14 |                    |    ::11 |    | 13:: 14 |    <- first row\n * +----+----+    +    +----+                    +----::---|    |   ::----+\n * | 20 | 21 |    |    | 24 |   select cells:    | 20 ::21 |    |   :: 24 |\n * +----+----+    +----+----+     11 -> 33       +----::---|    |---::----+\n * | 30      |    | 33 | 34 |                    | 30 ::   |    | 33:: 34 |    <- last row\n * +         +    +----+    +                    |    ::::::::::::::::    +\n * |         |    | 43 |    |                    |         |    | 43 |    |\n * +----+----+----+----+----+                    +----+----+----+----+----+\n *                                                      ^          ^\n *                                                     first & last columns\n *\n * Will update table to:\n *\n *                       +----+----+----+----+----+\n *                       | 00 | 01 | 02 | 03      |\n *                       +    +----+----+----+----+\n *                       |    | 11 |    | 13 | 14 |\n *                       +----+----+    +    +----+\n *                       | 20 | 21 |    |    | 24 |\n *                       +----+----+    +----+----+\n *                       | 30 |    |    | 33 | 34 |\n *                       +    +----+----+----+    +\n *                       |    |    |    | 43 |    |\n *                       +----+----+----+----+----+\n *\n * In th example above:\n * - Cell \"02\" which have `rowspan = 4` must be trimmed at first and at after last row.\n * - Cell \"03\" which have `rowspan = 2` and `colspan = 2` must be trimmed at first column and after last row.\n * - Cells \"00\", \"03\" & \"30\" which cannot be cut by this algorithm as they are outside the trimmed area.\n * - Cell \"13\" cannot be cut as it is inside the trimmed area.\n */\nfunction splitCellsToRectangularSelection( table: ModelElement, dimensions: Record<string, number>, writer: ModelWriter ) {\n\tconst { firstRow, lastRow, firstColumn, lastColumn } = dimensions;\n\n\tconst rowIndexes = { first: firstRow, last: lastRow };\n\tconst columnIndexes = { first: firstColumn, last: lastColumn };\n\n\t// 1. Split cells vertically in two steps as first step might create cells that needs to split again.\n\tdoVerticalSplit( table, firstColumn, rowIndexes, writer );\n\tdoVerticalSplit( table, lastColumn + 1, rowIndexes, writer );\n\n\t// 2. Split cells horizontally in two steps as first step might create cells that needs to split again.\n\tdoHorizontalSplit( table, firstRow, columnIndexes, writer );\n\tdoHorizontalSplit( table, lastRow + 1, columnIndexes, writer, firstRow );\n}\n\nfunction doHorizontalSplit(\n\ttable: ModelElement,\n\tsplitRow: number,\n\tlimitColumns: Record<string, number>,\n\twriter: ModelWriter,\n\tstartRow: number = 0\n) {\n\t// If selection starts at first row then no split is needed.\n\tif ( splitRow < 1 ) {\n\t\treturn;\n\t}\n\n\tconst overlappingCells = getVerticallyOverlappingCells( table, splitRow, startRow );\n\n\t// Filter out cells that are not touching insides of the rectangular selection.\n\tconst cellsToSplit = overlappingCells.filter( ( { column, cellWidth } ) => isAffectedBySelection( column, cellWidth, limitColumns ) );\n\n\treturn cellsToSplit.map( ( { cell } ) => splitHorizontally( cell, splitRow, writer ) );\n}\n\nfunction doVerticalSplit( table: ModelElement, splitColumn: number, limitRows: Record<string, number>, writer: ModelWriter ) {\n\t// If selection starts at first column then no split is needed.\n\tif ( splitColumn < 1 ) {\n\t\treturn;\n\t}\n\n\tconst overlappingCells = getHorizontallyOverlappingCells( table, splitColumn );\n\n\t// Filter out cells that are not touching insides of the rectangular selection.\n\tconst cellsToSplit = overlappingCells.filter( ( { row, cellHeight } ) => isAffectedBySelection( row, cellHeight, limitRows ) );\n\n\treturn cellsToSplit.map( ( { cell, column } ) => splitVertically( cell, column, splitColumn, writer ) );\n}\n\n/**\n * Checks if cell at given row (column) is affected by a rectangular selection defined by first/last column (row).\n *\n * The same check is used for row as for column.\n */\nfunction isAffectedBySelection( index: number, span: number, limit: Record<string, number> ) {\n\tconst endIndex = index + span - 1;\n\tconst { first, last } = limit;\n\n\tconst isInsideSelection = index >= first && index <= last;\n\tconst overlapsSelectionFromOutside = index < first && endIndex >= first;\n\n\treturn isInsideSelection || overlapsSelectionFromOutside;\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/**\n * @module table/tablekeyboard\n */\n\nimport { TableSelection } from './tableselection.js';\nimport { TableWalker } from './tablewalker.js';\nimport { TableUtils } from './tableutils.js';\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tgetLocalizedArrowKeyCodeDirection,\n\ttype EventInfo,\n\ttype ArrowKeyCodeDirection,\n\ttype KeystrokeInfo\n} from '@ckeditor/ckeditor5-utils';\n\nimport type {\n\tBubblingEventInfo,\n\tModelDocumentSelection,\n\tViewDocumentDomEventData,\n\tModelElement,\n\tModelSelection,\n\tViewDocumentArrowKeyEvent,\n\tViewDocumentTabEvent\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * This plugin enables keyboard navigation for tables.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */\nexport class TableKeyboard extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableKeyboard' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableSelection, TableUtils ]> {\n\t\treturn [ TableSelection, TableUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = editor.t;\n\n\t\tthis.listenTo<ViewDocumentArrowKeyEvent>(\n\t\t\tviewDocument,\n\t\t\t'arrowKey',\n\t\t\t( ...args ) => this._onArrowKey( ...args ),\n\t\t\t{ context: 'table' }\n\t\t);\n\n\t\tthis.listenTo<ViewDocumentTabEvent>(\n\t\t\tviewDocument,\n\t\t\t'tab',\n\t\t\t( ...args ) => this._handleTabOnSelectedTable( ...args ),\n\t\t\t{ context: 'figure' }\n\t\t);\n\n\t\tthis.listenTo<ViewDocumentTabEvent>(\n\t\t\tviewDocument,\n\t\t\t'tab',\n\t\t\t( ...args ) => this._handleTab( ...args ),\n\t\t\t{ context: [ 'th', 'td' ] }\n\t\t);\n\n\t\t// Add the information about the keystrokes to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfoGroup( {\n\t\t\tid: 'table',\n\t\t\tlabel: t( 'Keystrokes that can be used in a table cell' ),\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move the selection to the next cell' ),\n\t\t\t\t\tkeystroke: 'Tab'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Move the selection to the previous cell' ),\n\t\t\t\t\tkeystroke: 'Shift+Tab'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Insert a new table row (when in the last cell of a table)' ),\n\t\t\t\t\tkeystroke: 'Tab'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Navigate through the table' ),\n\t\t\t\t\tkeystroke: [ [ 'arrowup' ], [ 'arrowright' ], [ 'arrowdown' ], [ 'arrowleft' ] ]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * Handles {@link module:engine/view/document~ViewDocument#event:tab tab} events for the <kbd>Tab</kbd> key executed\n\t * when the table widget is selected.\n\t */\n\tprivate _handleTabOnSelectedTable( bubblingEventInfo: BubblingEventInfo, domEventData: ViewDocumentDomEventData ) {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\tif ( !selectedElement || !selectedElement.is( 'element', 'table' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For backward compatibility stop propagation of this DOM event.\n\t\t// The default tab handling from widgets handles navigation.\n\t\tdomEventData.stopPropagation();\n\t}\n\n\t/**\n\t * Handles {@link module:engine/view/document~ViewDocument#event:tab tab} events for the <kbd>Tab</kbd> key executed\n\t * inside table cells.\n\t */\n\tprivate _handleTab( bubblingEventInfo: BubblingEventInfo, domEventData: ViewDocumentDomEventData & KeystrokeInfo ) {\n\t\tconst editor = this.editor;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( TableUtils );\n\t\tconst tableSelection: TableSelection = this.editor.plugins.get( 'TableSelection' );\n\n\t\tconst selection = editor.model.document.selection;\n\t\tconst isForward = !domEventData.shiftKey;\n\n\t\tlet tableCell: ModelElement | null = tableUtils.getTableCellsContainingSelection( selection )[ 0 ];\n\n\t\tif ( !tableCell ) {\n\t\t\ttableCell = tableSelection.getFocusCell();\n\t\t}\n\n\t\tif ( !tableCell ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For backward compatibility stop propagation of this DOM event.\n\t\t// The default tab handling from widgets handles navigation.\n\t\tdomEventData.stopPropagation();\n\n\t\tconst tableRow = tableCell.parent as ModelElement;\n\t\tconst table = tableRow.parent as ModelElement;\n\n\t\tconst currentRowIndex = table.getChildIndex( tableRow )!;\n\t\tconst currentCellIndex = tableRow.getChildIndex( tableCell )!;\n\n\t\tconst isLastCellInRow = currentCellIndex === tableRow.childCount - 1;\n\t\tconst isLastRow = currentRowIndex === tableUtils.getRows( table ) - 1;\n\n\t\tif ( isForward && isLastRow && isLastCellInRow ) {\n\t\t\teditor.execute( 'insertTableRowBelow' );\n\t\t}\n\t}\n\n\t/**\n\t * Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events.\n\t */\n\tprivate _onArrowKey( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData & KeystrokeInfo ) {\n\t\tconst editor = this.editor;\n\t\tconst keyCode = domEventData.keyCode;\n\n\t\tconst direction = getLocalizedArrowKeyCodeDirection( keyCode, editor.locale.contentLanguageDirection )!;\n\t\tconst wasHandled = this._handleArrowKeys( direction, domEventData.shiftKey );\n\n\t\tif ( wasHandled ) {\n\t\t\tdomEventData.preventDefault();\n\t\t\tdomEventData.stopPropagation();\n\t\t\teventInfo.stop();\n\t\t}\n\t}\n\n\t/**\n\t * Handles arrow keys to move the selection around the table.\n\t *\n\t * @param direction The direction of the arrow key.\n\t * @param expandSelection If the current selection should be expanded.\n\t * @returns Returns `true` if key was handled.\n\t */\n\tprivate _handleArrowKeys( direction: ArrowKeyCodeDirection, expandSelection: boolean ) {\n\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\t\tconst tableSelection: TableSelection = this.editor.plugins.get( 'TableSelection' );\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst isForward = [ 'right', 'down' ].includes( direction );\n\n\t\t// In case one or more table cells are selected (from outside),\n\t\t// move the selection to a cell adjacent to the selected table fragment.\n\t\tconst selectedCells = tableUtils.getSelectedTableCells( selection );\n\n\t\tif ( selectedCells.length ) {\n\t\t\tlet focusCell;\n\n\t\t\tif ( expandSelection ) {\n\t\t\t\tfocusCell = tableSelection.getFocusCell();\n\t\t\t} else {\n\t\t\t\tfocusCell = isForward ? selectedCells[ selectedCells.length - 1 ] : selectedCells[ 0 ];\n\t\t\t}\n\n\t\t\tthis._navigateFromCellInDirection( focusCell!, direction, expandSelection );\n\n\t\t\treturn true;\n\t\t}\n\n\t\t// Abort if we're not in a table cell.\n\t\tconst tableCell = selection.focus!.findAncestor( 'tableCell' );\n\n\t\t/* istanbul ignore if: paranoid check -- @preserve */\n\t\tif ( !tableCell ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// When the selection is not collapsed.\n\t\tif ( !selection.isCollapsed ) {\n\t\t\tif ( expandSelection ) {\n\t\t\t\t// Navigation is in the opposite direction than the selection direction so this is shrinking of the selection.\n\t\t\t\t// Selection for sure will not approach cell edge.\n\t\t\t\t//\n\t\t\t\t// With a special case when all cell content is selected - then selection should expand to the other cell.\n\t\t\t\t// Note: When the entire cell gets selected using CTRL+A, the selection is always forward.\n\t\t\t\tif ( selection.isBackward == isForward && !selection.containsEntireContent( tableCell ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst selectedElement = selection.getSelectedElement();\n\n\t\t\t\t// It will collapse for non-object selected so it's not going to move to other cell.\n\t\t\t\tif ( !selectedElement || !model.schema.isObject( selectedElement ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Let's check if the selection is at the beginning/end of the cell.\n\t\tif ( this._isSelectionAtCellEdge( selection, tableCell, isForward ) ) {\n\t\t\tthis._navigateFromCellInDirection( tableCell, direction, expandSelection );\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns `true` if the selection is at the boundary of a table cell according to the navigation direction.\n\t *\n\t * @param selection The current selection.\n\t * @param tableCell The current table cell element.\n\t * @param isForward The expected navigation direction.\n\t */\n\tprivate _isSelectionAtCellEdge( selection: ModelSelection | ModelDocumentSelection, tableCell: ModelElement, isForward: boolean ) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = this.editor.model.schema;\n\n\t\tconst focus = isForward ? selection.getLastPosition()! : selection.getFirstPosition()!;\n\n\t\t// If the current limit element is not table cell we are for sure not at the cell edge.\n\t\t// Also `modifySelection` will not let us out of it.\n\t\tif ( !schema.getLimitElement( focus ).is( 'element', 'tableCell' ) ) {\n\t\t\tconst boundaryPosition = model.createPositionAt( tableCell, isForward ? 'end' : 0 );\n\n\t\t\treturn boundaryPosition.isTouching( focus );\n\t\t}\n\n\t\tconst probe = model.createSelection( focus );\n\n\t\tmodel.modifySelection( probe, { direction: isForward ? 'forward' : 'backward' } );\n\n\t\t// If there was no change in the focus position, then it's not possible to move the selection there.\n\t\treturn focus.isEqual( probe.focus! );\n\t}\n\n\t/**\n\t * Moves the selection from the given table cell in the specified direction.\n\t *\n\t * @param focusCell The table cell that is current multi-cell selection focus.\n\t * @param direction Direction in which selection should move.\n\t * @param expandSelection If the current selection should be expanded. Default value is false.\n\t */\n\tprotected _navigateFromCellInDirection( focusCell: ModelElement, direction: ArrowKeyCodeDirection, expandSelection = false ): void {\n\t\tconst model = this.editor.model;\n\n\t\tconst table = focusCell.findAncestor( 'table' )!;\n\t\tconst tableMap = [ ...new TableWalker( table, { includeAllSlots: true } ) ];\n\t\tconst { row: lastRow, column: lastColumn } = tableMap[ tableMap.length - 1 ];\n\n\t\tconst currentCellInfo = tableMap.find( ( { cell } ) => cell == focusCell )!;\n\t\tlet { row, column } = currentCellInfo;\n\n\t\tswitch ( direction ) {\n\t\t\tcase 'left':\n\t\t\t\tcolumn--;\n\t\t\t\tbreak;\n\n\t\t\tcase 'up':\n\t\t\t\trow--;\n\t\t\t\tbreak;\n\n\t\t\tcase 'right':\n\t\t\t\tcolumn += currentCellInfo.cellWidth;\n\t\t\t\tbreak;\n\n\t\t\tcase 'down':\n\t\t\t\trow += currentCellInfo.cellHeight;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst isOutsideVertically = row < 0 || row > lastRow;\n\t\tconst isBeforeFirstCell = column < 0 && row <= 0;\n\t\tconst isAfterLastCell = column > lastColumn && row >= lastRow;\n\n\t\t// Note that if the table cell at the end of a row is row-spanned then isAfterLastCell will never be true.\n\t\t// However, we don't know if user was navigating on the last row or not, so let's stay in the table.\n\n\t\tif ( isOutsideVertically || isBeforeFirstCell || isAfterLastCell ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( writer.createRangeOn( table ) );\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( column < 0 ) {\n\t\t\tcolumn = expandSelection ? 0 : lastColumn;\n\t\t\trow--;\n\t\t} else if ( column > lastColumn ) {\n\t\t\tcolumn = expandSelection ? lastColumn : 0;\n\t\t\trow++;\n\t\t}\n\n\t\tconst cellToSelect = tableMap.find( cellInfo => cellInfo.row == row && cellInfo.column == column )!.cell;\n\t\tconst isForward = [ 'right', 'down' ].includes( direction );\n\t\tconst tableSelection: TableSelection = this.editor.plugins.get( 'TableSelection' );\n\n\t\tif ( expandSelection && tableSelection.isEnabled ) {\n\t\t\tconst anchorCell = tableSelection.getAnchorCell() || focusCell;\n\n\t\t\ttableSelection.setCellSelection( anchorCell, cellToSelect );\n\t\t} else {\n\t\t\tconst positionToSelect = model.createPositionAt( cellToSelect, isForward ? 0 : 'end' );\n\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( positionToSelect );\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module table/tablemouse/mouseeventsobserver\n */\n\nimport { DomEventObserver, type ViewDocumentDomEventData } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The mouse selection event observer.\n *\n * It registers listeners for the following DOM events:\n *\n * - `'mousemove'`\n * - `'mouseleave'`\n *\n * Note that this observer is disabled by default. To enable this observer, it needs to be added to\n * {@link module:engine/view/view~EditingView} using the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * The observer is registered by the {@link module:table/tableselection~TableSelection} plugin.\n *\n * @internal\n */\nexport class MouseEventsObserver extends DomEventObserver<'mousemove' | 'mouseleave'> {\n\tpublic readonly domEventType = [\n\t\t'mousemove', 'mouseleave'\n\t] as const;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic onDomEvent( domEvent: MouseEvent ): void {\n\t\tthis.fire( domEvent.type, domEvent );\n\t}\n}\n\n/**\n * Fired when the mouse is moved over one of the editables.\n *\n * Introduced by {@link module:table/tablemouse/mouseeventsobserver~MouseEventsObserver}.\n *\n * Note that this event is not available by default. To make it available,\n * {@link module:table/tablemouse/mouseeventsobserver~MouseEventsObserver} needs to be added\n * to {@link module:engine/view/view~EditingView} using the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:table/tablemouse/mouseeventsobserver~MouseEventsObserver\n * @eventName module:engine/view/document~ViewDocument#mousemove\n * @param data Event data.\n */\nexport type ViewDocumentTableMouseMoveEvent = {\n\tname: 'mousemove';\n\targs: [ data: ViewDocumentDomEventData<MouseEvent> ];\n};\n\n/**\n * Fired when the mouse is moved out of one of the editables.\n *\n * Introduced by {@link module:table/tablemouse/mouseeventsobserver~MouseEventsObserver}.\n *\n * Note that this event is not available by default. To make it available,\n * {@link module:table/tablemouse/mouseeventsobserver~MouseEventsObserver} needs to be added\n * to {@link module:engine/view/view~EditingView} using the {@link module:engine/view/view~EditingView#addObserver} method.\n *\n * @see module:table/tablemouse/mouseeventsobserver~MouseEventsObserver\n * @eventName module:engine/view/document~ViewDocument#mouseleave\n * @param data Event data.\n */\nexport type ViewDocumentTableMouseLeaveEvent = {\n\tname: 'mouseleave';\n\targs: [ data: ViewDocumentDomEventData<MouseEvent> ];\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/**\n * @module table/tablemouse\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { TableSelection } from './tableselection.js';\nimport { MouseEventsObserver } from './tablemouse/mouseeventsobserver.js';\nimport { TableUtils } from './tableutils.js';\nimport type { ViewDocumentDomEventData, ModelElement } from '@ckeditor/ckeditor5-engine';\n\n/**\n * This plugin enables a table cells' selection with the mouse.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */\nexport class TableMouse extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableMouse' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableSelection, TableUtils ]> {\n\t\treturn [ TableSelection, TableUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\t// Currently the MouseObserver only handles `mousedown` and `mouseup` events.\n\t\t// TODO move to the engine?\n\t\teditor.editing.view.addObserver( MouseEventsObserver );\n\n\t\tthis._enableShiftClickSelection();\n\t\tthis._enableMouseDragSelection();\n\t}\n\n\t/**\n\t * Enables making cells selection by <kbd>Shift</kbd>+click. Creates a selection from the cell which previously held\n\t * the selection to the cell which was clicked. It can be the same cell, in which case it selects a single cell.\n\t */\n\tprivate _enableShiftClickSelection() {\n\t\tconst editor = this.editor;\n\t\tconst tableUtils = editor.plugins.get( TableUtils );\n\t\tlet blockSelectionChange = false;\n\n\t\tconst tableSelection = editor.plugins.get( TableSelection );\n\n\t\tthis.listenTo( editor.editing.view.document, 'mousedown', ( evt, domEventData ) => {\n\t\t\tconst selection = editor.model.document.selection;\n\n\t\t\tif ( !this.isEnabled || !tableSelection.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !domEventData.domEvent.shiftKey ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst anchorCell = tableSelection.getAnchorCell() || tableUtils.getTableCellsContainingSelection( selection )[ 0 ];\n\n\t\t\tif ( !anchorCell ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst targetCell = this._getModelTableCellFromDomEvent( domEventData );\n\n\t\t\tif ( targetCell && haveSameTableParent( anchorCell, targetCell ) ) {\n\t\t\t\tblockSelectionChange = true;\n\t\t\t\ttableSelection.setCellSelection( anchorCell, targetCell );\n\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t}\n\t\t} );\n\n\t\tthis.listenTo( editor.editing.view.document, 'mouseup', () => {\n\t\t\tblockSelectionChange = false;\n\t\t} );\n\n\t\t// We need to ignore a `selectionChange` event that is fired after we render our new table cells selection.\n\t\t// When downcasting table cells selection to the view, we put the view selection in the last selected cell\n\t\t// in a place that may not be natively a \"correct\" location. This is – we put it directly in the `<td>` element.\n\t\t// All browsers fire the native `selectionchange` event.\n\t\t// However, all browsers except Safari return the selection in the exact place where we put it\n\t\t// (even though it's visually normalized). Safari returns `<td><p>^foo` that makes our selection observer\n\t\t// fire our `selectionChange` event (because the view selection that we set in the first step differs from the DOM selection).\n\t\t// Since `selectionChange` is fired, we automatically update the model selection that moves it that paragraph.\n\t\t// This breaks our dear cells selection.\n\t\t//\n\t\t// Theoretically this issue concerns only Safari that is the only browser that do normalize the selection.\n\t\t// However, to avoid code branching and to have a good coverage for this event blocker, I enabled it for all browsers.\n\t\t//\n\t\t// Note: I'm keeping the `blockSelectionChange` state separately for shift+click and mouse drag (exact same logic)\n\t\t// so I don't have to try to analyze whether they don't overlap in some weird cases. Probably they don't.\n\t\t// But I have other things to do, like writing this comment.\n\t\tthis.listenTo( editor.editing.view.document, 'selectionChange', evt => {\n\t\t\tif ( blockSelectionChange ) {\n\t\t\t\t// @if CK_DEBUG // console.log( 'Blocked selectionChange to avoid breaking table cells selection.' );\n\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Enables making cells selection by dragging.\n\t *\n\t * The selection is made only on mousemove. Mouse tracking is started on mousedown.\n\t * However, the cells selection is enabled only after the mouse cursor left the anchor cell.\n\t * Thanks to that normal text selection within one cell works just fine. However, you can still select\n\t * just one cell by leaving the anchor cell and moving back to it.\n\t */\n\tprivate _enableMouseDragSelection() {\n\t\tconst editor = this.editor;\n\t\tlet anchorCell: ModelElement | null, targetCell: ModelElement | null;\n\t\tlet beganCellSelection = false;\n\t\tlet blockSelectionChange = false;\n\n\t\tconst tableSelection = editor.plugins.get( TableSelection );\n\n\t\tthis.listenTo( editor.editing.view.document, 'mousedown', ( evt, domEventData ) => {\n\t\t\tif ( !this.isEnabled || !tableSelection.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure to not conflict with the shift+click listener and any other possible handler.\n\t\t\tif ( domEventData.domEvent.shiftKey || domEventData.domEvent.ctrlKey || domEventData.domEvent.altKey ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tanchorCell = this._getModelTableCellFromDomEvent( domEventData );\n\t\t} );\n\n\t\tthis.listenTo( editor.editing.view.document, 'mousemove', ( evt, domEventData ) => {\n\t\t\tif ( !domEventData.domEvent.buttons ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !anchorCell ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newTargetCell = this._getModelTableCellFromDomEvent( domEventData );\n\n\t\t\tif ( newTargetCell && haveSameTableParent( anchorCell, newTargetCell ) ) {\n\t\t\t\ttargetCell = newTargetCell;\n\n\t\t\t\t// Switch to the cell selection mode after the mouse cursor left the anchor cell.\n\t\t\t\t// Switch off only on mouseup (makes selecting a single cell possible).\n\t\t\t\tif ( !beganCellSelection && targetCell != anchorCell ) {\n\t\t\t\t\tbeganCellSelection = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Yep, not making a cell selection yet. See method docs.\n\t\t\tif ( !beganCellSelection ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tblockSelectionChange = true;\n\t\t\ttableSelection.setCellSelection( anchorCell, targetCell! );\n\n\t\t\tdomEventData.preventDefault();\n\t\t} );\n\n\t\tthis.listenTo( editor.editing.view.document, 'mouseup', () => {\n\t\t\tbeganCellSelection = false;\n\t\t\tblockSelectionChange = false;\n\t\t\tanchorCell = null;\n\t\t\ttargetCell = null;\n\t\t} );\n\n\t\t// See the explanation in `_enableShiftClickSelection()`.\n\t\tthis.listenTo( editor.editing.view.document, 'selectionChange', evt => {\n\t\t\tif ( blockSelectionChange ) {\n\t\t\t\t// @if CK_DEBUG // console.log( 'Blocked selectionChange to avoid breaking table cells selection.' );\n\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\t}\n\n\t/**\n\t * Returns the model table cell element based on the target element of the passed DOM event.\n\t *\n\t * @returns Returns the table cell or `undefined`.\n\t */\n\tprivate _getModelTableCellFromDomEvent( domEventData: ViewDocumentDomEventData ) {\n\t\t// Note: Work with positions (not element mapping) because the target element can be an attribute or other non-mapped element.\n\t\tconst viewTargetElement = domEventData.target;\n\t\tconst viewPosition = this.editor.editing.view.createPositionAt( viewTargetElement, 0 );\n\t\tconst modelPosition = this.editor.editing.mapper.toModelPosition( viewPosition );\n\t\tconst modelElement = modelPosition.parent as ModelElement;\n\n\t\treturn modelElement.findAncestor( 'tableCell', { includeSelf: true } );\n\t}\n}\n\nfunction haveSameTableParent( cellA: ModelElement, cellB: ModelElement ) {\n\treturn cellA.parent!.parent == cellB.parent!.parent;\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/**\n * @module table/table\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { Widget } from '@ckeditor/ckeditor5-widget';\n\nimport { TableEditing } from './tableediting.js';\nimport { TableUI } from './tableui.js';\nimport { TableSelection } from './tableselection.js';\nimport { TableClipboard } from './tableclipboard.js';\nimport { TableKeyboard } from './tablekeyboard.js';\nimport { TableMouse } from './tablemouse.js';\n\n/**\n * The table plugin.\n *\n * For a detailed overview, check the {@glink features/tables/tables Table feature documentation}.\n *\n * This is a \"glue\" plugin that loads the following table features:\n *\n * * {@link module:table/tableediting~TableEditing editing feature},\n * * {@link module:table/tableselection~TableSelection selection feature},\n * * {@link module:table/tablekeyboard~TableKeyboard keyboard navigation feature},\n * * {@link module:table/tablemouse~TableMouse mouse selection feature},\n * * {@link module:table/tableclipboard~TableClipboard clipboard feature},\n * * {@link module:table/tableui~TableUI UI feature}.\n */\nexport class Table extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[\n\t\tTableEditing,\n\t\tTableUI,\n\t\tTableSelection,\n\t\tTableMouse,\n\t\tTableKeyboard,\n\t\tTableClipboard,\n\t\tWidget\n\t]> {\n\t\treturn [\n\t\t\tTableEditing,\n\t\t\tTableUI,\n\t\t\tTableSelection,\n\t\t\tTableMouse,\n\t\t\tTableKeyboard,\n\t\t\tTableClipboard,\n\t\t\tWidget\n\t\t];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Table' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module table/plaintableoutput\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { UpcastElementEvent } from '@ckeditor/ckeditor5-engine';\n\nimport { Table } from './table.js';\n\n/**\n * The plain table output feature.\n *\n * This feature strips the `<figure>` tag from the table data. This is because this tag is not supported\n * by most popular email clients and removing it ensures compatibility.\n */\nexport class PlainTableOutput extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'PlainTableOutput' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ Table ]> {\n\t\treturn [ Table ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on<UpcastElementEvent>( 'element:table', ( evt, data, conversionApi ) => {\n\t\t\t\t// It's not necessary to upcast the `table` class. This class was only added in data downcast\n\t\t\t\t// to center a plain table in the editor output.\n\t\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/17888.\n\t\t\t\tconversionApi.consumable.consume( data.viewItem, { classes: 'table' } );\n\t\t\t} );\n\t\t} );\n\t}\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/**\n * @module table/utils/ui/widget\n */\n\nimport type { ViewDocumentFragment, ViewDocumentSelection, ViewElement, ViewNode } from '@ckeditor/ckeditor5-engine';\n\nimport { isWidget } from '@ckeditor/ckeditor5-widget';\n\n/**\n * Depending on the position of the selection either return the selected table or the table higher in the hierarchy.\n *\n * @internal\n */\nexport function getSelectionAffectedTableWidget( selection: ViewDocumentSelection ): ViewElement | null {\n\tconst selectedTable = getSelectedTableWidget( selection );\n\n\tif ( selectedTable ) {\n\t\treturn selectedTable;\n\t}\n\n\treturn getTableWidgetAncestor( selection );\n}\n\n/**\n * Returns a table widget editing view element if one is selected.\n *\n * @internal\n */\nexport function getSelectedTableWidget( selection: ViewDocumentSelection ): ViewElement | null {\n\tconst viewElement = selection.getSelectedElement();\n\n\tif ( viewElement && isTableWidget( viewElement ) ) {\n\t\treturn viewElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns a table widget editing view element if one is among the selection's ancestors.\n *\n * @internal\n */\nexport function getTableWidgetAncestor( selection: ViewDocumentSelection ): ViewElement | null {\n\tconst selectionPosition = selection.getFirstPosition();\n\n\tif ( !selectionPosition ) {\n\t\treturn null;\n\t}\n\n\tlet parent: ViewNode | ViewDocumentFragment | null = selectionPosition.parent;\n\n\twhile ( parent ) {\n\t\tif ( parent.is( 'element' ) && isTableWidget( parent ) ) {\n\t\t\treturn parent;\n\t\t}\n\n\t\tparent = parent.parent;\n\t}\n\n\treturn null;\n}\n\n/**\n * Checks if a given view element is a table widget.\n *\n * @internal\n */\nexport function isTableWidget( viewNode: ViewNode ): boolean {\n\treturn viewNode.is( 'element' ) && !!viewNode.getCustomProperty( 'table' ) && isWidget( viewNode );\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/**\n * @module table/tabletoolbar\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { WidgetToolbarRepository } from '@ckeditor/ckeditor5-widget';\nimport { getSelectedTableWidget, getTableWidgetAncestor } from './utils/ui/widget.js';\n\n/**\n * The table toolbar class. It creates toolbars for the table feature and its content (for now only for the table cell content).\n *\n * The table toolbar shows up when a table widget is selected. Its components (e.g. buttons) are created based on the\n * {@link module:table/tableconfig~TableConfig#tableToolbar `table.tableToolbar` configuration option}.\n *\n * Table content toolbar shows up when the selection is inside the content of a table. It creates its component based on the\n * {@link module:table/tableconfig~TableConfig#contentToolbar `table.contentToolbar` configuration option}.\n */\nexport class TableToolbar extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ WidgetToolbarRepository ]> {\n\t\treturn [ WidgetToolbarRepository ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n\n\t\tconst tableContentToolbarItems = editor.config.get( 'table.contentToolbar' );\n\n\t\tconst tableToolbarItems = editor.config.get( 'table.tableToolbar' );\n\n\t\tif ( tableContentToolbarItems ) {\n\t\t\twidgetToolbarRepository.register( 'tableContent', {\n\t\t\t\tariaLabel: t( 'Table toolbar' ),\n\t\t\t\titems: tableContentToolbarItems,\n\t\t\t\tgetRelatedElement: getTableWidgetAncestor\n\t\t\t} );\n\t\t}\n\n\t\tif ( tableToolbarItems ) {\n\t\t\twidgetToolbarRepository.register( 'table', {\n\t\t\t\tariaLabel: t( 'Table toolbar' ),\n\t\t\t\titems: tableToolbarItems,\n\t\t\t\tgetRelatedElement: getSelectedTableWidget\n\t\t\t} );\n\t\t}\n\t}\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/**\n * @module table/ui/colorinputview\n */\n\nimport {\n\tView,\n\tInputTextView,\n\tcreateDropdown,\n\tFocusCycler,\n\tViewCollection,\n\tColorSelectorView,\n\ttype ColorDefinition,\n\ttype DropdownView,\n\ttype ColorPickerConfig,\n\ttype ColorSelectorExecuteEvent,\n\ttype ColorSelectorColorPickerCancelEvent,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\n\nimport { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';\n\n/**\n * The options for the color input view.\n *\n * @internal\n */\nexport type ColorInputViewOptions = {\n\tcolorDefinitions: Array<ColorDefinition>;\n\tcolumns: number;\n\tdefaultColorValue?: string;\n\tcolorPickerConfig: false | ColorPickerConfig;\n};\n\n/**\n * The color input view class. It allows the user to type in a color (hex, rgb, etc.)\n * or choose it from the configurable color palette with a preview.\n *\n * @internal\n */\nexport class ColorInputView extends View implements FocusableView {\n\t/**\n\t * The value of the input.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public value: string;\n\n\t/**\n\t * Controls whether the input view is in read-only mode.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public isReadOnly: boolean;\n\n\t/**\n\t * An observable flag set to `true` when the input is focused by the user.\n\t * `false` otherwise.\n\t *\n\t * @observable\n\t * @default false\n\t */\n\tdeclare public readonly isFocused: boolean;\n\n\t/**\n\t * An observable flag set to `true` when the input contains no text.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public readonly isEmpty: boolean;\n\n\t/**\n\t * @observable\n\t */\n\tdeclare public hasError: boolean;\n\n\t/**\n\t * A cached reference to the options passed to the constructor.\n\t */\n\tpublic options: ColorInputViewOptions;\n\n\t/**\n\t * Tracks information about the DOM focus in the view.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * Helps cycling over focusable children in the input view.\n\t */\n\tpublic readonly focusCycler: FocusCycler;\n\n\t/**\n\t * A collection of views that can be focused in the view.\n\t */\n\tprotected readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * An instance of the dropdown allowing to select a color from a grid.\n\t */\n\tpublic dropdownView: DropdownView;\n\n\t/**\n\t * An instance of the input allowing the user to type a color value.\n\t */\n\tpublic inputView: InputTextView;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * The flag that indicates whether the user is still typing.\n\t * If set to true, it means that the text input field ({@link #inputView}) still has the focus.\n\t * So, we should interrupt the user by replacing the input's value.\n\t */\n\tprotected _stillTyping: boolean;\n\n\t/**\n\t * Creates an instance of the color input view.\n\t *\n\t * @param locale The locale instance.\n\t * @param options The input options.\n\t * @param options.colorDefinitions The colors to be displayed in the palette inside the input's dropdown.\n\t * @param options.columns The number of columns in which the colors will be displayed.\n\t * @param options.defaultColorValue If specified, the color input view will replace the \"Remove color\" button with\n\t * the \"Restore default\" button. Instead of clearing the input field, the default color value will be set.\n\t */\n\tconstructor( locale: Locale, options: ColorInputViewOptions ) {\n\t\tsuper( locale );\n\n\t\tthis.set( 'value', '' );\n\t\tthis.set( 'isReadOnly', false );\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'isEmpty', true );\n\n\t\tthis.options = options;\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.dropdownView = this._createDropdownView();\n\t\tthis.inputView = this._createInputTextView();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._stillTyping = false;\n\n\t\tthis.focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate items backwards using the <kbd>Shift</kbd> + <kbd>Tab</kbd> keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate items forwards using the <kbd>Tab</kbd> key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-input-color'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tthis.dropdownView,\n\t\t\t\tthis.inputView\n\t\t\t]\n\t\t} );\n\n\t\tthis.on( 'change:value', ( evt, name, inputValue ) => this._setInputValue( inputValue ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t[ this.inputView, this.dropdownView.buttonView ].forEach( view => {\n\t\t\tthis.focusTracker.add( view.element! );\n\t\t\tthis._focusables.add( view );\n\t\t} );\n\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * Focuses the view.\n\t */\n\tpublic focus( direction: 1 | -1 ): void {\n\t\tif ( direction === -1 ) {\n\t\t\tthis.focusCycler.focusLast();\n\t\t} else {\n\t\t\tthis.focusCycler.focusFirst();\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Creates and configures the {@link #dropdownView}.\n\t */\n\tprivate _createDropdownView() {\n\t\tconst locale = this.locale!;\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\t\tconst colorSelector = this._createColorSelector( locale );\n\t\tconst dropdown = createDropdown( locale );\n\t\tconst colorPreview = new View();\n\n\t\tcolorPreview.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-input-color__button__preview'\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\tbackgroundColor: bind.to( 'value' )\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: [ {\n\t\t\t\ttag: 'span',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-input-color__button__preview__no-color-indicator',\n\t\t\t\t\t\tbind.if( 'value', 'ck-hidden', value => value != '' )\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t} ]\n\t\t} );\n\n\t\tdropdown.buttonView.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck-input-color__button'\n\t\t\t}\n\t\t} );\n\n\t\tdropdown.buttonView.children.add( colorPreview );\n\t\tdropdown.buttonView.label = t( 'Color picker' );\n\t\tdropdown.buttonView.tooltip = true;\n\n\t\tdropdown.panelPosition = locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';\n\t\tdropdown.panelView.children.add( colorSelector );\n\t\tdropdown.bind( 'isEnabled' ).to( this, 'isReadOnly', value => !value );\n\n\t\tdropdown.on( 'change:isOpen', ( evt, name, isVisible ) => {\n\t\t\tif ( isVisible ) {\n\t\t\t\tcolorSelector.updateSelectedColors();\n\t\t\t\tcolorSelector.showColorGridsFragment();\n\t\t\t}\n\t\t} );\n\n\t\treturn dropdown;\n\t}\n\n\t/**\n\t * Creates and configures an instance of {@link module:ui/inputtext/inputtextview~InputTextView}.\n\t *\n\t * @returns A configured instance to be set as {@link #inputView}.\n\t */\n\tprivate _createInputTextView(): InputTextView {\n\t\tconst locale = this.locale;\n\t\tconst inputView = new InputTextView( locale );\n\n\t\tinputView.extendTemplate( {\n\t\t\ton: {\n\t\t\t\tblur: inputView.bindTemplate.to( 'blur' )\n\t\t\t}\n\t\t} );\n\n\t\tinputView.value = this.value;\n\t\tinputView.bind( 'isReadOnly', 'hasError' ).to( this );\n\t\tthis.bind( 'isFocused', 'isEmpty' ).to( inputView );\n\n\t\tinputView.on( 'input', () => {\n\t\t\tconst inputValue = inputView.element!.value;\n\t\t\t// Check if the value matches one of our defined colors' label.\n\t\t\tconst mappedColor = this.options.colorDefinitions.find( def => inputValue === def.label );\n\n\t\t\tthis._stillTyping = true;\n\t\t\tthis.value = mappedColor && mappedColor.color || inputValue;\n\t\t} );\n\n\t\tinputView.on( 'blur', () => {\n\t\t\tthis._stillTyping = false;\n\t\t\tthis._setInputValue( inputView.element!.value );\n\t\t} );\n\n\t\tinputView.delegate( 'input' ).to( this );\n\n\t\treturn inputView;\n\t}\n\n\t/**\n\t * Creates and configures the panel with \"color grid\" and \"color picker\" inside the {@link #dropdownView}.\n\t */\n\tprivate _createColorSelector( locale: Locale ) {\n\t\tconst t = locale.t;\n\t\tconst defaultColor = this.options.defaultColorValue || '';\n\t\tconst removeColorButtonLabel = defaultColor ? t( 'Restore default' ) : t( 'Remove color' );\n\n\t\tconst colorSelector = new ColorSelectorView( locale, {\n\t\t\tcolors: this.options.colorDefinitions,\n\t\t\tcolumns: this.options.columns,\n\t\t\tremoveButtonLabel: removeColorButtonLabel,\n\t\t\tcolorPickerLabel: t( 'Color picker' ),\n\t\t\tcolorPickerViewConfig: this.options.colorPickerConfig === false ? false : {\n\t\t\t\t...this.options.colorPickerConfig,\n\t\t\t\thideInput: true\n\t\t\t}\n\t\t} );\n\n\t\tcolorSelector.appendUI();\n\n\t\tcolorSelector.on<ColorSelectorExecuteEvent>( 'execute', ( evt, data ) => {\n\t\t\tif ( data.source === 'colorPickerSaveButton' ) {\n\t\t\t\tthis.dropdownView.isOpen = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = data.value || defaultColor;\n\n\t\t\t// Trigger the listener that actually applies the set value.\n\t\t\tthis.fire( 'input' );\n\n\t\t\tif ( data.source !== 'colorPicker' ) {\n\t\t\t\tthis.dropdownView.isOpen = false;\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * Color is saved before changes in color picker. In case \"cancel button\" is pressed\n\t\t * this color will be applied.\n\t\t */\n\t\tlet backupColor = this.value;\n\n\t\tcolorSelector.on<ColorSelectorColorPickerCancelEvent>( 'colorPicker:cancel', () => {\n\t\t\t/**\n\t\t\t * Revert color to previous value before changes in color picker.\n\t\t\t */\n\t\t\tthis.value = backupColor;\n\n\t\t\tthis.fire( 'input' );\n\n\t\t\tthis.dropdownView.isOpen = false;\n\t\t} );\n\n\t\tcolorSelector.colorGridsFragmentView.colorPickerButtonView!.on( 'execute', () => {\n\t\t\t/**\n\t\t\t * Save color value before changes in color picker.\n\t\t\t */\n\t\t\tbackupColor = this.value;\n\t\t} );\n\n\t\tcolorSelector.bind( 'selectedColor' ).to( this, 'value' );\n\n\t\treturn colorSelector;\n\t}\n\n\t/**\n\t * Sets {@link #inputView}'s value property to the color value or color label,\n\t * if there is one and the user is not typing.\n\t *\n\t * Handles cases like:\n\t *\n\t * * Someone picks the color in the grid.\n\t * * The color is set from the plugin level.\n\t *\n\t * @param inputValue Color value to be set.\n\t */\n\tprivate _setInputValue( inputValue: string ) {\n\t\tif ( !this._stillTyping ) {\n\t\t\tconst normalizedInputValue = normalizeColor( inputValue );\n\t\t\t// Check if the value matches one of our defined colors.\n\t\t\tconst mappedColor = this.options.colorDefinitions.find( def => normalizedInputValue === normalizeColor( def.color ) );\n\n\t\t\tif ( mappedColor ) {\n\t\t\t\tthis.inputView.value = mappedColor.label;\n\t\t\t} else {\n\t\t\t\tthis.inputView.value = inputValue || '';\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Normalizes color value, by stripping extensive whitespace.\n * For example., transforms:\n * * `   rgb(  25 50    0 )` to `rgb(25 50 0)`,\n * * \"\\t  rgb(  25 ,  50,0 )\t\t\" to `rgb(25 50 0)`.\n *\n * @param colorString The value to be normalized.\n */\nfunction normalizeColor( colorString: string ): string {\n\treturn colorString\n\t\t// Remove any whitespace right after `(` or `,`.\n\t\t.replace( /([(,])\\s+/g, '$1' )\n\t\t// Remove any whitespace at the beginning or right before the end, `)`, `,`, or another whitespace.\n\t\t.replace( /^\\s+|\\s+(?=[),\\s]|$)/g, '' )\n\t\t// Then, replace `,` or whitespace with a single space.\n\t\t.replace( /,|\\s/g, ' ' );\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/**\n * @module table/utils/ui/table-properties\n */\n\nimport {\n\tButtonView,\n\tUIModel,\n\ttype ColorOption,\n\ttype LabeledFieldView,\n\ttype ListDropdownItemDefinition,\n\ttype NormalizedColorOption,\n\ttype ToolbarView,\n\ttype View,\n\ttype ColorPickerConfig\n} from '@ckeditor/ckeditor5-ui';\n\nimport { Collection, type LocaleTranslate } from '@ckeditor/ckeditor5-utils';\nimport { isColorStyleValue, isLengthStyleValue, isPercentageStyleValue } from '@ckeditor/ckeditor5-engine';\n\nimport { type TableCellPropertiesView } from '../../tablecellproperties/ui/tablecellpropertiesview.js';\nimport { type TablePropertiesView } from '../../tableproperties/ui/tablepropertiesview.js';\n\nimport { ColorInputView } from '../../ui/colorinputview.js';\n\nconst isEmpty = ( val: string ) => val === '';\n\n/**\n * Returns an object containing pairs of CSS border style values and their localized UI\n * labels. Used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}\n * and {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView}.\n *\n * @internal\n * @param t The \"t\" function provided by the editor that is used to localize strings.\n */\nexport function getBorderStyleLabels( t: LocaleTranslate ): Record<string, string> {\n\treturn {\n\t\tnone: t( 'None' ),\n\t\tsolid: t( 'Solid' ),\n\t\tdotted: t( 'Dotted' ),\n\t\tdashed: t( 'Dashed' ),\n\t\tdouble: t( 'Double' ),\n\t\tgroove: t( 'Groove' ),\n\t\tridge: t( 'Ridge' ),\n\t\tinset: t( 'Inset' ),\n\t\toutset: t( 'Outset' )\n\t};\n}\n\n/**\n * Returns a localized error string that can be displayed next to color (background, border)\n * fields that have an invalid value.\n *\n * @internal\n * @param t The \"t\" function provided by the editor that is used to localize strings.\n */\nexport function getLocalizedColorErrorText( t: LocaleTranslate ): string {\n\treturn t( 'The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".' );\n}\n\n/**\n * Returns a localized error string that can be displayed next to length (padding, border width)\n * fields that have an invalid value.\n *\n * @internal\n * @param t The \"t\" function provided by the editor that is used to localize strings.\n */\nexport function getLocalizedLengthErrorText( t: LocaleTranslate ): string {\n\treturn t( 'The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".' );\n}\n\n/**\n * Returns `true` when the passed value is an empty string or a valid CSS color expression.\n * Otherwise, `false` is returned.\n *\n * See {@link module:engine/view/styles/utils~isColorStyleValue}.\n *\n * @internal\n */\nexport function colorFieldValidator( value: string ): boolean {\n\tvalue = value.trim().toLowerCase();\n\n\treturn isEmpty( value ) || isColorStyleValue( value );\n}\n\n/**\n * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.\n * Otherwise, `false` is returned.\n *\n * See {@link module:engine/view/styles/utils~isLengthStyleValue}.\n * See {@link module:engine/view/styles/utils~isPercentageStyleValue}.\n *\n * @internal\n */\nexport function lengthFieldValidator( value: string ): boolean {\n\tvalue = value.trim();\n\n\treturn isEmpty( value ) || isNumberString( value ) || isLengthStyleValue( value ) || isPercentageStyleValue( value );\n}\n\n/**\n * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.\n * Otherwise, `false` is returned.\n *\n * See {@link module:engine/view/styles/utils~isLengthStyleValue}.\n *\n * @internal\n */\nexport function lineWidthFieldValidator( value: string ): boolean {\n\tvalue = value.trim();\n\n\treturn isEmpty( value ) || isNumberString( value ) || isLengthStyleValue( value );\n}\n\n/**\n * Generates item definitions for a UI dropdown that allows changing the border style of a table or a table cell.\n *\n * @internal\n * @param defaultStyle The default border.\n */\nexport function getBorderStyleDefinitions(\n\tview: TableCellPropertiesView | TablePropertiesView,\n\tdefaultStyle: string\n): Collection<ListDropdownItemDefinition> {\n\tconst itemDefinitions: Collection<ListDropdownItemDefinition> = new Collection();\n\tconst styleLabels = getBorderStyleLabels( view.t! );\n\n\tfor ( const style in styleLabels ) {\n\t\tconst definition: ListDropdownItemDefinition = {\n\t\t\ttype: 'button',\n\t\t\tmodel: new UIModel( {\n\t\t\t\t_borderStyleValue: style,\n\t\t\t\tlabel: styleLabels[ style ],\n\t\t\t\trole: 'menuitemradio',\n\t\t\t\twithText: true\n\t\t\t} )\n\t\t};\n\n\t\tif ( style === 'none' ) {\n\t\t\tdefinition.model.bind( 'isOn' ).to( view, 'borderStyle', value => {\n\t\t\t\tif ( defaultStyle === 'none' ) {\n\t\t\t\t\treturn !value;\n\t\t\t\t}\n\n\t\t\t\treturn value === style;\n\t\t\t} );\n\t\t} else {\n\t\t\tdefinition.model.bind( 'isOn' ).to( view, 'borderStyle', value => {\n\t\t\t\treturn value === style;\n\t\t\t} );\n\t\t}\n\n\t\titemDefinitions.add( definition );\n\t}\n\n\treturn itemDefinitions;\n}\n\n/**\n * A helper that fills a toolbar with buttons that:\n *\n * * have some labels,\n * * have some icons,\n * * set a certain UI view property value upon execution.\n *\n * @internal\n * @param options Configuration options\n * @param options.view The view that has the observable property.\n * @param options.icons Object with button icons.\n * @param options.toolbar The toolbar to fill with buttons.\n * @param options.labels Object with button labels.\n * @param options.propertyName The name of the observable property in the view.\n * @param options.nameToValue A function that maps a button name to a value. By default names are the same as values.\n * @param options.defaultValue Default value for the property.\n */\nexport function fillToolbar<TView extends View, TPropertyName extends keyof TView>(\n\toptions: {\n\t\tview: TView;\n\t\ticons: Record<string, string>;\n\t\ttoolbar: ToolbarView;\n\t\tlabels: Record<number, string>;\n\t\tpropertyName: TPropertyName;\n\t\tnameToValue?: ( name: string ) => string;\n\t\tdefaultValue?: string;\n\t}\n): void {\n\tconst { view, icons, toolbar, labels, propertyName, nameToValue, defaultValue } = options;\n\tfor ( const name in labels ) {\n\t\tconst button = new ButtonView( view.locale );\n\n\t\tbutton.set( {\n\t\t\trole: 'radio',\n\t\t\tisToggleable: true,\n\t\t\tlabel: labels[ name ],\n\t\t\ticon: icons[ name ],\n\t\t\ttooltip: labels[ name ]\n\t\t} );\n\n\t\t// If specified the `nameToValue()` callback, map the value based on the option's name.\n\t\tconst buttonValue = nameToValue ? nameToValue( name ) : name;\n\n\t\tbutton.bind( 'isOn' ).to( view, propertyName, value => {\n\t\t\t// `value` comes from `view[ propertyName ]`.\n\t\t\tlet valueToCompare: unknown = value;\n\n\t\t\t// If it's empty, and the `defaultValue` is specified, use it instead.\n\t\t\tif ( value === '' && defaultValue ) {\n\t\t\t\tvalueToCompare = defaultValue;\n\t\t\t}\n\n\t\t\treturn buttonValue === valueToCompare;\n\t\t} );\n\n\t\tbutton.on( 'execute', () => {\n\t\t\t// Allow toggling alignment if there is no default value specified (especially for layout tables).\n\t\t\tif ( !defaultValue && buttonValue && view[ propertyName ] === buttonValue ) {\n\t\t\t\tview[ propertyName ] = undefined as any;\n\t\t\t} else {\n\t\t\t\tview[ propertyName ] = buttonValue as any;\n\t\t\t}\n\t\t} );\n\n\t\ttoolbar.items.add( button );\n\t}\n}\n\n/**\n * A default color palette used by various user interfaces related to tables, for instance,\n * by {@link module:table/tablecellproperties/tablecellpropertiesui~TableCellPropertiesUI} or\n * {@link module:table/tableproperties/tablepropertiesui~TablePropertiesUI}.\n *\n * The color palette follows the {@link module:table/tableconfig~TableColorConfig table color configuration format}\n * and contains the following color definitions:\n *\n * ```ts\n * const defaultColors = [\n *   {\n *     color: 'hsl(0, 0%, 0%)',\n *     label: 'Black'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 30%)',\n *     label: 'Dim grey'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 60%)',\n *     label: 'Grey'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 90%)',\n *     label: 'Light grey'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 100%)',\n *     label: 'White',\n *     hasBorder: true\n *   },\n *   {\n *     color: 'hsl(0, 75%, 60%)',\n *     label: 'Red'\n *   },\n *   {\n *     color: 'hsl(30, 75%, 60%)',\n *     label: 'Orange'\n *   },\n *   {\n *     color: 'hsl(60, 75%, 60%)',\n *     label: 'Yellow'\n *   },\n *   {\n *     color: 'hsl(90, 75%, 60%)',\n *     label: 'Light green'\n *   },\n *   {\n *     color: 'hsl(120, 75%, 60%)',\n *     label: 'Green'\n *   },\n *   {\n *     color: 'hsl(150, 75%, 60%)',\n *     label: 'Aquamarine'\n *   },\n *   {\n *     color: 'hsl(180, 75%, 60%)',\n *     label: 'Turquoise'\n *   },\n *   {\n *     color: 'hsl(210, 75%, 60%)',\n *     label: 'Light blue'\n *   },\n *   {\n *     color: 'hsl(240, 75%, 60%)',\n *     label: 'Blue'\n *   },\n *   {\n *     color: 'hsl(270, 75%, 60%)',\n *     label: 'Purple'\n *   }\n * ];\n * ```\n *\n * @internal\n */\nexport const defaultColors: Array<ColorOption> = [\n\t{\n\t\tcolor: 'hsl(0, 0%, 0%)',\n\t\tlabel: 'Black'\n\t},\n\t{\n\t\tcolor: 'hsl(0, 0%, 30%)',\n\t\tlabel: 'Dim grey'\n\t},\n\t{\n\t\tcolor: 'hsl(0, 0%, 60%)',\n\t\tlabel: 'Grey'\n\t},\n\t{\n\t\tcolor: 'hsl(0, 0%, 90%)',\n\t\tlabel: 'Light grey'\n\t},\n\t{\n\t\tcolor: 'hsl(0, 0%, 100%)',\n\t\tlabel: 'White',\n\t\thasBorder: true\n\t},\n\t{\n\t\tcolor: 'hsl(0, 75%, 60%)',\n\t\tlabel: 'Red'\n\t},\n\t{\n\t\tcolor: 'hsl(30, 75%, 60%)',\n\t\tlabel: 'Orange'\n\t},\n\t{\n\t\tcolor: 'hsl(60, 75%, 60%)',\n\t\tlabel: 'Yellow'\n\t},\n\t{\n\t\tcolor: 'hsl(90, 75%, 60%)',\n\t\tlabel: 'Light green'\n\t},\n\t{\n\t\tcolor: 'hsl(120, 75%, 60%)',\n\t\tlabel: 'Green'\n\t},\n\t{\n\t\tcolor: 'hsl(150, 75%, 60%)',\n\t\tlabel: 'Aquamarine'\n\t},\n\t{\n\t\tcolor: 'hsl(180, 75%, 60%)',\n\t\tlabel: 'Turquoise'\n\t},\n\t{\n\t\tcolor: 'hsl(210, 75%, 60%)',\n\t\tlabel: 'Light blue'\n\t},\n\t{\n\t\tcolor: 'hsl(240, 75%, 60%)',\n\t\tlabel: 'Blue'\n\t},\n\t{\n\t\tcolor: 'hsl(270, 75%, 60%)',\n\t\tlabel: 'Purple'\n\t}\n];\n\n/**\n * Returns a creator for a color input with a label.\n *\n * For given options, it returns a function that creates an instance of a\n * {@link module:table/ui/colorinputview~ColorInputView color input} logically related to\n * a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in the DOM.\n *\n * The helper does the following:\n *\n * * It sets the color input `id` and `ariaDescribedById` attributes.\n * * It binds the color input `isReadOnly` to the labeled view.\n * * It binds the color input `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when the user starts typing in the color input.\n *\n * Usage:\n *\n * ```ts\n * const colorInputCreator = getLabeledColorInputCreator( {\n *   colorConfig: [ ... ],\n *   columns: 3,\n * } );\n *\n * const labeledInputView = new LabeledFieldView( locale, colorInputCreator );\n * console.log( labeledInputView.view ); // A color input instance.\n * ```\n *\n * @internal\n * @param options Color input options.\n * @param options.colorConfig The configuration of the color palette displayed in the input's dropdown.\n * @param options.columns The configuration of the number of columns the color palette consists of in the input's dropdown.\n * @param options.defaultColorValue If specified, the color input view will replace the \"Remove color\" button with\n * the \"Restore default\" button. Instead of clearing the input field, the default color value will be set.\n * @param options.colorPickerConfig The configuration of the color picker. You could disable it or define your output format.\n */\nexport function getLabeledColorInputCreator(\n\toptions: {\n\t\tcolorConfig: Array<NormalizedColorOption>;\n\t\tcolumns: number;\n\t\tdefaultColorValue?: string;\n\t\tcolorPickerConfig: false | ColorPickerConfig;\n\t}\n) {\n\treturn ( labeledFieldView: LabeledFieldView, viewUid: string, statusUid: string ): ColorInputView => {\n\t\tconst colorInputView = new ColorInputView( labeledFieldView.locale!, {\n\t\t\tcolorDefinitions: colorConfigToColorGridDefinitions( options.colorConfig ),\n\t\t\tcolumns: options.columns,\n\t\t\tdefaultColorValue: options.defaultColorValue,\n\t\t\tcolorPickerConfig: options.colorPickerConfig\n\t\t} );\n\n\t\tcolorInputView.inputView.set( {\n\t\t\tid: viewUid,\n\t\t\tariaDescribedById: statusUid\n\t\t} );\n\n\t\tcolorInputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n\t\tcolorInputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n\n\t\tcolorInputView.on( 'input', () => {\n\t\t\t// UX: Make the error text disappear and disable the error indicator as the user\n\t\t\t// starts fixing the errors.\n\t\t\tlabeledFieldView.errorText = null;\n\t\t} );\n\n\t\tlabeledFieldView.bind( 'isEmpty', 'isFocused' ).to( colorInputView );\n\n\t\treturn colorInputView;\n\t};\n}\n\n/**\n * A simple helper method to detect number strings.\n * I allows full number notation, so omitting 0 is not allowed:\n */\nfunction isNumberString( value: string ) {\n\tconst parsedValue = parseFloat( value );\n\n\treturn !Number.isNaN( parsedValue ) && value === String( parsedValue );\n}\n\nfunction colorConfigToColorGridDefinitions( colorConfig: Array<NormalizedColorOption> ) {\n\treturn colorConfig.map( item => ( {\n\t\tcolor: item.model,\n\t\tlabel: item.label,\n\t\toptions: {\n\t\t\thasBorder: item.hasBorder\n\t\t}\n\t} ) );\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/**\n * @module table/tablecellproperties/ui/tablecellpropertiesview\n */\n\nimport {\n\taddListToDropdown,\n\tButtonView,\n\tcreateLabeledDropdown,\n\tcreateLabeledInputText,\n\tFocusCycler,\n\tFormRowView,\n\tFormHeaderView,\n\tLabeledFieldView,\n\tLabelView,\n\tsubmitHandler,\n\tToolbarView,\n\tUIModel,\n\tView,\n\tViewCollection,\n\ttype FocusableView,\n\ttype ListDropdownItemDefinition,\n\ttype NormalizedColorOption,\n\ttype ColorPickerConfig\n} from '@ckeditor/ckeditor5-ui';\nimport {\n\tCollection,\n\tKeystrokeHandler,\n\tFocusTracker,\n\ttype Locale,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\nimport {\n\tIconAlignBottom,\n\tIconAlignCenter,\n\tIconAlignJustify,\n\tIconAlignLeft,\n\tIconAlignMiddle,\n\tIconAlignRight,\n\tIconAlignTop,\n\tIconPreviousArrow\n} from '@ckeditor/ckeditor5-icons';\n\nimport {\n\tfillToolbar,\n\tgetBorderStyleDefinitions,\n\tgetBorderStyleLabels,\n\tgetLabeledColorInputCreator\n} from '../../utils/ui/table-properties.js';\nimport { type ColorInputView } from '../../ui/colorinputview.js';\nimport type { TableCellPropertiesOptions } from '../../tableconfig.js';\nimport type { TableCellType } from '../tablecellpropertiesutils.js';\n\nexport interface TableCellPropertiesViewOptions {\n\tborderColors: Array<NormalizedColorOption>;\n\tbackgroundColors: Array<NormalizedColorOption>;\n\tdefaultTableCellProperties: TableCellPropertiesOptions;\n\tcolorPickerConfig: false | ColorPickerConfig;\n\tshowScopedHeaderOptions?: boolean;\n}\n\n/**\n * The class representing a table cell properties form, allowing users to customize\n * certain style aspects of a table cell, for instance, border, padding, text alignment, etc..\n */\nexport class TableCellPropertiesView extends View {\n\t/**\n\t * The value of the cell border style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare borderStyle: string;\n\n\t/**\n\t * The value of the cell border width style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare borderWidth: string;\n\n\t/**\n\t * The value of the cell border color style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare borderColor: string;\n\n\t/**\n\t * The value of the cell padding style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare padding: string;\n\n\t/**\n\t * The value of the cell background color style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare backgroundColor: string;\n\n\t/**\n\t * The value of the table cell width style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare width: string;\n\n\t/**\n\t * The value of the table cell height style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare height: string;\n\n\t/**\n\t * The value of the horizontal text alignment style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare horizontalAlignment: string;\n\n\t/**\n\t * The value of the vertical text alignment style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare verticalAlignment: string;\n\n\t/**\n\t * The type of the table cell ('data' or 'header').\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tpublic declare cellType: string;\n\n\t/**\n\t * Options passed to the view. See {@link #constructor} to learn more.\n\t */\n\tpublic readonly options: TableCellPropertiesViewOptions;\n\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A collection of child views in the form.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A dropdown that allows selecting the style of the table cell border.\n\t */\n\tpublic readonly borderStyleDropdown: LabeledFieldView<FocusableView>;\n\n\t/**\n\t * An input that allows specifying the width of the table cell border.\n\t */\n\tpublic readonly borderWidthInput: LabeledFieldView<FocusableView>;\n\n\t/**\n\t * An input that allows specifying the color of the table cell border.\n\t */\n\tpublic readonly borderColorInput: LabeledFieldView<ColorInputView>;\n\n\t/**\n\t * An input that allows specifying the table cell background color.\n\t */\n\tpublic readonly backgroundInput: LabeledFieldView<ColorInputView>;\n\n\t/**\n\t * A dropdown that allows selecting the type of the table cell (data or header).\n\t */\n\tpublic readonly cellTypeDropdown: LabeledFieldView<FocusableView>;\n\n\t/**\n\t * An input that allows specifying the table cell padding.\n\t */\n\tpublic readonly paddingInput: LabeledFieldView;\n\n\t/**\n\t * An input that allows specifying the table cell width.\n\t */\n\tpublic readonly widthInput: LabeledFieldView<FocusableView>;\n\n\t/**\n\t * An input that allows specifying the table cell height.\n\t */\n\tpublic readonly heightInput: LabeledFieldView<FocusableView>;\n\n\t/**\n\t * A toolbar with buttons that allow changing the horizontal text alignment in a table cell.\n\t */\n\tpublic readonly horizontalAlignmentToolbar: ToolbarView;\n\n\t/**\n\t * A toolbar with buttons that allow changing the vertical text alignment in a table cell.\n\t */\n\tpublic readonly verticalAlignmentToolbar: ToolbarView;\n\n\t/**\n\t * The \"Save\" button view.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * The \"Cancel\" button view.\n\t */\n\tpublic cancelButtonView: ButtonView;\n\n\t/**\n\t * The \"Back\" button view.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprotected readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprotected readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options Additional configuration of the view.\n\t * @param options.borderColors A configuration of the border color palette used by the\n\t * {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#borderColorInput}.\n\t * @param options.backgroundColors A configuration of the background color palette used by the\n\t * {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#backgroundInput}.\n\t * @param options.defaultTableCellProperties The default table cell properties.\n\t */\n\tconstructor( locale: Locale, options: TableCellPropertiesViewOptions ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\tborderStyle: '',\n\t\t\tborderWidth: '',\n\t\t\tborderColor: '',\n\t\t\tpadding: '',\n\t\t\tbackgroundColor: '',\n\t\t\twidth: '',\n\t\t\theight: '',\n\t\t\thorizontalAlignment: '',\n\t\t\tverticalAlignment: '',\n\t\t\tcellType: ''\n\t\t} );\n\n\t\tthis.options = options;\n\n\t\tconst { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();\n\t\tconst { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();\n\t\tconst { cellTypeRowLabel, cellTypeDropdown } = this._createCellTypeField();\n\t\tconst { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();\n\t\tconst { horizontalAlignmentToolbar, verticalAlignmentToolbar, alignmentLabel } = this._createAlignmentFields();\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.children = this.createCollection();\n\t\tthis.borderStyleDropdown = borderStyleDropdown;\n\t\tthis.borderWidthInput = borderWidthInput;\n\t\tthis.borderColorInput = borderColorInput;\n\t\tthis.backgroundInput = backgroundInput;\n\t\tthis.cellTypeDropdown = cellTypeDropdown;\n\t\tthis.paddingInput = this._createPaddingField();\n\t\tthis.widthInput = widthInput;\n\t\tthis.heightInput = heightInput;\n\t\tthis.horizontalAlignmentToolbar = horizontalAlignmentToolbar;\n\t\tthis.verticalAlignmentToolbar = verticalAlignmentToolbar;\n\n\t\t// Defer creating to make sure other fields are present and the Save button can\n\t\t// bind its #isEnabled to their error messages so there's no way to save unless all\n\t\t// fields are valid.\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.backButtonView = this._createBackButton();\n\n\t\tthis._focusables = new ViewCollection();\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\t// Form header.\n\t\tconst header = new FormHeaderView( locale, {\n\t\t\tlabel: this.t!( 'Cell properties' )\n\t\t} );\n\n\t\theader.children.add( this.backButtonView, 0 );\n\n\t\tthis.children.add( header );\n\n\t\t// Border row.\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tlabelView: borderRowLabel,\n\t\t\tchildren: [\n\t\t\t\tborderRowLabel,\n\t\t\t\tborderStyleDropdown,\n\t\t\t\tborderWidthInput,\n\t\t\t\tborderColorInput\n\t\t\t],\n\t\t\tclass: 'ck-table-form__border-row'\n\t\t} ) );\n\n\t\t// Background and cell type.\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\tnew FormRowView( locale, {\n\t\t\t\t\tlabelView: cellTypeRowLabel,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tcellTypeRowLabel,\n\t\t\t\t\t\tcellTypeDropdown\n\t\t\t\t\t],\n\t\t\t\t\tclass: 'ck-table-form__cell-type-row'\n\t\t\t\t} ),\n\t\t\t\tnew FormRowView( locale, {\n\t\t\t\t\tlabelView: backgroundRowLabel,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tbackgroundRowLabel,\n\t\t\t\t\t\tbackgroundInput\n\t\t\t\t\t],\n\t\t\t\t\tclass: 'ck-table-form__background-row'\n\t\t\t\t} )\n\t\t\t]\n\t\t} ) );\n\n\t\t// Dimensions row and padding.\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\t// Dimensions row.\n\t\t\t\tnew FormRowView( locale, {\n\t\t\t\t\tlabelView: dimensionsLabel,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tdimensionsLabel,\n\t\t\t\t\t\twidthInput,\n\t\t\t\t\t\toperatorLabel,\n\t\t\t\t\t\theightInput\n\t\t\t\t\t],\n\t\t\t\t\tclass: 'ck-table-form__dimensions-row'\n\t\t\t\t} ),\n\t\t\t\t// Padding row.\n\t\t\t\tnew FormRowView( locale, {\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tthis.paddingInput\n\t\t\t\t\t],\n\t\t\t\t\tclass: 'ck-table-cell-properties-form__padding-row'\n\t\t\t\t} )\n\t\t\t]\n\t\t} ) );\n\n\t\t// Text alignment row.\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tlabelView: alignmentLabel,\n\t\t\tchildren: [\n\t\t\t\talignmentLabel,\n\t\t\t\thorizontalAlignmentToolbar,\n\t\t\t\tverticalAlignmentToolbar\n\t\t\t],\n\t\t\tclass: 'ck-table-cell-properties-form__alignment-row'\n\t\t} ) );\n\n\t\t// Action row.\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\tthis.cancelButtonView,\n\t\t\t\tthis.saveButtonView\n\t\t\t],\n\t\t\tclass: 'ck-table-form__action-row'\n\t\t} ) );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form',\n\t\t\t\t\t'ck-table-form',\n\t\t\t\t\t'ck-table-cell-properties-form'\n\t\t\t\t],\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/90\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Enable the \"submit\" event for this view. It can be triggered by the #saveButtonView\n\t\t// which is of the \"submit\" DOM \"type\".\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\t// Maintain continuous focus cycling over views that have focusable children and focus cyclers themselves.\n\t\t[ this.borderColorInput, this.backgroundInput ].forEach( view => {\n\t\t\tthis._focusCycler.chain( view.fieldView.focusCycler );\n\t\t} );\n\n\t\t[\n\t\t\tthis.borderStyleDropdown,\n\t\t\tthis.borderColorInput,\n\t\t\tthis.borderWidthInput,\n\t\t\tthis.cellTypeDropdown,\n\t\t\tthis.backgroundInput,\n\t\t\tthis.widthInput,\n\t\t\tthis.heightInput,\n\t\t\tthis.paddingInput,\n\t\t\tthis.horizontalAlignmentToolbar,\n\t\t\tthis.verticalAlignmentToolbar,\n\t\t\tthis.cancelButtonView,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.backButtonView\n\t\t].forEach( view => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( view );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( view.element! );\n\t\t} );\n\n\t\t// Mainly for closing using \"Esc\" and navigation using \"Tab\".\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the fist focusable field in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #borderStyleDropdown},\n\t * * {@link #borderWidthInput},\n\t * * {@link #borderColorInput}.\n\t */\n\tprivate _createBorderFields(): {\n\t\tborderRowLabel: LabelView;\n\t\tborderStyleDropdown: LabeledFieldView;\n\t\tborderColorInput: LabeledFieldView<ColorInputView>;\n\t\tborderWidthInput: LabeledFieldView;\n\t} {\n\t\tconst defaultTableCellProperties = this.options.defaultTableCellProperties;\n\t\tconst defaultBorder = {\n\t\t\tstyle: defaultTableCellProperties.borderStyle,\n\t\t\twidth: defaultTableCellProperties.borderWidth,\n\t\t\tcolor: defaultTableCellProperties.borderColor\n\t\t};\n\n\t\tconst colorInputCreator = getLabeledColorInputCreator( {\n\t\t\tcolorConfig: this.options.borderColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: defaultBorder.color,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t} );\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\t\tconst accessibleLabel = t( 'Style' );\n\n\t\t// -- Group label ---------------------------------------------\n\n\t\tconst borderRowLabel = new LabelView( locale );\n\t\tborderRowLabel.text = t( 'Border' );\n\n\t\t// -- Style ---------------------------------------------------\n\n\t\tconst styleLabels = getBorderStyleLabels( t );\n\t\tconst borderStyleDropdown = new LabeledFieldView( locale, createLabeledDropdown );\n\t\tborderStyleDropdown.set( {\n\t\t\tlabel: accessibleLabel,\n\t\t\tclass: 'ck-table-form__border-style'\n\t\t} );\n\n\t\tborderStyleDropdown.fieldView.buttonView.set( {\n\t\t\tariaLabel: accessibleLabel,\n\t\t\tariaLabelledBy: undefined,\n\t\t\tisOn: false,\n\t\t\twithText: true,\n\t\t\ttooltip: accessibleLabel\n\t\t} );\n\n\t\tborderStyleDropdown.fieldView.buttonView.bind( 'label' ).to( this, 'borderStyle', value => {\n\t\t\treturn styleLabels[ value ? value : 'none' ];\n\t\t} );\n\n\t\tborderStyleDropdown.fieldView.on( 'execute', evt => {\n\t\t\tthis.borderStyle = ( evt.source as Record<string, unknown> )._borderStyleValue as string;\n\t\t} );\n\n\t\tborderStyleDropdown.bind( 'isEmpty' ).to( this, 'borderStyle', value => !value );\n\n\t\taddListToDropdown( borderStyleDropdown.fieldView, getBorderStyleDefinitions( this, defaultBorder.style! ), {\n\t\t\trole: 'menu',\n\t\t\tariaLabel: accessibleLabel\n\t\t} );\n\n\t\t// -- Width ---------------------------------------------------\n\n\t\tconst borderWidthInput = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\tborderWidthInput.set( {\n\t\t\tlabel: t( 'Width' ),\n\t\t\tclass: 'ck-table-form__border-width'\n\t\t} );\n\n\t\tborderWidthInput.fieldView.bind( 'value' ).to( this, 'borderWidth' );\n\t\tborderWidthInput.bind( 'isEnabled' ).to( this, 'borderStyle', isBorderStyleSet );\n\t\tborderWidthInput.fieldView.on( 'input', () => {\n\t\t\tthis.borderWidth = borderWidthInput.fieldView.element!.value;\n\t\t} );\n\n\t\t// -- Color ---------------------------------------------------\n\n\t\tconst borderColorInput = new LabeledFieldView( locale, colorInputCreator );\n\n\t\tborderColorInput.set( {\n\t\t\tlabel: t( 'Color' ),\n\t\t\tclass: 'ck-table-form__border-color'\n\t\t} );\n\n\t\tborderColorInput.fieldView.bind( 'value' ).to( this, 'borderColor' );\n\t\tborderColorInput.bind( 'isEnabled' ).to( this, 'borderStyle', isBorderStyleSet );\n\n\t\tborderColorInput.fieldView.on( 'input', () => {\n\t\t\tthis.borderColor = borderColorInput.fieldView.value;\n\t\t} );\n\n\t\t// Reset the border color and width fields depending on the `border-style` value.\n\t\tthis.on<ObservableChangeEvent<string>>( 'change:borderStyle', ( evt, name, newValue, oldValue ) => {\n\t\t\t// When removing the border (`border-style:none`), clear the remaining `border-*` properties.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/6227.\n\t\t\tif ( !isBorderStyleSet( newValue ) ) {\n\t\t\t\tthis.borderColor = '';\n\t\t\t\tthis.borderWidth = '';\n\t\t\t}\n\n\t\t\t// When setting the `border-style` from `none`, set the default `border-color` and `border-width` properties.\n\t\t\tif ( !isBorderStyleSet( oldValue ) ) {\n\t\t\t\tthis.borderColor = defaultBorder.color!;\n\t\t\t\tthis.borderWidth = defaultBorder.width!;\n\t\t\t}\n\t\t} );\n\n\t\treturn {\n\t\t\tborderRowLabel,\n\t\t\tborderStyleDropdown,\n\t\t\tborderColorInput,\n\t\t\tborderWidthInput\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #backgroundInput}.\n\t */\n\tprivate _createBackgroundFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\t// -- Group label ---------------------------------------------\n\n\t\tconst backgroundRowLabel = new LabelView( locale );\n\t\tbackgroundRowLabel.text = t( 'Background' );\n\n\t\t// -- Background color input -----------------------------------\n\n\t\tconst colorInputCreator = getLabeledColorInputCreator( {\n\t\t\tcolorConfig: this.options.backgroundColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: this.options.defaultTableCellProperties.backgroundColor,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t} );\n\n\t\tconst backgroundInput = new LabeledFieldView( locale, colorInputCreator );\n\n\t\tbackgroundInput.set( {\n\t\t\tlabel: t( 'Color' ),\n\t\t\tclass: 'ck-table-cell-properties-form__background'\n\t\t} );\n\n\t\tbackgroundInput.fieldView.bind( 'value' ).to( this, 'backgroundColor' );\n\t\tbackgroundInput.fieldView.on( 'input', () => {\n\t\t\tthis.backgroundColor = backgroundInput.fieldView.value;\n\t\t} );\n\n\t\treturn {\n\t\t\tbackgroundRowLabel,\n\t\t\tbackgroundInput\n\t\t};\n\t}\n\n\t/**\n\t * Create cell type field.\n\t *\n\t * * {@link #cellTypeDropdown}.\n\t *\n\t * @internal\n\t */\n\tprivate _createCellTypeField() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\tconst cellTypeRowLabel = new LabelView( locale );\n\t\tcellTypeRowLabel.text = t( 'Cell type' );\n\n\t\tconst cellTypeLabels = this._cellTypeLabels;\n\t\tconst cellTypeDropdown = new LabeledFieldView( locale, createLabeledDropdown );\n\n\t\tcellTypeDropdown.set( {\n\t\t\tlabel: t( 'Cell type' ),\n\t\t\tclass: 'ck-table-cell-properties-form__cell-type'\n\t\t} );\n\n\t\tcellTypeDropdown.fieldView.buttonView.set( {\n\t\t\tariaLabel: t( 'Cell type' ),\n\t\t\tariaLabelledBy: undefined,\n\t\t\tisOn: false,\n\t\t\twithText: true,\n\t\t\ttooltip: t( 'Cell type' )\n\t\t} );\n\n\t\tcellTypeDropdown.fieldView.buttonView.bind( 'label' ).to( this, 'cellType', value => {\n\t\t\treturn cellTypeLabels[ ( value || 'data' ) as TableCellType ];\n\t\t} );\n\n\t\tcellTypeDropdown.fieldView.on( 'execute', evt => {\n\t\t\tthis.cellType = ( evt.source as Record<string, unknown> )._cellTypeValue as string;\n\t\t} );\n\n\t\tcellTypeDropdown.bind( 'isEmpty' ).to( this, 'cellType', value => !value );\n\n\t\taddListToDropdown( cellTypeDropdown.fieldView, this._getCellTypeDefinitions(), {\n\t\t\trole: 'menu',\n\t\t\tariaLabel: t( 'Cell type' )\n\t\t} );\n\n\t\treturn {\n\t\t\tcellTypeRowLabel,\n\t\t\tcellTypeDropdown\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #widthInput}.\n\t * * {@link #heightInput}.\n\t */\n\tprivate _createDimensionFields(): {\n\t\tdimensionsLabel: LabelView;\n\t\twidthInput: LabeledFieldView;\n\t\toperatorLabel: View;\n\t\theightInput: LabeledFieldView;\n\t} {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\t// -- Label ---------------------------------------------------\n\n\t\tconst dimensionsLabel = new LabelView( locale );\n\t\tdimensionsLabel.text = t( 'Dimensions' );\n\n\t\t// -- Width ---------------------------------------------------\n\n\t\tconst widthInput = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\twidthInput.set( {\n\t\t\tlabel: t( 'Width' ),\n\t\t\tclass: 'ck-table-form__dimensions-row__width'\n\t\t} );\n\n\t\twidthInput.fieldView.bind( 'value' ).to( this, 'width' );\n\t\twidthInput.fieldView.on( 'input', () => {\n\t\t\tthis.width = widthInput.fieldView.element!.value;\n\t\t} );\n\n\t\t// -- Operator ---------------------------------------------------\n\n\t\tconst operatorLabel = new View( locale );\n\t\toperatorLabel.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-table-form__dimension-operator'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{ text: '×' }\n\t\t\t]\n\t\t} );\n\n\t\t// -- Height ---------------------------------------------------\n\n\t\tconst heightInput = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\theightInput.set( {\n\t\t\tlabel: t( 'Height' ),\n\t\t\tclass: 'ck-table-form__dimensions-row__height'\n\t\t} );\n\n\t\theightInput.fieldView.bind( 'value' ).to( this, 'height' );\n\t\theightInput.fieldView.on( 'input', () => {\n\t\t\tthis.height = heightInput.fieldView.element!.value;\n\t\t} );\n\n\t\treturn {\n\t\t\tdimensionsLabel,\n\t\t\twidthInput,\n\t\t\toperatorLabel,\n\t\t\theightInput\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #paddingInput}.\n\t */\n\tprivate _createPaddingField(): LabeledFieldView {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\tconst paddingInput = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\tpaddingInput.set( {\n\t\t\tlabel: t( 'Padding' ),\n\t\t\tclass: 'ck-table-cell-properties-form__padding'\n\t\t} );\n\n\t\tpaddingInput.fieldView.bind( 'value' ).to( this, 'padding' );\n\t\tpaddingInput.fieldView.on( 'input', () => {\n\t\t\tthis.padding = paddingInput.fieldView.element!.value;\n\t\t} );\n\n\t\treturn paddingInput;\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #horizontalAlignmentToolbar},\n\t * * {@link #verticalAlignmentToolbar}.\n\t */\n\tprivate _createAlignmentFields() {\n\t\tconst locale = this.locale!;\n\t\tconst t = this.t!;\n\n\t\tconst alignmentLabel = new LabelView( locale );\n\n\t\tconst ALIGNMENT_ICONS = {\n\t\t\tleft: IconAlignLeft,\n\t\t\tcenter: IconAlignCenter,\n\t\t\tright: IconAlignRight,\n\t\t\tjustify: IconAlignJustify,\n\t\t\ttop: IconAlignTop,\n\t\t\tmiddle: IconAlignMiddle,\n\t\t\tbottom: IconAlignBottom\n\t\t};\n\n\t\talignmentLabel.text = t( 'Table cell text alignment' );\n\n\t\t// -- Horizontal ---------------------------------------------------\n\n\t\tconst horizontalAlignmentToolbar = new ToolbarView( locale );\n\t\tconst isContentRTL = locale.contentLanguageDirection === 'rtl';\n\n\t\thorizontalAlignmentToolbar.set( {\n\t\t\tisCompact: true,\n\t\t\trole: 'radiogroup',\n\t\t\tariaLabel: t( 'Horizontal text alignment toolbar' ),\n\t\t\tclass: 'ck-table-cell-properties-form__horizontal-alignment-toolbar'\n\t\t} );\n\n\t\tfillToolbar( {\n\t\t\tview: this,\n\t\t\ticons: ALIGNMENT_ICONS,\n\t\t\ttoolbar: horizontalAlignmentToolbar,\n\t\t\tlabels: this._horizontalAlignmentLabels,\n\t\t\tpropertyName: 'horizontalAlignment',\n\t\t\tnameToValue: name => {\n\t\t\t\t// For the RTL content, we want to swap the buttons \"align to the left\" and \"align to the right\".\n\t\t\t\tif ( isContentRTL ) {\n\t\t\t\t\tif ( name === 'left' ) {\n\t\t\t\t\t\treturn 'right';\n\t\t\t\t\t} else if ( name === 'right' ) {\n\t\t\t\t\t\treturn 'left';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn name;\n\t\t\t},\n\t\t\tdefaultValue: this.options.defaultTableCellProperties.horizontalAlignment\n\t\t} );\n\n\t\t// -- Vertical -----------------------------------------------------\n\n\t\tconst verticalAlignmentToolbar = new ToolbarView( locale );\n\n\t\tverticalAlignmentToolbar.set( {\n\t\t\tisCompact: true,\n\t\t\trole: 'radiogroup',\n\t\t\tariaLabel: t( 'Vertical text alignment toolbar' ),\n\t\t\tclass: 'ck-table-cell-properties-form__vertical-alignment-toolbar'\n\t\t} );\n\n\t\tfillToolbar( {\n\t\t\tview: this,\n\t\t\ticons: ALIGNMENT_ICONS,\n\t\t\ttoolbar: verticalAlignmentToolbar,\n\t\t\tlabels: this._verticalAlignmentLabels,\n\t\t\tpropertyName: 'verticalAlignment',\n\t\t\tdefaultValue: this.options.defaultTableCellProperties.verticalAlignment\n\t\t} );\n\n\t\treturn {\n\t\t\thorizontalAlignmentToolbar,\n\t\t\tverticalAlignmentToolbar,\n\t\t\talignmentLabel\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form controls:\n\t *\n\t * * {@link #saveButtonView},\n\t * * {@link #cancelButtonView}.\n\t */\n\tprivate _createActionButtons() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\t\tconst saveButtonView = new ButtonView( locale );\n\t\tconst cancelButtonView = new ButtonView( locale );\n\t\tconst fieldsThatShouldValidateToSave = [\n\t\t\tthis.borderWidthInput,\n\t\t\tthis.borderColorInput,\n\t\t\tthis.backgroundInput,\n\t\t\tthis.paddingInput\n\t\t];\n\n\t\tsaveButtonView.set( {\n\t\t\tlabel: t( 'Save' ),\n\t\t\tclass: 'ck-button-action',\n\t\t\ttype: 'submit',\n\t\t\twithText: true\n\t\t} );\n\n\t\tsaveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {\n\t\t\treturn errorTexts.every( errorText => !errorText );\n\t\t} );\n\n\t\tcancelButtonView.set( {\n\t\t\tlabel: t( 'Cancel' ),\n\t\t\twithText: true\n\t\t} );\n\n\t\tcancelButtonView.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn {\n\t\t\tsaveButtonView, cancelButtonView\n\t\t};\n\t}\n\n\t/**\n\t * Creates a back button view that cancels the form.\n\t */\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn backButton;\n\t}\n\n\t/**\n\t * Creates the cell type dropdown definitions.\n\t */\n\tprivate _getCellTypeDefinitions(): Collection<ListDropdownItemDefinition> {\n\t\tconst itemDefinitions: Collection<ListDropdownItemDefinition> = new Collection();\n\t\tconst labels = this._cellTypeLabels;\n\t\tconst types: Array<TableCellType> = [ 'data', 'header' ];\n\n\t\tif ( this.options.showScopedHeaderOptions ) {\n\t\t\ttypes.push( 'header-column', 'header-row' );\n\t\t}\n\n\t\tfor ( const type of types ) {\n\t\t\tconst definition: ListDropdownItemDefinition = {\n\t\t\t\ttype: 'button',\n\t\t\t\tmodel: new UIModel( {\n\t\t\t\t\t_cellTypeValue: type,\n\t\t\t\t\tlabel: labels[ type ],\n\t\t\t\t\trole: 'menuitemradio',\n\t\t\t\t\twithText: true\n\t\t\t\t} )\n\t\t\t};\n\n\t\t\tdefinition.model.bind( 'isOn' ).to( this, 'cellType', value => value === type );\n\n\t\t\titemDefinitions.add( definition );\n\t\t}\n\n\t\treturn itemDefinitions;\n\t}\n\n\t/**\n\t * Provides localized labels for {@link #horizontalAlignmentToolbar} buttons.\n\t */\n\tprivate get _horizontalAlignmentLabels(): Record<string, string> {\n\t\tconst locale = this.locale!;\n\t\tconst t = this.t!;\n\n\t\tconst left = t( 'Align cell text to the left' );\n\t\tconst center = t( 'Align cell text to the center' );\n\t\tconst right = t( 'Align cell text to the right' );\n\t\tconst justify = t( 'Justify cell text' );\n\n\t\t// Returns object with a proper order of labels.\n\t\tif ( locale.uiLanguageDirection === 'rtl' ) {\n\t\t\treturn { right, center, left, justify };\n\t\t} else {\n\t\t\treturn { left, center, right, justify };\n\t\t}\n\t}\n\n\t/**\n\t * Provides localized labels for {@link #verticalAlignmentToolbar} buttons.\n\t */\n\tprivate get _verticalAlignmentLabels(): Record<string, string> {\n\t\tconst t = this.t!;\n\n\t\treturn {\n\t\t\ttop: t( 'Align cell text to the top' ),\n\t\t\tmiddle: t( 'Align cell text to the middle' ),\n\t\t\tbottom: t( 'Align cell text to the bottom' )\n\t\t};\n\t}\n\n\t/**\n\t * Provides localized labels for {@link #cellTypeDropdown}.\n\t */\n\tprivate get _cellTypeLabels(): Partial<Record<TableCellType, string>> {\n\t\tconst t = this.t!;\n\n\t\treturn {\n\t\t\tdata: t( 'Data cell' ),\n\t\t\theader: t( 'Header cell' ),\n\t\t\t'header-column': t( 'Column header' ),\n\t\t\t'header-row': t( 'Row header' )\n\t\t};\n\t}\n}\n\nfunction isBorderStyleSet( value: string ) {\n\treturn value !== 'none';\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/**\n * @module table/utils/ui/contextualballoon\n */\n\nimport { Rect, type DomOptimalPositionOptions } from '@ckeditor/ckeditor5-utils';\nimport { BalloonPanelView, type ContextualBalloon } from '@ckeditor/ckeditor5-ui';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, ModelPosition, ModelRange } from '@ckeditor/ckeditor5-engine';\n\nimport { getSelectionAffectedTableWidget, getTableWidgetAncestor } from './widget.js';\nimport { getSelectionAffectedTable } from '../common.js';\n\nconst BALLOON_POSITIONS = /* #__PURE__ */ ( () => [\n\tBalloonPanelView.defaultPositions.northArrowSouth,\n\tBalloonPanelView.defaultPositions.northArrowSouthWest,\n\tBalloonPanelView.defaultPositions.northArrowSouthEast,\n\tBalloonPanelView.defaultPositions.southArrowNorth,\n\tBalloonPanelView.defaultPositions.southArrowNorthWest,\n\tBalloonPanelView.defaultPositions.southArrowNorthEast,\n\tBalloonPanelView.defaultPositions.viewportStickyNorth\n] )();\n\n/**\n * A helper utility that positions the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance\n * with respect to the table in the editor content, if one is selected.\n *\n * @internal\n * @param editor The editor instance.\n * @param target Either \"cell\" or \"table\". Determines the target the balloon will be attached to.\n */\nexport function repositionContextualBalloon( editor: Editor, target: string ): void {\n\tconst balloon: ContextualBalloon = editor.plugins.get( 'ContextualBalloon' );\n\tconst selection = editor.editing.view.document.selection;\n\tlet position;\n\n\tif ( target === 'cell' ) {\n\t\tif ( getTableWidgetAncestor( selection ) ) {\n\t\t\tposition = getBalloonCellPositionData( editor );\n\t\t}\n\t}\n\telse if ( getSelectionAffectedTableWidget( selection ) ) {\n\t\tposition = getBalloonTablePositionData( editor );\n\t}\n\n\tif ( position ) {\n\t\tballoon.updatePosition( position );\n\t}\n}\n\n/**\n * Returns the positioning options that control the geometry of the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n * to the selected table in the editor content.\n *\n * @param editor The editor instance.\n */\nexport function getBalloonTablePositionData( editor: Editor ): Partial<DomOptimalPositionOptions> {\n\tconst selection = editor.model.document.selection;\n\tconst modelTable = getSelectionAffectedTable( selection );\n\tconst viewTable = editor.editing.mapper.toViewElement( modelTable )!;\n\n\treturn {\n\t\ttarget: editor.editing.view.domConverter.mapViewToDom( viewTable )!,\n\t\tpositions: BALLOON_POSITIONS\n\t};\n}\n\n/**\n * Returns the positioning options that control the geometry of the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n * to the selected table cell in the editor content.\n *\n * @param editor The editor instance.\n * @internal\n */\nexport function getBalloonCellPositionData( editor: Editor ): Partial<DomOptimalPositionOptions> {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\tconst selection = editor.model.document.selection;\n\n\tif ( selection.rangeCount > 1 ) {\n\t\treturn {\n\t\t\ttarget: () => createBoundingRect( selection.getRanges(), editor ),\n\t\t\tpositions: BALLOON_POSITIONS\n\t\t};\n\t}\n\n\tconst modelTableCell = getTableCellAtPosition( selection.getFirstPosition()! );\n\tconst viewTableCell = mapper.toViewElement( modelTableCell )!;\n\n\treturn {\n\t\ttarget: domConverter.mapViewToDom( viewTableCell ),\n\t\tpositions: BALLOON_POSITIONS\n\t};\n}\n\n/**\n * Returns the first selected table cell from a multi-cell or in-cell selection.\n *\n * @param position Document position.\n */\nfunction getTableCellAtPosition( position: ModelPosition ): ModelElement {\n\tconst isTableCellSelected = position.nodeAfter && position.nodeAfter.is( 'element', 'tableCell' );\n\n\treturn isTableCellSelected ? position.nodeAfter : position.findAncestor( 'tableCell' )!;\n}\n\n/**\n * Returns bounding rectangle for given model ranges.\n *\n * @param ranges Model ranges that the bounding rect should be returned for.\n * @param editor The editor instance.\n */\nfunction createBoundingRect( ranges: Iterable<ModelRange>, editor: Editor ): Rect {\n\tconst mapper = editor.editing.mapper;\n\tconst domConverter = editor.editing.view.domConverter;\n\tconst rects = Array.from( ranges ).map( range => {\n\t\tconst modelTableCell = getTableCellAtPosition( range.start );\n\t\tconst viewTableCell = mapper.toViewElement( modelTableCell )!;\n\t\treturn new Rect( domConverter.mapViewToDom( viewTableCell )! );\n\t} );\n\n\treturn Rect.getBoundingRect( rects )!;\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/**\n * @module table/tablecellproperties/tablecellpropertiesui\n */\n\nimport { Plugin, type Editor, type Command, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { IconTableCellProperties } from '@ckeditor/ckeditor5-icons';\nimport {\n\tButtonView,\n\tclickOutsideHandler,\n\tContextualBalloon,\n\tgetLocalizedColorOptions,\n\tnormalizeColorOptions,\n\ttype View\n} from '@ckeditor/ckeditor5-ui';\nimport type { Batch } from '@ckeditor/ckeditor5-engine';\n\nimport { TableCellPropertiesView } from './ui/tablecellpropertiesview.js';\nimport {\n\tcolorFieldValidator,\n\tgetLocalizedColorErrorText,\n\tgetLocalizedLengthErrorText,\n\tdefaultColors,\n\tlengthFieldValidator,\n\tlineWidthFieldValidator\n} from '../utils/ui/table-properties.js';\nimport { debounce } from 'es-toolkit/compat';\nimport { getSelectionAffectedTableWidget, getTableWidgetAncestor } from '../utils/ui/widget.js';\nimport { getBalloonCellPositionData, repositionContextualBalloon } from '../utils/ui/contextualballoon.js';\nimport {\n\tgetNormalizedDefaultCellProperties,\n\tgetNormalizedDefaultProperties,\n\ttype NormalizedDefaultProperties\n} from '../utils/table-properties.js';\nimport type { GetCallback, ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\n\nimport { type TableCellBorderStyleCommand } from './commands/tablecellborderstylecommand.js';\n\nconst ERROR_TEXT_TIMEOUT = 500;\n\n// Map of view properties and related commands.\nconst propertyToCommandMap = {\n\tborderStyle: 'tableCellBorderStyle',\n\tborderColor: 'tableCellBorderColor',\n\tborderWidth: 'tableCellBorderWidth',\n\theight: 'tableCellHeight',\n\twidth: 'tableCellWidth',\n\tpadding: 'tableCellPadding',\n\tbackgroundColor: 'tableCellBackgroundColor',\n\thorizontalAlignment: 'tableCellHorizontalAlignment',\n\tverticalAlignment: 'tableCellVerticalAlignment',\n\tcellType: 'tableCellType'\n} as const;\n\n/**\n * The table cell properties UI plugin. It introduces the `'tableCellProperties'` button\n * that opens a form allowing to specify the visual styling of a table cell.\n *\n * It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */\nexport class TableCellPropertiesUI extends Plugin {\n\t/**\n\t * The default table cell properties.\n\t */\n\tprivate _defaultContentTableCellProperties!: NormalizedDefaultProperties;\n\n\t/**\n\t * The default layout table cell properties.\n\t */\n\tprivate _defaultLayoutTableCellProperties!: NormalizedDefaultProperties;\n\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon?: ContextualBalloon;\n\n\t/**\n\t * The cell properties form view displayed inside the balloon.\n\t */\n\tpublic view?: TableCellPropertiesView | null;\n\n\t/**\n\t * The cell properties form view displayed inside the balloon (content table).\n\t */\n\tprivate _viewWithContentTableDefaults?: TableCellPropertiesView | null;\n\n\t/**\n\t * The cell properties form view displayed inside the balloon (layout table).\n\t */\n\tprivate _viewWithLayoutTableDefaults?: TableCellPropertiesView | null;\n\n\t/**\n\t * The batch used to undo all changes made by the form (which are live, as the user types)\n\t * when \"Cancel\" was pressed. Each time the view is shown, a new batch is created.\n\t */\n\tprivate _undoStepBatch?: Batch;\n\n\t/**\n\t * Flag used to indicate whether view is ready to execute update commands\n\t * (it finished loading initial data).\n\t */\n\tprivate _isReady?: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableCellPropertiesUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'table.tableCellProperties', {\n\t\t\tborderColors: defaultColors,\n\t\t\tbackgroundColors: defaultColors\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tthis._defaultContentTableCellProperties = getNormalizedDefaultCellProperties(\n\t\t\teditor.config.get( 'table.tableCellProperties.defaultProperties' )!,\n\t\t\t{\n\t\t\t\tincludeVerticalAlignmentProperty: true,\n\t\t\t\tincludeHorizontalAlignmentProperty: true,\n\t\t\t\tincludePaddingProperty: true,\n\t\t\t\tisRightToLeftContent: editor.locale.contentLanguageDirection === 'rtl'\n\t\t\t}\n\t\t);\n\t\tthis._defaultLayoutTableCellProperties = getNormalizedDefaultProperties( undefined, {\n\t\t\tincludeVerticalAlignmentProperty: true,\n\t\t\tincludeHorizontalAlignmentProperty: true,\n\t\t\tisRightToLeftContent: editor.locale.contentLanguageDirection === 'rtl'\n\t\t} );\n\n\t\tthis._balloon = editor.plugins.get( ContextualBalloon );\n\t\tthis.view = null;\n\t\tthis._isReady = false;\n\n\t\teditor.ui.componentFactory.add( 'tableCellProperties', locale => {\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: t( 'Cell properties' ),\n\t\t\t\ticon: IconTableCellProperties,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tthis.listenTo( view, 'execute', () => this._showView() );\n\n\t\t\tconst commands = (\n\t\t\t\tObject\n\t\t\t\t\t.values( propertyToCommandMap )\n\t\t\t\t\t.map( commandName => editor.commands.get( commandName ) )\n\t\t\t\t\t.filter( val => !!val )\n\t\t\t) as Array<Command>;\n\n\t\t\tview.bind( 'isEnabled' ).toMany( commands, 'isEnabled', ( ...areEnabled ) => (\n\t\t\t\tareEnabled.some( isCommandEnabled => isCommandEnabled )\n\t\t\t) );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1341.\n\t\tif ( this.view ) {\n\t\t\tthis.view.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView} instance.\n\t *\n\t * @returns The cell properties form view instance.\n\t */\n\tprivate _createPropertiesView( defaultTableCellProperties: NormalizedDefaultProperties ) {\n\t\tconst editor = this.editor;\n\t\tconst config = editor.config.get( 'table.tableCellProperties' )!;\n\t\tconst scopedHeaders = !!editor.config.get( 'table.tableCellProperties.scopedHeaders' );\n\t\tconst borderColorsConfig = normalizeColorOptions( config.borderColors! );\n\t\tconst localizedBorderColors = getLocalizedColorOptions( editor.locale, borderColorsConfig );\n\t\tconst backgroundColorsConfig = normalizeColorOptions( config.backgroundColors! );\n\t\tconst localizedBackgroundColors = getLocalizedColorOptions( editor.locale, backgroundColorsConfig );\n\t\tconst hasColorPicker = config.colorPicker !== false;\n\n\t\tconst view = new TableCellPropertiesView( editor.locale, {\n\t\t\tborderColors: localizedBorderColors,\n\t\t\tbackgroundColors: localizedBackgroundColors,\n\t\t\tdefaultTableCellProperties,\n\t\t\tcolorPickerConfig: hasColorPicker ? ( config.colorPicker || {} ) : false,\n\t\t\tshowScopedHeaderOptions: scopedHeaders\n\t\t} );\n\n\t\tconst t = editor.t;\n\n\t\t// Render the view so its #element is available for the clickOutsideHandler.\n\t\tview.render();\n\n\t\tthis.listenTo( view, 'submit', () => {\n\t\t\tthis._hideView();\n\t\t} );\n\n\t\tthis.listenTo( view, 'cancel', () => {\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/6180\n\t\t\tif ( this._undoStepBatch!.operations.length ) {\n\t\t\t\teditor.execute( 'undo', this._undoStepBatch );\n\t\t\t}\n\n\t\t\tthis._hideView();\n\t\t} );\n\n\t\t// Close the balloon on Esc key press.\n\t\tview.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis._hideView();\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Close on click outside of balloon panel element.\n\t\tclickOutsideHandler( {\n\t\t\temitter: view,\n\t\t\tactivator: () => this._isViewInBalloon,\n\t\t\tcontextElements: [ this._balloon!.view.element! ],\n\t\t\tcallback: () => this._hideView()\n\t\t} );\n\n\t\tconst colorErrorText = getLocalizedColorErrorText( t );\n\t\tconst lengthErrorText = getLocalizedLengthErrorText( t );\n\n\t\t// Create the \"UI -> editor data\" binding.\n\t\t// These listeners update the editor data (via table commands) when any observable\n\t\t// property of the view has changed. They also validate the value and display errors in the UI\n\t\t// when necessary. This makes the view live, which means the changes are\n\t\t// visible in the editing as soon as the user types or changes fields' values.\n\t\tview.on<ObservableChangeEvent<string>>(\n\t\t\t'change:borderStyle',\n\t\t\tthis._getPropertyChangeCallback( 'tableCellBorderStyle' )\n\t\t);\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:borderColor', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.borderColorInput,\n\t\t\tcommandName: 'tableCellBorderColor',\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:borderWidth', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.borderWidthInput,\n\t\t\tcommandName: 'tableCellBorderWidth',\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lineWidthFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:padding', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.paddingInput,\n\t\t\tcommandName: 'tableCellPadding',\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:width', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.widthInput,\n\t\t\tcommandName: 'tableCellWidth',\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:height', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.heightInput,\n\t\t\tcommandName: 'tableCellHeight',\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:backgroundColor', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.backgroundInput,\n\t\t\tcommandName: 'tableCellBackgroundColor',\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>(\n\t\t\t'change:horizontalAlignment',\n\t\t\tthis._getPropertyChangeCallback( 'tableCellHorizontalAlignment' )\n\t\t);\n\t\tview.on<ObservableChangeEvent<string>>(\n\t\t\t'change:verticalAlignment',\n\t\t\tthis._getPropertyChangeCallback( 'tableCellVerticalAlignment' )\n\t\t);\n\n\t\tconst cellTypeCommand = editor.commands.get( 'tableCellType' );\n\n\t\tif ( cellTypeCommand ) {\n\t\t\tview.cellTypeDropdown.bind( 'isEnabled' ).to( cellTypeCommand, 'isEnabled' );\n\t\t\tview.on<ObservableChangeEvent<string>>( 'change:cellType', this._getPropertyChangeCallback( 'tableCellType' ) );\n\t\t}\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * In this method the \"editor data -> UI\" binding is happening.\n\t *\n\t * When executed, this method obtains selected cell property values from various table commands\n\t * and passes them to the {@link #view}.\n\t *\n\t * This way, the UI stays up–to–date with the editor data.\n\t */\n\tprivate _fillViewFormFromCommandValues() {\n\t\tconst commands = this.editor.commands;\n\t\tconst borderStyleCommand: TableCellBorderStyleCommand = commands.get( 'tableCellBorderStyle' )!;\n\n\t\tObject\n\t\t\t.entries( propertyToCommandMap )\n\t\t\t.flatMap( ( [ property, commandName ] ) => {\n\t\t\t\tconst effectiveCommandName = property === 'width' ? this._getWidthCommandName() : commandName;\n\t\t\t\tconst command = commands.get( effectiveCommandName );\n\n\t\t\t\tif ( !command ) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst propertyKey = property as keyof typeof propertyToCommandMap;\n\t\t\t\tlet defaultValue: string;\n\n\t\t\t\tif ( propertyKey === 'cellType' ) {\n\t\t\t\t\tdefaultValue = '';\n\t\t\t\t} else {\n\t\t\t\t\tdefaultValue = this.view === this._viewWithContentTableDefaults ?\n\t\t\t\t\t\tthis._defaultContentTableCellProperties[ propertyKey ] || '' :\n\t\t\t\t\t\tthis._defaultLayoutTableCellProperties[ propertyKey ] || '';\n\t\t\t\t}\n\n\t\t\t\tconst entry = [\n\t\t\t\t\tproperty as keyof typeof propertyToCommandMap,\n\t\t\t\t\t( command.value as string ) || defaultValue\n\t\t\t\t] as const;\n\n\t\t\t\treturn [ entry ];\n\t\t\t} )\n\t\t\t.forEach( ( [ property, value ] ) => {\n\t\t\t\t// Do not set the `border-color` and `border-width` fields if `border-style:none`.\n\t\t\t\tif ( ( property === 'borderColor' || property === 'borderWidth' ) && borderStyleCommand.value === 'none' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.view!.set( property, value );\n\t\t\t} );\n\n\t\tthis._isReady = true;\n\t}\n\n\t/**\n\t * Shows the {@link #view} in the {@link #_balloon}.\n\t *\n\t * **Note**: Each time a view is shown, a new {@link #_undoStepBatch} is created. It contains\n\t * all changes made to the document when the view is visible, allowing a single undo step\n\t * for all of them.\n\t */\n\tprotected _showView(): void {\n\t\tconst editor = this.editor;\n\n\t\tconst viewTable = getSelectionAffectedTableWidget( editor.editing.view.document.selection );\n\t\tconst modelTable = viewTable && editor.editing.mapper.toModelElement( viewTable );\n\t\tconst useDefaults = !modelTable || modelTable.getAttribute( 'tableType' ) !== 'layout';\n\n\t\tif ( useDefaults && !this._viewWithContentTableDefaults ) {\n\t\t\tthis._viewWithContentTableDefaults = this._createPropertiesView( this._defaultContentTableCellProperties );\n\t\t} else if ( !useDefaults && !this._viewWithLayoutTableDefaults ) {\n\t\t\tthis._viewWithLayoutTableDefaults = this._createPropertiesView( this._defaultLayoutTableCellProperties );\n\t\t}\n\n\t\tthis.view = useDefaults ? this._viewWithContentTableDefaults! : this._viewWithLayoutTableDefaults!;\n\n\t\tthis.listenTo( editor.ui, 'update', () => {\n\t\t\tthis._updateView();\n\t\t} );\n\n\t\t// Update the view with the model values.\n\t\tthis._fillViewFormFromCommandValues();\n\n\t\tthis._balloon!.add( {\n\t\t\tview: this.view,\n\t\t\tposition: getBalloonCellPositionData( editor )\n\t\t} );\n\n\t\t// Create a new batch. Clicking \"Cancel\" will undo this batch.\n\t\tthis._undoStepBatch = editor.model.createBatch();\n\n\t\t// Basic a11y.\n\t\tthis.view.focus();\n\t}\n\n\t/**\n\t * Removes the {@link #view} from the {@link #_balloon}.\n\t */\n\tprotected _hideView(): void {\n\t\tconst editor = this.editor;\n\n\t\tthis.stopListening( editor.ui, 'update' );\n\n\t\tthis._isReady = false;\n\n\t\t// Blur any input element before removing it from DOM to prevent issues in some browsers.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1501.\n\t\tthis.view!.saveButtonView.focus();\n\n\t\tthis._balloon!.remove( this.view! );\n\n\t\t// Make sure the focus is not lost in the process by putting it directly\n\t\t// into the editing view.\n\t\tthis.editor.editing.view.focus();\n\t}\n\n\t/**\n\t * Repositions the {@link #_balloon} or hides the {@link #view} if a table cell is no longer selected.\n\t */\n\tprotected _updateView(): void {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\n\t\tif ( !getTableWidgetAncestor( viewDocument.selection ) ) {\n\t\t\tthis._hideView();\n\t\t} else if ( this._isViewVisible ) {\n\t\t\trepositionContextualBalloon( editor, 'cell' );\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #view} is visible in the {@link #_balloon}.\n\t */\n\tprivate get _isViewVisible() {\n\t\treturn !!this.view && this._balloon!.visibleView === this.view;\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #view} is in the {@link #_balloon}.\n\t */\n\tprivate get _isViewInBalloon() {\n\t\treturn !!this.view && this._balloon!.hasView( this.view );\n\t}\n\n\t/**\n\t * Creates a callback that when executed upon the {@link #view view's} property change\n\t * executes a related editor command with the new property value.\n\t *\n\t * @param commandName The default value of the command.\n\t */\n\tprivate _getPropertyChangeCallback(\n\t\tcommandName: 'tableCellBorderStyle' | 'tableCellHorizontalAlignment' | 'tableCellVerticalAlignment' | 'tableCellType'\n\t): GetCallback<ObservableChangeEvent<string>> {\n\t\treturn ( evt, propertyName, newValue ) => {\n\t\t\tif ( !this._isReady ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.editor.execute( commandName, {\n\t\t\t\tvalue: newValue,\n\t\t\t\tbatch: this._undoStepBatch\n\t\t\t} );\n\t\t};\n\t}\n\n\t/**\n\t * Creates a callback that when executed upon the {@link #view view's} property change:\n\t * * Executes a related editor command with the new property value if the value is valid,\n\t * * Or sets the error text next to the invalid field, if the value did not pass the validation.\n\t */\n\tprivate _getValidatedPropertyChangeCallback(\n\t\toptions: {\n\t\t\tcommandName: `tableCell${ 'BorderColor' | 'BorderWidth' | 'Padding' | 'Width' | 'Height' | 'BackgroundColor' }`;\n\t\t\tviewField: View & { errorText?: string | null };\n\t\t\tvalidator: ( arg0: string ) => boolean;\n\t\t\terrorText: string;\n\t\t}\n\t): GetCallback<ObservableChangeEvent<string>> {\n\t\tconst { commandName, viewField, validator, errorText } = options;\n\t\tconst setErrorTextDebounced = debounce( () => {\n\t\t\tviewField.errorText = errorText;\n\t\t}, ERROR_TEXT_TIMEOUT );\n\n\t\treturn ( evt, propertyName, newValue ) => {\n\t\t\tsetErrorTextDebounced.cancel();\n\t\t\t// Do not execute the command on initial call (opening the table properties view).\n\t\t\tif ( !this._isReady ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( validator( newValue ) ) {\n\t\t\t\tconst executedCommandName = commandName === 'tableCellWidth' ? this._getWidthCommandName() : commandName;\n\n\t\t\t\tthis.editor.execute( executedCommandName, {\n\t\t\t\t\tvalue: newValue,\n\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t} );\n\n\t\t\t\tviewField.errorText = null;\n\t\t\t} else {\n\t\t\t\tsetErrorTextDebounced();\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Returns the command that drives the width field. When the table is resized and the selection maps onto a single\n\t * column, the width field is bound to (and executes) the `'tableColumnWidth'` command, so the width applies to the\n\t * column instead of being set as a per-cell width that the column group would shadow. Otherwise it falls back to\n\t * the `'tableCellWidth'` command.\n\t */\n\tprivate _getWidthCommandName(): 'tableCellWidth' | 'tableColumnWidth' {\n\t\tconst columnWidthCommand = this.editor.commands.get( 'tableColumnWidth' );\n\n\t\treturn columnWidthCommand && columnWidthCommand.isEnabled ? 'tableColumnWidth' : 'tableCellWidth';\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellpropertycommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, Batch, ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { type TableUtils } from '../../tableutils.js';\nimport { getSelectionAffectedTable } from '../../utils/common.js';\n\n/**\n * The table cell attribute command.\n *\n * The command is a base command for other table cell property commands.\n */\nexport class TableCellPropertyCommand extends Command {\n\t/**\n\t * The attribute that will be set by the command.\n\t */\n\tpublic readonly attributeName: string;\n\n\t/**\n\t * The default value for the attribute.\n\t *\n\t * @readonly\n\t */\n\tprotected _defaultValue: string | undefined;\n\n\t/**\n\t * The default value for the attribute for the content table.\n\t */\n\tprivate readonly _defaultContentTableValue: string | undefined;\n\n\t/**\n\t * The default value for the attribute for the layout table.\n\t */\n\tprivate readonly _defaultLayoutTableValue: string | undefined;\n\n\t/**\n\t * Creates a new `TableCellPropertyCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param attributeName Table cell attribute name.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, attributeName: string, defaultValue: string ) {\n\t\tsuper( editor );\n\n\t\tthis.attributeName = attributeName;\n\t\tthis._defaultContentTableValue = defaultValue;\n\n\t\t// Hardcoded defaults for layout table.\n\t\tswitch ( attributeName ) {\n\t\t\tcase 'tableCellType':\n\t\t\t\tthis._defaultLayoutTableValue = 'data';\n\t\t\t\tbreak;\n\n\t\t\tcase 'tableCellBorderStyle':\n\t\t\t\tthis._defaultLayoutTableValue = 'none';\n\t\t\t\tbreak;\n\n\t\t\tcase 'tableCellHorizontalAlignment':\n\t\t\t\tthis._defaultLayoutTableValue = 'left';\n\t\t\t\tbreak;\n\n\t\t\tcase 'tableCellVerticalAlignment':\n\t\t\t\tthis._defaultLayoutTableValue = 'middle';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthis._defaultLayoutTableValue = undefined;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\n\t\tconst selectedTableCells = tableUtils.getSelectionAffectedTableCells( selection );\n\t\tconst table = getSelectionAffectedTable( selection );\n\n\t\tthis._defaultValue = !table || table.getAttribute( 'tableType' ) !== 'layout' ?\n\t\t\tthis._defaultContentTableValue :\n\t\t\tthis._defaultLayoutTableValue;\n\n\t\tthis.isEnabled = !!selectedTableCells.length;\n\t\tthis.value = this._getSingleValue( selectedTableCells );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.value If set, the command will set the attribute on selected table cells.\n\t * If it is not set, the command will remove the attribute from the selected table cells.\n\t * @param options.batch Pass the model batch instance to the command to aggregate changes,\n\t * for example to allow a single undo step for multiple executions.\n\t */\n\tpublic override execute( options: { value?: string | number; batch?: Batch } = {} ): void {\n\t\tconst { value, batch } = options;\n\t\tconst model = this.editor.model;\n\t\tconst tableUtils: TableUtils = this.editor.plugins.get( 'TableUtils' );\n\t\tconst tableCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst valueToSet = this._getValueToSet( value );\n\n\t\tmodel.enqueueChange( batch, writer => {\n\t\t\tif ( valueToSet ) {\n\t\t\t\ttableCells.forEach( tableCell => writer.setAttribute( this.attributeName, valueToSet, tableCell ) );\n\t\t\t} else {\n\t\t\t\ttableCells.forEach( tableCell => writer.removeAttribute( this.attributeName, tableCell ) );\n\t\t\t}\n\n\t\t\tthis.fire<TableCellPropertyCommandAfterExecuteEvent>( 'afterExecute', {\n\t\t\t\twriter,\n\t\t\t\ttableCells,\n\t\t\t\tvalueToSet\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the attribute value for a table cell.\n\t */\n\tprotected _getAttribute( tableCell: ModelElement | undefined ): unknown {\n\t\tif ( !tableCell ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = tableCell.getAttribute( this.attributeName );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Returns the proper model value. It can be used to add a default unit to numeric values.\n\t */\n\tprotected _getValueToSet( value: string | number | undefined ): unknown {\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Returns a single value for all selected table cells. If the value is the same for all cells,\n\t * it will be returned (`undefined` otherwise).\n\t */\n\tprivate _getSingleValue( tableCells: Array<ModelElement> ) {\n\t\tconst firstCellValue = this._getAttribute( tableCells[ 0 ] );\n\n\t\tconst everyCellHasAttribute = tableCells.every( tableCells => this._getAttribute( tableCells ) === firstCellValue );\n\n\t\treturn everyCellHasAttribute ? firstCellValue : undefined;\n\t}\n}\n\n/**\n * Fired after the {@link module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommand}\n *\n * @eventName ~TableCellPropertyCommand#afterExecute\n */\nexport type TableCellPropertyCommandAfterExecuteEvent = {\n\tname: 'afterExecute';\n\targs: [ data: TableCellPropertyCommandAfterExecuteEventData ];\n};\n\n/**\n * The data of the\n * {@link module:table/tablecellproperties/commands/tablecellpropertycommand~TableCellPropertyCommandAfterExecuteEvent} event.\n */\nexport type TableCellPropertyCommandAfterExecuteEventData = {\n\twriter: ModelWriter;\n\ttableCells: Array<ModelElement>;\n\tvalueToSet: unknown;\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/**\n * @module table/tablecellwidth/commands/tablecellwidthcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TableCellPropertyCommand } from '../../tablecellproperties/commands/tablecellpropertycommand.js';\nimport { addDefaultUnitToNumericValue } from '../../utils/table-properties.js';\n\n/**\n * The table cell width command.\n *\n * The command is registered by the {@link module:table/tablecellwidth/tablecellwidthediting~TableCellWidthEditing} as\n * the `'tableCellWidth'` editor command.\n *\n * To change the width of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellWidth', {\n *   value: '50px'\n * } );\n * ```\n *\n * **Note**: This command adds a default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellWidth', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `width` attribute to `'50px'` in the model.\n */\nexport class TableCellWidthCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellWidth', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override _getValueToSet( value: string | number | undefined ): unknown {\n\t\tvalue = addDefaultUnitToNumericValue( value, 'px' );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tablecellwidth/tablecellwidthediting\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { TableEditing } from './../tableediting.js';\nimport { TableCellWidthCommand } from './commands/tablecellwidthcommand.js';\nimport { getNormalizedDefaultCellProperties } from '../utils/table-properties.js';\nimport { enableProperty } from '../utils/common.js';\n\n/**\n * The table cell width editing feature.\n *\n * Introduces `tableCellWidth` table cell model attribute alongside with its converters\n * and a command.\n */\nexport class TableCellWidthEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableCellWidthEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableEditing ]> {\n\t\treturn [ TableEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\tconst defaultTableCellProperties = getNormalizedDefaultCellProperties(\n\t\t\teditor.config.get( 'table.tableCellProperties.defaultProperties' )!\n\t\t);\n\n\t\tenableProperty( editor.model.schema, editor.conversion, {\n\t\t\tmodelAttribute: 'tableCellWidth',\n\t\t\tstyleName: 'width',\n\t\t\tattributeName: 'width',\n\t\t\tattributeType: 'length',\n\t\t\tdefaultValue: defaultTableCellProperties.width\n\t\t} );\n\n\t\teditor.commands.add( 'tableCellWidth', new TableCellWidthCommand( editor, defaultTableCellProperties.width ) );\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellpaddingcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\nimport { addDefaultUnitToNumericValue, getSingleValue } from '../../utils/table-properties.js';\n\n/**\n * The table cell padding command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellPadding'` editor command.\n *\n * To change the padding of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellPadding', {\n *   value: '5px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellPadding', {\n *   value: '5'\n * } );\n * ```\n *\n * will set the `padding` attribute to `'5px'` in the model.\n */\nexport class TableCellPaddingCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellPaddingCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellPadding', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getAttribute( tableCell: ModelElement ): unknown {\n\t\tif ( !tableCell ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getSingleValue( tableCell.getAttribute( this.attributeName ) as string );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValueToSet( value: string | number | undefined ): unknown {\n\t\tconst newValue = addDefaultUnitToNumericValue( value, 'px' );\n\n\t\tif ( newValue === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn newValue;\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellheightcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\nimport { addDefaultUnitToNumericValue } from '../../utils/table-properties.js';\n\n/**\n * The table cell height command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellHeight'` editor command.\n *\n * To change the height of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellHeight', {\n *   value: '50px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellHeight', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `height` attribute to `'50px'` in the model.\n */\nexport class TableCellHeightCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellHeightCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellHeight', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValueToSet( value: string | number | undefined ): unknown {\n\t\tconst newValue = addDefaultUnitToNumericValue( value, 'px' );\n\n\t\tif ( newValue === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn newValue;\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellbackgroundcolorcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\n\n/**\n * The table cell background color command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBackgroundColor'` editor command.\n *\n * To change the background color of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBackgroundColor', {\n *   value: '#f00'\n * } );\n * ```\n */\nexport class TableCellBackgroundColorCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellBackgroundColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellBackgroundColor', defaultValue );\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellverticalalignmentcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\n\n/**\n * The table cell vertical alignment command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellVerticalAlignment'` editor command.\n *\n * To change the vertical text alignment of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellVerticalAlignment', {\n *   value: 'top'\n * } );\n * ```\n *\n * The following values, corresponding to the\n * [`vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align), are allowed:\n *\n * * `'top'`\n * * `'bottom'`\n *\n * The `'middle'` value is the default one so there is no need to set it.\n */\nexport class TableCellVerticalAlignmentCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellVerticalAlignmentCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value for the \"alignment\" attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellVerticalAlignment', defaultValue );\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellhorizontalalignmentcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\n\n/**\n * The table cell horizontal alignment command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellHorizontalAlignment'` editor command.\n *\n * To change the horizontal text alignment of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellHorizontalAlignment', {\n *  value: 'right'\n * } );\n * ```\n */\nexport class TableCellHorizontalAlignmentCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellHorizontalAlignmentCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value for the \"alignment\" attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellHorizontalAlignment', defaultValue );\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellborderstylecommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\nimport { getSingleValue } from '../../utils/table-properties.js';\n\n/**\n * The table cell border style command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBorderStyle'` editor command.\n *\n * To change the border style of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBorderStyle', {\n *   value: 'dashed'\n * } );\n * ```\n */\nexport class TableCellBorderStyleCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellBorderStyleCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellBorderStyle', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getAttribute( tableCell: ModelElement ): unknown {\n\t\tif ( !tableCell ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getSingleValue( tableCell.getAttribute( this.attributeName ) as string | undefined );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellbordercolorcommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\nimport { getSingleValue } from '../../utils/table-properties.js';\n\n/**\n * The table cell border color command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBorderColor'` editor command.\n *\n * To change the border color of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBorderColor', {\n *   value: '#f00'\n * } );\n * ```\n */\nexport class TableCellBorderColorCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellBorderColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellBorderColor', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getAttribute( tableCell: ModelElement ): unknown {\n\t\tif ( !tableCell ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getSingleValue( tableCell.getAttribute( this.attributeName ) as string | undefined );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecellborderwidthcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\n\nimport { TableCellPropertyCommand } from './tablecellpropertycommand.js';\nimport { addDefaultUnitToNumericValue, getSingleValue } from '../../utils/table-properties.js';\n\n/**\n * The table cell border width command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBorderWidth'` editor command.\n *\n * To change the border width of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBorderWidth', {\n *   value: '5px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellBorderWidth', {\n *   value: '5'\n * } );\n * ```\n *\n * will set the `borderWidth` attribute to `'5px'` in the model.\n */\nexport class TableCellBorderWidthCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellBorderWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableCellBorderWidth', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getAttribute( tableCell: ModelElement ): unknown {\n\t\tif ( !tableCell ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getSingleValue( tableCell.getAttribute( this.attributeName ) as string );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValueToSet( value: string | number | undefined ): unknown {\n\t\tconst newValue = addDefaultUnitToNumericValue( value, 'px' );\n\n\t\tif ( newValue === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn newValue;\n\t}\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/**\n * @module table/tablecellproperties/commands/tablecelltypecommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport type { ModelElement, ModelWriter } from '@ckeditor/ckeditor5-engine';\n\nimport { TableUtils } from '../../tableutils.js';\nimport {\n\tTableCellPropertyCommand,\n\ttype TableCellPropertyCommandAfterExecuteEvent\n} from './tablecellpropertycommand.js';\n\nimport { groupCellsByTable, getSelectionAffectedTable } from '../../utils/common.js';\nimport { TableWalker } from '../../tablewalker.js';\nimport { isTableHeaderCellType, type TableCellType } from '../tablecellpropertiesutils.js';\n\n/**\n * The table cell type command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellType'` editor command.\n *\n * To change the type of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellType', {\n *   value: 'header'\n * } );\n * ```\n *\n * The `value` can be either `'header'` or `'data'`.\n * It'll return `undefined` if multiple types are selected.\n */\nexport class TableCellTypeCommand extends TableCellPropertyCommand {\n\t/**\n\t * Creates a new `TableCellTypeCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor, 'tableCellType', 'data' );\n\n\t\tthis.on<TableCellPropertyCommandAfterExecuteEvent>( 'afterExecute', ( _, data ) => {\n\t\t\tconst { writer, tableCells } = data;\n\t\t\tconst tableUtils = this.editor.plugins.get( TableUtils );\n\t\t\tconst tablesMap = groupCellsByTable( tableCells );\n\n\t\t\tupdateTablesHeadingAttributes( tableUtils, writer, tablesMap.keys() );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tsuper.refresh();\n\n\t\tconst table = getSelectionAffectedTable( this.editor.model.document.selection );\n\n\t\tif ( this.isEnabled && table && table.getAttribute( 'tableType' ) === 'layout' ) {\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the attribute value for a table cell.\n\t */\n\tprotected override _getAttribute( tableCell: ModelElement | undefined ): unknown {\n\t\treturn tableCell?.getAttribute( this.attributeName ) || 'data';\n\t}\n}\n\n/**\n * Updates the `headingRows` and `headingColumns` attributes of the given tables\n * based on the `tableCellType` of their cells.\n */\nexport function updateTablesHeadingAttributes(\n\ttableUtils: TableUtils,\n\twriter: ModelWriter,\n\ttables: Iterable<ModelElement>\n): boolean {\n\tlet changed = false;\n\n\tfor ( const table of tables ) {\n\t\tlet headingRows = table.getAttribute( 'headingRows' ) as number || 0;\n\t\tlet headingColumns = table.getAttribute( 'headingColumns' ) as number || 0;\n\n\t\tconst footerRows = table.getAttribute( 'footerRows' ) as number || 0;\n\t\tconst footerIndex = tableUtils.getRows( table ) - footerRows;\n\n\t\t// Prioritize the dimension that is already larger to prevent the other dimension from\n\t\t// aggressively consuming \"orphaned\" header cells. In other words, if table has three\n\t\t// heading columns (which fills entire table), we should not count all rows as heading rows.\n\t\t// User might later add column to the right which should not be heading.\n\t\t//\n\t\t// The other example, in a 2x2 table where all cells are headers (e.g. due to concurrent edits),\n\t\t// if headingColumns=0 and headingRows=0 (but all cells are headers):\n\t\t// - Processing rows first would expand headingRows to 2 (covering all cells), leaving headingColumns at 0.\n\t\t// - Processing columns first expands headingColumns to 2, leaving headingRows at 0.\n\t\t//\n\t\t// It should be good enough to resolve conflicts in most cases.\n\t\tconst processColumnsFirst = headingColumns > headingRows;\n\n\t\tif ( processColumnsFirst ) {\n\t\t\tconst newHeadingColumns = getAdjustedHeadingSectionSize( tableUtils, table, 'column', headingColumns, headingRows );\n\n\t\t\tif ( newHeadingColumns !== headingColumns ) {\n\t\t\t\ttableUtils.setHeadingColumnsCount( writer, table, newHeadingColumns, {\n\t\t\t\t\tupdateCellType: false\n\t\t\t\t} );\n\n\t\t\t\theadingColumns = newHeadingColumns;\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\n\t\tlet newHeadingRows = getAdjustedHeadingSectionSize( tableUtils, table, 'row', headingRows, headingColumns );\n\n\t\t// Ensure that heading rows do not overlap with footer rows.\n\t\tif ( footerRows > 0 ) {\n\t\t\tnewHeadingRows = Math.min( newHeadingRows, footerIndex );\n\t\t}\n\n\t\tif ( newHeadingRows !== headingRows ) {\n\t\t\ttableUtils.setHeadingRowsCount( writer, table, newHeadingRows, {\n\t\t\t\tupdateCellType: false\n\t\t\t} );\n\n\t\t\theadingRows = newHeadingRows;\n\t\t\tchanged = true;\n\t\t}\n\n\t\tif ( !processColumnsFirst ) {\n\t\t\tconst newHeadingColumns = getAdjustedHeadingSectionSize( tableUtils, table, 'column', headingColumns, headingRows );\n\n\t\t\tif ( newHeadingColumns !== headingColumns ) {\n\t\t\t\ttableUtils.setHeadingColumnsCount( writer, table, newHeadingColumns, {\n\t\t\t\t\tupdateCellType: false\n\t\t\t\t} );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn changed;\n}\n\n/**\n * Calculates the adjusted size of a heading section (rows or columns).\n *\n * The algorithm iterates through rows (or columns) to determine if they should be part of the heading section.\n * A row/column is included if:\n * 1. All its cells are of type 'header'.\n * 2. AND it contains at least one header cell that is NOT already covered by the perpendicular heading section.\n *\n * This check prevents the algorithm from aggressively expanding the heading section when cells are already\n * headers due to the other dimension.\n *\n * Consider a 2x2 table where all cells are headers:\n *\n * ```\n *    C0  C1\n *   +---+---+\n * R0| H | H |\n *   +---+---+\n * R1| H | H |\n *   +---+---+\n * ```\n *\n * If `headingColumns=2`, both C0 and C1 are heading columns.\n * If we want `headingRows=1` (only R0), the algorithm must NOT include R1, even though R1 consists of header cells.\n * R1's cells are headers because of C0 and C1.\n *\n * Without this check, the algorithm would see that R1 is all headers and force `headingRows` to 2.\n * This would prevent the user from reducing `headingRows` from 2 to 1 without converting R1 cells to 'data'\n * (which would incorrectly break C0 and C1).\n */\nfunction getAdjustedHeadingSectionSize(\n\ttableUtils: TableUtils,\n\ttable: ModelElement,\n\tmode: 'row' | 'column',\n\tcurrentSize: number,\n\tperpendicularHeadingSize: number\n): number {\n\tconst totalRowsOrColumns = mode === 'row' ? tableUtils.getRows( table ) : tableUtils.getColumns( table );\n\tlet size = currentSize;\n\n\t// Iterate through each row/column to check if all cells are headers.\n\tfor ( let currentIndex = 0; currentIndex < totalRowsOrColumns; currentIndex++ ) {\n\t\tconst walker = new TableWalker( table, { [ mode ]: currentIndex } );\n\n\t\tlet allCellsAreHeaders = true;\n\t\tlet hasHeaderOutsidePerpendicularSection = false;\n\n\t\t// Check each cell in the current row/column.\n\t\tfor ( const { cell, row, column } of walker ) {\n\t\t\t// If we find a non-header cell, this row/column can't be part of the heading section.\n\t\t\tif ( !isTableHeaderCellType( cell.getAttribute( 'tableCellType' ) as TableCellType ) ) {\n\t\t\t\tallCellsAreHeaders = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Check if this header cell extends beyond the perpendicular heading section.\n\t\t\t// E.g., when checking rows, see if the cell extends beyond headingColumns.\n\t\t\tconst perpendicularIndex = mode === 'row' ? column : row;\n\n\t\t\tif ( perpendicularIndex >= perpendicularHeadingSize ) {\n\t\t\t\thasHeaderOutsidePerpendicularSection = true;\n\t\t\t}\n\t\t}\n\n\t\t// If not all cells are headers, we can't extend the heading section any further.\n\t\tif ( !allCellsAreHeaders ) {\n\t\t\t// The section cannot extend beyond the last valid header row/column.\n\t\t\treturn Math.min( size, currentIndex );\n\t\t}\n\n\t\t// If there's a header extending beyond the perpendicular section,\n\t\t// we must include this row/column in the heading section.\n\t\tif ( hasHeaderOutsidePerpendicularSection ) {\n\t\t\tsize = Math.max( size, currentIndex + 1 );\n\t\t}\n\t}\n\n\treturn Math.min( size, totalRowsOrColumns );\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/**\n * @module table/tablecellproperties/tablecellpropertiesediting\n */\n\nimport { priorities } from '@ckeditor/ckeditor5-utils';\nimport { type Editor, Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\tMatcher,\n\taddBorderStylesRules,\n\taddPaddingStylesRules,\n\taddBackgroundStylesRules,\n\ttype ModelSchema,\n\ttype Conversion,\n\ttype ViewElement,\n\ttype UpcastConversionApi,\n\ttype UpcastConversionData,\n\ttype UpcastElementEvent,\n\ttype ModelElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport {\n\tdowncastAttributeToStyle,\n\tgetDefaultValueAdjusted,\n\tupcastBorderStyles,\n\tupcastTableCellPaddingAttribute\n} from '../converters/tableproperties.js';\nimport { TableEditing } from './../tableediting.js';\nimport { TableCellWidthEditing } from '../tablecellwidth/tablecellwidthediting.js';\nimport { TableCellPaddingCommand } from './commands/tablecellpaddingcommand.js';\nimport { TableCellHeightCommand } from './commands/tablecellheightcommand.js';\nimport { TableCellBackgroundColorCommand } from './commands/tablecellbackgroundcolorcommand.js';\nimport { TableCellVerticalAlignmentCommand } from './commands/tablecellverticalalignmentcommand.js';\nimport { TableCellHorizontalAlignmentCommand } from './commands/tablecellhorizontalalignmentcommand.js';\nimport { TableCellBorderStyleCommand } from './commands/tablecellborderstylecommand.js';\nimport { TableCellBorderColorCommand } from './commands/tablecellbordercolorcommand.js';\nimport { TableCellBorderWidthCommand } from './commands/tablecellborderwidthcommand.js';\nimport { TableCellTypeCommand, updateTablesHeadingAttributes } from './commands/tablecelltypecommand.js';\nimport { getNormalizedDefaultCellProperties } from '../utils/table-properties.js';\nimport { enableProperty } from '../utils/common.js';\nimport { TableUtils } from '../tableutils.js';\nimport { TableWalker } from '../tablewalker.js';\nimport { isTableHeaderCellType, type TableCellType } from './tablecellpropertiesutils.js';\n\nconst VALIGN_VALUES_REG_EXP = /^(top|middle|bottom)$/;\nconst ALIGN_VALUES_REG_EXP = /^(left|center|right|justify)$/;\n\n/**\n * The table cell properties editing feature.\n *\n * Introduces table cell model attributes and their conversion:\n *\n * - border: `tableCellBorderStyle`, `tableCellBorderColor` and `tableCellBorderWidth`\n * - background color: `tableCellBackgroundColor`\n * - cell padding: `tableCellPadding`\n * - horizontal and vertical alignment: `tableCellHorizontalAlignment`, `tableCellVerticalAlignment`\n * - cell width and height: `tableCellWidth`, `tableCellHeight`\n *\n * It also registers commands used to manipulate the above attributes:\n *\n * - border: the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` commands\n * - background color: the `'tableCellBackgroundColor'` command\n * - cell padding: the `'tableCellPadding'` command\n * - horizontal and vertical alignment: the `'tableCellHorizontalAlignment'` and `'tableCellVerticalAlignment'` commands\n * - width and height: the `'tableCellWidth'` and `'tableCellHeight'` commands\n */\nexport class TableCellPropertiesEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableCellPropertiesEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'TCP';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableEditing, TableCellWidthEditing ]> {\n\t\treturn [ TableEditing, TableCellWidthEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst conversion = editor.conversion;\n\n\t\teditor.config.define( 'table.tableCellProperties.defaultProperties', { } );\n\n\t\tconst defaultTableCellProperties = getNormalizedDefaultCellProperties(\n\t\t\teditor.config.get( 'table.tableCellProperties.defaultProperties' )!,\n\t\t\t{\n\t\t\t\tincludeVerticalAlignmentProperty: true,\n\t\t\t\tincludeHorizontalAlignmentProperty: true,\n\t\t\t\tincludePaddingProperty: true,\n\t\t\t\tisRightToLeftContent: editor.locale.contentLanguageDirection === 'rtl'\n\t\t\t}\n\t\t);\n\n\t\teditor.data.addStyleProcessorRules( addBorderStylesRules );\n\t\tenableBorderProperties( editor, {\n\t\t\tcolor: defaultTableCellProperties.borderColor,\n\t\t\tstyle: defaultTableCellProperties.borderStyle,\n\t\t\twidth: defaultTableCellProperties.borderWidth\n\t\t} );\n\t\teditor.commands.add( 'tableCellBorderStyle', new TableCellBorderStyleCommand( editor, defaultTableCellProperties.borderStyle ) );\n\t\teditor.commands.add( 'tableCellBorderColor', new TableCellBorderColorCommand( editor, defaultTableCellProperties.borderColor ) );\n\t\teditor.commands.add( 'tableCellBorderWidth', new TableCellBorderWidthCommand( editor, defaultTableCellProperties.borderWidth ) );\n\n\t\tenableProperty( schema, conversion, {\n\t\t\tmodelAttribute: 'tableCellHeight',\n\t\t\tstyleName: 'height',\n\t\t\tattributeName: 'height',\n\t\t\tattributeType: 'length',\n\t\t\tdefaultValue: defaultTableCellProperties.height\n\t\t} );\n\t\teditor.commands.add( 'tableCellHeight', new TableCellHeightCommand( editor, defaultTableCellProperties.height ) );\n\n\t\teditor.data.addStyleProcessorRules( addPaddingStylesRules );\n\t\tenableProperty( schema, conversion, {\n\t\t\tmodelAttribute: 'tableCellPadding',\n\t\t\tstyleName: 'padding',\n\t\t\treduceBoxSides: true,\n\t\t\tdefaultValue: defaultTableCellProperties.padding!\n\t\t} );\n\t\tenableTableCellPaddingAttribute( editor, defaultTableCellProperties.padding! );\n\t\teditor.commands.add( 'tableCellPadding', new TableCellPaddingCommand( editor, defaultTableCellProperties.padding! ) );\n\n\t\teditor.data.addStyleProcessorRules( addBackgroundStylesRules );\n\t\tenableProperty( schema, conversion, {\n\t\t\tmodelAttribute: 'tableCellBackgroundColor',\n\t\t\tstyleName: 'background-color',\n\t\t\tattributeName: 'bgcolor',\n\t\t\tattributeType: 'color',\n\t\t\tdefaultValue: defaultTableCellProperties.backgroundColor\n\t\t} );\n\t\teditor.commands.add(\n\t\t\t'tableCellBackgroundColor',\n\t\t\tnew TableCellBackgroundColorCommand( editor, defaultTableCellProperties.backgroundColor )\n\t\t);\n\n\t\tenableHorizontalAlignmentProperty( schema, conversion, defaultTableCellProperties.horizontalAlignment! );\n\t\tenableLegacyHorizontalAlignmentAttribute( conversion );\n\n\t\teditor.commands.add(\n\t\t\t'tableCellHorizontalAlignment',\n\t\t\tnew TableCellHorizontalAlignmentCommand( editor, defaultTableCellProperties.horizontalAlignment! )\n\t\t);\n\n\t\tenableVerticalAlignmentProperty( schema, conversion, defaultTableCellProperties.verticalAlignment! );\n\t\teditor.commands.add(\n\t\t\t'tableCellVerticalAlignment',\n\t\t\tnew TableCellVerticalAlignmentCommand( editor, defaultTableCellProperties.verticalAlignment! )\n\t\t);\n\n\t\tenableCellTypeProperty( editor );\n\t\teditor.commands.add( 'tableCellType', new TableCellTypeCommand( editor ) );\n\t}\n}\n\n/**\n * Enables the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` attributes for table cells.\n *\n * @param editor The editor instance.\n * @param defaultBorder The default border values.\n * @param defaultBorder.color The default `tableCellBorderColor` value.\n * @param defaultBorder.style The default `tableCellBorderStyle` value.\n * @param defaultBorder.width The default `tableCellBorderWidth` value.\n */\nfunction enableBorderProperties(\n\teditor: Editor,\n\tdefaultBorder: { color: string; style: string; width: string }\n) {\n\tconst { conversion } = editor;\n\tconst { schema } = editor.model;\n\n\tconst modelAttributes = {\n\t\twidth: 'tableCellBorderWidth',\n\t\tcolor: 'tableCellBorderColor',\n\t\tstyle: 'tableCellBorderStyle'\n\t};\n\n\tschema.extend( 'tableCell', {\n\t\tallowAttributes: Object.values( modelAttributes )\n\t} );\n\n\tfor ( const modelAttribute of Object.values( modelAttributes ) ) {\n\t\tschema.setAttributeProperties( modelAttribute, { isFormatting: true } );\n\t}\n\n\tupcastBorderStyles( editor, 'td', modelAttributes, defaultBorder );\n\tupcastBorderStyles( editor, 'th', modelAttributes, defaultBorder );\n\tdowncastAttributeToStyle( conversion, { modelElement: 'tableCell', modelAttribute: modelAttributes.style, styleName: 'border-style' } );\n\tdowncastAttributeToStyle( conversion, { modelElement: 'tableCell', modelAttribute: modelAttributes.color, styleName: 'border-color' } );\n\tdowncastAttributeToStyle( conversion, { modelElement: 'tableCell', modelAttribute: modelAttributes.width, styleName: 'border-width' } );\n}\n\n/**\n * Enables the `'tableCellHorizontalAlignment'` attribute for table cells.\n *\n * @param defaultValue The default horizontal alignment value.\n */\nfunction enableHorizontalAlignmentProperty( schema: ModelSchema, conversion: Conversion, defaultValue: string ) {\n\tschema.extend( 'tableCell', {\n\t\tallowAttributes: [ 'tableCellHorizontalAlignment' ]\n\t} );\n\n\tschema.setAttributeProperties( 'tableCellHorizontalAlignment', { isFormatting: true } );\n\n\tconversion.for( 'downcast' )\n\t\t.attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tname: 'tableCell',\n\t\t\t\tkey: 'tableCellHorizontalAlignment'\n\t\t\t},\n\t\t\tview: alignment => ( {\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\t'text-align': alignment\n\t\t\t\t}\n\t\t\t} )\n\t\t} );\n\n\tconversion.for( 'upcast' )\n\t\t// Support for the `text-align:*;` CSS definition for the table cell alignment.\n\t\t.attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: /^(td|th)$/,\n\t\t\t\tstyles: {\n\t\t\t\t\t'text-align': ALIGN_VALUES_REG_EXP\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'tableCellHorizontalAlignment',\n\t\t\t\tvalue: ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => {\n\t\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted( defaultValue, 'left', data );\n\t\t\t\t\tconst align = viewElement.getStyle( 'text-align' );\n\n\t\t\t\t\tif ( align !== localDefaultValue ) {\n\t\t\t\t\t\treturn align;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Consume the style even if not applied to the element so it won't be processed by other converters.\n\t\t\t\t\tconversionApi.consumable.consume( viewElement, { styles: 'text-align' } );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n}\n\n/**\n * Upcasts legacy `td[align]` property to proper block alignment attributes in child elements.\n * If there is no block alignment property supported on the element, then the `alignment` fallback will be used.\n *\n * See: https://github.com/ckeditor/ckeditor5/issues/20042\n */\nfunction enableLegacyHorizontalAlignmentAttribute( conversion: Conversion ) {\n\tconversion.for( 'upcast' ).add( dispatcher => {\n\t\tconst matcher = new Matcher( {\n\t\t\tname: /^(td|th)$/,\n\t\t\tattributes: {\n\t\t\t\talign: ALIGN_VALUES_REG_EXP\n\t\t\t}\n\t\t} );\n\n\t\tdispatcher.on<UpcastElementEvent>( 'element', ( evt, data, conversionApi ) => {\n\t\t\tconst matcherResult = matcher.match( data.viewItem );\n\n\t\t\tif ( !matcherResult ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst modelElement = data.modelRange?.start.nodeAfter;\n\n\t\t\t/* istanbul ignore if -- @preserve */\n\t\t\tif ( !modelElement?.is( 'element' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst alignValue = data.viewItem.getAttribute( 'align' )!;\n\n\t\t\tif ( !conversionApi.consumable.consume( data.viewItem, { attributes: [ 'align' ] } ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( const child of modelElement.getChildren() ) {\n\t\t\t\t/* v8 ignore else -- A table cell only contains block elements, so its children are always elements. */\n\t\t\t\tif ( child.is( 'element' ) ) {\n\t\t\t\t\tapplyAlignmentToChild( child, alignValue, conversionApi );\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t} );\n\n\tfunction applyAlignmentToChild( child: ModelElement, alignValue: string, { schema, writer }: UpcastConversionApi ): void {\n\t\tconst definition = schema.getDefinition( child );\n\n\t\t/* v8 ignore else -- A converted child element is always registered in the schema, so it always has a definition. */\n\t\tif ( definition ) {\n\t\t\tfor ( const attrName of definition.allowAttributes ) {\n\t\t\t\tif ( child.hasAttribute( attrName ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst { blockAlignment } = schema.getAttributeProperties( attrName );\n\n\t\t\t\tif ( !blockAlignment ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst blockAlignmentMapping = typeof blockAlignment === 'function' ?\n\t\t\t\t\tblockAlignment( child ) :\n\t\t\t\t\tblockAlignment;\n\n\t\t\t\tconst mappedValue = blockAlignmentMapping[ alignValue ];\n\n\t\t\t\tif ( mappedValue && !mappedValue.isDefault ) {\n\t\t\t\t\twriter.setAttribute( attrName, mappedValue.value, child );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Enables the `'verticalAlignment'` attribute for table cells.\n *\n * @param defaultValue The default vertical alignment value.\n */\nfunction enableVerticalAlignmentProperty( schema: ModelSchema, conversion: Conversion, defaultValue: string ) {\n\tschema.extend( 'tableCell', {\n\t\tallowAttributes: [ 'tableCellVerticalAlignment' ]\n\t} );\n\n\tschema.setAttributeProperties( 'tableCellVerticalAlignment', { isFormatting: true } );\n\n\tconversion.for( 'downcast' )\n\t\t.attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tname: 'tableCell',\n\t\t\t\tkey: 'tableCellVerticalAlignment'\n\t\t\t},\n\t\t\tview: alignment => ( {\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\t'vertical-align': alignment\n\t\t\t\t}\n\t\t\t} )\n\t\t} );\n\n\tconversion.for( 'upcast' )\n\t\t// Support for the `vertical-align:*;` CSS definition for the table cell alignment.\n\t\t.attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: /^(td|th)$/,\n\t\t\t\tstyles: {\n\t\t\t\t\t'vertical-align': VALIGN_VALUES_REG_EXP\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'tableCellVerticalAlignment',\n\t\t\t\tvalue: ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => {\n\t\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted( defaultValue, 'middle', data );\n\t\t\t\t\tconst align = viewElement.getStyle( 'vertical-align' );\n\n\t\t\t\t\tif ( align !== localDefaultValue ) {\n\t\t\t\t\t\treturn align;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Consume the style even if not applied to the element so it won't be processed by other converters.\n\t\t\t\t\tconversionApi.consumable.consume( viewElement, { styles: 'vertical-align' } );\n\t\t\t\t}\n\t\t\t}\n\t\t} )\n\t\t// Support for the `align` attribute as the backward compatibility while pasting from other sources.\n\t\t.attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: /^(td|th)$/,\n\t\t\t\tattributes: {\n\t\t\t\t\tvalign: VALIGN_VALUES_REG_EXP\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'tableCellVerticalAlignment',\n\t\t\t\tvalue: ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => {\n\t\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted( defaultValue, 'middle', data );\n\t\t\t\t\tconst valign = viewElement.getAttribute( 'valign' );\n\n\t\t\t\t\tif ( valign !== localDefaultValue ) {\n\t\t\t\t\t\treturn valign;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Consume the attribute even if not applied to the element so it won't be processed by other converters.\n\t\t\t\t\tconversionApi.consumable.consume( viewElement, { attributes: 'valign' } );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n}\n\n/**\n * Enables the `tableCellType` attribute for table cells.\n */\nfunction enableCellTypeProperty( editor: Editor ) {\n\tconst { model, conversion, editing, config } = editor;\n\tconst { schema } = model;\n\n\tconfig.define( 'table.tableCellProperties.scopedHeaders', true );\n\n\tconst scopedHeaders = !!config.get( 'table.tableCellProperties.scopedHeaders' );\n\tconst tableUtils = editor.plugins.get( TableUtils );\n\n\tschema.extend( 'tableCell', {\n\t\tallowAttributes: [ 'tableCellType' ]\n\t} );\n\n\tschema.setAttributeProperties( 'tableCellType', {\n\t\tisFormatting: true\n\t} );\n\n\t// Do not allow setting `tableCellType` in layout tables.\n\tschema.addAttributeCheck( context => {\n\t\tconst nearestTable = Array.from( context ).reverse().find( item => item.name === 'table' );\n\n\t\tif ( nearestTable?.getAttribute( 'tableType' ) === 'layout' ) {\n\t\t\treturn false;\n\t\t}\n\t}, 'tableCellType' );\n\n\t// Upcast conversion for td/th elements.\n\tconversion.for( 'upcast' ).add( dispatcher => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:th', ( evt, data, conversionApi ) => {\n\t\t\tconst { writer } = conversionApi;\n\t\t\tconst { modelRange } = data;\n\t\t\tconst modelElement = modelRange?.start.nodeAfter;\n\n\t\t\tif ( modelElement?.is( 'element', 'tableCell' ) && !modelElement.hasAttribute( 'tableCellType' ) ) {\n\t\t\t\twriter.setAttribute( 'tableCellType', 'header', modelElement );\n\t\t\t}\n\t\t} );\n\n\t\t// Table type is examined after all other cell converters, on low priority, so\n\t\t// we double check if there is any `th` left in the table. If so, the table is converted to a content table.\n\t\tdispatcher.on<UpcastElementEvent>( 'element:table', ( evt, data, conversionApi ) => {\n\t\t\tconst { writer } = conversionApi;\n\t\t\tconst { modelRange } = data;\n\t\t\tconst modelElement = modelRange?.start.nodeAfter;\n\n\t\t\tif ( modelElement?.is( 'element', 'table' ) && modelElement.getAttribute( 'tableType' ) === 'layout' ) {\n\t\t\t\tfor ( const { cell } of new TableWalker( modelElement ) ) {\n\t\t\t\t\tconst tableCellType = cell.getAttribute( 'tableCellType' ) as TableCellType;\n\n\t\t\t\t\tif ( isTableHeaderCellType( tableCellType ) ) {\n\t\t\t\t\t\twriter.setAttribute( 'tableType', 'content', modelElement );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: priorities.low - 1 } );\n\t} );\n\n\t// If scoped headers are enabled, add conversion for the `scope` attribute.\n\tif ( scopedHeaders ) {\n\t\tconversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tname: 'tableCell',\n\t\t\t\tkey: 'tableCellType'\n\t\t\t},\n\t\t\tview: ( modelAttributeValue: TableCellType ) => {\n\t\t\t\tswitch ( modelAttributeValue ) {\n\t\t\t\t\tcase 'header-row':\n\t\t\t\t\t\treturn { key: 'scope', value: 'row' };\n\n\t\t\t\t\tcase 'header-column':\n\t\t\t\t\t\treturn { key: 'scope', value: 'col' };\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Attribute to attribute conversion tend to not override existing `tableCellType` set by other converters.\n\t\t// However, in this scenario if the previous converter set `tableCellType` to `header`, we can adjust it\n\t\t// based on the `scope` attribute.\n\t\tconversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on<UpcastElementEvent>( 'element:th', ( _, data, conversionApi ) => {\n\t\t\t\tconst { writer, consumable } = conversionApi;\n\t\t\t\tconst { viewItem, modelRange } = data;\n\n\t\t\t\tconst modelElement = modelRange?.start.nodeAfter;\n\n\t\t\t\tif ( !modelElement ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst previousTableCellType = modelElement.getAttribute( 'tableCellType' ) as TableCellType | undefined;\n\n\t\t\t\tif ( previousTableCellType === 'header' && consumable.consume( viewItem, { attributes: [ 'scope' ] } ) ) {\n\t\t\t\t\tconst scope = viewItem.getAttribute( 'scope' );\n\n\t\t\t\t\tswitch ( scope ) {\n\t\t\t\t\t\tcase 'row':\n\t\t\t\t\t\t\twriter.setAttribute( 'tableCellType', 'header-row', modelElement );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'col':\n\t\t\t\t\t\t\twriter.setAttribute( 'tableCellType', 'header-column', modelElement );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Registers a post-fixer that ensures the `headingRows` and `headingColumns` attributes\n\t// are consistent with the `tableCellType` attribute of the cells. `tableCellType` has priority\n\t// over `headingRows` and `headingColumns` and we use it to adjust the heading sections of the table.\n\tmodel.document.registerPostFixer( writer => {\n\t\t// 1. Collect all tables that need to be checked.\n\t\tconst changes = model.document.differ.getChanges();\n\t\tconst tablesToCheck = new Set<ModelElement>();\n\n\t\tfor ( const change of changes ) {\n\t\t\t// Check if headingRows or headingColumns changed.\n\t\t\tif ( change.type === 'attribute' && ( change.attributeKey === 'headingRows' || change.attributeKey === 'headingColumns' ) ) {\n\t\t\t\tconst table = change.range.start.nodeAfter as ModelElement;\n\n\t\t\t\tif ( table?.is( 'element', 'table' ) && table.root.rootName !== '$graveyard' ) {\n\t\t\t\t\ttablesToCheck.add( table );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if tableCellType changed.\n\t\t\tif ( change.type === 'attribute' && change.attributeKey === 'tableCellType' ) {\n\t\t\t\tconst cell = change.range.start.nodeAfter as ModelElement;\n\n\t\t\t\tif ( cell?.is( 'element', 'tableCell' ) && cell.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tconst table = cell.findAncestor( 'table' ) as ModelElement;\n\n\t\t\t\t\t/* v8 ignore else -- A table cell always lives inside a table, so it always has a table ancestor here. */\n\t\t\t\t\tif ( table ) {\n\t\t\t\t\t\ttablesToCheck.add( table );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if new headers were inserted.\n\t\t\tif ( change.type === 'insert' && change.position.nodeAfter ) {\n\t\t\t\tfor ( const { item } of model.createRangeOn( change.position.nodeAfter ) ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\titem.is( 'element', 'tableCell' ) &&\n\t\t\t\t\t\titem.getAttribute( 'tableCellType' ) &&\n\t\t\t\t\t\titem.root.rootName !== '$graveyard'\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst table = item.findAncestor( 'table' ) as ModelElement;\n\n\t\t\t\t\t\t/* v8 ignore else -- An inserted table cell always lives inside a table, so it always has a table ancestor here. */\n\t\t\t\t\t\tif ( table ) {\n\t\t\t\t\t\t\ttablesToCheck.add( table );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 2. Update the attributes of the collected tables.\n\t\treturn updateTablesHeadingAttributes( tableUtils, writer, tablesToCheck );\n\t} );\n\n\t// Refresh the table cells in the editing view when their `tableCellType` attribute changes.\n\tmodel.document.on( 'change:data', () => {\n\t\tconst { differ } = model.document;\n\t\tconst cellsToReconvert = new Set<ModelElement>();\n\n\t\tfor ( const change of differ.getChanges() ) {\n\t\t\t// If the `tableCellType` attribute changed, the entire cell needs to be re-rendered.\n\t\t\tif ( change.type === 'attribute' && change.attributeKey === 'tableCellType' ) {\n\t\t\t\tconst tableCell = change.range.start.nodeAfter as ModelElement;\n\n\t\t\t\tif ( tableCell.is( 'element', 'tableCell' ) ) {\n\t\t\t\t\tcellsToReconvert.add( tableCell );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reconvert table cells that had their `tableCellType` attribute changed.\n\t\tfor ( const tableCell of cellsToReconvert ) {\n\t\t\tconst viewElement = editing.mapper.toViewElement( tableCell );\n\t\t\tconst cellType = tableCell.getAttribute( 'tableCellType' ) as TableCellType;\n\t\t\tconst expectedElementName = isTableHeaderCellType( cellType ) ? 'th' : 'td';\n\n\t\t\tif ( viewElement?.name !== expectedElementName ) {\n\t\t\t\tediting.reconvertItem( tableCell );\n\t\t\t}\n\t\t}\n\t} );\n}\n\n/**\n * Enables the upcasting of the `cellpadding` attribute from table to table cells padding.\n *\n * @param editor The editor instance.\n * @param defaultPadding The default padding value.\n */\nfunction enableTableCellPaddingAttribute( editor: Editor, defaultPadding: string ) {\n\tupcastTableCellPaddingAttribute( editor, 'td', defaultPadding );\n\tupcastTableCellPaddingAttribute( editor, 'th', defaultPadding );\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/**\n * @module table/tablecellproperties\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { TableCellPropertiesUI } from './tablecellproperties/tablecellpropertiesui.js';\nimport { TableCellPropertiesEditing } from './tablecellproperties/tablecellpropertiesediting.js';\n\n/**\n * The table cell properties feature. Enables support for setting properties of table cells (size, border, background, etc.).\n *\n * Read more in the {@glink features/tables/tables-styling Table and cell styling tools} section.\n * See also the {@link module:table/tableproperties~TableProperties} plugin.\n *\n * This is a \"glue\" plugin that loads the\n * {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing table cell properties editing feature} and\n * the {@link module:table/tablecellproperties/tablecellpropertiesui~TableCellPropertiesUI table cell properties UI feature}.\n */\nexport class TableCellProperties extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableCellProperties' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableCellPropertiesEditing, TableCellPropertiesUI ]> {\n\t\treturn [ TableCellPropertiesEditing, TableCellPropertiesUI ];\n\t}\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/**\n * @module table/tablelayout/tablelayoutui\n */\n\nimport { type Editor, Plugin } from '@ckeditor/ckeditor5-core';\nimport { IconTableLayout, IconTableProperties } from '@ckeditor/ckeditor5-icons';\nimport {\n\tcreateDropdown,\n\taddListToDropdown,\n\tMenuBarMenuView,\n\tSplitButtonView,\n\tDropdownButtonView,\n\tUIModel,\n\ttype ListDropdownButtonDefinition,\n\ttype ButtonExecuteEvent\n} from '@ckeditor/ckeditor5-ui';\nimport {\n\tCollection,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport { InsertTableView } from '../ui/inserttableview.js';\n\nimport { type InsertTableLayoutCommand } from '../commands/inserttablelayoutcommand.js';\nimport type { TableTypeCommand } from './commands/tabletypecommand.js';\nimport type { TableType } from '../tableconfig.js';\n\n/**\n * The table layout UI plugin. It introduces:\n *\n * * The `'insertTableLayout'` dropdown,\n * * The `'menuBar:insertTableLayout'` menu bar menu.\n */\nexport class TableLayoutUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableLayoutUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = this.editor.t;\n\n\t\teditor.ui.componentFactory.add( 'insertTableLayout', locale => {\n\t\t\tconst command: InsertTableLayoutCommand = editor.commands.get( 'insertTableLayout' )!;\n\t\t\tconst dropdownView = createDropdown( locale );\n\n\t\t\tdropdownView.bind( 'isEnabled' ).to( command );\n\n\t\t\t// Decorate dropdown's button.\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\ticon: IconTableLayout,\n\t\t\t\tlabel: t( 'Insert table layout' ),\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tlet insertTableLayoutView: InsertTableView;\n\n\t\t\tdropdownView.on( 'change:isOpen', () => {\n\t\t\t\tif ( insertTableLayoutView ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prepare custom view for dropdown's panel.\n\t\t\t\tinsertTableLayoutView = new InsertTableView( locale );\n\t\t\t\tdropdownView.panelView.children.add( insertTableLayoutView );\n\n\t\t\t\tinsertTableLayoutView.delegate( 'execute' ).to( dropdownView );\n\n\t\t\t\tdropdownView.on( 'execute', () => {\n\t\t\t\t\teditor.execute( 'insertTableLayout', {\n\t\t\t\t\t\trows: insertTableLayoutView.rows,\n\t\t\t\t\t\tcolumns: insertTableLayoutView.columns\n\t\t\t\t\t} );\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:insertTableLayout', locale => {\n\t\t\tconst command: InsertTableLayoutCommand = editor.commands.get( 'insertTableLayout' )!;\n\t\t\tconst menuView = new MenuBarMenuView( locale );\n\t\t\tconst insertTableLayoutView = new InsertTableView( locale );\n\n\t\t\tinsertTableLayoutView.delegate( 'execute' ).to( menuView );\n\n\t\t\tmenuView.on<ObservableChangeEvent<boolean>>( 'change:isOpen', ( event, name, isOpen ) => {\n\t\t\t\tif ( !isOpen ) {\n\t\t\t\t\tinsertTableLayoutView.reset();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tinsertTableLayoutView.on( 'execute', () => {\n\t\t\t\teditor.execute( 'insertTableLayout', {\n\t\t\t\t\trows: insertTableLayoutView.rows,\n\t\t\t\t\tcolumns: insertTableLayoutView.columns\n\t\t\t\t} );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tmenuView.buttonView.set( {\n\t\t\t\tlabel: t( 'Table layout' ),\n\t\t\t\ticon: IconTableLayout\n\t\t\t} );\n\n\t\t\tmenuView.panelView.children.add( insertTableLayoutView );\n\n\t\t\tmenuView.bind( 'isEnabled' ).to( command );\n\n\t\t\treturn menuView;\n\t\t} );\n\n\t\t// Create table type dropdown button.\n\t\teditor.ui.componentFactory.add( 'tableType', () => {\n\t\t\tconst editor = this.editor;\n\t\t\tconst t = editor.t;\n\n\t\t\tconst button = new DropdownButtonView( editor.locale );\n\n\t\t\tbutton.set( {\n\t\t\t\tlabel: t( 'Table type' ),\n\t\t\t\ticon: IconTableProperties,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn createTableTypeDropdown( editor, button );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst { editor } = this;\n\t\tconst { ui, plugins } = editor;\n\n\t\tif ( !editor.plugins.has( 'TablePropertiesUI' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tablePropertiesUI = plugins.get( 'TablePropertiesUI' );\n\n\t\t// Override the default table properties button to include the table type dropdown.\n\t\t// It needs to be done in `afterInit()` to make sure that `tableProperties` button is\n\t\t// registered after the initialization of the `TablePropertiesUI`. Otherwise, the\n\t\t// button will be overridden by the default one if the `TablePropertiesUI` is\n\t\t// initialized after the `TableLayoutUI`.\n\t\tui.componentFactory.add( 'tableProperties', locale => {\n\t\t\tconst baseButton = tablePropertiesUI._createTablePropertiesButton();\n\t\t\tconst splitButtonView = new SplitButtonView( locale, baseButton );\n\n\t\t\treturn createTableTypeDropdown( editor, splitButtonView );\n\t\t} );\n\t}\n}\n\n/**\n * Creates a dropdown for the table type selection.\n *\n * @param editor The editor instance.\n * @param dropdownButton The button view that will be used as the dropdown trigger.\n * @returns A dropdown view containing table type options.\n */\nfunction createTableTypeDropdown( editor: Editor, dropdownButton: DropdownButtonView | SplitButtonView ) {\n\tconst t = editor.t;\n\tconst locale = editor.locale;\n\tconst tableTypeCommand = editor.commands.get( 'tableType' )!;\n\n\t// Wrap the original button in a SplitButtonView.\n\tconst dropdownView = createDropdown( locale, dropdownButton );\n\tconst itemsDefinitions = createTableLayoutTypeDropdownItems( editor );\n\n\t// Add table types to the dropdown.\n\taddListToDropdown( dropdownView, itemsDefinitions, {\n\t\tariaLabel: t( 'Table type options' ),\n\t\trole: 'menu'\n\t} );\n\n\tdropdownButton.tooltip = t( 'Choose table type' );\n\tdropdownView.on<ButtonExecuteEvent>( 'execute', evt => {\n\t\tconst tableType = ( evt.source as any ).tableType as TableType | undefined;\n\n\t\tif ( tableType ) {\n\t\t\ttableTypeCommand.execute( tableType );\n\t\t}\n\t} );\n\n\treturn dropdownView;\n}\n\n/**\n * Creates dropdown items for table type selection.\n *\n * @param editor The editor instance.\n * @returns A collection of dropdown items for the table type dropdown.\n */\nfunction createTableLayoutTypeDropdownItems( editor: Editor ) {\n\tconst t = editor.t;\n\tconst tableTypeCommand = editor.commands.get( 'tableType' )!;\n\tconst itemDefinitions = new Collection<ListDropdownButtonDefinition>();\n\n\titemDefinitions.add( createTableTypeDropdownItem( tableTypeCommand, 'layout', t( 'Layout table' ) ) );\n\titemDefinitions.add( createTableTypeDropdownItem( tableTypeCommand, 'content', t( 'Content table' ) ) );\n\n\treturn itemDefinitions;\n}\n\n/**\n * Creates a dropdown item for a specific table type.\n *\n * @param tableTypeCommand The table type command.\n * @param type The table type value ('layout' or 'content').\n * @param label The localized label for the dropdown item.\n * @returns The dropdown item definition.\n */\nfunction createTableTypeDropdownItem(\n\ttableTypeCommand: TableTypeCommand,\n\ttype: TableType,\n\tlabel: string\n): ListDropdownButtonDefinition {\n\tconst model = new UIModel( {\n\t\tlabel,\n\t\trole: 'menuitemradio',\n\t\twithText: true,\n\t\ttableType: type\n\t} );\n\n\tmodel.bind( 'isEnabled' ).to( tableTypeCommand, 'isEnabled' );\n\tmodel.bind( 'isOn' ).to( tableTypeCommand, 'value', value => value === type );\n\n\treturn {\n\t\ttype: 'button',\n\t\tmodel\n\t};\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/**\n * @module table/commands/inserttablelayoutcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\n\nimport {\n\tModelDocumentSelection,\n\ttype ModelSchema,\n\ttype ModelSelection,\n\ttype ModelElement\n} from '@ckeditor/ckeditor5-engine';\nimport { _getCopyOnEnterAttributes } from '@ckeditor/ckeditor5-enter';\n\nimport { type TableUtils } from '../tableutils.js';\nimport { type TableWidthsCommand } from '../tablecolumnresize/tablewidthscommand.js';\nimport { getEmptyTableCellBlocks } from '../utils/common.js';\n\n/**\n * The insert table layout command.\n *\n * The command is registered by {@link module:table/tablelayout/tablelayoutediting~TableLayoutEditing}\n * as the `'insertTableLayout'` editor command.\n *\n * To insert a layout table at the current selection, execute the command and specify the dimensions:\n *\n * ```ts\n * editor.execute( 'insertTableLayout', { rows: 20, columns: 5 } );\n * ```\n */\nexport class InsertTableLayoutCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst schema = model.schema;\n\n\t\tthis.isEnabled = isAllowedInParent( selection, schema );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * Inserts a layout table with the given number of rows and columns into the editor.\n\t *\n\t * @param options.rows The number of rows to create in the inserted table. Default value is 2.\n\t * @param options.columns The number of columns to create in the inserted table. Default value is 2.\n\t * @param options.inheritTextFormattingAttributes Whether every empty cell should inherit the `copyOnEnter` text\n\t * formatting attributes (e.g. bold, font color) that were uniformly active in the content right before\n\t * the table, so that whichever cell the user starts typing in first continues that formatting. Defaults\n\t * to `true`.\n\t * @fires execute\n\t */\n\tpublic override execute(\n\t\toptions: {\n\t\t\trows?: number;\n\t\t\tcolumns?: number;\n\t\t\tinheritTextFormattingAttributes?: boolean;\n\t\t} = {}\n\t): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst tableUtils: TableUtils = editor.plugins.get( 'TableUtils' );\n\n\t\tmodel.change( writer => {\n\t\t\tconst selectionAttributesToCopy = Array.from(\n\t\t\t\t_getCopyOnEnterAttributes( model.schema, selection.getAttributes() )\n\t\t\t);\n\n\t\t\tconst normalizedOptions = { rows: options.rows || 2, columns: options.columns || 2 };\n\t\t\tconst table = tableUtils.createTable( writer, normalizedOptions );\n\n\t\t\twriter.setAttribute( 'tableType', 'layout', table );\n\n\t\t\tmodel.insertObject( table, null, null, { findOptimalPosition: 'auto' } );\n\n\t\t\tconst singleColumnWidth = `${ 100 / normalizedOptions.columns! }%`;\n\t\t\tconst columnWidths = Array( normalizedOptions.columns ).fill( singleColumnWidth );\n\t\t\tconst tableWidthsCommand: TableWidthsCommand = editor.commands.get( 'resizeColumnWidths' )!;\n\n\t\t\t// Make the table full-width with equal columns width.\n\t\t\ttableWidthsCommand.execute( { tableWidth: '100%', columnWidths, table } );\n\n\t\t\twriter.setSelection( writer.createPositionAt( table.getNodeByPath( [ 0, 0, 0 ] ), 0 ) );\n\n\t\t\tif ( options.inheritTextFormattingAttributes !== false && selectionAttributesToCopy.length ) {\n\t\t\t\tfor ( const cellBlock of getEmptyTableCellBlocks( table ) ) {\n\t\t\t\t\tfor ( const [ key, value ] of selectionAttributesToCopy ) {\n\t\t\t\t\t\twriter.setAttribute( ModelDocumentSelection._getStoreAttributeKey( key ), value, cellBlock );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Checks if the table is allowed in the parent.\n */\nfunction isAllowedInParent( selection: ModelSelection | ModelDocumentSelection, schema: ModelSchema ) {\n\tconst positionParent = selection.getFirstPosition()!.parent;\n\tconst validParent = positionParent === positionParent.root ? positionParent : positionParent.parent;\n\n\treturn schema.checkChild( validParent as ModelElement, 'table' );\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/**\n * @module table/tablecolumnresize/tablewidthscommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport { normalizeColumnWidths, removeCellWidthsFromTable } from './utils.js';\n\n/**\n * Command used by the {@link module:table/tablecolumnresize~TableColumnResize Table column resize feature} that\n * updates the width of the whole table as well as its individual columns.\n */\nexport class TableWidthsCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\t// The command is always enabled as it doesn't care about the actual selection - table can be resized\n\t\t// even if the selection is elsewhere.\n\t\tthis.isEnabled = true;\n\t}\n\n\t/**\n\t * Updated the `tableWidth` attribute of the table and the `columnWidth` attribute of the columns of that table.\n\t */\n\tpublic override execute( options: TableWidthsCommandOptions = {} ): void {\n\t\tconst { model, plugins } = this.editor;\n\t\tlet {\n\t\t\ttable = model.document.selection.getSelectedElement()!,\n\t\t\tcolumnWidths,\n\t\t\ttableWidth\n\t\t} = options;\n\n\t\tif ( columnWidths ) {\n\t\t\t// For backwards compatibility, columnWidths might be an array or a string of comma-separated values.\n\t\t\tcolumnWidths = Array.isArray( columnWidths ) ?\n\t\t\t\tcolumnWidths :\n\t\t\t\tcolumnWidths.split( ',' );\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tif ( tableWidth ) {\n\t\t\t\twriter.setAttribute( 'tableWidth', tableWidth, table );\n\t\t\t} else {\n\t\t\t\twriter.removeAttribute( 'tableWidth', table );\n\t\t\t}\n\n\t\t\tconst tableColumnGroup = plugins\n\t\t\t\t.get( 'TableColumnResizeEditing' )\n\t\t\t\t.getColumnGroupElement( table )!;\n\n\t\t\tif ( !columnWidths && !tableColumnGroup ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !columnWidths ) {\n\t\t\t\treturn writer.remove( tableColumnGroup );\n\t\t\t}\n\n\t\t\tconst widths = normalizeColumnWidths( columnWidths as Array<string> );\n\n\t\t\t// A column resize makes per-cell widths obsolete (the column width governs the layout), so drop them.\n\t\t\tremoveCellWidthsFromTable( writer, table );\n\n\t\t\tif ( !tableColumnGroup ) {\n\t\t\t\tconst colGroupElement = writer.createElement( 'tableColumnGroup' );\n\n\t\t\t\twidths.forEach( columnWidth => writer.appendElement( 'tableColumn', { columnWidth }, colGroupElement ) );\n\t\t\t\twriter.append( colGroupElement, table );\n\t\t\t} else {\n\t\t\t\tArray\n\t\t\t\t\t.from( tableColumnGroup.getChildren() )\n\t\t\t\t\t.forEach( ( column, index ) => writer.setAttribute( 'columnWidth', widths[ index ], column ) );\n\t\t\t}\n\t\t} );\n\t}\n}\n\nexport interface TableWidthsCommandOptions {\n\n\t/**\n\t * New value of the `columnWidths` attribute. Must be array of strings or string with comma-separated values.\n\t * If skipped, the column widths information will be deleted.\n\t */\n\tcolumnWidths?: Array<string> | string;\n\n\t/**\n\t * The new table width. If skipped, the model attribute will be removed.\n\t */\n\ttableWidth?: string;\n\n\t/**\n\t * The table that is having the columns resized.\n\t */\n\ttable?: ModelElement;\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/**\n * @module table/tablecolumnresize/commands/tablecolumnwidthcommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport type { Batch } from '@ckeditor/ckeditor5-engine';\n\nimport { type TableUtils } from '../../tableutils.js';\nimport { addDefaultUnitToNumericValue } from '../../utils/table-properties.js';\nimport { type TableColumnResizeEditing } from '../tablecolumnresizeediting.js';\nimport { removeCellWidthsFromTable } from '../utils.js';\n\n/**\n * The table column width command.\n *\n * The command is registered by the {@link module:table/tablecolumnresize/tablecolumnresizeediting~TableColumnResizeEditing}\n * as the `'tableColumnWidth'` editor command.\n *\n * It sets the width of every column covered by the selected cells (keeping the whole table's width mode consistent),\n * so the change actually takes effect in a resized table - where a per-cell width would be shadowed by the column\n * group. The command is enabled whenever the selection maps onto the columns of a resized, regular table.\n *\n * ```ts\n * editor.execute( 'tableColumnWidth', {\n *   value: '150px'\n * } );\n * ```\n *\n * **Note**: This command adds a default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableColumnWidth', {\n *   value: '150'\n * } );\n * ```\n *\n * will set the column width to `'150px'`.\n */\nexport class TableColumnWidthCommand extends Command {\n\t/**\n\t * The width of the first column covered by the selection, or `null` when the selection does not map onto table\n\t * columns (for example when there is no cell selected or the table is not resized).\n\t *\n\t * @readonly\n\t * @observable\n\t */\n\tpublic declare value: string | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst tableUtils: TableUtils = editor.plugins.get( 'TableUtils' );\n\t\tconst tableColumnResize = editor.plugins.get( 'TableColumnResizeEditing' ) as TableColumnResizeEditing;\n\t\tconst tableCells = tableUtils.getSelectionAffectedTableCells( editor.model.document.selection );\n\t\tconst columns = tableColumnResize.getColumnIndexesForCells( tableCells );\n\n\t\tif ( !columns ) {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = null;\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isEnabled = true;\n\n\t\t// When the selection covers columns of different widths, the field reflects the first one.\n\t\tthis.value = tableColumnResize\n\t\t\t.getTableColumnElements( columns.table )[ columns.columnIndexes[ 0 ] ]\n\t\t\t.getAttribute( 'columnWidth' ) as string;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute( options: { value?: string | number; batch?: Batch } = {} ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst tableUtils: TableUtils = editor.plugins.get( 'TableUtils' );\n\t\tconst tableColumnResize = editor.plugins.get( 'TableColumnResizeEditing' ) as TableColumnResizeEditing;\n\t\tconst value = addDefaultUnitToNumericValue( options.value, 'px' ) as string | undefined;\n\t\tconst tableCells = tableUtils.getSelectionAffectedTableCells( model.document.selection );\n\t\tconst columns = tableColumnResize.getColumnIndexesForCells( tableCells );\n\n\t\t// A non-numeric value (for example untrimmed whitespace) must not reach the model as `NaN%` / `NaNpx`.\n\t\tif ( !value || !columns || Number.isNaN( parseFloat( value ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.enqueueChange( options.batch, writer => {\n\t\t\ttableColumnResize.applyColumnWidths( writer, columns.table, columns.columnIndexes, value );\n\n\t\t\t// A per-cell width is now obsolete (the column width governs the layout), so drop it from the whole table.\n\t\t\tremoveCellWidthsFromTable( writer, columns.table );\n\t\t} );\n\t}\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/**\n * @module table/tablecolumnresize/converters\n */\n\nimport type {\n\tDowncastDispatcher,\n\tDowncastInsertEvent,\n\tModelElement,\n\tUpcastDispatcher,\n\tUpcastElementEvent,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\nimport { type TableUtils } from '../tableutils.js';\nimport {\n\tnormalizeColumnWidths,\n\tupdateColumnElements,\n\tgetColumnGroupElement,\n\tgetTableColumnElements,\n\ttranslateColSpanAttribute\n} from './utils.js';\n\n/**\n * Returns a upcast helper that ensures the number of `<tableColumn>` elements corresponds to the actual number of columns in the table,\n * because the input data might have too few or too many <col> elements.\n *\n * @internal\n */\nexport function upcastColgroupElement( tableUtilsPlugin: TableUtils ): ( dispatcher: UpcastDispatcher ) => void {\n\treturn dispatcher => dispatcher.on<UpcastElementEvent>( 'element:colgroup', ( evt, data, conversionApi ) => {\n\t\tconst modelTable = data.modelCursor.findAncestor( 'table' )!;\n\t\tconst tableColumnGroup = getColumnGroupElement( modelTable );\n\n\t\tif ( !tableColumnGroup ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst columnElements = getTableColumnElements( tableColumnGroup );\n\t\tconst columnsCount = tableUtilsPlugin.getColumns( modelTable );\n\t\tlet columnWidths = translateColSpanAttribute( tableColumnGroup, conversionApi.writer );\n\n\t\t// Fill the array with 'auto' values if the number of columns is higher than number of declared values.\n\t\tcolumnWidths = Array.from( { length: columnsCount }, ( _, index ) => columnWidths[ index ] || 'auto' );\n\n\t\tif ( columnWidths.length != columnElements.length || columnWidths.includes( 'auto' ) ) {\n\t\t\tupdateColumnElements( columnElements, tableColumnGroup, normalizeColumnWidths( columnWidths ), conversionApi.writer );\n\t\t}\n\t}, { priority: 'low' } );\n}\n\n/**\n * Returns downcast helper for adding `ck-table-resized` class if there is a `<tableColumnGroup>` element inside the table.\n *\n * @internal\n */\nexport function downcastTableResizedClass(): ( dispatcher: DowncastDispatcher ) => void {\n\treturn dispatcher => dispatcher.on<DowncastInsertEvent>( 'insert:table', ( evt, data, conversionApi ) => {\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst modelTable = data.item as ModelElement;\n\t\tconst viewElement: ViewElement = conversionApi.mapper.toViewElement( modelTable )!;\n\n\t\tconst viewTable = viewElement.is( 'element', 'table' ) ?\n\t\t\tviewElement :\n\t\t\tArray.from( viewElement.getChildren() ).find( viewChild => viewChild.is( 'element', 'table' ) )!;\n\n\t\tconst tableColumnGroup = getColumnGroupElement( modelTable );\n\n\t\tif ( tableColumnGroup ) {\n\t\t\tviewWriter.addClass( 'ck-table-resized', viewTable as ViewElement );\n\t\t} else {\n\t\t\tviewWriter.removeClass( 'ck-table-resized', viewTable as ViewElement );\n\t\t}\n\t}, { priority: 'low' } );\n}\n\n/**\n * Returns a upcast helper that removes the `ck-table-resized` class from the table element.\n *\n * @internal\n */\nexport function upcastTableResizedClass(): ( dispatcher: UpcastDispatcher ) => void {\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:table', ( evt, data, conversionApi ) => {\n\t\t\tconversionApi.consumable.consume( data.viewItem, { classes: 'ck-table-resized' } );\n\t\t} );\n\t};\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/**\n * @module table/tablecolumnresize/tablecolumnresizeediting\n */\n\nimport { throttle, isEqual } from 'es-toolkit/compat';\n\nimport {\n\tglobal,\n\tDomEmitterMixin,\n\tRect,\n\ttoUnit,\n\ttype EventInfo,\n\ttype DomEmitter,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport type {\n\tBatch,\n\tDiffer,\n\tViewDocumentDomEventData,\n\tDowncastInsertEvent,\n\tViewDowncastWriter,\n\tModelElement,\n\tModelWriter,\n\tViewElement,\n\tViewNode\n} from '@ckeditor/ckeditor5-engine';\n\nimport { MouseEventsObserver } from '../tablemouse/mouseeventsobserver.js';\nimport { TableEditing } from '../tableediting.js';\nimport { TableUtils } from '../tableutils.js';\nimport { TableWalker } from '../tablewalker.js';\n\nimport { TableWidthsCommand } from './tablewidthscommand.js';\nimport { TableColumnWidthCommand } from './commands/tablecolumnwidthcommand.js';\n\nimport { downcastTableResizedClass, upcastColgroupElement, upcastTableResizedClass } from './converters.js';\n\nimport {\n\tclamp,\n\tcreateFilledArray,\n\tsumArray,\n\tgetColumnEdgesIndexes,\n\tgetChangedResizedTables,\n\tgetColumnMinWidthAsPercentage,\n\tgetElementWidthInPixels,\n\tgetContainerContentWidth,\n\tgetTableWidthInPixels,\n\tnormalizeColumnWidths,\n\ttoPrecision,\n\tgetDomCellOuterWidth,\n\tupdateColumnElements,\n\tgetColumnGroupElement,\n\tgetTableColumnElements,\n\tgetTableColumnsWidths,\n\tisTableWidthInPixels,\n\tisColumnWidthsInPixels,\n\tgetEditableContentWidth\n} from './utils.js';\nimport { getSelectionAffectedTable } from '../utils/common.js';\n\nimport {\n\tCOLUMN_MIN_WIDTH_AS_PERCENTAGE,\n\tCOLUMN_MIN_WIDTH_IN_PIXELS,\n\tCOLUMN_RESIZE_DISTANCE_THRESHOLD,\n\tTABLE_WIDTH_GROWTH_RESISTANCE_IN_PIXELS,\n\tTABLE_WIDTH_SNAP_THRESHOLD_IN_PIXELS\n} from './constants.js';\n\nimport type { TableColumnResize } from '../tablecolumnresize.js';\n\nconst toPx = /* #__PURE__ */ toUnit( 'px' );\n\ntype ResizingData = {\n\tcolumnPosition: number;\n\tflags: {\n\t\tisRightEdge: boolean;\n\t\tisTableCentered: boolean;\n\t\tisLtrContent: boolean;\n\t\tisPixelMode: boolean;\n\t\tisTableWidthWithinContainerAtDragStart: boolean;\n\t\tisTableScrollAllowed: boolean;\n\t};\n\telements: {\n\t\tviewResizer: ViewElement;\n\t\tmodelTable: ModelElement;\n\t\tviewFigure: ViewElement;\n\t\tviewTable: ViewElement;\n\t\tviewColgroup: ViewElement;\n\t\tviewLeftColumn: ViewElement;\n\t\tviewRightColumn?: ViewElement;\n\t};\n\twidths: {\n\t\tviewFigureWidth: number;\n\t\tviewFigureParentWidth: number;\n\t\ttableWidth: number;\n\t\tleftColumnWidth: number;\n\t\trightColumnWidth?: number;\n\t};\n};\n\n/**\n * The table column resize editing plugin.\n */\nexport class TableColumnResizeEditing extends Plugin {\n\t/**\n\t * A flag indicating if the column resizing is in progress.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tpublic declare _isResizingActive: boolean;\n\n\t/**\n\t * A flag indicating if the column resizing is allowed. It is not allowed if the editor is in read-only\n\t * or comments-only mode or the `TableColumnResize` plugin is disabled.\n\t *\n\t * @observable\n\t * @internal\n\t */\n\tpublic declare _isResizingAllowed: boolean;\n\n\t/**\n\t * A temporary storage for the required data needed to correctly calculate the widths of the resized columns. This storage is\n\t * initialized when column resizing begins, and is purged upon completion.\n\t */\n\tprivate _resizingData: ResizingData | null;\n\n\t/**\n\t * DOM emitter.\n\t */\n\tprivate _domEmitter: DomEmitter;\n\n\t/**\n\t * A local reference to the {@link module:table/tableutils~TableUtils} plugin.\n\t */\n\tprivate _tableUtilsPlugin: TableUtils;\n\n\t/**\n\t * Starting mouse position data used to add a threshold to the resizing process.\n\t */\n\tprivate _initialMouseEventData: ViewDocumentDomEventData | null = null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableEditing, TableUtils ]> {\n\t\treturn [ TableEditing, TableUtils ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableColumnResizeEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'TCR';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( '_isResizingActive', false );\n\t\tthis.set( '_isResizingAllowed', true );\n\t\tthis._resizingData = null;\n\t\tthis._domEmitter = new ( DomEmitterMixin() )();\n\t\tthis._tableUtilsPlugin = editor.plugins.get( 'TableUtils' );\n\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:_isResizingAllowed', ( evt, name, value ) => {\n\t\t\t// Toggling the `ck-column-resize_disabled` class shows and hides the resizers through CSS.\n\t\t\tconst classAction = value ? 'removeClass' : 'addClass';\n\n\t\t\teditor.editing.view.change( writer => {\n\t\t\t\tfor ( const root of editor.editing.view.document.roots ) {\n\t\t\t\t\twriter[ classAction ]( 'ck-column-resize_disabled', editor.editing.view.document.getRoot( root.rootName )! );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\tthis.on<ObservableChangeEvent<boolean>>( 'change:_isResizingActive', ( evt, name, value ) => {\n\t\t\tconst classAction = value ? 'add' : 'remove';\n\n\t\t\tglobal.document.body.classList[ classAction ]( 'ck-table-column-resize__resizing-cursor' );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis._extendSchema();\n\t\tthis._registerPostFixer();\n\t\tthis._registerConverters();\n\t\tthis._registerResizingListeners();\n\t\tthis._registerResizerInserter();\n\n\t\tthis.decorate( '_setResizingTableWidth' );\n\t\tthis.decorate( '_getResizingTableWidth' );\n\n\t\tconst editor = this.editor;\n\t\tconst columnResizePlugin: TableColumnResize = editor.plugins.get( 'TableColumnResize' );\n\t\tconst tableEditing: TableEditing = editor.plugins.get( 'TableEditing' );\n\n\t\ttableEditing.registerAdditionalSlot( {\n\t\t\tfilter: element => element.is( 'element', 'tableColumnGroup' ),\n\t\t\tpositionOffset: 0\n\t\t} );\n\n\t\tconst tableWidthsCommand = new TableWidthsCommand( editor );\n\n\t\t// For backwards compatibility we have two commands that perform exactly the same operation.\n\t\teditor.commands.add( 'resizeTableWidth', tableWidthsCommand );\n\t\teditor.commands.add( 'resizeColumnWidths', tableWidthsCommand );\n\n\t\teditor.commands.add( 'tableColumnWidth', new TableColumnWidthCommand( editor ) );\n\n\t\t// Currently the states of column resize and table resize (which is actually the last column resize) features\n\t\t// are bound together. They can be separated in the future by adding distinct listeners and applying\n\t\t// different CSS classes (e.g. `ck-column-resize_disabled` and `ck-table-resize_disabled`) to the editor root.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/12148 for the details.\n\t\tthis.bind( '_isResizingAllowed' ).to(\n\t\t\teditor, 'isReadOnly',\n\t\t\tcolumnResizePlugin, 'isEnabled',\n\t\t\ttableWidthsCommand, 'isEnabled',\n\t\t\t( isEditorReadOnly, isPluginEnabled, isTableWidthsCommandCommandEnabled ) =>\n\t\t\t\t!isEditorReadOnly && isPluginEnabled && isTableWidthsCommandCommandEnabled\n\t\t);\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst tableWidthCommand = editor.commands.get( 'tableWidth' );\n\n\t\t// When the table width unit changes (e.g. '%' -> 'px'), convert the column widths to match, so the table\n\t\t// width stays the single source of truth. Only on this user command, never on content load.\n\t\tif ( tableWidthCommand ) {\n\t\t\t// The width change and the column-unit reconciliation must share one batch (a single undo step). The\n\t\t\t// command reads `options.batch`; if the caller passed none, create one before the command runs so both\n\t\t\t// use it. The table properties UI already passes its own batch, so this only covers direct executions.\n\t\t\tthis.listenTo( tableWidthCommand, 'execute', ( evt, args ) => {\n\t\t\t\tconst options = ( args[ 0 ] || ( args[ 0 ] = {} ) ) as { batch?: Batch };\n\n\t\t\t\tif ( !options.batch ) {\n\t\t\t\t\toptions.batch = editor.model.createBatch();\n\t\t\t\t}\n\t\t\t}, { priority: 'high' } );\n\n\t\t\tthis.listenTo( tableWidthCommand, 'execute', ( evt, args ) => {\n\t\t\t\t// The high-priority listener above guarantees `args[ 0 ]` (and its batch) exists.\n\t\t\t\tconst options = args[ 0 ] as { batch?: Batch };\n\n\t\t\t\t// The command runs only when enabled, which means the selection is in a table.\n\t\t\t\tconst table = getSelectionAffectedTable( editor.model.document.selection )!;\n\n\t\t\t\teditor.model.enqueueChange( options.batch, writer => this._reconcileColumnUnits( writer, table ) );\n\t\t\t}, { priority: 'low' } );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._domEmitter.stopListening();\n\t\tthis._isResizingActive = false;\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * The table for which a column resize is currently in progress, or `null` if no resize is active.\n\t * Only one table can be resized at a time.\n\t */\n\tpublic get resizingTable(): ModelElement | null {\n\t\treturn this._resizingData ? this._resizingData.elements.modelTable : null;\n\t}\n\n\t/**\n\t * Returns a 'tableColumnGroup' element from the 'table'.\n\t *\n\t * @param element A 'table' or 'tableColumnGroup' element.\n\t * @returns A 'tableColumnGroup' element.\n\t */\n\tpublic getColumnGroupElement( element: ModelElement ): ModelElement | undefined {\n\t\treturn getColumnGroupElement( element );\n\t}\n\n\t/**\n\t * Returns an array of 'tableColumn' elements.\n\t *\n\t * @param element A 'table' or 'tableColumnGroup' element.\n\t * @returns An array of 'tableColumn' elements.\n\t */\n\tpublic getTableColumnElements( element: ModelElement ): Array<ModelElement> {\n\t\treturn getTableColumnElements( element );\n\t}\n\n\t/**\n\t * Returns an array of table column widths.\n\t *\n\t * @param element A 'table' or 'tableColumnGroup' element.\n\t * @returns An array of table column widths.\n\t */\n\tpublic getTableColumnsWidths( element: ModelElement ): Array<string> {\n\t\treturn getTableColumnsWidths( element );\n\t}\n\n\t/**\n\t * Returns the table and the sorted, unique indexes of the columns covered by the given cells (a `colspan` cell\n\t * covers several columns). Returns `null` when the selection cannot be mapped onto columns - a non-resized table\n\t * or an irregular column structure.\n\t *\n\t * @param cells An array of 'tableCell' model elements.\n\t */\n\tpublic getColumnIndexesForCells( cells: Array<ModelElement> ): { table: ModelElement; columnIndexes: Array<number> } | null {\n\t\tconst table = cells.length ? cells[ 0 ].findAncestor( 'table' ) : null;\n\n\t\tif ( !table ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst columns = getTableColumnElements( table );\n\n\t\t// Bail on a non-resized table (no column group) or an irregular structure (merged columns or a column-count\n\t\t// mismatch), where a cell cannot be safely mapped onto a column.\n\t\tif (\n\t\t\t!columns.length ||\n\t\t\tcolumns.length !== this._tableUtilsPlugin.getColumns( table ) ||\n\t\t\tcolumns.some( column => column.hasAttribute( 'colSpan' ) )\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst columnIndexes = new Set<number>();\n\n\t\tfor ( const cell of cells ) {\n\t\t\tconst { leftEdge, rightEdge } = getColumnEdgesIndexes( cell, this._tableUtilsPlugin );\n\n\t\t\tfor ( let index = leftEdge; index <= rightEdge; index++ ) {\n\t\t\t\tcolumnIndexes.add( index );\n\t\t\t}\n\t\t}\n\n\t\treturn { table, columnIndexes: Array.from( columnIndexes ).sort( ( indexA, indexB ) => indexA - indexB ) };\n\t}\n\n\t/**\n\t * Applies the given width to every column in `columnIndexes`, keeping the whole table's width mode consistent\n\t * (see {@link module:table/tablecolumnresize/utils~isTableWidthInPixels}).\n\t *\n\t * @param writer A model writer instance.\n\t * @param table A 'table' model element.\n\t * @param columnIndexes Indexes of the columns the width is applied to.\n\t * @param value The width to apply. May be expressed in pixels or as a percentage.\n\t */\n\tpublic applyColumnWidths( writer: ModelWriter, table: ModelElement, columnIndexes: Array<number>, value: string ): void {\n\t\tif ( isTableWidthInPixels( table ) ) {\n\t\t\tapplyPixelColumnWidths( writer, table, columnIndexes, value );\n\t\t} else {\n\t\t\tthis._applyPercentageColumnWidths( writer, table, columnIndexes, value );\n\t\t}\n\t}\n\n\t/**\n\t * Converts the column widths of a resized table to the unit of the table's own width (`px` or `%`), so a table\n\t * width change (in the table properties) also switches the columns' unit. It is a no-op when the table is not\n\t * resized or the columns already use that unit.\n\t */\n\tprivate _reconcileColumnUnits( writer: ModelWriter, table: ModelElement ): void {\n\t\tconst tableColumnGroup = getColumnGroupElement( table );\n\n\t\tif ( !tableColumnGroup ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst columnWidths = getTableColumnsWidths( tableColumnGroup );\n\n\t\t// A missing/non-pixel table width means the percentage mode (the default), so both branches read off it.\n\t\tconst tableIsPixels = isTableWidthInPixels( table );\n\n\t\t// The columns already use the table's width unit - nothing to convert. The columns are concrete (the\n\t\t// post-fixer has normalized them) by the time a table width change reaches this point.\n\t\tif ( tableIsPixels === isColumnWidthsInPixels( columnWidths ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet reconciledWidths: Array<string>;\n\n\t\tif ( tableIsPixels ) {\n\t\t\t// '%' -> 'px': resolve each percentage against the table's pixel width.\n\t\t\tconst tableWidthInPixels = parseFloat( table.getAttribute( 'tableWidth' ) as string );\n\n\t\t\treconciledWidths = columnWidths.map( width => `${ toPrecision( parseFloat( width ) / 100 * tableWidthInPixels ) }px` );\n\t\t} else {\n\t\t\t// 'px' -> '%': express each column as a share of the columns' total width.\n\t\t\tconst totalWidth = sumArray( columnWidths.map( width => parseFloat( width ) ) );\n\n\t\t\treconciledWidths = columnWidths.map( width => `${ toPrecision( parseFloat( width ) / totalWidth * 100 ) }%` );\n\t\t}\n\n\t\tupdateColumnElements( getTableColumnElements( tableColumnGroup ), tableColumnGroup, reconciledWidths, writer );\n\t}\n\n\t/**\n\t * Applies a column width in the percentage mode: the target column gets the (clamped) percentage and the remaining\n\t * columns are redistributed proportionally so that all the widths keep summing up to 100%.\n\t */\n\tprivate _applyPercentageColumnWidths( writer: ModelWriter, table: ModelElement, columnIndexes: Array<number>, value: string ): void {\n\t\tconst columns = getTableColumnElements( table );\n\t\tconst widths = getTableColumnsWidths( table ).map( width => parseFloat( width ) );\n\n\t\t// Setting the last column has no next neighbor to balance against, so - like dragging the last column's right\n\t\t// edge - the table grows or shrinks while every other column keeps its width.\n\t\tif ( columnIndexes.includes( columns.length - 1 ) ) {\n\t\t\tthis._growTableToColumnWidths( writer, table, columns, widths, columnIndexes, value );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// This path keeps the table width, so a pixel value resolves stably against the current width.\n\t\tconst targetPercentage = value.trim().endsWith( '%' ) ?\n\t\t\tparseFloat( value ) :\n\t\t\tparseFloat( value ) / getTableWidthInPixels( table, this.editor ) * 100;\n\n\t\t// Otherwise every contiguous band of target columns is balanced against the column right after it, so the\n\t\t// table width stays the same (like dragging the border on the band's right edge). That column may not drop\n\t\t// below the minimum, which caps how wide the band columns can get.\n\t\tconst nextWidths = widths.slice();\n\n\t\tfor ( const band of getContiguousBands( columnIndexes ) ) {\n\t\t\tconst neighbor = band.end + 1;\n\t\t\tconst bandCount = band.indexes.length;\n\t\t\tconst available = band.indexes.reduce( ( sum, index ) => sum + widths[ index ], widths[ neighbor ] );\n\n\t\t\t// The band and its neighbor share `available`; both must stay at or above the minimum. When there is\n\t\t\t// not enough room for that, split `available` evenly so no column ends up below the minimum (or negative).\n\t\t\tif ( available < COLUMN_MIN_WIDTH_AS_PERCENTAGE * ( bandCount + 1 ) ) {\n\t\t\t\tconst equalWidth = available / ( bandCount + 1 );\n\n\t\t\t\tfor ( const index of band.indexes ) {\n\t\t\t\t\tnextWidths[ index ] = equalWidth;\n\t\t\t\t}\n\n\t\t\t\tnextWidths[ neighbor ] = equalWidth;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst target = clamp(\n\t\t\t\ttargetPercentage,\n\t\t\t\tCOLUMN_MIN_WIDTH_AS_PERCENTAGE,\n\t\t\t\t( available - COLUMN_MIN_WIDTH_AS_PERCENTAGE ) / bandCount\n\t\t\t);\n\n\t\t\tfor ( const index of band.indexes ) {\n\t\t\t\tnextWidths[ index ] = target;\n\t\t\t}\n\n\t\t\tnextWidths[ neighbor ] = available - target * bandCount;\n\t\t}\n\n\t\tcolumns.forEach( ( columnElement, index ) => {\n\t\t\twriter.setAttribute( 'columnWidth', `${ toPrecision( nextWidths[ index ] ) }%`, columnElement );\n\t\t} );\n\t}\n\n\t/**\n\t * Applies a width to the target columns in the percentage mode when the selection reaches the last column. As\n\t * there is no next column to balance against, the table itself grows or shrinks (like dragging the last column's\n\t * right edge): every other column keeps its absolute width, so expressed against the resized table their\n\t * percentages scale, and the table's own width scales by the inverse.\n\t */\n\tprivate _growTableToColumnWidths(\n\t\twriter: ModelWriter,\n\t\ttable: ModelElement,\n\t\tcolumns: Array<ModelElement>,\n\t\twidths: Array<number>,\n\t\tcolumnIndexes: Array<number>,\n\t\tvalue: string\n\t): void {\n\t\tconst targetColumns = new Set( columnIndexes );\n\t\tconst targetCount = columnIndexes.length;\n\t\tconst targetWidth = columnIndexes.reduce( ( sum, index ) => sum + widths[ index ], 0 );\n\n\t\t// Share currently taken by the other columns. If every column is selected there is nothing to grow the\n\t\t// table against, so the width is distributed equally instead.\n\t\tconst otherColumnsShare = 100 - targetWidth;\n\n\t\tif ( otherColumnsShare <= 0 ) {\n\t\t\tconst equalWidth = 100 / columns.length;\n\n\t\t\tcolumns.forEach( columnElement => {\n\t\t\t\twriter.setAttribute( 'columnWidth', `${ toPrecision( equalWidth ) }%`, columnElement );\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\tlet targetPercentage: number;\n\n\t\tif ( value.trim().endsWith( '%' ) ) {\n\t\t\ttargetPercentage = parseFloat( value );\n\t\t} else {\n\t\t\t// Resolve px against the *resulting* table width (other columns keep their width), so re-applying is idempotent.\n\t\t\tconst pixelWidth = parseFloat( value );\n\t\t\tconst otherColumnsWidth = otherColumnsShare / 100 * getTableWidthInPixels( table, this.editor );\n\n\t\t\ttargetPercentage = pixelWidth / ( otherColumnsWidth + targetCount * pixelWidth ) * 100;\n\t\t}\n\n\t\tconst target = clamp(\n\t\t\ttargetPercentage,\n\t\t\tCOLUMN_MIN_WIDTH_AS_PERCENTAGE,\n\t\t\tMath.max(\n\t\t\t\tCOLUMN_MIN_WIDTH_AS_PERCENTAGE,\n\t\t\t\t( 100 - COLUMN_MIN_WIDTH_AS_PERCENTAGE * ( columns.length - targetCount ) ) / targetCount\n\t\t\t)\n\t\t);\n\n\t\tconst scale = ( 100 - target * targetCount ) / otherColumnsShare;\n\n\t\tcolumns.forEach( ( columnElement, index ) => {\n\t\t\tconst next = targetColumns.has( index ) ? target : widths[ index ] * scale;\n\n\t\t\twriter.setAttribute( 'columnWidth', `${ toPrecision( next ) }%`, columnElement );\n\t\t} );\n\n\t\tconst tableWidth = parseFloat( table.getAttribute( 'tableWidth' ) as string );\n\n\t\tif ( !Number.isNaN( tableWidth ) ) {\n\t\t\twriter.setAttribute( 'tableWidth', `${ toPrecision( tableWidth / scale ) }%`, table );\n\t\t}\n\t}\n\n\t/**\n\t * Applies `width` to whichever element currently represents the table's actual width - by default the\n\t * widget's `<figure>`. Passing `null` clears it instead of setting anything.\n\t *\n\t * @internal\n\t */\n\tpublic _setResizingTableWidth( writer: ViewDowncastWriter, viewFigure: ViewElement, width: string | null ): void {\n\t\tif ( width === null ) {\n\t\t\twriter.removeStyle( 'width', viewFigure );\n\t\t} else {\n\t\t\twriter.setStyle( 'width', width, viewFigure );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the table's current actual width, read from whichever element holds it - by default the\n\t * widget's `<figure>`.\n\t *\n\t * @internal\n\t */\n\tpublic _getResizingTableWidth( viewFigure: ViewElement ): string {\n\t\treturn viewFigure.getStyle( 'width' )!;\n\t}\n\n\t/**\n\t * Registers new attributes for a table model element.\n\t */\n\tprivate _extendSchema() {\n\t\tconst schema = this.editor.model.schema;\n\n\t\tschema.extend( 'table', {\n\t\t\tallowAttributes: [ 'tableWidth' ]\n\t\t} );\n\n\t\tschema.register( 'tableColumnGroup', {\n\t\t\tallowIn: 'table',\n\t\t\tisLimit: true\n\t\t} );\n\n\t\tschema.register( 'tableColumn', {\n\t\t\tallowIn: 'tableColumnGroup',\n\t\t\tallowAttributes: [ 'columnWidth', 'colSpan' ],\n\t\t\tisLimit: true\n\t\t} );\n\n\t\tschema.setAttributeProperties( 'columnWidth', { isFormatting: true } );\n\t}\n\n\t/**\n\t * Registers table column resize post-fixer.\n\t *\n\t * It checks if the change from the differ concerns a table-related element or attribute. For detected changes it:\n\t *  * Adjusts the `columnWidths` attribute to guarantee that the sum of the widths from all columns is 100%.\n\t *  * Checks if the `columnWidths` attribute gets updated accordingly after columns have been added or removed.\n\t */\n\tprivate _registerPostFixer() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\n\t\tmodel.document.registerPostFixer( writer => {\n\t\t\tlet changed = false;\n\n\t\t\tfor ( const table of getChangedResizedTables( model ) ) {\n\t\t\t\tconst tableColumnGroup = this.getColumnGroupElement( table )!;\n\t\t\t\tconst columns = this.getTableColumnElements( tableColumnGroup );\n\t\t\t\tconst columnWidths = this.getTableColumnsWidths( tableColumnGroup );\n\n\t\t\t\t// The columns' own unit picks the path: a pixel group is resolved to concrete pixels, a percentage/auto\n\t\t\t\t// group is normalized to sum to 100%. So a pixel table with preserved percentage columns is left as-is.\n\t\t\t\tconst isPixelMode = isColumnWidthsInPixels( columnWidths );\n\n\t\t\t\tlet normalizedWidths = isPixelMode ?\n\t\t\t\t\tnormalizePixelColumnWidths( columnWidths, table ) :\n\t\t\t\t\tnormalizeColumnWidths( columnWidths );\n\n\t\t\t\t// If the number of columns has changed, then we need to adjust the widths of the affected columns.\n\t\t\t\tnormalizedWidths = adjustColumnWidths( normalizedWidths, table, this );\n\n\t\t\t\tif ( isPixelMode && normalizedWidths.length !== columnWidths.length ) {\n\t\t\t\t\t// In the pixel mode, inserting a column grows the table to the columns' new total instead of\n\t\t\t\t\t// scaling the existing columns down to a fixed width - so the widths the user already set are\n\t\t\t\t\t// kept and the new column gets the minimum width.\n\t\t\t\t\twriter.setAttribute( 'tableWidth', `${ toPrecision( sumArray( normalizedWidths ) ) }px`, table );\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise (for example after a manual table width change) the columns scale proportionally so\n\t\t\t\t\t// that they keep summing up to the table width.\n\t\t\t\t\tnormalizedWidths = scalePixelColumnsToTableWidth( normalizedWidths, table );\n\t\t\t\t}\n\n\t\t\t\tif ( isEqual( columnWidths, normalizedWidths ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tupdateColumnElements( columns, tableColumnGroup, normalizedWidths, writer );\n\n\t\t\t\tchanged = true;\n\t\t\t}\n\n\t\t\treturn changed;\n\t\t} );\n\n\t\t/**\n\t\t * Adjusts if necessary the `columnWidths` in case if the number of column has changed.\n\t\t *\n\t\t * @param columnWidths Note: this array **may be modified** by the function.\n\t\t * @param table Table to be checked.\n\t\t */\n\t\tfunction adjustColumnWidths( columnWidths: Array<string>, table: ModelElement, plugin: TableColumnResizeEditing ): Array<string> {\n\t\t\tconst newTableColumnsCount = plugin._tableUtilsPlugin.getColumns( table );\n\t\t\tconst columnsCountDelta = newTableColumnsCount - columnWidths.length;\n\n\t\t\tif ( columnsCountDelta === 0 ) {\n\t\t\t\treturn columnWidths;\n\t\t\t}\n\n\t\t\t// The columns' own unit (not the table's) decides the mode, so a pixel table with percentage columns\n\t\t\t// keeps them as percentages instead of relabelling e.g. '20%' as '20px'.\n\t\t\tconst isPixelMode = isColumnWidthsInPixels( columnWidths );\n\t\t\tconst widths: Array<number> = columnWidths.map( width => parseFloat( width ) );\n\n\t\t\t// Collect all cells that are affected by the change.\n\t\t\tconst cellSet = getAffectedCells( plugin.editor.model.document.differ, table ) as Set<ModelElement>;\n\n\t\t\tfor ( const cell of cellSet ) {\n\t\t\t\tconst currentColumnsDelta = newTableColumnsCount - widths.length;\n\n\t\t\t\tif ( currentColumnsDelta === 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// If the column count in the table changed, adjust the widths of the affected columns.\n\t\t\t\tconst hasMoreColumns = currentColumnsDelta > 0;\n\t\t\t\tconst currentColumnIndex = plugin._tableUtilsPlugin.getCellLocation( cell ).column;\n\n\t\t\t\tif ( hasMoreColumns ) {\n\t\t\t\t\t// Inserted columns get the minimum width in the table's current unit.\n\t\t\t\t\tconst insertedColumnWidth = isPixelMode ?\n\t\t\t\t\t\tCOLUMN_MIN_WIDTH_IN_PIXELS :\n\t\t\t\t\t\tgetColumnMinWidthAsPercentage( table, plugin.editor );\n\t\t\t\t\tconst columnWidthsToInsert = createFilledArray( currentColumnsDelta, insertedColumnWidth );\n\n\t\t\t\t\twidths.splice( currentColumnIndex, 0, ...columnWidthsToInsert );\n\t\t\t\t} else {\n\t\t\t\t\t// Moves the widths of the removed columns to the preceding one.\n\t\t\t\t\t// Other editors either reduce the width of the whole table or adjust the widths\n\t\t\t\t\t// proportionally, so change of this behavior can be considered in the future.\n\t\t\t\t\tconst removedColumnWidths = widths.splice( currentColumnIndex, Math.abs( currentColumnsDelta ) );\n\n\t\t\t\t\twidths[ currentColumnIndex ] += sumArray( removedColumnWidths );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn widths.map( width => `${ width }${ isPixelMode ? 'px' : '%' }` );\n\t\t}\n\n\t\t/**\n\t\t * Returns a set of cells that have been changed in a given table.\n\t\t */\n\t\tfunction getAffectedCells( differ: Differ, table: ModelElement ): Set<ModelElement> {\n\t\t\tconst cellSet = new Set<ModelElement>();\n\n\t\t\tfor ( const change of differ.getChanges() ) {\n\t\t\t\tif (\n\t\t\t\t\tchange.type == 'insert' &&\n\t\t\t\t\tchange.position.nodeAfter &&\n\t\t\t\t\t( change.position.nodeAfter as ModelElement ).name == 'tableCell' &&\n\t\t\t\t\tchange.position.nodeAfter.getAncestors().includes( table )\n\t\t\t\t) {\n\t\t\t\t\tcellSet.add( change.position.nodeAfter as ModelElement );\n\t\t\t\t} else if ( change.type == 'remove' ) {\n\t\t\t\t\t// If the first cell was removed, use the node after the change position instead.\n\t\t\t\t\tconst referenceNode = ( change.position.nodeBefore || change.position.nodeAfter ) as ModelElement;\n\n\t\t\t\t\tif ( referenceNode.name == 'tableCell' && referenceNode.getAncestors().includes( table ) ) {\n\t\t\t\t\t\tcellSet.add( referenceNode );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn cellSet;\n\t\t}\n\t}\n\n\t/**\n\t * Registers table column resize converters.\n\t */\n\tprivate _registerConverters() {\n\t\tconst editor = this.editor;\n\t\tconst conversion = editor.conversion;\n\n\t\t// Table width style\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: /^(figure|table)$/,\n\t\t\t\tstyles: {\n\t\t\t\t\twidth: /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'tableWidth',\n\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\tconst parent = viewElement.parent!;\n\n\t\t\t\t\tif ( parent.is( 'element', 'figure' ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn viewElement.getStyle( 'width' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tconversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tname: 'table',\n\t\t\t\tkey: 'tableWidth'\n\t\t\t},\n\t\t\tview: ( width: string ) => ( {\n\t\t\t\tname: 'figure',\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\twidth\n\t\t\t\t}\n\t\t\t} )\n\t\t} );\n\n\t\tconversion.elementToElement( { model: 'tableColumnGroup', view: 'colgroup' } );\n\t\tconversion.elementToElement( { model: 'tableColumn', view: 'col' } );\n\n\t\tconversion.for( 'downcast' ).add( downcastTableResizedClass() );\n\n\t\tconversion.for( 'upcast' ).add( upcastTableResizedClass() );\n\t\tconversion.for( 'upcast' ).add( upcastColgroupElement( this._tableUtilsPlugin ) );\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'col',\n\t\t\t\tstyles: {\n\t\t\t\t\twidth: /.*/\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'columnWidth',\n\t\t\t\tvalue: ( viewElement: ViewElement ) => {\n\t\t\t\t\tconst viewColWidth = viewElement.getStyle( 'width' );\n\n\t\t\t\t\t// 'pt' is the default unit for table column width pasted from MS Office.\n\t\t\t\t\t// See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for more details.\n\t\t\t\t\t// 'px' is accepted only when the whole table is sized in pixels - the table width is the single\n\t\t\t\t\t// source of truth for the width mode, so a stray pixel column in a non-pixel table is dropped\n\t\t\t\t\t// and falls back to an even share, just like any other unsupported unit.\n\t\t\t\t\tif (\n\t\t\t\t\t\t!viewColWidth ||\n\t\t\t\t\t\t( !viewColWidth.endsWith( '%' ) && !viewColWidth.endsWith( 'pt' ) &&\n\t\t\t\t\t\t\t!( viewColWidth.endsWith( 'px' ) && isViewTableWidthInPixels( viewElement ) ) )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn 'auto';\n\t\t\t\t\t}\n\n\t\t\t\t\treturn viewColWidth;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// The `col[span]` attribute is present in tables pasted from MS Excel. We use it to set the temporary `colSpan` model attribute,\n\t\t// which is consumed during the `colgroup` element upcast.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for more details.\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'col',\n\t\t\t\tkey: 'span'\n\t\t\t},\n\t\t\tmodel: 'colSpan'\n\t\t} );\n\n\t\tconversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tname: 'tableColumn',\n\t\t\t\tkey: 'columnWidth'\n\t\t\t},\n\t\t\tview: width => ( { key: 'style', value: { width } } )\n\t\t} );\n\t}\n\n\t/**\n\t * Registers listeners to handle resizing process.\n\t */\n\tprivate _registerResizingListeners() {\n\t\tconst editingView = this.editor.editing.view;\n\n\t\teditingView.addObserver( MouseEventsObserver );\n\t\teditingView.document.on( 'mouseover', this._onMouseOverHandler.bind( this ), { priority: 'high' } );\n\t\teditingView.document.on( 'mousedown', this._onMouseDownHandler.bind( this ), { priority: 'high' } );\n\t\teditingView.document.on( 'mouseout', this._onMouseOutHandler.bind( this ), { priority: 'high' } );\n\n\t\tthis._domEmitter.listenTo( global.window.document, 'mousemove', throttle( this._onMouseMoveHandler.bind( this ), 50 ) );\n\t\tthis._domEmitter.listenTo( global.window.document, 'mouseup', this._onMouseUpHandler.bind( this ) );\n\t}\n\n\t/**\n\t * Calculate and set `top` and `bottom` styles to the column resizer element to fit the height of the table.\n\t *\n\t * @param viewResizer The column resizer element.\n\t */\n\tprivate _recalculateResizerElement( viewResizer: ViewElement ): void {\n\t\tconst editor = this.editor;\n\t\tconst domConverter = editor.editing.view.domConverter;\n\n\t\t// Get DOM target figure ancestor element.\n\t\tconst domTable = domConverter.mapViewToDom( viewResizer.findAncestor( 'table' )! )!;\n\n\t\t// Get DOM table cell element.\n\t\tconst domCell = domConverter.mapViewToDom(\n\t\t\tviewResizer.findAncestor( item => [ 'td', 'th' ].includes( item.name ) )!\n\t\t)!;\n\n\t\tconst rectTable = new Rect( domTable );\n\t\tconst rectCell = new Rect( domCell );\n\n\t\t// Calculate the top, and bottom positions of the column resizer element.\n\t\tconst targetTopPosition = toPx( Number( ( rectTable.top - rectCell.top ).toFixed( 4 ) ) );\n\t\tconst targetBottomPosition = toPx( Number( ( rectCell.bottom - rectTable.bottom ).toFixed( 4 ) ) );\n\n\t\t// Set `top` and `bottom` styles to the column resizer element.\n\t\teditor.editing.view.change( viewWriter => {\n\t\t\tviewWriter.setStyle( 'top', targetTopPosition, viewResizer );\n\t\t\tviewWriter.setStyle( 'bottom', targetBottomPosition, viewResizer );\n\t\t} );\n\t}\n\n\t/**\n\t * Remove `top` and `bottom` styles of the column resizer element.\n\t *\n\t * @param viewResizer The column resizer element.\n\t */\n\tprivate _resetResizerStyles( viewResizer: ViewElement ): void {\n\t\tthis.editor.editing.view.change( viewWriter => {\n\t\t\tviewWriter.removeStyle( 'top', viewResizer );\n\t\t\tviewWriter.removeStyle( 'bottom', viewResizer );\n\t\t} );\n\t}\n\n\t/**\n\t * Handles the `mouseover` event on column resizer element.\n\t * Recalculates the `top` and `bottom` styles of the column resizer element to fit the height of the table.\n\t *\n\t * @param eventInfo An object containing information about the fired event.\n\t * @param domEventData The data related to the DOM event.\n\t */\n\tprivate _onMouseOverHandler( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData ) {\n\t\tconst target = domEventData.target;\n\n\t\tif ( !target.hasClass( 'ck-table-column-resizer' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._isResizingAllowed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._recalculateResizerElement( target );\n\t}\n\n\t/**\n\t * Handles the `mouseout` event on column resizer element.\n\t * When resizing is not active, it resets the `top` and `bottom` styles of the column resizer element.\n\t *\n\t * @param eventInfo An object containing information about the fired event.\n\t * @param domEventData The data related to the DOM event.\n\t */\n\tprivate _onMouseOutHandler( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData ) {\n\t\tconst target = domEventData.target;\n\n\t\tif ( !target.hasClass( 'ck-table-column-resizer' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._isResizingAllowed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._isResizingActive ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._resetResizerStyles( target );\n\t}\n\n\t/**\n\t * Handles the `mousedown` event on column resizer element:\n\t *  * calculates the initial column pixel widths,\n\t *  * inserts the `<colgroup>` element if it is not present in the `<table>`,\n\t *  * puts the necessary data in the temporary storage,\n\t *  * applies the attributes to the `<table>` view element.\n\t *\n\t * @param eventInfo An object containing information about the fired event.\n\t * @param domEventData The data related to the DOM event.\n\t */\n\tprivate _onMouseDownHandler( eventInfo: EventInfo, domEventData: ViewDocumentDomEventData ) {\n\t\tconst target = domEventData.target;\n\n\t\tif ( !target.hasClass( 'ck-table-column-resizer' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._isResizingAllowed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst editor = this.editor;\n\t\tconst modelTable = editor.editing.mapper.toModelElement( target.findAncestor( 'figure' )! )!;\n\n\t\t// Do not resize if table model is in non-editable place.\n\t\tif ( !editor.model.canEditAt( modelTable ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdomEventData.preventDefault();\n\t\teventInfo.stop();\n\n\t\tthis._initialMouseEventData = domEventData;\n\t}\n\n\t/**\n\t * Starts the resizing process after the threshold is reached.\n\t */\n\tprivate _startResizingAfterThreshold() {\n\t\tconst domEventData = this._initialMouseEventData!;\n\t\tconst { target } = domEventData;\n\n\t\tconst modelTable = this.editor.editing.mapper.toModelElement( target.findAncestor( 'figure' )! )!;\n\t\tconst viewTable = target.findAncestor( 'table' )!;\n\t\tconst viewFigure = target.findAncestor( 'figure' ) as ViewElement;\n\n\t\t// The table width unit decides whether the resize works in pixels or percentages.\n\t\tconst isPixelMode = isTableWidthInPixels( modelTable );\n\n\t\t// Calculate the initial column widths in pixels.\n\t\tconst columnWidthsInPx = _calculateDomColumnWidths( modelTable, this._tableUtilsPlugin, this.editor );\n\n\t\t// Insert colgroup for the table that is resized for the first time.\n\t\tif ( !Array.from( viewTable.getChildren() ).find( viewCol => viewCol.is( 'element', 'colgroup' ) ) ) {\n\t\t\tthis.editor.editing.view.change( viewWriter => {\n\t\t\t\t_insertColgroupElement( viewWriter, columnWidthsInPx, viewTable, isPixelMode );\n\t\t\t} );\n\t\t}\n\n\t\tthis._isResizingActive = true;\n\t\tthis._resizingData = this._getResizingData( domEventData, columnWidthsInPx );\n\n\t\t// At this point we change only the editor view - we don't want other users to see our changes yet,\n\t\t// so we can't apply them in the model.\n\t\tthis.editor.editing.view.change( writer => {\n\t\t\tconst initialWidth = _applyResizingAttributesToTable( writer, viewTable, this._resizingData! );\n\n\t\t\tthis._setResizingTableWidth( writer, viewFigure, initialWidth );\n\t\t} );\n\n\t\t/**\n\t\t * Calculates the DOM columns' widths. It is done by taking the width of the widest cell\n\t\t * from each table column (we rely on the  {@link module:table/tablewalker~TableWalker}\n\t\t * to determine which column the cell belongs to).\n\t\t *\n\t\t * @param modelTable A table which columns should be measured.\n\t\t * @param tableUtils The Table Utils plugin instance.\n\t\t * @param editor The editor instance.\n\t\t * @returns Columns' widths expressed in pixels (without unit).\n\t\t */\n\t\tfunction _calculateDomColumnWidths( modelTable: ModelElement, tableUtilsPlugin: TableUtils, editor: Editor ) {\n\t\t\tconst columnWidthsInPx = Array( tableUtilsPlugin.getColumns( modelTable ) );\n\t\t\tconst tableWalker = new TableWalker( modelTable );\n\n\t\t\tfor ( const cellSlot of tableWalker ) {\n\t\t\t\tconst viewCell = editor.editing.mapper.toViewElement( cellSlot.cell )!;\n\t\t\t\tconst domCell = editor.editing.view.domConverter.mapViewToDom( viewCell )!;\n\t\t\t\tconst domCellWidth = getDomCellOuterWidth( domCell );\n\n\t\t\t\tif ( !columnWidthsInPx[ cellSlot.column ] || domCellWidth < columnWidthsInPx[ cellSlot.column ] ) {\n\t\t\t\t\tcolumnWidthsInPx[ cellSlot.column ] = toPrecision( domCellWidth );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn columnWidthsInPx;\n\t\t}\n\n\t\t/**\n\t\t * Creates a `<colgroup>` element with `<col>`s and inserts it into a given view table.\n\t\t *\n\t\t * @param viewWriter A writer instance.\n\t\t * @param columnWidthsInPx Column widths.\n\t\t * @param viewTable A table view element.\n\t\t */\n\t\tfunction _insertColgroupElement(\n\t\t\tviewWriter: ViewDowncastWriter,\n\t\t\tcolumnWidthsInPx: Array<number>,\n\t\t\tviewTable: ViewElement,\n\t\t\tisPixelMode: boolean\n\t\t) {\n\t\t\tconst colgroup = viewWriter.createContainerElement( 'colgroup' );\n\n\t\t\tfor ( let i = 0; i < columnWidthsInPx.length; i++ ) {\n\t\t\t\tconst viewColElement = viewWriter.createEmptyElement( 'col' );\n\n\t\t\t\t// In the pixel mode keep the measured absolute widths; otherwise express them as percentages.\n\t\t\t\tconst columnWidth = isPixelMode ?\n\t\t\t\t\t`${ toPrecision( columnWidthsInPx[ i ] ) }px` :\n\t\t\t\t\t`${ toPrecision( columnWidthsInPx[ i ] / sumArray( columnWidthsInPx ) * 100 ) }%`;\n\n\t\t\t\tviewWriter.setStyle( 'width', columnWidth, viewColElement );\n\t\t\t\tviewWriter.insert( viewWriter.createPositionAt( colgroup, 'end' ), viewColElement );\n\t\t\t}\n\n\t\t\tviewWriter.insert( viewWriter.createPositionAt( viewTable, 0 ), colgroup );\n\t\t}\n\n\t\t/**\n\t\t * Applies the classes to the view table as the resizing begun, and computes the initial live width.\n\t\t *\n\t\t * @param viewWriter A writer instance.\n\t\t * @param viewTable A table containing the clicked resizer.\n\t\t * @param resizingData Data related to the resizing.\n\t\t * @returns The table's current width as a `%` string, e.g. for seeding {@link #_setResizingTableWidth}.\n\t\t */\n\t\tfunction _applyResizingAttributesToTable(\n\t\t\tviewWriter: ViewDowncastWriter,\n\t\t\tviewTable: ViewElement,\n\t\t\tresizingData: ResizingData\n\t\t): string {\n\t\t\tviewWriter.addClass( 'ck-table-resized', viewTable );\n\t\t\tviewWriter.addClass( 'ck-table-column-resizer__active', resizingData.elements.viewResizer );\n\n\t\t\t// Seed from the exact model width, not a re-measurement: the rendered figure is ~1px wider than its\n\t\t\t// declared width, which would otherwise inflate the table on every inner-column drag.\n\t\t\tif ( resizingData.flags.isPixelMode ) {\n\t\t\t\treturn `${ toPrecision( parseFloat( resizingData.elements.modelTable.getAttribute( 'tableWidth' ) as string ) ) }px`;\n\t\t\t}\n\n\t\t\t// A percentage width is a share of the parent; the figure may be capped under `TableScroll`, so use the larger.\n\t\t\tconst figureWidth = Math.max( resizingData.widths.tableWidth, resizingData.widths.viewFigureWidth );\n\n\t\t\treturn `${ toPrecision( figureWidth / resizingData.widths.viewFigureParentWidth * 100 ) }%`;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the `mousemove` event.\n\t *  * If resizing process is not in progress, it does nothing.\n\t *  * If resizing is active but not allowed, it stops the resizing process instantly calling the `mousedown` event handler.\n\t *  * Otherwise it dynamically updates the widths of the resized columns.\n\t *\n\t * @param eventInfo An object containing information about the fired event.\n\t * @param mouseEventData The native DOM event.\n\t */\n\tprivate _onMouseMoveHandler( eventInfo: EventInfo, mouseEventData: MouseEvent ) {\n\t\tif ( this._initialMouseEventData ) {\n\t\t\tconst mouseEvent = this._initialMouseEventData.domEvent as MouseEvent;\n\t\t\tconst distanceX = Math.abs( mouseEventData.clientX - mouseEvent.clientX );\n\n\t\t\tif ( distanceX >= COLUMN_RESIZE_DISTANCE_THRESHOLD ) {\n\t\t\t\tthis._startResizingAfterThreshold();\n\t\t\t\tthis._initialMouseEventData = null;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( !this._isResizingActive ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this._isResizingAllowed ) {\n\t\t\tthis._onMouseUpHandler();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst { plugins } = this.editor;\n\t\tconst {\n\t\t\tcolumnPosition,\n\t\t\tflags: {\n\t\t\t\tisRightEdge,\n\t\t\t\tisTableCentered,\n\t\t\t\tisLtrContent,\n\t\t\t\tisPixelMode,\n\t\t\t\tisTableWidthWithinContainerAtDragStart,\n\t\t\t\tisTableScrollAllowed\n\t\t\t},\n\t\t\telements: {\n\t\t\t\tmodelTable,\n\t\t\t\tviewFigure,\n\t\t\t\tviewLeftColumn,\n\t\t\t\tviewRightColumn,\n\t\t\t\tviewResizer\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tviewFigureParentWidth,\n\t\t\t\ttableWidth,\n\t\t\t\tleftColumnWidth,\n\t\t\t\trightColumnWidth\n\t\t\t}\n\t\t} = this._resizingData!;\n\n\t\tconst dxLowerBound = -leftColumnWidth + COLUMN_MIN_WIDTH_IN_PIXELS;\n\t\tconst tableScrollPlugin = plugins.has( 'TableScrollEditing' ) ? plugins.get( 'TableScrollEditing' ) : null;\n\t\tconst isTableScrollActive = !!tableScrollPlugin && isTableScrollAllowed;\n\t\tconst containerWidth = getEditableContentWidth( this.editor, modelTable.root.rootName! )!;\n\n\t\tlet dxUpperBound: number;\n\n\t\tif ( isRightEdge ) {\n\t\t\tdxUpperBound = isTableScrollActive ? Infinity : viewFigureParentWidth - tableWidth;\n\t\t} else {\n\t\t\tdxUpperBound = rightColumnWidth! - COLUMN_MIN_WIDTH_IN_PIXELS;\n\t\t}\n\n\t\tconst rawDx = mouseEventData.clientX - columnPosition;\n\t\tconst ltrSign = isLtrContent ? 1 : -1;\n\t\tconst isCenteredRightEdge = isRightEdge && isTableCentered;\n\n\t\tlet dx: number;\n\n\t\t// A centered table grows symmetrically (both margins shrink), so dragging by 1px widens it by 2px -\n\t\t// until it fills the container. Past that point it can't stay centered (margins can't go negative),\n\t\t// so it sits flush and grows 1:1 instead. In other words, width as a function of mouse movement is\n\t\t// a single line that changes slope (2 before the crossover, 1 after) exactly where the table's\n\t\t// width equals the container's width.\n\t\tif ( isTableScrollActive && isCenteredRightEdge ) {\n\t\t\tconst mouseDelta = rawDx * ltrSign;\n\n\t\t\tlet newTableWidth: number;\n\n\t\t\tif ( isTableWidthWithinContainerAtDragStart ) {\n\t\t\t\t// Starts within the container: doubled growth up to the crossover, then 1:1 past it.\n\t\t\t\tconst crossoverPoint = ( containerWidth - tableWidth ) / 2;\n\n\t\t\t\tnewTableWidth = mouseDelta <= crossoverPoint ?\n\t\t\t\t\ttableWidth + 2 * mouseDelta :\n\t\t\t\t\tcontainerWidth + ( mouseDelta - crossoverPoint );\n\t\t\t} else {\n\t\t\t\t// Starts already overflowing: 1:1 until shrunk back under the crossover, then doubled past it.\n\t\t\t\tconst crossoverPoint = containerWidth - tableWidth;\n\n\t\t\t\tnewTableWidth = mouseDelta >= crossoverPoint ?\n\t\t\t\t\ttableWidth + mouseDelta :\n\t\t\t\t\tcontainerWidth + 2 * ( mouseDelta - crossoverPoint );\n\t\t\t}\n\n\t\t\tdx = newTableWidth - tableWidth;\n\t\t} else {\n\t\t\tconst multiplier = ltrSign * ( isCenteredRightEdge ? 2 : 1 );\n\n\t\t\tdx = rawDx * multiplier;\n\t\t}\n\n\t\tdx = clamp(\n\t\t\tdx,\n\t\t\tMath.min( dxLowerBound, 0 ),\n\t\t\tMath.max( dxUpperBound, 0 )\n\t\t);\n\n\t\t// Snap onto exactly 100% of the container width when close, and make it deliberately hard (but not\n\t\t// impossible) to drag the table's right edge past that point.\n\t\tif ( isTableScrollActive && isRightEdge ) {\n\t\t\tconst resistedTableWidth = applyContainerWidthResistance( tableWidth + dx, containerWidth );\n\n\t\t\tdx = clamp(\n\t\t\t\tresistedTableWidth - tableWidth,\n\t\t\t\tMath.min( dxLowerBound, 0 ),\n\t\t\t\tMath.max( dxUpperBound, 0 )\n\t\t\t);\n\t\t}\n\n\t\tif ( dx === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.editor.editing.view.change( writer => {\n\t\t\t// In the pixel mode widths stay absolute; in the percentage mode they are expressed relative to a basis\n\t\t\t// (the table width for columns, the figure parent width for the table itself).\n\t\t\tconst toWidthValue = ( widthInPx: number, basisInPx: number ): string => isPixelMode ?\n\t\t\t\t`${ toPrecision( widthInPx ) }px` :\n\t\t\t\t`${ toPrecision( widthInPx * 100 / basisInPx ) }%`;\n\n\t\t\twriter.setStyle( 'width', toWidthValue( leftColumnWidth + dx, tableWidth ), viewLeftColumn );\n\n\t\t\tif ( isRightEdge ) {\n\t\t\t\t// A pixel-mode table keeps its absolute width; otherwise the width is a percentage of the parent.\n\t\t\t\tconst tableFigureWidth = isPixelMode ?\n\t\t\t\t\t`${ toPrecision( tableWidth + dx ) }px` :\n\t\t\t\t\t`${ toPrecision( ( tableWidth + dx ) * 100 / viewFigureParentWidth ) }%`;\n\n\t\t\t\tthis._setResizingTableWidth( writer, viewFigure, tableFigureWidth );\n\t\t\t} else {\n\t\t\t\twriter.setStyle( 'width', toWidthValue( rightColumnWidth! - dx, tableWidth ), viewRightColumn! );\n\t\t\t}\n\t\t} );\n\n\t\tthis._recalculateResizerElement( viewResizer );\n\t}\n\n\t/**\n\t * Handles the `mouseup` event.\n\t *  * If resizing process is not in progress, it does nothing.\n\t *  * If resizing is active but not allowed, it cancels the resizing process restoring the original widths.\n\t *  * Otherwise it propagates the changes from view to the model by executing the adequate commands.\n\t */\n\tprivate _onMouseUpHandler() {\n\t\tthis._initialMouseEventData = null;\n\n\t\tif ( !this._isResizingActive ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\tviewResizer,\n\t\t\tmodelTable,\n\t\t\tviewFigure,\n\t\t\tviewTable,\n\t\t\tviewColgroup\n\t\t} = this._resizingData!.elements;\n\n\t\tconst { isPixelMode } = this._resizingData!.flags;\n\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\n\t\tconst tableColumnGroup = this.getColumnGroupElement( modelTable );\n\t\tconst viewColumns: Array<ViewElement> = Array\n\t\t\t.from( viewColgroup.getChildren() )\n\t\t\t.filter( ( column: ViewNode ): column is ViewElement => column.is( 'view:element' ) );\n\n\t\tconst columnWidthsAttributeOld = tableColumnGroup ?\n\t\t\tthis.getTableColumnsWidths( tableColumnGroup )! :\n\t\t\tnull;\n\n\t\tconst columnWidthsAttributeNew = viewColumns.map( column => column.getStyle( 'width' ) );\n\n\t\tconst isColumnWidthsAttributeChanged = !isEqual( columnWidthsAttributeOld, columnWidthsAttributeNew );\n\n\t\tconst tableWidthAttributeOld = modelTable.getAttribute( 'tableWidth' ) as string;\n\t\tconst tableWidthAttributeNew = this._getResizingTableWidth( viewFigure );\n\n\t\tconst isTableWidthAttributeChanged = tableWidthAttributeOld !== tableWidthAttributeNew;\n\n\t\tif ( isColumnWidthsAttributeChanged || isTableWidthAttributeChanged ) {\n\t\t\tif ( this._isResizingAllowed ) {\n\t\t\t\tconst tableWidthInPixels = toPrecision( tableWidthAttributeNew );\n\n\t\t\t\t// In the pixel mode the drag rewrites only the adjacent columns to pixels; the rest may still be\n\t\t\t\t// percentages (a valid loaded state). Resolve them against the *pre-drag* table width (their\n\t\t\t\t// untouched absolute width) so the model stays all-pixel and the columns still sum to the table.\n\t\t\t\tconst tableWidthInPixelsBeforeResize = toPrecision( tableWidthAttributeOld );\n\n\t\t\t\tconst columnWidths = isPixelMode ?\n\t\t\t\t\tcolumnWidthsAttributeNew.map( width =>\n\t\t\t\t\t\ttypeof width === 'string' && !width.endsWith( 'px' ) ?\n\t\t\t\t\t\t\t`${ toPrecision( parseFloat( width ) / 100 * tableWidthInPixelsBeforeResize ) }px` :\n\t\t\t\t\t\t\twidth\n\t\t\t\t\t) :\n\t\t\t\t\tcolumnWidthsAttributeNew;\n\n\t\t\t\teditor.execute( 'resizeTableWidth', {\n\t\t\t\t\ttable: modelTable,\n\t\t\t\t\ttableWidth: isPixelMode ?\n\t\t\t\t\t\t`${ toPrecision( tableWidthInPixels ) }px` :\n\t\t\t\t\t\t`${ toPrecision( tableWidthAttributeNew ) }%`,\n\t\t\t\t\tcolumnWidths\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\t// In read-only mode revert all changes in the editing view. The model is not touched so it does not need to be restored.\n\t\t\t\t// This case can occur if the read-only mode kicks in during the resizing process.\n\t\t\t\teditingView.change( writer => {\n\t\t\t\t\t// If table had resized columns before, restore the previous column widths.\n\t\t\t\t\t// Otherwise clean up the view from the temporary column resizing markup.\n\t\t\t\t\tif ( columnWidthsAttributeOld ) {\n\t\t\t\t\t\tfor ( const viewCol of viewColumns ) {\n\t\t\t\t\t\t\twriter.setStyle( 'width', columnWidthsAttributeOld.shift()!, viewCol );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.remove( viewColgroup );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isTableWidthAttributeChanged ) {\n\t\t\t\t\t\t// If the whole table was already resized before, restore the previous table width.\n\t\t\t\t\t\t// Otherwise clean up the view from the temporary table resizing markup.\n\t\t\t\t\t\tthis._setResizingTableWidth( writer, viewFigure, tableWidthAttributeOld || null );\n\t\t\t\t\t}\n\n\t\t\t\t\t// If a table and its columns weren't resized before,\n\t\t\t\t\t// prune the remaining common resizing markup.\n\t\t\t\t\tif ( !columnWidthsAttributeOld && !tableWidthAttributeOld ) {\n\t\t\t\t\t\twriter.removeClass( 'ck-table-resized', viewTable );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\teditingView.change( writer => {\n\t\t\twriter.removeClass( 'ck-table-column-resizer__active', viewResizer );\n\t\t} );\n\n\t\tconst element = editingView.domConverter.mapViewToDom( viewResizer )!;\n\n\t\tif ( !element.matches( ':hover' ) ) {\n\t\t\tthis._resetResizerStyles( viewResizer );\n\t\t}\n\n\t\tthis._isResizingActive = false;\n\t\tthis._resizingData = null;\n\t}\n\n\t/**\n\t * Retrieves and returns required data needed for the resizing process.\n\t *\n\t * @param domEventData The data of the `mousedown` event.\n\t * @param columnWidths The current widths of the columns.\n\t * @returns The data needed for the resizing process.\n\t */\n\tprivate _getResizingData( domEventData: ViewDocumentDomEventData, columnWidths: Array<number> ): ResizingData {\n\t\tconst editor = this.editor;\n\n\t\tconst columnPosition = ( domEventData.domEvent as Event & { clientX: number } ).clientX;\n\n\t\tconst viewResizer = domEventData.target;\n\t\tconst viewLeftCell = viewResizer.findAncestor( element => element.is( 'element', 'td' ) || element.is( 'element', 'th' ) )!;\n\t\tconst modelLeftCell = editor.editing.mapper.toModelElement( viewLeftCell )!;\n\t\tconst modelTable = modelLeftCell.findAncestor( 'table' )!;\n\n\t\tconst leftColumnIndex = getColumnEdgesIndexes( modelLeftCell, this._tableUtilsPlugin ).rightEdge;\n\t\tconst lastColumnIndex = this._tableUtilsPlugin.getColumns( modelTable ) - 1;\n\n\t\tlet tableAlignment = modelTable.getAttribute( 'tableAlignment' ) as string | undefined;\n\n\t\tif ( modelTable.getAttribute( 'tableType' ) !== 'layout' ) {\n\t\t\ttableAlignment ||= editor.config.get( 'table.tableProperties.defaultProperties.alignment' );\n\t\t\ttableAlignment ||= 'center';\n\t\t}\n\n\t\tconst isRightEdge = leftColumnIndex === lastColumnIndex;\n\t\tconst isLtrContent = editor.locale.contentLanguageDirection !== 'rtl';\n\t\tconst isTableCentered = tableAlignment === 'center';\n\t\tconst isPixelMode = isTableWidthInPixels( modelTable );\n\n\t\tconst viewTable = viewLeftCell.findAncestor( 'table' )!;\n\t\tconst viewFigure = viewTable.findAncestor( 'figure' ) as ViewElement;\n\t\tconst viewColgroup = [ ...viewTable.getChildren() as IterableIterator<ViewElement> ]\n\t\t\t.find( viewCol => viewCol.is( 'element', 'colgroup' ) )!;\n\t\tconst viewLeftColumn = viewColgroup.getChild( leftColumnIndex ) as ViewElement;\n\t\tconst viewRightColumn = isRightEdge ? undefined : viewColgroup.getChild( leftColumnIndex + 1 ) as ViewElement;\n\n\t\tconst domFigureParent = editor.editing.view.domConverter.mapViewToDom( viewFigure.parent! ) as HTMLElement;\n\t\tconst viewFigureParentWidth = getContainerContentWidth( domFigureParent );\n\n\t\tconst viewFigureWidth = getElementWidthInPixels( editor.editing.view.domConverter.mapViewToDom( viewFigure )! );\n\t\tconst tableWidth = getTableWidthInPixels( modelTable, editor );\n\t\tconst leftColumnWidth = columnWidths[ leftColumnIndex ];\n\t\tconst rightColumnWidth = isRightEdge ? undefined : columnWidths[ leftColumnIndex + 1 ];\n\t\tconst isTableWidthWithinContainerAtDragStart = tableWidth <= getEditableContentWidth( editor, modelTable.root.rootName! )!;\n\n\t\t// Whether the `TableScrollEditing` plugin considers this specific table eligible to overflow its\n\t\t// container (see `TableScrollEditing#_isTableScrollable`). Computed once, at the start of the drag,\n\t\t// since a table's type or position in the document doesn't change mid-resize.\n\t\tconst tableScrollPlugin = editor.plugins.has( 'TableScrollEditing' ) ? editor.plugins.get( 'TableScrollEditing' ) : null;\n\t\tconst isTableScrollAllowed = !!tableScrollPlugin && tableScrollPlugin._isTableScrollable( modelTable );\n\n\t\treturn {\n\t\t\tcolumnPosition,\n\t\t\tflags: {\n\t\t\t\tisRightEdge,\n\t\t\t\tisTableCentered,\n\t\t\t\tisLtrContent,\n\t\t\t\tisPixelMode,\n\t\t\t\tisTableWidthWithinContainerAtDragStart,\n\t\t\t\tisTableScrollAllowed\n\t\t\t},\n\t\t\telements: {\n\t\t\t\tviewResizer,\n\t\t\t\tmodelTable,\n\t\t\t\tviewFigure,\n\t\t\t\tviewTable,\n\t\t\t\tviewColgroup,\n\t\t\t\tviewLeftColumn,\n\t\t\t\tviewRightColumn\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tviewFigureWidth,\n\t\t\t\tviewFigureParentWidth,\n\t\t\t\ttableWidth,\n\t\t\t\tleftColumnWidth,\n\t\t\t\trightColumnWidth\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Registers a listener ensuring that each resizable cell have a resizer handle.\n\t */\n\tprivate _registerResizerInserter() {\n\t\tthis.editor.conversion.for( 'editingDowncast' ).add( dispatcher => {\n\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert:tableCell', ( evt, data, conversionApi ) => {\n\t\t\t\tconst modelElement = data.item;\n\t\t\t\tconst viewElement = conversionApi.mapper.toViewElement( modelElement );\n\t\t\t\tconst viewWriter = conversionApi.writer;\n\n\t\t\t\tviewWriter.insert(\n\t\t\t\t\tviewWriter.createPositionAt( viewElement!, 'end' ),\n\t\t\t\t\tviewWriter.createUIElement( 'div', { class: 'ck-table-column-resizer' } )\n\t\t\t\t);\n\t\t\t}, { priority: 'lowest' } );\n\t\t} );\n\t}\n}\n\n/**\n * Tells whether the table wrapping the given view `<col>` element is sized in pixels. The width is read from the\n * column's own table (or its wrapping `<figure>`), never from an ancestor further up, so a width-less table nested\n * inside a wider one is not mistaken for a pixel table.\n */\nfunction isViewTableWidthInPixels( viewColElement: ViewElement ): boolean {\n\tconst viewTable = viewColElement.findAncestor( element => element.is( 'element', 'table' ) )!;\n\tconst viewParent = viewTable.parent!;\n\tconst viewWidthHolder = viewParent.is( 'element', 'figure' ) ? viewParent : viewTable;\n\tconst width = viewWidthHolder.getStyle( 'width' );\n\n\treturn typeof width === 'string' && width.trim().endsWith( 'px' );\n}\n\n/**\n * In the pixel mode keeps the sum of the column widths equal to the table width. If they differ (for example after a\n * manual table width change), the columns are scaled proportionally so that they sum up to the table width. In the\n * percentage mode (or when the columns already sum to the table width) it is a no-op.\n */\nfunction scalePixelColumnsToTableWidth( columnWidths: Array<string>, table: ModelElement ): Array<string> {\n\tif ( !isTableWidthInPixels( table ) || !isColumnWidthsInPixels( columnWidths ) ) {\n\t\treturn columnWidths;\n\t}\n\n\tconst tableWidthInPixels = parseFloat( table.getAttribute( 'tableWidth' ) as string );\n\tconst totalWidth = sumArray( columnWidths );\n\n\tif ( !totalWidth || Math.abs( totalWidth - tableWidthInPixels ) < 0.5 ) {\n\t\treturn columnWidths;\n\t}\n\n\tconst factor = tableWidthInPixels / totalWidth;\n\n\treturn columnWidths.map( width => `${ toPrecision( parseFloat( width ) * factor ) }px` );\n}\n\n/**\n * Normalizes a pixel-mode column group to concrete pixel widths. It mirrors {@link ~normalizeColumnWidths} (the\n * percentage path): percentages are resolved against the table width, and missing (`auto`/`undefined`) columns are\n * filled from the width left over in the table - so the column group never keeps `auto` widths or mixes units, and\n * downstream arithmetic never sees a non-pixel value.\n */\nfunction normalizePixelColumnWidths( columnWidths: Array<string>, table: ModelElement ): Array<string> {\n\tconst tableWidthInPixels = parseFloat( table.getAttribute( 'tableWidth' ) as string );\n\n\t// Resolve each column to a pixel value; a percentage is taken against the table width, while an\n\t// `auto`/`undefined` column is deferred (marked as `null`) until the remaining width is known.\n\tconst pixelWidths = columnWidths.map( width => {\n\t\tif ( width === 'auto' || width === undefined ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn width.endsWith( '%' ) ? parseFloat( width ) / 100 * tableWidthInPixels : parseFloat( width );\n\t} );\n\n\tconst missingColumns = pixelWidths.filter( width => width === null ).length;\n\n\tif ( missingColumns ) {\n\t\tconst knownWidth = pixelWidths.reduce( ( sum: number, width ) => width === null ? sum : sum + width, 0 );\n\t\tconst widthForMissingColumn = Math.max(\n\t\t\t( tableWidthInPixels - knownWidth ) / missingColumns,\n\t\t\tCOLUMN_MIN_WIDTH_IN_PIXELS\n\t\t);\n\n\t\treturn pixelWidths.map( width => `${ toPrecision( width === null ? widthForMissingColumn : width ) }px` );\n\t}\n\n\treturn pixelWidths.map( width => `${ toPrecision( width! ) }px` );\n}\n\n/**\n * Applies a column width in the pixel mode: the target column gets the absolute width and the table's own width\n * grows or shrinks to the sum of all column widths.\n */\nfunction applyPixelColumnWidths( writer: ModelWriter, table: ModelElement, columnIndexes: Array<number>, value: string ): void {\n\tconst columns = getTableColumnElements( table );\n\tconst tableWidthInPixels = parseFloat( table.getAttribute( 'tableWidth' ) as string );\n\n\t// Express every column width in pixels. A column may still be a percentage (a pixel-width table can be\n\t// loaded/pasted with percentage columns, as widths are not converted on load), so a percentage is resolved\n\t// against the table width instead of being read as a raw pixel value.\n\tconst toPixels = ( width: string ): number => width.trim().endsWith( '%' ) ?\n\t\tparseFloat( width ) / 100 * tableWidthInPixels :\n\t\tparseFloat( width );\n\n\tconst targetPixels = Math.max( toPixels( value ), COLUMN_MIN_WIDTH_IN_PIXELS );\n\tconst widths = getTableColumnsWidths( table ).map( toPixels );\n\n\tfor ( const index of columnIndexes ) {\n\t\twidths[ index ] = targetPixels;\n\t}\n\n\t// Round each column once and derive the table width from those rounded values, so the table width always\n\t// equals the sum of the written column widths exactly (no sub-pixel drift from rounding each separately).\n\tconst roundedWidths = widths.map( width => toPrecision( width ) );\n\n\t// Rewrite all the columns (not only the target ones) so the column group never mixes '%' and 'px', and grow\n\t// or shrink the table to the sum of the pixel widths.\n\tcolumns.forEach( ( columnElement, index ) => {\n\t\twriter.setAttribute( 'columnWidth', `${ roundedWidths[ index ] }px`, columnElement );\n\t} );\n\n\twriter.setAttribute( 'tableWidth', `${ toPrecision( sumArray( roundedWidths ) ) }px`, table );\n}\n\n/**\n * Splits a sorted list of column indexes into maximal contiguous bands, for example `[ 0, 1, 3 ]` into `[ 0, 1 ]`\n * and `[ 3 ]`.\n */\nfunction getContiguousBands( columnIndexes: Array<number> ): Array<{ indexes: Array<number>; end: number }> {\n\tconst bands: Array<{ indexes: Array<number>; end: number }> = [];\n\n\tfor ( const index of columnIndexes ) {\n\t\tconst lastBand = bands[ bands.length - 1 ];\n\n\t\tif ( lastBand && index === lastBand.end + 1 ) {\n\t\t\tlastBand.indexes.push( index );\n\t\t\tlastBand.end = index;\n\t\t} else {\n\t\t\tbands.push( { indexes: [ index ], end: index } );\n\t\t}\n\t}\n\n\treturn bands;\n}\n\n/**\n * Given the table width a drag would naturally produce, returns the width that should actually be applied\n * once snapping and growth resistance around the container's width are taken into account:\n *\n *  * if the natural width lands close to the container's width (on either side), it's pulled to exactly\n *    match it,\n *  * if the natural width is past the container's width, it stays pinned at the container's width until the\n *    drag has gone far enough beyond it (the \"resistance\" zone) - past that point it keeps growing 1:1,\n *    continuing smoothly from where the resistance was overcome instead of jumping,\n *  * shrinking below the container's width is never resisted, only snapped when close.\n *\n * @internal\n */\nexport function applyContainerWidthResistance( naturalTableWidth: number, containerWidth: number ): number {\n\tconst distance = naturalTableWidth - containerWidth;\n\n\tif ( distance < 0 ) {\n\t\treturn -distance <= TABLE_WIDTH_SNAP_THRESHOLD_IN_PIXELS ? containerWidth : naturalTableWidth;\n\t}\n\n\tconst resistanceZone = TABLE_WIDTH_SNAP_THRESHOLD_IN_PIXELS + TABLE_WIDTH_GROWTH_RESISTANCE_IN_PIXELS;\n\n\treturn distance <= resistanceZone ? containerWidth : containerWidth + ( distance - resistanceZone );\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/**\n * @module table/tablecolumnresize\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { TableColumnResizeEditing } from './tablecolumnresize/tablecolumnresizeediting.js';\nimport { TableCellWidthEditing } from './tablecellwidth/tablecellwidthediting.js';\n\n/**\n * The table column resize feature.\n *\n * It provides the possibility to set the width of each column in a table using a resize handler.\n */\nexport class TableColumnResize extends Plugin {\n\t/**\n\t * @inheritDoc\n \t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableColumnResizeEditing, TableCellWidthEditing ]> {\n\t\treturn [ TableColumnResizeEditing, TableCellWidthEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n \t */\n\tpublic static get pluginName() {\n\t\treturn 'TableColumnResize' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\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/**\n * @module table/tablelayout/commands/tabletypecommand\n */\n\nimport { Command } from '@ckeditor/ckeditor5-core';\n\nimport { getSelectionAffectedTable } from '../../utils/common.js';\nimport type { TableType } from '../../tableconfig.js';\n\n/**\n * The set table type command.\n *\n * The command is registered by {@link module:table/tablelayout/tablelayoutediting~TableLayoutEditing}\n * as the `'tableType'` editor command.\n *\n * To set the table type at the current selection, execute the command and specify the table type:\n *\n * ```ts\n * editor.execute( 'tableType', 'layout' );\n * ```\n */\nexport class TableTypeCommand extends Command {\n\t/**\n\t * The table type of selected table.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: TableType | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedTable = getSelectionAffectedTable( selection );\n\n\t\tif ( selectedTable ) {\n\t\t\tthis.isEnabled = true;\n\t\t\tthis.value = selectedTable.getAttribute( 'tableType' ) as TableType;\n\t\t} else {\n\t\t\tthis.isEnabled = false;\n\t\t\tthis.value = null;\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * Set table type by the given table type parameter.\n\t *\n\t * @param tableType The type of table it should become.\n\t * @fires execute\n\t */\n\tpublic override execute( tableType: TableType ): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst table = getSelectionAffectedTable( selection );\n\t\tconst currentTableType = table.getAttribute( 'tableType' );\n\n\t\tif ( currentTableType === tableType ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setAttribute( 'tableType', tableType, table );\n\n\t\t\tmodel.schema.removeDisallowedAttributes( [ table ], writer );\n\n\t\t\tconst tableChildren = table.getChildren();\n\n\t\t\t// Check if all children are allowed for the new table type.\n\t\t\tfor ( const child of tableChildren ) {\n\t\t\t\tif ( !model.schema.checkChild( table, child ) ) {\n\t\t\t\t\twriter.remove( child );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\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/**\n * @module table/tablelayout/tablelayoutediting\n */\n\nimport { type Editor, Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport type { ClipboardContentInsertionEvent, ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard';\nimport type {\n\tDowncastDispatcher,\n\tUpcastDispatcher,\n\tUpcastElementEvent,\n\tViewElement,\n\tModelSchemaContext,\n\tModelWriter,\n\tViewConsumable\n} from '@ckeditor/ckeditor5-engine';\n\nimport { InsertTableLayoutCommand } from './../commands/inserttablelayoutcommand.js';\nimport { TableColumnResize } from '../tablecolumnresize.js';\nimport { TableTypeCommand } from './commands/tabletypecommand.js';\nimport { createEmptyTableCell } from '../utils/common.js';\nimport type { TableType } from '../tableconfig.js';\n\nconst TABLE_TYPES: Array<TableType> = [ 'content', 'layout' ];\n\n/**\n * The table layout editing plugin.\n */\nexport class TableLayoutEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableLayoutEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'TL';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableColumnResize ]> {\n\t\treturn [ TableColumnResize ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis._defineSchema();\n\t\tthis._defineConverters();\n\t\tthis._defineClipboardPasteHandlers();\n\t\tthis._registerTableTypeAttributePostfixer();\n\t\tthis.editor.commands.add( 'insertTableLayout', new InsertTableLayoutCommand( this.editor ) );\n\t\tthis.editor.commands.add( 'tableType', new TableTypeCommand( this.editor ) );\n\t}\n\n\t/**\n\t * Defines the schema for the table layout feature.\n\t */\n\tprivate _defineSchema() {\n\t\tconst { schema } = this.editor.model;\n\n\t\tschema.extend( 'table', {\n\t\t\tallowAttributes: 'tableType'\n\t\t} );\n\n\t\t// Disallow adding `caption` to layout table.\n\t\tschema.addChildCheck( layoutTableCheck, 'caption' );\n\n\t\t// Disallow adding `headingRows` attribute to layout table.\n\t\tschema.addAttributeCheck( layoutTableCheck, 'headingRows' );\n\n\t\t// Disallow adding `headingColumns` attribute to layout table.\n\t\tschema.addAttributeCheck( layoutTableCheck, 'headingColumns' );\n\n\t\t// Disallow adding `footerRows` attribute to layout table.\n\t\tschema.addAttributeCheck( layoutTableCheck, 'footerRows' );\n\t}\n\n\t/**\n\t * Defines the converters for the table layout feature.\n\t */\n\tprivate _defineConverters() {\n\t\tconst { editor } = this;\n\t\tconst { conversion } = editor;\n\n\t\tconst preferredExternalTableType = editor.config.get( 'table.tableLayout.preferredExternalTableType' );\n\n\t\tconversion.for( 'upcast' ).add( upcastLayoutTable( editor, preferredExternalTableType ) );\n\t\tconversion.for( 'dataDowncast' ).add( dataDowncastLayoutTable() );\n\t\tconversion.for( 'editingDowncast' ).attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: 'tableType',\n\t\t\t\tvalues: [ 'layout', 'content' ]\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tlayout: {\n\t\t\t\t\tkey: 'class',\n\t\t\t\t\tvalue: [ 'layout-table' ]\n\t\t\t\t},\n\t\t\t\tcontent: {\n\t\t\t\t\tkey: 'class',\n\t\t\t\t\tvalue: [ 'content-table' ]\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Handles the clipboard content insertion events.\n\t *\n\t * - If the content is from another editor, do not override the table type.\n\t * - If the content is from another source, set the table type to 'content'.\n\t *\n\t * It handles the scenario when user copies `<table></table>` from Word. We do not want to\n\t * change the table type to `layout` because it is really `content` table.\n\t */\n\tprivate _defineClipboardPasteHandlers(): void {\n\t\tconst { plugins } = this.editor;\n\n\t\tif ( !plugins.has( 'ClipboardPipeline' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst clipboardPipeline: ClipboardPipeline = plugins.get( 'ClipboardPipeline' );\n\n\t\tthis.listenTo<ClipboardContentInsertionEvent>( clipboardPipeline, 'contentInsertion', ( evt, data ) => {\n\t\t\t// If content is pasted from the other editor, skip overriding table type.\n\t\t\tif ( data.sourceEditorId ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For content from other sources, always set table type to 'content'.\n\t\t\tthis.editor.model.change( writer => {\n\t\t\t\tfor ( const { item } of writer.createRangeIn( data.content ) ) {\n\t\t\t\t\tif ( item.is( 'element', 'table' ) ) {\n\t\t\t\t\t\twriter.setAttribute( 'tableType', 'content', item );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a post-fixer that sets the `tableType` attribute to `content` for inserted \"default\" tables.\n\t * Also fixes potential issues with the table structure when the `tableType` attribute has been changed.\n\t */\n\tprivate _registerTableTypeAttributePostfixer() {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.document.registerPostFixer( ( writer: ModelWriter ) => {\n\t\t\tconst changes = editor.model.document.differ.getChanges();\n\t\t\tlet hasChanged = false;\n\n\t\t\tfor ( const entry of changes ) {\n\t\t\t\tif ( entry.type == 'insert' && entry.name != '$text' ) {\n\t\t\t\t\tconst element = entry.position.nodeAfter!;\n\t\t\t\t\tconst range = writer.createRangeOn( element );\n\n\t\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\t\tif ( item.is( 'element', 'table' ) && !item.hasAttribute( 'tableType' ) ) {\n\t\t\t\t\t\t\twriter.setAttribute( 'tableType', 'content', item );\n\t\t\t\t\t\t\thasChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Remove disallowed attributes and children for layout tables\n\t\t\t\t// when `tableType` attribute has been changed by `TableTypeCommand`.\n\t\t\t\tif ( entry.type == 'attribute' && entry.attributeKey == 'tableType' ) {\n\t\t\t\t\tfor ( const item of entry.range.getItems() ) {\n\t\t\t\t\t\t/* v8 ignore else -- `tableType` is only ever set on a single `table`, so the range holds no other items. */\n\t\t\t\t\t\tif ( item.is( 'element', 'table' ) ) {\n\t\t\t\t\t\t\teditor.model.schema.removeDisallowedAttributes( [ item ], writer );\n\n\t\t\t\t\t\t\tconst tableChildren = item.getChildren();\n\n\t\t\t\t\t\t\t// Check if all children are allowed for the new table type.\n\t\t\t\t\t\t\tfor ( const child of tableChildren ) {\n\t\t\t\t\t\t\t\tif ( !editor.model.schema.checkChild( item, child ) ) {\n\t\t\t\t\t\t\t\t\twriter.remove( child );\n\t\t\t\t\t\t\t\t\thasChanged = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn hasChanged;\n\t\t} );\n\t}\n}\n\n/**\n * View table element to model table element conversion helper.\n *\n * This conversion helper overrides the default table converter to meet table layout conditions.\n *\n * @param editor Editor instance.\n * @returns Conversion helper.\n */\nfunction upcastLayoutTable( editor: Editor, preferredExternalTableType: TableType | undefined ) {\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:table', ( evt, data, conversionApi ) => {\n\t\t\tconst viewTable = data.viewItem;\n\n\t\t\tif ( !conversionApi.consumable.test( viewTable, { name: true } ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst resolvedTableType = resolveTableType( viewTable, preferredExternalTableType );\n\n\t\t\t// When an element is a content table, then skip it.\n\t\t\tif ( resolvedTableType == 'content' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst table = conversionApi.writer.createElement( 'table', { tableType: 'layout' } );\n\n\t\t\tif ( !conversionApi.safeInsert( table, data.modelCursor ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconversionApi.consumable.consume( viewTable, { name: true } );\n\t\t\tconversionApi.consumable.consume( viewTable, { attributes: [ 'role' ] } );\n\t\t\tconversionApi.consumable.consume( viewTable, { classes: [ 'layout-table' ] } );\n\n\t\t\t// Layout tables have no border, so it's equitable to consume the border=\"0\" attribute.\n\t\t\tif ( viewTable.getAttribute( 'border' ) === '0' ) {\n\t\t\t\tconversionApi.consumable.consume( viewTable, { attributes: [ 'border' ] } );\n\t\t\t}\n\n\t\t\t// Get all rows from the table and convert them.\n\t\t\t// While looping over the children of `<table>` we can be sure that first will be `<tbody>`\n\t\t\t// and optionally `<thead>` and `<tfoot>`, and in these elements are the table rows found.\n\t\t\t// We can be sure of that because of `DomParser` handle it.\n\t\t\tfor ( const tableChild of viewTable.getChildren() ) {\n\t\t\t\tif ( tableChild.is( 'element' ) ) {\n\t\t\t\t\tfor ( const row of tableChild.getChildren() ) {\n\t\t\t\t\t\tif ( row.is( 'element', 'tr' ) ) {\n\t\t\t\t\t\t\tconversionApi.convertItem( row, conversionApi.writer.createPositionAt( table, 'end' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert everything else.\n\t\t\tconversionApi.convertChildren( viewTable, conversionApi.writer.createPositionAt( table, 'end' ) );\n\n\t\t\t// Create one row and one table cell for empty table.\n\t\t\tif ( table.isEmpty ) {\n\t\t\t\tconst row = conversionApi.writer.createElement( 'tableRow' );\n\n\t\t\t\tconversionApi.writer.insert( row, conversionApi.writer.createPositionAt( table, 'end' ) );\n\t\t\t\tcreateEmptyTableCell( conversionApi.writer, conversionApi.writer.createPositionAt( row, 'end' ) );\n\t\t\t}\n\n\t\t\tconversionApi.updateConversionResult( table, data );\n\t\t}, { priority: 'high' } );\n\n\t\t// Sets only the table type attribute.\n\t\tdispatcher.on<UpcastElementEvent>( 'element:table', ( evt, data, conversionApi ) => {\n\t\t\tconst { viewItem, modelRange } = data;\n\n\t\t\tif ( modelRange ) {\n\t\t\t\tconst resolvedType = resolveTableType( viewItem, preferredExternalTableType );\n\n\t\t\t\tconversionApi.writer.setAttribute( 'tableType', resolvedType, modelRange );\n\t\t\t\tconsumeViewTableClasses( conversionApi.consumable, viewItem );\n\n\t\t\t\tif ( resolvedType === 'content' && viewItem.parent?.is( 'element', 'figure' ) ) {\n\t\t\t\t\tconsumeViewTableClasses( conversionApi.consumable, viewItem.parent );\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'low' } );\n\t};\n}\n\n/**\n * Consume all possible classes that determine type of table on provided view item.\n */\nfunction consumeViewTableClasses( consumable: ViewConsumable, viewItem: ViewElement ) {\n\tconsumable.consume( viewItem, { classes: [ 'layout-table' ] } );\n\tconsumable.consume( viewItem, { classes: [ 'content-table' ] } );\n}\n\n/**\n * Model table container element to view table element conversion helper.\n *\n * @returns Conversion helper.\n */\nfunction dataDowncastLayoutTable() {\n\treturn ( dispatcher: DowncastDispatcher ): void => {\n\t\treturn dispatcher.on( 'attribute:tableType:table', ( evt, data, conversionApi ) => {\n\t\t\tconst { item, attributeNewValue } = data;\n\t\t\tconst { mapper, writer } = conversionApi;\n\n\t\t\tif ( !conversionApi.consumable.test( item, evt.name ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst table = mapper.toViewElement( item );\n\n\t\t\twriter.addClass( `${ attributeNewValue }-table`, table );\n\n\t\t\tif ( attributeNewValue == 'layout' ) {\n\t\t\t\twriter.setAttribute( 'role', 'presentation', table );\n\t\t\t}\n\n\t\t\tconversionApi.consumable.consume( item, evt.name );\n\t\t} );\n\t};\n}\n\n/**\n * Resolves the table type based on the view table element and the preferred external table type.\n */\nfunction resolveTableType( viewTable: ViewElement, preferredExternalTableType: TableType | undefined ): TableType {\n\tif ( viewTable.hasClass( 'content-table' ) ) {\n\t\treturn 'content';\n\t}\n\n\tif ( viewTable.hasClass( 'layout-table' ) ) {\n\t\treturn 'layout';\n\t}\n\n\tif ( preferredExternalTableType && TABLE_TYPES.includes( preferredExternalTableType ) ) {\n\t\treturn preferredExternalTableType;\n\t}\n\n\tconst parent = viewTable.parent!;\n\n\t/**\n\t * Checks if the table is a content table if any of the following conditions are met:\n\t * - the `<table>` is wrapped with `<figure>`,\n\t * - the `<table>` has a `<caption>` element.\n\t */\n\tif (\n\t\tparent.is( 'element', 'figure' ) ||\n\t\tArray.from( viewTable.getChildren() ).some( child => child.is( 'element', 'caption' ) ) )\n\t{\n\t\treturn 'content';\n\t}\n\n\treturn 'layout';\n}\n\n/**\n * Checks if the element is a layout table.\n * It is used to disallow attributes or children that is managed by `Schema`.\n */\nfunction layoutTableCheck( context: ModelSchemaContext ) {\n\tif ( context.endsWith( 'table' ) && context.last.getAttribute( 'tableType' ) == 'layout' ) {\n\t\treturn false;\n\t}\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/**\n * @module table/tablelayout\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { TableLayoutUI } from './tablelayout/tablelayoutui.js';\n\nimport { TableLayoutEditing } from './tablelayout/tablelayoutediting.js';\nimport { TableColumnResize } from './tablecolumnresize.js';\n\n/**\n * The table plugin.\n *\n * For a detailed overview, check the {@glink features/tables/layout-tables Layout table feature documentation}.\n */\nexport class TableLayout extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableLayout' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableColumnResize, TableLayoutEditing, TableLayoutUI ]> {\n\t\treturn [ TableColumnResize, TableLayoutEditing, TableLayoutUI ];\n\t}\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/**\n * @module table/tableproperties/commands/tablepropertycommand\n */\n\nimport type { Batch, ModelElement } from '@ckeditor/ckeditor5-engine';\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\nimport { getSelectionAffectedTable } from '../../utils/common.js';\n\nexport interface TablePropertyCommandExecuteOptions {\n\tbatch?: Batch;\n\tcolumnWidths?: string;\n\ttable?: ModelElement;\n\ttableWidth?: string;\n\tvalue?: string;\n}\n\n/**\n * The table cell attribute command.\n *\n * This command is a base command for other table property commands.\n */\nexport class TablePropertyCommand extends Command {\n\t/**\n\t * The attribute that will be set by the command.\n\t */\n\tpublic readonly attributeName: string;\n\n\t/**\n\t * The default value for the attribute.\n\t *\n\t * @readonly\n\t */\n\tprotected _defaultValue: string | undefined;\n\n\t/**\n\t * The default value for the attribute for the content table.\n\t */\n\tprivate readonly _defaultContentTableValue: string | undefined;\n\n\t/**\n\t * The default value for the attribute for the layout table.\n\t */\n\tprivate readonly _defaultLayoutTableValue: string | undefined;\n\n\t/**\n\t * Creates a new `TablePropertyCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param attributeName Table cell attribute name.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, attributeName: string, defaultValue?: string ) {\n\t\tsuper( editor );\n\n\t\tthis.attributeName = attributeName;\n\t\tthis._defaultContentTableValue = defaultValue;\n\t\tthis._defaultLayoutTableValue = attributeName === 'tableBorderStyle' ? 'none' : undefined;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\n\t\tconst table = getSelectionAffectedTable( selection );\n\n\t\tthis._defaultValue = !table || table.getAttribute( 'tableType' ) !== 'layout' ?\n\t\t\tthis._defaultContentTableValue :\n\t\t\tthis._defaultLayoutTableValue;\n\n\t\tthis.isEnabled = !!table;\n\t\tthis.value = this._getValue( table );\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.value If set, the command will set the attribute on the selected table.\n\t * If not set, the command will remove the attribute from the selected table.\n\t * @param options.batch Pass the model batch instance to the command to aggregate changes,\n\t * for example, to allow a single undo step for multiple executions.\n\t */\n\tpublic override execute( options: TablePropertyCommandExecuteOptions = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\tconst { value, batch } = options;\n\n\t\tconst table = getSelectionAffectedTable( selection );\n\t\tconst valueToSet = this._getValueToSet( value );\n\n\t\tmodel.enqueueChange( batch, writer => {\n\t\t\tif ( valueToSet ) {\n\t\t\t\twriter.setAttribute( this.attributeName, valueToSet, table );\n\t\t\t} else {\n\t\t\t\twriter.removeAttribute( this.attributeName, table );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Returns the attribute value for a table.\n\t */\n\tprotected _getValue( table: ModelElement ): unknown {\n\t\tif ( !table ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = table.getAttribute( this.attributeName );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Returns the proper model value. It can be used to add a default unit to numeric values.\n\t */\n\tprotected _getValueToSet( value: string | number | undefined ): unknown {\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tableproperties/commands/tablebackgroundcolorcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { TablePropertyCommand } from './tablepropertycommand.js';\n\n/**\n * The table background color command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBackgroundColor'` editor command.\n *\n * To change the background color of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBackgroundColor', {\n *   value: '#f00'\n * } );\n * ```\n */\nexport class TableBackgroundColorCommand extends TablePropertyCommand {\n\t/**\n\t * Creates a new `TableBackgroundColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableBackgroundColor', defaultValue );\n\t}\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/**\n * @module table/tableproperties/commands/tablebordercolorcommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TablePropertyCommand } from './tablepropertycommand.js';\nimport { getSingleValue } from '../../utils/table-properties.js';\n\n/**\n * The table border color command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBorderColor'` editor command.\n *\n * To change the border color of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBorderColor', {\n *   value: '#f00'\n * } );\n * ```\n */\nexport class TableBorderColorCommand extends TablePropertyCommand {\n\t/**\n\t * Creates a new `TableBorderColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableBorderColor', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValue( table: ModelElement ): unknown {\n\t\tif ( !table ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getSingleValue( table.getAttribute( this.attributeName ) as string );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tableproperties/commands/tableborderstylecommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\n\nimport { TablePropertyCommand } from './tablepropertycommand.js';\nimport { getSingleValue } from '../../utils/table-properties.js';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\n/**\n * The table style border command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBorderStyle'` editor command.\n *\n * To change the border style of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBorderStyle', {\n *   value: 'dashed'\n * } );\n * ```\n */\nexport class TableBorderStyleCommand extends TablePropertyCommand {\n\t/**\n\t * Creates a new `TableBorderStyleCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableBorderStyle', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValue( table: ModelElement ): unknown {\n\t\tif ( !table ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getSingleValue( table.getAttribute( this.attributeName ) as string );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tableproperties/commands/tableborderwidthcommand\n */\n\nimport type { ModelElement } from '@ckeditor/ckeditor5-engine';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\nimport { TablePropertyCommand } from './tablepropertycommand.js';\nimport { addDefaultUnitToNumericValue, getSingleValue } from '../../utils/table-properties.js';\n\n/**\n * The table width border command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBorderWidth'` editor command.\n *\n * To change the border width of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBorderWidth', {\n *   value: '5px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableBorderWidth', {\n *   value: '5'\n * } );\n * ```\n *\n * will set the `borderWidth` attribute to `'5px'` in the model.\n */\nexport class TableBorderWidthCommand extends TablePropertyCommand {\n\t/**\n\t * Creates a new `TableBorderWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableBorderWidth', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValue( table: ModelElement ): string | undefined {\n\t\tif ( !table ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst value = getSingleValue( table.getAttribute( this.attributeName ) as string );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValueToSet( value: string | number | undefined ): unknown {\n\t\tconst newValue = addDefaultUnitToNumericValue( value, 'px' );\n\n\t\tif ( newValue === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn newValue;\n\t}\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/**\n * @module table/tableproperties/commands/tablewidthcommand\n */\n\nimport { TablePropertyCommand } from './tablepropertycommand.js';\nimport { addDefaultUnitToNumericValue } from '../../utils/table-properties.js';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\n/**\n * The table width command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableWidth'` editor command.\n *\n * To change the width of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableWidth', {\n *   value: '400px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableWidth', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `width` attribute to `'50px'` in the model.\n */\nexport class TableWidthCommand extends TablePropertyCommand {\n\t/**\n\t * Creates a new `TableWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableWidth', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override _getValueToSet( value: string | number | undefined ): unknown {\n\t\tvalue = addDefaultUnitToNumericValue( value, 'px' );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tableproperties/commands/tableheightcommand\n */\n\nimport { TablePropertyCommand } from './tablepropertycommand.js';\nimport { addDefaultUnitToNumericValue } from '../../utils/table-properties.js';\nimport type { Editor } from '@ckeditor/ckeditor5-core';\n\n/**\n * The table height command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableHeight'` editor command.\n *\n * To change the height of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableHeight', {\n *   value: '500px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableHeight', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `height` attribute to `'50px'` in the model.\n */\nexport class TableHeightCommand extends TablePropertyCommand {\n\t/**\n\t * Creates a new `TableHeightCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableHeight', defaultValue );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tprotected override _getValueToSet( value: string | number | undefined ): unknown {\n\t\tvalue = addDefaultUnitToNumericValue( value, 'px' );\n\n\t\tif ( value === this._defaultValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn value;\n\t}\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/**\n * @module table/tableproperties/commands/tablealignmentcommand\n */\n\nimport type { Editor } from '@ckeditor/ckeditor5-core';\nimport { TablePropertyCommand } from './tablepropertycommand.js';\n\n/**\n * The table alignment command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableAlignment'` editor command.\n *\n * To change the alignment of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableAlignment', {\n *   value: 'right'\n * } );\n * ```\n */\nexport class TableAlignmentCommand extends TablePropertyCommand {\n\t/**\n\t * Creates a new `TableAlignmentCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value for the \"alignment\" attribute.\n\t */\n\tconstructor( editor: Editor, defaultValue: string ) {\n\t\tsuper( editor, 'tableAlignment', defaultValue );\n\t}\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/**\n * @module table/tableproperties/tablepropertiesediting\n */\n\nimport { type Editor, Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport {\n\taddBackgroundStylesRules,\n\taddBorderStylesRules,\n\taddMarginStylesRules,\n\ttype ViewElement,\n\ttype ViewItem,\n\ttype Conversion,\n\ttype ModelSchema,\n\ttype ModelElement,\n\ttype UpcastConversionApi,\n\ttype UpcastConversionData,\n\ttype UpcastDispatcher,\n\ttype UpcastElementEvent,\n\ttype ViewDowncastWriter\n} from '@ckeditor/ckeditor5-engine';\nimport { first } from '@ckeditor/ckeditor5-utils';\nimport type { ViewDocumentClipboardOutputEvent } from '@ckeditor/ckeditor5-clipboard';\n\nimport { TableEditing } from '../tableediting.js';\nimport {\n\tdowncastAttributeToStyle,\n\tdowncastTableAttribute,\n\tgetDefaultValueAdjusted,\n\tupcastBorderStyles,\n\tupcastStyleToAttribute,\n\tupcastTableCellPaddingAttribute,\n\tupcastTableAlignmentConfig,\n\tDEFAULT_TABLE_ALIGNMENT_OPTIONS\n} from '../converters/tableproperties.js';\nimport { TableBackgroundColorCommand } from './commands/tablebackgroundcolorcommand.js';\nimport { TableBorderColorCommand } from './commands/tablebordercolorcommand.js';\nimport { TableBorderStyleCommand } from './commands/tableborderstylecommand.js';\nimport { TableBorderWidthCommand } from './commands/tableborderwidthcommand.js';\nimport { TableWidthCommand } from './commands/tablewidthcommand.js';\nimport { TableHeightCommand } from './commands/tableheightcommand.js';\nimport { TableAlignmentCommand } from './commands/tablealignmentcommand.js';\nimport { getNormalizedDefaultTableProperties } from '../utils/table-properties.js';\n\n/**\n * The table properties editing feature.\n *\n * Introduces table's model attributes and their conversion:\n *\n * - border: `tableBorderStyle`, `tableBorderColor` and `tableBorderWidth`\n * - background color: `tableBackgroundColor`\n * - horizontal alignment: `tableAlignment`\n * - width & height: `tableWidth` & `tableHeight`\n *\n * It also registers commands used to manipulate the above attributes:\n *\n * - border: `'tableBorderStyle'`, `'tableBorderColor'` and `'tableBorderWidth'` commands\n * - background color: `'tableBackgroundColor'`\n * - horizontal alignment: `'tableAlignment'`\n * - width & height: `'tableWidth'` & `'tableHeight'`\n */\nexport class TablePropertiesEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TablePropertiesEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'TCP';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableEditing ]> {\n\t\treturn [ TableEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst conversion = editor.conversion;\n\n\t\teditor.config.define( 'table.tableProperties.defaultProperties', {} );\n\n\t\tconst defaultTableProperties = getNormalizedDefaultTableProperties(\n\t\t\teditor.config.get( 'table.tableProperties.defaultProperties' )!,\n\t\t\t{\n\t\t\t\tincludeAlignmentProperty: true\n\t\t\t}\n\t\t);\n\n\t\tconst useInlineStyles = editor.config.get( 'table.tableProperties.alignment.useInlineStyles' ) === true;\n\n\t\teditor.data.addStyleProcessorRules( addMarginStylesRules );\n\t\teditor.data.addStyleProcessorRules( addBorderStylesRules );\n\t\tenableBorderProperties( editor, {\n\t\t\tcolor: defaultTableProperties.borderColor,\n\t\t\tstyle: defaultTableProperties.borderStyle,\n\t\t\twidth: defaultTableProperties.borderWidth\n\t\t} );\n\n\t\teditor.commands.add( 'tableBorderColor', new TableBorderColorCommand( editor, defaultTableProperties.borderColor ) );\n\t\teditor.commands.add( 'tableBorderStyle', new TableBorderStyleCommand( editor, defaultTableProperties.borderStyle ) );\n\t\teditor.commands.add( 'tableBorderWidth', new TableBorderWidthCommand( editor, defaultTableProperties.borderWidth ) );\n\n\t\tenableAlignmentProperty( schema, conversion, defaultTableProperties.alignment!, useInlineStyles );\n\n\t\teditor.commands.add( 'tableAlignment', new TableAlignmentCommand( editor, defaultTableProperties.alignment! ) );\n\n\t\tenableTableToFigureProperty( schema, conversion, {\n\t\t\tmodelAttribute: 'tableWidth',\n\t\t\tstyleName: 'width',\n\t\t\tattributeName: 'width',\n\t\t\tattributeType: 'length',\n\t\t\tdefaultValue: defaultTableProperties.width\n\t\t} );\n\t\teditor.commands.add( 'tableWidth', new TableWidthCommand( editor, defaultTableProperties.width ) );\n\n\t\tenableTableToFigureProperty( schema, conversion, {\n\t\t\tmodelAttribute: 'tableHeight',\n\t\t\tstyleName: 'height',\n\t\t\tattributeName: 'height',\n\t\t\tattributeType: 'length',\n\t\t\tdefaultValue: defaultTableProperties.height\n\t\t} );\n\t\teditor.commands.add( 'tableHeight', new TableHeightCommand( editor, defaultTableProperties.height ) );\n\n\t\teditor.data.addStyleProcessorRules( addBackgroundStylesRules );\n\t\tenableProperty( schema, conversion, {\n\t\t\tmodelAttribute: 'tableBackgroundColor',\n\t\t\tstyleName: 'background-color',\n\t\t\tattributeName: 'bgcolor',\n\t\t\tattributeType: 'color',\n\t\t\tdefaultValue: defaultTableProperties.backgroundColor\n\t\t} );\n\t\teditor.commands.add(\n\t\t\t'tableBackgroundColor',\n\t\t\tnew TableBackgroundColorCommand( editor, defaultTableProperties.backgroundColor )\n\t\t);\n\n\t\tupcastTableCellPaddingAttribute( editor, 'table' );\n\n\t\tconst viewDoc = editor.editing.view.document;\n\n\t\t// Adjust clipboard output to wrap tables in divs if needed (for alignment).\n\t\tthis.listenTo<ViewDocumentClipboardOutputEvent>( viewDoc, 'clipboardOutput', ( evt, data ) => {\n\t\t\teditor.editing.view.change( writer => {\n\t\t\t\tfor ( const { item } of writer.createRangeIn( data.content ) ) {\n\t\t\t\t\twrapInDivIfNeeded( item, writer );\n\t\t\t\t}\n\n\t\t\t\tdata.dataTransfer.setData( 'text/html', this.editor.data.htmlProcessor.toData( data.content ) );\n\t\t\t} );\n\t\t}, { priority: 'lowest' } );\n\t}\n}\n\n/**\n * Checks whether the view element is a table and if it needs to be wrapped in a div for alignment purposes.\n * If so, it wraps it in a div and inserts it into the data content.\n */\nfunction wrapInDivIfNeeded( viewItem: ViewItem, writer: ViewDowncastWriter ): void {\n\tif ( !viewItem.is( 'element', 'table' ) ) {\n\t\treturn;\n\t}\n\n\tconst alignAttribute = viewItem.getAttribute( 'align' ) as string | undefined;\n\tconst floatAttribute = viewItem.getStyle( 'float' ) as string | undefined;\n\tconst marginLeft = viewItem.getStyle( 'margin-left' );\n\tconst marginRight = viewItem.getStyle( 'margin-right' );\n\n\tif (\n\t\t// Align center.\n\t\t( alignAttribute && alignAttribute === 'center' ) ||\n\t\t// Align right with text wrapping.\n\t\t( floatAttribute && floatAttribute === 'right' && alignAttribute && alignAttribute === 'right' )\n\t) {\n\t\tinsertWrapperWithAlignment( writer, alignAttribute, viewItem );\n\n\t\treturn;\n\t}\n\n\t// Align right with no text wrapping.\n\tif ( floatAttribute === undefined && marginLeft === 'auto' && marginRight === '0' ) {\n\t\tinsertWrapperWithAlignment( writer, 'right', viewItem );\n\t}\n}\n\nfunction insertWrapperWithAlignment( writer: ViewDowncastWriter, align: string, table: ViewElement ): void {\n\tconst position = writer.createPositionBefore( table );\n\tconst wrapper = writer.createContainerElement( 'div', { align }, table );\n\n\twriter.insert( position, wrapper );\n}\n\n/**\n * Enables `tableBorderStyle'`, `tableBorderColor'` and `tableBorderWidth'` attributes for table.\n *\n * @param defaultBorder The default border values.\n * @param defaultBorder.color The default `tableBorderColor` value.\n * @param defaultBorder.style The default `tableBorderStyle` value.\n * @param defaultBorder.width The default `tableBorderWidth` value.\n */\nfunction enableBorderProperties(\n\teditor: Editor,\n\tdefaultBorder: { color: string; style: string; width: string }\n) {\n\tconst { conversion } = editor;\n\tconst { schema } = editor.model;\n\n\tconst modelAttributes = {\n\t\twidth: 'tableBorderWidth',\n\t\tcolor: 'tableBorderColor',\n\t\tstyle: 'tableBorderStyle'\n\t};\n\n\tschema.extend( 'table', {\n\t\tallowAttributes: Object.values( modelAttributes )\n\t} );\n\n\tfor ( const modelAttribute of Object.values( modelAttributes ) ) {\n\t\tschema.setAttributeProperties( modelAttribute, { isFormatting: true } );\n\t}\n\n\tupcastBorderStyles( editor, 'table', modelAttributes, defaultBorder );\n\n\tdowncastTableAttribute( conversion, { modelAttribute: modelAttributes.color, styleName: 'border-color' } );\n\tdowncastTableAttribute( conversion, { modelAttribute: modelAttributes.style, styleName: 'border-style' } );\n\tdowncastTableAttribute( conversion, { modelAttribute: modelAttributes.width, styleName: 'border-width' } );\n}\n\n/**\n * Enables the `'alignment'` attribute for table.\n *\n * @param defaultValue The default alignment value.\n */\nfunction enableAlignmentProperty( schema: ModelSchema, conversion: Conversion, defaultValue: string, useInlineStyles: boolean ) {\n\tschema.extend( 'table', {\n\t\tallowAttributes: [ 'tableAlignment' ]\n\t} );\n\n\tschema.setAttributeProperties( 'tableAlignment', {\n\t\tisFormatting: true,\n\t\tblockAlignment: ( modelElement: ModelElement ) => ( {\n\t\t\tleft: {\n\t\t\t\tvalue: 'blockLeft'\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tvalue: 'blockRight'\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\tvalue: 'center',\n\t\t\t\tisDefault: modelElement.getAttribute( 'tableType' ) !== 'layout'\n\t\t\t}\n\t\t} )\n\t} );\n\n\tconversion.for( 'downcast' )\n\t\t.attributeToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tname: 'table',\n\t\t\t\tkey: 'tableAlignment',\n\t\t\t\tvalues: [ 'left', 'center', 'right', 'blockLeft', 'blockRight' ]\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tleft: useInlineStyles ? {\n\t\t\t\t\tkey: 'style',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tfloat: 'left',\n\t\t\t\t\t\t'margin-right': 'var(--ck-content-table-style-spacing, 1.5em)'\n\t\t\t\t\t}\n\t\t\t\t} : {\n\t\t\t\t\tkey: 'class',\n\t\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.left.className\n\t\t\t\t},\n\t\t\t\tright: useInlineStyles ? {\n\t\t\t\t\tkey: 'style',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tfloat: 'right',\n\t\t\t\t\t\t'margin-left': 'var(--ck-content-table-style-spacing, 1.5em)'\n\t\t\t\t\t}\n\t\t\t\t} : {\n\t\t\t\t\tkey: 'class',\n\t\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.right.className\n\t\t\t\t},\n\t\t\t\tcenter: useInlineStyles ? {\n\t\t\t\t\tkey: 'style',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\t'margin-left': 'auto',\n\t\t\t\t\t\t'margin-right': 'auto'\n\t\t\t\t\t}\n\t\t\t\t} : {\n\t\t\t\t\tkey: 'class',\n\t\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.center.className\n\t\t\t\t},\n\t\t\t\tblockLeft: useInlineStyles ? {\n\t\t\t\t\tkey: 'style',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\t'margin-left': '0',\n\t\t\t\t\t\t'margin-right': 'auto'\n\t\t\t\t\t}\n\t\t\t\t} : {\n\t\t\t\t\tkey: 'class',\n\t\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockLeft.className\n\t\t\t\t},\n\t\t\t\tblockRight: useInlineStyles ? {\n\t\t\t\t\tkey: 'style',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\t'margin-left': 'auto',\n\t\t\t\t\t\t'margin-right': '0'\n\t\t\t\t\t}\n\t\t\t\t} : {\n\t\t\t\t\tkey: 'class',\n\t\t\t\t\tvalue: DEFAULT_TABLE_ALIGNMENT_OPTIONS.blockRight.className\n\t\t\t\t}\n\t\t\t},\n\t\t\tconverterPriority: 'high'\n\t\t} );\n\n\t/**\n\t * Enables upcasting of the `tableAlignment` attribute.\n\t */\n\tupcastTableAlignmentConfig.forEach( config => {\n\t\tconversion.for( 'upcast' ).attributeToAttribute( {\n\t\t\tview: config.view,\n\t\t\tmodel: {\n\t\t\t\tkey: 'tableAlignment',\n\t\t\t\tvalue: ( viewElement: ViewElement, conversionApi: UpcastConversionApi, data: UpcastConversionData<ViewElement> ) => {\n\t\t\t\t\tif ( isNonTableFigureElement( viewElement ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst localDefaultValue = getDefaultValueAdjusted( defaultValue, '', data );\n\t\t\t\t\tconst align = config.getAlign( viewElement );\n\t\t\t\t\tconst consumables = config.getConsumables( viewElement );\n\n\t\t\t\t\tconversionApi.consumable.consume( viewElement, consumables );\n\n\t\t\t\t\tif ( align !== localDefaultValue ) {\n\t\t\t\t\t\treturn align;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n\n\tconversion.for( 'upcast' ).add( upcastTableAlignedDiv( defaultValue ) );\n}\n\n/**\n * Returns a function that converts the table view representation:\n *\n * ```html\n * <div align=\"right\"><table>...</table></div>\n * <!-- or -->\n * <div align=\"center\"><table>...</table></div>\n * <!-- or -->\n * <div align=\"left\"><table>...</table></div>\n * ```\n *\n * to the model representation:\n *\n * ```xml\n * <table tableAlignment=\"right|center|left\"></table>\n * ```\n *\n * @internal\n */\nfunction upcastTableAlignedDiv( defaultValue: string ) {\n\treturn ( dispatcher: UpcastDispatcher ): void => {\n\t\tdispatcher.on<UpcastElementEvent>( 'element:div', ( evt, data, conversionApi ) => {\n\t\t\t// Do not convert if this is not a \"table wrapped in div with align attribute\".\n\t\t\tif ( !conversionApi.consumable.test( data.viewItem, { name: true, attributes: 'align' } ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Ignore whitespace-only text nodes when checking the div's content.\n\t\t\tconst significantChildren = Array.from( data.viewItem.getChildren() ).filter( child => {\n\t\t\t\tif ( child.is( '$text' ) || child.is( '$textProxy' ) ) {\n\t\t\t\t\treturn child.data.trim() !== '';\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} );\n\n\t\t\t// Only convert if the table is the ONLY (significant) child of the div.\n\t\t\t// Otherwise this isn't a plain \"table wrapped in an aligning div\" and should be left\n\t\t\t// to other converters to handle the div and its content normally.\n\t\t\tif ( significantChildren.length !== 1 || !significantChildren[ 0 ].is( 'element', 'table' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [ viewTable ] = significantChildren;\n\n\t\t\t// Do not convert if table element was already converted.\n\t\t\tif ( !conversionApi.consumable.test( viewTable, { name: true } ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Consume the div to prevent other converters from processing it again.\n\t\t\tconversionApi.consumable.consume( data.viewItem, { name: true, attributes: 'align' } );\n\n\t\t\t// Convert view table to model table.\n\t\t\tconst conversionResult = conversionApi.convertItem( viewTable, data.modelCursor );\n\n\t\t\t// Get table element from conversion result.\n\t\t\tconst modelTable = first( conversionResult.modelRange!.getItems() as Iterator<ModelElement> );\n\n\t\t\t// When table wasn't successfully converted then finish conversion.\n\t\t\tif ( !modelTable || !modelTable.is( 'element', 'table' ) ) {\n\t\t\t\t// Revert consumed div so other features can convert it.\n\t\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, attributes: 'align' } );\n\n\t\t\t\t// If anyway some table content was converted, we have to pass the model range and cursor.\n\t\t\t\tif ( conversionResult.modelRange && !conversionResult.modelRange.isCollapsed ) {\n\t\t\t\t\tdata.modelRange = conversionResult.modelRange;\n\t\t\t\t\tdata.modelCursor = conversionResult.modelCursor;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst alignAttributeFromDiv = data.viewItem.getAttribute( 'align' ) as string;\n\t\t\tconst alignAttributeFromTable = viewTable.getAttribute( 'align' ) as string;\n\t\t\tconst localDefaultValue = getDefaultValueAdjusted( defaultValue, '', data );\n\t\t\tconst align = convertToTableAlignment( alignAttributeFromDiv, alignAttributeFromTable, localDefaultValue );\n\n\t\t\tif ( align ) {\n\t\t\t\tconversionApi.writer.setAttribute( 'tableAlignment', align, modelTable );\n\t\t\t}\n\n\t\t\tconversionApi.updateConversionResult( modelTable, data );\n\t\t} );\n\t};\n}\n\n/**\n * Converts div `align` and table `align` attributes to the model `tableAlignment` attribute.\n *\n * @param divAlign The value of the div `align` attribute.\n * @param tableAlign The value of the table `align` attribute.\n * @param defaultValue The default alignment value.\n * @returns The model `tableAlignment` value or `undefined` if no conversion is needed.\n */\nfunction convertToTableAlignment( divAlign: string, tableAlign: string, defaultValue: string ): string | undefined {\n\tif ( divAlign ) {\n\t\tswitch ( divAlign ) {\n\t\t\tcase 'right':\n\t\t\t\tif ( tableAlign === 'right' ) {\n\t\t\t\t\treturn 'right';\n\t\t\t\t} else if ( tableAlign === 'left' ) {\n\t\t\t\t\treturn 'left';\n\t\t\t\t} else {\n\t\t\t\t\treturn 'blockRight';\n\t\t\t\t}\n\t\t\tcase 'center':\n\t\t\t\treturn 'center';\n\t\t\tcase 'left':\n\t\t\t\treturn tableAlign === undefined ? 'blockLeft' : 'left';\n\t\t\tdefault:\n\t\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Enables conversion for an attribute for simple view-model mappings.\n *\n * @param options.defaultValue The default value for the specified `modelAttribute`.\n */\nfunction enableProperty(\n\tschema: ModelSchema,\n\tconversion: Conversion,\n\toptions: {\n\t\tmodelAttribute: string;\n\t\tstyleName: string;\n\t\tattributeName?: string;\n\t\tattributeType?: 'length' | 'color';\n\t\tdefaultValue: string;\n\t}\n) {\n\tconst { modelAttribute } = options;\n\n\tschema.extend( 'table', {\n\t\tallowAttributes: [ modelAttribute ]\n\t} );\n\n\tschema.setAttributeProperties( modelAttribute, { isFormatting: true } );\n\n\tupcastStyleToAttribute( conversion, { viewElement: 'table', ...options } );\n\tdowncastTableAttribute( conversion, options );\n}\n\n/**\n * Enables conversion for an attribute for simple view (figure) to model (table) mappings.\n */\nfunction enableTableToFigureProperty(\n\tschema: ModelSchema,\n\tconversion: Conversion,\n\toptions: {\n\t\tmodelAttribute: string;\n\t\tstyleName: string;\n\t\tattributeName?: string;\n\t\tattributeType?: 'length' | 'color';\n\t\tdefaultValue: string;\n\t}\n) {\n\tconst { modelAttribute } = options;\n\n\tschema.extend( 'table', {\n\t\tallowAttributes: [ modelAttribute ]\n\t} );\n\n\tschema.setAttributeProperties( modelAttribute, { isFormatting: true } );\n\n\tupcastStyleToAttribute( conversion, {\n\t\tviewElement: /^(table|figure)$/,\n\t\tshouldUpcast: ( viewElement: ViewElement ) => !(\n\t\t\tviewElement.name == 'table' && viewElement.parent!.name == 'figure' ||\n\t\t\tviewElement.name == 'figure' && !viewElement.hasClass( 'table' )\n\t\t),\n\t\t...options\n\t} );\n\n\tdowncastAttributeToStyle( conversion, { modelElement: 'table', ...options } );\n}\n\n/**\n * Checks whether a given figure element should be ignored when upcasting table properties.\n */\nfunction isNonTableFigureElement( viewElement: ViewElement ): boolean {\n\treturn viewElement.name == 'figure' && !viewElement.hasClass( 'table' );\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/**\n * @module table/tableproperties/ui/tablepropertiesview\n */\n\nimport {\n\taddListToDropdown,\n\tButtonView,\n\tcreateLabeledDropdown,\n\tcreateLabeledInputText,\n\tFocusCycler,\n\tFormRowView,\n\tFormHeaderView,\n\tLabeledFieldView,\n\tLabelView,\n\tsubmitHandler,\n\tToolbarView,\n\tView,\n\tViewCollection,\n\ttype DropdownView,\n\ttype InputTextView,\n\ttype NormalizedColorOption,\n\ttype ColorPickerConfig,\n\ttype FocusableView\n} from '@ckeditor/ckeditor5-ui';\nimport { FocusTracker, KeystrokeHandler, type ObservableChangeEvent, type Locale } from '@ckeditor/ckeditor5-utils';\nimport {\n\tIconObjectCenter,\n\tIconObjectInlineLeft,\n\tIconObjectInlineRight,\n\tIconObjectLeft,\n\tIconObjectRight,\n\tIconPreviousArrow\n} from '@ckeditor/ckeditor5-icons';\n\nimport {\n\tfillToolbar,\n\tgetBorderStyleDefinitions,\n\tgetBorderStyleLabels,\n\tgetLabeledColorInputCreator\n} from '../../utils/ui/table-properties.js';\n\nimport { type ColorInputView } from '../../ui/colorinputview.js';\nimport type { TablePropertiesOptions } from '../../tableconfig.js';\n\n/**\n * Additional configuration of the view.\n */\nexport interface TablePropertiesViewOptions {\n\n\t/**\n\t * A configuration of the border color palette used by the\n\t * {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView#borderColorInput}.\n\t */\n\tborderColors: Array<NormalizedColorOption>;\n\n\t/**\n\t * A configuration of the background color palette used by the\n\t * {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView#backgroundInput}.\n\t */\n\tbackgroundColors: Array<NormalizedColorOption>;\n\n\t/**\n\t * The default table properties.\n\t */\n\tdefaultTableProperties: TablePropertiesOptions;\n\n\t/**\n\t * The default color picker config.\n\t */\n\tcolorPickerConfig: false | ColorPickerConfig;\n}\n\n/**\n * The class representing a table properties form, allowing users to customize\n * certain style aspects of a table, for instance, border, background color, alignment, etc..\n */\nexport class TablePropertiesView extends View {\n\t/**\n\t * The value of the border style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public borderStyle: string;\n\n\t/**\n\t * The value of the border width style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public borderWidth: string;\n\n\t/**\n\t * The value of the border color style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public borderColor: string;\n\n\t/**\n\t * The value of the background color style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public backgroundColor: string;\n\n\t/**\n\t * The value of the table width style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public width: string;\n\n\t/**\n\t * The value of the table height style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public height: string;\n\n\t/**\n\t * The value of the table alignment style.\n\t *\n\t * @observable\n\t * @default ''\n\t */\n\tdeclare public alignment: string;\n\n\t/**\n\t * Options passed to the view. See {@link #constructor} to learn more.\n\t */\n\tpublic readonly options: TablePropertiesViewOptions;\n\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * A collection of child views in the form.\n\t */\n\tpublic readonly children: ViewCollection;\n\n\t/**\n\t * A dropdown that allows selecting the style of the table border.\n\t */\n\tpublic readonly borderStyleDropdown: LabeledFieldView<DropdownView>;\n\n\t/**\n\t * An input that allows specifying the width of the table border.\n\t */\n\tpublic readonly borderWidthInput: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * An input that allows specifying the color of the table border.\n\t */\n\tpublic readonly borderColorInput: LabeledFieldView<ColorInputView>;\n\n\t/**\n\t * An input that allows specifying the table background color.\n\t */\n\tpublic readonly backgroundInput: LabeledFieldView<ColorInputView>;\n\n\t/**\n\t * An input that allows specifying the table width.\n\t */\n\tpublic readonly widthInput: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * An input that allows specifying the table height.\n\t */\n\tpublic readonly heightInput: LabeledFieldView<InputTextView>;\n\n\t/**\n\t * A toolbar with buttons that allow changing the alignment of an entire table.\n\t */\n\tpublic readonly alignmentToolbar: ToolbarView;\n\n\t/**\n\t * The \"Save\" button view.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * The \"Cancel\" button view.\n\t */\n\tpublic cancelButtonView: ButtonView;\n\n\t/**\n\t * The Back button view displayed in the header.\n\t */\n\tpublic backButtonView: ButtonView;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprotected readonly _focusables: ViewCollection<FocusableView>;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprotected readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options Additional configuration of the view.\n\t */\n\tconstructor( locale: Locale, options: TablePropertiesViewOptions ) {\n\t\tsuper( locale );\n\n\t\tthis.set( {\n\t\t\tborderStyle: '',\n\t\t\tborderWidth: '',\n\t\t\tborderColor: '',\n\t\t\tbackgroundColor: '',\n\t\t\twidth: '',\n\t\t\theight: '',\n\t\t\talignment: ''\n\t\t} );\n\n\t\tthis.options = options;\n\n\t\tconst { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();\n\t\tconst { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();\n\t\tconst { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();\n\t\tconst { alignmentToolbar, alignmentLabel } = this._createAlignmentFields();\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.children = this.createCollection();\n\n\t\tthis.borderStyleDropdown = borderStyleDropdown;\n\t\tthis.borderWidthInput = borderWidthInput;\n\t\tthis.borderColorInput = borderColorInput;\n\t\tthis.backgroundInput = backgroundInput;\n\t\tthis.widthInput = widthInput;\n\t\tthis.heightInput = heightInput;\n\t\tthis.alignmentToolbar = alignmentToolbar;\n\n\t\t// Defer creating to make sure other fields are present and the Save button can\n\t\t// bind its #isEnabled to their error messages so there's no way to save unless all\n\t\t// fields are valid.\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.backButtonView = this._createBackButton();\n\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\t// Form header.\n\t\tconst headerView = new FormHeaderView( locale, {\n\t\t\tlabel: this.t!( 'Table properties' )\n\t\t} );\n\n\t\theaderView.children.add( this.backButtonView, 0 );\n\n\t\tthis.children.add( headerView );\n\n\t\t// Border row.\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tlabelView: borderRowLabel,\n\t\t\tchildren: [\n\t\t\t\tborderRowLabel,\n\t\t\t\tborderStyleDropdown,\n\t\t\t\tborderWidthInput,\n\t\t\t\tborderColorInput\n\t\t\t],\n\t\t\tclass: 'ck-table-form__border-row'\n\t\t} ) );\n\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\t// Dimensions row.\n\t\t\t\tnew FormRowView( locale, {\n\t\t\t\t\tlabelView: dimensionsLabel,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tdimensionsLabel,\n\t\t\t\t\t\twidthInput,\n\t\t\t\t\t\toperatorLabel,\n\t\t\t\t\t\theightInput\n\t\t\t\t\t],\n\t\t\t\t\tclass: 'ck-table-form__dimensions-row'\n\t\t\t\t} ),\n\n\t\t\t\t// Background row.\n\t\t\t\tnew FormRowView( locale, {\n\t\t\t\t\tlabelView: backgroundRowLabel,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tbackgroundRowLabel,\n\t\t\t\t\t\tbackgroundInput\n\t\t\t\t\t],\n\t\t\t\t\tclass: 'ck-table-form__background-row'\n\t\t\t\t} )\n\t\t\t]\n\t\t} ) );\n\n\t\t// Alignment row.\n\t\tthis.children.add(\n\t\t\tnew FormRowView( locale, {\n\t\t\t\tlabelView: alignmentLabel,\n\t\t\t\tchildren: [\n\t\t\t\t\talignmentLabel,\n\t\t\t\t\talignmentToolbar\n\t\t\t\t],\n\t\t\t\tclass: 'ck-table-properties-form__alignment-row'\n\t\t\t} )\n\t\t);\n\n\t\t// Action row.\n\t\tthis.children.add( new FormRowView( locale, {\n\t\t\tchildren: [\n\t\t\t\tthis.cancelButtonView,\n\t\t\t\tthis.saveButtonView\n\t\t\t],\n\t\t\tclass: 'ck-table-form__action-row'\n\t\t} ) );\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-form',\n\t\t\t\t\t'ck-table-form',\n\t\t\t\t\t'ck-table-properties-form'\n\t\t\t\t],\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-link/issues/90\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\t// Enable the \"submit\" event for this view. It can be triggered by the #saveButtonView\n\t\t// which is of the \"submit\" DOM \"type\".\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\t// Maintain continuous focus cycling over views that have focusable children and focus cyclers themselves.\n\t\t[ this.borderColorInput, this.backgroundInput ].forEach( view => {\n\t\t\tthis._focusCycler.chain( view.fieldView.focusCycler );\n\t\t} );\n\n\t\t[\n\t\t\tthis.borderStyleDropdown,\n\t\t\tthis.borderWidthInput,\n\t\t\tthis.borderColorInput,\n\t\t\tthis.widthInput,\n\t\t\tthis.heightInput,\n\t\t\tthis.backgroundInput,\n\t\t\tthis.alignmentToolbar,\n\t\t\tthis.cancelButtonView,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.backButtonView\n\t\t].forEach( view => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( view! );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( view!.element! );\n\t\t} );\n\n\t\t// Mainly for closing using \"Esc\" and navigation using \"Tab\".\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the fist focusable field in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #borderStyleDropdown},\n\t * * {@link #borderWidthInput},\n\t * * {@link #borderColorInput}.\n\t */\n\tprivate _createBorderFields() {\n\t\tconst defaultTableProperties = this.options.defaultTableProperties;\n\t\tconst defaultBorder = {\n\t\t\tstyle: defaultTableProperties.borderStyle,\n\t\t\twidth: defaultTableProperties.borderWidth,\n\t\t\tcolor: defaultTableProperties.borderColor\n\t\t};\n\n\t\tconst colorInputCreator = getLabeledColorInputCreator( {\n\t\t\tcolorConfig: this.options.borderColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: defaultBorder.color,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t} );\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\t\tconst accessibleLabel = t( 'Style' );\n\n\t\t// -- Group label ---------------------------------------------\n\n\t\tconst borderRowLabel = new LabelView( locale );\n\t\tborderRowLabel.text = t( 'Border' );\n\n\t\t// -- Style ---------------------------------------------------\n\n\t\tconst styleLabels = getBorderStyleLabels( t );\n\t\tconst borderStyleDropdown = new LabeledFieldView( locale, createLabeledDropdown );\n\t\tborderStyleDropdown.set( {\n\t\t\tlabel: accessibleLabel,\n\t\t\tclass: 'ck-table-form__border-style'\n\t\t} );\n\n\t\tborderStyleDropdown.fieldView.buttonView.set( {\n\t\t\tariaLabel: accessibleLabel,\n\t\t\tariaLabelledBy: undefined,\n\t\t\tisOn: false,\n\t\t\twithText: true,\n\t\t\ttooltip: accessibleLabel\n\t\t} );\n\n\t\tborderStyleDropdown.fieldView.buttonView.bind( 'label' ).to( this, 'borderStyle', value => {\n\t\t\treturn styleLabels[ value ? value : 'none' ];\n\t\t} );\n\n\t\tborderStyleDropdown.fieldView.on( 'execute', evt => {\n\t\t\tthis.borderStyle = ( evt.source as any )._borderStyleValue;\n\t\t} );\n\n\t\tborderStyleDropdown.bind( 'isEmpty' ).to( this, 'borderStyle', value => !value );\n\n\t\taddListToDropdown( borderStyleDropdown.fieldView, getBorderStyleDefinitions( this, defaultBorder.style! ), {\n\t\t\trole: 'menu',\n\t\t\tariaLabel: accessibleLabel\n\t\t} );\n\n\t\t// -- Width ---------------------------------------------------\n\n\t\tconst borderWidthInput = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\tborderWidthInput.set( {\n\t\t\tlabel: t( 'Width' ),\n\t\t\tclass: 'ck-table-form__border-width'\n\t\t} );\n\n\t\tborderWidthInput.fieldView.bind( 'value' ).to( this, 'borderWidth' );\n\t\tborderWidthInput.bind( 'isEnabled' ).to( this, 'borderStyle', isBorderStyleSet );\n\t\tborderWidthInput.fieldView.on( 'input', () => {\n\t\t\tthis.borderWidth = borderWidthInput.fieldView.element!.value;\n\t\t} );\n\n\t\t// -- Color ---------------------------------------------------\n\n\t\tconst borderColorInput = new LabeledFieldView( locale, colorInputCreator );\n\n\t\tborderColorInput.set( {\n\t\t\tlabel: t( 'Color' ),\n\t\t\tclass: 'ck-table-form__border-color'\n\t\t} );\n\n\t\tborderColorInput.fieldView.bind( 'value' ).to( this, 'borderColor' );\n\t\tborderColorInput.bind( 'isEnabled' ).to( this, 'borderStyle', isBorderStyleSet );\n\n\t\tborderColorInput.fieldView.on( 'input', () => {\n\t\t\tthis.borderColor = borderColorInput.fieldView.value;\n\t\t} );\n\n\t\t// Reset the border color and width fields depending on the `border-style` value.\n\t\tthis.on<ObservableChangeEvent<string>>( 'change:borderStyle', ( evt, name, newValue, oldValue ) => {\n\t\t\t// When removing the border (`border-style:none`), clear the remaining `border-*` properties.\n\t\t\t// See: https://github.com/ckeditor/ckeditor5/issues/6227.\n\t\t\tif ( !isBorderStyleSet( newValue ) ) {\n\t\t\t\tthis.borderColor = '';\n\t\t\t\tthis.borderWidth = '';\n\t\t\t}\n\n\t\t\t// When setting the `border-style` from `none`, set the default `border-color` and `border-width` properties.\n\t\t\tif ( !isBorderStyleSet( oldValue ) ) {\n\t\t\t\tthis.borderColor = defaultBorder.color!;\n\t\t\t\tthis.borderWidth = defaultBorder.width!;\n\t\t\t}\n\t\t} );\n\n\t\treturn {\n\t\t\tborderRowLabel,\n\t\t\tborderStyleDropdown,\n\t\t\tborderColorInput,\n\t\t\tborderWidthInput\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #backgroundInput}.\n\t */\n\tprivate _createBackgroundFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\t// -- Group label ---------------------------------------------\n\n\t\tconst backgroundRowLabel = new LabelView( locale );\n\t\tbackgroundRowLabel.text = t( 'Background' );\n\n\t\t// -- Background color input -----------------------------------\n\n\t\tconst backgroundInputCreator = getLabeledColorInputCreator( {\n\t\t\tcolorConfig: this.options.backgroundColors,\n\t\t\tcolumns: 5,\n\t\t\tdefaultColorValue: this.options.defaultTableProperties.backgroundColor,\n\t\t\tcolorPickerConfig: this.options.colorPickerConfig\n\t\t} );\n\n\t\tconst backgroundInput = new LabeledFieldView( locale, backgroundInputCreator );\n\n\t\tbackgroundInput.set( {\n\t\t\tlabel: t( 'Color' ),\n\t\t\tclass: 'ck-table-properties-form__background'\n\t\t} );\n\n\t\tbackgroundInput.fieldView.bind( 'value' ).to( this, 'backgroundColor' );\n\t\tbackgroundInput.fieldView.on( 'input', () => {\n\t\t\tthis.backgroundColor = backgroundInput.fieldView.value;\n\t\t} );\n\n\t\treturn {\n\t\t\tbackgroundRowLabel,\n\t\t\tbackgroundInput\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #widthInput},\n\t * * {@link #heightInput}.\n\t */\n\tprivate _createDimensionFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\t// -- Label ---------------------------------------------------\n\n\t\tconst dimensionsLabel = new LabelView( locale );\n\t\tdimensionsLabel.text = t( 'Dimensions' );\n\n\t\t// -- Width ---------------------------------------------------\n\n\t\tconst widthInput = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\twidthInput.set( {\n\t\t\tlabel: t( 'Width' ),\n\t\t\tclass: 'ck-table-form__dimensions-row__width'\n\t\t} );\n\n\t\twidthInput.fieldView.bind( 'value' ).to( this, 'width' );\n\t\twidthInput.fieldView.on( 'input', () => {\n\t\t\tthis.width = widthInput.fieldView.element!.value;\n\t\t} );\n\n\t\t// -- Operator ---------------------------------------------------\n\n\t\tconst operatorLabel = new View( locale );\n\t\toperatorLabel.setTemplate( {\n\t\t\ttag: 'span',\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-table-form__dimension-operator'\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{ text: '×' }\n\t\t\t]\n\t\t} );\n\n\t\t// -- Height ---------------------------------------------------\n\n\t\tconst heightInput = new LabeledFieldView( locale, createLabeledInputText );\n\n\t\theightInput.set( {\n\t\t\tlabel: t( 'Height' ),\n\t\t\tclass: 'ck-table-form__dimensions-row__height'\n\t\t} );\n\n\t\theightInput.fieldView.bind( 'value' ).to( this, 'height' );\n\t\theightInput.fieldView.on( 'input', () => {\n\t\t\tthis.height = heightInput.fieldView.element!.value;\n\t\t} );\n\n\t\treturn {\n\t\t\tdimensionsLabel,\n\t\t\twidthInput,\n\t\t\toperatorLabel,\n\t\t\theightInput\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #alignmentToolbar}.\n\t */\n\tprivate _createAlignmentFields() {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\t// -- Label ---------------------------------------------------\n\n\t\tconst alignmentLabel = new LabelView( locale );\n\t\talignmentLabel.text = t( 'Table Alignment' );\n\n\t\t// -- Toolbar ---------------------------------------------------\n\n\t\tconst alignmentToolbar = new ToolbarView( locale! );\n\t\talignmentToolbar.set( {\n\t\t\trole: 'radiogroup',\n\t\t\tisCompact: true,\n\t\t\tariaLabel: t( 'Table alignment toolbar' )\n\t\t} );\n\n\t\tfillToolbar( {\n\t\t\tview: this,\n\t\t\ticons: {\n\t\t\t\tleft: IconObjectInlineLeft,\n\t\t\t\tcenter: IconObjectCenter,\n\t\t\t\tright: IconObjectInlineRight,\n\t\t\t\tblockLeft: IconObjectLeft,\n\t\t\t\tblockRight: IconObjectRight\n\t\t\t},\n\t\t\ttoolbar: alignmentToolbar,\n\t\t\tlabels: this._alignmentLabels,\n\t\t\tpropertyName: 'alignment',\n\t\t\tdefaultValue: this.options.defaultTableProperties.alignment!\n\t\t} );\n\n\t\treturn {\n\t\t\talignmentLabel,\n\t\t\talignmentToolbar\n\t\t};\n\t}\n\n\t/**\n\t * Creates the following form controls:\n\t *\n\t * * {@link #saveButtonView},\n\t * * {@link #cancelButtonView}.\n\t */\n\tprivate _createActionButtons(): {\n\t\tsaveButtonView: ButtonView;\n\t\tcancelButtonView: ButtonView;\n\t} {\n\t\tconst locale = this.locale;\n\t\tconst t = this.t!;\n\n\t\tconst saveButtonView = new ButtonView( locale );\n\t\tconst cancelButtonView = new ButtonView( locale );\n\t\tconst fieldsThatShouldValidateToSave = [\n\t\t\tthis.borderWidthInput!,\n\t\t\tthis.borderColorInput!,\n\t\t\tthis.backgroundInput!,\n\t\t\tthis.widthInput!,\n\t\t\tthis.heightInput!\n\t\t];\n\n\t\tsaveButtonView.set( {\n\t\t\tlabel: t( 'Save' ),\n\t\t\tclass: 'ck-button-action',\n\t\t\ttype: 'submit',\n\t\t\twithText: true\n\t\t} );\n\n\t\tsaveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {\n\t\t\treturn errorTexts.every( errorText => !errorText );\n\t\t} );\n\n\t\tcancelButtonView.set( {\n\t\t\tlabel: t( 'Cancel' ),\n\t\t\twithText: true\n\t\t} );\n\n\t\tcancelButtonView.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn {\n\t\t\tsaveButtonView, cancelButtonView\n\t\t};\n\t}\n\n\t/**\n\t * Creates a back button view that cancels the form.\n\t */\n\tprivate _createBackButton(): ButtonView {\n\t\tconst t = this.locale!.t;\n\t\tconst backButton = new ButtonView( this.locale );\n\n\t\tbackButton.set( {\n\t\t\tclass: 'ck-button-back',\n\t\t\tlabel: t( 'Back' ),\n\t\t\ticon: IconPreviousArrow,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbackButton.delegate( 'execute' ).to( this, 'cancel' );\n\n\t\treturn backButton;\n\t}\n\n\t/**\n\t * Provides localized labels for {@link #alignmentToolbar} buttons.\n\t */\n\tprivate get _alignmentLabels() {\n\t\tconst locale = this.locale!;\n\t\tconst t = this.t!;\n\n\t\tconst blockLeft = t( 'Align table to the left with no text wrapping' );\n\t\tconst blockRight = t( 'Align table to the right with no text wrapping' );\n\n\t\tconst left = t( 'Align table to the left with text wrapping' );\n\t\tconst center = t( 'Center table with no text wrapping' );\n\t\tconst right = t( 'Align table to the right with text wrapping' );\n\n\t\t// Returns object with a proper order of labels.\n\t\tif ( locale.uiLanguageDirection === 'rtl' ) {\n\t\t\treturn { right, left, blockRight, center, blockLeft };\n\t\t}\n\n\t\treturn { blockLeft, center, blockRight, left, right };\n\t}\n}\n\nfunction isBorderStyleSet( value: string ) {\n\treturn value !== 'none';\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/**\n * @module table/tableproperties/tablepropertiesui\n */\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { IconTableProperties } from '@ckeditor/ckeditor5-icons';\nimport {\n\tButtonView,\n\tContextualBalloon,\n\tclickOutsideHandler,\n\tgetLocalizedColorOptions,\n\tnormalizeColorOptions,\n\ttype LabeledFieldView\n} from '@ckeditor/ckeditor5-ui';\n\nimport { debounce } from 'es-toolkit/compat';\n\nimport { TablePropertiesView } from './ui/tablepropertiesview.js';\nimport {\n\tcolorFieldValidator,\n\tgetLocalizedColorErrorText,\n\tgetLocalizedLengthErrorText,\n\tlengthFieldValidator,\n\tlineWidthFieldValidator,\n\tdefaultColors\n} from '../utils/ui/table-properties.js';\nimport { getSelectionAffectedTableWidget } from '../utils/ui/widget.js';\nimport { getBalloonTablePositionData, repositionContextualBalloon } from '../utils/ui/contextualballoon.js';\nimport {\n\tgetNormalizedDefaultProperties,\n\tgetNormalizedDefaultTableProperties,\n\ttype NormalizedDefaultProperties\n} from '../utils/table-properties.js';\nimport type { Batch } from '@ckeditor/ckeditor5-engine';\nimport type { EventInfo, ObservableChangeEvent } from '@ckeditor/ckeditor5-utils';\n\nimport { type TableBorderStyleCommand } from './commands/tableborderstylecommand.js';\n\nconst ERROR_TEXT_TIMEOUT = 500;\n\n// Map of view properties and related commands.\nconst propertyToCommandMap = {\n\tborderStyle: 'tableBorderStyle',\n\tborderColor: 'tableBorderColor',\n\tborderWidth: 'tableBorderWidth',\n\tbackgroundColor: 'tableBackgroundColor',\n\twidth: 'tableWidth',\n\theight: 'tableHeight',\n\talignment: 'tableAlignment'\n};\n\n/**\n * The table properties UI plugin. It introduces the `'tableProperties'` button\n * that opens a form allowing to specify visual styling of an entire table.\n *\n * It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */\nexport class TablePropertiesUI extends Plugin {\n\t/**\n\t * The default table properties.\n\t */\n\tprivate _defaultContentTableProperties!: NormalizedDefaultProperties;\n\n\t/**\n\t * The default layout table properties.\n\t */\n\tprivate _defaultLayoutTableProperties!: NormalizedDefaultProperties;\n\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon!: ContextualBalloon;\n\n\t/**\n\t * The properties form view displayed inside the balloon.\n\t */\n\tpublic view: TablePropertiesView | null = null;\n\n\t/**\n\t * The properties form view displayed inside the balloon (content table).\n\t */\n\tprivate _viewWithContentTableDefaults: TablePropertiesView | null = null;\n\n\t/**\n\t * The properties form view displayed inside the balloon (layout table).\n\t */\n\tprivate _viewWithLayoutTableDefaults: TablePropertiesView | null = null;\n\n\t/**\n\t * The batch used to undo all changes made by the form (which are live, as the user types)\n\t * when \"Cancel\" was pressed. Each time the view is shown, a new batch is created.\n\t */\n\tprivate _undoStepBatch?: Batch;\n\n\t/**\n\t * Flag used to indicate whether view is ready to execute update commands\n\t * (it finished loading initial data).\n\t */\n\tprivate _isReady?: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ ContextualBalloon ]> {\n\t\treturn [ ContextualBalloon ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TablePropertiesUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'table.tableProperties', {\n\t\t\tborderColors: defaultColors,\n\t\t\tbackgroundColors: defaultColors\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\tthis._defaultContentTableProperties = getNormalizedDefaultTableProperties(\n\t\t\teditor.config.get( 'table.tableProperties.defaultProperties' )!,\n\t\t\t{\n\t\t\t\tincludeAlignmentProperty: true\n\t\t\t}\n\t\t);\n\t\tthis._defaultLayoutTableProperties = getNormalizedDefaultProperties();\n\n\t\tthis._balloon = editor.plugins.get( ContextualBalloon );\n\n\t\teditor.ui.componentFactory.add( 'tableProperties', () => this._createTablePropertiesButton() );\n\t}\n\n\t/**\n\t * Creates the table properties button.\n\t *\n\t * @internal\n\t */\n\tpublic _createTablePropertiesButton(): ButtonView {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\tconst view = new ButtonView( editor.locale );\n\n\t\tview.set( {\n\t\t\tlabel: t( 'Table properties' ),\n\t\t\ticon: IconTableProperties,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tthis.listenTo( view, 'execute', () => this._showView() );\n\n\t\tconst commands = Object.values( propertyToCommandMap )\n\t\t\t.map( commandName => editor.commands.get( commandName )! );\n\n\t\tview.bind( 'isEnabled' ).toMany( commands, 'isEnabled', ( ...areEnabled ) => (\n\t\t\tareEnabled.some( isCommandEnabled => isCommandEnabled )\n\t\t) );\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1341.\n\t\tif ( this.view ) {\n\t\t\tthis.view.destroy();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView} instance.\n\t *\n\t * @returns The table properties form view instance.\n\t */\n\tprivate _createPropertiesView( defaultTableProperties: NormalizedDefaultProperties ) {\n\t\tconst editor = this.editor;\n\t\tconst config = editor.config.get( 'table.tableProperties' )!;\n\t\tconst borderColorsConfig = normalizeColorOptions( config.borderColors! );\n\t\tconst localizedBorderColors = getLocalizedColorOptions( editor.locale, borderColorsConfig );\n\t\tconst backgroundColorsConfig = normalizeColorOptions( config.backgroundColors! );\n\t\tconst localizedBackgroundColors = getLocalizedColorOptions( editor.locale, backgroundColorsConfig );\n\t\tconst hasColorPicker = config.colorPicker !== false;\n\n\t\tconst view = new TablePropertiesView( editor.locale, {\n\t\t\tborderColors: localizedBorderColors,\n\t\t\tbackgroundColors: localizedBackgroundColors,\n\t\t\tdefaultTableProperties,\n\t\t\tcolorPickerConfig: hasColorPicker ? ( config.colorPicker || {} ) : false\n\t\t} );\n\t\tconst t = editor.t;\n\n\t\t// Render the view so its #element is available for the clickOutsideHandler.\n\t\tview.render();\n\n\t\tthis.listenTo( view, 'submit', () => {\n\t\t\tthis._hideView();\n\t\t} );\n\n\t\tthis.listenTo( view, 'cancel', () => {\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/6180\n\t\t\tif ( this._undoStepBatch!.operations.length ) {\n\t\t\t\teditor.execute( 'undo', this._undoStepBatch );\n\t\t\t}\n\n\t\t\tthis._hideView();\n\t\t} );\n\n\t\t// Close the balloon on Esc key press.\n\t\tview.keystrokes.set( 'Esc', ( data, cancel ) => {\n\t\t\tthis._hideView();\n\t\t\tcancel();\n\t\t} );\n\n\t\t// Close on click outside of balloon panel element.\n\t\tclickOutsideHandler( {\n\t\t\temitter: view,\n\t\t\tactivator: () => this._isViewInBalloon,\n\t\t\tcontextElements: [ this._balloon.view.element! ],\n\t\t\tcallback: () => this._hideView()\n\t\t} );\n\n\t\tconst colorErrorText = getLocalizedColorErrorText( t );\n\t\tconst lengthErrorText = getLocalizedLengthErrorText( t );\n\n\t\t// Create the \"UI -> editor data\" binding.\n\t\t// These listeners update the editor data (via table commands) when any observable\n\t\t// property of the view has changed. They also validate the value and display errors in the UI\n\t\t// when necessary. This makes the view live, which means the changes are\n\t\t// visible in the editing as soon as the user types or changes fields' values.\n\t\tview.on<ObservableChangeEvent<string>>(\n\t\t\t'change:borderStyle',\n\t\t\tthis._getPropertyChangeCallback( 'tableBorderStyle' )\n\t\t);\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:borderColor', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.borderColorInput,\n\t\t\tcommandName: 'tableBorderColor',\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:borderWidth', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.borderWidthInput,\n\t\t\tcommandName: 'tableBorderWidth',\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lineWidthFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:backgroundColor', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.backgroundInput,\n\t\t\tcommandName: 'tableBackgroundColor',\n\t\t\terrorText: colorErrorText,\n\t\t\tvalidator: colorFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:width', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.widthInput,\n\t\t\tcommandName: 'tableWidth',\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>( 'change:height', this._getValidatedPropertyChangeCallback( {\n\t\t\tviewField: view.heightInput,\n\t\t\tcommandName: 'tableHeight',\n\t\t\terrorText: lengthErrorText,\n\t\t\tvalidator: lengthFieldValidator\n\t\t} ) );\n\n\t\tview.on<ObservableChangeEvent<string>>(\n\t\t\t'change:alignment',\n\t\t\tthis._getPropertyChangeCallback( 'tableAlignment' )\n\t\t);\n\n\t\treturn view;\n\t}\n\n\t/**\n\t * In this method the \"editor data -> UI\" binding is happening.\n\t *\n\t * When executed, this method obtains selected table property values from various table commands\n\t * and passes them to the {@link #view}.\n\t *\n\t * This way, the UI stays up–to–date with the editor data.\n\t */\n\tprivate _fillViewFormFromCommandValues() {\n\t\tconst commands = this.editor.commands;\n\t\tconst borderStyleCommand: TableBorderStyleCommand = commands.get( 'tableBorderStyle' )!;\n\n\t\tObject.entries( propertyToCommandMap )\n\t\t\t.map( ( [ property, commandName ] ) => {\n\t\t\t\tconst propertyKey = property as keyof typeof propertyToCommandMap;\n\t\t\t\tconst defaultValue = this.view === this._viewWithContentTableDefaults ?\n\t\t\t\t\tthis._defaultContentTableProperties[ propertyKey ] || '' :\n\t\t\t\t\tthis._defaultLayoutTableProperties[ propertyKey ] || '';\n\n\t\t\t\treturn [ propertyKey, ( commands.get( commandName )!.value || defaultValue ) as string ] as const;\n\t\t\t} )\n\t\t\t.forEach( ( [ property, value ] ) => {\n\t\t\t\t// Do not set the `border-color` and `border-width` fields if `border-style:none`.\n\t\t\t\tif ( ( property === 'borderColor' || property === 'borderWidth' ) && borderStyleCommand.value === 'none' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.view!.set( property, value );\n\t\t\t} );\n\n\t\tthis._isReady = true;\n\t}\n\n\t/**\n\t * Shows the {@link #view} in the {@link #_balloon}.\n\t *\n\t * **Note**: Each time a view is shown, the new {@link #_undoStepBatch} is created that contains\n\t * all changes made to the document when the view is visible, allowing a single undo step\n\t * for all of them.\n\t */\n\tprotected _showView(): void {\n\t\tconst editor = this.editor;\n\n\t\tconst viewTable = getSelectionAffectedTableWidget( editor.editing.view.document.selection );\n\t\tconst modelTable = viewTable && editor.editing.mapper.toModelElement( viewTable );\n\t\tconst useDefaults = !modelTable || modelTable.getAttribute( 'tableType' ) !== 'layout';\n\n\t\tif ( useDefaults && !this._viewWithContentTableDefaults ) {\n\t\t\tthis._viewWithContentTableDefaults = this._createPropertiesView( this._defaultContentTableProperties );\n\t\t} else if ( !useDefaults && !this._viewWithLayoutTableDefaults ) {\n\t\t\tthis._viewWithLayoutTableDefaults = this._createPropertiesView( this._defaultLayoutTableProperties );\n\t\t}\n\n\t\tthis.view = useDefaults ? this._viewWithContentTableDefaults! : this._viewWithLayoutTableDefaults!;\n\n\t\tthis.listenTo( editor.ui, 'update', () => {\n\t\t\tthis._updateView();\n\t\t} );\n\n\t\t// Update the view with the model values.\n\t\tthis._fillViewFormFromCommandValues();\n\n\t\tthis._balloon.add( {\n\t\t\tview: this.view,\n\t\t\tposition: getBalloonTablePositionData( editor )\n\t\t} );\n\n\t\t// Create a new batch. Clicking \"Cancel\" will undo this batch.\n\t\tthis._undoStepBatch = editor.model.createBatch();\n\n\t\t// Basic a11y.\n\t\tthis.view.focus();\n\t}\n\n\t/**\n\t * Removes the {@link #view} from the {@link #_balloon}.\n\t */\n\tprotected _hideView(): void {\n\t\tconst editor = this.editor;\n\n\t\tthis.stopListening( editor.ui, 'update' );\n\n\t\tthis._isReady = false;\n\n\t\t// Blur any input element before removing it from DOM to prevent issues in some browsers.\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/1501.\n\t\tthis.view!.saveButtonView.focus();\n\n\t\tthis._balloon.remove( this.view! );\n\n\t\t// Make sure the focus is not lost in the process by putting it directly\n\t\t// into the editing view.\n\t\tthis.editor.editing.view.focus();\n\t}\n\n\t/**\n\t * Repositions the {@link #_balloon} or hides the {@link #view} if a table is no longer selected.\n\t */\n\tprotected _updateView(): void {\n\t\tconst editor = this.editor;\n\t\tconst viewDocument = editor.editing.view.document;\n\n\t\tif ( !getSelectionAffectedTableWidget( viewDocument.selection ) ) {\n\t\t\tthis._hideView();\n\t\t} else if ( this._isViewVisible ) {\n\t\t\trepositionContextualBalloon( editor, 'table' );\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #view} is the visible in the {@link #_balloon}.\n\t */\n\tprivate get _isViewVisible(): boolean {\n\t\treturn !!this.view && this._balloon.visibleView === this.view;\n\t}\n\n\t/**\n\t * Returns `true` when the {@link #view} is in the {@link #_balloon}.\n\t */\n\tprivate get _isViewInBalloon(): boolean {\n\t\treturn !!this.view && this._balloon.hasView( this.view );\n\t}\n\n\t/**\n\t * Creates a callback that when executed upon {@link #view view's} property change\n\t * executes a related editor command with the new property value.\n\t *\n\t * If new value will be set to the default value, the command will not be executed.\n\t *\n\t * @param commandName The command that will be executed.\n\t */\n\tprivate _getPropertyChangeCallback( commandName: 'tableBorderStyle' | 'tableAlignment' ) {\n\t\treturn ( evt: EventInfo, propertyName: string, newValue: string ) => {\n\t\t\t// Do not execute the command on initial call (opening the table properties view).\n\t\t\tif ( !this._isReady ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.editor.execute( commandName, {\n\t\t\t\tvalue: newValue,\n\t\t\t\tbatch: this._undoStepBatch\n\t\t\t} );\n\t\t};\n\t}\n\n\t/**\n\t * Creates a callback that when executed upon {@link #view view's} property change:\n\t * * executes a related editor command with the new property value if the value is valid,\n\t * * or sets the error text next to the invalid field, if the value did not pass the validation.\n\t */\n\tprivate _getValidatedPropertyChangeCallback(\n\t\toptions: {\n\t\t\tcommandName: 'tableBorderColor' | 'tableBorderWidth' | 'tableBackgroundColor' | 'tableWidth' | 'tableHeight';\n\t\t\tviewField: LabeledFieldView;\n\t\t\tvalidator: ( value: string ) => boolean;\n\t\t\terrorText: string;\n\t\t}\n\t) {\n\t\tconst { commandName, viewField, validator, errorText } = options;\n\t\tconst setErrorTextDebounced = debounce( () => {\n\t\t\tviewField.errorText = errorText;\n\t\t}, ERROR_TEXT_TIMEOUT );\n\n\t\treturn ( evt: EventInfo, propertyName: string, newValue: string ) => {\n\t\t\tsetErrorTextDebounced.cancel();\n\n\t\t\t// Do not execute the command on initial call (opening the table properties view).\n\t\t\tif ( !this._isReady ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( validator( newValue ) ) {\n\t\t\t\tthis.editor.execute( commandName, {\n\t\t\t\t\tvalue: newValue,\n\t\t\t\t\tbatch: this._undoStepBatch\n\t\t\t\t} );\n\n\t\t\t\tviewField.errorText = null;\n\t\t\t} else {\n\t\t\t\tsetErrorTextDebounced();\n\t\t\t}\n\t\t};\n\t}\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/**\n * @module table/tableproperties\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\n\nimport { TablePropertiesEditing } from './tableproperties/tablepropertiesediting.js';\nimport { TablePropertiesUI } from './tableproperties/tablepropertiesui.js';\n\n/**\n * The table properties feature. Enables support for setting properties of tables (size, border, background, etc.).\n *\n * Read more in the {@glink features/tables/tables-styling Table and cell styling tools} section.\n * See also the {@link module:table/tablecellproperties~TableCellProperties} plugin.\n *\n * This is a \"glue\" plugin that loads the\n * {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing table properties editing feature} and\n * the {@link module:table/tableproperties/tablepropertiesui~TablePropertiesUI table properties UI feature}.\n */\nexport class TableProperties extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableProperties' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TablePropertiesEditing, TablePropertiesUI ]> {\n\t\treturn [ TablePropertiesEditing, TablePropertiesUI ];\n\t}\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/**\n * @module table/converters/table-caption-post-fixer\n */\n\nimport type { Model, ModelWriter, ModelElement, ModelNode } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Injects a table caption post-fixer into the model.\n *\n * The role of the table caption post-fixer is to ensure that the table with caption have the correct structure\n * after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n *\n * The correct structure means that:\n *\n * * If there are many caption model element, they are merged into one model.\n * * A final, merged caption model is placed at the end of the table.\n *\n * @internal\n */\nexport function injectTableCaptionPostFixer( model: Model ): void {\n\tmodel.document.registerPostFixer( writer => tableCaptionPostFixer( writer, model ) );\n}\n\n/**\n * The table caption post-fixer.\n */\nfunction tableCaptionPostFixer( writer: ModelWriter, model: Model ) {\n\tconst changes = model.document.differ.getChanges();\n\tlet wasFixed = false;\n\n\tfor ( const entry of changes ) {\n\t\tif ( entry.type != 'insert' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst positionParent = entry.position.parent;\n\n\t\tif ( positionParent.is( 'element', 'table' ) || entry.name == 'table' ) {\n\t\t\tconst table = ( entry.name == 'table' ? entry.position.nodeAfter : positionParent ) as ModelElement;\n\t\t\tconst captionsToMerge = Array.from( table.getChildren() )\n\t\t\t\t.filter( ( child: ModelNode ): child is ModelElement => child.is( 'element', 'caption' ) );\n\t\t\tconst firstCaption = captionsToMerge.shift();\n\n\t\t\tif ( !firstCaption ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Move all the contents of the captions to the first one.\n\t\t\tfor ( const caption of captionsToMerge ) {\n\t\t\t\twriter.move( writer.createRangeIn( caption ), firstCaption, 'end' );\n\t\t\t\twriter.remove( caption );\n\t\t\t}\n\n\t\t\t// Make sure the final caption is at the end of the table.\n\t\t\tif ( firstCaption.nextSibling ) {\n\t\t\t\twriter.move( writer.createRangeOn( firstCaption ), table, 'end' );\n\t\t\t\twasFixed = true;\n\t\t\t}\n\n\t\t\t// Do we merged captions and/or moved the single caption to the end of the table?\n\t\t\twasFixed = !!captionsToMerge.length || wasFixed;\n\t\t}\n\t}\n\n\treturn wasFixed;\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/**\n * @module table/tablecaption/utils\n */\n\nimport type {\n\tModelDocumentFragment,\n\tModelDocumentSelection,\n\tModelElement,\n\tViewElement\n} from '@ckeditor/ckeditor5-engine';\n\nimport { getSelectionAffectedTable } from '../utils/common.js';\n\n/**\n * Checks if the provided model element is a `table`.\n *\n * @param modelElement Element to check if it is a table.\n * @internal\n */\nexport function isTable( modelElement: ModelElement | ModelDocumentFragment | null ): boolean {\n\treturn !!modelElement && modelElement.is( 'element', 'table' );\n}\n\n/**\n * Returns the caption model element from a given table element. Returns `null` if no caption is found.\n *\n * @param tableModelElement Table element in which we will try to find a caption element.\n * @internal\n */\nexport function getCaptionFromTableModelElement( tableModelElement: ModelElement ): ModelElement | null {\n\tfor ( const node of tableModelElement.getChildren() ) {\n\t\tif ( node.is( 'element', 'caption' ) ) {\n\t\t\treturn node;\n\t\t}\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.\n *\n * @param selection The selection checked for caption presence.\n * @internal\n */\nexport function getCaptionFromModelSelection( selection: ModelDocumentSelection ): ModelElement | null {\n\tconst tableElement = getSelectionAffectedTable( selection );\n\n\tif ( !tableElement ) {\n\t\treturn null;\n\t}\n\n\treturn getCaptionFromTableModelElement( tableElement );\n}\n\n/**\n * {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a caption.\n *\n * There are two possible forms of the valid caption:\n *  - A `<figcaption>` element inside a `<figure class=\"table\">` element.\n *  - A `<caption>` inside a <table>.\n *\n * @returns Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element cannot be matched.\n * @internal\n */\nexport function matchTableCaptionViewElement( element: ViewElement ): { name: true } | null {\n\tconst parent = element.parent;\n\n\tif ( element.name == 'figcaption' && parent && parent.is( 'element', 'figure' ) && parent.hasClass( 'table' ) ) {\n\t\treturn { name: true };\n\t}\n\n\tif ( element.name == 'caption' && parent && parent.is( 'element', 'table' ) ) {\n\t\treturn { name: true };\n\t}\n\n\treturn null;\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/**\n* @module table/tablecaption/toggletablecaptioncommand\n*/\n\nimport { Command } from '@ckeditor/ckeditor5-core';\nimport type { ModelWriter } from '@ckeditor/ckeditor5-engine';\nimport { type TableCaptionEditing } from './tablecaptionediting.js';\n\nimport { getCaptionFromTableModelElement } from './utils.js';\nimport { getSelectionAffectedTable } from '../utils/common.js';\n\n/**\n * The toggle table caption command.\n *\n * This command is registered by {@link module:table/tablecaption/tablecaptionediting~TableCaptionEditing} as the\n * `'toggleTableCaption'` editor command.\n *\n * Executing this command:\n *\n * * either adds or removes the table caption of a selected table (depending on whether the caption is present or not),\n * * removes the table caption if the selection is anchored in one.\n *\n * ```ts\n * // Toggle the presence of the caption.\n * editor.execute( 'toggleTableCaption' );\n * ```\n *\n * **Note**: You can move the selection to the caption right away as it shows up upon executing this command by using\n * the `focusCaptionOnShow` option:\n *\n * ```ts\n * editor.execute( 'toggleTableCaption', { focusCaptionOnShow: true } );\n * ```\n */\nexport class ToggleTableCaptionCommand extends Command {\n\tdeclare public value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst editor = this.editor;\n\t\tconst tableElement = getSelectionAffectedTable( editor.model.document.selection );\n\n\t\tthis.isEnabled = !!tableElement && editor.model.schema.checkChild( tableElement, 'caption' );\n\n\t\tif ( !this.isEnabled ) {\n\t\t\tthis.value = false;\n\t\t} else {\n\t\t\tthis.value = !!getCaptionFromTableModelElement( tableElement );\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * ```ts\n\t * editor.execute( 'toggleTableCaption' );\n\t * ```\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.focusCaptionOnShow When true and the caption shows up, the selection will be moved into it straight away.\n\t * @fires execute\n\t */\n\tpublic override execute( { focusCaptionOnShow = false }: { focusCaptionOnShow?: boolean } = {} ): void {\n\t\tthis.editor.model.change( writer => {\n\t\t\tif ( this.value ) {\n\t\t\t\tthis._hideTableCaption( writer );\n\t\t\t} else {\n\t\t\t\tthis._showTableCaption( writer, focusCaptionOnShow );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Shows the table caption. Also:\n\t *\n\t * * it attempts to restore the caption content from the `TableCaptionEditing` caption registry,\n\t * * it moves the selection to the caption right away, it the `focusCaptionOnShow` option was set.\n\t *\n\t * @param focusCaptionOnShow Default focus behavior when showing the caption.\n\t */\n\tprivate _showTableCaption( writer: ModelWriter, focusCaptionOnShow: boolean ) {\n\t\tconst model = this.editor.model;\n\t\tconst tableElement = getSelectionAffectedTable( model.document.selection );\n\t\tconst tableCaptionEditing: TableCaptionEditing = this.editor.plugins.get( 'TableCaptionEditing' );\n\t\tconst savedCaptionElement = tableCaptionEditing._getSavedCaption( tableElement );\n\n\t\t// Try restoring the caption from the TableCaptionEditing plugin storage.\n\t\tconst newCaptionElement = savedCaptionElement || writer.createElement( 'caption' );\n\n\t\tmodel.insertContent( newCaptionElement, tableElement, 'end' );\n\n\t\tif ( focusCaptionOnShow ) {\n\t\t\twriter.setSelection( newCaptionElement, 'in' );\n\t\t}\n\t}\n\n\t/**\n\t * Hides the caption of a selected table (or an table caption the selection is anchored to).\n\t *\n\t * The content of the caption is stored in the `TableCaptionEditing` caption registry to make this\n\t * a reversible action.\n\t */\n\tprivate _hideTableCaption( writer: ModelWriter ) {\n\t\tconst model = this.editor.model;\n\t\tconst tableElement = getSelectionAffectedTable( model.document.selection );\n\t\tconst tableCaptionEditing: TableCaptionEditing = this.editor.plugins.get( 'TableCaptionEditing' );\n\t\tconst captionElement = getCaptionFromTableModelElement( tableElement )!;\n\n\t\t// Store the caption content so it can be restored quickly if the user changes their mind.\n\t\ttableCaptionEditing._saveCaption( tableElement, captionElement );\n\n\t\tmodel.deleteContent( writer.createSelection( captionElement, 'on' ) );\n\t}\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/**\n * @module table/tablecaption/tablecaptionediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport {\n\ttype DowncastInsertEvent,\n\ttype ViewElement,\n\tModelElement,\n\tenableViewPlaceholder\n} from '@ckeditor/ckeditor5-engine';\nimport { uid } from '@ckeditor/ckeditor5-utils';\nimport { toWidgetEditable } from '@ckeditor/ckeditor5-widget';\n\nimport { injectTableCaptionPostFixer } from '../converters/table-caption-post-fixer.js';\nimport { ToggleTableCaptionCommand } from './toggletablecaptioncommand.js';\nimport { getCaptionFromTableModelElement, isTable, matchTableCaptionViewElement } from './utils.js';\nimport type { TableEditing } from '../tableediting.js';\n\n/**\n * The table caption editing plugin.\n */\nexport class TableCaptionEditing extends Plugin {\n\t/**\n\t * A map that keeps saved JSONified table captions and table model elements they are\n\t * associated with.\n\t *\n\t * To learn more about this system, see {@link #_saveCaption}.\n\t */\n\tprivate _savedCaptionsMap = new WeakMap<ModelElement, unknown>();\n\n\t/**\n\t * A map that keeps generated ids for table captions to reuse them if the same caption is rendered again.\n\t */\n\tprivate _captionIdsMapping = new WeakMap<ModelElement, string>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableCaptionEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst view = editor.editing.view;\n\t\tconst t = editor.t;\n\t\tconst useCaptionElement = editor.config.get( 'table.tableCaption.useCaptionElement' );\n\n\t\tif ( !schema.isRegistered( 'caption' ) ) {\n\t\t\tschema.register( 'caption', {\n\t\t\t\tallowIn: 'table',\n\t\t\t\tallowContentOf: '$block',\n\t\t\t\tisLimit: true\n\t\t\t} );\n\t\t} else {\n\t\t\tschema.extend( 'caption', {\n\t\t\t\tallowIn: 'table'\n\t\t\t} );\n\t\t}\n\n\t\teditor.commands.add( 'toggleTableCaption', new ToggleTableCaptionCommand( this.editor ) );\n\n\t\tif ( useCaptionElement ) {\n\t\t\tconst tableEditing: TableEditing = editor.plugins.get( 'TableEditing' );\n\n\t\t\ttableEditing.registerAdditionalSlot( {\n\t\t\t\tfilter: element => element.is( 'element', 'caption' ),\n\t\t\t\tpositionOffset: 'end'\n\t\t\t} );\n\t\t}\n\n\t\t// View -> model converter for the data pipeline.\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tview: matchTableCaptionViewElement,\n\t\t\tmodel: 'caption'\n\t\t} );\n\n\t\t// Model -> view converter for the data pipeline.\n\t\teditor.conversion.for( 'dataDowncast' ).elementToElement( {\n\t\t\tmodel: 'caption',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tif ( !isTable( modelElement.parent ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn writer.createContainerElement( useCaptionElement ? 'caption' : 'figcaption' );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> view converter for the editing pipeline.\n\t\teditor.conversion.for( 'editingDowncast' ).elementToElement( {\n\t\t\tmodel: 'caption',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tif ( !isTable( modelElement.parent ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst captionElement = writer.createEditableElement( useCaptionElement ? 'caption' : 'figcaption' );\n\t\t\t\twriter.setCustomProperty( 'tableCaption', true, captionElement );\n\n\t\t\t\tcaptionElement.placeholder = t( 'Enter table caption' );\n\n\t\t\t\tenableViewPlaceholder( {\n\t\t\t\t\tview,\n\t\t\t\t\telement: captionElement,\n\t\t\t\t\tkeepOnFocus: true\n\t\t\t\t} );\n\n\t\t\t\treturn toWidgetEditable( captionElement, writer );\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'editingDowncast' ).add( dispatcher => {\n\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert:table', ( evt, data, { writer, mapper } ) => {\n\t\t\t\tconst modelTable = data.item;\n\t\t\t\tconst viewFigure = mapper.toViewElement( modelTable );\n\n\t\t\t\tif ( !viewFigure ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewTable = Array\n\t\t\t\t\t.from( viewFigure.getChildren() )\n\t\t\t\t\t.find( child => child.is( 'element', 'table' ) ) as ViewElement | undefined;\n\n\t\t\t\tif ( !viewTable ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst modelCaption = getCaptionFromTableModelElement( modelTable );\n\n\t\t\t\t// Remove `aria-labelledby` from the table if there is no caption.\n\t\t\t\tif ( !modelCaption ) {\n\t\t\t\t\twriter.removeAttribute( 'aria-labelledby', viewTable );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewCaption = mapper.toViewElement( modelCaption );\n\n\t\t\t\tif ( !viewCaption ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try reusing the same id for the caption if it was already created for the given model caption.\n\t\t\t\t// If it was not created before, generate a new one and save it in the mapping to reuse it in the future if needed.\n\t\t\t\tlet captionId: string;\n\n\t\t\t\tif ( viewCaption.hasAttribute( 'id' ) ) {\n\t\t\t\t\tcaptionId = viewCaption.getAttribute( 'id' )!;\n\t\t\t\t} else {\n\t\t\t\t\tcaptionId = this._captionIdsMapping.get( modelCaption ) ?? `ck-editor__caption_${ uid() }`;\n\t\t\t\t}\n\n\t\t\t\tthis._captionIdsMapping.set( modelCaption, captionId );\n\n\t\t\t\twriter.setAttribute( 'id', captionId, viewCaption );\n\t\t\t\twriter.setAttribute( 'aria-labelledby', captionId, viewTable );\n\t\t\t}, { priority: 'low' } );\n\t\t} );\n\n\t\tinjectTableCaptionPostFixer( editor.model );\n\t}\n\n\t/**\n\t * Returns the saved {@link module:engine/model/element~ModelElement#toJSON JSONified} caption\n\t * of a table model element.\n\t *\n\t * See {@link #_saveCaption}.\n\t *\n\t * @internal\n\t * @param tableModelElement The model element the caption should be returned for.\n\t * @returns The model caption element or `null` if there is none.\n\t */\n\tpublic _getSavedCaption( tableModelElement: ModelElement ): ModelElement | null {\n\t\tconst jsonObject = this._savedCaptionsMap.get( tableModelElement );\n\n\t\treturn jsonObject ? ModelElement.fromJSON( jsonObject ) : null;\n\t}\n\n\t/**\n\t * Saves a {@link module:engine/model/element~ModelElement#toJSON JSONified} caption for\n\t * a table element to allow restoring it in the future.\n\t *\n\t * A caption is saved every time it gets hidden. The\n\t * user should be able to restore it on demand.\n\t *\n\t * **Note**: The caption cannot be stored in the table model element attribute because,\n\t * for instance, when the model state propagates to collaborators, the attribute would get\n\t * lost (mainly because it does not convert to anything when the caption is hidden) and\n\t * the states of collaborators' models would de-synchronize causing numerous issues.\n\t *\n\t * See {@link #_getSavedCaption}.\n\t *\n\t * @internal\n\t * @param tableModelElement The model element the caption is saved for.\n\t * @param caption The caption model element to be saved.\n\t */\n\tpublic _saveCaption( tableModelElement: ModelElement, caption: ModelElement ): void {\n\t\tthis._savedCaptionsMap.set( tableModelElement, caption.toJSON() );\n\t}\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/**\n* @module table/tablecaption/tablecaptionui\n*/\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\nimport { IconCaption } from '@ckeditor/ckeditor5-icons';\nimport { type ToggleTableCaptionCommand } from './toggletablecaptioncommand.js';\n\nimport { getCaptionFromModelSelection } from './utils.js';\n\n/**\n  * The table caption UI plugin. It introduces the `'toggleTableCaption'` UI button.\n  */\nexport class TableCaptionUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableCaptionUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'toggleTableCaption', locale => {\n\t\t\tconst command: ToggleTableCaptionCommand = editor.commands.get( 'toggleTableCaption' )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\ticon: IconCaption,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );\n\t\t\tview.bind( 'label' ).to( command, 'value', value => value ? t( 'Toggle caption off' ) : t( 'Toggle caption on' ) );\n\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\teditor.execute( 'toggleTableCaption', { focusCaptionOnShow: true } );\n\n\t\t\t\t// Scroll to the selection and highlight the caption if the caption showed up.\n\t\t\t\tif ( command.value ) {\n\t\t\t\t\tconst modelCaptionElement = getCaptionFromModelSelection( editor.model.document.selection )!;\n\t\t\t\t\tconst figcaptionElement = editor.editing.mapper.toViewElement( modelCaptionElement );\n\n\t\t\t\t\tif ( !figcaptionElement ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\teditingView.scrollToTheSelection();\n\t\t\t\t\teditingView.change( writer => {\n\t\t\t\t\t\twriter.addClass( 'table__caption_highlighted', figcaptionElement );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\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/**\n * @module table/tablecaption\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { TableCaptionEditing } from './tablecaption/tablecaptionediting.js';\nimport { TableCaptionUI } from './tablecaption/tablecaptionui.js';\n\n/**\n * The table caption plugin.\n */\nexport class TableCaption extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableCaption' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableCaptionEditing, TableCaptionUI ]> {\n\t\treturn [ TableCaptionEditing, TableCaptionUI ];\n\t}\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/**\n * @module table/tablescroll/watchers\n */\n\nimport { Collection, type EventInfo } from '@ckeditor/ckeditor5-utils';\nimport type { EditingView, Model, ModelElement, ModelDocumentChangeEvent } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Creates a live collection of all `table` model elements present in the document and keeps it\n * up to date as tables are inserted, moved, or removed.\n *\n * @internal\n */\nexport function watchTableModelElements( model: Model ): Collection<ModelElement> {\n\tconst tables: Collection<ModelElement> = new Collection();\n\n\tmodel.document.on<ModelDocumentChangeEvent>( 'change', () => {\n\t\tconst documentChanges = model.document.differ.getChanges();\n\t\tconst insertedTables = new Set<ModelElement>();\n\t\tconst movedTables = new Set<ModelElement>();\n\n\t\tfor ( const change of documentChanges ) {\n\t\t\tif ( change.type === 'insert' && change.name !== '$text' && change.position.nodeAfter ) {\n\t\t\t\tconst range = model.createRangeOn( change.position.nodeAfter );\n\n\t\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t\tif ( !item.is( 'element', 'table' ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( tables.has( item ) ) {\n\t\t\t\t\t\tmovedTables.add( item );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tinsertedTables.add( item );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( const table of Array.from( tables ) ) {\n\t\t\tif ( table.root.rootName !== '$graveyard' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tinsertedTables.delete( table );\n\t\t\tmovedTables.delete( table );\n\n\t\t\tif ( tables.has( table ) ) {\n\t\t\t\ttables.remove( table );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const table of movedTables ) {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( tables.has( table ) ) {\n\t\t\t\ttables.remove( table );\n\t\t\t}\n\t\t}\n\n\t\tif ( insertedTables.size || movedTables.size ) {\n\t\t\ttables.addMany( [ ...insertedTables, ...movedTables ] );\n\t\t}\n\t} );\n\n\treturn tables;\n}\n\n/**\n * Observes the DOM width of every editing root and calls `onResize` whenever any of them changes width.\n * Height-only changes are ignored, since only a root's width can make a table overflow it.\n *\n * @internal\n */\nexport function watchRootsWidthResize( view: EditingView, onResize: () => void ): () => void {\n\tconst { roots } = view.document;\n\tconst observedRoots = new Map<string, ResizeObserver>();\n\tconst lastKnownWidths = new Map<string, number>();\n\n\tconst attachRoot = ( rootName: string ) => {\n\t\tif ( observedRoots.has( rootName ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst domRoot = view.getDomRoot( rootName );\n\n\t\tif ( !domRoot ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst observer = new ResizeObserver( entries => {\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst width = entry.contentRect.width;\n\n\t\t\t\tif ( lastKnownWidths.get( rootName ) === width ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlastKnownWidths.set( rootName, width );\n\t\t\t\tonResize();\n\t\t\t}\n\t\t} );\n\n\t\tobserver.observe( domRoot );\n\t\tobservedRoots.set( rootName, observer );\n\t};\n\n\tconst detachRoot = ( rootName: string ) => {\n\t\tconst observer = observedRoots.get( rootName );\n\n\t\tif ( observer ) {\n\t\t\tobserver.disconnect();\n\t\t\tobservedRoots.delete( rootName );\n\t\t\tlastKnownWidths.delete( rootName );\n\t\t}\n\t};\n\n\tconst onRootAdd = ( evt: EventInfo, viewRoot: { rootName: string } ) => attachRoot( viewRoot.rootName );\n\tconst onRootRemove = ( evt: EventInfo, viewRoot: { rootName: string } ) => detachRoot( viewRoot.rootName );\n\n\tconst attachAllRoots = () => {\n\t\tfor ( const root of roots ) {\n\t\t\tattachRoot( root.rootName );\n\t\t}\n\t};\n\n\tattachAllRoots();\n\n\troots.on( 'add', onRootAdd );\n\troots.on( 'remove', onRootRemove );\n\tview.on( 'render', attachAllRoots );\n\n\treturn () => {\n\t\troots.off( 'add', onRootAdd );\n\t\troots.off( 'remove', onRootRemove );\n\t\tview.off( 'render', attachAllRoots );\n\n\t\tfor ( const observer of observedRoots.values() ) {\n\t\t\tobserver.disconnect();\n\t\t}\n\n\t\tobservedRoots.clear();\n\t\tlastKnownWidths.clear();\n\t};\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/**\n * @module table/tablescroll/tablescrollediting\n */\n\nimport { throttle } from 'es-toolkit/compat';\n\nimport { Plugin, type Editor, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { DomEmitterMixin, global, type Collection, type CollectionChangeEvent, type EventInfo } from '@ckeditor/ckeditor5-utils';\nimport type {\n\tModelElement,\n\tViewElement,\n\tDowncastAttributeEvent,\n\tDowncastInsertEvent\n} from '@ckeditor/ckeditor5-engine';\n\nimport { TableEditing } from '../tableediting.js';\nimport type { TableType } from '../tableconfig.js';\n\nimport { watchTableModelElements, watchRootsWidthResize } from './watchers.js';\nimport { getEditableContentWidth } from '../tablecolumnresize/utils.js';\n\n/**\n * The table scrolling editing plugin.\n */\nexport class TableScrollEditing extends Plugin {\n\t/**\n\t * Used to listen to native DOM events.\n\t */\n\tprivate _domEmitter = new ( DomEmitterMixin() )();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableScrollEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableEditing ]> {\n\t\treturn [ TableEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'table.tableScroll.tableTypes', [ 'content' ] );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst { editor } = this;\n\t\tconst tables = watchTableModelElements( editor.model );\n\n\t\tthis._watchNewTables( tables );\n\t\tthis._watchRootEditables( tables );\n\t\tthis._registerConversion();\n\t\tthis._watchColumnResize();\n\t\tthis._watchFiguresScroll();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tthis._domEmitter.stopListening();\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Whether a given table may overflow its container and become horizontally scrollable, and whether\n\t * column/table resizing is allowed to grow it past the container's width.\n\t *\n\t * @internal\n\t */\n\tpublic _isTableScrollable( table: ModelElement ): boolean {\n\t\tif ( table.parent !== table.root ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst tableType: TableType = ( table.getAttribute( 'tableType' ) as TableType ) || 'content';\n\t\tconst scrollableTableTypes = this.editor.config.get( 'table.tableScroll.tableTypes' )!;\n\n\t\treturn scrollableTableTypes.includes( tableType );\n\t}\n\n\t/**\n\t * Determines whether a table overflows its container and applies the corresponding view state:\n\t * the `ck-table-overflowing` class on the figure, and the actual (possibly container-exceeding)\n\t * width on the inner `<table>` and a sibling `<figcaption>`, if present.\n\t *\n\t * @internal\n\t */\n\tpublic _updateTableScrollOverflowState( table: ModelElement, tableWidthOverride?: string | null ): void {\n\t\tconst { editor } = this;\n\t\tconst containerWidth = getEditableContentWidth( editor, table.root.rootName! );\n\n\t\tif ( containerWidth === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewFigure = editor.editing.mapper.toViewElement( table );\n\n\t\tif ( !viewFigure ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewTable = findChildElement( viewFigure, 'table' );\n\n\t\tif ( !viewTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst viewFigcaption = findChildElement( viewFigure, 'figcaption' );\n\n\t\tlet tableWidth: string | null = null;\n\t\tlet hasTableWidthSource = false;\n\n\t\tif ( tableWidthOverride !== undefined ) {\n\t\t\ttableWidth = tableWidthOverride;\n\t\t\thasTableWidthSource = true;\n\t\t} else if ( table.hasAttribute( 'tableWidth' ) ) {\n\t\t\ttableWidth = table.getAttribute( 'tableWidth' ) as string;\n\t\t\thasTableWidthSource = true;\n\t\t}\n\n\t\t// Nothing (`TableProperties` / `TableColumnResizeEditing`) has ever set a `tableWidth`\n\t\t// on this table, so this plugin has no width of its own to manage here. Bail out without\n\t\t// touching the figure/table/figcaption styles, as they may have been set by something else,\n\t\t// e.g. GHS through `htmlFigureAttributes`.\n\t\tif ( !hasTableWidthSource ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isOverflowing =\n\t\t\t!!tableWidth &&\n\t\t\tthis._isTableScrollable( table ) &&\n\t\t\tisTableWidthOverflowing( tableWidth, containerWidth );\n\n\t\tif ( isOverflowing ) {\n\t\t\tthis._scheduleScrollOffsetSync( viewFigure );\n\t\t}\n\n\t\teditor.editing.view.change( writer => {\n\t\t\tif ( isOverflowing ) {\n\t\t\t\twriter.removeStyle( 'width', viewFigure );\n\t\t\t\twriter.addClass( 'ck-table-overflowing', viewFigure );\n\t\t\t\twriter.setStyle( 'width', tableWidth!, viewTable );\n\n\t\t\t\tif ( viewFigcaption ) {\n\t\t\t\t\twriter.setStyle( 'width', tableWidth!, viewFigcaption );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( tableWidth ) {\n\t\t\t\t\twriter.setStyle( 'width', tableWidth, viewFigure );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeStyle( 'width', viewFigure );\n\t\t\t\t}\n\n\t\t\t\tif ( viewFigcaption ) {\n\t\t\t\t\twriter.removeStyle( 'width', viewFigcaption );\n\t\t\t\t}\n\n\t\t\t\twriter.removeClass( 'ck-table-overflowing', viewFigure );\n\t\t\t\twriter.removeStyle( 'width', viewTable );\n\t\t\t\twriter.removeStyle( '--ck-table-scroll-offset', viewFigure );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Schedules a re-read of the widget figure's actual `scrollLeft` into `--ck-table-scroll-offset`, once\n\t * the render reflecting the change that triggered it has actually happened - see the call site for why\n\t * this can't just read (and force a reflow for) `scrollLeft` immediately instead.\n\t */\n\tprivate _scheduleScrollOffsetSync( viewFigure: ViewElement ): void {\n\t\tconst { view } = this.editor.editing;\n\n\t\tview.once( 'render', () => {\n\t\t\tconst domFigure = view.domConverter.mapViewToDom( viewFigure );\n\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif ( domFigure ) {\n\t\t\t\tview.change( writer => {\n\t\t\t\t\twriter.setStyle( '--ck-table-scroll-offset', `${ domFigure.scrollLeft }px`, viewFigure );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Registers editing-only downcast listeners that keep overflow state in sync.\n\t */\n\tprivate _registerConversion(): void {\n\t\tconst { editor } = this;\n\n\t\teditor.conversion.for( 'editingDowncast' ).add( dispatcher => {\n\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute:tableWidth:table', ( evt, data ) => {\n\t\t\t\tthis._updateTableScrollOverflowState( data.item, data.attributeNewValue as string | null );\n\t\t\t}, { priority: 'low' } );\n\n\t\t\tdispatcher.on<DowncastAttributeEvent<ModelElement>>( 'attribute:tableType:table', ( evt, data ) => {\n\t\t\t\tthis._updateTableScrollOverflowState( data.item );\n\t\t\t}, { priority: 'low' } );\n\n\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert:caption', ( evt, data ) => {\n\t\t\t\tconst modelTable = data.item.parent as ModelElement | null;\n\n\t\t\t\tif ( modelTable?.is( 'element', 'table' ) ) {\n\t\t\t\t\tthis._updateTableScrollOverflowState( modelTable );\n\t\t\t\t}\n\t\t\t}, { priority: 'lowest' } );\n\n\t\t\tdispatcher.on<DowncastInsertEvent<ModelElement>>( 'insert:table', ( evt, data ) => {\n\t\t\t\tthis._updateTableScrollOverflowState( data.item );\n\t\t\t}, { priority: 'lowest' } );\n\t\t} );\n\t}\n\n\t/**\n\t * Keeps every overflowing table's `--ck-table-scroll-offset` custom property in sync with its\n\t * `scrollLeft`, using a single delegated listener instead of one native listener per table.\n\t */\n\tprivate _watchFiguresScroll(): void {\n\t\tconst { editor } = this;\n\t\tconst { view } = editor.editing;\n\n\t\tconst onScroll = ( evt: EventInfo, domEvent: Event ) => {\n\t\t\tconst domFigure = domEvent.target as HTMLElement;\n\n\t\t\tif ( !domFigure.classList?.contains( 'ck-table-overflowing' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst viewFigure = view.domConverter.mapDomToView( domFigure ) as ViewElement | undefined;\n\n\t\t\tif ( !viewFigure ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tview.change( writer => {\n\t\t\t\twriter.setStyle( '--ck-table-scroll-offset', `${ domFigure.scrollLeft }px`, viewFigure );\n\t\t\t} );\n\t\t};\n\n\t\tthis._domEmitter.listenTo( global.document, 'scroll', onScroll, { useCapture: true } );\n\t}\n\n\t/**\n\t * Listen for column resize events and updates proper view element size.\n\t */\n\tprivate _watchColumnResize(): void {\n\t\tconst { editor } = this;\n\t\tconst { plugins } = editor;\n\n\t\tif ( !plugins.has( 'TableColumnResizeEditing' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst columnResizeEditing = plugins.get( 'TableColumnResizeEditing' );\n\n\t\tthis.listenTo( columnResizeEditing, '_setResizingTableWidth', ( evt, [ , viewFigure, width ] ) => {\n\t\t\tevt.stop();\n\n\t\t\tconst modelTable = editor.editing.mapper.toModelElement( viewFigure as ViewElement ) as ModelElement;\n\n\t\t\tthis._updateTableScrollOverflowState( modelTable, width as string | null );\n\t\t}, { priority: 'high' } );\n\n\t\tthis.listenTo( columnResizeEditing, '_getResizingTableWidth', ( evt, [ viewFigure ] ) => {\n\t\t\tevt.stop();\n\n\t\t\tevt.return = getWidthHoldingElement( viewFigure as ViewElement ).getStyle( 'width' )!;\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Re-evaluates the overflow state of every table whenever the window or an editing root is resized.\n\t */\n\tprivate _watchRootEditables( tables: Collection<ModelElement> ): void {\n\t\tconst { editor } = this;\n\n\t\tconst recalculateAll = () => {\n\t\t\tconst resizingTable = getCurrentlyResizingTable( editor );\n\n\t\t\tfor ( const table of tables ) {\n\t\t\t\tif ( table === resizingTable ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis._updateTableScrollOverflowState( table );\n\t\t\t}\n\t\t};\n\n\t\tconst throttledRecalculateAll = throttle( recalculateAll, 100 );\n\t\tconst stopWatchingRootsResize = watchRootsWidthResize( editor.editing.view, throttledRecalculateAll );\n\n\t\teditor.ui.view.listenTo( global.window, 'resize', throttledRecalculateAll );\n\t\teditor.once( 'ready', recalculateAll );\n\n\t\tthis.listenTo( editor, 'destroy', () => {\n\t\t\tthrottledRecalculateAll.cancel();\n\t\t\tstopWatchingRootsResize();\n\t\t} );\n\t}\n\n\t/**\n\t * Evaluates the overflow state of every newly inserted table.\n\t */\n\tprivate _watchNewTables( tables: Collection<ModelElement> ): void {\n\t\tthis.listenTo<CollectionChangeEvent<ModelElement>>( tables, 'change', ( evt, data ) => {\n\t\t\tfor ( const table of data.added ) {\n\t\t\t\tthis._updateTableScrollOverflowState( table );\n\t\t\t}\n\t\t} );\n\t}\n}\n\n/**\n * Returns the table for which a column resize is currently in progress, if the\n * `TableColumnResizeEditing` plugin is loaded and such a resize is active.\n */\nfunction getCurrentlyResizingTable( editor: Editor ): ModelElement | null {\n\tconst { plugins } = editor;\n\n\tif ( !plugins.has( 'TableColumnResizeEditing' ) ) {\n\t\treturn null;\n\t}\n\n\treturn plugins.get( 'TableColumnResizeEditing' ).resizingTable;\n}\n\n/**\n * Checks if given table width overflows container width.\n */\nfunction isTableWidthOverflowing( tableWidth: string, containerWidth: number ): boolean {\n\tif ( tableWidth.endsWith( '%' ) ) {\n\t\treturn parseFloat( tableWidth ) > 100;\n\t}\n\n\tif ( tableWidth.endsWith( 'px' ) ) {\n\t\treturn parseFloat( tableWidth ) > containerWidth;\n\t}\n\n\treturn false;\n}\n\n/**\n * Returns whichever element - the widget's `<figure>` or its inner `<table>` - currently holds the\n * table's actual (possibly container-exceeding) width: the `<table>` while overflowing, the `<figure>`\n * otherwise.\n */\nfunction getWidthHoldingElement( viewFigure: ViewElement ): ViewElement {\n\treturn (\n\t\tviewFigure.hasClass( 'ck-table-overflowing' ) ?\n\t\t\tfindChildElement( viewFigure, 'table' )! :\n\t\t\tviewFigure\n\t);\n}\n\n/**\n * Finds a direct child element of `parent` by its name.\n */\nfunction findChildElement( parent: ViewElement, elementName: string ): ViewElement | undefined {\n\treturn Array\n\t\t.from( parent.getChildren() )\n\t\t.find( ( child ): child is ViewElement => child.is( 'element', elementName ) );\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/**\n * @module table/tablescroll\n */\n\nimport { Plugin, type PluginDependenciesOf } from '@ckeditor/ckeditor5-core';\nimport { TableScrollEditing } from './tablescroll/tablescrollediting.js';\n\nexport class TableScroll extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'TableScroll' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires(): PluginDependenciesOf<[ TableScrollEditing ]> {\n\t\treturn [ TableScrollEditing ];\n\t}\n}\n", "import { Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { Template, View } from \"@ckeditor/ckeditor5-ui\";\nimport { env } from \"@ckeditor/ckeditor5-utils\";\nimport { isElement, throttle } 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* Returns a plain text representation of an element and its children.\n*\n* @internal\n* @returns Plain text representing the model's data.\n*/\nfunction modelElementToPlainText(item) {\n\tif (item.is(\"$text\") || item.is(\"$textProxy\")) return item.data;\n\tconst element = item;\n\tlet text = \"\";\n\tlet prev = null;\n\tfor (const child of element.getChildren()) {\n\t\tconst childText = modelElementToPlainText(child);\n\t\tif (prev && prev.is(\"element\")) text += \"\\n\";\n\t\ttext += childText;\n\t\tprev = child;\n\t}\n\treturn 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* The word count plugin.\n*\n* This plugin calculates all words and characters in all {@link module:engine/model/text~ModelText text nodes} available in the model.\n* It also provides an HTML element that updates its state whenever the editor content is changed.\n*\n* The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n* The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n* that every block in the editor is separated with a newline character, which is included in the calculation.\n*\n* Here are some examples of how the word and character calculations are made:\n*\n* ```html\n* <paragraph>foo</paragraph>\n* <paragraph>bar</paragraph>\n* // Words: 2, Characters: 7\n*\n* <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n* // Words: 1, Characters: 6\n*\n* <paragraph>*&^%)</paragraph>\n* // Words: 0, Characters: 5\n*\n* <paragraph>foo(bar)</paragraph>\n* //Words: 1, Characters: 8\n*\n* <paragraph>12345</paragraph>\n* // Words: 1, Characters: 5\n* ```\n*/\nvar WordCount = class extends Plugin {\n\t/**\n\t* The configuration of this plugin.\n\t*/\n\t_config;\n\t/**\n\t* The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t*/\n\t_outputView;\n\t/**\n\t* A regular expression used to recognize words in the editor's content.\n\t*/\n\t_wordsMatchRegExp;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.set(\"characters\", 0);\n\t\tthis.set(\"words\", 0);\n\t\tObject.defineProperties(this, {\n\t\t\tcharacters: { get() {\n\t\t\t\treturn this.characters = this._getCharacters(this._getText());\n\t\t\t} },\n\t\t\twords: { get() {\n\t\t\t\treturn this.words = this._getWords(this._getText());\n\t\t\t} }\n\t\t});\n\t\tthis.set(\"_wordsLabel\", void 0);\n\t\tthis.set(\"_charactersLabel\", void 0);\n\t\tthis._config = editor.config.get(\"wordCount\") || {};\n\t\tthis._outputView = void 0;\n\t\tthis._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ? new RegExp(\"([\\\\p{L}\\\\p{N}]+\\\\S?)+\", \"gu\") : /([a-zA-Z0-9À-ž]+\\S?)+/gu;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"WordCount\";\n\t}\n\t/**\n\t* @inheritDoc\n\t* @internal\n\t*/\n\tstatic get licenseFeatureCode() {\n\t\treturn \"WC\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isPremiumPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.editor.model.document.on(\"change:data\", throttle(this._refreshStats.bind(this), 250));\n\t\tif (typeof this._config.onUpdate == \"function\") this.on(\"update\", (evt, data) => {\n\t\t\tthis._config.onUpdate(data);\n\t\t});\n\t\tif (isElement(this._config.container)) this._config.container.appendChild(this.wordCountContainer);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._outputView) {\n\t\t\tthis._outputView.element.remove();\n\t\t\tthis._outputView.destroy();\n\t\t}\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Creates a self-updating HTML element. Repeated executions return the same element.\n\t* The returned element has the following HTML structure:\n\t*\n\t* ```html\n\t* <div class=\"ck ck-word-count\">\n\t* \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t* \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t* </div>\n\t* ```\n\t*/\n\tget wordCountContainer() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst displayWords = editor.config.get(\"wordCount.displayWords\");\n\t\tconst displayCharacters = editor.config.get(\"wordCount.displayCharacters\");\n\t\tconst bind = Template.bind(this, this);\n\t\tconst children = [];\n\t\tif (!this._outputView) {\n\t\t\tthis._outputView = new View();\n\t\t\tif (displayWords || displayWords === void 0) {\n\t\t\t\tthis.bind(\"_wordsLabel\").to(this, \"words\", (words) => {\n\t\t\t\t\treturn t(\"Words: %0\", words);\n\t\t\t\t});\n\t\t\t\tchildren.push({\n\t\t\t\t\ttag: \"div\",\n\t\t\t\t\tchildren: [{ text: [bind.to(\"_wordsLabel\")] }],\n\t\t\t\t\tattributes: { class: \"ck-word-count__words\" }\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (displayCharacters || displayCharacters === void 0) {\n\t\t\t\tthis.bind(\"_charactersLabel\").to(this, \"characters\", (words) => {\n\t\t\t\t\treturn t(\"Characters: %0\", words);\n\t\t\t\t});\n\t\t\t\tchildren.push({\n\t\t\t\t\ttag: \"div\",\n\t\t\t\t\tchildren: [{ text: [bind.to(\"_charactersLabel\")] }],\n\t\t\t\t\tattributes: { class: \"ck-word-count__characters\" }\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._outputView.setTemplate({\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-word-count\"] },\n\t\t\t\tchildren\n\t\t\t});\n\t\t\tthis._outputView.render();\n\t\t}\n\t\treturn this._outputView.element;\n\t}\n\t_getText() {\n\t\tlet txt = \"\";\n\t\tfor (const root of this.editor.model.document.getRoots()) {\n\t\t\tif (txt !== \"\") txt += \"\\n\";\n\t\t\ttxt += modelElementToPlainText(root);\n\t\t}\n\t\treturn txt;\n\t}\n\t/**\n\t* Determines the number of characters in the current editor's model.\n\t*/\n\t_getCharacters(txt) {\n\t\treturn txt.replace(/\\n/g, \"\").length;\n\t}\n\t/**\n\t* Determines the number of words in the current editor's model.\n\t*/\n\t_getWords(txt) {\n\t\treturn (txt.match(this._wordsMatchRegExp) || []).length;\n\t}\n\t/**\n\t* Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t* It also fires the {@link #event:update}.\n\t*\n\t* @fires update\n\t*/\n\t_refreshStats() {\n\t\tconst txt = this._getText();\n\t\tconst words = this.words = this._getWords(txt);\n\t\tconst characters = this.characters = this._getCharacters(txt);\n\t\tthis.fire(\"update\", {\n\t\t\twords,\n\t\t\tcharacters\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\nexport { WordCount, modelElementToPlainText as _modelElementToPlainText };\n//# sourceMappingURL=index.js.map", "/**\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/**\n * @module word-count/utils\n */\n\nimport type { ModelElement, ModelItem } from '@ckeditor/ckeditor5-engine';\n\n/**\n * Returns a plain text representation of an element and its children.\n *\n * @internal\n * @returns Plain text representing the model's data.\n */\nexport function modelElementToPlainText( item: ModelItem ): string {\n\tif ( item.is( '$text' ) || item.is( '$textProxy' ) ) {\n\t\treturn item.data;\n\t}\n\n\tconst element = item as ModelElement;\n\tlet text = '';\n\tlet prev = null;\n\n\tfor ( const child of element.getChildren() ) {\n\t\tconst childText = modelElementToPlainText( child );\n\n\t\t// If last block was finish, start from new line.\n\t\tif ( prev && prev.is( 'element' ) ) {\n\t\t\ttext += '\\n';\n\t\t}\n\n\t\ttext += childText;\n\n\t\tprev = child;\n\t}\n\n\treturn text;\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/**\n * @module word-count/wordcount\n */\n\nimport { type ModelDocumentChangeEvent } from '@ckeditor/ckeditor5-engine';\nimport { Plugin, type Editor } from '@ckeditor/ckeditor5-core';\nimport { Template, View } from '@ckeditor/ckeditor5-ui';\nimport { env } from '@ckeditor/ckeditor5-utils';\n\nimport { modelElementToPlainText } from './utils.js';\nimport type { WordCountConfig } from './wordcountconfig.js';\n\nimport { throttle, isElement } from 'es-toolkit/compat';\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~ModelText text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */\nexport class WordCount extends Plugin {\n\t/**\n\t * The number of characters in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public characters: number;\n\n\t/**\n\t * The number of words in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public words: number;\n\n\t/**\n\t * The label used to display the words value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _wordsLabel: string | undefined;\n\n\t/**\n\t * The label used to display the characters value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _charactersLabel: string | undefined;\n\n\t/**\n\t * The configuration of this plugin.\n\t */\n\tprivate _config: WordCountConfig;\n\n\t/**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */\n\tprivate _outputView: View | undefined;\n\n\t/**\n\t * A regular expression used to recognize words in the editor's content.\n\t */\n\tprivate readonly _wordsMatchRegExp: RegExp;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'characters', 0 );\n\t\tthis.set( 'words', 0 );\n\n\t\t// Don't wait for the #update event to set the value of the properties but obtain it right away.\n\t\t// This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n\t\t// If not accessed directly, the properties will be refreshed upon #update anyway.\n\t\tObject.defineProperties( this, {\n\t\t\tcharacters: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.characters = this._getCharacters( this._getText() ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\twords: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.words = this._getWords( this._getText() ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( '_wordsLabel', undefined );\n\t\tthis.set( '_charactersLabel', undefined );\n\n\t\tthis._config = editor.config.get( 'wordCount' ) || {};\n\n\t\tthis._outputView = undefined;\n\n\t\tthis._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ?\n\t\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\t\t// Groups:\n\t\t\t// {L} - Any kind of letter from any language.\n\t\t\t// {N} - Any kind of numeric character in any script.\n\t\t\tnew RegExp( '([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu' ) :\n\t\t\t/([a-zA-Z0-9À-ž]+\\S?)+/gu;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WordCount' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t * @internal\n\t */\n\tpublic static get licenseFeatureCode(): string {\n\t\treturn 'WC';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isPremiumPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.document.on<ModelDocumentChangeEvent>( 'change:data', throttle( this._refreshStats.bind( this ), 250 ) );\n\n\t\tif ( typeof this._config.onUpdate == 'function' ) {\n\t\t\tthis.on<WordCountUpdateEvent>( 'update', ( evt, data ) => {\n\t\t\t\tthis._config.onUpdate!( data );\n\t\t\t} );\n\t\t}\n\n\t\tif ( isElement( this._config.container ) ) {\n\t\t\tthis._config.container!.appendChild( this.wordCountContainer );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._outputView ) {\n\t\t\tthis._outputView.element!.remove();\n\t\t\tthis._outputView.destroy();\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */\n\tpublic get wordCountContainer(): HTMLElement {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst displayWords = editor.config.get( 'wordCount.displayWords' );\n\t\tconst displayCharacters = editor.config.get( 'wordCount.displayCharacters' );\n\t\tconst bind = Template.bind( this, this );\n\t\tconst children = [];\n\n\t\tif ( !this._outputView ) {\n\t\t\tthis._outputView = new View();\n\n\t\t\tif ( displayWords || displayWords === undefined ) {\n\t\t\t\tthis.bind( '_wordsLabel' ).to( this, 'words', words => {\n\t\t\t\t\treturn t( 'Words: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_wordsLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__words'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( displayCharacters || displayCharacters === undefined ) {\n\t\t\t\tthis.bind( '_charactersLabel' ).to( this, 'characters', words => {\n\t\t\t\t\treturn t( 'Characters: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_charactersLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__characters'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._outputView.setTemplate( {\n\t\t\t\ttag: 'div',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-word-count'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t} );\n\n\t\t\tthis._outputView.render();\n\t\t}\n\n\t\treturn this._outputView.element!;\n\t}\n\n\tprivate _getText(): string {\n\t\tlet txt = '';\n\n\t\tfor ( const root of this.editor.model.document.getRoots() ) {\n\t\t\tif ( txt !== '' ) {\n\t\t\t\t// Add a delimiter, so words from each root are treated independently.\n\t\t\t\ttxt += '\\n';\n\t\t\t}\n\n\t\t\ttxt += modelElementToPlainText( root );\n\t\t}\n\n\t\treturn txt;\n\t}\n\n\t/**\n\t * Determines the number of characters in the current editor's model.\n\t */\n\tprivate _getCharacters( txt: string ): number {\n\t\treturn txt.replace( /\\n/g, '' ).length;\n\t}\n\n\t/**\n\t * Determines the number of words in the current editor's model.\n\t */\n\tprivate _getWords( txt: string ): number {\n\t\tconst detectedWords = txt.match( this._wordsMatchRegExp ) || [];\n\n\t\treturn detectedWords.length;\n\t}\n\n\t/**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */\n\tprivate _refreshStats(): void {\n\t\tconst txt = this._getText();\n\t\tconst words = this.words = this._getWords( txt );\n\t\tconst characters = this.characters = this._getCharacters( txt );\n\n\t\tthis.fire<WordCountUpdateEvent>( 'update', {\n\t\t\twords,\n\t\t\tcharacters\n\t\t} );\n\t}\n}\n\n/**\n * An event fired after {@link ~WordCount#words} and {@link ~WordCount#characters} are updated.\n *\n * @eventName ~WordCount#update\n */\nexport type WordCountUpdateEvent = {\n\tname: 'update';\n\targs: [ { words: number; characters: number } ];\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 */\nexport default {\"de\":{\"dictionary\":{\"Words: %0\":\"W\u00F6rter: %0 \",\"Characters: %0\":\"Zeichen: %0 \",\"Widget toolbar\":\"Widget Werkzeugleiste\",\"Insert paragraph before block\":\"Absatz vor Block einf\u00FCgen\",\"Insert paragraph after block\":\"Absatz nach Block einf\u00FCgen\",\"Press Enter to type after or press Shift + Enter to type before the widget\":\"Dr\u00FCcken Sie die Eingabetaste, um nach dem Widget zu tippen oder Shift + Eingabetaste, um vor dem Widget zu tippen.\",\"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)\":\"Tastatureingaben, die verwendet werden k\u00F6nnen, wenn ein Widget ausgew\u00E4hlt wurde (zum Beispiel: Bilder, Tabellen etc.)\",\"Insert a new paragraph directly after a widget\":\"Einen neuen Abschnitt direkt nach einem Widget einf\u00FCgen\",\"Insert a new paragraph directly before a widget\":\"Einen neuen Abschnitt direkt vor einem Widget einf\u00FCgen\",\"Move the caret to allow typing directly before a widget\":\"Verschieben Sie den Textcursor, um die Eingabe direkt nach dem Widget zu erlauben\",\"Move the caret to allow typing directly after a widget\":\"Verschieben Sie den Textcursor, um die direkte Eingabe nach dem Widget zu erlauben\",\"Move focus from an editable area back to the parent widget\":\"Bewegen Sie den Fokus von einem bearbeitbaren Bereich zur\u00FCck zum \u00FCbergeordneten Widget\",\"Undo\":\"R\u00FCckg\u00E4ngig\",\"Redo\":\"Wiederherstellen\",\"Upload in progress\":\"Upload l\u00E4uft\",\"Rich Text Editor\":\"Rich Text Editor\",\"Edit block\":\"Absatz bearbeiten\",\"Click to edit block\":\"Zum Bearbeiten des Blocks klicken\",\"Drag to move\":\"Zum Verschieben ziehen\",\"Next\":\"N\u00E4chste\",\"Previous\":\"vorherige\",\"Editor toolbar\":\"Editor Werkzeugleiste\",\"Dropdown toolbar\":\"Dropdown-Liste Werkzeugleiste\",\"Dropdown menu\":\"Dropdown-Men\u00FC\",\"Black\":\"Schwarz\",\"Dim grey\":\"Dunkelgrau\",\"Grey\":\"Grau\",\"Light grey\":\"Hellgrau\",\"White\":\"Wei\u00DF\",\"Red\":\"Rot\",\"Orange\":\"Orange\",\"Yellow\":\"Gelb\",\"Light green\":\"Hellgr\u00FCn\",\"Green\":\"Gr\u00FCn\",\"Aquamarine\":\"Aquamarinblau\",\"Turquoise\":\"T\u00FCrkis\",\"Light blue\":\"Hellblau\",\"Blue\":\"Blau\",\"Purple\":\"Violett\",\"Editor block content toolbar\":\"Editor Blockinhalt-Toolbar\",\"Editor contextual toolbar\":\"Editor kontextuelle Toolbar\",\"HEX\":\"HEX\",\"No results found\":\"Keine Ergebnisse gefunden\",\"No searchable items\":\"Keine durchsuchbaren Elemente\",\"Editor dialog\":\"Editor-Dialog\",\"Close\":\"Schlie\u00DFen\",\"Help Contents. To close this dialog press ESC.\":\"Hilfe zum Inhalt. Dr\u00FCcken Sie die Esc-Taste, um dieses Dialogfenster zu schlie\u00DFen.\",\"Below, you can find a list of keyboard shortcuts that can be used in the editor.\":\"Unten finden Sie eine Liste mit Tastenkombinationen, die im Editor benutzt werden k\u00F6nnen.\",\"(may require <kbd>Fn</kbd>)\":\"(erfordert gegebenenfalls <kbd>Fn</kbd>)\",\"Accessibility\":\"Bedienungshilfen\",\"Accessibility help\":\"Hilfe zur Eingabe\",\"Press %0 for help.\":\"Dr\u00FCcken Sie %0 f\u00FCr Hilfe.\",\"Move focus in and out of an active dialog window\":\"Fokus auf ein aktives Dialogfenster richten oder aufheben\",\"MENU_BAR_MENU_FILE\":\"Datei\",\"MENU_BAR_MENU_EDIT\":\"Bearbeiten\",\"MENU_BAR_MENU_VIEW\":\"Anzeigen\",\"MENU_BAR_MENU_INSERT\":\"Einf\u00FCgen\",\"MENU_BAR_MENU_FORMAT\":\"Format\",\"MENU_BAR_MENU_TOOLS\":\"Werkzeuge\",\"MENU_BAR_MENU_HELP\":\"Hilfe\",\"MENU_BAR_MENU_TEXT\":\"Text\",\"MENU_BAR_MENU_FONT\":\"Schriftart\",\"Editor menu bar\":\"Men\u00FCleiste des Editors\",\"Please enter a valid color (e.g. \\\"ff0000\\\").\":\"Bitte geben Sie eine g\u00FCltige Farbe ein (z. B. \u201Eff0000\u201C).\",\"Insert table\":\"Tabelle einf\u00FCgen\",\"Insert table layout\":\"Tabellenlayout einf\u00FCgen\",\"Header column\":\"Kopfspalte\",\"Insert column left\":\"Spalte links einf\u00FCgen\",\"Insert column right\":\"Spalte rechts einf\u00FCgen\",\"Delete column\":\"Spalte l\u00F6schen\",\"Select column\":\"Spalte ausw\u00E4hlen\",\"Column\":\"Spalte\",\"Header row\":\"Kopfzeile\",\"Footer row\":\"Fu\u00DFzeile\",\"Insert row below\":\"Zeile unten einf\u00FCgen\",\"Insert row above\":\"Zeile oben einf\u00FCgen\",\"Delete row\":\"Zeile l\u00F6schen\",\"Select row\":\"Zeile ausw\u00E4hlen\",\"Row\":\"Zeile\",\"Merge cell up\":\"Zelle oben verbinden\",\"Merge cell right\":\"Zelle rechts verbinden\",\"Merge cell down\":\"Zelle unten verbinden\",\"Merge cell left\":\"Zelle links verbinden\",\"Split cell vertically\":\"Zelle vertikal teilen\",\"Split cell horizontally\":\"Zelle horizontal teilen\",\"Merge cells\":\"Zellen verbinden\",\"Table toolbar\":\"Tabelle Werkzeugleiste\",\"Table properties\":\"Tabelleneigenschaften\",\"Cell properties\":\"Zelleneigenschaften\",\"Cell type\":\"Zelltyp\",\"Data cell\":\"Datenzelle\",\"Header cell\":\"Kopfzelle\",\"Column header\":\"Spaltentitel\",\"Row header\":\"Zeilentitel\",\"Border\":\"Rahmen\",\"Style\":\"Rahmenart\",\"Width\":\"Breite\",\"Height\":\"H\u00F6he\",\"Color\":\"Farbe\",\"Background\":\"Hintergrund\",\"Padding\":\"Innenabstand\",\"Dimensions\":\"Gr\u00F6\u00DFe\",\"Table cell text alignment\":\"Ausrichtung des Zellentextes\",\"Table Alignment\":\"Tabellenausrichtung\",\"Horizontal text alignment toolbar\":\"Werkzeugleiste f\u00FCr die horizontale Zellentext-Ausrichtung\",\"Vertical text alignment toolbar\":\"Werkzeugleiste f\u00FCr die vertikale Zellentext-Ausrichtung\",\"Table alignment toolbar\":\"Werkzeugleiste f\u00FCr die Tabellen-Ausrichtung\",\"None\":\"Kein Rahmen\",\"Solid\":\"Durchgezogen\",\"Dotted\":\"Gepunktet\",\"Dashed\":\"Gestrichelt\",\"Double\":\"Doppelt\",\"Groove\":\"Eingeritzt\",\"Ridge\":\"Hervorgehoben\",\"Inset\":\"Eingelassen\",\"Outset\":\"Gepr\u00E4gt\",\"Align cell text to the left\":\"Zellentext linksb\u00FCndig ausrichten\",\"Align cell text to the center\":\"Zellentext zentriert ausrichten\",\"Align cell text to the right\":\"Zellentext rechtsb\u00FCndig ausrichten\",\"Justify cell text\":\"Zellentext als Blocksatz ausrichten\",\"Align cell text to the top\":\"Zellentext oben ausrichten\",\"Align cell text to the middle\":\"Zellentext mittig ausrichten\",\"Align cell text to the bottom\":\"Zellentext unten ausrichten\",\"Align table to the left with text wrapping\":\"Tabelle mit Textumbruch linksb\u00FCndig ausrichten\",\"Center table with no text wrapping\":\"Tabelle ohne Textumbruch zentrieren\",\"Align table to the right with text wrapping\":\"Tabelle mit Textumbruch rechtsb\u00FCndig ausrichten\",\"Align table to the left with no text wrapping\":\"Tabelle ohne Textumbruch linksb\u00FCndig ausrichten\",\"Align table to the right with no text wrapping\":\"Tabelle ohne Textumbruch rechtsb\u00FCndig ausrichten\",\"The color is invalid. Try \\\"#FF0000\\\" or \\\"rgb(255,0,0)\\\" or \\\"red\\\".\":\"Die Farbe ist ung\u00FCltig. Probieren Sie \u201E#FF0000\u201C oder \u201Ergb(255,0,0)\u201C oder \u201Ered\u201C.\",\"The value is invalid. Try \\\"10px\\\" or \\\"2em\\\" or simply \\\"2\\\".\":\"Der Wert ist ung\u00FCltig. Probieren Sie \u201E10px\u201C oder \u201E2em\u201C oder \u201E2\u201C.\",\"Enter table caption\":\"Tabellen\u00FCberschrift eingeben\",\"Keystrokes that can be used in a table cell\":\"Tastatureingaben, die in einer Tabelle benutz werden k\u00F6nnen.\",\"Move the selection to the next cell\":\"Auswahl in die n\u00E4chste Zelle verschieben\",\"Move the selection to the previous cell\":\"Auswahl in die vorherige Zelle verschieben\",\"Insert a new table row (when in the last cell of a table)\":\"Eine neue Tabellenspalte einf\u00FCgen (wenn in der letzten Tabellenzelle)\",\"Navigate through the table\":\"Tabellennavigation\",\"Table\":\"Tabelle\",\"Table layout\":\"Tabellenlayout\",\"Layout table\":\"Layouttabelle\",\"Content table\":\"Inhaltstabelle\",\"Choose table type\":\"Tabellentyp ausw\u00E4hlen\",\"Table type\":\"Tabellentyp\",\"Table type options\":\"Tabellentyp-Optionen\",\"Styles\":\"Stile\",\"Multiple styles\":\"Mehrere Stile\",\"Block styles\":\"Block-Stile\",\"Text styles\":\"Text-Stile\",\"Special characters\":\"Sonderzeichen\",\"Category\":\"Kategorie\",\"All\":\"Alle\",\"Arrows\":\"Pfeile\",\"Currency\":\"W\u00E4hrung\",\"Latin\":\"Lateinisch\",\"Mathematical\":\"Mathematisch\",\"Text\":\"Text\",\"leftwards simple arrow\":\"einfacher Linkspfeil\",\"rightwards simple arrow\":\"einfacher Rechtspfeil\",\"upwards simple arrow\":\"einfacher Aufw\u00E4rtspfeil\",\"downwards simple arrow\":\"einfacher Abw\u00E4rtspfeil\",\"leftwards double arrow\":\"Doppelpfeil nach links\",\"rightwards double arrow\":\"Doppelpfeil nach rechts\",\"upwards double arrow\":\"Doppelpfeil nach oben\",\"downwards double arrow\":\"Doppelpfeil nach unten\",\"leftwards dashed arrow\":\"Gestrichelter Pfeil nach links\",\"rightwards dashed arrow\":\"Gestrichelter Pfeil nach rechts\",\"upwards dashed arrow\":\"Gestrichelter Pfeil nach oben\",\"downwards dashed arrow\":\"Gestrichelter Pfeil nach unten\",\"leftwards arrow to bar\":\"Pfeil nach links zum Querstrich\",\"rightwards arrow to bar\":\"Pfeil nach rechts zum Querstrich\",\"upwards arrow to bar\":\"Pfeil nach oben zum Querstrich\",\"downwards arrow to bar\":\"Pfeil nach unten zum Querstrich\",\"up down arrow with base\":\"Unterstrichener Pfeil nach oben und unten\",\"back with leftwards arrow above\":\"\u201EBack\u201C dar\u00FCber Pfeil nach links\",\"end with leftwards arrow above\":\"\u201EEnd\u201C dar\u00FCber Pfeil nach links\",\"on with exclamation mark with left right arrow above\":\"\u201EOn\u201C mit Ausrufezeichen dar\u00FCber Pfeil nach links und rechts\",\"soon with rightwards arrow above\":\"\u201ESoon\u201C dar\u00FCber Pfeil nach rechts\",\"top with upwards arrow above\":\"\u201ETop\u201C dar\u00FCber Pfeil nach oben\",\"Dollar sign\":\"Dollar-Zeichen\",\"Euro sign\":\"Euro-Zeichen\",\"Yen sign\":\"Yen-Zeichen\",\"Pound sign\":\"Pfund-Zeichen\",\"Cent sign\":\"Cent-Zeichen\",\"Euro-currency sign\":\"Euro-W\u00E4hrungszeichen\",\"Colon sign\":\"Col\u00F3n-Zeichen\",\"Cruzeiro sign\":\"Cruzeiro-Zeichen\",\"French franc sign\":\"Franz\u00F6sischer Franc-Zeichen\",\"Lira sign\":\"Lira-Zeichen\",\"Currency sign\":\"W\u00E4hrungssymbol\",\"Bitcoin sign\":\"Bitcoin-Zeichen\",\"Mill sign\":\"Mill-Zeichen\",\"Naira sign\":\"Naira-Zeichen\",\"Peseta sign\":\"Peseta-Zeichen\",\"Rupee sign\":\"Rupie-Zeichen\",\"Won sign\":\"Won-Zeichen\",\"New sheqel sign\":\"Schekel-Zeichen\",\"Dong sign\":\"\u0110\u1ED3ng-Zeichen\",\"Kip sign\":\"Kip-Zeichen\",\"Tugrik sign\":\"Tugrik-Zeichen\",\"Drachma sign\":\"Drachme-Zeichen\",\"German penny sign\":\"Pfennig-Zeichen\",\"Peso sign\":\"Philippinischer Peso-Zeichen\",\"Guarani sign\":\"Guaran\u00ED-Zeichen\",\"Austral sign\":\"Austral-Zeichen\",\"Hryvnia sign\":\"Hrywnja-Zeichen\",\"Cedi sign\":\"Cedi-Zeichen\",\"Livre tournois sign\":\"Livre tournois-Zeichen\",\"Spesmilo sign\":\"Spesmilo-Zeichen\",\"Tenge sign\":\"Tenge-Zeichen\",\"Indian rupee sign\":\"Indische Rupie-Zeichen\",\"Turkish lira sign\":\"T\u00FCrkische Lira-Zeichen\",\"Nordic mark sign\":\"Nordische Mark-Zeichen\",\"Manat sign\":\"Manat-Zeichen\",\"Ruble sign\":\"Rubel-Zeichen\",\"Latin capital letter a with macron\":\"Lateinischer Gro\u00DFbuchstabe a mit Makron\",\"Latin small letter a with macron\":\"Lateinischer Kleinbuchstabe a mit Makron\",\"Latin capital letter a with breve\":\"Lateinischer Gro\u00DFbuchstabe a mit Breve\",\"Latin small letter a with breve\":\"Lateinischer Kleinbuchstabe a mit Breve\",\"Latin capital letter a with ogonek\":\"Lateinischer Gro\u00DFbuchstabe a mit Ogonek\",\"Latin small letter a with ogonek\":\"Lateinischer Kleinbuchstabe a mit Ogonek\",\"Latin capital letter c with acute\":\"Lateinischer Gro\u00DFbuchstabe c mit Akut\",\"Latin small letter c with acute\":\"Lateinischer Kleinbuchstabe c mit Akut\",\"Latin capital letter c with circumflex\":\"Lateinischer Gro\u00DFbuchstabe c mit Zirkumflex\",\"Latin small letter c with circumflex\":\"Lateinischer Kleinbuchstabe c mit Zirkumflex\",\"Latin capital letter c with dot above\":\"Lateinischer Gro\u00DFbuchstabe c mit Punkt dar\u00FCber\",\"Latin small letter c with dot above\":\"Lateinischer Kleinbuchstabe c mit Punkt dar\u00FCber\",\"Latin capital letter c with caron\":\"Lateinischer Gro\u00DFbuchstabe c mit Hatschek\",\"Latin small letter c with caron\":\"Lateinischer Kleinbuchstabe c mit Hatschek\",\"Latin capital letter d with caron\":\"Lateinischer Gro\u00DFbuchstabe d mit Hatschek\",\"Latin small letter d with caron\":\"Lateinischer Kleinbuchstabe d mit Hatschek\",\"Latin capital letter d with stroke\":\"Lateinischer Gro\u00DFbuchstabe d mit Querstrich\",\"Latin small letter d with stroke\":\"Lateinischer Kleinbuchstabe d mit Querstrich\",\"Latin capital letter e with macron\":\"Lateinischer Gro\u00DFbuchstabe e mit Makron\",\"Latin small letter e with macron\":\"Lateinischer Kleinbuchstabe e mit Makron\",\"Latin capital letter e with breve\":\"Lateinischer Gro\u00DFbuchstabe e mit Breve\",\"Latin small letter e with breve\":\"Lateinischer Kleinbuchstabe e mit Breve\",\"Latin capital letter e with dot above\":\"Lateinischer Gro\u00DFbuchstabe e mit Punkt dar\u00FCber\",\"Latin small letter e with dot above\":\"Lateinischer Kleinbuchstabe e mit Punkt dar\u00FCber\",\"Latin capital letter e with ogonek\":\"Lateinischer Gro\u00DFbuchstabe e mit Ogonek\",\"Latin small letter e with ogonek\":\"Lateinischer Kleinbuchstabe e mit Ogonek\",\"Latin capital letter e with caron\":\"Lateinischer Gro\u00DFbuchstabe e mit Hatschek\",\"Latin small letter e with caron\":\"Lateinischer Kleinbuchstabe e mit Hatschek\",\"Latin capital letter g with circumflex\":\"Lateinischer Gro\u00DFbuchstabe g mit Zirkumflex\",\"Latin small letter g with circumflex\":\"Lateinischer Kleinbuchstabe g mit Zirkumflex\",\"Latin capital letter g with breve\":\"Lateinischer Gro\u00DFbuchstabe g mit Breve\",\"Latin small letter g with breve\":\"Lateinischer Kleinbuchstabe g mit Breve\",\"Latin capital letter g with dot above\":\"Lateinischer Gro\u00DFbuchstabe g mit Punkt dar\u00FCber\",\"Latin small letter g with dot above\":\"Lateinischer Kleinbuchstabe g mit Punkt dar\u00FCber\",\"Latin capital letter g with cedilla\":\"Lateinischer Gro\u00DFbuchstabe g mit Cedille\",\"Latin small letter g with cedilla\":\"Lateinischer Kleinbuchstabe g mit Cedille\",\"Latin capital letter h with circumflex\":\"Lateinischer Gro\u00DFbuchstabe h mit Zirkumflex\",\"Latin small letter h with circumflex\":\"Lateinischer Kleinbuchstabe h mit Zirkumflex\",\"Latin capital letter h with stroke\":\"Lateinischer Gro\u00DFbuchstabe h mit Querstrich\",\"Latin small letter h with stroke\":\"Lateinischer Kleinbuchstabe h mit Querstrich\",\"Latin capital letter i with tilde\":\"Lateinischer Gro\u00DFbuchstabe i mit Tilde\",\"Latin small letter i with tilde\":\"Lateinischer Kleinbuchstabe i mit Tilde\",\"Latin capital letter i with macron\":\"Lateinischer Gro\u00DFbuchstabe i mit Makron\",\"Latin small letter i with macron\":\"Lateinischer Kleinbuchstabe i mit Makron\",\"Latin capital letter i with breve\":\"Lateinischer Gro\u00DFbuchstabe i mit Breve\",\"Latin small letter i with breve\":\"Lateinischer Kleinbuchstabe i mit Breve\",\"Latin capital letter i with ogonek\":\"Lateinischer Gro\u00DFbuchstabe i mit Ogonek\",\"Latin small letter i with ogonek\":\"Lateinischer Kleinbuchstabe i mit Ogonek\",\"Latin capital letter i with dot above\":\"Lateinischer Gro\u00DFbuchstabe i mit Punkt dar\u00FCber\",\"Latin small letter dotless i\":\"Lateinischer Kleinbuchstabe i ohne Punkt\",\"Latin capital ligature ij\":\"Gro\u00DFe lateinische Ligatur ij\",\"Latin small ligature ij\":\"Kleine lateinische Ligatur ij\",\"Latin capital letter j with circumflex\":\"Lateinischer Gro\u00DFbuchstabe j mit Zirkumflex\",\"Latin small letter j with circumflex\":\"Lateinischer Kleinbuchstabe j mit Zirkumflex\",\"Latin capital letter k with cedilla\":\"Lateinischer Gro\u00DFbuchstabe k mit Cedille\",\"Latin small letter k with cedilla\":\"Lateinischer Kleinbuchstabe k mit Cedille\",\"Latin small letter kra\":\"Lateinischer Kleinbuchstabe Kra\",\"Latin capital letter l with acute\":\"Lateinischer Gro\u00DFbuchstabe l mit Akut\",\"Latin small letter l with acute\":\"Lateinischer Kleinbuchstabe l mit Akut\",\"Latin capital letter l with cedilla\":\"Lateinischer Gro\u00DFbuchstabe l mit Cedille\",\"Latin small letter l with cedilla\":\"Lateinischer Kleinbuchstabe l mit Cedille\",\"Latin capital letter l with caron\":\"Lateinischer Gro\u00DFbuchstabe l mit Hatschek\",\"Latin small letter l with caron\":\"Lateinischer Kleinbuchstabe l mit Hatschek\",\"Latin capital letter l with middle dot\":\"Lateinischer Gro\u00DFbuchstabe l mit Mittelpunkt\",\"Latin small letter l with middle dot\":\"Lateinischer Kleinbuchstabe l mit Mittelpunkt\",\"Latin capital letter l with stroke\":\"Lateinischer Gro\u00DFbuchstabe l mit Querstrich\",\"Latin small letter l with stroke\":\"Lateinischer Kleinbuchstabe l mit Querstrich\",\"Latin capital letter n with acute\":\"Lateinischer Gro\u00DFbuchstabe n mit Akut\",\"Latin small letter n with acute\":\"Lateinischer Kleinbuchstabe n mit Akut\",\"Latin capital letter n with cedilla\":\"Lateinischer Gro\u00DFbuchstabe n mit Cedille\",\"Latin small letter n with cedilla\":\"Lateinischer Kleinbuchstabe n mit Cedille\",\"Latin capital letter n with caron\":\"Lateinischer Gro\u00DFbuchstabe n mit Hatschek\",\"Latin small letter n with caron\":\"Lateinischer Kleinbuchstabe n mit Hatschek\",\"Latin small letter n preceded by apostrophe\":\"Lateinischer Kleinbuchstabe n mit vorangestelltem Apostroph\",\"Latin capital letter eng\":\"Lateinischer Gro\u00DFbuchstabe Eng\",\"Latin small letter eng\":\"Lateinischer Kleinbuchstabe Eng\",\"Latin capital letter o with macron\":\"Lateinischer Gro\u00DFbuchstabe o mit Makron\",\"Latin small letter o with macron\":\"Lateinischer Kleinbuchstabe o mit Makron\",\"Latin capital letter o with breve\":\"Lateinischer Gro\u00DFbuchstabe o mit Breve\",\"Latin small letter o with breve\":\"Lateinischer Kleinbuchstabe o mit Breve\",\"Latin capital letter o with double acute\":\"Lateinischer Gro\u00DFbuchstabe o mit doppeltem Akut\",\"Latin small letter o with double acute\":\"Lateinischer Kleinbuchstabe o mit doppeltem Akut\",\"Latin capital ligature oe\":\"Gro\u00DFe lateinische Ligatur oe\",\"Latin small ligature oe\":\"Kleine lateinische Ligatur oe\",\"Latin capital letter r with acute\":\"Lateinischer Gro\u00DFbuchstabe r mit Akut\",\"Latin small letter r with acute\":\"Lateinischer Kleinbuchstabe r mit Akut\",\"Latin capital letter r with cedilla\":\"Lateinischer Gro\u00DFbuchstabe r mit Cedille\",\"Latin small letter r with cedilla\":\"Lateinischer Kleinbuchstabe r mit Cedille\",\"Latin capital letter r with caron\":\"Lateinischer Gro\u00DFbuchstabe r mit Hatschek\",\"Latin small letter r with caron\":\"Lateinischer Kleinbuchstabe r mit Hatschek\",\"Latin capital letter s with acute\":\"Lateinischer Gro\u00DFbuchstabe s mit Akut\",\"Latin small letter s with acute\":\"Lateinischer Kleinbuchstabe s mit Akut\",\"Latin capital letter s with circumflex\":\"Lateinischer Gro\u00DFbuchstabe s mit Zirkumflex\",\"Latin small letter s with circumflex\":\"Lateinischer Kleinbuchstabe s mit Zirkumflex\",\"Latin capital letter s with cedilla\":\"Lateinischer Gro\u00DFbuchstabe s mit Cedille\",\"Latin small letter s with cedilla\":\"Lateinischer Kleinbuchstabe s mit Cedille\",\"Latin capital letter s with caron\":\"Lateinischer Gro\u00DFbuchstabe s mit Hatschek\",\"Latin small letter s with caron\":\"Lateinischer Kleinbuchstabe s mit Hatschek\",\"Latin capital letter t with cedilla\":\"Lateinischer Gro\u00DFbuchstabe t mit Cedille\",\"Latin small letter t with cedilla\":\"Lateinischer Kleinbuchstabe t mit Cedille\",\"Latin capital letter t with caron\":\"Lateinischer Gro\u00DFbuchstabe t mit Hatschek\",\"Latin small letter t with caron\":\"Lateinischer Kleinbuchstabe t mit Hatschek\",\"Latin capital letter t with stroke\":\"Lateinischer Gro\u00DFbuchstabe t mit Querstrich\",\"Latin small letter t with stroke\":\"Lateinischer Kleinbuchstabe t mit Querstrich\",\"Latin capital letter u with tilde\":\"Lateinischer Gro\u00DFbuchstabe u mit Tilde\",\"Latin small letter u with tilde\":\"Lateinischer Kleinbuchstabe u mit Tilde\",\"Latin capital letter u with macron\":\"Lateinischer Gro\u00DFbuchstabe u mit Makron\",\"Latin small letter u with macron\":\"Lateinischer Kleinbuchstabe u mit Makron\",\"Latin capital letter u with breve\":\"Lateinischer Gro\u00DFbuchstabe u mit Breve\",\"Latin small letter u with breve\":\"Lateinischer Kleinbuchstabe u mit Breve\",\"Latin capital letter u with ring above\":\"Lateinischer Gro\u00DFbuchstabe u mit Krou\u017Eek dar\u00FCber\",\"Latin small letter u with ring above\":\"Lateinischer Kleinbuchstabe u mit Krou\u017Eek dar\u00FCber\",\"Latin capital letter u with double acute\":\"Lateinischer Gro\u00DFbuchstabe u mit doppeltem Akut\",\"Latin small letter u with double acute\":\"Lateinischer Kleinbuchstabe u mit doppeltem Akut\",\"Latin capital letter u with ogonek\":\"Lateinischer Gro\u00DFbuchstabe u mit Ogonek\",\"Latin small letter u with ogonek\":\"Lateinischer Kleinbuchstabe u mit Ogonek\",\"Latin capital letter w with circumflex\":\"Lateinischer Gro\u00DFbuchstabe w mit Zirkumflex\",\"Latin small letter w with circumflex\":\"Lateinischer Kleinbuchstabe w mit Zirkumflex\",\"Latin capital letter y with circumflex\":\"Lateinischer Gro\u00DFbuchstabe y mit Zirkumflex\",\"Latin small letter y with circumflex\":\"Lateinischer Kleinbuchstabe y mit Zirkumflex\",\"Latin capital letter y with diaeresis\":\"Lateinischer Gro\u00DFbuchstabe y mit Trema\",\"Latin capital letter z with acute\":\"Lateinischer Gro\u00DFbuchstabe z mit Akut\",\"Latin small letter z with acute\":\"Lateinischer Kleinbuchstabe z mit Akut\",\"Latin capital letter z with dot above\":\"Lateinischer Gro\u00DFbuchstabe z mit Punkt dar\u00FCber\",\"Latin small letter z with dot above\":\"Lateinischer Kleinbuchstabe z mit Punkt dar\u00FCber\",\"Latin capital letter z with caron\":\"Lateinischer Gro\u00DFbuchstabe z mit Hatschek\",\"Latin small letter z with caron\":\"Lateinischer Kleinbuchstabe z mit Hatschek\",\"Latin small letter long s\":\"Lateinischer Kleinbuchstabe langes s\",\"Less-than sign\":\"Kleiner-als-Zeichen\",\"Greater-than sign\":\"Gr\u00F6\u00DFer-als-Zeichen\",\"Less-than or equal to\":\"Kleiner als oder gleich\",\"Greater-than or equal to\":\"Gr\u00F6\u00DFer als oder gleich\",\"En dash\":\"Halbgeviertstrich\",\"Em dash\":\"Geviertstrich\",\"Macron\":\"Makron\",\"Overline\":\"\u00DCberstrich\",\"Degree sign\":\"Grad-Zeichen\",\"Minus sign\":\"Minus-Zeichen\",\"Plus-minus sign\":\"Plus-Minus-Zeichen\",\"Division sign\":\"Geteilt-Zeichen\",\"Fraction slash\":\"Schr\u00E4gstrich\",\"Multiplication sign\":\"Mal-Zeichen\",\"Latin small letter f with hook\":\"Lateinischer Kleinbuchstabe f mit Haken\",\"Integral\":\"Integral-Zeichen\",\"N-ary summation\":\"Summen-Zeichen\",\"Infinity\":\"Unendlich-Zeichen\",\"Square root\":\"Wurzel-Zeichen\",\"Tilde operator\":\"Tilde-Operator\",\"Approximately equal to\":\"Ungef\u00E4hr gleich\",\"Almost equal to\":\"Gerundet\",\"Not equal to\":\"Ungleich\",\"Identical to\":\"Identisch mit\",\"Element of\":\"Element von\",\"Not an element of\":\"Kein Element von\",\"Contains as member\":\"Enth\u00E4lt als Element\",\"N-ary product\":\"Produkt-Zeichen\",\"Logical and\":\"Logisches und\",\"Logical or\":\"Logisches oder\",\"Not sign\":\"Negations-Zeichen\",\"Intersection\":\"Schnitt\",\"Union\":\"Vereinigung\",\"Partial differential\":\"Partielle Ableitung\",\"For all\":\"Allquantor\",\"There exists\":\"Existenzquantor\",\"Empty set\":\"Leere Menge\",\"Nabla\":\"Nabla\",\"Asterisk operator\":\"Hodge-Stern-Operator\",\"Proportional to\":\"Proportional zu\",\"Angle\":\"Winkel-Zeichen\",\"Vulgar fraction one quarter\":\"Gemeiner Bruch ein Viertel\",\"Vulgar fraction one half\":\"Gemeiner Bruch ein Halb\",\"Vulgar fraction three quarters\":\"Gemeiner Bruch drei Viertel\",\"Single left-pointing angle quotation mark\":\"Einfache Guillemets nach links\",\"Single right-pointing angle quotation mark\":\"Einfache Guillemets nach rechts\",\"Left-pointing double angle quotation mark\":\"Doppelte Guillemets nach links\",\"Right-pointing double angle quotation mark\":\"Doppelte Guillemets nach rechts\",\"Left single quotation mark\":\"Einfache Anf\u00FChrungszeichen links\",\"Right single quotation mark\":\"Einfache Anf\u00FChrungszeichen rechts\",\"Left double quotation mark\":\"Doppelte Anf\u00FChrungszeichen links\",\"Right double quotation mark\":\"Doppelte Anf\u00FChrungszeichen rechts\",\"Single low-9 quotation mark\":\"Einfache Anf\u00FChrungszeichen links unten\",\"Double low-9 quotation mark\":\"Doppelte Anf\u00FChrungszeichen links unten\",\"Inverted exclamation mark\":\"Umgekehrtes Ausrufezeichen\",\"Inverted question mark\":\"Umgekehrtes Fragezeichen\",\"Two dot leader\":\"Doppel-Punktlinie\",\"Horizontal ellipsis\":\"Auslassungspunkte\",\"Double dagger\":\"Zweibalkenkreuz\",\"Per mille sign\":\"Promille-Zeichen\",\"Per ten thousand sign\":\"Pro-Zehntausend-Zeichen\",\"Double exclamation mark\":\"Doppeltes Ausrufezeichen\",\"Question exclamation mark\":\"Frage-Ruf-Zeichen\",\"Exclamation question mark\":\"Ruf-Frage-Zeichen\",\"Double question mark\":\"Doppeltes Fragezeichen\",\"Copyright sign\":\"Copyright-Zeichen\",\"Registered sign\":\"Registered-Trade-Mark-Zeichen\",\"Trade mark sign\":\"Unregistered-Trade-Mark-Zeichen\",\"Section sign\":\"Paragraphen-Zeichen\",\"Paragraph sign\":\"Absatz-Zeichen\",\"Reversed paragraph sign\":\"Umgedrehtes Absatz-Zeichen\",\"Show source\":\"Quelle anzeigen\",\"Show blocks\":\"Bl\u00F6cke anzeigen\",\"Select all\":\"Alles ausw\u00E4hlen\",\"Disable editing\":\"Bearbeitung deaktivieren\",\"Enable editing\":\"Bearbeitung zulassen\",\"Disable inline editing\":\"Inline-Bearbeitung deaktivieren\",\"Enable inline editing\":\"Inline-Bearbeitung aktivieren\",\"Disable block editing\":\"Blockbearbeitung deaktivieren\",\"Enable block editing\":\"Blockbearbeitung aktivieren\",\"Previous editable region\":\"Vorheriger bearbeitbarer Bereich\",\"Next editable region\":\"N\u00E4chster bearbeitbarer Bereich\",\"Navigate editable regions\":\"Durch bearbeitbare Bereiche navigieren\",\"Remove Format\":\"Formatierung entfernen\",\"Page break\":\"Seitenumbruch\",\"media widget\":\"Medien-Widget\",\"Media URL\":\"Medien-URL\",\"Paste the media URL in the input.\":\"Medien-URL in das Eingabefeld einf\u00FCgen.\",\"Tip: Paste the URL into the content to embed faster.\":\"Tipp: Zum schnelleren Einbetten k\u00F6nnen Sie die Medien-URL in den Inhalt einf\u00FCgen.\",\"The URL must not be empty.\":\"Die URL darf nicht leer sein.\",\"This media URL is not supported.\":\"Diese Medien-URL wird nicht unterst\u00FCtzt.\",\"Insert media\":\"Medium einf\u00FCgen\",\"Media embed\":\"Medieneinbettung\",\"Media\":\"Medien\",\"Media toolbar\":\"Medien Werkzeugleiste\",\"Open media in new tab\":\"Medien in neuem Tab \u00F6ffnen\",\"Left aligned media\":\"Links ausgerichtete Medien\",\"Centered media\":\"Zentrierte Medien\",\"Right aligned media\":\"Rechts ausgerichtete Medien\",\"Resize media\":\"Mediengr\u00F6\u00DFe \u00E4ndern\",\"Resize media to %0\":\"Mediengr\u00F6\u00DFe auf %0 \u00E4ndern\",\"Resize media to the original size\":\"Mediengr\u00F6\u00DFe auf Originalgr\u00F6\u00DFe zur\u00FCcksetzen\",\"Resize media (in %0)\":\"Mediengr\u00F6\u00DFe \u00E4ndern (auf %0)\",\"Custom media size\":\"Benutzerdefinierte Mediengr\u00F6\u00DFe\",\"Media resize list\":\"Liste zur \u00C4nderung der Mediengr\u00F6\u00DFe\",\"Media Resize\":\"Mediengr\u00F6\u00DFe \u00E4ndern\",\"Numbered List\":\"Nummerierte Liste\",\"Bulleted List\":\"Aufz\u00E4hlungsliste\",\"To-do List\":\"Aufgabenliste\",\"Bulleted list styles toolbar\":\"Darstellung der ungeordneten Liste\",\"Numbered list styles toolbar\":\"Darstellung der geordneten Liste\",\"Toggle the disc list style\":\"Gef\u00FCllten Kreis einstellen\",\"Toggle the circle list style\":\"Leeren Kreis einstellen\",\"Toggle the square list style\":\"Quadrat einstellen\",\"Toggle the decimal list style\":\"Dezimalzahlen einstellen\",\"Toggle the decimal with leading zero list style\":\"Dezimalzahlen mit vorangestellten Nullen einstellen\",\"Toggle the lower\u2013roman list style\":\"Kleingeschriebene r\u00F6mische Zahlen einstellen\",\"Toggle the upper\u2013roman list style\":\"Gro\u00DFgeschriebene r\u00F6mische Zahlen einstellen\",\"Toggle the lower\u2013latin list style\":\"Kleingeschriebene lateinische Buchstaben einstellen\",\"Toggle the upper\u2013latin list style\":\"Gro\u00DFgeschriebene lateinische Buchstaben einstellen\",\"Toggle the arabic-indic list style\":\"Ostarabisch-indische Listenform umschalten\",\"Arabic-indic\":\"Ostarabisch-indisch\",\"Disc\":\"Gef\u00FCllter Kreis\",\"Circle\":\"Leerer Kreis\",\"Square\":\"Quadrat\",\"Decimal\":\"Dezimalzahlen\",\"Decimal with leading zero\":\"Dezimalzahlen mit vorangestellten Nullen\",\"Lower\u2013roman\":\"Kleingeschriebene r\u00F6mische Zahlen\",\"Upper-roman\":\"Gro\u00DFgeschriebene r\u00F6mische Zahlen\",\"Lower-latin\":\"Kleingeschriebene lateinische Buchstaben\",\"Upper-latin\":\"Gro\u00DFgeschriebene lateinische Buchstaben\",\"List properties\":\"Listeneigenschaften\",\"Start at\":\"Beginnen mit\",\"Invalid start index value.\":\"Ung\u00FCltiger Anfangsindexwert.\",\"Start index must be greater than 0.\":\"Der Startwert muss gr\u00F6\u00DFer als 0 sein.\",\"Reversed order\":\"Umgekehrte Reihenfolge\",\"Keystrokes that can be used in a list\":\"Tastatureingaben, die in einer Liste verwendet werden k\u00F6nnen.\",\"Increase list item indent\":\"Listeneinzug vergr\u00F6\u00DFern\",\"Decrease list item indent\":\"Listeneinzug verkleinern\",\"Entering a to-do list\":\"Eingabe einer Aufgabenliste\",\"Leaving a to-do list\":\"Verlassen einer Aufgabenliste\",\"Unlink\":\"Link entfernen\",\"Link\":\"Link\",\"Link URL\":\"Linkadresse\",\"Link URL must not be empty.\":\"Die Link-URL darf nicht leer sein.\",\"Link image\":\"Bild verlinken\",\"Link properties\":\"Linkeigenschaften\",\"Edit link\":\"Link bearbeiten\",\"Open link in new tab\":\"Link im neuen Tab \u00F6ffnen\",\"Open in a new tab\":\"In neuem Tab \u00F6ffnen\",\"Downloadable\":\"Herunterladbar\",\"Create link\":\"Link erstellen\",\"Move out of a link\":\"Linkauswahl aufheben\",\"Displayed text\":\"Angezeigter Text\",\"No links available\":\"Keine Links verf\u00FCgbar\",\"This link has no URL\":\"Diesem Link fehlt die URL\",\"Language\":\"Sprache\",\"Choose language\":\"Sprache ausw\u00E4hlen\",\"Remove language\":\"Sprache entfernen\",\"Increase indent\":\"Einzug vergr\u00F6\u00DFern\",\"Decrease indent\":\"Einzug verkleinern\",\"image widget\":\"Bild-Steuerelement\",\"In line\":\"Text in Zeile\",\"Side image\":\"Seitenbild\",\"Full size image\":\"Bild in voller Gr\u00F6\u00DFe\",\"Left aligned image\":\"Linksb\u00FCndiges Bild\",\"Centered image\":\"Zentriertes Bild\",\"Right aligned image\":\"Rechtsb\u00FCndiges Bild\",\"Change image text alternative\":\"Alternativtext \u00E4ndern\",\"Text alternative\":\"Alternativtext\",\"Enter image caption\":\"Bildunterschrift eingeben\",\"Insert image\":\"Bild einf\u00FCgen\",\"Replace image\":\"Bild ersetzen\",\"Upload from computer\":\"Vom Computer hochladen\",\"Replace from computer\":\"Vom Computer ersetzen\",\"Upload image from computer\":\"Bild vom Computer hochladen\",\"Image from computer\":\"Bild vom Computer\",\"From computer\":\"Vom Computer\",\"Replace image from computer\":\"Bild vom Computer ersetzen\",\"Upload failed\":\"Hochladen fehlgeschlagen\",\"You have no image upload permissions.\":\"Sie haben keine Berechtigung zum Hochladen von Bildern.\",\"Image toolbar\":\"Bild Werkzeugleiste\",\"Resize image\":\"Bildgr\u00F6\u00DFe \u00E4ndern\",\"Resize image to %0\":\"Bildgr\u00F6\u00DFe \u00E4ndern in %0\",\"Resize image to the original size\":\"Bild in Originalgr\u00F6\u00DFe \u00E4ndern\",\"Resize image (in %0)\":\"Bildgr\u00F6\u00DFe \u00E4ndern (in %0)\",\"Custom image size\":\"Benutzerdefinierte Bildgr\u00F6\u00DFe\",\"Image resize list\":\"Bildgr\u00F6\u00DFen-Liste\",\"Insert image via URL\":\"Bild von URL einf\u00FCgen\",\"Insert via URL\":\"Per URL einf\u00FCgen\",\"Image via URL\":\"Bild per URL\",\"Via URL\":\"Per URL\",\"Update image URL\":\"Bild-URL aktualisieren\",\"Caption for the image\":\"Bildunterschrift\",\"Caption for image: %0\":\"Bildunterschrift: %0\",\"Uploading image\":\"Bild hochladen\",\"Image upload complete\":\"Bild erfolgreich hochgeladen\",\"Error during image upload\":\"Fehler beim Hochladen des Bildes\",\"Image\":\"Bild\",\"Image Resize\":\"Bildgr\u00F6\u00DFen\u00E4nderung\",\"Text Alternative\":\"Textalternative\",\"HTML object\":\"HTML-Objekt\",\"Insert HTML\":\"HTML einf\u00FCgen\",\"HTML snippet\":\"HTML-Snippet\",\"Paste raw HTML here...\":\"Rohes HTML hier einf\u00FCgen \u2026\",\"Edit source\":\"Quelle bearbeiten\",\"Save changes\":\"\u00C4nderungen speichern\",\"No preview available\":\"Keine Vorschau verf\u00FCgbar\",\"Empty snippet content\":\"Leerer Snippet-Inhalt\",\"Horizontal line\":\"Horizontale Linie\",\"Yellow marker\":\"Gelber Marker\",\"Green marker\":\"Gr\u00FCner Marker\",\"Pink marker\":\"Pinker Marker\",\"Blue marker\":\"Blauer Marker\",\"Red pen\":\"Rote Schriftfarbe\",\"Green pen\":\"Gr\u00FCne Schriftfarbe\",\"Remove highlight\":\"Texthervorhebung entfernen\",\"Highlight\":\"Texthervorhebung\",\"Text highlight toolbar\":\"Text hervorheben Werkzeugleiste\",\"Heading\":\"\u00DCberschrift\",\"Choose heading\":\"\u00DCberschrift ausw\u00E4hlen\",\"Heading 1\":\"\u00DCberschrift 1\",\"Heading 2\":\"\u00DCberschrift 2\",\"Heading 3\":\"\u00DCberschrift 3\",\"Heading 4\":\"\u00DCberschrift 4\",\"Heading 5\":\"\u00DCberschrift 5\",\"Heading 6\":\"\u00DCberschrift 6\",\"Type your title\":\"Titel eingeben\",\"Type or paste your content here.\":\"Hier Inhalt einf\u00FCgen.\",\"Enter fullscreen mode\":\"Vollbildmodus aktivieren\",\"Leave fullscreen mode\":\"Vollbildmodus deaktivieren\",\"Fullscreen mode\":\"Vollbildmodus\",\"Toggle fullscreen mode\":\"Vollbildmodus umschalten\",\"Document outline\":\"Dokumentgliederung\",\"Connected users\":\"Verbundene Nutzer\",\"Show left sidebar\":\"Linke Seitenleiste anzeigen\",\"Hide left sidebar\":\"Linke Seitenleiste ausblenden\",\"Toggle sidebar\":\"Seitenleiste umschalten\",\"Font Size\":\"Schriftgr\u00F6\u00DFe\",\"Tiny\":\"Sehr klein\",\"Small\":\"Klein\",\"Big\":\"Gro\u00DF\",\"Huge\":\"Sehr gro\u00DF\",\"Font Family\":\"Schriftart\",\"Default\":\"Standard\",\"Font Color\":\"Schriftfarbe\",\"Font Background Color\":\"Hintergrundfarbe\",\"Document colors\":\"Dokumentfarben\",\"Find and replace\":\"Suchen und ersetzen\",\"Find in text\u2026\":\"In Text suchen\u2026\",\"Find\":\"Suchen\",\"Previous result\":\"Vorheriges Ergebnis\",\"Next result\":\"N\u00E4chstes Ergebnis\",\"Replace\":\"Ersetzen\",\"Replace all\":\"Alle ersetzen\",\"Match case\":\"Gro\u00DF-/Kleinschreibung beachten\",\"Whole words only\":\"Nur ganze W\u00F6rter\",\"Replace with\u2026\":\"Ersetzen durch\u2026\",\"Text to find must not be empty.\":\"Der Suchtext darf nicht leer sein.\",\"Tip: Find some text first in order to replace it.\":\"Tipp: Zuerst nach Text suchen um diesen zu ersetzen.\",\"Advanced options\":\"Erweiterte Optionen\",\"Find in the document\":\"Dokument durchsuchen\",\"Insert a soft break (a <code>&lt;br&gt;</code> element)\":\"Einen weichen Zeilenumbruch einf\u00FCgen (ein <code>&lt;br&gt;</code>-Element)\",\"Insert a hard break (a new paragraph)\":\"Zeilenumbruch einf\u00FCgen (einen neuen Abschnitt)\",\"Emoji\":\"Emojis\",\"Show all emoji...\":\"Alle Emojis anzeigen ...\",\"Find an emoji (min. 2 characters)\":\"Emoji finden (min. 2 Zeichen)\",\"No emojis were found matching \\\"%0\\\".\":\"Es wurden keine Emojis gefunden, die zu \u201E%0\u201C passen.\",\"Keep on typing to see the emoji.\":\"Weiteren Text eingeben, damit Emojis angezeigt werden.\",\"The query must contain at least two characters.\":\"Die Anfrage muss aus mindestens zwei Zeichen bestehen.\",\"Smileys & Expressions\":\"Smileys und Emotionen\",\"Gestures & People\":\"Gesten und Personen\",\"Animals & Nature\":\"Tiere und Natur\",\"Food & Drinks\":\"Speisen und Getr\u00E4nke\",\"Travel & Places\":\"Reisen und Orte\",\"Activities\":\"Aktivit\u00E4ten\",\"Objects\":\"Objekte\",\"Symbols\":\"Symbole\",\"Flags\":\"Flaggen\",\"Select skin tone\":\"Hautfarbe w\u00E4hlen\",\"Default skin tone\":\"Standardhautfarbe\",\"Light skin tone\":\"Helle Hautfarbe\",\"Medium Light skin tone\":\"Mittelhelle Hautfarbe\",\"Medium skin tone\":\"Mittlere Hautfarbe\",\"Medium Dark skin tone\":\"Mitteldunkle Hautfarbe\",\"Dark skin tone\":\"Dunkle Hautfarbe\",\"Emoji picker\":\"Emoji-Auswahl\",\"Cancel\":\"Abbrechen\",\"Clear\":\"L\u00F6schen\",\"Remove color\":\"Farbe entfernen\",\"Restore default\":\"Standard wiederherstellen\",\"Save\":\"Speichern\",\"Show more items\":\"Mehr anzeigen\",\"%0 of %1\":\"%0 von %1\",\"Cannot upload file:\":\"Die Datei kann nicht hochgeladen werden:\",\"Rich Text Editor. Editing area: %0\":\"Rich Text Editor. Bearbeitungsbereich: %0\",\"Insert with file manager\":\"Mit Dateimanager einf\u00FCgen\",\"Replace with file manager\":\"Mittels Dateimanager ersetzen\",\"Insert image with file manager\":\"Bild mit dem Dateimanager einf\u00FCgen\",\"Replace image with file manager\":\"Bild mittels Dateimanager ersetzen\",\"File\":\"Datei\",\"With file manager\":\"Mit dem Dateimanager\",\"Toggle caption off\":\"Tabellen\u00FCberschrift deaktivieren\",\"Toggle caption on\":\"Tabellen\u00FCberschrift aktivieren\",\"Content editing keystrokes\":\"Tastatureingaben zur Inhaltsverarbeitung\",\"These keyboard shortcuts allow for quick access to content editing features.\":\"Diese Tastenkombinationen erm\u00F6glichen einen schnellen Zugang zu den Inhaltsverarbeitungsfunktionen.\",\"User interface and content navigation keystrokes\":\"Benutzeroberfl\u00E4che und Inhaltsnavigationstasten\",\"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.\":\"Verwenden Sie die folgenden Tastatureingaben f\u00FCr eine effizientere Navigation auf der CKEditor-5-Benutzeroberfl\u00E4che.\",\"Close contextual balloons, dropdowns, and dialogs\":\"Kontextsprechblasen, Dropdown-Men\u00FC und Dialoge schlie\u00DFen\",\"Open the accessibility help dialog\":\"Den Dialog zur Eingabehilfe \u00F6ffnen\",\"Move focus between form fields (inputs, buttons, etc.)\":\"Fokus zwischen Formularfeldern verschieben (Eingaben, Tastenfelder etc.)\",\"Move focus to the menu bar, navigate between menu bars\":\"Fokus auf die Men\u00FCleiste richten, zwischen Men\u00FCleisten navigieren\",\"Move focus to the toolbar, navigate between toolbars\":\"Fokus auf die Symbolleiste verschieben, zwischen den Symbolleisten navigieren\",\"Navigate through the toolbar or menu bar\":\"Durch die Werkzeugleiste oder Men\u00FCleiste navigieren\",\"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.\":\"Ausf\u00FChren der aktuell fokussierten Schaltfl\u00E4che. Das Ausf\u00FChren von Schaltfl\u00E4chen, die mit dem Inhalt des Editors interagieren, richtet den Fokus zur\u00FCck auf den Inhalt.\",\"Accept\":\"Akzeptieren\",\"Source\":\"Quelle\",\"Paragraph\":\"Absatz\",\"Color picker\":\"Farbw\u00E4hler\",\"Insert\":\"Einf\u00FCgen\",\"Update\":\"Aktualisieren\",\"Back\":\"Zur\u00FCck\",\"Please try a different phrase or check the spelling.\":\"Bitte versuchen Sie einen anderen Ausdruck oder \u00FCberpr\u00FCfen Sie die Schreibweise.\",\"Wrap text\":\"Text umflie\u00DFt Bild\",\"Break text\":\"Bild teilt Text\",\"Custom\":\"Benutzerdefiniert\",\"Original\":\"Original\",\"The value must not be empty.\":\"Der Wert darf nicht leer sein.\",\"The value should be a plain number.\":\"Der Wert sollte eine einfache Zahl sein.\",\"Copy selected content\":\"Markierten Inhalt kopieren\",\"Paste content\":\"Inhalt einf\u00FCgen\",\"Paste content as plain text\":\"Inhalt als Klartext einf\u00FCgen\",\"Insert code block\":\"Code-Block einf\u00FCgen\",\"Plain text\":\"Nur Text\",\"Leaving %0 code snippet\":\"%0 Code-Ausschnitt verlassen\",\"Entering %0 code snippet\":\"%0 Code-Ausschnitt eingeben\",\"Entering code snippet\":\"Code-Ausschnit eingeben\",\"Leaving code snippet\":\"Code-Ausschnit verlassen\",\"Code block\":\"Codeblock\",\"Insert image or file\":\"Bild oder Datei einf\u00FCgen\",\"Could not obtain resized image URL.\":\"Die URL des angepassten Bildes konnte nicht abgerufen werden.\",\"Selecting resized image failed\":\"Das angepasste Bild konnte nicht ausgew\u00E4hlt werden.\",\"Could not insert image at the current position.\":\"Das Bild konnte an der aktuellen Position nicht eingef\u00FCgt werden.\",\"Inserting image failed\":\"Einf\u00FCgen des Bildes fehlgeschlagen\",\"Open file manager\":\"Dateimanager \u00F6ffnen\",\"Cannot determine a category for the uploaded file.\":\"Die Kategorie f\u00FCr die hochgeladene Datei konnte nicht bestimmt werden.\",\"Cannot access default workspace.\":\"Zugriff auf Standardarbeitsbereich nicht m\u00F6glich.\",\"You have no image editing permissions.\":\"Sie haben keine Berechtigung zum Bearbeiten von Bildern.\",\"Edit image\":\"Bild bearbeiten\",\"Processing the edited image.\":\"Das bearbeitete Bild wird verarbeitet.\",\"Server failed to process the image.\":\"Der Server konnte das Bild nicht verarbeiten.\",\"Failed to determine category of edited image.\":\"Es konnte f\u00FCr das bearbeitete Bild keine Kategorie ermittelt werden.\",\"Bookmark\":\"Lesezeichen\",\"Edit bookmark\":\"Lesezeichen bearbeiten\",\"Remove bookmark\":\"Lesezeichen entfernen\",\"Bookmark name\":\"Name des Lesezeichens\",\"Enter the bookmark name without spaces.\":\"Geben Sie den Namen des Lesezeichens ohne Leerzeichen ein.\",\"Bookmark must not be empty.\":\"Das Lesezeichen darf nicht leer sein.\",\"Bookmark name cannot contain space characters.\":\"Der Name des Lesezeichens darf keine Leerzeichen enthalten.\",\"Bookmark name already exists.\":\"Der Lesezeichenname existiert bereits.\",\"bookmark widget\":\"Lesezeichen-Widget\",\"Bookmark toolbar\":\"Lesezeichen-Werkzeugleiste\",\"Bookmarks\":\"Lesezeichen\",\"No bookmarks available.\":\"Keine Lesezeichen verf\u00FCgbar.\",\"Scroll to bookmark\":\"Zu Lesezeichen scrollen\",\"Block quote\":\"Blockzitat\",\"Bold\":\"Fett\",\"Italic\":\"Kursiv\",\"Underline\":\"Unterstrichen\",\"Code\":\"Code\",\"Strikethrough\":\"Durchgestrichen\",\"Subscript\":\"Tiefgestellt\",\"Superscript\":\"Hochgestellt\",\"Italic text\":\"Kursivschrift\",\"Move out of an inline code style\":\"Inline Code Style verlassen\",\"Bold text\":\"Fettschrift\",\"Underline text\":\"Text hervorheben\",\"Strikethrough text\":\"Durchgestrichener Text\",\"Saving changes\":\"\u00C4nderungen werden gespeichert\",\"Revert autoformatting action\":\"Automatischen Formatierungsvorgang r\u00FCckg\u00E4ngig machen\",\"Align left\":\"Linksb\u00FCndig\",\"Align right\":\"Rechtsb\u00FCndig\",\"Align center\":\"Zentriert\",\"Justify\":\"Blocksatz\",\"Text alignment\":\"Textausrichtung\",\"Text alignment toolbar\":\"Text-Ausrichtung Toolbar\"},\"getPluralForm\":( n ) => (n != 1)}}", "/**\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 */\nexport default {\"es\":{\"dictionary\":{\"Words: %0\":\"Palabras: %0\",\"Characters: %0\":\"Caracteres: %0\",\"Widget toolbar\":\"Barra de herramientas del widget\",\"Insert paragraph before block\":\"Insertar p\u00E1rrafo antes del bloque\",\"Insert paragraph after block\":\"Insertar p\u00E1rrafo despu\u00E9s del bloque\",\"Press Enter to type after or press Shift + Enter to type before the widget\":\"Pulse Intro para escribir despu\u00E9s o pulse May\u00FAs + Intro para escribir antes del \u00ABwidget\u00BB.\",\"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)\":\"Teclas que se pueden utilizar cuando se selecciona un m\u00F3dulo interactivo (por ejemplo: imagen, tabla, etc.)\",\"Insert a new paragraph directly after a widget\":\"Inserta un nuevo p\u00E1rrafo directamente despu\u00E9s de un m\u00F3dulo interactivo\",\"Insert a new paragraph directly before a widget\":\"Inserta un nuevo p\u00E1rrafo directamente antes de un m\u00F3dulo interactivo\",\"Move the caret to allow typing directly before a widget\":\"Mueve el cursor para permitir escribir directamente antes de un m\u00F3dulo interactivo\",\"Move the caret to allow typing directly after a widget\":\"Mueve el cursor para permitir escribir directamente despu\u00E9s de un m\u00F3dulo interactivo\",\"Move focus from an editable area back to the parent widget\":\"Cambiar el foco de un \u00E1rea editable al widget principal\",\"Undo\":\"Deshacer\",\"Redo\":\"Rehacer\",\"Upload in progress\":\"Subida en progreso\",\"Rich Text Editor\":\"Editor de Texto Enriquecido\",\"Edit block\":\"Cuadro de edici\u00F3n\",\"Click to edit block\":\"Haz clic para editar el bloque\",\"Drag to move\":\"Arrastra para mover\",\"Next\":\"Siguiente\",\"Previous\":\"Anterior\",\"Editor toolbar\":\"Barra de herramientas de edici\u00F3n\",\"Dropdown toolbar\":\"Barra de herramientas desplegable\",\"Dropdown menu\":\"Men\u00FA desplegable\",\"Black\":\"Negro\",\"Dim grey\":\"Gris oscuro\",\"Grey\":\"Gris\",\"Light grey\":\"Gris claro\",\"White\":\"Blanco\",\"Red\":\"Rojo\",\"Orange\":\"Naranja\",\"Yellow\":\"Amarillo\",\"Light green\":\"Verde claro\",\"Green\":\"Verde\",\"Aquamarine\":\"Aguamarina\",\"Turquoise\":\"Turquesa\",\"Light blue\":\"Azul claro\",\"Blue\":\"Azul\",\"Purple\":\"Morado\",\"Editor block content toolbar\":\"Barra de herramientas de contenido del bloque del editor\",\"Editor contextual toolbar\":\"Barra de herramientas contextual del editor\",\"HEX\":\"HEX\",\"No results found\":\"No se han encontrado resultados\",\"No searchable items\":\"No hay elementos que buscar\",\"Editor dialog\":\"Di\u00E1logo del editor\",\"Close\":\"Cerrar\",\"Help Contents. To close this dialog press ESC.\":\"Contenidos de ayuda. Presione ESC para cerrar este cuadro de di\u00E1logo.\",\"Below, you can find a list of keyboard shortcuts that can be used in the editor.\":\"A continuaci\u00F3n, encontrar\u00E1 una lista de atajos de teclado que se pueden utilizar en el editor.\",\"(may require <kbd>Fn</kbd>)\":\"(puede requerir <kbd>Fn</kbd>)\",\"Accessibility\":\"Accesibilidad\",\"Accessibility help\":\"Ayuda de accesibilidad\",\"Press %0 for help.\":\"Presione %0 para obtener ayuda.\",\"Move focus in and out of an active dialog window\":\"Mueve el foco dentro y fuera de una ventana de di\u00E1logo activa\",\"MENU_BAR_MENU_FILE\":\"Archivo\",\"MENU_BAR_MENU_EDIT\":\"Editar\",\"MENU_BAR_MENU_VIEW\":\"Ver\",\"MENU_BAR_MENU_INSERT\":\"Insertar\",\"MENU_BAR_MENU_FORMAT\":\"Formato\",\"MENU_BAR_MENU_TOOLS\":\"Herramientas\",\"MENU_BAR_MENU_HELP\":\"Ayuda\",\"MENU_BAR_MENU_TEXT\":\"Texto\",\"MENU_BAR_MENU_FONT\":\"Fuente\",\"Editor menu bar\":\"Barra de men\u00FA del editor\",\"Please enter a valid color (e.g. \\\"ff0000\\\").\":\"Introduzca un color v\u00E1lido (p. ej., \\\"ff0000\\\").\",\"Insert table\":\"Insertar tabla\",\"Insert table layout\":\"Insertar dise\u00F1o de tabla\",\"Header column\":\"Columna de encabezado\",\"Insert column left\":\"Insertar columna izquierda\",\"Insert column right\":\"Insertar columna derecha\",\"Delete column\":\"Eliminar columna\",\"Select column\":\"Seleccionar columna\",\"Column\":\"Columna\",\"Header row\":\"Fila de encabezado\",\"Footer row\":\"Fila de pie de p\u00E1gina\",\"Insert row below\":\"Insertar fila debajo\",\"Insert row above\":\"Insertar fila encima\",\"Delete row\":\"Eliminar fila\",\"Select row\":\"Seleccionar fila\",\"Row\":\"Fila\",\"Merge cell up\":\"Combinar celda superior\",\"Merge cell right\":\"Combinar celda derecha\",\"Merge cell down\":\"Combinar celda inferior\",\"Merge cell left\":\"Combinar celda izquierda\",\"Split cell vertically\":\"Dividir celdas verticalmente\",\"Split cell horizontally\":\"Dividir celdas horizontalmente\",\"Merge cells\":\"Combinar celdas\",\"Table toolbar\":\"Barra de herramientas de tabla\",\"Table properties\":\"Propiedades de tabla\",\"Cell properties\":\"Propiedades de celda\",\"Cell type\":\"Tipo de celda\",\"Data cell\":\"Celda de datos\",\"Header cell\":\"Celda de encabezado\",\"Column header\":\"Encabezado de columna\",\"Row header\":\"Encabezado de fila\",\"Border\":\"Borde\",\"Style\":\"Estilo\",\"Width\":\"Ancho\",\"Height\":\"Altura\",\"Color\":\"Color\",\"Background\":\"Fondo\",\"Padding\":\"M\u00E1rgenes\",\"Dimensions\":\"Dimensiones\",\"Table cell text alignment\":\"Alineaci\u00F3n texto de celda\",\"Table Alignment\":\"Alineaci\u00F3n de la tabla\",\"Horizontal text alignment toolbar\":\"Alineaci\u00F3n horizontal de texto\",\"Vertical text alignment toolbar\":\"Alineaci\u00F3n vertical de texto\",\"Table alignment toolbar\":\"Alineaci\u00F3n de tabla\",\"None\":\"Ninguno\",\"Solid\":\"S\u00F3lido\",\"Dotted\":\"L\u00EDnea de puntos\",\"Dashed\":\"L\u00EDnea discontinua\",\"Double\":\"Doble l\u00EDnea\",\"Groove\":\"Bisel\",\"Ridge\":\"Marco\",\"Inset\":\"Incrustaci\u00F3n\",\"Outset\":\"Relieve\",\"Align cell text to the left\":\"Alinear texto de celda a la izquierda\",\"Align cell text to the center\":\"Centrar texto de celda\",\"Align cell text to the right\":\"Alinear texto de celda a la derecha\",\"Justify cell text\":\"Justificar texto de celda\",\"Align cell text to the top\":\"Alinear texto de celda hacia arriba\",\"Align cell text to the middle\":\"Alinear texto de celda al medio\",\"Align cell text to the bottom\":\"Alinear texto de celda hacia abajo\",\"Align table to the left with text wrapping\":\"Alinear la tabla a la izquierda con ajuste de texto\",\"Center table with no text wrapping\":\"Centrar la tabla sin ajuste de texto\",\"Align table to the right with text wrapping\":\"Alinear la tabla a la derecha con ajuste de texto\",\"Align table to the left with no text wrapping\":\"Alinear la tabla a la izquierda sin ajuste de texto\",\"Align table to the right with no text wrapping\":\"Alinear la tabla a la derecha sin ajuste de texto\",\"The color is invalid. Try \\\"#FF0000\\\" or \\\"rgb(255,0,0)\\\" or \\\"red\\\".\":\"El color es inv\u00E1lido. Intente con \\\"#FF0000\\\", \\\"rgb(255,0,0)\\\" o \\\"red\\\".\",\"The value is invalid. Try \\\"10px\\\" or \\\"2em\\\" or simply \\\"2\\\".\":\"El valor es inv\u00E1lido. Intente con \\\"10px\\\", \\\"2em\\\" o simplemente \\\"2\\\".\",\"Enter table caption\":\"Ingresar t\u00EDtulo de tabla\",\"Keystrokes that can be used in a table cell\":\"Teclas que se pueden utilizar en una celda de tabla\",\"Move the selection to the next cell\":\"Mueve la selecci\u00F3n a la siguiente celda\",\"Move the selection to the previous cell\":\"Mueve la selecci\u00F3n a la celda anterior\",\"Insert a new table row (when in the last cell of a table)\":\"Inserta una nueva fila de la tabla (cuando est\u00E9 en la \u00FAltima celda de una tabla)\",\"Navigate through the table\":\"Navega por la tabla\",\"Table\":\"Tabla\",\"Table layout\":\"Dise\u00F1o de tabla\",\"Layout table\":\"Tabla de dise\u00F1o\",\"Content table\":\"Tabla de contenido\",\"Choose table type\":\"Elegir tipo de tabla\",\"Table type\":\"Tipo de tabla\",\"Table type options\":\"Opciones del tipo de tabla\",\"Styles\":\"Estilos\",\"Multiple styles\":\"M\u00FAltiples estilos\",\"Block styles\":\"Estilos de bloque\",\"Text styles\":\"Estilos de texto\",\"Special characters\":\"Caracteres especiales\",\"Category\":\"Categor\u00EDa\",\"All\":\"Todos\",\"Arrows\":\"Flechas\",\"Currency\":\"Monedas\",\"Latin\":\"Lat\u00EDn\",\"Mathematical\":\"Matem\u00E1ticas\",\"Text\":\"Texto\",\"leftwards simple arrow\":\"flecha simple hacia la izquierda\",\"rightwards simple arrow\":\"flecha simple hacia la derecha\",\"upwards simple arrow\":\"flecha simple hacia arriba\",\"downwards simple arrow\":\"flecha simple hacia abajo\",\"leftwards double arrow\":\"flecha doble hacia la izquierda\",\"rightwards double arrow\":\"flecha doble hacia la derecha\",\"upwards double arrow\":\"flecha doble hacia arriba\",\"downwards double arrow\":\"flecha doble hacia abajo\",\"leftwards dashed arrow\":\"flecha punteada hacia la izquierda\",\"rightwards dashed arrow\":\"flecha punteada hacia la derecha\",\"upwards dashed arrow\":\"flecha punteada hacia arriba\",\"downwards dashed arrow\":\"flecha punteada hacia abajo\",\"leftwards arrow to bar\":\"flecha hacia la izquierda hasta una barra\",\"rightwards arrow to bar\":\"flecha hacia la derecha hasta una barra\",\"upwards arrow to bar\":\"flecha hacia arriba hasta una barra\",\"downwards arrow to bar\":\"flecha hacia abajo hasta una barra\",\"up down arrow with base\":\"flecha hacia arriba y abajo con una base\",\"back with leftwards arrow above\":\"\u00ABback\u00BB con una flecha hacia la izquierda arriba\",\"end with leftwards arrow above\":\"\u00ABend\u00BB con una flecha hacia la izquierda arriba\",\"on with exclamation mark with left right arrow above\":\"\u00ABon\u00BB seguido de un signo de exclamaci\u00F3n y con una flecha hacia la izquierda y derecha arriba\",\"soon with rightwards arrow above\":\"\u00ABsoon\u00BB con una flecha hacia la derecha arriba\",\"top with upwards arrow above\":\"\u00ABtop\u00BB con una flecha hacia arriba arriba\",\"Dollar sign\":\"Signo del d\u00F3lar\",\"Euro sign\":\"Signo del euro\",\"Yen sign\":\"Signo del yen\",\"Pound sign\":\"Signo de la libra\",\"Cent sign\":\"Signo del centavo\",\"Euro-currency sign\":\"Signo de la moneda euro\",\"Colon sign\":\"Signo del col\u00F3n\",\"Cruzeiro sign\":\"Signo del cruceiro\",\"French franc sign\":\"Signo del franco franc\u00E9s\",\"Lira sign\":\"Signo de la lira\",\"Currency sign\":\"Signo monetario\",\"Bitcoin sign\":\"Signo del bitc\u00F3in\",\"Mill sign\":\"Signo de mil\u00E9sima\",\"Naira sign\":\"Signo de naira\",\"Peseta sign\":\"Signo de la peseta\",\"Rupee sign\":\"Signo de la rupia\",\"Won sign\":\"Signo del won\",\"New sheqel sign\":\"Signo del nuevo s\u00E9quel\",\"Dong sign\":\"Signo de dong\",\"Kip sign\":\"Signo de kip\",\"Tugrik sign\":\"Signo de tugrik\",\"Drachma sign\":\"Signo de dracma\",\"German penny sign\":\"Signo de centavo alem\u00E1n\",\"Peso sign\":\"Signo del peso\",\"Guarani sign\":\"Signo del guaran\u00ED\",\"Austral sign\":\"Signo de austral\",\"Hryvnia sign\":\"Signo de grivna\",\"Cedi sign\":\"Signo de cedi\",\"Livre tournois sign\":\"Signo de libra tornesa\",\"Spesmilo sign\":\"Signo de spesmilo\",\"Tenge sign\":\"Signo de tenge\",\"Indian rupee sign\":\"Signo de rupia india\",\"Turkish lira sign\":\"Signo de lira turca\",\"Nordic mark sign\":\"Signo de marco n\u00F3rdico\",\"Manat sign\":\"Signo de manat\",\"Ruble sign\":\"Signo del rublo\",\"Latin capital letter a with macron\":\"Letra latina may\u00FAscula \u00ABA\u00BB con macr\u00F3n\",\"Latin small letter a with macron\":\"Letra latina min\u00FAscula \u00ABa\u00BB con macr\u00F3n\",\"Latin capital letter a with breve\":\"Letra latina may\u00FAscula \u00ABA\u00BB con acento breve\",\"Latin small letter a with breve\":\"Letra latina min\u00FAscula \u00ABa\u00BB con acento breve\",\"Latin capital letter a with ogonek\":\"Letra latina may\u00FAscula \u00ABA\u00BB con ogonek\",\"Latin small letter a with ogonek\":\"Letra latina min\u00FAscula \u00ABa\u00BB con ogonek\",\"Latin capital letter c with acute\":\"Letra latina may\u00FAscula \u00ABC\u00BB con acento agudo\",\"Latin small letter c with acute\":\"Letra latina min\u00FAscula \u00ABc\u00BB con acento agudo\",\"Latin capital letter c with circumflex\":\"Letra latina may\u00FAscula \u00ABC\u00BB con acento circunflejo\",\"Latin small letter c with circumflex\":\"Letra latina min\u00FAscula \u00ABc\u00BB con acento circunflejo\",\"Latin capital letter c with dot above\":\"Letra latina may\u00FAscula \u00ABC\u00BB con punto superior\",\"Latin small letter c with dot above\":\"Letra latina min\u00FAscula \u00ABc\u00BB con punto superior\",\"Latin capital letter c with caron\":\"Letra latina may\u00FAscula \u00ABC\u00BB con acento anticircunflejo\",\"Latin small letter c with caron\":\"Letra latina min\u00FAscula \u00ABc\u00BB con acento anticircunflejo\",\"Latin capital letter d with caron\":\"Letra latina may\u00FAscula \u00ABD\u00BB con acento anticircunflejo\",\"Latin small letter d with caron\":\"Letra latina min\u00FAscula \u00ABd\u00BB con acento anticircunflejo\",\"Latin capital letter d with stroke\":\"Letra latina may\u00FAscula \u00ABD\u00BB con barra horizontal\",\"Latin small letter d with stroke\":\"Letra latina min\u00FAscula \u00ABd\u00BB con barra horizontal\",\"Latin capital letter e with macron\":\"Letra latina may\u00FAscula \u00ABE\u00BB con macr\u00F3n\",\"Latin small letter e with macron\":\"Letra latina min\u00FAscula \u00ABe\u00BB con macr\u00F3n\",\"Latin capital letter e with breve\":\"Letra latina may\u00FAscula \u00ABe\u00BB con acento breve\",\"Latin small letter e with breve\":\"Letra latina min\u00FAscula \u00ABe\u00BB con acento breve\",\"Latin capital letter e with dot above\":\"Letra latina may\u00FAscula \u00ABE\u00BB con punto superior\",\"Latin small letter e with dot above\":\"Letra latina min\u00FAscula \u00ABe\u00BB con punto superior\",\"Latin capital letter e with ogonek\":\"Letra latina may\u00FAscula \u00ABE\u00BB con ogonek\",\"Latin small letter e with ogonek\":\"Letra latina min\u00FAscula \u00ABe\u00BB con ogonek\",\"Latin capital letter e with caron\":\"Letra latina may\u00FAscula \u00ABE\u00BB con acento anticircunflejo\",\"Latin small letter e with caron\":\"Letra latina min\u00FAscula \u00ABe\u00BB con acento anticircunflejo\",\"Latin capital letter g with circumflex\":\"Letra latina may\u00FAscula \u00ABG\u00BB con acento circunflejo\",\"Latin small letter g with circumflex\":\"Letra latina min\u00FAscula \u00ABg\u00BB con acento circunflejo\",\"Latin capital letter g with breve\":\"Letra latina may\u00FAscula \u00ABG\u00BB con acento breve\",\"Latin small letter g with breve\":\"Letra latina min\u00FAscula \u00ABg\u00BB con acento breve\",\"Latin capital letter g with dot above\":\"Letra latina may\u00FAscula \u00ABG\u00BB con punto superior\",\"Latin small letter g with dot above\":\"Letra latina min\u00FAscula \u00ABg\u00BB con punto superior\",\"Latin capital letter g with cedilla\":\"Letra latina may\u00FAscula \u00ABG\u00BB con cedilla\",\"Latin small letter g with cedilla\":\"Letra latina min\u00FAscula \u00ABg\u00BB con cedilla\",\"Latin capital letter h with circumflex\":\"Letra latina may\u00FAscula \u00ABH\u00BB con acento circunflejo\",\"Latin small letter h with circumflex\":\"Letra latina min\u00FAscula \u00ABh\u00BB con acento circunflejo\",\"Latin capital letter h with stroke\":\"Letra latina may\u00FAscula \u00ABH\u00BB con barra horizontal\",\"Latin small letter h with stroke\":\"Letra latina min\u00FAscula \u00ABh\u00BB con barra horizontal\",\"Latin capital letter i with tilde\":\"Letra latina may\u00FAscula \u00ABI\u00BB con tilde\",\"Latin small letter i with tilde\":\"Letra latina min\u00FAscula \u00ABi\u00BB con tilde\",\"Latin capital letter i with macron\":\"Letra latina may\u00FAscula \u00ABI\u00BB con macr\u00F3n\",\"Latin small letter i with macron\":\"Letra latina min\u00FAscula \u00ABi\u00BB con macr\u00F3n\",\"Latin capital letter i with breve\":\"Letra latina may\u00FAscula \u00ABI\u00BB con acento breve\",\"Latin small letter i with breve\":\"Letra latina min\u00FAscula \u00ABi\u00BB con acento breve\",\"Latin capital letter i with ogonek\":\"Letra latina may\u00FAscula \u00ABI\u00BB con ogonek\",\"Latin small letter i with ogonek\":\"Letra latina min\u00FAscula \u00ABi\u00BB con ogonek\",\"Latin capital letter i with dot above\":\"Letra latina may\u00FAscula \u00ABI\u00BB con punto superior\",\"Latin small letter dotless i\":\"Letra latina min\u00FAscula \u00ABi\u00BB sin punto\",\"Latin capital ligature ij\":\"Ligadura latina may\u00FAscula \u00ABIJ\u00BB\",\"Latin small ligature ij\":\"Ligadura latina min\u00FAscula \u00ABij\u00BB\",\"Latin capital letter j with circumflex\":\"Letra latina may\u00FAscula \u00ABJ\u00BB con acento circunflejo\",\"Latin small letter j with circumflex\":\"Letra latina min\u00FAscula \u00ABj\u00BB con acento circunflejo\",\"Latin capital letter k with cedilla\":\"Letra latina may\u00FAscula \u00ABK\u00BB con cedilla\",\"Latin small letter k with cedilla\":\"Letra latina min\u00FAscula \u00ABk\u00BB con cedilla\",\"Latin small letter kra\":\"Letra latina min\u00FAscula \u00ABkra\u00BB\",\"Latin capital letter l with acute\":\"Letra latina may\u00FAscula \u00ABL\u00BB con acento agudo\",\"Latin small letter l with acute\":\"Letra latina min\u00FAscula \u00ABl\u00BB con acento agudo\",\"Latin capital letter l with cedilla\":\"Letra latina may\u00FAscula \u00ABI\u00BB con cedilla\",\"Latin small letter l with cedilla\":\"Letra latina min\u00FAscula \u00ABl\u00BB con cedilla\",\"Latin capital letter l with caron\":\"Letra latina may\u00FAscula \u00ABI\u00BB con acento anticircunflejo\",\"Latin small letter l with caron\":\"Letra latina min\u00FAscula \u00ABi\u00BB con acento anticircunflejo\",\"Latin capital letter l with middle dot\":\"Letra latina may\u00FAscula \u00ABL\u00BB con punto medio\",\"Latin small letter l with middle dot\":\"Letra latina min\u00FAscula \u00ABl\u00BB con punto medio\",\"Latin capital letter l with stroke\":\"Letra latina may\u00FAscula \u00ABL\u00BB con barra diagonal\",\"Latin small letter l with stroke\":\"Letra latina min\u00FAscula \u00ABl\u00BB con barra diagonal\",\"Latin capital letter n with acute\":\"Letra latina may\u00FAscula \u00ABN\u00BB con acento agudo\",\"Latin small letter n with acute\":\"Letra latina min\u00FAscula \u00ABn\u00BB con acento agudo\",\"Latin capital letter n with cedilla\":\"Letra latina may\u00FAscula \u00ABN\u00BB con cedilla\",\"Latin small letter n with cedilla\":\"Letra latina min\u00FAscula \u00ABn\u00BB con cedilla\",\"Latin capital letter n with caron\":\"Letra latina may\u00FAscula \u00ABn\u00BB con acento anticircunflejo\",\"Latin small letter n with caron\":\"Letra latina min\u00FAscula \u00ABn\u00BB con acento anticircunflejo\",\"Latin small letter n preceded by apostrophe\":\"Letra latina min\u00FAscula \u00ABn\u00BB precedida de ap\u00F3strofo\",\"Latin capital letter eng\":\"Letra latina may\u00FAscula \u00ABEng\u00BB\",\"Latin small letter eng\":\"Letra latina min\u00FAscula \u00ABeng\u00BB\",\"Latin capital letter o with macron\":\"Letra latina may\u00FAscula \u00ABO\u00BB con macr\u00F3n\",\"Latin small letter o with macron\":\"Letra latina min\u00FAscula \u00ABo\u00BB con macr\u00F3n\",\"Latin capital letter o with breve\":\"Letra latina may\u00FAscula \u00ABO\u00BB con acento breve\",\"Latin small letter o with breve\":\"Letra latina min\u00FAscula \u00ABo\u00BB con acento breve\",\"Latin capital letter o with double acute\":\"Letra latina may\u00FAscula \u00ABO\u00BB con doble acento agudo\",\"Latin small letter o with double acute\":\"Letra latina min\u00FAscula \u00ABo\u00BB con doble acento agudo\",\"Latin capital ligature oe\":\"Ligadura latina may\u00FAscula \u00ABOE\u00BB\",\"Latin small ligature oe\":\"Ligadura latina min\u00FAscula \u00ABoe\u00BB\",\"Latin capital letter r with acute\":\"Letra latina may\u00FAscula \u00ABR\u00BB con acento agudo\",\"Latin small letter r with acute\":\"Letra latina min\u00FAscula \u00ABr\u00BB con acento agudo\",\"Latin capital letter r with cedilla\":\"Letra latina may\u00FAscula \u00ABR\u00BB con cedilla\",\"Latin small letter r with cedilla\":\"Letra latina min\u00FAscula \u00ABr\u00BB con cedilla\",\"Latin capital letter r with caron\":\"Letra latina may\u00FAscula \u00ABR\u00BB con acento anticircunflejo\",\"Latin small letter r with caron\":\"Letra latina min\u00FAscula \u00ABr\u00BB con acento anticircunflejo\",\"Latin capital letter s with acute\":\"Letra latina may\u00FAscula \u00ABS\u00BB con acento agudo\",\"Latin small letter s with acute\":\"Letra latina min\u00FAscula \u00ABs\u00BB con acento agudo\",\"Latin capital letter s with circumflex\":\"Letra latina may\u00FAscula \u00ABS\u00BB con acento circunflejo\",\"Latin small letter s with circumflex\":\"Letra latina min\u00FAscula \u00ABs\u00BB con acento circunflejo\",\"Latin capital letter s with cedilla\":\"Letra latina may\u00FAscula \u00ABS\u00BB con cedilla\",\"Latin small letter s with cedilla\":\"Letra latina min\u00FAscula \u00ABs\u00BB con cedilla\",\"Latin capital letter s with caron\":\"Letra latina may\u00FAscula \u00ABS\u00BB con acento anticircunflejo\",\"Latin small letter s with caron\":\"Letra latina min\u00FAscula \u00ABs\u00BB con acento anticircunflejo\",\"Latin capital letter t with cedilla\":\"Letra latina may\u00FAscula \u00ABT\u00BB con cedilla\",\"Latin small letter t with cedilla\":\"Letra latina min\u00FAscula \u00ABt\u00BB con cedilla\",\"Latin capital letter t with caron\":\"Letra latina may\u00FAscula \u00ABT\u00BB con acento anticircunflejo\",\"Latin small letter t with caron\":\"Letra latina min\u00FAscula \u00ABt\u00BB con acento anticircunflejo\",\"Latin capital letter t with stroke\":\"Letra latina may\u00FAscula \u00ABT\u00BB con barra horizontal\",\"Latin small letter t with stroke\":\"Letra latina min\u00FAscula \u00ABt\u00BB con barra horizontal\",\"Latin capital letter u with tilde\":\"Letra latina may\u00FAscula \u00ABU\u00BB con tilde\",\"Latin small letter u with tilde\":\"Letra latina min\u00FAscula \u00ABu\u00BB con tilde\",\"Latin capital letter u with macron\":\"Letra latina may\u00FAscula \u00ABU\u00BB con macr\u00F3n\",\"Latin small letter u with macron\":\"Letra latina min\u00FAscula \u00ABu\u00BB con macr\u00F3n\",\"Latin capital letter u with breve\":\"Letra latina may\u00FAscula \u00ABU\u00BB con acento breve\",\"Latin small letter u with breve\":\"Letra latina min\u00FAscula \u00ABu\u00BB con acento breve\",\"Latin capital letter u with ring above\":\"Letra latina may\u00FAscula \u00ABU\u00BB con anillo superior\",\"Latin small letter u with ring above\":\"Letra latina min\u00FAscula \u00ABu\u00BB con anillo superior\",\"Latin capital letter u with double acute\":\"Letra latina may\u00FAscula \u00ABU\u00BB con doble acento agudo\",\"Latin small letter u with double acute\":\"Letra latina min\u00FAscula \u00ABu\u00BB con doble acento agudo\",\"Latin capital letter u with ogonek\":\"Letra latina may\u00FAscula \u00ABU\u00BB con ogonek\",\"Latin small letter u with ogonek\":\"Letra latina min\u00FAscula \u00ABu\u00BB con ogonek\",\"Latin capital letter w with circumflex\":\"Letra latina may\u00FAscula \u00ABW\u00BB con acento circunflejo\",\"Latin small letter w with circumflex\":\"Letra latina min\u00FAscula \u00ABw\u00BB con acento circunflejo\",\"Latin capital letter y with circumflex\":\"Letra latina may\u00FAscula \u00ABY\u00BB con acento circunflejo\",\"Latin small letter y with circumflex\":\"Letra latina min\u00FAscula \u00ABy\u00BB con acento circunflejo\",\"Latin capital letter y with diaeresis\":\"Letra latina may\u00FAscula \u00ABY\u00BB con di\u00E9resis\",\"Latin capital letter z with acute\":\"Letra latina may\u00FAscula \u00ABZ\u00BB con acento agudo\",\"Latin small letter z with acute\":\"Letra latina min\u00FAscula \u00ABz\u00BB con acento agudo\",\"Latin capital letter z with dot above\":\"Letra latina may\u00FAscula \u00ABZ\u00BB con punto superior\",\"Latin small letter z with dot above\":\"Letra latina min\u00FAscula \u00ABz\u00BB con punto superior\",\"Latin capital letter z with caron\":\"Letra latina may\u00FAscula \u00ABZ\u00BB con acento anticircunflejo\",\"Latin small letter z with caron\":\"Letra latina min\u00FAscula \u00ABz\u00BB con acento anticircunflejo\",\"Latin small letter long s\":\"Letra latina min\u00FAscula \u00ABs\u00BB larga\",\"Less-than sign\":\"Signo de menor que\",\"Greater-than sign\":\"Signo de mayor que\",\"Less-than or equal to\":\"Menor que o igual a\",\"Greater-than or equal to\":\"Mayor que o igual a\",\"En dash\":\"Semirraya\",\"Em dash\":\"Raya\",\"Macron\":\"Macr\u00F3n\",\"Overline\":\"L\u00EDnea alta\",\"Degree sign\":\"Signo de grado\",\"Minus sign\":\"Signo de resta\",\"Plus-minus sign\":\"Signo m\u00E1s-menos\",\"Division sign\":\"Signo de divisi\u00F3n\",\"Fraction slash\":\"Barra fraccionaria\",\"Multiplication sign\":\"Signo de multiplicaci\u00F3n\",\"Latin small letter f with hook\":\"Letra latina min\u00FAscula \u00ABf\u00BB con gancho\",\"Integral\":\"Integral\",\"N-ary summation\":\"Sumatoria\",\"Infinity\":\"Infinito\",\"Square root\":\"Ra\u00EDz cuadrada\",\"Tilde operator\":\"Operador de tilde\",\"Approximately equal to\":\"Aproximadamente igual a\",\"Almost equal to\":\"Casi igual a\",\"Not equal to\":\"No igual a\",\"Identical to\":\"Id\u00E9ntico a\",\"Element of\":\"Elemento de\",\"Not an element of\":\"No es un elemento de\",\"Contains as member\":\"Contiene como miembro\",\"N-ary product\":\"Productorio\",\"Logical and\":\"Y l\u00F3gico\",\"Logical or\":\"O l\u00F3gico\",\"Not sign\":\"Signo de negaci\u00F3n\",\"Intersection\":\"Intersecci\u00F3n\",\"Union\":\"Uni\u00F3n\",\"Partial differential\":\"Diferencial parcial\",\"For all\":\"Para todo\",\"There exists\":\"Existe\",\"Empty set\":\"Conjunto vac\u00EDo\",\"Nabla\":\"Nabla\",\"Asterisk operator\":\"Operador asterisco\",\"Proportional to\":\"Proporcional a\",\"Angle\":\"\u00C1ngulo\",\"Vulgar fraction one quarter\":\"Fracci\u00F3n ordinaria de un cuarto\",\"Vulgar fraction one half\":\"Fracci\u00F3n ordinaria de un medio\",\"Vulgar fraction three quarters\":\"Fracci\u00F3n ordinaria de tres cuartos\",\"Single left-pointing angle quotation mark\":\"Comilla tipogr\u00E1fica simple angular de apertura\",\"Single right-pointing angle quotation mark\":\"Comilla tipogr\u00E1fica simple angular de cierre\",\"Left-pointing double angle quotation mark\":\"Comilla tipogr\u00E1fica doble angular de apertura\",\"Right-pointing double angle quotation mark\":\"Comilla tipogr\u00E1fica dobe angular de cierre\",\"Left single quotation mark\":\"Comilla tipogr\u00E1fica de apertura\",\"Right single quotation mark\":\"Comilla tipogr\u00E1fica de cierre\",\"Left double quotation mark\":\"Comilla tipogr\u00E1fica doble de apertura\",\"Right double quotation mark\":\"Comilla tipogr\u00E1fica de cierre\",\"Single low-9 quotation mark\":\"Comilla tipogr\u00E1fica en forma de 9 simple y baja\",\"Double low-9 quotation mark\":\"Comilla tipogr\u00E1fica en forma de 9 doble y baja\",\"Inverted exclamation mark\":\"Signo de exclamaci\u00F3n de apertura\",\"Inverted question mark\":\"Signo de interrogaci\u00F3n de apertura\",\"Two dot leader\":\"Punto de inicio doble\",\"Horizontal ellipsis\":\"Puntos suspensivos horizontales\",\"Double dagger\":\"Cruz doble\",\"Per mille sign\":\"Signo de por mil\",\"Per ten thousand sign\":\"Signo de por diez mil\",\"Double exclamation mark\":\"Signo de exclamaci\u00F3n doble\",\"Question exclamation mark\":\"Signo de exclamaci\u00F3n interrogativa\",\"Exclamation question mark\":\"Signo de interrogaci\u00F3n exclamativa\",\"Double question mark\":\"Signo de interrogaci\u00F3n doble\",\"Copyright sign\":\"Signo de derechos de autor\",\"Registered sign\":\"Signo de marca registrada\",\"Trade mark sign\":\"Signo de marca comercial\",\"Section sign\":\"Signo de secci\u00F3n\",\"Paragraph sign\":\"Signo de p\u00E1rrafo\",\"Reversed paragraph sign\":\"Signo de ant\u00EDgrafo invertido\",\"Show source\":\"Mostrar fuente\",\"Show blocks\":\"Mostrar bloques\",\"Select all\":\"Seleccionar todo\",\"Disable editing\":\"Deshabilitar la edici\u00F3n\",\"Enable editing\":\"Habilitar edici\u00F3n\",\"Disable inline editing\":\"Deshabilitar la edici\u00F3n en l\u00EDnea\",\"Enable inline editing\":\"Habilitar la edici\u00F3n en l\u00EDnea\",\"Disable block editing\":\"Deshabilitar la edici\u00F3n de bloques\",\"Enable block editing\":\"Habilitar la edici\u00F3n de bloques\",\"Previous editable region\":\"Anterior zona editable\",\"Next editable region\":\"Siguiente zona editable\",\"Navigate editable regions\":\"Navegar por las zonas editables\",\"Remove Format\":\"Quitar Formato\",\"Page break\":\"Salto de p\u00E1gina\",\"media widget\":\"Widget de contenido multimedia\",\"Media URL\":\"URL del contenido multimedia\",\"Paste the media URL in the input.\":\"Pega la URL del contenido multimedia\",\"Tip: Paste the URL into the content to embed faster.\":\"Tip: pega la URL dentro del contenido para embeber m\u00E1s r\u00E1pido\",\"The URL must not be empty.\":\"La URL no debe estar vac\u00EDa\",\"This media URL is not supported.\":\"La URL de este contenido multimedia no est\u00E1 soportada\",\"Insert media\":\"Insertar contenido multimedia\",\"Media embed\":\"Inserci\u00F3n de medios\",\"Media\":\"Multimedia\",\"Media toolbar\":\"Barra de herramientas de contenido multimedia\",\"Open media in new tab\":\"Abrir medio en una pesta\u00F1a nueva\",\"Left aligned media\":\"Medios alineados a la izquierda\",\"Centered media\":\"Medios centrados\",\"Right aligned media\":\"Medios alineados a la derecha\",\"Resize media\":\"Ajustar el tama\u00F1o de los elementos multimedia\",\"Resize media to %0\":\"Redimensionar el tama\u00F1o del elemento multimedia en %0\",\"Resize media to the original size\":\"Redimensionar el contenido multimedia al tama\u00F1o original\",\"Resize media (in %0)\":\"Redimensionar el tama\u00F1o del elemento multimedia (en %0)\",\"Custom media size\":\"Tama\u00F1o de personalizado del elemento multimedia\",\"Media resize list\":\"Lista de redimensionamiento del contenido multimedia\",\"Media Resize\":\"Redimensionar elementos multimedia\",\"Numbered List\":\"Lista numerada\",\"Bulleted List\":\"Lista con vi\u00F1etas\",\"To-do List\":\"Lista de tareas\",\"Bulleted list styles toolbar\":\"Estilos de lista con vi\u00F1etas\",\"Numbered list styles toolbar\":\"Estilos de lista numerada\",\"Toggle the disc list style\":\"Cambiar estilo de vi\u00F1eta a disco\",\"Toggle the circle list style\":\"Cambiar estilo de vi\u00F1eta a c\u00EDrculo\",\"Toggle the square list style\":\"Cambiar estilo de vi\u00F1eta a cuadrado\",\"Toggle the decimal list style\":\"Cambiar estilo de lista a decimal\",\"Toggle the decimal with leading zero list style\":\"Cambiar estilo de lista decimal empezando con cero\",\"Toggle the lower\u2013roman list style\":\"Cambiar estilo de lista a n\u00FAmeros romanos en min\u00FAsculas\",\"Toggle the upper\u2013roman list style\":\"Cambiar estilo de lista a n\u00FAmeros roanos en may\u00FAsculas\",\"Toggle the lower\u2013latin list style\":\"Cambiar estilo de lista a n\u00FAmeros latinos en min\u00FAsculas\",\"Toggle the upper\u2013latin list style\":\"Cambiar estilo de lista a n\u00FAmeros latinos en may\u00FAsculas\",\"Toggle the arabic-indic list style\":\"Alternar el estilo de lista ar\u00E1bigo-\u00EDndico\",\"Arabic-indic\":\"Ar\u00E1bigo-\u00EDndico\",\"Disc\":\"Disco\",\"Circle\":\"C\u00EDrculo\",\"Square\":\"Cuadrado\",\"Decimal\":\"Decimal\",\"Decimal with leading zero\":\"Decimal con cero\",\"Lower\u2013roman\":\"Romanos min\u00FAsculas\",\"Upper-roman\":\"Romanos may\u00FAscula\",\"Lower-latin\":\"Latinos min\u00FAsculas\",\"Upper-latin\":\"Latinos min\u00FAsculas\",\"List properties\":\"Propiedades de la lista\",\"Start at\":\"Empezar en\",\"Invalid start index value.\":\"Valor de \u00EDndice de inicio no v\u00E1lido.\",\"Start index must be greater than 0.\":\"El n\u00FAmero de inicio debe ser mayor que 0.\",\"Reversed order\":\"Orden inverso\",\"Keystrokes that can be used in a list\":\"Teclas que se pueden utilizar en una lista\",\"Increase list item indent\":\"Aumenta la sangr\u00EDa de los elementos de la lista\",\"Decrease list item indent\":\"Reduce la sangr\u00EDa de los elementos de la lista\",\"Entering a to-do list\":\"Ingresando lista de tareas pendientes\",\"Leaving a to-do list\":\"Abandonando lista de tareas pendientes\",\"Unlink\":\"Quitar enlace\",\"Link\":\"Enlace\",\"Link URL\":\"URL del enlace\",\"Link URL must not be empty.\":\"La URL del enlace no puede estar vac\u00EDa.\",\"Link image\":\"URL de la imagen\",\"Link properties\":\"Propiedades del enlace\",\"Edit link\":\"Editar enlace\",\"Open link in new tab\":\"Abrir enlace en una pesta\u00F1a nueva\",\"Open in a new tab\":\"Abrir en una pesta\u00F1a nueva \",\"Downloadable\":\"Descargable\",\"Create link\":\"Crea un enlace\",\"Move out of a link\":\"Sale de un enlace\",\"Displayed text\":\"Texto mostrado\",\"No links available\":\"No hay enlaces disponibles\",\"This link has no URL\":\"Este enlace no tiene URL\",\"Language\":\"Idioma\",\"Choose language\":\"Elija el idioma\",\"Remove language\":\"Quitar idioma\",\"Increase indent\":\"Aumentar sangr\u00EDa\",\"Decrease indent\":\"Disminuir sangr\u00EDa\",\"image widget\":\"Widget de imagen\",\"In line\":\"En l\u00EDnea\",\"Side image\":\"Imagen lateral\",\"Full size image\":\"Imagen a tama\u00F1o completo\",\"Left aligned image\":\"Imagen alineada a la izquierda\",\"Centered image\":\"Imagen centrada\",\"Right aligned image\":\"Imagen alineada a la derecha\",\"Change image text alternative\":\"Cambiar el texto alternativo de la imagen\",\"Text alternative\":\"Texto alternativo\",\"Enter image caption\":\"Introducir t\u00EDtulo de la imagen\",\"Insert image\":\"Insertar imagen\",\"Replace image\":\"Reemplazar imagen\",\"Upload from computer\":\"Subir desde el ordenador\",\"Replace from computer\":\"Reemplazar desde el ordenador\",\"Upload image from computer\":\"Subir imagen desde el ordenador\",\"Image from computer\":\"Imagen del ordenador\",\"From computer\":\"Desde el ordenador\",\"Replace image from computer\":\"Reemplazar imagen del ordenador\",\"Upload failed\":\"Fallo en la subida\",\"You have no image upload permissions.\":\"No tienes permiso para subir im\u00E1genes.\",\"Image toolbar\":\"Barra de herramientas de imagen\",\"Resize image\":\"Redimensionar imagen\",\"Resize image to %0\":\"Redimensionar imagen al %0\",\"Resize image to the original size\":\"Redimensionar imagen al tama\u00F1o original\",\"Resize image (in %0)\":\"Cambiar tama\u00F1o de la imagen (en un %0)\",\"Custom image size\":\"Personalizar tama\u00F1o de imagen\",\"Image resize list\":\"Listado para redimensionar imagen\",\"Insert image via URL\":\"Insertar imagen v\u00EDa URL\",\"Insert via URL\":\"Insertar mediante URL\",\"Image via URL\":\"Imagen mediante URL\",\"Via URL\":\"Mediante URL\",\"Update image URL\":\"Actualizar imagen v\u00EDa URL\",\"Caption for the image\":\"Descripci\u00F3n de la imagen\",\"Caption for image: %0\":\"T\u00EDtulo de la imagen: %0\",\"Uploading image\":\"Cargando imagen\",\"Image upload complete\":\"Carga de imagen completa\",\"Error during image upload\":\"Error durante la carga de la imagen\",\"Image\":\"Imagen\",\"Image Resize\":\"Cambiar tama\u00F1o de la imagen\",\"Text Alternative\":\"Texto alternativo\",\"HTML object\":\"Objeto HTML\",\"Insert HTML\":\"Insertar HTML\",\"HTML snippet\":\"Fragmento HTML\",\"Paste raw HTML here...\":\"Pegue el c\u00F3digo HTML aqu\u00ED\u2026\",\"Edit source\":\"Editar fuente\",\"Save changes\":\"Guardar cambios\",\"No preview available\":\"No hay ninguna previsualizaci\u00F3n\",\"Empty snippet content\":\"Fragmento vac\u00EDo\",\"Horizontal line\":\"L\u00EDnea horizontal\",\"Yellow marker\":\"Marcador amarillo\",\"Green marker\":\"Marcador verde\",\"Pink marker\":\"Marcador rosa\",\"Blue marker\":\"Marcador azul\",\"Red pen\":\"Texto rojo\",\"Green pen\":\"Texto verde\",\"Remove highlight\":\"Quitar resaltado\",\"Highlight\":\"Resaltar\",\"Text highlight toolbar\":\"Barra de herramientas de resaltado de texto\",\"Heading\":\"Encabezado\",\"Choose heading\":\"Elegir Encabezado\",\"Heading 1\":\"Encabezado 1\",\"Heading 2\":\"Encabezado 2\",\"Heading 3\":\"Encabezado 3\",\"Heading 4\":\"Encabezado 4\",\"Heading 5\":\"Encabezado 5\",\"Heading 6\":\"Encabezado 6\",\"Type your title\":\"Introduce tu t\u00EDtulo\",\"Type or paste your content here.\":\"Introduce o pega tu contenido aqu\u00ED\",\"Enter fullscreen mode\":\"Entrar al modo de pantalla completa\",\"Leave fullscreen mode\":\"Salir del modo de pantalla completa\",\"Fullscreen mode\":\"Modo de pantalla completa\",\"Toggle fullscreen mode\":\"Alternar modo de pantalla completa\",\"Document outline\":\"Boceto del documento\",\"Connected users\":\"Usuarios conectados\",\"Show left sidebar\":\"Mostrar barra lateral izquierda\",\"Hide left sidebar\":\"Ocultar la barra lateral izquierda\",\"Toggle sidebar\":\"Activar o desactivar la barra lateral\",\"Font Size\":\"Tama\u00F1o de fuente\",\"Tiny\":\"Min\u00FAsculo\",\"Small\":\"Peque\u00F1o\",\"Big\":\"Grande\",\"Huge\":\"Enorme\",\"Font Family\":\"Fuente\",\"Default\":\"Por defecto\",\"Font Color\":\"Color de Fuente\",\"Font Background Color\":\"Color de Fondo\",\"Document colors\":\"Colores del documento\",\"Find and replace\":\"Buscar y reemplazar\",\"Find in text\u2026\":\"Buscar en el texto...\",\"Find\":\"Buscar\",\"Previous result\":\"Resultado anterior\",\"Next result\":\"Siguiente resultado\",\"Replace\":\"Reemplazar\",\"Replace all\":\"Reemplazar todo\",\"Match case\":\"Respetar may\u00FAsculas y min\u00FAsculas\",\"Whole words only\":\"Solo palabras completas\",\"Replace with\u2026\":\"Reemplazar con...\",\"Text to find must not be empty.\":\"El texto a buscar no debe estar vac\u00EDo.\",\"Tip: Find some text first in order to replace it.\":\"Consejo: Primero busque alg\u00FAn texto para reemplazar.\",\"Advanced options\":\"Opciones avanzadas\",\"Find in the document\":\"Busca en el documento\",\"Insert a soft break (a <code>&lt;br&gt;</code> element)\":\"Inserta un salto de l\u00EDnea (un elemento <code>&lt;br&gt;</code>)\",\"Insert a hard break (a new paragraph)\":\"Inserta un salto de p\u00E1rrafo (un nuevo p\u00E1rrafo)\",\"Emoji\":\"Emoji\",\"Show all emoji...\":\"Mostrar todos los emojis...\",\"Find an emoji (min. 2 characters)\":\"Busca un emoji (2 caracteres como m\u00EDnimo)\",\"No emojis were found matching \\\"%0\\\".\":\"No se han encontrado emojis que coincidan con \u00AB%0\u00BB.\",\"Keep on typing to see the emoji.\":\"Sigue escribiendo para ver el emoji.\",\"The query must contain at least two characters.\":\"La solicitud debe contener al menos dos caracteres.\",\"Smileys & Expressions\":\"Emoticonos y expresiones\",\"Gestures & People\":\"Gestos y personas\",\"Animals & Nature\":\"Animales y naturaleza\",\"Food & Drinks\":\"Comidas y bebidas\",\"Travel & Places\":\"Viajes y lugares\",\"Activities\":\"Actividades\",\"Objects\":\"Objetos\",\"Symbols\":\"S\u00EDmbolos\",\"Flags\":\"Banderas\",\"Select skin tone\":\"Seleccionar tono de piel\",\"Default skin tone\":\"Tono de piel predeterminado\",\"Light skin tone\":\"Tono de piel claro\",\"Medium Light skin tone\":\"Tono de piel medio claro\",\"Medium skin tone\":\"Tono de piel medio\",\"Medium Dark skin tone\":\"Tono de piel medio oscuro\",\"Dark skin tone\":\"Tono de piel oscuro\",\"Emoji picker\":\"Selector de emojis\",\"Cancel\":\"Cancelar\",\"Clear\":\"Borrar\",\"Remove color\":\"Quitar color\",\"Restore default\":\"Restaurar valores predeterminados\",\"Save\":\"Guardar\",\"Show more items\":\"Mostrar m\u00E1s elementos\",\"%0 of %1\":\"%0 de %1\",\"Cannot upload file:\":\"No se pudo cargar el archivo:\",\"Rich Text Editor. Editing area: %0\":\"Editor de texto enriquecido. \u00C1rea de edici\u00F3n: %0\",\"Insert with file manager\":\"Insertar con administrador de archivos\",\"Replace with file manager\":\"Reemplazar con administrador de archivos\",\"Insert image with file manager\":\"Insertar imagen con administrador de archivos\",\"Replace image with file manager\":\"Reemplazar imagen con administrador de archivos\",\"File\":\"Archivo\",\"With file manager\":\"Con el administrador de archivos\",\"Toggle caption off\":\"Desactivar t\u00EDtulo\",\"Toggle caption on\":\"Activar t\u00EDtulo\",\"Content editing keystrokes\":\"Teclas de edici\u00F3n de contenido\",\"These keyboard shortcuts allow for quick access to content editing features.\":\"Estos atajos de teclado permiten acceder r\u00E1pidamente a las funciones de edici\u00F3n de contenido.\",\"User interface and content navigation keystrokes\":\"Teclas de navegaci\u00F3n de contenido e interfaz de usuario\",\"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.\":\"Utilice las siguientes combinaciones de teclas para una navegaci\u00F3n m\u00E1s eficiente en la interfaz de usuario de CKEditor 5.\",\"Close contextual balloons, dropdowns, and dialogs\":\"Cierra globos contextuales, men\u00FAs desplegables y cuadros de di\u00E1logo\",\"Open the accessibility help dialog\":\"Abre el cuadro de di\u00E1logo de ayuda de accesibilidad\",\"Move focus between form fields (inputs, buttons, etc.)\":\"Mueve el foco entre campos de formulario (entradas, botones, etc.)\",\"Move focus to the menu bar, navigate between menu bars\":\"Mover el foco a la barra de men\u00FA, navegar entre las barras de men\u00FA\",\"Move focus to the toolbar, navigate between toolbars\":\"Mueve el foco a la barra de herramientas y navega entre barras de herramientas\",\"Navigate through the toolbar or menu bar\":\"Navegar por la barra de herramientas o la barra de men\u00FA\",\"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.\":\"Ejecutar el bot\u00F3n actualmente enfocado. Al ejecutar botones que interact\u00FAan con el contenido del editor, el foco vuelve al contenido.\",\"Accept\":\"Aceptar\",\"Source\":\"Fuente\",\"Paragraph\":\"P\u00E1rrafo\",\"Color picker\":\"Selector de color\",\"Insert\":\"Insertar\",\"Update\":\"Actualizar\",\"Back\":\"Volver\",\"Please try a different phrase or check the spelling.\":\"Intente con una frase diferente o revise la ortograf\u00EDa.\",\"Wrap text\":\"Mantener texto unido\",\"Break text\":\"Permitir quebrar texto\",\"Custom\":\"Personalizar\",\"Original\":\"Original\",\"The value must not be empty.\":\"El valor no puede estar vac\u00EDo.\",\"The value should be a plain number.\":\"El valor debe ser un n\u00FAmero simple.\",\"Copy selected content\":\"Copia el contenido seleccionado\",\"Paste content\":\"Pega el contenido\",\"Paste content as plain text\":\"Pega el contenido como texto sin formato\",\"Insert code block\":\"Insertar bloque de c\u00F3digo\",\"Plain text\":\"Texto plano\",\"Leaving %0 code snippet\":\"Abandonando fragmento de c\u00F3digo %0\",\"Entering %0 code snippet\":\"Ingresando fragmento de c\u00F3digo %0\",\"Entering code snippet\":\"Ingresando fragmento de c\u00F3digo\",\"Leaving code snippet\":\"Abandonando fragmento de c\u00F3digo\",\"Code block\":\"Bloque de c\u00F3digo\",\"Insert image or file\":\"Insertar imagen o archivo\",\"Could not obtain resized image URL.\":\"No se pudo obtener el URL de la imagen redimensionada.\",\"Selecting resized image failed\":\"No se pudo seleccionar la imagen redimensionada\",\"Could not insert image at the current position.\":\"No se pudo insertar la imagen en la posici\u00F3n actual.\",\"Inserting image failed\":\"Error al insertar la imagen\",\"Open file manager\":\"Abrir gestor de archivos\",\"Cannot determine a category for the uploaded file.\":\"No se puede determinar una categor\u00EDa para el archivo subido.\",\"Cannot access default workspace.\":\"No se puede acceder al espacio de trabajo predeterminado.\",\"You have no image editing permissions.\":\"No tienes permiso para editar im\u00E1genes.\",\"Edit image\":\"Editar imagen\",\"Processing the edited image.\":\"Procesando la imagen editada.\",\"Server failed to process the image.\":\"El servidor no pudo procesar la imagen.\",\"Failed to determine category of edited image.\":\"No se pudo determinar la categor\u00EDa de la imagen editada.\",\"Bookmark\":\"Marcador\",\"Edit bookmark\":\"Editar marcador\",\"Remove bookmark\":\"Eliminar marcador\",\"Bookmark name\":\"Nombre del marcador\",\"Enter the bookmark name without spaces.\":\"Introduzca el nombre del marcador sin espacios.\",\"Bookmark must not be empty.\":\"El marcador no debe estar vac\u00EDo.\",\"Bookmark name cannot contain space characters.\":\"El nombre del marcador no puede contener espacios.\",\"Bookmark name already exists.\":\"Ya existe el nombre del marcador.\",\"bookmark widget\":\"M\u00F3dulo interactivo del marcador\",\"Bookmark toolbar\":\"Barra de marcadores\",\"Bookmarks\":\"Marcadores\",\"No bookmarks available.\":\"No hay marcadores disponibles.\",\"Scroll to bookmark\":\"Desplazarse hasta el marcador\",\"Block quote\":\"Bloque de cita\",\"Bold\":\"Negrita\",\"Italic\":\"Cursiva\",\"Underline\":\"Subrayado\",\"Code\":\"C\u00F3digo\",\"Strikethrough\":\"Tachado\",\"Subscript\":\"Sub\u00EDndice\",\"Superscript\":\"Super\u00EDndice\",\"Italic text\":\"Texto en cursiva\",\"Move out of an inline code style\":\"Sale de un estilo de c\u00F3digo en l\u00EDnea\",\"Bold text\":\"Texto en negrita\",\"Underline text\":\"Subraya el texto\",\"Strikethrough text\":\"Tacha el texto\",\"Saving changes\":\"Guardando cambios\",\"Revert autoformatting action\":\"Revierte la acci\u00F3n de formato autom\u00E1tico\",\"Align left\":\"Alinear a la izquierda\",\"Align right\":\"Alinear a la derecha\",\"Align center\":\"Centrar\",\"Justify\":\"Justificar\",\"Text alignment\":\"Alineaci\u00F3n del texto\",\"Text alignment toolbar\":\"Barra de herramientas de alineaci\u00F3n del texto\"},\"getPluralForm\":( n ) => (n != 1)}}", "/**\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 */\nexport default {\"fr\":{\"dictionary\":{\"Words: %0\":\"Mots : %0\",\"Characters: %0\":\"Caract\u00E8res : %0\",\"Widget toolbar\":\"Barre d'outils du widget\",\"Insert paragraph before block\":\"Ins\u00E9rer du texte avant ce bloc\",\"Insert paragraph after block\":\"Ins\u00E9rer du texte apr\u00E8s ce bloc\",\"Press Enter to type after or press Shift + Enter to type before the widget\":\"Appuyez sur la touche Entr\u00E9e pour taper apr\u00E8s ou sur Maj + Entr\u00E9e pour taper avant le widget.\",\"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)\":\"Frappes de touches pouvant \u00EAtre utilis\u00E9es lorsqu'un widget est s\u00E9lectionn\u00E9 (par exemple : image, tableau, etc.)\",\"Insert a new paragraph directly after a widget\":\"Ins\u00E9rer un nouveau paragraphe directement apr\u00E8s un widget\",\"Insert a new paragraph directly before a widget\":\"Ins\u00E9rer un nouveau paragraphe directement avant un widget\",\"Move the caret to allow typing directly before a widget\":\"D\u00E9placez le curseur pour permettre la saisie directement avant un widget\",\"Move the caret to allow typing directly after a widget\":\"D\u00E9placez le curseur pour permettre de taper directement apr\u00E8s un widget\",\"Move focus from an editable area back to the parent widget\":\"D\u00E9placer le focus d'une zone modifiable vers le widget parent\",\"Undo\":\"Annuler\",\"Redo\":\"Restaurer\",\"Upload in progress\":\"T\u00E9l\u00E9chargement en cours\",\"Rich Text Editor\":\"\u00C9diteur de texte enrichi\",\"Edit block\":\"Modifier le bloc\",\"Click to edit block\":\"Cliquer pour modifier le bloc\",\"Drag to move\":\"Faire glisser pour d\u00E9placer\",\"Next\":\"Suivant\",\"Previous\":\"Pr\u00E9cedent\",\"Editor toolbar\":\"Barre d'outils de l'\u00E9diteur\",\"Dropdown toolbar\":\"Barre d'outils dans un menu d\u00E9roulant\",\"Dropdown menu\":\"Menu d\u00E9roulant\",\"Black\":\"Noir\",\"Dim grey\":\"Gris p\u00E2le\",\"Grey\":\"Gris\",\"Light grey\":\"Gris clair\",\"White\":\"Blanc\",\"Red\":\"Rouge\",\"Orange\":\"Orange\",\"Yellow\":\"Jaune\",\"Light green\":\"Vert clair\",\"Green\":\"Vert\",\"Aquamarine\":\"Bleu vert\",\"Turquoise\":\"Turquoise\",\"Light blue\":\"Bleu clair\",\"Blue\":\"Bleu\",\"Purple\":\"Violet\",\"Editor block content toolbar\":\"Barre d'outils du contenu du bloc \u00E9diteur\",\"Editor contextual toolbar\":\"Barre d'outils contextuelle de l'\u00E9diteur\",\"HEX\":\"HEX\",\"No results found\":\"Aucun r\u00E9sultat trouv\u00E9\",\"No searchable items\":\"Aucun \u00E9l\u00E9ment consultable\",\"Editor dialog\":\"Bo\u00EEte de dialogue de l'\u00E9diteur\",\"Close\":\"Fermer\",\"Help Contents. To close this dialog press ESC.\":\"Contenu de l'aide. Pour fermer cette bo\u00EEte de dialogue, appuyez sur ESC.\",\"Below, you can find a list of keyboard shortcuts that can be used in the editor.\":\"Ci-dessous, vous trouverez une liste de raccourcis clavier pouvant \u00EAtre utilis\u00E9s dans l\u2019\u00E9diteur.\",\"(may require <kbd>Fn</kbd>)\":\"(peut n\u00E9cessiter <kbd> Fn </kbd> )\",\"Accessibility\":\"Accessibilit\u00E9\",\"Accessibility help\":\"Aide \u00E0 l'accessibilit\u00E9\",\"Press %0 for help.\":\"Appuyez sur %0 pour obtenir de l'aide.\",\"Move focus in and out of an active dialog window\":\"D\u00E9placer le focus vers et hors d'une fen\u00EAtre de dialogue active\",\"MENU_BAR_MENU_FILE\":\"Fichier\",\"MENU_BAR_MENU_EDIT\":\"\u00C9diter\",\"MENU_BAR_MENU_VIEW\":\"Afficher\",\"MENU_BAR_MENU_INSERT\":\"Ins\u00E9rer\",\"MENU_BAR_MENU_FORMAT\":\"Format\",\"MENU_BAR_MENU_TOOLS\":\"Outils\",\"MENU_BAR_MENU_HELP\":\"Aide\",\"MENU_BAR_MENU_TEXT\":\"Texte\",\"MENU_BAR_MENU_FONT\":\"Police de caract\u00E8re\",\"Editor menu bar\":\"Barre de menu de l'\u00E9diteur\",\"Please enter a valid color (e.g. \\\"ff0000\\\").\":\"Veuillez saisir une couleur valide (par exemple \u00AB\u00A0ff0000\u00A0\u00BB).\",\"Insert table\":\"Ins\u00E9rer un tableau\",\"Insert table layout\":\"Ins\u00E9rer une mise en page de tableau\",\"Header column\":\"Colonne d'ent\u00EAte\",\"Insert column left\":\"Ins\u00E9rer une colonne \u00E0 gauche\",\"Insert column right\":\"Ins\u00E9rer une colonne \u00E0 droite\",\"Delete column\":\"Supprimer la colonne\",\"Select column\":\"S\u00E9lectionner la colonne\",\"Column\":\"Colonne\",\"Header row\":\"Ligne d'ent\u00EAte\",\"Footer row\":\"Ligne de pied de page\",\"Insert row below\":\"Ins\u00E9rer une ligne en-dessous\",\"Insert row above\":\"Ins\u00E9rer une ligne au-dessus\",\"Delete row\":\"Supprimer la ligne\",\"Select row\":\"S\u00E9lectionner la ligne\",\"Row\":\"Ligne\",\"Merge cell up\":\"Fusionner la cellule au-dessus\",\"Merge cell right\":\"Fusionner la cellule \u00E0 droite\",\"Merge cell down\":\"Fusionner la cellule en-dessous\",\"Merge cell left\":\"Fusionner la cellule \u00E0 gauche\",\"Split cell vertically\":\"Scinder la cellule verticalement\",\"Split cell horizontally\":\"Scinder la cellule horizontalement\",\"Merge cells\":\"Fusionner les cellules\",\"Table toolbar\":\"Barre d'outils des tableaux\",\"Table properties\":\"Propri\u00E9t\u00E9s du tableau\",\"Cell properties\":\"Propri\u00E9t\u00E9s de la cellule\",\"Cell type\":\"Type de cellule\",\"Data cell\":\"Cellule de donn\u00E9es\",\"Header cell\":\"Cellule d'en-t\u00EAte\",\"Column header\":\"En-t\u00EAte de colonne\",\"Row header\":\"En-t\u00EAte de ligne\",\"Border\":\"Bordure\",\"Style\":\"Style\",\"Width\":\"Largeur\",\"Height\":\"Hauteur\",\"Color\":\"Couleur\",\"Background\":\"Fond\",\"Padding\":\"Remplissage pour a\u00E9rer le texte\",\"Dimensions\":\"Dimensions\",\"Table cell text alignment\":\"Alignement du texte de la cellule\",\"Table Alignment\":\"Alignement des tableaux\",\"Horizontal text alignment toolbar\":\"Barre d'outils pour modifier l'alignement horizontal du texte\",\"Vertical text alignment toolbar\":\"Barre d'outils pour modifier l'alignement vertical du texte\",\"Table alignment toolbar\":\"Barre d'outils pour modifier l'alignement du tableau\",\"None\":\"Aucun\",\"Solid\":\"Continu\",\"Dotted\":\"Pointill\u00E9s\",\"Dashed\":\"Tirets\",\"Double\":\"Double\",\"Groove\":\"Rainur\u00E9\",\"Ridge\":\"Relief\",\"Inset\":\"Relief int\u00E9rieur\",\"Outset\":\"Relief ext\u00E9rieur\",\"Align cell text to the left\":\"Aligner la cellule \u00E0 gauche\",\"Align cell text to the center\":\"Aligner la cellule au centre\",\"Align cell text to the right\":\"Aligner la cellule \u00E0 droite\",\"Justify cell text\":\"Justifier le contenu de la cellule\",\"Align cell text to the top\":\"Aligner le texte en haut\",\"Align cell text to the middle\":\"Aligner le texte au milieu\",\"Align cell text to the bottom\":\"Aligner le texte en bas\",\"Align table to the left with text wrapping\":\"Aligner le tableau \u00E0 gauche avec habillage de texte\",\"Center table with no text wrapping\":\"Tableau centr\u00E9 sans habillage de texte\",\"Align table to the right with text wrapping\":\"Aligner le tableau \u00E0 droite avec habillage de texte\",\"Align table to the left with no text wrapping\":\"Aligner le tableau \u00E0 gauche sans habillage de texte\",\"Align table to the right with no text wrapping\":\"Aligner le tableau \u00E0 droite sans habillage de texte\",\"The color is invalid. Try \\\"#FF0000\\\" or \\\"rgb(255,0,0)\\\" or \\\"red\\\".\":\"La couleur est invalide. Essayez \\\"#FF0000\\\" ou \\\"rgb(255,0,0)\\\" ou \\\"red\\\".\",\"The value is invalid. Try \\\"10px\\\" or \\\"2em\\\" or simply \\\"2\\\".\":\"La valeur est invalide. Essayez \\\"10px\\\" ou \\\"2em\\\" ou simplement \\\"2\\\".\",\"Enter table caption\":\"Saisir la l\u00E9gende du tableau\",\"Keystrokes that can be used in a table cell\":\"Frappes de touches pouvant \u00EAtre utilis\u00E9es dans une cellule de tableau\",\"Move the selection to the next cell\":\"D\u00E9placer la s\u00E9lection vers la cellule suivante\",\"Move the selection to the previous cell\":\"D\u00E9placer la s\u00E9lection vers la cellule pr\u00E9c\u00E9dente\",\"Insert a new table row (when in the last cell of a table)\":\"Ins\u00E9rer une nouvelle ligne de tableau (dans la derni\u00E8re cellule d'un tableau)\",\"Navigate through the table\":\"Naviguer dans le tableau\",\"Table\":\"Tableau\",\"Table layout\":\"Mise en page de tableau\",\"Layout table\":\"Tableau de mise en page\",\"Content table\":\"Tableau de contenu\",\"Choose table type\":\"Choisir le type de tableau\",\"Table type\":\"Type de tableau\",\"Table type options\":\"Options de type de tableau\",\"Styles\":\"Styles\",\"Multiple styles\":\"Styles multiples\",\"Block styles\":\"Styles de bloc\",\"Text styles\":\"Styles de texte\",\"Special characters\":\"Caract\u00E8res sp\u00E9ciaux\",\"Category\":\"Cat\u00E9gorie\",\"All\":\"Tous\",\"Arrows\":\"Fl\u00E8ches\",\"Currency\":\"Devise\",\"Latin\":\"Latin\",\"Mathematical\":\"Math\u00E9matique\",\"Text\":\"Texte\",\"leftwards simple arrow\":\"fl\u00E8che simple vers la gauche\",\"rightwards simple arrow\":\"fl\u00E8che simple vers la droite\",\"upwards simple arrow\":\"fl\u00E8che simple vers le haut\",\"downwards simple arrow\":\"fl\u00E8che simple vers le bas\",\"leftwards double arrow\":\"Double fl\u00E8che vers la gauche\",\"rightwards double arrow\":\"Double fl\u00E8che vers la droite\",\"upwards double arrow\":\"Double fl\u00E8che vers le haut\",\"downwards double arrow\":\"Double fl\u00E8che vers le bas\",\"leftwards dashed arrow\":\"Fl\u00E8che en pointill\u00E9s vers la gauche\",\"rightwards dashed arrow\":\"Fl\u00E8che en pointill\u00E9s vers la droite\",\"upwards dashed arrow\":\"Fl\u00E8che en pointill\u00E9s vers le haut\",\"downwards dashed arrow\":\"Fl\u00E8che en pointill\u00E9s vers le bas\",\"leftwards arrow to bar\":\"Fl\u00E8che vers la gauche avec barre de fin\",\"rightwards arrow to bar\":\"Fl\u00E8che vers la droite avec barre de fin\",\"upwards arrow to bar\":\"Fl\u00E8che vers le haut avec barre de fin\",\"downwards arrow to bar\":\"Fl\u00E8che vers le bas avec barre de fin\",\"up down arrow with base\":\"Fl\u00E8che haut et bas avec barre de fin\",\"back with leftwards arrow above\":\"Pr\u00E9c\u00E9dent avec fl\u00E8che vers la gauche\",\"end with leftwards arrow above\":\"Fin avec fl\u00E8che vers la gauche\",\"on with exclamation mark with left right arrow above\":\"Allum\u00E9 avec fl\u00E8ches vers la gauche et la droite\",\"soon with rightwards arrow above\":\"Bient\u00F4t avec fl\u00E8che vers la droite\",\"top with upwards arrow above\":\"Haut avec fl\u00E8che vers le haut\",\"Dollar sign\":\"Dollar\",\"Euro sign\":\"Euro\",\"Yen sign\":\"Yen\",\"Pound sign\":\"Livre sterling\",\"Cent sign\":\"Centime\",\"Euro-currency sign\":\"Symbole mon\u00E9taire de l'euro\",\"Colon sign\":\"Deux points\",\"Cruzeiro sign\":\"Cruzeiro\",\"French franc sign\":\"Franc fran\u00E7ais\",\"Lira sign\":\"Lire\",\"Currency sign\":\"Symbole mon\u00E9taire\",\"Bitcoin sign\":\"Bitcoin\",\"Mill sign\":\"Moulin\",\"Naira sign\":\"Naira\",\"Peseta sign\":\"Peseta\",\"Rupee sign\":\"Roupie\",\"Won sign\":\"Won\",\"New sheqel sign\":\"Shekel\",\"Dong sign\":\"Dong\",\"Kip sign\":\"Kip\",\"Tugrik sign\":\"Tugrik\",\"Drachma sign\":\"Drachme\",\"German penny sign\":\"Pfennig\",\"Peso sign\":\"Peso\",\"Guarani sign\":\"Guarani\",\"Austral sign\":\"Austral\",\"Hryvnia sign\":\"Hryvnia\",\"Cedi sign\":\"C\u00E9di\",\"Livre tournois sign\":\"Livre tournois\",\"Spesmilo sign\":\"Spesmilo\",\"Tenge sign\":\"Tenge\",\"Indian rupee sign\":\"Roupie indienne\",\"Turkish lira sign\":\"Lire turque\",\"Nordic mark sign\":\"Mark nordique\",\"Manat sign\":\"Manat\",\"Ruble sign\":\"Rouble\",\"Latin capital letter a with macron\":\"A barre majuscule\",\"Latin small letter a with macron\":\"A barre minuscule\",\"Latin capital letter a with breve\":\"A bref majuscule\",\"Latin small letter a with breve\":\"A bref minuscule\",\"Latin capital letter a with ogonek\":\"A ogonek majuscule\",\"Latin small letter a with ogonek\":\"A ogonek minuscule\",\"Latin capital letter c with acute\":\"C accent aigu majuscule\",\"Latin small letter c with acute\":\"C accent aigu minuscule\",\"Latin capital letter c with circumflex\":\"C circonflexe majuscule\",\"Latin small letter c with circumflex\":\"C circonflexe minuscule\",\"Latin capital letter c with dot above\":\"C point suscrit majuscule\",\"Latin small letter c with dot above\":\"C point suscrit minuscule\",\"Latin capital letter c with caron\":\"C caron majuscule\",\"Latin small letter c with caron\":\"C caron minuscule\",\"Latin capital letter d with caron\":\"D caron majuscule\",\"Latin small letter d with caron\":\"C caron minuscule\",\"Latin capital letter d with stroke\":\"D barr\u00E9 majuscule\",\"Latin small letter d with stroke\":\"D barr\u00E9 minuscule\",\"Latin capital letter e with macron\":\"E macron majuscule\",\"Latin small letter e with macron\":\"E macron minuscule\",\"Latin capital letter e with breve\":\"E bref majuscule\",\"Latin small letter e with breve\":\"E bref minuscule\",\"Latin capital letter e with dot above\":\"E point suscrit majuscule\",\"Latin small letter e with dot above\":\"E point suscrit minuscule\",\"Latin capital letter e with ogonek\":\"E ogonek majuscule\",\"Latin small letter e with ogonek\":\"E ogonek minuscule\",\"Latin capital letter e with caron\":\"E caron majuscule\",\"Latin small letter e with caron\":\"E caron minuscule\",\"Latin capital letter g with circumflex\":\"G accent circonflexe majuscule\",\"Latin small letter g with circumflex\":\"G accent circonflexe minuscule\",\"Latin capital letter g with breve\":\"G bref majuscule\",\"Latin small letter g with breve\":\"G bref minuscule\",\"Latin capital letter g with dot above\":\"G point suscrit majuscule\",\"Latin small letter g with dot above\":\"G point suscrit minuscule\",\"Latin capital letter g with cedilla\":\"G c\u00E9dille majuscule\",\"Latin small letter g with cedilla\":\"G c\u00E9dille minuscule\",\"Latin capital letter h with circumflex\":\"H accent circonflexe majuscule\",\"Latin small letter h with circumflex\":\"H accent circonflexe minuscule\",\"Latin capital letter h with stroke\":\"H barr\u00E9 majuscule\",\"Latin small letter h with stroke\":\"H barr\u00E9 minuscule\",\"Latin capital letter i with tilde\":\"I tilde majuscule\",\"Latin small letter i with tilde\":\"I tilde minuscule\",\"Latin capital letter i with macron\":\"I macron majuscule\",\"Latin small letter i with macron\":\"I macron minuscule\",\"Latin capital letter i with breve\":\"I bref majuscule\",\"Latin small letter i with breve\":\"I bref minuscule\",\"Latin capital letter i with ogonek\":\"I ogonek majuscule\",\"Latin small letter i with ogonek\":\"I ogonek minuscule\",\"Latin capital letter i with dot above\":\"I point suscrit majuscule\",\"Latin small letter dotless i\":\"I sans point minuscule\",\"Latin capital ligature ij\":\"Digramme soud\u00E9 IJ majuscule\",\"Latin small ligature ij\":\"Digramme soud\u00E9 IJ minuscule\",\"Latin capital letter j with circumflex\":\"J accent circonflexe majuscule\",\"Latin small letter j with circumflex\":\"J accent circonflexe minuscule\",\"Latin capital letter k with cedilla\":\"K c\u00E9dille majuscule\",\"Latin small letter k with cedilla\":\"K c\u00E9dille minuscule\",\"Latin small letter kra\":\"Kra minuscule\",\"Latin capital letter l with acute\":\"L accent aigu majuscule\",\"Latin small letter l with acute\":\"L accent aigu minuscule\",\"Latin capital letter l with cedilla\":\"L c\u00E9dille majuscule\",\"Latin small letter l with cedilla\":\"L c\u00E9dille minuscule\",\"Latin capital letter l with caron\":\"L caron majuscule\",\"Latin small letter l with caron\":\"L caron minuscule\",\"Latin capital letter l with middle dot\":\"L point m\u00E9dian majuscule\",\"Latin small letter l with middle dot\":\"L point m\u00E9dian minuscule\",\"Latin capital letter l with stroke\":\"L barr\u00E9 majuscule\",\"Latin small letter l with stroke\":\"L barr\u00E9 minuscule\",\"Latin capital letter n with acute\":\"N accent aigu majuscule\",\"Latin small letter n with acute\":\"N accent aigu minuscule\",\"Latin capital letter n with cedilla\":\"N c\u00E9dille majuscule\",\"Latin small letter n with cedilla\":\"N c\u00E9dille minuscule\",\"Latin capital letter n with caron\":\"N caron majuscule\",\"Latin small letter n with caron\":\"N caron minuscule\",\"Latin small letter n preceded by apostrophe\":\"Apostrophe N minuscule\",\"Latin capital letter eng\":\"Eng majuscule\",\"Latin small letter eng\":\"Eng minuscule\",\"Latin capital letter o with macron\":\"O macron majuscule\",\"Latin small letter o with macron\":\"O macron minuscule\",\"Latin capital letter o with breve\":\"O bref majuscule\",\"Latin small letter o with breve\":\"O bref minuscule\",\"Latin capital letter o with double acute\":\"O double accent aigu majuscule\",\"Latin small letter o with double acute\":\"O double accent aigu minuscule\",\"Latin capital ligature oe\":\"O-E entrelac\u00E9 majuscule\",\"Latin small ligature oe\":\"O-E entrelac\u00E9 minuscule\",\"Latin capital letter r with acute\":\"R accent aigu majuscule\",\"Latin small letter r with acute\":\"R accent aigu minuscule\",\"Latin capital letter r with cedilla\":\"R c\u00E9dille majuscule\",\"Latin small letter r with cedilla\":\"R c\u00E9dille minuscule\",\"Latin capital letter r with caron\":\"R caron majuscule\",\"Latin small letter r with caron\":\"R caron minuscule\",\"Latin capital letter s with acute\":\"S accent aigu majuscule\",\"Latin small letter s with acute\":\"S accent aigu minuscule\",\"Latin capital letter s with circumflex\":\"S circonflexe majuscule\",\"Latin small letter s with circumflex\":\"S circonflexe minuscule\",\"Latin capital letter s with cedilla\":\"S c\u00E9dille majuscule\",\"Latin small letter s with cedilla\":\"S c\u00E9dille minuscule\",\"Latin capital letter s with caron\":\"S caron majuscule\",\"Latin small letter s with caron\":\"S caron minuscule\",\"Latin capital letter t with cedilla\":\"T c\u00E9dille majuscule\",\"Latin small letter t with cedilla\":\"T c\u00E9dille minuscule\",\"Latin capital letter t with caron\":\"T caron majuscule\",\"Latin small letter t with caron\":\"T caron minuscule\",\"Latin capital letter t with stroke\":\"T barr\u00E9 majuscule\",\"Latin small letter t with stroke\":\"T barr\u00E9 minuscule\",\"Latin capital letter u with tilde\":\"U tilde majuscule\",\"Latin small letter u with tilde\":\"U tilde minuscule\",\"Latin capital letter u with macron\":\"U macron majuscule\",\"Latin small letter u with macron\":\"U macron minuscule\",\"Latin capital letter u with breve\":\"U bref majuscule\",\"Latin small letter u with breve\":\"U bref minuscule\",\"Latin capital letter u with ring above\":\"U rond en chef majuscule\",\"Latin small letter u with ring above\":\"U rond en chef minuscule\",\"Latin capital letter u with double acute\":\"U double accent aigu majuscule\",\"Latin small letter u with double acute\":\"U double accent aigu minuscule\",\"Latin capital letter u with ogonek\":\"U ogonek majuscule\",\"Latin small letter u with ogonek\":\"U ogonek minuscule\",\"Latin capital letter w with circumflex\":\"W circonflexe majuscule\",\"Latin small letter w with circumflex\":\"W circonflexe minuscule\",\"Latin capital letter y with circumflex\":\"Y circonflexe majuscule\",\"Latin small letter y with circumflex\":\"Y circonflexe minuscule\",\"Latin capital letter y with diaeresis\":\"Y tr\u00E9ma majuscule\",\"Latin capital letter z with acute\":\"Z accent circonflexe majuscule\",\"Latin small letter z with acute\":\"Z accent circonflexe minuscule\",\"Latin capital letter z with dot above\":\"Z point suscrit majuscule\",\"Latin small letter z with dot above\":\"Z point suscrit minuscule\",\"Latin capital letter z with caron\":\"Z caron majuscule\",\"Latin small letter z with caron\":\"Z caron minuscule\",\"Latin small letter long s\":\"S long minuscule\",\"Less-than sign\":\"Signe inf\u00E9rieur\",\"Greater-than sign\":\"Signe sup\u00E9rieur\",\"Less-than or equal to\":\"Signe inf\u00E9rieur ou \u00E9gal\",\"Greater-than or equal to\":\"Signe sup\u00E9rieur ou \u00E9gal\",\"En dash\":\"Tiret\",\"Em dash\":\"Tiret long\",\"Macron\":\"Macron\",\"Overline\":\"Macron long\",\"Degree sign\":\"Degr\u00E9\",\"Minus sign\":\"Moins\",\"Plus-minus sign\":\"Plus ou moins\",\"Division sign\":\"Division\",\"Fraction slash\":\"Fraction\",\"Multiplication sign\":\"Multiplication\",\"Latin small letter f with hook\":\"Fonction\",\"Integral\":\"Int\u00E9grale\",\"N-ary summation\":\"Somme\",\"Infinity\":\"Infini\",\"Square root\":\"Racine carr\u00E9e\",\"Tilde operator\":\"Tilde\",\"Approximately equal to\":\"Environ \u00E9gal \u00E0\",\"Almost equal to\":\"Presque \u00E9gal \u00E0\",\"Not equal to\":\"Diff\u00E9rent de\",\"Identical to\":\"Identique \u00E0\",\"Element of\":\"Appartient \u00E0\",\"Not an element of\":\"N'appartient pas \u00E0\",\"Contains as member\":\"Contient\",\"N-ary product\":\"Produit\",\"Logical and\":\"Et logique\",\"Logical or\":\"Ou logique\",\"Not sign\":\"N\u00E9gation logique\",\"Intersection\":\"Intersection\",\"Union\":\"Union\",\"Partial differential\":\"Partiellement diff\u00E9rent\",\"For all\":\"Pour tout\",\"There exists\":\"Existe\",\"Empty set\":\"\u00C9l\u00E9ment vide\",\"Nabla\":\"Nabla\",\"Asterisk operator\":\"Ast\u00E9risque\",\"Proportional to\":\"Proportionnel \u00E0\",\"Angle\":\"Angle\",\"Vulgar fraction one quarter\":\"Un quart\",\"Vulgar fraction one half\":\"Un demi\",\"Vulgar fraction three quarters\":\"Trois quarts\",\"Single left-pointing angle quotation mark\":\"Guillemet simple vers la gauche\",\"Single right-pointing angle quotation mark\":\"Guillemet simple vers la droite\",\"Left-pointing double angle quotation mark\":\"Guillemet double vers la gauche\",\"Right-pointing double angle quotation mark\":\"Guillemet double vers la droite\",\"Left single quotation mark\":\"Guillemet-apostrophe culbut\u00E9\",\"Right single quotation mark\":\"Guillemet-apostrophe\",\"Left double quotation mark\":\"Guillemet-apostrophe double culbut\u00E9\",\"Right double quotation mark\":\"Guillemet-apostrophe double\",\"Single low-9 quotation mark\":\"Guillemet-virgule inf\u00E9rieur\",\"Double low-9 quotation mark\":\"Guillemet-virgule double inf\u00E9rieur\",\"Inverted exclamation mark\":\"Point d'exclamation invers\u00E9\",\"Inverted question mark\":\"Point d'interrogation invers\u00E9\",\"Two dot leader\":\"Deux points\",\"Horizontal ellipsis\":\"Trois points\",\"Double dagger\":\"Croix de Lorraine\",\"Per mille sign\":\"Pour mille\",\"Per ten thousand sign\":\"Pour dix milles\",\"Double exclamation mark\":\"Double point d'exclamation\",\"Question exclamation mark\":\"Point d'interrogation et exclamation\",\"Exclamation question mark\":\"Point exclamation et question\",\"Double question mark\":\"Double point d'interrogation\",\"Copyright sign\":\"Copyright\",\"Registered sign\":\"Registered\",\"Trade mark sign\":\"Marque d\u00E9pos\u00E9e\",\"Section sign\":\"Paragraphe\",\"Paragraph sign\":\"Fin de paragraphe\",\"Reversed paragraph sign\":\"Fin de paragraphe invers\u00E9\",\"Show source\":\"Afficher la source\",\"Show blocks\":\"Afficher les blocs\",\"Select all\":\"S\u00E9lectionner tout\",\"Disable editing\":\"D\u00E9sactiver la modification\",\"Enable editing\":\"Activer l'\u00E9dition\",\"Disable inline editing\":\"D\u00E9sactiver la modification en ligne\",\"Enable inline editing\":\"Activer la modification en ligne\",\"Disable block editing\":\"D\u00E9sactiver la modification par blocs\",\"Enable block editing\":\"Activer la modification par blocs\",\"Previous editable region\":\"R\u00E9gion \u00E9ditable pr\u00E9c\u00E9dente\",\"Next editable region\":\"R\u00E9gion \u00E9ditable suivante\",\"Navigate editable regions\":\"Naviguer vers\",\"Remove Format\":\"Enlever le format\",\"Page break\":\"S\u00E9paration de page\",\"media widget\":\"Widget m\u00E9dia\",\"Media URL\":\"URL de m\u00E9dia\",\"Paste the media URL in the input.\":\"Coller l'URL du m\u00E9dia\",\"Tip: Paste the URL into the content to embed faster.\":\"Astuce : Copier l'URL du m\u00E9dia dans le contenu pour l'ins\u00E9rer plus rapidement\",\"The URL must not be empty.\":\"L'URL ne doit pas \u00EAtre vide.\",\"This media URL is not supported.\":\"Cette URL de m\u00E9dia n'est pas support\u00E9e.\",\"Insert media\":\"Ins\u00E9rer un m\u00E9dia\",\"Media embed\":\"Int\u00E9gration de m\u00E9dias\",\"Media\":\"M\u00E9dia\",\"Media toolbar\":\"Barre d'outils des m\u00E9dias\",\"Open media in new tab\":\"Ouvrir le m\u00E9dia dans un nouvel onglet\",\"Left aligned media\":\"M\u00E9dias align\u00E9s \u00E0 gauche\",\"Centered media\":\"M\u00E9dias align\u00E9s au centre\",\"Right aligned media\":\"M\u00E9dias align\u00E9s \u00E0 droite\",\"Resize media\":\"Redimensionner le m\u00E9dia\",\"Resize media to %0\":\"Redimensionner le m\u00E9dia \u00E0 %0\",\"Resize media to the original size\":\"Redimensionner le m\u00E9dia \u00E0 sa taille d'origine\",\"Resize media (in %0)\":\"Redimensionner les m\u00E9dias (dans %0)\",\"Custom media size\":\"Format de m\u00E9dia personnalis\u00E9\",\"Media resize list\":\"Liste des redimensionnement des m\u00E9dias\",\"Media Resize\":\"Redimensionnement des m\u00E9dias\",\"Numbered List\":\"Liste num\u00E9rot\u00E9e\",\"Bulleted List\":\"Liste \u00E0 puces\",\"To-do List\":\"Liste de t\u00E2ches\",\"Bulleted list styles toolbar\":\"Barre d'outils des styles de liste \u00E0 puce\",\"Numbered list styles toolbar\":\"Barre d'outils des styles de liste num\u00E9rot\u00E9e\",\"Toggle the disc list style\":\"Activer / d\u00E9sactiver le style de liste \\\"disque\\\"\",\"Toggle the circle list style\":\"Activer / d\u00E9sactiver le style de liste \\\"cercle\\\"\",\"Toggle the square list style\":\"Activer / d\u00E9sactiver le style de liste \\\"carr\u00E9\\\"\",\"Toggle the decimal list style\":\"Activer / d\u00E9sactiver le style de liste \\\"chiffres\\\"\",\"Toggle the decimal with leading zero list style\":\"Activer / d\u00E9sactiver le style de liste \\\"chiffres de m\u00EAmes longueurs\\\"\",\"Toggle the lower\u2013roman list style\":\"Activer / d\u00E9sactiver le style de liste \\\"chiffres romains en minuscules\\\"\",\"Toggle the upper\u2013roman list style\":\"Activer / d\u00E9sactiver le style de liste \\\"chiffres romains en majuscules\\\"\",\"Toggle the lower\u2013latin list style\":\"Activer / d\u00E9sactiver le style de liste \\\"lettres minuscules\\\"\",\"Toggle the upper\u2013latin list style\":\"Activer / d\u00E9sactiver le style de liste \\\"lettres majuscules\\\"\",\"Toggle the arabic-indic list style\":\"Activer/d\u00E9sactiver le style de liste arabo-indien\",\"Arabic-indic\":\"Arabo-indien\",\"Disc\":\"Disque\",\"Circle\":\"Cercle\",\"Square\":\"Carr\u00E9\",\"Decimal\":\"Chiffres\",\"Decimal with leading zero\":\"Chiffres avec des z\u00E9ros suppl\u00E9mentaire\",\"Lower\u2013roman\":\"Chiffres romains en minuscules\",\"Upper-roman\":\"Chiffres romains en majuscules\",\"Lower-latin\":\"Lettres minuscules\",\"Upper-latin\":\"Lettres majuscules\",\"List properties\":\"Liste des propri\u00E9t\u00E9s\",\"Start at\":\"Commencer \u00E0\",\"Invalid start index value.\":\"Valeur d'index de d\u00E9part invalide.\",\"Start index must be greater than 0.\":\"L'indice de d\u00E9part doit \u00EAtre sup\u00E9rieur \u00E0 0.\",\"Reversed order\":\"Ordre invers\u00E9\",\"Keystrokes that can be used in a list\":\"Frappes de touches pouvant \u00EAtre utilis\u00E9es dans une liste\",\"Increase list item indent\":\"Augmenter le retrait des \u00E9l\u00E9ments de liste\",\"Decrease list item indent\":\"Diminuer le retrait des \u00E9l\u00E9ments de liste\",\"Entering a to-do list\":\"Saisie d'une liste de t\u00E2ches\",\"Leaving a to-do list\":\"Laisser une liste de t\u00E2ches\",\"Unlink\":\"Supprimer le lien\",\"Link\":\"Lien\",\"Link URL\":\"URL du lien\",\"Link URL must not be empty.\":\"L'URL du lien ne doit pas \u00EAtre vide.\",\"Link image\":\"Lien d'image\",\"Link properties\":\"Propri\u00E9t\u00E9s du lien\",\"Edit link\":\"Modifier le lien\",\"Open link in new tab\":\"Ouvrir le lien dans un nouvel onglet\",\"Open in a new tab\":\"Ouvrir dans un nouvel onglet\",\"Downloadable\":\"Fichier t\u00E9l\u00E9chargeable\",\"Create link\":\"Cr\u00E9er un lien\",\"Move out of a link\":\"Sortir d'un lien\",\"Displayed text\":\"Texte affich\u00E9\",\"No links available\":\"Aucun lien disponible\",\"This link has no URL\":\"Ce lien ne poss\u00E8de aucune URL\",\"Language\":\"Langue\",\"Choose language\":\"Choisir la langue\",\"Remove language\":\"Supprimer la langue\",\"Increase indent\":\"Augmenter le retrait\",\"Decrease indent\":\"Diminuer le retrait\",\"image widget\":\"Objet image\",\"In line\":\"Align\u00E9\",\"Side image\":\"Image lat\u00E9rale\",\"Full size image\":\"Image taille r\u00E9elle\",\"Left aligned image\":\"Image align\u00E9e \u00E0 gauche\",\"Centered image\":\"Image centr\u00E9e\",\"Right aligned image\":\"Image align\u00E9e \u00E0 droite\",\"Change image text alternative\":\"Changer le texte alternatif \u00E0 l\u2019image\",\"Text alternative\":\"Texte alternatif\",\"Enter image caption\":\"Saisir la l\u00E9gende de l\u2019image\",\"Insert image\":\"Ins\u00E9rer une image\",\"Replace image\":\"Remplacer l'image\",\"Upload from computer\":\"T\u00E9l\u00E9charger depuis l'ordinateur\",\"Replace from computer\":\"Remplacer depuis l'ordinateur\",\"Upload image from computer\":\"T\u00E9l\u00E9charger une image depuis l'ordinateur\",\"Image from computer\":\"Image provenant d'un ordinateur\",\"From computer\":\"Depuis l'ordinateur\",\"Replace image from computer\":\"Remplacer l'image depuis l'ordinateur\",\"Upload failed\":\"\u00C9chec de l'envoi\",\"You have no image upload permissions.\":\"Vous n'\u00EAtes pas autoris\u00E9 \u00E0 t\u00E9l\u00E9charger des images.\",\"Image toolbar\":\"Barre d'outils des images\",\"Resize image\":\"Redimensionner l'image\",\"Resize image to %0\":\"Redimensionner \u00E0 %0\",\"Resize image to the original size\":\"Appliquer les dimensions d'origine\",\"Resize image (in %0)\":\"Redimensionner l'image (en %0)\",\"Custom image size\":\"Taille d'image personnalis\u00E9e\",\"Image resize list\":\"Liste des tailles d'images\",\"Insert image via URL\":\"Ins\u00E9rer une image \u00E0 partir d'une URL\",\"Insert via URL\":\"Ins\u00E9rer par URL\",\"Image via URL\":\"Image par URL\",\"Via URL\":\"Par URL\",\"Update image URL\":\"Modifier l'URL de l'image\",\"Caption for the image\":\"L\u00E9gende de l'image\",\"Caption for image: %0\":\"L\u00E9gende de l'image\u00A0: %0\",\"Uploading image\":\"T\u00E9l\u00E9chargement de l'image\",\"Image upload complete\":\"T\u00E9l\u00E9chargement de l'image termin\u00E9\",\"Error during image upload\":\"Une erreur s'est produite lors du t\u00E9l\u00E9chargement de l'image.\",\"Image\":\"Image\",\"Image Resize\":\"Redimensionnement de l'image\",\"Text Alternative\":\"Alternative textuelle\",\"HTML object\":\"Objet HTML\",\"Insert HTML\":\"Ins\u00E9rer du code HTML\",\"HTML snippet\":\"Code HTML\",\"Paste raw HTML here...\":\"Collez le code HTML brut ici...\",\"Edit source\":\"Modifier la source\",\"Save changes\":\"Enregistrer les changements\",\"No preview available\":\"Aucun aper\u00E7u disponible\",\"Empty snippet content\":\"Aucun contenu pour ce fragment de code\",\"Horizontal line\":\"Ligne horizontale\",\"Yellow marker\":\"Marqueur jaune\",\"Green marker\":\"Marqueur vert\",\"Pink marker\":\"Marqueur rose\",\"Blue marker\":\"Marqueur bleu\",\"Red pen\":\"Crayon rouge\",\"Green pen\":\"Crayon vert\",\"Remove highlight\":\"Enlever le surlignage\",\"Highlight\":\"Surlignage\",\"Text highlight toolbar\":\"Barre d'outils du surlignage\",\"Heading\":\"En-t\u00EAte\",\"Choose heading\":\"Choisir l'en-t\u00EAte\",\"Heading 1\":\"Titre 1\",\"Heading 2\":\"Titre 2\",\"Heading 3\":\"Titre 3\",\"Heading 4\":\"Titre 4\",\"Heading 5\":\"Titre 5\",\"Heading 6\":\"Titre 6\",\"Type your title\":\"Rentrer votre titre\",\"Type or paste your content here.\":\"Noter ou coller votre contenu ici\",\"Enter fullscreen mode\":\"Acc\u00E9der au mode plein \u00E9cran\",\"Leave fullscreen mode\":\"Quitter le mode plein \u00E9cran\",\"Fullscreen mode\":\"Mode plein \u00E9cran\",\"Toggle fullscreen mode\":\"Activer/d\u00E9sactiver le mode plein \u00E9cran\",\"Document outline\":\"Plan du document\",\"Connected users\":\"Utilisateurs connect\u00E9s\",\"Show left sidebar\":\"Afficher la barre lat\u00E9rale gauche\",\"Hide left sidebar\":\"Masquer la barre lat\u00E9rale gauche\",\"Toggle sidebar\":\"Basculer vers la barre lat\u00E9rale\",\"Font Size\":\"Taille de police\",\"Tiny\":\"Minuscule\",\"Small\":\"Petit\",\"Big\":\"Grand\",\"Huge\":\"Enorme\",\"Font Family\":\"Police\",\"Default\":\"Par d\u00E9faut\",\"Font Color\":\"Couleur de police\",\"Font Background Color\":\"Couleur d'arri\u00E8re-plan\",\"Document colors\":\"Couleurs du document\",\"Find and replace\":\"Rechercher et remplacer\",\"Find in text\u2026\":\"Rechercher dans le texte...\",\"Find\":\"Rechercher\",\"Previous result\":\"R\u00E9sultat pr\u00E9c\u00E9dent\",\"Next result\":\"R\u00E9sultat suivant\",\"Replace\":\"Remplacer\",\"Replace all\":\"Remplacer tout\",\"Match case\":\"Sensible \u00E0 la casse\",\"Whole words only\":\"Mots entiers uniquement\",\"Replace with\u2026\":\"Remplacer par ...\",\"Text to find must not be empty.\":\"L'expression \u00E0 rechercher ne doit pas \u00EAtre vide\",\"Tip: Find some text first in order to replace it.\":\"Astuce : rechercher une expression afin de la remplacer\",\"Advanced options\":\"Options avanc\u00E9es\",\"Find in the document\":\"Rechercher dans le document\",\"Insert a soft break (a <code>&lt;br&gt;</code> element)\":\"Ins\u00E9rer un saut progressif (un \u00E9l\u00E9ment <code> <br> </code> )\",\"Insert a hard break (a new paragraph)\":\"Ins\u00E9rer une pause (un nouveau paragraphe)\",\"Emoji\":\"\u00C9moji\",\"Show all emoji...\":\"Afficher tous les \u00E9mojis...\",\"Find an emoji (min. 2 characters)\":\"Trouver un \u00E9moji (min. deux caract\u00E8res)\",\"No emojis were found matching \\\"%0\\\".\":\"Aucun \u00E9moji correspondant \u00E0 \u00AB %0\u00A0\u00BB n'a \u00E9t\u00E9 trouv\u00E9.\",\"Keep on typing to see the emoji.\":\"Continuez \u00E0 taper pour voir l'\u00E9moji.\",\"The query must contain at least two characters.\":\"La requ\u00EAte doit contenir au moins deux caract\u00E8res.\",\"Smileys & Expressions\":\"Smileys et expressions\",\"Gestures & People\":\"Gestes et personnes\",\"Animals & Nature\":\"Animaux et nature\",\"Food & Drinks\":\"Nourriture et boissons\",\"Travel & Places\":\"Voyages et lieux\",\"Activities\":\"Activit\u00E9s\",\"Objects\":\"Objets\",\"Symbols\":\"Symboles\",\"Flags\":\"Drapeaux\",\"Select skin tone\":\"S\u00E9lectionner la teinte de peau\",\"Default skin tone\":\"Teinte de peau par d\u00E9faut\",\"Light skin tone\":\"Teint clair\",\"Medium Light skin tone\":\"Teint moyennement clair\",\"Medium skin tone\":\"Teint moyen\",\"Medium Dark skin tone\":\"Teint moyennement fonc\u00E9\",\"Dark skin tone\":\"Teint fonc\u00E9\",\"Emoji picker\":\"S\u00E9lecteur d'\u00E9mojis\",\"Cancel\":\"Annuler\",\"Clear\":\"Effacer\",\"Remove color\":\"Enlever la couleur\",\"Restore default\":\"Restaurer par d\u00E9faut\",\"Save\":\"Enregistrer\",\"Show more items\":\"Montrer plus d'\u00E9l\u00E9ments\",\"%0 of %1\":\"%0 sur %1\",\"Cannot upload file:\":\"Envoi du fichier \u00E9chou\u00E9 :\",\"Rich Text Editor. Editing area: %0\":\"\u00C9diteur de texte enrichi. Zone d'\u00E9dition\u00A0: %0\",\"Insert with file manager\":\"Ins\u00E9rer avec le gestionnaire de fichiers\",\"Replace with file manager\":\"Remplacer avec le gestionnaire de fichiers\",\"Insert image with file manager\":\"Ins\u00E9rer une image avec le gestionnaire de fichiers\",\"Replace image with file manager\":\"Remplacer l'image avec le gestionnaire de fichiers\",\"File\":\"Fichier\",\"With file manager\":\"Avec le gestionnaire de fichiers\",\"Toggle caption off\":\"D\u00E9sactiver la l\u00E9gende\",\"Toggle caption on\":\"Activer la l\u00E9gende\",\"Content editing keystrokes\":\"Touches d'\u00E9dition de contenu\",\"These keyboard shortcuts allow for quick access to content editing features.\":\"Ces raccourcis clavier permettent un acc\u00E8s rapide aux fonctionnalit\u00E9s d'\u00E9dition de contenu.\",\"User interface and content navigation keystrokes\":\"Interface utilisateur et frappes de navigation dans le contenu\",\"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.\":\"Utilisez les touches suivantes pour une navigation plus efficace dans l'interface utilisateur de CKEditor 5.\",\"Close contextual balloons, dropdowns, and dialogs\":\"Fermer les bulles contextuelles, les listes d\u00E9roulantes et les bo\u00EEtes de dialogue\",\"Open the accessibility help dialog\":\"Ouvrir la bo\u00EEte de dialogue d'aide sur l'accessibilit\u00E9\",\"Move focus between form fields (inputs, buttons, etc.)\":\"D\u00E9placer le focus entre les champs du formulaire (saisies, boutons, etc.)\",\"Move focus to the menu bar, navigate between menu bars\":\"D\u00E9placer le focus sur la barre du menu, naviguer entre les barres de menu\",\"Move focus to the toolbar, navigate between toolbars\":\"D\u00E9placez le focus sur la barre d'outils, naviguez entre les barres d'outils\",\"Navigate through the toolbar or menu bar\":\"Naviguer sur la barre d'outils ou la barre de menu\",\"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.\":\"Ex\u00E9cuter le bouton sur lequel se trouve le focus. L'ex\u00E9cution de boutons qui interagissent avec le contenu de l'\u00E9diteur ram\u00E8ne le focus sur le contenu.\",\"Accept\":\"Accepter\",\"Source\":\"Source\",\"Paragraph\":\"Paragraphe\",\"Color picker\":\"Pipette \u00E0 couleurs\",\"Insert\":\"Ins\u00E9rer\",\"Update\":\"Mettre \u00E0 jour\",\"Back\":\"Retour\",\"Please try a different phrase or check the spelling.\":\"Veuillez essayer une autre phrase ou v\u00E9rifier l'orthographe.\",\"Wrap text\":\"Retour \u00E0 la ligne\",\"Break text\":\"Saut de ligne\",\"Custom\":\"Personnalis\u00E9\",\"Original\":\"Taille originale\",\"The value must not be empty.\":\"La valeur ne doit pas \u00EAtre vide.\",\"The value should be a plain number.\":\"La valeur doit \u00EAtre un nombre simple.\",\"Copy selected content\":\"Copier le contenu s\u00E9lectionn\u00E9\",\"Paste content\":\"Coller le contenu\",\"Paste content as plain text\":\"Coller le contenu sous forme de texte brut\",\"Insert code block\":\"Ins\u00E9rer un bloc de code\",\"Plain text\":\"Texte brut\",\"Leaving %0 code snippet\":\"Laisser un extrait de code %0\",\"Entering %0 code snippet\":\"Saisie d'un extrait de code %0\",\"Entering code snippet\":\"Saisie d'un extrait de code\",\"Leaving code snippet\":\"Laisser un extrait de code\",\"Code block\":\"Bloc de code\",\"Insert image or file\":\"Ins\u00E9rer une image ou un fichier\",\"Could not obtain resized image URL.\":\"Impossible d'obtenir l'image redimensionn\u00E9e\",\"Selecting resized image failed\":\"La s\u00E9lection de l'image redimensionn\u00E9e a \u00E9chou\u00E9.\",\"Could not insert image at the current position.\":\"Impossible d'ins\u00E9rer l'image \u00E0 la position courante.\",\"Inserting image failed\":\"L'insertion d'image a \u00E9chou\u00E9.\",\"Open file manager\":\"Ouvrir le gestionnaire de fichiers\",\"Cannot determine a category for the uploaded file.\":\"Impossible de d\u00E9terminer une cat\u00E9gorie pour le fichier t\u00E9l\u00E9charg\u00E9.\",\"Cannot access default workspace.\":\"Impossible d'acc\u00E9der \u00E0 l'espace de travail par d\u00E9faut.\",\"You have no image editing permissions.\":\"Vous n'\u00EAtes pas autoris\u00E9 \u00E0 traiter des images.\",\"Edit image\":\"Modifier l'image\",\"Processing the edited image.\":\"Traitement de l'image modifi\u00E9e.\",\"Server failed to process the image.\":\"Le serveur n'a pas r\u00E9ussi \u00E0 traiter l'image.\",\"Failed to determine category of edited image.\":\"\u00C9chec de la d\u00E9termination de la cat\u00E9gorie de l'image modifi\u00E9e.\",\"Bookmark\":\"Favori\",\"Edit bookmark\":\"Modifier le favori\",\"Remove bookmark\":\"Supprimer le favori\",\"Bookmark name\":\"Nom du favori\",\"Enter the bookmark name without spaces.\":\"Saisir un nom de favori sans espaces.\",\"Bookmark must not be empty.\":\"Le favori ne doit pas \u00EAtre vide.\",\"Bookmark name cannot contain space characters.\":\"Le nom d'un favori ne peut pas contenir d'espaces.\",\"Bookmark name already exists.\":\"Le nom du favori existe d\u00E9j\u00E0.\",\"bookmark widget\":\"widget pour favori\",\"Bookmark toolbar\":\"Barre d'outils des signets\",\"Bookmarks\":\"Signets\",\"No bookmarks available.\":\"Aucun signet disponible.\",\"Scroll to bookmark\":\"Faire d\u00E9filer jusqu'au signet\",\"Block quote\":\"Citation\",\"Bold\":\"Gras\",\"Italic\":\"Italique\",\"Underline\":\"Soulign\u00E9\",\"Code\":\"Code\",\"Strikethrough\":\"Barr\u00E9\",\"Subscript\":\"Indice\",\"Superscript\":\"Exposant\",\"Italic text\":\"Texte en italique\",\"Move out of an inline code style\":\"Sortir d'un style de code en ligne\",\"Bold text\":\"Texte en gras\",\"Underline text\":\"Souligner le texte\",\"Strikethrough text\":\"Texte barr\u00E9\",\"Saving changes\":\"Enregistrement des modifications\",\"Revert autoformatting action\":\"Annuler l'action de formatage automatique\",\"Align left\":\"Aligner \u00E0 gauche\",\"Align right\":\"Aligner \u00E0 droite\",\"Align center\":\"Centrer\",\"Justify\":\"Justifier\",\"Text alignment\":\"Alignement du texte\",\"Text alignment toolbar\":\"Barre d'outils d'alignement du texte\"},\"getPluralForm\":( n ) => (n <= -2 || n >= 2)}}", "import {Controller} from '@hotwired/stimulus';\nimport {\n    ClassicEditor,\n    Alignment,\n    Bold,\n    Clipboard,\n    Essentials,\n    Font,\n    FontBackgroundColor,\n    FontColor,\n    Heading,\n    Image,\n    ImageBlock,\n    ImageCaption,\n    ImageInline,\n    ImageResize,\n    ImageStyle,\n    ImageToolbar,\n    ImageUpload,\n    Indent,\n    IndentBlock,\n    Italic,\n    Link,\n    List,\n    MediaEmbed,\n    Mention,\n    Paragraph,\n    PasteFromOffice,\n    RemoveFormat,\n    Strikethrough,\n    Table,\n    TableCellProperties,\n    TableColumnResize,\n    TableProperties,\n    TableToolbar,\n    TextTransformation,\n    Underline,\n    WordCount,\n    CodeBlock\n} from 'ckeditor5';\nimport deTranslations from 'ckeditor5/translations/de.js';\nimport esTranslations from 'ckeditor5/translations/es.js';\nimport frTranslations from 'ckeditor5/translations/fr.js';\n\nimport {debounce} from 'debounce';\nimport {TutorizeMediaUpload, TutorizeUploadAdapterPlugin} from '../components/ckeditor/plugins';\nimport {mentionItemRenderer, MentionCustomization} from '../components/ckeditor/mentions';\n\nexport default class extends Controller {\n    static values = {\n        mediaFileUploadEnabled: Boolean,\n        mediaFileUploadEndpoint: String,\n        mediaFileUploadAllowedFileTypes: String,\n        mediaFileUploadMaxFileSize: Number,\n        mediaFileUploadMediaPoolUrl: String,\n        mediaFileUploadTooltipText: String,\n        htmlAllowedTags: String,\n        htmlAllowedAttrs: String,\n        height: Number,\n        maxHeight: Number,\n        tablesEnabled: Boolean,\n        mediaEmbedEnabled: Boolean,\n        required: Boolean,\n        maxlength: Number,\n        minlength: Number,\n        requiredMsg: String,\n        minlengthMsg: String,\n        maxlengthMsg: String,\n        bubbleChangeDataEvent: Boolean,\n        mentionUrl: String,\n        autofocus: Boolean,\n        skipToToolbarText: String\n    };\n\n    initialize() {\n        this._handleChangeDataEvent = debounce(this._handleChangeDataEvent.bind(this), 500);\n        this._handleValidationError = debounce(this._handleValidationError.bind(this), 500);\n        super.initialize();\n    }\n\n    connect() {\n        ClassicEditor\n            .create({\n                attachTo: this.element,\n                ...this._editorOptions\n            })\n            .then((editor) => {\n                this._setupEditor(editor);\n                this.element.editorInstance = editor;\n            });\n\n        this.element.editor = {\n            setBackgroundImage: this.setBackgroundImage.bind(this)\n        };\n    }\n\n    disconnect() {\n        this.editor?.destroy();\n    }\n\n    setBackgroundImage(backgroundImageUrl, opacity) {\n        opacity = typeof opacity === 'undefined' ? 0 : opacity;\n\n        this.editor.editing.view.change((writer) => {\n            const editorDocumentRoot = this.editor.editing.view.document.getRoot();\n            writer.setStyle('background-color', `rgba(255, 255, 255, ${opacity}) !important`, editorDocumentRoot);\n\n            const wrapper = this.element.parentElement.querySelector('.ck-editor__background_image_wrapper');\n            if (!wrapper) {\n                return;\n            }\n\n            if (backgroundImageUrl && backgroundImageUrl.length > 0) {\n                wrapper.style.backgroundImage = `url(\"${backgroundImageUrl}\")`;\n            } else {\n                wrapper.style.backgroundImage = '';\n            }\n        });\n    }\n\n    get _editorOptions() {\n        const language = document.documentElement.lang\n            .toLowerCase()\n            .split('-')[0];\n\n        return {\n            licenseKey: 'GPL',\n            language,\n            translations: [\n                deTranslations,\n                esTranslations,\n                frTranslations\n            ],\n            plugins: this._plugins,\n            extraPlugins: this._extraPlugins,\n            removePlugins: this._removePlugins,\n            mediaFileUpload: this._mediaFileUploadOptions,\n            mediaFileEmbed: this._mediaFileEmbedOptions,\n            mention: this._mentionOptions,\n            // ImageToolbar requires a non-empty `image.toolbar` or CKEditor logs\n            // widget-toolbar-no-items (toolbarId: 'image'). Keep toolbar entries in\n            // sync with `image.styles` so style buttons are not all filtered out.\n            image: {\n                toolbar: [\n                    'toggleImageCaption',\n                    'imageTextAlternative',\n                    '|',\n                    'imageStyle:alignLeft',\n                    'imageStyle:alignRight'\n                ],\n                styles: ['alignLeft', 'alignRight']\n            },\n            table: {\n                contentToolbar: [\n                    'tableColumn',\n                    'tableRow',\n                    'mergeTableCells',\n                    'tableProperties',\n                    'tableCellProperties'\n                ]\n            },\n            toolbar: {\n                shouldNotGroupWhenFull: true,\n                items: this._enabledToolbarItems\n            },\n            ui: {\n                viewportOffset: {\n                    top: 54\n                }\n            }\n        };\n    }\n\n    get _plugins() {\n        return [\n            Alignment,\n            Bold,\n            Clipboard,\n            Essentials,\n            Font,\n            FontBackgroundColor,\n            FontColor,\n            Heading,\n            Image,\n            ImageBlock,\n            ImageCaption,\n            ImageInline,\n            ImageResize,\n            ImageStyle,\n            ImageToolbar,\n            ImageUpload,\n            Indent,\n            IndentBlock,\n            Italic,\n            Link,\n            List,\n            MediaEmbed,\n            Mention,\n            Paragraph,\n            PasteFromOffice,\n            RemoveFormat,\n            Strikethrough,\n            Table,\n            TableCellProperties,\n            TableColumnResize,\n            TableProperties,\n            TableToolbar,\n            TextTransformation,\n            TutorizeMediaUpload,\n            TutorizeUploadAdapterPlugin,\n            Underline,\n            WordCount,\n            CodeBlock\n        ];\n    }\n\n    _setupEditor(editor) {\n        this.editor = editor;\n        this._injectBackgroundImageWrapper();\n        this._setHeight();\n        this._setupWordCount();\n        this._setupValidations();\n        this._setupChangeDataEvent();\n        this._injectToolbarSkipLink();\n        if (this.autofocusValue) {\n            this.editor.editing.view.focus();\n        }\n    }\n\n    _injectBackgroundImageWrapper() {\n        const editorMain = this.element.parentElement.querySelector('.ck.ck-editor__main');\n        const editable = this.element.parentElement.querySelector('.ck.ck-editor__editable');\n\n        if (!editorMain || !editable || editable.parentElement?.classList.contains('ck-editor__background_image_wrapper')) {\n            return;\n        }\n\n        const wrapper = document.createElement('div');\n        wrapper.classList.add('ck', 'ck-editor__background_image_wrapper');\n        editorMain.insertBefore(wrapper, editable);\n        wrapper.appendChild(editable);\n    }\n\n    _injectToolbarSkipLink() {\n        const skipLink = document.createElement('button');\n        skipLink.type = 'button';\n        skipLink.textContent = this.skipToToolbarTextValue;\n        skipLink.classList.add('ck-toolbar-skip-link', 'visually-hidden-focusable');\n        skipLink.addEventListener('click', () => {\n            this.editor.ui.view.toolbar.focus();\n        });\n\n        const editorMain = this.element.parentElement.querySelector('.ck.ck-editor__main');\n        editorMain.parentElement.insertBefore(skipLink, editorMain);\n    }\n\n    _setHeight() {\n        const height = this.heightValue || 500;\n        const maxHeight = this.maxHeightValue || 800;\n        this.editor.editing.view.change((writer) => {\n            const editorDocumentRoot = this.editor.editing.view.document.getRoot();\n            writer.setStyle('min-height', `${height}px`, editorDocumentRoot);\n            writer.setStyle('max-height', `${maxHeight}px`, editorDocumentRoot);\n        });\n    }\n\n    _setupWordCount() {\n        const wordCountPlugin = this.editor.plugins.get('WordCount');\n        if (!wordCountPlugin) {\n            return;\n        }\n\n        const parent = this.element.parentElement;\n        const editorWrapper = parent.querySelector('div.ck.ck-editor');\n        if (!editorWrapper) {\n            return;\n        }\n\n        this.element.parentElement.insertBefore(wordCountPlugin.wordCountContainer, editorWrapper.nextSibling);\n    }\n\n    get _shouldValidate() {\n        return !!this.maxlengthValue || !!this.minlengthValue || !!this.requiredValue;\n    }\n\n    _setupValidations() {\n        if (!this._shouldValidate) {\n            return;\n        }\n\n        this._validationInput = this._buildValidationInput();\n        const container = this.editor.plugins.get('WordCount').wordCountContainer;\n        container.appendChild(this._validationInput);\n\n        this.element.form.addEventListener('submit', (event) => {\n            if (!this._validateError()) {\n                event.preventDefault();\n                event.stopPropagation();\n                return false;\n            }\n\n            this._validationInput.remove();\n        });\n    }\n\n    _handleValidationError() {\n        this._validateError();\n    }\n\n    _validateError() {\n        const dataLength = this.editor.getData().length;\n\n        if (this.requiredValue && dataLength === 0) {\n            this._validationInput.setCustomValidity(this.requiredMsgValue);\n            this._validationInput.reportValidity();\n            return false;\n        }\n\n        if (this.maxlengthValue && dataLength > this.maxlengthValue) {\n            this._validationInput.setCustomValidity(this.maxlengthMsgValue);\n            this._validationInput.reportValidity();\n            return false;\n        }\n\n        if (this.minlengthValue && dataLength < this.minlengthValue) {\n            this._validationInput.setCustomValidity(this.minlengthMsgValue);\n            this._validationInput.reportValidity();\n            return false;\n        }\n\n        this._validationInput.setCustomValidity('');\n        return true;\n    }\n\n    _setupChangeDataEvent() {\n        this.editor.model.document.on('change:data', (event) => {\n            if (this._shouldValidate) {\n                this._handleValidationError(event);\n            }\n            if (this.bubbleChangeDataEventValue === true) {\n                this._handleChangeDataEvent(event);\n            }\n\n            this.element.form.dispatchEvent(new CustomEvent('change'));\n        });\n    }\n\n    _handleChangeDataEvent() {\n        this.element.dispatchEvent(\n            new CustomEvent('editor.change:data', {\n                bubbles: true,\n                detail: {\n                    data: this.editor.getData()\n                }\n            })\n        );\n    }\n\n    _buildValidationInput() {\n        const name = `${this.element.getAttribute('name')}_validation`;\n        const validationInput = document.createElement('input');\n        validationInput.setAttribute('type', 'text');\n        validationInput.setAttribute('tabindex', '-1');\n        validationInput.setAttribute('aria-hidden', 'true');\n        validationInput.setAttribute('name', name);\n        validationInput.classList.add('visually-hidden');\n\n        validationInput.addEventListener('focus', () => this.editor.editing.view.focus());\n\n        return validationInput;\n    }\n\n    _insertFile(event) {\n        const file = event.detail;\n\n        if (['document', 'video'].includes(file.type)) {\n            this.editor.model.change((writer) => {\n                const mediaFileEmbed = writer.createElement('mediaFileEmbed', {\n                    'data-media-file-json': JSON.stringify(file)\n                });\n                this.editor.model.insertContent(mediaFileEmbed, this.editor.model.document.selection);\n            });\n        } else if (file.type === 'image') {\n            this.editor.model.change((writer) => {\n                const element = writer.createElement('imageBlock', {src: file.download_url});\n                this.editor.model.insertContent(element, this.editor.model.document.selection);\n            });\n        } else {\n            this.editor.model.change((writer) => {\n                const element = writer.createText(file.name);\n                writer.setAttribute('linkHref', file.download_url, element);\n                this.editor.model.insertContent(element, this.editor.model.document.selection);\n            });\n        }\n    }\n\n    get _mediaFileUploadOptions() {\n        if (!this._fileUploadEnabled) {\n            return {};\n        }\n\n        const directUploads = buildDirectUploadsElement({\n            endpoint: this.mediaFileUploadEndpointValue,\n            allowedFileTypes: this.mediaFileUploadAllowedFileTypesValue,\n            maxFileSize: this.mediaFileUploadMaxFileSizeValue,\n            mediaPoolUrl: this.mediaFileUploadMediaPoolUrlValue,\n            tooltipText: this.mediaFileUploadTooltipTextValue\n        });\n\n        directUploads.addEventListener('fileUploaded', (event) => this._insertFile(event));\n\n        return {\n            endpoint: this.mediaFileUploadEndpointValue,\n            directUploads\n        };\n    }\n\n    get _mediaFileEmbedOptions() {\n        if (!this._fileUploadEnabled) {\n            return {};\n        }\n\n        return {\n            editingDowncast: mediaFileEmbedEditingDowncast\n        };\n    }\n\n    get _mentionOptions() {\n        if (!this._mentionsEnabled) {\n            return {};\n        }\n\n        return {\n            feeds: [\n                {\n                    marker: '@',\n                    feed: (query) => {\n                        const url = `${this.mentionUrlValue}?q=${query}`;\n                        return fetch(url).then((response) => response.json()).then((json) => json.results);\n                    },\n                    itemRenderer: mentionItemRenderer\n                }\n            ]\n        };\n    }\n\n    get _mentionsEnabled() {\n        return this.hasMentionUrlValue;\n    }\n\n    get _fileUploadEnabled() {\n        return !!this.mediaFileUploadEnabledValue;\n    }\n\n    get _tablesEnabled() {\n        return !!this.tablesEnabledValue;\n    }\n\n    get _mediaEmbedEnabled() {\n        return !!this.mediaEmbedEnabledValue;\n    }\n\n    get _extraPlugins() {\n        const plugins = [];\n\n        if (this._mentionsEnabled) {\n            plugins.push(MentionCustomization);\n        }\n\n        return plugins;\n    }\n\n    get _removePlugins() {\n        const removePlugins = [];\n\n        if (!this._tablesEnabled) {\n            removePlugins.push('Table', 'TableToolbar', 'TableProperties', 'TableCellProperties', 'TableColumnResize');\n        }\n\n        if (!this._fileUploadEnabled) {\n            removePlugins.push(\n                'Image',\n                'ImageBlock',\n                'ImageCaption',\n                'ImageInline',\n                'ImageResize',\n                'ImageStyle',\n                'ImageToolbar',\n                'ImageUpload',\n                'MediaEmbed',\n                'TutorizeMediaUpload'\n            );\n        }\n\n        if (!this._mediaEmbedEnabled) {\n            removePlugins.push('MediaEmbed');\n        }\n\n        return removePlugins;\n    }\n\n    get _enabledToolbarItems() {\n        return [\n            'heading',\n            'fontSize',\n            'fontColor',\n            'fontBackgroundColor',\n            '|',\n            'bold',\n            'italic',\n            'underline',\n            'strikethrough',\n            '|',\n            'alignment',\n            'bulletedList',\n            'numberedList',\n            'outdent',\n            'indent',\n            '|',\n            'link',\n            ...(this._tablesEnabled ? ['insertTable'] : []),\n            ...(this._fileUploadEnabled ? ['tutorizeMediaUpload'] : []),\n            'codeBlock',\n            'removeFormat',\n            'undo',\n            'redo'\n        ];\n    }\n}\n\nfunction buildDirectUploadsElement(opts) {\n    const directUploadsWrapper = document.createElement('div');\n    directUploadsWrapper.setAttribute('data-controller', 'direct-upload');\n    directUploadsWrapper.setAttribute('data-direct-upload-target', 'dragDrop');\n    directUploadsWrapper.setAttribute('data-direct-upload-endpoint', opts.endpoint);\n    directUploadsWrapper.setAttribute('data-direct-upload-allowed-file-types', opts.allowedFileTypes);\n    directUploadsWrapper.setAttribute('data-direct-upload-max-file-size', opts.maxFileSize);\n    directUploadsWrapper.setAttribute('data-direct-upload-media-pool-url', opts.mediaPoolUrl);\n    directUploadsWrapper.setAttribute('data-direct-upload-tooltip-text', opts.tooltipText);\n    directUploadsWrapper.classList.add('uppy-DragDrop-container', 'uppy-DragDrop--is-dragdrop-supported');\n\n    const fileInputWrapper = document.createElement('div');\n    fileInputWrapper.setAttribute('data-direct-upload-target', 'fileInput');\n    fileInputWrapper.classList.add('inline-block');\n    directUploadsWrapper.appendChild(fileInputWrapper);\n\n    const mediaFileIdInput = document.createElement('input');\n    mediaFileIdInput.setAttribute('data-direct-upload-target', 'fieldFileID');\n    mediaFileIdInput.setAttribute('type', 'hidden');\n    mediaFileIdInput.setAttribute('name', 'media_file_id_input');\n    directUploadsWrapper.appendChild(mediaFileIdInput);\n\n    const statusBar = document.createElement('div');\n    statusBar.setAttribute('data-direct-upload-target', 'statusBar');\n    directUploadsWrapper.appendChild(statusBar);\n\n    return directUploadsWrapper;\n}\n\nconst mediaFileEmbedEditingDowncast = (modelElement, writer) => {\n    const raw = modelElement.getAttribute('data-media-file-json');\n    const json = JSON.parse(raw);\n\n    const label = writer.createText(`${json.file_name} (${json.type_translation})`);\n    const labelWrapper = writer.createContainerElement('div', {class: 'bg-gray-200 p-2'}, [label]);\n    const children = [labelWrapper];\n\n    switch (json.type) {\n        case 'video': {\n            const sources = json.video\n                .filter((src) => src.endsWith('.mp4'))\n                .map((src) => writer.createEmptyElement('source', {src}));\n            const video = writer.createContainerElement('video', {\n                style: 'width: 100%; height: 100%'\n            }, sources);\n            children.push(video);\n            break;\n        }\n        case 'document': {\n            const data = json.document[0];\n            const object = writer.createEmptyElement('object', {\n                data,\n                type: 'application/pdf',\n                style: 'width:100%; height:60vh;'\n            });\n            children.push(object);\n            break;\n        }\n        default:\n            break;\n    }\n\n    const div = writer.createContainerElement('div', {}, children);\n    return writer.createContainerElement('figure', {class: 'media ck-widget'}, [div]);\n};\n", "import { Plugin, Widget, toWidget } from 'ckeditor5';\n\nconst MEDIA_FILE_EMBED_ATTRIBUTES = [ 'data-media-file-json' ];\n\nexport default class TutorizeMediaFileEmbed extends Plugin {\n  static get pluginName() {\n    return 'TutorizeMediaFileEmbed';\n  }\n\n  static get requires() {\n    return [ Widget ];\n  }\n\n  init() {\n    this._defineSchema();\n    this._defineConverters();\n  }\n\n  _defineSchema() {\n    const { schema } = this.editor.model;\n\n    schema.register( 'mediaFileEmbed', {\n      isObject: true,\n      allowWhere: '$block',\n      allowAttributes: MEDIA_FILE_EMBED_ATTRIBUTES\n    } );\n  }\n\n  _defineConverters() {\n    const conversion = this.editor.conversion;\n    const editingDowncastHandler = this.editor.config.get( 'mediaFileEmbed.editingDowncast' );\n\n    conversion.for( 'upcast' ).elementToElement( {\n      view: {\n        name: 'oembed',\n        attributes: {\n          'data-media-file-json': true\n        }\n      },\n      model: ( viewElement, { writer } ) => writer.createElement( 'mediaFileEmbed', getElementMediaFileAttributes( viewElement ) )\n    } );\n\n    conversion.for( 'editingDowncast' ).elementToStructure( {\n      model: 'mediaFileEmbed',\n      view: ( modelElement, { writer } ) => {\n        const element = editingDowncastHandler( modelElement, writer );\n        return toWidget( element, writer, { label: 'media file embed widget' } );\n      }\n    } );\n\n    conversion.for( 'dataDowncast' ).elementToElement( {\n      model: 'mediaFileEmbed',\n      view: ( modelElement, { writer } ) => {\n        const previewElement = writer.createEmptyElement( 'oembed', {\n          ...getElementMediaFileAttributes( modelElement )\n        } );\n\n        return writer.createContainerElement( 'figure', { class: 'media' }, [ previewElement ] );\n      }\n    } );\n  }\n}\n\nfunction getElementMediaFileAttributes( element ) {\n  const attributes = {};\n\n  for ( const attribute of MEDIA_FILE_EMBED_ATTRIBUTES ) {\n    attributes[ attribute ] = element.getAttribute( attribute );\n  }\n\n  return attributes;\n}\n", "import { Plugin, createDropdown } from 'ckeditor5';\n\nexport default class TutorizeMediaUploadUI extends Plugin {\n  static get pluginName() {\n    return 'TutorizeMediaUploadUI';\n  }\n\n  init() {\n    const editor = this.editor;\n\n    editor.ui.componentFactory.add( 'tutorizeMediaUpload', ( locale ) => {\n      const dropdown = createDropdown( locale );\n      this._setUpDropdown( dropdown );\n\n      return dropdown;\n    } );\n  }\n\n  _setUpDropdown( dropdown ) {\n    const directUploads = this.editor.config.get( 'mediaFileUpload.directUploads' );\n\n    if ( !directUploads ) {\n      return;\n    }\n\n    directUploads.classList.add( 'ckeditor--direct-uploads-popup' );\n\n    if ( !directUploads.parentElement ) {\n      document.body.appendChild( directUploads );\n    }\n\n    // Treat the external popup as part of the dropdown for focus / outside-click logic,\n    // so CKEditor does not close the toolbar dropdown (and swallow the click) before\n    // links and controls inside `directUploads` can handle it.\n    if ( dropdown.focusTracker && typeof dropdown.focusTracker.add === 'function' ) {\n      dropdown.focusTracker.add( directUploads );\n    }\n\n    const positionDirectUploads = () => {\n      if ( !dropdown.element ) {\n        return;\n      }\n\n      const pos = dropdown.element.getBoundingClientRect();\n      const offset = getOffsetFromBoundingBox( pos );\n\n      directUploads.style.top = `${ offset.top }px`;\n      directUploads.style.left = `${ offset.left }px`;\n    };\n\n    dropdown.on( 'change:isOpen', () => {\n      if ( dropdown.isOpen ) {\n        positionDirectUploads();\n        directUploads.style.display = 'block';\n      } else {\n        directUploads.style.display = 'none';\n      }\n    } );\n\n    dropdown.on( 'render', positionDirectUploads );\n\n    directUploads.addEventListener( 'mediaPoolOpened', () => {\n      directUploads.style.display = 'none';\n      dropdown.isOpen = false;\n    } );\n\n    window.addEventListener( 'resize', positionDirectUploads );\n    this.listenTo( this.editor, 'destroy', () => {\n      window.removeEventListener( 'resize', positionDirectUploads );\n    } );\n\n    dropdown.buttonView.set( {\n      label: 'Insert media',\n      icon: MEDIA_ICON,\n      tooltip: true\n    } );\n  }\n}\n\nconst MEDIA_ICON = `\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n  <path d=\"M18.68 3.03c.6 0 .59-.03.59.55v12.84c0 .59.01.56-.59.56H1.29c-.6 0-.59.03-.59-.56V3.58c0-.58-.01-.55.6-.55h17.38zM15.77 15V5H4.2v10h11.57zM2 4v1h1V4H2zm0 2v1h1V6H2zm0 2v1h1V8H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zm0 2v1h1v-1H2zM17 4v1h1V4h-1zm0 2v1h1V6h-1zm0 2v1h1V8h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zm0 2v1h1v-1h-1zM7.5 7.177a.4.4 0 0 1 .593-.351l5.133 2.824a.4.4 0 0 1 0 .7l-5.133 2.824a.4.4 0 0 1-.593-.35V7.176v.001z\"/>\n</svg>\n`;\n\nfunction getOffsetFromBoundingBox( box ) {\n  const docElem = document.documentElement;\n\n  return {\n    top: box.top + box.height + ( window.scrollY || docElem.scrollTop ) - ( docElem.clientTop || 0 ),\n    left: box.left + ( window.scrollX || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\n  };\n}\n  ", "import { Plugin } from 'ckeditor5';\nimport TutorizeMediaUploadUI from './tutorize_media_upload_ui';\nimport TutorizeMediaFileEmbed from './tutorize_media_file_embed';\n\nexport default class TutorizeMediaUpload extends Plugin {\n  static get pluginName() {\n    return 'TutorizeMediaUpload';\n  }\n\n  static get requires() {\n    return [ TutorizeMediaUploadUI, TutorizeMediaFileEmbed ];\n  }\n}\n", "import { Plugin } from 'ckeditor5';\n\nclass TutorizeUploadAdapter {\n  constructor( loader, endpointUrl ) {\n    this.loader = loader;\n    this.endpointUrl = endpointUrl;\n    this.abortController = new AbortController();\n  }\n\n  async upload() {\n    const file = await this.loader.file;\n    const data = new FormData();\n    data.append( 'media_file[media]', file );\n\n    const csrfToken = document.head.querySelector( 'meta[name=\"csrf-token\"]' )?.content;\n    const headers = { Accept: 'application/json' };\n    if ( csrfToken ) {\n      headers[ 'X-CSRF-Token' ] = csrfToken;\n    }\n\n    const response = await fetch( this.endpointUrl, {\n      credentials: 'same-origin',\n      headers,\n      method: 'POST',\n      body: data,\n      signal: this.abortController.signal\n    } );\n\n    if ( response.status === 401 ) {\n      throw new Error( 'Unauthorized upload request (401).' );\n    }\n\n    const json = await response.json();\n\n    if ( !response.ok ) {\n      const message = Array.isArray( json?.error ) ? json.error[ json.error.length - 1 ] : 'Upload failed.';\n      throw new Error( message );\n    }\n\n    return {\n      default: json.download_url\n    };\n  }\n\n  abort() {\n    this.abortController.abort();\n  }\n}\n\nexport default class TutorizeUploadAdapterPlugin extends Plugin {\n  static get pluginName() {\n    return 'TutorizeUploadAdapterPlugin';\n  }\n\n  init() {\n    const endpointUrl = this.editor.config.get( 'mediaFileUpload.endpoint' );\n\n    if ( !endpointUrl ) {\n      return;\n    }\n\n    const fileRepository = this.editor.plugins.get( 'FileRepository' );\n    fileRepository.createUploadAdapter = ( loader ) => new TutorizeUploadAdapter( loader, endpointUrl );\n  }\n}\n", "import { Mention, Plugin } from 'ckeditor5';\n\n/**\n * Custom mention upcast/downcast so stored HTML round-trips with data attributes.\n */\nexport class MentionCustomization extends Plugin {\n  static get pluginName() {\n    return 'MentionCustomization';\n  }\n\n  static get requires() {\n    return [ Mention ];\n  }\n\n  init() {\n    const editor = this.editor;\n\n    editor.conversion.for( 'upcast' ).elementToAttribute( {\n      view: {\n        name: 'a',\n        key: 'data-mention',\n        classes: 'mention',\n        attributes: {\n          href: true,\n          'data-mention-id': true,\n          'data-mention-type': true\n        }\n      },\n      model: {\n        key: 'mention',\n        value: ( viewItem ) => {\n          return editor.plugins.get( 'Mention' ).toMentionAttribute( viewItem, {\n            link: viewItem.getAttribute( 'href' ),\n            mentionId: viewItem.getAttribute( 'data-mention-id' ),\n            mentionType: viewItem.getAttribute( 'data-mention-type' )\n          } );\n        }\n      },\n      converterPriority: 'high'\n    } );\n\n    editor.conversion.for( 'downcast' ).attributeToElement( {\n      model: 'mention',\n      view: ( modelAttributeValue, { writer } ) => {\n        if ( !modelAttributeValue ) {\n          return;\n        }\n\n        return writer.createAttributeElement( 'a', {\n          class: 'mention',\n          'data-mention': modelAttributeValue.id,\n          'data-mention-id': modelAttributeValue.mentionId,\n          'data-mention-type': modelAttributeValue.mentionType,\n          href: modelAttributeValue.link\n        }, {\n          priority: 20,\n          id: modelAttributeValue.uid\n        } );\n      },\n      converterPriority: 'high'\n    } );\n  }\n}\n\nexport function mentionItemRenderer( item ) {\n  const itemElement = document.createElement( 'span' );\n\n  itemElement.classList.add( 'dropdown-item-text' );\n  itemElement.id = `mention-list-item-id-${ item.mentionId }`;\n\n  const nameElement = document.createElement( 'span' );\n  nameElement.textContent = `${ item.name } `;\n  nameElement.classList.add( 'ck__mention-title' );\n  itemElement.appendChild( nameElement );\n\n  const typeElement = document.createElement( 'span' );\n  typeElement.classList.add( 'text-muted' );\n  typeElement.textContent = item.mentionType;\n  itemElement.appendChild( typeElement );\n\n  return itemElement;\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nimport 'mediaelement'\nimport 'mediaelement/build/lang/de'\nimport 'mediaelement/build/lang/fr'\nimport 'mediaelement/build/lang/es'\nimport 'mediaelement/build/renderers/vimeo'\nimport '../components/utility/media_element_speed'\n\nexport default class extends Controller {\n    static values = {dashPath: String, hlsPath: String, iconSpritePath: String, speedText: String}\n\n    initialize() {\n        mejs.i18n.language(document.documentElement.lang)\n    }\n\n    connect() {\n        const elements = this.element.querySelectorAll('oembed')\n        elements.forEach(e => this._loadMediaFile(e))\n    }\n\n    _loadMediaFile(oembed) {\n        if (oembed.hasAttribute('url')) {\n            this._loadYoutubeVimeo(oembed)\n        } else if (oembed.hasAttribute('data-media-file-json')) {\n            const json = JSON.parse(oembed.getAttribute('data-media-file-json'))\n            switch (json.type) {\n                case 'document':\n                    this._loadPdf(oembed, json)\n                    break\n                case 'video':\n                    this._loadVideo(oembed, json)\n                    break\n                default:\n                    break\n            }\n        }\n\n        oembed.style.display = 'none'\n    }\n\n    _loadPdf(oembed, json) {\n        const obj = document.createElement('object')\n        obj.setAttribute('data', json.document[0])\n        obj.setAttribute('type', 'application/pdf')\n        obj.classList.add('pdf')\n        obj.style.width = '100%'\n        obj.style.height = '60vh'\n        oembed.parentNode.appendChild(obj)\n    }\n\n    _loadVideo(oembed, json) {\n        const video = document.createElement('video')\n        for (let src of json.video) {\n            const source = document.createElement('source')\n            source.setAttribute('src', src)\n            video.appendChild(source)\n        }\n        video.style.width = '100%'\n        video.style.height = '100%'\n        video.setAttribute('data-media-element-target', 'mediaElement')\n\n        const wrapper = document.createElement('div')\n        wrapper.setAttribute('data-controller', 'media-element')\n        wrapper.setAttribute('data-media-element-dash-path-value', this.dashPathValue)\n        wrapper.setAttribute('data-media-element-hls-path-value', this.hlsPathValue)\n        wrapper.setAttribute('data-media-element-icon-sprite-path-value', this.iconSpritePathValue)\n        wrapper.setAttribute('data-media-element-speed-text-value', this.speedTextValue)\n        wrapper.append(video)\n        oembed.parentNode.appendChild(wrapper)\n    }\n\n    _loadYoutubeVimeo(oembed) {\n        const video = document.createElement('video')\n        video.setAttribute('src', oembed.getAttribute('url'))\n        video.style.width = '100%'\n        video.style.height = '100%'\n        oembed.parentNode.appendChild(video)\n\n        new MediaElementPlayer(video, {\n            renderers: ['youtube_iframe', 'vimeo_iframe'],\n            features: ['playpause', 'progress', 'current', 'duration', 'speed', 'tracks', 'volume', 'fullscreen'],\n            iconSprite: this.iconSpritePathValue,\n            speedText: this.speedTextValue,\n            autoRewind: false,\n            youtube: {\n                nocookie: true\n            }\n        })\n    }\n}\n", "/*!\n * This is a `i18n` language object.\n *\n * German\n *\n * @author\n *   Jalios (Twitter: @Jalios)\n *   Sascha Greuel (Twitter: @SoftCreatR)\n *\n * @see core/i18n.js\n */\n(function (exports) {\n    'use strict';\tif (exports.de === undefined) {\n\t\texports.de = {\n\t\t\t'mejs.plural-form': 1,\t\t\t\n\t\t\t'mejs.download-file': 'Datei herunterladen',\t\t\t\n\t\t\t'mejs.install-flash': 'Ihr Browser unterst\u00FCtzt kein Flash. Bitte aktivieren Sie Flash bzw. laden Sie die aktuellste Flash-Version herunter unter https://get.adobe.com/flashplayer/',\t\t\t\n\t\t\t'mejs.fullscreen': 'Vollbild',\t\t\t\n\t\t\t'mejs.play': 'Abspielen',\n\t\t\t'mejs.pause': 'Pause',\t\t\t\n\t\t\t'mejs.time-slider': 'Zeitschieberegler',\n\t\t\t'mejs.time-help-text': 'Verwende die Pfeiltaste nach links/rechts, um eine Sekunde zu spulen, hoch/runter um zehn Sekunden zu spulen.',\n\t\t\t'mejs.live-broadcast' : 'Live-\u00DCbertragung',\t\t\t\n\t\t\t'mejs.current': 'Aktueller Zeitpunkt',\n\t\t\t'mejs.duration': 'Gesamtlaufzeit',\t\t\t\n\t\t\t'mejs.volume-help-text': 'Verwende die Pfeiltaste nach oben/nach unten um die Lautst\u00E4rke zu erh\u00F6hen oder zu verringern.',\n\t\t\t'mejs.unmute': 'Stummschaltung aufheben',\n\t\t\t'mejs.mute': 'Stummschalten',\n\t\t\t'mejs.volume-slider': 'Lautst\u00E4rkeregler',\t\t\t\n\t\t\t'mejs.video-player': 'Video-Player',\n\t\t\t'mejs.audio-player': 'Audio-Player',\t\t\t\n\t\t\t'mejs.captions-subtitles': '\u00DCberschriften/Untertitel',\n\t\t\t'mejs.captions-chapters': 'Kapitel',\n\t\t\t'mejs.none': 'Keine',\n\t\t\t'mejs.afrikaans': 'Afrikanisch',\n\t\t\t'mejs.albanian': 'Albanisch',\n\t\t\t'mejs.arabic': 'Arabisch',\n\t\t\t'mejs.belarusian': 'Wei\u00DFrussisch',\n\t\t\t'mejs.bulgarian': 'Bulgarisch',\n\t\t\t'mejs.catalan': 'Katalanisch',\n\t\t\t'mejs.chinese': 'Chinesisch',\n\t\t\t'mejs.chinese-simplified': 'Chinesisch (Vereinfacht)',\n\t\t\t'mejs.chinese-traditional': 'Chinesisch (Traditionell)',\n\t\t\t'mejs.croatian': 'Kroatisch',\n\t\t\t'mejs.czech': 'Tschechisch',\n\t\t\t'mejs.danish': 'D\u00E4nisch',\n\t\t\t'mejs.dutch': 'Niederl\u00E4ndisch',\n\t\t\t'mejs.english': 'Englisch',\n\t\t\t'mejs.estonian': 'Estnisch',\n\t\t\t'mejs.filipino': 'Filipino',\n\t\t\t'mejs.finnish': 'Finnisch',\n\t\t\t'mejs.french': 'Franz\u00F6sisch',\n\t\t\t'mejs.galician': 'Galicisch',\n\t\t\t'mejs.german': 'Deutsch',\n\t\t\t'mejs.greek': 'Griechisch',\n\t\t\t'mejs.haitian-creole': 'Haitianisch',\n\t\t\t'mejs.hebrew': 'Hebr\u00E4isch',\n\t\t\t'mejs.hindi': 'Hindi',\n\t\t\t'mejs.hungarian': 'Ungarisch',\n\t\t\t'mejs.icelandic': 'Isl\u00E4ndisch',\n\t\t\t'mejs.indonesian': 'Indonesisch',\n\t\t\t'mejs.irish': 'Irisch',\n\t\t\t'mejs.italian': 'Italienisch',\n\t\t\t'mejs.japanese': 'Japanisch',\n\t\t\t'mejs.korean': 'Koreanisch',\n\t\t\t'mejs.latvian': 'Lettisch',\n\t\t\t'mejs.lithuanian': 'Litauisch',\n\t\t\t'mejs.macedonian': 'Mazedonisch',\n\t\t\t'mejs.malay': 'Malaysisch',\n\t\t\t'mejs.maltese': 'Maltesisch',\n\t\t\t'mejs.norwegian': 'Norwegisch',\n\t\t\t'mejs.persian': 'Persisch',\n\t\t\t'mejs.polish': 'Polnisch',\n\t\t\t'mejs.portuguese': 'Portugiesisch',\n\t\t\t'mejs.romanian': 'Rum\u00E4nisch',\n\t\t\t'mejs.russian': 'Russisch',\n\t\t\t'mejs.serbian': 'Serbisch',\n\t\t\t'mejs.slovak': 'Slovakisch',\n\t\t\t'mejs.slovenian': 'Slovenisch',\n\t\t\t'mejs.spanish': 'Spanisch',\n\t\t\t'mejs.swahili': 'Swahili',\n\t\t\t'mejs.swedish': 'Schwedisch',\n\t\t\t'mejs.tagalog': 'Tagalog',\n\t\t\t'mejs.thai': 'Thail\u00E4ndisch',\n\t\t\t'mejs.turkish': 'T\u00FCrkisch',\n\t\t\t'mejs.ukrainian': 'Ukrainisch',\n\t\t\t'mejs.vietnamese': 'Vietnamnesisch',\n\t\t\t'mejs.welsh': 'Walisisch',\n\t\t\t'mejs.yiddish': 'Jiddisch'\n\t\t};\n\t}\n})(mejs.i18n);\n", "/*!\n * This is a `i18n` language object.\n *\n * French\n *\n * @author\n *   Luc Poupard (Twitter: @klohFR)\n *   Jalios (Twitter: @Jalios)\n *   Sascha Greuel (Twitter: @SoftCreatR)\n *\n * @see core/i18n.js\n */\n(function (exports) {\n    'use strict';\tif (exports.fr === undefined) {\n\t\texports.fr = {\n\t\t\t'mejs.plural-form': 2,\t\t\t\n\t\t\t'mejs.download-file': 'T\u00E9l\u00E9charger le fichier',\t\t\t\n\t\t\t'mejs.install-flash': 'Vous utilisez un navigateur sur lequel Flash ne semble pas install\u00E9 ou activ\u00E9. Veuillez activer le plugin Flash ou t\u00E9l\u00E9charger la derni\u00E8re version sur https://get.adobe.com/flashplayer/',\t\t\t\n\t\t\t'mejs.fullscreen': 'Plein \u00E9cran',\t\t\t\n\t\t\t'mejs.play': 'Lecture',\n\t\t\t'mejs.pause': 'Pause',\t\t\t\n\t\t\t'mejs.time-slider': 'Curseur temporel',\n\t\t\t'mejs.time-help-text': 'Utilisez les fl\u00E8ches Gauche/Droite du clavier pour avancer d\\'une seconde, les fl\u00E8ches Haut/Bas pour avancer de 10 secondes.',\n\t\t\t'mejs.live-broadcast' : 'Diffusion en direct',\t\t\t\n\t\t\t'mejs.current': 'Temps actuel',\n\t\t\t'mejs.duration': 'Dur\u00E9e totale',\t\t\t\n\t\t\t'mejs.volume-help-text': 'Utilisez les fl\u00E8ches Haut/Bas du clavier pour augmenter ou diminuer le volume.',\n\t\t\t'mejs.unmute': 'Activer le son',\n\t\t\t'mejs.mute': 'D\u00E9sactiver le son',\n\t\t\t'mejs.volume-slider': 'Volume',\t\t\t\n\t\t\t'mejs.video-player': 'Lecteur Vid\u00E9o',\n\t\t\t'mejs.audio-player': 'Lecteur Audio',\t\t\t\n\t\t\t'mejs.captions-subtitles': 'Sous-titres',\n\t\t\t'mejs.captions-chapters': 'Chapitres',\n\t\t\t'mejs.none': 'Aucun',\n\t\t\t'mejs.afrikaans': 'Afrikaans',\n\t\t\t'mejs.albanian': 'Albanais',\n\t\t\t'mejs.arabic': 'Arabe',\n\t\t\t'mejs.belarusian': 'Bi\u00E9lorusse',\n\t\t\t'mejs.bulgarian': 'Bulgare',\n\t\t\t'mejs.catalan': 'Catalan',\n\t\t\t'mejs.chinese': 'Chinois',\n\t\t\t'mejs.chinese-simplified': 'Chinois (simplifi\u00E9)',\n\t\t\t'mejs.chinese-traditional': 'Chinois (traditionnel)',\n\t\t\t'mejs.croatian': 'Croate',\n\t\t\t'mejs.czech': 'Tch\u00E8que',\n\t\t\t'mejs.danish': 'Danois',\n\t\t\t'mejs.dutch': 'N\u00E9erlandais',\n\t\t\t'mejs.english': 'Anglais',\n\t\t\t'mejs.estonian': 'Estonien',\n\t\t\t'mejs.filipino': 'Filipino',\n\t\t\t'mejs.finnish': 'Finnois',\n\t\t\t'mejs.french': 'Fran\u00E7ais',\n\t\t\t'mejs.galician': 'Galicien',\n\t\t\t'mejs.german': 'Allemand',\n\t\t\t'mejs.greek': 'Grec',\n\t\t\t'mejs.haitian-creole': 'Cr\u00E9ole ha\u00EFtien',\n\t\t\t'mejs.hebrew': 'H\u00E9breu',\n\t\t\t'mejs.hindi': 'Hindi',\n\t\t\t'mejs.hungarian': 'Hongrois',\n\t\t\t'mejs.icelandic': 'Islandais',\n\t\t\t'mejs.indonesian': 'Indon\u00E9sien',\n\t\t\t'mejs.irish': 'Irlandais',\n\t\t\t'mejs.italian': 'Italien',\n\t\t\t'mejs.japanese': 'Japonais',\n\t\t\t'mejs.korean': 'Cor\u00E9en',\n\t\t\t'mejs.latvian': 'Letton',\n\t\t\t'mejs.lithuanian': 'Lituanien',\n\t\t\t'mejs.macedonian': 'Mac\u00E9donien',\n\t\t\t'mejs.malay': 'Malais',\n\t\t\t'mejs.maltese': 'Maltais',\n\t\t\t'mejs.norwegian': 'Norv\u00E9gien',\n\t\t\t'mejs.persian': 'Perse',\n\t\t\t'mejs.polish': 'Polonais',\n\t\t\t'mejs.portuguese': 'Portugais',\n\t\t\t'mejs.romanian': 'Roumain',\n\t\t\t'mejs.russian': 'Russe',\n\t\t\t'mejs.serbian': 'Serbe',\n\t\t\t'mejs.slovak': 'Slovaque',\n\t\t\t'mejs.slovenian': 'Slov\u00E8ne',\n\t\t\t'mejs.spanish': 'Espagnol',\n\t\t\t'mejs.swahili': 'Swahili',\n\t\t\t'mejs.swedish': 'Su\u00E9dois',\n\t\t\t'mejs.tagalog': 'Tagalog',\n\t\t\t'mejs.thai': 'Tha\u00EF',\n\t\t\t'mejs.turkish': 'Turque',\n\t\t\t'mejs.ukrainian': 'Ukrainien',\n\t\t\t'mejs.vietnamese': 'Vietnamien',\n\t\t\t'mejs.welsh': 'Gallois',\n\t\t\t'mejs.yiddish': 'Yiddish'\n\t\t};\n\t}\n})(mejs.i18n);\n", "/*!\n * This is a `i18n` language object.\n *\n * Spanish\n *\n * @author\n *   Jalios (Twitter: @Jalios)\n *   Sascha Greuel (Twitter: @SoftCreatR)\n *   Rafael Miranda (GitHub: @rafa8626)\n *\n * @see core/i18n.js\n */\n(function (exports) {\n    'use strict';\tif (exports.es === undefined) {\n\t\texports.es = {\n\t\t\t'mejs.plural-form': 1,\t\t\t\n\t\t\t'mejs.download-file': 'Descargar archivo',\t\t\t\n\t\t\t'mejs.install-flash': 'Esta usando un navegador que no tiene activado o instalado el reproductor de Flash. Por favor active el plugin del reproductor de Flash o descargue la versi\u00F3n m\u00E1s reciente en https://get.adobe.com/flashplayer/',\t\t\t\n\t\t\t'mejs.fullscreen': 'Pantalla completa',\t\t\t\n\t\t\t'mejs.play': 'Reproducci\u00F3n',\n\t\t\t'mejs.pause': 'Pausa',\t\t\t\n\t\t\t'mejs.time-slider': 'Control deslizante de tiempo',\n\t\t\t'mejs.time-help-text': 'Use las flechas Izquierda/Derecha para avanzar un segundo y las flechas Arriba/Abajo para avanzar diez segundos.',\n\t\t\t'mejs.live-broadcast': 'Transmisi\u00F3n en Vivo',\t\t\t\n\t\t\t'mejs.current': 'Hora actual',\n\t\t\t'mejs.duration': 'Duraci\u00F3n total',\t\t\t\n\t\t\t'mejs.volume-help-text': 'Use las flechas Arriba/Abajo para subir o bajar el volumen.',\n\t\t\t'mejs.unmute': 'Reactivar silencio',\n\t\t\t'mejs.mute': 'Silencio',\n\t\t\t'mejs.volume-slider': 'Control deslizante de volumen',\t\t\t\n\t\t\t'mejs.video-player': 'Reproductor de video',\n\t\t\t'mejs.audio-player': 'Reproductor de audio',\t\t\t\n\t\t\t'mejs.captions-subtitles': 'Leyendas/Subt\u00EDtulos',\n\t\t\t'mejs.captions-chapters': 'Cap\u00EDtulos',\n\t\t\t'mejs.none': 'Ninguno',\n\t\t\t'mejs.afrikaans': 'Afrikaans',\n\t\t\t'mejs.albanian': 'Albano',\n\t\t\t'mejs.arabic': '\u00C1rabe',\n\t\t\t'mejs.belarusian': 'Bielorruso',\n\t\t\t'mejs.bulgarian': 'B\u00FAlgaro',\n\t\t\t'mejs.catalan': 'Catal\u00E1n',\n\t\t\t'mejs.chinese': 'Chino',\n\t\t\t'mejs.chinese-simplified': 'Chino (Simplificado)',\n\t\t\t'mejs.chinese-traditional': 'Chino (Tradicional)',\n\t\t\t'mejs.croatian': 'Croata',\n\t\t\t'mejs.czech': 'Checo',\n\t\t\t'mejs.danish': 'Dan\u00E9s',\n\t\t\t'mejs.dutch': 'Holand\u00E9s',\n\t\t\t'mejs.english': 'Ingl\u00E9s',\n\t\t\t'mejs.estonian': 'Estoniano',\n\t\t\t'mejs.filipino': 'Filipino',\n\t\t\t'mejs.finnish': 'Finland\u00E9s',\n\t\t\t'mejs.french': 'Franc\u00E9s',\n\t\t\t'mejs.galician': 'Gallego',\n\t\t\t'mejs.german': 'Alem\u00E1n',\n\t\t\t'mejs.greek': 'Griego',\n\t\t\t'mejs.haitian-creole': 'Haitiano Criollo',\n\t\t\t'mejs.hebrew': 'Hebreo',\n\t\t\t'mejs.hindi': 'Hindi',\n\t\t\t'mejs.hungarian': 'H\u00FAngaro',\n\t\t\t'mejs.icelandic': 'Island\u00E9s',\n\t\t\t'mejs.indonesian': 'Indonesio',\n\t\t\t'mejs.irish': 'Irland\u00E9s',\n\t\t\t'mejs.italian': 'Italiano',\n\t\t\t'mejs.japanese': 'Japon\u00E9s',\n\t\t\t'mejs.korean': 'Coreano',\n\t\t\t'mejs.latvian': 'Let\u00F3n',\n\t\t\t'mejs.lithuanian': 'Lituano',\n\t\t\t'mejs.macedonian': 'Macedonio',\n\t\t\t'mejs.malay': 'Malayo',\n\t\t\t'mejs.maltese': 'Malt\u00E9s',\n\t\t\t'mejs.norwegian': 'Noruego',\n\t\t\t'mejs.persian': 'Persa',\n\t\t\t'mejs.polish': 'Polaco',\n\t\t\t'mejs.portuguese': 'Portugu\u00E9s',\n\t\t\t'mejs.romanian': 'Rumano',\n\t\t\t'mejs.russian': 'Ruso',\n\t\t\t'mejs.serbian': 'Serbio',\n\t\t\t'mejs.slovak': 'Eslovaco',\n\t\t\t'mejs.slovenian': 'Eslovenio',\n\t\t\t'mejs.spanish': 'Espa\u00F1ol',\n\t\t\t'mejs.swahili': 'Swahili',\n\t\t\t'mejs.swedish': 'Suizo',\n\t\t\t'mejs.tagalog': 'Tagalog',\n\t\t\t'mejs.thai': 'Tailand\u00E9s',\n\t\t\t'mejs.turkish': 'Turco',\n\t\t\t'mejs.ukrainian': 'Ucraniano',\n\t\t\t'mejs.vietnamese': 'Vietnamita',\n\t\t\t'mejs.welsh': 'Gal\u00E9s',\n\t\t\t'mejs.yiddish': 'Yiddish'\n\t\t};\n\t}\n})(mejs.i18n);\n", "/*!\n * MediaElement.js\n * http://www.mediaelementjs.com/\n *\n * Wrapper that mimics native HTML5 MediaElement (audio and video)\n * using a variety of technologies (pure JavaScript, Flash, iframe)\n *\n * Copyright 2010-2017, John Dyer (http://j.hn/)\n * License: MIT\n *\n */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){\n'use strict';\n\nvar VimeoApi = {\n\n\tpromise: null,\n\n\tload: function load(settings) {\n\n\t\tif (typeof Vimeo !== 'undefined') {\n\t\t\tVimeoApi._createPlayer(settings);\n\t\t} else {\n\t\t\tVimeoApi.promise = VimeoApi.promise || mejs.Utils.loadScript('https://player.vimeo.com/api/player.js');\n\t\t\tVimeoApi.promise.then(function () {\n\t\t\t\tVimeoApi._createPlayer(settings);\n\t\t\t});\n\t\t}\n\t},\n\n\t_createPlayer: function _createPlayer(settings) {\n\t\tvar player = new Vimeo.Player(settings.iframe);\n\t\twindow['__ready__' + settings.id](player);\n\t},\n\n\tgetVimeoId: function getVimeoId(url) {\n\t\tif (url == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar parts = url.split('?');\n\t\turl = parts[0];\n\n\t\tvar playerLinkMatch = url.match(/https:\\/\\/player.vimeo.com\\/video\\/(\\d+)$/);\n\t\tif (playerLinkMatch) {\n\t\t\treturn parseInt(playerLinkMatch[1], 10);\n\t\t}\n\n\t\tvar vimeoLinkMatch = url.match(/https:\\/\\/vimeo.com\\/(\\d+)$/);\n\t\tif (vimeoLinkMatch) {\n\t\t\treturn parseInt(vimeoLinkMatch[1], 10);\n\t\t}\n\n\t\tvar privateVimeoLinkMatch = url.match(/https:\\/\\/vimeo.com\\/(\\d+)\\/\\w+$/);\n\t\tif (privateVimeoLinkMatch) {\n\t\t\treturn parseInt(privateVimeoLinkMatch[1], 10);\n\t\t}\n\n\t\treturn NaN;\n\t}\n};\n\nvar vimeoIframeRenderer = {\n\n\tname: 'vimeo_iframe',\n\toptions: {\n\t\tprefix: 'vimeo_iframe'\n\t},\n\n\tcanPlayType: function canPlayType(type) {\n\t\treturn ~['video/vimeo', 'video/x-vimeo'].indexOf(type.toLowerCase());\n\t},\n\n\tcreate: function create(mediaElement, options, mediaFiles) {\n\t\tvar apiStack = [],\n\t\t    vimeo = {},\n\t\t    readyState = 4;\n\n\t\tvar paused = true,\n\t\t    volume = 1,\n\t\t    oldVolume = volume,\n\t\t    currentTime = 0,\n\t\t    bufferedTime = 0,\n\t\t    ended = false,\n\t\t    duration = 0,\n\t\t    vimeoPlayer = null,\n\t\t    url = '';\n\n\t\tvimeo.options = options;\n\t\tvimeo.id = mediaElement.id + '_' + options.prefix;\n\t\tvimeo.mediaElement = mediaElement;\n\n\t\tvar errorHandler = function errorHandler(error) {\n\t\t\tmediaElement.generateError('Code ' + error.name + ': ' + error.message, mediaFiles);\n\t\t};\n\n\t\tvar props = mejs.html5media.properties,\n\t\t    assignGettersSetters = function assignGettersSetters(propName) {\n\n\t\t\tvar capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\tvimeo['get' + capName] = function () {\n\t\t\t\tif (vimeoPlayer !== null) {\n\t\t\t\t\tvar value = null;\n\n\t\t\t\t\tswitch (propName) {\n\t\t\t\t\t\tcase 'currentTime':\n\t\t\t\t\t\t\treturn currentTime;\n\t\t\t\t\t\tcase 'duration':\n\t\t\t\t\t\t\treturn duration;\n\t\t\t\t\t\tcase 'volume':\n\t\t\t\t\t\t\treturn volume;\n\t\t\t\t\t\tcase 'muted':\n\t\t\t\t\t\t\treturn volume === 0;\n\t\t\t\t\t\tcase 'paused':\n\t\t\t\t\t\t\treturn paused;\n\t\t\t\t\t\tcase 'ended':\n\t\t\t\t\t\t\treturn ended;\n\t\t\t\t\t\tcase 'src':\n\t\t\t\t\t\t\tvimeoPlayer.getVideoUrl().then(function (_url) {\n\t\t\t\t\t\t\t\turl = _url;\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn url;\n\t\t\t\t\t\tcase 'buffered':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstart: function start() {\n\t\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tend: function end() {\n\t\t\t\t\t\t\t\t\treturn bufferedTime * duration;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tlength: 1\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tcase 'readyState':\n\t\t\t\t\t\t\treturn readyState;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvimeo['set' + capName] = function (value) {\n\t\t\t\tif (vimeoPlayer !== null) {\n\t\t\t\t\tswitch (propName) {\n\t\t\t\t\t\tcase 'src':\n\t\t\t\t\t\t\tvar _url2 = typeof value === 'string' ? value : value[0].src,\n\t\t\t\t\t\t\t    videoId = VimeoApi.getVimeoId(_url2);\n\n\t\t\t\t\t\t\tvimeoPlayer.loadVideo(videoId).then(function () {\n\t\t\t\t\t\t\t\tif (mediaElement.originalNode.autoplay) {\n\t\t\t\t\t\t\t\t\tvimeoPlayer.play();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'currentTime':\n\t\t\t\t\t\t\tvimeoPlayer.setCurrentTime(value).then(function () {\n\t\t\t\t\t\t\t\tcurrentTime = value;\n\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\tvar event = mejs.Utils.createEvent('timeupdate', vimeo);\n\t\t\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\t\t}, 50);\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'volume':\n\t\t\t\t\t\t\tvimeoPlayer.setVolume(value).then(function () {\n\t\t\t\t\t\t\t\tvolume = value;\n\t\t\t\t\t\t\t\toldVolume = volume;\n\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\tvar event = mejs.Utils.createEvent('volumechange', vimeo);\n\t\t\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\t\t}, 50);\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'loop':\n\t\t\t\t\t\t\tvimeoPlayer.setLoop(value).catch(function (error) {\n\t\t\t\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'muted':\n\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\tvimeoPlayer.setVolume(0).then(function () {\n\t\t\t\t\t\t\t\t\tvolume = 0;\n\t\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\t\tvar event = mejs.Utils.createEvent('volumechange', vimeo);\n\t\t\t\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\t\t\t}, 50);\n\t\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvimeoPlayer.setVolume(oldVolume).then(function () {\n\t\t\t\t\t\t\t\t\tvolume = oldVolume;\n\t\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\t\tvar event = mejs.Utils.createEvent('volumechange', vimeo);\n\t\t\t\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\t\t\t}, 50);\n\t\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'readyState':\n\t\t\t\t\t\t\tvar event = mejs.Utils.createEvent('canplay', vimeo);\n\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tapiStack.push({ type: 'set', propName: propName, value: value });\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var i = 0, total = props.length; i < total; i++) {\n\t\t\tassignGettersSetters(props[i]);\n\t\t}\n\n\t\tvar methods = mejs.html5media.methods,\n\t\t    assignMethods = function assignMethods(methodName) {\n\t\t\tvimeo[methodName] = function () {\n\t\t\t\tif (vimeoPlayer !== null) {\n\t\t\t\t\tswitch (methodName) {\n\t\t\t\t\t\tcase 'play':\n\t\t\t\t\t\t\tpaused = false;\n\t\t\t\t\t\t\treturn vimeoPlayer.play();\n\t\t\t\t\t\tcase 'pause':\n\t\t\t\t\t\t\tpaused = true;\n\t\t\t\t\t\t\treturn vimeoPlayer.pause();\n\t\t\t\t\t\tcase 'load':\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tapiStack.push({ type: 'call', methodName: methodName });\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\n\t\tfor (var _i = 0, _total = methods.length; _i < _total; _i++) {\n\t\t\tassignMethods(methods[_i]);\n\t\t}\n\n\t\twindow['__ready__' + vimeo.id] = function (_vimeoPlayer) {\n\n\t\t\tmediaElement.vimeoPlayer = vimeoPlayer = _vimeoPlayer;\n\n\t\t\tif (apiStack.length) {\n\t\t\t\tfor (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {\n\t\t\t\t\tvar stackItem = apiStack[_i2];\n\n\t\t\t\t\tif (stackItem.type === 'set') {\n\t\t\t\t\t\tvar propName = stackItem.propName,\n\t\t\t\t\t\t    capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);\n\n\t\t\t\t\t\tvimeo['set' + capName](stackItem.value);\n\t\t\t\t\t} else if (stackItem.type === 'call') {\n\t\t\t\t\t\tvimeo[stackItem.methodName]();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mediaElement.originalNode.muted) {\n\t\t\t\tvimeoPlayer.setVolume(0);\n\t\t\t\tvolume = 0;\n\t\t\t}\n\n\t\t\tvar vimeoIframe = document.getElementById(vimeo.id);\n\t\t\tvar events = void 0;\n\n\t\t\tevents = ['mouseover', 'mouseout'];\n\n\t\t\tvar assignEvents = function assignEvents(e) {\n\t\t\t\tvar event = mejs.Utils.createEvent(e.type, vimeo);\n\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t};\n\n\t\t\tfor (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {\n\t\t\t\tvimeoIframe.addEventListener(events[_i3], assignEvents, false);\n\t\t\t}\n\n\t\t\tvimeoPlayer.on('loaded', function () {\n\t\t\t\tvimeoPlayer.getDuration().then(function (loadProgress) {\n\t\t\t\t\tduration = loadProgress;\n\t\t\t\t\tif (duration > 0) {\n\t\t\t\t\t\tbufferedTime = duration * loadProgress;\n\t\t\t\t\t\tif (mediaElement.originalNode.autoplay) {\n\t\t\t\t\t\t\tpaused = false;\n\t\t\t\t\t\t\tended = false;\n\t\t\t\t\t\t\tvar event = mejs.Utils.createEvent('play', vimeo);\n\t\t\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).catch(function (error) {\n\t\t\t\t\terrorHandler(error, vimeo);\n\t\t\t\t});\n\t\t\t});\n\t\t\tvimeoPlayer.on('progress', function () {\n\t\t\t\tvimeoPlayer.getDuration().then(function (loadProgress) {\n\t\t\t\t\tduration = loadProgress;\n\n\t\t\t\t\tif (duration > 0) {\n\t\t\t\t\t\tbufferedTime = duration * loadProgress;\n\t\t\t\t\t\tif (mediaElement.originalNode.autoplay) {\n\t\t\t\t\t\t\tvar initEvent = mejs.Utils.createEvent('play', vimeo);\n\t\t\t\t\t\t\tmediaElement.dispatchEvent(initEvent);\n\n\t\t\t\t\t\t\tvar playingEvent = mejs.Utils.createEvent('playing', vimeo);\n\t\t\t\t\t\t\tmediaElement.dispatchEvent(playingEvent);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar event = mejs.Utils.createEvent('progress', vimeo);\n\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t}).catch(function (error) {\n\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t});\n\t\t\t});\n\t\t\tvimeoPlayer.on('timeupdate', function () {\n\t\t\t\tvimeoPlayer.getCurrentTime().then(function (seconds) {\n\t\t\t\t\tcurrentTime = seconds;\n\t\t\t\t\tvar event = mejs.Utils.createEvent('timeupdate', vimeo);\n\t\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t\t}).catch(function (error) {\n\t\t\t\t\treturn errorHandler(error);\n\t\t\t\t});\n\t\t\t});\n\t\t\tvimeoPlayer.on('play', function () {\n\t\t\t\tpaused = false;\n\t\t\t\tended = false;\n\t\t\t\tvar event = mejs.Utils.createEvent('play', vimeo);\n\t\t\t\tmediaElement.dispatchEvent(event);\n\n\t\t\t\tvar playingEvent = mejs.Utils.createEvent('playing', vimeo);\n\t\t\t\tmediaElement.dispatchEvent(playingEvent);\n\t\t\t});\n\t\t\tvimeoPlayer.on('pause', function () {\n\t\t\t\tpaused = true;\n\t\t\t\tended = false;\n\n\t\t\t\tvar event = mejs.Utils.createEvent('pause', vimeo);\n\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t});\n\t\t\tvimeoPlayer.on('ended', function () {\n\t\t\t\tpaused = false;\n\t\t\t\tended = true;\n\n\t\t\t\tvar event = mejs.Utils.createEvent('ended', vimeo);\n\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t});\n\n\t\t\tevents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];\n\n\t\t\tfor (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) {\n\t\t\t\tvar event = mejs.Utils.createEvent(events[_i4], vimeo);\n\t\t\t\tmediaElement.dispatchEvent(event);\n\t\t\t}\n\t\t};\n\n\t\tvar height = mediaElement.originalNode.height,\n\t\t    width = mediaElement.originalNode.width,\n\t\t    vimeoContainer = document.createElement('iframe'),\n\t\t    standardUrl = 'https://player.vimeo.com/video/' + VimeoApi.getVimeoId(mediaFiles[0].src);\n\n\t\tvar queryArgs = ~mediaFiles[0].src.indexOf('?') ? '?' + mediaFiles[0].src.slice(mediaFiles[0].src.indexOf('?') + 1) : '';\n\t\tvar args = [];\n\n\t\tif (mediaElement.originalNode.autoplay && queryArgs.indexOf('autoplay') === -1) {\n\t\t\targs.push('autoplay=1');\n\t\t}\n\t\tif (mediaElement.originalNode.loop && queryArgs.indexOf('loop') === -1) {\n\t\t\targs.push('loop=1');\n\t\t}\n\n\t\tqueryArgs = '' + queryArgs + (queryArgs ? '&' : '?') + args.join('&');\n\n\t\tvimeoContainer.setAttribute('id', vimeo.id);\n\t\tvimeoContainer.setAttribute('width', width);\n\t\tvimeoContainer.setAttribute('height', height);\n\t\tvimeoContainer.setAttribute('frameBorder', '0');\n\t\tvimeoContainer.setAttribute('src', '' + standardUrl + queryArgs);\n\t\tvimeoContainer.setAttribute('webkitallowfullscreen', 'true');\n\t\tvimeoContainer.setAttribute('mozallowfullscreen', 'true');\n\t\tvimeoContainer.setAttribute('allowfullscreen', 'true');\n\t\tvimeoContainer.setAttribute('allow', 'autoplay');\n\n\t\tmediaElement.originalNode.parentNode.insertBefore(vimeoContainer, mediaElement.originalNode);\n\t\tmediaElement.originalNode.style.display = 'none';\n\n\t\tVimeoApi.load({\n\t\t\tiframe: vimeoContainer,\n\t\t\tid: vimeo.id\n\t\t});\n\n\t\tvimeo.hide = function () {\n\t\t\tvimeo.pause();\n\t\t\tif (vimeoPlayer) {\n\t\t\t\tvimeoContainer.style.display = 'none';\n\t\t\t}\n\t\t};\n\t\tvimeo.setSize = function (width, height) {\n\t\t\tvimeoContainer.setAttribute('width', width);\n\t\t\tvimeoContainer.setAttribute('height', height);\n\t\t};\n\t\tvimeo.show = function () {\n\t\t\tif (vimeoPlayer) {\n\t\t\t\tvimeoContainer.style.display = '';\n\t\t\t}\n\t\t};\n\n\t\tvimeo.destroy = function () {};\n\n\t\treturn vimeo;\n\t}\n};\n\nmejs.Utils.typeChecks.push(function (url) {\n\treturn (/(\\/\\/player\\.vimeo|vimeo\\.com)/i.test(url) ? 'video/x-vimeo' : null\n\t);\n});\n\nmejs.Renderers.add(vimeoIframeRenderer);\n\n},{}]},{},[1]);\n", "import 'mediaelement'\n\n// Playback speed control for mediaelement.js, enabled by adding 'speed' to the player's features.\n// The label is passed as player option `speedText` (translated in views.defaults.playback_speed).\n// Supported by the html5 (incl. DASH/HLS) and YouTube renderers; the Vimeo renderer has no playbackRate.\n// A native select is used, so keyboard and screen reader support come for free (the screen reader\n// reads the label and the selected rate, no live region needed).\n\nconst RATES = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2]\n\nObject.assign(MediaElementPlayer.prototype, {\n    buildspeed(player, controls, layers, media) {\n        if (media.rendererName === 'vimeo_iframe') return\n\n        const prefix = player.options.classPrefix\n        const id = `${player.id}_speed`\n        const format = new Intl.NumberFormat(document.documentElement.lang)\n        const wrapper = document.createElement('div')\n        wrapper.className = `${prefix}speed`\n        wrapper.innerHTML =\n            `<label for=\"${id}\" class=\"${prefix}offscreen\"></label>` +\n            `<select id=\"${id}\" class=\"${prefix}speed-selector\">` +\n            RATES.map(rate => `<option value=\"${rate}\"${rate === 1 ? ' selected' : ''}>${format.format(rate)}\u00D7</option>`).join('') +\n            `</select>`\n        wrapper.querySelector('label').textContent = player.options.speedText\n        player.addControlElement(wrapper, 'speed')\n\n        const select = wrapper.querySelector('select')\n        let rate = 1\n        select.addEventListener('change', () => {\n            rate = parseFloat(select.value)\n            media.playbackRate = rate\n        })\n        // Arrow keys and space would otherwise trigger the player's volume/seek/play shortcuts.\n        select.addEventListener('keydown', e => e.stopPropagation())\n        // Loading a (new) source resets the rate to the default rate.\n        media.addEventListener('loadedmetadata', () => {\n            if (rate !== 1) media.playbackRate = rate\n        })\n        media.addEventListener('ratechange', () => {\n            const current = String(media.playbackRate)\n            if (select.querySelector(`option[value=\"${current}\"]`)) select.value = current\n        })\n    }\n})\n", "import {Controller} from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n    static targets = ['elementType'];\n\n    connect() {\n        console.log(\"ElementStatisticsController connected\");\n        this._setupTabChangeListener();\n        this._setLoader();\n        this._submitForm();\n    }\n\n    _setupTabChangeListener() {\n        const tabs = this.element.querySelectorAll('button[data-bs-toggle=\"tab\"]');\n        tabs.forEach((tab) => {\n            tab.addEventListener('shown.bs.tab', (event) => {\n                const elementType = this._getElementType(event);\n                this._updateElementType(elementType);\n\n                const activeTabPane = document.querySelector(`#${elementType}`);\n                if (activeTabPane && !activeTabPane.querySelector(\".card-group\")) {\n                    this._setLoader();\n                    this._submitForm();\n                }\n            });\n        });\n    }\n\n    _setLoader() {\n        const activeTab = document.querySelector(\".tab-pane.active\");\n        const informationsFrame = activeTab.querySelector(`#${this.elementTypeTarget.value}_informations`);\n        informationsFrame.innerHTML = this.data.get('loader');\n        const tableFrame = activeTab.querySelector(`#${this.elementTypeTarget.value}_table`);\n        tableFrame.innerHTML = this.data.get('loader');\n    }\n\n    _getElementType(event) {\n        let target = event.target.getAttribute('data-bs-target');\n        const elementType = target.slice(1);\n        console.log(`Type: ${elementType}`);\n        return elementType;\n    }\n\n    _updateElementType(elementType) {\n        this.elementTypeTarget.value = elementType;\n    }\n\n    _submitForm() {\n        const form = document.getElementById(`element_statistics_${this.elementTypeTarget.value}_form`);\n        Rails.fire(form, 'submit');\n    }\n}\n", "import {Controller} from \"@hotwired/stimulus\";\nimport {Tab} from \"bootstrap\";\n\nexport default class extends Controller {\n\n    connect() {\n        this._setupTabChangeListener();\n        this._openTabFromHash();\n    }\n\n    _setupTabChangeListener() {\n        const tabs = this.element.querySelectorAll(\n            'button[data-bs-toggle=\"tab\"]'\n        );\n\n        tabs.forEach((tab) => {\n            tab.addEventListener('shown.bs.tab', (event) => {\n\n                event.target.classList.add('fw-bold');\n                event.relatedTarget?.classList.remove('fw-bold');\n\n                const elementType = this._getElementType(event);\n\n                const content = this.element.querySelector(\n                    `#${elementType} [data-user-profile-content]`\n                );\n\n                if (content && content.children.length === 0) {\n                    this._setLoader(content);\n                    this._loadContent(content);\n                }\n            });\n        });\n    }\n\n    _openTabFromHash() {\n        if (!window.location.hash) return;\n\n        const tab = this.element.querySelector(`button[data-bs-target=\"${CSS.escape(window.location.hash)}\"]`);\n        if (tab) Tab.getOrCreateInstance(tab).show();\n    }\n\n    _getElementType(event) {\n        const target = event.target.getAttribute('data-bs-target');\n        return target.slice(1);\n    }\n\n    _setLoader(content) {\n        content.innerHTML = this.data.get('loader');\n    }\n\n    async _loadContent(content) {\n        const url = new URL(content.dataset.userProfileUrl);\n        const response = await fetch(url, {headers: {'X-Requested-With': 'XMLHttpRequest'}});\n        content.replaceChildren(document.createRange().createContextualFragment(await response.text()));\n    }\n}", "class DomParserSupport {\n    static get isSupported() {\n        if (!window.DOMParser) return false\n        let parser = new DOMParser()\n        try {\n            parser.parseFromString('x', 'text/html')\n        } catch (_error) {\n            return false\n        }\n        return true\n    }\n\n    static parse(text) {\n        const parser = new DOMParser()\n        let documentFragment = new DocumentFragment()\n        let doc = parser.parseFromString(text, 'text/html')\n        const children = Array.from(doc.querySelector('body').children)\n        Array.prototype.forEach.call(children, (element, _index) => {\n            documentFragment.appendChild(element)\n        })\n\n        return documentFragment\n    }\n}\n\nexport default DomParserSupport\n", "class SupportChecker {\n    static get intersectionObserverSupported() {\n        return 'IntersectionObserver' in window || 'IntersectionObserverEntry' in window ||\n            'intersectionRatio' in window.IntersectionObserverEntry.prototype\n    }\n\n    static get resizeObserverSupported() {\n        return 'ResizeObserver' in window || 'ResizeObserverEntry' in window ||\n            'intersectionRatio' in window.IntersectionObserverEntry.prototype\n    }\n\n    static get localStorageSupported() {\n        return typeof (Storage) !== 'undefined' || ('localStorage' in window && window['localStorage'] !== null)\n    }\n}\n\nexport default SupportChecker\n", "class LoadScripts {\n    static load(domElement) {\n        domElement.querySelectorAll('script').forEach((content) => {\n            const script = document.createElement('script')\n            script.innerHTML = content.innerHTML\n            document.head.appendChild(script).parentNode.removeChild(script)\n        })\n    }\n}\n\nexport default LoadScripts", "import {toast} from './toast'\n\nexport const handleUnauthorized = response => {\n    const contentType = response.headers.get('content-type')\n\n    if (contentType.includes('application/json')) {\n        response.json().then(json => (toast(json.value, 'error')))\n    } else if (response.body) {\n        response.text().then(text => (toast(text, 'error')))\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport DomParserSupport from '../components/utility/dom_parser_support'\nimport SupportChecker from '../components/utility/support_checker'\nimport LoadScripts from '../components/utility/load_scripts'\nimport {handleUnauthorized} from '../components/utility/handle_unauthorized'\n\nexport default class extends Controller {\n    static values = {\n        debug: {type: Boolean, default: false},\n        url: String,\n        autoload: {type: Boolean, default: true},\n        alternativeTargetQuery: String,\n        refreshInterval: Number,\n        spinner: String,\n        removeTargetOnFailure: false,\n        spinnerLabel: {type: String, default: 'Loading...'},\n        notifyResizeOnLoad: {type: Boolean, default: false},\n        loadOnce: {type: Boolean, default: false}\n    }\n    static targets = ['target', 'title', 'footer']\n\n    connect() {\n        this._log('connected')\n        if (this.autoloadValue === true) this.load()\n\n        this.element['fetchHtml'] = {reload: this.reload.bind(this)}\n\n        if (this.loadOnceValue) {\n            this._onShown = this._handleShown.bind(this)\n            document.addEventListener('shown.bs.collapse', this._onShown)\n        }\n    }\n\n    disconnect() {\n        this._log('disconnected')\n        this._stopRefreshing()\n        this.intersectionObserver && this.intersectionObserver.disconnect()\n        if (this._onShown) document.removeEventListener('shown.bs.collapse', this._onShown)\n    }\n\n    load() {\n        this._log('load called')\n        if (this.loadOnceValue) {\n            if (this._loadRequested) {\n                if (this._loading) this._notifyAfterLoad = true\n                return\n            }\n            this._loadRequested = true\n        }\n        this._fetch({ notifyResize: this.notifyResizeOnLoadValue })\n        if (this.hasRefreshIntervalValue) this._startRefreshing()\n    }\n\n    prefetch() {\n        if (!this.loadOnceValue || this._loadRequested) return\n        this._log('prefetch called')\n        this._loadRequested = true\n        this._fetch({ notifyResize: false })\n    }\n\n    _handleShown(event) {\n        if (!this.notifyResizeOnLoadValue || !this.hasAlternativeTargetQueryValue) return\n        if (event.target !== this.target) return\n        if (this._loading) {\n            this._notifyAfterLoad = true\n            return\n        }\n        this.dispatch('contentChanged')\n    }\n    reload(options = {}) {\n        if (options.spinner === false) {\n            this.target.setAttribute('aria-busy', 'true')\n        } else {\n            this.target.innerHTML = this.spinner\n        }\n        return this._fetch({ notifyResize: options.notifyResize !== false })\n    }\n\n    _load() {\n        this._log('load called')\n        this._fetch({ notifyResize: false })\n        if (this.hasRefreshIntervalValue) this._startRefreshing()\n    }\n\n    _fetch({ notifyResize = false } = {}) {\n        this._log('fetch called')\n        this._loading = true\n        return fetch(this.urlValue, {\n            credentials: 'same-origin',\n            headers: {\n                'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`,\n                'X-Requested-With': 'XMLHttpRequest'\n            }\n        }).then(response => {\n            if (response.status === 401) handleUnauthorized(response)\n            if (!response.ok || response.redirected) throw new Error('Network response was not ok')\n            if (response.status === 201) this._stopRefreshing()\n            return response.text()\n        }).then(text => {\n            if (text.length === 0) return\n            const parsed = DomParserSupport.isSupported\n                ? DomParserSupport.parse(text)\n                : (() => { const d = document.createElement('div'); d.innerHTML = text; return d })()\n\n            if (this.hasTitleTarget) {\n                const newTitle = parsed.querySelector('[data-widget-title]')\n                if (newTitle) {\n                    const pendingFocus = this._captureFocusBeforeReplace(this.titleTarget)\n\n                    this.titleTarget.innerHTML = newTitle.innerHTML\n                    if (this.titleTarget.querySelector('a')) {\n                        this.titleTarget.removeAttribute('tabindex')\n                        this.titleTarget.removeAttribute('aria-label')\n                    } else {\n                        this.titleTarget.setAttribute('tabindex', '0')\n                        this.titleTarget.setAttribute('aria-label', this.titleTarget.textContent.trim())\n                    }\n                    newTitle.remove()\n\n                    this._restoreFocusAfterReplace(pendingFocus, this.titleTarget)\n                }\n            }\n\n            if (this.hasFooterTarget){\n                const newFooter = parsed.querySelector('[data-widget-footer]')\n                if(newFooter){\n                    const pendingFocus = this._captureFocusBeforeReplace(this.footerTarget)\n\n                    this.footerTarget.innerHTML = newFooter.innerHTML\n                    this.footerTarget.title = newFooter.title\n                    newFooter.remove()\n\n                    this._restoreFocusAfterReplace(pendingFocus, this.footerTarget)\n                }\n            }\n\n            const triggerFocusParked = this._triggerFocusIsParked()\n\n            this._keepAnchorStable()\n\n            if (DomParserSupport.isSupported) {\n                while (this.target.firstChild) this.target.removeChild(this.target.firstChild)\n                this.target.appendChild(parsed)\n            } else {\n                this.target.innerHTML = parsed.innerHTML\n            }\n\n            if (triggerFocusParked) this._restoreTriggerFocus()\n        }).then(() => {\n            this._loading = false\n            this.target.removeAttribute('aria-busy')\n            LoadScripts.load(this.target)\n            const notifyNow = notifyResize || this._notifyAfterLoad\n            this._notifyAfterLoad = false\n            if (notifyNow) this.dispatch('contentChanged')\n        }).catch(error => {\n            this._loading = false\n            this._notifyAfterLoad = false\n            this._loadRequested = false\n            this._handleError()\n            console.log(error)\n        })\n    }\n\n    _keepAnchorStable(durationMs = 2000) {\n        const anchor = window.__lastFocusedElement\n        if (!anchor || !anchor.isConnected) return\n\n        const startTop = anchor.getBoundingClientRect().top\n        let active = true\n\n        const correct = () => {\n            if (!active || !anchor.isConnected) return\n            const delta = anchor.getBoundingClientRect().top - startTop\n            if (Math.abs(delta) > 1) window.scrollBy(0, delta)\n        }\n\n        const observer = new ResizeObserver(correct)\n        observer.observe(document.body)\n\n        setTimeout(() => {\n            active = false\n            observer.disconnect()\n        }, durationMs)\n    }\n\n    _triggerFocusIsParked() {\n        const active = document.activeElement\n        if (!active) return false\n        return !!(\n            window.__a11yFocusResetElement &&\n            active === window.__a11yFocusResetElement &&\n            window.__lastFocusedElement === this.element\n        )\n    }\n\n    _restoreTriggerFocus() {\n        if (typeof window.refocusAndScrollIntoView === 'function') {\n            window.refocusAndScrollIntoView(this.element)\n        } else {\n            this.element.focus()\n        }\n    }\n\n    _captureFocusBeforeReplace(container) {\n        const active = document.activeElement\n\n        let candidate = null\n        if (active && container.contains(active)) {\n            candidate = active\n        } else if (\n            active &&\n            window.__a11yFocusResetElement &&\n            active === window.__a11yFocusResetElement &&\n            window.__lastFocusedElement &&\n            container.contains(window.__lastFocusedElement)\n        ) {\n            candidate = window.__lastFocusedElement\n        }\n\n        if (!candidate) return null\n\n        const signature = this._buildFocusSignature(candidate)\n        return signature\n    }\n    _buildFocusSignature(el) {\n        if (el.id) return `#${CSS.escape(el.id)}`\n        if (el.dataset && el.dataset.action) return `[data-action=\"${CSS.escape(el.dataset.action)}\"]`\n        const label = el.getAttribute('aria-label')\n        if (label) return `[aria-label=\"${CSS.escape(label)}\"]`\n        return null\n    }\n\n    _restoreFocusAfterReplace(signature, container) {\n        if (!signature) return\n\n        const replacement = container.querySelector(signature)\n        if (replacement && typeof window.refocusAndScrollIntoView === 'function') {\n            this._log(`refocus after replace: ${signature}`)\n            window.refocusAndScrollIntoView(replacement)\n        } else {\n            this._log(`nor replacment element for: ${signature}`)\n        }\n    }\n\n    _handleError() {\n        this._stopRefreshing()\n        this.target?.removeAttribute('aria-busy')\n        if (this.removeTargetOnFailureValue) {\n            this.target.remove()\n        } else {\n            this.target.innerText = 'Error'\n        }\n    }\n\n    _startRefreshing() {\n        this._log('startRefreshing called')\n        this.refreshTimer = setInterval(() => {\n            this._fetch()\n        }, this.refreshIntervalValue)\n    }\n\n    _stopRefreshing() {\n        if (this.refreshTimer) clearInterval(this.refreshTimer)\n    }\n\n    _lazyLoad() {\n        this.intersectionObserver = new IntersectionObserver((entries, observer) => {\n            entries.forEach((entry) => {\n                if (entry.isIntersecting) {\n                    this._load()\n                    observer.unobserve(entry.target)\n                }\n            })\n        })\n        this.intersectionObserver.observe(this.target)\n    }\n\n    _log(message) {\n        if (this.debugValue === true) console.log(`DEBUG fetch-html: ${message}`)\n    }\n\n    get spinner() {\n        return this.spinnerValue || `<div class=\"text-center py-4\"><div class=\"spinner-border\" role=\"status\"><span class=\"visually-hidden\">${this.spinnerLabelValue}</span></div></div>`\n    }\n\n    get target() {\n        if (this.hasAlternativeTargetQueryValue) {\n            return document.querySelector(this.alternativeTargetQueryValue)\n        } else {\n            return this.targetTarget\n        }\n    }\n}", "/*\n  Filterable Stimulus Controller v0.0.1\n\n  You can filter all kinds of Dom Elements from given an input element which triggers the filter function.\n  Every element specified with the 'data-filterable-target=\"element\"' attribute will be considers for the filter.\n  You can set a 'data-filterable-target=\"curriculum\"' in which a text is displayed when the filter does not match any\n  element.\n */\nimport {Controller} from '@hotwired/stimulus'\nimport {debounce} from 'debounce'\n\nexport default class extends Controller {\n    static values = {noEntriesHint: {type: String, default: '<p class=\"text-center text-muted\">No entries found</p>'}}\n    static targets = ['element', 'curriculum']\n\n    initialize() {\n        this.filter = debounce(this.filter, 500)\n    }\n\n    connect() {\n        let template = document.createElement('template')\n        template.innerHTML = this.noEntriesHintValue.trim()\n        this._noEntriesHint = template.content.firstChild\n    }\n\n    filter(event) {\n        const inputValue = event.target.value.trim().toLowerCase()\n        Array.prototype.forEach.call(this.elementTargets, function (element) {\n            if (element.textContent.toLowerCase().indexOf(inputValue) > -1) {\n                element.classList.remove('visually-hidden')\n            } else {\n                element.classList.add('visually-hidden')\n            }\n        })\n        this._handleNoEntriesHint()\n    }\n\n    _handleNoEntriesHint() {\n        if (this.curriculumTarget.querySelectorAll(':scope > div:not(.visually-hidden)').length === 0) {\n            this.curriculumTarget.appendChild(this._noEntriesHint)\n        } else if (this.curriculumTarget.contains(this._noEntriesHint)) {\n            this.curriculumTarget.removeChild(this._noEntriesHint)\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {Modal} from 'bootstrap';\n\nexport default class extends Controller {\n    initialize() {\n        this.element.dataset.preventLeave = \"false\";\n        Object.defineProperty(this, 'preventLeave', {\n            get: () => this.element.dataset.preventLeave === \"true\",\n            set: (value) => {\n                this.element.dataset.preventLeave = value ? \"true\" : \"false\";\n            },\n            configurable: true,\n        });\n        this._setupListeners()\n    }\n\n    _setupListeners() {\n        ['input', 'change'].forEach(type => {\n            this.element.addEventListener(type, () => (this.preventLeave = true))\n        })\n        this.element.addEventListener('submit', () => (this.preventLeave = false))\n\n        window.addEventListener('beforeunload', event => {\n            if (this.preventLeave) {\n                // do NOT remove this text! It is not shown, but it is required in firefox\n                event.returnValue = 'Are you sure?'\n                return event.returnValue\n            }\n        })\n    }\n\n    // Unique cancel method for the modals to create new chapters and elements in Knowledge entries\n    cancel(event) {\n        if (this.preventLeave) {\n            const message = this.element.dataset.leaveMessage\n            const confirmLeave = confirm(message);\n            if (!confirmLeave) return;\n            this.preventLeave = false;\n        }\n\n        const modalEl = this.element.closest('.modal');\n        const modalInstance = Modal.getOrCreateInstance(modalEl);\n        modalInstance.hide();\n    }\n\n\n}", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    connect() {\n        this._heartbeatTimeout = setInterval(() => {\n            fetch('/heartbeats', {\n                method: 'PATCH',\n                credentials: 'same-origin',\n                headers: {\n                    'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`,\n                    'Accept': 'application/json'\n                }\n            }).then(response => {\n                // The heartbeat extended the session, so the session timeout notice has to restart its countdown\n                if (response.ok) this.dispatch('sent')\n            }).catch(error => console.log(error))\n        }, 300000)\n    }\n\n    disconnect() {\n        if (this._heartbeatTimeout) clearInterval(this._heartbeatTimeout)\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static values = {url: String}\n    static targets = ['entries', 'intersection']\n\n    connect() {\n        this.intersectionObserver = new IntersectionObserver((entries, observer) => {\n            entries.forEach((entry) => {\n                if (entry.isIntersecting) {\n                    this._load()\n                }\n            })\n        })\n        this.intersectionObserver.observe(this.intersectionTarget)\n    }\n\n    _load() {\n        if (this.urlValue.length === 0) {\n            while (this.intersectionTarget.firstChild) this.intersectionTarget.removeChild(this.intersectionTarget.firstChild)\n            return\n        }\n\n        fetch(this.urlValue, {\n            credentials: 'same-origin',\n            headers: {\n                'Accept': 'application/json',\n                'Content-Type': 'application/json',\n                'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`\n            }\n        }).then(response => {\n            if (!response.ok || response.redirected) throw new Error('Network response was not ok')\n            return response.json()\n        }).then(json => {\n            this.entriesTarget.insertAdjacentHTML('afterbegin', json.entries)\n            this.urlValue = json.url\n        }).catch(error => {\n            console.log(error)\n        })\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n    initialize() {\n        this.setShowLeavingAlert('true')\n    }\n\n    leavingPage(event) {\n        if (this.showLeavingAlert()) {\n            // do NOT remove this text! It is not shown, but it is required in firefox\n            event.returnValue = 'Are you sure?'\n            return event.returnValue\n        }\n    }\n\n    allowFormSubmission(_event) {\n        this.setShowLeavingAlert('false')\n    }\n\n    setShowLeavingAlert(showAlert) {\n        this.data.set(\"showAlert\", showAlert)\n    }\n\n    showLeavingAlert() {\n        return this.data.get(\"showAlert\") === 'true'\n    }\n}\n", "import {Controller} from \"@hotwired/stimulus\"\nimport {Modal} from \"bootstrap\"\n\nexport default class extends Controller {\n    static values = {\n        resourceType: String,\n        resourceId: Number,\n        lockTimeInSeconds: Number,\n        redirectPath: String,\n        extendLockPath: String,\n        editLockEnabled: Boolean\n    }\n\n    connect() {\n        console.log(\"TimeoutModalController connected.\");\n        // trigger automatic extension of edit time, if user enters site with little lockTimeInSeconds left\n        if (this.editLockEnabledValue && this.lockTimeInSecondsValue <= 65) {\n            this.extendLockAndHideModal();\n        }\n    }\n\n    disconnect() {\n        console.log(\"TimeoutModalController disconnected.\");\n        this.clearCountdown();\n    }\n\n    /*\n    * Stimulus callback\n    * Entering edit sites set a lockTimeInSecondsValue, which should result in a new countdown\n    */\n    lockTimeInSecondsValueChanged(newValue, oldValue) {\n        if (this.lockTimeInSecondsValue > 65) {\n            console.log(`Lock time changed from ${oldValue} to ${newValue}.`);\n            this.restartCountdown();\n        }\n    }\n\n    // response triggers callback lockTimeInSecondsValueChanged\n    extendLockAndHideModal() {\n        Rails.ajax({\n            type: \"GET\",\n            url: this.extendLockPathValue,\n            dataType: \"script\",\n            success: () => {\n                console.log(\"Lock automatically extended.\");\n\n                const modalElement = document.getElementById('timeoutModal');\n                if (modalElement) {\n                    const modal = Modal.getInstance(modalElement) || new Modal(modalElement);\n                    this.removeModal(modal, modalElement);\n                }\n            },\n            error: (err) => {\n                console.log(\"Failed to extend lock:\", err);\n                this.showModal();\n            }\n        });\n    }\n\n    restartCountdown() {\n        this.clearCountdown();\n        this.startCountdown();\n        console.log(\"Countdown restarted.\");\n    }\n\n    clearCountdown() {\n        clearTimeout(this.countdownTimeout);\n        this.countdownTimeout = null;\n        console.log('Countdown cleared.');\n    }\n\n    startCountdown() {\n        const lockTimeInMilliseconds = (this.lockTimeInSecondsValue - 65) * 1000;\n\n        this.countdownTimeout = setTimeout(() => {\n            this.handleTimeout();\n        }, lockTimeInMilliseconds);\n\n        console.log(`Countdown started for ${this.lockTimeInSecondsValue} seconds.`);\n    }\n\n    removeModal(modal, modalElement) {\n        modalElement.addEventListener('hidden.bs.modal', () => {\n            modalElement.remove();\n\n            const modalBackdrop = document.querySelector('.modal-backdrop');\n            if (modalBackdrop) {\n                modalBackdrop.remove();\n            }\n            document.body.style.overflow = '';\n        }, {once: true});\n\n        modal.hide();\n    }\n\n    showModal() {\n        this.closeExistingModals();\n\n        const template = document.getElementById('timeoutModalTemplate');\n        const modalClone = template.content.cloneNode(true);\n        document.body.appendChild(modalClone);\n\n        const modalElement = document.getElementById('timeoutModal');\n        const modal = new Modal(modalElement);\n        modal.show();\n\n        this.addExtendLockListener(modal, modalElement);\n        this.addFormSubmissionListener(modal, modalElement);\n    }\n\n    closeExistingModals() {\n        const openModalCloseButtons = document.querySelectorAll('.modal.show button.btn-close[data-bs-dismiss=\"modal\"]');\n        openModalCloseButtons.forEach(button => button.click());\n    }\n\n    handleTimeout() {\n        if (this.editLockEnabledValue === false) {\n            this.extendLockAndHideModal();\n        } else if (this.uploadIsInProgress()) {\n            console.log(\"Upload in progress. Extending lock automatically.\");\n            this.extendLockAndHideModal();\n        } else {\n            console.log(\"Showing timeout modal.\");\n            this.showModal();\n        }\n    }\n\n    uploadIsInProgress() {\n        return document.querySelector('.is-uploading') !== null;\n    }\n\n    addExtendLockListener(modal, modalElement) {\n        const extendEditLink = modalElement.querySelector('#timeoutContinueButton');\n        extendEditLink.addEventListener('click', (event) => {\n            event.preventDefault();\n\n            // guard against multiple clicks\n            if (extendEditLink.dataset.clicked === 'true') return;\n            extendEditLink.dataset.clicked = 'true';\n\n            // visual / functional disabling\n            extendEditLink.classList.add('disabled');\n            extendEditLink.setAttribute('aria-disabled', 'true');\n            extendEditLink.style.pointerEvents = 'none';\n\n            this.extendLockAndHideModal();\n        }, {once: true});\n    }\n\n    addFormSubmissionListener(modal, modalElement) {\n        const confirmButton = modalElement.querySelector('#timeoutConfirmButton');\n        confirmButton.addEventListener('click', () => {\n            this.removeModal(modal, modalElement);\n            window.onbeforeunload = null;\n            this.saveAndRedirect();\n        });\n    }\n\n    saveAndRedirect() {\n        this.disableFormLeave();\n\n        const autoSaveFlags = document.querySelectorAll('.auto_save_flag');\n        if (autoSaveFlags.length > 0) {\n            autoSaveFlags.forEach((flag) => {\n                flag.value = 'true';\n            });\n            this.saveChanges();\n        } else {\n            window.location.href = this.redirectPathValue;\n        }\n\n        setTimeout(() => {\n            console.log(\"Force redirect.\")\n            this.forceRedirect();\n        }, 3500);\n    }\n\n    saveChanges() {\n        const submitButtons = this.querySubmitButtons();\n        console.log(`Triggering submit on ${submitButtons.length} forms.`);\n        if (submitButtons.length > 0) {\n            submitButtons.forEach((button) => button.click());\n        }\n    }\n\n    querySubmitButtons() {\n        const timeSettingsForm = document.querySelector('#timeSettingsForm');\n        if (timeSettingsForm) {\n            const selectedRadio = document.querySelector('input[name=\"tutorial[time_type]\"]:checked');\n            const radioBsTargetId = selectedRadio.value;\n            const form = this.getTimeSettingsForm(radioBsTargetId);\n            return form ? form.querySelectorAll('button[name=\"button\"][type=\"submit\"]') : [];\n        } else {\n            const selector = 'button[name=\"button\"][type=\"submit\"]:not([data-triggers-external-api])';\n            return document.querySelectorAll(selector);\n        }\n    }\n\n    getTimeSettingsForm(bsTargetId) {\n        if (parseInt(bsTargetId) === 0) {\n            return null;\n        } else if (parseInt(bsTargetId) === 1) {\n            return document.querySelector('#repetitionsAreaForm');\n        } else if (parseInt(bsTargetId) === 2) {\n            return document.querySelector('#exceedsAreaForm');\n        } else if (parseInt(bsTargetId) === 3) {\n            return document.querySelector('#dripFeedSettingsAreaForm');\n        }\n    }\n\n    disableFormLeave() {\n        document.querySelectorAll('[data-controller~=\"form-leave\"]').forEach(el => {\n            el.dataset.preventLeave = \"false\";\n        });\n    }\n\n    forceRedirect() {\n        this.disableFormLeave();\n\n        document.querySelectorAll('form').forEach(form => form.remove());\n        window.location.href = this.redirectPathValue;\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nimport 'mediaelement'\nimport 'mediaelement/build/lang/de'\nimport 'mediaelement/build/lang/fr'\nimport 'mediaelement/build/lang/es'\nimport 'mediaelement/build/renderers/vimeo'\nimport '../components/utility/media_element_speed'\n\nexport default class extends Controller {\n    static targets = ['mediaElement']\n    static values = {dashPath: String, hlsPath: String, iconSpritePath: String, speedText: String}\n\n    initialize() {\n        mejs.i18n.language(document.documentElement.lang)\n    }\n\n    connect() {\n        this._sourceElement = this.mediaElementTarget.querySelector('source')\n        this._sourceType = this._sourceElement.getAttribute('type')\n        if (this._usesExternalSourceType()) {\n            this.mediaElementTarget.removeAttribute('controls')\n            this._disableExternalControls()\n        }\n\n        // strip autoplay so mediaelement's _meReady doesn't fire an uncatchable play()\n        // (leave it for youtube/vimeo, whose renderers read the attribute themselves)\n        this._autoplayRequested = this.mediaElementTarget.hasAttribute('autoplay')\n        if (this._autoplayRequested && !this._usesExternalSourceType()) {\n            this.mediaElementTarget.removeAttribute('autoplay')\n        }\n\n        this._mediaElementPlayer = new MediaElementPlayer(this.mediaElementTarget, this._createOptionsHashForPlayer())\n        // The renderer for html5 streaming elements is not defined and the muted option for that is a set through the\n        // parentNode. The parentNode seems to be the streaming player, dash or hls. For all other elements we can mute\n        // the media element directly.\n        if (typeof this._mediaElementPlayer.media.rendererName === 'undefined') {\n            this._mediaElement = this._mediaElementPlayer.media.parentNode\n        } else {\n            this._mediaElement = this._mediaElementPlayer.media\n        }\n        this._mediaElement.setMuted(localStorage.getItem('mute') === 'true')\n        this._installMediaElementListener()\n        this._disableRightClickOnContextMenu()\n        if (this._autoplayRequested && !this._usesExternalSourceType()) this._tryAutoplay()\n    }\n\n    disconnect() {\n        this._uninstallMediaElementListener()\n    }\n\n    _tryAutoplay() {\n        const result = this._mediaElementPlayer.play()\n        // Autoplay may be blocked by the browser's autoplay policy.\n        // Leave the media paused without producing an uncaught error.\n        if (result && typeof result.catch === 'function') {\n            result.catch(() => {})\n        }\n    }\n\n    _disableRightClickOnContextMenu() {\n        Array.prototype.forEach.call(document.querySelectorAll('.mejs__container'), function (element, _index) {\n            element.oncontextmenu = function () {\n                return false\n            }\n        })\n    }\n\n    _createOptionsHashForPlayer() {\n        let startVolume = localStorage.getItem('volume') !== null ? localStorage.getItem('volume') : 0.8\n        if (this.mediaElementTarget.nodeName === 'AUDIO') {\n            return {\n                features: ['playpause', 'current', 'progress', 'duration', 'speed', 'tracks', 'volume', 'fullscreen'],\n                iconSprite: this.iconSpritePathValue,\n                speedText: this.speedTextValue,\n                startVolume: startVolume,\n            }\n        } else if (this._usesExternalSourceType()) {\n            return {\n                renderers: ['youtube_iframe', 'vimeo_iframe'],\n                features: ['playpause', 'progress', 'current', 'duration', 'speed', 'tracks', 'volume', 'fullscreen'],\n                iconSprite: this.iconSpritePathValue,\n                speedText: this.speedTextValue,\n                autoRewind: false,\n                startVolume: startVolume,\n                youtube: {\n                    nocookie: true\n                }\n            }\n        } else if (this.mediaElementTarget.nodeName === 'VIDEO') {\n            if (mejs.Features.isiOS) {\n                Array.prototype.forEach.call(this.mediaElementTarget.querySelectorAll('source'), function (source, _index) {\n                    if (source.src.indexOf('.mpd') !== -1) source.disabled = true\n                })\n            }\n            return {\n                renderers: ['native_dash', 'native_hls', 'html5'],\n                features: ['playpause', 'progress', 'current', 'duration', 'speed', 'tracks', 'volume', 'fullscreen'],\n                iconSprite: this.iconSpritePathValue,\n                speedText: this.speedTextValue,\n                autoRewind: false,\n                startVolume: startVolume,\n                dash: {path: this.dashPathValue},\n                hls: {path: this.hlsPathValue}\n            }\n        }\n    }\n\n    _usesExternalSourceType() {\n        return this._sourceType === 'video/vimeo' || this._sourceType === 'video/youtube';\n    }\n\n    _disableExternalControls() {\n        const url = new URL(this._sourceElement.getAttribute('src'), window.location.origin);\n        url.searchParams.set('controls', '0'); // hides controls and progress bar\n        this._sourceElement.setAttribute('src', url.toString())\n    }\n\n    _handleVolumeChange() {\n        if (this._mediaElement.options.startVolume !== this._mediaElement.getVolume()) {\n            localStorage.setItem('volume', this._mediaElement.getVolume())\n        }\n        localStorage.setItem('mute', this._mediaElement.muted)\n    }\n\n    _handleMediaEnd() {\n        let toggleProgressCheckBox = document.getElementById('flexSwitchToggleProgress')\n        if (toggleProgressCheckBox && !toggleProgressCheckBox.checked) toggleProgressCheckBox.click()\n    }\n\n    _installMediaElementListener() {\n        this._mediaElement.addEventListener('volumechange', () => this._handleVolumeChange())\n        this._mediaElement.addEventListener('ended', this._handleMediaEnd)\n    }\n\n    _uninstallMediaElementListener() {\n        this._mediaElement.removeEventListener('volumechange', () => this._handleVolumeChange())\n        this._mediaElement.removeEventListener('ended', this._handleMediaEnd)\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {Modal} from 'bootstrap'\nimport SupportChecker from '../components/utility/support_checker'\n\nexport default class extends Controller {\n    initialize() {\n        this._handlePostSuccess = this._handlePostSuccess.bind(this)\n        this._handlePostError = this._handlePostError.bind(this)\n        this._handleSubmit = this._handleSubmit.bind(this)\n        this._handleComplete = this._handleComplete.bind(this)\n        this._submitting = false\n    }\n\n    connect() {\n        this._modal = this.element.closest('.modal')\n        this._installAjaxListener()\n        this._installResizeObserver()\n        this._labelDialog()\n\n        this.element['modal'] = {close: this.close.bind(this)}\n    }\n\n    disconnect() {\n        this._uninstallAjaxListener()\n        this._uninstallResizeObserver()\n    }\n\n    _installAjaxListener() {\n        this.element.addEventListener('submit', this._handleSubmit)\n        this.element.addEventListener('ajax:success', this._handlePostSuccess)\n        this.element.addEventListener('ajax:error', this._handlePostError)\n        this.element.addEventListener('ajax:complete', this._handleComplete)\n    }\n\n    close(_event) {\n        Modal.getInstance(this._modal)?.hide()\n    }\n\n    _uninstallAjaxListener() {\n        this.element.removeEventListener('submit', this._handleSubmit)\n        this.element.removeEventListener('ajax:success', this._handlePostSuccess)\n        this.element.removeEventListener('ajax:error', this._handlePostError)\n        this.element.removeEventListener('ajax:complete', this._handleComplete)\n    }\n\n    _installResizeObserver() {\n        if (SupportChecker.resizeObserverSupported) this._handleResize()\n    }\n\n    _uninstallResizeObserver() {\n        this._resizeObserver && this._resizeObserver.disconnect()\n    }\n\n    _handleSubmit(event) {\n        if (this._submitting) {\n            event.preventDefault()\n            event.stopImmediatePropagation()\n            return\n        }\n        this._submitting = true\n        event.target.querySelectorAll('[data-disable-with], [data-disable]').forEach((element) => {\n            element.removeAttribute('data-disable-with')\n            element.removeAttribute('data-disable')\n        })\n    }\n\n    _handleComplete(_event) {\n        this._submitting = false\n    }\n\n    _handlePostSuccess(event) {\n        if (this._modal) this._modal.dataset.modalSaved = 'true'\n\n        if (this._modal && !event.target.hasAttribute('data-do-not-close-modal-on-submit')) {\n            Modal.getInstance(this._modal)?.hide()\n        }\n    }\n\n    _handlePostError(event) {\n        this._log('post error called')\n        let [data, status, xhr] = event.detail\n        this._log(`post error status -> ${status}`)\n        if (data.responseText) this._log(`post error response text -> ${data.responseText}`)\n    }\n\n    _handleResize() {\n        this._resizeObserver = new ResizeObserver((entries, _observer) => {\n            entries.forEach((entry) => {\n                Modal.getInstance(this._modal)?.handleUpdate()\n            })\n        })\n        this._resizeObserver.observe(this._modal)\n    }\n\n    _log(message) {\n        console.debug(`DEBUG modal: ${message}`)\n    }\n\n    _labelDialog() {\n        const titleEl = this.element.querySelector('.modal-title')\n        if (this._modal && titleEl) {\n            if (!titleEl.id) titleEl.id = `modal-title-${Math.random().toString(36).slice(2, 9)}`\n            this._modal.setAttribute('aria-labelledby', titleEl.id)\n        }\n    }\n}", "import {Controller} from '@hotwired/stimulus'\nimport {Modal, Dropdown} from 'bootstrap'\nimport DomParserSupport from '../components/utility/dom_parser_support'\nimport LoadScripts from '../components/utility/load_scripts'\nimport {handleUnauthorized} from '../components/utility/handle_unauthorized'\n\nexport default class extends Controller {\n    static values = {\n        size: String, // sm, lg, xl\n        backdrop: {type: String, default: 'static'}, // true, false or 'static'\n        keyboard: {type: Boolean, default: true},\n        focus: {type: Boolean, default: true},\n        url: String,\n        autoOpen: {type: Boolean, default: false},\n        disableFocusTrap: {type: Boolean, default: false},\n        plainRestoreFocus: {type: Boolean, default: false}\n    }\n\n    initialize() {\n        this._handleShown = this._handleShown.bind(this)\n        this._handleHide = this._handleHide.bind(this)\n    }\n\n    connect() {\n        if (this.autoOpenValue === true) this.openModal()\n    }\n\n    disconnect() {\n        this._uninstallModalHandler()\n    }\n\n    openModal(event) {\n        if (event) event.preventDefault();\n\n        if (this.element.disabled) return\n\n        this._widgetWrapper = this.element.closest('[data-controller~=\"fetch-html\"]')\n        this._triggerId = this.element.id\n        this._triggerHref = this.element.getAttribute('href')\n        this._openedByKeyboard = event ? event.detail === 0 : true\n        const toggle = this._findToggleFor(this.element)\n        this._toggleId = toggle ? toggle.id : null\n\n        if (toggle && !this._openedByKeyboard) {\n            Dropdown.getOrCreateInstance(toggle).hide()\n        }\n\n        this.element.disabled = true\n        this.element.classList.add('disabled')\n\n        this._modalHolder = document.getElementById('modalHolder')\n\n        let url = this.hasUrlValue ? new URL(this.urlValue) : new URL(this.element.href)\n        if (this.hasSizeValue) url.search = new URLSearchParams({size: this.sizeValue}).toString()\n\n        fetch(url, {\n            credentials: 'same-origin',\n            headers: {\n                'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`,\n                'X-Requested-With': 'XMLHttpRequest'\n            }\n        }).then(response => {\n            if (response.status === 401) handleUnauthorized(response)\n            if (!response.ok || response.redirected) throw new Error('Network response was not ok')\n            return response.text()\n        }).then(text => {\n            if (DomParserSupport.isSupported) {\n                this._modalHolder.appendChild(DomParserSupport.parse(text))\n            } else {\n                this._modalHolder.insertAdjacentHTML('beforeend', text)\n            }\n        }).then(() => {\n            this._modal = this._modalHolder.lastChild\n\n            const title = this._modal.querySelector('.modal-title')\n            if (title && !this._modal.hasAttribute('aria-describedby')) {\n                this._modal.setAttribute('aria-describedby', title.id)\n            }\n\n            const modalDialog = new Modal(this._modal, {\n                backdrop: this.backdropValue,\n                keyboard: this.keyboardValue,\n                focus: this.focusValue\n            })\n            modalDialog.show()\n            this._installModalHandler()\n        }).then(() =>\n            LoadScripts.load(this._modal)\n        ).catch(error =>\n            console.log(error)\n        )\n    }\n\n    _installModalHandler() {\n        if (this._modal === undefined) return\n\n        this._modal.addEventListener('shown.bs.modal', this._handleShown)\n        this._modal.addEventListener('hide.bs.modal', this._handleHide)\n    }\n\n    _uninstallModalHandler() {\n        if (this._modal === undefined) return\n\n        this._modal.removeEventListener('shown.bs.modal', this._handleShown)\n        this._modal.removeEventListener('hide.bs.modal', this._handleHide)\n    }\n\n    _handleShown(_event) {\n        let focusElement = this._modalHolder.querySelector('[autofocus]')\n        if (focusElement) focusElement.focus()\n    }\n\n    _handleHide(_event) {\n        this.element.disabled = false\n        this.element.classList.remove('disabled')\n\n        const saved = this._modal.dataset.modalSaved === 'true'\n        this._modal.remove()\n\n        const nestedModal = this._modalHolder?.querySelector('.modal.show')\n        if (nestedModal) nestedModal.focus()\n\n        const fetchHtml = this._widgetWrapper && this._widgetWrapper['fetchHtml']\n        if (saved && fetchHtml) {\n            Promise.resolve(fetchHtml.reload()).then(() => {\n                if (!nestedModal) this._restoreFocusAfterClick()\n            })\n        } else if (!nestedModal) {\n            this._restoreFocusAfterClick()\n        }\n    }\n\n    _restoreFocusAfterClick() {\n        setTimeout(() => this._restoreFocus(), 0)\n    }\n\n    _restoreFocus() {\n        const trigger = this._findTrigger()\n\n        if (!this._openedByKeyboard) {\n            const toggle = this._findToggleById() || (trigger && this._findToggleFor(trigger))\n            if (toggle) {\n                Dropdown.getOrCreateInstance(toggle).hide()\n                this._focusElement(toggle)\n                return\n            }\n        }\n\n        if (!trigger) {\n            if (this._widgetWrapper && this._widgetWrapper.isConnected) {\n                this._widgetWrapper.setAttribute('tabindex', '-1')\n                this._widgetWrapper.focus()\n            }\n            return\n        }\n\n        if (this._isVisible(trigger)) {\n            if (this.plainRestoreFocusValue) {\n                trigger.focus()\n            } else {\n                this._focusElement(trigger)\n            }\n            return\n        }\n\n        const toggle = this._findToggleFor(trigger)\n        if (!toggle) return\n\n        toggle.addEventListener('shown.bs.dropdown', () => {\n            this._focusElement(this._isVisible(trigger) ? trigger : toggle)\n        }, {once: true})\n        Dropdown.getOrCreateInstance(toggle).show()\n    }\n\n    _findTrigger() {\n        if (this._triggerId) {\n            const byId = document.getElementById(this._triggerId)\n            if (byId) return byId\n        }\n        if (this.element.isConnected) return this.element\n\n        if (this._triggerHref && this._widgetWrapper && this._widgetWrapper.isConnected) {\n            return this._widgetWrapper.querySelector(`a[href=\"${CSS.escape(this._triggerHref)}\"]`)\n        }\n        return null\n    }\n\n    _findToggleFor(element) {\n        const menu = element && element.closest('.dropdown-menu')\n        return (menu && menu.parentElement &&\n            menu.parentElement.querySelector('[data-bs-toggle=\"dropdown\"]')) || null\n    }\n\n    _findToggleById() {\n        return this._toggleId ? document.getElementById(this._toggleId) : null\n    }\n\n    _isVisible(element) {\n        return element.getClientRects().length > 0\n    }\n\n    _focusElement(element) {\n        if (typeof window.refocusAndScrollIntoView === 'function') {\n            window.refocusAndScrollIntoView(element)\n        } else {\n            element.focus()\n        }\n    }\n\n    _disableFocusTrap(modalDialog) {\n        modalDialog._focustrap = {\n            activate: () => {\n            },\n            deactivate: () => {\n            }\n        }\n    }\n}", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['scrollable', 'navTabs']\n    static values = {overflowing: String, scroll_range: {type: Number, default: 200}}\n\n    initialize() {\n        this.scrolling = false\n    }\n\n    connect() {\n        this._moveToCurrentTab()\n        this._setOverflowingValue()\n    }\n\n    scroll(_event) {\n        // Wrap event in ticking frames to not fire a ridiculous amount of scroll events.\n        if (!this.scrolling) {\n            window.requestAnimationFrame(() => {\n                this._setOverflowingValue()\n                this.scrolling = false\n            })\n        }\n        this.scrolling = true\n    }\n\n    moveLeft(_event) {\n        this.scrollableTarget.scrollBy({top: 0, left: (0 - this.scrollRangeValue), behavior: 'smooth'})\n        this._setOverflowingValue()\n    }\n\n    moveRight(_event) {\n        this.scrollableTarget.scrollBy({top: 0, left: this.scrollRangeValue, behavior: 'smooth'})\n        this._setOverflowingValue()\n    }\n\n    autoScroll(event) {\n        const currentItem = event.target\n        if (currentItem) currentItem.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'center'})\n    }\n\n    _setOverflowingValue() {\n        this.overflowingValue = this._determineHorizontalOverflow(this.navTabsTarget, this.scrollableTarget)\n    }\n\n    _determineHorizontalOverflow(content, container) {\n        const containerMetrics = container.getBoundingClientRect()\n        const containerMetricsRight = Math.floor(containerMetrics.right)\n        const containerMetricsLeft = Math.floor(containerMetrics.left)\n        const contentMetrics = content.getBoundingClientRect()\n        const contentMetricsRight = Math.floor(contentMetrics.right)\n        const contentMetricsLeft = Math.floor(contentMetrics.left)\n        if (containerMetricsLeft > contentMetricsLeft && containerMetricsRight < contentMetricsRight) {\n            return 'both'\n        } else if (contentMetricsLeft < containerMetricsLeft) {\n            return 'left'\n        } else if (contentMetricsRight > containerMetricsRight) {\n            return 'right'\n        } else {\n            return 'none'\n        }\n    }\n\n    _moveToCurrentTab() {\n        const currentItem = this.element.querySelector('[aria-current=\"page\"],[aria-selected=\"true\"]')\n        if (currentItem) currentItem.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'center'})\n    }\n}\n", "import { Controller as n } from \"@hotwired/stimulus\";\nclass r extends n {\n  add(t) {\n    t.preventDefault();\n    const e = this.templateTarget.innerHTML.replace(/NEW_RECORD/g, new Date().getTime().toString());\n    this.targetTarget.insertAdjacentHTML(\"beforebegin\", e);\n  }\n  remove(t) {\n    t.preventDefault();\n    const e = t.target.closest(this.wrapperSelectorValue);\n    if (e.dataset.newRecord === \"true\")\n      e.remove();\n    else {\n      e.style.display = \"none\";\n      const a = e.querySelector(\"input[name*='_destroy']\");\n      a.value = \"1\";\n    }\n  }\n}\nr.targets = [\"target\", \"template\"];\nr.values = {\n  wrapperSelector: {\n    type: String,\n    default: \".nested-form-wrapper\"\n  }\n};\nexport {\n  r as default\n};\n", "import NestedForm from 'stimulus-rails-nested-form'\n\nexport default class extends NestedForm {\n    add(event) {\n        super.add(event)\n        let lastWrapper = Array.from(this.element.querySelectorAll(this.wrapperSelectorValue)).pop()\n        lastWrapper.querySelector('input[type=text], input[type=number]')?.focus()\n    }\n\n    // Put the focus one the skill select dropdown instead if the self assessment if accessibility is activated\n    addWithAccessibility(event) {\n        super.add(event)\n        let lastWrapper = Array.from(this.element.querySelectorAll(this.wrapperSelectorValue)).pop()\n        requestAnimationFrame(() => lastWrapper.querySelector('button:not([disabled])')?.focus())\n    }\n}\n", "import {Controller} from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"no-paste\"\nexport default class extends Controller {\n    connect() {\n        this.element.addEventListener(\"paste\", e => e.preventDefault());\n        // if we ever want to upgrade\n        //this.element.addEventListener(\"copy\", e => e.preventDefault());\n        //this.element.addEventListener(\"cut\", e => e.preventDefault());\n        this.element.addEventListener(\"contextmenu\", e => e.preventDefault());\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['indicator']\n    static values = {url: String, alternativeTargetQuery: String}\n\n    connect() {\n        if (document.documentElement.hasAttribute('data-turbolinks-preview')) return\n\n        this.load()\n        this.element['notification'] = {reload: this.load.bind(this)}\n    }\n\n    load() {\n        fetch(this.urlValue, {\n            credentials: 'same-origin',\n            headers: {\n                'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`,\n                'Accept': 'application/json'\n            }\n        }).then(response => response.json())\n            .then(json => this.setIndicator(json))\n            .catch(error => console.log(error))\n    }\n\n    setIndicator(responseJson) {\n        if (responseJson.notifications === true) {\n            this.indicatorElements.forEach((target, _) => {\n                target.classList.add('navbar_user_notifications__indicator--active')\n            })\n        } else {\n            this.indicatorElements.forEach((target, _) => {\n                target.classList.remove('navbar_user_notifications__indicator--active')\n            })\n        }\n    }\n\n    get indicatorElements() {\n        let targets = []\n        if (this.hasAlternativeTargetQueryValue) {\n            targets = Array.from(document.querySelectorAll(this.alternativeTargetQueryValue))\n            targets.push(this.indicatorTarget)\n            return targets\n        } else {\n            return [this.indicatorTarget]\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport SupportChecker from \"../components/utility/support_checker\";\n\nexport default class extends Controller {\n    toggle(_event) {\n        let user_password_input = this.element.parentElement.querySelector('input')\n\n        this.element.querySelector('.fa-eye').parentElement.toggleAttribute('hidden')\n        this.element.querySelector('.fa-eye-slash').parentElement.toggleAttribute('hidden')\n        const visible = this.element.querySelector('.fa-eye').parentElement.hasAttribute('hidden')\n        user_password_input.setAttribute('type', visible ? 'text' : 'password')\n        if (this.element.hasAttribute('aria-pressed')) {\n            this.element.setAttribute('aria-pressed', visible ? 'true' : 'false')\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\n// Used by the \"entries per page\" dropdown (DatatablesHelper#datatable_per_page_dropdown)\nexport default class extends Controller {\n    // Moves the focus into the menu when it opens. Screen readers like NVDA then switch to focus mode, so the arrow\n    // keys move the focus between the options (visibly highlighted) instead of only moving the virtual cursor.\n    focusChecked() {\n        const item = this.element.querySelector('[role=\"menuitemradio\"][aria-checked=\"true\"]') ||\n            this.element.querySelector('[role=\"menuitemradio\"]')\n        if (item) item.focus()\n    }\n\n    // The options are links with role=\"menuitemradio\". Links are only activated by Enter, but a radio menu item is\n    // expected to be selectable with the spacebar as well\n    selectWithSpace(event) {\n        if (event.key !== ' ' || event.target.getAttribute('role') !== 'menuitemradio') return\n        event.preventDefault() // prevents scroll\n        event.target.click()\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {TutorizeClassicEditor} from 'ckeditor5'\n\nexport default class extends Controller {\n    static targets = ['form']\n\n    connect() {\n        console.log('PdfSummaryConfirmationController connected.');\n        this._setupEventListeners();\n    }\n\n    disconnect() {\n        console.log('PdfSummaryConfirmationController disconnected.');\n    }\n\n    _setupEventListeners() {\n        this._setupGenerateButtonListener();\n        this._setupAccordionListeners();\n    }\n\n    _setupGenerateButtonListener() {\n        window.addEventListener('pdf-summary:generated', this._handleSummaryGenerated.bind(this));\n        const generateButton = document.getElementById('generateButton');\n\n        if (generateButton) {\n            generateButton.addEventListener('click', this._disableButtons.bind(this));\n        } else {\n            console.warn('generateButton element not found, retrying in 5 seconds...');\n            setTimeout(() => {\n                this._setupGenerateButtonListener();\n            }, 5000);\n        }\n    }\n\n    _setupAccordionListeners() {\n        const collapseElement = document.getElementById('collapseCreateSummaryInputForm');\n\n        if (collapseElement) {\n            collapseElement.addEventListener('shown.bs.collapse', () => {\n                const submitButton = document.getElementById('contentSubmitButton');\n                if (submitButton) {\n                    submitButton.disabled = true;\n                }\n            });\n            collapseElement.addEventListener('hidden.bs.collapse', () => {\n                const submitButton = document.getElementById('contentSubmitButton');\n                if (submitButton) {\n                    submitButton.disabled = false;\n                }\n            });\n        } else {\n            console.warn('collapseCreateSummaryInputForm element not found, retrying in 5 seconds...');\n            setTimeout(() => {\n                this._setupAccordionListeners();\n            }, 5000);\n        }\n    }\n\n\n    _disableButtons() {\n        const acceptButton = document.getElementById('acceptButton');\n        const contentSubmitButton = document.getElementById('contentSubmitButton');\n        const summaryAccordionButton = document.getElementById('summaryAccordionButton')\n        acceptButton.disabled = true;\n        contentSubmitButton.disabled = true;\n        summaryAccordionButton.disabled = true;\n    }\n\n    _handleSummaryGenerated(event) {\n        const summary = event.detail.summary;\n        this._setGeneratedText(summary);\n        this._enableButtons();\n    }\n\n    _enableButtons() {\n        const acceptButton = document.getElementById('acceptButton');\n        const contentSubmitButton = document.getElementById('contentSubmitButton');\n        const summaryAccordionButton = document.getElementById('summaryAccordionButton')\n        acceptButton.disabled = false;\n        contentSubmitButton.disabled = false;\n        summaryAccordionButton.disabled = false;\n    }\n\n    acceptSummary() {\n        const summary = document.querySelector('#generatedText').value;\n        if (!this._updateCKDescriptionText(summary) && !this._updateDescriptionText(summary)) {\n            console.warn('No valid target found for updating description.');\n        }\n        this._enableButtons();\n        this._closeAccordion();\n        this._saveChange();\n    }\n\n    _setGeneratedText(summary) {\n        const generatedTextArea = document.querySelector('#generatedText');\n        generatedTextArea.value = summary;\n    }\n\n    // Updates CKEditor\n    _updateCKDescriptionText(summary) {\n        const editorContainer = this.formTarget.querySelector('[data-controller=\"editor\"]');\n        if (!editorContainer || !editorContainer.editorInstance) return false;\n\n        editorContainer.editorInstance.setData(summary);\n        return true;\n    }\n\n    _updateDescriptionText(summary) {\n        const textarea = document.querySelector('#content_versionings_pdf_description');\n        if (!textarea) return false;\n\n        textarea.value = summary;\n        return true;\n    }\n\n    _closeAccordion() {\n        const summaryAccordionButton = document.getElementById('summaryAccordionButton')\n        summaryAccordionButton.disabled = false;\n        summaryAccordionButton.click();\n    }\n\n    _saveChange() {\n        const submitButton = this.formTarget.querySelector('button[type=\"submit\"]');\n        submitButton.click();\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {Popover} from 'bootstrap'\n\nlet currentOpenController = null\n\nexport default class extends Controller {\n    static values = {\n        remoteUrl: String,\n        trigger: 'manual',\n        singleAnnouncement: {type: Boolean, default: false}\n    }\n\n    initialize() {\n        this._handlePopoverShown = this._handlePopoverShown.bind(this)\n        this._handleOverflowClick = this._handleOverflowClick.bind(this)\n        this._handleClick = this._handleClick.bind(this)\n        this._handleKeydown = this._handleKeydown.bind(this)\n    }\n\n    _handleKeydown(e) {\n        if (e.key === 'Enter' || e.key === ' ') {\n            e.preventDefault()\n            this._handleClick(e)\n        }\n    }\n\n    connect() {\n        const templateEl = this.element.querySelector('template[data-popover-content]')\n        const content = templateEl ? templateEl.content.firstElementChild.outerHTML : this.element.dataset.bsContent\n\n        this._popover = new Popover(this.element, {\n            trigger: 'manual',\n            html: true,\n            sanitize: false,\n            title: '',\n            content: content,\n            customClass: 'calendar-popover'\n        })\n        if (this.hasRemoteUrlValue) this._installPopoverShownListener()\n        if (templateEl) this._installOverflowListener()\n\n        this.element.addEventListener('click', this._handleClick)\n        this.element.addEventListener('keydown', this._handleKeydown)\n    }\n\n    disconnect() {\n        this._popover?.dispose()\n        this._overflowListenerInstalled = false\n        this.element.removeEventListener('shown.bs.popover', this._handlePopoverShown)\n        this.element.removeEventListener('click', this._handleClick)\n        this.element.removeEventListener('keydown', this._handleKeydown)\n        this._removeFocusTrap()\n        if (currentOpenController === this) currentOpenController = null\n    }\n\n    _handleClick(e) {\n        e.preventDefault()\n\n        const alreadyShown = this._popover?.tip?.classList.contains('show')\n        if (alreadyShown) {\n            this._forceClose()\n            return\n        }\n\n        if (currentOpenController && currentOpenController !== this) {\n            currentOpenController._forceClose()\n        }\n        currentOpenController = this\n\n        this._popover?.show()\n\n        if (this.singleAnnouncementValue) {\n            this.element.setAttribute('aria-expanded', 'true')\n        }\n    }\n\n    _forceClose() {\n        this.element.removeAttribute('aria-describedby')\n\n        if (this.singleAnnouncementValue) {\n            this.element.setAttribute('aria-expanded', 'false')\n        }\n\n        this._popover?.hide()\n        if (currentOpenController === this) currentOpenController = null\n\n        if (this._isShowingOverflowDetail) {\n            this._isShowingOverflowDetail = false\n            this._reinitialize()\n        }\n    }\n\n    _installPopoverShownListener() {\n        this.element.removeEventListener('shown.bs.popover', this._handlePopoverShown)\n        this.element.addEventListener('shown.bs.popover', this._handlePopoverShown)\n    }\n\n    _handlePopoverShown(_event) {\n        if (!this._popover?.tip) return\n\n        const isDetail = this._isShowingOverflowDetail\n        const announceAsStatus = this.singleAnnouncementValue && !isDetail\n\n        if (announceAsStatus) {\n            this._popover.tip.querySelector('.popover-body')?.setAttribute('role', 'status')\n            this.element.removeAttribute('aria-describedby')\n        }\n\n        fetch(this.remoteUrlValue, {\n            credentials: 'same-origin',\n            headers: {\n                'X-CSRF-Token': `${document.head.querySelector('meta[name=\"csrf-token\"]').content}`,\n                'X-Requested-With': 'XMLHttpRequest'\n            }\n        }).then(response => {\n            if (!response.ok || response.redirected) throw new Error('Network response was not ok')\n            return response.text()\n        }).then(text => {\n            if (!this._popover?.tip) return\n            this._popover.tip.querySelector('.popover-body').innerHTML = text\n            this._popover.update()\n\n            if (isDetail) this._describeFirstLinkWithDetails()\n            if (!announceAsStatus) this._focusFirstElementInPopover()\n            this._installFocusTrap()\n            this._transitioning = false\n        }).catch(error => console.log(error))\n    }\n\n    _describeFirstLinkWithDetails() {\n        const tip = this._popover?.tip\n        const body = tip?.querySelector('.popover-body')\n        const link = tip?.querySelector('a[href], button:not([disabled])')\n        if (!tip || !body || !link) return\n\n        let blocks = Array.from(body.children).filter(el =>\n            el.getAttribute('aria-hidden') !== 'true' && !el.classList.contains('calendar-popover__link-box')\n        )\n        if (blocks.length === 0) blocks = [body]\n\n        const ids = blocks.map((el, index) => {\n            el.id = el.id || `${tip.id}-details-${index}`\n            return el.id\n        })\n        link.setAttribute('aria-describedby', ids.join(' '))\n    }\n\n    _focusFirstElementInPopover() {\n        if (!this._popover?.tip) return\n        const focusable = this._popover.tip.querySelector(\n            'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n        )\n        if (focusable) {\n            focusable.focus()\n        } else {\n            const body = this._popover.tip.querySelector('.popover-body')\n            if (body) {\n                body.setAttribute('tabindex', '-1')\n                body.focus()\n            }\n        }\n    }\n\n    _installFocusTrap() {\n        this._removeFocusTrap()\n        if (!this._popover?.tip) return\n\n        this._escHandler = (e) => {\n            if (e.key === 'Escape') {\n                this._forceClose()\n                this.element.focus()\n            }\n        }\n\n        this._tabCloseHandler = (e) => {\n            if (e.key !== 'Tab' || !this._popover?.tip) return\n\n            const focusableEls = Array.from(this._popover.tip.querySelectorAll(\n                'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n            ))\n            const fallbackBody = this._popover.tip.querySelector('.popover-body[tabindex=\"-1\"]')\n            const allFocusable = focusableEls.length > 0 ? focusableEls : (fallbackBody ? [fallbackBody] : [])\n            if (allFocusable.length === 0) return\n\n            const first = allFocusable[0]\n            const last = allFocusable[allFocusable.length - 1]\n            const active = document.activeElement\n\n            if (!e.shiftKey && active === last) {\n                e.preventDefault()\n                this._forceClose()\n                this.element.focus()\n            } else if (e.shiftKey && active === first) {\n                e.preventDefault()\n                this._forceClose()\n                this.element.focus()\n            }\n        }\n\n        this._focusOutHandler = () => {\n            setTimeout(() => {\n                if (this._transitioning) return\n                if (!this._popover?.tip) return\n                const active = document.activeElement\n                const stillInside = this._popover.tip.contains(active) || active === this.element\n                if (!stillInside) {\n                    this._forceClose()\n                }\n            }, 0)\n        }\n\n        document.addEventListener('keydown', this._escHandler)\n        document.addEventListener('keydown', this._tabCloseHandler)\n        this._popover.tip.addEventListener('focusout', this._focusOutHandler)\n    }\n\n    _removeFocusTrap() {\n        if (this._escHandler) document.removeEventListener('keydown', this._escHandler)\n        if (this._tabCloseHandler) document.removeEventListener('keydown', this._tabCloseHandler)\n        if (this._focusOutHandler && this._popover?.tip) {\n            this._popover.tip.removeEventListener('focusout', this._focusOutHandler)\n        }\n    }\n\n    _installOverflowListener() {\n        if (this._overflowListenerInstalled) return\n        this._overflowListenerInstalled = true\n\n        this.element.addEventListener('hidden.bs.popover', () => {\n            this.element.classList.remove('active')\n            this._removeFocusTrap()\n        })\n\n        this.element.addEventListener('shown.bs.popover', () => {\n            this.element.classList.add('active')\n            if (this._isShowingOverflowDetail) return\n\n            const tip = this._popover.tip\n            if (!tip) return\n            const links = tip.querySelectorAll('[data-calendar-detail-url]')\n            links.forEach(link => {\n                link.addEventListener('click', this._handleOverflowClick)\n            })\n\n            this._focusFirstElementInPopover()\n            this._installFocusTrap()\n        })\n    }\n\n    _handleOverflowClick(e) {\n        e.preventDefault()\n        e.stopPropagation()\n\n        const url = e.currentTarget.dataset.calendarDetailUrl\n        const popoverToDispose = this._popover\n        this._popover = null\n        this._isShowingOverflowDetail = true\n        this._transitioning = true\n\n        setTimeout(() => {\n            popoverToDispose?.dispose()\n            this.remoteUrlValue = url\n\n            this._popover = new Popover(this.element, {\n                trigger: 'manual',\n                html: true,\n                sanitize: false,\n                title: '',\n                content: \"<div class='text-center'><i class='fas fa-spinner fa-spin fa-2x'></i></div>\",\n                customClass: 'calendar-popover'\n            })\n\n            this._installPopoverShownListener()\n            this._popover.show()\n        }, 0)\n    }\n\n    _reinitialize() {\n        this._overflowListenerInstalled = false\n        this.element.removeEventListener('shown.bs.popover', this._handlePopoverShown)\n\n        const templateEl = this.element.querySelector('template[data-popover-content]')\n        const content = templateEl ? templateEl.content.firstElementChild.outerHTML : this.element.dataset.bsContent\n\n        this._popover = new Popover(this.element, {\n            trigger: 'manual',\n            html: true,\n            sanitize: false,\n            title: '',\n            content: content,\n            customClass: 'calendar-popover'\n        })\n\n        if (templateEl) this._installOverflowListener()\n    }\n}", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['radio']\n\n    perform(event) {\n        let currentRadio = event.target\n\n        Array.prototype.forEach.call(this.radioTargets, function (element) {\n            element.checked = false\n        })\n        currentRadio.checked = true\n    }\n}\n", "/*!\n * @preserve\n * \n * Readmore.js plugin\n * Author: @jed_foster\n * Project home: jedfoster.com/Readmore.js\n * Version: 3.0.0-beta-1\n * Licensed under the MIT license\n * \n * Debounce function from davidwalsh.name/javascript-debounce-function\n */\nlet uniqueIdCounter = 0;\n\nconst isCssEmbeddedFor = [];\n\n// from:https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md\n((function removePolyfill(arr) {\n  arr.forEach((item) => {\n    if (Object.prototype.hasOwnProperty.call(item, 'remove')) {\n      return;\n    }\n    Object.defineProperty(item, 'remove', {\n      configurable: true,\n      enumerable: true,\n      writable: true,\n      value: function remove() {\n        if (this.parentNode !== null) {\n          this.parentNode.removeChild(this);\n        }\n      }\n    });\n  });\n})([Element.prototype, CharacterData.prototype, DocumentType.prototype]));\n\nfunction forEach(arr, callback, scope) {\n  for (let i = 0; i < arr.length; i += 1) {\n    callback.call(scope, arr[i], i);\n  }\n}\n\nfunction extend(...objects) {\n  const hasProp = {}.hasOwnProperty;\n  let child = objects[0];\n  let parent = objects[1];\n\n  if (objects.length > 2) {\n    const args = [];\n\n    Object.keys(objects).forEach((key) => {\n      args.push(objects[key]);\n    });\n\n    while (args.length > 2) {\n      const c1 = args.shift();\n      const p1 = args.shift();\n      args.unshift(extend(c1, p1));\n    }\n\n    child = args.shift();\n    parent = args.shift();\n  }\n\n  if (parent) {\n    Object.keys(parent).forEach((key) => {\n      if (hasProp.call(parent, key)) {\n        if (typeof parent[key] === 'object') {\n          child[key] = child[key] || {};\n          child[key] = extend(child[key], parent[key]);\n        } else {\n          child[key] = parent[key];\n        }\n      }\n    });\n  }\n\n  return child;\n}\n\nfunction debounce(func, wait, immediate) {\n  let timeout;\n\n  return function debouncedFunc(...args) {\n    const callNow = immediate && !timeout;\n    const later = () => {\n      timeout = null;\n      if (!immediate) func.apply(this, args);\n    };\n\n    clearTimeout(timeout);\n    timeout = setTimeout(later, wait);\n\n    if (callNow) func.apply(this, args);\n  };\n}\n\nfunction uniqueId() {\n  uniqueIdCounter += 1;\n\n  return `rmjs-${uniqueIdCounter}`;\n}\n\nfunction setBoxHeights(element) {\n  element.style.height = 'auto';\n\n  const expandedHeight = parseInt(element.getBoundingClientRect().height, 10);\n  const cssMaxHeight = parseInt(window.getComputedStyle(element).maxHeight, 10);\n  const defaultHeight = parseInt(element.readmore.defaultHeight, 10);\n\n  // Store our measurements.\n  element.readmore.expandedHeight = expandedHeight;\n  element.readmore.maxHeight = cssMaxHeight;\n  element.readmore.collapsedHeight = cssMaxHeight || element.readmore.collapsedHeight || defaultHeight;\n\n  element.style.maxHeight = 'none';\n}\n\nfunction createElementFromString(htmlString) {\n  const div = document.createElement('div');\n  div.innerHTML = htmlString;\n\n  return div.firstChild;\n}\n\nfunction embedCSS(selector, options) {\n  if (!isCssEmbeddedFor[selector]) {\n    let styles = '';\n\n    if (options.embedCSS && options.blockCSS !== '') {\n      styles += `${selector} + [data-readmore-toggle], ${selector}[data-readmore] {\n        ${options.blockCSS}\n      }`;\n    }\n\n    // Include the transition CSS even if embedCSS is false\n    styles += `${selector}[data-readmore] {\n      transition: height ${options.speed}ms;\n      overflow: hidden;\n    }`;\n\n    (((d, u) => {\n      const css = d.createElement('style');\n      css.type = 'text/css';\n\n      if (css.styleSheet) {\n        css.styleSheet.cssText = u;\n      } else {\n        css.appendChild(d.createTextNode(u));\n      }\n\n      d.getElementsByTagName('head')[0].appendChild(css);\n    })(document, styles));\n\n    isCssEmbeddedFor[selector] = true;\n  }\n}\n\nfunction buildToggle(link, element, scope) {\n  function clickHandler(event) {\n    this.toggle(element, event);\n  }\n\n  let text = link;\n  if (typeof link === 'function') {\n    text = link(element);\n  }\n\n  const toggleLink = createElementFromString(text);\n  toggleLink.setAttribute('data-readmore-toggle', element.id);\n  toggleLink.setAttribute('aria-controls', element.id);\n  toggleLink.addEventListener('click', clickHandler.bind(scope));\n\n  return toggleLink;\n}\n\nfunction isEnvironmentSupported() {\n  return (typeof window !== 'undefined' && typeof document !== 'undefined')\n    && !!document.querySelectorAll && !!window.addEventListener;\n}\n\nconst resizeBoxes = debounce(() => {\n  const elements = document.querySelectorAll('[data-readmore]');\n\n  forEach(elements, (element) => {\n    const expanded = element.getAttribute('aria-expanded') === 'true';\n\n    setBoxHeights(element);\n\n    element.style.height = `${expanded ? element.readmore.expandedHeight : element.readmore.collapsedHeight}px`;\n  });\n}, 100);\n\nconst defaults = {\n  speed: 100,\n  collapsedHeight: 200,\n  heightMargin: 16,\n  moreLink: '<a href=\"#\">Read More</a>',\n  lessLink: '<a href=\"#\">Close</a>',\n  embedCSS: true,\n  blockCSS: 'display: block; width: 100%;',\n  startOpen: false,\n  sourceOrder: 'after',\n\n  // callbacks\n  blockProcessed: () => {},\n  beforeToggle: () => {},\n  afterToggle: () => {}\n};\n\nclass Readmore {\n  constructor(...args) {\n    if (!isEnvironmentSupported()) return;\n\n    const [selector, options] = args;\n    let elements;\n\n    if (typeof selector === 'string') {\n      elements = document.querySelectorAll(selector);\n    } else if (selector.nodeName) {\n      elements = [selector]; // emulate a NodeList by casting a single Node as an array\n    } else {\n      elements = selector;\n    }\n\n    // After all that, if we _still_ don't have iteratable NodeList, bail out.\n    if (!elements.length) return;\n\n    this.options = extend({}, defaults, options);\n\n    if (typeof selector === 'string') {\n      embedCSS(selector, this.options);\n    } else {\n      // Instances need distinct selectors so they don't stomp on each other.\n      this.instanceSelector = `.${uniqueId()}`;\n      embedCSS(this.instanceSelector, this.options);\n    }\n\n    // Need to resize boxes when the page has fully loaded.\n    window.addEventListener('load', resizeBoxes);\n    window.addEventListener('resize', resizeBoxes);\n\n    this.elements = [];\n\n    forEach(elements, (element) => {\n      if (this.instanceSelector) {\n        element.classList.add(this.instanceSelector.substr(1));\n      }\n\n      const expanded = this.options.startOpen;\n\n      element.readmore = {\n        defaultHeight: this.options.collapsedHeight,\n        heightMargin: this.options.heightMargin\n      };\n\n      setBoxHeights(element);\n\n      const { heightMargin } = element.readmore;\n\n      if (element.getBoundingClientRect().height <= element.readmore.collapsedHeight + heightMargin) {\n        if (typeof this.options.blockProcessed === 'function') {\n          this.options.blockProcessed(element, false);\n        }\n        return;\n      }\n\n      element.setAttribute('data-readmore', '');\n      element.setAttribute('aria-expanded', expanded);\n      element.id = element.id || uniqueId();\n\n      const toggleLink = expanded ? this.options.lessLink : this.options.moreLink;\n      const toggleElement = buildToggle(toggleLink, element, this);\n\n      element.parentNode.insertBefore(toggleElement, (this.options.sourceOrder === 'before') ? element : element.nextSibling);\n\n      element.style.height = `${expanded ? element.readmore.expandedHeight : element.readmore.collapsedHeight}px`;\n\n      if (typeof this.options.blockProcessed === 'function') {\n        this.options.blockProcessed(element, true);\n      }\n\n      this.elements.push(element);\n    });\n  }\n\n  // Signature when called internally by the toggleLink click handler:\n  //   toggle(element, event)\n  //\n  // When called externally by an instance,\n  // e.g. readmoreDemo.toggle(document.querySelector('article:nth-of-type(1)')):\n  //   toggle(elementOrQuerySelector)\n  toggle(...args) {\n    let el = args[0];\n\n    const toggleElement = (element) => {\n      const trigger = document.querySelector(`[aria-controls=\"${element.id}\"]`);\n      const expanded = element.getBoundingClientRect().height <= element.readmore.collapsedHeight;\n      const newHeight = expanded ? element.readmore.expandedHeight : element.readmore.collapsedHeight;\n\n      // Fire beforeToggle callback\n      // Since we determined the new \"expanded\" state above we're now out of sync\n      // with our true current state, so we need to flip the value of `expanded`\n      if (typeof this.options.beforeToggle === 'function') {\n        const shouldContinueToggle = this.options.beforeToggle(trigger, element, !expanded);\n\n        // if the beforeToggle callback returns false, stop toggling\n        if (shouldContinueToggle === false) {\n          return;\n        }\n      }\n\n      element.style.height = `${newHeight}px`;\n\n      const transitionendHandler = (transitionEvent) => {\n        // Fire afterToggle callback\n        if (typeof this.options.afterToggle === 'function') {\n          this.options.afterToggle(trigger, element, expanded);\n        }\n\n        transitionEvent.stopPropagation();\n\n        element.setAttribute('aria-expanded', expanded);\n        element.removeEventListener('transitionend', transitionendHandler, false);\n      };\n\n      element.addEventListener('transitionend', transitionendHandler, false);\n\n      if (this.options.speed < 1) {\n        transitionendHandler.call(this, { target: element });\n      }\n\n      const toggleLink = expanded ? this.options.lessLink : this.options.moreLink;\n\n      if (!toggleLink) {\n        trigger.remove();\n      } else if (trigger && trigger.parentNode) {\n        trigger.parentNode.replaceChild(buildToggle(toggleLink, element, this), trigger);\n      }\n    };\n\n    if (typeof el === 'string') {\n      el = document.querySelectorAll(el);\n    }\n\n    if (!el) {\n      throw new Error('Element MUST be either an HTML node or querySelector string');\n    }\n\n    const event = args[1];\n\n    if (event) {\n      event.preventDefault();\n      event.stopPropagation();\n    }\n\n    if (typeof el === 'object' && !el.nodeName) { // element is likely a NodeList\n      forEach(el, toggleElement);\n    } else {\n      toggleElement(el);\n    }\n  }\n\n  destroy(selector) {\n    let elements;\n\n    if (!selector) {\n      elements = this.elements; // eslint-disable-line\n    } else if (typeof selector === 'string') {\n      elements = document.querySelectorAll(selector);\n    } else if (selector.nodeName) {\n      elements = [selector]; // emulate a NodeList by casting a single Node as an array\n    } else {\n      elements = selector;\n    }\n\n    forEach(elements, (element) => {\n      if (this.elements.indexOf(element) === -1) {\n        return;\n      }\n\n      this.elements = this.elements.filter((el) => el !== element);\n\n      if (this.instanceSelector) {\n        element.classList.remove(this.instanceSelector.substr(1));\n      }\n\n      delete element.readmore;\n\n      element.style.height = 'initial';\n      element.style.maxHeight = 'initial';\n\n      element.removeAttribute('data-readmore');\n      element.removeAttribute('aria-expanded');\n\n      const trigger = document.querySelector(`[aria-controls=\"${element.id}\"]`);\n      if (trigger) {\n        trigger.remove();\n      }\n\n      if (element.id.indexOf('rmjs-') !== -1) {\n        element.removeAttribute('id');\n      }\n    });\n\n    delete this;\n  }\n}\n\nReadmore.VERSION = '3.0.0-beta-1';\n\nexport default Readmore;\n", "import {Controller} from '@hotwired/stimulus'\nimport Readmore from 'readmore-js'\nimport SupportChecker from '../components/utility/support_checker'\n\nexport default class extends Controller {\n    static values = {\n        moreLink: {type: String, default: 'Read more'},\n        lessLink: {type: String, default: 'Close'},\n        collapsedHeight: {type: Number, default: 200}\n    }\n\n    connect() {\n        if (SupportChecker.intersectionObserverSupported) {\n            this.intersectionObserver = new IntersectionObserver((entries, observer) => {\n                entries.forEach((entry) => {\n                    if (entry.isIntersecting) {\n                        this._initialize()\n                        observer.unobserve(entry.target)\n                    }\n                })\n            })\n            this.intersectionObserver.observe(this.element)\n        } else {\n            this._initialize()\n        }\n    }\n\n    disconnect() {\n        this.intersectionObserver && this.intersectionObserver.disconnect()\n    }\n\n    _initialize() {\n        new Readmore(this.element, {\n            moreLink: `<a href=\"#\"><small>${this.moreLinkValue}</small></a>`,\n            lessLink: `<a href=\"#\"><small>${this.lessLinkValue}</small></a>`,\n            collapsedHeight: this.collapsedHeightValue,\n            blockProcessed: (element, wasTruncated) => {\n                element.classList.toggle('is-clamped', wasTruncated)\n                element.removeAttribute('aria-expanded')\n            },\n            afterToggle: (trigger, element, expanded) => {\n                trigger.setAttribute('aria-expanded', expanded)\n                element.removeAttribute('aria-expanded')\n                element.classList.toggle('is-clamped', !expanded)\n\n                if (!expanded) {\n                    this._scrollToStart(element)\n                }\n\n                this._notifyResize()\n            }\n        })\n    }\n\n    _scrollToStart(element) {\n        element.scrollIntoView({behavior: 'smooth', block: 'start'})\n    }\n\n    _notifyResize() {\n        this.element.dispatchEvent(new CustomEvent('readmore:toggled', {bubbles: true}))\n    }\n}", "import {Controller} from '@hotwired/stimulus'\n\n// Refresh a bit before the session expires, because the request for the new token also takes time\nconst MARGIN_IN_SECONDS = 60\n\n// The CSRF token of a form is stored in the session, and the session also expires while nobody is signed in.\n// A form that was open longer than the session therefore sends an invalid token and gets rejected.\n// Before submitting such a form, this controller loads the given page again, which starts a new session,\n// and puts the new token into the form. So the user does not have to enter the data again.\nexport default class extends Controller {\n    static values = {\n        url: String,\n        sessionInSeconds: Number\n    }\n\n    connect() {\n        this.loadedAt = Date.now();\n    }\n\n    submit(event) {\n        if (!this.tokenExpired()) return;\n\n        event.preventDefault();\n        this.fetchToken()\n            .then((token) => {\n                this.element.querySelector(`input[name=\"${this.tokenParam()}\"]`).value = token;\n                this.loadedAt = Date.now();\n            })\n            .catch((error) => console.warn(`RefreshCsrfTokenController: ${error}`))\n            // Without a new token the server rejects the form and shows the login page with a notice again.\n            // submit() does not fire the submit event, so this action is not called again.\n            .finally(() => this.element.submit());\n    }\n\n    tokenExpired() {\n        return Date.now() - this.loadedAt > (this.sessionInSecondsValue - MARGIN_IN_SECONDS) * 1000;\n    }\n\n    fetchToken() {\n        return fetch(this.urlValue, {credentials: 'same-origin', headers: {'Accept': 'text/html'}})\n            .then((response) => {\n                if (!response.ok) throw new Error(`Loading the new token failed with status ${response.status}`);\n\n                return response.text();\n            })\n            .then((html) => {\n                const page = new DOMParser().parseFromString(html, 'text/html');\n                return page.querySelector('meta[name=\"csrf-token\"]').content;\n            });\n    }\n\n    tokenParam() {\n        return document.querySelector('meta[name=\"csrf-param\"]')?.content || 'authenticity_token';\n    }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"resizable-chat\"\nexport default class extends Controller {\n    static targets = [\"handle\"]\n    static values = {\n        minWidth: { type: Number, default: 300 },\n        minHeight: { type: Number, default: 250 }\n    }\n\n    connect() {\n        this._onMouseMove = this._onMouseMove.bind(this)\n        this._onMouseUp   = this._onMouseUp.bind(this)\n        this._resizing    = false\n\n        const saved = sessionStorage.getItem(\"chatSize\")\n        if(saved){\n            const {width, height} = JSON.parse(saved)\n            this.element.style.width = width\n            this.element.style.height = height\n        }\n    }\n\n    disconnect() {\n        this._stopListening()\n    }\n\n    // Start resize, snapshot initial values\n    startResize(event) {\n\n        if (this._isGenerating()) return\n\n        event.preventDefault()\n\n        const rect = this.element.getBoundingClientRect()\n\n        this._startX      = event.clientX\n        this._startY      = event.clientY\n        this._startWidth  = rect.width\n        this._startHeight = rect.height\n        this._chatBottom  = rect.bottom\n        this._chatRight   = rect.right\n        this._resizing    = true\n\n        document.addEventListener(\"mousemove\", this._onMouseMove)\n        document.addEventListener(\"mouseup\",   this._onMouseUp)\n        document.body.style.userSelect = \"none\"\n    }\n\n    // Adjust size, navbar acts as upper boundary\n    _onMouseMove(event) {\n        if (!this._resizing) return\n\n        const deltaX = this._startX - event.clientX\n        const deltaY = this._startY - event.clientY\n\n        // Max-H\u00F6he: von der fixen Unterkante des Chats bis zur Navbar-Unterkante\n        const navbar = document.querySelector(\"nav.navbar\")\n        const navbarBottom = navbar ? navbar.getBoundingClientRect().bottom : 0\n        const maxHeight = this._chatBottom - navbarBottom - 8\n\n        const newWidth  = Math.max(this._startWidth  + deltaX, this.minWidthValue)\n        const newHeight = Math.min(\n            Math.max(this._startHeight + deltaY, this.minHeightValue),\n            maxHeight\n        )\n        const maxWidth = this._chatRight - 50\n\n        this.element.style.width  = `${Math.min(Math.max(this._startWidth  + deltaX, this.minWidthValue), maxWidth)}px`\n        this.element.style.height = `${Math.min(Math.max(this._startHeight + deltaY, this.minHeightValue), maxHeight)}px`\n\n    }\n\n    _onMouseUp() {\n        this._resizing = false\n        this._stopListening()\n        document.body.style.userSelect = \"\"\n\n        sessionStorage.setItem(\"chatSize\", JSON.stringify({\n            width: this.element.style.width,\n            height: this.element.style.height\n        }))\n    }\n\n    _stopListening() {\n        document.removeEventListener(\"mousemove\", this._onMouseMove)\n        document.removeEventListener(\"mouseup\",   this._onMouseUp)\n    }\n\n    _isGenerating() {\n        return !!document.querySelector(\"#aiChat button[type='submit'][disabled]\")\n    }\n}", "import {Controller} from '@hotwired/stimulus'\n\nconst REFOCUS_DELAY_MS = 350\nconst ANNOUNCE_HOLD_MS = 1500\nconst AUTOSIZE_CLASS = 'dashboard-widget__card--autosize'\n\nexport default class extends Controller {\n    static targets = ['card']\n    static values = {url: String}\n\n    connect() {\n        this.onMouseMove = this.onMouseMove.bind(this)\n        this.onMouseUp = this.onMouseUp.bind(this)\n        this.refocusTimer = null\n    }\n\n    startResize(event) {\n        event.preventDefault()\n        this.startY = event.clientY\n        this.startHeight = this.cardTarget.offsetHeight\n        this._leaveAutosize()\n\n        window.addEventListener('mousemove', this.onMouseMove)\n        window.addEventListener('mouseup', this.onMouseUp)\n    }\n\n    onMouseMove(event) {\n        const delta = event.clientY - this.startY\n        const newHeight = Math.max(this.startHeight + delta, 50)\n        this.cardTarget.style.height = `${newHeight}px`\n    }\n\n    onMouseUp() {\n        window.removeEventListener('mousemove', this.onMouseMove)\n        window.removeEventListener('mouseup', this.onMouseUp)\n\n        const currentHeight = parseInt(this.cardTarget.style.height)\n        const newHeight = Math.round(currentHeight / 10) * 10\n        this.cardTarget.style.height = `${newHeight}px`\n\n        this._patchHeight({ height: newHeight })\n    }\n\n    resize() {\n        window.removeEventListener('mouseup', this.resize)\n\n        const currentHeight = parseInt(this.element.style.height)\n        const newHeight = Math.round(currentHeight / 10) * 10\n        this.element.style.height = newHeight + 'px'\n\n        this._patchHeight({height: newHeight})\n    }\n\n    increaseHeight(event) {\n        const button = event.currentTarget\n        const currentHeight = this.cardTarget.offsetHeight\n        this._leaveAutosize(currentHeight)\n        this._patchHeight({ increase: true, current_height: currentHeight })\n        this.scheduleRefocus(button)\n    }\n\n    decreaseHeight(event) {\n        const button = event.currentTarget\n        const currentHeight = this.cardTarget.offsetHeight\n        this._leaveAutosize(currentHeight)\n        this._patchHeight({ decrease: true, current_height: currentHeight })\n        this.scheduleRefocus(button)\n    }\n\n    scheduleRefocus(button) {\n        clearTimeout(this.refocusTimer)\n        window.a11yHoldAnnouncements?.(REFOCUS_DELAY_MS + ANNOUNCE_HOLD_MS)\n        this.refocusTimer = setTimeout(() => {\n            window.refocusAndScrollIntoView(button)\n        }, REFOCUS_DELAY_MS)\n    }\n\n    fitToContent() {\n        this._leaveAutosize()\n        this.cardTarget.style.height = 'auto'\n        const contentHeight = this.cardTarget.scrollHeight\n        const newHeight = Math.max(Math.ceil(contentHeight / 10) * 10, 50)\n        this.cardTarget.style.height = `${newHeight}px`\n        this._patchHeight({ height: newHeight })\n    }\n\n    handleContentChanged() {\n        this.cardTarget.style.height = 'auto'\n        const contentHeight = this.cardTarget.scrollHeight\n        const newHeight = Math.max(Math.ceil(contentHeight / 10) * 10, 50)\n        this.cardTarget.style.height = `${newHeight}px`\n        this._patchHeight({ height: newHeight, silent: true })\n    }\n\n    _leaveAutosize(keepHeight = null) {\n        if (!this.cardTarget.classList.contains(AUTOSIZE_CLASS)) return\n        const height = keepHeight ?? this.cardTarget.offsetHeight\n        this.cardTarget.classList.remove(AUTOSIZE_CLASS)\n        this.cardTarget.style.height = `${height}px`\n    }\n\n    _patchHeight(params) {\n        const formData = new FormData()\n        Object.entries(params).forEach(([key, value]) => formData.append(key, value.toString()))\n        Rails.ajax({ type: 'PATCH', url: this.urlValue, data: formData })\n    }\n}", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n    static values = {\n        userId: Number,\n        resourceType: String,\n        cssSelectorPrefix: String,\n    };\n\n    connect() {\n        this.subscription = window.App.cable.subscriptions.create(\n            { channel: \"ResourceLockChannel\" },\n            {\n                initialized: () => console.log(\"ResourceLockChannel Initialized\"),\n                connected: () => console.log(\"Connected to ResourceLockChannel\"),\n                disconnected: () => console.log(\"Disconnected from ResourceLockChannel\"),\n                received: (data) => this.handleReceivedData(data)\n            }\n        );\n    }\n\n    disconnect() {\n        if (this.subscription) {\n            window.App.cable.subscriptions.remove(this.subscription);\n        }\n    }\n\n    handleReceivedData(data) {\n        console.log(\"Received data from ResourceLockChannel:\", data);\n\n        if (!this.isValidResourceType(data.resource_type)) return;\n\n        if (data.action === \"released\") {\n            this.handleReleaseAction(data);\n        } else if (data.action === \"locked\") {\n            this.handleLockAction(data);\n        }\n    }\n\n    isValidResourceType(receivedType) {\n        return receivedType === this.resourceTypeValue;\n    }\n\n    getHtmlElement(resourceId) {\n        const selector = `${this.cssSelectorPrefixValue}${resourceId}`;\n        return document.querySelector(selector);\n    }\n\n    updateLockIcon(htmlElement, lockHtml) {\n        let lockIconContainer;\n        if (htmlElement.classList.contains(\"lock-icon-container\")) {\n            lockIconContainer = htmlElement;\n        } else {\n            lockIconContainer = htmlElement.querySelector(\".lock-icon-container\");\n        }\n        lockIconContainer.innerHTML = lockHtml;\n    }\n\n    disableListItems(parentElement) {\n        parentElement.querySelectorAll(\"[data-disable-target='true']\").forEach(target => {\n            target.classList.add(\"disabled\");\n        });\n    }\n\n    enableListItems(parentElement) {\n        parentElement.querySelectorAll(\"[data-disable-target='true']\").forEach(target => {\n            target.classList.remove(\"disabled\");\n        });\n    }\n\n    handleReleaseAction(data) {\n        const htmlElement = this.getHtmlElement(data.resource_id);\n\n        if (!htmlElement) {\n            return;\n        }\n\n        this.updateLockIcon(htmlElement, data.lock_icon_html);\n        this.enableListItems(htmlElement);\n    }\n\n    handleLockAction(data) {\n        const htmlElement = this.getHtmlElement(data.resource_id);\n\n        if (!htmlElement) {\n            return;\n        }\n\n        const isThisUser = (data.user_id === this.userIdValue);\n        const lockHtml = isThisUser ? data.owner_lock_icon_html : data.others_lock_icon_html;\n\n        this.updateLockIcon(htmlElement, lockHtml);\n\n        if (!isThisUser) {\n            this.disableListItems(htmlElement);\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {toast} from '../components/utility/toast'\n\n// All tabs share one session, so they share the time of the last activity via local storage\nconst LAST_ACTIVITY_KEY = 'sessionTimeoutLastActivity'\n\n// Warns users with accessibility enabled before their session expires and lets them extend it (WCAG 2.2.1).\n//\n// Every request extends the session on the server. The browser mirrors this: each activity (page load, request,\n// heartbeat, activity in another tab) restarts two timers:\n//   1. warning: \"session expires soon\" with a button to extend the session\n//   2. expiry:  \"session has expired\", then a redirect to the login page after a few seconds\nexport default class extends Controller {\n    static values = {\n        sessionInSeconds: Number,\n        warningInSeconds: Number,\n        extendUrl: String,\n        loginUrl: String,\n        redirectInSeconds: Number,\n        warningText: String,\n        extendText: String,\n        extendedText: String,\n        expiredText: String\n    }\n\n    connect() {\n        this.recordActivity = this.recordActivity.bind(this);\n        this.handleActivityInOtherTab = this.handleActivityInOtherTab.bind(this);\n        document.addEventListener('ajax:complete', this.recordActivity);\n        document.addEventListener('heartbeat:sent', this.recordActivity);\n        window.addEventListener('storage', this.handleActivityInOtherTab);\n        this.recordActivity();\n    }\n\n    disconnect() {\n        document.removeEventListener('ajax:complete', this.recordActivity);\n        document.removeEventListener('heartbeat:sent', this.recordActivity);\n        window.removeEventListener('storage', this.handleActivityInOtherTab);\n        this.clearTimers();\n        clearTimeout(this.redirectTimeout);\n    }\n\n    recordActivity() {\n        // Requests after the expiry (e.g. answered with 401) must not start a new countdown\n        if (this.expired) return;\n\n        this.lastActivity = Date.now();\n        this.writeStoredActivity(this.lastActivity);\n        this.scheduleWarningAndExpiry();\n    }\n\n    // Local storage only fires this event in the other tabs, not in the tab that wrote the value\n    handleActivityInOtherTab(event) {\n        if (event.key === LAST_ACTIVITY_KEY && !this.expired) this.scheduleWarningAndExpiry();\n    }\n\n    scheduleWarningAndExpiry() {\n        this.clearTimers();\n        this.hideWarning();\n\n        const expiresAt = this.latestActivity() + this.sessionInSecondsValue * 1000;\n        const warningAt = expiresAt - this.warningInSecondsValue * 1000;\n        this.warningTimeout = setTimeout(() => this.showWarning(), warningAt - Date.now());\n        this.expiryTimeout = setTimeout(() => this.expire(), expiresAt - Date.now());\n    }\n\n    clearTimers() {\n        clearTimeout(this.warningTimeout);\n        clearTimeout(this.expiryTimeout);\n    }\n\n    // The latest activity of all tabs\n    latestActivity() {\n        return Math.max(this.readStoredActivity(), this.lastActivity);\n    }\n\n    // If local storage is blocked (e.g. in private mode), only the activity of this tab is taken into account\n    writeStoredActivity(time) {\n        try {\n            localStorage.setItem(LAST_ACTIVITY_KEY, String(time));\n        } catch (error) {\n            console.warn(`SessionTimeoutController: ${error}`);\n        }\n    }\n\n    readStoredActivity() {\n        try {\n            return parseInt(localStorage.getItem(LAST_ACTIVITY_KEY), 10) || 0;\n        } catch (error) {\n            console.warn(`SessionTimeoutController: ${error}`);\n            return 0;\n        }\n    }\n\n    showWarning() {\n        this.previousFocus = document.activeElement;\n        this.warning = toast(\n            `${this.warningTextValue}\n             <button type=\"button\" class=\"btn btn-light btn-sm d-block mt-2\">${this.extendTextValue}</button>`,\n            'alert',\n            {autohide: false}\n        );\n\n        const extendButton = this.warning.querySelector('.toast-body button');\n        extendButton.addEventListener('click', () => this.extend(), {once: true});\n        this.focusWhenShown(this.warning, extendButton);\n        this.warning.addEventListener('hidden.bs.toast', () => this.hideWarning(), {once: true});\n    }\n\n    hideWarning() {\n        if (!this.warning) return;\n\n        this.returnFocusIfLost(this.warning, this.previousFocus);\n        this.warning.remove();\n        this.warning = null;\n    }\n\n    extend() {\n        fetch(this.extendUrlValue, {\n            method: 'PATCH',\n            credentials: 'same-origin',\n            headers: {\n                'X-CSRF-Token': document.head.querySelector('meta[name=\"csrf-token\"]').content,\n                'Accept': 'application/json'\n            }\n        }).then((response) => {\n            if (!response.ok) throw new Error(`Extending the session failed with status ${response.status}`);\n\n            this.recordActivity();\n            toast(this.extendedTextValue, 'success');\n        }).catch(() => this.expire());\n    }\n\n    expire() {\n        if (this.expired) return;\n\n        this.expired = true;\n        this.clearTimers();\n        this.hideWarning();\n        const previousFocus = document.activeElement;\n\n        const notice = toast(this.expiredTextValue, 'notice', {autohide: false});\n        notice.addEventListener('hidden.bs.toast', () => this.returnFocusIfLost(notice, previousFocus), {once: true});\n        this.redirectTimeout = setTimeout(() => window.location.assign(this.loginUrlValue),\n            this.redirectInSecondsValue * 1000);\n    }\n\n    // A toast is hidden until bootstrap has shown it, and hidden elements cannot be focused\n    focusWhenShown(notice, element) {\n        notice.addEventListener('shown.bs.toast', () => element.focus(), {once: true});\n    }\n\n    // Lost means: the focus was on the closed notice or fell back to the body\n    returnFocusIfLost(notice, previousFocus) {\n        const focusLost = notice.contains(document.activeElement) || document.activeElement === document.body;\n        if (focusLost && previousFocus?.isConnected) previousFocus.focus();\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport SupportChecker from '../components/utility/support_checker'\n\nexport default class extends Controller {\n    connect() {\n        if (!SupportChecker.localStorageSupported) return\n\n        let sidebarCollapsed = JSON.parse(localStorage.getItem('main_sidebar_collapsed'))\n        if (sidebarCollapsed === true) {\n            let toggleElement = document.getElementById('mainSidebar')\n            if (toggleElement === null) return\n\n            toggleElement.classList.add('sidebar--collapsed')\n            toggleElement.setAttribute('aria-expanded', 'false')\n        }\n    }\n\n    toggle(_event) {\n        let toggleElement = document.getElementById('mainSidebar')\n        if (toggleElement === null) return\n\n        toggleElement.classList.toggle('sidebar--collapsed')\n\n        if (toggleElement.classList.contains('sidebar--collapsed')) {\n            toggleElement.setAttribute('aria-expanded', 'false')\n            if (SupportChecker.localStorageSupported) localStorage.setItem('main_sidebar_collapsed', 'true')\n        } else {\n            toggleElement.setAttribute('aria-expanded', 'true')\n            if (SupportChecker.localStorageSupported) localStorage.removeItem('main_sidebar_collapsed')\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    connect() {\n        this.submitted = false\n    }\n\n    submitForm(event) {\n        if (event.code === 'Enter' && !event.shiftKey) {\n            event.preventDefault()\n            if (!event.target.form.reportValidity()) return\n            if (this.submitted) return\n\n            // From here on, submitted doesn't need to be turned false again,\n            // because this stimulus controller is used in contexts\n            // where the DOM is replaced. So the values are reinitialized.\n            this.submitted = true\n            event.target.form.requestSubmit()\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['otherForm', 'ownForm', 'toggleButton', 'displayDoms']\n\n    initialize() {\n        this.toggleReady = true\n        this.otherFormJustSaved = false\n        if (this.hasOwnFormTarget) {\n            this.ownButton = this.ownFormTarget.querySelector(\"button[type='submit']\")\n        }\n        if (this.hasOtherFormTarget) {\n            this.otherButton = this.otherFormTarget.querySelector(\"button[type='submit']\")\n        }\n        this.fillUploader = this.data.get('fillUploaderForm')?.trim() === \"true\"\n        this._submitOnEvent = this._submitOnEvent.bind(this)\n        this.disableToggleAndSubmit = this.disableToggleAndSubmit.bind(this)\n    }\n\n    connect() {\n        document.addEventListener('submit-event', this._submitOnEvent)\n        document.addEventListener('disable-event', this.disableToggleAndSubmit)\n        if (this.ownButton) {\n            this.observer = new MutationObserver(() => {\n                this._syncDisabled()\n            })\n            this.observer.observe(this.ownButton, {attributes: true, attributeFilter: ['disabled']})\n        }\n    }\n\n    disconnect() {\n        this.observer.disconnect()\n        document.removeEventListener('disable-event', this.disableToggleAndSubmit)\n        document.removeEventListener('submit-event', this._submitOnEvent)\n    }\n\n    toggleOtherSubmit() {\n        if (this.otherFormTarget && this.toggleReady) {\n            this.toggleReady = false\n            if (this.otherButton) {\n                this.otherButton.disabled = !this.otherButton.disabled;\n                this.displayDomsTargets.forEach(dom => {\n                    dom.style.display = dom.style.display === \"none\" ? \"\" : \"none\"\n                })\n                // bs-accordion-collapse uses bs-collapse. Thus the collapse speed is: 0.35s, so we take 350 ms as timeout\n                setTimeout(() => {\n                    this.toggleReady = true\n                }, 350);\n            }\n        }\n    }\n\n    submitOtherForm() {\n        if (this.otherFormTarget && this.toggleReady) {\n            this.toggleReady = false\n            if (this.otherButton) {\n                this.displayDomsTargets.forEach(dom => {\n                    dom.style.display = dom.style.display === \"none\" ? \"\" : \"none\"\n                })\n                this.disableToggleAndSubmit()\n                if (!this.otherFormJustSaved) {\n                    Rails.fire(this.otherFormTarget, 'submit')\n                    if (this.otherFormTarget.dataset.remote !== 'true') this.otherFormTarget.submit()\n                    // ownButton and toggleButtonTarget lose their 'disabled'-tag after the submit was successful due\n                    // to rails-ujs. We built the submit button with submit-disabled-with functionality. Resetting\n                    // the disabled-tag after a successful submit is part of the feature\n                }\n                this.otherFormJustSaved = !this.otherFormJustSaved\n                // bs-accordion-collapse uses bs-collapse. Thus the collapse speed is: 0.35s, so we take 350 ms as timeout\n                setTimeout(() => {\n                    this.toggleReady = true\n                }, 350);\n            }\n        }\n    }\n\n    disableToggleAndSubmit() {\n        if (!this.hasToggleButtonTarget || !this.ownButton) return\n        if (!this.toggleButtonTarget.classList.contains('collapsed')) {\n            this.ownButton.disabled = !this.ownButton.disabled\n            this.toggleButtonTarget.disabled = !this.toggleButtonTarget.disabled\n        }\n    }\n\n    _submitOnEvent() {\n        if (this.fillUploader) {\n            this._fillUploaderForm()\n        }\n        if (this.otherFormTarget) {\n            Rails.fire(this.otherFormTarget, 'submit')\n            if (this.otherFormTarget.dataset.remote !== 'true') this.otherFormTarget.submit()\n        }\n    }\n\n    _syncDisabled() {\n        if (this.hasOwnFormTarget && this.hasToggleButtonTarget) {\n            this.toggleButtonTarget.disabled = this.ownButton.disabled\n        }\n    }\n\n    _fillUploaderForm() {\n        const fieldFileIDElement = this.element.querySelector('[data-controller=\"direct-upload\"] [data-direct-upload-target=\"fieldFileID\"]')\n        const fileNameElement = this.element.querySelector('[data-controller=\"direct-upload\"] [data-direct-upload-target=\"fileName\"]')\n        if (fieldFileIDElement) fieldFileIDElement.value = event.detail.mediaFileId\n        if (fileNameElement) fileNameElement.innerText = event.detail.mediaFileName\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['outputField', 'inputField']\n\n    initialize() {\n        this.sum()\n    }\n\n    inputFieldTargetConnected(_target) {\n        this.sum()\n    }\n\n    inputFieldTargetDisconnected(_target) {\n        this.sum()\n    }\n\n    sum() {\n        let sum = 0\n        Array.prototype.forEach.call(this.inputFieldTargets, function (element, _index) {\n            sum += Number(element.value)\n        })\n        this.outputFieldTarget.innerText = sum\n    }\n}\n", "export default function SyncPickMarkup (options) {\n    this.element = options.element\n    this.multiple = options.multiple || false\n    this.disabled = options.disabled || false\n    this.valueProp = options.valueProp\n    this.searchPlaceholder = options.searchPlaceholder\n    this.searchInputClasses = options.searchInputClasses\n    this.buttonClasses = options.buttonClasses\n    this.buttonDisabledClasses = options.buttonDisabledClasses\n    this.emptySelectButtonText = options.emptySelectButtonText\n    this.buttonIconClasses = options.buttonIconClasses\n    this.checkedIconClasses = options.checkedIconClasses\n    this.listClasses = options.listClasses\n    this.selectedTextFormat = options.selectedTextFormat\n    this.selectedTextVariable = options.selectedTextVariable\n    this.selectedText = options.selectedText\n    this.noResultsText = options.noResultsText\n    this.container = options.container\n    this.withSearch = options.withSearch\n    this.withSelectAllButton = options.withSelectAllButton\n    this.selectAllButtonClasses = options.selectAllButtonClasses\n    this.selectAllButtonGroupClasses = options.selectAllButtonGroupClasses\n    this.selectAllButtonText = options.selectAllButtonText\n    this.deselectAllButtonText = options.deselectAllButtonText\n    this.dropdownAlignRight = options.dropdownAlignRight\n    this.popupWidth = options.popupWidth\n    this.label = options.label\n    this.idPrefix = this.element.id + '-sp'\n    this.optionCount = 0\n    this.open = false\n\n    this.wrapper = this.buildWrapper()\n    this.button = this.buildButton()\n    if (!this.disabled) {\n        this.popup = this.buildPopup()\n        this.liveRegion = this.buildLiveRegion()\n    }\n\n    this.setupAria()\n    this.hideOriginalSelect()\n    this.assemble()\n}\n\nSyncPickMarkup.prototype.hideOriginalSelect = function () {\n    this.originalTabindex = this.element.getAttribute('tabindex')\n    this.originalAriaHidden = this.element.getAttribute('aria-hidden')\n    this.element.classList.add('visually-hidden')\n    this.element.setAttribute('tabindex', '-1')\n    // the generated markup replaces the select for screen reader, otherwise it is announced twice\n    this.element.setAttribute('aria-hidden', 'true')\n}\n\nSyncPickMarkup.prototype.showOriginalSelect = function () {\n    this.element.style.display = 'initial'\n    restoreAttribute(this.element, 'tabindex', this.originalTabindex)\n    restoreAttribute(this.element, 'aria-hidden', this.originalAriaHidden)\n}\n\n/**\n * Follows the WAI-ARIA combobox pattern: the element that keeps the focus while navigating (the button, or the search\n * input when search is enabled) is the combobox and points to the active option via aria-activedescendant.\n */\nSyncPickMarkup.prototype.setupAria = function () {\n    const labelId = this.getLabelId()\n    const fallbackLabel = this.element.getAttribute('aria-label') || this.element.getAttribute('title')\n\n    if (this.disabled) {\n        if (labelId) this.button.setAttribute('aria-labelledby', labelId + ' ' + this.buttonText.id)\n        return\n    }\n\n    if (labelId) {\n        this.resultsWrapper.setAttribute('aria-labelledby', labelId)\n    } else if (fallbackLabel) {\n        this.resultsWrapper.setAttribute('aria-label', fallbackLabel)\n    }\n\n    this.focusTarget = this.withSearch ? this.searchInput : this.button\n    this.focusTarget.setAttribute('role', 'combobox')\n    this.focusTarget.setAttribute('aria-haspopup', 'listbox')\n    this.focusTarget.setAttribute('aria-controls', this.resultsWrapper.id)\n    // the hidden select no longer tells screen reader that a value is required\n    if (this.element.required) {\n        this.focusTarget.setAttribute('aria-required', 'true')\n        this.resultsWrapper.setAttribute('aria-required', 'true')\n    }\n\n    if (this.withSearch) {\n        // the button only discloses the popup, the search input controls the listbox\n        this.popup.id = this.idPrefix + '-popup'\n        this.button.setAttribute('aria-controls', this.popup.id)\n        if (labelId) this.button.setAttribute('aria-labelledby', labelId + ' ' + this.buttonText.id)\n        this.searchInput.setAttribute('aria-autocomplete', 'list')\n        // named by the field label, the placeholder is exposed as description\n        if (labelId) {\n            this.searchInput.setAttribute('aria-labelledby', labelId)\n        } else {\n            this.searchInput.setAttribute('aria-label', fallbackLabel || this.searchPlaceholder)\n        }\n    } else if (labelId) {\n        // the combobox value is read from its content, so only the label is used as name\n        this.button.setAttribute('aria-labelledby', labelId)\n    } else if (fallbackLabel) {\n        this.button.setAttribute('aria-label', fallbackLabel)\n    }\n\n    this.setExpanded(false)\n}\n\nSyncPickMarkup.prototype.getLabelId = function () {\n    if (!this.label) return null\n    if (!this.label.id) this.label.id = this.idPrefix + '-label'\n    return this.label.id\n}\n\nSyncPickMarkup.prototype.setExpanded = function (expanded) {\n    this.open = expanded\n    this.button.setAttribute('aria-expanded', expanded.toString())\n    if (this.withSearch) this.searchInput.setAttribute('aria-expanded', expanded.toString())\n}\n\nSyncPickMarkup.prototype.getTabCycle = function () {\n    const items = [this.focusTarget]\n    if (this.withSelectAllButton) items.push(this.selectAllButton, this.deselectAllButton)\n    return items\n}\n\nSyncPickMarkup.prototype.assemble = function () {\n    this.wrapper.appendChild(this.button)\n    if (!this.disabled) {\n        this.wrapper.appendChild(this.liveRegion)\n        if (!!this.container) {\n            const container = document.querySelector(this.container)\n            if (container) {\n                container.appendChild(this.popup)\n                this.popup.style.position = 'absolute'\n                this.popup.style.top = '0'\n            }\n        } else {\n            this.wrapper.appendChild(this.popup)\n        }\n    }\n    this.element.parentNode.insertBefore(this.wrapper, this.element)\n}\n\nSyncPickMarkup.prototype.positionPopup = function () {\n    if (!this.open) return\n    if (!!this.container) {\n        const pos = this.wrapper.getBoundingClientRect()\n        const offset = getOffsetFromBoundingBox(pos)\n        const top = offset.top + this.wrapper.offsetHeight\n\n        if (this.shouldDropUp()) {\n            this.popup.style.top = (top - this.popup.offsetHeight - this.button.offsetHeight - parseInt(window.getComputedStyle(this.popup).marginTop)).toString() + 'px'\n        } else {\n            this.popup.style.top = top.toString() + 'px'\n        }\n        if (this.dropdownAlignRight) {\n            const right = window.innerWidth - pos.left - this.wrapper.offsetWidth\n            this.popup.style.right = right + 'px'\n        } else {\n            this.popup.style.left = offset.left.toString() + 'px'\n        }\n        this.popup.style.minWidth = this.wrapper.offsetWidth + 'px'\n        this.popup.style.width = this.popupWidth\n        this.popup.style.position = 'absolute'\n    } else {\n        if (this.shouldDropUp()) {\n            this.popup.style.top = 'auto'\n            this.popup.style.bottom = (this.button.offsetHeight + parseInt(window.getComputedStyle(this.popup).marginTop)).toString() + 'px'\n        } else {\n            this.popup.style.top = '100%'\n            this.popup.style.bottom = 'auto'\n        }\n    }\n}\n\nSyncPickMarkup.prototype.shouldDropUp = function () {\n    const pos = this.button.getBoundingClientRect()\n    const offset = getOffsetFromBoundingBox(pos)\n    const selectOffsetTop = offset.top - document.documentElement.scrollTop\n    const selectOffsetBot = window.innerHeight - selectOffsetTop - this.button.offsetHeight\n    return selectOffsetTop > selectOffsetBot && selectOffsetBot < this.popup.offsetHeight\n}\n\nSyncPickMarkup.prototype.buildWrapper = function () {\n    const wrapper = document.createElement('div')\n    wrapper.classList.add('sync-pick')\n    if (this.multiple) wrapper.classList.add('sync-pick--multiple')\n    return wrapper\n}\n\nSyncPickMarkup.prototype.buildButton = function () {\n    const button = document.createElement('button')\n    button.setAttribute('type', 'button')\n    button.id = this.idPrefix + '-button'\n    this.buttonClasses.forEach(function (buttonClass) {\n        button.classList.add(buttonClass)\n    })\n    if (this.disabled) {\n        button.disabled = true\n        this.buttonDisabledClasses.forEach(function (buttonDisabledClass) {\n            button.classList.add(buttonDisabledClass)\n        })\n    }\n\n    this.buttonText = document.createElement('span')\n    this.buttonText.classList.add('sp__button-text')\n    this.buttonText.id = this.idPrefix + '-button-text'\n\n    if (this.buttonIconClasses && this.buttonIconClasses.length > 0) {\n        let buttonIcon = document.createElement('i')\n        buttonIcon.setAttribute('aria-hidden', 'true')\n        this.buttonIconClasses.forEach(function (buttonIconClass) {\n            buttonIcon.classList.add(buttonIconClass)\n        })\n        button.appendChild(this.buttonText)\n        button.appendChild(buttonIcon)\n    } else {\n        button.appendChild(this.buttonText)\n    }\n\n    return button\n}\n\nSyncPickMarkup.prototype.buildPopup = function () {\n    const popup = document.createElement('div')\n    popup.classList.add('sp__popup')\n    if (this.dropdownAlignRight) popup.classList.add('sp__popup--right')\n\n    if (this.withSearch) popup.appendChild(this.buildSearchInput())\n    if (this.withSelectAllButton) popup.appendChild(this.buildSelectAllButtons())\n    popup.appendChild(this.buildResultsScrollWrapper())\n\n    return popup\n}\n\n/**\n * Screen readers do not reliably announce an option becoming unselected, so changes are announced here.\n * It is outside the popup, because content inside a hidden element is not announced.\n */\nSyncPickMarkup.prototype.buildLiveRegion = function () {\n    const liveRegion = document.createElement('div')\n    liveRegion.classList.add('visually-hidden')\n    liveRegion.setAttribute('role', 'status')\n    liveRegion.setAttribute('aria-live', 'polite')\n    return liveRegion\n}\n\nSyncPickMarkup.prototype.announce = function (message) {\n    // cleared first and set with a delay, so the same message is announced again\n    this.liveRegion.textContent = ''\n    clearTimeout(this.announceTimer)\n    this.announceTimer = setTimeout(() => {\n        this.liveRegion.textContent = message\n    }, 100)\n}\n\nSyncPickMarkup.prototype.buildSearchInput = function () {\n    const wrapper = document.createElement('div')\n    wrapper.classList.add('sp__search-input__wrapper')\n    this.searchInput = document.createElement('input')\n    this.searchInput.type = 'search'\n    this.searchInput.setAttribute('placeholder', this.searchPlaceholder)\n    this.searchInput.classList.add('sp__search-input')\n\n    let self = this\n    this.searchInputClasses.forEach(function (searchInputClass) {\n        self.searchInput.classList.add(searchInputClass)\n    })\n\n    wrapper.appendChild(this.searchInput)\n    return wrapper\n}\n\nSyncPickMarkup.prototype.buildSelectAllButtons = function () {\n    const buttongroup = document.createElement('div')\n    this.selectAllButtonGroupClasses.forEach(function (buttonGroupClass) {\n        buttongroup.classList.add(buttonGroupClass)\n    })\n    this.selectAllButton = document.createElement('button')\n    this.selectAllButton.setAttribute('type', 'button')\n    this.deselectAllButton = document.createElement('button')\n    this.deselectAllButton.setAttribute('type', 'button')\n    this.selectAllButton.innerHTML = this.selectAllButtonText\n    this.deselectAllButton.innerHTML = this.deselectAllButtonText\n    let self = this\n    this.selectAllButtonClasses.forEach(function (buttonClass) {\n        self.selectAllButton.classList.add(buttonClass)\n        self.deselectAllButton.classList.add(buttonClass)\n    })\n    buttongroup.appendChild(this.selectAllButton)\n    buttongroup.appendChild(this.deselectAllButton)\n\n    return buttongroup\n}\n\nSyncPickMarkup.prototype.buildResultsScrollWrapper = function () {\n    this.resultsScrollWrapper = document.createElement('div')\n    this.resultsScrollWrapper.classList.add('sp__results-scroll-wrapper')\n    this.resultsWrapper = document.createElement('div')\n    this.resultsWrapper.classList.add('sp__results')\n    this.resultsWrapper.id = this.idPrefix + '-listbox'\n    this.resultsWrapper.setAttribute('role', 'listbox')\n    if (this.multiple) this.resultsWrapper.setAttribute('aria-multiselectable', 'true')\n    this.resultsScrollWrapper.appendChild(this.resultsWrapper)\n    return this.resultsScrollWrapper\n}\n\nSyncPickMarkup.prototype.appendEntries = function (dropdownValues, selectedValues, valuesOrder) {\n    if (Object.keys(dropdownValues).length > 0) {\n        Object.entries(dropdownValues).forEach(([optGroupLabel, options], index, arr) => {\n            const pageUl = buildUl(this.listClasses)\n            if (optGroupLabel && optGroupLabel.length > 0) {\n                const label = document.createElement('span')\n                label.classList.add('sp__opt-group-label')\n                label.innerText = optGroupLabel\n                // hidden from the tree, but still read as the group name via aria-labelledby\n                label.id = this.idPrefix + '-group-' + index\n                label.setAttribute('aria-hidden', 'true')\n                this.resultsWrapper.appendChild(label)\n                pageUl.setAttribute('role', 'group')\n                pageUl.setAttribute('aria-labelledby', label.id)\n            }\n            pageUl.setAttribute('data-label', optGroupLabel)\n            const order = valuesOrder[optGroupLabel]\n            this.renderNewEntries(options, pageUl, selectedValues, order)\n            this.resultsWrapper.appendChild(pageUl)\n            if (optGroupLabel && optGroupLabel.length > 0 && arr[index + 1]) {\n                const hr = document.createElement('hr')\n                hr.classList.add('sp__hr')\n                hr.setAttribute('aria-hidden', 'true')\n                this.resultsWrapper.appendChild(hr)\n            }\n        })\n    } else {\n        const li = buildLi({ text: this.noResultsText })\n        li.classList.add('sp__results-list__item--muted')\n        li.setAttribute('aria-disabled', 'true')\n        const pageUl = buildUl(this.listClasses)\n        pageUl.appendChild(li)\n        this.resultsWrapper.appendChild(pageUl)\n    }\n\n}\n\nSyncPickMarkup.prototype.renderNewEntries = function (options, ul, selectedValues, order) {\n    let self = this\n    order.forEach(value => {\n        const element = options[value]\n        if (!element) return\n        const li = buildLi({\n            value,\n            id: self.idPrefix + '-option-' + self.optionCount++,\n            ...element,\n            selected: selectedValues.indexOf(value) > -1,\n            multiple: self.multiple,\n            checkedIconClasses: self.checkedIconClasses\n        })\n        ul.appendChild(li)\n    })\n}\n\nSyncPickMarkup.prototype.selectItem = function (value) {\n    const option = this.element.querySelector('option[value=\"' + value.replaceAll('\"', '\\\\\"') + '\"]')\n    option.selected = true\n    option.setAttribute('data-selected', '')\n    this.addSelectedClassByValue(value)\n}\n\nSyncPickMarkup.prototype.deselectItem = function (value) {\n    const option = this.element.querySelector('option[value=\"' + value.replaceAll('\"', '\\\\\"') + '\"]')\n    option.selected = false\n    option.removeAttribute('data-selected')\n    this.removeSelectedClassByValue(value)\n}\n\nSyncPickMarkup.prototype.addSelectedClassByValue = function (value) {\n    const li = this.resultsWrapper.querySelector('li[data-value=\"' + value.replaceAll('\"', '\\\\\"') + '\"]')\n    if (li) setLiSelected(li, true, this.multiple, this.checkedIconClasses)\n}\n\nSyncPickMarkup.prototype.removeSelectedClassByValue = function (value) {\n    const li = this.resultsWrapper.querySelector('li[data-value=\"' + value.replaceAll('\"', '\\\\\"') + '\"]')\n    if (li) setLiSelected(li, false, this.multiple, this.checkedIconClasses)\n}\n\nSyncPickMarkup.prototype.destroy = function () {\n    clearTimeout(this.announceTimer)\n    this.showOriginalSelect()\n    if (!!this.container) {\n        const container = document.querySelector(this.container)\n        if (container) container.removeChild(this.popup)\n    }\n    if (this.element && this.element.parentNode) this.element.parentNode.removeChild(this.wrapper)\n}\n\nSyncPickMarkup.prototype.getSelected = function () {\n    return this.resultsWrapper.querySelector('li[data-selected]')\n}\n\nSyncPickMarkup.prototype.getHovered = function () {\n    return this.hovered\n}\n\nSyncPickMarkup.prototype.setHovered = function (li) {\n    if (this.hovered) this.hovered.classList.remove('sp__results-list__item--hover')\n    this.hovered = li || false\n    if (!this.focusTarget) return\n    if (li) {\n        li.classList.add('sp__results-list__item--hover')\n        this.focusTarget.setAttribute('aria-activedescendant', li.id)\n        this.scrollEntryIntoView(li)\n    } else {\n        this.focusTarget.removeAttribute('aria-activedescendant')\n    }\n    if (!this.multiple) this.updateSingleAriaSelected(li)\n}\n\n/**\n * In a single select the active option is the one announced as selected (selection follows focus), the committed\n * selection is restored when nothing is active anymore.\n */\nSyncPickMarkup.prototype.updateSingleAriaSelected = function (activeLi) {\n    this.resultsWrapper.querySelectorAll('li[data-value]').forEach(function (li) {\n        const selected = activeLi ? li === activeLi : li.hasAttribute('data-selected')\n        li.setAttribute('aria-selected', selected.toString())\n    })\n}\n\nSyncPickMarkup.prototype.focusPreviousEntry = function () {\n    this.moveHovered(-1)\n}\n\nSyncPickMarkup.prototype.focusNextEntry = function () {\n    this.moveHovered(1)\n}\n\nSyncPickMarkup.prototype.moveHovered = function (step) {\n    const allLis = Array.from(this.resultsWrapper.querySelectorAll('li.sp__results-list__item[data-value]'))\n    const current = this.hovered || this.getSelected()\n    const index = allLis.indexOf(current)\n    if (index === -1) {\n        if (allLis[0]) this.setHovered(allLis[0])\n    } else if (allLis[index + step]) {\n        this.setHovered(allLis[index + step])\n    } else if (!this.hovered) {\n        this.setHovered(current)\n    }\n}\n\nSyncPickMarkup.prototype.scrollEntryIntoView = function (entry) {\n    const entryOffsetTop = entry.offsetTop - this.resultsScrollWrapper.offsetTop\n    const shouldScrollDown = this.resultsScrollWrapper.offsetHeight + this.resultsScrollWrapper.scrollTop < entryOffsetTop + entry.offsetHeight\n    const shouldScrollUp = entryOffsetTop < this.resultsScrollWrapper.scrollTop\n\n    if (shouldScrollDown) {\n        this.resultsScrollWrapper.scrollTop = entryOffsetTop - this.resultsScrollWrapper.offsetHeight + entry.offsetHeight\n    } else if (shouldScrollUp) {\n        this.resultsScrollWrapper.scrollTop = entryOffsetTop\n    }\n}\n\nSyncPickMarkup.prototype.setButtonText = function (selectedValues) {\n    if (selectedValues && Object.keys(selectedValues).length > 0) {\n        this.buttonText.innerHTML = this.renderButtonText(selectedValues)\n    } else {\n        this.buttonText.innerHTML = this.emptySelectButtonText\n    }\n}\n\nSyncPickMarkup.prototype.renderButtonText = function (selectedValues) {\n    if (this.selectedTextFormat) {\n        const match = this.selectedTextFormat.match(/count\\s?>\\s?([0-9]*)/)\n        const count = match && match[1] && parseInt(match[1])\n\n        if (count && count < Object.keys(selectedValues).length) {\n            return this.selectedText.replace(this.selectedTextVariable, Object.keys(selectedValues).length)\n        } else {\n            return joinSelectedTexts(selectedValues)\n        }\n    } else {\n        return joinSelectedTexts(selectedValues)\n    }\n}\n\nfunction joinSelectedTexts (selectedValues) {\n    let selected = []\n    Object.keys(selectedValues).forEach(function (key) {\n        selected.push(selectedValues[key].text)\n    })\n    return selected.join(', ')\n}\n\nfunction buildUl (additionalClasses) {\n    const pageUl = document.createElement('ul')\n    pageUl.classList.add('sp__results-list')\n    // the listbox is the results wrapper, a list without optgroup must not add an extra level\n    pageUl.setAttribute('role', 'none')\n    additionalClasses.forEach(function (listClass) {\n        pageUl.classList.add(listClass)\n    })\n    return pageUl\n}\n\nfunction buildLi (options) {\n    const text = options.text\n    const value = options.value\n    const subtext = options.subtext\n    const imgAttributes = options.img\n    const li = document.createElement('li')\n\n    const textSpan = document.createElement('span')\n    textSpan.classList.add('sp__results-list__item__text')\n    textSpan.innerHTML = text\n\n    if (options.id) li.id = options.id\n    if (typeof value !== 'undefined' && value !== null) {\n        li.setAttribute('data-value', value)\n        li.setAttribute('aria-selected', 'false')\n    }\n    if (typeof text !== 'undefined' && text !== null) {\n        li.setAttribute('title', textSpan.innerText)\n        li.setAttribute('data-text', text)\n    }\n    if (typeof subtext !== 'undefined' && subtext !== null) {\n        li.setAttribute('data-subtext', subtext)\n        const subtextDom = document.createElement('small')\n        subtextDom.innerHTML = subtext\n        subtextDom.classList.add('sp__results-list__item__subtext')\n        textSpan.appendChild(subtextDom)\n    }\n\n    li.setAttribute('role', 'option')\n    li.classList.add('sp__results-list__item')\n\n    if (typeof imgAttributes !== 'undefined' && imgAttributes !== null) {\n        const imageTag = document.createElement('img')\n        imageTag.setAttribute('alt', '') // decorative unless an alt is passed, the text names the option\n        Object.keys(imgAttributes).forEach(function (attr) {\n            imageTag.setAttribute(attr, imgAttributes[attr])\n        })\n\n        imageTag.classList.add('sp__results-list__item__image')\n        li.setAttribute('data-img', JSON.stringify(imgAttributes))\n        li.appendChild(imageTag)\n    }\n\n    li.appendChild(textSpan)\n    if (options.selected) {\n        setLiSelected(li, true, options.multiple, options.checkedIconClasses)\n    }\n    return li\n}\n\nfunction setLiSelected (li, selected, addCheck, checkedIconClasses) {\n    li.setAttribute('aria-selected', selected.toString())\n    if (selected) {\n        if (addCheck) {\n            const check = document.createElement('i')\n            check.setAttribute('aria-hidden', 'true')\n            checkedIconClasses.forEach(function (checkedIconClass) {\n                check.classList.add(checkedIconClass)\n            })\n            check.classList.add('sp__results-list__item__check-mark')\n            li.appendChild(check)\n        } else {\n            li.classList.remove('sp__results-list__item--hover')\n            li.setAttribute('data-selected', '')\n            if (li.getAttribute('data-value') !== '') li.classList.add('sp__results-list__item--selected')\n        }\n    } else {\n        if (addCheck) {\n            const check = li.querySelector('.sp__results-list__item__check-mark')\n            if (check) li.removeChild(check)\n        } else {\n            li.removeAttribute('data-selected')\n            li.classList.remove('sp__results-list__item--selected')\n        }\n    }\n}\n\nfunction restoreAttribute (element, name, value) {\n    if (value === null) {\n        element.removeAttribute(name)\n    } else {\n        element.setAttribute(name, value)\n    }\n}\n\nfunction getOffsetFromBoundingBox (box) {\n    const docElem = document.documentElement\n\n    return {\n        top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),\n        left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)\n    }\n}\n", "export default {\n    searchPlaceholder: 'Search',\n    emptySelectButtonText: 'Show all',\n    noResultsText: 'No results found',\n    selectedText: '%num% selected',\n    selectAllButtonText: 'Select all',\n    deselectAllButtonText: 'Deselect all',\n    itemSelectedText: '%item% selected',\n    itemDeselectedText: '%item% deselected',\n    allSelectedText: 'All entries selected',\n    allDeselectedText: 'All entries deselected'\n}\n", "export default {\n    searchPlaceholder: 'Suchen',\n    emptySelectButtonText: 'Alle anzeigen',\n    noResultsText: 'Keine Ergebnisse gefunden',\n    selectedText: '%num% Eintr\u00E4ge ausgew\u00E4hlt',\n    selectAllButtonText: 'Alles ausw\u00E4hlen',\n    deselectAllButtonText: 'Nichts ausw\u00E4hlen',\n    itemSelectedText: '%item% ausgew\u00E4hlt',\n    itemDeselectedText: '%item% abgew\u00E4hlt',\n    allSelectedText: 'Alle Eintr\u00E4ge ausgew\u00E4hlt',\n    allDeselectedText: 'Alle Eintr\u00E4ge abgew\u00E4hlt'\n}\n", "export default {\n    searchPlaceholder: 'Buscar',\n    emptySelectButtonText: 'Mostrar todos',\n    noResultsText: 'No se encontraron resultados',\n    selectedText: '%num% seleccionados',\n    selectAllButtonText: 'Seleccionar todo',\n    deselectAllButtonText: 'Deseleccionar todo',\n    itemSelectedText: '%item% seleccionado',\n    itemDeselectedText: '%item% deseleccionado',\n    allSelectedText: 'Todas las entradas seleccionadas',\n    allDeselectedText: 'Todas las entradas deseleccionadas'\n}\n", "export default {\n    searchPlaceholder: 'Rechercher',\n    emptySelectButtonText: 'afficher Tout',\n    noResultsText: 'Aucun r\u00E9sultat trouv\u00E9',\n    selectedText: '%num% s\u00E9lectionn\u00E9s',\n    selectAllButtonText: 's\u00E9lectionner Tout',\n    deselectAllButtonText: 'd\u00E9s\u00E9lectionner Tout',\n    itemSelectedText: '%item% s\u00E9lectionn\u00E9',\n    itemDeselectedText: '%item% d\u00E9s\u00E9lectionn\u00E9',\n    allSelectedText: 'Toutes les entr\u00E9es s\u00E9lectionn\u00E9es',\n    allDeselectedText: 'Toutes les entr\u00E9es d\u00E9s\u00E9lectionn\u00E9es'\n}\n", "import SyncPickMarkup from './sync-pick/sync-pick-markup'\nimport en from \"./sync-pick/i18n/en\"\nimport de from \"./sync-pick/i18n/de\"\nimport es from \"./sync-pick/i18n/es\"\nimport fr from \"./sync-pick/i18n/fr\"\n\n/**\n * SyncPick\n * @param {Object}   options\n * @param {String}   options.id - id of the select to use\n * @param {String}  [options.language='en'] - set language. defaults to document language or 'en'\n * @param {String}  [options.valueProp='id'] - name of the json key that holds the data to use as option value\n * @param {Number}  [options.searchTimeout=50] - timeout after the last keydown when to start searching\n * @param {String}  [options.searchPlaceholder='Search'] - placeholder for the search input\n * @param {Array}   [options.searchInputClasses=[]] - additional classes to add to the search input\n * @param {String}  [options.emptySelectButtonText=[]] - set the text of the select button before something is selected\n * @param {Array}   [options.buttonClasses=[]] - additional classes to add to the \"open\" button\n * @param {Array}   [options.buttonDisabledClasses=[]] - additional classes to add to the disabled button\n * @param {Array}   [options.buttonIconClasses=[]] - additional classes to add to \"open\" buttons icon\n * @param {Array}   [options.checkedIconClasses=[]] - additional classes to add to \"checked\" icon\n * @param {Array}   [options.listClasses=[]] - additional classes to add to each list built from loaded data\n * @param {String}  [options.selectedTextFormat=null] - set to 'count > X' where X is a number to show all texts if the\n *                                                      selected count is below X, otherwise show `selectedText`\n * @param {String}  [options.selectedTextVariable='%num%'] - set to some placeholder that is included in `selectedText`\n *                                                        that gets replaced by the actual count when displaying text\n * @param {String}  [options.selectedText=options.selectedTextVariable + 'selected'] - the actual text\n * @param {String}  [options.noResultsText='No results'] - text to display when api returns no results\n * @param {String}  [options.container=null] - container to append the html to\n * @param {Boolean} [options.withSearch=false] - set to true to active the searchbar\n * @param {Boolean} [options.dropdownAlignRight=false] - set to true to align the dropdown on the right\n * @param {Boolean} [options.popupWidth='300px'] - set width for popup when container option is set\n * @param {Boolean} [options.multiple=false] - to enable multiple. alternatively set your select to multiple\n * @param {Boolean} [options.disabled=false] - to disabled the select. alternatively set your select to disabled\n * @param {Object}  [options.values] - hash with preselected values, overrides possible <option selected> elements.\n *                                    This is an alternative to adding actual <option selected> elements to the dom.\n *                                    Structure has to be {value: {text: <text>, subtext: <subtext>}}.\n * @param {Object}  [options.withSelectAllButton] - enables buttons to select and deselect all entries\n * @param {Array}   [options.selectAllButtonClasses=[]] - additional classes to add to \"select all\" buttons\n * @param {Array}   [options.selectAllButtonGroupClasses=[]] - additional classes to add to \"select all\" buttongroup\n * @param {String}  [options.selectAllButtonText='Select all'] - text to display on button to select all\n * @param {String}  [options.deselectAllButtonText='Deselect all'] - text to display on button to deselect all\n * @param {String}  [options.itemSelectedText='%item% selected'] - screen reader announcement when an entry of a\n *                                                                  multiple select gets selected\n * @param {String}  [options.itemDeselectedText='%item% deselected'] - screen reader announcement when an entry of a\n *                                                                      multiple select gets deselected\n * @param {String}  [options.allSelectedText='All entries selected'] - screen reader announcement for \"select all\"\n * @param {String}  [options.allDeselectedText='All entries deselected'] - screen reader announcement for \"deselect all\"\n * @param {Boolean} [options.debug=false] - enable to log debug messages\n * @param {Function} [options.customDebugHandler=null] - additional function to call when debug messages are logged.\n *                                                       Receives the instance of sync-pick as first arg.\n * @constructor\n */\nexport default function SyncPick (options) {\n    this.id = options.id\n    this.label = document.querySelector('label[for=\"' + this.id + '\"]')\n    if (this.isInitialized()) SyncPick.elements[this.id].destroy()\n\n    this.element = document.getElementById(this.id)\n    this.language = options.language || document.documentElement.lang || 'en'\n    this.i18n = SyncPick.i18n ? SyncPick.i18n[this.language] : {}\n\n    this.searchTimeout = options.searchTimeout || 50\n    this.searchPlaceholder = options.searchPlaceholder || this.i18n.searchPlaceholder || 'Search'\n    this.searchInputClasses = options.searchInputClasses || []\n    this.buttonClasses = options.buttonClasses || []\n    this.emptySelectButtonText = options.emptySelectButtonText || this.i18n.emptySelectButtonText || 'Select'\n    this.buttonDisabledClasses = options.buttonDisabledClasses || []\n    this.buttonIconClasses = options.buttonIconClasses || ['fas', 'fa-fw', 'fa-caret-down']\n    this.checkedIconClasses = options.checkedIconClasses || ['fas', 'fa-fw', 'fa-check']\n    this.listClasses = options.listClasses || []\n    this.selectedTextFormat = options.selectedTextFormat || null\n    this.selectedTextVariable = options.selectedTextVariable || '%num%'\n    this.selectedText = options.selectedText || this.i18n.selectedText || this.selectedTextVariable + ' selected'\n    this.noResultsText = options.noResultsText || this.i18n.noResultsText || 'No results'\n    this.container = options.container || null\n    this.withSearch = !!options.withSearch\n    this.dropdownAlignRight = !!options.dropdownAlignRight\n    this.popupWidth = options.popupWidth || '300px'\n    this.selectedValues = options.values || null\n    this.withSelectAllButton = options.withSelectAllButton || false\n    this.selectAllButtonClasses = options.selectAllButtonClasses || []\n    this.selectAllButtonGroupClasses = options.selectAllButtonGroupClasses || []\n    this.selectAllButtonText = options.selectAllButtonText || this.i18n.selectAllButtonText || 'Select all'\n    this.deselectAllButtonText = options.deselectAllButtonText || this.i18n.deselectAllButtonText || 'Deselect all'\n    this.itemSelectedText = options.itemSelectedText || this.i18n.itemSelectedText || '%item% selected'\n    this.itemDeselectedText = options.itemDeselectedText || this.i18n.itemDeselectedText || '%item% deselected'\n    this.allSelectedText = options.allSelectedText || this.i18n.allSelectedText || 'All entries selected'\n    this.allDeselectedText = options.allDeselectedText || this.i18n.allDeselectedText || 'All entries deselected'\n    this.debug = options.debug || false\n    this.customDebugHandler = options.customDebugHandler || null\n    this.originallySelectedValues = []\n\n    const self = this\n    Array.apply(null, this.element.options).filter(function (option) {\n        return option.hasAttribute('selected') && ['', 'true', true, 'selected'].includes(option.getAttribute('selected'))\n    }).forEach(option => {\n        self.originallySelectedValues.push(option.value)\n    })\n\n    this.multiple = !!this.element.multiple || !!options.multiple\n    this.disabled = !!this.element.disabled || !!options.disabled\n    this.open = false\n\n    this.initialize()\n    this.logDebugMessage('initialized with options:', this)\n    return this\n}\nSyncPick.i18n = { de, en, es, fr }\nSyncPick.elements = {}\n\nSyncPick.prototype.initialize = function () {\n    this.markup = this.buildMarkup()\n    if (!this.disabled) {\n        this.addHandlers()\n        this.addEvents()\n    }\n    this.setupValues()\n    if (!this.disabled) {\n        this.markup.appendEntries(this.dropdownValues, Object.keys(this.selectedValues), this.selectedValuesOrder)\n        this.addEventListenersForPage()\n    }\n    this.register()\n    this.markup.setButtonText(this.selectedValues)\n}\n\nSyncPick.prototype.buildMarkup = function () {\n    return new SyncPickMarkup({\n        element: this.element,\n        label: this.label,\n        multiple: this.multiple,\n        disabled: this.disabled,\n        searchPlaceholder: this.searchPlaceholder,\n        searchInputClasses: this.searchInputClasses,\n        buttonClasses: this.buttonClasses,\n        buttonDisabledClasses: this.buttonDisabledClasses,\n        emptySelectButtonText: this.emptySelectButtonText,\n        buttonIconClasses: this.buttonIconClasses,\n        checkedIconClasses: this.checkedIconClasses,\n        listClasses: this.listClasses,\n        selectedTextFormat: this.selectedTextFormat,\n        selectedTextVariable: this.selectedTextVariable,\n        selectedText: this.selectedText,\n        noResultsText: this.noResultsText,\n        container: this.container,\n        withSearch: this.withSearch,\n        dropdownAlignRight: this.dropdownAlignRight,\n        popupWidth: this.popupWidth,\n        withSelectAllButton: this.withSelectAllButton,\n        selectAllButtonClasses: this.selectAllButtonClasses,\n        selectAllButtonGroupClasses: this.selectAllButtonGroupClasses,\n        selectAllButtonText: this.selectAllButtonText,\n        deselectAllButtonText: this.deselectAllButtonText\n    })\n}\n\nSyncPick.prototype.addHandlers = function () {\n    this.togglePopupHandler = this.togglePopup.bind(this)\n    this.searchHandler = this.search.bind(this)\n    this.closePopupHandler = this.closePopup.bind(this)\n    this.selectHandler = this.select.bind(this)\n    this.stopPropagationHandler = function (e) {\n        e.stopPropagation()\n    }\n    this.buttonKeyHandler = this.onButtonKeyDown.bind(this)\n    this.buttonKeyUpHandler = this.onButtonKeyUp.bind(this)\n    this.markupKeyHandler = this.onMarkupKeyDown.bind(this)\n    this.selectAllHandler = this.selectAllEntries.bind(this)\n    this.deselectAllHandler = this.deselectAllEntries.bind(this)\n    this.labelClickHandler = function (e) {\n        e.preventDefault()\n        this.markup.button.focus()\n    }.bind(this)\n    this.containerPositionHandler = this.markup.positionPopup.bind(this.markup)\n    this.resetFormHandler = this.resetAndReload.bind(this)\n}\n\nSyncPick.prototype.resetAndReload = function () {\n    this.logDebugMessage('form reset! reloading sync-pick')\n    this.reload()\n}\n\n// e.key instead of the deprecated keyCode, which is 0 for key events sent by some testing tools\nSyncPick.prototype.onButtonKeyDown = function (e) {\n    if (e.key === 'Enter') {\n        e.preventDefault()\n        this.togglePopup(e)\n    } else if ((e.key === 'ArrowDown' || e.key === 'ArrowUp') && !this.open) {\n        e.preventDefault()\n        this.openPopup()\n    }\n}\n\nSyncPick.prototype.onMarkupKeyDown = function (e) {\n    if (e.key === 'Tab') {\n        if (this.open) this.onTabKeyDown(e)\n        return\n    }\n    if (e.key === 'Escape') {\n        this.closePopupAndFocus()\n        return\n    }\n    // keys of the select all buttons are handled by the buttons themselves\n    if (e.target !== this.markup.focusTarget) return\n\n    if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n        e.preventDefault()\n        if (!this.open) {\n            this.openPopup()\n        } else if (e.key === 'ArrowDown') {\n            this.markup.focusNextEntry()\n        } else {\n            this.markup.focusPreviousEntry()\n        }\n    } else if (e.key === 'Enter') {\n        e.preventDefault()\n        if (this.open) {\n            const li = this.markup.getHovered()\n            if (li) this.select({ currentTarget: li })\n        } else {\n            this.openPopup()\n        }\n    } else if (e.key === ' ' && this.open && !this.withSearch) {\n        // like in a native listbox, without search there is nothing to type\n        e.preventDefault()\n        this.spaceSelected = true\n        const li = this.markup.getHovered()\n        if (li) this.select({ currentTarget: li })\n    }\n}\n\n// the button would turn the space key into a click on keyup and close the popup again\nSyncPick.prototype.onButtonKeyUp = function (e) {\n    if (e.key === ' ' && this.spaceSelected) {\n        e.preventDefault()\n        this.spaceSelected = false\n    }\n}\n\n/**\n * Moves the focus between the combobox and the select all buttons and only closes the popup when the focus leaves it.\n */\nSyncPick.prototype.onTabKeyDown = function (e) {\n    const items = this.markup.getTabCycle()\n    const index = items.indexOf(document.activeElement)\n    const nextIndex = index + (e.shiftKey ? -1 : 1)\n\n    if (index > -1 && nextIndex >= 0 && nextIndex < items.length) {\n        e.preventDefault()\n        items[nextIndex].focus()\n    } else {\n        // back from the search input lands on the button, otherwise continue from the button to the next element\n        if (e.shiftKey && this.withSearch) e.preventDefault()\n        this.closePopupAndFocus()\n    }\n}\n\nSyncPick.prototype.addEvents = function () {\n    this.markup.button.addEventListener('click', this.togglePopupHandler)\n    if (this.withSearch) this.markup.searchInput.addEventListener('input', this.searchHandler)\n    this.markup.popup.addEventListener('click', this.stopPropagationHandler)\n    if (this.withSelectAllButton) {\n        this.markup.selectAllButton.addEventListener('click', this.selectAllHandler)\n        this.markup.deselectAllButton.addEventListener('click', this.deselectAllHandler)\n    }\n    if (this.withSearch) {\n        this.markup.button.addEventListener('keydown', this.buttonKeyHandler)\n    } else {\n        this.markup.button.addEventListener('keydown', this.markupKeyHandler)\n        this.markup.button.addEventListener('keyup', this.buttonKeyUpHandler)\n    }\n    this.markup.popup.addEventListener('keydown', this.markupKeyHandler)\n    document.addEventListener('click', this.closePopupHandler)\n    window.addEventListener('resize', this.containerPositionHandler)\n    window.addEventListener('scroll', this.containerPositionHandler)\n    if (this.label) this.label.addEventListener('click', this.labelClickHandler)\n    if (this.element.form) this.element.form.addEventListener('reset', this.resetFormHandler)\n    let self = this\n    onDomRemove(this.markup.element, function () {\n        self.destroy()\n    })\n}\n\nSyncPick.prototype.removeEvents = function () {\n    let self = this\n    if (this.markup) { // sometimes markup is already removed from the DOM\n        this.markup.button.removeEventListener('click', this.togglePopupHandler)\n        if (this.withSearch) this.markup.searchInput.removeEventListener('input', this.searchHandler)\n        Array.apply(null, this.markup.resultsWrapper.querySelectorAll('li')).forEach(function (li) {\n            li.removeEventListener('click', self.selectHandler)\n        })\n        this.markup.popup.removeEventListener('click', this.stopPropagationHandler)\n        this.markup.button.removeEventListener('keydown', this.buttonKeyHandler)\n        this.markup.button.removeEventListener('keydown', this.markupKeyHandler)\n        this.markup.button.removeEventListener('keyup', this.buttonKeyUpHandler)\n        this.markup.popup.removeEventListener('keydown', this.markupKeyHandler)\n    }\n    document.removeEventListener('click', this.closePopupHandler)\n    window.removeEventListener('resize', this.containerPositionHandler)\n    window.removeEventListener('scroll', this.containerPositionHandler)\n    if (this.label) this.label.removeEventListener('click', this.labelClickHandler)\n    if (this.element.form) this.element.form.removeEventListener('reset', this.resetFormHandler)\n}\n\nSyncPick.prototype.setupValues = function () {\n    if (!this.selectedValues) {\n        this.selectedValues = {}\n        this.dropdownValues = {}\n        this.selectedValuesOrder = {}\n        let self = this\n        Array.apply(null, this.element.options).forEach(function (option) {\n            let optgrouplabel\n            if (option.parentNode.nodeName === 'OPTGROUP') {\n                optgrouplabel = option.parentNode.label\n            } else {\n                optgrouplabel = ''\n            }\n            if (!self.selectedValuesOrder[optgrouplabel]) self.selectedValuesOrder[optgrouplabel] = []\n\n            self.selectedValuesOrder[optgrouplabel].push(option.value)\n            if (!self.dropdownValues[optgrouplabel]) self.dropdownValues[optgrouplabel] = {}\n\n            const newValue = {\n                text: option.innerHTML,\n                subtext: option.getAttribute('data-subtext'),\n                img: JSON.parse(option.getAttribute('data-img'))\n            }\n            self.dropdownValues[optgrouplabel][option.value] = newValue\n\n            if (option.selected || (option.hasAttribute('selected') && ['', 'true', true, 'selected'].includes(option.getAttribute('selected')))) {\n                self.selectedValues[option.value] = newValue\n                option.setAttribute('data-selected', true)\n            }\n        })\n    }\n}\n\nSyncPick.prototype.togglePopup = function () {\n    this.open ? this.closePopupAndFocus() : this.openPopup()\n}\n\nSyncPick.prototype.search = function () {\n    if (this.searchInputTimer) clearTimeout(this.searchInputTimer)\n    this.markup.setHovered(false)\n\n    let inputValue = this.markup.searchInput.value\n    if (this.shouldSearch(inputValue)) {\n        let self = this\n        self.previousSearchValue = inputValue\n        const lowerInputValue = inputValue.toLowerCase()\n        this.searchInputTimer = setTimeout(function () {\n            let filteredValues = {}\n            Object.entries(self.dropdownValues).forEach(([optGroupLabel, options]) => {\n                Object.entries(options).forEach(([value, optionData]) => {\n                    if (optionData.text.toLowerCase().includes(lowerInputValue)) {\n                        if (!filteredValues[optGroupLabel]) filteredValues[optGroupLabel] = {}\n                        filteredValues[optGroupLabel][value] = optionData\n                    }\n                })\n            })\n            self.markup.resultsWrapper.innerHTML = ''\n            self.markup.appendEntries(filteredValues, Object.keys(self.selectedValues), self.selectedValuesOrder)\n            self.addEventListenersForPage()\n        }, self.searchTimeout)\n    }\n}\n\nSyncPick.prototype.openPopup = function () {\n    this.markup.popup.classList.add('sp__popup--visible')\n    this.open = true\n    this.markup.setExpanded(true)\n    this.markup.positionPopup()\n    // start on the current selection, so it is announced right away\n    this.markup.setHovered(this.markup.getSelected())\n    if (this.withSearch) this.markup.searchInput.focus()\n}\n\nSyncPick.prototype.closePopupAndFocus = function (e) {\n    this.closePopup(e)\n    this.markup.button.focus()\n}\n\nSyncPick.prototype.closePopup = function (e) {\n    let clickedButton = e && (e.target === this.markup.button || e.target.parentElement === this.markup.button)\n    if (this.open && !clickedButton) {\n        this.markup.popup.classList.remove('sp__popup--visible')\n        this.open = false\n        this.markup.setExpanded(false)\n        this.markup.setHovered(false)\n        if (this.withSearch) this.resetSearch()\n    }\n}\n\nSyncPick.prototype.selectAllEntries = function () {\n    const keysOfSelectedValues = Object.keys(this.selectedValues)\n    this.selectedValues = Object.assign({}, ...Object.values(this.dropdownValues))\n    Object.keys(this.selectedValues).forEach(value => {\n        if (!keysOfSelectedValues.includes(value)) {\n            this.markup.selectItem(value)\n        }\n    })\n    this.markup.setButtonText(this.selectedValues)\n    this.markup.announce(this.allSelectedText)\n    this.triggerChange()\n}\n\nSyncPick.prototype.deselectAllEntries = function () {\n    Object.keys(this.selectedValues).forEach(value => {\n        this.markup.deselectItem(value)\n    })\n    this.selectedValues = {}\n    this.markup.setButtonText(this.selectedValues)\n    this.markup.announce(this.allDeselectedText)\n    this.triggerChange()\n}\n\nSyncPick.prototype.addEventListenersForPage = function () {\n    let self = this\n    Array.apply(null, self.markup.resultsWrapper.querySelectorAll('li.sp__results-list__item[data-value]:not(.sp__results-list__item--disabled)')).forEach(function (li) {\n        li.addEventListener('click', self.selectHandler)\n    })\n}\n\nSyncPick.prototype.shouldSearch = function (newValue) {\n    return this.previousSearchValue !== newValue\n}\n\nSyncPick.prototype.select = function (e) {\n    const li = e.currentTarget\n    const value = li.getAttribute('data-value')\n    const optionData = {\n        text: li.getAttribute('data-text'),\n        subtext: li.getAttribute('data-subtext'),\n        disabled: li.getAttribute('data-disabled'),\n        img: li.getAttribute('data-img') ? JSON.parse(li.getAttribute('data-img')) : null\n    }\n\n    if (this.multiple) {\n        this.toggleSelectedValue(value, optionData)\n        // a single select announces the new value itself, when the focus returns to the button\n        const message = this.selectedValues[value] ? this.itemSelectedText : this.itemDeselectedText\n        this.markup.announce(message.replace('%item%', li.getAttribute('title') || optionData.text))\n    } else {\n        this.setSelectedValue(value, optionData)\n    }\n\n    this.markup.setButtonText(this.selectedValues)\n    if (!this.multiple) this.closePopupAndFocus()\n    this.triggerChange()\n}\n\nSyncPick.prototype.triggerChange = function () {\n    let event = new CustomEvent('Event', { detail: this.selectedValues })\n    event.initEvent('change', true, true)\n    this.element.dispatchEvent(event)\n    this.logDebugMessage('changeTriggered')\n}\n\nSyncPick.prototype.toggleSelectedValue = function (value, optionData) {\n    if (this.selectedValues[value]) {\n        this.removeSelectedValue(value, optionData)\n    } else {\n        this.addSelectedValue(value, optionData)\n    }\n}\n\nSyncPick.prototype.addSelectedValue = function (value, optionData) {\n    this.selectedValues[value] = optionData\n\n    this.markup.selectItem(value)\n    if (this.withSearch) this.markup.searchInput.focus()\n    this.logDebugMessage('Value added:', optionData)\n}\n\nSyncPick.prototype.removeSelectedValue = function (value, optionData) {\n    delete this.selectedValues[value]\n    this.markup.deselectItem(value)\n    this.logDebugMessage('Value removed:', optionData)\n}\n\nSyncPick.prototype.setSelectedValue = function (value, optionData) {\n    if (Object.keys(this.selectedValues).length > 0) {\n        this.removeSelectedValue(Object.keys(this.selectedValues)[0])\n        const selected = this.markup.getSelected()\n        if (selected) selected.classList.remove('sp__results-list__item--selected')\n    }\n    this.addSelectedValue(value, optionData)\n    this.logDebugMessage('Value set:', optionData)\n}\n\nSyncPick.prototype.logDebugMessage = function (msg, someObject) {\n    if (this.debug) {\n        if (msg) console.log('SyncPick#' + this.id, msg)\n        if (someObject) console.log(someObject)\n        if (typeof this.customDebugHandler === 'function') this.customDebugHandler(this)\n    }\n}\n\nSyncPick.prototype.register = function () {\n    SyncPick.elements[this.id] = this\n}\n\nSyncPick.prototype.isInitialized = function () {\n    if (typeof window.SyncPick === 'undefined') {\n        return false\n    } else {\n        return !!SyncPick.elements[this.id]\n    }\n}\n\nSyncPick.prototype.resetSearch = function () {\n    this.markup.searchInput.value = ''\n    this.search()\n}\n\nSyncPick.prototype.destroy = function () {\n    if (!this.disabled) this.removeEvents()\n    this.markup.destroy()\n    this.selectedValues = null\n    this.dropdownValues = null\n    delete this.markup\n    delete SyncPick.elements[this.id]\n    this.element.classList.remove('visually-hidden')\n}\n\nSyncPick.prototype.reload = function () {\n    Object.keys(this.selectedValues).forEach(value => {\n        this.markup.deselectItem(value)\n    })\n    this.destroy()\n    this.disabled = !!this.element.disabled\n\n    this.originallySelectedValues.forEach(value => {\n        const option = this.element.querySelector('option[value=\"' + value.replaceAll('\"', '\\\\\"') + '\"]')\n        option.selected = true\n    })\n\n    this.initialize()\n}\n\n/**\n * Helpers\n */\n\nfunction onDomRemove (element, onDetachCallback) {\n    const observer = new MutationObserver(function () {\n        function isDetached (el) {\n            if (el.parentNode === document) {\n                return false\n            } else if (el.parentNode === null) {\n                return true\n            } else {\n                return isDetached(el.parentNode)\n            }\n        }\n\n        if (isDetached(element)) {\n            observer.disconnect()\n            onDetachCallback()\n        }\n    })\n\n    observer.observe(document, {\n        childList: true,\n        subtree: true\n    })\n}\n", "import {Controller} from '@hotwired/stimulus'\n\nimport SyncPick from 'sync-pick'\n\nexport default class extends Controller {\n    static values = {\n        emptySelectButtonTextOption: String,\n        containerOption: String,\n        withSearchOption: Boolean,\n        withSelectAllButtonOption: Boolean,\n        dropdownAlignRightOption: Boolean,\n        dropdownButtonClasses: Array,\n        searchInputClasses: Array,\n        listClasses: Array,\n        selectedTextFormatOption: String\n    }\n\n    reconnect() {\n        this._sync_pick.destroy()\n        this.load()\n    }\n\n    connect() {\n        this.resetToServerState()\n        this.load()\n        this.element['syncPick'] = {\n            reconnect: this.reconnect.bind(this),\n            values: this._sync_pick.selectedValues\n        }\n    }\n\n    load() {\n        let options = this.options\n        Object.keys(options).forEach(function (key) {\n            if (options[key] === \"\") delete options[key]\n        })\n\n        const elementId = this.element.getAttribute('id')\n        this._sync_pick = new SyncPick(Object.assign({}, this.defaultOptions, {id: elementId}, options))\n    }\n\n    resetToServerState() {\n        const select = this.element\n        Array.from(select.options).forEach(option => {\n            option.selected = option.hasAttribute('selected')\n        })\n    }\n\n    get options() {\n        return {\n            buttonClasses: this.hasDropdownButtonClassesValue ? this.dropdownButtonClassesValue : '',\n            searchInputClasses: this.hasSearchInputClassesValue ? this.searchInputClassesValue : '',\n            listClasses: this.hasListClassesValue ? this.listClassesValue : '',\n            emptySelectButtonText: this.emptySelectButtonTextOptionValue,\n            container: this.containerOptionValue,\n            withSearch: this.hasWithSearchOptionValue ? this.withSearchOptionValue : '',\n            withSelectAllButton: this.hasWithSelectAllButtonOptionValue ? this.hasWithSelectAllButtonOptionValue : '',\n            dropdownAlignRight: this.hasDropdownAlignRightOptionValue ? this.dropdownAlignRightOptionValue : '',\n            selectedTextFormat: this.selectedTextFormatOptionValue,\n        }\n    }\n\n    get defaultOptions() {\n        return {\n            language: document.documentElement.lang,\n            buttonClasses: ['form-select'],\n            buttonDisabledClasses: ['btn-disabled'],\n            searchTimeout: 0,\n            searchInputClasses: ['form-control'],\n            buttonIconClasses: [],\n            checkedIconClasses: ['fas', 'fa-fw', 'fa-check'],\n            listClasses: [],\n            selectedTextFormat: 'count>3',\n            selectedTextVariable: '%num%',\n            container: false,\n            withSearch: false,\n            withSelectAllButton: false,\n            selectAllButtonClasses: ['btn', 'btn-outline-secondary', 'btn-sm'],\n            selectAllButtonGroupClasses: ['btn-group'],\n            dropdownAlignRight: false,\n            popupWidth: '300px',\n            values: null\n        }\n    }\n}\n", "export var ZERO_WIDTH_CHAR = '\\u200B';\nexport var ZERO_WIDTH_UNICODE_CHAR = `&#8203;`\nexport const UPDATE_DELAY = 100\n", "import {ZERO_WIDTH_CHAR} from './constants'\n\nexport const logger = {\n    isEnabled() { return window.TAGIFY_DEBUG ?? true},\n    log(...args){ this.isEnabled() && console.log('[Tagify]:', ...args) },\n    warn(...args) { this.isEnabled() && console.warn('[Tagify]:', ...args) }\n}\n\n// console.json = console.json || function(argument){\n//     for(var arg=0; arg < arguments.length; ++arg)\n//         console.log(  JSON.stringify(arguments[arg], null, 4)  )\n// }\n\n// const isEdge = /Edge/.test(navigator.userAgent)\nexport const sameStr = (s1, s2, caseSensitive, trim) => {\n    // cast to String\n    s1 = \"\"+s1;\n    s2 = \"\"+s2;\n\n    if( trim ){\n        s1 = s1.trim()\n        s2 = s2.trim()\n    }\n\n    return caseSensitive\n        ? s1 == s2\n        : s1.toLowerCase() == s2.toLowerCase()\n}\n\n\n// const getUID = () => (new Date().getTime() + Math.floor((Math.random()*10000)+1)).toString(16)\nexport const removeCollectionProp = (collection, unwantedProps) => collection && Array.isArray(collection) && collection.map(v => omit(v, unwantedProps))\n\nexport function omit(obj, props){\n    var newObj = {}, p;\n    for( p in obj )\n        if( props.indexOf(p) < 0 )\n            newObj[p] = obj[p]\n    return newObj\n}\n\nexport function decode( s ) {\n    var el = document.createElement('div');\n    return s.replace(/\\&#?[0-9a-z]+;/gi, function(enc){\n        el.innerHTML = enc;\n        return el.innerText\n    })\n}\n\n/**\n * utility method\n * https://stackoverflow.com/a/35385518/104380\n * @param  {String} s [HTML string]\n * @return {Object}   [DOM node]\n */\nexport function parseHTML( s ){\n    var parser = new DOMParser(),\n        node   = parser.parseFromString(s.trim(), \"text/html\");\n\n    return node.body.firstElementChild;\n}\n\n/**\n * Removed new lines and irrelevant spaces which might affect layout, and are better gone\n * @param {string} s [HTML string]\n */\nexport function minify( s ){\n    return s ? s\n        .replace(/\\>[\\r\\n ]+\\</g, \"><\")\n        .split(/>\\s+</).join('><').trim()\n        : \"\"\n}\n\nexport function removeTextChildNodes( elm ){\n    var iter = document.createNodeIterator(elm, NodeFilter.SHOW_TEXT, null, false),\n        textnode;\n\n    // print all text nodes\n    while (textnode = iter.nextNode()){\n        if( !textnode.textContent.trim() )\n            textnode.parentNode.removeChild(textnode)\n    }\n}\n\nexport function getfirstTextNode( elm, action ){\n    action = action || 'previous';\n    while ( elm = elm[action + 'Sibling'] )\n        if( elm.nodeType == 3 )\n            return elm\n}\n\n/**\n * utility method\n * https://stackoverflow.com/a/6234804/104380\n */\nexport function escapeHTML( s ){\n    return typeof s == 'string' ? s\n        .replace(/&/g, \"&amp;\")\n        .replace(/</g, \"&lt;\")\n        .replace(/>/g, \"&gt;\")\n        .replace(/\"/g, \"&quot;\")\n        .replace(/`|'/g, \"&#039;\")\n        : s;\n}\n\n/**\n * Checks if an argument is a javascript Object\n */\nexport function isObject(obj) {\n    var type = Object.prototype.toString.call(obj).split(' ')[1].slice(0, -1);\n    return obj === Object(obj) && type != 'Array' && type != 'Function' && type != 'RegExp' && type != 'HTMLUnknownElement';\n}\n\n/**\n * merge objects into a single new one\n * TEST: extend({}, {a:{foo:1}, b:[]}, {a:{bar:2}, b:[1], c:()=>{}})\n */\nexport function extend( o, o1, o2) {\n    if( !(o instanceof Object) ) o = {};\n\n    copy(o, o1);\n    if( o2 )\n        copy(o, o2)\n\n    function copy(a,b){\n        // copy o2 to o\n        for( var key in b )\n            if( b.hasOwnProperty(key) ){\n                if( isObject(b[key]) ){\n                    if( !isObject(a[key]) )\n                        a[key] = Object.assign({}, b[key])\n                    else\n                        copy(a[key], b[key])\n\n                    continue;\n                }\n\n                if( Array.isArray(b[key]) ){\n                    a[key] = Object.assign([], b[key])\n                    continue\n                }\n\n                a[key] = b[key]\n            }\n    }\n\n    return o\n}\n\n/**\n * concatenates N arrays without dups.\n * If an array's item is an Object, compare by `value`\n */\nexport function concatWithoutDups(){\n    const newArr = [],\n        existingObj = {};\n\n    for( let arr of arguments ) {\n        for( let item of arr ) {\n            // if current item is an object which has yet to be added to the new array\n            if( isObject(item) ){\n                if( !existingObj[item.value] ){\n                    newArr.push(item)\n                    existingObj[item.value] = 1\n                }\n            }\n\n            // if current item is not an object and is not in the new array\n            else if( !newArr.includes(item) )\n                newArr.push(item)\n        }\n    }\n\n    return newArr\n}\n\n/**\n *  Extracted from: https://stackoverflow.com/a/37511463/104380\n * @param {String} s\n */\nexport function unaccent( s ){\n    // if not supported, do not continue.\n    // developers should use a polyfill:\n    // https://github.com/walling/unorm\n    if( !String.prototype.normalize )\n        return s\n\n    if (typeof(s) === 'string')\n        return s.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\")\n}\n\n/**\n * Meassures an element's height, which might yet have been added DOM\n * https://stackoverflow.com/q/5944038/104380\n * @param {DOM} node\n */\nexport function getNodeHeight( node ){\n    var height, clone = node.cloneNode(true)\n    clone.style.cssText = \"position:fixed; top:-9999px; opacity:0\"\n    document.body.appendChild(clone)\n    height = clone.clientHeight\n    clone.parentNode.removeChild(clone)\n    return height\n}\n\nexport var isChromeAndroidBrowser = () => /(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)\n\nexport function getUID() {\n    return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>\n        (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)\n    )\n}\n\nexport function isNodeTag(node){\n    const belongs = isNodeBelongsToThisTagifyInstance.call(this, node);\n    const isTag = node?.classList?.contains(this.settings.classNames.tag)\n    return belongs && isTag\n}\n\nexport function isWithinNodeTag(node){\n    return isNodeBelongsToThisTagifyInstance.call(this, node) && node?.closest(this.settings.classNames.tagSelector)\n}\n\nfunction isNodeBelongsToThisTagifyInstance(node) {\n    let closestTagifyNode = node?.closest?.(this.settings.classNames.namespaceSelector)\n    return closestTagifyNode === this.DOM.scope\n}\n\n/**\n* Get the caret position relative to the viewport\n* https://stackoverflow.com/q/58985076/104380\n*\n* @returns {object} left, top distance in pixels\n*/\nexport function getCaretGlobalPosition(){\n   const sel = document.getSelection()\n\n   if( sel.rangeCount ){\n       const r = sel.getRangeAt(0)\n       const node = r.startContainer\n       const offset = r.startOffset\n       let rect,  r2;\n\n       if (offset > 0) {\n           r2 = document.createRange()\n           r2.setStart(node, offset - 1)\n           r2.setEnd(node, offset)\n           rect = r2.getBoundingClientRect()\n           return {left:rect.right, top:rect.top, bottom:rect.bottom}\n       }\n\n       if( node.getBoundingClientRect )\n           return node.getBoundingClientRect()\n   }\n\n   return {left:-9999, top:-9999}\n}\n\n/**\n * Injects content (either string or node) at the current the current (or specificed) caret position\n * @param {content} string/node\n * @param {range} Object (optional, a range other than the current window selection)\n */\nexport function injectAtCaret(content, range){\n    var selection = window.getSelection();\n    range = range || selection.getRangeAt(0)\n\n    if( typeof content == 'string' )\n        content = document.createTextNode(content)\n\n    if( range ) {\n        range.deleteContents()\n        range.insertNode(content)\n    }\n\n    return content\n}\n\n/** Setter/Getter\n * Each tag DOM node contains a custom property called \"__tagifyTagData\" which hosts its data\n * @param {Node}   tagElm\n * @param {Object} data\n */\nexport function getSetTagData(tagElm, data, override){\n    if( !tagElm ){\n        logger.warn(\"tag element doesn't exist\",{tagElm, data})\n        return data\n    }\n\n    if( data )\n        tagElm.__tagifyTagData = override\n            ? data\n            : extend({}, tagElm.__tagifyTagData || {}, data)\n\n    return tagElm.__tagifyTagData\n}\n\nexport function placeCaretAfterNode( node ){\n    if( !node || !node.parentNode ) return\n\n    var nextSibling = node,\n        sel = window.getSelection(),\n        range = sel.getRangeAt(0);\n\n    if (sel.rangeCount) {\n        range.setStartAfter(nextSibling);\n        range.collapse(true)\n        // range.setEndBefore(nextSibling || node);\n        sel.removeAllRanges();\n        sel.addRange(range);\n    }\n}\n\n/**\n * iterate all tags, checking if multiple ones are close-siblings and if so, add a zero-space width character between them,\n * which forces the caret to be rendered when the selection is between tags.\n * Also do that if the tag is the first node.\n * @param {Array} tags\n */\nexport function fixCaretBetweenTags(tags, TagifyHasFocuse) {\n    tags.forEach(tag => {\n        if( getSetTagData(tag.previousSibling) || !tag.previousSibling ) {\n            var textNode = document.createTextNode(ZERO_WIDTH_CHAR)\n            tag.before(textNode)\n            TagifyHasFocuse && placeCaretAfterNode(textNode)\n        }\n    })\n}\n\n", "export default {\n    delimiters          : \",\",            // [RegEx] split tags by any of these delimiters (\"null\" to cancel) Example: \",| |.\"\n    pattern             : null,           // RegEx pattern to validate input by. Ex: /[1-9]/\n    tagTextProp         : 'value',        // tag data Object property which will be displayed as the tag's text\n    maxTags             : Infinity,       // Maximum number of tags\n    callbacks           : {},             // Exposed callbacks object to be triggered on certain events\n    addTagOnBlur        : true,           // automatically adds the text which was inputed as a tag when blur event happens\n    addTagOn            : ['blur', 'tab', 'enter'],  // if the tagify field (in a normal mode) has any non-tag input in it, convert it to a tag on any of these events: blur away from the field, click \"tab\"/\"enter\" key\n    onChangeAfterBlur   : true,           // By default, the native way of inputs' onChange events is kept, and it only fires when the field is blured.\n    duplicates          : false,          // \"true\" - allow duplicate tags\n    whitelist           : [],             // Array of tags to suggest as the user types (can be used along with \"enforceWhitelist\" setting)\n    blacklist           : [],             // A list of non-allowed tags\n    enforceWhitelist    : false,          // Only allow tags from the whitelist\n    userInput           : true,           // disable manually typing/pasting/editing tags (tags may only be added from the whitelist)\n    focusable           : true,           // Allow the component as a whole to recieve focus. There are implementations of Tagify without external border and so 'focusability' causes unwanted behaviour\n    focusInputOnRemove  : true,           // Refocus the input when a tag is removed\n    keepInvalidTags     : false,          // if true, do not remove tags which did not pass validation\n    createInvalidTags   : true,           // if false, do not create invalid tags from invalid user input\n    mixTagsAllowedAfter : /,|\\.|\\:|\\s/,   // RegEx - Define conditions in which mix-tags content allows a tag to be added after\n    mixTagsInterpolator : ['[[', ']]'],   // Interpolation for mix mode. Everything between these will become a tag, if is a valid Object\n    backspace           : true,           // false / true / \"edit\"\n    skipInvalid         : false,          // If `true`, do not add invalid, temporary, tags before automatically removing them\n    pasteAsTags         : true,           // automatically converts pasted text into tags. if \"false\", allows for further text editing\n\n    editTags            : {\n        clicks      : 2,                  // clicks to enter \"edit-mode\": 1 for single click. any other value is considered as double-click\n        keepInvalid : true                // keeps invalid edits as-is until `esc` is pressed while in focus\n    },              // 1 or 2 clicks to edit a tag. false/null for not allowing editing\n    transformTag        : ()=>{},         // Takes a tag input string as argument and returns a transformed value\n    trim                : true,           // whether or not the value provided should be trimmed, before being added as a tag\n    a11y: {\n        focusableTags: false,\n        inputAriaLabel: \"Tags input field\",\n    },\n\n    mixMode: {\n        insertAfterTag  : '\\u00A0',       // String/Node to inject after a tag has been added (see #588)\n    },\n\n    autoComplete: {\n        enabled: true,        // Tries to suggest the input's value while typing (match from whitelist) by adding the rest of term as grayed-out text\n        rightKey: false,      // If `true`, when Right key is pressed, use the suggested value to create a tag, else just auto-completes the input. in mixed-mode this is set to \"true\"\n        tabKey: false,        // If 'true`, pressing `tab` key would only auto-complete but not also convert to a tag (like `rightKey` does).\n    },\n\n    classNames: {\n        namespace            : 'tagify',\n        mixMode              : 'tagify--mix',\n        selectMode           : 'tagify--select',\n        input                : 'tagify__input',\n        focus                : 'tagify--focus',\n        tagNoAnimation       : 'tagify--noAnim',\n        tagInvalid           : 'tagify--invalid',\n        tagNotAllowed        : 'tagify--notAllowed',\n        scopeLoading         : 'tagify--loading',\n        hasMaxTags           : 'tagify--hasMaxTags',\n        hasNoTags            : 'tagify--noTags',\n        empty                : 'tagify--empty',\n        inputInvalid         : 'tagify__input--invalid',\n        dropdown             : 'tagify__dropdown',\n        dropdownWrapper      : 'tagify__dropdown__wrapper',\n        dropdownHeader       : 'tagify__dropdown__header',\n        dropdownFooter       : 'tagify__dropdown__footer',\n        dropdownItem         : 'tagify__dropdown__item',\n        dropdownItemActive   : 'tagify__dropdown__item--active',\n        dropdownItemHidden   : 'tagify__dropdown__item--hidden',\n        dropdownItemSelected : 'tagify__dropdown__item--selected',\n        dropdownInital       : 'tagify__dropdown--initial',\n        tag                  : 'tagify__tag',\n        tagText              : 'tagify__tag-text',\n        tagX                 : 'tagify__tag__removeBtn',\n        tagLoading           : 'tagify__tag--loading',\n        tagEditing           : 'tagify__tag--editable',\n        tagFlash             : 'tagify__tag--flash',\n        tagHide              : 'tagify__tag--hide',\n\n    },\n\n    dropdown: {\n        classname          : '',\n        enabled            : 2,      // minimum input characters to be typed for the suggestions dropdown to show\n        maxItems           : 10,\n        searchKeys         : [\"value\", \"searchBy\"],\n        fuzzySearch        : true,\n        caseSensitive      : false,\n        accentedSearch     : true,\n        includeSelectedTags: false,  // Should the suggestions list Include already-selected tags (after filtering)\n        escapeHTML         : true,   // escapes HTML entities in the suggestions' rendered text\n        highlightFirst     : true,   // highlights first-matched item in the list\n        closeOnSelect      : true,   // closes the dropdown after selecting an item, if `enabled:0` (which means always show dropdown)\n        clearOnSelect      : true,   // after selecting a suggetion, should the typed text input remain or be cleared\n        position           : 'all',  // 'manual' / 'text' / 'all'\n        appendTarget       : null    // defaults to document.body once DOM has been loaded\n    },\n\n    hooks: {\n        beforeRemoveTag: () => Promise.resolve(),\n        beforePaste: () => Promise.resolve(),\n        suggestionClick: () => Promise.resolve(),\n        beforeKeyDown: () => Promise.resolve(),\n    }\n}\n", "import { sameStr, isObject, minify, getNodeHeight, getCaretGlobalPosition } from './helpers'\nimport suggestionsMethods from './suggestions'\n\nexport function initDropdown(){\n    this.dropdown = {}\n\n    // auto-bind \"this\" to all the dropdown methods\n    for( let p in this._dropdown )\n        this.dropdown[p] = typeof this._dropdown[p] === 'function'\n            ? this._dropdown[p].bind(this)\n            : this._dropdown[p]\n\n    this.dropdown.refs()\n    this.DOM.dropdown.__tagify = this\n}\n\nexport default {\n    ...suggestionsMethods,\n\n    refs(){\n        this.DOM.dropdown = this.parseTemplate('dropdown', [this.settings])\n        this.DOM.dropdown.content = this.DOM.dropdown.querySelector(\"[data-selector='tagify-suggestions-wrapper']\")\n    },\n\n    getHeaderRef(){\n        return this.DOM.dropdown.querySelector(\"[data-selector='tagify-suggestions-header']\")\n    },\n\n    getFooterRef(){\n        return this.DOM.dropdown.querySelector(\"[data-selector='tagify-suggestions-footer']\")\n    },\n\n    getAllSuggestionsRefs(){\n        return [...this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector)]\n    },\n\n    /**\n     * shows the suggestions select box\n     * @param {String} value [optional, filter the whitelist by this value]\n     */\n    show( value ){\n        var _s = this.settings,\n            firstListItem,\n            firstListItemValue,\n            allowNewTags = _s.mode == 'mix' && !_s.enforceWhitelist,\n            noWhitelist =  !_s.whitelist || !_s.whitelist.length,\n            noMatchListItem,\n            isManual = _s.dropdown.position == 'manual';\n\n        // if text still exists in the input, and `show` method has no argument, then the input's text should be used\n        value = value === undefined ? this.state.inputText : value\n\n        // ⚠️ Do not render suggestions list  if:\n        // 1. there's no whitelist (can happen while async loading) AND new tags arn't allowed\n        // 2. dropdown is disabled\n        // 3. loader is showing (controlled outside of this code)\n        if( (noWhitelist && !allowNewTags && !_s.templates.dropdownItemNoMatch)\n            || _s.dropdown.enabled === false\n            || this.state.isLoading\n            || this.settings.readonly )\n            return;\n\n        clearTimeout(this.dropdownHide__bindEventsTimeout)\n\n        // if no value was supplied, show all the \"whitelist\" items in the dropdown\n        // @type [Array] listItems\n        this.suggestedListItems = this.dropdown.filterListItems(value)\n\n        // trigger at this exact point to let the developer the chance to manually set \"this.suggestedListItems\"\n        if( value && !this.suggestedListItems.length ){\n            this.trigger('dropdown:noMatch', value)\n\n            if( _s.templates.dropdownItemNoMatch )\n                noMatchListItem = _s.templates.dropdownItemNoMatch.call(this, {value})\n        }\n\n        // if \"dropdownItemNoMatch\" was not defined, procceed regular flow.\n        //\n        if( !noMatchListItem ){\n            // in mix-mode, if the value isn't included in the whilelist & \"enforceWhitelist\" setting is \"false\",\n            // then add a custom suggestion item to the dropdown\n            if( this.suggestedListItems.length ){\n                if( value   &&   allowNewTags   &&   !this.state.editing.scope  &&  !sameStr(this.suggestedListItems[0].value, value) )\n                    this.suggestedListItems.unshift({value})\n            }\n            else{\n                if( value   &&   allowNewTags  &&  !this.state.editing.scope ){\n                    this.suggestedListItems = [{value}]\n                }\n                // hide suggestions list if no suggestion matched\n                else{\n                    this.input.autocomplete.suggest.call(this);\n                    this.dropdown.hide()\n                    return;\n                }\n            }\n\n            firstListItem =  this.suggestedListItems[0]\n            firstListItemValue = \"\"+(isObject(firstListItem) ? firstListItem.value : firstListItem)\n\n            if( _s.autoComplete && firstListItemValue ){\n                // only fill the sugegstion if the value of the first list item STARTS with the input value (regardless of \"fuzzysearch\" setting)\n                if( firstListItemValue.indexOf(value) == 0 )\n                    this.input.autocomplete.suggest.call(this, firstListItem)\n            }\n        }\n\n        this.dropdown.fill(noMatchListItem)\n\n        if( _s.dropdown.highlightFirst ) {\n            this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(_s.classNames.dropdownItemSelector))\n        }\n\n        // bind events, exactly at this stage of the code. \"dropdown.show\" method is allowed to be\n        // called multiple times, regardless if the dropdown is currently visible, but the events-binding\n        // should only be called if the dropdown wasn't previously visible.\n        if( !this.state.dropdown.visible )\n            // timeout is needed for when pressing arrow down to show the dropdown,\n            // so the key event won't get registered in the dropdown events listeners\n            setTimeout(this.dropdown.events.binding.bind(this))\n\n        // set the dropdown visible state to be the same as the searched value.\n        // MUST be set *before* position() is called\n        this.state.dropdown.visible = value || true\n        this.state.dropdown.query = value\n\n        this.setStateSelection()\n\n        // try to positioning the dropdown (it might not yet be on the page, doesn't matter, next code handles this)\n        if( !isManual ){\n            // a slight delay is needed if the dropdown \"position\" setting is \"text\", and nothing was typed in the input,\n            // so sadly the \"getCaretGlobalPosition\" method doesn't recognize the caret position without this delay\n            setTimeout(() => {\n                this.dropdown.position()\n                this.dropdown.render()\n            })\n        }\n\n        // a delay is needed because of the previous delay reason.\n        // this event must be fired after the dropdown was rendered & positioned\n        setTimeout(() => {\n            this.trigger(\"dropdown:show\", this.DOM.dropdown)\n        })\n    },\n\n    /**\n     * Hides the dropdown (if it's not managed manually by the developer)\n     * @param {Boolean} overrideManual\n     */\n    hide( overrideManual ){\n        var {scope, dropdown} = this.DOM,\n            isManual = this.settings.dropdown.position == 'manual' && !overrideManual;\n\n        // if there's no dropdown, this means the dropdown events aren't binded\n        if( !dropdown || !document.body.contains(dropdown) || isManual ) return;\n\n        window.removeEventListener('resize', this.dropdown.position)\n        this.dropdown.events.binding.call(this, false) // unbind all events\n\n        // if the dropdown is open, and the input (scope) is clicked,\n        // the dropdown should be now \"close\", and the next click (on the scope)\n        // should re-open it, and without a timeout, clicking to close will re-open immediately\n        //  clearTimeout(this.dropdownHide__bindEventsTimeout)\n        //  this.dropdownHide__bindEventsTimeout = setTimeout(this.events.binding.bind(this), 250)  // re-bind main events\n\n\n        scope.setAttribute(\"aria-expanded\", false)\n        dropdown.parentNode.removeChild(dropdown)\n\n        // scenario: clicking the scope to show the dropdown, clicking again to hide -> calls dropdown.hide() and then re-focuses the input\n        // which casues another onFocus event, which checked \"this.state.dropdown.visible\" and see it as \"false\" and re-open the dropdown\n        setTimeout(() => {\n            this.state.dropdown.visible = false\n        }, 100)\n\n        this.state.dropdown.query =\n        this.state.ddItemData =\n        this.state.ddItemElm =\n        this.state.selection = null\n\n        // if the user closed the dropdown (in mix-mode) while a potential tag was detected, flag the current tag\n        // so the dropdown won't be shown on following user input for that \"tag\"\n        if( this.state.tag && this.state.tag.value.length ){\n            this.state.flaggedTags[this.state.tag.baseOffset] = this.state.tag\n        }\n\n        this.trigger(\"dropdown:hide\", dropdown)\n\n        return this\n    },\n\n    /**\n     * Toggles dropdown show/hide\n     * @param {Boolean} show forces the dropdown to show\n     */\n    toggle(show){\n        this.dropdown[this.state.dropdown.visible && !show ? 'hide' : 'show']()\n    },\n\n    getAppendTarget() {\n        var _sd = this.settings.dropdown;\n        return typeof _sd.appendTarget === 'function' ? _sd.appendTarget() : _sd.appendTarget;\n    },\n\n    render(){\n        // let the element render in the DOM first, to accurately measure it.\n        // this.DOM.dropdown.style.cssText = \"left:-9999px; top:-9999px;\";\n        var ddHeight = getNodeHeight(this.DOM.dropdown),\n            _s = this.settings,\n            appendTarget = this.dropdown.getAppendTarget();\n\n        if( _s.dropdown.enabled === false ) return this;\n\n        this.DOM.scope.setAttribute(\"aria-expanded\", true)\n\n        // if the dropdown has yet to be appended to the DOM,\n        // append the dropdown to the body element & handle events\n        if( !document.body.contains(this.DOM.dropdown) ){\n            this.DOM.dropdown.classList.add( _s.classNames.dropdownInital )\n            this.dropdown.position(ddHeight)\n            appendTarget.appendChild(this.DOM.dropdown)\n\n            setTimeout(() =>\n                this.DOM.dropdown.classList.remove( _s.classNames.dropdownInital )\n            )\n        }\n\n        return this\n    },\n\n    /**\n     * re-renders the dropdown content element (see \"dropdownContent\" in templates file)\n     * @param {String/Array} HTMLContent - optional\n     */\n    fill( HTMLContent ){\n        HTMLContent = typeof HTMLContent == 'string'\n            ? HTMLContent\n            : this.dropdown.createListHTML(HTMLContent || this.suggestedListItems)\n\n        var dropdownContent = this.settings.templates.dropdownContent.call(this, HTMLContent)\n\n        this.DOM.dropdown.content.innerHTML = minify(dropdownContent)\n    },\n\n    /**\n     * Re-renders only the header & footer.\n     * Used when selecting a suggestion and it is wanted that the suggestions dropdown stays open.\n     * Since the list of sugegstions is not being re-rendered completely every time a suggestion is selected (the item is transitioned-out)\n     * then the header & footer should be kept in sync with the suggestions data change\n     */\n    fillHeaderFooter(){\n        var suggestions = this.dropdown.filterListItems(this.state.dropdown.query),\n            newHeaderElem = this.parseTemplate('dropdownHeader', [suggestions]),\n            newFooterElem = this.parseTemplate('dropdownFooter', [suggestions]),\n            headerRef = this.dropdown.getHeaderRef(),\n            footerRef = this.dropdown.getFooterRef();\n\n        newHeaderElem && headerRef?.parentNode.replaceChild(newHeaderElem, headerRef)\n        newFooterElem && footerRef?.parentNode.replaceChild(newFooterElem, footerRef)\n    },\n\n    /**\n     * dropdown positioning logic\n     * (shown above/below or next to typed text for mix-mode)\n     */\n    position( ddHeight ){\n        var _sd = this.settings.dropdown,\n            appendTarget = this.dropdown.getAppendTarget();\n\n        if( _sd.position == 'manual' || !appendTarget) return\n\n        var rect, top, bottom, left, width, ancestorsOffsets,\n            isPlacedAbove, hasSpaceOnRight,\n            cssTop, cssLeft,\n            ddElm = this.DOM.dropdown,\n            isRTL = _sd.RTL,\n            isDefaultAppendTarget = appendTarget === document.body,\n            isSelfAppended = appendTarget === this.DOM.scope,\n            appendTargetScrollTop = isDefaultAppendTarget ? window.pageYOffset : appendTarget.scrollTop,\n            root = document.fullscreenElement || document.webkitFullscreenElement || document.documentElement,\n            viewportHeight = root.clientHeight,\n            viewportWidth = Math.max(root.clientWidth || 0, window.innerWidth || 0),\n            positionTo = viewportWidth > 480 ? _sd.position : 'all',\n            ddTarget = this.DOM[positionTo == 'input' ? 'input' : 'scope'],\n            MIN_DISTANCE_FROM_VIEWPORT_H_EDGE = 120;\n\n        ddHeight = ddHeight || ddElm.clientHeight\n\n        function getAncestorsOffsets(p){\n            var top = 0, left = 0;\n\n            p = p.parentNode;\n\n            // when in element-fullscreen mode, do not go above the fullscreened-element\n            while(p && p != root){\n                top += p.offsetTop || 0\n                left += p.offsetLeft || 0\n                p = p.parentNode\n            }\n\n            return {top, left};\n        }\n\n        function getAccumulatedAncestorsScrollTop() {\n            var scrollTop = 0,\n                p = _sd.appendTarget.parentNode;\n\n            while(p){\n                scrollTop += p.scrollTop || 0;\n                p = p.parentNode\n            }\n\n            return scrollTop;\n        }\n\n        if( !this.state.dropdown.visible ) return\n\n        if( positionTo == 'text' ){\n            rect   = getCaretGlobalPosition()\n            bottom = rect.bottom\n            top    = rect.top\n            left   = rect.left\n            width  = 'auto'\n        }\n\n        else{\n            ancestorsOffsets = getAncestorsOffsets(appendTarget)\n            rect   = ddTarget.getBoundingClientRect()\n            top    = isSelfAppended ? -1 : rect.top - ancestorsOffsets.top\n            bottom = (isSelfAppended ? rect.height : rect.bottom - ancestorsOffsets.top) - 1\n            left   = isSelfAppended ? -1 : rect.left - ancestorsOffsets.left\n            width  = rect.width + 'px'\n        }\n\n        // if the \"append target\" isn't the default, correct the `top` variable by ignoring any scrollTop of the target's Ancestors\n        if( !isDefaultAppendTarget ) {\n            let accumulatedAncestorsScrollTop = getAccumulatedAncestorsScrollTop()\n            top += accumulatedAncestorsScrollTop\n            bottom += accumulatedAncestorsScrollTop\n        }\n\n        top = Math.floor(top)\n        bottom = Math.ceil(bottom)\n\n        isPlacedAbove = _sd.placeAbove ?? viewportHeight - rect.bottom < ddHeight\n        hasSpaceOnRight = viewportWidth - left < MIN_DISTANCE_FROM_VIEWPORT_H_EDGE;\n\n        // flip vertically if there is no space for the dropdown below the input\n        cssTop = (isPlacedAbove ? top : bottom) + appendTargetScrollTop;\n\n        // \"pageXOffset\" property is an alias for \"scrollX\"\n        cssLeft = (left + (isRTL ? (rect.width || 0) : 0) + window.pageXOffset);\n\n        // check if there's enough space on the right-side of the viewport,\n        // because the element is positioned to the right of the caret, which might need to be changed.\n        if( positionTo == 'text' && hasSpaceOnRight ) {\n            cssLeft = `right: 0;`;\n        }\n        else {\n            cssLeft = `left: ${cssLeft}px;`;\n        }\n\n        // rtl = rtl ?? viewportWidth -\n        ddElm.style.cssText = `${cssLeft} top: ${cssTop}px; min-width: ${width}; max-width: ${width}`;\n\n        ddElm.setAttribute('placement', isPlacedAbove ? 'top' : 'bottom')\n        ddElm.setAttribute('position', positionTo)\n    },\n}\n", "import { isObject, escapeHTML, extend, unaccent, logger } from './helpers'\n\n\n/**\n * Tagify's dropdown suggestions-related logic\n */\n\nexport default {\n    events : {\n        /**\n         * Events should only be binded when the dropdown is rendered and removed when isn't\n         * because there might be multiple Tagify instances on a certain page\n         * @param  {Boolean} bindUnbind [optional. true when wanting to unbind all the events]\n         */\n        binding( bindUnbind = true ){\n            // references to the \".bind()\" methods must be saved so they could be unbinded later\n            var _CB = this.dropdown.events.callbacks,\n                // callback-refs\n                _CBR = (this.listeners.dropdown = this.listeners.dropdown || {\n                    position          : this.dropdown.position.bind(this, null),\n                    onKeyDown         : _CB.onKeyDown.bind(this),\n                    onMouseOver       : _CB.onMouseOver.bind(this),\n                    onMouseLeave      : _CB.onMouseLeave.bind(this),\n                    onClick           : _CB.onClick.bind(this),\n                    onScroll          : _CB.onScroll.bind(this),\n                }),\n                action = bindUnbind ? 'addEventListener' : 'removeEventListener';\n\n            if( this.settings.dropdown.position != 'manual' ){\n                document[action]('scroll', _CBR.position, true)\n                window[action]('resize', _CBR.position)\n                window[action]('keydown', _CBR.onKeyDown)\n            }\n\n            this.DOM.dropdown[action]('mouseover', _CBR.onMouseOver)\n            this.DOM.dropdown[action]('mouseleave', _CBR.onMouseLeave)\n            this.DOM.dropdown[action]('mousedown', _CBR.onClick)\n            this.DOM.dropdown.content[action]('scroll', _CBR.onScroll)\n        },\n\n        callbacks : {\n            onKeyDown(e){\n                // ignore keys during IME composition\n                if( !this.state.hasFocus || this.state.composing )\n                    return\n\n                // get the \"active\" element, and if there was none (yet) active, use first child\n                var _s = this.settings,\n                    includeSelectedTags = _s.dropdown.includeSelectedTags,\n                    selectedElm = this.DOM.dropdown.querySelector(_s.classNames.dropdownItemActiveSelector),\n                    selectedElmData = this.dropdown.getSuggestionDataByNode(selectedElm),\n                    isMixMode = _s.mode == 'mix',\n                    isSelectMode = _s.mode == 'select';\n\n                _s.hooks.beforeKeyDown(e, {tagify:this})\n                    .then(result => {\n                        switch( e.key ){\n                            case 'ArrowDown' :\n                            case 'ArrowUp' :\n                            case 'Down' :  // >IE11\n                            case 'Up' : {  // >IE11\n                                e.preventDefault()\n                                var dropdownItems = this.dropdown.getAllSuggestionsRefs(),\n                                    actionUp = e.key == 'ArrowUp' || e.key == 'Up';\n\n                                if( selectedElm ) {\n                                    selectedElm = this.dropdown.getNextOrPrevOption(selectedElm, !actionUp)\n                                }\n\n                                // if no element was found OR current item is not a \"real\" item, loop\n                                if( !selectedElm || !selectedElm.matches(_s.classNames.dropdownItemSelector) ){\n                                    selectedElm = dropdownItems[actionUp ? dropdownItems.length - 1 : 0];\n                                }\n\n                                this.dropdown.highlightOption(selectedElm, true)\n                                // selectedElm.scrollIntoView({inline: 'nearest', behavior: 'smooth'})\n                                break;\n                            }\n                            case 'PageUp':\n                            case 'PageDown': {\n                                e.preventDefault()\n                                const dropdownItems = this.dropdown.getAllSuggestionsRefs()\n                                const itemsPerPage = Math.floor(this.DOM.dropdown.content.clientHeight / dropdownItems[0]?.offsetHeight) || 1\n                                const isPageUp = e.key === 'PageUp'\n\n                                if (selectedElm) {\n                                    const currentIndex = dropdownItems.indexOf(selectedElm)\n                                    const targetIndex = isPageUp\n                                        ? Math.max(0, currentIndex - itemsPerPage)\n                                        : Math.min(dropdownItems.length - 1, currentIndex + itemsPerPage)\n                                    selectedElm = dropdownItems[targetIndex]\n                                } else {\n                                    selectedElm = dropdownItems[0]\n                                }\n\n                                this.dropdown.highlightOption(selectedElm, true)\n                                break;\n                            }\n                            case 'Home':\n                            case 'End': {\n                                e.preventDefault()\n                                const dropdownItems = this.dropdown.getAllSuggestionsRefs()\n                                selectedElm = dropdownItems[e.key === 'Home' ? 0 : dropdownItems.length - 1]\n                                this.dropdown.highlightOption(selectedElm, true)\n                                break;\n                            }\n                            case 'Escape' :\n                            case 'Esc': // IE11\n                                this.dropdown.hide();\n                                break;\n\n                            case 'ArrowRight' :\n                                // do not continue if the left arrow key was pressed while typing, because assuming the user wants to bypass any of the below logic and edit the content without intervention.\n                                // also do not procceed if a tag should be created when the setting `autoComplete.rightKey` is set to `true`\n                                if( this.state.actions.ArrowLeft || _s.autoComplete.rightKey )\n                                    return\n                            case 'Tab' : {\n                                let shouldAutocompleteOnKey = !_s.autoComplete.rightKey || !_s.autoComplete.tabKey\n\n                                // in mix-mode, treat arrowRight like Enter key, so a tag will be created\n                                if( !isMixMode && !isSelectMode && selectedElm && shouldAutocompleteOnKey && !this.state.editing && selectedElmData ){\n                                    e.preventDefault() // prevents blur so the autocomplete suggestion will not become a tag\n                                    var value = this.dropdown.getMappedValue(selectedElmData)\n\n                                    this.state.autoCompleteData = selectedElmData;\n                                    this.input.autocomplete.set.call(this, value)\n                                    return false\n                                }\n                                return true\n                            }\n                            case 'Enter' : {\n                                e.preventDefault()\n\n                                // temporary set the \"actions\" state to indicate to the main \"blur\" event it shouldn't execute any if its logic.\n                                // a `100ms` is a good-enough timeout after some testing\n                                this.state.actions.selectOption = true;\n                                setTimeout(()=> this.state.actions.selectOption = false, 100)\n\n                                _s.hooks.suggestionClick(e, {tagify:this, tagData:selectedElmData, suggestionElm:selectedElm})\n                                    .then(() => {\n                                        if( selectedElm ){\n                                            var nextOrPrevOption = includeSelectedTags ? selectedElm : this.dropdown.getNextOrPrevOption(selectedElm, !actionUp);\n\n                                            this.dropdown.selectOption(selectedElm, e, () => {\n                                                // highlight next option\n                                                if(nextOrPrevOption) {\n                                                    var nextOrPrevOptionValue = nextOrPrevOption.getAttribute('value')\n                                                    nextOrPrevOption = this.dropdown.getSuggestionNodeByValue(nextOrPrevOptionValue)\n                                                    this.dropdown.highlightOption(nextOrPrevOption)\n                                                }\n                                            })\n\n                                            return\n                                        }\n                                        else\n                                            this.dropdown.hide()\n\n                                        if( !isMixMode )\n                                            this.addTags(this.state.inputText.trim(), true)\n                                    })\n                                    .catch(err => logger.warn(err))\n\n                                break;\n                            }\n                            case 'Backspace' : {\n                                if( isMixMode || this.state.editing.scope ) return;\n\n                                const value = this.input.raw.call(this)\n\n                                if( value == \"\" || value.charCodeAt(0) == 8203 ){\n                                    if( _s.backspace === true )\n                                        this.removeTags()\n                                    else if( _s.backspace == 'edit' )\n                                        setTimeout(this.editTag.bind(this), 0)\n                                }\n                            }\n                        }\n                    })\n            },\n\n            onMouseOver(e){\n                var ddItem = e.target.closest(this.settings.classNames.dropdownItemSelector)\n                // event delegation check\n                this.dropdown.highlightOption(ddItem)\n            },\n\n            onMouseLeave(e){\n                // de-highlight any previously highlighted option\n                this.dropdown.highlightOption()\n            },\n\n            onClick(e){\n                if( e.button != 0 || e.target == this.DOM.dropdown || e.target == this.DOM.dropdown.content ) return; // allow only mouse left-clicks\n\n                var selectedElm = e.target.closest(this.settings.classNames.dropdownItemSelector),\n                    selectedElmData = this.dropdown.getSuggestionDataByNode(selectedElm)\n\n                // temporary set the \"actions\" state to indicate to the main \"blur\" event it shouldn't execute any if its logic.\n                // a `100ms` is a good-enough timeout after some testing\n                this.state.actions.selectOption = true;\n                setTimeout(()=> this.state.actions.selectOption = false, 100)\n\n                this.settings.hooks.suggestionClick(e, {tagify:this, tagData:selectedElmData, suggestionElm:selectedElm})\n                    .then(() => {\n                        if( selectedElm )\n                            this.dropdown.selectOption(selectedElm, e)\n                        else\n                            this.dropdown.hide()\n                    })\n                    .catch(err => logger.warn(err))\n            },\n\n            onScroll(e){\n                var elm = e.target,\n                    pos = elm.scrollTop / (elm.scrollHeight - elm.parentNode.clientHeight) * 100;\n\n                this.trigger(\"dropdown:scroll\", {percentage:Math.round(pos)})\n            },\n        }\n    },\n\n    /**\n     * fill data into the suggestions list\n     * (mainly used to update the list when removing tags while the suggestions dropdown is visible, so they will be re-added to the list. not efficient)\n     */\n    refilter( value ){\n        value = value || this.state.dropdown.query || ''\n        this.suggestedListItems = this.dropdown.filterListItems(value)\n\n        this.dropdown.fill()\n\n        if( !this.suggestedListItems.length )\n            this.dropdown.hide()\n\n        this.trigger(\"dropdown:updated\", this.DOM.dropdown)\n    },\n\n    /**\n     * Given a suggestion-item, return the data associated with it\n     * @param {HTMLElement} tagElm\n     * @returns Object\n     */\n    getSuggestionDataByNode( tagElm ){\n        var item, value = tagElm && tagElm.getAttribute('value')\n\n        for(var i = this.suggestedListItems.length; i--; ) {\n            item = this.suggestedListItems[i]\n            if( isObject(item) && item.value == value ) return item\n            // for primitive whitelist items:\n            else if( item == value ) return {value: item}\n        }\n    },\n\n    getSuggestionNodeByValue( value ){\n        var dropdownItems = this.dropdown.getAllSuggestionsRefs()\n        return dropdownItems.find(item => item.getAttribute('value') === value);\n    },\n\n    getNextOrPrevOption(selected, next = true) {\n        var dropdownItems = this.dropdown.getAllSuggestionsRefs(),\n            selectedIdx = dropdownItems.findIndex(item => item === selected);\n\n        return next ? dropdownItems[selectedIdx + 1] : dropdownItems[selectedIdx - 1]\n    },\n\n    /**\n     * mark the currently active suggestion option\n     * @param {Object}  elm            option DOM node\n     * @param {Boolean} adjustScroll   when navigation with keyboard arrows (up/down), auto-scroll to always show the highlighted element\n     */\n    highlightOption( elm, adjustScroll ){\n        var className = this.settings.classNames.dropdownItemActive,\n            itemData;\n\n        // focus casues a bug in Firefox with the placeholder been shown on the input element\n        // if( this.settings.dropdown.position != 'manual' )\n        //     elm.focus();\n\n        if( this.state.ddItemElm ){\n            this.state.ddItemElm.classList.remove(className)\n            this.state.ddItemElm.removeAttribute(\"aria-selected\")\n        }\n\n        if( !elm ){\n            this.state.ddItemData = null\n            this.state.ddItemElm = null\n            this.input.autocomplete.suggest.call(this)\n            return;\n        }\n\n        itemData = this.dropdown.getSuggestionDataByNode(elm)\n        this.state.ddItemData = itemData\n        this.state.ddItemElm = elm\n\n        // this.DOM.dropdown.querySelectorAll(\".\" + this.settings.classNames.dropdownItemActive).forEach(activeElm => activeElm.classList.remove(className));\n        elm.classList.add(className);\n        elm.setAttribute(\"aria-selected\", true)\n\n        if( adjustScroll )\n            elm.parentNode.scrollTop = elm.clientHeight + elm.offsetTop - elm.parentNode.clientHeight\n\n        // Try to autocomplete the typed value with the currently highlighted dropdown item\n        if( this.settings.autoComplete ){\n            this.input.autocomplete.suggest.call(this, itemData)\n            this.dropdown.position() // suggestions might alter the height of the tagify wrapper because of unkown suggested term length that could drop to the next line\n        }\n    },\n\n    /**\n     * Create a tag from the currently active suggestion option\n     * @param {Object} elm  DOM node to select\n     * @param {Object} event The original Click event, if available (since keyboard ENTER key also triggers this method)\n     */\n    selectOption( elm, event, onSelect ){\n        var _s = this.settings,\n            includeSelectedTags = _s.dropdown.includeSelectedTags,\n            {clearOnSelect, closeOnSelect} = _s.dropdown;\n\n        if( !elm ) {\n            this.addTags(this.state.inputText, true)\n            closeOnSelect && this.dropdown.hide()\n            return;\n        }\n\n        event = event || {}\n\n        // if in edit-mode, do not continue but instead replace the tag's text.\n        // the scenario is that \"addTags\" was called from a dropdown suggested option selected while editing\n\n        var value = elm.getAttribute('value'),\n            isNoMatch = value == 'noMatch',\n            isMixMode = _s.mode == 'mix',\n            tagData = this.suggestedListItems.find(item => (item.value ?? item) == value)\n\n        // The below event must be triggered, regardless of anything else which might go wrong\n        this.trigger('dropdown:select', {data:tagData, elm, event})\n\n        if( !tagData && !isNoMatch ){\n            closeOnSelect && setTimeout(this.dropdown.hide.bind(this))\n            return\n        }\n\n        if( this.state.editing ) {\n            let normalizedTagData = this.normalizeTags([tagData])[0]\n            tagData = _s.transformTag.call(this, normalizedTagData) || normalizedTagData\n\n            // normalizing value, because \"tagData\" might be a string, and therefore will not be able to extend the object\n            this.onEditTagDone(null, extend({__isValid: true}, tagData))\n        }\n        // Tagify instances should re-focus to the input element once an option was selected, to allow continuous typing\n        else {\n            this[isMixMode ? \"addMixTags\" : \"addTags\"]([tagData || this.input.raw.call(this)], clearOnSelect)\n        }\n\n        if( !isMixMode && !this.DOM.input.parentNode )\n            return\n\n        setTimeout(() => {\n            this.DOM.input.focus()\n            this.toggleFocusClass(true)\n        })\n\n        closeOnSelect && setTimeout(this.dropdown.hide.bind(this))\n\n        // execute these tasks once a suggestion has been selected\n        if(includeSelectedTags) {\n            onSelect && onSelect()\n        }\n\n        // if the selected suggestion is removed after being selected, more things things needs to be done:\n        else {\n            elm.addEventListener('transitionend', () => {\n                this.dropdown.fillHeaderFooter()\n\n                setTimeout(() => {\n                    elm.remove()\n                    this.dropdown.refilter()\n                    onSelect && onSelect()\n                }, 100)\n            }, {once: true})\n\n            // hide selected suggestion\n            elm.classList.add(this.settings.classNames.dropdownItemHidden)\n        }\n    },\n\n    // adds all the suggested items, including the ones which are not currently rendered,\n    // unless specified otherwise (by the \"onlyRendered\" argument)\n    selectAll( onlyRendered ){\n        // having suggestedListItems with items messes with \"normalizeTags\" when wanting\n        // to add all tags\n        this.suggestedListItems.length = 0;\n        this.dropdown.hide()\n\n        this.dropdown.filterListItems('');\n\n        var tagsToAdd = this.dropdown.filterListItems('');\n\n        if( !onlyRendered )\n            tagsToAdd = this.state.dropdown.suggestions\n\n        // some whitelist items might have already been added as tags so when addings all of them,\n        // skip adding already-added ones, so best to use \"filterListItems\" method over \"settings.whitelist\"\n        this.addTags(tagsToAdd, true)\n        return this\n    },\n\n    /**\n     * returns an HTML string of the suggestions' list items\n     * @param {String} value string t\n     * o filter the whitelist by\n     * @param {Object} options \"exact\" - for exact complete match\n     * @return {Array} list of filtered whitelist items according to the settings provided and current value\n     */\n    filterListItems( value, options ){\n        var _s = this.settings,\n            _sd = _s.dropdown,\n            options = options || {},\n            list = [],\n            exactMatchesList = [],\n            whitelist = _s.whitelist,\n            suggestionsCount = _sd.maxItems >= 0 ? _sd.maxItems : Infinity,\n            includeSelectedTags = _sd.includeSelectedTags,\n            hasCustomSort = typeof _sd.sortby == 'function',\n            searchKeys = _sd.searchKeys,\n            whitelistItem,\n            valueIsInWhitelist,\n            searchBy,\n            isDuplicate,\n            niddle,\n            i = 0;\n\n        value = (_s.mode == 'select' && this.value.length && this.value[0][_s.tagTextProp] == value\n            ? '' // do not filter if the tag, which is already selecetd in \"select\" mode, is the same as the typed text\n            : value);\n\n        if( !value || !searchKeys.length ){\n            list = includeSelectedTags\n                ? whitelist\n                : whitelist.filter(item => !this.isTagDuplicate( isObject(item) ? item.value : item )) // don't include tags which have already been added.\n\n            var filteredList = hasCustomSort\n                ? _sd.sortby(list, niddle)\n                : list.slice(0, suggestionsCount); // respect \"maxItems\" dropdown setting\n\n            this.state.dropdown.suggestions = filteredList;\n\n            return filteredList;\n        }\n\n        niddle = _sd.caseSensitive\n            ? \"\"+value\n            : (\"\"+value).toLowerCase()\n\n        // checks if ALL of the words in the search query exists in the current whitelist item, regardless of their order\n        function stringHasAll(s, query){\n            return query.toLowerCase().split(' ').every(q => s.includes(q.toLowerCase()))\n        }\n\n        for( ; i < whitelist.length; i++ ){\n            let startsWithMatch, exactMatch;\n\n            whitelistItem = whitelist[i] instanceof Object ? whitelist[i] : { value:whitelist[i] } //normalize value as an Object\n\n            let itemWithoutSearchKeys = !Object.keys(whitelistItem).some(k => searchKeys.includes(k) ),\n                _searchKeys = itemWithoutSearchKeys ? [\"value\"] : searchKeys\n\n            if( _sd.fuzzySearch && !options.exact ){\n                searchBy = _searchKeys.reduce((values, k) => values + \" \" + (whitelistItem[k]||\"\"), \"\").toLowerCase().trim()\n\n                if( _sd.accentedSearch ){\n                    searchBy = unaccent(searchBy)\n                    niddle = unaccent(niddle)\n                }\n\n                startsWithMatch = searchBy.indexOf(niddle) == 0\n                exactMatch = searchBy === niddle\n                valueIsInWhitelist = stringHasAll(searchBy, niddle)\n            }\n\n            else {\n                startsWithMatch = true;\n                valueIsInWhitelist = _searchKeys.some(k => {\n                    var v = '' + (whitelistItem[k] || '') // if key exists, cast to type String\n\n                    if( _sd.accentedSearch ){\n                        v = unaccent(v)\n                        niddle = unaccent(niddle)\n                    }\n\n                    if( !_sd.caseSensitive )\n                        v = v.toLowerCase()\n\n                    exactMatch = v === niddle\n\n                    return options.exact\n                        ? v === niddle\n                        : v.indexOf(niddle) == 0\n                })\n            }\n\n            isDuplicate = !_sd.includeSelectedTags && this.isTagDuplicate( isObject(whitelistItem) ? whitelistItem.value : whitelistItem )\n\n            // match for the value within each \"whitelist\" item\n            if( valueIsInWhitelist && !isDuplicate )\n                if( exactMatch && startsWithMatch)\n                    exactMatchesList.push(whitelistItem)\n                else if( _sd.sortby == 'startsWith' && startsWithMatch )\n                    list.unshift(whitelistItem)\n                else\n                    list.push(whitelistItem)\n        }\n\n        this.state.dropdown.suggestions = exactMatchesList.concat(list);\n\n        // custom sorting function\n        var filteredList = hasCustomSort\n            ? _sd.sortby(exactMatchesList.concat(list), niddle)\n            : exactMatchesList.concat(list).slice(0, suggestionsCount)\n\n        this.state.dropdown.suggestions = filteredList;\n        return filteredList\n    },\n\n    /**\n     * Returns the final value of a tag data (object) with regards to the \"mapValueTo\" dropdown setting\n     * @param {Object} tagData\n     * @returns\n     */\n    getMappedValue(tagData){\n        var mapValueTo = this.settings.dropdown.mapValueTo,\n            value = (mapValueTo\n                ? typeof mapValueTo == 'function' ? mapValueTo(tagData) : (tagData[mapValueTo] || tagData.value)\n                : tagData.value);\n\n        return value\n    },\n\n    /**\n     * Creates the dropdown items' HTML\n     * @param  {Array} sugegstionsList  [Array of Objects]\n     * @return {String}\n     */\n    createListHTML( sugegstionsList ){\n        return extend([], sugegstionsList).map((suggestion, idx) => {\n            if( typeof suggestion == 'string' || typeof suggestion == 'number' )\n                suggestion = {value:suggestion}\n\n            var mappedValue = this.dropdown.getMappedValue(suggestion);\n\n            mappedValue = (typeof mappedValue == 'string' && this.settings.dropdown.escapeHTML)\n                ? escapeHTML(mappedValue)\n                : mappedValue;\n\n            return this.settings.templates.dropdownItem.apply(this, [{...suggestion, mappedValue}, this])\n        }).join(\"\")\n    }\n}", "const VERSION = 1; // current version of persisted data. if code change breaks persisted data, verison number should be bumped.\nconst STORE_KEY = '@yaireo/tagify/'\n\nexport const getPersistedData = id => key => {\n    if( !id ) return;\n\n    // if \"persist\" is \"false\", do not save to localstorage\n    let customKey = '/'+key,\n        persistedData,\n        currentStorageVersion = localStorage?.getItem(STORE_KEY + id + '/v')\n\n    if( currentStorageVersion === VERSION){\n        try{ persistedData = JSON.parse(localStorage[STORE_KEY + id + customKey]) }\n        catch(err){}\n    }\n\n    return persistedData\n}\n\nexport const setPersistedData = id => {\n    if( !id ) return () => {};\n\n    // for storage invalidation\n    localStorage?.setItem(STORE_KEY + id + '/v', VERSION)\n\n    return (data, key) => {\n        let customKey = '/'+key,\n            persistedData = JSON.stringify(data)\n\n        if( data && key ){\n            localStorage?.setItem(STORE_KEY + id + customKey, persistedData)\n            dispatchEvent( new Event('storage') )\n        }\n    }\n}\n\nexport const clearPersistedData = id => key => {\n    const base = STORE_KEY + '/' + id + '/';\n\n    // delete specific key in the storage\n    if( key )\n        localStorage.removeItem(base + key)\n\n    // delete all keys in the storage with a specific tagify id\n    else {\n        for(let k in localStorage)\n            if( k.includes(base) )\n                localStorage.removeItem(k)\n    }\n}\n", "export default {\r\n    empty      : \"empty\",\r\n    exceed     : \"number of tags exceeded\",\r\n    pattern    : \"pattern mismatch\",\r\n    duplicate  : \"already exists\",\r\n    notAllowed : \"not allowed\"\r\n}", "import {ZERO_WIDTH_UNICODE_CHAR} from './constants'\n\nexport default {\n    /**\n     *\n     * @param {DOM Object} input     Original input DOm element\n     * @param {Object}     settings  Tagify instance settings Object\n     */\n    wrapper(input, _s){\n        return `<tags class=\"${_s.classNames.namespace} ${_s.mode ? `${_s.classNames[_s.mode + \"Mode\"]}` : \"\"} ${input.className}\"\n                    ${_s.readonly ? 'readonly' : ''}\n                    ${_s.disabled ? 'disabled' : ''}\n                    ${_s.required ? 'required' : ''}\n                    ${_s.mode === 'select' ? \"spellcheck='false'\" : ''}\n                    tabIndex=\"-1\">\n                    ${this.settings.templates.input.call(this)}\n                ${ZERO_WIDTH_UNICODE_CHAR}\n        </tags>`\n    },\n\n    input() {\n        var _s = this.settings,\n            placeholder = _s.placeholder || ZERO_WIDTH_UNICODE_CHAR;\n\n        return `<span ${!_s.readonly && _s.userInput ? 'contenteditable' : ''} data-can-editable tabIndex=\"0\" data-placeholder=\"${placeholder}\" aria-placeholder=\"${_s.placeholder || ''}\"\n                    class=\"${_s.classNames.input}\"\n                    role=\"textbox\"\n                    autocapitalize=\"false\"\n                    autocorrect=\"off\"\n                    aria-label=\"${_s.a11y.inputAriaLabel}\"\n                    aria-autocomplete=\"both\"\n                    aria-multiline=\"${_s.mode=='mix'?true:false}\"></span>`\n    },\n\n    tag(tagData, {settings: _s}){\n        return `<tag title=\"${(tagData.title || tagData.value)}\"\n                    contenteditable='false'\n                    tabIndex=\"${_s.a11y.focusableTags ? 0 : -1}\"\n                    class=\"${_s.classNames.tag} ${tagData.class || \"\"}\"\n                    ${this.getAttributes(tagData)}>\n            <x title='' tabIndex=\"${_s.a11y.focusableTags ? 0 : -1}\" class=\"${_s.classNames.tagX}\" role='button' aria-label='remove tag'></x>\n            <div>\n                <span ${_s.mode === 'select' && _s.userInput ? \"contenteditable='true'\" : ''} autocapitalize=\"false\" autocorrect=\"off\" spellcheck='false' class=\"${_s.classNames.tagText}\">${tagData[_s.tagTextProp] || tagData.value}</span>\n            </div>\n        </tag>`\n    },\n\n    dropdown(settings){\n        var _sd = settings.dropdown,\n            isManual = _sd.position == 'manual';\n\n        return `<div class=\"${isManual ? '' : settings.classNames.dropdown } ${_sd.classname}\" role=\"listbox\" aria-labelledby=\"dropdown\" dir=\"${_sd.RTL ? 'rtl' : ''}\">\n                    <div data-selector='tagify-suggestions-wrapper' class=\"${settings.classNames.dropdownWrapper}\"></div>\n                </div>`\n    },\n\n    dropdownContent(HTMLContent) {\n        var _t = this.settings.templates,\n            suggestions = this.state.dropdown.suggestions;\n\n        return `\n            ${_t.dropdownHeader.call(this, suggestions)}\n            ${HTMLContent}\n            ${_t.dropdownFooter.call(this, suggestions)}\n        `\n    },\n\n    dropdownItem(item){\n        return `<div ${this.getAttributes(item)}\n                    class='${this.settings.classNames.dropdownItem} ${this.isTagDuplicate(item.value) ? this.settings.classNames.dropdownItemSelected: \"\"} ${item.class || \"\"}'\n                    tabindex=\"0\"\n                    role=\"option\">${item.mappedValue || item.value}</div>`\n    },\n\n    /**\n     * @param {Array} suggestions An array of all the matched suggested items, including those which were sliced away due to the \"dropdown.maxItems\" setting\n     */\n    dropdownHeader(suggestions){\n        return `<header data-selector='tagify-suggestions-header' class=\"${this.settings.classNames.dropdownHeader}\"></header>`\n    },\n\n    dropdownFooter(suggestions){\n        var hasMore = suggestions.length - this.settings.dropdown.maxItems;\n\n        return hasMore > 0\n            ? `<footer data-selector='tagify-suggestions-footer' class=\"${this.settings.classNames.dropdownFooter}\">\n                ${hasMore} more items. Refine your search.\n            </footer>`\n            : '';\n    },\n\n    dropdownItemNoMatch: null\n}\n", "import { decode, extend, getfirstTextNode, isChromeAndroidBrowser, isNodeTag, isWithinNodeTag, injectAtCaret, getSetTagData, fixCaretBetweenTags, placeCaretAfterNode } from './helpers'\nimport {ZERO_WIDTH_CHAR} from './constants'\n\nexport function triggerChangeEvent(){\n    if( this.settings.mixMode.integrated ) return;\n\n    var inputElm = this.DOM.originalInput,\n        changed = this.state.lastOriginalValueReported !== inputElm.value,\n        event = new CustomEvent(\"change\", {bubbles: true}); // must use \"CustomEvent\" and not \"Event\" to support IE\n\n    if( !changed ) return;\n\n    // must apply this BEFORE triggering the simulated event\n    this.state.lastOriginalValueReported = inputElm.value\n\n    // React hack: https://github.com/facebook/react/issues/11488\n    event.simulated = true\n    if (inputElm._valueTracker)\n        inputElm._valueTracker.setValue(Math.random())\n\n    inputElm.dispatchEvent(event)\n\n    // also trigger a Tagify event\n    this.trigger(\"change\", this.state.lastOriginalValueReported)\n\n    // React, for some reason, clears the input's value after \"dispatchEvent\" is fired\n    inputElm.value = this.state.lastOriginalValueReported\n}\n\nexport default {\n    // bind custom events which were passed in the settings\n    customBinding(){\n        this.customEventsList.forEach(name => {\n            this.on(name, this.settings.callbacks[name])\n        })\n    },\n\n    binding( bindUnbind = true ){\n        var _s = this.settings,\n            _CB = this.events.callbacks,\n            _CBR,\n            action = bindUnbind ? 'addEventListener' : 'removeEventListener';\n\n        // do not allow the main events to be bound more than once\n        if( (this.state.mainEvents && bindUnbind ) || _s.disabled || _s.readonly )\n            return;\n\n\n        // set the binding state of the main events, so they will not be bound more than once\n        this.state.mainEvents = bindUnbind;\n\n        // everything inside gets executed only once-per instance\n        if( bindUnbind && !this.listeners.main ){\n            this.events.bindGlobal.call(this);\n\n            if( this.settings.isJQueryPlugin )\n                jQuery(this.DOM.originalInput).on('tagify.removeAllTags', this.removeAllTags.bind(this))\n        }\n\n        // setup callback references so events could be removed later\n        _CBR = (this.listeners.main = this.listeners.main || {\n            keydown          : ['input', _CB.onKeydown.bind(this)],\n            click            : ['scope', _CB.onClickScope.bind(this)],\n            dblclick         : _s.mode != 'select' && ['scope', _CB.onDoubleClickScope.bind(this)],\n            paste            : ['input', _CB.onPaste.bind(this)],\n            drop             : ['input', _CB.onDrop.bind(this)],\n            compositionstart : ['input', _CB.onCompositionStart.bind(this)],\n            compositionend   : ['input', _CB.onCompositionEnd.bind(this)]\n        })\n\n        for( var eventName in _CBR ){\n            _CBR[eventName] && this.DOM[_CBR[eventName][0]][action](eventName, _CBR[eventName][1]);\n        }\n\n        // observers\n        var inputMutationObserver = this.listeners.main.inputMutationObserver || new MutationObserver(_CB.onInputDOMChange.bind(this));\n\n        // cleaup just-in-case\n        inputMutationObserver.disconnect()\n\n        // observe stuff\n        if( _s.mode == 'mix' ) {\n            inputMutationObserver.observe(this.DOM.input, {childList:true})\n        }\n\n        this.events.bindOriginaInputListener.call(this)\n\n        if( bindUnbind ) {\n            this.listeners.main = undefined\n        }\n    },\n\n    bindOriginaInputListener(delay) {\n        const DELAY = (delay||0) + 500\n\n        if(!this.listeners.main) return\n        // listen to original input changes (unfortunetly this is the best way...)\n        // https://stackoverflow.com/a/1949416/104380\n        clearInterval(this.listeners.main.originalInputValueObserverInterval)\n        this.listeners.main.originalInputValueObserverInterval = setInterval(this.events.callbacks.observeOriginalInputValue.bind(this), DELAY)\n    },\n\n    bindGlobal( unbind ) {\n        var _CB = this.events.callbacks,\n            action = unbind ? 'removeEventListener' : 'addEventListener',\n            e;\n\n        if( !this.listeners || (!unbind  && this.listeners.global) ) return; // do not re-bind\n\n        // these events are global and should never be unbinded, unless the instance is destroyed:\n        this.listeners.global = this.listeners.global || [\n            {\n                type: this.isIE ? 'keydown' : 'input',  // IE cannot register \"input\" events on contenteditable elements, so the \"keydown\" should be used instead..\n                target: this.DOM.input,\n                cb: _CB[this.isIE ? 'onInputIE' : 'onInput'].bind(this)\n            },\n            {\n                type: 'keydown',\n                target: window,\n                cb: _CB.onWindowKeyDown.bind(this)\n            },\n            {\n                type: 'focusin',\n                target: this.DOM.scope,\n                cb: _CB.onFocusBlur.bind(this)\n            },\n            {\n                type: 'focusout',\n                target: this.DOM.scope,\n                cb: _CB.onFocusBlur.bind(this)\n            },\n            {\n                type: 'click',\n                target: document,\n                cb: _CB.onClickAnywhere.bind(this),\n                useCapture: true\n            },\n        ]\n\n        for( e of this.listeners.global )\n            e.target[action](e.type, e.cb, !!e.useCapture);\n\n        if( unbind ) {\n            this.listeners.global = undefined\n        }\n    },\n\n    unbindGlobal() {\n        this.events.bindGlobal.call(this, true);\n    },\n\n    /**\n     * DOM events callbacks\n     */\n    callbacks : {\n        onFocusBlur(e){\n            // when focusing within a tag which is in edit-mode\n            var _s = this.settings,\n                nodeTag = isWithinNodeTag.call(this, e.relatedTarget),\n                targetIsTagNode = isNodeTag.call(this, e.target),\n                isTargetXBtn = e.target.classList.contains(_s.classNames.tagX),\n                isFocused = e.type == 'focusin',\n                lostFocus = e.type == 'focusout';\n\n            // when focusing within a tag which is in edit-mode, only and specifically on the text-part of the tag node\n            // and not the X button or any other custom element thatmight be there\n            // var tagTextNode = e.target?.closest(this.settings.classNames.tagTextSelector)\n\n            if(isTargetXBtn && _s.mode != 'mix' && _s.focusInputOnRemove) {\n                this.DOM.input.focus()\n            }\n\n            if( nodeTag && isFocused && (!targetIsTagNode) && !isTargetXBtn) {\n                this.toggleFocusClass(this.state.hasFocus = +new Date())\n\n                // only if focused within a tag's text node should the `onEditTagFocus` function be called.\n                // if clicked anywhere else inside a tag, which had triggered an `focusin` event,\n                // the onFocusBlur should be aborted. This part was spcifically written for `select` mode.\n                // tagTextNode && this.events.callbacks.onEditTagFocus.call(this, nodeTag)\n            }\n\n            var text = e.target ? this.trim(this.DOM.input.textContent) : '', // a string\n                currentDisplayValue = this.value?.[0]?.[_s.tagTextProp],\n                ddEnabled = _s.dropdown.enabled >= 0,\n                eventData = {relatedTarget:e.relatedTarget},\n                isTargetSelectOption = this.state.actions.selectOption && (ddEnabled || !_s.dropdown.closeOnSelect),\n                isTargetAddNewBtn = this.state.actions.addNew && ddEnabled,\n                shouldAddTags;\n\n            if( lostFocus ){\n                if( e.relatedTarget === this.DOM.scope ){\n                    this.dropdown.hide()\n                    this.DOM.input.focus()\n                    return\n                }\n\n                this.postUpdate()\n                _s.onChangeAfterBlur && this.triggerChangeEvent()\n            }\n\n            if( isTargetSelectOption || isTargetAddNewBtn || isTargetXBtn ) {\n                return;\n            }\n\n            // should only loose focus at this point if the event was not generated from within a tag\n            if( isFocused || nodeTag ) {\n                this.state.hasFocus = +new Date()\n            }\n            else {\n                this.state.hasFocus = false;\n            }\n\n            this.toggleFocusClass(this.state.hasFocus)\n\n            if( _s.mode == 'mix' ){\n                if( isFocused ){\n                    this.trigger(\"focus\", eventData)\n                }\n\n                else if( lostFocus ){\n                    this.trigger(\"blur\", eventData)\n                    this.loading(false)\n                    this.dropdown.hide()\n                    // reset state which needs reseting\n                    this.state.dropdown.visible = undefined\n                    this.setStateSelection()\n                }\n\n                return\n            }\n\n            if( isFocused ){\n                if( !_s.focusable ) return;\n\n                // if( !targetIsTagNode && _s.mode != 'select' ){\n                //     this.DOM.input.focus()\n                // }\n\n                var dropdownCanBeShown = _s.dropdown.enabled === 0 && !this.state.dropdown.visible,\n                    tagText = this.DOM.scope.querySelector(this.settings.classNames.tagTextSelector)\n\n                this.trigger(\"focus\", eventData)\n                //  e.target.classList.remove('placeholder');\n                if( dropdownCanBeShown && !targetIsTagNode ){  // && _s.mode != \"select\"\n                    this.dropdown.show(this.value.length ? '' : undefined)\n\n                    if(_s.mode === 'select') {\n                        this.setRangeAtStartEnd(false, tagText)\n                    }\n                }\n\n                return\n            }\n\n            else if( lostFocus ){\n                this.trigger(\"blur\", eventData)\n                this.loading(false)\n\n                // when clicking the X button of a selected tag, it is unwanted for it to be added back\n                // again in a few more lines of code (shouldAddTags && addTags)\n                if( _s.mode == 'select' ) {\n                    if( this.value.length ) {\n                        let firstTagNode = this.getTagElms()[0];\n                        text = this.trim(firstTagNode.textContent)\n                    }\n\n                    // if nothing has changed (same display value), do not add a tag\n                    if( currentDisplayValue === text )\n                        text = ''\n                }\n\n                shouldAddTags = text && !this.state.actions.selectOption && _s.addTagOnBlur && _s.addTagOn.includes('blur');\n                // do not add a tag if \"selectOption\" action was just fired (this means a tag was just added from the dropdown)\n                shouldAddTags && this.addTags(text, true)\n            }\n\n            // when clicking a tag, do not consider this is a \"blur\" event\n            if ( !nodeTag )  {\n                this.DOM.input.removeAttribute('style')\n                this.dropdown.hide()\n            }\n        },\n\n        onCompositionStart(e){\n            this.state.composing = true\n        },\n\n        onCompositionEnd(e){\n            this.state.composing = false\n        },\n\n        onWindowKeyDown(e){\n            var _s = this.settings,\n                focusedElm = document.activeElement,\n                withinTag = isWithinNodeTag.call(this, focusedElm),\n                isBelong = withinTag && this.DOM.scope.contains(focusedElm),\n                isInputNode = focusedElm === this.DOM.input,\n                isReadyOnlyTag = isBelong && focusedElm.hasAttribute('readonly'),\n                tagText = this.DOM.scope.querySelector(this.settings.classNames.tagTextSelector),\n                isDropdownVisible = this.state.dropdown.visible,\n                nextTag;\n\n            if( !(e.key === 'Tab' && isDropdownVisible) && !this.state.hasFocus && (!isBelong || isReadyOnlyTag) || isInputNode ) return;\n\n            nextTag = focusedElm.nextElementSibling;\n\n            var targetIsRemoveBtn = e.target.classList.contains(_s.classNames.tagX);\n\n            switch( e.key ){\n                // remove tag if has focus\n                case 'Backspace': {\n                    if( !_s.readonly && !this.state.editing ) {\n                        this.removeTags(focusedElm);\n                        (nextTag ? nextTag : this.DOM.input).focus()\n                    }\n\n                    break;\n                }\n\n                case 'Enter': {\n                    if( targetIsRemoveBtn ) {\n                        this.removeTags( e.target.parentNode )\n                        return\n                    }\n\n                    if( _s.a11y.focusableTags && isNodeTag.call(this, focusedElm) )\n                        setTimeout(this.editTag.bind(this), 0, focusedElm)\n\n                    break;\n                }\n\n                case 'ArrowDown' : {\n                    // if( _s.mode == 'select' ) // issue #333\n                    if( !this.state.dropdown.visible && _s.mode != 'mix' )\n                        this.dropdown.show()\n                    break;\n                }\n\n                case 'Tab': {\n                    tagText?.focus();\n                    break;\n                }\n            }\n        },\n\n        onKeydown(e){\n            var _s = this.settings;\n\n            // ignore keys during IME composition or when user input is not allowed\n            if( this.state.composing || !_s.userInput )\n                return\n\n            if( _s.mode == 'select' && _s.enforceWhitelist && this.value.length && e.key != 'Tab' ){\n                e.preventDefault()\n            }\n\n            var s = this.trim(e.target.textContent);\n\n            this.trigger(\"keydown\", {event:e})\n\n            _s.hooks.beforeKeyDown(e, {tagify:this})\n                .then(result => {\n                    /**\n                     * ONLY FOR MIX-MODE:\n                     */\n                    if( _s.mode == 'mix' ){\n                        switch( e.key ){\n                            case 'Left' :\n                            case 'ArrowLeft' : {\n                                // when left arrow was pressed, set a flag so when the dropdown is shown, right-arrow will be ignored\n                                // because it seems likely the user wishes to use the arrows to move the caret\n                                this.state.actions.ArrowLeft = true\n                                break\n                            }\n\n                            case 'Delete':\n                            case 'Backspace' : {\n                                if( this.state.editing ) return\n\n                                var sel = document.getSelection(),\n                                    deleteKeyTagDetected = e.key == 'Delete' && sel.anchorOffset == (sel.anchorNode.length || 0),\n                                    prevAnchorSibling = sel.anchorNode.previousSibling,\n                                    isCaretAfterTag = sel.anchorNode.nodeType == 1 || !sel.anchorOffset && prevAnchorSibling && prevAnchorSibling.nodeType == 1 && sel.anchorNode.previousSibling,\n                                    lastInputValue = decode(this.DOM.input.innerHTML),\n                                    lastTagElems = this.getTagElms(),\n                                    isZWS = sel.anchorNode.length === 1 && sel.anchorNode.nodeValue == String.fromCharCode(8203),\n                                    //  isCaretInsideTag = sel.anchorNode.parentNode('.' + _s.classNames.tag),\n                                    tagBeforeCaret,\n                                    tagElmToBeDeleted,\n                                    firstTextNodeBeforeTag;\n\n                                if( _s.backspace == 'edit' && isCaretAfterTag ){\n                                    tagBeforeCaret = sel.anchorNode.nodeType == 1 ? null : sel.anchorNode.previousElementSibling;\n                                    setTimeout(this.editTag.bind(this), 0, tagBeforeCaret); // timeout is needed to the last cahacrter in the edited tag won't get deleted\n                                    e.preventDefault() // needed so the tag elm won't get deleted\n                                    return;\n                                }\n\n                                if( isChromeAndroidBrowser() && isCaretAfterTag instanceof Element ){\n                                    firstTextNodeBeforeTag = getfirstTextNode(isCaretAfterTag)\n\n                                    if( !isCaretAfterTag.hasAttribute('readonly') )\n                                        isCaretAfterTag.remove() // since this is Chrome, can safetly use this \"new\" DOM API\n\n                                    // Android-Chrome wrongly hides the keyboard, and loses focus,\n                                    // so this hack below is needed to regain focus at the correct place:\n                                    this.DOM.input.focus()\n                                    setTimeout(() => {\n                                        placeCaretAfterNode(firstTextNodeBeforeTag)\n                                        this.DOM.input.click()\n\n                                    })\n\n                                    return\n                                }\n\n                                if( sel.anchorNode.nodeName == 'BR')\n                                    return\n\n                                if( (deleteKeyTagDetected || isCaretAfterTag) && sel.anchorNode.nodeType == 1 )\n                                    if( sel.anchorOffset == 0 ) // caret is at the very begining, before a tag\n                                        tagElmToBeDeleted = deleteKeyTagDetected // delete key pressed\n                                            ? lastTagElems[0]\n                                            : null;\n                                    else\n                                        tagElmToBeDeleted = lastTagElems[Math.min(lastTagElems.length, sel.anchorOffset) - 1]\n\n                                // find out if a tag *might* be a candidate for deletion, and if so, which\n                                else if( deleteKeyTagDetected )\n                                    tagElmToBeDeleted = sel.anchorNode.nextElementSibling;\n\n                                else if( isCaretAfterTag instanceof Element )\n                                    tagElmToBeDeleted = isCaretAfterTag;\n\n                                // tagElm.hasAttribute('readonly')\n                                if( sel.anchorNode.nodeType == 3 &&   // node at caret location is a Text node\n                                    !sel.anchorNode.nodeValue    &&   // has some text\n                                    sel.anchorNode.previousElementSibling )  // text node has a Tag node before it\n                                    e.preventDefault()\n\n                                // if backspace not allowed, do nothing\n                                // TODO: a better way to detect if nodes were deleted is to simply check the \"this.value\" before & after\n                                if( (isCaretAfterTag || deleteKeyTagDetected) && !_s.backspace ){\n                                    e.preventDefault()\n                                    return\n                                }\n\n                                if( sel.type != 'Range' && !sel.anchorOffset && sel.anchorNode == this.DOM.input && e.key != 'Delete' ){\n                                    e.preventDefault()\n                                    return\n                                }\n\n                                if( sel.type != 'Range' && tagElmToBeDeleted && tagElmToBeDeleted.hasAttribute('readonly') ){\n                                    // allows the continuation of deletion by placing the caret on the first previous textNode.\n                                    // since a few readonly-tags might be one after the other, iteration is needed:\n\n                                    placeCaretAfterNode( getfirstTextNode(tagElmToBeDeleted) )\n                                    return\n                                }\n\n                                if ( e.key == 'Delete' && isZWS && getSetTagData(sel.anchorNode.nextSibling) ) {\n                                    this.removeTags(sel.anchorNode.nextSibling)\n                                }\n\n                                // update regarding https://github.com/yairEO/tagify/issues/762#issuecomment-786464317:\n                                // the bug described is more severe than the fix below, therefore I disable the fix until a solution\n                                // is found which work well for both cases.\n                                // -------\n                                // nodeType is \"1\" only when the caret is at the end after last tag (no text after), or before first first (no text before)\n                                /*\n                                if( this.isFirefox && sel.anchorNode.nodeType == 1 && sel.anchorOffset != 0 ){\n                                    this.removeTags() // removes last tag by default if no parameter supplied\n                                    // place caret inside last textNode, if exist. it's an annoying bug only in FF,\n                                    // if the last tag is removed, and there is a textNode before it, the caret is not placed at its end\n                                    placeCaretAfterNode( setRangeAtStartEnd(false, this.DOM.input) )\n                                }\n                                */\n\n                                break;\n                            }\n                            // currently commented to allow new lines in mixed-mode\n                            case 'Enter' : {\n                                e.preventDefault(); // solves Chrome bug - http://stackoverflow.com/a/20398191/104380\n\n                                if(this.state.tag) return; // assume a tag has just been added, so no need to create a new line\n                                // https://stackoverflow.com/a/72279112/104380\n                                let selection = window.getSelection();\n                                let range = selection.getRangeAt(0);\n                                range.insertNode(document.createElement('br'));\n                                selection.collapseToEnd();\n                            }\n                        }\n\n                        return true\n                    }\n\n                    var isManualDropdown = _s.dropdown.position == 'manual';\n\n                    switch( e.key ){\n                        case 'Backspace' :\n                            if( _s.mode == 'select' && _s.enforceWhitelist && this.value.length)\n                                this.removeTags()\n\n                            else if( !this.state.dropdown.visible || _s.dropdown.position == 'manual' ){\n                                if( e.target.textContent == \"\" || s.charCodeAt(0) == 8203 ){  // 8203: ZERO WIDTH SPACE unicode\n                                    if( _s.backspace === true )\n                                        this.removeTags()\n                                    else if( _s.backspace == 'edit' )\n                                        setTimeout(this.editTag.bind(this), 0) // timeout reason: when edited tag gets focused and the caret is placed at the end, the last character gets deletec (because of backspace)\n                                }\n                            }\n                            break;\n\n                        case 'Esc' :\n                        case 'Escape' :\n                            if( this.state.dropdown.visible ) return\n                            e.target.blur()\n                            break;\n\n                        case 'Down' :\n                        case 'ArrowDown' :\n                            // if( _s.mode == 'select' ) // issue #333\n                            if( !this.state.dropdown.visible )\n                                this.dropdown.show()\n                            break;\n\n                        case 'ArrowRight' : {\n                            let tagData = this.state.inputSuggestion || this.state.ddItemData\n                            if( tagData && _s.autoComplete.rightKey ){\n                                this.addTags([tagData], true)\n                                return;\n                            }\n                            break\n                        }\n\n                        case 'Tab' : {\n                            const shouldAddTag = _s.addTagOn.includes(e.key.toLowerCase());\n                            if(!shouldAddTag) {\n                                break;\n                            }\n                        }\n\n                        case 'Enter' : {\n                            // manual suggestion boxes are assumed to always be visible\n                            if( this.state.dropdown.visible && !isManualDropdown ) return\n\n                            var thingToAdd = this.state.autoCompleteData || s;\n\n                            // if nothing to add and tab key was pressed, return true (must be before preventDefault)\n                            if(!thingToAdd && e.key === \"Tab\") return true\n\n                            e.preventDefault(); // solves Chrome bug - http://stackoverflow.com/a/20398191/104380\n                            // because the main \"keydown\" event is bound before the dropdown events, this will fire first and will not *yet*\n                            // know if an option was just selected from the dropdown menu. If an option was selected,\n                            // the dropdown events should handle adding the tag\n\n\n\n                            setTimeout(()=>{\n                                if( (!this.state.dropdown.visible || isManualDropdown) && !this.state.actions.selectOption && _s.addTagOn.includes(e.key.toLowerCase()) ) {\n                                    this.addTags([thingToAdd], true)\n                                    this.state.autoCompleteData = null\n                                }\n                            })\n                        }\n                    }\n                })\n                .catch(err => err)\n        },\n\n        onInput(e){\n            this.postUpdate() // toggles \"tagify--empty\" class\n\n            var _s = this.settings;\n\n            if( _s.mode == 'mix' )\n                return this.events.callbacks.onMixTagsInput.call(this, e);\n\n            var value = this.input.normalize.call(this, undefined, {trim: false}),\n                showSuggestions = value.length >= _s.dropdown.enabled,\n                eventData = {value, inputElm:this.DOM.input},\n                validation = this.validateTag({value});\n\n            if( _s.mode == 'select' ) {\n                this.toggleScopeValidation(validation)\n            }\n\n            eventData.isValid = validation;\n\n            // for IE; since IE doesn't have an \"input\" event so \"keyDown\" is used instead to trigger the \"onInput\" callback,\n            // and so many keys do not change the input, and for those do not continue.\n            if( this.state.inputText == value ) return;\n\n            // save the value on the input's State object\n            this.input.set.call(this, value, false); // update the input with the normalized value and run validations\n            // this.setRangeAtStartEnd(false, this.DOM.input); // fix caret position\n\n            // if delimiters detected, add tags\n            if( value.search(_s.delimiters) != -1 ){\n                if( this.addTags( value ) ){\n                    this.input.set.call(this); // clear the input field's value\n                }\n            }\n\n            else if( _s.dropdown.enabled >= 0 ){\n                this.dropdown[showSuggestions ? \"show\" : \"hide\"](value);\n            }\n\n            this.trigger('input', eventData) // \"input\" event must be triggered at this point, before the dropdown is shown\n        },\n\n        onMixTagsInput( e ){\n            var rangeText, match, matchedPatternCount, tag, showSuggestions, selection,\n                _s = this.settings,\n                lastTagsCount = this.value.length,\n                matchFlaggedTag,\n                matchDelimiters,\n                tagsElems = this.getTagElms(),\n                fragment = document.createDocumentFragment(),\n                range = window.getSelection().getRangeAt(0),\n                remainingTagsValues = [].map.call(tagsElems, node => getSetTagData(node).value);\n\n            // Android Chrome \"keydown\" event argument does not report the correct \"key\".\n            // this workaround is needed to manually call \"onKeydown\" method with a synthesized event object\n            if( e.inputType == \"deleteContentBackward\" && isChromeAndroidBrowser() ){\n                this.events.callbacks.onKeydown.call(this, {\n                    target: e.target,\n                    key: \"Backspace\",\n                })\n            }\n\n            // if there's a tag as the first child of the input, always make sure it has a zero-width character before it\n            // or if two tags are next to each-other, add a zero-space width character (For the caret to appear)\n            fixCaretBetweenTags(this.getTagElms())\n\n            // re-add \"readonly\" tags which might have been removed\n            this.value.slice().forEach(item => {\n                if( item.readonly && !remainingTagsValues.includes(item.value) )\n                    fragment.appendChild( this.createTagElem(item) )\n            })\n\n            if( fragment.childNodes.length ){\n                range.insertNode(fragment)\n                this.setRangeAtStartEnd(false, fragment.lastChild)\n            }\n\n            // check if tags were \"magically\" added/removed (browser redo/undo or CTRL-A -> delete)\n            if( tagsElems.length != lastTagsCount ){\n                this.value = [].map.call(this.getTagElms(), node => getSetTagData(node))\n                this.update({ withoutChangeEvent:true })\n                return\n            }\n\n            if( this.hasMaxTags() )\n                return true\n\n            if( window.getSelection ){\n                selection = window.getSelection()\n\n                // only detect tags if selection is inside a textNode (not somehow on already-existing tag)\n                if( selection.rangeCount > 0 && selection.anchorNode.nodeType == 3 ){\n                    range = selection.getRangeAt(0).cloneRange()\n                    range.collapse(true)\n                    range.setStart(selection.focusNode, 0)\n\n                    rangeText = range.toString().slice(0, range.endOffset)  // slice the range so everything AFTER the caret will be trimmed\n                    // split = range.toString().split(_s.mixTagsAllowedAfter)  // [\"foo\", \"bar\", \"@baz\"]\n                    matchedPatternCount = rangeText.split(_s.pattern).length - 1;\n\n                    match = rangeText.match( _s.pattern )\n\n                    if( match )\n                        // tag string, example: \"@aaa ccc\"\n                        tag = rangeText.slice( rangeText.lastIndexOf(match[match.length-1]) )\n\n                    if( tag ){\n                        this.state.actions.ArrowLeft = false // start fresh, assuming the user did not (yet) used any arrow to move the caret\n                        this.state.tag = {\n                            prefix : tag.match(_s.pattern)[0],\n                            value  : tag.replace(_s.pattern, ''), // get rid of the prefix\n                        }\n                        this.state.tag.baseOffset = selection.baseOffset - this.state.tag.value.length\n\n                        matchDelimiters = this.state.tag.value.match(_s.delimiters)\n                        // if a delimeter exists, add the value as tag (exluding the delimiter)\n                        if( matchDelimiters ){\n                            this.state.tag.value = this.state.tag.value.replace(_s.delimiters, '')\n                            this.state.tag.delimiters = matchDelimiters[0]\n                            this.addTags(this.state.tag.value, _s.dropdown.clearOnSelect)\n                            this.dropdown.hide()\n                            return\n                        }\n\n                        showSuggestions = this.state.tag.value.length >= _s.dropdown.enabled\n\n                        // When writing something that might look like a tag (an email address) but isn't one - it is unwanted\n                        // the suggestions dropdown be shown, so the user can close it (in any way), and while continue typing,\n                        // dropdown should stay closed until another tag is typed.\n                        // if( this.state.tag.value.length && this.state.dropdown.visible === false )\n                        //     showSuggestions = false\n\n                        // test for similar flagged tags to the current tag\n\n                        try{\n                            matchFlaggedTag = this.state.flaggedTags[this.state.tag.baseOffset]\n                            matchFlaggedTag = matchFlaggedTag.prefix   == this.state.tag.prefix &&\n                                              matchFlaggedTag.value[0] == this.state.tag.value[0]\n\n                            // reset\n                            if( this.state.flaggedTags[this.state.tag.baseOffset] && !this.state.tag.value )\n                                delete this.state.flaggedTags[this.state.tag.baseOffset];\n                        }\n                        catch(err){}\n\n                        // scenario: (do not show suggestions of another matched tag, if more than one detected)\n                        // (2 tags exist)                          \" a@a.com and @\"\n                        // (second tag is removed by backspace)    \" a@a.com and \"\n                        if( matchFlaggedTag || matchedPatternCount < this.state.mixMode.matchedPatternCount )\n                            showSuggestions = false\n                    }\n                    // no (potential) tag found\n                    else{\n                        this.state.flaggedTags = {}\n                    }\n\n                    this.state.mixMode.matchedPatternCount = matchedPatternCount\n                }\n            }\n\n\n            // wait until the \"this.value\" has been updated (see \"onKeydown\" method for \"mix-mode\")\n            // the dropdown must be shown only after this event has been triggered, so an implementer could\n            // dynamically change the whitelist.\n            setTimeout(()=>{\n                this.update({withoutChangeEvent:true})\n                this.trigger('input', extend({}, this.state.tag, {textContent:this.DOM.input.textContent}))\n\n                if( this.state.tag )\n                    this.dropdown[showSuggestions ? \"show\" : \"hide\"](this.state.tag.value);\n            }, 10)\n        },\n\n        onInputIE(e){\n            var _this = this;\n            // for the \"e.target.textContent\" to be changed, the browser requires a small delay\n            setTimeout(function(){\n                _this.events.callbacks.onInput.call(_this, e)\n            })\n        },\n\n        observeOriginalInputValue(){\n            // if, for some reason, the Tagified element is no longer in the DOM,\n            // call the \"destroy\" method to kill all references to timeouts/intervals\n            if( !this.DOM.originalInput.parentNode ) this.destroy()\n\n            // if original input value changed for some reason (for exmaple a form reset)\n            if( this.DOM.originalInput.value != this.DOM.originalInput.tagifyValue )\n                this.loadOriginalValues()\n        },\n\n        onClickAnywhere(e){\n            if (e.target != this.DOM.scope && !this.DOM.scope.contains(e.target)) {\n                this.toggleFocusClass(false)\n                this.state.hasFocus = false\n\n                let closestTagifyDropdownElem = e.target.closest(this.settings.classNames.dropdownSelector);\n\n                // do not hide the dropdown if a click was initiated within it and that dropdown belongs to this Tagify instance\n                if( closestTagifyDropdownElem?.__tagify != this )\n                    this.dropdown.hide()\n            }\n        },\n\n        onClickScope(e){\n            var _s = this.settings,\n                tagElm = e.target.closest('.' + _s.classNames.tag),\n                isScope = e.target === this.DOM.scope,\n                timeDiffFocus = +new Date() - this.state.hasFocus;\n\n            if( e.target.classList.contains(_s.classNames.tagX) ){\n                this.removeTags( e.target.parentNode )\n                return\n            }\n\n            else if( tagElm && !this.state.editing ){\n                this.trigger(\"click\", { tag:tagElm, index:this.getNodeIndex(tagElm), data:getSetTagData(tagElm), event:e })\n\n                if( _s.editTags === 1 || _s.editTags.clicks === 1 || _s.mode == 'select' )\n                    this.events.callbacks.onDoubleClickScope.call(this, e)\n\n                return\n            }\n\n            // when clicking on the input itself\n            else if( e.target == this.DOM.input ){\n                if( _s.mode == 'mix' ){\n                    // firefox won't show caret if last element is a tag (and not a textNode),\n                    // so an empty textnode should be added\n                    this.fixFirefoxLastTagNoCaret()\n                }\n\n                if( timeDiffFocus > 500 || !_s.focusable ){\n                    if( this.state.dropdown.visible )\n                        this.dropdown.hide()\n                    else if( _s.dropdown.enabled === 0 && _s.mode != 'mix' )\n                        this.dropdown.show(this.value.length ? '' : undefined)\n                    return\n                }\n            }\n\n            if( _s.mode == 'select' && _s.dropdown.enabled === 0 && !this.state.dropdown.visible) {\n                this.events.callbacks.onDoubleClickScope.call(this, {...e, target: this.getTagElms()[0]})\n\n                !_s.userInput && this.dropdown.show()\n            }\n        },\n\n        // special proccess is needed for pasted content in order to \"clean\" it\n        onPaste(e){\n            e.preventDefault()\n\n            var tagsElems,\n                _s = this.settings;\n\n            if( !_s.userInput ){\n                return false;\n            }\n\n            var clipboardData, pastedText;\n\n            if( _s.readonly ) return\n\n            // Get pasted data via clipboard API\n            clipboardData = e.clipboardData || window.clipboardData\n            pastedText = clipboardData.getData('Text')\n\n            _s.hooks.beforePaste(e, {tagify:this, pastedText, clipboardData})\n                .then(result => {\n                    if( result === undefined )\n                        result = pastedText;\n\n            if( result ){\n                if( this.settings.mode == 'mix' ){\n                    // Auto-convert pasted pattern-prefixed text to tags if pasteAsTags is enabled\n                    if( this.settings.pasteAsTags ){\n                        const interpolatedText = this.convertPastedTextToMixTags(result)\n                        const fragment = this.parseMixTags(interpolatedText, { skipDOM: true })\n                        const tagsData = fragment.__tagifyTagsData || []\n\n                        // Inject the fragment (contains text nodes + tag elements)\n                        this.injectAtCaret(fragment, window.getSelection().getRangeAt(0))\n\n                        // Update internal state with new tags\n                        // Note: duplicates are already filtered out by parseMixTags based on settings\n                        tagsData.forEach(tagData => this.value.push(tagData))\n\n                        // Get the newly added tag elements and set their data\n                        const addedTags = this.getTagElms().slice(-tagsData.length)\n                        addedTags.forEach((elm, idx) => getSetTagData(elm, tagsData[idx]))\n\n                        this.update()\n                        fixCaretBetweenTags(addedTags)\n                    }\n                    else {\n                        this.injectAtCaret(result, window.getSelection().getRangeAt(0))\n                    }\n\n                    this.events.callbacks.onMixTagsInput.call(this, e);\n                }\n\n                else {\n                    this.injectAtCaret(result, window.getSelection().getRangeAt(0))\n\n                    if( this.settings.pasteAsTags ){\n                        tagsElems = this.addTags(this.state.inputText + result, true)\n                    }\n                    else {\n                        this.state.inputText = result\n                        this.dropdown.show(result)\n                    }\n                }\n            }\n\n                    this.trigger('paste', {event: e, pastedText, clipboardData, tagsElems})\n                })\n                .catch(err => err)\n        },\n\n        onDrop(e){\n            e.preventDefault()\n        },\n\n        onEditTagInput( editableElm, e ){\n            var tagElm = editableElm.closest('.' + this.settings.classNames.tag),\n                tagElmIdx = this.getNodeIndex(tagElm),\n                tagData = getSetTagData(tagElm),\n                textValue = this.input.normalize.call(this, editableElm),\n                dataForChangedProp = {[this.settings.tagTextProp]: textValue, __tagId: tagData.__tagId}, // \"__tagId\" is needed so validation will skip current tag when checking for dups\n                isValid = this.validateTag(dataForChangedProp), // the value could have been invalid in the first-place so make sure to re-validate it (via \"addEmptyTag\" method)\n                hasChanged = this.editTagChangeDetected(extend(tagData, dataForChangedProp));\n\n            // if the value is same as before-editing and the tag was valid before as well, ignore the  current \"isValid\" result, which is false-positive\n            if( !hasChanged && editableElm.originalIsValid === true )\n                isValid = true\n\n            tagElm.classList.toggle(this.settings.classNames.tagInvalid, isValid !== true)\n            tagData.__isValid = isValid\n\n            tagElm.title = isValid === true\n                ? tagData.title || tagData.value\n                : isValid // change the tag's title to indicate why is the tag invalid (if it's so)\n\n            // show dropdown if typed text is equal or more than the \"enabled\" dropdown setting\n            if( textValue.length >= this.settings.dropdown.enabled ){\n                // this check is needed apparently because doing browser \"undo\" will fire\n                //  \"onEditTagInput\" but \"this.state.editing\" will be \"false\"\n                if( this.state.editing )\n                    this.state.editing.value = textValue\n                this.dropdown.show(textValue)\n            }\n\n            this.trigger(\"edit:input\", {\n                tag  : tagElm,\n                index: tagElmIdx,\n                data : extend({}, this.value[tagElmIdx], {newValue:textValue}),\n                event: e\n            })\n        },\n\n        onEditTagPaste( tagElm, e ){\n            // Get pasted data via clipboard API\n            var clipboardData = e.clipboardData || window.clipboardData,\n                pastedText = clipboardData.getData('Text');\n\n            e.preventDefault()\n\n            var newNode = injectAtCaret(pastedText)\n            this.setRangeAtStartEnd(false, newNode)\n        },\n\n        onEditTagClick( tagElm, e) {\n            this.events.callbacks.onClickScope.call(this, e)\n        },\n\n        onEditTagFocus( tagElm ){\n            this.state.editing = {\n                scope: tagElm,\n                input: tagElm.querySelector(\"[contenteditable]\")\n            }\n        },\n\n        onEditTagBlur( editableElm, e ){\n            // if \"relatedTarget\" is the tag then do not continue as this should not be considered a \"blur\" event\n            var isRelatedTargetNodeTag = isNodeTag.call(this, e.relatedTarget)\n\n            // in \"select-mode\" when editing the tag's template to include more nodes other than the editable \"span\",\n            // clicking those elements should not be considered a blur event\n            if( this.settings.mode == 'select' && isRelatedTargetNodeTag && e.relatedTarget.contains(e.target) ) {\n                this.dropdown.hide()\n                return\n            }\n\n            // if \"ESC\" key was pressed then the \"editing\" state should be `false` and if so, logic should not continue\n            // because \"ESC\" reverts the edited tag back to how it was (replace the node) before editing\n            if( !this.state.editing )\n                return;\n\n            if( !this.state.hasFocus )\n                this.toggleFocusClass()\n\n            if(!this.DOM.scope.contains(document.activeElement)) {\n                this.trigger(\"blur\", {})\n            }\n\n            // one scenario is when selecting a suggestion from the dropdown, when editing, and by selecting it\n            // the \"onEditTagDone\" is called directly, already replacing the tag, so the argument \"editableElm\"\n            // node isn't in the DOM anynmore because it has been replaced.\n            if( !this.DOM.scope.contains(editableElm) ) return;\n\n            var _s           = this.settings,\n                tagElm       = editableElm.closest('.' + _s.classNames.tag),\n                tagData      = getSetTagData(tagElm),\n                textValue    = this.input.normalize.call(this, editableElm),\n                dataForChangedProp = {[_s.tagTextProp]: textValue, __tagId: tagData.__tagId}, // \"__tagId\" is needed so validation will skip current tag when checking for dups\n                originalData = tagData.__originalData, // pre-edit data\n                hasChanged   = this.editTagChangeDetected(extend(tagData, dataForChangedProp)),\n                isValid      = this.validateTag(dataForChangedProp), // \"__tagId\" is needed so validation will skip current tag when checking for dups\n                hasMaxTags,\n                newTagData;\n\n            if( !textValue ){\n                this.onEditTagDone(tagElm)\n                return\n            }\n\n            // if nothing changed revert back to how it was before editing\n            if( !hasChanged ){\n                this.onEditTagDone(tagElm, originalData)\n                return\n            }\n\n            // need to know this because if \"keepInvalidTags\" setting is \"true\" and an invalid tag is edited as a valid one,\n            // but the maximum number of tags have alreay been reached, so it should not allow saving the new valid value.\n            // only if the tag was already valid before editing, ignore this check (see a few lines below)\n            hasMaxTags = this.hasMaxTags()\n\n            newTagData = extend(\n                {},\n                originalData,\n                {\n                    [_s.tagTextProp]: this.trim(textValue),\n                    __isValid: isValid\n                }\n            )\n\n            // pass through optional transformer defined in settings\n            _s.transformTag.call(this, newTagData, originalData)\n\n            // MUST re-validate after tag transformation\n            // only validate the \"tagTextProp\" because is the only thing that metters for validating an edited tag.\n            // -- Scenarios: --\n            // 1. max 3 tags allowd. there are 4 tags, one has invalid input and is edited to a valid one, and now should be marked as \"not allowed\" because limit of tags has reached\n            // 2. max 3 tags allowed. there are 3 tags, one is edited, and so max-tags vaildation should be OK\n            isValid = (!hasMaxTags || originalData.__isValid === true) && this.validateTag(newTagData)\n\n            if( isValid !== true ){\n                this.trigger(\"invalid\", { data:newTagData, tag:tagElm, message:isValid })\n\n                // do nothing if invalid, stay in edit-mode until corrected or reverted by presssing esc\n                if( _s.editTags.keepInvalid ) return\n\n                if( _s.keepInvalidTags )\n                    newTagData.__isValid = isValid\n                else\n                    // revert back if not specified to keep\n                    newTagData = originalData\n            }\n\n            else if( _s.keepInvalidTags ){\n                // cleaup any previous leftovers if the tag was invalid\n                delete newTagData.title\n                delete newTagData[\"aria-invalid\"]\n                delete newTagData.class\n            }\n\n            // tagElm.classList.toggle(_s.classNames.tagInvalid, true)\n\n            this.onEditTagDone(tagElm, newTagData)\n        },\n\n        onEditTagkeydown(e, tagElm){\n            // ignore keys during IME composition\n            if( this.state.composing )\n                return\n\n            this.trigger(\"edit:keydown\", {event:e})\n\n            switch( e.key ){\n                case 'Esc' :\n                case 'Escape' : {\n                    this.state.editing = false\n                    var hasValueToRevertTo = !!tagElm.__tagifyTagData.__originalData.value\n\n                    if( hasValueToRevertTo )\n                        // revert the tag to how it was before editing\n                        // replace current tag with original one (pre-edited one)\n                        tagElm.parentNode.replaceChild(tagElm.__tagifyTagData.__originalHTML, tagElm)\n                    else\n                        tagElm.remove()\n\n                    break\n                }\n                case 'Enter' :\n                case 'Tab' : {\n                    e.preventDefault()\n\n                    var EDITED_TAG_BLUR_DELAY = 0;\n\n                    // a setTimeout is used so when editing (in \"select\" mode) while the dropdown is shown and a suggestion is highlighted\n                    // and ENTER key is pressed down - the `dropdown.hide` method won't be invoked immediately and unbind the dropdown's\n                    // KEYDOWN \"ENTER\" before it has time to call the handler and select the suggestion.\n                    setTimeout(() => e.target.blur(), EDITED_TAG_BLUR_DELAY)\n                }\n            }\n        },\n\n        onDoubleClickScope(e){\n            var tagElm = e.target.closest('.' + this.settings.classNames.tag);\n\n            if( !tagElm ) return\n\n            var tagData = getSetTagData(tagElm),\n                _s = this.settings,\n                isEditingTag,\n                isReadyOnlyTag;\n\n            if( tagData?.editable === false ) return\n\n            isEditingTag = tagElm.classList.contains(this.settings.classNames.tagEditing)\n            isReadyOnlyTag = tagElm.hasAttribute('readonly')\n\n            if( !_s.readonly && !isEditingTag && !isReadyOnlyTag && this.settings.editTags && _s.userInput ) {\n                this.events.callbacks.onEditTagFocus.call(this, tagElm)\n                this.editTag(tagElm)\n            }\n\n            this.toggleFocusClass(true)\n\n            if( _s.mode != 'select' )\n                this.trigger('dblclick', { tag:tagElm, index:this.getNodeIndex(tagElm), data:getSetTagData(tagElm) })\n        },\n\n        /**\n         *\n         * @param {Object} m an object representing the observed DOM changes\n         */\n        onInputDOMChange(m){\n            // get the last child BEFORE processing mutations\n            var lastInputChild = this.DOM.input.lastChild;\n\n            // iterate all DOM mutation\n            m.forEach(record => {\n                // only the ADDED nodes\n                record.addedNodes.forEach(addedNode => {\n                    // fix chrome's placing '<div><br></div>' everytime ENTER key is pressed, and replace with just `<br'\n                    if( addedNode.outerHTML == '<div><br></div>' ){\n                        addedNode.replaceWith(document.createElement('br'))\n                    }\n\n                    // if the added element is a div containing a tag within it (chrome does this when pressing ENTER before a tag)\n                    else if( addedNode.nodeType == 1 && addedNode.querySelector(this.settings.classNames.tagSelector) ){\n                        let newlineText = document.createTextNode('')\n\n                        if( addedNode.childNodes[0].nodeType == 3 && addedNode.previousSibling.nodeName != 'BR' )\n                            newlineText  = document.createTextNode('\\n')\n\n                        // unwrap the useless div\n                        // chrome adds a BR at the end which should be removed\n                        addedNode.replaceWith(...[newlineText, ...[...addedNode.childNodes].slice(0,-1)])\n                        placeCaretAfterNode(newlineText)\n                    }\n\n                    // if this is a tag\n                    else if( isNodeTag.call(this, addedNode) ){\n                        if( addedNode.previousSibling?.nodeType == 3 && !addedNode.previousSibling.textContent )\n                            addedNode.previousSibling.remove()\n\n                        // and it is the first node in a new line\n                        if( addedNode.previousSibling && addedNode.previousSibling.nodeName == 'BR' ){\n                            // allows placing the caret just before the tag, when the tag is the first node in that line\n                            addedNode.previousSibling.replaceWith('\\n' + ZERO_WIDTH_CHAR)\n\n                            let nextNode = addedNode.nextSibling, anythingAfterNode = '';\n\n                            while (nextNode) {\n                                anythingAfterNode += nextNode.textContent\n                                nextNode = nextNode.nextSibling;\n                            }\n\n                            // when hitting ENTER for new line just before an existing tag, but skip below logic when a tag has been addded\n                            anythingAfterNode.trim() && placeCaretAfterNode(addedNode.previousSibling)\n                        }\n\n                        // if previous sibling does not exists (meanning the addedNode is the first node in this.DOM.input)\n                        // or, if the previous sibling is also a tag, add a zero-space character before (to allow showing the caret in Chrome)\n                        else if( !addedNode.previousSibling || getSetTagData(addedNode.previousSibling) ){\n                            addedNode.before(ZERO_WIDTH_CHAR)\n                        }\n                    }\n                })\n\n                record.removedNodes.forEach(removedNode => {\n                    // when trying to delete a tag which is in a new line and there's nothing else there (caret is after the tag)\n                    if( removedNode && removedNode.nodeName == 'BR' && isNodeTag.call(this, lastInputChild)){\n                        this.removeTags(lastInputChild)\n                        this.fixFirefoxLastTagNoCaret()\n                    }\n                })\n            })\n\n            // get the last child only after the above DOM modifications\n            // check these scenarios:\n            // 1. after a single line, press ENTER once - should add only 1 BR\n            // 2. presss ENTER right before a tag\n            // 3. press enter within a text node before a tag\n\n\n            if( lastInputChild && lastInputChild.nodeValue == '' )\n                lastInputChild.remove()\n\n            // make sure the last element is always a BR\n            if( !lastInputChild || lastInputChild.nodeName != 'BR' ){\n                this.DOM.input.appendChild(document.createElement('br'))\n            }\n        },\n    }\n}\n\n", "import { sameStr, removeCollectionProp, omit, isObject, parseHTML, removeTextChildNodes, escapeHTML, extend, concatWithoutDups, getUID, isNodeTag, injectAtCaret, placeCaretAfterNode, getSetTagData, fixCaretBetweenTags, logger } from './parts/helpers'\nimport DEFAULTS from './parts/defaults'\nimport _dropdown, { initDropdown } from './parts/dropdown'\nimport { getPersistedData, setPersistedData, clearPersistedData } from './parts/persist'\nimport TEXTS from './parts/texts'\nimport templates from './parts/templates'\nimport EventDispatcher from './parts/EventDispatcher'\nimport events, { triggerChangeEvent } from './parts/events'\nimport { UPDATE_DELAY } from './parts/constants'\n\n/**\n * @constructor\n * @param {Object} input    DOM element\n * @param {Object} settings settings object\n */\nfunction Tagify( input, settings ){\n    if( !input ){\n        logger.warn('input element not found', input)\n        // return an empty mock of all methods, so the code using tagify will not break\n        // because it might be calling methods even though the input element does not exist\n        const mockInstance = new Proxy(this, { get(){ return () => mockInstance } })\n        return mockInstance\n    }\n\n    if( input.__tagify ){\n        logger.warn('input element is already Tagified - Same instance is returned.', input)\n        return input.__tagify\n    }\n\n    extend(this, EventDispatcher(this))\n    this.isFirefox = (/firefox|fxios/i).test(navigator.userAgent) && !(/seamonkey/i).test(navigator.userAgent)\n    this.isIE = window.document.documentMode; // https://developer.mozilla.org/en-US/docs/Web/API/Document/compatMode#Browser_compatibility\n\n    settings = settings || {};\n    this.getPersistedData = getPersistedData(settings.id)\n    this.setPersistedData = setPersistedData(settings.id)\n    this.clearPersistedData = clearPersistedData(settings.id)\n    this.applySettings(input, settings)\n\n    this.state = {\n        inputText: '',\n        editing : false,\n        composing: false,\n        actions : {},   // UI actions for state-locking\n        mixMode : {},\n        dropdown: {},\n        flaggedTags: {} // in mix-mode, when a string is detetced as potential tag, and the user has chocen to close the suggestions dropdown, keep the record of the tasg here\n    }\n\n    this.value = [] // tags' data\n\n    // events' callbacks references will be stores here, so events could be unbinded\n    this.listeners = {}\n\n    this.DOM = {} // Store all relevant DOM elements in an Object\n\n    this.build(input)\n    initDropdown.call(this)\n\n    this.getCSSVars()\n    this.loadOriginalValues()\n\n    this.events.customBinding.call(this)\n    this.events.binding.call(this)\n    input.autofocus && this.DOM.input.focus()\n    input.__tagify = this\n}\n\nTagify.prototype = {\n    _dropdown,\n    placeCaretAfterNode,\n    getSetTagData,\n    helpers: {sameStr, removeCollectionProp, omit, isObject, parseHTML, escapeHTML, extend, concatWithoutDups, getUID, isNodeTag},\n\n    customEventsList : ['change', 'add', 'remove', 'invalid', 'input', 'paste', 'click', 'keydown', 'focus', 'blur', 'edit:input', 'edit:beforeUpdate', 'edit:updated', 'edit:start', 'edit:keydown', 'dropdown:show', 'dropdown:hide', 'dropdown:select', 'dropdown:updated', 'dropdown:noMatch', 'dropdown:scroll'],\n    dataProps: ['__isValid', '__removed', '__originalData', '__originalHTML', '__tagId'], // internal-uasge props\n\n    trim(text){\n        return this.settings.trim && text && typeof text == \"string\" ? text.trim() : text\n    },\n\n    // expose this handy utility function\n    parseHTML,\n\n    templates,\n\n    parseTemplate(template, data){\n        template = this.settings.templates[template] || template;\n        return parseHTML( template.apply(this, data) )\n    },\n\n    set whitelist( arr ){\n        const isArray = arr && Array.isArray(arr)\n        this.settings.whitelist = isArray ? arr : []\n        this.setPersistedData(isArray ? arr : [], 'whitelist')\n    },\n\n    get whitelist(){\n        return this.settings.whitelist\n    },\n\n    set userInput( state ){\n        this.settings.userInput = !!state\n        this.setContentEditable(!!state)\n    },\n\n    get userInput(){\n        return this.settings.userInput\n    },\n\n    generateClassSelectors(classNames){\n        for( let name in classNames ) {\n            let currentName = name;\n            Object.defineProperty(classNames, currentName + \"Selector\" , {\n                get(){ return \".\" + this[currentName].split(\" \")[0] }\n            })\n        }\n    },\n\n    applySettings( input, settings ){\n        DEFAULTS.templates = this.templates\n\n        var mixModeDefaults = {\n            pasteAsTags: false,\n            dropdown: {\n                position: \"text\"\n            }\n        }\n\n        var mergedDefaults = extend({}, DEFAULTS, (settings.mode == 'mix' ? mixModeDefaults : {}));\n        var _s = this.settings = extend({}, mergedDefaults, settings)\n\n        _s.disabled = input.hasAttribute('disabled')\n        _s.readonly = _s.readonly || input.hasAttribute('readonly')\n        _s.placeholder = escapeHTML(input.getAttribute('placeholder') || _s.placeholder || \"\")\n        _s.required = input.hasAttribute('required')\n\n        this.generateClassSelectors(_s.classNames)\n\n        if( this.isIE )\n            _s.autoComplete = false; // IE goes crazy if this isn't false\n\n        [\"whitelist\", \"blacklist\"].forEach(name => {\n            var attrVal = input.getAttribute('data-' + name)\n            if( attrVal ){\n                attrVal = attrVal.split(_s.delimiters)\n                if( attrVal instanceof Array )\n                    _s[name] = attrVal\n            }\n        })\n\n        // backward-compatibility for old version of \"autoComplete\" setting:\n        if( \"autoComplete\" in settings && !isObject(settings.autoComplete) ){\n            _s.autoComplete = DEFAULTS.autoComplete\n            _s.autoComplete.enabled = settings.autoComplete\n        }\n\n        if( _s.mode == 'mix' ){\n            _s.pattern = _s.pattern || /@/;\n            _s.autoComplete.rightKey = true\n            _s.delimiters = settings.delimiters || null // default dlimiters in mix-mode must be NULL\n\n            // needed for \"filterListItems\". This assumes the user might have forgotten to manually\n            // define the same term in \"dropdown.searchKeys\" as defined in \"tagTextProp\" setting, so\n            // by automatically adding it, tagify is \"helping\" out, guessing the intesntions of the developer.\n            if( _s.tagTextProp && !_s.dropdown.searchKeys.includes(_s.tagTextProp) )\n                _s.dropdown.searchKeys.push(_s.tagTextProp)\n        }\n\n        if( input.pattern )\n            try { _s.pattern = new RegExp(input.pattern)  }\n            catch(e){}\n\n        // Convert the \"delimiters\" setting into a REGEX object\n        if( _s.delimiters ){\n            _s._delimiters = _s.delimiters;\n            try { _s.delimiters = new RegExp(this.settings.delimiters, \"g\") }\n            catch(e){}\n        }\n\n        if( _s.disabled || _s.readonly )\n            _s.userInput = false;\n\n        this.TEXTS = {...TEXTS, ...(_s.texts || {})}\n\n        // it makes sense to enable \"includeSelectedTags\" in \"select-mode\"\n        if( _s.mode == 'select' ){\n            _s.dropdown.includeSelectedTags = true\n        }\n\n        // make sure the dropdown will be shown on \"focus\" and not only after typing something (in \"select\" mode)\n        if( (_s.mode == 'select' && !settings.dropdown?.enabled) || !_s.userInput ){\n            _s.dropdown.enabled = 0\n        }\n\n        // additional override\n        if( _s.disabled ) {\n            _s.dropdown.enabled = false;\n        }\n\n        _s.dropdown.appendTarget = settings.dropdown?.appendTarget || document.body;\n\n        if ( _s.dropdown.includeSelectedTags === undefined )\n            _s.dropdown.includeSelectedTags = _s.duplicates;\n\n        // get & merge persisted data with current data\n        let persistedWhitelist = this.getPersistedData('whitelist');\n\n        if( Array.isArray(persistedWhitelist))\n            this.whitelist = Array.isArray(_s.whitelist)\n                ? concatWithoutDups(_s.whitelist, persistedWhitelist)\n                : persistedWhitelist;\n    },\n\n    /**\n     * Returns a string of HTML element attributes\n     * @param {Object} data [Tag data]\n     */\n    getAttributes( data ){\n        var attrs = this.getCustomAttributes(data), s = '', k;\n\n        for( k in attrs )\n            s += \" \" + k + (data[k] !== undefined ? `=\"${attrs[k]}\"` : \"\");\n\n        return s;\n    },\n\n    /**\n     * Returns an object of attributes to be used for the templates\n     */\n    getCustomAttributes( data ){\n        // only items which are objects have properties which can be used as attributes\n        if( !isObject(data) )\n            return '';\n\n        var output = {}, propName;\n\n        for( propName in data ){\n            if( propName.slice(0,2) != '__' && propName != 'class' && data.hasOwnProperty(propName) && data[propName] !== undefined )\n                output[propName] = escapeHTML(data[propName])\n        }\n        return output\n    },\n\n    setStateSelection(){\n        var selection = window.getSelection()\n\n        // save last selection place to be able to inject anything from outside to that specific place\n        var sel = {\n            anchorOffset: selection.anchorOffset,\n            anchorNode  : selection.anchorNode,\n            range       : selection.getRangeAt && selection.rangeCount && selection.getRangeAt(0)\n        }\n\n        this.state.selection = sel\n        return sel\n    },\n\n    /**\n     * Get specific CSS variables which are relevant to this script and parse them as needed.\n     * The result is saved on the instance in \"this.CSSVars\"\n     */\n    getCSSVars(){\n        var compStyle = getComputedStyle(this.DOM.scope, null)\n\n        const getProp = name => compStyle.getPropertyValue('--'+name)\n\n        function seprateUnitFromValue(a){\n            if( !a ) return {}\n            a = a.trim().split(' ')[0]\n            var unit  = a.split(/\\d+/g).filter(n=>n).pop().trim(),\n                value = +a.split(unit).filter(n=>n)[0].trim()\n            return {value, unit}\n        }\n\n        this.CSSVars = {\n            tagHideTransition: (({value, unit}) => unit=='s' ? value * 1000 : value)(seprateUnitFromValue(getProp('tag-hide-transition')))\n        }\n    },\n\n    /**\n     * builds the HTML of this component\n     * @param  {Object} input [DOM element which would be \"transformed\" into \"Tags\"]\n     */\n    build( input ){\n        var DOM  = this.DOM,\n            labelWrapper = input.closest('label');\n\n        if( this.settings.mixMode.integrated ){\n            DOM.originalInput = null;\n            DOM.scope = input;\n            DOM.input = input;\n        }\n\n        else {\n            DOM.originalInput = input\n            DOM.originalInput_tabIndex = input.tabIndex\n            DOM.scope = this.parseTemplate('wrapper', [input, this.settings])\n            DOM.input = DOM.scope.querySelector(this.settings.classNames.inputSelector)\n            input.parentNode.insertBefore(DOM.scope, input)\n            input.tabIndex = -1; // do not allow focus or typing directly, once tagified\n        }\n\n        // fixes tagify nested inside a <label> tag from getting focus when clicked on\n        if( labelWrapper )\n            labelWrapper.setAttribute('for', '')\n    },\n\n    /**\n     * revert any changes made by this component\n     */\n    destroy(){\n        this.events.unbindGlobal.call(this)\n        this.DOM.scope.parentNode?.removeChild(this.DOM.scope)\n        this.DOM.originalInput.tabIndex = this.DOM.originalInput_tabIndex\n        delete this.DOM.originalInput.__tagify\n        this.dropdown.hide(true)\n        this.removeAllCustomListeners()\n        clearTimeout(this.dropdownHide__bindEventsTimeout)\n        clearInterval(this.listeners?.main?.originalInputValueObserverInterval)\n    },\n\n    /**\n     * if the original input has any values, add them as tags\n     */\n    loadOriginalValues( value ){\n        var lastChild,\n            _s = this.settings\n\n        // temporarily block firing the \"change\" event on the original input until\n        // this method finish removing current value and adding a new one\n        this.state.blockChangeEvent = true\n\n        if( value === undefined ){\n            const persistedOriginalValue = this.getPersistedData('value')\n\n            // if the field already has a field, trust its the desired\n            // one to be rendered and do not use the persisted one\n            if( persistedOriginalValue && !this.DOM.originalInput.value )\n                value = persistedOriginalValue\n            else\n                value = _s.mixMode.integrated ? this.DOM.input.textContent : this.DOM.originalInput.value\n        }\n\n        this.removeAllTags()\n\n        if( value ){\n            if( _s.mode == 'mix' ){\n                this.parseMixTags(value)\n\n                lastChild = this.DOM.input.lastChild\n\n                // fixes a Chrome bug, when the last node in `mix-mode` is a tag, the caret appears at the far-top-top, outside the field\n                if( !lastChild || lastChild.tagName != 'BR' )\n                    this.DOM.input.insertAdjacentHTML('beforeend', '<br>')\n            }\n\n            else{\n                try{\n                    if( JSON.parse(value) instanceof Array )\n                        value = JSON.parse(value)\n                }\n                catch(err){}\n                this.addTags(value, true).forEach(tag => tag && tag.classList.add(_s.classNames.tagNoAnimation))\n            }\n        }\n\n        else\n            this.postUpdate()\n\n        this.state.lastOriginalValueReported = _s.mixMode.integrated ? '' : this.DOM.originalInput.value\n    },\n\n    cloneEvent(e){\n        var clonedEvent = {}\n        for( var v in e )\n            if( v != 'path' )\n                clonedEvent[v] = e[v]\n        return clonedEvent\n    },\n\n    /**\n     * Toogle global loading state on/off\n     * Useful when fetching async whitelist while user is typing\n     * @param {Boolean} isLoading\n     */\n    loading( isLoading ){\n        this.state.isLoading = isLoading\n        // IE11 doesn't support toggle with second parameter\n        this.DOM.scope.classList[isLoading ? \"add\" : \"remove\"](this.settings.classNames.scopeLoading)\n        return this\n    },\n\n    /**\n     * Toogle a tag loading state on/off\n     * @param {Boolean} isLoading\n     */\n    tagLoading( tagElm, isLoading ){\n        if( tagElm )\n            // IE11 doesn't support toggle with second parameter\n            tagElm.classList[isLoading ? \"add\" : \"remove\"](this.settings.classNames.tagLoading)\n        return this\n    },\n\n    /**\n     * Toggles class on the main tagify container (\"scope\")\n     * @param {String} className\n     * @param {Boolean} force\n     */\n    toggleClass( className, force ){\n        if( typeof className == 'string' )\n            this.DOM.scope.classList.toggle(className, force)\n    },\n\n    toggleScopeValidation( validation ){\n        var isValid = validation === true || validation === undefined; // initially it is undefined\n\n        if( !this.settings.required && validation && validation === this.TEXTS.empty)\n            isValid = true\n\n        this.toggleClass(this.settings.classNames.tagInvalid, !isValid)\n        this.DOM.scope.title = isValid ? '' : validation\n    },\n\n    toggleFocusClass( force ){\n        this.toggleClass(this.settings.classNames.focus, !!force)\n    },\n\n    /**\n     * Sets the templates placeholder after initialization\n     * @param {String} str\n     */\n    setPlaceholder(str) {\n        ['data', 'aria'].forEach(p => this.DOM.input.setAttribute(`${p}-placeholder`, str))\n    },\n\n    triggerChangeEvent,\n\n    events,\n\n    fixFirefoxLastTagNoCaret(){\n        return // seems to be fixed in newer version of FF, so retiring below code (for now)\n        // var inputElm = this.DOM.input\n\n        // if( this.isFirefox && inputElm.childNodes.length && inputElm.lastChild.nodeType == 1 ){\n        //     inputElm.appendChild(document.createTextNode(\"\\u200b\"))\n        //     this.setRangeAtStartEnd(true, inputElm)\n        //     return true\n        // }\n    },\n\n    /** https://stackoverflow.com/a/59156872/104380\n     * @param {Boolean} start indicating where to place it (start or end of the node)\n     * @param {Object}  node  DOM node to place the caret at\n     */\n    setRangeAtStartEnd( start, node ){\n        if( !node ) return;\n\n        start = typeof start == 'number' ? start : !!start\n        node = node.lastChild || node;\n        var sel = document.getSelection()\n\n        // do not force caret placement if the current selection (focus) is on another element (not this tagify instance)\n        if( sel.focusNode instanceof Element && !this.DOM.input.contains(sel.focusNode) ) {\n            return true\n        }\n\n        try{\n            if( sel.rangeCount >= 1 ){\n                ['Start', 'End'].forEach(pos =>\n                    sel.getRangeAt(0)[\"set\" + pos](node, start ? start : node.length)\n                )\n            }\n        } catch(err){\n            console.warn(err)\n        }\n    },\n\n    insertAfterTag( tagElm, newNode ){\n        newNode = newNode || this.settings.mixMode.insertAfterTag;\n\n        if( !tagElm || !tagElm.parentNode || !newNode ) return\n\n        newNode = typeof newNode == 'string'\n            ? document.createTextNode(newNode)\n            : newNode\n\n        tagElm.parentNode.insertBefore(newNode, tagElm.nextSibling)\n        return newNode\n    },\n\n    // compares all \"__originalData\" property values with the current \"tagData\" properties\n    // and returns \"true\" if something changed.\n    editTagChangeDetected(tagData) {\n        var originalData = tagData.__originalData;\n\n        for( var prop in originalData )\n            if( !this.dataProps.includes(prop) && tagData[prop] != originalData[prop] )\n                return true\n\n        return false; // not changed\n    },\n\n    // returns the node which has the actual tag's content\n    getTagTextNode(tagElm){\n        return tagElm.querySelector(this.settings.classNames.tagTextSelector)\n    },\n\n    // sets the text of a tag\n    setTagTextNode(tagElm, HTML){\n        this.getTagTextNode(tagElm).innerHTML = escapeHTML(HTML)\n    },\n\n    /**\n     * Enters a tag into \"edit\" mode\n     * @param {Node} tagElm the tag element to edit. if nothing specified, use last last\n     */\n    editTag( tagElm, opts ){\n        tagElm = tagElm || this.getLastTag()\n        opts = opts || {}\n\n        var _s = this.settings,\n            editableElm = this.getTagTextNode(tagElm),\n            tagIdx = this.getNodeIndex(tagElm),\n            tagData = getSetTagData(tagElm),\n            _CB = this.events.callbacks,\n            isValid = true,\n            isSelectMode = _s.mode == 'select'\n\n        // select mode is a bit different as clicking the tagify's content once will get into edit-mode if a value\n        // is already selected, and there cannot be a dropdown already open at this point.\n        !isSelectMode && this.dropdown.hide()\n\n        if( !editableElm ){\n            logger.warn('Cannot find element in Tag template: .', _s.classNames.tagTextSelector);\n            return;\n        }\n\n        if( tagData instanceof Object && \"editable\" in tagData && !tagData.editable )\n            return\n\n        // cache the original data, on the DOM node, before any modification ocurs, for possible revert\n        tagData = getSetTagData(tagElm, {\n            __originalData: extend({}, tagData),\n            __originalHTML: tagElm.cloneNode(true)\n        })\n        // re-set the tagify custom-prop on the clones element (because cloning removed it)\n        getSetTagData(tagData.__originalHTML, tagData.__originalData)\n\n        editableElm.setAttribute('contenteditable', true)\n        tagElm.classList.add( _s.classNames.tagEditing )\n\n        // because \"editTag\" method can be called manually, make sure that \"state.editing\" is set correctly\n        this.events.callbacks.onEditTagFocus.call(this, tagElm)\n\n        editableElm.addEventListener('click'            , _CB.onEditTagClick.bind(this, tagElm))\n        editableElm.addEventListener('blur'             , _CB.onEditTagBlur.bind(this, this.getTagTextNode(tagElm)))\n        editableElm.addEventListener('input'            , _CB.onEditTagInput.bind(this, editableElm))\n        editableElm.addEventListener('paste'            , _CB.onEditTagPaste.bind(this, editableElm))\n        editableElm.addEventListener('keydown'          , e => _CB.onEditTagkeydown.call(this, e, tagElm))\n        editableElm.addEventListener('compositionstart' , _CB.onCompositionStart.bind(this))\n        editableElm.addEventListener('compositionend'   , _CB.onCompositionEnd.bind(this))\n\n        if( !opts.skipValidation )\n            isValid = this.editTagToggleValidity(tagElm)\n\n        editableElm.originalIsValid = isValid\n\n        this.trigger(\"edit:start\", { tag:tagElm, index:tagIdx, data:tagData, isValid })\n\n        editableElm.focus()\n        !isSelectMode && this.setRangeAtStartEnd(false, editableElm) // place the caret at the END of the editable tag text\n\n        _s.dropdown.enabled === 0 && !isSelectMode && this.dropdown.show()\n        this.state.hasFocus = true\n\n        return this\n    },\n\n    /**\n     * If a tag is invalid, for any reason, set its class to \"not allowed\" (see defaults file)\n     * @param {Node} tagElm required\n     * @param {Object} tagData optional\n     * @returns true if valid, a string (reason) if not\n     */\n    editTagToggleValidity( tagElm, tagData ){\n        var tagData = tagData || getSetTagData(tagElm),\n            isValid;\n\n        if( !tagData ){\n            logger.warn(\"tag has no data: \", tagElm, tagData)\n            return;\n        }\n\n        isValid = !(\"__isValid\" in tagData) || tagData.__isValid === true\n\n        if( !isValid ){\n            this.removeTagsFromValue(tagElm)\n        }\n\n        this.update()\n\n        //this.validateTag(tagData);\n\n        tagElm.classList.toggle(this.settings.classNames.tagNotAllowed, !isValid)\n        tagData.__isValid = isValid;\n\n        return tagData.__isValid\n    },\n\n    onEditTagDone(tagElm, tagData){\n        tagElm = tagElm || this.state.editing.scope\n        tagData = tagData || {}\n\n        var _s = this.settings,\n            eventData = {\n                tag         : tagElm,\n                index       : this.getNodeIndex(tagElm),\n                previousData: getSetTagData(tagElm),\n                data        : tagData\n            }\n\n        this.trigger(\"edit:beforeUpdate\", eventData, {cloneData:false})\n\n        this.state.editing = false;\n\n        delete tagData.__originalData\n        delete tagData.__originalHTML\n\n        // some scenarrios like in the one in the demos page with textarea that has 2 whitelists, one of the whitelist might be\n        // an array of objects with a property defined the same as the `tagTextProp` setting (if used) but another whitelist\n        // might be simpler - just an array of primitives.\n        function veryfyTagTextProp() {\n            var tagTextProp = tagData[_s.tagTextProp];\n\n            // 'tagTextProp' might also be the number 0 so checking for `undefined` here:\n            if( tagTextProp !== undefined ) {\n                tagTextProp += ''; // cast possible number into a string\n                return !!tagTextProp.trim?.()\n            }\n\n            if( !(_s.tagTextProp in tagData) )\n                return !!tagData.value\n        }\n\n        if( tagElm && tagElm.parentNode ){\n            if( veryfyTagTextProp() ){\n                tagElm = this.replaceTag(tagElm, tagData)\n                this.editTagToggleValidity(tagElm, tagData)\n\n                if( _s.a11y.focusableTags )\n                    tagElm.focus()\n                else if( _s.mode != 'select' )\n                    // place caret after edited tag\n                    placeCaretAfterNode(tagElm)\n            }\n\n            else\n                this.removeTags(tagElm)\n        }\n\n        this.trigger(\"edit:updated\", eventData)\n        _s.dropdown.closeOnSelect && this.dropdown.hide()\n\n        // check if any of the current tags which might have been marked as \"duplicate\" should be now un-marked\n        if( this.settings.keepInvalidTags )\n            this.reCheckInvalidTags()\n    },\n\n    /**\n     * Replaces an exisitng tag with a new one. Used for updating a tag's data\n     * @param {Object} tagElm  [DOM node to replace]\n     * @param {Object} tagData [data to create new tag from]\n     */\n    replaceTag(tagElm, tagData){\n        if( !tagData || tagData.value === '' || tagData.value === undefined )\n            tagData = tagElm.__tagifyTagData\n\n        // if tag is invalid, make the according changes in the newly created element\n        if( tagData.__isValid && tagData.__isValid != true )\n            extend( tagData, this.getInvalidTagAttrs(tagData, tagData.__isValid) )\n\n        var newTagElm = this.createTagElem(tagData)\n\n        // update DOM\n        tagElm.parentNode.replaceChild(newTagElm, tagElm)\n        this.updateValueByDOMTags()\n        return newTagElm\n    },\n\n    /**\n     * update \"value\" (Array of Objects) by traversing all valid tags\n     */\n    updateValueByDOMTags(){\n        this.value.length = 0;\n\n        var clsNames = this.settings.classNames,\n            tagNotAllowedClassName = clsNames.tagNotAllowed.split(' ')[0],\n            skipNodesWithClassNames = [tagNotAllowedClassName, clsNames.tagHide];\n\n        [].forEach.call(this.getTagElms(), node => {\n            if ([...node.classList].some(cls => skipNodesWithClassNames.includes(cls))) return;\n            this.value.push( getSetTagData(node) )\n        })\n\n        this.update()\n        this.dropdown.refilter()\n    },\n\n    /**\n     * injects nodes/text at caret position, which is saved on the \"state\" when \"blur\" event gets triggered\n     * @param {Node} injectedNode [the node to inject at the caret position]\n     * @param {Object} selection [optional range Object. must have \"anchorNode\" & \"anchorOffset\"]\n     */\n    injectAtCaret( injectedNode, range ){\n        range = range || this.state.selection?.range\n\n        if( typeof injectedNode === 'string' )\n            injectedNode = document.createTextNode(injectedNode)\n\n        if( !injectedNode )\n            return this\n\n        const DOCUMENT_FRAGMENT_NODE = 11\n        const insertedNodes = injectedNode.nodeType === DOCUMENT_FRAGMENT_NODE\n            ? Array.prototype.slice.call(injectedNode.childNodes)\n            : [injectedNode]\n\n        if( !insertedNodes.length )\n            return this\n\n        if( !range ){\n            this.appendMixTags(injectedNode)\n            return this\n        }\n\n        const isValidInjectionPoint = this.DOM.scope.contains(range?.startContainer)\n\n        if( !isValidInjectionPoint )\n            return this\n\n        injectAtCaret(injectedNode, range)\n\n        const caretTarget = insertedNodes[insertedNodes.length - 1] || injectedNode\n\n        if( caretTarget?.parentNode )\n            placeCaretAfterNode(caretTarget)\n\n        this.setStateSelection()\n\n        this.updateValueByDOMTags() // updates internal \"this.value\"\n        this.update() // updates original input/textarea\n\n        return this\n    },\n\n    /**\n     * input bridge for accessing & setting\n     * @type {Object}\n     */\n    input : {\n        set( value = '', updateDOM = true ){\n            var _s = this.settings,\n                hideDropdown = _s.dropdown.closeOnSelect\n\n            this.state.inputText = value\n\n            if( updateDOM ) {\n                this.DOM.input.innerHTML = escapeHTML(\"\"+value);\n                value && this.toggleClass(_s.classNames.empty, !this.DOM.input.innerHTML) // remove the \"empty\" (is exists) class only if a value was added\n            }\n\n            if( !value && hideDropdown )\n                this.dropdown.hide.bind(this)\n\n            this.input.autocomplete.suggest.call(this);\n            this.input.validate.call(this);\n\n        },\n\n        raw(){\n            return this.DOM.input.textContent\n        },\n\n        /**\n         * Marks the tagify's input as \"invalid\" if the value did not pass \"validateTag()\"\n         */\n        validate(){\n            var isValid = !this.state.inputText || this.validateTag({value:this.state.inputText}) === true;\n\n            this.DOM.input.classList.toggle(this.settings.classNames.inputInvalid, !isValid)\n\n            return isValid\n        },\n\n        // remove any child DOM elements that aren't of type TEXT (like <br>)\n        normalize( node, options ){\n            var clone = node || this.DOM.input, //.cloneNode(true),\n                v = [];\n\n            // when a text was pasted in FF, the \"this.DOM.input\" element will have <br> but no newline symbols (\\n), and this will\n            // result in tags not being properly created if one wishes to create a separate tag per newline.\n            clone.childNodes.forEach(n => n.nodeType==3 && v.push(n.nodeValue))\n            v = v.join(\"\\n\")\n\n            try{\n                // \"delimiters\" might be of a non-regex value, where this will fail (\"Tags With Properties\" example in demo page):\n                v = v.replace(/(?:\\r\\n|\\r|\\n)/g, this.settings.delimiters.source.charAt(0))\n            }\n            catch(err){}\n\n            v = v.replace(/\\s/g, ' ')  // replace NBSPs with spaces characters\n\n            return options?.trim ? this.trim(v) : v\n        },\n\n        /**\n         * suggest the rest of the input's value (via CSS \"::after\" using \"content:attr(...)\")\n         * @param  {String} s [description]\n         */\n        autocomplete : {\n            suggest( data ){\n                if( !this.settings.autoComplete.enabled ) return;\n\n                data = data || {value:''}\n                if (typeof data !== 'object') data = { value: data };\n\n                var suggestedText = this.dropdown.getMappedValue(data);\n\n                if( typeof suggestedText === 'number' ) return\n\n                var inputText = this.state.inputText.toLowerCase(),\n                    suggestionStart = suggestedText.substr(0, this.state.inputText.length).toLowerCase(),\n                    suggestionTrimmed = suggestedText.substring(this.state.inputText.length);\n\n                if( !suggestedText || !this.state.inputText || suggestionStart != inputText ){\n                    this.DOM.input.removeAttribute(\"data-suggest\");\n                    delete this.state.inputSuggestion\n                }\n                else{\n                    this.DOM.input.setAttribute(\"data-suggest\", suggestionTrimmed);\n                    this.state.inputSuggestion = data\n                }\n            },\n\n            /**\n             * sets the suggested text as the input's value & cleanup the suggestion autocomplete.\n             * @param {String} s [text]\n             */\n            set( s ){\n                var dataSuggest = this.DOM.input.getAttribute('data-suggest'),\n                    suggestion = s || (dataSuggest ? this.state.inputText + dataSuggest : null);\n\n                if( suggestion ){\n                    if( this.settings.mode == 'mix' ){\n                        this.replaceTextWithNode( document.createTextNode(this.state.tag.prefix + suggestion) )\n                    }\n                    else{\n                        this.input.set.call(this, suggestion);\n                        this.setRangeAtStartEnd(false, this.DOM.input)\n                    }\n\n                    this.input.autocomplete.suggest.call(this);\n                    this.dropdown.hide();\n\n                    return true;\n                }\n\n                return false;\n            }\n        }\n    },\n\n    /**\n     * returns the index of the the tagData within the \"this.value\" array collection.\n     * since values should be unique, it is suffice to only search by \"value\" property\n     * @param {Object} tagData\n     */\n    getTagIdx( tagData ){\n        return this.value.findIndex(item => item.__tagId == (tagData||{}).__tagId )\n    },\n\n    getNodeIndex( node ){\n        var index = 0;\n\n        if( node )\n            while( (node = node.previousElementSibling) )\n                index++;\n\n        return index;\n    },\n\n    getTagElms( ...classess ){\n        var classname = '.' + [...this.settings.classNames.tag.split(' '), ...classess].join('.')\n        return [].slice.call(this.DOM.scope.querySelectorAll(classname)) // convert nodeList to Array - https://stackoverflow.com/a/3199627/104380\n    },\n\n    /**\n     * gets the last non-readonly, not-in-the-proccess-of-removal tag\n     */\n    getLastTag(){\n        var _sc = this.settings.classNames,\n            tagNodes = this.DOM.scope.querySelectorAll(`${_sc.tagSelector}:not(.${_sc.tagHide}):not([readonly])`);\n        return tagNodes[tagNodes.length - 1];\n    },\n\n    /**\n     * Searches if any tag with a certain value already exis\n     * @param  {String/Object} value [text value / tag data object]\n     * @param  {Boolean} caseSensitive\n     * @return {Number}\n     */\n    isTagDuplicate( value, caseSensitive, tagId ){\n        var dupsCount = 0;\n\n        for( let item of this.value ) {\n            let isSameStr = sameStr( this.trim(\"\"+value), item.value, caseSensitive );\n            if( isSameStr && tagId != item.__tagId )\n                dupsCount++;\n        }\n\n        return dupsCount\n    },\n\n    getTagIndexByValue( value ){\n        var indices = [],\n            isCaseSensitive = this.settings.dropdown.caseSensitive;\n\n        this.getTagElms().forEach((tagElm, i) => {\n            if(  tagElm.__tagifyTagData && sameStr( this.trim(tagElm.__tagifyTagData.value), value, isCaseSensitive )  )\n                indices.push(i)\n        })\n\n        return indices;\n    },\n\n    getTagElmByValue( value ){\n        var tagIdx = this.getTagIndexByValue(value)[0]\n        return this.getTagElms()[tagIdx]\n    },\n\n    /**\n     * Temporarily marks a tag element (by value or Node argument)\n     * @param  {Object} tagElm [a specific \"tag\" element to compare to the other tag elements siblings]\n     */\n    flashTag( tagElm ){\n        if( tagElm ){\n            tagElm.classList.add(this.settings.classNames.tagFlash)\n            setTimeout(() => { tagElm.classList.remove(this.settings.classNames.tagFlash) }, 100)\n        }\n    },\n\n    /**\n     * checks if text is in the blacklist\n     */\n    isTagBlacklisted( v ){\n        v = this.trim(v.toLowerCase());\n        return this.settings.blacklist.filter(x => (\"\"+x).toLowerCase() == v).length;\n    },\n\n    /**\n     * checks if text is in the whitelist\n     */\n    isTagWhitelisted( v ){\n        return !!this.getWhitelistItem(v)\n        /*\n        return this.settings.whitelist.some(item =>\n            typeof v == 'string'\n                ? sameStr(this.trim(v), (item.value || item))\n                : sameStr(JSON.stringify(item), JSON.stringify(v))\n        )\n        */\n    },\n\n    /**\n     * Returns the first whitelist item matched, by value (if match found)\n     * @param {String} value [text to match by]\n     */\n    getWhitelistItem( value, prop, whitelist ){\n        var result,\n            prop = prop || 'value',\n            _s = this.settings,\n            whitelist = whitelist || _s.whitelist;\n\n        whitelist.some(_wi => {\n            // whitelist item value. Can be either a String, Number or an Object (with a `value` property)\n            var _wiv = typeof _wi == 'object' ? (_wi[prop] || _wi.value) : _wi,\n                isSameStr = sameStr(_wiv, value, _s.dropdown.caseSensitive, _s.trim)\n\n            if( isSameStr ){\n                result = typeof _wi == 'object' ? _wi : {value:_wi}\n                return true\n            }\n        })\n\n        // first iterate the whitelist, try find matches by \"value\" and if that fails\n        // and a \"tagTextProp\" is set to be other than \"value\", try that also\n        if( !result && prop == 'value' && _s.tagTextProp != 'value' ){\n            // if found, adds the first which matches\n            result = this.getWhitelistItem(value, _s.tagTextProp, whitelist)\n        }\n\n        return result\n    },\n\n    /**\n     * validate a tag object BEFORE the actual tag will be created & appeneded\n     * @param  {String} s\n     * @param  {String} uid      [unique ID, to not inclue own tag when cheking for duplicates]\n     * @return {Boolean/String}  [\"true\" if validation has passed, String for a fail]\n     */\n    validateTag( tagData ){\n        var _s = this.settings,\n            // when validating a tag in edit-mode, need to take \"tagTextProp\" into consideration\n            prop = \"value\" in tagData ? \"value\" : _s.tagTextProp,\n            v = this.trim(tagData[prop] + \"\");\n\n        // check for definitive empty value\n        if( !(tagData[prop]+\"\").trim() )\n            return this.TEXTS.empty;\n\n        // check if pattern should be used and if so, use it to test the value\n        if( _s.mode != 'mix' && _s.pattern && _s.pattern instanceof RegExp && !(_s.pattern.test(v)) )\n            return this.TEXTS.pattern;\n\n        // check for duplicates\n        if( !_s.duplicates && this.isTagDuplicate(v, _s.dropdown.caseSensitive, tagData.__tagId) )\n            return this.TEXTS.duplicate;\n\n        if( this.isTagBlacklisted(v) || (_s.enforceWhitelist && !this.isTagWhitelisted(v)) )\n            return this.TEXTS.notAllowed;\n\n        if( _s.validate )\n            return _s.validate(tagData)\n\n        return true\n    },\n\n    getInvalidTagAttrs(tagData, validation){\n        return {\n            \"aria-invalid\" : true,\n            \"class\": `${tagData.class || ''} ${this.settings.classNames.tagNotAllowed}`.trim(),\n            \"title\": validation\n        }\n    },\n\n    hasMaxTags(){\n        return this.value.length >= this.settings.maxTags\n            ? this.TEXTS.exceed\n            : false\n    },\n\n    setReadonly( toggle, attrribute ){\n        var _s = this.settings\n\n        this.DOM.scope.contains(document.activeElement) && document.activeElement.blur() // exit possible edit-mode\n        _s[attrribute || 'readonly'] = toggle\n        this.DOM.scope[(toggle ? 'set' : 'remove') + 'Attribute'](attrribute || 'readonly', true)\n\n        this.settings.userInput = true;\n        this.setContentEditable(!toggle)\n\n        if( !toggle ) {\n            // first unbind all events\n            this.events.binding.call(this, true)\n            // re-bind all events\n            this.events.binding.call(this)\n        }\n    },\n\n    setContentEditable(state){\n        this.DOM.scope.querySelectorAll(\"[data-can-editable]\").forEach(elm => {\n            elm.contentEditable = state\n            elm.tabIndex = !!state ? 0 : -1;\n        })\n    },\n\n    setDisabled( isDisabled ){\n        this.setReadonly(isDisabled, 'disabled')\n    },\n\n    /**\n     * pre-proccess the tagsItems, which can be a complex tagsItems like an Array of Objects or a string comprised of multiple words\n     * so each item should be iterated on and a tag created for.\n     * @return {Array} [Array of Objects]\n     */\n    normalizeTags( tagsItems ){\n        var {whitelist, delimiters, mode, tagTextProp} = this.settings,\n            whitelistMatches = [],\n            whitelistWithProps = whitelist ? whitelist[0] instanceof Object : false,\n            // checks if this is a \"collection\", meanning an Array of Objects\n            isArray = Array.isArray(tagsItems),\n            isCollection = isArray && tagsItems[0].value,\n            mapStringToCollection = s => (s+\"\").split(delimiters).reduce((acc, v) => {\n                const trimmed = this.trim(v)\n                trimmed && acc.push({ [tagTextProp]:trimmed, value:trimmed })\n                return acc\n            }, [])\n\n        if( typeof tagsItems == 'number' )\n            tagsItems = tagsItems.toString()\n\n        // if the argument is a \"simple\" String, ex: \"aaa, bbb, ccc\"\n        if( typeof tagsItems == 'string' ){\n            if( !tagsItems.trim() ) return [];\n\n            // go over each tag and add it (if there were multiple ones)\n            tagsItems = mapStringToCollection(tagsItems)\n        }\n\n        // if is an Array of Strings, convert to an Array of Objects\n        else if( isArray ){\n            // flatten the 2D array\n            tagsItems = tagsItems.reduce((acc, item) => {\n                if( isObject(item) ) {\n                    var itemCopy = extend({}, item)\n\n                    // if 'tagTextProp' property does not exist in the item, use `value` instead\n                    if(!(tagTextProp in itemCopy))\n                        tagTextProp = 'value'\n\n                    itemCopy[tagTextProp] = this.trim(itemCopy[tagTextProp])\n\n                    // discard empty tags but allow `0` as a valid value\n                    if( itemCopy[tagTextProp] || itemCopy[tagTextProp] === 0 )\n                        acc.push(itemCopy) // mapStringToCollection(item.value).map(newItem => ({...item,...newItem}))\n                }\n\n                else if(item != null && item !== '' && item !== undefined) {\n                    acc.push( ...mapStringToCollection(item) )\n                }\n\n                return acc\n            }, [])\n        }\n\n        // search if the tag exists in the whitelist as an Object (has props),\n        // to be able to use its properties.\n        // skip matching collections with whitelist items as they are considered \"whole\"\n        if( whitelistWithProps && !isCollection ){\n            tagsItems.forEach(item => {\n                var whitelistMatchesValues = whitelistMatches.map(a=>a.value)\n\n                // if suggestions are shown, they are already filtered, so it's easier to use them,\n                // because the whitelist might also include items which have already been added\n                var filteredList = this.dropdown.filterListItems.call(this, item[tagTextProp], { exact:true })\n\n                if( !this.settings.duplicates )\n                    // also filter out items which have already been matched in previous iterations\n                    filteredList = filteredList.filter(filteredItem => !whitelistMatchesValues.includes(filteredItem.value))\n\n                // get the best match out of list of possible matches.\n                // if there was a single item in the filtered list, use that one\n                var matchObj = filteredList.length > 1\n                    ? this.getWhitelistItem(item[tagTextProp], tagTextProp, filteredList)\n                    : filteredList[0]\n\n                if( matchObj && matchObj instanceof Object ){\n                    whitelistMatches.push( matchObj ) // set the Array (with the found Object) as the new value\n                }\n                else if( mode != 'mix' ){\n                    if( item.value == undefined )\n                        item.value = item[tagTextProp]\n                    whitelistMatches.push(item)\n                }\n            })\n\n            if( whitelistMatches.length )\n                tagsItems = whitelistMatches\n        }\n\n        return tagsItems;\n    },\n\n    /**\n     * Parse the initial value of a textarea (or input) element and generate mixed text w/ tags\n     * https://stackoverflow.com/a/57598892/104380\n     * @param {String} s\n     */\n    /**\n     * Parses interpolated text (e.g., \"text [[{\"value\":\"tag\"}]] more text\") into tags\n     * @param {String} s - Text with interpolated tags\n     * @param {Object} [options] - Optional settings\n     * @param {Boolean} [options.skipDOM=false] - If true, returns a DocumentFragment instead of updating DOM\n     * @returns {String|DocumentFragment} - HTML string (default) or DocumentFragment (if skipDOM=true)\n     */\n    parseMixTags( s, options ){\n        var {mixTagsInterpolator, duplicates, transformTag, enforceWhitelist, maxTags, tagTextProp} = this.settings,\n            skipDOM = options?.skipDOM,\n            fragment = skipDOM ? document.createDocumentFragment() : null,\n            tagsDataSet = [];\n\n        s = s.split(mixTagsInterpolator[0]).map((s1, i) => {\n            var s2 = s1.split(mixTagsInterpolator[1]),\n                preInterpolated = s2[0],\n                maxTagsReached = tagsDataSet.length == maxTags,\n                textProp,\n                tagData,\n                tagElm;\n\n            // For fragment mode: handle text before first tag\n            if( skipDOM && i == 0 && s1 ){\n                fragment.appendChild(document.createTextNode(s1))\n                return ''\n            }\n\n            try{\n                // skip numbers and go straight to the \"catch\" statement\n                if( preInterpolated == +preInterpolated )\n                    throw Error\n                tagData = JSON.parse(preInterpolated)\n            } catch(err){\n                tagData = this.normalizeTags(preInterpolated)[0] || {value:preInterpolated}\n            }\n\n            transformTag.call(this, tagData)\n\n            if( !maxTagsReached   &&\n                s2.length > 1   &&\n                (!enforceWhitelist || this.isTagWhitelisted(tagData.value))   &&\n                !(!duplicates && this.isTagDuplicate(tagData.value)) ){\n\n                // in case \"tagTextProp\" setting is set to other than \"value\" and this tag does not have this prop\n                textProp = tagData[tagTextProp] ? tagTextProp : 'value'\n                tagData[textProp] = this.trim(tagData[textProp])\n\n                tagElm = this.createTagElem(tagData)\n                tagsDataSet.push( tagData )\n                tagElm.classList.add(this.settings.classNames.tagNoAnimation)\n\n                if( skipDOM ){\n                    fragment.appendChild(tagElm)\n                    // Add text after tag\n                    if( s2[1] ){\n                        fragment.appendChild(document.createTextNode(s2[1]))\n                    }\n                    return ''\n                }\n                else {\n                    s2[0] = tagElm.outerHTML //+ \"&#8288;\"  // put a zero-space at the end so the caret won't jump back to the start (when the last input's child element is a tag)\n                    this.value.push(tagData)\n                }\n            }\n            else if(s1){\n                if( skipDOM ){\n                    // Invalid tag - add back the interpolator and content as text\n                    fragment.appendChild(document.createTextNode(mixTagsInterpolator[0] + s1))\n                    return ''\n                }\n                return i ? mixTagsInterpolator[0] + s1 : s1\n            }\n\n            return s2.join('')\n        }).join('')\n\n        // Fragment mode: return the fragment with tags data attached\n        if( skipDOM ){\n            fragment.__tagifyTagsData = tagsDataSet\n            return fragment\n        }\n\n        // DOM mode: update the input element\n        this.DOM.input.innerHTML = s\n        this.DOM.input.appendChild(document.createTextNode(''))\n        this.DOM.input.normalize()\n\n        var tagNodes = this.getTagElms()\n\n        tagNodes.forEach((elm, idx) => getSetTagData(elm,  tagsDataSet[idx]))\n        this.update({withoutChangeEvent:true})\n\n        fixCaretBetweenTags(tagNodes, this.state.hasFocus)\n        return s\n    },\n\n    /**\n     * Converts pasted text in mix-mode into tags by detecting pattern-prefixed text\n     * that matches items in the whitelist\n     * @param {String} text - The pasted text to process\n     * @returns {String} - Text with matched items wrapped in mixTagsInterpolator\n     */\n    convertPastedTextToMixTags( text ){\n        const { pattern, whitelist, mixTagsInterpolator, mixTagsAllowedAfter, tagTextProp } = this.settings\n\n        if( !pattern || !whitelist?.length )\n            return text\n\n        // Extract all possible prefix patterns (e.g., [@, #] from /@|#/)\n        const prefixPatterns = pattern.source ? pattern.source.split('|') : [pattern]\n\n        // Build a mapping of prefix -> whitelist items\n        const prefixWhitelistMap = {}\n\n        prefixPatterns.forEach(prefix => {\n            // Normalize prefix (remove escape chars if any)\n            const normalizedPrefix = prefix.replace(/\\\\/g, '')\n            prefixWhitelistMap[normalizedPrefix] = whitelist.map(item => {\n                // Get the text to match against - use tagTextProp for objects, or the string itself\n                let textValue\n                if( typeof item === 'string' ) {\n                    textValue = item\n                } else {\n                    // For objects, use tagTextProp (e.g., 'text' or 'value')\n                    textValue = item[tagTextProp] || item.value\n                }\n\n                // Convert to string (in case value is a number or other type)\n                textValue = String(textValue)\n\n                return {\n                    originalItem: item,\n                    value: textValue,\n                    searchValue: textValue.toLowerCase()\n                }\n            })\n            // Sort by length (longest first) for greedy matching\n            .sort((a, b) => b.value.length - a.value.length)\n        })\n\n        // Find all pattern prefix positions\n        const patternRegex = new RegExp(pattern.source, 'g')\n        const replacements = [] // Store replacements to apply in reverse order\n        let match\n\n        while ((match = patternRegex.exec(text)) !== null) {\n            const prefix = match[0]\n            const startIndex = match.index\n            const afterPrefixIndex = startIndex + prefix.length\n\n            // Get text after the prefix\n            const textAfterPrefix = text.slice(afterPrefixIndex)\n\n            // Try to match whitelist items (longest first)\n            const whitelistItems = prefixWhitelistMap[prefix]\n            if( !whitelistItems ) continue\n\n            let matchedItem = null\n            let matchedLength = 0\n\n            // Try each whitelist item starting with longest\n            for( const item of whitelistItems ){\n                const itemValue = item.value\n                const itemLength = itemValue.length\n\n                // Extract the same length from text after prefix (case-insensitive comparison)\n                const textSegment = textAfterPrefix.slice(0, itemLength)\n\n                if( textSegment.toLowerCase() === item.searchValue ){\n                    // Check if this match ends at a valid boundary or end of text\n                    const charAfterMatch = textAfterPrefix[itemLength]\n                    const isValidBoundary = !charAfterMatch || // end of string\n                                           mixTagsAllowedAfter.test(charAfterMatch) // or boundary char\n\n                    if( isValidBoundary ){\n                        matchedItem = item\n                        matchedLength = itemLength\n                        break // Found longest match\n                    }\n                }\n            }\n\n            if( matchedItem ){\n                // Build tag data: full whitelist object + prefix\n                const tagData = typeof matchedItem.originalItem === 'string'\n                    ? { value: matchedItem.value, prefix }\n                    : { ...matchedItem.originalItem, prefix }\n\n                // Validate the tag\n                const isValid = this.validateTag(tagData)\n\n                if( isValid === true ){\n                    // Wrap with interpolator\n                    const replacement = `${mixTagsInterpolator[0]}${JSON.stringify(tagData)}${mixTagsInterpolator[1]}`\n\n                    replacements.push({\n                        start: startIndex,\n                        end: afterPrefixIndex + matchedLength,\n                        replacement\n                    })\n\n                    // Skip ahead past this match to avoid re-processing\n                    patternRegex.lastIndex = afterPrefixIndex + matchedLength\n                }\n            }\n        }\n\n        // Apply replacements in reverse order to maintain indices\n        let result = text\n        replacements.reverse().forEach(({ start, end, replacement }) => {\n            result = result.slice(0, start) + replacement + result.slice(end)\n        })\n\n        return result\n    },\n\n    /**\n     * For mixed-mode: replaces a text starting with a prefix with a wrapper element (tag or something)\n     * First there *has* to be a \"this.state.tag\" which is a string that was just typed and is staring with a prefix\n     */\n    replaceTextWithNode( newWrapperNode, strToReplace ){\n        if( !this.state.tag && !strToReplace ) return;\n\n        strToReplace = strToReplace || this.state.tag.prefix + this.state.tag.value;\n        var idx, nodeToReplace,\n            selection = this.state.selection || window.getSelection(),\n            nodeAtCaret = selection.anchorNode,\n            firstSplitOffset = this.state.tag.delimiters ? this.state.tag.delimiters.length : 0;\n\n        // STEP 1: ex. replace #ba with the tag \"bart\" where \"|\" is where the caret is:\n        // CURRENT STATE: \"foo #ba #ba| #ba\"\n\n        // split the text node at the index of the caret\n        nodeAtCaret.splitText(selection.anchorOffset - firstSplitOffset)\n\n        // node 0: \"foo #ba #ba|\"\n        // node 1: \" #ba\"\n\n        // get index of LAST occurence of \"#ba\"\n        idx = nodeAtCaret.nodeValue.lastIndexOf(strToReplace)\n\n        if( idx == -1 ) return true;\n\n        nodeToReplace = nodeAtCaret.splitText(idx)\n\n        // node 0: \"foo #ba \"\n        // node 1: \"#ba\"    <- nodeToReplace\n\n        newWrapperNode && nodeAtCaret.parentNode.replaceChild(newWrapperNode, nodeToReplace)\n\n        // must NOT normalize contenteditable or it will cause unwanted issues:\n        // https://monosnap.com/file/ZDVmRvq5upYkidiFedvrwzSswegWk7\n        // nodeAtCaret.parentNode.normalize()\n\n        return true;\n    },\n\n    /**\n     * Validate a tag's data and create a new tag node\n     * @param {*} tagData\n     * @param {*} options\n     * @returns Object\n     */\n    prepareNewTagNode(tagData, options) {\n        options = options || {}\n\n        var tagElm,\n            _s = this.settings,\n            aggregatedInvalidInput = [],\n            tagElmParams = {},\n            originalData = Object.assign({}, tagData, {value:tagData.value+\"\"});\n\n        // shallow-clone tagData so later modifications will not apply to the source\n        tagData = Object.assign({}, originalData)\n        _s.transformTag.call(this, tagData)\n\n        tagData.__isValid = this.hasMaxTags() || this.validateTag(tagData)\n\n        if( tagData.__isValid !== true ){\n            if( options.skipInvalid )\n                return\n\n            // originalData is kept because it might be that this tag is invalid because it is a duplicate of another,\n            // and if that other tags is edited/deleted, this one should be re-validated and if is no more a duplicate - restored\n            extend(tagElmParams, this.getInvalidTagAttrs(tagData, tagData.__isValid), {__preInvalidData:originalData})\n\n            if( tagData.__isValid == this.TEXTS.duplicate )\n                // mark, for a brief moment, the tag (this this one) which THIS CURRENT tag is a duplcate of\n                this.flashTag( this.getTagElmByValue(tagData.value) )\n\n            if( !_s.createInvalidTags ){\n                aggregatedInvalidInput.push(tagData.value)\n                return\n            }\n        }\n\n        if( 'readonly' in tagData ){\n            if( tagData.readonly )\n                tagElmParams[\"aria-readonly\"] = true\n            // if \"readonly\" is \"false\", remove it from the tagData so it won't be added as an attribute in the template\n            else\n                delete tagData.readonly\n        }\n\n        // Create tag HTML element\n        tagElm = this.createTagElem(tagData, tagElmParams)\n\n        return {tagElm, tagData, aggregatedInvalidInput}\n    },\n\n    /**\n     * Logic to happen once a tag has just been injected into the DOM\n     * @param {Node} tagElm\n     * @param {Object} tagData\n     */\n    postProcessNewTagNode(tagElm, tagData) {\n        var _s = this.settings,\n            isValid = tagData.__isValid;\n\n        if( isValid && isValid === true ){\n            // update state\n            this.value.push(tagData)\n        }\n        else{\n            this.trigger('invalid', {data:tagData, index:this.value.length, tag:tagElm, message:isValid})\n            if( !_s.keepInvalidTags )\n                // remove invalid tags (if \"keepInvalidTags\" is set to \"false\")\n                setTimeout(() => this.removeTags(tagElm, true), 1000)\n        }\n\n        this.dropdown.position() // reposition the dropdown because the just-added tag might cause a new-line\n    },\n\n    /**\n     * For selecting a single option (not used for multiple tags, but for \"mode:select\" only)\n     * @param {Object} tagElm   Tag DOM node\n     * @param {Object} tagData  Tag data\n     */\n    selectTag( tagElm, tagData ){\n        var _s = this.settings\n\n        if( _s.enforceWhitelist && !this.isTagWhitelisted(tagData.value) )\n            return\n\n        // this.input.set.call(this, tagData[_s.tagTextProp] || tagData.value, true)\n\n        // place the caret at the end of the input, only if a dropdown option was selected (and not by manually typing another value and clicking \"TAB\")\n        if( this.state.actions.selectOption )\n            setTimeout(() => this.setRangeAtStartEnd(false, this.DOM.input))\n\n        var lastTagElm = this.getLastTag()\n\n        if( lastTagElm )\n            this.replaceTag(lastTagElm, tagData)\n        else\n            this.appendTag(tagElm)\n\n        // if( _s.enforceWhitelist )\n        //     this.setContentEditable(false);\n\n        this.value[0] = tagData\n        this.update()\n        this.trigger('add', { tag:tagElm, data:tagData })\n\n        return [tagElm]\n    },\n\n    /**\n     * add an empty \"tag\" element in an editable state\n     */\n    addEmptyTag( initialData ){\n        var tagData = extend({ value:\"\" }, initialData || {}),\n            tagElm = this.createTagElem(tagData)\n\n        getSetTagData(tagElm, tagData)\n\n        // add the tag to the component's DOM\n        this.appendTag(tagElm)\n        this.editTag(tagElm, {skipValidation:true})\n        this.toggleFocusClass(true)\n    },\n\n    /**\n     * add a \"tag\" element to the \"tags\" component\n     * @param {String/Array} tagsItems   [A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings]\n     * @param {Boolean}      clearInput  [flag if the input's value should be cleared after adding tags]\n     * @param {Boolean}      skipInvalid [do not add, mark & remove invalid tags]\n     * @return {Array} Array of DOM elements (tags)\n     */\n    addTags( tagsItems, clearInput, skipInvalid ){\n        var tagElems = [],\n            _s = this.settings,\n            aggregatedInvalidInput = [],\n            frag = document.createDocumentFragment(),\n            addedTags = []; // all tags, also invalid. this is used for firing the `add` event\n\n        if( !tagsItems || tagsItems.length == 0 ){\n            return tagElems\n        }\n\n        // converts Array/String/Object to an Array of Objects\n        tagsItems = this.normalizeTags(tagsItems)\n\n        switch( _s.mode ){\n            case 'mix': return this.addMixTags(tagsItems)\n            case 'select': {\n                clearInput = false\n                this.removeAllTags()\n            }\n        }\n\n        this.DOM.input.removeAttribute('style')\n\n        tagsItems.forEach(tagData => {\n            const newTagNode = this.prepareNewTagNode(tagData, {skipInvalid: skipInvalid || _s.skipInvalid});\n\n            if( !newTagNode) return;\n\n            const tagElm = newTagNode.tagElm;\n\n            tagData = newTagNode.tagData\n            aggregatedInvalidInput = newTagNode.aggregatedInvalidInput\n\n            tagElems.push(tagElm)\n\n            // mode-select overrides\n            if( _s.mode == 'select' ){\n                return this.selectTag(tagElm, tagData)\n            }\n\n            // add the tag to the component's DOM\n            // this.appendTag(tagElm)\n            frag.appendChild(tagElm)\n            this.postProcessNewTagNode(tagElm, tagData)\n            addedTags.push({tagElm, tagData})\n        })\n\n        this.appendTag(frag)\n\n        addedTags.forEach(({tagElm, tagData}) =>\n            this.trigger('add', {tag:tagElm, index:this.getTagIdx(tagData), data:tagData})\n        )\n\n        this.update()\n\n\n        if( tagsItems.length && clearInput ){\n            this.input.set.call(this, _s.createInvalidTags ? '' : aggregatedInvalidInput.join(_s._delimiters))\n            this.setRangeAtStartEnd(false, this.DOM.input)\n        }\n\n        // hydrate the suggestions list\n        this.dropdown.refilter()\n        return tagElems\n    },\n\n    /**\n     * Adds a mix-content tag\n     * @param {String/Array} tagData    A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings\n     */\n    addMixTags( tagsData ){\n        tagsData = this.normalizeTags(tagsData);\n\n        // flow for creating custom tags which aren't a part of the whitelist\n        if( tagsData[0].prefix || this.state.tag ){\n            return this.prefixedTextToTag(tagsData[0])\n        }\n\n        var frag = document.createDocumentFragment();\n        var addedTags = [];\n\n        tagsData.forEach(tagData => {\n            const newTagNode = this.prepareNewTagNode(tagData)\n            frag.appendChild(newTagNode.tagElm)\n            this.insertAfterTag(newTagNode.tagElm)\n            this.postProcessNewTagNode(newTagNode.tagElm, newTagNode.tagData)\n            addedTags.push({tagElm: newTagNode.tagElm, tagData: newTagNode.tagData})\n        })\n\n        this.appendMixTags(frag, addedTags)\n\n        return frag.children\n    },\n\n    appendMixTags( node, addedTags ) {\n        const DOCUMENT_FRAGMENT_NODE = 11\n        const savedRange = this.state.selection?.range\n        const hasSavedSelection = !!savedRange && this.DOM.scope.contains(savedRange.startContainer)\n        const insertedNodes = node\n            ? (node.nodeType === DOCUMENT_FRAGMENT_NODE ? Array.prototype.slice.call(node.childNodes) : [node])\n            : []\n\n        if( hasSavedSelection ){\n            this.injectAtCaret(node)\n        }\n        else{\n            this.DOM.input.focus()\n            const selection = this.setStateSelection()\n\n            if( selection?.range ){\n                selection.range.setStart(this.DOM.input, selection.range.endOffset)\n                selection.range.setEnd(this.DOM.input, selection.range.endOffset)\n            }\n\n            this.DOM.input.appendChild(node)\n\n            this.updateValueByDOMTags() // updates internal \"this.value\"\n            this.update() // updates original input/textarea\n\n            const caretTarget = insertedNodes[insertedNodes.length - 1]\n\n            if( caretTarget?.parentNode )\n                placeCaretAfterNode(caretTarget)\n\n            this.setStateSelection()\n        }\n\n        const tagsPayload = addedTags?.length\n            ? addedTags\n            : insertedNodes.filter(node => node.nodeType === 1)\n\n        if( tagsPayload?.length )\n            this.trigger('add', {tags: tagsPayload})\n    },\n\n    /**\n     * Adds a tag which was activly typed by the user\n     * @param {String/Array} tagData   [A string (single or multiple values with a delimiter), or an Array of Objects or just Array of Strings]\n     */\n    prefixedTextToTag( tagData ){\n        var _s = this.settings,\n            tagElm,\n            newTag,\n            createdFromDelimiters = this.state.tag?.delimiters;\n\n        tagData.prefix = tagData.prefix || this.state.tag ? this.state.tag.prefix : (_s.pattern.source||_s.pattern)[0];\n\n        newTag = this.prepareNewTagNode(tagData)\n        tagElm = newTag.tagElm\n\n        // tries to replace a taged textNode with a tagElm, and if not able,\n        // insert the new tag to the END if \"addTags\" was called from outside\n        if( !this.replaceTextWithNode(tagElm) ){\n            this.DOM.input.appendChild(tagElm)\n        }\n\n        setTimeout(()=> tagElm.classList.add(this.settings.classNames.tagNoAnimation), 300)\n\n        this.update()\n\n        if( !createdFromDelimiters ) {\n            var elm = this.insertAfterTag(tagElm) || tagElm;\n            // a timeout is needed when selecting a tag from the suggestions via mouse.\n            // Without it, it seems the caret is placed right after the tag and not after the\n            // node which was inserted after the tag (whitespace by default)\n            setTimeout(placeCaretAfterNode, 0, elm);\n        }\n\n        this.state.tag = null\n\n        this.postProcessNewTagNode(tagElm, newTag.tagData)\n\n        this.trigger('add', {tag: newTag, data:tagData})\n\n        return tagElm\n    },\n\n    /**\n     * appened (validated) tag to the component's DOM scope\n     */\n    appendTag(tagElm){\n        var DOM = this.DOM,\n            insertBeforeNode = DOM.input;\n\n        //if( insertBeforeNode === DOM.input )\n            DOM.scope.insertBefore(tagElm, insertBeforeNode)\n        //else\n        //    DOM.scope.appendChild(tagElm)\n    },\n\n    /**\n     * creates a DOM tag element and injects it into the component (this.DOM.scope)\n     * @param  {Object}  tagData [text value & properties for the created tag]\n     * @param  {Object}  extraData [properties which are for the HTML template only]\n     * @return {Object} [DOM element]\n     */\n    createTagElem( tagData, extraData ){\n        tagData.__tagId = getUID()\n\n        var tagElm,\n            templateData = extend({}, tagData, {\n                [this.settings.tagTextProp]: escapeHTML((tagData[this.settings.tagTextProp] || tagData.value) + \"\"),\n                title: escapeHTML((tagData.title || tagData.value) + \"\"),\n                value: escapeHTML(tagData.value + \"\"),\n                ...extraData\n            });\n\n        // if( this.settings.readonly )\n        //     tagData.readonly = true\n\n        tagElm = this.parseTemplate('tag', [templateData, this])\n\n        // crucial for proper caret placement when deleting content. if textNodes are allowed as children of a tag element,\n        // a browser bug casues the caret to be misplaced inside the tag element (especially affects \"readonly\" tags)\n        removeTextChildNodes(tagElm)\n        // while( tagElm.lastChild.nodeType == 3 )\n        //     tagElm.lastChild.parentNode.removeChild(tagElm.lastChild)\n\n        getSetTagData(tagElm, tagData)\n        return tagElm\n    },\n\n    /**\n     * re-check all invalid tags.\n     * called after a tag was edited or removed\n     */\n    reCheckInvalidTags(){\n        var _s = this.settings\n\n        this.getTagElms(_s.classNames.tagNotAllowed).forEach((tagElm, i) => {\n            var tagData = getSetTagData(tagElm),\n                hasMaxTags = this.hasMaxTags(),\n                tagValidation = this.validateTag(tagData),\n                isValid = tagValidation === true && !hasMaxTags;\n\n            if( _s.mode == 'select' )\n                this.toggleScopeValidation(tagValidation)\n\n            // if the tag has become valid\n            if( isValid ){\n                tagData = tagData.__preInvalidData\n                    ? tagData.__preInvalidData\n                    : { value:tagData.value }\n\n                return this.replaceTag(tagElm, tagData)\n            }\n\n            // if the tag is still invaild, set its title as such (reson of invalid might have changed)\n            tagElm.title = hasMaxTags || tagValidation\n        })\n    },\n\n    /**\n     * Removes a tag\n     * @param  {Array|Node|String}  tagElms         [DOM element(s) or a String value. if undefined or null, remove last added tag]\n     * @param  {Boolean}            silent          [A flag, which when turned on, does not remove any value and does not update the original input value but simply removes the tag from tagify]\n     * @param  {Number}             tranDuration    [Transition duration in MS]\n     * TODO: Allow multiple tags to be removed at-once\n     */\n    removeTags( tagElms, silent, tranDuration ){\n        var tagsToRemove,\n            _s = this.settings;\n\n        tagElms = tagElms && tagElms instanceof HTMLElement\n            ? [tagElms]\n            : tagElms instanceof Array\n                ? tagElms\n                : tagElms\n                    ? [tagElms]\n                    : [this.getLastTag()].filter(n => n)   // must filter because \"this.getLastTag()\" might be `undefined` if there are not tags\n\n        // normalize tagElms array values:\n        // 1. removing invalid items\n        // 2, if an item is String try to get the matching Tag HTML node\n        // 3. get the tag data\n        // 4. return a collection of Objects\n        tagsToRemove = tagElms.reduce((elms, tagElm) => {\n            if( tagElm && typeof tagElm == 'string')\n                tagElm = this.getTagElmByValue(tagElm)\n\n            var tagData = getSetTagData(tagElm);\n\n            if( tagElm && tagData && !tagData.readonly ) // make sure it's a tag and not some other node\n                // because the DOM node might be removed by async animation, the state will be updated while\n                // the node might still be in the DOM, so the \"update\" method should know which nodes to ignore\n                elms.push({\n                    node: tagElm,\n                    idx: this.getTagIdx(tagData), // this.getNodeIndex(tagElm); // this.getTagIndexByValue(tagElm.textContent)\n                    data: getSetTagData(tagElm, {'__removed':true})\n                })\n\n            return elms\n        }, [])\n\n        tranDuration = typeof tranDuration == \"number\" ? tranDuration : this.CSSVars.tagHideTransition\n\n        if( _s.mode == 'select' ){\n            tranDuration = 0;\n            this.input.set.call(this)\n        }\n\n        // if only a single tag is to be removed.\n        // skip \"select\" mode because invalid tags are actually set to `this.value`\n        if( tagsToRemove.length == 1 && _s.mode != 'select' ){\n            if( tagsToRemove[0].node.classList.contains(_s.classNames.tagNotAllowed) )\n                silent = true\n        }\n\n        if( !tagsToRemove.length )\n            return;\n\n        return _s.hooks.beforeRemoveTag(tagsToRemove, {tagify:this})\n            .then(() => {\n                function removeNode( tag ){\n                    if( !tag.node.parentNode ) return\n\n                    tag.node.parentNode.removeChild(tag.node)\n\n                    if( !silent ){\n                        // this.removeValueById(tagData.__uid)\n                        this.dropdown.refilter()\n                        this.dropdown.position()\n                        this.DOM.input.normalize() // best-practice when in mix-mode (safe to do always anyways)\n\n                        // check if any of the current tags which might have been marked as \"duplicate\" should be un-marked\n                        if( _s.keepInvalidTags )\n                            this.reCheckInvalidTags()\n\n                        // below code is unfinished. it should iterate all currently invalid edited tags, which their edits have not\n                        // changed the value yet, and should re-trigger the check, but since nothing has changed, it does not work...\n                        // this.getTagElms(_s.classNames.tagEditing).forEach( this.events.callbacks.onEditTagBlur.bind )\n\n                            this.trigger('remove', { tag:tag.node, index:tag.idx, data:tag.data })\n                    }\n                    else if( _s.keepInvalidTags )\n                            this.trigger('remove', { tag:tag.node, index:tag.idx })\n                }\n\n                function animation( tag ){\n                    tag.node.style.width = parseFloat(window.getComputedStyle(tag.node).width) + 'px'\n                    document.body.clientTop // force repaint for the width to take affect before the \"hide\" class below\n                    tag.node.classList.add(_s.classNames.tagHide)\n\n                    // manual timeout (hack, since transitionend cannot be used because of hover)\n                    setTimeout(removeNode.bind(this), tranDuration, tag)\n                }\n\n                // update state regardless of animation\n                if( !silent ){\n                    this.removeTagsFromValue(tagsToRemove.map(tag => tag.node))\n                    this.update() // update the original input with the current value\n\n                    if( _s.mode == 'select' && _s.userInput )\n                        this.setContentEditable(true);\n                }\n\n                // \"removeNode\" should be called AFTER \"removeTagsFromValue\" has been called,\n                // so the \"remove\" event is triggered after the tag is removed from the DOM\n                if( tranDuration && tranDuration > 10 && tagsToRemove.length == 1 )\n                    animation.call(this, tagsToRemove[0])\n                else\n                    tagsToRemove.forEach(removeNode.bind(this))\n            })\n            .catch(reason => {})\n    },\n\n    removeTagsFromDOM(){\n        this.getTagElms().forEach(node => node.remove())\n    },\n\n    /**\n     * @param {Array/Node} tags to be removed from the this.value array\n     */\n    removeTagsFromValue( tags ){\n        tags = Array.isArray(tags) ? tags : [tags];\n\n        tags.forEach(tag => {\n            var tagData = getSetTagData(tag),\n                tagIdx = this.getTagIdx(tagData)\n\n            //  delete tagData.__removed\n\n            if( tagIdx > -1 )\n                this.value.splice(tagIdx, 1)\n        })\n    },\n\n    removeAllTags( opts ){\n        opts = opts || {}\n        this.value = []\n\n        if( this.settings.mode == 'mix' )\n            this.DOM.input.innerHTML = ''\n        else\n            this.removeTagsFromDOM()\n\n        this.dropdown.refilter()\n        this.dropdown.position()\n\n        if( this.state.dropdown.visible )\n            setTimeout(() => {\n                this.DOM.input.focus()\n            })\n\n        if( this.settings.mode == 'select' ){\n            this.input.set.call(this)\n            this.settings.userInput && this.setContentEditable(true)\n        }\n\n        const updateCallback = this.state.blockChangeEvent ? undefined : () => {\n            !this.state.blockChangeEvent && this.trigger('remove', {})\n        }\n\n        // technically for now only \"withoutChangeEvent\" exists in the opts.\n        // if more properties will be added later, only pass what's needed to \"update\"\n        this.update(opts, updateCallback)\n\n    },\n\n    postUpdate(){\n        this.state.blockChangeEvent = false\n\n        var _s = this.settings,\n            classNames = _s.classNames,\n            hasValue = _s.mode == 'mix'\n                ? _s.mixMode.integrated\n                    ? this.DOM.input.textContent\n                    : this.DOM.originalInput.value.trim()\n                : this.value.length + this.input.raw.call(this).length;\n\n        this.toggleClass(classNames.hasMaxTags, this.value.length >= _s.maxTags)\n        this.toggleClass(classNames.hasNoTags, !this.value.length)\n        this.toggleClass(classNames.empty, !hasValue)\n\n        // specifically the \"select mode\" might have the \"invalid\" classname set when the field is changed, so it must be toggled on add/remove/edit\n        if( _s.mode == 'select' ){\n            this.toggleScopeValidation(this.value?.[0]?.__isValid)\n        }\n    },\n\n    setOriginalInputValue( v ){\n        var inputElm = this.DOM.originalInput;\n\n        if( !this.settings.mixMode.integrated ){\n            inputElm.value = v\n            inputElm.tagifyValue = inputElm.value // must set to \"inputElm.value\" and not again to \"inputValue\" because for some reason the browser changes the string afterwards a bit.\n        }\n    },\n\n    /**\n     * update the origianl (hidden) input field's value.\n     * uses a debounced timeout to prevent multiple rapid updates\n     * see - https://stackoverflow.com/q/50957841/104380\n     */\n    update( args, cb ){\n        clearTimeout(this.debouncedUpdateTimeout)\n        this.debouncedUpdateTimeout = setTimeout(reallyUpdate.bind(this), UPDATE_DELAY)\n        this.events.bindOriginaInputListener.call(this, UPDATE_DELAY)\n\n        var inputValue = this.getInputValue();\n        this.setOriginalInputValue(inputValue)\n\n        function reallyUpdate() {\n            this.setPersistedData(inputValue, 'value')\n\n            if( (!this.settings.onChangeAfterBlur || !(args||{}).withoutChangeEvent) && !this.state.blockChangeEvent )\n                this.triggerChangeEvent()\n\n            this.postUpdate()\n\n            cb?.()\n        }\n    },\n\n    getInputValue(){\n        var value = this.getCleanValue();\n\n        return this.settings.mode == 'mix'\n            ? this.getMixedTagsAsString(value)\n            : value.length\n                ? this.settings.originalInputValueFormat\n                    ? this.settings.originalInputValueFormat(value)\n                    : JSON.stringify(value)\n                : \"\"\n    },\n\n    /**\n     * removes properties from `this.value` which are only used internally\n     */\n    getCleanValue(v){\n        return removeCollectionProp(v || this.value, this.dataProps);\n    },\n\n    getMixedTagsAsString(){\n        var result = \"\",\n            that = this,\n            _s = this.settings,\n            originalInputValueFormat = _s.originalInputValueFormat || JSON.stringify,\n            _interpolator = _s.mixTagsInterpolator;\n\n        function iterateChildren(rootNode){\n            rootNode.childNodes.forEach((node) => {\n                if( node.nodeType == 1 ){\n                    const tagData = getSetTagData(node);\n\n                    if( node.tagName == 'BR'  ){\n                        result += \"\\r\\n\";\n                    }\n\n                    if( tagData && isNodeTag.call(that, node) ){\n                        if( tagData.__removed )\n                            return;\n                        else\n                            result += _interpolator[0] + originalInputValueFormat( omit(tagData, that.dataProps) ) + _interpolator[1]\n                    }\n                    else if( node.getAttribute('style') || ['B', 'I', 'U'].includes(node.tagName)  )\n                        result += node.textContent;\n\n                    else if( node.tagName == 'DIV' || node.tagName == 'P' ){\n                        result += \"\\r\\n\";\n                        //  if( !node.children.length && node.textContent )\n                        //  result += node.textContent;\n                        iterateChildren(node)\n                    }\n                }\n                else\n                    result += node.textContent;\n            })\n        }\n\n        iterateChildren(this.DOM.input)\n\n        return result;\n    }\n}\n\n// legacy support for changed methods names\nTagify.prototype.removeTag = Tagify.prototype.removeTags\n\nexport default Tagify\n", "import { extend, logger } from './helpers'\r\n\r\nexport default function EventDispatcher( instance ){\r\n    // Create a DOM EventTarget object\r\n    var target = document.createTextNode(''),\r\n        // keep track of all binded events & their callbacks to be able to completely remove all listeners of a speicific type\r\n        callbacksPerType = {}\r\n\r\n    function addRemove(op, events, cb){\r\n        if( cb )\r\n            events.split(/\\s+/g).forEach(ev => target[op + 'EventListener'].call(target, ev, cb))\r\n    }\r\n\r\n    // Pass EventTarget interface calls to DOM EventTarget object\r\n    return {\r\n        // unbinds all events\r\n        removeAllCustomListeners(){\r\n            Object.entries(callbacksPerType).forEach(([ev, cbArr]) => {\r\n                cbArr.forEach(cb => addRemove('remove', ev, cb))\r\n            })\r\n\r\n            callbacksPerType = {}\r\n        },\r\n\r\n        off(events, cb){\r\n            if( events ) {\r\n                if( cb )\r\n                    addRemove('remove', events, cb)\r\n                else\r\n                    // if `cb` argument was not specified then remove all listeners for the given event(s) types\r\n                    events.split(/\\s+/g).forEach(ev => {\r\n                        callbacksPerType[ev]?.forEach(cb => addRemove('remove', ev, cb))\r\n                        delete callbacksPerType[ev]\r\n                    })\r\n            }\r\n\r\n            return this\r\n        },\r\n\r\n        on(events, cb){\r\n            if(cb && typeof cb == 'function') {\r\n                //track events callbacks to be able to remove them altogehter\r\n                events.split(/\\s+/g).forEach(ev => {\r\n                    if (Array.isArray(callbacksPerType[ev]) )\r\n                        callbacksPerType[ev].push(cb)\r\n                    else\r\n                        callbacksPerType[ev] = [cb]\r\n                })\r\n\r\n                addRemove('add', events, cb)\r\n            }\r\n\r\n            return this\r\n        },\r\n\r\n        trigger(eventName, data, opts){\r\n            var e;\r\n\r\n            opts = opts || {\r\n                cloneData:true\r\n            }\r\n\r\n            if( !eventName ) return;\r\n\r\n            if( instance.settings.isJQueryPlugin ){\r\n                if( eventName == 'remove' ) eventName = 'removeTag' // issue #222\r\n                jQuery(instance.DOM.originalInput).triggerHandler(eventName, [data])\r\n            }\r\n            else{\r\n                try {\r\n                    var eventData = typeof data === 'object'\r\n                        ? data\r\n                        : {value:data};\r\n\r\n                    eventData = opts.cloneData ? extend({}, eventData) : eventData\r\n                    eventData.tagify = this\r\n\r\n                    if( data.event )\r\n                        eventData.event = this.cloneEvent(data.event)\r\n\r\n                    // TODO: move the below to the \"extend\" function\r\n                    if( data instanceof Object )\r\n                        for( var prop in data )\r\n                            if(data[prop] instanceof HTMLElement)\r\n                                eventData[prop] = data[prop]\r\n\r\n                    e = new CustomEvent(eventName, {\"detail\":eventData})\r\n                }\r\n                catch(err){ logger.warn(err) }\r\n\r\n                target.dispatchEvent(e);\r\n            }\r\n        }\r\n    }\r\n}\r\n", "import {Controller} from '@hotwired/stimulus'\nimport Tagify from '@yaireo/tagify'\n\nexport default class extends Controller {\n    static values = {\n        suggestions: Array,\n        userInput: {type: Boolean, default: true},\n        dropdownFooterText: {type: String, default: 'more items. Refine your search.'}\n    }\n\n    connect() {\n        let dropdownFooterText = this.dropdownFooterTextValue // Template options does not have access to 'this' object.\n\n        new Tagify(this.element, {\n            whitelist: this.suggestionsValue,\n            userInput: this.userInputValue,\n            dropdown: {\n                enabled: 0,\n                maxItems: 5\n            },\n            originalInputValueFormat: values => values.map(item => item.value).join(', '),\n            templates: {\n                dropdownFooter(suggestions) {\n                    let additionalSuggestions = suggestions.length - this.settings.dropdown.maxItems\n\n                    if (additionalSuggestions > 0) {\n                        return `<footer data-selector='tagify-suggestions-footer' class=\"${this.settings.classNames.dropdownFooter}\">${additionalSuggestions} ${dropdownFooterText}</footer>`\n                    } else {\n                        return ''\n                    }\n                }\n            }\n        })\n    }\n}\n", "import {Controller} from \"@hotwired/stimulus\"\nimport { Modal } from \"bootstrap\"\n\n// Gleiche Logik wie in resize_controller.js: Der Fokus kehrt erst nach dem Ausblenden des Dialogs\n// zur\u00FCck, danach liest der Screenreader die Checkbox. Der Toast soll erst danach angesagt werden.\nconst MODAL_HIDE_DELAY_MS = 350\nconst ANNOUNCE_HOLD_MS = 1500\n\nexport default class extends Controller {\n    static targets = [\"checkbox\", \"card\", \"status\", \"titleStatus\", \"titleLink\"]\n    static values = { completedText: String, openText: String }\n\n    connect(){\n        if(this.checkboxTarget.checked){\n            this._lock()\n        }\n    }\n\n    toggle() {\n        if (this.locked) return\n\n        const url = this.element.dataset.updateUrl\n        if (!url) return\n\n        if (this.checkboxTarget.checked) {\n            this.checkboxTarget.checked = false\n\n            this._confirmCompletion().then(confirmed => {\n                if (confirmed) {\n                    this.checkboxTarget.checked = true\n                    this._submit(url, true)\n                }\n            })\n        } else {\n            this._submit(url, false)\n        }\n    }\n\n    _confirmCompletion() {\n\n        const modalElement = document.getElementById(\"task-completion-confirm-modal\")\n        const modal = Modal.getOrCreateInstance(modalElement)\n        const confirmBtn = modalElement.querySelector(\"[data-confirm-btn]\")\n\n        return new Promise(resolve => {\n            const cleanup = () =>\n            {\n                confirmBtn.removeEventListener(\"click\", onConfirm)\n                modalElement.removeEventListener(\"hidden.bs.modal\", onHidden)\n            }\n\n            const onConfirm = () => {\n                cleanup();\n                // Fokus erst nach dem Ausblenden des Dialogs zur\u00FCckgeben, sonst kollidiert er\n                // mit dem Schlie\u00DFen. Bootstrap tut das bei programmatisch ge\u00F6ffneten Modals nicht.\n                // Die Checkbox ist dann gesperrt und f\u00FCr Screenreader ausgeblendet, der Fokus geht\n                // deshalb auf den Titel-Link (\"Aufgabe Titel ist abgeschlossen\").\n                modalElement.addEventListener(\"hidden.bs.modal\", () => this._focusTitle(), { once: true })\n                window.a11yHoldAnnouncements?.(MODAL_HIDE_DELAY_MS + ANNOUNCE_HOLD_MS)\n                this.pendingFocus = true\n                modal.hide()\n                resolve(true)\n            }\n            const onHidden = () => {\n                cleanup()\n                window.refocusAndScrollIntoView(this.checkboxTarget)\n                resolve(false)\n            }\n            confirmBtn.addEventListener(\"click\", onConfirm)\n            modalElement.addEventListener(\"hidden.bs.modal\", onHidden)\n\n            modal.show()\n        })\n    }\n\n    _submit(url, completed) {\n        this._lock()\n        this.cardTarget.classList.toggle(\"task-card--completed\", completed)\n        this._updateStatus(completed)\n\n        fetch(url, {\n            method: \"PATCH\",\n            headers: {\n                \"Content-Type\": \"application/json\",\n                \"X-CSRF-Token\": document.querySelector('meta[name=\"csrf-token\"]').content\n            },\n            body: JSON.stringify({})\n        }).then(response => {\n            if (!response.ok) throw new Error(\"Network response was not ok\")\n            if (completed) {\n                this._showSuccessToast()\n            } else {\n                this._unlock()\n            }\n        }).catch(error => {\n            this.checkboxTarget.checked = !completed\n            this.cardTarget.classList.toggle(\"task-card--completed\", !completed)\n            this._updateStatus(!completed)\n            this._unlock()\n            console.log(error)\n        })\n    }\n\n    // F\u00FCgt den Erfolgs-Toast in #flashNotices ein. Das Markup kommt aus dem <template> der View\n    // (gerendert \u00FCber flash_notice_tag, also identisch zu allen anderen Growls). Beim Einf\u00FCgen\n    // verbindet sich der toast-Controller, zeigt den Toast und sagt ihn an.\n    // Bewusst ohne Fehlerfall: fehlt Template oder Container, passiert nichts, damit der\n    // catch-Zweig in _submit den erfolgreichen Abschluss nicht zur\u00FCckrollt.\n    _showSuccessToast() {\n        const toast = document.getElementById(\"task-completed-toast-template\")?.content?.firstElementChild\n        const container = document.getElementById(\"flashNotices\")\n        if (!toast || !container) return\n\n        container.appendChild(toast.cloneNode(true))\n    }\n\n    // Status-Label (Teil des Checkbox-Namens per aria-labelledby) und Status am Ende des\n    // Titel-Links (\"Aufgabe Titel ist (nicht) abgeschlossen\") mitf\u00FChren, sonst bleiben nach dem\n    // Abschlie\u00DFen die alten Texte stehen, bis das Widget neu geladen wird.\n    _updateStatus(completed) {\n        const text = completed ? this.completedTextValue : this.openTextValue\n        if (this.hasStatusTarget) this.statusTarget.textContent = text\n        if (this.hasTitleStatusTarget) this.titleStatusTarget.textContent = text\n    }\n\n    _focusTitle() {\n        this.pendingFocus = false\n        if (this.hasTitleLinkTarget) this.titleLinkTarget.focus()\n        if (this.locked) this._disableCheckbox()\n    }\n\n    // Abgeschlossene Aufgaben lassen sich nicht wieder \u00F6ffnen. Die Checkbox ist dann deaktiviert\n    // und f\u00FCr Screenreader ausgeblendet: Der Status steht im Titel-Link (\"Aufgabe Titel ist\n    // abgeschlossen\"), von der Checkbox wird nichts mehr vorgelesen.\n    _lock() {\n        this.locked = true\n        if (!this.pendingFocus)\n            this._disableCheckbox()\n    }\n\n    _disableCheckbox() {\n        this.checkboxTarget.disabled = true\n        this.checkboxTarget.setAttribute(\"aria-hidden\", \"true\")\n    }\n\n\n    _unlock() {\n        this.locked = false\n        this.checkboxTarget.disabled = false\n        this.checkboxTarget.removeAttribute(\"aria-hidden\")\n    }\n}", "import {Controller} from '@hotwired/stimulus'\nimport {Toast} from 'bootstrap'\n\nlet announceTimeout = null\n// Toasts that appear together (e.g. a notice and a success from one request) are collected and announced in one\n// text, in the order they were inserted. Otherwise each new toast would overwrite the announcement of the previous one.\nlet pendingMessages = []\n\n// Messages that already end like a sentence stay as they are\nconst SENTENCE_END = /[.!?:]$/\n\n// Adds a period to messages without a sentence end. Otherwise the screen reader would read several messages\n// as one long sentence without a pause.\nfunction toSentence(message) {\n    return SENTENCE_END.test(message) ? message : `${message}.`\n}\n\n// Every toast is the result of something the user just did, so it is announced immediately via the assertive\n// live region of the layout (layouts/partials/_live_regions.html.erb).\nexport default class extends Controller {\n    connect() {\n        new Toast(this.element).show()\n\n        const announcer = document.getElementById('sr-announcer')\n        const message = this.element.querySelector('.toast-body')?.textContent?.trim() ?? ''\n        if (!announcer || !message) return\n\n        if (!pendingMessages.includes(message)) pendingMessages.push(message)\n        clearTimeout(announceTimeout)\n        // Clear first, so the same text is announced again when it appears a second time\n        announcer.textContent = ''\n\n        const delay = window.a11yAnnounceDelay?.(300) ?? 300\n        announceTimeout = setTimeout(() => {\n            announcer.textContent = pendingMessages.map(toSentence).join(' ')\n            pendingMessages = []\n            announceTimeout = null\n        }, delay)\n    }\n}\n", "import {Controller} from \"@hotwired/stimulus\"\n\n/*\n * This controller is bound to an outer container element.\n * \"selector\" target is a select field, \"toggleable\" are elements to show/hide, \"clearable\" an optional element to clear\n *  on toggle.\n *\n * HTML setup:\n * 1.Bind this controller to a container element, that contains a select field and elements to toggle.\n * 2 Mark a select field as \"selector\" target and other (at least one) elements as \"toggleable\" targets.\n * 3.Set data-toggle-initial-option-value on the container to the default value of the select field.\n * 4.Set data-toggle-value on the \"toggleable\" target to the default value.\n * 5. Optionally enable clear on toggle by setting data-toggle-clear-on-toggle-value=\"true\" on the container and\n * marking an element (inout, textarea or select field) as \"clearable\" target.\n *\n * Result:\n * While the \"toggleable\" target with the default value is shown, other \"toggleable\" targets are hidden.\n * By selecting a different option in the \"selector\" target, the visibility of \"toggleable\" targets is updated.\n * An optional element is cleared when toggling if configured.\n */\n\nexport default class extends Controller {\n    static targets = [\"selector\", \"toggleable\", \"clearable\"];\n\n    static values = {\n        initialOption: { type: String },\n        clearOnToggle: { type: Boolean }\n    };\n\n    connect() {\n        console.log(\"ToggleController connected\");\n\n        if (this.selectorTarget.value !== this.initialOptionValue) {\n            this.selectorTarget.value = this.initialOptionValue;\n        }\n\n        this._initializeToggles();\n    }\n\n    _initializeToggles() {\n        this._updateVisibility(this.initialOptionValue);\n    }\n\n    _updateVisibility(selectedValue) {\n        this.toggleableTargets.forEach(element => {\n            element.classList.toggle(\"d-none\", element.dataset.toggleValue !== selectedValue);\n        });\n    }\n\n    toggle(event) {\n        this._updateVisibility(event.target.value);\n        this._clearTarget();\n    }\n\n    _clearTarget() {\n        if (!this.clearOnToggleValue) return;\n        if (!this.hasClearableTarget) return;\n\n        const el = this.clearableTarget;\n\n        // Possible targets: Inputs / textareas / selects\n        if ('value' in el) {\n            if (el.value === \"\") return;\n            el.value = \"\";\n            el.dispatchEvent(new InputEvent('input', { bubbles: true, cancelable: true }));\n            return;\n        }\n\n        // Fallback for non-input elements\n        if (el.textContent && el.textContent.trim() !== \"\") {\n            el.textContent = \"\";\n            el.dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));\n        }\n    }\n}\n", "import {Controller} from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"toggle-radio-group\"\nexport default class extends Controller {\n    static targets = [\"checkBox\", \"radioGroupLabel\", \"radioGroup\", \"radioBtn\"];\n\n    connect() {\n        this.toggle();\n    }\n\n    toggle() {\n        const checkBox = document.getElementById('rated-question-checkbox');\n\n        if (checkBox.checked) {\n            this.enable();\n        } else {\n            this.disable();\n        }\n    }\n\n    enable() {\n        this.radioGroupLabelTargets.forEach(label => {\n            label.classList.add('required');\n        });\n\n        this.radioGroupTargets.forEach(group => {\n            group.classList.remove('disabled');\n        });\n\n        this.radioBtnTargets.forEach(btn => {\n            btn.removeAttribute('disabled');\n            btn.setAttribute('required', 'required');\n        });\n    }\n\n    disable() {\n        this.radioGroupLabelTargets.forEach(label => {\n            label.classList.remove('required');\n        });\n\n        this.radioGroupTargets.forEach(group => {\n            group.classList.add('disabled');\n        });\n\n        this.radioBtnTargets.forEach(btn => {\n            btn.setAttribute('disabled', 'disabled');\n            btn.removeAttribute('required');\n            btn.checked = false;\n        });\n    }\n}\n", "/*\n  Since an optional course shouldn't block access to the following courses, this stimulus keeps the \"optional\" and\n  \"stop_when_not_done\" checkboxes of a tutorial_series_course mutually exclusive.\n*/\n\nimport {Controller} from '@hotwired/stimulus'\n\nexport default class extends Controller {\n    static targets = ['optional', 'stopWhenNotDone']\n\n    toggleOptional() {\n        if (this.optionalTarget.checked && this.stopWhenNotDoneTarget.checked) {\n            this.stopWhenNotDoneTarget.checked = false\n        }\n    }\n\n    toggleStopWhenNotDone() {\n        if (this.stopWhenNotDoneTarget.checked && this.optionalTarget.checked) {\n            this.optionalTarget.checked = false\n        }\n    }\n}\n", "// Keeps the radio selection and Bootstrap collapse panels in sync so the last\n// clicked option always wins, even while other panels are still animating.\nimport { Controller } from \"@hotwired/stimulus\"\nimport { Collapse } from \"bootstrap\"\n\nexport default class extends Controller {\n  static targets = [\"form\", \"radio\", \"panel\"]\n  static values = {\n    confirmMessage: String\n  }\n\n  connect() {\n    this.currentValue = this.selectedValue()\n    this.handleCollapseChange = this.syncStates.bind(this)\n\n    this.panelTargets.forEach((panel) => {\n      Collapse.getOrCreateInstance(panel, { toggle: false })\n      panel.addEventListener(\"shown.bs.collapse\", this.handleCollapseChange)\n      panel.addEventListener(\"hidden.bs.collapse\", this.handleCollapseChange)\n    })\n\n    this.renderInitialState()\n  }\n\n  disconnect() {\n    this.panelTargets.forEach((panel) => {\n      panel.removeEventListener(\"shown.bs.collapse\", this.handleCollapseChange)\n      panel.removeEventListener(\"hidden.bs.collapse\", this.handleCollapseChange)\n    })\n  }\n\n  change(event) {\n    const nextValue = event.target.value\n\n    if (nextValue === \"0\" && !window.confirm(this.confirmMessageValue)) {\n      this.syncRadios(this.currentValue)\n      return\n    }\n\n    this.currentValue = nextValue\n    this.syncStates()\n\n    if (nextValue === \"0\") {\n      this.submitForm()\n    }\n  }\n\n  selectedValue() {\n    return this.radioTargets.find((radio) => radio.checked)?.value\n  }\n\n  renderInitialState() {\n    const selectedPanel = this.findPanel(this.currentValue)\n\n    this.syncRadios(this.currentValue)\n    this.panelTargets.forEach((panel) => {\n      this.setPanelState(panel, panel === selectedPanel)\n    })\n  }\n\n  syncStates() {\n    const selectedPanel = this.findPanel(this.currentValue)\n\n    this.syncRadios(this.currentValue)\n    this.closeWrongPanels(selectedPanel)\n\n    if (!selectedPanel || this.wrongPanelsAreStillActive(selectedPanel)) {\n      return\n    }\n\n    this.openPanel(selectedPanel)\n  }\n\n  syncRadios(selectedValue) {\n    this.radioTargets.forEach((radio) => {\n      const isSelected = radio.value === selectedValue\n      radio.checked = isSelected\n      radio.setAttribute(\"aria-expanded\", String(isSelected))\n    })\n  }\n\n  closeWrongPanels(selectedPanel) {\n    this.panelTargets.forEach((panel) => {\n      if (panel === selectedPanel || !this.panelIsActive(panel)) {\n        return\n      }\n\n      panel.setAttribute(\"aria-hidden\", \"true\")\n      this.collapseFor(panel).hide()\n    })\n  }\n\n  wrongPanelsAreStillActive(selectedPanel) {\n    return this.panelTargets.some((panel) => panel !== selectedPanel && this.panelIsActive(panel))\n  }\n\n  openPanel(panel) {\n    panel.setAttribute(\"aria-hidden\", \"false\")\n\n    if (this.panelIsActive(panel)) {\n      return\n    }\n\n    this.collapseFor(panel).show()\n  }\n\n  panelIsActive(panel) {\n    return panel.classList.contains(\"show\") || panel.classList.contains(\"collapsing\")\n  }\n\n  findPanel(value) {\n    return this.panelTargets.find((panel) => panel.dataset.timeType === value)\n  }\n\n  collapseFor(panel) {\n    return Collapse.getOrCreateInstance(panel, { toggle: false })\n  }\n\n  setPanelState(panel, open) {\n    panel.classList.remove(\"collapsing\")\n    panel.classList.toggle(\"show\", open)\n    panel.style.height = \"\"\n    panel.setAttribute(\"aria-hidden\", String(!open))\n  }\n\n  submitForm() {\n    if (typeof this.formTarget.requestSubmit === \"function\") {\n      this.formTarget.requestSubmit()\n    } else {\n      this.formTarget.submit()\n    }\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nconst optionSelector = \"[role='option']:not([aria-disabled])\"\nconst activeSelector = \"[aria-selected='true']\"\n\nexport default class Autocomplete extends Controller {\n  static targets = [\"input\", \"hidden\", \"results\"]\n  static classes = [\"selected\"]\n  static values = {\n    ready: Boolean,\n    submitOnEnter: Boolean,\n    url: String,\n    minLength: Number,\n    delay: { type: Number, default: 300 },\n    queryParam: { type: String, default: \"q\" },\n  }\n  static uniqOptionId = 0\n\n  connect() {\n    this.close()\n\n    if(!this.inputTarget.hasAttribute(\"autocomplete\")) this.inputTarget.setAttribute(\"autocomplete\", \"off\")\n    this.inputTarget.setAttribute(\"spellcheck\", \"false\")\n\n    this.mouseDown = false\n\n    this.onInputChange = debounce(this.onInputChange, this.delayValue)\n\n    this.inputTarget.addEventListener(\"keydown\", this.onKeydown)\n    this.inputTarget.addEventListener(\"blur\", this.onInputBlur)\n    this.inputTarget.addEventListener(\"input\", this.onInputChange)\n    this.resultsTarget.addEventListener(\"mousedown\", this.onResultsMouseDown)\n    this.resultsTarget.addEventListener(\"click\", this.onResultsClick)\n\n    if (this.inputTarget.hasAttribute(\"autofocus\")) {\n      this.inputTarget.focus()\n    }\n\n    this.readyValue = true\n  }\n\n  disconnect() {\n    if (this.hasInputTarget) {\n      this.inputTarget.removeEventListener(\"keydown\", this.onKeydown)\n      this.inputTarget.removeEventListener(\"blur\", this.onInputBlur)\n      this.inputTarget.removeEventListener(\"input\", this.onInputChange)\n    }\n\n    if (this.hasResultsTarget) {\n      this.resultsTarget.removeEventListener(\"mousedown\", this.onResultsMouseDown)\n      this.resultsTarget.removeEventListener(\"click\", this.onResultsClick)\n    }\n  }\n\n  sibling(next) {\n    const options = this.options\n    const selected = this.selectedOption\n    const index = options.indexOf(selected)\n    const sibling = next ? options[index + 1] : options[index - 1]\n    const def = next ? options[0] : options[options.length - 1]\n    return sibling || def\n  }\n\n  select(target) {\n    const previouslySelected = this.selectedOption\n    if (previouslySelected) {\n      previouslySelected.removeAttribute(\"aria-selected\")\n      previouslySelected.classList.remove(...this.selectedClassesOrDefault)\n    }\n\n    target.setAttribute(\"aria-selected\", \"true\")\n    target.classList.add(...this.selectedClassesOrDefault)\n    this.inputTarget.setAttribute(\"aria-activedescendant\", target.id)\n    target.scrollIntoView({ behavior: \"auto\", block: \"nearest\" })\n  }\n\n  onKeydown = (event) => {\n    const handler = this[`on${event.key}Keydown`]\n    if (handler) handler(event)\n  }\n\n  onEscapeKeydown = (event) => {\n    if (!this.resultsShown) return\n\n    this.hideAndRemoveOptions()\n    event.stopPropagation()\n    event.preventDefault()\n  }\n\n  onArrowDownKeydown = (event) => {\n    const item = this.sibling(true)\n    if (item) this.select(item)\n    event.preventDefault()\n  }\n\n  onArrowUpKeydown = (event) => {\n    const item = this.sibling(false)\n    if (item) this.select(item)\n    event.preventDefault()\n  }\n\n  onTabKeydown = (event) => {\n    const selected = this.selectedOption\n    if (selected) this.commit(selected)\n  }\n\n  onEnterKeydown = (event) => {\n    const selected = this.selectedOption\n    if (selected && this.resultsShown) {\n      this.commit(selected)\n      if (!this.hasSubmitOnEnterValue) {\n        event.preventDefault()\n      }\n    }\n  }\n\n  onInputBlur = () => {\n    if (this.mouseDown) return\n    this.close()\n  }\n\n  commit(selected) {\n    if (selected.getAttribute(\"aria-disabled\") === \"true\") return\n\n    if (selected instanceof HTMLAnchorElement) {\n      selected.click()\n      this.close()\n      return\n    }\n\n    const textValue = selected.getAttribute(\"data-autocomplete-label\") || selected.textContent.trim()\n    const value = selected.getAttribute(\"data-autocomplete-value\") || textValue\n    this.inputTarget.value = textValue\n\n    if (this.hasHiddenTarget) {\n      this.hiddenTarget.value = value\n      this.hiddenTarget.dispatchEvent(new Event(\"input\"))\n      this.hiddenTarget.dispatchEvent(new Event(\"change\"))\n    } else {\n      this.inputTarget.value = value\n    }\n\n    this.inputTarget.focus()\n    this.hideAndRemoveOptions()\n\n    this.element.dispatchEvent(\n      new CustomEvent(\"autocomplete.change\", {\n        bubbles: true,\n        detail: { value: value, textValue: textValue, selected: selected }\n      })\n    )\n  }\n\n  clear() {\n    this.inputTarget.value = \"\"\n    if (this.hasHiddenTarget) this.hiddenTarget.value = \"\"\n  }\n\n  onResultsClick = (event) => {\n    if (!(event.target instanceof Element)) return\n    const selected = event.target.closest(optionSelector)\n    if (selected) this.commit(selected)\n  }\n\n  onResultsMouseDown = () => {\n    this.mouseDown = true\n    this.resultsTarget.addEventListener(\"mouseup\", () => {\n      this.mouseDown = false\n    }, { once: true })\n  }\n\n  onInputChange = () => {\n    if (this.hasHiddenTarget) this.hiddenTarget.value = \"\"\n\n    const query = this.inputTarget.value.trim()\n    if (query && query.length >= this.minLengthValue) {\n      this.fetchResults(query)\n    } else {\n      this.hideAndRemoveOptions()\n    }\n  }\n\n  identifyOptions() {\n    const prefix = this.resultsTarget.id || \"stimulus-autocomplete\"\n    const optionsWithoutId = this.resultsTarget.querySelectorAll(`${optionSelector}:not([id])`)\n    optionsWithoutId.forEach(el => el.id = `${prefix}-option-${Autocomplete.uniqOptionId++}`)\n  }\n\n  hideAndRemoveOptions() {\n    this.close()\n    this.resultsTarget.innerHTML = null\n  }\n\n  fetchResults = async (query) => {\n    if (!this.hasUrlValue) return\n\n    const url = this.buildURL(query)\n    try {\n      this.element.dispatchEvent(new CustomEvent(\"loadstart\"))\n      const html = await this.doFetch(url)\n      this.replaceResults(html)\n      this.element.dispatchEvent(new CustomEvent(\"load\"))\n      this.element.dispatchEvent(new CustomEvent(\"loadend\"))\n    } catch(error) {\n      this.element.dispatchEvent(new CustomEvent(\"error\"))\n      this.element.dispatchEvent(new CustomEvent(\"loadend\"))\n      throw error\n    }\n  }\n\n  buildURL(query) {\n    const url = new URL(this.urlValue, window.location.href)\n    const params = new URLSearchParams(url.search.slice(1))\n    params.append(this.queryParamValue, query)\n    url.search = params.toString()\n\n    return url.toString()\n  }\n\n  doFetch = async (url) => {\n    const response = await fetch(url, this.optionsForFetch())\n\n    if (!response.ok) {\n      throw new Error(`Server responded with status ${response.status}`)\n    }\n\n    const html = await response.text()\n    return html\n  }\n\n  replaceResults(html) {\n    this.resultsTarget.innerHTML = html\n    this.identifyOptions()\n    if (!!this.options) {\n      this.open()\n    } else {\n      this.close()\n    }\n  }\n\n  open() {\n    if (this.resultsShown) return\n\n    this.resultsShown = true\n    this.element.setAttribute(\"aria-expanded\", \"true\")\n    this.element.dispatchEvent(\n      new CustomEvent(\"toggle\", {\n        detail: { action: \"open\", inputTarget: this.inputTarget, resultsTarget: this.resultsTarget }\n      })\n    )\n  }\n\n  close() {\n    if (!this.resultsShown) return\n\n    this.resultsShown = false\n    this.inputTarget.removeAttribute(\"aria-activedescendant\")\n    this.element.setAttribute(\"aria-expanded\", \"false\")\n    this.element.dispatchEvent(\n      new CustomEvent(\"toggle\", {\n        detail: { action: \"close\", inputTarget: this.inputTarget, resultsTarget: this.resultsTarget }\n      })\n    )\n  }\n\n  get resultsShown() {\n    return !this.resultsTarget.hidden\n  }\n\n  set resultsShown(value) {\n    this.resultsTarget.hidden = !value\n  }\n\n  get options() {\n    return Array.from(this.resultsTarget.querySelectorAll(optionSelector))\n  }\n\n  get selectedOption() {\n    return this.resultsTarget.querySelector(activeSelector)\n  }\n\n  get selectedClassesOrDefault() {\n    return this.hasSelectedClass ? this.selectedClasses : [\"active\"]\n  }\n\n  optionsForFetch() {\n    return { headers: { \"X-Requested-With\": \"XMLHttpRequest\" } } // override if you need\n  }\n}\n\nconst debounce = (fn, delay = 10) => {\n  let timeoutId = null\n\n  return (...args) => {\n    clearTimeout(timeoutId)\n    timeoutId = setTimeout(fn, delay)\n  }\n}\n\nexport { Autocomplete }\n", "import AutocompleteController from 'stimulus-autocomplete'\nimport {toast} from '../components/utility/toast'\n\nexport default class extends AutocompleteController {\n    static targets = ['loader']\n\n    initialize() {\n        this._handleAutocompleteLoadStart = this._handleAutocompleteLoadStart.bind(this)\n        this._handleAutocompleteLoadEnd = this._handleAutocompleteLoadEnd.bind(this)\n    }\n\n    connect() {\n        super.element.addEventListener('loadstart', this._handleAutocompleteLoadStart)\n        super.element.addEventListener('loadend', this._handleAutocompleteLoadEnd)\n        super.connect()\n    }\n\n    disconnect() {\n        super.element.removeEventListener('loadstart', this._handleAutocompleteLoadStart)\n        super.element.removeEventListener('loadend', this._handleAutocompleteLoadEnd)\n        super.disconnect()\n    }\n\n    _handleAutocompleteLoadStart(_event) {\n        if (this.hasLoaderTarget) this.loaderTarget.innerHTML = '<i class=\"fas fa-spinner fa-spin\"></i>'\n    }\n\n    _handleAutocompleteLoadEnd(_event) {\n        if (this.hasLoaderTarget) this.loaderTarget.innerHTML = '<i class=\"fas fa-search\"></i>'\n    }\n\n    // Override doFetch: a 401 here means the session is no longer valid (expired, or access was revoked).\n    // The toast is shown directly from the response body instead of relying on the flash set by the reload's\n    // server-side redirect, since that flash is shared on the session and can be cleared by another concurrent\n    // request (e.g. a heartbeat or another tab) before the redirected page gets to render it.\n    doFetch = async (url) => {\n        const response = await fetch(url, this.optionsForFetch())\n\n        if (response.status === 401) {\n            if (!this._sessionExpired) {\n                this._sessionExpired = true\n                toast(await response.text(), 'error')\n                setTimeout(() => window.location.reload(), 3000)\n            }\n            return ''\n        }\n        if (!response.ok) throw new Error(`Server responded with status ${response.status}`)\n\n        return response.text()\n    }\n\n    // Override replaceResults method to check for empty results and showing empty lists.\n    replaceResults(html) {\n        this.resultsTarget.innerHTML = html\n        this.identifyOptions()\n        if (!!this.options && (html.length > 0)) {\n            this.open()\n        } else {\n            this.close()\n        }\n    }\n}\n", "import {Controller} from '@hotwired/stimulus'\nimport {debounce} from 'debounce'\n\nexport default class extends Controller {\n    static targets = ['input', 'validateCustomInputsTrigger']\n    static values = {\n        debug: {type: Boolean, default: false},\n        disableSubmitButtons: {type: Boolean, default: false}\n    }\n\n    initialize() {\n        this.validateInput = debounce(this.validateInput, 500)\n        this._handleFormChange = debounce(this._handleFormChange.bind(this), 500)\n    }\n\n    connect() {\n        this._addEventListeners()\n        this._validateAllCustomInputs()\n        if (this.disableSubmitButtonsValue) this._toggleSubmitButtons(this.element.checkValidity())\n    }\n\n    disconnect() {\n        this._removeEventListeners()\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    validateCustomInputsTriggerTargetDisconnected() {\n        this._log('a validateCustomInputsTrigger disconnected')\n        this._validateAllCustomInputs()\n    }\n\n    validateInput(event) {\n        const input = event.target\n        this._log(`validateInput called for ${input.name}`)\n        input.dataset.validates.split(' ').forEach(validator => {\n            this[`_${validator}`](input)\n        })\n    }\n\n    _validateAllCustomInputs() {\n        this._log('_validateAllCustomInputs called')\n        Array.prototype.forEach.call(this.inputTargets, (input, _index) => {\n            input.dataset.validates.split(' ').forEach(validator => {\n                this[`_${validator}`](input)\n            })\n        })\n    }\n\n    _validateAllOtherCustomInputs(event) {\n        this._log('_validateAllOtherCustomInputs called')\n        let otherInputs = this.inputTargets\n        let indexOfTarget = otherInputs.indexOf(event.target)\n        if (indexOfTarget > -1) otherInputs.splice(indexOfTarget, 1)\n        Array.prototype.forEach.call(otherInputs, (input, _index) => {\n            input.dataset.validates.split(' ').forEach(validator => {\n                this[`_${validator}`](input)\n            })\n        })\n    }\n\n    _addEventListeners() {\n        this.element.addEventListener('input', this._handleFormChange)\n        this.element.addEventListener('change', this._handleFormChange)\n    }\n\n    _removeEventListeners() {\n        this.element.removeEventListener('input', this._handleFormChange)\n        this.element.removeEventListener('change', this._handleFormChange)\n    }\n\n    _handleFormChange(event) {\n        this._log('_handleFormChange called')\n        this._validateAllOtherCustomInputs(event)\n        if (this.disableSubmitButtonsValue) this._toggleSubmitButtons(event.currentTarget.checkValidity())\n    }\n\n    _toggleSubmitButtons(bool) {\n        this._log(`_toggleSubmitButtons called with '${bool}'`)\n        Array.prototype.forEach.call(this.element.querySelectorAll('[type=\"submit\"]'), (input, _index) => {\n            input.disabled = !bool\n        })\n    }\n\n    _log(message) {\n        if (this.debugValue === true) console.log(`DEBUG validation: ${message}`)\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _requireWhenOtherFieldNotEmpty(input) {\n        const otherField = this.element.querySelector(input.dataset.otherFieldSelector)\n        if (['checkbox', 'radio'].includes(otherField.type)) {\n            input.required = otherField.checked\n        } else {\n            input.required = otherField.value !== ''\n        }\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _requireWhenOtherFieldEmpty(input) {\n        const otherField = this.element.querySelector(input.dataset.otherFieldSelector)\n        if (['checkbox', 'radio'].includes(otherField.type)) {\n            input.required = !otherField.checked\n        } else {\n            input.required = otherField.value === ''\n        }\n    }\n\n    /**\n     * Makes a field required when other fields are empty.\n     *\n     * The parameter \"other_fields_selectors\" must be used on field definition to send\n     * the field selectors separated by commas.\n     * @example\n     *   other_fields_selectors: '#checkbox1,#online_appointment,#join_url'\n     */\n    _requireWhenOtherFieldsEmpty(input) {\n        let fieldStates = [];\n        const selectors = input.dataset.otherFieldsSelectors.split(',');\n\n        // Go through every field, check the status and store it in an array.\n        for (const selector of selectors) {\n            const otherField = this.element.querySelector(selector.trim())\n            if (['checkbox', 'radio'].includes(otherField.type)) {\n                fieldStates.push(!otherField.checked)\n            } else {\n                fieldStates.push(otherField.value === '')\n            }\n        }\n        // Check that every element in the array is true to set the required attribute accordingly.\n        let checker = arr => arr.every(element => element === true);\n        input.required = checker(fieldStates);\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _fieldValueEquality(input) {\n        const otherField = this.element.querySelector(input.dataset.equalFieldSelector)\n        const inputValid = input?.value === otherField?.value\n        this._setCustomValidity(input, inputValid)\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _minValueOfOtherField(input) {\n        const otherField = this.element.querySelector(input.dataset.minValueFieldSelector)\n\n        if (input.type === 'date' && otherField.type === 'date') {\n            input.min = otherField.value || ''\n        } else {\n            input.min = parseInt(otherField.value)\n        }\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _remoteValidation(input) {\n        if (input.value) {\n            const ajaxData = input.dataset.ajaxDataParams + input.value\n            Rails.ajax({\n                type: 'GET', url: input.dataset.remoteValidationUrl, data: ajaxData,\n                success: (response) => {\n                    this._setCustomValidity(input, response)\n                }\n            })\n        } else {\n            this._setCustomValidity(input, true)\n        }\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _notInListOfGroup(input) {\n        // Get all other elements of the form that must be unique from given query selector.\n        const inputs = this.element.querySelectorAll(input.dataset.notInListOfGroupSelector)\n        this._checkForNotInListOfGroup(inputs, input)\n\n        let otherInputs = [...inputs]\n        let indexOfTarget = otherInputs.indexOf(input)\n        if (indexOfTarget > -1) otherInputs.splice(indexOfTarget, 1)\n        Array.prototype.forEach.call(otherInputs, (input, _index) => {\n            this._checkForNotInListOfGroup(inputs, input)\n        })\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _fileSize(input) {\n        let maxFileSize = input.dataset.maxFileSize\n        let file = input.files[0]\n        this._setCustomValidity(input, !(file && file.size > maxFileSize))\n    }\n\n    // noinspection JSUnusedGlobalSymbols\n    _otherFieldHasSpecificValue(input) {\n        const otherField = this.element.querySelector(input.dataset.otherFieldSelector)\n        input.required = otherField.value === input.dataset.specificValue\n    }\n\n    // Extracted method to make checks for unique list more convenient.\n    // @param inputs: a list of input nodes whose values will be checked.\n    // @param input: given input node that triggered the check.\n    _checkForNotInListOfGroup(inputs, input) {\n        // Map the value of given inputs.\n        let values = [].map.call(inputs, input => input.value)\n        // Find first match of current input value in given array and remove it if found.\n        const index = values.indexOf(input.value)\n        if (index > -1) values.splice(index, 1)\n        // Check if current input value is still in the list and return false if so.\n        this._setCustomValidity(input, !values.includes(input.value))\n    }\n\n    _setCustomValidity(element, response) {\n        if (typeof response == 'boolean')\n            if (element.title.length > 0) {\n                response ? element.setCustomValidity('') : element.setCustomValidity(element.title)\n            } else {\n                this._log('cannot assign custom validity because element title is not present')\n            }\n        else {\n            element.setCustomValidity(response)\n        }\n    }\n}\n", "// This file is auto-generated by ./bin/rails stimulus:manifest:update\n// Run that command whenever you add a new controller or create them with\n// ./bin/rails generate stimulus controllerName\n\nimport AlphabeticSortToggleController from './alphabetic_sort_toggle_controller'\n\napplication.register('alphabetic-sort-toggle', AlphabeticSortToggleController)\n\nimport {application} from \"./application\"\n\nimport AssignmentController from \"./assignment_controller\"\n\napplication.register(\"assignment\", AssignmentController)\n\nimport AsyncPickController from \"./async_pick_controller\"\n\napplication.register(\"async-pick\", AsyncPickController)\n\nimport AutoRedirectController from \"./auto_redirect_controller\"\n\napplication.register(\"auto-redirect\", AutoRedirectController)\n\nimport AutosaveController from \"./autosave_controller\"\n\napplication.register(\"autosave\", AutosaveController)\n\nimport ChartjsController from \"./chartjs_controller\"\n\napplication.register(\"chartjs\", ChartjsController)\n\nimport CheckboxSelectAllController from \"./checkbox_select_all_controller\"\n\napplication.register(\"checkbox-select-all\", CheckboxSelectAllController)\n\nimport CheckboxToFormController from \"./checkbox_to_form_controller\"\n\napplication.register(\"checkbox-to-form\", CheckboxToFormController)\n\nimport ClipboardController from \"./clipboard_controller\"\n\napplication.register(\"clipboard\", ClipboardController)\n\nimport CollapseAllController from \"./collapse_all_controller\"\n\napplication.register(\"collapse-all\", CollapseAllController)\n\nimport CollapseAriaLabelController from \"./collapse_aria_label_controller\"\n\napplication.register(\"collapse-aria-label\", CollapseAriaLabelController)\n\nimport CollapseController from \"./collapse_controller\"\n\napplication.register(\"collapse\", CollapseController)\n\nimport CountdownController from \"./countdown_controller\"\n\napplication.register(\"countdown\", CountdownController)\n\nimport DatatableController from \"./datatable_controller\"\n\napplication.register(\"datatable\", DatatableController)\n\nimport DirectUploadController from \"./direct_upload_controller\"\n\napplication.register(\"direct-upload\", DirectUploadController)\n\nimport DisplayWithButtonController from \"./display_with_button_controller\"\n\napplication.register(\"display-with-button\", DisplayWithButtonController)\n\nimport DisplayWithRadioButtonController from \"./display_with_radio_button_controller\"\n\napplication.register(\"display-with-radio-button\", DisplayWithRadioButtonController)\n\nimport DragDropController from \"./drag_drop_controller\"\n\napplication.register(\"drag-drop\", DragDropController)\n\nimport DropdownController from \"./dropdown_controller\"\n\napplication.register(\"dropdown\", DropdownController)\n\nimport EditorController from \"./editor_controller\"\n\napplication.register(\"editor\", EditorController)\n\nimport EditorMediaFileEmbedController from \"./editor_media_file_embed_controller\"\n\napplication.register(\"editor-media-file-embed\", EditorMediaFileEmbedController)\n\nimport ElementStatisticsController from \"./element_statistics_controller\"\n\napplication.register(\"element-statistics\", ElementStatisticsController)\n\nimport UserProfileController from \"./user_profile_controller\"\n\napplication.register(\"user-profile\", UserProfileController)\n\nimport FetchHtmlController from \"./fetch_html_controller\"\n\napplication.register(\"fetch-html\", FetchHtmlController)\n\nimport FilterableController from \"./filterable_controller\"\n\napplication.register(\"filterable\", FilterableController)\n\nimport FormLeaveController from \"./form_leave_controller\"\n\napplication.register(\"form-leave\", FormLeaveController)\n\nimport HeartbeatController from \"./heartbeat_controller\"\n\napplication.register(\"heartbeat\", HeartbeatController)\n\nimport InfiniteScrollController from \"./infinite_scroll_controller\"\n\napplication.register(\"infinite-scroll\", InfiniteScrollController)\n\nimport LeavePageController from \"./leave_page_controller\"\n\napplication.register(\"leave-page\", LeavePageController)\n\nimport LockTimeoutController from \"./lock_timeout_controller\"\n\napplication.register(\"lock-timeout\", LockTimeoutController)\n\nimport MediaElementController from \"./media_element_controller\"\n\napplication.register(\"media-element\", MediaElementController)\n\nimport ModalController from \"./modal_controller\"\n\napplication.register(\"modal\", ModalController)\n\nimport ModalLinkController from \"./modal_link_controller\"\n\napplication.register(\"modal-link\", ModalLinkController)\n\nimport NavTabsScrollableController from \"./nav_tabs_scrollable_controller\"\n\napplication.register(\"nav-tabs-scrollable\", NavTabsScrollableController)\n\nimport NestedFormController from \"./nested_form_controller\"\n\napplication.register(\"nested-form\", NestedFormController)\n\nimport NoPasteController from \"./no_paste_controller\"\n\napplication.register(\"no-paste\", NoPasteController)\n\nimport NotificationController from \"./notification_controller\"\n\napplication.register(\"notification\", NotificationController)\n\nimport PasswordShowToggleController from \"./password_show_toggle_controller\"\n\napplication.register(\"password-show-toggle\", PasswordShowToggleController)\n\nimport PerPageDropdownController from \"./per_page_dropdown_controller\"\n\napplication.register(\"per-page-dropdown\", PerPageDropdownController)\n\nimport PdfSummaryConfirmationController from \"./pdf_summary_confirmation_controller\"\n\napplication.register(\"pdf-summary-confirmation\", PdfSummaryConfirmationController)\n\nimport PopoverController from \"./popover_controller\"\n\napplication.register(\"popover\", PopoverController)\n\nimport RadioCheckController from \"./radio_check_controller\"\n\napplication.register(\"radio-check\", RadioCheckController)\n\nimport ReadmoreController from \"./readmore_controller\"\n\napplication.register(\"readmore\", ReadmoreController)\n\nimport RefreshCsrfTokenController from \"./refresh_csrf_token_controller\"\n\napplication.register(\"refresh-csrf-token\", RefreshCsrfTokenController)\n\nimport ResizableChatController from \"./resizable_chat_controller\"\n\napplication.register(\"resizable-chat\", ResizableChatController)\n\nimport ResizeController from \"./resize_controller\"\n\napplication.register(\"resize\", ResizeController)\n\nimport ResourceLockChannelController from \"./resource_lock_channel_controller\"\n\napplication.register(\"resource-lock-channel\", ResourceLockChannelController)\n\nimport SessionTimeoutController from \"./session_timeout_controller\"\n\napplication.register(\"session-timeout\", SessionTimeoutController)\n\nimport SidebarToggleController from \"./sidebar_toggle_controller\"\n\napplication.register(\"sidebar-toggle\", SidebarToggleController)\n\nimport SubmitOnEnterController from \"./submit_on_enter_controller\"\n\napplication.register(\"submit-on-enter\", SubmitOnEnterController)\n\nimport SubmitOtherFormController from \"./submit_other_form_controller\"\n\napplication.register(\"submit-other-form\", SubmitOtherFormController)\n\nimport SumPointController from \"./sum_point_controller\"\n\napplication.register(\"sum-point\", SumPointController)\n\nimport SyncPickController from \"./sync_pick_controller\"\n\napplication.register(\"sync-pick\", SyncPickController)\n\nimport TagInputController from \"./tag_input_controller\"\n\napplication.register(\"tag-input\", TagInputController)\n\nimport TasksWidgetCheckboxController from \"./tasks_widget_checkbox_controller\"\n\napplication.register(\"tasks-widget-checkbox\", TasksWidgetCheckboxController)\n\nimport ToastController from \"./toast_controller\"\n\napplication.register(\"toast\", ToastController)\n\nimport ToggleController from \"./toggle_controller\"\n\napplication.register(\"toggle\", ToggleController)\n\nimport ToggleRadioGroupController from \"./toggle_radio_group_controller\"\n\napplication.register(\"toggle-radio-group\", ToggleRadioGroupController)\n\nimport TutorialSeriesCourseController from \"./tutorial_series_course_controller\"\n\napplication.register(\"tutorial-series-course\", TutorialSeriesCourseController)\n\nimport TutorialTimeSettingsController from \"./tutorial_time_settings_controller\"\n\napplication.register(\"tutorial-time-settings\", TutorialTimeSettingsController)\n\nimport TypeaheadController from \"./typeahead_controller\"\n\napplication.register(\"typeahead\", TypeaheadController)\n\nimport ValidationController from \"./validation_controller\"\n\napplication.register(\"validation\", ValidationController)\n", "/*!\n * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */\nfunction _defineProperty(e, r, t) {\n  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nfunction _inherits(t, e) {\n  if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n  t.prototype = Object.create(e && e.prototype, {\n    constructor: {\n      value: t,\n      writable: !0,\n      configurable: !0\n    }\n  }), Object.defineProperty(t, \"prototype\", {\n    writable: !1\n  }), e && _setPrototypeOf(t, e);\n}\nfunction ownKeys(e, r) {\n  var t = Object.keys(e);\n  if (Object.getOwnPropertySymbols) {\n    var o = Object.getOwnPropertySymbols(e);\n    r && (o = o.filter(function (r) {\n      return Object.getOwnPropertyDescriptor(e, r).enumerable;\n    })), t.push.apply(t, o);\n  }\n  return t;\n}\nfunction _objectSpread2(e) {\n  for (var r = 1; r < arguments.length; r++) {\n    var t = null != arguments[r] ? arguments[r] : {};\n    r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n      _defineProperty(e, r, t[r]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n    });\n  }\n  return e;\n}\nfunction _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nfunction _toPrimitive(t, r) {\n  if (\"object\" != typeof t || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != typeof i) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n  var i = _toPrimitive(t, \"string\");\n  return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _wrapRegExp() {\n  _wrapRegExp = function (e, r) {\n    return new BabelRegExp(e, void 0, r);\n  };\n  var e = RegExp.prototype,\n    r = new WeakMap();\n  function BabelRegExp(e, t, p) {\n    var o = RegExp(e, t);\n    return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype);\n  }\n  function buildGroups(e, t) {\n    var p = r.get(t);\n    return Object.keys(p).reduce(function (r, t) {\n      var o = p[t];\n      if (\"number\" == typeof o) r[t] = e[o];else {\n        for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++;\n        r[t] = e[o[i]];\n      }\n      return r;\n    }, Object.create(null));\n  }\n  return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) {\n    var t = e.exec.call(this, r);\n    if (t) {\n      t.groups = buildGroups(t, this);\n      var p = t.indices;\n      p && (p.groups = buildGroups(p, this));\n    }\n    return t;\n  }, BabelRegExp.prototype[Symbol.replace] = function (t, p) {\n    if (\"string\" == typeof p) {\n      var o = r.get(this);\n      return e[Symbol.replace].call(this, t, p.replace(/\\$<([^>]+)>/g, function (e, r) {\n        var t = o[r];\n        return \"$\" + (Array.isArray(t) ? t.join(\"$\") : t);\n      }));\n    }\n    if (\"function\" == typeof p) {\n      var i = this;\n      return e[Symbol.replace].call(this, t, function () {\n        var e = arguments;\n        return \"object\" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e);\n      });\n    }\n    return e[Symbol.replace].call(this, t, p);\n  }, _wrapRegExp.apply(this, arguments);\n}\n\nconst noop = () => {};\nlet _WINDOW = {};\nlet _DOCUMENT = {};\nlet _MUTATION_OBSERVER = null;\nlet _PERFORMANCE = {\n  mark: noop,\n  measure: noop\n};\ntry {\n  if (typeof window !== 'undefined') _WINDOW = window;\n  if (typeof document !== 'undefined') _DOCUMENT = document;\n  if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;\n  if (typeof performance !== 'undefined') _PERFORMANCE = performance;\n} catch (e) {}\nconst {\n  userAgent = ''\n} = _WINDOW.navigator || {};\nconst WINDOW = _WINDOW;\nconst DOCUMENT = _DOCUMENT;\nconst MUTATION_OBSERVER = _MUTATION_OBSERVER;\nconst PERFORMANCE = _PERFORMANCE;\nconst IS_BROWSER = !!WINDOW.document;\nconst IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';\nconst IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');\n\nvar p = /fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\\-\\ ]/,\n  g = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;\nvar S = {\n    classic: {\n      fa: \"solid\",\n      fas: \"solid\",\n      \"fa-solid\": \"solid\",\n      far: \"regular\",\n      \"fa-regular\": \"regular\",\n      fal: \"light\",\n      \"fa-light\": \"light\",\n      fat: \"thin\",\n      \"fa-thin\": \"thin\",\n      fab: \"brands\",\n      \"fa-brands\": \"brands\"\n    },\n    duotone: {\n      fa: \"solid\",\n      fad: \"solid\",\n      \"fa-solid\": \"solid\",\n      \"fa-duotone\": \"solid\",\n      fadr: \"regular\",\n      \"fa-regular\": \"regular\",\n      fadl: \"light\",\n      \"fa-light\": \"light\",\n      fadt: \"thin\",\n      \"fa-thin\": \"thin\"\n    },\n    sharp: {\n      fa: \"solid\",\n      fass: \"solid\",\n      \"fa-solid\": \"solid\",\n      fasr: \"regular\",\n      \"fa-regular\": \"regular\",\n      fasl: \"light\",\n      \"fa-light\": \"light\",\n      fast: \"thin\",\n      \"fa-thin\": \"thin\"\n    },\n    \"sharp-duotone\": {\n      fa: \"solid\",\n      fasds: \"solid\",\n      \"fa-solid\": \"solid\",\n      fasdr: \"regular\",\n      \"fa-regular\": \"regular\",\n      fasdl: \"light\",\n      \"fa-light\": \"light\",\n      fasdt: \"thin\",\n      \"fa-thin\": \"thin\"\n    }\n  },\n  A = {\n    GROUP: \"duotone-group\",\n    SWAP_OPACITY: \"swap-opacity\",\n    PRIMARY: \"primary\",\n    SECONDARY: \"secondary\"\n  },\n  P = [\"fa-classic\", \"fa-duotone\", \"fa-sharp\", \"fa-sharp-duotone\"];\nvar s = \"classic\",\n  t = \"duotone\",\n  r = \"sharp\",\n  o = \"sharp-duotone\",\n  L = [s, t, r, o];\nvar G = {\n    classic: {\n      900: \"fas\",\n      400: \"far\",\n      normal: \"far\",\n      300: \"fal\",\n      100: \"fat\"\n    },\n    duotone: {\n      900: \"fad\",\n      400: \"fadr\",\n      300: \"fadl\",\n      100: \"fadt\"\n    },\n    sharp: {\n      900: \"fass\",\n      400: \"fasr\",\n      300: \"fasl\",\n      100: \"fast\"\n    },\n    \"sharp-duotone\": {\n      900: \"fasds\",\n      400: \"fasdr\",\n      300: \"fasdl\",\n      100: \"fasdt\"\n    }\n  };\nvar lt = {\n    \"Font Awesome 6 Free\": {\n      900: \"fas\",\n      400: \"far\"\n    },\n    \"Font Awesome 6 Pro\": {\n      900: \"fas\",\n      400: \"far\",\n      normal: \"far\",\n      300: \"fal\",\n      100: \"fat\"\n    },\n    \"Font Awesome 6 Brands\": {\n      400: \"fab\",\n      normal: \"fab\"\n    },\n    \"Font Awesome 6 Duotone\": {\n      900: \"fad\",\n      400: \"fadr\",\n      normal: \"fadr\",\n      300: \"fadl\",\n      100: \"fadt\"\n    },\n    \"Font Awesome 6 Sharp\": {\n      900: \"fass\",\n      400: \"fasr\",\n      normal: \"fasr\",\n      300: \"fasl\",\n      100: \"fast\"\n    },\n    \"Font Awesome 6 Sharp Duotone\": {\n      900: \"fasds\",\n      400: \"fasdr\",\n      normal: \"fasdr\",\n      300: \"fasdl\",\n      100: \"fasdt\"\n    }\n  };\nvar pt = new Map([[\"classic\", {\n    defaultShortPrefixId: \"fas\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\", \"brands\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }], [\"sharp\", {\n    defaultShortPrefixId: \"fass\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }], [\"duotone\", {\n    defaultShortPrefixId: \"fad\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }], [\"sharp-duotone\", {\n    defaultShortPrefixId: \"fasds\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }]]),\n  xt = {\n    classic: {\n      solid: \"fas\",\n      regular: \"far\",\n      light: \"fal\",\n      thin: \"fat\",\n      brands: \"fab\"\n    },\n    duotone: {\n      solid: \"fad\",\n      regular: \"fadr\",\n      light: \"fadl\",\n      thin: \"fadt\"\n    },\n    sharp: {\n      solid: \"fass\",\n      regular: \"fasr\",\n      light: \"fasl\",\n      thin: \"fast\"\n    },\n    \"sharp-duotone\": {\n      solid: \"fasds\",\n      regular: \"fasdr\",\n      light: \"fasdl\",\n      thin: \"fasdt\"\n    }\n  };\nvar Ft = [\"fak\", \"fa-kit\", \"fakd\", \"fa-kit-duotone\"],\n  St = {\n    kit: {\n      fak: \"kit\",\n      \"fa-kit\": \"kit\"\n    },\n    \"kit-duotone\": {\n      fakd: \"kit-duotone\",\n      \"fa-kit-duotone\": \"kit-duotone\"\n    }\n  },\n  At = [\"kit\"];\nvar Ct = {\n  kit: {\n    \"fa-kit\": \"fak\"\n  },\n  \"kit-duotone\": {\n    \"fa-kit-duotone\": \"fakd\"\n  }\n};\nvar Lt = [\"fak\", \"fakd\"],\n  Wt = {\n    kit: {\n      fak: \"fa-kit\"\n    },\n    \"kit-duotone\": {\n      fakd: \"fa-kit-duotone\"\n    }\n  };\nvar Et = {\n    kit: {\n      kit: \"fak\"\n    },\n    \"kit-duotone\": {\n      \"kit-duotone\": \"fakd\"\n    }\n  };\n\nvar t$1 = {\n    GROUP: \"duotone-group\",\n    SWAP_OPACITY: \"swap-opacity\",\n    PRIMARY: \"primary\",\n    SECONDARY: \"secondary\"\n  },\n  r$1 = [\"fa-classic\", \"fa-duotone\", \"fa-sharp\", \"fa-sharp-duotone\"];\nvar bt$1 = [\"fak\", \"fa-kit\", \"fakd\", \"fa-kit-duotone\"];\nvar Yt = {\n    \"Font Awesome Kit\": {\n      400: \"fak\",\n      normal: \"fak\"\n    },\n    \"Font Awesome Kit Duotone\": {\n      400: \"fakd\",\n      normal: \"fakd\"\n    }\n  };\nvar ua = {\n    classic: {\n      \"fa-brands\": \"fab\",\n      \"fa-duotone\": \"fad\",\n      \"fa-light\": \"fal\",\n      \"fa-regular\": \"far\",\n      \"fa-solid\": \"fas\",\n      \"fa-thin\": \"fat\"\n    },\n    duotone: {\n      \"fa-regular\": \"fadr\",\n      \"fa-light\": \"fadl\",\n      \"fa-thin\": \"fadt\"\n    },\n    sharp: {\n      \"fa-solid\": \"fass\",\n      \"fa-regular\": \"fasr\",\n      \"fa-light\": \"fasl\",\n      \"fa-thin\": \"fast\"\n    },\n    \"sharp-duotone\": {\n      \"fa-solid\": \"fasds\",\n      \"fa-regular\": \"fasdr\",\n      \"fa-light\": \"fasdl\",\n      \"fa-thin\": \"fasdt\"\n    }\n  },\n  I$1 = {\n    classic: [\"fas\", \"far\", \"fal\", \"fat\", \"fad\"],\n    duotone: [\"fadr\", \"fadl\", \"fadt\"],\n    sharp: [\"fass\", \"fasr\", \"fasl\", \"fast\"],\n    \"sharp-duotone\": [\"fasds\", \"fasdr\", \"fasdl\", \"fasdt\"]\n  },\n  ga = {\n    classic: {\n      fab: \"fa-brands\",\n      fad: \"fa-duotone\",\n      fal: \"fa-light\",\n      far: \"fa-regular\",\n      fas: \"fa-solid\",\n      fat: \"fa-thin\"\n    },\n    duotone: {\n      fadr: \"fa-regular\",\n      fadl: \"fa-light\",\n      fadt: \"fa-thin\"\n    },\n    sharp: {\n      fass: \"fa-solid\",\n      fasr: \"fa-regular\",\n      fasl: \"fa-light\",\n      fast: \"fa-thin\"\n    },\n    \"sharp-duotone\": {\n      fasds: \"fa-solid\",\n      fasdr: \"fa-regular\",\n      fasdl: \"fa-light\",\n      fasdt: \"fa-thin\"\n    }\n  },\n  x = [\"fa-solid\", \"fa-regular\", \"fa-light\", \"fa-thin\", \"fa-duotone\", \"fa-brands\"],\n  Ia = [\"fa\", \"fas\", \"far\", \"fal\", \"fat\", \"fad\", \"fadr\", \"fadl\", \"fadt\", \"fab\", \"fass\", \"fasr\", \"fasl\", \"fast\", \"fasds\", \"fasdr\", \"fasdl\", \"fasdt\", ...r$1, ...x],\n  m$1 = [\"solid\", \"regular\", \"light\", \"thin\", \"duotone\", \"brands\"],\n  c$1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n  F$1 = c$1.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),\n  ma = [...Object.keys(I$1), ...m$1, \"2xs\", \"xs\", \"sm\", \"lg\", \"xl\", \"2xl\", \"beat\", \"border\", \"fade\", \"beat-fade\", \"bounce\", \"flip-both\", \"flip-horizontal\", \"flip-vertical\", \"flip\", \"fw\", \"inverse\", \"layers-counter\", \"layers-text\", \"layers\", \"li\", \"pull-left\", \"pull-right\", \"pulse\", \"rotate-180\", \"rotate-270\", \"rotate-90\", \"rotate-by\", \"shake\", \"spin-pulse\", \"spin-reverse\", \"spin\", \"stack-1x\", \"stack-2x\", \"stack\", \"ul\", t$1.GROUP, t$1.SWAP_OPACITY, t$1.PRIMARY, t$1.SECONDARY].concat(c$1.map(a => \"\".concat(a, \"x\"))).concat(F$1.map(a => \"w-\".concat(a)));\nvar wa = {\n    \"Font Awesome 5 Free\": {\n      900: \"fas\",\n      400: \"far\"\n    },\n    \"Font Awesome 5 Pro\": {\n      900: \"fas\",\n      400: \"far\",\n      normal: \"far\",\n      300: \"fal\"\n    },\n    \"Font Awesome 5 Brands\": {\n      400: \"fab\",\n      normal: \"fab\"\n    },\n    \"Font Awesome 5 Duotone\": {\n      900: \"fad\"\n    }\n  };\n\nconst NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';\nconst UNITS_IN_GRID = 16;\nconst DEFAULT_CSS_PREFIX = 'fa';\nconst DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';\nconst DATA_FA_I2SVG = 'data-fa-i2svg';\nconst DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';\nconst DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';\nconst DATA_PREFIX = 'data-prefix';\nconst DATA_ICON = 'data-icon';\nconst HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';\nconst MUTATION_APPROACH_ASYNC = 'async';\nconst TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];\nconst PRODUCTION = (() => {\n  try {\n    return process.env.NODE_ENV === 'production';\n  } catch (e$$1) {\n    return false;\n  }\n})();\nfunction familyProxy(obj) {\n  // Defaults to the classic family if family is not available\n  return new Proxy(obj, {\n    get(target, prop) {\n      return prop in target ? target[prop] : target[s];\n    }\n  });\n}\nconst _PREFIX_TO_STYLE = _objectSpread2({}, S);\n\n// We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, \"classic\" family does not have any\n// duotone styles.  But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding\n// {'fa-duotone': 'duotone'}\n_PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {\n  'fa-duotone': 'duotone'\n}), S[s]), St['kit']), St['kit-duotone']);\nconst PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE);\nconst _STYLE_TO_PREFIX = _objectSpread2({}, xt);\n\n// We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, \"classic\" family does not have any\n// duotone styles.  But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'}\n_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {\n  duotone: 'fad'\n}), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']);\nconst STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX);\nconst _PREFIX_TO_LONG_STYLE = _objectSpread2({}, ga);\n_PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']);\nconst PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE);\nconst _LONG_STYLE_TO_PREFIX = _objectSpread2({}, ua);\n_LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']);\nconst LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX);\nconst ICON_SELECTION_SYNTAX_PATTERN = p; // eslint-disable-line no-useless-escape\n\nconst LAYERS_TEXT_CLASSNAME = 'fa-layers-text';\nconst FONT_FAMILY_PATTERN = g;\nconst _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G);\nconst FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX);\nconst ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];\nconst DUOTONE_CLASSES = A;\nconst RESERVED_CLASSES = [...At, ...ma];\n\nconst initial = WINDOW.FontAwesomeConfig || {};\nfunction getAttrConfig(attr) {\n  var element = DOCUMENT.querySelector('script[' + attr + ']');\n  if (element) {\n    return element.getAttribute(attr);\n  }\n}\nfunction coerce(val) {\n  // Getting an empty string will occur if the attribute is set on the HTML tag but without a value\n  // We'll assume that this is an indication that it should be toggled to true\n  if (val === '') return true;\n  if (val === 'false') return false;\n  if (val === 'true') return true;\n  return val;\n}\nif (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {\n  const attrs = [['data-family-prefix', 'familyPrefix'], ['data-css-prefix', 'cssPrefix'], ['data-family-default', 'familyDefault'], ['data-style-default', 'styleDefault'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];\n  attrs.forEach(_ref => {\n    let [attr, key] = _ref;\n    const val = coerce(getAttrConfig(attr));\n    if (val !== undefined && val !== null) {\n      initial[key] = val;\n    }\n  });\n}\nconst _default = {\n  styleDefault: 'solid',\n  familyDefault: s,\n  cssPrefix: DEFAULT_CSS_PREFIX,\n  replacementClass: DEFAULT_REPLACEMENT_CLASS,\n  autoReplaceSvg: true,\n  autoAddCss: true,\n  autoA11y: true,\n  searchPseudoElements: false,\n  observeMutations: true,\n  mutateApproach: 'async',\n  keepOriginalSource: true,\n  measurePerformance: false,\n  showMissingIcons: true\n};\n\n// familyPrefix is deprecated but we must still support it if present\nif (initial.familyPrefix) {\n  initial.cssPrefix = initial.familyPrefix;\n}\nconst _config = _objectSpread2(_objectSpread2({}, _default), initial);\nif (!_config.autoReplaceSvg) _config.observeMutations = false;\nconst config = {};\nObject.keys(_default).forEach(key => {\n  Object.defineProperty(config, key, {\n    enumerable: true,\n    set: function (val) {\n      _config[key] = val;\n      _onChangeCb.forEach(cb => cb(config));\n    },\n    get: function () {\n      return _config[key];\n    }\n  });\n});\n\n// familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0\nObject.defineProperty(config, 'familyPrefix', {\n  enumerable: true,\n  set: function (val) {\n    _config.cssPrefix = val;\n    _onChangeCb.forEach(cb => cb(config));\n  },\n  get: function () {\n    return _config.cssPrefix;\n  }\n});\nWINDOW.FontAwesomeConfig = config;\nconst _onChangeCb = [];\nfunction onChange(cb) {\n  _onChangeCb.push(cb);\n  return () => {\n    _onChangeCb.splice(_onChangeCb.indexOf(cb), 1);\n  };\n}\n\nconst d$2 = UNITS_IN_GRID;\nconst meaninglessTransform = {\n  size: 16,\n  x: 0,\n  y: 0,\n  rotate: 0,\n  flipX: false,\n  flipY: false\n};\nfunction insertCss(css) {\n  if (!css || !IS_DOM) {\n    return;\n  }\n  const style = DOCUMENT.createElement('style');\n  style.setAttribute('type', 'text/css');\n  style.innerHTML = css;\n  const headChildren = DOCUMENT.head.childNodes;\n  let beforeChild = null;\n  for (let i = headChildren.length - 1; i > -1; i--) {\n    const child = headChildren[i];\n    const tagName = (child.tagName || '').toUpperCase();\n    if (['STYLE', 'LINK'].indexOf(tagName) > -1) {\n      beforeChild = child;\n    }\n  }\n  DOCUMENT.head.insertBefore(style, beforeChild);\n  return css;\n}\nconst idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nfunction nextUniqueId() {\n  let size = 12;\n  let id = '';\n  while (size-- > 0) {\n    id += idPool[Math.random() * 62 | 0];\n  }\n  return id;\n}\nfunction toArray(obj) {\n  const array = [];\n  for (let i = (obj || []).length >>> 0; i--;) {\n    array[i] = obj[i];\n  }\n  return array;\n}\nfunction classArray(node) {\n  if (node.classList) {\n    return toArray(node.classList);\n  } else {\n    return (node.getAttribute('class') || '').split(' ').filter(i => i);\n  }\n}\nfunction htmlEscape(str) {\n  return \"\".concat(str).replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\nfunction joinAttributes(attributes) {\n  return Object.keys(attributes || {}).reduce((acc, attributeName) => {\n    return acc + \"\".concat(attributeName, \"=\\\"\").concat(htmlEscape(attributes[attributeName]), \"\\\" \");\n  }, '').trim();\n}\nfunction joinStyles(styles) {\n  return Object.keys(styles || {}).reduce((acc, styleName) => {\n    return acc + \"\".concat(styleName, \": \").concat(styles[styleName].trim(), \";\");\n  }, '');\n}\nfunction transformIsMeaningful(transform) {\n  return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;\n}\nfunction transformForSvg(_ref) {\n  let {\n    transform,\n    containerWidth,\n    iconWidth\n  } = _ref;\n  const outer = {\n    transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n  };\n  const innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n  const innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n  const innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n  const inner = {\n    transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n  };\n  const path = {\n    transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n  };\n  return {\n    outer,\n    inner,\n    path\n  };\n}\nfunction transformForCss(_ref2) {\n  let {\n    transform,\n    width = UNITS_IN_GRID,\n    height = UNITS_IN_GRID,\n    startCentered = false\n  } = _ref2;\n  let val = '';\n  if (startCentered && IS_IE) {\n    val += \"translate(\".concat(transform.x / d$2 - width / 2, \"em, \").concat(transform.y / d$2 - height / 2, \"em) \");\n  } else if (startCentered) {\n    val += \"translate(calc(-50% + \".concat(transform.x / d$2, \"em), calc(-50% + \").concat(transform.y / d$2, \"em)) \");\n  } else {\n    val += \"translate(\".concat(transform.x / d$2, \"em, \").concat(transform.y / d$2, \"em) \");\n  }\n  val += \"scale(\".concat(transform.size / d$2 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / d$2 * (transform.flipY ? -1 : 1), \") \");\n  val += \"rotate(\".concat(transform.rotate, \"deg) \");\n  return val;\n}\n\nvar baseStyles = \":root, :host {\\n  --fa-font-solid: normal 900 1em/1 \\\"Font Awesome 6 Free\\\";\\n  --fa-font-regular: normal 400 1em/1 \\\"Font Awesome 6 Free\\\";\\n  --fa-font-light: normal 300 1em/1 \\\"Font Awesome 6 Pro\\\";\\n  --fa-font-thin: normal 100 1em/1 \\\"Font Awesome 6 Pro\\\";\\n  --fa-font-duotone: normal 900 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-duotone-regular: normal 400 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-duotone-light: normal 300 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-duotone-thin: normal 100 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-brands: normal 400 1em/1 \\\"Font Awesome 6 Brands\\\";\\n  --fa-font-sharp-solid: normal 900 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-regular: normal 400 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-light: normal 300 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-thin: normal 100 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-duotone-solid: normal 900 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n  --fa-font-sharp-duotone-regular: normal 400 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n  --fa-font-sharp-duotone-light: normal 300 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n  --fa-font-sharp-duotone-thin: normal 100 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n}\\n\\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\\n  overflow: visible;\\n  box-sizing: content-box;\\n}\\n\\n.svg-inline--fa {\\n  display: var(--fa-display, inline-block);\\n  height: 1em;\\n  overflow: visible;\\n  vertical-align: -0.125em;\\n}\\n.svg-inline--fa.fa-2xs {\\n  vertical-align: 0.1em;\\n}\\n.svg-inline--fa.fa-xs {\\n  vertical-align: 0em;\\n}\\n.svg-inline--fa.fa-sm {\\n  vertical-align: -0.0714285705em;\\n}\\n.svg-inline--fa.fa-lg {\\n  vertical-align: -0.2em;\\n}\\n.svg-inline--fa.fa-xl {\\n  vertical-align: -0.25em;\\n}\\n.svg-inline--fa.fa-2xl {\\n  vertical-align: -0.3125em;\\n}\\n.svg-inline--fa.fa-pull-left {\\n  margin-right: var(--fa-pull-margin, 0.3em);\\n  width: auto;\\n}\\n.svg-inline--fa.fa-pull-right {\\n  margin-left: var(--fa-pull-margin, 0.3em);\\n  width: auto;\\n}\\n.svg-inline--fa.fa-li {\\n  width: var(--fa-li-width, 2em);\\n  top: 0.25em;\\n}\\n.svg-inline--fa.fa-fw {\\n  width: var(--fa-fw-width, 1.25em);\\n}\\n\\n.fa-layers svg.svg-inline--fa {\\n  bottom: 0;\\n  left: 0;\\n  margin: auto;\\n  position: absolute;\\n  right: 0;\\n  top: 0;\\n}\\n\\n.fa-layers-counter, .fa-layers-text {\\n  display: inline-block;\\n  position: absolute;\\n  text-align: center;\\n}\\n\\n.fa-layers {\\n  display: inline-block;\\n  height: 1em;\\n  position: relative;\\n  text-align: center;\\n  vertical-align: -0.125em;\\n  width: 1em;\\n}\\n.fa-layers svg.svg-inline--fa {\\n  transform-origin: center center;\\n}\\n\\n.fa-layers-text {\\n  left: 50%;\\n  top: 50%;\\n  transform: translate(-50%, -50%);\\n  transform-origin: center center;\\n}\\n\\n.fa-layers-counter {\\n  background-color: var(--fa-counter-background-color, #ff253a);\\n  border-radius: var(--fa-counter-border-radius, 1em);\\n  box-sizing: border-box;\\n  color: var(--fa-inverse, #fff);\\n  line-height: var(--fa-counter-line-height, 1);\\n  max-width: var(--fa-counter-max-width, 5em);\\n  min-width: var(--fa-counter-min-width, 1.5em);\\n  overflow: hidden;\\n  padding: var(--fa-counter-padding, 0.25em 0.5em);\\n  right: var(--fa-right, 0);\\n  text-overflow: ellipsis;\\n  top: var(--fa-top, 0);\\n  transform: scale(var(--fa-counter-scale, 0.25));\\n  transform-origin: top right;\\n}\\n\\n.fa-layers-bottom-right {\\n  bottom: var(--fa-bottom, 0);\\n  right: var(--fa-right, 0);\\n  top: auto;\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: bottom right;\\n}\\n\\n.fa-layers-bottom-left {\\n  bottom: var(--fa-bottom, 0);\\n  left: var(--fa-left, 0);\\n  right: auto;\\n  top: auto;\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: bottom left;\\n}\\n\\n.fa-layers-top-right {\\n  top: var(--fa-top, 0);\\n  right: var(--fa-right, 0);\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: top right;\\n}\\n\\n.fa-layers-top-left {\\n  left: var(--fa-left, 0);\\n  right: auto;\\n  top: var(--fa-top, 0);\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: top left;\\n}\\n\\n.fa-1x {\\n  font-size: 1em;\\n}\\n\\n.fa-2x {\\n  font-size: 2em;\\n}\\n\\n.fa-3x {\\n  font-size: 3em;\\n}\\n\\n.fa-4x {\\n  font-size: 4em;\\n}\\n\\n.fa-5x {\\n  font-size: 5em;\\n}\\n\\n.fa-6x {\\n  font-size: 6em;\\n}\\n\\n.fa-7x {\\n  font-size: 7em;\\n}\\n\\n.fa-8x {\\n  font-size: 8em;\\n}\\n\\n.fa-9x {\\n  font-size: 9em;\\n}\\n\\n.fa-10x {\\n  font-size: 10em;\\n}\\n\\n.fa-2xs {\\n  font-size: 0.625em;\\n  line-height: 0.1em;\\n  vertical-align: 0.225em;\\n}\\n\\n.fa-xs {\\n  font-size: 0.75em;\\n  line-height: 0.0833333337em;\\n  vertical-align: 0.125em;\\n}\\n\\n.fa-sm {\\n  font-size: 0.875em;\\n  line-height: 0.0714285718em;\\n  vertical-align: 0.0535714295em;\\n}\\n\\n.fa-lg {\\n  font-size: 1.25em;\\n  line-height: 0.05em;\\n  vertical-align: -0.075em;\\n}\\n\\n.fa-xl {\\n  font-size: 1.5em;\\n  line-height: 0.0416666682em;\\n  vertical-align: -0.125em;\\n}\\n\\n.fa-2xl {\\n  font-size: 2em;\\n  line-height: 0.03125em;\\n  vertical-align: -0.1875em;\\n}\\n\\n.fa-fw {\\n  text-align: center;\\n  width: 1.25em;\\n}\\n\\n.fa-ul {\\n  list-style-type: none;\\n  margin-left: var(--fa-li-margin, 2.5em);\\n  padding-left: 0;\\n}\\n.fa-ul > li {\\n  position: relative;\\n}\\n\\n.fa-li {\\n  left: calc(-1 * var(--fa-li-width, 2em));\\n  position: absolute;\\n  text-align: center;\\n  width: var(--fa-li-width, 2em);\\n  line-height: inherit;\\n}\\n\\n.fa-border {\\n  border-color: var(--fa-border-color, #eee);\\n  border-radius: var(--fa-border-radius, 0.1em);\\n  border-style: var(--fa-border-style, solid);\\n  border-width: var(--fa-border-width, 0.08em);\\n  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\\n}\\n\\n.fa-pull-left {\\n  float: left;\\n  margin-right: var(--fa-pull-margin, 0.3em);\\n}\\n\\n.fa-pull-right {\\n  float: right;\\n  margin-left: var(--fa-pull-margin, 0.3em);\\n}\\n\\n.fa-beat {\\n  animation-name: fa-beat;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, ease-in-out);\\n}\\n\\n.fa-bounce {\\n  animation-name: fa-bounce;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\\n}\\n\\n.fa-fade {\\n  animation-name: fa-fade;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\\n}\\n\\n.fa-beat-fade {\\n  animation-name: fa-beat-fade;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\\n}\\n\\n.fa-flip {\\n  animation-name: fa-flip;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, ease-in-out);\\n}\\n\\n.fa-shake {\\n  animation-name: fa-shake;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, linear);\\n}\\n\\n.fa-spin {\\n  animation-name: fa-spin;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 2s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, linear);\\n}\\n\\n.fa-spin-reverse {\\n  --fa-animation-direction: reverse;\\n}\\n\\n.fa-pulse,\\n.fa-spin-pulse {\\n  animation-name: fa-spin;\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, steps(8));\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .fa-beat,\\n.fa-bounce,\\n.fa-fade,\\n.fa-beat-fade,\\n.fa-flip,\\n.fa-pulse,\\n.fa-shake,\\n.fa-spin,\\n.fa-spin-pulse {\\n    animation-delay: -1ms;\\n    animation-duration: 1ms;\\n    animation-iteration-count: 1;\\n    transition-delay: 0s;\\n    transition-duration: 0s;\\n  }\\n}\\n@keyframes fa-beat {\\n  0%, 90% {\\n    transform: scale(1);\\n  }\\n  45% {\\n    transform: scale(var(--fa-beat-scale, 1.25));\\n  }\\n}\\n@keyframes fa-bounce {\\n  0% {\\n    transform: scale(1, 1) translateY(0);\\n  }\\n  10% {\\n    transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\\n  }\\n  30% {\\n    transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\\n  }\\n  50% {\\n    transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\\n  }\\n  57% {\\n    transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\\n  }\\n  64% {\\n    transform: scale(1, 1) translateY(0);\\n  }\\n  100% {\\n    transform: scale(1, 1) translateY(0);\\n  }\\n}\\n@keyframes fa-fade {\\n  50% {\\n    opacity: var(--fa-fade-opacity, 0.4);\\n  }\\n}\\n@keyframes fa-beat-fade {\\n  0%, 100% {\\n    opacity: var(--fa-beat-fade-opacity, 0.4);\\n    transform: scale(1);\\n  }\\n  50% {\\n    opacity: 1;\\n    transform: scale(var(--fa-beat-fade-scale, 1.125));\\n  }\\n}\\n@keyframes fa-flip {\\n  50% {\\n    transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\\n  }\\n}\\n@keyframes fa-shake {\\n  0% {\\n    transform: rotate(-15deg);\\n  }\\n  4% {\\n    transform: rotate(15deg);\\n  }\\n  8%, 24% {\\n    transform: rotate(-18deg);\\n  }\\n  12%, 28% {\\n    transform: rotate(18deg);\\n  }\\n  16% {\\n    transform: rotate(-22deg);\\n  }\\n  20% {\\n    transform: rotate(22deg);\\n  }\\n  32% {\\n    transform: rotate(-12deg);\\n  }\\n  36% {\\n    transform: rotate(12deg);\\n  }\\n  40%, 100% {\\n    transform: rotate(0deg);\\n  }\\n}\\n@keyframes fa-spin {\\n  0% {\\n    transform: rotate(0deg);\\n  }\\n  100% {\\n    transform: rotate(360deg);\\n  }\\n}\\n.fa-rotate-90 {\\n  transform: rotate(90deg);\\n}\\n\\n.fa-rotate-180 {\\n  transform: rotate(180deg);\\n}\\n\\n.fa-rotate-270 {\\n  transform: rotate(270deg);\\n}\\n\\n.fa-flip-horizontal {\\n  transform: scale(-1, 1);\\n}\\n\\n.fa-flip-vertical {\\n  transform: scale(1, -1);\\n}\\n\\n.fa-flip-both,\\n.fa-flip-horizontal.fa-flip-vertical {\\n  transform: scale(-1, -1);\\n}\\n\\n.fa-rotate-by {\\n  transform: rotate(var(--fa-rotate-angle, 0));\\n}\\n\\n.fa-stack {\\n  display: inline-block;\\n  vertical-align: middle;\\n  height: 2em;\\n  position: relative;\\n  width: 2.5em;\\n}\\n\\n.fa-stack-1x,\\n.fa-stack-2x {\\n  bottom: 0;\\n  left: 0;\\n  margin: auto;\\n  position: absolute;\\n  right: 0;\\n  top: 0;\\n  z-index: var(--fa-stack-z-index, auto);\\n}\\n\\n.svg-inline--fa.fa-stack-1x {\\n  height: 1em;\\n  width: 1.25em;\\n}\\n.svg-inline--fa.fa-stack-2x {\\n  height: 2em;\\n  width: 2.5em;\\n}\\n\\n.fa-inverse {\\n  color: var(--fa-inverse, #fff);\\n}\\n\\n.sr-only,\\n.fa-sr-only {\\n  position: absolute;\\n  width: 1px;\\n  height: 1px;\\n  padding: 0;\\n  margin: -1px;\\n  overflow: hidden;\\n  clip: rect(0, 0, 0, 0);\\n  white-space: nowrap;\\n  border-width: 0;\\n}\\n\\n.sr-only-focusable:not(:focus),\\n.fa-sr-only-focusable:not(:focus) {\\n  position: absolute;\\n  width: 1px;\\n  height: 1px;\\n  padding: 0;\\n  margin: -1px;\\n  overflow: hidden;\\n  clip: rect(0, 0, 0, 0);\\n  white-space: nowrap;\\n  border-width: 0;\\n}\\n\\n.svg-inline--fa .fa-primary {\\n  fill: var(--fa-primary-color, currentColor);\\n  opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa .fa-secondary {\\n  fill: var(--fa-secondary-color, currentColor);\\n  opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-primary {\\n  opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\\n  opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa mask .fa-primary,\\n.svg-inline--fa mask .fa-secondary {\\n  fill: black;\\n}\";\n\nfunction css() {\n  const dcp = DEFAULT_CSS_PREFIX;\n  const drc = DEFAULT_REPLACEMENT_CLASS;\n  const fp = config.cssPrefix;\n  const rc = config.replacementClass;\n  let s = baseStyles;\n  if (fp !== dcp || rc !== drc) {\n    const dPatt = new RegExp(\"\\\\.\".concat(dcp, \"\\\\-\"), 'g');\n    const customPropPatt = new RegExp(\"\\\\--\".concat(dcp, \"\\\\-\"), 'g');\n    const rPatt = new RegExp(\"\\\\.\".concat(drc), 'g');\n    s = s.replace(dPatt, \".\".concat(fp, \"-\")).replace(customPropPatt, \"--\".concat(fp, \"-\")).replace(rPatt, \".\".concat(rc));\n  }\n  return s;\n}\nlet _cssInserted = false;\nfunction ensureCss() {\n  if (config.autoAddCss && !_cssInserted) {\n    insertCss(css());\n    _cssInserted = true;\n  }\n}\nvar InjectCSS = {\n  mixout() {\n    return {\n      dom: {\n        css,\n        insertCss: ensureCss\n      }\n    };\n  },\n  hooks() {\n    return {\n      beforeDOMElementCreation() {\n        ensureCss();\n      },\n      beforeI2svg() {\n        ensureCss();\n      }\n    };\n  }\n};\n\nconst w = WINDOW || {};\nif (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};\nif (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};\nif (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};\nif (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];\nvar namespace = w[NAMESPACE_IDENTIFIER];\n\nconst functions = [];\nconst listener = function () {\n  DOCUMENT.removeEventListener('DOMContentLoaded', listener);\n  loaded = 1;\n  functions.map(fn => fn());\n};\nlet loaded = false;\nif (IS_DOM) {\n  loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);\n  if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);\n}\nfunction domready (fn) {\n  if (!IS_DOM) return;\n  loaded ? setTimeout(fn, 0) : functions.push(fn);\n}\n\nfunction toHtml(abstractNodes) {\n  const {\n    tag,\n    attributes = {},\n    children = []\n  } = abstractNodes;\n  if (typeof abstractNodes === 'string') {\n    return htmlEscape(abstractNodes);\n  } else {\n    return \"<\".concat(tag, \" \").concat(joinAttributes(attributes), \">\").concat(children.map(toHtml).join(''), \"</\").concat(tag, \">\");\n  }\n}\n\nfunction iconFromMapping(mapping, prefix, iconName) {\n  if (mapping && mapping[prefix] && mapping[prefix][iconName]) {\n    return {\n      prefix,\n      iconName,\n      icon: mapping[prefix][iconName]\n    };\n  }\n}\n\n/**\n * Internal helper to bind a function known to have 4 arguments\n * to a given context.\n */\nvar bindInternal4 = function bindInternal4(func, thisContext) {\n  return function (a, b, c, d) {\n    return func.call(thisContext, a, b, c, d);\n  };\n};\n\n/**\n * # Reduce\n *\n * A fast object `.reduce()` implementation.\n *\n * @param  {Object}   subject      The object to reduce over.\n * @param  {Function} fn           The reducer function.\n * @param  {mixed}    initialValue The initial value for the reducer, defaults to subject[0].\n * @param  {Object}   thisContext  The context for the reducer.\n * @return {mixed}                 The final result.\n */\nvar reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {\n  var keys = Object.keys(subject),\n    length = keys.length,\n    iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,\n    i,\n    key,\n    result;\n  if (initialValue === undefined) {\n    i = 1;\n    result = subject[keys[0]];\n  } else {\n    i = 0;\n    result = initialValue;\n  }\n  for (; i < length; i++) {\n    key = keys[i];\n    result = iterator(result, subject[key], key, subject);\n  }\n  return result;\n};\n\n/**\n * ucs2decode() and codePointAt() are both works of Mathias Bynens and licensed under MIT\n *\n * Copyright Mathias Bynens <https://mathiasbynens.be/>\n\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nfunction ucs2decode(string) {\n  const output = [];\n  let counter = 0;\n  const length = string.length;\n  while (counter < length) {\n    const value = string.charCodeAt(counter++);\n    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n      const extra = string.charCodeAt(counter++);\n      if ((extra & 0xFC00) == 0xDC00) {\n        // eslint-disable-line eqeqeq\n        output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n      } else {\n        output.push(value);\n        counter--;\n      }\n    } else {\n      output.push(value);\n    }\n  }\n  return output;\n}\nfunction toHex(unicode) {\n  const decoded = ucs2decode(unicode);\n  return decoded.length === 1 ? decoded[0].toString(16) : null;\n}\nfunction codePointAt(string, index) {\n  const size = string.length;\n  let first = string.charCodeAt(index);\n  let second;\n  if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) {\n    second = string.charCodeAt(index + 1);\n    if (second >= 0xDC00 && second <= 0xDFFF) {\n      return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n    }\n  }\n  return first;\n}\n\nfunction normalizeIcons(icons) {\n  return Object.keys(icons).reduce((acc, iconName) => {\n    const icon = icons[iconName];\n    const expanded = !!icon.icon;\n    if (expanded) {\n      acc[icon.iconName] = icon.icon;\n    } else {\n      acc[iconName] = icon;\n    }\n    return acc;\n  }, {});\n}\nfunction defineIcons(prefix, icons) {\n  let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  const {\n    skipHooks = false\n  } = params;\n  const normalized = normalizeIcons(icons);\n  if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {\n    namespace.hooks.addPack(prefix, normalizeIcons(icons));\n  } else {\n    namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);\n  }\n\n  /**\n   * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction\n   * of new styles we needed to differentiate between them. Prefix `fa` is now an alias\n   * for `fas` so we'll ease the upgrade process for our users by automatically defining\n   * this as well.\n   */\n  if (prefix === 'fas') {\n    defineIcons('fa', icons);\n  }\n}\n\nconst duotonePathRe = [/*#__PURE__*/_wrapRegExp(/path d=\"([^\"]+)\".*path d=\"([^\"]+)\"/, {\n  d1: 1,\n  d2: 2\n}), /*#__PURE__*/_wrapRegExp(/path class=\"([^\"]+)\".*d=\"([^\"]+)\".*path class=\"([^\"]+)\".*d=\"([^\"]+)\"/, {\n  cls1: 1,\n  d1: 2,\n  cls2: 3,\n  d2: 4\n}), /*#__PURE__*/_wrapRegExp(/path class=\"([^\"]+)\".*d=\"([^\"]+)\"/, {\n  cls1: 1,\n  d1: 2\n})];\n\nconst {\n  styles,\n  shims\n} = namespace;\nconst FAMILY_NAMES = Object.keys(PREFIX_TO_LONG_STYLE);\nconst PREFIXES_FOR_FAMILY = FAMILY_NAMES.reduce((acc, familyId) => {\n  acc[familyId] = Object.keys(PREFIX_TO_LONG_STYLE[familyId]);\n  return acc;\n}, {});\nlet _defaultUsablePrefix = null;\nlet _byUnicode = {};\nlet _byLigature = {};\nlet _byOldName = {};\nlet _byOldUnicode = {};\nlet _byAlias = {};\nfunction isReserved(name) {\n  return ~RESERVED_CLASSES.indexOf(name);\n}\nfunction getIconName(cssPrefix, cls) {\n  const parts = cls.split('-');\n  const prefix = parts[0];\n  const iconName = parts.slice(1).join('-');\n  if (prefix === cssPrefix && iconName !== '' && !isReserved(iconName)) {\n    return iconName;\n  } else {\n    return null;\n  }\n}\nconst build = () => {\n  const lookup = reducer => {\n    return reduce(styles, (o$$1, style, prefix) => {\n      o$$1[prefix] = reduce(style, reducer, {});\n      return o$$1;\n    }, {});\n  };\n  _byUnicode = lookup((acc, icon, iconName) => {\n    if (icon[3]) {\n      acc[icon[3]] = iconName;\n    }\n    if (icon[2]) {\n      const aliases = icon[2].filter(a$$1 => {\n        return typeof a$$1 === 'number';\n      });\n      aliases.forEach(alias => {\n        acc[alias.toString(16)] = iconName;\n      });\n    }\n    return acc;\n  });\n  _byLigature = lookup((acc, icon, iconName) => {\n    acc[iconName] = iconName;\n    if (icon[2]) {\n      const aliases = icon[2].filter(a$$1 => {\n        return typeof a$$1 === 'string';\n      });\n      aliases.forEach(alias => {\n        acc[alias] = iconName;\n      });\n    }\n    return acc;\n  });\n  _byAlias = lookup((acc, icon, iconName) => {\n    const aliases = icon[2];\n    acc[iconName] = iconName;\n    aliases.forEach(alias => {\n      acc[alias] = iconName;\n    });\n    return acc;\n  });\n\n  // If we have a Kit, we can't determine if regular is available since we\n  // could be auto-fetching it. We'll have to assume that it is available.\n  const hasRegular = 'far' in styles || config.autoFetchSvg;\n  const shimLookups = reduce(shims, (acc, shim) => {\n    const maybeNameMaybeUnicode = shim[0];\n    let prefix = shim[1];\n    const iconName = shim[2];\n    if (prefix === 'far' && !hasRegular) {\n      prefix = 'fas';\n    }\n    if (typeof maybeNameMaybeUnicode === 'string') {\n      acc.names[maybeNameMaybeUnicode] = {\n        prefix,\n        iconName\n      };\n    }\n    if (typeof maybeNameMaybeUnicode === 'number') {\n      acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {\n        prefix,\n        iconName\n      };\n    }\n    return acc;\n  }, {\n    names: {},\n    unicodes: {}\n  });\n  _byOldName = shimLookups.names;\n  _byOldUnicode = shimLookups.unicodes;\n  _defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, {\n    family: config.familyDefault\n  });\n};\nonChange(c$$1 => {\n  _defaultUsablePrefix = getCanonicalPrefix(c$$1.styleDefault, {\n    family: config.familyDefault\n  });\n});\nbuild();\nfunction byUnicode(prefix, unicode) {\n  return (_byUnicode[prefix] || {})[unicode];\n}\nfunction byLigature(prefix, ligature) {\n  return (_byLigature[prefix] || {})[ligature];\n}\nfunction byAlias(prefix, alias) {\n  return (_byAlias[prefix] || {})[alias];\n}\nfunction byOldName(name) {\n  return _byOldName[name] || {\n    prefix: null,\n    iconName: null\n  };\n}\nfunction byOldUnicode(unicode) {\n  const oldUnicode = _byOldUnicode[unicode];\n  const newUnicode = byUnicode('fas', unicode);\n  return oldUnicode || (newUnicode ? {\n    prefix: 'fas',\n    iconName: newUnicode\n  } : null) || {\n    prefix: null,\n    iconName: null\n  };\n}\nfunction getDefaultUsablePrefix() {\n  return _defaultUsablePrefix;\n}\nconst emptyCanonicalIcon = () => {\n  return {\n    prefix: null,\n    iconName: null,\n    rest: []\n  };\n};\nfunction getFamilyId(values) {\n  let family = s;\n  const famProps = FAMILY_NAMES.reduce((acc, familyId) => {\n    acc[familyId] = \"\".concat(config.cssPrefix, \"-\").concat(familyId);\n    return acc;\n  }, {});\n  L.forEach(familyId => {\n    if (values.includes(famProps[familyId]) || values.some(v$$1 => PREFIXES_FOR_FAMILY[familyId].includes(v$$1))) {\n      family = familyId;\n    }\n  });\n  return family;\n}\nfunction getCanonicalPrefix(styleOrPrefix) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    family = s\n  } = params;\n  const style = PREFIX_TO_STYLE[family][styleOrPrefix];\n\n  // handles the exception of passing in only a family of 'duotone' with no style\n  if (family === t && !styleOrPrefix) {\n    return 'fad';\n  }\n  const prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];\n  const defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;\n  const result = prefix || defined || null;\n  return result;\n}\nfunction moveNonFaClassesToRest(classNames) {\n  let rest = [];\n  let iconName = null;\n  classNames.forEach(cls => {\n    const result = getIconName(config.cssPrefix, cls);\n    if (result) {\n      iconName = result;\n    } else if (cls) {\n      rest.push(cls);\n    }\n  });\n  return {\n    iconName,\n    rest\n  };\n}\nfunction sortedUniqueValues(arr) {\n  return arr.sort().filter((value, index, arr) => {\n    return arr.indexOf(value) === index;\n  });\n}\nfunction getCanonicalIcon(values) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    skipLookups = false\n  } = params;\n  let givenPrefix = null;\n  const faCombinedClasses = Ia.concat(bt$1);\n  const faStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => faCombinedClasses.includes(cls)));\n  const nonStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => !Ia.includes(cls)));\n  const faStyles = faStyleOrFamilyClasses.filter(cls => {\n    givenPrefix = cls;\n    return !P.includes(cls);\n  });\n  const [styleFromValues = null] = faStyles;\n  const family = getFamilyId(faStyleOrFamilyClasses);\n  const canonical = _objectSpread2(_objectSpread2({}, moveNonFaClassesToRest(nonStyleOrFamilyClasses)), {}, {\n    prefix: getCanonicalPrefix(styleFromValues, {\n      family\n    })\n  });\n  return _objectSpread2(_objectSpread2(_objectSpread2({}, canonical), getDefaultCanonicalPrefix({\n    values,\n    family,\n    styles,\n    config,\n    canonical,\n    givenPrefix\n  })), applyShimAndAlias(skipLookups, givenPrefix, canonical));\n}\nfunction applyShimAndAlias(skipLookups, givenPrefix, canonical) {\n  let {\n    prefix,\n    iconName\n  } = canonical;\n  if (skipLookups || !prefix || !iconName) {\n    return {\n      prefix,\n      iconName\n    };\n  }\n  const shim = givenPrefix === 'fa' ? byOldName(iconName) : {};\n  const aliasIconName = byAlias(prefix, iconName);\n  iconName = shim.iconName || aliasIconName || iconName;\n  prefix = shim.prefix || prefix;\n  if (prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) {\n    // Allow a fallback from the regular style to solid if regular is not available\n    // but only if we aren't auto-fetching SVGs\n    prefix = 'fas';\n  }\n  return {\n    prefix,\n    iconName\n  };\n}\nconst newCanonicalFamilies = L.filter(familyId => {\n  return familyId !== s || familyId !== t;\n});\nconst newCanonicalStyles = Object.keys(ga).filter(key => key !== s).map(key => Object.keys(ga[key])).flat();\nfunction getDefaultCanonicalPrefix(prefixOptions) {\n  const {\n    values,\n    family,\n    canonical,\n    givenPrefix = '',\n    styles = {},\n    config: config$$1 = {}\n  } = prefixOptions;\n  const isDuotoneFamily = family === t;\n  const valuesHasDuotone = values.includes('fa-duotone') || values.includes('fad');\n  const defaultFamilyIsDuotone = config$$1.familyDefault === 'duotone';\n  const canonicalPrefixIsDuotone = canonical.prefix === 'fad' || canonical.prefix === 'fa-duotone';\n  if (!isDuotoneFamily && (valuesHasDuotone || defaultFamilyIsDuotone || canonicalPrefixIsDuotone)) {\n    canonical.prefix = 'fad';\n  }\n  if (values.includes('fa-brands') || values.includes('fab')) {\n    canonical.prefix = 'fab';\n  }\n  if (!canonical.prefix && newCanonicalFamilies.includes(family)) {\n    const validPrefix = Object.keys(styles).find(key => newCanonicalStyles.includes(key));\n    if (validPrefix || config$$1.autoFetchSvg) {\n      const defaultPrefix = pt.get(family).defaultShortPrefixId;\n      canonical.prefix = defaultPrefix;\n      canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;\n    }\n  }\n  if (canonical.prefix === 'fa' || givenPrefix === 'fa') {\n    // The fa prefix is not canonical. So if it has made it through until this point\n    // we will shift it to the correct prefix.\n    canonical.prefix = getDefaultUsablePrefix() || 'fas';\n  }\n  return canonical;\n}\n\nclass Library {\n  constructor() {\n    this.definitions = {};\n  }\n  add() {\n    for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {\n      definitions[_key] = arguments[_key];\n    }\n    const additions = definitions.reduce(this._pullDefinitions, {});\n    Object.keys(additions).forEach(key => {\n      this.definitions[key] = _objectSpread2(_objectSpread2({}, this.definitions[key] || {}), additions[key]);\n      defineIcons(key, additions[key]);\n\n      // TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change\n      const longPrefix = PREFIX_TO_LONG_STYLE[s][key];\n      if (longPrefix) defineIcons(longPrefix, additions[key]);\n      build();\n    });\n  }\n  reset() {\n    this.definitions = {};\n  }\n  _pullDefinitions(additions, definition) {\n    const normalized = definition.prefix && definition.iconName && definition.icon ? {\n      0: definition\n    } : definition;\n    Object.keys(normalized).map(key => {\n      const {\n        prefix,\n        iconName,\n        icon\n      } = normalized[key];\n      const aliases = icon[2];\n      if (!additions[prefix]) additions[prefix] = {};\n      if (aliases.length > 0) {\n        aliases.forEach(alias => {\n          if (typeof alias === 'string') {\n            additions[prefix][alias] = icon;\n          }\n        });\n      }\n      additions[prefix][iconName] = icon;\n    });\n    return additions;\n  }\n}\n\nlet _plugins = [];\nlet _hooks = {};\nconst providers = {};\nconst defaultProviderKeys = Object.keys(providers);\nfunction registerPlugins(nextPlugins, _ref) {\n  let {\n    mixoutsTo: obj\n  } = _ref;\n  _plugins = nextPlugins;\n  _hooks = {};\n  Object.keys(providers).forEach(k => {\n    if (defaultProviderKeys.indexOf(k) === -1) {\n      delete providers[k];\n    }\n  });\n  _plugins.forEach(plugin => {\n    const mixout = plugin.mixout ? plugin.mixout() : {};\n    Object.keys(mixout).forEach(tk => {\n      if (typeof mixout[tk] === 'function') {\n        obj[tk] = mixout[tk];\n      }\n      if (typeof mixout[tk] === 'object') {\n        Object.keys(mixout[tk]).forEach(sk => {\n          if (!obj[tk]) {\n            obj[tk] = {};\n          }\n          obj[tk][sk] = mixout[tk][sk];\n        });\n      }\n    });\n    if (plugin.hooks) {\n      const hooks = plugin.hooks();\n      Object.keys(hooks).forEach(hook => {\n        if (!_hooks[hook]) {\n          _hooks[hook] = [];\n        }\n        _hooks[hook].push(hooks[hook]);\n      });\n    }\n    if (plugin.provides) {\n      plugin.provides(providers);\n    }\n  });\n  return obj;\n}\nfunction chainHooks(hook, accumulator) {\n  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n    args[_key - 2] = arguments[_key];\n  }\n  const hookFns = _hooks[hook] || [];\n  hookFns.forEach(hookFn => {\n    accumulator = hookFn.apply(null, [accumulator, ...args]); // eslint-disable-line no-useless-call\n  });\n  return accumulator;\n}\nfunction callHooks(hook) {\n  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n    args[_key2 - 1] = arguments[_key2];\n  }\n  const hookFns = _hooks[hook] || [];\n  hookFns.forEach(hookFn => {\n    hookFn.apply(null, args);\n  });\n  return undefined;\n}\nfunction callProvided() {\n  const hook = arguments[0];\n  const args = Array.prototype.slice.call(arguments, 1);\n  return providers[hook] ? providers[hook].apply(null, args) : undefined;\n}\n\nfunction findIconDefinition(iconLookup) {\n  if (iconLookup.prefix === 'fa') {\n    iconLookup.prefix = 'fas';\n  }\n  let {\n    iconName\n  } = iconLookup;\n  const prefix = iconLookup.prefix || getDefaultUsablePrefix();\n  if (!iconName) return;\n  iconName = byAlias(prefix, iconName) || iconName;\n  return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);\n}\nconst library = new Library();\nconst noAuto = () => {\n  config.autoReplaceSvg = false;\n  config.observeMutations = false;\n  callHooks('noAuto');\n};\nconst dom = {\n  i2svg: function () {\n    let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    if (IS_DOM) {\n      callHooks('beforeI2svg', params);\n      callProvided('pseudoElements2svg', params);\n      return callProvided('i2svg', params);\n    } else {\n      return Promise.reject(new Error('Operation requires a DOM of some kind.'));\n    }\n  },\n  watch: function () {\n    let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    const {\n      autoReplaceSvgRoot\n    } = params;\n    if (config.autoReplaceSvg === false) {\n      config.autoReplaceSvg = true;\n    }\n    config.observeMutations = true;\n    domready(() => {\n      autoReplace({\n        autoReplaceSvgRoot\n      });\n      callHooks('watch', params);\n    });\n  }\n};\nconst parse = {\n  icon: icon => {\n    if (icon === null) {\n      return null;\n    }\n    if (typeof icon === 'object' && icon.prefix && icon.iconName) {\n      return {\n        prefix: icon.prefix,\n        iconName: byAlias(icon.prefix, icon.iconName) || icon.iconName\n      };\n    }\n    if (Array.isArray(icon) && icon.length === 2) {\n      const iconName = icon[1].indexOf('fa-') === 0 ? icon[1].slice(3) : icon[1];\n      const prefix = getCanonicalPrefix(icon[0]);\n      return {\n        prefix,\n        iconName: byAlias(prefix, iconName) || iconName\n      };\n    }\n    if (typeof icon === 'string' && (icon.indexOf(\"\".concat(config.cssPrefix, \"-\")) > -1 || icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {\n      const canonicalIcon = getCanonicalIcon(icon.split(' '), {\n        skipLookups: true\n      });\n      return {\n        prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),\n        iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName\n      };\n    }\n    if (typeof icon === 'string') {\n      const prefix = getDefaultUsablePrefix();\n      return {\n        prefix,\n        iconName: byAlias(prefix, icon) || icon\n      };\n    }\n  }\n};\nconst api = {\n  noAuto,\n  config,\n  dom,\n  parse,\n  library,\n  findIconDefinition,\n  toHtml\n};\nconst autoReplace = function () {\n  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  const {\n    autoReplaceSvgRoot = DOCUMENT\n  } = params;\n  if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({\n    node: autoReplaceSvgRoot\n  });\n};\n\nfunction domVariants(val, abstractCreator) {\n  Object.defineProperty(val, 'abstract', {\n    get: abstractCreator\n  });\n  Object.defineProperty(val, 'html', {\n    get: function () {\n      return val.abstract.map(a => toHtml(a));\n    }\n  });\n  Object.defineProperty(val, 'node', {\n    get: function () {\n      if (!IS_DOM) return;\n      const container = DOCUMENT.createElement('div');\n      container.innerHTML = val.html;\n      return container.children;\n    }\n  });\n  return val;\n}\n\nfunction asIcon (_ref) {\n  let {\n    children,\n    main,\n    mask,\n    attributes,\n    styles,\n    transform\n  } = _ref;\n  if (transformIsMeaningful(transform) && main.found && !mask.found) {\n    const {\n      width,\n      height\n    } = main;\n    const offset = {\n      x: width / height / 2,\n      y: 0.5\n    };\n    attributes['style'] = joinStyles(_objectSpread2(_objectSpread2({}, styles), {}, {\n      'transform-origin': \"\".concat(offset.x + transform.x / 16, \"em \").concat(offset.y + transform.y / 16, \"em\")\n    }));\n  }\n  return [{\n    tag: 'svg',\n    attributes,\n    children\n  }];\n}\n\nfunction asSymbol (_ref) {\n  let {\n    prefix,\n    iconName,\n    children,\n    attributes,\n    symbol\n  } = _ref;\n  const id = symbol === true ? \"\".concat(prefix, \"-\").concat(config.cssPrefix, \"-\").concat(iconName) : symbol;\n  return [{\n    tag: 'svg',\n    attributes: {\n      style: 'display: none;'\n    },\n    children: [{\n      tag: 'symbol',\n      attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {\n        id\n      }),\n      children\n    }]\n  }];\n}\n\nfunction makeInlineSvgAbstract(params) {\n  const {\n    icons: {\n      main,\n      mask\n    },\n    prefix,\n    iconName,\n    transform,\n    symbol,\n    title,\n    maskId,\n    titleId,\n    extra,\n    watchable = false\n  } = params;\n  const {\n    width,\n    height\n  } = mask.found ? mask : main;\n  const isUploadedIcon = Lt.includes(prefix);\n  const attrClass = [config.replacementClass, iconName ? \"\".concat(config.cssPrefix, \"-\").concat(iconName) : ''].filter(c$$1 => extra.classes.indexOf(c$$1) === -1).filter(c$$1 => c$$1 !== '' || !!c$$1).concat(extra.classes).join(' ');\n  let content = {\n    children: [],\n    attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {\n      'data-prefix': prefix,\n      'data-icon': iconName,\n      'class': attrClass,\n      'role': extra.attributes.role || 'img',\n      'xmlns': 'http://www.w3.org/2000/svg',\n      'viewBox': \"0 0 \".concat(width, \" \").concat(height)\n    })\n  };\n  const uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {\n    width: \"\".concat(width / height * 16 * 0.0625, \"em\")\n  } : {};\n  if (watchable) {\n    content.attributes[DATA_FA_I2SVG] = '';\n  }\n  if (title) {\n    content.children.push({\n      tag: 'title',\n      attributes: {\n        id: content.attributes['aria-labelledby'] || \"title-\".concat(titleId || nextUniqueId())\n      },\n      children: [title]\n    });\n    delete content.attributes.title;\n  }\n  const args = _objectSpread2(_objectSpread2({}, content), {}, {\n    prefix,\n    iconName,\n    main,\n    mask,\n    maskId,\n    transform,\n    symbol,\n    styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)\n  });\n  const {\n    children,\n    attributes\n  } = mask.found && main.found ? callProvided('generateAbstractMask', args) || {\n    children: [],\n    attributes: {}\n  } : callProvided('generateAbstractIcon', args) || {\n    children: [],\n    attributes: {}\n  };\n  args.children = children;\n  args.attributes = attributes;\n  if (symbol) {\n    return asSymbol(args);\n  } else {\n    return asIcon(args);\n  }\n}\nfunction makeLayersTextAbstract(params) {\n  const {\n    content,\n    width,\n    height,\n    transform,\n    title,\n    extra,\n    watchable = false\n  } = params;\n  const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {\n    'title': title\n  } : {}), {}, {\n    'class': extra.classes.join(' ')\n  });\n  if (watchable) {\n    attributes[DATA_FA_I2SVG] = '';\n  }\n  const styles = _objectSpread2({}, extra.styles);\n  if (transformIsMeaningful(transform)) {\n    styles['transform'] = transformForCss({\n      transform,\n      startCentered: true,\n      width,\n      height\n    });\n    styles['-webkit-transform'] = styles['transform'];\n  }\n  const styleString = joinStyles(styles);\n  if (styleString.length > 0) {\n    attributes['style'] = styleString;\n  }\n  const val = [];\n  val.push({\n    tag: 'span',\n    attributes,\n    children: [content]\n  });\n  if (title) {\n    val.push({\n      tag: 'span',\n      attributes: {\n        class: 'sr-only'\n      },\n      children: [title]\n    });\n  }\n  return val;\n}\nfunction makeLayersCounterAbstract(params) {\n  const {\n    content,\n    title,\n    extra\n  } = params;\n  const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {\n    'title': title\n  } : {}), {}, {\n    'class': extra.classes.join(' ')\n  });\n  const styleString = joinStyles(extra.styles);\n  if (styleString.length > 0) {\n    attributes['style'] = styleString;\n  }\n  const val = [];\n  val.push({\n    tag: 'span',\n    attributes,\n    children: [content]\n  });\n  if (title) {\n    val.push({\n      tag: 'span',\n      attributes: {\n        class: 'sr-only'\n      },\n      children: [title]\n    });\n  }\n  return val;\n}\n\nconst {\n  styles: styles$1\n} = namespace;\nfunction asFoundIcon(icon) {\n  const width = icon[0];\n  const height = icon[1];\n  const [vectorData] = icon.slice(4);\n  let element = null;\n  if (Array.isArray(vectorData)) {\n    element = {\n      tag: 'g',\n      attributes: {\n        class: \"\".concat(config.cssPrefix, \"-\").concat(DUOTONE_CLASSES.GROUP)\n      },\n      children: [{\n        tag: 'path',\n        attributes: {\n          class: \"\".concat(config.cssPrefix, \"-\").concat(DUOTONE_CLASSES.SECONDARY),\n          fill: 'currentColor',\n          d: vectorData[0]\n        }\n      }, {\n        tag: 'path',\n        attributes: {\n          class: \"\".concat(config.cssPrefix, \"-\").concat(DUOTONE_CLASSES.PRIMARY),\n          fill: 'currentColor',\n          d: vectorData[1]\n        }\n      }]\n    };\n  } else {\n    element = {\n      tag: 'path',\n      attributes: {\n        fill: 'currentColor',\n        d: vectorData\n      }\n    };\n  }\n  return {\n    found: true,\n    width,\n    height,\n    icon: element\n  };\n}\nconst missingIconResolutionMixin = {\n  found: false,\n  width: 512,\n  height: 512\n};\nfunction maybeNotifyMissing(iconName, prefix) {\n  if (!PRODUCTION && !config.showMissingIcons && iconName) {\n    console.error(\"Icon with name \\\"\".concat(iconName, \"\\\" and prefix \\\"\").concat(prefix, \"\\\" is missing.\"));\n  }\n}\nfunction findIcon(iconName, prefix) {\n  let givenPrefix = prefix;\n  if (prefix === 'fa' && config.styleDefault !== null) {\n    prefix = getDefaultUsablePrefix();\n  }\n  return new Promise((resolve, reject) => {\n    if (givenPrefix === 'fa') {\n      const shim = byOldName(iconName) || {};\n      iconName = shim.iconName || iconName;\n      prefix = shim.prefix || prefix;\n    }\n    if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {\n      const icon = styles$1[prefix][iconName];\n      return resolve(asFoundIcon(icon));\n    }\n    maybeNotifyMissing(iconName, prefix);\n    resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {\n      icon: config.showMissingIcons && iconName ? callProvided('missingIconAbstract') || {} : {}\n    }));\n  });\n}\n\nconst noop$1 = () => {};\nconst p$2 = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {\n  mark: noop$1,\n  measure: noop$1\n};\nconst preamble = \"FA \\\"6.7.2\\\"\";\nconst begin = name => {\n  p$2.mark(\"\".concat(preamble, \" \").concat(name, \" begins\"));\n  return () => end(name);\n};\nconst end = name => {\n  p$2.mark(\"\".concat(preamble, \" \").concat(name, \" ends\"));\n  p$2.measure(\"\".concat(preamble, \" \").concat(name), \"\".concat(preamble, \" \").concat(name, \" begins\"), \"\".concat(preamble, \" \").concat(name, \" ends\"));\n};\nvar perf = {\n  begin,\n  end\n};\n\nconst noop$2 = () => {};\nfunction isWatched(node) {\n  const i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;\n  return typeof i2svg === 'string';\n}\nfunction hasPrefixAndIcon(node) {\n  const prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;\n  const icon = node.getAttribute ? node.getAttribute(DATA_ICON) : null;\n  return prefix && icon;\n}\nfunction hasBeenReplaced(node) {\n  return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);\n}\nfunction getMutator() {\n  if (config.autoReplaceSvg === true) {\n    return mutators.replace;\n  }\n  const mutator = mutators[config.autoReplaceSvg];\n  return mutator || mutators.replace;\n}\nfunction createElementNS(tag) {\n  return DOCUMENT.createElementNS('http://www.w3.org/2000/svg', tag);\n}\nfunction createElement(tag) {\n  return DOCUMENT.createElement(tag);\n}\nfunction convertSVG(abstractObj) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    ceFn = abstractObj.tag === 'svg' ? createElementNS : createElement\n  } = params;\n  if (typeof abstractObj === 'string') {\n    return DOCUMENT.createTextNode(abstractObj);\n  }\n  const tag = ceFn(abstractObj.tag);\n  Object.keys(abstractObj.attributes || []).forEach(function (key) {\n    tag.setAttribute(key, abstractObj.attributes[key]);\n  });\n  const children = abstractObj.children || [];\n  children.forEach(function (child) {\n    tag.appendChild(convertSVG(child, {\n      ceFn\n    }));\n  });\n  return tag;\n}\nfunction nodeAsComment(node) {\n  let comment = \" \".concat(node.outerHTML, \" \");\n  /* BEGIN.ATTRIBUTION */\n  comment = \"\".concat(comment, \"Font Awesome fontawesome.com \");\n  /* END.ATTRIBUTION */\n  return comment;\n}\nconst mutators = {\n  replace: function (mutation) {\n    const node = mutation[0];\n    if (node.parentNode) {\n      mutation[1].forEach(abstract => {\n        node.parentNode.insertBefore(convertSVG(abstract), node);\n      });\n      if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {\n        let comment = DOCUMENT.createComment(nodeAsComment(node));\n        node.parentNode.replaceChild(comment, node);\n      } else {\n        node.remove();\n      }\n    }\n  },\n  nest: function (mutation) {\n    const node = mutation[0];\n    const abstract = mutation[1];\n\n    // If we already have a replaced node we do not want to continue nesting within it.\n    // Short-circuit to the standard replacement\n    if (~classArray(node).indexOf(config.replacementClass)) {\n      return mutators.replace(mutation);\n    }\n    const forSvg = new RegExp(\"\".concat(config.cssPrefix, \"-.*\"));\n    delete abstract[0].attributes.id;\n    if (abstract[0].attributes.class) {\n      const splitClasses = abstract[0].attributes.class.split(' ').reduce((acc, cls) => {\n        if (cls === config.replacementClass || cls.match(forSvg)) {\n          acc.toSvg.push(cls);\n        } else {\n          acc.toNode.push(cls);\n        }\n        return acc;\n      }, {\n        toNode: [],\n        toSvg: []\n      });\n      abstract[0].attributes.class = splitClasses.toSvg.join(' ');\n      if (splitClasses.toNode.length === 0) {\n        node.removeAttribute('class');\n      } else {\n        node.setAttribute('class', splitClasses.toNode.join(' '));\n      }\n    }\n    const newInnerHTML = abstract.map(a => toHtml(a)).join('\\n');\n    node.setAttribute(DATA_FA_I2SVG, '');\n    node.innerHTML = newInnerHTML;\n  }\n};\nfunction performOperationSync(op) {\n  op();\n}\nfunction perform(mutations, callback) {\n  const callbackFunction = typeof callback === 'function' ? callback : noop$2;\n  if (mutations.length === 0) {\n    callbackFunction();\n  } else {\n    let frame = performOperationSync;\n    if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {\n      frame = WINDOW.requestAnimationFrame || performOperationSync;\n    }\n    frame(() => {\n      const mutator = getMutator();\n      const mark = perf.begin('mutate');\n      mutations.map(mutator);\n      mark();\n      callbackFunction();\n    });\n  }\n}\nlet disabled = false;\nfunction disableObservation() {\n  disabled = true;\n}\nfunction enableObservation() {\n  disabled = false;\n}\nlet mo = null;\nfunction observe(options) {\n  if (!MUTATION_OBSERVER) {\n    return;\n  }\n  if (!config.observeMutations) {\n    return;\n  }\n  const {\n    treeCallback = noop$2,\n    nodeCallback = noop$2,\n    pseudoElementsCallback = noop$2,\n    observeMutationsRoot = DOCUMENT\n  } = options;\n  mo = new MUTATION_OBSERVER(objects => {\n    if (disabled) return;\n    const defaultPrefix = getDefaultUsablePrefix();\n    toArray(objects).forEach(mutationRecord => {\n      if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {\n        if (config.searchPseudoElements) {\n          pseudoElementsCallback(mutationRecord.target);\n        }\n        treeCallback(mutationRecord.target);\n      }\n      if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {\n        pseudoElementsCallback(mutationRecord.target.parentNode);\n      }\n      if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {\n        if (mutationRecord.attributeName === 'class' && hasPrefixAndIcon(mutationRecord.target)) {\n          const {\n            prefix,\n            iconName\n          } = getCanonicalIcon(classArray(mutationRecord.target));\n          mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);\n          if (iconName) mutationRecord.target.setAttribute(DATA_ICON, iconName);\n        } else if (hasBeenReplaced(mutationRecord.target)) {\n          nodeCallback(mutationRecord.target);\n        }\n      }\n    });\n  });\n  if (!IS_DOM) return;\n  mo.observe(observeMutationsRoot, {\n    childList: true,\n    attributes: true,\n    characterData: true,\n    subtree: true\n  });\n}\nfunction disconnect() {\n  if (!mo) return;\n  mo.disconnect();\n}\n\nfunction styleParser (node) {\n  const style = node.getAttribute('style');\n  let val = [];\n  if (style) {\n    val = style.split(';').reduce((acc, style) => {\n      const styles = style.split(':');\n      const prop = styles[0];\n      const value = styles.slice(1);\n      if (prop && value.length > 0) {\n        acc[prop] = value.join(':').trim();\n      }\n      return acc;\n    }, {});\n  }\n  return val;\n}\n\nfunction classParser (node) {\n  const existingPrefix = node.getAttribute('data-prefix');\n  const existingIconName = node.getAttribute('data-icon');\n  const innerText = node.innerText !== undefined ? node.innerText.trim() : '';\n  let val = getCanonicalIcon(classArray(node));\n  if (!val.prefix) {\n    val.prefix = getDefaultUsablePrefix();\n  }\n  if (existingPrefix && existingIconName) {\n    val.prefix = existingPrefix;\n    val.iconName = existingIconName;\n  }\n  if (val.iconName && val.prefix) {\n    return val;\n  }\n  if (val.prefix && innerText.length > 0) {\n    val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));\n  }\n  if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) {\n    val.iconName = node.firstChild.data;\n  }\n  return val;\n}\n\nfunction attributesParser (node) {\n  const extraAttributes = toArray(node.attributes).reduce((acc, attr) => {\n    if (acc.name !== 'class' && acc.name !== 'style') {\n      acc[attr.name] = attr.value;\n    }\n    return acc;\n  }, {});\n  const title = node.getAttribute('title');\n  const titleId = node.getAttribute('data-fa-title-id');\n  if (config.autoA11y) {\n    if (title) {\n      extraAttributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n    } else {\n      extraAttributes['aria-hidden'] = 'true';\n      extraAttributes['focusable'] = 'false';\n    }\n  }\n  return extraAttributes;\n}\n\nfunction blankMeta() {\n  return {\n    iconName: null,\n    title: null,\n    titleId: null,\n    prefix: null,\n    transform: meaninglessTransform,\n    symbol: false,\n    mask: {\n      iconName: null,\n      prefix: null,\n      rest: []\n    },\n    maskId: null,\n    extra: {\n      classes: [],\n      styles: {},\n      attributes: {}\n    }\n  };\n}\nfunction parseMeta(node) {\n  let parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n    styleParser: true\n  };\n  const {\n    iconName,\n    prefix,\n    rest: extraClasses\n  } = classParser(node);\n  const extraAttributes = attributesParser(node);\n  const pluginMeta = chainHooks('parseNodeAttributes', {}, node);\n  let extraStyles = parser.styleParser ? styleParser(node) : [];\n  return _objectSpread2({\n    iconName,\n    title: node.getAttribute('title'),\n    titleId: node.getAttribute('data-fa-title-id'),\n    prefix,\n    transform: meaninglessTransform,\n    mask: {\n      iconName: null,\n      prefix: null,\n      rest: []\n    },\n    maskId: null,\n    symbol: false,\n    extra: {\n      classes: extraClasses,\n      styles: extraStyles,\n      attributes: extraAttributes\n    }\n  }, pluginMeta);\n}\n\nconst {\n  styles: styles$2\n} = namespace;\nfunction generateMutation(node) {\n  const nodeMeta = config.autoReplaceSvg === 'nest' ? parseMeta(node, {\n    styleParser: false\n  }) : parseMeta(node);\n  if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {\n    return callProvided('generateLayersText', node, nodeMeta);\n  } else {\n    return callProvided('generateSvgReplacementMutation', node, nodeMeta);\n  }\n}\nfunction getKnownPrefixes() {\n  return [...Ft, ...Ia];\n}\nfunction onTree(root) {\n  let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  if (!IS_DOM) return Promise.resolve();\n  const htmlClassList = DOCUMENT.documentElement.classList;\n  const hclAdd = suffix => htmlClassList.add(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n  const hclRemove = suffix => htmlClassList.remove(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n  const prefixes = config.autoFetchSvg ? getKnownPrefixes() : P.concat(Object.keys(styles$2));\n  if (!prefixes.includes('fa')) {\n    prefixes.push('fa');\n  }\n  const prefixesDomQuery = [\".\".concat(LAYERS_TEXT_CLASSNAME, \":not([\").concat(DATA_FA_I2SVG, \"])\")].concat(prefixes.map(p$$1 => \".\".concat(p$$1, \":not([\").concat(DATA_FA_I2SVG, \"])\"))).join(', ');\n  if (prefixesDomQuery.length === 0) {\n    return Promise.resolve();\n  }\n  let candidates = [];\n  try {\n    candidates = toArray(root.querySelectorAll(prefixesDomQuery));\n  } catch (e$$1) {\n    // noop\n  }\n  if (candidates.length > 0) {\n    hclAdd('pending');\n    hclRemove('complete');\n  } else {\n    return Promise.resolve();\n  }\n  const mark = perf.begin('onTree');\n  const mutations = candidates.reduce((acc, node) => {\n    try {\n      const mutation = generateMutation(node);\n      if (mutation) {\n        acc.push(mutation);\n      }\n    } catch (e$$1) {\n      if (!PRODUCTION) {\n        if (e$$1.name === 'MissingIcon') {\n          console.error(e$$1);\n        }\n      }\n    }\n    return acc;\n  }, []);\n  return new Promise((resolve, reject) => {\n    Promise.all(mutations).then(resolvedMutations => {\n      perform(resolvedMutations, () => {\n        hclAdd('active');\n        hclAdd('complete');\n        hclRemove('pending');\n        if (typeof callback === 'function') callback();\n        mark();\n        resolve();\n      });\n    }).catch(e$$1 => {\n      mark();\n      reject(e$$1);\n    });\n  });\n}\nfunction onNode(node) {\n  let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  generateMutation(node).then(mutation => {\n    if (mutation) {\n      perform([mutation], callback);\n    }\n  });\n}\nfunction resolveIcons(next) {\n  return function (maybeIconDefinition) {\n    let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    const iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});\n    let {\n      mask\n    } = params;\n    if (mask) {\n      mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});\n    }\n    return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {\n      mask\n    }));\n  };\n}\nconst render = function (iconDefinition) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    transform = meaninglessTransform,\n    symbol = false,\n    mask = null,\n    maskId = null,\n    title = null,\n    titleId = null,\n    classes = [],\n    attributes = {},\n    styles = {}\n  } = params;\n  if (!iconDefinition) return;\n  const {\n    prefix,\n    iconName,\n    icon\n  } = iconDefinition;\n  return domVariants(_objectSpread2({\n    type: 'icon'\n  }, iconDefinition), () => {\n    callHooks('beforeDOMElementCreation', {\n      iconDefinition,\n      params\n    });\n    if (config.autoA11y) {\n      if (title) {\n        attributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n      } else {\n        attributes['aria-hidden'] = 'true';\n        attributes['focusable'] = 'false';\n      }\n    }\n    return makeInlineSvgAbstract({\n      icons: {\n        main: asFoundIcon(icon),\n        mask: mask ? asFoundIcon(mask.icon) : {\n          found: false,\n          width: null,\n          height: null,\n          icon: {}\n        }\n      },\n      prefix,\n      iconName,\n      transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),\n      symbol,\n      title,\n      maskId,\n      titleId,\n      extra: {\n        attributes,\n        styles,\n        classes\n      }\n    });\n  });\n};\nvar ReplaceElements = {\n  mixout() {\n    return {\n      icon: resolveIcons(render)\n    };\n  },\n  hooks() {\n    return {\n      mutationObserverCallbacks(accumulator) {\n        accumulator.treeCallback = onTree;\n        accumulator.nodeCallback = onNode;\n        return accumulator;\n      }\n    };\n  },\n  provides(providers$$1) {\n    providers$$1.i2svg = function (params) {\n      const {\n        node = DOCUMENT,\n        callback = () => {}\n      } = params;\n      return onTree(node, callback);\n    };\n    providers$$1.generateSvgReplacementMutation = function (node, nodeMeta) {\n      const {\n        iconName,\n        title,\n        titleId,\n        prefix,\n        transform,\n        symbol,\n        mask,\n        maskId,\n        extra\n      } = nodeMeta;\n      return new Promise((resolve, reject) => {\n        Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({\n          found: false,\n          width: 512,\n          height: 512,\n          icon: {}\n        })]).then(_ref => {\n          let [main, mask] = _ref;\n          resolve([node, makeInlineSvgAbstract({\n            icons: {\n              main,\n              mask\n            },\n            prefix,\n            iconName,\n            transform,\n            symbol,\n            maskId,\n            title,\n            titleId,\n            extra,\n            watchable: true\n          })]);\n        }).catch(reject);\n      });\n    };\n    providers$$1.generateAbstractIcon = function (_ref2) {\n      let {\n        children,\n        attributes,\n        main,\n        transform,\n        styles\n      } = _ref2;\n      const styleString = joinStyles(styles);\n      if (styleString.length > 0) {\n        attributes['style'] = styleString;\n      }\n      let nextChild;\n      if (transformIsMeaningful(transform)) {\n        nextChild = callProvided('generateAbstractTransformGrouping', {\n          main,\n          transform,\n          containerWidth: main.width,\n          iconWidth: main.width\n        });\n      }\n      children.push(nextChild || main.icon);\n      return {\n        children,\n        attributes\n      };\n    };\n  }\n};\n\nvar Layers = {\n  mixout() {\n    return {\n      layer(assembler) {\n        let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        const {\n          classes = []\n        } = params;\n        return domVariants({\n          type: 'layer'\n        }, () => {\n          callHooks('beforeDOMElementCreation', {\n            assembler,\n            params\n          });\n          let children = [];\n          assembler(args => {\n            Array.isArray(args) ? args.map(a => {\n              children = children.concat(a.abstract);\n            }) : children = children.concat(args.abstract);\n          });\n          return [{\n            tag: 'span',\n            attributes: {\n              class: [\"\".concat(config.cssPrefix, \"-layers\"), ...classes].join(' ')\n            },\n            children\n          }];\n        });\n      }\n    };\n  }\n};\n\nvar LayersCounter = {\n  mixout() {\n    return {\n      counter(content) {\n        let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        const {\n          title = null,\n          classes = [],\n          attributes = {},\n          styles = {}\n        } = params;\n        return domVariants({\n          type: 'counter',\n          content\n        }, () => {\n          callHooks('beforeDOMElementCreation', {\n            content,\n            params\n          });\n          return makeLayersCounterAbstract({\n            content: content.toString(),\n            title,\n            extra: {\n              attributes,\n              styles,\n              classes: [\"\".concat(config.cssPrefix, \"-layers-counter\"), ...classes]\n            }\n          });\n        });\n      }\n    };\n  }\n};\n\nvar LayersText = {\n  mixout() {\n    return {\n      text(content) {\n        let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        const {\n          transform = meaninglessTransform,\n          title = null,\n          classes = [],\n          attributes = {},\n          styles = {}\n        } = params;\n        return domVariants({\n          type: 'text',\n          content\n        }, () => {\n          callHooks('beforeDOMElementCreation', {\n            content,\n            params\n          });\n          return makeLayersTextAbstract({\n            content,\n            transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),\n            title,\n            extra: {\n              attributes,\n              styles,\n              classes: [\"\".concat(config.cssPrefix, \"-layers-text\"), ...classes]\n            }\n          });\n        });\n      }\n    };\n  },\n  provides(providers$$1) {\n    providers$$1.generateLayersText = function (node, nodeMeta) {\n      const {\n        title,\n        transform,\n        extra\n      } = nodeMeta;\n      let width = null;\n      let height = null;\n      if (IS_IE) {\n        const computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);\n        const boundingClientRect = node.getBoundingClientRect();\n        width = boundingClientRect.width / computedFontSize;\n        height = boundingClientRect.height / computedFontSize;\n      }\n      if (config.autoA11y && !title) {\n        extra.attributes['aria-hidden'] = 'true';\n      }\n      return Promise.resolve([node, makeLayersTextAbstract({\n        content: node.innerHTML,\n        width,\n        height,\n        transform,\n        title,\n        extra,\n        watchable: true\n      })]);\n    };\n  }\n};\n\nconst CLEAN_CONTENT_PATTERN = new RegExp('\\u{22}', 'ug');\nconst SECONDARY_UNICODE_RANGE = [1105920, 1112319];\nconst _FONT_FAMILY_WEIGHT_TO_PREFIX = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {\n  FontAwesome: {\n    normal: 'fas',\n    400: 'fas'\n  }\n}), lt), wa), Yt);\nconst FONT_FAMILY_WEIGHT_TO_PREFIX = Object.keys(_FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, key) => {\n  acc[key.toLowerCase()] = _FONT_FAMILY_WEIGHT_TO_PREFIX[key];\n  return acc;\n}, {});\nconst FONT_FAMILY_WEIGHT_FALLBACK = Object.keys(FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, fontFamily) => {\n  const weights = FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamily];\n  acc[fontFamily] = weights[900] || [...Object.entries(weights)][0][1];\n  return acc;\n}, {});\nfunction hexValueFromContent(content) {\n  const cleaned = content.replace(CLEAN_CONTENT_PATTERN, '');\n  const codePoint = codePointAt(cleaned, 0);\n  const isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];\n  const isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;\n  return {\n    value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),\n    isSecondary: isPrependTen || isDoubled\n  };\n}\nfunction getPrefix(fontFamily, fontWeight) {\n  const fontFamilySanitized = fontFamily.replace(/^['\"]|['\"]$/g, '').toLowerCase();\n  const fontWeightInteger = parseInt(fontWeight);\n  const fontWeightSanitized = isNaN(fontWeightInteger) ? 'normal' : fontWeightInteger;\n  return (FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamilySanitized] || {})[fontWeightSanitized] || FONT_FAMILY_WEIGHT_FALLBACK[fontFamilySanitized];\n}\nfunction replaceForPosition(node, position) {\n  const pendingAttribute = \"\".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));\n  return new Promise((resolve, reject) => {\n    if (node.getAttribute(pendingAttribute) !== null) {\n      // This node is already being processed\n      return resolve();\n    }\n    const children = toArray(node.children);\n    const alreadyProcessedPseudoElement = children.filter(c$$1 => c$$1.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position)[0];\n    const styles = WINDOW.getComputedStyle(node, position);\n    const fontFamily = styles.getPropertyValue('font-family');\n    const fontFamilyMatch = fontFamily.match(FONT_FAMILY_PATTERN);\n    const fontWeight = styles.getPropertyValue('font-weight');\n    const content = styles.getPropertyValue('content');\n    if (alreadyProcessedPseudoElement && !fontFamilyMatch) {\n      // If we've already processed it but the current computed style does not result in a font-family,\n      // that probably means that a class name that was previously present to make the icon has been\n      // removed. So we now should delete the icon.\n      node.removeChild(alreadyProcessedPseudoElement);\n      return resolve();\n    } else if (fontFamilyMatch && content !== 'none' && content !== '') {\n      const content = styles.getPropertyValue('content');\n      let prefix = getPrefix(fontFamily, fontWeight);\n      const {\n        value: hexValue,\n        isSecondary\n      } = hexValueFromContent(content);\n      const isV4 = fontFamilyMatch[0].startsWith('FontAwesome');\n      let iconName = byUnicode(prefix, hexValue);\n      let iconIdentifier = iconName;\n      if (isV4) {\n        const iconName4 = byOldUnicode(hexValue);\n        if (iconName4.iconName && iconName4.prefix) {\n          iconName = iconName4.iconName;\n          prefix = iconName4.prefix;\n        }\n      }\n\n      // Only convert the pseudo element in this ::before/::after position into an icon if we haven't\n      // already done so with the same prefix and iconName\n      if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {\n        node.setAttribute(pendingAttribute, iconIdentifier);\n        if (alreadyProcessedPseudoElement) {\n          // Delete the old one, since we're replacing it with a new one\n          node.removeChild(alreadyProcessedPseudoElement);\n        }\n        const meta = blankMeta();\n        const {\n          extra\n        } = meta;\n        extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;\n        findIcon(iconName, prefix).then(main => {\n          const abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {\n            icons: {\n              main,\n              mask: emptyCanonicalIcon()\n            },\n            prefix,\n            iconName: iconIdentifier,\n            extra,\n            watchable: true\n          }));\n          const element = DOCUMENT.createElementNS('http://www.w3.org/2000/svg', 'svg');\n          if (position === '::before') {\n            node.insertBefore(element, node.firstChild);\n          } else {\n            node.appendChild(element);\n          }\n          element.outerHTML = abstract.map(a$$1 => toHtml(a$$1)).join('\\n');\n          node.removeAttribute(pendingAttribute);\n          resolve();\n        }).catch(reject);\n      } else {\n        resolve();\n      }\n    } else {\n      resolve();\n    }\n  });\n}\nfunction replace(node) {\n  return Promise.all([replaceForPosition(node, '::before'), replaceForPosition(node, '::after')]);\n}\nfunction processable(node) {\n  return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');\n}\nfunction searchPseudoElements(root) {\n  if (!IS_DOM) return;\n  return new Promise((resolve, reject) => {\n    const operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);\n    const end = perf.begin('searchPseudoElements');\n    disableObservation();\n    Promise.all(operations).then(() => {\n      end();\n      enableObservation();\n      resolve();\n    }).catch(() => {\n      end();\n      enableObservation();\n      reject();\n    });\n  });\n}\nvar PseudoElements = {\n  hooks() {\n    return {\n      mutationObserverCallbacks(accumulator) {\n        accumulator.pseudoElementsCallback = searchPseudoElements;\n        return accumulator;\n      }\n    };\n  },\n  provides(providers) {\n    providers.pseudoElements2svg = function (params) {\n      const {\n        node = DOCUMENT\n      } = params;\n      if (config.searchPseudoElements) {\n        searchPseudoElements(node);\n      }\n    };\n  }\n};\n\nlet _unwatched = false;\nvar MutationObserver$1 = {\n  mixout() {\n    return {\n      dom: {\n        unwatch() {\n          disableObservation();\n          _unwatched = true;\n        }\n      }\n    };\n  },\n  hooks() {\n    return {\n      bootstrap() {\n        observe(chainHooks('mutationObserverCallbacks', {}));\n      },\n      noAuto() {\n        disconnect();\n      },\n      watch(params) {\n        const {\n          observeMutationsRoot\n        } = params;\n        if (_unwatched) {\n          enableObservation();\n        } else {\n          observe(chainHooks('mutationObserverCallbacks', {\n            observeMutationsRoot\n          }));\n        }\n      }\n    };\n  }\n};\n\nconst parseTransformString = transformString => {\n  let transform = {\n    size: 16,\n    x: 0,\n    y: 0,\n    flipX: false,\n    flipY: false,\n    rotate: 0\n  };\n  return transformString.toLowerCase().split(' ').reduce((acc, n) => {\n    const parts = n.toLowerCase().split('-');\n    const first = parts[0];\n    let rest = parts.slice(1).join('-');\n    if (first && rest === 'h') {\n      acc.flipX = true;\n      return acc;\n    }\n    if (first && rest === 'v') {\n      acc.flipY = true;\n      return acc;\n    }\n    rest = parseFloat(rest);\n    if (isNaN(rest)) {\n      return acc;\n    }\n    switch (first) {\n      case 'grow':\n        acc.size = acc.size + rest;\n        break;\n      case 'shrink':\n        acc.size = acc.size - rest;\n        break;\n      case 'left':\n        acc.x = acc.x - rest;\n        break;\n      case 'right':\n        acc.x = acc.x + rest;\n        break;\n      case 'up':\n        acc.y = acc.y - rest;\n        break;\n      case 'down':\n        acc.y = acc.y + rest;\n        break;\n      case 'rotate':\n        acc.rotate = acc.rotate + rest;\n        break;\n    }\n    return acc;\n  }, transform);\n};\nvar PowerTransforms = {\n  mixout() {\n    return {\n      parse: {\n        transform: transformString => {\n          return parseTransformString(transformString);\n        }\n      }\n    };\n  },\n  hooks() {\n    return {\n      parseNodeAttributes(accumulator, node) {\n        const transformString = node.getAttribute('data-fa-transform');\n        if (transformString) {\n          accumulator.transform = parseTransformString(transformString);\n        }\n        return accumulator;\n      }\n    };\n  },\n  provides(providers) {\n    providers.generateAbstractTransformGrouping = function (_ref) {\n      let {\n        main,\n        transform,\n        containerWidth,\n        iconWidth\n      } = _ref;\n      const outer = {\n        transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n      };\n      const innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n      const innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n      const innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n      const inner = {\n        transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n      };\n      const path = {\n        transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n      };\n      const operations = {\n        outer,\n        inner,\n        path\n      };\n      return {\n        tag: 'g',\n        attributes: _objectSpread2({}, operations.outer),\n        children: [{\n          tag: 'g',\n          attributes: _objectSpread2({}, operations.inner),\n          children: [{\n            tag: main.icon.tag,\n            children: main.icon.children,\n            attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)\n          }]\n        }]\n      };\n    };\n  }\n};\n\nconst ALL_SPACE = {\n  x: 0,\n  y: 0,\n  width: '100%',\n  height: '100%'\n};\nfunction fillBlack(abstract) {\n  let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  if (abstract.attributes && (abstract.attributes.fill || force)) {\n    abstract.attributes.fill = 'black';\n  }\n  return abstract;\n}\nfunction deGroup(abstract) {\n  if (abstract.tag === 'g') {\n    return abstract.children;\n  } else {\n    return [abstract];\n  }\n}\nvar Masks = {\n  hooks() {\n    return {\n      parseNodeAttributes(accumulator, node) {\n        const maskData = node.getAttribute('data-fa-mask');\n        const mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(' ').map(i => i.trim()));\n        if (!mask.prefix) {\n          mask.prefix = getDefaultUsablePrefix();\n        }\n        accumulator.mask = mask;\n        accumulator.maskId = node.getAttribute('data-fa-mask-id');\n        return accumulator;\n      }\n    };\n  },\n  provides(providers) {\n    providers.generateAbstractMask = function (_ref) {\n      let {\n        children,\n        attributes,\n        main,\n        mask,\n        maskId: explicitMaskId,\n        transform\n      } = _ref;\n      const {\n        width: mainWidth,\n        icon: mainPath\n      } = main;\n      const {\n        width: maskWidth,\n        icon: maskPath\n      } = mask;\n      const trans = transformForSvg({\n        transform,\n        containerWidth: maskWidth,\n        iconWidth: mainWidth\n      });\n      const maskRect = {\n        tag: 'rect',\n        attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {\n          fill: 'white'\n        })\n      };\n      const maskInnerGroupChildrenMixin = mainPath.children ? {\n        children: mainPath.children.map(fillBlack)\n      } : {};\n      const maskInnerGroup = {\n        tag: 'g',\n        attributes: _objectSpread2({}, trans.inner),\n        children: [fillBlack(_objectSpread2({\n          tag: mainPath.tag,\n          attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)\n        }, maskInnerGroupChildrenMixin))]\n      };\n      const maskOuterGroup = {\n        tag: 'g',\n        attributes: _objectSpread2({}, trans.outer),\n        children: [maskInnerGroup]\n      };\n      const maskId = \"mask-\".concat(explicitMaskId || nextUniqueId());\n      const clipId = \"clip-\".concat(explicitMaskId || nextUniqueId());\n      const maskTag = {\n        tag: 'mask',\n        attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {\n          id: maskId,\n          maskUnits: 'userSpaceOnUse',\n          maskContentUnits: 'userSpaceOnUse'\n        }),\n        children: [maskRect, maskOuterGroup]\n      };\n      const defs = {\n        tag: 'defs',\n        children: [{\n          tag: 'clipPath',\n          attributes: {\n            id: clipId\n          },\n          children: deGroup(maskPath)\n        }, maskTag]\n      };\n      children.push(defs, {\n        tag: 'rect',\n        attributes: _objectSpread2({\n          fill: 'currentColor',\n          'clip-path': \"url(#\".concat(clipId, \")\"),\n          mask: \"url(#\".concat(maskId, \")\")\n        }, ALL_SPACE)\n      });\n      return {\n        children,\n        attributes\n      };\n    };\n  }\n};\n\nvar MissingIconIndicator = {\n  provides(providers) {\n    let reduceMotion = false;\n    if (WINDOW.matchMedia) {\n      reduceMotion = WINDOW.matchMedia('(prefers-reduced-motion: reduce)').matches;\n    }\n    providers.missingIconAbstract = function () {\n      const gChildren = [];\n      const FILL = {\n        fill: 'currentColor'\n      };\n      const ANIMATION_BASE = {\n        attributeType: 'XML',\n        repeatCount: 'indefinite',\n        dur: '2s'\n      };\n\n      // Ring\n      gChildren.push({\n        tag: 'path',\n        attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n          d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'\n        })\n      });\n      const OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {\n        attributeName: 'opacity'\n      });\n      const dot = {\n        tag: 'circle',\n        attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n          cx: '256',\n          cy: '364',\n          r: '28'\n        }),\n        children: []\n      };\n      if (!reduceMotion) {\n        dot.children.push({\n          tag: 'animate',\n          attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {\n            attributeName: 'r',\n            values: '28;14;28;28;14;28;'\n          })\n        }, {\n          tag: 'animate',\n          attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {\n            values: '1;0;1;1;0;1;'\n          })\n        });\n      }\n      gChildren.push(dot);\n      gChildren.push({\n        tag: 'path',\n        attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n          opacity: '1',\n          d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'\n        }),\n        children: reduceMotion ? [] : [{\n          tag: 'animate',\n          attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {\n            values: '1;0;0;0;0;1;'\n          })\n        }]\n      });\n      if (!reduceMotion) {\n        // Exclamation\n        gChildren.push({\n          tag: 'path',\n          attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n            opacity: '0',\n            d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'\n          }),\n          children: [{\n            tag: 'animate',\n            attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {\n              values: '0;0;1;1;0;0;'\n            })\n          }]\n        });\n      }\n      return {\n        tag: 'g',\n        attributes: {\n          'class': 'missing'\n        },\n        children: gChildren\n      };\n    };\n  }\n};\n\nvar SvgSymbols = {\n  hooks() {\n    return {\n      parseNodeAttributes(accumulator, node) {\n        const symbolData = node.getAttribute('data-fa-symbol');\n        const symbol = symbolData === null ? false : symbolData === '' ? true : symbolData;\n        accumulator['symbol'] = symbol;\n        return accumulator;\n      }\n    };\n  }\n};\n\nvar plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];\n\nregisterPlugins(plugins, {\n  mixoutsTo: api\n});\nconst noAuto$1 = api.noAuto;\nconst config$1 = api.config;\nconst library$1 = api.library;\nconst dom$1 = api.dom;\nconst parse$1 = api.parse;\nconst findIconDefinition$1 = api.findIconDefinition;\nconst toHtml$1 = api.toHtml;\nconst icon = api.icon;\nconst layer = api.layer;\nconst text = api.text;\nconst counter = api.counter;\n\nexport { noAuto$1 as noAuto, config$1 as config, library$1 as library, dom$1 as dom, parse$1 as parse, findIconDefinition$1 as findIconDefinition, toHtml$1 as toHtml, icon, layer, text, counter, api };\n", "/*!\n * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */\nconst prefix = \"fas\";\nconst fa0 = {\n  prefix: 'fas',\n  iconName: '0',\n  icon: [320, 512, [], \"30\", \"M0 192C0 103.6 71.6 32 160 32s160 71.6 160 160l0 128c0 88.4-71.6 160-160 160S0 408.4 0 320L0 192zM160 96c-53 0-96 43-96 96l0 128c0 53 43 96 96 96s96-43 96-96l0-128c0-53-43-96-96-96z\"]\n};\nconst fa1 = {\n  prefix: 'fas',\n  iconName: '1',\n  icon: [256, 512, [], \"31\", \"M160 64c0-11.8-6.5-22.6-16.9-28.2s-23-5-32.8 1.6l-96 64C-.5 111.2-4.4 131 5.4 145.8s29.7 18.7 44.4 8.9L96 123.8 96 416l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-352z\"]\n};\nconst fa2 = {\n  prefix: 'fas',\n  iconName: '2',\n  icon: [320, 512, [], \"32\", \"M142.9 96c-21.5 0-42.2 8.5-57.4 23.8L54.6 150.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L40.2 74.5C67.5 47.3 104.4 32 142.9 32C223 32 288 97 288 177.1c0 38.5-15.3 75.4-42.5 102.6L109.3 416 288 416c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9L200.2 234.5c15.2-15.2 23.8-35.9 23.8-57.4c0-44.8-36.3-81.1-81.1-81.1z\"]\n};\nconst fa3 = {\n  prefix: 'fas',\n  iconName: '3',\n  icon: [320, 512, [], \"33\", \"M0 64C0 46.3 14.3 32 32 32l240 0c13.2 0 25 8.1 29.8 20.4s1.5 26.3-8.2 35.2L162.3 208l21.7 0c75.1 0 136 60.9 136 136s-60.9 136-136 136l-78.6 0C63 480 24.2 456 5.3 418.1l-1.9-3.8c-7.9-15.8-1.5-35 14.3-42.9s35-1.5 42.9 14.3l1.9 3.8c8.1 16.3 24.8 26.5 42.9 26.5l78.6 0c39.8 0 72-32.2 72-72s-32.2-72-72-72L80 272c-13.2 0-25-8.1-29.8-20.4s-1.5-26.3 8.2-35.2L189.7 96 32 96C14.3 96 0 81.7 0 64z\"]\n};\nconst fa4 = {\n  prefix: 'fas',\n  iconName: '4',\n  icon: [384, 512, [], \"34\", \"M189 77.6c7.5-16 .7-35.1-15.3-42.6s-35.1-.7-42.6 15.3L3 322.4c-4.7 9.9-3.9 21.5 1.9 30.8S21 368 32 368l224 0 0 80c0 17.7 14.3 32 32 32s32-14.3 32-32l0-80 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-144c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L82.4 304 189 77.6z\"]\n};\nconst fa5 = {\n  prefix: 'fas',\n  iconName: '5',\n  icon: [320, 512, [], \"35\", \"M32.5 58.3C35.3 43.1 48.5 32 64 32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L90.7 96 70.3 208 184 208c75.1 0 136 60.9 136 136s-60.9 136-136 136l-83.5 0c-39.4 0-75.4-22.3-93-57.5l-4.1-8.2c-7.9-15.8-1.5-35 14.3-42.9s35-1.5 42.9 14.3l4.1 8.2c6.8 13.6 20.6 22.1 35.8 22.1l83.5 0c39.8 0 72-32.2 72-72s-32.2-72-72-72L32 272c-9.5 0-18.5-4.2-24.6-11.5s-8.6-16.9-6.9-26.2l32-176z\"]\n};\nconst fa6 = {\n  prefix: 'fas',\n  iconName: '6',\n  icon: [320, 512, [], \"36\", \"M232.4 84.7c11.4-13.5 9.7-33.7-3.8-45.1s-33.7-9.7-45.1 3.8L38.6 214.7C14.7 242.9 1.1 278.4 .1 315.2c0 1.4-.1 2.9-.1 4.3l0 .5c0 88.4 71.6 160 160 160s160-71.6 160-160c0-85.5-67.1-155.4-151.5-159.8l63.9-75.6zM256 320A96 96 0 1 1 64 320a96 96 0 1 1 192 0z\"]\n};\nconst fa7 = {\n  prefix: 'fas',\n  iconName: '7',\n  icon: [320, 512, [], \"37\", \"M0 64C0 46.3 14.3 32 32 32l256 0c11.5 0 22 6.1 27.7 16.1s5.7 22.2-.1 32.1l-224 384c-8.9 15.3-28.5 20.4-43.8 11.5s-20.4-28.5-11.5-43.8L232.3 96 32 96C14.3 96 0 81.7 0 64z\"]\n};\nconst fa8 = {\n  prefix: 'fas',\n  iconName: '8',\n  icon: [320, 512, [], \"38\", \"M304 160c0-70.7-57.3-128-128-128l-32 0C73.3 32 16 89.3 16 160c0 34.6 13.7 66 36 89C20.5 272.3 0 309.8 0 352c0 70.7 57.3 128 128 128l64 0c70.7 0 128-57.3 128-128c0-42.2-20.5-79.7-52-103c22.3-23 36-54.4 36-89zM176.1 288l15.9 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64s28.7-64 64-64l15.9 0c0 0 .1 0 .1 0l32 0c0 0 .1 0 .1 0zm0-64c0 0 0 0 0 0l-32 0c0 0 0 0 0 0c-35.3 0-64-28.7-64-64c0-35.3 28.7-64 64-64l32 0c35.3 0 64 28.7 64 64c0 35.3-28.6 64-64 64z\"]\n};\nconst fa9 = {\n  prefix: 'fas',\n  iconName: '9',\n  icon: [320, 512, [], \"39\", \"M64 192a96 96 0 1 0 192 0A96 96 0 1 0 64 192zm87.5 159.8C67.1 347.4 0 277.5 0 192C0 103.6 71.6 32 160 32s160 71.6 160 160c0 2.6-.1 5.3-.2 7.9c-1.7 35.7-15.2 70-38.4 97.4l-145 171.4c-11.4 13.5-31.6 15.2-45.1 3.8s-15.2-31.6-3.8-45.1l63.9-75.6z\"]\n};\nconst faFillDrip = {\n  prefix: 'fas',\n  iconName: 'fill-drip',\n  icon: [576, 512, [], \"f576\", \"M41.4 9.4C53.9-3.1 74.1-3.1 86.6 9.4L168 90.7l53.1-53.1c28.1-28.1 73.7-28.1 101.8 0L474.3 189.1c28.1 28.1 28.1 73.7 0 101.8L283.9 481.4c-37.5 37.5-98.3 37.5-135.8 0L30.6 363.9c-37.5-37.5-37.5-98.3 0-135.8L122.7 136 41.4 54.6c-12.5-12.5-12.5-32.8 0-45.3zm176 221.3L168 181.3 75.9 273.4c-4.2 4.2-7 9.3-8.4 14.6l319.2 0 42.3-42.3c3.1-3.1 3.1-8.2 0-11.3L277.7 82.9c-3.1-3.1-8.2-3.1-11.3 0L213.3 136l49.4 49.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0zM512 512c-35.3 0-64-28.7-64-64c0-25.2 32.6-79.6 51.2-108.7c6-9.4 19.5-9.4 25.5 0C543.4 368.4 576 422.8 576 448c0 35.3-28.7 64-64 64z\"]\n};\nconst faArrowsToCircle = {\n  prefix: 'fas',\n  iconName: 'arrows-to-circle',\n  icon: [640, 512, [], \"e4bd\", \"M9.4 9.4C21.9-3.1 42.1-3.1 54.6 9.4L160 114.7 160 96c0-17.7 14.3-32 32-32s32 14.3 32 32l0 96c0 4.3-.9 8.5-2.4 12.2c-1.6 3.7-3.8 7.3-6.9 10.3l-.1 .1c-3.1 3-6.6 5.3-10.3 6.9c-3.8 1.6-7.9 2.4-12.2 2.4l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.7 0L9.4 54.6C-3.1 42.1-3.1 21.9 9.4 9.4zM256 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM114.7 352L96 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0s0 0 0 0l.1 0c8.8 0 16.7 3.6 22.5 9.3l.1 .1c3 3.1 5.3 6.6 6.9 10.3c1.6 3.8 2.4 7.9 2.4 12.2l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.7L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L114.7 352zM416 96c0-17.7 14.3-32 32-32s32 14.3 32 32l0 18.7L585.4 9.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L525.3 160l18.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-8.8 0-16.8-3.6-22.6-9.3l-.1-.1c-3-3.1-5.3-6.6-6.9-10.3s-2.4-7.8-2.4-12.2l0-.1s0 0 0 0l0-96zM525.3 352L630.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L480 397.3l0 18.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96s0 0 0 0l0-.1c0-4.3 .9-8.4 2.4-12.2c1.6-3.8 3.9-7.3 6.9-10.4c5.8-5.8 13.7-9.3 22.5-9.4l.1 0s0 0 0 0l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.7 0z\"]\n};\nconst faCircleChevronRight = {\n  prefix: 'fas',\n  iconName: 'circle-chevron-right',\n  icon: [512, 512, [\"chevron-circle-right\"], \"f138\", \"M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM241 377c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l87-87-87-87c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L345 239c9.4 9.4 9.4 24.6 0 33.9L241 377z\"]\n};\nconst faChevronCircleRight = faCircleChevronRight;\nconst faAt = {\n  prefix: 'fas',\n  iconName: 'at',\n  icon: [512, 512, [61946], \"40\", \"M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256l0 32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32l0 80 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z\"]\n};\nconst faTrashCan = {\n  prefix: 'fas',\n  iconName: 'trash-can',\n  icon: [448, 512, [61460, \"trash-alt\"], \"f2ed\", \"M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z\"]\n};\nconst faTrashAlt = faTrashCan;\nconst faTextHeight = {\n  prefix: 'fas',\n  iconName: 'text-height',\n  icon: [576, 512, [], \"f034\", \"M64 128l0-32 64 0 0 320-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-320 64 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48c0-26.5-21.5-48-48-48L160 32 48 32C21.5 32 0 53.5 0 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32zM502.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l32 0 0 192-32 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8l-32 0 0-192 32 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z\"]\n};\nconst faUserXmark = {\n  prefix: 'fas',\n  iconName: 'user-xmark',\n  icon: [640, 512, [\"user-times\"], \"f235\", \"M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM471 143c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z\"]\n};\nconst faUserTimes = faUserXmark;\nconst faStethoscope = {\n  prefix: 'fas',\n  iconName: 'stethoscope',\n  icon: [576, 512, [129658], \"f0f1\", \"M142.4 21.9c5.6 16.8-3.5 34.9-20.2 40.5L96 71.1 96 192c0 53 43 96 96 96s96-43 96-96l0-120.9-26.1-8.7c-16.8-5.6-25.8-23.7-20.2-40.5s23.7-25.8 40.5-20.2l26.1 8.7C334.4 19.1 352 43.5 352 71.1L352 192c0 77.2-54.6 141.6-127.3 156.7C231 404.6 278.4 448 336 448c61.9 0 112-50.1 112-112l0-70.7c-28.3-12.3-48-40.5-48-73.3c0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3l0 70.7c0 97.2-78.8 176-176 176c-92.9 0-168.9-71.9-175.5-163.1C87.2 334.2 32 269.6 32 192L32 71.1c0-27.5 17.6-52 43.8-60.7l26.1-8.7c16.8-5.6 34.9 3.5 40.5 20.2zM480 224a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faMessage = {\n  prefix: 'fas',\n  iconName: 'message',\n  icon: [512, 512, [\"comment-alt\"], \"f27a\", \"M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l96 0 0 80c0 6.1 3.4 11.6 8.8 14.3s11.9 2.1 16.8-1.5L309.3 416 448 416c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0z\"]\n};\nconst faCommentAlt = faMessage;\nconst faInfo = {\n  prefix: 'fas',\n  iconName: 'info',\n  icon: [192, 512, [], \"f129\", \"M48 80a48 48 0 1 1 96 0A48 48 0 1 1 48 80zM0 224c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 224 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-192-32 0c-17.7 0-32-14.3-32-32z\"]\n};\nconst faDownLeftAndUpRightToCenter = {\n  prefix: 'fas',\n  iconName: 'down-left-and-up-right-to-center',\n  icon: [512, 512, [\"compress-alt\"], \"f422\", \"M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z\"]\n};\nconst faCompressAlt = faDownLeftAndUpRightToCenter;\nconst faExplosion = {\n  prefix: 'fas',\n  iconName: 'explosion',\n  icon: [576, 512, [], \"e4e9\", \"M499.6 11.3c6.7-10.7 20.5-14.5 31.7-8.5s15.8 19.5 10.6 31L404.8 338.6c2.2 2.3 4.3 4.7 6.3 7.1l97.2-54.7c10.5-5.9 23.6-3.1 30.9 6.4s6.3 23-2.2 31.5l-87 87-71.4 0c-13.2-37.3-48.7-64-90.5-64s-77.4 26.7-90.5 64l-79.6 0L42.3 363.7c-9.7-6.7-13.1-19.6-7.9-30.3s17.4-15.9 28.7-12.4l97.2 30.4c3-3.9 6.1-7.7 9.4-11.3L107.4 236.3c-6.1-10.1-3.9-23.1 5.1-30.7s22.2-7.5 31.1 .1L246 293.6c1.5-.4 3-.8 4.5-1.1l13.6-142.7c1.2-12.3 11.5-21.7 23.9-21.7s22.7 9.4 23.9 21.7l13.5 141.9L499.6 11.3zM64 448s0 0 0 0l448 0s0 0 0 0l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0zM288 0c13.3 0 24 10.7 24 24l0 48c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-48c0-13.3 10.7-24 24-24z\"]\n};\nconst faFileLines = {\n  prefix: 'fas',\n  iconName: 'file-lines',\n  icon: [384, 512, [128441, 128462, 61686, \"file-alt\", \"file-text\"], \"f15c\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faFileAlt = faFileLines;\nconst faFileText = faFileLines;\nconst faWaveSquare = {\n  prefix: 'fas',\n  iconName: 'wave-square',\n  icon: [640, 512, [], \"f83e\", \"M128 64c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 352 96 0 0-160c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0 0 160c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-352-96 0 0 160c0 17.7-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0 0-160z\"]\n};\nconst faRing = {\n  prefix: 'fas',\n  iconName: 'ring',\n  icon: [512, 512, [], \"f70b\", \"M64 208c0 7.8 4.4 18.7 17.1 30.3C126.5 214.1 188.9 200 256 200s129.5 14.1 174.9 38.3C443.6 226.7 448 215.8 448 208c0-12.3-10.8-32-47.9-50.6C364.9 139.8 314 128 256 128s-108.9 11.8-144.1 29.4C74.8 176 64 195.7 64 208zm192 40c-47 0-89.3 7.6-122.9 19.7C166.3 280.2 208.8 288 256 288s89.7-7.8 122.9-20.3C345.3 255.6 303 248 256 248zM0 208c0-49.6 39.4-85.8 83.3-107.8C129.1 77.3 190.3 64 256 64s126.9 13.3 172.7 36.2c43.9 22 83.3 58.2 83.3 107.8l0 96c0 49.6-39.4 85.8-83.3 107.8C382.9 434.7 321.7 448 256 448s-126.9-13.3-172.7-36.2C39.4 389.8 0 353.6 0 304l0-96z\"]\n};\nconst faBuildingUn = {\n  prefix: 'fas',\n  iconName: 'building-un',\n  icon: [384, 512, [], \"e4d9\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c26.5 0 48-21.5 48-48l0-416c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM237.3 71.1l34.7 52L272 80c0-8.8 7.2-16 16-16s16 7.2 16 16l0 96c0 7.1-4.6 13.3-11.4 15.3s-14-.6-17.9-6.4l-34.7-52 0 43.2c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-7.1 4.6-13.3 11.4-15.3s14 .6 17.9 6.4zM112 80l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faDiceThree = {\n  prefix: 'fas',\n  iconName: 'dice-three',\n  icon: [448, 512, [9858], \"f527\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm64 96a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm64 128a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm128 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faCalendarDays = {\n  prefix: 'fas',\n  iconName: 'calendar-days',\n  icon: [448, 512, [\"calendar-alt\"], \"f073\", \"M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm64 80l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 400l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faCalendarAlt = faCalendarDays;\nconst faAnchorCircleCheck = {\n  prefix: 'fas',\n  iconName: 'anchor-circle-check',\n  icon: [640, 512, [], \"e4aa\", \"M320 96a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm21.1 80C367 158.8 384 129.4 384 96c0-53-43-96-96-96s-96 43-96 96c0 33.4 17 62.8 42.9 80L224 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 208-48 0c-53 0-96-43-96-96l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L97 263c-9.4-9.4-24.6-9.4-33.9 0L7 319c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 88.4 71.6 160 160 160l80 0 80 0c8.2 0 16.3-.6 24.2-1.8c-22.2-16.2-40.4-37.5-53-62.2L320 448l0-80 0-128 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-10.9 0zM640 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faBuildingCircleArrowRight = {\n  prefix: 'fas',\n  iconName: 'building-circle-arrow-right',\n  icon: [640, 512, [], \"e4d1\", \"M0 48C0 21.5 21.5 0 48 0L336 0c26.5 0 48 21.5 48 48l0 184.2c-39.1 32.3-64 81.1-64 135.8c0 49.5 20.4 94.2 53.3 126.2C364.5 505.1 351.1 512 336 512l-96 0 0-80c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 80-96 0c-26.5 0-48-21.5-48-48L0 48zM80 224c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm80 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm112-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 112l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16L80 96c-8.8 0-16 7.2-16 16zM176 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm80 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm96 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm140.7-67.3c-6.2 6.2-6.2 16.4 0 22.6L521.4 352 432 352c-8.8 0-16 7.2-16 16s7.2 16 16 16l89.4 0-28.7 28.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l56-56c6.2-6.2 6.2-16.4 0-22.6l-56-56c-6.2-6.2-16.4-6.2-22.6 0z\"]\n};\nconst faVolleyball = {\n  prefix: 'fas',\n  iconName: 'volleyball',\n  icon: [512, 512, [127952, \"volleyball-ball\"], \"f45f\", \"M511.8 267.4c-26.1 8.7-53.4 13.8-81 15.1c9.2-105.3-31.5-204.2-103.2-272.4C434.1 41.1 512 139.5 512 256c0 3.8-.1 7.6-.2 11.4zm-3.9 34.7c-5.8 32-17.6 62-34.2 88.7c-97.5 48.5-217.7 42.6-311.9-24.5c23.7-36.2 55.4-67.7 94.5-91.8c79.9 43.2 170.1 50.8 251.6 27.6zm-236-55.5c-2.5-90.9-41.1-172.7-101.9-231.7C196.8 5.2 225.8 0 256 0c2.7 0 5.3 0 7.9 .1c90.8 60.2 145.7 167.2 134.7 282.3c-43.1-2.4-86.4-14.1-126.8-35.9zM138 28.8c20.6 18.3 38.7 39.4 53.7 62.6C95.9 136.1 30.6 220.8 7.3 316.9C2.5 297.4 0 277 0 256C0 157.2 56 71.5 138 28.8zm69.6 90.5c19.5 38.6 31 81.9 32.3 127.7C162.5 294.6 110.9 368.9 90.2 451C66 430.4 45.6 405.4 30.4 377.2c6.7-108.7 71.9-209.9 177.1-257.9zM256 512c-50.7 0-98-14.7-137.8-40.2c5.6-27 14.8-53.1 27.4-77.7C232.2 454.6 338.1 468.8 433 441c-46 44-108.3 71-177 71z\"]\n};\nconst faVolleyballBall = faVolleyball;\nconst faArrowsUpToLine = {\n  prefix: 'fas',\n  iconName: 'arrows-up-to-line',\n  icon: [576, 512, [], \"e4c2\", \"M32 96l512 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96zM9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L96 237.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-210.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0l-96 96zm320 45.3c12.5 12.5 32.8 12.5 45.3 0L416 237.3 416 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-210.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3z\"]\n};\nconst faSortDown = {\n  prefix: 'fas',\n  iconName: 'sort-down',\n  icon: [320, 512, [\"sort-desc\"], \"f0dd\", \"M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8l256 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z\"]\n};\nconst faSortDesc = faSortDown;\nconst faCircleMinus = {\n  prefix: 'fas',\n  iconName: 'circle-minus',\n  icon: [512, 512, [\"minus-circle\"], \"f056\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faMinusCircle = faCircleMinus;\nconst faDoorOpen = {\n  prefix: 'fas',\n  iconName: 'door-open',\n  icon: [576, 512, [], \"f52b\", \"M320 32c0-9.9-4.5-19.2-12.3-25.2S289.8-1.4 280.2 1l-179.9 45C79 51.3 64 70.5 64 92.5L64 448l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 192 0 32 0 0-32 0-448zM256 256c0 17.7-10.7 32-24 32s-24-14.3-24-32s10.7-32 24-32s24 14.3 24 32zm96-128l96 0 0 352c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-320c0-35.3-28.7-64-64-64l-96 0 0 64z\"]\n};\nconst faRightFromBracket = {\n  prefix: 'fas',\n  iconName: 'right-from-bracket',\n  icon: [512, 512, [\"sign-out-alt\"], \"f2f5\", \"M377.9 105.9L500.7 228.7c7.2 7.2 11.3 17.1 11.3 27.3s-4.1 20.1-11.3 27.3L377.9 406.1c-6.4 6.4-15 9.9-24 9.9c-18.7 0-33.9-15.2-33.9-33.9l0-62.1-128 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l128 0 0-62.1c0-18.7 15.2-33.9 33.9-33.9c9 0 17.6 3.6 24 9.9zM160 96L96 96c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-53 0-96-43-96-96L0 128C0 75 43 32 96 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32z\"]\n};\nconst faSignOutAlt = faRightFromBracket;\nconst faAtom = {\n  prefix: 'fas',\n  iconName: 'atom',\n  icon: [512, 512, [9883], \"f5d2\", \"M256 398.8c-11.8 5.1-23.4 9.7-34.9 13.5c16.7 33.8 31 35.7 34.9 35.7s18.1-1.9 34.9-35.7c-11.4-3.9-23.1-8.4-34.9-13.5zM446 256c33 45.2 44.3 90.9 23.6 128c-20.2 36.3-62.5 49.3-115.2 43.2c-22 52.1-55.6 84.8-98.4 84.8s-76.4-32.7-98.4-84.8c-52.7 6.1-95-6.8-115.2-43.2C21.7 346.9 33 301.2 66 256c-33-45.2-44.3-90.9-23.6-128c20.2-36.3 62.5-49.3 115.2-43.2C179.6 32.7 213.2 0 256 0s76.4 32.7 98.4 84.8c52.7-6.1 95 6.8 115.2 43.2c20.7 37.1 9.4 82.8-23.6 128zm-65.8 67.4c-1.7 14.2-3.9 28-6.7 41.2c31.8 1.4 38.6-8.7 40.2-11.7c2.3-4.2 7-17.9-11.9-48.1c-6.8 6.3-14 12.5-21.6 18.6zm-6.7-175.9c2.8 13.1 5 26.9 6.7 41.2c7.6 6.1 14.8 12.3 21.6 18.6c18.9-30.2 14.2-44 11.9-48.1c-1.6-2.9-8.4-13-40.2-11.7zM290.9 99.7C274.1 65.9 259.9 64 256 64s-18.1 1.9-34.9 35.7c11.4 3.9 23.1 8.4 34.9 13.5c11.8-5.1 23.4-9.7 34.9-13.5zm-159 88.9c1.7-14.3 3.9-28 6.7-41.2c-31.8-1.4-38.6 8.7-40.2 11.7c-2.3 4.2-7 17.9 11.9 48.1c6.8-6.3 14-12.5 21.6-18.6zM110.2 304.8C91.4 335 96 348.7 98.3 352.9c1.6 2.9 8.4 13 40.2 11.7c-2.8-13.1-5-26.9-6.7-41.2c-7.6-6.1-14.8-12.3-21.6-18.6zM336 256a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zm-80-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faSoap = {\n  prefix: 'fas',\n  iconName: 'soap',\n  icon: [512, 512, [129532], \"e06e\", \"M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM320 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM416 32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0 160c0 27.6-11.7 52.5-30.4 70.1C422.1 275.7 448 310.8 448 352c0 53-43 96-96 96l-192 0c-53 0-96-43-96-96s43-96 96-96l88.4 0c-15.2-17-24.4-39.4-24.4-64L96 192c-53 0-96 43-96 96L0 416c0 53 43 96 96 96l320 0c53 0 96-43 96-96l0-128c0-53-43-96-96-96zM160 288c-35.3 0-64 28.7-64 64s28.7 64 64 64l192 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0-160 0z\"]\n};\nconst faIcons = {\n  prefix: 'fas',\n  iconName: 'icons',\n  icon: [512, 512, [\"heart-music-camera-bolt\"], \"f86d\", \"M500.3 7.3C507.7 13.3 512 22.4 512 32l0 144c0 26.5-28.7 48-64 48s-64-21.5-64-48s28.7-48 64-48l0-57L352 90.2 352 208c0 26.5-28.7 48-64 48s-64-21.5-64-48s28.7-48 64-48l0-96c0-15.3 10.8-28.4 25.7-31.4l160-32c9.4-1.9 19.1 .6 26.6 6.6zM74.7 304l11.8-17.8c5.9-8.9 15.9-14.2 26.6-14.2l61.7 0c10.7 0 20.7 5.3 26.6 14.2L213.3 304l26.7 0c26.5 0 48 21.5 48 48l0 112c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 352c0-26.5 21.5-48 48-48l26.7 0zM192 408a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM478.7 278.3L440.3 368l55.7 0c6.7 0 12.6 4.1 15 10.4s.6 13.3-4.4 17.7l-128 112c-5.6 4.9-13.9 5.3-19.9 .9s-8.2-12.4-5.3-19.2L391.7 400 336 400c-6.7 0-12.6-4.1-15-10.4s-.6-13.3 4.4-17.7l128-112c5.6-4.9 13.9-5.3 19.9-.9s8.2 12.4 5.3 19.2zm-339-59.2c-6.5 6.5-17 6.5-23 0L19.9 119.2c-28-29-26.5-76.9 5-103.9c27-23.5 68.4-19 93.4 6.5l10 10.5 9.5-10.5c25-25.5 65.9-30 93.9-6.5c31 27 32.5 74.9 4.5 103.9l-96.4 99.9z\"]\n};\nconst faHeartMusicCameraBolt = faIcons;\nconst faMicrophoneLinesSlash = {\n  prefix: 'fas',\n  iconName: 'microphone-lines-slash',\n  icon: [640, 512, [\"microphone-alt-slash\"], \"f539\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L472.1 344.7c15.2-26 23.9-56.3 23.9-88.7l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 24 0 16c0 21.2-5.1 41.1-14.2 58.7L416 300.8l0-44.8-57.1 0-34.5-27c2.9-3.1 7-5 11.6-5l80 0 0-32-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-32-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0c0-53-43-96-96-96s-96 43-96 96l0 54.3L38.8 5.1zm362.5 407l-43.1-33.9C346.1 382 333.3 384 320 384c-70.7 0-128-57.3-128-128l0-8.7L144.7 210c-.5 1.9-.7 3.9-.7 6l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c20.4-2.8 39.7-9.1 57.3-18.2z\"]\n};\nconst faMicrophoneAltSlash = faMicrophoneLinesSlash;\nconst faBridgeCircleCheck = {\n  prefix: 'fas',\n  iconName: 'bridge-circle-check',\n  icon: [640, 512, [], \"e4c9\", \"M64 32C46.3 32 32 46.3 32 64s14.3 32 32 32l40 0 0 64-72 0 0 128c53 0 96 43 96 96l0 64c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-64c0-53 43-96 96-96c6.3 0 12.4 .6 18.3 1.7C367.1 231.8 426.9 192 496 192c42.5 0 81.6 15.1 112 40.2l0-72.2-72 0 0-64 40 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32zM488 96l0 64-80 0 0-64 80 0zM360 96l0 64-80 0 0-64 80 0zM232 96l0 64-80 0 0-64 80 0zM640 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faPumpMedical = {\n  prefix: 'fas',\n  iconName: 'pump-medical',\n  icon: [448, 512, [], \"e06a\", \"M128 32l0 96 128 0 0-32 60.1 0c4.2 0 8.3 1.7 11.3 4.7l33.9 33.9c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L372.7 55.4c-15-15-35.4-23.4-56.6-23.4L256 32c0-17.7-14.3-32-32-32L160 0c-17.7 0-32 14.3-32 32zM117.4 160c-33.3 0-61 25.5-63.8 58.7L35 442.7C31.9 480 61.3 512 98.8 512l186.4 0c37.4 0 66.9-32 63.8-69.3l-18.7-224c-2.8-33.2-30.5-58.7-63.8-58.7l-149.1 0zM216 280l0 32 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-32c0-13.3 10.7-24 24-24s24 10.7 24 24z\"]\n};\nconst faFingerprint = {\n  prefix: 'fas',\n  iconName: 'fingerprint',\n  icon: [512, 512, [], \"f577\", \"M48 256C48 141.1 141.1 48 256 48c63.1 0 119.6 28.1 157.8 72.5c8.6 10.1 23.8 11.2 33.8 2.6s11.2-23.8 2.6-33.8C403.3 34.6 333.7 0 256 0C114.6 0 0 114.6 0 256l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40zm458.5-52.9c-2.7-13-15.5-21.3-28.4-18.5s-21.3 15.5-18.5 28.4c2.9 13.9 4.5 28.3 4.5 43.1l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40c0-18.1-1.9-35.8-5.5-52.9zM256 80c-19 0-37.4 3-54.5 8.6c-15.2 5-18.7 23.7-8.3 35.9c7.1 8.3 18.8 10.8 29.4 7.9c10.6-2.9 21.8-4.4 33.4-4.4c70.7 0 128 57.3 128 128l0 24.9c0 25.2-1.5 50.3-4.4 75.3c-1.7 14.6 9.4 27.8 24.2 27.8c11.8 0 21.9-8.6 23.3-20.3c3.3-27.4 5-55 5-82.7l0-24.9c0-97.2-78.8-176-176-176zM150.7 148.7c-9.1-10.6-25.3-11.4-33.9-.4C93.7 178 80 215.4 80 256l0 24.9c0 24.2-2.6 48.4-7.8 71.9C68.8 368.4 80.1 384 96.1 384c10.5 0 19.9-7 22.2-17.3c6.4-28.1 9.7-56.8 9.7-85.8l0-24.9c0-27.2 8.5-52.4 22.9-73.1c7.2-10.4 8-24.6-.2-34.2zM256 160c-53 0-96 43-96 96l0 24.9c0 35.9-4.6 71.5-13.8 106.1c-3.8 14.3 6.7 29 21.5 29c9.5 0 17.9-6.2 20.4-15.4c10.5-39 15.9-79.2 15.9-119.7l0-24.9c0-28.7 23.3-52 52-52s52 23.3 52 52l0 24.9c0 36.3-3.5 72.4-10.4 107.9c-2.7 13.9 7.7 27.2 21.8 27.2c10.2 0 19-7 21-17c7.7-38.8 11.6-78.3 11.6-118.1l0-24.9c0-53-43-96-96-96zm24 96c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 24.9c0 59.9-11 119.3-32.5 175.2l-5.9 15.3c-4.8 12.4 1.4 26.3 13.8 31s26.3-1.4 31-13.8l5.9-15.3C267.9 411.9 280 346.7 280 280.9l0-24.9z\"]\n};\nconst faHandPointRight = {\n  prefix: 'fas',\n  iconName: 'hand-point-right',\n  icon: [512, 512, [], \"f0a4\", \"M480 96c17.7 0 32 14.3 32 32s-14.3 32-32 32l-208 0 0-64 208 0zM320 288c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0zm64-64c0 17.7-14.3 32-32 32l-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l48 0c17.7 0 32 14.3 32 32zM288 384c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0zm-88-96l.6 0c-5.4 9.4-8.6 20.3-8.6 32c0 13.2 4 25.4 10.8 35.6C177.9 364.3 160 388.1 160 416c0 11.7 3.1 22.6 8.6 32l-8.6 0C71.6 448 0 376.4 0 288l0-61.7c0-42.4 16.9-83.1 46.9-113.1l11.6-11.6C82.5 77.5 115.1 64 149 64l27 0c35.3 0 64 28.7 64 64l0 88c0 22.1-17.9 40-40 40s-40-17.9-40-40l0-56c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 56c0 39.8 32.2 72 72 72z\"]\n};\nconst faMagnifyingGlassLocation = {\n  prefix: 'fas',\n  iconName: 'magnifying-glass-location',\n  icon: [512, 512, [\"search-location\"], \"f689\", \"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM288 176c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 48.8 46.5 111.6 68.6 138.6c6 7.3 16.8 7.3 22.7 0c22.1-27 68.6-89.8 68.6-138.6zm-112 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faSearchLocation = faMagnifyingGlassLocation;\nconst faForwardStep = {\n  prefix: 'fas',\n  iconName: 'forward-step',\n  icon: [320, 512, [\"step-forward\"], \"f051\", \"M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416L0 96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4l192 160L256 241l0-145c0-17.7 14.3-32 32-32s32 14.3 32 32l0 320c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-145-11.5 9.6-192 160z\"]\n};\nconst faStepForward = faForwardStep;\nconst faFaceSmileBeam = {\n  prefix: 'fas',\n  iconName: 'face-smile-beam',\n  icon: [512, 512, [128522, \"smile-beam\"], \"f5b8\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM164.1 325.5C182 346.2 212.6 368 256 368s74-21.8 91.9-42.5c5.8-6.7 15.9-7.4 22.6-1.6s7.4 15.9 1.6 22.6C349.8 372.1 311.1 400 256 400s-93.8-27.9-116.1-53.5c-5.8-6.7-5.1-16.8 1.6-22.6s16.8-5.1 22.6 1.6zm53.5-96.7s0 0 0 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0zm160 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faSmileBeam = faFaceSmileBeam;\nconst faFlagCheckered = {\n  prefix: 'fas',\n  iconName: 'flag-checkered',\n  icon: [448, 512, [127937], \"f11e\", \"M32 0C49.7 0 64 14.3 64 32l0 16 69-17.2c38.1-9.5 78.3-5.1 113.5 12.5c46.3 23.2 100.8 23.2 147.1 0l9.6-4.8C423.8 28.1 448 43.1 448 66.1l0 279.7c0 13.3-8.3 25.3-20.8 30l-34.7 13c-46.2 17.3-97.6 14.6-141.7-7.4c-37.9-19-81.3-23.7-122.5-13.4L64 384l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-80 0-66L0 64 0 32C0 14.3 14.3 0 32 0zM64 187.1l64-13.9 0 65.5L64 252.6 64 318l48.8-12.2c5.1-1.3 10.1-2.4 15.2-3.3l0-63.9 38.9-8.4c8.3-1.8 16.7-2.5 25.1-2.1l0-64c13.6 .4 27.2 2.6 40.4 6.4l23.6 6.9 0 66.7-41.7-12.3c-7.3-2.1-14.8-3.4-22.3-3.8l0 71.4c21.8 1.9 43.3 6.7 64 14.4l0-69.8 22.7 6.7c13.5 4 27.3 6.4 41.3 7.4l0-64.2c-7.8-.8-15.6-2.3-23.2-4.5l-40.8-12 0-62c-13-3.8-25.8-8.8-38.2-15c-8.2-4.1-16.9-7-25.8-8.8l0 72.4c-13-.4-26 .8-38.7 3.6L128 173.2 128 98 64 114l0 73.1zM320 335.7c16.8 1.5 33.9-.7 50-6.8l14-5.2 0-71.7-7.9 1.8c-18.4 4.3-37.3 5.7-56.1 4.5l0 77.4zm64-149.4l0-70.8c-20.9 6.1-42.4 9.1-64 9.1l0 69.4c13.9 1.4 28 .5 41.7-2.6l22.3-5.2z\"]\n};\nconst faFootball = {\n  prefix: 'fas',\n  iconName: 'football',\n  icon: [512, 512, [127944, \"football-ball\"], \"f44e\", \"M247.5 25.4c-13.5 3.3-26.4 7.2-38.6 11.7C142.9 61.6 96.7 103.6 66 153.6C47.8 183.4 35.1 215.9 26.9 249L264.5 486.6c13.5-3.3 26.4-7.2 38.6-11.7c66-24.5 112.2-66.5 142.9-116.5c18.3-29.8 30.9-62.3 39.1-95.3L247.5 25.4zM495.2 205.3c6.1-56.8 1.4-112.2-7.7-156.4c-2.7-12.9-13-22.9-26.1-25.1c-58.2-9.7-109.9-12-155.6-7.9L495.2 205.3zM206.1 496L16.8 306.7c-6.1 56.8-1.4 112.2 7.7 156.4c2.7 12.9 13 22.9 26.1 25.1c58.2 9.7 109.9 12 155.6 7.9zm54.6-331.3c6.2-6.2 16.4-6.2 22.6 0l64 64c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0l-64-64c-6.2-6.2-6.2-16.4 0-22.6zm-48 48c6.2-6.2 16.4-6.2 22.6 0l64 64c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0l-64-64c-6.2-6.2-6.2-16.4 0-22.6zm-48 48c6.2-6.2 16.4-6.2 22.6 0l64 64c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0l-64-64c-6.2-6.2-6.2-16.4 0-22.6z\"]\n};\nconst faFootballBall = faFootball;\nconst faSchoolCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'school-circle-exclamation',\n  icon: [640, 512, [], \"e56c\", \"M337.8 5.4C327-1.8 313-1.8 302.2 5.4L166.3 96 48 96C21.5 96 0 117.5 0 144L0 464c0 26.5 21.5 48 48 48l272 0s0 0 0 0l-64 0 0-96c0-35.3 28.7-64 64-64l.3 0 .5 0c3.4-37.7 18.7-72.1 42.2-99.1C350.2 260 335.6 264 320 264c-48.6 0-88-39.4-88-88s39.4-88 88-88s88 39.4 88 88c0 18.3-5.6 35.3-15.1 49.4c29-21 64.6-33.4 103.1-33.4c59.5 0 112.1 29.6 144 74.8L640 144c0-26.5-21.5-48-48-48L473.7 96 337.8 5.4zM96 192l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zm0 128l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zM320 128c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-16 0 0-16c0-8.8-7.2-16-16-16zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faCrop = {\n  prefix: 'fas',\n  iconName: 'crop',\n  icon: [512, 512, [], \"f125\", \"M448 109.3l54.6-54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L402.7 64 160 64l0 64 178.7 0L128 338.7 128 32c0-17.7-14.3-32-32-32S64 14.3 64 32l0 32L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l32 0 0 256c0 35.3 28.7 64 64 64l224 0 0-64-178.7 0L384 173.3 384 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-274.7z\"]\n};\nconst faAnglesDown = {\n  prefix: 'fas',\n  iconName: 'angles-down',\n  icon: [448, 512, [\"angle-double-down\"], \"f103\", \"M246.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 402.7 361.4 265.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-160 160zm160-352l-160 160c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 210.7 361.4 73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3z\"]\n};\nconst faAngleDoubleDown = faAnglesDown;\nconst faUsersRectangle = {\n  prefix: 'fas',\n  iconName: 'users-rectangle',\n  icon: [640, 512, [], \"e594\", \"M96 0C43 0 0 43 0 96L0 416c0 53 43 96 96 96l448 0c53 0 96-43 96-96l0-320c0-53-43-96-96-96L96 0zM64 96c0-17.7 14.3-32 32-32l448 0c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32L64 96zm159.8 80a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM96 309.3c0 14.7 11.9 26.7 26.7 26.7l56.1 0c8-34.1 32.8-61.7 65.2-73.6c-7.5-4.1-16.2-6.4-25.3-6.4l-69.3 0C119.9 256 96 279.9 96 309.3zM461.2 336l56.1 0c14.7 0 26.7-11.9 26.7-26.7c0-29.5-23.9-53.3-53.3-53.3l-69.3 0c-9.2 0-17.8 2.3-25.3 6.4c32.4 11.9 57.2 39.5 65.2 73.6zM372 289c-3.9-.7-7.9-1-12-1l-80 0c-4.1 0-8.1 .3-12 1c-26 4.4-47.3 22.7-55.9 47c-2.7 7.5-4.1 15.6-4.1 24c0 13.3 10.7 24 24 24l176 0c13.3 0 24-10.7 24-24c0-8.4-1.4-16.5-4.1-24c-8.6-24.3-29.9-42.6-55.9-47zM512 176a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM320 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128z\"]\n};\nconst faPeopleRoof = {\n  prefix: 'fas',\n  iconName: 'people-roof',\n  icon: [640, 512, [], \"e537\", \"M335.5 4l288 160c15.4 8.6 21 28.1 12.4 43.5s-28.1 21-43.5 12.4L320 68.6 47.5 220c-15.4 8.6-34.9 3-43.5-12.4s-3-34.9 12.4-43.5L304.5 4c9.7-5.4 21.4-5.4 31.1 0zM320 160a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM144 256a40 40 0 1 1 0 80 40 40 0 1 1 0-80zm312 40a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM226.9 491.4L200 441.5l0 38.5c0 17.7-14.3 32-32 32l-48 0c-17.7 0-32-14.3-32-32l0-38.5L61.1 491.4c-6.3 11.7-20.8 16-32.5 9.8s-16-20.8-9.8-32.5l37.9-70.3c15.3-28.5 45.1-46.3 77.5-46.3l19.5 0c16.3 0 31.9 4.5 45.4 12.6l33.6-62.3c15.3-28.5 45.1-46.3 77.5-46.3l19.5 0c32.4 0 62.1 17.8 77.5 46.3l33.6 62.3c13.5-8.1 29.1-12.6 45.4-12.6l19.5 0c32.4 0 62.1 17.8 77.5 46.3l37.9 70.3c6.3 11.7 1.9 26.2-9.8 32.5s-26.2 1.9-32.5-9.8L552 441.5l0 38.5c0 17.7-14.3 32-32 32l-48 0c-17.7 0-32-14.3-32-32l0-38.5-26.9 49.9c-6.3 11.7-20.8 16-32.5 9.8s-16-20.8-9.8-32.5l36.3-67.5c-1.7-1.7-3.2-3.6-4.3-5.8L376 345.5l0 54.5c0 17.7-14.3 32-32 32l-48 0c-17.7 0-32-14.3-32-32l0-54.5-26.9 49.9c-1.2 2.2-2.6 4.1-4.3 5.8l36.3 67.5c6.3 11.7 1.9 26.2-9.8 32.5s-26.2 1.9-32.5-9.8z\"]\n};\nconst faPeopleLine = {\n  prefix: 'fas',\n  iconName: 'people-line',\n  icon: [640, 512, [], \"e534\", \"M360 72a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zM144 208a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416zM496 208a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM200 313.5l26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-36.3-67.5c1.7-1.7 3.2-3.6 4.3-5.8L264 217.5l0 54.5c0 17.7 14.3 32 32 32l48 0c17.7 0 32-14.3 32-32l0-54.5 26.9 49.9c1.2 2.2 2.6 4.1 4.3 5.8l-36.3 67.5c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L440 313.5l0 38.5c0 17.7 14.3 32 32 32l48 0c17.7 0 32-14.3 32-32l0-38.5 26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-37.9-70.3c-15.3-28.5-45.1-46.3-77.5-46.3l-19.5 0c-16.3 0-31.9 4.5-45.4 12.6l-33.6-62.3c-15.3-28.5-45.1-46.3-77.5-46.3l-19.5 0c-32.4 0-62.1 17.8-77.5 46.3l-33.6 62.3c-13.5-8.1-29.1-12.6-45.4-12.6l-19.5 0c-32.4 0-62.1 17.8-77.5 46.3L18.9 340.6c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L88 313.5 88 352c0 17.7 14.3 32 32 32l48 0c17.7 0 32-14.3 32-32l0-38.5z\"]\n};\nconst faBeerMugEmpty = {\n  prefix: 'fas',\n  iconName: 'beer-mug-empty',\n  icon: [512, 512, [\"beer\"], \"f0fc\", \"M32 64c0-17.7 14.3-32 32-32l288 0c17.7 0 32 14.3 32 32l0 32 51.2 0c42.4 0 76.8 34.4 76.8 76.8l0 102.1c0 30.4-17.9 57.9-45.6 70.2L384 381.7l0 34.3c0 35.3-28.7 64-64 64L96 480c-35.3 0-64-28.7-64-64L32 64zM384 311.6l56.4-25.1c4.6-2.1 7.6-6.6 7.6-11.7l0-102.1c0-7.1-5.7-12.8-12.8-12.8L384 160l0 151.6zM160 144c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224zm64 0c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224zm64 0c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224z\"]\n};\nconst faBeer = faBeerMugEmpty;\nconst faDiagramPredecessor = {\n  prefix: 'fas',\n  iconName: 'diagram-predecessor',\n  icon: [512, 512, [], \"e477\", \"M448 416l0-64L64 352l0 64 384 0zm0 64L64 480c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64zM288 160c0 35.3-28.7 64-64 64L64 224c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l144 0 16 0 144 0c44.2 0 80 35.8 80 80l0 16 38.1 0c21.4 0 32.1 25.9 17 41L433 239c-9.4 9.4-24.6 9.4-33.9 0L329 169c-15.1-15.1-4.4-41 17-41l38.1 0 0-16c0-8.8-7.2-16-16-16l-80 0 0 64z\"]\n};\nconst faArrowUpLong = {\n  prefix: 'fas',\n  iconName: 'arrow-up-long',\n  icon: [384, 512, [\"long-arrow-up\"], \"f176\", \"M214.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 109.3 160 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-370.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128z\"]\n};\nconst faLongArrowUp = faArrowUpLong;\nconst faFireFlameSimple = {\n  prefix: 'fas',\n  iconName: 'fire-flame-simple',\n  icon: [384, 512, [\"burn\"], \"f46a\", \"M372.5 256.5l-.7-1.9C337.8 160.8 282 76.5 209.1 8.5l-3.3-3C202.1 2 197.1 0 192 0s-10.1 2-13.8 5.5l-3.3 3C102 76.5 46.2 160.8 12.2 254.6l-.7 1.9C3.9 277.3 0 299.4 0 321.6C0 426.7 86.8 512 192 512s192-85.3 192-190.4c0-22.2-3.9-44.2-11.5-65.1zm-90.8 49.5c4.1 9.3 6.2 19.4 6.2 29.5c0 53-43 96.5-96 96.5s-96-43.5-96-96.5c0-10.1 2.1-20.3 6.2-29.5l1.9-4.3c15.8-35.4 37.9-67.7 65.3-95.1l8.9-8.9c3.6-3.6 8.5-5.6 13.6-5.6s10 2 13.6 5.6l8.9 8.9c27.4 27.4 49.6 59.7 65.3 95.1l1.9 4.3z\"]\n};\nconst faBurn = faFireFlameSimple;\nconst faPerson = {\n  prefix: 'fas',\n  iconName: 'person',\n  icon: [320, 512, [129485, \"male\"], \"f183\", \"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l58.3 97c9.1 15.1 4.2 34.8-10.9 43.9s-34.8 4.2-43.9-10.9L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0z\"]\n};\nconst faMale = faPerson;\nconst faLaptop = {\n  prefix: 'fas',\n  iconName: 'laptop',\n  icon: [640, 512, [128187], \"f109\", \"M128 32C92.7 32 64 60.7 64 96l0 256 64 0 0-256 384 0 0 256 64 0 0-256c0-35.3-28.7-64-64-64L128 32zM19.2 384C8.6 384 0 392.6 0 403.2C0 445.6 34.4 480 76.8 480l486.4 0c42.4 0 76.8-34.4 76.8-76.8c0-10.6-8.6-19.2-19.2-19.2L19.2 384z\"]\n};\nconst faFileCsv = {\n  prefix: 'fas',\n  iconName: 'file-csv',\n  icon: [512, 512, [], \"f6dd\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM200 352l16 0c22.1 0 40 17.9 40 40l0 8c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-8c0-4.4-3.6-8-8-8l-16 0c-4.4 0-8 3.6-8 8l0 80c0 4.4 3.6 8 8 8l16 0c4.4 0 8-3.6 8-8l0-8c0-8.8 7.2-16 16-16s16 7.2 16 16l0 8c0 22.1-17.9 40-40 40l-16 0c-22.1 0-40-17.9-40-40l0-80c0-22.1 17.9-40 40-40zm133.1 0l34.9 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-34.9 0c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1L304 512c-8.8 0-16-7.2-16-16s7.2-16 16-16l42.9 0c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16l0 31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66l0-31.6c0-8.8 7.2-16 16-16s16 7.2 16 16l0 31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6l0-31.6c0-8.8 7.2-16 16-16z\"]\n};\nconst faMenorah = {\n  prefix: 'fas',\n  iconName: 'menorah',\n  icon: [640, 512, [], \"f676\", \"M20.8 7.4C22.8 2.9 27.1 0 32 0s9.2 2.9 11.2 7.4L61.3 49.7c1.8 4.1 2.7 8.6 2.7 13.1L64 64c0 17.7-14.3 32-32 32S0 81.7 0 64l0-1.2c0-4.5 .9-8.9 2.7-13.1L20.8 7.4zm96 0C118.8 2.9 123.1 0 128 0s9.2 2.9 11.2 7.4l18.2 42.4c1.8 4.1 2.7 8.6 2.7 13.1l0 1.2c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-1.2c0-4.5 .9-8.9 2.7-13.1L116.8 7.4zm77.8 42.4L212.8 7.4C214.8 2.9 219.1 0 224 0s9.2 2.9 11.2 7.4l18.2 42.4c1.8 4.1 2.7 8.6 2.7 13.1l0 1.2c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-1.2c0-4.5 .9-8.9 2.7-13.1zM308.8 7.4C310.8 2.9 315.1 0 320 0s9.2 2.9 11.2 7.4l18.2 42.4c1.8 4.1 2.7 8.6 2.7 13.1l0 1.2c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-1.2c0-4.5 .9-8.9 2.7-13.1L308.8 7.4zm77.8 42.4L404.8 7.4C406.8 2.9 411.1 0 416 0s9.2 2.9 11.2 7.4l18.2 42.4c1.8 4.1 2.7 8.6 2.7 13.1l0 1.2c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-1.2c0-4.5 .9-8.9 2.7-13.1zM500.8 7.4C502.8 2.9 507.1 0 512 0s9.2 2.9 11.2 7.4l18.2 42.4c1.8 4.1 2.7 8.6 2.7 13.1l0 1.2c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-1.2c0-4.5 .9-8.9 2.7-13.1L500.8 7.4zm77.8 42.4L596.8 7.4C598.8 2.9 603.1 0 608 0s9.2 2.9 11.2 7.4l18.2 42.4c1.8 4.1 2.7 8.6 2.7 13.1l0 1.2c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-1.2c0-4.5 .9-8.9 2.7-13.1zM32 128c17.7 0 32 14.3 32 32l0 128c0 17.7 14.3 32 32 32l192 0 0-160c0-17.7 14.3-32 32-32s32 14.3 32 32l0 160 192 0c17.7 0 32-14.3 32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32l0 128c0 53-43 96-96 96l-192 0 0 64 128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0-160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l128 0 0-64L96 384c-53 0-96-43-96-96L0 160c0-17.7 14.3-32 32-32zm96 0c17.7 0 32 14.3 32 32l0 96 0 32-64 0 0-32 0-96c0-17.7 14.3-32 32-32zm96 0c17.7 0 32 14.3 32 32l0 96 0 32-64 0 0-32 0-96c0-17.7 14.3-32 32-32zm192 0c17.7 0 32 14.3 32 32l0 96 0 32-64 0 0-32 0-96c0-17.7 14.3-32 32-32zm96 0c17.7 0 32 14.3 32 32l0 96 0 32-64 0 0-32 0-96c0-17.7 14.3-32 32-32z\"]\n};\nconst faTruckPlane = {\n  prefix: 'fas',\n  iconName: 'truck-plane',\n  icon: [640, 512, [], \"e58f\", \"M200 0c-30.6 0-56 54.7-56 86.1l0 106.5L7.8 274.3C2.9 277.2 0 282.4 0 288l0 64c0 5.1 2.4 9.8 6.4 12.8s9.3 3.9 14.1 2.5l123.4-37 0 81.2-50 40c-3.8 3-6 7.6-6 12.5l0 32c0 5.1 2.5 10 6.6 13s9.5 3.8 14.4 2.2L200 480.9 290.4 511c-1.6-4.7-2.4-9.8-2.4-15l0-32.6c-18.2-10.5-30.7-29.7-31.9-51.8l-.1-.1 0-3.5 0-82.5L256 184l0-1.1s0 0 0 0l0-96.9C256 54.7 231.5 0 200 0zm88 176l0 224c0 20.9 13.4 38.7 32 45.3l0 42.7c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-40 160 0 0 40c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-42.7c18.6-6.6 32-24.4 32-45.3l0-224c0-26.5-21.5-48-48-48l-256 0c-26.5 0-48 21.5-48 48zm79.8 78.7c3.3-8.7 11.2-14.7 20.5-14.7l151.4 0c9.2 0 17.2 6 20.5 14.7L576 304l-224 0 15.8-49.3zM568 352a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM336 376a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faRecordVinyl = {\n  prefix: 'fas',\n  iconName: 'record-vinyl',\n  icon: [512, 512, [], \"f8d9\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192zm0 224a128 128 0 1 0 0-256 128 128 0 1 0 0 256zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faFaceGrinStars = {\n  prefix: 'fas',\n  iconName: 'face-grin-stars',\n  icon: [512, 512, [129321, \"grin-stars\"], \"f587\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm407.4 75.5c5-11.8-7-22.5-19.3-18.7c-39.7 12.2-84.5 19-131.8 19s-92.1-6.8-131.8-19c-12.3-3.8-24.3 6.9-19.3 18.7c25 59.1 83.2 100.5 151.1 100.5s126.2-41.4 151.1-100.5zM160 120c-3.1 0-5.9 1.8-7.2 4.6l-16.6 34.7-38.1 5c-3.1 .4-5.6 2.5-6.6 5.5s-.1 6.2 2.1 8.3l27.9 26.5-7 37.8c-.6 3 .7 6.1 3.2 7.9s5.8 2 8.5 .6L160 232.5l33.8 18.3c2.7 1.5 6 1.3 8.5-.6s3.7-4.9 3.2-7.9l-7-37.8L226.4 178c2.2-2.1 3.1-5.3 2.1-8.3s-3.5-5.1-6.6-5.5l-38.1-5-16.6-34.7c-1.3-2.8-4.1-4.6-7.2-4.6zm192 0c-3.1 0-5.9 1.8-7.2 4.6l-16.6 34.7-38.1 5c-3.1 .4-5.6 2.5-6.6 5.5s-.1 6.2 2.1 8.3l27.9 26.5-7 37.8c-.6 3 .7 6.1 3.2 7.9s5.8 2 8.5 .6L352 232.5l33.8 18.3c2.7 1.5 6 1.3 8.5-.6s3.7-4.9 3.2-7.9l-7-37.8L418.4 178c2.2-2.1 3.1-5.3 2.1-8.3s-3.5-5.1-6.6-5.5l-38.1-5-16.6-34.7c-1.3-2.8-4.1-4.6-7.2-4.6z\"]\n};\nconst faGrinStars = faFaceGrinStars;\nconst faBong = {\n  prefix: 'fas',\n  iconName: 'bong',\n  icon: [448, 512, [], \"f55c\", \"M160 208.5c0 29.1-15.6 53.9-37.2 67.8c-17.2 11.1-31.5 26.1-41.7 43.7l221.8 0c-10.2-17.6-24.5-32.6-41.7-43.7c-21.6-13.9-37.2-38.7-37.2-67.8L224 64l-64 0 0 144.5zM288 64l0 144.5c0 5.7 3.1 10.9 7.9 14c11.2 7.2 21.5 15.5 30.9 24.8L366.1 208l-7-7c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l24 24 24 24c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-7-7-43.3 43.3C374 314.1 384 347.9 384 384c0 39.4-11.9 76.1-32.2 106.5c-9.6 14.4-26.5 21.5-43.8 21.5L76.1 512c-17.3 0-34.2-7.1-43.8-21.5C11.9 460.1 0 423.4 0 384c0-67.8 35.1-127.3 88.1-161.5c4.8-3.1 7.9-8.3 7.9-14L96 64C78.3 64 64 49.7 64 32S78.3 0 96 0l16 0L272 0l16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32z\"]\n};\nconst faSpaghettiMonsterFlying = {\n  prefix: 'fas',\n  iconName: 'spaghetti-monster-flying',\n  icon: [640, 512, [\"pastafarianism\"], \"f67b\", \"M208 64a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm48 0c0 16.2-6 31.1-16 42.3l15.6 31.2c18.7-6 39.9-9.5 64.4-9.5s45.8 3.5 64.4 9.5L400 106.3C390 95.1 384 80.2 384 64c0-35.3 28.7-64 64-64s64 28.7 64 64s-28.7 64-64 64c-1.7 0-3.4-.1-5.1-.2L427.8 158c21.1 13.6 37.7 30.2 51.4 46.4c7.1 8.3 13.5 16.6 19.3 24l1.4 1.8c6.3 8.1 11.6 14.8 16.7 20.4C527.3 262.3 532.7 264 536 264c2.5 0 4.3-.6 7.1-3.3c3.7-3.5 7.1-8.8 12.5-17.4l.6-.9c4.6-7.4 11-17.6 19.4-25.7c9.7-9.3 22.9-16.7 40.4-16.7c13.3 0 24 10.7 24 24s-10.7 24-24 24c-2.5 0-4.3 .6-7.1 3.3c-3.7 3.5-7.1 8.8-12.5 17.4l-.6 .9c-4.6 7.4-11 17.6-19.4 25.7c-9.7 9.3-22.9 16.7-40.4 16.7c-18.5 0-32.9-8.5-44.3-18.6c-3.1 4-6.6 8.3-10.5 12.7c1.4 4.3 2.8 8.5 4 12.5c.9 3 1.8 5.8 2.6 8.6c3 9.8 5.5 18.2 8.6 25.9c3.9 9.8 7.4 15.4 10.8 18.5c2.6 2.4 5.9 4.3 12.8 4.3c8.7 0 16.9-4.2 33.7-13.2c15-8 35.7-18.8 62.3-18.8c13.3 0 24 10.7 24 24s-10.7 24-24 24c-13.4 0-24.7 5.2-39.7 13.2c-1 .6-2.1 1.1-3.2 1.7C559.9 414 541.4 424 520 424c-18.4 0-33.6-6.1-45.5-17.2c-11.1-10.3-17.9-23.7-22.7-36c-3.6-9-6.7-19.1-9.5-28.5c-16.4 12.3-36.1 23.6-58.9 31.3c3.6 10.8 8.4 23.5 14.4 36.2c7.5 15.9 16.2 30.4 25.8 40.5C433 460.5 441.2 464 448 464c13.3 0 24 10.7 24 24s-10.7 24-24 24c-25.2 0-45-13.5-59.5-28.8c-14.5-15.4-25.7-34.9-34.2-53c-8-17-14.1-33.8-18.3-46.9c-5.2 .4-10.6 .6-16 .6s-10.8-.2-16-.6c-4.2 13-10.3 29.9-18.3 46.9c-8.5 18.1-19.8 37.6-34.2 53C237 498.5 217.2 512 192 512c-13.3 0-24-10.7-24-24s10.7-24 24-24c6.8 0 15-3.5 24.5-13.7c9.5-10.1 18.3-24.6 25.8-40.5c5.9-12.6 10.7-25.4 14.4-36.2c-22.8-7.7-42.5-19-58.9-31.3c-2.9 9.4-6 19.5-9.5 28.5c-4.8 12.2-11.6 25.6-22.7 36C153.6 417.9 138.4 424 120 424c-21.4 0-39.9-10-53.1-17.1c0 0 0 0 0 0c-1.1-.6-2.2-1.2-3.2-1.7c-15-8-26.3-13.2-39.7-13.2c-13.3 0-24-10.7-24-24s10.7-24 24-24c26.6 0 47.3 10.8 62.3 18.8c16.8 9 25 13.2 33.7 13.2c6.8 0 10.2-1.9 12.8-4.3c3.4-3.2 7-8.8 10.8-18.5c3-7.7 5.6-16.1 8.6-25.9c.8-2.7 1.7-5.6 2.6-8.6c1.2-4 2.6-8.2 4-12.5c-3.9-4.5-7.4-8.8-10.5-12.7C136.9 303.5 122.5 312 104 312c-17.5 0-30.7-7.4-40.4-16.7c-8.4-8.1-14.8-18.3-19.4-25.7l-.6-.9c-5.4-8.6-8.8-13.9-12.5-17.4c-2.8-2.7-4.6-3.3-7.1-3.3c-13.3 0-24-10.7-24-24s10.7-24 24-24c17.5 0 30.7 7.4 40.4 16.7c8.4 8.1 14.8 18.3 19.4 25.7l.6 .9c5.4 8.6 8.8 13.9 12.5 17.4c2.8 2.7 4.6 3.3 7.1 3.3c3.3 0 8.7-1.7 19.4-13.4c5.1-5.6 10.4-12.3 16.7-20.4l1.4-1.8c5.8-7.4 12.2-15.7 19.3-24c13.8-16.2 30.3-32.8 51.4-46.4l-15.1-30.2c-1.7 .1-3.4 .2-5.1 .2c-35.3 0-64-28.7-64-64s28.7-64 64-64s64 28.7 64 64zm208 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z\"]\n};\nconst faPastafarianism = faSpaghettiMonsterFlying;\nconst faArrowDownUpAcrossLine = {\n  prefix: 'fas',\n  iconName: 'arrow-down-up-across-line',\n  icon: [576, 512, [], \"e4af\", \"M137.4 502.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7 192 288l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0 0-114.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 109.3 384 224l-192 0-64 0-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 114.7L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96zM128 192l64 0 0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 128zM448 320l-64 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128z\"]\n};\nconst faSpoon = {\n  prefix: 'fas',\n  iconName: 'spoon',\n  icon: [512, 512, [129348, 61873, \"utensil-spoon\"], \"f2e5\", \"M245.8 220.9c-14.5-17.6-21.8-39.2-21.8-60.8C224 80 320 0 416 0c53 0 96 43 96 96c0 96-80 192-160.2 192c-21.6 0-43.2-7.3-60.8-21.8L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L245.8 220.9z\"]\n};\nconst faUtensilSpoon = faSpoon;\nconst faJarWheat = {\n  prefix: 'fas',\n  iconName: 'jar-wheat',\n  icon: [320, 512, [], \"e517\", \"M32 32C32 14.3 46.3 0 64 0L256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L64 64C46.3 64 32 49.7 32 32zM0 160c0-35.3 28.7-64 64-64l192 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 160zm112 0l-42.2 0c-3.2 0-5.8 2.6-5.8 5.8C64 198 90 224 122.2 224l21.8 0 32 0 21.8 0c32.1 0 58.2-26 58.2-58.2c0-3.2-2.6-5.8-5.8-5.8L208 160c-19.1 0-36.3 8.4-48 21.7c-11.7-13.3-28.9-21.7-48-21.7zm48 117.7c-11.7-13.3-28.9-21.7-48-21.7l-42.2 0c-3.2 0-5.8 2.6-5.8 5.8C64 294 90 320 122.2 320l21.8 0 32 0 21.8 0c32.1 0 58.2-26 58.2-58.2c0-3.2-2.6-5.8-5.8-5.8L208 256c-19.1 0-36.3 8.4-48 21.7zM112 352l-42.2 0c-3.2 0-5.8 2.6-5.8 5.8C64 390 90 416 122.2 416l21.8 0 0 32c0 8.8 7.2 16 16 16s16-7.2 16-16l0-32 21.8 0c32.1 0 58.2-26 58.2-58.2c0-3.2-2.6-5.8-5.8-5.8L208 352c-19.1 0-36.3 8.4-48 21.7c-11.7-13.3-28.9-21.7-48-21.7z\"]\n};\nconst faEnvelopesBulk = {\n  prefix: 'fas',\n  iconName: 'envelopes-bulk',\n  icon: [640, 512, [\"mail-bulk\"], \"f674\", \"M128 0C110.3 0 96 14.3 96 32l0 192 96 0 0-32c0-35.3 28.7-64 64-64l224 0 0-96c0-17.7-14.3-32-32-32L128 0zM256 160c-17.7 0-32 14.3-32 32l0 32 96 0c35.3 0 64 28.7 64 64l0 128 192 0c17.7 0 32-14.3 32-32l0-192c0-17.7-14.3-32-32-32l-320 0zm240 64l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM64 256c-17.7 0-32 14.3-32 32l0 13L187.1 415.9c1.4 1 3.1 1.6 4.9 1.6s3.5-.6 4.9-1.6L352 301l0-13c0-17.7-14.3-32-32-32L64 256zm288 84.8L216 441.6c-6.9 5.1-15.3 7.9-24 7.9s-17-2.8-24-7.9L32 340.8 32 480c0 17.7 14.3 32 32 32l256 0c17.7 0 32-14.3 32-32l0-139.2z\"]\n};\nconst faMailBulk = faEnvelopesBulk;\nconst faFileCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'file-circle-exclamation',\n  icon: [576, 512, [], \"e4eb\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zm48 96a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 240a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm0-192c-8.8 0-16 7.2-16 16l0 80c0 8.8 7.2 16 16 16s16-7.2 16-16l0-80c0-8.8-7.2-16-16-16z\"]\n};\nconst faCircleH = {\n  prefix: 'fas',\n  iconName: 'circle-h',\n  icon: [512, 512, [9405, \"hospital-symbol\"], \"f47e\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM368 152l0 104 0 104c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-80-128 0 0 80c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-208c0-13.3 10.7-24 24-24s24 10.7 24 24l0 80 128 0 0-80c0-13.3 10.7-24 24-24s24 10.7 24 24z\"]\n};\nconst faHospitalSymbol = faCircleH;\nconst faPager = {\n  prefix: 'fas',\n  iconName: 'pager',\n  icon: [512, 512, [128223], \"f815\", \"M0 128C0 92.7 28.7 64 64 64l384 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zm64 32l0 64c0 17.7 14.3 32 32 32l320 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L96 128c-17.7 0-32 14.3-32 32zM80 320c-13.3 0-24 10.7-24 24s10.7 24 24 24l56 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-56 0zm136 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0z\"]\n};\nconst faAddressBook = {\n  prefix: 'fas',\n  iconName: 'address-book',\n  icon: [512, 512, [62138, \"contact-book\"], \"f2b9\", \"M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L96 0zM208 288l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM496 192c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64z\"]\n};\nconst faContactBook = faAddressBook;\nconst faStrikethrough = {\n  prefix: 'fas',\n  iconName: 'strikethrough',\n  icon: [512, 512, [], \"f0cc\", \"M161.3 144c3.2-17.2 14-30.1 33.7-38.6c21.1-9 51.8-12.3 88.6-6.5c11.9 1.9 48.8 9.1 60.1 12c17.1 4.5 34.6-5.6 39.2-22.7s-5.6-34.6-22.7-39.2c-14.3-3.8-53.6-11.4-66.6-13.4c-44.7-7-88.3-4.2-123.7 10.9c-36.5 15.6-64.4 44.8-71.8 87.3c-.1 .6-.2 1.1-.2 1.7c-2.8 23.9 .5 45.6 10.1 64.6c4.5 9 10.2 16.9 16.7 23.9L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-209.9 0-.4-.1-1.1-.3c-36-10.8-65.2-19.6-85.2-33.1c-9.3-6.3-15-12.6-18.2-19.1c-3.1-6.1-5.2-14.6-3.8-27.4zM348.9 337.2c2.7 6.5 4.4 15.8 1.9 30.1c-3 17.6-13.8 30.8-33.9 39.4c-21.1 9-51.7 12.3-88.5 6.5c-18-2.9-49.1-13.5-74.4-22.1c-5.6-1.9-11-3.7-15.9-5.4c-16.8-5.6-34.9 3.5-40.5 20.3s3.5 34.9 20.3 40.5c3.6 1.2 7.9 2.7 12.7 4.3c0 0 0 0 0 0s0 0 0 0c24.9 8.5 63.6 21.7 87.6 25.6c0 0 0 0 0 0l.2 0c44.7 7 88.3 4.2 123.7-10.9c36.5-15.6 64.4-44.8 71.8-87.3c3.6-21 2.7-40.4-3.1-58.1l-75.7 0c7 5.6 11.4 11.2 13.9 17.2z\"]\n};\nconst faK = {\n  prefix: 'fas',\n  iconName: 'k',\n  icon: [320, 512, [107], \"4b\", \"M311 86.3c12.3-12.7 12-32.9-.7-45.2s-32.9-12-45.2 .7l-155.2 160L64 249 64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 328 0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-107 64.7-66.7 133 192c10.1 14.5 30 18.1 44.5 8.1s18.1-30 8.1-44.5L174.1 227.4 311 86.3z\"]\n};\nconst faLandmarkFlag = {\n  prefix: 'fas',\n  iconName: 'landmark-flag',\n  icon: [512, 512, [], \"e51c\", \"M272 0l80 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-80 0 0 32 192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 192c-17.7 0-32-14.3-32-32s14.3-32 32-32l192 0 0-112c0-8.8 7.2-16 16-16l16 0zM64 224l64 0 0 192 40 0 0-192 64 0 0 192 48 0 0-192 64 0 0 192 40 0 0-192 64 0 0 196.3c.6 .3 1.2 .7 1.8 1.1l48 32c11.7 7.8 17 22.4 12.9 35.9S494.1 512 480 512L32 512c-14.1 0-26.5-9.2-30.6-22.7s1.1-28.1 12.9-35.9l48-32c.6-.4 1.2-.7 1.8-1.1L64 224z\"]\n};\nconst faPencil = {\n  prefix: 'fas',\n  iconName: 'pencil',\n  icon: [512, 512, [9999, 61504, \"pencil-alt\"], \"f303\", \"M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1 0 32c0 8.8 7.2 16 16 16l32 0zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faPencilAlt = faPencil;\nconst faBackward = {\n  prefix: 'fas',\n  iconName: 'backward',\n  icon: [512, 512, [9194], \"f04a\", \"M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-320c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3l0 41.7 0 41.7L459.5 440.6zM256 352l0-96 0-128 0-32c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-64z\"]\n};\nconst faCaretRight = {\n  prefix: 'fas',\n  iconName: 'caret-right',\n  icon: [256, 512, [], \"f0da\", \"M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z\"]\n};\nconst faComments = {\n  prefix: 'fas',\n  iconName: 'comments',\n  icon: [640, 512, [128490, 61670], \"f086\", \"M208 352c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176c0 38.6 14.7 74.3 39.6 103.4c-3.5 9.4-8.7 17.7-14.2 24.7c-4.8 6.2-9.7 11-13.3 14.3c-1.8 1.6-3.3 2.9-4.3 3.7c-.5 .4-.9 .7-1.1 .8l-.2 .2s0 0 0 0s0 0 0 0C1 327.2-1.4 334.4 .8 340.9S9.1 352 16 352c21.8 0 43.8-5.6 62.1-12.5c9.2-3.5 17.8-7.4 25.2-11.4C134.1 343.3 169.8 352 208 352zM448 176c0 112.3-99.1 196.9-216.5 207C255.8 457.4 336.4 512 432 512c38.2 0 73.9-8.7 104.7-23.9c7.5 4 16 7.9 25.2 11.4c18.3 6.9 40.3 12.5 62.1 12.5c6.9 0 13.1-4.5 15.2-11.1c2.1-6.6-.2-13.8-5.8-17.9c0 0 0 0 0 0s0 0 0 0l-.2-.2c-.2-.2-.6-.4-1.1-.8c-1-.8-2.5-2-4.3-3.7c-3.6-3.3-8.5-8.1-13.3-14.3c-5.5-7-10.7-15.4-14.2-24.7c24.9-29 39.6-64.7 39.6-103.4c0-92.8-84.9-168.9-192.6-175.5c.4 5.1 .6 10.3 .6 15.5z\"]\n};\nconst faPaste = {\n  prefix: 'fas',\n  iconName: 'paste',\n  icon: [512, 512, [\"file-clipboard\"], \"f0ea\", \"M160 0c-23.7 0-44.4 12.9-55.4 32L48 32C21.5 32 0 53.5 0 80L0 400c0 26.5 21.5 48 48 48l144 0 0-272c0-44.2 35.8-80 80-80l48 0 0-16c0-26.5-21.5-48-48-48l-56.6 0C204.4 12.9 183.7 0 160 0zM272 128c-26.5 0-48 21.5-48 48l0 272 0 16c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-220.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L320 128l-48 0zM160 40a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faFileClipboard = faPaste;\nconst faCodePullRequest = {\n  prefix: 'fas',\n  iconName: 'code-pull-request',\n  icon: [512, 512, [], \"e13c\", \"M305.8 2.1C314.4 5.9 320 14.5 320 24l0 40 16 0c70.7 0 128 57.3 128 128l0 166.7c28.3 12.3 48 40.5 48 73.3c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3L400 192c0-35.3-28.7-64-64-64l-16 0 0 40c0 9.5-5.6 18.1-14.2 21.9s-18.8 2.3-25.8-4.1l-80-72c-5.1-4.6-7.9-11-7.9-17.8s2.9-13.3 7.9-17.8l80-72c7-6.3 17.2-7.9 25.8-4.1zM104 80A24 24 0 1 0 56 80a24 24 0 1 0 48 0zm8 73.3l0 205.3c28.3 12.3 48 40.5 48 73.3c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3l0-205.3C19.7 141 0 112.8 0 80C0 35.8 35.8 0 80 0s80 35.8 80 80c0 32.8-19.7 61-48 73.3zM104 432a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm328 24a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faClipboardList = {\n  prefix: 'fas',\n  iconName: 'clipboard-list',\n  icon: [384, 512, [], \"f46d\", \"M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM72 272a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm104-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zM72 368a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm88 0c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z\"]\n};\nconst faTruckRampBox = {\n  prefix: 'fas',\n  iconName: 'truck-ramp-box',\n  icon: [640, 512, [\"truck-loading\"], \"f4de\", \"M640 0l0 400c0 61.9-50.1 112-112 112c-61 0-110.5-48.7-112-109.3L48.4 502.9c-17.1 4.6-34.6-5.4-39.3-22.5s5.4-34.6 22.5-39.3L352 353.8 352 64c0-35.3 28.7-64 64-64L640 0zM576 400a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM23.1 207.7c-4.6-17.1 5.6-34.6 22.6-39.2l46.4-12.4 20.7 77.3c2.3 8.5 11.1 13.6 19.6 11.3l30.9-8.3c8.5-2.3 13.6-11.1 11.3-19.6l-20.7-77.3 46.4-12.4c17.1-4.6 34.6 5.6 39.2 22.6l41.4 154.5c4.6 17.1-5.6 34.6-22.6 39.2L103.7 384.9c-17.1 4.6-34.6-5.6-39.2-22.6L23.1 207.7z\"]\n};\nconst faTruckLoading = faTruckRampBox;\nconst faUserCheck = {\n  prefix: 'fas',\n  iconName: 'user-check',\n  icon: [640, 512, [], \"f4fc\", \"M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM625 177L497 305c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L591 143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\"]\n};\nconst faVialVirus = {\n  prefix: 'fas',\n  iconName: 'vial-virus',\n  icon: [512, 512, [], \"e597\", \"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l0 288c0 53 43 96 96 96c28.6 0 54.2-12.5 71.8-32.3c.1-14.2 5.6-28.3 16.4-39.1c.2-.2 .1-.6-.2-.6c-30.9 0-56-25.1-56-56s25.1-56 56-56c.3 0 .4-.4 .2-.6c-21.9-21.9-21.9-57.3 0-79.2c2.4-2.4 5-4.6 7.8-6.5L224 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0L96 32 32 32zM96 192l0-96 64 0 0 96-64 0zM216 376c28.8 0 43.2 34.8 22.9 55.2c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0c20.4-20.4 55.2-5.9 55.2 22.9c0 13.3 10.7 24 24 24s24-10.7 24-24c0-28.8 34.8-43.2 55.2-22.9c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9C444.8 410.8 459.2 376 488 376c13.3 0 24-10.7 24-24s-10.7-24-24-24c-28.8 0-43.2-34.8-22.9-55.2c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0C410.8 259.2 376 244.8 376 216c0-13.3-10.7-24-24-24s-24 10.7-24 24c0 28.8-34.8 43.2-55.2 22.9c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9c20.4 20.4 5.9 55.2-22.9 55.2c-13.3 0-24 10.7-24 24s10.7 24 24 24zm104-88a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm40 96a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faSheetPlastic = {\n  prefix: 'fas',\n  iconName: 'sheet-plastic',\n  icon: [384, 512, [], \"e571\", \"M0 448c0 35.3 28.7 64 64 64l160 0 0-128c0-17.7 14.3-32 32-32l128 0 0-288c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448zM171.3 75.3l-96 96c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l96-96c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6zm96 32l-160 160c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l160-160c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6zM384 384l-128 0 0 128L384 384z\"]\n};\nconst faBlog = {\n  prefix: 'fas',\n  iconName: 'blog',\n  icon: [512, 512, [], \"f781\", \"M192 32c0 17.7 14.3 32 32 32c123.7 0 224 100.3 224 224c0 17.7 14.3 32 32 32s32-14.3 32-32C512 128.9 383.1 0 224 0c-17.7 0-32 14.3-32 32zm0 96c0 17.7 14.3 32 32 32c70.7 0 128 57.3 128 128c0 17.7 14.3 32 32 32s32-14.3 32-32c0-106-86-192-192-192c-17.7 0-32 14.3-32 32zM96 144c0-26.5-21.5-48-48-48S0 117.5 0 144L0 368c0 79.5 64.5 144 144 144s144-64.5 144-144s-64.5-144-144-144l-16 0 0 96 16 0c26.5 0 48 21.5 48 48s-21.5 48-48 48s-48-21.5-48-48l0-224z\"]\n};\nconst faUserNinja = {\n  prefix: 'fas',\n  iconName: 'user-ninja',\n  icon: [448, 512, [129399], \"f504\", \"M224 256c-57.2 0-105.6-37.5-122-89.3c-1.1 1.3-2.2 2.6-3.5 3.8c-15.8 15.8-38.8 20.7-53.6 22.1c-8.1 .8-14.6-5.7-13.8-13.8c1.4-14.7 6.3-37.8 22.1-53.6c5.8-5.8 12.6-10.1 19.6-13.4c-7-3.2-13.8-7.6-19.6-13.4C37.4 82.7 32.6 59.7 31.1 44.9c-.8-8.1 5.7-14.6 13.8-13.8c14.7 1.4 37.8 6.3 53.6 22.1c4.8 4.8 8.7 10.4 11.7 16.1C131.4 28.2 174.4 0 224 0c70.7 0 128 57.3 128 128s-57.3 128-128 128zM0 482.3C0 399.5 56.4 330 132.8 309.9c6-1.6 12.2 .9 15.9 5.8l62.5 83.3c6.4 8.5 19.2 8.5 25.6 0l62.5-83.3c3.7-4.9 9.9-7.4 15.9-5.8C391.6 330 448 399.5 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM160 96c-8.8 0-16 7.2-16 16s7.2 16 16 16l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L160 96z\"]\n};\nconst faPersonArrowUpFromLine = {\n  prefix: 'fas',\n  iconName: 'person-arrow-up-from-line',\n  icon: [640, 512, [], \"e539\", \"M192 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-8 352l0-96 16 0 0 96-16 0zm-64 0l-88 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l120 0 80 0 376 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-344 0 0-191.1 28.6 47.5c9.1 15.1 28.8 20 43.9 10.9s20-28.8 10.9-43.9l-58.3-97c-17.4-28.9-48.6-46.6-82.3-46.6l-29.7 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9L120 256.9 120 448zM598.6 121.4l-80-80c-12.5-12.5-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L464 141.3 464 384c0 17.7 14.3 32 32 32s32-14.3 32-32l0-242.7 25.4 25.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z\"]\n};\nconst faScrollTorah = {\n  prefix: 'fas',\n  iconName: 'scroll-torah',\n  icon: [640, 512, [\"torah\"], \"f6a0\", \"M96 480L96 32C96 14.3 74.5 0 48 0S0 14.3 0 32L0 480c0 17.7 21.5 32 48 32s48-14.3 48-32zM512 32L128 32l0 448 384 0 0-448zM592 0c-26.5 0-48 14.3-48 32l0 448c0 17.7 21.5 32 48 32s48-14.3 48-32l0-448c0-17.7-21.5-32-48-32zM196 313.7c0-3.2 .9-6.4 2.5-9.2L226.7 256l-28.3-48.5c-1.6-2.8-2.5-6-2.5-9.2c0-10.1 8.2-18.3 18.3-18.3l56.7 0 31.4-53.9c3.6-6.3 10.3-10.1 17.6-10.1s13.9 3.8 17.6 10.1L369 180l56.7 0c10.1 0 18.3 8.2 18.3 18.3c0 3.2-.9 6.4-2.5 9.2L413.3 256l28.3 48.5c1.6 2.8 2.5 6 2.5 9.2c0 10.1-8.2 18.3-18.3 18.3L369 332l-31.4 53.9c-3.6 6.3-10.3 10.1-17.6 10.1s-13.9-3.8-17.6-10.1L271 332l-56.7 0c-10.1 0-18.3-8.2-18.3-18.3zm124 54.7L341.2 332l-42.4 0L320 368.4zM254.5 256l30.3 52 70.4 0 30.3-52-30.3-52-70.4 0-30.3 52zm144.9 23.8L383 308l32.8 0-16.4-28.2zM415.8 204L383 204l16.4 28.2L415.8 204zM320 143.6L298.8 180l42.4 0L320 143.6zM224.2 204l16.4 28.2L257 204l-32.8 0zM257 308l-16.4-28.2L224.2 308l32.8 0z\"]\n};\nconst faTorah = faScrollTorah;\nconst faBroomBall = {\n  prefix: 'fas',\n  iconName: 'broom-ball',\n  icon: [576, 512, [\"quidditch\", \"quidditch-broom-ball\"], \"f458\", \"M566.6 9.4c12.5 12.5 12.5 32.8 0 45.3l-192 192 34.7 34.7c4.2 4.2 6.6 10 6.6 16c0 12.5-10.1 22.6-22.6 22.6l-29.1 0L256 211.7l0-29.1c0-12.5 10.1-22.6 22.6-22.6c6 0 11.8 2.4 16 6.6l34.7 34.7 192-192c12.5-12.5 32.8-12.5 45.3 0zm-344 225.5L341.1 353.4c3.7 42.7-11.7 85.2-42.3 115.8C271.4 496.6 234.2 512 195.5 512L22.1 512C9.9 512 0 502.1 0 489.9c0-6.3 2.7-12.3 7.3-16.5L133.7 359.7c4.2-3.7-.4-10.4-5.4-7.9L77.2 377.4c-6.1 3-13.2-1.4-13.2-8.2c0-31.5 12.5-61.7 34.8-84l8-8c30.6-30.6 73.1-45.9 115.8-42.3zM464 352a80 80 0 1 1 0 160 80 80 0 1 1 0-160z\"]\n};\nconst faQuidditch = faBroomBall;\nconst faQuidditchBroomBall = faBroomBall;\nconst faToggleOff = {\n  prefix: 'fas',\n  iconName: 'toggle-off',\n  icon: [576, 512, [], \"f204\", \"M384 128c70.7 0 128 57.3 128 128s-57.3 128-128 128l-192 0c-70.7 0-128-57.3-128-128s57.3-128 128-128l192 0zM576 256c0-106-86-192-192-192L192 64C86 64 0 150 0 256S86 448 192 448l192 0c106 0 192-86 192-192zM192 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z\"]\n};\nconst faBoxArchive = {\n  prefix: 'fas',\n  iconName: 'box-archive',\n  icon: [512, 512, [\"archive\"], \"f187\", \"M32 32l448 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96L0 64C0 46.3 14.3 32 32 32zm0 128l448 0 0 256c0 35.3-28.7 64-64 64L96 480c-35.3 0-64-28.7-64-64l0-256zm128 80c0 8.8 7.2 16 16 16l160 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-160 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faArchive = faBoxArchive;\nconst faPersonDrowning = {\n  prefix: 'fas',\n  iconName: 'person-drowning',\n  icon: [576, 512, [], \"e545\", \"M192 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32.2c0 54.1 23.5 104 62.2 138.3l-21 146.7c7.8 2.1 15.5 3.3 22.8 3.3c21.1 0 42-8.5 59.2-20.3c22.1-15.5 51.6-15.5 73.7 0c12.4 8.5 26.1 14.8 39.7 18l17.7-97.6c10.7-1.2 21.3-3.1 31.9-5.5l105-23.9c17.2-3.9 28-21.1 24.1-38.3s-21.1-28-38.3-24.1L400 216.6c-41 9.3-83.7 7.5-123.7-5.2c-50.2-16-84.3-62.6-84.3-115.3L192 64zM320 192a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM306.5 389.9c-11.1-7.9-25.9-7.9-37 0C247 405.4 219.5 416 192 416c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C126.5 469.7 159 480 192 480c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.4-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 405.2 410.9 416 384 416c-27.5 0-55-10.6-77.5-26.1z\"]\n};\nconst faArrowDown91 = {\n  prefix: 'fas',\n  iconName: 'arrow-down-9-1',\n  icon: [576, 512, [\"sort-numeric-desc\", \"sort-numeric-down-alt\"], \"f886\", \"M160 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L192 365.7 192 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 301.7L95.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C142.5 476.2 151 480 160 480zM450.7 294c-8.3-6-19.1-7.7-28.8-4.4l-48 16c-16.8 5.6-25.8 23.7-20.2 40.5s23.7 25.8 40.5 20.2l5.9-2 0 51.6-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l48 0 48 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-96c0-10.3-4.9-19.9-13.3-26zM418.3 91a32 32 0 1 1 27.4 57.9A32 32 0 1 1 418.3 91zM405.1 203.8l-6.8 9.2c-10.5 14.2-7.5 34.2 6.7 44.8s34.2 7.5 44.8-6.7l48.8-65.8c14-18.9 21.5-41.7 21.5-65.2c0-48.6-39.4-88-88-88s-88 39.4-88 88c0 39.2 25.6 72.4 61.1 83.8z\"]\n};\nconst faSortNumericDesc = faArrowDown91;\nconst faSortNumericDownAlt = faArrowDown91;\nconst faFaceGrinTongueSquint = {\n  prefix: 'fas',\n  iconName: 'face-grin-tongue-squint',\n  icon: [512, 512, [128541, \"grin-tongue-squint\"], \"f58a\", \"M0 256C0 368.9 73.1 464.7 174.5 498.8C165.3 484 160 466.6 160 448l0-47.3c-24-17.5-43.1-41.4-54.8-69.2c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19c12.3-3.8 24.3 6.9 19.3 18.7c-11.8 28-31.1 52-55.4 69.6l0 46.9c0 18.6-5.3 36-14.5 50.8C438.9 464.7 512 368.9 512 256C512 114.6 397.4 0 256 0S0 114.6 0 256zM116 141.1c0-9 9.6-14.7 17.5-10.5l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6zm262.5-10.5c7.9-4.2 17.5 1.5 17.5 10.5c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9zM320 448l0-45.4c0-14.7-11.9-26.6-26.6-26.6l-2 0c-11.3 0-21.1 7.9-23.6 18.9c-2.8 12.6-20.8 12.6-23.6 0c-2.5-11.1-12.3-18.9-23.6-18.9l-2 0c-14.7 0-26.6 11.9-26.6 26.6l0 45.4c0 35.3 28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faGrinTongueSquint = faFaceGrinTongueSquint;\nconst faSprayCan = {\n  prefix: 'fas',\n  iconName: 'spray-can',\n  icon: [512, 512, [], \"f5bd\", \"M128 0l64 0c17.7 0 32 14.3 32 32l0 96L96 128l0-96c0-17.7 14.3-32 32-32zM0 256c0-53 43-96 96-96l128 0c53 0 96 43 96 96l0 208c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 256zm240 80A80 80 0 1 0 80 336a80 80 0 1 0 160 0zM256 64a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM384 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm64 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM448 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM384 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faTruckMonster = {\n  prefix: 'fas',\n  iconName: 'truck-monster',\n  icon: [640, 512, [], \"f63b\", \"M288 64l0 64 128 0L368 64l-80 0zM419.2 25.6L496 128l80 0c17.7 0 32 14.3 32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32c-29.2-38.9-75.7-64-128-64s-98.8 25.1-128 64l-64 0c-29.2-38.9-75.7-64-128-64s-98.8 25.1-128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-64c0-17.7 14.3-32 32-32l160 0 0-80c0-26.5 21.5-48 48-48l96 0c20.1 0 39.1 9.5 51.2 25.6zM152 256l16 0c12.1 0 22.1 8.9 23.8 20.6c7.6 2.2 14.9 5.3 21.7 9c9.4-7 22.8-6.3 31.3 2.3l11.3 11.3c8.6 8.6 9.3 21.9 2.3 31.3c3.7 6.8 6.8 14.1 9 21.7c11.6 1.7 20.6 11.7 20.6 23.8l0 16c0 12.1-8.9 22.1-20.6 23.8c-2.2 7.6-5.3 14.9-9 21.7c7 9.4 6.3 22.8-2.3 31.3l-11.3 11.3c-8.6 8.6-21.9 9.3-31.3 2.2c-6.8 3.7-14.1 6.8-21.7 9C190.1 503.1 180.1 512 168 512l-16 0c-12.1 0-22.1-8.9-23.8-20.6c-7.6-2.2-14.9-5.3-21.7-9c-9.4 7.1-22.8 6.3-31.3-2.2L63.8 468.9c-8.6-8.6-9.3-21.9-2.3-31.3c-3.7-6.9-6.8-14.1-9-21.8C40.9 414.1 32 404.1 32 392l0-16c0-12.1 8.9-22.1 20.6-23.8c2.2-7.6 5.3-14.9 9-21.8c-7-9.4-6.3-22.8 2.3-31.3l11.3-11.3c8.6-8.6 21.9-9.3 31.3-2.3c6.8-3.7 14.1-6.8 21.7-9c1.7-11.6 11.7-20.6 23.8-20.6zm8 176a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM448.2 276.6c1.7-11.6 11.7-20.6 23.8-20.6l16 0c12.1 0 22.1 8.9 23.8 20.6c7.6 2.2 14.9 5.3 21.8 9c9.4-7 22.8-6.3 31.3 2.3l11.3 11.3c8.6 8.6 9.3 21.9 2.2 31.3c3.7 6.8 6.8 14.1 9 21.7c11.6 1.7 20.6 11.7 20.6 23.8l0 16c0 12.1-8.9 22.1-20.6 23.8c-2.2 7.6-5.3 14.9-9 21.7c7 9.4 6.3 22.8-2.2 31.3l-11.3 11.3c-8.6 8.6-21.9 9.3-31.3 2.2c-6.9 3.7-14.1 6.8-21.8 9C510.1 503.1 500.1 512 488 512l-16 0c-12.1 0-22.1-8.9-23.8-20.6c-7.6-2.2-14.9-5.3-21.7-9c-9.4 7.1-22.8 6.3-31.3-2.2l-11.3-11.3c-8.6-8.6-9.3-21.9-2.2-31.3c-3.7-6.9-6.8-14.1-9-21.8C360.9 414.1 352 404.1 352 392l0-16c0-12.1 8.9-22.1 20.6-23.8c2.2-7.6 5.3-14.9 9-21.8c-7-9.4-6.3-22.8 2.2-31.3l11.3-11.3c8.6-8.6 21.9-9.3 31.3-2.3c6.8-3.7 14.1-6.8 21.7-9zM528 384a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"]\n};\nconst faW = {\n  prefix: 'fas',\n  iconName: 'w',\n  icon: [576, 512, [119], \"57\", \"M20.8 34c16.5-6.2 35 2.2 41.2 18.7l110.2 294L257.3 55c4-13.7 16.5-23 30.7-23s26.7 9.4 30.7 23l85.1 291.7L514 52.8c6.2-16.5 24.6-24.9 41.2-18.7s24.9 24.7 18.7 41.2l-144 384c-4.8 12.9-17.4 21.3-31.2 20.7s-25.7-9.8-29.5-23L288 178.3 206.7 457c-3.9 13.2-15.8 22.5-29.5 23s-26.3-7.8-31.2-20.7L2 75.2C-4.2 58.7 4.2 40.2 20.8 34z\"]\n};\nconst faEarthAfrica = {\n  prefix: 'fas',\n  iconName: 'earth-africa',\n  icon: [512, 512, [127757, \"globe-africa\"], \"f57c\", \"M177.8 63.2l10 17.4c2.8 4.8 4.2 10.3 4.2 15.9l0 41.4c0 3.9 1.6 7.7 4.3 10.4c6.2 6.2 16.5 5.7 22-1.2l13.6-17c4.7-5.9 12.9-7.7 19.6-4.3l15.2 7.6c3.4 1.7 7.2 2.6 11 2.6c6.5 0 12.8-2.6 17.4-7.2l3.9-3.9c2.9-2.9 7.3-3.6 11-1.8l29.2 14.6c7.8 3.9 12.6 11.8 12.6 20.5c0 10.5-7.1 19.6-17.3 22.2l-35.4 8.8c-7.4 1.8-15.1 1.5-22.4-.9l-32-10.7c-3.3-1.1-6.7-1.7-10.2-1.7c-7 0-13.8 2.3-19.4 6.5L176 212c-10.1 7.6-16 19.4-16 32l0 28c0 26.5 21.5 48 48 48l32 0c8.8 0 16 7.2 16 16l0 48c0 17.7 14.3 32 32 32c10.1 0 19.6-4.7 25.6-12.8l25.6-34.1c8.3-11.1 12.8-24.6 12.8-38.4l0-12.1c0-3.9 2.6-7.3 6.4-8.2l5.3-1.3c11.9-3 20.3-13.7 20.3-26c0-7.1-2.8-13.9-7.8-18.9l-33.5-33.5c-3.7-3.7-3.7-9.7 0-13.4c5.7-5.7 14.1-7.7 21.8-5.1l14.1 4.7c12.3 4.1 25.7-1.5 31.5-13c3.5-7 11.2-10.8 18.9-9.2l27.4 5.5C432 112.4 351.5 48 256 48c-27.7 0-54 5.4-78.2 15.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z\"]\n};\nconst faGlobeAfrica = faEarthAfrica;\nconst faRainbow = {\n  prefix: 'fas',\n  iconName: 'rainbow',\n  icon: [640, 512, [127752], \"f75b\", \"M320 96C178.6 96 64 210.6 64 352l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96C0 175.3 143.3 32 320 32s320 143.3 320 320l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96C576 210.6 461.4 96 320 96zm0 192c-35.3 0-64 28.7-64 64l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-70.7 57.3-128 128-128s128 57.3 128 128l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-35.3-28.7-64-64-64zM160 352l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-123.7 100.3-224 224-224s224 100.3 224 224l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-88.4-71.6-160-160-160s-160 71.6-160 160z\"]\n};\nconst faCircleNotch = {\n  prefix: 'fas',\n  iconName: 'circle-notch',\n  icon: [512, 512, [], \"f1ce\", \"M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z\"]\n};\nconst faTabletScreenButton = {\n  prefix: 'fas',\n  iconName: 'tablet-screen-button',\n  icon: [448, 512, [\"tablet-alt\"], \"f3fa\", \"M0 64C0 28.7 28.7 0 64 0L384 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM256 448a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM384 64L64 64l0 320 320 0 0-320z\"]\n};\nconst faTabletAlt = faTabletScreenButton;\nconst faPaw = {\n  prefix: 'fas',\n  iconName: 'paw',\n  icon: [512, 512, [], \"f1b0\", \"M226.5 92.9c14.3 42.9-.3 86.2-32.6 96.8s-70.1-15.6-84.4-58.5s.3-86.2 32.6-96.8s70.1 15.6 84.4 58.5zM100.4 198.6c18.9 32.4 14.3 70.1-10.2 84.1s-59.7-.9-78.5-33.3S-2.7 179.3 21.8 165.3s59.7 .9 78.5 33.3zM69.2 401.2C121.6 259.9 214.7 224 256 224s134.4 35.9 186.8 177.2c3.6 9.7 5.2 20.1 5.2 30.5l0 1.6c0 25.8-20.9 46.7-46.7 46.7c-11.5 0-22.9-1.4-34-4.2l-88-22c-15.3-3.8-31.3-3.8-46.6 0l-88 22c-11.1 2.8-22.5 4.2-34 4.2C84.9 480 64 459.1 64 433.3l0-1.6c0-10.4 1.6-20.8 5.2-30.5zM421.8 282.7c-24.5-14-29.1-51.7-10.2-84.1s54-47.3 78.5-33.3s29.1 51.7 10.2 84.1s-54 47.3-78.5 33.3zM310.1 189.7c-32.3-10.6-46.9-53.9-32.6-96.8s52.1-69.1 84.4-58.5s46.9 53.9 32.6 96.8s-52.1 69.1-84.4 58.5z\"]\n};\nconst faCloud = {\n  prefix: 'fas',\n  iconName: 'cloud',\n  icon: [640, 512, [9729], \"f0c2\", \"M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z\"]\n};\nconst faTrowelBricks = {\n  prefix: 'fas',\n  iconName: 'trowel-bricks',\n  icon: [512, 512, [], \"e58a\", \"M240.8 4.8C250.3 10.6 256 20.9 256 32l0 72 89 0c3.6-13.8 16.1-24 31-24l88 0c26.5 0 48 21.5 48 48s-21.5 48-48 48l-88 0c-14.9 0-27.4-10.2-31-24l-89 0 0 72c0 11.1-5.7 21.4-15.2 27.2s-21.2 6.4-31.1 1.4l-192-96C6.8 151.2 0 140.1 0 128s6.8-23.2 17.7-28.6l192-96c9.9-5 21.7-4.4 31.1 1.4zM288 256c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-64zM32 384l96 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32zm192 0l256 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32z\"]\n};\nconst faFaceFlushed = {\n  prefix: 'fas',\n  iconName: 'face-flushed',\n  icon: [512, 512, [128563, \"flushed\"], \"f579\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM176 384c0 8.8 7.2 16 16 16l128 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-128 0c-8.8 0-16 7.2-16 16zm-16-88a72 72 0 1 0 0-144 72 72 0 1 0 0 144zm264-72a72 72 0 1 0 -144 0 72 72 0 1 0 144 0zm-288 0a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm192 0a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faFlushed = faFaceFlushed;\nconst faHospitalUser = {\n  prefix: 'fas',\n  iconName: 'hospital-user',\n  icon: [576, 512, [], \"f80d\", \"M48 0C21.5 0 0 21.5 0 48L0 256l144 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L0 288l0 64 144 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L0 384l0 80c0 26.5 21.5 48 48 48l217.9 0c-6.3-10.2-9.9-22.2-9.9-35.1c0-46.9 25.8-87.8 64-109.2l0-95.9L320 48c0-26.5-21.5-48-48-48L48 0zM152 64l16 0c8.8 0 16 7.2 16 16l0 24 24 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-24 0 0 24c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-24-24 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16l24 0 0-24c0-8.8 7.2-16 16-16zM512 272a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM288 477.1c0 19.3 15.6 34.9 34.9 34.9l218.2 0c19.3 0 34.9-15.6 34.9-34.9c0-51.4-41.7-93.1-93.1-93.1l-101.8 0c-51.4 0-93.1 41.7-93.1 93.1z\"]\n};\nconst faTentArrowLeftRight = {\n  prefix: 'fas',\n  iconName: 'tent-arrow-left-right',\n  icon: [576, 512, [], \"e57f\", \"M488.1 6.2c-9.9-8.9-25-8.1-33.9 1.8s-8.1 25 1.8 33.9L489.5 72 86.5 72l33.5-30.2c9.9-8.9 10.7-24 1.8-33.9S97.8-2.7 87.9 6.2l-80 72C2.9 82.7 0 89.2 0 96s2.9 13.3 7.9 17.8l80 72c9.9 8.9 25 8.1 33.9-1.8s8.1-25-1.8-33.9L86.5 120l402.9 0-33.5 30.2c-9.9 8.9-10.7 24-1.8 33.9s24 10.7 33.9 1.8l80-72c5.1-4.6 7.9-11 7.9-17.8s-2.9-13.3-7.9-17.8l-80-72zM307.4 166.5c-11.5-8.7-27.3-8.7-38.8 0l-168 128c-6.6 5-11 12.5-12.3 20.7l-24 160c-1.4 9.2 1.3 18.6 7.4 25.6S86.7 512 96 512l144 0 16 0c17.7 0 32-14.3 32-32l0-118.1c0-5.5 4.4-9.9 9.9-9.9c3.7 0 7.2 2.1 8.8 5.5l68.4 136.8c5.4 10.8 16.5 17.7 28.6 17.7l60.2 0 16 0c9.3 0 18.2-4.1 24.2-11.1s8.8-16.4 7.4-25.6l-24-160c-1.2-8.2-5.6-15.7-12.3-20.7l-168-128z\"]\n};\nconst faGavel = {\n  prefix: 'fas',\n  iconName: 'gavel',\n  icon: [512, 512, [\"legal\"], \"f0e3\", \"M318.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-120 120c-12.5 12.5-12.5 32.8 0 45.3l16 16c12.5 12.5 32.8 12.5 45.3 0l4-4L325.4 293.4l-4 4c-12.5 12.5-12.5 32.8 0 45.3l16 16c12.5 12.5 32.8 12.5 45.3 0l120-120c12.5-12.5 12.5-32.8 0-45.3l-16-16c-12.5-12.5-32.8-12.5-45.3 0l-4 4L330.6 74.6l4-4c12.5-12.5 12.5-32.8 0-45.3l-16-16zm-152 288c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l48 48c12.5 12.5 32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-1.4-1.4L272 285.3 226.7 240 168 298.7l-1.4-1.4z\"]\n};\nconst faLegal = faGavel;\nconst faBinoculars = {\n  prefix: 'fas',\n  iconName: 'binoculars',\n  icon: [512, 512, [], \"f1e5\", \"M128 32l32 0c17.7 0 32 14.3 32 32l0 32L96 96l0-32c0-17.7 14.3-32 32-32zm64 96l0 320c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32l0-59.1c0-34.6 9.4-68.6 27.2-98.3C40.9 267.8 49.7 242.4 53 216L60.5 156c2-16 15.6-28 31.8-28l99.8 0zm227.8 0c16.1 0 29.8 12 31.8 28L459 216c3.3 26.4 12.1 51.8 25.8 74.6c17.8 29.7 27.2 63.7 27.2 98.3l0 59.1c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-320 99.8 0zM320 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 32-96 0 0-32zm-32 64l0 160-64 0 0-160 64 0z\"]\n};\nconst faMicrophoneSlash = {\n  prefix: 'fas',\n  iconName: 'microphone-slash',\n  icon: [640, 512, [], \"f131\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L472.1 344.7c15.2-26 23.9-56.3 23.9-88.7l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 21.2-5.1 41.1-14.2 58.7L416 300.8 416 96c0-53-43-96-96-96s-96 43-96 96l0 54.3L38.8 5.1zM344 430.4c20.4-2.8 39.7-9.1 57.3-18.2l-43.1-33.9C346.1 382 333.3 384 320 384c-70.7 0-128-57.3-128-128l0-8.7L144.7 210c-.5 1.9-.7 3.9-.7 6l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6z\"]\n};\nconst faBoxTissue = {\n  prefix: 'fas',\n  iconName: 'box-tissue',\n  icon: [512, 512, [], \"e05b\", \"M92.5 0L208 0c40 0 52 24 64 48s24 48 64 48l85.2 0C436 96 448 108 448 122.8c0 3.4-.7 6.8-1.9 10L409.6 224 384 288l-256 0-16-64L64.9 35.4c-.6-2.3-.9-4.6-.9-6.9C64 12.8 76.8 0 92.5 0zM79 224l16 64-15 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 256 0 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-13.5 0 25.6-64 19.9 0c26.5 0 48 21.5 48 48l0 112L0 384 0 272c0-26.5 21.5-48 48-48l31 0zM0 416l512 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48l0-48z\"]\n};\nconst faMotorcycle = {\n  prefix: 'fas',\n  iconName: 'motorcycle',\n  icon: [640, 512, [127949], \"f21c\", \"M280 32c-13.3 0-24 10.7-24 24s10.7 24 24 24l57.7 0 16.4 30.3L256 192l-45.3-45.3c-12-12-28.3-18.7-45.3-18.7L64 128c-17.7 0-32 14.3-32 32l0 32 96 0c88.4 0 160 71.6 160 160c0 11-1.1 21.7-3.2 32l70.4 0c-2.1-10.3-3.2-21-3.2-32c0-52.2 25-98.6 63.7-127.8l15.4 28.6C402.4 276.3 384 312 384 352c0 70.7 57.3 128 128 128s128-57.3 128-128s-57.3-128-128-128c-13.5 0-26.5 2.1-38.7 6L418.2 128l61.8 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-20.4 0c-7.5 0-14.7 2.6-20.5 7.4L391.7 78.9l-14-26c-7-12.9-20.5-21-35.2-21L280 32zM462.7 311.2l28.2 52.2c6.3 11.7 20.9 16 32.5 9.7s16-20.9 9.7-32.5l-28.2-52.2c2.3-.3 4.7-.4 7.1-.4c35.3 0 64 28.7 64 64s-28.7 64-64 64s-64-28.7-64-64c0-15.5 5.5-29.7 14.7-40.8zM187.3 376c-9.5 23.5-32.5 40-59.3 40c-35.3 0-64-28.7-64-64s28.7-64 64-64c26.9 0 49.9 16.5 59.3 40l66.4 0C242.5 268.8 190.5 224 128 224C57.3 224 0 281.3 0 352s57.3 128 128 128c62.5 0 114.5-44.8 125.8-104l-66.4 0zM128 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faBellConcierge = {\n  prefix: 'fas',\n  iconName: 'bell-concierge',\n  icon: [512, 512, [128718, \"concierge-bell\"], \"f562\", \"M216 64c-13.3 0-24 10.7-24 24s10.7 24 24 24l16 0 0 33.3C119.6 157.2 32 252.4 32 368l448 0c0-115.6-87.6-210.8-200-222.7l0-33.3 16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0-40 0zM24 400c-13.3 0-24 10.7-24 24s10.7 24 24 24l464 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 400z\"]\n};\nconst faConciergeBell = faBellConcierge;\nconst faPenRuler = {\n  prefix: 'fas',\n  iconName: 'pen-ruler',\n  icon: [512, 512, [\"pencil-ruler\"], \"f5ae\", \"M469.3 19.3l23.4 23.4c25 25 25 65.5 0 90.5l-56.4 56.4L322.3 75.7l56.4-56.4c25-25 65.5-25 90.5 0zM44.9 353.2L299.7 98.3 413.7 212.3 158.8 467.1c-6.7 6.7-15.1 11.6-24.2 14.2l-104 29.7c-8.4 2.4-17.4 .1-23.6-6.1s-8.5-15.2-6.1-23.6l29.7-104c2.6-9.2 7.5-17.5 14.2-24.2zM249.4 103.4L103.4 249.4 16 161.9c-18.7-18.7-18.7-49.1 0-67.9L94.1 16c18.7-18.7 49.1-18.7 67.9 0l19.8 19.8c-.3 .3-.7 .6-1 .9l-64 64c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l64-64c.3-.3 .6-.7 .9-1l45.1 45.1zM408.6 262.6l45.1 45.1c-.3 .3-.7 .6-1 .9l-64 64c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l64-64c.3-.3 .6-.7 .9-1L496 350.1c18.7 18.7 18.7 49.1 0 67.9L417.9 496c-18.7 18.7-49.1 18.7-67.9 0l-87.4-87.4L408.6 262.6z\"]\n};\nconst faPencilRuler = faPenRuler;\nconst faPeopleArrows = {\n  prefix: 'fas',\n  iconName: 'people-arrows',\n  icon: [640, 512, [\"people-arrows-left-right\"], \"e068\", \"M64 64a64 64 0 1 1 128 0A64 64 0 1 1 64 64zM25.9 233.4C29.3 191.9 64 160 105.6 160l44.8 0c27 0 51 13.4 65.5 34.1c-2.7 1.9-5.2 4-7.5 6.3l-64 64c-21.9 21.9-21.9 57.3 0 79.2L192 391.2l0 72.8c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-115.7c-26.5-9.5-44.7-35.8-42.2-65.6l4.1-49.3zM448 64a64 64 0 1 1 128 0A64 64 0 1 1 448 64zM431.6 200.4c-2.3-2.3-4.9-4.4-7.5-6.3c14.5-20.7 38.6-34.1 65.5-34.1l44.8 0c41.6 0 76.3 31.9 79.7 73.4l4.1 49.3c2.5 29.8-15.7 56.1-42.2 65.6L576 464c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-72.8 47.6-47.6c21.9-21.9 21.9-57.3 0-79.2l-64-64zM272 240l0 32 96 0 0-32c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l64 64c9.4 9.4 9.4 24.6 0 33.9l-64 64c-6.9 6.9-17.2 8.9-26.2 5.2s-14.8-12.5-14.8-22.2l0-32-96 0 0 32c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-64-64c-9.4-9.4-9.4-24.6 0-33.9l64-64c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2z\"]\n};\nconst faPeopleArrowsLeftRight = faPeopleArrows;\nconst faMarsAndVenusBurst = {\n  prefix: 'fas',\n  iconName: 'mars-and-venus-burst',\n  icon: [640, 512, [], \"e523\", \"M504 0c-9.7 0-18.5 5.8-22.2 14.8s-1.7 19.3 5.2 26.2l39 39-22.2 22.2C475.9 78.4 439.6 64 400 64c-88.4 0-160 71.6-160 160c0 80.2 59.1 146.7 136.1 158.2c0 .6-.1 1.2-.1 1.8l0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .4 0 .3 0 .4 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 0 .3 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7-24-24-24L504 0zM400 128a96 96 0 1 1 0 192 96 96 0 1 1 0-192zM190.9 18.1C188.4 12 182.6 8 176 8s-12.4 4-14.9 10.1l-29.4 74L55.6 68.9c-6.3-1.9-13.1 .2-17.2 5.3s-4.6 12.2-1.4 17.9l39.5 69.1L10.9 206.4c-5.4 3.7-8 10.3-6.5 16.7s6.7 11.2 13.1 12.2l78.7 12.2L90.6 327c-.5 6.5 3.1 12.7 9 15.5s12.9 1.8 17.8-2.6L176 286.1l58.6 53.9c4.1 3.8 9.9 5.1 15.2 3.6C223.6 310.8 208 269.2 208 224c0-60.8 28.3-115 72.4-150.2L220.3 92.1l-29.4-74z\"]\n};\nconst faSquareCaretRight = {\n  prefix: 'fas',\n  iconName: 'square-caret-right',\n  icon: [448, 512, [\"caret-square-right\"], \"f152\", \"M448 96c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320zM320 256c0 6.7-2.8 13-7.7 17.6l-112 104c-7 6.5-17.2 8.2-25.9 4.4s-14.4-12.5-14.4-22l0-208c0-9.5 5.7-18.2 14.4-22s18.9-2.1 25.9 4.4l112 104c4.9 4.5 7.7 10.9 7.7 17.6z\"]\n};\nconst faCaretSquareRight = faSquareCaretRight;\nconst faScissors = {\n  prefix: 'fas',\n  iconName: 'scissors',\n  icon: [512, 512, [9984, 9986, 9988, \"cut\"], \"f0c4\", \"M256 192l-39.5-39.5c4.9-12.6 7.5-26.2 7.5-40.5C224 50.1 173.9 0 112 0S0 50.1 0 112s50.1 112 112 112c14.3 0 27.9-2.7 40.5-7.5L192 256l-39.5 39.5c-12.6-4.9-26.2-7.5-40.5-7.5C50.1 288 0 338.1 0 400s50.1 112 112 112s112-50.1 112-112c0-14.3-2.7-27.9-7.5-40.5L499.2 76.8c7.1-7.1 7.1-18.5 0-25.6c-28.3-28.3-74.1-28.3-102.4 0L256 192zm22.6 150.6L396.8 460.8c28.3 28.3 74.1 28.3 102.4 0c7.1-7.1 7.1-18.5 0-25.6L342.6 278.6l-64 64zM64 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm48 240a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faCut = faScissors;\nconst faSunPlantWilt = {\n  prefix: 'fas',\n  iconName: 'sun-plant-wilt',\n  icon: [640, 512, [], \"e57a\", \"M160 0c-6.3 0-12 3.7-14.6 9.5L120.6 64.9 63.9 43.2c-5.9-2.3-12.6-.8-17 3.6s-5.9 11.1-3.6 17l21.7 56.7L9.5 145.4C3.7 148 0 153.7 0 160s3.7 12 9.5 14.6l55.4 24.8L43.2 256.1c-2.3 5.9-.8 12.6 3.6 17s11.1 5.9 17 3.6l56.7-21.7 24.8 55.4c2.6 5.8 8.3 9.5 14.6 9.5s12-3.7 14.6-9.5l24.8-55.4 56.7 21.7c5.9 2.3 12.6 .8 17-3.6s5.9-11.1 3.6-17l-21.7-56.7 55.4-24.8c5.8-2.6 9.5-8.3 9.5-14.6s-3.7-12-9.5-14.6l-55.4-24.8 21.7-56.7c2.3-5.9 .8-12.6-3.6-17s-11.1-5.9-17-3.6L199.4 64.9 174.6 9.5C172 3.7 166.3 0 160 0zm0 96a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm32 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm312 16c0-17.7 14.3-32 32-32s32 14.3 32 32l0 53.4c-14.8 7.7-24 23.1-24 44.6c0 16.8 16 44 37.4 67.2c5.8 6.2 15.5 6.2 21.2 0C624 318 640 290.7 640 274c0-21.5-9.2-37-24-44.6l0-53.4c0-44.2-35.8-80-80-80s-80 35.8-80 80l0 22.7c-9.8-4.3-20.6-6.7-32-6.7c-44.2 0-80 35.8-80 80l0 21.4c-14.8 7.7-24 23.1-24 44.6c0 16.8 16 44 37.4 67.2c5.8 6.2 15.5 6.2 21.2 0C400 382 416 354.7 416 338c0-21.5-9.2-37-24-44.6l0-21.4c0-17.7 14.3-32 32-32s32 14.3 32 32l0 8 0 168L32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-104 0 0-168 0-8 0-96z\"]\n};\nconst faToiletsPortable = {\n  prefix: 'fas',\n  iconName: 'toilets-portable',\n  icon: [576, 512, [], \"e584\", \"M32 0L224 0c17.7 0 32 14.3 32 32l0 32L0 64 0 32C0 14.3 14.3 0 32 0zM0 96l24 0 208 0 24 0 0 24 0 368c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-8L48 480l0 8c0 13.3-10.7 24-24 24s-24-10.7-24-24L0 120 0 96zM192 224c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8-7.2-16-16-16zM352 0L544 0c17.7 0 32 14.3 32 32l0 32L320 64l0-32c0-17.7 14.3-32 32-32zM320 96l24 0 208 0 24 0 0 24 0 368c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-8-160 0 0 8c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-368 0-24zM512 224c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8-7.2-16-16-16z\"]\n};\nconst faHockeyPuck = {\n  prefix: 'fas',\n  iconName: 'hockey-puck',\n  icon: [512, 512, [], \"f453\", \"M256 256C114.6 256 0 213 0 160s114.6-96 256-96s256 43 256 96s-114.6 96-256 96zm192.3 1.8c24.7-9.3 46.9-21 63.7-35.6L512 352c0 53-114.6 96-256 96S0 405 0 352L0 222.3c16.8 14.6 39 26.3 63.7 35.6C114.5 276.9 182.5 288 256 288s141.5-11.1 192.3-30.2z\"]\n};\nconst faTable = {\n  prefix: 'fas',\n  iconName: 'table',\n  icon: [512, 512, [], \"f0ce\", \"M64 256l0-96 160 0 0 96L64 256zm0 64l160 0 0 96L64 416l0-96zm224 96l0-96 160 0 0 96-160 0zM448 256l-160 0 0-96 160 0 0 96zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z\"]\n};\nconst faMagnifyingGlassArrowRight = {\n  prefix: 'fas',\n  iconName: 'magnifying-glass-arrow-right',\n  icon: [512, 512, [], \"e521\", \"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM241 119c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31L120 184c-13.3 0-24 10.7-24 24s10.7 24 24 24l118.1 0-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l72-72c9.4-9.4 9.4-24.6 0-33.9l-72-72z\"]\n};\nconst faTachographDigital = {\n  prefix: 'fas',\n  iconName: 'tachograph-digital',\n  icon: [640, 512, [\"digital-tachograph\"], \"f566\", \"M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zm32 64l224 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L96 256c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32zM64 368c0-8.8 7.2-16 16-16l256 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 384c-8.8 0-16-7.2-16-16zm320 0c0-8.8 7.2-16 16-16l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16zM80 288a16 16 0 1 1 0 32 16 16 0 1 1 0-32zm48 16a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zm80-16a16 16 0 1 1 0 32 16 16 0 1 1 0-32zm48 16a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zm80-16a16 16 0 1 1 0 32 16 16 0 1 1 0-32z\"]\n};\nconst faDigitalTachograph = faTachographDigital;\nconst faUsersSlash = {\n  prefix: 'fas',\n  iconName: 'users-slash',\n  icon: [640, 512, [], \"e073\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L440.6 320l178.1 0c11.8 0 21.3-9.6 21.3-21.3C640 239.8 592.2 192 533.3 192l-42.7 0c-15.9 0-31 3.5-44.6 9.7c1.3 7.2 1.9 14.7 1.9 22.3c0 30.2-10.5 58-28 79.9l-25.2-19.7C408.1 267.7 416 246.8 416 224c0-53-43-96-96-96c-31.1 0-58.7 14.8-76.3 37.7l-40.6-31.8c13-14.2 20.9-33.1 20.9-53.9c0-44.2-35.8-80-80-80C116.3 0 91.9 14.1 77.5 35.5L38.8 5.1zM106.7 192C47.8 192 0 239.8 0 298.7C0 310.4 9.6 320 21.3 320l213.3 0c.2 0 .4 0 .7 0c-20.6-18.2-35.2-42.8-40.8-70.8L121.8 192l-15.2 0zM261.3 352C187.7 352 128 411.7 128 485.3c0 14.7 11.9 26.7 26.7 26.7l330.7 0c10.5 0 19.5-6 23.9-14.8L324.9 352l-63.6 0zM512 160A80 80 0 1 0 512 0a80 80 0 1 0 0 160z\"]\n};\nconst faClover = {\n  prefix: 'fas',\n  iconName: 'clover',\n  icon: [448, 512, [], \"e139\", \"M216.6 49.9C205.1 38.5 189.5 32 173.3 32C139.4 32 112 59.4 112 93.3l0 4.9c0 12 3.3 23.7 9.4 34l18.8 31.3c1.1 1.8 1.2 3.1 1 4.2c-.2 1.2-.8 2.5-2 3.6s-2.4 1.8-3.6 2c-1 .2-2.4 .1-4.2-1l-31.3-18.8c-10.3-6.2-22-9.4-34-9.4l-4.9 0C27.4 144 0 171.4 0 205.3c0 16.2 6.5 31.8 17.9 43.3l1.2 1.2c3.4 3.4 3.4 9 0 12.4l-1.2 1.2C6.5 274.9 0 290.5 0 306.7C0 340.6 27.4 368 61.3 368l4.9 0c12 0 23.7-3.3 34-9.4l31.3-18.8c1.8-1.1 3.1-1.2 4.2-1c1.2 .2 2.5 .8 3.6 2s1.8 2.4 2 3.6c.2 1 .1 2.4-1 4.2l-18.8 31.3c-6.2 10.3-9.4 22-9.4 34l0 4.9c0 33.8 27.4 61.3 61.3 61.3c16.2 0 31.8-6.5 43.3-17.9l1.2-1.2c3.4-3.4 9-3.4 12.4 0l1.2 1.2c11.5 11.5 27.1 17.9 43.3 17.9c33.8 0 61.3-27.4 61.3-61.3l0-4.9c0-12-3.3-23.7-9.4-34l-18.8-31.3c-1.1-1.8-1.2-3.1-1-4.2c.2-1.2 .8-2.5 2-3.6s2.4-1.8 3.6-2c1-.2 2.4-.1 4.2 1l31.3 18.8c10.3 6.2 22 9.4 34 9.4l4.9 0c33.8 0 61.3-27.4 61.3-61.3c0-16.2-6.5-31.8-17.9-43.3l-1.2-1.2c-3.4-3.4-3.4-9 0-12.4l1.2-1.2c11.5-11.5 17.9-27.1 17.9-43.3c0-33.8-27.4-61.3-61.3-61.3l-4.9 0c-12 0-23.7 3.3-34 9.4l-31.3 18.8c-1.8 1.1-3.1 1.2-4.2 1c-1.2-.2-2.5-.8-3.6-2s-1.8-2.4-2-3.6c-.2-1-.1-2.4 1-4.2l18.8-31.3c6.2-10.3 9.4-22 9.4-34l0-4.9C336 59.4 308.6 32 274.7 32c-16.2 0-31.8 6.5-43.3 17.9l-1.2 1.2c-3.4 3.4-9 3.4-12.4 0l-1.2-1.2z\"]\n};\nconst faReply = {\n  prefix: 'fas',\n  iconName: 'reply',\n  icon: [512, 512, [61714, \"mail-reply\"], \"f3e5\", \"M205 34.8c11.5 5.1 19 16.6 19 29.2l0 64 112 0c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96l-96 0 0 64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z\"]\n};\nconst faMailReply = faReply;\nconst faStarAndCrescent = {\n  prefix: 'fas',\n  iconName: 'star-and-crescent',\n  icon: [512, 512, [9770], \"f699\", \"M0 256C0 114.6 114.6 0 256 0c33 0 64.6 6.3 93.6 17.7c7.4 2.9 11.5 10.7 9.8 18.4s-8.8 13-16.7 12.4c-4.8-.3-9.7-.5-14.6-.5c-114.9 0-208 93.1-208 208s93.1 208 208 208c4.9 0 9.8-.2 14.6-.5c7.9-.5 15 4.7 16.7 12.4s-2.4 15.5-9.8 18.4C320.6 505.7 289 512 256 512C114.6 512 0 397.4 0 256zM375.4 137.4c3.5-7.1 13.7-7.1 17.2 0l31.5 63.8c1.4 2.8 4.1 4.8 7.2 5.3l70.4 10.2c7.9 1.1 11 10.8 5.3 16.4l-50.9 49.6c-2.3 2.2-3.3 5.4-2.8 8.5l12 70.1c1.3 7.8-6.9 13.8-13.9 10.1l-63-33.1c-2.8-1.5-6.1-1.5-8.9 0l-63 33.1c-7 3.7-15.3-2.3-13.9-10.1l12-70.1c.5-3.1-.5-6.3-2.8-8.5L261 233.1c-5.7-5.6-2.6-15.2 5.3-16.4l70.4-10.2c3.1-.5 5.8-2.4 7.2-5.3l31.5-63.8z\"]\n};\nconst faHouseFire = {\n  prefix: 'fas',\n  iconName: 'house-fire',\n  icon: [640, 512, [], \"e50c\", \"M288 350.1l0 1.9-32 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L447.3 128.1c-12.3-1-25 3-34.8 11.7c-35.4 31.6-65.6 67.7-87.3 102.8C304.3 276.5 288 314.9 288 350.1zM480 512c-88.4 0-160-71.6-160-160c0-76.7 62.5-144.7 107.2-179.4c5-3.9 10.9-5.8 16.8-5.8c7.9-.1 16 3.1 22 9.2l46 46 11.3-11.3c11.7-11.7 30.6-12.7 42.3-1C624.5 268 640 320.2 640 352c0 88.4-71.6 160-160 160zm64-111.8c0-36.5-37-73-54.8-88.4c-5.4-4.7-13.1-4.7-18.5 0C453 327.1 416 363.6 416 400.2c0 35.3 28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faSquareMinus = {\n  prefix: 'fas',\n  iconName: 'square-minus',\n  icon: [448, 512, [61767, \"minus-square\"], \"f146\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm88 200l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faMinusSquare = faSquareMinus;\nconst faHelicopter = {\n  prefix: 'fas',\n  iconName: 'helicopter',\n  icon: [640, 512, [128641], \"f533\", \"M128 32c0-17.7 14.3-32 32-32L544 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L384 64l0 64 32 0c88.4 0 160 71.6 160 160l0 64c0 17.7-14.3 32-32 32l-160 0-64 0c-20.1 0-39.1-9.5-51.2-25.6l-71.4-95.2c-3.5-4.7-8.3-8.3-13.7-10.5L47.2 198.1c-9.5-3.8-16.7-12-19.2-22L5 83.9C2.4 73.8 10.1 64 20.5 64L48 64c10.1 0 19.6 4.7 25.6 12.8L112 128l208 0 0-64L160 64c-17.7 0-32-14.3-32-32zM384 320l128 0 0-32c0-53-43-96-96-96l-32 0 0 128zM630.6 425.4c12.5 12.5 12.5 32.8 0 45.3l-3.9 3.9c-24 24-56.6 37.5-90.5 37.5L256 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l280.2 0c17 0 33.3-6.7 45.3-18.7l3.9-3.9c12.5-12.5 32.8-12.5 45.3 0z\"]\n};\nconst faCompass = {\n  prefix: 'fas',\n  iconName: 'compass',\n  icon: [512, 512, [129517], \"f14e\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faSquareCaretDown = {\n  prefix: 'fas',\n  iconName: 'square-caret-down',\n  icon: [448, 512, [\"caret-square-down\"], \"f150\", \"M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z\"]\n};\nconst faCaretSquareDown = faSquareCaretDown;\nconst faFileCircleQuestion = {\n  prefix: 'fas',\n  iconName: 'file-circle-question',\n  icon: [576, 512, [], \"e4ef\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zm48 96a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 240a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM368 321.6l0 6.4c0 8.8 7.2 16 16 16s16-7.2 16-16l0-6.4c0-5.3 4.3-9.6 9.6-9.6l40.5 0c7.7 0 13.9 6.2 13.9 13.9c0 5.2-2.9 9.9-7.4 12.3l-32 16.8c-5.3 2.8-8.6 8.2-8.6 14.2l0 14.8c0 8.8 7.2 16 16 16s16-7.2 16-16l0-5.1 23.5-12.3c15.1-7.9 24.5-23.6 24.5-40.6c0-25.4-20.6-45.9-45.9-45.9l-40.5 0c-23 0-41.6 18.6-41.6 41.6z\"]\n};\nconst faLaptopCode = {\n  prefix: 'fas',\n  iconName: 'laptop-code',\n  icon: [640, 512, [], \"f5fc\", \"M64 96c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 256-64 0 0-256L128 96l0 256-64 0L64 96zM0 403.2C0 392.6 8.6 384 19.2 384l601.6 0c10.6 0 19.2 8.6 19.2 19.2c0 42.4-34.4 76.8-76.8 76.8L76.8 480C34.4 480 0 445.6 0 403.2zM281 209l-31 31 31 31c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-48-48c-9.4-9.4-9.4-24.6 0-33.9l48-48c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM393 175l48 48c9.4 9.4 9.4 24.6 0 33.9l-48 48c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l31-31-31-31c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z\"]\n};\nconst faSwatchbook = {\n  prefix: 'fas',\n  iconName: 'swatchbook',\n  icon: [512, 512, [], \"f5c3\", \"M0 32C0 14.3 14.3 0 32 0L160 0c17.7 0 32 14.3 32 32l0 384c0 53-43 96-96 96s-96-43-96-96L0 32zM223.6 425.9c.3-3.3 .4-6.6 .4-9.9l0-262 75.4-75.4c12.5-12.5 32.8-12.5 45.3 0l90.5 90.5c12.5 12.5 12.5 32.8 0 45.3L223.6 425.9zM182.8 512l192-192L480 320c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-297.2 0zM128 64L64 64l0 64 64 0 0-64zM64 192l0 64 64 0 0-64-64 0zM96 440a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faPrescriptionBottle = {\n  prefix: 'fas',\n  iconName: 'prescription-bottle',\n  icon: [384, 512, [], \"f485\", \"M0 32C0 14.3 14.3 0 32 0L352 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64L0 32zm32 96l320 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-32 112 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L32 384l0-64 112 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L32 288l0-64 112 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L32 192l0-64z\"]\n};\nconst faBars = {\n  prefix: 'fas',\n  iconName: 'bars',\n  icon: [448, 512, [\"navicon\"], \"f0c9\", \"M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z\"]\n};\nconst faNavicon = faBars;\nconst faPeopleGroup = {\n  prefix: 'fas',\n  iconName: 'people-group',\n  icon: [640, 512, [], \"e533\", \"M72 88a56 56 0 1 1 112 0A56 56 0 1 1 72 88zM64 245.7C54 256.9 48 271.8 48 288s6 31.1 16 42.3l0-84.7zm144.4-49.3C178.7 222.7 160 261.2 160 304c0 34.3 12 65.8 32 90.5l0 21.5c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-26.8C26.2 371.2 0 332.7 0 288c0-61.9 50.1-112 112-112l32 0c24 0 46.2 7.5 64.4 20.3zM448 416l0-21.5c20-24.7 32-56.2 32-90.5c0-42.8-18.7-81.3-48.4-107.7C449.8 183.5 472 176 496 176l32 0c61.9 0 112 50.1 112 112c0 44.7-26.2 83.2-64 101.2l0 26.8c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32zm8-328a56 56 0 1 1 112 0A56 56 0 1 1 456 88zM576 245.7l0 84.7c10-11.3 16-26.1 16-42.3s-6-31.1-16-42.3zM320 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM240 304c0 16.2 6 31 16 42.3l0-84.7c-10 11.3-16 26.1-16 42.3zm144-42.3l0 84.7c10-11.3 16-26.1 16-42.3s-6-31.1-16-42.3zM448 304c0 44.7-26.2 83.2-64 101.2l0 42.8c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-42.8c-37.8-18-64-56.5-64-101.2c0-61.9 50.1-112 112-112l32 0c61.9 0 112 50.1 112 112z\"]\n};\nconst faHourglassEnd = {\n  prefix: 'fas',\n  iconName: 'hourglass-end',\n  icon: [384, 512, [8987, \"hourglass-3\"], \"f253\", \"M32 0C14.3 0 0 14.3 0 32S14.3 64 32 64l0 11c0 42.4 16.9 83.1 46.9 113.1L146.7 256 78.9 323.9C48.9 353.9 32 394.6 32 437l0 11c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 256 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-11c0-42.4-16.9-83.1-46.9-113.1L237.3 256l67.9-67.9c30-30 46.9-70.7 46.9-113.1l0-11c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 0 64 0 32 0zM96 75l0-11 192 0 0 11c0 25.5-10.1 49.9-28.1 67.9L192 210.7l-67.9-67.9C106.1 124.9 96 100.4 96 75z\"]\n};\nconst faHourglass3 = faHourglassEnd;\nconst faHeartCrack = {\n  prefix: 'fas',\n  iconName: 'heart-crack',\n  icon: [512, 512, [128148, \"heart-broken\"], \"f7a9\", \"M119.4 44.1c23.3-3.9 46.8-1.9 68.6 5.3l49.8 77.5-75.4 75.4c-1.5 1.5-2.4 3.6-2.3 5.8s1 4.2 2.6 5.7l112 104c2.9 2.7 7.4 2.9 10.5 .3s3.8-7 1.7-10.4l-60.4-98.1 90.7-75.6c2.6-2.1 3.5-5.7 2.4-8.8L296.8 61.8c28.5-16.7 62.4-23.2 95.7-17.6C461.5 55.6 512 115.2 512 185.1l0 5.8c0 41.5-17.2 81.2-47.6 109.5L283.7 469.1c-7.5 7-17.4 10.9-27.7 10.9s-20.2-3.9-27.7-10.9L47.6 300.4C17.2 272.1 0 232.4 0 190.9l0-5.8c0-69.9 50.5-129.5 119.4-141z\"]\n};\nconst faHeartBroken = faHeartCrack;\nconst faSquareUpRight = {\n  prefix: 'fas',\n  iconName: 'square-up-right',\n  icon: [448, 512, [8599, \"external-link-square-alt\"], \"f360\", \"M384 32c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0zM160 160c-6.5 0-12.3 3.9-14.8 9.9s-1.1 12.9 3.5 17.4l40 40-71 71C114 302 112 306.9 112 312s2 10 5.7 13.7l36.7 36.7c3.6 3.6 8.5 5.7 13.7 5.7s10-2 13.7-5.7l71-71 40 40c4.6 4.6 11.5 5.9 17.4 3.5s9.9-8.3 9.9-14.8l0-144c0-8.8-7.2-16-16-16l-144 0z\"]\n};\nconst faExternalLinkSquareAlt = faSquareUpRight;\nconst faFaceKissBeam = {\n  prefix: 'fas',\n  iconName: 'face-kiss-beam',\n  icon: [512, 512, [128537, \"kiss-beam\"], \"f597\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm48.7-198.3c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4c-2.7 1.5-5.7 3-8.7 4.3c3.1 1.3 6 2.7 8.7 4.3c6.6 3.7 12.5 8.2 16.7 13.4c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4C274.7 443.1 257.4 448 240 448c-3.6 0-6.8-2.5-7.7-6s.6-7.2 3.8-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c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0zm160 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faKissBeam = faFaceKissBeam;\nconst faFilm = {\n  prefix: 'fas',\n  iconName: 'film',\n  icon: [512, 512, [127902], \"f008\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM48 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 112l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16L64 96c-8.8 0-16 7.2-16 16zM416 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM160 128l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L192 96c-17.7 0-32 14.3-32 32zm32 160c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-128 0z\"]\n};\nconst faRulerHorizontal = {\n  prefix: 'fas',\n  iconName: 'ruler-horizontal',\n  icon: [640, 512, [], \"f547\", \"M0 336c0 26.5 21.5 48 48 48l544 0c26.5 0 48-21.5 48-48l0-160c0-26.5-21.5-48-48-48l-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0c-26.5 0-48 21.5-48 48L0 336z\"]\n};\nconst faPeopleRobbery = {\n  prefix: 'fas',\n  iconName: 'people-robbery',\n  icon: [576, 512, [], \"e536\", \"M488.2 59.1C478.1 99.6 441.7 128 400 128s-78.1-28.4-88.2-68.9L303 24.2C298.8 7.1 281.4-3.3 264.2 1S236.7 22.6 241 39.8l8.7 34.9c11 44 40.2 79.6 78.3 99.6L328 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-305.7c38.1-20 67.3-55.6 78.3-99.6L559 39.8c4.3-17.1-6.1-34.5-23.3-38.8S501.2 7.1 497 24.2l-8.7 34.9zM400 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM80 96A48 48 0 1 0 80 0a48 48 0 1 0 0 96zm-8 32c-35.3 0-64 28.7-64 64l0 96 0 .6L8 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-227.3 13 20.5c5.9 9.2 16.1 14.9 27 14.9l48 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-30.4 0-37.4-58.9C157.6 142 132.1 128 104.7 128L72 128z\"]\n};\nconst faLightbulb = {\n  prefix: 'fas',\n  iconName: 'lightbulb',\n  icon: [384, 512, [128161], \"f0eb\", \"M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z\"]\n};\nconst faCaretLeft = {\n  prefix: 'fas',\n  iconName: 'caret-left',\n  icon: [256, 512, [], \"f0d9\", \"M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z\"]\n};\nconst faCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'circle-exclamation',\n  icon: [512, 512, [\"exclamation-circle\"], \"f06a\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faExclamationCircle = faCircleExclamation;\nconst faSchoolCircleXmark = {\n  prefix: 'fas',\n  iconName: 'school-circle-xmark',\n  icon: [640, 512, [], \"e56d\", \"M337.8 5.4C327-1.8 313-1.8 302.2 5.4L166.3 96 48 96C21.5 96 0 117.5 0 144L0 464c0 26.5 21.5 48 48 48l272 0s0 0 0 0l-64 0 0-96c0-35.3 28.7-64 64-64l.3 0 .5 0c3.4-37.7 18.7-72.1 42.2-99.1C350.2 260 335.6 264 320 264c-48.6 0-88-39.4-88-88s39.4-88 88-88s88 39.4 88 88c0 18.3-5.6 35.3-15.1 49.4c29-21 64.6-33.4 103.1-33.4c59.5 0 112.1 29.6 144 74.8L640 144c0-26.5-21.5-48-48-48L473.7 96 337.8 5.4zM96 192l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zm0 128l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zM320 128c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-16 0 0-16c0-8.8-7.2-16-16-16zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm22.6-144l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L496 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L473.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L496 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6L518.6 368z\"]\n};\nconst faArrowRightFromBracket = {\n  prefix: 'fas',\n  iconName: 'arrow-right-from-bracket',\n  icon: [512, 512, [\"sign-out\"], \"f08b\", \"M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z\"]\n};\nconst faSignOut = faArrowRightFromBracket;\nconst faCircleChevronDown = {\n  prefix: 'fas',\n  iconName: 'circle-chevron-down',\n  icon: [512, 512, [\"chevron-circle-down\"], \"f13a\", \"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z\"]\n};\nconst faChevronCircleDown = faCircleChevronDown;\nconst faUnlockKeyhole = {\n  prefix: 'fas',\n  iconName: 'unlock-keyhole',\n  icon: [448, 512, [\"unlock-alt\"], \"f13e\", \"M224 64c-44.2 0-80 35.8-80 80l0 48 240 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0 0-48C80 64.5 144.5 0 224 0c57.5 0 107 33.7 130.1 82.3c7.6 16 .8 35.1-15.2 42.6s-35.1 .8-42.6-15.2C283.4 82.6 255.9 64 224 64zm32 320c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0z\"]\n};\nconst faUnlockAlt = faUnlockKeyhole;\nconst faCloudShowersHeavy = {\n  prefix: 'fas',\n  iconName: 'cloud-showers-heavy',\n  icon: [512, 512, [], \"f740\", \"M96 320c-53 0-96-43-96-96c0-42.5 27.6-78.6 65.9-91.2C64.7 126.1 64 119.1 64 112C64 50.1 114.1 0 176 0c43.1 0 80.5 24.3 99.2 60c14.7-17.1 36.5-28 60.8-28c44.2 0 80 35.8 80 80c0 5.5-.6 10.8-1.6 16c.5 0 1.1 0 1.6 0c53 0 96 43 96 96s-43 96-96 96L96 320zM81.5 353.9c12.2 5.2 17.8 19.3 12.6 31.5l-48 112c-5.2 12.2-19.3 17.8-31.5 12.6S-3.3 490.7 1.9 478.5l48-112c5.2-12.2 19.3-17.8 31.5-12.6zm120 0c12.2 5.2 17.8 19.3 12.6 31.5l-48 112c-5.2 12.2-19.3 17.8-31.5 12.6s-17.8-19.3-12.6-31.5l48-112c5.2-12.2 19.3-17.8 31.5-12.6zm244.6 31.5l-48 112c-5.2 12.2-19.3 17.8-31.5 12.6s-17.8-19.3-12.6-31.5l48-112c5.2-12.2 19.3-17.8 31.5-12.6s17.8 19.3 12.6 31.5zM313.5 353.9c12.2 5.2 17.8 19.3 12.6 31.5l-48 112c-5.2 12.2-19.3 17.8-31.5 12.6s-17.8-19.3-12.6-31.5l48-112c5.2-12.2 19.3-17.8 31.5-12.6z\"]\n};\nconst faHeadphonesSimple = {\n  prefix: 'fas',\n  iconName: 'headphones-simple',\n  icon: [512, 512, [\"headphones-alt\"], \"f58f\", \"M256 80C141.1 80 48 173.1 48 288l0 104c0 13.3-10.7 24-24 24s-24-10.7-24-24L0 288C0 146.6 114.6 32 256 32s256 114.6 256 256l0 104c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-104c0-114.9-93.1-208-208-208zM80 352c0-35.3 28.7-64 64-64l16 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-16 0c-35.3 0-64-28.7-64-64l0-64zm288-64c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-16 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l16 0z\"]\n};\nconst faHeadphonesAlt = faHeadphonesSimple;\nconst faSitemap = {\n  prefix: 'fas',\n  iconName: 'sitemap',\n  icon: [576, 512, [], \"f0e8\", \"M208 80c0-26.5 21.5-48 48-48l64 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-8 0 0 40 152 0c30.9 0 56 25.1 56 56l0 32 8 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-64 0c-26.5 0-48-21.5-48-48l0-64c0-26.5 21.5-48 48-48l8 0 0-32c0-4.4-3.6-8-8-8l-152 0 0 40 8 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-64 0c-26.5 0-48-21.5-48-48l0-64c0-26.5 21.5-48 48-48l8 0 0-40-152 0c-4.4 0-8 3.6-8 8l0 32 8 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-64 0c-26.5 0-48-21.5-48-48l0-64c0-26.5 21.5-48 48-48l8 0 0-32c0-30.9 25.1-56 56-56l152 0 0-40-8 0c-26.5 0-48-21.5-48-48l0-64z\"]\n};\nconst faCircleDollarToSlot = {\n  prefix: 'fas',\n  iconName: 'circle-dollar-to-slot',\n  icon: [512, 512, [\"donate\"], \"f4b9\", \"M326.7 403.7c-22.1 8-45.9 12.3-70.7 12.3s-48.7-4.4-70.7-12.3l-.8-.3c-30-11-56.8-28.7-78.6-51.4C70 314.6 48 263.9 48 208C48 93.1 141.1 0 256 0S464 93.1 464 208c0 55.9-22 106.6-57.9 144c-1 1-2 2.1-3 3.1c-21.4 21.4-47.4 38.1-76.3 48.6zM256 91.9c-11.1 0-20.1 9-20.1 20.1l0 6c-5.6 1.2-10.9 2.9-15.9 5.1c-15 6.8-27.9 19.4-31.1 37.7c-1.8 10.2-.8 20 3.4 29c4.2 8.8 10.7 15 17.3 19.5c11.6 7.9 26.9 12.5 38.6 16l2.2 .7c13.9 4.2 23.4 7.4 29.3 11.7c2.5 1.8 3.4 3.2 3.7 4c.3 .8 .9 2.6 .2 6.7c-.6 3.5-2.5 6.4-8 8.8c-6.1 2.6-16 3.9-28.8 1.9c-6-1-16.7-4.6-26.2-7.9c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-2.2-.7-4.3-1.5-6.4-2.1c-10.5-3.5-21.8 2.2-25.3 12.7s2.2 21.8 12.7 25.3c1.2 .4 2.7 .9 4.4 1.5c7.9 2.7 20.3 6.9 29.8 9.1l0 6.4c0 11.1 9 20.1 20.1 20.1s20.1-9 20.1-20.1l0-5.5c5.3-1 10.5-2.5 15.4-4.6c15.7-6.7 28.4-19.7 31.6-38.7c1.8-10.4 1-20.3-3-29.4c-3.9-9-10.2-15.6-16.9-20.5c-12.2-8.8-28.3-13.7-40.4-17.4l-.8-.2c-14.2-4.3-23.8-7.3-29.9-11.4c-2.6-1.8-3.4-3-3.6-3.5c-.2-.3-.7-1.6-.1-5c.3-1.9 1.9-5.2 8.2-8.1c6.4-2.9 16.4-4.5 28.6-2.6c4.3 .7 17.9 3.3 21.7 4.3c10.7 2.8 21.6-3.5 24.5-14.2s-3.5-21.6-14.2-24.5c-4.4-1.2-14.4-3.2-21-4.4l0-6.3c0-11.1-9-20.1-20.1-20.1zM48 352l16 0c19.5 25.9 44 47.7 72.2 64L64 416l0 32 192 0 192 0 0-32-72.2 0c28.2-16.3 52.8-38.1 72.2-64l16 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48l0-64c0-26.5 21.5-48 48-48z\"]\n};\nconst faDonate = faCircleDollarToSlot;\nconst faMemory = {\n  prefix: 'fas',\n  iconName: 'memory',\n  icon: [576, 512, [], \"f538\", \"M64 64C28.7 64 0 92.7 0 128l0 7.4c0 6.8 4.4 12.6 10.1 16.3C23.3 160.3 32 175.1 32 192s-8.7 31.7-21.9 40.3C4.4 236 0 241.8 0 248.6L0 320l576 0 0-71.4c0-6.8-4.4-12.6-10.1-16.3C552.7 223.7 544 208.9 544 192s8.7-31.7 21.9-40.3c5.7-3.7 10.1-9.5 10.1-16.3l0-7.4c0-35.3-28.7-64-64-64L64 64zM576 352L0 352l0 64c0 17.7 14.3 32 32 32l48 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 96 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 96 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 96 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 48 0c17.7 0 32-14.3 32-32l0-64zM192 160l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32z\"]\n};\nconst faRoadSpikes = {\n  prefix: 'fas',\n  iconName: 'road-spikes',\n  icon: [640, 512, [], \"e568\", \"M64 116.8c0-15.8 20.5-22 29.3-8.9L192 256l0-139.2c0-15.8 20.5-22 29.3-8.9L320 256l0-139.2c0-15.8 20.5-22 29.3-8.9L448 256l0-139.2c0-15.8 20.5-22 29.3-8.9L606.8 302.2c14.2 21.3-1.1 49.7-26.6 49.7L512 352l-64 0-64 0-64 0-64 0-64 0L64 352l0-235.2zM32 384l576 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faFireBurner = {\n  prefix: 'fas',\n  iconName: 'fire-burner',\n  icon: [640, 512, [], \"e4f1\", \"M345.7 48.3L358 34.5c5.4-6.1 13.3-8.8 20.9-8.9c7.2 0 14.3 2.6 19.9 7.8c19.7 18.3 39.8 43.2 55 70.6C469 131.2 480 162.2 480 192.2C480 280.8 408.7 352 320 352c-89.6 0-160-71.3-160-159.8c0-37.3 16-73.4 36.8-104.5c20.9-31.3 47.5-59 70.9-80.2C273.4 2.3 280.7-.2 288 0c14.1 .3 23.8 11.4 32.7 21.6c0 0 0 0 0 0c2 2.3 4 4.6 6 6.7l19 19.9zM384 240.2c0-36.5-37-73-54.8-88.4c-5.4-4.7-13.1-4.7-18.5 0C293 167.1 256 203.6 256 240.2c0 35.3 28.7 64 64 64s64-28.7 64-64zM32 288c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 64 448 0 0-64c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 96c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l0-96zM320 480a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm160-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM192 480a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faFlag = {\n  prefix: 'fas',\n  iconName: 'flag',\n  icon: [448, 512, [127988, 61725], \"f024\", \"M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32L0 64 0 368 0 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 64.3-16.1c41.1-10.3 84.6-5.5 122.5 13.4c44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-247.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0c-35.1-17.6-75.4-22-113.5-12.5L64 48l0-16z\"]\n};\nconst faHanukiah = {\n  prefix: 'fas',\n  iconName: 'hanukiah',\n  icon: [640, 512, [128334], \"f6e6\", \"M314.2 3.3C309.1 12.1 296 36.6 296 56c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7C324.6 1.2 322.4 0 320 0s-4.6 1.2-5.8 3.3zm-288 48C21.1 60.1 8 84.6 8 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7C36.6 49.2 34.4 48 32 48s-4.6 1.2-5.8 3.3zM88 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7c-1.2-2.1-3.4-3.3-5.8-3.3s-4.6 1.2-5.8 3.3C101.1 60.1 88 84.6 88 104zm82.2-52.7C165.1 60.1 152 84.6 152 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7c-1.2-2.1-3.4-3.3-5.8-3.3s-4.6 1.2-5.8 3.3zM216 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7c-1.2-2.1-3.4-3.3-5.8-3.3s-4.6 1.2-5.8 3.3C229.1 60.1 216 84.6 216 104zM394.2 51.3C389.1 60.1 376 84.6 376 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7c-1.2-2.1-3.4-3.3-5.8-3.3s-4.6 1.2-5.8 3.3zM440 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7c-1.2-2.1-3.4-3.3-5.8-3.3s-4.6 1.2-5.8 3.3C453.1 60.1 440 84.6 440 104zm82.2-52.7C517.1 60.1 504 84.6 504 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7c-1.2-2.1-3.4-3.3-5.8-3.3s-4.6 1.2-5.8 3.3zM584 104c0 13.3 10.7 24 24 24s24-10.7 24-24c0-19.4-13.1-43.9-18.2-52.7c-1.2-2.1-3.4-3.3-5.8-3.3s-4.6 1.2-5.8 3.3C597.1 60.1 584 84.6 584 104zM112 160c-8.8 0-16 7.2-16 16l0 96 0 16 32 0 0-16 0-96c0-8.8-7.2-16-16-16zm64 0c-8.8 0-16 7.2-16 16l0 96 0 16 32 0 0-16 0-96c0-8.8-7.2-16-16-16zm64 0c-8.8 0-16 7.2-16 16l0 96 0 16 32 0 0-16 0-96c0-8.8-7.2-16-16-16zm160 0c-8.8 0-16 7.2-16 16l0 96 0 16 32 0 0-16 0-96c0-8.8-7.2-16-16-16zm64 0c-8.8 0-16 7.2-16 16l0 96 0 16 32 0 0-16 0-96c0-8.8-7.2-16-16-16zm64 0c-8.8 0-16 7.2-16 16l0 96 0 16 32 0 0-16 0-96c0-8.8-7.2-16-16-16zM352 144c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 176L96 320c-17.7 0-32-14.3-32-32l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 53 43 96 96 96l192 0 0 64-128 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-128 0 0-64 192 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32l-192 0 0-176z\"]\n};\nconst faFeather = {\n  prefix: 'fas',\n  iconName: 'feather',\n  icon: [512, 512, [129718], \"f52d\", \"M278.5 215.6L23 471c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l57-57 68 0c49.7 0 97.9-14.4 139-41c11.1-7.2 5.5-23-7.8-23c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l81-24.3c2.5-.8 4.8-2.1 6.7-4l22.4-22.4c10.1-10.1 2.9-27.3-11.3-27.3l-32.2 0c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l112-33.6c4-1.2 7.4-3.9 9.3-7.7C506.4 207.6 512 184.1 512 160c0-41-16.3-80.3-45.3-109.3l-5.5-5.5C432.3 16.3 393 0 352 0s-80.3 16.3-109.3 45.3L139 149C91 197 64 262.1 64 330l0 55.3L253.6 195.8c6.2-6.2 16.4-6.2 22.6 0c5.4 5.4 6.1 13.6 2.2 19.8z\"]\n};\nconst faVolumeLow = {\n  prefix: 'fas',\n  iconName: 'volume-low',\n  icon: [448, 512, [128264, \"volume-down\"], \"f027\", \"M301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3zM412.6 181.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5z\"]\n};\nconst faVolumeDown = faVolumeLow;\nconst faCommentSlash = {\n  prefix: 'fas',\n  iconName: 'comment-slash',\n  icon: [640, 512, [], \"f4b3\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L512.9 376.7C552.2 340.2 576 292.3 576 240C576 125.1 461.4 32 320 32c-67.7 0-129.3 21.4-175.1 56.3L38.8 5.1zm385.2 425L82.9 161.3C70.7 185.6 64 212.2 64 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9c37 0 72.3-6.4 104.1-17.9z\"]\n};\nconst faCloudSunRain = {\n  prefix: 'fas',\n  iconName: 'cloud-sun-rain',\n  icon: [640, 512, [127782], \"f743\", \"M294.2 1.2c5.1 2.1 8.7 6.7 9.6 12.1l10.4 62.4c-23.3 10.8-42.9 28.4-56 50.3c-14.6-9-31.8-14.1-50.2-14.1c-53 0-96 43-96 96c0 35.5 19.3 66.6 48 83.2c.8 31.8 13.2 60.7 33.1 82.7l-56 39.2c-4.5 3.2-10.3 3.8-15.4 1.6s-8.7-6.7-9.6-12.1L98.1 317.9 13.4 303.8c-5.4-.9-10-4.5-12.1-9.6s-1.5-10.9 1.6-15.4L52.5 208 2.9 137.2c-3.2-4.5-3.8-10.3-1.6-15.4s6.7-8.7 12.1-9.6L98.1 98.1l14.1-84.7c.9-5.4 4.5-10 9.6-12.1s10.9-1.5 15.4 1.6L208 52.5 278.8 2.9c4.5-3.2 10.3-3.8 15.4-1.6zM208 144c13.8 0 26.7 4.4 37.1 11.9c-1.2 4.1-2.2 8.3-3 12.6c-37.9 14.6-67.2 46.6-77.8 86.4C151.8 243.1 144 226.5 144 208c0-35.3 28.7-64 64-64zm69.4 276c11 7.4 14 22.3 6.7 33.3l-32 48c-7.4 11-22.3 14-33.3 6.7s-14-22.3-6.7-33.3l32-48c7.4-11 22.3-14 33.3-6.7zm96 0c11 7.4 14 22.3 6.7 33.3l-32 48c-7.4 11-22.3 14-33.3 6.7s-14-22.3-6.7-33.3l32-48c7.4-11 22.3-14 33.3-6.7zm96 0c11 7.4 14 22.3 6.7 33.3l-32 48c-7.4 11-22.3 14-33.3 6.7s-14-22.3-6.7-33.3l32-48c7.4-11 22.3-14 33.3-6.7zm96 0c11 7.4 14 22.3 6.7 33.3l-32 48c-7.4 11-22.3 14-33.3 6.7s-14-22.3-6.7-33.3l32-48c7.4-11 22.3-14 33.3-6.7zm74.5-116.1c0 44.2-35.8 80-80 80l-271.9 0c-53 0-96-43-96-96c0-47.6 34.6-87 80-94.6l0-1.3c0-53 43-96 96-96c34.9 0 65.4 18.6 82.2 46.4c13-9.1 28.8-14.4 45.8-14.4c44.2 0 80 35.8 80 80c0 5.9-.6 11.7-1.9 17.2c37.4 6.7 65.8 39.4 65.8 78.7z\"]\n};\nconst faCompress = {\n  prefix: 'fas',\n  iconName: 'compress',\n  icon: [448, 512, [], \"f066\", \"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z\"]\n};\nconst faWheatAwn = {\n  prefix: 'fas',\n  iconName: 'wheat-awn',\n  icon: [512, 512, [\"wheat-alt\"], \"e2cd\", \"M505 41c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L383 95c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l88-88zM305.5 27.3c-6.2-6.2-16.4-6.2-22.6 0L271.5 38.6c-37.5 37.5-37.5 98.3 0 135.8l10.4 10.4-30.5 30.5c-3.4-27.3-15.5-53.8-36.5-74.8l-11.3-11.3c-6.2-6.2-16.4-6.2-22.6 0l-11.3 11.3c-37.5 37.5-37.5 98.3 0 135.8l10.4 10.4-30.5 30.5c-3.4-27.3-15.5-53.8-36.5-74.8L101.8 231c-6.2-6.2-16.4-6.2-22.6 0L67.9 242.3c-37.5 37.5-37.5 98.3 0 135.8l10.4 10.4L9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l68.9-68.9 12.2 12.2c37.5 37.5 98.3 37.5 135.8 0l11.3-11.3c6.2-6.2 6.2-16.4 0-22.6l-11.3-11.3c-21.8-21.8-49.6-34.1-78.1-36.9l31.9-31.9 12.2 12.2c37.5 37.5 98.3 37.5 135.8 0l11.3-11.3c6.2-6.2 6.2-16.4 0-22.6l-11.3-11.3c-21.8-21.8-49.6-34.1-78.1-36.9l31.9-31.9 12.2 12.2c37.5 37.5 98.3 37.5 135.8 0L486.5 231c6.2-6.2 6.2-16.4 0-22.6L475.2 197c-5.2-5.2-10.6-9.8-16.4-13.9L505 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-59.4 59.4c-20.6-4.4-42-3.7-62.3 2.1c6.1-21.3 6.6-43.8 1.4-65.3L409 41c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L329.1 52.9c-3.7-5-7.8-9.8-12.4-14.3L305.5 27.3z\"]\n};\nconst faWheatAlt = faWheatAwn;\nconst faAnkh = {\n  prefix: 'fas',\n  iconName: 'ankh',\n  icon: [320, 512, [9765], \"f644\", \"M96 128c0-35.3 28.7-64 64-64s64 28.7 64 64c0 41.6-20.7 76.6-46.6 104.1c-5.9 6.2-11.8 11.8-17.4 16.7c-5.6-4.9-11.5-10.5-17.4-16.7C116.7 204.6 96 169.6 96 128zM160 0C89.3 0 32 57.3 32 128c0 52.4 21.5 95.5 46.8 128L32 256c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-46.8 0c25.4-32.5 46.8-75.6 46.8-128C288 57.3 230.7 0 160 0z\"]\n};\nconst faHandsHoldingChild = {\n  prefix: 'fas',\n  iconName: 'hands-holding-child',\n  icon: [640, 512, [], \"e4fa\", \"M320 0a40 40 0 1 1 0 80 40 40 0 1 1 0-80zm44.7 164.3L375.8 253c1.6 13.2-7.7 25.1-20.8 26.8s-25.1-7.7-26.8-20.8l-4.4-35-7.6 0-4.4 35c-1.6 13.2-13.6 22.5-26.8 20.8s-22.5-13.6-20.8-26.8l11.1-88.8L255.5 181c-10.1 8.6-25.3 7.3-33.8-2.8s-7.3-25.3 2.8-33.8l27.9-23.6C271.3 104.8 295.3 96 320 96s48.7 8.8 67.6 24.7l27.9 23.6c10.1 8.6 11.4 23.7 2.8 33.8s-23.7 11.4-33.8 2.8l-19.8-16.7zM40 64c22.1 0 40 17.9 40 40l0 40 0 80 0 40.2c0 17 6.7 33.3 18.7 45.3l51.1 51.1c8.3 8.3 21.3 9.6 31 3.1c12.9-8.6 14.7-26.9 3.7-37.8l-15.2-15.2-32-32c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l32 32 15.2 15.2c0 0 0 0 0 0l25.3 25.3c21 21 32.8 49.5 32.8 79.2l0 78.9c0 26.5-21.5 48-48 48l-66.7 0c-17 0-33.3-6.7-45.3-18.7L28.1 393.4C10.1 375.4 0 351 0 325.5L0 224l0-64 0-56C0 81.9 17.9 64 40 64zm560 0c22.1 0 40 17.9 40 40l0 56 0 64 0 101.5c0 25.5-10.1 49.9-28.1 67.9L512 493.3c-12 12-28.3 18.7-45.3 18.7L400 512c-26.5 0-48-21.5-48-48l0-78.9c0-29.7 11.8-58.2 32.8-79.2l25.3-25.3c0 0 0 0 0 0l15.2-15.2 32-32c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-32 32-15.2 15.2c-11 11-9.2 29.2 3.7 37.8c9.7 6.5 22.7 5.2 31-3.1l51.1-51.1c12-12 18.7-28.3 18.7-45.3l0-40.2 0-80 0-40c0-22.1 17.9-40 40-40z\"]\n};\nconst faAsterisk = {\n  prefix: 'fas',\n  iconName: 'asterisk',\n  icon: [384, 512, [10033, 61545], \"2a\", \"M192 32c17.7 0 32 14.3 32 32l0 135.5 111.5-66.9c15.2-9.1 34.8-4.2 43.9 11s4.2 34.8-11 43.9L254.2 256l114.3 68.6c15.2 9.1 20.1 28.7 11 43.9s-28.7 20.1-43.9 11L224 312.5 224 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-135.5L48.5 379.4c-15.2 9.1-34.8 4.2-43.9-11s-4.2-34.8 11-43.9L129.8 256 15.5 187.4c-15.2-9.1-20.1-28.7-11-43.9s28.7-20.1 43.9-11L160 199.5 160 64c0-17.7 14.3-32 32-32z\"]\n};\nconst faSquareCheck = {\n  prefix: 'fas',\n  iconName: 'square-check',\n  icon: [448, 512, [9745, 9989, 61510, \"check-square\"], \"f14a\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\"]\n};\nconst faCheckSquare = faSquareCheck;\nconst faPesetaSign = {\n  prefix: 'fas',\n  iconName: 'peseta-sign',\n  icon: [384, 512, [], \"e221\", \"M64 32C46.3 32 32 46.3 32 64l0 96c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 96 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 96 0c77.4 0 142-55 156.8-128l3.2 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-3.2 0C334 87 269.4 32 192 32L64 32zM282.5 160L96 160l0-64 96 0c41.8 0 77.4 26.7 90.5 64zM96 224l186.5 0c-13.2 37.3-48.7 64-90.5 64l-96 0 0-64z\"]\n};\nconst faHeading = {\n  prefix: 'fas',\n  iconName: 'heading',\n  icon: [448, 512, [\"header\"], \"f1dc\", \"M0 64C0 46.3 14.3 32 32 32l48 0 48 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 112 224 0 0-112-16 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l48 0 48 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 144 0 176 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-48 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-144-224 0 0 144 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-48 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-176L48 96 32 96C14.3 96 0 81.7 0 64z\"]\n};\nconst faHeader = faHeading;\nconst faGhost = {\n  prefix: 'fas',\n  iconName: 'ghost',\n  icon: [384, 512, [128123], \"f6e2\", \"M40.1 467.1l-11.2 9c-3.2 2.5-7.1 3.9-11.1 3.9C8 480 0 472 0 462.2L0 192C0 86 86 0 192 0S384 86 384 192l0 270.2c0 9.8-8 17.8-17.8 17.8c-4 0-7.9-1.4-11.1-3.9l-11.2-9c-13.4-10.7-32.8-9-44.1 3.9L269.3 506c-3.3 3.8-8.2 6-13.3 6s-9.9-2.2-13.3-6l-26.6-30.5c-12.7-14.6-35.4-14.6-48.2 0L141.3 506c-3.3 3.8-8.2 6-13.3 6s-9.9-2.2-13.3-6L84.2 471c-11.3-12.9-30.7-14.6-44.1-3.9zM160 192a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faList = {\n  prefix: 'fas',\n  iconName: 'list',\n  icon: [512, 512, [\"list-squares\"], \"f03a\", \"M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z\"]\n};\nconst faListSquares = faList;\nconst faSquarePhoneFlip = {\n  prefix: 'fas',\n  iconName: 'square-phone-flip',\n  icon: [448, 512, [\"phone-square-alt\"], \"f87b\", \"M384 32c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0zm-90.7 96.7c-9.7-2.6-19.9 2.3-23.7 11.6l-20 48c-3.4 8.2-1 17.6 5.8 23.2L280 231.7c-16.6 35.2-45.1 63.7-80.3 80.3l-20.2-24.7c-5.6-6.8-15-9.2-23.2-5.8l-48 20c-9.3 3.9-14.2 14-11.6 23.7l12 44C111.1 378 119 384 128 384c123.7 0 224-100.3 224-224c0-9-6-16.9-14.7-19.3l-44-12z\"]\n};\nconst faPhoneSquareAlt = faSquarePhoneFlip;\nconst faCartPlus = {\n  prefix: 'fas',\n  iconName: 'cart-plus',\n  icon: [576, 512, [], \"f217\", \"M0 24C0 10.7 10.7 0 24 0L69.5 0c22 0 41.5 12.8 50.6 32l411 0c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3l-288.5 0 5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5L488 336c13.3 0 24 10.7 24 24s-10.7 24-24 24l-288.3 0c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5L24 48C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM252 160c0 11 9 20 20 20l44 0 0 44c0 11 9 20 20 20s20-9 20-20l0-44 44 0c11 0 20-9 20-20s-9-20-20-20l-44 0 0-44c0-11-9-20-20-20s-20 9-20 20l0 44-44 0c-11 0-20 9-20 20z\"]\n};\nconst faGamepad = {\n  prefix: 'fas',\n  iconName: 'gamepad',\n  icon: [640, 512, [], \"f11b\", \"M192 64C86 64 0 150 0 256S86 448 192 448l256 0c106 0 192-86 192-192s-86-192-192-192L192 64zM496 168a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM392 304a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM168 200c0-13.3 10.7-24 24-24s24 10.7 24 24l0 32 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-32z\"]\n};\nconst faCircleDot = {\n  prefix: 'fas',\n  iconName: 'circle-dot',\n  icon: [512, 512, [128280, \"dot-circle\"], \"f192\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z\"]\n};\nconst faDotCircle = faCircleDot;\nconst faFaceDizzy = {\n  prefix: 'fas',\n  iconName: 'face-dizzy',\n  icon: [512, 512, [\"dizzy\"], \"f567\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-224a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM100.7 132.7c6.2-6.2 16.4-6.2 22.6 0L160 169.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6L182.6 192l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L160 214.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L137.4 192l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6zm192 0c6.2-6.2 16.4-6.2 22.6 0L352 169.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6L374.6 192l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L352 214.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L329.4 192l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6z\"]\n};\nconst faDizzy = faFaceDizzy;\nconst faEgg = {\n  prefix: 'fas',\n  iconName: 'egg',\n  icon: [384, 512, [129370], \"f7fb\", \"M192 496C86 496 0 394 0 288C0 176 64 16 192 16s192 160 192 272c0 106-86 208-192 208zM154.8 134c6.5-6 7-16.1 1-22.6s-16.1-7-22.6-1c-23.9 21.8-41.1 52.7-52.3 84.2C69.7 226.1 64 259.7 64 288c0 8.8 7.2 16 16 16s16-7.2 16-16c0-24.5 5-54.4 15.1-82.8c10.1-28.5 25-54.1 43.7-71.2z\"]\n};\nconst faHouseMedicalCircleXmark = {\n  prefix: 'fas',\n  iconName: 'house-medical-circle-xmark',\n  icon: [640, 512, [], \"e513\", \"M320 368c0 59.5 29.5 112.1 74.8 144l-266.7 0c-35.3 0-64-28.7-64-64l0-160.4-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L522.1 193.9c-8.5-1.3-17.3-1.9-26.1-1.9c-54.7 0-103.5 24.9-135.8 64L320 256l0-48c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16zM496 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm22.6 144l36.7-36.7c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L496 345.4l-36.7-36.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L473.4 368l-36.7 36.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L496 390.6l36.7 36.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L518.6 368z\"]\n};\nconst faCampground = {\n  prefix: 'fas',\n  iconName: 'campground',\n  icon: [576, 512, [9978], \"f6bb\", \"M377 52c11-13.8 8.8-33.9-5-45s-33.9-8.8-45 5L288 60.8 249 12c-11-13.8-31.2-16-45-5s-16 31.2-5 45l48 60L12.3 405.4C4.3 415.4 0 427.7 0 440.4L0 464c0 26.5 21.5 48 48 48l240 0 240 0c26.5 0 48-21.5 48-48l0-23.6c0-12.7-4.3-25.1-12.3-35L329 112l48-60zM288 448l-119.5 0L288 291.7 407.5 448 288 448z\"]\n};\nconst faFolderPlus = {\n  prefix: 'fas',\n  iconName: 'folder-plus',\n  icon: [512, 512, [], \"f65e\", \"M512 416c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64l0 256zM232 376c0 13.3 10.7 24 24 24s24-10.7 24-24l0-64 64 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-64 0 0-64c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 64-64 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l64 0 0 64z\"]\n};\nconst faFutbol = {\n  prefix: 'fas',\n  iconName: 'futbol',\n  icon: [512, 512, [9917, \"futbol-ball\", \"soccer-ball\"], \"f1e3\", \"M417.3 360.1l-71.6-4.8c-5.2-.3-10.3 1.1-14.5 4.2s-7.2 7.4-8.4 12.5l-17.6 69.6C289.5 445.8 273 448 256 448s-33.5-2.2-49.2-6.4L189.2 372c-1.3-5-4.3-9.4-8.4-12.5s-9.3-4.5-14.5-4.2l-71.6 4.8c-17.6-27.2-28.5-59.2-30.4-93.6L125 228.3c4.4-2.8 7.6-7 9.2-11.9s1.4-10.2-.5-15l-26.7-66.6C128 109.2 155.3 89 186.7 76.9l55.2 46c4 3.3 9 5.1 14.1 5.1s10.2-1.8 14.1-5.1l55.2-46c31.3 12.1 58.7 32.3 79.6 57.9l-26.7 66.6c-1.9 4.8-2.1 10.1-.5 15s4.9 9.1 9.2 11.9l60.7 38.2c-1.9 34.4-12.8 66.4-30.4 93.6zM256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm14.1-325.7c-8.4-6.1-19.8-6.1-28.2 0L194 221c-8.4 6.1-11.9 16.9-8.7 26.8l18.3 56.3c3.2 9.9 12.4 16.6 22.8 16.6l59.2 0c10.4 0 19.6-6.7 22.8-16.6l18.3-56.3c3.2-9.9-.3-20.7-8.7-26.8l-47.9-34.8z\"]\n};\nconst faFutbolBall = faFutbol;\nconst faSoccerBall = faFutbol;\nconst faPaintbrush = {\n  prefix: 'fas',\n  iconName: 'paintbrush',\n  icon: [576, 512, [128396, \"paint-brush\"], \"f1fc\", \"M339.3 367.1c27.3-3.9 51.9-19.4 67.2-42.9L568.2 74.1c12.6-19.5 9.4-45.3-7.6-61.2S517.7-4.4 499.1 9.6L262.4 187.2c-24 18-38.2 46.1-38.4 76.1L339.3 367.1zm-19.6 25.4l-116-104.4C143.9 290.3 96 339.6 96 400c0 3.9 .2 7.8 .6 11.6C98.4 429.1 86.4 448 68.8 448L64 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0c61.9 0 112-50.1 112-112c0-2.5-.1-5-.2-7.5z\"]\n};\nconst faPaintBrush = faPaintbrush;\nconst faLock = {\n  prefix: 'fas',\n  iconName: 'lock',\n  icon: [448, 512, [128274], \"f023\", \"M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z\"]\n};\nconst faGasPump = {\n  prefix: 'fas',\n  iconName: 'gas-pump',\n  icon: [512, 512, [9981], \"f52f\", \"M32 64C32 28.7 60.7 0 96 0L256 0c35.3 0 64 28.7 64 64l0 192 8 0c48.6 0 88 39.4 88 88l0 32c0 13.3 10.7 24 24 24s24-10.7 24-24l0-154c-27.6-7.1-48-32.2-48-62l0-64L384 64c-8.8-8.8-8.8-23.2 0-32s23.2-8.8 32 0l77.3 77.3c12 12 18.7 28.3 18.7 45.3l0 13.5 0 24 0 32 0 152c0 39.8-32.2 72-72 72s-72-32.2-72-72l0-32c0-22.1-17.9-40-40-40l-8 0 0 144c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32L32 64zM96 80l0 96c0 8.8 7.2 16 16 16l128 0c8.8 0 16-7.2 16-16l0-96c0-8.8-7.2-16-16-16L112 64c-8.8 0-16 7.2-16 16z\"]\n};\nconst faHotTubPerson = {\n  prefix: 'fas',\n  iconName: 'hot-tub-person',\n  icon: [512, 512, [\"hot-tub\"], \"f593\", \"M272 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 5.2c0 34 14.4 66.4 39.7 89.2l16.4 14.8c15.2 13.7 23.8 33.1 23.8 53.5l0 13.2c0 13.3 10.7 24 24 24s24-10.7 24-24l0-13.2c0-34-14.4-66.4-39.7-89.2L295.8 82.8C280.7 69.1 272 49.7 272 29.2l0-5.2zM0 320l0 16L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-128c0-35.3-28.7-64-64-64l-170.7 0c-13.8 0-27.3-4.5-38.4-12.8l-85.3-64C137 166.7 116.8 160 96 160c-53 0-96 43-96 96l0 64zm128 16l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-8.8 7.2-16 16-16s16 7.2 16 16zm80-16c8.8 0 16 7.2 16 16l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-8.8 7.2-16 16-16zm112 16l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-8.8 7.2-16 16-16s16 7.2 16 16zm80-16c8.8 0 16 7.2 16 16l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-8.8 7.2-16 16-16zM360 0c-13.3 0-24 10.7-24 24l0 5.2c0 34 14.4 66.4 39.7 89.2l16.4 14.8c15.2 13.7 23.8 33.1 23.8 53.5l0 13.2c0 13.3 10.7 24 24 24s24-10.7 24-24l0-13.2c0-34-14.4-66.4-39.7-89.2L407.8 82.8C392.7 69.1 384 49.7 384 29.2l0-5.2c0-13.3-10.7-24-24-24zM64 128A64 64 0 1 0 64 0a64 64 0 1 0 0 128z\"]\n};\nconst faHotTub = faHotTubPerson;\nconst faMapLocation = {\n  prefix: 'fas',\n  iconName: 'map-location',\n  icon: [576, 512, [\"map-marked\"], \"f59f\", \"M302.8 312C334.9 271.9 408 174.6 408 120C408 53.7 354.3 0 288 0S168 53.7 168 120c0 54.6 73.1 151.9 105.2 192c7.7 9.6 22 9.6 29.6 0zM416 503l144.9-58c9.1-3.6 15.1-12.5 15.1-22.3L576 152c0-17-17.1-28.6-32.9-22.3l-116 46.4c-.5 1.2-1 2.5-1.5 3.7c-2.9 6.8-6.1 13.7-9.6 20.6L416 503zM15.1 187.3C6 191 0 199.8 0 209.6L0 480.4c0 17 17.1 28.6 32.9 22.3L160 451.8l0-251.4c-3.5-6.9-6.7-13.8-9.6-20.6c-5.6-13.2-10.4-27.4-12.8-41.5l-122.6 49zM384 255c-20.5 31.3-42.3 59.6-56.2 77c-20.5 25.6-59.1 25.6-79.6 0c-13.9-17.4-35.7-45.7-56.2-77l0 194.4 192 54.9L384 255z\"]\n};\nconst faMapMarked = faMapLocation;\nconst faHouseFloodWater = {\n  prefix: 'fas',\n  iconName: 'house-flood-water',\n  icon: [576, 512, [], \"e50e\", \"M306.8 6.1C295.6-2 280.4-2 269.2 6.1l-176 128c-11.2 8.2-15.9 22.6-11.6 35.8S98.1 192 112 192l16 0 0 73c1.7 1 3.3 2 4.9 3.1c18 12.4 40.1 20.3 59.2 20.3c21.1 0 42-8.5 59.2-20.3c22.1-15.5 51.6-15.5 73.7 0c18.4 12.7 39.6 20.3 59.2 20.3c19 0 41.2-7.9 59.2-20.3c1.5-1 3-2 4.5-2.9l-.3-73.2 16.6 0c13.9 0 26.1-8.9 30.4-22.1s-.4-27.6-11.6-35.8l-176-128zM269.5 309.9C247 325.4 219.5 336 192 336c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C126.5 389.7 159 400 192 400c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.5-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 325.2 410.9 336 384 336c-27.5 0-55-10.6-77.5-26.1c-11.1-7.9-25.9-7.9-37 0zM384 448c-27.5 0-55-10.6-77.5-26.1c-11.1-7.9-25.9-7.9-37 0C247 437.4 219.5 448 192 448c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C126.5 501.7 159 512 192 512c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.4-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 437.2 410.9 448 384 448z\"]\n};\nconst faTree = {\n  prefix: 'fas',\n  iconName: 'tree',\n  icon: [448, 512, [127794], \"f1bb\", \"M210.6 5.9L62 169.4c-3.9 4.2-6 9.8-6 15.5C56 197.7 66.3 208 79.1 208l24.9 0L30.6 281.4c-4.2 4.2-6.6 10-6.6 16C24 309.9 34.1 320 46.6 320L80 320 5.4 409.5C1.9 413.7 0 419 0 424.5c0 13 10.5 23.5 23.5 23.5L192 448l0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 168.5 0c13 0 23.5-10.5 23.5-23.5c0-5.5-1.9-10.8-5.4-15L368 320l33.4 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16L344 208l24.9 0c12.7 0 23.1-10.3 23.1-23.1c0-5.7-2.1-11.3-6-15.5L237.4 5.9C234 2.1 229.1 0 224 0s-10 2.1-13.4 5.9z\"]\n};\nconst faBridgeLock = {\n  prefix: 'fas',\n  iconName: 'bridge-lock',\n  icon: [640, 512, [], \"e4cc\", \"M32 64c0-17.7 14.3-32 32-32l512 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-40 0 0 64-8 0c-61.9 0-112 50.1-112 112l0 24.6c-9.9 5.8-18.2 14.1-23.8 24.1c-17.6-20-43.4-32.7-72.2-32.7c-53 0-96 43-96 96l0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64c0-53-43-96-96-96l0-128 72 0 0-64L64 96C46.3 96 32 81.7 32 64zM408 96l0 64 80 0 0-64-80 0zm-48 64l0-64-80 0 0 64 80 0zM152 96l0 64 80 0 0-64-80 0zM528 240c-17.7 0-32 14.3-32 32l0 48 64 0 0-48c0-17.7-14.3-32-32-32zm-80 32c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l0-48z\"]\n};\nconst faSackDollar = {\n  prefix: 'fas',\n  iconName: 'sack-dollar',\n  icon: [512, 512, [128176], \"f81d\", \"M320 96L192 96 144.6 24.9C137.5 14.2 145.1 0 157.9 0L354.1 0c12.8 0 20.4 14.2 13.3 24.9L320 96zM192 128l128 0c3.8 2.5 8.1 5.3 13 8.4C389.7 172.7 512 250.9 512 416c0 53-43 96-96 96L96 512c-53 0-96-43-96-96C0 250.9 122.3 172.7 179 136.4c0 0 0 0 0 0s0 0 0 0c4.8-3.1 9.2-5.9 13-8.4zm84 88c0-11-9-20-20-20s-20 9-20 20l0 14c-7.6 1.7-15.2 4.4-22.2 8.5c-13.9 8.3-25.9 22.8-25.8 43.9c.1 20.3 12 33.1 24.7 40.7c11 6.6 24.7 10.8 35.6 14l1.7 .5c12.6 3.8 21.8 6.8 28 10.7c5.1 3.2 5.8 5.4 5.9 8.2c.1 5-1.8 8-5.9 10.5c-5 3.1-12.9 5-21.4 4.7c-11.1-.4-21.5-3.9-35.1-8.5c-2.3-.8-4.7-1.6-7.2-2.4c-10.5-3.5-21.8 2.2-25.3 12.6s2.2 21.8 12.6 25.3c1.9 .6 4 1.3 6.1 2.1c0 0 0 0 0 0s0 0 0 0c8.3 2.9 17.9 6.2 28.2 8.4l0 14.6c0 11 9 20 20 20s20-9 20-20l0-13.8c8-1.7 16-4.5 23.2-9c14.3-8.9 25.1-24.1 24.8-45c-.3-20.3-11.7-33.4-24.6-41.6c-11.5-7.2-25.9-11.6-37.1-15c0 0 0 0 0 0l-.7-.2c-12.8-3.9-21.9-6.7-28.3-10.5c-5.2-3.1-5.3-4.9-5.3-6.7c0-3.7 1.4-6.5 6.2-9.3c5.4-3.2 13.6-5.1 21.5-5c9.6 .1 20.2 2.2 31.2 5.2c10.7 2.8 21.6-3.5 24.5-14.2s-3.5-21.6-14.2-24.5c-6.5-1.7-13.7-3.4-21.1-4.7l0-13.9z\"]\n};\nconst faPenToSquare = {\n  prefix: 'fas',\n  iconName: 'pen-to-square',\n  icon: [512, 512, [\"edit\"], \"f044\", \"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z\"]\n};\nconst faEdit = faPenToSquare;\nconst faCarSide = {\n  prefix: 'fas',\n  iconName: 'car-side',\n  icon: [640, 512, [128663], \"f5e4\", \"M171.3 96L224 96l0 96-112.7 0 30.4-75.9C146.5 104 158.2 96 171.3 96zM272 192l0-96 81.2 0c9.7 0 18.9 4.4 25 12l67.2 84L272 192zm256.2 1L428.2 68c-18.2-22.8-45.8-36-75-36L171.3 32c-39.3 0-74.6 23.9-89.1 60.3L40.6 196.4C16.8 205.8 0 228.9 0 256L0 368c0 17.7 14.3 32 32 32l33.3 0c7.6 45.4 47.1 80 94.7 80s87.1-34.6 94.7-80l130.7 0c7.6 45.4 47.1 80 94.7 80s87.1-34.6 94.7-80l33.3 0c17.7 0 32-14.3 32-32l0-48c0-65.2-48.8-119-111.8-127zM434.7 368a48 48 0 1 1 90.5 32 48 48 0 1 1 -90.5-32zM160 336a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faShareNodes = {\n  prefix: 'fas',\n  iconName: 'share-nodes',\n  icon: [448, 512, [\"share-alt\"], \"f1e0\", \"M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z\"]\n};\nconst faShareAlt = faShareNodes;\nconst faHeartCircleMinus = {\n  prefix: 'fas',\n  iconName: 'heart-circle-minus',\n  icon: [576, 512, [], \"e4ff\", \"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9l2.6-2.4C267.2 438.6 256 404.6 256 368c0-97.2 78.8-176 176-176c28.3 0 55 6.7 78.7 18.5c.9-6.5 1.3-13 1.3-19.6l0-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1l0 5.8c0 41.5 17.2 81.2 47.6 109.5zM576 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-64 0c0 8.8-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l128 0c8.8 0 16 7.2 16 16z\"]\n};\nconst faHourglassHalf = {\n  prefix: 'fas',\n  iconName: 'hourglass-half',\n  icon: [384, 512, [\"hourglass-2\"], \"f252\", \"M32 0C14.3 0 0 14.3 0 32S14.3 64 32 64l0 11c0 42.4 16.9 83.1 46.9 113.1L146.7 256 78.9 323.9C48.9 353.9 32 394.6 32 437l0 11c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 256 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-11c0-42.4-16.9-83.1-46.9-113.1L237.3 256l67.9-67.9c30-30 46.9-70.7 46.9-113.1l0-11c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 0 64 0 32 0zM96 75l0-11 192 0 0 11c0 19-5.6 37.4-16 53L112 128c-10.3-15.6-16-34-16-53zm16 309c3.5-5.3 7.6-10.3 12.1-14.9L192 301.3l67.9 67.9c4.6 4.6 8.6 9.6 12.1 14.9L112 384z\"]\n};\nconst faHourglass2 = faHourglassHalf;\nconst faMicroscope = {\n  prefix: 'fas',\n  iconName: 'microscope',\n  icon: [512, 512, [128300], \"f610\", \"M160 32c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32c17.7 0 32 14.3 32 32l0 224c0 17.7-14.3 32-32 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32c-17.7 0-32-14.3-32-32l0-224c0-17.7 14.3-32 32-32zM32 448l288 0c70.7 0 128-57.3 128-128s-57.3-128-128-128l0-64c106 0 192 86 192 192c0 49.2-18.5 94-48.9 128l16.9 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32zm80-64l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faSink = {\n  prefix: 'fas',\n  iconName: 'sink',\n  icon: [512, 512, [], \"e06d\", \"M288 96c0-17.7 14.3-32 32-32s32 14.3 32 32s14.3 32 32 32s32-14.3 32-32c0-53-43-96-96-96s-96 43-96 96l0 192-64 0 0-24c0-30.9-25.1-56-56-56l-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c4.4 0 8 3.6 8 8l0 24-80 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0 224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 0-24c0-4.4 3.6-8 8-8l56 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-56 0c-30.9 0-56 25.1-56 56l0 24-64 0 0-192zM480 416l0-32L32 384l0 32c0 53 43 96 96 96l256 0c53 0 96-43 96-96z\"]\n};\nconst faBagShopping = {\n  prefix: 'fas',\n  iconName: 'bag-shopping',\n  icon: [448, 512, [\"shopping-bag\"], \"f290\", \"M160 112c0-35.3 28.7-64 64-64s64 28.7 64 64l0 48-128 0 0-48zm-48 48l-64 0c-26.5 0-48 21.5-48 48L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-208c0-26.5-21.5-48-48-48l-64 0 0-48C336 50.1 285.9 0 224 0S112 50.1 112 112l0 48zm24 48a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm152 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faShoppingBag = faBagShopping;\nconst faArrowDownZA = {\n  prefix: 'fas',\n  iconName: 'arrow-down-z-a',\n  icon: [576, 512, [\"sort-alpha-desc\", \"sort-alpha-down-alt\"], \"f881\", \"M183.6 469.6C177.5 476.2 169 480 160 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L128 365.7 128 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 64c0-17.7 14.3-32 32-32l128 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9L429.3 160l50.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-128 0c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9L402.7 96 352 96c-17.7 0-32-14.3-32-32zm96 192c12.1 0 23.2 6.8 28.6 17.7l64 128 16 32c7.9 15.8 1.5 35-14.3 42.9s-35 1.5-42.9-14.3L460.2 448l-88.4 0-7.2 14.3c-7.9 15.8-27.1 22.2-42.9 14.3s-22.2-27.1-14.3-42.9l16-32 64-128c5.4-10.8 16.5-17.7 28.6-17.7zM395.8 400l40.4 0L416 359.6 395.8 400z\"]\n};\nconst faSortAlphaDesc = faArrowDownZA;\nconst faSortAlphaDownAlt = faArrowDownZA;\nconst faMitten = {\n  prefix: 'fas',\n  iconName: 'mitten',\n  icon: [448, 512, [], \"f7b5\", \"M352 384L64 384 5.4 178.9C1.8 166.4 0 153.4 0 140.3C0 62.8 62.8 0 140.3 0l3.4 0c66 0 123.5 44.9 139.5 108.9l31.4 125.8 17.6-20.1C344.8 200.2 362.9 192 382 192l2.8 0c34.9 0 63.3 28.3 63.3 63.3c0 15.9-6 31.2-16.8 42.9L352 384zM32 448c0-17.7 14.3-32 32-32l288 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32L64 512c-17.7 0-32-14.3-32-32l0-32z\"]\n};\nconst faPersonRays = {\n  prefix: 'fas',\n  iconName: 'person-rays',\n  icon: [512, 512, [], \"e54d\", \"M208 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1-28.6 47.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l58.3 97c9.1 15.1 4.2 34.8-10.9 43.9s-34.8 4.2-43.9-10.9L328 256.9 328 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zM7 7C16.4-2.3 31.6-2.3 41 7l80 80c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 41C-2.3 31.6-2.3 16.4 7 7zM471 7c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-80 80c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L471 7zM7 505c-9.4-9.4-9.4-24.6 0-33.9l80-80c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L41 505c-9.4 9.4-24.6 9.4-33.9 0zm464 0l-80-80c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l80 80c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z\"]\n};\nconst faUsers = {\n  prefix: 'fas',\n  iconName: 'users',\n  icon: [640, 512, [], \"f0c0\", \"M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192l42.7 0c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0L21.3 320C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7l42.7 0C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3l-213.3 0zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352l117.3 0C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7l-330.7 0c-14.7 0-26.7-11.9-26.7-26.7z\"]\n};\nconst faEyeSlash = {\n  prefix: 'fas',\n  iconName: 'eye-slash',\n  icon: [640, 512, [], \"f070\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z\"]\n};\nconst faFlaskVial = {\n  prefix: 'fas',\n  iconName: 'flask-vial',\n  icon: [640, 512, [], \"e4f3\", \"M175 389.4c-9.8 16-15 34.3-15 53.1c-10 3.5-20.8 5.5-32 5.5c-53 0-96-43-96-96L32 64C14.3 64 0 49.7 0 32S14.3 0 32 0L96 0l64 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 245.9-49 79.6zM96 64l0 96 64 0 0-96L96 64zM352 0L480 0l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 150.9L629.7 406.2c6.7 10.9 10.3 23.5 10.3 36.4c0 38.3-31.1 69.4-69.4 69.4l-309.2 0c-38.3 0-69.4-31.1-69.4-69.4c0-12.8 3.6-25.4 10.3-36.4L320 214.9 320 64c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0zm32 64l0 160c0 5.9-1.6 11.7-4.7 16.8L330.5 320l171 0-48.8-79.2c-3.1-5-4.7-10.8-4.7-16.8l0-160-64 0z\"]\n};\nconst faHand = {\n  prefix: 'fas',\n  iconName: 'hand',\n  icon: [512, 512, [129306, 9995, \"hand-paper\"], \"f256\", \"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 272c0 1.5 0 3.1 .1 4.6L67.6 283c-16-15.2-41.3-14.6-56.6 1.4s-14.6 41.3 1.4 56.6L124.8 448c43.1 41.1 100.4 64 160 64l19.2 0c97.2 0 176-78.8 176-176l0-208c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 176c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208z\"]\n};\nconst faHandPaper = faHand;\nconst faOm = {\n  prefix: 'fas',\n  iconName: 'om',\n  icon: [512, 512, [128329], \"f679\", \"M379.3 4.7c-6.2-6.2-16.4-6.2-22.6 0l-16 16c-6.2 6.2-6.2 16.4 0 22.6l16 16c6.2 6.2 16.4 6.2 22.6 0l16-16c6.2-6.2 6.2-16.4 0-22.6l-16-16zM281 66.7c-2.2-1.5-4.9-2.5-7.7-2.7c-.6 0-1.3-.1-1.9 0c-3.9 .2-7.4 1.7-10.1 4.2c-.9 .8-1.6 1.7-2.3 2.6c-1.7 2.4-2.7 5.3-2.9 8.5c0 .7 0 1.4 0 2.1c.2 2.2 .9 4.3 1.9 6.2l.3 .6c.3 .6 .8 1.4 1.4 2.4c1.2 2 2.9 4.8 5.1 8.2c4.4 6.7 11.1 15.5 20 24.4C302.4 141.1 330.3 160 368 160c31.2 0 56.6-10.4 73.9-20.2c8.7-5 15.6-9.9 20.4-13.8c2.4-1.9 4.3-3.6 5.7-4.9c.7-.6 1.3-1.2 1.7-1.6l.6-.5 .1-.1 .1-.1s0 0 0 0s0 0 0 0c5.9-5.8 9.5-13.9 9.5-22.8c0-17.7-14.3-32-32-32c-8.7 0-16.7 3.5-22.4 9.2c-.1 .1-.2 .2-.5 .4c-.5 .5-1.5 1.3-2.8 2.4c-2.7 2.2-6.8 5.2-12.1 8.2C399.4 90.4 384.8 96 368 96c-20.8 0-42.4-7-59.5-14.6c-8.4-3.7-15.4-7.5-20.3-10.3c-2.4-1.4-4.3-2.5-5.6-3.3c-.6-.4-1.1-.7-1.4-.9l-.3-.2zM115.2 169.6c8-6 17.9-9.6 28.8-9.6c26.5 0 48 21.5 48 48s-21.5 48-48 48l-34.2 0c-7.6 0-13.8 6.2-13.8 13.8c0 1.5 .2 2.9 .7 4.4l8 24c4.4 13.1 16.6 21.9 30.4 21.9l8.9 0 16 0c35.3 0 64 28.7 64 64s-28.7 64-64 64c-50.8 0-82.7-21.5-102.2-42.8c-9.9-10.8-16.6-21.6-20.9-29.7c-2.1-4-3.6-7.3-4.5-9.6c-.5-1.1-.8-2-1-2.5l-.2-.5c-.3-.9-.7-1.8-1.1-2.6c-1.2-2.2-2.8-4-4.7-5.4c-1.9-1.4-4.1-2.3-6.5-2.8c-1.4-.3-2.9-.3-4.4-.2c-2.5 .2-4.8 1-6.8 2.3c-1.1 .7-2.2 1.5-3.1 2.5c-2.4 2.5-4.1 5.8-4.5 9.5c-.1 .6-.1 1.1-.1 1.7c0 0 0 0 0 0c0 .8 .1 1.7 .2 2.5l0 .1c0 .3 .1 .8 .2 1.3c.2 1.1 .4 2.7 .8 4.6c.8 3.9 2 9.4 3.9 15.9c3.8 13 10.3 30.4 21.3 48C48.7 476.2 89.4 512 160 512c70.7 0 128-57.3 128-128c0-23.3-6.2-45.2-17.1-64l22.6 0c25.5 0 49.9-10.1 67.9-28.1l26.5-26.5c6-6 14.1-9.4 22.6-9.4l5.5 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32c-25.7 0-41.4-12.5-51.2-25.6c-5-6.7-8.4-13.4-10.5-18.6c-1.1-2.5-1.8-4.6-2.2-6c-.2-.7-.4-1.2-.5-1.5l-.1-.2c-.3-1.3-.8-2.6-1.5-3.8c-1.1-2-2.6-3.8-4.4-5.1c-2.7-2-6-3.2-9.6-3.2l-.2 0c-8 .1-14.6 6.1-15.6 13.9c0 0 0 0 0 0c0 .3-.1 .6-.2 1.1c-.1 .9-.3 2.1-.4 3.6c-.3 3-.6 7.3-.6 12.4c0 10.1 1.1 23.9 5.8 38.1c4.8 14.3 13.4 29.3 28.6 40.7C368.7 473.3 389.3 480 416 480c53 0 96-43 96-96l0-96c0-53-43-96-96-96l-5.5 0c-25.5 0-49.9 10.1-67.9 28.1l-26.5 26.5c-6 6-14.1 9.4-22.6 9.4l-48.3 0c6.9-14.5 10.8-30.8 10.8-48c0-61.9-50.1-112-112-112c-25.2 0-48.5 8.3-67.2 22.4c-14.1 10.6-17 30.7-6.4 44.8s30.7 17 44.8 6.4z\"]\n};\nconst faWorm = {\n  prefix: 'fas',\n  iconName: 'worm',\n  icon: [512, 512, [], \"e599\", \"M256 96c0-53 43-96 96-96l38.4 0C439.9 0 480 40.1 480 89.6l0 86.4 0 16 0 184c0 75.1-60.9 136-136 136s-136-60.9-136-136l0-80c0-22.1-17.9-40-40-40s-40 17.9-40 40l0 168c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-168c0-75.1 60.9-136 136-136s136 60.9 136 136l0 80c0 22.1 17.9 40 40 40s40-17.9 40-40l0-184-32 0c-53 0-96-43-96-96zm144-8a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z\"]\n};\nconst faHouseCircleXmark = {\n  prefix: 'fas',\n  iconName: 'house-circle-xmark',\n  icon: [640, 512, [], \"e50b\", \"M320.7 352c8.1-89.7 83.5-160 175.3-160c8.9 0 17.6 .7 26.1 1.9L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 69.7c-.1 .9-.1 1.8-.1 2.8l0 112c0 22.1 17.9 40 40 40l16 0c1.2 0 2.4-.1 3.6-.2c1.5 .1 3 .2 4.5 .2l31.9 0 24 0c22.1 0 40-17.9 40-40l0-24 0-64c0-17.7 14.3-32 32-32l64 0 .7 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm59.3-180.7L518.6 368l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L496 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L473.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L496 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faPlug = {\n  prefix: 'fas',\n  iconName: 'plug',\n  icon: [384, 512, [128268], \"f1e6\", \"M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z\"]\n};\nconst faChevronUp = {\n  prefix: 'fas',\n  iconName: 'chevron-up',\n  icon: [512, 512, [], \"f077\", \"M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z\"]\n};\nconst faHandSpock = {\n  prefix: 'fas',\n  iconName: 'hand-spock',\n  icon: [576, 512, [128406], \"f259\", \"M246.9 23.7C242.3 6.6 224.8-3.5 207.7 1.1s-27.2 22.1-22.6 39.2L238 237.8c2.5 9.2-4.5 18.2-14 18.2c-6.4 0-12-4.2-13.9-10.3L166.6 102.7c-5.1-16.9-23-26.4-39.9-21.3s-26.4 23-21.3 39.9l62.8 206.4c2.4 7.9-7.2 13.8-13.2 8.1L99.6 283c-16-15.2-41.3-14.6-56.6 1.4s-14.6 41.3 1.4 56.6L156.8 448c43.1 41.1 100.4 64 160 64l10.9 0 8.2 0c.1 0 .1-.1 .1-.1s.1-.1 .1-.1c58.3-3.5 108.6-43.2 125.3-99.7l81.2-275c5-16.9-4.7-34.7-21.6-39.8s-34.7 4.7-39.8 21.6L443.5 247.1c-1.6 5.3-6.4 8.9-12 8.9c-7.9 0-13.8-7.3-12.2-15.1l36-170.3c3.7-17.3-7.4-34.3-24.7-37.9s-34.3 7.4-37.9 24.7L355.1 235.1c-2.6 12.2-13.3 20.9-25.8 20.9c-11.9 0-22.4-8-25.4-19.5l-57-212.8z\"]\n};\nconst faStopwatch = {\n  prefix: 'fas',\n  iconName: 'stopwatch',\n  icon: [448, 512, [9201], \"f2f2\", \"M176 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l16 0 0 34.4C92.3 113.8 16 200 16 304c0 114.9 93.1 208 208 208s208-93.1 208-208c0-41.8-12.3-80.7-33.5-113.2l24.1-24.1c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L355.7 143c-28.1-23-62.2-38.8-99.7-44.6L256 64l16 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L224 0 176 0zm72 192l0 128c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-128c0-13.3 10.7-24 24-24s24 10.7 24 24z\"]\n};\nconst faFaceKiss = {\n  prefix: 'fas',\n  iconName: 'face-kiss',\n  icon: [512, 512, [128535, \"kiss\"], \"f596\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm48.7-198.3c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4c-2.7 1.5-5.7 3-8.7 4.3c3.1 1.3 6 2.7 8.7 4.3c6.6 3.7 12.5 8.2 16.7 13.4c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4C274.7 443.1 257.4 448 240 448c-3.6 0-6.8-2.5-7.7-6s.6-7.2 3.8-9c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.1c.2-.1 .5-.3 .9-.5c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5-8.6c-2.5-3.5-5.9-6.9-9.6-10.1c-3.7-3.1-7.4-5.7-10.2-7.6c-1.4-.9-2.6-1.6-3.4-2.1c-.4-.2-.7-.4-.9-.5l-.2-.1c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.5-1.4-4.1-4.1-4.1-7s1.6-5.6 4.1-7c0 0 0 0 0 0s0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.1 .3-.2 .6-.4c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5-8.6c-2.5-3.5-5.9-6.9-9.6-10.1c-3.7-3.1-7.4-5.7-10.2-7.6c-1.4-.9-2.6-1.6-3.4-2.1l-.4-.3-.5-.3-.2-.1c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-3.2-1.8-4.7-5.5-3.8-9s4.1-6 7.7-6c17.4 0 34.7 4.9 47.9 12.3c6.6 3.7 12.5 8.2 16.7 13.4zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faKiss = faFaceKiss;\nconst faBridgeCircleXmark = {\n  prefix: 'fas',\n  iconName: 'bridge-circle-xmark',\n  icon: [640, 512, [], \"e4cb\", \"M64 32C46.3 32 32 46.3 32 64s14.3 32 32 32l40 0 0 64-72 0 0 128c53 0 96 43 96 96l0 64c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-64c0-53 43-96 96-96c6.3 0 12.4 .6 18.3 1.7C367.1 231.8 426.9 192 496 192c42.5 0 81.6 15.1 112 40.2l0-72.2-72 0 0-64 40 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32zM488 96l0 64-80 0 0-64 80 0zM360 96l0 64-80 0 0-64 80 0zM232 96l0 64-80 0 0-64 80 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm59.3-180.7L518.6 368l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L496 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L473.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L496 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faFaceGrinTongue = {\n  prefix: 'fas',\n  iconName: 'face-grin-tongue',\n  icon: [512, 512, [128539, \"grin-tongue\"], \"f589\", \"M0 256C0 368.9 73.1 464.7 174.5 498.8C165.3 484 160 466.6 160 448l0-47.3c-24-17.5-43.1-41.4-54.8-69.2c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19c12.3-3.8 24.3 6.9 19.3 18.7c-11.8 28-31.1 52-55.4 69.6l0 46.9c0 18.6-5.3 36-14.5 50.8C438.9 464.7 512 368.9 512 256C512 114.6 397.4 0 256 0S0 114.6 0 256zm176.4-80a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 448l0-45.4c0-14.7-11.9-26.6-26.6-26.6l-2 0c-11.3 0-21.1 7.9-23.6 18.9c-2.8 12.6-20.8 12.6-23.6 0c-2.5-11.1-12.3-18.9-23.6-18.9l-2 0c-14.7 0-26.6 11.9-26.6 26.6l0 45.4c0 35.3 28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faGrinTongue = faFaceGrinTongue;\nconst faChessBishop = {\n  prefix: 'fas',\n  iconName: 'chess-bishop',\n  icon: [320, 512, [9821], \"f43a\", \"M128 0C110.3 0 96 14.3 96 32c0 16.1 11.9 29.4 27.4 31.7C78.4 106.8 8 190 8 288c0 47.4 30.8 72.3 56 84.7L64 400l192 0 0-27.3c25.2-12.5 56-37.4 56-84.7c0-37.3-10.2-72.4-25.3-104.1l-99.4 99.4c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L270.8 154.6c-23.2-38.1-51.8-69.5-74.2-90.9C212.1 61.4 224 48.1 224 32c0-17.7-14.3-32-32-32L128 0zM48 432L6.6 473.4c-4.2 4.2-6.6 10-6.6 16C0 501.9 10.1 512 22.6 512l274.7 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16L272 432 48 432z\"]\n};\nconst faFaceGrinWink = {\n  prefix: 'fas',\n  iconName: 'face-grin-wink',\n  icon: [512, 512, [\"grin-wink\"], \"f58c\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM388.1 312.8c12.3-3.8 24.3 6.9 19.3 18.7C382.4 390.6 324.2 432 256.3 432s-126.2-41.4-151.1-100.5c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19zm-16.9-79.2c-17.6-23.5-52.8-23.5-70.4 0c-5.3 7.1-15.3 8.5-22.4 3.2s-8.5-15.3-3.2-22.4c30.4-40.5 91.2-40.5 121.6 0c5.3 7.1 3.9 17.1-3.2 22.4s-17.1 3.9-22.4-3.2zM176.4 176a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faGrinWink = faFaceGrinWink;\nconst faEarDeaf = {\n  prefix: 'fas',\n  iconName: 'ear-deaf',\n  icon: [512, 512, [\"deaf\", \"deafness\", \"hard-of-hearing\"], \"f2a4\", \"M502.6 54.6l-40 40c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l40-40c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3zm-320 320l-128 128c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3zM240 128c-57.6 0-105.1 43.6-111.3 99.5c-1.9 17.6-17.8 30.2-35.3 28.3s-30.2-17.8-28.3-35.3C74.8 132.5 149.4 64 240 64c97.2 0 176 78.8 176 176c0 46-17.7 87.9-46.6 119.3c-12 13-17.4 24.8-17.4 34.7l0 6.1c0 61.9-50.1 112-112 112c-17.7 0-32-14.3-32-32s14.3-32 32-32c26.5 0 48-21.5 48-48l0-6.1c0-32.9 17.4-59.6 34.4-78c18.4-20 29.6-46.6 29.6-75.9c0-61.9-50.1-112-112-112zm0 80c-17.7 0-32 14.3-32 32c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-44.2 35.8-80 80-80s80 35.8 80 80c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-17.7-14.3-32-32-32z\"]\n};\nconst faDeaf = faEarDeaf;\nconst faDeafness = faEarDeaf;\nconst faHardOfHearing = faEarDeaf;\nconst faRoadCircleCheck = {\n  prefix: 'fas',\n  iconName: 'road-circle-check',\n  icon: [640, 512, [], \"e564\", \"M213.2 32L288 32l0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 74.8 0c27.1 0 51.3 17.1 60.3 42.6l42.7 120.6c-10.9-2.1-22.2-3.2-33.8-3.2c-59.5 0-112.1 29.6-144 74.8l0-42.8c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32c2.3 0 4.6-.3 6.8-.7c-4.5 15.5-6.8 31.8-6.8 48.7c0 5.4 .2 10.7 .7 16l-.7 0c-17.7 0-32 14.3-32 32l0 64L86.6 480C56.5 480 32 455.5 32 425.4c0-6.2 1.1-12.4 3.1-18.2L152.9 74.6C162 49.1 186.1 32 213.2 32zM352 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L480 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z\"]\n};\nconst faDiceFive = {\n  prefix: 'fas',\n  iconName: 'dice-five',\n  icon: [448, 512, [9860], \"f523\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm64 96a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM96 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM224 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm64-64a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32 160a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faSquareRss = {\n  prefix: 'fas',\n  iconName: 'square-rss',\n  icon: [448, 512, [\"rss-square\"], \"f143\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM96 136c0-13.3 10.7-24 24-24c137 0 248 111 248 248c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-110.5-89.5-200-200-200c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24c83.9 0 152 68.1 152 152c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-57.4-46.6-104-104-104c-13.3 0-24-10.7-24-24zm0 120a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faRssSquare = faSquareRss;\nconst faLandMineOn = {\n  prefix: 'fas',\n  iconName: 'land-mine-on',\n  icon: [640, 512, [], \"e51b\", \"M344 24l0 144c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-144c0-13.3 10.7-24 24-24s24 10.7 24 24zM192 320c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32l0 32-256 0 0-32zm-77.3 90.5c8.1-16.3 24.8-26.5 42.9-26.5l324.7 0c18.2 0 34.8 10.3 42.9 26.5l27.6 55.2C563.5 487 548 512 524.2 512l-408.4 0c-23.8 0-39.3-25-28.6-46.3l27.6-55.2zM36.3 138.3c7.5-10.9 22.5-13.6 33.4-6.1l104 72c10.9 7.5 13.6 22.5 6.1 33.4s-22.5 13.6-33.4 6.1l-104-72c-10.9-7.5-13.6-22.5-6.1-33.4zm534.1-6.1c10.9-7.5 25.8-4.8 33.4 6.1s4.8 25.8-6.1 33.4l-104 72c-10.9 7.5-25.8 4.8-33.4-6.1s-4.8-25.8 6.1-33.4l104-72z\"]\n};\nconst faICursor = {\n  prefix: 'fas',\n  iconName: 'i-cursor',\n  icon: [256, 512, [], \"f246\", \"M.1 29.3C-1.4 47 11.7 62.4 29.3 63.9l8 .7C70.5 67.3 96 95 96 128.3L96 224l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 95.7c0 33.3-25.5 61-58.7 63.8l-8 .7C11.7 449.6-1.4 465 .1 482.7s16.9 30.7 34.5 29.2l8-.7c34.1-2.8 64.2-18.9 85.4-42.9c21.2 24 51.2 40 85.4 42.9l8 .7c17.6 1.5 33.1-11.6 34.5-29.2s-11.6-33.1-29.2-34.5l-8-.7C185.5 444.7 160 417 160 383.7l0-95.7 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-95.7c0-33.3 25.5-61 58.7-63.8l8-.7c17.6-1.5 30.7-16.9 29.2-34.5S239-1.4 221.3 .1l-8 .7C179.2 3.6 149.2 19.7 128 43.7c-21.2-24-51.2-40-85.4-42.9l-8-.7C17-1.4 1.6 11.7 .1 29.3z\"]\n};\nconst faStamp = {\n  prefix: 'fas',\n  iconName: 'stamp',\n  icon: [512, 512, [], \"f5bf\", \"M312 201.8c0-17.4 9.2-33.2 19.9-47C344.5 138.5 352 118.1 352 96c0-53-43-96-96-96s-96 43-96 96c0 22.1 7.5 42.5 20.1 58.8c10.7 13.8 19.9 29.6 19.9 47c0 29.9-24.3 54.2-54.2 54.2L112 256C50.1 256 0 306.1 0 368c0 20.9 13.4 38.7 32 45.3L32 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-50.7c18.6-6.6 32-24.4 32-45.3c0-61.9-50.1-112-112-112l-33.8 0c-29.9 0-54.2-24.3-54.2-54.2zM416 416l0 32L96 448l0-32 320 0z\"]\n};\nconst faStairs = {\n  prefix: 'fas',\n  iconName: 'stairs',\n  icon: [576, 512, [], \"e289\", \"M384 64c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0 0 96c0 17.7-14.3 32-32 32l-96 0 0 96c0 17.7-14.3 32-32 32l-96 0 0 96c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0 0-96c0-17.7 14.3-32 32-32l96 0 0-96c0-17.7 14.3-32 32-32l96 0 0-96z\"]\n};\nconst faI = {\n  prefix: 'fas',\n  iconName: 'i',\n  icon: [320, 512, [105], \"49\", \"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l96 0 0 320-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0 0-320 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L160 32 32 32z\"]\n};\nconst faHryvniaSign = {\n  prefix: 'fas',\n  iconName: 'hryvnia-sign',\n  icon: [384, 512, [8372, \"hryvnia\"], \"f6f2\", \"M121.9 116.2C138.3 103.1 158.7 96 179.6 96L223 96c27.1 0 49 21.9 49 49c0 11.5-4 22.4-11.1 31L32 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l123.5 0-50.6 28.9c-1.7 1-3.4 2-5.1 3.1L32 272c-17.7 0-32 14.3-32 32s14.3 32 32 32l20.3 0c-2.8 9.9-4.3 20.4-4.3 31c0 62.4 50.6 113 113 113l43.4 0c35.5 0 70-12.1 97.7-34.3L308 441c13.8-11 16-31.2 5-45s-31.2-16-45-5l-5.9 4.7c-16.4 13.1-36.7 20.2-57.7 20.2L161 416c-27.1 0-49-21.9-49-49c0-11.5 4-22.4 11.1-31L352 336c17.7 0 32-14.3 32-32s-14.3-32-32-32l-123.5 0 50.6-28.9c1.7-1 3.4-2 5.1-3.1l67.8 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-20.3 0c2.8-10 4.3-20.4 4.3-31c0-62.4-50.6-113-113-113l-43.4 0c-35.5 0-70 12.1-97.7 34.3L76 71c-13.8 11-16 31.2-5 45s31.2 16 45 5l5.9-4.7z\"]\n};\nconst faHryvnia = faHryvniaSign;\nconst faPills = {\n  prefix: 'fas',\n  iconName: 'pills',\n  icon: [576, 512, [], \"f484\", \"M112 96c-26.5 0-48 21.5-48 48l0 112 96 0 0-112c0-26.5-21.5-48-48-48zM0 144C0 82.1 50.1 32 112 32s112 50.1 112 112l0 224c0 61.9-50.1 112-112 112S0 429.9 0 368L0 144zM554.9 399.4c-7.1 12.3-23.7 13.1-33.8 3.1L333.5 214.9c-10-10-9.3-26.7 3.1-33.8C360 167.7 387.1 160 416 160c88.4 0 160 71.6 160 160c0 28.9-7.7 56-21.1 79.4zm-59.5 59.5C472 472.3 444.9 480 416 480c-88.4 0-160-71.6-160-160c0-28.9 7.7-56 21.1-79.4c7.1-12.3 23.7-13.1 33.8-3.1L498.5 425.1c10 10 9.3 26.7-3.1 33.8z\"]\n};\nconst faFaceGrinWide = {\n  prefix: 'fas',\n  iconName: 'face-grin-wide',\n  icon: [512, 512, [128515, \"grin-alt\"], \"f581\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM388.1 312.8c12.3-3.8 24.3 6.9 19.3 18.7C382.4 390.6 324.2 432 256.3 432s-126.2-41.4-151.1-100.5c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19zM208 192c0 35.3-14.3 64-32 64s-32-28.7-32-64s14.3-64 32-64s32 28.7 32 64zm128 64c-17.7 0-32-28.7-32-64s14.3-64 32-64s32 28.7 32 64s-14.3 64-32 64z\"]\n};\nconst faGrinAlt = faFaceGrinWide;\nconst faTooth = {\n  prefix: 'fas',\n  iconName: 'tooth',\n  icon: [448, 512, [129463], \"f5c9\", \"M186.1 52.1C169.3 39.1 148.7 32 127.5 32C74.7 32 32 74.7 32 127.5l0 6.2c0 15.8 3.7 31.3 10.7 45.5l23.5 47.1c4.5 8.9 7.6 18.4 9.4 28.2l36.7 205.8c2 11.2 11.6 19.4 22.9 19.8s21.4-7.4 24-18.4l28.9-121.3C192.2 323.7 207 312 224 312s31.8 11.7 35.8 28.3l28.9 121.3c2.6 11.1 12.7 18.8 24 18.4s20.9-8.6 22.9-19.8l36.7-205.8c1.8-9.8 4.9-19.3 9.4-28.2l23.5-47.1c7.1-14.1 10.7-29.7 10.7-45.5l0-2.1c0-55-44.6-99.6-99.6-99.6c-24.1 0-47.4 8.8-65.6 24.6l-3.2 2.8 19.5 15.2c7 5.4 8.2 15.5 2.8 22.5s-15.5 8.2-22.5 2.8l-24.4-19-37-28.8z\"]\n};\nconst faV = {\n  prefix: 'fas',\n  iconName: 'v',\n  icon: [384, 512, [118], \"56\", \"M19.7 34.5c16.3-6.8 35 .9 41.8 17.2L192 364.8 322.5 51.7c6.8-16.3 25.5-24 41.8-17.2s24 25.5 17.2 41.8l-160 384c-5 11.9-16.6 19.7-29.5 19.7s-24.6-7.8-29.5-19.7L2.5 76.3c-6.8-16.3 .9-35 17.2-41.8z\"]\n};\nconst faBangladeshiTakaSign = {\n  prefix: 'fas',\n  iconName: 'bangladeshi-taka-sign',\n  icon: [384, 512, [], \"e2e6\", \"M36 32.3C18.4 30.1 2.4 42.5 .2 60S10.5 93.6 28 95.8l7.9 1c16 2 28 15.6 28 31.8L64 160l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 160c0 53 43 96 96 96l32 0c106 0 192-86 192-192l0-32c0-53-43-96-96-96l-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l16 0c17.7 0 32 14.3 32 32l0 32c0 70.7-57.3 128-128 128l-32 0c-17.7 0-32-14.3-32-32l0-160 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-31.5c0-48.4-36.1-89.3-84.1-95.3l-7.9-1z\"]\n};\nconst faBicycle = {\n  prefix: 'fas',\n  iconName: 'bicycle',\n  icon: [640, 512, [128690], \"f206\", \"M312 32c-13.3 0-24 10.7-24 24s10.7 24 24 24l25.7 0 34.6 64-149.4 0-27.4-38C191 99.7 183.7 96 176 96l-56 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l43.7 0 22.1 30.7-26.6 53.1c-10-2.5-20.5-3.8-31.2-3.8C57.3 224 0 281.3 0 352s57.3 128 128 128c65.3 0 119.1-48.9 127-112l49 0c8.5 0 16.3-4.5 20.7-11.8l84.8-143.5 21.7 40.1C402.4 276.3 384 312 384 352c0 70.7 57.3 128 128 128s128-57.3 128-128s-57.3-128-128-128c-13.5 0-26.5 2.1-38.7 6L375.4 48.8C369.8 38.4 359 32 347.2 32L312 32zM458.6 303.7l32.3 59.7c6.3 11.7 20.9 16 32.5 9.7s16-20.9 9.7-32.5l-32.3-59.7c3.6-.6 7.4-.9 11.2-.9c39.8 0 72 32.2 72 72s-32.2 72-72 72s-72-32.2-72-72c0-18.6 7-35.5 18.6-48.3zM133.2 368l65 0c-7.3 32.1-36 56-70.2 56c-39.8 0-72-32.2-72-72s32.2-72 72-72c1.7 0 3.4 .1 5.1 .2l-24.2 48.5c-9 18.1 4.1 39.4 24.3 39.4zm33.7-48l50.7-101.3 72.9 101.2-.1 .1-123.5 0zm90.6-128l108.5 0L317 274.8 257.4 192z\"]\n};\nconst faStaffSnake = {\n  prefix: 'fas',\n  iconName: 'staff-snake',\n  icon: [384, 512, [\"rod-asclepius\", \"rod-snake\", \"staff-aesculapius\"], \"e579\", \"M222.6 43.2l-.1 4.8L288 48c53 0 96 43 96 96s-43 96-96 96l-40 0 0-80 40 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-40 0-28 0-4.5 144 40.5 0c53 0 96 43 96 96s-43 96-96 96l-16 0 0-80 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-43 0-3.1 99.5L208.5 495l0 1c-.3 8.9-7.6 16-16.5 16s-16.2-7.1-16.5-16l0-1-1-31L136 464c-22.1 0-40-17.9-40-40s17.9-40 40-40l36 0-1-32-19 0c-53 0-96-43-96-96c0-47.6 34.6-87.1 80-94.7l0 94.7c0 8.8 7.2 16 16 16l16.5 0L164 128l-28 0-13.4 0c-9 18.9-28.3 32-50.6 32l-16 0c-30.9 0-56-25.1-56-56S25.1 48 56 48l8 0 8 0 89.5 0-.1-4.8L161 32c0-.7 0-1.3 0-1.9c.5-16.6 14.1-30 31-30s30.5 13.4 31 30c0 .6 0 1.3 0 1.9l-.4 11.2zM64 112a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faRodAsclepius = faStaffSnake;\nconst faRodSnake = faStaffSnake;\nconst faStaffAesculapius = faStaffSnake;\nconst faHeadSideCoughSlash = {\n  prefix: 'fas',\n  iconName: 'head-side-cough-slash',\n  icon: [640, 512, [], \"e062\", \"M448 325.8l44 34.5c8.1 1.4 14.8 6.8 18 14.1L552.9 408c10.6 .4 19.5 7.6 22.2 17.4l39.1 30.6c.6 0 1.2-.1 1.8-.1c11.1 0 20.4 7.5 23.2 17.8l-3.9 0c6.2 8.5 6.4 20.4-.4 29c-8.2 10.4-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2S28.4-3.1 38.8 5.1L89.6 44.9C127 16.7 173.5 0 224 0l24 0c95.2 0 181.2 69.3 197.3 160.2c2.3 13 6.8 25.7 15.1 36l42 52.6c6.2 7.8 9.6 17.4 9.6 27.4c0 24.2-19.6 43.8-43.8 43.8L448 320s0 0 0 0l0 5.8zM0 224.2c0-38.7 9.8-75.1 27.1-106.9L341.8 365.3l-2.5 .3c-11 1.4-19.2 10.7-19.2 21.8c0 11.6 9 21.2 20.6 21.9l62 3.9 43 33.9C439.3 466.2 421.2 480 400 480l-80 0 0 8c0 13.3-10.7 24-24 24l-40 0s0 0 0 0L96 512c-17.7 0-32-14.3-32-32l0-72.7c0-16.7-6.9-32.5-17.1-45.8C16.6 322.4 0 274.1 0 224.2zM616 360a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm-64-48a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm40-24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faTruckMedical = {\n  prefix: 'fas',\n  iconName: 'truck-medical',\n  icon: [640, 512, [128657, \"ambulance\"], \"f0f9\", \"M0 48C0 21.5 21.5 0 48 0L368 0c26.5 0 48 21.5 48 48l0 48 50.7 0c17 0 33.3 6.7 45.3 18.7L589.3 192c12 12 18.7 28.3 18.7 45.3l0 18.7 0 32 0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c0 53-43 96-96 96s-96-43-96-96l-128 0c0 53-43 96-96 96s-96-43-96-96l-16 0c-26.5 0-48-21.5-48-48L0 48zM416 256l128 0 0-18.7L466.7 160 416 160l0 96zM160 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm368-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM176 80l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-48 0 0-48c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faAmbulance = faTruckMedical;\nconst faWheatAwnCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'wheat-awn-circle-exclamation',\n  icon: [640, 512, [], \"e598\", \"M505 41c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L383 95c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l88-88zM305.5 27.3c-6.2-6.2-16.4-6.2-22.6 0L271.5 38.6c-37.5 37.5-37.5 98.3 0 135.8l10.4 10.4-30.5 30.5c-3.4-27.3-15.5-53.8-36.5-74.8l-11.3-11.3c-6.2-6.2-16.4-6.2-22.6 0l-11.3 11.3c-37.5 37.5-37.5 98.3 0 135.8l10.4 10.4-30.5 30.5c-3.4-27.3-15.5-53.8-36.5-74.8L101.8 231c-6.2-6.2-16.4-6.2-22.6 0L67.9 242.3c-37.5 37.5-37.5 98.3 0 135.8l10.4 10.4L9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l68.9-68.9 12.2 12.2c37.5 37.5 98.3 37.5 135.8 0l11.3-11.3c6.2-6.2 6.2-16.4 0-22.6l-11.3-11.3c-21.8-21.8-49.6-34.1-78.1-36.9l31.9-31.9 12.2 12.2c22.5 22.5 53.3 31.5 82.4 27c0-1 0-2.1 0-3.1c0-33.1 9.1-64.1 25-90.6c-15.5-8.7-32.5-13.8-49.8-15.5l31.9-31.9 12.2 12.2c6 6 12.6 11.1 19.7 15.2c27.5-34 67.3-57.5 112.6-63.8c-4.1-3.8-8.4-7.3-12.9-10.5L505 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-59.4 59.4c-20.6-4.4-42-3.7-62.3 2.1c6.1-21.3 6.6-43.8 1.4-65.3L409 41c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L329.1 52.9c-3.7-5-7.8-9.8-12.4-14.3L305.5 27.3zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faSnowman = {\n  prefix: 'fas',\n  iconName: 'snowman',\n  icon: [512, 512, [9731, 9924], \"f7d0\", \"M341.1 140.6c-2 3.9-1.6 8.6 1.2 12c7 8.5 12.9 18.1 17.2 28.4L408 160.2l0-40.2c0-13.3 10.7-24 24-24s24 10.7 24 24l0 19.6 22.5-9.7c12.2-5.2 26.3 .4 31.5 12.6s-.4 26.3-12.6 31.5l-56 24-73.6 31.5c-.5 9.5-2.1 18.6-4.8 27.3c-1.2 3.8-.1 8 2.8 10.8C396.7 296.9 416 338.2 416 384c0 44.7-18.3 85-47.8 114.1c-9.9 9.7-23.7 13.9-37.5 13.9l-149.3 0c-13.9 0-27.7-4.2-37.5-13.9C114.3 469 96 428.7 96 384c0-45.8 19.3-87.1 50.1-116.3c2.9-2.8 4-6.9 2.8-10.8c-2.7-8.7-4.3-17.9-4.8-27.3L70.5 198.1l-56-24C2.4 168.8-3.3 154.7 1.9 142.5s19.3-17.8 31.5-12.6L56 139.6 56 120c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40.2L152.6 181c4.3-10.3 10.1-19.9 17.2-28.4c2.8-3.4 3.3-8.1 1.2-12C164 127.2 160 112.1 160 96c0-53 43-96 96-96s96 43 96 96c0 16.1-4 31.2-10.9 44.6zM224 96a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm48 128a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-16 80a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm16 48a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zM288 96a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm-48 24l0 3.2c0 3.2 .8 6.3 2.3 9l9 16.9c.9 1.7 2.7 2.8 4.7 2.8s3.8-1.1 4.7-2.8l9-16.9c1.5-2.8 2.3-5.9 2.3-9l0-3.2c0-8.8-7.2-16-16-16s-16 7.2-16 16z\"]\n};\nconst faMortarPestle = {\n  prefix: 'fas',\n  iconName: 'mortar-pestle',\n  icon: [512, 512, [], \"f5a7\", \"M504.3 11.1C493.3-1.6 474.5-3.7 461 6.2L252.3 160l144.9 0L502.6 54.6c11.8-11.8 12.6-30.8 1.6-43.5zM32 192c-17.7 0-32 14.3-32 32s14.3 32 32 32c0 82.5 43.4 147.7 123.9 176.2c-11.1 13.9-19.4 30.3-23.9 48.1C127.6 497.4 142.3 512 160 512l192 0c17.7 0 32.4-14.6 28.1-31.7c-4.5-17.8-12.8-34.1-23.9-48.1C436.6 403.7 480 338.5 480 256c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 192z\"]\n};\nconst faRoadBarrier = {\n  prefix: 'fas',\n  iconName: 'road-barrier',\n  icon: [640, 512, [], \"e562\", \"M32 32C14.3 32 0 46.3 0 64L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-181.7L149.2 96 64 96l0-32c0-17.7-14.3-32-32-32zM405.2 96l-74.3 0-5.4 10.7L234.8 288l74.3 0 5.4-10.7L405.2 96zM362.8 288l74.3 0 5.4-10.7L533.2 96l-74.3 0-5.4 10.7L362.8 288zM202.8 96l-5.4 10.7L106.8 288l74.3 0 5.4-10.7L277.2 96l-74.3 0zm288 192l85.2 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-384c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 53.7L490.8 288z\"]\n};\nconst faSchool = {\n  prefix: 'fas',\n  iconName: 'school',\n  icon: [640, 512, [127979], \"f549\", \"M337.8 5.4C327-1.8 313-1.8 302.2 5.4L166.3 96 48 96C21.5 96 0 117.5 0 144L0 464c0 26.5 21.5 48 48 48l208 0 0-96c0-35.3 28.7-64 64-64s64 28.7 64 64l0 96 208 0c26.5 0 48-21.5 48-48l0-320c0-26.5-21.5-48-48-48L473.7 96 337.8 5.4zM96 192l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zm400 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64zM96 320l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zm400 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64zM232 176a88 88 0 1 1 176 0 88 88 0 1 1 -176 0zm88-48c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-16 0 0-16c0-8.8-7.2-16-16-16z\"]\n};\nconst faIgloo = {\n  prefix: 'fas',\n  iconName: 'igloo',\n  icon: [576, 512, [], \"f7ae\", \"M320 33.8L320 160 48.5 160C100.2 82.8 188.1 32 288 32c10.8 0 21.5 .6 32 1.8zM352 160l0-120.9C424.9 55.7 487.2 99.8 527.5 160L352 160zM29.9 192L96 192l0 128L0 320c0-46 10.8-89.4 29.9-128zM192 320l-64 0 0-128 320 0 0 128-64 0 0 32 192 0 0 80c0 26.5-21.5 48-48 48l-176 0 0-128c0-35.3-28.7-64-64-64s-64 28.7-64 64l0 128L48 480c-26.5 0-48-21.5-48-48l0-80 192 0 0-32zm288 0l0-128 66.1 0c19.2 38.6 29.9 82 29.9 128l-96 0z\"]\n};\nconst faJoint = {\n  prefix: 'fas',\n  iconName: 'joint',\n  icon: [640, 512, [], \"f595\", \"M448 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 11c0 55.2 21.9 108.1 60.9 147.1l21 21c9 9 14.1 21.2 14.1 33.9l0 11c0 17.7 14.3 32 32 32s32-14.3 32-32l0-11c0-29.7-11.8-58.2-32.8-79.2l-21-21C463.2 117.8 448 81.2 448 43l0-11zM576 256c0 17.7 14.3 32 32 32s32-14.3 32-32l0-11c0-55.2-21.9-108.1-60.9-147.1l-21-21c-9-9-14.1-21.2-14.1-33.9l0-11c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 11c0 29.7 11.8 58.2 32.8 79.2l21 21c27 27 42.2 63.6 42.2 101.8l0 11zM229.8 360c-4.7-2.3-10-2.7-15.2-2c-37.8 5.6-75.2 14.3-106.9 22.8C81.3 388 58.3 395.1 42 400.4c-8.2 2.7-14.7 4.9-19.2 6.5c-2.3 .8-4 1.4-5.2 1.8l-1.3 .5C6.8 412.5 0 421.4 0 432s6.8 19.5 16.3 22.7l1.3 .5c1.2 .4 3 1.1 5.2 1.8c4.5 1.6 11 3.8 19.2 6.5c16.3 5.4 39.2 12.5 65.7 19.6C160.3 497.3 228.8 512 288 512l67.3 0c4.1 0 6.3-5.1 3.6-8.3L256.5 380.8c-7.4-8.9-16.5-15.9-26.7-20.8zM445 512l19 0 51.3 0c4.1 0 6.3-5.1 3.6-8.3L416.5 380.8C401.3 362.5 378.8 352 355 352l-19 0-48 0c-1.1 0-2.3 0-3.4 0c-4.1 0-6.2 5.1-3.5 8.3L383.5 483.2C398.7 501.5 421.2 512 445 512zm-3.9-151.7L543.5 483.2c14.6 17.5 35.9 27.9 58.6 28.7c21.1-1.1 37.9-18.6 37.9-39.9l0-80c0-22.1-17.9-40-40-40l-155.3 0c-4.1 0-6.3 5.1-3.6 8.3z\"]\n};\nconst faAngleRight = {\n  prefix: 'fas',\n  iconName: 'angle-right',\n  icon: [320, 512, [8250], \"f105\", \"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z\"]\n};\nconst faHorse = {\n  prefix: 'fas',\n  iconName: 'horse',\n  icon: [576, 512, [128014], \"f6f0\", \"M448 238.1l0-78.1 16 0 9.8 19.6c12.5 25.1 42.2 36.4 68.3 26c20.5-8.2 33.9-28 33.9-50.1L576 80c0-19.1-8.4-36.3-21.7-48l5.7 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L480 0 448 0C377.3 0 320 57.3 320 128l-96 0-20.8 0-54.4 0c-30.7 0-57.6 16.3-72.5 40.8C33.2 174.5 0 211.4 0 256l0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-56c0-13.4 6.6-25.2 16.7-32.5c1.6 13 6.3 25.4 13.6 36.4l28.2 42.4c8.3 12.4 6.4 28.7-1.2 41.6c-16.5 28-20.6 62.2-10 93.9l17.5 52.4c4.4 13.1 16.6 21.9 30.4 21.9l33.7 0c21.8 0 37.3-21.4 30.4-42.1l-20.8-62.5c-2.1-6.4-.5-13.4 4.3-18.2l12.7-12.7c13.2-13.2 20.6-31.1 20.6-49.7c0-2.3-.1-4.6-.3-6.9l84 24c4.1 1.2 8.2 2.1 12.3 2.8L320 480c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-164.3c19.2-19.2 31.5-45.7 32-75.7c0 0 0 0 0 0l0-1.9zM496 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z\"]\n};\nconst faQ = {\n  prefix: 'fas',\n  iconName: 'q',\n  icon: [448, 512, [113], \"51\", \"M64 256c0 88.4 71.6 160 160 160c28.9 0 56-7.7 79.4-21.1l-72-86.4c-11.3-13.6-9.5-33.8 4.1-45.1s33.8-9.5 45.1 4.1l70.9 85.1C371.9 325.8 384 292.3 384 256c0-88.4-71.6-160-160-160S64 167.6 64 256zM344.9 444.6C310 467 268.5 480 224 480C100.3 480 0 379.7 0 256S100.3 32 224 32s224 100.3 224 224c0 56.1-20.6 107.4-54.7 146.7l47.3 56.8c11.3 13.6 9.5 33.8-4.1 45.1s-33.8 9.5-45.1-4.1l-46.6-55.9z\"]\n};\nconst faG = {\n  prefix: 'fas',\n  iconName: 'g',\n  icon: [448, 512, [103], \"47\", \"M224 96C135.6 96 64 167.6 64 256s71.6 160 160 160c77.4 0 142-55 156.8-128L256 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l144 0c25.8 0 49.6 21.4 47.2 50.6C437.8 389.6 341.4 480 224 480C100.3 480 0 379.7 0 256S100.3 32 224 32c57.4 0 109.7 21.6 149.3 57c13.2 11.8 14.3 32 2.5 45.2s-32 14.3-45.2 2.5C302.3 111.4 265 96 224 96z\"]\n};\nconst faNotesMedical = {\n  prefix: 'fas',\n  iconName: 'notes-medical',\n  icon: [512, 512, [], \"f481\", \"M96 352L96 96c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 197.5c0 17-6.7 33.3-18.7 45.3l-58.5 58.5c-12 12-28.3 18.7-45.3 18.7L160 416c-35.3 0-64-28.7-64-64zM272 128c-8.8 0-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-48 0 0-48c0-8.8-7.2-16-16-16l-32 0zm24 336c13.3 0 24 10.7 24 24s-10.7 24-24 24l-160 0C60.9 512 0 451.1 0 376L0 152c0-13.3 10.7-24 24-24s24 10.7 24 24l0 224c0 48.6 39.4 88 88 88l160 0z\"]\n};\nconst faTemperatureHalf = {\n  prefix: 'fas',\n  iconName: 'temperature-half',\n  icon: [320, 512, [127777, \"temperature-2\", \"thermometer-2\", \"thermometer-half\"], \"f2c9\", \"M160 64c-26.5 0-48 21.5-48 48l0 164.5c0 17.3-7.1 31.9-15.3 42.5C86.2 332.6 80 349.5 80 368c0 44.2 35.8 80 80 80s80-35.8 80-80c0-18.5-6.2-35.4-16.7-48.9c-8.2-10.6-15.3-25.2-15.3-42.5L208 112c0-26.5-21.5-48-48-48zM48 112C48 50.2 98.1 0 160 0s112 50.1 112 112l0 164.4c0 .1 .1 .3 .2 .6c.2 .6 .8 1.6 1.7 2.8c18.9 24.4 30.1 55 30.1 88.1c0 79.5-64.5 144-144 144S16 447.5 16 368c0-33.2 11.2-63.8 30.1-88.1c.9-1.2 1.5-2.2 1.7-2.8c.1-.3 .2-.5 .2-.6L48 112zM208 368c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-20.9 13.4-38.7 32-45.3L144 208c0-8.8 7.2-16 16-16s16 7.2 16 16l0 114.7c18.6 6.6 32 24.4 32 45.3z\"]\n};\nconst faTemperature2 = faTemperatureHalf;\nconst faThermometer2 = faTemperatureHalf;\nconst faThermometerHalf = faTemperatureHalf;\nconst faDongSign = {\n  prefix: 'fas',\n  iconName: 'dong-sign',\n  icon: [384, 512, [], \"e169\", \"M288 32c-17.7 0-32 14.3-32 32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 49.1c-18.8-10.9-40.7-17.1-64-17.1c-70.7 0-128 57.3-128 128s57.3 128 128 128c24.5 0 47.4-6.9 66.8-18.8c5 11.1 16.2 18.8 29.2 18.8c17.7 0 32-14.3 32-32l0-96 0-160c17.7 0 32-14.3 32-32s-14.3-32-32-32c0-17.7-14.3-32-32-32zM128 288a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l320 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 448z\"]\n};\nconst faCapsules = {\n  prefix: 'fas',\n  iconName: 'capsules',\n  icon: [576, 512, [], \"f46b\", \"M64 144c0-26.5 21.5-48 48-48s48 21.5 48 48l0 112-96 0 0-112zM0 144L0 368c0 61.9 50.1 112 112 112s112-50.1 112-112l0-178.4c1.8 19.1 8.2 38 19.8 54.8L372.3 431.7c35.5 51.7 105.3 64.3 156 28.1s63-107.5 27.5-159.2L427.3 113.3C391.8 61.5 321.9 49 271.3 85.2c-28 20-44.3 50.8-47.3 83l0-24.2c0-61.9-50.1-112-112-112S0 82.1 0 144zm296.6 64.2c-16-23.3-10-55.3 11.9-71c21.2-15.1 50.5-10.3 66 12.2l67 97.6L361.6 303l-65-94.8zM491 407.7c-.8 .6-1.6 1.1-2.4 1.6l4-2.8c-.5 .4-1 .8-1.6 1.2z\"]\n};\nconst faPooStorm = {\n  prefix: 'fas',\n  iconName: 'poo-storm',\n  icon: [448, 512, [\"poo-bolt\"], \"f75a\", \"M236.9 .2c-5.5-.7-11 1.4-14.5 5.7s-4.6 10.1-2.8 15.3c2.8 8.2 4.3 16.9 4.3 26.1c0 21.7-8.5 37.2-21.9 47.6c-13.8 10.8-34 17-57.8 17L128 112c-35.3 0-64 28.7-64 64c0 12.2 3.4 23.5 9.3 33.2C31.7 216.2 0 252.4 0 296c0 40.9 28 75.4 65.8 85.2c-5.3-18.5 1-38.5 16.2-50.7l160-128c17.6-14.1 42.6-14 60.2 .2s22.8 38.6 12.8 58.8L285.7 320l18.3 0c20.4 0 38.5 12.9 45.3 32.1c3.7 10.6 3.5 21.8 0 31.9l10.7 0c48.6 0 88-39.4 88-88c0-43.6-31.7-79.8-73.3-86.8c5.9-9.7 9.3-21.1 9.3-33.2c0-35.3-28.7-64-64-64l-1.4 0c.9-5.4 1.4-10.9 1.4-16.6c0-48.7-36.1-88.9-83.1-95.2zm45.1 227.4c-5.8-4.7-14.2-4.7-20.1-.1l-160 128c-5.3 4.2-7.4 11.4-5.1 17.8s8.3 10.7 15.1 10.7l70.1 0L129.7 488.8c-3.4 6.7-1.6 14.9 4.3 19.6s14.2 4.7 20.1 .1l160-128c5.3-4.2 7.4-11.4 5.1-17.8s-8.3-10.7-15.1-10.7l-70.1 0 52.4-104.8c3.4-6.7 1.6-14.9-4.3-19.6z\"]\n};\nconst faPooBolt = faPooStorm;\nconst faFaceFrownOpen = {\n  prefix: 'fas',\n  iconName: 'face-frown-open',\n  icon: [512, 512, [128550, \"frown-open\"], \"f57a\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM176.4 176a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-122 174.5c-12.4 5.2-26.5-4.1-21.1-16.4c16-36.6 52.4-62.1 94.8-62.1s78.8 25.6 94.8 62.1c5.4 12.3-8.7 21.6-21.1 16.4c-22.4-9.5-47.4-14.8-73.7-14.8s-51.3 5.3-73.7 14.8z\"]\n};\nconst faFrownOpen = faFaceFrownOpen;\nconst faHandPointUp = {\n  prefix: 'fas',\n  iconName: 'hand-point-up',\n  icon: [384, 512, [9757], \"f0a6\", \"M32 32C32 14.3 46.3 0 64 0S96 14.3 96 32l0 208-64 0L32 32zM224 192c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zm-64-64c17.7 0 32 14.3 32 32l0 48c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-48c0-17.7 14.3-32 32-32zm160 96c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zm-96 88l0-.6c9.4 5.4 20.3 8.6 32 8.6c13.2 0 25.4-4 35.6-10.8c8.7 24.9 32.5 42.8 60.4 42.8c11.7 0 22.6-3.1 32-8.6l0 8.6c0 88.4-71.6 160-160 160l-61.7 0c-42.4 0-83.1-16.9-113.1-46.9L37.5 453.5C13.5 429.5 0 396.9 0 363l0-27c0-35.3 28.7-64 64-64l88 0c22.1 0 40 17.9 40 40s-17.9 40-40 40l-56 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l56 0c39.8 0 72-32.2 72-72z\"]\n};\nconst faMoneyBill = {\n  prefix: 'fas',\n  iconName: 'money-bill',\n  icon: [576, 512, [], \"f0d6\", \"M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zm64 320l-64 0 0-64c35.3 0 64 28.7 64 64zM64 192l0-64 64 0c0 35.3-28.7 64-64 64zM448 384c0-35.3 28.7-64 64-64l0 64-64 0zm64-192c-35.3 0-64-28.7-64-64l64 0 0 64zM288 160a96 96 0 1 1 0 192 96 96 0 1 1 0-192z\"]\n};\nconst faBookmark = {\n  prefix: 'fas',\n  iconName: 'bookmark',\n  icon: [384, 512, [128278, 61591], \"f02e\", \"M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z\"]\n};\nconst faAlignJustify = {\n  prefix: 'fas',\n  iconName: 'align-justify',\n  icon: [448, 512, [], \"f039\", \"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z\"]\n};\nconst faUmbrellaBeach = {\n  prefix: 'fas',\n  iconName: 'umbrella-beach',\n  icon: [576, 512, [127958], \"f5ca\", \"M346.3 271.8l-60.1-21.9L214 448 32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l512 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-261.9 0 64.1-176.2zm121.1-.2l-3.3 9.1 67.7 24.6c18.1 6.6 38-4.2 39.6-23.4c6.5-78.5-23.9-155.5-80.8-208.5c2 8 3.2 16.3 3.4 24.8l.2 6c1.8 57-7.3 113.8-26.8 167.4zM462 99.1c-1.1-34.4-22.5-64.8-54.4-77.4c-.9-.4-1.9-.7-2.8-1.1c-33-11.7-69.8-2.4-93.1 23.8l-4 4.5C272.4 88.3 245 134.2 226.8 184l-3.3 9.1L434 269.7l3.3-9.1c18.1-49.8 26.6-102.5 24.9-155.5l-.2-6zM107.2 112.9c-11.1 15.7-2.8 36.8 15.3 43.4l71 25.8 3.3-9.1c19.5-53.6 49.1-103 87.1-145.5l4-4.5c6.2-6.9 13.1-13 20.5-18.2c-79.6 2.5-154.7 42.2-201.2 108z\"]\n};\nconst faHelmetUn = {\n  prefix: 'fas',\n  iconName: 'helmet-un',\n  icon: [512, 512, [], \"e503\", \"M479.5 224C471.2 98.9 367.2 0 240 0C107.5 0 0 107.5 0 240l0 56.3C0 344.8 39.2 384 87.7 384L200 384l14.9 0L343.5 505.4c4.5 4.2 10.4 6.6 16.5 6.6l96 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-86.5 0-1.5-1.5L368 288l80 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-.5 0zM320 417.2l-78-73.7L274.4 288l45.6 0 0 129.2zM285.3 103.1l34.7 52 0-43.2c0-8.8 7.2-16 16-16s16 7.2 16 16l0 96c0 7.1-4.6 13.3-11.4 15.3s-14-.6-17.9-6.4l-34.7-52 0 43.2c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-7.1 4.6-13.3 11.4-15.3s14 .6 17.9 6.4zM160 112l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faBullseye = {\n  prefix: 'fas',\n  iconName: 'bullseye',\n  icon: [512, 512, [], \"f140\", \"M448 256A192 192 0 1 0 64 256a192 192 0 1 0 384 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 80a80 80 0 1 0 0-160 80 80 0 1 0 0 160zm0-224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zM224 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faBacon = {\n  prefix: 'fas',\n  iconName: 'bacon',\n  icon: [576, 512, [129363], \"f7e5\", \"M439.2 1.2c11.2-3.2 23.2-.1 31.4 8.1L518 56.7l-26.5 7.9c-58 16.6-98.1 39.6-129.6 67.4c-31.2 27.5-53.2 59.1-75.1 90.9l-2.3 3.3C241.6 288.7 195 356.6 72.8 417.7L37.9 435.2 9.4 406.6c-7.3-7.3-10.6-17.6-9-27.8s8.1-18.9 17.3-23.5C136.1 296.2 180.9 231 223.3 169.3l2.3-3.4c21.8-31.8 44.9-64.9 77.7-93.9c33.4-29.5 75.8-53.6 135.9-70.8zM61.8 459l25.4-12.7c129.5-64.7 179.9-138.1 223.8-202l2.2-3.3c22.1-32.1 42.1-60.5 69.9-85.1c27.5-24.3 63.4-45.2 117.3-60.6c0 0 0 0 0 0l.2-.1 43.1-12.9 23 23c8 8 11.2 19.7 8.3 30.7s-11.3 19.6-22.2 22.7c-51.9 14.8-85.6 34.7-111.1 57.2c-26.1 23-45.1 49.9-67.3 82.1l-2.2 3.2C327.8 365.9 275.5 442 142.3 508.6c-12.3 6.2-27.2 3.7-36.9-6L61.8 459z\"]\n};\nconst faHandPointDown = {\n  prefix: 'fas',\n  iconName: 'hand-point-down',\n  icon: [384, 512, [], \"f0a7\", \"M32 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-208-64 0 0 208zM224 320c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64zm-64 64c17.7 0 32-14.3 32-32l0-48c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 48c0 17.7 14.3 32 32 32zm160-96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64zm-96-88l0 .6c9.4-5.4 20.3-8.6 32-8.6c13.2 0 25.4 4 35.6 10.8c8.7-24.9 32.5-42.8 60.4-42.8c11.7 0 22.6 3.1 32 8.6l0-8.6C384 71.6 312.4 0 224 0L162.3 0C119.8 0 79.1 16.9 49.1 46.9L37.5 58.5C13.5 82.5 0 115.1 0 149l0 27c0 35.3 28.7 64 64 64l88 0c22.1 0 40-17.9 40-40s-17.9-40-40-40l-56 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l56 0c39.8 0 72 32.2 72 72z\"]\n};\nconst faArrowUpFromBracket = {\n  prefix: 'fas',\n  iconName: 'arrow-up-from-bracket',\n  icon: [448, 512, [], \"e09a\", \"M246.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 109.3 192 320c0 17.7 14.3 32 32 32s32-14.3 32-32l0-210.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-64z\"]\n};\nconst faFolder = {\n  prefix: 'fas',\n  iconName: 'folder',\n  icon: [512, 512, [128193, 128447, 61716, \"folder-blank\"], \"f07b\", \"M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z\"]\n};\nconst faFolderBlank = faFolder;\nconst faFileWaveform = {\n  prefix: 'fas',\n  iconName: 'file-waveform',\n  icon: [448, 512, [\"file-medical-alt\"], \"f478\", \"M96 0C60.7 0 32 28.7 32 64l0 224 112 0c6.1 0 11.6 3.4 14.3 8.8L176 332.2l49.7-99.4c2.7-5.4 8.3-8.8 14.3-8.8s11.6 3.4 14.3 8.8L281.9 288l70.1 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-80 0c-6.1 0-11.6-3.4-14.3-8.8L240 275.8l-49.7 99.4c-2.7 5.4-8.3 8.8-14.3 8.8s-11.6-3.4-14.3-8.8L134.1 320 32 320l0 128c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L256 0 96 0zM288 0l0 128 128 0L288 0z\"]\n};\nconst faFileMedicalAlt = faFileWaveform;\nconst faRadiation = {\n  prefix: 'fas',\n  iconName: 'radiation',\n  icon: [512, 512, [], \"f7b9\", \"M216 186.7c-23.9 13.8-40 39.7-40 69.3L32 256C14.3 256-.2 241.6 2 224.1C10.7 154 47.8 92.7 101.3 52c14.1-10.7 33.8-5.3 42.7 10l72 124.7zM256 336c14.6 0 28.2-3.9 40-10.7l72 124.8c8.8 15.3 3.7 35.1-12.6 41.9c-30.6 12.9-64.2 20-99.4 20s-68.9-7.1-99.4-20c-16.3-6.9-21.4-26.6-12.6-41.9l72-124.8c11.8 6.8 25.4 10.7 40 10.7zm224-80l-144 0c0-29.6-16.1-55.5-40-69.3L368 62c8.8-15.3 28.6-20.7 42.7-10c53.6 40.7 90.6 102 99.4 172.1c2.2 17.5-12.4 31.9-30 31.9zM256 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faChartSimple = {\n  prefix: 'fas',\n  iconName: 'chart-simple',\n  icon: [448, 512, [], \"e473\", \"M160 80c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 352c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-352zM0 272c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48L0 272zM368 96l32 0c26.5 0 48 21.5 48 48l0 288c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48z\"]\n};\nconst faMarsStroke = {\n  prefix: 'fas',\n  iconName: 'mars-stroke',\n  icon: [512, 512, [9894], \"f229\", \"M376 0c-9.7 0-18.5 5.8-22.2 14.8s-1.7 19.3 5.2 26.2l33.4 33.4L370.3 96.4 345 71c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l25.4 25.4L307.8 159c-28.4-19.5-62.7-31-99.8-31c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176c0-37-11.4-71.4-31-99.8l28.6-28.6L407 201c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-25.4-25.4 22.1-22.1L471 153c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2l0-112c0-13.3-10.7-24-24-24L376 0zm88 48s0 0 0 0s0 0 0 0s0 0 0 0zM96 304a112 112 0 1 1 224 0A112 112 0 1 1 96 304z\"]\n};\nconst faVial = {\n  prefix: 'fas',\n  iconName: 'vial',\n  icon: [512, 512, [129514], \"f492\", \"M342.6 9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4L28.1 342.6C10.1 360.6 0 385 0 410.5L0 416c0 53 43 96 96 96l5.5 0c25.5 0 49.9-10.1 67.9-28.1L448 205.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-32-32-96-96-32-32zM205.3 256L352 109.3 402.7 160l-96 96-101.5 0z\"]\n};\nconst faGauge = {\n  prefix: 'fas',\n  iconName: 'gauge',\n  icon: [512, 512, [\"dashboard\", \"gauge-med\", \"tachometer-alt-average\"], \"f624\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-26.9-16.5-49.9-40-59.3L280 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 204.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64s64-28.7 64-64zM144 176a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm-16 80a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM400 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faDashboard = faGauge;\nconst faGaugeMed = faGauge;\nconst faTachometerAltAverage = faGauge;\nconst faWandMagicSparkles = {\n  prefix: 'fas',\n  iconName: 'wand-magic-sparkles',\n  icon: [576, 512, [\"magic-wand-sparkles\"], \"e2ca\", \"M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z\"]\n};\nconst faMagicWandSparkles = faWandMagicSparkles;\nconst faE = {\n  prefix: 'fas',\n  iconName: 'e',\n  icon: [320, 512, [101], \"45\", \"M64 32C28.7 32 0 60.7 0 96L0 256 0 416c0 35.3 28.7 64 64 64l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 416l0-128 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 224 64 96l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32z\"]\n};\nconst faPenClip = {\n  prefix: 'fas',\n  iconName: 'pen-clip',\n  icon: [512, 512, [\"pen-alt\"], \"f305\", \"M453.3 19.3l39.4 39.4c25 25 25 65.5 0 90.5l-52.1 52.1s0 0 0 0l-1-1s0 0 0 0l-16-16-96-96-17-17 52.1-52.1c25-25 65.5-25 90.5 0zM241 114.9c-9.4-9.4-24.6-9.4-33.9 0L105 217c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L173.1 81c28.1-28.1 73.7-28.1 101.8 0L288 94.1l17 17 96 96 16 16 1 1-17 17L229.5 412.5c-48 48-109.2 80.8-175.8 94.1l-25 5c-7.9 1.6-16-.9-21.7-6.6s-8.1-13.8-6.6-21.7l5-25c13.3-66.6 46.1-127.8 94.1-175.8L254.1 128 241 114.9z\"]\n};\nconst faPenAlt = faPenClip;\nconst faBridgeCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'bridge-circle-exclamation',\n  icon: [640, 512, [], \"e4ca\", \"M64 32C46.3 32 32 46.3 32 64s14.3 32 32 32l40 0 0 64-72 0 0 128c53 0 96 43 96 96l0 64c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-64c0-53 43-96 96-96c6.3 0 12.4 .6 18.3 1.7C367.1 231.8 426.9 192 496 192c42.5 0 81.6 15.1 112 40.2l0-72.2-72 0 0-64 40 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32zM488 96l0 64-80 0 0-64 80 0zM360 96l0 64-80 0 0-64 80 0zM232 96l0 64-80 0 0-64 80 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faUser = {\n  prefix: 'fas',\n  iconName: 'user',\n  icon: [448, 512, [128100, 62144], \"f007\", \"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z\"]\n};\nconst faSchoolCircleCheck = {\n  prefix: 'fas',\n  iconName: 'school-circle-check',\n  icon: [640, 512, [], \"e56b\", \"M337.8 5.4C327-1.8 313-1.8 302.2 5.4L166.3 96 48 96C21.5 96 0 117.5 0 144L0 464c0 26.5 21.5 48 48 48l272 0s0 0 0 0l-64 0 0-96c0-35.3 28.7-64 64-64l.3 0 .5 0c3.4-37.7 18.7-72.1 42.2-99.1C350.2 260 335.6 264 320 264c-48.6 0-88-39.4-88-88s39.4-88 88-88s88 39.4 88 88c0 18.3-5.6 35.3-15.1 49.4c29-21 64.6-33.4 103.1-33.4c59.5 0 112.1 29.6 144 74.8L640 144c0-26.5-21.5-48-48-48L473.7 96 337.8 5.4zM96 192l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zm0 128l32 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16zM320 128c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-16 0 0-16c0-8.8-7.2-16-16-16zM640 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-99.3-43.3c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 385.4l60.7-60.7z\"]\n};\nconst faDumpster = {\n  prefix: 'fas',\n  iconName: 'dumpster',\n  icon: [576, 512, [], \"f793\", \"M49.7 32c-10.5 0-19.8 6.9-22.9 16.9L.9 133c-.6 2-.9 4.1-.9 6.1C0 150.7 9.3 160 20.9 160l94 0L140.5 32 49.7 32zM272 160l0-128-98.9 0L147.5 160 272 160zm32 0l124.5 0L402.9 32 304 32l0 128zm157.1 0l94 0c11.5 0 20.9-9.3 20.9-20.9c0-2.1-.3-4.1-.9-6.1L549.2 48.9C546.1 38.9 536.8 32 526.3 32l-90.8 0 25.6 128zM32 192l4 32-4 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l12 0L64 448c0 17.7 14.3 32 32 32s32-14.3 32-32l320 0c0 17.7 14.3 32 32 32s32-14.3 32-32l20-160 12 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-4 0 4-32L32 192z\"]\n};\nconst faVanShuttle = {\n  prefix: 'fas',\n  iconName: 'van-shuttle',\n  icon: [640, 512, [128656, \"shuttle-van\"], \"f5b6\", \"M64 104l0 88 96 0 0-96L72 96c-4.4 0-8 3.6-8 8zm482 88L465.1 96 384 96l0 96 162 0zm-226 0l0-96-96 0 0 96 96 0zM592 384l-16 0c0 53-43 96-96 96s-96-43-96-96l-128 0c0 53-43 96-96 96s-96-43-96-96l-16 0c-26.5 0-48-21.5-48-48L0 104C0 64.2 32.2 32 72 32l120 0 160 0 113.1 0c18.9 0 36.8 8.3 49 22.8L625 186.5c9.7 11.5 15 26.1 15 41.2L640 336c0 26.5-21.5 48-48 48zm-64 0a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM160 432a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faShuttleVan = faVanShuttle;\nconst faBuildingUser = {\n  prefix: 'fas',\n  iconName: 'building-user',\n  icon: [640, 512, [], \"e4da\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 89.9 0c-6.3-10.2-9.9-22.2-9.9-35.1c0-46.9 25.8-87.8 64-109.2l0-95.9L384 48c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM576 272a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM352 477.1c0 19.3 15.6 34.9 34.9 34.9l218.2 0c19.3 0 34.9-15.6 34.9-34.9c0-51.4-41.7-93.1-93.1-93.1l-101.8 0c-51.4 0-93.1 41.7-93.1 93.1z\"]\n};\nconst faSquareCaretLeft = {\n  prefix: 'fas',\n  iconName: 'square-caret-left',\n  icon: [448, 512, [\"caret-square-left\"], \"f191\", \"M0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416zM128 256c0-6.7 2.8-13 7.7-17.6l112-104c7-6.5 17.2-8.2 25.9-4.4s14.4 12.5 14.4 22l0 208c0 9.5-5.7 18.2-14.4 22s-18.9 2.1-25.9-4.4l-112-104c-4.9-4.5-7.7-10.9-7.7-17.6z\"]\n};\nconst faCaretSquareLeft = faSquareCaretLeft;\nconst faHighlighter = {\n  prefix: 'fas',\n  iconName: 'highlighter',\n  icon: [576, 512, [], \"f591\", \"M315 315l158.4-215L444.1 70.6 229 229 315 315zm-187 5s0 0 0 0l0-71.7c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0c11.4 0 22.4 4.5 30.5 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5c0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5L224 416l-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l63-63 70.6 70.6-31 31c-4.5 4.5-10.6 7-17 7L24 512c-13.3 0-24-10.7-24-24l0-4.7c0-6.4 2.5-12.5 7-17z\"]\n};\nconst faKey = {\n  prefix: 'fas',\n  iconName: 'key',\n  icon: [512, 512, [128273], \"f084\", \"M336 352c97.2 0 176-78.8 176-176S433.2 0 336 0S160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7L7 391c-4.5 4.5-7 10.6-7 17l0 80c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-40 40 0c13.3 0 24-10.7 24-24l0-40 40 0c6.4 0 12.5-2.5 17-7l33.3-33.3c16.9 5.4 35 8.3 53.7 8.3zM376 96a40 40 0 1 1 0 80 40 40 0 1 1 0-80z\"]\n};\nconst faBullhorn = {\n  prefix: 'fas',\n  iconName: 'bullhorn',\n  icon: [512, 512, [128226, 128363], \"f0a1\", \"M480 32c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9L381.7 53c-48 48-113.1 75-181 75l-8.7 0-32 0-96 0c-35.3 0-64 28.7-64 64l0 96c0 35.3 28.7 64 64 64l0 128c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-128 8.7 0c67.9 0 133 27 181 75l43.6 43.6c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-147.6c18.6-8.8 32-32.5 32-60.4s-13.4-51.6-32-60.4L480 32zm-64 76.7L416 240l0 131.3C357.2 317.8 280.5 288 200.7 288l-8.7 0 0-96 8.7 0c79.8 0 156.5-29.8 215.3-83.3z\"]\n};\nconst faGlobe = {\n  prefix: 'fas',\n  iconName: 'globe',\n  icon: [512, 512, [127760], \"f0ac\", \"M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z\"]\n};\nconst faSynagogue = {\n  prefix: 'fas',\n  iconName: 'synagogue',\n  icon: [640, 512, [128333], \"f69b\", \"M309.8 3.7c5.9-4.9 14.6-4.9 20.5 0l121 100.8C469.5 119.7 480 142.2 480 166l0 114.1L480 512l-16 0-112 0 0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96-112 0-16 0 0-231.9L160 166c0-23.7 10.5-46.3 28.8-61.5L309.8 3.7zM512 512l0-267.5 28.1-31.2c3-3.4 7.4-5.3 11.9-5.3s8.9 1.9 11.9 5.3l63.8 70.9c7.9 8.8 12.3 20.3 12.3 32.1L640 448c0 35.3-28.7 64-64 64l-64 0zM128 244.5L128 512l-64 0c-35.3 0-64-28.7-64-64L0 316.3c0-11.9 4.4-23.3 12.3-32.1l63.8-70.9c3-3.4 7.4-5.3 11.9-5.3s8.9 1.9 11.9 5.3L128 244.5zM327 124.3c-3.1-5.4-10.9-5.4-13.9 0l-15.9 28.1-32.3-.3c-6.2-.1-10.1 6.7-7 12.1L274.3 192l-16.4 27.8c-3.2 5.4 .7 12.1 7 12.1l32.3-.3L313 259.7c3.1 5.4 10.9 5.4 13.9 0l15.9-28.1 32.3 .3c6.2 .1 10.1-6.7 7-12.1L365.7 192l16.4-27.8c3.2-5.4-.7-12.1-7-12.1l-32.3 .3L327 124.3z\"]\n};\nconst faPersonHalfDress = {\n  prefix: 'fas',\n  iconName: 'person-half-dress',\n  icon: [320, 512, [], \"e548\", \"M160 0a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm8 352l0-224 6.9 0c33.7 0 64.9 17.7 82.3 46.6l58.3 97c9.1 15.1 4.2 34.8-10.9 43.9s-34.8 4.2-43.9-10.9L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128s0 0 0 0zM58.2 182.3c19.9-33.1 55.3-53.5 93.8-54.3l0 256s0 0 0 0l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-17.8 0c-10.9 0-18.6-10.7-15.2-21.1L93.3 248.1 59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l53.6-89.2z\"]\n};\nconst faRoadBridge = {\n  prefix: 'fas',\n  iconName: 'road-bridge',\n  icon: [640, 512, [], \"e563\", \"M352 0L608 0c17.7 0 32 14.3 32 32l0 448c0 17.7-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32l0-448c0-17.7 14.3-32 32-32zM480 200c-13.3 0-24 10.7-24 24l0 64c0 13.3 10.7 24 24 24s24-10.7 24-24l0-64c0-13.3-10.7-24-24-24zm24 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 64c0 13.3 10.7 24 24 24s24-10.7 24-24l0-64zM480 40c-13.3 0-24 10.7-24 24l0 64c0 13.3 10.7 24 24 24s24-10.7 24-24l0-64c0-13.3-10.7-24-24-24zM32 96l256 0 0 64-40 0 0 64 40 0 0 96c-53 0-96 43-96 96l0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64c0-53-43-96-96-96l0-96 72 0 0-64-40 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm168 64l-80 0 0 64 80 0 0-64z\"]\n};\nconst faLocationArrow = {\n  prefix: 'fas',\n  iconName: 'location-arrow',\n  icon: [448, 512, [], \"f124\", \"M429.6 92.1c4.9-11.9 2.1-25.6-7-34.7s-22.8-11.9-34.7-7l-352 144c-14.2 5.8-22.2 20.8-19.3 35.8s16.1 25.8 31.4 25.8l176 0 0 176c0 15.3 10.8 28.4 25.8 31.4s30-5.1 35.8-19.3l144-352z\"]\n};\nconst faC = {\n  prefix: 'fas',\n  iconName: 'c',\n  icon: [384, 512, [99], \"43\", \"M329.1 142.9c-62.5-62.5-155.8-62.5-218.3 0s-62.5 163.8 0 226.3s155.8 62.5 218.3 0c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3c-87.5 87.5-221.3 87.5-308.8 0s-87.5-229.3 0-316.8s221.3-87.5 308.8 0c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0z\"]\n};\nconst faTabletButton = {\n  prefix: 'fas',\n  iconName: 'tablet-button',\n  icon: [448, 512, [], \"f10a\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L64 0zM224 400a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faBuildingLock = {\n  prefix: 'fas',\n  iconName: 'building-lock',\n  icon: [576, 512, [], \"e4d6\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 88.6 0c-5.4-9.4-8.6-20.3-8.6-32l0-128c0-23.7 12.9-44.4 32-55.4l0-24.6c0-30.5 12.2-58.2 32-78.4L384 48c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM464 240c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z\"]\n};\nconst faPizzaSlice = {\n  prefix: 'fas',\n  iconName: 'pizza-slice',\n  icon: [512, 512, [], \"f818\", \"M169.7 .9c-22.8-1.6-41.9 14-47.5 34.7L110.4 80c.5 0 1.1 0 1.6 0c176.7 0 320 143.3 320 320c0 .5 0 1.1 0 1.6l44.4-11.8c20.8-5.5 36.3-24.7 34.7-47.5C498.5 159.5 352.5 13.5 169.7 .9zM399.8 410.2c.1-3.4 .2-6.8 .2-10.2c0-159.1-128.9-288-288-288c-3.4 0-6.8 .1-10.2 .2L.5 491.9c-1.5 5.5 .1 11.4 4.1 15.4s9.9 5.6 15.4 4.1L399.8 410.2zM176 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm64 128a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM96 384a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faMoneyBillWave = {\n  prefix: 'fas',\n  iconName: 'money-bill-wave',\n  icon: [576, 512, [], \"f53a\", \"M0 112.5L0 422.3c0 18 10.1 35 27 41.3c87 32.5 174 10.3 261-11.9c79.8-20.3 159.6-40.7 239.3-18.9c23 6.3 48.7-9.5 48.7-33.4l0-309.9c0-18-10.1-35-27-41.3C462 15.9 375 38.1 288 60.3C208.2 80.6 128.4 100.9 48.7 79.1C25.6 72.8 0 88.6 0 112.5zM288 352c-44.2 0-80-43-80-96s35.8-96 80-96s80 43 80 96s-35.8 96-80 96zM64 352c35.3 0 64 28.7 64 64l-64 0 0-64zm64-208c0 35.3-28.7 64-64 64l0-64 64 0zM512 304l0 64-64 0c0-35.3 28.7-64 64-64zM448 96l64 0 0 64c-35.3 0-64-28.7-64-64z\"]\n};\nconst faChartArea = {\n  prefix: 'fas',\n  iconName: 'chart-area',\n  icon: [512, 512, [\"area-chart\"], \"f1fe\", \"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm96 288l288 0c17.7 0 32-14.3 32-32l0-68.2c0-7.6-2.7-15-7.7-20.8l-65.8-76.8c-12.1-14.2-33.7-15-46.9-1.8l-21 21c-10 10-26.4 9.2-35.4-1.6l-39.2-47c-12.6-15.1-35.7-15.4-48.7-.6L135.9 215c-5.1 5.8-7.9 13.3-7.9 21.1l0 84c0 17.7 14.3 32 32 32z\"]\n};\nconst faAreaChart = faChartArea;\nconst faHouseFlag = {\n  prefix: 'fas',\n  iconName: 'house-flag',\n  icon: [640, 512, [], \"e50d\", \"M480 0c-17.7 0-32 14.3-32 32l0 160 0 320 64 0 0-320 112 0c8.8 0 16-7.2 16-16l0-128c0-8.8-7.2-16-16-16L512 32c0-17.7-14.3-32-32-32zM416 159L276.8 39.7c-12-10.3-29.7-10.3-41.7 0l-224 192C1 240.4-2.7 254.5 2 267.1S18.6 288 32 288l32 0 0 192c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-96c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 96c0 17.7 14.3 32 32 32l64.7 0 .2 0-1 0 0-353z\"]\n};\nconst faPersonCircleMinus = {\n  prefix: 'fas',\n  iconName: 'person-circle-minus',\n  icon: [576, 512, [], \"e540\", \"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zm136 16a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm224 0c0-8.8-7.2-16-16-16l-128 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l128 0c8.8 0 16-7.2 16-16z\"]\n};\nconst faBan = {\n  prefix: 'fas',\n  iconName: 'ban',\n  icon: [512, 512, [128683, \"cancel\"], \"f05e\", \"M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z\"]\n};\nconst faCancel = faBan;\nconst faCameraRotate = {\n  prefix: 'fas',\n  iconName: 'camera-rotate',\n  icon: [640, 512, [], \"e0d8\", \"M213.1 64.8L202.7 96 128 96c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L426.9 64.8C420.4 45.2 402.1 32 381.4 32L258.6 32c-20.7 0-39 13.2-45.5 32.8zM448 256c0 8.8-7.2 16-16 16l-76.7 0c-6.2 0-11.3-5.1-11.3-11.3c0-3 1.2-5.9 3.3-8L371 229c-13.6-13.4-31.9-21-51-21c-19.2 0-37.7 7.6-51.3 21.3L249 249c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l19.7-19.7C257.4 172.7 288 160 320 160c31.8 0 62.4 12.6 85 35l23.7-23.7c2.1-2.1 5-3.3 8-3.3c6.2 0 11.3 5.1 11.3 11.3l0 76.7zM192 320c0-8.8 7.2-16 16-16l76.7 0c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8L269 347c13.6 13.4 31.9 21 51 21c19.2 0 37.7-7.6 51.3-21.3L391 327c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-19.7 19.7C382.6 403.3 352 416 320 416c-31.8 0-62.4-12.6-85-35l-23.7 23.7c-2.1 2.1-5 3.3-8 3.3c-6.2 0-11.3-5.1-11.3-11.3l0-76.7z\"]\n};\nconst faSprayCanSparkles = {\n  prefix: 'fas',\n  iconName: 'spray-can-sparkles',\n  icon: [512, 512, [\"air-freshener\"], \"f5d0\", \"M96 32l0 96 128 0 0-96c0-17.7-14.3-32-32-32L128 0C110.3 0 96 14.3 96 32zm0 128c-53 0-96 43-96 96L0 464c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-208c0-53-43-96-96-96L96 160zm64 96a80 80 0 1 1 0 160 80 80 0 1 1 0-160zM384 48c0-1.4-1-3-2.2-3.6L352 32 339.6 2.2C339 1 337.4 0 336 0s-3 1-3.6 2.2L320 32 290.2 44.4C289 45 288 46.6 288 48c0 1.4 1 3 2.2 3.6L320 64l12.4 29.8C333 95 334.6 96 336 96s3-1 3.6-2.2L352 64l29.8-12.4C383 51 384 49.4 384 48zm76.4 45.8C461 95 462.6 96 464 96s3-1 3.6-2.2L480 64l29.8-12.4C511 51 512 49.4 512 48c0-1.4-1-3-2.2-3.6L480 32 467.6 2.2C467 1 465.4 0 464 0s-3 1-3.6 2.2L448 32 418.2 44.4C417 45 416 46.6 416 48c0 1.4 1 3 2.2 3.6L448 64l12.4 29.8zm7.2 100.4c-.6-1.2-2.2-2.2-3.6-2.2s-3 1-3.6 2.2L448 224l-29.8 12.4c-1.2 .6-2.2 2.2-2.2 3.6c0 1.4 1 3 2.2 3.6L448 256l12.4 29.8c.6 1.2 2.2 2.2 3.6 2.2s3-1 3.6-2.2L480 256l29.8-12.4c1.2-.6 2.2-2.2 2.2-3.6c0-1.4-1-3-2.2-3.6L480 224l-12.4-29.8zM448 144c0-1.4-1-3-2.2-3.6L416 128 403.6 98.2C403 97 401.4 96 400 96s-3 1-3.6 2.2L384 128l-29.8 12.4c-1.2 .6-2.2 2.2-2.2 3.6c0 1.4 1 3 2.2 3.6L384 160l12.4 29.8c.6 1.2 2.2 2.2 3.6 2.2s3-1 3.6-2.2L416 160l29.8-12.4c1.2-.6 2.2-2.2 2.2-3.6z\"]\n};\nconst faAirFreshener = faSprayCanSparkles;\nconst faStar = {\n  prefix: 'fas',\n  iconName: 'star',\n  icon: [576, 512, [11088, 61446], \"f005\", \"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z\"]\n};\nconst faRepeat = {\n  prefix: 'fas',\n  iconName: 'repeat',\n  icon: [512, 512, [128257], \"f363\", \"M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96l160 0 0 32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32l0 32L160 64C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96l-160 0 0-32c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-32 160 0c88.4 0 160-71.6 160-160z\"]\n};\nconst faCross = {\n  prefix: 'fas',\n  iconName: 'cross',\n  icon: [384, 512, [128327, 10013], \"f654\", \"M176 0c-26.5 0-48 21.5-48 48l0 80-80 0c-26.5 0-48 21.5-48 48l0 32c0 26.5 21.5 48 48 48l80 0 0 208c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-208 80 0c26.5 0 48-21.5 48-48l0-32c0-26.5-21.5-48-48-48l-80 0 0-80c0-26.5-21.5-48-48-48L176 0z\"]\n};\nconst faBox = {\n  prefix: 'fas',\n  iconName: 'box',\n  icon: [448, 512, [128230], \"f466\", \"M50.7 58.5L0 160l208 0 0-128L93.7 32C75.5 32 58.9 42.3 50.7 58.5zM240 160l208 0L397.3 58.5C389.1 42.3 372.5 32 354.3 32L240 32l0 128zm208 32L0 192 0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-224z\"]\n};\nconst faVenusMars = {\n  prefix: 'fas',\n  iconName: 'venus-mars',\n  icon: [640, 512, [9892], \"f228\", \"M176 288a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM352 176c0 86.3-62.1 158.1-144 173.1l0 34.9 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-34.9C62.1 334.1 0 262.3 0 176C0 78.8 78.8 0 176 0s176 78.8 176 176zM271.9 360.6c19.3-10.1 36.9-23.1 52.1-38.4c20 18.5 46.7 29.8 76.1 29.8c61.9 0 112-50.1 112-112s-50.1-112-112-112c-7.2 0-14.3 .7-21.1 2c-4.9-21.5-13-41.7-24-60.2C369.3 66 384.4 64 400 64c37 0 71.4 11.4 99.8 31l20.6-20.6L487 41c-6.9-6.9-8.9-17.2-5.2-26.2S494.3 0 504 0L616 0c13.3 0 24 10.7 24 24l0 112c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-33.4-33.4L545 140.2c19.5 28.4 31 62.7 31 99.8c0 97.2-78.8 176-176 176c-50.5 0-96-21.3-128.1-55.4z\"]\n};\nconst faArrowPointer = {\n  prefix: 'fas',\n  iconName: 'arrow-pointer',\n  icon: [320, 512, [\"mouse-pointer\"], \"f245\", \"M0 55.2L0 426c0 12.2 9.9 22 22 22c6.3 0 12.4-2.7 16.6-7.5L121.2 346l58.1 116.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9L179.8 320l118.1 0c12.2 0 22.1-9.9 22.1-22.1c0-6.3-2.7-12.3-7.4-16.5L38.6 37.9C34.3 34.1 28.9 32 23.2 32C10.4 32 0 42.4 0 55.2z\"]\n};\nconst faMousePointer = faArrowPointer;\nconst faMaximize = {\n  prefix: 'fas',\n  iconName: 'maximize',\n  icon: [512, 512, [\"expand-arrows-alt\"], \"f31e\", \"M200 32L56 32C42.7 32 32 42.7 32 56l0 144c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l40-40 79 79-79 79L73 295c-6.9-6.9-17.2-8.9-26.2-5.2S32 302.3 32 312l0 144c0 13.3 10.7 24 24 24l144 0c9.7 0 18.5-5.8 22.2-14.8s1.7-19.3-5.2-26.2l-40-40 79-79 79 79-40 40c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l144 0c13.3 0 24-10.7 24-24l0-144c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2l-40 40-79-79 79-79 40 40c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2l0-144c0-13.3-10.7-24-24-24L312 32c-9.7 0-18.5 5.8-22.2 14.8s-1.7 19.3 5.2 26.2l40 40-79 79-79-79 40-40c6.9-6.9 8.9-17.2 5.2-26.2S209.7 32 200 32z\"]\n};\nconst faExpandArrowsAlt = faMaximize;\nconst faChargingStation = {\n  prefix: 'fas',\n  iconName: 'charging-station',\n  icon: [576, 512, [], \"f5e7\", \"M96 0C60.7 0 32 28.7 32 64l0 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-144 16 0c22.1 0 40 17.9 40 40l0 32c0 39.8 32.2 72 72 72s72-32.2 72-72l0-123.7c32.5-10.2 56-40.5 56-76.3l0-32c0-8.8-7.2-16-16-16l-16 0 0-48c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-32 0 0-48c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-16 0c-8.8 0-16 7.2-16 16l0 32c0 35.8 23.5 66.1 56 76.3L472 376c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32c0-48.6-39.4-88-88-88l-16 0 0-192c0-35.3-28.7-64-64-64L96 0zM216.9 82.7c6 4 8.5 11.5 6.3 18.3l-25 74.9 57.8 0c6.7 0 12.7 4.2 15 10.4s.5 13.3-4.6 17.7l-112 96c-5.5 4.7-13.4 5.1-19.3 1.1s-8.5-11.5-6.3-18.3l25-74.9L96 208c-6.7 0-12.7-4.2-15-10.4s-.5-13.3 4.6-17.7l112-96c5.5-4.7 13.4-5.1 19.3-1.1z\"]\n};\nconst faShapes = {\n  prefix: 'fas',\n  iconName: 'shapes',\n  icon: [512, 512, [\"triangle-circle-square\"], \"f61f\", \"M315.4 15.5C309.7 5.9 299.2 0 288 0s-21.7 5.9-27.4 15.5l-96 160c-5.9 9.9-6.1 22.2-.4 32.2s16.3 16.2 27.8 16.2l192 0c11.5 0 22.2-6.2 27.8-16.2s5.5-22.3-.4-32.2l-96-160zM288 312l0 144c0 22.1 17.9 40 40 40l144 0c22.1 0 40-17.9 40-40l0-144c0-22.1-17.9-40-40-40l-144 0c-22.1 0-40 17.9-40 40zM128 512a128 128 0 1 0 0-256 128 128 0 1 0 0 256z\"]\n};\nconst faTriangleCircleSquare = faShapes;\nconst faShuffle = {\n  prefix: 'fas',\n  iconName: 'shuffle',\n  icon: [512, 512, [128256, \"random\"], \"f074\", \"M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z\"]\n};\nconst faRandom = faShuffle;\nconst faPersonRunning = {\n  prefix: 'fas',\n  iconName: 'person-running',\n  icon: [448, 512, [127939, \"running\"], \"f70c\", \"M320 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM125.7 175.5c9.9-9.9 23.4-15.5 37.5-15.5c1.9 0 3.8 .1 5.6 .3L137.6 254c-9.3 28 1.7 58.8 26.8 74.5l86.2 53.9-25.4 88.8c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l28.7-100.4c5.9-20.6-2.6-42.6-20.7-53.9L238 299l30.9-82.4 5.1 12.3C289 264.7 323.9 288 362.7 288l21.3 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-21.3 0c-12.9 0-24.6-7.8-29.5-19.7l-6.3-15c-14.6-35.1-44.1-61.9-80.5-73.1l-48.7-15c-11.1-3.4-22.7-5.2-34.4-5.2c-31 0-60.8 12.3-82.7 34.3L57.4 153.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l23.1-23.1zM91.2 352L32 352c-17.7 0-32 14.3-32 32s14.3 32 32 32l69.6 0c19 0 36.2-11.2 43.9-28.5L157 361.6l-9.5-6c-17.5-10.9-30.5-26.8-37.9-44.9L91.2 352z\"]\n};\nconst faRunning = faPersonRunning;\nconst faMobileRetro = {\n  prefix: 'fas',\n  iconName: 'mobile-retro',\n  icon: [320, 512, [], \"e527\", \"M0 64C0 28.7 28.7 0 64 0L256 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm64 96l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L96 128c-17.7 0-32 14.3-32 32zM80 352a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm24 56a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm56-56a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm24 56a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm56-56a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm24 56a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM128 48c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0z\"]\n};\nconst faGripLinesVertical = {\n  prefix: 'fas',\n  iconName: 'grip-lines-vertical',\n  icon: [192, 512, [], \"f7a5\", \"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32L64 64zm128 0c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 384c0 17.7 14.3 32 32 32s32-14.3 32-32l0-384z\"]\n};\nconst faSpider = {\n  prefix: 'fas',\n  iconName: 'spider',\n  icon: [512, 512, [128375], \"f717\", \"M158.4 32.6c4.8-12.4-1.4-26.3-13.8-31s-26.3 1.4-31 13.8L81.1 100c-7.9 20.7-3 44.1 12.7 59.7l57.4 57.4L70.8 190.3c-2.4-.8-4.3-2.7-5.1-5.1L46.8 128.4C42.6 115.8 29 109 16.4 113.2S-3 131 1.2 143.6l18.9 56.8c5.6 16.7 18.7 29.8 35.4 35.4L116.1 256 55.6 276.2c-16.7 5.6-29.8 18.7-35.4 35.4L1.2 368.4C-3 381 3.8 394.6 16.4 398.8s26.2-2.6 30.4-15.2l18.9-56.8c.8-2.4 2.7-4.3 5.1-5.1l80.4-26.8L93.7 352.3C78.1 368 73.1 391.4 81.1 412l32.5 84.6c4.8 12.4 18.6 18.5 31 13.8s18.5-18.6 13.8-31l-32.5-84.6c-1.1-3-.4-6.3 1.8-8.5L160 353.9c1 52.1 43.6 94.1 96 94.1s95-41.9 96-94.1l32.3 32.3c2.2 2.2 2.9 5.6 1.8 8.5l-32.5 84.6c-4.8 12.4 1.4 26.3 13.8 31s26.3-1.4 31-13.8L430.9 412c7.9-20.7 3-44.1-12.7-59.7l-57.4-57.4 80.4 26.8c2.4 .8 4.3 2.7 5.1 5.1l18.9 56.8c4.2 12.6 17.8 19.4 30.4 15.2s19.4-17.8 15.2-30.4l-18.9-56.8c-5.6-16.7-18.7-29.8-35.4-35.4L395.9 256l60.5-20.2c16.7-5.6 29.8-18.7 35.4-35.4l18.9-56.8c4.2-12.6-2.6-26.2-15.2-30.4s-26.2 2.6-30.4 15.2l-18.9 56.8c-.8 2.4-2.7 4.3-5.1 5.1l-80.4 26.8 57.4-57.4c15.6-15.6 20.6-39 12.7-59.7L398.4 15.4C393.6 3 379.8-3.2 367.4 1.6s-18.5 18.6-13.8 31l32.5 84.6c1.1 3 .4 6.3-1.8 8.5L336 174.1l0-14.1c0-31.8-18.6-59.3-45.5-72.2c-9.1-4.4-18.5 3.3-18.5 13.4l0 10.8c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-10.8c0-10.1-9.4-17.7-18.5-13.4C194.6 100.7 176 128.2 176 160l0 14.1-48.3-48.3c-2.2-2.2-2.9-5.6-1.8-8.5l32.5-84.6z\"]\n};\nconst faHandsBound = {\n  prefix: 'fas',\n  iconName: 'hands-bound',\n  icon: [640, 512, [], \"e4f9\", \"M96 32C96 14.3 81.7 0 64 0S32 14.3 32 32l0 64 0 59.1 0 .7L32 192l0 21.9c0 14.2 5.1 27.9 14.3 38.7L131.6 352l-3.6 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l32 0 128 0 64 0 128 0 32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-3.6 0 85.3-99.5c9.2-10.8 14.3-24.5 14.3-38.7l0-21.9 0-36.2 0-.7L608 96l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64 0 48.8-69.3 92.4c-5.7 7.6-16.1 9.6-24.2 4.8c-9.7-5.7-12.1-18.7-5.1-27.5L473 180c10.8-13.5 8.9-33.3-4.4-44.5s-33-9.8-44.5 3.2l-46.7 52.5C361 209.7 352 233.4 352 258.1l0 61.9 0 32-64 0 0-32 0-61.9c0-24.6-9-48.4-25.4-66.8l-46.7-52.5c-11.5-13-31.3-14.4-44.5-3.2s-15.2 30.9-4.4 44.5l27.6 34.5c7 8.8 4.7 21.8-5.1 27.5c-8.1 4.8-18.6 2.7-24.2-4.8L96 144.8 96 96l0-64zm64 448l0 32 128 0 0-32 64 0 0 32 128 0 0-32 32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0-128 0-64 0-128 0-32 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l32 0z\"]\n};\nconst faFileInvoiceDollar = {\n  prefix: 'fas',\n  iconName: 'file-invoice-dollar',\n  icon: [384, 512, [], \"f571\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM64 80c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 96c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16zm128 72c8.8 0 16 7.2 16 16l0 17.3c8.5 1.2 16.7 3.1 24.1 5.1c8.5 2.3 13.6 11 11.3 19.6s-11 13.6-19.6 11.3c-11.1-3-22-5.2-32.1-5.3c-8.4-.1-17.4 1.8-23.6 5.5c-5.7 3.4-8.1 7.3-8.1 12.8c0 3.7 1.3 6.5 7.3 10.1c6.9 4.1 16.6 7.1 29.2 10.9l.5 .1s0 0 0 0s0 0 0 0c11.3 3.4 25.3 7.6 36.3 14.6c12.1 7.6 22.4 19.7 22.7 38.2c.3 19.3-9.6 33.3-22.9 41.6c-7.7 4.8-16.4 7.6-25.1 9.1l0 17.1c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-17.8c-11.2-2.1-21.7-5.7-30.9-8.9c0 0 0 0 0 0c-2.1-.7-4.2-1.4-6.2-2.1c-8.4-2.8-12.9-11.9-10.1-20.2s11.9-12.9 20.2-10.1c2.5 .8 4.8 1.6 7.1 2.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c13.6 4.6 24.6 8.4 36.3 8.7c9.1 .3 17.9-1.7 23.7-5.3c5.1-3.2 7.9-7.3 7.8-14c-.1-4.6-1.8-7.8-7.7-11.6c-6.8-4.3-16.5-7.4-29-11.2l-1.6-.5s0 0 0 0c-11-3.3-24.3-7.3-34.8-13.7c-12-7.2-22.6-18.9-22.7-37.3c-.1-19.4 10.8-32.8 23.8-40.5c7.5-4.4 15.8-7.2 24.1-8.7l0-17.3c0-8.8 7.2-16 16-16z\"]\n};\nconst faPlaneCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'plane-circle-exclamation',\n  icon: [640, 512, [], \"e556\", \"M256 0c-35 0-64 59.5-64 93.7l0 84.6L8.1 283.4c-5 2.8-8.1 8.2-8.1 13.9l0 65.5c0 10.6 10.2 18.3 20.4 15.4l171.6-49 0 70.9-57.6 43.2c-4 3-6.4 7.8-6.4 12.8l0 42c0 7.8 6.3 14 14 14c1.3 0 2.6-.2 3.9-.5L256 480l110.1 31.5c1.3 .4 2.6 .5 3.9 .5c6 0 11.1-3.7 13.1-9C344.5 470.7 320 422.2 320 368c0-60.6 30.6-114 77.1-145.6L320 178.3l0-84.6C320 59.5 292 0 256 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faXRay = {\n  prefix: 'fas',\n  iconName: 'x-ray',\n  icon: [512, 512, [], \"f497\", \"M0 64C0 46.3 14.3 32 32 32l448 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 320c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32L32 96C14.3 96 0 81.7 0 64zM256 96c-8.8 0-16 7.2-16 16l0 32-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 48-112 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l112 0 0 70.6L189.1 307c-5.2-2-10.6-3-16.2-3l-2.1 0c-23.6 0-42.8 19.2-42.8 42.8c0 9.6 3.2 18.9 9.1 26.4l18.2 23.2c9.7 12.4 24.6 19.6 40.3 19.6l120.8 0c15.7 0 30.6-7.2 40.3-19.6l18.2-23.2c5.9-7.5 9.1-16.8 9.1-26.4c0-23.6-19.2-42.8-42.8-42.8l-2.2 0c-5.5 0-11 1-16.2 3L272 326.6l0-70.6 112 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-112 0 0-48 80 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-80 0 0-32c0-8.8-7.2-16-16-16zM208 352a16 16 0 1 1 0 32 16 16 0 1 1 0-32zm80 16a16 16 0 1 1 32 0 16 16 0 1 1 -32 0z\"]\n};\nconst faSpellCheck = {\n  prefix: 'fas',\n  iconName: 'spell-check',\n  icon: [576, 512, [], \"f891\", \"M112 0C99.1 0 87.4 7.8 82.5 19.7l-66.7 160-13.3 32c-6.8 16.3 .9 35 17.2 41.8s35-.9 41.8-17.2L66.7 224l90.7 0 5.1 12.3c6.8 16.3 25.5 24 41.8 17.2s24-25.5 17.2-41.8l-13.3-32-66.7-160C136.6 7.8 124.9 0 112 0zm18.7 160l-37.3 0L112 115.2 130.7 160zM256 32l0 96 0 96c0 17.7 14.3 32 32 32l80 0c44.2 0 80-35.8 80-80c0-23.1-9.8-43.8-25.4-58.4c6-11.2 9.4-24 9.4-37.6c0-44.2-35.8-80-80-80L288 0c-17.7 0-32 14.3-32 32zm96 64l-32 0 0-32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16zm-32 64l32 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0 0-32zM566.6 310.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L352 434.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l192-192z\"]\n};\nconst faSlash = {\n  prefix: 'fas',\n  iconName: 'slash',\n  icon: [640, 512, [], \"f715\", \"M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z\"]\n};\nconst faComputerMouse = {\n  prefix: 'fas',\n  iconName: 'computer-mouse',\n  icon: [384, 512, [128433, \"mouse\"], \"f8cc\", \"M0 192l176 0L176 0 160 0C71.6 0 0 71.6 0 160l0 32zm0 32L0 352c0 88.4 71.6 160 160 160l64 0c88.4 0 160-71.6 160-160l0-128-192 0L0 224zm384-32l0-32C384 71.6 312.4 0 224 0L208 0l0 192 176 0z\"]\n};\nconst faMouse = faComputerMouse;\nconst faArrowRightToBracket = {\n  prefix: 'fas',\n  iconName: 'arrow-right-to-bracket',\n  icon: [512, 512, [\"sign-in\"], \"f090\", \"M352 96l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm-9.4 182.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L242.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z\"]\n};\nconst faSignIn = faArrowRightToBracket;\nconst faShopSlash = {\n  prefix: 'fas',\n  iconName: 'shop-slash',\n  icon: [640, 512, [\"store-alt-slash\"], \"e070\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-54.8-43L576 224l-64 0 0 152L384 275.7l0-51.7-64 0 0 1.5L277.2 192l325.9 0c20.3 0 36.8-16.5 36.8-36.8c0-7.3-2.2-14.4-6.2-20.4L558.2 21.4C549.3 8 534.4 0 518.3 0L121.7 0c-16 0-31 8-39.9 21.4L74.1 32.8 38.8 5.1zM36.8 192l85 0L21 112.5 6.2 134.7c-4 6.1-6.2 13.2-6.2 20.4C0 175.5 16.5 192 36.8 192zM320 384l-192 0 0-160-64 0 0 160 0 80c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-65.5-64-50.4 0 35.9z\"]\n};\nconst faStoreAltSlash = faShopSlash;\nconst faServer = {\n  prefix: 'fas',\n  iconName: 'server',\n  icon: [512, 512, [], \"f233\", \"M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faVirusCovidSlash = {\n  prefix: 'fas',\n  iconName: 'virus-covid-slash',\n  icon: [640, 512, [], \"e4a9\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L472.1 344.7c11.4-19.5 19.1-41.4 22.3-64.7l33.6 0 0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-80c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 16-33.6 0c-4.2-30.7-16.3-58.8-34.1-82.3L484 125.9l11.3 11.3c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L472.7 46.7c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L450.1 92l-23.8 23.8C402.8 97.9 374.7 85.8 344 81.6L344 48l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L280 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l16 0 0 33.6c-30.7 4.2-58.8 16.3-82.3 34.1L189.9 92l11.3-11.3c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L134.1 79.8 38.8 5.1zM149.2 213.5c-1.5 6-2.7 12.2-3.5 18.5L112 232l0-16c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 80c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16 33.6 0c4.2 30.7 16.3 58.8 34.1 82.3L156 386.1l-11.3-11.3c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l56.6 56.6c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L189.9 420l23.8-23.8c23.5 17.9 51.7 29.9 82.3 34.1l0 33.6-16 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0-33.6c20.4-2.8 39.7-9.1 57.3-18.2L149.2 213.5z\"]\n};\nconst faShopLock = {\n  prefix: 'fas',\n  iconName: 'shop-lock',\n  icon: [640, 512, [], \"e4a5\", \"M36.8 192l412.8 0c20.2-19.8 47.9-32 78.4-32c30.5 0 58.1 12.2 78.3 31.9c18.9-1.6 33.7-17.4 33.7-36.7c0-7.3-2.2-14.4-6.2-20.4L558.2 21.4C549.3 8 534.4 0 518.3 0L121.7 0c-16 0-31 8-39.9 21.4L6.2 134.7c-4 6.1-6.2 13.2-6.2 20.4C0 175.5 16.5 192 36.8 192zM384 224l-64 0 0 160-192 0 0-160-64 0 0 160 0 80c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-80 0-32 0-128zm144 16c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z\"]\n};\nconst faHourglassStart = {\n  prefix: 'fas',\n  iconName: 'hourglass-start',\n  icon: [384, 512, [\"hourglass-1\"], \"f251\", \"M32 0C14.3 0 0 14.3 0 32S14.3 64 32 64l0 11c0 42.4 16.9 83.1 46.9 113.1L146.7 256 78.9 323.9C48.9 353.9 32 394.6 32 437l0 11c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 256 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-11c0-42.4-16.9-83.1-46.9-113.1L237.3 256l67.9-67.9c30-30 46.9-70.7 46.9-113.1l0-11c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 0 64 0 32 0zM288 437l0 11L96 448l0-11c0-25.5 10.1-49.9 28.1-67.9L192 301.3l67.9 67.9c18 18 28.1 42.4 28.1 67.9z\"]\n};\nconst faHourglass1 = faHourglassStart;\nconst faBlenderPhone = {\n  prefix: 'fas',\n  iconName: 'blender-phone',\n  icon: [576, 512, [], \"f6b6\", \"M224 352L196.8 52.3C194.2 24.2 216.3 0 244.6 0L534.1 0c21.1 0 36.4 20.1 30.9 40.4L558.5 64 400 64c-8.8 0-16 7.2-16 16s7.2 16 16 16l149.8 0-17.5 64L400 160c-8.8 0-16 7.2-16 16s7.2 16 16 16l123.6 0-17.5 64L400 256c-8.8 0-16 7.2-16 16s7.2 16 16 16l97.5 0L480 352l-256 0zm-16 32l288 0c26.5 0 48 21.5 48 48l0 32c0 26.5-21.5 48-48 48l-288 0c-26.5 0-48-21.5-48-48l0-32c0-26.5 21.5-48 48-48zm144 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM147.5 30.7c10.8 6.7 15.3 21 10.6 33.4l-22 57.8c-4.2 10.9-14.5 17.6-25.3 16.4l-33.3-3.6c-13.6 42.2-13.6 88.4 0 130.7l33.3-3.6c10.9-1.2 21.2 5.5 25.3 16.4l22 57.8c4.7 12.4 .2 26.7-10.6 33.4l-44 27.2c-9.7 6-21.9 4.2-29.8-4.3C-24.6 286-24.6 114 73.7 7.8C81.6-.7 93.8-2.5 103.5 3.5l44 27.2z\"]\n};\nconst faBuildingWheat = {\n  prefix: 'fas',\n  iconName: 'building-wheat',\n  icon: [640, 512, [], \"e4db\", \"M0 48C0 21.5 21.5 0 48 0L336 0c26.5 0 48 21.5 48 48l0 416c0 26.5-21.5 48-48 48l-96 0 0-80c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 80-96 0c-26.5 0-48-21.5-48-48L0 48zM80 224c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm80 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm112-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 112l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16L80 96c-8.8 0-16 7.2-16 16zM176 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm80 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm384 80l0 16c0 44.2-35.8 80-80 80l-16 0 0-16c0-44.2 35.8-80 80-80l16 0zm0 128c0 44.2-35.8 80-80 80l-16 0 0-16c0-44.2 35.8-80 80-80l16 0 0 16zm0 112c0 44.2-35.8 80-80 80l-16 0 0-16c0-44.2 35.8-80 80-80l16 0 0 16zM512 496l0 16-16 0c-44.2 0-80-35.8-80-80l0-16 16 0c44.2 0 80 35.8 80 80zm0-96l-16 0c-44.2 0-80-35.8-80-80l0-16 16 0c44.2 0 80 35.8 80 80l0 16zm0-128l0 16-16 0c-44.2 0-80-35.8-80-80l0-16 16 0c44.2 0 80 35.8 80 80zM528 32c13.3 0 24 10.7 24 24l0 104c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-104c0-13.3 10.7-24 24-24zm96 64l0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32c0-13.3 10.7-24 24-24s24 10.7 24 24zM456 72c13.3 0 24 10.7 24 24l0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32c0-13.3 10.7-24 24-24z\"]\n};\nconst faPersonBreastfeeding = {\n  prefix: 'fas',\n  iconName: 'person-breastfeeding',\n  icon: [448, 512, [], \"e53a\", \"M224 0a80 80 0 1 1 0 160A80 80 0 1 1 224 0zM436.8 382.8L373.5 462c-16.6 20.7-46.8 24.1-67.5 7.5c-17.6-14.1-22.7-38.1-13.5-57.7l-.8-.1c-38.9-5.6-74.3-25.1-99.7-54.8l0-36.8c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 48c0 .8 0 1.6 .1 2.4l101.4 50.7c23.7 11.9 33.3 40.7 21.5 64.4s-40.7 33.3-64.4 21.5L27.2 427.3c-1.1-.5-2.2-1.1-3.3-1.7c-4.9-2.8-9.2-6.4-12.6-10.6c-4.6-5.4-7.8-11.7-9.6-18.4c-3.3-12-1.9-25.2 4.8-36.6c.6-1.1 1.3-2.2 2-3.2L75.6 256.1c26.7-40.1 71.7-64.1 119.8-64.1l75.2 0c46.5 0 90.1 22.5 117.2 60.3l50.7 70.9c2.2 3 4 6.1 5.5 9.4c2.9 6.7 4.3 13.8 4 20.8c-.3 10.6-4.2 21-11.2 29.4zM320 332a44 44 0 1 0 -88 0 44 44 0 1 0 88 0z\"]\n};\nconst faRightToBracket = {\n  prefix: 'fas',\n  iconName: 'right-to-bracket',\n  icon: [512, 512, [\"sign-in-alt\"], \"f2f6\", \"M217.9 105.9L340.7 228.7c7.2 7.2 11.3 17.1 11.3 27.3s-4.1 20.1-11.3 27.3L217.9 406.1c-6.4 6.4-15 9.9-24 9.9c-18.7 0-33.9-15.2-33.9-33.9l0-62.1L32 320c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l128 0 0-62.1c0-18.7 15.2-33.9 33.9-33.9c9 0 17.6 3.6 24 9.9zM352 416l64 0c17.7 0 32-14.3 32-32l0-256c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c53 0 96 43 96 96l0 256c0 53-43 96-96 96l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faSignInAlt = faRightToBracket;\nconst faVenus = {\n  prefix: 'fas',\n  iconName: 'venus',\n  icon: [384, 512, [9792], \"f221\", \"M80 176a112 112 0 1 1 224 0A112 112 0 1 1 80 176zM224 349.1c81.9-15 144-86.8 144-173.1C368 78.8 289.2 0 192 0S16 78.8 16 176c0 86.3 62.1 158.1 144 173.1l0 34.9-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-34.9z\"]\n};\nconst faPassport = {\n  prefix: 'fas',\n  iconName: 'passport',\n  icon: [448, 512, [], \"f5ab\", \"M0 64C0 28.7 28.7 0 64 0L384 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM183 278.8c-27.9-13.2-48.4-39.4-53.7-70.8l39.1 0c1.6 30.4 7.7 53.8 14.6 70.8zm41.3 9.2l-.3 0-.3 0c-2.4-3.5-5.7-8.9-9.1-16.5c-6-13.6-12.4-34.3-14.2-63.5l47.1 0c-1.8 29.2-8.1 49.9-14.2 63.5c-3.4 7.6-6.7 13-9.1 16.5zm40.7-9.2c6.8-17.1 12.9-40.4 14.6-70.8l39.1 0c-5.3 31.4-25.8 57.6-53.7 70.8zM279.6 176c-1.6-30.4-7.7-53.8-14.6-70.8c27.9 13.2 48.4 39.4 53.7 70.8l-39.1 0zM223.7 96l.3 0 .3 0c2.4 3.5 5.7 8.9 9.1 16.5c6 13.6 12.4 34.3 14.2 63.5l-47.1 0c1.8-29.2 8.1-49.9 14.2-63.5c3.4-7.6 6.7-13 9.1-16.5zM183 105.2c-6.8 17.1-12.9 40.4-14.6 70.8l-39.1 0c5.3-31.4 25.8-57.6 53.7-70.8zM352 192A128 128 0 1 0 96 192a128 128 0 1 0 256 0zM112 384c-8.8 0-16 7.2-16 16s7.2 16 16 16l224 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-224 0z\"]\n};\nconst faThumbtackSlash = {\n  prefix: 'fas',\n  iconName: 'thumbtack-slash',\n  icon: [640, 512, [\"thumb-tack-slash\"], \"e68f\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L481.4 352c9.8-.4 18.9-5.3 24.6-13.3c6-8.3 7.7-19.1 4.4-28.8l-1-3c-13.8-41.5-42.8-74.8-79.5-94.7L418.5 64 448 64c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l29.5 0-6.1 79.5L38.8 5.1zM324.9 352L177.1 235.6c-20.9 18.9-37.2 43.3-46.5 71.3l-1 3c-3.3 9.8-1.6 20.5 4.4 28.8s15.7 13.3 26 13.3l164.9 0zM288 384l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96-64 0z\"]\n};\nconst faThumbTackSlash = faThumbtackSlash;\nconst faHeartPulse = {\n  prefix: 'fas',\n  iconName: 'heart-pulse',\n  icon: [512, 512, [\"heartbeat\"], \"f21e\", \"M228.3 469.1L47.6 300.4c-4.2-3.9-8.2-8.1-11.9-12.4l87 0c22.6 0 43-13.6 51.7-34.5l10.5-25.2 49.3 109.5c3.8 8.5 12.1 14 21.4 14.1s17.8-5 22-13.3L320 253.7l1.7 3.4c9.5 19 28.9 31 50.1 31l104.5 0c-3.7 4.3-7.7 8.5-11.9 12.4L283.7 469.1c-7.5 7-17.4 10.9-27.7 10.9s-20.2-3.9-27.7-10.9zM503.7 240l-132 0c-3 0-5.8-1.7-7.2-4.4l-23.2-46.3c-4.1-8.1-12.4-13.3-21.5-13.3s-17.4 5.1-21.5 13.3l-41.4 82.8L205.9 158.2c-3.9-8.7-12.7-14.3-22.2-14.1s-18.1 5.9-21.8 14.8l-31.8 76.3c-1.2 3-4.2 4.9-7.4 4.9L16 240c-2.6 0-5 .4-7.3 1.1C3 225.2 0 208.2 0 190.9l0-5.8c0-69.9 50.5-129.5 119.4-141C165 36.5 211.4 51.4 244 84l12 12 12-12c32.6-32.6 79-47.5 124.6-39.9C461.5 55.6 512 115.2 512 185.1l0 5.8c0 16.9-2.8 33.5-8.3 49.1z\"]\n};\nconst faHeartbeat = faHeartPulse;\nconst faPeopleCarryBox = {\n  prefix: 'fas',\n  iconName: 'people-carry-box',\n  icon: [640, 512, [\"people-carry\"], \"f4ce\", \"M80 48a48 48 0 1 1 96 0A48 48 0 1 1 80 48zm64 193.7l0 65.1 51 51c7.1 7.1 11.8 16.2 13.4 26.1l15.2 90.9c2.9 17.4-8.9 33.9-26.3 36.8s-33.9-8.9-36.8-26.3l-14.3-85.9L66.8 320C54.8 308 48 291.7 48 274.7l0-88.1c0-32.4 26.2-58.6 58.6-58.6c24.1 0 46.5 12 59.9 32l47.4 71.1 10.1 5 0-76.2c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32l0 76.2 10.1-5L473.5 160c13.3-20 35.8-32 59.9-32c32.4 0 58.6 26.2 58.6 58.6l0 88.1c0 17-6.7 33.3-18.7 45.3l-79.4 79.4-14.3 85.9c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8l15.2-90.9c1.6-9.9 6.3-19 13.4-26.1l51-51 0-65.1-19 28.5c-4.6 7-11 12.6-18.5 16.3l-59.6 29.8c-2.4 1.3-4.9 2.2-7.6 2.8c-2.6 .6-5.3 .9-7.9 .8l-126.7 0c-2.5 .1-5-.2-7.5-.7c-2.9-.6-5.6-1.6-8.1-3l-59.5-29.8c-7.5-3.7-13.8-9.4-18.5-16.3l-19-28.5zM2.3 468.1L50.1 348.6l49.2 49.2-37.6 94c-6.6 16.4-25.2 24.4-41.6 17.8S-4.3 484.5 2.3 468.1zM512 0a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm77.9 348.6l47.8 119.5c6.6 16.4-1.4 35-17.8 41.6s-35-1.4-41.6-17.8l-37.6-94 49.2-49.2z\"]\n};\nconst faPeopleCarry = faPeopleCarryBox;\nconst faTemperatureHigh = {\n  prefix: 'fas',\n  iconName: 'temperature-high',\n  icon: [512, 512, [], \"f769\", \"M416 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 128A96 96 0 1 0 416 0a96 96 0 1 0 0 192zM96 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C217.8 332.6 224 349.5 224 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9C88.9 308.4 96 293.8 96 276.5L96 112zM144 0C82.1 0 32 50.2 32 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C11.2 304.2 0 334.8 0 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L256 112C256 50.2 205.9 0 144 0zm0 416c26.5 0 48-21.5 48-48c0-20.9-13.4-38.7-32-45.3L160 112c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 210.7c-18.6 6.6-32 24.4-32 45.3c0 26.5 21.5 48 48 48z\"]\n};\nconst faMicrochip = {\n  prefix: 'fas',\n  iconName: 'microchip',\n  icon: [512, 512, [], \"f2db\", \"M176 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c-35.3 0-64 28.7-64 64l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0 0 56-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0 0 56-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c0 35.3 28.7 64 64 64l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40 56 0 0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40 56 0 0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40c35.3 0 64-28.7 64-64l40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0 0-56 40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0 0-56 40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0c0-35.3-28.7-64-64-64l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40-56 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40-56 0 0-40zM160 128l192 0c17.7 0 32 14.3 32 32l0 192c0 17.7-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32l0-192c0-17.7 14.3-32 32-32zm192 32l-192 0 0 192 192 0 0-192z\"]\n};\nconst faCrown = {\n  prefix: 'fas',\n  iconName: 'crown',\n  icon: [576, 512, [128081], \"f521\", \"M309 106c11.4-7 19-19.7 19-34c0-22.1-17.9-40-40-40s-40 17.9-40 40c0 14.4 7.6 27 19 34L209.7 220.6c-9.1 18.2-32.7 23.4-48.6 10.7L72 160c5-6.7 8-15 8-24c0-22.1-17.9-40-40-40S0 113.9 0 136s17.9 40 40 40c.2 0 .5 0 .7 0L86.4 427.4c5.5 30.4 32 52.6 63 52.6l277.2 0c30.9 0 57.4-22.1 63-52.6L535.3 176c.2 0 .5 0 .7 0c22.1 0 40-17.9 40-40s-17.9-40-40-40s-40 17.9-40 40c0 9 3 17.3 8 24l-89.1 71.3c-15.9 12.7-39.5 7.5-48.6-10.7L309 106z\"]\n};\nconst faWeightHanging = {\n  prefix: 'fas',\n  iconName: 'weight-hanging',\n  icon: [512, 512, [], \"f5cd\", \"M224 96a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm122.5 32c3.5-10 5.5-20.8 5.5-32c0-53-43-96-96-96s-96 43-96 96c0 11.2 1.9 22 5.5 32L120 128c-22 0-41.2 15-46.6 36.4l-72 288c-3.6 14.3-.4 29.5 8.7 41.2S33.2 512 48 512l416 0c14.8 0 28.7-6.8 37.8-18.5s12.3-26.8 8.7-41.2l-72-288C433.2 143 414 128 392 128l-45.5 0z\"]\n};\nconst faXmarksLines = {\n  prefix: 'fas',\n  iconName: 'xmarks-lines',\n  icon: [640, 512, [], \"e59a\", \"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zm0 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416zM7 167c-9.4 9.4-9.4 24.6 0 33.9l55 55L7 311c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55 55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-55-55 55-55c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55L41 167c-9.4-9.4-24.6-9.4-33.9 0zM265 167c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l55 55-55 55c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55 55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-55-55 55-55c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55-55-55zM455 167c-9.4 9.4-9.4 24.6 0 33.9l55 55-55 55c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55 55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-55-55 55-55c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55-55-55c-9.4-9.4-24.6-9.4-33.9 0z\"]\n};\nconst faFilePrescription = {\n  prefix: 'fas',\n  iconName: 'file-prescription',\n  icon: [384, 512, [], \"f572\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM104 196l72 0c33.1 0 60 26.9 60 60c0 25.5-15.9 47.2-38.3 55.9l43 40.3 33.8-31c8.1-7.5 20.8-6.9 28.3 1.2s6.9 20.8-1.2 28.3L270 379.7l31.7 29.7c8.1 7.6 8.5 20.2 .9 28.3s-20.2 8.5-28.3 .9l-33.9-31.8-34.9 32c-8.1 7.5-20.8 6.9-28.3-1.2s-6.9-20.8 1.2-28.3l32.6-29.9-64.8-60.8c-.9-.8-1.6-1.7-2.3-2.6l-20 0 0 44c0 11-9 20-20 20s-20-9-20-20l0-64 0-80c0-11 9-20 20-20zm72 80c11 0 20-9 20-20s-9-20-20-20l-52 0 0 40 52 0z\"]\n};\nconst faWeightScale = {\n  prefix: 'fas',\n  iconName: 'weight-scale',\n  icon: [512, 512, [\"weight\"], \"f496\", \"M128 176a128 128 0 1 1 256 0 128 128 0 1 1 -256 0zM391.8 64C359.5 24.9 310.7 0 256 0S152.5 24.9 120.2 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-56.2 0zM296 224c0-10.6-4.1-20.2-10.9-27.4l33.6-78.3c3.5-8.1-.3-17.5-8.4-21s-17.5 .3-21 8.4L255.7 184c-22 .1-39.7 18-39.7 40c0 22.1 17.9 40 40 40s40-17.9 40-40z\"]\n};\nconst faWeight = faWeightScale;\nconst faUserGroup = {\n  prefix: 'fas',\n  iconName: 'user-group',\n  icon: [640, 512, [128101, \"user-friends\"], \"f500\", \"M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM609.3 512l-137.8 0c5.4-9.4 8.6-20.3 8.6-32l0-8c0-60.7-27.1-115.2-69.8-151.8c2.4-.1 4.7-.2 7.1-.2l61.4 0C567.8 320 640 392.2 640 481.3c0 17-13.8 30.7-30.7 30.7zM432 256c-31 0-59-12.6-79.3-32.9C372.4 196.5 384 163.6 384 128c0-26.8-6.6-52.1-18.3-74.3C384.3 40.1 407.2 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112z\"]\n};\nconst faUserFriends = faUserGroup;\nconst faArrowUpAZ = {\n  prefix: 'fas',\n  iconName: 'arrow-up-a-z',\n  icon: [576, 512, [\"sort-alpha-up\"], \"f15e\", \"M183.6 42.4C177.5 35.8 169 32 160 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L128 146.3 128 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 320c0 17.7 14.3 32 32 32l50.7 0-73.4 73.4c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-50.7 0 73.4-73.4c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8l-128 0c-17.7 0-32 14.3-32 32zM416 32c-12.1 0-23.2 6.8-28.6 17.7l-64 128-16 32c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3l7.2-14.3 88.4 0 7.2 14.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9l-16-32-64-128C439.2 38.8 428.1 32 416 32zM395.8 176L416 135.6 436.2 176l-40.4 0z\"]\n};\nconst faSortAlphaUp = faArrowUpAZ;\nconst faChessKnight = {\n  prefix: 'fas',\n  iconName: 'chess-knight',\n  icon: [448, 512, [9822], \"f441\", \"M96 48L82.7 61.3C70.7 73.3 64 89.5 64 106.5l0 132.4c0 10.7 5.3 20.7 14.2 26.6l10.6 7c14.3 9.6 32.7 10.7 48.1 3l3.2-1.6c2.6-1.3 5-2.8 7.3-4.5l49.4-37c6.6-5 15.7-5 22.3 0c10.2 7.7 9.9 23.1-.7 30.3L90.4 350C73.9 361.3 64 380 64 400l320 0 28.9-159c2.1-11.3 3.1-22.8 3.1-34.3l0-14.7C416 86 330 0 224 0L83.8 0C72.9 0 64 8.9 64 19.8c0 7.5 4.2 14.3 10.9 17.7L96 48zm24 68a20 20 0 1 1 40 0 20 20 0 1 1 -40 0zM22.6 473.4c-4.2 4.2-6.6 10-6.6 16C16 501.9 26.1 512 38.6 512l370.7 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16L384 432 64 432 22.6 473.4z\"]\n};\nconst faFaceLaughSquint = {\n  prefix: 'fas',\n  iconName: 'face-laugh-squint',\n  icon: [512, 512, [\"laugh-squint\"], \"f59b\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96.8 314.1c-3.8-13.7 7.4-26.1 21.6-26.1l275.2 0c14.2 0 25.5 12.4 21.6 26.1C396.2 382 332.1 432 256 432s-140.2-50-159.2-117.9zm36.7-199.4l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6c0-9 9.6-14.7 17.5-10.5zM396 125.1c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9c7.9-4.2 17.5 1.5 17.5 10.5z\"]\n};\nconst faLaughSquint = faFaceLaughSquint;\nconst faWheelchair = {\n  prefix: 'fas',\n  iconName: 'wheelchair',\n  icon: [512, 512, [], \"f193\", \"M192 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM120.5 247.2c12.4-4.7 18.7-18.5 14-30.9s-18.5-18.7-30.9-14C43.1 225.1 0 283.5 0 352c0 88.4 71.6 160 160 160c61.2 0 114.3-34.3 141.2-84.7c6.2-11.7 1.8-26.2-9.9-32.5s-26.2-1.8-32.5 9.9C240 440 202.8 464 160 464C98.1 464 48 413.9 48 352c0-47.9 30.1-88.8 72.5-104.8zM259.8 176l-1.9-9.7c-4.5-22.3-24-38.3-46.8-38.3c-30.1 0-52.7 27.5-46.8 57l23.1 115.5c6 29.9 32.2 51.4 62.8 51.4l5.1 0c.4 0 .8 0 1.3 0l94.1 0c6.7 0 12.6 4.1 15 10.4L402 459.2c6 16.1 23.8 24.6 40.1 19.1l48-16c16.8-5.6 25.8-23.7 20.2-40.5s-23.7-25.8-40.5-20.2l-18.7 6.2-25.5-68c-11.7-31.2-41.6-51.9-74.9-51.9l-68.5 0-9.6-48 63.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-76.2 0z\"]\n};\nconst faCircleArrowUp = {\n  prefix: 'fas',\n  iconName: 'circle-arrow-up',\n  icon: [512, 512, [\"arrow-circle-up\"], \"f0aa\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 215c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71L280 392c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-214.1-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 103c9.4-9.4 24.6-9.4 33.9 0L385 215z\"]\n};\nconst faArrowCircleUp = faCircleArrowUp;\nconst faToggleOn = {\n  prefix: 'fas',\n  iconName: 'toggle-on',\n  icon: [576, 512, [], \"f205\", \"M192 64C86 64 0 150 0 256S86 448 192 448l192 0c106 0 192-86 192-192s-86-192-192-192L192 64zm192 96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z\"]\n};\nconst faPersonWalking = {\n  prefix: 'fas',\n  iconName: 'person-walking',\n  icon: [320, 512, [128694, \"walking\"], \"f554\", \"M160 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM126.5 199.3c-1 .4-1.9 .8-2.9 1.2l-8 3.5c-16.4 7.3-29 21.2-34.7 38.2l-2.6 7.8c-5.6 16.8-23.7 25.8-40.5 20.2s-25.8-23.7-20.2-40.5l2.6-7.8c11.4-34.1 36.6-61.9 69.4-76.5l8-3.5c20.8-9.2 43.3-14 66.1-14c44.6 0 84.8 26.8 101.9 67.9L281 232.7l21.4 10.7c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3L247 287.3c-10.3-5.2-18.4-13.8-22.8-24.5l-9.6-23-19.3 65.5 49.5 54c5.4 5.9 9.2 13 11.2 20.8l23 92.1c4.3 17.1-6.1 34.5-23.3 38.8s-34.5-6.1-38.8-23.3l-22-88.1-70.7-77.1c-14.8-16.1-20.3-38.6-14.7-59.7l16.9-63.5zM68.7 398l25-62.4c2.1 3 4.5 5.8 7 8.6l40.7 44.4-14.5 36.2c-2.4 6-6 11.5-10.6 16.1L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L68.7 398z\"]\n};\nconst faWalking = faPersonWalking;\nconst faL = {\n  prefix: 'fas',\n  iconName: 'l',\n  icon: [320, 512, [108], \"4c\", \"M64 32c17.7 0 32 14.3 32 32l0 352 192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32z\"]\n};\nconst faFire = {\n  prefix: 'fas',\n  iconName: 'fire',\n  icon: [448, 512, [128293], \"f06d\", \"M159.3 5.4c7.8-7.3 19.9-7.2 27.7 .1c27.6 25.9 53.5 53.8 77.7 84c11-14.4 23.5-30.1 37-42.9c7.9-7.4 20.1-7.4 28 .1c34.6 33 63.9 76.6 84.5 118c20.3 40.8 33.8 82.5 33.8 111.9C448 404.2 348.2 512 224 512C98.4 512 0 404.1 0 276.5c0-38.4 17.8-85.3 45.4-131.7C73.3 97.7 112.7 48.6 159.3 5.4zM225.7 416c25.3 0 47.7-7 68.8-21c42.1-29.4 53.4-88.2 28.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2 29.3c-6.6 7.6-18.5 7.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8 42.5-50.8 69.3-50.8 99.4C112 375.4 162.6 416 225.7 416z\"]\n};\nconst faBedPulse = {\n  prefix: 'fas',\n  iconName: 'bed-pulse',\n  icon: [640, 512, [\"procedures\"], \"f487\", \"M483.2 9.6L524 64l92 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-104 0c-7.6 0-14.7-3.6-19.2-9.6L468.7 70.3l-47 99.9c-3.7 7.8-11.3 13.1-19.9 13.7s-16.9-3.4-21.7-10.6L339.2 112 216 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l136 0c8 0 15.5 4 20 10.7l24.4 36.6 45.9-97.5C445.9 6.2 453.2 1 461.6 .1s16.6 2.7 21.6 9.5zM320 160l12.7 0 20.7 31.1c11.2 16.8 30.6 26.3 50.7 24.8s37.9-13.7 46.5-32L461.9 160l82.1 0c53 0 96 43 96 96l0 224c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-224 0-32 0L64 448l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 96C0 78.3 14.3 64 32 64s32 14.3 32 32l0 256 224 0 0-160c0-17.7 14.3-32 32-32zm-144 0a80 80 0 1 1 0 160 80 80 0 1 1 0-160z\"]\n};\nconst faProcedures = faBedPulse;\nconst faShuttleSpace = {\n  prefix: 'fas',\n  iconName: 'shuttle-space',\n  icon: [640, 512, [\"space-shuttle\"], \"f197\", \"M130 480c40.6 0 80.4-11 115.2-31.9L352 384l-224 0 0 96 2 0zM352 128L245.2 63.9C210.4 43 170.6 32 130 32l-2 0 0 96 224 0zM96 128l0-96L80 32C53.5 32 32 53.5 32 80l0 48 8 0c-22.1 0-40 17.9-40 40l0 16L0 328l0 16c0 22.1 17.9 40 40 40l-8 0 0 48c0 26.5 21.5 48 48 48l16 0 0-96 8 0c26.2 0 49.4-12.6 64-32l288 0c69.3 0 135-22.7 179.2-81.6c6.4-8.5 6.4-20.3 0-28.8C591 182.7 525.3 160 456 160l-288 0c-14.6-19.4-37.8-32-64-32l-8 0zM512 243.6l0 24.9c0 19.6-15.9 35.6-35.6 35.6c-2.5 0-4.4-2-4.4-4.4l0-87.1c0-2.5 2-4.4 4.4-4.4c19.6 0 35.6 15.9 35.6 35.6z\"]\n};\nconst faSpaceShuttle = faShuttleSpace;\nconst faFaceLaugh = {\n  prefix: 'fas',\n  iconName: 'face-laugh',\n  icon: [512, 512, [\"laugh\"], \"f599\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96.8 314.1c-3.8-13.7 7.4-26.1 21.6-26.1l275.2 0c14.2 0 25.5 12.4 21.6 26.1C396.2 382 332.1 432 256 432s-140.2-50-159.2-117.9zM144.4 192a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faLaugh = faFaceLaugh;\nconst faFolderOpen = {\n  prefix: 'fas',\n  iconName: 'folder-open',\n  icon: [576, 512, [128194, 128449, 61717], \"f07c\", \"M88.7 223.8L0 375.8 0 96C0 60.7 28.7 32 64 32l117.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 28.3 18.7 45.3 18.7L416 96c35.3 0 64 28.7 64 64l0 32-336 0c-22.8 0-43.8 12.1-55.3 31.8zm27.6 16.1C122.1 230 132.6 224 144 224l400 0c11.5 0 22 6.1 27.7 16.1s5.7 22.2-.1 32.1l-112 192C453.9 474 443.4 480 432 480L32 480c-11.5 0-22-6.1-27.7-16.1s-5.7-22.2 .1-32.1l112-192z\"]\n};\nconst faHeartCirclePlus = {\n  prefix: 'fas',\n  iconName: 'heart-circle-plus',\n  icon: [576, 512, [], \"e500\", \"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9l2.6-2.4C267.2 438.6 256 404.6 256 368c0-97.2 78.8-176 176-176c28.3 0 55 6.7 78.7 18.5c.9-6.5 1.3-13 1.3-19.6l0-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1l0 5.8c0 41.5 17.2 81.2 47.6 109.5zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208l0 48 48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 0-48c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faCodeFork = {\n  prefix: 'fas',\n  iconName: 'code-fork',\n  icon: [448, 512, [], \"e13b\", \"M80 104a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm80-24c0 32.8-19.7 61-48 73.3l0 38.7c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-38.7C307.7 141 288 112.8 288 80c0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3l0 38.7c0 53-43 96-96 96l-48 0 0 70.7c28.3 12.3 48 40.5 48 73.3c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3l0-70.7-48 0c-53 0-96-43-96-96l0-38.7C19.7 141 0 112.8 0 80C0 35.8 35.8 0 80 0s80 35.8 80 80zm208 24a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM248 432a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z\"]\n};\nconst faCity = {\n  prefix: 'fas',\n  iconName: 'city',\n  icon: [640, 512, [127961], \"f64f\", \"M480 48c0-26.5-21.5-48-48-48L336 0c-26.5 0-48 21.5-48 48l0 48-64 0 0-72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 72-64 0 0-72c0-13.3-10.7-24-24-24S64 10.7 64 24l0 72L48 96C21.5 96 0 117.5 0 144l0 96L0 464c0 26.5 21.5 48 48 48l256 0 32 0 96 0 160 0c26.5 0 48-21.5 48-48l0-224c0-26.5-21.5-48-48-48l-112 0 0-144zm96 320l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16zM240 416l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16zM128 400c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32zM560 256c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0zM256 176l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16zM112 160c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0zM256 304c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32zM112 320l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16zm304-48l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16zM400 64c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0zm16 112l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16z\"]\n};\nconst faMicrophoneLines = {\n  prefix: 'fas',\n  iconName: 'microphone-lines',\n  icon: [384, 512, [127897, \"microphone-alt\"], \"f3c9\", \"M96 96l0 160c0 53 43 96 96 96s96-43 96-96l-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-32-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-32-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0c0-53-43-96-96-96S96 43 96 96zM320 240l0 16c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 24z\"]\n};\nconst faMicrophoneAlt = faMicrophoneLines;\nconst faPepperHot = {\n  prefix: 'fas',\n  iconName: 'pepper-hot',\n  icon: [512, 512, [127798], \"f816\", \"M428.3 3c11.6-6.4 26.2-2.3 32.6 9.3l4.8 8.7c19.3 34.7 19.8 75.7 3.4 110C495.8 159.6 512 197.9 512 240c0 18.5-3.1 36.3-8.9 52.8c-6.1 17.3-28.5 16.3-36.8-.1l-11.7-23.4c-4.1-8.1-12.4-13.3-21.5-13.3L360 256c-13.3 0-24-10.7-24-24l0-80c0-13.3-10.7-24-24-24l-17.1 0c-21.3 0-30-23.9-10.8-32.9C304.7 85.4 327.7 80 352 80c28.3 0 54.8 7.3 77.8 20.2c5.5-18.2 3.7-38.4-6-55.8L419 35.7c-6.4-11.6-2.3-26.2 9.3-32.6zM171.2 345.5L264 160l40 0 0 80c0 26.5 21.5 48 48 48l76.2 0 23.9 47.8C372.3 443.9 244.3 512 103.2 512l-58.8 0C19.9 512 0 492.1 0 467.6c0-20.8 14.5-38.8 34.8-43.3l49.8-11.1c37.6-8.4 69.5-33.2 86.7-67.7z\"]\n};\nconst faUnlock = {\n  prefix: 'fas',\n  iconName: 'unlock',\n  icon: [448, 512, [128275], \"f09c\", \"M144 144c0-44.2 35.8-80 80-80c31.9 0 59.4 18.6 72.3 45.7c7.6 16 26.7 22.8 42.6 15.2s22.8-26.7 15.2-42.6C331 33.7 281.5 0 224 0C144.5 0 80 64.5 80 144l0 48-16 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-240 0 0-48z\"]\n};\nconst faColonSign = {\n  prefix: 'fas',\n  iconName: 'colon-sign',\n  icon: [384, 512, [], \"e140\", \"M255 39.8c4.3-17.1-6.1-34.5-23.3-38.8S197.2 7.1 193 24.2L181.9 68.6C96.1 87.8 32 164.4 32 256c0 58.1 25.8 110.2 66.7 145.4L81 472.2c-4.3 17.1 6.1 34.5 23.3 38.8s34.5-6.1 38.8-23.3l13-52.1c9 3.4 18.4 6.2 28 8.2L177 472.2c-4.3 17.1 6.1 34.5 23.3 38.8s34.5-6.1 38.8-23.3l10.4-41.4c33.4-4.4 64.1-17.4 89.8-36.7c14.1-10.6 17-30.7 6.4-44.8s-30.7-17-44.8-6.4c-10.2 7.7-21.7 13.9-34 18.3L321 160c9.4-.3 18.5-4.7 24.6-12.8c10.6-14.1 7.8-34.2-6.4-44.8c-1.1-.8-2.2-1.6-3.3-2.4L351 39.8c4.3-17.1-6.1-34.5-23.3-38.8S293.2 7.1 289 24.2L277.2 71.5c-9.3-2.7-18.8-4.6-28.6-5.9L255 39.8zM163.2 143.3L117.3 326.8C103.9 306.5 96 282.2 96 256c0-48.7 27.2-91 67.2-112.7zm8.6 229.5l61.1-244.6c9.9 .7 19.5 2.5 28.7 5.3l-62 248.1c-9.7-1.9-19-4.8-27.8-8.8z\"]\n};\nconst faHeadset = {\n  prefix: 'fas',\n  iconName: 'headset',\n  icon: [512, 512, [], \"f590\", \"M256 48C141.1 48 48 141.1 48 256l0 40c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-40C0 114.6 114.6 0 256 0S512 114.6 512 256l0 144.1c0 48.6-39.4 88-88.1 88L313.6 488c-8.3 14.3-23.8 24-41.6 24l-32 0c-26.5 0-48-21.5-48-48s21.5-48 48-48l32 0c17.8 0 33.3 9.7 41.6 24l110.4 .1c22.1 0 40-17.9 40-40L464 256c0-114.9-93.1-208-208-208zM144 208l16 0c17.7 0 32 14.3 32 32l0 112c0 17.7-14.3 32-32 32l-16 0c-35.3 0-64-28.7-64-64l0-48c0-35.3 28.7-64 64-64zm224 0c35.3 0 64 28.7 64 64l0 48c0 35.3-28.7 64-64 64l-16 0c-17.7 0-32-14.3-32-32l0-112c0-17.7 14.3-32 32-32l16 0z\"]\n};\nconst faStoreSlash = {\n  prefix: 'fas',\n  iconName: 'store-slash',\n  icon: [640, 512, [], \"e071\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-86.8-68 0-17.1 0-131.4c-4 1-8 1.8-12.3 2.3c0 0 0 0-.1 0c-5.3 .7-10.7 1.1-16.2 1.1c-12.4 0-24.3-1.9-35.4-5.3l0 100.3L301.2 210.7c7-4.4 13.3-9.7 18.8-15.7c15.9 17.6 39.1 29 65.2 29c26.2 0 49.3-11.4 65.2-29c16 17.6 39.1 29 65.2 29c4.1 0 8.1-.3 12.1-.8c55.5-7.4 81.8-72.5 52.1-119.4L522.3 13.1C517.2 5 508.1 0 498.4 0L141.6 0c-9.7 0-18.8 5-23.9 13.1l-22.7 36L38.8 5.1zm73.4 218.1c4 .5 8.1 .8 12.1 .8c11 0 21.4-2 31-5.6L48.9 134.5c-6.1 40.6 19.5 82.8 63.3 88.7zM160 384l0-133.4c-11.2 3.5-23.2 5.4-35.6 5.4c-5.5 0-11-.4-16.3-1.1l-.1 0c-4.1-.6-8.1-1.3-12-2.3L96 384l0 64c0 35.3 28.7 64 64 64l320 0c12.9 0 24.8-3.8 34.9-10.3L365.5 384 160 384z\"]\n};\nconst faRoadCircleXmark = {\n  prefix: 'fas',\n  iconName: 'road-circle-xmark',\n  icon: [640, 512, [], \"e566\", \"M213.2 32L288 32l0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 74.8 0c27.1 0 51.3 17.1 60.3 42.6l42.7 120.6c-10.9-2.1-22.2-3.2-33.8-3.2c-59.5 0-112.1 29.6-144 74.8l0-42.8c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32c2.3 0 4.6-.3 6.8-.7c-4.5 15.5-6.8 31.8-6.8 48.7c0 5.4 .2 10.7 .7 16l-.7 0c-17.7 0-32 14.3-32 32l0 64L86.6 480C56.5 480 32 455.5 32 425.4c0-6.2 1.1-12.4 3.1-18.2L152.9 74.6C162 49.1 186.1 32 213.2 32zM496 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm22.6 144l36.7-36.7c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L496 345.4l-36.7-36.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L473.4 368l-36.7 36.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L496 390.6l36.7 36.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L518.6 368z\"]\n};\nconst faUserMinus = {\n  prefix: 'fas',\n  iconName: 'user-minus',\n  icon: [640, 512, [], \"f503\", \"M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM472 200l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faMarsStrokeUp = {\n  prefix: 'fas',\n  iconName: 'mars-stroke-up',\n  icon: [320, 512, [9896, \"mars-stroke-v\"], \"f22a\", \"M148.7 4.7c6.2-6.2 16.4-6.2 22.6 0l64 64c4.6 4.6 5.9 11.5 3.5 17.4s-8.3 9.9-14.8 9.9l-40 0 0 24 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 24c0 .6 0 1.2-.1 1.8c77 11.6 136.1 78 136.1 158.2c0 88.4-71.6 160-160 160S0 440.4 0 352c0-80.2 59.1-146.7 136.1-158.2c0-.6-.1-1.2-.1-1.8l0-24-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-24L96 96c-6.5 0-12.3-3.9-14.8-9.9s-1.1-12.9 3.5-17.4l64-64zM256 352A96 96 0 1 0 64 352a96 96 0 1 0 192 0z\"]\n};\nconst faMarsStrokeV = faMarsStrokeUp;\nconst faChampagneGlasses = {\n  prefix: 'fas',\n  iconName: 'champagne-glasses',\n  icon: [640, 512, [129346, \"glass-cheers\"], \"f79f\", \"M155.6 17.3C163 3 179.9-3.6 195 1.9L320 47.5l125-45.6c15.1-5.5 32 1.1 39.4 15.4l78.8 152.9c28.8 55.8 10.3 122.3-38.5 156.6L556.1 413l41-15c16.6-6 35 2.5 41 19.1s-2.5 35-19.1 41l-71.1 25.9L476.8 510c-16.6 6.1-35-2.5-41-19.1s2.5-35 19.1-41l41-15-31.3-86.2c-59.4 5.2-116.2-34-130-95.2L320 188.8l-14.6 64.7c-13.8 61.3-70.6 100.4-130 95.2l-31.3 86.2 41 15c16.6 6 25.2 24.4 19.1 41s-24.4 25.2-41 19.1L92.2 484.1 21.1 458.2c-16.6-6.1-25.2-24.4-19.1-41s24.4-25.2 41-19.1l41 15 31.3-86.2C66.5 292.5 48.1 226 76.9 170.2L155.6 17.3zm44 54.4l-27.2 52.8L261.6 157l13.1-57.9L199.6 71.7zm240.9 0L365.4 99.1 378.5 157l89.2-32.5L440.5 71.7z\"]\n};\nconst faGlassCheers = faChampagneGlasses;\nconst faClipboard = {\n  prefix: 'fas',\n  iconName: 'clipboard',\n  icon: [384, 512, [128203], \"f328\", \"M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM112 192l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faHouseCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'house-circle-exclamation',\n  icon: [640, 512, [], \"e50a\", \"M320.7 352c8.1-89.7 83.5-160 175.3-160c8.9 0 17.6 .7 26.1 1.9L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 69.7c-.1 .9-.1 1.8-.1 2.8l0 112c0 22.1 17.9 40 40 40l16 0c1.2 0 2.4-.1 3.6-.2c1.5 .1 3 .2 4.5 .2l31.9 0 24 0c22.1 0 40-17.9 40-40l0-24 0-64c0-17.7 14.3-32 32-32l64 0 .7 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faFileArrowUp = {\n  prefix: 'fas',\n  iconName: 'file-arrow-up',\n  icon: [384, 512, [\"file-upload\"], \"f574\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-102.1-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31L216 408z\"]\n};\nconst faFileUpload = faFileArrowUp;\nconst faWifi = {\n  prefix: 'fas',\n  iconName: 'wifi',\n  icon: [640, 512, [\"wifi-3\", \"wifi-strong\"], \"f1eb\", \"M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z\"]\n};\nconst faWifi3 = faWifi;\nconst faWifiStrong = faWifi;\nconst faBath = {\n  prefix: 'fas',\n  iconName: 'bath',\n  icon: [512, 512, [128705, \"bathtub\"], \"f2cd\", \"M96 77.3c0-7.3 5.9-13.3 13.3-13.3c3.5 0 6.9 1.4 9.4 3.9l14.9 14.9C130 91.8 128 101.7 128 112c0 19.9 7.2 38 19.2 52c-5.3 9.2-4 21.1 3.8 29c9.4 9.4 24.6 9.4 33.9 0L289 89c9.4-9.4 9.4-24.6 0-33.9c-7.9-7.9-19.8-9.1-29-3.8C246 39.2 227.9 32 208 32c-10.3 0-20.2 2-29.2 5.5L163.9 22.6C149.4 8.1 129.7 0 109.3 0C66.6 0 32 34.6 32 77.3L32 256c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 256 96 77.3zM32 352l0 16c0 28.4 12.4 54 32 71.6L64 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-16 256 0 0 16c0 17.7 14.3 32 32 32s32-14.3 32-32l0-40.4c19.6-17.6 32-43.1 32-71.6l0-16L32 352z\"]\n};\nconst faBathtub = faBath;\nconst faUnderline = {\n  prefix: 'fas',\n  iconName: 'underline',\n  icon: [448, 512, [], \"f0cd\", \"M16 64c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 128c0 53 43 96 96 96s96-43 96-96l0-128-16 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 128c0 88.4-71.6 160-160 160s-160-71.6-160-160L64 96 48 96C30.3 96 16 81.7 16 64zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32z\"]\n};\nconst faUserPen = {\n  prefix: 'fas',\n  iconName: 'user-pen',\n  icon: [640, 512, [\"user-edit\"], \"f4ff\", \"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l293.1 0c-3.1-8.8-3.7-18.4-1.4-27.8l15-60.1c2.8-11.3 8.6-21.5 16.8-29.7l40.3-40.3c-32.1-31-75.7-50.1-123.9-50.1l-91.4 0zm435.5-68.3c-15.6-15.6-40.9-15.6-56.6 0l-29.4 29.4 71 71 29.4-29.4c15.6-15.6 15.6-40.9 0-56.6l-14.4-14.4zM375.9 417c-4.1 4.1-7 9.2-8.4 14.9l-15 60.1c-1.4 5.5 .2 11.2 4.2 15.2s9.7 5.6 15.2 4.2l60.1-15c5.6-1.4 10.8-4.3 14.9-8.4L576.1 358.7l-71-71L375.9 417z\"]\n};\nconst faUserEdit = faUserPen;\nconst faSignature = {\n  prefix: 'fas',\n  iconName: 'signature',\n  icon: [640, 512, [], \"f5b7\", \"M192 128c0-17.7 14.3-32 32-32s32 14.3 32 32l0 7.8c0 27.7-2.4 55.3-7.1 82.5l-84.4 25.3c-40.6 12.2-68.4 49.6-68.4 92l0 71.9c0 40 32.5 72.5 72.5 72.5c26 0 50-13.9 62.9-36.5l13.9-24.3c26.8-47 46.5-97.7 58.4-150.5l94.4-28.3-12.5 37.5c-3.3 9.8-1.6 20.5 4.4 28.8s15.7 13.3 26 13.3l128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-83.6 0 18-53.9c3.8-11.3 .9-23.8-7.4-32.4s-20.7-11.8-32.2-8.4L316.4 198.1c2.4-20.7 3.6-41.4 3.6-62.3l0-7.8c0-53-43-96-96-96s-96 43-96 96l0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32zm-9.2 177l49-14.7c-10.4 33.8-24.5 66.4-42.1 97.2l-13.9 24.3c-1.5 2.6-4.3 4.3-7.4 4.3c-4.7 0-8.5-3.8-8.5-8.5l0-71.9c0-14.1 9.3-26.6 22.8-30.7zM24 368c-13.3 0-24 10.7-24 24s10.7 24 24 24l40.3 0c-.2-2.8-.3-5.6-.3-8.5L64 368l-40 0zm592 48c13.3 0 24-10.7 24-24s-10.7-24-24-24l-310.1 0c-6.7 16.3-14.2 32.3-22.3 48L616 416z\"]\n};\nconst faStroopwafel = {\n  prefix: 'fas',\n  iconName: 'stroopwafel',\n  icon: [512, 512, [], \"f551\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM312.6 63.7c-6.2-6.2-16.4-6.2-22.6 0L256 97.6 222.1 63.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l33.9 33.9-45.3 45.3-56.6-56.6c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l56.6 56.6-45.3 45.3L86.3 199.4c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L97.6 256 63.7 289.9c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l33.9-33.9 45.3 45.3-56.6 56.6c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l56.6-56.6 45.3 45.3-33.9 33.9c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L256 414.4l33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-33.9-33.9 45.3-45.3 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 45.3-45.3 33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L414.4 256l33.9-33.9c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0l-33.9 33.9-45.3-45.3 56.6-56.6c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0l-56.6 56.6-45.3-45.3 33.9-33.9c6.2-6.2 6.2-16.4 0-22.6zM142.9 256l45.3-45.3L233.4 256l-45.3 45.3L142.9 256zm67.9 67.9L256 278.6l45.3 45.3L256 369.1l-45.3-45.3zM278.6 256l45.3-45.3L369.1 256l-45.3 45.3L278.6 256zm22.6-67.9L256 233.4l-45.3-45.3L256 142.9l45.3 45.3z\"]\n};\nconst faBold = {\n  prefix: 'fas',\n  iconName: 'bold',\n  icon: [384, 512, [], \"f032\", \"M0 64C0 46.3 14.3 32 32 32l48 0 16 0 128 0c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128L96 480l-16 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-160L48 96 32 96C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64L112 96l0 128 112 0zM112 288l0 128 144 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0-112 0z\"]\n};\nconst faAnchorLock = {\n  prefix: 'fas',\n  iconName: 'anchor-lock',\n  icon: [640, 512, [], \"e4ad\", \"M320 96a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm21.1 80C367 158.8 384 129.4 384 96c0-53-43-96-96-96s-96 43-96 96c0 33.4 17 62.8 42.9 80L224 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 208-48 0c-53 0-96-43-96-96l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L97 263c-9.4-9.4-24.6-9.4-33.9 0L7 319c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 88.4 71.6 160 160 160l80 0 80 0c8 0 15.9-.6 23.6-1.7c-4.8-9-7.6-19.3-7.6-30.3l0-33.3c-5.2 .9-10.5 1.3-16 1.3l-48 0 0-208 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-10.9 0zM528 240c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z\"]\n};\nconst faBuildingNgo = {\n  prefix: 'fas',\n  iconName: 'building-ngo',\n  icon: [384, 512, [], \"e4d7\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c26.5 0 48-21.5 48-48l0-416c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM168 64l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 64 16 0 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 24c0 13.3-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24l0-88c0-8.8 7.2-16 16-16zM304 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16s16-7.2 16-16l0-32c0-8.8-7.2-16-16-16zm-48 16c0-26.5 21.5-48 48-48s48 21.5 48 48l0 32c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-32zM61.3 71.1l34.7 52L96 80c0-8.8 7.2-16 16-16s16 7.2 16 16l0 96c0 7.1-4.6 13.3-11.4 15.3s-14-.6-17.9-6.4L64 132.8 64 176c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-7.1 4.6-13.3 11.4-15.3s14 .6 17.9 6.4z\"]\n};\nconst faManatSign = {\n  prefix: 'fas',\n  iconName: 'manat-sign',\n  icon: [384, 512, [], \"e1d5\", \"M192 32c-17.7 0-32 14.3-32 32l0 34.7C69.2 113.9 0 192.9 0 288L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-59.6 40.8-109.8 96-124l0 284c0 17.7 14.3 32 32 32s32-14.3 32-32l0-284c55.2 14.2 96 64.3 96 124l0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-95.1-69.2-174.1-160-189.3L224 64c0-17.7-14.3-32-32-32z\"]\n};\nconst faNotEqual = {\n  prefix: 'fas',\n  iconName: 'not-equal',\n  icon: [448, 512, [], \"f53e\", \"M369.8 37.4c14.7 9.8 18.7 29.7 8.9 44.4L337.1 144l62.9 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-105.5 0-64 96L400 304c17.7 0 32 14.3 32 32s-14.3 32-32 32l-212.2 0-65.2 97.7c-9.8 14.7-29.7 18.7-44.4 8.9s-18.7-29.7-8.9-44.4L110.9 368 48 368c-17.7 0-32-14.3-32-32s14.3-32 32-32l105.5 0 64-96L48 208c-17.7 0-32-14.3-32-32s14.3-32 32-32l212.2 0 65.2-97.7c9.8-14.7 29.7-18.7 44.4-8.9z\"]\n};\nconst faBorderTopLeft = {\n  prefix: 'fas',\n  iconName: 'border-top-left',\n  icon: [448, 512, [\"border-style\"], \"f853\", \"M0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-336c0-8.8 7.2-16 16-16l336 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32C35.8 32 0 67.8 0 112L0 448zm160 0a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm192 0a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm-96 0a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm192 0a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM416 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm0 32a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faBorderStyle = faBorderTopLeft;\nconst faMapLocationDot = {\n  prefix: 'fas',\n  iconName: 'map-location-dot',\n  icon: [576, 512, [\"map-marked-alt\"], \"f5a0\", \"M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152l0 270.8c0 9.8-6 18.6-15.1 22.3L416 503l0-302.6zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6l0 251.4L32.9 502.7C17.1 509 0 497.4 0 480.4L0 209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77l0 249.3L192 449.4 192 255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\"]\n};\nconst faMapMarkedAlt = faMapLocationDot;\nconst faJedi = {\n  prefix: 'fas',\n  iconName: 'jedi',\n  icon: [576, 512, [], \"f669\", \"M246 315.7l-21.2-31.9c-2.1-3.2-1.7-7.4 1-10.1s6.9-3.1 10.1-1l29.5 19.7c2.1 1.4 4.9 0 5-2.6L279.7 8c.1-4.5 3.8-8 8.3-8s8.1 3.5 8.3 8l9.4 281.9c.1 2.5 2.9 3.9 5 2.6l29.5-19.7c3.2-2.1 7.4-1.7 10.1 1s3.1 6.9 1 10.1L330 315.7c-1.3 1.9-.2 4.5 2 4.9l37.6 7.5c3.7 .7 6.4 4 6.4 7.8s-2.7 7.1-6.4 7.8L332 351.4c-2.2 .4-3.3 3-2 4.9l21.2 31.9c2.1 3.2 1.7 7.4-1 10.1s-6.9 3.1-10.1 1l-26.3-17.6c-2.2-1.4-5.1 .2-5 2.8l2.1 61.5C370.6 435.2 416 382.9 416 320c0-37-15.7-70.4-40.8-93.7c-7-6.5-6.5-18.6 1-24.4C410.1 175.5 432 134.3 432 88c0-16.8-2.9-33-8.2-48c-4.6-13 10.2-30 21.4-22c53.5 38 92.7 94.8 107.8 160.7c.5 2.1-.2 4.3-1.7 5.9l-28.4 28.4c-4 4-1.2 10.9 4.5 10.9l26 0c3.4 0 6.2 2.6 6.3 6c.1 3.3 .2 6.6 .2 10c0 17.5-1.7 34.7-4.8 51.3c-.2 1.2-.9 2.4-1.7 3.3l-46.5 46.5c-4 4-1.2 10.9 4.5 10.9l14.6 0c4.6 0 7.7 4.8 5.7 9C487.2 450.5 394.8 512 288 512S88.8 450.5 44.3 361c-2.1-4.2 1-9 5.7-9l14.6 0c5.7 0 8.6-6.9 4.5-10.9L22.6 294.6c-.9-.9-1.5-2-1.7-3.3C17.7 274.7 16 257.5 16 240c0-3.3 .1-6.7 .2-10c.1-3.4 2.9-6 6.3-6l26 0c5.7 0 8.6-6.9 4.5-10.9L24.6 184.6c-1.5-1.5-2.2-3.8-1.7-5.9C38.1 112.8 77.3 56 130.8 18c11.3-8 26 8.9 21.4 22c-5.3 15-8.2 31.2-8.2 48c0 46.3 21.9 87.5 55.8 113.9c7.5 5.8 8 17.9 1 24.4C175.7 249.6 160 283 160 320c0 62.9 45.4 115.2 105.1 126l2.1-61.5c.1-2.6-2.8-4.2-5-2.8l-26.3 17.6c-3.2 2.1-7.4 1.7-10.1-1s-3.1-6.9-1-10.1L246 356.3c1.3-1.9 .2-4.5-2-4.9l-37.6-7.5c-3.7-.7-6.4-4-6.4-7.8s2.7-7.1 6.4-7.8l37.6-7.5c2.2-.4 3.3-3 2-4.9z\"]\n};\nconst faSquarePollVertical = {\n  prefix: 'fas',\n  iconName: 'square-poll-vertical',\n  icon: [448, 512, [\"poll\"], \"f681\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm64 192c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32zm64-64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 192c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-192zM320 288c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32z\"]\n};\nconst faPoll = faSquarePollVertical;\nconst faMugHot = {\n  prefix: 'fas',\n  iconName: 'mug-hot',\n  icon: [512, 512, [9749], \"f7b6\", \"M88 0C74.7 0 64 10.7 64 24c0 38.9 23.4 59.4 39.1 73.1l1.1 1C120.5 112.3 128 119.9 128 136c0 13.3 10.7 24 24 24s24-10.7 24-24c0-38.9-23.4-59.4-39.1-73.1l-1.1-1C119.5 47.7 112 40.1 112 24c0-13.3-10.7-24-24-24zM32 192c-17.7 0-32 14.3-32 32L0 416c0 53 43 96 96 96l192 0c53 0 96-43 96-96l16 0c61.9 0 112-50.1 112-112s-50.1-112-112-112l-48 0L32 192zm352 64l16 0c26.5 0 48 21.5 48 48s-21.5 48-48 48l-16 0 0-96zM224 24c0-13.3-10.7-24-24-24s-24 10.7-24 24c0 38.9 23.4 59.4 39.1 73.1l1.1 1C232.5 112.3 240 119.9 240 136c0 13.3 10.7 24 24 24s24-10.7 24-24c0-38.9-23.4-59.4-39.1-73.1l-1.1-1C231.5 47.7 224 40.1 224 24z\"]\n};\nconst faCarBattery = {\n  prefix: 'fas',\n  iconName: 'car-battery',\n  icon: [512, 512, [\"battery-car\"], \"f5df\", \"M80 96c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l96 0c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l16 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 160c0-35.3 28.7-64 64-64l16 0zm304 96c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 32-32 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0 0 32c0 8.8 7.2 16 16 16s16-7.2 16-16l0-32 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0-32zM80 240c0 8.8 7.2 16 16 16l96 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-96 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faBatteryCar = faCarBattery;\nconst faGift = {\n  prefix: 'fas',\n  iconName: 'gift',\n  icon: [512, 512, [127873], \"f06b\", \"M190.5 68.8L225.3 128l-1.3 0-72 0c-22.1 0-40-17.9-40-40s17.9-40 40-40l2.2 0c14.9 0 28.8 7.9 36.3 20.8zM64 88c0 14.4 3.5 28 9.6 40L32 128c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l448 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-41.6 0c6.1-12 9.6-25.6 9.6-40c0-48.6-39.4-88-88-88l-2.2 0c-31.9 0-61.5 16.9-77.7 44.4L256 85.5l-24.1-41C215.7 16.9 186.1 0 154.2 0L152 0C103.4 0 64 39.4 64 88zm336 0c0 22.1-17.9 40-40 40l-72 0-1.3 0 34.8-59.2C329.1 55.9 342.9 48 357.8 48l2.2 0c22.1 0 40 17.9 40 40zM32 288l0 176c0 26.5 21.5 48 48 48l144 0 0-224L32 288zM288 512l144 0c26.5 0 48-21.5 48-48l0-176-192 0 0 224z\"]\n};\nconst faDiceTwo = {\n  prefix: 'fas',\n  iconName: 'dice-two',\n  icon: [448, 512, [9857], \"f528\", \"M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM352 352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM128 192a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faChessQueen = {\n  prefix: 'fas',\n  iconName: 'chess-queen',\n  icon: [512, 512, [9819], \"f445\", \"M256 0a56 56 0 1 1 0 112A56 56 0 1 1 256 0zM134.1 143.8c3.3-13 15-23.8 30.2-23.8c12.3 0 22.6 7.2 27.7 17c12 23.2 36.2 39 64 39s52-15.8 64-39c5.1-9.8 15.4-17 27.7-17c15.3 0 27 10.8 30.2 23.8c7 27.8 32.2 48.3 62.1 48.3c10.8 0 21-2.7 29.8-7.4c8.4-4.4 18.9-4.5 27.6 .9c13 8 17.1 25 9.2 38L399.7 400 384 400l-40.4 0-175.1 0L128 400l-15.7 0L5.4 223.6c-7.9-13-3.8-30 9.2-38c8.7-5.3 19.2-5.3 27.6-.9c8.9 4.7 19 7.4 29.8 7.4c29.9 0 55.1-20.5 62.1-48.3zM256 224s0 0 0 0s0 0 0 0s0 0 0 0zM112 432l288 0 41.4 41.4c4.2 4.2 6.6 10 6.6 16c0 12.5-10.1 22.6-22.6 22.6L86.6 512C74.1 512 64 501.9 64 489.4c0-6 2.4-11.8 6.6-16L112 432z\"]\n};\nconst faGlasses = {\n  prefix: 'fas',\n  iconName: 'glasses',\n  icon: [576, 512, [], \"f530\", \"M118.6 80c-11.5 0-21.4 7.9-24 19.1L57 260.3c20.5-6.2 48.3-12.3 78.7-12.3c32.3 0 61.8 6.9 82.8 13.5c10.6 3.3 19.3 6.7 25.4 9.2c3.1 1.3 5.5 2.4 7.3 3.2c.9 .4 1.6 .7 2.1 1l.6 .3 .2 .1c0 0 .1 0 .1 0c0 0 0 0 0 0s0 0 0 0L247.9 288s0 0 0 0l6.3-12.7c5.8 2.9 10.4 7.3 13.5 12.7l40.6 0c3.1-5.3 7.7-9.8 13.5-12.7l6.3 12.7s0 0 0 0c-6.3-12.7-6.3-12.7-6.3-12.7s0 0 0 0s0 0 0 0c0 0 .1 0 .1 0l.2-.1 .6-.3c.5-.2 1.2-.6 2.1-1c1.8-.8 4.2-1.9 7.3-3.2c6.1-2.6 14.8-5.9 25.4-9.2c21-6.6 50.4-13.5 82.8-13.5c30.4 0 58.2 6.1 78.7 12.3L481.4 99.1c-2.6-11.2-12.6-19.1-24-19.1c-3.1 0-6.2 .6-9.2 1.8L416.9 94.3c-12.3 4.9-26.3-1.1-31.2-13.4s1.1-26.3 13.4-31.2l31.3-12.5c8.6-3.4 17.7-5.2 27-5.2c33.8 0 63.1 23.3 70.8 56.2l43.9 188c1.7 7.3 2.9 14.7 3.5 22.1c.3 1.9 .5 3.8 .5 5.7l0 6.7 0 41.3 0 16c0 61.9-50.1 112-112 112l-44.3 0c-59.4 0-108.5-46.4-111.8-105.8L306.6 352l-37.2 0-1.2 22.2C264.9 433.6 215.8 480 156.3 480L112 480C50.1 480 0 429.9 0 368l0-16 0-41.3L0 304c0-1.9 .2-3.8 .5-5.7c.6-7.4 1.8-14.8 3.5-22.1l43.9-188C55.5 55.3 84.8 32 118.6 32c9.2 0 18.4 1.8 27 5.2l31.3 12.5c12.3 4.9 18.3 18.9 13.4 31.2s-18.9 18.3-31.2 13.4L127.8 81.8c-2.9-1.2-6-1.8-9.2-1.8zM64 325.4L64 368c0 26.5 21.5 48 48 48l44.3 0c25.5 0 46.5-19.9 47.9-45.3l2.5-45.6c-2.3-.8-4.9-1.7-7.5-2.5c-17.2-5.4-39.9-10.5-63.6-10.5c-23.7 0-46.2 5.1-63.2 10.5c-3.1 1-5.9 1.9-8.5 2.9zM512 368l0-42.6c-2.6-.9-5.5-1.9-8.5-2.9c-17-5.4-39.5-10.5-63.2-10.5c-23.7 0-46.4 5.1-63.6 10.5c-2.7 .8-5.2 1.7-7.5 2.5l2.5 45.6c1.4 25.4 22.5 45.3 47.9 45.3l44.3 0c26.5 0 48-21.5 48-48z\"]\n};\nconst faChessBoard = {\n  prefix: 'fas',\n  iconName: 'chess-board',\n  icon: [448, 512, [], \"f43c\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm64 64l0 64 64 0 0-64 64 0 0 64 64 0 0-64 64 0 0 64-64 0 0 64 64 0 0 64-64 0 0 64 64 0 0 64-64 0 0-64-64 0 0 64-64 0 0-64-64 0 0 64-64 0 0-64 64 0 0-64-64 0 0-64 64 0 0-64-64 0 0-64 64 0zm64 128l64 0 0-64-64 0 0 64zm0 64l0-64-64 0 0 64 64 0zm64 0l-64 0 0 64 64 0 0-64zm0 0l64 0 0-64-64 0 0 64z\"]\n};\nconst faBuildingCircleCheck = {\n  prefix: 'fas',\n  iconName: 'building-circle-check',\n  icon: [640, 512, [], \"e4d2\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c15.1 0 28.5-6.9 37.3-17.8C340.4 462.2 320 417.5 320 368c0-54.7 24.9-103.5 64-135.8L384 48c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM640 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faPersonChalkboard = {\n  prefix: 'fas',\n  iconName: 'person-chalkboard',\n  icon: [640, 512, [], \"e53d\", \"M192 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-8 384l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-288 56 0 64 0 16 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-64 192 0 0 192-192 0 0-32-64 0 0 48c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-224c0-26.5-21.5-48-48-48L368 0c-26.5 0-48 21.5-48 48l0 80-76.9 0-65.9 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9L120 256.9 120 480c0 17.7 14.3 32 32 32s32-14.3 32-32z\"]\n};\nconst faMarsStrokeRight = {\n  prefix: 'fas',\n  iconName: 'mars-stroke-right',\n  icon: [640, 512, [9897, \"mars-stroke-h\"], \"f22b\", \"M208 368a112 112 0 1 0 0-224 112 112 0 1 0 0 224zm174.4-88C370.7 365.8 297.1 432 208 432c-97.2 0-176-78.8-176-176s78.8-176 176-176c89.1 0 162.7 66.2 174.4 152l33.6 0 0-56c0-13.3 10.7-24 24-24s24 10.7 24 24l0 56 32 0 0-56c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l80 80c9.4 9.4 9.4 24.6 0 33.9l-80 80c-6.9 6.9-17.2 8.9-26.2 5.2s-14.8-12.5-14.8-22.2l0-56-32 0 0 56c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-56-33.6 0z\"]\n};\nconst faMarsStrokeH = faMarsStrokeRight;\nconst faHandBackFist = {\n  prefix: 'fas',\n  iconName: 'hand-back-fist',\n  icon: [448, 512, [\"hand-rock\"], \"f255\", \"M144 0C117.5 0 96 21.5 96 48l0 48 0 28.5L96 176c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-26.7-9 7.5C40.4 169 32 187 32 206L32 244c0 38 16.9 74 46.1 98.3L128 384l0 96c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-105.3c46.9-19 80-65 80-118.7l0-80 0-16 0-16c0-26.5-21.5-48-48-48c-12.4 0-23.6 4.7-32.1 12.3C350 83.5 329.3 64 304 64c-12.4 0-23.6 4.7-32.1 12.3C270 51.5 249.3 32 224 32c-12.4 0-23.6 4.7-32.1 12.3C190 19.5 169.3 0 144 0z\"]\n};\nconst faHandRock = faHandBackFist;\nconst faSquareCaretUp = {\n  prefix: 'fas',\n  iconName: 'square-caret-up',\n  icon: [448, 512, [\"caret-square-up\"], \"f151\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 160c6.7 0 13 2.8 17.6 7.7l104 112c6.5 7 8.2 17.2 4.4 25.9s-12.5 14.4-22 14.4l-208 0c-9.5 0-18.2-5.7-22-14.4s-2.1-18.9 4.4-25.9l104-112c4.5-4.9 10.9-7.7 17.6-7.7z\"]\n};\nconst faCaretSquareUp = faSquareCaretUp;\nconst faCloudShowersWater = {\n  prefix: 'fas',\n  iconName: 'cloud-showers-water',\n  icon: [576, 512, [], \"e4e4\", \"M224 0c38.6 0 71.9 22.8 87.2 55.7C325.7 41.1 345.8 32 368 32c38.7 0 71 27.5 78.4 64l1.6 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64s28.7-64 64-64c0-53 43-96 96-96zM140.6 292.3l-48 80c-6.8 11.4-21.6 15-32.9 8.2s-15.1-21.6-8.2-32.9l48-80c6.8-11.4 21.6-15.1 32.9-8.2s15.1 21.6 8.2 32.9zm327.8-32.9c11.4 6.8 15 21.6 8.2 32.9l-48 80c-6.8 11.4-21.6 15-32.9 8.2s-15-21.6-8.2-32.9l48-80c6.8-11.4 21.6-15.1 32.9-8.2zM252.6 292.3l-48 80c-6.8 11.4-21.6 15-32.9 8.2s-15.1-21.6-8.2-32.9l48-80c6.8-11.4 21.6-15.1 32.9-8.2s15.1 21.6 8.2 32.9zm103.8-32.9c11.4 6.8 15 21.6 8.2 32.9l-48 80c-6.8 11.4-21.6 15-32.9 8.2s-15.1-21.6-8.2-32.9l48-80c6.8-11.4 21.6-15.1 32.9-8.2zM306.5 421.9C329 437.4 356.5 448 384 448c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 501.7 417 512 384 512c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 437.2 165.1 448 192 448c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z\"]\n};\nconst faChartBar = {\n  prefix: 'fas',\n  iconName: 'chart-bar',\n  icon: [512, 512, [\"bar-chart\"], \"f080\", \"M32 32c17.7 0 32 14.3 32 32l0 336c0 8.8 7.2 16 16 16l400 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L80 480c-44.2 0-80-35.8-80-80L0 64C0 46.3 14.3 32 32 32zm96 96c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 64l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 96l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faBarChart = faChartBar;\nconst faHandsBubbles = {\n  prefix: 'fas',\n  iconName: 'hands-bubbles',\n  icon: [576, 512, [\"hands-wash\"], \"e05e\", \"M416 64a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm96 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM160 464a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM32 160l.1 72.6c.1 52.2 24 101 64 133.1c-.1-1.9-.1-3.8-.1-5.7l0-8c0-71.8 37-138.6 97.9-176.7l60.2-37.6c8.6-5.4 17.9-8.4 27.3-9.4l45.9-79.5c6.6-11.5 2.7-26.2-8.8-32.8s-26.2-2.7-32.8 8.8l-78 135.1c-3.3 5.7-10.7 7.7-16.4 4.4s-7.7-10.7-4.4-16.4l62-107.4c6.6-11.5 2.7-26.2-8.8-32.8S214 5 207.4 16.5l-68 117.8s0 0 0 0s0 0 0 0l-43.3 75L96 160c0-17.7-14.4-32-32-32s-32 14.4-32 32zM332.1 88.5L307.5 131c13.9 4.5 26.4 13.7 34.7 27c.9 1.5 1.8 2.9 2.5 4.4l28.9-50c6.6-11.5 2.7-26.2-8.8-32.8s-26.2-2.7-32.8 8.8zm46.4 63.7l-26.8 46.4c-.6 6-2.1 11.8-4.3 17.4l4.7 0 13.3 0s0 0 0 0l31.8 0 23-39.8c6.6-11.5 2.7-26.2-8.8-32.8s-26.2-2.7-32.8 8.8zM315.1 175c-9.4-15-29.1-19.5-44.1-10.2l-60.2 37.6C159.3 234.7 128 291.2 128 352l0 8c0 8.9 .8 17.6 2.2 26.1c35.4 8.2 61.8 40 61.8 77.9c0 6.3-.7 12.5-2.1 18.4C215.1 501 246.3 512 280 512l176 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-92 0c-6.6 0-12-5.4-12-12s5.4-12 12-12l124 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-124 0c-6.6 0-12-5.4-12-12s5.4-12 12-12l156 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-156 0c-6.6 0-12-5.4-12-12s5.4-12 12-12l124 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-136 0s0 0 0 0s0 0 0 0l-93.2 0L305 219.1c15-9.4 19.5-29.1 10.2-44.1z\"]\n};\nconst faHandsWash = faHandsBubbles;\nconst faLessThanEqual = {\n  prefix: 'fas',\n  iconName: 'less-than-equal',\n  icon: [448, 512, [], \"f537\", \"M395.9 93.7c16.4-6.6 24.4-25.2 17.8-41.6s-25.2-24.4-41.6-17.8l-320 128C40 167.1 32 178.9 32 192s8 24.9 20.1 29.7l320 128c16.4 6.6 35-1.4 41.6-17.8s-1.4-35-17.8-41.6L150.2 192 395.9 93.7zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z\"]\n};\nconst faTrain = {\n  prefix: 'fas',\n  iconName: 'train',\n  icon: [448, 512, [128646], \"f238\", \"M96 0C43 0 0 43 0 96L0 352c0 48 35.2 87.7 81.1 94.9l-46 46C28.1 499.9 33.1 512 43 512l39.7 0c8.5 0 16.6-3.4 22.6-9.4L160 448l128 0 54.6 54.6c6 6 14.1 9.4 22.6 9.4l39.7 0c10 0 15-12.1 7.9-19.1l-46-46c46-7.1 81.1-46.9 81.1-94.9l0-256c0-53-43-96-96-96L96 0zM64 96c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32L96 224c-17.7 0-32-14.3-32-32l0-96zM224 288a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faEyeLowVision = {\n  prefix: 'fas',\n  iconName: 'eye-low-vision',\n  icon: [640, 512, [\"low-vision\"], \"f2a8\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223 149.5c48.6-44.3 123-50.8 179.3-11.7c60.8 42.4 78.9 123.2 44.2 186.9L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3L223 149.5zm223.1 298L83.1 161.5c-11 14.4-20.5 28.7-28.4 42.2l339 265.7c18.7-5.5 36.2-13 52.6-21.8zM34.5 268.3c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c3.1 0 6.1-.1 9.2-.2L33.1 247.8c-1.8 6.8-1.3 14 1.4 20.5z\"]\n};\nconst faLowVision = faEyeLowVision;\nconst faCrow = {\n  prefix: 'fas',\n  iconName: 'crow',\n  icon: [640, 512, [], \"f520\", \"M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faSailboat = {\n  prefix: 'fas',\n  iconName: 'sailboat',\n  icon: [576, 512, [], \"e445\", \"M256 16c0-7 4.5-13.2 11.2-15.3s13.9 .4 17.9 6.1l224 320c3.4 4.9 3.8 11.3 1.1 16.6s-8.2 8.6-14.2 8.6l-224 0c-8.8 0-16-7.2-16-16l0-320zM212.1 96.5c7 1.9 11.9 8.2 11.9 15.5l0 224c0 8.8-7.2 16-16 16L80 352c-5.7 0-11-3-13.8-8s-2.9-11-.1-16l128-224c3.6-6.3 11-9.4 18-7.5zM5.7 404.3C2.8 394.1 10.5 384 21.1 384l533.8 0c10.6 0 18.3 10.1 15.4 20.3l-4 14.3C550.7 473.9 500.4 512 443 512L133 512C75.6 512 25.3 473.9 9.7 418.7l-4-14.3z\"]\n};\nconst faWindowRestore = {\n  prefix: 'fas',\n  iconName: 'window-restore',\n  icon: [512, 512, [], \"f2d2\", \"M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z\"]\n};\nconst faSquarePlus = {\n  prefix: 'fas',\n  iconName: 'square-plus',\n  icon: [448, 512, [61846, \"plus-square\"], \"f0fe\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM200 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z\"]\n};\nconst faPlusSquare = faSquarePlus;\nconst faToriiGate = {\n  prefix: 'fas',\n  iconName: 'torii-gate',\n  icon: [512, 512, [9961], \"f6a1\", \"M0 80c0 26.5 21.5 48 48 48l16 0 0 64 64 0 0-64 96 0 0 64 64 0 0-64 96 0 0 64 64 0 0-64 16 0c26.5 0 48-21.5 48-48l0-66.6C512 6 506 0 498.6 0c-1.7 0-3.4 .3-5 1l-49 19.6C425.7 28.1 405.5 32 385.2 32L126.8 32c-20.4 0-40.5-3.9-59.4-11.4L18.4 1c-1.6-.6-3.3-1-5-1C6 0 0 6 0 13.4L0 80zM64 288l0 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-192 256 0 0 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-192 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0z\"]\n};\nconst faFrog = {\n  prefix: 'fas',\n  iconName: 'frog',\n  icon: [576, 512, [], \"f52e\", \"M368 32c41.7 0 75.9 31.8 79.7 72.5l85.6 26.3c25.4 7.8 42.8 31.3 42.8 57.9c0 21.8-11.7 41.9-30.7 52.7L400.8 323.5 493.3 416l50.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-8.5 0-16.6-3.4-22.6-9.4L346.9 360.2c11.7-36 3.2-77.1-25.4-105.7c-40.6-40.6-106.3-40.6-146.9-.1L101 324.4c-6.4 6.1-6.7 16.2-.6 22.6s16.2 6.6 22.6 .6l73.8-70.2 .1-.1 .1-.1c3.5-3.5 7.3-6.6 11.3-9.2c27.9-18.5 65.9-15.4 90.5 9.2c24.7 24.7 27.7 62.9 9 90.9c-2.6 3.8-5.6 7.5-9 10.9L261.8 416l90.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L64 480c-35.3 0-64-28.7-64-64C0 249.6 127 112.9 289.3 97.5C296.2 60.2 328.8 32 368 32zm0 104a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faBucket = {\n  prefix: 'fas',\n  iconName: 'bucket',\n  icon: [448, 512, [], \"e4cf\", \"M96 152l0 8-48 0 0-8C48 68.1 116.1 0 200 0l48 0c83.9 0 152 68.1 152 152l0 8-48 0 0-8c0-57.4-46.6-104-104-104l-48 0C142.6 48 96 94.6 96 152zM0 224c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-5.1 0L388.5 469c-2.6 24.4-23.2 43-47.7 43l-233.6 0c-24.6 0-45.2-18.5-47.7-43L37.1 256 32 256c-17.7 0-32-14.3-32-32z\"]\n};\nconst faImage = {\n  prefix: 'fas',\n  iconName: 'image',\n  icon: [512, 512, [], \"f03e\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faMicrophone = {\n  prefix: 'fas',\n  iconName: 'microphone',\n  icon: [384, 512, [], \"f130\", \"M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z\"]\n};\nconst faCow = {\n  prefix: 'fas',\n  iconName: 'cow',\n  icon: [640, 512, [128004], \"f6c8\", \"M96 224l0 32 0 160c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-88.2c9.9 6.6 20.6 12 32 16.1l0 24.2c0 8.8 7.2 16 16 16s16-7.2 16-16l0-16.9c5.3 .6 10.6 .9 16 .9s10.7-.3 16-.9l0 16.9c0 8.8 7.2 16 16 16s16-7.2 16-16l0-24.2c11.4-4 22.1-9.4 32-16.1l0 88.2c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-160 32 32 0 49.5c0 9.5 2.8 18.7 8.1 26.6L530 427c8.8 13.1 23.5 21 39.3 21c22.5 0 41.9-15.9 46.3-38l20.3-101.6c2.6-13-.3-26.5-8-37.3l-3.9-5.5 0-81.6c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 14.4-52.9-74.1C496 86.5 452.4 64 405.9 64L272 64l-16 0-64 0-48 0C77.7 64 24 117.7 24 184l0 54C9.4 249.8 0 267.8 0 288l0 17.6c0 8 6.4 14.4 14.4 14.4C46.2 320 72 294.2 72 262.4l0-6.4 0-32 0-40c0-24.3 12.1-45.8 30.5-58.9C98.3 135.9 96 147.7 96 160l0 64zM560 336a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM166.6 166.6c-4.2-4.2-6.6-10-6.6-16c0-12.5 10.1-22.6 22.6-22.6l178.7 0c12.5 0 22.6 10.1 22.6 22.6c0 6-2.4 11.8-6.6 16l-23.4 23.4C332.2 211.8 302.7 224 272 224s-60.2-12.2-81.9-33.9l-23.4-23.4z\"]\n};\nconst faCaretUp = {\n  prefix: 'fas',\n  iconName: 'caret-up',\n  icon: [320, 512, [], \"f0d8\", \"M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z\"]\n};\nconst faScrewdriver = {\n  prefix: 'fas',\n  iconName: 'screwdriver',\n  icon: [512, 512, [129691], \"f54a\", \"M465 7c-8.5-8.5-22-9.4-31.6-2.1l-104 80c-5.9 4.5-9.4 11.6-9.4 19l0 54.1-85.6 85.6c6.7 4.2 13 9.3 18.8 15.1s10.9 12.2 15.1 18.8L353.9 192l54.1 0c7.5 0 14.5-3.5 19-9.4l80-104c7.4-9.6 6.5-23.1-2.1-31.6L465 7zM121.4 281.4l-112 112c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l112-112c30.2-30.2 30.2-79.1 0-109.3s-79.1-30.2-109.3 0z\"]\n};\nconst faFolderClosed = {\n  prefix: 'fas',\n  iconName: 'folder-closed',\n  icon: [512, 512, [], \"e185\", \"M448 480L64 480c-35.3 0-64-28.7-64-64L0 192l512 0 0 224c0 35.3-28.7 64-64 64zm64-320L0 160 0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64z\"]\n};\nconst faHouseTsunami = {\n  prefix: 'fas',\n  iconName: 'house-tsunami',\n  icon: [576, 512, [], \"e515\", \"M80.8 136.5C104.9 93.8 152.6 64 209 64c16.9 0 33.1 2.7 48.2 7.7c16.8 5.5 34.9-3.6 40.4-20.4s-3.6-34.9-20.4-40.4C255.8 3.8 232.8 0 209 0C95.2 0 0 88 0 200c0 91.6 53.5 172.1 142.2 194.1c13.4 3.8 27.5 5.9 42.2 5.9c.7 0 1.4 0 2.1-.1c1.8 0 3.7 .1 5.5 .1c0 0 0 0 0 0c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.5-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 325.2 410.9 336 384 336c-27.5 0-55-10.6-77.5-26.1c-11.1-7.9-25.9-7.9-37 0c-22.4 15.5-49.9 26.1-77.4 26.1c0 0-.1 0-.1 0c-12.4 0-24-1.5-34.9-4.3C121.6 320.2 96 287 96 248c0-48.5 39.5-88 88.4-88c13.5 0 26.1 3 37.5 8.3c16 7.5 35.1 .6 42.5-15.5s.6-35.1-15.5-42.5C229.3 101.1 207.4 96 184.4 96c-40 0-76.4 15.4-103.6 40.5zm252-18.1c-8.1 6-12.8 15.5-12.8 25.6l0 121c1.6 1 3.3 2 4.8 3.1c18.4 12.7 39.6 20.3 59.2 20.3c19 0 41.2-7.9 59.2-20.3c23.8-16.7 55.8-15.3 78.1 3.4c10.6 8.8 24.2 15.6 37.3 18.6c5.8 1.4 11.2 3.4 16.2 6.2c.7-2.7 1.1-5.5 1.1-8.4l-.4-144c0-10-4.7-19.4-12.7-25.5l-95.5-72c-11.4-8.6-27.1-8.6-38.5 0l-96 72zM384 448c-27.5 0-55-10.6-77.5-26.1c-11.1-7.9-25.9-7.9-37 0C247 437.4 219.5 448 192 448c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C126.5 501.7 159 512 192 512c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.4-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 437.2 410.9 448 384 448z\"]\n};\nconst faSquareNfi = {\n  prefix: 'fas',\n  iconName: 'square-nfi',\n  icon: [448, 512, [], \"e576\", \"M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm75.7 64.6C68.8 162.5 64 168.8 64 176l0 160c0 8.8 7.2 16 16 16s16-7.2 16-16l0-102.2 66.3 110.5c3.7 6.2 11.1 9.1 18 7.2s11.7-8.2 11.7-15.4l0-160c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 102.2L93.7 167.8c-3.7-6.2-11.1-9.1-18-7.2zM224 176l0 64 0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-80 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0 0-32 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zm160 0c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 160c0 8.8 7.2 16 16 16s16-7.2 16-16l0-160z\"]\n};\nconst faArrowUpFromGroundWater = {\n  prefix: 'fas',\n  iconName: 'arrow-up-from-ground-water',\n  icon: [576, 512, [], \"e4b5\", \"M288 352c17.7 0 32-14.3 32-32l0-210.7 25.4 25.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-80-80c-12.5-12.5-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L256 109.3 256 320c0 17.7 14.3 32 32 32zm-18.5 69.9C247 437.4 219.5 448 192 448c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C126.5 501.7 159 512 192 512c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.4-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 437.2 410.9 448 384 448c-27.5 0-55-10.6-77.5-26.1c-11.1-7.9-25.9-7.9-37 0zM192 192L48 192c-26.5 0-48 21.5-48 48L0 425c5.3-3.1 11.2-5.4 17.5-6.9c13.1-3.1 26.7-9.8 37.3-18.6c22.2-18.7 54.3-20.1 78.1-3.4c18 12.4 40.1 20.3 59.1 20.3L192 192zm384 48c0-26.5-21.5-48-48-48l-144 0 0 224.5s0 0 0 0c19 0 41.2-7.9 59.2-20.3c23.8-16.7 55.8-15.4 78.1 3.4c10.6 8.8 24.2 15.6 37.3 18.6c6.3 1.5 12.1 3.8 17.5 6.9l0-185z\"]\n};\nconst faMartiniGlass = {\n  prefix: 'fas',\n  iconName: 'martini-glass',\n  icon: [512, 512, [127864, \"glass-martini-alt\"], \"f57b\", \"M32 0C19.1 0 7.4 7.8 2.4 19.8s-2.2 25.7 6.9 34.9L224 269.3 224 448l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-178.7L502.6 54.6c9.2-9.2 11.9-22.9 6.9-34.9S492.9 0 480 0L32 0zM173.3 128l-64-64 293.5 0-64 64-165.5 0z\"]\n};\nconst faGlassMartiniAlt = faMartiniGlass;\nconst faSquareBinary = {\n  prefix: 'fas',\n  iconName: 'square-binary',\n  icon: [448, 512, [], \"e69b\", \"M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm144 4c-24.3 0-44 19.7-44 44l0 48c0 24.3 19.7 44 44 44l32 0c24.3 0 44-19.7 44-44l0-48c0-24.3-19.7-44-44-44l-32 0zm-4 44c0-2.2 1.8-4 4-4l32 0c2.2 0 4 1.8 4 4l0 48c0 2.2-1.8 4-4 4l-32 0c-2.2 0-4-1.8-4-4l0-48zm140-44c-11 0-20 9-20 20c0 9.7 6.9 17.7 16 19.6l0 76.4c0 11 9 20 20 20s20-9 20-20l0-96c0-11-9-20-20-20l-16 0zM132 296c0 9.7 6.9 17.7 16 19.6l0 76.4c0 11 9 20 20 20s20-9 20-20l0-96c0-11-9-20-20-20l-16 0c-11 0-20 9-20 20zm96 24l0 48c0 24.3 19.7 44 44 44l32 0c24.3 0 44-19.7 44-44l0-48c0-24.3-19.7-44-44-44l-32 0c-24.3 0-44 19.7-44 44zm44-4l32 0c2.2 0 4 1.8 4 4l0 48c0 2.2-1.8 4-4 4l-32 0c-2.2 0-4-1.8-4-4l0-48c0-2.2 1.8-4 4-4z\"]\n};\nconst faRotateLeft = {\n  prefix: 'fas',\n  iconName: 'rotate-left',\n  icon: [512, 512, [\"rotate-back\", \"rotate-backward\", \"undo-alt\"], \"f2ea\", \"M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z\"]\n};\nconst faRotateBack = faRotateLeft;\nconst faRotateBackward = faRotateLeft;\nconst faUndoAlt = faRotateLeft;\nconst faTableColumns = {\n  prefix: 'fas',\n  iconName: 'table-columns',\n  icon: [512, 512, [\"columns\"], \"f0db\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm64 64l0 256 160 0 0-256L64 160zm384 0l-160 0 0 256 160 0 0-256z\"]\n};\nconst faColumns = faTableColumns;\nconst faLemon = {\n  prefix: 'fas',\n  iconName: 'lemon',\n  icon: [448, 512, [127819], \"f094\", \"M448 96c0-35.3-28.7-64-64-64c-6.6 0-13 1-19 2.9c-22.5 7-48.1 14.9-71 9c-75.2-19.1-156.4 11-213.7 68.3S-7.2 250.8 11.9 326c5.8 22.9-2 48.4-9 71C1 403 0 409.4 0 416c0 35.3 28.7 64 64 64c6.6 0 13-1 19.1-2.9c22.5-7 48.1-14.9 71-9c75.2 19.1 156.4-11 213.7-68.3s87.5-138.5 68.3-213.7c-5.8-22.9 2-48.4 9-71c1.9-6 2.9-12.4 2.9-19.1zM212.5 127.4c-54.6 16-101.1 62.5-117.1 117.1C92.9 253 84 257.8 75.5 255.4S62.2 244 64.6 235.5c19.1-65.1 73.7-119.8 138.9-138.9c8.5-2.5 17.4 2.4 19.9 10.9s-2.4 17.4-10.9 19.9z\"]\n};\nconst faHeadSideMask = {\n  prefix: 'fas',\n  iconName: 'head-side-mask',\n  icon: [576, 512, [], \"e063\", \"M32 224.2c0-22.2 3.2-43.6 9.2-63.9L262.2 321c-4 9.5-6.2 20-6.2 31l0 160-128 0c-17.7 0-32-14.3-32-32l0-72.7c0-16.7-6.9-32.5-17.1-45.8C48.6 322.4 32 274.1 32 224.2zm248.3 70.4L53 129.3C88.7 53 166.2 0 256 0l24 0c95.2 0 181.2 69.3 197.3 160.2c2.3 13 6.8 25.7 15.1 36l42 52.6c5.4 6.7 8.6 14.8 9.4 23.2L336 272c-21.7 0-41.3 8.6-55.7 22.6zM336 304l198 0s0 0 0 0l10 0-19.7 64L368 368c-8.8 0-16 7.2-16 16s7.2 16 16 16l146.5 0-9.8 32L368 432c-8.8 0-16 7.2-16 16s7.2 16 16 16l126.8 0-.9 2.8c-8.3 26.9-33.1 45.2-61.2 45.2L288 512l0-160c0-14 6-26.7 15.6-35.4c0 0 0 0 0 0c8.5-7.8 19.9-12.6 32.4-12.6zm48-80a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faHandshake = {\n  prefix: 'fas',\n  iconName: 'handshake',\n  icon: [640, 512, [], \"f2b5\", \"M323.4 85.2l-96.8 78.4c-16.1 13-19.2 36.4-7 53.1c12.9 17.8 38 21.3 55.3 7.8l99.3-77.2c7-5.4 17-4.2 22.5 2.8s4.2 17-2.8 22.5l-20.9 16.2L512 316.8 512 128l-.7 0-3.9-2.5L434.8 79c-15.3-9.8-33.2-15-51.4-15c-21.8 0-43 7.5-60 21.2zm22.8 124.4l-51.7 40.2C263 274.4 217.3 268 193.7 235.6c-22.2-30.5-16.6-73.1 12.7-96.8l83.2-67.3c-11.6-4.9-24.1-7.4-36.8-7.4C234 64 215.7 69.6 200 80l-72 48 0 224 28.2 0 91.4 83.4c19.6 17.9 49.9 16.5 67.8-3.1c5.5-6.1 9.2-13.2 11.1-20.6l17 15.6c19.5 17.9 49.9 16.6 67.8-2.9c4.5-4.9 7.8-10.6 9.9-16.5c19.4 13 45.8 10.3 62.1-7.5c17.9-19.5 16.6-49.9-2.9-67.8l-134.2-123zM16 128c-8.8 0-16 7.2-16 16L0 352c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-224-80 0zM48 320a16 16 0 1 1 0 32 16 16 0 1 1 0-32zM544 128l0 224c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-208c0-8.8-7.2-16-16-16l-80 0zm32 208a16 16 0 1 1 32 0 16 16 0 1 1 -32 0z\"]\n};\nconst faGem = {\n  prefix: 'fas',\n  iconName: 'gem',\n  icon: [512, 512, [128142], \"f3a5\", \"M116.7 33.8c4.5-6.1 11.7-9.8 19.3-9.8l240 0c7.6 0 14.8 3.6 19.3 9.8l112 152c6.8 9.2 6.1 21.9-1.5 30.4l-232 256c-4.5 5-11 7.9-17.8 7.9s-13.2-2.9-17.8-7.9l-232-256c-7.7-8.5-8.3-21.2-1.5-30.4l112-152zm38.5 39.8c-3.3 2.5-4.2 7-2.1 10.5l57.4 95.6L63.3 192c-4.1 .3-7.3 3.8-7.3 8s3.2 7.6 7.3 8l192 16c.4 0 .9 0 1.3 0l192-16c4.1-.3 7.3-3.8 7.3-8s-3.2-7.6-7.3-8L301.5 179.8l57.4-95.6c2.1-3.5 1.2-8.1-2.1-10.5s-7.9-2-10.7 1L256 172.2 165.9 74.6c-2.8-3-7.4-3.4-10.7-1z\"]\n};\nconst faDolly = {\n  prefix: 'fas',\n  iconName: 'dolly',\n  icon: [576, 512, [\"dolly-box\"], \"f472\", \"M0 32C0 14.3 14.3 0 32 0l72.9 0c27.5 0 52 17.6 60.7 43.8L257.7 320c30.1 .5 56.8 14.9 74 37l202.1-67.4c16.8-5.6 34.9 3.5 40.5 20.2s-3.5 34.9-20.2 40.5L352 417.7c-.9 52.2-43.5 94.3-96 94.3c-53 0-96-43-96-96c0-30.8 14.5-58.2 37-75.8L104.9 64 32 64C14.3 64 0 49.7 0 32zM244.8 134.5c-5.5-16.8 3.7-34.9 20.5-40.3L311 79.4l19.8 60.9 60.9-19.8L371.8 59.6l45.7-14.8c16.8-5.5 34.9 3.7 40.3 20.5l49.4 152.2c5.5 16.8-3.7 34.9-20.5 40.3L334.5 307.2c-16.8 5.5-34.9-3.7-40.3-20.5L244.8 134.5z\"]\n};\nconst faDollyBox = faDolly;\nconst faSmoking = {\n  prefix: 'fas',\n  iconName: 'smoking',\n  icon: [640, 512, [128684], \"f48d\", \"M448 32l0 11c0 38.2 15.2 74.8 42.2 101.8l21 21c21 21 32.8 49.5 32.8 79.2l0 11c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-11c0-12.7-5.1-24.9-14.1-33.9l-21-21C405.9 151.1 384 98.1 384 43l0-11c0-17.7 14.3-32 32-32s32 14.3 32 32zM576 256l0-11c0-38.2-15.2-74.8-42.2-101.8l-21-21c-21-21-32.8-49.5-32.8-79.2l0-11c0-17.7 14.3-32 32-32s32 14.3 32 32l0 11c0 12.7 5.1 24.9 14.1 33.9l21 21c39 39 60.9 91.9 60.9 147.1l0 11c0 17.7-14.3 32-32 32s-32-14.3-32-32zM0 416c0-35.3 28.7-64 64-64l352 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32L64 512c-35.3 0-64-28.7-64-64l0-32zm224 0l0 32 160 0 0-32-160 0zm288-64c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32zm96 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32z\"]\n};\nconst faMinimize = {\n  prefix: 'fas',\n  iconName: 'minimize',\n  icon: [512, 512, [\"compress-arrows-alt\"], \"f78c\", \"M456 224l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l40 40L442.3 5.7C446 2 450.9 0 456 0s10 2 13.7 5.7l36.7 36.7C510 46 512 50.9 512 56s-2 10-5.7 13.7L433 143l40 40c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8zm0 64c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-40 40 73.4 73.4c3.6 3.6 5.7 8.5 5.7 13.7s-2 10-5.7 13.7l-36.7 36.7C466 510 461.1 512 456 512s-10-2-13.7-5.7L369 433l-40 40c-6.9 6.9-17.2 8.9-26.2 5.2s-14.8-12.5-14.8-22.2l0-144c0-13.3 10.7-24 24-24l144 0zm-256 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-40-40L69.7 506.3C66 510 61.1 512 56 512s-10-2-13.7-5.7L5.7 469.7C2 466 0 461.1 0 456s2-10 5.7-13.7L79 369 39 329c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8l144 0zM56 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l40-40L5.7 69.7C2 66 0 61.1 0 56s2-10 5.7-13.7L42.3 5.7C46 2 50.9 0 56 0s10 2 13.7 5.7L143 79l40-40c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 144c0 13.3-10.7 24-24 24L56 224z\"]\n};\nconst faCompressArrowsAlt = faMinimize;\nconst faMonument = {\n  prefix: 'fas',\n  iconName: 'monument',\n  icon: [384, 512, [], \"f5a6\", \"M180.7 4.7c6.2-6.2 16.4-6.2 22.6 0l80 80c2.5 2.5 4.1 5.8 4.6 9.3l40.2 322L55.9 416 96.1 94c.4-3.5 2-6.8 4.6-9.3l80-80zM152 272c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zM32 448l320 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faSnowplow = {\n  prefix: 'fas',\n  iconName: 'snowplow',\n  icon: [640, 512, [], \"f7d2\", \"M298.9 64l68.6 160L256 224l-64-64 0-96 106.9 0zM445.1 242.7l-87.4-204C347.6 15.3 324.5 0 298.9 0L176 0c-26.5 0-48 21.5-48 48l0 112-32 0c-17.7 0-32 14.3-32 32l0 106.8C26.2 316.8 0 355.3 0 400c0 61.9 50.1 112 112 112l256 0c61.9 0 112-50.1 112-112c0-17.2-3.9-33.5-10.8-48l42.8 0 0 50.7c0 17 6.7 33.3 18.7 45.3l54.6 54.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L576 402.7l0-82.7 0-84.8L633 164c11-13.8 8.8-33.9-5-45s-33.9-8.8-45 5l-57 71.2c-9.1 11.3-14 25.4-14 40l0 52.8-64 0 0-31.3c.1-2.4-.2-4.8-.6-7.1s-1.2-4.7-2.2-6.8zM368 352c26.5 0 48 21.5 48 48s-21.5 48-48 48l-256 0c-26.5 0-48-21.5-48-48s21.5-48 48-48l256 0zM144 400a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm216 24a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm-56-24a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM200 424a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faAnglesRight = {\n  prefix: 'fas',\n  iconName: 'angles-right',\n  icon: [512, 512, [187, \"angle-double-right\"], \"f101\", \"M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z\"]\n};\nconst faAngleDoubleRight = faAnglesRight;\nconst faCannabis = {\n  prefix: 'fas',\n  iconName: 'cannabis',\n  icon: [512, 512, [], \"f55f\", \"M256 0c5.3 0 10.3 2.7 13.3 7.1c15.8 23.5 36.7 63.7 49.2 109c7.2 26.4 11.8 55.2 10.4 84c11.5-8.8 23.7-16.7 35.8-23.6c41-23.3 84.4-36.9 112.2-42.5c5.2-1 10.7 .6 14.4 4.4s5.4 9.2 4.4 14.5c-5.6 27.7-19.3 70.9-42.7 111.7c-9.1 15.9-19.9 31.7-32.4 46.3c27.8 6.6 52.4 17.3 67.2 25.5c5.1 2.8 8.2 8.2 8.2 14s-3.2 11.2-8.2 14c-15.2 8.4-40.9 19.5-69.8 26.1c-20.2 4.6-42.9 7.2-65.2 4.6l8.3 33.1c1.5 6.1-.6 12.4-5.5 16.4s-11.6 4.6-17.2 1.9L280 417.2l0 70.8c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-70.8-58.5 29.1c-5.6 2.8-12.3 2.1-17.2-1.9s-7-10.3-5.5-16.4l8.3-33.1c-22.2 2.6-45 0-65.2-4.6c-28.9-6.6-54.6-17.6-69.8-26.1c-5.1-2.8-8.2-8.2-8.2-14s3.2-11.2 8.2-14c14.8-8.2 39.4-18.8 67.2-25.5C78.9 296.3 68.1 280.5 59 264.6c-23.4-40.8-37.1-84-42.7-111.7c-1.1-5.2 .6-10.7 4.4-14.5s9.2-5.4 14.4-4.4c27.9 5.5 71.2 19.2 112.2 42.5c12.1 6.9 24.3 14.7 35.8 23.6c-1.4-28.7 3.1-57.6 10.4-84c12.5-45.3 33.4-85.5 49.2-109c3-4.4 8-7.1 13.3-7.1z\"]\n};\nconst faCirclePlay = {\n  prefix: 'fas',\n  iconName: 'circle-play',\n  icon: [512, 512, [61469, \"play-circle\"], \"f144\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z\"]\n};\nconst faPlayCircle = faCirclePlay;\nconst faTablets = {\n  prefix: 'fas',\n  iconName: 'tablets',\n  icon: [640, 512, [], \"f490\", \"M614.3 247c-5.2 7.9-16.2 8.5-22.9 1.8L391.2 48.6c-6.7-6.7-6.2-17.8 1.8-22.9C418.1 9.4 447.9 0 480 0c88.4 0 160 71.6 160 160c0 32.1-9.4 61.9-25.7 87zM567 294.3c-25 16.3-54.9 25.7-87 25.7c-88.4 0-160-71.6-160-160c0-32.1 9.4-61.9 25.7-87c5.2-7.9 16.2-8.5 22.9-1.8L568.8 271.4c6.7 6.7 6.2 17.8-1.8 22.9zM301.5 368c9.5 0 16.9 8.2 15 17.5C301.1 457.8 236.9 512 160 512S18.9 457.8 3.5 385.5c-2-9.3 5.5-17.5 15-17.5l283.1 0zm0-32L18.5 336c-9.5 0-16.9-8.2-15-17.5C18.9 246.2 83.1 192 160 192s141.1 54.2 156.5 126.5c2 9.3-5.5 17.5-15 17.5z\"]\n};\nconst faEthernet = {\n  prefix: 'fas',\n  iconName: 'ethernet',\n  icon: [512, 512, [], \"f796\", \"M0 224L0 416c0 17.7 14.3 32 32 32l64 0 0-112c0-8.8 7.2-16 16-16s16 7.2 16 16l0 112 64 0 0-112c0-8.8 7.2-16 16-16s16 7.2 16 16l0 112 64 0 0-112c0-8.8 7.2-16 16-16s16 7.2 16 16l0 112 64 0 0-112c0-8.8 7.2-16 16-16s16 7.2 16 16l0 112 64 0c17.7 0 32-14.3 32-32l0-192c0-17.7-14.3-32-32-32l-32 0 0-32c0-17.7-14.3-32-32-32l-32 0 0-32c0-17.7-14.3-32-32-32L160 64c-17.7 0-32 14.3-32 32l0 32-32 0c-17.7 0-32 14.3-32 32l0 32-32 0c-17.7 0-32 14.3-32 32z\"]\n};\nconst faEuroSign = {\n  prefix: 'fas',\n  iconName: 'euro-sign',\n  icon: [320, 512, [8364, \"eur\", \"euro\"], \"f153\", \"M48.1 240c-.1 2.7-.1 5.3-.1 8l0 16c0 2.7 0 5.3 .1 8L32 272c-17.7 0-32 14.3-32 32s14.3 32 32 32l28.3 0C89.9 419.9 170 480 264 480l24 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-24 0c-57.9 0-108.2-32.4-133.9-80L256 336c17.7 0 32-14.3 32-32s-14.3-32-32-32l-143.8 0c-.1-2.6-.2-5.3-.2-8l0-16c0-2.7 .1-5.4 .2-8L256 240c17.7 0 32-14.3 32-32s-14.3-32-32-32l-125.9 0c25.7-47.6 76-80 133.9-80l24 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-24 0C170 32 89.9 92.1 60.3 176L32 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l16.1 0z\"]\n};\nconst faEur = faEuroSign;\nconst faEuro = faEuroSign;\nconst faChair = {\n  prefix: 'fas',\n  iconName: 'chair',\n  icon: [448, 512, [129681], \"f6c0\", \"M248 48l0 208 48 0 0-197.3c23.9 13.8 40 39.7 40 69.3l0 128 48 0 0-128C384 57.3 326.7 0 256 0L192 0C121.3 0 64 57.3 64 128l0 128 48 0 0-128c0-29.6 16.1-55.5 40-69.3L152 256l48 0 0-208 48 0zM48 288c-12.1 0-23.2 6.8-28.6 17.7l-16 32c-5 9.9-4.4 21.7 1.4 31.1S20.9 384 32 384l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 256 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c11.1 0 21.4-5.7 27.2-15.2s6.4-21.2 1.4-31.1l-16-32C423.2 294.8 412.1 288 400 288L48 288z\"]\n};\nconst faCircleCheck = {\n  prefix: 'fas',\n  iconName: 'circle-check',\n  icon: [512, 512, [61533, \"check-circle\"], \"f058\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\"]\n};\nconst faCheckCircle = faCircleCheck;\nconst faCircleStop = {\n  prefix: 'fas',\n  iconName: 'circle-stop',\n  icon: [512, 512, [62094, \"stop-circle\"], \"f28d\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z\"]\n};\nconst faStopCircle = faCircleStop;\nconst faCompassDrafting = {\n  prefix: 'fas',\n  iconName: 'compass-drafting',\n  icon: [512, 512, [\"drafting-compass\"], \"f568\", \"M352 96c0 14.3-3.1 27.9-8.8 40.2L396 227.4c-23.7 25.3-54.2 44.1-88.5 53.6L256 192c0 0 0 0 0 0s0 0 0 0l-68 117.5c21.5 6.8 44.3 10.5 68.1 10.5c70.7 0 133.8-32.7 174.9-84c11.1-13.8 31.2-16 45-5s16 31.2 5 45C428.1 341.8 347 384 256 384c-35.4 0-69.4-6.4-100.7-18.1L98.7 463.7C94 471.8 87 478.4 78.6 482.6L23.2 510.3c-5 2.5-10.9 2.2-15.6-.7S0 501.5 0 496l0-55.4c0-8.4 2.2-16.7 6.5-24.1l60-103.7C53.7 301.6 41.8 289.3 31.2 276c-11.1-13.8-8.8-33.9 5-45s33.9-8.8 45 5c5.7 7.1 11.8 13.8 18.2 20.1l69.4-119.9c-5.6-12.2-8.8-25.8-8.8-40.2c0-53 43-96 96-96s96 43 96 96zm21 297.9c32.6-12.8 62.5-30.8 88.9-52.9l43.7 75.5c4.2 7.3 6.5 15.6 6.5 24.1l0 55.4c0 5.5-2.9 10.7-7.6 13.6s-10.6 3.2-15.6 .7l-55.4-27.7c-8.4-4.2-15.4-10.8-20.1-18.9L373 393.9zM256 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faDraftingCompass = faCompassDrafting;\nconst faPlateWheat = {\n  prefix: 'fas',\n  iconName: 'plate-wheat',\n  icon: [512, 512, [], \"e55a\", \"M176 32c44.2 0 80 35.8 80 80l0 16c0 8.8-7.2 16-16 16c-44.2 0-80-35.8-80-80l0-16c0-8.8 7.2-16 16-16zM56 64l48 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zM24 136l112 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 184c-13.3 0-24-10.7-24-24s10.7-24 24-24zm8 96c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24zM272 48c0-8.8 7.2-16 16-16c44.2 0 80 35.8 80 80l0 16c0 8.8-7.2 16-16 16c-44.2 0-80-35.8-80-80l0-16zM400 32c44.2 0 80 35.8 80 80l0 16c0 8.8-7.2 16-16 16c-44.2 0-80-35.8-80-80l0-16c0-8.8 7.2-16 16-16zm80 160l0 16c0 44.2-35.8 80-80 80c-8.8 0-16-7.2-16-16l0-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16zM352 176c8.8 0 16 7.2 16 16l0 16c0 44.2-35.8 80-80 80c-8.8 0-16-7.2-16-16l0-16c0-44.2 35.8-80 80-80zm-96 16l0 16c0 44.2-35.8 80-80 80c-8.8 0-16-7.2-16-16l0-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16zM3.5 347.6C1.6 332.9 13 320 27.8 320l456.4 0c14.8 0 26.2 12.9 24.4 27.6C502.3 397.8 464.2 437 416 446l0 2c0 17.7-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32l0-2c-48.2-9-86.3-48.2-92.5-98.4z\"]\n};\nconst faIcicles = {\n  prefix: 'fas',\n  iconName: 'icicles',\n  icon: [512, 512, [], \"f7ad\", \"M75.8 304.8L1 35.7c-.7-2.5-1-5-1-7.5C0 12.6 12.6 0 28.2 0H482.4C498.8 0 512 13.2 512 29.6c0 1.6-.1 3.3-.4 4.9L434.6 496.1c-1.5 9.2-9.5 15.9-18.8 15.9c-9.2 0-17.1-6.6-18.7-15.6L336 160 307.2 303.9c-1.9 9.3-10.1 16.1-19.6 16.1c-9.2 0-17.2-6.2-19.4-15.1L240 192 210.6 368.2c-1.5 9.1-9.4 15.8-18.6 15.8s-17.1-6.7-18.6-15.8L144 192 115.9 304.3c-2.3 9.2-10.6 15.7-20.1 15.7c-9.3 0-17.5-6.2-20-15.2z\"]\n};\nconst faPersonShelter = {\n  prefix: 'fas',\n  iconName: 'person-shelter',\n  icon: [512, 512, [], \"e54f\", \"M271.9 4.2c-9.8-5.6-21.9-5.6-31.8 0l-224 128C6.2 137.9 0 148.5 0 160L0 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.4L256 68.9 448 178.6 448 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-320c0-11.5-6.2-22.1-16.1-27.8l-224-128zM256 208a40 40 0 1 0 0-80 40 40 0 1 0 0 80zm-8 280l0-88 16 0 0 88c0 13.3 10.7 24 24 24s24-10.7 24-24l0-174.5 26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-37.9-70.3c-15.3-28.5-45.1-46.3-77.5-46.3l-19.5 0c-32.4 0-62.1 17.8-77.5 46.3l-37.9 70.3c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L200 313.5 200 488c0 13.3 10.7 24 24 24s24-10.7 24-24z\"]\n};\nconst faNeuter = {\n  prefix: 'fas',\n  iconName: 'neuter',\n  icon: [384, 512, [9906], \"f22c\", \"M80 176a112 112 0 1 1 224 0A112 112 0 1 1 80 176zM224 349.1c81.9-15 144-86.8 144-173.1C368 78.8 289.2 0 192 0S16 78.8 16 176c0 86.3 62.1 158.1 144 173.1L160 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-130.9z\"]\n};\nconst faIdBadge = {\n  prefix: 'fas',\n  iconName: 'id-badge',\n  icon: [384, 512, [], \"f2c1\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L64 0zm96 320l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L96 416c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM144 64l96 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faMarker = {\n  prefix: 'fas',\n  iconName: 'marker',\n  icon: [512, 512, [], \"f5a1\", \"M481 31C445.1-4.8 386.9-4.8 351 31l-15 15L322.9 33C294.8 4.9 249.2 4.9 221.1 33L135 119c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0L255 66.9c9.4-9.4 24.6-9.4 33.9 0L302.1 80 186.3 195.7 316.3 325.7 481 161c35.9-35.9 35.9-94.1 0-129.9zM293.7 348.3L163.7 218.3 99.5 282.5c-48 48-80.8 109.2-94.1 175.8l-5 25c-1.6 7.9 .9 16 6.6 21.7s13.8 8.1 21.7 6.6l25-5c66.6-13.3 127.8-46.1 175.8-94.1l64.2-64.2z\"]\n};\nconst faFaceLaughBeam = {\n  prefix: 'fas',\n  iconName: 'face-laugh-beam',\n  icon: [512, 512, [128513, \"laugh-beam\"], \"f59a\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96.8 314.1c-3.8-13.7 7.4-26.1 21.6-26.1l275.2 0c14.2 0 25.5 12.4 21.6 26.1C396.2 382 332.1 432 256 432s-140.2-50-159.2-117.9zM217.6 212.8s0 0 0 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0zm160 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faLaughBeam = faFaceLaughBeam;\nconst faHelicopterSymbol = {\n  prefix: 'fas',\n  iconName: 'helicopter-symbol',\n  icon: [512, 512, [], \"e502\", \"M445.3 224l64.7 0C495.6 108.2 403.8 16.4 288 2l0 64.7C368.4 80.1 431.9 143.6 445.3 224zM510 288l-64.7 0C431.9 368.4 368.4 431.9 288 445.3l0 64.7c115.8-14.4 207.6-106.2 222-222zM2 288C16.4 403.8 108.2 495.6 224 510l0-64.7C143.6 431.9 80.1 368.4 66.7 288L2 288zm0-64l64.7 0C80.1 143.6 143.6 80.1 224 66.7L224 2C108.2 16.4 16.4 108.2 2 224zm206-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 96 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-192c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-96 0 0-64z\"]\n};\nconst faUniversalAccess = {\n  prefix: 'fas',\n  iconName: 'universal-access',\n  icon: [512, 512, [], \"f29a\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm161.5-86.1c-12.2-5.2-26.3 .4-31.5 12.6s.4 26.3 12.6 31.5l11.9 5.1c17.3 7.4 35.2 12.9 53.6 16.3l0 50.1c0 4.3-.7 8.6-2.1 12.6l-28.7 86.1c-4.2 12.6 2.6 26.2 15.2 30.4s26.2-2.6 30.4-15.2l24.4-73.2c1.3-3.8 4.8-6.4 8.8-6.4s7.6 2.6 8.8 6.4l24.4 73.2c4.2 12.6 17.8 19.4 30.4 15.2s19.4-17.8 15.2-30.4l-28.7-86.1c-1.4-4.1-2.1-8.3-2.1-12.6l0-50.1c18.4-3.5 36.3-8.9 53.6-16.3l11.9-5.1c12.2-5.2 17.8-19.3 12.6-31.5s-19.3-17.8-31.5-12.6L338.7 175c-26.1 11.2-54.2 17-82.7 17s-56.5-5.8-82.7-17l-11.9-5.1zM256 160a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\"]\n};\nconst faCircleChevronUp = {\n  prefix: 'fas',\n  iconName: 'circle-chevron-up',\n  icon: [512, 512, [\"chevron-circle-up\"], \"f139\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM377 271c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-87-87-87 87c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 167c9.4-9.4 24.6-9.4 33.9 0L377 271z\"]\n};\nconst faChevronCircleUp = faCircleChevronUp;\nconst faLariSign = {\n  prefix: 'fas',\n  iconName: 'lari-sign',\n  icon: [384, 512, [], \"e1c8\", \"M144 32c17.7 0 32 14.3 32 32l0 32.7c5.3-.4 10.6-.7 16-.7s10.7 .2 16 .7L208 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 49.4c54.9 25.2 95.8 75.5 108.2 136.2c3.5 17.3-7.7 34.2-25 37.7s-34.2-7.7-37.7-25c-6.1-29.9-22.5-55.9-45.4-74.3l0 67.9c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-95c-5.2-.7-10.6-1-16-1s-10.8 .3-16 1l0 95c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-67.9C82.7 211.5 64 247.6 64 288c0 70.7 57.3 128 128 128l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l16.9 0C18.5 382 0 337.2 0 288c0-77.5 45.9-144.3 112-174.6L112 64c0-17.7 14.3-32 32-32z\"]\n};\nconst faVolcano = {\n  prefix: 'fas',\n  iconName: 'volcano',\n  icon: [512, 512, [127755], \"f770\", \"M160 144c-35.3 0-64-28.7-64-64s28.7-64 64-64c15.7 0 30 5.6 41.2 15C212.4 12.4 232.7 0 256 0s43.6 12.4 54.8 31C322 21.6 336.3 16 352 16c35.3 0 64 28.7 64 64s-28.7 64-64 64c-14.7 0-28.3-5-39.1-13.3l-32 48C275.3 187 266 192 256 192s-19.3-5-24.9-13.3l-32-48C188.3 139 174.7 144 160 144zM144 352l48.4-24.2c10.2-5.1 21.6-7.8 33-7.8c19.6 0 38.4 7.8 52.2 21.6l32.5 32.5c6.3 6.3 14.9 9.9 23.8 9.9c11.3 0 21.8-5.6 28-15l9.7-14.6-58.9-66.3c-9.1-10.2-22.2-16.1-35.9-16.1l-41.8 0c-13.7 0-26.8 5.9-35.9 16.1l-59.9 67.4L144 352zm19.4-95.8c18.2-20.5 44.3-32.2 71.8-32.2l41.8 0c27.4 0 53.5 11.7 71.8 32.2l150.2 169c8.5 9.5 13.2 21.9 13.2 34.7c0 28.8-23.4 52.2-52.2 52.2L52.2 512C23.4 512 0 488.6 0 459.8c0-12.8 4.7-25.1 13.2-34.7l150.2-169z\"]\n};\nconst faPersonWalkingDashedLineArrowRight = {\n  prefix: 'fas',\n  iconName: 'person-walking-dashed-line-arrow-right',\n  icon: [640, 512, [], \"e553\", \"M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80zM392 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48c0-13.3-10.7-24-24-24zm24 152c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16zM392 320c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-13.3-10.7-24-24-24zm24 120c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48z\"]\n};\nconst faSterlingSign = {\n  prefix: 'fas',\n  iconName: 'sterling-sign',\n  icon: [320, 512, [163, \"gbp\", \"pound-sign\"], \"f154\", \"M112 160.4c0-35.5 28.8-64.4 64.4-64.4c6.9 0 13.8 1.1 20.4 3.3l81.2 27.1c16.8 5.6 34.9-3.5 40.5-20.2s-3.5-34.9-20.2-40.5L217 38.6c-13.1-4.4-26.8-6.6-40.6-6.6C105.5 32 48 89.5 48 160.4L48 224l-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l16 0 0 44.5c0 17.4-4.7 34.5-13.7 49.4L4.6 431.5c-5.9 9.9-6.1 22.2-.4 32.2S20.5 480 32 480l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L88.5 416l.7-1.1C104.1 390 112 361.5 112 332.5l0-44.5 112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-112 0 0-63.6z\"]\n};\nconst faGbp = faSterlingSign;\nconst faPoundSign = faSterlingSign;\nconst faViruses = {\n  prefix: 'fas',\n  iconName: 'viruses',\n  icon: [640, 512, [], \"e076\", \"M192 0c13.3 0 24 10.7 24 24l0 13.5c0 35.6 43.1 53.5 68.3 28.3l9.5-9.5c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-9.5 9.5C293 124.9 310.9 168 346.5 168l13.5 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-13.5 0c-35.6 0-53.5 43.1-28.3 68.3l9.5 9.5c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-9.5-9.5C259.1 293 216 310.9 216 346.5l0 13.5c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-13.5c0-35.6-43.1-53.5-68.3-28.3l-9.5 9.5c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l9.5-9.5C91 259.1 73.1 216 37.5 216L24 216c-13.3 0-24-10.7-24-24s10.7-24 24-24l13.5 0c35.6 0 53.5-43.1 28.3-68.3l-9.5-9.5c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l9.5 9.5C124.9 91 168 73.1 168 37.5L168 24c0-13.3 10.7-24 24-24zm48 224a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm-48-64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm320 80c0 33 39.9 49.5 63.2 26.2c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6C574.5 312.1 591 352 624 352c8.8 0 16 7.2 16 16s-7.2 16-16 16c-33 0-49.5 39.9-26.2 63.2c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0C551.9 446.5 512 463 512 496c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-33-39.9-49.5-63.2-26.2c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6C417.5 423.9 401 384 368 384c-8.8 0-16-7.2-16-16s7.2-16 16-16c33 0 49.5-39.9 26.2-63.2c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0C440.1 289.5 480 273 480 240c0-8.8 7.2-16 16-16s16 7.2 16 16zm0 112a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faSquarePersonConfined = {\n  prefix: 'fas',\n  iconName: 'square-person-confined',\n  icon: [448, 512, [], \"e577\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm96 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm80 104c0-30.9 25.1-56 56-56s56 25.1 56 56l0 102.1c0 36.4-29.5 65.9-65.9 65.9c-17.5 0-34.3-6.9-46.6-19.3L184.8 342l-28.1 56.3c-7.9 15.8-27.1 22.2-42.9 14.3s-22.2-27.1-14.3-42.9l48-96c4.6-9.2 13.3-15.6 23.5-17.3s20.5 1.7 27.8 9L240 306.7l0-58.7z\"]\n};\nconst faUserTie = {\n  prefix: 'fas',\n  iconName: 'user-tie',\n  icon: [448, 512, [], \"f508\", \"M96 128a128 128 0 1 0 256 0A128 128 0 1 0 96 128zm94.5 200.2l18.6 31L175.8 483.1l-36-146.9c-2-8.1-9.8-13.4-17.9-11.3C51.9 342.4 0 405.8 0 481.3c0 17 13.8 30.7 30.7 30.7l131.7 0c0 0 0 0 .1 0l5.5 0 112 0 5.5 0c0 0 0 0 .1 0l131.7 0c17 0 30.7-13.8 30.7-30.7c0-75.5-51.9-138.9-121.9-156.4c-8.1-2-15.9 3.3-17.9 11.3l-36 146.9L238.9 359.2l18.6-31c6.4-10.7-1.3-24.2-13.7-24.2L224 304l-19.7 0c-12.4 0-20.1 13.6-13.7 24.2z\"]\n};\nconst faArrowDownLong = {\n  prefix: 'fas',\n  iconName: 'arrow-down-long',\n  icon: [384, 512, [\"long-arrow-down\"], \"f175\", \"M169.4 502.6c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 402.7 224 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128z\"]\n};\nconst faLongArrowDown = faArrowDownLong;\nconst faTentArrowDownToLine = {\n  prefix: 'fas',\n  iconName: 'tent-arrow-down-to-line',\n  icon: [640, 512, [], \"e57e\", \"M241.8 111.9c8.9 9.9 8.1 25-1.8 33.9l-80 72c-9.1 8.2-23 8.2-32.1 0l-80-72c-9.9-8.9-10.7-24-1.8-33.9s24-10.7 33.9-1.8l39.9 36L120 24c0-13.3 10.7-24 24-24s24 10.7 24 24l0 122.1 39.9-36c9.9-8.9 25-8.1 33.9 1.8zm122.8 22.6c11.5-8.7 27.3-8.7 38.8 0l168 128c6.6 5 11 12.5 12.3 20.7l24 160 .7 4.7c17.5 .2 31.6 14.4 31.6 32c0 17.7-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l127.6 0 .7-4.7 24-160c1.2-8.2 5.6-15.7 12.3-20.7l168-128zM384 448l80 0L402.7 325.5c-1.7-3.4-5.1-5.5-8.8-5.5c-5.5 0-9.9 4.4-9.9 9.9L384 448z\"]\n};\nconst faCertificate = {\n  prefix: 'fas',\n  iconName: 'certificate',\n  icon: [512, 512, [], \"f0a3\", \"M211 7.3C205 1 196-1.4 187.6 .8s-14.9 8.9-17.1 17.3L154.7 80.6l-62-17.5c-8.4-2.4-17.4 0-23.5 6.1s-8.5 15.1-6.1 23.5l17.5 62L18.1 170.6c-8.4 2.1-15 8.7-17.3 17.1S1 205 7.3 211l46.2 45L7.3 301C1 307-1.4 316 .8 324.4s8.9 14.9 17.3 17.1l62.5 15.8-17.5 62c-2.4 8.4 0 17.4 6.1 23.5s15.1 8.5 23.5 6.1l62-17.5 15.8 62.5c2.1 8.4 8.7 15 17.1 17.3s17.3-.2 23.4-6.4l45-46.2 45 46.2c6.1 6.2 15 8.7 23.4 6.4s14.9-8.9 17.1-17.3l15.8-62.5 62 17.5c8.4 2.4 17.4 0 23.5-6.1s8.5-15.1 6.1-23.5l-17.5-62 62.5-15.8c8.4-2.1 15-8.7 17.3-17.1s-.2-17.4-6.4-23.4l-46.2-45 46.2-45c6.2-6.1 8.7-15 6.4-23.4s-8.9-14.9-17.3-17.1l-62.5-15.8 17.5-62c2.4-8.4 0-17.4-6.1-23.5s-15.1-8.5-23.5-6.1l-62 17.5L341.4 18.1c-2.1-8.4-8.7-15-17.1-17.3S307 1 301 7.3L256 53.5 211 7.3z\"]\n};\nconst faReplyAll = {\n  prefix: 'fas',\n  iconName: 'reply-all',\n  icon: [576, 512, [\"mail-reply-all\"], \"f122\", \"M209.4 39.5c-9.1-9.6-24.3-10-33.9-.9L33.8 173.2c-19.9 18.9-19.9 50.7 0 69.6L175.5 377.4c9.6 9.1 24.8 8.7 33.9-.9s8.7-24.8-.9-33.9L66.8 208 208.5 73.4c9.6-9.1 10-24.3 .9-33.9zM352 64c0-12.6-7.4-24.1-19-29.2s-25-3-34.4 5.4l-160 144c-6.7 6.1-10.6 14.7-10.6 23.8s3.9 17.7 10.6 23.8l160 144c9.4 8.5 22.9 10.6 34.4 5.4s19-16.6 19-29.2l0-64 32 0c53 0 96 43 96 96c0 30.4-12.8 47.9-22.2 56.7c-5.5 5.1-9.8 12-9.8 19.5c0 10.9 8.8 19.7 19.7 19.7c2.8 0 5.6-.6 8.1-1.9C494.5 467.9 576 417.3 576 304c0-97.2-78.8-176-176-176l-48 0 0-64z\"]\n};\nconst faMailReplyAll = faReplyAll;\nconst faSuitcase = {\n  prefix: 'fas',\n  iconName: 'suitcase',\n  icon: [512, 512, [129523], \"f0f2\", \"M176 56l0 40 160 0 0-40c0-4.4-3.6-8-8-8L184 48c-4.4 0-8 3.6-8 8zM128 96l0-40c0-30.9 25.1-56 56-56L328 0c30.9 0 56 25.1 56 56l0 40 0 32 0 352-256 0 0-352 0-32zM64 96l32 0 0 384-32 0c-35.3 0-64-28.7-64-64L0 160c0-35.3 28.7-64 64-64zM448 480l-32 0 0-384 32 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64z\"]\n};\nconst faPersonSkating = {\n  prefix: 'fas',\n  iconName: 'person-skating',\n  icon: [448, 512, [\"skating\"], \"f7c5\", \"M352 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM128 128c0-17.7 14.3-32 32-32l159.4 0c43.6 0 64.6 53.4 32.8 83.1l-74.4 69.4 60.2 60.2c9 9 14.1 21.2 14.1 33.9l0 73.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-66.7-77.9-77.8c-26.6-26.6-24.6-70.3 4.3-94.4l20.4-17L160 160c-17.7 0-32-14.3-32-32zM81.4 353.4l86.9-86.9c4.6 10 11 19.3 19.3 27.5l21.8 21.8-82.7 82.7c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3zm322.5 95.1c8.6 2.1 13.8 10.8 11.6 19.4l-.4 1.7c-6.2 24.9-28.6 42.4-54.3 42.4L272 512c-8.8 0-16-7.2-16-16s7.2-16 16-16l88.8 0c11 0 20.6-7.5 23.3-18.2l.4-1.7c2.1-8.6 10.8-13.8 19.4-11.6zM135.2 478.3l-6.2 3.1c-21.6 10.8-47.6 6.6-64.6-10.5L4.7 411.3c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l59.6 59.6c7.3 7.3 18.5 9.1 27.7 4.5l6.2-3.1c7.9-4 17.5-.7 21.5 7.2s.7 17.5-7.2 21.5z\"]\n};\nconst faSkating = faPersonSkating;\nconst faFilterCircleDollar = {\n  prefix: 'fas',\n  iconName: 'filter-circle-dollar',\n  icon: [576, 512, [\"funnel-dollar\"], \"f662\", \"M3.9 22.9C10.5 8.9 24.5 0 40 0L472 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L396.4 195.6C316.2 212.1 256 283 256 368c0 27.4 6.3 53.4 17.5 76.5c-1.6-.8-3.2-1.8-4.7-2.9l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 65.3C-.7 53.4-2.8 36.8 3.9 22.9zM288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm120.8-32.6c.6-.9 1.8-2.1 4.2-3.4c5.1-2.7 12.5-4.1 18.7-4c8.2 .1 17.1 1.8 26.4 4.1c8.6 2.1 17.3-3.1 19.4-11.7s-3.1-17.3-11.7-19.4c-5.6-1.4-11.6-2.7-17.9-3.7l0-9.4c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 9.5c-6.1 1.2-12.3 3.2-18 6.3c-11.8 6.3-23 18.4-21.8 37.2c1 16 11.7 25.3 21.6 30.7c8.8 4.7 19.7 7.8 28.6 10.3l1.8 .5c10.3 2.9 17.9 5.2 23.2 8.3c4.5 2.7 4.7 4.2 4.7 5.6c.1 2.4-.5 3.7-1 4.5c-.6 1-1.8 2.2-4 3.3c-4.7 2.5-11.8 3.8-18.5 3.6c-9.5-.3-18.5-3.1-29.9-6.8c-1.9-.6-3.8-1.2-5.8-1.8c-8.4-2.6-17.4 2.1-20 10.5s2.1 17.4 10.5 20c1.6 .5 3.3 1 5 1.6c0 0 0 0 0 0s0 0 0 0c7 2.3 15.1 4.8 23.7 6.6l0 11.4c0 8.8 7.2 16 16 16s16-7.2 16-16l0-10.8c6.2-1.1 12.5-3.1 18.3-6.2c12.1-6.5 22.3-18.7 21.7-36.9c-.5-16.2-10.3-26.3-20.5-32.3c-9.4-5.6-21.2-8.9-30.5-11.5l-.2 0c-10.4-2.9-18.3-5.2-23.9-8.2c-4.8-2.6-4.8-4-4.8-4.5c0 0 0 0 0-.1c-.1-1.9 .3-2.9 .8-3.6z\"]\n};\nconst faFunnelDollar = faFilterCircleDollar;\nconst faCameraRetro = {\n  prefix: 'fas',\n  iconName: 'camera-retro',\n  icon: [512, 512, [128247], \"f083\", \"M220.6 121.2L271.1 96 448 96l0 96-114.8 0c-21.9-15.1-48.5-24-77.2-24s-55.2 8.9-77.2 24L64 192l0-64 128 0c9.9 0 19.7-2.3 28.6-6.8zM0 128L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L271.1 32c-9.9 0-19.7 2.3-28.6 6.8L192 64l-32 0 0-16c0-8.8-7.2-16-16-16L80 32c-8.8 0-16 7.2-16 16l0 16C28.7 64 0 92.7 0 128zM168 304a88 88 0 1 1 176 0 88 88 0 1 1 -176 0z\"]\n};\nconst faCircleArrowDown = {\n  prefix: 'fas',\n  iconName: 'circle-arrow-down',\n  icon: [512, 512, [\"arrow-circle-down\"], \"f0ab\", \"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 297c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 120c0-13.3 10.7-24 24-24s24 10.7 24 24l0 214.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 409c-9.4 9.4-24.6 9.4-33.9 0L127 297z\"]\n};\nconst faArrowCircleDown = faCircleArrowDown;\nconst faFileImport = {\n  prefix: 'fas',\n  iconName: 'file-import',\n  icon: [512, 512, [\"arrow-right-to-file\"], \"f56f\", \"M128 64c0-35.3 28.7-64 64-64L352 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64l-256 0c-35.3 0-64-28.7-64-64l0-112 174.1 0-39 39c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l39 39L128 288l0-224zm0 224l0 48L24 336c-13.3 0-24-10.7-24-24s10.7-24 24-24l104 0zM512 128l-128 0L384 0 512 128z\"]\n};\nconst faArrowRightToFile = faFileImport;\nconst faSquareArrowUpRight = {\n  prefix: 'fas',\n  iconName: 'square-arrow-up-right',\n  icon: [448, 512, [\"external-link-square\"], \"f14c\", \"M384 32c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0zM160 144c-13.3 0-24 10.7-24 24s10.7 24 24 24l94.1 0L119 327c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135L288 328c0 13.3 10.7 24 24 24s24-10.7 24-24l0-160c0-13.3-10.7-24-24-24l-152 0z\"]\n};\nconst faExternalLinkSquare = faSquareArrowUpRight;\nconst faBoxOpen = {\n  prefix: 'fas',\n  iconName: 'box-open',\n  icon: [640, 512, [], \"f49e\", \"M58.9 42.1c3-6.1 9.6-9.6 16.3-8.7L320 64 564.8 33.4c6.7-.8 13.3 2.7 16.3 8.7l41.7 83.4c9 17.9-.6 39.6-19.8 45.1L439.6 217.3c-13.9 4-28.8-1.9-36.2-14.3L320 64 236.6 203c-7.4 12.4-22.3 18.3-36.2 14.3L37.1 170.6c-19.3-5.5-28.8-27.2-19.8-45.1L58.9 42.1zM321.1 128l54.9 91.4c14.9 24.8 44.6 36.6 72.5 28.6L576 211.6l0 167c0 22-15 41.2-36.4 46.6l-204.1 51c-10.2 2.6-20.9 2.6-31 0l-204.1-51C79 419.7 64 400.5 64 378.5l0-167L191.6 248c27.8 8 57.6-3.8 72.5-28.6L318.9 128l2.2 0z\"]\n};\nconst faScroll = {\n  prefix: 'fas',\n  iconName: 'scroll',\n  icon: [576, 512, [128220], \"f70e\", \"M0 80l0 48c0 17.7 14.3 32 32 32l16 0 48 0 0-80c0-26.5-21.5-48-48-48S0 53.5 0 80zM112 32c10 13.4 16 30 16 48l0 304c0 35.3 28.7 64 64 64s64-28.7 64-64l0-5.3c0-32.4 26.3-58.7 58.7-58.7L480 320l0-192c0-53-43-96-96-96L112 32zM464 480c61.9 0 112-50.1 112-112c0-8.8-7.2-16-16-16l-245.3 0c-14.7 0-26.7 11.9-26.7 26.7l0 5.3c0 53-43 96-96 96l176 0 96 0z\"]\n};\nconst faSpa = {\n  prefix: 'fas',\n  iconName: 'spa',\n  icon: [576, 512, [], \"f5bb\", \"M183.1 235.3c33.7 20.7 62.9 48.1 85.8 80.5c7 9.9 13.4 20.3 19.1 31c5.7-10.8 12.1-21.1 19.1-31c22.9-32.4 52.1-59.8 85.8-80.5C437.6 207.8 490.1 192 546 192l9.9 0c11.1 0 20.1 9 20.1 20.1C576 360.1 456.1 480 308.1 480L288 480l-20.1 0C119.9 480 0 360.1 0 212.1C0 201 9 192 20.1 192l9.9 0c55.9 0 108.4 15.8 153.1 43.3zM301.5 37.6c15.7 16.9 61.1 71.8 84.4 164.6c-38 21.6-71.4 50.8-97.9 85.6c-26.5-34.8-59.9-63.9-97.9-85.6c23.2-92.8 68.6-147.7 84.4-164.6C278 33.9 282.9 32 288 32s10 1.9 13.5 5.6z\"]\n};\nconst faLocationPinLock = {\n  prefix: 'fas',\n  iconName: 'location-pin-lock',\n  icon: [512, 512, [], \"e51f\", \"M215.7 499.2c11-13.8 25.1-31.7 40.3-52.3l0-94.8c0-23.7 12.9-44.4 32-55.4l0-24.6c0-55.6 40.5-101.7 93.6-110.5C367 70 287.7 0 192 0C86 0 0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM400 240c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z\"]\n};\nconst faPause = {\n  prefix: 'fas',\n  iconName: 'pause',\n  icon: [320, 512, [9208], \"f04c\", \"M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z\"]\n};\nconst faHillAvalanche = {\n  prefix: 'fas',\n  iconName: 'hill-avalanche',\n  icon: [576, 512, [], \"e507\", \"M439.7 401.9c34.2 23.1 81.1 19.5 111.4-10.8c34.4-34.4 34.4-90.1 0-124.4c-27.8-27.8-69.5-33.1-102.6-16c-11.8 6.1-16.4 20.6-10.3 32.3s20.6 16.4 32.3 10.3c15.1-7.8 34-5.3 46.6 7.3c15.6 15.6 15.6 40.9 0 56.6s-40.9 15.6-56.6 0l-81.7-81.7C401.2 261.3 416 236.4 416 208c0-33.9-21.1-62.9-50.9-74.5c1.9-6.8 2.9-14 2.9-21.5c0-44.2-35.8-80-80-80c-27.3 0-51.5 13.7-65.9 34.6C216.3 46.6 197.9 32 176 32c-26.5 0-48 21.5-48 48c0 4 .5 7.9 1.4 11.6L439.7 401.9zM480 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM68.3 87C43.1 61.8 0 79.7 0 115.3L0 432c0 44.2 35.8 80 80 80l316.7 0c35.6 0 53.5-43.1 28.3-68.3L68.3 87z\"]\n};\nconst faTemperatureEmpty = {\n  prefix: 'fas',\n  iconName: 'temperature-empty',\n  icon: [320, 512, [\"temperature-0\", \"thermometer-0\", \"thermometer-empty\"], \"f2cb\", \"M112 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C233.8 332.6 240 349.5 240 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9c8.2-10.6 15.3-25.2 15.3-42.5L112 112zM160 0C98.1 0 48 50.2 48 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C27.2 304.2 16 334.8 16 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L272 112C272 50.2 221.9 0 160 0zm0 416a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faTemperature0 = faTemperatureEmpty;\nconst faThermometer0 = faTemperatureEmpty;\nconst faThermometerEmpty = faTemperatureEmpty;\nconst faBomb = {\n  prefix: 'fas',\n  iconName: 'bomb',\n  icon: [512, 512, [128163], \"f1e2\", \"M459.1 52.4L442.6 6.5C440.7 2.6 436.5 0 432.1 0s-8.5 2.6-10.4 6.5L405.2 52.4l-46 16.8c-4.3 1.6-7.3 5.9-7.2 10.4c0 4.5 3 8.7 7.2 10.2l45.7 16.8 16.8 45.8c1.5 4.4 5.8 7.5 10.4 7.5s8.9-3.1 10.4-7.5l16.5-45.8 45.7-16.8c4.2-1.5 7.2-5.7 7.2-10.2c0-4.6-3-8.9-7.2-10.4L459.1 52.4zm-132.4 53c-12.5-12.5-32.8-12.5-45.3 0l-2.9 2.9C256.5 100.3 232.7 96 208 96C93.1 96 0 189.1 0 304S93.1 512 208 512s208-93.1 208-208c0-24.7-4.3-48.5-12.2-70.5l2.9-2.9c12.5-12.5 12.5-32.8 0-45.3l-80-80zM200 192c-57.4 0-104 46.6-104 104l0 8c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-8c0-75.1 60.9-136 136-136l8 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-8 0z\"]\n};\nconst faRegistered = {\n  prefix: 'fas',\n  iconName: 'registered',\n  icon: [512, 512, [174], \"f25d\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM160 152c0-13.3 10.7-24 24-24l88 0c44.2 0 80 35.8 80 80c0 28-14.4 52.7-36.3 67l34.1 75.1c5.5 12.1 .1 26.3-11.9 31.8s-26.3 .1-31.8-11.9L268.9 288 208 288l0 72c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96 0-112zm48 88l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0 64z\"]\n};\nconst faAddressCard = {\n  prefix: 'fas',\n  iconName: 'address-card',\n  icon: [576, 512, [62140, \"contact-card\", \"vcard\"], \"f2bb\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 256l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L80 384c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zm256-32l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faContactCard = faAddressCard;\nconst faVcard = faAddressCard;\nconst faScaleUnbalancedFlip = {\n  prefix: 'fas',\n  iconName: 'scale-unbalanced-flip',\n  icon: [640, 512, [\"balance-scale-right\"], \"f516\", \"M117.9 62.4c-16.8-5.6-25.8-23.7-20.2-40.5s23.7-25.8 40.5-20.2l113 37.7C265 15.8 290.7 0 320 0c44.2 0 80 35.8 80 80c0 3-.2 5.9-.5 8.8l122.6 40.9c16.8 5.6 25.8 23.7 20.2 40.5s-23.7 25.8-40.5 20.2L366.4 145.2c-4.5 3.2-9.3 5.9-14.4 8.2L352 480c0 17.7-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0 0-294.7c-21-9.2-37.2-27-44.2-49l-125.9-42zM200.4 288L128 163.8 55.6 288l144.9 0zM128 384C65.1 384 12.8 350 2 305.1c-2.6-11 1-22.3 6.7-32.1l95.2-163.2c5-8.6 14.2-13.8 24.1-13.8s19.1 5.3 24.1 13.8l95.2 163.2c5.7 9.8 9.3 21.1 6.7 32.1C243.2 350 190.9 384 128 384zm382.8-92.2L438.4 416l144.9 0L510.8 291.8zm126 141.3C626 478 573.7 512 510.8 512s-115.2-34-126-78.9c-2.6-11 1-22.3 6.7-32.1l95.2-163.2c5-8.6 14.2-13.8 24.1-13.8s19.1 5.3 24.1 13.8l95.2 163.2c5.7 9.8 9.3 21.1 6.7 32.1z\"]\n};\nconst faBalanceScaleRight = faScaleUnbalancedFlip;\nconst faSubscript = {\n  prefix: 'fas',\n  iconName: 'subscript',\n  icon: [512, 512, [], \"f12c\", \"M32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l15.3 0 89.6 128L47.3 384 32 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c10.4 0 20.2-5.1 26.2-13.6L176 311.8l85.8 122.6c6 8.6 15.8 13.6 26.2 13.6l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-15.3 0L215.1 256l89.6-128 15.3 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-10.4 0-20.2 5.1-26.2 13.6L176 200.2 90.2 77.6C84.2 69.1 74.4 64 64 64L32 64zM480 320c0-11.1-5.7-21.4-15.2-27.2s-21.2-6.4-31.1-1.4l-32 16c-15.8 7.9-22.2 27.1-14.3 42.9C393 361.5 404.3 368 416 368l0 80c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-128z\"]\n};\nconst faDiamondTurnRight = {\n  prefix: 'fas',\n  iconName: 'diamond-turn-right',\n  icon: [512, 512, [\"directions\"], \"f5eb\", \"M227.7 11.7c15.6-15.6 40.9-15.6 56.6 0l216 216c15.6 15.6 15.6 40.9 0 56.6l-216 216c-15.6 15.6-40.9 15.6-56.6 0l-216-216c-15.6-15.6-15.6-40.9 0-56.6l216-216zm87.6 137c-4.6-4.6-11.5-5.9-17.4-3.5s-9.9 8.3-9.9 14.8l0 56-64 0c-35.3 0-64 28.7-64 64l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48c0-8.8 7.2-16 16-16l64 0 0 56c0 6.5 3.9 12.3 9.9 14.8s12.9 1.1 17.4-3.5l80-80c6.2-6.2 6.2-16.4 0-22.6l-80-80z\"]\n};\nconst faDirections = faDiamondTurnRight;\nconst faBurst = {\n  prefix: 'fas',\n  iconName: 'burst',\n  icon: [512, 512, [], \"e4dc\", \"M37.6 4.2C28-2.3 15.2-1.1 7 7s-9.4 21-2.8 30.5l112 163.3L16.6 233.2C6.7 236.4 0 245.6 0 256s6.7 19.6 16.6 22.8l103.1 33.4L66.8 412.8c-4.9 9.3-3.2 20.7 4.3 28.1s18.8 9.2 28.1 4.3l100.6-52.9 33.4 103.1c3.2 9.9 12.4 16.6 22.8 16.6s19.6-6.7 22.8-16.6l33.4-103.1 100.6 52.9c9.3 4.9 20.7 3.2 28.1-4.3s9.2-18.8 4.3-28.1L392.3 312.2l103.1-33.4c9.9-3.2 16.6-12.4 16.6-22.8s-6.7-19.6-16.6-22.8L388.9 198.7l25.7-70.4c3.2-8.8 1-18.6-5.6-25.2s-16.4-8.8-25.2-5.6l-70.4 25.7L278.8 16.6C275.6 6.7 266.4 0 256 0s-19.6 6.7-22.8 16.6l-32.3 99.6L37.6 4.2z\"]\n};\nconst faHouseLaptop = {\n  prefix: 'fas',\n  iconName: 'house-laptop',\n  icon: [640, 512, [\"laptop-house\"], \"e066\", \"M218.3 8.5c12.3-11.3 31.2-11.3 43.4 0l208 192c6.7 6.2 10.3 14.8 10.3 23.5l-144 0c-19.1 0-36.3 8.4-48 21.7l0-37.7c0-8.8-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l64 0 0 128-160 0c-26.5 0-48-21.5-48-48l0-112-32 0c-13.2 0-25-8.1-29.8-20.3s-1.6-26.2 8.1-35.2l208-192zM352 304l0 144 192 0 0-144-192 0zm-48-16c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32l0 160 32 0c8.8 0 16 7.2 16 16c0 26.5-21.5 48-48 48l-48 0-192 0-48 0c-26.5 0-48-21.5-48-48c0-8.8 7.2-16 16-16l32 0 0-160z\"]\n};\nconst faLaptopHouse = faHouseLaptop;\nconst faFaceTired = {\n  prefix: 'fas',\n  iconName: 'face-tired',\n  icon: [512, 512, [128555, \"tired\"], \"f5c8\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM164.7 328.7c22-22 53.9-40.7 91.3-40.7s69.3 18.7 91.3 40.7c11.1 11.1 20.1 23.4 26.4 35.4c6.2 11.7 10.3 24.4 10.3 35.9c0 5.2-2.6 10.2-6.9 13.2s-9.8 3.7-14.7 1.8l-20.5-7.7c-26.9-10.1-55.5-15.3-84.3-15.3l-3.2 0c-28.8 0-57.3 5.2-84.3 15.3L149.6 415c-4.9 1.8-10.4 1.2-14.7-1.8s-6.9-7.9-6.9-13.2c0-11.6 4.2-24.2 10.3-35.9c6.3-12 15.3-24.3 26.4-35.4zm-31.2-182l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6c0-9 9.6-14.7 17.5-10.5zM396 157.1c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9c7.9-4.2 17.5 1.5 17.5 10.5z\"]\n};\nconst faTired = faFaceTired;\nconst faMoneyBills = {\n  prefix: 'fas',\n  iconName: 'money-bills',\n  icon: [640, 512, [], \"e1f3\", \"M96 96l0 224c0 35.3 28.7 64 64 64l416 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32c-35.3 0-64 28.7-64 64zm64 160c35.3 0 64 28.7 64 64l-64 0 0-64zM224 96c0 35.3-28.7 64-64 64l0-64 64 0zM576 256l0 64-64 0c0-35.3 28.7-64 64-64zM512 96l64 0 0 64c-35.3 0-64-28.7-64-64zM288 208a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 360c0 66.3 53.7 120 120 120l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-400 0c-39.8 0-72-32.2-72-72l0-240z\"]\n};\nconst faSmog = {\n  prefix: 'fas',\n  iconName: 'smog',\n  icon: [640, 512, [], \"f75f\", \"M32 144c0 79.5 64.5 144 144 144l123.3 0c22.6 19.9 52.2 32 84.7 32s62.1-12.1 84.7-32l27.3 0c61.9 0 112-50.1 112-112s-50.1-112-112-112c-10.7 0-21 1.5-30.8 4.3C443.8 27.7 401.1 0 352 0c-32.6 0-62.4 12.2-85.1 32.3C242.1 12.1 210.5 0 176 0C96.5 0 32 64.5 32 144zM616 368l-336 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l336 0c13.3 0 24-10.7 24-24s-10.7-24-24-24zm-64 96l-112 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24zm-192 0L24 464c-13.3 0-24 10.7-24 24s10.7 24 24 24l336 0c13.3 0 24-10.7 24-24s-10.7-24-24-24zM224 392c0-13.3-10.7-24-24-24L96 368c-13.3 0-24 10.7-24 24s10.7 24 24 24l104 0c13.3 0 24-10.7 24-24z\"]\n};\nconst faCrutch = {\n  prefix: 'fas',\n  iconName: 'crutch',\n  icon: [512, 512, [], \"f7f7\", \"M297.4 9.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0zm-96 144l-34.8 34.8c-12.9 12.9-21.9 29.2-25.8 47.1L116.8 342.9c-1.3 5.9-4.3 11.4-8.6 15.7L9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l98.8-98.8c4.3-4.3 9.7-7.3 15.7-8.6l107.6-23.9c17.8-4 34.1-12.9 47.1-25.8l34.7-34.7c0 0 .1-.1 .1-.1s.1-.1 .1-.1l74.6-74.6-45.3-45.3L336 242.7 269.3 176l52.1-52.1L276.1 78.6l-74.7 74.7zM224 221.3L290.7 288l-12.2 12.2c-4.3 4.3-9.7 7.3-15.7 8.6l-76.7 17 17-76.7c1.3-5.9 4.3-11.4 8.6-15.7L224 221.3z\"]\n};\nconst faFontAwesome = {\n  prefix: 'fas',\n  iconName: 'font-awesome',\n  icon: [512, 512, [62501, 62694, \"font-awesome-flag\", \"font-awesome-logo-full\"], \"f2b4\", \"M91.7 96C106.3 86.8 116 70.5 116 52C116 23.3 92.7 0 64 0S12 23.3 12 52c0 16.7 7.8 31.5 20 41l0 3 0 352 0 64 64 0 0-64 373.6 0c14.6 0 26.4-11.8 26.4-26.4c0-3.7-.8-7.3-2.3-10.7L432 272l61.7-138.9c1.5-3.4 2.3-7 2.3-10.7c0-14.6-11.8-26.4-26.4-26.4L91.7 96z\"]\n};\nconst faFontAwesomeFlag = faFontAwesome;\nconst faFontAwesomeLogoFull = faFontAwesome;\nconst faCloudArrowUp = {\n  prefix: 'fas',\n  iconName: 'cloud-arrow-up',\n  icon: [640, 512, [62338, \"cloud-upload\", \"cloud-upload-alt\"], \"f0ee\", \"M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-217c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39L296 392c0 13.3 10.7 24 24 24s24-10.7 24-24l0-134.1 39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0l-80 80z\"]\n};\nconst faCloudUpload = faCloudArrowUp;\nconst faCloudUploadAlt = faCloudArrowUp;\nconst faPalette = {\n  prefix: 'fas',\n  iconName: 'palette',\n  icon: [512, 512, [127912], \"f53f\", \"M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faArrowsTurnRight = {\n  prefix: 'fas',\n  iconName: 'arrows-turn-right',\n  icon: [448, 512, [], \"e4c0\", \"M297.4 9.4c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3l-96 96c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L338.7 160 128 160c-35.3 0-64 28.7-64 64l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32C0 153.3 57.3 96 128 96l210.7 0L297.4 54.6c-12.5-12.5-12.5-32.8 0-45.3zm-96 256c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3l-96 96c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 416 96 416c-17.7 0-32 14.3-32 32l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32c0-53 43-96 96-96l146.7 0-41.4-41.4c-12.5-12.5-12.5-32.8 0-45.3z\"]\n};\nconst faVest = {\n  prefix: 'fas',\n  iconName: 'vest',\n  icon: [448, 512, [], \"e085\", \"M207.1 237.4L151.2 69.7C168.6 79.7 192.6 88 224 88s55.4-8.3 72.8-18.3L226.5 280.6c-1.6 4.9-2.5 10-2.5 15.2L224 464c0 26.5 21.5 48 48 48l128 0c26.5 0 48-21.5 48-48l0-193.5c0-9.5-2.8-18.7-8.1-26.6l-47.9-71.8c-5.3-7.9-8.1-17.1-8.1-26.6l0-17.5 0-73.7 0-6.3c0-26.5-21.5-48-48-48l-4.5 0c-.2 0-.4 0-.6 0c-.4 0-.8 0-1.2 0C311 0 295.7 9.7 285.7 18.8C276.4 27.2 257.2 40 224 40s-52.4-12.8-61.7-21.2C152.3 9.7 137 0 118.3 0c-.4 0-.8 0-1.2 0c-.2 0-.4 0-.6 0L112 0C85.5 0 64 21.5 64 48l0 6.3L64 128l0 17.5c0 9.5-2.8 18.7-8.1 26.6L8.1 243.9C2.8 251.8 0 261.1 0 270.5L0 464c0 26.5 21.5 48 48 48l128 0c9.9 0 19-3 26.7-8.1C195.9 492.2 192 478.5 192 464l0-168.2c0-8.6 1.4-17.1 4.1-25.3l11-33.1zM347.3 356.7l48 48c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0l-48-48c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0zm-294.6 48l48-48c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6l-48 48c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6z\"]\n};\nconst faFerry = {\n  prefix: 'fas',\n  iconName: 'ferry',\n  icon: [576, 512, [], \"e4ea\", \"M224 0L352 0c17.7 0 32 14.3 32 32l75.1 0c20.6 0 31.6 24.3 18.1 39.8L456 96 120 96 98.8 71.8C85.3 56.3 96.3 32 116.9 32L192 32c0-17.7 14.3-32 32-32zM96 128l384 0c17.7 0 32 14.3 32 32l0 123.5c0 13.3-4.2 26.3-11.9 37.2l-51.4 71.9c-1.9 1.1-3.7 2.2-5.5 3.5c-15.5 10.7-34 18-51 19.9l-16.5 0c-17.1-1.8-35-9-50.8-19.9c-22.1-15.5-51.6-15.5-73.7 0c-14.8 10.2-32.5 18-50.6 19.9l-16.6 0c-17-1.8-35.6-9.2-51-19.9c-1.8-1.3-3.7-2.4-5.6-3.5L75.9 320.7C68.2 309.8 64 296.8 64 283.5L64 160c0-17.7 14.3-32 32-32zm32 64l0 96 320 0 0-96-320 0zM306.5 421.9C329 437.4 356.5 448 384 448c26.9 0 55.3-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 501.7 417 512 384 512c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 437.2 165.1 448 192 448c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z\"]\n};\nconst faArrowsDownToPeople = {\n  prefix: 'fas',\n  iconName: 'arrows-down-to-people',\n  icon: [640, 512, [], \"e4b9\", \"M144 0c-13.3 0-24 10.7-24 24l0 118.1L97 119c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0l64-64c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-23 23L168 24c0-13.3-10.7-24-24-24zM360 200a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zM184 296a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm312 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM200 441.5l26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-36.3-67.5c1.7-1.7 3.2-3.6 4.3-5.8L264 345.5l0 54.5c0 17.7 14.3 32 32 32l48 0c17.7 0 32-14.3 32-32l0-54.5 26.9 49.9c1.2 2.2 2.6 4.1 4.3 5.8l-36.3 67.5c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L440 441.5l0 38.5c0 17.7 14.3 32 32 32l48 0c17.7 0 32-14.3 32-32l0-38.5 26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-37.9-70.3c-15.3-28.5-45.1-46.3-77.5-46.3l-19.5 0c-16.3 0-31.9 4.5-45.4 12.6l-33.6-62.3c-15.3-28.5-45.1-46.3-77.5-46.3l-19.5 0c-32.4 0-62.1 17.8-77.5 46.3l-33.6 62.3c-13.5-8.1-29.1-12.6-45.4-12.6l-19.5 0c-32.4 0-62.1 17.8-77.5 46.3L18.9 468.6c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L88 441.5 88 480c0 17.7 14.3 32 32 32l48 0c17.7 0 32-14.3 32-32l0-38.5zM415 153l64 64c9.4 9.4 24.6 9.4 33.9 0l64-64c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-23 23L520 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 118.1-23-23c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z\"]\n};\nconst faSeedling = {\n  prefix: 'fas',\n  iconName: 'seedling',\n  icon: [512, 512, [127793, \"sprout\"], \"f4d8\", \"M512 32c0 113.6-84.6 207.5-194.2 222c-7.1-53.4-30.6-101.6-65.3-139.3C290.8 46.3 364 0 448 0l32 0c17.7 0 32 14.3 32 32zM0 96C0 78.3 14.3 64 32 64l32 0c123.7 0 224 100.3 224 224l0 32 0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-160C100.3 320 0 219.7 0 96z\"]\n};\nconst faSprout = faSeedling;\nconst faLeftRight = {\n  prefix: 'fas',\n  iconName: 'left-right',\n  icon: [512, 512, [8596, \"arrows-alt-h\"], \"f337\", \"M504.3 273.6c4.9-4.5 7.7-10.9 7.7-17.6s-2.8-13-7.7-17.6l-112-104c-7-6.5-17.2-8.2-25.9-4.4s-14.4 12.5-14.4 22l0 56-192 0 0-56c0-9.5-5.7-18.2-14.4-22s-18.9-2.1-25.9 4.4l-112 104C2.8 243 0 249.3 0 256s2.8 13 7.7 17.6l112 104c7 6.5 17.2 8.2 25.9 4.4s14.4-12.5 14.4-22l0-56 192 0 0 56c0 9.5 5.7 18.2 14.4 22s18.9 2.1 25.9-4.4l112-104z\"]\n};\nconst faArrowsAltH = faLeftRight;\nconst faBoxesPacking = {\n  prefix: 'fas',\n  iconName: 'boxes-packing',\n  icon: [640, 512, [], \"e4c7\", \"M256 48c0-26.5 21.5-48 48-48L592 0c26.5 0 48 21.5 48 48l0 416c0 26.5-21.5 48-48 48l-210.7 0c1.8-5 2.7-10.4 2.7-16l0-242.7c18.6-6.6 32-24.4 32-45.3l0-32c0-26.5-21.5-48-48-48l-112 0 0-80zM571.3 347.3c6.2-6.2 6.2-16.4 0-22.6l-64-64c-6.2-6.2-16.4-6.2-22.6 0l-64 64c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L480 310.6 480 432c0 8.8 7.2 16 16 16s16-7.2 16-16l0-121.4 36.7 36.7c6.2 6.2 16.4 6.2 22.6 0zM0 176c0-8.8 7.2-16 16-16l352 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16L16 224c-8.8 0-16-7.2-16-16l0-32zm352 80l0 224c0 17.7-14.3 32-32 32L64 512c-17.7 0-32-14.3-32-32l0-224 320 0zM144 320c-8.8 0-16 7.2-16 16s7.2 16 16 16l96 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-96 0z\"]\n};\nconst faCircleArrowLeft = {\n  prefix: 'fas',\n  iconName: 'circle-arrow-left',\n  icon: [512, 512, [\"arrow-circle-left\"], \"f0a8\", \"M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM215 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-71 71L392 232c13.3 0 24 10.7 24 24s-10.7 24-24 24l-214.1 0 71 71c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L103 273c-9.4-9.4-9.4-24.6 0-33.9L215 127z\"]\n};\nconst faArrowCircleLeft = faCircleArrowLeft;\nconst faGroupArrowsRotate = {\n  prefix: 'fas',\n  iconName: 'group-arrows-rotate',\n  icon: [512, 512, [], \"e4f6\", \"M201.1 71.9c16.9-5 26.6-22.9 21.5-39.8s-22.9-26.6-39.8-21.5c-21.5 6.4-41.8 15.5-60.6 27C114.3 34 105.4 32 96 32C60.7 32 32 60.7 32 96c0 9.4 2 18.3 5.6 26.3c-11.5 18.7-20.6 39-27 60.6c-5 16.9 4.6 34.8 21.5 39.8s34.8-4.6 39.8-21.5c4.3-14.6 10.4-28.5 17.9-41.4c2 .2 4.1 .3 6.1 .3c35.3 0 64-28.7 64-64c0-2.1-.1-4.1-.3-6.1c12.9-7.5 26.8-13.6 41.4-17.9zm128-61.3c-16.9-5-34.8 4.6-39.8 21.5s4.6 34.8 21.5 39.8c14.6 4.3 28.5 10.4 41.4 17.9c-.2 2-.3 4.1-.3 6.1c0 35.3 28.7 64 64 64c2.1 0 4.1-.1 6.2-.3c7.5 12.9 13.6 26.8 17.9 41.4c5 16.9 22.9 26.6 39.8 21.5s26.6-22.9 21.5-39.8c-6.4-21.5-15.5-41.8-27-60.6c3.6-8 5.6-16.9 5.6-26.3c0-35.3-28.7-64-64-64c-9.4 0-18.3 2-26.3 5.6c-18.7-11.5-39-20.6-60.6-27zM71.9 310.9c-5-16.9-22.9-26.6-39.8-21.5s-26.6 22.9-21.5 39.8c6.4 21.5 15.5 41.8 27 60.6C34 397.7 32 406.6 32 416c0 35.3 28.7 64 64 64c9.4 0 18.3-2 26.3-5.6c18.7 11.5 39 20.6 60.6 27c16.9 5 34.8-4.6 39.8-21.5s-4.6-34.8-21.5-39.8c-14.6-4.3-28.5-10.4-41.4-17.9c.2-2 .3-4.1 .3-6.2c0-35.3-28.7-64-64-64c-2.1 0-4.1 .1-6.2 .3c-7.5-12.9-13.6-26.8-17.9-41.4zm429.4 18.3c5-16.9-4.6-34.8-21.5-39.8s-34.8 4.6-39.8 21.5c-4.3 14.6-10.4 28.5-17.9 41.4c-2-.2-4.1-.3-6.2-.3c-35.3 0-64 28.7-64 64c0 2.1 .1 4.1 .3 6.2c-12.9 7.5-26.8 13.6-41.4 17.9c-16.9 5-26.6 22.9-21.5 39.8s22.9 26.6 39.8 21.5c21.5-6.4 41.8-15.5 60.6-27c8 3.6 16.9 5.6 26.3 5.6c35.3 0 64-28.7 64-64c0-9.4-2-18.3-5.6-26.3c11.5-18.7 20.6-39 27-60.6zM192.8 256.8c0-15.6 5.6-29.9 14.9-41.1L223 231c6.6 6.6 17.8 1.9 17.8-7.4l0-60.5c0-5.7-4.7-10.4-10.4-10.4l-60.5 0c-9.3 0-13.9 11.2-7.4 17.8l11.2 11.2c-17.9 19.8-28.9 46.2-28.9 75.1c0 43.6 24.9 81.3 61.1 99.8c11.8 6 26.3 1.4 32.3-10.4s1.4-26.3-10.4-32.3c-20.8-10.6-34.9-32.2-34.9-57zm93.1-58.6c20.8 10.6 34.9 32.2 34.9 57c0 15.6-5.6 29.9-14.9 41.1L290.6 281c-6.6-6.6-17.8-1.9-17.8 7.4l0 60.5c0 5.7 4.7 10.4 10.4 10.4l60.5 0c9.3 0 13.9-11.2 7.4-17.8l-11.2-11.2c17.9-19.8 28.9-46.2 28.9-75.1c0-43.6-24.9-81.3-61.1-99.8c-11.8-6-26.3-1.4-32.3 10.4s-1.4 26.3 10.4 32.3z\"]\n};\nconst faBowlFood = {\n  prefix: 'fas',\n  iconName: 'bowl-food',\n  icon: [512, 512, [], \"e4c6\", \"M0 192c0-35.3 28.7-64 64-64c.5 0 1.1 0 1.6 0C73 91.5 105.3 64 144 64c15 0 29 4.1 40.9 11.2C198.2 49.6 225.1 32 256 32s57.8 17.6 71.1 43.2C339 68.1 353 64 368 64c38.7 0 71 27.5 78.4 64c.5 0 1.1 0 1.6 0c35.3 0 64 28.7 64 64c0 11.7-3.1 22.6-8.6 32L8.6 224C3.1 214.6 0 203.7 0 192zm0 91.4C0 268.3 12.3 256 27.4 256l457.1 0c15.1 0 27.4 12.3 27.4 27.4c0 70.5-44.4 130.7-106.7 154.1L403.5 452c-2 16-15.6 28-31.8 28l-231.5 0c-16.1 0-29.8-12-31.8-28l-1.8-14.4C44.4 414.1 0 353.9 0 283.4z\"]\n};\nconst faCandyCane = {\n  prefix: 'fas',\n  iconName: 'candy-cane',\n  icon: [512, 512, [], \"f786\", \"M348.8 131.5c3.7-2.3 7.9-3.5 12.2-3.5c12.7 0 23 10.3 23 23l0 5.6c0 9.9-5.1 19.1-13.5 24.3L30.1 393.7C.1 412.5-9 451.9 9.7 481.9s58.2 39.1 88.2 20.4L438.4 289.5c45.8-28.6 73.6-78.8 73.6-132.8l0-5.6C512 67.6 444.4 0 361 0c-28.3 0-56 8-80.1 23L254.1 39.7c-30 18.7-39.1 58.2-20.4 88.2s58.2 39.1 88.2 20.4l26.8-16.8zM298.4 49.8c9.2-5.7 19.1-10.1 29.4-13.1L348 97.5c-5.7 1.4-11.2 3.7-16.3 6.8l-12.6 7.9L298.4 49.8zm88.5 52.7l46.2-46.2c8.5 6.5 16.1 14.1 22.6 22.6l-46.2 46.2c-5.1-9.6-13-17.5-22.6-22.6zm28.9 59.3l61.6 20.5c-2.2 10.5-5.8 20.7-10.5 30.2l-62-20.7c6.2-8.8 10.1-19.1 11-30.1zm-86.1 82.5l60.4 37.7-30.2 18.9-60.4-37.7 30.2-18.9zm-107.2 67l60.4 37.7-30.2 18.9-60.4-37.7 30.2-18.9zM119.3 375.7l60.4 37.7-30.2 18.9L89.1 394.6l30.2-18.9z\"]\n};\nconst faArrowDownWideShort = {\n  prefix: 'fas',\n  iconName: 'arrow-down-wide-short',\n  icon: [576, 512, [\"sort-amount-asc\", \"sort-amount-down\"], \"f160\", \"M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96z\"]\n};\nconst faSortAmountAsc = faArrowDownWideShort;\nconst faSortAmountDown = faArrowDownWideShort;\nconst faCloudBolt = {\n  prefix: 'fas',\n  iconName: 'cloud-bolt',\n  icon: [512, 512, [127785, \"thunderstorm\"], \"f76c\", \"M0 224c0 53 43 96 96 96l47.2 0L290 202.5c17.6-14.1 42.6-14 60.2 .2s22.8 38.6 12.8 58.8L333.7 320l18.3 0 64 0c53 0 96-43 96-96s-43-96-96-96c-.5 0-1.1 0-1.6 0c1.1-5.2 1.6-10.5 1.6-16c0-44.2-35.8-80-80-80c-24.3 0-46.1 10.9-60.8 28C256.5 24.3 219.1 0 176 0C114.1 0 64 50.1 64 112c0 7.1 .7 14.1 1.9 20.8C27.6 145.4 0 181.5 0 224zm330.1 3.6c-5.8-4.7-14.2-4.7-20.1-.1l-160 128c-5.3 4.2-7.4 11.4-5.1 17.8s8.3 10.7 15.1 10.7l70.1 0L177.7 488.8c-3.4 6.7-1.6 14.9 4.3 19.6s14.2 4.7 20.1 .1l160-128c5.3-4.2 7.4-11.4 5.1-17.8s-8.3-10.7-15.1-10.7l-70.1 0 52.4-104.8c3.4-6.7 1.6-14.9-4.2-19.6z\"]\n};\nconst faThunderstorm = faCloudBolt;\nconst faTextSlash = {\n  prefix: 'fas',\n  iconName: 'text-slash',\n  icon: [640, 512, [\"remove-format\"], \"f87d\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L355.7 253.5 400.2 96 503 96 497 120.2c-4.3 17.1 6.1 34.5 23.3 38.8s34.5-6.1 38.8-23.3l11-44.1C577.6 61.3 554.7 32 523.5 32L376.1 32l-.3 0L204.5 32c-22 0-41.2 15-46.6 36.4l-6.3 25.2L38.8 5.1zm168 131.7c.1-.3 .2-.7 .3-1L217 96l116.7 0L301.3 210.8l-94.5-74.1zM243.3 416L192 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-42.2 0 17.6-62.1L272.9 311 243.3 416z\"]\n};\nconst faRemoveFormat = faTextSlash;\nconst faFaceSmileWink = {\n  prefix: 'fas',\n  iconName: 'face-smile-wink',\n  icon: [512, 512, [128521, \"smile-wink\"], \"f4da\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM164.1 325.5C182 346.2 212.6 368 256 368s74-21.8 91.9-42.5c5.8-6.7 15.9-7.4 22.6-1.6s7.4 15.9 1.6 22.6C349.8 372.1 311.1 400 256 400s-93.8-27.9-116.1-53.5c-5.8-6.7-5.1-16.8 1.6-22.6s16.8-5.1 22.6 1.6zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm156.4 25.6c-5.3 7.1-15.3 8.5-22.4 3.2s-8.5-15.3-3.2-22.4c30.4-40.5 91.2-40.5 121.6 0c5.3 7.1 3.9 17.1-3.2 22.4s-17.1 3.9-22.4-3.2c-17.6-23.5-52.8-23.5-70.4 0z\"]\n};\nconst faSmileWink = faFaceSmileWink;\nconst faFileWord = {\n  prefix: 'fas',\n  iconName: 'file-word',\n  icon: [384, 512, [], \"f1c2\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM111 257.1l26.8 89.2 31.6-90.3c3.4-9.6 12.5-16.1 22.7-16.1s19.3 6.4 22.7 16.1l31.6 90.3L273 257.1c3.8-12.7 17.2-19.9 29.9-16.1s19.9 17.2 16.1 29.9l-48 160c-3 10-12 16.9-22.4 17.1s-19.8-6.2-23.2-16.1L192 336.6l-33.3 95.3c-3.4 9.8-12.8 16.3-23.2 16.1s-19.5-7.1-22.4-17.1l-48-160c-3.8-12.7 3.4-26.1 16.1-29.9s26.1 3.4 29.9 16.1z\"]\n};\nconst faFilePowerpoint = {\n  prefix: 'fas',\n  iconName: 'file-powerpoint',\n  icon: [384, 512, [], \"f1c4\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM136 240l68 0c42 0 76 34 76 76s-34 76-76 76l-44 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-56 0-104c0-13.3 10.7-24 24-24zm68 104c15.5 0 28-12.5 28-28s-12.5-28-28-28l-44 0 0 56 44 0z\"]\n};\nconst faArrowsLeftRight = {\n  prefix: 'fas',\n  iconName: 'arrows-left-right',\n  icon: [512, 512, [\"arrows-h\"], \"f07e\", \"M406.6 374.6l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224l-293.5 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288l293.5 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z\"]\n};\nconst faArrowsH = faArrowsLeftRight;\nconst faHouseLock = {\n  prefix: 'fas',\n  iconName: 'house-lock',\n  icon: [640, 512, [], \"e510\", \"M384 480c0 11.7 3.1 22.6 8.6 32l-.6 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L490.7 166.3C447.2 181.7 416 223.2 416 272l0 24.6c-19.1 11.1-32 31.7-32 55.4l0 128zM528 240c-17.7 0-32 14.3-32 32l0 48 64 0 0-48c0-17.7-14.3-32-32-32zm-80 32c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l0-48z\"]\n};\nconst faCloudArrowDown = {\n  prefix: 'fas',\n  iconName: 'cloud-arrow-down',\n  icon: [640, 512, [62337, \"cloud-download\", \"cloud-download-alt\"], \"f0ed\", \"M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z\"]\n};\nconst faCloudDownload = faCloudArrowDown;\nconst faCloudDownloadAlt = faCloudArrowDown;\nconst faChildren = {\n  prefix: 'fas',\n  iconName: 'children',\n  icon: [640, 512, [], \"e4e1\", \"M160 0a64 64 0 1 1 0 128A64 64 0 1 1 160 0zM88 480l0-80-17.8 0c-10.9 0-18.6-10.7-15.2-21.1l31.1-93.4L57.5 323.3c-10.7 14.1-30.8 16.8-44.8 6.2s-16.8-30.7-6.2-44.8L65.4 207c22.4-29.6 57.5-47 94.6-47s72.2 17.4 94.6 47l58.9 77.7c10.7 14.1 7.9 34.2-6.2 44.8s-34.2 7.9-44.8-6.2l-28.6-37.8L265 378.9c3.5 10.4-4.3 21.1-15.2 21.1L232 400l0 80c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-80-16 0 0 80c0 17.7-14.3 32-32 32s-32-14.3-32-32zM480 0a64 64 0 1 1 0 128A64 64 0 1 1 480 0zm-8 384l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-179.5L395.1 321c-9.4 15-29.2 19.4-44.1 10s-19.4-29.2-10-44.1l51.7-82.1c17.6-27.9 48.3-44.9 81.2-44.9l12.3 0c33 0 63.7 16.9 81.2 44.9L619.1 287c9.4 15 4.9 34.7-10 44.1s-34.7 4.9-44.1-10L552 300.5 552 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-16 0z\"]\n};\nconst faChalkboard = {\n  prefix: 'fas',\n  iconName: 'chalkboard',\n  icon: [576, 512, [\"blackboard\"], \"f51b\", \"M96 32C60.7 32 32 60.7 32 96l0 288 64 0L96 96l384 0 0 288 64 0 0-288c0-35.3-28.7-64-64-64L96 32zM224 384l0 32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l512 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-128 0 0-32c0-17.7-14.3-32-32-32l-128 0c-17.7 0-32 14.3-32 32z\"]\n};\nconst faBlackboard = faChalkboard;\nconst faUserLargeSlash = {\n  prefix: 'fas',\n  iconName: 'user-large-slash',\n  icon: [640, 512, [\"user-alt-slash\"], \"f4fa\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L381.9 274c48.5-23.2 82.1-72.7 82.1-130C464 64.5 399.5 0 320 0C250.4 0 192.4 49.3 178.9 114.9L38.8 5.1zM545.5 512L528 512 284.3 320l-59 0C136.2 320 64 392.2 64 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0 .3 0z\"]\n};\nconst faUserAltSlash = faUserLargeSlash;\nconst faEnvelopeOpen = {\n  prefix: 'fas',\n  iconName: 'envelope-open',\n  icon: [512, 512, [62135], \"f2b6\", \"M64 208.1L256 65.9 448 208.1l0 47.4L289.5 373c-9.7 7.2-21.4 11-33.5 11s-23.8-3.9-33.5-11L64 255.5l0-47.4zM256 0c-12.1 0-23.8 3.9-33.5 11L25.9 156.7C9.6 168.8 0 187.8 0 208.1L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-239.9c0-20.3-9.6-39.4-25.9-51.4L289.5 11C279.8 3.9 268.1 0 256 0z\"]\n};\nconst faHandshakeSimpleSlash = {\n  prefix: 'fas',\n  iconName: 'handshake-simple-slash',\n  icon: [640, 512, [\"handshake-alt-slash\"], \"e05f\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-135-105.8c-1.1-11.4-6.3-22.3-15.3-30.7l-134.2-123-23.4 18.2-26-20.3 77.2-60.1c7-5.4 17-4.2 22.5 2.8s4.2 17-2.8 22.5l-20.9 16.2L550.2 352l41.8 0c26.5 0 48-21.5 48-48l0-128c0-26.5-21.5-48-48-48l-76 0-4 0-.7 0-3.9-2.5L434.8 79c-15.3-9.8-33.2-15-51.4-15c-21.8 0-43 7.5-60 21.2l-89.7 72.6-25.8-20.3 81.8-66.2c-11.6-4.9-24.1-7.4-36.8-7.4C234 64 215.7 69.6 200 80l-35.5 23.7L38.8 5.1zM0 176L0 304c0 26.5 21.5 48 48 48l108.2 0 91.4 83.4c19.6 17.9 49.9 16.5 67.8-3.1c5.5-6.1 9.2-13.2 11.1-20.6l17 15.6c19.5 17.9 49.9 16.6 67.8-2.9c.8-.8 1.5-1.7 2.2-2.6L41.2 128.5C17.9 131.8 0 151.8 0 176z\"]\n};\nconst faHandshakeAltSlash = faHandshakeSimpleSlash;\nconst faMattressPillow = {\n  prefix: 'fas',\n  iconName: 'mattress-pillow',\n  icon: [640, 512, [], \"e525\", \"M256 64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l192 0 0-384zm32 384l288 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L288 64l0 384zM64 160c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 192c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-192z\"]\n};\nconst faGuaraniSign = {\n  prefix: 'fas',\n  iconName: 'guarani-sign',\n  icon: [384, 512, [], \"e19a\", \"M192 0c-17.7 0-32 14.3-32 32l0 34.7C69.2 81.9 0 160.9 0 256s69.2 174.1 160 189.3l0 34.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-34.7c90.8-15.2 160-94.2 160-189.3c0-17.7-14.3-32-32-32l-128 0 0-92c22.1 5.7 41.8 17.1 57.6 32.6c12.6 12.4 32.9 12.2 45.3-.4s12.2-32.9-.5-45.3C299 92 263.5 73.3 224 66.7L224 32c0-17.7-14.3-32-32-32zM160 132L160 380c-55.2-14.2-96-64.3-96-124s40.8-109.8 96-124zM224 380l0-92 92 0c-11.6 45-47 80.4-92 92z\"]\n};\nconst faArrowsRotate = {\n  prefix: 'fas',\n  iconName: 'arrows-rotate',\n  icon: [512, 512, [128472, \"refresh\", \"sync\"], \"f021\", \"M105.1 202.6c7.7-21.8 20.2-42.3 37.8-59.8c62.5-62.5 163.8-62.5 226.3 0L386.3 160 352 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l111.5 0c0 0 0 0 0 0l.4 0c17.7 0 32-14.3 32-32l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 35.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5zM39 289.3c-5 1.5-9.8 4.2-13.7 8.2c-4 4-6.7 8.8-8.1 14c-.3 1.2-.6 2.5-.8 3.8c-.3 1.7-.4 3.4-.4 5.1L16 432c0 17.7 14.3 32 32 32s32-14.3 32-32l0-35.1 17.6 17.5c0 0 0 0 0 0c87.5 87.4 229.3 87.4 316.7 0c24.4-24.4 42.1-53.1 52.9-83.8c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.5 62.5-163.8 62.5-226.3 0l-.1-.1L125.6 352l34.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48.4 288c-1.6 0-3.2 .1-4.8 .3s-3.1 .5-4.6 1z\"]\n};\nconst faRefresh = faArrowsRotate;\nconst faSync = faArrowsRotate;\nconst faFireExtinguisher = {\n  prefix: 'fas',\n  iconName: 'fire-extinguisher',\n  icon: [512, 512, [129519], \"f134\", \"M500.3 7.3C507.7 13.3 512 22.4 512 32l0 96c0 9.6-4.3 18.7-11.7 24.7s-17.2 8.5-26.6 6.6l-160-32C301.5 124.9 292 115.7 289 104l-65 0 0 34.8c37.8 18 64 56.5 64 101.2l0 144L64 384l0-144c0-44.7 26.2-83.2 64-101.2l0-28.8c-36.2 11.1-66 36.9-82.3 70.5c-5.8 11.9-20.2 16.9-32.1 11.1S-3.3 171.4 2.5 159.5C26.7 109.8 72.7 72.6 128 60.4L128 32c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 24 65 0c3-11.7 12.5-20.9 24.7-23.4l160-32c9.4-1.9 19.1 .6 26.6 6.6zM288 416l0 32c0 35.3-28.7 64-64 64l-96 0c-35.3 0-64-28.7-64-64l0-32 224 0zM176 96a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faCruzeiroSign = {\n  prefix: 'fas',\n  iconName: 'cruzeiro-sign',\n  icon: [448, 512, [], \"e152\", \"M96 256c0-88.4 71.6-160 160-160c41 0 78.3 15.4 106.7 40.7c13.2 11.8 33.4 10.7 45.2-2.5s10.7-33.4-2.5-45.2c-39.6-35.5-92-57-149.3-57C132.3 32 32 132.3 32 256s100.3 224 224 224c57.4 0 109.7-21.6 149.3-57c13.2-11.8 14.3-32 2.5-45.2s-32-14.3-45.2-2.5C334.3 400.6 297 416 256 416l0-96 0-8.7c0-12.8 10.4-23.3 23.3-23.3c4.6 0 9.1 1.4 12.9 3.9l10.1 6.7c14.7 9.8 34.6 5.8 44.4-8.9s5.8-34.6-8.9-44.4l-10.1-6.7c-14.3-9.6-31.2-14.7-48.4-14.7c-12.4 0-24.2 2.6-34.9 7.3c-5.5-4.5-12.6-7.3-20.3-7.3c-17.7 0-32 14.3-32 32l0 55.3 0 8.7 0 82.7C135.5 378 96 321.6 96 256z\"]\n};\nconst faGreaterThanEqual = {\n  prefix: 'fas',\n  iconName: 'greater-than-equal',\n  icon: [448, 512, [], \"f532\", \"M52.1 93.7C35.7 87.1 27.7 68.5 34.3 52.1s25.2-24.4 41.6-17.8l320 128C408 167.1 416 178.9 416 192s-8 24.9-20.1 29.7l-320 128c-16.4 6.6-35-1.4-41.6-17.8s1.4-35 17.8-41.6L297.8 192 52.1 93.7zM416 416c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0z\"]\n};\nconst faShieldHalved = {\n  prefix: 'fas',\n  iconName: 'shield-halved',\n  icon: [512, 512, [\"shield-alt\"], \"f3ed\", \"M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-16.7 8-36.1 8-52.8 0C57.3 420.7 16.5 239.2 16 140c-.1-26.2 16.3-47.9 38.3-57.2L242.7 2.9C246.8 1 251.4 0 256 0zm0 66.8l0 378.1C394 378 431.1 230.1 432 141.4L256 66.8s0 0 0 0z\"]\n};\nconst faShieldAlt = faShieldHalved;\nconst faBookAtlas = {\n  prefix: 'fas',\n  iconName: 'book-atlas',\n  icon: [448, 512, [\"atlas\"], \"f558\", \"M0 96C0 43 43 0 96 0L384 0l32 0c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0L96 512c-53 0-96-43-96-96L0 96zM64 416c0 17.7 14.3 32 32 32l256 0 0-64L96 384c-17.7 0-32 14.3-32 32zM247.4 283.8c-3.7 3.7-6.2 4.2-7.4 4.2s-3.7-.5-7.4-4.2c-3.8-3.7-8-10-11.8-18.9c-6.2-14.5-10.8-34.3-12.2-56.9l63 0c-1.5 22.6-6 42.4-12.2 56.9c-3.8 8.9-8 15.2-11.8 18.9zm42.7-9.9c7.3-18.3 12-41.1 13.4-65.9l31.1 0c-4.7 27.9-21.4 51.7-44.5 65.9zm0-163.8c23.2 14.2 39.9 38 44.5 65.9l-31.1 0c-1.4-24.7-6.1-47.5-13.4-65.9zM368 192a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM145.3 208l31.1 0c1.4 24.7 6.1 47.5 13.4 65.9c-23.2-14.2-39.9-38-44.5-65.9zm31.1-32l-31.1 0c4.7-27.9 21.4-51.7 44.5-65.9c-7.3 18.3-12 41.1-13.4 65.9zm56.1-75.8c3.7-3.7 6.2-4.2 7.4-4.2s3.7 .5 7.4 4.2c3.8 3.7 8 10 11.8 18.9c6.2 14.5 10.8 34.3 12.2 56.9l-63 0c1.5-22.6 6-42.4 12.2-56.9c3.8-8.9 8-15.2 11.8-18.9z\"]\n};\nconst faAtlas = faBookAtlas;\nconst faVirus = {\n  prefix: 'fas',\n  iconName: 'virus',\n  icon: [512, 512, [], \"e074\", \"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 11.5c0 49.9-60.3 74.9-95.6 39.6L120.2 75C107.7 62.5 87.5 62.5 75 75s-12.5 32.8 0 45.3l8.2 8.2C118.4 163.7 93.4 224 43.5 224L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l11.5 0c49.9 0 74.9 60.3 39.6 95.6L75 391.8c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l8.2-8.2c35.3-35.3 95.6-10.3 95.6 39.6l0 11.5c0 17.7 14.3 32 32 32s32-14.3 32-32l0-11.5c0-49.9 60.3-74.9 95.6-39.6l8.2 8.2c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-8.2-8.2c-35.3-35.3-10.3-95.6 39.6-95.6l11.5 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-11.5 0c-49.9 0-74.9-60.3-39.6-95.6l8.2-8.2c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-8.2 8.2C348.3 118.4 288 93.4 288 43.5L288 32zM176 224a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm128 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faEnvelopeCircleCheck = {\n  prefix: 'fas',\n  iconName: 'envelope-circle-check',\n  icon: [640, 512, [], \"e4e8\", \"M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0l57.4-43c23.9-59.8 79.7-103.3 146.3-109.8l13.9-10.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48L48 64zM294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176 0 384c0 35.3 28.7 64 64 64l296.2 0C335.1 417.6 320 378.5 320 336c0-5.6 .3-11.1 .8-16.6l-26.4 19.8zM640 336a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 353.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faLayerGroup = {\n  prefix: 'fas',\n  iconName: 'layer-group',\n  icon: [576, 512, [], \"f5fd\", \"M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z\"]\n};\nconst faArrowsToDot = {\n  prefix: 'fas',\n  iconName: 'arrows-to-dot',\n  icon: [512, 512, [], \"e4be\", \"M256 0c17.7 0 32 14.3 32 32l0 32 32 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-64 64c-12.5 12.5-32.8 12.5-45.3 0l-64-64c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8l32 0 0-32c0-17.7 14.3-32 32-32zM169.4 393.4l64-64c12.5-12.5 32.8-12.5 45.3 0l64 64c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8l-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9zM32 224l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c12.5 12.5 12.5 32.8 0 45.3l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm297.4 54.6c-12.5-12.5-12.5-32.8 0-45.3l64-64c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 32 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 32c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-64-64zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faArchway = {\n  prefix: 'fas',\n  iconName: 'archway',\n  icon: [512, 512, [], \"f557\", \"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zm0 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 64 0 0-128c0-53 43-96 96-96s96 43 96 96l0 128 64 0 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-288L32 128l0 288z\"]\n};\nconst faHeartCircleCheck = {\n  prefix: 'fas',\n  iconName: 'heart-circle-check',\n  icon: [576, 512, [], \"e4fd\", \"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9l2.6-2.4C267.2 438.6 256 404.6 256 368c0-97.2 78.8-176 176-176c28.3 0 55 6.7 78.7 18.5c.9-6.5 1.3-13 1.3-19.6l0-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1l0 5.8c0 41.5 17.2 81.2 47.6 109.5zM576 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L416 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faHouseChimneyCrack = {\n  prefix: 'fas',\n  iconName: 'house-chimney-crack',\n  icon: [576, 512, [\"house-damage\"], \"f6f1\", \"M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c.2 35.5-28.5 64.3-64 64.3l-122.1 0L288 448l80.8-67.3c7.8-6.5 7.6-18.6-.4-24.9L250.6 263.2c-14.6-11.5-33.8 7-22.8 22L288 368l-85.5 71.2c-6.1 5-7.5 13.8-3.5 20.5L230.4 512l-102.3 0c-35.3 0-64-28.7-64-64l0-160.4-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L416 100.7 416 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 121 52.8 46.4c8 7 12 15 11 24z\"]\n};\nconst faHouseDamage = faHouseChimneyCrack;\nconst faFileZipper = {\n  prefix: 'fas',\n  iconName: 'file-zipper',\n  icon: [384, 512, [\"file-archive\"], \"f1c6\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM96 48c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm-6.3 71.8c3.7-14 16.4-23.8 30.9-23.8l14.8 0c14.5 0 27.2 9.7 30.9 23.8l23.5 88.2c1.4 5.4 2.1 10.9 2.1 16.4c0 35.2-28.8 63.7-64 63.7s-64-28.5-64-63.7c0-5.5 .7-11.1 2.1-16.4l23.5-88.2zM112 336c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0z\"]\n};\nconst faFileArchive = faFileZipper;\nconst faSquare = {\n  prefix: 'fas',\n  iconName: 'square',\n  icon: [448, 512, [9632, 9723, 9724, 61590], \"f0c8\", \"M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z\"]\n};\nconst faMartiniGlassEmpty = {\n  prefix: 'fas',\n  iconName: 'martini-glass-empty',\n  icon: [512, 512, [\"glass-martini\"], \"f000\", \"M32 0C19.1 0 7.4 7.8 2.4 19.8s-2.2 25.7 6.9 34.9L224 269.3 224 448l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-178.7L502.6 54.6c9.2-9.2 11.9-22.9 6.9-34.9S492.9 0 480 0L32 0zM256 210.7L109.3 64l293.5 0L256 210.7z\"]\n};\nconst faGlassMartini = faMartiniGlassEmpty;\nconst faCouch = {\n  prefix: 'fas',\n  iconName: 'couch',\n  icon: [640, 512, [], \"f4b8\", \"M64 160C64 89.3 121.3 32 192 32l256 0c70.7 0 128 57.3 128 128l0 33.6c-36.5 7.4-64 39.7-64 78.4l0 48-384 0 0-48c0-38.7-27.5-71-64-78.4L64 160zM544 272c0-20.9 13.4-38.7 32-45.3c5-1.8 10.4-2.7 16-2.7c26.5 0 48 21.5 48 48l0 176c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32L96 448c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32L0 272c0-26.5 21.5-48 48-48c5.6 0 11 1 16 2.7c18.6 6.6 32 24.4 32 45.3l0 48 0 32 32 0 384 0 32 0 0-32 0-48z\"]\n};\nconst faCediSign = {\n  prefix: 'fas',\n  iconName: 'cedi-sign',\n  icon: [384, 512, [], \"e0df\", \"M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 34.7C101.2 81.9 32 160.9 32 256s69.2 174.1 160 189.3l0 34.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-34.7c30.9-5.2 59.2-17.7 83.2-35.8c14.1-10.6 17-30.7 6.4-44.8s-30.7-17-44.8-6.4c-13.2 9.9-28.3 17.3-44.8 21.6L256 132c16.4 4.2 31.6 11.6 44.8 21.6c14.1 10.6 34.2 7.8 44.8-6.4s7.8-34.2-6.4-44.8c-24-18-52.4-30.6-83.2-35.8L256 32zM192 132L192 380c-55.2-14.2-96-64.3-96-124s40.8-109.8 96-124z\"]\n};\nconst faItalic = {\n  prefix: 'fas',\n  iconName: 'italic',\n  icon: [384, 512, [], \"f033\", \"M128 64c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-58.7 0L160 416l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l58.7 0L224 96l-64 0c-17.7 0-32-14.3-32-32z\"]\n};\nconst faTableCellsColumnLock = {\n  prefix: 'fas',\n  iconName: 'table-cells-column-lock',\n  icon: [640, 512, [], \"e678\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 65.1c-37.8 5.4-69.4 29.6-85.2 62.9L360 224l0 64 56 0 0 8.6c-19.1 11.1-32 31.7-32 55.4l-24 0 0 64 24 0 0 64L64 480c-35.3 0-64-28.7-64-64L0 96zm208 0l0 64 88 0 0-64-88 0zm240 0l-88 0 0 64 88 0 0-64zM208 224l0 64 88 0 0-64-88 0zm0 128l0 64 88 0 0-64-88 0zM528 240c-17.7 0-32 14.3-32 32l0 48 64 0 0-48c0-17.7-14.3-32-32-32zm-80 32c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l0-48z\"]\n};\nconst faChurch = {\n  prefix: 'fas',\n  iconName: 'church',\n  icon: [640, 512, [9962], \"f51d\", \"M344 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 24-32 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l32 0 0 46.4L183.3 210c-14.5 8.7-23.3 24.3-23.3 41.2L160 512l96 0 0-96c0-35.3 28.7-64 64-64s64 28.7 64 64l0 96 96 0 0-260.8c0-16.9-8.8-32.5-23.3-41.2L344 142.4 344 96l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0 0-24zM24.9 330.3C9.5 338.8 0 354.9 0 372.4L0 464c0 26.5 21.5 48 48 48l80 0 0-238.4L24.9 330.3zM592 512c26.5 0 48-21.5 48-48l0-91.6c0-17.5-9.5-33.6-24.9-42.1L512 273.6 512 512l80 0z\"]\n};\nconst faCommentsDollar = {\n  prefix: 'fas',\n  iconName: 'comments-dollar',\n  icon: [640, 512, [], \"f653\", \"M416 176c0 97.2-93.1 176-208 176c-38.2 0-73.9-8.7-104.7-23.9c-7.5 4-16 7.9-25.2 11.4C59.8 346.4 37.8 352 16 352c-6.9 0-13.1-4.5-15.2-11.1s.2-13.8 5.8-17.9c0 0 0 0 0 0s0 0 0 0l.2-.2c.2-.2 .6-.4 1.1-.8c1-.8 2.5-2 4.3-3.7c3.6-3.3 8.5-8.1 13.3-14.3c5.5-7 10.7-15.4 14.2-24.7C14.7 250.3 0 214.6 0 176C0 78.8 93.1 0 208 0S416 78.8 416 176zM231.5 383C348.9 372.9 448 288.3 448 176c0-5.2-.2-10.4-.6-15.5C555.1 167.1 640 243.2 640 336c0 38.6-14.7 74.3-39.6 103.4c3.5 9.4 8.7 17.7 14.2 24.7c4.8 6.2 9.7 11 13.3 14.3c1.8 1.6 3.3 2.9 4.3 3.7c.5 .4 .9 .7 1.1 .8l.2 .2s0 0 0 0s0 0 0 0c5.6 4.1 7.9 11.3 5.8 17.9c-2.1 6.6-8.3 11.1-15.2 11.1c-21.8 0-43.8-5.6-62.1-12.5c-9.2-3.5-17.8-7.4-25.2-11.4C505.9 503.3 470.2 512 432 512c-95.6 0-176.2-54.6-200.5-129zM228 72c0-11-9-20-20-20s-20 9-20 20l0 14c-7.6 1.7-15.2 4.4-22.2 8.5c-13.9 8.3-25.9 22.8-25.8 43.9c.1 20.3 12 33.1 24.7 40.7c11 6.6 24.7 10.8 35.6 14l1.7 .5c12.6 3.8 21.8 6.8 28 10.7c5.1 3.2 5.8 5.4 5.9 8.2c.1 5-1.8 8-5.9 10.5c-5 3.1-12.9 5-21.4 4.7c-11.1-.4-21.5-3.9-35.1-8.5c-2.3-.8-4.7-1.6-7.2-2.4c-10.5-3.5-21.8 2.2-25.3 12.6s2.2 21.8 12.6 25.3c1.9 .6 4 1.3 6.1 2.1c0 0 0 0 0 0s0 0 0 0c8.3 2.9 17.9 6.2 28.2 8.4l0 14.6c0 11 9 20 20 20s20-9 20-20l0-13.8c8-1.7 16-4.5 23.2-9c14.3-8.9 25.1-24.1 24.8-45c-.3-20.3-11.7-33.4-24.6-41.6c-11.5-7.2-25.9-11.6-37.1-15l-.7-.2c-12.8-3.9-21.9-6.7-28.3-10.5c-5.2-3.1-5.3-4.9-5.3-6.7c0-3.7 1.4-6.5 6.2-9.3c5.4-3.2 13.6-5.1 21.5-5c9.6 .1 20.2 2.2 31.2 5.2c10.7 2.8 21.6-3.5 24.5-14.2s-3.5-21.6-14.2-24.5c-6.5-1.7-13.7-3.4-21.1-4.7L228 72z\"]\n};\nconst faDemocrat = {\n  prefix: 'fas',\n  iconName: 'democrat',\n  icon: [640, 512, [], \"f747\", \"M64 32c0-8.9 3.8-20.9 6.2-27.3C71.2 1.8 74 0 77 0c1.9 0 3.8 .7 5.2 2.1L128 45.7 173.8 2.1C175.2 .7 177.1 0 179 0c3 0 5.8 1.8 6.8 4.7c2.4 6.5 6.2 18.4 6.2 27.3c0 26.5-21.9 42-29.5 46.6l76.2 72.6c6 5.7 13.9 8.8 22.1 8.8L480 160l32 0c40.3 0 78.2 19 102.4 51.2l19.2 25.6c10.6 14.1 7.7 34.2-6.4 44.8s-34.2 7.7-44.8-6.4l-19.2-25.6c-5.3-7-11.8-12.8-19.2-17l0 87.4-352 0-40.4-94.3c-3.9-9.2-15.3-12.6-23.6-7l-42.1 28c-9.1 6.1-19.7 9.3-30.7 9.3l-2 0C23.9 256 0 232.1 0 202.7c0-12.1 4.1-23.8 11.7-33.3L87.6 74.6C78.1 67.4 64 53.2 64 32zM448 352l96 0 0 64 0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64-160 0 0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64 0-64 96 0 160 0zM260.9 210.9c-.9-1.8-2.8-2.9-4.8-2.9s-3.9 1.1-4.8 2.9l-10.5 20.5-23.5 3.3c-2 .3-3.7 1.6-4.3 3.5s-.1 3.9 1.3 5.3l17 16-4 22.6c-.3 1.9 .5 3.9 2.1 5s3.8 1.3 5.6 .4l21-10.7 21 10.7c1.8 .9 4 .8 5.6-.4s2.5-3.1 2.1-5l-4-22.6 17-16c1.5-1.4 2-3.4 1.3-5.3s-2.3-3.2-4.3-3.5l-23.5-3.3-10.5-20.5zM368.1 208c-2 0-3.9 1.1-4.8 2.9l-10.5 20.5-23.5 3.3c-2 .3-3.7 1.6-4.3 3.5s-.1 3.9 1.3 5.3l17 16-4 22.6c-.3 1.9 .5 3.9 2.1 5s3.8 1.3 5.6 .4l21-10.7 21 10.7c1.8 .9 4 .8 5.6-.4s2.5-3.1 2.1-5l-4-22.6 17-16c1.5-1.4 2-3.4 1.4-5.3s-2.3-3.2-4.3-3.5l-23.5-3.3-10.5-20.5c-.9-1.8-2.8-2.9-4.8-2.9zm116.8 2.9c-.9-1.8-2.8-2.9-4.8-2.9s-3.9 1.1-4.8 2.9l-10.5 20.5-23.5 3.3c-2 .3-3.7 1.6-4.3 3.5s-.1 3.9 1.3 5.3l17 16-4 22.6c-.3 1.9 .5 3.9 2.1 5s3.8 1.3 5.6 .4l21-10.7 21 10.7c1.8 .9 4 .8 5.6-.4s2.5-3.1 2.1-5l-4-22.6 17-16c1.5-1.4 2-3.4 1.4-5.3s-2.3-3.2-4.3-3.5l-23.5-3.3-10.5-20.5z\"]\n};\nconst faZ = {\n  prefix: 'fas',\n  iconName: 'z',\n  icon: [384, 512, [122], \"5a\", \"M0 64C0 46.3 14.3 32 32 32l320 0c12.4 0 23.7 7.2 29 18.4s3.6 24.5-4.4 34.1L100.3 416 352 416c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-12.4 0-23.7-7.2-29-18.4s-3.6-24.5 4.4-34.1L283.7 96 32 96C14.3 96 0 81.7 0 64z\"]\n};\nconst faPersonSkiing = {\n  prefix: 'fas',\n  iconName: 'person-skiing',\n  icon: [512, 512, [9975, \"skiing\"], \"f7c9\", \"M380.7 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM2.7 268.9c6.1-11.8 20.6-16.3 32.4-10.2L232.7 361.3l46.2-69.2-75.1-75.1c-14.6-14.6-20.4-33.9-18.4-52.1l108.8 52 39.3 39.3c16.2 16.2 18.7 41.5 6 60.6L289.8 391l128.7 66.8c13.6 7.1 29.8 7.2 43.6 .3l15.2-7.6c11.9-5.9 26.3-1.1 32.2 10.7s1.1 26.3-10.7 32.2l-15.2 7.6c-27.5 13.7-59.9 13.5-87.2-.7L12.9 301.3C1.2 295.2-3.4 280.7 2.7 268.9zM118.9 65.6L137 74.2l8.7-17.4c4-7.9 13.6-11.1 21.5-7.2s11.1 13.6 7.2 21.5l-8.5 16.9 54.7 26.2c1.5-.7 3.1-1.4 4.7-2.1l83.4-33.4c34.2-13.7 72.8 4.2 84.5 39.2l17.1 51.2 52.1 26.1c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3l-58.1-29c-11.4-5.7-20-15.7-24.1-27.8l-5.8-17.3-27.3 12.1-6.8 3-6.7-3.2L151.5 116.7l-9.2 18.4c-4 7.9-13.6 11.1-21.5 7.2s-11.1-13.6-7.2-21.5l9-18-17.6-8.4c-8-3.8-11.3-13.4-7.5-21.3s13.4-11.3 21.3-7.5z\"]\n};\nconst faSkiing = faPersonSkiing;\nconst faRoadLock = {\n  prefix: 'fas',\n  iconName: 'road-lock',\n  icon: [640, 512, [], \"e567\", \"M288 32l-74.8 0c-27.1 0-51.3 17.1-60.3 42.6L35.1 407.2c-2.1 5.9-3.1 12-3.1 18.2C32 455.5 56.5 480 86.6 480L288 480l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64 32 0 0-128c0-23.7 12.9-44.4 32-55.4l0-24.6c0-58.3 44.6-106.2 101.5-111.5L487.1 74.6C478 49.1 453.9 32 426.8 32L352 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zm64 192l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32zm176 16c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z\"]\n};\nconst faA = {\n  prefix: 'fas',\n  iconName: 'a',\n  icon: [384, 512, [97], \"41\", \"M221.5 51.7C216.6 39.8 204.9 32 192 32s-24.6 7.8-29.5 19.7l-120 288-40 96c-6.8 16.3 .9 35 17.2 41.8s35-.9 41.8-17.2L93.3 384l197.3 0 31.8 76.3c6.8 16.3 25.5 24 41.8 17.2s24-25.5 17.2-41.8l-40-96-120-288zM264 320l-144 0 72-172.8L264 320z\"]\n};\nconst faTemperatureArrowDown = {\n  prefix: 'fas',\n  iconName: 'temperature-arrow-down',\n  icon: [576, 512, [\"temperature-down\"], \"e03f\", \"M128 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C249.8 332.6 256 349.5 256 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9c8.2-10.6 15.3-25.2 15.3-42.5L128 112zM176 0C114.1 0 64 50.1 64 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C43.2 304.2 32 334.8 32 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L288 112C288 50.1 237.9 0 176 0zm0 416c26.5 0 48-21.5 48-48c0-20.9-13.4-38.7-32-45.3l0-50.7c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 50.7c-18.6 6.6-32 24.4-32 45.3c0 26.5 21.5 48 48 48zm336-64l-32 0 0-288c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 288-32 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c6 6 14.1 9.4 22.6 9.4s16.6-3.4 22.6-9.4l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8z\"]\n};\nconst faTemperatureDown = faTemperatureArrowDown;\nconst faFeatherPointed = {\n  prefix: 'fas',\n  iconName: 'feather-pointed',\n  icon: [512, 512, [\"feather-alt\"], \"f56b\", \"M278.5 215.6L23 471c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l74.8-74.8c7.4 4.6 15.3 8.2 23.8 10.5C200.3 452.8 270 454.5 338 409.4c12.2-8.1 5.8-25.4-8.8-25.4l-16.1 0c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l97.7-29.3c3.4-1 6.4-3.1 8.4-6.1c4.4-6.4 8.6-12.9 12.6-19.6c6.2-10.3-1.5-23-13.5-23l-38.6 0c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l80.9-24.3c4.6-1.4 8.4-4.8 10.2-9.3C494.5 163 507.8 86.1 511.9 36.8c.8-9.9-3-19.6-10-26.6s-16.7-10.8-26.6-10C391.5 7 228.5 40.5 137.4 131.6C57.3 211.7 56.7 302.3 71.3 356.4c2.1 7.9 12 9.6 17.8 3.8L253.6 195.8c6.2-6.2 16.4-6.2 22.6 0c5.4 5.4 6.1 13.6 2.2 19.8z\"]\n};\nconst faFeatherAlt = faFeatherPointed;\nconst faP = {\n  prefix: 'fas',\n  iconName: 'p',\n  icon: [320, 512, [112], \"50\", \"M0 96C0 60.7 28.7 32 64 32l96 0c88.4 0 160 71.6 160 160s-71.6 160-160 160l-96 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 320 0 96zM64 288l96 0c53 0 96-43 96-96s-43-96-96-96L64 96l0 192z\"]\n};\nconst faSnowflake = {\n  prefix: 'fas',\n  iconName: 'snowflake',\n  icon: [448, 512, [10052, 10054], \"f2dc\", \"M224 0c17.7 0 32 14.3 32 32l0 30.1 15-15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-49 49 0 70.3 61.4-35.8 17.7-66.1c3.4-12.8 16.6-20.4 29.4-17s20.4 16.6 17 29.4l-5.2 19.3 23.6-13.8c15.3-8.9 34.9-3.7 43.8 11.5s3.8 34.9-11.5 43.8l-25.3 14.8 21.7 5.8c12.8 3.4 20.4 16.6 17 29.4s-16.6 20.4-29.4 17l-67.7-18.1L287.5 256l60.9 35.5 67.7-18.1c12.8-3.4 26 4.2 29.4 17s-4.2 26-17 29.4l-21.7 5.8 25.3 14.8c15.3 8.9 20.4 28.5 11.5 43.8s-28.5 20.4-43.8 11.5l-23.6-13.8 5.2 19.3c3.4 12.8-4.2 26-17 29.4s-26-4.2-29.4-17l-17.7-66.1L256 311.7l0 70.3 49 49c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-15-15 0 30.1c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-30.1-15 15c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l49-49 0-70.3-61.4 35.8-17.7 66.1c-3.4 12.8-16.6 20.4-29.4 17s-20.4-16.6-17-29.4l5.2-19.3L48.1 395.6c-15.3 8.9-34.9 3.7-43.8-11.5s-3.7-34.9 11.5-43.8l25.3-14.8-21.7-5.8c-12.8-3.4-20.4-16.6-17-29.4s16.6-20.4 29.4-17l67.7 18.1L160.5 256 99.6 220.5 31.9 238.6c-12.8 3.4-26-4.2-29.4-17s4.2-26 17-29.4l21.7-5.8L15.9 171.6C.6 162.7-4.5 143.1 4.4 127.9s28.5-20.4 43.8-11.5l23.6 13.8-5.2-19.3c-3.4-12.8 4.2-26 17-29.4s26 4.2 29.4 17l17.7 66.1L192 200.3l0-70.3L143 81c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l15 15L192 32c0-17.7 14.3-32 32-32z\"]\n};\nconst faNewspaper = {\n  prefix: 'fas',\n  iconName: 'newspaper',\n  icon: [512, 512, [128240], \"f1ea\", \"M96 96c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L80 480c-44.2 0-80-35.8-80-80L0 128c0-17.7 14.3-32 32-32s32 14.3 32 32l0 272c0 8.8 7.2 16 16 16s16-7.2 16-16L96 96zm64 24l0 80c0 13.3 10.7 24 24 24l112 0c13.3 0 24-10.7 24-24l0-80c0-13.3-10.7-24-24-24L184 96c-13.3 0-24 10.7-24 24zm208-8c0 8.8 7.2 16 16 16l48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0c-8.8 0-16 7.2-16 16zm0 96c0 8.8 7.2 16 16 16l48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0c-8.8 0-16 7.2-16 16zM160 304c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-256 0c-8.8 0-16 7.2-16 16zm0 96c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-256 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faRectangleAd = {\n  prefix: 'fas',\n  iconName: 'rectangle-ad',\n  icon: [576, 512, [\"ad\"], \"f641\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM229.5 173.3l72 144c5.9 11.9 1.1 26.3-10.7 32.2s-26.3 1.1-32.2-10.7L253.2 328l-90.3 0-5.4 10.7c-5.9 11.9-20.3 16.7-32.2 10.7s-16.7-20.3-10.7-32.2l72-144c4.1-8.1 12.4-13.3 21.5-13.3s17.4 5.1 21.5 13.3zM208 237.7L186.8 280l42.3 0L208 237.7zM392 256a24 24 0 1 0 0 48 24 24 0 1 0 0-48zm24-43.9l0-28.1c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96 0 48c0 13.3-10.7 24-24 24c-6.6 0-12.6-2.7-17-7c-9.4 4.5-19.9 7-31 7c-39.8 0-72-32.2-72-72s32.2-72 72-72c8.4 0 16.5 1.4 24 4.1z\"]\n};\nconst faAd = faRectangleAd;\nconst faCircleArrowRight = {\n  prefix: 'fas',\n  iconName: 'circle-arrow-right',\n  icon: [512, 512, [\"arrow-circle-right\"], \"f0a9\", \"M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM297 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L120 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l214.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L409 239c9.4 9.4 9.4 24.6 0 33.9L297 385z\"]\n};\nconst faArrowCircleRight = faCircleArrowRight;\nconst faFilterCircleXmark = {\n  prefix: 'fas',\n  iconName: 'filter-circle-xmark',\n  icon: [576, 512, [], \"e17b\", \"M3.9 22.9C10.5 8.9 24.5 0 40 0L472 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L396.4 195.6C316.2 212.1 256 283 256 368c0 27.4 6.3 53.4 17.5 76.5c-1.6-.8-3.2-1.8-4.7-2.9l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 65.3C-.7 53.4-2.8 36.8 3.9 22.9zM432 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm59.3 107.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L432 345.4l-36.7-36.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L409.4 368l-36.7 36.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L432 390.6l36.7 36.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L454.6 368l36.7-36.7z\"]\n};\nconst faLocust = {\n  prefix: 'fas',\n  iconName: 'locust',\n  icon: [576, 512, [], \"e520\", \"M312 32c-13.3 0-24 10.7-24 24s10.7 24 24 24l16 0c98.7 0 180.6 71.4 197 165.4c-9-3.5-18.8-5.4-29-5.4l-64.2 0-41.8-97.5c-3.4-7.9-10.8-13.4-19.3-14.4s-17 2.7-22.1 9.6l-40.9 55.5-21.7-50.7c-3.3-7.8-10.5-13.2-18.9-14.3s-16.7 2.3-22 8.9l-240 304c-8.2 10.4-6.4 25.5 4 33.7s25.5 6.4 33.7-4l79.4-100.5 43 16.4-40.5 55c-7.9 10.7-5.6 25.7 5.1 33.6s25.7 5.6 33.6-5.1L215.1 400l74.5 0-29.3 42.3c-7.5 10.9-4.8 25.8 6.1 33.4s25.8 4.8 33.4-6.1L348 400l80.4 0 38.8 67.9c6.6 11.5 21.2 15.5 32.7 8.9s15.5-21.2 8.9-32.7L483.6 400l12.4 0c44.1 0 79.8-35.7 80-79.7c0-.1 0-.2 0-.3l0-40C576 143 465 32 328 32l-16 0zm50.5 168l17.1 40L333 240l29.5-40zm-87.7 38.1l-1.4 1.9-48.2 0 32.7-41.5 16.9 39.5zM88.8 240C57.4 240 32 265.4 32 296.8c0 15.5 6.3 30 16.9 40.4L126.7 240l-37.9 0zM496 288a16 16 0 1 1 0 32 16 16 0 1 1 0-32z\"]\n};\nconst faSort = {\n  prefix: 'fas',\n  iconName: 'sort',\n  icon: [320, 512, [\"unsorted\"], \"f0dc\", \"M137.4 41.4c12.5-12.5 32.8-12.5 45.3 0l128 128c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8L32 224c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9l128-128zm0 429.3l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8l256 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128c-12.5 12.5-32.8 12.5-45.3 0z\"]\n};\nconst faUnsorted = faSort;\nconst faListOl = {\n  prefix: 'fas',\n  iconName: 'list-ol',\n  icon: [512, 512, [\"list-1-2\", \"list-numeric\"], \"f0cb\", \"M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faList12 = faListOl;\nconst faListNumeric = faListOl;\nconst faPersonDressBurst = {\n  prefix: 'fas',\n  iconName: 'person-dress-burst',\n  icon: [640, 512, [], \"e544\", \"M528 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM390.2 384l17.8 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 16 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 17.8 0c10.9 0 18.6-10.7 15.2-21.1L546.7 248.1l33.9 56.3c9.1 15.1 28.8 20 43.9 10.9s20-28.8 10.9-43.9l-53.6-89.2c-20.2-33.7-56.7-54.3-96-54.3l-11.6 0c-39.3 0-75.7 20.6-96 54.3l-53.6 89.2c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9l33.9-56.3L375 362.9c-3.5 10.4 4.3 21.1 15.2 21.1zM190.9 18.1C188.4 12 182.6 8 176 8s-12.4 4-14.9 10.1l-29.4 74L55.6 68.9c-6.3-1.9-13.1 .2-17.2 5.3s-4.6 12.2-1.4 17.9l39.5 69.1L10.9 206.4c-5.4 3.7-8 10.3-6.5 16.7s6.7 11.2 13.1 12.2l78.7 12.2L90.6 327c-.5 6.5 3.1 12.7 9 15.5s12.9 1.8 17.8-2.6L176 286.1l58.6 53.9c4.8 4.4 11.9 5.5 17.8 2.6s9.5-9 9-15.5l-5.6-79.4 50.5-7.8 24.4-40.5-55.2-38L315 92.2c3.3-5.7 2.7-12.8-1.4-17.9s-10.9-7.2-17.2-5.3L220.3 92.1l-29.4-74z\"]\n};\nconst faMoneyCheckDollar = {\n  prefix: 'fas',\n  iconName: 'money-check-dollar',\n  icon: [576, 512, [\"money-check-alt\"], \"f53d\", \"M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zM272 192l224 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zM256 304c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16zM164 152l0 13.9c7.5 1.2 14.6 2.9 21.1 4.7c10.7 2.8 17 13.8 14.2 24.5s-13.8 17-24.5 14.2c-11-2.9-21.6-5-31.2-5.2c-7.9-.1-16 1.8-21.5 5c-4.8 2.8-6.2 5.6-6.2 9.3c0 1.8 .1 3.5 5.3 6.7c6.3 3.8 15.5 6.7 28.3 10.5l.7 .2c11.2 3.4 25.6 7.7 37.1 15c12.9 8.1 24.3 21.3 24.6 41.6c.3 20.9-10.5 36.1-24.8 45c-7.2 4.5-15.2 7.3-23.2 9l0 13.8c0 11-9 20-20 20s-20-9-20-20l0-14.6c-10.3-2.2-20-5.5-28.2-8.4c0 0 0 0 0 0s0 0 0 0c-2.1-.7-4.1-1.4-6.1-2.1c-10.5-3.5-16.1-14.8-12.6-25.3s14.8-16.1 25.3-12.6c2.5 .8 4.9 1.7 7.2 2.4c13.6 4.6 24 8.1 35.1 8.5c8.6 .3 16.5-1.6 21.4-4.7c4.1-2.5 6-5.5 5.9-10.5c0-2.9-.8-5-5.9-8.2c-6.3-4-15.4-6.9-28-10.7l-1.7-.5c-10.9-3.3-24.6-7.4-35.6-14c-12.7-7.7-24.6-20.5-24.7-40.7c-.1-21.1 11.8-35.7 25.8-43.9c6.9-4.1 14.5-6.8 22.2-8.5l0-14c0-11 9-20 20-20s20 9 20 20z\"]\n};\nconst faMoneyCheckAlt = faMoneyCheckDollar;\nconst faVectorSquare = {\n  prefix: 'fas',\n  iconName: 'vector-square',\n  icon: [448, 512, [], \"f5cb\", \"M368 80l32 0 0 32-32 0 0-32zM352 32c-17.7 0-32 14.3-32 32L128 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64l0 64c0 17.7 14.3 32 32 32l0 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l192 0c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l0-192c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zM96 160c17.7 0 32-14.3 32-32l192 0c0 17.7 14.3 32 32 32l0 192c-17.7 0-32 14.3-32 32l-192 0c0-17.7-14.3-32-32-32l0-192zM48 400l32 0 0 32-32 0 0-32zm320 32l0-32 32 0 0 32-32 0zM48 112l0-32 32 0 0 32-32 0z\"]\n};\nconst faBreadSlice = {\n  prefix: 'fas',\n  iconName: 'bread-slice',\n  icon: [512, 512, [], \"f7ec\", \"M256 32C192 32 0 64 0 192c0 35.3 28.7 64 64 64V432c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V256c35.3 0 64-28.7 64-64C512 64 320 32 256 32z\"]\n};\nconst faLanguage = {\n  prefix: 'fas',\n  iconName: 'language',\n  icon: [640, 512, [], \"f1ab\", \"M0 128C0 92.7 28.7 64 64 64l192 0 48 0 16 0 256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64l-256 0-16 0-48 0L64 448c-35.3 0-64-28.7-64-64L0 128zm320 0l0 256 256 0 0-256-256 0zM178.3 175.9c-3.2-7.2-10.4-11.9-18.3-11.9s-15.1 4.7-18.3 11.9l-64 144c-4.5 10.1 .1 21.9 10.2 26.4s21.9-.1 26.4-10.2l8.9-20.1 73.6 0 8.9 20.1c4.5 10.1 16.3 14.6 26.4 10.2s14.6-16.3 10.2-26.4l-64-144zM160 233.2L179 276l-38 0 19-42.8zM448 164c11 0 20 9 20 20l0 4 44 0 16 0c11 0 20 9 20 20s-9 20-20 20l-2 0-1.6 4.5c-8.9 24.4-22.4 46.6-39.6 65.4c.9 .6 1.8 1.1 2.7 1.6l18.9 11.3c9.5 5.7 12.5 18 6.9 27.4s-18 12.5-27.4 6.9l-18.9-11.3c-4.5-2.7-8.8-5.5-13.1-8.5c-10.6 7.5-21.9 14-34 19.4l-3.6 1.6c-10.1 4.5-21.9-.1-26.4-10.2s.1-21.9 10.2-26.4l3.6-1.6c6.4-2.9 12.6-6.1 18.5-9.8l-12.2-12.2c-7.8-7.8-7.8-20.5 0-28.3s20.5-7.8 28.3 0l14.6 14.6 .5 .5c12.4-13.1 22.5-28.3 29.8-45L448 228l-72 0c-11 0-20-9-20-20s9-20 20-20l52 0 0-4c0-11 9-20 20-20z\"]\n};\nconst faFaceKissWinkHeart = {\n  prefix: 'fas',\n  iconName: 'face-kiss-wink-heart',\n  icon: [512, 512, [128536, \"kiss-wink-heart\"], \"f598\", \"M498 339.7c9.1-26.2 14-54.4 14-83.7C512 114.6 397.4 0 256 0S0 114.6 0 256S114.6 512 256 512c35.4 0 69.1-7.2 99.7-20.2c-4.8-5.5-8.5-12.2-10.4-19.7l-22.9-89.3c-10-39 11.8-80.9 51.8-92.1c37.2-10.4 73.8 10.1 87.5 44c12.7-1.6 25.1 .4 36.2 5zM296 332c0 6.9-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4c-2.7 1.5-5.7 3-8.7 4.3c3.1 1.3 6 2.7 8.7 4.3c6.6 3.7 12.5 8.2 16.7 13.4c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4C258.7 443.1 241.4 448 224 448c-3.6 0-6.8-2.5-7.7-6s.6-7.2 3.8-9c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.1c.2-.1 .5-.3 .9-.5c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5-8.6c-2.5-3.5-5.9-6.9-9.6-10.1c-3.7-3.1-7.4-5.7-10.2-7.6c-1.4-.9-2.6-1.6-3.4-2.1l-.6-.4-.3-.2-.2-.1c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.5-1.4-4.1-4.1-4.1-7s1.6-5.6 4.1-7c0 0 0 0 0 0s0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.1c.2-.1 .5-.3 .9-.5c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5-8.6c-2.5-3.5-5.9-6.9-9.6-10.1c-3.7-3.1-7.4-5.7-10.2-7.6c-1.4-.9-2.6-1.6-3.4-2.1c-.4-.2-.7-.4-.9-.5l-.2-.1c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-3.2-1.8-4.7-5.5-3.8-9s4.1-6 7.7-6c17.4 0 34.7 4.9 47.9 12.3c6.6 3.7 12.5 8.2 16.7 13.4c4.3 5.1 7.3 11.4 7.3 18.3zM176.4 176a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm194.8 57.6c-17.6-23.5-52.8-23.5-70.4 0c-5.3 7.1-15.3 8.5-22.4 3.2s-8.5-15.3-3.2-22.4c30.4-40.5 91.2-40.5 121.6 0c5.3 7.1 3.9 17.1-3.2 22.4s-17.1 3.9-22.4-3.2zM434 352.3c-6-23.2-28.8-37-51.1-30.8s-35.4 30.1-29.5 53.4l22.9 89.3c2.2 8.7 11.2 13.9 19.8 11.4l84.9-23.8c22.2-6.2 35.4-30.1 29.5-53.4s-28.8-37-51.1-30.8l-20.2 5.6-5.4-21z\"]\n};\nconst faKissWinkHeart = faFaceKissWinkHeart;\nconst faFilter = {\n  prefix: 'fas',\n  iconName: 'filter',\n  icon: [512, 512, [], \"f0b0\", \"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z\"]\n};\nconst faQuestion = {\n  prefix: 'fas',\n  iconName: 'question',\n  icon: [320, 512, [10067, 10068, 61736], \"3f\", \"M80 160c0-35.3 28.7-64 64-64l32 0c35.3 0 64 28.7 64 64l0 3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74l0 1.4c0 17.7 14.3 32 32 32s32-14.3 32-32l0-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7l0-3.6c0-70.7-57.3-128-128-128l-32 0C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\"]\n};\nconst faFileSignature = {\n  prefix: 'fas',\n  iconName: 'file-signature',\n  icon: [576, 512, [], \"f573\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-19.3c-2.7 1.1-5.4 2-8.2 2.7l-60.1 15c-3 .7-6 1.2-9 1.4c-.9 .1-1.8 .2-2.7 .2l-64 0c-6.1 0-11.6-3.4-14.3-8.8l-8.8-17.7c-1.7-3.4-5.1-5.5-8.8-5.5s-7.2 2.1-8.8 5.5l-8.8 17.7c-2.9 5.9-9.2 9.4-15.7 8.8s-12.1-5.1-13.9-11.3L144 381l-9.8 32.8c-6.1 20.3-24.8 34.2-46 34.2L80 448c-8.8 0-16-7.2-16-16s7.2-16 16-16l8.2 0c7.1 0 13.3-4.6 15.3-11.4l14.9-49.5c3.4-11.3 13.8-19.1 25.6-19.1s22.2 7.8 25.6 19.1l11.6 38.6c7.4-6.2 16.8-9.7 26.8-9.7c15.9 0 30.4 9 37.5 23.2l4.4 8.8 8.9 0c-3.1-8.8-3.7-18.4-1.4-27.8l15-60.1c2.8-11.3 8.6-21.5 16.8-29.7L384 203.6l0-43.6-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM549.8 139.7c-15.6-15.6-40.9-15.6-56.6 0l-29.4 29.4 71 71 29.4-29.4c15.6-15.6 15.6-40.9 0-56.6l-14.4-14.4zM311.9 321c-4.1 4.1-7 9.2-8.4 14.9l-15 60.1c-1.4 5.5 .2 11.2 4.2 15.2s9.7 5.6 15.2 4.2l60.1-15c5.6-1.4 10.8-4.3 14.9-8.4L512.1 262.7l-71-71L311.9 321z\"]\n};\nconst faUpDownLeftRight = {\n  prefix: 'fas',\n  iconName: 'up-down-left-right',\n  icon: [512, 512, [\"arrows-alt\"], \"f0b2\", \"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l32 0 0 96-96 0 0-32c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-32 96 0 0 96-32 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8l-32 0 0-96 96 0 0 32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 32-96 0 0-96 32 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z\"]\n};\nconst faArrowsAlt = faUpDownLeftRight;\nconst faHouseChimneyUser = {\n  prefix: 'fas',\n  iconName: 'house-chimney-user',\n  icon: [576, 512, [], \"e065\", \"M543.8 287.6c17 0 32-14 32-32.1c1-9-3-17-11-24L512 185l0-121c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 36.7L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 160.4c0 35.3 28.7 64 64 64l320.4 0c35.5 0 64.2-28.8 64-64.3l-.7-160.2 32 0zM288 160a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM176 400c0-44.2 35.8-80 80-80l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16z\"]\n};\nconst faHandHoldingHeart = {\n  prefix: 'fas',\n  iconName: 'hand-holding-heart',\n  icon: [576, 512, [], \"f4be\", \"M163.9 136.9c-29.4-29.8-29.4-78.2 0-108s77-29.8 106.4 0l17.7 18 17.7-18c29.4-29.8 77-29.8 106.4 0s29.4 78.2 0 108L310.5 240.1c-6.2 6.3-14.3 9.4-22.5 9.4s-16.3-3.1-22.5-9.4L163.9 136.9zM568.2 336.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 485.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 512 32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 384c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z\"]\n};\nconst faPuzzlePiece = {\n  prefix: 'fas',\n  iconName: 'puzzle-piece',\n  icon: [512, 512, [129513], \"f12e\", \"M192 104.8c0-9.2-5.8-17.3-13.2-22.8C167.2 73.3 160 61.3 160 48c0-26.5 28.7-48 64-48s64 21.5 64 48c0 13.3-7.2 25.3-18.8 34c-7.4 5.5-13.2 13.6-13.2 22.8c0 12.8 10.4 23.2 23.2 23.2l56.8 0c26.5 0 48 21.5 48 48l0 56.8c0 12.8 10.4 23.2 23.2 23.2c9.2 0 17.3-5.8 22.8-13.2c8.7-11.6 20.7-18.8 34-18.8c26.5 0 48 28.7 48 64s-21.5 64-48 64c-13.3 0-25.3-7.2-34-18.8c-5.5-7.4-13.6-13.2-22.8-13.2c-12.8 0-23.2 10.4-23.2 23.2L384 464c0 26.5-21.5 48-48 48l-56.8 0c-12.8 0-23.2-10.4-23.2-23.2c0-9.2 5.8-17.3 13.2-22.8c11.6-8.7 18.8-20.7 18.8-34c0-26.5-28.7-48-64-48s-64 21.5-64 48c0 13.3 7.2 25.3 18.8 34c7.4 5.5 13.2 13.6 13.2 22.8c0 12.8-10.4 23.2-23.2 23.2L48 512c-26.5 0-48-21.5-48-48L0 343.2C0 330.4 10.4 320 23.2 320c9.2 0 17.3 5.8 22.8 13.2C54.7 344.8 66.7 352 80 352c26.5 0 48-28.7 48-64s-21.5-64-48-64c-13.3 0-25.3 7.2-34 18.8C40.5 250.2 32.4 256 23.2 256C10.4 256 0 245.6 0 232.8L0 176c0-26.5 21.5-48 48-48l120.8 0c12.8 0 23.2-10.4 23.2-23.2z\"]\n};\nconst faMoneyCheck = {\n  prefix: 'fas',\n  iconName: 'money-check',\n  icon: [576, 512, [], \"f53c\", \"M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zm48 160l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zM96 336c0-8.8 7.2-16 16-16l352 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-352 0c-8.8 0-16-7.2-16-16zM376 160l80 0c13.3 0 24 10.7 24 24l0 48c0 13.3-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24l0-48c0-13.3 10.7-24 24-24z\"]\n};\nconst faStarHalfStroke = {\n  prefix: 'fas',\n  iconName: 'star-half-stroke',\n  icon: [576, 512, [\"star-half-alt\"], \"f5c0\", \"M288 376.4l.1-.1 26.4 14.1 85.2 45.5-16.5-97.6-4.8-28.7 20.7-20.5 70.1-69.3-96.1-14.2-29.3-4.3-12.9-26.6L288.1 86.9l-.1 .3 0 289.2zm175.1 98.3c2 12-3 24.2-12.9 31.3s-23 8-33.8 2.3L288.1 439.8 159.8 508.3C149 514 135.9 513.1 126 506s-14.9-19.3-12.9-31.3L137.8 329 33.6 225.9c-8.6-8.5-11.7-21.2-7.9-32.7s13.7-19.9 25.7-21.7L195 150.3 259.4 18c5.4-11 16.5-18 28.8-18s23.4 7 28.8 18l64.3 132.3 143.6 21.2c12 1.8 22 10.2 25.7 21.7s.7 24.2-7.9 32.7L438.5 329l24.6 145.7z\"]\n};\nconst faStarHalfAlt = faStarHalfStroke;\nconst faCode = {\n  prefix: 'fas',\n  iconName: 'code',\n  icon: [640, 512, [], \"f121\", \"M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z\"]\n};\nconst faWhiskeyGlass = {\n  prefix: 'fas',\n  iconName: 'whiskey-glass',\n  icon: [512, 512, [129347, \"glass-whiskey\"], \"f7a0\", \"M32 32c-9.3 0-18.1 4-24.2 11.1S-1 59.4 .3 68.6l50 342.9c5.7 39.3 39.4 68.5 79.2 68.5l253 0c39.7 0 73.4-29.1 79.2-68.5l50-342.9c1.3-9.2-1.4-18.5-7.5-25.5S489.3 32 480 32L32 32zM87.7 224L69 96l374 0L424.3 224 87.7 224z\"]\n};\nconst faGlassWhiskey = faWhiskeyGlass;\nconst faBuildingCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'building-circle-exclamation',\n  icon: [640, 512, [], \"e4d3\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c15.1 0 28.5-6.9 37.3-17.8C340.4 462.2 320 417.5 320 368c0-54.7 24.9-103.5 64-135.8L384 48c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faMagnifyingGlassChart = {\n  prefix: 'fas',\n  iconName: 'magnifying-glass-chart',\n  icon: [512, 512, [], \"e522\", \"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zm-312 8l0 64c0 13.3 10.7 24 24 24s24-10.7 24-24l0-64c0-13.3-10.7-24-24-24s-24 10.7-24 24zm80-96l0 160c0 13.3 10.7 24 24 24s24-10.7 24-24l0-160c0-13.3-10.7-24-24-24s-24 10.7-24 24zm80 64l0 96c0 13.3 10.7 24 24 24s24-10.7 24-24l0-96c0-13.3-10.7-24-24-24s-24 10.7-24 24z\"]\n};\nconst faArrowUpRightFromSquare = {\n  prefix: 'fas',\n  iconName: 'arrow-up-right-from-square',\n  icon: [512, 512, [\"external-link\"], \"f08e\", \"M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z\"]\n};\nconst faExternalLink = faArrowUpRightFromSquare;\nconst faCubesStacked = {\n  prefix: 'fas',\n  iconName: 'cubes-stacked',\n  icon: [448, 512, [], \"e4e6\", \"M192 64l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32zM82.7 207c-15.3 8.8-20.5 28.4-11.7 43.7l32 55.4c8.8 15.3 28.4 20.5 43.7 11.7l55.4-32c15.3-8.8 20.5-28.4 11.7-43.7l-32-55.4c-8.8-15.3-28.4-20.5-43.7-11.7L82.7 207zM288 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zm64 160c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zM160 384l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32zM32 352c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0z\"]\n};\nconst faWonSign = {\n  prefix: 'fas',\n  iconName: 'won-sign',\n  icon: [512, 512, [8361, \"krw\", \"won\"], \"f159\", \"M62.4 53.9C56.8 37.1 38.6 28.1 21.9 33.6S-3.9 57.4 1.6 74.1L51.6 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l40.9 0 56.7 170.1c4.5 13.5 17.4 22.4 31.6 21.9s26.4-10.4 29.8-24.2L233 288l46 0L321 455.8c3.4 13.8 15.6 23.7 29.8 24.2s27.1-8.4 31.6-21.9L439.1 288l40.9 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-19.6 0 50-149.9c5.6-16.8-3.5-34.9-20.2-40.5s-34.9 3.5-40.5 20.2L392.9 224l-64 0L287 56.2C283.5 42 270.7 32 256 32s-27.5 10-31 24.2L183 224l-64 0L62.4 53.9zm78 234.1l26.6 0-11.4 45.6L140.4 288zM249 224l7-28.1 7 28.1-14 0zm96 64l26.6 0-15.2 45.6L345 288z\"]\n};\nconst faKrw = faWonSign;\nconst faWon = faWonSign;\nconst faVirusCovid = {\n  prefix: 'fas',\n  iconName: 'virus-covid',\n  icon: [512, 512, [], \"e4a8\", \"M192 24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0 0 33.6c30.7 4.2 58.8 16.3 82.3 34.1L386.1 92 374.8 80.6c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l56.6 56.6c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L420 125.9l-23.8 23.8c17.9 23.5 29.9 51.7 34.1 82.3l33.6 0 0-16c0-13.3 10.7-24 24-24s24 10.7 24 24l0 80c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-16-33.6 0c-4.2 30.7-16.3 58.8-34.1 82.3L420 386.1l11.3-11.3c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-56.6 56.6c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L386.1 420l-23.8-23.8c-23.5 17.9-51.7 29.9-82.3 34.1l0 33.6 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-33.6c-30.7-4.2-58.8-16.3-82.3-34.1L125.9 420l11.3 11.3c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L46.7 408.7c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L92 386.1l23.8-23.8C97.9 338.8 85.8 310.7 81.6 280L48 280l0 16c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-80c0-13.3 10.7-24 24-24s24 10.7 24 24l0 16 33.6 0c4.2-30.7 16.3-58.8 34.1-82.3L92 125.9 80.6 137.2c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l56.6-56.6c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L125.9 92l23.8 23.8c23.5-17.9 51.7-29.9 82.3-34.1L232 48l-16 0c-13.3 0-24-10.7-24-24zm48 200a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm64 104a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faAustralSign = {\n  prefix: 'fas',\n  iconName: 'austral-sign',\n  icon: [448, 512, [], \"e0a9\", \"M253.5 51.7C248.6 39.8 236.9 32 224 32s-24.6 7.8-29.5 19.7L122.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0L82.7 320 32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l24 0L34.5 435.7c-6.8 16.3 .9 35 17.2 41.8s35-.9 41.8-17.2L125.3 384l197.3 0 31.8 76.3c6.8 16.3 25.5 24 41.8 17.2s24-25.5 17.2-41.8L392 384l24 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-50.7 0L352 288l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-90.7 0L253.5 51.7zM256 224l-64 0 32-76.8L256 224zm-90.7 64l117.3 0L296 320l-144 0 13.3-32z\"]\n};\nconst faF = {\n  prefix: 'fas',\n  iconName: 'f',\n  icon: [320, 512, [102], \"46\", \"M64 32C28.7 32 0 60.7 0 96L0 256 0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 224 64 96l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32z\"]\n};\nconst faLeaf = {\n  prefix: 'fas',\n  iconName: 'leaf',\n  icon: [512, 512, [], \"f06c\", \"M272 96c-78.6 0-145.1 51.5-167.7 122.5c33.6-17 71.5-26.5 111.7-26.5l88 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0-72 0s0 0 0 0c-16.6 0-32.7 1.9-48.3 5.4c-25.9 5.9-49.9 16.4-71.4 30.7c0 0 0 0 0 0C38.3 298.8 0 364.9 0 440l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-48.7 20.7-92.5 53.8-123.2C121.6 392.3 190.3 448 272 448l1 0c132.1-.7 239-130.9 239-291.4c0-42.6-7.5-83.1-21.1-119.6c-2.6-6.9-12.7-6.6-16.2-.1C455.9 72.1 418.7 96 376 96L272 96z\"]\n};\nconst faRoad = {\n  prefix: 'fas',\n  iconName: 'road',\n  icon: [576, 512, [128739], \"f018\", \"M256 32l-74.8 0c-27.1 0-51.3 17.1-60.3 42.6L3.1 407.2C1.1 413 0 419.2 0 425.4C0 455.5 24.5 480 54.6 480L256 480l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64 201.4 0c30.2 0 54.6-24.5 54.6-54.6c0-6.2-1.1-12.4-3.1-18.2L455.1 74.6C446 49.1 421.9 32 394.8 32L320 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zm64 192l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32z\"]\n};\nconst faTaxi = {\n  prefix: 'fas',\n  iconName: 'taxi',\n  icon: [512, 512, [128662, \"cab\"], \"f1ba\", \"M192 0c-17.7 0-32 14.3-32 32l0 32 0 .2c-38.6 2.2-72.3 27.3-85.2 64.1L39.6 228.8C16.4 238.4 0 261.3 0 288L0 432l0 48c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-48 320 0 0 48c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-48 0-144c0-26.7-16.4-49.6-39.6-59.2L437.2 128.3c-12.9-36.8-46.6-62-85.2-64.1l0-.2 0-32c0-17.7-14.3-32-32-32L192 0zM165.4 128l181.2 0c13.6 0 25.7 8.6 30.2 21.4L402.9 224l-293.8 0 26.1-74.6c4.5-12.8 16.6-21.4 30.2-21.4zM96 288a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm288 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faCab = faTaxi;\nconst faPersonCirclePlus = {\n  prefix: 'fas',\n  iconName: 'person-circle-plus',\n  icon: [576, 512, [], \"e541\", \"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zM432 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm16 80c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0 0-48z\"]\n};\nconst faChartPie = {\n  prefix: 'fas',\n  iconName: 'chart-pie',\n  icon: [576, 512, [\"pie-chart\"], \"f200\", \"M304 240l0-223.4c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16L304 240zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4L256 288 412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288l238.4 0z\"]\n};\nconst faPieChart = faChartPie;\nconst faBoltLightning = {\n  prefix: 'fas',\n  iconName: 'bolt-lightning',\n  icon: [384, 512, [], \"e0b7\", \"M0 256L28.5 28c2-16 15.6-28 31.8-28H228.9c15 0 27.1 12.1 27.1 27.1c0 3.2-.6 6.5-1.7 9.5L208 160H347.3c20.2 0 36.7 16.4 36.7 36.7c0 7.4-2.2 14.6-6.4 20.7l-192.2 281c-5.9 8.6-15.6 13.7-25.9 13.7h-2.9c-15.7 0-28.5-12.8-28.5-28.5c0-2.3 .3-4.6 .9-6.9L176 288H32c-17.7 0-32-14.3-32-32z\"]\n};\nconst faSackXmark = {\n  prefix: 'fas',\n  iconName: 'sack-xmark',\n  icon: [512, 512, [], \"e56a\", \"M192 96l128 0 47.4-71.1C374.5 14.2 366.9 0 354.1 0L157.9 0c-12.8 0-20.4 14.2-13.3 24.9L192 96zm128 32l-128 0c-3.8 2.5-8.1 5.3-13 8.4c0 0 0 0 0 0s0 0 0 0C122.3 172.7 0 250.9 0 416c0 53 43 96 96 96l320 0c53 0 96-43 96-96c0-165.1-122.3-243.3-179-279.6c-4.8-3.1-9.2-5.9-13-8.4zM289.9 336l47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47z\"]\n};\nconst faFileExcel = {\n  prefix: 'fas',\n  iconName: 'file-excel',\n  icon: [384, 512, [], \"f1c3\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM155.7 250.2L192 302.1l36.3-51.9c7.6-10.9 22.6-13.5 33.4-5.9s13.5 22.6 5.9 33.4L221.3 344l46.4 66.2c7.6 10.9 5 25.8-5.9 33.4s-25.8 5-33.4-5.9L192 385.8l-36.3 51.9c-7.6 10.9-22.6 13.5-33.4 5.9s-13.5-22.6-5.9-33.4L162.7 344l-46.4-66.2c-7.6-10.9-5-25.8 5.9-33.4s25.8-5 33.4 5.9z\"]\n};\nconst faFileContract = {\n  prefix: 'fas',\n  iconName: 'file-contract',\n  icon: [384, 512, [], \"f56c\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM80 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 96c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm54.2 253.8c-6.1 20.3-24.8 34.2-46 34.2L80 416c-8.8 0-16-7.2-16-16s7.2-16 16-16l8.2 0c7.1 0 13.3-4.6 15.3-11.4l14.9-49.5c3.4-11.3 13.8-19.1 25.6-19.1s22.2 7.7 25.6 19.1l11.6 38.6c7.4-6.2 16.8-9.7 26.8-9.7c15.9 0 30.4 9 37.5 23.2l4.4 8.8 54.1 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-6.1 0-11.6-3.4-14.3-8.8l-8.8-17.7c-1.7-3.4-5.1-5.5-8.8-5.5s-7.2 2.1-8.8 5.5l-8.8 17.7c-2.9 5.9-9.2 9.4-15.7 8.8s-12.1-5.1-13.9-11.3L144 349l-9.8 32.8z\"]\n};\nconst faFishFins = {\n  prefix: 'fas',\n  iconName: 'fish-fins',\n  icon: [576, 512, [], \"e4f2\", \"M275.2 38.4c-10.6-8-25-8.5-36.3-1.5S222 57.3 224.6 70.3l9.7 48.6c-19.4 9-36.9 19.9-52.4 31.5c-15.3 11.5-29 23.9-40.7 36.3L48.1 132.4c-12.5-7.3-28.4-5.3-38.6 4.9S-3 163.3 4.2 175.9L50 256 4.2 336.1c-7.2 12.6-5 28.4 5.3 38.6s26.1 12.2 38.6 4.9l93.1-54.3c11.8 12.3 25.4 24.8 40.7 36.3c15.5 11.6 33 22.5 52.4 31.5l-9.7 48.6c-2.6 13 3.1 26.3 14.3 33.3s25.6 6.5 36.3-1.5l77.6-58.2c54.9-4 101.5-27 137.2-53.8c39.2-29.4 67.2-64.7 81.6-89.5c5.8-9.9 5.8-22.2 0-32.1c-14.4-24.8-42.5-60.1-81.6-89.5c-35.8-26.8-82.3-49.8-137.2-53.8L275.2 38.4zM384 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faBuildingFlag = {\n  prefix: 'fas',\n  iconName: 'building-flag',\n  icon: [640, 512, [], \"e4d5\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c26.5 0 48-21.5 48-48l0-416c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM448 0c-17.7 0-32 14.3-32 32l0 480 64 0 0-320 144 0c8.8 0 16-7.2 16-16l0-128c0-8.8-7.2-16-16-16L480 32c0-17.7-14.3-32-32-32z\"]\n};\nconst faFaceGrinBeam = {\n  prefix: 'fas',\n  iconName: 'face-grin-beam',\n  icon: [512, 512, [128516, \"grin-beam\"], \"f582\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM388.1 312.8c12.3-3.8 24.3 6.9 19.3 18.7C382.4 390.6 324.2 432 256.3 432s-126.2-41.4-151.1-100.5c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19zm-170.5-84s0 0 0 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0zm160 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faGrinBeam = faFaceGrinBeam;\nconst faObjectUngroup = {\n  prefix: 'fas',\n  iconName: 'object-ungroup',\n  icon: [640, 512, [], \"f248\", \"M32 119.4C12.9 108.4 0 87.7 0 64C0 28.7 28.7 0 64 0c23.7 0 44.4 12.9 55.4 32l209.1 0C339.6 12.9 360.3 0 384 0c35.3 0 64 28.7 64 64c0 23.7-12.9 44.4-32 55.4l0 113.1c19.1 11.1 32 31.7 32 55.4c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32l-209.1 0c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4l0-113.1zM119.4 96c-5.6 9.7-13.7 17.8-23.4 23.4l0 113.1c9.7 5.6 17.8 13.7 23.4 23.4l209.1 0c5.6-9.7 13.7-17.8 23.4-23.4l0-113.1c-9.7-5.6-17.8-13.7-23.4-23.4L119.4 96zm192 384c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4l0-40.6 64 0 0 40.6c9.7 5.6 17.8 13.7 23.4 23.4l209.1 0c5.6-9.7 13.7-17.8 23.4-23.4l0-113.1c-9.7-5.6-17.8-13.7-23.4-23.4l-46 0c-5.4-15.4-14.6-28.9-26.5-39.6l0-24.4 72.6 0c11.1-19.1 31.7-32 55.4-32c35.3 0 64 28.7 64 64c0 23.7-12.9 44.4-32 55.4l0 113.1c19.1 11.1 32 31.7 32 55.4c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32l-209.1 0z\"]\n};\nconst faPoop = {\n  prefix: 'fas',\n  iconName: 'poop',\n  icon: [512, 512, [], \"f619\", \"M254.4 6.6c3.5-4.3 9-6.5 14.5-5.7C315.8 7.2 352 47.4 352 96c0 11.2-1.9 22-5.5 32l5.5 0c35.3 0 64 28.7 64 64c0 19.1-8.4 36.3-21.7 48l13.7 0c39.8 0 72 32.2 72 72c0 23.2-11 43.8-28 57c34.1 5.7 60 35.3 60 71c0 39.8-32.2 72-72 72L72 512c-39.8 0-72-32.2-72-72c0-35.7 25.9-65.3 60-71c-17-13.2-28-33.8-28-57c0-39.8 32.2-72 72-72l13.7 0C104.4 228.3 96 211.1 96 192c0-35.3 28.7-64 64-64l16.2 0c44.1-.1 79.8-35.9 79.8-80c0-9.2-1.5-17.9-4.3-26.1c-1.8-5.2-.8-11.1 2.8-15.4z\"]\n};\nconst faLocationPin = {\n  prefix: 'fas',\n  iconName: 'location-pin',\n  icon: [384, 512, [\"map-marker\"], \"f041\", \"M384 192c0 87.4-117 243-168.3 307.2c-12.3 15.3-35.1 15.3-47.4 0C117 435 0 279.4 0 192C0 86 86 0 192 0S384 86 384 192z\"]\n};\nconst faMapMarker = faLocationPin;\nconst faKaaba = {\n  prefix: 'fas',\n  iconName: 'kaaba',\n  icon: [576, 512, [128331], \"f66b\", \"M60 120l228 71.2L516 120 288 48.8 60 120zM278.5 1.5c6.2-1.9 12.9-1.9 19.1 0l256 80C566.9 85.6 576 98 576 112l0 16s0 0 0 0l0 21.2L292.8 237.7c-3.1 1-6.4 1-9.5 0L0 149.2 0 128l0-16C0 98 9.1 85.6 22.5 81.5l256-80zm23.9 266.8L576 182.8l0 46.5-52.8 16.5c-8.4 2.6-13.1 11.6-10.5 20s11.6 13.1 20 10.5L576 262.8 576 400c0 14-9.1 26.4-22.5 30.5l-256 80c-6.2 1.9-12.9 1.9-19.1 0l-256-80C9.1 426.4 0 414 0 400L0 262.8l43.2 13.5c8.4 2.6 17.4-2.1 20-10.5s-2.1-17.4-10.5-20L0 229.2l0-46.5 273.7 85.5c9.3 2.9 19.3 2.9 28.6 0zm-185.5-2.6c-8.4-2.6-17.4 2.1-20 10.5s2.1 17.4 10.5 20l64 20c8.4 2.6 17.4-2.1 20-10.5s-2.1-17.4-10.5-20l-64-20zm352 30.5c8.4-2.6 13.1-11.6 10.5-20s-11.6-13.1-20-10.5l-64 20c-8.4 2.6-13.1 11.6-10.5 20s11.6 13.1 20 10.5l64-20zm-224 9.5c-8.4-2.6-17.4 2.1-20 10.5s2.1 17.4 10.5 20l38.5 12c9.3 2.9 19.3 2.9 28.6 0l38.5-12c8.4-2.6 13.1-11.6 10.5-20s-11.6-13.1-20-10.5l-38.5 12c-3.1 1-6.4 1-9.5 0l-38.5-12z\"]\n};\nconst faToiletPaper = {\n  prefix: 'fas',\n  iconName: 'toilet-paper',\n  icon: [640, 512, [129531], \"f71e\", \"M444.2 0C397.2 49.6 384 126.5 384 192c0 158.8-27.3 247-42.7 283.9c-10 24-33.2 36.1-55.4 36.1L48 512c-11.5 0-22.2-6.2-27.8-16.2s-5.6-22.3 .4-32.2c9.8-17.7 15.4-38.2 20.5-57.7C52.3 362.8 64 293.5 64 192C64 86 107 0 160 0L444.2 0zM512 384c-53 0-96-86-96-192S459 0 512 0s96 86 96 192s-43 192-96 192zm0-128c17.7 0 32-28.7 32-64s-14.3-64-32-64s-32 28.7-32 64s14.3 64 32 64zM144 208a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm64 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm48 16a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm80-16a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z\"]\n};\nconst faHelmetSafety = {\n  prefix: 'fas',\n  iconName: 'helmet-safety',\n  icon: [576, 512, [\"hard-hat\", \"hat-hard\"], \"f807\", \"M256 32c-17.7 0-32 14.3-32 32l0 2.3 0 99.6c0 5.6-4.5 10.1-10.1 10.1c-3.6 0-7-1.9-8.8-5.1L157.1 87C83 123.5 32 199.8 32 288l0 64 512 0 0-66.4c-.9-87.2-51.7-162.4-125.1-198.6l-48 83.9c-1.8 3.2-5.2 5.1-8.8 5.1c-5.6 0-10.1-4.5-10.1-10.1l0-99.6 0-2.3c0-17.7-14.3-32-32-32l-64 0zM16.6 384C7.4 384 0 391.4 0 400.6c0 4.7 2 9.2 5.8 11.9C27.5 428.4 111.8 480 288 480s260.5-51.6 282.2-67.5c3.8-2.8 5.8-7.2 5.8-11.9c0-9.2-7.4-16.6-16.6-16.6L16.6 384z\"]\n};\nconst faHardHat = faHelmetSafety;\nconst faHatHard = faHelmetSafety;\nconst faEject = {\n  prefix: 'fas',\n  iconName: 'eject',\n  icon: [448, 512, [9167], \"f052\", \"M224 32c13.5 0 26.3 5.6 35.4 15.6l176 192c12.9 14 16.2 34.3 8.6 51.8S419 320 400 320L48 320c-19 0-36.3-11.2-43.9-28.7s-4.3-37.7 8.6-51.8l176-192C197.7 37.6 210.5 32 224 32zM0 432c0-26.5 21.5-48 48-48l352 0c26.5 0 48 21.5 48 48s-21.5 48-48 48L48 480c-26.5 0-48-21.5-48-48z\"]\n};\nconst faCircleRight = {\n  prefix: 'fas',\n  iconName: 'circle-right',\n  icon: [512, 512, [61838, \"arrow-alt-circle-right\"], \"f35a\", \"M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zm395.3 11.3l-112 112c-4.6 4.6-11.5 5.9-17.4 3.5s-9.9-8.3-9.9-14.8l0-64-96 0c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32l96 0 0-64c0-6.5 3.9-12.3 9.9-14.8s12.9-1.1 17.4 3.5l112 112c6.2 6.2 6.2 16.4 0 22.6z\"]\n};\nconst faArrowAltCircleRight = faCircleRight;\nconst faPlaneCircleCheck = {\n  prefix: 'fas',\n  iconName: 'plane-circle-check',\n  icon: [640, 512, [], \"e555\", \"M256 0c-35 0-64 59.5-64 93.7l0 84.6L8.1 283.4c-5 2.8-8.1 8.2-8.1 13.9l0 65.5c0 10.6 10.2 18.3 20.4 15.4l171.6-49 0 70.9-57.6 43.2c-4 3-6.4 7.8-6.4 12.8l0 42c0 7.8 6.3 14 14 14c1.3 0 2.6-.2 3.9-.5L256 480l110.1 31.5c1.3 .4 2.6 .5 3.9 .5c6 0 11.1-3.7 13.1-9C344.5 470.7 320 422.2 320 368c0-60.6 30.6-114 77.1-145.6L320 178.3l0-84.6C320 59.5 292 0 256 0zM640 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faFaceRollingEyes = {\n  prefix: 'fas',\n  iconName: 'face-rolling-eyes',\n  icon: [512, 512, [128580, \"meh-rolling-eyes\"], \"f5a5\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 368l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm32-144c0 35.3-28.7 64-64 64s-64-28.7-64-64c0-26 15.5-48.4 37.8-58.4c-3.7 5.2-5.8 11.6-5.8 18.4c0 17.7 14.3 32 32 32s32-14.3 32-32c0-6.9-2.2-13.2-5.8-18.4C208.5 175.6 224 198 224 224zm128 64c-35.3 0-64-28.7-64-64c0-26 15.5-48.4 37.8-58.4c-3.7 5.2-5.8 11.6-5.8 18.4c0 17.7 14.3 32 32 32s32-14.3 32-32c0-6.9-2.2-13.2-5.8-18.4C400.5 175.6 416 198 416 224c0 35.3-28.7 64-64 64z\"]\n};\nconst faMehRollingEyes = faFaceRollingEyes;\nconst faObjectGroup = {\n  prefix: 'fas',\n  iconName: 'object-group',\n  icon: [576, 512, [], \"f247\", \"M32 119.4C12.9 108.4 0 87.7 0 64C0 28.7 28.7 0 64 0c23.7 0 44.4 12.9 55.4 32l337.1 0C467.6 12.9 488.3 0 512 0c35.3 0 64 28.7 64 64c0 23.7-12.9 44.4-32 55.4l0 273.1c19.1 11.1 32 31.7 32 55.4c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32l-337.1 0c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4l0-273.1zM456.6 96L119.4 96c-5.6 9.7-13.7 17.8-23.4 23.4l0 273.1c9.7 5.6 17.8 13.7 23.4 23.4l337.1 0c5.6-9.7 13.7-17.8 23.4-23.4l0-273.1c-9.7-5.6-17.8-13.7-23.4-23.4zM128 160c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-96zM256 320l32 0c35.3 0 64-28.7 64-64l0-32 64 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-32z\"]\n};\nconst faChartLine = {\n  prefix: 'fas',\n  iconName: 'chart-line',\n  icon: [512, 512, [\"line-chart\"], \"f201\", \"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\"]\n};\nconst faLineChart = faChartLine;\nconst faMaskVentilator = {\n  prefix: 'fas',\n  iconName: 'mask-ventilator',\n  icon: [640, 512, [], \"e524\", \"M159.1 176C139.4 219.2 128 264.7 128 300.8c0 15.9 2.2 31.4 6.3 46l-31.8-7.9C70.5 330.9 48 302.1 48 269l0-85c0-4.4 3.6-8 8-8l103.1 0zm26-48L56 128c-30.9 0-56 25.1-56 56l0 85c0 55.1 37.5 103.1 90.9 116.4l71.3 17.8c22.7 30.5 55.4 54.1 93.8 66.6l0-76.6c-19.7-16.4-32-40.3-32-66.9c0-49.5 43-134.4 96-134.4c52.5 0 96 84.9 96 134.4c0 26.7-12.4 50.4-32 66.8l0 76.6c38-12.6 70.6-36 93.5-66.4l71.6-17.9C602.5 372.1 640 324.1 640 269l0-85c0-30.9-25.1-56-56-56l-129.5 0C419.7 73.8 372.1 32 320 32c-52.6 0-100.2 41.8-134.9 96zm295.6 48L584 176c4.4 0 8 3.6 8 8l0 85c0 33-22.5 61.8-54.5 69.9l-31.8 8c4.2-14.7 6.4-30.1 6.4-46.1c0-36.1-11.6-81.6-31.3-124.8zM288 320l0 192 64 0 0-192c0-17.7-14.3-32-32-32s-32 14.3-32 32z\"]\n};\nconst faArrowRight = {\n  prefix: 'fas',\n  iconName: 'arrow-right',\n  icon: [448, 512, [8594], \"f061\", \"M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z\"]\n};\nconst faSignsPost = {\n  prefix: 'fas',\n  iconName: 'signs-post',\n  icon: [512, 512, [\"map-signs\"], \"f277\", \"M224 32L64 32C46.3 32 32 46.3 32 64l0 64c0 17.7 14.3 32 32 32l377.4 0c4.2 0 8.3-1.7 11.3-4.7l48-48c6.2-6.2 6.2-16.4 0-22.6l-48-48c-3-3-7.1-4.7-11.3-4.7L288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32zM480 256c0-17.7-14.3-32-32-32l-160 0 0-32-64 0 0 32L70.6 224c-4.2 0-8.3 1.7-11.3 4.7l-48 48c-6.2 6.2-6.2 16.4 0 22.6l48 48c3 3 7.1 4.7 11.3 4.7L448 352c17.7 0 32-14.3 32-32l0-64zM288 480l0-96-64 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32z\"]\n};\nconst faMapSigns = faSignsPost;\nconst faCashRegister = {\n  prefix: 'fas',\n  iconName: 'cash-register',\n  icon: [512, 512, [], \"f788\", \"M64 0C46.3 0 32 14.3 32 32l0 64c0 17.7 14.3 32 32 32l80 0 0 32-57 0c-31.6 0-58.5 23.1-63.3 54.4L1.1 364.1C.4 368.8 0 373.6 0 378.4L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-69.6c0-4.8-.4-9.6-1.1-14.4L488.2 214.4C483.5 183.1 456.6 160 425 160l-217 0 0-32 80 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L64 0zM96 48l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L96 80c-8.8 0-16-7.2-16-16s7.2-16 16-16zM64 432c0-8.8 7.2-16 16-16l352 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16zm48-168a24 24 0 1 1 0-48 24 24 0 1 1 0 48zm120-24a24 24 0 1 1 -48 0 24 24 0 1 1 48 0zM160 344a24 24 0 1 1 0-48 24 24 0 1 1 0 48zM328 240a24 24 0 1 1 -48 0 24 24 0 1 1 48 0zM256 344a24 24 0 1 1 0-48 24 24 0 1 1 0 48zM424 240a24 24 0 1 1 -48 0 24 24 0 1 1 48 0zM352 344a24 24 0 1 1 0-48 24 24 0 1 1 0 48z\"]\n};\nconst faPersonCircleQuestion = {\n  prefix: 'fas',\n  iconName: 'person-circle-question',\n  icon: [576, 512, [], \"e542\", \"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zM432 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 240a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM368 321.6l0 6.4c0 8.8 7.2 16 16 16s16-7.2 16-16l0-6.4c0-5.3 4.3-9.6 9.6-9.6l40.5 0c7.7 0 13.9 6.2 13.9 13.9c0 5.2-2.9 9.9-7.4 12.3l-32 16.8c-5.3 2.8-8.6 8.2-8.6 14.2l0 14.8c0 8.8 7.2 16 16 16s16-7.2 16-16l0-5.1 23.5-12.3c15.1-7.9 24.5-23.6 24.5-40.6c0-25.4-20.6-45.9-45.9-45.9l-40.5 0c-23 0-41.6 18.6-41.6 41.6z\"]\n};\nconst faH = {\n  prefix: 'fas',\n  iconName: 'h',\n  icon: [384, 512, [104], \"48\", \"M320 256l0 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-224 0-160c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 128L64 192 64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-192 256 0z\"]\n};\nconst faTarp = {\n  prefix: 'fas',\n  iconName: 'tarp',\n  icon: [576, 512, [], \"e57b\", \"M576 128c0-35.3-28.7-64-64-64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l352 0 0-128c0-17.7 14.3-32 32-32l128 0 0-160zM448 448L576 320l-128 0 0 128zM96 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faScrewdriverWrench = {\n  prefix: 'fas',\n  iconName: 'screwdriver-wrench',\n  icon: [512, 512, [\"tools\"], \"f7d9\", \"M78.6 5C69.1-2.4 55.6-1.5 47 7L7 47c-8.5 8.5-9.4 22-2.1 31.6l80 104c4.5 5.9 11.6 9.4 19 9.4l54.1 0 109 109c-14.7 29-10 65.4 14.3 89.6l112 112c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-112-112c-24.2-24.2-60.6-29-89.6-14.3l-109-109 0-54.1c0-7.5-3.5-14.5-9.4-19L78.6 5zM19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L233.7 374.3c-7.8-20.9-9-43.6-3.6-65.1l-61.7-61.7L19.9 396.1zM512 144c0-10.5-1.1-20.7-3.2-30.5c-2.4-11.2-16.1-14.1-24.2-6l-63.9 63.9c-3 3-7.1 4.7-11.3 4.7L352 176c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l63.9-63.9c8.1-8.1 5.2-21.8-6-24.2C388.7 1.1 378.5 0 368 0C288.5 0 224 64.5 224 144l0 .8 85.3 85.3c36-9.1 75.8 .5 104 28.7L429 274.5c49-23 83-72.8 83-130.5zM56 432a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faTools = faScrewdriverWrench;\nconst faArrowsToEye = {\n  prefix: 'fas',\n  iconName: 'arrows-to-eye',\n  icon: [640, 512, [], \"e4bf\", \"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z\"]\n};\nconst faPlugCircleBolt = {\n  prefix: 'fas',\n  iconName: 'plug-circle-bolt',\n  icon: [576, 512, [], \"e55b\", \"M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z\"]\n};\nconst faHeart = {\n  prefix: 'fas',\n  iconName: 'heart',\n  icon: [512, 512, [128153, 128154, 128155, 128156, 128420, 129293, 129294, 129505, 9829, 10084, 61578], \"f004\", \"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z\"]\n};\nconst faMarsAndVenus = {\n  prefix: 'fas',\n  iconName: 'mars-and-venus',\n  icon: [512, 512, [9893], \"f224\", \"M337.8 14.8C341.5 5.8 350.3 0 360 0L472 0c13.3 0 24 10.7 24 24l0 112c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-24.7 24.7C407 163.3 416 192.6 416 224c0 80.2-59 146.6-136 158.2l0 25.8 24 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-24 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-25.8C155 370.6 96 304.2 96 224c0-88.4 71.6-160 160-160c39.6 0 75.9 14.4 103.8 38.2L382.1 80 343 41c-6.9-6.9-8.9-17.2-5.2-26.2zM448 48s0 0 0 0s0 0 0 0s0 0 0 0zM352 224a96 96 0 1 0 -192 0 96 96 0 1 0 192 0z\"]\n};\nconst faHouseUser = {\n  prefix: 'fas',\n  iconName: 'house-user',\n  icon: [576, 512, [\"home-user\"], \"e1b0\", \"M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c.2 35.5-28.5 64.3-64 64.3l-320.4 0c-35.3 0-64-28.7-64-64l0-160.4-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24zM352 224a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm-96 96c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0z\"]\n};\nconst faHomeUser = faHouseUser;\nconst faDumpsterFire = {\n  prefix: 'fas',\n  iconName: 'dumpster-fire',\n  icon: [640, 512, [], \"f794\", \"M49.7 32l90.8 0L114.9 160l-94 0C9.3 160 0 150.7 0 139.1c0-2.1 .3-4.1 .9-6.1L26.8 48.9C29.9 38.9 39.2 32 49.7 32zM272 160l-124.5 0L173.1 32 272 32l0 128zm32 0l0-128 98.9 0 14.4 72.1c-1.7 1.1-3.3 2.4-4.8 3.8c-18.4 16.4-35.4 34-50.5 52.1l-58 0zm209.9-23.7c-1.7 1.6-3.4 3.2-5 4.8C498 129.6 486.7 118.6 475 108c-7.6-6.9-17-10.8-26.6-11.8L435.5 32l90.8 0c10.5 0 19.8 6.9 22.9 16.9L575.1 133c.2 .7 .4 1.4 .5 2.1c-17.8-15-44.3-14.6-61.7 1.2zM325.2 210.7C304.3 244.5 288 282.9 288 318.1c0 49.3 18.6 95.2 49.6 129.9L128 448c0 17.7-14.3 32-32 32s-32-14.3-32-32L44 288l-12 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l4 0-4-32 305.5 0c-4.4 6.2-8.5 12.5-12.3 18.7zm180.6-34.5L518 162.5c5.4-6.1 13.3-8.8 20.9-8.9c7.2 0 14.3 2.6 19.9 7.8c19.7 18.3 39.8 43.2 55 70.6C629 259.2 640 290.2 640 320.2C640 408.8 568.7 480 480 480c-89.6 0-160-71.3-160-159.8c0-37.3 16-73.4 36.8-104.5c20.9-31.3 47.5-59 70.9-80.2c5.7-5.2 13.1-7.7 20.3-7.5c14.1 .3 23.8 11.4 32.7 21.6c0 0 0 0 0 0c2 2.3 4 4.6 6 6.7l19 19.9zM544 368.2c0-36.5-37-73-54.8-88.4c-5.4-4.7-13.1-4.7-18.5 0C453 295.1 416 331.6 416 368.2c0 35.3 28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faHouseCrack = {\n  prefix: 'fas',\n  iconName: 'house-crack',\n  icon: [576, 512, [], \"e3b1\", \"M543.8 287.6c17 0 32-14 32-32.1c1-9-3-17-11-24L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 160.4c0 35.3 28.7 64 64 64l102.3 0-31.3-52.2c-4.1-6.8-2.6-15.5 3.5-20.5L288 368l-60.2-82.8c-10.9-15 8.2-33.5 22.8-22l117.9 92.6c8 6.3 8.2 18.4 .4 24.9L288 448l38.4 64 122.1 0c35.5 0 64.2-28.8 64-64.3l-.7-160.2 32 0z\"]\n};\nconst faMartiniGlassCitrus = {\n  prefix: 'fas',\n  iconName: 'martini-glass-citrus',\n  icon: [576, 512, [\"cocktail\"], \"f561\", \"M432 240c53 0 96-43 96-96s-43-96-96-96c-35.5 0-66.6 19.3-83.2 48l-52.6 0C316 40.1 369.3 0 432 0c79.5 0 144 64.5 144 144s-64.5 144-144 144c-27.7 0-53.5-7.8-75.5-21.3l35.4-35.4c12.2 5.6 25.8 8.7 40.1 8.7zM1.8 142.8C5.5 133.8 14.3 128 24 128l368 0c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-177 177L232 464l64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0-88 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-118.1L7 169c-6.9-6.9-8.9-17.2-5.2-26.2z\"]\n};\nconst faCocktail = faMartiniGlassCitrus;\nconst faFaceSurprise = {\n  prefix: 'fas',\n  iconName: 'face-surprise',\n  icon: [512, 512, [128558, \"surprise\"], \"f5c2\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM176.4 176a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM256 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\"]\n};\nconst faSurprise = faFaceSurprise;\nconst faBottleWater = {\n  prefix: 'fas',\n  iconName: 'bottle-water',\n  icon: [320, 512, [], \"e4c5\", \"M120 0l80 0c13.3 0 24 10.7 24 24l0 40L96 64l0-40c0-13.3 10.7-24 24-24zM32 167.5c0-19.5 10-37.6 26.6-47.9l15.8-9.9C88.7 100.7 105.2 96 122.1 96l75.8 0c16.9 0 33.4 4.7 47.7 13.7l15.8 9.9C278 129.9 288 148 288 167.5c0 17-7.5 32.3-19.4 42.6C280.6 221.7 288 238 288 256c0 19.1-8.4 36.3-21.7 48c13.3 11.7 21.7 28.9 21.7 48s-8.4 36.3-21.7 48c13.3 11.7 21.7 28.9 21.7 48c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64c0-19.1 8.4-36.3 21.7-48C40.4 388.3 32 371.1 32 352s8.4-36.3 21.7-48C40.4 292.3 32 275.1 32 256c0-18 7.4-34.3 19.4-45.9C39.5 199.7 32 184.5 32 167.5zM96 240c0 8.8 7.2 16 16 16l96 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-96 0c-8.8 0-16 7.2-16 16zm16 112c-8.8 0-16 7.2-16 16s7.2 16 16 16l96 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-96 0z\"]\n};\nconst faCirclePause = {\n  prefix: 'fas',\n  iconName: 'circle-pause',\n  icon: [512, 512, [62092, \"pause-circle\"], \"f28b\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM224 192l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32z\"]\n};\nconst faPauseCircle = faCirclePause;\nconst faToiletPaperSlash = {\n  prefix: 'fas',\n  iconName: 'toilet-paper-slash',\n  icon: [640, 512, [], \"e072\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-109.7-86C569.9 374 608 291.9 608 192C608 86 565 0 512 0s-96 86-96 192c0 49.1 9.2 93.9 24.4 127.9l-59-46.2c1.6-24.8 2.6-52 2.6-81.6c0-65.5 13.2-142.4 60.2-192L160 0c-24.8 0-47.4 18.8-64.4 49.6L38.8 5.1zM367.3 385.4L66.5 148.4C64.9 162.4 64 177 64 192c0 101.5-11.7 170.8-23 213.9c-5.1 19.4-10.7 39.9-20.5 57.7c-5.9 9.9-6.1 22.1-.4 32.2S36.5 512 48 512l237.9 0c22.3 0 45.4-12.1 55.4-36.1c7.4-17.7 17.5-47.2 26-90.6zM544 192c0 35.3-14.3 64-32 64s-32-28.7-32-64s14.3-64 32-64s32 28.7 32 64z\"]\n};\nconst faAppleWhole = {\n  prefix: 'fas',\n  iconName: 'apple-whole',\n  icon: [448, 512, [127822, 127823, \"apple-alt\"], \"f5d1\", \"M224 112c-8.8 0-16-7.2-16-16l0-16c0-44.2 35.8-80 80-80l16 0c8.8 0 16 7.2 16 16l0 16c0 44.2-35.8 80-80 80l-16 0zM0 288c0-76.3 35.7-160 112-160c27.3 0 59.7 10.3 82.7 19.3c18.8 7.3 39.9 7.3 58.7 0c22.9-8.9 55.4-19.3 82.7-19.3c76.3 0 112 83.7 112 160c0 128-80 224-160 224c-16.5 0-38.1-6.6-51.5-11.3c-8.1-2.8-16.9-2.8-25 0c-13.4 4.7-35 11.3-51.5 11.3C80 512 0 416 0 288z\"]\n};\nconst faAppleAlt = faAppleWhole;\nconst faKitchenSet = {\n  prefix: 'fas',\n  iconName: 'kitchen-set',\n  icon: [576, 512, [], \"e51a\", \"M240 144A96 96 0 1 0 48 144a96 96 0 1 0 192 0zm44.4 32C269.9 240.1 212.5 288 144 288C64.5 288 0 223.5 0 144S64.5 0 144 0c68.5 0 125.9 47.9 140.4 112l71.8 0c8.8-9.8 21.6-16 35.8-16l104 0c26.5 0 48 21.5 48 48s-21.5 48-48 48l-104 0c-14.2 0-27-6.2-35.8-16l-71.8 0zM144 80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM400 240c13.3 0 24 10.7 24 24l0 8 96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-240 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0 0-8c0-13.3 10.7-24 24-24zM288 464l0-112 224 0 0 112c0 26.5-21.5 48-48 48l-128 0c-26.5 0-48-21.5-48-48zM48 320l80 0 16 0 32 0c26.5 0 48 21.5 48 48s-21.5 48-48 48l-16 0c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-80c0-8.8 7.2-16 16-16zm128 64c8.8 0 16-7.2 16-16s-7.2-16-16-16l-16 0 0 32 16 0zM24 464l176 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faR = {\n  prefix: 'fas',\n  iconName: 'r',\n  icon: [320, 512, [114], \"52\", \"M64 32C28.7 32 0 60.7 0 96L0 288 0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 95.3 0L261.8 466.4c10.1 14.5 30.1 18 44.6 7.9s18-30.1 7.9-44.6L230.1 309.5C282.8 288.1 320 236.4 320 176c0-79.5-64.5-144-144-144L64 32zM176 256L64 256 64 96l112 0c44.2 0 80 35.8 80 80s-35.8 80-80 80z\"]\n};\nconst faTemperatureQuarter = {\n  prefix: 'fas',\n  iconName: 'temperature-quarter',\n  icon: [320, 512, [\"temperature-1\", \"thermometer-1\", \"thermometer-quarter\"], \"f2ca\", \"M160 64c-26.5 0-48 21.5-48 48l0 164.5c0 17.3-7.1 31.9-15.3 42.5C86.2 332.6 80 349.5 80 368c0 44.2 35.8 80 80 80s80-35.8 80-80c0-18.5-6.2-35.4-16.7-48.9c-8.2-10.6-15.3-25.2-15.3-42.5L208 112c0-26.5-21.5-48-48-48zM48 112C48 50.2 98.1 0 160 0s112 50.1 112 112l0 164.4c0 .1 .1 .3 .2 .6c.2 .6 .8 1.6 1.7 2.8c18.9 24.4 30.1 55 30.1 88.1c0 79.5-64.5 144-144 144S16 447.5 16 368c0-33.2 11.2-63.8 30.1-88.1c.9-1.2 1.5-2.2 1.7-2.8c.1-.3 .2-.5 .2-.6L48 112zM208 368c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-20.9 13.4-38.7 32-45.3l0-50.7c0-8.8 7.2-16 16-16s16 7.2 16 16l0 50.7c18.6 6.6 32 24.4 32 45.3z\"]\n};\nconst faTemperature1 = faTemperatureQuarter;\nconst faThermometer1 = faTemperatureQuarter;\nconst faThermometerQuarter = faTemperatureQuarter;\nconst faCube = {\n  prefix: 'fas',\n  iconName: 'cube',\n  icon: [512, 512, [], \"f1b2\", \"M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6l0 242.9c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4L0 134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1 0-188L288 246.6l0 188z\"]\n};\nconst faBitcoinSign = {\n  prefix: 'fas',\n  iconName: 'bitcoin-sign',\n  icon: [320, 512, [], \"e0b4\", \"M48 32C48 14.3 62.3 0 80 0s32 14.3 32 32l0 32 32 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32c0 1.5-.1 3.1-.3 4.5C254.1 82.2 288 125.1 288 176c0 24.2-7.7 46.6-20.7 64.9c31.7 19.8 52.7 55 52.7 95.1c0 61.9-50.1 112-112 112l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-6.3 0C18.7 448 0 429.3 0 406.3L0 288l0-22.3L0 224 0 101.6C0 80.8 16.8 64 37.6 64L48 64l0-32zM64 224l112 0c26.5 0 48-21.5 48-48s-21.5-48-48-48L64 128l0 96zm112 64L64 288l0 96 144 0c26.5 0 48-21.5 48-48s-21.5-48-48-48l-32 0z\"]\n};\nconst faShieldDog = {\n  prefix: 'fas',\n  iconName: 'shield-dog',\n  icon: [512, 512, [], \"e573\", \"M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM160.9 286.2c4.8 1.2 9.9 1.8 15.1 1.8c35.3 0 64-28.7 64-64l0-64 44.2 0c12.1 0 23.2 6.8 28.6 17.7L320 192l64 0c8.8 0 16 7.2 16 16l0 32c0 44.2-35.8 80-80 80l-48 0 0 50.7c0 7.3-5.9 13.3-13.3 13.3c-1.8 0-3.6-.4-5.2-1.1l-98.7-42.3c-6.6-2.8-10.8-9.3-10.8-16.4c0-2.8 .6-5.5 1.9-8l15-30zM160 160l40 0 8 0 0 32 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-48c0-8.8 7.2-16 16-16zm128 48a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z\"]\n};\nconst faSolarPanel = {\n  prefix: 'fas',\n  iconName: 'solar-panel',\n  icon: [640, 512, [], \"f5ba\", \"M122.2 0C91.7 0 65.5 21.5 59.5 51.4L8.3 307.4C.4 347 30.6 384 71 384l217 0 0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64 217 0c40.4 0 70.7-36.9 62.8-76.6l-51.2-256C574.5 21.5 548.3 0 517.8 0L122.2 0zM260.9 64l118.2 0 10.4 104-139 0L260.9 64zM202.3 168l-100.8 0L122.2 64l90.4 0L202.3 168zM91.8 216l105.6 0L187.1 320 71 320 91.8 216zm153.9 0l148.6 0 10.4 104-169.4 0 10.4-104zm196.8 0l105.6 0L569 320l-116 0L442.5 216zm96-48l-100.8 0L427.3 64l90.4 0 31.4-6.3L517.8 64l20.8 104z\"]\n};\nconst faLockOpen = {\n  prefix: 'fas',\n  iconName: 'lock-open',\n  icon: [576, 512, [], \"f3c1\", \"M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z\"]\n};\nconst faElevator = {\n  prefix: 'fas',\n  iconName: 'elevator',\n  icon: [512, 512, [], \"e16d\", \"M132.7 4.7l-64 64c-4.6 4.6-5.9 11.5-3.5 17.4s8.3 9.9 14.8 9.9l128 0c6.5 0 12.3-3.9 14.8-9.9s1.1-12.9-3.5-17.4l-64-64c-6.2-6.2-16.4-6.2-22.6 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 128zm96 96a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM80 400c0-26.5 21.5-48 48-48l64 0c26.5 0 48 21.5 48 48l0 16c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-16zm192 0c0-26.5 21.5-48 48-48l64 0c26.5 0 48 21.5 48 48l0 16c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-16zm32-128a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM356.7 91.3c6.2 6.2 16.4 6.2 22.6 0l64-64c4.6-4.6 5.9-11.5 3.5-17.4S438.5 0 432 0L304 0c-6.5 0-12.3 3.9-14.8 9.9s-1.1 12.9 3.5 17.4l64 64z\"]\n};\nconst faMoneyBillTransfer = {\n  prefix: 'fas',\n  iconName: 'money-bill-transfer',\n  icon: [640, 512, [], \"e528\", \"M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64l241.9 0c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5 608 384c0 35.3-28.7 64-64 64l-241.9 0c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5 32 128c0-35.3 28.7-64 64-64zm64 64l-64 0 0 64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64l64 0 0-64zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z\"]\n};\nconst faMoneyBillTrendUp = {\n  prefix: 'fas',\n  iconName: 'money-bill-trend-up',\n  icon: [512, 512, [], \"e529\", \"M470.7 9.4c3 3.1 5.3 6.6 6.9 10.3s2.4 7.8 2.4 12.2c0 0 0 .1 0 .1c0 0 0 0 0 0l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.7L310.6 214.6c-11.8 11.8-30.8 12.6-43.5 1.7L176 138.1 84.8 216.3c-13.4 11.5-33.6 9.9-45.1-3.5s-9.9-33.6 3.5-45.1l112-96c12-10.3 29.7-10.3 41.7 0l89.5 76.7L370.7 64 352 64c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0s0 0 0 0c8.8 0 16.8 3.6 22.6 9.3l.1 .1zM0 304c0-26.5 21.5-48 48-48l416 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 304zM48 416l0 48 48 0c0-26.5-21.5-48-48-48zM96 304l-48 0 0 48c26.5 0 48-21.5 48-48zM464 416c-26.5 0-48 21.5-48 48l48 0 0-48zM416 304c0 26.5 21.5 48 48 48l0-48-48 0zm-96 80a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z\"]\n};\nconst faHouseFloodWaterCircleArrowRight = {\n  prefix: 'fas',\n  iconName: 'house-flood-water-circle-arrow-right',\n  icon: [640, 512, [], \"e50f\", \"M288 144A144 144 0 1 0 0 144a144 144 0 1 0 288 0zM140.7 76.7c6.2-6.2 16.4-6.2 22.6 0l56 56c6.2 6.2 6.2 16.4 0 22.6l-56 56c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L169.4 160 80 160c-8.8 0-16-7.2-16-16s7.2-16 16-16l89.4 0L140.7 99.3c-6.2-6.2-6.2-16.4 0-22.6zM320 144c0 57.3-27.4 108.2-69.8 140.3c11.8-3.6 23-9.4 33-16.2c22.1-15.5 51.6-15.5 73.7 0c18.4 12.7 39.6 20.3 59.2 20.3c19 0 41.2-7.9 59.2-20.3c23.8-16.7 55.8-15.4 78.1 3.4c2.1 1.7 4.2 3.3 6.5 4.9l-.3-84.4 16.6 0c13.9 0 26.1-8.9 30.4-22.1s-.4-27.6-11.6-35.8l-176-128C407.6-2 392.4-2 381.2 6.1L301 64.4c12.1 23.9 19 50.9 19 79.6zm18.5 165.9c-11.1-7.9-25.9-7.9-37 0C279 325.4 251.5 336 224 336c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C158.5 389.7 191 400 224 400c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.6 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.5-27.3-10.1-39.2-1.7c0 0 0 0 0 0C471.4 325.2 442.9 336 416 336c-27.5 0-55-10.6-77.5-26.1zm0 112c-11.1-7.9-25.9-7.9-37 0C279 437.4 251.5 448 224 448c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C158.5 501.7 191 512 224 512c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.6 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.4-27.3-10.1-39.2-1.7c0 0 0 0 0 0C471.4 437.2 442.9 448 416 448c-27.5 0-55-10.6-77.5-26.1z\"]\n};\nconst faSquarePollHorizontal = {\n  prefix: 'fas',\n  iconName: 'square-poll-horizontal',\n  icon: [448, 512, [\"poll-h\"], \"f682\", \"M448 96c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320zM256 160c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32zm64 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l192 0zM192 352c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32z\"]\n};\nconst faPollH = faSquarePollHorizontal;\nconst faCircle = {\n  prefix: 'fas',\n  iconName: 'circle',\n  icon: [512, 512, [128308, 128309, 128992, 128993, 128994, 128995, 128996, 9679, 9898, 9899, 11044, 61708, 61915], \"f111\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z\"]\n};\nconst faBackwardFast = {\n  prefix: 'fas',\n  iconName: 'backward-fast',\n  icon: [512, 512, [9198, \"fast-backward\"], \"f049\", \"M493.6 445c-11.2 5.3-24.5 3.6-34.1-4.4L288 297.7 288 416c0 12.4-7.2 23.7-18.4 29s-24.5 3.6-34.1-4.4L64 297.7 64 416c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 96C0 78.3 14.3 64 32 64s32 14.3 32 32l0 118.3L235.5 71.4c9.5-7.9 22.8-9.7 34.1-4.4S288 83.6 288 96l0 118.3L459.5 71.4c9.5-7.9 22.8-9.7 34.1-4.4S512 83.6 512 96l0 320c0 12.4-7.2 23.7-18.4 29z\"]\n};\nconst faFastBackward = faBackwardFast;\nconst faRecycle = {\n  prefix: 'fas',\n  iconName: 'recycle',\n  icon: [512, 512, [9842, 9850, 9851], \"f1b8\", \"M174.7 45.1C192.2 17 223 0 256 0s63.8 17 81.3 45.1l38.6 61.7 27-15.6c8.4-4.9 18.9-4.2 26.6 1.7s11.1 15.9 8.6 25.3l-23.4 87.4c-3.4 12.8-16.6 20.4-29.4 17l-87.4-23.4c-9.4-2.5-16.3-10.4-17.6-20s3.4-19.1 11.8-23.9l28.4-16.4L283 79c-5.8-9.3-16-15-27-15s-21.2 5.7-27 15l-17.5 28c-9.2 14.8-28.6 19.5-43.6 10.5c-15.3-9.2-20.2-29.2-10.7-44.4l17.5-28zM429.5 251.9c15-9 34.4-4.3 43.6 10.5l24.4 39.1c9.4 15.1 14.4 32.4 14.6 50.2c.3 53.1-42.7 96.4-95.8 96.4L320 448l0 32c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-64-64c-9.4-9.4-9.4-24.6 0-33.9l64-64c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 32 96.2 0c17.6 0 31.9-14.4 31.8-32c0-5.9-1.7-11.7-4.8-16.7l-24.4-39.1c-9.5-15.2-4.7-35.2 10.7-44.4zm-364.6-31L36 204.2c-8.4-4.9-13.1-14.3-11.8-23.9s8.2-17.5 17.6-20l87.4-23.4c12.8-3.4 26 4.2 29.4 17L182 241.2c2.5 9.4-.9 19.3-8.6 25.3s-18.2 6.6-26.6 1.7l-26.5-15.3L68.8 335.3c-3.1 5-4.8 10.8-4.8 16.7c-.1 17.6 14.2 32 31.8 32l32.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32.2 0C42.7 448-.3 404.8 0 351.6c.1-17.8 5.1-35.1 14.6-50.2l50.3-80.5z\"]\n};\nconst faUserAstronaut = {\n  prefix: 'fas',\n  iconName: 'user-astronaut',\n  icon: [448, 512, [], \"f4fb\", \"M370.7 96.1C346.1 39.5 289.7 0 224 0S101.9 39.5 77.3 96.1C60.9 97.5 48 111.2 48 128l0 64c0 16.8 12.9 30.5 29.3 31.9C101.9 280.5 158.3 320 224 320s122.1-39.5 146.7-96.1c16.4-1.4 29.3-15.1 29.3-31.9l0-64c0-16.8-12.9-30.5-29.3-31.9zM336 144l0 16c0 53-43 96-96 96l-32 0c-53 0-96-43-96-96l0-16c0-26.5 21.5-48 48-48l128 0c26.5 0 48 21.5 48 48zM189.3 162.7l-6-21.2c-.9-3.3-3.9-5.5-7.3-5.5s-6.4 2.2-7.3 5.5l-6 21.2-21.2 6c-3.3 .9-5.5 3.9-5.5 7.3s2.2 6.4 5.5 7.3l21.2 6 6 21.2c.9 3.3 3.9 5.5 7.3 5.5s6.4-2.2 7.3-5.5l6-21.2 21.2-6c3.3-.9 5.5-3.9 5.5-7.3s-2.2-6.4-5.5-7.3l-21.2-6zM112.7 316.5C46.7 342.6 0 407 0 482.3C0 498.7 13.3 512 29.7 512l98.3 0 0-64c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32l0 64 98.3 0c16.4 0 29.7-13.3 29.7-29.7c0-75.3-46.7-139.7-112.7-165.8C303.9 338.8 265.5 352 224 352s-79.9-13.2-111.3-35.5zM176 448c-8.8 0-16 7.2-16 16l0 48 32 0 0-48c0-8.8-7.2-16-16-16zm96 32a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faPlaneSlash = {\n  prefix: 'fas',\n  iconName: 'plane-slash',\n  icon: [640, 512, [], \"e069\", \"M514.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-73.8 0L630.8 469.1c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2S28.4-3.1 38.8 5.1L238.1 161.3 197.8 20.4C194.9 10.2 202.6 0 213.2 0l56.2 0c11.5 0 22.1 6.2 27.8 16.1L397.7 192l116.6 0zM41.5 128.7l321 252.9L297.2 495.9c-5.7 10-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.2-15.4-20.4l49-171.6L144 320l-43.2 57.6c-3 4-7.8 6.4-12.8 6.4l-42 0c-7.8 0-14-6.3-14-14c0-1.3 .2-2.6 .5-3.9L64 256 32.5 145.9c-.4-1.3-.5-2.6-.5-3.9c0-6.2 4-11.4 9.5-13.3z\"]\n};\nconst faTrademark = {\n  prefix: 'fas',\n  iconName: 'trademark',\n  icon: [640, 512, [8482], \"f25c\", \"M345.6 108.8c-8.3-11-22.7-15.5-35.7-11.2S288 114.2 288 128l0 256c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 86.4 115.2c6 8.1 15.5 12.8 25.6 12.8s19.6-4.7 25.6-12.8L576 224l0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-256c0-13.8-8.8-26-21.9-30.4s-27.5 .1-35.7 11.2L464 266.7 345.6 108.8zM0 128c0 17.7 14.3 32 32 32l64 0 0 224c0 17.7 14.3 32 32 32s32-14.3 32-32l0-224 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 96C14.3 96 0 110.3 0 128z\"]\n};\nconst faBasketball = {\n  prefix: 'fas',\n  iconName: 'basketball',\n  icon: [512, 512, [127936, \"basketball-ball\"], \"f434\", \"M86.6 64l85.2 85.2C194.5 121.7 208 86.4 208 48c0-14.7-2-28.9-5.7-42.4C158.6 15 119 35.5 86.6 64zM64 86.6C35.5 119 15 158.6 5.6 202.3C19.1 206 33.3 208 48 208c38.4 0 73.7-13.5 101.3-36.1L64 86.6zM256 0c-7.3 0-14.6 .3-21.8 .9C238 16 240 31.8 240 48c0 47.3-17.1 90.5-45.4 124L256 233.4 425.4 64C380.2 24.2 320.9 0 256 0zM48 240c-16.2 0-32-2-47.1-5.8C.3 241.4 0 248.7 0 256c0 64.9 24.2 124.2 64 169.4L233.4 256 172 194.6C138.5 222.9 95.3 240 48 240zm463.1 37.8c.6-7.2 .9-14.5 .9-21.8c0-64.9-24.2-124.2-64-169.4L278.6 256 340 317.4c33.4-28.3 76.7-45.4 124-45.4c16.2 0 32 2 47.1 5.8zm-4.7 31.9C492.9 306 478.7 304 464 304c-38.4 0-73.7 13.5-101.3 36.1L448 425.4c28.5-32.3 49.1-71.9 58.4-115.7zM340.1 362.7C317.5 390.3 304 425.6 304 464c0 14.7 2 28.9 5.7 42.4C353.4 497 393 476.5 425.4 448l-85.2-85.2zM317.4 340L256 278.6 86.6 448c45.1 39.8 104.4 64 169.4 64c7.3 0 14.6-.3 21.8-.9C274 496 272 480.2 272 464c0-47.3 17.1-90.5 45.4-124z\"]\n};\nconst faBasketballBall = faBasketball;\nconst faSatelliteDish = {\n  prefix: 'fas',\n  iconName: 'satellite-dish',\n  icon: [512, 512, [128225], \"f7c0\", \"M192 32c0-17.7 14.3-32 32-32C383.1 0 512 128.9 512 288c0 17.7-14.3 32-32 32s-32-14.3-32-32C448 164.3 347.7 64 224 64c-17.7 0-32-14.3-32-32zM60.6 220.6L164.7 324.7l28.4-28.4c-.7-2.6-1.1-5.4-1.1-8.3c0-17.7 14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32c-2.9 0-5.6-.4-8.3-1.1l-28.4 28.4L291.4 451.4c14.5 14.5 11.8 38.8-7.3 46.3C260.5 506.9 234.9 512 208 512C93.1 512 0 418.9 0 304c0-26.9 5.1-52.5 14.4-76.1c7.5-19 31.8-21.8 46.3-7.3zM224 96c106 0 192 86 192 192c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-70.7-57.3-128-128-128c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faCircleUp = {\n  prefix: 'fas',\n  iconName: 'circle-up',\n  icon: [512, 512, [61467, \"arrow-alt-circle-up\"], \"f35b\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm11.3-395.3l112 112c4.6 4.6 5.9 11.5 3.5 17.4s-8.3 9.9-14.8 9.9l-64 0 0 96c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-96-64 0c-6.5 0-12.3-3.9-14.8-9.9s-1.1-12.9 3.5-17.4l112-112c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faArrowAltCircleUp = faCircleUp;\nconst faMobileScreenButton = {\n  prefix: 'fas',\n  iconName: 'mobile-screen-button',\n  icon: [384, 512, [\"mobile-alt\"], \"f3cd\", \"M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM224 448a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM304 64L80 64l0 320 224 0 0-320z\"]\n};\nconst faMobileAlt = faMobileScreenButton;\nconst faVolumeHigh = {\n  prefix: 'fas',\n  iconName: 'volume-high',\n  icon: [640, 512, [128266, \"volume-up\"], \"f028\", \"M533.6 32.5C598.5 85.2 640 165.8 640 256s-41.5 170.7-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z\"]\n};\nconst faVolumeUp = faVolumeHigh;\nconst faUsersRays = {\n  prefix: 'fas',\n  iconName: 'users-rays',\n  icon: [640, 512, [], \"e593\", \"M41 7C31.6-2.3 16.4-2.3 7 7S-2.3 31.6 7 41l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L41 7zM599 7L527 79c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l72-72c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0zM7 505c9.4 9.4 24.6 9.4 33.9 0l72-72c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 471c-9.4 9.4-9.4 24.6 0 33.9zm592 0c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-72-72c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72zM320 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM212.1 336c-2.7 7.5-4.1 15.6-4.1 24c0 13.3 10.7 24 24 24l176 0c13.3 0 24-10.7 24-24c0-8.4-1.4-16.5-4.1-24c-.5-1.4-1-2.7-1.6-4c-9.4-22.3-29.8-38.9-54.3-43c-3.9-.7-7.9-1-12-1l-80 0c-4.1 0-8.1 .3-12 1c-.8 .1-1.7 .3-2.5 .5c-24.9 5.1-45.1 23-53.4 46.5zM175.8 224a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-26.5 32C119.9 256 96 279.9 96 309.3c0 14.7 11.9 26.7 26.7 26.7l56.1 0c8-34.1 32.8-61.7 65.2-73.6c-7.5-4.1-16.2-6.4-25.3-6.4l-69.3 0zm368 80c14.7 0 26.7-11.9 26.7-26.7c0-29.5-23.9-53.3-53.3-53.3l-69.3 0c-9.2 0-17.8 2.3-25.3 6.4c32.4 11.9 57.2 39.5 65.2 73.6l56.1 0zM464 224a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faWallet = {\n  prefix: 'fas',\n  iconName: 'wallet',\n  icon: [512, 512, [], \"f555\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L80 128c-8.8 0-16-7.2-16-16s7.2-16 16-16l368 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32zM416 272a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faClipboardCheck = {\n  prefix: 'fas',\n  iconName: 'clipboard-check',\n  icon: [384, 512, [], \"f46c\", \"M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM305 273L177 401c-9.4 9.4-24.6 9.4-33.9 0L79 337c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L271 239c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\"]\n};\nconst faFileAudio = {\n  prefix: 'fas',\n  iconName: 'file-audio',\n  icon: [384, 512, [], \"f1c7\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zm2 226.3c37.1 22.4 62 63.1 62 109.7s-24.9 87.3-62 109.7c-7.6 4.6-17.4 2.1-22-5.4s-2.1-17.4 5.4-22C269.4 401.5 288 370.9 288 336s-18.6-65.5-46.5-82.3c-7.6-4.6-10-14.4-5.4-22s14.4-10 22-5.4zm-91.9 30.9c6 2.5 9.9 8.3 9.9 14.8l0 128c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L113.4 376 80 376c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16l33.4 0 35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5zm51 34.9c6.6-5.9 16.7-5.3 22.6 1.3C249.8 304.6 256 319.6 256 336s-6.2 31.4-16.3 42.7c-5.9 6.6-16 7.1-22.6 1.3s-7.1-16-1.3-22.6c5.1-5.7 8.1-13.1 8.1-21.3s-3.1-15.7-8.1-21.3c-5.9-6.6-5.3-16.7 1.3-22.6z\"]\n};\nconst faBurger = {\n  prefix: 'fas',\n  iconName: 'burger',\n  icon: [512, 512, [\"hamburger\"], \"f805\", \"M61.1 224C45 224 32 211 32 194.9c0-1.9 .2-3.7 .6-5.6C37.9 168.3 78.8 32 256 32s218.1 136.3 223.4 157.3c.5 1.9 .6 3.7 .6 5.6c0 16.1-13 29.1-29.1 29.1L61.1 224zM144 128a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm240 16a16 16 0 1 0 0-32 16 16 0 1 0 0 32zM272 96a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zM16 304c0-26.5 21.5-48 48-48l384 0c26.5 0 48 21.5 48 48s-21.5 48-48 48L64 352c-26.5 0-48-21.5-48-48zm16 96c0-8.8 7.2-16 16-16l416 0c8.8 0 16 7.2 16 16l0 16c0 35.3-28.7 64-64 64L96 480c-35.3 0-64-28.7-64-64l0-16z\"]\n};\nconst faHamburger = faBurger;\nconst faWrench = {\n  prefix: 'fas',\n  iconName: 'wrench',\n  icon: [512, 512, [128295], \"f0ad\", \"M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faBugs = {\n  prefix: 'fas',\n  iconName: 'bugs',\n  icon: [576, 512, [], \"e4d0\", \"M164.5 107.4l33.4-73.5c5.5-12.1 .1-26.3-11.9-31.8s-26.3-.1-31.8 11.9L128 71.7 101.9 14.1C96.4 2 82.1-3.3 70.1 2.1S52.7 21.9 58.1 33.9l33.4 73.5c-10.2 7.1-18.2 17-22.9 28.6l-17 0-4.1-20.7c-2.6-13-15.2-21.4-28.2-18.8S-2.1 111.7 .5 124.7l8 40C10.7 175.9 20.6 184 32 184l32 0 0 23.3-37.8 9.5c-9.5 2.4-16.6 10.2-17.9 19.9l-8 56c-1.9 13.1 7.2 25.3 20.4 27.2s25.3-7.2 27.2-20.4l5.7-40 18.4-4.6C82.7 274.6 103.8 288 128 288s45.3-13.4 56.1-33.2l18.4 4.6 5.7 40c1.9 13.1 14 22.2 27.2 20.4s22.2-14 20.4-27.2l-8-56c-1.4-9.7-8.5-17.5-17.9-19.9L192 207.3l0-23.3 32 0c11.4 0 21.3-8.1 23.5-19.3l8-40c2.6-13-5.8-25.6-18.8-28.2s-25.6 5.8-28.2 18.8L204.3 136l-17 0c-4.7-11.6-12.7-21.5-22.9-28.6zM496 286.5l65.6-47c10.8-7.7 13.3-22.7 5.6-33.5s-22.7-13.3-33.5-5.6l-51.4 36.8 6.1-62.9c1.3-13.2-8.4-24.9-21.6-26.2s-24.9 8.4-26.2 21.6L432.8 250c-12.3 1-24.2 5.6-34.1 13.3L384 254.8l6.8-20c4.2-12.6-2.5-26.2-15-30.4s-26.2 2.5-30.4 15l-13.1 38.6c-3.7 10.8 .8 22.8 10.7 28.5l27.7 16L359 322.7 321.5 312c-9.4-2.7-19.5 .6-25.5 8.3l-34.9 44.5c-8.2 10.4-6.4 25.5 4.1 33.7s25.5 6.4 33.7-4.1l25-31.8 18.2 5.2c-.5 22.6 11 44.7 32 56.8s45.9 11 65.2-.7l13.6 13.2-15.1 37.5c-4.9 12.3 1 26.3 13.3 31.2s26.3-1 31.2-13.3L503.5 440c3.6-9.1 1.4-19.4-5.6-26.2l-28-27.1 11.6-20.1 27.7 16c9.9 5.7 22.5 3.7 30-4.9L566.2 347c8.7-10 7.8-25.1-2.2-33.9s-25.1-7.8-33.9 2.2l-13.9 15.9-14.7-8.5c1.7-12.4-.2-25-5.5-36.2z\"]\n};\nconst faRupeeSign = {\n  prefix: 'fas',\n  iconName: 'rupee-sign',\n  icon: [448, 512, [8360, \"rupee\"], \"f156\", \"M0 64C0 46.3 14.3 32 32 32l80 0c79.5 0 144 64.5 144 144c0 58.8-35.2 109.3-85.7 131.7l51.4 128.4c6.6 16.4-1.4 35-17.8 41.6s-35-1.4-41.6-17.8L106.3 320 64 320l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 288 0 64zM64 256l48 0c44.2 0 80-35.8 80-80s-35.8-80-80-80L64 96l0 160zm256.5 16.4c-.9 6 0 8.7 .4 9.8c.4 1.1 1.4 2.6 4.2 4.9c7.2 5.7 18.7 10 37.9 16.8l1.3 .5c16 5.6 38.7 13.6 55.7 28.1c9.5 8.1 17.9 18.6 23.1 32.3c5.1 13.7 6.1 28.5 3.8 44c-4.2 28.1-20.5 49.3-43.8 60.9c-22.1 11-48.1 12.5-73.2 8l-.2 0s0 0 0 0c-9.3-1.8-20.5-5.7-29.3-9c-6-2.3-12.6-4.9-17.7-6.9c0 0 0 0 0 0c-2.5-1-4.6-1.8-6.3-2.5c-16.5-6.4-24.6-25-18.2-41.4s24.9-24.6 41.4-18.2c2.6 1 5.2 2 7.9 3.1c0 0 0 0 0 0c4.8 1.9 9.8 3.9 15.4 6c8.8 3.3 15.3 5.4 18.7 6c15.7 2.8 26.7 .8 32.9-2.3c5-2.5 8-6 9.1-13c1-6.9 .2-10.5-.5-12.3c-.6-1.7-1.8-3.6-4.5-5.9c-6.9-5.8-18.2-10.4-36.9-17l-3-1.1c-15.5-5.4-37-13-53.3-25.9c-9.5-7.5-18.3-17.6-23.7-31c-5.5-13.4-6.6-28-4.4-43.2c8.4-57.1 67-78 116.9-68.9c6.9 1.3 27.3 5.8 35.4 8.4c16.9 5.2 26.3 23.2 21.1 40.1s-23.2 26.3-40.1 21.1c-4.7-1.4-22.3-5.5-27.9-6.5c-14.6-2.7-25.8-.4-32.6 3.2c-6.3 3.3-8.9 7.6-9.5 12z\"]\n};\nconst faRupee = faRupeeSign;\nconst faFileImage = {\n  prefix: 'fas',\n  iconName: 'file-image',\n  icon: [384, 512, [128443], \"f1c5\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM64 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm152 32c5.3 0 10.2 2.6 13.2 6.9l88 128c3.4 4.9 3.7 11.3 1 16.5s-8.2 8.6-14.2 8.6l-88 0-40 0-48 0-48 0c-5.8 0-11.1-3.1-13.9-8.1s-2.8-11.2 .2-16.1l48-80c2.9-4.8 8.1-7.8 13.7-7.8s10.8 2.9 13.7 7.8l12.8 21.4 48.3-70.2c3-4.3 7.9-6.9 13.2-6.9z\"]\n};\nconst faCircleQuestion = {\n  prefix: 'fas',\n  iconName: 'circle-question',\n  icon: [512, 512, [62108, \"question-circle\"], \"f059\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faQuestionCircle = faCircleQuestion;\nconst faPlaneDeparture = {\n  prefix: 'fas',\n  iconName: 'plane-departure',\n  icon: [640, 512, [128747], \"f5b0\", \"M381 114.9L186.1 41.8c-16.7-6.2-35.2-5.3-51.1 2.7L89.1 67.4C78 73 77.2 88.5 87.6 95.2l146.9 94.5L136 240 77.8 214.1c-8.7-3.9-18.8-3.7-27.3 .6L18.3 230.8c-9.3 4.7-11.8 16.8-5 24.7l73.1 85.3c6.1 7.1 15 11.2 24.3 11.2l137.7 0c5 0 9.9-1.2 14.3-3.4L535.6 212.2c46.5-23.3 82.5-63.3 100.8-112C645.9 75 627.2 48 600.2 48l-57.4 0c-20.2 0-40.2 4.8-58.2 14L381 114.9zM0 480c0 17.7 14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 448c-17.7 0-32 14.3-32 32z\"]\n};\nconst faHandshakeSlash = {\n  prefix: 'fas',\n  iconName: 'handshake-slash',\n  icon: [640, 512, [], \"e060\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-135-105.8c-1.1-11.4-6.3-22.3-15.3-30.7l-134.2-123-23.4 18.2-26-20.3 77.2-60.1c7-5.4 17-4.2 22.5 2.8s4.2 17-2.8 22.5l-20.9 16.2L512 316.8 512 128l-.7 0-3.9-2.5L434.8 79c-15.3-9.8-33.2-15-51.4-15c-21.8 0-43 7.5-60 21.2l-89.7 72.6-25.8-20.3 81.8-66.2c-11.6-4.9-24.1-7.4-36.8-7.4C234 64 215.7 69.6 200 80l-35.5 23.7L38.8 5.1zM96 171.6L40.6 128 0 128 0 352c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-180.4zM413.6 421.9L128 196.9 128 352l28.2 0 91.4 83.4c19.6 17.9 49.9 16.5 67.8-3.1c5.5-6.1 9.2-13.2 11.1-20.6l17 15.6c19.5 17.9 49.9 16.6 67.8-2.9c.8-.8 1.5-1.7 2.2-2.6zM48 320a16 16 0 1 1 0 32 16 16 0 1 1 0-32zM544 128l0 224c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-224-96 0zm32 208a16 16 0 1 1 32 0 16 16 0 1 1 -32 0z\"]\n};\nconst faBookBookmark = {\n  prefix: 'fas',\n  iconName: 'book-bookmark',\n  icon: [448, 512, [], \"e0bb\", \"M0 96C0 43 43 0 96 0l96 0 0 190.7c0 13.4 15.5 20.9 26 12.5L272 160l54 43.2c10.5 8.4 26 .9 26-12.5L352 0l32 0 32 0c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0L96 512c-53 0-96-43-96-96L0 96zM64 416c0 17.7 14.3 32 32 32l256 0 0-64L96 384c-17.7 0-32 14.3-32 32z\"]\n};\nconst faCodeBranch = {\n  prefix: 'fas',\n  iconName: 'code-branch',\n  icon: [448, 512, [], \"f126\", \"M80 104a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm80-24c0 32.8-19.7 61-48 73.3l0 87.8c18.8-10.9 40.7-17.1 64-17.1l96 0c35.3 0 64-28.7 64-64l0-6.7C307.7 141 288 112.8 288 80c0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3l0 6.7c0 70.7-57.3 128-128 128l-96 0c-35.3 0-64 28.7-64 64l0 6.7c28.3 12.3 48 40.5 48 73.3c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3l0-6.7 0-198.7C19.7 141 0 112.8 0 80C0 35.8 35.8 0 80 0s80 35.8 80 80zm232 0a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM80 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faHatCowboy = {\n  prefix: 'fas',\n  iconName: 'hat-cowboy',\n  icon: [640, 512, [], \"f8c0\", \"M320 64c14.4 0 22.3-7 30.8-14.4C360.4 41.1 370.7 32 392 32c49.3 0 84.4 152.2 97.9 221.9C447.8 272.1 390.9 288 320 288s-127.8-15.9-169.9-34.1C163.6 184.2 198.7 32 248 32c21.3 0 31.6 9.1 41.2 17.6C297.7 57 305.6 64 320 64zM111.1 270.7c47.2 24.5 117.5 49.3 209 49.3s161.8-24.8 208.9-49.3c24.8-12.9 49.8-28.3 70.1-47.7c7.9-7.9 20.2-9.2 29.6-3.3c9.5 5.9 13.5 17.9 9.9 28.5c-13.5 37.7-38.4 72.3-66.1 100.6C523.7 398.9 443.6 448 320 448s-203.6-49.1-252.5-99.2C39.8 320.4 14.9 285.8 1.4 248.1c-3.6-10.6 .4-22.6 9.9-28.5c9.5-5.9 21.7-4.5 29.6 3.3c20.4 19.4 45.3 34.8 70.1 47.7z\"]\n};\nconst faBridge = {\n  prefix: 'fas',\n  iconName: 'bridge',\n  icon: [576, 512, [], \"e4c8\", \"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l40 0 0 64L0 160 0 288c53 0 96 43 96 96l0 64c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-64c0-53 43-96 96-96s96 43 96 96l0 64c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-64c0-53 43-96 96-96l0-128-72 0 0-64 40 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM456 96l0 64-80 0 0-64 80 0zM328 96l0 64-80 0 0-64 80 0zM200 96l0 64-80 0 0-64 80 0z\"]\n};\nconst faPhoneFlip = {\n  prefix: 'fas',\n  iconName: 'phone-flip',\n  icon: [512, 512, [128381, \"phone-alt\"], \"f879\", \"M347.1 24.6c7.7-18.6 28-28.5 47.4-23.2l88 24C499.9 30.2 512 46 512 64c0 247.4-200.6 448-448 448c-18 0-33.8-12.1-38.6-29.5l-24-88c-5.3-19.4 4.6-39.7 23.2-47.4l96-40c16.3-6.8 35.2-2.1 46.3 11.6L207.3 368c70.4-33.3 127.4-90.3 160.7-160.7L318.7 167c-13.7-11.2-18.4-30-11.6-46.3l40-96z\"]\n};\nconst faPhoneAlt = faPhoneFlip;\nconst faTruckFront = {\n  prefix: 'fas',\n  iconName: 'truck-front',\n  icon: [512, 512, [], \"e2b7\", \"M0 80C0 35.8 35.8 0 80 0L432 0c44.2 0 80 35.8 80 80l0 288c0 26.2-12.6 49.4-32 64l0 48c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-32-256 0 0 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-48C12.6 417.4 0 394.2 0 368L0 80zm129.9 72.2L112 224l288 0-17.9-71.8C378.5 138 365.7 128 351 128l-190 0c-14.7 0-27.5 10-31 24.2zM128 320a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faCat = {\n  prefix: 'fas',\n  iconName: 'cat',\n  icon: [576, 512, [128008], \"f6be\", \"M320 192l17.1 0c22.1 38.3 63.5 64 110.9 64c11 0 21.8-1.4 32-4l0 4 0 32 0 192c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-140.8L280 448l56 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-144 0c-53 0-96-43-96-96l0-223.5c0-16.1-12-29.8-28-31.8l-7.9-1c-17.5-2.2-30-18.2-27.8-35.7s18.2-30 35.7-27.8l7.9 1c48 6 84.1 46.8 84.1 95.3l0 85.3c34.4-51.7 93.2-85.8 160-85.8zm160 26.5s0 0 0 0c-10 3.5-20.8 5.5-32 5.5c-28.4 0-54-12.4-71.6-32c0 0 0 0 0 0c-3.7-4.1-7-8.5-9.9-13.2C357.3 164 352 146.6 352 128c0 0 0 0 0 0l0-96 0-20 0-1.3C352 4.8 356.7 .1 362.6 0l.2 0c3.3 0 6.4 1.6 8.4 4.2c0 0 0 0 0 .1L384 21.3l27.2 36.3L416 64l64 0 4.8-6.4L512 21.3 524.8 4.3c0 0 0 0 0-.1c2-2.6 5.1-4.2 8.4-4.2l.2 0C539.3 .1 544 4.8 544 10.7l0 1.3 0 20 0 96c0 17.3-4.6 33.6-12.6 47.6c-11.3 19.8-29.6 35.2-51.4 42.9zM432 128a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm48 16a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faAnchorCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'anchor-circle-exclamation',\n  icon: [640, 512, [], \"e4ab\", \"M320 96a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm21.1 80C367 158.8 384 129.4 384 96c0-53-43-96-96-96s-96 43-96 96c0 33.4 17 62.8 42.9 80L224 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 208-48 0c-53 0-96-43-96-96l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L97 263c-9.4-9.4-24.6-9.4-33.9 0L7 319c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 88.4 71.6 160 160 160l80 0 80 0c8.2 0 16.3-.6 24.2-1.8c-22.2-16.2-40.4-37.5-53-62.2L320 448l0-80 0-128 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-10.9 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faTruckField = {\n  prefix: 'fas',\n  iconName: 'truck-field',\n  icon: [640, 512, [], \"e58d\", \"M32 96c0-35.3 28.7-64 64-64l224 0c23.7 0 44.4 12.9 55.4 32l51.8 0c25.3 0 48.2 14.9 58.5 38l52.8 118.8c.5 1.1 .9 2.1 1.3 3.2l4.2 0c35.3 0 64 28.7 64 64l0 32c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c0 53-43 96-96 96s-96-43-96-96l-128 0c0 53-43 96-96 96s-96-43-96-96l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-32c-17.7 0-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32l0-32zM384 224l85.9 0-42.7-96L384 128l0 96zM160 432a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm368-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"]\n};\nconst faRoute = {\n  prefix: 'fas',\n  iconName: 'route',\n  icon: [512, 512, [], \"f4d7\", \"M512 96c0 50.2-59.1 125.1-84.6 155c-3.8 4.4-9.4 6.1-14.5 5L320 256c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c53 0 96 43 96 96s-43 96-96 96l-276.4 0c8.7-9.9 19.3-22.6 30-36.8c6.3-8.4 12.8-17.6 19-27.2L416 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-53 0-96-43-96-96s43-96 96-96l39.8 0c-21-31.5-39.8-67.7-39.8-96c0-53 43-96 96-96s96 43 96 96zM117.1 489.1c-3.8 4.3-7.2 8.1-10.1 11.3l-1.8 2-.2-.2c-6 4.6-14.6 4-20-1.8C59.8 473 0 402.5 0 352c0-53 43-96 96-96s96 43 96 96c0 30-21.1 67-43.5 97.9c-10.7 14.7-21.7 28-30.8 38.5l-.6 .7zM128 352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM416 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faClipboardQuestion = {\n  prefix: 'fas',\n  iconName: 'clipboard-question',\n  icon: [384, 512, [], \"e4e3\", \"M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM105.8 229.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L216 328.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM160 416a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faPanorama = {\n  prefix: 'fas',\n  iconName: 'panorama',\n  icon: [640, 512, [], \"e209\", \"M45.6 32C20.4 32 0 52.4 0 77.6L0 434.4C0 459.6 20.4 480 45.6 480c5.1 0 10-.8 14.7-2.4C74.6 472.8 177.6 440 320 440s245.4 32.8 259.6 37.6c4.7 1.6 9.7 2.4 14.7 2.4c25.2 0 45.6-20.4 45.6-45.6l0-356.7C640 52.4 619.6 32 594.4 32c-5 0-10 .8-14.7 2.4C565.4 39.2 462.4 72 320 72S74.6 39.2 60.4 34.4C55.6 32.8 50.7 32 45.6 32zM96 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm272 0c7.9 0 15.4 3.9 19.8 10.5L512.3 353c5.4 8 5.6 18.4 .4 26.5s-14.7 12.3-24.2 10.7C442.7 382.4 385.2 376 320 376c-65.6 0-123.4 6.5-169.3 14.4c-9.8 1.7-19.7-2.9-24.7-11.5s-4.3-19.4 1.9-27.2L197.3 265c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l26.4 33.1 87-127.6c4.5-6.6 11.9-10.5 19.8-10.5z\"]\n};\nconst faCommentMedical = {\n  prefix: 'fas',\n  iconName: 'comment-medical',\n  icon: [512, 512, [], \"f7f5\", \"M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM224 160c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faTeethOpen = {\n  prefix: 'fas',\n  iconName: 'teeth-open',\n  icon: [576, 512, [], \"f62f\", \"M96 32C43 32 0 75 0 128l0 64c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-64c0-53-43-96-96-96L96 32zM224 96c26.5 0 48 21.5 48 48l0 56c0 13.3-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24l0-56c0-26.5 21.5-48 48-48zm80 48c0-26.5 21.5-48 48-48s48 21.5 48 48l0 56c0 13.3-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24l0-56zM96 128c26.5 0 48 21.5 48 48l0 24c0 13.3-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24l0-24c0-26.5 21.5-48 48-48zm336 48c0-26.5 21.5-48 48-48s48 21.5 48 48l0 24c0 13.3-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24l0-24zM96 480l384 0c53 0 96-43 96-96l0-32c0-35.3-28.7-64-64-64L64 288c-35.3 0-64 28.7-64 64l0 32c0 53 43 96 96 96zm0-64c-26.5 0-48-21.5-48-48l0-24c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 24c0 26.5-21.5 48-48 48zm80-48l0-24c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 24c0 26.5-21.5 48-48 48s-48-21.5-48-48zm176 48c-26.5 0-48-21.5-48-48l0-24c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 24c0 26.5-21.5 48-48 48zm80-48l0-24c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 24c0 26.5-21.5 48-48 48s-48-21.5-48-48z\"]\n};\nconst faFileCircleMinus = {\n  prefix: 'fas',\n  iconName: 'file-circle-minus',\n  icon: [576, 512, [], \"e4ed\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm224 0c0-8.8-7.2-16-16-16l-128 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l128 0c8.8 0 16-7.2 16-16z\"]\n};\nconst faTags = {\n  prefix: 'fas',\n  iconName: 'tags',\n  icon: [512, 512, [], \"f02c\", \"M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5L0 80C0 53.5 21.5 32 48 32l149.5 0c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faWineGlass = {\n  prefix: 'fas',\n  iconName: 'wine-glass',\n  icon: [320, 512, [127863], \"f4e3\", \"M32.1 29.3C33.5 12.8 47.4 0 64 0L256 0c16.6 0 30.5 12.8 31.9 29.3l14 168.4c6 72-42.5 135.2-109.9 150.6l0 99.6 48 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-80 0-80 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l48 0 0-99.6C60.6 333 12.1 269.8 18.1 197.8l14-168.4zm56 98.7l143.8 0-5.3-64L93.4 64l-5.3 64z\"]\n};\nconst faForwardFast = {\n  prefix: 'fas',\n  iconName: 'forward-fast',\n  icon: [512, 512, [9197, \"fast-forward\"], \"f050\", \"M18.4 445c11.2 5.3 24.5 3.6 34.1-4.4L224 297.7 224 416c0 12.4 7.2 23.7 18.4 29s24.5 3.6 34.1-4.4L448 297.7 448 416c0 17.7 14.3 32 32 32s32-14.3 32-32l0-320c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 118.3L276.5 71.4c-9.5-7.9-22.8-9.7-34.1-4.4S224 83.6 224 96l0 118.3L52.5 71.4c-9.5-7.9-22.8-9.7-34.1-4.4S0 83.6 0 96L0 416c0 12.4 7.2 23.7 18.4 29z\"]\n};\nconst faFastForward = faForwardFast;\nconst faFaceMehBlank = {\n  prefix: 'fas',\n  iconName: 'face-meh-blank',\n  icon: [512, 512, [128566, \"meh-blank\"], \"f5a4\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm208.4-48a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm128 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faMehBlank = faFaceMehBlank;\nconst faSquareParking = {\n  prefix: 'fas',\n  iconName: 'square-parking',\n  icon: [448, 512, [127359, \"parking\"], \"f540\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM192 256l48 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-48 0 0 64zm48 64l-48 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64 0-120c0-22.1 17.9-40 40-40l72 0c53 0 96 43 96 96s-43 96-96 96z\"]\n};\nconst faParking = faSquareParking;\nconst faHouseSignal = {\n  prefix: 'fas',\n  iconName: 'house-signal',\n  icon: [576, 512, [], \"e012\", \"M357.7 8.5c-12.3-11.3-31.2-11.3-43.4 0l-208 192c-9.4 8.6-12.7 22-8.5 34c87.1 25.3 155.6 94.2 180.3 181.6L464 416c26.5 0 48-21.5 48-48l0-112 32 0c13.2 0 25-8.1 29.8-20.3s1.6-26.2-8.1-35.2l-208-192zM288 208c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16l0-64zM24 256c-13.3 0-24 10.7-24 24s10.7 24 24 24c101.6 0 184 82.4 184 184c0 13.3 10.7 24 24 24s24-10.7 24-24c0-128.1-103.9-232-232-232zm8 256a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM0 376c0 13.3 10.7 24 24 24c48.6 0 88 39.4 88 88c0 13.3 10.7 24 24 24s24-10.7 24-24c0-75.1-60.9-136-136-136c-13.3 0-24 10.7-24 24z\"]\n};\nconst faBarsProgress = {\n  prefix: 'fas',\n  iconName: 'bars-progress',\n  icon: [512, 512, [\"tasks-alt\"], \"f828\", \"M448 160l-128 0 0-32 128 0 0 32zM48 64C21.5 64 0 85.5 0 112l0 64c0 26.5 21.5 48 48 48l416 0c26.5 0 48-21.5 48-48l0-64c0-26.5-21.5-48-48-48L48 64zM448 352l0 32-256 0 0-32 256 0zM48 288c-26.5 0-48 21.5-48 48l0 64c0 26.5 21.5 48 48 48l416 0c26.5 0 48-21.5 48-48l0-64c0-26.5-21.5-48-48-48L48 288z\"]\n};\nconst faTasksAlt = faBarsProgress;\nconst faFaucetDrip = {\n  prefix: 'fas',\n  iconName: 'faucet-drip',\n  icon: [512, 512, [128688], \"e006\", \"M224 0c17.7 0 32 14.3 32 32l0 12 96-12c17.7 0 32 14.3 32 32s-14.3 32-32 32L256 84l-31-3.9-1-.1-1 .1L192 84 96 96C78.3 96 64 81.7 64 64s14.3-32 32-32l96 12 0-12c0-17.7 14.3-32 32-32zM0 224c0-17.7 14.3-32 32-32l96 0 22.6-22.6c6-6 14.1-9.4 22.6-9.4l18.7 0 0-43.8 32-4 32 4 0 43.8 18.7 0c8.5 0 16.6 3.4 22.6 9.4L320 192l32 0c88.4 0 160 71.6 160 160c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32s-14.3-32-32-32l-36.1 0c-20.2 29-53.9 48-91.9 48s-71.7-19-91.9-48L32 320c-17.7 0-32-14.3-32-32l0-64zM436.8 423.4c1.9-4.5 6.3-7.4 11.2-7.4s9.2 2.9 11.2 7.4l18.2 42.4c1.8 4.1 2.7 8.6 2.7 13.1l0 1.2c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-1.2c0-4.5 .9-8.9 2.7-13.1l18.2-42.4z\"]\n};\nconst faCartFlatbed = {\n  prefix: 'fas',\n  iconName: 'cart-flatbed',\n  icon: [640, 512, [\"dolly-flatbed\"], \"f474\", \"M32 0C14.3 0 0 14.3 0 32S14.3 64 32 64l16 0c8.8 0 16 7.2 16 16l0 288c0 44.2 35.8 80 80 80l18.7 0c-1.8 5-2.7 10.4-2.7 16c0 26.5 21.5 48 48 48s48-21.5 48-48c0-5.6-1-11-2.7-16l197.5 0c-1.8 5-2.7 10.4-2.7 16c0 26.5 21.5 48 48 48s48-21.5 48-48c0-5.6-1-11-2.7-16l66.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-464 0c-8.8 0-16-7.2-16-16l0-288C128 35.8 92.2 0 48 0L32 0zM192 80l0 192c0 26.5 21.5 48 48 48l320 0c26.5 0 48-21.5 48-48l0-192c0-26.5-21.5-48-48-48l-96 0 0 144c0 5.9-3.2 11.3-8.5 14.1s-11.5 2.5-16.4-.8L400 163.2l-39.1 26.1c-4.9 3.3-11.2 3.6-16.4 .8s-8.5-8.2-8.5-14.1l0-144-96 0c-26.5 0-48 21.5-48 48z\"]\n};\nconst faDollyFlatbed = faCartFlatbed;\nconst faBanSmoking = {\n  prefix: 'fas',\n  iconName: 'ban-smoking',\n  icon: [512, 512, [128685, \"smoking-ban\"], \"f54d\", \"M99.5 144.8L178.7 224l96 96 92.5 92.5C335.9 434.9 297.5 448 256 448C150 448 64 362 64 256c0-41.5 13.1-79.9 35.5-111.2zM333.3 288l-32-32 82.7 0 0 32-50.7 0zm32 32l34.7 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-130.7 0L144.8 99.5C176.1 77.1 214.5 64 256 64c106 0 192 86 192 192c0 41.5-13.1 79.9-35.5 111.2L365.3 320zM256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM272 96c-8.8 0-16 7.2-16 16c0 26.5 21.5 48 48 48l32 0c8.8 0 16 7.2 16 16s7.2 16 16 16s16-7.2 16-16c0-26.5-21.5-48-48-48l-32 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16zM229.5 320l-96-96L112 224c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l117.5 0z\"]\n};\nconst faSmokingBan = faBanSmoking;\nconst faTerminal = {\n  prefix: 'fas',\n  iconName: 'terminal',\n  icon: [576, 512, [], \"f120\", \"M9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6zM256 416l288 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-288 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faMobileButton = {\n  prefix: 'fas',\n  iconName: 'mobile-button',\n  icon: [384, 512, [], \"f10b\", \"M80 0C44.7 0 16 28.7 16 64l0 384c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L80 0zM192 400a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faHouseMedicalFlag = {\n  prefix: 'fas',\n  iconName: 'house-medical-flag',\n  icon: [640, 512, [], \"e514\", \"M480 0c17.7 0 32 14.3 32 32l112 0c8.8 0 16 7.2 16 16l0 128c0 8.8-7.2 16-16 16l-112 0 0 320-64 0 0-320 0-160c0-17.7 14.3-32 32-32zM276.8 39.7L416 159l0 353 1 0-.2 0L96 512c-17.7 0-32-14.3-32-32l0-192-32 0c-13.4 0-25.4-8.3-30-20.9s-1-26.7 9.2-35.4l224-192c12-10.3 29.7-10.3 41.7 0zM224 208l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-48 0 0-48c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faBasketShopping = {\n  prefix: 'fas',\n  iconName: 'basket-shopping',\n  icon: [576, 512, [\"shopping-basket\"], \"f291\", \"M253.3 35.1c6.1-11.8 1.5-26.3-10.2-32.4s-26.3-1.5-32.4 10.2L117.6 192 32 192c-17.7 0-32 14.3-32 32s14.3 32 32 32L83.9 463.5C91 492 116.6 512 146 512L430 512c29.4 0 55-20 62.1-48.5L544 256c17.7 0 32-14.3 32-32s-14.3-32-32-32l-85.6 0L365.3 12.9C359.2 1.2 344.7-3.4 332.9 2.7s-16.3 20.6-10.2 32.4L404.3 192l-232.6 0L253.3 35.1zM192 304l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-8.8 7.2-16 16-16s16 7.2 16 16zm96-16c8.8 0 16 7.2 16 16l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-8.8 7.2-16 16-16zm128 16l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faShoppingBasket = faBasketShopping;\nconst faTape = {\n  prefix: 'fas',\n  iconName: 'tape',\n  icon: [576, 512, [], \"f4db\", \"M380.8 416c41.5-40.7 67.2-97.3 67.2-160C448 132.3 347.7 32 224 32S0 132.3 0 256S100.3 480 224 480l320 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-163.2 0zM224 160a96 96 0 1 1 0 192 96 96 0 1 1 0-192zm64 96a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z\"]\n};\nconst faBusSimple = {\n  prefix: 'fas',\n  iconName: 'bus-simple',\n  icon: [448, 512, [\"bus-alt\"], \"f55e\", \"M224 0C348.8 0 448 35.2 448 80l0 16 0 320c0 17.7-14.3 32-32 32l0 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-32-192 0 0 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-32c-17.7 0-32-14.3-32-32L0 96 0 80C0 35.2 99.2 0 224 0zM64 128l0 128c0 17.7 14.3 32 32 32l256 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32L96 96c-17.7 0-32 14.3-32 32zM80 400a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm288 0a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faBusAlt = faBusSimple;\nconst faEye = {\n  prefix: 'fas',\n  iconName: 'eye',\n  icon: [576, 512, [128065], \"f06e\", \"M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z\"]\n};\nconst faFaceSadCry = {\n  prefix: 'fas',\n  iconName: 'face-sad-cry',\n  icon: [512, 512, [128557, \"sad-cry\"], \"f5b3\", \"M352 493.4c-29.6 12-62.1 18.6-96 18.6s-66.4-6.6-96-18.6L160 288c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 189.8C51.5 433.5 0 350.8 0 256C0 114.6 114.6 0 256 0S512 114.6 512 256c0 94.8-51.5 177.5-128 221.8L384 288c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 205.4zM195.2 233.6c5.3 7.1 15.3 8.5 22.4 3.2s8.5-15.3 3.2-22.4c-30.4-40.5-91.2-40.5-121.6 0c-5.3 7.1-3.9 17.1 3.2 22.4s17.1 3.9 22.4-3.2c17.6-23.5 52.8-23.5 70.4 0zm121.6 0c17.6-23.5 52.8-23.5 70.4 0c5.3 7.1 15.3 8.5 22.4 3.2s8.5-15.3 3.2-22.4c-30.4-40.5-91.2-40.5-121.6 0c-5.3 7.1-3.9 17.1 3.2 22.4s17.1 3.9 22.4-3.2zM208 336l0 32c0 26.5 21.5 48 48 48s48-21.5 48-48l0-32c0-26.5-21.5-48-48-48s-48 21.5-48 48z\"]\n};\nconst faSadCry = faFaceSadCry;\nconst faAudioDescription = {\n  prefix: 'fas',\n  iconName: 'audio-description',\n  icon: [576, 512, [], \"f29e\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM213.5 173.3l72 144c5.9 11.9 1.1 26.3-10.7 32.2s-26.3 1.1-32.2-10.7l-9.4-18.9-82.2 0-9.4 18.9c-5.9 11.9-20.3 16.7-32.2 10.7s-16.7-20.3-10.7-32.2l72-144c4.1-8.1 12.4-13.3 21.5-13.3s17.4 5.1 21.5 13.3zm-.4 106.6L192 237.7l-21.1 42.2 42.2 0zM304 184c0-13.3 10.7-24 24-24l56 0c53 0 96 43 96 96s-43 96-96 96l-56 0c-13.3 0-24-10.7-24-24l0-144zm48 24l0 96 32 0c26.5 0 48-21.5 48-48s-21.5-48-48-48l-32 0z\"]\n};\nconst faPersonMilitaryToPerson = {\n  prefix: 'fas',\n  iconName: 'person-military-to-person',\n  icon: [512, 512, [], \"e54c\", \"M71 12.5c-8.6 1-15 8.2-15 16.8c0 9.3 7.5 16.8 16.7 16.9l111.4 0c8.8-.1 15.9-7.2 15.9-16L200 16c0-9.5-8.3-17-17.8-15.9L71 12.5zM189.5 78.1l-122.9 0C64.9 83.8 64 89.8 64 96c0 35.3 28.7 64 64 64s64-28.7 64-64c0-6.2-.9-12.2-2.5-17.9zM32 256l0 32c0 17.7 14.3 32 32 32l128 0c1.8 0 3.5-.1 5.2-.4L53 208.6C40.1 220.3 32 237.2 32 256zm190.2 42.5c1.1-3.3 1.8-6.8 1.8-10.5l0-32c0-35.3-28.7-64-64-64l-64 0c-3.7 0-7.4 .3-10.9 .9L222.2 298.5zM384 160a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-35.3 0-64 28.7-64 64l0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32c0-35.3-28.7-64-64-64l-64 0zM215.8 450.1c5.2-4.6 8.2-11.1 8.2-18.1s-3-13.5-8.2-18.1l-64-56c-7.1-6.2-17.1-7.7-25.7-3.8S112 366.6 112 376l0 32-88 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l88 0 0 32c0 9.4 5.5 18 14.1 21.9s18.6 2.4 25.7-3.8l64-56zM288 431.9c0 6.9 2.9 13.5 8.1 18.1l64 56.4c7.1 6.2 17.1 7.8 25.7 3.9s14.1-12.4 14.1-21.9l0-32.4 88 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-88 0 0-32c0-9.4-5.5-18-14.1-21.9s-18.6-2.4-25.7 3.8l-64 56c-5.2 4.5-8.2 11.1-8.2 18z\"]\n};\nconst faFileShield = {\n  prefix: 'fas',\n  iconName: 'file-shield',\n  icon: [576, 512, [], \"e4f0\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 47-92.8 37.1c-21.3 8.5-35.2 29.1-35.2 52c0 56.6 18.9 148 94.2 208.3c-9 4.8-19.3 7.6-30.2 7.6L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zm39.1 97.7c5.7-2.3 12.1-2.3 17.8 0l120 48C570 277.4 576 286.2 576 296c0 63.3-25.9 168.8-134.8 214.2c-5.9 2.5-12.6 2.5-18.5 0C313.9 464.8 288 359.3 288 296c0-9.8 6-18.6 15.1-22.3l120-48zM527.4 312L432 273.8l0 187.8c68.2-33 91.5-99 95.4-149.7z\"]\n};\nconst faUserSlash = {\n  prefix: 'fas',\n  iconName: 'user-slash',\n  icon: [640, 512, [], \"f506\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L353.3 251.6C407.9 237 448 187.2 448 128C448 57.3 390.7 0 320 0C250.2 0 193.5 55.8 192 125.2L38.8 5.1zM264.3 304.3C170.5 309.4 96 387.2 96 482.3c0 16.4 13.3 29.7 29.7 29.7l388.6 0c3.9 0 7.6-.7 11-2.1l-261-205.6z\"]\n};\nconst faPen = {\n  prefix: 'fas',\n  iconName: 'pen',\n  icon: [512, 512, [128394], \"f304\", \"M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z\"]\n};\nconst faTowerObservation = {\n  prefix: 'fas',\n  iconName: 'tower-observation',\n  icon: [512, 512, [], \"e586\", \"M241.7 3.4c9-4.5 19.6-4.5 28.6 0l160 80c15.8 7.9 22.2 27.1 14.3 42.9C439 137.5 427.7 144 416 144l0 80c0 17.7-14.3 32-32 32l-4.9 0 32 192 68.9 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-95.5 0c-.4 0-.8 0-1.1 0l-254.8 0c-.4 0-.8 0-1.1 0L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 32-192-4.9 0c-17.7 0-32-14.3-32-32l0-80c-11.7 0-23-6.5-28.6-17.7c-7.9-15.8-1.5-35 14.3-42.9l160-80zM314.5 448L256 399.2 197.5 448l117 0zM197.8 256l-4.7 28.3L256 336.8l62.9-52.5L314.2 256l-116.5 0zm-13.9 83.2l-11.2 67L218.5 368l-34.6-28.8zM293.5 368l45.8 38.1-11.2-67L293.5 368zM176 128c-8.8 0-16 7.2-16 16s7.2 16 16 16l160 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-160 0z\"]\n};\nconst faFileCode = {\n  prefix: 'fas',\n  iconName: 'file-code',\n  icon: [384, 512, [], \"f1c9\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM153 289l-31 31 31 31c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L71 337c-9.4-9.4-9.4-24.6 0-33.9l48-48c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM265 255l48 48c9.4 9.4 9.4 24.6 0 33.9l-48 48c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l31-31-31-31c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z\"]\n};\nconst faSignal = {\n  prefix: 'fas',\n  iconName: 'signal',\n  icon: [640, 512, [128246, \"signal-5\", \"signal-perfect\"], \"f012\", \"M576 0c17.7 0 32 14.3 32 32l0 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-448c0-17.7 14.3-32 32-32zM448 96c17.7 0 32 14.3 32 32l0 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-352c0-17.7 14.3-32 32-32zM352 224l0 256c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32s32 14.3 32 32zM192 288c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-160c0-17.7 14.3-32 32-32zM96 416l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32z\"]\n};\nconst faSignal5 = faSignal;\nconst faSignalPerfect = faSignal;\nconst faBus = {\n  prefix: 'fas',\n  iconName: 'bus',\n  icon: [576, 512, [128653], \"f207\", \"M288 0C422.4 0 512 35.2 512 80l0 16 0 32c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l0 160c0 17.7-14.3 32-32 32l0 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-32-192 0 0 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-32c-17.7 0-32-14.3-32-32l0-160c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32c0 0 0 0 0 0l0-32s0 0 0 0l0-16C64 35.2 153.6 0 288 0zM128 160l0 96c0 17.7 14.3 32 32 32l112 0 0-160-112 0c-17.7 0-32 14.3-32 32zM304 288l112 0c17.7 0 32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-112 0 0 160zM144 400a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm288 0a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM384 80c0-8.8-7.2-16-16-16L208 64c-8.8 0-16 7.2-16 16s7.2 16 16 16l160 0c8.8 0 16-7.2 16-16z\"]\n};\nconst faHeartCircleXmark = {\n  prefix: 'fas',\n  iconName: 'heart-circle-xmark',\n  icon: [576, 512, [], \"e501\", \"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9l2.6-2.4C267.2 438.6 256 404.6 256 368c0-97.2 78.8-176 176-176c28.3 0 55 6.7 78.7 18.5c.9-6.5 1.3-13 1.3-19.6l0-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1l0 5.8c0 41.5 17.2 81.2 47.6 109.5zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm59.3-180.7L454.6 368l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L432 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L409.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L432 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faHouseChimney = {\n  prefix: 'fas',\n  iconName: 'house-chimney',\n  icon: [576, 512, [63499, \"home-lg\"], \"e3af\", \"M543.8 287.6c17 0 32-14 32-32.1c1-9-3-17-11-24L512 185l0-121c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 36.7L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 69.7c-.1 .9-.1 1.8-.1 2.8l0 112c0 22.1 17.9 40 40 40l16 0c1.2 0 2.4-.1 3.6-.2c1.5 .1 3 .2 4.5 .2l31.9 0 24 0c22.1 0 40-17.9 40-40l0-24 0-64c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 64 0 24c0 22.1 17.9 40 40 40l24 0 32.5 0c1.4 0 2.8 0 4.2-.1c1.1 .1 2.2 .1 3.3 .1l16 0c22.1 0 40-17.9 40-40l0-16.2c.3-2.6 .5-5.3 .5-8.1l-.7-160.2 32 0z\"]\n};\nconst faHomeLg = faHouseChimney;\nconst faWindowMaximize = {\n  prefix: 'fas',\n  iconName: 'window-maximize',\n  icon: [512, 512, [128470], \"f2d0\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM96 96l320 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L96 160c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faFaceFrown = {\n  prefix: 'fas',\n  iconName: 'face-frown',\n  icon: [512, 512, [9785, \"frown\"], \"f119\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM159.3 388.7c-2.6 8.4-11.6 13.2-20 10.5s-13.2-11.6-10.5-20C145.2 326.1 196.3 288 256 288s110.8 38.1 127.3 91.3c2.6 8.4-2.1 17.4-10.5 20s-17.4-2.1-20-10.5C340.5 349.4 302.1 320 256 320s-84.5 29.4-96.7 68.7zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faFrown = faFaceFrown;\nconst faPrescription = {\n  prefix: 'fas',\n  iconName: 'prescription',\n  icon: [448, 512, [], \"f5b1\", \"M32 0C14.3 0 0 14.3 0 32L0 192l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 50.7 0 128 128L137.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L288 397.3 393.4 502.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L333.3 352 438.6 246.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 306.7l-85.8-85.8C251.4 209.1 288 164.8 288 112C288 50.1 237.9 0 176 0L32 0zM176 160L64 160l0-96 112 0c26.5 0 48 21.5 48 48s-21.5 48-48 48z\"]\n};\nconst faShop = {\n  prefix: 'fas',\n  iconName: 'shop',\n  icon: [640, 512, [\"store-alt\"], \"f54f\", \"M36.8 192l566.3 0c20.3 0 36.8-16.5 36.8-36.8c0-7.3-2.2-14.4-6.2-20.4L558.2 21.4C549.3 8 534.4 0 518.3 0L121.7 0c-16 0-31 8-39.9 21.4L6.2 134.7c-4 6.1-6.2 13.2-6.2 20.4C0 175.5 16.5 192 36.8 192zM64 224l0 160 0 80c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-80 0-160-64 0 0 160-192 0 0-160-64 0zm448 0l0 256c0 17.7 14.3 32 32 32s32-14.3 32-32l0-256-64 0z\"]\n};\nconst faStoreAlt = faShop;\nconst faFloppyDisk = {\n  prefix: 'fas',\n  iconName: 'floppy-disk',\n  icon: [448, 512, [128190, 128426, \"save\"], \"f0c7\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-242.7c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32L64 32zm0 96c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L96 224c-17.7 0-32-14.3-32-32l0-64zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\"]\n};\nconst faSave = faFloppyDisk;\nconst faVihara = {\n  prefix: 'fas',\n  iconName: 'vihara',\n  icon: [640, 512, [], \"f6a7\", \"M281 22L305.8 4.7c1.3-.9 2.7-1.8 4.1-2.4C313.1 .7 316.6 0 320 0s6.9 .7 10.1 2.2c1.4 .7 2.8 1.5 4.1 2.4L359 22C393 45.8 430.8 63.5 470.8 74.4l23 6.3c1.8 .5 3.6 1.1 5.2 2c3.2 1.7 5.9 4 8.1 6.8c3.8 4.9 5.6 11.3 4.7 17.8c-.4 2.8-1.2 5.4-2.5 7.8c-1.7 3.2-4 5.9-6.8 8.1c-4.3 3.2-9.6 5.1-15.1 4.9l-7.5 0 0 56.1 6.4 5.1 5.2 4.1c21.1 16.7 45 29.6 70.5 38.1l28.9 9.6c1.6 .5 3.2 1.2 4.6 2c3.1 1.7 5.8 4.1 7.8 6.9s3.5 6.1 4.1 9.6c.5 2.7 .6 5.5 .1 8.3s-1.4 5.4-2.7 7.8c-1.7 3.1-4.1 5.8-6.9 7.8s-6.1 3.5-9.6 4.1c-1.6 .3-3.3 .4-5 .4L544 288l0 65.9c20.5 22.8 47.4 39.2 77.4 46.7C632 403 640 412.6 640 424c0 13.3-10.7 24-24 24l-40 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-160 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-160 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-40 0c-13.3 0-24-10.7-24-24c0-11.4 8-21 18.6-23.4c30-7.6 56.9-23.9 77.4-46.7L96 288l-39.4 0c-1.7 0-3.4-.1-5-.4c-3.5-.7-6.8-2.1-9.6-4.1s-5.2-4.7-7-7.8c-1.3-2.4-2.3-5-2.7-7.8s-.4-5.6 .1-8.3c.7-3.5 2.1-6.8 4.1-9.6s4.7-5.2 7.8-6.9c1.4-.8 3-1.5 4.6-2l28.9-9.6c25.5-8.5 49.4-21.4 70.5-38.1l5.2-4.1 6.4-5.1 0-8.1 0-48-7.5 0c-5.5 .1-10.8-1.7-15.1-4.9c-2.8-2.1-5.1-4.8-6.8-8.1c-1.2-2.4-2.1-5-2.5-7.8c-.9-6.5 .9-12.8 4.7-17.8c2.1-2.8 4.8-5.1 8.1-6.8c1.6-.8 3.4-1.5 5.2-2l23-6.3C209.2 63.5 247 45.8 281 22zM416 128l-96 0-96 0 0 64 72 0 48 0 72 0 0-64zM160 288l0 64 136 0 24 0 24 0 136 0 0-64-136 0-24 0s0 0 0 0l-24 0-136 0z\"]\n};\nconst faScaleUnbalanced = {\n  prefix: 'fas',\n  iconName: 'scale-unbalanced',\n  icon: [640, 512, [\"balance-scale-left\"], \"f515\", \"M522.1 62.4c16.8-5.6 25.8-23.7 20.2-40.5S518.6-3.9 501.9 1.6l-113 37.7C375 15.8 349.3 0 320 0c-44.2 0-80 35.8-80 80c0 3 .2 5.9 .5 8.8L117.9 129.6c-16.8 5.6-25.8 23.7-20.2 40.5s23.7 25.8 40.5 20.2l135.5-45.2c4.5 3.2 9.3 5.9 14.4 8.2L288 480c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-294.7c21-9.2 37.2-27 44.2-49l125.9-42zM439.6 288L512 163.8 584.4 288l-144.9 0zM512 384c62.9 0 115.2-34 126-78.9c2.6-11-1-22.3-6.7-32.1L536.1 109.8c-5-8.6-14.2-13.8-24.1-13.8s-19.1 5.3-24.1 13.8L392.7 273.1c-5.7 9.8-9.3 21.1-6.7 32.1C396.8 350 449.1 384 512 384zM129.2 291.8L201.6 416 56.7 416l72.4-124.2zM3.2 433.1C14 478 66.3 512 129.2 512s115.2-34 126-78.9c2.6-11-1-22.3-6.7-32.1L153.2 237.8c-5-8.6-14.2-13.8-24.1-13.8s-19.1 5.3-24.1 13.8L9.9 401.1c-5.7 9.8-9.3 21.1-6.7 32.1z\"]\n};\nconst faBalanceScaleLeft = faScaleUnbalanced;\nconst faSortUp = {\n  prefix: 'fas',\n  iconName: 'sort-up',\n  icon: [320, 512, [\"sort-asc\"], \"f0de\", \"M182.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z\"]\n};\nconst faSortAsc = faSortUp;\nconst faCommentDots = {\n  prefix: 'fas',\n  iconName: 'comment-dots',\n  icon: [512, 512, [128172, 62075, \"commenting\"], \"f4ad\", \"M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faCommenting = faCommentDots;\nconst faPlantWilt = {\n  prefix: 'fas',\n  iconName: 'plant-wilt',\n  icon: [512, 512, [], \"e5aa\", \"M288 120c0-30.9 25.1-56 56-56s56 25.1 56 56l0 13c-29.3 10-48 34.5-48 70.1c0 27.9 25.3 74.8 66 111.6c3.8 3.5 8.9 5.3 14 5.3s10.2-1.8 14-5.3c40.7-36.8 66-83.7 66-111.6c0-35.6-18.7-60.2-48-70.1l0-13C464 53.7 410.3 0 344 0S224 53.7 224 120l0 21.8C207.3 133 188.2 128 168 128c-66.3 0-120 53.7-120 120l0 13c-29.3 10-48 34.5-48 70.1C0 359 25.3 405.9 66 442.7c3.8 3.5 8.9 5.3 14 5.3s10.2-1.8 14-5.3c40.7-36.8 66-83.7 66-111.6c0-35.6-18.7-60.2-48-70.1l0-13c0-30.9 25.1-56 56-56s56 25.1 56 56l0 32 0 200c0 17.7 14.3 32 32 32s32-14.3 32-32l0-200 0-32 0-128z\"]\n};\nconst faDiamond = {\n  prefix: 'fas',\n  iconName: 'diamond',\n  icon: [512, 512, [9830], \"f219\", \"M284.3 11.7c-15.6-15.6-40.9-15.6-56.6 0l-216 216c-15.6 15.6-15.6 40.9 0 56.6l216 216c15.6 15.6 40.9 15.6 56.6 0l216-216c15.6-15.6 15.6-40.9 0-56.6l-216-216z\"]\n};\nconst faFaceGrinSquint = {\n  prefix: 'fas',\n  iconName: 'face-grin-squint',\n  icon: [512, 512, [128518, \"grin-squint\"], \"f585\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM388.1 312.8c12.3-3.8 24.3 6.9 19.3 18.7C382.4 390.6 324.2 432 256.3 432s-126.2-41.4-151.1-100.5c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19zM133.5 146.7l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6c0-9 9.6-14.7 17.5-10.5zM396 157.1c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9c7.9-4.2 17.5 1.5 17.5 10.5z\"]\n};\nconst faGrinSquint = faFaceGrinSquint;\nconst faHandHoldingDollar = {\n  prefix: 'fas',\n  iconName: 'hand-holding-dollar',\n  icon: [576, 512, [\"hand-holding-usd\"], \"f4c0\", \"M312 24l0 10.5c6.4 1.2 12.6 2.7 18.2 4.2c12.8 3.4 20.4 16.6 17 29.4s-16.6 20.4-29.4 17c-10.9-2.9-21.1-4.9-30.2-5c-7.3-.1-14.7 1.7-19.4 4.4c-2.1 1.3-3.1 2.4-3.5 3c-.3 .5-.7 1.2-.7 2.8c0 .3 0 .5 0 .6c.2 .2 .9 1.2 3.3 2.6c5.8 3.5 14.4 6.2 27.4 10.1l.9 .3s0 0 0 0c11.1 3.3 25.9 7.8 37.9 15.3c13.7 8.6 26.1 22.9 26.4 44.9c.3 22.5-11.4 38.9-26.7 48.5c-6.7 4.1-13.9 7-21.3 8.8l0 10.6c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-11.4c-9.5-2.3-18.2-5.3-25.6-7.8c-2.1-.7-4.1-1.4-6-2c-12.6-4.2-19.4-17.8-15.2-30.4s17.8-19.4 30.4-15.2c2.6 .9 5 1.7 7.3 2.5c13.6 4.6 23.4 7.9 33.9 8.3c8 .3 15.1-1.6 19.2-4.1c1.9-1.2 2.8-2.2 3.2-2.9c.4-.6 .9-1.8 .8-4.1l0-.2c0-1 0-2.1-4-4.6c-5.7-3.6-14.3-6.4-27.1-10.3l-1.9-.6c-10.8-3.2-25-7.5-36.4-14.4c-13.5-8.1-26.5-22-26.6-44.1c-.1-22.9 12.9-38.6 27.7-47.4c6.4-3.8 13.3-6.4 20.2-8.2L264 24c0-13.3 10.7-24 24-24s24 10.7 24 24zM568.2 336.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 485.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 512 32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 384c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z\"]\n};\nconst faHandHoldingUsd = faHandHoldingDollar;\nconst faChartDiagram = {\n  prefix: 'fas',\n  iconName: 'chart-diagram',\n  icon: [512, 512, [], \"e695\", \"M80 32C53.5 32 32 53.5 32 80s21.5 48 48 48l152 0 0 40-48 48-56 0c-48.6 0-88 39.4-88 88l0 48-8 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-8 0 0-48c0-22.1 17.9-40 40-40l56 0 48 48 0 40-8 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-8 0 0-40 48-48 56 0c22.1 0 40 17.9 40 40l0 48-8 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-8 0 0-48c0-48.6-39.4-88-88-88l-56 0-48-48 0-40 152 0c26.5 0 48-21.5 48-48s-21.5-48-48-48L80 32z\"]\n};\nconst faBacterium = {\n  prefix: 'fas',\n  iconName: 'bacterium',\n  icon: [512, 512, [], \"e05a\", \"M423.1 30.6c3.6-12.7-3.7-26-16.5-29.7s-26 3.7-29.7 16.5l-4.2 14.7c-9.8-.4-19.9 .5-29.9 2.8c-12.1 2.8-23.7 5.9-34.9 9.4l-5.9-13.7c-5.2-12.2-19.3-17.8-31.5-12.6s-17.8 19.3-12.6 31.5l4.9 11.3c-22 9.4-42 20.1-60.2 31.8L196 82.7c-7.4-11-22.3-14-33.3-6.7s-14 22.3-6.7 33.3l7.8 11.6c-18 15-33.7 30.8-47.3 47.1L103 157.3c-10.4-8.3-25.5-6.6-33.7 3.7s-6.6 25.5 3.7 33.7l15 12c-2.1 3.2-4.1 6.5-6 9.7c-9.4 15.7-17 31-23.2 45.3l-9.9-3.9c-12.3-4.9-26.3 1.1-31.2 13.4s1.1 26.3 13.4 31.2l11.6 4.6c-.3 1.1-.6 2.1-.9 3.1c-3.5 12.5-5.7 23.2-7.1 31.3c-.7 4.1-1.2 7.5-1.6 10.3c-.2 1.4-.3 2.6-.4 3.6l-.1 1.4-.1 .6 0 .3 0 .1c0 0 0 .1 39.2 3.7c0 0 0 0 0 0l-39.2-3.6c-.5 5-.6 10-.4 14.9l-14.7 4.2C4.7 380.6-2.7 393.8 .9 406.6s16.9 20.1 29.7 16.5l13.8-3.9c10.6 20.7 27.6 37.8 48.5 48.5l-3.9 13.7c-3.6 12.7 3.7 26 16.5 29.7s26-3.7 29.7-16.5l4.2-14.7c23.8 1 46.3-5.5 65.1-17.6L215 473c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-10.6-10.6c9.1-14.1 15.1-30.5 17-48.3l.1-.8c.3-1.7 1-5.1 2.3-9.8l.2-.8 12.6 5.4c12.2 5.2 26.3-.4 31.5-12.6s-.4-26.3-12.6-31.5l-11.3-4.8c9.9-14.9 24.9-31.6 48.6-46l2.1 7.5c3.6 12.7 16.9 20.1 29.7 16.5s20.1-16.9 16.5-29.7L371 259.2c6.9-2.2 14.3-4.3 22.2-6.1c12.9-3 24.7-8 35.2-14.8L439 249c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-10.6-10.6c12.2-19 18.6-41.6 17.6-65.1l14.7-4.2c12.7-3.6 20.1-16.9 16.5-29.7s-16.9-20.1-29.7-16.5l-13.7 3.9c-10.8-21.2-28-38-48.5-48.5l3.9-13.8zM92.1 363.3s0 0 0 0L144 368l-51.9-4.7zM112 320a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM240 184a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faHandPointer = {\n  prefix: 'fas',\n  iconName: 'hand-pointer',\n  icon: [448, 512, [], \"f25a\", \"M128 40c0-22.1 17.9-40 40-40s40 17.9 40 40l0 148.2c8.5-7.6 19.7-12.2 32-12.2c20.6 0 38.2 13 45 31.2c8.8-9.3 21.2-15.2 35-15.2c25.3 0 46 19.5 47.9 44.3c8.5-7.7 19.8-12.3 32.1-12.3c26.5 0 48 21.5 48 48l0 48 0 16 0 48c0 70.7-57.3 128-128 128l-16 0-64 0-.1 0-5.2 0c-5 0-9.9-.3-14.7-1c-55.3-5.6-106.2-34-140-79L8 336c-13.3-17.7-9.7-42.7 8-56s42.7-9.7 56 8l56 74.7L128 40zM240 304c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96zm48-16c-8.8 0-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96z\"]\n};\nconst faDrumSteelpan = {\n  prefix: 'fas',\n  iconName: 'drum-steelpan',\n  icon: [576, 512, [], \"f56a\", \"M288 32c159.1 0 288 48 288 128l0 192c0 80-128.9 128-288 128S0 432 0 352L0 160C0 80 128.9 32 288 32zM528 160c0-9.9-8-29.9-55-49.8c-18.6-7.9-40.9-14.4-66-19.4l-27.8 43.6c-7.3 11.5-11.2 24.8-11.2 38.4c0 17.5 6.4 34.4 18.1 47.5l9.8 11c29.8-5.2 55.9-12.5 77.2-21.5c47.1-19.9 55-39.9 55-49.8zM349.2 237.3c-8-26.2-32.4-45.3-61.2-45.3s-53.3 19.1-61.2 45.3c19.4 1.7 39.9 2.7 61.2 2.7s41.8-.9 61.2-2.7zM169 90.8c-25.2 5-47.4 11.6-66 19.4C56 130.1 48 150.1 48 160s8 29.9 55 49.8c21.3 9 47.4 16.3 77.2 21.5l9.8-11c11.6-13.1 18.1-30 18.1-47.5c0-13.6-3.9-26.9-11.2-38.4L169 90.8zm56.3-8C224.5 87 224 91.5 224 96c0 35.3 28.7 64 64 64s64-28.7 64-64c0-4.5-.5-9-1.4-13.2C330.8 81 309.8 80 288 80s-42.8 1-62.6 2.8z\"]\n};\nconst faHandScissors = {\n  prefix: 'fas',\n  iconName: 'hand-scissors',\n  icon: [512, 512, [], \"f257\", \"M40 208c-22.1 0-40 17.9-40 40s17.9 40 40 40l180.2 0c-7.6 8.5-12.2 19.7-12.2 32c0 25.3 19.5 46 44.3 47.9c-7.7 8.5-12.3 19.8-12.3 32.1c0 26.5 21.5 48 48 48l32 0 64 0c70.7 0 128-57.3 128-128l0-113.1c0-40.2-16-78.8-44.4-107.3C444.8 76.8 413.9 64 381.7 64L336 64c-21.3 0-39.3 13.9-45.6 33.1l74.5 23.7c8.4 2.7 13.1 11.7 10.4 20.1s-11.7 13.1-20.1 10.4L288 129.9c0 0 0 .1 0 .1L84 65.8C62.9 59.2 40.5 70.9 33.8 92s5.1 43.5 26.2 50.2L269.5 208 40 208z\"]\n};\nconst faHandsPraying = {\n  prefix: 'fas',\n  iconName: 'hands-praying',\n  icon: [640, 512, [\"praying-hands\"], \"f684\", \"M351.2 4.8c3.2-2 6.6-3.3 10-4.1c4.7-1 9.6-.9 14.1 .1c7.7 1.8 14.8 6.5 19.4 13.6L514.6 194.2c8.8 13.1 13.4 28.6 13.4 44.4l0 73.5c0 6.9 4.4 13 10.9 15.2l79.2 26.4C631.2 358 640 370.2 640 384l0 96c0 9.9-4.6 19.3-12.5 25.4s-18.1 8.1-27.7 5.5L431 465.9c-56-14.9-95-65.7-95-123.7L336 224c0-17.7 14.3-32 32-32s32 14.3 32 32l0 80c0 8.8 7.2 16 16 16s16-7.2 16-16l0-84.9c0-7-1.8-13.8-5.3-19.8L340.3 48.1c-1.7-3-2.9-6.1-3.6-9.3c-1-4.7-1-9.6 .1-14.1c1.9-8 6.8-15.2 14.3-19.9zm-62.4 0c7.5 4.6 12.4 11.9 14.3 19.9c1.1 4.6 1.2 9.4 .1 14.1c-.7 3.2-1.9 6.3-3.6 9.3L213.3 199.3c-3.5 6-5.3 12.9-5.3 19.8l0 84.9c0 8.8 7.2 16 16 16s16-7.2 16-16l0-80c0-17.7 14.3-32 32-32s32 14.3 32 32l0 118.2c0 58-39 108.7-95 123.7l-168.7 45c-9.6 2.6-19.9 .5-27.7-5.5S0 490 0 480l0-96c0-13.8 8.8-26 21.9-30.4l79.2-26.4c6.5-2.2 10.9-8.3 10.9-15.2l0-73.5c0-15.8 4.7-31.2 13.4-44.4L245.2 14.5c4.6-7.1 11.7-11.8 19.4-13.6c4.6-1.1 9.4-1.2 14.1-.1c3.5 .8 6.9 2.1 10 4.1z\"]\n};\nconst faPrayingHands = faHandsPraying;\nconst faArrowRotateRight = {\n  prefix: 'fas',\n  iconName: 'arrow-rotate-right',\n  icon: [512, 512, [8635, \"arrow-right-rotate\", \"arrow-rotate-forward\", \"redo\"], \"f01e\", \"M386.3 160L336 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z\"]\n};\nconst faArrowRightRotate = faArrowRotateRight;\nconst faArrowRotateForward = faArrowRotateRight;\nconst faRedo = faArrowRotateRight;\nconst faWebAwesome = {\n  prefix: 'fas',\n  iconName: 'web-awesome',\n  icon: [640, 512, [], \"e682\", \"M372.2 52c0 20.9-12.4 39-30.2 47.2L448 192l104.4-20.9c-5.3-7.7-8.4-17.1-8.4-27.1c0-26.5 21.5-48 48-48s48 21.5 48 48c0 26-20.6 47.1-46.4 48L481 442.3c-10.3 23-33.2 37.7-58.4 37.7l-205.2 0c-25.2 0-48-14.8-58.4-37.7L46.4 192C20.6 191.1 0 170 0 144c0-26.5 21.5-48 48-48s48 21.5 48 48c0 10.1-3.1 19.4-8.4 27.1L192 192 298.1 99.1c-17.7-8.3-30-26.3-30-47.1c0-28.7 23.3-52 52-52s52 23.3 52 52z\"]\n};\nconst faBiohazard = {\n  prefix: 'fas',\n  iconName: 'biohazard',\n  icon: [576, 512, [9763], \"f780\", \"M173.2 0c-1.8 0-3.5 .7-4.8 2C138.5 32.3 120 74 120 120c0 26.2 6 50.9 16.6 73c-22 2.4-43.8 9.1-64.2 20.5C37.9 232.8 13.3 262.4 .4 296c-.7 1.7-.5 3.7 .5 5.2c2.2 3.7 7.4 4.3 10.6 1.3C64.2 254.3 158 245.1 205 324s-8.1 153.1-77.6 173.2c-4.2 1.2-6.3 5.9-4.1 9.6c1 1.6 2.6 2.7 4.5 3c36.5 5.9 75.2 .1 109.7-19.2c20.4-11.4 37.4-26.5 50.5-43.8c13.1 17.3 30.1 32.4 50.5 43.8c34.5 19.3 73.3 25.2 109.7 19.2c1.9-.3 3.5-1.4 4.5-3c2.2-3.7 .1-8.4-4.1-9.6C379.1 477.1 324 403 371 324s140.7-69.8 193.5-21.4c3.2 2.9 8.4 2.3 10.6-1.3c1-1.6 1.1-3.5 .5-5.2c-12.9-33.6-37.5-63.2-72.1-82.5c-20.4-11.4-42.2-18.1-64.2-20.5C450 170.9 456 146.2 456 120c0-46-18.5-87.7-48.4-118c-1.3-1.3-3-2-4.8-2c-5 0-8.4 5.2-6.7 9.9C421.7 80.5 385.6 176 288 176S154.3 80.5 179.9 9.9c1.7-4.7-1.6-9.9-6.7-9.9zM240 272a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM181.7 417.6c6.3-11.8 9.8-25.1 8.6-39.8c-19.5-18-34-41.4-41.2-67.8c-12.5-8.1-26.2-11.8-40-12.4c-9-.4-18.1 .6-27.1 2.7c7.8 57.1 38.7 106.8 82.9 139.4c6.8-6.7 12.6-14.1 16.8-22.1zM288 64c-28.8 0-56.3 5.9-81.2 16.5c2 8.3 5 16.2 9 23.5c6.8 12.4 16.7 23.1 30.1 30.3c13.3-4.1 27.5-6.3 42.2-6.3s28.8 2.2 42.2 6.3c13.4-7.2 23.3-17.9 30.1-30.3c4-7.3 7-15.2 9-23.5C344.3 69.9 316.8 64 288 64zM426.9 310c-7.2 26.4-21.7 49.7-41.2 67.8c-1.2 14.7 2.2 28.1 8.6 39.8c4.3 8 10 15.4 16.8 22.1c44.3-32.6 75.2-82.3 82.9-139.4c-9-2.2-18.1-3.1-27.1-2.7c-13.8 .6-27.5 4.4-40 12.4z\"]\n};\nconst faLocationCrosshairs = {\n  prefix: 'fas',\n  iconName: 'location-crosshairs',\n  icon: [512, 512, [\"location\"], \"f601\", \"M256 0c17.7 0 32 14.3 32 32l0 34.7C368.4 80.1 431.9 143.6 445.3 224l34.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-34.7 0C431.9 368.4 368.4 431.9 288 445.3l0 34.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.7C143.6 431.9 80.1 368.4 66.7 288L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l34.7 0C80.1 143.6 143.6 80.1 224 66.7L224 32c0-17.7 14.3-32 32-32zM128 256a128 128 0 1 0 256 0 128 128 0 1 0 -256 0zm128-80a80 80 0 1 1 0 160 80 80 0 1 1 0-160z\"]\n};\nconst faLocation = faLocationCrosshairs;\nconst faMarsDouble = {\n  prefix: 'fas',\n  iconName: 'mars-double',\n  icon: [640, 512, [9891], \"f227\", \"M312 32c-9.7 0-18.5 5.8-22.2 14.8s-1.7 19.3 5.2 26.2l33.4 33.4L275.8 159c-28.4-19.5-62.7-31-99.8-31C78.8 128 0 206.8 0 304s78.8 176 176 176s176-78.8 176-176c0-37-11.4-71.4-31-99.8l52.6-52.6L407 185c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2l0-112c0-13.3-10.7-24-24-24L312 32zm88 48s0 0 0 0s0 0 0 0s0 0 0 0zM64 304a112 112 0 1 1 224 0A112 112 0 1 1 64 304zM368 480c97.2 0 176-78.8 176-176c0-37-11.4-71.4-31-99.8l52.6-52.6L599 185c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2l0-112c0-13.3-10.7-24-24-24L504 32c-9.7 0-18.5 5.8-22.2 14.8c-1.2 2.9-1.8 6-1.8 9l0 .2 0 .2c0 6.2 2.5 12.2 7 16.8l33.4 33.4L480 146.7l0 21.3c0 22.6-13.6 43.1-34.6 51.7c-.8 .3-1.7 .7-2.5 1C465.7 241.2 480 270.9 480 304c0 61.9-50.1 112-112 112c-5.4 0-10.8-.4-16-1.1c-12.9 20.4-29.1 38.3-48.1 53.1c19.8 7.8 41.4 12 64 12z\"]\n};\nconst faChildDress = {\n  prefix: 'fas',\n  iconName: 'child-dress',\n  icon: [320, 512, [], \"e59c\", \"M224 64A64 64 0 1 0 96 64a64 64 0 1 0 128 0zM88 400l0 80c0 17.7 14.3 32 32 32s32-14.3 32-32l0-80 16 0 0 80c0 17.7 14.3 32 32 32s32-14.3 32-32l0-80 17.8 0c10.9 0 18.6-10.7 15.2-21.1l-31.1-93.4 28.6 37.8c10.7 14.1 30.8 16.8 44.8 6.2s16.8-30.7 6.2-44.8L254.6 207c-22.4-29.6-57.5-47-94.6-47s-72.2 17.4-94.6 47L6.5 284.7c-10.7 14.1-7.9 34.2 6.2 44.8s34.2 7.9 44.8-6.2l28.7-37.8L55 378.9C51.6 389.3 59.3 400 70.2 400L88 400z\"]\n};\nconst faUsersBetweenLines = {\n  prefix: 'fas',\n  iconName: 'users-between-lines',\n  icon: [640, 512, [], \"e591\", \"M0 24C0 10.7 10.7 0 24 0L616 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 48C10.7 48 0 37.3 0 24zM0 488c0-13.3 10.7-24 24-24l592 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24zM83.2 160a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM32 320c0-35.3 28.7-64 64-64l96 0c12.2 0 23.7 3.4 33.4 9.4c-37.2 15.1-65.6 47.2-75.8 86.6L64 352c-17.7 0-32-14.3-32-32zm461.6 32c-10.3-40.1-39.6-72.6-77.7-87.4c9.4-5.5 20.4-8.6 32.1-8.6l96 0c35.3 0 64 28.7 64 64c0 17.7-14.3 32-32 32l-82.4 0zM391.2 290.4c32.1 7.4 58.1 30.9 68.9 61.6c3.5 10 5.5 20.8 5.5 32c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32c0-11.2 1.9-22 5.5-32c10.5-29.7 35.3-52.8 66.1-60.9c7.8-2.1 16-3.1 24.5-3.1l96 0c7.4 0 14.7 .8 21.6 2.4zm44-130.4a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM321.6 96a80 80 0 1 1 0 160 80 80 0 1 1 0-160z\"]\n};\nconst faLungsVirus = {\n  prefix: 'fas',\n  iconName: 'lungs-virus',\n  icon: [640, 512, [], \"e067\", \"M320 0c17.7 0 32 14.3 32 32l0 124.2c-8.5-7.6-19.7-12.2-32-12.2s-23.5 4.6-32 12.2L288 32c0-17.7 14.3-32 32-32zM444.5 195.5c-16.4-16.4-41.8-18.5-60.5-6.1l0-24.1C384 127 415 96 453.3 96c21.7 0 42.8 10.2 55.8 28.8c15.4 22.1 44.3 65.4 71 116.9c26.5 50.9 52.4 112.5 59.6 170.3c.2 1.3 .2 2.6 .2 4l0 7c0 49.1-39.8 89-89 89c-7.3 0-14.5-.9-21.6-2.7l-72.7-18.2c-20.9-5.2-38.7-17.1-51.5-32.9c14 1.5 28.5-3 39.2-13.8l-22.6-22.6 22.6 22.6c18.7-18.7 18.7-49.1 0-67.9c-1.1-1.1-1.4-2-1.5-2.5c-.1-.8-.1-1.8 .4-2.9s1.2-1.9 1.8-2.3c.5-.3 1.3-.8 2.9-.8c26.5 0 48-21.5 48-48s-21.5-48-48-48c-1.6 0-2.4-.4-2.9-.8c-.6-.4-1.3-1.2-1.8-2.3s-.5-2.2-.4-2.9c.1-.6 .4-1.4 1.5-2.5c18.7-18.7 18.7-49.1 0-67.9zM421.8 421.8c-6.2 6.2-16.4 6.2-22.6 0C375.9 398.5 336 415 336 448c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-33-39.9-49.5-63.2-26.2c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6C241.5 375.9 225 336 192 336c-8.8 0-16-7.2-16-16s7.2-16 16-16c33 0 49.5-39.9 26.2-63.2c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0C264.1 241.5 304 225 304 192c0-8.8 7.2-16 16-16s16 7.2 16 16c0 33 39.9 49.5 63.2 26.2c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6C398.5 264.1 415 304 448 304c8.8 0 16 7.2 16 16s-7.2 16-16 16c-33 0-49.5 39.9-26.2 63.2c6.2 6.2 6.2 16.4 0 22.6zM183.3 491.2l-72.7 18.2c-7.1 1.8-14.3 2.7-21.6 2.7c-49.1 0-89-39.8-89-89l0-7c0-1.3 .1-2.7 .2-4c7.2-57.9 33.1-119.4 59.6-170.3c26.8-51.5 55.6-94.8 71-116.9c13-18.6 34-28.8 55.8-28.8C225 96 256 127 256 165.3l0 24.1c-18.6-12.4-44-10.3-60.5 6.1c-18.7 18.7-18.7 49.1 0 67.9c1.1 1.1 1.4 2 1.5 2.5c.1 .8 .1 1.8-.4 2.9s-1.2 1.9-1.8 2.3c-.5 .3-1.3 .8-2.9 .8c-26.5 0-48 21.5-48 48s21.5 48 48 48c1.6 0 2.4 .4 2.9 .8c.6 .4 1.3 1.2 1.8 2.3s.5 2.2 .4 2.9c-.1 .6-.4 1.4-1.5 2.5c-18.7 18.7-18.7 49.1 0 67.9c10.7 10.7 25.3 15.3 39.2 13.8c-12.8 15.9-30.6 27.7-51.5 32.9zM296 320a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm72 32a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z\"]\n};\nconst faFaceGrinTears = {\n  prefix: 'fas',\n  iconName: 'face-grin-tears',\n  icon: [640, 512, [128514, \"grin-tears\"], \"f588\", \"M548.6 371.4C506.4 454.8 419.9 512 320 512s-186.4-57.2-228.6-140.6c4.5-2.9 8.7-6.3 12.7-10.3c8.1-8.1 13.2-18.6 16.5-26.6c3.6-8.8 6.5-18.4 8.8-27.5c4.6-18.2 7.7-37 9.3-48.2c3.9-26.5-18.8-49.2-45.2-45.4c-6.8 .9-16.2 2.4-26.6 4.4C85.3 94.5 191.6 0 320 0S554.7 94.5 573.2 217.7c-10.3-2-19.8-3.5-26.6-4.4c-26.5-3.9-49.2 18.8-45.2 45.4c1.6 11.3 4.6 30 9.3 48.2c2.3 9.1 5.2 18.8 8.8 27.5c3.3 8.1 8.4 18.5 16.5 26.6c3.9 3.9 8.2 7.4 12.7 10.3zM107 254.1c-3.1 21.5-11.4 70.2-25.5 84.4c-.9 1-1.9 1.8-2.9 2.7C60 356.7 32 355.5 14.3 337.7c-18.7-18.7-19.1-48.8-.7-67.2c8.6-8.6 30.1-15.1 50.5-19.6c13-2.8 25.5-4.8 33.9-6c5.4-.8 9.9 3.7 9 9zm454.5 87.1c-.8-.6-1.5-1.3-2.3-2c-.2-.2-.5-.4-.7-.7c-14.1-14.1-22.5-62.9-25.5-84.4c-.8-5.4 3.7-9.9 9-9c1 .1 2.2 .3 3.3 .5c8.2 1.2 19.2 3 30.6 5.5c20.4 4.4 41.9 10.9 50.5 19.6c18.4 18.4 18 48.5-.7 67.2c-17.7 17.7-45.7 19-64.2 3.4zm-90.1-9.7c5-11.8-7-22.5-19.3-18.7c-39.7 12.2-84.5 19-131.8 19s-92.1-6.8-131.8-19c-12.3-3.8-24.3 6.9-19.3 18.7c25 59.1 83.2 100.5 151.1 100.5s126.2-41.4 151.1-100.5zM281.6 228.8s0 0 0 0s0 0 0 0s0 0 0 0c2.1 2.8 5.7 3.9 8.9 2.8s5.5-4.1 5.5-7.6c0-17.9-6.7-35.6-16.6-48.8c-9.8-13-23.9-23.2-39.4-23.2s-29.6 10.2-39.4 23.2C190.7 188.4 184 206.1 184 224c0 3.4 2.2 6.5 5.5 7.6s6.9 0 8.9-2.8c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.2c.2-.2 .4-.5 .7-.9c.6-.8 1.6-2 2.8-3.4c2.5-2.8 6-6.6 10.2-10.3c8.8-7.8 18.8-14 27.7-14s18.9 6.2 27.7 14c4.2 3.7 7.7 7.5 10.2 10.3c1.2 1.4 2.2 2.6 2.8 3.4c.3 .4 .6 .7 .7 .9l.2 .2c0 0 0 0 0 0zm160 0s0 0 0 0s0 0 0 0c2.1 2.8 5.7 3.9 8.9 2.8s5.5-4.1 5.5-7.6c0-17.9-6.7-35.6-16.6-48.8c-9.8-13-23.9-23.2-39.4-23.2s-29.6 10.2-39.4 23.2C350.7 188.4 344 206.1 344 224c0 3.4 2.2 6.5 5.5 7.6s6.9 0 8.9-2.8c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.2c.2-.2 .4-.5 .7-.9c.6-.8 1.6-2 2.8-3.4c2.5-2.8 6-6.6 10.2-10.3c8.8-7.8 18.8-14 27.7-14s18.9 6.2 27.7 14c4.2 3.7 7.7 7.5 10.2 10.3c1.2 1.4 2.2 2.6 2.8 3.4c.3 .4 .6 .7 .7 .9l.2 .2c0 0 0 0 0 0c0 0 0 0 0 0z\"]\n};\nconst faGrinTears = faFaceGrinTears;\nconst faPhone = {\n  prefix: 'fas',\n  iconName: 'phone',\n  icon: [512, 512, [128222, 128379], \"f095\", \"M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z\"]\n};\nconst faCalendarXmark = {\n  prefix: 'fas',\n  iconName: 'calendar-xmark',\n  icon: [448, 512, [\"calendar-times\"], \"f273\", \"M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM305 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z\"]\n};\nconst faCalendarTimes = faCalendarXmark;\nconst faChildReaching = {\n  prefix: 'fas',\n  iconName: 'child-reaching',\n  icon: [384, 512, [], \"e59d\", \"M256 64A64 64 0 1 0 128 64a64 64 0 1 0 128 0zM152.9 169.3c-23.7-8.4-44.5-24.3-58.8-45.8L74.6 94.2C64.8 79.5 45 75.6 30.2 85.4s-18.7 29.7-8.9 44.4L40.9 159c18.1 27.1 42.8 48.4 71.1 62.4L112 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 32 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-258.4c29.1-14.2 54.4-36.2 72.7-64.2l18.2-27.9c9.6-14.8 5.4-34.6-9.4-44.3s-34.6-5.5-44.3 9.4L291 122.4c-21.8 33.4-58.9 53.6-98.8 53.6c-12.6 0-24.9-2-36.6-5.8c-.9-.3-1.8-.7-2.7-.9z\"]\n};\nconst faHeadSideVirus = {\n  prefix: 'fas',\n  iconName: 'head-side-virus',\n  icon: [512, 512, [], \"e064\", \"M0 224.2C0 100.6 100.2 0 224 0l24 0c95.2 0 181.2 69.3 197.3 160.2c2.3 13 6.8 25.7 15.1 36l42 52.6c6.2 7.8 9.6 17.4 9.6 27.4c0 24.2-19.6 43.8-43.8 43.8L448 320l0 64c0 35.3-28.7 64-64 64l-64 0 0 32c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-72.7c0-16.7-6.9-32.5-17.1-45.8C16.6 322.4 0 274.1 0 224.2zM224 64c-8.8 0-16 7.2-16 16c0 33-39.9 49.5-63.2 26.2c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6C145.5 152.1 129 192 96 192c-8.8 0-16 7.2-16 16s7.2 16 16 16c33 0 49.5 39.9 26.2 63.2c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0C168.1 286.5 208 303 208 336c0 8.8 7.2 16 16 16s16-7.2 16-16c0-33 39.9-49.5 63.2-26.2c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6C302.5 263.9 319 224 352 224c8.8 0 16-7.2 16-16s-7.2-16-16-16c-33 0-49.5-39.9-26.2-63.2c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0C279.9 129.5 240 113 240 80c0-8.8-7.2-16-16-16zm-24 96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm40 80a16 16 0 1 1 32 0 16 16 0 1 1 -32 0z\"]\n};\nconst faUserGear = {\n  prefix: 'fas',\n  iconName: 'user-gear',\n  icon: [640, 512, [\"user-cog\"], \"f4fe\", \"M224 0a128 128 0 1 1 0 256A128 128 0 1 1 224 0zM178.3 304l91.4 0c11.8 0 23.4 1.2 34.5 3.3c-2.1 18.5 7.4 35.6 21.8 44.8c-16.6 10.6-26.7 31.6-20 53.3c4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7l0 .9c0 9.2 2.7 18.5 7.9 26.3L29.7 512C13.3 512 0 498.7 0 482.3C0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8c10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8l0 30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4c7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1 .7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2c-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4l-24.9-14.3c-6.9 5.1-14.3 9.4-22.3 12.8l0 30.6c0 7-4.5 13.3-11.3 14.8c-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8l0-30.5c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4c-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3 .7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2c3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9l0-30.5zm92.1 133.5a48.1 48.1 0 1 0 -96.1 0 48.1 48.1 0 1 0 96.1 0z\"]\n};\nconst faUserCog = faUserGear;\nconst faArrowUp19 = {\n  prefix: 'fas',\n  iconName: 'arrow-up-1-9',\n  icon: [576, 512, [\"sort-numeric-up\"], \"f163\", \"M450.7 38c8.3 6 13.3 15.7 13.3 26l0 96 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-48 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-51.6-5.9 2c-16.8 5.6-34.9-3.5-40.5-20.2s3.5-34.9 20.2-40.5l48-16c9.8-3.3 20.5-1.6 28.8 4.4zM160 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L192 146.3 192 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-301.7L95.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C142.5 35.8 151 32 160 32zM445.7 364.9A32 32 0 1 0 418.3 307a32 32 0 1 0 27.4 57.9zm-40.7 54.9C369.6 408.4 344 375.2 344 336c0-48.6 39.4-88 88-88s88 39.4 88 88c0 23.5-7.5 46.3-21.5 65.2L449.7 467c-10.5 14.2-30.6 17.2-44.8 6.7s-17.2-30.6-6.7-44.8l6.8-9.2z\"]\n};\nconst faSortNumericUp = faArrowUp19;\nconst faDoorClosed = {\n  prefix: 'fas',\n  iconName: 'door-closed',\n  icon: [576, 512, [128682], \"f52a\", \"M96 64c0-35.3 28.7-64 64-64L416 0c35.3 0 64 28.7 64 64l0 384 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-112 0-288 0L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0L96 64zM384 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faShieldVirus = {\n  prefix: 'fas',\n  iconName: 'shield-virus',\n  icon: [512, 512, [], \"e06c\", \"M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM256 112c8.8 0 16 7.2 16 16c0 33 39.9 49.5 63.2 26.2c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6C334.5 200.1 351 240 384 240c8.8 0 16 7.2 16 16s-7.2 16-16 16c-33 0-49.5 39.9-26.2 63.2c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0C311.9 334.5 272 351 272 384c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-33-39.9-49.5-63.2-26.2c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6C177.5 311.9 161 272 128 272c-8.8 0-16-7.2-16-16s7.2-16 16-16c33 0 49.5-39.9 26.2-63.2c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0C200.1 177.5 240 161 240 128c0-8.8 7.2-16 16-16zM232 256a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm72 32a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z\"]\n};\nconst faDiceSix = {\n  prefix: 'fas',\n  iconName: 'dice-six',\n  icon: [448, 512, [9861], \"f526\", \"M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm160 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM128 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM320 192a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM320 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faMosquitoNet = {\n  prefix: 'fas',\n  iconName: 'mosquito-net',\n  icon: [640, 512, [], \"e52c\", \"M168.8 462.3c-7.9-4-11.1-13.6-7.2-21.5L192 380.2l0-44.2c0-4.2 1.7-8.3 4.7-11.3L256 265.4l0-23.1L139.2 344C87.8 395.3 0 358.9 0 286.3c0-41.1 30.6-75.8 71.4-80.9l159.9-23.9-49.6-41.3c-5.1-4.2-7-11.1-4.9-17.4l13.9-41.7-29-58.1c-4-7.9-.7-17.5 7.2-21.5s17.5-.7 21.5 7.2l32 64c1.9 3.8 2.2 8.2 .9 12.2l-12.5 37.6L256 160.5l0-22.6c0-14.9 10.1-27.3 23.8-31l0-43.3c0-4.5 3.7-8.2 8.2-8.2s8.2 3.7 8.2 8.2l0 43.3c13.7 3.6 23.8 16.1 23.8 31l0 22.6 45.4-37.8L352.8 85.1c-1.3-4-1-8.4 .9-12.2l32-64c4-7.9 13.6-11.1 21.5-7.2s11.1 13.6 7.2 21.5l-29 58.1 13.9 41.7c2.1 6.2 .1 13.1-4.9 17.4l-49.6 41.3 159.9 23.9c22.5 2.8 41.8 14.6 54.7 31.4c-2.7 2.6-5.2 5.4-7.3 8.6c-8.6-12.9-23.3-21.5-40-21.5s-31.4 8.5-40 21.5c-8.6-12.9-23.3-21.5-40-21.5c-21.7 0-40 14.3-45.9 34.1c-10.7 3.2-19.8 10.1-25.9 19.2l-40.2-35 0 23.1 32.4 32.4c-.3 2-.4 4.1-.4 6.2c0 16.7 8.5 31.4 21.5 40c-4 2.6-7.5 5.9-10.6 9.5L320 310.6l0 50c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-50-32 32 0 41.4c0 2.5-.6 4.9-1.7 7.2l-32 64c-4 7.9-13.6 11.1-21.5 7.2zM512 256c8.8 0 16 7.2 16 16l0 16 48 0 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 16 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0 0 48 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0 0 48 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-16-48 0 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-16-48 0 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-16-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 0-48-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 0-48-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 16 48 0 0-16c0-8.8 7.2-16 16-16zm16 112l48 0 0-48-48 0 0 48zm0 80l48 0 0-48-48 0 0 48zM448 320l0 48 48 0 0-48-48 0zm0 80l0 48 48 0 0-48-48 0z\"]\n};\nconst faFileFragment = {\n  prefix: 'fas',\n  iconName: 'file-fragment',\n  icon: [384, 512, [], \"e697\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64l-128 0 0-128c0-35.3-28.7-64-64-64L0 320 0 64zm384 64l-128 0L256 0 384 128zM32 352l96 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32z\"]\n};\nconst faBridgeWater = {\n  prefix: 'fas',\n  iconName: 'bridge-water',\n  icon: [576, 512, [], \"e4ce\", \"M0 96C0 78.3 14.3 64 32 64l512 0c17.7 0 32 14.3 32 32l0 35.6c0 15.7-12.7 28.4-28.4 28.4c-37.3 0-67.6 30.2-67.6 67.6l0 124.9c-12.9 0-25.8 3.9-36.8 11.7c-18 12.4-40.1 20.3-59.2 20.3c0 0 0 0 0 0l0-.5 0-128c0-53-43-96-96-96s-96 43-96 96l0 128 0 .5c-19 0-41.2-7.9-59.1-20.3c-11.1-7.8-24-11.7-36.9-11.7l0-124.9C96 190.2 65.8 160 28.4 160C12.7 160 0 147.3 0 131.6L0 96zM306.5 389.9C329 405.4 356.5 416 384 416c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 469.7 417 480 384 480c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 405.2 165.1 416 192 416c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z\"]\n};\nconst faPersonBooth = {\n  prefix: 'fas',\n  iconName: 'person-booth',\n  icon: [576, 512, [], \"f756\", \"M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160 64 0 0-160zm320 0c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-448zM224 512c17.7 0 32-14.3 32-32l0-160-64 0 0 160c0 17.7 14.3 32 32 32zM320 0c-9.3 0-18.1 4-24.2 11s-8.8 16.3-7.5 25.5l31.2 218.6L288.6 409.7c-3.5 17.3 7.8 34.2 25.1 37.7s34.2-7.8 37.7-25.1l.7-3.6c1.3 16.4 15.1 29.4 31.9 29.4c17.7 0 32-14.3 32-32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-384c0-17.7-14.3-32-32-32L320 0zM112 80A48 48 0 1 0 16 80a48 48 0 1 0 96 0zm0 261.3l0-72.1 4.7 4.7c9 9 21.2 14.1 33.9 14.1l73.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-66.7 0-41.6-41.6c-14.3-14.3-33.8-22.4-54-22.4C27.6 160 0 187.6 0 221.6l0 55.7 0 .9L0 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 32 42.7L96 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-58.7c0-10.4-3.4-20.5-9.6-28.8L112 341.3z\"]\n};\nconst faTextWidth = {\n  prefix: 'fas',\n  iconName: 'text-width',\n  icon: [448, 512, [], \"f035\", \"M64 128l0-32 128 0 0 128-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-128 128 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48c0-26.5-21.5-48-48-48L224 32 48 32C21.5 32 0 53.5 0 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32zM9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-32 192 0 0 32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 32-192 0 0-32c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64z\"]\n};\nconst faHatWizard = {\n  prefix: 'fas',\n  iconName: 'hat-wizard',\n  icon: [512, 512, [], \"f6e8\", \"M64 416L168.6 180.7c15.3-34.4 40.3-63.5 72-83.7l146.9-94c3-1.9 6.5-2.9 10-2.9C407.7 0 416 8.3 416 18.6l0 1.6c0 2.6-.5 5.1-1.4 7.5L354.8 176.9c-1.9 4.7-2.8 9.7-2.8 14.7c0 5.5 1.2 11 3.4 16.1L448 416l-207.1 0 11.8-35.4 40.4-13.5c6.5-2.2 10.9-8.3 10.9-15.2s-4.4-13-10.9-15.2l-40.4-13.5-13.5-40.4C237 276.4 230.9 272 224 272s-13 4.4-15.2 10.9l-13.5 40.4-40.4 13.5C148.4 339 144 345.1 144 352s4.4 13 10.9 15.2l40.4 13.5L207.1 416 64 416zM279.6 141.5c-1.1-3.3-4.1-5.5-7.6-5.5s-6.5 2.2-7.6 5.5l-6.7 20.2-20.2 6.7c-3.3 1.1-5.5 4.1-5.5 7.6s2.2 6.5 5.5 7.6l20.2 6.7 6.7 20.2c1.1 3.3 4.1 5.5 7.6 5.5s6.5-2.2 7.6-5.5l6.7-20.2 20.2-6.7c3.3-1.1 5.5-4.1 5.5-7.6s-2.2-6.5-5.5-7.6l-20.2-6.7-6.7-20.2zM32 448l448 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faPenFancy = {\n  prefix: 'fas',\n  iconName: 'pen-fancy',\n  icon: [512, 512, [128395, 10002], \"f5ac\", \"M373.5 27.1C388.5 9.9 410.2 0 433 0c43.6 0 79 35.4 79 79c0 22.8-9.9 44.6-27.1 59.6L277.7 319l-10.3-10.3-64-64L193 234.3 373.5 27.1zM170.3 256.9l10.4 10.4 64 64 10.4 10.4-19.2 83.4c-3.9 17.1-16.9 30.7-33.8 35.4L24.3 510.3l95.4-95.4c2.6 .7 5.4 1.1 8.3 1.1c17.7 0 32-14.3 32-32s-14.3-32-32-32s-32 14.3-32 32c0 2.9 .4 5.6 1.1 8.3L1.7 487.6 51.5 310c4.7-16.9 18.3-29.9 35.4-33.8l83.4-19.2z\"]\n};\nconst faPersonDigging = {\n  prefix: 'fas',\n  iconName: 'person-digging',\n  icon: [576, 512, [\"digging\"], \"f85e\", \"M208 64a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM9.8 214.8c5.1-12.2 19.1-18 31.4-12.9L60.7 210l22.9-38.1C99.9 144.6 129.3 128 161 128c51.4 0 97 32.9 113.3 81.7l34.6 103.7 79.3 33.1 34.2-45.6c6.4-8.5 16.6-13.3 27.2-12.8s20.3 6.4 25.8 15.5l96 160c5.9 9.9 6.1 22.2 .4 32.2s-16.3 16.2-27.8 16.2l-256 0c-11.1 0-21.4-5.7-27.2-15.2s-6.4-21.2-1.4-31.1l16-32c5.4-10.8 16.5-17.7 28.6-17.7l32 0 22.5-30L22.8 246.2c-12.2-5.1-18-19.1-12.9-31.4zm82.8 91.8l112 48c11.8 5 19.4 16.6 19.4 29.4l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-74.9-60.6-26-37 111c-5.6 16.8-23.7 25.8-40.5 20.2S-3.9 486.6 1.6 469.9l48-144 11-33 32 13.7z\"]\n};\nconst faDigging = faPersonDigging;\nconst faTrash = {\n  prefix: 'fas',\n  iconName: 'trash',\n  icon: [448, 512, [], \"f1f8\", \"M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z\"]\n};\nconst faGaugeSimple = {\n  prefix: 'fas',\n  iconName: 'gauge-simple',\n  icon: [512, 512, [\"gauge-simple-med\", \"tachometer-average\"], \"f629\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-26.9-16.5-49.9-40-59.3L280 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 204.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faGaugeSimpleMed = faGaugeSimple;\nconst faTachometerAverage = faGaugeSimple;\nconst faBookMedical = {\n  prefix: 'fas',\n  iconName: 'book-medical',\n  icon: [448, 512, [], \"f7e6\", \"M0 96C0 43 43 0 96 0L384 0l32 0c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0L96 512c-53 0-96-43-96-96L0 96zM64 416c0 17.7 14.3 32 32 32l256 0 0-64L96 384c-17.7 0-32 14.3-32 32zM208 112l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-48 0 0-48c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faPoo = {\n  prefix: 'fas',\n  iconName: 'poo',\n  icon: [512, 512, [128169], \"f2fe\", \"M268.9 .9c-5.5-.7-11 1.4-14.5 5.7s-4.6 10.1-2.8 15.4c2.8 8.2 4.3 16.9 4.3 26.1c0 44.1-35.7 79.9-79.8 80L160 128c-35.3 0-64 28.7-64 64c0 19.1 8.4 36.3 21.7 48L104 240c-39.8 0-72 32.2-72 72c0 23.2 11 43.8 28 57c-34.1 5.7-60 35.3-60 71c0 39.8 32.2 72 72 72l368 0c39.8 0 72-32.2 72-72c0-35.7-25.9-65.3-60-71c17-13.2 28-33.8 28-57c0-39.8-32.2-72-72-72l-13.7 0c13.3-11.7 21.7-28.9 21.7-48c0-35.3-28.7-64-64-64l-5.5 0c3.5-10 5.5-20.8 5.5-32c0-48.6-36.2-88.8-83.1-95.1zM192 256a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm64 108.3c0 2.4-.7 4.8-2.2 6.7c-8.2 10.5-39.5 45-93.8 45s-85.6-34.6-93.8-45c-1.5-1.9-2.2-4.3-2.2-6.7c0-6.8 5.5-12.3 12.3-12.3l167.4 0c6.8 0 12.3 5.5 12.3 12.3z\"]\n};\nconst faQuoteRight = {\n  prefix: 'fas',\n  iconName: 'quote-right',\n  icon: [448, 512, [8221, \"quote-right-alt\"], \"f10e\", \"M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z\"]\n};\nconst faQuoteRightAlt = faQuoteRight;\nconst faShirt = {\n  prefix: 'fas',\n  iconName: 'shirt',\n  icon: [640, 512, [128085, \"t-shirt\", \"tshirt\"], \"f553\", \"M211.8 0c7.8 0 14.3 5.7 16.7 13.2C240.8 51.9 277.1 80 320 80s79.2-28.1 91.5-66.8C413.9 5.7 420.4 0 428.2 0l12.6 0c22.5 0 44.2 7.9 61.5 22.3L628.5 127.4c6.6 5.5 10.7 13.5 11.4 22.1s-2.1 17.1-7.8 23.6l-56 64c-11.4 13.1-31.2 14.6-44.6 3.5L480 197.7 480 448c0 35.3-28.7 64-64 64l-192 0c-35.3 0-64-28.7-64-64l0-250.3-51.5 42.9c-13.3 11.1-33.1 9.6-44.6-3.5l-56-64c-5.7-6.5-8.5-15-7.8-23.6s4.8-16.6 11.4-22.1L137.7 22.3C155 7.9 176.7 0 199.2 0l12.6 0z\"]\n};\nconst faTShirt = faShirt;\nconst faTshirt = faShirt;\nconst faCubes = {\n  prefix: 'fas',\n  iconName: 'cubes',\n  icon: [576, 512, [], \"f1b3\", \"M290.8 48.6l78.4 29.7L288 109.5 206.8 78.3l78.4-29.7c1.8-.7 3.8-.7 5.7 0zM136 92.5l0 112.2c-1.3 .4-2.6 .8-3.9 1.3l-96 36.4C14.4 250.6 0 271.5 0 294.7L0 413.9c0 22.2 13.1 42.3 33.5 51.3l96 42.2c14.4 6.3 30.7 6.3 45.1 0L288 457.5l113.5 49.9c14.4 6.3 30.7 6.3 45.1 0l96-42.2c20.3-8.9 33.5-29.1 33.5-51.3l0-119.1c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-1.3-.5-2.6-.9-3.9-1.3l0-112.2c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-12.8-4.8-26.9-4.8-39.7 0l-96 36.4C150.4 48.4 136 69.3 136 92.5zM392 210.6l-82.4 31.2 0-89.2L392 121l0 89.6zM154.8 250.9l78.4 29.7L152 311.7 70.8 280.6l78.4-29.7c1.8-.7 3.8-.7 5.7 0zm18.8 204.4l0-100.5L256 323.2l0 95.9-82.4 36.2zM421.2 250.9c1.8-.7 3.8-.7 5.7 0l78.4 29.7L424 311.7l-81.2-31.1 78.4-29.7zM523.2 421.2l-77.6 34.1 0-100.5L528 323.2l0 90.7c0 3.2-1.9 6-4.8 7.3z\"]\n};\nconst faDivide = {\n  prefix: 'fas',\n  iconName: 'divide',\n  icon: [448, 512, [10135, 247], \"f529\", \"M272 96a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 320a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM400 288c17.7 0 32-14.3 32-32s-14.3-32-32-32L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l352 0z\"]\n};\nconst faTengeSign = {\n  prefix: 'fas',\n  iconName: 'tenge-sign',\n  icon: [384, 512, [8376, \"tenge\"], \"f7d7\", \"M0 64C0 46.3 14.3 32 32 32l320 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM0 192c0-17.7 14.3-32 32-32l160 0 160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-128 0 0 224c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-224L32 224c-17.7 0-32-14.3-32-32z\"]\n};\nconst faTenge = faTengeSign;\nconst faHeadphones = {\n  prefix: 'fas',\n  iconName: 'headphones',\n  icon: [512, 512, [127911], \"f025\", \"M256 80C149.9 80 62.4 159.4 49.6 262c9.4-3.8 19.6-6 30.4-6c26.5 0 48 21.5 48 48l0 128c0 26.5-21.5 48-48 48c-44.2 0-80-35.8-80-80l0-16 0-48 0-48C0 146.6 114.6 32 256 32s256 114.6 256 256l0 48 0 48 0 16c0 44.2-35.8 80-80 80c-26.5 0-48-21.5-48-48l0-128c0-26.5 21.5-48 48-48c10.8 0 21 2.1 30.4 6C449.6 159.4 362.1 80 256 80z\"]\n};\nconst faHandsHolding = {\n  prefix: 'fas',\n  iconName: 'hands-holding',\n  icon: [640, 512, [], \"f4c2\", \"M80 104c0-22.1-17.9-40-40-40S0 81.9 0 104l0 56 0 64L0 325.5c0 25.5 10.1 49.9 28.1 67.9L128 493.3c12 12 28.3 18.7 45.3 18.7l66.7 0c26.5 0 48-21.5 48-48l0-78.9c0-29.7-11.8-58.2-32.8-79.2l-25.3-25.3c0 0 0 0 0 0l-15.2-15.2-32-32c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l32 32 15.2 15.2c11 11 9.2 29.2-3.7 37.8c-9.7 6.5-22.7 5.2-31-3.1L98.7 309.5c-12-12-18.7-28.3-18.7-45.3L80 224l0-80 0-40zm480 0l0 40 0 80 0 40.2c0 17-6.7 33.3-18.7 45.3l-51.1 51.1c-8.3 8.3-21.3 9.6-31 3.1c-12.9-8.6-14.7-26.9-3.7-37.8l15.2-15.2 32-32c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-32 32-15.2 15.2c0 0 0 0 0 0l-25.3 25.3c-21 21-32.8 49.5-32.8 79.2l0 78.9c0 26.5 21.5 48 48 48l66.7 0c17 0 33.3-6.7 45.3-18.7l99.9-99.9c18-18 28.1-42.4 28.1-67.9L640 224l0-64 0-56c0-22.1-17.9-40-40-40s-40 17.9-40 40z\"]\n};\nconst faHandsClapping = {\n  prefix: 'fas',\n  iconName: 'hands-clapping',\n  icon: [512, 512, [], \"e1a8\", \"M336 16l0 64c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16zm-98.7 7.1l32 48c4.9 7.4 2.9 17.3-4.4 22.2s-17.3 2.9-22.2-4.4l-32-48c-4.9-7.4-2.9-17.3 4.4-22.2s17.3-2.9 22.2 4.4zM135 119c9.4-9.4 24.6-9.4 33.9 0L292.7 242.7c10.1 10.1 27.3 2.9 27.3-11.3l0-39.4c0-17.7 14.3-32 32-32s32 14.3 32 32l0 153.6c0 57.1-30 110-78.9 139.4c-64 38.4-145.8 28.3-198.5-24.4L7 361c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l53 53c6.1 6.1 16 6.1 22.1 0s6.1-16 0-22.1L23 265c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l93 93c6.1 6.1 16 6.1 22.1 0s6.1-16 0-22.1L55 185c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l117 117c6.1 6.1 16 6.1 22.1 0s6.1-16 0-22.1l-93-93c-9.4-9.4-9.4-24.6 0-33.9zM433.1 484.9c-24.2 14.5-50.9 22.1-77.7 23.1c48.1-39.6 76.6-99 76.6-162.4l0-98.1c8.2-.1 16-6.4 16-16l0-39.4c0-17.7 14.3-32 32-32s32 14.3 32 32l0 153.6c0 57.1-30 110-78.9 139.4zM424.9 18.7c7.4 4.9 9.3 14.8 4.4 22.2l-32 48c-4.9 7.4-14.8 9.3-22.2 4.4s-9.3-14.8-4.4-22.2l32-48c4.9-7.4 14.8-9.3 22.2-4.4z\"]\n};\nconst faRepublican = {\n  prefix: 'fas',\n  iconName: 'republican',\n  icon: [640, 512, [], \"f75e\", \"M0 192C0 103.6 71.6 32 160 32l224 0c88.4 0 160 71.6 160 160l0 64L0 256l0-64zm415.9-64c-2.4 0-4.7 1.3-5.7 3.4l-12.6 24.6-28.2 4c-2.4 .3-4.4 2-5.2 4.2s-.1 4.7 1.6 6.3l20.4 19.2-4.8 27.1c-.4 2.3 .6 4.7 2.5 6s4.6 1.6 6.7 .5l25.2-12.8 25.2 12.8c2.2 1.1 4.8 .9 6.7-.5s3-3.7 2.5-6l-4.8-27.1L466 170.5c1.7-1.6 2.4-4.1 1.6-6.3s-2.8-3.9-5.2-4.2l-28.2-4-12.6-24.6c-1.1-2.1-3.3-3.4-5.7-3.4zm-138.3 3.4c-1.1-2.1-3.3-3.4-5.7-3.4s-4.7 1.3-5.7 3.4l-12.6 24.6-28.2 4c-2.4 .3-4.4 2-5.2 4.2s-.1 4.7 1.6 6.3l20.4 19.2-4.8 27.1c-.4 2.3 .6 4.7 2.5 6s4.6 1.6 6.7 .5l25.2-12.8 25.2 12.8c2.2 1.1 4.8 .9 6.7-.5s3-3.7 2.5-6l-4.8-27.1L322 170.5c1.7-1.6 2.4-4.1 1.6-6.3s-2.8-3.9-5.2-4.2l-28.2-4-12.6-24.6zM127.9 128c-2.4 0-4.7 1.3-5.7 3.4l-12.6 24.6-28.2 4c-2.4 .3-4.4 2-5.2 4.2s-.1 4.7 1.6 6.3l20.4 19.2-4.8 27.1c-.4 2.3 .6 4.7 2.5 6s4.6 1.6 6.7 .5l25.2-12.8 25.2 12.8c2.2 1.1 4.8 .9 6.7-.5s3-3.7 2.5-6l-4.8-27.1L178 170.5c1.7-1.6 2.4-4.1 1.6-6.3s-2.8-3.9-5.2-4.2l-28.2-4-12.6-24.6c-1.1-2.1-3.3-3.4-5.7-3.4zm.1 160l192 0 96 0 32 0 64 0 32 0 0 32 0 80c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48c0-17.7 14.3-32 32-32s32 14.3 32 32l0 48c0 44.2-35.8 80-80 80s-80-35.8-80-80l0-48-32 0 0 32 0 64c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-64-192 0 0 64c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-64 0-96 128 0z\"]\n};\nconst faArrowLeft = {\n  prefix: 'fas',\n  iconName: 'arrow-left',\n  icon: [448, 512, [8592], \"f060\", \"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z\"]\n};\nconst faPersonCircleXmark = {\n  prefix: 'fas',\n  iconName: 'person-circle-xmark',\n  icon: [576, 512, [], \"e543\", \"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zM432 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm59.3 107.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L432 345.4l-36.7-36.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L409.4 368l-36.7 36.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L432 390.6l36.7 36.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L454.6 368l36.7-36.7z\"]\n};\nconst faRuler = {\n  prefix: 'fas',\n  iconName: 'ruler',\n  icon: [512, 512, [128207], \"f545\", \"M177.9 494.1c-18.7 18.7-49.1 18.7-67.9 0L17.9 401.9c-18.7-18.7-18.7-49.1 0-67.9l50.7-50.7 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 50.7-50.7c18.7-18.7 49.1-18.7 67.9 0l92.1 92.1c18.7 18.7 18.7 49.1 0 67.9L177.9 494.1z\"]\n};\nconst faAlignLeft = {\n  prefix: 'fas',\n  iconName: 'align-left',\n  icon: [448, 512, [], \"f036\", \"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z\"]\n};\nconst faDiceD6 = {\n  prefix: 'fas',\n  iconName: 'dice-d6',\n  icon: [448, 512, [], \"f6d1\", \"M201 10.3c14.3-7.8 31.6-7.8 46 0L422.3 106c5.1 2.8 8.3 8.2 8.3 14s-3.2 11.2-8.3 14L231.7 238c-4.8 2.6-10.5 2.6-15.3 0L25.7 134c-5.1-2.8-8.3-8.2-8.3-14s3.2-11.2 8.3-14L201 10.3zM23.7 170l176 96c5.1 2.8 8.3 8.2 8.3 14l0 216c0 5.6-3 10.9-7.8 13.8s-10.9 3-15.8 .3L25 423.1C9.6 414.7 0 398.6 0 381L0 184c0-5.6 3-10.9 7.8-13.8s10.9-3 15.8-.3zm400.7 0c5-2.7 11-2.6 15.8 .3s7.8 8.1 7.8 13.8l0 197c0 17.6-9.6 33.7-25 42.1L263.7 510c-5 2.7-11 2.6-15.8-.3s-7.8-8.1-7.8-13.8l0-216c0-5.9 3.2-11.2 8.3-14l176-96z\"]\n};\nconst faRestroom = {\n  prefix: 'fas',\n  iconName: 'restroom',\n  icon: [640, 512, [], \"f7bd\", \"M80 48a48 48 0 1 1 96 0A48 48 0 1 1 80 48zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-154.8c-8.1 9.2-21.1 13.2-33.5 9.4c-16.9-5.3-26.3-23.2-21-40.1l30.9-99.1C44.9 155.3 82 128 124 128l8 0c42 0 79.1 27.3 91.6 67.4l30.9 99.1c5.3 16.9-4.1 34.8-21 40.1c-12.4 3.9-25.4-.2-33.5-9.4L200 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zM320 0c13.3 0 24 10.7 24 24l0 464c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-464c0-13.3 10.7-24 24-24zM464 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM440 480l0-96-17.8 0c-10.9 0-18.6-10.7-15.2-21.1l9-26.9c-3.2 0-6.4-.5-9.5-1.5c-16.9-5.3-26.3-23.2-21-40.1l29.7-95.2C428.4 156.9 467.6 128 512 128s83.6 28.9 96.8 71.2l29.7 95.2c5.3 16.9-4.1 34.8-21 40.1c-3.2 1-6.4 1.5-9.5 1.5l9 26.9c3.5 10.4-4.3 21.1-15.2 21.1L584 384l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-16 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32z\"]\n};\nconst faJ = {\n  prefix: 'fas',\n  iconName: 'j',\n  icon: [320, 512, [106], \"4a\", \"M288 32c17.7 0 32 14.3 32 32l0 256c0 88.4-71.6 160-160 160S0 408.4 0 320l0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32c0 53 43 96 96 96s96-43 96-96l0-256c0-17.7 14.3-32 32-32z\"]\n};\nconst faUsersViewfinder = {\n  prefix: 'fas',\n  iconName: 'users-viewfinder',\n  icon: [640, 512, [], \"e595\", \"M48 48l88 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L32 0C14.3 0 0 14.3 0 32L0 136c0 13.3 10.7 24 24 24s24-10.7 24-24l0-88zM175.8 224a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-26.5 32C119.9 256 96 279.9 96 309.3c0 14.7 11.9 26.7 26.7 26.7l56.1 0c8-34.1 32.8-61.7 65.2-73.6c-7.5-4.1-16.2-6.4-25.3-6.4l-69.3 0zm368 80c14.7 0 26.7-11.9 26.7-26.7c0-29.5-23.9-53.3-53.3-53.3l-69.3 0c-9.2 0-17.8 2.3-25.3 6.4c32.4 11.9 57.2 39.5 65.2 73.6l56.1 0zm-89.4 0c-8.6-24.3-29.9-42.6-55.9-47c-3.9-.7-7.9-1-12-1l-80 0c-4.1 0-8.1 .3-12 1c-26 4.4-47.3 22.7-55.9 47c-2.7 7.5-4.1 15.6-4.1 24c0 13.3 10.7 24 24 24l176 0c13.3 0 24-10.7 24-24c0-8.4-1.4-16.5-4.1-24zM464 224a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-80-32a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zM504 48l88 0 0 88c0 13.3 10.7 24 24 24s24-10.7 24-24l0-104c0-17.7-14.3-32-32-32L504 0c-13.3 0-24 10.7-24 24s10.7 24 24 24zM48 464l0-88c0-13.3-10.7-24-24-24s-24 10.7-24 24L0 480c0 17.7 14.3 32 32 32l104 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-88 0zm456 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l104 0c17.7 0 32-14.3 32-32l0-104c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 88-88 0z\"]\n};\nconst faFileVideo = {\n  prefix: 'fas',\n  iconName: 'file-video',\n  icon: [384, 512, [], \"f1c8\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM64 288c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-96zM300.9 397.9L256 368l0-64 44.9-29.9c2-1.3 4.4-2.1 6.8-2.1c6.8 0 12.3 5.5 12.3 12.3l0 103.4c0 6.8-5.5 12.3-12.3 12.3c-2.4 0-4.8-.7-6.8-2.1z\"]\n};\nconst faUpRightFromSquare = {\n  prefix: 'fas',\n  iconName: 'up-right-from-square',\n  icon: [512, 512, [\"external-link-alt\"], \"f35d\", \"M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z\"]\n};\nconst faExternalLinkAlt = faUpRightFromSquare;\nconst faTableCells = {\n  prefix: 'fas',\n  iconName: 'table-cells',\n  icon: [512, 512, [\"th\"], \"f00a\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm88 64l0 64-88 0 0-64 88 0zm56 0l88 0 0 64-88 0 0-64zm240 0l0 64-88 0 0-64 88 0zM64 224l88 0 0 64-88 0 0-64zm232 0l0 64-88 0 0-64 88 0zm64 0l88 0 0 64-88 0 0-64zM152 352l0 64-88 0 0-64 88 0zm56 0l88 0 0 64-88 0 0-64zm240 0l0 64-88 0 0-64 88 0z\"]\n};\nconst faTh = faTableCells;\nconst faFilePdf = {\n  prefix: 'fas',\n  iconName: 'file-pdf',\n  icon: [512, 512, [], \"f1c1\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z\"]\n};\nconst faBookBible = {\n  prefix: 'fas',\n  iconName: 'book-bible',\n  icon: [448, 512, [\"bible\"], \"f647\", \"M96 0C43 0 0 43 0 96L0 416c0 53 43 96 96 96l288 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-64c17.7 0 32-14.3 32-32l0-320c0-17.7-14.3-32-32-32L384 0 96 0zm0 384l256 0 0 64L96 448c-17.7 0-32-14.3-32-32s14.3-32 32-32zM208 80c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 112c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-112-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faBible = faBookBible;\nconst faO = {\n  prefix: 'fas',\n  iconName: 'o',\n  icon: [448, 512, [111], \"4f\", \"M224 96a160 160 0 1 0 0 320 160 160 0 1 0 0-320zM448 256A224 224 0 1 1 0 256a224 224 0 1 1 448 0z\"]\n};\nconst faSuitcaseMedical = {\n  prefix: 'fas',\n  iconName: 'suitcase-medical',\n  icon: [512, 512, [\"medkit\"], \"f0fa\", \"M184 48l144 0c4.4 0 8 3.6 8 8l0 40L176 96l0-40c0-4.4 3.6-8 8-8zm-56 8l0 40 0 32 0 352 256 0 0-352 0-32 0-40c0-30.9-25.1-56-56-56L184 0c-30.9 0-56 25.1-56 56zM96 96L64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l32 0L96 96zM416 480l32 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-32 0 0 384zM224 208c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faMedkit = faSuitcaseMedical;\nconst faUserSecret = {\n  prefix: 'fas',\n  iconName: 'user-secret',\n  icon: [448, 512, [128373], \"f21b\", \"M224 16c-6.7 0-10.8-2.8-15.5-6.1C201.9 5.4 194 0 176 0c-30.5 0-52 43.7-66 89.4C62.7 98.1 32 112.2 32 128c0 14.3 25 27.1 64.6 35.9c-.4 4-.6 8-.6 12.1c0 17 3.3 33.2 9.3 48l-59.9 0C38 224 32 230 32 237.4c0 1.7 .3 3.4 1 5l38.8 96.9C28.2 371.8 0 423.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7c0-58.5-28.2-110.4-71.7-143L415 242.4c.6-1.6 1-3.3 1-5c0-7.4-6-13.4-13.4-13.4l-59.9 0c6-14.8 9.3-31 9.3-48c0-4.1-.2-8.1-.6-12.1C391 155.1 416 142.3 416 128c0-15.8-30.7-29.9-78-38.6C324 43.7 302.5 0 272 0c-18 0-25.9 5.4-32.5 9.9c-4.8 3.3-8.8 6.1-15.5 6.1zm56 208l-12.4 0c-16.5 0-31.1-10.6-36.3-26.2c-2.3-7-12.2-7-14.5 0c-5.2 15.6-19.9 26.2-36.3 26.2L168 224c-22.1 0-40-17.9-40-40l0-14.4c28.2 4.1 61 6.4 96 6.4s67.8-2.3 96-6.4l0 14.4c0 22.1-17.9 40-40 40zm-88 96l16 32L176 480 128 288l64 32zm128-32L272 480 240 352l16-32 64-32z\"]\n};\nconst faOtter = {\n  prefix: 'fas',\n  iconName: 'otter',\n  icon: [640, 512, [129446], \"f700\", \"M181.5 197.1l12.9 6.4c5.9 3 12.4 4.5 19.1 4.5c23.5 0 42.6-19.1 42.6-42.6l0-21.4c0-35.3-28.7-64-64-64l-64 0c-35.3 0-64 28.7-64 64l0 21.4c0 23.5 19.1 42.6 42.6 42.6c6.6 0 13.1-1.5 19.1-4.5l12.9-6.4 8.4-4.2L135.1 185c-4.5-3-7.1-8-7.1-13.3l0-3.7c0-13.3 10.7-24 24-24l16 0c13.3 0 24 10.7 24 24l0 3.7c0 5.3-2.7 10.3-7.1 13.3l-11.8 7.9 8.4 4.2zm-8.6 49.4L160 240l-12.9 6.4c-12.6 6.3-26.5 9.6-40.5 9.6c-3.6 0-7.1-.2-10.6-.6l0 .6c0 35.3 28.7 64 64 64l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l160 0 0-48 0-16c0-23.7 12.9-44.4 32-55.4c9.4-5.4 20.3-8.6 32-8.6l0-16c0-26.5 21.5-48 48-48c8.8 0 16 7.2 16 16l0 32 0 16 0 48c0 8.8 7.2 16 16 16s16-7.2 16-16l0-99.7c0-48.2-30.8-91-76.6-106.3l-8.5-2.8c-8-2.7-12.6-11.1-10.4-19.3s10.3-13.2 18.6-11.6l19.9 4C576 86.1 640 164.2 640 254.9l0 1.1s0 0 0 0c0 123.7-100.3 224-224 224l-1.1 0L256 480l-.6 0C132 480 32 380 32 256.6l0-.6 0-39.2c-10.1-14.6-16-32.3-16-51.4L16 144l0-1.4C6.7 139.3 0 130.5 0 120c0-13.3 10.7-24 24-24l2.8 0C44.8 58.2 83.3 32 128 32l64 0c44.7 0 83.2 26.2 101.2 64l2.8 0c13.3 0 24 10.7 24 24c0 10.5-6.7 19.3-16 22.6l0 1.4 0 21.4c0 1.4 0 2.8-.1 4.3c12-6.2 25.7-9.6 40.1-9.6l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-13.3 0-24 10.7-24 24l0 8 56.4 0c-15.2 17-24.4 39.4-24.4 64l-32 0c-42.3 0-78.2-27.4-91-65.3c-5.1 .9-10.3 1.3-15.6 1.3c-14.1 0-27.9-3.3-40.5-9.6zM96 128a16 16 0 1 1 0 32 16 16 0 1 1 0-32zm112 16a16 16 0 1 1 32 0 16 16 0 1 1 -32 0z\"]\n};\nconst faPersonDress = {\n  prefix: 'fas',\n  iconName: 'person-dress',\n  icon: [320, 512, [\"female\"], \"f182\", \"M160 0a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM88 384l-17.8 0c-10.9 0-18.6-10.7-15.2-21.1L93.3 248.1 59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l53.6-89.2c20.3-33.7 56.7-54.3 96-54.3l11.6 0c39.3 0 75.7 20.6 96 54.3l53.6 89.2c9.1 15.1 4.2 34.8-10.9 43.9s-34.8 4.2-43.9-10.9l-33.9-56.3L265 362.9c3.5 10.4-4.3 21.1-15.2 21.1L232 384l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-16 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96z\"]\n};\nconst faFemale = faPersonDress;\nconst faCommentDollar = {\n  prefix: 'fas',\n  iconName: 'comment-dollar',\n  icon: [512, 512, [], \"f651\", \"M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zm20-312l0 13.9c7.5 1.2 14.6 2.9 21.1 4.7c10.7 2.8 17 13.8 14.2 24.5s-13.8 17-24.5 14.2c-11-2.9-21.6-5-31.2-5.2c-7.9-.1-16 1.8-21.5 5c-4.8 2.8-6.2 5.6-6.2 9.3c0 1.8 .1 3.5 5.3 6.7c6.3 3.8 15.5 6.7 28.3 10.5l.7 .2c11.2 3.4 25.6 7.7 37.1 15c12.9 8.1 24.3 21.3 24.6 41.6c.3 20.9-10.5 36.1-24.8 45c-7.2 4.5-15.2 7.3-23.2 9l0 13.8c0 11-9 20-20 20s-20-9-20-20l0-14.6c-10.3-2.2-20-5.5-28.2-8.4c0 0 0 0 0 0s0 0 0 0c-2.1-.7-4.1-1.4-6.1-2.1c-10.5-3.5-16.1-14.8-12.6-25.3s14.8-16.1 25.3-12.6c2.5 .8 4.9 1.7 7.2 2.4c0 0 0 0 0 0c13.6 4.6 24 8.1 35.1 8.5c8.6 .3 16.5-1.6 21.4-4.7c4.1-2.5 6-5.5 5.9-10.5c0-2.9-.8-5-5.9-8.2c-6.3-4-15.4-6.9-28-10.7l-1.7-.5c-10.9-3.3-24.6-7.4-35.6-14c-12.7-7.7-24.6-20.5-24.7-40.7c-.1-21.1 11.8-35.7 25.8-43.9c6.9-4.1 14.5-6.8 22.2-8.5l0-14c0-11 9-20 20-20s20 9 20 20z\"]\n};\nconst faBusinessTime = {\n  prefix: 'fas',\n  iconName: 'business-time',\n  icon: [640, 512, [\"briefcase-clock\"], \"f64a\", \"M184 48l144 0c4.4 0 8 3.6 8 8l0 40L176 96l0-40c0-4.4 3.6-8 8-8zm-56 8l0 40L64 96C28.7 96 0 124.7 0 160l0 96 192 0 160 0 8.2 0c32.3-39.1 81.1-64 135.8-64c5.4 0 10.7 .2 16 .7l0-32.7c0-35.3-28.7-64-64-64l-64 0 0-40c0-30.9-25.1-56-56-56L184 0c-30.9 0-56 25.1-56 56zM320 352l-96 0c-17.7 0-32-14.3-32-32l0-32L0 288 0 416c0 35.3 28.7 64 64 64l296.2 0C335.1 449.6 320 410.5 320 368c0-5.4 .2-10.7 .7-16l-.7 0zm320 16a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zM496 288c8.8 0 16 7.2 16 16l0 48 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16z\"]\n};\nconst faBriefcaseClock = faBusinessTime;\nconst faTableCellsLarge = {\n  prefix: 'fas',\n  iconName: 'table-cells-large',\n  icon: [512, 512, [\"th-large\"], \"f009\", \"M448 96l0 128-160 0 0-128 160 0zm0 192l0 128-160 0 0-128 160 0zM224 224L64 224 64 96l160 0 0 128zM64 288l160 0 0 128L64 416l0-128zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z\"]\n};\nconst faThLarge = faTableCellsLarge;\nconst faBookTanakh = {\n  prefix: 'fas',\n  iconName: 'book-tanakh',\n  icon: [448, 512, [\"tanakh\"], \"f827\", \"M352 0c53 0 96 43 96 96l0 320c0 53-43 96-96 96L64 512l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-64c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0L64 0 352 0zm0 384L96 384l0 64 256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32zM138.7 208l13.9 24-27.7 0 13.9-24zm-13.9-24L97.1 232c-6.2 10.7 1.5 24 13.9 24l55.4 0 27.7 48c6.2 10.7 21.6 10.7 27.7 0l27.7-48 55.4 0c12.3 0 20-13.3 13.9-24l-27.7-48 27.7-48c6.2-10.7-1.5-24-13.9-24l-55.4 0L221.9 64c-6.2-10.7-21.6-10.7-27.7 0l-27.7 48L111 112c-12.3 0-20 13.3-13.9 24l27.7 48zm27.7 0l27.7-48 55.4 0 27.7 48-27.7 48-55.4 0-27.7-48zm0-48l-13.9 24-13.9-24 27.7 0zm41.6-24L208 88l13.9 24-27.7 0zm69.3 24l27.7 0-13.9 24-13.9-24zm13.9 72l13.9 24-27.7 0 13.9-24zm-55.4 48L208 280l-13.9-24 27.7 0z\"]\n};\nconst faTanakh = faBookTanakh;\nconst faPhoneVolume = {\n  prefix: 'fas',\n  iconName: 'phone-volume',\n  icon: [512, 512, [\"volume-control-phone\"], \"f2a0\", \"M280 0C408.1 0 512 103.9 512 232c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-101.6-82.4-184-184-184c-13.3 0-24-10.7-24-24s10.7-24 24-24zm8 192a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm-32-72c0-13.3 10.7-24 24-24c75.1 0 136 60.9 136 136c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-48.6-39.4-88-88-88c-13.3 0-24-10.7-24-24zM117.5 1.4c19.4-5.3 39.7 4.6 47.4 23.2l40 96c6.8 16.3 2.1 35.2-11.6 46.3L144 207.3c33.3 70.4 90.3 127.4 160.7 160.7L345 318.7c11.2-13.7 30-18.4 46.3-11.6l96 40c18.6 7.7 28.5 28 23.2 47.4l-24 88C481.8 499.9 466 512 448 512C200.6 512 0 311.4 0 64C0 46 12.1 30.2 29.5 25.4l88-24z\"]\n};\nconst faVolumeControlPhone = faPhoneVolume;\nconst faHatCowboySide = {\n  prefix: 'fas',\n  iconName: 'hat-cowboy-side',\n  icon: [640, 512, [], \"f8c1\", \"M152.7 135.9l-10.4 57.2c6.8-.7 13.6-1.1 20.5-1.1l10.7 0c39.4 0 77.8 12.1 110.1 34.7L562.4 421.8l35.1 24.6c24.4-6 42.5-28.1 42.5-54.4c0-75.8-94.7-126.6-134.6-144.7L474 83.9C468.2 53.8 441.8 32 411.1 32l-2.7 0c-5.6 0-11.1 .7-16.5 2.2L199.2 85.5c-23.9 6.4-42 26-46.5 50.4zM0 384c0 35.3 28.7 64 64 64l480 0L265.3 252.9c-26.9-18.8-58.9-28.9-91.8-28.9l-10.7 0c-60.6 0-116 34.2-143.1 88.4L13.5 325C4.6 342.7 0 362.3 0 382.2L0 384z\"]\n};\nconst faClipboardUser = {\n  prefix: 'fas',\n  iconName: 'clipboard-user',\n  icon: [384, 512, [], \"f7f3\", \"M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM128 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM80 432c0-44.2 35.8-80 80-80l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L96 448c-8.8 0-16-7.2-16-16z\"]\n};\nconst faChild = {\n  prefix: 'fas',\n  iconName: 'child',\n  icon: [320, 512, [], \"f1ae\", \"M96 64a64 64 0 1 1 128 0A64 64 0 1 1 96 64zm48 320l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-192.2L59.1 321c-9.4 15-29.2 19.4-44.1 10S-4.5 301.9 4.9 287l39.9-63.3C69.7 184 113.2 160 160 160s90.3 24 115.2 63.6L315.1 287c9.4 15 4.9 34.7-10 44.1s-34.7 4.9-44.1-10L240 287.8 240 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-32 0z\"]\n};\nconst faLiraSign = {\n  prefix: 'fas',\n  iconName: 'lira-sign',\n  icon: [320, 512, [8356], \"f195\", \"M112 160.4c0-35.5 28.8-64.4 64.4-64.4c6.9 0 13.8 1.1 20.4 3.3l81.2 27.1c16.8 5.6 34.9-3.5 40.5-20.2s-3.5-34.9-20.2-40.5L217 38.6c-13.1-4.4-26.8-6.6-40.6-6.6C105.5 32 48 89.5 48 160.4L48 192l-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l16 0 0 32-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l14 0c-2.2 10.5-6.1 20.6-11.7 29.9L4.6 431.5c-5.9 9.9-6.1 22.2-.4 32.2S20.5 480 32 480l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L88.5 416l.7-1.1c11.6-19.3 18.9-40.7 21.6-62.9L224 352c17.7 0 32-14.3 32-32s-14.3-32-32-32l-112 0 0-32 112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-112 0 0-31.6z\"]\n};\nconst faSatellite = {\n  prefix: 'fas',\n  iconName: 'satellite',\n  icon: [512, 512, [128752], \"f7bf\", \"M233 7c-9.4-9.4-24.6-9.4-33.9 0l-96 96c-9.4 9.4-9.4 24.6 0 33.9l89.4 89.4-15.5 15.5C152.3 230.4 124.9 224 96 224c-31.7 0-61.5 7.7-87.8 21.2c-9 4.7-10.3 16.7-3.1 23.8L112.7 376.7 96.3 393.1c-2.6-.7-5.4-1.1-8.3-1.1c-17.7 0-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32c0-2.9-.4-5.6-1.1-8.3l16.4-16.4L242.9 506.9c7.2 7.2 19.2 5.9 23.8-3.1C280.3 477.5 288 447.7 288 416c0-28.9-6.4-56.3-17.8-80.9l15.5-15.5L375 409c9.4 9.4 24.6 9.4 33.9 0l96-96c9.4-9.4 9.4-24.6 0-33.9l-89.4-89.4 55-55c12.5-12.5 12.5-32.8 0-45.3l-48-48c-12.5-12.5-32.8-12.5-45.3 0l-55 55L233 7zm159 351l-72.4-72.4 62.1-62.1L454.1 296 392 358.1zM226.3 192.4L153.9 120 216 57.9l72.4 72.4-62.1 62.1z\"]\n};\nconst faPlaneLock = {\n  prefix: 'fas',\n  iconName: 'plane-lock',\n  icon: [640, 512, [], \"e558\", \"M192 93.7C192 59.5 221 0 256 0c36 0 64 59.5 64 93.7l0 84.6 101.8 58.2C418 247.6 416 259.6 416 272l0 24.6c-17.9 10.4-30.3 29.1-31.8 50.9L320 329.1l0 70.9 57.6 43.2c4 3 6.4 7.8 6.4 12.8l0 24 0 18c0 7.8-6.3 14-14 14c-1.3 0-2.6-.2-3.9-.5L256 480 145.9 511.5c-1.3 .4-2.6 .5-3.9 .5c-7.8 0-14-6.3-14-14l0-42c0-5 2.4-9.8 6.4-12.8L192 400l0-70.9-171.6 49C10.2 381.1 0 373.4 0 362.8l0-65.5c0-5.7 3.1-11 8.1-13.9L192 178.3l0-84.6zM528 240c-17.7 0-32 14.3-32 32l0 48 64 0 0-48c0-17.7-14.3-32-32-32zm-80 32c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l0-48z\"]\n};\nconst faTag = {\n  prefix: 'fas',\n  iconName: 'tag',\n  icon: [448, 512, [127991], \"f02b\", \"M0 80L0 229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7L48 32C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faComment = {\n  prefix: 'fas',\n  iconName: 'comment',\n  icon: [512, 512, [128489, 61669], \"f075\", \"M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z\"]\n};\nconst faCakeCandles = {\n  prefix: 'fas',\n  iconName: 'cake-candles',\n  icon: [448, 512, [127874, \"birthday-cake\", \"cake\"], \"f1fd\", \"M86.4 5.5L61.8 47.6C58 54.1 56 61.6 56 69.2L56 72c0 22.1 17.9 40 40 40s40-17.9 40-40l0-2.8c0-7.6-2-15-5.8-21.6L105.6 5.5C103.6 2.1 100 0 96 0s-7.6 2.1-9.6 5.5zm128 0L189.8 47.6c-3.8 6.5-5.8 14-5.8 21.6l0 2.8c0 22.1 17.9 40 40 40s40-17.9 40-40l0-2.8c0-7.6-2-15-5.8-21.6L233.6 5.5C231.6 2.1 228 0 224 0s-7.6 2.1-9.6 5.5zM317.8 47.6c-3.8 6.5-5.8 14-5.8 21.6l0 2.8c0 22.1 17.9 40 40 40s40-17.9 40-40l0-2.8c0-7.6-2-15-5.8-21.6L361.6 5.5C359.6 2.1 356 0 352 0s-7.6 2.1-9.6 5.5L317.8 47.6zM128 176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 48c-35.3 0-64 28.7-64 64l0 71c8.3 5.2 18.1 9 28.8 9c13.5 0 27.2-6.1 38.4-13.4c5.4-3.5 9.9-7.1 13-9.7c1.5-1.3 2.7-2.4 3.5-3.1c.4-.4 .7-.6 .8-.8l.1-.1s0 0 0 0s0 0 0 0s0 0 0 0s0 0 0 0c3.1-3.2 7.4-4.9 11.9-4.8s8.6 2.1 11.6 5.4c0 0 0 0 0 0s0 0 0 0l.1 .1c.1 .1 .4 .4 .7 .7c.7 .7 1.7 1.7 3.1 3c2.8 2.6 6.8 6.1 11.8 9.5c10.2 7.1 23 13.1 36.3 13.1s26.1-6 36.3-13.1c5-3.5 9-6.9 11.8-9.5c1.4-1.3 2.4-2.3 3.1-3c.3-.3 .6-.6 .7-.7l.1-.1c3-3.5 7.4-5.4 12-5.4s9 2 12 5.4l.1 .1c.1 .1 .4 .4 .7 .7c.7 .7 1.7 1.7 3.1 3c2.8 2.6 6.8 6.1 11.8 9.5c10.2 7.1 23 13.1 36.3 13.1s26.1-6 36.3-13.1c5-3.5 9-6.9 11.8-9.5c1.4-1.3 2.4-2.3 3.1-3c.3-.3 .6-.6 .7-.7l.1-.1c2.9-3.4 7.1-5.3 11.6-5.4s8.7 1.6 11.9 4.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0l.1 .1c.2 .2 .4 .4 .8 .8c.8 .7 1.9 1.8 3.5 3.1c3.1 2.6 7.5 6.2 13 9.7c11.2 7.3 24.9 13.4 38.4 13.4c10.7 0 20.5-3.9 28.8-9l0-71c0-35.3-28.7-64-64-64l0-48c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 48-64 0 0-48c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 48-64 0 0-48zM448 394.6c-8.5 3.3-18.2 5.4-28.8 5.4c-22.5 0-42.4-9.9-55.8-18.6c-4.1-2.7-7.8-5.4-10.9-7.8c-2.8 2.4-6.1 5-9.8 7.5C329.8 390 310.6 400 288 400s-41.8-10-54.6-18.9c-3.5-2.4-6.7-4.9-9.4-7.2c-2.7 2.3-5.9 4.7-9.4 7.2C201.8 390 182.6 400 160 400s-41.8-10-54.6-18.9c-3.7-2.6-7-5.2-9.8-7.5c-3.1 2.4-6.8 5.1-10.9 7.8C71.2 390.1 51.3 400 28.8 400c-10.6 0-20.3-2.2-28.8-5.4L0 480c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32l0-85.4z\"]\n};\nconst faBirthdayCake = faCakeCandles;\nconst faCake = faCakeCandles;\nconst faEnvelope = {\n  prefix: 'fas',\n  iconName: 'envelope',\n  icon: [512, 512, [128386, 9993, 61443], \"f0e0\", \"M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48L48 64zM0 176L0 384c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-208L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z\"]\n};\nconst faAnglesUp = {\n  prefix: 'fas',\n  iconName: 'angles-up',\n  icon: [448, 512, [\"angle-double-up\"], \"f102\", \"M246.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 109.3 361.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160zm160 352l-160-160c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 301.3 361.4 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z\"]\n};\nconst faAngleDoubleUp = faAnglesUp;\nconst faPaperclip = {\n  prefix: 'fas',\n  iconName: 'paperclip',\n  icon: [448, 512, [128206], \"f0c6\", \"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z\"]\n};\nconst faArrowRightToCity = {\n  prefix: 'fas',\n  iconName: 'arrow-right-to-city',\n  icon: [640, 512, [], \"e4b3\", \"M288 48c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 144 40 0 0-72c0-13.3 10.7-24 24-24s24 10.7 24 24l0 72 24 0c26.5 0 48 21.5 48 48l0 224c0 26.5-21.5 48-48 48l-160 0-96 0c-26.5 0-48-21.5-48-48l0-416zm64 32l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm16 80c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM352 272l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm176-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM512 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zM166.6 153.4l80 80c12.5 12.5 12.5 32.8 0 45.3l-80 80c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L146.7 288 32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l114.7 0-25.4-25.4c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0z\"]\n};\nconst faRibbon = {\n  prefix: 'fas',\n  iconName: 'ribbon',\n  icon: [448, 512, [127895], \"f4d6\", \"M333.2 322.8s0 0 0 0l-133.9-146s0 0 0 0L146 118.6c7.8-5.1 37-22.6 78-22.6s70.2 17.4 78 22.6L245.7 180l85.6 93.4 27.4-29.8c16.3-17.7 25.3-40.9 25.3-65l0-29.5c0-19-5.6-37.5-16.1-53.3L327.8 35.6C312.9 13.4 287.9 0 261.2 0l-76 0c-25.8 0-50.1 12.5-65.1 33.5L81.9 87C70.3 103.2 64 122.8 64 142.8L64 164c0 23.2 8.4 45.6 23.6 63.1l56 64.2s0 0 0 0l83.3 95.6s0 0 0 0l91.8 105.3c10 11.5 26.8 14.3 40 6.8l54.5-31.1c17.8-10.2 21.6-34.3 7.7-49.4l-87.7-95.7zM205.2 410.6l-83.3-95.6L27.1 418.5c-13.9 15.1-10.1 39.2 7.7 49.4l55.1 31.5c13 7.4 29.3 4.9 39.4-6.1l75.9-82.6z\"]\n};\nconst faLungs = {\n  prefix: 'fas',\n  iconName: 'lungs',\n  icon: [640, 512, [129729], \"f604\", \"M320 0c17.7 0 32 14.3 32 32l0 132.1c0 16.4 8.4 31.7 22.2 40.5l9.8 6.2 0-45.5C384 127 415 96 453.3 96c21.7 0 42.8 10.2 55.8 28.8c15.4 22.1 44.3 65.4 71 116.9c26.5 50.9 52.4 112.5 59.6 170.3c.2 1.3 .2 2.6 .2 4l0 7c0 49.1-39.8 89-89 89c-7.3 0-14.5-.9-21.6-2.7l-72.7-18.2C414 480.5 384 442.1 384 398l0-73 90.5 57.6c7.5 4.7 17.3 2.5 22.1-4.9s2.5-17.3-4.9-22.1L384 287.1l0-.4-44.1-28.1c-7.3-4.6-13.9-10.1-19.9-16.1c-5.9 6-12.6 11.5-19.9 16.1L256 286.7 161.2 347l-13.5 8.6c0 0 0 0-.1 0c-7.4 4.8-9.6 14.6-4.8 22.1c4.7 7.5 14.6 9.7 22.1 4.9l91.1-58 0 73.4c0 44.1-30 82.5-72.7 93.1l-72.7 18.2c-7.1 1.8-14.3 2.7-21.6 2.7c-49.1 0-89-39.8-89-89l0-7c0-1.3 .1-2.7 .2-4c7.2-57.9 33.1-119.4 59.6-170.3c26.8-51.5 55.6-94.8 71-116.9c13-18.6 34-28.8 55.8-28.8C225 96 256 127 256 165.3l0 45.5 9.8-6.2c13.8-8.8 22.2-24.1 22.2-40.5L288 32c0-17.7 14.3-32 32-32z\"]\n};\nconst faArrowUp91 = {\n  prefix: 'fas',\n  iconName: 'arrow-up-9-1',\n  icon: [576, 512, [\"sort-numeric-up-alt\"], \"f887\", \"M160 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L192 146.3 192 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-301.7L95.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C142.5 35.8 151 32 160 32zM450.7 294c8.3 6 13.3 15.7 13.3 26l0 96 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-48 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-51.6-5.9 2c-16.8 5.6-34.9-3.5-40.5-20.2s3.5-34.9 20.2-40.5l48-16c9.8-3.3 20.5-1.6 28.8 4.4zm-5-145.1A32 32 0 1 0 418.3 91a32 32 0 1 0 27.4 57.9zm-40.7 54.9C369.6 192.4 344 159.2 344 120c0-48.6 39.4-88 88-88s88 39.4 88 88c0 23.5-7.5 46.3-21.5 65.2L449.7 251c-10.5 14.2-30.6 17.2-44.8 6.7s-17.2-30.6-6.7-44.8l6.8-9.2z\"]\n};\nconst faSortNumericUpAlt = faArrowUp91;\nconst faLitecoinSign = {\n  prefix: 'fas',\n  iconName: 'litecoin-sign',\n  icon: [384, 512, [], \"e1d3\", \"M128 64c0-17.7-14.3-32-32-32S64 46.3 64 64l0 149.6L23.2 225.2c-17 4.9-26.8 22.6-22 39.6s22.6 26.8 39.6 22L64 280.1 64 448c0 17.7 14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0 0-154.1 136.8-39.1c17-4.9 26.8-22.6 22-39.6s-22.6-26.8-39.6-22L128 195.3 128 64z\"]\n};\nconst faBorderNone = {\n  prefix: 'fas',\n  iconName: 'border-none',\n  icon: [448, 512, [], \"f850\", \"M32 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm96-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM320 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-320a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM224 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-448a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm192 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 320a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM416 192a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64z\"]\n};\nconst faCircleNodes = {\n  prefix: 'fas',\n  iconName: 'circle-nodes',\n  icon: [512, 512, [], \"e4e2\", \"M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z\"]\n};\nconst faParachuteBox = {\n  prefix: 'fas',\n  iconName: 'parachute-box',\n  icon: [512, 512, [], \"f4cd\", \"M383.5 192c.3-5.3 .5-10.6 .5-16c0-51-15.9-96-40.2-127.6C319.5 16.9 288.2 0 256 0s-63.5 16.9-87.8 48.4C143.9 80 128 125 128 176c0 5.4 .2 10.7 .5 16L240 192l0 128-32 0c-7 0-13.7 1.5-19.7 4.2L68.2 192l28.3 0c-.3-5.3-.5-10.6-.5-16c0-64 22.2-121.2 57.1-159.3C62 49.3 18.6 122.6 4.2 173.6C1.5 183.1 9 192 18.9 192l6 0L165.2 346.3c-3.3 6.5-5.2 13.9-5.2 21.7l0 96c0 26.5 21.5 48 48 48l96 0c26.5 0 48-21.5 48-48l0-96c0-7.8-1.9-15.2-5.2-21.7L487.1 192l6 0c9.9 0 17.4-8.9 14.7-18.4C493.4 122.6 450 49.3 358.9 16.7C393.8 54.8 416 112.1 416 176c0 5.4-.2 10.7-.5 16l28.3 0L323.7 324.2c-6-2.7-12.7-4.2-19.7-4.2l-32 0 0-128 111.5 0z\"]\n};\nconst faIndent = {\n  prefix: 'fas',\n  iconName: 'indent',\n  icon: [448, 512, [], \"f03c\", \"M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM127.8 268.6L25.8 347.9C15.3 356.1 0 348.6 0 335.3L0 176.7c0-13.3 15.3-20.8 25.8-12.6l101.9 79.3c8.2 6.4 8.2 18.9 0 25.3z\"]\n};\nconst faTruckFieldUn = {\n  prefix: 'fas',\n  iconName: 'truck-field-un',\n  icon: [640, 512, [], \"e58e\", \"M96 32C60.7 32 32 60.7 32 96l0 32c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l0 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c0 53 43 96 96 96s96-43 96-96l128 0c0 53 43 96 96 96s96-43 96-96l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-32c0-35.3-28.7-64-64-64l-4.2 0c-.4-1.1-.9-2.1-1.3-3.2L485.7 102c-10.3-23.1-33.2-38-58.5-38l-51.8 0C364.4 44.9 343.7 32 320 32L96 32zm288 96l43.2 0 42.7 96L384 224l0-96zM112 384a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm368-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM253.3 135.1l34.7 52 0-43.2c0-8.8 7.2-16 16-16s16 7.2 16 16l0 96c0 7.1-4.6 13.3-11.4 15.3s-14-.6-17.9-6.4l-34.7-52 0 43.2c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-7.1 4.6-13.3 11.4-15.3s14 .6 17.9 6.4zM128 144l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faHourglass = {\n  prefix: 'fas',\n  iconName: 'hourglass',\n  icon: [384, 512, [9203, 62032, \"hourglass-empty\"], \"f254\", \"M0 32C0 14.3 14.3 0 32 0L64 0 320 0l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 11c0 42.4-16.9 83.1-46.9 113.1L237.3 256l67.9 67.9c30 30 46.9 70.7 46.9 113.1l0 11c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0L64 512l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-11c0-42.4 16.9-83.1 46.9-113.1L146.7 256 78.9 188.1C48.9 158.1 32 117.4 32 75l0-11C14.3 64 0 49.7 0 32zM96 64l0 11c0 25.5 10.1 49.9 28.1 67.9L192 210.7l67.9-67.9c18-18 28.1-42.4 28.1-67.9l0-11L96 64zm0 384l192 0 0-11c0-25.5-10.1-49.9-28.1-67.9L192 301.3l-67.9 67.9c-18 18-28.1 42.4-28.1 67.9l0 11z\"]\n};\nconst faHourglassEmpty = faHourglass;\nconst faMountain = {\n  prefix: 'fas',\n  iconName: 'mountain',\n  icon: [512, 512, [127956], \"f6fc\", \"M256 32c12.5 0 24.1 6.4 30.8 17L503.4 394.4c5.6 8.9 8.6 19.2 8.6 29.7c0 30.9-25 55.9-55.9 55.9L55.9 480C25 480 0 455 0 424.1c0-10.5 3-20.8 8.6-29.7L225.2 49c6.6-10.6 18.3-17 30.8-17zm65 192L256 120.4 176.9 246.5l18.3 24.4c6.4 8.5 19.2 8.5 25.6 0l25.6-34.1c6-8.1 15.5-12.8 25.6-12.8l49 0z\"]\n};\nconst faUserDoctor = {\n  prefix: 'fas',\n  iconName: 'user-doctor',\n  icon: [448, 512, [\"user-md\"], \"f0f0\", \"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-96 55.2C54 332.9 0 401.3 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7c0-81-54-149.4-128-171.1l0 50.8c27.6 7.1 48 32.2 48 62l0 40c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l0-24c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 24c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-40c0-29.8 20.4-54.9 48-62l0-57.1c-6-.6-12.1-.9-18.3-.9l-91.4 0c-6.2 0-12.3 .3-18.3 .9l0 65.4c23.1 6.9 40 28.3 40 53.7c0 30.9-25.1 56-56 56s-56-25.1-56-56c0-25.4 16.9-46.8 40-53.7l0-59.1zM144 448a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faUserMd = faUserDoctor;\nconst faCircleInfo = {\n  prefix: 'fas',\n  iconName: 'circle-info',\n  icon: [512, 512, [\"info-circle\"], \"f05a\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faInfoCircle = faCircleInfo;\nconst faCloudMeatball = {\n  prefix: 'fas',\n  iconName: 'cloud-meatball',\n  icon: [512, 512, [], \"f73b\", \"M0 224c0 53 43 96 96 96l44.7 0c9.5-23.5 32.5-40 59.3-40c2 0 3.9 .1 5.8 .3C217.6 265.5 235.7 256 256 256s38.4 9.5 50.2 24.3c1.9-.2 3.9-.3 5.8-.3c26.9 0 49.9 16.5 59.3 40l44.7 0c53 0 96-43 96-96s-43-96-96-96c-.5 0-1.1 0-1.6 0c1.1-5.2 1.6-10.5 1.6-16c0-44.2-35.8-80-80-80c-24.3 0-46.1 10.9-60.8 28C256.5 24.3 219.1 0 176 0C114.1 0 64 50.1 64 112c0 7.1 .7 14.1 1.9 20.8C27.6 145.4 0 181.5 0 224zm288 96c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 1 .1 2.1 .1 3.1c-.7-.8-1.4-1.6-2.1-2.3c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3c.7 .7 1.5 1.4 2.3 2.1c-1-.1-2.1-.1-3.1-.1c-17.7 0-32 14.3-32 32s14.3 32 32 32c1 0 2.1-.1 3.1-.1c-.8 .7-1.6 1.3-2.3 2.1c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0c.7-.7 1.4-1.5 2.1-2.3c-.1 1-.1 2.1-.1 3.1c0 17.7 14.3 32 32 32s32-14.3 32-32c0-1-.1-2.1-.1-3.1c.7 .8 1.3 1.6 2.1 2.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3c-.7-.7-1.5-1.4-2.3-2.1c1 .1 2.1 .1 3.1 .1c17.7 0 32-14.3 32-32s-14.3-32-32-32c-1 0-2.1 .1-3.1 .1c.8-.7 1.6-1.3 2.3-2.1c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-.7 .7-1.4 1.5-2.1 2.3c.1-1 .1-2.1 .1-3.1zM48 448a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm416 0a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faCamera = {\n  prefix: 'fas',\n  iconName: 'camera',\n  icon: [512, 512, [62258, \"camera-alt\"], \"f030\", \"M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z\"]\n};\nconst faCameraAlt = faCamera;\nconst faSquareVirus = {\n  prefix: 'fas',\n  iconName: 'square-virus',\n  icon: [448, 512, [], \"e578\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM223.8 93.7c13.3 0 24 10.7 24 24c0 29.3 35.4 43.9 56.1 23.2c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9c-20.7 20.7-6 56.1 23.2 56.1c13.3 0 24 10.7 24 24s-10.7 24-24 24c-29.3 0-43.9 35.4-23.2 56.1c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0c-20.7-20.7-56.1-6-56.1 23.2c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-29.3-35.4-43.9-56.1-23.2c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9c20.7-20.7 6-56.1-23.2-56.1c-13.3 0-24-10.7-24-24s10.7-24 24-24c29.3 0 43.9-35.4 23.2-56.1c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0c20.7 20.7 56.1 6 56.1-23.2c0-13.3 10.7-24 24-24zM192 256a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm88 32a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z\"]\n};\nconst faMeteor = {\n  prefix: 'fas',\n  iconName: 'meteor',\n  icon: [512, 512, [9732], \"f753\", \"M493.7 .9L299.4 75.6l2.3-29.3c1-12.8-12.8-21.5-24-15.1L101.3 133.4C38.6 169.7 0 236.6 0 309C0 421.1 90.9 512 203 512c72.4 0 139.4-38.6 175.7-101.3L480.8 234.3c6.5-11.1-2.2-25-15.1-24l-29.3 2.3L511.1 18.3c.6-1.5 .9-3.2 .9-4.8C512 6 506 0 498.5 0c-1.7 0-3.3 .3-4.8 .9zM192 192a128 128 0 1 1 0 256 128 128 0 1 1 0-256zm0 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm16 96a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faCarOn = {\n  prefix: 'fas',\n  iconName: 'car-on',\n  icon: [512, 512, [], \"e4dd\", \"M280 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 80c0 13.3 10.7 24 24 24s24-10.7 24-24l0-80zM185.8 224l140.3 0c6.8 0 12.8 4.3 15.1 10.6L360.3 288l-208.6 0 19.1-53.4c2.3-6.4 8.3-10.6 15.1-10.6zm-75.3-10.9L82.2 292.4C62.1 300.9 48 320.8 48 344l0 40 0 64 0 32c0 17.7 14.3 32 32 32l16 0c17.7 0 32-14.3 32-32l0-32 256 0 0 32c0 17.7 14.3 32 32 32l16 0c17.7 0 32-14.3 32-32l0-32 0-64 0-40c0-23.2-14.1-43.1-34.2-51.6l-28.3-79.3C390.1 181.3 360 160 326.2 160l-140.3 0c-33.8 0-64 21.3-75.3 53.1zM128 344a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm232 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM39 39c-9.4 9.4-9.4 24.6 0 33.9l48 48c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L73 39c-9.4-9.4-24.6-9.4-33.9 0zm400 0L391 87c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l48-48c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0z\"]\n};\nconst faSleigh = {\n  prefix: 'fas',\n  iconName: 'sleigh',\n  icon: [640, 512, [], \"f7cc\", \"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l0 160c0 53 43 96 96 96l0 32 64 0 0-32 192 0 0 32 64 0 0-32c53 0 96-43 96-96l0-96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0-32 0c-17.7 0-32 14.3-32 32l0 41.3c0 30.2-24.5 54.7-54.7 54.7c-75.5 0-145.6-38.9-185.6-102.9l-4.3-6.9C174.2 67.6 125 37.6 70.7 32.7c-2.2-.5-4.4-.7-6.7-.7l-9 0L32 32zM640 384c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 8c0 13.3-10.7 24-24 24L64 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l488 0c48.6 0 88-39.4 88-88l0-8z\"]\n};\nconst faArrowDown19 = {\n  prefix: 'fas',\n  iconName: 'arrow-down-1-9',\n  icon: [576, 512, [\"sort-numeric-asc\", \"sort-numeric-down\"], \"f162\", \"M450.7 38c-8.3-6-19.1-7.7-28.8-4.4l-48 16c-16.8 5.6-25.8 23.7-20.2 40.5s23.7 25.8 40.5 20.2l5.9-2 0 51.6-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l48 0 48 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-96c0-10.3-4.9-19.9-13.3-26zM160 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L192 365.7 192 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 301.7L95.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C142.5 476.2 151 480 160 480zM418.3 307a32 32 0 1 1 27.4 57.9A32 32 0 1 1 418.3 307zM405.1 419.8l-6.8 9.2c-10.5 14.2-7.5 34.2 6.7 44.8s34.2 7.5 44.8-6.7l48.8-65.8c14-18.9 21.5-41.7 21.5-65.2c0-48.6-39.4-88-88-88s-88 39.4-88 88c0 39.2 25.6 72.4 61.1 83.8z\"]\n};\nconst faSortNumericAsc = faArrowDown19;\nconst faSortNumericDown = faArrowDown19;\nconst faHandHoldingDroplet = {\n  prefix: 'fas',\n  iconName: 'hand-holding-droplet',\n  icon: [576, 512, [\"hand-holding-water\"], \"f4c1\", \"M275.5 6.6C278.3 2.5 283 0 288 0s9.7 2.5 12.5 6.6L366.8 103C378 119.3 384 138.6 384 158.3l0 1.7c0 53-43 96-96 96s-96-43-96-96l0-1.7c0-19.8 6-39 17.2-55.3L275.5 6.6zM568.2 336.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 485.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 512 32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 384c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z\"]\n};\nconst faHandHoldingWater = faHandHoldingDroplet;\nconst faWater = {\n  prefix: 'fas',\n  iconName: 'water',\n  icon: [576, 512, [], \"f773\", \"M269.5 69.9c11.1-7.9 25.9-7.9 37 0C329 85.4 356.5 96 384 96c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 149.7 417 160 384 160c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4C42.8 92.6 61 83.5 75.3 71.6c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 85.2 165.1 96 192 96c27.5 0 55-10.6 77.5-26.1zm37 288C329 373.4 356.5 384 384 384c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 437.7 417 448 384 448c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 373.2 165.1 384 192 384c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0zm0-144C329 229.4 356.5 240 384 240c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 293.7 417 304 384 304c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 229.2 165.1 240 192 240c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z\"]\n};\nconst faCalendarCheck = {\n  prefix: 'fas',\n  iconName: 'calendar-check',\n  icon: [448, 512, [], \"f274\", \"M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM329 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-95 95-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L329 305z\"]\n};\nconst faBraille = {\n  prefix: 'fas',\n  iconName: 'braille',\n  icon: [640, 512, [], \"f2a1\", \"M0 96a64 64 0 1 1 128 0A64 64 0 1 1 0 96zM224 272a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM80 416a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zM0 416a64 64 0 1 1 128 0A64 64 0 1 1 0 416zm240 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM64 192a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM224 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM352 96a64 64 0 1 1 128 0A64 64 0 1 1 352 96zm240 0a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0A64 64 0 1 1 512 96zm64 176a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm16 224a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM416 272a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm0-80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm16 224a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm-80 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z\"]\n};\nconst faPrescriptionBottleMedical = {\n  prefix: 'fas',\n  iconName: 'prescription-bottle-medical',\n  icon: [384, 512, [\"prescription-bottle-alt\"], \"f486\", \"M0 32C0 14.3 14.3 0 32 0L352 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64L0 32zm32 96l320 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zM160 240l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-48 0 0-48c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faPrescriptionBottleAlt = faPrescriptionBottleMedical;\nconst faLandmark = {\n  prefix: 'fas',\n  iconName: 'landmark',\n  icon: [512, 512, [127963], \"f66f\", \"M240.1 4.2c9.8-5.6 21.9-5.6 31.8 0l171.8 98.1L448 104l0 .9 47.9 27.4c12.6 7.2 18.8 22 15.1 36s-16.4 23.8-30.9 23.8L32 192c-14.5 0-27.2-9.8-30.9-23.8s2.5-28.8 15.1-36L64 104.9l0-.9 4.4-1.6L240.1 4.2zM64 224l64 0 0 192 40 0 0-192 64 0 0 192 48 0 0-192 64 0 0 192 40 0 0-192 64 0 0 196.3c.6 .3 1.2 .7 1.8 1.1l48 32c11.7 7.8 17 22.4 12.9 35.9S494.1 512 480 512L32 512c-14.1 0-26.5-9.2-30.6-22.7s1.1-28.1 12.9-35.9l48-32c.6-.4 1.2-.7 1.8-1.1L64 224z\"]\n};\nconst faTruck = {\n  prefix: 'fas',\n  iconName: 'truck',\n  icon: [640, 512, [128666, 9951], \"f0d1\", \"M48 0C21.5 0 0 21.5 0 48L0 368c0 26.5 21.5 48 48 48l16 0c0 53 43 96 96 96s96-43 96-96l128 0c0 53 43 96 96 96s96-43 96-96l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-64 0-32 0-18.7c0-17-6.7-33.3-18.7-45.3L512 114.7c-12-12-28.3-18.7-45.3-18.7L416 96l0-48c0-26.5-21.5-48-48-48L48 0zM416 160l50.7 0L544 237.3l0 18.7-128 0 0-96zM112 416a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm368-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faCrosshairs = {\n  prefix: 'fas',\n  iconName: 'crosshairs',\n  icon: [512, 512, [], \"f05b\", \"M256 0c17.7 0 32 14.3 32 32l0 10.4c93.7 13.9 167.7 88 181.6 181.6l10.4 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-10.4 0c-13.9 93.7-88 167.7-181.6 181.6l0 10.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-10.4C130.3 455.7 56.3 381.7 42.4 288L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l10.4 0C56.3 130.3 130.3 56.3 224 42.4L224 32c0-17.7 14.3-32 32-32zM107.4 288c12.5 58.3 58.4 104.1 116.6 116.6l0-20.6c0-17.7 14.3-32 32-32s32 14.3 32 32l0 20.6c58.3-12.5 104.1-58.4 116.6-116.6L384 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l20.6 0C392.1 165.7 346.3 119.9 288 107.4l0 20.6c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-20.6C165.7 119.9 119.9 165.7 107.4 224l20.6 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-20.6 0zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faPersonCane = {\n  prefix: 'fas',\n  iconName: 'person-cane',\n  icon: [448, 512, [], \"e53c\", \"M272 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm-8 187.3l47.4 57.1c11.3 13.6 31.5 15.5 45.1 4.2s15.5-31.5 4.2-45.1l-73.7-88.9c-18.2-22-45.3-34.7-73.9-34.7l-35.9 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9L120 256.9 120 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-244.7zM352 376c0-4.4 3.6-8 8-8s8 3.6 8 8l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-30.9-25.1-56-56-56s-56 25.1-56 56l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z\"]\n};\nconst faTent = {\n  prefix: 'fas',\n  iconName: 'tent',\n  icon: [576, 512, [], \"e57d\", \"M269.4 6C280.5-2 295.5-2 306.6 6l224 160c7.4 5.3 12.2 13.5 13.2 22.5l32 288c1 9-1.9 18.1-8 24.9s-14.7 10.7-23.8 10.7l-80 0-28.2 0c-12.1 0-23.2-6.8-28.6-17.7L306.7 293.5c-1.7-3.4-5.1-5.5-8.8-5.5c-5.5 0-9.9 4.4-9.9 9.9L288 480c0 17.7-14.3 32-32 32l-16 0L32 512c-9.1 0-17.8-3.9-23.8-10.7s-9-15.8-8-24.9l32-288c1-9 5.8-17.2 13.2-22.5L269.4 6z\"]\n};\nconst faVestPatches = {\n  prefix: 'fas',\n  iconName: 'vest-patches',\n  icon: [448, 512, [], \"e086\", \"M151.2 69.7l55.9 167.7-11 33.1c-2.7 8.2-4.1 16.7-4.1 25.3L192 464c0 14.5 3.9 28.2 10.7 39.9C195 509 185.9 512 176 512L48 512c-26.5 0-48-21.5-48-48L0 270.5c0-9.5 2.8-18.7 8.1-26.6l47.9-71.8c5.3-7.9 8.1-17.1 8.1-26.6L64 128l0-73.7L64 48C64 21.5 85.5 0 112 0l4.5 0c.2 0 .4 0 .6 0c.4 0 .8 0 1.2 0c18.8 0 34.1 9.7 44.1 18.8C171.6 27.2 190.8 40 224 40s52.4-12.8 61.7-21.2C295.7 9.7 311 0 329.7 0c.4 0 .8 0 1.2 0c.2 0 .4 0 .6 0L336 0c26.5 0 48 21.5 48 48l0 6.3 0 73.7 0 17.5c0 9.5 2.8 18.7 8.1 26.6l47.9 71.8c5.3 7.9 8.1 17.1 8.1 26.6L448 464c0 26.5-21.5 48-48 48l-128 0c-26.5 0-48-21.5-48-48l0-168.2c0-5.2 .8-10.3 2.5-15.2L296.8 69.7C279.4 79.7 255.4 88 224 88s-55.4-8.3-72.8-18.3zM96 456a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM63.5 255.5c-4.7 4.7-4.7 12.3 0 17L79 288 63.5 303.5c-4.7 4.7-4.7 12.3 0 17s12.3 4.7 17 0L96 305l15.5 15.5c4.7 4.7 12.3 4.7 17 0s4.7-12.3 0-17L113 288l15.5-15.5c4.7-4.7 4.7-12.3 0-17s-12.3-4.7-17 0L96 271 80.5 255.5c-4.7-4.7-12.3-4.7-17 0zM304 280l0 8 0 32c0 8.8 7.2 16 16 16l32 0 8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-8c0-13.3-10.7-24-24-24s-24 10.7-24 24z\"]\n};\nconst faCheckDouble = {\n  prefix: 'fas',\n  iconName: 'check-double',\n  icon: [448, 512, [], \"f560\", \"M342.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 178.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l80 80c12.5 12.5 32.8 12.5 45.3 0l160-160zm96 128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 402.7 54.6 297.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l256-256z\"]\n};\nconst faArrowDownAZ = {\n  prefix: 'fas',\n  iconName: 'arrow-down-a-z',\n  icon: [576, 512, [\"sort-alpha-asc\", \"sort-alpha-down\"], \"f15d\", \"M183.6 469.6C177.5 476.2 169 480 160 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L128 365.7 128 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 320c0-17.7 14.3-32 32-32l128 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9L429.3 416l50.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-128 0c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9L402.7 352 352 352c-17.7 0-32-14.3-32-32zM416 32c12.1 0 23.2 6.8 28.6 17.7l64 128 16 32c7.9 15.8 1.5 35-14.3 42.9s-35 1.5-42.9-14.3L460.2 224l-88.4 0-7.2 14.3c-7.9 15.8-27.1 22.2-42.9 14.3s-22.2-27.1-14.3-42.9l16-32 64-128C392.8 38.8 403.9 32 416 32zM395.8 176l40.4 0L416 135.6 395.8 176z\"]\n};\nconst faSortAlphaAsc = faArrowDownAZ;\nconst faSortAlphaDown = faArrowDownAZ;\nconst faMoneyBillWheat = {\n  prefix: 'fas',\n  iconName: 'money-bill-wheat',\n  icon: [512, 512, [], \"e52a\", \"M176 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16c-44.2 0-80-35.8-80-80c0-8.8 7.2-16 16-16zM56 16l48 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L56 64C42.7 64 32 53.3 32 40s10.7-24 24-24zM24 88l112 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 136c-13.3 0-24-10.7-24-24S10.7 88 24 88zm8 96c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24zM272 16c0-8.8 7.2-16 16-16c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16c-44.2 0-80-35.8-80-80zM400 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16c-44.2 0-80-35.8-80-80c0-8.8 7.2-16 16-16zm80 144c0 44.2-35.8 80-80 80c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16zM352 128c8.8 0 16 7.2 16 16c0 44.2-35.8 80-80 80c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-96 16c0 44.2-35.8 80-80 80c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16zM0 304c0-26.5 21.5-48 48-48l416 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 304zM48 416l0 48 48 0c0-26.5-21.5-48-48-48zM96 304l-48 0 0 48c26.5 0 48-21.5 48-48zM464 416c-26.5 0-48 21.5-48 48l48 0 0-48zM416 304c0 26.5 21.5 48 48 48l0-48-48 0zm-96 80a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z\"]\n};\nconst faCookie = {\n  prefix: 'fas',\n  iconName: 'cookie',\n  icon: [512, 512, [127850], \"f563\", \"M247.2 17c-22.1-3.1-44.6 .9-64.4 11.4l-74 39.5C89.1 78.4 73.2 94.9 63.4 115L26.7 190.6c-9.8 20.1-13 42.9-9.1 64.9l14.5 82.8c3.9 22.1 14.6 42.3 30.7 57.9l60.3 58.4c16.1 15.6 36.6 25.6 58.7 28.7l83 11.7c22.1 3.1 44.6-.9 64.4-11.4l74-39.5c19.7-10.5 35.6-27 45.4-47.2l36.7-75.5c9.8-20.1 13-42.9 9.1-64.9l-14.6-82.8c-3.9-22.1-14.6-42.3-30.7-57.9L388.9 57.5c-16.1-15.6-36.6-25.6-58.7-28.7L247.2 17zM208 144a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM144 336a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm224-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faArrowRotateLeft = {\n  prefix: 'fas',\n  iconName: 'arrow-rotate-left',\n  icon: [512, 512, [8634, \"arrow-left-rotate\", \"arrow-rotate-back\", \"arrow-rotate-backward\", \"undo\"], \"f0e2\", \"M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z\"]\n};\nconst faArrowLeftRotate = faArrowRotateLeft;\nconst faArrowRotateBack = faArrowRotateLeft;\nconst faArrowRotateBackward = faArrowRotateLeft;\nconst faUndo = faArrowRotateLeft;\nconst faHardDrive = {\n  prefix: 'fas',\n  iconName: 'hard-drive',\n  icon: [512, 512, [128436, \"hdd\"], \"f0a0\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 184.4c-17-15.2-39.4-24.4-64-24.4L64 256c-24.6 0-47 9.2-64 24.4L0 96zM64 288l384 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64zM320 416a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm128-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faHdd = faHardDrive;\nconst faFaceGrinSquintTears = {\n  prefix: 'fas',\n  iconName: 'face-grin-squint-tears',\n  icon: [512, 512, [129315, \"grin-squint-tears\"], \"f586\", \"M426.8 14.2C446-5 477.5-4.6 497.1 14.9s20 51 .7 70.3c-6.8 6.8-21.4 12.4-37.4 16.7c-16.3 4.4-34.1 7.5-46.3 9.3c-1.6 .2-3.1 .5-4.6 .6c-4.9 .8-9.1-2.8-9.5-7.4c-.1-.7 0-1.4 .1-2.1c1.6-11.2 4.6-29.6 9-47c.3-1.3 .7-2.6 1-3.9c4.3-15.9 9.8-30.5 16.7-37.4zm-44.7 19c-1.5 4.8-2.9 9.6-4.1 14.3c-4.8 18.9-8 38.5-9.7 50.3c-4 26.8 18.9 49.7 45.7 45.8c11.9-1.6 31.5-4.8 50.4-9.7c4.7-1.2 9.5-2.5 14.3-4.1C534.2 227.5 520.2 353.8 437 437c-83.2 83.2-209.5 97.2-307.2 41.8c1.5-4.8 2.8-9.6 4-14.3c4.8-18.9 8-38.5 9.7-50.3c4-26.8-18.9-49.7-45.7-45.8c-11.9 1.6-31.5 4.8-50.4 9.7c-4.7 1.2-9.5 2.5-14.3 4.1C-22.2 284.5-8.2 158.2 75 75C158.2-8.3 284.5-22.2 382.2 33.2zM51.5 410.1c18.5-5 38.8-8.3 50.9-10c.4-.1 .7-.1 1-.1c5.1-.2 9.2 4.3 8.4 9.6c-1.7 12.1-5 32.4-10 50.9C97.6 476.4 92 491 85.2 497.8C66 517 34.5 516.6 14.9 497.1s-20-51-.7-70.3c6.8-6.8 21.4-12.4 37.4-16.7zM416.9 209c-4.7-11.9-20.8-11-26.8 .3c-19 35.5-45 70.8-77.5 103.3S244.8 371.1 209.3 390c-11.3 6-12.2 22.1-.3 26.8c57.6 22.9 125.8 11 172.3-35.5s58.4-114.8 35.5-172.3zM87.1 285.1c2 2 4.6 3.2 7.3 3.4l56.1 5.1 5.1 56.1c.3 2.8 1.5 5.4 3.4 7.3c6.3 6.3 17.2 3.6 19.8-4.9l29.7-97.4c3.5-11.6-7.3-22.5-19-19L92 265.3c-8.6 2.6-11.3 13.4-4.9 19.8zM265.3 92l-29.7 97.4c-3.5 11.6 7.3 22.5 19 19l97.4-29.7c8.6-2.6 11.3-13.4 4.9-19.8c-2-2-4.6-3.2-7.3-3.4l-56.1-5.1-5.1-56.1c-.3-2.8-1.5-5.4-3.4-7.3c-6.3-6.3-17.2-3.6-19.8 4.9z\"]\n};\nconst faGrinSquintTears = faFaceGrinSquintTears;\nconst faDumbbell = {\n  prefix: 'fas',\n  iconName: 'dumbbell',\n  icon: [640, 512, [], \"f44b\", \"M96 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 160 0 64 0 160c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32l0-64c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-64c0-17.7 14.3-32 32-32l32 0 0-64zm448 0l0 64 32 0c17.7 0 32 14.3 32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 64c0 17.7-14.3 32-32 32l-32 0 0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-160 0-64 0-160c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32zM416 224l0 64-192 0 0-64 192 0z\"]\n};\nconst faRectangleList = {\n  prefix: 'fas',\n  iconName: 'rectangle-list',\n  icon: [576, 512, [\"list-alt\"], \"f022\", \"M0 96C0 60.7 28.7 32 64 32l448 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM128 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32-128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM128 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm96-248c-13.3 0-24 10.7-24 24s10.7 24 24 24l224 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-224 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l224 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-224 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l224 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-224 0z\"]\n};\nconst faListAlt = faRectangleList;\nconst faTarpDroplet = {\n  prefix: 'fas',\n  iconName: 'tarp-droplet',\n  icon: [576, 512, [], \"e57c\", \"M288 160c-35.3 0-64-26.9-64-60c0-24 33.7-70.1 52.2-93.5c6.1-7.7 17.5-7.7 23.6 0C318.3 29.9 352 76 352 100c0 33.1-28.7 60-64 60zM64 128l133.5 0c13.2 37.3 48.7 64 90.5 64s77.4-26.7 90.5-64L512 128c35.3 0 64 28.7 64 64l0 160-128 0c-17.7 0-32 14.3-32 32l0 128L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zM448 512l0-128 128 0L448 512zM96 256a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faHouseMedicalCircleCheck = {\n  prefix: 'fas',\n  iconName: 'house-medical-circle-check',\n  icon: [640, 512, [], \"e511\", \"M320 368c0 59.5 29.5 112.1 74.8 144l-266.7 0c-35.3 0-64-28.7-64-64l0-160.4-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L522.1 193.9c-8.5-1.3-17.3-1.9-26.1-1.9c-54.7 0-103.5 24.9-135.8 64L320 256l0-48c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16zm32 0a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L480 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z\"]\n};\nconst faPersonSkiingNordic = {\n  prefix: 'fas',\n  iconName: 'person-skiing-nordic',\n  icon: [576, 512, [\"skiing-nordic\"], \"f7ca\", \"M336 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM227.2 160c1.9 0 3.8 .1 5.6 .3L201.6 254c-9.3 28 1.7 58.8 26.8 74.5l86.2 53.9L291.3 464l-88.5 0 41.1-88.1-32.4-20.3c-7.8-4.9-14.7-10.7-20.6-17.3L132.2 464l-32.4 0 54.2-257.6c4.6-1.5 9-4.1 12.7-7.8l23.1-23.1c9.9-9.9 23.4-15.5 37.5-15.5zM121.4 198.6c.4 .4 .8 .8 1.3 1.2L67 464l-43 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l135.3 0c.5 0 .9 0 1.4 0l158.6 0c.5 0 1 0 1.4 0L504 512c39.8 0 72-32.2 72-72l0-8c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 8c0 13.3-10.7 24-24 24l-69.4 0 27.6-179.3c10.5-5.2 17.8-16.1 17.8-28.7c0-17.7-14.3-32-32-32l-21.3 0c-12.9 0-24.6-7.8-29.5-19.7l-6.3-15c-14.6-35.1-44.1-61.9-80.5-73.1l-48.7-15c-11.1-3.4-22.7-5.2-34.4-5.2c-31 0-60.8 12.3-82.7 34.3l-23.1 23.1c-12.5 12.5-12.5 32.8 0 45.3zm308 89.4L402.3 464l-44.4 0 21.6-75.6c5.9-20.6-2.6-42.6-20.7-53.9L302 299l30.9-82.4 5.1 12.3C353 264.7 387.9 288 426.7 288l2.7 0z\"]\n};\nconst faSkiingNordic = faPersonSkiingNordic;\nconst faCalendarPlus = {\n  prefix: 'fas',\n  iconName: 'calendar-plus',\n  icon: [448, 512, [], \"f271\", \"M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272zM224 248c13.3 0 24 10.7 24 24l0 56 56 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-56 0 0 56c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-56-56 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l56 0 0-56c0-13.3 10.7-24 24-24z\"]\n};\nconst faPlaneArrival = {\n  prefix: 'fas',\n  iconName: 'plane-arrival',\n  icon: [640, 512, [128748], \"f5af\", \"M.3 166.9L0 68C0 57.7 9.5 50.1 19.5 52.3l35.6 7.9c10.6 2.3 19.2 9.9 23 20L96 128l127.3 37.6L181.8 20.4C178.9 10.2 186.6 0 197.2 0l40.1 0c11.6 0 22.2 6.2 27.9 16.3l109 193.8 107.2 31.7c15.9 4.7 30.8 12.5 43.7 22.8l34.4 27.6c24 19.2 18.1 57.3-10.7 68.2c-41.2 15.6-86.2 18.1-128.8 7L121.7 289.8c-11.1-2.9-21.2-8.7-29.3-16.9L9.5 189.4c-5.9-6-9.3-14.1-9.3-22.5zM32 448l576 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32zm96-80a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm128-16a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faCircleLeft = {\n  prefix: 'fas',\n  iconName: 'circle-left',\n  icon: [512, 512, [61840, \"arrow-alt-circle-left\"], \"f359\", \"M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM116.7 244.7l112-112c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8l0 64 96 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32l-96 0 0 64c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5l-112-112c-6.2-6.2-6.2-16.4 0-22.6z\"]\n};\nconst faArrowAltCircleLeft = faCircleLeft;\nconst faTrainSubway = {\n  prefix: 'fas',\n  iconName: 'train-subway',\n  icon: [448, 512, [\"subway\"], \"f239\", \"M96 0C43 0 0 43 0 96L0 352c0 48 35.2 87.7 81.1 94.9l-46 46C28.1 499.9 33.1 512 43 512l39.7 0c8.5 0 16.6-3.4 22.6-9.4L160 448l128 0 54.6 54.6c6 6 14.1 9.4 22.6 9.4l39.7 0c10 0 15-12.1 7.9-19.1l-46-46c46-7.1 81.1-46.9 81.1-94.9l0-256c0-53-43-96-96-96L96 0zM64 128c0-17.7 14.3-32 32-32l80 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-80 0c-17.7 0-32-14.3-32-32l0-96zM272 96l80 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-80 0c-17.7 0-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32zM64 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm288-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faSubway = faTrainSubway;\nconst faChartGantt = {\n  prefix: 'fas',\n  iconName: 'chart-gantt',\n  icon: [512, 512, [], \"e0e4\", \"M32 32c17.7 0 32 14.3 32 32l0 336c0 8.8 7.2 16 16 16l400 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L80 480c-44.2 0-80-35.8-80-80L0 64C0 46.3 14.3 32 32 32zm96 96c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm96 64l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm160 96l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faIndianRupeeSign = {\n  prefix: 'fas',\n  iconName: 'indian-rupee-sign',\n  icon: [320, 512, [\"indian-rupee\", \"inr\"], \"e1bc\", \"M0 64C0 46.3 14.3 32 32 32l64 0 16 0 176 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-56.2 0c9.6 14.4 16.7 30.6 20.7 48l35.6 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-35.6 0c-13.2 58.3-61.9 103.2-122.2 110.9L274.6 422c14.4 10.3 17.7 30.3 7.4 44.6s-30.3 17.7-44.6 7.4L13.4 314C2.1 306-2.7 291.5 1.5 278.2S18.1 256 32 256l80 0c32.8 0 61-19.7 73.3-48L32 208c-17.7 0-32-14.3-32-32s14.3-32 32-32l153.3 0C173 115.7 144.8 96 112 96L96 96 32 96C14.3 96 0 81.7 0 64z\"]\n};\nconst faIndianRupee = faIndianRupeeSign;\nconst faInr = faIndianRupeeSign;\nconst faCropSimple = {\n  prefix: 'fas',\n  iconName: 'crop-simple',\n  icon: [512, 512, [\"crop-alt\"], \"f565\", \"M128 32c0-17.7-14.3-32-32-32S64 14.3 64 32l0 32L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l32 0 0 256c0 35.3 28.7 64 64 64l224 0 0-64-224 0 0-352zM384 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-256c0-35.3-28.7-64-64-64L160 64l0 64 224 0 0 352z\"]\n};\nconst faCropAlt = faCropSimple;\nconst faMoneyBill1 = {\n  prefix: 'fas',\n  iconName: 'money-bill-1',\n  icon: [576, 512, [\"money-bill-alt\"], \"f3d1\", \"M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zm64 320l-64 0 0-64c35.3 0 64 28.7 64 64zM64 192l0-64 64 0c0 35.3-28.7 64-64 64zM448 384c0-35.3 28.7-64 64-64l0 64-64 0zm64-192c-35.3 0-64-28.7-64-64l64 0 0 64zM176 256a112 112 0 1 1 224 0 112 112 0 1 1 -224 0zm76-48c0 9.7 6.9 17.7 16 19.6l0 48.4-4 0c-11 0-20 9-20 20s9 20 20 20l24 0 24 0c11 0 20-9 20-20s-9-20-20-20l-4 0 0-68c0-11-9-20-20-20l-16 0c-11 0-20 9-20 20z\"]\n};\nconst faMoneyBillAlt = faMoneyBill1;\nconst faLeftLong = {\n  prefix: 'fas',\n  iconName: 'left-long',\n  icon: [512, 512, [\"long-arrow-alt-left\"], \"f30a\", \"M177.5 414c-8.8 3.8-19 2-26-4.6l-144-136C2.7 268.9 0 262.6 0 256s2.7-12.9 7.5-17.4l144-136c7-6.6 17.2-8.4 26-4.6s14.5 12.5 14.5 22l0 72 288 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-288 0 0 72c0 9.6-5.7 18.2-14.5 22z\"]\n};\nconst faLongArrowAltLeft = faLeftLong;\nconst faDna = {\n  prefix: 'fas',\n  iconName: 'dna',\n  icon: [448, 512, [129516], \"f471\", \"M416 0c17.7 0 32 14.3 32 32c0 59.8-30.3 107.5-69.4 146.6c-28 28-62.5 53.5-97.3 77.4l-2.5 1.7c-11.9 8.1-23.8 16.1-35.5 23.9c0 0 0 0 0 0s0 0 0 0s0 0 0 0l-1.6 1c-6 4-11.9 7.9-17.8 11.9c-20.9 14-40.8 27.7-59.3 41.5l118.5 0c-9.8-7.4-20.1-14.7-30.7-22.1l7-4.7 3-2c15.1-10.1 30.9-20.6 46.7-31.6c25 18.1 48.9 37.3 69.4 57.7C417.7 372.5 448 420.2 448 480c0 17.7-14.3 32-32 32s-32-14.3-32-32L64 480c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-59.8 30.3-107.5 69.4-146.6c28-28 62.5-53.5 97.3-77.4c-34.8-23.9-69.3-49.3-97.3-77.4C30.3 139.5 0 91.8 0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l320 0c0-17.7 14.3-32 32-32zM338.6 384l-229.2 0c-10.1 10.6-18.6 21.3-25.5 32l280.2 0c-6.8-10.7-15.3-21.4-25.5-32zM109.4 128l229.2 0c10.1-10.7 18.6-21.3 25.5-32L83.9 96c6.8 10.7 15.3 21.3 25.5 32zm55.4 48c18.4 13.8 38.4 27.5 59.3 41.5c20.9-14 40.8-27.7 59.3-41.5l-118.5 0z\"]\n};\nconst faVirusSlash = {\n  prefix: 'fas',\n  iconName: 'virus-slash',\n  icon: [640, 512, [], \"e075\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-154.3-121c-2-30.1 20.8-60.1 56-60.1l11.5 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-11.5 0c-49.9 0-74.9-60.3-39.6-95.6l8.2-8.2c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-8.2 8.2C412.3 118.4 352 93.4 352 43.5L352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 11.5c0 49.9-60.3 74.9-95.6 39.6L184.2 75c-12.5-12.5-32.8-12.5-45.3 0c-1.6 1.6-3.1 3.4-4.3 5.3L38.8 5.1zm225.8 177c6.9-3.9 14.9-6.1 23.4-6.1c26.5 0 48 21.5 48 48c0 4.4-.6 8.7-1.7 12.7l-69.7-54.6zM402 412.7L144.7 210c-9.5 8.5-22.2 14-37.2 14L96 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l11.5 0c49.9 0 74.9 60.3 39.6 95.6l-8.2 8.2c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l8.2-8.2c35.3-35.3 95.6-10.3 95.6 39.6l0 11.5c0 17.7 14.3 32 32 32s32-14.3 32-32l0-11.5c0-31.2 23.6-52.7 50-55.7z\"]\n};\nconst faMinus = {\n  prefix: 'fas',\n  iconName: 'minus',\n  icon: [448, 512, [8211, 8722, 10134, \"subtract\"], \"f068\", \"M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z\"]\n};\nconst faSubtract = faMinus;\nconst faChess = {\n  prefix: 'fas',\n  iconName: 'chess',\n  icon: [512, 512, [], \"f439\", \"M144 16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 16L96 32c-8.8 0-16 7.2-16 16s7.2 16 16 16l16 0 0 32L60.2 96C49.1 96 40 105.1 40 116.2c0 2.5 .5 4.9 1.3 7.3L73.8 208 72 208c-13.3 0-24 10.7-24 24s10.7 24 24 24l4 0L60 384l136 0L180 256l4 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-1.8 0 32.5-84.5c.9-2.3 1.3-4.8 1.3-7.3c0-11.2-9.1-20.2-20.2-20.2L144 96l0-32 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-16 0 0-16zM48 416L4.8 473.6C1.7 477.8 0 482.8 0 488c0 13.3 10.7 24 24 24l208 0c13.3 0 24-10.7 24-24c0-5.2-1.7-10.2-4.8-14.4L208 416 48 416zm288 0l-43.2 57.6c-3.1 4.2-4.8 9.2-4.8 14.4c0 13.3 10.7 24 24 24l176 0c13.3 0 24-10.7 24-24c0-5.2-1.7-10.2-4.8-14.4L464 416l-128 0zM304 208l0 51.9c0 7.8 2.8 15.3 8 21.1L339.2 312 337 384l125.5 0-3.3-72 28.3-30.8c5.4-5.9 8.5-13.6 8.5-21.7l0-51.5c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16l0 16-24 0 0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16l0 16-24 0 0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16zm80 96c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32-32 0 0-32z\"]\n};\nconst faArrowLeftLong = {\n  prefix: 'fas',\n  iconName: 'arrow-left-long',\n  icon: [512, 512, [\"long-arrow-left\"], \"f177\", \"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 73.4-73.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-128 128z\"]\n};\nconst faLongArrowLeft = faArrowLeftLong;\nconst faPlugCircleCheck = {\n  prefix: 'fas',\n  iconName: 'plug-circle-check',\n  icon: [576, 512, [], \"e55c\", \"M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM576 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L416 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faStreetView = {\n  prefix: 'fas',\n  iconName: 'street-view',\n  icon: [512, 512, [], \"f21d\", \"M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z\"]\n};\nconst faFrancSign = {\n  prefix: 'fas',\n  iconName: 'franc-sign',\n  icon: [320, 512, [], \"e18f\", \"M80 32C62.3 32 48 46.3 48 64l0 160 0 96-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l16 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 80 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 0-64 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-96 176 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z\"]\n};\nconst faVolumeOff = {\n  prefix: 'fas',\n  iconName: 'volume-off',\n  icon: [320, 512, [], \"f026\", \"M320 64c0-12.6-7.4-24-18.9-29.2s-25-3.1-34.4 5.3L131.8 160 64 160c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l67.8 0L266.7 471.9c9.4 8.4 22.9 10.4 34.4 5.3S320 460.6 320 448l0-384z\"]\n};\nconst faHandsAslInterpreting = {\n  prefix: 'fas',\n  iconName: 'hands-asl-interpreting',\n  icon: [640, 512, [\"american-sign-language-interpreting\", \"asl-interpreting\", \"hands-american-sign-language-interpreting\"], \"f2a3\", \"M156.6 46.3c7.9-15.8 1.5-35-14.3-42.9s-35-1.5-42.9 14.3L13.5 189.4C4.6 207.2 0 226.8 0 246.7L0 256c0 70.7 57.3 128 128 128l72 0 8 0 0-.3c35.2-2.7 65.4-22.8 82.1-51.7c8.8-15.3 3.6-34.9-11.7-43.7s-34.9-3.6-43.7 11.7c-7 12-19.9 20-34.7 20c-22.1 0-40-17.9-40-40s17.9-40 40-40c14.8 0 27.7 8 34.7 20c8.8 15.3 28.4 20.5 43.7 11.7s20.5-28.4 11.7-43.7c-12.8-22.1-33.6-39.1-58.4-47.1l80.8-22c17-4.6 27.1-22.2 22.5-39.3s-22.2-27.1-39.3-22.5L194.9 124.6l81.6-68c13.6-11.3 15.4-31.5 4.1-45.1S249.1-3.9 235.5 7.4L133.6 92.3l23-46zM483.4 465.7c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3l85.9-171.7c8.9-17.8 13.5-37.4 13.5-57.2l0-9.3c0-70.7-57.3-128-128-128l-72 0-8 0 0 .3c-35.2 2.7-65.4 22.8-82.1 51.7c-8.9 15.3-3.6 34.9 11.7 43.7s34.9 3.6 43.7-11.7c7-12 19.9-20 34.7-20c22.1 0 40 17.9 40 40s-17.9 40-40 40c-14.8 0-27.7-8-34.7-20c-8.9-15.3-28.4-20.5-43.7-11.7s-20.5 28.4-11.7 43.7c12.8 22.1 33.6 39.1 58.4 47.1l-80.8 22c-17.1 4.7-27.1 22.2-22.5 39.3s22.2 27.1 39.3 22.5l100.7-27.5-81.6 68c-13.6 11.3-15.4 31.5-4.1 45.1s31.5 15.4 45.1 4.1l101.9-84.9-23 46z\"]\n};\nconst faAmericanSignLanguageInterpreting = faHandsAslInterpreting;\nconst faAslInterpreting = faHandsAslInterpreting;\nconst faHandsAmericanSignLanguageInterpreting = faHandsAslInterpreting;\nconst faGear = {\n  prefix: 'fas',\n  iconName: 'gear',\n  icon: [512, 512, [9881, \"cog\"], \"f013\", \"M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z\"]\n};\nconst faCog = faGear;\nconst faDropletSlash = {\n  prefix: 'fas',\n  iconName: 'droplet-slash',\n  icon: [640, 512, [\"tint-slash\"], \"f5c7\", \"M320 512c53.2 0 101.4-21.6 136.1-56.6l-298.3-235C140 257.1 128 292.3 128 320c0 106 86 192 192 192zM505.2 370.7c4.4-16.2 6.8-33.1 6.8-50.7c0-91.2-130.2-262.3-166.6-308.3C339.4 4.2 330.5 0 320.9 0l-1.8 0c-9.6 0-18.5 4.2-24.5 11.7C277.8 33 240.7 81.3 205.8 136L38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L505.2 370.7zM224 336c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faTintSlash = faDropletSlash;\nconst faMosque = {\n  prefix: 'fas',\n  iconName: 'mosque',\n  icon: [640, 512, [128332], \"f678\", \"M400 0c5 0 9.8 2.4 12.8 6.4c34.7 46.3 78.1 74.9 133.5 111.5c0 0 0 0 0 0s0 0 0 0c5.2 3.4 10.5 7 16 10.6c28.9 19.2 45.7 51.7 45.7 86.1c0 28.6-11.3 54.5-29.8 73.4l-356.4 0c-18.4-19-29.8-44.9-29.8-73.4c0-34.4 16.7-66.9 45.7-86.1c5.4-3.6 10.8-7.1 16-10.6c0 0 0 0 0 0s0 0 0 0C309.1 81.3 352.5 52.7 387.2 6.4c3-4 7.8-6.4 12.8-6.4zM288 512l0-72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 72-48 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l416 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-48 0 0-72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 72-64 0 0-58c0-19-8.4-37-23-49.2L400 384l-25 20.8C360.4 417 352 435 352 454l0 58-64 0zM70.4 5.2c5.7-4.3 13.5-4.3 19.2 0l16 12C139.8 42.9 160 83.2 160 126l0 2L0 128l0-2C0 83.2 20.2 42.9 54.4 17.2l16-12zM0 160l160 0 0 136.6c-19.1 11.1-32 31.7-32 55.4l0 128c0 9.6 2.1 18.6 5.8 26.8c-6.6 3.4-14 5.2-21.8 5.2l-64 0c-26.5 0-48-21.5-48-48L0 176l0-16z\"]\n};\nconst faMosquito = {\n  prefix: 'fas',\n  iconName: 'mosquito',\n  icon: [640, 512, [], \"e52b\", \"M463.7 505.9c9.8-8.9 10.7-24.3 2.1-34.3l-42.1-49 0-54.7c0-5.5-1.8-10.8-5.1-15.1L352 266.3l0-.3L485.4 387.8C542.4 447.6 640 405.2 640 320.6c0-47.9-34-88.3-79.4-94.2l-153-23.9 40.8-40.9c7.8-7.8 9.4-20.1 3.9-29.8L428.5 90.1l38.2-50.9c8-10.6 6.1-25.9-4.3-34.1s-25.2-6.3-33.2 4.4l-48 63.9c-5.9 7.9-6.6 18.6-1.7 27.2L402.2 140 352 190.3l0-38.2c0-14.9-10.2-27.4-24-31l0-57.2c0-4.4-3.6-8-8-8s-8 3.6-8 8l0 57.2c-13.8 3.6-24 16.1-24 31l0 38.1L237.8 140l22.6-39.5c4.9-8.6 4.2-19.3-1.7-27.2l-48-63.9c-8-10.6-22.8-12.6-33.2-4.4s-12.2 23.5-4.3 34.1l38.2 50.9-23.9 41.7c-5.5 9.7-3.9 22 3.9 29.8l40.8 40.9-153 23.9C34 232.3 0 272.7 0 320.6c0 84.6 97.6 127 154.6 67.1L288 266l0 .3-66.5 86.4c-3.3 4.3-5.1 9.6-5.1 15.1l0 54.7-42.1 49c-8.6 10.1-7.7 25.5 2.1 34.3s24.7 7.9 33.4-2.1l48-55.9c3.8-4.4 5.9-10.2 5.9-16.1l0-55.4L288 344.7l0 63.1c0 17.7 14.3 32 32 32s32-14.3 32-32l0-63.1 24.3 31.6 0 55.4c0 5.9 2.1 11.7 5.9 16.1l48 55.9c8.6 10.1 23.6 11 33.4 2.1z\"]\n};\nconst faStarOfDavid = {\n  prefix: 'fas',\n  iconName: 'star-of-david',\n  icon: [512, 512, [10017], \"f69a\", \"M404.2 309.5L383.1 344l42.3 0-21.1-34.5zM371.4 256l-54-88-122.8 0-54 88 54 88 122.8 0 54-88zm65.7 0l53.4 87c3.6 5.9 5.5 12.7 5.5 19.6c0 20.7-16.8 37.4-37.4 37.4l-109.8 0-56.2 91.5C284.8 504.3 270.9 512 256 512s-28.8-7.7-36.6-20.5L163.3 400 53.4 400C32.8 400 16 383.2 16 362.6c0-6.9 1.9-13.7 5.5-19.6l53.4-87L21.5 169c-3.6-5.9-5.5-12.7-5.5-19.6C16 128.8 32.8 112 53.4 112l109.8 0 56.2-91.5C227.2 7.7 241.1 0 256 0s28.8 7.7 36.6 20.5L348.7 112l109.8 0c20.7 0 37.4 16.8 37.4 37.4c0 6.9-1.9 13.7-5.5 19.6l-53.4 87zm-54-88l21.1 34.5L425.4 168l-42.3 0zM283 112L256 68l-27 44 54 0zM128.9 168l-42.3 0 21.1 34.5L128.9 168zM107.8 309.5L86.6 344l42.3 0-21.1-34.5zM229 400l27 44 27-44-54 0z\"]\n};\nconst faPersonMilitaryRifle = {\n  prefix: 'fas',\n  iconName: 'person-military-rifle',\n  icon: [512, 512, [], \"e54b\", \"M160 39c0-13 10-23.8 22.9-24.9L334.7 1.4C344 .7 352 8 352 17.4L352 48c0 8.8-7.2 16-16 16L185 64c-13.8 0-25-11.2-25-25zm17.6 57l156.8 0c1 5.2 1.6 10.5 1.6 16c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-5.5 .6-10.8 1.6-16zm228 364.3L352 369.7 352 480c0 1.3-.1 2.5-.2 3.8L177.5 234.9c16.6-7.1 34.6-10.9 53.3-10.9l50.4 0c15.9 0 31.3 2.8 45.8 7.9L421.9 67.7c-7.7-4.4-10.3-14.2-5.9-21.9s14.2-10.3 21.9-5.9l13.9 8 13.9 8c7.7 4.4 10.3 14.2 5.9 21.9L416 173.9l1.6 .9c15.3 8.8 20.6 28.4 11.7 43.7L392.6 282c2 2.8 3.9 5.8 5.7 8.8l76.1 128.8c11.2 19 4.9 43.5-14.1 54.8s-43.5 4.9-54.8-14.1zM320 512l-128 0c-17.7 0-32-14.3-32-32l0-110.3-53.6 90.6c-11.2 19-35.8 25.3-54.8 14.1s-25.3-35.8-14.1-54.8l76.1-128.8c9.4-15.8 21.7-29.3 36-40L331.1 510c-3.5 1.3-7.2 2-11.1 2zM296 320a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faCartShopping = {\n  prefix: 'fas',\n  iconName: 'cart-shopping',\n  icon: [576, 512, [128722, \"shopping-cart\"], \"f07a\", \"M0 24C0 10.7 10.7 0 24 0L69.5 0c22 0 41.5 12.8 50.6 32l411 0c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3l-288.5 0 5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5L488 336c13.3 0 24 10.7 24 24s-10.7 24-24 24l-288.3 0c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5L24 48C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faShoppingCart = faCartShopping;\nconst faVials = {\n  prefix: 'fas',\n  iconName: 'vials',\n  icon: [512, 512, [], \"f493\", \"M0 64C0 46.3 14.3 32 32 32l56 0 48 0 56 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 304c0 44.2-35.8 80-80 80s-80-35.8-80-80L32 96C14.3 96 0 81.7 0 64zM136 96L88 96l0 160 48 0 0-160zM288 64c0-17.7 14.3-32 32-32l56 0 48 0 56 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 304c0 44.2-35.8 80-80 80s-80-35.8-80-80l0-304c-17.7 0-32-14.3-32-32zM424 96l-48 0 0 160 48 0 0-160z\"]\n};\nconst faPlugCirclePlus = {\n  prefix: 'fas',\n  iconName: 'plug-circle-plus',\n  icon: [576, 512, [], \"e55f\", \"M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208l0 48 48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 0-48c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faPlaceOfWorship = {\n  prefix: 'fas',\n  iconName: 'place-of-worship',\n  icon: [640, 512, [], \"f67f\", \"M224 109.3l0 108.3L183.3 242c-14.5 8.7-23.3 24.3-23.3 41.2L160 512l96 0 0-96c0-35.3 28.7-64 64-64s64 28.7 64 64l0 96 96 0 0-228.8c0-16.9-8.8-32.5-23.3-41.2L416 217.6l0-108.3c0-8.5-3.4-16.6-9.4-22.6L331.3 11.3c-6.2-6.2-16.4-6.2-22.6 0L233.4 86.6c-6 6-9.4 14.1-9.4 22.6zM24.9 330.3C9.5 338.8 0 354.9 0 372.4L0 464c0 26.5 21.5 48 48 48l80 0 0-238.4L24.9 330.3zM592 512c26.5 0 48-21.5 48-48l0-91.6c0-17.5-9.5-33.6-24.9-42.1L512 273.6 512 512l80 0z\"]\n};\nconst faGripVertical = {\n  prefix: 'fas',\n  iconName: 'grip-vertical',\n  icon: [320, 512, [], \"f58e\", \"M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z\"]\n};\nconst faHexagonNodes = {\n  prefix: 'fas',\n  iconName: 'hexagon-nodes',\n  icon: [448, 512, [], \"e699\", \"M248 106.6c18.9-9 32-28.3 32-50.6c0-30.9-25.1-56-56-56s-56 25.1-56 56c0 22.3 13.1 41.6 32 50.6l0 98.8c-2.8 1.3-5.5 2.9-8 4.7l-80.1-45.8c1.6-20.8-8.6-41.6-27.9-52.8C57.2 96 23 105.2 7.5 132S1.2 193 28 208.5c1.3 .8 2.6 1.5 4 2.1l0 90.8c-1.3 .6-2.7 1.3-4 2.1C1.2 319-8 353.2 7.5 380S57.2 416 84 400.5c19.3-11.1 29.4-32 27.8-52.8l50.5-28.9c-11.5-11.2-19.9-25.6-23.8-41.7L88 306.1c-2.6-1.8-5.2-3.3-8-4.7l0-90.8c2.8-1.3 5.5-2.9 8-4.7l80.1 45.8c-.1 1.4-.2 2.8-.2 4.3c0 22.3 13.1 41.6 32 50.6l0 98.8c-18.9 9-32 28.3-32 50.6c0 30.9 25.1 56 56 56s56-25.1 56-56c0-22.3-13.1-41.6-32-50.6l0-98.8c2.8-1.3 5.5-2.9 8-4.7l80.1 45.8c-1.6 20.8 8.6 41.6 27.8 52.8c26.8 15.5 61 6.3 76.5-20.5s6.3-61-20.5-76.5c-1.3-.8-2.7-1.5-4-2.1l0-90.8c1.4-.6 2.7-1.3 4-2.1c26.8-15.5 36-49.7 20.5-76.5S390.8 96 364 111.5c-19.3 11.1-29.4 32-27.8 52.8l-50.6 28.9c11.5 11.2 19.9 25.6 23.8 41.7L360 205.9c2.6 1.8 5.2 3.3 8 4.7l0 90.8c-2.8 1.3-5.5 2.9-8 4.6l-80.1-45.8c.1-1.4 .2-2.8 .2-4.3c0-22.3-13.1-41.6-32-50.6l0-98.8z\"]\n};\nconst faArrowTurnUp = {\n  prefix: 'fas',\n  iconName: 'arrow-turn-up',\n  icon: [384, 512, [\"level-up\"], \"f148\", \"M32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c53 0 96-43 96-96l0-306.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 109.3 160 416c0 17.7-14.3 32-32 32l-96 0z\"]\n};\nconst faLevelUp = faArrowTurnUp;\nconst faU = {\n  prefix: 'fas',\n  iconName: 'u',\n  icon: [384, 512, [117], \"55\", \"M32 32c17.7 0 32 14.3 32 32l0 224c0 70.7 57.3 128 128 128s128-57.3 128-128l0-224c0-17.7 14.3-32 32-32s32 14.3 32 32l0 224c0 106-86 192-192 192S0 394 0 288L0 64C0 46.3 14.3 32 32 32z\"]\n};\nconst faSquareRootVariable = {\n  prefix: 'fas',\n  iconName: 'square-root-variable',\n  icon: [576, 512, [\"square-root-alt\"], \"f698\", \"M282.6 78.1c8-27.3 33-46.1 61.4-46.1l200 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L344 96 238.7 457c-3.6 12.3-14.1 21.2-26.8 22.8s-25.1-4.6-31.5-15.6L77.6 288 32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l45.6 0c22.8 0 43.8 12.1 55.3 31.8l65.2 111.8L282.6 78.1zM393.4 233.4c12.5-12.5 32.8-12.5 45.3 0L480 274.7l41.4-41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L525.3 320l41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L480 365.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L434.7 320l-41.4-41.4c-12.5-12.5-12.5-32.8 0-45.3z\"]\n};\nconst faSquareRootAlt = faSquareRootVariable;\nconst faClock = {\n  prefix: 'fas',\n  iconName: 'clock',\n  icon: [512, 512, [128339, \"clock-four\"], \"f017\", \"M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z\"]\n};\nconst faClockFour = faClock;\nconst faBackwardStep = {\n  prefix: 'fas',\n  iconName: 'backward-step',\n  icon: [320, 512, [\"step-backward\"], \"f048\", \"M267.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-320c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160L64 241 64 96c0-17.7-14.3-32-32-32S0 78.3 0 96L0 416c0 17.7 14.3 32 32 32s32-14.3 32-32l0-145 11.5 9.6 192 160z\"]\n};\nconst faStepBackward = faBackwardStep;\nconst faPallet = {\n  prefix: 'fas',\n  iconName: 'pallet',\n  icon: [640, 512, [], \"f482\", \"M32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 64-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 224 0 224 0 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-64 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0-224 0L96 320l-64 0zm96 64l160 0 0 64-160 0 0-64zm224 0l160 0 0 64-160 0 0-64z\"]\n};\nconst faFaucet = {\n  prefix: 'fas',\n  iconName: 'faucet',\n  icon: [512, 512, [], \"e005\", \"M192 96l0 12L96 96c-17.7 0-32 14.3-32 32s14.3 32 32 32l96-12 31-3.9 1-.1 1 .1 31 3.9 96 12c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 12 0-12c0-17.7-14.3-32-32-32s-32 14.3-32 32zM32 256c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l100.1 0c20.2 29 53.9 48 91.9 48s71.7-19 91.9-48l36.1 0c17.7 0 32 14.3 32 32s14.3 32 32 32l64 0c17.7 0 32-14.3 32-32c0-88.4-71.6-160-160-160l-32 0-22.6-22.6c-6-6-14.1-9.4-22.6-9.4L256 224l0-43.8-32-4-32 4 0 43.8-18.7 0c-8.5 0-16.6 3.4-22.6 9.4L128 256l-96 0z\"]\n};\nconst faBaseballBatBall = {\n  prefix: 'fas',\n  iconName: 'baseball-bat-ball',\n  icon: [512, 512, [], \"f432\", \"M424 0c-12.4 0-24.2 4.9-33 13.7L233.5 171.2c-10.5 10.5-19.8 22.1-27.7 34.6L132.7 321.6c-7.3 11.5-15.8 22.2-25.5 31.9L69.9 390.7l51.3 51.3 37.3-37.3c9.6-9.6 20.3-18.2 31.9-25.5l115.8-73.1c12.5-7.9 24.1-17.2 34.6-27.7L498.3 121c8.7-8.7 13.7-20.6 13.7-33s-4.9-24.2-13.7-33L457 13.7C448.2 4.9 436.4 0 424 0zm88 432a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM15 399c-9.4 9.4-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L49 399c-9.4-9.4-24.6-9.4-33.9 0z\"]\n};\nconst faS = {\n  prefix: 'fas',\n  iconName: 's',\n  icon: [320, 512, [115], \"53\", \"M99.1 105.4C79 114 68.2 127.2 65.2 144.8c-2.4 14.1-.7 23.2 2 29.4c2.8 6.3 7.9 12.4 16.7 18.6c19.2 13.4 48.3 22.1 84.9 32.5c1 .3 1.9 .6 2.9 .8c32.7 9.3 72 20.6 100.9 40.7c15.7 10.9 29.9 25.5 38.6 45.1c8.8 19.8 10.8 42 6.6 66.3c-7.3 42.5-35.3 71.7-71.8 87.3c-35.4 15.2-79.1 17.9-123.7 10.9l-.2 0s0 0 0 0c-24-3.9-62.7-17.1-87.6-25.6c-4.8-1.7-9.2-3.1-12.8-4.3C5.1 440.8-3.9 422.7 1.6 405.9s23.7-25.8 40.5-20.3c4.9 1.6 10.2 3.4 15.9 5.4c25.4 8.6 56.4 19.2 74.4 22.1c36.8 5.7 67.5 2.5 88.5-6.5c20.1-8.6 30.8-21.8 33.9-39.4c2.4-14.1 .7-23.2-2-29.4c-2.8-6.3-7.9-12.4-16.7-18.6c-19.2-13.4-48.3-22.1-84.9-32.5c-1-.3-1.9-.6-2.9-.8c-32.7-9.3-72-20.6-100.9-40.7c-15.7-10.9-29.9-25.5-38.6-45.1c-8.8-19.8-10.8-42-6.6-66.3l31.5 5.5L2.1 133.9C9.4 91.4 37.4 62.2 73.9 46.6c35.4-15.2 79.1-17.9 123.7-10.9c13 2 52.4 9.6 66.6 13.4c17.1 4.5 27.2 22.1 22.7 39.2s-22.1 27.2-39.2 22.7c-11.2-3-48.1-10.2-60.1-12l4.9-31.5-4.9 31.5c-36.9-5.8-67.5-2.5-88.6 6.5z\"]\n};\nconst faTimeline = {\n  prefix: 'fas',\n  iconName: 'timeline',\n  icon: [640, 512, [], \"e29c\", \"M128 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm32 97.3c28.3-12.3 48-40.5 48-73.3c0-44.2-35.8-80-80-80S48 51.8 48 96c0 32.8 19.7 61 48 73.3L96 224l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0 0 54.7c-28.3 12.3-48 40.5-48 73.3c0 44.2 35.8 80 80 80s80-35.8 80-80c0-32.8-19.7-61-48-73.3l0-54.7 256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-54.7c28.3-12.3 48-40.5 48-73.3c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 32.8 19.7 61 48 73.3l0 54.7-320 0 0-54.7zM488 96a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM320 392a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faKeyboard = {\n  prefix: 'fas',\n  iconName: 'keyboard',\n  icon: [576, 512, [9000], \"f11c\", \"M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zm16 64l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm16 80l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80-176c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm16 80l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM160 336c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-32zM272 128l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM256 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM368 128l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM352 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM464 128l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM448 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm16 80l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16z\"]\n};\nconst faCaretDown = {\n  prefix: 'fas',\n  iconName: 'caret-down',\n  icon: [320, 512, [], \"f0d7\", \"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z\"]\n};\nconst faHouseChimneyMedical = {\n  prefix: 'fas',\n  iconName: 'house-chimney-medical',\n  icon: [576, 512, [\"clinic-medical\"], \"f7f2\", \"M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c.2 35.5-28.5 64.3-64 64.3l-320.4 0c-35.3 0-64-28.7-64-64l0-160.4-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L416 100.7 416 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 121 52.8 46.4c8 7 12 15 11 24zM272 192c-8.8 0-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-48 0 0-48c0-8.8-7.2-16-16-16l-32 0z\"]\n};\nconst faClinicMedical = faHouseChimneyMedical;\nconst faTemperatureThreeQuarters = {\n  prefix: 'fas',\n  iconName: 'temperature-three-quarters',\n  icon: [320, 512, [\"temperature-3\", \"thermometer-3\", \"thermometer-three-quarters\"], \"f2c8\", \"M160 64c-26.5 0-48 21.5-48 48l0 164.5c0 17.3-7.1 31.9-15.3 42.5C86.2 332.6 80 349.5 80 368c0 44.2 35.8 80 80 80s80-35.8 80-80c0-18.5-6.2-35.4-16.7-48.9c-8.2-10.6-15.3-25.2-15.3-42.5L208 112c0-26.5-21.5-48-48-48zM48 112C48 50.2 98.1 0 160 0s112 50.1 112 112l0 164.4c0 .1 .1 .3 .2 .6c.2 .6 .8 1.6 1.7 2.8c18.9 24.4 30.1 55 30.1 88.1c0 79.5-64.5 144-144 144S16 447.5 16 368c0-33.2 11.2-63.8 30.1-88.1c.9-1.2 1.5-2.2 1.7-2.8c.1-.3 .2-.5 .2-.6L48 112zM208 368c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-20.9 13.4-38.7 32-45.3L144 144c0-8.8 7.2-16 16-16s16 7.2 16 16l0 178.7c18.6 6.6 32 24.4 32 45.3z\"]\n};\nconst faTemperature3 = faTemperatureThreeQuarters;\nconst faThermometer3 = faTemperatureThreeQuarters;\nconst faThermometerThreeQuarters = faTemperatureThreeQuarters;\nconst faMobileScreen = {\n  prefix: 'fas',\n  iconName: 'mobile-screen',\n  icon: [384, 512, [\"mobile-android-alt\"], \"f3cf\", \"M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM144 448c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zM304 64L80 64l0 320 224 0 0-320z\"]\n};\nconst faMobileAndroidAlt = faMobileScreen;\nconst faPlaneUp = {\n  prefix: 'fas',\n  iconName: 'plane-up',\n  icon: [512, 512, [], \"e22d\", \"M192 93.7C192 59.5 221 0 256 0c36 0 64 59.5 64 93.7l0 66.3L497.8 278.5c8.9 5.9 14.2 15.9 14.2 26.6l0 56.7c0 10.9-10.7 18.6-21.1 15.2L320 320l0 80 57.6 43.2c4 3 6.4 7.8 6.4 12.8l0 42c0 7.8-6.3 14-14 14c-1.3 0-2.6-.2-3.9-.5L256 480 145.9 511.5c-1.3 .4-2.6 .5-3.9 .5c-7.8 0-14-6.3-14-14l0-42c0-5 2.4-9.8 6.4-12.8L192 400l0-80L21.1 377C10.7 380.4 0 372.7 0 361.8l0-56.7c0-10.7 5.3-20.7 14.2-26.6L192 160l0-66.3z\"]\n};\nconst faPiggyBank = {\n  prefix: 'fas',\n  iconName: 'piggy-bank',\n  icon: [576, 512, [], \"f4d3\", \"M400 96l0 .7c-5.3-.4-10.6-.7-16-.7L256 96c-16.5 0-32.5 2.1-47.8 6c-.1-2-.2-4-.2-6c0-53 43-96 96-96s96 43 96 96zm-16 32c3.5 0 7 .1 10.4 .3c4.2 .3 8.4 .7 12.6 1.3C424.6 109.1 450.8 96 480 96l11.5 0c10.4 0 18 9.8 15.5 19.9l-13.8 55.2c15.8 14.8 28.7 32.8 37.5 52.9l13.3 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-32 0c-9.1 12.1-19.9 22.9-32 32l0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-32-128 0 0 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64c-34.9-26.2-58.7-66.3-63.2-112L68 304c-37.6 0-68-30.4-68-68s30.4-68 68-68l4 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-4 0c-11 0-20 9-20 20s9 20 20 20l31.2 0c12.1-59.8 57.7-107.5 116.3-122.8c12.9-3.4 26.5-5.2 40.5-5.2l128 0zm64 136a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z\"]\n};\nconst faBatteryHalf = {\n  prefix: 'fas',\n  iconName: 'battery-half',\n  icon: [576, 512, [\"battery-3\"], \"f242\", \"M464 160c8.8 0 16 7.2 16 16l0 160c0 8.8-7.2 16-16 16L80 352c-8.8 0-16-7.2-16-16l0-160c0-8.8 7.2-16 16-16l384 0zM80 96C35.8 96 0 131.8 0 176L0 336c0 44.2 35.8 80 80 80l384 0c44.2 0 80-35.8 80-80l0-16c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l0-16c0-44.2-35.8-80-80-80L80 96zm208 96L96 192l0 128 192 0 0-128z\"]\n};\nconst faBattery3 = faBatteryHalf;\nconst faMountainCity = {\n  prefix: 'fas',\n  iconName: 'mountain-city',\n  icon: [640, 512, [], \"e52e\", \"M336 0c-26.5 0-48 21.5-48 48l0 92.1 71.4 118.4c2.5-1.6 5.4-2.5 8.6-2.5l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-3.5 0 73.8 122.4c12.4 20.6 12.9 46.3 1.2 67.3c-.4 .8-.9 1.6-1.4 2.3L592 512c26.5 0 48-21.5 48-48l0-224c0-26.5-21.5-48-48-48l-24 0 0-72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 72-40 0 0-144c0-26.5-21.5-48-48-48L336 0zm32 64l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM352 176c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm160 96c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm16 80l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM224 188.9L283.8 288 223 288l-48 64-24.6-41.2L224 188.9zm29.4-44.2C247.1 134.3 236 128 224 128s-23.1 6.3-29.4 16.7L5.1 458.9c-6.5 10.8-6.7 24.3-.7 35.3S22 512 34.5 512l379.1 0c12.5 0 24-6.8 30.1-17.8s5.8-24.5-.7-35.3L253.4 144.7z\"]\n};\nconst faCoins = {\n  prefix: 'fas',\n  iconName: 'coins',\n  icon: [512, 512, [], \"f51e\", \"M512 80c0 18-14.3 34.6-38.4 48c-29.1 16.1-72.5 27.5-122.3 30.9c-3.7-1.8-7.4-3.5-11.3-5C300.6 137.4 248.2 128 192 128c-8.3 0-16.4 .2-24.5 .6l-1.1-.6C142.3 114.6 128 98 128 80c0-44.2 86-80 192-80S512 35.8 512 80zM160.7 161.1c10.2-.7 20.7-1.1 31.3-1.1c62.2 0 117.4 12.3 152.5 31.4C369.3 204.9 384 221.7 384 240c0 4-.7 7.9-2.1 11.7c-4.6 13.2-17 25.3-35 35.5c0 0 0 0 0 0c-.1 .1-.3 .1-.4 .2c0 0 0 0 0 0s0 0 0 0c-.3 .2-.6 .3-.9 .5c-35 19.4-90.8 32-153.6 32c-59.6 0-112.9-11.3-148.2-29.1c-1.9-.9-3.7-1.9-5.5-2.9C14.3 274.6 0 258 0 240c0-34.8 53.4-64.5 128-75.4c10.5-1.5 21.4-2.7 32.7-3.5zM416 240c0-21.9-10.6-39.9-24.1-53.4c28.3-4.4 54.2-11.4 76.2-20.5c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 19.3-16.5 37.1-43.8 50.9c-14.6 7.4-32.4 13.7-52.4 18.5c.1-1.8 .2-3.5 .2-5.3zm-32 96c0 18-14.3 34.6-38.4 48c-1.8 1-3.6 1.9-5.5 2.9C304.9 404.7 251.6 416 192 416c-62.8 0-118.6-12.6-153.6-32C14.3 370.6 0 354 0 336l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 342.6 135.8 352 192 352s108.6-9.4 148.1-25.9c7.8-3.2 15.3-6.9 22.4-10.9c6.1-3.4 11.8-7.2 17.2-11.2c1.5-1.1 2.9-2.3 4.3-3.4l0 3.4 0 5.7 0 26.3zm32 0l0-32 0-25.9c19-4.2 36.5-9.5 52.1-16c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 10.5-5 21-14.9 30.9c-16.3 16.3-45 29.7-81.3 38.4c.1-1.7 .2-3.5 .2-5.3zM192 448c56.2 0 108.6-9.4 148.1-25.9c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 44.2-86 80-192 80S0 476.2 0 432l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 438.6 135.8 448 192 448z\"]\n};\nconst faKhanda = {\n  prefix: 'fas',\n  iconName: 'khanda',\n  icon: [512, 512, [9772], \"f66d\", \"M245.8 3.7c5.9-4.9 14.6-4.9 20.5 0l48 40c5.9 4.9 7.5 13.2 3.8 19.9c0 0 0 0 0 0s0 0 0 0s0 0 0 0s0 0 0 0l-.1 .1-.3 .6c-.3 .5-.7 1.3-1.2 2.3c-1 2-2.6 5-4.4 8.6c-.5 .9-.9 1.9-1.4 2.9C344.9 97.4 368 134 368 176s-23.1 78.6-57.3 97.8c.5 1 1 2 1.4 2.9c1.8 3.7 3.3 6.6 4.4 8.6c.5 1 .9 1.8 1.2 2.3l.3 .6 .1 .1s0 0 0 0s0 0 0 0c3.6 6.7 2 15-3.8 19.9L272 343.5l0 19.8 35.6-24.5 41.1-28.2c42.8-29.4 68.4-78 68.4-130c0-31.1-9.2-61.6-26.5-87.5l-2.8-4.2c-4-6-3.5-14 1.3-19.5s12.7-7 19.2-3.7L401.1 80c7.2-14.3 7.2-14.3 7.2-14.3s0 0 0 0s0 0 0 0l.1 0 .3 .2 1 .5c.8 .4 2 1.1 3.5 1.9c2.9 1.7 7 4.1 11.8 7.3c9.6 6.4 22.5 16.1 35.4 29c25.7 25.7 52.7 65.6 52.7 119.3c0 53.1-26.4 100.5-51.2 133.6c-12.6 16.7-25.1 30.3-34.5 39.7c-4.7 4.7-8.7 8.4-11.5 10.9c-1.4 1.3-2.5 2.2-3.3 2.9l-.9 .8-.3 .2-.1 .1c0 0 0 0 0 0s0 0 0 0L401.1 400l10.2 12.3c-5.1 4.3-12.4 4.9-18.2 1.6l-75.6-43-32.7 22.5 45.5 31.3c1.8-.4 3.7-.7 5.7-.7c13.3 0 24 10.7 24 24s-10.7 24-24 24c-12.2 0-22.3-9.1-23.8-21L272 423.4l0 28.9c9.6 5.5 16 15.9 16 27.7c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-11.8 6.4-22.2 16-27.7l0-28.1-40.3 27.7C197.8 463.3 187.9 472 176 472c-13.3 0-24-10.7-24-24s10.7-24 24-24c2.2 0 4.4 .3 6.5 .9l45.8-31.5-32.7-22.5-75.6 43c-5.8 3.3-13 2.7-18.2-1.6L112 400c-10.2 12.3-10.2 12.3-10.3 12.3s0 0 0 0s0 0 0 0l-.1-.1-.3-.2-.9-.8c-.8-.7-1.9-1.7-3.3-2.9c-2.8-2.5-6.7-6.2-11.5-10.9c-9.4-9.4-21.9-23-34.5-39.7C26.4 324.5 0 277.1 0 224c0-53.7 26.9-93.6 52.7-119.3c12.9-12.9 25.8-22.6 35.4-29C93 72.5 97 70 99.9 68.4c1.5-.8 2.6-1.5 3.5-1.9l1-.5 .3-.2 .1 0c0 0 0 0 0 0s0 0 0 0L112 80l-7.2-14.3c6.5-3.2 14.3-1.7 19.2 3.7s5.3 13.4 1.3 19.5l-2.8 4.2C105.2 119 96 149.5 96 180.6c0 51.9 25.6 100.6 68.4 130l41.1 28.2L240 362.6l0-19.1-42.2-35.2c-5.9-4.9-7.5-13.2-3.8-19.9c0 0 0 0 0 0s0 0 0 0s0 0 0 0l.1-.1 .3-.6c.3-.5 .7-1.3 1.2-2.3c1-2 2.6-5 4.4-8.6c.5-.9 .9-1.9 1.4-2.9C167.1 254.6 144 218 144 176s23.1-78.6 57.3-97.8c-.5-1-1-2-1.4-2.9c-1.8-3.7-3.3-6.6-4.4-8.6c-.5-1-.9-1.8-1.2-2.3l-.3-.6-.1-.1s0 0 0 0s0 0 0 0s0 0 0 0c-3.6-6.7-2-15 3.8-19.9l48-40zM220.2 122.9c-17 11.5-28.2 31-28.2 53.1s11.2 41.6 28.2 53.1C227 210.2 232 190.9 232 176s-5-34.2-11.8-53.1zm71.5 106.2c17-11.5 28.2-31 28.2-53.1s-11.2-41.6-28.2-53.1C285 141.8 280 161.1 280 176s5 34.2 11.8 53.1z\"]\n};\nconst faSliders = {\n  prefix: 'fas',\n  iconName: 'sliders',\n  icon: [512, 512, [\"sliders-h\"], \"f1de\", \"M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z\"]\n};\nconst faSlidersH = faSliders;\nconst faFolderTree = {\n  prefix: 'fas',\n  iconName: 'folder-tree',\n  icon: [576, 512, [], \"f802\", \"M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32l0 96L0 384c0 35.3 28.7 64 64 64l192 0 0-64L64 384l0-224 192 0 0-64L64 96l0-64zM288 192c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l-98.7 0c-8.5 0-16.6-3.4-22.6-9.4L409.4 9.4c-6-6-14.1-9.4-22.6-9.4L320 0c-17.7 0-32 14.3-32 32l0 160zm0 288c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l-98.7 0c-8.5 0-16.6-3.4-22.6-9.4l-13.3-13.3c-6-6-14.1-9.4-22.6-9.4L320 288c-17.7 0-32 14.3-32 32l0 160z\"]\n};\nconst faNetworkWired = {\n  prefix: 'fas',\n  iconName: 'network-wired',\n  icon: [640, 512, [], \"f6ff\", \"M256 64l128 0 0 64-128 0 0-64zM240 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l48 0 0 32L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 256 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-256 0 0-32 48 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48L240 0zM96 448l0-64 128 0 0 64L96 448zm320-64l128 0 0 64-128 0 0-64z\"]\n};\nconst faMapPin = {\n  prefix: 'fas',\n  iconName: 'map-pin',\n  icon: [320, 512, [128205], \"f276\", \"M16 144a144 144 0 1 1 288 0A144 144 0 1 1 16 144zM160 80c8.8 0 16-7.2 16-16s-7.2-16-16-16c-53 0-96 43-96 96c0 8.8 7.2 16 16 16s16-7.2 16-16c0-35.3 28.7-64 64-64zM128 480l0-162.9c10.4 1.9 21.1 2.9 32 2.9s21.6-1 32-2.9L192 480c0 17.7-14.3 32-32 32s-32-14.3-32-32z\"]\n};\nconst faHamsa = {\n  prefix: 'fas',\n  iconName: 'hamsa',\n  icon: [512, 512, [], \"f665\", \"M34.6 288L80 288c8.8 0 16-7.2 16-16L96 72c0-22.1 17.9-40 40-40s40 17.9 40 40l0 132c0 11 9 20 20 20s20-9 20-20l0-164c0-22.1 17.9-40 40-40s40 17.9 40 40l0 164c0 11 9 20 20 20s20-9 20-20l0-132c0-22.1 17.9-40 40-40s40 17.9 40 40l0 200c0 8.8 7.2 16 16 16l45.4 0c19.1 0 34.6 15.5 34.6 34.6c0 8.6-3.2 16.9-9 23.3L416.6 441c-41.1 45.2-99.4 71-160.6 71s-119.4-25.8-160.6-71L9 345.9c-5.8-6.4-9-14.7-9-23.3C0 303.5 15.5 288 34.6 288zM256 288c-38.4 0-76.8 35.8-90.6 50.2c-3.6 3.7-5.4 8.7-5.4 13.8s1.8 10.1 5.4 13.8C179.2 380.2 217.6 416 256 416s76.8-35.8 90.6-50.2c3.6-3.7 5.4-8.7 5.4-13.8s-1.8-10.1-5.4-13.8C332.8 323.8 294.4 288 256 288zm0 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faCentSign = {\n  prefix: 'fas',\n  iconName: 'cent-sign',\n  icon: [384, 512, [], \"e3f5\", \"M224 0c17.7 0 32 14.3 32 32l0 34.7c30.9 5.2 59.2 17.7 83.2 35.8c14.1 10.6 17 30.7 6.4 44.8s-30.7 17-44.8 6.4C279.4 137.5 252.9 128 224 128c-70.7 0-128 57.3-128 128s57.3 128 128 128c28.9 0 55.4-9.5 76.8-25.6c14.1-10.6 34.2-7.8 44.8 6.4s7.8 34.2-6.4 44.8c-24 18-52.4 30.6-83.2 35.8l0 34.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.7C101.2 430.1 32 351.1 32 256s69.2-174.1 160-189.3L192 32c0-17.7 14.3-32 32-32z\"]\n};\nconst faFlask = {\n  prefix: 'fas',\n  iconName: 'flask',\n  icon: [448, 512, [], \"f0c3\", \"M288 0L160 0 128 0C110.3 0 96 14.3 96 32s14.3 32 32 32l0 132.8c0 11.8-3.3 23.5-9.5 33.5L10.3 406.2C3.6 417.2 0 429.7 0 442.6C0 480.9 31.1 512 69.4 512l309.2 0c38.3 0 69.4-31.1 69.4-69.4c0-12.8-3.6-25.4-10.3-36.4L329.5 230.4c-6.2-10.1-9.5-21.7-9.5-33.5L320 64c17.7 0 32-14.3 32-32s-14.3-32-32-32L288 0zM192 196.8L192 64l64 0 0 132.8c0 23.7 6.6 46.9 19 67.1L309.5 320l-171 0L173 263.9c12.4-20.2 19-43.4 19-67.1z\"]\n};\nconst faPersonPregnant = {\n  prefix: 'fas',\n  iconName: 'person-pregnant',\n  icon: [384, 512, [], \"e31e\", \"M192 0a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM120 383c-13.8-3.6-24-16.1-24-31l0-55.1-4.6 7.6c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c15-24.9 40.3-41.5 68.7-45.6c4.1-.6 8.2-1 12.5-1l1.1 0 12.5 0 2.4 0c1.4 0 2.8 .1 4.1 .3c35.7 2.9 65.4 29.3 72.1 65l6.1 32.5c44.3 8.6 77.7 47.5 77.7 94.3l0 32c0 17.7-14.3 32-32 32l-16 0-40 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-8 0-8 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-97z\"]\n};\nconst faWandSparkles = {\n  prefix: 'fas',\n  iconName: 'wand-sparkles',\n  icon: [512, 512, [], \"f72b\", \"M464 6.1c9.5-8.5 24-8.1 33 .9l8 8c9 9 9.4 23.5 .9 33l-85.8 95.9c-2.6 2.9-4.1 6.7-4.1 10.7l0 21.4c0 8.8-7.2 16-16 16l-15.8 0c-4.6 0-8.9 1.9-11.9 5.3L100.7 500.9C94.3 508 85.3 512 75.8 512c-8.8 0-17.3-3.5-23.5-9.8L9.7 459.7C3.5 453.4 0 445 0 436.2c0-9.5 4-18.5 11.1-24.8l111.6-99.8c3.4-3 5.3-7.4 5.3-11.9l0-27.6c0-8.8 7.2-16 16-16l34.6 0c3.9 0 7.7-1.5 10.7-4.1L464 6.1zM432 288c3.6 0 6.7 2.4 7.7 5.8l14.8 51.7 51.7 14.8c3.4 1 5.8 4.1 5.8 7.7s-2.4 6.7-5.8 7.7l-51.7 14.8-14.8 51.7c-1 3.4-4.1 5.8-7.7 5.8s-6.7-2.4-7.7-5.8l-14.8-51.7-51.7-14.8c-3.4-1-5.8-4.1-5.8-7.7s2.4-6.7 5.8-7.7l51.7-14.8 14.8-51.7c1-3.4 4.1-5.8 7.7-5.8zM87.7 69.8l14.8 51.7 51.7 14.8c3.4 1 5.8 4.1 5.8 7.7s-2.4 6.7-5.8 7.7l-51.7 14.8L87.7 218.2c-1 3.4-4.1 5.8-7.7 5.8s-6.7-2.4-7.7-5.8L57.5 166.5 5.8 151.7c-3.4-1-5.8-4.1-5.8-7.7s2.4-6.7 5.8-7.7l51.7-14.8L72.3 69.8c1-3.4 4.1-5.8 7.7-5.8s6.7 2.4 7.7 5.8zM208 0c3.7 0 6.9 2.5 7.8 6.1l6.8 27.3 27.3 6.8c3.6 .9 6.1 4.1 6.1 7.8s-2.5 6.9-6.1 7.8l-27.3 6.8-6.8 27.3c-.9 3.6-4.1 6.1-7.8 6.1s-6.9-2.5-7.8-6.1l-6.8-27.3-27.3-6.8c-3.6-.9-6.1-4.1-6.1-7.8s2.5-6.9 6.1-7.8l27.3-6.8 6.8-27.3c.9-3.6 4.1-6.1 7.8-6.1z\"]\n};\nconst faEllipsisVertical = {\n  prefix: 'fas',\n  iconName: 'ellipsis-vertical',\n  icon: [128, 512, [\"ellipsis-v\"], \"f142\", \"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z\"]\n};\nconst faEllipsisV = faEllipsisVertical;\nconst faTicket = {\n  prefix: 'fas',\n  iconName: 'ticket',\n  icon: [576, 512, [127903], \"f145\", \"M64 64C28.7 64 0 92.7 0 128l0 64c0 8.8 7.4 15.7 15.7 18.6C34.5 217.1 48 235 48 256s-13.5 38.9-32.3 45.4C7.4 304.3 0 311.2 0 320l0 64c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-64c0-8.8-7.4-15.7-15.7-18.6C541.5 294.9 528 277 528 256s13.5-38.9 32.3-45.4c8.3-2.9 15.7-9.8 15.7-18.6l0-64c0-35.3-28.7-64-64-64L64 64zm64 112l0 160c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-160c0-8.8-7.2-16-16-16l-288 0c-8.8 0-16 7.2-16 16zM96 160c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 192c0 17.7-14.3 32-32 32l-320 0c-17.7 0-32-14.3-32-32l0-192z\"]\n};\nconst faPowerOff = {\n  prefix: 'fas',\n  iconName: 'power-off',\n  icon: [512, 512, [9211], \"f011\", \"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 224c0 17.7 14.3 32 32 32s32-14.3 32-32l0-224zM143.5 120.6c13.6-11.3 15.4-31.5 4.1-45.1s-31.5-15.4-45.1-4.1C49.7 115.4 16 181.8 16 256c0 132.5 107.5 240 240 240s240-107.5 240-240c0-74.2-33.8-140.6-86.6-184.6c-13.6-11.3-33.8-9.4-45.1 4.1s-9.4 33.8 4.1 45.1c38.9 32.3 63.5 81 63.5 135.4c0 97.2-78.8 176-176 176s-176-78.8-176-176c0-54.4 24.7-103.1 63.5-135.4z\"]\n};\nconst faRightLong = {\n  prefix: 'fas',\n  iconName: 'right-long',\n  icon: [512, 512, [\"long-arrow-alt-right\"], \"f30b\", \"M334.5 414c8.8 3.8 19 2 26-4.6l144-136c4.8-4.5 7.5-10.8 7.5-17.4s-2.7-12.9-7.5-17.4l-144-136c-7-6.6-17.2-8.4-26-4.6s-14.5 12.5-14.5 22l0 72L32 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l288 0 0 72c0 9.6 5.7 18.2 14.5 22z\"]\n};\nconst faLongArrowAltRight = faRightLong;\nconst faFlagUsa = {\n  prefix: 'fas',\n  iconName: 'flag-usa',\n  icon: [448, 512, [], \"f74d\", \"M32 0C49.7 0 64 14.3 64 32l0 16 69-17.2c38.1-9.5 78.3-5.1 113.5 12.5c46.3 23.2 100.8 23.2 147.1 0l9.6-4.8C423.8 28.1 448 43.1 448 66.1l0 36.1-44.7 16.2c-42.8 15.6-90 13.9-131.6-4.6l-16.1-7.2c-20.3-9-41.8-14.7-63.6-16.9l0 32.2c17.4 2.1 34.4 6.7 50.6 13.9l16.1 7.2c49.2 21.9 105 23.8 155.6 5.4L448 136.3l0 62-44.7 16.2c-42.8 15.6-90 13.9-131.6-4.6l-16.1-7.2c-40.2-17.9-85-22.5-128.1-13.3L64 203.1l0 32.7 70.2-15.1c36.4-7.8 74.3-3.9 108.4 11.3l16.1 7.2c49.2 21.9 105 23.8 155.6 5.4L448 232.3l0 62-44.7 16.2c-42.8 15.6-90 13.9-131.6-4.6l-16.1-7.2c-40.2-17.9-85-22.5-128.1-13.3L64 299.1l0 32.7 70.2-15.1c36.4-7.8 74.3-3.9 108.4 11.3l16.1 7.2c49.2 21.9 105 23.8 155.6 5.4L448 328.3l0 33.5c0 13.3-8.3 25.3-20.8 30l-34.7 13c-46.2 17.3-97.6 14.6-141.7-7.4c-37.9-19-81.3-23.7-122.5-13.4L64 400l0 80c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64 0-70.5 0-32.7 0-63.3 0-32.7 0-63.3 0-32.7L0 64 0 32C0 14.3 14.3 0 32 0zm80 96A16 16 0 1 0 80 96a16 16 0 1 0 32 0zm32 0a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm-32 48a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm32 0a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faLaptopFile = {\n  prefix: 'fas',\n  iconName: 'laptop-file',\n  icon: [640, 512, [], \"e51d\", \"M128 0C92.7 0 64 28.7 64 64l0 224-44.8 0C8.6 288 0 296.6 0 307.2C0 349.6 34.4 384 76.8 384L320 384l0-96-192 0 0-224 320 0 0 32 64 0 0-32c0-35.3-28.7-64-64-64L128 0zM512 128l-112 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-208-96 0c-17.7 0-32-14.3-32-32l0-96zm32 0l0 96 96 0-96-96z\"]\n};\nconst faTty = {\n  prefix: 'fas',\n  iconName: 'tty',\n  icon: [512, 512, [\"teletype\"], \"f1e4\", \"M38.3 241.3L15.1 200.6c-9.2-16.2-8.4-36.5 4.5-50C61.4 106.8 144.7 48 256 48s194.6 58.8 236.4 102.6c12.9 13.5 13.7 33.8 4.5 50l-23.1 40.7c-7.5 13.2-23.3 19.3-37.8 14.6l-81.1-26.6c-13.1-4.3-22-16.6-22-30.4l0-54.8c-49.6-18.1-104-18.1-153.6 0l0 54.8c0 13.8-8.9 26.1-22 30.4L76.1 255.8c-14.5 4.7-30.3-1.4-37.8-14.6zM32 336c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm0 96c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM144 320l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm16 80l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM128 432c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-32z\"]\n};\nconst faTeletype = faTty;\nconst faDiagramNext = {\n  prefix: 'fas',\n  iconName: 'diagram-next',\n  icon: [512, 512, [], \"e476\", \"M512 160c0 35.3-28.7 64-64 64l-168 0 0 64 46.1 0c21.4 0 32.1 25.9 17 41L273 399c-9.4 9.4-24.6 9.4-33.9 0L169 329c-15.1-15.1-4.4-41 17-41l46.1 0 0-64L64 224c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 64zM448 416l0-64-82.7 0 .4-.4c18.4-18.4 20.4-43.7 11-63.6l71.3 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l71.3 0c-9.4 19.9-7.4 45.2 11 63.6l.4 .4L64 352l0 64 146.7 0 5.7 5.7c21.9 21.9 57.3 21.9 79.2 0l5.7-5.7L448 416z\"]\n};\nconst faPersonRifle = {\n  prefix: 'fas',\n  iconName: 'person-rifle',\n  icon: [576, 512, [], \"e54e\", \"M265.2 192c25.4 0 49.8 7.1 70.8 19.9L336 512l-192 0 0-174.3L90.4 428.3c-11.2 19-35.8 25.3-54.8 14.1s-25.3-35.8-14.1-54.8L97.7 258.8c24.5-41.4 69-66.8 117.1-66.8l50.4 0zM160 80a80 80 0 1 1 160 0A80 80 0 1 1 160 80zM448 0c8.8 0 16 7.2 16 16l0 116.3c9.6 5.5 16 15.9 16 27.7l0 109.3 16-5.3 0-56c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 84.5c0 6.9-4.4 13-10.9 15.2L480 325.3l0 26.7 48 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-44 0 23 92.1c2.5 10.1-5.1 19.9-15.5 19.9L432 512c-8.8 0-16-7.2-16-16l0-96-16 0c-17.7 0-32-14.3-32-32l0-144c0-17.7 14.3-32 32-32l0-32c0-11.8 6.4-22.2 16-27.7L416 32c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 16 0z\"]\n};\nconst faHouseMedicalCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'house-medical-circle-exclamation',\n  icon: [640, 512, [], \"e512\", \"M320 368c0 59.5 29.5 112.1 74.8 144l-266.7 0c-35.3 0-64-28.7-64-64l0-160.4-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L522.1 193.9c-8.5-1.3-17.3-1.9-26.1-1.9c-54.7 0-103.5 24.9-135.8 64L320 256l0-48c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16zM496 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 240a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm0-192c-8.8 0-16 7.2-16 16l0 80c0 8.8 7.2 16 16 16s16-7.2 16-16l0-80c0-8.8-7.2-16-16-16z\"]\n};\nconst faClosedCaptioning = {\n  prefix: 'fas',\n  iconName: 'closed-captioning',\n  icon: [576, 512, [], \"f20a\", \"M0 96C0 60.7 28.7 32 64 32l448 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z\"]\n};\nconst faPersonHiking = {\n  prefix: 'fas',\n  iconName: 'person-hiking',\n  icon: [384, 512, [\"hiking\"], \"f6ec\", \"M192 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm51.3 182.7L224.2 307l49.7 49.7c9 9 14.1 21.2 14.1 33.9l0 89.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7-73.9-73.9c-15.8-15.8-22.2-38.6-16.9-60.3l20.4-84c8.3-34.1 42.7-54.9 76.7-46.4c19 4.8 35.6 16.4 46.4 32.7L305.1 208l30.9 0 0-24c0-13.3 10.7-24 24-24s24 10.7 24 24l0 55.8c0 .1 0 .2 0 .2s0 .2 0 .2L384 488c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-216-39.4 0c-16 0-31-8-39.9-21.4l-13.3-20zM81.1 471.9L117.3 334c3 4.2 6.4 8.2 10.1 11.9l41.9 41.9L142.9 488.1c-4.5 17.1-22 27.3-39.1 22.8s-27.3-22-22.8-39.1zm55.5-346L101.4 266.5c-3 12.1-14.9 19.9-27.2 17.9l-47.9-8c-14-2.3-22.9-16.3-19.2-30L31.9 155c9.5-34.8 41.1-59 77.2-59l4.2 0c15.6 0 27.1 14.7 23.3 29.8z\"]\n};\nconst faHiking = faPersonHiking;\nconst faVenusDouble = {\n  prefix: 'fas',\n  iconName: 'venus-double',\n  icon: [640, 512, [9890], \"f226\", \"M192 288a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM368 176c0 86.3-62.1 158.1-144 173.1l0 34.9 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-34.9C78.1 334.1 16 262.3 16 176C16 78.8 94.8 0 192 0s176 78.8 176 176zM344 318c14.6-15.6 26.8-33.4 36-53c18.8 14.4 42.4 23 68 23c61.9 0 112-50.1 112-112s-50.1-112-112-112c-25.6 0-49.1 8.6-68 23c-9.3-19.5-21.5-37.4-36-53C373.1 12.6 409.1 0 448 0c97.2 0 176 78.8 176 176c0 86.3-62.1 158.1-144 173.1l0 34.9 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-34.9c-26.6-4.9-51.1-15.7-72-31.1z\"]\n};\nconst faImages = {\n  prefix: 'fas',\n  iconName: 'images',\n  icon: [576, 512, [], \"f302\", \"M160 32c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32zM396 138.7l96 144c4.9 7.4 5.4 16.8 1.2 24.6S480.9 320 472 320l-144 0-48 0-80 0c-9.2 0-17.6-5.3-21.6-13.6s-2.9-18.2 2.9-25.4l64-80c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l17.3 21.6 56-84C360.5 132 368 128 376 128s15.5 4 20 10.7zM192 128a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224z\"]\n};\nconst faCalculator = {\n  prefix: 'fas',\n  iconName: 'calculator',\n  icon: [384, 512, [128425], \"f1ec\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L64 0zM96 64l192 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32L96 160c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32zm32 160a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zM96 352a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM64 416c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zM192 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm32 64a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm64-64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm32 64a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zM288 448a32 32 0 1 1 0-64 32 32 0 1 1 0 64z\"]\n};\nconst faPeoplePulling = {\n  prefix: 'fas',\n  iconName: 'people-pulling',\n  icon: [576, 512, [], \"e535\", \"M80 96A48 48 0 1 0 80 0a48 48 0 1 0 0 96zM64 128c-35.3 0-64 28.7-64 64L0 320c0 17.7 14.3 32 32 32c9.8 0 18.5-4.4 24.4-11.2L80.4 485.3c2.9 17.4 19.4 29.2 36.8 26.3s29.2-19.4 26.3-36.8L123.1 352l15.7 0 30 134.9c3.8 17.3 20.9 28.1 38.2 24.3s28.1-20.9 24.3-38.2l-57.3-258 116.3 53.8c.5 .3 1.1 .5 1.6 .7c8.6 3.6 18 3.1 25.9-.7c3.4-1.6 6.6-3.9 9.3-6.7c3.1-3.2 5.5-7 7.1-11.4c.1-.3 .2-.7 .3-1l2.5-7.5c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L537 232.7l-15.3-36.8C504.5 154.8 464.3 128 419.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-24.4 10.9-44.6 29-58.1 51.6L157.3 136.9C144.7 131 130.9 128 117 128l-53 0zM464 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM349.7 335.6l-25 62.4-59.4 59.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L372.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6z\"]\n};\nconst faN = {\n  prefix: 'fas',\n  iconName: 'n',\n  icon: [384, 512, [110], \"4e\", \"M21.1 33.9c12.7-4.6 26.9-.7 35.5 9.6L320 359.6 320 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 384c0 13.5-8.4 25.5-21.1 30.1s-26.9 .7-35.5-9.6L64 152.4 64 448c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 64C0 50.5 8.4 38.5 21.1 33.9z\"]\n};\nconst faCableCar = {\n  prefix: 'fas',\n  iconName: 'cable-car',\n  icon: [512, 512, [128673, 57551, \"tram\"], \"f7da\", \"M288 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM160 56a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM32 288c0-35.3 28.7-64 64-64l136 0 0-66.5-203.1 42c-13 2.7-25.7-5.7-28.4-18.6s5.7-25.7 18.6-28.4l232-48 232-48c13-2.7 25.7 5.7 28.4 18.6s-5.7 25.7-18.6 28.4L280 147.5l0 76.5 136 0c35.3 0 64 28.7 64 64l0 160c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-160zm64 0c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-64 0zm112 16l0 64c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-64 0z\"]\n};\nconst faTram = faCableCar;\nconst faCloudRain = {\n  prefix: 'fas',\n  iconName: 'cloud-rain',\n  icon: [512, 512, [127783, 9926], \"f73d\", \"M96 320c-53 0-96-43-96-96c0-42.5 27.6-78.6 65.9-91.2C64.7 126.1 64 119.1 64 112C64 50.1 114.1 0 176 0c43.1 0 80.5 24.3 99.2 60c14.7-17.1 36.5-28 60.8-28c44.2 0 80 35.8 80 80c0 5.5-.6 10.8-1.6 16c.5 0 1.1 0 1.6 0c53 0 96 43 96 96s-43 96-96 96L96 320zm-6.8 52c1.3-2.5 3.9-4 6.8-4s5.4 1.5 6.8 4l35.1 64.6c4.1 7.5 6.2 15.8 6.2 24.3l0 3c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-3c0-8.5 2.1-16.9 6.2-24.3L89.2 372zm160 0c1.3-2.5 3.9-4 6.8-4s5.4 1.5 6.8 4l35.1 64.6c4.1 7.5 6.2 15.8 6.2 24.3l0 3c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-3c0-8.5 2.1-16.9 6.2-24.3L249.2 372zm124.9 64.6L409.2 372c1.3-2.5 3.9-4 6.8-4s5.4 1.5 6.8 4l35.1 64.6c4.1 7.5 6.2 15.8 6.2 24.3l0 3c0 26.5-21.5 48-48 48s-48-21.5-48-48l0-3c0-8.5 2.1-16.9 6.2-24.3z\"]\n};\nconst faBuildingCircleXmark = {\n  prefix: 'fas',\n  iconName: 'building-circle-xmark',\n  icon: [640, 512, [], \"e4d4\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c15.1 0 28.5-6.9 37.3-17.8C340.4 462.2 320 417.5 320 368c0-54.7 24.9-103.5 64-135.8L384 48c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm59.3-180.7L518.6 368l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L496 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L473.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L496 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faShip = {\n  prefix: 'fas',\n  iconName: 'ship',\n  icon: [576, 512, [128674], \"f21a\", \"M192 32c0-17.7 14.3-32 32-32L352 0c17.7 0 32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 128 44.4 14.8c23.1 7.7 29.5 37.5 11.5 53.9l-101 92.6c-16.2 9.4-34.7 15.1-50.9 15.1c-19.6 0-40.8-7.7-59.2-20.3c-22.1-15.5-51.6-15.5-73.7 0c-17.1 11.8-38 20.3-59.2 20.3c-16.2 0-34.7-5.7-50.9-15.1l-101-92.6c-18-16.5-11.6-46.2 11.5-53.9L96 240l0-128c0-26.5 21.5-48 48-48l48 0 0-32zM160 218.7l107.8-35.9c13.1-4.4 27.3-4.4 40.5 0L416 218.7l0-90.7-256 0 0 90.7zM306.5 421.9C329 437.4 356.5 448 384 448c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 501.7 417 512 384 512c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 437.2 165.1 448 192 448c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z\"]\n};\nconst faArrowsDownToLine = {\n  prefix: 'fas',\n  iconName: 'arrows-down-to-line',\n  icon: [576, 512, [], \"e4b8\", \"M544 416L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l512 0c17.7 0 32-14.3 32-32s-14.3-32-32-32zm22.6-137.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L480 274.7 480 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 210.7-41.4-41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96zm-320-45.3c-12.5-12.5-32.8-12.5-45.3 0L160 274.7 160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 210.7L54.6 233.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3z\"]\n};\nconst faDownload = {\n  prefix: 'fas',\n  iconName: 'download',\n  icon: [512, 512, [], \"f019\", \"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faFaceGrin = {\n  prefix: 'fas',\n  iconName: 'face-grin',\n  icon: [512, 512, [128512, \"grin\"], \"f580\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM388.1 312.8c12.3-3.8 24.3 6.9 19.3 18.7C382.4 390.6 324.2 432 256.3 432s-126.2-41.4-151.1-100.5c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faGrin = faFaceGrin;\nconst faDeleteLeft = {\n  prefix: 'fas',\n  iconName: 'delete-left',\n  icon: [576, 512, [9003, \"backspace\"], \"f55a\", \"M576 128c0-35.3-28.7-64-64-64L205.3 64c-17 0-33.3 6.7-45.3 18.7L9.4 233.4c-6 6-9.4 14.1-9.4 22.6s3.4 16.6 9.4 22.6L160 429.3c12 12 28.3 18.7 45.3 18.7L512 448c35.3 0 64-28.7 64-64l0-256zM271 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z\"]\n};\nconst faBackspace = faDeleteLeft;\nconst faEyeDropper = {\n  prefix: 'fas',\n  iconName: 'eye-dropper',\n  icon: [512, 512, [\"eye-dropper-empty\", \"eyedropper\"], \"f1fb\", \"M341.6 29.2L240.1 130.8l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4L482.8 170.4c39-39 39-102.2 0-141.1s-102.2-39-141.1 0zM55.4 323.3c-15 15-23.4 35.4-23.4 56.6l0 42.4L5.4 462.2c-8.5 12.7-6.8 29.6 4 40.4s27.7 12.5 40.4 4L89.7 480l42.4 0c21.2 0 41.6-8.4 56.6-23.4L309.4 335.9l-45.3-45.3L143.4 411.3c-3 3-7.1 4.7-11.3 4.7L96 416l0-36.1c0-4.2 1.7-8.3 4.7-11.3L221.4 247.9l-45.3-45.3L55.4 323.3z\"]\n};\nconst faEyeDropperEmpty = faEyeDropper;\nconst faEyedropper = faEyeDropper;\nconst faFileCircleCheck = {\n  prefix: 'fas',\n  iconName: 'file-circle-check',\n  icon: [576, 512, [], \"e5a0\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L416 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z\"]\n};\nconst faForward = {\n  prefix: 'fas',\n  iconName: 'forward',\n  icon: [512, 512, [9193], \"f04e\", \"M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416L0 96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4L224 214.3l0 41.7 0 41.7L52.5 440.6zM256 352l0-96 0-128 0-32c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4s-18.4-16.6-18.4-29l0-64z\"]\n};\nconst faMobile = {\n  prefix: 'fas',\n  iconName: 'mobile',\n  icon: [384, 512, [128241, \"mobile-android\", \"mobile-phone\"], \"f3ce\", \"M80 0C44.7 0 16 28.7 16 64l0 384c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L80 0zm80 432l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faMobileAndroid = faMobile;\nconst faMobilePhone = faMobile;\nconst faFaceMeh = {\n  prefix: 'fas',\n  iconName: 'face-meh',\n  icon: [512, 512, [128528, \"meh\"], \"f11a\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM176.4 176a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM160 336l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faMeh = faFaceMeh;\nconst faAlignCenter = {\n  prefix: 'fas',\n  iconName: 'align-center',\n  icon: [448, 512, [], \"f037\", \"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z\"]\n};\nconst faBookSkull = {\n  prefix: 'fas',\n  iconName: 'book-skull',\n  icon: [448, 512, [\"book-dead\"], \"f6b7\", \"M0 96C0 43 43 0 96 0L384 0l32 0c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0L96 512c-53 0-96-43-96-96L0 96zM64 416c0 17.7 14.3 32 32 32l256 0 0-64L96 384c-17.7 0-32 14.3-32 32zM320 112c0-35.3-35.8-64-80-64s-80 28.7-80 64c0 20.9 12.6 39.5 32 51.2l0 12.8c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16l0-12.8c19.4-11.7 32-30.3 32-51.2zM208 96a16 16 0 1 1 0 32 16 16 0 1 1 0-32zm48 16a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM134.3 209.3c-8.1-3.5-17.5 .3-21 8.4s.3 17.5 8.4 21L199.4 272l-77.7 33.3c-8.1 3.5-11.9 12.9-8.4 21s12.9 11.9 21 8.4L240 289.4l105.7 45.3c8.1 3.5 17.5-.3 21-8.4s-.3-17.5-8.4-21L280.6 272l77.7-33.3c8.1-3.5 11.9-12.9 8.4-21s-12.9-11.9-21-8.4L240 254.6 134.3 209.3z\"]\n};\nconst faBookDead = faBookSkull;\nconst faIdCard = {\n  prefix: 'fas',\n  iconName: 'id-card',\n  icon: [576, 512, [62147, \"drivers-license\"], \"f2c2\", \"M0 96l576 0c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zm0 32L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-288L0 128zM64 405.3c0-29.5 23.9-53.3 53.3-53.3l117.3 0c29.5 0 53.3 23.9 53.3 53.3c0 5.9-4.8 10.7-10.7 10.7L74.7 416c-5.9 0-10.7-4.8-10.7-10.7zM176 192a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm176 16c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z\"]\n};\nconst faDriversLicense = faIdCard;\nconst faOutdent = {\n  prefix: 'fas',\n  iconName: 'outdent',\n  icon: [448, 512, [\"dedent\"], \"f03b\", \"M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM.2 268.6c-8.2-6.4-8.2-18.9 0-25.3l101.9-79.3c10.5-8.2 25.8-.7 25.8 12.6l0 158.6c0 13.3-15.3 20.8-25.8 12.6L.2 268.6z\"]\n};\nconst faDedent = faOutdent;\nconst faHeartCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'heart-circle-exclamation',\n  icon: [576, 512, [], \"e4fe\", \"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9l2.6-2.4C267.2 438.6 256 404.6 256 368c0-97.2 78.8-176 176-176c28.3 0 55 6.7 78.7 18.5c.9-6.5 1.3-13 1.3-19.6l0-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1l0 5.8c0 41.5 17.2 81.2 47.6 109.5zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faHouse = {\n  prefix: 'fas',\n  iconName: 'house',\n  icon: [576, 512, [127968, 63498, 63500, \"home\", \"home-alt\", \"home-lg-alt\"], \"f015\", \"M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z\"]\n};\nconst faHome = faHouse;\nconst faHomeAlt = faHouse;\nconst faHomeLgAlt = faHouse;\nconst faCalendarWeek = {\n  prefix: 'fas',\n  iconName: 'calendar-week',\n  icon: [448, 512, [], \"f784\", \"M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm80 64c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16L80 256z\"]\n};\nconst faLaptopMedical = {\n  prefix: 'fas',\n  iconName: 'laptop-medical',\n  icon: [640, 512, [], \"f812\", \"M64 96c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 256-64 0 0-256L128 96l0 256-64 0L64 96zM0 403.2C0 392.6 8.6 384 19.2 384l601.6 0c10.6 0 19.2 8.6 19.2 19.2c0 42.4-34.4 76.8-76.8 76.8L76.8 480C34.4 480 0 445.6 0 403.2zM288 160c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faB = {\n  prefix: 'fas',\n  iconName: 'b',\n  icon: [320, 512, [98], \"42\", \"M64 32C28.7 32 0 60.7 0 96L0 256 0 416c0 35.3 28.7 64 64 64l128 0c70.7 0 128-57.3 128-128c0-46.5-24.8-87.3-62-109.7c18.7-22.3 30-51 30-82.3c0-70.7-57.3-128-128-128L64 32zm96 192l-96 0L64 96l96 0c35.3 0 64 28.7 64 64s-28.7 64-64 64zM64 288l96 0 32 0c35.3 0 64 28.7 64 64s-28.7 64-64 64L64 416l0-128z\"]\n};\nconst faFileMedical = {\n  prefix: 'fas',\n  iconName: 'file-medical',\n  icon: [384, 512, [], \"f477\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM160 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faDiceOne = {\n  prefix: 'fas',\n  iconName: 'dice-one',\n  icon: [448, 512, [9856], \"f525\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faKiwiBird = {\n  prefix: 'fas',\n  iconName: 'kiwi-bird',\n  icon: [576, 512, [], \"f535\", \"M291.2 388.4c31.2-18.8 64.7-36.4 101.1-36.4l55.7 0c4.6 0 9.1-.2 13.6-.7l85.3 121.9c4 5.7 11.3 8.2 17.9 6.1s11.2-8.3 11.2-15.3l0-240c0-70.7-57.3-128-128-128l-55.7 0c-36.4 0-69.9-17.6-101.1-36.4C262.3 42.1 228.3 32 192 32C86 32 0 118 0 224c0 71.1 38.6 133.1 96 166.3L96 456c0 13.3 10.7 24 24 24s24-10.7 24-24l0-46c15.3 3.9 31.4 6 48 6c5.4 0 10.7-.2 16-.7l0 40.7c0 13.3 10.7 24 24 24s24-10.7 24-24l0-50.9c12.4-4.4 24.2-10 35.2-16.7zM448 200a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faArrowRightArrowLeft = {\n  prefix: 'fas',\n  iconName: 'arrow-right-arrow-left',\n  icon: [448, 512, [8644, \"exchange\"], \"f0ec\", \"M438.6 150.6c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.7 96 32 96C14.3 96 0 110.3 0 128s14.3 32 32 32l306.7 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l96-96zm-333.3 352c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 416 416 416c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96z\"]\n};\nconst faExchange = faArrowRightArrowLeft;\nconst faRotateRight = {\n  prefix: 'fas',\n  iconName: 'rotate-right',\n  icon: [512, 512, [\"redo-alt\", \"rotate-forward\"], \"f2f9\", \"M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z\"]\n};\nconst faRedoAlt = faRotateRight;\nconst faRotateForward = faRotateRight;\nconst faUtensils = {\n  prefix: 'fas',\n  iconName: 'utensils',\n  icon: [448, 512, [127860, 61685, \"cutlery\"], \"f2e7\", \"M416 0C400 0 288 32 288 176l0 112c0 35.3 28.7 64 64 64l32 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 0-112 0-208c0-17.7-14.3-32-32-32zM64 16C64 7.8 57.9 1 49.7 .1S34.2 4.6 32.4 12.5L2.1 148.8C.7 155.1 0 161.5 0 167.9c0 45.9 35.1 83.6 80 87.7L80 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-224.4c44.9-4.1 80-41.8 80-87.7c0-6.4-.7-12.8-2.1-19.1L191.6 12.5c-1.8-8-9.3-13.3-17.4-12.4S160 7.8 160 16l0 134.2c0 5.4-4.4 9.8-9.8 9.8c-5.1 0-9.3-3.9-9.8-9L127.9 14.6C127.2 6.3 120.3 0 112 0s-15.2 6.3-15.9 14.6L83.7 151c-.5 5.1-4.7 9-9.8 9c-5.4 0-9.8-4.4-9.8-9.8L64 16zm48.3 152l-.3 0-.3 0 .3-.7 .3 .7z\"]\n};\nconst faCutlery = faUtensils;\nconst faArrowUpWideShort = {\n  prefix: 'fas',\n  iconName: 'arrow-up-wide-short',\n  icon: [576, 512, [\"sort-amount-up\"], \"f161\", \"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z\"]\n};\nconst faSortAmountUp = faArrowUpWideShort;\nconst faMillSign = {\n  prefix: 'fas',\n  iconName: 'mill-sign',\n  icon: [384, 512, [], \"e1ed\", \"M302.1 42.8c5.9-16.6-2.7-35-19.4-40.9s-35 2.7-40.9 19.4L208 116.1c-5.7 4-11.1 8.5-16 13.5C171.7 108.9 143.3 96 112 96c-19.5 0-37.8 5-53.7 13.7C52.5 101.4 42.9 96 32 96C14.3 96 0 110.3 0 128l0 80L0 416c0 17.7 14.3 32 32 32s32-14.3 32-32l0-208c0-26.5 21.5-48 48-48s48 21.5 48 48l0 42.5L81.9 469.2c-5.9 16.6 2.7 35 19.4 40.9s35-2.7 40.9-19.4l21.4-60C168.9 441 179.6 448 192 448c17.7 0 32-14.3 32-32l0-154.5 35.7-100c3.9-1 8.1-1.6 12.3-1.6c26.5 0 48 21.5 48 48l0 208c0 17.7 14.3 32 32 32s32-14.3 32-32l0-208c0-58.2-44.3-106-101.1-111.5l19.2-53.8z\"]\n};\nconst faBowlRice = {\n  prefix: 'fas',\n  iconName: 'bowl-rice',\n  icon: [512, 512, [], \"e2eb\", \"M176 56c0-13.3 10.7-24 24-24l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24zm24 48l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zM56 176l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zM0 283.4C0 268.3 12.3 256 27.4 256l457.1 0c15.1 0 27.4 12.3 27.4 27.4c0 70.5-44.4 130.7-106.7 154.1L403.5 452c-2 16-15.6 28-31.8 28l-231.5 0c-16.1 0-29.8-12-31.8-28l-1.8-14.4C44.4 414.1 0 353.9 0 283.4zM224 200c0-13.3 10.7-24 24-24l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24zm-96 0c0-13.3 10.7-24 24-24l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24zm-24-96l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm216 96c0-13.3 10.7-24 24-24l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24zm-24-96l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm120 96c0-13.3 10.7-24 24-24l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24zm-24-96l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zM296 32l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faSkull = {\n  prefix: 'fas',\n  iconName: 'skull',\n  icon: [512, 512, [128128], \"f54c\", \"M416 398.9c58.5-41.1 96-104.1 96-174.9C512 100.3 397.4 0 256 0S0 100.3 0 224c0 70.7 37.5 133.8 96 174.9c0 .4 0 .7 0 1.1l0 64c0 26.5 21.5 48 48 48l48 0 0-48c0-8.8 7.2-16 16-16s16 7.2 16 16l0 48 64 0 0-48c0-8.8 7.2-16 16-16s16 7.2 16 16l0 48 48 0c26.5 0 48-21.5 48-48l0-64c0-.4 0-.7 0-1.1zM96 256a64 64 0 1 1 128 0A64 64 0 1 1 96 256zm256-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\"]\n};\nconst faTowerBroadcast = {\n  prefix: 'fas',\n  iconName: 'tower-broadcast',\n  icon: [576, 512, [\"broadcast-tower\"], \"f519\", \"M80.3 44C69.8 69.9 64 98.2 64 128s5.8 58.1 16.3 84c6.6 16.4-1.3 35-17.7 41.7s-35-1.3-41.7-17.7C7.4 202.6 0 166.1 0 128S7.4 53.4 20.9 20C27.6 3.6 46.2-4.3 62.6 2.3S86.9 27.6 80.3 44zM555.1 20C568.6 53.4 576 89.9 576 128s-7.4 74.6-20.9 108c-6.6 16.4-25.3 24.3-41.7 17.7S489.1 228.4 495.7 212c10.5-25.9 16.3-54.2 16.3-84s-5.8-58.1-16.3-84C489.1 27.6 497 9 513.4 2.3s35 1.3 41.7 17.7zM352 128c0 23.7-12.9 44.4-32 55.4L320 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-296.6c-19.1-11.1-32-31.7-32-55.4c0-35.3 28.7-64 64-64s64 28.7 64 64zM170.6 76.8C163.8 92.4 160 109.7 160 128s3.8 35.6 10.6 51.2c7.1 16.2-.3 35.1-16.5 42.1s-35.1-.3-42.1-16.5c-10.3-23.6-16-49.6-16-76.8s5.7-53.2 16-76.8c7.1-16.2 25.9-23.6 42.1-16.5s23.6 25.9 16.5 42.1zM464 51.2c10.3 23.6 16 49.6 16 76.8s-5.7 53.2-16 76.8c-7.1 16.2-25.9 23.6-42.1 16.5s-23.6-25.9-16.5-42.1c6.8-15.6 10.6-32.9 10.6-51.2s-3.8-35.6-10.6-51.2c-7.1-16.2 .3-35.1 16.5-42.1s35.1 .3 42.1 16.5z\"]\n};\nconst faBroadcastTower = faTowerBroadcast;\nconst faTruckPickup = {\n  prefix: 'fas',\n  iconName: 'truck-pickup',\n  icon: [640, 512, [128763], \"f63c\", \"M368.6 96l76.8 96L288 192l0-96 80.6 0zM224 80l0 112L64 192c-17.7 0-32 14.3-32 32l0 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l33.1 0c-.7 5.2-1.1 10.6-1.1 16c0 61.9 50.1 112 112 112s112-50.1 112-112c0-5.4-.4-10.8-1.1-16l66.3 0c-.7 5.2-1.1 10.6-1.1 16c0 61.9 50.1 112 112 112s112-50.1 112-112c0-5.4-.4-10.8-1.1-16l33.1 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-64c0-17.7-14.3-32-32-32l-48.6 0L418.6 56c-12.1-15.2-30.5-24-50-24L272 32c-26.5 0-48 21.5-48 48zm0 288a48 48 0 1 1 -96 0 48 48 0 1 1 96 0zm288 0a48 48 0 1 1 -96 0 48 48 0 1 1 96 0z\"]\n};\nconst faUpLong = {\n  prefix: 'fas',\n  iconName: 'up-long',\n  icon: [320, 512, [\"long-arrow-alt-up\"], \"f30c\", \"M318 177.5c3.8-8.8 2-19-4.6-26l-136-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-136 144c-6.6 7-8.4 17.2-4.6 26S14.4 192 24 192l72 0 0 288c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z\"]\n};\nconst faLongArrowAltUp = faUpLong;\nconst faStop = {\n  prefix: 'fas',\n  iconName: 'stop',\n  icon: [384, 512, [9209], \"f04d\", \"M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z\"]\n};\nconst faCodeMerge = {\n  prefix: 'fas',\n  iconName: 'code-merge',\n  icon: [448, 512, [], \"f387\", \"M80 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm32.4 97.2c28-12.4 47.6-40.5 47.6-73.2c0-44.2-35.8-80-80-80S0 35.8 0 80c0 32.8 19.7 61 48 73.3l0 205.3C19.7 371 0 399.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-32.8-19.7-61-48-73.3l0-86.6c26.7 20.1 60 32 96 32l86.7 0c12.3 28.3 40.5 48 73.3 48c44.2 0 80-35.8 80-80s-35.8-80-80-80c-32.8 0-61 19.7-73.3 48L208 240c-49.9 0-91-38.1-95.6-86.8zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM344 272a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faUpload = {\n  prefix: 'fas',\n  iconName: 'upload',\n  icon: [512, 512, [], \"f093\", \"M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faHurricane = {\n  prefix: 'fas',\n  iconName: 'hurricane',\n  icon: [384, 512, [], \"f751\", \"M0 208C0 104.4 75.7 18.5 174.9 2.6C184 1.2 192 8.6 192 17.9l0 63.3c0 8.4 6.5 15.3 14.7 16.5C307 112.5 384 199 384 303.4c0 103.6-75.7 189.5-174.9 205.4c-9.2 1.5-17.1-5.9-17.1-15.2l0-63.3c0-8.4-6.5-15.3-14.7-16.5C77 398.9 0 312.4 0 208zm288 48A96 96 0 1 0 96 256a96 96 0 1 0 192 0zm-96-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faMound = {\n  prefix: 'fas',\n  iconName: 'mound',\n  icon: [576, 512, [], \"e52d\", \"M144.1 179.2C173.8 127.7 228.6 96 288 96s114.2 31.7 143.9 83.2L540.4 368c12.3 21.3-3.1 48-27.7 48H63.3c-24.6 0-40-26.6-27.7-48L144.1 179.2z\"]\n};\nconst faToiletPortable = {\n  prefix: 'fas',\n  iconName: 'toilet-portable',\n  icon: [320, 512, [], \"e583\", \"M0 32L0 64l320 0 0-32c0-17.7-14.3-32-32-32L32 0C14.3 0 0 14.3 0 32zM24 96L0 96l0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8 224 0 0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-368 0-24-24 0L24 96zM256 240l0 64c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faCompactDisc = {\n  prefix: 'fas',\n  iconName: 'compact-disc',\n  icon: [512, 512, [128191, 128192, 128440], \"f51f\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 32a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm-96-32a96 96 0 1 0 192 0 96 96 0 1 0 -192 0zM96 240c0-35 17.5-71.1 45.2-98.8S205 96 240 96c8.8 0 16-7.2 16-16s-7.2-16-16-16c-45.4 0-89.2 22.3-121.5 54.5S64 194.6 64 240c0 8.8 7.2 16 16 16s16-7.2 16-16z\"]\n};\nconst faFileArrowDown = {\n  prefix: 'fas',\n  iconName: 'file-arrow-down',\n  icon: [384, 512, [\"file-download\"], \"f56d\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 232l0 102.1 31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31L168 232c0-13.3 10.7-24 24-24s24 10.7 24 24z\"]\n};\nconst faFileDownload = faFileArrowDown;\nconst faCaravan = {\n  prefix: 'fas',\n  iconName: 'caravan',\n  icon: [640, 512, [], \"f8ff\", \"M0 112C0 67.8 35.8 32 80 32l336 0c88.4 0 160 71.6 160 160l0 160 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0-288 0c0 53-43 96-96 96s-96-43-96-96l-16 0c-44.2 0-80-35.8-80-80L0 112zM320 352l128 0 0-96-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l32 0 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 192zM96 128c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L96 128zm96 336a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faShieldCat = {\n  prefix: 'fas',\n  iconName: 'shield-cat',\n  icon: [512, 512, [], \"e572\", \"M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM160 154.4c0-5.8 4.7-10.4 10.4-10.4l.2 0c3.4 0 6.5 1.6 8.5 4.3l40 53.3c3 4 7.8 6.4 12.8 6.4l48 0c5 0 9.8-2.4 12.8-6.4l40-53.3c2-2.7 5.2-4.3 8.5-4.3l.2 0c5.8 0 10.4 4.7 10.4 10.4L352 272c0 53-43 96-96 96s-96-43-96-96l0-117.6zM216 288a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm96-16a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z\"]\n};\nconst faBolt = {\n  prefix: 'fas',\n  iconName: 'bolt',\n  icon: [448, 512, [9889, \"zap\"], \"f0e7\", \"M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z\"]\n};\nconst faZap = faBolt;\nconst faGlassWater = {\n  prefix: 'fas',\n  iconName: 'glass-water',\n  icon: [384, 512, [], \"e4f4\", \"M32 0C23.1 0 14.6 3.7 8.6 10.2S-.6 25.4 .1 34.3L28.9 437.7c3 41.9 37.8 74.3 79.8 74.3l166.6 0c42 0 76.8-32.4 79.8-74.3L383.9 34.3c.6-8.9-2.4-17.6-8.5-24.1S360.9 0 352 0L32 0zM73 156.5L66.4 64l251.3 0L311 156.5l-24.2 12.1c-19.4 9.7-42.2 9.7-61.6 0c-20.9-10.4-45.5-10.4-66.4 0c-19.4 9.7-42.2 9.7-61.6 0L73 156.5z\"]\n};\nconst faOilWell = {\n  prefix: 'fas',\n  iconName: 'oil-well',\n  icon: [576, 512, [], \"e532\", \"M528.3 61.3c-11.4-42.7-55.3-68-98-56.6L414.9 8.8C397.8 13.4 387.7 31 392.3 48l24.5 91.4L308.5 167.5l-6.3-18.1C297.7 136.6 285.6 128 272 128s-25.7 8.6-30.2 21.4l-13.6 39L96 222.6 96 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 264-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l512 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-137.3 0L340 257.5l-62.2 16.1L305.3 352l-66.6 0L265 277l-74.6 19.3L137.3 448 96 448l0-159.2 337.4-87.5 25.2 94c4.6 17.1 22.1 27.2 39.2 22.6l15.5-4.1c42.7-11.4 68-55.3 56.6-98L528.3 61.3zM205.1 448l11.2-32 111.4 0 11.2 32-133.8 0z\"]\n};\nconst faVault = {\n  prefix: 'fas',\n  iconName: 'vault',\n  icon: [576, 512, [], \"e2c5\", \"M64 0C28.7 0 0 28.7 0 64L0 416c0 35.3 28.7 64 64 64l16 0 16 32 64 0 16-32 224 0 16 32 64 0 16-32 16 0c35.3 0 64-28.7 64-64l0-352c0-35.3-28.7-64-64-64L64 0zM224 320a80 80 0 1 0 0-160 80 80 0 1 0 0 160zm0-240a160 160 0 1 1 0 320 160 160 0 1 1 0-320zM480 221.3L480 336c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-114.7c-18.6-6.6-32-24.4-32-45.3c0-26.5 21.5-48 48-48s48 21.5 48 48c0 20.9-13.4 38.7-32 45.3z\"]\n};\nconst faMars = {\n  prefix: 'fas',\n  iconName: 'mars',\n  icon: [448, 512, [9794], \"f222\", \"M289.8 46.8c3.7-9 12.5-14.8 22.2-14.8l112 0c13.3 0 24 10.7 24 24l0 112c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-33.4-33.4L321 204.2c19.5 28.4 31 62.7 31 99.8c0 97.2-78.8 176-176 176S0 401.2 0 304s78.8-176 176-176c37 0 71.4 11.4 99.8 31l52.6-52.6L295 73c-6.9-6.9-8.9-17.2-5.2-26.2zM400 80s0 0 0 0s0 0 0 0s0 0 0 0zM176 416a112 112 0 1 0 0-224 112 112 0 1 0 0 224z\"]\n};\nconst faToilet = {\n  prefix: 'fas',\n  iconName: 'toilet',\n  icon: [448, 512, [128701], \"f7d8\", \"M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l8 0 0 148.9c-1.9 1.4-3.8 2.9-5.6 4.4C10.9 214.5 0 232.9 0 256c0 46.9 14.3 84.1 37 112.5c14.2 17.7 31.1 31.3 48.5 41.8L65.6 469.9c-3.3 9.8-1.6 20.5 4.4 28.8s15.7 13.3 26 13.3l256 0c10.3 0 19.9-4.9 26-13.3s7.7-19.1 4.4-28.8l-19.8-59.5c17.4-10.5 34.3-24.1 48.5-41.8c22.7-28.4 37-65.5 37-112.5c0-23.1-10.9-41.5-26.4-54.6c-1.8-1.5-3.7-3-5.6-4.4L416 48l8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 0zM384 256.3c0 1-.3 2.6-3.8 5.6c-4.8 4.1-14 9-29.3 13.4C320.5 284 276.1 288 224 288s-96.5-4-126.9-12.8c-15.3-4.4-24.5-9.3-29.3-13.4c-3.5-3-3.8-4.6-3.8-5.6l0-.3c0 0 0-.1 0-.1c0-1 0-2.5 3.8-5.8c4.8-4.1 14-9 29.3-13.4C127.5 228 171.9 224 224 224s96.5 4 126.9 12.8c15.3 4.4 24.5 9.3 29.3 13.4c3.8 3.2 3.8 4.8 3.8 5.8c0 0 0 .1 0 .1l0 .3zM328.2 384l-.2 .5 0-.5 .2 0zM112 64l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faPlaneCircleXmark = {\n  prefix: 'fas',\n  iconName: 'plane-circle-xmark',\n  icon: [640, 512, [], \"e557\", \"M256 0c-35 0-64 59.5-64 93.7l0 84.6L8.1 283.4c-5 2.8-8.1 8.2-8.1 13.9l0 65.5c0 10.6 10.2 18.3 20.4 15.4l171.6-49 0 70.9-57.6 43.2c-4 3-6.4 7.8-6.4 12.8l0 42c0 7.8 6.3 14 14 14c1.3 0 2.6-.2 3.9-.5L256 480l110.1 31.5c1.3 .4 2.6 .5 3.9 .5c6 0 11.1-3.7 13.1-9C344.5 470.7 320 422.2 320 368c0-60.6 30.6-114 77.1-145.6L320 178.3l0-84.6C320 59.5 292 0 256 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm59.3-180.7L518.6 368l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L496 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L473.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L496 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faYenSign = {\n  prefix: 'fas',\n  iconName: 'yen-sign',\n  icon: [320, 512, [165, \"cny\", \"jpy\", \"rmb\", \"yen\"], \"f157\", \"M58.6 46.3C48.8 31.5 29 27.6 14.2 37.4S-4.4 67 5.4 81.8L100.2 224 48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0 0 32-80 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 80 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 0-32 80 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-52.2 0L314.6 81.8c9.8-14.7 5.8-34.6-8.9-44.4s-34.6-5.8-44.4 8.9L160 198.3 58.6 46.3z\"]\n};\nconst faCny = faYenSign;\nconst faJpy = faYenSign;\nconst faRmb = faYenSign;\nconst faYen = faYenSign;\nconst faRubleSign = {\n  prefix: 'fas',\n  iconName: 'ruble-sign',\n  icon: [384, 512, [8381, \"rouble\", \"rub\", \"ruble\"], \"f158\", \"M96 32C78.3 32 64 46.3 64 64l0 192-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 32-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-32 112 0c79.5 0 144-64.5 144-144s-64.5-144-144-144L96 32zM240 256l-112 0 0-160 112 0c44.2 0 80 35.8 80 80s-35.8 80-80 80z\"]\n};\nconst faRouble = faRubleSign;\nconst faRub = faRubleSign;\nconst faRuble = faRubleSign;\nconst faSun = {\n  prefix: 'fas',\n  iconName: 'sun',\n  icon: [512, 512, [9728], \"f185\", \"M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z\"]\n};\nconst faGuitar = {\n  prefix: 'fas',\n  iconName: 'guitar',\n  icon: [512, 512, [], \"f7a6\", \"M465 7c-9.4-9.4-24.6-9.4-33.9 0L383 55c-2.4 2.4-4.3 5.3-5.5 8.5l-15.4 41-77.5 77.6c-45.1-29.4-99.3-30.2-131 1.6c-11 11-18 24.6-21.4 39.6c-3.7 16.6-19.1 30.7-36.1 31.6c-25.6 1.3-49.3 10.7-67.3 28.6C-16 328.4-7.6 409.4 47.5 464.5s136.1 63.5 180.9 18.7c17.9-17.9 27.4-41.7 28.6-67.3c.9-17 15-32.3 31.6-36.1c15-3.4 28.6-10.5 39.6-21.4c31.8-31.8 31-85.9 1.6-131l77.6-77.6 41-15.4c3.2-1.2 6.1-3.1 8.5-5.5l48-48c9.4-9.4 9.4-24.6 0-33.9L465 7zM208 256a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faFaceLaughWink = {\n  prefix: 'fas',\n  iconName: 'face-laugh-wink',\n  icon: [512, 512, [\"laugh-wink\"], \"f59c\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96.8 314.1c-3.8-13.7 7.4-26.1 21.6-26.1l275.2 0c14.2 0 25.5 12.4 21.6 26.1C396.2 382 332.1 432 256 432s-140.2-50-159.2-117.9zM144.4 192a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm156.4 25.6c-5.3 7.1-15.3 8.5-22.4 3.2s-8.5-15.3-3.2-22.4c30.4-40.5 91.2-40.5 121.6 0c5.3 7.1 3.9 17.1-3.2 22.4s-17.1 3.9-22.4-3.2c-17.6-23.5-52.8-23.5-70.4 0z\"]\n};\nconst faLaughWink = faFaceLaughWink;\nconst faHorseHead = {\n  prefix: 'fas',\n  iconName: 'horse-head',\n  icon: [640, 512, [], \"f7ab\", \"M64 464l0-147.1c0-108.4 68.3-205.1 170.5-241.3L404.2 15.5C425.6 7.9 448 23.8 448 46.4c0 11-5.5 21.2-14.6 27.3L400 96c48.1 0 91.2 29.8 108.1 74.9l48.6 129.5c11.8 31.4 4.1 66.8-19.6 90.5c-16 16-37.8 25.1-60.5 25.1l-3.4 0c-26.1 0-50.9-11.6-67.6-31.7l-32.3-38.7c-11.7 4.1-24.2 6.4-37.3 6.4c0 0 0 0-.1 0c0 0 0 0 0 0c-6.3 0-12.5-.5-18.6-1.5c-3.6-.6-7.2-1.4-10.7-2.3c0 0 0 0 0 0c-28.9-7.8-53.1-26.8-67.8-52.2c-4.4-7.6-14.2-10.3-21.9-5.8s-10.3 14.2-5.8 21.9c24 41.5 68.3 70 119.3 71.9l47.2 70.8c4 6.1 6.2 13.2 6.2 20.4c0 20.3-16.5 36.8-36.8 36.8L112 512c-26.5 0-48-21.5-48-48zM392 224a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faBoreHole = {\n  prefix: 'fas',\n  iconName: 'bore-hole',\n  icon: [512, 512, [], \"e4c3\", \"M256 0c-17.7 0-32 14.3-32 32l0 264.6c-19.1 11.1-32 31.7-32 55.4c0 35.3 28.7 64 64 64s64-28.7 64-64c0-23.7-12.9-44.4-32-55.4L288 32c0-17.7-14.3-32-32-32zM48 128c-26.5 0-48 21.5-48 48L0 464c0 26.5 21.5 48 48 48l416 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-80 0c-17.7 0-32 14.3-32 32l0 192c0 53-43 96-96 96s-96-43-96-96l0-192c0-17.7-14.3-32-32-32l-80 0z\"]\n};\nconst faIndustry = {\n  prefix: 'fas',\n  iconName: 'industry',\n  icon: [576, 512, [], \"f275\", \"M64 32C46.3 32 32 46.3 32 64l0 240 0 48 0 80c0 26.5 21.5 48 48 48l416 0c26.5 0 48-21.5 48-48l0-128 0-151.8c0-18.2-19.4-29.7-35.4-21.1L352 215.4l0-63.2c0-18.2-19.4-29.7-35.4-21.1L160 215.4 160 64c0-17.7-14.3-32-32-32L64 32z\"]\n};\nconst faCircleDown = {\n  prefix: 'fas',\n  iconName: 'circle-down',\n  icon: [512, 512, [61466, \"arrow-alt-circle-down\"], \"f358\", \"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM244.7 395.3l-112-112c-4.6-4.6-5.9-11.5-3.5-17.4s8.3-9.9 14.8-9.9l64 0 0-96c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 96 64 0c6.5 0 12.3 3.9 14.8 9.9s1.1 12.9-3.5 17.4l-112 112c-6.2 6.2-16.4 6.2-22.6 0z\"]\n};\nconst faArrowAltCircleDown = faCircleDown;\nconst faArrowsTurnToDots = {\n  prefix: 'fas',\n  iconName: 'arrows-turn-to-dots',\n  icon: [512, 512, [], \"e4c1\", \"M249.4 25.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L269.3 96 416 96c53 0 96 43 96 96l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32c0-17.7-14.3-32-32-32l-146.7 0 25.4 25.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-80-80c-12.5-12.5-12.5-32.8 0-45.3l80-80zm13.3 256l80 80c12.5 12.5 12.5 32.8 0 45.3l-80 80c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 416 96 416c-17.7 0-32 14.3-32 32l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32c0-53 43-96 96-96l146.7 0-25.4-25.4c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0zM384 384a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM64 192A64 64 0 1 1 64 64a64 64 0 1 1 0 128z\"]\n};\nconst faFlorinSign = {\n  prefix: 'fas',\n  iconName: 'florin-sign',\n  icon: [384, 512, [], \"e184\", \"M314.7 32c-38.8 0-73.7 23.3-88.6 59.1L170.7 224 64 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0L98.9 396.3c-5 11.9-16.6 19.7-29.5 19.7L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l37.3 0c38.8 0 73.7-23.3 88.6-59.1L213.3 288 320 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 45.1-108.3c5-11.9 16.6-19.7 29.5-19.7L352 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-37.3 0z\"]\n};\nconst faArrowDownShortWide = {\n  prefix: 'fas',\n  iconName: 'arrow-down-short-wide',\n  icon: [576, 512, [\"sort-amount-desc\", \"sort-amount-down-alt\"], \"f884\", \"M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faSortAmountDesc = faArrowDownShortWide;\nconst faSortAmountDownAlt = faArrowDownShortWide;\nconst faLessThan = {\n  prefix: 'fas',\n  iconName: 'less-than',\n  icon: [384, 512, [62774], \"3c\", \"M380.6 81.7c7.9 15.8 1.5 35-14.3 42.9L103.6 256 366.3 387.4c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3l-320-160C6.8 279.2 0 268.1 0 256s6.8-23.2 17.7-28.6l320-160c15.8-7.9 35-1.5 42.9 14.3z\"]\n};\nconst faAngleDown = {\n  prefix: 'fas',\n  iconName: 'angle-down',\n  icon: [448, 512, [8964], \"f107\", \"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z\"]\n};\nconst faCarTunnel = {\n  prefix: 'fas',\n  iconName: 'car-tunnel',\n  icon: [512, 512, [], \"e4de\", \"M256 0C114.6 0 0 114.6 0 256L0 448c0 35.3 28.7 64 64 64l42.8 0c-6.6-5.9-10.8-14.4-10.8-24l0-112c0-20.8 11.3-38.9 28.1-48.6l21-64.7c7.5-23.1 29-38.7 53.3-38.7l115.2 0c24.3 0 45.8 15.6 53.3 38.7l21 64.7c16.8 9.7 28.2 27.8 28.2 48.6l0 112c0 9.6-4.2 18.1-10.8 24l42.8 0c35.3 0 64-28.7 64-64l0-192C512 114.6 397.4 0 256 0zM362.8 512c-6.6-5.9-10.8-14.4-10.8-24l0-40-192 0 0 40c0 9.6-4.2 18.1-10.8 24l213.7 0zM190.8 277.5L177 320l158 0-13.8-42.5c-1.1-3.3-4.1-5.5-7.6-5.5l-115.2 0c-3.5 0-6.5 2.2-7.6 5.5zM168 408a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm200-24a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z\"]\n};\nconst faHeadSideCough = {\n  prefix: 'fas',\n  iconName: 'head-side-cough',\n  icon: [640, 512, [], \"e061\", \"M0 224.2C0 100.6 100.2 0 224 0l24 0c95.2 0 181.2 69.3 197.3 160.2c2.3 13 6.8 25.7 15.1 36l42 52.6c6.2 7.8 9.6 17.4 9.6 27.4c0 24.2-19.6 43.8-43.8 43.8L448 320s0 0 0 0l0 32L339.2 365.6c-11 1.4-19.2 10.7-19.2 21.8c0 11.6 9 21.2 20.6 21.9L448 416l0 16c0 26.5-21.5 48-48 48l-80 0 0 8c0 13.3-10.7 24-24 24l-40 0s0 0 0 0L96 512c-17.7 0-32-14.3-32-32l0-72.7c0-16.7-6.9-32.5-17.1-45.8C16.6 322.4 0 274.1 0 224.2zm352-.2a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM464 384a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm152-24a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM592 480a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM552 312a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm40-24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM552 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faGripLines = {\n  prefix: 'fas',\n  iconName: 'grip-lines',\n  icon: [448, 512, [], \"f7a4\", \"M32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 288zm0-128c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z\"]\n};\nconst faThumbsDown = {\n  prefix: 'fas',\n  iconName: 'thumbs-down',\n  icon: [512, 512, [128078, 61576], \"f165\", \"M313.4 479.1c26-5.2 42.9-30.5 37.7-56.5l-2.3-11.4c-5.3-26.7-15.1-52.1-28.8-75.2l144 0c26.5 0 48-21.5 48-48c0-18.5-10.5-34.6-25.9-42.6C497 236.6 504 223.1 504 208c0-23.4-16.8-42.9-38.9-47.1c4.4-7.3 6.9-15.8 6.9-24.9c0-21.3-13.9-39.4-33.1-45.6c.7-3.3 1.1-6.8 1.1-10.4c0-26.5-21.5-48-48-48l-97.5 0c-19 0-37.5 5.6-53.3 16.1L202.7 73.8C176 91.6 160 121.6 160 153.7l0 38.3 0 48 0 24.9c0 29.2 13.3 56.7 36 75l7.4 5.9c26.5 21.2 44.6 51 51.2 84.2l2.3 11.4c5.2 26 30.5 42.9 56.5 37.7zM32 384l64 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32L32 96C14.3 96 0 110.3 0 128L0 352c0 17.7 14.3 32 32 32z\"]\n};\nconst faUserLock = {\n  prefix: 'fas',\n  iconName: 'user-lock',\n  icon: [640, 512, [], \"f502\", \"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l362.8 0c-5.4-9.4-8.6-20.3-8.6-32l0-128c0-2.1 .1-4.2 .3-6.3c-31-26-71-41.7-114.6-41.7l-91.4 0zM528 240c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z\"]\n};\nconst faArrowRightLong = {\n  prefix: 'fas',\n  iconName: 'arrow-right-long',\n  icon: [512, 512, [\"long-arrow-right\"], \"f178\", \"M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l370.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z\"]\n};\nconst faLongArrowRight = faArrowRightLong;\nconst faAnchorCircleXmark = {\n  prefix: 'fas',\n  iconName: 'anchor-circle-xmark',\n  icon: [640, 512, [], \"e4ac\", \"M320 96a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm21.1 80C367 158.8 384 129.4 384 96c0-53-43-96-96-96s-96 43-96 96c0 33.4 17 62.8 42.9 80L224 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 208-48 0c-53 0-96-43-96-96l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L97 263c-9.4-9.4-24.6-9.4-33.9 0L7 319c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 88.4 71.6 160 160 160l80 0 80 0c8.2 0 16.3-.6 24.2-1.8c-22.2-16.2-40.4-37.5-53-62.2L320 448l0-80 0-128 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-10.9 0zM496 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm59.3-180.7L518.6 368l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L496 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L473.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L496 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faEllipsis = {\n  prefix: 'fas',\n  iconName: 'ellipsis',\n  icon: [448, 512, [\"ellipsis-h\"], \"f141\", \"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z\"]\n};\nconst faEllipsisH = faEllipsis;\nconst faChessPawn = {\n  prefix: 'fas',\n  iconName: 'chess-pawn',\n  icon: [320, 512, [9823], \"f443\", \"M215.5 224c29.2-18.4 48.5-50.9 48.5-88c0-57.4-46.6-104-104-104S56 78.6 56 136c0 37.1 19.4 69.6 48.5 88L96 224c-17.7 0-32 14.3-32 32c0 16.5 12.5 30 28.5 31.8L80 400l160 0L227.5 287.8c16-1.8 28.5-15.3 28.5-31.8c0-17.7-14.3-32-32-32l-8.5 0zM22.6 473.4c-4.2 4.2-6.6 10-6.6 16C16 501.9 26.1 512 38.6 512l242.7 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16L256 432 64 432 22.6 473.4z\"]\n};\nconst faKitMedical = {\n  prefix: 'fas',\n  iconName: 'kit-medical',\n  icon: [576, 512, [\"first-aid\"], \"f479\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l32 0L96 32 64 32zm64 0l0 448 320 0 0-448L128 32zM512 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-32 0 0 448 32 0zM256 176c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faFirstAid = faKitMedical;\nconst faPersonThroughWindow = {\n  prefix: 'fas',\n  iconName: 'person-through-window',\n  icon: [640, 512, [], \"e5a9\", \"M64 64l224 0 0 9.8c0 39-23.7 74-59.9 88.4C167.6 186.5 128 245 128 310.2l0 73.8s0 0 0 0l-64 0L64 64zm288 0l224 0 0 320-67.7 0-3.7-4.5-75.2-90.2c-9.1-10.9-22.6-17.3-36.9-17.3l-71.1 0-41-63.1c-.3-.5-.6-1-1-1.4c44.7-29 72.5-79 72.5-133.6l0-9.8zm73 320l-45.8 0 42.7 64L592 448c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48L48 0C21.5 0 0 21.5 0 48L0 400c0 26.5 21.5 48 48 48l260.2 0 33.2 49.8c9.8 14.7 29.7 18.7 44.4 8.9s18.7-29.7 8.9-44.4L310.5 336l74.6 0 40 48zm-159.5 0L192 384s0 0 0 0l0-73.8c0-10.2 1.6-20.1 4.7-29.5L265.5 384zM192 128a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"]\n};\nconst faToolbox = {\n  prefix: 'fas',\n  iconName: 'toolbox',\n  icon: [512, 512, [129520], \"f552\", \"M176 88l0 40 160 0 0-40c0-4.4-3.6-8-8-8L184 80c-4.4 0-8 3.6-8 8zm-48 40l0-40c0-30.9 25.1-56 56-56l144 0c30.9 0 56 25.1 56 56l0 40 28.1 0c12.7 0 24.9 5.1 33.9 14.1l51.9 51.9c9 9 14.1 21.2 14.1 33.9l0 92.1-128 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32-128 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L0 320l0-92.1c0-12.7 5.1-24.9 14.1-33.9l51.9-51.9c9-9 21.2-14.1 33.9-14.1l28.1 0zM0 416l0-64 128 0c0 17.7 14.3 32 32 32s32-14.3 32-32l128 0c0 17.7 14.3 32 32 32s32-14.3 32-32l128 0 0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64z\"]\n};\nconst faHandsHoldingCircle = {\n  prefix: 'fas',\n  iconName: 'hands-holding-circle',\n  icon: [640, 512, [], \"e4fb\", \"M320 0a128 128 0 1 1 0 256A128 128 0 1 1 320 0zM40 64c22.1 0 40 17.9 40 40l0 40 0 80 0 40.2c0 17 6.7 33.3 18.7 45.3l51.1 51.1c8.3 8.3 21.3 9.6 31 3.1c12.9-8.6 14.7-26.9 3.7-37.8l-15.2-15.2-32-32c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l32 32 15.2 15.2c0 0 0 0 0 0l25.3 25.3c21 21 32.8 49.5 32.8 79.2l0 78.9c0 26.5-21.5 48-48 48l-66.7 0c-17 0-33.3-6.7-45.3-18.7L28.1 393.4C10.1 375.4 0 351 0 325.5L0 224l0-64 0-56C0 81.9 17.9 64 40 64zm560 0c22.1 0 40 17.9 40 40l0 56 0 64 0 101.5c0 25.5-10.1 49.9-28.1 67.9L512 493.3c-12 12-28.3 18.7-45.3 18.7L400 512c-26.5 0-48-21.5-48-48l0-78.9c0-29.7 11.8-58.2 32.8-79.2l25.3-25.3c0 0 0 0 0 0l15.2-15.2 32-32c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-32 32-15.2 15.2c-11 11-9.2 29.2 3.7 37.8c9.7 6.5 22.7 5.2 31-3.1l51.1-51.1c12-12 18.7-28.3 18.7-45.3l0-40.2 0-80 0-40c0-22.1 17.9-40 40-40z\"]\n};\nconst faBug = {\n  prefix: 'fas',\n  iconName: 'bug',\n  icon: [512, 512, [], \"f188\", \"M256 0c53 0 96 43 96 96l0 3.6c0 15.7-12.7 28.4-28.4 28.4l-135.1 0c-15.7 0-28.4-12.7-28.4-28.4l0-3.6c0-53 43-96 96-96zM41.4 105.4c12.5-12.5 32.8-12.5 45.3 0l64 64c.7 .7 1.3 1.4 1.9 2.1c14.2-7.3 30.4-11.4 47.5-11.4l112 0c17.1 0 33.2 4.1 47.5 11.4c.6-.7 1.2-1.4 1.9-2.1l64-64c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-64 64c-.7 .7-1.4 1.3-2.1 1.9c6.2 12 10.1 25.3 11.1 39.5l64.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c0 24.6-5.5 47.8-15.4 68.6c2.2 1.3 4.2 2.9 6 4.8l64 64c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-63.1-63.1c-24.5 21.8-55.8 36.2-90.3 39.6L272 240c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 239.2c-34.5-3.4-65.8-17.8-90.3-39.6L86.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l64-64c1.9-1.9 3.9-3.4 6-4.8C101.5 367.8 96 344.6 96 320l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64.3 0c1.1-14.1 5-27.5 11.1-39.5c-.7-.6-1.4-1.2-2.1-1.9l-64-64c-12.5-12.5-12.5-32.8 0-45.3z\"]\n};\nconst faCreditCard = {\n  prefix: 'fas',\n  iconName: 'credit-card',\n  icon: [576, 512, [128179, 62083, \"credit-card-alt\"], \"f09d\", \"M64 32C28.7 32 0 60.7 0 96l0 32 576 0 0-32c0-35.3-28.7-64-64-64L64 32zM576 224L0 224 0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-192zM112 352l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm112 16c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z\"]\n};\nconst faCreditCardAlt = faCreditCard;\nconst faCar = {\n  prefix: 'fas',\n  iconName: 'car',\n  icon: [512, 512, [128664, \"automobile\"], \"f1b9\", \"M135.2 117.4L109.1 192l293.8 0-26.1-74.6C372.3 104.6 360.2 96 346.6 96L165.4 96c-13.6 0-25.7 8.6-30.2 21.4zM39.6 196.8L74.8 96.3C88.3 57.8 124.6 32 165.4 32l181.2 0c40.8 0 77.1 25.8 90.6 64.3l35.2 100.5c23.2 9.6 39.6 32.5 39.6 59.2l0 144 0 48c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-48L96 400l0 48c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-48L0 256c0-26.7 16.4-49.6 39.6-59.2zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faAutomobile = faCar;\nconst faHandHoldingHand = {\n  prefix: 'fas',\n  iconName: 'hand-holding-hand',\n  icon: [576, 512, [], \"e4f7\", \"M7.8 207.7c-13.1-17.8-9.3-42.8 8.5-55.9L142.9 58.5C166.2 41.3 194.5 32 223.5 32L384 32l160 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-36.8 0-44.9 36c-22.7 18.2-50.9 28-80 28L304 224l-16 0-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-120.6 0L63.7 216.2c-17.8 13.1-42.8 9.3-55.9-8.5zM382.4 160c0 0 0 0 0 0l.9 0c-.3 0-.6 0-.9 0zM568.2 304.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 453.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 480 32 480c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 352c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z\"]\n};\nconst faBookOpenReader = {\n  prefix: 'fas',\n  iconName: 'book-open-reader',\n  icon: [512, 512, [\"book-reader\"], \"f5da\", \"M160 96a96 96 0 1 1 192 0A96 96 0 1 1 160 96zm80 152l0 264-48.4-24.2c-20.9-10.4-43.5-17-66.8-19.3l-96-9.6C12.5 457.2 0 443.5 0 427L0 224c0-17.7 14.3-32 32-32l30.3 0c63.6 0 125.6 19.6 177.7 56zm32 264l0-264c52.1-36.4 114.1-56 177.7-56l30.3 0c17.7 0 32 14.3 32 32l0 203c0 16.4-12.5 30.2-28.8 31.8l-96 9.6c-23.2 2.3-45.9 8.9-66.8 19.3L272 512z\"]\n};\nconst faBookReader = faBookOpenReader;\nconst faMountainSun = {\n  prefix: 'fas',\n  iconName: 'mountain-sun',\n  icon: [640, 512, [], \"e52f\", \"M560 160A80 80 0 1 0 560 0a80 80 0 1 0 0 160zM55.9 512l325.2 0 75 0 122.8 0c33.8 0 61.1-27.4 61.1-61.1c0-11.2-3.1-22.2-8.9-31.8l-132-216.3C495 196.1 487.8 192 480 192s-15 4.1-19.1 10.7l-48.2 79L286.8 81c-6.6-10.6-18.3-17-30.8-17s-24.1 6.4-30.8 17L8.6 426.4C3 435.3 0 445.6 0 456.1C0 487 25 512 55.9 512z\"]\n};\nconst faArrowsLeftRightToLine = {\n  prefix: 'fas',\n  iconName: 'arrows-left-right-to-line',\n  icon: [640, 512, [], \"e4ba\", \"M32 64c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 96C0 78.3 14.3 64 32 64zm214.6 73.4c12.5 12.5 12.5 32.8 0 45.3L205.3 224l229.5 0-41.4-41.4c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3l-96 96c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L434.7 288l-229.5 0 41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0zM640 96l0 320c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-320c0-17.7 14.3-32 32-32s32 14.3 32 32z\"]\n};\nconst faDiceD20 = {\n  prefix: 'fas',\n  iconName: 'dice-d20',\n  icon: [512, 512, [], \"f6cf\", \"M48.7 125.8l53.2 31.9c7.8 4.7 17.8 2 22.2-5.9L201.6 12.1c3-5.4-.9-12.1-7.1-12.1c-1.6 0-3.2 .5-4.6 1.4L47.9 98.8c-9.6 6.6-9.2 20.9 .8 26.9zM16 171.7l0 123.5c0 8 10.4 11 14.7 4.4l60-92c5-7.6 2.6-17.8-5.2-22.5L40.2 158C29.6 151.6 16 159.3 16 171.7zM310.4 12.1l77.6 139.6c4.4 7.9 14.5 10.6 22.2 5.9l53.2-31.9c10-6 10.4-20.3 .8-26.9L322.1 1.4c-1.4-.9-3-1.4-4.6-1.4c-6.2 0-10.1 6.7-7.1 12.1zM496 171.7c0-12.4-13.6-20.1-24.2-13.7l-45.3 27.2c-7.8 4.7-10.1 14.9-5.2 22.5l60 92c4.3 6.7 14.7 3.6 14.7-4.4l0-123.5zm-49.3 246L286.1 436.6c-8.1 .9-14.1 7.8-14.1 15.9l0 52.8c0 3.7 3 6.8 6.8 6.8c.8 0 1.6-.1 2.4-.4l172.7-64c6.1-2.2 10.1-8 10.1-14.5c0-9.3-8.1-16.5-17.3-15.4zM233.2 512c3.7 0 6.8-3 6.8-6.8l0-52.6c0-8.1-6.1-14.9-14.1-15.9l-160.6-19c-9.2-1.1-17.3 6.1-17.3 15.4c0 6.5 4 12.3 10.1 14.5l172.7 64c.8 .3 1.6 .4 2.4 .4zM41.7 382.9l170.9 20.2c7.8 .9 13.4-7.5 9.5-14.3l-85.7-150c-5.9-10.4-20.7-10.8-27.3-.8L30.2 358.2c-6.5 9.9-.3 23.3 11.5 24.7zm439.6-24.8L402.9 238.1c-6.5-10-21.4-9.6-27.3 .8L290.2 388.5c-3.9 6.8 1.6 15.2 9.5 14.3l170.1-20c11.8-1.4 18-14.7 11.5-24.6zm-216.9 11l78.4-137.2c6.1-10.7-1.6-23.9-13.9-23.9l-145.7 0c-12.3 0-20 13.3-13.9 23.9l78.4 137.2c3.7 6.4 13 6.4 16.7 0zM174.4 176l163.2 0c12.2 0 19.9-13.1 14-23.8l-80-144c-2.8-5.1-8.2-8.2-14-8.2l-3.2 0c-5.8 0-11.2 3.2-14 8.2l-80 144c-5.9 10.7 1.8 23.8 14 23.8z\"]\n};\nconst faTruckDroplet = {\n  prefix: 'fas',\n  iconName: 'truck-droplet',\n  icon: [640, 512, [], \"e58c\", \"M0 48C0 21.5 21.5 0 48 0L368 0c26.5 0 48 21.5 48 48l0 48 50.7 0c17 0 33.3 6.7 45.3 18.7L589.3 192c12 12 18.7 28.3 18.7 45.3l0 18.7 0 32 0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c0 53-43 96-96 96s-96-43-96-96l-128 0c0 53-43 96-96 96s-96-43-96-96l-16 0c-26.5 0-48-21.5-48-48L0 48zM416 256l128 0 0-18.7L466.7 160 416 160l0 96zM160 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm368-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM208 272c39.8 0 72-29.6 72-66c0-27-39.4-82.9-59.9-110.3c-6.1-8.2-18.1-8.2-24.2 0C175.4 123 136 179 136 206c0 36.5 32.2 66 72 66z\"]\n};\nconst faFileCircleXmark = {\n  prefix: 'fas',\n  iconName: 'file-circle-xmark',\n  icon: [576, 512, [], \"e5a1\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zm48 96a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm59.3 107.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L432 345.4l-36.7-36.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L409.4 368l-36.7 36.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L432 390.6l36.7 36.7c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L454.6 368l36.7-36.7z\"]\n};\nconst faTemperatureArrowUp = {\n  prefix: 'fas',\n  iconName: 'temperature-arrow-up',\n  icon: [576, 512, [\"temperature-up\"], \"e040\", \"M128 112c0-26.5 21.5-48 48-48s48 21.5 48 48l0 164.5c0 17.3 7.1 31.9 15.3 42.5C249.8 332.6 256 349.5 256 368c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-18.5 6.2-35.4 16.7-48.9c8.2-10.6 15.3-25.2 15.3-42.5L128 112zM176 0C114.1 0 64 50.1 64 112l0 164.4c0 .1-.1 .3-.2 .6c-.2 .6-.8 1.6-1.7 2.8C43.2 304.2 32 334.8 32 368c0 79.5 64.5 144 144 144s144-64.5 144-144c0-33.2-11.2-63.8-30.1-88.1c-.9-1.2-1.5-2.2-1.7-2.8c-.1-.3-.2-.5-.2-.6L288 112C288 50.1 237.9 0 176 0zm0 416c26.5 0 48-21.5 48-48c0-20.9-13.4-38.7-32-45.3L192 112c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 210.7c-18.6 6.6-32 24.4-32 45.3c0 26.5 21.5 48 48 48zM480 160l32 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l32 0 0 288c0 17.7 14.3 32 32 32s32-14.3 32-32l0-288z\"]\n};\nconst faTemperatureUp = faTemperatureArrowUp;\nconst faMedal = {\n  prefix: 'fas',\n  iconName: 'medal',\n  icon: [512, 512, [127941], \"f5a2\", \"M4.1 38.2C1.4 34.2 0 29.4 0 24.6C0 11 11 0 24.6 0L133.9 0c11.2 0 21.7 5.9 27.4 15.5l68.5 114.1c-48.2 6.1-91.3 28.6-123.4 61.9L4.1 38.2zm503.7 0L405.6 191.5c-32.1-33.3-75.2-55.8-123.4-61.9L350.7 15.5C356.5 5.9 366.9 0 378.1 0L487.4 0C501 0 512 11 512 24.6c0 4.8-1.4 9.6-4.1 13.6zM80 336a176 176 0 1 1 352 0A176 176 0 1 1 80 336zm184.4-94.9c-3.4-7-13.3-7-16.8 0l-22.4 45.4c-1.4 2.8-4 4.7-7 5.1L168 298.9c-7.7 1.1-10.7 10.5-5.2 16l36.3 35.4c2.2 2.2 3.2 5.2 2.7 8.3l-8.6 49.9c-1.3 7.6 6.7 13.5 13.6 9.9l44.8-23.6c2.7-1.4 6-1.4 8.7 0l44.8 23.6c6.9 3.6 14.9-2.2 13.6-9.9l-8.6-49.9c-.5-3 .5-6.1 2.7-8.3l36.3-35.4c5.6-5.4 2.5-14.8-5.2-16l-50.1-7.3c-3-.4-5.7-2.4-7-5.1l-22.4-45.4z\"]\n};\nconst faBed = {\n  prefix: 'fas',\n  iconName: 'bed',\n  icon: [640, 512, [128716], \"f236\", \"M32 32c17.7 0 32 14.3 32 32l0 256 224 0 0-160c0-17.7 14.3-32 32-32l224 0c53 0 96 43 96 96l0 224c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-224 0-32 0L64 416l0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 64C0 46.3 14.3 32 32 32zm144 96a80 80 0 1 1 0 160 80 80 0 1 1 0-160z\"]\n};\nconst faSquareH = {\n  prefix: 'fas',\n  iconName: 'square-h',\n  icon: [448, 512, [\"h-square\"], \"f0fd\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM336 152l0 104 0 104c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-80-128 0 0 80c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-208c0-13.3 10.7-24 24-24s24 10.7 24 24l0 80 128 0 0-80c0-13.3 10.7-24 24-24s24 10.7 24 24z\"]\n};\nconst faHSquare = faSquareH;\nconst faPodcast = {\n  prefix: 'fas',\n  iconName: 'podcast',\n  icon: [448, 512, [], \"f2ce\", \"M319.4 372c48.5-31.3 80.6-85.9 80.6-148c0-97.2-78.8-176-176-176S48 126.8 48 224c0 62.1 32.1 116.6 80.6 148c1.2 17.3 4 38 7.2 57.1l.2 1C56 395.8 0 316.5 0 224C0 100.3 100.3 0 224 0S448 100.3 448 224c0 92.5-56 171.9-136 206.1l.2-1.1c3.1-19.2 6-39.8 7.2-57zm-2.3-38.1c-1.6-5.7-3.9-11.1-7-16.2c-5.8-9.7-13.5-17-21.9-22.4c19.5-17.6 31.8-43 31.8-71.3c0-53-43-96-96-96s-96 43-96 96c0 28.3 12.3 53.8 31.8 71.3c-8.4 5.4-16.1 12.7-21.9 22.4c-3.1 5.1-5.4 10.5-7 16.2C99.8 307.5 80 268 80 224c0-79.5 64.5-144 144-144s144 64.5 144 144c0 44-19.8 83.5-50.9 109.9zM224 312c32.9 0 64 8.6 64 43.8c0 33-12.9 104.1-20.6 132.9c-5.1 19-24.5 23.4-43.4 23.4s-38.2-4.4-43.4-23.4c-7.8-28.5-20.6-99.7-20.6-132.8c0-35.1 31.1-43.8 64-43.8zm0-144a56 56 0 1 1 0 112 56 56 0 1 1 0-112z\"]\n};\nconst faTemperatureFull = {\n  prefix: 'fas',\n  iconName: 'temperature-full',\n  icon: [320, 512, [\"temperature-4\", \"thermometer-4\", \"thermometer-full\"], \"f2c7\", \"M160 64c-26.5 0-48 21.5-48 48l0 164.5c0 17.3-7.1 31.9-15.3 42.5C86.2 332.6 80 349.5 80 368c0 44.2 35.8 80 80 80s80-35.8 80-80c0-18.5-6.2-35.4-16.7-48.9c-8.2-10.6-15.3-25.2-15.3-42.5L208 112c0-26.5-21.5-48-48-48zM48 112C48 50.2 98.1 0 160 0s112 50.1 112 112l0 164.4c0 .1 .1 .3 .2 .6c.2 .6 .8 1.6 1.7 2.8c18.9 24.4 30.1 55 30.1 88.1c0 79.5-64.5 144-144 144S16 447.5 16 368c0-33.2 11.2-63.8 30.1-88.1c.9-1.2 1.5-2.2 1.7-2.8c.1-.3 .2-.5 .2-.6L48 112zM208 368c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-20.9 13.4-38.7 32-45.3L144 112c0-8.8 7.2-16 16-16s16 7.2 16 16l0 210.7c18.6 6.6 32 24.4 32 45.3z\"]\n};\nconst faTemperature4 = faTemperatureFull;\nconst faThermometer4 = faTemperatureFull;\nconst faThermometerFull = faTemperatureFull;\nconst faBell = {\n  prefix: 'fas',\n  iconName: 'bell',\n  icon: [448, 512, [128276, 61602], \"f0f3\", \"M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416l384 0c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8l0-18.8c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z\"]\n};\nconst faSuperscript = {\n  prefix: 'fas',\n  iconName: 'superscript',\n  icon: [512, 512, [], \"f12b\", \"M480 32c0-11.1-5.7-21.4-15.2-27.2s-21.2-6.4-31.1-1.4l-32 16c-15.8 7.9-22.2 27.1-14.3 42.9C393 73.5 404.3 80 416 80l0 80c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-128zM32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l15.3 0 89.6 128L47.3 384 32 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c10.4 0 20.2-5.1 26.2-13.6L176 311.8l85.8 122.6c6 8.6 15.8 13.6 26.2 13.6l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-15.3 0L215.1 256l89.6-128 15.3 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-10.4 0-20.2 5.1-26.2 13.6L176 200.2 90.2 77.6C84.2 69.1 74.4 64 64 64L32 64z\"]\n};\nconst faPlugCircleXmark = {\n  prefix: 'fas',\n  iconName: 'plug-circle-xmark',\n  icon: [576, 512, [], \"e560\", \"M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm59.3-180.7L454.6 368l36.7 36.7c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L432 390.6l-36.7 36.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L409.4 368l-36.7-36.7c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L432 345.4l36.7-36.7c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faStarOfLife = {\n  prefix: 'fas',\n  iconName: 'star-of-life',\n  icon: [512, 512, [], \"f621\", \"M208 32c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 140.9 122-70.4c15.3-8.8 34.9-3.6 43.7 11.7l16 27.7c8.8 15.3 3.6 34.9-11.7 43.7L352 256l122 70.4c15.3 8.8 20.6 28.4 11.7 43.7l-16 27.7c-8.8 15.3-28.4 20.6-43.7 11.7L304 339.1 304 480c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-140.9L86 409.6c-15.3 8.8-34.9 3.6-43.7-11.7l-16-27.7c-8.8-15.3-3.6-34.9 11.7-43.7L160 256 38 185.6c-15.3-8.8-20.5-28.4-11.7-43.7l16-27.7C51.1 98.8 70.7 93.6 86 102.4l122 70.4L208 32z\"]\n};\nconst faPhoneSlash = {\n  prefix: 'fas',\n  iconName: 'phone-slash',\n  icon: [640, 512, [], \"f3dd\", \"M228.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C76.1 30.2 64 46 64 64c0 107.4 37.8 206 100.8 283.1L9.2 469.1c-10.4 8.2-12.3 23.3-4.1 33.7s23.3 12.3 33.7 4.1l592-464c10.4-8.2 12.3-23.3 4.1-33.7s-23.3-12.3-33.7-4.1L253 278c-17.8-21.5-32.9-45.2-45-70.7L257.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96zm96.8 319l-91.3 72C310.7 476 407.1 512 512 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L368.7 368c-15-7.1-29.3-15.2-43-24.3z\"]\n};\nconst faPaintRoller = {\n  prefix: 'fas',\n  iconName: 'paint-roller',\n  icon: [512, 512, [], \"f5aa\", \"M0 64C0 28.7 28.7 0 64 0L352 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 192c-35.3 0-64-28.7-64-64L0 64zM160 352c0-17.7 14.3-32 32-32l0-16c0-44.2 35.8-80 80-80l144 0c17.7 0 32-14.3 32-32l0-32 0-90.5c37.3 13.2 64 48.7 64 90.5l0 32c0 53-43 96-96 96l-144 0c-8.8 0-16 7.2-16 16l0 16c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-128z\"]\n};\nconst faHandshakeAngle = {\n  prefix: 'fas',\n  iconName: 'handshake-angle',\n  icon: [640, 512, [\"hands-helping\"], \"f4c4\", \"M544 248l0 3.3 69.7-69.7c21.9-21.9 21.9-57.3 0-79.2L535.6 24.4c-21.9-21.9-57.3-21.9-79.2 0L416.3 64.5c-2.7-.3-5.5-.5-8.3-.5L296 64c-37.1 0-67.6 28-71.6 64l-.4 0 0 120c0 22.1 17.9 40 40 40s40-17.9 40-40l0-72c0 0 0-.1 0-.1l0-15.9 16 0 136 0c0 0 0 0 .1 0l7.9 0c44.2 0 80 35.8 80 80l0 8zM336 192l0 56c0 39.8-32.2 72-72 72s-72-32.2-72-72l0-118.6c-35.9 6.2-65.8 32.3-76 68.2L99.5 255.2 26.3 328.4c-21.9 21.9-21.9 57.3 0 79.2l78.1 78.1c21.9 21.9 57.3 21.9 79.2 0l37.7-37.7c.9 0 1.8 .1 2.7 .1l160 0c26.5 0 48-21.5 48-48c0-5.6-1-11-2.7-16l2.7 0c26.5 0 48-21.5 48-48c0-12.8-5-24.4-13.2-33c25.7-5 45.1-27.6 45.2-54.8l0-.4c-.1-30.8-25.1-55.8-56-55.8c0 0 0 0 0 0l-120 0z\"]\n};\nconst faHandsHelping = faHandshakeAngle;\nconst faLocationDot = {\n  prefix: 'fas',\n  iconName: 'location-dot',\n  icon: [384, 512, [\"map-marker-alt\"], \"f3c5\", \"M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\"]\n};\nconst faMapMarkerAlt = faLocationDot;\nconst faFile = {\n  prefix: 'fas',\n  iconName: 'file',\n  icon: [384, 512, [128196, 128459, 61462], \"f15b\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z\"]\n};\nconst faGreaterThan = {\n  prefix: 'fas',\n  iconName: 'greater-than',\n  icon: [384, 512, [62769], \"3e\", \"M3.4 81.7c-7.9 15.8-1.5 35 14.3 42.9L280.5 256 17.7 387.4C1.9 395.3-4.5 414.5 3.4 430.3s27.1 22.2 42.9 14.3l320-160c10.8-5.4 17.7-16.5 17.7-28.6s-6.8-23.2-17.7-28.6l-320-160c-15.8-7.9-35-1.5-42.9 14.3z\"]\n};\nconst faPersonSwimming = {\n  prefix: 'fas',\n  iconName: 'person-swimming',\n  icon: [576, 512, [127946, \"swimmer\"], \"f5c4\", \"M309.5 178.4L447.9 297.1c-1.6 .9-3.2 2-4.8 3c-18 12.4-40.1 20.3-59.2 20.3c-19.6 0-40.8-7.7-59.2-20.3c-22.1-15.5-51.6-15.5-73.7 0c-17.1 11.8-38 20.3-59.2 20.3c-10.1 0-21.1-2.2-31.9-6.2C163.1 193.2 262.2 96 384 96l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-26.9 0-52.3 6.6-74.5 18.4zM160 160A64 64 0 1 1 32 160a64 64 0 1 1 128 0zM306.5 325.9C329 341.4 356.5 352 384 352c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 405.7 417 416 384 416c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 341.2 165.1 352 192 352c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z\"]\n};\nconst faSwimmer = faPersonSwimming;\nconst faArrowDown = {\n  prefix: 'fas',\n  iconName: 'arrow-down',\n  icon: [384, 512, [8595], \"f063\", \"M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z\"]\n};\nconst faDroplet = {\n  prefix: 'fas',\n  iconName: 'droplet',\n  icon: [384, 512, [128167, \"tint\"], \"f043\", \"M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0l1.8 0c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zM96 336c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 61.9 50.1 112 112 112c8.8 0 16-7.2 16-16s-7.2-16-16-16c-44.2 0-80-35.8-80-80z\"]\n};\nconst faTint = faDroplet;\nconst faEraser = {\n  prefix: 'fas',\n  iconName: 'eraser',\n  icon: [576, 512, [], \"f12d\", \"M290.7 57.4L57.4 290.7c-25 25-25 65.5 0 90.5l80 80c12 12 28.3 18.7 45.3 18.7L288 480l9.4 0L512 480c17.7 0 32-14.3 32-32s-14.3-32-32-32l-124.1 0L518.6 285.3c25-25 25-65.5 0-90.5L381.3 57.4c-25-25-65.5-25-90.5 0zM297.4 416l-9.4 0-105.4 0-80-80L227.3 211.3 364.7 348.7 297.4 416z\"]\n};\nconst faEarthAmericas = {\n  prefix: 'fas',\n  iconName: 'earth-americas',\n  icon: [512, 512, [127758, \"earth\", \"earth-america\", \"globe-americas\"], \"f57d\", \"M57.7 193l9.4 16.4c8.3 14.5 21.9 25.2 38 29.8L163 255.7c17.2 4.9 29 20.6 29 38.5l0 39.9c0 11 6.2 21 16 25.9s16 14.9 16 25.9l0 39c0 15.6 14.9 26.9 29.9 22.6c16.1-4.6 28.6-17.5 32.7-33.8l2.8-11.2c4.2-16.9 15.2-31.4 30.3-40l8.1-4.6c15-8.5 24.2-24.5 24.2-41.7l0-8.3c0-12.7-5.1-24.9-14.1-33.9l-3.9-3.9c-9-9-21.2-14.1-33.9-14.1L257 256c-11.1 0-22.1-2.9-31.8-8.4l-34.5-19.7c-4.3-2.5-7.6-6.5-9.2-11.2c-3.2-9.6 1.1-20 10.2-24.5l5.9-3c6.6-3.3 14.3-3.9 21.3-1.5l23.2 7.7c8.2 2.7 17.2-.4 21.9-7.5c4.7-7 4.2-16.3-1.2-22.8l-13.6-16.3c-10-12-9.9-29.5 .3-41.3l15.7-18.3c8.8-10.3 10.2-25 3.5-36.7l-2.4-4.2c-3.5-.2-6.9-.3-10.4-.3C163.1 48 84.4 108.9 57.7 193zM464 256c0-36.8-9.6-71.4-26.4-101.5L412 164.8c-15.7 6.3-23.8 23.8-18.5 39.8l16.9 50.7c3.5 10.4 12 18.3 22.6 20.9l29.1 7.3c1.2-9 1.8-18.2 1.8-27.5zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z\"]\n};\nconst faEarth = faEarthAmericas;\nconst faEarthAmerica = faEarthAmericas;\nconst faGlobeAmericas = faEarthAmericas;\nconst faPersonBurst = {\n  prefix: 'fas',\n  iconName: 'person-burst',\n  icon: [640, 512, [], \"e53b\", \"M480 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-8 384l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-223.1 28.6 47.5c9.1 15.1 28.8 20 43.9 10.9s20-28.8 10.9-43.9l-58.3-97c-17.4-28.9-48.6-46.6-82.3-46.6l-29.7 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9L408 256.9 408 480c0 17.7 14.3 32 32 32s32-14.3 32-32zM190.9 18.1C188.4 12 182.6 8 176 8s-12.4 4-14.9 10.1l-29.4 74L55.6 68.9c-6.3-1.9-13.1 .2-17.2 5.3s-4.6 12.2-1.4 17.9l39.5 69.1L10.9 206.4c-5.4 3.7-8 10.3-6.5 16.7s6.7 11.2 13.1 12.2l78.7 12.2L90.6 327c-.5 6.5 3.1 12.7 9 15.5s12.9 1.8 17.8-2.6L176 286.1l58.6 53.9c4.8 4.4 11.9 5.5 17.8 2.6s9.5-9 9-15.5l-5.6-79.4 50.5-7.8 24.3-40.5-55.2-38L315 92.2c3.3-5.7 2.7-12.8-1.4-17.9s-10.9-7.2-17.2-5.3L220.3 92.1l-29.4-74z\"]\n};\nconst faDove = {\n  prefix: 'fas',\n  iconName: 'dove',\n  icon: [512, 512, [128330], \"f4ba\", \"M160.8 96.5c14 17 31 30.9 49.5 42.2c25.9 15.8 53.7 25.9 77.7 31.6l0-31.5C265.8 108.5 250 71.5 248.6 28c-.4-11.3-7.5-21.5-18.4-24.4c-7.6-2-15.8-.2-21 5.8c-13.3 15.4-32.7 44.6-48.4 87.2zM320 144l0 30.6s0 0 0 0l0 1.3s0 0 0 0l0 32.1c-60.8-5.1-185-43.8-219.3-157.2C97.4 40 87.9 32 76.6 32c-7.9 0-15.3 3.9-18.8 11C46.8 65.9 32 112.1 32 176c0 116.9 80.1 180.5 118.4 202.8L11.8 416.6C6.7 418 2.6 421.8 .9 426.8s-.8 10.6 2.3 14.8C21.7 466.2 77.3 512 160 512c3.6 0 7.2-1.2 10-3.5L245.6 448l74.4 0c88.4 0 160-71.6 160-160l0-160 29.9-44.9c1.3-2 2.1-4.4 2.1-6.8c0-6.8-5.5-12.3-12.3-12.3L400 64c-44.2 0-80 35.8-80 80zm80-16a16 16 0 1 1 0 32 16 16 0 1 1 0-32z\"]\n};\nconst faBatteryEmpty = {\n  prefix: 'fas',\n  iconName: 'battery-empty',\n  icon: [576, 512, [\"battery-0\"], \"f244\", \"M80 160c-8.8 0-16 7.2-16 16l0 160c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-160c0-8.8-7.2-16-16-16L80 160zM0 176c0-44.2 35.8-80 80-80l384 0c44.2 0 80 35.8 80 80l0 16c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l0 16c0 44.2-35.8 80-80 80L80 416c-44.2 0-80-35.8-80-80L0 176z\"]\n};\nconst faBattery0 = faBatteryEmpty;\nconst faSocks = {\n  prefix: 'fas',\n  iconName: 'socks',\n  icon: [512, 512, [129510], \"f696\", \"M175.2 476.6c-9.7-18-15.2-38.7-15.2-60.6c0-40.3 19-78.2 51.2-102.4l64-48c8.1-6 12.8-15.5 12.8-25.6l0-144L128 96l0 144c0 20.1-9.5 39.1-25.6 51.2l-64 48C14.2 357.3 0 385.8 0 416c0 53 43 96 96 96c20.8 0 41-6.7 57.6-19.2l21.6-16.2zM128 64l160 0 0-16c0-14.5 3.9-28.2 10.7-39.9C291 3 281.9 0 272 0L176 0c-26.5 0-48 21.5-48 48l0 16zM320 96l0 144c0 20.1-9.5 39.1-25.6 51.2l-64 48C206.2 357.3 192 385.8 192 416c0 53 43 96 96 96c20.8 0 41-6.7 57.6-19.2l115.2-86.4C493 382.2 512 344.3 512 304l0-208L320 96zM512 64l0-16c0-26.5-21.5-48-48-48L368 0c-26.5 0-48 21.5-48 48l0 16 192 0z\"]\n};\nconst faInbox = {\n  prefix: 'fas',\n  iconName: 'inbox',\n  icon: [512, 512, [], \"f01c\", \"M121 32C91.6 32 66 52 58.9 80.5L1.9 308.4C.6 313.5 0 318.7 0 323.9L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-92.1c0-5.2-.6-10.4-1.9-15.5l-57-227.9C446 52 420.4 32 391 32L121 32zm0 64l270 0 48 192-51.2 0c-12.1 0-23.2 6.8-28.6 17.7l-14.3 28.6c-5.4 10.8-16.5 17.7-28.6 17.7l-120.4 0c-12.1 0-23.2-6.8-28.6-17.7l-14.3-28.6c-5.4-10.8-16.5-17.7-28.6-17.7L73 288 121 96z\"]\n};\nconst faSection = {\n  prefix: 'fas',\n  iconName: 'section',\n  icon: [256, 512, [], \"e447\", \"M64.9 96C67.1 84.4 73.7 76.2 86 70.6c13.8-6.2 34.8-8.9 61.2-4.5c8.8 1.4 36.1 7.1 44.1 9.3c17 4.8 34.7-5.1 39.5-22.2s-5.1-34.7-22.2-39.5c-11.1-3.1-41-9.2-50.9-10.8C123-2.7 88.3-.6 59.7 12.3C29.9 25.8 7.5 50.9 1.6 86.5c-.1 .5-.2 1.1-.2 1.6c-2.2 19.7 .3 37.9 8.1 54.1c7.7 16.1 19.4 28 32 36.9c.6 .5 1.3 .9 2 1.4C22.3 194.2 6.5 215.1 1.7 243c-.1 .6-.2 1.1-.2 1.7c-2.3 19.3 .4 37.1 8.4 53c7.9 15.6 19.8 27 32.3 35.5c22.4 15.2 51.9 24 75.4 31c0 0 0 0 0 0l3.7 1.1c27.2 8.2 46.9 14.6 59.4 23.8c5.5 4 8.2 7.6 9.5 10.9c1.3 3.2 2.6 8.6 .9 18.1c-1.7 10.1-7.7 18-20.7 23.5c-14 6-35.4 8.5-62 4.4c-12.8-2.1-35.1-9.7-54.1-16.2c0 0 0 0 0 0c-4.3-1.5-8.5-2.9-12.3-4.2C25.3 420 7.2 429.1 1.6 445.8s3.5 34.9 20.3 40.5c2.6 .8 5.7 1.9 9.2 3.1c18.6 6.3 48.5 16.6 67.3 19.6c0 0 0 0 0 0l.2 0c34.5 5.4 68.8 3.4 97.2-8.7c29.4-12.6 52.5-36.5 58.5-71.5c3.3-19.3 1.9-37.4-5-53.9c-6.3-15-16.4-26.4-27.6-35.2c16.5-13.9 28.5-33.2 32.6-58.2c3.2-19.8 1.9-38.3-4.8-55.1c-6.7-16.8-17.8-29.4-30.2-39c-22.8-17.6-53.6-27.4-77.7-35l-1.4-.5c-27.4-8.7-47.8-15.3-61.5-25c-6.1-4.4-9.5-8.5-11.4-12.4c-1.8-3.7-3.2-9.3-2.3-18.5zm76.7 208.5l-.6-.2-1.4-.4c-27.4-8.2-47.9-14.5-61.7-23.8c-6.2-4.2-9.3-7.9-11-11.3c-1.5-3-2.9-7.7-2.1-15.7c1.9-9.7 7.9-17.3 20.5-22.7c14-6 35.4-8.5 62.1-4.3l16.4 2.6c6.3 2.9 11.7 6 16.2 9.5c5.5 4.2 8.4 8.2 10 12.2c1.6 4 2.8 10.4 1.1 20.9c-2.4 14.7-12.8 26.4-37.1 31l-12.4 2.3z\"]\n};\nconst faGaugeHigh = {\n  prefix: 'fas',\n  iconName: 'gauge-high',\n  icon: [512, 512, [62461, \"tachometer-alt\", \"tachometer-alt-fast\"], \"f625\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM256 416c35.3 0 64-28.7 64-64c0-17.4-6.9-33.1-18.1-44.6L366 161.7c5.3-12.1-.2-26.3-12.3-31.6s-26.3 .2-31.6 12.3L257.9 288c-.6 0-1.3 0-1.9 0c-35.3 0-64 28.7-64 64s28.7 64 64 64zM176 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM96 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm352-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faTachometerAlt = faGaugeHigh;\nconst faTachometerAltFast = faGaugeHigh;\nconst faEnvelopeOpenText = {\n  prefix: 'fas',\n  iconName: 'envelope-open-text',\n  icon: [512, 512, [], \"f658\", \"M215.4 96L144 96l-36.2 0L96 96l0 8.8L96 144l0 40.4 0 89L.2 202.5c1.6-18.1 10.9-34.9 25.7-45.8L48 140.3 48 96c0-26.5 21.5-48 48-48l76.6 0 49.9-36.9C232.2 3.9 243.9 0 256 0s23.8 3.9 33.5 11L339.4 48 416 48c26.5 0 48 21.5 48 48l0 44.3 22.1 16.4c14.8 10.9 24.1 27.7 25.7 45.8L416 273.4l0-89 0-40.4 0-39.2 0-8.8-11.8 0L368 96l-71.4 0-81.3 0zM0 448L0 242.1 217.6 403.3c11.1 8.2 24.6 12.7 38.4 12.7s27.3-4.4 38.4-12.7L512 242.1 512 448s0 0 0 0c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64c0 0 0 0 0 0zM176 160l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faHospital = {\n  prefix: 'fas',\n  iconName: 'hospital',\n  icon: [640, 512, [127973, 62589, \"hospital-alt\", \"hospital-wide\"], \"f0f8\", \"M192 48c0-26.5 21.5-48 48-48L400 0c26.5 0 48 21.5 48 48l0 464-80 0 0-80c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 80-80 0 0-464zM48 96l112 0 0 416L48 512c-26.5 0-48-21.5-48-48L0 320l80 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L0 288l0-64 80 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L0 192l0-48c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48l0 48-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 64-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 144c0 26.5-21.5 48-48 48l-112 0 0-416 112 0zM312 64c-8.8 0-16 7.2-16 16l0 24-24 0c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l24 0 0 24c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-24 24 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-24 0 0-24c0-8.8-7.2-16-16-16l-16 0z\"]\n};\nconst faHospitalAlt = faHospital;\nconst faHospitalWide = faHospital;\nconst faWineBottle = {\n  prefix: 'fas',\n  iconName: 'wine-bottle',\n  icon: [512, 512, [], \"f72f\", \"M393.4 9.4c12.5-12.5 32.8-12.5 45.3 0l64 64c12.5 12.5 12.5 32.8 0 45.3c-11.8 11.8-30.7 12.5-43.2 1.9l-9.5 9.5-48.8 48.8c-9.2 9.2-11.5 22.9-8.6 35.6c9.4 40.9-1.9 85.6-33.8 117.5L197.3 493.3c-25 25-65.5 25-90.5 0l-88-88c-25-25-25-65.5 0-90.5L180.2 153.3c31.9-31.9 76.6-43.1 117.5-33.8c12.6 2.9 26.4 .5 35.5-8.6l48.8-48.8 9.5-9.5c-10.6-12.6-10-31.4 1.9-43.2zM99.3 347.3l65.4 65.4c6.2 6.2 16.4 6.2 22.6 0l97.4-97.4c6.2-6.2 6.2-16.4 0-22.6l-65.4-65.4c-6.2-6.2-16.4-6.2-22.6 0L99.3 324.7c-6.2 6.2-6.2 16.4 0 22.6z\"]\n};\nconst faChessRook = {\n  prefix: 'fas',\n  iconName: 'chess-rook',\n  icon: [448, 512, [9820], \"f447\", \"M32 192L32 48c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16l0 40c0 4.4 3.6 8 8 8l32 0c4.4 0 8-3.6 8-8l0-40c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16l0 40c0 4.4 3.6 8 8 8l32 0c4.4 0 8-3.6 8-8l0-40c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16l0 144c0 10.1-4.7 19.6-12.8 25.6L352 256l16 144L80 400 96 256 44.8 217.6C36.7 211.6 32 202.1 32 192zm176 96l32 0c8.8 0 16-7.2 16-16l0-48c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 48c0 8.8 7.2 16 16 16zM22.6 473.4L64 432l320 0 41.4 41.4c4.2 4.2 6.6 10 6.6 16c0 12.5-10.1 22.6-22.6 22.6L38.6 512C26.1 512 16 501.9 16 489.4c0-6 2.4-11.8 6.6-16z\"]\n};\nconst faBarsStaggered = {\n  prefix: 'fas',\n  iconName: 'bars-staggered',\n  icon: [512, 512, [\"reorder\", \"stream\"], \"f550\", \"M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM64 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L96 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z\"]\n};\nconst faReorder = faBarsStaggered;\nconst faStream = faBarsStaggered;\nconst faDharmachakra = {\n  prefix: 'fas',\n  iconName: 'dharmachakra',\n  icon: [512, 512, [9784], \"f655\", \"M337.8 205.7l48.6-42.5c13.8 19.3 23.4 41.9 27.4 66.2l-64.4 4.3c-2.4-10.1-6.4-19.5-11.6-28zm140.1 19.5c-5.3-38.8-20.6-74.5-43.2-104.3l.8-.7C449 108.4 449.7 87.6 437 75s-33.4-12-45.2 1.5l-.7 .8c-29.8-22.6-65.5-37.9-104.3-43.2l.1-1.1c1.2-17.9-13-33-30.9-33s-32.1 15.2-30.9 33l.1 1.1c-38.8 5.3-74.5 20.6-104.3 43.2l-.7-.8C108.4 63 87.6 62.3 75 75s-12 33.4 1.5 45.2l.8 .7c-22.6 29.8-37.9 65.5-43.2 104.3l-1.1-.1c-17.9-1.2-33 13-33 30.9s15.2 32.1 33 30.9l1.1-.1c5.3 38.8 20.6 74.5 43.2 104.3l-.8 .7C63 403.6 62.3 424.4 75 437s33.4 12 45.2-1.5l.7-.8c29.8 22.6 65.5 37.9 104.3 43.2l-.1 1.1c-1.2 17.9 13 33 30.9 33s32.1-15.2 30.9-33l-.1-1.1c38.8-5.3 74.5-20.6 104.3-43.2l.7 .8c11.8 13.5 32.5 14.2 45.2 1.5s12-33.4-1.5-45.2l-.8-.7c22.6-29.8 37.9-65.5 43.2-104.3l1.1 .1c17.9 1.2 33-13 33-30.9s-15.2-32.1-33-30.9l-1.1 .1zM163.2 125.6c19.3-13.8 41.9-23.4 66.2-27.5l4.3 64.4c-10 2.4-19.5 6.4-28 11.6l-42.5-48.6zm-65 103.8c4.1-24.4 13.7-46.9 27.5-66.2l48.6 42.5c-5.3 8.5-9.2 18-11.6 28l-64.4-4.3zm27.5 119.4c-13.8-19.3-23.4-41.9-27.5-66.2l64.4-4.3c2.4 10 6.4 19.5 11.6 28l-48.6 42.5zm103.8 65c-24.4-4.1-46.9-13.7-66.2-27.4l42.5-48.6c8.5 5.3 18 9.2 28 11.6l-4.3 64.4zm119.4-27.4c-19.3 13.8-41.9 23.4-66.2 27.4l-4.3-64.4c10-2.4 19.5-6.4 28-11.6l42.5 48.6zm65-103.8c-4.1 24.4-13.7 46.9-27.4 66.2l-48.6-42.5c5.3-8.5 9.2-18 11.6-28l64.4 4.3zm-65-156.9l-42.5 48.6c-8.5-5.3-18-9.2-28-11.6l4.3-64.4c24.4 4.1 46.9 13.7 66.2 27.5zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faHotdog = {\n  prefix: 'fas',\n  iconName: 'hotdog',\n  icon: [512, 512, [127789], \"f80f\", \"M488.6 23.4c31.2 31.2 31.2 81.9 0 113.1l-352 352c-31.2 31.2-81.9 31.2-113.1 0s-31.2-81.9 0-113.1l352-352c31.2-31.2 81.9-31.2 113.1 0zM443.3 92.7c-6.2-6.2-16.4-6.2-22.6 0c-12.5 12.5-23.8 15.1-37.5 17.6l-2.5 .4c-13.8 2.5-31.6 5.6-48 22c-16.7 16.7-20.9 36-24.1 50.9c0 0 0 0 0 0s0 0 0 0l-.2 1c-3.4 15.6-6 26.4-15.7 36.1s-20.5 12.3-36.1 15.7l-1 .2c-14.9 3.2-34.2 7.4-50.9 24.1s-20.9 36-24.1 50.9l-.2 1c-3.4 15.6-6 26.4-15.7 36.1c-9.2 9.2-18 10.8-32.7 13.4c0 0 0 0 0 0l-.9 .2c-15.6 2.8-34.9 6.9-54.4 26.4c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0c12.5-12.5 23.8-15.1 37.5-17.6l2.5-.4c13.8-2.5 31.6-5.6 48-22c16.7-16.7 20.9-36 24.1-50.9l.2-1c3.4-15.6 6-26.4 15.7-36.1s20.5-12.3 36.1-15.7l1-.2c14.9-3.2 34.2-7.4 50.9-24.1s20.9-36 24.1-50.9l.2-1c3.4-15.6 6-26.4 15.7-36.1c9.2-9.2 18-10.8 32.7-13.4l.9-.2c15.6-2.8 34.9-6.9 54.4-26.4c6.2-6.2 6.2-16.4 0-22.6zM191.2 479.2l288-288L495 207c10.9 10.9 17 25.6 17 41s-6.1 30.1-17 41L289 495c-10.9 10.9-25.6 17-41 17s-30.1-6.1-41-17l-15.8-15.8zM17 305C6.1 294.1 0 279.4 0 264s6.1-30.1 17-41L223 17C233.9 6.1 248.6 0 264 0s30.1 6.1 41 17l15.8 15.8-288 288L17 305z\"]\n};\nconst faPersonWalkingWithCane = {\n  prefix: 'fas',\n  iconName: 'person-walking-with-cane',\n  icon: [512, 512, [\"blind\"], \"f29d\", \"M176 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-8.4 32c-36.4 0-69.6 20.5-85.9 53.1L35.4 273.7c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3L128 231.6l0 43.2c0 17 6.7 33.3 18.7 45.3L224 397.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-89.4c0-12.7-5.1-24.9-14.1-33.9L224 306.7l0-93.4 70.4 93.9c10.6 14.1 30.7 17 44.8 6.4s17-30.7 6.4-44.8L268.8 166.4C250.7 142.2 222.2 128 192 128l-24.4 0zM128.3 346.8L97 472.2c-4.3 17.1 6.1 34.5 23.3 38.8s34.5-6.1 38.8-23.3l22-88.2-52.8-52.8zM450.8 505.1c5 7.3 15 9.1 22.3 4s9.1-15 4-22.3L358.9 316.1c-2.8 3.8-6.1 7.3-10.1 10.3c-5 3.8-10.5 6.4-16.2 7.9L450.8 505.1z\"]\n};\nconst faBlind = faPersonWalkingWithCane;\nconst faDrum = {\n  prefix: 'fas',\n  iconName: 'drum',\n  icon: [512, 512, [129345], \"f569\", \"M501.2 76.1c11.1-7.3 14.2-22.1 6.9-33.2s-22.1-14.2-33.2-6.9L370.2 104.5C335.8 98.7 297 96 256 96C114.6 96 0 128 0 208L0 368c0 31.3 27.4 58.8 72 78.7L72 344c0-13.3 10.7-24 24-24s24 10.7 24 24l0 119.4c33 8.9 71.1 14.5 112 16.1L232 376c0-13.3 10.7-24 24-24s24 10.7 24 24l0 103.5c40.9-1.6 79-7.2 112-16.1L392 344c0-13.3 10.7-24 24-24s24 10.7 24 24l0 102.7c44.6-19.9 72-47.4 72-78.7l0-160c0-41.1-30.2-69.5-78.8-87.4l67.9-44.5zM307.4 145.6l-64.6 42.3c-11.1 7.3-14.2 22.1-6.9 33.2s22.1 14.2 33.2 6.9l111.1-72.8c14.7 3.2 27.9 7 39.4 11.5C458.4 181.8 464 197.4 464 208c0 .8-2.7 17.2-46 35.9C379.1 260.7 322 272 256 272s-123.1-11.3-162-28.1C50.7 225.2 48 208.8 48 208c0-10.6 5.6-26.2 44.4-41.3C130.6 151.9 187.8 144 256 144c18 0 35.1 .5 51.4 1.6z\"]\n};\nconst faIceCream = {\n  prefix: 'fas',\n  iconName: 'ice-cream',\n  icon: [448, 512, [127848], \"f810\", \"M367.1 160c.6-5.3 .9-10.6 .9-16C368 64.5 303.5 0 224 0S80 64.5 80 144c0 5.4 .3 10.7 .9 16l-.9 0c-26.5 0-48 21.5-48 48s21.5 48 48 48l53.5 0 181 0 53.5 0c26.5 0 48-21.5 48-48s-21.5-48-48-48l-.9 0zM96 288L200.8 497.7c4.4 8.8 13.3 14.3 23.2 14.3s18.8-5.5 23.2-14.3L352 288 96 288z\"]\n};\nconst faHeartCircleBolt = {\n  prefix: 'fas',\n  iconName: 'heart-circle-bolt',\n  icon: [576, 512, [], \"e4fc\", \"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9l2.6-2.4C267.2 438.6 256 404.6 256 368c0-97.2 78.8-176 176-176c28.3 0 55 6.7 78.7 18.5c.9-6.5 1.3-13 1.3-19.6l0-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1l0 5.8c0 41.5 17.2 81.2 47.6 109.5zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z\"]\n};\nconst faFax = {\n  prefix: 'fas',\n  iconName: 'fax',\n  icon: [512, 512, [128224, 128439], \"f1ac\", \"M128 64l0 96 64 0 0-96 194.7 0L416 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L432 18.7C420 6.7 403.7 0 386.7 0L192 0c-35.3 0-64 28.7-64 64zM0 160L0 480c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-320c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32zm480 32l-352 0 0 288c0 17.7 14.3 32 32 32l320 0c17.7 0 32-14.3 32-32l0-256c0-17.7-14.3-32-32-32zM256 256a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32 96a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM224 416a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faParagraph = {\n  prefix: 'fas',\n  iconName: 'paragraph',\n  icon: [448, 512, [182], \"f1dd\", \"M192 32l64 0 160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-352-32 0 0 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-32 0c-88.4 0-160-71.6-160-160s71.6-160 160-160z\"]\n};\nconst faCheckToSlot = {\n  prefix: 'fas',\n  iconName: 'check-to-slot',\n  icon: [576, 512, [\"vote-yea\"], \"f772\", \"M96 80c0-26.5 21.5-48 48-48l288 0c26.5 0 48 21.5 48 48l0 304L96 384 96 80zm313 47c-9.4-9.4-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L409 161c9.4-9.4 9.4-24.6 0-33.9zM0 336c0-26.5 21.5-48 48-48l16 0 0 128 448 0 0-128 16 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48L48 480c-26.5 0-48-21.5-48-48l0-96z\"]\n};\nconst faVoteYea = faCheckToSlot;\nconst faStarHalf = {\n  prefix: 'fas',\n  iconName: 'star-half',\n  icon: [576, 512, [61731], \"f089\", \"M288 0c-12.2 .1-23.3 7-28.6 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3L288 439.8 288 0zM429.9 512c1.1 .1 2.1 .1 3.2 0l-3.2 0z\"]\n};\nconst faBoxesStacked = {\n  prefix: 'fas',\n  iconName: 'boxes-stacked',\n  icon: [576, 512, [62625, \"boxes\", \"boxes-alt\"], \"f468\", \"M248 0L208 0c-26.5 0-48 21.5-48 48l0 112c0 35.3 28.7 64 64 64l128 0c35.3 0 64-28.7 64-64l0-112c0-26.5-21.5-48-48-48L328 0l0 80c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-80zM64 256c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l160 0c35.3 0 64-28.7 64-64l0-128c0-35.3-28.7-64-64-64l-40 0 0 80c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-80-40 0zM352 512l160 0c35.3 0 64-28.7 64-64l0-128c0-35.3-28.7-64-64-64l-40 0 0 80c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-80-40 0c-15 0-28.8 5.1-39.7 13.8c4.9 10.4 7.7 22 7.7 34.2l0 160c0 12.2-2.8 23.8-7.7 34.2C323.2 506.9 337 512 352 512z\"]\n};\nconst faBoxes = faBoxesStacked;\nconst faBoxesAlt = faBoxesStacked;\nconst faLink = {\n  prefix: 'fas',\n  iconName: 'link',\n  icon: [640, 512, [128279, \"chain\"], \"f0c1\", \"M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z\"]\n};\nconst faChain = faLink;\nconst faEarListen = {\n  prefix: 'fas',\n  iconName: 'ear-listen',\n  icon: [512, 512, [\"assistive-listening-systems\"], \"f2a2\", \"M398.3 3.4c-15.8-7.9-35-1.5-42.9 14.3c-7.9 15.8-1.5 34.9 14.2 42.9l.4 .2c.4 .2 1.1 .6 2.1 1.2c2 1.2 5 3 8.7 5.6c7.5 5.2 17.6 13.2 27.7 24.2C428.5 113.4 448 146 448 192c0 17.7 14.3 32 32 32s32-14.3 32-32c0-66-28.5-113.4-56.5-143.7C441.6 33.2 427.7 22.2 417.3 15c-5.3-3.7-9.7-6.4-13-8.3c-1.6-1-3-1.7-4-2.2c-.5-.3-.9-.5-1.2-.7l-.4-.2-.2-.1c0 0 0 0-.1 0c0 0 0 0 0 0L384 32 398.3 3.4zM128.7 227.5c6.2-56 53.7-99.5 111.3-99.5c61.9 0 112 50.1 112 112c0 29.3-11.2 55.9-29.6 75.9c-17 18.4-34.4 45.1-34.4 78l0 6.1c0 26.5-21.5 48-48 48c-17.7 0-32 14.3-32 32s14.3 32 32 32c61.9 0 112-50.1 112-112l0-6.1c0-9.8 5.4-21.7 17.4-34.7C398.3 327.9 416 286 416 240c0-97.2-78.8-176-176-176C149.4 64 74.8 132.5 65.1 220.5c-1.9 17.6 10.7 33.4 28.3 35.3s33.4-10.7 35.3-28.3zM32 512a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM192 352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0zM208 240c0-17.7 14.3-32 32-32s32 14.3 32 32c0 13.3 10.7 24 24 24s24-10.7 24-24c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 13.3 10.7 24 24 24s24-10.7 24-24z\"]\n};\nconst faAssistiveListeningSystems = faEarListen;\nconst faTreeCity = {\n  prefix: 'fas',\n  iconName: 'tree-city',\n  icon: [640, 512, [], \"e587\", \"M288 48c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 144 40 0 0-72c0-13.3 10.7-24 24-24s24 10.7 24 24l0 72 24 0c26.5 0 48 21.5 48 48l0 224c0 26.5-21.5 48-48 48l-160 0-96 0c-26.5 0-48-21.5-48-48l0-416zm64 32l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm16 80c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM352 272l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm176-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM512 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zM224 160c0 6-1 11-2 16c20 14 34 38 34 64c0 45-36 80-80 80l-16 0 0 160c0 18-15 32-32 32c-18 0-32-14-32-32l0-160-16 0c-45 0-80-35-80-80c0-26 13-50 33-64c-1-5-1-10-1-16c0-53 42-96 96-96c53 0 96 43 96 96z\"]\n};\nconst faPlay = {\n  prefix: 'fas',\n  iconName: 'play',\n  icon: [384, 512, [9654], \"f04b\", \"M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z\"]\n};\nconst faFont = {\n  prefix: 'fas',\n  iconName: 'font',\n  icon: [448, 512, [], \"f031\", \"M254 52.8C249.3 40.3 237.3 32 224 32s-25.3 8.3-30 20.8L57.8 416 32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-1.8 0 18-48 159.6 0 18 48-1.8 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-25.8 0L254 52.8zM279.8 304l-111.6 0L224 155.1 279.8 304z\"]\n};\nconst faTableCellsRowLock = {\n  prefix: 'fas',\n  iconName: 'table-cells-row-lock',\n  icon: [640, 512, [], \"e67a\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 65.1c-37.8 5.4-69.4 29.6-85.2 62.9L360 224l0 64 56 0 0 8.6c-19.1 11.1-32 31.7-32 55.4l-24 0 0 64 24 0 0 64L64 480c-35.3 0-64-28.7-64-64L0 96zM64 224l0 64 88 0 0-64-88 0zm232 0l-88 0 0 64 88 0 0-64zM152 352l-88 0 0 64 88 0 0-64zm56 0l0 64 88 0 0-64-88 0zM528 240c-17.7 0-32 14.3-32 32l0 48 64 0 0-48c0-17.7-14.3-32-32-32zm-80 32c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l0-48z\"]\n};\nconst faRupiahSign = {\n  prefix: 'fas',\n  iconName: 'rupiah-sign',\n  icon: [512, 512, [], \"e23d\", \"M0 64C0 46.3 14.3 32 32 32l80 0c79.5 0 144 64.5 144 144c0 58.8-35.2 109.3-85.7 131.7l51.4 128.4c6.6 16.4-1.4 35-17.8 41.6s-35-1.4-41.6-17.8L106.3 320 64 320l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 288 0 64zM64 256l48 0c44.2 0 80-35.8 80-80s-35.8-80-80-80L64 96l0 160zm256-96l80 0c61.9 0 112 50.1 112 112s-50.1 112-112 112l-48 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128 0-160c0-17.7 14.3-32 32-32zm80 160c26.5 0 48-21.5 48-48s-21.5-48-48-48l-48 0 0 96 48 0z\"]\n};\nconst faMagnifyingGlass = {\n  prefix: 'fas',\n  iconName: 'magnifying-glass',\n  icon: [512, 512, [128269, \"search\"], \"f002\", \"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z\"]\n};\nconst faSearch = faMagnifyingGlass;\nconst faTableTennisPaddleBall = {\n  prefix: 'fas',\n  iconName: 'table-tennis-paddle-ball',\n  icon: [512, 512, [127955, \"ping-pong-paddle-ball\", \"table-tennis\"], \"f45d\", \"M416 288c-50.1 0-93.6 28.8-114.6 70.8L68.9 126.3l.6-.6 60.1-60.1c87.5-87.5 229.3-87.5 316.8 0c67.1 67.1 82.7 166.3 46.8 248.3C471.8 297.6 445 288 416 288zM49.3 151.9L290.1 392.7c-1.4 7.5-2.1 15.3-2.1 23.3c0 23.2 6.2 44.9 16.9 63.7c-3 .2-6.1 .3-9.2 .3l-2.7 0c-33.9 0-66.5-13.5-90.5-37.5l-9.8-9.8c-13.1-13.1-34.6-12.4-46.8 1.7L88.2 501c-5.8 6.7-14.2 10.7-23 11s-17.5-3.1-23.8-9.4l-32-32C3.1 464.3-.3 455.7 0 446.9s4.3-17.2 11-23l66.6-57.7c14-12.2 14.8-33.7 1.7-46.8l-9.8-9.8C45.5 285.5 32 252.9 32 219l0-2.7c0-22.8 6.1-44.9 17.3-64.3zM416 320a96 96 0 1 1 0 192 96 96 0 1 1 0-192z\"]\n};\nconst faPingPongPaddleBall = faTableTennisPaddleBall;\nconst faTableTennis = faTableTennisPaddleBall;\nconst faPersonDotsFromLine = {\n  prefix: 'fas',\n  iconName: 'person-dots-from-line',\n  icon: [576, 512, [\"diagnoses\"], \"f470\", \"M288 176A88 88 0 1 0 288 0a88 88 0 1 0 0 176zM78.7 372.9c15-12.5 50-34.4 97.3-50.1L176 432l224 0 0-109.3c47.3 15.8 82.3 37.7 97.3 50.1c20.4 17 50.6 14.2 67.6-6.1s14.2-50.6-6.1-67.6c-12-10-30.1-22.5-53.2-35C497.2 278.4 481.7 288 464 288c-26.5 0-48-21.5-48-48c0-4.3 .6-8.4 1.6-12.4C379.1 215.9 335.3 208 288 208c-60.2 0-114.9 12.9-160 29.9c0 .7 0 1.4 0 2.1c0 26.5-21.5 48-48 48c-11.8 0-22.7-4.3-31-11.4c-13.1 8.1-23.7 15.9-31.7 22.5c-20.4 17-23.1 47.2-6.1 67.6s47.2 23.1 67.6 6.1zM24 464c-13.3 0-24 10.7-24 24s10.7 24 24 24l528 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 464zM224 280a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm104 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM96 240a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm368 16a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faDiagnoses = faPersonDotsFromLine;\nconst faTrashCanArrowUp = {\n  prefix: 'fas',\n  iconName: 'trash-can-arrow-up',\n  icon: [448, 512, [\"trash-restore-alt\"], \"f82a\", \"M163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3C140.6 6.8 151.7 0 163.8 0zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm192 64c-6.4 0-12.5 2.5-17 7l-80 80c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39L200 408c0 13.3 10.7 24 24 24s24-10.7 24-24l0-134.1 39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-4.5-4.5-10.6-7-17-7z\"]\n};\nconst faTrashRestoreAlt = faTrashCanArrowUp;\nconst faNairaSign = {\n  prefix: 'fas',\n  iconName: 'naira-sign',\n  icon: [448, 512, [], \"e1f6\", \"M122.6 46.3c-7.8-11.7-22.4-17-35.9-12.9S64 49.9 64 64l0 192-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 100.2 0 97.2 145.8c7.8 11.7 22.4 17 35.9 12.9s22.7-16.5 22.7-30.6l0-128 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-192c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 192-57.5 0L122.6 46.3zM305.1 320l14.9 0 0 22.3L305.1 320zM185.5 256L128 256l0-86.3L185.5 256z\"]\n};\nconst faCartArrowDown = {\n  prefix: 'fas',\n  iconName: 'cart-arrow-down',\n  icon: [576, 512, [], \"f218\", \"M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l45.5 0c3.8 0 7.1 2.7 7.9 6.5l51.6 271c6.5 34 36.2 58.5 70.7 58.5L488 384c13.3 0 24-10.7 24-24s-10.7-24-24-24l-288.3 0c-11.5 0-21.4-8.2-23.6-19.5L170.7 288l288.5 0c32.6 0 61.1-21.8 69.5-53.3l41-152.3C576.6 57 557.4 32 531.1 32L360 32l0 102.1 23-23c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-64 64c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l23 23L312 32 120.1 32C111 12.8 91.6 0 69.5 0L24 0zM176 512a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm336-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"]\n};\nconst faWalkieTalkie = {\n  prefix: 'fas',\n  iconName: 'walkie-talkie',\n  icon: [384, 512, [], \"f8ef\", \"M112 24c0-13.3-10.7-24-24-24S64 10.7 64 24l0 72L48 96C21.5 96 0 117.5 0 144L0 300.1c0 12.7 5.1 24.9 14.1 33.9l3.9 3.9c9 9 14.1 21.2 14.1 33.9L32 464c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-92.1c0-12.7 5.1-24.9 14.1-33.9l3.9-3.9c9-9 14.1-21.2 14.1-33.9L384 144c0-26.5-21.5-48-48-48l-16 0c0-17.7-14.3-32-32-32s-32 14.3-32 32l-32 0c0-17.7-14.3-32-32-32s-32 14.3-32 32l-48 0 0-72zm0 136l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faFilePen = {\n  prefix: 'fas',\n  iconName: 'file-pen',\n  icon: [576, 512, [128221, \"file-edit\"], \"f31c\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 125.7-86.8 86.8c-10.3 10.3-17.5 23.1-21 37.2l-18.7 74.9c-2.3 9.2-1.8 18.8 1.3 27.5L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z\"]\n};\nconst faFileEdit = faFilePen;\nconst faReceipt = {\n  prefix: 'fas',\n  iconName: 'receipt',\n  icon: [384, 512, [129534], \"f543\", \"M14 2.2C22.5-1.7 32.5-.3 39.6 5.8L80 40.4 120.4 5.8c9-7.7 22.3-7.7 31.2 0L192 40.4 232.4 5.8c9-7.7 22.3-7.7 31.2 0L304 40.4 344.4 5.8c7.1-6.1 17.1-7.5 25.6-3.6s14 12.4 14 21.8l0 464c0 9.4-5.5 17.9-14 21.8s-18.5 2.5-25.6-3.6L304 471.6l-40.4 34.6c-9 7.7-22.3 7.7-31.2 0L192 471.6l-40.4 34.6c-9 7.7-22.3 7.7-31.2 0L80 471.6 39.6 506.2c-7.1 6.1-17.1 7.5-25.6 3.6S0 497.4 0 488L0 24C0 14.6 5.5 6.1 14 2.2zM96 144c-8.8 0-16 7.2-16 16s7.2 16 16 16l192 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L96 144zM80 352c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L96 336c-8.8 0-16 7.2-16 16zM96 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l192 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L96 240z\"]\n};\nconst faSquarePen = {\n  prefix: 'fas',\n  iconName: 'square-pen',\n  icon: [448, 512, [\"pen-square\", \"pencil-square\"], \"f14b\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM325.8 139.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-21.4 21.4-71-71 21.4-21.4c15.6-15.6 40.9-15.6 56.6 0zM119.9 289L225.1 183.8l71 71L190.9 359.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z\"]\n};\nconst faPenSquare = faSquarePen;\nconst faPencilSquare = faSquarePen;\nconst faSuitcaseRolling = {\n  prefix: 'fas',\n  iconName: 'suitcase-rolling',\n  icon: [384, 512, [], \"f5c1\", \"M144 56c0-4.4 3.6-8 8-8l80 0c4.4 0 8 3.6 8 8l0 72-96 0 0-72zm176 72l-32 0 0-72c0-30.9-25.1-56-56-56L152 0C121.1 0 96 25.1 96 56l0 72-32 0c-35.3 0-64 28.7-64 64L0 416c0 35.3 28.7 64 64 64c0 17.7 14.3 32 32 32s32-14.3 32-32l128 0c0 17.7 14.3 32 32 32s32-14.3 32-32c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64zM112 224l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 128l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faPersonCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'person-circle-exclamation',\n  icon: [576, 512, [], \"e53f\", \"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zM432 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 240a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm0-192c-8.8 0-16 7.2-16 16l0 80c0 8.8 7.2 16 16 16s16-7.2 16-16l0-80c0-8.8-7.2-16-16-16z\"]\n};\nconst faChevronDown = {\n  prefix: 'fas',\n  iconName: 'chevron-down',\n  icon: [512, 512, [], \"f078\", \"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z\"]\n};\nconst faBatteryFull = {\n  prefix: 'fas',\n  iconName: 'battery-full',\n  icon: [576, 512, [128267, \"battery\", \"battery-5\"], \"f240\", \"M464 160c8.8 0 16 7.2 16 16l0 160c0 8.8-7.2 16-16 16L80 352c-8.8 0-16-7.2-16-16l0-160c0-8.8 7.2-16 16-16l384 0zM80 96C35.8 96 0 131.8 0 176L0 336c0 44.2 35.8 80 80 80l384 0c44.2 0 80-35.8 80-80l0-16c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l0-16c0-44.2-35.8-80-80-80L80 96zm368 96L96 192l0 128 352 0 0-128z\"]\n};\nconst faBattery = faBatteryFull;\nconst faBattery5 = faBatteryFull;\nconst faSkullCrossbones = {\n  prefix: 'fas',\n  iconName: 'skull-crossbones',\n  icon: [448, 512, [128369, 9760], \"f714\", \"M368 128c0 44.4-25.4 83.5-64 106.4l0 21.6c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-21.6c-38.6-23-64-62.1-64-106.4C80 57.3 144.5 0 224 0s144 57.3 144 128zM168 176a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM3.4 273.7c7.9-15.8 27.1-22.2 42.9-14.3L224 348.2l177.7-88.8c15.8-7.9 35-1.5 42.9 14.3s1.5 35-14.3 42.9L295.6 384l134.8 67.4c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3L224 419.8 46.3 508.6c-15.8 7.9-35 1.5-42.9-14.3s-1.5-35 14.3-42.9L152.4 384 17.7 316.6C1.9 308.7-4.5 289.5 3.4 273.7z\"]\n};\nconst faCodeCompare = {\n  prefix: 'fas',\n  iconName: 'code-compare',\n  icon: [512, 512, [], \"e13a\", \"M320 488c0 9.5-5.6 18.1-14.2 21.9s-18.8 2.3-25.8-4.1l-80-72c-5.1-4.6-7.9-11-7.9-17.8s2.9-13.3 7.9-17.8l80-72c7-6.3 17.2-7.9 25.8-4.1s14.2 12.4 14.2 21.9l0 40 16 0c35.3 0 64-28.7 64-64l0-166.7C371.7 141 352 112.8 352 80c0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3L464 320c0 70.7-57.3 128-128 128l-16 0 0 40zM456 80a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM192 24c0-9.5 5.6-18.1 14.2-21.9s18.8-2.3 25.8 4.1l80 72c5.1 4.6 7.9 11 7.9 17.8s-2.9 13.3-7.9 17.8l-80 72c-7 6.3-17.2 7.9-25.8 4.1s-14.2-12.4-14.2-21.9l0-40-16 0c-35.3 0-64 28.7-64 64l0 166.7c28.3 12.3 48 40.5 48 73.3c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3L48 192c0-70.7 57.3-128 128-128l16 0 0-40zM56 432a24 24 0 1 0 48 0 24 24 0 1 0 -48 0z\"]\n};\nconst faListUl = {\n  prefix: 'fas',\n  iconName: 'list-ul',\n  icon: [512, 512, [\"list-dots\"], \"f0ca\", \"M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"]\n};\nconst faListDots = faListUl;\nconst faSchoolLock = {\n  prefix: 'fas',\n  iconName: 'school-lock',\n  icon: [640, 512, [], \"e56f\", \"M302.2 5.4c10.7-7.2 24.8-7.2 35.5 0L473.7 96 592 96c26.5 0 48 21.5 48 48l0 128c0-61.9-50.1-112-112-112s-112 50.1-112 112l0 24.6c-19.1 11.1-32 31.7-32 55.4l-63.7 0-.3 0c-35.3 0-64 28.7-64 64l0 96 64 0s0 0 0 0L48 512c-26.5 0-48-21.5-48-48L0 144c0-26.5 21.5-48 48-48l118.3 0L302.2 5.4zM80 208l0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm0 128l0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm240-72a88 88 0 1 0 0-176 88 88 0 1 0 0 176zm16-120l0 16 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16s16 7.2 16 16zm192 96c-17.7 0-32 14.3-32 32l0 48 64 0 0-48c0-17.7-14.3-32-32-32zm-80 32c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l0-48z\"]\n};\nconst faTowerCell = {\n  prefix: 'fas',\n  iconName: 'tower-cell',\n  icon: [576, 512, [], \"e585\", \"M62.6 2.3C46.2-4.3 27.6 3.6 20.9 20C7.4 53.4 0 89.9 0 128s7.4 74.6 20.9 108c6.6 16.4 25.3 24.3 41.7 17.7S86.9 228.4 80.3 212C69.8 186.1 64 157.8 64 128s5.8-58.1 16.3-84C86.9 27.6 79 9 62.6 2.3zm450.8 0C497 9 489.1 27.6 495.7 44C506.2 69.9 512 98.2 512 128s-5.8 58.1-16.3 84c-6.6 16.4 1.3 35 17.7 41.7s35-1.3 41.7-17.7c13.5-33.4 20.9-69.9 20.9-108s-7.4-74.6-20.9-108C548.4 3.6 529.8-4.3 513.4 2.3zM340.1 165.2c7.5-10.5 11.9-23.3 11.9-37.2c0-35.3-28.7-64-64-64s-64 28.7-64 64c0 13.9 4.4 26.7 11.9 37.2L98.9 466.8c-7.3 16.1-.2 35.1 15.9 42.4s35.1 .2 42.4-15.9L177.7 448l220.6 0 20.6 45.2c7.3 16.1 26.3 23.2 42.4 15.9s23.2-26.3 15.9-42.4L340.1 165.2zM369.2 384l-162.4 0 14.5-32 133.3 0 14.5 32zM288 205.3L325.6 288l-75.2 0L288 205.3zM163.3 73.6c5.3-12.1-.2-26.3-12.4-31.6s-26.3 .2-31.6 12.4C109.5 77 104 101.9 104 128s5.5 51 15.3 73.6c5.3 12.1 19.5 17.7 31.6 12.4s17.7-19.5 12.4-31.6C156 165.8 152 147.4 152 128s4-37.8 11.3-54.4zM456.7 54.4c-5.3-12.1-19.5-17.7-31.6-12.4s-17.7 19.5-12.4 31.6C420 90.2 424 108.6 424 128s-4 37.8-11.3 54.4c-5.3 12.1 .2 26.3 12.4 31.6s26.3-.2 31.6-12.4C466.5 179 472 154.1 472 128s-5.5-51-15.3-73.6z\"]\n};\nconst faDownLong = {\n  prefix: 'fas',\n  iconName: 'down-long',\n  icon: [320, 512, [\"long-arrow-alt-down\"], \"f309\", \"M2 334.5c-3.8 8.8-2 19 4.6 26l136 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l136-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L128 0C110.3 0 96 14.3 96 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z\"]\n};\nconst faLongArrowAltDown = faDownLong;\nconst faRankingStar = {\n  prefix: 'fas',\n  iconName: 'ranking-star',\n  icon: [640, 512, [], \"e561\", \"M353.8 54.1L330.2 6.3c-3.9-8.3-16.1-8.6-20.4 0L286.2 54.1l-52.3 7.5c-9.3 1.4-13.3 12.9-6.4 19.8l38 37-9 52.1c-1.4 9.3 8.2 16.5 16.8 12.2l46.9-24.8 46.6 24.4c8.6 4.3 18.3-2.9 16.8-12.2l-9-52.1 38-36.6c6.8-6.8 2.9-18.3-6.4-19.8l-52.3-7.5zM256 256c-17.7 0-32 14.3-32 32l0 192c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-192c0-17.7-14.3-32-32-32l-128 0zM32 320c-17.7 0-32 14.3-32 32L0 480c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32L32 320zm416 96l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-128 0c-17.7 0-32 14.3-32 32z\"]\n};\nconst faChessKing = {\n  prefix: 'fas',\n  iconName: 'chess-king',\n  icon: [448, 512, [9818], \"f43f\", \"M224 0c17.7 0 32 14.3 32 32l0 16 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 48 152 0c22.1 0 40 17.9 40 40c0 5.3-1 10.5-3.1 15.4L368 400 80 400 3.1 215.4C1 210.5 0 205.3 0 200c0-22.1 17.9-40 40-40l152 0 0-48-16 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-16c0-17.7 14.3-32 32-32zM38.6 473.4L80 432l288 0 41.4 41.4c4.2 4.2 6.6 10 6.6 16c0 12.5-10.1 22.6-22.6 22.6L54.6 512C42.1 512 32 501.9 32 489.4c0-6 2.4-11.8 6.6-16z\"]\n};\nconst faPersonHarassing = {\n  prefix: 'fas',\n  iconName: 'person-harassing',\n  icon: [576, 512, [], \"e549\", \"M192 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM59.4 304.5L88 256.9 88 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-244.7 47.4 57.1c11.3 13.6 31.5 15.5 45.1 4.2s15.5-31.5 4.2-45.1l-73.7-88.9c-18.2-22-45.3-34.7-73.9-34.7l-35.9 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9zM480 240a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM464 344l0 58.7-41.4-41.4c-7.3-7.3-17.6-10.6-27.8-9s-18.9 8.1-23.5 17.3l-48 96c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3L408.8 438l54.7 54.7c12.4 12.4 29.1 19.3 46.6 19.3c36.4 0 65.9-29.5 65.9-65.9L576 344c0-30.9-25.1-56-56-56s-56 25.1-56 56zM288 48c0 8.8 7.2 16 16 16l56 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-56 0c-8.8 0-16 7.2-16 16zm-.8 49.7c-7.9-4-17.5-.7-21.5 7.2s-.7 17.5 7.2 21.5l48 24c7.9 4 17.5 .7 21.5-7.2s.7-17.5-7.2-21.5l-48-24z\"]\n};\nconst faBrazilianRealSign = {\n  prefix: 'fas',\n  iconName: 'brazilian-real-sign',\n  icon: [512, 512, [], \"e46c\", \"M400 0c17.7 0 32 14.3 32 32l0 18.2c12.5 2.3 24.7 6.4 36.2 12.1l10.1 5.1c15.8 7.9 22.2 27.1 14.3 42.9s-27.1 22.2-42.9 14.3l-10.2-5.1c-9.9-5-20.9-7.5-32-7.5l-1.7 0c-29.8 0-53.9 24.1-53.9 53.9c0 22 13.4 41.8 33.9 50l52 20.8c44.7 17.9 74.1 61.2 74.1 109.4l0 3.4c0 51.2-33.6 94.6-80 109.2l0 21.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-19.4c-15-3.5-29.4-9.7-42.3-18.3l-23.4-15.6c-14.7-9.8-18.7-29.7-8.9-44.4s29.7-18.7 44.4-8.9L361.2 389c10.8 7.2 23.4 11 36.3 11c27.9 0 50.5-22.6 50.5-50.5l0-3.4c0-22-13.4-41.8-33.9-50l-52-20.8C317.3 257.4 288 214.1 288 165.9C288 114 321.5 70 368 54.2L368 32c0-17.7 14.3-32 32-32zM0 64C0 46.3 14.3 32 32 32l80 0c79.5 0 144 64.5 144 144c0 58.8-35.2 109.3-85.7 131.7l51.4 128.4c6.6 16.4-1.4 35-17.8 41.6s-35-1.4-41.6-17.8L106.3 320 64 320l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 288 0 64zM64 256l48 0c44.2 0 80-35.8 80-80s-35.8-80-80-80L64 96l0 160z\"]\n};\nconst faLandmarkDome = {\n  prefix: 'fas',\n  iconName: 'landmark-dome',\n  icon: [512, 512, [\"landmark-alt\"], \"f752\", \"M248 0l16 0c13.3 0 24 10.7 24 24l0 10.7C368.4 48.1 431.9 111.6 445.3 192l2.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L64 256c-17.7 0-32-14.3-32-32s14.3-32 32-32l2.7 0C80.1 111.6 143.6 48.1 224 34.7L224 24c0-13.3 10.7-24 24-24zM64 288l64 0 0 128 40 0 0-128 64 0 0 128 48 0 0-128 64 0 0 128 40 0 0-128 64 0 0 132.3c.6 .3 1.2 .7 1.8 1.1l48 32c11.7 7.8 17 22.4 12.9 35.9S494.1 512 480 512L32 512c-14.1 0-26.5-9.2-30.6-22.7s1.1-28.1 12.9-35.9l48-32c.6-.4 1.2-.7 1.8-1.1L64 288z\"]\n};\nconst faLandmarkAlt = faLandmarkDome;\nconst faArrowUp = {\n  prefix: 'fas',\n  iconName: 'arrow-up',\n  icon: [384, 512, [8593], \"f062\", \"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\"]\n};\nconst faTv = {\n  prefix: 'fas',\n  iconName: 'tv',\n  icon: [640, 512, [63717, \"television\", \"tv-alt\"], \"f26c\", \"M64 64l0 288 512 0 0-288L64 64zM0 64C0 28.7 28.7 0 64 0L576 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 416c-35.3 0-64-28.7-64-64L0 64zM128 448l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-384 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faTelevision = faTv;\nconst faTvAlt = faTv;\nconst faShrimp = {\n  prefix: 'fas',\n  iconName: 'shrimp',\n  icon: [512, 512, [129424], \"e448\", \"M64 32C28.7 32 0 60.7 0 96s28.7 64 64 64l1 0c3.7 88.9 77 160 167 160l56 0 0-192-24 0L88.8 128 64 128c-17.7 0-32-14.3-32-32s14.3-32 32-32l400 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L64 32zM224 456c0 13.3 10.7 24 24 24l72 0 0-72.2-64.1-22.4c-12.5-4.4-26.2 2.2-30.6 14.7s2.2 26.2 14.7 30.6l4.5 1.6C233 433.9 224 443.9 224 456zm128 23.3c36.4-3.3 69.5-17.6 96.1-39.6l-86.5-34.6c-3 1.8-6.2 3.2-9.6 4.3l0 69.9zM472.6 415c24.6-30.3 39.4-68.9 39.4-111c0-12.3-1.3-24.3-3.7-35.9L382.8 355.1c.8 3.4 1.2 7 1.2 10.6c0 4.6-.7 9-1.9 13.1L472.6 415zM336 128l-16 0 0 192 18.3 0c9.9 0 19.1 3.2 26.6 8.5l133.5-92.4C471.8 172.6 409.1 128 336 128zM168 192a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faListCheck = {\n  prefix: 'fas',\n  iconName: 'list-check',\n  icon: [512, 512, [\"tasks\"], \"f0ae\", \"M152.1 38.2c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 113C-2.3 103.6-2.3 88.4 7 79s24.6-9.4 33.9 0l22.1 22.1 55.1-61.2c8.9-9.9 24-10.7 33.9-1.8zm0 160c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 273c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l22.1 22.1 55.1-61.2c8.9-9.9 24-10.7 33.9-1.8zM224 96c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32zm0 160c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32zM160 416c0-17.7 14.3-32 32-32l288 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-288 0c-17.7 0-32-14.3-32-32zM48 368a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faTasks = faListCheck;\nconst faJugDetergent = {\n  prefix: 'fas',\n  iconName: 'jug-detergent',\n  icon: [384, 512, [], \"e519\", \"M96 24c0-13.3 10.7-24 24-24l80 0c13.3 0 24 10.7 24 24l0 24 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L88 96C74.7 96 64 85.3 64 72s10.7-24 24-24l8 0 0-24zM0 256c0-70.7 57.3-128 128-128l128 0c70.7 0 128 57.3 128 128l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256zm256 0l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32z\"]\n};\nconst faCircleUser = {\n  prefix: 'fas',\n  iconName: 'circle-user',\n  icon: [512, 512, [62142, \"user-circle\"], \"f2bd\", \"M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z\"]\n};\nconst faUserCircle = faCircleUser;\nconst faUserShield = {\n  prefix: 'fas',\n  iconName: 'user-shield',\n  icon: [640, 512, [], \"f505\", \"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c1.8 0 3.5-.2 5.3-.5c-76.3-55.1-99.8-141-103.1-200.2c-16.1-4.8-33.1-7.3-50.7-7.3l-91.4 0zm308.8-78.3l-120 48C358 277.4 352 286.2 352 296c0 63.3 25.9 168.8 134.8 214.2c5.9 2.5 12.6 2.5 18.5 0C614.1 464.8 640 359.3 640 296c0-9.8-6-18.6-15.1-22.3l-120-48c-5.7-2.3-12.1-2.3-17.8 0zM591.4 312c-3.9 50.7-27.2 116.7-95.4 149.7l0-187.8L591.4 312z\"]\n};\nconst faWind = {\n  prefix: 'fas',\n  iconName: 'wind',\n  icon: [512, 512, [], \"f72e\", \"M288 32c0 17.7 14.3 32 32 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l320 0c53 0 96-43 96-96s-43-96-96-96L320 0c-17.7 0-32 14.3-32 32zm64 352c0 17.7 14.3 32 32 32l32 0c53 0 96-43 96-96s-43-96-96-96L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32zM128 512l32 0c53 0 96-43 96-96s-43-96-96-96L32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32z\"]\n};\nconst faCarBurst = {\n  prefix: 'fas',\n  iconName: 'car-burst',\n  icon: [640, 512, [\"car-crash\"], \"f5e1\", \"M176 8c-6.6 0-12.4 4-14.9 10.1l-29.4 74L55.6 68.9c-6.3-1.9-13.1 .2-17.2 5.3s-4.6 12.2-1.4 17.9l39.5 69.1L10.9 206.4c-5.4 3.7-8 10.3-6.5 16.7s6.7 11.2 13.1 12.2l78.7 12.2L90.6 327c-.5 6.5 3.1 12.7 9 15.5s12.9 1.8 17.8-2.6l35.3-32.5 9.5-35.4 10.4-38.6c8-29.9 30.5-52.1 57.9-60.9l41-59.2c11.3-16.3 26.4-28.9 43.5-37.2c-.4-.6-.8-1.2-1.3-1.8c-4.1-5.1-10.9-7.2-17.2-5.3L220.3 92.1l-29.4-74C188.4 12 182.6 8 176 8zM367.7 161.5l135.6 36.3c6.5 1.8 11.3 7.4 11.8 14.2l4.6 56.5-201.5-54 32.2-46.6c3.8-5.6 10.8-8.1 17.3-6.4zm-69.9-30l-47.9 69.3c-21.6 3-40.3 18.6-46.3 41l-10.4 38.6-16.6 61.8-8.3 30.9c-4.6 17.1 5.6 34.6 22.6 39.2l15.5 4.1c17.1 4.6 34.6-5.6 39.2-22.6l8.3-30.9 247.3 66.3-8.3 30.9c-4.6 17.1 5.6 34.6 22.6 39.2l15.5 4.1c17.1 4.6 34.6-5.6 39.2-22.6l8.3-30.9L595 388l10.4-38.6c6-22.4-2.5-45.2-19.6-58.7l-6.8-84c-2.7-33.7-26.4-62-59-70.8L384.2 99.7c-32.7-8.8-67.3 4-86.5 31.8zm-17 131a24 24 0 1 1 -12.4 46.4 24 24 0 1 1 12.4-46.4zm217.9 83.2A24 24 0 1 1 545 358.1a24 24 0 1 1 -46.4-12.4z\"]\n};\nconst faCarCrash = faCarBurst;\nconst faY = {\n  prefix: 'fas',\n  iconName: 'y',\n  icon: [384, 512, [121], \"59\", \"M58 45.4C47.8 31 27.8 27.7 13.4 38S-4.3 68.2 6 82.6L160 298.3 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-149.7L378 82.6c10.3-14.4 6.9-34.4-7.4-44.6S336.2 31 326 45.4L192 232.9 58 45.4z\"]\n};\nconst faPersonSnowboarding = {\n  prefix: 'fas',\n  iconName: 'person-snowboarding',\n  icon: [512, 512, [127938, \"snowboarding\"], \"f7ce\", \"M209.7 3.4c15.8-7.9 35-1.5 42.9 14.3l25 50 42.4 8.5c19.5 3.9 37.8 12.3 53.5 24.5l126.1 98.1c14 10.9 16.5 31 5.6 44.9s-31 16.5-44.9 5.6l-72.1-56.1-71.5 31.8 33.1 27.6c23.2 19.3 33.5 50 26.7 79.4l-17.4 75.2c-2.2 9.4-8.2 16.8-16.1 21l86.5 33.1c4.6 1.8 9.4 2.6 14.3 2.6l28.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-28.2 0c-10.8 0-21.4-2-31.5-5.8L60.1 371.3c-11.5-4.4-22-11.2-30.8-20L7 329c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l22.4 22.4c4 4 8.7 7.1 14 9.1l22.4 8.6c-.8-1.6-1.5-3.2-2.1-4.9c-5.6-16.8 3.5-34.9 20.2-40.5L192 264.9l0-53.2c0-24.2 13.7-46.4 35.4-57.2l45.2-22.6-7.5-1.5c-19.4-3.9-35.9-16.5-44.7-34.1l-25-50c-7.9-15.8-1.5-35 14.3-42.9zM139 350.1l159 60.9c-2.1-5.6-2.6-11.9-1.1-18.2l17.4-75.2c1.4-5.9-.7-12-5.3-15.9l-52.8-44 0 18.8c0 20.7-13.2 39-32.8 45.5L139 350.1zM432 0a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faSnowboarding = faPersonSnowboarding;\nconst faTruckFast = {\n  prefix: 'fas',\n  iconName: 'truck-fast',\n  icon: [640, 512, [\"shipping-fast\"], \"f48b\", \"M112 0C85.5 0 64 21.5 64 48l0 48L16 96c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 208 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L64 160l-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l16 0 176 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L64 224l-48 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 144 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L64 288l0 128c0 53 43 96 96 96s96-43 96-96l128 0c0 53 43 96 96 96s96-43 96-96l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-64 0-32 0-18.7c0-17-6.7-33.3-18.7-45.3L512 114.7c-12-12-28.3-18.7-45.3-18.7L416 96l0-48c0-26.5-21.5-48-48-48L112 0zM544 237.3l0 18.7-128 0 0-96 50.7 0L544 237.3zM160 368a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm272 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0z\"]\n};\nconst faShippingFast = faTruckFast;\nconst faFish = {\n  prefix: 'fas',\n  iconName: 'fish',\n  icon: [576, 512, [128031], \"f578\", \"M180.5 141.5C219.7 108.5 272.6 80 336 80s116.3 28.5 155.5 61.5c39.1 33 66.9 72.4 81 99.8c4.7 9.2 4.7 20.1 0 29.3c-14.1 27.4-41.9 66.8-81 99.8C452.3 403.5 399.4 432 336 432s-116.3-28.5-155.5-61.5c-16.2-13.7-30.5-28.5-42.7-43.1L48.1 379.6c-12.5 7.3-28.4 5.3-38.7-4.9S-3 348.7 4.2 336.1L50 256 4.2 175.9c-7.2-12.6-5-28.4 5.3-38.6s26.1-12.2 38.7-4.9l89.7 52.3c12.2-14.6 26.5-29.4 42.7-43.1zM448 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faUserGraduate = {\n  prefix: 'fas',\n  iconName: 'user-graduate',\n  icon: [448, 512, [], \"f501\", \"M219.3 .5c3.1-.6 6.3-.6 9.4 0l200 40C439.9 42.7 448 52.6 448 64s-8.1 21.3-19.3 23.5L352 102.9l0 57.1c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-57.1L48 93.3l0 65.1 15.7 78.4c.9 4.7-.3 9.6-3.3 13.3s-7.6 5.9-12.4 5.9l-32 0c-4.8 0-9.3-2.1-12.4-5.9s-4.3-8.6-3.3-13.3L16 158.4l0-71.8C6.5 83.3 0 74.3 0 64C0 52.6 8.1 42.7 19.3 40.5l200-40zM111.9 327.7c10.5-3.4 21.8 .4 29.4 8.5l71 75.5c6.3 6.7 17 6.7 23.3 0l71-75.5c7.6-8.1 18.9-11.9 29.4-8.5C401 348.6 448 409.4 448 481.3c0 17-13.8 30.7-30.7 30.7L30.7 512C13.8 512 0 498.2 0 481.3c0-71.9 47-132.7 111.9-153.6z\"]\n};\nconst faCircleHalfStroke = {\n  prefix: 'fas',\n  iconName: 'circle-half-stroke',\n  icon: [512, 512, [9680, \"adjust\"], \"f042\", \"M448 256c0-106-86-192-192-192l0 384c106 0 192-86 192-192zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z\"]\n};\nconst faAdjust = faCircleHalfStroke;\nconst faClapperboard = {\n  prefix: 'fas',\n  iconName: 'clapperboard',\n  icon: [512, 512, [], \"e131\", \"M448 32l-86.1 0-1 1-127 127 92.1 0 1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128l0-64c0-15.1-5.3-29.1-14-40l-104 104L512 160zM294.1 32l-92.1 0-1 1L73.9 160l92.1 0 1-1 127-127zM64 32C28.7 32 0 60.7 0 96l0 64 6.1 0 1-1 127-127L64 32zM512 192L0 192 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224z\"]\n};\nconst faCircleRadiation = {\n  prefix: 'fas',\n  iconName: 'circle-radiation',\n  icon: [512, 512, [9762, \"radiation-alt\"], \"f7ba\", \"M256 64a192 192 0 1 1 0 384 192 192 0 1 1 0-384zm0 448A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM200 256c0-20.7 11.3-38.8 28-48.5l-36-62.3c-8.8-15.3-28.7-20.8-42-9c-25.6 22.6-43.9 53.3-50.9 88.1C95.7 241.5 110.3 256 128 256l72 0zm28 48.5l-36 62.4c-8.8 15.3-3.6 35.2 13.1 40.8c16 5.4 33.1 8.3 50.9 8.3s34.9-2.9 50.9-8.3c16.7-5.6 21.9-25.5 13.1-40.8l-36-62.4c-8.2 4.8-17.8 7.5-28 7.5s-19.8-2.7-28-7.5zM312 256l72 0c17.7 0 32.3-14.5 28.8-31.8c-7-34.8-25.3-65.5-50.9-88.1c-13.2-11.7-33.1-6.3-42 9l-36 62.3c16.7 9.7 28 27.8 28 48.5zm-56 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faRadiationAlt = faCircleRadiation;\nconst faBaseball = {\n  prefix: 'fas',\n  iconName: 'baseball',\n  icon: [512, 512, [129358, 9918, \"baseball-ball\"], \"f433\", \"M62.7 223.4c-4.8 .4-9.7 .6-14.7 .6c-15.6 0-30.8-2-45.2-5.9C19.2 107.1 107.1 19.2 218.1 2.8C222 17.2 224 32.4 224 48c0 4.9-.2 9.8-.6 14.7c-.7 8.8 5.8 16.5 14.6 17.3s16.5-5.8 17.3-14.6c.5-5.7 .7-11.5 .7-17.3c0-16.5-1.9-32.6-5.6-47.9c1.8 0 3.7-.1 5.6-.1C397.4 0 512 114.6 512 256c0 1.9 0 3.7-.1 5.6c-15.4-3.6-31.4-5.6-47.9-5.6c-5.8 0-11.6 .2-17.3 .7c-8.8 .7-15.4 8.5-14.6 17.3s8.5 15.4 17.3 14.6c4.8-.4 9.7-.6 14.7-.6c15.6 0 30.8 2 45.2 5.9C492.8 404.9 404.9 492.8 293.9 509.2C290 494.8 288 479.6 288 464c0-4.9 .2-9.8 .6-14.7c.7-8.8-5.8-16.5-14.6-17.3s-16.5 5.8-17.3 14.6c-.5 5.7-.7 11.5-.7 17.3c0 16.5 1.9 32.6 5.6 47.9c-1.8 0-3.7 .1-5.6 .1C114.6 512 0 397.4 0 256c0-1.9 0-3.7 .1-5.6C15.4 254.1 31.5 256 48 256c5.8 0 11.6-.2 17.3-.7c8.8-.7 15.4-8.5 14.6-17.3s-8.5-15.4-17.3-14.6zM121.3 208c-8 3.7-11.6 13.2-7.9 21.2s13.2 11.6 21.2 7.9c45.2-20.8 81.7-57.2 102.5-102.5c3.7-8 .2-17.5-7.9-21.2s-17.5-.2-21.2 7.9c-17.6 38.3-48.5 69.2-86.7 86.7zm277.2 74.7c-3.7-8-13.2-11.6-21.2-7.9c-45.2 20.8-81.7 57.2-102.5 102.5c-3.7 8-.2 17.5 7.9 21.2s17.5 .2 21.2-7.9c17.6-38.3 48.5-69.2 86.7-86.7c8-3.7 11.6-13.2 7.9-21.2z\"]\n};\nconst faBaseballBall = faBaseball;\nconst faJetFighterUp = {\n  prefix: 'fas',\n  iconName: 'jet-fighter-up',\n  icon: [512, 512, [], \"e518\", \"M270.7 9.7C268.2 3.8 262.4 0 256 0s-12.2 3.8-14.7 9.7L197.2 112.6c-3.4 8-5.2 16.5-5.2 25.2l0 77-144 84L48 280c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 56 0 32 0 24c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8 144 0 0 32.7L133.5 468c-3.5 3-5.5 7.4-5.5 12l0 16c0 8.8 7.2 16 16 16l96 0 0-64c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64 96 0c8.8 0 16-7.2 16-16l0-16c0-4.6-2-9-5.5-12L320 416.7l0-32.7 144 0 0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-24 0-32 0-56c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 18.8-144-84 0-77c0-8.7-1.8-17.2-5.2-25.2L270.7 9.7z\"]\n};\nconst faDiagramProject = {\n  prefix: 'fas',\n  iconName: 'diagram-project',\n  icon: [576, 512, [\"project-diagram\"], \"f542\", \"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-16-192 0 0 16c0 1.7-.1 3.4-.3 5L272 288l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-1.7 .1-3.4 .3-5L144 224l-96 0c-26.5 0-48-21.5-48-48L0 80z\"]\n};\nconst faProjectDiagram = faDiagramProject;\nconst faCopy = {\n  prefix: 'fas',\n  iconName: 'copy',\n  icon: [448, 512, [], \"f0c5\", \"M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z\"]\n};\nconst faVolumeXmark = {\n  prefix: 'fas',\n  iconName: 'volume-xmark',\n  icon: [576, 512, [\"volume-mute\", \"volume-times\"], \"f6a9\", \"M301.1 34.8C312.6 40 320 51.4 320 64l0 384c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352 64 352c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l67.8 0L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3zM425 167l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z\"]\n};\nconst faVolumeMute = faVolumeXmark;\nconst faVolumeTimes = faVolumeXmark;\nconst faHandSparkles = {\n  prefix: 'fas',\n  iconName: 'hand-sparkles',\n  icon: [640, 512, [], \"e05d\", \"M320 0c17.7 0 32 14.3 32 32l0 208c0 8.8 7.2 16 16 16s16-7.2 16-16l0-176c0-17.7 14.3-32 32-32s32 14.3 32 32l0 176c0 8.8 7.2 16 16 16s16-7.2 16-16l0-112c0-17.7 14.3-32 32-32s32 14.3 32 32l0 195.1c-11.9 4.8-21.3 14.9-25 27.8l-8.9 31.2L478.9 391C460.6 396.3 448 413 448 432c0 18.9 12.5 35.6 30.6 40.9C448.4 497.4 409.9 512 368 512l-19.2 0c-59.6 0-116.9-22.9-160-64L76.4 341c-16-15.2-16.6-40.6-1.4-56.6s40.6-16.6 56.6-1.4l60.5 57.6c0-1.5-.1-3.1-.1-4.6l0-272c0-17.7 14.3-32 32-32s32 14.3 32 32l0 176c0 8.8 7.2 16 16 16s16-7.2 16-16l0-208c0-17.7 14.3-32 32-32zm-7.3 326.6c-1.1-3.9-4.7-6.6-8.7-6.6s-7.6 2.7-8.7 6.6L288 352l-25.4 7.3c-3.9 1.1-6.6 4.7-6.6 8.7s2.7 7.6 6.6 8.7L288 384l7.3 25.4c1.1 3.9 4.7 6.6 8.7 6.6s7.6-2.7 8.7-6.6L320 384l25.4-7.3c3.9-1.1 6.6-4.7 6.6-8.7s-2.7-7.6-6.6-8.7L320 352l-7.3-25.4zM104 120l48.3 13.8c4.6 1.3 7.7 5.5 7.7 10.2s-3.1 8.9-7.7 10.2L104 168 90.2 216.3c-1.3 4.6-5.5 7.7-10.2 7.7s-8.9-3.1-10.2-7.7L56 168 7.7 154.2C3.1 152.9 0 148.7 0 144s3.1-8.9 7.7-10.2L56 120 69.8 71.7C71.1 67.1 75.3 64 80 64s8.9 3.1 10.2 7.7L104 120zM584 408l48.3 13.8c4.6 1.3 7.7 5.5 7.7 10.2s-3.1 8.9-7.7 10.2L584 456l-13.8 48.3c-1.3 4.6-5.5 7.7-10.2 7.7s-8.9-3.1-10.2-7.7L536 456l-48.3-13.8c-4.6-1.3-7.7-5.5-7.7-10.2s3.1-8.9 7.7-10.2L536 408l13.8-48.3c1.3-4.6 5.5-7.7 10.2-7.7s8.9 3.1 10.2 7.7L584 408z\"]\n};\nconst faGrip = {\n  prefix: 'fas',\n  iconName: 'grip',\n  icon: [448, 512, [\"grip-horizontal\"], \"f58d\", \"M128 136c0-22.1-17.9-40-40-40L40 96C17.9 96 0 113.9 0 136l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm0 192c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm32-192l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM288 328c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm32-192l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM448 328c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48z\"]\n};\nconst faGripHorizontal = faGrip;\nconst faShareFromSquare = {\n  prefix: 'fas',\n  iconName: 'share-from-square',\n  icon: [576, 512, [61509, \"share-square\"], \"f14d\", \"M352 224l-46.5 0c-45 0-81.5 36.5-81.5 81.5c0 22.3 10.3 34.3 19.2 40.5c6.8 4.7 12.8 12 12.8 20.3c0 9.8-8 17.8-17.8 17.8l-2.5 0c-2.4 0-4.8-.4-7.1-1.4C210.8 374.8 128 333.4 128 240c0-79.5 64.5-144 144-144l80 0 0-61.3C352 15.5 367.5 0 386.7 0c8.6 0 16.8 3.2 23.2 8.9L548.1 133.3c7.6 6.8 11.9 16.5 11.9 26.7s-4.3 19.9-11.9 26.7l-139 125.1c-5.9 5.3-13.5 8.2-21.4 8.2l-3.7 0c-17.7 0-32-14.3-32-32l0-64zM80 96c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-48c0-17.7 14.3-32 32-32s32 14.3 32 32l0 48c0 44.2-35.8 80-80 80L80 512c-44.2 0-80-35.8-80-80L0 112C0 67.8 35.8 32 80 32l48 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L80 96z\"]\n};\nconst faShareSquare = faShareFromSquare;\nconst faChildCombatant = {\n  prefix: 'fas',\n  iconName: 'child-combatant',\n  icon: [576, 512, [\"child-rifle\"], \"e4e0\", \"M176 128A64 64 0 1 0 176 0a64 64 0 1 0 0 128zm-8 352l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-179.5L260.9 321c9.4 15 29.2 19.4 44.1 10s19.4-29.2 10-44.1l-51.7-82.1c-17.6-27.9-48.3-44.9-81.2-44.9l-12.3 0c-33 0-63.7 16.9-81.2 44.9L36.9 287c-9.4 15-4.9 34.7 10 44.1s34.7 4.9 44.1-10L104 300.5 104 480c0 17.7 14.3 32 32 32s32-14.3 32-32zM448 0L432 0 416 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l0 100.3c-9.6 5.5-16 15.9-16 27.7l0 32c-17.7 0-32 14.3-32 32l0 144c0 17.7 14.3 32 32 32l16 0 0 96c0 8.8 7.2 16 16 16l59.5 0c10.4 0 18-9.8 15.5-19.9L484 400l44 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-48 0 0-26.7 53.1-17.7c6.5-2.2 10.9-8.3 10.9-15.2l0-84.5c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16l0 56-16 5.3L480 160c0-11.8-6.4-22.2-16-27.7L464 16c0-8.8-7.2-16-16-16z\"]\n};\nconst faChildRifle = faChildCombatant;\nconst faGun = {\n  prefix: 'fas',\n  iconName: 'gun',\n  icon: [576, 512, [], \"e19b\", \"M528 56c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 8L32 64C14.3 64 0 78.3 0 96L0 208c0 17.7 14.3 32 32 32l10 0c20.8 0 36.1 19.6 31 39.8L33 440.2c-2.4 9.6-.2 19.7 5.8 27.5S54.1 480 64 480l96 0c14.7 0 27.5-10 31-24.2L217 352l104.5 0c23.7 0 44.8-14.9 52.7-37.2L400.9 240l31.1 0c8.5 0 16.6-3.4 22.6-9.4L477.3 208l66.7 0c17.7 0 32-14.3 32-32l0-80c0-17.7-14.3-32-32-32l-16 0 0-8zM321.4 304L229 304l16-64 105 0-21 58.7c-1.1 3.2-4.2 5.3-7.5 5.3zM80 128l384 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 160c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faSquarePhone = {\n  prefix: 'fas',\n  iconName: 'square-phone',\n  icon: [448, 512, [\"phone-square\"], \"f098\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm90.7 96.7c9.7-2.6 19.9 2.3 23.7 11.6l20 48c3.4 8.2 1 17.6-5.8 23.2L168 231.7c16.6 35.2 45.1 63.7 80.3 80.3l20.2-24.7c5.6-6.8 15-9.2 23.2-5.8l48 20c9.3 3.9 14.2 14 11.6 23.7l-12 44C336.9 378 329 384 320 384C196.3 384 96 283.7 96 160c0-9 6-16.9 14.7-19.3l44-12z\"]\n};\nconst faPhoneSquare = faSquarePhone;\nconst faPlus = {\n  prefix: 'fas',\n  iconName: 'plus',\n  icon: [448, 512, [10133, 61543, \"add\"], \"2b\", \"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z\"]\n};\nconst faAdd = faPlus;\nconst faExpand = {\n  prefix: 'fas',\n  iconName: 'expand',\n  icon: [448, 512, [], \"f065\", \"M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z\"]\n};\nconst faComputer = {\n  prefix: 'fas',\n  iconName: 'computer',\n  icon: [640, 512, [], \"e4e5\", \"M384 96l0 224L64 320 64 96l320 0zM64 32C28.7 32 0 60.7 0 96L0 320c0 35.3 28.7 64 64 64l117.3 0-10.7 32L96 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-74.7 0-10.7-32L384 384c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L64 32zm464 0c-26.5 0-48 21.5-48 48l0 352c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48l-64 0zm16 64l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm-16 80c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm32 160a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faXmark = {\n  prefix: 'fas',\n  iconName: 'xmark',\n  icon: [384, 512, [128473, 10005, 10006, 10060, 215, \"close\", \"multiply\", \"remove\", \"times\"], \"f00d\", \"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"]\n};\nconst faClose = faXmark;\nconst faMultiply = faXmark;\nconst faRemove = faXmark;\nconst faTimes = faXmark;\nconst faArrowsUpDownLeftRight = {\n  prefix: 'fas',\n  iconName: 'arrows-up-down-left-right',\n  icon: [512, 512, [\"arrows\"], \"f047\", \"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4L224 224l-114.7 0 9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4L224 288l0 114.7-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4L288 288l114.7 0-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4L288 224l0-114.7 9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z\"]\n};\nconst faArrows = faArrowsUpDownLeftRight;\nconst faChalkboardUser = {\n  prefix: 'fas',\n  iconName: 'chalkboard-user',\n  icon: [640, 512, [\"chalkboard-teacher\"], \"f51c\", \"M160 64c0-35.3 28.7-64 64-64L576 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64l-239.2 0c-11.8-25.5-29.9-47.5-52.4-64l99.6 0 0-32c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 32 64 0 0-288L224 64l0 49.1C205.2 102.2 183.3 96 160 96l0-32zm0 64a96 96 0 1 1 0 192 96 96 0 1 1 0-192zM133.3 352l53.3 0C260.3 352 320 411.7 320 485.3c0 14.7-11.9 26.7-26.7 26.7L26.7 512C11.9 512 0 500.1 0 485.3C0 411.7 59.7 352 133.3 352z\"]\n};\nconst faChalkboardTeacher = faChalkboardUser;\nconst faPesoSign = {\n  prefix: 'fas',\n  iconName: 'peso-sign',\n  icon: [384, 512, [], \"e222\", \"M64 32C46.3 32 32 46.3 32 64l0 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 64 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 80 0c68.4 0 127.7-39 156.8-96l19.2 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-.7 0c.5-5.3 .7-10.6 .7-16s-.2-10.7-.7-16l.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-19.2 0C303.7 71 244.4 32 176 32L64 32zm190.4 96L96 128l0-32 80 0c30.5 0 58.2 12.2 78.4 32zM96 192l190.9 0c.7 5.2 1.1 10.6 1.1 16s-.4 10.8-1.1 16L96 224l0-32zm158.4 96c-20.2 19.8-47.9 32-78.4 32l-80 0 0-32 158.4 0z\"]\n};\nconst faBuildingShield = {\n  prefix: 'fas',\n  iconName: 'building-shield',\n  icon: [576, 512, [], \"e4d8\", \"M0 48C0 21.5 21.5 0 48 0L336 0c26.5 0 48 21.5 48 48l0 159-42.4 17L304 224l-32 0c-8.8 0-16 7.2-16 16l0 32 0 24.2 0 7.8c0 .9 .1 1.7 .2 2.6c2.3 58.1 24.1 144.8 98.7 201.5c-5.8 2.5-12.2 3.9-18.9 3.9l-96 0 0-80c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 80-96 0c-26.5 0-48-21.5-48-48L0 48zM80 224c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm80 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zM64 112l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16L80 96c-8.8 0-16 7.2-16 16zM176 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm80 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zM423.1 225.7c5.7-2.3 12.1-2.3 17.8 0l120 48C570 277.4 576 286.2 576 296c0 63.3-25.9 168.8-134.8 214.2c-5.9 2.5-12.6 2.5-18.5 0C313.9 464.8 288 359.3 288 296c0-9.8 6-18.6 15.1-22.3l120-48zM527.4 312L432 273.8l0 187.8c68.2-33 91.5-99 95.4-149.7z\"]\n};\nconst faBaby = {\n  prefix: 'fas',\n  iconName: 'baby',\n  icon: [448, 512, [], \"f77c\", \"M152 88a72 72 0 1 1 144 0A72 72 0 1 1 152 88zM39.7 144.5c13-17.9 38-21.8 55.9-8.8L131.8 162c26.8 19.5 59.1 30 92.2 30s65.4-10.5 92.2-30l36.2-26.4c17.9-13 42.9-9 55.9 8.8s9 42.9-8.8 55.9l-36.2 26.4c-13.6 9.9-28.1 18.2-43.3 25l0 36.3-192 0 0-36.3c-15.2-6.7-29.7-15.1-43.3-25L48.5 200.3c-17.9-13-21.8-38-8.8-55.9zm89.8 184.8l60.6 53-26 37.2 24.3 24.3c15.6 15.6 15.6 40.9 0 56.6s-40.9 15.6-56.6 0l-48-48C70 438.6 68.1 417 79.2 401.1l50.2-71.8zm128.5 53l60.6-53 50.2 71.8c11.1 15.9 9.2 37.5-4.5 51.2l-48 48c-15.6 15.6-40.9 15.6-56.6 0s-15.6-40.9 0-56.6L284 419.4l-26-37.2z\"]\n};\nconst faUsersLine = {\n  prefix: 'fas',\n  iconName: 'users-line',\n  icon: [640, 512, [], \"e592\", \"M211.2 96a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zM32 256c0 17.7 14.3 32 32 32l85.6 0c10.1-39.4 38.6-71.5 75.8-86.6c-9.7-6-21.2-9.4-33.4-9.4l-96 0c-35.3 0-64 28.7-64 64zm461.6 32l82.4 0c17.7 0 32-14.3 32-32c0-35.3-28.7-64-64-64l-96 0c-11.7 0-22.7 3.1-32.1 8.6c38.1 14.8 67.4 47.3 77.7 87.4zM391.2 226.4c-6.9-1.6-14.2-2.4-21.6-2.4l-96 0c-8.5 0-16.7 1.1-24.5 3.1c-30.8 8.1-55.6 31.1-66.1 60.9c-3.5 10-5.5 20.8-5.5 32c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32c0-11.2-1.9-22-5.5-32c-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zM321.6 192a80 80 0 1 0 0-160 80 80 0 1 0 0 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z\"]\n};\nconst faQuoteLeft = {\n  prefix: 'fas',\n  iconName: 'quote-left',\n  icon: [448, 512, [8220, \"quote-left-alt\"], \"f10d\", \"M0 216C0 149.7 53.7 96 120 96l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-32 0-32 0-72zm256 0c0-66.3 53.7-120 120-120l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-32 0-32 0-72z\"]\n};\nconst faQuoteLeftAlt = faQuoteLeft;\nconst faTractor = {\n  prefix: 'fas',\n  iconName: 'tractor',\n  icon: [640, 512, [128668], \"f722\", \"M96 64c0-35.3 28.7-64 64-64L266.3 0c26.2 0 49.7 15.9 59.4 40.2L373.7 160 480 160l0-33.8c0-24.8 5.8-49.3 16.9-71.6l2.5-5c7.9-15.8 27.1-22.2 42.9-14.3s22.2 27.1 14.3 42.9l-2.5 5c-6.7 13.3-10.1 28-10.1 42.9l0 33.8 56 0c22.1 0 40 17.9 40 40l0 45.4c0 16.5-8.5 31.9-22.6 40.7l-43.3 27.1c-14.2-5.9-29.8-9.2-46.1-9.2c-39.3 0-74.1 18.9-96 48l-80 0c0 17.7-14.3 32-32 32l-8.2 0c-1.7 4.8-3.7 9.5-5.8 14.1l5.8 5.8c12.5 12.5 12.5 32.8 0 45.3l-22.6 22.6c-12.5 12.5-32.8 12.5-45.3 0l-5.8-5.8c-4.6 2.2-9.3 4.1-14.1 5.8l0 8.2c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-8.2c-4.8-1.7-9.5-3.7-14.1-5.8l-5.8 5.8c-12.5 12.5-32.8 12.5-45.3 0L40.2 449.1c-12.5-12.5-12.5-32.8 0-45.3l5.8-5.8c-2.2-4.6-4.1-9.3-5.8-14.1L32 384c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32l8.2 0c1.7-4.8 3.7-9.5 5.8-14.1l-5.8-5.8c-12.5-12.5-12.5-32.8 0-45.3l22.6-22.6c9-9 21.9-11.5 33.1-7.6l0-.6 0-32 0-96zm170.3 0L160 64l0 96 32 0 112.7 0L266.3 64zM176 256a80 80 0 1 0 0 160 80 80 0 1 0 0-160zM528 448a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm0 64c-48.6 0-88-39.4-88-88c0-29.8 14.8-56.1 37.4-72c14.3-10.1 31.8-16 50.6-16c2.7 0 5.3 .1 7.9 .3c44.9 4 80.1 41.7 80.1 87.7c0 48.6-39.4 88-88 88z\"]\n};\nconst faTrashArrowUp = {\n  prefix: 'fas',\n  iconName: 'trash-arrow-up',\n  icon: [448, 512, [\"trash-restore\"], \"f829\", \"M163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3C140.6 6.8 151.7 0 163.8 0zM32 128l384 0L394.8 467c-1.6 25.3-22.6 45-47.9 45l-245.8 0c-25.3 0-46.3-19.7-47.9-45L32 128zm192 64c-6.4 0-12.5 2.5-17 7l-80 80c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39L200 408c0 13.3 10.7 24 24 24s24-10.7 24-24l0-134.1 39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-4.5-4.5-10.6-7-17-7z\"]\n};\nconst faTrashRestore = faTrashArrowUp;\nconst faArrowDownUpLock = {\n  prefix: 'fas',\n  iconName: 'arrow-down-up-lock',\n  icon: [640, 512, [], \"e4b0\", \"M150.6 502.6l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 402.7 160 288l256 0 0-16c0-17.2 3.9-33.5 10.8-48L352 224l0-114.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-6-6-14.1-9.4-22.6-9.4s-16.6 3.4-22.6 9.4l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L288 109.3 288 224l-128 0-64 0-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 114.7L54.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0zM160 192l0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 128 64 0zM288 320l0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128-64 0zm240-80c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z\"]\n};\nconst faLinesLeaning = {\n  prefix: 'fas',\n  iconName: 'lines-leaning',\n  icon: [384, 512, [], \"e51e\", \"M190.4 74.1c5.6-16.8-3.5-34.9-20.2-40.5s-34.9 3.5-40.5 20.2l-128 384c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l128-384zm70.9-41.7c-17.4-2.9-33.9 8.9-36.8 26.3l-64 384c-2.9 17.4 8.9 33.9 26.3 36.8s33.9-8.9 36.8-26.3l64-384c2.9-17.4-8.9-33.9-26.3-36.8zM352 32c-17.7 0-32 14.3-32 32l0 384c0 17.7 14.3 32 32 32s32-14.3 32-32l0-384c0-17.7-14.3-32-32-32z\"]\n};\nconst faRulerCombined = {\n  prefix: 'fas',\n  iconName: 'ruler-combined',\n  icon: [512, 512, [], \"f546\", \"M.2 468.9C2.7 493.1 23.1 512 48 512l96 0 320 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-64-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-64-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-48c0-26.5-21.5-48-48-48L48 0C21.5 0 0 21.5 0 48L0 368l0 96c0 1.7 .1 3.3 .2 4.9z\"]\n};\nconst faCopyright = {\n  prefix: 'fas',\n  iconName: 'copyright',\n  icon: [512, 512, [169], \"f1f9\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM199.4 312.6c31.2 31.2 81.9 31.2 113.1 0c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9c-50 50-131 50-181 0s-50-131 0-181s131-50 181 0c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0c-31.2-31.2-81.9-31.2-113.1 0s-31.2 81.9 0 113.1z\"]\n};\nconst faEquals = {\n  prefix: 'fas',\n  iconName: 'equals',\n  icon: [448, 512, [62764], \"3d\", \"M48 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48 128zm0 192c-17.7 0-32 14.3-32 32s14.3 32 32 32l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48 320z\"]\n};\nconst faBlender = {\n  prefix: 'fas',\n  iconName: 'blender',\n  icon: [512, 512, [], \"f517\", \"M0 64C0 28.7 28.7 0 64 0l64 0 32 0L470.1 0c21.1 0 36.4 20.1 30.9 40.4L494.5 64 336 64c-8.8 0-16 7.2-16 16s7.2 16 16 16l149.8 0-17.5 64L336 160c-8.8 0-16 7.2-16 16s7.2 16 16 16l123.6 0-17.5 64L336 256c-8.8 0-16 7.2-16 16s7.2 16 16 16l97.5 0L416 352l-256 0-8.7-96L64 256c-35.3 0-64-28.7-64-64L0 64zM145.5 192L133.8 64 64 64l0 128 81.5 0zM144 384l288 0c26.5 0 48 21.5 48 48l0 32c0 26.5-21.5 48-48 48l-288 0c-26.5 0-48-21.5-48-48l0-32c0-26.5 21.5-48 48-48zm144 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faTeeth = {\n  prefix: 'fas',\n  iconName: 'teeth',\n  icon: [576, 512, [], \"f62e\", \"M0 128C0 75 43 32 96 32l384 0c53 0 96 43 96 96l0 256c0 53-43 96-96 96L96 480c-53 0-96-43-96-96L0 128zm176 48l0 56c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-56c0-26.5-21.5-48-48-48s-48 21.5-48 48zm176-48c-26.5 0-48 21.5-48 48l0 56c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-56c0-26.5-21.5-48-48-48zM48 208l0 24c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-24c0-26.5-21.5-48-48-48s-48 21.5-48 48zM96 384c26.5 0 48-21.5 48-48l0-24c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24l0 24c0 26.5 21.5 48 48 48zm80-48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-24c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24l0 24zm176 48c26.5 0 48-21.5 48-48l0-24c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24l0 24c0 26.5 21.5 48 48 48zm80-176l0 24c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-24c0-26.5-21.5-48-48-48s-48 21.5-48 48zm48 176c26.5 0 48-21.5 48-48l0-24c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24l0 24c0 26.5 21.5 48 48 48z\"]\n};\nconst faShekelSign = {\n  prefix: 'fas',\n  iconName: 'shekel-sign',\n  icon: [448, 512, [8362, \"ils\", \"shekel\", \"sheqel\", \"sheqel-sign\"], \"f20b\", \"M32 32C14.3 32 0 46.3 0 64L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32L64 96l128 0c35.3 0 64 28.7 64 64l0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-70.7-57.3-128-128-128L32 32zM320 480c70.7 0 128-57.3 128-128l0-288c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 288c0 35.3-28.7 64-64 64l-128 0 0-224c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l160 0z\"]\n};\nconst faIls = faShekelSign;\nconst faShekel = faShekelSign;\nconst faSheqel = faShekelSign;\nconst faSheqelSign = faShekelSign;\nconst faMap = {\n  prefix: 'fas',\n  iconName: 'map',\n  icon: [576, 512, [128506, 62072], \"f279\", \"M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z\"]\n};\nconst faRocket = {\n  prefix: 'fas',\n  iconName: 'rocket',\n  icon: [512, 512, [], \"f135\", \"M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2l0 82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9l0-107.2c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\"]\n};\nconst faPhotoFilm = {\n  prefix: 'fas',\n  iconName: 'photo-film',\n  icon: [640, 512, [\"photo-video\"], \"f87c\", \"M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faPhotoVideo = faPhotoFilm;\nconst faFolderMinus = {\n  prefix: 'fas',\n  iconName: 'folder-minus',\n  icon: [512, 512, [], \"f65d\", \"M448 480L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64zM184 272c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z\"]\n};\nconst faHexagonNodesBolt = {\n  prefix: 'fas',\n  iconName: 'hexagon-nodes-bolt',\n  icon: [576, 512, [], \"e69a\", \"M248 106.6c18.9-9 32-28.3 32-50.6c0-30.9-25.1-56-56-56s-56 25.1-56 56c0 22.3 13.1 41.6 32 50.6l0 98.8c-2.8 1.3-5.5 2.9-8 4.7l-80.1-45.8c1.6-20.8-8.6-41.6-27.9-52.8C57.2 96 23 105.2 7.5 132S1.2 193 28 208.5c1.3 .8 2.6 1.5 4 2.1l0 90.8c-1.3 .6-2.7 1.3-4 2.1C1.2 319-8 353.2 7.5 380S57.2 416 84 400.5c19.3-11.1 29.4-32 27.8-52.8l50.5-28.9c-11.5-11.2-19.9-25.6-23.8-41.7L88 306.1c-2.6-1.8-5.2-3.3-8-4.7l0-90.8c2.8-1.3 5.5-2.9 8-4.7l80.1 45.8c-.1 1.4-.2 2.8-.2 4.3c0 22.3 13.1 41.6 32 50.6l0 98.8c-18.9 9-32 28.3-32 50.6c0 30.9 25.1 56 56 56c30.7 0 55.6-24.7 56-55.2c-7.5-12.9-13.5-26.8-17.6-41.5c-4.2-4-9.1-7.3-14.4-9.9l0-98.8c2.8-1.3 5.5-2.9 8-4.7l10.5 6c5.5-15.3 13.1-29.5 22.4-42.5l-9.1-5.2c.1-1.4 .2-2.8 .2-4.3c0-22.3-13.1-41.6-32-50.6l0-98.8zM440.5 132C425 105.2 390.8 96 364 111.5c-19.3 11.1-29.4 32-27.8 52.8l-50.6 28.9c11.5 11.2 19.9 25.6 23.8 41.7L360 205.9c.4 .3 .8 .6 1.3 .9c21.7-9.5 45.6-14.8 70.8-14.8c2 0 4 0 5.9 .1c12.1-17.3 13.8-40.6 2.6-60.1zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z\"]\n};\nconst faStore = {\n  prefix: 'fas',\n  iconName: 'store',\n  icon: [576, 512, [], \"f54e\", \"M547.6 103.8L490.3 13.1C485.2 5 476.1 0 466.4 0L109.6 0C99.9 0 90.8 5 85.7 13.1L28.3 103.8c-29.6 46.8-3.4 111.9 51.9 119.4c4 .5 8.1 .8 12.1 .8c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.2 0 49.3-11.4 65.2-29c16 17.6 39.1 29 65.2 29c4.1 0 8.1-.3 12.1-.8c55.5-7.4 81.8-72.5 52.1-119.4zM499.7 254.9c0 0 0 0-.1 0c-5.3 .7-10.7 1.1-16.2 1.1c-12.4 0-24.3-1.9-35.4-5.3L448 384l-320 0 0-133.4c-11.2 3.5-23.2 5.4-35.6 5.4c-5.5 0-11-.4-16.3-1.1l-.1 0c-4.1-.6-8.1-1.3-12-2.3L64 384l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64 0-131.4c-4 1-8 1.8-12.3 2.3z\"]\n};\nconst faArrowTrendUp = {\n  prefix: 'fas',\n  iconName: 'arrow-trend-up',\n  icon: [576, 512, [], \"e098\", \"M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z\"]\n};\nconst faPlugCircleMinus = {\n  prefix: 'fas',\n  iconName: 'plug-circle-minus',\n  icon: [576, 512, [], \"e55e\", \"M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM576 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-64 0c0 8.8-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l128 0c8.8 0 16 7.2 16 16z\"]\n};\nconst faSignHanging = {\n  prefix: 'fas',\n  iconName: 'sign-hanging',\n  icon: [512, 512, [\"sign\"], \"f4d9\", \"M96 0c17.7 0 32 14.3 32 32l0 32 352 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-352 0 0 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-352-32 0C14.3 128 0 113.7 0 96S14.3 64 32 64l32 0 0-32C64 14.3 78.3 0 96 0zm96 160l256 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32l0-160c0-17.7 14.3-32 32-32z\"]\n};\nconst faSign = faSignHanging;\nconst faBezierCurve = {\n  prefix: 'fas',\n  iconName: 'bezier-curve',\n  icon: [640, 512, [], \"f55b\", \"M296 136l0-48 48 0 0 48-48 0zM288 32c-26.5 0-48 21.5-48 48l0 4L121.6 84C111.2 62.7 89.3 48 64 48C28.7 48 0 76.7 0 112s28.7 64 64 64c25.3 0 47.2-14.7 57.6-36l66.9 0c-58.9 39.6-98.9 105-104 180L80 320c-26.5 0-48 21.5-48 48l0 64c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-64c0-26.5-21.5-48-48-48l-3.3 0c5.9-67 48.5-123.4 107.5-149.1c8.6 12.7 23.2 21.1 39.8 21.1l64 0c16.6 0 31.1-8.4 39.8-21.1c59 25.7 101.6 82.1 107.5 149.1l-3.3 0c-26.5 0-48 21.5-48 48l0 64c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-64c0-26.5-21.5-48-48-48l-4.5 0c-5-75-45.1-140.4-104-180l66.9 0c10.4 21.3 32.3 36 57.6 36c35.3 0 64-28.7 64-64s-28.7-64-64-64c-25.3 0-47.2 14.7-57.6 36L400 84l0-4c0-26.5-21.5-48-48-48l-64 0zM88 376l48 0 0 48-48 0 0-48zm416 48l0-48 48 0 0 48-48 0z\"]\n};\nconst faBellSlash = {\n  prefix: 'fas',\n  iconName: 'bell-slash',\n  icon: [640, 512, [128277, 61943], \"f1f6\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-90.2-70.7c.2-.4 .4-.9 .6-1.3c5.2-11.5 3.1-25-5.3-34.4l-7.4-8.3C497.3 319.2 480 273.9 480 226.8l0-18.8c0-77.4-55-142-128-156.8L352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 19.2c-42.6 8.6-79 34.2-102 69.3L38.8 5.1zM406.2 416L160 222.1l0 4.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S115.4 416 128 416l278.2 0zm-40.9 77.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z\"]\n};\nconst faTablet = {\n  prefix: 'fas',\n  iconName: 'tablet',\n  icon: [448, 512, [\"tablet-android\"], \"f3fb\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L64 0zM176 432l96 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faTabletAndroid = faTablet;\nconst faSchoolFlag = {\n  prefix: 'fas',\n  iconName: 'school-flag',\n  icon: [576, 512, [], \"e56e\", \"M288 0L400 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16l-79.3 0 89.6 64L512 160c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-176 0 0-112c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 112L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l101.7 0L256 95.5 256 32c0-17.7 14.3-32 32-32zm48 240a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM80 224c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-32 0zm368 16l0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zM80 352c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-32 0zm384 0c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-32 0z\"]\n};\nconst faFill = {\n  prefix: 'fas',\n  iconName: 'fill',\n  icon: [512, 512, [], \"f575\", \"M86.6 9.4C74.1-3.1 53.9-3.1 41.4 9.4s-12.5 32.8 0 45.3L122.7 136 30.6 228.1c-37.5 37.5-37.5 98.3 0 135.8L148.1 481.4c37.5 37.5 98.3 37.5 135.8 0L474.3 290.9c28.1-28.1 28.1-73.7 0-101.8L322.9 37.7c-28.1-28.1-73.7-28.1-101.8 0L168 90.7 86.6 9.4zM168 181.3l49.4 49.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L213.3 136l53.1-53.1c3.1-3.1 8.2-3.1 11.3 0L429.1 234.3c3.1 3.1 3.1 8.2 0 11.3L386.7 288 67.5 288c1.4-5.4 4.2-10.4 8.4-14.6L168 181.3z\"]\n};\nconst faAngleUp = {\n  prefix: 'fas',\n  iconName: 'angle-up',\n  icon: [448, 512, [8963], \"f106\", \"M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z\"]\n};\nconst faDrumstickBite = {\n  prefix: 'fas',\n  iconName: 'drumstick-bite',\n  icon: [512, 512, [], \"f6d7\", \"M160 265.2c0 8.5-3.4 16.6-9.4 22.6l-26.8 26.8c-12.3 12.3-32.5 11.4-49.4 7.2C69.8 320.6 65 320 60 320c-33.1 0-60 26.9-60 60s26.9 60 60 60c6.3 0 12 5.7 12 12c0 33.1 26.9 60 60 60s60-26.9 60-60c0-5-.6-9.8-1.8-14.5c-4.2-16.9-5.2-37.1 7.2-49.4l26.8-26.8c6-6 14.1-9.4 22.6-9.4l89.2 0c6.3 0 12.4-.3 18.5-1c11.9-1.2 16.4-15.5 10.8-26c-8.5-15.8-13.3-33.8-13.3-53c0-61.9 50.1-112 112-112c8 0 15.7 .8 23.2 2.4c11.7 2.5 24.1-5.9 22-17.6C494.5 62.5 422.5 0 336 0C238.8 0 160 78.8 160 176l0 89.2z\"]\n};\nconst faHollyBerry = {\n  prefix: 'fas',\n  iconName: 'holly-berry',\n  icon: [512, 512, [], \"f7aa\", \"M256 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-80 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM276.8 383.8c1 .1 2.1 .2 3.2 .2c39.8 0 72 32.2 72 72l0 22.7c0 16.4 16 27.9 31.6 22.8l12.8-4.3c18-6 37.3-6.5 55.6-1.5l19.4 5.3c17.9 4.9 34.4-11.6 29.5-29.5L495.6 452c-5-18.3-4.4-37.6 1.5-55.6l4.3-12.8c5.2-15.5-6.4-31.6-22.8-31.6c-34.6 0-62.7-28.1-62.7-62.7l0-32c0-16.4-16-27.9-31.6-22.8l-12.8 4.3c-18 6-37.3 6.5-55.6 1.5l-29.6-8.1c-2.9-.8-5.9-1-8.7-.7c4.2 9.7 5.8 20.8 3.7 32.3L275 298.7c-1.5 8.4-1.4 17 .5 25.3l5.3 23.9c2.8 12.7 1.1 25.2-4 35.9zM127.6 234.5c-15.5-5.2-31.6 6.4-31.6 22.8l0 32C96 323.9 67.9 352 33.3 352c-16.4 0-27.9 16-22.8 31.6l4.3 12.8c6 18 6.5 37.3 1.5 55.6l-5.3 19.4C6.2 489.4 22.6 505.8 40.5 501L60 495.6c18.3-5 37.6-4.5 55.6 1.5l12.8 4.3c15.5 5.2 31.6-6.4 31.6-22.8l0-32c0-34.6 28.1-62.7 62.7-62.7c16.4 0 27.9-16 22.8-31.6l-4.3-12.8c-6-18-6.5-37.3-1.5-55.6l5.3-19.4c4.9-17.9-11.6-34.4-29.5-29.5L196 240.4c-18.3 5-37.6 4.4-55.6-1.5l-12.8-4.3zM384 144a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"]\n};\nconst faChevronLeft = {\n  prefix: 'fas',\n  iconName: 'chevron-left',\n  icon: [320, 512, [9001], \"f053\", \"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\"]\n};\nconst faBacteria = {\n  prefix: 'fas',\n  iconName: 'bacteria',\n  icon: [640, 512, [], \"e059\", \"M304.9 .7c-9.6-2.7-19.5 2.8-22.3 12.4l-4.3 15.2c-8.3-.6-16.8 0-25.2 1.9c-7.3 1.7-14.3 3.5-21.1 5.5l-5.5-12.7c-3.9-9.1-14.5-13.4-23.6-9.5s-13.4 14.5-9.5 23.6l4.4 10.4c-16.6 6.7-31.7 14.4-45.4 22.8L147 62c-5.5-8.3-16.7-10.5-25-5s-10.5 16.7-5 25l6 9c-13.7 11-25.5 22.8-35.8 34.9l-10-8c-7.8-6.2-19.1-5-25.3 2.8s-5 19.1 2.8 25.3L65.9 155c-1.8 2.8-3.5 5.7-5.1 8.5c-6.6 11.4-11.8 22.6-16 33l-8-3.2c-9.2-3.7-19.7 .8-23.4 10s.8 19.7 10 23.4l10.4 4.2c-.2 .8-.4 1.5-.5 2.3c-2.2 9.3-3.4 17.3-4.1 23.4c-.4 3.1-.6 5.7-.8 7.8c-.1 1.1-.1 2-.2 2.8l-.1 1.1 0 .5 0 .2 0 .1c0 0 0 .1 29.1 1c0 0 0 0-.1 0L28 269.3c-.1 3.1 0 6.1 .2 9.1l-15.2 4.3C3.5 285.4-2 295.4 .7 304.9s12.7 15.1 22.3 12.4l15.6-4.5c7.6 13.6 18.9 25 32.6 32.6L66.7 361c-2.7 9.6 2.8 19.5 12.4 22.3s19.5-2.8 22.3-12.4l4.3-15.2c1.2 .1 2.4 .2 3.6 .2c15.6 .5 30.3-3.3 43-10.2l9 9c7 7 18.4 7 25.5 0s7-18.4 0-25.5l-7.2-7.2c9.3-12.6 15.2-27.8 16.3-44.5l7.1 3c9.1 3.9 19.7-.3 23.6-9.5s-.3-19.7-9.5-23.6l-8.6-3.7c6.4-9.9 17.3-22.4 36.9-33.3l1.3 4.4c2.7 9.6 12.7 15.1 22.3 12.4s15.1-12.7 12.4-22.3l-2.3-8.1c3.8-1.1 7.7-2.1 11.9-3.1c11.6-2.7 22.1-7.7 31.1-14.4l7.2 7.2c7 7 18.4 7 25.5 0s7-18.4 0-25.5l-9-9c7.6-13.9 11.3-30.1 10.1-46.6l15.2-4.3c9.6-2.7 15.1-12.7 12.4-22.3S370.6 64 361 66.7l-15.6 4.5c-7.7-13.9-19.1-25.1-32.6-32.6l4.5-15.6c2.7-9.6-2.8-19.5-12.4-22.3zM112 272l-48-1.5c0 0 0 0 0 0c11.7 .4 27.3 .9 48 1.6zm16-80a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm64-48a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM322.7 489c-2.7 9.6 2.8 19.5 12.4 22.3s19.5-2.8 22.2-12.4l4.3-15.2c8.3 .6 16.8 0 25.2-1.9c7.3-1.7 14.3-3.5 21.1-5.5l5.5 12.7c3.9 9.1 14.5 13.4 23.6 9.5s13.4-14.5 9.5-23.6l-4.4-10.4c16.6-6.7 31.7-14.4 45.4-22.8L493 450c5.5 8.3 16.7 10.5 25 5s10.5-16.7 5-25l-6-9c13.7-11 25.5-22.8 35.8-34.9l10 8c7.8 6.2 19.1 5 25.3-2.8s5-19.1-2.8-25.3L574.1 357c1.8-2.8 3.5-5.7 5.1-8.5c6.6-11.4 11.8-22.6 16-33l8 3.2c9.2 3.7 19.7-.8 23.4-10s-.8-19.7-10-23.4l-10.4-4.2c.2-.8 .4-1.5 .5-2.3c2.2-9.3 3.4-17.3 4.1-23.4c.4-3.1 .6-5.7 .8-7.8c.1-1.1 .1-2 .2-2.8l.1-1.1 0-.5 0-.2 0-.1c0 0 0-.1-29.1-1c0 0 0 0 .1 0l29.1 .9c.1-3.1 0-6.1-.2-9.1l15.2-4.3c9.6-2.7 15.1-12.7 12.4-22.3s-12.7-15.1-22.3-12.4l-15.6 4.5c-7.6-13.6-18.9-25-32.6-32.6l4.5-15.6c2.7-9.6-2.8-19.5-12.4-22.3s-19.5 2.8-22.3 12.4l-4.3 15.2c-1.2-.1-2.4-.2-3.6-.2c-15.6-.5-30.3 3.3-43 10.2l-9-9c-7-7-18.4-7-25.5 0s-7 18.4 0 25.5l7.2 7.2c-9.3 12.6-15.2 27.8-16.3 44.5l-7.1-3c-9.1-3.9-19.7 .3-23.6 9.5s.3 19.7 9.5 23.6l8.6 3.7c-6.4 9.9-17.3 22.4-36.9 33.3l-1.3-4.4c-2.7-9.6-12.7-15.1-22.3-12.4s-15.1 12.7-12.4 22.3l2.3 8.1c-3.8 1.1-7.7 2.1-11.9 3.1c-11.6 2.7-22.1 7.7-31.1 14.4l-7.2-7.2c-7-7-18.4-7-25.5 0s-7 18.4 0 25.5l9 9c-7.6 13.9-11.3 30.1-10.1 46.6l-15.2 4.3c-9.6 2.7-15.1 12.7-12.4 22.2s12.7 15.1 22.3 12.4l15.6-4.5c7.7 13.9 19.1 25.1 32.6 32.6L322.7 489zM576 241.5c0 0 0 0 0 0c-11.7-.4-27.3-.9-48-1.6l48 1.5zM448 384a32 32 0 1 1 -64 0 32 32 0 1 1 64 0z\"]\n};\nconst faHandLizard = {\n  prefix: 'fas',\n  iconName: 'hand-lizard',\n  icon: [512, 512, [], \"f258\", \"M0 112C0 85.5 21.5 64 48 64l112 0 80 0 46.5 0c36.8 0 71.2 18 92.1 48.2l113.5 164c13 18.7 19.9 41 19.9 63.8l0 12 0 16 0 48c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-13.8L273.9 352 240 352l-80 0-48 0c-26.5 0-48-21.5-48-48s21.5-48 48-48l48 0 80 0c26.5 0 48-21.5 48-48s-21.5-48-48-48l-80 0L48 160c-26.5 0-48-21.5-48-48z\"]\n};\nconst faNotdef = {\n  prefix: 'fas',\n  iconName: 'notdef',\n  icon: [384, 512, [], \"e1fe\", \"M64 390.3L153.5 256 64 121.7l0 268.6zM102.5 448l179.1 0L192 313.7 102.5 448zm128-192L320 390.3l0-268.6L230.5 256zM281.5 64L102.5 64 192 198.3 281.5 64zM0 48C0 21.5 21.5 0 48 0L336 0c26.5 0 48 21.5 48 48l0 416c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 48z\"]\n};\nconst faDisease = {\n  prefix: 'fas',\n  iconName: 'disease',\n  icon: [512, 512, [], \"f7fa\", \"M236.4 61.4L227 75.5c-21.3 32-59.4 48.5-97.3 42.1l-59.6-9.9C33.4 101.6 0 129.9 .1 167.1c0 15.9 6.4 31.2 17.6 42.5l29.2 29.2c11 11 17.2 25.9 17.2 41.5c0 15.8-6.4 30.9-17.7 42L33.3 335.1C22.2 345.9 16 360.7 16 376.2c0 36.8 34.1 64.2 70.1 56.2l62.3-13.8c7.7-1.7 15.7-2.6 23.6-2.6l10 0c27.2 0 53.7 9.3 75 26.3L287.8 467c10.5 8.4 23.6 13 37 13c32.7 0 59.3-26.5 59.3-59.3l0-25.2c0-34.9 21.4-66.2 53.9-78.8l36.9-14.3c22.4-8.7 37.2-30.3 37.2-54.3c0-28.1-20.1-52.3-47.8-57.3l-28-5.1c-36.5-6.7-65.4-34.5-73.6-70.7l-7.1-31.5C348.9 53.4 322.1 32 291.3 32c-22 0-42.6 11-54.9 29.4zM160 192a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 16a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zm0 80a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faBriefcaseMedical = {\n  prefix: 'fas',\n  iconName: 'briefcase-medical',\n  icon: [512, 512, [], \"f469\", \"M184 48l144 0c4.4 0 8 3.6 8 8l0 40L176 96l0-40c0-4.4 3.6-8 8-8zm-56 8l0 40L64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-64 0 0-40c0-30.9-25.1-56-56-56L184 0c-30.9 0-56 25.1-56 56zm96 152c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faGenderless = {\n  prefix: 'fas',\n  iconName: 'genderless',\n  icon: [384, 512, [], \"f22d\", \"M192 144a112 112 0 1 1 0 224 112 112 0 1 1 0-224zm0 288a176 176 0 1 0 0-352 176 176 0 1 0 0 352z\"]\n};\nconst faChevronRight = {\n  prefix: 'fas',\n  iconName: 'chevron-right',\n  icon: [320, 512, [9002], \"f054\", \"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"]\n};\nconst faRetweet = {\n  prefix: 'fas',\n  iconName: 'retweet',\n  icon: [576, 512, [], \"f079\", \"M272 416c17.7 0 32-14.3 32-32s-14.3-32-32-32l-112 0c-17.7 0-32-14.3-32-32l0-128 32 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l32 0 0 128c0 53 43 96 96 96l112 0zM304 96c-17.7 0-32 14.3-32 32s14.3 32 32 32l112 0c17.7 0 32 14.3 32 32l0 128-32 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8l-32 0 0-128c0-53-43-96-96-96L304 96z\"]\n};\nconst faCarRear = {\n  prefix: 'fas',\n  iconName: 'car-rear',\n  icon: [512, 512, [\"car-alt\"], \"f5de\", \"M165.4 96l181.2 0c13.6 0 25.7 8.6 30.2 21.4L402.9 192l-293.8 0 26.1-74.6c4.5-12.8 16.6-21.4 30.2-21.4zm-90.6 .3L39.6 196.8C16.4 206.4 0 229.3 0 256l0 80c0 23.7 12.9 44.4 32 55.4L32 448c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-48 256 0 0 48c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-56.6c19.1-11.1 32-31.7 32-55.4l0-80c0-26.7-16.4-49.6-39.6-59.2L437.2 96.3C423.7 57.8 387.4 32 346.6 32L165.4 32c-40.8 0-77.1 25.8-90.6 64.3zM208 272l96 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zM48 280c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zm360-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faCarAlt = faCarRear;\nconst faPumpSoap = {\n  prefix: 'fas',\n  iconName: 'pump-soap',\n  icon: [448, 512, [], \"e06b\", \"M128 32l0 96 128 0 0-32 60.1 0c4.2 0 8.3 1.7 11.3 4.7l33.9 33.9c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L372.7 55.4c-15-15-35.4-23.4-56.6-23.4L256 32c0-17.7-14.3-32-32-32L160 0c-17.7 0-32 14.3-32 32zM117.4 160c-33.3 0-61 25.5-63.8 58.7L35 442.7C31.9 480 61.3 512 98.8 512l186.4 0c37.4 0 66.9-32 63.8-69.3l-18.7-224c-2.8-33.2-30.5-58.7-63.8-58.7l-149.1 0zM256 360c0 35.3-28.7 56-64 56s-64-20.7-64-56c0-32.5 37-80.9 50.9-97.9c3.2-3.9 8.1-6.1 13.1-6.1s9.9 2.2 13.1 6.1C219 279.1 256 327.5 256 360z\"]\n};\nconst faVideoSlash = {\n  prefix: 'fas',\n  iconName: 'video-slash',\n  icon: [640, 512, [], \"f4e2\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-86.4-67.7 13.8 9.2c9.8 6.5 22.4 7.2 32.9 1.6s16.9-16.4 16.9-28.2l0-256c0-11.8-6.5-22.6-16.9-28.2s-23-5-32.9 1.6l-96 64L448 174.9l0 17.1 0 128 0 5.8-32-25.1L416 128c0-35.3-28.7-64-64-64L113.9 64 38.8 5.1zM407 416.7L32.3 121.5c-.2 2.1-.3 4.3-.3 6.5l0 256c0 35.3 28.7 64 64 64l256 0c23.4 0 43.9-12.6 55-31.3z\"]\n};\nconst faBatteryQuarter = {\n  prefix: 'fas',\n  iconName: 'battery-quarter',\n  icon: [576, 512, [\"battery-2\"], \"f243\", \"M464 160c8.8 0 16 7.2 16 16l0 160c0 8.8-7.2 16-16 16L80 352c-8.8 0-16-7.2-16-16l0-160c0-8.8 7.2-16 16-16l384 0zM80 96C35.8 96 0 131.8 0 176L0 336c0 44.2 35.8 80 80 80l384 0c44.2 0 80-35.8 80-80l0-16c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l0-16c0-44.2-35.8-80-80-80L80 96zm112 96l-96 0 0 128 96 0 0-128z\"]\n};\nconst faBattery2 = faBatteryQuarter;\nconst faRadio = {\n  prefix: 'fas',\n  iconName: 'radio',\n  icon: [512, 512, [128251], \"f8d7\", \"M494.8 47c12.7-3.7 20-17.1 16.3-29.8S494-2.8 481.2 1L51.7 126.9c-9.4 2.7-17.9 7.3-25.1 13.2C10.5 151.7 0 170.6 0 192l0 4L0 304 0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-229.5 0L494.8 47zM368 240a80 80 0 1 1 0 160 80 80 0 1 1 0-160zM80 256c0-8.8 7.2-16 16-16l96 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16zM64 320c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 336c-8.8 0-16-7.2-16-16zm16 64c0-8.8 7.2-16 16-16l96 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16z\"]\n};\nconst faBabyCarriage = {\n  prefix: 'fas',\n  iconName: 'baby-carriage',\n  icon: [512, 512, [\"carriage-baby\"], \"f77d\", \"M256 192L.1 192C2.7 117.9 41.3 52.9 99 14.1c13.3-8.9 30.8-4.3 39.9 8.8L256 192zm128-32c0-35.3 28.7-64 64-64l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 64c0 25.2-5.8 50.2-17 73.5s-27.8 44.5-48.6 62.3s-45.5 32-72.7 41.6S253.4 416 224 416s-58.5-5-85.7-14.6s-51.9-23.8-72.7-41.6s-37.3-39-48.6-62.3S0 249.2 0 224l224 0 160 0 0-64zM80 416a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm240 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0z\"]\n};\nconst faCarriageBaby = faBabyCarriage;\nconst faTrafficLight = {\n  prefix: 'fas',\n  iconName: 'traffic-light',\n  icon: [320, 512, [128678], \"f637\", \"M64 0C28.7 0 0 28.7 0 64L0 352c0 88.4 71.6 160 160 160s160-71.6 160-160l0-288c0-35.3-28.7-64-64-64L64 0zm96 416a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm48-176a48 48 0 1 1 -96 0 48 48 0 1 1 96 0zm-48-80a48 48 0 1 1 0-96 48 48 0 1 1 0 96z\"]\n};\nconst faThermometer = {\n  prefix: 'fas',\n  iconName: 'thermometer',\n  icon: [512, 512, [], \"f491\", \"M96 382.1l0-88.8c0-14.9 5.9-29.1 16.4-39.6l27.3-27.3 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 41.4-41.4 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 41.4-41.4 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 45.5-45.5C355.2 10.9 381.4 0 408.8 0C465.8 0 512 46.2 512 103.2c0 27.4-10.9 53.6-30.2 73L258.3 399.6c-10.5 10.5-24.7 16.4-39.6 16.4l-88.8 0L41 505c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l89-89z\"]\n};\nconst faVrCardboard = {\n  prefix: 'fas',\n  iconName: 'vr-cardboard',\n  icon: [640, 512, [], \"f729\", \"M576 64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l120.4 0c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4L576 448c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64zM96 240a64 64 0 1 1 128 0A64 64 0 1 1 96 240zm384-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\"]\n};\nconst faHandMiddleFinger = {\n  prefix: 'fas',\n  iconName: 'hand-middle-finger',\n  icon: [448, 512, [128405], \"f806\", \"M232 0c-22.1 0-40 17.9-40 40l0 164.2c-8.5-7.6-19.7-12.2-32-12.2c-26.5 0-48 21.5-48 48l0 7 0 73c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-55.7c-2 1.4-3.9 3-5.8 4.5L55 284.8C40.4 297 32 315 32 334L32 372c0 38 16.9 74 46.1 98.3l5.4 4.5c28.8 24 65 37.1 102.4 37.1L304 512c70.7 0 128-57.3 128-128l0-64 0-32c0-26.5-21.5-48-48-48c-12.4 0-23.6 4.7-32.1 12.3C350 227.5 329.3 208 304 208c-12.3 0-23.5 4.6-32 12.2L272 40c0-22.1-17.9-40-40-40z\"]\n};\nconst faPercent = {\n  prefix: 'fas',\n  iconName: 'percent',\n  icon: [384, 512, [62101, 62785, \"percentage\"], \"25\", \"M374.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-320 320c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l320-320zM128 128A64 64 0 1 0 0 128a64 64 0 1 0 128 0zM384 384a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z\"]\n};\nconst faPercentage = faPercent;\nconst faTruckMoving = {\n  prefix: 'fas',\n  iconName: 'truck-moving',\n  icon: [640, 512, [], \"f4df\", \"M64 32C28.7 32 0 60.7 0 96L0 304l0 80 0 16c0 44.2 35.8 80 80 80c26.2 0 49.4-12.6 64-32c14.6 19.4 37.8 32 64 32c44.2 0 80-35.8 80-80c0-5.5-.6-10.8-1.6-16L416 384l33.6 0c-1 5.2-1.6 10.5-1.6 16c0 44.2 35.8 80 80 80s80-35.8 80-80c0-5.5-.6-10.8-1.6-16l1.6 0c17.7 0 32-14.3 32-32l0-64 0-16 0-10.3c0-9.2-3.2-18.2-9-25.3l-58.8-71.8c-10.6-13-26.5-20.5-43.3-20.5L480 144l0-48c0-35.3-28.7-64-64-64L64 32zM585 256l-105 0 0-64 48.8 0c2.4 0 4.7 1.1 6.2 2.9L585 256zM528 368a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM176 400a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM80 368a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faGlassWaterDroplet = {\n  prefix: 'fas',\n  iconName: 'glass-water-droplet',\n  icon: [384, 512, [], \"e4f5\", \"M32 0C23.1 0 14.6 3.7 8.6 10.2S-.6 25.4 .1 34.3L28.9 437.7c3 41.9 37.8 74.3 79.8 74.3l166.6 0c42 0 76.8-32.4 79.8-74.3L383.9 34.3c.6-8.9-2.4-17.6-8.5-24.1S360.9 0 352 0L32 0zM83 297.5L66.4 64l251.3 0L301 297.5 288 304c-20.1 10.1-43.9 10.1-64 0s-43.9-10.1-64 0s-43.9 10.1-64 0l-13-6.5zM256 196c0-24-33.7-70.1-52.2-93.5c-6.1-7.7-17.5-7.7-23.6 0C161.7 125.9 128 172 128 196c0 33.1 28.7 60 64 60s64-26.9 64-60z\"]\n};\nconst faDisplay = {\n  prefix: 'fas',\n  iconName: 'display',\n  icon: [576, 512, [], \"e163\", \"M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 288L64 352 64 64l448 0z\"]\n};\nconst faFaceSmile = {\n  prefix: 'fas',\n  iconName: 'face-smile',\n  icon: [512, 512, [128578, \"smile\"], \"f118\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM164.1 325.5C182 346.2 212.6 368 256 368s74-21.8 91.9-42.5c5.8-6.7 15.9-7.4 22.6-1.6s7.4 15.9 1.6 22.6C349.8 372.1 311.1 400 256 400s-93.8-27.9-116.1-53.5c-5.8-6.7-5.1-16.8 1.6-22.6s16.8-5.1 22.6 1.6zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faSmile = faFaceSmile;\nconst faThumbtack = {\n  prefix: 'fas',\n  iconName: 'thumbtack',\n  icon: [384, 512, [128204, 128392, \"thumb-tack\"], \"f08d\", \"M32 32C32 14.3 46.3 0 64 0L320 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-29.5 0 11.4 148.2c36.7 19.9 65.7 53.2 79.5 94.7l1 3c3.3 9.8 1.6 20.5-4.4 28.8s-15.7 13.3-26 13.3L32 352c-10.3 0-19.9-4.9-26-13.3s-7.7-19.1-4.4-28.8l1-3c13.8-41.5 42.8-74.8 79.5-94.7L93.5 64 64 64C46.3 64 32 49.7 32 32zM160 384l64 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96z\"]\n};\nconst faThumbTack = faThumbtack;\nconst faTrophy = {\n  prefix: 'fas',\n  iconName: 'trophy',\n  icon: [576, 512, [127942], \"f091\", \"M400 0L176 0c-26.5 0-48.1 21.8-47.1 48.2c.2 5.3 .4 10.6 .7 15.8L24 64C10.7 64 0 74.7 0 88c0 92.6 33.5 157 78.5 200.7c44.3 43.1 98.3 64.8 138.1 75.8c23.4 6.5 39.4 26 39.4 45.6c0 20.9-17 37.9-37.9 37.9L192 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-26.1 0C337 448 320 431 320 410.1c0-19.6 15.9-39.2 39.4-45.6c39.9-11 93.9-32.7 138.2-75.8C542.5 245 576 180.6 576 88c0-13.3-10.7-24-24-24L446.4 64c.3-5.2 .5-10.4 .7-15.8C448.1 21.8 426.5 0 400 0zM48.9 112l84.4 0c9.1 90.1 29.2 150.3 51.9 190.6c-24.9-11-50.8-26.5-73.2-48.3c-32-31.1-58-76-63-142.3zM464.1 254.3c-22.4 21.8-48.3 37.3-73.2 48.3c22.7-40.3 42.8-100.5 51.9-190.6l84.4 0c-5.1 66.3-31.1 111.2-63 142.3z\"]\n};\nconst faPersonPraying = {\n  prefix: 'fas',\n  iconName: 'person-praying',\n  icon: [448, 512, [128720, \"pray\"], \"f683\", \"M352 64A64 64 0 1 0 224 64a64 64 0 1 0 128 0zM232.7 264l22.9 31.5c6.5 8.9 16.3 14.7 27.2 16.1s21.9-1.7 30.4-8.7l88-72c17.1-14 19.6-39.2 5.6-56.3s-39.2-19.6-56.3-5.6l-55.2 45.2-26.2-36C253.6 156.7 228.6 144 202 144c-30.9 0-59.2 17.1-73.6 44.4L79.8 280.9c-20.2 38.5-9.4 85.9 25.6 111.8L158.6 432 72 432c-22.1 0-40 17.9-40 40s17.9 40 40 40l208 0c17.3 0 32.6-11.1 38-27.5s-.3-34.4-14.2-44.7L187.7 354l45-90z\"]\n};\nconst faPray = faPersonPraying;\nconst faHammer = {\n  prefix: 'fas',\n  iconName: 'hammer',\n  icon: [576, 512, [128296], \"f6e3\", \"M413.5 237.5c-28.2 4.8-58.2-3.6-80-25.4l-38.1-38.1C280.4 159 272 138.8 272 117.6l0-12.1L192.3 62c-5.3-2.9-8.6-8.6-8.3-14.7s3.9-11.5 9.5-14l47.2-21C259.1 4.2 279 0 299.2 0l18.1 0c36.7 0 72 14 98.7 39.1l44.6 42c24.2 22.8 33.2 55.7 26.6 86L503 183l8-8c9.4-9.4 24.6-9.4 33.9 0l24 24c9.4 9.4 9.4 24.6 0 33.9l-88 88c-9.4 9.4-24.6 9.4-33.9 0l-24-24c-9.4-9.4-9.4-24.6 0-33.9l8-8-17.5-17.5zM27.4 377.1L260.9 182.6c3.5 4.9 7.5 9.6 11.8 14l38.1 38.1c6 6 12.4 11.2 19.2 15.7L134.9 484.6c-14.5 17.4-36 27.4-58.6 27.4C34.1 512 0 477.8 0 435.7c0-22.6 10.1-44.1 27.4-58.6z\"]\n};\nconst faHandPeace = {\n  prefix: 'fas',\n  iconName: 'hand-peace',\n  icon: [512, 512, [9996], \"f25b\", \"M224 0c17.7 0 32 14.3 32 32l0 208-64 0 0-208c0-17.7 14.3-32 32-32zm96 160c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32zm64 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zM93.3 51.2L175.9 240l-69.9 0L34.7 76.8C27.6 60.6 35 41.8 51.2 34.7s35.1 .3 42.1 16.5zm27 221.3l-.2-.5 69.9 0 26.1 0c22.1 0 40 17.9 40 40s-17.9 40-40 40l-56 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l56 0c39.8 0 72-32.2 72-72l0-.6c9.4 5.4 20.3 8.6 32 8.6c13.2 0 25.4-4 35.6-10.8c8.7 24.9 32.5 42.8 60.4 42.8c11.7 0 22.6-3.1 32-8.6l0 8.6c0 88.4-71.6 160-160 160l-61.7 0c-42.4 0-83.1-16.9-113.1-46.9l-11.6-11.6C77.5 429.5 64 396.9 64 363l0-27c0-32.7 24.6-59.7 56.3-63.5z\"]\n};\nconst faRotate = {\n  prefix: 'fas',\n  iconName: 'rotate',\n  icon: [512, 512, [128260, \"sync-alt\"], \"f2f1\", \"M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z\"]\n};\nconst faSyncAlt = faRotate;\nconst faSpinner = {\n  prefix: 'fas',\n  iconName: 'spinner',\n  icon: [512, 512, [], \"f110\", \"M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z\"]\n};\nconst faRobot = {\n  prefix: 'fas',\n  iconName: 'robot',\n  icon: [640, 512, [129302], \"f544\", \"M320 0c17.7 0 32 14.3 32 32l0 64 120 0c39.8 0 72 32.2 72 72l0 272c0 39.8-32.2 72-72 72l-304 0c-39.8 0-72-32.2-72-72l0-272c0-39.8 32.2-72 72-72l120 0 0-64c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224l16 0 0 192-16 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-16 0 0-192 16 0z\"]\n};\nconst faPeace = {\n  prefix: 'fas',\n  iconName: 'peace',\n  icon: [512, 512, [9774], \"f67c\", \"M224 445.3l0-121.8-94.3 77.1c26.1 22.8 58.5 38.7 94.3 44.7zM89.2 351.1L224 240.8l0-174.2C133.2 81.9 64 160.9 64 256c0 34.6 9.2 67.1 25.2 95.1zm293.1 49.5L288 323.5l0 121.8c35.7-6 68.1-21.9 94.3-44.7zm40.6-49.5c16-28 25.2-60.5 25.2-95.1c0-95.1-69.2-174.1-160-189.3l0 174.2L422.8 351.1zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z\"]\n};\nconst faGears = {\n  prefix: 'fas',\n  iconName: 'gears',\n  icon: [640, 512, [\"cogs\"], \"f085\", \"M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faCogs = faGears;\nconst faWarehouse = {\n  prefix: 'fas',\n  iconName: 'warehouse',\n  icon: [640, 512, [], \"f494\", \"M0 488L0 171.3c0-26.2 15.9-49.7 40.2-59.4L308.1 4.8c7.6-3.1 16.1-3.1 23.8 0L599.8 111.9c24.3 9.7 40.2 33.3 40.2 59.4L640 488c0 13.3-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24l0-264c0-17.7-14.3-32-32-32l-384 0c-17.7 0-32 14.3-32 32l0 264c0 13.3-10.7 24-24 24l-48 0c-13.3 0-24-10.7-24-24zm488 24l-336 0c-13.3 0-24-10.7-24-24l0-56 384 0 0 56c0 13.3-10.7 24-24 24zM128 400l0-64 384 0 0 64-384 0zm0-96l0-80 384 0 0 80-384 0z\"]\n};\nconst faArrowUpRightDots = {\n  prefix: 'fas',\n  iconName: 'arrow-up-right-dots',\n  icon: [576, 512, [], \"e4b7\", \"M160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l50.7 0L9.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L256 109.3l0 50.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128c0-17.7-14.3-32-32-32L160 0zM576 80a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM448 208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM400 384a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48 80a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm128 0a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM272 384a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48 80a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM144 512a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM576 336a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm-48-80a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faSplotch = {\n  prefix: 'fas',\n  iconName: 'splotch',\n  icon: [512, 512, [], \"f5bc\", \"M208.5 62.3l28.1-36.9C248.8 9.4 267.8 0 288 0c28.5 0 53.6 18.7 61.8 46l17.8 59.4c10.3 34.4 36.1 62 69.8 74.6l39.8 14.9c20.9 7.9 34.8 27.9 34.8 50.2c0 16.9-7.9 32.8-21.5 42.9l-67.3 50.5c-24.3 18.2-37.2 47.9-33.8 78.1l2.5 22.7c4.3 38.7-26 72.6-65 72.6c-14.8 0-29.3-5.1-40.8-14.3l-55.4-44.3c-4.5-3.6-9.3-6.7-14.5-9.2c-15.8-7.9-33.7-10.4-51-7.3L82.4 451.9C47.8 458.2 16 431.6 16 396.5c0-13.2 4.7-26 13.1-36.2l11.2-13.4c14.6-17.4 22.6-39.4 22.6-62.1c0-18.8-5.5-37.2-15.8-53L8.8 173.5C3.1 164.7 0 154.4 0 143.9c0-33.4 30.1-58.8 63-53.2l51.3 8.7c35.9 6.1 72.2-8.2 94.2-37.1z\"]\n};\nconst faFaceGrinHearts = {\n  prefix: 'fas',\n  iconName: 'face-grin-hearts',\n  icon: [512, 512, [128525, \"grin-hearts\"], \"f584\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM388.1 312.8c12.3-3.8 24.3 6.9 19.3 18.7C382.4 390.6 324.2 432 256.3 432s-126.2-41.4-151.1-100.5c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19zM199.3 129.1c17.8 4.8 28.4 23.1 23.6 40.8l-17.4 65c-2.3 8.5-11.1 13.6-19.6 11.3l-65.1-17.4c-17.8-4.8-28.4-23.1-23.6-40.8s23.1-28.4 40.8-23.6l16.1 4.3 4.3-16.1c4.8-17.8 23.1-28.4 40.8-23.6zm154.3 23.6l4.3 16.1 16.1-4.3c17.8-4.8 36.1 5.8 40.8 23.6s-5.8 36.1-23.6 40.8l-65.1 17.4c-8.5 2.3-17.3-2.8-19.6-11.3l-17.4-65c-4.8-17.8 5.8-36.1 23.6-40.8s36.1 5.8 40.9 23.6z\"]\n};\nconst faGrinHearts = faFaceGrinHearts;\nconst faDiceFour = {\n  prefix: 'fas',\n  iconName: 'dice-four',\n  icon: [448, 512, [9859], \"f524\", \"M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm160 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM128 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM352 160a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM320 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faSimCard = {\n  prefix: 'fas',\n  iconName: 'sim-card',\n  icon: [384, 512, [], \"f7c4\", \"M64 0L242.7 0c17 0 33.3 6.7 45.3 18.7L365.3 96c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0zM96 192c-17.7 0-32 14.3-32 32l0 32 64 0 0-64-32 0zM64 352l80 0 96 0 80 0 0-64-80 0-96 0-80 0 0 64zM320 224c0-17.7-14.3-32-32-32l-32 0 0 64 64 0 0-32zM160 192l0 64 64 0 0-64-64 0zM288 448c17.7 0 32-14.3 32-32l0-32-64 0 0 64 32 0zM160 384l0 64 64 0 0-64-64 0zM64 416c0 17.7 14.3 32 32 32l32 0 0-64-64 0 0 32z\"]\n};\nconst faTransgender = {\n  prefix: 'fas',\n  iconName: 'transgender',\n  icon: [512, 512, [9895, \"transgender-alt\"], \"f225\", \"M112 0c6.5 0 12.3 3.9 14.8 9.9s1.1 12.9-3.5 17.4l-31 31L112 78.1l7-7c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-7 7 15.2 15.2C187.7 107.6 220.5 96 256 96s68.3 11.6 94.9 31.2l68.8-68.8-31-31c-4.6-4.6-5.9-11.5-3.5-17.4s8.3-9.9 14.8-9.9l96 0c8.8 0 16 7.2 16 16l0 96c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5l-31-31-68.8 68.8C404.4 187.7 416 220.5 416 256c0 80.2-59 146.6-136 158.2l0 17.8 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0 0 8c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-8-16 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-17.8C155 402.6 96 336.2 96 256c0-35.5 11.6-68.3 31.2-94.9L112 145.9l-7 7c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l7-7L58.3 92.3l-31 31c-4.6 4.6-11.5 5.9-17.4 3.5S0 118.5 0 112L0 16C0 7.2 7.2 0 16 0l96 0zM352 256a96 96 0 1 0 -192 0 96 96 0 1 0 192 0z\"]\n};\nconst faTransgenderAlt = faTransgender;\nconst faMercury = {\n  prefix: 'fas',\n  iconName: 'mercury',\n  icon: [384, 512, [9791], \"f223\", \"M72.1 7C85.8-4 106-1.8 117 12c17.6 22 44.7 36 75 36s57.3-14 75-36c11.1-13.8 31.2-16 45-5s16 31.2 5 45c-7.8 9.7-16.6 18.4-26.4 26.1C337.3 109.7 368 163.3 368 224c0 89.1-66.2 162.7-152 174.4l0 25.6 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 16c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-16-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-25.6C82.2 386.7 16 313.1 16 224c0-60.7 30.7-114.3 77.5-145.9C83.7 70.5 74.9 61.7 67.1 52c-11.1-13.8-8.8-33.9 5-45zM80 224a112 112 0 1 0 224 0A112 112 0 1 0 80 224z\"]\n};\nconst faArrowTurnDown = {\n  prefix: 'fas',\n  iconName: 'arrow-turn-down',\n  icon: [384, 512, [\"level-down\"], \"f149\", \"M32 64C14.3 64 0 49.7 0 32S14.3 0 32 0l96 0c53 0 96 43 96 96l0 306.7 73.4-73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-128 128c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 402.7 160 96c0-17.7-14.3-32-32-32L32 64z\"]\n};\nconst faLevelDown = faArrowTurnDown;\nconst faPersonFallingBurst = {\n  prefix: 'fas',\n  iconName: 'person-falling-burst',\n  icon: [640, 512, [], \"e547\", \"M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 9.8c0 39-23.7 74-59.9 88.4C71.6 154.5 32 213 32 278.2L32 352c0 17.7 14.3 32 32 32s32-14.3 32-32l0-73.8c0-10 1.6-19.8 4.5-29L261.1 497.4c9.6 14.8 29.4 19.1 44.3 9.5s19.1-29.4 9.5-44.3L222.6 320l1.4 0 80 0 38.4 51.2c10.6 14.1 30.7 17 44.8 6.4s17-30.7 6.4-44.8l-43.2-57.6C341.3 263.1 327.1 256 312 256l-71.5 0-56.8-80.2-.2-.3c44.7-29 72.5-79 72.5-133.6l0-9.8zM96 80A48 48 0 1 0 0 80a48 48 0 1 0 96 0zM464 286.1l58.6 53.9c4.8 4.4 11.9 5.5 17.8 2.6s9.5-9 9-15.5l-5.6-79.4 78.7-12.2c6.5-1 11.7-5.9 13.1-12.2s-1.1-13-6.5-16.7l-65.6-45.1L603 92.2c3.3-5.7 2.7-12.8-1.4-17.9s-10.9-7.2-17.2-5.3L508.3 92.1l-29.4-74C476.4 12 470.6 8 464 8s-12.4 4-14.9 10.1l-29.4 74L343.6 68.9c-6.3-1.9-13.1 .2-17.2 5.3s-4.6 12.2-1.4 17.9l39.5 69.1-65.6 45.1c-5.4 3.7-8 10.3-6.5 16.7c.1 .3 .1 .6 .2 .8l19.4 0c20.1 0 39.2 7.5 53.8 20.8l18.4 2.9L383 265.3l36.2 48.3c2.1 2.8 3.9 5.7 5.5 8.6L464 286.1z\"]\n};\nconst faAward = {\n  prefix: 'fas',\n  iconName: 'award',\n  icon: [384, 512, [], \"f559\", \"M173.8 5.5c11-7.3 25.4-7.3 36.4 0L228 17.2c6 3.9 13 5.8 20.1 5.4l21.3-1.3c13.2-.8 25.6 6.4 31.5 18.2l9.6 19.1c3.2 6.4 8.4 11.5 14.7 14.7L344.5 83c11.8 5.9 19 18.3 18.2 31.5l-1.3 21.3c-.4 7.1 1.5 14.2 5.4 20.1l11.8 17.8c7.3 11 7.3 25.4 0 36.4L366.8 228c-3.9 6-5.8 13-5.4 20.1l1.3 21.3c.8 13.2-6.4 25.6-18.2 31.5l-19.1 9.6c-6.4 3.2-11.5 8.4-14.7 14.7L301 344.5c-5.9 11.8-18.3 19-31.5 18.2l-21.3-1.3c-7.1-.4-14.2 1.5-20.1 5.4l-17.8 11.8c-11 7.3-25.4 7.3-36.4 0L156 366.8c-6-3.9-13-5.8-20.1-5.4l-21.3 1.3c-13.2 .8-25.6-6.4-31.5-18.2l-9.6-19.1c-3.2-6.4-8.4-11.5-14.7-14.7L39.5 301c-11.8-5.9-19-18.3-18.2-31.5l1.3-21.3c.4-7.1-1.5-14.2-5.4-20.1L5.5 210.2c-7.3-11-7.3-25.4 0-36.4L17.2 156c3.9-6 5.8-13 5.4-20.1l-1.3-21.3c-.8-13.2 6.4-25.6 18.2-31.5l19.1-9.6C65 70.2 70.2 65 73.4 58.6L83 39.5c5.9-11.8 18.3-19 31.5-18.2l21.3 1.3c7.1 .4 14.2-1.5 20.1-5.4L173.8 5.5zM272 192a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM1.3 441.8L44.4 339.3c.2 .1 .3 .2 .4 .4l9.6 19.1c11.7 23.2 36 37.3 62 35.8l21.3-1.3c.2 0 .5 0 .7 .2l17.8 11.8c5.1 3.3 10.5 5.9 16.1 7.7l-37.6 89.3c-2.3 5.5-7.4 9.2-13.3 9.7s-11.6-2.2-14.8-7.2L74.4 455.5l-56.1 8.3c-5.7 .8-11.4-1.5-15-6s-4.3-10.7-2.1-16zm248 60.4L211.7 413c5.6-1.8 11-4.3 16.1-7.7l17.8-11.8c.2-.1 .4-.2 .7-.2l21.3 1.3c26 1.5 50.3-12.6 62-35.8l9.6-19.1c.1-.2 .2-.3 .4-.4l43.2 102.5c2.2 5.3 1.4 11.4-2.1 16s-9.3 6.9-15 6l-56.1-8.3-32.2 49.2c-3.2 5-8.9 7.7-14.8 7.2s-11-4.3-13.3-9.7z\"]\n};\nconst faTicketSimple = {\n  prefix: 'fas',\n  iconName: 'ticket-simple',\n  icon: [576, 512, [\"ticket-alt\"], \"f3ff\", \"M0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 64c0 8.8-7.4 15.7-15.7 18.6C541.5 217.1 528 235 528 256s13.5 38.9 32.3 45.4c8.3 2.9 15.7 9.8 15.7 18.6l0 64c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64l0-64c0-8.8 7.4-15.7 15.7-18.6C34.5 294.9 48 277 48 256s-13.5-38.9-32.3-45.4C7.4 207.7 0 200.8 0 192l0-64z\"]\n};\nconst faTicketAlt = faTicketSimple;\nconst faBuilding = {\n  prefix: 'fas',\n  iconName: 'building',\n  icon: [384, 512, [127970, 61687], \"f1ad\", \"M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c26.5 0 48-21.5 48-48l0-416c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16z\"]\n};\nconst faAnglesLeft = {\n  prefix: 'fas',\n  iconName: 'angles-left',\n  icon: [512, 512, [171, \"angle-double-left\"], \"f100\", \"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z\"]\n};\nconst faAngleDoubleLeft = faAnglesLeft;\nconst faQrcode = {\n  prefix: 'fas',\n  iconName: 'qrcode',\n  icon: [448, 512, [], \"f029\", \"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z\"]\n};\nconst faClockRotateLeft = {\n  prefix: 'fas',\n  iconName: 'clock-rotate-left',\n  icon: [512, 512, [\"history\"], \"f1da\", \"M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75zm181 53c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z\"]\n};\nconst faHistory = faClockRotateLeft;\nconst faFaceGrinBeamSweat = {\n  prefix: 'fas',\n  iconName: 'face-grin-beam-sweat',\n  icon: [512, 512, [128517, \"grin-beam-sweat\"], \"f583\", \"M476.8 126.3c-4.1 1.1-8.4 1.7-12.8 1.7c-26.5 0-48-21-48-47c0-5 1.8-11.3 4.6-18.1c.3-.7 .6-1.4 .9-2.1c9-20.2 26.5-44.9 36-57.5c3.2-4.4 9.6-4.4 12.8 0C483.4 20.6 512 61 512 81c0 21.7-14.9 39.8-35.2 45.3zM256 0c51.4 0 99.3 15.2 139.4 41.2c-1.5 3.1-3 6.2-4.3 9.3c-3.4 8-7.1 19-7.1 30.5c0 44.3 36.6 79 80 79c9.6 0 18.8-1.7 27.4-4.8c13.3 30.9 20.6 65 20.6 100.8c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0zM383.8 317.8C345.3 329.4 301.9 336 256 336s-89.3-6.6-127.8-18.2c-12.3-3.7-24.3 7-19.2 18.7c24.5 56.9 81.1 96.7 147 96.7s122.5-39.8 147-96.7c5.1-11.8-6.9-22.4-19.2-18.7zm-166.2-89s0 0 0 0s0 0 0 0c2.1 2.8 5.7 3.9 8.9 2.8s5.5-4.1 5.5-7.6c0-17.9-6.7-35.6-16.6-48.8c-9.8-13-23.9-23.2-39.4-23.2s-29.6 10.2-39.4 23.2C126.7 188.4 120 206.1 120 224c0 3.4 2.2 6.5 5.5 7.6s6.9 0 8.9-2.8c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.2c.2-.2 .4-.5 .7-.9c.6-.8 1.6-2 2.8-3.4c2.5-2.8 6-6.6 10.2-10.3c8.8-7.8 18.8-14 27.7-14s18.9 6.2 27.7 14c4.2 3.7 7.7 7.5 10.2 10.3c1.2 1.4 2.2 2.6 2.8 3.4c.3 .4 .6 .7 .7 .9l.2 .2c0 0 0 0 0 0c0 0 0 0 0 0zm160 0s0 0 0 0s0 0 0 0s0 0 0 0c2.1 2.8 5.7 3.9 8.9 2.8s5.5-4.1 5.5-7.6c0-17.9-6.7-35.6-16.6-48.8c-9.8-13-23.9-23.2-39.4-23.2s-29.6 10.2-39.4 23.2C286.7 188.4 280 206.1 280 224c0 3.4 2.2 6.5 5.5 7.6s6.9 0 8.9-2.8c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.2c.2-.2 .4-.5 .7-.9c.6-.8 1.6-2 2.8-3.4c2.5-2.8 6-6.6 10.2-10.3c8.8-7.8 18.8-14 27.7-14s18.9 6.2 27.7 14c4.2 3.7 7.7 7.5 10.2 10.3c1.2 1.4 2.2 2.6 2.8 3.4c.3 .4 .6 .7 .7 .9l.2 .2c0 0 0 0 0 0z\"]\n};\nconst faGrinBeamSweat = faFaceGrinBeamSweat;\nconst faFileExport = {\n  prefix: 'fas',\n  iconName: 'file-export',\n  icon: [576, 512, [\"arrow-right-from-file\"], \"f56e\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 128-168 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0 0 112c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM384 336l0-48 110.1 0-39-39c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l80 80c9.4 9.4 9.4 24.6 0 33.9l-80 80c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l39-39L384 336zm0-208l-128 0L256 0 384 128z\"]\n};\nconst faArrowRightFromFile = faFileExport;\nconst faShield = {\n  prefix: 'fas',\n  iconName: 'shield',\n  icon: [512, 512, [128737, \"shield-blank\"], \"f132\", \"M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-16.7 8-36.1 8-52.8 0C57.3 420.7 16.5 239.2 16 140c-.1-26.2 16.3-47.9 38.3-57.2L242.7 2.9C246.8 1 251.4 0 256 0z\"]\n};\nconst faShieldBlank = faShield;\nconst faArrowUpShortWide = {\n  prefix: 'fas',\n  iconName: 'arrow-up-short-wide',\n  icon: [576, 512, [\"sort-amount-up-alt\"], \"f885\", \"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z\"]\n};\nconst faSortAmountUpAlt = faArrowUpShortWide;\nconst faCommentNodes = {\n  prefix: 'fas',\n  iconName: 'comment-nodes',\n  icon: [640, 512, [], \"e696\", \"M256 448c10.8 0 21.5-.5 32-1.6c.3-15.8 4.4-31.7 12.9-46.4c16-27.7 43.7-44.4 73.2-47.5l16.7-29.2c-4.3-11-6.7-22.9-6.7-35.4c0-53 43-96 96-96c9.1 0 17.8 1.3 26.2 3.6C481.1 102.1 378.6 32 256 32C114.6 32 0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.2 .3-.4 .5-.6 .7c-.3 .3-.5 .5-.6 .7l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zm72.6-32c-17.7 30.6-7.2 69.7 23.4 87.4s69.7 7.2 87.4-23.4c1.5-2.6 2.8-5.3 3.9-8l73.3 0c1.1 2.7 2.4 5.4 3.9 8c17.7 30.6 56.8 41.1 87.4 23.4s41.1-56.8 23.4-87.4c-13.4-23.2-39.1-34.8-64-31.4l-17.6-30.7c-11 11.7-25 20.6-40.6 25.6l16.5 28.9c-3.8 4.8-6.8 10-9 15.6l-73.4 0c-2.2-5.6-5.3-10.8-9-15.6l33-57.7c4.1 .8 8.4 1.3 12.8 1.3c35.3 0 64-28.7 64-64s-28.7-64-64-64s-64 28.7-64 64c0 13.4 4.1 25.8 11.2 36.1l-34.6 60.5c-25-3.4-50.6 8.3-64 31.4z\"]\n};\nconst faHouseMedical = {\n  prefix: 'fas',\n  iconName: 'house-medical',\n  icon: [576, 512, [], \"e3b2\", \"M543.8 287.6c17 0 32-14 32-32.1c1-9-3-17-11-24L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 160.4c0 35.3 28.7 64 64 64l320.4 0c35.5 0 64.2-28.8 64-64.3l-.7-160.2 32 0zM256 208c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z\"]\n};\nconst faGolfBallTee = {\n  prefix: 'fas',\n  iconName: 'golf-ball-tee',\n  icon: [384, 512, [\"golf-ball\"], \"f450\", \"M384 192c0 66.8-34.1 125.6-85.8 160L85.8 352C34.1 317.6 0 258.8 0 192C0 86 86 0 192 0S384 86 384 192zM242.1 256.6c0 18.5-15 33.5-33.5 33.5c-4.9 0-9.1 5.1-5.4 8.4c5.9 5.2 13.7 8.4 22.1 8.4c18.5 0 33.5-15 33.5-33.5c0-8.5-3.2-16.2-8.4-22.1c-3.3-3.7-8.4 .5-8.4 5.4zm-52.3-49.3c-4.9 0-9.1 5.1-5.4 8.4c5.9 5.2 13.7 8.4 22.1 8.4c18.5 0 33.5-15 33.5-33.5c0-8.5-3.2-16.2-8.4-22.1c-3.3-3.7-8.4 .5-8.4 5.4c0 18.5-15 33.5-33.5 33.5zm113.5-17.5c0 18.5-15 33.5-33.5 33.5c-4.9 0-9.1 5.1-5.4 8.4c5.9 5.2 13.7 8.4 22.1 8.4c18.5 0 33.5-15 33.5-33.5c0-8.5-3.2-16.2-8.4-22.1c-3.3-3.7-8.4 .5-8.4 5.4zM96 416c0-17.7 14.3-32 32-32l64 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0c-8.8 0-16 7.2-16 16l0 16c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-16c0-8.8-7.2-16-16-16l-16 0c-17.7 0-32-14.3-32-32z\"]\n};\nconst faGolfBall = faGolfBallTee;\nconst faCircleChevronLeft = {\n  prefix: 'fas',\n  iconName: 'circle-chevron-left',\n  icon: [512, 512, [\"chevron-circle-left\"], \"f137\", \"M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87 87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9L271 135z\"]\n};\nconst faChevronCircleLeft = faCircleChevronLeft;\nconst faHouseChimneyWindow = {\n  prefix: 'fas',\n  iconName: 'house-chimney-window',\n  icon: [576, 512, [], \"e00d\", \"M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c.2 35.5-28.5 64.3-64 64.3l-320.4 0c-35.3 0-64-28.7-64-64l0-160.4-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L416 100.7 416 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 121 52.8 46.4c8 7 12 15 11 24zM248 192c-13.3 0-24 10.7-24 24l0 80c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-80c0-13.3-10.7-24-24-24l-80 0z\"]\n};\nconst faPenNib = {\n  prefix: 'fas',\n  iconName: 'pen-nib',\n  icon: [512, 512, [10001], \"f5ad\", \"M368.4 18.3L312.7 74.1 437.9 199.3l55.7-55.7c21.9-21.9 21.9-57.3 0-79.2L447.6 18.3c-21.9-21.9-57.3-21.9-79.2 0zM288 94.6l-9.2 2.8L134.7 140.6c-19.9 6-35.7 21.2-42.3 41L3.8 445.8c-3.8 11.3-1 23.9 7.3 32.4L164.7 324.7c-3-6.3-4.7-13.3-4.7-20.7c0-26.5 21.5-48 48-48s48 21.5 48 48s-21.5 48-48 48c-7.4 0-14.4-1.7-20.7-4.7L33.7 500.9c8.6 8.3 21.1 11.2 32.4 7.3l264.3-88.6c19.7-6.6 35-22.4 41-42.3l43.2-144.1 2.7-9.2L288 94.6z\"]\n};\nconst faTentArrowTurnLeft = {\n  prefix: 'fas',\n  iconName: 'tent-arrow-turn-left',\n  icon: [576, 512, [], \"e580\", \"M120.1 41.8c9.9-8.9 10.7-24 1.8-33.9S97.8-2.7 87.9 6.2l-80 72C2.9 82.7 0 89.2 0 96s2.9 13.3 7.9 17.8l80 72c9.9 8.9 25 8.1 33.9-1.8s8.1-25-1.8-33.9L86.5 120 456 120c39.8 0 72 32.2 72 72l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40c0-66.3-53.7-120-120-120L86.5 72l33.5-30.2zM307.4 166.5c-11.5-8.7-27.3-8.7-38.8 0l-168 128c-6.6 5-11 12.5-12.3 20.7l-24 160c-1.4 9.2 1.3 18.6 7.4 25.6S86.7 512 96 512l144 0 16 0c17.7 0 32-14.3 32-32l0-118.1c0-5.5 4.4-9.9 9.9-9.9c3.7 0 7.2 2.1 8.8 5.5l68.4 136.8c5.4 10.8 16.5 17.7 28.6 17.7l60.2 0 16 0c9.3 0 18.2-4.1 24.2-11.1s8.8-16.4 7.4-25.6l-24-160c-1.2-8.2-5.6-15.7-12.3-20.7l-168-128z\"]\n};\nconst faTents = {\n  prefix: 'fas',\n  iconName: 'tents',\n  icon: [640, 512, [], \"e582\", \"M396.6 6.5L235.8 129.1c9.6 1.8 18.9 5.8 27 12l168 128c13.2 10.1 22 24.9 24.5 41.4l6.2 41.5L608 352c9.3 0 18.2-4.1 24.2-11.1s8.8-16.4 7.4-25.6l-24-160c-1.2-8.2-5.6-15.7-12.3-20.7l-168-128c-11.5-8.7-27.3-8.7-38.8 0zm-153.2 160c-11.5-8.7-27.3-8.7-38.8 0l-168 128c-6.6 5-11 12.5-12.3 20.7l-24 160c-1.4 9.2 1.3 18.6 7.4 25.6S22.7 512 32 512l144 0 16 0c17.7 0 32-14.3 32-32l0-118.1c0-5.5 4.4-9.9 9.9-9.9c3.7 0 7.2 2.1 8.8 5.5l68.4 136.8c5.4 10.8 16.5 17.7 28.6 17.7l60.2 0 16 0c9.3 0 18.2-4.1 24.2-11.1s8.8-16.4 7.4-25.6l-24-160c-1.2-8.2-5.6-15.7-12.3-20.7l-168-128z\"]\n};\nconst faWandMagic = {\n  prefix: 'fas',\n  iconName: 'wand-magic',\n  icon: [512, 512, [\"magic\"], \"f0d0\", \"M14.1 463.3c-18.7-18.7-18.7-49.1 0-67.9L395.4 14.1c18.7-18.7 49.1-18.7 67.9 0l34.6 34.6c18.7 18.7 18.7 49.1 0 67.9L116.5 497.9c-18.7 18.7-49.1 18.7-67.9 0L14.1 463.3zM347.6 187.6l105-105L429.4 59.3l-105 105 23.3 23.3z\"]\n};\nconst faMagic = faWandMagic;\nconst faDog = {\n  prefix: 'fas',\n  iconName: 'dog',\n  icon: [576, 512, [128021], \"f6d3\", \"M309.6 158.5L332.7 19.8C334.6 8.4 344.5 0 356.1 0c7.5 0 14.5 3.5 19 9.5L392 32l52.1 0c12.7 0 24.9 5.1 33.9 14.1L496 64l56 0c13.3 0 24 10.7 24 24l0 24c0 44.2-35.8 80-80 80l-32 0-16 0-21.3 0-5.1 30.5-112-64zM416 256.1L416 480c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-115.2c-24 12.3-51.2 19.2-80 19.2s-56-6.9-80-19.2L160 480c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-230.2c-28.8-10.9-51.4-35.3-59.2-66.5L1 167.8c-4.3-17.1 6.1-34.5 23.3-38.8s34.5 6.1 38.8 23.3l3.9 15.5C70.5 182 83.3 192 98 192l30 0 16 0 159.8 0L416 256.1zM464 80a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z\"]\n};\nconst faCarrot = {\n  prefix: 'fas',\n  iconName: 'carrot',\n  icon: [512, 512, [129365], \"f787\", \"M346.7 6C337.6 17 320 42.3 320 72c0 40 15.3 55.3 40 80s40 40 80 40c29.7 0 55-17.6 66-26.7c4-3.3 6-8.2 6-13.3s-2-10-6-13.2c-11.4-9.1-38.3-26.8-74-26.8c-32 0-40 8-40 8s8-8 8-40c0-35.7-17.7-62.6-26.8-74C370 2 365.1 0 360 0s-10 2-13.3 6zM244.6 136c-40 0-77.1 18.1-101.7 48.2l60.5 60.5c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0l-55.3-55.3 0 .1L2.2 477.9C-2 487-.1 497.8 7 505s17.9 9 27.1 4.8l134.7-62.4-52.1-52.1c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L199.7 433l100.2-46.4c46.4-21.5 76.2-68 76.2-119.2C376 194.8 317.2 136 244.6 136z\"]\n};\nconst faMoon = {\n  prefix: 'fas',\n  iconName: 'moon',\n  icon: [384, 512, [127769, 9214], \"f186\", \"M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z\"]\n};\nconst faWineGlassEmpty = {\n  prefix: 'fas',\n  iconName: 'wine-glass-empty',\n  icon: [320, 512, [\"wine-glass-alt\"], \"f5ce\", \"M64 0C47.4 0 33.5 12.8 32.1 29.3l-14 168.4c-6 72 42.5 135.2 109.9 150.6l0 99.6-48 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0 80 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-48 0 0-99.6c67.4-15.4 115.9-78.6 109.9-150.6l-14-168.4C286.5 12.8 272.6 0 256 0L64 0zM81.9 203.1L93.4 64l133.1 0 11.6 139.1C242 248.8 205.9 288 160 288s-82-39.2-78.1-84.9z\"]\n};\nconst faWineGlassAlt = faWineGlassEmpty;\nconst faCheese = {\n  prefix: 'fas',\n  iconName: 'cheese',\n  icon: [512, 512, [], \"f7ef\", \"M512 240.2l0 15.8L0 256c0-20 10-38.7 26.6-49.8L274.9 40.7c8.6-5.7 18.6-8.7 28.9-8.7C418.8 32 512 125.2 512 240.2zm0 47.8l0 128c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 288l512 0z\"]\n};\nconst faYinYang = {\n  prefix: 'fas',\n  iconName: 'yin-yang',\n  icon: [512, 512, [9775], \"f6ad\", \"M256 64c53 0 96 43 96 96s-43 96-96 96s-96 43-96 96s43 96 96 96C150 448 64 362 64 256S150 64 256 64zm0 448A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm32-352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faMusic = {\n  prefix: 'fas',\n  iconName: 'music',\n  icon: [512, 512, [127925], \"f001\", \"M499.1 6.3c8.1 6 12.9 15.6 12.9 25.7l0 72 0 264c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L448 147 192 223.8 192 432c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L128 200l0-72c0-14.1 9.3-26.6 22.8-30.7l320-96c9.7-2.9 20.2-1.1 28.3 5z\"]\n};\nconst faCodeCommit = {\n  prefix: 'fas',\n  iconName: 'code-commit',\n  icon: [640, 512, [], \"f386\", \"M320 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160zm156.8-48C462 361 397.4 416 320 416s-142-55-156.8-128L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l131.2 0C178 151 242.6 96 320 96s142 55 156.8 128L608 224c17.7 0 32 14.3 32 32s-14.3 32-32 32l-131.2 0z\"]\n};\nconst faTemperatureLow = {\n  prefix: 'fas',\n  iconName: 'temperature-low',\n  icon: [512, 512, [], \"f76b\", \"M448 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM320 96a96 96 0 1 1 192 0A96 96 0 1 1 320 96zM144 64c-26.5 0-48 21.5-48 48l0 164.5c0 17.3-7.1 31.9-15.3 42.5C70.2 332.6 64 349.5 64 368c0 44.2 35.8 80 80 80s80-35.8 80-80c0-18.5-6.2-35.4-16.7-48.9c-8.2-10.6-15.3-25.2-15.3-42.5L192 112c0-26.5-21.5-48-48-48zM32 112C32 50.2 82.1 0 144 0s112 50.1 112 112l0 164.4c0 .1 .1 .3 .2 .6c.2 .6 .8 1.6 1.7 2.8c18.9 24.4 30.1 55 30.1 88.1c0 79.5-64.5 144-144 144S0 447.5 0 368c0-33.2 11.2-63.8 30.1-88.1c.9-1.2 1.5-2.2 1.7-2.8c.1-.3 .2-.5 .2-.6L32 112zM192 368c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-20.9 13.4-38.7 32-45.3l0-50.7c0-8.8 7.2-16 16-16s16 7.2 16 16l0 50.7c18.6 6.6 32 24.4 32 45.3z\"]\n};\nconst faPersonBiking = {\n  prefix: 'fas',\n  iconName: 'person-biking',\n  icon: [640, 512, [128692, \"biking\"], \"f84a\", \"M400 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm27.2 64l-61.8-48.8c-17.3-13.6-41.7-13.8-59.1-.3l-83.1 64.2c-30.7 23.8-28.5 70.8 4.3 91.6L288 305.1 288 416c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128c0-10.7-5.3-20.7-14.2-26.6L295 232.9l60.3-48.5L396 217c5.7 4.5 12.7 7 20 7l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-52.8 0zM56 384a72 72 0 1 1 144 0A72 72 0 1 1 56 384zm200 0A128 128 0 1 0 0 384a128 128 0 1 0 256 0zm184 0a72 72 0 1 1 144 0 72 72 0 1 1 -144 0zm200 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z\"]\n};\nconst faBiking = faPersonBiking;\nconst faBroom = {\n  prefix: 'fas',\n  iconName: 'broom',\n  icon: [576, 512, [129529], \"f51a\", \"M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6c-12.5 0-22.6 10.1-22.6 22.6l0 29.1L364.3 320l29.1 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8C76.5 307.5 64 337.7 64 369.2c0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9C0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8c30.6-30.6 45.9-73.1 42.3-115.8z\"]\n};\nconst faShieldHeart = {\n  prefix: 'fas',\n  iconName: 'shield-heart',\n  icon: [512, 512, [], \"e574\", \"M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM144 221.3c0-33.8 27.4-61.3 61.3-61.3c16.2 0 31.8 6.5 43.3 17.9l7.4 7.4 7.4-7.4c11.5-11.5 27.1-17.9 43.3-17.9c33.8 0 61.3 27.4 61.3 61.3c0 16.2-6.5 31.8-17.9 43.3l-82.7 82.7c-6.2 6.2-16.4 6.2-22.6 0l-82.7-82.7c-11.5-11.5-17.9-27.1-17.9-43.3z\"]\n};\nconst faGopuram = {\n  prefix: 'fas',\n  iconName: 'gopuram',\n  icon: [512, 512, [], \"f664\", \"M120 0c13.3 0 24 10.7 24 24l0 8 40 0 0-8c0-13.3 10.7-24 24-24s24 10.7 24 24l0 8 48 0 0-8c0-13.3 10.7-24 24-24s24 10.7 24 24l0 8 40 0 0-8c0-13.3 10.7-24 24-24s24 10.7 24 24l0 8 0 32 0 64c17.7 0 32 14.3 32 32l0 64c17.7 0 32 14.3 32 32l0 96c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-64 0 0-160-32 0 0-128-32 0 0-96-32 0 0 96 32 0 0 128 32 0 0 160-80 0 0-48c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 48-80 0 0-160 32 0 0-128 32 0 0-96-32 0 0 96-32 0 0 128-32 0 0 160-64 0c-17.7 0-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32l0-96c0-17.7 14.3-32 32-32l0-64c0-17.7 14.3-32 32-32l0-64 0-32 0-8c0-13.3 10.7-24 24-24zM256 272c-17.7 0-32 14.3-32 32l0 48 64 0 0-48c0-17.7-14.3-32-32-32zm-32-80l0 32 64 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32z\"]\n};\nconst faEarthOceania = {\n  prefix: 'fas',\n  iconName: 'earth-oceania',\n  icon: [512, 512, [\"globe-oceania\"], \"e47b\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM208.6 357.3l-39-13.5c-6.5-2.2-13.6-2.3-20.1-.3l-15.3 4.9c-18.5 5.9-38.5-2.4-47.5-19.5l-3.3-6.2c-10.6-20.1-2.3-45 18.2-54.7l35.3-16.8c2.3-1.1 4.4-2.8 5.9-4.8l5.3-7c7.2-9.6 18.6-15.3 30.6-15.3s23.4 5.7 30.6 15.3l4.6 6.1c2 2.6 4.9 4.5 8.1 5.1c7.8 1.6 15.7-1.5 20.4-7.9l10.4-14.2c2-2.8 5.3-4.4 8.7-4.4c4.4 0 8.4 2.7 10 6.8l10.1 25.9c2.8 7.2 6.7 14 11.5 20.2L311 299.8c5.8 7.4 9 16.6 9 26s-3.2 18.6-9 26L299 367.2c-8.3 10.6-21 16.8-34.4 16.8c-8.4 0-16.6-2.4-23.7-7l-25.4-16.4c-2.2-1.4-4.5-2.5-6.9-3.4zm65.2-214.8L296 164.7c10.1 10.1 2.9 27.3-11.3 27.3l-29.9 0c-5.6 0-11.1-1.2-16.2-3.4l-42.8-19c-14.3-6.3-11.9-27.3 3.4-30.3l38.5-7.7c13.1-2.6 26.7 1.5 36.1 10.9zM248 432c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16zM431.2 298.9l8 24c2.8 8.4-1.7 17.4-10.1 20.2s-17.4-1.7-20.2-10.1l-8-24c-2.8-8.4 1.7-17.4 10.1-20.2s17.4 1.7 20.2 10.1zm-19.9 80.4l-32 32c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l32-32c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z\"]\n};\nconst faGlobeOceania = faEarthOceania;\nconst faSquareXmark = {\n  prefix: 'fas',\n  iconName: 'square-xmark',\n  icon: [448, 512, [10062, \"times-square\", \"xmark-square\"], \"f2d3\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm79 143c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z\"]\n};\nconst faTimesSquare = faSquareXmark;\nconst faXmarkSquare = faSquareXmark;\nconst faHashtag = {\n  prefix: 'fas',\n  iconName: 'hashtag',\n  icon: [448, 512, [62098], \"23\", \"M181.3 32.4c17.4 2.9 29.2 19.4 26.3 36.8L197.8 128l95.1 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3s29.2 19.4 26.3 36.8L357.8 128l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0L325.8 320l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8l9.8-58.7-95.1 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8L90.2 384 32 384c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 21.3-128L64 192c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3zM187.1 192L165.8 320l95.1 0 21.3-128-95.1 0z\"]\n};\nconst faUpRightAndDownLeftFromCenter = {\n  prefix: 'fas',\n  iconName: 'up-right-and-down-left-from-center',\n  icon: [512, 512, [\"expand-alt\"], \"f424\", \"M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z\"]\n};\nconst faExpandAlt = faUpRightAndDownLeftFromCenter;\nconst faOilCan = {\n  prefix: 'fas',\n  iconName: 'oil-can',\n  icon: [640, 512, [], \"f613\", \"M320 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 32-80 0-48 0-48 0c-26.5 0-48 21.5-48 48l0 64.8c0 19 11.2 36.2 28.5 43.9l67.5 30L96 368c0 26.5 21.5 48 48 48l259.1 0c18.4 0 35.8-7.9 48-21.7L633.5 187.7c12.3-13.9-.3-35.4-18.4-31.5L448 192l-50.5-25.2c-8.9-4.4-18.7-6.8-28.6-6.8L288 160l0-32 32 0zM96 208l0 86.1L48 272.8 48 208l48 0z\"]\n};\nconst faT = {\n  prefix: 'fas',\n  iconName: 't',\n  icon: [384, 512, [116], \"54\", \"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l128 0 0 352c0 17.7 14.3 32 32 32s32-14.3 32-32l0-352 128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 32 32 32z\"]\n};\nconst faHippo = {\n  prefix: 'fas',\n  iconName: 'hippo',\n  icon: [640, 512, [129435], \"f6ed\", \"M407 47c9.4-9.4 24.6-9.4 33.9 0l17.2 17.2c1.9-.1 3.9-.2 5.8-.2l32 0c11.2 0 21.9 2.3 31.6 6.5L543 55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L564 101.9c7.6 12.2 12 26.7 12 42.1c0 10.2 7.4 18.8 16.7 23c27.9 12.5 47.3 40.5 47.3 73c0 26.2-12.6 49.4-32 64l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-16-64 0 0 16c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-17.6c-11.8-2.4-22.7-7.4-32-14.4c-1.5-1.1-2.9-2.3-4.3-3.5c-17-14.7-27.7-36.4-27.7-60.5c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 44.7 26.2 83.2 64 101.2l0 10.8c0 17.7 14.3 32 32 32l32 0 0 64c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-76c-19.8 7.7-41.4 12-64 12s-44.2-4.3-64-12l0 76c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-118.9L45.9 369.7c-5.4 12.1-19.6 17.6-31.7 12.2S-3.3 362.4 2.1 350.3L24 300.9c5.3-11.9 8-24.7 8-37.7C32 155.7 117.2 68 223.8 64.1l.2-.1 7.2 0L256 64l32 0c41.7 0 83.4 12.1 117.2 25.7c1.7-1.8 3.5-3.6 5.3-5.2L407 81c-9.4-9.4-9.4-24.6 0-33.9zm73 185a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm88 24a24 24 0 1 0 0-48 24 24 0 1 0 0 48zM480 144a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm48 16a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faChartColumn = {\n  prefix: 'fas',\n  iconName: 'chart-column',\n  icon: [512, 512, [], \"e0e3\", \"M32 32c17.7 0 32 14.3 32 32l0 336c0 8.8 7.2 16 16 16l400 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L80 480c-44.2 0-80-35.8-80-80L0 64C0 46.3 14.3 32 32 32zM160 224c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32zm128-64l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-160c0-17.7 14.3-32 32-32s32 14.3 32 32zm64 32c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32zM480 96l0 224c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-224c0-17.7 14.3-32 32-32s32 14.3 32 32z\"]\n};\nconst faInfinity = {\n  prefix: 'fas',\n  iconName: 'infinity',\n  icon: [640, 512, [8734, 9854], \"f534\", \"M0 241.1C0 161 65 96 145.1 96c38.5 0 75.4 15.3 102.6 42.5L320 210.7l72.2-72.2C419.5 111.3 456.4 96 494.9 96C575 96 640 161 640 241.1l0 29.7C640 351 575 416 494.9 416c-38.5 0-75.4-15.3-102.6-42.5L320 301.3l-72.2 72.2C220.5 400.7 183.6 416 145.1 416C65 416 0 351 0 270.9l0-29.7zM274.7 256l-72.2-72.2c-15.2-15.2-35.9-23.8-57.4-23.8C100.3 160 64 196.3 64 241.1l0 29.7c0 44.8 36.3 81.1 81.1 81.1c21.5 0 42.2-8.5 57.4-23.8L274.7 256zm90.5 0l72.2 72.2c15.2 15.2 35.9 23.8 57.4 23.8c44.8 0 81.1-36.3 81.1-81.1l0-29.7c0-44.8-36.3-81.1-81.1-81.1c-21.5 0-42.2 8.5-57.4 23.8L365.3 256z\"]\n};\nconst faVialCircleCheck = {\n  prefix: 'fas',\n  iconName: 'vial-circle-check',\n  icon: [512, 512, [], \"e596\", \"M0 64C0 46.3 14.3 32 32 32l64 0 64 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 170.8c-20.2 28.6-32 63.5-32 101.2c0 25.2 5.3 49.1 14.8 70.8C189.5 463.7 160.6 480 128 480c-53 0-96-43-96-96L32 96C14.3 96 0 81.7 0 64zM96 96l0 96 64 0 0-96L96 96zM224 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L352 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z\"]\n};\nconst faPersonArrowDownToLine = {\n  prefix: 'fas',\n  iconName: 'person-arrow-down-to-line',\n  icon: [640, 512, [], \"e538\", \"M192 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-8 352l0-96 16 0 0 96-16 0zm-64 0l-88 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l120 0 80 0 376 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-344 0 0-191.1 28.6 47.5c9.1 15.1 28.8 20 43.9 10.9s20-28.8 10.9-43.9l-58.3-97c-17.4-28.9-48.6-46.6-82.3-46.6l-29.7 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9L120 256.9 120 448zM464 64l0 242.7-25.4-25.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l80 80c12.5 12.5 32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L528 306.7 528 64c0-17.7-14.3-32-32-32s-32 14.3-32 32z\"]\n};\nconst faVoicemail = {\n  prefix: 'fas',\n  iconName: 'voicemail',\n  icon: [640, 512, [], \"f897\", \"M144 320a80 80 0 1 1 0-160 80 80 0 1 1 0 160zm119.8 0c15.3-22.9 24.2-50.4 24.2-80c0-79.5-64.5-144-144-144S0 160.5 0 240s64.5 144 144 144l352 0c79.5 0 144-64.5 144-144s-64.5-144-144-144s-144 64.5-144 144c0 29.6 8.9 57.1 24.2 80l-112.5 0zM496 160a80 80 0 1 1 0 160 80 80 0 1 1 0-160z\"]\n};\nconst faFan = {\n  prefix: 'fas',\n  iconName: 'fan',\n  icon: [512, 512, [], \"f863\", \"M258.6 0c-1.7 0-3.4 .1-5.1 .5C168 17 115.6 102.3 130.5 189.3c2.9 17 8.4 32.9 15.9 47.4L32 224l-2.6 0C13.2 224 0 237.2 0 253.4c0 1.7 .1 3.4 .5 5.1C17 344 102.3 396.4 189.3 381.5c17-2.9 32.9-8.4 47.4-15.9L224 480l0 2.6c0 16.2 13.2 29.4 29.4 29.4c1.7 0 3.4-.1 5.1-.5C344 495 396.4 409.7 381.5 322.7c-2.9-17-8.4-32.9-15.9-47.4L480 288l2.6 0c16.2 0 29.4-13.2 29.4-29.4c0-1.7-.1-3.4-.5-5.1C495 168 409.7 115.6 322.7 130.5c-17 2.9-32.9 8.4-47.4 15.9L288 32l0-2.6C288 13.2 274.8 0 258.6 0zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faPersonWalkingLuggage = {\n  prefix: 'fas',\n  iconName: 'person-walking-luggage',\n  icon: [576, 512, [], \"e554\", \"M432 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM347.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L505 232.7l-15.3-36.8C472.5 154.8 432.3 128 387.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1l-25 62.4-59.4 59.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L340.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM256 274.1c-7.7-4.4-17.4-1.8-21.9 5.9l-32 55.4L147.7 304c-15.3-8.8-34.9-3.6-43.7 11.7L40 426.6c-8.8 15.3-3.6 34.9 11.7 43.7l55.4 32c15.3 8.8 34.9 3.6 43.7-11.7l64-110.9c1.5-2.6 2.6-5.2 3.3-8L261.9 296c4.4-7.7 1.8-17.4-5.9-21.9z\"]\n};\nconst faUpDown = {\n  prefix: 'fas',\n  iconName: 'up-down',\n  icon: [256, 512, [8597, 11021, \"arrows-alt-v\"], \"f338\", \"M145.6 7.7C141 2.8 134.7 0 128 0s-13 2.8-17.6 7.7l-104 112c-6.5 7-8.2 17.2-4.4 25.9S14.5 160 24 160l56 0 0 192-56 0c-9.5 0-18.2 5.7-22 14.4s-2.1 18.9 4.4 25.9l104 112c4.5 4.9 10.9 7.7 17.6 7.7s13-2.8 17.6-7.7l104-112c6.5-7 8.2-17.2 4.4-25.9s-12.5-14.4-22-14.4l-56 0 0-192 56 0c9.5 0 18.2-5.7 22-14.4s2.1-18.9-4.4-25.9l-104-112z\"]\n};\nconst faArrowsAltV = faUpDown;\nconst faCloudMoonRain = {\n  prefix: 'fas',\n  iconName: 'cloud-moon-rain',\n  icon: [576, 512, [], \"f73c\", \"M481.2 0C417 0 363.5 46.5 353.7 107.6c35.4 17.6 60.2 53.3 62.1 95.1c23.2 11 42 29.7 53.1 52.7c4 .4 8.1 .6 12.3 .6c34.9 0 66.7-13.8 89.9-36.1c5.1-4.9 6.4-12.5 3.2-18.7s-10.1-9.7-17-8.6c-4.9 .8-10 1.3-15.2 1.3c-49 0-88.4-39.3-88.4-87.4c0-32.6 18-61.1 44.9-76.1c6.1-3.4 9.3-10.5 7.8-17.4s-7.3-12-14.3-12.6c-3.6-.3-7.3-.5-10.9-.5zM367.9 383.9c44.2 0 80-35.8 80-80c0-39.3-28.4-72.1-65.8-78.7c1.2-5.6 1.9-11.3 1.9-17.2c0-44.2-35.8-80-80-80c-17 0-32.8 5.3-45.8 14.4C241.3 114.6 210.8 96 176 96c-53 0-96 43-96 96l0 1.3c-45.4 7.6-80 47.1-80 94.6c0 53 43 96 96 96l271.9 0zM85.4 420.1c-11-7.4-25.9-4.4-33.3 6.7l-32 48c-7.4 11-4.4 25.9 6.7 33.3s25.9 4.4 33.3-6.7l32-48c7.4-11 4.4-25.9-6.7-33.3zm96 0c-11-7.4-25.9-4.4-33.3 6.7l-32 48c-7.4 11-4.4 25.9 6.7 33.3s25.9 4.4 33.3-6.7l32-48c7.4-11 4.4-25.9-6.7-33.3zm96 0c-11-7.4-25.9-4.4-33.3 6.7l-32 48c-7.4 11-4.4 25.9 6.7 33.3s25.9 4.4 33.3-6.7l32-48c7.4-11 4.4-25.9-6.7-33.3zm96 0c-11-7.4-25.9-4.4-33.3 6.7l-32 48c-7.4 11-4.4 25.9 6.7 33.3s25.9 4.4 33.3-6.7l32-48c7.4-11 4.4-25.9-6.7-33.3z\"]\n};\nconst faCalendar = {\n  prefix: 'fas',\n  iconName: 'calendar',\n  icon: [448, 512, [128197, 128198], \"f133\", \"M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z\"]\n};\nconst faTrailer = {\n  prefix: 'fas',\n  iconName: 'trailer',\n  icon: [640, 512, [], \"e041\", \"M48 32C21.5 32 0 53.5 0 80L0 336c0 26.5 21.5 48 48 48l17.1 0c7.8-54.3 54.4-96 110.9-96s103.1 41.7 110.9 96L488 384l8 0 112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-240c0-26.5-21.5-48-48-48L48 32zM80 96c8.8 0 16 7.2 16 16l0 131.2c-11.4 5.9-22.2 12.9-32 21L64 112c0-8.8 7.2-16 16-16zm96 128c-5.4 0-10.7 .2-16 .7L160 112c0-8.8 7.2-16 16-16s16 7.2 16 16l0 112.7c-5.3-.5-10.6-.7-16-.7zm80 19.2L256 112c0-8.8 7.2-16 16-16s16 7.2 16 16l0 152.2c-9.8-8.1-20.6-15.2-32-21zM368 96c8.8 0 16 7.2 16 16l0 192c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-192c0-8.8 7.2-16 16-16zm112 16l0 192c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-192c0-8.8 7.2-16 16-16s16 7.2 16 16zM176 480a80 80 0 1 0 0-160 80 80 0 1 0 0 160zm0-112a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faBahai = {\n  prefix: 'fas',\n  iconName: 'bahai',\n  icon: [576, 512, [\"haykal\"], \"f666\", \"M288 0c14.5 0 27.2 9.7 30.9 23.8l23.9 89.6 75.9-53.3c11.9-8.3 27.8-7.6 39 1.7s14.6 24.9 8.4 38.1l-39.3 84 92.4 8c14.4 1.2 26.2 12 28.8 26.3s-4.9 28.5-18 34.6l-84.1 39.1 65.7 65.5c10.3 10.2 12.4 26.1 5.1 38.7s-22 18.7-36 14.9L391 386.8l8.2 92.4c1.3 14.4-7.3 27.9-20.9 32.9s-28.9 .1-37.2-11.7l-53.1-76-53.1 76c-8.3 11.9-23.6 16.7-37.2 11.7s-22.2-18.5-20.9-32.9l8.2-92.4L95.4 410.9c-14 3.8-28.8-2.3-36-14.9s-5.2-28.4 5.1-38.7l65.7-65.5L46 252.7c-13.1-6.1-20.5-20.3-18-34.6s14.3-25.1 28.8-26.3l92.4-8-39.3-84c-6.1-13.1-2.7-28.8 8.4-38.1s27.1-10 39-1.7l75.9 53.3 23.9-89.6C260.8 9.7 273.5 0 288 0zm0 156.2l-4.8 18c-2.7 10.1-10.2 18.2-20 21.8s-20.8 2.1-29.3-3.9l-15.2-10.7 7.9 16.8c4.4 9.5 4 20.5-1.3 29.6s-14.5 15-25 15.9l-18.5 1.6 16.8 7.8c9.5 4.4 16.2 13.2 18 23.5s-1.5 20.8-8.9 28.2l-13.2 13.1 17.9-4.8c10.1-2.7 20.9-.3 28.9 6.4s12.2 16.9 11.3 27.3l-1.6 18.5 10.6-15.2c6-8.6 15.8-13.7 26.2-13.7s20.2 5.1 26.2 13.7l10.6 15.2-1.6-18.5c-.9-10.4 3.3-20.6 11.3-27.3s18.8-9.1 28.9-6.4l17.9 4.8-13.2-13.1c-7.4-7.4-10.7-17.9-8.9-28.2s8.5-19.1 18-23.5l16.8-7.8-18.5-1.6c-10.4-.9-19.7-6.8-25-15.9s-5.7-20.1-1.3-29.6l7.9-16.8-15.2 10.7c-8.6 6-19.5 7.5-29.3 3.9s-17.3-11.7-20-21.8l-4.8-18z\"]\n};\nconst faHaykal = faBahai;\nconst faSdCard = {\n  prefix: 'fas',\n  iconName: 'sd-card',\n  icon: [384, 512, [], \"f7c2\", \"M320 0L141.3 0C124.3 0 108 6.7 96 18.7L18.7 96C6.7 108 0 124.3 0 141.3L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64zM160 88l0 48c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-48c0-13.3 10.7-24 24-24s24 10.7 24 24zm80 0l0 48c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-48c0-13.3 10.7-24 24-24s24 10.7 24 24zm80 0l0 48c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-48c0-13.3 10.7-24 24-24s24 10.7 24 24z\"]\n};\nconst faDragon = {\n  prefix: 'fas',\n  iconName: 'dragon',\n  icon: [640, 512, [128009], \"f6d5\", \"M352 124.5l-51.9-13c-6.5-1.6-11.3-7.1-12-13.8s2.8-13.1 8.7-16.1l40.8-20.4L294.4 28.8c-5.5-4.1-7.8-11.3-5.6-17.9S297.1 0 304 0L416 0l32 0 16 0c30.2 0 58.7 14.2 76.8 38.4l57.6 76.8c6.2 8.3 9.6 18.4 9.6 28.8c0 26.5-21.5 48-48 48l-21.5 0c-17 0-33.3-6.7-45.3-18.7L480 160l-32 0 0 21.5c0 24.8 12.8 47.9 33.8 61.1l106.6 66.6c32.1 20.1 51.6 55.2 51.6 93.1C640 462.9 590.9 512 530.2 512L496 512l-64 0L32.3 512c-3.3 0-6.6-.4-9.6-1.4C13.5 507.8 6 501 2.4 492.1C1 488.7 .2 485.2 0 481.4c-.2-3.7 .3-7.3 1.3-10.7c2.8-9.2 9.6-16.7 18.6-20.4c3-1.2 6.2-2 9.5-2.2L433.3 412c8.3-.7 14.7-7.7 14.7-16.1c0-4.3-1.7-8.4-4.7-11.4l-44.4-44.4c-30-30-46.9-70.7-46.9-113.1l0-45.5 0-57zM512 72.3c0-.1 0-.2 0-.3s0-.2 0-.3l0 .6zm-1.3 7.4L464.3 68.1c-.2 1.3-.3 2.6-.3 3.9c0 13.3 10.7 24 24 24c10.6 0 19.5-6.8 22.7-16.3zM130.9 116.5c16.3-14.5 40.4-16.2 58.5-4.1l130.6 87 0 27.5c0 32.8 8.4 64.8 24 93l-232 0c-6.7 0-12.7-4.2-15-10.4s-.5-13.3 4.6-17.7L171 232.3 18.4 255.8c-7 1.1-13.9-2.6-16.9-9s-1.5-14.1 3.8-18.8L130.9 116.5z\"]\n};\nconst faShoePrints = {\n  prefix: 'fas',\n  iconName: 'shoe-prints',\n  icon: [640, 512, [], \"f54b\", \"M416 0C352.3 0 256 32 256 32l0 128c48 0 76 16 104 32s56 32 104 32c56.4 0 176-16 176-96S512 0 416 0zM128 96c0 35.3 28.7 64 64 64l32 0 0-128-32 0c-35.3 0-64 28.7-64 64zM288 512c96 0 224-48 224-128s-119.6-96-176-96c-48 0-76 16-104 32s-56 32-104 32l0 128s96.3 32 160 32zM0 416c0 35.3 28.7 64 64 64l32 0 0-128-32 0c-35.3 0-64 28.7-64 64z\"]\n};\nconst faCirclePlus = {\n  prefix: 'fas',\n  iconName: 'circle-plus',\n  icon: [512, 512, [\"plus-circle\"], \"f055\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z\"]\n};\nconst faPlusCircle = faCirclePlus;\nconst faFaceGrinTongueWink = {\n  prefix: 'fas',\n  iconName: 'face-grin-tongue-wink',\n  icon: [512, 512, [128540, \"grin-tongue-wink\"], \"f58b\", \"M174.5 498.8C73.1 464.7 0 368.9 0 256C0 114.6 114.6 0 256 0S512 114.6 512 256c0 112.9-73.1 208.7-174.5 242.8C346.7 484 352 466.6 352 448l0-46.9c24.3-17.5 43.6-41.6 55.4-69.6c5-11.8-7-22.5-19.3-18.7c-39.7 12.2-84.5 19-131.8 19s-92.1-6.8-131.8-19c-12.3-3.8-24.3 6.9-19.3 18.7c11.7 27.8 30.8 51.7 54.8 69.2l0 47.3c0 18.6 5.3 36 14.5 50.8zm20.7-265.2c5.3 7.1 15.3 8.5 22.4 3.2s8.5-15.3 3.2-22.4c-30.4-40.5-91.2-40.5-121.6 0c-5.3 7.1-3.9 17.1 3.2 22.4s17.1 3.9 22.4-3.2c17.6-23.5 52.8-23.5 70.4 0zM336 272a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM320 402.6l0 45.4c0 35.3-28.7 64-64 64s-64-28.7-64-64l0-45.4c0-14.7 11.9-26.6 26.6-26.6l2 0c11.3 0 21.1 7.9 23.6 18.9c2.8 12.6 20.8 12.6 23.6 0c2.5-11.1 12.3-18.9 23.6-18.9l2 0c14.7 0 26.6 11.9 26.6 26.6zM336 184a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faGrinTongueWink = faFaceGrinTongueWink;\nconst faHandHolding = {\n  prefix: 'fas',\n  iconName: 'hand-holding',\n  icon: [576, 512, [], \"f4bd\", \"M559.7 392.2c17.8-13.1 21.6-38.1 8.5-55.9s-38.1-21.6-55.9-8.5L392.6 416 272 416c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0-16 0-78.3 0c-29.1 0-57.3 9.9-80 28L68.8 384 32 384c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l160 0 160.5 0c29 0 57.3-9.3 80.7-26.5l126.6-93.3zm-367-8.2c.3 0 .6 0 .9 0c0 0 0 0 0 0c-.3 0-.6 0-.9 0z\"]\n};\nconst faPlugCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'plug-circle-exclamation',\n  icon: [576, 512, [], \"e55d\", \"M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm0-96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm0-144c8.8 0 16 7.2 16 16l0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80c0-8.8 7.2-16 16-16z\"]\n};\nconst faLinkSlash = {\n  prefix: 'fas',\n  iconName: 'link-slash',\n  icon: [640, 512, [\"chain-broken\", \"chain-slash\", \"unlink\"], \"f127\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z\"]\n};\nconst faChainBroken = faLinkSlash;\nconst faChainSlash = faLinkSlash;\nconst faUnlink = faLinkSlash;\nconst faClone = {\n  prefix: 'fas',\n  iconName: 'clone',\n  icon: [512, 512, [], \"f24d\", \"M288 448L64 448l0-224 64 0 0-64-64 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-64-64 0 0 64zm-64-96l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64z\"]\n};\nconst faPersonWalkingArrowLoopLeft = {\n  prefix: 'fas',\n  iconName: 'person-walking-arrow-loop-left',\n  icon: [640, 512, [], \"e551\", \"M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zm347.7 119c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L461.3 384l18.7 0c88.4 0 160-71.6 160-160s-71.6-160-160-160L352 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c53 0 96 43 96 96s-43 96-96 96l-18.7 0 25.4-25.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3l80 80z\"]\n};\nconst faArrowUpZA = {\n  prefix: 'fas',\n  iconName: 'arrow-up-z-a',\n  icon: [576, 512, [\"sort-alpha-up-alt\"], \"f882\", \"M183.6 42.4C177.5 35.8 169 32 160 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L128 146.3 128 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 64c0 17.7 14.3 32 32 32l50.7 0-73.4 73.4c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-50.7 0 73.4-73.4c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L352 32c-17.7 0-32 14.3-32 32zm96 192c-12.1 0-23.2 6.8-28.6 17.7l-64 128-16 32c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3l7.2-14.3 88.4 0 7.2 14.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9l-16-32-64-128C439.2 262.8 428.1 256 416 256zM395.8 400L416 359.6 436.2 400l-40.4 0z\"]\n};\nconst faSortAlphaUpAlt = faArrowUpZA;\nconst faFireFlameCurved = {\n  prefix: 'fas',\n  iconName: 'fire-flame-curved',\n  icon: [384, 512, [\"fire-alt\"], \"f7e4\", \"M153.6 29.9l16-21.3C173.6 3.2 180 0 186.7 0C198.4 0 208 9.6 208 21.3V43.5c0 13.1 5.4 25.7 14.9 34.7L307.6 159C356.4 205.6 384 270.2 384 337.7C384 434 306 512 209.7 512H192C86 512 0 426 0 320v-3.8c0-48.8 19.4-95.6 53.9-130.1l3.5-3.5c4.2-4.2 10-6.6 16-6.6C85.9 176 96 186.1 96 198.6V288c0 35.3 28.7 64 64 64s64-28.7 64-64v-3.9c0-18-7.2-35.3-19.9-48l-38.6-38.6c-24-24-37.5-56.7-37.5-90.7c0-27.7 9-54.8 25.6-76.9z\"]\n};\nconst faFireAlt = faFireFlameCurved;\nconst faTornado = {\n  prefix: 'fas',\n  iconName: 'tornado',\n  icon: [448, 512, [127786], \"f76f\", \"M0 32L0 45.6C0 62.7 1.7 79.6 5 96l352.8 0c3.2-6.9 7.5-13.3 13-18.8l38.6-38.6c4.2-4.2 6.6-10 6.6-16C416 10.1 405.9 0 393.4 0L32 0C14.3 0 0 14.3 0 32zm352.2 96L13.6 128c12.2 35.9 32.3 68.7 58.8 96L412 224l-47.2-62.9c-7.3-9.7-11.6-21.2-12.6-33.1zm-226 138.2l116.4 68.5c8.2 4.8 15.8 10.7 22.5 17.3L445 352c2-9.8 3-19.9 3-30.1c0-23-5.3-45.5-15.3-65.9l-322.5 0c5.2 3.6 10.5 7 16 10.2zM288 384c10.3 21.4 13.8 45.5 9.9 69l-5.9 35.7c-2 12.2 7.4 23.4 19.8 23.4c5.3 0 10.4-2.1 14.2-5.9l78.2-78.2c12.8-12.8 23.1-27.7 30.4-43.9L288 384z\"]\n};\nconst faFileCirclePlus = {\n  prefix: 'fas',\n  iconName: 'file-circle-plus',\n  icon: [576, 512, [58606], \"e494\", \"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zm48 96a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm16 80c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0 0-48z\"]\n};\nconst faBookQuran = {\n  prefix: 'fas',\n  iconName: 'book-quran',\n  icon: [448, 512, [\"quran\"], \"f687\", \"M352 0c53 0 96 43 96 96l0 320c0 53-43 96-96 96L64 512l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-64c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0L64 0 352 0zm0 384L96 384l0 64 256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32zM274.1 150.2l-8.9 21.4-23.1 1.9c-5.7 .5-8 7.5-3.7 11.2L256 199.8l-5.4 22.6c-1.3 5.5 4.7 9.9 9.6 6.9L280 217.2l19.8 12.1c4.9 3 10.9-1.4 9.6-6.9L304 199.8l17.6-15.1c4.3-3.7 2-10.8-3.7-11.2l-23.1-1.9-8.9-21.4c-2.2-5.3-9.6-5.3-11.8 0zM96 192c0 70.7 57.3 128 128 128c25.6 0 49.5-7.5 69.5-20.5c3.2-2.1 4.5-6.2 3.1-9.7s-5.2-5.6-9-4.8c-6.1 1.2-12.5 1.9-19 1.9c-52.4 0-94.9-42.5-94.9-94.9s42.5-94.9 94.9-94.9c6.5 0 12.8 .7 19 1.9c3.8 .8 7.5-1.3 9-4.8s.2-7.6-3.1-9.7C273.5 71.5 249.6 64 224 64C153.3 64 96 121.3 96 192z\"]\n};\nconst faQuran = faBookQuran;\nconst faAnchor = {\n  prefix: 'fas',\n  iconName: 'anchor',\n  icon: [576, 512, [9875], \"f13d\", \"M320 96a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm21.1 80C367 158.8 384 129.4 384 96c0-53-43-96-96-96s-96 43-96 96c0 33.4 17 62.8 42.9 80L224 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 208-48 0c-53 0-96-43-96-96l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L97 263c-9.4-9.4-24.6-9.4-33.9 0L7 319c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 88.4 71.6 160 160 160l80 0 80 0c88.4 0 160-71.6 160-160l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-56-56c-9.4-9.4-24.6-9.4-33.9 0l-56 56c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 53-43 96-96 96l-48 0 0-208 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-10.9 0z\"]\n};\nconst faBorderAll = {\n  prefix: 'fas',\n  iconName: 'border-all',\n  icon: [448, 512, [], \"f84c\", \"M384 96l0 128-128 0 0-128 128 0zm0 192l0 128-128 0 0-128 128 0zM192 224L64 224 64 96l128 0 0 128zM64 288l128 0 0 128L64 416l0-128zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z\"]\n};\nconst faFaceAngry = {\n  prefix: 'fas',\n  iconName: 'face-angry',\n  icon: [512, 512, [128544, \"angry\"], \"f556\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM338.7 395.9c6.6-5.9 7.1-16 1.2-22.6C323.8 355.4 295.7 336 256 336s-67.8 19.4-83.9 37.3c-5.9 6.6-5.4 16.7 1.2 22.6s16.7 5.4 22.6-1.2c11.7-13 31.6-26.7 60.1-26.7s48.4 13.7 60.1 26.7c5.9 6.6 16 7.1 22.6 1.2zM176.4 272c17.7 0 32-14.3 32-32c0-1.5-.1-3-.3-4.4l10.9 3.6c8.4 2.8 17.4-1.7 20.2-10.1s-1.7-17.4-10.1-20.2l-96-32c-8.4-2.8-17.4 1.7-20.2 10.1s1.7 17.4 10.1 20.2l30.7 10.2c-5.8 5.8-9.3 13.8-9.3 22.6c0 17.7 14.3 32 32 32zm192-32c0-8.9-3.6-17-9.5-22.8l30.2-10.1c8.4-2.8 12.9-11.9 10.1-20.2s-11.9-12.9-20.2-10.1l-96 32c-8.4 2.8-12.9 11.9-10.1 20.2s11.9 12.9 20.2 10.1l11.7-3.9c-.2 1.5-.3 3.1-.3 4.7c0 17.7 14.3 32 32 32s32-14.3 32-32z\"]\n};\nconst faAngry = faFaceAngry;\nconst faCookieBite = {\n  prefix: 'fas',\n  iconName: 'cookie-bite',\n  icon: [512, 512, [], \"f564\", \"M257.5 27.6c-.8-5.4-4.9-9.8-10.3-10.6c-22.1-3.1-44.6 .9-64.4 11.4l-74 39.5C89.1 78.4 73.2 94.9 63.4 115L26.7 190.6c-9.8 20.1-13 42.9-9.1 64.9l14.5 82.8c3.9 22.1 14.6 42.3 30.7 57.9l60.3 58.4c16.1 15.6 36.6 25.6 58.7 28.7l83 11.7c22.1 3.1 44.6-.9 64.4-11.4l74-39.5c19.7-10.5 35.6-27 45.4-47.2l36.7-75.5c9.8-20.1 13-42.9 9.1-64.9c-.9-5.3-5.3-9.3-10.6-10.1c-51.5-8.2-92.8-47.1-104.5-97.4c-1.8-7.6-8-13.4-15.7-14.6c-54.6-8.7-97.7-52-106.2-106.8zM208 144a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM144 336a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm224-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faArrowTrendDown = {\n  prefix: 'fas',\n  iconName: 'arrow-trend-down',\n  icon: [576, 512, [], \"e097\", \"M384 352c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-160c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 82.7L342.6 137.4c-12.5-12.5-32.8-12.5-45.3 0L192 242.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0L320 205.3 466.7 352 384 352z\"]\n};\nconst faRss = {\n  prefix: 'fas',\n  iconName: 'rss',\n  icon: [448, 512, [\"feed\"], \"f09e\", \"M0 64C0 46.3 14.3 32 32 32c229.8 0 416 186.2 416 416c0 17.7-14.3 32-32 32s-32-14.3-32-32C384 253.6 226.4 96 32 96C14.3 96 0 81.7 0 64zM0 416a64 64 0 1 1 128 0A64 64 0 1 1 0 416zM32 160c159.1 0 288 128.9 288 288c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-123.7-100.3-224-224-224c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faFeed = faRss;\nconst faDrawPolygon = {\n  prefix: 'fas',\n  iconName: 'draw-polygon',\n  icon: [448, 512, [], \"f5ee\", \"M96 151.4l0 209.1c9.7 5.6 17.8 13.7 23.4 23.4l209.1 0c0-.1 .1-.2 .1-.3l-4.5-7.9-32-56s0 0 0 0c-1.4 .1-2.8 .1-4.2 .1c-35.3 0-64-28.7-64-64s28.7-64 64-64c1.4 0 2.8 0 4.2 .1c0 0 0 0 0 0l32-56 4.5-7.9-.1-.3-209.1 0c-5.6 9.7-13.7 17.8-23.4 23.4zM384.3 352c35.2 .2 63.7 28.7 63.7 64c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32l-209.1 0c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4l0-209.1C12.9 140.4 0 119.7 0 96C0 60.7 28.7 32 64 32c23.7 0 44.4 12.9 55.4 32l209.1 0c11.1-19.1 31.7-32 55.4-32c35.3 0 64 28.7 64 64c0 35.3-28.5 63.8-63.7 64l-4.5 7.9-32 56-2.3 4c4.2 8.5 6.5 18 6.5 28.1s-2.3 19.6-6.5 28.1l2.3 4 32 56 4.5 7.9z\"]\n};\nconst faScaleBalanced = {\n  prefix: 'fas',\n  iconName: 'scale-balanced',\n  icon: [640, 512, [9878, \"balance-scale\"], \"f24e\", \"M384 32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L398.4 96c-5.2 25.8-22.9 47.1-46.4 57.3L352 448l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0 0-294.7c-23.5-10.3-41.2-31.6-46.4-57.3L128 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l128 0c14.6-19.4 37.8-32 64-32s49.4 12.6 64 32zm55.6 288l144.9 0L512 195.8 439.6 320zM512 416c-62.9 0-115.2-34-126-78.9c-2.6-11 1-22.3 6.7-32.1l95.2-163.2c5-8.6 14.2-13.8 24.1-13.8s19.1 5.3 24.1 13.8l95.2 163.2c5.7 9.8 9.3 21.1 6.7 32.1C627.2 382 574.9 416 512 416zM126.8 195.8L54.4 320l144.9 0L126.8 195.8zM.9 337.1c-2.6-11 1-22.3 6.7-32.1l95.2-163.2c5-8.6 14.2-13.8 24.1-13.8s19.1 5.3 24.1 13.8l95.2 163.2c5.7 9.8 9.3 21.1 6.7 32.1C242 382 189.7 416 126.8 416S11.7 382 .9 337.1z\"]\n};\nconst faBalanceScale = faScaleBalanced;\nconst faGaugeSimpleHigh = {\n  prefix: 'fas',\n  iconName: 'gauge-simple-high',\n  icon: [512, 512, [61668, \"tachometer\", \"tachometer-fast\"], \"f62a\", \"M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-15.9-5.8-30.4-15.3-41.6l76.6-147.4c6.1-11.8 1.5-26.3-10.2-32.4s-26.2-1.5-32.4 10.2L262.1 288.3c-2-.2-4-.3-6.1-.3c-35.3 0-64 28.7-64 64s28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faTachometer = faGaugeSimpleHigh;\nconst faTachometerFast = faGaugeSimpleHigh;\nconst faShower = {\n  prefix: 'fas',\n  iconName: 'shower',\n  icon: [512, 512, [128703], \"f2cc\", \"M64 131.9C64 112.1 80.1 96 99.9 96c9.5 0 18.6 3.8 25.4 10.5l16.2 16.2c-21 38.9-17.4 87.5 10.9 123L151 247c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0L345 121c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-1.3 1.3c-35.5-28.3-84.2-31.9-123-10.9L170.5 61.3C151.8 42.5 126.4 32 99.9 32C44.7 32 0 76.7 0 131.9L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-316.1zM256 352a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm64 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm64 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm64 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm32-32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faDesktop = {\n  prefix: 'fas',\n  iconName: 'desktop',\n  icon: [576, 512, [128421, 61704, \"desktop-alt\"], \"f390\", \"M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 224L64 288 64 64l448 0z\"]\n};\nconst faDesktopAlt = faDesktop;\nconst faM = {\n  prefix: 'fas',\n  iconName: 'm',\n  icon: [448, 512, [109], \"4d\", \"M22.7 33.4c13.5-4.1 28.1 1.1 35.9 12.9L224 294.3 389.4 46.3c7.8-11.7 22.4-17 35.9-12.9S448 49.9 448 64l0 384c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-278.3L250.6 369.8c-5.9 8.9-15.9 14.2-26.6 14.2s-20.7-5.3-26.6-14.2L64 169.7 64 448c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 64C0 49.9 9.2 37.5 22.7 33.4z\"]\n};\nconst faTableList = {\n  prefix: 'fas',\n  iconName: 'table-list',\n  icon: [512, 512, [\"th-list\"], \"f00b\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm64 0l0 64 64 0 0-64L64 96zm384 0L192 96l0 64 256 0 0-64zM64 224l0 64 64 0 0-64-64 0zm384 0l-256 0 0 64 256 0 0-64zM64 352l0 64 64 0 0-64-64 0zm384 0l-256 0 0 64 256 0 0-64z\"]\n};\nconst faThList = faTableList;\nconst faCommentSms = {\n  prefix: 'fas',\n  iconName: 'comment-sms',\n  icon: [512, 512, [\"sms\"], \"f7cd\", \"M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM96 212.8c0-20.3 16.5-36.8 36.8-36.8l19.2 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-19.2 0c-2.7 0-4.8 2.2-4.8 4.8c0 1.6 .8 3.1 2.2 4l29.4 19.6c10.3 6.8 16.4 18.3 16.4 30.7c0 20.3-16.5 36.8-36.8 36.8L112 304c-8.8 0-16-7.2-16-16s7.2-16 16-16l27.2 0c2.7 0 4.8-2.2 4.8-4.8c0-1.6-.8-3.1-2.2-4l-29.4-19.6C102.2 236.7 96 225.2 96 212.8zM372.8 176l19.2 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-19.2 0c-2.7 0-4.8 2.2-4.8 4.8c0 1.6 .8 3.1 2.2 4l29.4 19.6c10.2 6.8 16.4 18.3 16.4 30.7c0 20.3-16.5 36.8-36.8 36.8L352 304c-8.8 0-16-7.2-16-16s7.2-16 16-16l27.2 0c2.7 0 4.8-2.2 4.8-4.8c0-1.6-.8-3.1-2.2-4l-29.4-19.6c-10.2-6.8-16.4-18.3-16.4-30.7c0-20.3 16.5-36.8 36.8-36.8zm-152 6.4L256 229.3l35.2-46.9c4.1-5.5 11.3-7.8 17.9-5.6s10.9 8.3 10.9 15.2l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48-19.2 25.6c-3 4-7.8 6.4-12.8 6.4s-9.8-2.4-12.8-6.4L224 240l0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-6.9 4.4-13 10.9-15.2s13.7 .1 17.9 5.6z\"]\n};\nconst faSms = faCommentSms;\nconst faBook = {\n  prefix: 'fas',\n  iconName: 'book',\n  icon: [448, 512, [128212], \"f02d\", \"M96 0C43 0 0 43 0 96L0 416c0 53 43 96 96 96l288 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-64c17.7 0 32-14.3 32-32l0-320c0-17.7-14.3-32-32-32L384 0 96 0zm0 384l256 0 0 64L96 448c-17.7 0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16zm16 48l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faUserPlus = {\n  prefix: 'fas',\n  iconName: 'user-plus',\n  icon: [640, 512, [], \"f234\", \"M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM504 312l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z\"]\n};\nconst faCheck = {\n  prefix: 'fas',\n  iconName: 'check',\n  icon: [448, 512, [10003, 10004], \"f00c\", \"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z\"]\n};\nconst faBatteryThreeQuarters = {\n  prefix: 'fas',\n  iconName: 'battery-three-quarters',\n  icon: [576, 512, [\"battery-4\"], \"f241\", \"M464 160c8.8 0 16 7.2 16 16l0 160c0 8.8-7.2 16-16 16L80 352c-8.8 0-16-7.2-16-16l0-160c0-8.8 7.2-16 16-16l384 0zM80 96C35.8 96 0 131.8 0 176L0 336c0 44.2 35.8 80 80 80l384 0c44.2 0 80-35.8 80-80l0-16c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l0-16c0-44.2-35.8-80-80-80L80 96zm272 96L96 192l0 128 256 0 0-128z\"]\n};\nconst faBattery4 = faBatteryThreeQuarters;\nconst faHouseCircleCheck = {\n  prefix: 'fas',\n  iconName: 'house-circle-check',\n  icon: [640, 512, [], \"e509\", \"M320.7 352c8.1-89.7 83.5-160 175.3-160c8.9 0 17.6 .7 26.1 1.9L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 69.7c-.1 .9-.1 1.8-.1 2.8l0 112c0 22.1 17.9 40 40 40l16 0c1.2 0 2.4-.1 3.6-.2c1.5 .1 3 .2 4.5 .2l31.9 0 24 0c22.1 0 40-17.9 40-40l0-24 0-64c0-17.7 14.3-32 32-32l64 0 .7 0zM640 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\"]\n};\nconst faAngleLeft = {\n  prefix: 'fas',\n  iconName: 'angle-left',\n  icon: [320, 512, [8249], \"f104\", \"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z\"]\n};\nconst faDiagramSuccessor = {\n  prefix: 'fas',\n  iconName: 'diagram-successor',\n  icon: [512, 512, [], \"e47a\", \"M512 416l0-64c0-35.3-28.7-64-64-64L64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64zM64 160l0-64 144 0 16 0 0 64L64 160zm224 0l0-64 80 0c8.8 0 16 7.2 16 16l0 16-38.1 0c-21.4 0-32.1 25.9-17 41L399 239c9.4 9.4 24.6 9.4 33.9 0L503 169c15.1-15.1 4.4-41-17-41L448 128l0-16c0-44.2-35.8-80-80-80L224 32l-16 0L64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l160 0c35.3 0 64-28.7 64-64z\"]\n};\nconst faTruckArrowRight = {\n  prefix: 'fas',\n  iconName: 'truck-arrow-right',\n  icon: [640, 512, [], \"e58b\", \"M0 48C0 21.5 21.5 0 48 0L368 0c26.5 0 48 21.5 48 48l0 48 50.7 0c17 0 33.3 6.7 45.3 18.7L589.3 192c12 12 18.7 28.3 18.7 45.3l0 18.7 0 32 0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c0 53-43 96-96 96s-96-43-96-96l-128 0c0 53-43 96-96 96s-96-43-96-96l-16 0c-26.5 0-48-21.5-48-48L0 48zM416 256l128 0 0-18.7L466.7 160 416 160l0 96zM160 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm368-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM257 95c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l39 39L96 168c-13.3 0-24 10.7-24 24s10.7 24 24 24l166.1 0-39 39c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9L257 95z\"]\n};\nconst faArrowsSplitUpAndLeft = {\n  prefix: 'fas',\n  iconName: 'arrows-split-up-and-left',\n  icon: [512, 512, [], \"e4bc\", \"M246.6 150.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L352 109.3 352 384c0 35.3 28.7 64 64 64l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-70.7 0-128-57.3-128-128c0-35.3-28.7-64-64-64l-114.7 0 41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L109.3 256 224 256c23.3 0 45.2 6.2 64 17.1l0-163.9-41.4 41.4z\"]\n};\nconst faHandFist = {\n  prefix: 'fas',\n  iconName: 'hand-fist',\n  icon: [448, 512, [9994, \"fist-raised\"], \"f6de\", \"M192 0c17.7 0 32 14.3 32 32l0 112-64 0 0-112c0-17.7 14.3-32 32-32zM64 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 80-64 0 0-80zm192 0c0-17.7 14.3-32 32-32s32 14.3 32 32l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96zm96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zm-96 88l0-.6c9.4 5.4 20.3 8.6 32 8.6c13.2 0 25.4-4 35.6-10.8c8.7 24.9 32.5 42.8 60.4 42.8c11.7 0 22.6-3.1 32-8.6l0 8.6c0 52.3-25.1 98.8-64 128l0 96c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-78.4c-17.3-7.9-33.2-18.8-46.9-32.5L69.5 357.5C45.5 333.5 32 300.9 32 267l0-27c0-35.3 28.7-64 64-64l88 0c22.1 0 40 17.9 40 40s-17.9 40-40 40l-56 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l56 0c39.8 0 72-32.2 72-72z\"]\n};\nconst faFistRaised = faHandFist;\nconst faCloudMoon = {\n  prefix: 'fas',\n  iconName: 'cloud-moon',\n  icon: [640, 512, [], \"f6c3\", \"M495.8 0c5.5 0 10.9 .2 16.3 .7c7 .6 12.8 5.7 14.3 12.5s-1.6 13.9-7.7 17.3c-44.4 25.2-74.4 73-74.4 127.8c0 81 65.5 146.6 146.2 146.6c8.6 0 17-.7 25.1-2.1c6.9-1.2 13.8 2.2 17 8.5s1.9 13.8-3.1 18.7c-34.5 33.6-81.7 54.4-133.6 54.4c-9.3 0-18.4-.7-27.4-1.9c-11.2-22.6-29.8-40.9-52.6-51.7c-2.7-58.5-50.3-105.3-109.2-106.7c-1.7-10.4-2.6-21-2.6-31.8C304 86.1 389.8 0 495.8 0zM447.9 431.9c0 44.2-35.8 80-80 80L96 511.9c-53 0-96-43-96-96c0-47.6 34.6-87 80-94.6l0-1.3c0-53 43-96 96-96c34.9 0 65.4 18.6 82.2 46.4c13-9.1 28.8-14.4 45.8-14.4c44.2 0 80 35.8 80 80c0 5.9-.6 11.7-1.9 17.2c37.4 6.7 65.8 39.4 65.8 78.7z\"]\n};\nconst faBriefcase = {\n  prefix: 'fas',\n  iconName: 'briefcase',\n  icon: [512, 512, [128188], \"f0b1\", \"M184 48l144 0c4.4 0 8 3.6 8 8l0 40L176 96l0-40c0-4.4 3.6-8 8-8zm-56 8l0 40L64 96C28.7 96 0 124.7 0 160l0 96 192 0 128 0 192 0 0-96c0-35.3-28.7-64-64-64l-64 0 0-40c0-30.9-25.1-56-56-56L184 0c-30.9 0-56 25.1-56 56zM512 288l-192 0 0 32c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-32L0 288 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-128z\"]\n};\nconst faPersonFalling = {\n  prefix: 'fas',\n  iconName: 'person-falling',\n  icon: [512, 512, [], \"e546\", \"M288 0c17.7 0 32 14.3 32 32l0 9.8c0 54.6-27.9 104.6-72.5 133.6l.2 .3L304.5 256l87.5 0c15.1 0 29.3 7.1 38.4 19.2l43.2 57.6c10.6 14.1 7.7 34.2-6.4 44.8s-34.2 7.7-44.8-6.4L384 320l-96 0-1.4 0 92.3 142.6c9.6 14.8 5.4 34.6-9.5 44.3s-34.6 5.4-44.3-9.5L164.5 249.2c-2.9 9.2-4.5 19-4.5 29l0 73.8c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-73.8c0-65.1 39.6-123.7 100.1-147.9C232.3 115.8 256 80.8 256 41.8l0-9.8c0-17.7 14.3-32 32-32zM112 32a48 48 0 1 1 0 96 48 48 0 1 1 0-96z\"]\n};\nconst faImagePortrait = {\n  prefix: 'fas',\n  iconName: 'image-portrait',\n  icon: [384, 512, [\"portrait\"], \"f3e0\", \"M384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384zM128 192a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM80 356.6c0-37.9 30.7-68.6 68.6-68.6l86.9 0c37.9 0 68.6 30.7 68.6 68.6c0 15.1-12.3 27.4-27.4 27.4l-169.1 0C92.3 384 80 371.7 80 356.6z\"]\n};\nconst faPortrait = faImagePortrait;\nconst faUserTag = {\n  prefix: 'fas',\n  iconName: 'user-tag',\n  icon: [640, 512, [], \"f507\", \"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c10 0 18.8-4.9 24.2-12.5l-99.2-99.2c-14.9-14.9-23.3-35.1-23.3-56.1l0-33c-15.9-4.7-32.8-7.2-50.3-7.2l-91.4 0zM384 224c-17.7 0-32 14.3-32 32l0 82.7c0 17 6.7 33.3 18.7 45.3L478.1 491.3c18.7 18.7 49.1 18.7 67.9 0l73.4-73.4c18.7-18.7 18.7-49.1 0-67.9L512 242.7c-12-12-28.3-18.7-45.3-18.7L384 224zm24 80a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z\"]\n};\nconst faRug = {\n  prefix: 'fas',\n  iconName: 'rug',\n  icon: [640, 512, [], \"e569\", \"M24 64l32 0 24 0 0 24 0 88 0 80 0 80 0 88 0 24-24 0-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-40-8 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-32-8 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-32-8 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-40-8 0C10.7 112 0 101.3 0 88S10.7 64 24 64zm88 0l416 0 0 384-416 0 0-384zM640 88c0 13.3-10.7 24-24 24l-8 0 0 40 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 32 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 32 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 40 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0-24 0 0-24 0-88 0-80 0-80 0-88 0-24 24 0 32 0c13.3 0 24 10.7 24 24z\"]\n};\nconst faEarthEurope = {\n  prefix: 'fas',\n  iconName: 'earth-europe',\n  icon: [512, 512, [\"globe-europe\"], \"f7a2\", \"M266.3 48.3L232.5 73.6c-5.4 4-8.5 10.4-8.5 17.1l0 9.1c0 6.8 5.5 12.3 12.3 12.3c2.4 0 4.8-.7 6.8-2.1l41.8-27.9c2-1.3 4.4-2.1 6.8-2.1l1 0c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8l-19.9 19.9c-5.8 5.8-12.9 10.2-20.7 12.8l-26.5 8.8c-5.8 1.9-9.6 7.3-9.6 13.4c0 3.7-1.5 7.3-4.1 10l-17.9 17.9c-6.4 6.4-9.9 15-9.9 24l0 4.3c0 16.4 13.6 29.7 29.9 29.7c11 0 21.2-6.2 26.1-16l4-8.1c2.4-4.8 7.4-7.9 12.8-7.9c4.5 0 8.7 2.1 11.4 5.7l16.3 21.7c2.1 2.9 5.5 4.5 9.1 4.5c8.4 0 13.9-8.9 10.1-16.4l-1.1-2.3c-3.5-7 0-15.5 7.5-18l21.2-7.1c7.6-2.5 12.7-9.6 12.7-17.6c0-10.3 8.3-18.6 18.6-18.6l29.4 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-20.7 0c-7.2 0-14.2 2.9-19.3 8l-4.7 4.7c-2.1 2.1-3.3 5-3.3 8c0 6.2 5.1 11.3 11.3 11.3l11.3 0c6 0 11.8 2.4 16 6.6l6.5 6.5c1.8 1.8 2.8 4.3 2.8 6.8s-1 5-2.8 6.8l-7.5 7.5C386 262 384 266.9 384 272s2 10 5.7 13.7L408 304c10.2 10.2 24.1 16 38.6 16l7.3 0c6.5-20.2 10-41.7 10-64c0-111.4-87.6-202.4-197.7-207.7zm172 307.9c-3.7-2.6-8.2-4.1-13-4.1c-6 0-11.8-2.4-16-6.6L396 332c-7.7-7.7-18-12-28.9-12c-9.7 0-19.2-3.5-26.6-9.8L314 287.4c-11.6-9.9-26.4-15.4-41.7-15.4l-20.9 0c-12.6 0-25 3.7-35.5 10.7L188.5 301c-17.8 11.9-28.5 31.9-28.5 53.3l0 3.2c0 17 6.7 33.3 18.7 45.3l16 16c8.5 8.5 20 13.3 32 13.3l21.3 0c13.3 0 24 10.7 24 24c0 2.5 .4 5 1.1 7.3c71.3-5.8 132.5-47.6 165.2-107.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM187.3 100.7c-6.2-6.2-16.4-6.2-22.6 0l-32 32c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l32-32c6.2-6.2 6.2-16.4 0-22.6z\"]\n};\nconst faGlobeEurope = faEarthEurope;\nconst faCartFlatbedSuitcase = {\n  prefix: 'fas',\n  iconName: 'cart-flatbed-suitcase',\n  icon: [640, 512, [\"luggage-cart\"], \"f59d\", \"M0 32C0 14.3 14.3 0 32 0L48 0c44.2 0 80 35.8 80 80l0 288c0 8.8 7.2 16 16 16l464 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-66.7 0c1.8 5 2.7 10.4 2.7 16c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-5.6 1-11 2.7-16l-197.5 0c1.8 5 2.7 10.4 2.7 16c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-5.6 1-11 2.7-16L144 448c-44.2 0-80-35.8-80-80L64 80c0-8.8-7.2-16-16-16L32 64C14.3 64 0 49.7 0 32zM432 96l0-40c0-4.4-3.6-8-8-8l-80 0c-4.4 0-8 3.6-8 8l0 40 96 0zM288 96l0-40c0-30.9 25.1-56 56-56l80 0c30.9 0 56 25.1 56 56l0 40 0 224-192 0 0-224zM512 320l0-224 16 0c26.5 0 48 21.5 48 48l0 128c0 26.5-21.5 48-48 48l-16 0zM240 96l16 0 0 224-16 0c-26.5 0-48-21.5-48-48l0-128c0-26.5 21.5-48 48-48z\"]\n};\nconst faLuggageCart = faCartFlatbedSuitcase;\nconst faRectangleXmark = {\n  prefix: 'fas',\n  iconName: 'rectangle-xmark',\n  icon: [512, 512, [62164, \"rectangle-times\", \"times-rectangle\", \"window-close\"], \"f410\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z\"]\n};\nconst faRectangleTimes = faRectangleXmark;\nconst faTimesRectangle = faRectangleXmark;\nconst faWindowClose = faRectangleXmark;\nconst faBahtSign = {\n  prefix: 'fas',\n  iconName: 'baht-sign',\n  icon: [320, 512, [], \"e0ac\", \"M144 0c-17.7 0-32 14.3-32 32l0 32L37.6 64C16.8 64 0 80.8 0 101.6L0 224l0 41.7L0 288 0 406.3c0 23 18.7 41.7 41.7 41.7l70.3 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c61.9 0 112-50.1 112-112c0-40.1-21.1-75.3-52.7-95.1C280.3 222.6 288 200.2 288 176c0-61.9-50.1-112-112-112l0-32c0-17.7-14.3-32-32-32zM112 128l0 96-48 0 0-96 48 0zm64 96l0-96c26.5 0 48 21.5 48 48s-21.5 48-48 48zm-64 64l0 96-48 0 0-96 48 0zm64 96l0-96 32 0c26.5 0 48 21.5 48 48s-21.5 48-48 48l-32 0z\"]\n};\nconst faBookOpen = {\n  prefix: 'fas',\n  iconName: 'book-open',\n  icon: [576, 512, [128214, 128366], \"f518\", \"M249.6 471.5c10.8 3.8 22.4-4.1 22.4-15.5l0-377.4c0-4.2-1.6-8.4-5-11C247.4 52 202.4 32 144 32C93.5 32 46.3 45.3 18.1 56.1C6.8 60.5 0 71.7 0 83.8L0 454.1c0 11.9 12.8 20.2 24.1 16.5C55.6 460.1 105.5 448 144 448c33.9 0 79 14 105.6 23.5zm76.8 0C353 462 398.1 448 432 448c38.5 0 88.4 12.1 119.9 22.6c11.3 3.8 24.1-4.6 24.1-16.5l0-370.3c0-12.1-6.8-23.3-18.1-27.6C529.7 45.3 482.5 32 432 32c-58.4 0-103.4 20-123 35.6c-3.3 2.6-5 6.8-5 11L304 456c0 11.4 11.7 19.3 22.4 15.5z\"]\n};\nconst faBookJournalWhills = {\n  prefix: 'fas',\n  iconName: 'book-journal-whills',\n  icon: [448, 512, [\"journal-whills\"], \"f66a\", \"M0 96C0 43 43 0 96 0L384 0l32 0c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0L96 512c-53 0-96-43-96-96L0 96zM64 416c0 17.7 14.3 32 32 32l256 0 0-64L96 384c-17.7 0-32 14.3-32 32zm90.4-234.4l-21.2-21.2c-3 10.1-5.1 20.6-5.1 31.6c0 .2 0 .5 .1 .8s.1 .5 .1 .8L165.2 226c2.5 2.1 3.4 5.8 2.3 8.9c-1.3 3-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.1 8.1 0 11.2s-8.1 3.1-11.2 0z\"]\n};\nconst faJournalWhills = faBookJournalWhills;\nconst faHandcuffs = {\n  prefix: 'fas',\n  iconName: 'handcuffs',\n  icon: [640, 512, [], \"e4f8\", \"M240 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM192 48a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm-32 80c17.7 0 32 14.3 32 32l8 0c13.3 0 24 10.7 24 24l0 16c0 1.7-.2 3.4-.5 5.1C280.3 229.6 320 286.2 320 352c0 88.4-71.6 160-160 160S0 440.4 0 352c0-65.8 39.7-122.4 96.5-146.9c-.4-1.6-.5-3.3-.5-5.1l0-16c0-13.3 10.7-24 24-24l8 0c0-17.7 14.3-32 32-32zm0 320a96 96 0 1 0 0-192 96 96 0 1 0 0 192zm192-96c0-25.9-5.1-50.5-14.4-73.1c16.9-32.9 44.8-59.1 78.9-73.9c-.4-1.6-.5-3.3-.5-5.1l0-16c0-13.3 10.7-24 24-24l8 0c0-17.7 14.3-32 32-32s32 14.3 32 32l8 0c13.3 0 24 10.7 24 24l0 16c0 1.7-.2 3.4-.5 5.1C600.3 229.6 640 286.2 640 352c0 88.4-71.6 160-160 160c-62 0-115.8-35.3-142.4-86.9c9.3-22.5 14.4-47.2 14.4-73.1zm224 0a96 96 0 1 0 -192 0 96 96 0 1 0 192 0zM368 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm80 48a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faTriangleExclamation = {\n  prefix: 'fas',\n  iconName: 'triangle-exclamation',\n  icon: [512, 512, [9888, \"exclamation-triangle\", \"warning\"], \"f071\", \"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faExclamationTriangle = faTriangleExclamation;\nconst faWarning = faTriangleExclamation;\nconst faDatabase = {\n  prefix: 'fas',\n  iconName: 'database',\n  icon: [448, 512, [], \"f1c0\", \"M448 80l0 48c0 44.2-100.3 80-224 80S0 172.2 0 128L0 80C0 35.8 100.3 0 224 0S448 35.8 448 80zM393.2 214.7c20.8-7.4 39.9-16.9 54.8-28.6L448 288c0 44.2-100.3 80-224 80S0 332.2 0 288L0 186.1c14.9 11.8 34 21.2 54.8 28.6C99.7 230.7 159.5 240 224 240s124.3-9.3 169.2-25.3zM0 346.1c14.9 11.8 34 21.2 54.8 28.6C99.7 390.7 159.5 400 224 400s124.3-9.3 169.2-25.3c20.8-7.4 39.9-16.9 54.8-28.6l0 85.9c0 44.2-100.3 80-224 80S0 476.2 0 432l0-85.9z\"]\n};\nconst faShare = {\n  prefix: 'fas',\n  iconName: 'share',\n  icon: [512, 512, [\"mail-forward\"], \"f064\", \"M307 34.8c-11.5 5.1-19 16.6-19 29.2l0 64-112 0C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96l96 0 0 64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z\"]\n};\nconst faMailForward = faShare;\nconst faBottleDroplet = {\n  prefix: 'fas',\n  iconName: 'bottle-droplet',\n  icon: [320, 512, [], \"e4c4\", \"M96 0C82.7 0 72 10.7 72 24s10.7 24 24 24c4.4 0 8 3.6 8 8l0 64.9c0 12.2-7.2 23.1-17.2 30.1C53.7 174.1 32 212.5 32 256l0 192c0 35.3 28.7 64 64 64l128 0c35.3 0 64-28.7 64-64l0-192c0-43.5-21.7-81.9-54.8-105c-10-7-17.2-17.9-17.2-30.1L216 56c0-4.4 3.6-8 8-8c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0s0 0 0 0s0 0 0 0L104 0s0 0 0 0s0 0 0 0L96 0zm64 382c-26.5 0-48-20.1-48-45c0-16.8 22.1-48.1 36.3-66.4c6-7.8 17.5-7.8 23.5 0C185.9 288.9 208 320.2 208 337c0 24.9-21.5 45-48 45z\"]\n};\nconst faMaskFace = {\n  prefix: 'fas',\n  iconName: 'mask-face',\n  icon: [640, 512, [], \"e1d7\", \"M320 64c-27.2 0-53.8 8-76.4 23.1l-37.1 24.8c-15.8 10.5-34.3 16.1-53.3 16.1l-9.2 0-16 0-72 0c-30.9 0-56 25.1-56 56l0 85c0 55.1 37.5 103.1 90.9 116.4l108 27C233.8 435 275.4 448 320 448s86.2-13 121.1-35.5l108-27C602.5 372.1 640 324.1 640 269l0-85c0-30.9-25.1-56-56-56l-72 0-16 0-9.2 0c-19 0-37.5-5.6-53.3-16.1L396.4 87.1C373.8 72 347.2 64 320 64zM132.3 346.3l-29.8-7.4C70.5 330.9 48 302.1 48 269l0-85c0-4.4 3.6-8 8-8l40 0 0 48c0 45.1 13.4 87.2 36.3 122.3zm405.1-7.4l-29.8 7.4c23-35.2 36.3-77.2 36.3-122.3l0-48 40 0c4.4 0 8 3.6 8 8l0 85c0 33-22.5 61.8-54.5 69.9zM192 208c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16zm16 48l224 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm16 80c0-8.8 7.2-16 16-16l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16z\"]\n};\nconst faHillRockslide = {\n  prefix: 'fas',\n  iconName: 'hill-rockslide',\n  icon: [576, 512, [], \"e508\", \"M252.4 103.8l27 48c2.8 5 8.2 8.2 13.9 8.2l53.3 0c5.8 0 11.1-3.1 13.9-8.2l27-48c2.7-4.9 2.7-10.8 0-15.7l-27-48c-2.8-5-8.2-8.2-13.9-8.2l-53.3 0c-5.8 0-11.1 3.1-13.9 8.2l-27 48c-2.7 4.9-2.7 10.8 0 15.7zM68.3 87C43.1 61.8 0 79.7 0 115.3L0 432c0 44.2 35.8 80 80 80l316.7 0c35.6 0 53.5-43.1 28.3-68.3L68.3 87zM504.2 403.6c4.9 2.7 10.8 2.7 15.7 0l48-27c5-2.8 8.2-8.2 8.2-13.9l0-53.3c0-5.8-3.1-11.1-8.2-13.9l-48-27c-4.9-2.7-10.8-2.7-15.7 0l-48 27c-5 2.8-8.2 8.2-8.2 13.9l0 53.3c0 5.8 3.1 11.1 8.2 13.9l48 27zM192 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM384 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faRightLeft = {\n  prefix: 'fas',\n  iconName: 'right-left',\n  icon: [512, 512, [\"exchange-alt\"], \"f362\", \"M32 96l320 0 0-64c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l96 96c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-96 96c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-64L32 160c-17.7 0-32-14.3-32-32s14.3-32 32-32zM480 352c17.7 0 32 14.3 32 32s-14.3 32-32 32l-320 0 0 64c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-96-96c-6-6-9.4-14.1-9.4-22.6s3.4-16.6 9.4-22.6l96-96c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 64 320 0z\"]\n};\nconst faExchangeAlt = faRightLeft;\nconst faPaperPlane = {\n  prefix: 'fas',\n  iconName: 'paper-plane',\n  icon: [512, 512, [61913], \"f1d8\", \"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z\"]\n};\nconst faRoadCircleExclamation = {\n  prefix: 'fas',\n  iconName: 'road-circle-exclamation',\n  icon: [640, 512, [], \"e565\", \"M213.2 32L288 32l0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 74.8 0c27.1 0 51.3 17.1 60.3 42.6l42.7 120.6c-10.9-2.1-22.2-3.2-33.8-3.2c-59.5 0-112.1 29.6-144 74.8l0-42.8c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32c2.3 0 4.6-.3 6.8-.7c-4.5 15.5-6.8 31.8-6.8 48.7c0 5.4 .2 10.7 .7 16l-.7 0c-17.7 0-32 14.3-32 32l0 64L86.6 480C56.5 480 32 455.5 32 425.4c0-6.2 1.1-12.4 3.1-18.2L152.9 74.6C162 49.1 186.1 32 213.2 32zM496 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm0 240a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm0-192c-8.8 0-16 7.2-16 16l0 80c0 8.8 7.2 16 16 16s16-7.2 16-16l0-80c0-8.8-7.2-16-16-16z\"]\n};\nconst faDungeon = {\n  prefix: 'fas',\n  iconName: 'dungeon',\n  icon: [512, 512, [], \"f6d9\", \"M336.6 156.5c1.3 1.1 2.7 2.2 3.9 3.3c9.3 8.2 23 10.5 33.4 3.6l67.6-45.1c11.4-7.6 14.2-23.2 5.1-33.4C430 66.6 410.9 50.6 389.7 37.6c-11.9-7.3-26.9-1.4-32.1 11.6l-30.5 76.2c-4.5 11.1 .2 23.6 9.5 31.2zM328 36.8c5.1-12.8-1.6-27.4-15-30.5C294.7 2.2 275.6 0 256 0s-38.7 2.2-57 6.4C185.5 9.4 178.8 24 184 36.8l30.3 75.8c4.5 11.3 16.8 17.2 29 16c4.2-.4 8.4-.6 12.7-.6s8.6 .2 12.7 .6c12.1 1.2 24.4-4.7 29-16L328 36.8zM65.5 85c-9.1 10.2-6.3 25.8 5.1 33.4l67.6 45.1c10.3 6.9 24.1 4.6 33.4-3.6c1.3-1.1 2.6-2.3 4-3.3c9.3-7.5 13.9-20.1 9.5-31.2L154.4 49.2c-5.2-12.9-20.3-18.8-32.1-11.6C101.1 50.6 82 66.6 65.5 85zm314 137.1c.9 3.3 1.7 6.6 2.3 10c2.5 13 13 23.9 26.2 23.9l80 0c13.3 0 24.1-10.8 22.9-24c-2.5-27.2-9.3-53.2-19.7-77.3c-5.5-12.9-21.4-16.6-33.1-8.9l-68.6 45.7c-9.8 6.5-13.2 19.2-10 30.5zM53.9 145.8c-11.6-7.8-27.6-4-33.1 8.9C10.4 178.8 3.6 204.8 1.1 232c-1.2 13.2 9.6 24 22.9 24l80 0c13.3 0 23.8-10.8 26.2-23.9c.6-3.4 1.4-6.7 2.3-10c3.1-11.4-.2-24-10-30.5L53.9 145.8zM104 288l-80 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24zm304 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-80 0zM24 416c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-80 0zm384 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-80 0zM272 192c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 272c0 8.8 7.2 16 16 16s16-7.2 16-16l0-272zm-64 32c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 240c0 8.8 7.2 16 16 16s16-7.2 16-16l0-240zm128 0c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 240c0 8.8 7.2 16 16 16s16-7.2 16-16l0-240z\"]\n};\nconst faAlignRight = {\n  prefix: 'fas',\n  iconName: 'align-right',\n  icon: [448, 512, [], \"f038\", \"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z\"]\n};\nconst faMoneyBill1Wave = {\n  prefix: 'fas',\n  iconName: 'money-bill-1-wave',\n  icon: [576, 512, [\"money-bill-wave-alt\"], \"f53b\", \"M0 112.5L0 422.3c0 18 10.1 35 27 41.3c87 32.5 174 10.3 261-11.9c79.8-20.3 159.6-40.7 239.3-18.9c23 6.3 48.7-9.5 48.7-33.4l0-309.9c0-18-10.1-35-27-41.3C462 15.9 375 38.1 288 60.3C208.2 80.6 128.4 100.9 48.7 79.1C25.6 72.8 0 88.6 0 112.5zM128 416l-64 0 0-64c35.3 0 64 28.7 64 64zM64 224l0-64 64 0c0 35.3-28.7 64-64 64zM448 352c0-35.3 28.7-64 64-64l0 64-64 0zm64-192c-35.3 0-64-28.7-64-64l64 0 0 64zM384 256c0 61.9-43 112-96 112s-96-50.1-96-112s43-112 96-112s96 50.1 96 112zM252 208c0 9.7 6.9 17.7 16 19.6l0 48.4-4 0c-11 0-20 9-20 20s9 20 20 20l24 0 24 0c11 0 20-9 20-20s-9-20-20-20l-4 0 0-68c0-11-9-20-20-20l-16 0c-11 0-20 9-20 20z\"]\n};\nconst faMoneyBillWaveAlt = faMoneyBill1Wave;\nconst faLifeRing = {\n  prefix: 'fas',\n  iconName: 'life-ring',\n  icon: [512, 512, [], \"f1cd\", \"M367.2 412.5C335.9 434.9 297.5 448 256 448s-79.9-13.1-111.2-35.5l58-58c15.8 8.6 34 13.5 53.3 13.5s37.4-4.9 53.3-13.5l58 58zm90.7 .8c33.8-43.4 54-98 54-157.3s-20.2-113.9-54-157.3c9-12.5 7.9-30.1-3.4-41.3S425.8 45 413.3 54C369.9 20.2 315.3 0 256 0S142.1 20.2 98.7 54c-12.5-9-30.1-7.9-41.3 3.4S45 86.2 54 98.7C20.2 142.1 0 196.7 0 256s20.2 113.9 54 157.3c-9 12.5-7.9 30.1 3.4 41.3S86.2 467 98.7 458c43.4 33.8 98 54 157.3 54s113.9-20.2 157.3-54c12.5 9 30.1 7.9 41.3-3.4s12.4-28.8 3.4-41.3zm-45.5-46.1l-58-58c8.6-15.8 13.5-34 13.5-53.3s-4.9-37.4-13.5-53.3l58-58C434.9 176.1 448 214.5 448 256s-13.1 79.9-35.5 111.2zM367.2 99.5l-58 58c-15.8-8.6-34-13.5-53.3-13.5s-37.4 4.9-53.3 13.5l-58-58C176.1 77.1 214.5 64 256 64s79.9 13.1 111.2 35.5zM157.5 309.3l-58 58C77.1 335.9 64 297.5 64 256s13.1-79.9 35.5-111.2l58 58c-8.6 15.8-13.5 34-13.5 53.3s4.9 37.4 13.5 53.3zM208 256a48 48 0 1 1 96 0 48 48 0 1 1 -96 0z\"]\n};\nconst faHands = {\n  prefix: 'fas',\n  iconName: 'hands',\n  icon: [576, 512, [\"sign-language\", \"signing\"], \"f2a7\", \"M544 160l-.1 72.6c-.1 52.2-24 101-64 133.1c.1-1.9 .1-3.8 .1-5.7l0-8c0-71.8-37-138.6-97.9-176.7l-60.2-37.6c-8.6-5.4-17.9-8.4-27.3-9.4L248.7 48.8c-6.6-11.5-2.7-26.2 8.8-32.8s26.2-2.7 32.8 8.8l78 135.1c3.3 5.7 10.7 7.7 16.4 4.4s7.7-10.7 4.4-16.4l-62-107.4c-6.6-11.5-2.7-26.2 8.8-32.8S362 5 368.6 16.5l68 117.8s0 0 0 0s0 0 0 0l43.3 75L480 160c0-17.7 14.4-32 32-32s32 14.4 32 32zM243.9 88.5L268.5 131c-13.9 4.5-26.4 13.7-34.7 27c-.9 1.4-1.7 2.9-2.5 4.4l-28.9-50c-6.6-11.5-2.7-26.2 8.8-32.8s26.2-2.7 32.8 8.8zm-46.4 63.7l26.8 46.4c.6 6 2.1 11.8 4.3 17.4l-4.7 0-13.3 0s0 0 0 0L179 216l-23-39.8c-6.6-11.5-2.7-26.2 8.8-32.8s26.2-2.7 32.8 8.8zM260.9 175c9.4-15 29.1-19.5 44.1-10.2l60.2 37.6C416.7 234.7 448 291.2 448 352l0 8c0 83.9-68.1 152-152 152l-176 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l92 0c6.6 0 12-5.4 12-12s-5.4-12-12-12L88 440c-13.3 0-24-10.7-24-24s10.7-24 24-24l124 0c6.6 0 12-5.4 12-12s-5.4-12-12-12L56 368c-13.3 0-24-10.7-24-24s10.7-24 24-24l156 0c6.6 0 12-5.4 12-12s-5.4-12-12-12L88 296c-13.3 0-24-10.7-24-24s10.7-24 24-24l136 0s0 0 0 0s0 0 0 0l93.2 0L271 219.1c-15-9.4-19.5-29.1-10.2-44.1z\"]\n};\nconst faSignLanguage = faHands;\nconst faSigning = faHands;\nconst faCalendarDay = {\n  prefix: 'fas',\n  iconName: 'calendar-day',\n  icon: [448, 512, [], \"f783\", \"M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm80 64c-8.8 0-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16l96 0c8.8 0 16-7.2 16-16l0-96c0-8.8-7.2-16-16-16l-96 0z\"]\n};\nconst faWaterLadder = {\n  prefix: 'fas',\n  iconName: 'water-ladder',\n  icon: [576, 512, [\"ladder-water\", \"swimming-pool\"], \"f5c5\", \"M128 127.7C128 74.9 170.9 32 223.7 32c48.3 0 89 36 95 83.9l1 8.2c2.2 17.5-10.2 33.5-27.8 35.7s-33.5-10.2-35.7-27.8l-1-8.2c-2-15.9-15.5-27.8-31.5-27.8c-17.5 0-31.7 14.2-31.7 31.7l0 96.3 192 0 0-96.3C384 74.9 426.9 32 479.7 32c48.3 0 89 36 95 83.9l1 8.2c2.2 17.5-10.2 33.5-27.8 35.7s-33.5-10.2-35.7-27.8l-1-8.2c-2-15.9-15.5-27.8-31.5-27.8c-17.5 0-31.7 14.2-31.7 31.7L448 361c-1.6 1-3.3 2-4.8 3.1c-18 12.4-40.1 20.3-59.2 20.3c0 0 0 0 0 0l0-96.5-192 0 0 96.5c-19 0-41.2-7.9-59.1-20.3c-1.6-1.1-3.2-2.2-4.9-3.1l0-233.3zM306.5 389.9C329 405.4 356.5 416 384 416c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 469.7 417 480 384 480c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 405.2 165.1 416 192 416c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z\"]\n};\nconst faLadderWater = faWaterLadder;\nconst faSwimmingPool = faWaterLadder;\nconst faArrowsUpDown = {\n  prefix: 'fas',\n  iconName: 'arrows-up-down',\n  icon: [320, 512, [\"arrows-v\"], \"f07d\", \"M182.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L128 109.3l0 293.5L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7l0-293.5 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96z\"]\n};\nconst faArrowsV = faArrowsUpDown;\nconst faFaceGrimace = {\n  prefix: 'fas',\n  iconName: 'face-grimace',\n  icon: [512, 512, [128556, \"grimace\"], \"f57f\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm96-112l-8 0 0-40 55.3 0c-3.8 22.7-23.6 40-47.3 40zm47.3-56L344 344l0-40 8 0c23.8 0 43.5 17.3 47.3 40zM328 344l-64 0 0-40 64 0 0 40zm0 56l-64 0 0-40 64 0 0 40zm-80-96l0 40-64 0 0-40 64 0zm0 56l0 40-64 0 0-40 64 0zm-80-16l-55.3 0c3.8-22.7 23.6-40 47.3-40l8 0 0 40zm0 56l-8 0c-23.8 0-43.5-17.3-47.3-40l55.3 0 0 40zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faGrimace = faFaceGrimace;\nconst faWheelchairMove = {\n  prefix: 'fas',\n  iconName: 'wheelchair-move',\n  icon: [448, 512, [\"wheelchair-alt\"], \"e2ce\", \"M320 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM204.5 121.3c-5.4-2.5-11.7-1.9-16.4 1.7l-40.9 30.7c-14.1 10.6-34.2 7.7-44.8-6.4s-7.7-34.2 6.4-44.8l40.9-30.7c23.7-17.8 55.3-21 82.1-8.4l90.4 42.5c29.1 13.7 36.8 51.6 15.2 75.5L299.1 224l97.4 0c30.3 0 53 27.7 47.1 57.4L415.4 422.3c-3.5 17.3-20.3 28.6-37.7 25.1s-28.6-20.3-25.1-37.7L377 288l-70.3 0c8.6 19.6 13.3 41.2 13.3 64c0 88.4-71.6 160-160 160S0 440.4 0 352s71.6-160 160-160c11.1 0 22 1.1 32.4 3.3l54.2-54.2-42.1-19.8zM160 448a96 96 0 1 0 0-192 96 96 0 1 0 0 192z\"]\n};\nconst faWheelchairAlt = faWheelchairMove;\nconst faTurnDown = {\n  prefix: 'fas',\n  iconName: 'turn-down',\n  icon: [384, 512, [10549, \"level-down-alt\"], \"f3be\", \"M350 334.5c3.8 8.8 2 19-4.6 26l-136 144c-4.5 4.8-10.8 7.5-17.4 7.5s-12.9-2.7-17.4-7.5l-136-144c-6.6-7-8.4-17.2-4.6-26s12.5-14.5 22-14.5l88 0 0-192c0-17.7-14.3-32-32-32L32 96C14.3 96 0 81.7 0 64L0 32C0 14.3 14.3 0 32 0l80 0c70.7 0 128 57.3 128 128l0 192 88 0c9.6 0 18.2 5.7 22 14.5z\"]\n};\nconst faLevelDownAlt = faTurnDown;\nconst faPersonWalkingArrowRight = {\n  prefix: 'fas',\n  iconName: 'person-walking-arrow-right',\n  icon: [640, 512, [], \"e552\", \"M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80z\"]\n};\nconst faSquareEnvelope = {\n  prefix: 'fas',\n  iconName: 'square-envelope',\n  icon: [448, 512, [\"envelope-square\"], \"f199\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM218 271.7L64.2 172.4C66 156.4 79.5 144 96 144l256 0c16.5 0 30 12.4 31.8 28.4L230 271.7c-1.8 1.2-3.9 1.8-6 1.8s-4.2-.6-6-1.8zm29.4 26.9L384 210.4 384 336c0 17.7-14.3 32-32 32L96 368c-17.7 0-32-14.3-32-32l0-125.6 136.6 88.2c7 4.5 15.1 6.9 23.4 6.9s16.4-2.4 23.4-6.9z\"]\n};\nconst faEnvelopeSquare = faSquareEnvelope;\nconst faDice = {\n  prefix: 'fas',\n  iconName: 'dice',\n  icon: [640, 512, [127922], \"f522\", \"M274.9 34.3c-28.1-28.1-73.7-28.1-101.8 0L34.3 173.1c-28.1 28.1-28.1 73.7 0 101.8L173.1 413.7c28.1 28.1 73.7 28.1 101.8 0L413.7 274.9c28.1-28.1 28.1-73.7 0-101.8L274.9 34.3zM200 224a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM96 200a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM224 376a24 24 0 1 1 0-48 24 24 0 1 1 0 48zM352 200a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM224 120a24 24 0 1 1 0-48 24 24 0 1 1 0 48zm96 328c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-114.3 0c11.6 36 3.1 77-25.4 105.5L320 413.8l0 34.2zM480 328a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faBowlingBall = {\n  prefix: 'fas',\n  iconName: 'bowling-ball',\n  icon: [512, 512, [], \"f436\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM240 80a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM208 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-64-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faBrain = {\n  prefix: 'fas',\n  iconName: 'brain',\n  icon: [512, 512, [129504], \"f5dc\", \"M184 0c30.9 0 56 25.1 56 56l0 400c0 30.9-25.1 56-56 56c-28.9 0-52.7-21.9-55.7-50.1c-5.2 1.4-10.7 2.1-16.3 2.1c-35.3 0-64-28.7-64-64c0-7.4 1.3-14.6 3.6-21.2C21.4 367.4 0 338.2 0 304c0-31.9 18.7-59.5 45.8-72.3C37.1 220.8 32 207 32 192c0-30.7 21.6-56.3 50.4-62.6C80.8 123.9 80 118 80 112c0-29.9 20.6-55.1 48.3-62.1C131.3 21.9 155.1 0 184 0zM328 0c28.9 0 52.6 21.9 55.7 49.9c27.8 7 48.3 32.1 48.3 62.1c0 6-.8 11.9-2.4 17.4c28.8 6.2 50.4 31.9 50.4 62.6c0 15-5.1 28.8-13.8 39.7C493.3 244.5 512 272.1 512 304c0 34.2-21.4 63.4-51.6 74.8c2.3 6.6 3.6 13.8 3.6 21.2c0 35.3-28.7 64-64 64c-5.6 0-11.1-.7-16.3-2.1c-3 28.2-26.8 50.1-55.7 50.1c-30.9 0-56-25.1-56-56l0-400c0-30.9 25.1-56 56-56z\"]\n};\nconst faBandage = {\n  prefix: 'fas',\n  iconName: 'bandage',\n  icon: [640, 512, [129657, \"band-aid\"], \"f462\", \"M480 416l96 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-96 0 0 320zM448 96L192 96l0 320 256 0 0-320zM64 96C28.7 96 0 124.7 0 160L0 352c0 35.3 28.7 64 64 64l96 0 0-320L64 96zM248 208a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm120-24a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM248 304a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm120-24a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faBandAid = faBandage;\nconst faCalendarMinus = {\n  prefix: 'fas',\n  iconName: 'calendar-minus',\n  icon: [448, 512, [], \"f272\", \"M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM312 376c13.3 0 24-10.7 24-24s-10.7-24-24-24l-176 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l176 0z\"]\n};\nconst faCircleXmark = {\n  prefix: 'fas',\n  iconName: 'circle-xmark',\n  icon: [512, 512, [61532, \"times-circle\", \"xmark-circle\"], \"f057\", \"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z\"]\n};\nconst faTimesCircle = faCircleXmark;\nconst faXmarkCircle = faCircleXmark;\nconst faGifts = {\n  prefix: 'fas',\n  iconName: 'gifts',\n  icon: [640, 512, [], \"f79c\", \"M200.6 32C205 19.5 198.5 5.8 186 1.4S159.8 3.5 155.4 16L144.7 46.2l-9.9-29.8C130.6 3.8 117-3 104.4 1.2S85 19 89.2 31.6l8.3 25-27.4-20c-10.7-7.8-25.7-5.4-33.5 5.3s-5.4 25.7 5.3 33.5L70.2 96 48 96C21.5 96 0 117.5 0 144L0 464c0 26.5 21.5 48 48 48l152.6 0c-5.4-9.4-8.6-20.3-8.6-32l0-224c0-29.9 20.5-55 48.2-62c1.8-31 17.1-58.2 40.1-76.1C271.7 104.7 256.9 96 240 96l-22.2 0 28.3-20.6c10.7-7.8 13.1-22.8 5.3-33.5s-22.8-13.1-33.5-5.3L192.5 55.1 200.6 32zM363.5 185.5L393.1 224 344 224c-13.3 0-24-10.7-24-24c0-13.1 10.8-24 24.2-24c7.6 0 14.7 3.5 19.3 9.5zM272 200c0 8.4 1.4 16.5 4.1 24l-4.1 0c-26.5 0-48 21.5-48 48l0 80 192 0 0-96 32 0 0 96 192 0 0-80c0-26.5-21.5-48-48-48l-4.1 0c2.7-7.5 4.1-15.6 4.1-24c0-39.9-32.5-72-72.2-72c-22.4 0-43.6 10.4-57.3 28.2L432 195.8l-30.5-39.6c-13.7-17.8-35-28.2-57.3-28.2c-39.7 0-72.2 32.1-72.2 72zM224 464c0 26.5 21.5 48 48 48l144 0 0-128-192 0 0 80zm224 48l144 0c26.5 0 48-21.5 48-48l0-80-192 0 0 128zm96-312c0 13.3-10.7 24-24 24l-49.1 0 29.6-38.5c4.6-5.9 11.7-9.5 19.3-9.5c13.4 0 24.2 10.9 24.2 24z\"]\n};\nconst faHotel = {\n  prefix: 'fas',\n  iconName: 'hotel',\n  icon: [512, 512, [127976], \"f594\", \"M0 32C0 14.3 14.3 0 32 0L480 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 384c17.7 0 32 14.3 32 32s-14.3 32-32 32l-176 0 0-48c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 48L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32L32 64C14.3 64 0 49.7 0 32zm96 80l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zM240 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zM112 192c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM328 384c13.3 0 24.3-10.9 21-23.8c-10.6-41.5-48.2-72.2-93-72.2s-82.5 30.7-93 72.2c-3.3 12.8 7.8 23.8 21 23.8l144 0z\"]\n};\nconst faEarthAsia = {\n  prefix: 'fas',\n  iconName: 'earth-asia',\n  icon: [512, 512, [127759, \"globe-asia\"], \"f57e\", \"M51.7 295.1l31.7 6.3c7.9 1.6 16-.9 21.7-6.6l15.4-15.4c11.6-11.6 31.1-8.4 38.4 6.2l9.3 18.5c4.8 9.6 14.6 15.7 25.4 15.7c15.2 0 26.1-14.6 21.7-29.2l-6-19.9c-4.6-15.4 6.9-30.9 23-30.9l2.3 0c13.4 0 25.9-6.7 33.3-17.8l10.7-16.1c5.6-8.5 5.3-19.6-.8-27.7l-16.1-21.5c-10.3-13.7-3.3-33.5 13.4-37.7l17-4.3c7.5-1.9 13.6-7.2 16.5-14.4l16.4-40.9C303.4 52.1 280.2 48 256 48C141.1 48 48 141.1 48 256c0 13.4 1.3 26.5 3.7 39.1zm407.7 4.6c-3-.3-6-.1-9 .8l-15.8 4.4c-6.7 1.9-13.8-.9-17.5-6.7l-2-3.1c-6-9.4-16.4-15.1-27.6-15.1s-21.6 5.7-27.6 15.1l-6.1 9.5c-1.4 2.2-3.4 4.1-5.7 5.3L312 330.1c-18.1 10.1-25.5 32.4-17 51.3l5.5 12.4c8.6 19.2 30.7 28.5 50.5 21.1l2.6-1c10-3.7 21.3-2.2 29.9 4.1l1.5 1.1c37.2-29.5 64.1-71.4 74.4-119.5zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm144.5 92.1c-2.1 8.6 3.1 17.3 11.6 19.4l32 8c8.6 2.1 17.3-3.1 19.4-11.6s-3.1-17.3-11.6-19.4l-32-8c-8.6-2.1-17.3 3.1-19.4 11.6zm92-20c-2.1 8.6 3.1 17.3 11.6 19.4s17.3-3.1 19.4-11.6l8-32c2.1-8.6-3.1-17.3-11.6-19.4s-17.3 3.1-19.4 11.6l-8 32zM343.2 113.7c-7.9-4-17.5-.7-21.5 7.2l-16 32c-4 7.9-.7 17.5 7.2 21.5s17.5 .7 21.5-7.2l16-32c4-7.9 .7-17.5-7.2-21.5z\"]\n};\nconst faGlobeAsia = faEarthAsia;\nconst faIdCardClip = {\n  prefix: 'fas',\n  iconName: 'id-card-clip',\n  icon: [576, 512, [\"id-card-alt\"], \"f47f\", \"M256 0l64 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32zM64 64l128 0 0 48c0 26.5 21.5 48 48 48l96 0c26.5 0 48-21.5 48-48l0-48 128 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64zM176 437.3c0 5.9 4.8 10.7 10.7 10.7l202.7 0c5.9 0 10.7-4.8 10.7-10.7c0-29.5-23.9-53.3-53.3-53.3l-117.3 0c-29.5 0-53.3 23.9-53.3 53.3zM288 352a64 64 0 1 0 0-128 64 64 0 1 0 0 128z\"]\n};\nconst faIdCardAlt = faIdCardClip;\nconst faMagnifyingGlassPlus = {\n  prefix: 'fas',\n  iconName: 'magnifying-glass-plus',\n  icon: [512, 512, [\"search-plus\"], \"f00e\", \"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24l0-64 64 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-64 0 0-64c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 64-64 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l64 0 0 64z\"]\n};\nconst faSearchPlus = faMagnifyingGlassPlus;\nconst faThumbsUp = {\n  prefix: 'fas',\n  iconName: 'thumbs-up',\n  icon: [512, 512, [128077, 61575], \"f164\", \"M313.4 32.9c26 5.2 42.9 30.5 37.7 56.5l-2.3 11.4c-5.3 26.7-15.1 52.1-28.8 75.2l144 0c26.5 0 48 21.5 48 48c0 18.5-10.5 34.6-25.9 42.6C497 275.4 504 288.9 504 304c0 23.4-16.8 42.9-38.9 47.1c4.4 7.3 6.9 15.8 6.9 24.9c0 21.3-13.9 39.4-33.1 45.6c.7 3.3 1.1 6.8 1.1 10.4c0 26.5-21.5 48-48 48l-97.5 0c-19 0-37.5-5.6-53.3-16.1l-38.5-25.7C176 420.4 160 390.4 160 358.3l0-38.3 0-48 0-24.9c0-29.2 13.3-56.7 36-75l7.4-5.9c26.5-21.2 44.6-51 51.2-84.2l2.3-11.4c5.2-26 30.5-42.9 56.5-37.7zM32 192l64 0c17.7 0 32 14.3 32 32l0 224c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32L0 224c0-17.7 14.3-32 32-32z\"]\n};\nconst faUserClock = {\n  prefix: 'fas',\n  iconName: 'user-clock',\n  icon: [640, 512, [], \"f4fd\", \"M224 0a128 128 0 1 1 0 256A128 128 0 1 1 224 0zM178.3 304l91.4 0c20.6 0 40.4 3.5 58.8 9.9C323 331 320 349.1 320 368c0 59.5 29.5 112.1 74.8 144L29.7 512C13.3 512 0 498.7 0 482.3C0 383.8 79.8 304 178.3 304zM352 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-80c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16l48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0-48c0-8.8-7.2-16-16-16z\"]\n};\nconst faHandDots = {\n  prefix: 'fas',\n  iconName: 'hand-dots',\n  icon: [512, 512, [\"allergies\"], \"f461\", \"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 272c0 1.5 0 3.1 .1 4.6L67.6 283c-16-15.2-41.3-14.6-56.6 1.4s-14.6 41.3 1.4 56.6L124.8 448c43.1 41.1 100.4 64 160 64l19.2 0c97.2 0 176-78.8 176-176l0-208c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 176c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208zM240 336a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zm80 16a16 16 0 1 1 0 32 16 16 0 1 1 0-32zm48-16a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zm-16 80a16 16 0 1 1 0 32 16 16 0 1 1 0-32zM240 432a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zm-48-48a16 16 0 1 1 0 32 16 16 0 1 1 0-32z\"]\n};\nconst faAllergies = faHandDots;\nconst faFileInvoice = {\n  prefix: 'fas',\n  iconName: 'file-invoice',\n  icon: [384, 512, [], \"f570\", \"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM80 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 96c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm16 96l192 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L96 352c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32zm0 32l0 64 192 0 0-64L96 256zM240 416l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faWindowMinimize = {\n  prefix: 'fas',\n  iconName: 'window-minimize',\n  icon: [512, 512, [128469], \"f2d1\", \"M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z\"]\n};\nconst faMugSaucer = {\n  prefix: 'fas',\n  iconName: 'mug-saucer',\n  icon: [640, 512, [\"coffee\"], \"f0f4\", \"M96 64c0-17.7 14.3-32 32-32l320 0 64 0c70.7 0 128 57.3 128 128s-57.3 128-128 128l-32 0c0 53-43 96-96 96l-192 0c-53 0-96-43-96-96L96 64zM480 224l32 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0 0 128zM32 416l512 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"]\n};\nconst faCoffee = faMugSaucer;\nconst faBrush = {\n  prefix: 'fas',\n  iconName: 'brush',\n  icon: [384, 512, [], \"f55d\", \"M162.4 6c-1.5-3.6-5-6-8.9-6l-19 0c-3.9 0-7.5 2.4-8.9 6L104.9 57.7c-3.2 8-14.6 8-17.8 0L66.4 6c-1.5-3.6-5-6-8.9-6L48 0C21.5 0 0 21.5 0 48L0 224l0 22.4L0 256l9.6 0 364.8 0 9.6 0 0-9.6 0-22.4 0-176c0-26.5-21.5-48-48-48L230.5 0c-3.9 0-7.5 2.4-8.9 6L200.9 57.7c-3.2 8-14.6 8-17.8 0L162.4 6zM0 288l0 32c0 35.3 28.7 64 64 64l64 0 0 64c0 35.3 28.7 64 64 64s64-28.7 64-64l0-64 64 0c35.3 0 64-28.7 64-64l0-32L0 288zM192 432a16 16 0 1 1 0 32 16 16 0 1 1 0-32z\"]\n};\nconst faFileHalfDashed = {\n  prefix: 'fas',\n  iconName: 'file-half-dashed',\n  icon: [384, 512, [], \"e698\", \"M64 0C28.7 0 0 28.7 0 64L0 320l384 0 0-160-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM0 416l64 0 0-64L0 352l0 64zm288 32l-80 0 0 64 80 0 0-64zm-112 0l-80 0 0 64 80 0 0-64zM64 448L0 448c0 35.3 28.7 64 64 64l0-64zm256 0l0 64c35.3 0 64-28.7 64-64l-64 0zm64-32l0-64-64 0 0 64 64 0z\"]\n};\nconst faMask = {\n  prefix: 'fas',\n  iconName: 'mask',\n  icon: [576, 512, [], \"f6fa\", \"M288 64C64 64 0 160 0 272S80 448 176 448l8.4 0c24.2 0 46.4-13.7 57.2-35.4l23.2-46.3c4.4-8.8 13.3-14.3 23.2-14.3s18.8 5.5 23.2 14.3l23.2 46.3c10.8 21.7 33 35.4 57.2 35.4l8.4 0c96 0 176-64 176-176s-64-208-288-208zM96 256a64 64 0 1 1 128 0A64 64 0 1 1 96 256zm320-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\"]\n};\nconst faMagnifyingGlassMinus = {\n  prefix: 'fas',\n  iconName: 'magnifying-glass-minus',\n  icon: [512, 512, [\"search-minus\"], \"f010\", \"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z\"]\n};\nconst faSearchMinus = faMagnifyingGlassMinus;\nconst faRulerVertical = {\n  prefix: 'fas',\n  iconName: 'ruler-vertical',\n  icon: [256, 512, [], \"f548\", \"M0 48C0 21.5 21.5 0 48 0L208 0c26.5 0 48 21.5 48 48l0 48-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 64-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 64-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 64-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 48z\"]\n};\nconst faUserLarge = {\n  prefix: 'fas',\n  iconName: 'user-large',\n  icon: [512, 512, [\"user-alt\"], \"f406\", \"M256 288A144 144 0 1 0 256 0a144 144 0 1 0 0 288zm-94.7 32C72.2 320 0 392.2 0 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0c17 0 30.7-13.8 30.7-30.7C512 392.2 439.8 320 350.7 320l-189.4 0z\"]\n};\nconst faUserAlt = faUserLarge;\nconst faTrainTram = {\n  prefix: 'fas',\n  iconName: 'train-tram',\n  icon: [448, 512, [128650], \"e5b4\", \"M86.8 48c-12.2 0-23.6 5.5-31.2 15L42.7 79C34.5 89.3 19.4 91 9 82.7S-3 59.4 5.3 49L18 33C34.7 12.2 60 0 86.8 0L361.2 0c26.7 0 52 12.2 68.7 33l12.8 16c8.3 10.4 6.6 25.5-3.8 33.7s-25.5 6.6-33.7-3.7L392.5 63c-7.6-9.5-19.1-15-31.2-15L248 48l0 48 40 0c53 0 96 43 96 96l0 160c0 30.6-14.3 57.8-36.6 75.4l65.5 65.5c7.1 7.1 2.1 19.1-7.9 19.1l-39.7 0c-8.5 0-16.6-3.4-22.6-9.4L288 448l-128 0-54.6 54.6c-6 6-14.1 9.4-22.6 9.4L43 512c-10 0-15-12.1-7.9-19.1l65.5-65.5C78.3 409.8 64 382.6 64 352l0-160c0-53 43-96 96-96l40 0 0-48L86.8 48zM160 160c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-128 0zm32 192a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faUserNurse = {\n  prefix: 'fas',\n  iconName: 'user-nurse',\n  icon: [448, 512, [], \"f82f\", \"M96 128l0-57.8c0-13.3 8.3-25.3 20.8-30l96-36c7.2-2.7 15.2-2.7 22.5 0l96 36c12.5 4.7 20.8 16.6 20.8 30l0 57.8-.3 0c.2 2.6 .3 5.3 .3 8l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40c0-2.7 .1-5.4 .3-8l-.3 0zm48 48c0 44.2 35.8 80 80 80s80-35.8 80-80l0-16-160 0 0 16zM111.9 327.7c10.5-3.4 21.8 .4 29.4 8.5l71 75.5c6.3 6.7 17 6.7 23.3 0l71-75.5c7.6-8.1 18.9-11.9 29.4-8.5C401 348.6 448 409.4 448 481.3c0 17-13.8 30.7-30.7 30.7L30.7 512C13.8 512 0 498.2 0 481.3c0-71.9 47-132.7 111.9-153.6zM208 48l0 16-16 0c-4.4 0-8 3.6-8 8l0 16c0 4.4 3.6 8 8 8l16 0 0 16c0 4.4 3.6 8 8 8l16 0c4.4 0 8-3.6 8-8l0-16 16 0c4.4 0 8-3.6 8-8l0-16c0-4.4-3.6-8-8-8l-16 0 0-16c0-4.4-3.6-8-8-8l-16 0c-4.4 0-8 3.6-8 8z\"]\n};\nconst faSyringe = {\n  prefix: 'fas',\n  iconName: 'syringe',\n  icon: [512, 512, [128137], \"f48e\", \"M441 7l32 32 32 32c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-15-15L417.9 128l55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72L295 73c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l55 55L422.1 56 407 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0zM210.3 155.7l61.1-61.1c.3 .3 .6 .7 1 1l16 16 56 56 56 56 16 16c.3 .3 .6 .6 1 1l-191 191c-10.5 10.5-24.7 16.4-39.6 16.4l-88.8 0L41 505c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l57-57 0-88.8c0-14.9 5.9-29.1 16.4-39.6l43.3-43.3 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 41.4-41.4 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57z\"]\n};\nconst faCloudSun = {\n  prefix: 'fas',\n  iconName: 'cloud-sun',\n  icon: [640, 512, [9925], \"f6c4\", \"M294.2 1.2c5.1 2.1 8.7 6.7 9.6 12.1l14.1 84.7 84.7 14.1c5.4 .9 10 4.5 12.1 9.6s1.5 10.9-1.6 15.4l-38.5 55c-2.2-.1-4.4-.2-6.7-.2c-23.3 0-45.1 6.2-64 17.1l0-1.1c0-53-43-96-96-96s-96 43-96 96s43 96 96 96c8.1 0 15.9-1 23.4-2.9c-36.6 18.1-63.3 53.1-69.8 94.9l-24.4 17c-4.5 3.2-10.3 3.8-15.4 1.6s-8.7-6.7-9.6-12.1L98.1 317.9 13.4 303.8c-5.4-.9-10-4.5-12.1-9.6s-1.5-10.9 1.6-15.4L52.5 208 2.9 137.2c-3.2-4.5-3.8-10.3-1.6-15.4s6.7-8.7 12.1-9.6L98.1 98.1l14.1-84.7c.9-5.4 4.5-10 9.6-12.1s10.9-1.5 15.4 1.6L208 52.5 278.8 2.9c4.5-3.2 10.3-3.8 15.4-1.6zM144 208a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM639.9 431.9c0 44.2-35.8 80-80 80l-271.9 0c-53 0-96-43-96-96c0-47.6 34.6-87 80-94.6l0-1.3c0-53 43-96 96-96c34.9 0 65.4 18.6 82.2 46.4c13-9.1 28.8-14.4 45.8-14.4c44.2 0 80 35.8 80 80c0 5.9-.6 11.7-1.9 17.2c37.4 6.7 65.8 39.4 65.8 78.7z\"]\n};\nconst faStopwatch20 = {\n  prefix: 'fas',\n  iconName: 'stopwatch-20',\n  icon: [448, 512, [], \"e06f\", \"M176 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l16 0 0 34.4C92.3 113.8 16 200 16 304c0 114.9 93.1 208 208 208s208-93.1 208-208c0-41.8-12.3-80.7-33.5-113.2l24.1-24.1c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L355.7 143c-28.1-23-62.2-38.8-99.7-44.6L256 64l16 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L176 0zM288 204c28.7 0 52 23.3 52 52l0 96c0 28.7-23.3 52-52 52s-52-23.3-52-52l0-96c0-28.7 23.3-52 52-52zm-12 52l0 96c0 6.6 5.4 12 12 12s12-5.4 12-12l0-96c0-6.6-5.4-12-12-12s-12 5.4-12 12zM159.5 244c-5.4 0-10.2 3.5-11.9 8.6l-.6 1.7c-3.5 10.5-14.8 16.1-25.3 12.6s-16.1-14.8-12.6-25.3l.6-1.7c7.2-21.5 27.2-35.9 49.8-35.9c29 0 52.5 23.5 52.5 52.5l0 2.2c0 13.4-4.9 26.4-13.8 36.4l-39 43.9c-6.2 7-10 15.7-10.9 24.9l43.8 0c11 0 20 9 20 20s-9 20-20 20l-64 0c-11 0-20-9-20-20l0-15.7c0-20.6 7.5-40.4 21.2-55.8l39-43.9c2.4-2.7 3.7-6.2 3.7-9.8l0-2.2c0-6.9-5.6-12.5-12.5-12.5z\"]\n};\nconst faSquareFull = {\n  prefix: 'fas',\n  iconName: 'square-full',\n  icon: [512, 512, [128997, 128998, 128999, 129000, 129001, 129002, 129003, 11035, 11036], \"f45c\", \"M0 0H512V512H0V0z\"]\n};\nconst faMagnet = {\n  prefix: 'fas',\n  iconName: 'magnet',\n  icon: [448, 512, [129522], \"f076\", \"M0 160l0 96C0 379.7 100.3 480 224 480s224-100.3 224-224l0-96-128 0 0 96c0 53-43 96-96 96s-96-43-96-96l0-96L0 160zm0-32l128 0 0-64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64l0 64zm320 0l128 0 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64z\"]\n};\nconst faJar = {\n  prefix: 'fas',\n  iconName: 'jar',\n  icon: [320, 512, [], \"e516\", \"M32 32C32 14.3 46.3 0 64 0L256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L64 64C46.3 64 32 49.7 32 32zM0 160c0-35.3 28.7-64 64-64l192 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 160zm96 64c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-96c0-17.7-14.3-32-32-32L96 224z\"]\n};\nconst faNoteSticky = {\n  prefix: 'fas',\n  iconName: 'note-sticky',\n  icon: [448, 512, [62026, \"sticky-note\"], \"f249\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l224 0 0-112c0-26.5 21.5-48 48-48l112 0 0-224c0-35.3-28.7-64-64-64L64 32zM448 352l-45.3 0L336 352c-8.8 0-16 7.2-16 16l0 66.7 0 45.3 32-32 64-64 32-32z\"]\n};\nconst faStickyNote = faNoteSticky;\nconst faBugSlash = {\n  prefix: 'fas',\n  iconName: 'bug-slash',\n  icon: [640, 512, [], \"e490\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L477.4 348.9c1.7-9.4 2.6-19 2.6-28.9l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64.3 0c-1.1-14.1-5-27.5-11.1-39.5c.7-.6 1.4-1.2 2.1-1.9l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-.7 .7-1.3 1.4-1.9 2.1C409.2 164.1 393.1 160 376 160l-112 0c-8.3 0-16.3 1-24 2.8L38.8 5.1zM320 0c-53 0-96 43-96 96l0 3.6c0 15.7 12.7 28.4 28.4 28.4l135.1 0c15.7 0 28.4-12.7 28.4-28.4l0-3.6c0-53-43-96-96-96zM160.3 256L96 256c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c0 24.6 5.5 47.8 15.4 68.6c-2.2 1.3-4.2 2.9-6 4.8l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l63.1-63.1c24.5 21.8 55.8 36.2 90.3 39.6l0-143.7L166.7 227.3c-3.4 9-5.6 18.7-6.4 28.7zM336 479.2c36.6-3.6 69.7-19.6 94.8-43.8L336 360.7l0 118.5z\"]\n};\nconst faArrowUpFromWaterPump = {\n  prefix: 'fas',\n  iconName: 'arrow-up-from-water-pump',\n  icon: [576, 512, [], \"e4b6\", \"M112 0C85.5 0 64 21.5 64 48l0 208-16 0c-26.5 0-48 21.5-48 48l0 96c0 8 2 15.6 5.4 22.2c3.8-1.7 7.8-3.1 12-4.1c13.1-3.1 26.7-9.8 37.3-18.6c22.2-18.7 54.3-20.1 78.1-3.4c18 12.4 40.1 20.3 59.2 20.3c21.1 0 42-8.5 59.2-20.3c22.1-15.5 51.6-15.5 73.7 0c18.4 12.7 39.6 20.3 59.2 20.3c19 0 41.2-7.9 59.2-20.3c23.8-16.7 55.8-15.3 78.1 3.4c10.6 8.8 24.2 15.6 37.3 18.6c4.2 1 8.2 2.4 12 4.1C574 415.6 576 408 576 400l0-96c0-26.5-21.5-48-48-48l-48 0 0-146.7 25.4 25.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-80-80c-12.5-12.5-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 109.3 416 256l-128 0 0-208c0-26.5-21.5-48-48-48L112 0zM306.5 421.9c-11.1-7.9-25.9-7.9-37 0C247 437.4 219.5 448 192 448c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C126.5 501.7 159 512 192 512c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.4-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 437.2 410.9 448 384 448c-27.5 0-55-10.6-77.5-26.1z\"]\n};\nconst faBone = {\n  prefix: 'fas',\n  iconName: 'bone',\n  icon: [576, 512, [129460], \"f5d7\", \"M153.7 144.8c6.9 16.3 20.6 31.2 38.3 31.2l192 0c17.7 0 31.4-14.9 38.3-31.2C434.4 116.1 462.9 96 496 96c44.2 0 80 35.8 80 80c0 30.4-17 56.9-42 70.4c-3.6 1.9-6 5.5-6 9.6s2.4 7.7 6 9.6c25 13.5 42 40 42 70.4c0 44.2-35.8 80-80 80c-33.1 0-61.6-20.1-73.7-48.8C415.4 350.9 401.7 336 384 336l-192 0c-17.7 0-31.4 14.9-38.3 31.2C141.6 395.9 113.1 416 80 416c-44.2 0-80-35.8-80-80c0-30.4 17-56.9 42-70.4c3.6-1.9 6-5.5 6-9.6s-2.4-7.7-6-9.6C17 232.9 0 206.4 0 176c0-44.2 35.8-80 80-80c33.1 0 61.6 20.1 73.7 48.8z\"]\n};\nconst faTableCellsRowUnlock = {\n  prefix: 'fas',\n  iconName: 'table-cells-row-unlock',\n  icon: [640, 512, [], \"e691\", \"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 65.1c-37.8 5.4-69.4 29.6-85.2 62.9L360 224l0 64 56 0 0 8.6c-19.1 11.1-32 31.7-32 55.4l-24 0 0 64 24 0 0 64L64 480c-35.3 0-64-28.7-64-64L0 96zM64 224l0 64 88 0 0-64-88 0zm232 0l-88 0 0 64 88 0 0-64zM152 352l-88 0 0 64 88 0 0-64zm56 0l0 64 88 0 0-64-88 0zm288-80l0 48 32 0 32 0 48 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32l0-48c0-44.2 35.8-80 80-80s80 35.8 80 80l-48 0c0-17.7-14.3-32-32-32s-32 14.3-32 32z\"]\n};\nconst faUserInjured = {\n  prefix: 'fas',\n  iconName: 'user-injured',\n  icon: [448, 512, [], \"f728\", \"M240 80l102.7 0c-7.9-19.5-20.4-36.5-36.2-49.9L240 80zm37.7-68.2C261.3 4.2 243.2 0 224 0c-53.7 0-99.7 33.1-118.7 80l81.4 0 91-68.2zM224 256c70.7 0 128-57.3 128-128c0-5.4-.3-10.8-1-16L97 112c-.7 5.2-1 10.6-1 16c0 70.7 57.3 128 128 128zM124 312.4c-9.7 3.1-19.1 7-28 11.7L96 512l147.7 0L181.5 408.2 124 312.4zm33-7.2L204.3 384l67.7 0c44.2 0 80 35.8 80 80c0 18-6 34.6-16 48l82.3 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0c-7.2 0-14.3 .4-21.3 1.3zM0 482.3C0 498.7 13.3 512 29.7 512L64 512l0-166.6C24.9 378.1 0 427.3 0 482.3zM320 464c0-26.5-21.5-48-48-48l-48.5 0 57.1 95.2C303 507.2 320 487.6 320 464z\"]\n};\nconst faFaceSadTear = {\n  prefix: 'fas',\n  iconName: 'face-sad-tear',\n  icon: [512, 512, [128546, \"sad-tear\"], \"f5b4\", \"M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zm240 80c0-8.8 7.2-16 16-16c45 0 85.6 20.5 115.7 53.1c6 6.5 5.6 16.6-.9 22.6s-16.6 5.6-22.6-.9c-25-27.1-57.4-42.9-92.3-42.9c-8.8 0-16-7.2-16-16zm-80 80c-26.5 0-48-21-48-47c0-20 28.6-60.4 41.6-77.7c3.2-4.4 9.6-4.4 12.8 0C179.6 308.6 208 349 208 369c0 26-21.5 47-48 47zM367.6 208a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm-192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faSadTear = faFaceSadTear;\nconst faPlane = {\n  prefix: 'fas',\n  iconName: 'plane',\n  icon: [576, 512, [], \"f072\", \"M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.2-15.4-20.4l49-171.6L112 320 68.8 377.6c-3 4-7.8 6.4-12.8 6.4l-42 0c-7.8 0-14-6.3-14-14c0-1.3 .2-2.6 .5-3.9L32 256 .5 145.9c-.4-1.3-.5-2.6-.5-3.9c0-7.8 6.3-14 14-14l42 0c5 0 9.8 2.4 12.8 6.4L112 192l102.9 0-49-171.6C162.9 10.2 170.6 0 181.2 0l56.2 0c11.5 0 22.1 6.2 27.8 16.1L365.7 192l116.6 0z\"]\n};\nconst faTentArrowsDown = {\n  prefix: 'fas',\n  iconName: 'tent-arrows-down',\n  icon: [576, 512, [], \"e581\", \"M209.8 111.9c-8.9-9.9-24-10.7-33.9-1.8l-39.9 36L136 24c0-13.3-10.7-24-24-24S88 10.7 88 24l0 122.1-39.9-36c-9.9-8.9-25-8.1-33.9 1.8s-8.1 25 1.8 33.9l80 72c9.1 8.2 23 8.2 32.1 0l80-72c9.9-8.9 10.7-24 1.8-33.9zm352 0c-8.9-9.9-24-10.7-33.9-1.8l-39.9 36L488 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 122.1-39.9-36c-9.9-8.9-25-8.1-33.9 1.8s-8.1 25 1.8 33.9l80 72c9.1 8.2 23 8.2 32.1 0l80-72c9.9-8.9 10.7-24 1.8-33.9zM307.4 166.5c-11.5-8.7-27.3-8.7-38.8 0l-168 128c-6.6 5-11 12.5-12.3 20.7l-24 160c-1.4 9.2 1.3 18.6 7.4 25.6S86.7 512 96 512l144 0 16 0c17.7 0 32-14.3 32-32l0-118.1c0-5.5 4.4-9.9 9.9-9.9c3.7 0 7.2 2.1 8.8 5.5l68.4 136.8c5.4 10.8 16.5 17.7 28.6 17.7l60.2 0 16 0c9.3 0 18.2-4.1 24.2-11.1s8.8-16.4 7.4-25.6l-24-160c-1.2-8.2-5.6-15.7-12.3-20.7l-168-128z\"]\n};\nconst faExclamation = {\n  prefix: 'fas',\n  iconName: 'exclamation',\n  icon: [128, 512, [10069, 10071, 61738], \"21\", \"M96 64c0-17.7-14.3-32-32-32S32 46.3 32 64l0 256c0 17.7 14.3 32 32 32s32-14.3 32-32L96 64zM64 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\"]\n};\nconst faArrowsSpin = {\n  prefix: 'fas',\n  iconName: 'arrows-spin',\n  icon: [512, 512, [], \"e4bb\", \"M256 96c38.4 0 73.7 13.5 101.3 36.1l-32.6 32.6c-4.6 4.6-5.9 11.5-3.5 17.4s8.3 9.9 14.8 9.9l112 0c8.8 0 16-7.2 16-16l0-112c0-6.5-3.9-12.3-9.9-14.8s-12.9-1.1-17.4 3.5l-34 34C363.4 52.6 312.1 32 256 32c-10.9 0-21.5 .8-32 2.3l0 64.9c10.3-2.1 21-3.2 32-3.2zM132.1 154.7l32.6 32.6c4.6 4.6 11.5 5.9 17.4 3.5s9.9-8.3 9.9-14.8l0-112c0-8.8-7.2-16-16-16L64 48c-6.5 0-12.3 3.9-14.8 9.9s-1.1 12.9 3.5 17.4l34 34C52.6 148.6 32 199.9 32 256c0 10.9 .8 21.5 2.3 32l64.9 0c-2.1-10.3-3.2-21-3.2-32c0-38.4 13.5-73.7 36.1-101.3zM477.7 224l-64.9 0c2.1 10.3 3.2 21 3.2 32c0 38.4-13.5 73.7-36.1 101.3l-32.6-32.6c-4.6-4.6-11.5-5.9-17.4-3.5s-9.9 8.3-9.9 14.8l0 112c0 8.8 7.2 16 16 16l112 0c6.5 0 12.3-3.9 14.8-9.9s1.1-12.9-3.5-17.4l-34-34C459.4 363.4 480 312.1 480 256c0-10.9-.8-21.5-2.3-32zM256 416c-38.4 0-73.7-13.5-101.3-36.1l32.6-32.6c4.6-4.6 5.9-11.5 3.5-17.4s-8.3-9.9-14.8-9.9L64 320c-8.8 0-16 7.2-16 16l0 112c0 6.5 3.9 12.3 9.9 14.8s12.9 1.1 17.4-3.5l34-34C148.6 459.4 199.9 480 256 480c10.9 0 21.5-.8 32-2.3l0-64.9c-10.3 2.1-21 3.2-32 3.2z\"]\n};\nconst faPrint = {\n  prefix: 'fas',\n  iconName: 'print',\n  icon: [512, 512, [128424, 128438, 9113], \"f02f\", \"M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faTurkishLiraSign = {\n  prefix: 'fas',\n  iconName: 'turkish-lira-sign',\n  icon: [384, 512, [\"try\", \"turkish-lira\"], \"e2bb\", \"M96 32c17.7 0 32 14.3 32 32l0 35.3L247.2 65.2c17-4.9 34.7 5 39.6 22s-5 34.7-22 39.6L128 165.9l0 29.4 119.2-34.1c17-4.9 34.7 5 39.6 22s-5 34.7-22 39.6L128 261.9 128 416l63.8 0c68.2 0 124.4-53.5 127.8-121.6l.4-8c.9-17.7 15.9-31.2 33.6-30.4s31.2 15.9 30.4 33.6l-.4 8C378.5 399.8 294.1 480 191.8 480L96 480c-17.7 0-32-14.3-32-32l0-167.9-23.2 6.6c-17 4.9-34.7-5-39.6-22s5-34.7 22-39.6L64 213.6l0-29.4-23.2 6.6c-17 4.9-34.7-5-39.6-22s5-34.7 22-39.6L64 117.6 64 64c0-17.7 14.3-32 32-32z\"]\n};\nconst faTry = faTurkishLiraSign;\nconst faTurkishLira = faTurkishLiraSign;\nconst faDollarSign = {\n  prefix: 'fas',\n  iconName: 'dollar-sign',\n  icon: [320, 512, [128178, 61781, \"dollar\", \"usd\"], \"24\", \"M160 0c17.7 0 32 14.3 32 32l0 35.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11l0 33.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.9c-.4-.1-.9-.1-1.3-.2l-.2 0s0 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7s0 0 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11L128 32c0-17.7 14.3-32 32-32z\"]\n};\nconst faDollar = faDollarSign;\nconst faUsd = faDollarSign;\nconst faX = {\n  prefix: 'fas',\n  iconName: 'x',\n  icon: [384, 512, [120], \"58\", \"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z\"]\n};\nconst faMagnifyingGlassDollar = {\n  prefix: 'fas',\n  iconName: 'magnifying-glass-dollar',\n  icon: [512, 512, [\"search-dollar\"], \"f688\", \"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM228 104c0-11-9-20-20-20s-20 9-20 20l0 14c-7.6 1.7-15.2 4.4-22.2 8.5c-13.9 8.3-25.9 22.8-25.8 43.9c.1 20.3 12 33.1 24.7 40.7c11 6.6 24.7 10.8 35.6 14l1.7 .5c12.6 3.8 21.8 6.8 28 10.7c5.1 3.2 5.8 5.4 5.9 8.2c.1 5-1.8 8-5.9 10.5c-5 3.1-12.9 5-21.4 4.7c-11.1-.4-21.5-3.9-35.1-8.5c-2.3-.8-4.7-1.6-7.2-2.4c-10.5-3.5-21.8 2.2-25.3 12.6s2.2 21.8 12.6 25.3c1.9 .6 4 1.3 6.1 2.1c0 0 0 0 0 0s0 0 0 0c8.3 2.9 17.9 6.2 28.2 8.4l0 14.6c0 11 9 20 20 20s20-9 20-20l0-13.8c8-1.7 16-4.5 23.2-9c14.3-8.9 25.1-24.1 24.8-45c-.3-20.3-11.7-33.4-24.6-41.6c-11.5-7.2-25.9-11.6-37.1-15l-.7-.2c-12.8-3.9-21.9-6.7-28.3-10.5c-5.2-3.1-5.3-4.9-5.3-6.7c0-3.7 1.4-6.5 6.2-9.3c5.4-3.2 13.6-5.1 21.5-5c9.6 .1 20.2 2.2 31.2 5.2c10.7 2.8 21.6-3.5 24.5-14.2s-3.5-21.6-14.2-24.5c-6.5-1.7-13.7-3.4-21.1-4.7l0-13.9z\"]\n};\nconst faSearchDollar = faMagnifyingGlassDollar;\nconst faUsersGear = {\n  prefix: 'fas',\n  iconName: 'users-gear',\n  icon: [640, 512, [\"users-cog\"], \"f509\", \"M144 160A80 80 0 1 0 144 0a80 80 0 1 0 0 160zm368 0A80 80 0 1 0 512 0a80 80 0 1 0 0 160zM0 298.7C0 310.4 9.6 320 21.3 320l213.3 0c.2 0 .4 0 .7 0c-26.6-23.5-43.3-57.8-43.3-96c0-7.6 .7-15 1.9-22.3c-13.6-6.3-28.7-9.7-44.6-9.7l-42.7 0C47.8 192 0 239.8 0 298.7zM320 320c24 0 45.9-8.8 62.7-23.3c2.5-3.7 5.2-7.3 8-10.7c2.7-3.3 5.7-6.1 9-8.3C410 262.3 416 243.9 416 224c0-53-43-96-96-96s-96 43-96 96s43 96 96 96zm65.4 60.2c-10.3-5.9-18.1-16.2-20.8-28.2l-103.2 0C187.7 352 128 411.7 128 485.3c0 14.7 11.9 26.7 26.7 26.7l300.6 0c-2.1-5.2-3.2-10.9-3.2-16.4l0-3c-1.3-.7-2.7-1.5-4-2.3l-2.6 1.5c-16.8 9.7-40.5 8-54.7-9.7c-4.5-5.6-8.6-11.5-12.4-17.6l-.1-.2-.1-.2-2.4-4.1-.1-.2-.1-.2c-3.4-6.2-6.4-12.6-9-19.3c-8.2-21.2 2.2-42.6 19-52.3l2.7-1.5c0-.8 0-1.5 0-2.3s0-1.5 0-2.3l-2.7-1.5zM533.3 192l-42.7 0c-15.9 0-31 3.5-44.6 9.7c1.3 7.2 1.9 14.7 1.9 22.3c0 17.4-3.5 33.9-9.7 49c2.5 .9 4.9 2 7.1 3.3l2.6 1.5c1.3-.8 2.6-1.6 4-2.3l0-3c0-19.4 13.3-39.1 35.8-42.6c7.9-1.2 16-1.9 24.2-1.9s16.3 .6 24.2 1.9c22.5 3.5 35.8 23.2 35.8 42.6l0 3c1.3 .7 2.7 1.5 4 2.3l2.6-1.5c16.8-9.7 40.5-8 54.7 9.7c2.3 2.8 4.5 5.8 6.6 8.7c-2.1-57.1-49-102.7-106.6-102.7zm91.3 163.9c6.3-3.6 9.5-11.1 6.8-18c-2.1-5.5-4.6-10.8-7.4-15.9l-2.3-4c-3.1-5.1-6.5-9.9-10.2-14.5c-4.6-5.7-12.7-6.7-19-3l-2.9 1.7c-9.2 5.3-20.4 4-29.6-1.3s-16.1-14.5-16.1-25.1l0-3.4c0-7.3-4.9-13.8-12.1-14.9c-6.5-1-13.1-1.5-19.9-1.5s-13.4 .5-19.9 1.5c-7.2 1.1-12.1 7.6-12.1 14.9l0 3.4c0 10.6-6.9 19.8-16.1 25.1s-20.4 6.6-29.6 1.3l-2.9-1.7c-6.3-3.6-14.4-2.6-19 3c-3.7 4.6-7.1 9.5-10.2 14.6l-2.3 3.9c-2.8 5.1-5.3 10.4-7.4 15.9c-2.6 6.8 .5 14.3 6.8 17.9l2.9 1.7c9.2 5.3 13.7 15.8 13.7 26.4s-4.5 21.1-13.7 26.4l-3 1.7c-6.3 3.6-9.5 11.1-6.8 17.9c2.1 5.5 4.6 10.7 7.4 15.8l2.4 4.1c3 5.1 6.4 9.9 10.1 14.5c4.6 5.7 12.7 6.7 19 3l2.9-1.7c9.2-5.3 20.4-4 29.6 1.3s16.1 14.5 16.1 25.1l0 3.4c0 7.3 4.9 13.8 12.1 14.9c6.5 1 13.1 1.5 19.9 1.5s13.4-.5 19.9-1.5c7.2-1.1 12.1-7.6 12.1-14.9l0-3.4c0-10.6 6.9-19.8 16.1-25.1s20.4-6.6 29.6-1.3l2.9 1.7c6.3 3.6 14.4 2.6 19-3c3.7-4.6 7.1-9.4 10.1-14.5l2.4-4.2c2.8-5.1 5.3-10.3 7.4-15.8c2.6-6.8-.5-14.3-6.8-17.9l-3-1.7c-9.2-5.3-13.7-15.8-13.7-26.4s4.5-21.1 13.7-26.4l3-1.7zM472 384a40 40 0 1 1 80 0 40 40 0 1 1 -80 0z\"]\n};\nconst faUsersCog = faUsersGear;\nconst faPersonMilitaryPointing = {\n  prefix: 'fas',\n  iconName: 'person-military-pointing',\n  icon: [576, 512, [], \"e54a\", \"M246.9 14.1C234 15.2 224 26 224 39c0 13.8 11.2 25 25 25l151 0c8.8 0 16-7.2 16-16l0-30.6C416 8 408 .7 398.7 1.4L246.9 14.1zM240 112c0 44.2 35.8 80 80 80s80-35.8 80-80c0-5.5-.6-10.8-1.6-16L241.6 96c-1 5.2-1.6 10.5-1.6 16zM72 224c-22.1 0-40 17.9-40 40s17.9 40 40 40l152 0 0 89.4L386.8 230.5c-13.3-4.3-27.3-6.5-41.6-6.5L240 224 72 224zm345.7 20.9L246.6 416 416 416l0-46.3 53.6 90.6c11.2 19 35.8 25.3 54.8 14.1s25.3-35.8 14.1-54.8L462.3 290.8c-11.2-18.9-26.6-34.5-44.6-45.9zM224 448l0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32-192 0z\"]\n};\nconst faBuildingColumns = {\n  prefix: 'fas',\n  iconName: 'building-columns',\n  icon: [512, 512, [\"bank\", \"institution\", \"museum\", \"university\"], \"f19c\", \"M243.4 2.6l-224 96c-14 6-21.8 21-18.7 35.8S16.8 160 32 160l0 8c0 13.3 10.7 24 24 24l400 0c13.3 0 24-10.7 24-24l0-8c15.2 0 28.3-10.7 31.3-25.6s-4.8-29.9-18.7-35.8l-224-96c-8-3.4-17.2-3.4-25.2 0zM128 224l-64 0 0 196.3c-.6 .3-1.2 .7-1.8 1.1l-48 32c-11.7 7.8-17 22.4-12.9 35.9S17.9 512 32 512l448 0c14.1 0 26.5-9.2 30.6-22.7s-1.1-28.1-12.9-35.9l-48-32c-.6-.4-1.2-.7-1.8-1.1L448 224l-64 0 0 192-40 0 0-192-64 0 0 192-48 0 0-192-64 0 0 192-40 0 0-192zM256 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faBank = faBuildingColumns;\nconst faInstitution = faBuildingColumns;\nconst faMuseum = faBuildingColumns;\nconst faUniversity = faBuildingColumns;\nconst faUmbrella = {\n  prefix: 'fas',\n  iconName: 'umbrella',\n  icon: [576, 512, [], \"f0e9\", \"M288 0c17.7 0 32 14.3 32 32l0 17.7C451.8 63.4 557.7 161 573.9 285.9c2 15.6-17.3 24.4-27.8 12.7C532.1 283 504.8 272 480 272c-38.7 0-71 27.5-78.4 64.1c-1.7 8.7-8.7 15.9-17.6 15.9s-15.8-7.2-17.6-15.9C359 299.5 326.7 272 288 272s-71 27.5-78.4 64.1c-1.7 8.7-8.7 15.9-17.6 15.9s-15.8-7.2-17.6-15.9C167 299.5 134.7 272 96 272c-24.8 0-52.1 11-66.1 26.7C19.4 310.4 .1 301.5 2.1 285.9C18.3 161 124.2 63.4 256 49.7L256 32c0-17.7 14.3-32 32-32zm0 304c12.3 0 23.5 4.6 32 12.2l0 114.3c0 45-36.5 81.4-81.4 81.4c-30.8 0-59-17.4-72.8-45l-2.3-4.7c-7.9-15.8-1.5-35 14.3-42.9s35-1.5 42.9 14.3l2.3 4.7c3 5.9 9 9.6 15.6 9.6c9.6 0 17.4-7.8 17.4-17.4l0-114.3c8.5-7.6 19.7-12.2 32-12.2z\"]\n};\nconst faTrowel = {\n  prefix: 'fas',\n  iconName: 'trowel',\n  icon: [512, 512, [], \"e589\", \"M343.9 213.4L245.3 312l65.4 65.4c7.9 7.9 11.1 19.4 8.4 30.3s-10.8 19.6-21.5 22.9l-256 80c-11.4 3.5-23.8 .5-32.2-7.9S-2.1 481.8 1.5 470.5l80-256c3.3-10.7 12-18.9 22.9-21.5s22.4 .5 30.3 8.4L200 266.7l98.6-98.6c-14.3-14.6-14.2-38 .3-52.5l95.4-95.4c26.9-26.9 70.5-26.9 97.5 0s26.9 70.5 0 97.5l-95.4 95.4c-14.5 14.5-37.9 14.6-52.5 .3z\"]\n};\nconst faD = {\n  prefix: 'fas',\n  iconName: 'd',\n  icon: [384, 512, [100], \"44\", \"M0 96C0 60.7 28.7 32 64 32l96 0c123.7 0 224 100.3 224 224s-100.3 224-224 224l-96 0c-35.3 0-64-28.7-64-64L0 96zm160 0L64 96l0 320 96 0c88.4 0 160-71.6 160-160s-71.6-160-160-160z\"]\n};\nconst faStapler = {\n  prefix: 'fas',\n  iconName: 'stapler',\n  icon: [640, 512, [], \"e5af\", \"M640 299.3l0 4.7 0 128c0 26.5-21.5 48-48 48l-80 0-64 0L64 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0 0-48L96 368c-17.7 0-32-14.3-32-32l0-116.6L33.8 214C14.2 210.5 0 193.5 0 173.7c0-8.9 2.9-17.5 8.2-24.6l35.6-47.5C76.7 57.8 128.2 32 182.9 32c27 0 53.6 6.3 77.8 18.4L586.9 213.5C619.5 229.7 640 263 640 299.3zM448 304l0-16L128 230.9l0 73.1 320 0z\"]\n};\nconst faMasksTheater = {\n  prefix: 'fas',\n  iconName: 'masks-theater',\n  icon: [640, 512, [127917, \"theater-masks\"], \"f630\", \"M74.6 373.2c41.7 36.1 108 82.5 166.1 73.7c6.1-.9 12.1-2.5 18-4.5c-9.2-12.3-17.3-24.4-24.2-35.4c-21.9-35-28.8-75.2-25.9-113.6c-20.6 4.1-39.2 13-54.7 25.4c-6.5 5.2-16.3 1.3-14.8-7c6.4-33.5 33-60.9 68.2-66.3c2.6-.4 5.3-.7 7.9-.8l19.4-131.3c2-13.8 8-32.7 25-45.9C278.2 53.2 310.5 37 363.2 32.2c-.8-.7-1.6-1.4-2.4-2.1C340.6 14.5 288.4-11.5 175.7 5.6S20.5 63 5.7 83.9C0 91.9-.8 102 .6 111.8L24.8 276.1c5.5 37.3 21.5 72.6 49.8 97.2zm87.7-219.6c4.4-3.1 10.8-2 11.8 3.3c.1 .5 .2 1.1 .3 1.6c3.2 21.8-11.6 42-33.1 45.3s-41.5-11.8-44.7-33.5c-.1-.5-.1-1.1-.2-1.6c-.6-5.4 5.2-8.4 10.3-6.7c9 3 18.8 3.9 28.7 2.4s19.1-5.3 26.8-10.8zM261.6 390c29.4 46.9 79.5 110.9 137.6 119.7s124.5-37.5 166.1-73.7c28.3-24.5 44.3-59.8 49.8-97.2l24.2-164.3c1.4-9.8 .6-19.9-5.1-27.9c-14.8-20.9-57.3-61.2-170-78.3S299.4 77.2 279.2 92.8c-7.8 6-11.5 15.4-12.9 25.2L242.1 282.3c-5.5 37.3-.4 75.8 19.6 107.7zM404.5 235.3c-7.7-5.5-16.8-9.3-26.8-10.8s-19.8-.6-28.7 2.4c-5.1 1.7-10.9-1.3-10.3-6.7c.1-.5 .1-1.1 .2-1.6c3.2-21.8 23.2-36.8 44.7-33.5s36.3 23.5 33.1 45.3c-.1 .5-.2 1.1-.3 1.6c-1 5.3-7.4 6.4-11.8 3.3zm136.2 15.5c-1 5.3-7.4 6.4-11.8 3.3c-7.7-5.5-16.8-9.3-26.8-10.8s-19.8-.6-28.7 2.4c-5.1 1.7-10.9-1.3-10.3-6.7c.1-.5 .1-1.1 .2-1.6c3.2-21.8 23.2-36.8 44.7-33.5s36.3 23.5 33.1 45.3c-.1 .5-.2 1.1-.3 1.6zM530 350.2c-19.6 44.7-66.8 72.5-116.8 64.9s-87.1-48.2-93-96.7c-1-8.3 8.9-12.1 15.2-6.7c23.9 20.8 53.6 35.3 87 40.3s66.1 .1 94.9-12.8c7.6-3.4 16 3.2 12.6 10.9z\"]\n};\nconst faTheaterMasks = faMasksTheater;\nconst faKipSign = {\n  prefix: 'fas',\n  iconName: 'kip-sign',\n  icon: [384, 512, [], \"e1c4\", \"M340.8 88.3c13.4-11.5 15-31.7 3.5-45.1s-31.7-15-45.1-3.5L128 186.4 128 64c0-17.7-14.3-32-32-32S64 46.3 64 64l0 160-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-122.4L299.2 472.3c13.4 11.5 33.6 9.9 45.1-3.5s9.9-33.6-3.5-45.1L182.5 288 352 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-169.5 0L340.8 88.3z\"]\n};\nconst faHandPointLeft = {\n  prefix: 'fas',\n  iconName: 'hand-point-left',\n  icon: [512, 512, [], \"f0a5\", \"M32 96C14.3 96 0 110.3 0 128s14.3 32 32 32l208 0 0-64L32 96zM192 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0zm-64-64c0 17.7 14.3 32 32 32l48 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-48 0c-17.7 0-32 14.3-32 32zm96 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0zm88-96l-.6 0c5.4 9.4 8.6 20.3 8.6 32c0 13.2-4 25.4-10.8 35.6c24.9 8.7 42.8 32.5 42.8 60.4c0 11.7-3.1 22.6-8.6 32l8.6 0c88.4 0 160-71.6 160-160l0-61.7c0-42.4-16.9-83.1-46.9-113.1l-11.6-11.6C429.5 77.5 396.9 64 363 64l-27 0c-35.3 0-64 28.7-64 64l0 88c0 22.1 17.9 40 40 40s40-17.9 40-40l0-56c0-8.8 7.2-16 16-16s16 7.2 16 16l0 56c0 39.8-32.2 72-72 72z\"]\n};\nconst faHandshakeSimple = {\n  prefix: 'fas',\n  iconName: 'handshake-simple',\n  icon: [640, 512, [129309, \"handshake-alt\"], \"f4c6\", \"M323.4 85.2l-96.8 78.4c-16.1 13-19.2 36.4-7 53.1c12.9 17.8 38 21.3 55.3 7.8l99.3-77.2c7-5.4 17-4.2 22.5 2.8s4.2 17-2.8 22.5l-20.9 16.2L550.2 352l41.8 0c26.5 0 48-21.5 48-48l0-128c0-26.5-21.5-48-48-48l-76 0-4 0-.7 0-3.9-2.5L434.8 79c-15.3-9.8-33.2-15-51.4-15c-21.8 0-43 7.5-60 21.2zm22.8 124.4l-51.7 40.2C263 274.4 217.3 268 193.7 235.6c-22.2-30.5-16.6-73.1 12.7-96.8l83.2-67.3c-11.6-4.9-24.1-7.4-36.8-7.4C234 64 215.7 69.6 200 80l-72 48-80 0c-26.5 0-48 21.5-48 48L0 304c0 26.5 21.5 48 48 48l108.2 0 91.4 83.4c19.6 17.9 49.9 16.5 67.8-3.1c5.5-6.1 9.2-13.2 11.1-20.6l17 15.6c19.5 17.9 49.9 16.6 67.8-2.9c4.5-4.9 7.8-10.6 9.9-16.5c19.4 13 45.8 10.3 62.1-7.5c17.9-19.5 16.6-49.9-2.9-67.8l-134.2-123z\"]\n};\nconst faHandshakeAlt = faHandshakeSimple;\nconst faJetFighter = {\n  prefix: 'fas',\n  iconName: 'jet-fighter',\n  icon: [640, 512, [\"fighter-jet\"], \"f0fb\", \"M160 24c0-13.3 10.7-24 24-24L296 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-16 0L384 192l116.4 0c7.7 0 15.3 1.4 22.5 4.1L625 234.4c9 3.4 15 12 15 21.6s-6 18.2-15 21.6L522.9 315.9c-7.2 2.7-14.8 4.1-22.5 4.1L384 320 280 464l16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-112 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-144-32 0-54.6 54.6c-6 6-14.1 9.4-22.6 9.4L64 384c-17.7 0-32-14.3-32-32l0-64c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-64c0-17.7 14.3-32 32-32l18.7 0c8.5 0 16.6 3.4 22.6 9.4L160 192l32 0 0-144-8 0c-13.3 0-24-10.7-24-24zM80 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0z\"]\n};\nconst faFighterJet = faJetFighter;\nconst faSquareShareNodes = {\n  prefix: 'fas',\n  iconName: 'square-share-nodes',\n  icon: [448, 512, [\"share-alt-square\"], \"f1e1\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM384 160c0 35.3-28.7 64-64 64c-15.4 0-29.5-5.4-40.6-14.5L194.1 256l85.3 46.5c11-9.1 25.2-14.5 40.6-14.5c35.3 0 64 28.7 64 64s-28.7 64-64 64s-64-28.7-64-64c0-2.5 .1-4.9 .4-7.3L174.5 300c-11.7 12.3-28.2 20-46.5 20c-35.3 0-64-28.7-64-64s28.7-64 64-64c18.3 0 34.8 7.7 46.5 20l81.9-44.7c-.3-2.4-.4-4.9-.4-7.3c0-35.3 28.7-64 64-64s64 28.7 64 64z\"]\n};\nconst faShareAltSquare = faSquareShareNodes;\nconst faBarcode = {\n  prefix: 'fas',\n  iconName: 'barcode',\n  icon: [512, 512, [], \"f02a\", \"M24 32C10.7 32 0 42.7 0 56L0 456c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24L64 56c0-13.3-10.7-24-24-24L24 32zm88 0c-8.8 0-16 7.2-16 16l0 416c0 8.8 7.2 16 16 16s16-7.2 16-16l0-416c0-8.8-7.2-16-16-16zm72 0c-13.3 0-24 10.7-24 24l0 400c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-400c0-13.3-10.7-24-24-24l-16 0zm96 0c-13.3 0-24 10.7-24 24l0 400c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-400c0-13.3-10.7-24-24-24l-16 0zM448 56l0 400c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-400c0-13.3-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm-64-8l0 416c0 8.8 7.2 16 16 16s16-7.2 16-16l0-416c0-8.8-7.2-16-16-16s-16 7.2-16 16z\"]\n};\nconst faPlusMinus = {\n  prefix: 'fas',\n  iconName: 'plus-minus',\n  icon: [384, 512, [], \"e43c\", \"M224 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112L48 144c-17.7 0-32 14.3-32 32s14.3 32 32 32l112 0 0 112c0 17.7 14.3 32 32 32s32-14.3 32-32l0-112 112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-112 0 0-112zM0 480c0 17.7 14.3 32 32 32l320 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 448c-17.7 0-32 14.3-32 32z\"]\n};\nconst faVideo = {\n  prefix: 'fas',\n  iconName: 'video',\n  icon: [576, 512, [\"video-camera\"], \"f03d\", \"M0 128C0 92.7 28.7 64 64 64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2l0 256c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1l0-17.1 0-128 0-17.1 14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z\"]\n};\nconst faVideoCamera = faVideo;\nconst faGraduationCap = {\n  prefix: 'fas',\n  iconName: 'graduation-cap',\n  icon: [640, 512, [127891, \"mortar-board\"], \"f19d\", \"M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9l0 28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5l0-24.6c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z\"]\n};\nconst faMortarBoard = faGraduationCap;\nconst faHandHoldingMedical = {\n  prefix: 'fas',\n  iconName: 'hand-holding-medical',\n  icon: [576, 512, [], \"e05c\", \"M224 24l0 56-56 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l56 0 0 56c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-56 56 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-56 0 0-56c0-13.3-10.7-24-24-24L248 0c-13.3 0-24 10.7-24 24zM559.7 392.2c17.8-13.1 21.6-38.1 8.5-55.9s-38.1-21.6-55.9-8.5L392.6 416 272 416c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0-16 0-78.3 0c-29.1 0-57.3 9.9-80 28L68.8 384 32 384c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l160 0 160.5 0c29 0 57.3-9.3 80.7-26.5l126.6-93.3zm-367-8.2l.9 0c0 0 0 0 0 0c-.3 0-.6 0-.9 0z\"]\n};\nconst faPersonCircleCheck = {\n  prefix: 'fas',\n  iconName: 'person-circle-check',\n  icon: [576, 512, [], \"e53e\", \"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-223.1L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6l29.7 0c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9 232 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128-16 0zm136 16a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L416 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z\"]\n};\nconst faTurnUp = {\n  prefix: 'fas',\n  iconName: 'turn-up',\n  icon: [384, 512, [10548, \"level-up-alt\"], \"f3bf\", \"M350 177.5c3.8-8.8 2-19-4.6-26l-136-144C204.9 2.7 198.6 0 192 0s-12.9 2.7-17.4 7.5l-136 144c-6.6 7-8.4 17.2-4.6 26s12.5 14.5 22 14.5l88 0 0 192c0 17.7-14.3 32-32 32l-80 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l80 0c70.7 0 128-57.3 128-128l0-192 88 0c9.6 0 18.2-5.7 22-14.5z\"]\n};\nconst faLevelUpAlt = faTurnUp;\nvar icons = {\n  fa0,\n  fa1,\n  fa2,\n  fa3,\n  fa4,\n  fa5,\n  fa6,\n  fa7,\n  fa8,\n  fa9,\n  faFillDrip,\n  faArrowsToCircle,\n  faCircleChevronRight,\n  faChevronCircleRight,\n  faAt,\n  faTrashCan,\n  faTrashAlt,\n  faTextHeight,\n  faUserXmark,\n  faUserTimes,\n  faStethoscope,\n  faMessage,\n  faCommentAlt,\n  faInfo,\n  faDownLeftAndUpRightToCenter,\n  faCompressAlt,\n  faExplosion,\n  faFileLines,\n  faFileAlt,\n  faFileText,\n  faWaveSquare,\n  faRing,\n  faBuildingUn,\n  faDiceThree,\n  faCalendarDays,\n  faCalendarAlt,\n  faAnchorCircleCheck,\n  faBuildingCircleArrowRight,\n  faVolleyball,\n  faVolleyballBall,\n  faArrowsUpToLine,\n  faSortDown,\n  faSortDesc,\n  faCircleMinus,\n  faMinusCircle,\n  faDoorOpen,\n  faRightFromBracket,\n  faSignOutAlt,\n  faAtom,\n  faSoap,\n  faIcons,\n  faHeartMusicCameraBolt,\n  faMicrophoneLinesSlash,\n  faMicrophoneAltSlash,\n  faBridgeCircleCheck,\n  faPumpMedical,\n  faFingerprint,\n  faHandPointRight,\n  faMagnifyingGlassLocation,\n  faSearchLocation,\n  faForwardStep,\n  faStepForward,\n  faFaceSmileBeam,\n  faSmileBeam,\n  faFlagCheckered,\n  faFootball,\n  faFootballBall,\n  faSchoolCircleExclamation,\n  faCrop,\n  faAnglesDown,\n  faAngleDoubleDown,\n  faUsersRectangle,\n  faPeopleRoof,\n  faPeopleLine,\n  faBeerMugEmpty,\n  faBeer,\n  faDiagramPredecessor,\n  faArrowUpLong,\n  faLongArrowUp,\n  faFireFlameSimple,\n  faBurn,\n  faPerson,\n  faMale,\n  faLaptop,\n  faFileCsv,\n  faMenorah,\n  faTruckPlane,\n  faRecordVinyl,\n  faFaceGrinStars,\n  faGrinStars,\n  faBong,\n  faSpaghettiMonsterFlying,\n  faPastafarianism,\n  faArrowDownUpAcrossLine,\n  faSpoon,\n  faUtensilSpoon,\n  faJarWheat,\n  faEnvelopesBulk,\n  faMailBulk,\n  faFileCircleExclamation,\n  faCircleH,\n  faHospitalSymbol,\n  faPager,\n  faAddressBook,\n  faContactBook,\n  faStrikethrough,\n  faK,\n  faLandmarkFlag,\n  faPencil,\n  faPencilAlt,\n  faBackward,\n  faCaretRight,\n  faComments,\n  faPaste,\n  faFileClipboard,\n  faCodePullRequest,\n  faClipboardList,\n  faTruckRampBox,\n  faTruckLoading,\n  faUserCheck,\n  faVialVirus,\n  faSheetPlastic,\n  faBlog,\n  faUserNinja,\n  faPersonArrowUpFromLine,\n  faScrollTorah,\n  faTorah,\n  faBroomBall,\n  faQuidditch,\n  faQuidditchBroomBall,\n  faToggleOff,\n  faBoxArchive,\n  faArchive,\n  faPersonDrowning,\n  faArrowDown91,\n  faSortNumericDesc,\n  faSortNumericDownAlt,\n  faFaceGrinTongueSquint,\n  faGrinTongueSquint,\n  faSprayCan,\n  faTruckMonster,\n  faW,\n  faEarthAfrica,\n  faGlobeAfrica,\n  faRainbow,\n  faCircleNotch,\n  faTabletScreenButton,\n  faTabletAlt,\n  faPaw,\n  faCloud,\n  faTrowelBricks,\n  faFaceFlushed,\n  faFlushed,\n  faHospitalUser,\n  faTentArrowLeftRight,\n  faGavel,\n  faLegal,\n  faBinoculars,\n  faMicrophoneSlash,\n  faBoxTissue,\n  faMotorcycle,\n  faBellConcierge,\n  faConciergeBell,\n  faPenRuler,\n  faPencilRuler,\n  faPeopleArrows,\n  faPeopleArrowsLeftRight,\n  faMarsAndVenusBurst,\n  faSquareCaretRight,\n  faCaretSquareRight,\n  faScissors,\n  faCut,\n  faSunPlantWilt,\n  faToiletsPortable,\n  faHockeyPuck,\n  faTable,\n  faMagnifyingGlassArrowRight,\n  faTachographDigital,\n  faDigitalTachograph,\n  faUsersSlash,\n  faClover,\n  faReply,\n  faMailReply,\n  faStarAndCrescent,\n  faHouseFire,\n  faSquareMinus,\n  faMinusSquare,\n  faHelicopter,\n  faCompass,\n  faSquareCaretDown,\n  faCaretSquareDown,\n  faFileCircleQuestion,\n  faLaptopCode,\n  faSwatchbook,\n  faPrescriptionBottle,\n  faBars,\n  faNavicon,\n  faPeopleGroup,\n  faHourglassEnd,\n  faHourglass3,\n  faHeartCrack,\n  faHeartBroken,\n  faSquareUpRight,\n  faExternalLinkSquareAlt,\n  faFaceKissBeam,\n  faKissBeam,\n  faFilm,\n  faRulerHorizontal,\n  faPeopleRobbery,\n  faLightbulb,\n  faCaretLeft,\n  faCircleExclamation,\n  faExclamationCircle,\n  faSchoolCircleXmark,\n  faArrowRightFromBracket,\n  faSignOut,\n  faCircleChevronDown,\n  faChevronCircleDown,\n  faUnlockKeyhole,\n  faUnlockAlt,\n  faCloudShowersHeavy,\n  faHeadphonesSimple,\n  faHeadphonesAlt,\n  faSitemap,\n  faCircleDollarToSlot,\n  faDonate,\n  faMemory,\n  faRoadSpikes,\n  faFireBurner,\n  faFlag,\n  faHanukiah,\n  faFeather,\n  faVolumeLow,\n  faVolumeDown,\n  faCommentSlash,\n  faCloudSunRain,\n  faCompress,\n  faWheatAwn,\n  faWheatAlt,\n  faAnkh,\n  faHandsHoldingChild,\n  faAsterisk,\n  faSquareCheck,\n  faCheckSquare,\n  faPesetaSign,\n  faHeading,\n  faHeader,\n  faGhost,\n  faList,\n  faListSquares,\n  faSquarePhoneFlip,\n  faPhoneSquareAlt,\n  faCartPlus,\n  faGamepad,\n  faCircleDot,\n  faDotCircle,\n  faFaceDizzy,\n  faDizzy,\n  faEgg,\n  faHouseMedicalCircleXmark,\n  faCampground,\n  faFolderPlus,\n  faFutbol,\n  faFutbolBall,\n  faSoccerBall,\n  faPaintbrush,\n  faPaintBrush,\n  faLock,\n  faGasPump,\n  faHotTubPerson,\n  faHotTub,\n  faMapLocation,\n  faMapMarked,\n  faHouseFloodWater,\n  faTree,\n  faBridgeLock,\n  faSackDollar,\n  faPenToSquare,\n  faEdit,\n  faCarSide,\n  faShareNodes,\n  faShareAlt,\n  faHeartCircleMinus,\n  faHourglassHalf,\n  faHourglass2,\n  faMicroscope,\n  faSink,\n  faBagShopping,\n  faShoppingBag,\n  faArrowDownZA,\n  faSortAlphaDesc,\n  faSortAlphaDownAlt,\n  faMitten,\n  faPersonRays,\n  faUsers,\n  faEyeSlash,\n  faFlaskVial,\n  faHand,\n  faHandPaper,\n  faOm,\n  faWorm,\n  faHouseCircleXmark,\n  faPlug,\n  faChevronUp,\n  faHandSpock,\n  faStopwatch,\n  faFaceKiss,\n  faKiss,\n  faBridgeCircleXmark,\n  faFaceGrinTongue,\n  faGrinTongue,\n  faChessBishop,\n  faFaceGrinWink,\n  faGrinWink,\n  faEarDeaf,\n  faDeaf,\n  faDeafness,\n  faHardOfHearing,\n  faRoadCircleCheck,\n  faDiceFive,\n  faSquareRss,\n  faRssSquare,\n  faLandMineOn,\n  faICursor,\n  faStamp,\n  faStairs,\n  faI,\n  faHryvniaSign,\n  faHryvnia,\n  faPills,\n  faFaceGrinWide,\n  faGrinAlt,\n  faTooth,\n  faV,\n  faBangladeshiTakaSign,\n  faBicycle,\n  faStaffSnake,\n  faRodAsclepius,\n  faRodSnake,\n  faStaffAesculapius,\n  faHeadSideCoughSlash,\n  faTruckMedical,\n  faAmbulance,\n  faWheatAwnCircleExclamation,\n  faSnowman,\n  faMortarPestle,\n  faRoadBarrier,\n  faSchool,\n  faIgloo,\n  faJoint,\n  faAngleRight,\n  faHorse,\n  faQ,\n  faG,\n  faNotesMedical,\n  faTemperatureHalf,\n  faTemperature2,\n  faThermometer2,\n  faThermometerHalf,\n  faDongSign,\n  faCapsules,\n  faPooStorm,\n  faPooBolt,\n  faFaceFrownOpen,\n  faFrownOpen,\n  faHandPointUp,\n  faMoneyBill,\n  faBookmark,\n  faAlignJustify,\n  faUmbrellaBeach,\n  faHelmetUn,\n  faBullseye,\n  faBacon,\n  faHandPointDown,\n  faArrowUpFromBracket,\n  faFolder,\n  faFolderBlank,\n  faFileWaveform,\n  faFileMedicalAlt,\n  faRadiation,\n  faChartSimple,\n  faMarsStroke,\n  faVial,\n  faGauge,\n  faDashboard,\n  faGaugeMed,\n  faTachometerAltAverage,\n  faWandMagicSparkles,\n  faMagicWandSparkles,\n  faE,\n  faPenClip,\n  faPenAlt,\n  faBridgeCircleExclamation,\n  faUser,\n  faSchoolCircleCheck,\n  faDumpster,\n  faVanShuttle,\n  faShuttleVan,\n  faBuildingUser,\n  faSquareCaretLeft,\n  faCaretSquareLeft,\n  faHighlighter,\n  faKey,\n  faBullhorn,\n  faGlobe,\n  faSynagogue,\n  faPersonHalfDress,\n  faRoadBridge,\n  faLocationArrow,\n  faC,\n  faTabletButton,\n  faBuildingLock,\n  faPizzaSlice,\n  faMoneyBillWave,\n  faChartArea,\n  faAreaChart,\n  faHouseFlag,\n  faPersonCircleMinus,\n  faBan,\n  faCancel,\n  faCameraRotate,\n  faSprayCanSparkles,\n  faAirFreshener,\n  faStar,\n  faRepeat,\n  faCross,\n  faBox,\n  faVenusMars,\n  faArrowPointer,\n  faMousePointer,\n  faMaximize,\n  faExpandArrowsAlt,\n  faChargingStation,\n  faShapes,\n  faTriangleCircleSquare,\n  faShuffle,\n  faRandom,\n  faPersonRunning,\n  faRunning,\n  faMobileRetro,\n  faGripLinesVertical,\n  faSpider,\n  faHandsBound,\n  faFileInvoiceDollar,\n  faPlaneCircleExclamation,\n  faXRay,\n  faSpellCheck,\n  faSlash,\n  faComputerMouse,\n  faMouse,\n  faArrowRightToBracket,\n  faSignIn,\n  faShopSlash,\n  faStoreAltSlash,\n  faServer,\n  faVirusCovidSlash,\n  faShopLock,\n  faHourglassStart,\n  faHourglass1,\n  faBlenderPhone,\n  faBuildingWheat,\n  faPersonBreastfeeding,\n  faRightToBracket,\n  faSignInAlt,\n  faVenus,\n  faPassport,\n  faThumbtackSlash,\n  faThumbTackSlash,\n  faHeartPulse,\n  faHeartbeat,\n  faPeopleCarryBox,\n  faPeopleCarry,\n  faTemperatureHigh,\n  faMicrochip,\n  faCrown,\n  faWeightHanging,\n  faXmarksLines,\n  faFilePrescription,\n  faWeightScale,\n  faWeight,\n  faUserGroup,\n  faUserFriends,\n  faArrowUpAZ,\n  faSortAlphaUp,\n  faChessKnight,\n  faFaceLaughSquint,\n  faLaughSquint,\n  faWheelchair,\n  faCircleArrowUp,\n  faArrowCircleUp,\n  faToggleOn,\n  faPersonWalking,\n  faWalking,\n  faL,\n  faFire,\n  faBedPulse,\n  faProcedures,\n  faShuttleSpace,\n  faSpaceShuttle,\n  faFaceLaugh,\n  faLaugh,\n  faFolderOpen,\n  faHeartCirclePlus,\n  faCodeFork,\n  faCity,\n  faMicrophoneLines,\n  faMicrophoneAlt,\n  faPepperHot,\n  faUnlock,\n  faColonSign,\n  faHeadset,\n  faStoreSlash,\n  faRoadCircleXmark,\n  faUserMinus,\n  faMarsStrokeUp,\n  faMarsStrokeV,\n  faChampagneGlasses,\n  faGlassCheers,\n  faClipboard,\n  faHouseCircleExclamation,\n  faFileArrowUp,\n  faFileUpload,\n  faWifi,\n  faWifi3,\n  faWifiStrong,\n  faBath,\n  faBathtub,\n  faUnderline,\n  faUserPen,\n  faUserEdit,\n  faSignature,\n  faStroopwafel,\n  faBold,\n  faAnchorLock,\n  faBuildingNgo,\n  faManatSign,\n  faNotEqual,\n  faBorderTopLeft,\n  faBorderStyle,\n  faMapLocationDot,\n  faMapMarkedAlt,\n  faJedi,\n  faSquarePollVertical,\n  faPoll,\n  faMugHot,\n  faCarBattery,\n  faBatteryCar,\n  faGift,\n  faDiceTwo,\n  faChessQueen,\n  faGlasses,\n  faChessBoard,\n  faBuildingCircleCheck,\n  faPersonChalkboard,\n  faMarsStrokeRight,\n  faMarsStrokeH,\n  faHandBackFist,\n  faHandRock,\n  faSquareCaretUp,\n  faCaretSquareUp,\n  faCloudShowersWater,\n  faChartBar,\n  faBarChart,\n  faHandsBubbles,\n  faHandsWash,\n  faLessThanEqual,\n  faTrain,\n  faEyeLowVision,\n  faLowVision,\n  faCrow,\n  faSailboat,\n  faWindowRestore,\n  faSquarePlus,\n  faPlusSquare,\n  faToriiGate,\n  faFrog,\n  faBucket,\n  faImage,\n  faMicrophone,\n  faCow,\n  faCaretUp,\n  faScrewdriver,\n  faFolderClosed,\n  faHouseTsunami,\n  faSquareNfi,\n  faArrowUpFromGroundWater,\n  faMartiniGlass,\n  faGlassMartiniAlt,\n  faSquareBinary,\n  faRotateLeft,\n  faRotateBack,\n  faRotateBackward,\n  faUndoAlt,\n  faTableColumns,\n  faColumns,\n  faLemon,\n  faHeadSideMask,\n  faHandshake,\n  faGem,\n  faDolly,\n  faDollyBox,\n  faSmoking,\n  faMinimize,\n  faCompressArrowsAlt,\n  faMonument,\n  faSnowplow,\n  faAnglesRight,\n  faAngleDoubleRight,\n  faCannabis,\n  faCirclePlay,\n  faPlayCircle,\n  faTablets,\n  faEthernet,\n  faEuroSign,\n  faEur,\n  faEuro,\n  faChair,\n  faCircleCheck,\n  faCheckCircle,\n  faCircleStop,\n  faStopCircle,\n  faCompassDrafting,\n  faDraftingCompass,\n  faPlateWheat,\n  faIcicles,\n  faPersonShelter,\n  faNeuter,\n  faIdBadge,\n  faMarker,\n  faFaceLaughBeam,\n  faLaughBeam,\n  faHelicopterSymbol,\n  faUniversalAccess,\n  faCircleChevronUp,\n  faChevronCircleUp,\n  faLariSign,\n  faVolcano,\n  faPersonWalkingDashedLineArrowRight,\n  faSterlingSign,\n  faGbp,\n  faPoundSign,\n  faViruses,\n  faSquarePersonConfined,\n  faUserTie,\n  faArrowDownLong,\n  faLongArrowDown,\n  faTentArrowDownToLine,\n  faCertificate,\n  faReplyAll,\n  faMailReplyAll,\n  faSuitcase,\n  faPersonSkating,\n  faSkating,\n  faFilterCircleDollar,\n  faFunnelDollar,\n  faCameraRetro,\n  faCircleArrowDown,\n  faArrowCircleDown,\n  faFileImport,\n  faArrowRightToFile,\n  faSquareArrowUpRight,\n  faExternalLinkSquare,\n  faBoxOpen,\n  faScroll,\n  faSpa,\n  faLocationPinLock,\n  faPause,\n  faHillAvalanche,\n  faTemperatureEmpty,\n  faTemperature0,\n  faThermometer0,\n  faThermometerEmpty,\n  faBomb,\n  faRegistered,\n  faAddressCard,\n  faContactCard,\n  faVcard,\n  faScaleUnbalancedFlip,\n  faBalanceScaleRight,\n  faSubscript,\n  faDiamondTurnRight,\n  faDirections,\n  faBurst,\n  faHouseLaptop,\n  faLaptopHouse,\n  faFaceTired,\n  faTired,\n  faMoneyBills,\n  faSmog,\n  faCrutch,\n  faFontAwesome,\n  faFontAwesomeFlag,\n  faFontAwesomeLogoFull,\n  faCloudArrowUp,\n  faCloudUpload,\n  faCloudUploadAlt,\n  faPalette,\n  faArrowsTurnRight,\n  faVest,\n  faFerry,\n  faArrowsDownToPeople,\n  faSeedling,\n  faSprout,\n  faLeftRight,\n  faArrowsAltH,\n  faBoxesPacking,\n  faCircleArrowLeft,\n  faArrowCircleLeft,\n  faGroupArrowsRotate,\n  faBowlFood,\n  faCandyCane,\n  faArrowDownWideShort,\n  faSortAmountAsc,\n  faSortAmountDown,\n  faCloudBolt,\n  faThunderstorm,\n  faTextSlash,\n  faRemoveFormat,\n  faFaceSmileWink,\n  faSmileWink,\n  faFileWord,\n  faFilePowerpoint,\n  faArrowsLeftRight,\n  faArrowsH,\n  faHouseLock,\n  faCloudArrowDown,\n  faCloudDownload,\n  faCloudDownloadAlt,\n  faChildren,\n  faChalkboard,\n  faBlackboard,\n  faUserLargeSlash,\n  faUserAltSlash,\n  faEnvelopeOpen,\n  faHandshakeSimpleSlash,\n  faHandshakeAltSlash,\n  faMattressPillow,\n  faGuaraniSign,\n  faArrowsRotate,\n  faRefresh,\n  faSync,\n  faFireExtinguisher,\n  faCruzeiroSign,\n  faGreaterThanEqual,\n  faShieldHalved,\n  faShieldAlt,\n  faBookAtlas,\n  faAtlas,\n  faVirus,\n  faEnvelopeCircleCheck,\n  faLayerGroup,\n  faArrowsToDot,\n  faArchway,\n  faHeartCircleCheck,\n  faHouseChimneyCrack,\n  faHouseDamage,\n  faFileZipper,\n  faFileArchive,\n  faSquare,\n  faMartiniGlassEmpty,\n  faGlassMartini,\n  faCouch,\n  faCediSign,\n  faItalic,\n  faTableCellsColumnLock,\n  faChurch,\n  faCommentsDollar,\n  faDemocrat,\n  faZ,\n  faPersonSkiing,\n  faSkiing,\n  faRoadLock,\n  faA,\n  faTemperatureArrowDown,\n  faTemperatureDown,\n  faFeatherPointed,\n  faFeatherAlt,\n  faP,\n  faSnowflake,\n  faNewspaper,\n  faRectangleAd,\n  faAd,\n  faCircleArrowRight,\n  faArrowCircleRight,\n  faFilterCircleXmark,\n  faLocust,\n  faSort,\n  faUnsorted,\n  faListOl,\n  faList12,\n  faListNumeric,\n  faPersonDressBurst,\n  faMoneyCheckDollar,\n  faMoneyCheckAlt,\n  faVectorSquare,\n  faBreadSlice,\n  faLanguage,\n  faFaceKissWinkHeart,\n  faKissWinkHeart,\n  faFilter,\n  faQuestion,\n  faFileSignature,\n  faUpDownLeftRight,\n  faArrowsAlt,\n  faHouseChimneyUser,\n  faHandHoldingHeart,\n  faPuzzlePiece,\n  faMoneyCheck,\n  faStarHalfStroke,\n  faStarHalfAlt,\n  faCode,\n  faWhiskeyGlass,\n  faGlassWhiskey,\n  faBuildingCircleExclamation,\n  faMagnifyingGlassChart,\n  faArrowUpRightFromSquare,\n  faExternalLink,\n  faCubesStacked,\n  faWonSign,\n  faKrw,\n  faWon,\n  faVirusCovid,\n  faAustralSign,\n  faF,\n  faLeaf,\n  faRoad,\n  faTaxi,\n  faCab,\n  faPersonCirclePlus,\n  faChartPie,\n  faPieChart,\n  faBoltLightning,\n  faSackXmark,\n  faFileExcel,\n  faFileContract,\n  faFishFins,\n  faBuildingFlag,\n  faFaceGrinBeam,\n  faGrinBeam,\n  faObjectUngroup,\n  faPoop,\n  faLocationPin,\n  faMapMarker,\n  faKaaba,\n  faToiletPaper,\n  faHelmetSafety,\n  faHardHat,\n  faHatHard,\n  faEject,\n  faCircleRight,\n  faArrowAltCircleRight,\n  faPlaneCircleCheck,\n  faFaceRollingEyes,\n  faMehRollingEyes,\n  faObjectGroup,\n  faChartLine,\n  faLineChart,\n  faMaskVentilator,\n  faArrowRight,\n  faSignsPost,\n  faMapSigns,\n  faCashRegister,\n  faPersonCircleQuestion,\n  faH,\n  faTarp,\n  faScrewdriverWrench,\n  faTools,\n  faArrowsToEye,\n  faPlugCircleBolt,\n  faHeart,\n  faMarsAndVenus,\n  faHouseUser,\n  faHomeUser,\n  faDumpsterFire,\n  faHouseCrack,\n  faMartiniGlassCitrus,\n  faCocktail,\n  faFaceSurprise,\n  faSurprise,\n  faBottleWater,\n  faCirclePause,\n  faPauseCircle,\n  faToiletPaperSlash,\n  faAppleWhole,\n  faAppleAlt,\n  faKitchenSet,\n  faR,\n  faTemperatureQuarter,\n  faTemperature1,\n  faThermometer1,\n  faThermometerQuarter,\n  faCube,\n  faBitcoinSign,\n  faShieldDog,\n  faSolarPanel,\n  faLockOpen,\n  faElevator,\n  faMoneyBillTransfer,\n  faMoneyBillTrendUp,\n  faHouseFloodWaterCircleArrowRight,\n  faSquarePollHorizontal,\n  faPollH,\n  faCircle,\n  faBackwardFast,\n  faFastBackward,\n  faRecycle,\n  faUserAstronaut,\n  faPlaneSlash,\n  faTrademark,\n  faBasketball,\n  faBasketballBall,\n  faSatelliteDish,\n  faCircleUp,\n  faArrowAltCircleUp,\n  faMobileScreenButton,\n  faMobileAlt,\n  faVolumeHigh,\n  faVolumeUp,\n  faUsersRays,\n  faWallet,\n  faClipboardCheck,\n  faFileAudio,\n  faBurger,\n  faHamburger,\n  faWrench,\n  faBugs,\n  faRupeeSign,\n  faRupee,\n  faFileImage,\n  faCircleQuestion,\n  faQuestionCircle,\n  faPlaneDeparture,\n  faHandshakeSlash,\n  faBookBookmark,\n  faCodeBranch,\n  faHatCowboy,\n  faBridge,\n  faPhoneFlip,\n  faPhoneAlt,\n  faTruckFront,\n  faCat,\n  faAnchorCircleExclamation,\n  faTruckField,\n  faRoute,\n  faClipboardQuestion,\n  faPanorama,\n  faCommentMedical,\n  faTeethOpen,\n  faFileCircleMinus,\n  faTags,\n  faWineGlass,\n  faForwardFast,\n  faFastForward,\n  faFaceMehBlank,\n  faMehBlank,\n  faSquareParking,\n  faParking,\n  faHouseSignal,\n  faBarsProgress,\n  faTasksAlt,\n  faFaucetDrip,\n  faCartFlatbed,\n  faDollyFlatbed,\n  faBanSmoking,\n  faSmokingBan,\n  faTerminal,\n  faMobileButton,\n  faHouseMedicalFlag,\n  faBasketShopping,\n  faShoppingBasket,\n  faTape,\n  faBusSimple,\n  faBusAlt,\n  faEye,\n  faFaceSadCry,\n  faSadCry,\n  faAudioDescription,\n  faPersonMilitaryToPerson,\n  faFileShield,\n  faUserSlash,\n  faPen,\n  faTowerObservation,\n  faFileCode,\n  faSignal,\n  faSignal5,\n  faSignalPerfect,\n  faBus,\n  faHeartCircleXmark,\n  faHouseChimney,\n  faHomeLg,\n  faWindowMaximize,\n  faFaceFrown,\n  faFrown,\n  faPrescription,\n  faShop,\n  faStoreAlt,\n  faFloppyDisk,\n  faSave,\n  faVihara,\n  faScaleUnbalanced,\n  faBalanceScaleLeft,\n  faSortUp,\n  faSortAsc,\n  faCommentDots,\n  faCommenting,\n  faPlantWilt,\n  faDiamond,\n  faFaceGrinSquint,\n  faGrinSquint,\n  faHandHoldingDollar,\n  faHandHoldingUsd,\n  faChartDiagram,\n  faBacterium,\n  faHandPointer,\n  faDrumSteelpan,\n  faHandScissors,\n  faHandsPraying,\n  faPrayingHands,\n  faArrowRotateRight,\n  faArrowRightRotate,\n  faArrowRotateForward,\n  faRedo,\n  faWebAwesome,\n  faBiohazard,\n  faLocationCrosshairs,\n  faLocation,\n  faMarsDouble,\n  faChildDress,\n  faUsersBetweenLines,\n  faLungsVirus,\n  faFaceGrinTears,\n  faGrinTears,\n  faPhone,\n  faCalendarXmark,\n  faCalendarTimes,\n  faChildReaching,\n  faHeadSideVirus,\n  faUserGear,\n  faUserCog,\n  faArrowUp19,\n  faSortNumericUp,\n  faDoorClosed,\n  faShieldVirus,\n  faDiceSix,\n  faMosquitoNet,\n  faFileFragment,\n  faBridgeWater,\n  faPersonBooth,\n  faTextWidth,\n  faHatWizard,\n  faPenFancy,\n  faPersonDigging,\n  faDigging,\n  faTrash,\n  faGaugeSimple,\n  faGaugeSimpleMed,\n  faTachometerAverage,\n  faBookMedical,\n  faPoo,\n  faQuoteRight,\n  faQuoteRightAlt,\n  faShirt,\n  faTShirt,\n  faTshirt,\n  faCubes,\n  faDivide,\n  faTengeSign,\n  faTenge,\n  faHeadphones,\n  faHandsHolding,\n  faHandsClapping,\n  faRepublican,\n  faArrowLeft,\n  faPersonCircleXmark,\n  faRuler,\n  faAlignLeft,\n  faDiceD6,\n  faRestroom,\n  faJ,\n  faUsersViewfinder,\n  faFileVideo,\n  faUpRightFromSquare,\n  faExternalLinkAlt,\n  faTableCells,\n  faTh,\n  faFilePdf,\n  faBookBible,\n  faBible,\n  faO,\n  faSuitcaseMedical,\n  faMedkit,\n  faUserSecret,\n  faOtter,\n  faPersonDress,\n  faFemale,\n  faCommentDollar,\n  faBusinessTime,\n  faBriefcaseClock,\n  faTableCellsLarge,\n  faThLarge,\n  faBookTanakh,\n  faTanakh,\n  faPhoneVolume,\n  faVolumeControlPhone,\n  faHatCowboySide,\n  faClipboardUser,\n  faChild,\n  faLiraSign,\n  faSatellite,\n  faPlaneLock,\n  faTag,\n  faComment,\n  faCakeCandles,\n  faBirthdayCake,\n  faCake,\n  faEnvelope,\n  faAnglesUp,\n  faAngleDoubleUp,\n  faPaperclip,\n  faArrowRightToCity,\n  faRibbon,\n  faLungs,\n  faArrowUp91,\n  faSortNumericUpAlt,\n  faLitecoinSign,\n  faBorderNone,\n  faCircleNodes,\n  faParachuteBox,\n  faIndent,\n  faTruckFieldUn,\n  faHourglass,\n  faHourglassEmpty,\n  faMountain,\n  faUserDoctor,\n  faUserMd,\n  faCircleInfo,\n  faInfoCircle,\n  faCloudMeatball,\n  faCamera,\n  faCameraAlt,\n  faSquareVirus,\n  faMeteor,\n  faCarOn,\n  faSleigh,\n  faArrowDown19,\n  faSortNumericAsc,\n  faSortNumericDown,\n  faHandHoldingDroplet,\n  faHandHoldingWater,\n  faWater,\n  faCalendarCheck,\n  faBraille,\n  faPrescriptionBottleMedical,\n  faPrescriptionBottleAlt,\n  faLandmark,\n  faTruck,\n  faCrosshairs,\n  faPersonCane,\n  faTent,\n  faVestPatches,\n  faCheckDouble,\n  faArrowDownAZ,\n  faSortAlphaAsc,\n  faSortAlphaDown,\n  faMoneyBillWheat,\n  faCookie,\n  faArrowRotateLeft,\n  faArrowLeftRotate,\n  faArrowRotateBack,\n  faArrowRotateBackward,\n  faUndo,\n  faHardDrive,\n  faHdd,\n  faFaceGrinSquintTears,\n  faGrinSquintTears,\n  faDumbbell,\n  faRectangleList,\n  faListAlt,\n  faTarpDroplet,\n  faHouseMedicalCircleCheck,\n  faPersonSkiingNordic,\n  faSkiingNordic,\n  faCalendarPlus,\n  faPlaneArrival,\n  faCircleLeft,\n  faArrowAltCircleLeft,\n  faTrainSubway,\n  faSubway,\n  faChartGantt,\n  faIndianRupeeSign,\n  faIndianRupee,\n  faInr,\n  faCropSimple,\n  faCropAlt,\n  faMoneyBill1,\n  faMoneyBillAlt,\n  faLeftLong,\n  faLongArrowAltLeft,\n  faDna,\n  faVirusSlash,\n  faMinus,\n  faSubtract,\n  faChess,\n  faArrowLeftLong,\n  faLongArrowLeft,\n  faPlugCircleCheck,\n  faStreetView,\n  faFrancSign,\n  faVolumeOff,\n  faHandsAslInterpreting,\n  faAmericanSignLanguageInterpreting,\n  faAslInterpreting,\n  faHandsAmericanSignLanguageInterpreting,\n  faGear,\n  faCog,\n  faDropletSlash,\n  faTintSlash,\n  faMosque,\n  faMosquito,\n  faStarOfDavid,\n  faPersonMilitaryRifle,\n  faCartShopping,\n  faShoppingCart,\n  faVials,\n  faPlugCirclePlus,\n  faPlaceOfWorship,\n  faGripVertical,\n  faHexagonNodes,\n  faArrowTurnUp,\n  faLevelUp,\n  faU,\n  faSquareRootVariable,\n  faSquareRootAlt,\n  faClock,\n  faClockFour,\n  faBackwardStep,\n  faStepBackward,\n  faPallet,\n  faFaucet,\n  faBaseballBatBall,\n  faS,\n  faTimeline,\n  faKeyboard,\n  faCaretDown,\n  faHouseChimneyMedical,\n  faClinicMedical,\n  faTemperatureThreeQuarters,\n  faTemperature3,\n  faThermometer3,\n  faThermometerThreeQuarters,\n  faMobileScreen,\n  faMobileAndroidAlt,\n  faPlaneUp,\n  faPiggyBank,\n  faBatteryHalf,\n  faBattery3,\n  faMountainCity,\n  faCoins,\n  faKhanda,\n  faSliders,\n  faSlidersH,\n  faFolderTree,\n  faNetworkWired,\n  faMapPin,\n  faHamsa,\n  faCentSign,\n  faFlask,\n  faPersonPregnant,\n  faWandSparkles,\n  faEllipsisVertical,\n  faEllipsisV,\n  faTicket,\n  faPowerOff,\n  faRightLong,\n  faLongArrowAltRight,\n  faFlagUsa,\n  faLaptopFile,\n  faTty,\n  faTeletype,\n  faDiagramNext,\n  faPersonRifle,\n  faHouseMedicalCircleExclamation,\n  faClosedCaptioning,\n  faPersonHiking,\n  faHiking,\n  faVenusDouble,\n  faImages,\n  faCalculator,\n  faPeoplePulling,\n  faN,\n  faCableCar,\n  faTram,\n  faCloudRain,\n  faBuildingCircleXmark,\n  faShip,\n  faArrowsDownToLine,\n  faDownload,\n  faFaceGrin,\n  faGrin,\n  faDeleteLeft,\n  faBackspace,\n  faEyeDropper,\n  faEyeDropperEmpty,\n  faEyedropper,\n  faFileCircleCheck,\n  faForward,\n  faMobile,\n  faMobileAndroid,\n  faMobilePhone,\n  faFaceMeh,\n  faMeh,\n  faAlignCenter,\n  faBookSkull,\n  faBookDead,\n  faIdCard,\n  faDriversLicense,\n  faOutdent,\n  faDedent,\n  faHeartCircleExclamation,\n  faHouse,\n  faHome,\n  faHomeAlt,\n  faHomeLgAlt,\n  faCalendarWeek,\n  faLaptopMedical,\n  faB,\n  faFileMedical,\n  faDiceOne,\n  faKiwiBird,\n  faArrowRightArrowLeft,\n  faExchange,\n  faRotateRight,\n  faRedoAlt,\n  faRotateForward,\n  faUtensils,\n  faCutlery,\n  faArrowUpWideShort,\n  faSortAmountUp,\n  faMillSign,\n  faBowlRice,\n  faSkull,\n  faTowerBroadcast,\n  faBroadcastTower,\n  faTruckPickup,\n  faUpLong,\n  faLongArrowAltUp,\n  faStop,\n  faCodeMerge,\n  faUpload,\n  faHurricane,\n  faMound,\n  faToiletPortable,\n  faCompactDisc,\n  faFileArrowDown,\n  faFileDownload,\n  faCaravan,\n  faShieldCat,\n  faBolt,\n  faZap,\n  faGlassWater,\n  faOilWell,\n  faVault,\n  faMars,\n  faToilet,\n  faPlaneCircleXmark,\n  faYenSign,\n  faCny,\n  faJpy,\n  faRmb,\n  faYen,\n  faRubleSign,\n  faRouble,\n  faRub,\n  faRuble,\n  faSun,\n  faGuitar,\n  faFaceLaughWink,\n  faLaughWink,\n  faHorseHead,\n  faBoreHole,\n  faIndustry,\n  faCircleDown,\n  faArrowAltCircleDown,\n  faArrowsTurnToDots,\n  faFlorinSign,\n  faArrowDownShortWide,\n  faSortAmountDesc,\n  faSortAmountDownAlt,\n  faLessThan,\n  faAngleDown,\n  faCarTunnel,\n  faHeadSideCough,\n  faGripLines,\n  faThumbsDown,\n  faUserLock,\n  faArrowRightLong,\n  faLongArrowRight,\n  faAnchorCircleXmark,\n  faEllipsis,\n  faEllipsisH,\n  faChessPawn,\n  faKitMedical,\n  faFirstAid,\n  faPersonThroughWindow,\n  faToolbox,\n  faHandsHoldingCircle,\n  faBug,\n  faCreditCard,\n  faCreditCardAlt,\n  faCar,\n  faAutomobile,\n  faHandHoldingHand,\n  faBookOpenReader,\n  faBookReader,\n  faMountainSun,\n  faArrowsLeftRightToLine,\n  faDiceD20,\n  faTruckDroplet,\n  faFileCircleXmark,\n  faTemperatureArrowUp,\n  faTemperatureUp,\n  faMedal,\n  faBed,\n  faSquareH,\n  faHSquare,\n  faPodcast,\n  faTemperatureFull,\n  faTemperature4,\n  faThermometer4,\n  faThermometerFull,\n  faBell,\n  faSuperscript,\n  faPlugCircleXmark,\n  faStarOfLife,\n  faPhoneSlash,\n  faPaintRoller,\n  faHandshakeAngle,\n  faHandsHelping,\n  faLocationDot,\n  faMapMarkerAlt,\n  faFile,\n  faGreaterThan,\n  faPersonSwimming,\n  faSwimmer,\n  faArrowDown,\n  faDroplet,\n  faTint,\n  faEraser,\n  faEarthAmericas,\n  faEarth,\n  faEarthAmerica,\n  faGlobeAmericas,\n  faPersonBurst,\n  faDove,\n  faBatteryEmpty,\n  faBattery0,\n  faSocks,\n  faInbox,\n  faSection,\n  faGaugeHigh,\n  faTachometerAlt,\n  faTachometerAltFast,\n  faEnvelopeOpenText,\n  faHospital,\n  faHospitalAlt,\n  faHospitalWide,\n  faWineBottle,\n  faChessRook,\n  faBarsStaggered,\n  faReorder,\n  faStream,\n  faDharmachakra,\n  faHotdog,\n  faPersonWalkingWithCane,\n  faBlind,\n  faDrum,\n  faIceCream,\n  faHeartCircleBolt,\n  faFax,\n  faParagraph,\n  faCheckToSlot,\n  faVoteYea,\n  faStarHalf,\n  faBoxesStacked,\n  faBoxes,\n  faBoxesAlt,\n  faLink,\n  faChain,\n  faEarListen,\n  faAssistiveListeningSystems,\n  faTreeCity,\n  faPlay,\n  faFont,\n  faTableCellsRowLock,\n  faRupiahSign,\n  faMagnifyingGlass,\n  faSearch,\n  faTableTennisPaddleBall,\n  faPingPongPaddleBall,\n  faTableTennis,\n  faPersonDotsFromLine,\n  faDiagnoses,\n  faTrashCanArrowUp,\n  faTrashRestoreAlt,\n  faNairaSign,\n  faCartArrowDown,\n  faWalkieTalkie,\n  faFilePen,\n  faFileEdit,\n  faReceipt,\n  faSquarePen,\n  faPenSquare,\n  faPencilSquare,\n  faSuitcaseRolling,\n  faPersonCircleExclamation,\n  faChevronDown,\n  faBatteryFull,\n  faBattery,\n  faBattery5,\n  faSkullCrossbones,\n  faCodeCompare,\n  faListUl,\n  faListDots,\n  faSchoolLock,\n  faTowerCell,\n  faDownLong,\n  faLongArrowAltDown,\n  faRankingStar,\n  faChessKing,\n  faPersonHarassing,\n  faBrazilianRealSign,\n  faLandmarkDome,\n  faLandmarkAlt,\n  faArrowUp,\n  faTv,\n  faTelevision,\n  faTvAlt,\n  faShrimp,\n  faListCheck,\n  faTasks,\n  faJugDetergent,\n  faCircleUser,\n  faUserCircle,\n  faUserShield,\n  faWind,\n  faCarBurst,\n  faCarCrash,\n  faY,\n  faPersonSnowboarding,\n  faSnowboarding,\n  faTruckFast,\n  faShippingFast,\n  faFish,\n  faUserGraduate,\n  faCircleHalfStroke,\n  faAdjust,\n  faClapperboard,\n  faCircleRadiation,\n  faRadiationAlt,\n  faBaseball,\n  faBaseballBall,\n  faJetFighterUp,\n  faDiagramProject,\n  faProjectDiagram,\n  faCopy,\n  faVolumeXmark,\n  faVolumeMute,\n  faVolumeTimes,\n  faHandSparkles,\n  faGrip,\n  faGripHorizontal,\n  faShareFromSquare,\n  faShareSquare,\n  faChildCombatant,\n  faChildRifle,\n  faGun,\n  faSquarePhone,\n  faPhoneSquare,\n  faPlus,\n  faAdd,\n  faExpand,\n  faComputer,\n  faXmark,\n  faClose,\n  faMultiply,\n  faRemove,\n  faTimes,\n  faArrowsUpDownLeftRight,\n  faArrows,\n  faChalkboardUser,\n  faChalkboardTeacher,\n  faPesoSign,\n  faBuildingShield,\n  faBaby,\n  faUsersLine,\n  faQuoteLeft,\n  faQuoteLeftAlt,\n  faTractor,\n  faTrashArrowUp,\n  faTrashRestore,\n  faArrowDownUpLock,\n  faLinesLeaning,\n  faRulerCombined,\n  faCopyright,\n  faEquals,\n  faBlender,\n  faTeeth,\n  faShekelSign,\n  faIls,\n  faShekel,\n  faSheqel,\n  faSheqelSign,\n  faMap,\n  faRocket,\n  faPhotoFilm,\n  faPhotoVideo,\n  faFolderMinus,\n  faHexagonNodesBolt,\n  faStore,\n  faArrowTrendUp,\n  faPlugCircleMinus,\n  faSignHanging,\n  faSign,\n  faBezierCurve,\n  faBellSlash,\n  faTablet,\n  faTabletAndroid,\n  faSchoolFlag,\n  faFill,\n  faAngleUp,\n  faDrumstickBite,\n  faHollyBerry,\n  faChevronLeft,\n  faBacteria,\n  faHandLizard,\n  faNotdef,\n  faDisease,\n  faBriefcaseMedical,\n  faGenderless,\n  faChevronRight,\n  faRetweet,\n  faCarRear,\n  faCarAlt,\n  faPumpSoap,\n  faVideoSlash,\n  faBatteryQuarter,\n  faBattery2,\n  faRadio,\n  faBabyCarriage,\n  faCarriageBaby,\n  faTrafficLight,\n  faThermometer,\n  faVrCardboard,\n  faHandMiddleFinger,\n  faPercent,\n  faPercentage,\n  faTruckMoving,\n  faGlassWaterDroplet,\n  faDisplay,\n  faFaceSmile,\n  faSmile,\n  faThumbtack,\n  faThumbTack,\n  faTrophy,\n  faPersonPraying,\n  faPray,\n  faHammer,\n  faHandPeace,\n  faRotate,\n  faSyncAlt,\n  faSpinner,\n  faRobot,\n  faPeace,\n  faGears,\n  faCogs,\n  faWarehouse,\n  faArrowUpRightDots,\n  faSplotch,\n  faFaceGrinHearts,\n  faGrinHearts,\n  faDiceFour,\n  faSimCard,\n  faTransgender,\n  faTransgenderAlt,\n  faMercury,\n  faArrowTurnDown,\n  faLevelDown,\n  faPersonFallingBurst,\n  faAward,\n  faTicketSimple,\n  faTicketAlt,\n  faBuilding,\n  faAnglesLeft,\n  faAngleDoubleLeft,\n  faQrcode,\n  faClockRotateLeft,\n  faHistory,\n  faFaceGrinBeamSweat,\n  faGrinBeamSweat,\n  faFileExport,\n  faArrowRightFromFile,\n  faShield,\n  faShieldBlank,\n  faArrowUpShortWide,\n  faSortAmountUpAlt,\n  faCommentNodes,\n  faHouseMedical,\n  faGolfBallTee,\n  faGolfBall,\n  faCircleChevronLeft,\n  faChevronCircleLeft,\n  faHouseChimneyWindow,\n  faPenNib,\n  faTentArrowTurnLeft,\n  faTents,\n  faWandMagic,\n  faMagic,\n  faDog,\n  faCarrot,\n  faMoon,\n  faWineGlassEmpty,\n  faWineGlassAlt,\n  faCheese,\n  faYinYang,\n  faMusic,\n  faCodeCommit,\n  faTemperatureLow,\n  faPersonBiking,\n  faBiking,\n  faBroom,\n  faShieldHeart,\n  faGopuram,\n  faEarthOceania,\n  faGlobeOceania,\n  faSquareXmark,\n  faTimesSquare,\n  faXmarkSquare,\n  faHashtag,\n  faUpRightAndDownLeftFromCenter,\n  faExpandAlt,\n  faOilCan,\n  faT,\n  faHippo,\n  faChartColumn,\n  faInfinity,\n  faVialCircleCheck,\n  faPersonArrowDownToLine,\n  faVoicemail,\n  faFan,\n  faPersonWalkingLuggage,\n  faUpDown,\n  faArrowsAltV,\n  faCloudMoonRain,\n  faCalendar,\n  faTrailer,\n  faBahai,\n  faHaykal,\n  faSdCard,\n  faDragon,\n  faShoePrints,\n  faCirclePlus,\n  faPlusCircle,\n  faFaceGrinTongueWink,\n  faGrinTongueWink,\n  faHandHolding,\n  faPlugCircleExclamation,\n  faLinkSlash,\n  faChainBroken,\n  faChainSlash,\n  faUnlink,\n  faClone,\n  faPersonWalkingArrowLoopLeft,\n  faArrowUpZA,\n  faSortAlphaUpAlt,\n  faFireFlameCurved,\n  faFireAlt,\n  faTornado,\n  faFileCirclePlus,\n  faBookQuran,\n  faQuran,\n  faAnchor,\n  faBorderAll,\n  faFaceAngry,\n  faAngry,\n  faCookieBite,\n  faArrowTrendDown,\n  faRss,\n  faFeed,\n  faDrawPolygon,\n  faScaleBalanced,\n  faBalanceScale,\n  faGaugeSimpleHigh,\n  faTachometer,\n  faTachometerFast,\n  faShower,\n  faDesktop,\n  faDesktopAlt,\n  faM,\n  faTableList,\n  faThList,\n  faCommentSms,\n  faSms,\n  faBook,\n  faUserPlus,\n  faCheck,\n  faBatteryThreeQuarters,\n  faBattery4,\n  faHouseCircleCheck,\n  faAngleLeft,\n  faDiagramSuccessor,\n  faTruckArrowRight,\n  faArrowsSplitUpAndLeft,\n  faHandFist,\n  faFistRaised,\n  faCloudMoon,\n  faBriefcase,\n  faPersonFalling,\n  faImagePortrait,\n  faPortrait,\n  faUserTag,\n  faRug,\n  faEarthEurope,\n  faGlobeEurope,\n  faCartFlatbedSuitcase,\n  faLuggageCart,\n  faRectangleXmark,\n  faRectangleTimes,\n  faTimesRectangle,\n  faWindowClose,\n  faBahtSign,\n  faBookOpen,\n  faBookJournalWhills,\n  faJournalWhills,\n  faHandcuffs,\n  faTriangleExclamation,\n  faExclamationTriangle,\n  faWarning,\n  faDatabase,\n  faShare,\n  faMailForward,\n  faBottleDroplet,\n  faMaskFace,\n  faHillRockslide,\n  faRightLeft,\n  faExchangeAlt,\n  faPaperPlane,\n  faRoadCircleExclamation,\n  faDungeon,\n  faAlignRight,\n  faMoneyBill1Wave,\n  faMoneyBillWaveAlt,\n  faLifeRing,\n  faHands,\n  faSignLanguage,\n  faSigning,\n  faCalendarDay,\n  faWaterLadder,\n  faLadderWater,\n  faSwimmingPool,\n  faArrowsUpDown,\n  faArrowsV,\n  faFaceGrimace,\n  faGrimace,\n  faWheelchairMove,\n  faWheelchairAlt,\n  faTurnDown,\n  faLevelDownAlt,\n  faPersonWalkingArrowRight,\n  faSquareEnvelope,\n  faEnvelopeSquare,\n  faDice,\n  faBowlingBall,\n  faBrain,\n  faBandage,\n  faBandAid,\n  faCalendarMinus,\n  faCircleXmark,\n  faTimesCircle,\n  faXmarkCircle,\n  faGifts,\n  faHotel,\n  faEarthAsia,\n  faGlobeAsia,\n  faIdCardClip,\n  faIdCardAlt,\n  faMagnifyingGlassPlus,\n  faSearchPlus,\n  faThumbsUp,\n  faUserClock,\n  faHandDots,\n  faAllergies,\n  faFileInvoice,\n  faWindowMinimize,\n  faMugSaucer,\n  faCoffee,\n  faBrush,\n  faFileHalfDashed,\n  faMask,\n  faMagnifyingGlassMinus,\n  faSearchMinus,\n  faRulerVertical,\n  faUserLarge,\n  faUserAlt,\n  faTrainTram,\n  faUserNurse,\n  faSyringe,\n  faCloudSun,\n  faStopwatch20,\n  faSquareFull,\n  faMagnet,\n  faJar,\n  faNoteSticky,\n  faStickyNote,\n  faBugSlash,\n  faArrowUpFromWaterPump,\n  faBone,\n  faTableCellsRowUnlock,\n  faUserInjured,\n  faFaceSadTear,\n  faSadTear,\n  faPlane,\n  faTentArrowsDown,\n  faExclamation,\n  faArrowsSpin,\n  faPrint,\n  faTurkishLiraSign,\n  faTry,\n  faTurkishLira,\n  faDollarSign,\n  faDollar,\n  faUsd,\n  faX,\n  faMagnifyingGlassDollar,\n  faSearchDollar,\n  faUsersGear,\n  faUsersCog,\n  faPersonMilitaryPointing,\n  faBuildingColumns,\n  faBank,\n  faInstitution,\n  faMuseum,\n  faUniversity,\n  faUmbrella,\n  faTrowel,\n  faD,\n  faStapler,\n  faMasksTheater,\n  faTheaterMasks,\n  faKipSign,\n  faHandPointLeft,\n  faHandshakeSimple,\n  faHandshakeAlt,\n  faJetFighter,\n  faFighterJet,\n  faSquareShareNodes,\n  faShareAltSquare,\n  faBarcode,\n  faPlusMinus,\n  faVideo,\n  faVideoCamera,\n  faGraduationCap,\n  faMortarBoard,\n  faHandHoldingMedical,\n  faPersonCircleCheck,\n  faTurnUp,\n  faLevelUpAlt\n};\n\nexport { icons as fas, prefix, fa0, fa1, fa2, fa3, fa4, fa5, fa6, fa7, fa8, fa9, faFillDrip, faArrowsToCircle, faCircleChevronRight, faChevronCircleRight, faAt, faTrashCan, faTrashAlt, faTextHeight, faUserXmark, faUserTimes, faStethoscope, faMessage, faCommentAlt, faInfo, faDownLeftAndUpRightToCenter, faCompressAlt, faExplosion, faFileLines, faFileAlt, faFileText, faWaveSquare, faRing, faBuildingUn, faDiceThree, faCalendarDays, faCalendarAlt, faAnchorCircleCheck, faBuildingCircleArrowRight, faVolleyball, faVolleyballBall, faArrowsUpToLine, faSortDown, faSortDesc, faCircleMinus, faMinusCircle, faDoorOpen, faRightFromBracket, faSignOutAlt, faAtom, faSoap, faIcons, faHeartMusicCameraBolt, faMicrophoneLinesSlash, faMicrophoneAltSlash, faBridgeCircleCheck, faPumpMedical, faFingerprint, faHandPointRight, faMagnifyingGlassLocation, faSearchLocation, faForwardStep, faStepForward, faFaceSmileBeam, faSmileBeam, faFlagCheckered, faFootball, faFootballBall, faSchoolCircleExclamation, faCrop, faAnglesDown, faAngleDoubleDown, faUsersRectangle, faPeopleRoof, faPeopleLine, faBeerMugEmpty, faBeer, faDiagramPredecessor, faArrowUpLong, faLongArrowUp, faFireFlameSimple, faBurn, faPerson, faMale, faLaptop, faFileCsv, faMenorah, faTruckPlane, faRecordVinyl, faFaceGrinStars, faGrinStars, faBong, faSpaghettiMonsterFlying, faPastafarianism, faArrowDownUpAcrossLine, faSpoon, faUtensilSpoon, faJarWheat, faEnvelopesBulk, faMailBulk, faFileCircleExclamation, faCircleH, faHospitalSymbol, faPager, faAddressBook, faContactBook, faStrikethrough, faK, faLandmarkFlag, faPencil, faPencilAlt, faBackward, faCaretRight, faComments, faPaste, faFileClipboard, faCodePullRequest, faClipboardList, faTruckRampBox, faTruckLoading, faUserCheck, faVialVirus, faSheetPlastic, faBlog, faUserNinja, faPersonArrowUpFromLine, faScrollTorah, faTorah, faBroomBall, faQuidditch, faQuidditchBroomBall, faToggleOff, faBoxArchive, faArchive, faPersonDrowning, faArrowDown91, faSortNumericDesc, faSortNumericDownAlt, faFaceGrinTongueSquint, faGrinTongueSquint, faSprayCan, faTruckMonster, faW, faEarthAfrica, faGlobeAfrica, faRainbow, faCircleNotch, faTabletScreenButton, faTabletAlt, faPaw, faCloud, faTrowelBricks, faFaceFlushed, faFlushed, faHospitalUser, faTentArrowLeftRight, faGavel, faLegal, faBinoculars, faMicrophoneSlash, faBoxTissue, faMotorcycle, faBellConcierge, faConciergeBell, faPenRuler, faPencilRuler, faPeopleArrows, faPeopleArrowsLeftRight, faMarsAndVenusBurst, faSquareCaretRight, faCaretSquareRight, faScissors, faCut, faSunPlantWilt, faToiletsPortable, faHockeyPuck, faTable, faMagnifyingGlassArrowRight, faTachographDigital, faDigitalTachograph, faUsersSlash, faClover, faReply, faMailReply, faStarAndCrescent, faHouseFire, faSquareMinus, faMinusSquare, faHelicopter, faCompass, faSquareCaretDown, faCaretSquareDown, faFileCircleQuestion, faLaptopCode, faSwatchbook, faPrescriptionBottle, faBars, faNavicon, faPeopleGroup, faHourglassEnd, faHourglass3, faHeartCrack, faHeartBroken, faSquareUpRight, faExternalLinkSquareAlt, faFaceKissBeam, faKissBeam, faFilm, faRulerHorizontal, faPeopleRobbery, faLightbulb, faCaretLeft, faCircleExclamation, faExclamationCircle, faSchoolCircleXmark, faArrowRightFromBracket, faSignOut, faCircleChevronDown, faChevronCircleDown, faUnlockKeyhole, faUnlockAlt, faCloudShowersHeavy, faHeadphonesSimple, faHeadphonesAlt, faSitemap, faCircleDollarToSlot, faDonate, faMemory, faRoadSpikes, faFireBurner, faFlag, faHanukiah, faFeather, faVolumeLow, faVolumeDown, faCommentSlash, faCloudSunRain, faCompress, faWheatAwn, faWheatAlt, faAnkh, faHandsHoldingChild, faAsterisk, faSquareCheck, faCheckSquare, faPesetaSign, faHeading, faHeader, faGhost, faList, faListSquares, faSquarePhoneFlip, faPhoneSquareAlt, faCartPlus, faGamepad, faCircleDot, faDotCircle, faFaceDizzy, faDizzy, faEgg, faHouseMedicalCircleXmark, faCampground, faFolderPlus, faFutbol, faFutbolBall, faSoccerBall, faPaintbrush, faPaintBrush, faLock, faGasPump, faHotTubPerson, faHotTub, faMapLocation, faMapMarked, faHouseFloodWater, faTree, faBridgeLock, faSackDollar, faPenToSquare, faEdit, faCarSide, faShareNodes, faShareAlt, faHeartCircleMinus, faHourglassHalf, faHourglass2, faMicroscope, faSink, faBagShopping, faShoppingBag, faArrowDownZA, faSortAlphaDesc, faSortAlphaDownAlt, faMitten, faPersonRays, faUsers, faEyeSlash, faFlaskVial, faHand, faHandPaper, faOm, faWorm, faHouseCircleXmark, faPlug, faChevronUp, faHandSpock, faStopwatch, faFaceKiss, faKiss, faBridgeCircleXmark, faFaceGrinTongue, faGrinTongue, faChessBishop, faFaceGrinWink, faGrinWink, faEarDeaf, faDeaf, faDeafness, faHardOfHearing, faRoadCircleCheck, faDiceFive, faSquareRss, faRssSquare, faLandMineOn, faICursor, faStamp, faStairs, faI, faHryvniaSign, faHryvnia, faPills, faFaceGrinWide, faGrinAlt, faTooth, faV, faBangladeshiTakaSign, faBicycle, faStaffSnake, faRodAsclepius, faRodSnake, faStaffAesculapius, faHeadSideCoughSlash, faTruckMedical, faAmbulance, faWheatAwnCircleExclamation, faSnowman, faMortarPestle, faRoadBarrier, faSchool, faIgloo, faJoint, faAngleRight, faHorse, faQ, faG, faNotesMedical, faTemperatureHalf, faTemperature2, faThermometer2, faThermometerHalf, faDongSign, faCapsules, faPooStorm, faPooBolt, faFaceFrownOpen, faFrownOpen, faHandPointUp, faMoneyBill, faBookmark, faAlignJustify, faUmbrellaBeach, faHelmetUn, faBullseye, faBacon, faHandPointDown, faArrowUpFromBracket, faFolder, faFolderBlank, faFileWaveform, faFileMedicalAlt, faRadiation, faChartSimple, faMarsStroke, faVial, faGauge, faDashboard, faGaugeMed, faTachometerAltAverage, faWandMagicSparkles, faMagicWandSparkles, faE, faPenClip, faPenAlt, faBridgeCircleExclamation, faUser, faSchoolCircleCheck, faDumpster, faVanShuttle, faShuttleVan, faBuildingUser, faSquareCaretLeft, faCaretSquareLeft, faHighlighter, faKey, faBullhorn, faGlobe, faSynagogue, faPersonHalfDress, faRoadBridge, faLocationArrow, faC, faTabletButton, faBuildingLock, faPizzaSlice, faMoneyBillWave, faChartArea, faAreaChart, faHouseFlag, faPersonCircleMinus, faBan, faCancel, faCameraRotate, faSprayCanSparkles, faAirFreshener, faStar, faRepeat, faCross, faBox, faVenusMars, faArrowPointer, faMousePointer, faMaximize, faExpandArrowsAlt, faChargingStation, faShapes, faTriangleCircleSquare, faShuffle, faRandom, faPersonRunning, faRunning, faMobileRetro, faGripLinesVertical, faSpider, faHandsBound, faFileInvoiceDollar, faPlaneCircleExclamation, faXRay, faSpellCheck, faSlash, faComputerMouse, faMouse, faArrowRightToBracket, faSignIn, faShopSlash, faStoreAltSlash, faServer, faVirusCovidSlash, faShopLock, faHourglassStart, faHourglass1, faBlenderPhone, faBuildingWheat, faPersonBreastfeeding, faRightToBracket, faSignInAlt, faVenus, faPassport, faThumbtackSlash, faThumbTackSlash, faHeartPulse, faHeartbeat, faPeopleCarryBox, faPeopleCarry, faTemperatureHigh, faMicrochip, faCrown, faWeightHanging, faXmarksLines, faFilePrescription, faWeightScale, faWeight, faUserGroup, faUserFriends, faArrowUpAZ, faSortAlphaUp, faChessKnight, faFaceLaughSquint, faLaughSquint, faWheelchair, faCircleArrowUp, faArrowCircleUp, faToggleOn, faPersonWalking, faWalking, faL, faFire, faBedPulse, faProcedures, faShuttleSpace, faSpaceShuttle, faFaceLaugh, faLaugh, faFolderOpen, faHeartCirclePlus, faCodeFork, faCity, faMicrophoneLines, faMicrophoneAlt, faPepperHot, faUnlock, faColonSign, faHeadset, faStoreSlash, faRoadCircleXmark, faUserMinus, faMarsStrokeUp, faMarsStrokeV, faChampagneGlasses, faGlassCheers, faClipboard, faHouseCircleExclamation, faFileArrowUp, faFileUpload, faWifi, faWifi3, faWifiStrong, faBath, faBathtub, faUnderline, faUserPen, faUserEdit, faSignature, faStroopwafel, faBold, faAnchorLock, faBuildingNgo, faManatSign, faNotEqual, faBorderTopLeft, faBorderStyle, faMapLocationDot, faMapMarkedAlt, faJedi, faSquarePollVertical, faPoll, faMugHot, faCarBattery, faBatteryCar, faGift, faDiceTwo, faChessQueen, faGlasses, faChessBoard, faBuildingCircleCheck, faPersonChalkboard, faMarsStrokeRight, faMarsStrokeH, faHandBackFist, faHandRock, faSquareCaretUp, faCaretSquareUp, faCloudShowersWater, faChartBar, faBarChart, faHandsBubbles, faHandsWash, faLessThanEqual, faTrain, faEyeLowVision, faLowVision, faCrow, faSailboat, faWindowRestore, faSquarePlus, faPlusSquare, faToriiGate, faFrog, faBucket, faImage, faMicrophone, faCow, faCaretUp, faScrewdriver, faFolderClosed, faHouseTsunami, faSquareNfi, faArrowUpFromGroundWater, faMartiniGlass, faGlassMartiniAlt, faSquareBinary, faRotateLeft, faRotateBack, faRotateBackward, faUndoAlt, faTableColumns, faColumns, faLemon, faHeadSideMask, faHandshake, faGem, faDolly, faDollyBox, faSmoking, faMinimize, faCompressArrowsAlt, faMonument, faSnowplow, faAnglesRight, faAngleDoubleRight, faCannabis, faCirclePlay, faPlayCircle, faTablets, faEthernet, faEuroSign, faEur, faEuro, faChair, faCircleCheck, faCheckCircle, faCircleStop, faStopCircle, faCompassDrafting, faDraftingCompass, faPlateWheat, faIcicles, faPersonShelter, faNeuter, faIdBadge, faMarker, faFaceLaughBeam, faLaughBeam, faHelicopterSymbol, faUniversalAccess, faCircleChevronUp, faChevronCircleUp, faLariSign, faVolcano, faPersonWalkingDashedLineArrowRight, faSterlingSign, faGbp, faPoundSign, faViruses, faSquarePersonConfined, faUserTie, faArrowDownLong, faLongArrowDown, faTentArrowDownToLine, faCertificate, faReplyAll, faMailReplyAll, faSuitcase, faPersonSkating, faSkating, faFilterCircleDollar, faFunnelDollar, faCameraRetro, faCircleArrowDown, faArrowCircleDown, faFileImport, faArrowRightToFile, faSquareArrowUpRight, faExternalLinkSquare, faBoxOpen, faScroll, faSpa, faLocationPinLock, faPause, faHillAvalanche, faTemperatureEmpty, faTemperature0, faThermometer0, faThermometerEmpty, faBomb, faRegistered, faAddressCard, faContactCard, faVcard, faScaleUnbalancedFlip, faBalanceScaleRight, faSubscript, faDiamondTurnRight, faDirections, faBurst, faHouseLaptop, faLaptopHouse, faFaceTired, faTired, faMoneyBills, faSmog, faCrutch, faFontAwesome, faFontAwesomeFlag, faFontAwesomeLogoFull, faCloudArrowUp, faCloudUpload, faCloudUploadAlt, faPalette, faArrowsTurnRight, faVest, faFerry, faArrowsDownToPeople, faSeedling, faSprout, faLeftRight, faArrowsAltH, faBoxesPacking, faCircleArrowLeft, faArrowCircleLeft, faGroupArrowsRotate, faBowlFood, faCandyCane, faArrowDownWideShort, faSortAmountAsc, faSortAmountDown, faCloudBolt, faThunderstorm, faTextSlash, faRemoveFormat, faFaceSmileWink, faSmileWink, faFileWord, faFilePowerpoint, faArrowsLeftRight, faArrowsH, faHouseLock, faCloudArrowDown, faCloudDownload, faCloudDownloadAlt, faChildren, faChalkboard, faBlackboard, faUserLargeSlash, faUserAltSlash, faEnvelopeOpen, faHandshakeSimpleSlash, faHandshakeAltSlash, faMattressPillow, faGuaraniSign, faArrowsRotate, faRefresh, faSync, faFireExtinguisher, faCruzeiroSign, faGreaterThanEqual, faShieldHalved, faShieldAlt, faBookAtlas, faAtlas, faVirus, faEnvelopeCircleCheck, faLayerGroup, faArrowsToDot, faArchway, faHeartCircleCheck, faHouseChimneyCrack, faHouseDamage, faFileZipper, faFileArchive, faSquare, faMartiniGlassEmpty, faGlassMartini, faCouch, faCediSign, faItalic, faTableCellsColumnLock, faChurch, faCommentsDollar, faDemocrat, faZ, faPersonSkiing, faSkiing, faRoadLock, faA, faTemperatureArrowDown, faTemperatureDown, faFeatherPointed, faFeatherAlt, faP, faSnowflake, faNewspaper, faRectangleAd, faAd, faCircleArrowRight, faArrowCircleRight, faFilterCircleXmark, faLocust, faSort, faUnsorted, faListOl, faList12, faListNumeric, faPersonDressBurst, faMoneyCheckDollar, faMoneyCheckAlt, faVectorSquare, faBreadSlice, faLanguage, faFaceKissWinkHeart, faKissWinkHeart, faFilter, faQuestion, faFileSignature, faUpDownLeftRight, faArrowsAlt, faHouseChimneyUser, faHandHoldingHeart, faPuzzlePiece, faMoneyCheck, faStarHalfStroke, faStarHalfAlt, faCode, faWhiskeyGlass, faGlassWhiskey, faBuildingCircleExclamation, faMagnifyingGlassChart, faArrowUpRightFromSquare, faExternalLink, faCubesStacked, faWonSign, faKrw, faWon, faVirusCovid, faAustralSign, faF, faLeaf, faRoad, faTaxi, faCab, faPersonCirclePlus, faChartPie, faPieChart, faBoltLightning, faSackXmark, faFileExcel, faFileContract, faFishFins, faBuildingFlag, faFaceGrinBeam, faGrinBeam, faObjectUngroup, faPoop, faLocationPin, faMapMarker, faKaaba, faToiletPaper, faHelmetSafety, faHardHat, faHatHard, faEject, faCircleRight, faArrowAltCircleRight, faPlaneCircleCheck, faFaceRollingEyes, faMehRollingEyes, faObjectGroup, faChartLine, faLineChart, faMaskVentilator, faArrowRight, faSignsPost, faMapSigns, faCashRegister, faPersonCircleQuestion, faH, faTarp, faScrewdriverWrench, faTools, faArrowsToEye, faPlugCircleBolt, faHeart, faMarsAndVenus, faHouseUser, faHomeUser, faDumpsterFire, faHouseCrack, faMartiniGlassCitrus, faCocktail, faFaceSurprise, faSurprise, faBottleWater, faCirclePause, faPauseCircle, faToiletPaperSlash, faAppleWhole, faAppleAlt, faKitchenSet, faR, faTemperatureQuarter, faTemperature1, faThermometer1, faThermometerQuarter, faCube, faBitcoinSign, faShieldDog, faSolarPanel, faLockOpen, faElevator, faMoneyBillTransfer, faMoneyBillTrendUp, faHouseFloodWaterCircleArrowRight, faSquarePollHorizontal, faPollH, faCircle, faBackwardFast, faFastBackward, faRecycle, faUserAstronaut, faPlaneSlash, faTrademark, faBasketball, faBasketballBall, faSatelliteDish, faCircleUp, faArrowAltCircleUp, faMobileScreenButton, faMobileAlt, faVolumeHigh, faVolumeUp, faUsersRays, faWallet, faClipboardCheck, faFileAudio, faBurger, faHamburger, faWrench, faBugs, faRupeeSign, faRupee, faFileImage, faCircleQuestion, faQuestionCircle, faPlaneDeparture, faHandshakeSlash, faBookBookmark, faCodeBranch, faHatCowboy, faBridge, faPhoneFlip, faPhoneAlt, faTruckFront, faCat, faAnchorCircleExclamation, faTruckField, faRoute, faClipboardQuestion, faPanorama, faCommentMedical, faTeethOpen, faFileCircleMinus, faTags, faWineGlass, faForwardFast, faFastForward, faFaceMehBlank, faMehBlank, faSquareParking, faParking, faHouseSignal, faBarsProgress, faTasksAlt, faFaucetDrip, faCartFlatbed, faDollyFlatbed, faBanSmoking, faSmokingBan, faTerminal, faMobileButton, faHouseMedicalFlag, faBasketShopping, faShoppingBasket, faTape, faBusSimple, faBusAlt, faEye, faFaceSadCry, faSadCry, faAudioDescription, faPersonMilitaryToPerson, faFileShield, faUserSlash, faPen, faTowerObservation, faFileCode, faSignal, faSignal5, faSignalPerfect, faBus, faHeartCircleXmark, faHouseChimney, faHomeLg, faWindowMaximize, faFaceFrown, faFrown, faPrescription, faShop, faStoreAlt, faFloppyDisk, faSave, faVihara, faScaleUnbalanced, faBalanceScaleLeft, faSortUp, faSortAsc, faCommentDots, faCommenting, faPlantWilt, faDiamond, faFaceGrinSquint, faGrinSquint, faHandHoldingDollar, faHandHoldingUsd, faChartDiagram, faBacterium, faHandPointer, faDrumSteelpan, faHandScissors, faHandsPraying, faPrayingHands, faArrowRotateRight, faArrowRightRotate, faArrowRotateForward, faRedo, faWebAwesome, faBiohazard, faLocationCrosshairs, faLocation, faMarsDouble, faChildDress, faUsersBetweenLines, faLungsVirus, faFaceGrinTears, faGrinTears, faPhone, faCalendarXmark, faCalendarTimes, faChildReaching, faHeadSideVirus, faUserGear, faUserCog, faArrowUp19, faSortNumericUp, faDoorClosed, faShieldVirus, faDiceSix, faMosquitoNet, faFileFragment, faBridgeWater, faPersonBooth, faTextWidth, faHatWizard, faPenFancy, faPersonDigging, faDigging, faTrash, faGaugeSimple, faGaugeSimpleMed, faTachometerAverage, faBookMedical, faPoo, faQuoteRight, faQuoteRightAlt, faShirt, faTShirt, faTshirt, faCubes, faDivide, faTengeSign, faTenge, faHeadphones, faHandsHolding, faHandsClapping, faRepublican, faArrowLeft, faPersonCircleXmark, faRuler, faAlignLeft, faDiceD6, faRestroom, faJ, faUsersViewfinder, faFileVideo, faUpRightFromSquare, faExternalLinkAlt, faTableCells, faTh, faFilePdf, faBookBible, faBible, faO, faSuitcaseMedical, faMedkit, faUserSecret, faOtter, faPersonDress, faFemale, faCommentDollar, faBusinessTime, faBriefcaseClock, faTableCellsLarge, faThLarge, faBookTanakh, faTanakh, faPhoneVolume, faVolumeControlPhone, faHatCowboySide, faClipboardUser, faChild, faLiraSign, faSatellite, faPlaneLock, faTag, faComment, faCakeCandles, faBirthdayCake, faCake, faEnvelope, faAnglesUp, faAngleDoubleUp, faPaperclip, faArrowRightToCity, faRibbon, faLungs, faArrowUp91, faSortNumericUpAlt, faLitecoinSign, faBorderNone, faCircleNodes, faParachuteBox, faIndent, faTruckFieldUn, faHourglass, faHourglassEmpty, faMountain, faUserDoctor, faUserMd, faCircleInfo, faInfoCircle, faCloudMeatball, faCamera, faCameraAlt, faSquareVirus, faMeteor, faCarOn, faSleigh, faArrowDown19, faSortNumericAsc, faSortNumericDown, faHandHoldingDroplet, faHandHoldingWater, faWater, faCalendarCheck, faBraille, faPrescriptionBottleMedical, faPrescriptionBottleAlt, faLandmark, faTruck, faCrosshairs, faPersonCane, faTent, faVestPatches, faCheckDouble, faArrowDownAZ, faSortAlphaAsc, faSortAlphaDown, faMoneyBillWheat, faCookie, faArrowRotateLeft, faArrowLeftRotate, faArrowRotateBack, faArrowRotateBackward, faUndo, faHardDrive, faHdd, faFaceGrinSquintTears, faGrinSquintTears, faDumbbell, faRectangleList, faListAlt, faTarpDroplet, faHouseMedicalCircleCheck, faPersonSkiingNordic, faSkiingNordic, faCalendarPlus, faPlaneArrival, faCircleLeft, faArrowAltCircleLeft, faTrainSubway, faSubway, faChartGantt, faIndianRupeeSign, faIndianRupee, faInr, faCropSimple, faCropAlt, faMoneyBill1, faMoneyBillAlt, faLeftLong, faLongArrowAltLeft, faDna, faVirusSlash, faMinus, faSubtract, faChess, faArrowLeftLong, faLongArrowLeft, faPlugCircleCheck, faStreetView, faFrancSign, faVolumeOff, faHandsAslInterpreting, faAmericanSignLanguageInterpreting, faAslInterpreting, faHandsAmericanSignLanguageInterpreting, faGear, faCog, faDropletSlash, faTintSlash, faMosque, faMosquito, faStarOfDavid, faPersonMilitaryRifle, faCartShopping, faShoppingCart, faVials, faPlugCirclePlus, faPlaceOfWorship, faGripVertical, faHexagonNodes, faArrowTurnUp, faLevelUp, faU, faSquareRootVariable, faSquareRootAlt, faClock, faClockFour, faBackwardStep, faStepBackward, faPallet, faFaucet, faBaseballBatBall, faS, faTimeline, faKeyboard, faCaretDown, faHouseChimneyMedical, faClinicMedical, faTemperatureThreeQuarters, faTemperature3, faThermometer3, faThermometerThreeQuarters, faMobileScreen, faMobileAndroidAlt, faPlaneUp, faPiggyBank, faBatteryHalf, faBattery3, faMountainCity, faCoins, faKhanda, faSliders, faSlidersH, faFolderTree, faNetworkWired, faMapPin, faHamsa, faCentSign, faFlask, faPersonPregnant, faWandSparkles, faEllipsisVertical, faEllipsisV, faTicket, faPowerOff, faRightLong, faLongArrowAltRight, faFlagUsa, faLaptopFile, faTty, faTeletype, faDiagramNext, faPersonRifle, faHouseMedicalCircleExclamation, faClosedCaptioning, faPersonHiking, faHiking, faVenusDouble, faImages, faCalculator, faPeoplePulling, faN, faCableCar, faTram, faCloudRain, faBuildingCircleXmark, faShip, faArrowsDownToLine, faDownload, faFaceGrin, faGrin, faDeleteLeft, faBackspace, faEyeDropper, faEyeDropperEmpty, faEyedropper, faFileCircleCheck, faForward, faMobile, faMobileAndroid, faMobilePhone, faFaceMeh, faMeh, faAlignCenter, faBookSkull, faBookDead, faIdCard, faDriversLicense, faOutdent, faDedent, faHeartCircleExclamation, faHouse, faHome, faHomeAlt, faHomeLgAlt, faCalendarWeek, faLaptopMedical, faB, faFileMedical, faDiceOne, faKiwiBird, faArrowRightArrowLeft, faExchange, faRotateRight, faRedoAlt, faRotateForward, faUtensils, faCutlery, faArrowUpWideShort, faSortAmountUp, faMillSign, faBowlRice, faSkull, faTowerBroadcast, faBroadcastTower, faTruckPickup, faUpLong, faLongArrowAltUp, faStop, faCodeMerge, faUpload, faHurricane, faMound, faToiletPortable, faCompactDisc, faFileArrowDown, faFileDownload, faCaravan, faShieldCat, faBolt, faZap, faGlassWater, faOilWell, faVault, faMars, faToilet, faPlaneCircleXmark, faYenSign, faCny, faJpy, faRmb, faYen, faRubleSign, faRouble, faRub, faRuble, faSun, faGuitar, faFaceLaughWink, faLaughWink, faHorseHead, faBoreHole, faIndustry, faCircleDown, faArrowAltCircleDown, faArrowsTurnToDots, faFlorinSign, faArrowDownShortWide, faSortAmountDesc, faSortAmountDownAlt, faLessThan, faAngleDown, faCarTunnel, faHeadSideCough, faGripLines, faThumbsDown, faUserLock, faArrowRightLong, faLongArrowRight, faAnchorCircleXmark, faEllipsis, faEllipsisH, faChessPawn, faKitMedical, faFirstAid, faPersonThroughWindow, faToolbox, faHandsHoldingCircle, faBug, faCreditCard, faCreditCardAlt, faCar, faAutomobile, faHandHoldingHand, faBookOpenReader, faBookReader, faMountainSun, faArrowsLeftRightToLine, faDiceD20, faTruckDroplet, faFileCircleXmark, faTemperatureArrowUp, faTemperatureUp, faMedal, faBed, faSquareH, faHSquare, faPodcast, faTemperatureFull, faTemperature4, faThermometer4, faThermometerFull, faBell, faSuperscript, faPlugCircleXmark, faStarOfLife, faPhoneSlash, faPaintRoller, faHandshakeAngle, faHandsHelping, faLocationDot, faMapMarkerAlt, faFile, faGreaterThan, faPersonSwimming, faSwimmer, faArrowDown, faDroplet, faTint, faEraser, faEarthAmericas, faEarth, faEarthAmerica, faGlobeAmericas, faPersonBurst, faDove, faBatteryEmpty, faBattery0, faSocks, faInbox, faSection, faGaugeHigh, faTachometerAlt, faTachometerAltFast, faEnvelopeOpenText, faHospital, faHospitalAlt, faHospitalWide, faWineBottle, faChessRook, faBarsStaggered, faReorder, faStream, faDharmachakra, faHotdog, faPersonWalkingWithCane, faBlind, faDrum, faIceCream, faHeartCircleBolt, faFax, faParagraph, faCheckToSlot, faVoteYea, faStarHalf, faBoxesStacked, faBoxes, faBoxesAlt, faLink, faChain, faEarListen, faAssistiveListeningSystems, faTreeCity, faPlay, faFont, faTableCellsRowLock, faRupiahSign, faMagnifyingGlass, faSearch, faTableTennisPaddleBall, faPingPongPaddleBall, faTableTennis, faPersonDotsFromLine, faDiagnoses, faTrashCanArrowUp, faTrashRestoreAlt, faNairaSign, faCartArrowDown, faWalkieTalkie, faFilePen, faFileEdit, faReceipt, faSquarePen, faPenSquare, faPencilSquare, faSuitcaseRolling, faPersonCircleExclamation, faChevronDown, faBatteryFull, faBattery, faBattery5, faSkullCrossbones, faCodeCompare, faListUl, faListDots, faSchoolLock, faTowerCell, faDownLong, faLongArrowAltDown, faRankingStar, faChessKing, faPersonHarassing, faBrazilianRealSign, faLandmarkDome, faLandmarkAlt, faArrowUp, faTv, faTelevision, faTvAlt, faShrimp, faListCheck, faTasks, faJugDetergent, faCircleUser, faUserCircle, faUserShield, faWind, faCarBurst, faCarCrash, faY, faPersonSnowboarding, faSnowboarding, faTruckFast, faShippingFast, faFish, faUserGraduate, faCircleHalfStroke, faAdjust, faClapperboard, faCircleRadiation, faRadiationAlt, faBaseball, faBaseballBall, faJetFighterUp, faDiagramProject, faProjectDiagram, faCopy, faVolumeXmark, faVolumeMute, faVolumeTimes, faHandSparkles, faGrip, faGripHorizontal, faShareFromSquare, faShareSquare, faChildCombatant, faChildRifle, faGun, faSquarePhone, faPhoneSquare, faPlus, faAdd, faExpand, faComputer, faXmark, faClose, faMultiply, faRemove, faTimes, faArrowsUpDownLeftRight, faArrows, faChalkboardUser, faChalkboardTeacher, faPesoSign, faBuildingShield, faBaby, faUsersLine, faQuoteLeft, faQuoteLeftAlt, faTractor, faTrashArrowUp, faTrashRestore, faArrowDownUpLock, faLinesLeaning, faRulerCombined, faCopyright, faEquals, faBlender, faTeeth, faShekelSign, faIls, faShekel, faSheqel, faSheqelSign, faMap, faRocket, faPhotoFilm, faPhotoVideo, faFolderMinus, faHexagonNodesBolt, faStore, faArrowTrendUp, faPlugCircleMinus, faSignHanging, faSign, faBezierCurve, faBellSlash, faTablet, faTabletAndroid, faSchoolFlag, faFill, faAngleUp, faDrumstickBite, faHollyBerry, faChevronLeft, faBacteria, faHandLizard, faNotdef, faDisease, faBriefcaseMedical, faGenderless, faChevronRight, faRetweet, faCarRear, faCarAlt, faPumpSoap, faVideoSlash, faBatteryQuarter, faBattery2, faRadio, faBabyCarriage, faCarriageBaby, faTrafficLight, faThermometer, faVrCardboard, faHandMiddleFinger, faPercent, faPercentage, faTruckMoving, faGlassWaterDroplet, faDisplay, faFaceSmile, faSmile, faThumbtack, faThumbTack, faTrophy, faPersonPraying, faPray, faHammer, faHandPeace, faRotate, faSyncAlt, faSpinner, faRobot, faPeace, faGears, faCogs, faWarehouse, faArrowUpRightDots, faSplotch, faFaceGrinHearts, faGrinHearts, faDiceFour, faSimCard, faTransgender, faTransgenderAlt, faMercury, faArrowTurnDown, faLevelDown, faPersonFallingBurst, faAward, faTicketSimple, faTicketAlt, faBuilding, faAnglesLeft, faAngleDoubleLeft, faQrcode, faClockRotateLeft, faHistory, faFaceGrinBeamSweat, faGrinBeamSweat, faFileExport, faArrowRightFromFile, faShield, faShieldBlank, faArrowUpShortWide, faSortAmountUpAlt, faCommentNodes, faHouseMedical, faGolfBallTee, faGolfBall, faCircleChevronLeft, faChevronCircleLeft, faHouseChimneyWindow, faPenNib, faTentArrowTurnLeft, faTents, faWandMagic, faMagic, faDog, faCarrot, faMoon, faWineGlassEmpty, faWineGlassAlt, faCheese, faYinYang, faMusic, faCodeCommit, faTemperatureLow, faPersonBiking, faBiking, faBroom, faShieldHeart, faGopuram, faEarthOceania, faGlobeOceania, faSquareXmark, faTimesSquare, faXmarkSquare, faHashtag, faUpRightAndDownLeftFromCenter, faExpandAlt, faOilCan, faT, faHippo, faChartColumn, faInfinity, faVialCircleCheck, faPersonArrowDownToLine, faVoicemail, faFan, faPersonWalkingLuggage, faUpDown, faArrowsAltV, faCloudMoonRain, faCalendar, faTrailer, faBahai, faHaykal, faSdCard, faDragon, faShoePrints, faCirclePlus, faPlusCircle, faFaceGrinTongueWink, faGrinTongueWink, faHandHolding, faPlugCircleExclamation, faLinkSlash, faChainBroken, faChainSlash, faUnlink, faClone, faPersonWalkingArrowLoopLeft, faArrowUpZA, faSortAlphaUpAlt, faFireFlameCurved, faFireAlt, faTornado, faFileCirclePlus, faBookQuran, faQuran, faAnchor, faBorderAll, faFaceAngry, faAngry, faCookieBite, faArrowTrendDown, faRss, faFeed, faDrawPolygon, faScaleBalanced, faBalanceScale, faGaugeSimpleHigh, faTachometer, faTachometerFast, faShower, faDesktop, faDesktopAlt, faM, faTableList, faThList, faCommentSms, faSms, faBook, faUserPlus, faCheck, faBatteryThreeQuarters, faBattery4, faHouseCircleCheck, faAngleLeft, faDiagramSuccessor, faTruckArrowRight, faArrowsSplitUpAndLeft, faHandFist, faFistRaised, faCloudMoon, faBriefcase, faPersonFalling, faImagePortrait, faPortrait, faUserTag, faRug, faEarthEurope, faGlobeEurope, faCartFlatbedSuitcase, faLuggageCart, faRectangleXmark, faRectangleTimes, faTimesRectangle, faWindowClose, faBahtSign, faBookOpen, faBookJournalWhills, faJournalWhills, faHandcuffs, faTriangleExclamation, faExclamationTriangle, faWarning, faDatabase, faShare, faMailForward, faBottleDroplet, faMaskFace, faHillRockslide, faRightLeft, faExchangeAlt, faPaperPlane, faRoadCircleExclamation, faDungeon, faAlignRight, faMoneyBill1Wave, faMoneyBillWaveAlt, faLifeRing, faHands, faSignLanguage, faSigning, faCalendarDay, faWaterLadder, faLadderWater, faSwimmingPool, faArrowsUpDown, faArrowsV, faFaceGrimace, faGrimace, faWheelchairMove, faWheelchairAlt, faTurnDown, faLevelDownAlt, faPersonWalkingArrowRight, faSquareEnvelope, faEnvelopeSquare, faDice, faBowlingBall, faBrain, faBandage, faBandAid, faCalendarMinus, faCircleXmark, faTimesCircle, faXmarkCircle, faGifts, faHotel, faEarthAsia, faGlobeAsia, faIdCardClip, faIdCardAlt, faMagnifyingGlassPlus, faSearchPlus, faThumbsUp, faUserClock, faHandDots, faAllergies, faFileInvoice, faWindowMinimize, faMugSaucer, faCoffee, faBrush, faFileHalfDashed, faMask, faMagnifyingGlassMinus, faSearchMinus, faRulerVertical, faUserLarge, faUserAlt, faTrainTram, faUserNurse, faSyringe, faCloudSun, faStopwatch20, faSquareFull, faMagnet, faJar, faNoteSticky, faStickyNote, faBugSlash, faArrowUpFromWaterPump, faBone, faTableCellsRowUnlock, faUserInjured, faFaceSadTear, faSadTear, faPlane, faTentArrowsDown, faExclamation, faArrowsSpin, faPrint, faTurkishLiraSign, faTry, faTurkishLira, faDollarSign, faDollar, faUsd, faX, faMagnifyingGlassDollar, faSearchDollar, faUsersGear, faUsersCog, faPersonMilitaryPointing, faBuildingColumns, faBank, faInstitution, faMuseum, faUniversity, faUmbrella, faTrowel, faD, faStapler, faMasksTheater, faTheaterMasks, faKipSign, faHandPointLeft, faHandshakeSimple, faHandshakeAlt, faJetFighter, faFighterJet, faSquareShareNodes, faShareAltSquare, faBarcode, faPlusMinus, faVideo, faVideoCamera, faGraduationCap, faMortarBoard, faHandHoldingMedical, faPersonCircleCheck, faTurnUp, faLevelUpAlt };\n", "/*!\n * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */\nconst prefix = \"far\";\nconst faTrashCan = {\n  prefix: 'far',\n  iconName: 'trash-can',\n  icon: [448, 512, [61460, \"trash-alt\"], \"f2ed\", \"M170.5 51.6L151.5 80l145 0-19-28.4c-1.5-2.2-4-3.6-6.7-3.6l-93.7 0c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80 368 80l48 0 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 304c0 44.2-35.8 80-80 80l-224 0c-44.2 0-80-35.8-80-80l0-304-8 0c-13.3 0-24-10.7-24-24S10.7 80 24 80l8 0 48 0 13.8 0 36.7-55.1C140.9 9.4 158.4 0 177.1 0l93.7 0c18.7 0 36.2 9.4 46.6 24.9zM80 128l0 304c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-304L80 128zm80 64l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16z\"]\n};\nconst faTrashAlt = faTrashCan;\nconst faMessage = {\n  prefix: 'far',\n  iconName: 'message',\n  icon: [512, 512, [\"comment-alt\"], \"f27a\", \"M160 368c26.5 0 48 21.5 48 48l0 16 72.5-54.4c8.3-6.2 18.4-9.6 28.8-9.6L448 368c8.8 0 16-7.2 16-16l0-288c0-8.8-7.2-16-16-16L64 48c-8.8 0-16 7.2-16 16l0 288c0 8.8 7.2 16 16 16l96 0zm48 124l-.2 .2-5.1 3.8-17.1 12.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3l0-21.3 0-6.4 0-.3 0-4 0-48-48 0-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L448 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64l-138.7 0L208 492z\"]\n};\nconst faCommentAlt = faMessage;\nconst faFileLines = {\n  prefix: 'far',\n  iconName: 'file-lines',\n  icon: [384, 512, [128441, 128462, 61686, \"file-alt\", \"file-text\"], \"f15c\", \"M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z\"]\n};\nconst faFileAlt = faFileLines;\nconst faFileText = faFileLines;\nconst faCalendarDays = {\n  prefix: 'far',\n  iconName: 'calendar-days',\n  icon: [448, 512, [\"calendar-alt\"], \"f073\", \"M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L64 64C28.7 64 0 92.7 0 128l0 16 0 48L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-256 0-48 0-16c0-35.3-28.7-64-64-64l-40 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L152 64l0-40zM48 192l80 0 0 56-80 0 0-56zm0 104l80 0 0 64-80 0 0-64zm128 0l96 0 0 64-96 0 0-64zm144 0l80 0 0 64-80 0 0-64zm80-48l-80 0 0-56 80 0 0 56zm0 160l0 40c0 8.8-7.2 16-16 16l-64 0 0-56 80 0zm-128 0l0 56-96 0 0-56 96 0zm-144 0l0 56-64 0c-8.8 0-16-7.2-16-16l0-40 80 0zM272 248l-96 0 0-56 96 0 0 56z\"]\n};\nconst faCalendarAlt = faCalendarDays;\nconst faHandPointRight = {\n  prefix: 'far',\n  iconName: 'hand-point-right',\n  icon: [512, 512, [], \"f0a4\", \"M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z\"]\n};\nconst faFaceSmileBeam = {\n  prefix: 'far',\n  iconName: 'face-smile-beam',\n  icon: [512, 512, [128522, \"smile-beam\"], \"f5b8\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm177.6 62.1C192.8 334.5 218.8 352 256 352s63.2-17.5 78.4-33.9c9-9.7 24.2-10.4 33.9-1.4s10.4 24.2 1.4 33.9c-22 23.8-60 49.4-113.6 49.4s-91.7-25.5-113.6-49.4c-9-9.7-8.4-24.9 1.4-33.9s24.9-8.4 33.9 1.4zm40-89.3s0 0 0 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0zm160 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faSmileBeam = faFaceSmileBeam;\nconst faFaceGrinStars = {\n  prefix: 'far',\n  iconName: 'face-grin-stars',\n  icon: [512, 512, [129321, \"grin-stars\"], \"f587\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM183.2 132.6c-1.3-2.8-4.1-4.6-7.2-4.6s-5.9 1.8-7.2 4.6l-16.6 34.7-38.1 5c-3.1 .4-5.6 2.5-6.6 5.5s-.1 6.2 2.1 8.3l27.9 26.5-7 37.8c-.6 3 .7 6.1 3.2 7.9s5.8 2 8.5 .6L176 240.5l33.8 18.3c2.7 1.5 6 1.3 8.5-.6s3.7-4.9 3.2-7.9l-7-37.8L242.4 186c2.2-2.1 3.1-5.3 2.1-8.3s-3.5-5.1-6.6-5.5l-38.1-5-16.6-34.7zm160 0c-1.3-2.8-4.1-4.6-7.2-4.6s-5.9 1.8-7.2 4.6l-16.6 34.7-38.1 5c-3.1 .4-5.6 2.5-6.6 5.5s-.1 6.2 2.1 8.3l27.9 26.5-7 37.8c-.6 3 .7 6.1 3.2 7.9s5.8 2 8.5 .6L336 240.5l33.8 18.3c2.7 1.5 6 1.3 8.5-.6s3.7-4.9 3.2-7.9l-7-37.8L402.4 186c2.2-2.1 3.1-5.3 2.1-8.3s-3.5-5.1-6.6-5.5l-38.1-5-16.6-34.7zm6.3 175.8c-28.9 6.8-60.5 10.5-93.6 10.5s-64.7-3.7-93.6-10.5c-18.7-4.4-35.9 12-25.5 28.1c24.6 38.1 68.7 63.5 119.1 63.5s94.5-25.4 119.1-63.5c10.4-16.1-6.8-32.5-25.5-28.1z\"]\n};\nconst faGrinStars = faFaceGrinStars;\nconst faAddressBook = {\n  prefix: 'far',\n  iconName: 'address-book',\n  icon: [512, 512, [62138, \"contact-book\"], \"f2b9\", \"M384 48c8.8 0 16 7.2 16 16l0 384c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16L80 64c0-8.8 7.2-16 16-16l288 0zM96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L96 0zM240 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM496 192c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64z\"]\n};\nconst faContactBook = faAddressBook;\nconst faComments = {\n  prefix: 'far',\n  iconName: 'comments',\n  icon: [640, 512, [128490, 61670], \"f086\", \"M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM208 352c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.8 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z\"]\n};\nconst faPaste = {\n  prefix: 'far',\n  iconName: 'paste',\n  icon: [512, 512, [\"file-clipboard\"], \"f0ea\", \"M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l62 0c-7.1-27.6-32.2-48-62-48l-40.6 0C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L464 243.9 464 448c0 8.8-7.2 16-16 16zM256 512l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L256 128c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64z\"]\n};\nconst faFileClipboard = faPaste;\nconst faFaceGrinTongueSquint = {\n  prefix: 'far',\n  iconName: 'face-grin-tongue-squint',\n  icon: [512, 512, [128541, \"grin-tongue-squint\"], \"f58a\", \"M464 256c0-114.9-93.1-208-208-208S48 141.1 48 256c0 81.7 47.1 152.4 115.7 186.4c-2.4-8.4-3.7-17.3-3.7-26.4l0-23.3c-24-17.5-43.1-41.4-54.8-69.2c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19c12.3-3.8 24.3 6.9 19.3 18.7c-11.8 28-31.1 52-55.4 69.6l0 22.9c0 9.2-1.3 18-3.7 26.4C416.9 408.4 464 337.7 464 256zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm116-98.9c0-9 9.6-14.7 17.5-10.5l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6zm262.5-10.5c7.9-4.2 17.5 1.5 17.5 10.5c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9zM320 416l0-37.4c0-14.7-11.9-26.6-26.6-26.6l-2 0c-11.3 0-21.1 7.9-23.6 18.9c-2.8 12.6-20.8 12.6-23.6 0c-2.5-11.1-12.3-18.9-23.6-18.9l-2 0c-14.7 0-26.6 11.9-26.6 26.6l0 37.4c0 35.3 28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faGrinTongueSquint = faFaceGrinTongueSquint;\nconst faFaceFlushed = {\n  prefix: 'far',\n  iconName: 'face-flushed',\n  icon: [512, 512, [128563, \"flushed\"], \"f579\", \"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM160.4 248a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm216-24a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM192 336c-13.3 0-24 10.7-24 24s10.7 24 24 24l128 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-128 0zM160 176a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm0 128a80 80 0 1 0 0-160 80 80 0 1 0 0 160zm144-80a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm128 0a80 80 0 1 0 -160 0 80 80 0 1 0 160 0z\"]\n};\nconst faFlushed = faFaceFlushed;\nconst faSquareCaretRight = {\n  prefix: 'far',\n  iconName: 'square-caret-right',\n  icon: [448, 512, [\"caret-square-right\"], \"f152\", \"M400 96c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320zM384 32c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0zM320 256c0 6.7-2.8 13-7.7 17.6l-112 104c-7 6.5-17.2 8.2-25.9 4.4s-14.4-12.5-14.4-22l0-208c0-9.5 5.7-18.2 14.4-22s18.9-2.1 25.9 4.4l112 104c4.9 4.5 7.7 10.9 7.7 17.6z\"]\n};\nconst faCaretSquareRight = faSquareCaretRight;\nconst faSquareMinus = {\n  prefix: 'far',\n  iconName: 'square-minus',\n  icon: [448, 512, [61767, \"minus-square\"], \"f146\", \"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM152 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faMinusSquare = faSquareMinus;\nconst faCompass = {\n  prefix: 'far',\n  iconName: 'compass',\n  icon: [512, 512, [129517], \"f14e\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm306.7 69.1L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faSquareCaretDown = {\n  prefix: 'far',\n  iconName: 'square-caret-down',\n  icon: [448, 512, [\"caret-square-down\"], \"f150\", \"M384 432c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0zm64-16c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z\"]\n};\nconst faCaretSquareDown = faSquareCaretDown;\nconst faFaceKissBeam = {\n  prefix: 'far',\n  iconName: 'face-kiss-beam',\n  icon: [512, 512, [128537, \"kiss-beam\"], \"f597\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm304.7 41.7c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4c-2.7 1.5-5.7 3-8.7 4.3c3.1 1.3 6 2.7 8.7 4.3c6.6 3.7 12.5 8.2 16.7 13.4c4.3 5.1 7.3 11.4 7.3 18.3s-3.1 13.2-7.3 18.3c-4.3 5.2-10.1 9.7-16.7 13.4C274.7 427.1 257.4 432 240 432c-3.6 0-6.8-2.5-7.7-6s.6-7.2 3.8-9c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.1c.2-.1 .5-.3 .9-.5c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5-8.6c-2.5-3.5-5.9-6.9-9.6-10.1c-3.7-3.1-7.4-5.7-10.2-7.6c-1.4-.9-2.6-1.6-3.4-2.1c-.4-.2-.7-.4-.9-.5l-.2-.1c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.5-1.4-4.1-4.1-4.1-7s1.6-5.6 4.1-7c0 0 0 0 0 0s0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.1c.2-.1 .5-.3 .9-.5c.8-.5 2-1.2 3.4-2.1c2.8-1.9 6.5-4.5 10.2-7.6c3.7-3.1 7.2-6.6 9.6-10.1c2.5-3.5 3.5-6.4 3.5-8.6s-1-5-3.5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-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faKissBeam = faFaceKissBeam;\nconst faLightbulb = {\n  prefix: 'far',\n  iconName: 'lightbulb',\n  icon: [384, 512, [128161], \"f0eb\", \"M297.2 248.9C311.6 228.3 320 203.2 320 176c0-70.7-57.3-128-128-128S64 105.3 64 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7c0 0 0 0 0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5L109 384c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8c0 0 0 0 0 0s0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C27.6 247.9 16 213.3 16 176C16 78.8 94.8 0 192 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4c0 0 0 0 0 0s0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5l-48.6 0c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM192 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80l0-16 160 0 0 16c0 44.2-35.8 80-80 80z\"]\n};\nconst faFlag = {\n  prefix: 'far',\n  iconName: 'flag',\n  icon: [448, 512, [127988, 61725], \"f024\", \"M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 64 0 350.5 0 400l0 88c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4c44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0c-35.1-17.6-75.4-22-113.5-12.5L48 52l0-28zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8c54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4c-48.2-24.1-103.3-30.1-155.6-17.1L48 338.5l0-237z\"]\n};\nconst faSquareCheck = {\n  prefix: 'far',\n  iconName: 'square-check',\n  icon: [448, 512, [9745, 9989, 61510, \"check-square\"], \"f14a\", \"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\"]\n};\nconst faCheckSquare = faSquareCheck;\nconst faCircleDot = {\n  prefix: 'far',\n  iconName: 'circle-dot',\n  icon: [512, 512, [128280, \"dot-circle\"], \"f192\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z\"]\n};\nconst faDotCircle = faCircleDot;\nconst faFaceDizzy = {\n  prefix: 'far',\n  iconName: 'face-dizzy',\n  icon: [512, 512, [\"dizzy\"], \"f567\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM103 135c9.4-9.4 24.6-9.4 33.9 0l23 23 23-23c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-23 23 23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-23-23-23 23c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23-23-23c-9.4-9.4-9.4-24.6 0-33.9zm192 0c9.4-9.4 24.6-9.4 33.9 0l23 23 23-23c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-23 23 23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-23-23-23 23c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23-23-23c-9.4-9.4-9.4-24.6 0-33.9z\"]\n};\nconst faDizzy = faFaceDizzy;\nconst faFutbol = {\n  prefix: 'far',\n  iconName: 'futbol',\n  icon: [512, 512, [9917, \"futbol-ball\", \"soccer-ball\"], \"f1e3\", \"M435.4 361.4l-89.7-6c-5.2-.3-10.3 1.1-14.5 4.2s-7.2 7.4-8.4 12.5l-22 87.2c-14.4 3.2-29.4 4.8-44.8 4.8s-30.3-1.7-44.8-4.8l-22-87.2c-1.3-5-4.3-9.4-8.4-12.5s-9.3-4.5-14.5-4.2l-89.7 6C61.7 335.9 51.9 307 49 276.2L125 228.3c4.4-2.8 7.6-7 9.2-11.9s1.4-10.2-.5-15L100.4 118c19.9-22.4 44.6-40.5 72.4-52.7l69.1 57.6c4 3.3 9 5.1 14.1 5.1s10.2-1.8 14.1-5.1l69.1-57.6c27.8 12.2 52.5 30.3 72.4 52.7l-33.4 83.4c-1.9 4.8-2.1 10.1-.5 15s4.9 9.1 9.2 11.9L463 276.2c-3 30.8-12.7 59.7-27.6 85.2zM256 48l.9 0-1.8 0 .9 0zM56.7 196.2c.9-3 1.9-6.1 2.9-9.1l-2.9 9.1zM132 423l3.8 2.7c-1.3-.9-2.5-1.8-3.8-2.7zm248.1-.1c-1.3 1-2.6 2-4 2.9l4-2.9zm75.2-226.7l-3-9.2c1.1 3 2.1 6.1 3 9.2zM256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm14.1-325.7c-8.4-6.1-19.8-6.1-28.2 0L194 221c-8.4 6.1-11.9 16.9-8.7 26.8l18.3 56.3c3.2 9.9 12.4 16.6 22.8 16.6l59.2 0c10.4 0 19.6-6.7 22.8-16.6l18.3-56.3c3.2-9.9-.3-20.7-8.7-26.8l-47.9-34.8z\"]\n};\nconst faFutbolBall = faFutbol;\nconst faSoccerBall = faFutbol;\nconst faPenToSquare = {\n  prefix: 'far',\n  iconName: 'pen-to-square',\n  icon: [512, 512, [\"edit\"], \"f044\", \"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152L0 424c0 48.6 39.4 88 88 88l272 0c48.6 0 88-39.4 88-88l0-112c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 112c0 22.1-17.9 40-40 40L88 464c-22.1 0-40-17.9-40-40l0-272c0-22.1 17.9-40 40-40l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L88 64z\"]\n};\nconst faEdit = faPenToSquare;\nconst faHourglassHalf = {\n  prefix: 'far',\n  iconName: 'hourglass-half',\n  icon: [384, 512, [\"hourglass-2\"], \"f252\", \"M0 24C0 10.7 10.7 0 24 0L360 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 19c0 40.3-16 79-44.5 107.5L225.9 256l81.5 81.5C336 366 352 404.7 352 445l0 19 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-19c0-40.3 16-79 44.5-107.5L158.1 256 76.5 174.5C48 146 32 107.3 32 67l0-19-8 0C10.7 48 0 37.3 0 24zM110.5 371.5c-3.9 3.9-7.5 8.1-10.7 12.5l184.4 0c-3.2-4.4-6.8-8.6-10.7-12.5L192 289.9l-81.5 81.5zM284.2 128C297 110.4 304 89 304 67l0-19L80 48l0 19c0 22.1 7 43.4 19.8 61l184.4 0z\"]\n};\nconst faHourglass2 = faHourglassHalf;\nconst faEyeSlash = {\n  prefix: 'far',\n  iconName: 'eye-slash',\n  icon: [640, 512, [], \"f070\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z\"]\n};\nconst faHand = {\n  prefix: 'far',\n  iconName: 'hand',\n  icon: [512, 512, [129306, 9995, \"hand-paper\"], \"f256\", \"M256 0c-25.3 0-47.2 14.7-57.6 36c-7-2.6-14.5-4-22.4-4c-35.3 0-64 28.7-64 64l0 165.5-2.7-2.7c-25-25-65.5-25-90.5 0s-25 65.5 0 90.5L106.5 437c48 48 113.1 75 181 75l8.5 0 8 0c1.5 0 3-.1 4.5-.4c91.7-6.2 165-79.4 171.1-171.1c.3-1.5 .4-3 .4-4.5l0-176c0-35.3-28.7-64-64-64c-5.5 0-10.9 .7-16 2l0-2c0-35.3-28.7-64-64-64c-7.9 0-15.4 1.4-22.4 4C303.2 14.7 281.3 0 256 0zM240 96.1l0-.1 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 31.9 0 .1 0 136c0 13.3 10.7 24 24 24s24-10.7 24-24l0-136c0 0 0 0 0-.1c0-8.8 7.2-16 16-16s16 7.2 16 16l0 55.9c0 0 0 .1 0 .1l0 80c0 13.3 10.7 24 24 24s24-10.7 24-24l0-71.9c0 0 0-.1 0-.1c0-8.8 7.2-16 16-16s16 7.2 16 16l0 172.9c-.1 .6-.1 1.3-.2 1.9c-3.4 69.7-59.3 125.6-129 129c-.6 0-1.3 .1-1.9 .2l-4.9 0-8.5 0c-55.2 0-108.1-21.9-147.1-60.9L52.7 315.3c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L119 336.4c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2L160 96c0-8.8 7.2-16 16-16c8.8 0 16 7.1 16 15.9L192 232c0 13.3 10.7 24 24 24s24-10.7 24-24l0-135.9z\"]\n};\nconst faHandPaper = faHand;\nconst faHandSpock = {\n  prefix: 'far',\n  iconName: 'hand-spock',\n  icon: [576, 512, [128406], \"f259\", \"M170.2 80.8C161 47 180.8 12 214.6 2.4c34-9.6 69.4 10.2 79 44.2l30.3 107.1L337.1 84c6.6-34.7 40.1-57.5 74.8-50.9c31.4 6 53 33.9 52 64.9c10-2.6 20.8-2.8 31.5-.1c34.3 8.6 55.1 43.3 46.6 77.6L486.7 397.2C469.8 464.7 409.2 512 339.6 512l-33.7 0c-56.9 0-112.2-19-157.2-53.9l-92-71.6c-27.9-21.7-32.9-61.9-11.2-89.8s61.9-32.9 89.8-11.2l17 13.2L100.5 167.5c-13-32.9 3.2-70.1 36-83c11.1-4.4 22.7-5.4 33.7-3.7zm77.1-21.2c-2.4-8.5-11.2-13.4-19.7-11s-13.4 11.2-11 19.7l54.8 182.4c3.5 12.3-3.3 25.2-15.4 29.3s-25.3-2-30-13.9L174.9 138.1c-3.2-8.2-12.5-12.3-20.8-9s-12.3 12.5-9 20.8l73.3 185.6c12 30.3-23.7 57-49.4 37l-63.1-49.1c-7-5.4-17-4.2-22.5 2.8s-4.2 17 2.8 22.5l92 71.6c36.5 28.4 81.4 43.8 127.7 43.8l33.7 0c47.5 0 89-32.4 100.5-78.5l55.4-221.6c2.1-8.6-3.1-17.3-11.6-19.4s-17.3 3.1-19.4 11.6l-26 104C435.6 271.8 425 280 413 280c-16.5 0-28.9-15-25.8-31.2L415.7 99c1.7-8.7-4-17.1-12.7-18.7s-17.1 4-18.7 12.7L352.5 260c-2.2 11.6-12.4 20-24.2 20c-11 0-20.7-7.3-23.7-17.9L247.4 59.6z\"]\n};\nconst faFaceKiss = {\n  prefix: 'far',\n  iconName: 'face-kiss',\n  icon: [512, 512, [128535, \"kiss\"], \"f596\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm304.7 25.7c4.3 5.1 7.3 11.4 7.3 18.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\n};\nconst faKiss = faFaceKiss;\nconst faFaceGrinTongue = {\n  prefix: 'far',\n  iconName: 'face-grin-tongue',\n  icon: [512, 512, [128539, \"grin-tongue\"], \"f589\", \"M464 256c0-114.9-93.1-208-208-208S48 141.1 48 256c0 81.7 47.1 152.4 115.7 186.4c-2.4-8.4-3.7-17.3-3.7-26.4l0-52.4c-8.9-8-16.7-17.1-23.1-27.1c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5c18.7-4.4 35.9 12 25.5 28.1c-6.4 9.9-14.2 19-23 27l0 52.5c0 9.2-1.3 18-3.7 26.4C416.9 408.4 464 337.7 464 256zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm176.4-80a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 416l0-37.4c0-14.7-11.9-26.6-26.6-26.6l-2 0c-11.3 0-21.1 7.9-23.6 18.9c-2.8 12.6-20.8 12.6-23.6 0c-2.5-11.1-12.3-18.9-23.6-18.9l-2 0c-14.7 0-26.6 11.9-26.6 26.6l0 37.4c0 35.3 28.7 64 64 64s64-28.7 64-64z\"]\n};\nconst faGrinTongue = faFaceGrinTongue;\nconst faChessBishop = {\n  prefix: 'far',\n  iconName: 'chess-bishop',\n  icon: [320, 512, [9821], \"f43a\", \"M104 0C90.7 0 80 10.7 80 24c0 11.2 7.6 20.6 18 23.2c-7.8 8-16.1 17-24.4 27C38.2 116.7 0 178.8 0 250.9c0 44.8 24.6 72.2 48 87.8L48 352l48 0 0-27c0-9-5-17.2-13-21.3c-18-9.3-35-24.7-35-52.7c0-55.5 29.8-106.8 62.4-145.9c16-19.2 32.1-34.8 44.2-45.5c1.9-1.7 3.7-3.2 5.3-4.6c1.7 1.4 3.4 3 5.3 4.6c12.1 10.7 28.2 26.3 44.2 45.5c5.3 6.3 10.5 13 15.5 20L159 191c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l57.8-57.8c12.8 25.9 21.2 54.3 21.2 83.8c0 28-17 43.4-35 52.7c-8 4.1-13 12.3-13 21.3l0 27 48 0 0-13.3c23.4-15.6 48-42.9 48-87.8c0-72.1-38.2-134.2-73.6-176.7c-8.3-9.9-16.6-19-24.4-27c10.3-2.7 18-12.1 18-23.2c0-13.3-10.7-24-24-24L160 0 104 0zM52.7 464l16.6-32 181.6 0 16.6 32L52.7 464zm207.9-80l-201 0c-12 0-22.9 6.7-28.4 17.3L4.6 452.5c-3 5.8-4.6 12.2-4.6 18.7C0 493.8 18.2 512 40.8 512l238.5 0c22.5 0 40.8-18.2 40.8-40.8c0-6.5-1.6-12.9-4.6-18.7l-26.5-51.2c-5.5-10.6-16.5-17.3-28.4-17.3z\"]\n};\nconst faFaceGrinWink = {\n  prefix: 'far',\n  iconName: 'face-grin-wink',\n  icon: [512, 512, [\"grin-wink\"], \"f58c\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm349.5 52.4c18.7-4.4 35.9 12 25.5 28.1C350.4 374.6 306.3 400 255.9 400s-94.5-25.4-119.1-63.5c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm165.8 21.7c-7.6 8.1-20.2 8.5-28.3 .9s-8.5-20.2-.9-28.3c14.5-15.5 35.2-22.3 54.6-22.3s40.1 6.8 54.6 22.3c7.6 8.1 7.1 20.7-.9 28.3s-20.7 7.1-28.3-.9c-5.5-5.8-14.8-9.7-25.4-9.7s-19.9 3.8-25.4 9.7z\"]\n};\nconst faGrinWink = faFaceGrinWink;\nconst faFaceGrinWide = {\n  prefix: 'far',\n  iconName: 'face-grin-wide',\n  icon: [512, 512, [128515, \"grin-alt\"], \"f581\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm349.5 52.4c18.7-4.4 35.9 12 25.5 28.1C350.4 374.6 306.3 400 255.9 400s-94.5-25.4-119.1-63.5c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5zM224 192c0 35.3-14.3 64-32 64s-32-28.7-32-64s14.3-64 32-64s32 28.7 32 64zm96 64c-17.7 0-32-28.7-32-64s14.3-64 32-64s32 28.7 32 64s-14.3 64-32 64z\"]\n};\nconst faGrinAlt = faFaceGrinWide;\nconst faFaceFrownOpen = {\n  prefix: 'far',\n  iconName: 'face-frown-open',\n  icon: [512, 512, [128550, \"frown-open\"], \"f57a\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM182.4 382.5c-12.4 5.2-26.5-4.1-21.1-16.4c16-36.6 52.4-62.1 94.8-62.1s78.8 25.6 94.8 62.1c5.4 12.3-8.7 21.6-21.1 16.4c-22.4-9.5-47.4-14.8-73.7-14.8s-51.3 5.3-73.7 14.8zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faFrownOpen = faFaceFrownOpen;\nconst faHandPointUp = {\n  prefix: 'far',\n  iconName: 'hand-point-up',\n  icon: [384, 512, [9757], \"f0a6\", \"M64 64l0 177.6c5.2-1 10.5-1.6 16-1.6l16 0 0-32L96 64c0-8.8-7.2-16-16-16s-16 7.2-16 16zM80 288c-17.7 0-32 14.3-32 32c0 0 0 0 0 0l0 24c0 66.3 53.7 120 120 120l48 0c52.5 0 97.1-33.7 113.4-80.7c-3.1 .5-6.2 .7-9.4 .7c-20 0-37.9-9.2-49.7-23.6c-9 4.9-19.4 7.6-30.3 7.6c-15.1 0-29-5.3-40-14c-11 8.8-24.9 14-40 14l-40 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l40 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-40 0-40 0zM0 320s0 0 0 0c0-18 6-34.6 16-48L16 64C16 28.7 44.7 0 80 0s64 28.7 64 64l0 82c5.1-1.3 10.5-2 16-2c25.3 0 47.2 14.7 57.6 36c7-2.6 14.5-4 22.4-4c20 0 37.9 9.2 49.7 23.6c9-4.9 19.4-7.6 30.3-7.6c35.3 0 64 28.7 64 64l0 64 0 24c0 92.8-75.2 168-168 168l-48 0C75.2 512 0 436.8 0 344l0-24zm336-64c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48 0 16c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM160 240c5.5 0 10.9 .7 16 2l0-2 0-32c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 32 16 0zm64 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 0-16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 24z\"]\n};\nconst faBookmark = {\n  prefix: 'far',\n  iconName: 'bookmark',\n  icon: [384, 512, [128278, 61591], \"f02e\", \"M0 48C0 21.5 21.5 0 48 0l0 48 0 393.4 130.1-92.9c8.3-6 19.6-6 27.9 0L336 441.4 336 48 48 48 48 0 336 0c26.5 0 48 21.5 48 48l0 440c0 9-5 17.2-13 21.3s-17.6 3.4-24.9-1.8L192 397.5 37.9 507.5c-7.3 5.2-16.9 5.9-24.9 1.8S0 497 0 488L0 48z\"]\n};\nconst faHandPointDown = {\n  prefix: 'far',\n  iconName: 'hand-point-down',\n  icon: [384, 512, [], \"f0a7\", \"M64 448l0-177.6c5.2 1 10.5 1.6 16 1.6l16 0 0 32 0 144c0 8.8-7.2 16-16 16s-16-7.2-16-16zM80 224c-17.7 0-32-14.3-32-32c0 0 0 0 0 0l0-24c0-66.3 53.7-120 120-120l48 0c52.5 0 97.1 33.7 113.4 80.7c-3.1-.5-6.2-.7-9.4-.7c-20 0-37.9 9.2-49.7 23.6c-9-4.9-19.4-7.6-30.3-7.6c-15.1 0-29 5.3-40 14c-11-8.8-24.9-14-40-14l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0-40 0zM0 192s0 0 0 0c0 18 6 34.6 16 48l0 208c0 35.3 28.7 64 64 64s64-28.7 64-64l0-82c5.1 1.3 10.5 2 16 2c25.3 0 47.2-14.7 57.6-36c7 2.6 14.5 4 22.4 4c20 0 37.9-9.2 49.7-23.6c9 4.9 19.4 7.6 30.3 7.6c35.3 0 64-28.7 64-64l0-64 0-24C384 75.2 308.8 0 216 0L168 0C75.2 0 0 75.2 0 168l0 24zm336 64c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64zM160 272c5.5 0 10.9-.7 16-2l0 2 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 16 0zm64-24l0-40c0-8.8 7.2-16 16-16s16 7.2 16 16l0 48 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-24z\"]\n};\nconst faFolder = {\n  prefix: 'far',\n  iconName: 'folder',\n  icon: [512, 512, [128193, 128447, 61716, \"folder-blank\"], \"f07b\", \"M0 96C0 60.7 28.7 32 64 32l132.1 0c19.1 0 37.4 7.6 50.9 21.1L289.9 96 448 96c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16l-161.4 0c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7L64 80z\"]\n};\nconst faFolderBlank = faFolder;\nconst faUser = {\n  prefix: 'far',\n  iconName: 'user',\n  icon: [448, 512, [128100, 62144], \"f007\", \"M304 128a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM49.3 464l349.5 0c-8.9-63.3-63.3-112-129-112l-91.4 0c-65.7 0-120.1 48.7-129 112zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3z\"]\n};\nconst faSquareCaretLeft = {\n  prefix: 'far',\n  iconName: 'square-caret-left',\n  icon: [448, 512, [\"caret-square-left\"], \"f191\", \"M48 416c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320zm16 64c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480zm64-224c0-6.7 2.8-13 7.7-17.6l112-104c7-6.5 17.2-8.2 25.9-4.4s14.4 12.5 14.4 22l0 208c0 9.5-5.7 18.2-14.4 22s-18.9 2.1-25.9-4.4l-112-104c-4.9-4.5-7.7-10.9-7.7-17.6z\"]\n};\nconst faCaretSquareLeft = faSquareCaretLeft;\nconst faStar = {\n  prefix: 'far',\n  iconName: 'star',\n  icon: [576, 512, [11088, 61446], \"f005\", \"M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z\"]\n};\nconst faChessKnight = {\n  prefix: 'far',\n  iconName: 'chess-knight',\n  icon: [448, 512, [9822], \"f441\", \"M226.6 48L117.3 48l17.1 12.8c6 4.5 9.6 11.6 9.6 19.2s-3.6 14.7-9.6 19.2l-6.5 4.9c-10 7.5-16 19.3-16 31.9l-.3 91c0 10.2 4.9 19.9 13.2 25.8l1.9 1.3c9.9 7.1 23.3 7 33.2-.1l49.9-36.3c10.7-7.8 25.7-5.4 33.5 5.3s5.4 25.7-5.3 33.5l-49.9 36.3-53.8 39.1c-7.3 5.3-13 12.2-16.9 20.1l-50.7 0c5.3-22.1 17.8-41.9 35.9-56.3c-1.3-.8-2.6-1.7-3.8-2.6L97 291.8c-21-15-33.4-39.2-33.3-65l.3-91c.1-19.8 6.7-38.7 18.6-53.9l-.4-.3C70.7 73 64 59.6 64 45.3C64 20.3 84.3 0 109.3 0L226.6 0C331.2 0 416 84.8 416 189.4c0 11.1-1 22.2-2.9 33.2L390.1 352l-48.8 0 24.5-137.8c1.5-8.2 2.2-16.5 2.2-24.8C368 111.3 304.7 48 226.6 48zM85.2 432L68.7 464l310.7 0-16.6-32L85.2 432zm315.7-30.7l26.5 51.2c3 5.8 4.6 12.2 4.6 18.7c0 22.5-18.2 40.8-40.8 40.8L56.8 512C34.2 512 16 493.8 16 471.2c0-6.5 1.6-12.9 4.6-18.7l26.5-51.2C52.5 390.7 63.5 384 75.5 384l297 0c12 0 22.9 6.7 28.4 17.3zM172 128a20 20 0 1 1 0 40 20 20 0 1 1 0-40z\"]\n};\nconst faFaceLaughSquint = {\n  prefix: 'far',\n  iconName: 'face-laugh-squint',\n  icon: [512, 512, [\"laugh-squint\"], \"f59b\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm130.7 57.9c-4.2-13.6 7.1-25.9 21.3-25.9l212.5 0c14.2 0 25.5 12.4 21.3 25.9C369 368.4 318.2 408 258.2 408s-110.8-39.6-127.5-94.1zm2.8-183.3l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6c0-9 9.6-14.7 17.5-10.5zM396 141.1c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9c7.9-4.2 17.5 1.5 17.5 10.5z\"]\n};\nconst faLaughSquint = faFaceLaughSquint;\nconst faFaceLaugh = {\n  prefix: 'far',\n  iconName: 'face-laugh',\n  icon: [512, 512, [\"laugh\"], \"f599\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm130.7 57.9c-4.2-13.6 7.1-25.9 21.3-25.9l212.5 0c14.2 0 25.5 12.4 21.3 25.9C369 368.4 318.2 408 258.2 408s-110.8-39.6-127.5-94.1zM144.4 192a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faLaugh = faFaceLaugh;\nconst faFolderOpen = {\n  prefix: 'far',\n  iconName: 'folder-open',\n  icon: [576, 512, [128194, 128449, 61717], \"f07c\", \"M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z\"]\n};\nconst faClipboard = {\n  prefix: 'far',\n  iconName: 'clipboard',\n  icon: [384, 512, [128203], \"f328\", \"M280 64l40 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l40 0 9.6 0C121 27.5 153.3 0 192 0s71 27.5 78.4 64l9.6 0zM64 112c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16l-16 0 0 24c0 13.3-10.7 24-24 24l-88 0-88 0c-13.3 0-24-10.7-24-24l0-24-16 0zm128-8a24 24 0 1 0 0-48 24 24 0 1 0 0 48z\"]\n};\nconst faChessQueen = {\n  prefix: 'far',\n  iconName: 'chess-queen',\n  icon: [512, 512, [9819], \"f445\", \"M256 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-95.2-8c-18.1 0-31.3 12.8-35.6 26.9c-8 26.2-32.4 45.2-61.2 45.2c-10 0-19.4-2.3-27.7-6.3c-7.6-3.7-16.7-3.3-24 1.2C.7 162.1-3.1 177.1 3.7 188.9L97.6 352l55.4 0-83-144.1c40.5-2.2 75.3-25.9 93.1-59.8c22 26.8 55.4 43.9 92.8 43.9s70.8-17.1 92.8-43.9c17.8 34 52.6 57.7 93.1 59.8L359 352l55.4 0 93.9-163.1c6.8-11.7 3-26.7-8.6-33.8c-7.3-4.5-16.4-4.9-24-1.2c-8.4 4-17.7 6.3-27.7 6.3c-28.8 0-53.2-19-61.2-45.2C382.5 100.8 369.3 88 351.2 88c-14.5 0-26.3 8.5-32.4 19.3c-12.4 22-35.9 36.7-62.8 36.7s-50.4-14.8-62.8-36.7C187.1 96.5 175.4 88 160.8 88zM133.2 432l245.6 0 16.6 32-278.7 0 16.6-32zm283.7-30.7c-5.5-10.6-16.5-17.3-28.4-17.3l-265 0c-12 0-22.9 6.7-28.4 17.3L68.6 452.5c-3 5.8-4.6 12.2-4.6 18.7c0 22.5 18.2 40.8 40.8 40.8l302.5 0c22.5 0 40.8-18.2 40.8-40.8c0-6.5-1.6-12.9-4.6-18.7l-26.5-51.2z\"]\n};\nconst faHandBackFist = {\n  prefix: 'far',\n  iconName: 'hand-back-fist',\n  icon: [448, 512, [\"hand-rock\"], \"f255\", \"M144 64c0-8.8 7.2-16 16-16s16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16l0 104c0 31.3-20 58-48 67.9c-9.6 3.4-16 12.5-16 22.6L304 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-117.8c38-20.1 64-60.1 64-106.2l0-104c0-35.3-28.7-64-64-64c-2.8 0-5.6 .2-8.3 .5C332.8 77.1 311.9 64 288 64c-2.8 0-5.6 .2-8.3 .5C268.8 45.1 247.9 32 224 32c-2.8 0-5.6 .2-8.3 .5C204.8 13.1 183.9 0 160 0C124.7 0 96 28.7 96 64l0 64.3c-11.7 7.4-22.5 16.4-32 26.9l17.8 16.1L64 155.2l-9.4 10.5C40 181.8 32 202.8 32 224.6l0 12.8c0 49.6 24.2 96.1 64.8 124.5l13.8-19.7L96.8 361.9l8.9 6.2c6.9 4.8 14.4 8.6 22.3 11.3L128 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-128.1c0-12.6-9.8-23.1-22.4-23.9c-7.3-.5-14.3-2.9-20.3-7.1l-13.1 18.7 13.1-18.7-8.9-6.2C96.6 303.1 80 271.3 80 237.4l0-12.8c0-9.9 3.7-19.4 10.3-26.8l9.4-10.5c3.8-4.2 7.9-8.1 12.3-11.6l0 32.3c0 8.8 7.2 16 16 16s16-7.2 16-16l0-65.7 0-14.3 0-64z\"]\n};\nconst faHandRock = faHandBackFist;\nconst faSquareCaretUp = {\n  prefix: 'far',\n  iconName: 'square-caret-up',\n  icon: [448, 512, [\"caret-square-up\"], \"f151\", \"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm224 64c6.7 0 13 2.8 17.6 7.7l104 112c6.5 7 8.2 17.2 4.4 25.9s-12.5 14.4-22 14.4l-208 0c-9.5 0-18.2-5.7-22-14.4s-2.1-18.9 4.4-25.9l104-112c4.5-4.9 10.9-7.7 17.6-7.7z\"]\n};\nconst faCaretSquareUp = faSquareCaretUp;\nconst faChartBar = {\n  prefix: 'far',\n  iconName: 'chart-bar',\n  icon: [512, 512, [\"bar-chart\"], \"f080\", \"M24 32c13.3 0 24 10.7 24 24l0 352c0 13.3 10.7 24 24 24l416 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L72 480c-39.8 0-72-32.2-72-72L0 56C0 42.7 10.7 32 24 32zM128 136c0-13.3 10.7-24 24-24l208 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-208 0c-13.3 0-24-10.7-24-24zm24 72l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm0 96l272 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-272 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faBarChart = faChartBar;\nconst faWindowRestore = {\n  prefix: 'far',\n  iconName: 'window-restore',\n  icon: [512, 512, [], \"f2d2\", \"M432 48L208 48c-17.7 0-32 14.3-32 32l0 16-48 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-48 16 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32zM48 448c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-192L48 256l0 192zM64 128l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64z\"]\n};\nconst faSquarePlus = {\n  prefix: 'far',\n  iconName: 'square-plus',\n  icon: [448, 512, [61846, \"plus-square\"], \"f0fe\", \"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM200 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z\"]\n};\nconst faPlusSquare = faSquarePlus;\nconst faImage = {\n  prefix: 'far',\n  iconName: 'image',\n  icon: [512, 512, [], \"f03e\", \"M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z\"]\n};\nconst faFolderClosed = {\n  prefix: 'far',\n  iconName: 'folder-closed',\n  icon: [512, 512, [], \"e185\", \"M251.7 127.6s0 0 0 0c10.5 10.5 24.7 16.4 39.6 16.4L448 144c8.8 0 16 7.2 16 16l0 32L48 192l0-96c0-8.8 7.2-16 16-16l133.5 0c4.2 0 8.3 1.7 11.3 4.7l33.9-33.9L208.8 84.7l42.9 42.9zM48 240l416 0 0 176c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-176zM285.7 93.7L242.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L291.3 96c-2.1 0-4.2-.8-5.7-2.3z\"]\n};\nconst faLemon = {\n  prefix: 'far',\n  iconName: 'lemon',\n  icon: [448, 512, [127819], \"f094\", \"M368 80c-3.2 0-6.2 .4-8.9 1.3C340 86.8 313 91.9 284.8 84.6C227.4 69.7 160.2 92 110.1 142.1S37.7 259.4 52.6 316.8c7.3 28.2 2.2 55.2-3.3 74.3c-.8 2.8-1.3 5.8-1.3 8.9c0 17.7 14.3 32 32 32c3.2 0 6.2-.4 8.9-1.3c19.1-5.5 46.1-10.7 74.3-3.3c57.4 14.9 124.6-7.4 174.7-57.5s72.4-117.3 57.5-174.7c-7.3-28.2-2.2-55.2 3.3-74.3c.8-2.8 1.3-5.8 1.3-8.9c0-17.7-14.3-32-32-32zm0-48c44.2 0 80 35.8 80 80c0 7.7-1.1 15.2-3.1 22.3c-4.6 15.8-7.1 32.9-3 48.9c20.1 77.6-10.9 161.5-70 220.7s-143.1 90.2-220.7 70c-16-4.1-33-1.6-48.9 3c-7.1 2-14.6 3.1-22.3 3.1c-44.2 0-80-35.8-80-80c0-7.7 1.1-15.2 3.1-22.3c4.6-15.8 7.1-32.9 3-48.9C-14 251.3 17 167.3 76.2 108.2S219.3 18 296.8 38.1c16 4.1 33 1.6 48.9-3c7.1-2 14.6-3.1 22.3-3.1zM246.7 167c-52 15.2-96.5 59.7-111.7 111.7c-3.7 12.7-17.1 20-29.8 16.3s-20-17.1-16.3-29.8c19.8-67.7 76.6-124.5 144.3-144.3c12.7-3.7 26.1 3.6 29.8 16.3s-3.6 26.1-16.3 29.8z\"]\n};\nconst faHandshake = {\n  prefix: 'far',\n  iconName: 'handshake',\n  icon: [640, 512, [], \"f2b5\", \"M272.2 64.6l-51.1 51.1c-15.3 4.2-29.5 11.9-41.5 22.5L153 161.9C142.8 171 129.5 176 115.8 176L96 176l0 128c20.4 .6 39.8 8.9 54.3 23.4l35.6 35.6 7 7c0 0 0 0 0 0L219.9 397c6.2 6.2 16.4 6.2 22.6 0c1.7-1.7 3-3.7 3.7-5.8c2.8-7.7 9.3-13.5 17.3-15.3s16.4 .6 22.2 6.5L296.5 393c11.6 11.6 30.4 11.6 41.9 0c5.4-5.4 8.3-12.3 8.6-19.4c.4-8.8 5.6-16.6 13.6-20.4s17.3-3 24.4 2.1c9.4 6.7 22.5 5.8 30.9-2.6c9.4-9.4 9.4-24.6 0-33.9L340.1 243l-35.8 33c-27.3 25.2-69.2 25.6-97 .9c-31.7-28.2-32.4-77.4-1.6-106.5l70.1-66.2C303.2 78.4 339.4 64 377.1 64c36.1 0 71 13.3 97.9 37.2L505.1 128l38.9 0 40 0 40 0c8.8 0 16 7.2 16 16l0 208c0 17.7-14.3 32-32 32l-32 0c-11.8 0-22.2-6.4-27.7-16l-84.9 0c-3.4 6.7-7.9 13.1-13.5 18.7c-17.1 17.1-40.8 23.8-63 20.1c-3.6 7.3-8.5 14.1-14.6 20.2c-27.3 27.3-70 30-100.4 8.1c-25.1 20.8-62.5 19.5-86-4.1L159 404l-7-7-35.6-35.6c-5.5-5.5-12.7-8.7-20.4-9.3C96 369.7 81.6 384 64 384l-32 0c-17.7 0-32-14.3-32-32L0 144c0-8.8 7.2-16 16-16l40 0 40 0 19.8 0c2 0 3.9-.7 5.3-2l26.5-23.6C175.5 77.7 211.4 64 248.7 64L259 64c4.4 0 8.9 .2 13.2 .6zM544 320l0-144-48 0c-5.9 0-11.6-2.2-15.9-6.1l-36.9-32.8c-18.2-16.2-41.7-25.1-66.1-25.1c-25.4 0-49.8 9.7-68.3 27.1l-70.1 66.2c-10.3 9.8-10.1 26.3 .5 35.7c9.3 8.3 23.4 8.1 32.5-.3l71.9-66.4c9.7-9 24.9-8.4 33.9 1.4s8.4 24.9-1.4 33.9l-.8 .8 74.4 74.4c10 10 16.5 22.3 19.4 35.1l74.8 0zM64 336a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zm528 16a16 16 0 1 0 0-32 16 16 0 1 0 0 32z\"]\n};\nconst faGem = {\n  prefix: 'far',\n  iconName: 'gem',\n  icon: [512, 512, [128142], \"f3a5\", \"M168.5 72L256 165l87.5-93-175 0zM383.9 99.1L311.5 176l129 0L383.9 99.1zm50 124.9L256 224 78.1 224 256 420.3 433.9 224zM71.5 176l129 0L128.1 99.1 71.5 176zm434.3 40.1l-232 256c-4.5 5-11 7.9-17.8 7.9s-13.2-2.9-17.8-7.9l-232-256c-7.7-8.5-8.3-21.2-1.5-30.4l112-152c4.5-6.1 11.7-9.8 19.3-9.8l240 0c7.6 0 14.8 3.6 19.3 9.8l112 152c6.8 9.2 6.1 21.9-1.5 30.4z\"]\n};\nconst faCirclePlay = {\n  prefix: 'far',\n  iconName: 'circle-play',\n  icon: [512, 512, [61469, \"play-circle\"], \"f144\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c7.6-4.2 16.8-4.1 24.3 .5l144 88c7.1 4.4 11.5 12.1 11.5 20.5s-4.4 16.1-11.5 20.5l-144 88c-7.4 4.5-16.7 4.7-24.3 .5s-12.3-12.2-12.3-20.9l0-176c0-8.7 4.7-16.7 12.3-20.9z\"]\n};\nconst faPlayCircle = faCirclePlay;\nconst faCircleCheck = {\n  prefix: 'far',\n  iconName: 'circle-check',\n  icon: [512, 512, [61533, \"check-circle\"], \"f058\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z\"]\n};\nconst faCheckCircle = faCircleCheck;\nconst faCircleStop = {\n  prefix: 'far',\n  iconName: 'circle-stop',\n  icon: [512, 512, [62094, \"stop-circle\"], \"f28d\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm192-96l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z\"]\n};\nconst faStopCircle = faCircleStop;\nconst faIdBadge = {\n  prefix: 'far',\n  iconName: 'id-badge',\n  icon: [384, 512, [], \"f2c1\", \"M256 48l0 16c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-16L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-384c0-8.8-7.2-16-16-16l-64 0zM0 64C0 28.7 28.7 0 64 0L320 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM160 320l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L96 416c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z\"]\n};\nconst faFaceLaughBeam = {\n  prefix: 'far',\n  iconName: 'face-laugh-beam',\n  icon: [512, 512, [128513, \"laugh-beam\"], \"f59a\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm130.7 57.9c-4.2-13.6 7.1-25.9 21.3-25.9l212.5 0c14.2 0 25.5 12.4 21.3 25.9C369 368.4 318.2 408 258.2 408s-110.8-39.6-127.5-94.1zm86.9-85.1s0 0 0 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0zm160 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faLaughBeam = faFaceLaughBeam;\nconst faRegistered = {\n  prefix: 'far',\n  iconName: 'registered',\n  icon: [512, 512, [174], \"f25d\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM160 152l0 112 0 96c0 13.3 10.7 24 24 24s24-10.7 24-24l0-72 60.9 0 37.2 81.9c5.5 12.1 19.7 17.4 31.8 11.9s17.4-19.7 11.9-31.8L315.7 275c21.8-14.3 36.3-39 36.3-67c0-44.2-35.8-80-80-80l-88 0c-13.3 0-24 10.7-24 24zm48 88l0-64 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0z\"]\n};\nconst faAddressCard = {\n  prefix: 'far',\n  iconName: 'address-card',\n  icon: [576, 512, [62140, \"contact-card\", \"vcard\"], \"f2bb\", \"M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM208 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0zM376 144c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z\"]\n};\nconst faContactCard = faAddressCard;\nconst faVcard = faAddressCard;\nconst faFaceTired = {\n  prefix: 'far',\n  iconName: 'face-tired',\n  icon: [512, 512, [128555, \"tired\"], \"f5c8\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm176.5 64.3C196.1 302.1 223.8 288 256 288s59.9 14.1 79.5 32.3C354.5 338.1 368 362 368 384c0 5.4-2.7 10.4-7.2 13.4s-10.2 3.4-15.2 1.3l-17.2-7.5c-22.8-10-47.5-15.1-72.4-15.1s-49.6 5.2-72.4 15.1l-17.2 7.5c-4.9 2.2-10.7 1.7-15.2-1.3s-7.2-8-7.2-13.4c0-22 13.5-45.9 32.5-63.7zm-43-173.6l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6c0-9 9.6-14.7 17.5-10.5zM396 157.1c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9c7.9-4.2 17.5 1.5 17.5 10.5z\"]\n};\nconst faTired = faFaceTired;\nconst faFontAwesome = {\n  prefix: 'far',\n  iconName: 'font-awesome',\n  icon: [512, 512, [62501, 62694, \"font-awesome-flag\", \"font-awesome-logo-full\"], \"f2b4\", \"M91.7 96C106.3 86.8 116 70.5 116 52C116 23.3 92.7 0 64 0S12 23.3 12 52c0 16.7 7.8 31.5 20 41l0 3 0 48 0 256 0 48 0 64 48 0 0-64 389.6 0c14.6 0 26.4-11.8 26.4-26.4c0-3.7-.8-7.3-2.3-10.7L432 272l61.7-138.9c1.5-3.4 2.3-7 2.3-10.7c0-14.6-11.8-26.4-26.4-26.4L91.7 96zM80 400l0-256 356.4 0L388.1 252.5c-5.5 12.4-5.5 26.6 0 39L436.4 400 80 400z\"]\n};\nconst faFontAwesomeFlag = faFontAwesome;\nconst faFontAwesomeLogoFull = faFontAwesome;\nconst faFaceSmileWink = {\n  prefix: 'far',\n  iconName: 'face-smile-wink',\n  icon: [512, 512, [128521, \"smile-wink\"], \"f4da\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm177.6 62.1C192.8 334.5 218.8 352 256 352s63.2-17.5 78.4-33.9c9-9.7 24.2-10.4 33.9-1.4s10.4 24.2 1.4 33.9c-22 23.8-60 49.4-113.6 49.4s-91.7-25.5-113.6-49.4c-9-9.7-8.4-24.9 1.4-33.9s24.9-8.4 33.9 1.4zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm165.8 21.7c-7.6 8.1-20.2 8.5-28.3 .9s-8.5-20.2-.9-28.3c14.5-15.5 35.2-22.3 54.6-22.3s40.1 6.8 54.6 22.3c7.6 8.1 7.1 20.7-.9 28.3s-20.7 7.1-28.3-.9c-5.5-5.8-14.8-9.7-25.4-9.7s-19.9 3.8-25.4 9.7z\"]\n};\nconst faSmileWink = faFaceSmileWink;\nconst faFileWord = {\n  prefix: 'far',\n  iconName: 'file-word',\n  icon: [384, 512, [], \"f1c2\", \"M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z\"]\n};\nconst faFilePowerpoint = {\n  prefix: 'far',\n  iconName: 'file-powerpoint',\n  icon: [384, 512, [], \"f1c4\", \"M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm72 208c-13.3 0-24 10.7-24 24l0 104 0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-32 44 0c42 0 76-34 76-76s-34-76-76-76l-68 0zm68 104l-44 0 0-56 44 0c15.5 0 28 12.5 28 28s-12.5 28-28 28z\"]\n};\nconst faEnvelopeOpen = {\n  prefix: 'far',\n  iconName: 'envelope-open',\n  icon: [512, 512, [62135], \"f2b6\", \"M255.4 48.2c.2-.1 .4-.2 .6-.2s.4 .1 .6 .2L460.6 194c2.1 1.5 3.4 3.9 3.4 6.5l0 13.6L291.5 355.7c-20.7 17-50.4 17-71.1 0L48 214.1l0-13.6c0-2.6 1.2-5 3.4-6.5L255.4 48.2zM48 276.2L190 392.8c38.4 31.5 93.7 31.5 132 0L464 276.2 464 456c0 4.4-3.6 8-8 8L56 464c-4.4 0-8-3.6-8-8l0-179.8zM256 0c-10.2 0-20.2 3.2-28.5 9.1L23.5 154.9C8.7 165.4 0 182.4 0 200.5L0 456c0 30.9 25.1 56 56 56l400 0c30.9 0 56-25.1 56-56l0-255.5c0-18.1-8.7-35.1-23.4-45.6L284.5 9.1C276.2 3.2 266.2 0 256 0z\"]\n};\nconst faFileZipper = {\n  prefix: 'far',\n  iconName: 'file-zipper',\n  icon: [384, 512, [\"file-archive\"], \"f1c6\", \"M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l48 0c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l48 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm48 112c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm-6.3 71.8L82.1 335.9c-1.4 5.4-2.1 10.9-2.1 16.4c0 35.2 28.8 63.7 64 63.7s64-28.5 64-63.7c0-5.5-.7-11.1-2.1-16.4l-23.5-88.2c-3.7-14-16.4-23.8-30.9-23.8l-14.8 0c-14.5 0-27.2 9.7-30.9 23.8zM128 336l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z\"]\n};\nconst faFileArchive = faFileZipper;\nconst faSquare = {\n  prefix: 'far',\n  iconName: 'square',\n  icon: [448, 512, [9632, 9723, 9724, 61590], \"f0c8\", \"M384 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l320 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z\"]\n};\nconst faSnowflake = {\n  prefix: 'far',\n  iconName: 'snowflake',\n  icon: [448, 512, [10052, 10054], \"f2dc\", \"M224 0c13.3 0 24 10.7 24 24l0 46.1 23-23c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-57 57 0 76.5 66.2-38.2 20.9-77.8c3.4-12.8 16.6-20.4 29.4-17s20.4 16.6 17 29.4L373 142.2l37.1-21.4c11.5-6.6 26.2-2.7 32.8 8.8s2.7 26.2-8.8 32.8L397 183.8l31.5 8.4c12.8 3.4 20.4 16.6 17 29.4s-16.6 20.4-29.4 17l-77.8-20.9L272 256l66.2 38.2 77.8-20.9c12.8-3.4 26 4.2 29.4 17s-4.2 26-17 29.4L397 328.2l37.1 21.4c11.5 6.6 15.4 21.3 8.8 32.8s-21.3 15.4-32.8 8.8L373 369.8l8.4 31.5c3.4 12.8-4.2 26-17 29.4s-26-4.2-29.4-17l-20.9-77.8L248 297.6l0 76.5 57 57c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-23-23 0 46.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-46.1-23 23c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l57-57 0-76.5-66.2 38.2-20.9 77.8c-3.4 12.8-16.6 20.4-29.4 17s-20.4-16.6-17-29.4L75 369.8 37.9 391.2c-11.5 6.6-26.2 2.7-32.8-8.8s-2.7-26.2 8.8-32.8L51 328.2l-31.5-8.4c-12.8-3.4-20.4-16.6-17-29.4s16.6-20.4 29.4-17l77.8 20.9L176 256l-66.2-38.2L31.9 238.6c-12.8 3.4-26-4.2-29.4-17s4.2-26 17-29.4L51 183.8 13.9 162.4c-11.5-6.6-15.4-21.3-8.8-32.8s21.3-15.4 32.8-8.8L75 142.2l-8.4-31.5c-3.4-12.8 4.2-26 17-29.4s26 4.2 29.4 17l20.9 77.8L200 214.4l0-76.5L143 81c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l23 23L200 24c0-13.3 10.7-24 24-24z\"]\n};\nconst faNewspaper = {\n  prefix: 'far',\n  iconName: 'newspaper',\n  icon: [512, 512, [128240], \"f1ea\", \"M168 80c-13.3 0-24 10.7-24 24l0 304c0 8.4-1.4 16.5-4.1 24L440 432c13.3 0 24-10.7 24-24l0-304c0-13.3-10.7-24-24-24L168 80zM72 480c-39.8 0-72-32.2-72-72L0 112C0 98.7 10.7 88 24 88s24 10.7 24 24l0 296c0 13.3 10.7 24 24 24s24-10.7 24-24l0-304c0-39.8 32.2-72 72-72l272 0c39.8 0 72 32.2 72 72l0 304c0 39.8-32.2 72-72 72L72 480zM176 136c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 80c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-80zm200-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm0 80l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zM200 272l208 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-208 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm0 80l208 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-208 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"]\n};\nconst faFaceKissWinkHeart = {\n  prefix: 'far',\n  iconName: 'face-kiss-wink-heart',\n  icon: [512, 512, [128536, \"kiss-wink-heart\"], \"f598\", \"M338.9 446.8c-25.4 11-53.4 17.2-82.9 17.2C141.1 464 48 370.9 48 256S141.1 48 256 48s208 93.1 208 208c0 22.4-3.5 43.9-10.1 64.1c3.1 4.5 5.7 9.4 7.8 14.6c12.7-1.6 25.1 .4 36.2 5c9.1-26.2 14-54.4 14-83.7C512 114.6 397.4 0 256 0S0 114.6 0 256S114.6 512 256 512c35.4 0 69.1-7.2 99.7-20.2c-4.8-5.5-8.5-12.2-10.4-19.7l-6.5-25.3zM296 316c0-6.9-3.1-13.2-7.3-18.3c-4.3-5.2-10.1-9.7-16.7-13.4C258.7 276.9 241.4 272 224 272c-3.6 0-6.8 2.5-7.7 6s.6 7.2 3.8 9c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2 .1c.2 .1 .5 .3 .9 .5c.8 .5 2 1.2 3.4 2.1c2.8 1.9 6.5 4.5 10.2 7.6c3.7 3.1 7.2 6.6 9.6 10.1c2.5 3.5 3.5 6.4 3.5 8.6s-1 5-3.5 8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4-30.1 29.5-53.4s-28.8-37-51.1-30.8l-20.2 5.6-5.4-21z\"]\n};\nconst faKissWinkHeart = faFaceKissWinkHeart;\nconst faStarHalfStroke = {\n  prefix: 'far',\n  iconName: 'star-half-stroke',\n  icon: [576, 512, [\"star-half-alt\"], \"f5c0\", \"M309.5 13.5C305.5 5.2 297.1 0 287.9 0s-17.6 5.2-21.6 13.5L197.7 154.8 44.5 177.5c-9 1.3-16.5 7.6-19.3 16.3s-.5 18.1 5.9 24.5L142.2 328.4 116 483.9c-1.5 9 2.2 18.1 9.7 23.5s17.3 6 25.3 1.7l137-73.2 137 73.2c8.1 4.3 17.9 3.7 25.3-1.7s11.2-14.5 9.7-23.5L433.6 328.4 544.8 218.2c6.5-6.4 8.7-15.9 5.9-24.5s-10.3-14.9-19.3-16.3L378.1 154.8 309.5 13.5zM288 384.7l0-305.6 52.5 108.1c3.5 7.1 10.2 12.1 18.1 13.3l118.3 17.5L391 303c-5.5 5.5-8.1 13.3-6.8 21l20.2 119.6L299.2 387.5c-3.5-1.9-7.4-2.8-11.2-2.8z\"]\n};\nconst faStarHalfAlt = faStarHalfStroke;\nconst faFileExcel = {\n  prefix: 'far',\n  iconName: 'file-excel',\n  icon: [384, 512, [], \"f1c3\", \"M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z\"]\n};\nconst faFaceGrinBeam = {\n  prefix: 'far',\n  iconName: 'face-grin-beam',\n  icon: [512, 512, [128516, \"grin-beam\"], \"f582\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm349.5 52.4c18.7-4.4 35.9 12 25.5 28.1C350.4 374.6 306.3 400 255.9 400s-94.5-25.4-119.1-63.5c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5zM217.6 228.8s0 0 0 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0zm160 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0z\"]\n};\nconst faGrinBeam = faFaceGrinBeam;\nconst faObjectUngroup = {\n  prefix: 'far',\n  iconName: 'object-ungroup',\n  icon: [640, 512, [], \"f248\", \"M48.2 66.8c-.1-.8-.2-1.7-.2-2.5l0-.2c0-8.8 7.2-16 16-16c.9 0 1.9 .1 2.8 .2C74.3 49.5 80 56.1 80 64c0 8.8-7.2 16-16 16c-7.9 0-14.5-5.7-15.8-13.2zM0 64c0 26.9 16.5 49.9 40 59.3l0 105.3C16.5 238.1 0 261.1 0 288c0 35.3 28.7 64 64 64c26.9 0 49.9-16.5 59.3-40l201.3 0c9.5 23.5 32.5 40 59.3 40c35.3 0 64-28.7 64-64c0-26.9-16.5-49.9-40-59.3l0-105.3c23.5-9.5 40-32.5 40-59.3c0-35.3-28.7-64-64-64c-26.9 0-49.9 16.5-59.3 40L123.3 40C113.9 16.5 90.9 0 64 0C28.7 0 0 28.7 0 64zm368 0a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM324.7 88c6.5 16 19.3 28.9 35.3 35.3l0 105.3c-16 6.5-28.9 19.3-35.3 35.3l-201.3 0c-6.5-16-19.3-28.9-35.3-35.3l0-105.3c16-6.5 28.9-19.3 35.3-35.3l201.3 0zM384 272a16 16 0 1 1 0 32 16 16 0 1 1 0-32zM80 288c0 7.9-5.7 14.5-13.2 15.8c-.8 .1-1.7 .2-2.5 .2l-.2 0c-8.8 0-16-7.2-16-16c0-.9 .1-1.9 .2-2.8C49.5 277.7 56.1 272 64 272c8.8 0 16 7.2 16 16zm391.3-40l45.4 0c6.5 16 19.3 28.9 35.3 35.3l0 105.3c-16 6.5-28.9 19.3-35.3 35.3l-201.3 0c-6.5-16-19.3-28.9-35.3-35.3l0-36.7-48 0 0 36.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64c26.9 0 49.9-16.5 59.3-40l201.3 0c9.5 23.5 32.5 40 59.3 40c35.3 0 64-28.7 64-64c0-26.9-16.5-49.9-40-59.3l0-105.3c23.5-9.5 40-32.5 40-59.3c0-35.3-28.7-64-64-64c-26.9 0-49.9 16.5-59.3 40L448 200l0 16.4c9.8 8.8 17.8 19.5 23.3 31.6zm88.9-26.7a16 16 0 1 1 31.5 5.5 16 16 0 1 1 -31.5-5.5zM271.8 450.7a16 16 0 1 1 -31.5-5.5 16 16 0 1 1 31.5 5.5zm307-18.5a16 16 0 1 1 -5.5 31.5 16 16 0 1 1 5.5-31.5z\"]\n};\nconst faCircleRight = {\n  prefix: 'far',\n  iconName: 'circle-right',\n  icon: [512, 512, [61838, \"arrow-alt-circle-right\"], \"f35a\", \"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z\"]\n};\nconst faArrowAltCircleRight = faCircleRight;\nconst faFaceRollingEyes = {\n  prefix: 'far',\n  iconName: 'face-rolling-eyes',\n  icon: [512, 512, [128580, \"meh-rolling-eyes\"], \"f5a5\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM168 376c0 13.3 10.7 24 24 24l128 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-128 0c-13.3 0-24 10.7-24 24zm-8-104c-26.5 0-48-21.5-48-48c0-14.3 6.3-27.2 16.2-36c-.2 1.3-.2 2.6-.2 4c0 17.7 14.3 32 32 32s32-14.3 32-32c0-1.4-.1-2.7-.2-4c10 8.8 16.2 21.7 16.2 36c0 26.5-21.5 48-48 48zm0 32a80 80 0 1 0 0-160 80 80 0 1 0 0 160zm192-32c-26.5 0-48-21.5-48-48c0-14.3 6.3-27.2 16.2-36c-.2 1.3-.2 2.6-.2 4c0 17.7 14.3 32 32 32s32-14.3 32-32c0-1.4-.1-2.7-.2-4c10 8.8 16.2 21.7 16.2 36c0 26.5-21.5 48-48 48zm0 32a80 80 0 1 0 0-160 80 80 0 1 0 0 160z\"]\n};\nconst faMehRollingEyes = faFaceRollingEyes;\nconst faObjectGroup = {\n  prefix: 'far',\n  iconName: 'object-group',\n  icon: [576, 512, [], \"f247\", \"M48 115.8C38.2 107 32 94.2 32 80c0-26.5 21.5-48 48-48c14.2 0 27 6.2 35.8 16l344.4 0c8.8-9.8 21.6-16 35.8-16c26.5 0 48 21.5 48 48c0 14.2-6.2 27-16 35.8l0 280.4c9.8 8.8 16 21.6 16 35.8c0 26.5-21.5 48-48 48c-14.2 0-27-6.2-35.8-16l-344.4 0c-8.8 9.8-21.6 16-35.8 16c-26.5 0-48-21.5-48-48c0-14.2 6.2-27 16-35.8l0-280.4zM125.3 96c-4.8 13.6-15.6 24.4-29.3 29.3l0 261.5c13.6 4.8 24.4 15.6 29.3 29.3l325.5 0c4.8-13.6 15.6-24.4 29.3-29.3l0-261.5c-13.6-4.8-24.4-15.6-29.3-29.3L125.3 96zm2.7 64c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-96zM256 320l32 0c35.3 0 64-28.7 64-64l0-32 64 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-32z\"]\n};\nconst faHeart = {\n  prefix: 'far',\n  iconName: 'heart',\n  icon: [512, 512, [128153, 128154, 128155, 128156, 128420, 129293, 129294, 129505, 9829, 10084, 61578], \"f004\", \"M225.8 468.2l-2.5-2.3L48.1 303.2C17.4 274.7 0 234.7 0 192.8l0-3.3c0-70.4 50-130.8 119.2-144C158.6 37.9 198.9 47 231 69.6c9 6.4 17.4 13.8 25 22.3c4.2-4.8 8.7-9.2 13.5-13.3c3.7-3.2 7.5-6.2 11.5-9c0 0 0 0 0 0C313.1 47 353.4 37.9 392.8 45.4C462 58.6 512 119.1 512 189.5l0 3.3c0 41.9-17.4 81.9-48.1 110.4L288.7 465.9l-2.5 2.3c-8.2 7.6-19 11.9-30.2 11.9s-22-4.2-30.2-11.9zM239.1 145c-.4-.3-.7-.7-1-1.1l-17.8-20-.1-.1s0 0 0 0c-23.1-25.9-58-37.7-92-31.2C81.6 101.5 48 142.1 48 189.5l0 3.3c0 28.5 11.9 55.8 32.8 75.2L256 430.7 431.2 268c20.9-19.4 32.8-46.7 32.8-75.2l0-3.3c0-47.3-33.6-88-80.1-96.9c-34-6.5-69 5.4-92 31.2c0 0 0 0-.1 .1s0 0-.1 .1l-17.8 20c-.3 .4-.7 .7-1 1.1c-4.5 4.5-10.6 7-16.9 7s-12.4-2.5-16.9-7z\"]\n};\nconst faFaceSurprise = {\n  prefix: 'far',\n  iconName: 'face-surprise',\n  icon: [512, 512, [128558, \"surprise\"], \"f5c2\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm176.4-80a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM256 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\"]\n};\nconst faSurprise = faFaceSurprise;\nconst faCirclePause = {\n  prefix: 'far',\n  iconName: 'circle-pause',\n  icon: [512, 512, [62092, \"pause-circle\"], \"f28b\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm224-72l0 144c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-144c0-13.3 10.7-24 24-24s24 10.7 24 24zm112 0l0 144c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-144c0-13.3 10.7-24 24-24s24 10.7 24 24z\"]\n};\nconst faPauseCircle = faCirclePause;\nconst faCircle = {\n  prefix: 'far',\n  iconName: 'circle',\n  icon: [512, 512, [128308, 128309, 128992, 128993, 128994, 128995, 128996, 9679, 9898, 9899, 11044, 61708, 61915], \"f111\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z\"]\n};\nconst faCircleUp = {\n  prefix: 'far',\n  iconName: 'circle-up',\n  icon: [512, 512, [61467, \"arrow-alt-circle-up\"], \"f35b\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM151.2 217.4c-4.6 4.2-7.2 10.1-7.2 16.4c0 12.3 10 22.3 22.3 22.3l41.7 0 0 96c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-96 41.7 0c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.2-16.4l-91-84c-3.8-3.5-8.7-5.4-13.9-5.4s-10.1 1.9-13.9 5.4l-91 84z\"]\n};\nconst faArrowAltCircleUp = faCircleUp;\nconst faFileAudio = {\n  prefix: 'far',\n  iconName: 'file-audio',\n  icon: [384, 512, [], \"f1c7\", \"M64 464l256 0c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM192 272l0 128c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L129.4 376 112 376c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16l17.4 0 35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8zm85.8-4c11.6 20 18.2 43.3 18.2 68s-6.6 48-18.2 68c-6.6 11.5-21.3 15.4-32.8 8.8s-15.4-21.3-8.8-32.8c7.5-12.9 11.8-27.9 11.8-44s-4.3-31.1-11.8-44c-6.6-11.5-2.7-26.2 8.8-32.8s26.2-2.7 32.8 8.8z\"]\n};\nconst faFileImage = {\n  prefix: 'far',\n  iconName: 'file-image',\n  icon: [384, 512, [128443], \"f1c5\", \"M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm96 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm69.2 46.9c-3-4.3-7.9-6.9-13.2-6.9s-10.2 2.6-13.2 6.9l-41.3 59.7-11.9-19.1c-2.9-4.7-8.1-7.5-13.6-7.5s-10.6 2.8-13.6 7.5l-40 64c-3.1 4.9-3.2 11.1-.4 16.2s8.2 8.2 14 8.2l48 0 32 0 40 0 72 0c6 0 11.4-3.3 14.2-8.6s2.4-11.6-1-16.5l-72-104z\"]\n};\nconst faCircleQuestion = {\n  prefix: 'far',\n  iconName: 'circle-question',\n  icon: [512, 512, [62108, \"question-circle\"], \"f059\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm169.8-90.7c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faQuestionCircle = faCircleQuestion;\nconst faFaceMehBlank = {\n  prefix: 'far',\n  iconName: 'face-meh-blank',\n  icon: [512, 512, [128566, \"meh-blank\"], \"f5a4\", \"M256 48a208 208 0 1 0 0 416 208 208 0 1 0 0-416zM512 256A256 256 0 1 1 0 256a256 256 0 1 1 512 0zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faMehBlank = faFaceMehBlank;\nconst faEye = {\n  prefix: 'far',\n  iconName: 'eye',\n  icon: [576, 512, [128065], \"f06e\", \"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z\"]\n};\nconst faFaceSadCry = {\n  prefix: 'far',\n  iconName: 'face-sad-cry',\n  icon: [512, 512, [128557, \"sad-cry\"], \"f5b3\", \"M400 406.1L400 288c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 152.6c-28.7 15-61.4 23.4-96 23.4s-67.3-8.5-96-23.4L160 288c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 118.1C72.6 368.2 48 315 48 256C48 141.1 141.1 48 256 48s208 93.1 208 208c0 59-24.6 112.2-64 150.1zM256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM159.6 220c10.6 0 19.9 3.8 25.4 9.7c7.6 8.1 20.2 8.5 28.3 .9s8.5-20.2 .9-28.3C199.7 186.8 179 180 159.6 180s-40.1 6.8-54.6 22.3c-7.6 8.1-7.1 20.7 .9 28.3s20.7 7.1 28.3-.9c5.5-5.8 14.8-9.7 25.4-9.7zm166.6 9.7c5.5-5.8 14.8-9.7 25.4-9.7s19.9 3.8 25.4 9.7c7.6 8.1 20.2 8.5 28.3 .9s8.5-20.2 .9-28.3C391.7 186.8 371 180 351.6 180s-40.1 6.8-54.6 22.3c-7.6 8.1-7.1 20.7 .9 28.3s20.7 7.1 28.3-.9zM208 320l0 32c0 26.5 21.5 48 48 48s48-21.5 48-48l0-32c0-26.5-21.5-48-48-48s-48 21.5-48 48z\"]\n};\nconst faSadCry = faFaceSadCry;\nconst faFileCode = {\n  prefix: 'far',\n  iconName: 'file-code',\n  icon: [384, 512, [], \"f1c9\", \"M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm97 289c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L79 303c-9.4 9.4-9.4 24.6 0 33.9l48 48c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-31-31 31-31zM257 255c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l48-48c9.4-9.4 9.4-24.6 0-33.9l-48-48z\"]\n};\nconst faWindowMaximize = {\n  prefix: 'far',\n  iconName: 'window-maximize',\n  icon: [512, 512, [128470], \"f2d0\", \"M.3 89.5C.1 91.6 0 93.8 0 96L0 224 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-192 0-128c0-35.3-28.7-64-64-64L64 32c-2.2 0-4.4 .1-6.5 .3c-9.2 .9-17.8 3.8-25.5 8.2C21.8 46.5 13.4 55.1 7.7 65.5c-3.9 7.3-6.5 15.4-7.4 24zM48 224l416 0 0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192z\"]\n};\nconst faFaceFrown = {\n  prefix: 'far',\n  iconName: 'face-frown',\n  icon: [512, 512, [9785, \"frown\"], \"f119\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM174.6 384.1c-4.5 12.5-18.2 18.9-30.7 14.4s-18.9-18.2-14.4-30.7C146.9 319.4 198.9 288 256 288s109.1 31.4 126.6 79.9c4.5 12.5-2 26.2-14.4 30.7s-26.2-2-30.7-14.4C328.2 358.5 297.2 336 256 336s-72.2 22.5-81.4 48.1zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faFrown = faFaceFrown;\nconst faFloppyDisk = {\n  prefix: 'far',\n  iconName: 'floppy-disk',\n  icon: [448, 512, [128190, 128426, \"save\"], \"f0c7\", \"M48 96l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-245.5c0-4.2-1.7-8.3-4.7-11.3l33.9-33.9c12 12 18.7 28.3 18.7 45.3L448 416c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l245.5 0c17 0 33.3 6.7 45.3 18.7l74.5 74.5-33.9 33.9L320.8 84.7c-.3-.3-.5-.5-.8-.8L320 184c0 13.3-10.7 24-24 24l-192 0c-13.3 0-24-10.7-24-24L80 80 64 80c-8.8 0-16 7.2-16 16zm80-16l0 80 144 0 0-80L128 80zm32 240a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z\"]\n};\nconst faSave = faFloppyDisk;\nconst faCommentDots = {\n  prefix: 'far',\n  iconName: 'comment-dots',\n  icon: [512, 512, [128172, 62075, \"commenting\"], \"f4ad\", \"M168.2 384.9c-15-5.4-31.7-3.1-44.6 6.4c-8.2 6-22.3 14.8-39.4 22.7c5.6-14.7 9.9-31.3 11.3-49.4c1-12.9-3.3-25.7-11.8-35.5C60.4 302.8 48 272 48 240c0-79.5 83.3-160 208-160s208 80.5 208 160s-83.3 160-208 160c-31.6 0-61.3-5.5-87.8-15.1zM26.3 423.8c-1.6 2.7-3.3 5.4-5.1 8.1l-.3 .5c-1.6 2.3-3.2 4.6-4.8 6.9c-3.5 4.7-7.3 9.3-11.3 13.5c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c5.1 0 10.2-.3 15.3-.8l.7-.1c4.4-.5 8.8-1.1 13.2-1.9c.8-.1 1.6-.3 2.4-.5c17.8-3.5 34.9-9.5 50.1-16.1c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faCommenting = faCommentDots;\nconst faFaceGrinSquint = {\n  prefix: 'far',\n  iconName: 'face-grin-squint',\n  icon: [512, 512, [128518, \"grin-squint\"], \"f585\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm349.5 52.4c18.7-4.4 35.9 12 25.5 28.1C350.4 374.6 306.3 400 255.9 400s-94.5-25.4-119.1-63.5c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5zm-216-161.7l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6c0-9 9.6-14.7 17.5-10.5zM396 157.1c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9c7.9-4.2 17.5 1.5 17.5 10.5z\"]\n};\nconst faGrinSquint = faFaceGrinSquint;\nconst faHandPointer = {\n  prefix: 'far',\n  iconName: 'hand-pointer',\n  icon: [448, 512, [], \"f25a\", \"M160 64c0-8.8 7.2-16 16-16s16 7.2 16 16l0 136c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c8.8 0 16 7.2 16 16c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c7.8 0 14.3 5.6 15.7 13c1.6 8.2 7.3 15.1 15.1 18s16.7 1.6 23.3-3.6c2.7-2.1 6.1-3.4 9.9-3.4c8.8 0 16 7.2 16 16l0 16 0 104c0 39.8-32.2 72-72 72l-56 0-59.8 0-.9 0c-37.4 0-72.4-18.7-93.2-49.9L50.7 312.9c-4.9-7.4-2.9-17.3 4.4-22.2s17.3-2.9 22.2 4.4L116 353.2c5.9 8.8 16.8 12.7 26.9 9.7s17-12.4 17-23l0-19.9 0-256zM176 0c-35.3 0-64 28.7-64 64l0 197.7C91.2 238 55.5 232.8 28.5 250.7C-.9 270.4-8.9 310.1 10.8 339.5L78.3 440.8c29.7 44.5 79.6 71.2 133.1 71.2l.9 0 59.8 0 56 0c66.3 0 120-53.7 120-120l0-104 0-16c0-35.3-28.7-64-64-64c-4.5 0-8.8 .5-13 1.3c-11.7-15.4-30.2-25.3-51-25.3c-6.9 0-13.5 1.1-19.7 3.1C288.7 170.7 269.6 160 248 160c-2.7 0-5.4 .2-8 .5L240 64c0-35.3-28.7-64-64-64zm48 304c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96zm48-16c-8.8 0-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96z\"]\n};\nconst faHandScissors = {\n  prefix: 'far',\n  iconName: 'hand-scissors',\n  icon: [512, 512, [], \"f257\", \"M.2 276.3c-1.2-35.3 26.4-65 61.7-66.2l3.3-.1L57 208.1C22.5 200.5 .7 166.3 8.3 131.8S50.2 75.5 84.7 83.2l173 38.3c2.3-2.9 4.7-5.7 7.1-8.5l18.4-20.3C299.9 74.5 323.5 64 348.3 64l10.2 0c54.1 0 104.1 28.7 131.3 75.4l1.5 2.6c13.6 23.2 20.7 49.7 20.7 76.6L512 344c0 66.3-53.7 120-120 120l-8 0-96 0c-35.3 0-64-28.7-64-64c0-2.8 .2-5.6 .5-8.3c-19.4-11-32.5-31.8-32.5-55.7c0-.8 0-1.6 0-2.4L66.4 338c-35.3 1.2-65-26.4-66.2-61.7zm63.4-18.2c-8.8 .3-15.7 7.7-15.4 16.5s7.7 15.7 16.5 15.4l161.5-5.6c9.8-.3 18.7 5.3 22.7 14.2s2.2 19.3-4.5 26.4c-2.8 2.9-4.4 6.7-4.4 11c0 8.8 7.2 16 16 16c9.1 0 17.4 5.1 21.5 13.3s3.2 17.9-2.3 25.1c-2 2.7-3.2 6-3.2 9.6c0 8.8 7.2 16 16 16l96 0 8 0c39.8 0 72-32.2 72-72l0-125.4c0-18.4-4.9-36.5-14.2-52.4l-1.5-2.6c-18.6-32-52.8-51.6-89.8-51.6l-10.2 0c-11.3 0-22 4.8-29.6 13.1l-17.5-15.9 17.5 15.9-18.4 20.3c-.6 .6-1.1 1.3-1.7 1.9l57 13.2c8.6 2 14 10.6 12 19.2s-10.6 14-19.2 12l-85.6-19.7L74.3 130c-8.6-1.9-17.2 3.5-19.1 12.2s3.5 17.2 12.2 19.1l187.5 41.6c10.2 2.3 17.8 10.9 18.7 21.4l.1 1c.6 6.6-1.5 13.1-5.8 18.1s-10.6 7.9-17.2 8.2L63.6 258.1z\"]\n};\nconst faFaceGrinTears = {\n  prefix: 'far',\n  iconName: 'face-grin-tears',\n  icon: [640, 512, [128514, \"grin-tears\"], \"f588\", \"M516.1 325.5c1 3 2.1 6 3.3 8.9c3.3 8.1 8.4 18.5 16.5 26.6c3.9 3.9 8.2 7.4 12.7 10.3C506.4 454.8 419.9 512 320 512s-186.4-57.2-228.6-140.6c4.5-2.9 8.7-6.3 12.7-10.3c8.1-8.1 13.2-18.6 16.5-26.6c1.2-2.9 2.3-5.9 3.3-8.9C152.5 406.2 229.5 464 320 464s167.5-57.8 196.1-138.5zM320 48c-101.4 0-185.8 72.5-204.3 168.5c-6.7-3.1-14.3-4.3-22.3-3.1c-6.8 .9-16.2 2.4-26.6 4.4C85.3 94.5 191.6 0 320 0S554.7 94.5 573.2 217.7c-10.3-2-19.8-3.5-26.6-4.4c-8-1.2-15.7 .1-22.3 3.1C505.8 120.5 421.4 48 320 48zM78.5 341.1C60 356.7 32 355.5 14.3 337.7c-18.7-18.7-19.1-48.8-.7-67.2c8.6-8.6 30.1-15.1 50.5-19.6c13-2.8 25.5-4.8 33.9-6c5.4-.8 9.9 3.7 9 9c-3.1 21.5-11.4 70.2-25.5 84.4c-.9 1-1.9 1.8-2.9 2.7zm483 0c-.8-.6-1.5-1.3-2.3-2c-.2-.2-.5-.4-.7-.7c-14.1-14.1-22.5-62.9-25.5-84.4c-.8-5.4 3.7-9.9 9-9c1 .1 2.2 .3 3.3 .5c8.2 1.2 19.2 3 30.6 5.5c20.4 4.4 41.9 10.9 50.5 19.6c18.4 18.4 18 48.5-.7 67.2c-17.7 17.7-45.7 19-64.2 3.4zM439 336.5C414.4 374.6 370.3 400 319.9 400s-94.5-25.4-119.1-63.5c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5c18.7-4.4 35.9 12 25.5 28.1zM281.6 228.8c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0zm160 0s0 0 0 0c0 0 0 0 0 0l-.2-.2c-.2-.2-.4-.5-.7-.9c-.6-.8-1.6-2-2.8-3.4c-2.5-2.8-6-6.6-10.2-10.3c-8.8-7.8-18.8-14-27.7-14s-18.9 6.2-27.7 14c-4.2 3.7-7.7 7.5-10.2 10.3c-1.2 1.4-2.2 2.6-2.8 3.4c-.3 .4-.6 .7-.7 .9l-.2 .2c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0c-2.1 2.8-5.7 3.9-8.9 2.8s-5.5-4.1-5.5-7.6c0-17.9 6.7-35.6 16.6-48.8c9.8-13 23.9-23.2 39.4-23.2s29.6 10.2 39.4 23.2c9.9 13.2 16.6 30.9 16.6 48.8c0 3.4-2.2 6.5-5.5 7.6s-6.9 0-8.9-2.8c0 0 0 0 0 0s0 0 0 0z\"]\n};\nconst faGrinTears = faFaceGrinTears;\nconst faCalendarXmark = {\n  prefix: 'far',\n  iconName: 'calendar-xmark',\n  icon: [448, 512, [\"calendar-times\"], \"f273\", \"M128 0c13.3 0 24 10.7 24 24l0 40 144 0 0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40 40 0c35.3 0 64 28.7 64 64l0 16 0 48 0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192l0-48 0-16C0 92.7 28.7 64 64 64l40 0 0-40c0-13.3 10.7-24 24-24zM400 192L48 192l0 256c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-256zm-95 89l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\"]\n};\nconst faCalendarTimes = faCalendarXmark;\nconst faFileVideo = {\n  prefix: 'far',\n  iconName: 'file-video',\n  icon: [384, 512, [], \"f1c8\", \"M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM80 288c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32l0 16 44.9-29.9c2-1.3 4.4-2.1 6.8-2.1c6.8 0 12.3 5.5 12.3 12.3l0 103.4c0 6.8-5.5 12.3-12.3 12.3c-2.4 0-4.8-.7-6.8-2.1L240 368l0 16c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-96z\"]\n};\nconst faFilePdf = {\n  prefix: 'far',\n  iconName: 'file-pdf',\n  icon: [512, 512, [], \"f1c1\", \"M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z\"]\n};\nconst faComment = {\n  prefix: 'far',\n  iconName: 'comment',\n  icon: [512, 512, [128489, 61669], \"f075\", \"M123.6 391.3c12.9-9.4 29.6-11.8 44.6-6.4c26.5 9.6 56.2 15.1 87.8 15.1c124.7 0 208-80.5 208-160s-83.3-160-208-160S48 160.5 48 240c0 32 12.4 62.8 35.7 89.2c8.6 9.7 12.8 22.5 11.8 35.5c-1.4 18.1-5.7 34.7-11.3 49.4c17-7.9 31.1-16.7 39.4-22.7zM21.2 431.9c1.8-2.7 3.5-5.4 5.1-8.1c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208s-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6c-15.1 6.6-32.3 12.6-50.1 16.1c-.8 .2-1.6 .3-2.4 .5c-4.4 .8-8.7 1.5-13.2 1.9c-.2 0-.5 .1-.7 .1c-5.1 .5-10.2 .8-15.3 .8c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c4.1-4.2 7.8-8.7 11.3-13.5c1.7-2.3 3.3-4.6 4.8-6.9l.3-.5z\"]\n};\nconst faEnvelope = {\n  prefix: 'far',\n  iconName: 'envelope',\n  icon: [512, 512, [128386, 9993, 61443], \"f0e0\", \"M64 112c-8.8 0-16 7.2-16 16l0 22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1l0-22.1c0-8.8-7.2-16-16-16L64 112zM48 212.2L48 384c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-171.8L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64l384 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128z\"]\n};\nconst faHourglass = {\n  prefix: 'far',\n  iconName: 'hourglass',\n  icon: [384, 512, [9203, 62032, \"hourglass-empty\"], \"f254\", \"M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l8 0 0 19c0 40.3 16 79 44.5 107.5L158.1 256 76.5 337.5C48 366 32 404.7 32 445l0 19-8 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l336 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-19c0-40.3-16-79-44.5-107.5L225.9 256l81.5-81.5C336 146 352 107.3 352 67l0-19 8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 0zM192 289.9l81.5 81.5C293 391 304 417.4 304 445l0 19L80 464l0-19c0-27.6 11-54 30.5-73.5L192 289.9zm0-67.9l-81.5-81.5C91 121 80 94.6 80 67l0-19 224 0 0 19c0 27.6-11 54-30.5 73.5L192 222.1z\"]\n};\nconst faHourglassEmpty = faHourglass;\nconst faCalendarCheck = {\n  prefix: 'far',\n  iconName: 'calendar-check',\n  icon: [448, 512, [], \"f274\", \"M128 0c13.3 0 24 10.7 24 24l0 40 144 0 0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40 40 0c35.3 0 64 28.7 64 64l0 16 0 48 0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192l0-48 0-16C0 92.7 28.7 64 64 64l40 0 0-40c0-13.3 10.7-24 24-24zM400 192L48 192l0 256c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-256zM329 297L217 409c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\"]\n};\nconst faHardDrive = {\n  prefix: 'far',\n  iconName: 'hard-drive',\n  icon: [512, 512, [128436, \"hdd\"], \"f0a0\", \"M64 80c-8.8 0-16 7.2-16 16l0 162c5.1-1.3 10.5-2 16-2l384 0c5.5 0 10.9 .7 16 2l0-162c0-8.8-7.2-16-16-16L64 80zM48 320l0 96c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-96c0-8.8-7.2-16-16-16L64 304c-8.8 0-16 7.2-16 16zM0 320L0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 224 0 96c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-96zm280 48a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm120-24a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"]\n};\nconst faHdd = faHardDrive;\nconst faFaceGrinSquintTears = {\n  prefix: 'far',\n  iconName: 'face-grin-squint-tears',\n  icon: [512, 512, [129315, \"grin-squint-tears\"], \"f586\", \"M426.8 14.2C446-5 477.5-4.6 497.1 14.9s20 51 .7 70.3c-14.8 14.8-65.7 23.6-88.3 26.7c-5.6 .9-10.3-3.9-9.5-9.5C403.3 79.9 412 29 426.8 14.2zM75 75C158.2-8.3 284.5-22.2 382.2 33.2c-1.5 4.8-2.9 9.6-4.1 14.3c-3.1 12.2-5.5 24.6-7.3 35c-80.8-53.6-190.7-44.8-261.9 26.4C37.7 180.1 28.9 290 82.5 370.8c-10.5 1.8-22.9 4.2-35 7.3c-4.7 1.2-9.5 2.5-14.3 4.1C-22.2 284.5-8.2 158.2 75 75zm389.6 58.9c4.7-1.2 9.5-2.5 14.3-4.1C534.2 227.5 520.2 353.8 437 437c-83.2 83.2-209.5 97.2-307.2 41.8c1.5-4.8 2.8-9.6 4-14.3c3.1-12.2 5.5-24.6 7.3-35c80.8 53.6 190.7 44.8 261.9-26.4c71.2-71.2 80-181.1 26.4-261.9c10.5-1.8 22.9-4.2 35-7.3zm-105.4 93c10.1-16.3 33.9-16.9 37.9 1.9c9.5 44.4-3.7 93.5-39.3 129.1s-84.8 48.8-129.1 39.3c-18.7-4-18.2-27.8-1.9-37.9c25.2-15.7 50.2-35.4 73.6-58.8s43.1-48.4 58.8-73.6zM92 265.3l97.4-29.7c11.6-3.5 22.5 7.3 19 19l-29.7 97.4c-2.6 8.6-13.4 11.3-19.8 4.9c-2-2-3.2-4.6-3.4-7.3l-5.1-56.1-56.1-5.1c-2.8-.3-5.4-1.5-7.3-3.4c-6.3-6.3-3.6-17.2 4.9-19.8zm193-178.2c2 2 3.2 4.6 3.4 7.3l5.1 56.1 56.1 5.1c2.8 .3 5.4 1.5 7.3 3.4c6.3 6.3 3.6 17.2-4.9 19.8l-97.4 29.7c-11.6 3.5-22.5-7.3-19-19L265.3 92c2.6-8.6 13.4-11.3 19.8-4.9zM14.9 497.1c-19.6-19.6-20-51-.7-70.3C29 412 79.8 403.2 102.4 400.1c5.6-.9 10.3 3.9 9.5 9.5c-3.2 22.5-11.9 73.5-26.7 88.3C66 517 34.5 516.6 14.9 497.1z\"]\n};\nconst faGrinSquintTears = faFaceGrinSquintTears;\nconst faRectangleList = {\n  prefix: 'far',\n  iconName: 'rectangle-list',\n  icon: [576, 512, [\"list-alt\"], \"f022\", \"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l448 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm96 64a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm104 0c0-13.3 10.7-24 24-24l224 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-224 0c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24l224 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-224 0c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24l224 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-224 0c-13.3 0-24-10.7-24-24zm-72-64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM96 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z\"]\n};\nconst faListAlt = faRectangleList;\nconst faCalendarPlus = {\n  prefix: 'far',\n  iconName: 'calendar-plus',\n  icon: [448, 512, [], \"f271\", \"M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L64 64C28.7 64 0 92.7 0 128l0 16 0 48L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-256 0-48 0-16c0-35.3-28.7-64-64-64l-40 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L152 64l0-40zM48 192l352 0 0 256c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256zm176 40c-13.3 0-24 10.7-24 24l0 48-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0 0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48 48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-48c0-13.3-10.7-24-24-24z\"]\n};\nconst faCircleLeft = {\n  prefix: 'far',\n  iconName: 'circle-left',\n  icon: [512, 512, [61840, \"arrow-alt-circle-left\"], \"f359\", \"M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3l0-57.7 96 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-96 0 0-57.7c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z\"]\n};\nconst faArrowAltCircleLeft = faCircleLeft;\nconst faMoneyBill1 = {\n  prefix: 'far',\n  iconName: 'money-bill-1',\n  icon: [576, 512, [\"money-bill-alt\"], \"f3d1\", \"M112 112c0 35.3-28.7 64-64 64l0 160c35.3 0 64 28.7 64 64l352 0c0-35.3 28.7-64 64-64l0-160c-35.3 0-64-28.7-64-64l-352 0zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 256a112 112 0 1 1 224 0 112 112 0 1 1 -224 0zm80-48c0 8.8 7.2 16 16 16l0 64-8 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l24 0 24 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-8 0 0-80c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faMoneyBillAlt = faMoneyBill1;\nconst faClock = {\n  prefix: 'far',\n  iconName: 'clock',\n  icon: [512, 512, [128339, \"clock-four\"], \"f017\", \"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z\"]\n};\nconst faClockFour = faClock;\nconst faKeyboard = {\n  prefix: 'far',\n  iconName: 'keyboard',\n  icon: [576, 512, [9000], \"f11c\", \"M64 112c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16L64 112zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 320l224 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm-72-72c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16z\"]\n};\nconst faClosedCaptioning = {\n  prefix: 'far',\n  iconName: 'closed-captioning',\n  icon: [576, 512, [], \"f20a\", \"M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z\"]\n};\nconst faImages = {\n  prefix: 'far',\n  iconName: 'images',\n  icon: [576, 512, [], \"f302\", \"M160 80l352 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-21.2 0L388.1 178.9c-4.4-6.8-12-10.9-20.1-10.9s-15.7 4.1-20.1 10.9l-52.2 79.8-12.4-16.9c-4.5-6.2-11.7-9.8-19.4-9.8s-14.8 3.6-19.4 9.8L175.6 336 160 336c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16zM96 96l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32c-35.3 0-64 28.7-64 64zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224zm208 24a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\"]\n};\nconst faFaceGrin = {\n  prefix: 'far',\n  iconName: 'face-grin',\n  icon: [512, 512, [128512, \"grin\"], \"f580\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm349.5 52.4c18.7-4.4 35.9 12 25.5 28.1C350.4 374.6 306.3 400 255.9 400s-94.5-25.4-119.1-63.5c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faGrin = faFaceGrin;\nconst faFaceMeh = {\n  prefix: 'far',\n  iconName: 'face-meh',\n  icon: [512, 512, [128528, \"meh\"], \"f11a\", \"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM176.4 240a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm192-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM184 328c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z\"]\n};\nconst faMeh = faFaceMeh;\nconst faIdCard = {\n  prefix: 'far',\n  iconName: 'id-card',\n  icon: [576, 512, [62147, \"drivers-license\"], \"f2c2\", \"M528 160l0 256c0 8.8-7.2 16-16 16l-192 0c0-44.2-35.8-80-80-80l-64 0c-44.2 0-80 35.8-80 80l-32 0c-8.8 0-16-7.2-16-16l0-256 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM272 256a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm104-48c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z\"]\n};\nconst faDriversLicense = faIdCard;\nconst faSun = {\n  prefix: 'far',\n  iconName: 'sun',\n  icon: [512, 512, [9728], \"f185\", \"M375.7 19.7c-1.5-8-6.9-14.7-14.4-17.8s-16.1-2.2-22.8 2.4L256 61.1 173.5 4.2c-6.7-4.6-15.3-5.5-22.8-2.4s-12.9 9.8-14.4 17.8l-18.1 98.5L19.7 136.3c-8 1.5-14.7 6.9-17.8 14.4s-2.2 16.1 2.4 22.8L61.1 256 4.2 338.5c-4.6 6.7-5.5 15.3-2.4 22.8s9.8 13 17.8 14.4l98.5 18.1 18.1 98.5c1.5 8 6.9 14.7 14.4 17.8s16.1 2.2 22.8-2.4L256 450.9l82.5 56.9c6.7 4.6 15.3 5.5 22.8 2.4s12.9-9.8 14.4-17.8l18.1-98.5 98.5-18.1c8-1.5 14.7-6.9 17.8-14.4s2.2-16.1-2.4-22.8L450.9 256l56.9-82.5c4.6-6.7 5.5-15.3 2.4-22.8s-9.8-12.9-17.8-14.4l-98.5-18.1L375.7 19.7zM269.6 110l65.6-45.2 14.4 78.3c1.8 9.8 9.5 17.5 19.3 19.3l78.3 14.4L402 242.4c-5.7 8.2-5.7 19 0 27.2l45.2 65.6-78.3 14.4c-9.8 1.8-17.5 9.5-19.3 19.3l-14.4 78.3L269.6 402c-8.2-5.7-19-5.7-27.2 0l-65.6 45.2-14.4-78.3c-1.8-9.8-9.5-17.5-19.3-19.3L64.8 335.2 110 269.6c5.7-8.2 5.7-19 0-27.2L64.8 176.8l78.3-14.4c9.8-1.8 17.5-9.5 19.3-19.3l14.4-78.3L242.4 110c8.2 5.7 19 5.7 27.2 0zM256 368a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM192 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z\"]\n};\nconst faFaceLaughWink = {\n  prefix: 'far',\n  iconName: 'face-laugh-wink',\n  icon: [512, 512, [\"laugh-wink\"], \"f59c\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm130.7 57.9c-4.2-13.6 7.1-25.9 21.3-25.9l212.5 0c14.2 0 25.5 12.4 21.3 25.9C369 368.4 318.2 408 258.2 408s-110.8-39.6-127.5-94.1zM144.4 192a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm165.8 21.7c-7.6 8.1-20.2 8.5-28.3 .9s-8.5-20.2-.9-28.3c14.5-15.5 35.2-22.3 54.6-22.3s40.1 6.8 54.6 22.3c7.6 8.1 7.1 20.7-.9 28.3s-20.7 7.1-28.3-.9c-5.5-5.8-14.8-9.7-25.4-9.7s-19.9 3.8-25.4 9.7z\"]\n};\nconst faLaughWink = faFaceLaughWink;\nconst faCircleDown = {\n  prefix: 'far',\n  iconName: 'circle-down',\n  icon: [512, 512, [61466, \"arrow-alt-circle-down\"], \"f358\", \"M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3L304 256l0-96c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 96-57.7 0C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z\"]\n};\nconst faArrowAltCircleDown = faCircleDown;\nconst faThumbsDown = {\n  prefix: 'far',\n  iconName: 'thumbs-down',\n  icon: [512, 512, [128078, 61576], \"f165\", \"M323.8 477.2c-38.2 10.9-78.1-11.2-89-49.4l-5.7-20c-3.7-13-10.4-25-19.5-35l-51.3-56.4c-8.9-9.8-8.2-25 1.6-33.9s25-8.2 33.9 1.6l51.3 56.4c14.1 15.5 24.4 34 30.1 54.1l5.7 20c3.6 12.7 16.9 20.1 29.7 16.5s20.1-16.9 16.5-29.7l-5.7-20c-5.7-19.9-14.7-38.7-26.6-55.5c-5.2-7.3-5.8-16.9-1.7-24.9s12.3-13 21.3-13L448 288c8.8 0 16-7.2 16-16c0-6.8-4.3-12.7-10.4-15c-7.4-2.8-13-9-14.9-16.7s.1-15.8 5.3-21.7c2.5-2.8 4-6.5 4-10.6c0-7.8-5.6-14.3-13-15.7c-8.2-1.6-15.1-7.3-18-15.2s-1.6-16.7 3.6-23.3c2.1-2.7 3.4-6.1 3.4-9.9c0-6.7-4.2-12.6-10.2-14.9c-11.5-4.5-17.7-16.9-14.4-28.8c.4-1.3 .6-2.8 .6-4.3c0-8.8-7.2-16-16-16l-97.5 0c-12.6 0-25 3.7-35.5 10.7l-61.7 41.1c-11 7.4-25.9 4.4-33.3-6.7s-4.4-25.9 6.7-33.3l61.7-41.1c18.4-12.3 40-18.8 62.1-18.8L384 32c34.7 0 62.9 27.6 64 62c14.6 11.7 24 29.7 24 50c0 4.5-.5 8.8-1.3 13c15.4 11.7 25.3 30.2 25.3 51c0 6.5-1 12.8-2.8 18.7C504.8 238.3 512 254.3 512 272c0 35.3-28.6 64-64 64l-92.3 0c4.7 10.4 8.7 21.2 11.8 32.2l5.7 20c10.9 38.2-11.2 78.1-49.4 89zM32 384c-17.7 0-32-14.3-32-32L0 128c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 224c0 17.7-14.3 32-32 32l-64 0z\"]\n};\nconst faChessPawn = {\n  prefix: 'far',\n  iconName: 'chess-pawn',\n  icon: [320, 512, [9823], \"f443\", \"M232 152A72 72 0 1 0 88 152a72 72 0 1 0 144 0zm24 120l-12.6 0 10.7 80-48.4 0L195 272l-35 0-35 0-10.7 80-48.4 0 10.7-80L64 272c-13.3 0-24-10.7-24-24s10.7-24 24-24c-15.1-20.1-24-45-24-72C40 85.7 93.7 32 160 32s120 53.7 120 120c0 27-8.9 51.9-24 72c13.3 0 24 10.7 24 24s-10.7 24-24 24zM52.7 464l214.7 0-16.6-32L69.2 432 52.7 464zm207.9-80c12 0 22.9 6.7 28.4 17.3l26.5 51.2c3 5.8 4.6 12.2 4.6 18.7c0 22.5-18.2 40.8-40.8 40.8L40.8 512C18.2 512 0 493.8 0 471.2c0-6.5 1.6-12.9 4.6-18.7l26.5-51.2C36.5 390.7 47.5 384 59.5 384l201 0z\"]\n};\nconst faCreditCard = {\n  prefix: 'far',\n  iconName: 'credit-card',\n  icon: [576, 512, [128179, 62083, \"credit-card-alt\"], \"f09d\", \"M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z\"]\n};\nconst faCreditCardAlt = faCreditCard;\nconst faBell = {\n  prefix: 'far',\n  iconName: 'bell',\n  icon: [448, 512, [128276, 61602], \"f0f3\", \"M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 25.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416l400 0c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6C399.5 322.9 384 278.8 384 233.4l0-25.4c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm0 96c61.9 0 112 50.1 112 112l0 25.4c0 47.9 13.9 94.6 39.7 134.6L72.3 368C98.1 328 112 281.3 112 233.4l0-25.4c0-61.9 50.1-112 112-112zm64 352l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z\"]\n};\nconst faFile = {\n  prefix: 'far',\n  iconName: 'file',\n  icon: [384, 512, [128196, 128459, 61462], \"f15b\", \"M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z\"]\n};\nconst faHospital = {\n  prefix: 'far',\n  iconName: 'hospital',\n  icon: [640, 512, [127973, 62589, \"hospital-alt\", \"hospital-wide\"], \"f0f8\", \"M232 0c-39.8 0-72 32.2-72 72l0 8L72 80C32.2 80 0 112.2 0 152L0 440c0 39.8 32.2 72 72 72l.2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .2 0 .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2 0-.2 0c-13.2 0-24-10.7-24-24l0-104 56 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-56 0 0-48 56 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-56 0 0-40c0-13.3 10.7-24 24-24zM208 72c0-13.3 10.7-24 24-24l176 0c13.3 0 24 10.7 24 24l0 264 0 128-64 0 0-64c0-26.5-21.5-48-48-48s-48 21.5-48 48l0 64-64 0 0-392zm88 24l0 24-24 0c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l24 0 0 24c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-24 24 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-24 0 0-24c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z\"]\n};\nconst faHospitalAlt = faHospital;\nconst faHospitalWide = faHospital;\nconst faChessRook = {\n  prefix: 'far',\n  iconName: 'chess-rook',\n  icon: [448, 512, [9820], \"f447\", \"M80 80l0 112c0 2.5 1.2 4.9 3.2 6.4l51.2 38.4c6.8 5.1 10.4 13.4 9.5 21.9L133.5 352l-48.3 0 9.4-85L54.4 236.8C40.3 226.2 32 209.6 32 192L32 72c0-22.1 17.9-40 40-40l304 0c22.1 0 40 17.9 40 40l0 120c0 17.6-8.3 34.2-22.4 44.8L353.4 267l9.4 85-48.3 0-10.4-93.3c-.9-8.4 2.7-16.8 9.5-21.9l51.2-38.4c2-1.5 3.2-3.9 3.2-6.4l0-112-64 0 0 24c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-24-64 0 0 24c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-24L80 80zm4.7 384l278.7 0-16.6-32-245.6 0L84.7 464zm271.9-80c12 0 22.9 6.7 28.4 17.3l26.5 51.2c3 5.8 4.6 12.2 4.6 18.7c0 22.5-18.2 40.8-40.8 40.8L72.8 512C50.2 512 32 493.8 32 471.2c0-6.5 1.6-12.9 4.6-18.7l26.5-51.2C68.5 390.7 79.5 384 91.5 384l265 0zM208 288c-8.8 0-16-7.2-16-16l0-48c0-17.7 14.3-32 32-32s32 14.3 32 32l0 48c0 8.8-7.2 16-16 16l-32 0z\"]\n};\nconst faStarHalf = {\n  prefix: 'far',\n  iconName: 'star-half',\n  icon: [576, 512, [61731], \"f089\", \"M293.3 .6c10.9 2.5 18.6 12.2 18.6 23.4l0 384.7c0 8.9-4.9 17-12.7 21.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.3c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5c4.9-10.1 16.1-15.4 27-12.9zM263.9 128.4l-28.6 58.8c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l92.5-49.4 0-265.9z\"]\n};\nconst faChessKing = {\n  prefix: 'far',\n  iconName: 'chess-king',\n  icon: [448, 512, [9818], \"f43f\", \"M248 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 32-32 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l32 0 0 40L59.6 144C26.7 144 0 170.7 0 203.6c0 8.2 1.7 16.3 4.9 23.8L59.1 352l52.3 0L49 208.2c-.6-1.5-1-3-1-4.6c0-6.4 5.2-11.6 11.6-11.6L224 192l164.4 0c6.4 0 11.6 5.2 11.6 11.6c0 1.6-.3 3.2-1 4.6L336.5 352l52.3 0 54.2-124.6c3.3-7.5 4.9-15.6 4.9-23.8c0-32.9-26.7-59.6-59.6-59.6L248 144l0-40 32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0 0-32zM101.2 432l245.6 0 16.6 32L84.7 464l16.6-32zm283.7-30.7c-5.5-10.6-16.5-17.3-28.4-17.3l-265 0c-12 0-22.9 6.7-28.4 17.3L36.6 452.5c-3 5.8-4.6 12.2-4.6 18.7C32 493.8 50.2 512 72.8 512l302.5 0c22.5 0 40.8-18.2 40.8-40.8c0-6.5-1.6-12.9-4.6-18.7l-26.5-51.2z\"]\n};\nconst faCircleUser = {\n  prefix: 'far',\n  iconName: 'circle-user',\n  icon: [512, 512, [62142, \"user-circle\"], \"f2bd\", \"M406.5 399.6C387.4 352.9 341.5 320 288 320l-64 0c-53.5 0-99.4 32.9-118.5 79.6C69.9 362.2 48 311.7 48 256C48 141.1 141.1 48 256 48s208 93.1 208 208c0 55.7-21.9 106.2-57.5 143.6zm-40.1 32.7C334.4 452.4 296.6 464 256 464s-78.4-11.6-110.5-31.7c7.3-36.7 39.7-64.3 78.5-64.3l64 0c38.8 0 71.2 27.6 78.5 64.3zM256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-272a40 40 0 1 1 0-80 40 40 0 1 1 0 80zm-88-40a88 88 0 1 0 176 0 88 88 0 1 0 -176 0z\"]\n};\nconst faUserCircle = faCircleUser;\nconst faCopy = {\n  prefix: 'far',\n  iconName: 'copy',\n  icon: [448, 512, [], \"f0c5\", \"M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z\"]\n};\nconst faShareFromSquare = {\n  prefix: 'far',\n  iconName: 'share-from-square',\n  icon: [576, 512, [61509, \"share-square\"], \"f14d\", \"M400 255.4l0-15.4 0-32c0-8.8-7.2-16-16-16l-32 0-16 0-46.5 0c-50.9 0-93.9 33.5-108.3 79.6c-3.3-9.4-5.2-19.8-5.2-31.6c0-61.9 50.1-112 112-112l48 0 16 0 32 0c8.8 0 16-7.2 16-16l0-32 0-15.4L506 160 400 255.4zM336 240l16 0 0 48c0 17.7 14.3 32 32 32l3.7 0c7.9 0 15.5-2.9 21.4-8.2l139-125.1c7.6-6.8 11.9-16.5 11.9-26.7s-4.3-19.9-11.9-26.7L409.9 8.9C403.5 3.2 395.3 0 386.7 0C367.5 0 352 15.5 352 34.7L352 80l-16 0-32 0-16 0c-88.4 0-160 71.6-160 160c0 60.4 34.6 99.1 63.9 120.9c5.9 4.4 11.5 8.1 16.7 11.2c4.4 2.7 8.5 4.9 11.9 6.6c3.4 1.7 6.2 3 8.2 3.9c2.2 1 4.6 1.4 7.1 1.4l2.5 0c9.8 0 17.8-8 17.8-17.8c0-7.8-5.3-14.7-11.6-19.5c0 0 0 0 0 0c-.4-.3-.7-.5-1.1-.8c-1.7-1.1-3.4-2.5-5-4.1c-.8-.8-1.7-1.6-2.5-2.6s-1.6-1.9-2.4-2.9c-1.8-2.5-3.5-5.3-5-8.5c-2.6-6-4.3-13.3-4.3-22.4c0-36.1 29.3-65.5 65.5-65.5l14.5 0 32 0zM72 32C32.2 32 0 64.2 0 104L0 440c0 39.8 32.2 72 72 72l336 0c39.8 0 72-32.2 72-72l0-64c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 64c0 13.3-10.7 24-24 24L72 464c-13.3 0-24-10.7-24-24l0-336c0-13.3 10.7-24 24-24l64 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L72 32z\"]\n};\nconst faShareSquare = faShareFromSquare;\nconst faCopyright = {\n  prefix: 'far',\n  iconName: 'copyright',\n  icon: [512, 512, [169], \"f1f9\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM199.4 312.6c-31.2-31.2-31.2-81.9 0-113.1s81.9-31.2 113.1 0c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9c-50-50-131-50-181 0s-50 131 0 181s131 50 181 0c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0c-31.2 31.2-81.9 31.2-113.1 0z\"]\n};\nconst faMap = {\n  prefix: 'far',\n  iconName: 'map',\n  icon: [576, 512, [128506, 62072], \"f279\", \"M565.6 36.2C572.1 40.7 576 48.1 576 56l0 336c0 10-6.2 18.9-15.5 22.4l-168 64c-5.2 2-10.9 2.1-16.1 .3L192.5 417.5l-160 61c-7.4 2.8-15.7 1.8-22.2-2.7S0 463.9 0 456L0 120c0-10 6.1-18.9 15.5-22.4l168-64c5.2-2 10.9-2.1 16.1-.3L383.5 94.5l160-61c7.4-2.8 15.7-1.8 22.2 2.7zM48 136.5l0 284.6 120-45.7 0-284.6L48 136.5zM360 422.7l0-285.4-144-48 0 285.4 144 48zm48-1.5l120-45.7 0-284.6L408 136.5l0 284.6z\"]\n};\nconst faBellSlash = {\n  prefix: 'far',\n  iconName: 'bell-slash',\n  icon: [640, 512, [128277, 61943], \"f1f6\", \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L542.6 400c2.7-7.8 1.3-16.5-3.9-23l-14.9-18.6C495.5 322.9 480 278.8 480 233.4l0-33.4c0-75.8-55.5-138.6-128-150.1L352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 17.9c-43.9 7-81.5 32.7-104.4 68.7L38.8 5.1zM221.7 148.4C239.6 117.1 273.3 96 312 96l8 0 8 0c57.4 0 104 46.6 104 104l0 33.4c0 32.7 6.4 64.8 18.7 94.5L221.7 148.4zM406.2 416l-60.9-48-176.9 0c21.2-32.8 34.4-70.3 38.4-109.1L160 222.1l0 11.4c0 45.4-15.5 89.5-43.8 124.9L101.3 377c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l286.2 0zM384 448l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z\"]\n};\nconst faHandLizard = {\n  prefix: 'far',\n  iconName: 'hand-lizard',\n  icon: [512, 512, [], \"f258\", \"M72 112c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-104 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l152 0c4.5 0 8.9 1.3 12.7 3.6l64 40c7 4.4 11.3 12.1 11.3 20.4l0 24c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-10.7L281.1 384 136 384c-39.8 0-72-32.2-72-72s32.2-72 72-72l104 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L72 208c-39.8 0-72-32.2-72-72S32.2 64 72 64l209.6 0c46.7 0 90.9 21.5 119.7 58.3l78.4 100.1c20.9 26.7 32.3 59.7 32.3 93.7L512 424c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-107.9c0-23.2-7.8-45.8-22.1-64.1L363.5 151.9c-19.7-25.2-49.9-39.9-81.9-39.9L72 112z\"]\n};\nconst faFaceSmile = {\n  prefix: 'far',\n  iconName: 'face-smile',\n  icon: [512, 512, [128578, \"smile\"], \"f118\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm177.6 62.1C192.8 334.5 218.8 352 256 352s63.2-17.5 78.4-33.9c9-9.7 24.2-10.4 33.9-1.4s10.4 24.2 1.4 33.9c-22 23.8-60 49.4-113.6 49.4s-91.7-25.5-113.6-49.4c-9-9.7-8.4-24.9 1.4-33.9s24.9-8.4 33.9 1.4zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faSmile = faFaceSmile;\nconst faHandPeace = {\n  prefix: 'far',\n  iconName: 'hand-peace',\n  icon: [512, 512, [9996], \"f25b\", \"M250.8 1.4c-35.2-3.7-66.6 21.8-70.3 57L174 119 156.7 69.6C145 36.3 108.4 18.8 75.1 30.5S24.2 78.8 35.9 112.1L88.7 262.2C73.5 276.7 64 297.3 64 320c0 0 0 0 0 0l0 24c0 92.8 75.2 168 168 168l48 0c92.8 0 168-75.2 168-168l0-72 0-16 0-32c0-35.3-28.7-64-64-64c-7.9 0-15.4 1.4-22.4 4c-10.4-21.3-32.3-36-57.6-36c-.7 0-1.5 0-2.2 0l5.9-56.3c3.7-35.2-21.8-66.6-57-70.3zm-.2 155.4C243.9 166.9 240 179 240 192l0 48c0 .7 0 1.4 0 2c-5.1-1.3-10.5-2-16-2l-7.4 0-5.4-15.3 17-161.3c.9-8.8 8.8-15.2 17.6-14.2s15.2 8.8 14.2 17.6l-9.5 90.1zM111.4 85.6L165.7 240 144 240c-4 0-8 .3-11.9 .9L81.2 96.2c-2.9-8.3 1.5-17.5 9.8-20.4s17.5 1.5 20.4 9.8zM288 192c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48zm38.4 108c10.4 21.3 32.3 36 57.6 36c5.5 0 10.9-.7 16-2l0 10c0 66.3-53.7 120-120 120l-48 0c-66.3 0-120-53.7-120-120l0-24s0 0 0 0c0-17.7 14.3-32 32-32l80 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c35.3 0 64-28.7 64-64c0-.7 0-1.4 0-2c5.1 1.3 10.5 2 16 2c7.9 0 15.4-1.4 22.4-4zM400 272c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16z\"]\n};\nconst faFaceGrinHearts = {\n  prefix: 'far',\n  iconName: 'face-grin-hearts',\n  icon: [512, 512, [128525, \"grin-hearts\"], \"f584\", \"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm349.5 52.4c18.7-4.4 35.9 12 25.5 28.1C350.4 374.6 306.3 400 255.9 400s-94.5-25.4-119.1-63.5c-10.4-16.1 6.8-32.5 25.5-28.1c28.9 6.8 60.5 10.5 93.6 10.5s64.7-3.7 93.6-10.5zM215.3 137.1c17.8 4.8 28.4 23.1 23.6 40.8l-17.4 65c-2.3 8.5-11.1 13.6-19.6 11.3l-65.1-17.4c-17.8-4.8-28.4-23.1-23.6-40.8s23.1-28.4 40.8-23.6l16.1 4.3 4.3-16.1c4.8-17.8 23.1-28.4 40.8-23.6zm122.3 23.6l4.3 16.1 16.1-4.3c17.8-4.8 36.1 5.8 40.8 23.6s-5.8 36.1-23.6 40.8l-65.1 17.4c-8.5 2.3-17.3-2.8-19.6-11.3l-17.4-65c-4.8-17.8 5.8-36.1 23.6-40.8s36.1 5.8 40.9 23.6z\"]\n};\nconst faGrinHearts = faFaceGrinHearts;\nconst faBuilding = {\n  prefix: 'far',\n  iconName: 'building',\n  icon: [384, 512, [127970, 61687], \"f1ad\", \"M64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l80 0 0-64c0-26.5 21.5-48 48-48s48 21.5 48 48l0 64 80 0c8.8 0 16-7.2 16-16l0-384c0-8.8-7.2-16-16-16L64 48zM0 64C0 28.7 28.7 0 64 0L320 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm88 40c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48zM232 88l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16zM88 232c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48zm144-16l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16z\"]\n};\nconst faFaceGrinBeamSweat = {\n  prefix: 'far',\n  iconName: 'face-grin-beam-sweat',\n  icon: [512, 512, [128517, \"grin-beam-sweat\"], \"f583\", \"M476.8 126.3C497.1 120.8 512 102.7 512 81c0-20-28.6-60.4-41.6-77.7c-3.2-4.4-9.6-4.4-12.8 0c-9.5 12.6-27.1 37.2-36 57.5c-.3 .7-.6 1.4-.9 2.1C417.8 69.7 416 76 416 81c0 26 21.5 47 48 47c4.4 0 8.7-.6 12.8-1.7zM395.4 41.2C355.3 15.2 307.4 0 256 0C114.6 0 0 114.6 0 256S114.6 512 256 512s256-114.6 256-256c0-35.8-7.3-69.9-20.6-100.8c-8.6 3.1-17.8 4.8-27.4 4.8c-8.9 0-17.6-1.5-25.7-4.2C454.7 185.5 464 219.7 464 256c0 114.9-93.1 208-208 208S48 370.9 48 256S141.1 48 256 48c48.7 0 93.4 16.7 128.9 44.7c-.6-3.8-.9-7.7-.9-11.7c0-11.4 3.8-22.4 7.1-30.5c1.3-3.1 2.7-6.2 4.3-9.3zM375 336.5c10.4-16.1-6.8-32.5-25.5-28.1c-28.9 6.8-60.5 10.5-93.6 10.5s-64.7-3.7-93.6-10.5c-18.7-4.4-35.9 12-25.5 28.1c24.6 38.1 68.7 63.5 119.1 63.5s94.5-25.4 119.1-63.5zM217.6 228.8s0 0 0 0s0 0 0 0s0 0 0 0c2.1 2.8 5.7 3.9 8.9 2.8s5.5-4.1 5.5-7.6c0-17.9-6.7-35.6-16.6-48.8c-9.8-13-23.9-23.2-39.4-23.2s-29.6 10.2-39.4 23.2C126.7 188.4 120 206.1 120 224c0 3.4 2.2 6.5 5.5 7.6s6.9 0 8.9-2.8c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.2c.2-.2 .4-.5 .7-.9c.6-.8 1.6-2 2.8-3.4c2.5-2.8 6-6.6 10.2-10.3c8.8-7.8 18.8-14 27.7-14s18.9 6.2 27.7 14c4.2 3.7 7.7 7.5 10.2 10.3c1.2 1.4 2.2 2.6 2.8 3.4c.3 .4 .6 .7 .7 .9l.2 .2c0 0 0 0 0 0zm160 0s0 0 0 0s0 0 0 0c2.1 2.8 5.7 3.9 8.9 2.8s5.5-4.1 5.5-7.6c0-17.9-6.7-35.6-16.6-48.8c-9.8-13-23.9-23.2-39.4-23.2s-29.6 10.2-39.4 23.2C286.7 188.4 280 206.1 280 224c0 3.4 2.2 6.5 5.5 7.6s6.9 0 8.9-2.8c0 0 0 0 0 0s0 0 0 0c0 0 0 0 0 0l.2-.2c.2-.2 .4-.5 .7-.9c.6-.8 1.6-2 2.8-3.4c2.5-2.8 6-6.6 10.2-10.3c8.8-7.8 18.8-14 27.7-14s18.9 6.2 27.7 14c4.2 3.7 7.7 7.5 10.2 10.3c1.2 1.4 2.2 2.6 2.8 3.4c.3 .4 .6 .7 .7 .9l.2 .2c0 0 0 0 0 0c0 0 0 0 0 0z\"]\n};\nconst faGrinBeamSweat = faFaceGrinBeamSweat;\nconst faMoon = {\n  prefix: 'far',\n  iconName: 'moon',\n  icon: [384, 512, [127769, 9214], \"f186\", \"M144.7 98.7c-21 34.1-33.1 74.3-33.1 117.3c0 98 62.8 181.4 150.4 211.7c-12.4 2.8-25.3 4.3-38.6 4.3C126.6 432 48 353.3 48 256c0-68.9 39.4-128.4 96.8-157.3zm62.1-66C91.1 41.2 0 137.9 0 256C0 379.7 100 480 223.5 480c47.8 0 92-15 128.4-40.6c1.9-1.3 3.7-2.7 5.5-4c4.8-3.6 9.4-7.4 13.9-11.4c2.7-2.4 5.3-4.8 7.9-7.3c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-3.7 .6-7.4 1.2-11.1 1.6c-5 .5-10.1 .9-15.3 1c-1.2 0-2.5 0-3.7 0l-.3 0c-96.8-.2-175.2-78.9-175.2-176c0-54.8 24.9-103.7 64.1-136c1-.9 2.1-1.7 3.2-2.6c4-3.2 8.2-6.2 12.5-9c3.1-2 6.3-4 9.6-5.8c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-3.6-.3-7.1-.5-10.7-.6c-2.7-.1-5.5-.1-8.2-.1c-3.3 0-6.5 .1-9.8 .2c-2.3 .1-4.6 .2-6.9 .4z\"]\n};\nconst faCalendar = {\n  prefix: 'far',\n  iconName: 'calendar',\n  icon: [448, 512, [128197, 128198], \"f133\", \"M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L64 64C28.7 64 0 92.7 0 128l0 16 0 48L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-256 0-48 0-16c0-35.3-28.7-64-64-64l-40 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L152 64l0-40zM48 192l352 0 0 256c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256z\"]\n};\nconst faFaceGrinTongueWink = {\n  prefix: 'far',\n  iconName: 'face-grin-tongue-wink',\n  icon: [512, 512, [128540, \"grin-tongue-wink\"], \"f58b\", \"M348.3 442.4c2.4-8.4 3.7-17.3 3.7-26.4l0-52.5c8.8-8 16.6-17.1 23-27c10.4-16.1-6.8-32.5-25.5-28.1c-28.9 6.8-60.5 10.5-93.6 10.5s-64.7-3.7-93.6-10.5c-18.7-4.4-35.9 12-25.5 28.1c6.5 10 14.3 19.1 23.1 27.1l0 52.4c0 9.2 1.3 18 3.7 26.4C95.1 408.4 48 337.7 48 256C48 141.1 141.1 48 256 48s208 93.1 208 208c0 81.7-47.1 152.4-115.7 186.4zM256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM159.6 220c10.6 0 19.9 3.8 25.4 9.7c7.6 8.1 20.2 8.5 28.3 .9s8.5-20.2 .9-28.3C199.7 186.8 179 180 159.6 180s-40.1 6.8-54.6 22.3c-7.6 8.1-7.1 20.7 .9 28.3s20.7 7.1 28.3-.9c5.5-5.8 14.8-9.7 25.4-9.7zm176.7 12a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm-.4-72a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm0 128a80 80 0 1 0 0-160 80 80 0 1 0 0 160zM320 416c0 35.3-28.7 64-64 64s-64-28.7-64-64l0-37.4c0-14.7 11.9-26.6 26.6-26.6l2 0c11.3 0 21.1 7.9 23.6 18.9c2.8 12.6 20.8 12.6 23.6 0c2.5-11.1 12.3-18.9 23.6-18.9l2 0c14.7 0 26.6 11.9 26.6 26.6l0 37.4z\"]\n};\nconst faGrinTongueWink = faFaceGrinTongueWink;\nconst faClone = {\n  prefix: 'far',\n  iconName: 'clone',\n  icon: [512, 512, [], \"f24d\", \"M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z\"]\n};\nconst faFaceAngry = {\n  prefix: 'far',\n  iconName: 'face-angry',\n  icon: [512, 512, [128544, \"angry\"], \"f556\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm72.4-118.5c9.7-9 10.2-24.2 1.2-33.9C315.3 344.3 290.6 328 256 328s-59.3 16.3-73.5 31.6c-9 9.7-8.5 24.9 1.2 33.9s24.9 8.5 33.9-1.2c7.4-7.9 20-16.4 38.5-16.4s31.1 8.5 38.5 16.4c9 9.7 24.2 10.2 33.9 1.2zM176.4 272c17.7 0 32-14.3 32-32c0-1.5-.1-3-.3-4.4l10.9 3.6c8.4 2.8 17.4-1.7 20.2-10.1s-1.7-17.4-10.1-20.2l-96-32c-8.4-2.8-17.4 1.7-20.2 10.1s1.7 17.4 10.1 20.2l30.7 10.2c-5.8 5.8-9.3 13.8-9.3 22.6c0 17.7 14.3 32 32 32zm192-32c0-8.9-3.6-17-9.5-22.8l30.2-10.1c8.4-2.8 12.9-11.9 10.1-20.2s-11.9-12.9-20.2-10.1l-96 32c-8.4 2.8-12.9 11.9-10.1 20.2s11.9 12.9 20.2 10.1l11.7-3.9c-.2 1.5-.3 3.1-.3 4.7c0 17.7 14.3 32 32 32s32-14.3 32-32z\"]\n};\nconst faAngry = faFaceAngry;\nconst faRectangleXmark = {\n  prefix: 'far',\n  iconName: 'rectangle-xmark',\n  icon: [512, 512, [62164, \"rectangle-times\", \"times-rectangle\", \"window-close\"], \"f410\", \"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm175 79c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z\"]\n};\nconst faRectangleTimes = faRectangleXmark;\nconst faTimesRectangle = faRectangleXmark;\nconst faWindowClose = faRectangleXmark;\nconst faPaperPlane = {\n  prefix: 'far',\n  iconName: 'paper-plane',\n  icon: [512, 512, [61913], \"f1d8\", \"M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z\"]\n};\nconst faLifeRing = {\n  prefix: 'far',\n  iconName: 'life-ring',\n  icon: [512, 512, [], \"f1cd\", \"M385.1 419.1C349.7 447.2 304.8 464 256 464s-93.7-16.8-129.1-44.9l80.4-80.4c14.3 8.4 31 13.3 48.8 13.3s34.5-4.8 48.8-13.3l80.4 80.4zm68.1 .2C489.9 374.9 512 318.1 512 256s-22.1-118.9-58.8-163.3L465 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L419.3 58.8C374.9 22.1 318.1 0 256 0S137.1 22.1 92.7 58.8L81 47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9L58.8 92.7C22.1 137.1 0 193.9 0 256s22.1 118.9 58.8 163.3L47 431c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l11.8-11.8C137.1 489.9 193.9 512 256 512s118.9-22.1 163.3-58.8L431 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-11.8-11.8zm-34.1-34.1l-80.4-80.4c8.4-14.3 13.3-31 13.3-48.8s-4.8-34.5-13.3-48.8l80.4-80.4C447.2 162.3 464 207.2 464 256s-16.8 93.7-44.9 129.1zM385.1 92.9l-80.4 80.4c-14.3-8.4-31-13.3-48.8-13.3s-34.5 4.8-48.8 13.3L126.9 92.9C162.3 64.8 207.2 48 256 48s93.7 16.8 129.1 44.9zM173.3 304.8L92.9 385.1C64.8 349.7 48 304.8 48 256s16.8-93.7 44.9-129.1l80.4 80.4c-8.4 14.3-13.3 31-13.3 48.8s4.8 34.5 13.3 48.8zM208 256a48 48 0 1 1 96 0 48 48 0 1 1 -96 0z\"]\n};\nconst faFaceGrimace = {\n  prefix: 'far',\n  iconName: 'face-grimace',\n  icon: [512, 512, [128556, \"grimace\"], \"f57f\", \"M256 48a208 208 0 1 0 0 416 208 208 0 1 0 0-416zM512 256A256 256 0 1 1 0 256a256 256 0 1 1 512 0zM168 320c-13.3 0-24 10.7-24 24s10.7 24 24 24l8 0 0-48-8 0zm40 48l32 0 0-48-32 0 0 48zm96 0l0-48-32 0 0 48 32 0zm32 0l8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0 48zM168 288l176 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-176 0c-30.9 0-56-25.1-56-56s25.1-56 56-56zm-23.6-80a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"]\n};\nconst faGrimace = faFaceGrimace;\nconst faCalendarMinus = {\n  prefix: 'far',\n  iconName: 'calendar-minus',\n  icon: [448, 512, [], \"f272\", \"M128 0c13.3 0 24 10.7 24 24l0 40 144 0 0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40 40 0c35.3 0 64 28.7 64 64l0 16 0 48 0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192l0-48 0-16C0 92.7 28.7 64 64 64l40 0 0-40c0-13.3 10.7-24 24-24zM400 192L48 192l0 256c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-256zM296 352l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24z\"]\n};\nconst faCircleXmark = {\n  prefix: 'far',\n  iconName: 'circle-xmark',\n  icon: [512, 512, [61532, \"times-circle\", \"xmark-circle\"], \"f057\", \"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z\"]\n};\nconst faTimesCircle = faCircleXmark;\nconst faXmarkCircle = faCircleXmark;\nconst faThumbsUp = {\n  prefix: 'far',\n  iconName: 'thumbs-up',\n  icon: [512, 512, [128077, 61575], \"f164\", \"M323.8 34.8c-38.2-10.9-78.1 11.2-89 49.4l-5.7 20c-3.7 13-10.4 25-19.5 35l-51.3 56.4c-8.9 9.8-8.2 25 1.6 33.9s25 8.2 33.9-1.6l51.3-56.4c14.1-15.5 24.4-34 30.1-54.1l5.7-20c3.6-12.7 16.9-20.1 29.7-16.5s20.1 16.9 16.5 29.7l-5.7 20c-5.7 19.9-14.7 38.7-26.6 55.5c-5.2 7.3-5.8 16.9-1.7 24.9s12.3 13 21.3 13L448 224c8.8 0 16 7.2 16 16c0 6.8-4.3 12.7-10.4 15c-7.4 2.8-13 9-14.9 16.7s.1 15.8 5.3 21.7c2.5 2.8 4 6.5 4 10.6c0 7.8-5.6 14.3-13 15.7c-8.2 1.6-15.1 7.3-18 15.2s-1.6 16.7 3.6 23.3c2.1 2.7 3.4 6.1 3.4 9.9c0 6.7-4.2 12.6-10.2 14.9c-11.5 4.5-17.7 16.9-14.4 28.8c.4 1.3 .6 2.8 .6 4.3c0 8.8-7.2 16-16 16l-97.5 0c-12.6 0-25-3.7-35.5-10.7l-61.7-41.1c-11-7.4-25.9-4.4-33.3 6.7s-4.4 25.9 6.7 33.3l61.7 41.1c18.4 12.3 40 18.8 62.1 18.8l97.5 0c34.7 0 62.9-27.6 64-62c14.6-11.7 24-29.7 24-50c0-4.5-.5-8.8-1.3-13c15.4-11.7 25.3-30.2 25.3-51c0-6.5-1-12.8-2.8-18.7C504.8 273.7 512 257.7 512 240c0-35.3-28.6-64-64-64l-92.3 0c4.7-10.4 8.7-21.2 11.8-32.2l5.7-20c10.9-38.2-11.2-78.1-49.4-89zM32 192c-17.7 0-32 14.3-32 32L0 448c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32l-64 0z\"]\n};\nconst faWindowMinimize = {\n  prefix: 'far',\n  iconName: 'window-minimize',\n  icon: [512, 512, [128469], \"f2d1\", \"M24 432c-13.3 0-24 10.7-24 24s10.7 24 24 24l464 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 432z\"]\n};\nconst faSquareFull = {\n  prefix: 'far',\n  iconName: 'square-full',\n  icon: [512, 512, [128997, 128998, 128999, 129000, 129001, 129002, 129003, 11035, 11036], \"f45c\", \"M464 48l0 416L48 464 48 48l416 0zM48 0L0 0 0 48 0 464l0 48 48 0 416 0 48 0 0-48 0-416 0-48L464 0 48 0z\"]\n};\nconst faNoteSticky = {\n  prefix: 'far',\n  iconName: 'note-sticky',\n  icon: [448, 512, [62026, \"sticky-note\"], \"f249\", \"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l224 0 0-80c0-17.7 14.3-32 32-32l80 0 0-224c0-8.8-7.2-16-16-16L64 80zM288 480L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 224 0 5.5c0 17-6.7 33.3-18.7 45.3l-90.5 90.5c-12 12-28.3 18.7-45.3 18.7l-5.5 0z\"]\n};\nconst faStickyNote = faNoteSticky;\nconst faFaceSadTear = {\n  prefix: 'far',\n  iconName: 'face-sad-tear',\n  icon: [512, 512, [128546, \"sad-tear\"], \"f5b4\", \"M175.9 448c-35-.1-65.5-22.6-76-54.6C67.6 356.8 48 308.7 48 256C48 141.1 141.1 48 256 48s208 93.1 208 208s-93.1 208-208 208c-28.4 0-55.5-5.7-80.1-16zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM128 369c0 26 21.5 47 48 47s48-21 48-47c0-20-28.4-60.4-41.6-77.7c-3.2-4.4-9.6-4.4-12.8 0C156.6 308.6 128 349 128 369zm128-65c-13.3 0-24 10.7-24 24s10.7 24 24 24c30.7 0 58.7 11.5 80 30.6c9.9 8.8 25 8 33.9-1.9s8-25-1.9-33.9C338.3 320.2 299 304 256 304zm47.6-96a32 32 0 1 0 64 0 32 32 0 1 0 -64 0zm-128 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"]\n};\nconst faSadTear = faFaceSadTear;\nconst faHandPointLeft = {\n  prefix: 'far',\n  iconName: 'hand-point-left',\n  icon: [512, 512, [], \"f0a5\", \"M64 128l177.6 0c-1 5.2-1.6 10.5-1.6 16l0 16-32 0L64 160c-8.8 0-16-7.2-16-16s7.2-16 16-16zm224 16c0-17.7 14.3-32 32-32c0 0 0 0 0 0l24 0c66.3 0 120 53.7 120 120l0 48c0 52.5-33.7 97.1-80.7 113.4c.5-3.1 .7-6.2 .7-9.4c0-20-9.2-37.9-23.6-49.7c4.9-9 7.6-19.4 7.6-30.3c0-15.1-5.3-29-14-40c8.8-11 14-24.9 14-40l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-40 0-40zm32-80s0 0 0 0c-18 0-34.6 6-48 16L64 80C28.7 80 0 108.7 0 144s28.7 64 64 64l82 0c-1.3 5.1-2 10.5-2 16c0 25.3 14.7 47.2 36 57.6c-2.6 7-4 14.5-4 22.4c0 20 9.2 37.9 23.6 49.7c-4.9 9-7.6 19.4-7.6 30.3c0 35.3 28.7 64 64 64l64 0 24 0c92.8 0 168-75.2 168-168l0-48c0-92.8-75.2-168-168-168l-24 0zM256 400c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0zM240 224c0 5.5 .7 10.9 2 16l-2 0-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l32 0 0 16zm24 64l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l24 0z\"]\n};\nvar icons = {\n  faTrashCan,\n  faTrashAlt,\n  faMessage,\n  faCommentAlt,\n  faFileLines,\n  faFileAlt,\n  faFileText,\n  faCalendarDays,\n  faCalendarAlt,\n  faHandPointRight,\n  faFaceSmileBeam,\n  faSmileBeam,\n  faFaceGrinStars,\n  faGrinStars,\n  faAddressBook,\n  faContactBook,\n  faComments,\n  faPaste,\n  faFileClipboard,\n  faFaceGrinTongueSquint,\n  faGrinTongueSquint,\n  faFaceFlushed,\n  faFlushed,\n  faSquareCaretRight,\n  faCaretSquareRight,\n  faSquareMinus,\n  faMinusSquare,\n  faCompass,\n  faSquareCaretDown,\n  faCaretSquareDown,\n  faFaceKissBeam,\n  faKissBeam,\n  faLightbulb,\n  faFlag,\n  faSquareCheck,\n  faCheckSquare,\n  faCircleDot,\n  faDotCircle,\n  faFaceDizzy,\n  faDizzy,\n  faFutbol,\n  faFutbolBall,\n  faSoccerBall,\n  faPenToSquare,\n  faEdit,\n  faHourglassHalf,\n  faHourglass2,\n  faEyeSlash,\n  faHand,\n  faHandPaper,\n  faHandSpock,\n  faFaceKiss,\n  faKiss,\n  faFaceGrinTongue,\n  faGrinTongue,\n  faChessBishop,\n  faFaceGrinWink,\n  faGrinWink,\n  faFaceGrinWide,\n  faGrinAlt,\n  faFaceFrownOpen,\n  faFrownOpen,\n  faHandPointUp,\n  faBookmark,\n  faHandPointDown,\n  faFolder,\n  faFolderBlank,\n  faUser,\n  faSquareCaretLeft,\n  faCaretSquareLeft,\n  faStar,\n  faChessKnight,\n  faFaceLaughSquint,\n  faLaughSquint,\n  faFaceLaugh,\n  faLaugh,\n  faFolderOpen,\n  faClipboard,\n  faChessQueen,\n  faHandBackFist,\n  faHandRock,\n  faSquareCaretUp,\n  faCaretSquareUp,\n  faChartBar,\n  faBarChart,\n  faWindowRestore,\n  faSquarePlus,\n  faPlusSquare,\n  faImage,\n  faFolderClosed,\n  faLemon,\n  faHandshake,\n  faGem,\n  faCirclePlay,\n  faPlayCircle,\n  faCircleCheck,\n  faCheckCircle,\n  faCircleStop,\n  faStopCircle,\n  faIdBadge,\n  faFaceLaughBeam,\n  faLaughBeam,\n  faRegistered,\n  faAddressCard,\n  faContactCard,\n  faVcard,\n  faFaceTired,\n  faTired,\n  faFontAwesome,\n  faFontAwesomeFlag,\n  faFontAwesomeLogoFull,\n  faFaceSmileWink,\n  faSmileWink,\n  faFileWord,\n  faFilePowerpoint,\n  faEnvelopeOpen,\n  faFileZipper,\n  faFileArchive,\n  faSquare,\n  faSnowflake,\n  faNewspaper,\n  faFaceKissWinkHeart,\n  faKissWinkHeart,\n  faStarHalfStroke,\n  faStarHalfAlt,\n  faFileExcel,\n  faFaceGrinBeam,\n  faGrinBeam,\n  faObjectUngroup,\n  faCircleRight,\n  faArrowAltCircleRight,\n  faFaceRollingEyes,\n  faMehRollingEyes,\n  faObjectGroup,\n  faHeart,\n  faFaceSurprise,\n  faSurprise,\n  faCirclePause,\n  faPauseCircle,\n  faCircle,\n  faCircleUp,\n  faArrowAltCircleUp,\n  faFileAudio,\n  faFileImage,\n  faCircleQuestion,\n  faQuestionCircle,\n  faFaceMehBlank,\n  faMehBlank,\n  faEye,\n  faFaceSadCry,\n  faSadCry,\n  faFileCode,\n  faWindowMaximize,\n  faFaceFrown,\n  faFrown,\n  faFloppyDisk,\n  faSave,\n  faCommentDots,\n  faCommenting,\n  faFaceGrinSquint,\n  faGrinSquint,\n  faHandPointer,\n  faHandScissors,\n  faFaceGrinTears,\n  faGrinTears,\n  faCalendarXmark,\n  faCalendarTimes,\n  faFileVideo,\n  faFilePdf,\n  faComment,\n  faEnvelope,\n  faHourglass,\n  faHourglassEmpty,\n  faCalendarCheck,\n  faHardDrive,\n  faHdd,\n  faFaceGrinSquintTears,\n  faGrinSquintTears,\n  faRectangleList,\n  faListAlt,\n  faCalendarPlus,\n  faCircleLeft,\n  faArrowAltCircleLeft,\n  faMoneyBill1,\n  faMoneyBillAlt,\n  faClock,\n  faClockFour,\n  faKeyboard,\n  faClosedCaptioning,\n  faImages,\n  faFaceGrin,\n  faGrin,\n  faFaceMeh,\n  faMeh,\n  faIdCard,\n  faDriversLicense,\n  faSun,\n  faFaceLaughWink,\n  faLaughWink,\n  faCircleDown,\n  faArrowAltCircleDown,\n  faThumbsDown,\n  faChessPawn,\n  faCreditCard,\n  faCreditCardAlt,\n  faBell,\n  faFile,\n  faHospital,\n  faHospitalAlt,\n  faHospitalWide,\n  faChessRook,\n  faStarHalf,\n  faChessKing,\n  faCircleUser,\n  faUserCircle,\n  faCopy,\n  faShareFromSquare,\n  faShareSquare,\n  faCopyright,\n  faMap,\n  faBellSlash,\n  faHandLizard,\n  faFaceSmile,\n  faSmile,\n  faHandPeace,\n  faFaceGrinHearts,\n  faGrinHearts,\n  faBuilding,\n  faFaceGrinBeamSweat,\n  faGrinBeamSweat,\n  faMoon,\n  faCalendar,\n  faFaceGrinTongueWink,\n  faGrinTongueWink,\n  faClone,\n  faFaceAngry,\n  faAngry,\n  faRectangleXmark,\n  faRectangleTimes,\n  faTimesRectangle,\n  faWindowClose,\n  faPaperPlane,\n  faLifeRing,\n  faFaceGrimace,\n  faGrimace,\n  faCalendarMinus,\n  faCircleXmark,\n  faTimesCircle,\n  faXmarkCircle,\n  faThumbsUp,\n  faWindowMinimize,\n  faSquareFull,\n  faNoteSticky,\n  faStickyNote,\n  faFaceSadTear,\n  faSadTear,\n  faHandPointLeft\n};\n\nexport { icons as far, prefix, faTrashCan, faTrashAlt, faMessage, faCommentAlt, faFileLines, faFileAlt, faFileText, faCalendarDays, faCalendarAlt, faHandPointRight, faFaceSmileBeam, faSmileBeam, faFaceGrinStars, faGrinStars, faAddressBook, faContactBook, faComments, faPaste, faFileClipboard, faFaceGrinTongueSquint, faGrinTongueSquint, faFaceFlushed, faFlushed, faSquareCaretRight, faCaretSquareRight, faSquareMinus, faMinusSquare, faCompass, faSquareCaretDown, faCaretSquareDown, faFaceKissBeam, faKissBeam, faLightbulb, faFlag, faSquareCheck, faCheckSquare, faCircleDot, faDotCircle, faFaceDizzy, faDizzy, faFutbol, faFutbolBall, faSoccerBall, faPenToSquare, faEdit, faHourglassHalf, faHourglass2, faEyeSlash, faHand, faHandPaper, faHandSpock, faFaceKiss, faKiss, faFaceGrinTongue, faGrinTongue, faChessBishop, faFaceGrinWink, faGrinWink, faFaceGrinWide, faGrinAlt, faFaceFrownOpen, faFrownOpen, faHandPointUp, faBookmark, faHandPointDown, faFolder, faFolderBlank, faUser, faSquareCaretLeft, faCaretSquareLeft, faStar, faChessKnight, faFaceLaughSquint, faLaughSquint, faFaceLaugh, faLaugh, faFolderOpen, faClipboard, faChessQueen, faHandBackFist, faHandRock, faSquareCaretUp, faCaretSquareUp, faChartBar, faBarChart, faWindowRestore, faSquarePlus, faPlusSquare, faImage, faFolderClosed, faLemon, faHandshake, faGem, faCirclePlay, faPlayCircle, faCircleCheck, faCheckCircle, faCircleStop, faStopCircle, faIdBadge, faFaceLaughBeam, faLaughBeam, faRegistered, faAddressCard, faContactCard, faVcard, faFaceTired, faTired, faFontAwesome, faFontAwesomeFlag, faFontAwesomeLogoFull, faFaceSmileWink, faSmileWink, faFileWord, faFilePowerpoint, faEnvelopeOpen, faFileZipper, faFileArchive, faSquare, faSnowflake, faNewspaper, faFaceKissWinkHeart, faKissWinkHeart, faStarHalfStroke, faStarHalfAlt, faFileExcel, faFaceGrinBeam, faGrinBeam, faObjectUngroup, faCircleRight, faArrowAltCircleRight, faFaceRollingEyes, faMehRollingEyes, faObjectGroup, faHeart, faFaceSurprise, faSurprise, faCirclePause, faPauseCircle, faCircle, faCircleUp, faArrowAltCircleUp, faFileAudio, faFileImage, faCircleQuestion, faQuestionCircle, faFaceMehBlank, faMehBlank, faEye, faFaceSadCry, faSadCry, faFileCode, faWindowMaximize, faFaceFrown, faFrown, faFloppyDisk, faSave, faCommentDots, faCommenting, faFaceGrinSquint, faGrinSquint, faHandPointer, faHandScissors, faFaceGrinTears, faGrinTears, faCalendarXmark, faCalendarTimes, faFileVideo, faFilePdf, faComment, faEnvelope, faHourglass, faHourglassEmpty, faCalendarCheck, faHardDrive, faHdd, faFaceGrinSquintTears, faGrinSquintTears, faRectangleList, faListAlt, faCalendarPlus, faCircleLeft, faArrowAltCircleLeft, faMoneyBill1, faMoneyBillAlt, faClock, faClockFour, faKeyboard, faClosedCaptioning, faImages, faFaceGrin, faGrin, faFaceMeh, faMeh, faIdCard, faDriversLicense, faSun, faFaceLaughWink, faLaughWink, faCircleDown, faArrowAltCircleDown, faThumbsDown, faChessPawn, faCreditCard, faCreditCardAlt, faBell, faFile, faHospital, faHospitalAlt, faHospitalWide, faChessRook, faStarHalf, faChessKing, faCircleUser, faUserCircle, faCopy, faShareFromSquare, faShareSquare, faCopyright, faMap, faBellSlash, faHandLizard, faFaceSmile, faSmile, faHandPeace, faFaceGrinHearts, faGrinHearts, faBuilding, faFaceGrinBeamSweat, faGrinBeamSweat, faMoon, faCalendar, faFaceGrinTongueWink, faGrinTongueWink, faClone, faFaceAngry, faAngry, faRectangleXmark, faRectangleTimes, faTimesRectangle, faWindowClose, faPaperPlane, faLifeRing, faFaceGrimace, faGrimace, faCalendarMinus, faCircleXmark, faTimesCircle, faXmarkCircle, faThumbsUp, faWindowMinimize, faSquareFull, faNoteSticky, faStickyNote, faFaceSadTear, faSadTear, faHandPointLeft };\n", "/*!\n * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */\nconst prefix = \"fab\";\nconst faMonero = {\n  prefix: 'fab',\n  iconName: 'monero',\n  icon: [496, 512, [], \"f3d0\", \"M352 384h108.4C417 455.9 338.1 504 248 504S79 455.9 35.6 384H144V256.2L248 361l104-105v128zM88 336V128l159.4 159.4L408 128v208h74.8c8.5-25.1 13.2-52 13.2-80C496 119 385 8 248 8S0 119 0 256c0 28 4.6 54.9 13.2 80H88z\"]\n};\nconst faHooli = {\n  prefix: 'fab',\n  iconName: 'hooli',\n  icon: [640, 512, [], \"f427\", \"M144.5 352l38.3.8c-13.2-4.6-26-10.2-38.3-16.8zm57.7-5.3v5.3l-19.4.8c36.5 12.5 69.9 14.2 94.7 7.2-19.9.2-45.8-2.6-75.3-13.3zm408.9-115.2c15.9 0 28.9-12.9 28.9-28.9s-12.9-24.5-28.9-24.5c-15.9 0-28.9 8.6-28.9 24.5s12.9 28.9 28.9 28.9zm-29 120.5H640V241.5h-57.9zm-73.7 0h57.9V156.7L508.4 184zm-31-119.4c-18.2-18.2-50.4-17.1-50.4-17.1s-32.3-1.1-50.4 17.1c-18.2 18.2-16.8 33.9-16.8 52.6s-1.4 34.3 16.8 52.5 50.4 17.1 50.4 17.1 32.3 1.1 50.4-17.1c18.2-18.2 16.8-33.8 16.8-52.5-.1-18.8 1.3-34.5-16.8-52.6zm-39.8 71.9c0 3.6-1.8 12.5-10.7 12.5s-10.7-8.9-10.7-12.5v-40.4c0-8.7 7.3-10.9 10.7-10.9s10.7 2.1 10.7 10.9zm-106.2-71.9c-18.2-18.2-50.4-17.1-50.4-17.1s-32.2-1.1-50.4 17.1c-1.9 1.9-3.7 3.9-5.3 6-38.2-29.6-72.5-46.5-102.1-61.1v-20.7l-22.5 10.6c-54.4-22.1-89-18.2-97.3.1 0 0-24.9 32.8 61.8 110.8V352h57.9v-28.6c-6.5-4.2-13-8.7-19.4-13.6-14.8-11.2-27.4-21.6-38.4-31.4v-31c13.1 14.7 30.5 31.4 53.4 50.3l4.5 3.6v-29.8c0-6.9 1.7-18.2 10.8-18.2s10.6 6.9 10.6 15V317c18 12.2 37.3 22.1 57.7 29.6v-93.9c0-18.7-13.4-37.4-40.6-37.4-15.8-.1-30.5 8.2-38.5 21.9v-54.3c41.9 20.9 83.9 46.5 99.9 58.3-10.2 14.6-9.3 28.1-9.3 43.7 0 18.7-1.4 34.3 16.8 52.5s50.4 17.1 50.4 17.1 32.3 1.1 50.4-17.1c18.2-18.2 16.7-33.8 16.7-52.5 0-18.5 1.5-34.2-16.7-52.3zM65.2 184v63.3c-48.7-54.5-38.9-76-35.2-79.1 13.5-11.4 37.5-8 64.4 2.1zm226.5 120.5c0 3.6-1.8 12.5-10.7 12.5s-10.7-8.9-10.7-12.5v-40.4c0-8.7 7.3-10.9 10.7-10.9s10.7 2.1 10.7 10.9z\"]\n};\nconst faYelp = {\n  prefix: 'fab',\n  iconName: 'yelp',\n  icon: [384, 512, [], \"f1e9\", \"M42.9 240.32l99.62 48.61c19.2 9.4 16.2 37.51-4.5 42.71L30.5 358.45a22.79 22.79 0 0 1-28.21-19.6 197.16 197.16 0 0 1 9-85.32 22.8 22.8 0 0 1 31.61-13.21zm44 239.25a199.45 199.45 0 0 0 79.42 32.11A22.78 22.78 0 0 0 192.94 490l3.9-110.82c.7-21.3-25.5-31.91-39.81-16.1l-74.21 82.4a22.82 22.82 0 0 0 4.09 34.09zm145.34-109.92l58.81 94a22.93 22.93 0 0 0 34 5.5 198.36 198.36 0 0 0 52.71-67.61A23 23 0 0 0 364.17 370l-105.42-34.26c-20.31-6.5-37.81 15.8-26.51 33.91zm148.33-132.23a197.44 197.44 0 0 0-50.41-69.31 22.85 22.85 0 0 0-34 4.4l-62 91.92c-11.9 17.7 4.7 40.61 25.2 34.71L366 268.63a23 23 0 0 0 14.61-31.21zM62.11 30.18a22.86 22.86 0 0 0-9.9 32l104.12 180.44c11.7 20.2 42.61 11.9 42.61-11.4V22.88a22.67 22.67 0 0 0-24.5-22.8 320.37 320.37 0 0 0-112.33 30.1z\"]\n};\nconst faCcVisa = {\n  prefix: 'fab',\n  iconName: 'cc-visa',\n  icon: [576, 512, [], \"f1f0\", \"M470.1 231.3s7.6 37.2 9.3 45H446c3.3-8.9 16-43.5 16-43.5-.2.3 3.3-9.1 5.3-14.9l2.8 13.4zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM152.5 331.2L215.7 176h-42.5l-39.3 106-4.3-21.5-14-71.4c-2.3-9.9-9.4-12.7-18.2-13.1H32.7l-.7 3.1c15.8 4 29.9 9.8 42.2 17.1l35.8 135h42.5zm94.4.2L272.1 176h-40.2l-25.1 155.4h40.1zm139.9-50.8c.2-17.7-10.6-31.2-33.7-42.3-14.1-7.1-22.7-11.9-22.7-19.2.2-6.6 7.3-13.4 23.1-13.4 13.1-.3 22.7 2.8 29.9 5.9l3.6 1.7 5.5-33.6c-7.9-3.1-20.5-6.6-36-6.6-39.7 0-67.6 21.2-67.8 51.4-.3 22.3 20 34.7 35.2 42.2 15.5 7.6 20.8 12.6 20.8 19.3-.2 10.4-12.6 15.2-24.1 15.2-16 0-24.6-2.5-37.7-8.3l-5.3-2.5-5.6 34.9c9.4 4.3 26.8 8.1 44.8 8.3 42.2.1 69.7-20.8 70-53zM528 331.4L495.6 176h-31.1c-9.6 0-16.9 2.8-21 12.9l-59.7 142.5H426s6.9-19.2 8.4-23.3H486c1.2 5.5 4.8 23.3 4.8 23.3H528z\"]\n};\nconst faLastfm = {\n  prefix: 'fab',\n  iconName: 'lastfm',\n  icon: [512, 512, [], \"f202\", \"M225.8 367.1l-18.8-51s-30.5 34-76.2 34c-40.5 0-69.2-35.2-69.2-91.5 0-72.1 36.4-97.9 72.1-97.9 66.5 0 74.8 53.3 100.9 134.9 18.8 56.9 54 102.6 155.4 102.6 72.7 0 122-22.3 122-80.9 0-72.9-62.7-80.6-115-92.1-25.8-5.9-33.4-16.4-33.4-34 0-19.9 15.8-31.7 41.6-31.7 28.2 0 43.4 10.6 45.7 35.8l58.6-7c-4.7-52.8-41.1-74.5-100.9-74.5-52.8 0-104.4 19.9-104.4 83.9 0 39.9 19.4 65.1 68 76.8 44.9 10.6 79.8 13.8 79.8 45.7 0 21.7-21.1 30.5-61 30.5-59.2 0-83.9-31.1-97.9-73.9-32-96.8-43.6-163-161.3-163C45.7 113.8 0 168.3 0 261c0 89.1 45.7 137.2 127.9 137.2 66.2 0 97.9-31.1 97.9-31.1z\"]\n};\nconst faShopware = {\n  prefix: 'fab',\n  iconName: 'shopware',\n  icon: [512, 512, [], \"f5b5\", \"M403.5 455.41A246.17 246.17 0 0 1 256 504C118.81 504 8 393 8 256 8 118.81 119 8 256 8a247.39 247.39 0 0 1 165.7 63.5 3.57 3.57 0 0 1-2.86 6.18A418.62 418.62 0 0 0 362.13 74c-129.36 0-222.4 53.47-222.4 155.35 0 109 92.13 145.88 176.83 178.73 33.64 13 65.4 25.36 87 41.59a3.58 3.58 0 0 1 0 5.72zM503 233.09a3.64 3.64 0 0 0-1.27-2.44c-51.76-43-93.62-60.48-144.48-60.48-84.13 0-80.25 52.17-80.25 53.63 0 42.6 52.06 62 112.34 84.49 31.07 11.59 63.19 23.57 92.68 39.93a3.57 3.57 0 0 0 5-1.82A249 249 0 0 0 503 233.09z\"]\n};\nconst faCreativeCommonsNc = {\n  prefix: 'fab',\n  iconName: 'creative-commons-nc',\n  icon: [496, 512, [], \"f4e8\", \"M247.6 8C387.4 8 496 115.9 496 256c0 147.2-118.5 248-248.4 248C113.1 504 0 393.2 0 256 0 123.1 104.7 8 247.6 8zM55.8 189.1c-7.4 20.4-11.1 42.7-11.1 66.9 0 110.9 92.1 202.4 203.7 202.4 122.4 0 177.2-101.8 178.5-104.1l-93.4-41.6c-7.7 37.1-41.2 53-68.2 55.4v38.1h-28.8V368c-27.5-.3-52.6-10.2-75.3-29.7l34.1-34.5c31.7 29.4 86.4 31.8 86.4-2.2 0-6.2-2.2-11.2-6.6-15.1-14.2-6-1.8-.1-219.3-97.4zM248.4 52.3c-38.4 0-112.4 8.7-170.5 93l94.8 42.5c10-31.3 40.4-42.9 63.8-44.3v-38.1h28.8v38.1c22.7 1.2 43.4 8.9 62 23L295 199.7c-42.7-29.9-83.5-8-70 11.1 53.4 24.1 43.8 19.8 93 41.6l127.1 56.7c4.1-17.4 6.2-35.1 6.2-53.1 0-57-19.8-105-59.3-143.9-39.3-39.9-87.2-59.8-143.6-59.8z\"]\n};\nconst faAws = {\n  prefix: 'fab',\n  iconName: 'aws',\n  icon: [640, 512, [], \"f375\", \"M180.41 203.01c-.72 22.65 10.6 32.68 10.88 39.05a8.164 8.164 0 0 1-4.1 6.27l-12.8 8.96a10.66 10.66 0 0 1-5.63 1.92c-.43-.02-8.19 1.83-20.48-25.61a78.608 78.608 0 0 1-62.61 29.45c-16.28.89-60.4-9.24-58.13-56.21-1.59-38.28 34.06-62.06 70.93-60.05 7.1.02 21.6.37 46.99 6.27v-15.62c2.69-26.46-14.7-46.99-44.81-43.91-2.4.01-19.4-.5-45.84 10.11-7.36 3.38-8.3 2.82-10.75 2.82-7.41 0-4.36-21.48-2.94-24.2 5.21-6.4 35.86-18.35 65.94-18.18a76.857 76.857 0 0 1 55.69 17.28 70.285 70.285 0 0 1 17.67 52.36l-.01 69.29zM93.99 235.4c32.43-.47 46.16-19.97 49.29-30.47 2.46-10.05 2.05-16.41 2.05-27.4-9.67-2.32-23.59-4.85-39.56-4.87-15.15-1.14-42.82 5.63-41.74 32.26-1.24 16.79 11.12 31.4 29.96 30.48zm170.92 23.05c-7.86.72-11.52-4.86-12.68-10.37l-49.8-164.65c-.97-2.78-1.61-5.65-1.92-8.58a4.61 4.61 0 0 1 3.86-5.25c.24-.04-2.13 0 22.25 0 8.78-.88 11.64 6.03 12.55 10.37l35.72 140.83 33.16-140.83c.53-3.22 2.94-11.07 12.8-10.24h17.16c2.17-.18 11.11-.5 12.68 10.37l33.42 142.63L420.98 80.1c.48-2.18 2.72-11.37 12.68-10.37h19.72c.85-.13 6.15-.81 5.25 8.58-.43 1.85 3.41-10.66-52.75 169.9-1.15 5.51-4.82 11.09-12.68 10.37h-18.69c-10.94 1.15-12.51-9.66-12.68-10.75L328.67 110.7l-32.78 136.99c-.16 1.09-1.73 11.9-12.68 10.75h-18.3zm273.48 5.63c-5.88.01-33.92-.3-57.36-12.29a12.802 12.802 0 0 1-7.81-11.91v-10.75c0-8.45 6.2-6.9 8.83-5.89 10.04 4.06 16.48 7.14 28.81 9.6 36.65 7.53 52.77-2.3 56.72-4.48 13.15-7.81 14.19-25.68 5.25-34.95-10.48-8.79-15.48-9.12-53.13-21-4.64-1.29-43.7-13.61-43.79-52.36-.61-28.24 25.05-56.18 69.52-55.95 12.67-.01 46.43 4.13 55.57 15.62 1.35 2.09 2.02 4.55 1.92 7.04v10.11c0 4.44-1.62 6.66-4.87 6.66-7.71-.86-21.39-11.17-49.16-10.75-6.89-.36-39.89.91-38.41 24.97-.43 18.96 26.61 26.07 29.7 26.89 36.46 10.97 48.65 12.79 63.12 29.58 17.14 22.25 7.9 48.3 4.35 55.44-19.08 37.49-68.42 34.44-69.26 34.42zm40.2 104.86c-70.03 51.72-171.69 79.25-258.49 79.25A469.127 469.127 0 0 1 2.83 327.46c-6.53-5.89-.77-13.96 7.17-9.47a637.37 637.37 0 0 0 316.88 84.12 630.22 630.22 0 0 0 241.59-49.55c11.78-5 21.77 7.8 10.12 16.38zm29.19-33.29c-8.96-11.52-59.28-5.38-81.81-2.69-6.79.77-7.94-5.12-1.79-9.47 40.07-28.17 105.88-20.1 113.44-10.63 7.55 9.47-2.05 75.41-39.56 106.91-5.76 4.87-11.27 2.3-8.71-4.1 8.44-21.25 27.39-68.49 18.43-80.02z\"]\n};\nconst faRedhat = {\n  prefix: 'fab',\n  iconName: 'redhat',\n  icon: [512, 512, [], \"f7bc\", \"M341.52 285.56c33.65 0 82.34-6.94 82.34-47 .22-6.74.86-1.82-20.88-96.24-4.62-19.15-8.68-27.84-42.31-44.65-26.09-13.34-82.92-35.37-99.73-35.37-15.66 0-20.2 20.17-38.87 20.17-18 0-31.31-15.06-48.12-15.06-16.14 0-26.66 11-34.78 33.62-27.5 77.55-26.28 74.27-26.12 78.27 0 24.8 97.64 106.11 228.47 106.11M429 254.84c4.65 22 4.65 24.35 4.65 27.25 0 37.66-42.33 58.56-98 58.56-125.74.08-235.91-73.65-235.91-122.33a49.55 49.55 0 0 1 4.06-19.72C58.56 200.86 0 208.93 0 260.63c0 84.67 200.63 189 359.49 189 121.79 0 152.51-55.08 152.51-98.58 0-34.21-29.59-73.05-82.93-96.24\"]\n};\nconst faYoast = {\n  prefix: 'fab',\n  iconName: 'yoast',\n  icon: [448, 512, [], \"f2b1\", \"M91.3 76h186l-7 18.9h-179c-39.7 0-71.9 31.6-71.9 70.3v205.4c0 35.4 24.9 70.3 84 70.3V460H91.3C41.2 460 0 419.8 0 370.5V165.2C0 115.9 40.7 76 91.3 76zm229.1-56h66.5C243.1 398.1 241.2 418.9 202.2 459.3c-20.8 21.6-49.3 31.7-78.3 32.7v-51.1c49.2-7.7 64.6-49.9 64.6-75.3 0-20.1.6-12.6-82.1-223.2h61.4L218.2 299 320.4 20zM448 161.5V460H234c6.6-9.6 10.7-16.3 12.1-19.4h182.5V161.5c0-32.5-17.1-51.9-48.2-62.9l6.7-17.6c41.7 13.6 60.9 43.1 60.9 80.5z\"]\n};\nconst faCloudflare = {\n  prefix: 'fab',\n  iconName: 'cloudflare',\n  icon: [640, 512, [], \"e07d\", \"M407.906,319.913l-230.8-2.928a4.58,4.58,0,0,1-3.632-1.926,4.648,4.648,0,0,1-.494-4.147,6.143,6.143,0,0,1,5.361-4.076L411.281,303.9c27.631-1.26,57.546-23.574,68.022-50.784l13.286-34.542a7.944,7.944,0,0,0,.524-2.936,7.735,7.735,0,0,0-.164-1.631A151.91,151.91,0,0,0,201.257,198.4,68.12,68.12,0,0,0,94.2,269.59C41.924,271.106,0,313.728,0,366.12a96.054,96.054,0,0,0,1.029,13.958,4.508,4.508,0,0,0,4.445,3.871l426.1.051c.043,0,.08-.019.122-.02a5.606,5.606,0,0,0,5.271-4l3.273-11.265c3.9-13.4,2.448-25.8-4.1-34.9C430.124,325.423,420.09,320.487,407.906,319.913ZM513.856,221.1c-2.141,0-4.271.062-6.391.164a3.771,3.771,0,0,0-3.324,2.653l-9.077,31.193c-3.9,13.4-2.449,25.786,4.1,34.89,6.02,8.4,16.054,13.323,28.238,13.9l49.2,2.939a4.491,4.491,0,0,1,3.51,1.894,4.64,4.64,0,0,1,.514,4.169,6.153,6.153,0,0,1-5.351,4.075l-51.125,2.939c-27.754,1.27-57.669,23.574-68.145,50.784l-3.695,9.606a2.716,2.716,0,0,0,2.427,3.68c.046,0,.088.017.136.017h175.91a4.69,4.69,0,0,0,4.539-3.37,124.807,124.807,0,0,0,4.682-34C640,277.3,583.524,221.1,513.856,221.1Z\"]\n};\nconst faUps = {\n  prefix: 'fab',\n  iconName: 'ups',\n  icon: [384, 512, [], \"f7e0\", \"M103.2 303c-5.2 3.6-32.6 13.1-32.6-19V180H37.9v102.6c0 74.9 80.2 51.1 97.9 39V180h-32.6zM4 74.82v220.9c0 103.7 74.9 135.2 187.7 184.1 112.4-48.9 187.7-80.2 187.7-184.1V74.82c-116.3-61.6-281.8-49.6-375.4 0zm358.1 220.9c0 86.6-53.2 113.6-170.4 165.3-117.5-51.8-170.5-78.7-170.5-165.3v-126.4c102.3-93.8 231.6-100 340.9-89.8zm-209.6-107.4v212.8h32.7v-68.7c24.4 7.3 71.7-2.6 71.7-78.5 0-97.4-80.7-80.92-104.4-65.6zm32.7 117.3v-100.3c8.4-4.2 38.4-12.7 38.4 49.3 0 67.9-36.4 51.8-38.4 51zm79.1-86.4c.1 47.3 51.6 42.5 52.2 70.4.6 23.5-30.4 23-50.8 4.9v30.1c36.2 21.5 81.9 8.1 83.2-33.5 1.7-51.5-54.1-46.6-53.4-73.2.6-20.3 30.6-20.5 48.5-2.2v-28.4c-28.5-22-79.9-9.2-79.7 31.9z\"]\n};\nconst faPixiv = {\n  prefix: 'fab',\n  iconName: 'pixiv',\n  icon: [448, 512, [], \"e640\", \"M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm171.5 84c41 0 76.3 12.9 101.4 35.2l0 0c25.2 22.2 39.8 54.1 39.8 88.8c.1 35.3-16.6 66.3-42.4 87c-25.9 20.8-60.6 32.4-98.8 32.4c-43.5 0-83.8-16.1-83.8-16.1v51.8c7.4 2.2 19.7 7 11.9 14.8H104.8c-7.7-7.8 3.6-12.4 12.1-14.8V175.5C97.1 190.9 87 204.3 81.8 214.2c6 19.4-5.3 18.5-5.3 18.5L56 199.7s72.7-83.7 179.5-83.7zm-3.6 222.9c30 0 56-11.3 73.9-29.2c17.9-18.1 27.9-41.6 28-70.2c-.1-29.3-9.5-54.6-26.7-73.6c-17.2-18.9-42.7-31.3-75.2-31.4c-26.7-.1-59.8 9-80.2 23.7V323.1c18.6 9.3 46.8 15.9 80.2 15.8z\"]\n};\nconst faWpexplorer = {\n  prefix: 'fab',\n  iconName: 'wpexplorer',\n  icon: [512, 512, [], \"f2de\", \"M512 256c0 141.2-114.7 256-256 256C114.8 512 0 397.3 0 256S114.7 0 256 0s256 114.7 256 256zm-32 0c0-123.2-100.3-224-224-224C132.5 32 32 132.5 32 256s100.5 224 224 224 224-100.5 224-224zM160.9 124.6l86.9 37.1-37.1 86.9-86.9-37.1 37.1-86.9zm110 169.1l46.6 94h-14.6l-50-100-48.9 100h-14l51.1-106.9-22.3-9.4 6-14 68.6 29.1-6 14.3-16.5-7.1zm-11.8-116.3l68.6 29.4-29.4 68.3L230 246l29.1-68.6zm80.3 42.9l54.6 23.1-23.4 54.3-54.3-23.1 23.1-54.3z\"]\n};\nconst faDyalog = {\n  prefix: 'fab',\n  iconName: 'dyalog',\n  icon: [416, 512, [], \"f399\", \"M0 32v119.2h64V96h107.2C284.6 96 352 176.2 352 255.9 352 332 293.4 416 171.2 416H0v64h171.2C331.9 480 416 367.3 416 255.9c0-58.7-22.1-113.4-62.3-154.3C308.9 56 245.7 32 171.2 32H0z\"]\n};\nconst faBity = {\n  prefix: 'fab',\n  iconName: 'bity',\n  icon: [496, 512, [], \"f37a\", \"M78.4 67.2C173.8-22 324.5-24 421.5 71c14.3 14.1-6.4 37.1-22.4 21.5-84.8-82.4-215.8-80.3-298.9-3.2-16.3 15.1-36.5-8.3-21.8-22.1zm98.9 418.6c19.3 5.7 29.3-23.6 7.9-30C73 421.9 9.4 306.1 37.7 194.8c5-19.6-24.9-28.1-30.2-7.1-32.1 127.4 41.1 259.8 169.8 298.1zm148.1-2c121.9-40.2 192.9-166.9 164.4-291-4.5-19.7-34.9-13.8-30 7.9 24.2 107.7-37.1 217.9-143.2 253.4-21.2 7-10.4 36 8.8 29.7zm-62.9-79l.2-71.8c0-8.2-6.6-14.8-14.8-14.8-8.2 0-14.8 6.7-14.8 14.8l-.2 71.8c0 8.2 6.6 14.8 14.8 14.8s14.8-6.6 14.8-14.8zm71-269c2.1 90.9 4.7 131.9-85.5 132.5-92.5-.7-86.9-44.3-85.5-132.5 0-21.8-32.5-19.6-32.5 0v71.6c0 69.3 60.7 90.9 118 90.1 57.3.8 118-20.8 118-90.1v-71.6c0-19.6-32.5-21.8-32.5 0z\"]\n};\nconst faStackpath = {\n  prefix: 'fab',\n  iconName: 'stackpath',\n  icon: [448, 512, [], \"f842\", \"M244.6 232.4c0 8.5-4.26 20.49-21.34 20.49h-19.61v-41.47h19.61c17.13 0 21.34 12.36 21.34 20.98zM448 32v448H0V32zM151.3 287.84c0-21.24-12.12-34.54-46.72-44.85-20.57-7.41-26-10.91-26-18.63s7-14.61 20.41-14.61c14.09 0 20.79 8.45 20.79 18.35h30.7l.19-.57c.5-19.57-15.06-41.65-51.12-41.65-23.37 0-52.55 10.75-52.55 38.29 0 19.4 9.25 31.29 50.74 44.37 17.26 6.15 21.91 10.4 21.91 19.48 0 15.2-19.13 14.23-19.47 14.23-20.4 0-25.65-9.1-25.65-21.9h-30.8l-.18.56c-.68 31.32 28.38 45.22 56.63 45.22 29.98 0 51.12-13.55 51.12-38.29zm125.38-55.63c0-25.3-18.43-45.46-53.42-45.46h-51.78v138.18h32.17v-47.36h19.61c30.25 0 53.42-15.95 53.42-45.36zM297.94 325L347 186.78h-31.09L268 325zm106.52-138.22h-31.09L325.46 325h29.94z\"]\n};\nconst faBuysellads = {\n  prefix: 'fab',\n  iconName: 'buysellads',\n  icon: [448, 512, [], \"f20d\", \"M224 150.7l42.9 160.7h-85.8L224 150.7zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-65.3 325.3l-94.5-298.7H159.8L65.3 405.3H156l111.7-91.6 24.2 91.6h90.8z\"]\n};\nconst faFirstOrder = {\n  prefix: 'fab',\n  iconName: 'first-order',\n  icon: [448, 512, [], \"f2b0\", \"M12.9 229.2c.1-.1.2-.3.3-.4 0 .1 0 .3-.1.4h-.2zM224 96.6c-7.1 0-14.6.6-21.4 1.7l3.7 67.4-22-64c-14.3 3.7-27.7 9.4-40 16.6l29.4 61.4-45.1-50.9c-11.4 8.9-21.7 19.1-30.6 30.9l50.6 45.4-61.1-29.7c-7.1 12.3-12.9 25.7-16.6 40l64.3 22.6-68-4c-.9 7.1-1.4 14.6-1.4 22s.6 14.6 1.4 21.7l67.7-4-64 22.6c3.7 14.3 9.4 27.7 16.6 40.3l61.1-29.7L97.7 352c8.9 11.7 19.1 22.3 30.9 30.9l44.9-50.9-29.5 61.4c12.3 7.4 25.7 13.1 40 16.9l22.3-64.6-4 68c7.1 1.1 14.6 1.7 21.7 1.7 7.4 0 14.6-.6 21.7-1.7l-4-68.6 22.6 65.1c14.3-4 27.7-9.4 40-16.9L274.9 332l44.9 50.9c11.7-8.9 22-19.1 30.6-30.9l-50.6-45.1 61.1 29.4c7.1-12.3 12.9-25.7 16.6-40.3l-64-22.3 67.4 4c1.1-7.1 1.4-14.3 1.4-21.7s-.3-14.9-1.4-22l-67.7 4 64-22.3c-3.7-14.3-9.1-28-16.6-40.3l-60.9 29.7 50.6-45.4c-8.9-11.7-19.1-22-30.6-30.9l-45.1 50.9 29.4-61.1c-12.3-7.4-25.7-13.1-40-16.9L241.7 166l4-67.7c-7.1-1.2-14.3-1.7-21.7-1.7zM443.4 128v256L224 512 4.6 384V128L224 0l219.4 128zm-17.1 10.3L224 20.9 21.7 138.3v235.1L224 491.1l202.3-117.7V138.3zM224 37.1l187.7 109.4v218.9L224 474.9 36.3 365.4V146.6L224 37.1zm0 50.9c-92.3 0-166.9 75.1-166.9 168 0 92.6 74.6 167.7 166.9 167.7 92 0 166.9-75.1 166.9-167.7 0-92.9-74.9-168-166.9-168z\"]\n};\nconst faModx = {\n  prefix: 'fab',\n  iconName: 'modx',\n  icon: [448, 512, [], \"f285\", \"M356 241.8l36.7 23.7V480l-133-83.8L356 241.8zM440 75H226.3l-23 37.8 153.5 96.5L440 75zm-89 142.8L55.2 32v214.5l46 29L351 217.8zM97 294.2L8 437h213.7l125-200.5L97 294.2z\"]\n};\nconst faGuilded = {\n  prefix: 'fab',\n  iconName: 'guilded',\n  icon: [448, 512, [], \"e07e\", \"M443.427,64H4.571c0,103.26,22.192,180.06,43.418,222.358C112.046,414.135,224,448,225.256,448a312.824,312.824,0,0,0,140.55-103.477c25.907-33.923,53.1-87.19,65.916-145.761H171.833c4.14,36.429,22.177,67.946,45.1,86.944h88.589c-17.012,28.213-48.186,54.4-80.456,69.482-31.232-13.259-69.09-46.544-96.548-98.362-26.726-53.833-27.092-105.883-27.092-105.883H437.573A625.91,625.91,0,0,0,443.427,64Z\"]\n};\nconst faVnv = {\n  prefix: 'fab',\n  iconName: 'vnv',\n  icon: [640, 512, [], \"f40b\", \"M104.9 352c-34.1 0-46.4-30.4-46.4-30.4L2.6 210.1S-7.8 192 13 192h32.8c10.4 0 13.2 8.7 18.8 18.1l36.7 74.5s5.2 13.1 21.1 13.1 21.1-13.1 21.1-13.1l36.7-74.5c5.6-9.5 8.4-18.1 18.8-18.1h32.8c20.8 0 10.4 18.1 10.4 18.1l-55.8 111.5S174.2 352 140 352h-35.1zm395 0c-34.1 0-46.4-30.4-46.4-30.4l-55.9-111.5S387.2 192 408 192h32.8c10.4 0 13.2 8.7 18.8 18.1l36.7 74.5s5.2 13.1 21.1 13.1 21.1-13.1 21.1-13.1l36.8-74.5c5.6-9.5 8.4-18.1 18.8-18.1H627c20.8 0 10.4 18.1 10.4 18.1l-55.9 111.5S569.3 352 535.1 352h-35.2zM337.6 192c34.1 0 46.4 30.4 46.4 30.4l55.9 111.5s10.4 18.1-10.4 18.1h-32.8c-10.4 0-13.2-8.7-18.8-18.1l-36.7-74.5s-5.2-13.1-21.1-13.1c-15.9 0-21.1 13.1-21.1 13.1l-36.7 74.5c-5.6 9.4-8.4 18.1-18.8 18.1h-32.9c-20.8 0-10.4-18.1-10.4-18.1l55.9-111.5s12.2-30.4 46.4-30.4h35.1z\"]\n};\nconst faSquareJs = {\n  prefix: 'fab',\n  iconName: 'square-js',\n  icon: [448, 512, [\"js-square\"], \"f3b9\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM180.9 444.9c-33.7 0-53.2-17.4-63.2-38.5L152 385.7c6.6 11.7 12.6 21.6 27.1 21.6c13.8 0 22.6-5.4 22.6-26.5V237.7h42.1V381.4c0 43.6-25.6 63.5-62.9 63.5zm85.8-43L301 382.1c9 14.7 20.8 25.6 41.5 25.6c17.4 0 28.6-8.7 28.6-20.8c0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5c0-31.6 24.1-55.6 61.6-55.6c26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18c-12.3 0-20.1 7.8-20.1 18c0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2c0 37.8-29.8 58.6-69.7 58.6c-39.1 0-64.4-18.6-76.7-43z\"]\n};\nconst faJsSquare = faSquareJs;\nconst faMicrosoft = {\n  prefix: 'fab',\n  iconName: 'microsoft',\n  icon: [448, 512, [], \"f3ca\", \"M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z\"]\n};\nconst faQq = {\n  prefix: 'fab',\n  iconName: 'qq',\n  icon: [448, 512, [], \"f1d6\", \"M433.754 420.445c-11.526 1.393-44.86-52.741-44.86-52.741 0 31.345-16.136 72.247-51.051 101.786 16.842 5.192 54.843 19.167 45.803 34.421-7.316 12.343-125.51 7.881-159.632 4.037-34.122 3.844-152.316 8.306-159.632-4.037-9.045-15.25 28.918-29.214 45.783-34.415-34.92-29.539-51.059-70.445-51.059-101.792 0 0-33.334 54.134-44.859 52.741-5.37-.65-12.424-29.644 9.347-99.704 10.261-33.024 21.995-60.478 40.144-105.779C60.683 98.063 108.982.006 224 0c113.737.006 163.156 96.133 160.264 214.963 18.118 45.223 29.912 72.85 40.144 105.778 21.768 70.06 14.716 99.053 9.346 99.704z\"]\n};\nconst faOrcid = {\n  prefix: 'fab',\n  iconName: 'orcid',\n  icon: [512, 512, [], \"f8d2\", \"M294.75 188.19h-45.92V342h47.47c67.62 0 83.12-51.34 83.12-76.91 0-41.64-26.54-76.9-84.67-76.9zM256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm-80.79 360.76h-29.84v-207.5h29.84zm-14.92-231.14a19.57 19.57 0 1 1 19.57-19.57 19.64 19.64 0 0 1-19.57 19.57zM300 369h-81V161.26h80.6c76.73 0 110.44 54.83 110.44 103.85C410 318.39 368.38 369 300 369z\"]\n};\nconst faJava = {\n  prefix: 'fab',\n  iconName: 'java',\n  icon: [384, 512, [], \"f4e4\", \"M277.74 312.9c9.8-6.7 23.4-12.5 23.4-12.5s-38.7 7-77.2 10.2c-47.1 3.9-97.7 4.7-123.1 1.3-60.1-8 33-30.1 33-30.1s-36.1-2.4-80.6 19c-52.5 25.4 130 37 224.5 12.1zm-85.4-32.1c-19-42.7-83.1-80.2 0-145.8C296 53.2 242.84 0 242.84 0c21.5 84.5-75.6 110.1-110.7 162.6-23.9 35.9 11.7 74.4 60.2 118.2zm114.6-176.2c.1 0-175.2 43.8-91.5 140.2 24.7 28.4-6.5 54-6.5 54s62.7-32.4 33.9-72.9c-26.9-37.8-47.5-56.6 64.1-121.3zm-6.1 270.5a12.19 12.19 0 0 1-2 2.6c128.3-33.7 81.1-118.9 19.8-97.3a17.33 17.33 0 0 0-8.2 6.3 70.45 70.45 0 0 1 11-3c31-6.5 75.5 41.5-20.6 91.4zM348 437.4s14.5 11.9-15.9 21.2c-57.9 17.5-240.8 22.8-291.6.7-18.3-7.9 16-19 26.8-21.3 11.2-2.4 17.7-2 17.7-2-20.3-14.3-131.3 28.1-56.4 40.2C232.84 509.4 401 461.3 348 437.4zM124.44 396c-78.7 22 47.9 67.4 148.1 24.5a185.89 185.89 0 0 1-28.2-13.8c-44.7 8.5-65.4 9.1-106 4.5-33.5-3.8-13.9-15.2-13.9-15.2zm179.8 97.2c-78.7 14.8-175.8 13.1-233.3 3.6 0-.1 11.8 9.7 72.4 13.6 92.2 5.9 233.8-3.3 237.1-46.9 0 0-6.4 16.5-76.2 29.7zM260.64 353c-59.2 11.4-93.5 11.1-136.8 6.6-33.5-3.5-11.6-19.7-11.6-19.7-86.8 28.8 48.2 61.4 169.5 25.9a60.37 60.37 0 0 1-21.1-12.8z\"]\n};\nconst faInvision = {\n  prefix: 'fab',\n  iconName: 'invision',\n  icon: [448, 512, [], \"f7b0\", \"M407.4 32H40.6C18.2 32 0 50.2 0 72.6v366.8C0 461.8 18.2 480 40.6 480h366.8c22.4 0 40.6-18.2 40.6-40.6V72.6c0-22.4-18.2-40.6-40.6-40.6zM176.1 145.6c.4 23.4-22.4 27.3-26.6 27.4-14.9 0-27.1-12-27.1-27 .1-35.2 53.1-35.5 53.7-.4zM332.8 377c-65.6 0-34.1-74-25-106.6 14.1-46.4-45.2-59-59.9.7l-25.8 103.3H177l8.1-32.5c-31.5 51.8-94.6 44.4-94.6-4.3.1-14.3.9-14 23-104.1H81.7l9.7-35.6h76.4c-33.6 133.7-32.6 126.9-32.9 138.2 0 20.9 40.9 13.5 57.4-23.2l19.8-79.4h-32.3l9.7-35.6h68.8l-8.9 40.5c40.5-75.5 127.9-47.8 101.8 38-14.2 51.1-14.6 50.7-14.9 58.8 0 15.5 17.5 22.6 31.8-16.9L386 325c-10.5 36.7-29.4 52-53.2 52z\"]\n};\nconst faCreativeCommonsPdAlt = {\n  prefix: 'fab',\n  iconName: 'creative-commons-pd-alt',\n  icon: [496, 512, [], \"f4ed\", \"M247.6 8C104.7 8 0 123.1 0 256c0 138.5 113.6 248 247.6 248C377.5 504 496 403.1 496 256 496 118.1 389.4 8 247.6 8zm.8 450.8c-112.5 0-203.7-93-203.7-202.8 0-105.4 85.5-203.3 203.7-203.3 112.6 0 202.9 89.5 202.8 203.3 0 121.7-99.6 202.8-202.8 202.8zM316.7 186h-53.2v137.2h53.2c21.4 0 70-5.1 70-68.6 0-63.4-48.6-68.6-70-68.6zm.8 108.5h-19.9v-79.7l19.4-.1c3.8 0 35-2.1 35 39.9 0 24.6-10.5 39.9-34.5 39.9zM203.7 186h-68.2v137.3h34.6V279h27c54.1 0 57.1-37.5 57.1-46.5 0-31-16.8-46.5-50.5-46.5zm-4.9 67.3h-29.2v-41.6h28.3c30.9 0 28.8 41.6.9 41.6z\"]\n};\nconst faCentercode = {\n  prefix: 'fab',\n  iconName: 'centercode',\n  icon: [512, 512, [], \"f380\", \"M329.2 268.6c-3.8 35.2-35.4 60.6-70.6 56.8-35.2-3.8-60.6-35.4-56.8-70.6 3.8-35.2 35.4-60.6 70.6-56.8 35.1 3.8 60.6 35.4 56.8 70.6zm-85.8 235.1C96.7 496-8.2 365.5 10.1 224.3c11.2-86.6 65.8-156.9 139.1-192 161-77.1 349.7 37.4 354.7 216.6 4.1 147-118.4 262.2-260.5 254.8zm179.9-180c27.9-118-160.5-205.9-237.2-234.2-57.5 56.3-69.1 188.6-33.8 344.4 68.8 15.8 169.1-26.4 271-110.2z\"]\n};\nconst faGlideG = {\n  prefix: 'fab',\n  iconName: 'glide-g',\n  icon: [448, 512, [], \"f2a6\", \"M407.1 211.2c-3.5-1.4-11.6-3.8-15.4-3.8-37.1 0-62.2 16.8-93.5 34.5l-.9-.9c7-47.3 23.5-91.9 23.5-140.4C320.8 29.1 282.6 0 212.4 0 97.3 0 39 113.7 39 198.4 39 286.3 90.3 335 177.6 335c12 0 11-1 11 3.8-16.9 128.9-90.8 133.1-90.8 94.6 0-39.2 45-58.6 45.5-61-.3-12.2-47-27.6-58.9-27.6-33.9.1-52.4 51.2-52.4 79.3C32 476 64.8 512 117.5 512c77.4 0 134-77.8 151.4-145.4 15.1-60.5 11.2-63.3 19.7-67.6 32.2-16.2 57.5-27 93.8-27 17.8 0 30.5 3.7 58.9 8.4 2.9 0 6.7-2.9 6.7-5.8 0-8-33.4-60.5-40.9-63.4zm-175.3-84.4c-9.3 44.7-18.6 89.6-27.8 134.3-2.3 10.2-13.3 7.8-22 7.8-38.3 0-49-41.8-49-73.1 0-47 18-109.3 61.8-133.4 7-4.1 14.8-6.7 22.6-6.7 18.6 0 20 13.3 20 28.7-.1 14.3-2.7 28.5-5.6 42.4z\"]\n};\nconst faDrupal = {\n  prefix: 'fab',\n  iconName: 'drupal',\n  icon: [448, 512, [], \"f1a9\", \"M303.973,108.136C268.2,72.459,234.187,38.35,224.047,0c-9.957,38.35-44.25,72.459-80.019,108.136C90.467,161.7,29.716,222.356,29.716,313.436c-2.337,107.3,82.752,196.18,190.053,198.517S415.948,429.2,418.285,321.9q.091-4.231,0-8.464C418.285,222.356,357.534,161.7,303.973,108.136Zm-174.326,223a130.282,130.282,0,0,0-15.211,24.153,4.978,4.978,0,0,1-3.319,2.766h-1.659c-4.333,0-9.219-8.481-9.219-8.481h0c-1.29-2.028-2.489-4.149-3.687-6.361l-.83-1.752c-11.247-25.72-1.475-62.318-1.475-62.318h0a160.585,160.585,0,0,1,23.231-49.873A290.8,290.8,0,0,1,138.5,201.613l9.219,9.219,43.512,44.434a4.979,4.979,0,0,1,0,6.638L145.78,312.33h0Zm96.612,127.311a67.2,67.2,0,0,1-49.781-111.915c14.2-16.871,31.528-33.464,50.334-55.313,22.309,23.785,36.875,40.1,51.164,57.986a28.413,28.413,0,0,1,2.95,4.425,65.905,65.905,0,0,1,11.984,37.981,66.651,66.651,0,0,1-66.466,66.836ZM352.371,351.6h0a7.743,7.743,0,0,1-6.176,5.347H344.9a11.249,11.249,0,0,1-6.269-5.07h0a348.21,348.21,0,0,0-39.456-48.952L281.387,284.49,222.3,223.185a497.888,497.888,0,0,1-35.4-36.322,12.033,12.033,0,0,0-.922-1.382,35.4,35.4,0,0,1-4.7-9.219V174.51a31.346,31.346,0,0,1,9.218-27.656c11.432-11.431,22.955-22.954,33.833-34.939,11.984,13.275,24.8,26,37.428,38.627h0a530.991,530.991,0,0,1,69.6,79.1,147.494,147.494,0,0,1,27.011,83.8A134.109,134.109,0,0,1,352.371,351.6Z\"]\n};\nconst faJxl = {\n  prefix: 'fab',\n  iconName: 'jxl',\n  icon: [448, 512, [], \"e67b\", \"M412.2 32H35.8C16 32 0 48 0 67.8V444.2C0 464 16 480 35.8 480H412.2c19.8 0 35.8-16 35.8-35.8V67.8C448 48 432 32 412.2 32zM378.6 333.7c0 40.2-32.6 72.8-72.8 72.8H70.2c0-40.2 32.6-72.8 72.8-72.8H378.6zm0-113.9c0 40.2-32.6 72.8-72.8 72.8H70.2c0-40.2 32.6-72.8 72.8-72.8H378.6zm0-113.9c0 40.2-32.6 72.8-72.8 72.8H70.2c0-40.2 32.6-72.8 72.8-72.8H378.6z\"]\n};\nconst faDartLang = {\n  prefix: 'fab',\n  iconName: 'dart-lang',\n  icon: [512, 512, [], \"e693\", \"M378.6 78.9c-2.8-.1-5.6-.2-8.5-.2l-264.1 0 143.2-72C256.6 2.3 268 0 279.6 0c13.5 0 29.4 9.2 37 16.8l62 62zM107.3 96.5l262.8 0c16 0 25.4 1.4 35.4 9.3L512 212.2 512 421l-79.3 .7L107.3 96.5zM96.5 373l0-262.2L420.3 434.6l.7 77.4-212.2 0-98.1-98.2 0 0C99.4 402.5 96.5 398.5 96.5 373zM78.7 105.3l0 267.7c0 3.3 .1 6.3 .2 9.1l-62-62C6.5 309.3 0 294.3 0 279.6c0-6.8 3.9-17.5 6.7-23.6l72-150.7z\"]\n};\nconst faHireAHelper = {\n  prefix: 'fab',\n  iconName: 'hire-a-helper',\n  icon: [512, 512, [], \"f3b0\", \"M443.1 0H71.9C67.9 37.3 37.4 67.8 0 71.7v371.5c37.4 4.9 66 32.4 71.9 68.8h372.2c3-36.4 32.5-65.8 67.9-69.8V71.7c-36.4-5.9-65-35.3-68.9-71.7zm-37 404.9c-36.3 0-18.8-2-55.1-2-35.8 0-21 2-56.1 2-5.9 0-4.9-8.2 0-9.8 22.8-7.6 22.9-10.2 24.6-12.8 10.4-15.6 5.9-83 5.9-113 0-5.3-6.4-12.8-13.8-12.8H200.4c-7.4 0-13.8 7.5-13.8 12.8 0 30-4.5 97.4 5.9 113 1.7 2.5 1.8 5.2 24.6 12.8 4.9 1.6 6 9.8 0 9.8-35.1 0-20.3-2-56.1-2-36.3 0-18.8 2-55.1 2-7.9 0-5.8-10.8 0-10.8 10.2-3.4 13.5-3.5 21.7-13.8 7.7-12.9 7.9-44.4 7.9-127.8V151.3c0-22.2-12.2-28.3-28.6-32.4-8.8-2.2-4-11.8 1-11.8 36.5 0 20.6 2 57.1 2 32.7 0 16.5-2 49.2-2 3.3 0 8.5 8.3 1 10.8-4.9 1.6-27.6 3.7-27.6 39.3 0 45.6-.2 55.8 1 68.8 0 1.3 2.3 12.8 12.8 12.8h109.2c10.5 0 12.8-11.5 12.8-12.8 1.2-13 1-23.2 1-68.8 0-35.6-22.7-37.7-27.6-39.3-7.5-2.5-2.3-10.8 1-10.8 32.7 0 16.5 2 49.2 2 36.5 0 20.6-2 57.1-2 4.9 0 9.9 9.6 1 11.8-16.4 4.1-28.6 10.3-28.6 32.4v101.2c0 83.4.1 114.9 7.9 127.8 8.2 10.2 11.4 10.4 21.7 13.8 5.8 0 7.8 10.8 0 10.8z\"]\n};\nconst faCreativeCommonsBy = {\n  prefix: 'fab',\n  iconName: 'creative-commons-by',\n  icon: [496, 512, [], \"f4e7\", \"M314.9 194.4v101.4h-28.3v120.5h-77.1V295.9h-28.3V194.4c0-4.4 1.6-8.2 4.6-11.3 3.1-3.1 6.9-4.7 11.3-4.7H299c4.1 0 7.8 1.6 11.1 4.7 3.1 3.2 4.8 6.9 4.8 11.3zm-101.5-63.7c0-23.3 11.5-35 34.5-35s34.5 11.7 34.5 35c0 23-11.5 34.5-34.5 34.5s-34.5-11.5-34.5-34.5zM247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3z\"]\n};\nconst faUnity = {\n  prefix: 'fab',\n  iconName: 'unity',\n  icon: [448, 512, [], \"e049\", \"M243.583 91.6027L323.695 138.384C326.575 140.026 326.68 144.583 323.695 146.225L228.503 201.854C225.623 203.55 222.22 203.444 219.549 201.854L124.357 146.225C121.425 144.636 121.373 139.973 124.357 138.384L204.417 91.6027V0L0 119.417V358.252L78.3843 312.477V218.914C78.3319 215.576 82.2066 213.192 85.0865 214.993L180.279 270.622C183.159 272.318 184.782 275.338 184.782 278.464V389.669C184.834 393.007 180.959 395.391 178.079 393.589L97.9673 346.808L19.583 392.583L224 512L428.417 392.583L350.033 346.808L269.921 393.589C267.093 395.338 263.114 393.06 263.218 389.669V278.464C263.218 275.126 265.051 272.159 267.721 270.622L362.914 214.993C365.741 213.245 369.72 215.47 369.616 218.914V312.477L448 358.252V119.417L243.583 0V91.6027Z\"]\n};\nconst faWhmcs = {\n  prefix: 'fab',\n  iconName: 'whmcs',\n  icon: [448, 512, [], \"f40d\", \"M448 161v-21.3l-28.5-8.8-2.2-10.4 20.1-20.7L427 80.4l-29 7.5-7.2-7.5 7.5-28.2-19.1-11.6-21.3 21-10.7-3.2-7-26.4h-22.6l-6.2 26.4-12.1 3.2-19.7-21-19.4 11 8.1 27.7-8.1 8.4-28.5-7.5-11 19.1 20.7 21-2.9 10.4-28.5 7.8-.3 21.7 28.8 7.5 2.4 12.1-20.1 19.9 10.4 18.5 29.6-7.5 7.2 8.6-8.1 26.9 19.9 11.6 19.4-20.4 11.6 2.9 6.7 28.5 22.6.3 6.7-28.8 11.6-3.5 20.7 21.6 20.4-12.1-8.8-28 7.8-8.1 28.8 8.8 10.3-20.1-20.9-18.8 2.2-12.1 29.1-7zm-119.2 45.2c-31.3 0-56.8-25.4-56.8-56.8s25.4-56.8 56.8-56.8 56.8 25.4 56.8 56.8c0 31.5-25.4 56.8-56.8 56.8zm72.3 16.4l46.9 14.5V277l-55.1 13.4-4.1 22.7 38.9 35.3-19.2 37.9-54-16.7-14.6 15.2 16.7 52.5-38.3 22.7-38.9-40.5-21.7 6.6-12.6 54-42.4-.5-12.6-53.6-21.7-5.6-36.4 38.4-37.4-21.7 15.2-50.5-13.7-16.1-55.5 14.1-19.7-34.8 37.9-37.4-4.8-22.8-54-14.1.5-40.9L54 219.9l5.7-19.7-38.9-39.4L41.5 125l53.6 14.1 15.2-15.7-15.2-52 36.4-20.7 36.8 39.4L191 84l11.6-52H245l11.6 45.9L234 72l-6.3-1.7-3.3 5.7-11 19.1-3.3 5.6 4.6 4.6 17.2 17.4-.3 1-23.8 6.5-6.2 1.7-.1 6.4-.2 12.9C153.8 161.6 118 204 118 254.7c0 58.3 47.3 105.7 105.7 105.7 50.5 0 92.7-35.4 103.2-82.8l13.2.2 6.9.1 1.6-6.7 5.6-24 1.9-.6 17.1 17.8 4.7 4.9 5.8-3.4 20.4-12.1 5.8-3.5-2-6.5-6.8-21.2z\"]\n};\nconst faRocketchat = {\n  prefix: 'fab',\n  iconName: 'rocketchat',\n  icon: [576, 512, [], \"f3e8\", \"M284.046,224.8a34.114,34.114,0,1,0,34.317,34.113A34.217,34.217,0,0,0,284.046,224.8Zm-110.45,0a34.114,34.114,0,1,0,34.317,34.113A34.217,34.217,0,0,0,173.6,224.8Zm220.923,0a34.114,34.114,0,1,0,34.317,34.113A34.215,34.215,0,0,0,394.519,224.8Zm153.807-55.319c-15.535-24.172-37.31-45.57-64.681-63.618-52.886-34.817-122.374-54-195.666-54a405.975,405.975,0,0,0-72.032,6.357,238.524,238.524,0,0,0-49.51-36.588C99.684-11.7,40.859.711,11.135,11.421A14.291,14.291,0,0,0,5.58,34.782C26.542,56.458,61.222,99.3,52.7,138.252c-33.142,33.9-51.112,74.776-51.112,117.337,0,43.372,17.97,84.248,51.112,118.148,8.526,38.956-26.154,81.816-47.116,103.491a14.284,14.284,0,0,0,5.555,23.34c29.724,10.709,88.549,23.147,155.324-10.2a238.679,238.679,0,0,0,49.51-36.589A405.972,405.972,0,0,0,288,460.14c73.313,0,142.8-19.159,195.667-53.975,27.371-18.049,49.145-39.426,64.679-63.619,17.309-26.923,26.07-55.916,26.07-86.125C574.394,225.4,565.634,196.43,548.326,169.485ZM284.987,409.9a345.65,345.65,0,0,1-89.446-11.5l-20.129,19.393a184.366,184.366,0,0,1-37.138,27.585,145.767,145.767,0,0,1-52.522,14.87c.983-1.771,1.881-3.563,2.842-5.356q30.258-55.68,16.325-100.078c-32.992-25.962-52.778-59.2-52.778-95.4,0-83.1,104.254-150.469,232.846-150.469s232.867,67.373,232.867,150.469C517.854,342.525,413.6,409.9,284.987,409.9Z\"]\n};\nconst faVk = {\n  prefix: 'fab',\n  iconName: 'vk',\n  icon: [448, 512, [], \"f189\", \"M31.4907 63.4907C0 94.9813 0 145.671 0 247.04V264.96C0 366.329 0 417.019 31.4907 448.509C62.9813 480 113.671 480 215.04 480H232.96C334.329 480 385.019 480 416.509 448.509C448 417.019 448 366.329 448 264.96V247.04C448 145.671 448 94.9813 416.509 63.4907C385.019 32 334.329 32 232.96 32H215.04C113.671 32 62.9813 32 31.4907 63.4907ZM75.6 168.267H126.747C128.427 253.76 166.133 289.973 196 297.44V168.267H244.16V242C273.653 238.827 304.64 205.227 315.093 168.267H363.253C359.313 187.435 351.46 205.583 340.186 221.579C328.913 237.574 314.461 251.071 297.733 261.227C316.41 270.499 332.907 283.63 346.132 299.751C359.357 315.873 369.01 334.618 374.453 354.747H321.44C316.555 337.262 306.614 321.61 292.865 309.754C279.117 297.899 262.173 290.368 244.16 288.107V354.747H238.373C136.267 354.747 78.0267 284.747 75.6 168.267Z\"]\n};\nconst faUntappd = {\n  prefix: 'fab',\n  iconName: 'untappd',\n  icon: [640, 512, [], \"f405\", \"M401.3 49.9c-79.8 160.1-84.6 152.5-87.9 173.2l-5.2 32.8c-1.9 12-6.6 23.5-13.7 33.4L145.6 497.1c-7.6 10.6-20.4 16.2-33.4 14.6-40.3-5-77.8-32.2-95.3-68.5-5.7-11.8-4.5-25.8 3.1-36.4l148.9-207.9c7.1-9.9 16.4-18 27.2-23.7l29.3-15.5c18.5-9.8 9.7-11.9 135.6-138.9 1-4.8 1-7.3 3.6-8 3-.7 6.6-1 6.3-4.6l-.4-4.6c-.2-1.9 1.3-3.6 3.2-3.6 4.5-.1 13.2 1.2 25.6 10 12.3 8.9 16.4 16.8 17.7 21.1.6 1.8-.6 3.7-2.4 4.2l-4.5 1.1c-3.4.9-2.5 4.4-2.3 7.4.1 2.8-2.3 3.6-6.5 6.1zM230.1 36.4c3.4.9 2.5 4.4 2.3 7.4-.2 2.7 2.1 3.5 6.4 6 7.9 15.9 15.3 30.5 22.2 44 .7 1.3 2.3 1.5 3.3.5 11.2-12 24.6-26.2 40.5-42.6 1.3-1.4 1.4-3.5.1-4.9-8-8.2-16.5-16.9-25.6-26.1-1-4.7-1-7.3-3.6-8-3-.8-6.6-1-6.3-4.6.3-3.3 1.4-8.1-2.8-8.2-4.5-.1-13.2 1.1-25.6 10-12.3 8.9-16.4 16.8-17.7 21.1-1.4 4.2 3.6 4.6 6.8 5.4zM620 406.7L471.2 198.8c-13.2-18.5-26.6-23.4-56.4-39.1-11.2-5.9-14.2-10.9-30.5-28.9-1-1.1-2.9-.9-3.6.5-46.3 88.8-47.1 82.8-49 94.8-1.7 10.7-1.3 20 .3 29.8 1.9 12 6.6 23.5 13.7 33.4l148.9 207.9c7.6 10.6 20.2 16.2 33.1 14.7 40.3-4.9 78-32 95.7-68.6 5.4-11.9 4.3-25.9-3.4-36.6z\"]\n};\nconst faMailchimp = {\n  prefix: 'fab',\n  iconName: 'mailchimp',\n  icon: [448, 512, [], \"f59e\", \"M330.61 243.52a36.15 36.15 0 0 1 9.3 0c1.66-3.83 1.95-10.43.45-17.61-2.23-10.67-5.25-17.14-11.48-16.13s-6.47 8.74-4.24 19.42c1.26 6 3.49 11.14 6 14.32zM277.05 252c4.47 2 7.2 3.26 8.28 2.13 1.89-1.94-3.48-9.39-12.12-13.09a31.44 31.44 0 0 0-30.61 3.68c-3 2.18-5.81 5.22-5.41 7.06.85 3.74 10-2.71 22.6-3.48 7-.44 12.8 1.75 17.26 3.71zm-9 5.13c-9.07 1.42-15 6.53-13.47 10.1.9.34 1.17.81 5.21-.81a37 37 0 0 1 18.72-1.95c2.92.34 4.31.52 4.94-.49 1.46-2.22-5.71-8-15.39-6.85zm54.17 17.1c3.38-6.87-10.9-13.93-14.3-7s10.92 13.88 14.32 6.97zm15.66-20.47c-7.66-.13-7.95 15.8-.26 15.93s7.98-15.81.28-15.96zm-218.79 78.9c-1.32.31-6 1.45-8.47-2.35-5.2-8 11.11-20.38 3-35.77-9.1-17.47-27.82-13.54-35.05-5.54-8.71 9.6-8.72 23.54-5 24.08 4.27.57 4.08-6.47 7.38-11.63a12.83 12.83 0 0 1 17.85-3.72c11.59 7.59 1.37 17.76 2.28 28.62 1.39 16.68 18.42 16.37 21.58 9a2.08 2.08 0 0 0-.2-2.33c.03.89.68-1.3-3.35-.39zm299.72-17.07c-3.35-11.73-2.57-9.22-6.78-20.52 2.45-3.67 15.29-24-3.07-43.25-10.4-10.92-33.9-16.54-41.1-18.54-1.5-11.39 4.65-58.7-21.52-83 20.79-21.55 33.76-45.29 33.73-65.65-.06-39.16-48.15-51-107.42-26.47l-12.55 5.33c-.06-.05-22.71-22.27-23.05-22.57C169.5-18-41.77 216.81 25.78 273.85l14.76 12.51a72.49 72.49 0 0 0-4.1 33.5c3.36 33.4 36 60.42 67.53 60.38 57.73 133.06 267.9 133.28 322.29 3 1.74-4.47 9.11-24.61 9.11-42.38s-10.09-25.27-16.53-25.27zm-316 48.16c-22.82-.61-47.46-21.15-49.91-45.51-6.17-61.31 74.26-75.27 84-12.33 4.54 29.64-4.67 58.49-34.12 57.81zM84.3 249.55C69.14 252.5 55.78 261.09 47.6 273c-4.88-4.07-14-12-15.59-15-13.01-24.85 14.24-73 33.3-100.21C112.42 90.56 186.19 39.68 220.36 48.91c5.55 1.57 23.94 22.89 23.94 22.89s-34.15 18.94-65.8 45.35c-42.66 32.85-74.89 80.59-94.2 132.4zM323.18 350.7s-35.74 5.3-69.51-7.07c6.21-20.16 27 6.1 96.4-13.81 15.29-4.38 35.37-13 51-25.35a102.85 102.85 0 0 1 7.12 24.28c3.66-.66 14.25-.52 11.44 18.1-3.29 19.87-11.73 36-25.93 50.84A106.86 106.86 0 0 1 362.55 421a132.45 132.45 0 0 1-20.34 8.58c-53.51 17.48-108.3-1.74-126-43a66.33 66.33 0 0 1-3.55-9.74c-7.53-27.2-1.14-59.83 18.84-80.37 1.23-1.31 2.48-2.85 2.48-4.79a8.45 8.45 0 0 0-1.92-4.54c-7-10.13-31.19-27.4-26.33-60.83 3.5-24 24.49-40.91 44.07-39.91l5 .29c8.48.5 15.89 1.59 22.88 1.88 11.69.5 22.2-1.19 34.64-11.56 4.2-3.5 7.57-6.54 13.26-7.51a17.45 17.45 0 0 1 13.6 2.24c10 6.64 11.4 22.73 11.92 34.49.29 6.72 1.1 23 1.38 27.63.63 10.67 3.43 12.17 9.11 14 3.19 1.05 6.15 1.83 10.51 3.06 13.21 3.71 21 7.48 26 12.31a16.38 16.38 0 0 1 4.74 9.29c1.56 11.37-8.82 25.4-36.31 38.16-46.71 21.68-93.68 14.45-100.48 13.68-20.15-2.71-31.63 23.32-19.55 41.15 22.64 33.41 122.4 20 151.37-21.35.69-1 .12-1.59-.73-1-41.77 28.58-97.06 38.21-128.46 26-4.77-1.85-14.73-6.44-15.94-16.67 43.6 13.49 71 .74 71 .74s2.03-2.79-.56-2.53zm-68.47-5.7zm-83.4-187.5c16.74-19.35 37.36-36.18 55.83-45.63a.73.73 0 0 1 1 1c-1.46 2.66-4.29 8.34-5.19 12.65a.75.75 0 0 0 1.16.79c11.49-7.83 31.48-16.22 49-17.3a.77.77 0 0 1 .52 1.38 41.86 41.86 0 0 0-7.71 7.74.75.75 0 0 0 .59 1.19c12.31.09 29.66 4.4 41 10.74.76.43.22 1.91-.64 1.72-69.55-15.94-123.08 18.53-134.5 26.83a.76.76 0 0 1-1-1.12z\"]\n};\nconst faCss3Alt = {\n  prefix: 'fab',\n  iconName: 'css3-alt',\n  icon: [384, 512, [], \"f38b\", \"M0 32l34.9 395.8L192 480l157.1-52.2L384 32H0zm313.1 80l-4.8 47.3L193 208.6l-.3.1h111.5l-12.8 146.6-98.2 28.7-98.8-29.2-6.4-73.9h48.9l3.2 38.3 52.6 13.3 54.7-15.4 3.7-61.6-166.3-.5v-.1l-.2.1-3.6-46.3L193.1 162l6.5-2.7H76.7L70.9 112h242.2z\"]\n};\nconst faSquareReddit = {\n  prefix: 'fab',\n  iconName: 'square-reddit',\n  icon: [448, 512, [\"reddit-square\"], \"f1a2\", \"M64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32zM305.9 166.4c20.6 0 37.3-16.7 37.3-37.3s-16.7-37.3-37.3-37.3c-18 0-33.1 12.8-36.6 29.8c-30.2 3.2-53.8 28.8-53.8 59.9l0 .2c-32.8 1.4-62.8 10.7-86.6 25.5c-8.8-6.8-19.9-10.9-32-10.9c-28.9 0-52.3 23.4-52.3 52.3c0 21 12.3 39 30.1 47.4c1.7 60.7 67.9 109.6 149.3 109.6s147.6-48.9 149.3-109.7c17.7-8.4 29.9-26.4 29.9-47.3c0-28.9-23.4-52.3-52.3-52.3c-12 0-23 4-31.9 10.8c-24-14.9-54.3-24.2-87.5-25.4l0-.1c0-22.2 16.5-40.7 37.9-43.7l0 0c3.9 16.5 18.7 28.7 36.3 28.7zM155 248.1c14.6 0 25.8 15.4 25 34.4s-11.8 25.9-26.5 25.9s-27.5-7.7-26.6-26.7s13.5-33.5 28.1-33.5zm166.4 33.5c.9 19-12 26.7-26.6 26.7s-25.6-6.9-26.5-25.9c-.9-19 10.3-34.4 25-34.4s27.3 14.6 28.1 33.5zm-42.1 49.6c-9 21.5-30.3 36.7-55.1 36.7s-46.1-15.1-55.1-36.7c-1.1-2.6 .7-5.4 3.4-5.7c16.1-1.6 33.5-2.5 51.7-2.5s35.6 .9 51.7 2.5c2.7 .3 4.5 3.1 3.4 5.7z\"]\n};\nconst faRedditSquare = faSquareReddit;\nconst faVimeoV = {\n  prefix: 'fab',\n  iconName: 'vimeo-v',\n  icon: [448, 512, [], \"f27d\", \"M447.8 153.6c-2 43.6-32.4 103.3-91.4 179.1-60.9 79.2-112.4 118.8-154.6 118.8-26.1 0-48.2-24.1-66.3-72.3C100.3 250 85.3 174.3 56.2 174.3c-3.4 0-15.1 7.1-35.2 21.1L0 168.2c51.6-45.3 100.9-95.7 131.8-98.5 34.9-3.4 56.3 20.5 64.4 71.5 28.7 181.5 41.4 208.9 93.6 126.7 18.7-29.6 28.8-52.1 30.2-67.6 4.8-45.9-35.8-42.8-63.3-31 22-72.1 64.1-107.1 126.2-105.1 45.8 1.2 67.5 31.1 64.9 89.4z\"]\n};\nconst faContao = {\n  prefix: 'fab',\n  iconName: 'contao',\n  icon: [512, 512, [], \"f26d\", \"M45.4 305c14.4 67.1 26.4 129 68.2 175H34c-18.7 0-34-15.2-34-34V66c0-18.7 15.2-34 34-34h57.7C77.9 44.6 65.6 59.2 54.8 75.6c-45.4 70-27 146.8-9.4 229.4zM478 32h-90.2c21.4 21.4 39.2 49.5 52.7 84.1l-137.1 29.3c-14.9-29-37.8-53.3-82.6-43.9-24.6 5.3-41 19.3-48.3 34.6-8.8 18.7-13.2 39.8 8.2 140.3 21.1 100.2 33.7 117.7 49.5 131.2 12.9 11.1 33.4 17 58.3 11.7 44.5-9.4 55.7-40.7 57.4-73.2l137.4-29.6c3.2 71.5-18.7 125.2-57.4 163.6H478c18.7 0 34-15.2 34-34V66c0-18.8-15.2-34-34-34z\"]\n};\nconst faSquareFontAwesome = {\n  prefix: 'fab',\n  iconName: 'square-font-awesome',\n  icon: [448, 512, [], \"e5ad\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm90 122c0 9.3-4.8 17.4-12.1 22l188.9 0c7.3 0 13.2 5.9 13.2 13.2c0 1.8-.4 3.7-1.1 5.4L312 264l30.9 69.4c.7 1.7 1.1 3.5 1.1 5.4c0 7.3-5.9 13.2-13.2 13.2L144 352l0 32-32 0 0-32 0-176 0-1.5c-6.1-4.8-10-12.2-10-20.5c0-14.4 11.6-26 26-26s26 11.6 26 26z\"]\n};\nconst faDeskpro = {\n  prefix: 'fab',\n  iconName: 'deskpro',\n  icon: [480, 512, [], \"f38f\", \"M205.9 512l31.1-38.4c12.3-.2 25.6-1.4 36.5-6.6 38.9-18.6 38.4-61.9 38.3-63.8-.1-5-.8-4.4-28.9-37.4H362c-.2 50.1-7.3 68.5-10.2 75.7-9.4 23.7-43.9 62.8-95.2 69.4-8.7 1.1-32.8 1.2-50.7 1.1zm200.4-167.7c38.6 0 58.5-13.6 73.7-30.9l-175.5-.3-17.4 31.3 119.2-.1zm-43.6-223.9v168.3h-73.5l-32.7 55.5H250c-52.3 0-58.1-56.5-58.3-58.9-1.2-13.2-21.3-11.6-20.1 1.8 1.4 15.8 8.8 40 26.4 57.1h-91c-25.5 0-110.8-26.8-107-114V16.9C0 .9 9.7.3 15 .1h82c.2 0 .3.1.5.1 4.3-.4 50.1-2.1 50.1 43.7 0 13.3 20.2 13.4 20.2 0 0-18.2-5.5-32.8-15.8-43.7h84.2c108.7-.4 126.5 79.4 126.5 120.2zm-132.5 56l64 29.3c13.3-45.5-42.2-71.7-64-29.3z\"]\n};\nconst faBrave = {\n  prefix: 'fab',\n  iconName: 'brave',\n  icon: [448, 512, [], \"e63c\", \"M145.5 0H224h78.5l44.7 50.8s39.3-10.9 57.8 7.6s33.8 34.9 33.8 34.9l-12 29.5 15.3 43.7s-44.9 170.2-50.1 191c-10.4 40.9-17.4 56.8-46.9 77.5s-82.9 56.8-91.6 62.2c-1.9 1.2-3.9 2.5-5.9 3.9c-7.5 5.1-15.8 10.8-23.5 10.8l0 0 0 0c-7.7 0-16.1-5.7-23.5-10.8c-2-1.4-4-2.8-5.9-3.9c-8.7-5.5-62.1-41.5-91.6-62.2s-36.5-36.6-46.9-77.5c-5.3-20.8-50.1-191-50.1-191l15.3-43.7L9.2 93.3s15.3-16.4 33.8-34.9s57.8-7.6 57.8-7.6L145.5 0zM224 407.6l0 0c3.7 0 8.9-4.7 13-8.4c.6-.5 1.2-1.1 1.7-1.5c4.2-3.7 47.8-37.5 51-39.8s5.4-6.5 1.9-8.7c-2.8-1.7-10-5.5-20.3-10.8c-3-1.6-6.3-3.2-9.7-5c-15.4-8-34.5-14.7-37.5-14.7l0 0 0 0c-3 0-22.1 6.8-37.5 14.7c-3.5 1.8-6.7 3.5-9.7 5c-10.3 5.3-17.6 9.1-20.3 10.8c-3.6 2.2-1.4 6.4 1.9 8.7s46.8 36.1 51 39.8c.5 .5 1.1 1 1.7 1.5c4.1 3.7 9.3 8.4 13 8.4l0 0zm0-165.7l0 0c4.7 0 17.6-3 26.4-5l0 0 2-.5c7.8-1.8 7.3-6.3 6.4-13c-.1-.8-.2-1.6-.3-2.4c-.6-6.1-5.8-33.1-9.1-50.3c-1.1-5.8-2-10.5-2.4-12.9c-1.5-8.1-.6-9.4 .7-11.3c.2-.3 .5-.7 .7-1.1c1.4-2.3 16-6.2 27.9-9.5l0 0c2.5-.7 4.8-1.3 6.9-1.9c10.6-3 32.4-.6 44.2 .6c1.8 .2 3.4 .4 4.7 .5c9.6 .9 10.4 2.3 7.2 3.8c-2.3 1.1-16.2 6.3-28.7 10.9l0 0 0 0c-4.7 1.8-9.2 3.5-12.8 4.8c-1.5 .5-3 1.1-4.5 1.7c-12.5 4.6-27.2 10-28.9 19.4c-1.5 8.3 5.2 19.9 11.3 30.3l0 0c1.6 2.8 3.2 5.5 4.6 8.1c6.3 11.9 6.5 13.3 6.1 18.1c-.4 3.9-14.5 12.7-22.4 17.6l0 0c-1.8 1.1-3.3 2.1-4.2 2.7c-.8 .5-2.1 1.4-3.8 2.4c-8.6 5.2-26.3 16-26.3 22.5c0 7.8 24.6 28.1 32.4 33.2s28.9 16.1 37.9 17.8s23-8.5 31.2-23.8c7.7-14.4 1.7-28.5-3.2-40l-.9-2.2c-4.5-10.6 1.9-17 6.2-21.3l0 0c.5-.5 1-1 1.4-1.4L377.7 194c1.3-1.3 2.5-2.6 3.7-3.8l0 0c5.8-5.7 10.8-10.5 10.8-22.8c0-14.9-57.5-84.5-57.5-84.5s-48.5 9.3-55.1 9.3c-5.2 0-15.3-3.5-25.8-7.1l0 0c-2.7-.9-5.4-1.9-8-2.7C232.8 78.1 224 78 224 78l0 0 0 0s-8.7 0-21.8 4.4c-2.7 .9-5.4 1.8-8 2.7l0 0c-10.5 3.6-20.6 7.1-25.8 7.1c-6.5 0-55.1-9.3-55.1-9.3s-57.5 69.6-57.5 84.5c0 12.3 4.9 17.1 10.8 22.8l0 0c1.2 1.2 2.5 2.4 3.7 3.8l43.1 45.8c.4 .5 .9 .9 1.4 1.4l0 0c4.3 4.3 10.6 10.7 6.2 21.3l-.9 2.2c-4.9 11.5-11 25.6-3.2 40c8.2 15.3 22.2 25.5 31.2 23.8s30.1-12.7 37.9-17.8s32.4-25.4 32.4-33.2c0-6.5-17.7-17.3-26.3-22.5c-1.7-1-3.1-1.9-3.8-2.4c-.9-.6-2.4-1.5-4.2-2.7c-7.9-4.9-22-13.7-22.4-17.6c-.4-4.8-.3-6.2 6.1-18.1c1.3-2.5 2.9-5.3 4.6-8.1c6-10.4 12.8-22 11.3-30.3c-1.7-9.4-16.4-14.8-28.9-19.4c-1.6-.6-3.1-1.1-4.5-1.7c-3.6-1.4-8.1-3.1-12.8-4.8l-.1 0c-12.5-4.7-26.4-9.9-28.7-10.9c-3.2-1.5-2.3-2.8 7.2-3.8c1.3-.1 2.9-.3 4.7-.5c11.8-1.3 33.6-3.6 44.2-.6c2.1 .6 4.4 1.2 6.9 1.9c11.9 3.2 26.5 7.2 27.9 9.5c.2 .4 .5 .7 .7 1.1c1.3 1.9 2.2 3.2 .7 11.3c-.4 2.4-1.3 7.1-2.4 12.9c-3.3 17.2-8.5 44.2-9.1 50.3c-.1 .8-.2 1.7-.3 2.4c-.8 6.7-1.4 11.2 6.4 13l2 .5 0 0c8.8 2 21.8 5 26.4 5l0 0z\"]\n};\nconst faSistrix = {\n  prefix: 'fab',\n  iconName: 'sistrix',\n  icon: [448, 512, [], \"f3ee\", \"M448 449L301.2 300.2c20-27.9 31.9-62.2 31.9-99.2 0-93.1-74.7-168.9-166.5-168.9C74.7 32 0 107.8 0 200.9s74.7 168.9 166.5 168.9c39.8 0 76.3-14.2 105-37.9l146 148.1 30.5-31zM166.5 330.8c-70.6 0-128.1-58.3-128.1-129.9S95.9 71 166.5 71s128.1 58.3 128.1 129.9-57.4 129.9-128.1 129.9z\"]\n};\nconst faSquareInstagram = {\n  prefix: 'fab',\n  iconName: 'square-instagram',\n  icon: [448, 512, [\"instagram-square\"], \"e055\", \"M194.4 211.7a53.3 53.3 0 1 0 59.3 88.7 53.3 53.3 0 1 0 -59.3-88.7zm142.3-68.4c-5.2-5.2-11.5-9.3-18.4-12c-18.1-7.1-57.6-6.8-83.1-6.5c-4.1 0-7.9 .1-11.2 .1c-3.3 0-7.2 0-11.4-.1c-25.5-.3-64.8-.7-82.9 6.5c-6.9 2.7-13.1 6.8-18.4 12s-9.3 11.5-12 18.4c-7.1 18.1-6.7 57.7-6.5 83.2c0 4.1 .1 7.9 .1 11.1s0 7-.1 11.1c-.2 25.5-.6 65.1 6.5 83.2c2.7 6.9 6.8 13.1 12 18.4s11.5 9.3 18.4 12c18.1 7.1 57.6 6.8 83.1 6.5c4.1 0 7.9-.1 11.2-.1c3.3 0 7.2 0 11.4 .1c25.5 .3 64.8 .7 82.9-6.5c6.9-2.7 13.1-6.8 18.4-12s9.3-11.5 12-18.4c7.2-18 6.8-57.4 6.5-83c0-4.2-.1-8.1-.1-11.4s0-7.1 .1-11.4c.3-25.5 .7-64.9-6.5-83l0 0c-2.7-6.9-6.8-13.1-12-18.4zm-67.1 44.5A82 82 0 1 1 178.4 324.2a82 82 0 1 1 91.1-136.4zm29.2-1.3c-3.1-2.1-5.6-5.1-7.1-8.6s-1.8-7.3-1.1-11.1s2.6-7.1 5.2-9.8s6.1-4.5 9.8-5.2s7.6-.4 11.1 1.1s6.5 3.9 8.6 7s3.2 6.8 3.2 10.6c0 2.5-.5 5-1.4 7.3s-2.4 4.4-4.1 6.2s-3.9 3.2-6.2 4.2s-4.8 1.5-7.3 1.5l0 0c-3.8 0-7.5-1.1-10.6-3.2zM448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM357 389c-18.7 18.7-41.4 24.6-67 25.9c-26.4 1.5-105.6 1.5-132 0c-25.6-1.3-48.3-7.2-67-25.9s-24.6-41.4-25.8-67c-1.5-26.4-1.5-105.6 0-132c1.3-25.6 7.1-48.3 25.8-67s41.5-24.6 67-25.8c26.4-1.5 105.6-1.5 132 0c25.6 1.3 48.3 7.1 67 25.8s24.6 41.4 25.8 67c1.5 26.3 1.5 105.4 0 131.9c-1.3 25.6-7.1 48.3-25.8 67z\"]\n};\nconst faInstagramSquare = faSquareInstagram;\nconst faBattleNet = {\n  prefix: 'fab',\n  iconName: 'battle-net',\n  icon: [512, 512, [], \"f835\", \"M448.61 225.62c26.87.18 35.57-7.43 38.92-12.37 12.47-16.32-7.06-47.6-52.85-71.33 17.76-33.58 30.11-63.68 36.34-85.3 3.38-11.83 1.09-19 .45-20.25-1.72 10.52-15.85 48.46-48.2 100.05-25-11.22-56.52-20.1-93.77-23.8-8.94-16.94-34.88-63.86-60.48-88.93C252.18 7.14 238.7 1.07 228.18.22h-.05c-13.83-1.55-22.67 5.85-27.4 11-17.2 18.53-24.33 48.87-25 84.07-7.24-12.35-17.17-24.63-28.5-25.93h-.18c-20.66-3.48-38.39 29.22-36 81.29-38.36 1.38-71 5.75-93 11.23-9.9 2.45-16.22 7.27-17.76 9.72 1-.38 22.4-9.22 111.56-9.22 5.22 53 29.75 101.82 26 93.19-9.73 15.4-38.24 62.36-47.31 97.7-5.87 22.88-4.37 37.61.15 47.14 5.57 12.75 16.41 16.72 23.2 18.26 25 5.71 55.38-3.63 86.7-21.14-7.53 12.84-13.9 28.51-9.06 39.34 7.31 19.65 44.49 18.66 88.44-9.45 20.18 32.18 40.07 57.94 55.7 74.12a39.79 39.79 0 0 0 8.75 7.09c5.14 3.21 8.58 3.37 8.58 3.37-8.24-6.75-34-38-62.54-91.78 22.22-16 45.65-38.87 67.47-69.27 122.82 4.6 143.29-24.76 148-31.64 14.67-19.88 3.43-57.44-57.32-93.69zm-77.85 106.22c23.81-37.71 30.34-67.77 29.45-92.33 27.86 17.57 47.18 37.58 49.06 58.83 1.14 12.93-8.1 29.12-78.51 33.5zM216.9 387.69c9.76-6.23 19.53-13.12 29.2-20.49 6.68 13.33 13.6 26.1 20.6 38.19-40.6 21.86-68.84 12.76-49.8-17.7zm215-171.35c-10.29-5.34-21.16-10.34-32.38-15.05a722.459 722.459 0 0 0 22.74-36.9c39.06 24.1 45.9 53.18 9.64 51.95zM279.18 398c-5.51-11.35-11-23.5-16.5-36.44 43.25 1.27 62.42-18.73 63.28-20.41 0 .07-25 15.64-62.53 12.25a718.78 718.78 0 0 0 85.06-84q13.06-15.31 24.93-31.11c-.36-.29-1.54-3-16.51-12-51.7 60.27-102.34 98-132.75 115.92-20.59-11.18-40.84-31.78-55.71-61.49-20-39.92-30-82.39-31.57-116.07 12.3.91 25.27 2.17 38.85 3.88-22.29 36.8-14.39 63-13.47 64.23 0-.07-.95-29.17 20.14-59.57a695.23 695.23 0 0 0 44.67 152.84c.93-.38 1.84.88 18.67-8.25-26.33-74.47-33.76-138.17-34-173.43 20-12.42 48.18-19.8 81.63-17.81 44.57 2.67 86.36 15.25 116.32 30.71q-10.69 15.66-23.33 32.47C365.63 152 339.1 145.84 337.5 146c.11 0 25.9 14.07 41.52 47.22a717.63 717.63 0 0 0-115.34-31.71 646.608 646.608 0 0 0-39.39-6.05c-.07.45-1.81 1.85-2.16 20.33C300 190.28 358.78 215.68 389.36 233c.74 23.55-6.95 51.61-25.41 79.57-24.6 37.31-56.39 67.23-84.77 85.43zm27.4-287c-44.56-1.66-73.58 7.43-94.69 20.67 2-52.3 21.31-76.38 38.21-75.28C267 52.15 305 108.55 306.58 111zm-130.65 3.1c.48 12.11 1.59 24.62 3.21 37.28-14.55-.85-28.74-1.25-42.4-1.26-.08 3.24-.12-51 24.67-49.59h.09c5.76 1.09 10.63 6.88 14.43 13.57zm-28.06 162c20.76 39.7 43.3 60.57 65.25 72.31-46.79 24.76-77.53 20-84.92 4.51-.2-.21-11.13-15.3 19.67-76.81zm210.06 74.8\"]\n};\nconst faTheRedYeti = {\n  prefix: 'fab',\n  iconName: 'the-red-yeti',\n  icon: [512, 512, [], \"f69d\", \"M488.23 241.7l20.7 7.1c-9.6-23.9-23.9-37-31.7-44.8l7.1-18.2c.2 0 12.3-27.8-2.5-30.7-.6-11.3-6.6-27-18.4-27-7.6-10.6-17.7-12.3-30.7-5.9a122.2 122.2 0 0 0-25.3 16.5c-5.3-6.4-3 .4-3-29.8-37.1-24.3-45.4-11.7-74.8 3l.5.5a239.36 239.36 0 0 0-68.4-13.3c-5.5-8.7-18.6-19.1-25.1-25.1l24.8 7.1c-5.5-5.5-26.8-12.9-34.2-15.2 18.2-4.1 29.8-20.8 42.5-33-34.9-10.1-67.9-5.9-97.9 11.8l12-44.2L182 0c-31.6 24.2-33 41.9-33.7 45.5-.9-2.4-6.3-19.6-15.2-27a35.12 35.12 0 0 0-.5 25.3c3 8.4 5.9 14.8 8.4 18.9-16-3.3-28.3-4.9-49.2 0h-3.7l33 14.3a194.26 194.26 0 0 0-46.7 67.4l-1.7 8.4 1.7 1.7 7.6-4.7c-3.3 11.6-5.3 19.4-6.6 25.8a200.18 200.18 0 0 0-27.8 40.3c-15 1-31.8 10.8-40.3 14.3l3 3.4 28.8 1c-.5 1-.7 2.2-1.2 3.2-7.3 6.4-39.8 37.7-33 80.7l20.2-22.4c.5 1.7.7 3.4 1.2 5.2 0 25.5.4 89.6 64.9 150.5 43.6 40 96 60.2 157.5 60.2 121.7 0 223-87.3 223-211.5 6.8-9.7-1.2 3 16.7-25.1l13 14.3 2.5-.5A181.84 181.84 0 0 0 495 255a44.74 44.74 0 0 0-6.8-13.3zM398 111.2l-.5 21.9c5.5 18.1 16.9 17.2 22.4 17.2l-3.4-4.7 22.4-5.4a242.44 242.44 0 0 1-27 0c12.8-2.1 33.3-29 43-11.3 3.4 7.6 6.4 17.2 9.3 27.8l1.7-5.9a56.38 56.38 0 0 1-1.7-15.2c5.4.5 8.8 3.4 9.3 10.1.5 6.4 1.7 14.8 3.4 25.3l4.7-11.3c4.6 0 4.5-3.6-2.5 20.7-20.9-8.7-35.1-8.4-46.5-8.4l18.2-16c-25.3 8.2-33 10.8-54.8 20.9-1.1-5.4-5-13.5-16-19.9-3.2 3.8-2.8.9-.7 14.8h-2.5a62.32 62.32 0 0 0-8.4-23.1l4.2-3.4c8.4-7.1 11.8-14.3 10.6-21.9-.5-6.4-5.4-13.5-13.5-20.7 5.6-3.4 15.2-.4 28.3 8.5zm-39.6-10.1c2.7 1.9 11.4 5.4 18.9 17.2 4.2 8.4 4 9.8 3.4 11.1-.5 2.4-.5 4.3-3 7.1-1.7 2.5-5.4 4.7-11.8 7.6-7.6-13-16.5-23.6-27.8-31.2zM91 143.1l1.2-1.7c1.2-2.9 4.2-7.6 9.3-15.2l2.5-3.4-13 12.3 5.4-4.7-10.1 9.3-4.2 1.2c12.3-24.1 23.1-41.3 32.5-50.2 9.3-9.3 16-16 20.2-19.4l-6.4 1.2c-11.3-4.2-19.4-7.1-24.8-8.4 2.5-.5 3.7-.5 3.2-.5 10.3 0 17.5.5 20.9 1.2a52.35 52.35 0 0 0 16 2.5l.5-1.7-8.4-35.8 13.5 29a42.89 42.89 0 0 0 5.9-14.3c1.7-6.4 5.4-13 10.1-19.4s7.6-10.6 9.3-11.3a234.68 234.68 0 0 0-6.4 25.3l-1.7 7.1-.5 4.7 2.5 2.5C190.4 39.9 214 34 239.8 34.5l21.1.5c-11.8 13.5-27.8 21.9-48.5 24.8a201.26 201.26 0 0 1-23.4 2.9l-.2-.5-2.5-1.2a20.75 20.75 0 0 0-14 2c-2.5-.2-4.9-.5-7.1-.7l-2.5 1.7.5 1.2c2 .2 3.9.5 6.2.7l-2 3.4 3.4-.5-10.6 11.3c-4.2 3-5.4 6.4-4.2 9.3l5.4-3.4h1.2a39.4 39.4 0 0 1 25.3-15.2v-3c6.4.5 13 1 19.4 1.2 6.4 0 8.4.5 5.4 1.2a189.6 189.6 0 0 1 20.7 13.5c13.5 10.1 23.6 21.9 30 35.4 8.8 18.2 13.5 37.1 13.5 56.6a141.13 141.13 0 0 1-3 28.3 209.91 209.91 0 0 1-16 46l2.5.5c18.2-19.7 41.9-16 49.2-16l-6.4 5.9 22.4 17.7-1.7 30.7c-5.4-12.3-16.5-21.1-33-27.8 16.5 14.8 23.6 21.1 21.9 20.2-4.8-2.8-3.5-1.9-10.8-3.7 4.1 4.1 17.5 18.8 18.2 20.7l.2.2-.2.2c0 1.8 1.6-1.2-14 22.9-75.2-15.3-106.27-42.7-141.2-63.2l11.8 1.2c-11.8-18.5-15.6-17.7-38.4-26.1L149 225c-8.8-3-18.2-3-28.3.5l7.6-10.6-1.2-1.7c-14.9 4.3-19.8 9.2-22.6 11.3-1.1-5.5-2.8-12.4-12.3-28.8l-1.2 27-13.2-5c1.5-25.2 5.4-50.5 13.2-74.6zm276.5 330c-49.9 25-56.1 22.4-59 23.9-29.8-11.8-50.9-31.7-63.5-58.8l30 16.5c-9.8-9.3-18.3-16.5-38.4-44.3l11.8 23.1-17.7-7.6c14.2 21.1 23.5 51.7 66.6 73.5-120.8 24.2-199-72.1-200.9-74.3a262.57 262.57 0 0 0 35.4 24.8c3.4 1.7 7.1 2.5 10.1 1.2l-16-20.7c9.2 4.2 9.5 4.5 69.1 29-42.5-20.7-73.8-40.8-93.2-60.2-.5 6.4-1.2 10.1-1.2 10.1a80.25 80.25 0 0 1 20.7 26.6c-39-18.9-57.6-47.6-71.3-82.6 49.9 55.1 118.9 37.5 120.5 37.1 34.8 16.4 69.9 23.6 113.9 10.6 3.3 0 20.3 17 25.3 39.1l4.2-3-2.5-23.6c9 9 24.9 22.6 34.4 13-15.6-5.3-23.5-9.5-29.5-31.7 4.6 4.2 7.6 9 27.8 15l1.2-1.2-10.5-14.2c11.7-4.8-3.5 1 32-10.8 4.3 34.3 9 49.2.7 89.5zm115.3-214.4l-2.5.5 3 9.3c-3.5 5.9-23.7 44.3-71.6 79.7-39.5 29.8-76.6 39.1-80.9 40.3l-7.6-7.1-1.2 3 14.3 16-7.1-4.7 3.4 4.2h-1.2l-21.9-13.5 9.3 26.6-19-27.9-1.2 2.5 7.6 29c-6.1-8.2-21-32.6-56.8-39.6l32.5 21.2a214.82 214.82 0 0 1-93.2-6.4c-4.2-1.2-8.9-2.5-13.5-4.2l1.2-3-44.8-22.4 26.1 22.4c-57.7 9.1-113-25.4-126.4-83.4l-2.5-16.4-22.27 22.3c19.5-57.5 25.6-57.9 51.4-70.1-9.1-5.3-1.6-3.3-38.4-9.3 15.8-5.8 33-15.4 73 5.2a18.5 18.5 0 0 1 3.7-1.7c.6-3.2.4-.8 1-11.8 3.9 10 3.6 8.7 3 9.3l1.7.5c12.7-6.5 8.9-4.5 17-8.9l-5.4 13.5 22.3-5.8-8.4 8.4 2.5 2.5c4.5-1.8 30.3 3.4 40.8 16l-23.6-2.5c39.4 23 51.5 54 55.8 69.6l1.7-1.2c-2.8-22.3-12.4-33.9-16-40.1 4.2 5 39.2 34.6 110.4 46-11.3-.5-23.1 5.4-34.9 18.9l46.7-20.2-9.3 21.9c7.6-10.1 14.8-23.6 21.2-39.6v-.5l1.2-3-1.2 16c13.5-41.8 25.3-78.5 35.4-109.7l13.5-27.8v-2l-5.4-4.2h10.1l5.9 4.2 2.5-1.2-3.4-16 12.3 18.9 41.8-20.2-14.8 13 .5 2.9 17.7-.5a184 184 0 0 1 33 4.2l-23.6 2.5-1.2 3 26.6 23.1a254.21 254.21 0 0 1 27 32c-11.2-3.3-10.3-3.4-21.2-3.4l12.3 32.5zm-6.1-71.3l-3.9 13-14.3-11.8zm-254.8 7.1c1.7 10.6 4.7 17.7 8.8 21.9-9.3 6.6-27.5 13.9-46.5 16l.5 1.2a50.22 50.22 0 0 0 24.8-2.5l-7.1 13c4.2-1.7 10.1-7.1 17.7-14.8 11.9-5.5 12.7-5.1 20.2-16-12.7-6.4-15.7-13.7-18.4-18.8zm3.7-102.3c-6.4-3.4-10.6 3-12.3 18.9s2.5 29.5 11.8 39.6 18.2 10.6 26.1 3 3.4-23.6-11.3-47.7a39.57 39.57 0 0 0-14.27-13.8zm-4.7 46.3c5.4 2.2 10.5 1.9 12.3-10.6v-4.7l-1.2.5c-4.3-3.1-2.5-4.5-1.7-6.2l.5-.5c-.9-1.2-5-8.1-12.5 4.7-.5-13.5.5-21.9 3-24.8 1.2-2.5 4.7-1.2 11.3 4.2 6.4 5.4 11.3 16 15.2 32.5 6.5 28-19.8 26.2-26.9 4.9zm-45-5.5c1.6.3 9.3-1.1 9.3-14.8h-.5c-5.4-1.1-2.2-5.5-.7-5.9-1.7-3-3.4-4.2-5.4-4.7-8.1 0-11.6 12.7-8.1 21.2a7.51 7.51 0 0 0 5.43 4.2zM216 82.9l-2.5.5.5 3a48.94 48.94 0 0 1 26.1 5.9c-2.5-5.5-10-14.3-28.3-14.3l.5 2.5zm-71.8 49.4c21.7 16.8 16.5 21.4 46.5 23.6l-2.9-4.7a42.67 42.67 0 0 0 14.8-28.3c1.7-16-1.2-29.5-8.8-41.3l13-7.6a2.26 2.26 0 0 0-.5-1.7 14.21 14.21 0 0 0-13.5 1.7c-12.7 6.7-28 20.9-29 22.4-1.7 1.7-3.4 5.9-5.4 13.5a99.61 99.61 0 0 0-2.9 23.6c-4.7-8-10.5-6.4-19.9-5.9l7.1 7.6c-16.5 0-23.3 15.4-23.6 16 6.8 0 4.6-7.6 30-12.3-4.3-6.3-3.3-5-4.9-6.6zm18.7-18.7c1.2-7.6 3.4-13 6.4-17.2 5.4-6.4 10.6-10.1 16-11.8 4.2-1.7 7.1 1.2 10.1 9.3a72.14 72.14 0 0 1 3 25.3c-.5 9.3-3.4 17.2-8.4 23.1-2.9 3.4-5.4 5.9-6.4 7.6a39.21 39.21 0 0 1-11.3-.5l-7.1-3.4-5.4-6.4c.8-10 1.3-18.8 3.1-26zm42 56.1c-34.8 14.4-34.7 14-36.1 14.3-20.8 4.7-19-24.4-18.9-24.8l5.9-1.2-.5-2.5c-20.2-2.6-31 4.2-32.5 4.9.5.5 3 3.4 5.9 9.3 4.2-6.4 8.8-10.1 15.2-10.6a83.47 83.47 0 0 0 1.7 33.7c.1.5 2.6 17.4 27.5 24.1 11.3 3 27 1.2 48.9-5.4l-9.2.5c-4.2-14.8-6.4-24.8-5.9-29.5 11.3-8.8 21.9-11.3 30.7-7.6h2.5l-11.8-7.6-7.1.5c-5.9 1.2-12.3 4.2-19.4 8.4z\"]\n};\nconst faSquareHackerNews = {\n  prefix: 'fab',\n  iconName: 'square-hacker-news',\n  icon: [448, 512, [\"hacker-news-square\"], \"f3af\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM21 229.2c0 0 .1-.1 .1-.2s.1-.2 .2-.2c0 .1 0 .3-.1 .4H21zM239.2 384H207.8V281.3L128 128h37.3c41.5 77.7 48.1 95.8 54.1 112c1.6 4.3 3.1 8.5 5.2 13.6c3.2-7 5.1-11.9 7.1-17.3c5.9-15.3 12.8-33.2 53.5-108.3H320L239.2 283.1V384z\"]\n};\nconst faHackerNewsSquare = faSquareHackerNews;\nconst faEdge = {\n  prefix: 'fab',\n  iconName: 'edge',\n  icon: [512, 512, [], \"f282\", \"M120.1 37.44C161.1 12.23 207.7-.7753 255 .0016C423 .0016 512 123.8 512 219.5C511.9 252.2 499 283.4 476.1 306.7C453.2 329.9 422.1 343.2 389.4 343.7C314.2 343.7 297.9 320.6 297.9 311.7C297.9 307.9 299.1 305.5 302.7 302.3L303.7 301.1L304.1 299.5C314.6 288 320 273.3 320 257.9C320 179.2 237.8 115.2 136 115.2C98.46 114.9 61.46 124.1 28.48 142.1C55.48 84.58 111.2 44.5 119.8 38.28C120.6 37.73 120.1 37.44 120.1 37.44V37.44zM135.7 355.5C134.3 385.5 140.3 415.5 152.1 442.7C165.7 469.1 184.8 493.7 208.6 512C149.1 500.5 97.11 468.1 59.2 422.7C21.12 376.3 0 318.4 0 257.9C0 206.7 62.4 163.5 136 163.5C172.6 162.9 208.4 174.4 237.8 196.2L234.2 197.4C182.7 215 135.7 288.1 135.7 355.5V355.5zM469.8 400L469.1 400.1C457.3 418.9 443.2 435.2 426.9 449.6C396.1 477.6 358.8 495.1 318.1 499.5C299.5 499.8 281.3 496.3 264.3 488.1C238.7 477.8 217.2 458.1 202.7 435.1C188.3 411.2 181.6 383.4 183.7 355.5C183.1 335.4 189.1 315.2 198.7 297.3C212.6 330.4 236.2 358.6 266.3 378.1C296.4 397.6 331.8 407.6 367.7 406.7C398.7 407 429.8 400 457.9 386.2L459.8 385.3C463.7 383 467.5 381.4 471.4 385.3C475.9 390.2 473.2 394.5 470.2 399.3C470 399.5 469.9 399.8 469.8 400V400z\"]\n};\nconst faThreads = {\n  prefix: 'fab',\n  iconName: 'threads',\n  icon: [448, 512, [], \"e618\", \"M331.5 235.7c2.2 .9 4.2 1.9 6.3 2.8c29.2 14.1 50.6 35.2 61.8 61.4c15.7 36.5 17.2 95.8-30.3 143.2c-36.2 36.2-80.3 52.5-142.6 53h-.3c-70.2-.5-124.1-24.1-160.4-70.2c-32.3-41-48.9-98.1-49.5-169.6V256v-.2C17 184.3 33.6 127.2 65.9 86.2C102.2 40.1 156.2 16.5 226.4 16h.3c70.3 .5 124.9 24 162.3 69.9c18.4 22.7 32 50 40.6 81.7l-40.4 10.8c-7.1-25.8-17.8-47.8-32.2-65.4c-29.2-35.8-73-54.2-130.5-54.6c-57 .5-100.1 18.8-128.2 54.4C72.1 146.1 58.5 194.3 58 256c.5 61.7 14.1 109.9 40.3 143.3c28 35.6 71.2 53.9 128.2 54.4c51.4-.4 85.4-12.6 113.7-40.9c32.3-32.2 31.7-71.8 21.4-95.9c-6.1-14.2-17.1-26-31.9-34.9c-3.7 26.9-11.8 48.3-24.7 64.8c-17.1 21.8-41.4 33.6-72.7 35.3c-23.6 1.3-46.3-4.4-63.9-16c-20.8-13.8-33-34.8-34.3-59.3c-2.5-48.3 35.7-83 95.2-86.4c21.1-1.2 40.9-.3 59.2 2.8c-2.4-14.8-7.3-26.6-14.6-35.2c-10-11.7-25.6-17.7-46.2-17.8H227c-16.6 0-39 4.6-53.3 26.3l-34.4-23.6c19.2-29.1 50.3-45.1 87.8-45.1h.8c62.6 .4 99.9 39.5 103.7 107.7l-.2 .2zm-156 68.8c1.3 25.1 28.4 36.8 54.6 35.3c25.6-1.4 54.6-11.4 59.5-73.2c-13.2-2.9-27.8-4.4-43.4-4.4c-4.8 0-9.6 .1-14.4 .4c-42.9 2.4-57.2 23.2-56.2 41.8l-.1 .1z\"]\n};\nconst faNapster = {\n  prefix: 'fab',\n  iconName: 'napster',\n  icon: [496, 512, [], \"f3d2\", \"M298.3 373.6c-14.2 13.6-31.3 24.1-50.4 30.5-19-6.4-36.2-16.9-50.3-30.5h100.7zm44-199.6c20-16.9 43.6-29.2 69.6-36.2V299c0 219.4-328 217.6-328 .3V137.7c25.9 6.9 49.6 19.6 69.5 36.4 56.8-40 132.5-39.9 188.9-.1zm-208.8-58.5c64.4-60 164.3-60.1 228.9-.2-7.1 3.5-13.9 7.3-20.6 11.5-58.7-30.5-129.2-30.4-187.9.1-6.3-4-13.9-8.2-20.4-11.4zM43.8 93.2v69.3c-58.4 36.5-58.4 121.1.1 158.3 26.4 245.1 381.7 240.3 407.6 1.5l.3-1.7c58.7-36.3 58.9-121.7.2-158.2V93.2c-17.3.5-34 3-50.1 7.4-82-91.5-225.5-91.5-307.5.1-16.3-4.4-33.1-7-50.6-7.5zM259.2 352s36-.3 61.3-1.5c10.2-.5 21.1-4 25.5-6.5 26.3-15.1 25.4-39.2 26.2-47.4-79.5-.6-99.9-3.9-113 55.4zm-135.5-55.3c.8 8.2-.1 32.3 26.2 47.4 4.4 2.5 15.2 6 25.5 6.5 25.3 1.1 61.3 1.5 61.3 1.5-13.2-59.4-33.7-56.1-113-55.4zm169.1 123.4c-3.2-5.3-6.9-7.3-6.9-7.3-24.8 7.3-52.2 6.9-75.9 0 0 0-2.9 1.5-6.4 6.6-2.8 4.1-3.7 9.6-3.7 9.6 29.1 17.6 67.1 17.6 96.2 0-.1-.1-.3-4-3.3-8.9z\"]\n};\nconst faSquareSnapchat = {\n  prefix: 'fab',\n  iconName: 'square-snapchat',\n  icon: [448, 512, [\"snapchat-square\"], \"f2ad\", \"M384,32H64A64,64,0,0,0,0,96V416a64,64,0,0,0,64,64H384a64,64,0,0,0,64-64V96A64,64,0,0,0,384,32Zm-3.907,319.309-.083.1a32.364,32.364,0,0,1-8.717,6.823,90.26,90.26,0,0,1-20.586,8.2,12.694,12.694,0,0,0-3.852,1.76c-2.158,1.909-2.1,4.64-4.4,8.55a23.137,23.137,0,0,1-6.84,7.471c-6.707,4.632-14.244,4.923-22.23,5.23-7.214.274-15.39.581-24.729,3.669-3.761,1.245-7.753,3.694-12.377,6.533-11.265,6.9-26.68,16.353-52.3,16.353s-40.925-9.4-52.106-16.279c-4.657-2.888-8.675-5.362-12.543-6.64-9.339-3.08-17.516-3.4-24.729-3.67-7.986-.307-15.523-.6-22.231-5.229a23.085,23.085,0,0,1-6.01-6.11c-3.2-4.632-2.855-7.8-5.254-9.895a13.428,13.428,0,0,0-4.1-1.834,89.986,89.986,0,0,1-20.313-8.127,32.905,32.905,0,0,1-8.3-6.284c-6.583-6.757-8.276-14.776-5.686-21.824,3.436-9.338,11.571-12.111,19.4-16.262,14.776-8.027,26.348-18.055,34.433-29.884a68.236,68.236,0,0,0,5.985-10.567c.789-2.158.772-3.329.241-4.416a7.386,7.386,0,0,0-2.208-2.217c-2.532-1.676-5.113-3.353-6.882-4.5-3.27-2.141-5.868-3.818-7.529-4.98-6.267-4.383-10.65-9.04-13.4-14.245a28.4,28.4,0,0,1-1.369-23.584c4.134-10.924,14.469-17.706,26.978-17.706a37.141,37.141,0,0,1,7.845.83c.689.15,1.37.307,2.042.482-.108-7.43.058-15.357.722-23.119,2.358-27.261,11.912-41.589,21.874-52.994a86.836,86.836,0,0,1,22.28-17.931C188.254,100.383,205.312,96,224,96s35.828,4.383,50.944,13.016a87.169,87.169,0,0,1,22.239,17.9c9.961,11.406,19.516,25.709,21.874,52.995a231.194,231.194,0,0,1,.713,23.118c.673-.174,1.362-.332,2.051-.481a37.131,37.131,0,0,1,7.844-.83c12.5,0,22.82,6.782,26.971,17.706a28.37,28.37,0,0,1-1.4,23.559c-2.74,5.2-7.123,9.861-13.39,14.244-1.668,1.187-4.258,2.864-7.529,4.981-1.835,1.187-4.541,2.947-7.164,4.682a6.856,6.856,0,0,0-1.951,2.034c-.506,1.046-.539,2.191.166,4.208a69.015,69.015,0,0,0,6.085,10.792c8.268,12.1,20.188,22.313,35.454,30.407,1.486.772,2.98,1.5,4.441,2.258.722.332,1.569.763,2.491,1.3,4.9,2.723,9.2,6.01,11.455,12.153C387.821,336.915,386.269,344.7,380.093,351.309Zm-16.719-18.461c-50.313-24.314-58.332-61.918-58.689-64.749-.431-3.379-.921-6.035,2.806-9.472,3.594-3.328,19.541-13.19,23.965-16.278,7.33-5.114,10.534-10.219,8.16-16.495-1.66-4.316-5.686-5.976-9.961-5.976a18.5,18.5,0,0,0-3.993.448c-8.035,1.743-15.838,5.769-20.354,6.857a7.1,7.1,0,0,1-1.66.224c-2.408,0-3.279-1.071-3.088-3.968.564-8.783,1.759-25.925.373-41.937-1.884-22.032-8.99-32.948-17.432-42.6-4.051-4.624-23.135-24.654-59.536-24.654S168.53,134.359,164.479,139c-8.434,9.654-15.531,20.57-17.432,42.6-1.386,16.013-.141,33.147.373,41.937.166,2.756-.68,3.968-3.088,3.968a7.1,7.1,0,0,1-1.66-.224c-4.507-1.087-12.31-5.113-20.346-6.856a18.494,18.494,0,0,0-3.993-.449c-4.25,0-8.3,1.636-9.961,5.977-2.374,6.276.847,11.381,8.168,16.494,4.425,3.088,20.371,12.958,23.966,16.279,3.719,3.437,3.237,6.093,2.805,9.471-.356,2.79-8.384,40.394-58.689,64.749-2.946,1.428-7.96,4.45.88,9.331,13.88,7.628,23.111,6.807,30.3,11.43,6.093,3.927,2.5,12.394,6.923,15.449,5.454,3.76,21.583-.266,42.335,6.6,17.433,5.744,28.116,22.015,58.963,22.015s41.788-16.3,58.938-21.973c20.795-6.865,36.89-2.839,42.336-6.6,4.433-3.055.822-11.522,6.923-15.448,7.181-4.624,16.411-3.8,30.3-11.472C371.36,337.355,366.346,334.333,363.374,332.848Z\"]\n};\nconst faSnapchatSquare = faSquareSnapchat;\nconst faGooglePlusG = {\n  prefix: 'fab',\n  iconName: 'google-plus-g',\n  icon: [640, 512, [], \"f0d5\", \"M386.061 228.496c1.834 9.692 3.143 19.384 3.143 31.956C389.204 370.205 315.599 448 204.8 448c-106.084 0-192-85.915-192-192s85.916-192 192-192c51.864 0 95.083 18.859 128.611 50.292l-52.126 50.03c-14.145-13.621-39.028-29.599-76.485-29.599-65.484 0-118.92 54.221-118.92 121.277 0 67.056 53.436 121.277 118.92 121.277 75.961 0 104.513-54.745 108.965-82.773H204.8v-66.009h181.261zm185.406 6.437V179.2h-56.001v55.733h-55.733v56.001h55.733v55.733h56.001v-55.733H627.2v-56.001h-55.733z\"]\n};\nconst faArtstation = {\n  prefix: 'fab',\n  iconName: 'artstation',\n  icon: [512, 512, [], \"f77a\", \"M2 377.4l43 74.3A51.35 51.35 0 0 0 90.9 480h285.4l-59.2-102.6zM501.8 350L335.6 59.3A51.38 51.38 0 0 0 290.2 32h-88.4l257.3 447.6 40.7-70.5c1.9-3.2 21-29.7 2-59.1zM275 304.5l-115.5-200L44 304.5z\"]\n};\nconst faMarkdown = {\n  prefix: 'fab',\n  iconName: 'markdown',\n  icon: [640, 512, [], \"f60f\", \"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z\"]\n};\nconst faSourcetree = {\n  prefix: 'fab',\n  iconName: 'sourcetree',\n  icon: [448, 512, [], \"f7d3\", \"M427.2 203c0-112.1-90.9-203-203-203C112.1-.2 21.2 90.6 21 202.6A202.86 202.86 0 0 0 161.5 396v101.7a14.3 14.3 0 0 0 14.3 14.3h96.4a14.3 14.3 0 0 0 14.3-14.3V396.1A203.18 203.18 0 0 0 427.2 203zm-271.6 0c0-90.8 137.3-90.8 137.3 0-.1 89.9-137.3 91-137.3 0z\"]\n};\nconst faGooglePlus = {\n  prefix: 'fab',\n  iconName: 'google-plus',\n  icon: [512, 512, [], \"f2b3\", \"M256,8C119.1,8,8,119.1,8,256S119.1,504,256,504,504,392.9,504,256,392.9,8,256,8ZM185.3,380a124,124,0,0,1,0-248c31.3,0,60.1,11,83,32.3l-33.6,32.6c-13.2-12.9-31.3-19.1-49.4-19.1-42.9,0-77.2,35.5-77.2,78.1S142.3,334,185.3,334c32.6,0,64.9-19.1,70.1-53.3H185.3V238.1H302.2a109.2,109.2,0,0,1,1.9,20.7c0,70.8-47.5,121.2-118.8,121.2ZM415.5,273.8v35.5H380V273.8H344.5V238.3H380V202.8h35.5v35.5h35.2v35.5Z\"]\n};\nconst faDiaspora = {\n  prefix: 'fab',\n  iconName: 'diaspora',\n  icon: [512, 512, [], \"f791\", \"M251.64 354.55c-1.4 0-88 119.9-88.7 119.9S76.34 414 76 413.25s86.6-125.7 86.6-127.4c0-2.2-129.6-44-137.6-47.1-1.3-.5 31.4-101.8 31.7-102.1.6-.7 144.4 47 145.5 47 .4 0 .9-.6 1-1.3.4-2 1-148.6 1.7-149.6.8-1.2 104.5-.7 105.1-.3 1.5 1 3.5 156.1 6.1 156.1 1.4 0 138.7-47 139.3-46.3.8.9 31.9 102.2 31.5 102.6-.9.9-140.2 47.1-140.6 48.8-.3 1.4 82.8 122.1 82.5 122.9s-85.5 63.5-86.3 63.5c-1-.2-89-125.5-90.9-125.5z\"]\n};\nconst faFoursquare = {\n  prefix: 'fab',\n  iconName: 'foursquare',\n  icon: [368, 512, [], \"f180\", \"M323.1 3H49.9C12.4 3 0 31.3 0 49.1v433.8c0 20.3 12.1 27.7 18.2 30.1 6.2 2.5 22.8 4.6 32.9-7.1C180 356.5 182.2 354 182.2 354c3.1-3.4 3.4-3.1 6.8-3.1h83.4c35.1 0 40.6-25.2 44.3-39.7l48.6-243C373.8 25.8 363.1 3 323.1 3zm-16.3 73.8l-11.4 59.7c-1.2 6.5-9.5 13.2-16.9 13.2H172.1c-12 0-20.6 8.3-20.6 20.3v13c0 12 8.6 20.6 20.6 20.6h90.4c8.3 0 16.6 9.2 14.8 18.2-1.8 8.9-10.5 53.8-11.4 58.8-.9 4.9-6.8 13.5-16.9 13.5h-73.5c-13.5 0-17.2 1.8-26.5 12.6 0 0-8.9 11.4-89.5 108.3-.9.9-1.8.6-1.8-.3V75.9c0-7.7 6.8-16.6 16.6-16.6h219c8.2 0 15.6 7.7 13.5 17.5z\"]\n};\nconst faStackOverflow = {\n  prefix: 'fab',\n  iconName: 'stack-overflow',\n  icon: [384, 512, [], \"f16c\", \"M290.7 311L95 269.7 86.8 309l195.7 41zm51-87L188.2 95.7l-25.5 30.8 153.5 128.3zm-31.2 39.7L129.2 179l-16.7 36.5L293.7 300zM262 32l-32 24 119.3 160.3 32-24zm20.5 328h-200v39.7h200zm39.7 80H42.7V320h-40v160h359.5V320h-40z\"]\n};\nconst faGithubAlt = {\n  prefix: 'fab',\n  iconName: 'github-alt',\n  icon: [480, 512, [], \"f113\", \"M186.1 328.7c0 20.9-10.9 55.1-36.7 55.1s-36.7-34.2-36.7-55.1 10.9-55.1 36.7-55.1 36.7 34.2 36.7 55.1zM480 278.2c0 31.9-3.2 65.7-17.5 95-37.9 76.6-142.1 74.8-216.7 74.8-75.8 0-186.2 2.7-225.6-74.8-14.6-29-20.2-63.1-20.2-95 0-41.9 13.9-81.5 41.5-113.6-5.2-15.8-7.7-32.4-7.7-48.8 0-21.5 4.9-32.3 14.6-51.8 45.3 0 74.3 9 108.8 36 29-6.9 58.8-10 88.7-10 27 0 54.2 2.9 80.4 9.2 34-26.7 63-35.2 107.8-35.2 9.8 19.5 14.6 30.3 14.6 51.8 0 16.4-2.6 32.7-7.7 48.2 27.5 32.4 39 72.3 39 114.2zm-64.3 50.5c0-43.9-26.7-82.6-73.5-82.6-18.9 0-37 3.4-56 6-14.9 2.3-29.8 3.2-45.1 3.2-15.2 0-30.1-.9-45.1-3.2-18.7-2.6-37-6-56-6-46.8 0-73.5 38.7-73.5 82.6 0 87.8 80.4 101.3 150.4 101.3h48.2c70.3 0 150.6-13.4 150.6-101.3zm-82.6-55.1c-25.8 0-36.7 34.2-36.7 55.1s10.9 55.1 36.7 55.1 36.7-34.2 36.7-55.1-10.9-55.1-36.7-55.1z\"]\n};\nconst faPhoenixSquadron = {\n  prefix: 'fab',\n  iconName: 'phoenix-squadron',\n  icon: [512, 512, [], \"f511\", \"M96 63.38C142.49 27.25 201.55 7.31 260.51 8.81c29.58-.38 59.11 5.37 86.91 15.33-24.13-4.63-49-6.34-73.38-2.45C231.17 27 191 48.84 162.21 80.87c5.67-1 10.78-3.67 16-5.86 18.14-7.87 37.49-13.26 57.23-14.83 19.74-2.13 39.64-.43 59.28 1.92-14.42 2.79-29.12 4.57-43 9.59-34.43 11.07-65.27 33.16-86.3 62.63-13.8 19.71-23.63 42.86-24.67 67.13-.35 16.49 5.22 34.81 19.83 44a53.27 53.27 0 0 0 37.52 6.74c15.45-2.46 30.07-8.64 43.6-16.33 11.52-6.82 22.67-14.55 32-24.25 3.79-3.22 2.53-8.45 2.62-12.79-2.12-.34-4.38-1.11-6.3.3a203 203 0 0 1-35.82 15.37c-20 6.17-42.16 8.46-62.1.78 12.79 1.73 26.06.31 37.74-5.44 20.23-9.72 36.81-25.2 54.44-38.77a526.57 526.57 0 0 1 88.9-55.31c25.71-12 52.94-22.78 81.57-24.12-15.63 13.72-32.15 26.52-46.78 41.38-14.51 14-27.46 29.5-40.11 45.18-3.52 4.6-8.95 6.94-13.58 10.16a150.7 150.7 0 0 0-51.89 60.1c-9.33 19.68-14.5 41.85-11.77 63.65 1.94 13.69 8.71 27.59 20.9 34.91 12.9 8 29.05 8.07 43.48 5.1 32.8-7.45 61.43-28.89 81-55.84 20.44-27.52 30.52-62.2 29.16-96.35-.52-7.5-1.57-15-1.66-22.49 8 19.48 14.82 39.71 16.65 60.83 2 14.28.75 28.76-1.62 42.9-1.91 11-5.67 21.51-7.78 32.43a165 165 0 0 0 39.34-81.07 183.64 183.64 0 0 0-14.21-104.64c20.78 32 32.34 69.58 35.71 107.48.49 12.73.49 25.51 0 38.23A243.21 243.21 0 0 1 482 371.34c-26.12 47.34-68 85.63-117.19 108-78.29 36.23-174.68 31.32-248-14.68A248.34 248.34 0 0 1 25.36 366 238.34 238.34 0 0 1 0 273.08v-31.34C3.93 172 40.87 105.82 96 63.38m222 80.33a79.13 79.13 0 0 0 16-4.48c5-1.77 9.24-5.94 10.32-11.22-8.96 4.99-17.98 9.92-26.32 15.7z\"]\n};\nconst faPagelines = {\n  prefix: 'fab',\n  iconName: 'pagelines',\n  icon: [384, 512, [], \"f18c\", \"M384 312.7c-55.1 136.7-187.1 54-187.1 54-40.5 81.8-107.4 134.4-184.6 134.7-16.1 0-16.6-24.4 0-24.4 64.4-.3 120.5-42.7 157.2-110.1-41.1 15.9-118.6 27.9-161.6-82.2 109-44.9 159.1 11.2 178.3 45.5 9.9-24.4 17-50.9 21.6-79.7 0 0-139.7 21.9-149.5-98.1 119.1-47.9 152.6 76.7 152.6 76.7 1.6-16.7 3.3-52.6 3.3-53.4 0 0-106.3-73.7-38.1-165.2 124.6 43 61.4 162.4 61.4 162.4.5 1.6.5 23.8 0 33.4 0 0 45.2-89 136.4-57.5-4.2 134-141.9 106.4-141.9 106.4-4.4 27.4-11.2 53.4-20 77.5 0 0 83-91.8 172-20z\"]\n};\nconst faAlgolia = {\n  prefix: 'fab',\n  iconName: 'algolia',\n  icon: [512, 512, [], \"f36c\", \"M256 0C116.1 0 2 112.7 0 252.1C-2 393.6 112.9 510.8 254.5 511.6c43.7 .3 85.9-10.4 123.3-30.7c3.6-2 4.2-7 1.1-9.7l-24-21.2c-4.9-4.3-11.8-5.5-17.8-3c-26.1 11.1-54.5 16.8-83.7 16.4C139 461.9 46.5 366.8 48.3 252.4C50.1 139.5 142.6 48.2 256 48.2H463.7V417.2L345.9 312.5c-3.8-3.4-9.7-2.7-12.7 1.3c-18.9 25-49.7 40.6-83.9 38.2c-47.5-3.3-85.9-41.5-89.5-88.9c-4.2-56.6 40.6-103.9 96.3-103.9c50.4 0 91.9 38.8 96.2 88c.4 4.4 2.4 8.5 5.7 11.4l30.7 27.2c3.5 3.1 9 1.2 9.9-3.4c2.2-11.8 3-24.2 2.1-36.8c-4.9-72-63.3-130-135.4-134.4c-82.7-5.1-151.8 59.5-154 140.6c-2.1 78.9 62.6 147 141.6 148.7c33 .7 63.6-9.6 88.3-27.6L495 509.4c6.6 5.8 17 1.2 17-7.7V9.7c0-5.4-4.4-9.7-9.7-9.7H256z\"]\n};\nconst faRedRiver = {\n  prefix: 'fab',\n  iconName: 'red-river',\n  icon: [448, 512, [], \"f3e3\", \"M353.2 32H94.8C42.4 32 0 74.4 0 126.8v258.4C0 437.6 42.4 480 94.8 480h258.4c52.4 0 94.8-42.4 94.8-94.8V126.8c0-52.4-42.4-94.8-94.8-94.8zM144.9 200.9v56.3c0 27-21.9 48.9-48.9 48.9V151.9c0-13.2 10.7-23.9 23.9-23.9h154.2c0 27-21.9 48.9-48.9 48.9h-56.3c-12.3-.6-24.6 11.6-24 24zm176.3 72h-56.3c-12.3-.6-24.6 11.6-24 24v56.3c0 27-21.9 48.9-48.9 48.9V247.9c0-13.2 10.7-23.9 23.9-23.9h154.2c0 27-21.9 48.9-48.9 48.9z\"]\n};\nconst faCreativeCommonsSa = {\n  prefix: 'fab',\n  iconName: 'creative-commons-sa',\n  icon: [496, 512, [], \"f4ef\", \"M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zM137.7 221c13-83.9 80.5-95.7 108.9-95.7 99.8 0 127.5 82.5 127.5 134.2 0 63.6-41 132.9-128.9 132.9-38.9 0-99.1-20-109.4-97h62.5c1.5 30.1 19.6 45.2 54.5 45.2 23.3 0 58-18.2 58-82.8 0-82.5-49.1-80.6-56.7-80.6-33.1 0-51.7 14.6-55.8 43.8h18.2l-49.2 49.2-49-49.2h19.4z\"]\n};\nconst faSafari = {\n  prefix: 'fab',\n  iconName: 'safari',\n  icon: [512, 512, [], \"f267\", \"M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z\"]\n};\nconst faGoogle = {\n  prefix: 'fab',\n  iconName: 'google',\n  icon: [488, 512, [], \"f1a0\", \"M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z\"]\n};\nconst faSquareFontAwesomeStroke = {\n  prefix: 'fab',\n  iconName: 'square-font-awesome-stroke',\n  icon: [448, 512, [\"font-awesome-alt\"], \"f35c\", \"M64 64C46.3 64 32 78.3 32 96l0 320c0 17.7 14.3 32 32 32l320 0c17.7 0 32-14.3 32-32l0-320c0-17.7-14.3-32-32-32L64 64zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm154 58c0 9.3-4.8 17.4-12.1 22l188.9 0c7.3 0 13.2 5.9 13.2 13.2c0 1.8-.4 3.7-1.1 5.4L312 264l30.9 69.4c.8 1.7 1.1 3.5 1.1 5.4c0 7.3-5.9 13.2-13.2 13.2L144 352l0 32-32 0 0-32 0-176 0-1.5c-6.1-4.8-10-12.2-10-20.5c0-14.4 11.6-26 26-26s26 11.6 26 26z\"]\n};\nconst faFontAwesomeAlt = faSquareFontAwesomeStroke;\nconst faAtlassian = {\n  prefix: 'fab',\n  iconName: 'atlassian',\n  icon: [512, 512, [], \"f77b\", \"M152.2 236.4c-7.7-8.2-19.7-7.7-24.8 2.8L1.6 490.2c-5 10 2.4 21.7 13.4 21.7h175c5.8.1 11-3.2 13.4-8.4 37.9-77.8 15.1-196.3-51.2-267.1zM244.4 8.1c-122.3 193.4-8.5 348.6 65 495.5 2.5 5.1 7.7 8.4 13.4 8.4H497c11.2 0 18.4-11.8 13.4-21.7 0 0-234.5-470.6-240.4-482.3-5.3-10.6-18.8-10.8-25.6.1z\"]\n};\nconst faLinkedinIn = {\n  prefix: 'fab',\n  iconName: 'linkedin-in',\n  icon: [448, 512, [], \"f0e1\", \"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z\"]\n};\nconst faDigitalOcean = {\n  prefix: 'fab',\n  iconName: 'digital-ocean',\n  icon: [512, 512, [], \"f391\", \"M87 481.8h73.7v-73.6H87zM25.4 346.6v61.6H87v-61.6zm466.2-169.7c-23-74.2-82.4-133.3-156.6-156.6C164.9-32.8 8 93.7 8 255.9h95.8c0-101.8 101-180.5 208.1-141.7 39.7 14.3 71.5 46.1 85.8 85.7 39.1 107-39.7 207.8-141.4 208v.3h-.3V504c162.6 0 288.8-156.8 235.6-327.1zm-235.3 231v-95.3h-95.6v95.6H256v-.3z\"]\n};\nconst faNimblr = {\n  prefix: 'fab',\n  iconName: 'nimblr',\n  icon: [384, 512, [], \"f5a8\", \"M246.6 299.29c15.57 0 27.15 11.46 27.15 27s-11.62 27-27.15 27c-15.7 0-27.15-11.57-27.15-27s11.55-27 27.15-27zM113 326.25c0-15.61 11.68-27 27.15-27s27.15 11.46 27.15 27-11.47 27-27.15 27c-15.44 0-27.15-11.31-27.15-27M191.76 159C157 159 89.45 178.77 59.25 227L14 0v335.48C14 433.13 93.61 512 191.76 512s177.76-78.95 177.76-176.52S290.13 159 191.76 159zm0 308.12c-73.27 0-132.51-58.9-132.51-131.59s59.24-131.59 132.51-131.59 132.51 58.86 132.51 131.54S265 467.07 191.76 467.07z\"]\n};\nconst faChromecast = {\n  prefix: 'fab',\n  iconName: 'chromecast',\n  icon: [512, 512, [], \"f838\", \"M447.8,64H64c-23.6,0-42.7,19.1-42.7,42.7v63.9H64v-63.9h383.8v298.6H298.6V448H448c23.6,0,42.7-19.1,42.7-42.7V106.7 C490.7,83.1,471.4,64,447.8,64z M21.3,383.6L21.3,383.6l0,63.9h63.9C85.2,412.2,56.6,383.6,21.3,383.6L21.3,383.6z M21.3,298.6V341 c58.9,0,106.6,48.1,106.6,107h42.7C170.7,365.6,103.7,298.7,21.3,298.6z M213.4,448h42.7c-0.5-129.5-105.3-234.3-234.8-234.6l0,42.4 C127.3,255.6,213.3,342,213.4,448z\"]\n};\nconst faEvernote = {\n  prefix: 'fab',\n  iconName: 'evernote',\n  icon: [384, 512, [], \"f839\", \"M120.82 132.21c1.6 22.31-17.55 21.59-21.61 21.59-68.93 0-73.64-1-83.58 3.34-.56.22-.74 0-.37-.37L123.79 46.45c.38-.37.6-.22.38.37-4.35 9.99-3.35 15.09-3.35 85.39zm79 308c-14.68-37.08 13-76.93 52.52-76.62 17.49 0 22.6 23.21 7.95 31.42-6.19 3.3-24.95 1.74-25.14 19.2-.05 17.09 19.67 25 31.2 24.89A45.64 45.64 0 0 0 312 393.45v-.08c0-11.63-7.79-47.22-47.54-55.34-7.72-1.54-65-6.35-68.35-50.52-3.74 16.93-17.4 63.49-43.11 69.09-8.74 1.94-69.68 7.64-112.92-36.77 0 0-18.57-15.23-28.23-57.95-3.38-15.75-9.28-39.7-11.14-62 0-18 11.14-30.45 25.07-32.2 81 0 90 2.32 101-7.8 9.82-9.24 7.8-15.5 7.8-102.78 1-8.3 7.79-30.81 53.41-24.14 6 .86 31.91 4.18 37.48 30.64l64.26 11.15c20.43 3.71 70.94 7 80.6 57.94 22.66 121.09 8.91 238.46 7.8 238.46C362.15 485.53 267.06 480 267.06 480c-18.95-.23-54.25-9.4-67.27-39.83zm80.94-204.84c-1 1.92-2.2 6 .85 7 14.09 4.93 39.75 6.84 45.88 5.53 3.11-.25 3.05-4.43 2.48-6.65-3.53-21.85-40.83-26.5-49.24-5.92z\"]\n};\nconst faHackerNews = {\n  prefix: 'fab',\n  iconName: 'hacker-news',\n  icon: [448, 512, [], \"f1d4\", \"M0 32v448h448V32H0zm21.2 197.2H21c.1-.1.2-.3.3-.4 0 .1 0 .3-.1.4zm218 53.9V384h-31.4V281.3L128 128h37.3c52.5 98.3 49.2 101.2 59.3 125.6 12.3-27 5.8-24.4 60.6-125.6H320l-80.8 155.1z\"]\n};\nconst faCreativeCommonsSampling = {\n  prefix: 'fab',\n  iconName: 'creative-commons-sampling',\n  icon: [496, 512, [], \"f4f0\", \"M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm3.6 53.2c2.8-.3 11.5 1 11.5 11.5l6.6 107.2 4.9-59.3c0-6 4.7-10.6 10.6-10.6 5.9 0 10.6 4.7 10.6 10.6 0 2.5-.5-5.7 5.7 81.5l5.8-64.2c.3-2.9 2.9-9.3 10.2-9.3 3.8 0 9.9 2.3 10.6 8.9l11.5 96.5 5.3-12.8c1.8-4.4 5.2-6.6 10.2-6.6h58v21.3h-50.9l-18.2 44.3c-3.9 9.9-19.5 9.1-20.8-3.1l-4-31.9-7.5 92.6c-.3 3-3 9.3-10.2 9.3-3 0-9.8-2.1-10.6-9.3 0-1.9.6 5.8-6.2-77.9l-5.3 72.2c-1.1 4.8-4.8 9.3-10.6 9.3-2.9 0-9.8-2-10.6-9.3 0-1.9.5 6.7-5.8-87.7l-5.8 94.8c0 6.3-3.6 12.4-10.6 12.4-5.2 0-10.6-4.1-10.6-12l-5.8-87.7c-5.8 92.5-5.3 84-5.3 85.9-1.1 4.8-4.8 9.3-10.6 9.3-3 0-9.8-2.1-10.6-9.3 0-.7-.4-1.1-.4-2.6l-6.2-88.6L182 348c-.7 6.5-6.7 9.3-10.6 9.3-5.8 0-9.6-4.1-10.6-8.9L149.7 272c-2 4-3.5 8.4-11.1 8.4H87.2v-21.3H132l13.7-27.9c4.4-9.9 18.2-7.2 19.9 2.7l3.1 20.4 8.4-97.9c0-6 4.8-10.6 10.6-10.6.5 0 10.6-.2 10.6 12.4l4.9 69.1 6.6-92.6c0-10.1 9.5-10.6 10.2-10.6.6 0 10.6.7 10.6 10.6l5.3 80.6 6.2-97.9c.1-1.1-.6-10.3 9.9-11.5z\"]\n};\nconst faAdversal = {\n  prefix: 'fab',\n  iconName: 'adversal',\n  icon: [512, 512, [], \"f36a\", \"M482.1 32H28.7C5.8 32 0 37.9 0 60.9v390.2C0 474.4 5.8 480 28.7 480h453.4c24.4 0 29.9-5.2 29.9-29.7V62.2c0-24.6-5.4-30.2-29.9-30.2zM178.4 220.3c-27.5-20.2-72.1-8.7-84.2 23.4-4.3 11.1-9.3 9.5-17.5 8.3-9.7-1.5-17.2-3.2-22.5-5.5-28.8-11.4 8.6-55.3 24.9-64.3 41.1-21.4 83.4-22.2 125.3-4.8 40.9 16.8 34.5 59.2 34.5 128.5 2.7 25.8-4.3 58.3 9.3 88.8 1.9 4.4.4 7.9-2.7 10.7-8.4 6.7-39.3 2.2-46.6-7.4-1.9-2.2-1.8-3.6-3.9-6.2-3.6-3.9-7.3-2.2-11.9 1-57.4 36.4-140.3 21.4-147-43.3-3.1-29.3 12.4-57.1 39.6-71 38.2-19.5 112.2-11.8 114-30.9 1.1-10.2-1.9-20.1-11.3-27.3zm286.7 222c0 15.1-11.1 9.9-17.8 9.9H52.4c-7.4 0-18.2 4.8-17.8-10.7.4-13.9 10.5-9.1 17.1-9.1 132.3-.4 264.5-.4 396.8 0 6.8 0 16.6-4.4 16.6 9.9zm3.8-340.5v291c0 5.7-.7 13.9-8.1 13.9-12.4-.4-27.5 7.1-36.1-5.6-5.8-8.7-7.8-4-12.4-1.2-53.4 29.7-128.1 7.1-144.4-85.2-6.1-33.4-.7-67.1 15.7-100 11.8-23.9 56.9-76.1 136.1-30.5v-71c0-26.2-.1-26.2 26-26.2 3.1 0 6.6.4 9.7 0 10.1-.8 13.6 4.4 13.6 14.3-.1.2-.1.3-.1.5zm-51.5 232.3c-19.5 47.6-72.9 43.3-90 5.2-15.1-33.3-15.5-68.2.4-101.5 16.3-34.1 59.7-35.7 81.5-4.8 20.6 28.8 14.9 84.6 8.1 101.1zm-294.8 35.3c-7.5-1.3-33-3.3-33.7-27.8-.4-13.9 7.8-23 19.8-25.8 24.4-5.9 49.3-9.9 73.7-14.7 8.9-2 7.4 4.4 7.8 9.5 1.4 33-26.1 59.2-67.6 58.8z\"]\n};\nconst faCreativeCommons = {\n  prefix: 'fab',\n  iconName: 'creative-commons',\n  icon: [496, 512, [], \"f25e\", \"M245.83 214.87l-33.22 17.28c-9.43-19.58-25.24-19.93-27.46-19.93-22.13 0-33.22 14.61-33.22 43.84 0 23.57 9.21 43.84 33.22 43.84 14.47 0 24.65-7.09 30.57-21.26l30.55 15.5c-6.17 11.51-25.69 38.98-65.1 38.98-22.6 0-73.96-10.32-73.96-77.05 0-58.69 43-77.06 72.63-77.06 30.72-.01 52.7 11.95 65.99 35.86zm143.05 0l-32.78 17.28c-9.5-19.77-25.72-19.93-27.9-19.93-22.14 0-33.22 14.61-33.22 43.84 0 23.55 9.23 43.84 33.22 43.84 14.45 0 24.65-7.09 30.54-21.26l31 15.5c-2.1 3.75-21.39 38.98-65.09 38.98-22.69 0-73.96-9.87-73.96-77.05 0-58.67 42.97-77.06 72.63-77.06 30.71-.01 52.58 11.95 65.56 35.86zM247.56 8.05C104.74 8.05 0 123.11 0 256.05c0 138.49 113.6 248 247.56 248 129.93 0 248.44-100.87 248.44-248 0-137.87-106.62-248-248.44-248zm.87 450.81c-112.54 0-203.7-93.04-203.7-202.81 0-105.42 85.43-203.27 203.72-203.27 112.53 0 202.82 89.46 202.82 203.26-.01 121.69-99.68 202.82-202.84 202.82z\"]\n};\nconst faWatchmanMonitoring = {\n  prefix: 'fab',\n  iconName: 'watchman-monitoring',\n  icon: [512, 512, [], \"e087\", \"M256,16C123.452,16,16,123.452,16,256S123.452,496,256,496,496,388.548,496,256,388.548,16,256,16ZM121.69,429.122C70.056,388.972,36.741,326.322,36.741,256a218.519,218.519,0,0,1,9.587-64.122l102.9-17.895-.121,10.967-13.943,2.013s-.144,12.5-.144,19.549a12.778,12.778,0,0,0,4.887,10.349l9.468,7.4Zm105.692-283.27,8.48-7.618s6.934-5.38-.143-9.344c-7.188-4.024-39.53-34.5-39.53-34.5-5.348-5.477-8.257-7.347-15.46,0,0,0-32.342,30.474-39.529,34.5-7.078,3.964-.144,9.344-.144,9.344l8.481,7.618-.048,4.369L75.982,131.045c39.644-56.938,105.532-94.3,180.018-94.3A218.754,218.754,0,0,1,420.934,111.77l-193.512,37.7Zm34.063,329.269-33.9-250.857,9.467-7.4a12.778,12.778,0,0,0,4.888-10.349c0-7.044-.144-19.549-.144-19.549l-13.943-2.013-.116-10.474,241.711,31.391A218.872,218.872,0,0,1,475.259,256C475.259,375.074,379.831,472.212,261.445,475.121Z\"]\n};\nconst faFonticons = {\n  prefix: 'fab',\n  iconName: 'fonticons',\n  icon: [448, 512, [], \"f280\", \"M0 32v448h448V32zm187 140.9c-18.4 0-19 9.9-19 27.4v23.3c0 2.4-3.5 4.4-.6 4.4h67.4l-11.1 37.3H168v112.9c0 5.8-2 6.7 3.2 7.3l43.5 4.1v25.1H84V389l21.3-2c5.2-.6 6.7-2.3 6.7-7.9V267.7c0-2.3-2.9-2.3-5.8-2.3H84V228h28v-21c0-49.6 26.5-70 77.3-70 34.1 0 64.7 8.2 64.7 52.8l-50.7 6.1c.3-18.7-4.4-23-16.3-23zm74.3 241.8v-25.1l20.4-2.6c5.2-.6 7.6-1.7 7.6-7.3V271.8c0-4.1-2.9-6.7-6.7-7.9l-24.2-6.4 6.7-29.5h80.2v151.7c0 5.8-2.6 6.4 2.9 7.3l15.7 2.6v25.1zm80.8-255.5l9 33.2-7.3 7.3-31.2-16.6-31.2 16.6-7.3-7.3 9-33.2-21.8-24.2 3.5-9.6h27.7l15.5-28h9.3l15.5 28h27.7l3.5 9.6z\"]\n};\nconst faWeixin = {\n  prefix: 'fab',\n  iconName: 'weixin',\n  icon: [576, 512, [], \"f1d7\", \"M385.2 167.6c6.4 0 12.6.3 18.8 1.1C387.4 90.3 303.3 32 207.7 32 100.5 32 13 104.8 13 197.4c0 53.4 29.3 97.5 77.9 131.6l-19.3 58.6 68-34.1c24.4 4.8 43.8 9.7 68.2 9.7 6.2 0 12.1-.3 18.3-.8-4-12.9-6.2-26.6-6.2-40.8-.1-84.9 72.9-154 165.3-154zm-104.5-52.9c14.5 0 24.2 9.7 24.2 24.4 0 14.5-9.7 24.2-24.2 24.2-14.8 0-29.3-9.7-29.3-24.2.1-14.7 14.6-24.4 29.3-24.4zm-136.4 48.6c-14.5 0-29.3-9.7-29.3-24.2 0-14.8 14.8-24.4 29.3-24.4 14.8 0 24.4 9.7 24.4 24.4 0 14.6-9.6 24.2-24.4 24.2zM563 319.4c0-77.9-77.9-141.3-165.4-141.3-92.7 0-165.4 63.4-165.4 141.3S305 460.7 397.6 460.7c19.3 0 38.9-5.1 58.6-9.9l53.4 29.3-14.8-48.6C534 402.1 563 363.2 563 319.4zm-219.1-24.5c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.8 0 24.4 9.7 24.4 19.3 0 10-9.7 19.6-24.4 19.6zm107.1 0c-9.7 0-19.3-9.7-19.3-19.6 0-9.7 9.7-19.3 19.3-19.3 14.5 0 24.4 9.7 24.4 19.3.1 10-9.9 19.6-24.4 19.6z\"]\n};\nconst faShirtsinbulk = {\n  prefix: 'fab',\n  iconName: 'shirtsinbulk',\n  icon: [448, 512, [], \"f214\", \"M100 410.3l30.6 13.4 4.4-9.9-30.6-13.4zm39.4 17.5l30.6 13.4 4.4-9.9-30.6-13.4zm172.1-14l4.4 9.9 30.6-13.4-4.4-9.9zM179.1 445l30.3 13.7 4.4-9.9-30.3-13.4zM60.4 392.8L91 406.2l4.4-9.6-30.6-13.7zm211.4 38.5l4.4 9.9 30.6-13.4-4.4-9.9zm-39.3 17.5l4.4 9.9 30.6-13.7-4.4-9.6zm118.4-52.2l4.4 9.6 30.6-13.4-4.4-9.9zM170 46.6h-33.5v10.5H170zm-47.2 0H89.2v10.5h33.5zm-47.3 0H42.3v10.5h33.3zm141.5 0h-33.2v10.5H217zm94.5 0H278v10.5h33.5zm47.3 0h-33.5v10.5h33.5zm-94.6 0H231v10.5h33.2zm141.5 0h-33.3v10.5h33.3zM52.8 351.1H42v33.5h10.8zm70-215.9H89.2v10.5h33.5zm-70 10.6h22.8v-10.5H42v33.5h10.8zm168.9 228.6c50.5 0 91.3-40.8 91.3-91.3 0-50.2-40.8-91.3-91.3-91.3-50.2 0-91.3 41.1-91.3 91.3 0 50.5 41.1 91.3 91.3 91.3zm-48.2-111.1c0-25.4 29.5-31.8 49.6-31.8 16.9 0 29.2 5.8 44.3 12l-8.8 16.9h-.9c-6.4-9.9-24.8-13.1-35.6-13.1-9 0-29.8 1.8-29.8 14.9 0 21.6 78.5-10.2 78.5 37.9 0 25.4-31.5 31.2-51 31.2-18.1 0-32.4-2.9-47.2-12.2l9-18.4h.9c6.1 12.2 23.6 14.9 35.9 14.9 8.7 0 32.7-1.2 32.7-14.3 0-26.1-77.6 6.3-77.6-38zM52.8 178.4H42V212h10.8zm342.4 206.2H406v-33.5h-10.8zM52.8 307.9H42v33.5h10.8zM0 3.7v406l221.7 98.6L448 409.7V3.7zm418.8 387.1L222 476.5 29.2 390.8V120.7h389.7v270.1zm0-299.3H29.2V32.9h389.7v58.6zm-366 130.1H42v33.5h10.8zm0 43.2H42v33.5h10.8zM170 135.2h-33.5v10.5H170zm225.2 163.1H406v-33.5h-10.8zm0-43.2H406v-33.5h-10.8zM217 135.2h-33.2v10.5H217zM395.2 212H406v-33.5h-10.8zm0 129.5H406V308h-10.8zm-131-206.3H231v10.5h33.2zm47.3 0H278v10.5h33.5zm83.7 33.6H406v-33.5h-33.5v10.5h22.8zm-36.4-33.6h-33.5v10.5h33.5z\"]\n};\nconst faCodepen = {\n  prefix: 'fab',\n  iconName: 'codepen',\n  icon: [512, 512, [], \"f1cb\", \"M502.285 159.704l-234-156c-7.987-4.915-16.511-4.96-24.571 0l-234 156C3.714 163.703 0 170.847 0 177.989v155.999c0 7.143 3.714 14.286 9.715 18.286l234 156.022c7.987 4.915 16.511 4.96 24.571 0l234-156.022c6-3.999 9.715-11.143 9.715-18.286V177.989c-.001-7.142-3.715-14.286-9.716-18.285zM278 63.131l172.286 114.858-76.857 51.429L278 165.703V63.131zm-44 0v102.572l-95.429 63.715-76.857-51.429L234 63.131zM44 219.132l55.143 36.857L44 292.846v-73.714zm190 229.715L61.714 333.989l76.857-51.429L234 346.275v102.572zm22-140.858l-77.715-52 77.715-52 77.715 52-77.715 52zm22 140.858V346.275l95.429-63.715 76.857 51.429L278 448.847zm190-156.001l-55.143-36.857L468 219.132v73.714z\"]\n};\nconst faGitAlt = {\n  prefix: 'fab',\n  iconName: 'git-alt',\n  icon: [448, 512, [], \"f841\", \"M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z\"]\n};\nconst faLyft = {\n  prefix: 'fab',\n  iconName: 'lyft',\n  icon: [512, 512, [], \"f3c3\", \"M0 81.1h77.8v208.7c0 33.1 15 52.8 27.2 61-12.7 11.1-51.2 20.9-80.2-2.8C7.8 334 0 310.7 0 289V81.1zm485.9 173.5v-22h23.8v-76.8h-26.1c-10.1-46.3-51.2-80.7-100.3-80.7-56.6 0-102.7 46-102.7 102.7V357c16 2.3 35.4-.3 51.7-14 17.1-14 24.8-37.2 24.8-59v-6.7h38.8v-76.8h-38.8v-23.3c0-34.6 52.2-34.6 52.2 0v77.1c0 56.6 46 102.7 102.7 102.7v-76.5c-14.5 0-26.1-11.7-26.1-25.9zm-294.3-99v113c0 15.4-23.8 15.4-23.8 0v-113H91v132.7c0 23.8 8 54 45 63.9 37 9.8 58.2-10.6 58.2-10.6-2.1 13.4-14.5 23.3-34.9 25.3-15.5 1.6-35.2-3.6-45-7.8v70.3c25.1 7.5 51.5 9.8 77.6 4.7 47.1-9.1 76.8-48.4 76.8-100.8V155.1h-77.1v.5z\"]\n};\nconst faRev = {\n  prefix: 'fab',\n  iconName: 'rev',\n  icon: [448, 512, [], \"f5b2\", \"M289.67 274.89a65.57 65.57 0 1 1-65.56-65.56 65.64 65.64 0 0 1 65.56 65.56zm139.55-5.05h-.13a204.69 204.69 0 0 0-74.32-153l-45.38 26.2a157.07 157.07 0 0 1 71.81 131.84C381.2 361.5 310.73 432 224.11 432S67 361.5 67 274.88c0-81.88 63-149.27 143-156.43v39.12l108.77-62.79L210 32v38.32c-106.7 7.25-191 96-191 204.57 0 111.59 89.12 202.29 200.06 205v.11h210.16V269.84z\"]\n};\nconst faWindows = {\n  prefix: 'fab',\n  iconName: 'windows',\n  icon: [448, 512, [], \"f17a\", \"M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z\"]\n};\nconst faWizardsOfTheCoast = {\n  prefix: 'fab',\n  iconName: 'wizards-of-the-coast',\n  icon: [640, 512, [], \"f730\", \"M219.19 345.69c-1.9 1.38-11.07 8.44-.26 23.57 4.64 6.42 14.11 12.79 21.73 6.55 6.5-4.88 7.35-12.92.26-23.04-5.47-7.76-14.28-12.88-21.73-7.08zm336.75 75.94c-.34 1.7-.55 1.67.79 0 2.09-4.19 4.19-10.21 4.98-19.9 3.14-38.49-40.33-71.49-101.34-78.03-54.73-6.02-124.38 9.17-188.8 60.49l-.26 1.57c2.62 4.98 4.98 10.74 3.4 21.21l.79.26c63.89-58.4 131.19-77.25 184.35-73.85 58.4 3.67 100.03 34.04 100.03 68.08-.01 9.96-2.63 15.72-3.94 20.17zM392.28 240.42c.79 7.07 4.19 10.21 9.17 10.47 5.5.26 9.43-2.62 10.47-6.55.79-3.4 2.09-29.85 2.09-29.85s-11.26 6.55-14.93 10.47c-3.66 3.68-7.33 8.39-6.8 15.46zm-50.02-151.1C137.75 89.32 13.1 226.8.79 241.2c-1.05.52-1.31.79.79 1.31 60.49 16.5 155.81 81.18 196.13 202.16l1.05.26c55.25-69.92 140.88-128.05 236.99-128.05 80.92 0 130.15 42.16 130.15 80.39 0 18.33-6.55 33.52-22.26 46.35 0 .96-.2.79.79.79 14.66-10.74 27.5-28.8 27.5-48.18 0-22.78-12.05-38.23-12.05-38.23 7.07 7.07 10.74 16.24 10.74 16.24 5.76-40.85 26.97-62.32 26.97-62.32-2.36-9.69-6.81-17.81-6.81-17.81 7.59 8.12 14.4 27.5 14.4 41.37 0 10.47-3.4 22.78-12.57 31.95l.26.52c8.12-4.98 16.5-16.76 16.5-37.97 0-15.71-4.71-25.92-4.71-25.92 5.76-5.24 11.26-9.17 15.97-11.78.79 3.4 2.09 9.69 2.36 14.93 0 1.05.79 1.83 1.05 0 .79-5.76-.26-16.24-.26-16.5 6.02-3.14 9.69-4.45 9.69-4.45C617.74 176 489.43 89.32 342.26 89.32zm-99.24 289.62c-11.06 8.99-24.2 4.08-30.64-4.19-7.45-9.58-6.76-24.09 4.19-32.47 14.85-11.35 27.08-.49 31.16 5.5.28.39 12.13 16.57-4.71 31.16zm2.09-136.43l9.43-17.81 11.78 70.96-12.57 6.02-24.62-28.8 14.14-26.71 3.67 4.45-1.83-8.11zm18.59 117.58l-.26-.26c2.05-4.1-2.5-6.61-17.54-31.69-1.31-2.36-3.14-2.88-4.45-2.62l-.26-.52c7.86-5.76 15.45-10.21 25.4-15.71l.52.26c1.31 1.83 2.09 2.88 3.4 4.71l-.26.52c-1.05-.26-2.36-.79-5.24.26-2.09.79-7.86 3.67-12.31 7.59v1.31c1.57 2.36 3.93 6.55 5.76 9.69h.26c10.05-6.28 7.56-4.55 11.52-7.86h.26c.52 1.83.52 1.83 1.83 5.5l-.26.26c-3.06.61-4.65.34-11.52 5.5v.26c9.46 17.02 11.01 16.75 12.57 15.97l.26.26c-2.34 1.59-6.27 4.21-9.68 6.57zm55.26-32.47c-3.14 1.57-6.02 2.88-9.95 4.98l-.26-.26c1.29-2.59 1.16-2.71-11.78-32.47l-.26-.26c-.15 0-8.9 3.65-9.95 7.33h-.52l-1.05-5.76.26-.52c7.29-4.56 25.53-11.64 27.76-12.57l.52.26 3.14 4.98-.26.52c-3.53-1.76-7.35.76-12.31 2.62v.26c12.31 32.01 12.67 30.64 14.66 30.64v.25zm44.77-16.5c-4.19 1.05-5.24 1.31-9.69 2.88l-.26-.26.52-4.45c-1.05-3.4-3.14-11.52-3.67-13.62l-.26-.26c-3.4.79-8.9 2.62-12.83 3.93l-.26.26c.79 2.62 3.14 9.95 4.19 13.88.79 2.36 1.83 2.88 2.88 3.14v.52c-3.67 1.05-7.07 2.62-10.21 3.93l-.26-.26c1.05-1.31 1.05-2.88.26-4.98-1.05-3.14-8.12-23.83-9.17-27.23-.52-1.83-1.57-3.14-2.62-3.14v-.52c3.14-1.05 6.02-2.09 10.74-3.4l.26.26-.26 4.71c1.31 3.93 2.36 7.59 3.14 9.69h.26c3.93-1.31 9.43-2.88 12.83-3.93l.26-.26-2.62-9.43c-.52-1.83-1.05-3.4-2.62-3.93v-.26c4.45-1.05 7.33-1.83 10.74-2.36l.26.26c-1.05 1.31-1.05 2.88-.52 4.45 1.57 6.28 4.71 20.43 6.28 26.45.54 2.62 1.85 3.41 2.63 3.93zm32.21-6.81l-.26.26c-4.71.52-14.14 2.36-22.52 4.19l-.26-.26.79-4.19c-1.57-7.86-3.4-18.59-4.98-26.19-.26-1.83-.79-2.88-2.62-3.67l.79-.52c9.17-1.57 20.16-2.36 24.88-2.62l.26.26c.52 2.36.79 3.14 1.57 5.5l-.26.26c-1.14-1.14-3.34-3.2-16.24-.79l-.26.26c.26 1.57 1.05 6.55 1.57 9.95l.26.26c9.52-1.68 4.76-.06 10.74-2.36h.26c0 1.57-.26 1.83-.26 5.24h-.26c-4.81-1.03-2.15-.9-10.21 0l-.26.26c.26 2.09 1.57 9.43 2.09 12.57l.26.26c1.15.38 14.21-.65 16.24-4.71h.26c-.53 2.38-1.05 4.21-1.58 6.04zm10.74-44.51c-4.45 2.36-8.12 2.88-11 2.88-.25.02-11.41 1.09-17.54-9.95-6.74-10.79-.98-25.2 5.5-31.69 8.8-8.12 23.35-10.1 28.54-17.02 8.03-10.33-13.04-22.31-29.59-5.76l-2.62-2.88 5.24-16.24c25.59-1.57 45.2-3.04 50.02 16.24.79 3.14 0 9.43-.26 12.05 0 2.62-1.83 18.85-2.09 23.04-.52 4.19-.79 18.33-.79 20.69.26 2.36.52 4.19 1.57 5.5 1.57 1.83 5.76 1.83 5.76 1.83l-.79 4.71c-11.82-1.07-10.28-.59-20.43-1.05-3.22-5.15-2.23-3.28-4.19-7.86 0 .01-4.19 3.94-7.33 5.51zm37.18 21.21c-6.35-10.58-19.82-7.16-21.73 5.5-2.63 17.08 14.3 19.79 20.69 10.21l.26.26c-.52 1.83-1.83 6.02-1.83 6.28l-.52.52c-10.3 6.87-28.5-2.5-25.66-18.59 1.94-10.87 14.44-18.93 28.8-9.95l.26.52c0 1.06-.27 3.41-.27 5.25zm5.77-87.73v-6.55c.69 0 19.65 3.28 27.76 7.33l-1.57 17.54s10.21-9.43 15.45-10.74c5.24-1.57 14.93 7.33 14.93 7.33l-11.26 11.26c-12.07-6.35-19.59-.08-20.69.79-5.29 38.72-8.6 42.17 4.45 46.09l-.52 4.71c-17.55-4.29-18.53-4.5-36.92-7.33l.79-4.71c7.25 0 7.48-5.32 7.59-6.81 0 0 4.98-53.16 4.98-55.25-.02-2.87-4.99-3.66-4.99-3.66zm10.99 114.44c-8.12-2.09-14.14-11-10.74-20.69 3.14-9.43 12.31-12.31 18.85-10.21 9.17 2.62 12.83 11.78 10.74 19.38-2.61 8.9-9.42 13.87-18.85 11.52zm42.16 9.69c-2.36-.52-7.07-2.36-8.64-2.88v-.26l1.57-1.83c.59-8.24.59-7.27.26-7.59-4.82-1.81-6.66-2.36-7.07-2.36-1.31 1.83-2.88 4.45-3.67 5.5l-.79 3.4v.26c-1.31-.26-3.93-1.31-6.02-1.57v-.26l2.62-1.83c3.4-4.71 9.95-14.14 13.88-20.16v-2.09l.52-.26c2.09.79 5.5 2.09 7.59 2.88.48.48.18-1.87-1.05 25.14-.24 1.81.02 2.6.8 3.91zm-4.71-89.82c11.25-18.27 30.76-16.19 34.04-3.4L539.7 198c2.34-6.25-2.82-9.9-4.45-11.26l1.83-3.67c12.22 10.37 16.38 13.97 22.52 20.43-25.91 73.07-30.76 80.81-24.62 84.32l-1.83 4.45c-6.37-3.35-8.9-4.42-17.81-8.64l2.09-6.81c-.26-.26-3.93 3.93-9.69 3.67-19.06-1.3-22.89-31.75-9.67-52.9zm29.33 79.34c0-5.71-6.34-7.89-7.86-5.24-1.31 2.09 1.05 4.98 2.88 8.38 1.57 2.62 2.62 6.28 1.05 9.43-2.64 6.34-12.4 5.31-15.45-.79 0-.7-.27.09 1.83-4.71l.79-.26c-.57 5.66 6.06 9.61 8.38 4.98 1.05-2.09-.52-5.5-2.09-8.38-1.57-2.62-3.67-6.28-1.83-9.69 2.72-5.06 11.25-4.47 14.66 2.36v.52l-2.36 3.4zm21.21 13.36c-1.96-3.27-.91-2.14-4.45-4.71h-.26c-2.36 4.19-5.76 10.47-8.64 16.24-1.31 2.36-1.05 3.4-.79 3.93l-.26.26-5.76-4.45.26-.26 2.09-1.31c3.14-5.76 6.55-12.05 9.17-17.02v-.26c-2.64-1.98-1.22-1.51-6.02-1.83v-.26l3.14-3.4h.26c3.67 2.36 9.95 6.81 12.31 8.9l.26.26-1.31 3.91zm27.23-44.26l-2.88-2.88c.79-2.36 1.83-4.98 2.09-7.59.75-9.74-11.52-11.84-11.52-4.98 0 4.98 7.86 19.38 7.86 27.76 0 10.21-5.76 15.71-13.88 16.5-8.38.79-20.16-10.47-20.16-10.47l4.98-14.4 2.88 2.09c-2.97 17.8 17.68 20.37 13.35 5.24-1.06-4.02-18.75-34.2 2.09-38.23 13.62-2.36 23.04 16.5 23.04 16.5l-7.85 10.46zm35.62-10.21c-11-30.38-60.49-127.53-191.95-129.62-53.42-1.05-94.27 15.45-132.76 37.97l85.63-9.17-91.39 20.69 25.14 19.64-3.93-16.5c7.5-1.71 39.15-8.45 66.77-8.9l-22.26 80.39c13.61-.7 18.97-8.98 19.64-22.78l4.98-1.05.26 26.71c-22.46 3.21-37.3 6.69-49.49 9.95l13.09-43.21-61.54-36.66 2.36 8.12 10.21 4.98c6.28 18.59 19.38 56.56 20.43 58.66 1.95 4.28 3.16 5.78 12.05 4.45l1.05 4.98c-16.08 4.86-23.66 7.61-39.02 14.4l-2.36-4.71c4.4-2.94 8.73-3.94 5.5-12.83-23.7-62.5-21.48-58.14-22.78-59.44l2.36-4.45 33.52 67.3c-3.84-11.87 1.68 1.69-32.99-78.82l-41.9 88.51 4.71-13.88-35.88-42.16 27.76 93.48-11.78 8.38C95 228.58 101.05 231.87 93.23 231.52c-5.5-.26-13.62 5.5-13.62 5.5L74.63 231c30.56-23.53 31.62-24.33 58.4-42.68l4.19 7.07s-5.76 4.19-7.86 7.07c-5.9 9.28 1.67 13.28 61.8 75.68l-18.85-58.92 39.8-10.21 25.66 30.64 4.45-12.31-4.98-24.62 13.09-3.4.52 3.14 3.67-10.47-94.27 29.33 11.26-4.98-13.62-42.42 17.28-9.17 30.11 36.14 28.54-13.09c-1.41-7.47-2.47-14.5-4.71-19.64l17.28 13.88 4.71-2.09-59.18-42.68 23.08 11.5c18.98-6.07 25.23-7.47 32.21-9.69l2.62 11c-12.55 12.55 1.43 16.82 6.55 19.38l-13.62-61.01 12.05 28.28c4.19-1.31 7.33-2.09 7.33-2.09l2.62 8.64s-3.14 1.05-6.28 2.09l8.9 20.95 33.78-65.73-20.69 61.01c42.42-24.09 81.44-36.66 131.98-35.88 67.04 1.05 167.33 40.85 199.8 139.83.78 2.1-.01 2.63-.79.27zM203.48 152.43s1.83-.52 4.19-1.31l9.43 7.59c-.4 0-3.44-.25-11.26 2.36l-2.36-8.64zm143.76 38.5c-1.57-.6-26.46-4.81-33.26 20.69l21.73 17.02 11.53-37.71zM318.43 67.07c-58.4 0-106.05 12.05-114.96 14.4v.79c8.38 2.09 14.4 4.19 21.21 11.78l1.57.26c6.55-1.83 48.97-13.88 110.24-13.88 180.16 0 301.67 116.79 301.67 223.37v9.95c0 1.31.79 2.62 1.05.52.52-2.09.79-8.64.79-19.64.26-83.79-96.63-227.55-321.57-227.55zm211.06 169.68c1.31-5.76 0-12.31-7.33-13.09-9.62-1.13-16.14 23.79-17.02 33.52-.79 5.5-1.31 14.93 6.02 14.93 4.68-.01 9.72-.91 18.33-35.36zm-61.53 42.95c-2.62-.79-9.43-.79-12.57 10.47-1.83 6.81.52 13.35 6.02 14.66 3.67 1.05 8.9.52 11.78-10.74 2.62-9.94-1.83-13.61-5.23-14.39zM491 300.65c1.83.52 3.14 1.05 5.76 1.83 0-1.83.52-8.38.79-12.05-1.05 1.31-5.5 8.12-6.55 9.95v.27z\"]\n};\nconst faSquareViadeo = {\n  prefix: 'fab',\n  iconName: 'square-viadeo',\n  icon: [448, 512, [\"viadeo-square\"], \"f2aa\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM118.3 381.2c-68-73.6-19.8-196.1 81.2-196.1c13.3 0 26.6 2.1 39.1 6.7c-4.3 8.4-7.3 17.6-8.4 27.1c-9.7-4.1-20.2-6-30.7-6c-48.8 0-84.6 41.7-84.6 88.9c0 43 28.5 78.7 69.5 85.9c61.5-24 72.9-117.6 72.9-175v0c0-7.3 0-14.8-.6-22.1c-11.2-32.9-26.6-64.6-44.2-94.5c27.1 18.3 41.9 62.5 44.2 94.1v.4c7.7 22.5 11.8 46.2 11.8 70c0 54.1-21.9 99-68.3 128.2l-2.4 .2c50 1 86.2-38.6 86.2-87.2c0-12.2-2.1-24.3-6.9-35.7c9.5-1.9 18.5-5.6 26.4-10.5c15.3 36.6 12.6 87.3-22.8 125.6c-42.4 46.2-120 46.6-162.4 0zM274.6 217.6c21.9-12 49.6-30.7 62.3-53c1.5-3 4.1-8.6 4.5-12c-12.5 27.9-44.2 49.8-73.9 56.7c-4.7-7.3-7.5-15.5-7.5-24.3c0-10.3 5.2-24.1 12.9-31.6c8.3-7.9 18-10.9 27.9-14.1c16-5.1 32.5-10.3 44.5-35.9c32.5 46.2 13.1 130.3-36.3 130.3c-13.3 0-25.1-7.1-34.4-16.1z\"]\n};\nconst faViadeoSquare = faSquareViadeo;\nconst faMeetup = {\n  prefix: 'fab',\n  iconName: 'meetup',\n  icon: [512, 512, [], \"f2e0\", \"M99 414.3c1.1 5.7-2.3 11.1-8 12.3-5.4 1.1-10.9-2.3-12-8-1.1-5.4 2.3-11.1 7.7-12.3 5.4-1.2 11.1 2.3 12.3 8zm143.1 71.4c-6.3 4.6-8 13.4-3.7 20 4.6 6.6 13.4 8.3 20 3.7 6.3-4.6 8-13.4 3.4-20-4.2-6.5-13.1-8.3-19.7-3.7zm-86-462.3c6.3-1.4 10.3-7.7 8.9-14-1.1-6.6-7.4-10.6-13.7-9.1-6.3 1.4-10.3 7.7-9.1 14 1.4 6.6 7.6 10.6 13.9 9.1zM34.4 226.3c-10-6.9-23.7-4.3-30.6 6-6.9 10-4.3 24 5.7 30.9 10 7.1 23.7 4.6 30.6-5.7 6.9-10.4 4.3-24.1-5.7-31.2zm272-170.9c10.6-6.3 13.7-20 7.7-30.3-6.3-10.6-19.7-14-30-7.7s-13.7 20-7.4 30.6c6 10.3 19.4 13.7 29.7 7.4zm-191.1 58c7.7-5.4 9.4-16 4.3-23.7s-15.7-9.4-23.1-4.3c-7.7 5.4-9.4 16-4.3 23.7 5.1 7.8 15.6 9.5 23.1 4.3zm372.3 156c-7.4 1.7-12.3 9.1-10.6 16.9 1.4 7.4 8.9 12.3 16.3 10.6 7.4-1.4 12.3-8.9 10.6-16.6-1.5-7.4-8.9-12.3-16.3-10.9zm39.7-56.8c-1.1-5.7-6.6-9.1-12-8-5.7 1.1-9.1 6.9-8 12.6 1.1 5.4 6.6 9.1 12.3 8 5.4-1.5 9.1-6.9 7.7-12.6zM447 138.9c-8.6 6-10.6 17.7-4.9 26.3 5.7 8.6 17.4 10.6 26 4.9 8.3-6 10.3-17.7 4.6-26.3-5.7-8.7-17.4-10.9-25.7-4.9zm-6.3 139.4c26.3 43.1 15.1 100-26.3 129.1-17.4 12.3-37.1 17.7-56.9 17.1-12 47.1-69.4 64.6-105.1 32.6-1.1.9-2.6 1.7-3.7 2.9-39.1 27.1-92.3 17.4-119.4-22.3-9.7-14.3-14.6-30.6-15.1-46.9-65.4-10.9-90-94-41.1-139.7-28.3-46.9.6-107.4 53.4-114.9C151.6 70 234.1 38.6 290.1 82c67.4-22.3 136.3 29.4 130.9 101.1 41.1 12.6 52.8 66.9 19.7 95.2zm-70 74.3c-3.1-20.6-40.9-4.6-43.1-27.1-3.1-32 43.7-101.1 40-128-3.4-24-19.4-29.1-33.4-29.4-13.4-.3-16.9 2-21.4 4.6-2.9 1.7-6.6 4.9-11.7-.3-6.3-6-11.1-11.7-19.4-12.9-12.3-2-17.7 2-26.6 9.7-3.4 2.9-12 12.9-20 9.1-3.4-1.7-15.4-7.7-24-11.4-16.3-7.1-40 4.6-48.6 20-12.9 22.9-38 113.1-41.7 125.1-8.6 26.6 10.9 48.6 36.9 47.1 11.1-.6 18.3-4.6 25.4-17.4 4-7.4 41.7-107.7 44.6-112.6 2-3.4 8.9-8 14.6-5.1 5.7 3.1 6.9 9.4 6 15.1-1.1 9.7-28 70.9-28.9 77.7-3.4 22.9 26.9 26.6 38.6 4 3.7-7.1 45.7-92.6 49.4-98.3 4.3-6.3 7.4-8.3 11.7-8 3.1 0 8.3.9 7.1 10.9-1.4 9.4-35.1 72.3-38.9 87.7-4.6 20.6 6.6 41.4 24.9 50.6 11.4 5.7 62.5 15.7 58.5-11.1zm5.7 92.3c-10.3 7.4-12.9 22-5.7 32.6 7.1 10.6 21.4 13.1 32 6 10.6-7.4 13.1-22 6-32.6-7.4-10.6-21.7-13.5-32.3-6z\"]\n};\nconst faCentos = {\n  prefix: 'fab',\n  iconName: 'centos',\n  icon: [448, 512, [], \"f789\", \"M289.6 97.5l31.6 31.7-76.3 76.5V97.5zm-162.4 31.7l76.3 76.5V97.5h-44.7zm41.5-41.6h44.7v127.9l10.8 10.8 10.8-10.8V87.6h44.7L224.2 32zm26.2 168.1l-10.8-10.8H55.5v-44.8L0 255.7l55.5 55.6v-44.8h128.6l10.8-10.8zm79.3-20.7h107.9v-44.8l-31.6-31.7zm173.3 20.7L392 200.1v44.8H264.3l-10.8 10.8 10.8 10.8H392v44.8l55.5-55.6zM65.4 176.2l32.5-31.7 90.3 90.5h15.3v-15.3l-90.3-90.5 31.6-31.7H65.4zm316.7-78.7h-78.5l31.6 31.7-90.3 90.5V235h15.3l90.3-90.5 31.6 31.7zM203.5 413.9V305.8l-76.3 76.5 31.6 31.7h44.7zM65.4 235h108.8l-76.3-76.5-32.5 31.7zm316.7 100.2l-31.6 31.7-90.3-90.5h-15.3v15.3l90.3 90.5-31.6 31.7h78.5zm0-58.8H274.2l76.3 76.5 31.6-31.7zm-60.9 105.8l-76.3-76.5v108.1h44.7zM97.9 352.9l76.3-76.5H65.4v44.8zm181.8 70.9H235V295.9l-10.8-10.8-10.8 10.8v127.9h-44.7l55.5 55.6zm-166.5-41.6l90.3-90.5v-15.3h-15.3l-90.3 90.5-32.5-31.7v78.7h79.4z\"]\n};\nconst faAdn = {\n  prefix: 'fab',\n  iconName: 'adn',\n  icon: [496, 512, [], \"f170\", \"M248 167.5l64.9 98.8H183.1l64.9-98.8zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-99.8 82.7L248 115.5 99.8 338.7h30.4l33.6-51.7h168.6l33.6 51.7h30.2z\"]\n};\nconst faCloudsmith = {\n  prefix: 'fab',\n  iconName: 'cloudsmith',\n  icon: [512, 512, [], \"f384\", \"M512 227.6v56.9L284.4 512H227.6L0 284.4V227.6L227.6 0h56.9L512 227.6zm-256 162a133.6 133.6 0 1 0 0-267.1 133.6 133.6 0 1 0 0 267.1z\"]\n};\nconst faOpensuse = {\n  prefix: 'fab',\n  iconName: 'opensuse',\n  icon: [640, 512, [], \"e62b\", \"M471.1 102.7s-.3 18.3-.3 20.3c-9.1-3-74.4-24.1-135.7-26.3c-51.9-1.8-122.8-4.3-223 57.3c-19.4 12.4-73.9 46.1-99.6 109.7C7 277-.1 307 7 335.1c3.3 12.8 8.9 24.9 16.5 35.7c17.4 25 46.6 41.6 78.1 44.4c44.4 3.9 78.1-16 90-53.3c8.2-25.8 0-63.6-31.5-82.9c-25.6-15.7-53.3-12.1-69.2-1.6c-13.9 9.2-21.8 23.5-21.6 39.2c.3 27.8 24.3 42.6 41.5 42.6c5.4 0 10.7-.9 15.8-2.7c6.5-1.8 13.3-6.5 13.3-14.9c0-12.1-11.6-14.8-16.8-13.9c-2.9 .5-4.5 2-11.8 2.4c-2-.2-12-3.1-12-14V316c.2-12.3 13.2-18 25.5-16.9c32.3 2.8 47.7 40.7 28.5 65.7C135 388.5 76.7 388 53.6 344.4c-26-49.2 12.7-111.2 87-98.4c33.2 5.7 83.6 35.5 102.4 104.3h45.9c-5.7-17.6-8.9-68.3 42.7-68.3c56.7 0 63.9 39.9 79.8 68.3H460c-12.8-18.3-21.7-38.7-18.9-55.8c5.6-33.8 39.7-18.4 82.4-17.4c66.5 .4 102.1-27 103.1-28c3.7-3.1 6.5-15.8 7-17.7c1.3-5.1-3.2-2.4-3.2-2.4c-8.7 5.2-30.5 15.2-50.9 15.6c-25.3 .5-76.2-25.4-81.6-28.2c-.3-.4 .1 1.2-11-25.5c88.4 58.3 118.3 40.5 145.2 21.7c.8-.6 4.3-2.9 3.6-5.7c-13.8-48.1-22.4-62.7-34.5-69.6c-37-21.6-125-34.7-129.2-35.3c.1-.1-.9-.3-.9 .7l0 0zm135.6 75.4a37.6 37.6 0 1 1 -75.2-2.6 37.6 37.6 0 1 1 75.2 2.6zm-36.6-27.9a26.3 26.3 0 1 0 -1.7 52.5 26.3 26.3 0 1 0 1.7-52.5zm4.3 28.8c-15.4 0-15.4-15.6 0-15.6s15.4 15.6 0 15.6v0z\"]\n};\nconst faPiedPiperAlt = {\n  prefix: 'fab',\n  iconName: 'pied-piper-alt',\n  icon: [576, 512, [], \"f1a8\", \"M244 246c-3.2-2-6.3-2.9-10.1-2.9-6.6 0-12.6 3.2-19.3 3.7l1.7 4.9zm135.9 197.9c-19 0-64.1 9.5-79.9 19.8l6.9 45.1c35.7 6.1 70.1 3.6 106-9.8-4.8-10-23.5-55.1-33-55.1zM340.8 177c6.6 2.8 11.5 9.2 22.7 22.1 2-1.4 7.5-5.2 7.5-8.6 0-4.9-11.8-13.2-13.2-23 11.2-5.7 25.2-6 37.6-8.9 68.1-16.4 116.3-52.9 146.8-116.7C548.3 29.3 554 16.1 554.6 2l-2 2.6c-28.4 50-33 63.2-81.3 100-31.9 24.4-69.2 40.2-106.6 54.6l-6.3-.3v-21.8c-19.6 1.6-19.7-14.6-31.6-23-18.7 20.6-31.6 40.8-58.9 51.1-12.7 4.8-19.6 10-25.9 21.8 34.9-16.4 91.2-13.5 98.8-10zM555.5 0l-.6 1.1-.3.9.6-.6zm-59.2 382.1c-33.9-56.9-75.3-118.4-150-115.5l-.3-6c-1.1-13.5 32.8 3.2 35.1-31l-14.4 7.2c-19.8-45.7-8.6-54.3-65.5-54.3-14.7 0-26.7 1.7-41.4 4.6 2.9 18.6 2.2 36.7-10.9 50.3l19.5 5.5c-1.7 3.2-2.9 6.3-2.9 9.8 0 21 42.8 2.9 42.8 33.6 0 18.4-36.8 60.1-54.9 60.1-8 0-53.7-50-53.4-60.1l.3-4.6 52.3-11.5c13-2.6 12.3-22.7-2.9-22.7-3.7 0-43.1 9.2-49.4 10.6-2-5.2-7.5-14.1-13.8-14.1-3.2 0-6.3 3.2-9.5 4-9.2 2.6-31 2.9-21.5 20.1L15.9 298.5c-5.5 1.1-8.9 6.3-8.9 11.8 0 6 5.5 10.9 11.5 10.9 8 0 131.3-28.4 147.4-32.2 2.6 3.2 4.6 6.3 7.8 8.6 20.1 14.4 59.8 85.9 76.4 85.9 24.1 0 58-22.4 71.3-41.9 3.2-4.3 6.9-7.5 12.4-6.9.6 13.8-31.6 34.2-33 43.7-1.4 10.2-1 35.2-.3 41.1 26.7 8.1 52-3.6 77.9-2.9 4.3-21 10.6-41.9 9.8-63.5l-.3-9.5c-1.4-34.2-10.9-38.5-34.8-58.6-1.1-1.1-2.6-2.6-3.7-4 2.2-1.4 1.1-1 4.6-1.7 88.5 0 56.3 183.6 111.5 229.9 33.1-15 72.5-27.9 103.5-47.2-29-25.6-52.6-45.7-72.7-79.9zm-196.2 46.1v27.2l11.8-3.4-2.9-23.8zm-68.7-150.4l24.1 61.2 21-13.8-31.3-50.9zm84.4 154.9l2 12.4c9-1.5 58.4-6.6 58.4-14.1 0-1.4-.6-3.2-.9-4.6-26.8 0-36.9 3.8-59.5 6.3z\"]\n};\nconst faSquareDribbble = {\n  prefix: 'fab',\n  iconName: 'square-dribbble',\n  icon: [448, 512, [\"dribbble-square\"], \"f397\", \"M165.9 132.5c-38.3 18-66.8 53.3-75.7 95.7c6.1 .1 62.4 .3 126.4-16.7c-22.7-40.2-47.1-74.1-50.7-79zm26.1-9.1c3.8 5.1 28.6 38.9 51 80c48.6-18.3 69.1-45.9 71.6-49.4C281 124.2 235.3 112.9 192 123.4zM277.4 382c-2-12-10-53.8-29.2-103.6c-55.1 18.8-93.8 56.4-108.1 85.6c40.5 31.6 93.3 36.7 137.3 18zM227.8 232.6C159.6 253 93.4 252.2 87.4 252c0 .7 0 1.4 0 2.1s0 1.4 0 2.1c0 35.1 13.3 67.1 35.1 91.4c22.2-37.9 67.1-77.9 116.5-91.8c-3.4-7.8-7.2-15.5-11.1-23.2zm72.5 136.9c30.7-20.7 52.5-53.6 58.6-91.6c-4.6-1.5-42.3-12.7-85.1-5.8c17.9 49.1 25.1 89.1 26.5 97.4zm-34.8-119c45.5-5.7 90.7 3.4 95.2 4.4c-.3-32.3-11.8-61.9-30.9-85.1c-2.9 3.9-25.8 33.2-76.3 53.9c4.8 9.8 8.3 17.8 12 26.8zM384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zM224 416a160 160 0 1 1 0-320 160 160 0 1 1 0 320z\"]\n};\nconst faDribbbleSquare = faSquareDribbble;\nconst faCodiepie = {\n  prefix: 'fab',\n  iconName: 'codiepie',\n  icon: [472, 512, [], \"f284\", \"M422.5 202.9c30.7 0 33.5 53.1-.3 53.1h-10.8v44.3h-26.6v-97.4h37.7zM472 352.6C429.9 444.5 350.4 504 248 504 111 504 0 393 0 256S111 8 248 8c97.4 0 172.8 53.7 218.2 138.4l-186 108.8L472 352.6zm-38.5 12.5l-60.3-30.7c-27.1 44.3-70.4 71.4-122.4 71.4-82.5 0-149.2-66.7-149.2-148.9 0-82.5 66.7-149.2 149.2-149.2 48.4 0 88.9 23.5 116.9 63.4l59.5-34.6c-40.7-62.6-104.7-100-179.2-100-121.2 0-219.5 98.3-219.5 219.5S126.8 475.5 248 475.5c78.6 0 146.5-42.1 185.5-110.4z\"]\n};\nconst faNode = {\n  prefix: 'fab',\n  iconName: 'node',\n  icon: [640, 512, [], \"f419\", \"M316.3 452c-2.1 0-4.2-.6-6.1-1.6L291 439c-2.9-1.6-1.5-2.2-.5-2.5 3.8-1.3 4.6-1.6 8.7-4 .4-.2 1-.1 1.4.1l14.8 8.8c.5.3 1.3.3 1.8 0L375 408c.5-.3.9-.9.9-1.6v-66.7c0-.7-.3-1.3-.9-1.6l-57.8-33.3c-.5-.3-1.2-.3-1.8 0l-57.8 33.3c-.6.3-.9 1-.9 1.6v66.7c0 .6.4 1.2.9 1.5l15.8 9.1c8.6 4.3 13.9-.8 13.9-5.8v-65.9c0-.9.7-1.7 1.7-1.7h7.3c.9 0 1.7.7 1.7 1.7v65.9c0 11.5-6.2 18-17.1 18-3.3 0-6 0-13.3-3.6l-15.2-8.7c-3.7-2.2-6.1-6.2-6.1-10.5v-66.7c0-4.3 2.3-8.4 6.1-10.5l57.8-33.4c3.7-2.1 8.5-2.1 12.1 0l57.8 33.4c3.7 2.2 6.1 6.2 6.1 10.5v66.7c0 4.3-2.3 8.4-6.1 10.5l-57.8 33.4c-1.7 1.1-3.8 1.7-6 1.7zm46.7-65.8c0-12.5-8.4-15.8-26.2-18.2-18-2.4-19.8-3.6-19.8-7.8 0-3.5 1.5-8.1 14.8-8.1 11.9 0 16.3 2.6 18.1 10.6.2.8.8 1.3 1.6 1.3h7.5c.5 0 .9-.2 1.2-.5.3-.4.5-.8.4-1.3-1.2-13.8-10.3-20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.5.2-1.1.2-1.7zm-74.3-124.9l-.8.5h1.1l-.3-.5zm76.2 130.2l-.4-.7v.9l.4-.2z\"]\n};\nconst faMix = {\n  prefix: 'fab',\n  iconName: 'mix',\n  icon: [448, 512, [], \"f3cb\", \"M0 64v348.9c0 56.2 88 58.1 88 0V174.3c7.9-52.9 88-50.4 88 6.5v175.3c0 57.9 96 58 96 0V240c5.3-54.7 88-52.5 88 4.3v23.8c0 59.9 88 56.6 88 0V64H0z\"]\n};\nconst faSteam = {\n  prefix: 'fab',\n  iconName: 'steam',\n  icon: [496, 512, [], \"f1b6\", \"M496 256c0 137-111.2 248-248.4 248-113.8 0-209.6-76.3-239-180.4l95.2 39.3c6.4 32.1 34.9 56.4 68.9 56.4 39.2 0 71.9-32.4 70.2-73.5l84.5-60.2c52.1 1.3 95.8-40.9 95.8-93.5 0-51.6-42-93.5-93.7-93.5s-93.7 42-93.7 93.5v1.2L176.6 279c-15.5-.9-30.7 3.4-43.5 12.1L0 236.1C10.2 108.4 117.1 8 247.6 8 384.8 8 496 119 496 256zM155.7 384.3l-30.5-12.6a52.79 52.79 0 0 0 27.2 25.8c26.9 11.2 57.8-1.6 69-28.4 5.4-13 5.5-27.3.1-40.3-5.4-13-15.5-23.2-28.5-28.6-12.9-5.4-26.7-5.2-38.9-.6l31.5 13c19.8 8.2 29.2 30.9 20.9 50.7-8.3 19.9-31 29.2-50.8 21zm173.8-129.9c-34.4 0-62.4-28-62.4-62.3s28-62.3 62.4-62.3 62.4 28 62.4 62.3-27.9 62.3-62.4 62.3zm.1-15.6c25.9 0 46.9-21 46.9-46.8 0-25.9-21-46.8-46.9-46.8s-46.9 21-46.9 46.8c.1 25.8 21.1 46.8 46.9 46.8z\"]\n};\nconst faCcApplePay = {\n  prefix: 'fab',\n  iconName: 'cc-apple-pay',\n  icon: [576, 512, [], \"f416\", \"M302.2 218.4c0 17.2-10.5 27.1-29 27.1h-24.3v-54.2h24.4c18.4 0 28.9 9.8 28.9 27.1zm47.5 62.6c0 8.3 7.2 13.7 18.5 13.7 14.4 0 25.2-9.1 25.2-21.9v-7.7l-23.5 1.5c-13.3.9-20.2 5.8-20.2 14.4zM576 79v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM127.8 197.2c8.4.7 16.8-4.2 22.1-10.4 5.2-6.4 8.6-15 7.7-23.7-7.4.3-16.6 4.9-21.9 11.3-4.8 5.5-8.9 14.4-7.9 22.8zm60.6 74.5c-.2-.2-19.6-7.6-19.8-30-.2-18.7 15.3-27.7 16-28.2-8.8-13-22.4-14.4-27.1-14.7-12.2-.7-22.6 6.9-28.4 6.9-5.9 0-14.7-6.6-24.3-6.4-12.5.2-24.2 7.3-30.5 18.6-13.1 22.6-3.4 56 9.3 74.4 6.2 9.1 13.7 19.1 23.5 18.7 9.3-.4 13-6 24.2-6 11.3 0 14.5 6 24.3 5.9 10.2-.2 16.5-9.1 22.8-18.2 6.9-10.4 9.8-20.4 10-21zm135.4-53.4c0-26.6-18.5-44.8-44.9-44.8h-51.2v136.4h21.2v-46.6h29.3c26.8 0 45.6-18.4 45.6-45zm90 23.7c0-19.7-15.8-32.4-40-32.4-22.5 0-39.1 12.9-39.7 30.5h19.1c1.6-8.4 9.4-13.9 20-13.9 13 0 20.2 6 20.2 17.2v7.5l-26.4 1.6c-24.6 1.5-37.9 11.6-37.9 29.1 0 17.7 13.7 29.4 33.4 29.4 13.3 0 25.6-6.7 31.2-17.4h.4V310h19.6v-68zM516 210.9h-21.5l-24.9 80.6h-.4l-24.9-80.6H422l35.9 99.3-1.9 6c-3.2 10.2-8.5 14.2-17.9 14.2-1.7 0-4.9-.2-6.2-.3v16.4c1.2.4 6.5.5 8.1.5 20.7 0 30.4-7.9 38.9-31.8L516 210.9z\"]\n};\nconst faScribd = {\n  prefix: 'fab',\n  iconName: 'scribd',\n  icon: [384, 512, [], \"f28a\", \"M42.3 252.7c-16.1-19-24.7-45.9-24.8-79.9 0-100.4 75.2-153.1 167.2-153.1 98.6-1.6 156.8 49 184.3 70.6l-50.5 72.1-37.3-24.6 26.9-38.6c-36.5-24-79.4-36.5-123-35.8-50.7-.8-111.7 27.2-111.7 76.2 0 18.7 11.2 20.7 28.6 15.6 23.3-5.3 41.9.6 55.8 14 26.4 24.3 23.2 67.6-.7 91.9-29.2 29.5-85.2 27.3-114.8-8.4zm317.7 5.9c-15.5-18.8-38.9-29.4-63.2-28.6-38.1-2-71.1 28-70.5 67.2-.7 16.8 6 33 18.4 44.3 14.1 13.9 33 19.7 56.3 14.4 17.4-5.1 28.6-3.1 28.6 15.6 0 4.3-.5 8.5-1.4 12.7-16.7 40.9-59.5 64.4-121.4 64.4-51.9.2-102.4-16.4-144.1-47.3l33.7-39.4-35.6-27.4L0 406.3l15.4 13.8c52.5 46.8 120.4 72.5 190.7 72.2 51.4 0 94.4-10.5 133.6-44.1 57.1-51.4 54.2-149.2 20.3-189.6z\"]\n};\nconst faDebian = {\n  prefix: 'fab',\n  iconName: 'debian',\n  icon: [448, 512, [], \"e60b\", \"M380.2 245.6c3-7.6 5.5-14 5.2-24.4l-4.3 9c4.4-13.2 4-27.1 3.6-40.4c-.2-6-.3-11.8 0-17.4l-1.8-.5c-1.5-45.2-40.6-93.1-75.3-109.4c-30-13.8-76.1-16.2-97.3-5.8c1.3-1.1 4.2-2 6.8-2.7l.3-.1c3.3-1 6-1.7 4-2.9c-19.2 1.9-24.9 5.5-31.1 9.4l-.1 0c-4.6 2.9-9.5 6-20.3 8.7c-3.5 3.4 1.7 2 5.8 .9l0 0c4.1-1.1 7.2-1.9-.1 2.4c-3.5 1-6.6 1.3-9.6 1.6l-.1 0c-8.3 .8-15.8 1.6-30.7 17c.8 1.3 3.4-.2 5.3-1.3l.1-.1c2.3-1.4 3.4-2-1.7 4.4c-19.1-2.4-60.3 43.7-69.1 59l4.6 .8c-3.2 8-6.8 14.8-10 20.8c-4.3 8.1-7.9 14.9-8.7 21.3c-.3 5.1-1 11-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, 512, [], \"f19b\", \"M271.5 432l-68 32C88.5 453.7 0 392.5 0 318.2c0-71.5 82.5-131 191.7-144.3v43c-71.5 12.5-124 53-124 101.3 0 51 58.5 93.3 135.7 103v-340l68-33.2v384zM448 291l-131.3-28.5 36.8-20.7c-19.5-11.5-43.5-20-70-24.8v-43c46.2 5.5 87.7 19.5 120.3 39.3l35-19.8L448 291z\"]\n};\nconst faInstalod = {\n  prefix: 'fab',\n  iconName: 'instalod',\n  icon: [512, 512, [], \"e081\", \"M153.384,480H387.113L502.554,275.765,204.229,333.211ZM504.726,240.078,387.113,32H155.669L360.23,267.9ZM124.386,48.809,7.274,256,123.236,461.154,225.627,165.561Z\"]\n};\nconst faFilesPinwheel = {\n  prefix: 'fab',\n  iconName: 'files-pinwheel',\n  icon: [512, 512, [], \"e69f\", \"M253.2 246.4L136.9 130.2c-.6-.6-1-1.3-1.4-2s-.5-1.6-.5-2.4s.2-1.6 .5-2.4s.8-1.4 1.4-2L253.3 5.1c.9-.9 2-1.5 3.2-1.7s2.5-.1 3.6 .3s2.1 1.3 2.8 2.3s1.1 2.2 1.1 3.5L264 242c0 1.3-.3 2.5-1 3.6s-1.7 1.9-2.9 2.4s-2.5 .6-3.7 .3s-2.4-.9-3.2-1.9zm40.3-4.4l0-134.4c0-.8 .1-1.6 .5-2.4s.8-1.5 1.3-2.1s1.3-1.1 2-1.4s1.6-.5 2.4-.5l134.4 0c1.2 0 2.5 .4 3.5 1.1s1.8 1.7 2.3 2.8s.6 2.4 .3 3.6s-.9 2.3-1.7 3.2L304 246.4c-.9 .8-2 1.4-3.2 1.6s-2.4 .1-3.5-.4s-2.1-1.3-2.8-2.3s-1.1-2.2-1.1-3.4zm30.6 35c-1.2 0-2.5-.3-3.5-1s-1.9-1.6-2.4-2.8s-.6-2.4-.4-3.6s.8-2.3 1.7-3.2l84.2-84.2c.6-.6 1.3-1 2-1.4s1.6-.5 2.4-.5s1.6 .2 2.4 .5s1.4 .8 2 1.4l84.4 84.2c.9 .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.7 3.2s.1 2.5-.3 3.6s-1.3 2.1-2.3 2.8s-2.2 1.1-3.5 1.1L85 277.1c-1.7 0-3.2-.7-4.4-1.8s-1.8-2.8-1.8-4.4l0-148.4z\"]\n};\nconst faExpeditedssl = {\n  prefix: 'fab',\n  iconName: 'expeditedssl',\n  icon: [496, 512, [], \"f23e\", \"M248 43.4C130.6 43.4 35.4 138.6 35.4 256S130.6 468.6 248 468.6 460.6 373.4 460.6 256 365.4 43.4 248 43.4zm-97.4 132.9c0-53.7 43.7-97.4 97.4-97.4s97.4 43.7 97.4 97.4v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6c0-82.1-124-82.1-124 0v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6zM389.7 380c0 9.7-8 17.7-17.7 17.7H124c-9.7 0-17.7-8-17.7-17.7V238.3c0-9.7 8-17.7 17.7-17.7h248c9.7 0 17.7 8 17.7 17.7V380zm-248-137.3v132.9c0 2.5-1.9 4.4-4.4 4.4h-8.9c-2.5 0-4.4-1.9-4.4-4.4V242.7c0-2.5 1.9-4.4 4.4-4.4h8.9c2.5 0 4.4 1.9 4.4 4.4zm141.7 48.7c0 13-7.2 24.4-17.7 30.4v31.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-31.6c-10.5-6.1-17.7-17.4-17.7-30.4 0-19.7 15.8-35.4 35.4-35.4s35.5 15.8 35.5 35.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 478.3C121 486.3 17.7 383 17.7 256S121 25.7 248 25.7 478.3 129 478.3 256 375 486.3 248 486.3z\"]\n};\nconst faSellcast = {\n  prefix: 'fab',\n  iconName: 'sellcast',\n  icon: [448, 512, [], \"f2da\", \"M353.4 32H94.7C42.6 32 0 74.6 0 126.6v258.7C0 437.4 42.6 480 94.7 480h258.7c52.1 0 94.7-42.6 94.7-94.6V126.6c0-52-42.6-94.6-94.7-94.6zm-50 316.4c-27.9 48.2-89.9 64.9-138.2 37.2-22.9 39.8-54.9 8.6-42.3-13.2l15.7-27.2c5.9-10.3 19.2-13.9 29.5-7.9 18.6 10.8-.1-.1 18.5 10.7 27.6 15.9 63.4 6.3 79.4-21.3 15.9-27.6 6.3-63.4-21.3-79.4-17.8-10.2-.6-.4-18.6-10.6-24.6-14.2-3.4-51.9 21.6-37.5 18.6 10.8-.1-.1 18.5 10.7 48.4 28 65.1 90.3 37.2 138.5zm21.8-208.8c-17 29.5-16.3 28.8-19 31.5-6.5 6.5-16.3 8.7-26.5 3.6-18.6-10.8.1.1-18.5-10.7-27.6-15.9-63.4-6.3-79.4 21.3s-6.3 63.4 21.3 79.4c0 0 18.5 10.6 18.6 10.6 24.6 14.2 3.4 51.9-21.6 37.5-18.6-10.8.1.1-18.5-10.7-48.2-27.8-64.9-90.1-37.1-138.4 27.9-48.2 89.9-64.9 138.2-37.2l4.8-8.4c14.3-24.9 52-3.3 37.7 21.5z\"]\n};\nconst faSquareTwitter = {\n  prefix: 'fab',\n  iconName: 'square-twitter',\n  icon: [448, 512, [\"twitter-square\"], \"f081\", \"M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM351.3 199.3v0c0 86.7-66 186.6-186.6 186.6c-37.2 0-71.7-10.8-100.7-29.4c5.3 .6 10.4 .8 15.8 .8c30.7 0 58.9-10.4 81.4-28c-28.8-.6-53-19.5-61.3-45.5c10.1 1.5 19.2 1.5 29.6-1.2c-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3c-9-6-16.4-14.1-21.5-23.6s-7.8-20.2-7.7-31c0-12.2 3.2-23.4 8.9-33.1c32.3 39.8 80.8 65.8 135.2 68.6c-9.3-44.5 24-80.6 64-80.6c18.9 0 35.9 7.9 47.9 20.7c14.8-2.8 29-8.3 41.6-15.8c-4.9 15.2-15.2 28-28.8 36.1c13.2-1.4 26-5.1 37.8-10.2c-8.9 13.1-20.1 24.7-32.9 34c.2 2.8 .2 5.7 .2 8.5z\"]\n};\nconst faTwitterSquare = faSquareTwitter;\nconst faRProject = {\n  prefix: 'fab',\n  iconName: 'r-project',\n  icon: [581, 512, [], \"f4f7\", \"M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z\"]\n};\nconst faDelicious = {\n  prefix: 'fab',\n  iconName: 'delicious',\n  icon: [448, 512, [], \"f1a5\", \"M446.5 68c-.4-1.5-.9-3-1.4-4.5-.9-2.5-2-4.8-3.3-7.1-1.4-2.4-3-4.8-4.7-6.9-2.1-2.5-4.4-4.8-6.9-6.8-1.1-.9-2.2-1.7-3.3-2.5-1.3-.9-2.6-1.7-4-2.4-1.8-1-3.6-1.8-5.5-2.5-1.7-.7-3.5-1.3-5.4-1.7-3.8-1-7.9-1.5-12-1.5H48C21.5 32 0 53.5 0 80v352c0 4.1.5 8.2 1.5 12 2 7.7 5.8 14.6 11 20.3 1 1.1 2.1 2.2 3.3 3.3 5.7 5.2 12.6 9 20.3 11 3.8 1 7.9 1.5 12 1.5h352c26.5 0 48-21.5 48-48V80c-.1-4.1-.6-8.2-1.6-12zM416 432c0 8.8-7.2 16-16 16H224V256H32V80c0-8.8 7.2-16 16-16h176v192h192z\"]\n};\nconst faFreebsd = {\n  prefix: 'fab',\n  iconName: 'freebsd',\n  icon: [448, 512, [], \"f3a4\", \"M303.7 96.2c11.1-11.1 115.5-77 139.2-53.2 23.7 23.7-42.1 128.1-53.2 139.2-11.1 11.1-39.4.9-63.1-22.9-23.8-23.7-34.1-52-22.9-63.1zM109.9 68.1C73.6 47.5 22 24.6 5.6 41.1c-16.6 16.6 7.1 69.4 27.9 105.7 18.5-32.2 44.8-59.3 76.4-78.7zM406.7 174c3.3 11.3 2.7 20.7-2.7 26.1-20.3 20.3-87.5-27-109.3-70.1-18-32.3-11.1-53.4 14.9-48.7 5.7-3.6 12.3-7.6 19.6-11.6-29.8-15.5-63.6-24.3-99.5-24.3-119.1 0-215.6 96.5-215.6 215.6 0 119 96.5 215.6 215.6 215.6S445.3 380.1 445.3 261c0-38.4-10.1-74.5-27.7-105.8-3.9 7-7.6 13.3-10.9 18.8z\"]\n};\nconst faVuejs = {\n  prefix: 'fab',\n  iconName: 'vuejs',\n  icon: [448, 512, [], \"f41f\", \"M356.9 64.3H280l-56 88.6-48-88.6H0L224 448 448 64.3h-91.1zm-301.2 32h53.8L224 294.5 338.4 96.3h53.8L224 384.5 55.7 96.3z\"]\n};\nconst faAccusoft = {\n  prefix: 'fab',\n  iconName: 'accusoft',\n  icon: [640, 512, [], \"f369\", \"M322.1 252v-1l-51.2-65.8s-12 1.6-25 15.1c-9 9.3-242.1 239.1-243.4 240.9-7 10 1.6 6.8 15.7 1.7.8 0 114.5-36.6 114.5-36.6.5-.6-.1-.1.6-.6-.4-5.1-.8-26.2-1-27.7-.6-5.2 2.2-6.9 7-8.9l92.6-33.8c.6-.8 88.5-81.7 90.2-83.3zm160.1 120.1c13.3 16.1 20.7 13.3 30.8 9.3 3.2-1.2 115.4-47.6 117.8-48.9 8-4.3-1.7-16.7-7.2-23.4-2.1-2.5-205.1-245.6-207.2-248.3-9.7-12.2-14.3-12.9-38.4-12.8-10.2 0-106.8.5-116.5.6-19.2.1-32.9-.3-19.2 16.9C250 75 476.5 365.2 482.2 372.1zm152.7 1.6c-2.3-.3-24.6-4.7-38-7.2 0 0-115 50.4-117.5 51.6-16 7.3-26.9-3.2-36.7-14.6l-57.1-74c-5.4-.9-60.4-9.6-65.3-9.3-3.1.2-9.6.8-14.4 2.9-4.9 2.1-145.2 52.8-150.2 54.7-5.1 2-11.4 3.6-11.1 7.6.2 2.5 2 2.6 4.6 3.5 2.7.8 300.9 67.6 308 69.1 15.6 3.3 38.5 10.5 53.6 1.7 2.1-1.2 123.8-76.4 125.8-77.8 5.4-4 4.3-6.8-1.7-8.2z\"]\n};\nconst faIoxhost = {\n  prefix: 'fab',\n  iconName: 'ioxhost',\n  icon: [640, 512, [], \"f208\", \"M616 160h-67.3C511.2 70.7 422.9 8 320 8 183 8 72 119 72 256c0 16.4 1.6 32.5 4.7 48H24c-13.3 0-24 10.8-24 24 0 13.3 10.7 24 24 24h67.3c37.5 89.3 125.8 152 228.7 152 137 0 248-111 248-248 0-16.4-1.6-32.5-4.7-48H616c13.3 0 24-10.8 24-24 0-13.3-10.7-24-24-24zm-96 96c0 110.5-89.5 200-200 200-75.7 0-141.6-42-175.5-104H424c13.3 0 24-10.8 24-24 0-13.3-10.7-24-24-24H125.8c-3.8-15.4-5.8-31.4-5.8-48 0-110.5 89.5-200 200-200 75.7 0 141.6 42 175.5 104H216c-13.3 0-24 10.8-24 24 0 13.3 10.7 24 24 24h298.2c3.8 15.4 5.8 31.4 5.8 48zm-304-24h208c13.3 0 24 10.7 24 24 0 13.2-10.7 24-24 24H216c-13.3 0-24-10.7-24-24 0-13.2 10.7-24 24-24z\"]\n};\nconst faFonticonsFi = {\n  prefix: 'fab',\n  iconName: 'fonticons-fi',\n  icon: [384, 512, [], \"f3a2\", \"M114.4 224h92.4l-15.2 51.2h-76.4V433c0 8-2.8 9.2 4.4 10l59.6 5.6V483H0v-35.2l29.2-2.8c7.2-.8 9.2-3.2 9.2-10.8V278.4c0-3.2-4-3.2-8-3.2H0V224h38.4v-28.8c0-68 36.4-96 106-96 46.8 0 88.8 11.2 88.8 72.4l-69.6 8.4c.4-25.6-6-31.6-22.4-31.6-25.2 0-26 13.6-26 37.6v32c0 3.2-4.8 6-.8 6zM384 483H243.2v-34.4l28-3.6c7.2-.8 10.4-2.4 10.4-10V287c0-5.6-4-9.2-9.2-10.8l-33.2-8.8 9.2-40.4h110v208c0 8-3.6 8.8 4 10l21.6 3.6V483zm-30-347.2l12.4 45.6-10 10-42.8-22.8-42.8 22.8-10-10 12.4-45.6-30-36.4 4.8-10h38L307.2 51H320l21.2 38.4h38l4.8 13.2-30 33.2z\"]\n};\nconst faAppStore = {\n  prefix: 'fab',\n  iconName: 'app-store',\n  icon: [512, 512, [], \"f36f\", \"M255.9 120.9l9.1-15.7c5.6-9.8 18.1-13.1 27.9-7.5 9.8 5.6 13.1 18.1 7.5 27.9l-87.5 151.5h63.3c20.5 0 32 24.1 23.1 40.8H113.8c-11.3 0-20.4-9.1-20.4-20.4 0-11.3 9.1-20.4 20.4-20.4h52l66.6-115.4-20.8-36.1c-5.6-9.8-2.3-22.2 7.5-27.9 9.8-5.6 22.2-2.3 27.9 7.5l8.9 15.7zm-78.7 218l-19.6 34c-5.6 9.8-18.1 13.1-27.9 7.5-9.8-5.6-13.1-18.1-7.5-27.9l14.6-25.2c16.4-5.1 29.8-1.2 40.4 11.6zm168.9-61.7h53.1c11.3 0 20.4 9.1 20.4 20.4 0 11.3-9.1 20.4-20.4 20.4h-29.5l19.9 34.5c5.6 9.8 2.3 22.2-7.5 27.9-9.8 5.6-22.2 2.3-27.9-7.5-33.5-58.1-58.7-101.6-75.4-130.6-17.1-29.5-4.9-59.1 7.2-69.1 13.4 23 33.4 57.7 60.1 104zM256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm216 248c0 118.7-96.1 216-216 216-118.7 0-216-96.1-216-216 0-118.7 96.1-216 216-216 118.7 0 216 96.1 216 216z\"]\n};\nconst faCcMastercard = {\n  prefix: 'fab',\n  iconName: 'cc-mastercard',\n  icon: [576, 512, [], \"f1f1\", \"M482.9 410.3c0 6.8-4.6 11.7-11.2 11.7-6.8 0-11.2-5.2-11.2-11.7 0-6.5 4.4-11.7 11.2-11.7 6.6 0 11.2 5.2 11.2 11.7zm-310.8-11.7c-7.1 0-11.2 5.2-11.2 11.7 0 6.5 4.1 11.7 11.2 11.7 6.5 0 10.9-4.9 10.9-11.7-.1-6.5-4.4-11.7-10.9-11.7zm117.5-.3c-5.4 0-8.7 3.5-9.5 8.7h19.1c-.9-5.7-4.4-8.7-9.6-8.7zm107.8.3c-6.8 0-10.9 5.2-10.9 11.7 0 6.5 4.1 11.7 10.9 11.7 6.8 0 11.2-4.9 11.2-11.7 0-6.5-4.4-11.7-11.2-11.7zm105.9 26.1c0 .3.3.5.3 1.1 0 .3-.3.5-.3 1.1-.3.3-.3.5-.5.8-.3.3-.5.5-1.1.5-.3.3-.5.3-1.1.3-.3 0-.5 0-1.1-.3-.3 0-.5-.3-.8-.5-.3-.3-.5-.5-.5-.8-.3-.5-.3-.8-.3-1.1 0-.5 0-.8.3-1.1 0-.5.3-.8.5-1.1.3-.3.5-.3.8-.5.5-.3.8-.3 1.1-.3.5 0 .8 0 1.1.3.5.3.8.3 1.1.5s.2.6.5 1.1zm-2.2 1.4c.5 0 .5-.3.8-.3.3-.3.3-.5.3-.8 0-.3 0-.5-.3-.8-.3 0-.5-.3-1.1-.3h-1.6v3.5h.8V426h.3l1.1 1.4h.8l-1.1-1.3zM576 81v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V81c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM64 220.6c0 76.5 62.1 138.5 138.5 138.5 27.2 0 53.9-8.2 76.5-23.1-72.9-59.3-72.4-171.2 0-230.5-22.6-15-49.3-23.1-76.5-23.1-76.4-.1-138.5 62-138.5 138.2zm224 108.8c70.5-55 70.2-162.2 0-217.5-70.2 55.3-70.5 162.6 0 217.5zm-142.3 76.3c0-8.7-5.7-14.4-14.7-14.7-4.6 0-9.5 1.4-12.8 6.5-2.4-4.1-6.5-6.5-12.2-6.5-3.8 0-7.6 1.4-10.6 5.4V392h-8.2v36.7h8.2c0-18.9-2.5-30.2 9-30.2 10.2 0 8.2 10.2 8.2 30.2h7.9c0-18.3-2.5-30.2 9-30.2 10.2 0 8.2 10 8.2 30.2h8.2v-23zm44.9-13.7h-7.9v4.4c-2.7-3.3-6.5-5.4-11.7-5.4-10.3 0-18.2 8.2-18.2 19.3 0 11.2 7.9 19.3 18.2 19.3 5.2 0 9-1.9 11.7-5.4v4.6h7.9V392zm40.5 25.6c0-15-22.9-8.2-22.9-15.2 0-5.7 11.9-4.8 18.5-1.1l3.3-6.5c-9.4-6.1-30.2-6-30.2 8.2 0 14.3 22.9 8.3 22.9 15 0 6.3-13.5 5.8-20.7.8l-3.5 6.3c11.2 7.6 32.6 6 32.6-7.5zm35.4 9.3l-2.2-6.8c-3.8 2.1-12.2 4.4-12.2-4.1v-16.6h13.1V392h-13.1v-11.2h-8.2V392h-7.6v7.3h7.6V416c0 17.6 17.3 14.4 22.6 10.9zm13.3-13.4h27.5c0-16.2-7.4-22.6-17.4-22.6-10.6 0-18.2 7.9-18.2 19.3 0 20.5 22.6 23.9 33.8 14.2l-3.8-6c-7.8 6.4-19.6 5.8-21.9-4.9zm59.1-21.5c-4.6-2-11.6-1.8-15.2 4.4V392h-8.2v36.7h8.2V408c0-11.6 9.5-10.1 12.8-8.4l2.4-7.6zm10.6 18.3c0-11.4 11.6-15.1 20.7-8.4l3.8-6.5c-11.6-9.1-32.7-4.1-32.7 15 0 19.8 22.4 23.8 32.7 15l-3.8-6.5c-9.2 6.5-20.7 2.6-20.7-8.6zm66.7-18.3H408v4.4c-8.3-11-29.9-4.8-29.9 13.9 0 19.2 22.4 24.7 29.9 13.9v4.6h8.2V392zm33.7 0c-2.4-1.2-11-2.9-15.2 4.4V392h-7.9v36.7h7.9V408c0-11 9-10.3 12.8-8.4l2.4-7.6zm40.3-14.9h-7.9v19.3c-8.2-10.9-29.9-5.1-29.9 13.9 0 19.4 22.5 24.6 29.9 13.9v4.6h7.9v-51.7zm7.6-75.1v4.6h.8V302h1.9v-.8h-4.6v.8h1.9zm6.6 123.8c0-.5 0-1.1-.3-1.6-.3-.3-.5-.8-.8-1.1-.3-.3-.8-.5-1.1-.8-.5 0-1.1-.3-1.6-.3-.3 0-.8.3-1.4.3-.5.3-.8.5-1.1.8-.5.3-.8.8-.8 1.1-.3.5-.3 1.1-.3 1.6 0 .3 0 .8.3 1.4 0 .3.3.8.8 1.1.3.3.5.5 1.1.8.5.3 1.1.3 1.4.3.5 0 1.1 0 1.6-.3.3-.3.8-.5 1.1-.8.3-.3.5-.8.8-1.1.3-.6.3-1.1.3-1.4zm3.2-124.7h-1.4l-1.6 3.5-1.6-3.5h-1.4v5.4h.8v-4.1l1.6 3.5h1.1l1.4-3.5v4.1h1.1v-5.4zm4.4-80.5c0-76.2-62.1-138.3-138.5-138.3-27.2 0-53.9 8.2-76.5 23.1 72.1 59.3 73.2 171.5 0 230.5 22.6 15 49.5 23.1 76.5 23.1 76.4.1 138.5-61.9 138.5-138.4z\"]\n};\nconst faItunesNote = {\n  prefix: 'fab',\n  iconName: 'itunes-note',\n  icon: [384, 512, [], \"f3b5\", \"M381.9 388.2c-6.4 27.4-27.2 42.8-55.1 48-24.5 4.5-44.9 5.6-64.5-10.2-23.9-20.1-24.2-53.4-2.7-74.4 17-16.2 40.9-19.5 76.8-25.8 6-1.1 11.2-2.5 15.6-7.4 6.4-7.2 4.4-4.1 4.4-163.2 0-11.2-5.5-14.3-17-12.3-8.2 1.4-185.7 34.6-185.7 34.6-10.2 2.2-13.4 5.2-13.4 16.7 0 234.7 1.1 223.9-2.5 239.5-4.2 18.2-15.4 31.9-30.2 39.5-16.8 9.3-47.2 13.4-63.4 10.4-43.2-8.1-58.4-58-29.1-86.6 17-16.2 40.9-19.5 76.8-25.8 6-1.1 11.2-2.5 15.6-7.4 10.1-11.5 1.8-256.6 5.2-270.2.8-5.2 3-9.6 7.1-12.9 4.2-3.5 11.8-5.5 13.4-5.5 204-38.2 228.9-43.1 232.4-43.1 11.5-.8 18.1 6 18.1 17.6.2 344.5 1.1 326-1.8 338.5z\"]\n};\nconst faGolang = {\n  prefix: 'fab',\n  iconName: 'golang',\n  icon: [640, 512, [], \"e40f\", \"M400.1 194.8C389.2 197.6 380.2 199.1 371 202.4C363.7 204.3 356.3 206.3 347.8 208.5L347.2 208.6C343 209.8 342.6 209.9 338.7 205.4C334 200.1 330.6 196.7 324.1 193.5C304.4 183.9 285.4 186.7 267.7 198.2C246.5 211.9 235.6 232.2 235.9 257.4C236.2 282.4 253.3 302.9 277.1 306.3C299.1 309.1 316.9 301.7 330.9 285.8C333 283.2 334.9 280.5 337 277.5V277.5L337 277.5C337.8 276.5 338.5 275.4 339.3 274.2H279.2C272.7 274.2 271.1 270.2 273.3 264.9C277.3 255.2 284.8 239 289.2 230.9C290.1 229.1 292.3 225.1 296.1 225.1H397.2C401.7 211.7 409 198.2 418.8 185.4C441.5 155.5 468.1 139.9 506 133.4C537.8 127.8 567.7 130.9 594.9 149.3C619.5 166.1 634.7 188.9 638.8 218.8C644.1 260.9 631.9 295.1 602.1 324.4C582.4 345.3 557.2 358.4 528.2 364.3C522.6 365.3 517.1 365.8 511.7 366.3C508.8 366.5 506 366.8 503.2 367.1C474.9 366.5 449 358.4 427.2 339.7C411.9 326.4 401.3 310.1 396.1 291.2C392.4 298.5 388.1 305.6 382.1 312.3C360.5 341.9 331.2 360.3 294.2 365.2C263.6 369.3 235.3 363.4 210.3 344.7C187.3 327.2 174.2 304.2 170.8 275.5C166.7 241.5 176.7 210.1 197.2 184.2C219.4 155.2 248.7 136.8 284.5 130.3C313.8 124.1 341.8 128.4 367.1 145.6C383.6 156.5 395.4 171.4 403.2 189.5C405.1 192.3 403.8 193.9 400.1 194.8zM48.3 200.4C47.05 200.4 46.74 199.8 47.36 198.8L53.91 190.4C54.53 189.5 56.09 188.9 57.34 188.9H168.6C169.8 188.9 170.1 189.8 169.5 190.7L164.2 198.8C163.6 199.8 162 200.7 161.1 200.7L48.3 200.4zM1.246 229.1C0 229.1-.3116 228.4 .3116 227.5L6.855 219.1C7.479 218.2 9.037 217.5 10.28 217.5H152.4C153.6 217.5 154.2 218.5 153.9 219.4L151.4 226.9C151.1 228.1 149.9 228.8 148.6 228.8L1.246 229.1zM75.72 255.9C75.1 256.8 75.41 257.7 76.65 257.7L144.6 258C145.5 258 146.8 257.1 146.8 255.9L147.4 248.4C147.4 247.1 146.8 246.2 145.5 246.2H83.2C81.95 246.2 80.71 247.1 80.08 248.1L75.72 255.9zM577.2 237.9C577 235.3 576.9 233.1 576.5 230.9C570.9 200.1 542.5 182.6 512.9 189.5C483.9 196 465.2 214.4 458.4 243.7C452.8 268 464.6 292.6 487 302.6C504.2 310.1 521.3 309.2 537.8 300.7C562.4 287.1 575.8 268 577.4 241.2C577.3 240 577.3 238.9 577.2 237.9z\"]\n};\nconst faKickstarter = {\n  prefix: 'fab',\n  iconName: 'kickstarter',\n  icon: [448, 512, [\"square-kickstarter\"], \"f3bb\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM320.8 233l-23.3 23.1L320.8 279c24.1 23.9 24.1 63 0 86.9s-63.4 23.9-87.6 0l-8.5-8.4c-11.3 16-29.7 26.5-50.9 26.5c-34.1 0-61.9-27.5-61.9-61.4l0-133.2c0-33.8 27.7-61.4 61.9-61.4c21.1 0 39.6 10.5 50.9 26.5l8.5-8.4c24.1-23.9 63.4-23.9 87.6 0s24.1 63 0 86.9z\"]\n};\nconst faSquareKickstarter = faKickstarter;\nconst faGrav = {\n  prefix: 'fab',\n  iconName: 'grav',\n  icon: [512, 512, [], \"f2d6\", \"M301.1 212c4.4 4.4 4.4 11.9 0 16.3l-9.7 9.7c-4.4 4.7-11.9 4.7-16.6 0l-10.5-10.5c-4.4-4.7-4.4-11.9 0-16.6l9.7-9.7c4.4-4.4 11.9-4.4 16.6 0l10.5 10.8zm-30.2-19.7c3-3 3-7.8 0-10.5-2.8-3-7.5-3-10.5 0-2.8 2.8-2.8 7.5 0 10.5 3.1 2.8 7.8 2.8 10.5 0zm-26 5.3c-3 2.8-3 7.5 0 10.2 2.8 3 7.5 3 10.5 0 2.8-2.8 2.8-7.5 0-10.2-3-3-7.7-3-10.5 0zm72.5-13.3c-19.9-14.4-33.8-43.2-11.9-68.1 21.6-24.9 40.7-17.2 59.8.8 11.9 11.3 29.3 24.9 17.2 48.2-12.5 23.5-45.1 33.2-65.1 19.1zm47.7-44.5c-8.9-10-23.3 6.9-15.5 16.1 7.4 9 32.1 2.4 15.5-16.1zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-66.2 42.6c2.5-16.1-20.2-16.6-25.2-25.7-13.6-24.1-27.7-36.8-54.5-30.4 11.6-8 23.5-6.1 23.5-6.1.3-6.4 0-13-9.4-24.9 3.9-12.5.3-22.4.3-22.4 15.5-8.6 26.8-24.4 29.1-43.2 3.6-31-18.8-59.2-49.8-62.8-22.1-2.5-43.7 7.7-54.3 25.7-23.2 40.1 1.4 70.9 22.4 81.4-14.4-1.4-34.3-11.9-40.1-34.3-6.6-25.7 2.8-49.8 8.9-61.4 0 0-4.4-5.8-8-8.9 0 0-13.8 0-24.6 5.3 11.9-15.2 25.2-14.4 25.2-14.4 0-6.4-.6-14.9-3.6-21.6-5.4-11-23.8-12.9-31.7 2.8.1-.2.3-.4.4-.5-5 11.9-1.1 55.9 16.9 87.2-2.5 1.4-9.1 6.1-13 10-21.6 9.7-56.2 60.3-56.2 60.3-28.2 10.8-77.2 50.9-70.6 79.7.3 3 1.4 5.5 3 7.5-2.8 2.2-5.5 5-8.3 8.3-11.9 13.8-5.3 35.2 17.7 24.4 15.8-7.2 29.6-20.2 36.3-30.4 0 0-5.5-5-16.3-4.4 27.7-6.6 34.3-9.4 46.2-9.1 8 3.9 8-34.3 8-34.3 0-14.7-2.2-31-11.1-41.5 12.5 12.2 29.1 32.7 28 60.6-.8 18.3-15.2 23-15.2 23-9.1 16.6-43.2 65.9-30.4 106 0 0-9.7-14.9-10.2-22.1-17.4 19.4-46.5 52.3-24.6 64.5 26.6 14.7 108.8-88.6 126.2-142.3 34.6-20.8 55.4-47.3 63.9-65 22 43.5 95.3 94.5 101.1 59z\"]\n};\nconst faWeibo = {\n  prefix: 'fab',\n  iconName: 'weibo',\n  icon: [512, 512, [], \"f18a\", \"M407 177.6c7.6-24-13.4-46.8-37.4-41.7-22 4.8-28.8-28.1-7.1-32.8 50.1-10.9 92.3 37.1 76.5 84.8-6.8 21.2-38.8 10.8-32-10.3zM214.8 446.7C108.5 446.7 0 395.3 0 310.4c0-44.3 28-95.4 76.3-143.7C176 67 279.5 65.8 249.9 161c-4 13.1 12.3 5.7 12.3 6 79.5-33.6 140.5-16.8 114 51.4-3.7 9.4 1.1 10.9 8.3 13.1 135.7 42.3 34.8 215.2-169.7 215.2zm143.7-146.3c-5.4-55.7-78.5-94-163.4-85.7-84.8 8.6-148.8 60.3-143.4 116s78.5 94 163.4 85.7c84.8-8.6 148.8-60.3 143.4-116zM347.9 35.1c-25.9 5.6-16.8 43.7 8.3 38.3 72.3-15.2 134.8 52.8 111.7 124-7.4 24.2 29.1 37 37.4 12 31.9-99.8-55.1-195.9-157.4-174.3zm-78.5 311c-17.1 38.8-66.8 60-109.1 46.3-40.8-13.1-58-53.4-40.3-89.7 17.7-35.4 63.1-55.4 103.4-45.1 42 10.8 63.1 50.2 46 88.5zm-86.3-30c-12.9-5.4-30 .3-38 12.9-8.3 12.9-4.3 28 8.6 34 13.1 6 30.8.3 39.1-12.9 8-13.1 3.7-28.3-9.7-34zm32.6-13.4c-5.1-1.7-11.4.6-14.3 5.4-2.9 5.1-1.4 10.6 3.7 12.9 5.1 2 11.7-.3 14.6-5.4 2.8-5.2 1.1-10.9-4-12.9z\"]\n};\nconst faUncharted = {\n  prefix: 'fab',\n  iconName: 'uncharted',\n  icon: [448, 512, [], \"e084\", \"M171.73,232.813A5.381,5.381,0,0,0,176.7,229.5,48.081,48.081,0,0,1,191.6,204.244c1.243-.828,1.657-2.484,1.657-4.141a4.22,4.22,0,0,0-2.071-3.312L74.429,128.473,148.958,85a9.941,9.941,0,0,0,4.968-8.281,9.108,9.108,0,0,0-4.968-8.281L126.6,55.6a9.748,9.748,0,0,0-9.523,0l-100.2,57.966a9.943,9.943,0,0,0-4.969,8.281V236.954a9.109,9.109,0,0,0,4.969,8.281L39.235,258.07a8.829,8.829,0,0,0,4.968,1.242,9.4,9.4,0,0,0,6.625-2.484,10.8,10.8,0,0,0,2.9-7.039V164.5L169.66,232.4A4.5,4.5,0,0,0,171.73,232.813ZM323.272,377.73a12.478,12.478,0,0,0-4.969,1.242l-74.528,43.062V287.882c0-2.9-2.9-5.8-6.211-4.555a53.036,53.036,0,0,1-28.984.414,4.86,4.86,0,0,0-6.21,4.555V421.619l-74.529-43.061a8.83,8.83,0,0,0-4.969-1.242,9.631,9.631,0,0,0-9.523,9.523v26.085a9.107,9.107,0,0,0,4.969,8.281l100.2,57.553A8.829,8.829,0,0,0,223.486,480a11.027,11.027,0,0,0,4.969-1.242l100.2-57.553a9.941,9.941,0,0,0,4.968-8.281V386.839C332.8,382.285,328.24,377.73,323.272,377.73ZM286.007,78a23,23,0,1,0-23-23A23,23,0,0,0,286.007,78Zm63.627-10.086a23,23,0,1,0,23,23A23,23,0,0,0,349.634,67.914ZM412.816,151.6a23,23,0,1,0-23-23A23,23,0,0,0,412.816,151.6Zm-63.182-9.2a23,23,0,1,0,23,23A23,23,0,0,0,349.634,142.4Zm-63.627,83.244a23,23,0,1,0-23-23A23,23,0,0,0,286.007,225.648Zm-62.074,36.358a23,23,0,1,0-23-23A23,23,0,0,0,223.933,262.006Zm188.883-82.358a23,23,0,1,0,23,23A23,23,0,0,0,412.816,179.648Zm0,72.272a23,23,0,1,0,23,23A23,23,0,0,0,412.816,251.92Z\"]\n};\nconst faFirstdraft = {\n  prefix: 'fab',\n  iconName: 'firstdraft',\n  icon: [384, 512, [], \"f3a1\", \"M384 192h-64v128H192v128H0v-25.6h166.4v-128h128v-128H384V192zm-25.6 38.4v128h-128v128H64V512h192V384h128V230.4h-25.6zm25.6 192h-89.6V512H320v-64h64v-25.6zM0 0v384h128V256h128V128h128V0H0z\"]\n};\nconst faSquareYoutube = {\n  prefix: 'fab',\n  iconName: 'square-youtube',\n  icon: [448, 512, [61798, \"youtube-square\"], \"f431\", \"M282 256.2l-95.2-54.1V310.3L282 256.2zM384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zm14.4 136.1c7.6 28.6 7.6 88.2 7.6 88.2s0 59.6-7.6 88.1c-4.2 15.8-16.5 27.7-32.2 31.9C337.9 384 224 384 224 384s-113.9 0-142.2-7.6c-15.7-4.2-28-16.1-32.2-31.9C42 315.9 42 256.3 42 256.3s0-59.7 7.6-88.2c4.2-15.8 16.5-28.2 32.2-32.4C110.1 128 224 128 224 128s113.9 0 142.2 7.7c15.7 4.2 28 16.6 32.2 32.4z\"]\n};\nconst faYoutubeSquare = faSquareYoutube;\nconst faWikipediaW = {\n  prefix: 'fab',\n  iconName: 'wikipedia-w',\n  icon: [640, 512, [], \"f266\", \"M640 51.2l-.3 12.2c-28.1.8-45 15.8-55.8 40.3-25 57.8-103.3 240-155.3 358.6H415l-81.9-193.1c-32.5 63.6-68.3 130-99.2 193.1-.3.3-15 0-15-.3C172 352.3 122.8 243.4 75.8 133.4 64.4 106.7 26.4 63.4.2 63.7c0-3.1-.3-10-.3-14.2h161.9v13.9c-19.2 1.1-52.8 13.3-43.3 34.2 21.9 49.7 103.6 240.3 125.6 288.6 15-29.7 57.8-109.2 75.3-142.8-13.9-28.3-58.6-133.9-72.8-160-9.7-17.8-36.1-19.4-55.8-19.7V49.8l142.5.3v13.1c-19.4.6-38.1 7.8-29.4 26.1 18.9 40 30.6 68.1 48.1 104.7 5.6-10.8 34.7-69.4 48.1-100.8 8.9-20.6-3.9-28.6-38.6-29.4.3-3.6 0-10.3.3-13.6 44.4-.3 111.1-.3 123.1-.6v13.6c-22.5.8-45.8 12.8-58.1 31.7l-59.2 122.8c6.4 16.1 63.3 142.8 69.2 156.7L559.2 91.8c-8.6-23.1-36.4-28.1-47.2-28.3V49.6l127.8 1.1.2.5z\"]\n};\nconst faWpressr = {\n  prefix: 'fab',\n  iconName: 'wpressr',\n  icon: [496, 512, [\"rendact\"], \"f3e4\", \"M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm171.33 158.6c-15.18 34.51-30.37 69.02-45.63 103.5-2.44 5.51-6.89 8.24-12.97 8.24-23.02-.01-46.03.06-69.05-.05-5.12-.03-8.25 1.89-10.34 6.72-10.19 23.56-20.63 47-30.95 70.5-1.54 3.51-4.06 5.29-7.92 5.29-45.94-.01-91.87-.02-137.81 0-3.13 0-5.63-1.15-7.72-3.45-11.21-12.33-22.46-24.63-33.68-36.94-2.69-2.95-2.79-6.18-1.21-9.73 8.66-19.54 17.27-39.1 25.89-58.66 12.93-29.35 25.89-58.69 38.75-88.08 1.7-3.88 4.28-5.68 8.54-5.65 14.24.1 28.48.02 42.72.05 6.24.01 9.2 4.84 6.66 10.59-13.6 30.77-27.17 61.55-40.74 92.33-5.72 12.99-11.42 25.99-17.09 39-3.91 8.95 7.08 11.97 10.95 5.6.23-.37-1.42 4.18 30.01-67.69 1.36-3.1 3.41-4.4 6.77-4.39 15.21.08 30.43.02 45.64.04 5.56.01 7.91 3.64 5.66 8.75-8.33 18.96-16.71 37.9-24.98 56.89-4.98 11.43 8.08 12.49 11.28 5.33.04-.08 27.89-63.33 32.19-73.16 2.02-4.61 5.44-6.51 10.35-6.5 26.43.05 52.86 0 79.29.05 12.44.02 13.93-13.65 3.9-13.64-25.26.03-50.52.02-75.78.02-6.27 0-7.84-2.47-5.27-8.27 5.78-13.06 11.59-26.11 17.3-39.21 1.73-3.96 4.52-5.79 8.84-5.78 23.09.06 25.98.02 130.78.03 6.08-.01 8.03 2.79 5.62 8.27z\"]\n};\nconst faRendact = faWpressr;\nconst faAngellist = {\n  prefix: 'fab',\n  iconName: 'angellist',\n  icon: [448, 512, [], \"f209\", \"M347.1 215.4c11.7-32.6 45.4-126.9 45.4-157.1 0-26.6-15.7-48.9-43.7-48.9-44.6 0-84.6 131.7-97.1 163.1C242 144 196.6 0 156.6 0c-31.1 0-45.7 22.9-45.7 51.7 0 35.3 34.2 126.8 46.6 162-6.3-2.3-13.1-4.3-20-4.3-23.4 0-48.3 29.1-48.3 52.6 0 8.9 4.9 21.4 8 29.7-36.9 10-51.1 34.6-51.1 71.7C46 435.6 114.4 512 210.6 512c118 0 191.4-88.6 191.4-202.9 0-43.1-6.9-82-54.9-93.7zM311.7 108c4-12.3 21.1-64.3 37.1-64.3 8.6 0 10.9 8.9 10.9 16 0 19.1-38.6 124.6-47.1 148l-34-6 33.1-93.7zM142.3 48.3c0-11.9 14.5-45.7 46.3 47.1l34.6 100.3c-15.6-1.3-27.7-3-35.4 1.4-10.9-28.8-45.5-119.7-45.5-148.8zM140 244c29.3 0 67.1 94.6 67.1 107.4 0 5.1-4.9 11.4-10.6 11.4-20.9 0-76.9-76.9-76.9-97.7.1-7.7 12.7-21.1 20.4-21.1zm184.3 186.3c-29.1 32-66.3 48.6-109.7 48.6-59.4 0-106.3-32.6-128.9-88.3-17.1-43.4 3.8-68.3 20.6-68.3 11.4 0 54.3 60.3 54.3 73.1 0 4.9-7.7 8.3-11.7 8.3-16.1 0-22.4-15.5-51.1-51.4-29.7 29.7 20.5 86.9 58.3 86.9 26.1 0 43.1-24.2 38-42 3.7 0 8.3.3 11.7-.6 1.1 27.1 9.1 59.4 41.7 61.7 0-.9 2-7.1 2-7.4 0-17.4-10.6-32.6-10.6-50.3 0-28.3 21.7-55.7 43.7-71.7 8-6 17.7-9.7 27.1-13.1 9.7-3.7 20-8 27.4-15.4-1.1-11.2-5.7-21.1-16.9-21.1-27.7 0-120.6 4-120.6-39.7 0-6.7.1-13.1 17.4-13.1 32.3 0 114.3 8 138.3 29.1 18.1 16.1 24.3 113.2-31 174.7zm-98.6-126c9.7 3.1 19.7 4 29.7 6-7.4 5.4-14 12-20.3 19.1-2.8-8.5-6.2-16.8-9.4-25.1z\"]\n};\nconst faGalacticRepublic = {\n  prefix: 'fab',\n  iconName: 'galactic-republic',\n  icon: [496, 512, [], \"f50c\", \"M248 504C111.25 504 0 392.75 0 256S111.25 8 248 8s248 111.25 248 248-111.25 248-248 248zm0-479.47C120.37 24.53 16.53 128.37 16.53 256S120.37 487.47 248 487.47 479.47 383.63 479.47 256 375.63 24.53 248 24.53zm27.62 21.81v24.62a185.933 185.933 0 0 1 83.57 34.54l17.39-17.36c-28.75-22.06-63.3-36.89-100.96-41.8zm-55.37.07c-37.64 4.94-72.16 19.8-100.88 41.85l17.28 17.36h.08c24.07-17.84 52.55-30.06 83.52-34.67V46.41zm12.25 50.17v82.87c-10.04 2.03-19.42 5.94-27.67 11.42l-58.62-58.59-21.93 21.93 58.67 58.67c-5.47 8.23-9.45 17.59-11.47 27.62h-82.9v31h82.9c2.02 10.02 6.01 19.31 11.47 27.54l-58.67 58.69 21.93 21.93 58.62-58.62a77.873 77.873 0 0 0 27.67 11.47v82.9h31v-82.9c10.05-2.03 19.37-6.06 27.62-11.55l58.67 58.69 21.93-21.93-58.67-58.69c5.46-8.23 9.47-17.52 11.5-27.54h82.87v-31h-82.87c-2.02-10.02-6.03-19.38-11.5-27.62l58.67-58.67-21.93-21.93-58.67 58.67c-8.25-5.49-17.57-9.47-27.62-11.5V96.58h-31zm183.24 30.72l-17.36 17.36a186.337 186.337 0 0 1 34.67 83.67h24.62c-4.95-37.69-19.83-72.29-41.93-101.03zm-335.55.13c-22.06 28.72-36.91 63.26-41.85 100.91h24.65c4.6-30.96 16.76-59.45 34.59-83.52l-17.39-17.39zM38.34 283.67c4.92 37.64 19.75 72.18 41.8 100.9l17.36-17.39c-17.81-24.07-29.92-52.57-34.51-83.52H38.34zm394.7 0c-4.61 30.99-16.8 59.5-34.67 83.6l17.36 17.36c22.08-28.74 36.98-63.29 41.93-100.96h-24.62zM136.66 406.38l-17.36 17.36c28.73 22.09 63.3 36.98 100.96 41.93v-24.64c-30.99-4.63-59.53-16.79-83.6-34.65zm222.53.05c-24.09 17.84-52.58 30.08-83.57 34.67v24.57c37.67-4.92 72.21-19.79 100.96-41.85l-17.31-17.39h-.08z\"]\n};\nconst faNfcDirectional = {\n  prefix: 'fab',\n  iconName: 'nfc-directional',\n  icon: [512, 512, [], \"e530\", \"M211.8 488.6C213.4 491.1 213.9 494.2 213.2 497.1C212.6 500 210.8 502.6 208.3 504.2C205.7 505.8 202.7 506.3 199.7 505.7C138.3 491.8 84.1 455.8 47.53 404.5C10.97 353.2-5.395 290.3 1.57 227.7C8.536 165 38.34 107.2 85.29 65.21C132.2 23.2 193-.0131 256 0C257.5 0 258.1 .2931 260.3 .8627C261.7 1.432 262.1 2.267 264 3.319C265.1 4.371 265.9 5.619 266.5 6.993C267 8.367 267.3 9.839 267.3 11.32V112.3L291.8 86.39C292.8 85.31 294 84.44 295.4 83.84C296.7 83.23 298.2 82.9 299.7 82.86C301.2 82.81 302.6 83.06 304 83.59C305.4 84.12 306.7 84.92 307.8 85.94C308.8 86.96 309.7 88.18 310.3 89.54C310.9 90.89 311.3 92.35 311.3 93.84C311.3 95.32 311.1 96.8 310.6 98.18C310 99.57 309.2 100.8 308.2 101.9L264.2 148.5C263.1 149.6 261.9 150.5 260.5 151.1C259 151.7 257.5 152 255.1 152C254.5 152 252.9 151.7 251.5 151.1C250.1 150.5 248.8 149.6 247.8 148.5L203.7 101.9C201.7 99.74 200.6 96.83 200.7 93.84C200.7 90.84 202 87.1 204.2 85.94C206.4 83.88 209.3 82.77 212.3 82.86C215.3 82.94 218.1 84.21 220.2 86.39L244.7 112.4V22.89C188.3 25.64 134.9 48.73 94.23 87.87C53.58 127 28.49 179.6 23.61 235.8C18.73 292 34.38 348.1 67.68 393.7C100.1 439.2 149.7 471.2 204.7 483.6C207.6 484.3 210.2 486.1 211.8 488.6L211.8 488.6zM171.4 126.1C170.6 127.4 169.5 128.5 168.3 129.3C147.8 143.2 131.1 161.9 119.5 183.8C107.9 205.7 101.8 230.1 101.8 254.9C101.8 279.7 107.9 304.1 119.5 325.1C131.1 347.9 147.8 366.6 168.3 380.5C170.8 382.2 172.5 384.8 173 387.8C173.6 390.7 172.1 393.8 171.3 396.2C169.6 398.7 166.1 400.4 164 400.1C161.1 401.5 158 400.9 155.6 399.2C132 383.2 112.8 361.7 99.46 336.5C86.15 311.4 79.19 283.4 79.19 254.9C79.19 226.5 86.15 198.4 99.46 173.3C112.8 148.1 132 126.6 155.6 110.6C156.8 109.8 158.2 109.2 159.6 108.8C161.1 108.5 162.6 108.5 164.1 108.8C165.5 109 166.9 109.6 168.2 110.4C169.5 111.2 170.5 112.3 171.4 113.5C172.2 114.7 172.8 116.1 173.1 117.6C173.4 119.1 173.4 120.6 173.1 122C172.8 123.5 172.3 124.9 171.4 126.1H171.4zM340.9 383.5C341.7 382.3 342.8 381.2 343.1 380.4V380.3C364.4 366.3 381.1 347.6 392.7 325.7C404.2 303.9 410.2 279.5 410.2 254.8C410.2 230.1 404.2 205.7 392.7 183.8C381.1 161.1 364.4 143.3 343.1 129.3C342.8 128.5 341.7 127.4 340.9 126.2C340.1 124.9 339.5 123.5 339.3 122.1C338.1 120.6 339 119.1 339.3 117.7C339.6 116.2 340.2 114.8 341 113.6C341.9 112.4 342.1 111.3 344.2 110.5C345.4 109.7 346.8 109.2 348.3 108.9C349.8 108.6 351.2 108.6 352.7 108.9C354.2 109.2 355.5 109.8 356.8 110.7C380.2 126.7 399.5 148.2 412.7 173.3C426 198.4 432.1 226.4 432.1 254.8C432.1 283.3 426 311.3 412.7 336.4C399.5 361.5 380.2 383 356.8 399C355.5 399.9 354.2 400.5 352.7 400.8C351.2 401.1 349.8 401.1 348.3 400.8C346.8 400.5 345.4 399.1 344.2 399.2C342.1 398.4 341.9 397.3 341 396.1C340.2 394.9 339.6 393.5 339.3 392C339 390.6 338.1 389.1 339.3 387.6C339.5 386.2 340.1 384.8 340.9 383.5V383.5zM312.3 6.307C368.5 19.04 418.7 50.28 455 95.01C485.4 132.6 504.6 178 510.3 226C515.9 274 507.9 322.7 487.1 366.3C466.2 409.9 433.5 446.8 392.6 472.6C351.7 498.3 304.4 512 256 512C254.5 512 253.1 511.7 251.7 511.1C250.3 510.6 249.1 509.7 248 508.7C246.1 507.6 246.1 506.4 245.6 505C245 503.6 244.7 502.2 244.7 500.7V401.5L220.2 427.5C218.1 429.7 215.3 430.1 212.3 431.1C209.3 431.2 206.4 430 204.2 427.1C202 425.9 200.7 423.1 200.7 420.1C200.6 417.1 201.7 414.2 203.7 412L247.8 365.4C249.1 363.2 252.9 362 255.1 362C259.1 362 262 363.2 264.2 365.4L308.2 412C310.3 414.2 311.4 417.1 311.3 420.1C311.2 423.1 309.9 425.9 307.8 427.1C305.6 430 302.7 431.2 299.7 431.1C296.7 430.1 293.8 429.7 291.8 427.5L267.3 401.6V489.1C323.7 486.3 377.1 463.3 417.8 424.1C458.5 384.1 483.6 332.4 488.5 276.2C493.3 219.1 477.7 163.9 444.4 118.3C411.1 72.75 362.4 40.79 307.4 28.36C305.9 28.03 304.6 27.42 303.3 26.57C302.1 25.71 301.1 24.63 300.3 23.37C299.5 22.12 298.1 20.72 298.7 19.26C298.5 17.8 298.5 16.3 298.8 14.85C299.2 13.41 299.8 12.04 300.6 10.82C301.5 9.61 302.6 8.577 303.8 7.784C305.1 6.99 306.5 6.451 307.9 6.198C309.4 5.945 310.9 5.982 312.3 6.307L312.3 6.307zM353.1 256.1C353.1 287.5 335.6 317.2 303.8 339.6C301.7 341.1 299 341.9 296.4 341.6C293.7 341.4 291.2 340.3 289.4 338.4L219.3 268.6C217.1 266.5 215.1 263.6 215.9 260.6C215.9 257.6 217.1 254.7 219.2 252.6C221.4 250.5 224.2 249.3 227.2 249.3C230.2 249.3 233.1 250.5 235.2 252.6L298.3 315.4C319.1 298.3 330.5 277.5 330.5 256.1C330.5 232.2 316.4 209.1 290.8 191C288.3 189.3 286.7 186.7 286.2 183.7C285.7 180.8 286.3 177.7 288.1 175.3C289.8 172.8 292.4 171.2 295.4 170.7C298.3 170.2 301.4 170.8 303.8 172.6C335.6 195 353.1 224.7 353.1 256.1V256.1zM216.7 341.5C213.7 342 210.7 341.3 208.2 339.6C176.5 317.2 158.1 287.5 158.1 256.1C158.1 224.7 176.5 195 208.2 172.6C210.4 171 213.1 170.3 215.7 170.5C218.4 170.8 220.8 171.9 222.7 173.8L292.8 243.6C294.9 245.7 296.1 248.6 296.1 251.6C296.1 254.6 294.1 257.4 292.8 259.6C290.7 261.7 287.8 262.9 284.9 262.9C281.9 262.9 278.1 261.7 276.9 259.6L213.8 196.7C192.9 214 181.6 234.7 181.6 256.1C181.6 279.1 195.7 303.1 221.3 321.1C223.7 322.9 225.4 325.5 225.9 328.5C226.4 331.4 225.7 334.4 224 336.9C222.3 339.3 219.6 341 216.7 341.5L216.7 341.5z\"]\n};\nconst faSkype = {\n  prefix: 'fab',\n  iconName: 'skype',\n  icon: [448, 512, [], \"f17e\", \"M424.7 299.8c2.9-14 4.7-28.9 4.7-43.8 0-113.5-91.9-205.3-205.3-205.3-14.9 0-29.7 1.7-43.8 4.7C161.3 40.7 137.7 32 112 32 50.2 32 0 82.2 0 144c0 25.7 8.7 49.3 23.3 68.2-2.9 14-4.7 28.9-4.7 43.8 0 113.5 91.9 205.3 205.3 205.3 14.9 0 29.7-1.7 43.8-4.7 19 14.6 42.6 23.3 68.2 23.3 61.8 0 112-50.2 112-112 .1-25.6-8.6-49.2-23.2-68.1zm-194.6 91.5c-65.6 0-120.5-29.2-120.5-65 0-16 9-30.6 29.5-30.6 31.2 0 34.1 44.9 88.1 44.9 25.7 0 42.3-11.4 42.3-26.3 0-18.7-16-21.6-42-28-62.5-15.4-117.8-22-117.8-87.2 0-59.2 58.6-81.1 109.1-81.1 55.1 0 110.8 21.9 110.8 55.4 0 16.9-11.4 31.8-30.3 31.8-28.3 0-29.2-33.5-75-33.5-25.7 0-42 7-42 22.5 0 19.8 20.8 21.8 69.1 33 41.4 9.3 90.7 26.8 90.7 77.6 0 59.1-57.1 86.5-112 86.5z\"]\n};\nconst faJoget = {\n  prefix: 'fab',\n  iconName: 'joget',\n  icon: [496, 512, [], \"f3b7\", \"M378.1 45C337.6 19.9 292.6 8 248.2 8 165 8 83.8 49.9 36.9 125.9c-71.9 116.6-35.6 269.3 81 341.2s269.3 35.6 341.2-80.9c71.9-116.6 35.6-269.4-81-341.2zm51.8 323.2c-40.4 65.5-110.4 101.5-182 101.5-6.8 0-13.6-.4-20.4-1-9-13.6-19.9-33.3-23.7-42.4-5.7-13.7-27.2-45.6 31.2-67.1 51.7-19.1 176.7-16.5 208.8-17.6-4 9-8.6 17.9-13.9 26.6zm-200.8-86.3c-55.5-1.4-81.7-20.8-58.5-48.2s51.1-40.7 68.9-51.2c17.9-10.5 27.3-33.7-23.6-29.7C87.3 161.5 48.6 252.1 37.6 293c-8.8-49.7-.1-102.7 28.5-149.1C128 43.4 259.6 12.2 360.1 74.1c74.8 46.1 111.2 130.9 99.3 212.7-24.9-.5-179.3-3.6-230.3-4.9zm183.8-54.8c-22.7-6-57 11.3-86.7 27.2-29.7 15.8-31.1 8.2-31.1 8.2s40.2-28.1 50.7-34.5 31.9-14 13.4-24.6c-3.2-1.8-6.7-2.7-10.4-2.7-17.8 0-41.5 18.7-67.5 35.6-31.5 20.5-65.3 31.3-65.3 31.3l169.5-1.6 46.5-23.4s3.6-9.5-19.1-15.5z\"]\n};\nconst faFedora = {\n  prefix: 'fab',\n  iconName: 'fedora',\n  icon: [448, 512, [], \"f798\", \"M.0413 255.8C.1219 132.2 100.3 32 224 32C347.7 32 448 132.3 448 256C448 379.7 347.8 479.9 224.1 480H50.93C22.84 480 .0832 457.3 .0416 429.2H0V255.8H.0413zM342.6 192.7C342.6 153 307 124.2 269.4 124.2C234.5 124.2 203.6 150.5 199.3 184.1C199.1 187.9 198.9 189.1 198.9 192.6C198.8 213.7 198.9 235.4 198.1 257C199 283.1 199.1 309.1 198.1 333.6C198.1 360.7 178.7 379.1 153.4 379.1C128.1 379.1 107.6 358.9 107.6 333.6C108.1 305.9 130.2 288.3 156.1 287.5H156.3L182.6 287.3V250L156.3 250.2C109.2 249.8 71.72 286.7 70.36 333.6C70.36 379.2 107.9 416.5 153.4 416.5C196.4 416.5 232.1 382.9 236 340.9L236.2 287.4L268.8 287.1C294.1 287.3 293.8 249.3 268.6 249.8L236.2 250.1C236.2 243.7 236.3 237.3 236.3 230.9C236.4 218.2 236.4 205.5 236.2 192.7C236.3 176.2 252 161.5 269.4 161.5C286.9 161.5 305.3 170.2 305.3 192.7C305.3 195.9 305.2 197.8 305 199C303.1 209.5 310.2 219.4 320.7 220.9C331.3 222.4 340.9 214.8 341.9 204.3C342.5 200.1 342.6 196.4 342.6 192.7H342.6z\"]\n};\nconst faStripeS = {\n  prefix: 'fab',\n  iconName: 'stripe-s',\n  icon: [384, 512, [], \"f42a\", \"M155.3 154.6c0-22.3 18.6-30.9 48.4-30.9 43.4 0 98.5 13.3 141.9 36.7V26.1C298.3 7.2 251.1 0 203.8 0 88.1 0 11 60.4 11 161.4c0 157.9 216.8 132.3 216.8 200.4 0 26.4-22.9 34.9-54.7 34.9-47.2 0-108.2-19.5-156.1-45.5v128.5a396.09 396.09 0 0 0 156 32.4c118.6 0 200.3-51 200.3-153.6 0-170.2-218-139.7-218-203.9z\"]\n};\nconst faMeta = {\n  prefix: 'fab',\n  iconName: 'meta',\n  icon: [640, 512, [], \"e49b\", \"M640 317.9C640 409.2 600.6 466.4 529.7 466.4C467.1 466.4 433.9 431.8 372.8 329.8L341.4 277.2C333.1 264.7 326.9 253 320.2 242.2C300.1 276 273.1 325.2 273.1 325.2C206.1 441.8 168.5 466.4 116.2 466.4C43.42 466.4 0 409.1 0 320.5C0 177.5 79.78 42.4 183.9 42.4C234.1 42.4 277.7 67.08 328.7 131.9C365.8 81.8 406.8 42.4 459.3 42.4C558.4 42.4 640 168.1 640 317.9H640zM287.4 192.2C244.5 130.1 216.5 111.7 183 111.7C121.1 111.7 69.22 217.8 69.22 321.7C69.22 370.2 87.7 397.4 118.8 397.4C149 397.4 167.8 378.4 222 293.6C222 293.6 246.7 254.5 287.4 192.2V192.2zM531.2 397.4C563.4 397.4 578.1 369.9 578.1 322.5C578.1 198.3 523.8 97.08 454.9 97.08C421.7 97.08 393.8 123 360 175.1C369.4 188.9 379.1 204.1 389.3 220.5L426.8 282.9C485.5 377 500.3 397.4 531.2 397.4L531.2 397.4z\"]\n};\nconst faLaravel = {\n  prefix: 'fab',\n  iconName: 'laravel',\n  icon: [512, 512, [], \"f3bd\", \"M107.2 0c2.5 0 4.7 .8 6.7 2l94.3 54.1c2.7 1.5 4.5 3.5 5.4 5.9c.9 2.2 .9 4.3 .9 5.6l0 193.4 69.2-39.7 0-100.3c0-2.6 .6-5 2.2-7.2c1.5-2.1 3.5-3.6 5.7-4.8c0 0 0 0 0 0l94-54c1.6-.9 3.4-1.6 5.5-1.6s4 .7 5.6 1.6l95.8 55.1c2.3 1.3 3.9 3 4.9 5.3c.9 2.1 .9 4.2 .9 5.8l0 107.2c0 2-.2 4.3-1.4 6.4c-1.2 2.2-3 3.7-5.1 4.9l-.1 .1-88 50.5 0 100c0 2.3-.3 4.8-1.6 7c-1.3 2.2-3.3 3.7-5.3 4.9c0 0 0 0-.1 0L208.7 510c-2.2 1.2-4.5 2-7.1 2s-4.9-.9-7.1-2l-.1-.1L7.1 402l-.5-.3c-1.1-.7-2.6-1.7-3.8-2.9C.9 396.9 0 394.6 0 391.6L0 65.9c0-4.8 3-7.9 5.5-9.3L100.5 2c2-1.2 4.3-2 6.8-2zM38.1 67.1l69 39.9 69.2-39.9L107.1 27.4l-69 39.7zm353 93.2l69-39.7-69-39.7-69.1 39.7 69.1 39.7zM189.2 89L120 128.8l0 186.4 69.2-39.9 0-186.4zM94.5 128.9L25.2 89.1l0 294.2 164 94.2 0-79.4-87.3-49.3-.2-.1c-1.3-.8-3.2-1.9-4.6-3.7c-1.7-2.1-2.5-4.7-2.5-7.7l0-208.5zm214.7 92.4l69.3 39.6 0-78.5-69.3-39.9 0 78.8zm94.5 39.6L473 221.2l0-78.8-69.3 39.9 0 78.5zM201.6 376.1l163.8-93.2-69-39.9L133 337.1l68.6 38.9zm12.9 101.5l164-94.2 0-78.8-164 93.6 0 79.4z\"]\n};\nconst faHotjar = {\n  prefix: 'fab',\n  iconName: 'hotjar',\n  icon: [512, 512, [], \"f3b1\", \"M361.5 0c0 131.6-80.7 176.8-140.2 209.4c-.6 .3-1.1 .6-1.6 .9c-53.8 30.2-88.7 49.8-89.6 122H32C32 200.8 112.7 155.6 172.2 123C227 93.2 262.5 73 262.5 0h98.9zM301 302.6c54.8-29.8 90.3-50 90.3-123h98c0 131.6-80.7 176.7-140.2 209.4c-54.8 29.8-90.3 50-90.3 123h-98c0-131.6 80.7-176.8 140.2-209.4z\"]\n};\nconst faBluetoothB = {\n  prefix: 'fab',\n  iconName: 'bluetooth-b',\n  icon: [320, 512, [], \"f294\", \"M196.48 260.023l92.626-103.333L143.125 0v206.33l-86.111-86.111-31.406 31.405 108.061 108.399L25.608 368.422l31.406 31.405 86.111-86.111L145.84 512l148.552-148.644-97.912-103.333zm40.86-102.996l-49.977 49.978-.338-100.295 50.315 50.317zM187.363 313.04l49.977 49.978-50.315 50.316.338-100.294z\"]\n};\nconst faSquareLetterboxd = {\n  prefix: 'fab',\n  iconName: 'square-letterboxd',\n  icon: [448, 512, [], \"e62e\", \"M384 32c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H384zM105.1 187C66.4 187 35 218.3 35 257s31.4 70 70.1 70c24.8 0 46.5-12.8 59-32.2l.5-.7-.4-.6c-6.5-10.6-10.2-23.1-10.2-36.5c0-13.6 3.9-26.3 10.6-37.1c-12.4-19.8-34.4-32.9-59.5-32.9zM224 187c-24.8 0-46.5 12.8-59 32.2l-.5 .7 .4 .6c6.5 10.6 10.2 23.1 10.2 36.5c0 13.6-3.9 26.3-10.6 37.1C176.9 313.8 198.9 327 224 327c24.8 0 46.5-12.8 59-32.2l.5-.7-.4-.6c-6.5-10.6-10.2-23.1-10.2-36.5c0-13.6 3.9-26.3 10.6-37.1C271.1 200.2 249.1 187 224 187zm118.9 0c-24.8 0-46.5 12.8-59 32.2l-.5 .7 .4 .6c6.5 10.6 10.2 23.1 10.2 36.5c0 13.6-3.9 26.3-10.6 37.1c12.4 19.8 34.4 32.9 59.5 32.9c38.7 0 70.1-31.3 70.1-70s-31.4-70-70.1-70z\"]\n};\nconst faStickerMule = {\n  prefix: 'fab',\n  iconName: 'sticker-mule',\n  icon: [576, 512, [], \"f3f7\", \"M561.7 199.6c-1.3.3.3 0 0 0zm-6.2-77.4c-7.7-22.3-5.1-7.2-13.4-36.9-1.6-6.5-3.6-14.5-6.2-20-4.4-8.7-4.6-7.5-4.6-9.5 0-5.3 30.7-45.3 19-46.9-5.7-.6-12.2 11.6-20.6 17-8.6 4.2-8 5-10.3 5-2.6 0-5.7-3-6.2-5-2-5.7 1.9-25.9-3.6-25.9-3.6 0-12.3 24.8-17 25.8-5.2 1.3-27.9-11.4-75.1 18-25.3 13.2-86.9 65.2-87 65.3-6.7 4.7-20 4.7-35.5 16-44.4 30.1-109.6 9.4-110.7 9-110.6-26.8-128-15.2-159 11.5-20.8 17.9-23.7 36.5-24.2 38.9-4.2 20.4 5.2 48.3 6.7 64.3 1.8 19.3-2.7 17.7 7.7 98.3.5 1 4.1 0 5.1 1.5 0 8.4-3.8 12.1-4.1 13-1.5 4.5-1.5 10.5 0 16 2.3 8.2 8.2 37.2 8.2 46.9 0 41.8.4 44 2.6 49.4 3.9 10 12.5 9.1 17 12 3.1 3.5-.5 8.5 1 12.5.5 2 3.6 4 6.2 5 9.2 3.6 27 .3 29.9-2.5 1.6-1.5.5-4.5 3.1-5 5.1 0 10.8-.5 14.4-2.5 5.1-2.5 4.1-6 1.5-10.5-.4-.8-7-13.3-9.8-16-2.1-2-5.1-3-7.2-4.5-5.8-4.9-10.3-19.4-10.3-19.5-4.6-19.4-10.3-46.3-4.1-66.8 4.6-17.2 39.5-87.7 39.6-87.8 4.1-6.5 17-11.5 27.3-7 6 1.9 19.3 22 65.4 30.9 47.9 8.7 97.4-2 112.2-2 2.8 2-1.9 13-.5 38.9 0 26.4-.4 13.7-4.1 29.9-2.2 9.7 3.4 23.2-1.5 46.9-1.4 9.8-9.9 32.7-8.2 43.4.5 1 1 2 1.5 3.5.5 4.5 1.5 8.5 4.6 10 7.3 3.6 12-3.5 9.8 11.5-.7 3.1-2.6 12 1.5 15 4.4 3.7 30.6 3.4 36.5.5 2.6-1.5 1.6-4.5 6.4-7.4 1.9-.9 11.3-.4 11.3-6.5.3-1.8-9.2-19.9-9.3-20-2.6-3.5-9.2-4.5-11.3-8-6.9-10.1-1.7-52.6.5-59.4 3-11 5.6-22.4 8.7-32.4 11-42.5 10.3-50.6 16.5-68.3.8-1.8 6.4-23.1 10.3-29.9 9.3-17 21.7-32.4 33.5-47.4 18-22.9 34-46.9 52-69.8 6.1-7 8.2-13.7 18-8 10.8 5.7 21.6 7 31.9 17 14.6 12.8 10.2 18.2 11.8 22.9 1.5 5 7.7 10.5 14.9 9.5 10.4-2 13-2.5 13.4-2.5 2.6-.5 5.7-5 7.2-8 3.1-5.5 7.2-9 7.2-16.5 0-7.7-.4-2.8-20.6-52.9z\"]\n};\nconst faCreativeCommonsZero = {\n  prefix: 'fab',\n  iconName: 'creative-commons-zero',\n  icon: [496, 512, [], \"f4f3\", \"M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm-.4 60.5c-81.9 0-102.5 77.3-102.5 142.8 0 65.5 20.6 142.8 102.5 142.8S350.5 321.5 350.5 256c0-65.5-20.6-142.8-102.5-142.8zm0 53.9c3.3 0 6.4.5 9.2 1.2 5.9 5.1 8.8 12.1 3.1 21.9l-54.5 100.2c-1.7-12.7-1.9-25.1-1.9-34.4 0-28.8 2-88.9 44.1-88.9zm40.8 46.2c2.9 15.4 3.3 31.4 3.3 42.7 0 28.9-2 88.9-44.1 88.9-13.5 0-32.6-7.7-20.1-26.4l60.9-105.2z\"]\n};\nconst faHips = {\n  prefix: 'fab',\n  iconName: 'hips',\n  icon: [640, 512, [], \"f452\", \"M251.6 157.6c0-1.9-.9-2.8-2.8-2.8h-40.9c-1.6 0-2.7 1.4-2.7 2.8v201.8c0 1.4 1.1 2.8 2.7 2.8h40.9c1.9 0 2.8-.9 2.8-2.8zM156.5 168c-16.1-11.8-36.3-17.9-60.3-18-18.1-.1-34.6 3.7-49.8 11.4V80.2c0-1.8-.9-2.7-2.8-2.7H2.7c-1.8 0-2.7.9-2.7 2.7v279.2c0 1.9.9 2.8 2.7 2.8h41c1.9 0 2.8-.9 2.8-2.8V223.3c0-.8-2.8-27 45.8-27 48.5 0 45.8 26.1 45.8 27v122.6c0 9 7.3 16.3 16.4 16.3h27.3c1.8 0 2.7-.9 2.7-2.8V223.3c0-23.4-9.3-41.8-28-55.3zm478.4 110.1c-6.8-15.7-18.4-27-34.9-34.1l-57.6-25.3c-8.6-3.6-9.2-11.2-2.6-16.1 7.4-5.5 44.3-13.9 84 6.8 1.7 1 4-.3 4-2.4v-44.7c0-1.3-.6-2.1-1.9-2.6-17.7-6.6-36.1-9.9-55.1-9.9-26.5 0-45.3 5.8-58.5 15.4-.5.4-28.4 20-22.7 53.7 3.4 19.6 15.8 34.2 37.2 43.6l53.6 23.5c11.6 5.1 15.2 13.3 12.2 21.2-3.7 9.1-13.2 13.6-36.5 13.6-24.3 0-44.7-8.9-58.4-19.1-2.1-1.4-4.4.2-4.4 2.3v34.4c0 10.4 4.9 17.3 14.6 20.7 15.6 5.5 31.6 8.2 48.2 8.2 12.7 0 25.8-1.2 36.3-4.3.7-.3 36-8.9 45.6-45.8 3.5-13.5 2.4-26.5-3.1-39.1zM376.2 149.8c-31.7 0-104.2 20.1-104.2 103.5v183.5c0 .8.6 2.7 2.7 2.7h40.9c1.9 0 2.8-.9 2.8-2.7V348c16.5 12.7 35.8 19.1 57.7 19.1 60.5 0 108.7-48.5 108.7-108.7.1-60.3-48.2-108.6-108.6-108.6zm0 170.9c-17.2 0-31.9-6.1-44-18.2-12.2-12.2-18.2-26.8-18.2-44 0-34.5 27.6-62.2 62.2-62.2 34.5 0 62.2 27.6 62.2 62.2.1 34.3-27.3 62.2-62.2 62.2zM228.3 72.5c-15.9 0-28.8 12.9-28.9 28.9 0 15.6 12.7 28.9 28.9 28.9s28.9-13.1 28.9-28.9c0-16.2-13-28.9-28.9-28.9z\"]\n};\nconst faCss = {\n  prefix: 'fab',\n  iconName: 'css',\n  icon: [448, 512, [], \"e6a2\", \"M376.3 32L0 32 0 408.3c0 19 7.6 37.2 21 50.7s31.7 21 50.7 21l304.6 0c19 0 37.2-7.6 50.7-21s21-31.7 21-50.7l0-304.6c0-19-7.6-37.2-21-50.7s-31.7-21-50.7-21zM332.4 431.4c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.5-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-4-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L351.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.5 12.5c7.5 8.4 11.5 20.3 11.8 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4 27.4-12.3 35.7c-8.2 8.3-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-101 0c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.4-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-3.9-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L250.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.4 12.5c7.6 8.4 11.5 20.3 11.9 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4.1 27.4-12.3 35.7s-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-105.6 1.1c-8.4-7.7-12.5-19.2-12.5-34.5l0-75.4c0-15.2 4.4-26.7 13.2-34.6c8.9-7.8 20.7-11.8 35.2-11.8c14.1 0 25.2 4 33.4 12c8.3 8 12.5 20 12.5 35.9l0 6-33.1 0 0-5.8c0-6.1-1.3-10.7-4-13.6c-1.1-1.5-2.6-2.7-4.3-3.5s-3.5-1.2-5.4-1.1c-5.4 0-9.2 1.8-11.4 5.6c-2.3 5.2-3.3 10.8-3 16.4l0 65.5c0 13.7 4.8 20.6 14.4 20.8c4.5 0 7.9-1.6 10.2-4.8c2.5-4.1 3.7-8.8 3.5-13.6l0-4.9 33.1 0 0 5.1c0 10.6-2.1 19.5-6.2 26.6c-4 6.9-9.9 12.5-17.1 16c-7.7 3.7-16.1 5.5-24.6 5.3c-14.2 0-25.5-3.9-33.8-11.6z\"]\n};\nconst faBehance = {\n  prefix: 'fab',\n  iconName: 'behance',\n  icon: [576, 512, [], \"f1b4\", \"M232 237.2c31.8-15.2 48.4-38.2 48.4-74 0-70.6-52.6-87.8-113.3-87.8H0v354.4h171.8c64.4 0 124.9-30.9 124.9-102.9 0-44.5-21.1-77.4-64.7-89.7zM77.9 135.9H151c28.1 0 53.4 7.9 53.4 40.5 0 30.1-19.7 42.2-47.5 42.2h-79v-82.7zm83.3 233.7H77.9V272h84.9c34.3 0 56 14.3 56 50.6 0 35.8-25.9 47-57.6 47zm358.5-240.7H376V94h143.7v34.9zM576 305.2c0-75.9-44.4-139.2-124.9-139.2-78.2 0-131.3 58.8-131.3 135.8 0 79.9 50.3 134.7 131.3 134.7 61.3 0 101-27.6 120.1-86.3H509c-6.7 21.9-34.3 33.5-55.7 33.5-41.3 0-63-24.2-63-65.3h185.1c.3-4.2.6-8.7.6-13.2zM390.4 274c2.3-33.7 24.7-54.8 58.5-54.8 35.4 0 53.2 20.8 56.2 54.8H390.4z\"]\n};\nconst faReddit = {\n  prefix: 'fab',\n  iconName: 'reddit',\n  icon: [512, 512, [], \"f1a1\", \"M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z\"]\n};\nconst faDiscord = {\n  prefix: 'fab',\n  iconName: 'discord',\n  icon: [640, 512, [], \"f392\", \"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z\"]\n};\nconst faChrome = {\n  prefix: 'fab',\n  iconName: 'chrome',\n  icon: [512, 512, [], \"f268\", \"M0 256C0 209.4 12.47 165.6 34.27 127.1L144.1 318.3C166 357.5 207.9 384 256 384C270.3 384 283.1 381.7 296.8 377.4L220.5 509.6C95.9 492.3 0 385.3 0 256zM365.1 321.6C377.4 302.4 384 279.1 384 256C384 217.8 367.2 183.5 340.7 160H493.4C505.4 189.6 512 222.1 512 256C512 397.4 397.4 511.1 256 512L365.1 321.6zM477.8 128H256C193.1 128 142.3 172.1 130.5 230.7L54.19 98.47C101 38.53 174 0 256 0C350.8 0 433.5 51.48 477.8 128V128zM168 256C168 207.4 207.4 168 256 168C304.6 168 344 207.4 344 256C344 304.6 304.6 344 256 344C207.4 344 168 304.6 168 256z\"]\n};\nconst faAppStoreIos = {\n  prefix: 'fab',\n  iconName: 'app-store-ios',\n  icon: [448, 512, [], \"f370\", \"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM127 384.5c-5.5 9.6-17.8 12.8-27.3 7.3-9.6-5.5-12.8-17.8-7.3-27.3l14.3-24.7c16.1-4.9 29.3-1.1 39.6 11.4L127 384.5zm138.9-53.9H84c-11 0-20-9-20-20s9-20 20-20h51l65.4-113.2-20.5-35.4c-5.5-9.6-2.2-21.8 7.3-27.3 9.6-5.5 21.8-2.2 27.3 7.3l8.9 15.4 8.9-15.4c5.5-9.6 17.8-12.8 27.3-7.3 9.6 5.5 12.8 17.8 7.3 27.3l-85.8 148.6h62.1c20.2 0 31.5 23.7 22.7 40zm98.1 0h-29l19.6 33.9c5.5 9.6 2.2 21.8-7.3 27.3-9.6 5.5-21.8 2.2-27.3-7.3-32.9-56.9-57.5-99.7-74-128.1-16.7-29-4.8-58 7.1-67.8 13.1 22.7 32.7 56.7 58.9 102h52c11 0 20 9 20 20 0 11.1-9 20-20 20z\"]\n};\nconst faCcDiscover = {\n  prefix: 'fab',\n  iconName: 'cc-discover',\n  icon: [576, 512, [], \"f1f2\", \"M520.4 196.1c0-7.9-5.5-12.1-15.6-12.1h-4.9v24.9h4.7c10.3 0 15.8-4.4 15.8-12.8zM528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-44.1 138.9c22.6 0 52.9-4.1 52.9 24.4 0 12.6-6.6 20.7-18.7 23.2l25.8 34.4h-19.6l-22.2-32.8h-2.2v32.8h-16zm-55.9.1h45.3v14H444v18.2h28.3V217H444v22.2h29.3V253H428zm-68.7 0l21.9 55.2 22.2-55.2h17.5l-35.5 84.2h-8.6l-35-84.2zm-55.9-3c24.7 0 44.6 20 44.6 44.6 0 24.7-20 44.6-44.6 44.6-24.7 0-44.6-20-44.6-44.6 0-24.7 20-44.6 44.6-44.6zm-49.3 6.1v19c-20.1-20.1-46.8-4.7-46.8 19 0 25 27.5 38.5 46.8 19.2v19c-29.7 14.3-63.3-5.7-63.3-38.2 0-31.2 33.1-53 63.3-38zm-97.2 66.3c11.4 0 22.4-15.3-3.3-24.4-15-5.5-20.2-11.4-20.2-22.7 0-23.2 30.6-31.4 49.7-14.3l-8.4 10.8c-10.4-11.6-24.9-6.2-24.9 2.5 0 4.4 2.7 6.9 12.3 10.3 18.2 6.6 23.6 12.5 23.6 25.6 0 29.5-38.8 37.4-56.6 11.3l10.3-9.9c3.7 7.1 9.9 10.8 17.5 10.8zM55.4 253H32v-82h23.4c26.1 0 44.1 17 44.1 41.1 0 18.5-13.2 40.9-44.1 40.9zm67.5 0h-16v-82h16zM544 433c0 8.2-6.8 15-15 15H128c189.6-35.6 382.7-139.2 416-160zM74.1 191.6c-5.2-4.9-11.6-6.6-21.9-6.6H48v54.2h4.2c10.3 0 17-2 21.9-6.4 5.7-5.2 8.9-12.8 8.9-20.7s-3.2-15.5-8.9-20.5z\"]\n};\nconst faWpbeginner = {\n  prefix: 'fab',\n  iconName: 'wpbeginner',\n  icon: [512, 512, [], \"f297\", \"M462.799 322.374C519.01 386.682 466.961 480 370.944 480c-39.602 0-78.824-17.687-100.142-50.04-6.887.356-22.702.356-29.59 0C219.848 462.381 180.588 480 141.069 480c-95.49 0-148.348-92.996-91.855-157.626C-29.925 190.523 80.479 32 256.006 32c175.632 0 285.87 158.626 206.793 290.374zm-339.647-82.972h41.529v-58.075h-41.529v58.075zm217.18 86.072v-23.839c-60.506 20.915-132.355 9.198-187.589-33.971l.246 24.897c51.101 46.367 131.746 57.875 187.343 32.913zm-150.753-86.072h166.058v-58.075H189.579v58.075z\"]\n};\nconst faConfluence = {\n  prefix: 'fab',\n  iconName: 'confluence',\n  icon: [512, 512, [], \"f78d\", \"M2.3 412.2c-4.5 7.6-2.1 17.5 5.5 22.2l105.9 65.2c7.7 4.7 17.7 2.4 22.4-5.3 0-.1.1-.2.1-.2 67.1-112.2 80.5-95.9 280.9-.7 8.1 3.9 17.8.4 21.7-7.7.1-.1.1-.3.2-.4l50.4-114.1c3.6-8.1-.1-17.6-8.1-21.3-22.2-10.4-66.2-31.2-105.9-50.3C127.5 179 44.6 345.3 2.3 412.2zm507.4-312.1c4.5-7.6 2.1-17.5-5.5-22.2L398.4 12.8c-7.5-5-17.6-3.1-22.6 4.4-.2.3-.4.6-.6 1-67.3 112.6-81.1 95.6-280.6.9-8.1-3.9-17.8-.4-21.7 7.7-.1.1-.1.3-.2.4L22.2 141.3c-3.6 8.1.1 17.6 8.1 21.3 22.2 10.4 66.3 31.2 106 50.4 248 120 330.8-45.4 373.4-112.9z\"]\n};\nconst faShoelace = {\n  prefix: 'fab',\n  iconName: 'shoelace',\n  icon: [512, 512, [], \"e60c\", \"M404.9 331c2.2-1.1 4.4-2.3 6.5-3.7l8.3-4.8c1.5-1.1 4.4-3.4 8.7-6.7l.5-.5c3.4-3.4 7.2-5 11.3-4.9c1.8 0 3.9 .5 6.4 1.5l31-27.5c.9-.7 1.7-1.3 2.6-1.8h.2c3.3-1.9 6-1.8 8.2 .4c3.9 2.1 4.2 5.6 .9 10.6L456.9 322c.2 .5 .4 1 .4 1.5c.5 2.2 .3 4.4-.5 6.6c-.7 1.5-1.8 2.9-3.1 4.2c-1.4 1.4-2.7 2.8-4.2 4.2l-18.8 13.7c-1.7 1.2-3.4 2.3-5.1 3.3c-2.1 1.3-4.3 2.5-6.6 3.6c-1 .4-1.9 .9-2.9 1.3c-5.9 2.5-11.9 4.2-18.2 5c-2.9 24.5-11.3 47.1-25.1 67.8c-17.5 25.7-41.4 45.4-71.8 58.8c-30.2 13.5-63 20.2-98.2 20.2c-48.6-.5-88-11.4-118.2-32.8C49.5 454.4 32 421.5 32 380.3v-5.6c1.2-28.1 9.5-54.6 24.8-79.8c15.1-24.9 37.1-41.7 66.1-50.5c14.9-4.4 29.9-6.6 45-6.6c15.5 0 31.6 2.9 48.1 8.6s35.2 15.5 55.9 29.5L326 312.2c15.1 9.8 28.8 16.5 41.2 20c-2.6-25.1-11.7-46.6-27.3-64.5c-15.7-18.1-35.6-31.3-59.9-39.7l-23.3-8c-21.4-7.5-37.3-14.9-47.7-22.2c-28.2-19.1-43.8-45.2-47-78.5l-.5-9.8c0-32.1 13-58.9 39-80.5C223.5 9.7 251.1 0 283 0c24 0 45.6 6.9 64.7 20.8c19.2 14 30.1 33.8 32.6 59.4l.5 10c0 18.6-4.8 34.5-14.4 47.7c-9.8 13.2-18.5 19.9-26 19.9c-1.6-.1-3.1-.3-4.5-.6l-34 32c-5.5 3-9.2 2.5-11.1-1.6c-1.9-2.2-1.8-4.9 .5-8.2l.2-.2c.5-.7 1.2-1.5 2-2.4l31.6-30c-.4-1.5-.6-3.1-.6-4.8c0-4.1 1.6-7.6 4.9-10.4c13.8-12.4 20.8-26.7 20.8-42.8c0-16-6.1-29.5-18.2-40.4s-28.7-16.5-49.7-16.8c-26.2 0-47.8 7.9-64.7 23.7S192.3 89.9 192.3 112c0 17.8 6.9 33.9 20.6 48.3c13.6 14.2 34.6 25.4 63 33.5c39.8 11.5 70.2 31 91.3 58.3c18.7 24.2 29.1 51.3 31.3 81.4c2.2-.7 4.3-1.5 6.5-2.6zM294.1 178.7c0 1.1 .6 1.6 1.8 1.6c.1 0 9.7-8.9 28.8-26.6c0-2.4-5.1 .9-15.3 10c-10.2 9.2-15.3 14.2-15.3 14.9zm8 6.4c0-1-.5-1.5-1.5-1.5c-1.1 0-2.1 .5-2.9 1.6c-1.9-.1-3.3 .1-4.2 .7c-.4 .2-.5 .5-.5 .7c0 .7 .5 1.3 1.5 1.6h3.3c2.9-1.1 4.4-2.2 4.4-3.3zm22.6-19.9c0-2.8-1.6-2.8-4.9 0c-1.6 1.5-3.6 3.5-6 6.2c-.8 .6-2.6 2.2-5.3 4.9c-2.8 2.9-4.2 4.7-4.2 5.3l.2 1.3c.7 .2 1.2 .4 1.5 .4c.1 0 3.3-2.9 9.5-8.7s9.3-8.9 9.3-9.3zm159.7 120l-30.6 27c1.8 1 3.2 2.4 4 4.2l30.2-27c.2-1.2 .1-2.2-.5-2.9c-.6-.5-1.6-.9-3.1-1.3zm-1.6-.9l-.7-.7-27 21.9 1.6 2 26-23.1zM366.6 363.9c-8-2.1-15.4-4.6-22.2-7.5c-15.3-6.2-34.3-17-57-32.4L250 298.7c-15.8-10.1-30.2-17.6-43.2-22.6c-13.1-4.9-26-7.3-38.6-7.3h-5.5c-32.2 1.7-57.2 13.8-75 36.2c-16.6 20.8-25 45.3-25 73.6c0 31.8 12.8 56.7 38.2 74.7c25.4 18.1 60.2 27.1 104.4 27.1c34.7 0 64-6.2 87.8-18.6c23.7-12.4 42.1-28.8 55.2-49.2c9.8-15.5 15.9-31.8 18.2-48.8z\"]\n};\nconst faMdb = {\n  prefix: 'fab',\n  iconName: 'mdb',\n  icon: [576, 512, [], \"f8ca\", \"M17.37 160.41L7 352h43.91l5.59-79.83L84.43 352h44.71l25.54-77.43 4.79 77.43H205l-12.79-191.59H146.7L106 277.74 63.67 160.41zm281 0h-47.9V352h47.9s95 .8 94.2-95.79c-.78-94.21-94.18-95.78-94.18-95.78zm-1.2 146.46V204.78s46 4.27 46.8 50.57-46.78 51.54-46.78 51.54zm238.29-74.24a56.16 56.16 0 0 0 8-38.31c-5.34-35.76-55.08-34.32-55.08-34.32h-51.9v191.58H482s87 4.79 87-63.85c0-43.14-33.52-55.08-33.52-55.08zm-51.9-31.94s13.57-1.59 16 9.59c1.43 6.66-4 12-4 12h-12v-21.57zm-.1 109.46l.1-24.92V267h.08s41.58-4.73 41.19 22.43c-.33 25.65-41.35 20.74-41.35 20.74z\"]\n};\nconst faDochub = {\n  prefix: 'fab',\n  iconName: 'dochub',\n  icon: [416, 512, [], \"f394\", \"M397.9 160H256V19.6L397.9 160zM304 192v130c0 66.8-36.5 100.1-113.3 100.1H96V84.8h94.7c12 0 23.1.8 33.1 2.5v-84C212.9 1.1 201.4 0 189.2 0H0v512h189.2C329.7 512 400 447.4 400 318.1V192h-96z\"]\n};\nconst faAccessibleIcon = {\n  prefix: 'fab',\n  iconName: 'accessible-icon',\n  icon: [448, 512, [62107], \"f368\", \"M423.9 255.8L411 413.1c-3.3 40.7-63.9 35.1-60.6-4.9l10-122.5-41.1 2.3c10.1 20.7 15.8 43.9 15.8 68.5 0 41.2-16.1 78.7-42.3 106.5l-39.3-39.3c57.9-63.7 13.1-167.2-74-167.2-25.9 0-49.5 9.9-67.2 26L73 243.2c22-20.7 50.1-35.1 81.4-40.2l75.3-85.7-42.6-24.8-51.6 46c-30 26.8-70.6-18.5-40.5-45.4l68-60.7c9.8-8.8 24.1-10.2 35.5-3.6 0 0 139.3 80.9 139.5 81.1 16.2 10.1 20.7 36 6.1 52.6L285.7 229l106.1-5.9c18.5-1.1 33.6 14.4 32.1 32.7zm-64.9-154c28.1 0 50.9-22.8 50.9-50.9C409.9 22.8 387.1 0 359 0c-28.1 0-50.9 22.8-50.9 50.9 0 28.1 22.8 50.9 50.9 50.9zM179.6 456.5c-80.6 0-127.4-90.6-82.7-156.1l-39.7-39.7C36.4 287 24 320.3 24 356.4c0 130.7 150.7 201.4 251.4 122.5l-39.7-39.7c-16 10.9-35.3 17.3-56.1 17.3z\"]\n};\nconst faEbay = {\n  prefix: 'fab',\n  iconName: 'ebay',\n  icon: [640, 512, [], \"f4f4\", \"M606 189.5l-54.8 109.9-54.9-109.9h-37.5l10.9 20.6c-11.5-19-35.9-26-63.3-26-31.8 0-67.9 8.7-71.5 43.1h33.7c1.4-13.8 15.7-21.8 35-21.8 26 0 41 9.6 41 33v3.4c-12.7 0-28 .1-41.7.4-42.4.9-69.6 10-76.7 34.4 1-5.2 1.5-10.6 1.5-16.2 0-52.1-39.7-76.2-75.4-76.2-21.3 0-43 5.5-58.7 24.2v-80.6h-32.1v169.5c0 10.3-.6 22.9-1.1 33.1h31.5c.7-6.3 1.1-12.9 1.1-19.5 13.6 16.6 35.4 24.9 58.7 24.9 36.9 0 64.9-21.9 73.3-54.2-.5 2.8-.7 5.8-.7 9 0 24.1 21.1 45 60.6 45 26.6 0 45.8-5.7 61.9-25.5 0 6.6.3 13.3 1.1 20.2h29.8c-.7-8.2-1-17.5-1-26.8v-65.6c0-9.3-1.7-17.2-4.8-23.8l61.5 116.1-28.5 54.1h35.9L640 189.5zM243.7 313.8c-29.6 0-50.2-21.5-50.2-53.8 0-32.4 20.6-53.8 50.2-53.8 29.8 0 50.2 21.4 50.2 53.8 0 32.3-20.4 53.8-50.2 53.8zm200.9-47.3c0 30-17.9 48.4-51.6 48.4-25.1 0-35-13.4-35-25.8 0-19.1 18.1-24.4 47.2-25.3 13.1-.5 27.6-.6 39.4-.6zm-411.9 1.6h128.8v-8.5c0-51.7-33.1-75.4-78.4-75.4-56.8 0-83 30.8-83 77.6 0 42.5 25.3 74 82.5 74 31.4 0 68-11.7 74.4-46.1h-33.1c-12 35.8-87.7 36.7-91.2-21.6zm95-21.4H33.3c6.9-56.6 92.1-54.7 94.4 0z\"]\n};\nconst faAmazon = {\n  prefix: 'fab',\n  iconName: 'amazon',\n  icon: [448, 512, [], \"f270\", \"M257.2 162.7c-48.7 1.8-169.5 15.5-169.5 117.5 0 109.5 138.3 114 183.5 43.2 6.5 10.2 35.4 37.5 45.3 46.8l56.8-56S341 288.9 341 261.4V114.3C341 89 316.5 32 228.7 32 140.7 32 94 87 94 136.3l73.5 6.8c16.3-49.5 54.2-49.5 54.2-49.5 40.7-.1 35.5 29.8 35.5 69.1zm0 86.8c0 80-84.2 68-84.2 17.2 0-47.2 50.5-56.7 84.2-57.8v40.6zm136 163.5c-7.7 10-70 67-174.5 67S34.2 408.5 9.7 379c-6.8-7.7 1-11.3 5.5-8.3C88.5 415.2 203 488.5 387.7 401c7.5-3.7 13.3 2 5.5 12zm39.8 2.2c-6.5 15.8-16 26.8-21.2 31-5.5 4.5-9.5 2.7-6.5-3.8s19.3-46.5 12.7-55c-6.5-8.3-37-4.3-48-3.2-10.8 1-13 2-14-.3-2.3-5.7 21.7-15.5 37.5-17.5 15.7-1.8 41-.8 46 5.7 3.7 5.1 0 27.1-6.5 43.1z\"]\n};\nconst faUnsplash = {\n  prefix: 'fab',\n  iconName: 'unsplash',\n  icon: [448, 512, [], \"e07c\", \"M448,230.17V480H0V230.17H141.13V355.09H306.87V230.17ZM306.87,32H141.13V156.91H306.87Z\"]\n};\nconst faYarn = {\n  prefix: 'fab',\n  iconName: 'yarn',\n  icon: [496, 512, [], \"f7e3\", \"M393.9 345.2c-39 9.3-48.4 32.1-104 47.4 0 0-2.7 4-10.4 5.8-13.4 3.3-63.9 6-68.5 6.1-12.4.1-19.9-3.2-22-8.2-6.4-15.3 9.2-22 9.2-22-8.1-5-9-9.9-9.8-8.1-2.4 5.8-3.6 20.1-10.1 26.5-8.8 8.9-25.5 5.9-35.3.8-10.8-5.7.8-19.2.8-19.2s-5.8 3.4-10.5-3.6c-6-9.3-17.1-37.3 11.5-62-1.3-10.1-4.6-53.7 40.6-85.6 0 0-20.6-22.8-12.9-43.3 5-13.4 7-13.3 8.6-13.9 5.7-2.2 11.3-4.6 15.4-9.1 20.6-22.2 46.8-18 46.8-18s12.4-37.8 23.9-30.4c3.5 2.3 16.3 30.6 16.3 30.6s13.6-7.9 15.1-5c8.2 16 9.2 46.5 5.6 65.1-6.1 30.6-21.4 47.1-27.6 57.5-1.4 2.4 16.5 10 27.8 41.3 10.4 28.6 1.1 52.7 2.8 55.3.8 1.4 13.7.8 36.4-13.2 12.8-7.9 28.1-16.9 45.4-17 16.7-.5 17.6 19.2 4.9 22.2zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-79.3 75.2c-1.7-13.6-13.2-23-28-22.8-22 .3-40.5 11.7-52.8 19.2-4.8 3-8.9 5.2-12.4 6.8 3.1-44.5-22.5-73.1-28.7-79.4 7.8-11.3 18.4-27.8 23.4-53.2 4.3-21.7 3-55.5-6.9-74.5-1.6-3.1-7.4-11.2-21-7.4-9.7-20-13-22.1-15.6-23.8-1.1-.7-23.6-16.4-41.4 28-12.2.9-31.3 5.3-47.5 22.8-2 2.2-5.9 3.8-10.1 5.4h.1c-8.4 3-12.3 9.9-16.9 22.3-6.5 17.4.2 34.6 6.8 45.7-17.8 15.9-37 39.8-35.7 82.5-34 36-11.8 73-5.6 79.6-1.6 11.1 3.7 19.4 12 23.8 12.6 6.7 30.3 9.6 43.9 2.8 4.9 5.2 13.8 10.1 30 10.1 6.8 0 58-2.9 72.6-6.5 6.8-1.6 11.5-4.5 14.6-7.1 9.8-3.1 36.8-12.3 62.2-28.7 18-11.7 24.2-14.2 37.6-17.4 12.9-3.2 21-15.1 19.4-28.2z\"]\n};\nconst faSquareSteam = {\n  prefix: 'fab',\n  iconName: 'square-steam',\n  icon: [448, 512, [\"steam-square\"], \"f1b7\", \"M165.6 309.1c18.6 7.7 27.3 28.9 19.6 47.4s-29 27.2-47.6 19.4l-28.5-11.8c5 10.6 13.8 19.4 25.4 24.2c25.2 10.5 54.1-1.4 64.6-26.5c5.1-12.1 5.1-25.5 .1-37.7c-5.1-12.1-14.5-21.6-26.7-26.7c-12.1-5-25-4.8-36.4-.5l29.5 12.2zM448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V240.7l116.6 48.1c12-8.2 26.2-12.1 40.7-11.3l55.4-80.2v-1.1c0-48.2 39.3-87.5 87.6-87.5s87.6 39.3 87.6 87.5c0 49.2-40.9 88.7-89.6 87.5l-79 56.3c1.6 38.5-29.1 68.8-65.7 68.8c-31.8 0-58.5-22.7-64.5-52.7L0 319.2V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM241.9 196.2a58.4 58.4 0 1 0 116.8 0 58.4 58.4 0 1 0 -116.8 0zm14.6-.1a43.9 43.9 0 1 1 87.8 0 43.9 43.9 0 1 1 -87.8 0z\"]\n};\nconst faSteamSquare = faSquareSteam;\nconst fa500px = {\n  prefix: 'fab',\n  iconName: '500px',\n  icon: [448, 512, [], \"f26e\", \"M103.3 344.3c-6.5-14.2-6.9-18.3 7.4-23.1 25.6-8 8 9.2 43.2 49.2h.3v-93.9c1.2-50.2 44-92.2 97.7-92.2 53.9 0 97.7 43.5 97.7 96.8 0 63.4-60.8 113.2-128.5 93.3-10.5-4.2-2.1-31.7 8.5-28.6 53 0 89.4-10.1 89.4-64.4 0-61-77.1-89.6-116.9-44.6-23.5 26.4-17.6 42.1-17.6 157.6 50.7 31 118.3 22 160.4-20.1 24.8-24.8 38.5-58 38.5-93 0-35.2-13.8-68.2-38.8-93.3-24.8-24.8-57.8-38.5-93.3-38.5s-68.8 13.8-93.5 38.5c-.3.3-16 16.5-21.2 23.9l-.5.6c-3.3 4.7-6.3 9.1-20.1 6.1-6.9-1.7-14.3-5.8-14.3-11.8V20c0-5 3.9-10.5 10.5-10.5h241.3c8.3 0 8.3 11.6 8.3 15.1 0 3.9 0 15.1-8.3 15.1H130.3v132.9h.3c104.2-109.8 282.8-36 282.8 108.9 0 178.1-244.8 220.3-310.1 62.8zm63.3-260.8c-.5 4.2 4.6 24.5 14.6 20.6C306 56.6 384 144.5 390.6 144.5c4.8 0 22.8-15.3 14.3-22.8-93.2-89-234.5-57-238.3-38.2zM393 414.7C283 524.6 94 475.5 61 310.5c0-12.2-30.4-7.4-28.9 3.3 24 173.4 246 256.9 381.6 121.3 6.9-7.8-12.6-28.4-20.7-20.4zM213.6 306.6c0 4 4.3 7.3 5.5 8.5 3 3 6.1 4.4 8.5 4.4 3.8 0 2.6.2 22.3-19.5 19.6 19.3 19.1 19.5 22.3 19.5 5.4 0 18.5-10.4 10.7-18.2L265.6 284l18.2-18.2c6.3-6.8-10.1-21.8-16.2-15.7L249.7 268c-18.6-18.8-18.4-19.5-21.5-19.5-5 0-18 11.7-12.4 17.3L234 284c-18.1 17.9-20.4 19.2-20.4 22.6z\"]\n};\nconst faSquareVimeo = {\n  prefix: 'fab',\n  iconName: 'square-vimeo',\n  icon: [448, 512, [\"vimeo-square\"], \"f194\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM318.5 309.5C275 366 238.2 394.3 208.1 394.3c-18.7 0-34.4-17.2-47.3-51.6c-3.8-13.9-7.3-26.9-10.5-39c-18.2-68.3-28.6-107.4-46.2-107.4c-2.4 0-10.8 5-25.1 15.1L64 192c7-6.1 13.9-12.4 20.6-18.5c29.1-26.3 55.6-50.3 73.5-51.9c24.9-2.4 40.2 14.6 46 51.1c20.5 129.6 29.6 149.2 66.8 90.5c13.4-21.2 20.6-37.2 21.5-48.3c3.4-32.8-25.6-30.6-45.2-22.2c15.7-51.5 45.8-76.5 90.1-75.1c32.9 1 48.4 22.4 46.5 64c-1.4 31.1-23.2 73.8-65.3 127.9z\"]\n};\nconst faVimeoSquare = faSquareVimeo;\nconst faAsymmetrik = {\n  prefix: 'fab',\n  iconName: 'asymmetrik',\n  icon: [576, 512, [], \"f372\", \"M517.5 309.2c38.8-40 58.1-80 58.5-116.1.8-65.5-59.4-118.2-169.4-135C277.9 38.4 118.1 73.6 0 140.5 52 114 110.6 92.3 170.7 82.3c74.5-20.5 153-25.4 221.3-14.8C544.5 91.3 588.8 195 490.8 299.2c-10.2 10.8-22 21.1-35 30.6L304.9 103.4 114.7 388.9c-65.6-29.4-76.5-90.2-19.1-151.2 20.8-22.2 48.3-41.9 79.5-58.1 20-12.2 39.7-22.6 62-30.7-65.1 20.3-122.7 52.9-161.6 92.9-27.7 28.6-41.4 57.1-41.7 82.9-.5 35.1 23.4 65.1 68.4 83l-34.5 51.7h101.6l22-34.4c22.2 1 45.3 0 68.6-2.7l-22.8 37.1h135.5L340 406.3c18.6-5.3 36.9-11.5 54.5-18.7l45.9 71.8H542L468.6 349c18.5-12.1 35-25.5 48.9-39.8zm-187.6 80.5l-25-40.6-32.7 53.3c-23.4 3.5-46.7 5.1-69.2 4.4l101.9-159.3 78.7 123c-17.2 7.4-35.3 13.9-53.7 19.2z\"]\n};\nconst faFontAwesome = {\n  prefix: 'fab',\n  iconName: 'font-awesome',\n  icon: [512, 512, [62501, 62694, \"font-awesome-flag\", \"font-awesome-logo-full\"], \"f2b4\", \"M91.7 96C106.3 86.8 116 70.5 116 52C116 23.3 92.7 0 64 0S12 23.3 12 52c0 16.7 7.8 31.5 20 41l0 3 0 352 0 64 64 0 0-64 373.6 0c14.6 0 26.4-11.8 26.4-26.4c0-3.7-.8-7.3-2.3-10.7L432 272l61.7-138.9c1.5-3.4 2.3-7 2.3-10.7c0-14.6-11.8-26.4-26.4-26.4L91.7 96z\"]\n};\nconst faFontAwesomeFlag = faFontAwesome;\nconst faFontAwesomeLogoFull = faFontAwesome;\nconst faGratipay = {\n  prefix: 'fab',\n  iconName: 'gratipay',\n  icon: [496, 512, [], \"f184\", \"M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm114.6 226.4l-113 152.7-112.7-152.7c-8.7-11.9-19.1-50.4 13.6-72 28.1-18.1 54.6-4.2 68.5 11.9 15.9 17.9 46.6 16.9 61.7 0 13.9-16.1 40.4-30 68.1-11.9 32.9 21.6 22.6 60 13.8 72z\"]\n};\nconst faApple = {\n  prefix: 'fab',\n  iconName: 'apple',\n  icon: [384, 512, [], \"f179\", \"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\"]\n};\nconst faHive = {\n  prefix: 'fab',\n  iconName: 'hive',\n  icon: [512, 512, [], \"e07f\", \"M260.353,254.878,131.538,33.1a2.208,2.208,0,0,0-3.829.009L.3,254.887A2.234,2.234,0,0,0,.3,257.122L129.116,478.9a2.208,2.208,0,0,0,3.83-.009L260.358,257.113A2.239,2.239,0,0,0,260.353,254.878Zm39.078-25.713a2.19,2.19,0,0,0,1.9,1.111h66.509a2.226,2.226,0,0,0,1.9-3.341L259.115,33.111a2.187,2.187,0,0,0-1.9-1.111H190.707a2.226,2.226,0,0,0-1.9,3.341ZM511.7,254.886,384.9,33.112A2.2,2.2,0,0,0,382.99,32h-66.6a2.226,2.226,0,0,0-1.906,3.34L440.652,256,314.481,476.66a2.226,2.226,0,0,0,1.906,3.34h66.6a2.2,2.2,0,0,0,1.906-1.112L511.7,257.114A2.243,2.243,0,0,0,511.7,254.886ZM366.016,284.917H299.508a2.187,2.187,0,0,0-1.9,1.111l-108.8,190.631a2.226,2.226,0,0,0,1.9,3.341h66.509a2.187,2.187,0,0,0,1.9-1.111l108.8-190.631A2.226,2.226,0,0,0,366.016,284.917Z\"]\n};\nconst faGitkraken = {\n  prefix: 'fab',\n  iconName: 'gitkraken',\n  icon: [592, 512, [], \"f3a6\", \"M565.7 118.1c-2.3-6.1-9.3-9.2-15.3-6.6-5.7 2.4-8.5 8.9-6.3 14.6 10.9 29 16.9 60.5 16.9 93.3 0 134.6-100.3 245.7-230.2 262.7V358.4c7.9-1.5 15.5-3.6 23-6.2v104c106.7-25.9 185.9-122.1 185.9-236.8 0-91.8-50.8-171.8-125.8-213.3-5.7-3.2-13-.9-15.9 5-2.7 5.5-.6 12.2 4.7 15.1 67.9 37.6 113.9 110 113.9 193.2 0 93.3-57.9 173.1-139.8 205.4v-92.2c14.2-4.5 24.9-17.7 24.9-33.5 0-13.1-6.8-24.4-17.3-30.5 8.3-79.5 44.5-58.6 44.5-83.9V170c0-38-87.9-161.8-129-164.7-2.5-.2-5-.2-7.6 0C251.1 8.3 163.2 132 163.2 170v14.8c0 25.3 36.3 4.3 44.5 83.9-10.6 6.1-17.3 17.4-17.3 30.5 0 15.8 10.6 29 24.8 33.5v92.2c-81.9-32.2-139.8-112-139.8-205.4 0-83.1 46-155.5 113.9-193.2 5.4-3 7.4-9.6 4.7-15.1-2.9-5.9-10.1-8.2-15.9-5-75 41.5-125.8 121.5-125.8 213.3 0 114.7 79.2 210.8 185.9 236.8v-104c7.6 2.5 15.1 4.6 23 6.2v123.7C131.4 465.2 31 354.1 31 219.5c0-32.8 6-64.3 16.9-93.3 2.2-5.8-.6-12.2-6.3-14.6-6-2.6-13 .4-15.3 6.6C14.5 149.7 8 183.8 8 219.5c0 155.1 122.6 281.6 276.3 287.8V361.4c6.8.4 15 .5 23.4 0v145.8C461.4 501.1 584 374.6 584 219.5c0-35.7-6.5-69.8-18.3-101.4zM365.9 275.5c13 0 23.7 10.5 23.7 23.7 0 13.1-10.6 23.7-23.7 23.7-13 0-23.7-10.5-23.7-23.7 0-13.1 10.6-23.7 23.7-23.7zm-139.8 47.3c-13.2 0-23.7-10.7-23.7-23.7s10.5-23.7 23.7-23.7c13.1 0 23.7 10.6 23.7 23.7 0 13-10.5 23.7-23.7 23.7z\"]\n};\nconst faKeybase = {\n  prefix: 'fab',\n  iconName: 'keybase',\n  icon: [448, 512, [], \"f4f5\", \"M286.17 419a18 18 0 1 0 18 18 18 18 0 0 0-18-18zm111.92-147.6c-9.5-14.62-39.37-52.45-87.26-73.71q-9.1-4.06-18.38-7.27a78.43 78.43 0 0 0-47.88-104.13c-12.41-4.1-23.33-6-32.41-5.77-.6-2-1.89-11 9.4-35L198.66 32l-5.48 7.56c-8.69 12.06-16.92 23.55-24.34 34.89a51 51 0 0 0-8.29-1.25c-41.53-2.45-39-2.33-41.06-2.33-50.61 0-50.75 52.12-50.75 45.88l-2.36 36.68c-1.61 27 19.75 50.21 47.63 51.85l8.93.54a214 214 0 0 0-46.29 35.54C14 304.66 14 374 14 429.77v33.64l23.32-29.8a148.6 148.6 0 0 0 14.56 37.56c5.78 10.13 14.87 9.45 19.64 7.33 4.21-1.87 10-6.92 3.75-20.11a178.29 178.29 0 0 1-15.76-53.13l46.82-59.83-24.66 74.11c58.23-42.4 157.38-61.76 236.25-38.59 34.2 10.05 67.45.69 84.74-23.84.72-1 1.2-2.16 1.85-3.22a156.09 156.09 0 0 1 2.8 28.43c0 23.3-3.69 52.93-14.88 81.64-2.52 6.46 1.76 14.5 8.6 15.74 7.42 1.57 15.33-3.1 18.37-11.15C429 443 434 414 434 382.32c0-38.58-13-77.46-35.91-110.92zM142.37 128.58l-15.7-.93-1.39 21.79 13.13.78a93 93 0 0 0 .32 19.57l-22.38-1.34a12.28 12.28 0 0 1-11.76-12.79L107 119c1-12.17 13.87-11.27 13.26-11.32l29.11 1.73a144.35 144.35 0 0 0-7 19.17zm148.42 172.18a10.51 10.51 0 0 1-14.35-1.39l-9.68-11.49-34.42 27a8.09 8.09 0 0 1-11.13-1.08l-15.78-18.64a7.38 7.38 0 0 1 1.34-10.34l34.57-27.18-14.14-16.74-17.09 13.45a7.75 7.75 0 0 1-10.59-1s-3.72-4.42-3.8-4.53a7.38 7.38 0 0 1 1.37-10.34L214 225.19s-18.51-22-18.6-22.14a9.56 9.56 0 0 1 1.74-13.42 10.38 10.38 0 0 1 14.3 1.37l81.09 96.32a9.58 9.58 0 0 1-1.74 13.44zM187.44 419a18 18 0 1 0 18 18 18 18 0 0 0-18-18z\"]\n};\nconst faApplePay = {\n  prefix: 'fab',\n  iconName: 'apple-pay',\n  icon: [640, 512, [], \"f415\", \"M116.9 158.5c-7.5 8.9-19.5 15.9-31.5 14.9-1.5-12 4.4-24.8 11.3-32.6 7.5-9.1 20.6-15.6 31.3-16.1 1.2 12.4-3.7 24.7-11.1 33.8m10.9 17.2c-17.4-1-32.3 9.9-40.5 9.9-8.4 0-21-9.4-34.8-9.1-17.9.3-34.5 10.4-43.6 26.5-18.8 32.3-4.9 80 13.3 106.3 8.9 13 19.5 27.3 33.5 26.8 13.3-.5 18.5-8.6 34.5-8.6 16.1 0 20.8 8.6 34.8 8.4 14.5-.3 23.6-13 32.5-26 10.1-14.8 14.3-29.1 14.5-29.9-.3-.3-28-10.9-28.3-42.9-.3-26.8 21.9-39.5 22.9-40.3-12.5-18.6-32-20.6-38.8-21.1m100.4-36.2v194.9h30.3v-66.6h41.9c38.3 0 65.1-26.3 65.1-64.3s-26.4-64-64.1-64h-73.2zm30.3 25.5h34.9c26.3 0 41.3 14 41.3 38.6s-15 38.8-41.4 38.8h-34.8V165zm162.2 170.9c19 0 36.6-9.6 44.6-24.9h.6v23.4h28v-97c0-28.1-22.5-46.3-57.1-46.3-32.1 0-55.9 18.4-56.8 43.6h27.3c2.3-12 13.4-19.9 28.6-19.9 18.5 0 28.9 8.6 28.9 24.5v10.8l-37.8 2.3c-35.1 2.1-54.1 16.5-54.1 41.5.1 25.2 19.7 42 47.8 42zm8.2-23.1c-16.1 0-26.4-7.8-26.4-19.6 0-12.3 9.9-19.4 28.8-20.5l33.6-2.1v11c0 18.2-15.5 31.2-36 31.2zm102.5 74.6c29.5 0 43.4-11.3 55.5-45.4L640 193h-30.8l-35.6 115.1h-.6L537.4 193h-31.6L557 334.9l-2.8 8.6c-4.6 14.6-12.1 20.3-25.5 20.3-2.4 0-7-.3-8.9-.5v23.4c1.8.4 9.3.7 11.6.7z\"]\n};\nconst faPadlet = {\n  prefix: 'fab',\n  iconName: 'padlet',\n  icon: [640, 512, [], \"e4a0\", \"M297.9 0L298 .001C305.6 .1078 312.4 4.72 315.5 11.78L447.5 320.3L447.8 320.2L448 320.6L445.2 330.6L402.3 488.6C398.6 504.8 382.6 514.9 366.5 511.2L298.1 495.6L229.6 511.2C213.5 514.9 197.5 504.8 193.8 488.6L150.9 330.6L148.2 320.6L148.3 320.2L280.4 11.78C283.4 4.797 290.3 .1837 297.9 .0006L297.9 0zM160.1 322.1L291.1 361.2L298 483.7L305.9 362.2L436.5 322.9L436.7 322.8L305.7 347.9L297.1 27.72L291.9 347.9L160.1 322.1zM426 222.6L520.4 181.6H594.2L437.2 429.2L468.8 320.2L426 222.6zM597.5 181.4L638.9 257.6C642.9 265.1 635 273.5 627.3 269.8L579.7 247.1L597.5 181.4zM127.3 318.5L158.7 430L1.61 154.5C-4.292 144.1 7.128 132.5 17.55 138.3L169.4 222.5L127.3 318.5z\"]\n};\nconst faAmazonPay = {\n  prefix: 'fab',\n  iconName: 'amazon-pay',\n  icon: [640, 512, [], \"f42c\", \"M14 325.3c2.3-4.2 5.2-4.9 9.7-2.5 10.4 5.6 20.6 11.4 31.2 16.7a595.88 595.88 0 0 0 127.4 46.3 616.61 616.61 0 0 0 63.2 11.8 603.33 603.33 0 0 0 95 5.2c17.4-.4 34.8-1.8 52.1-3.8a603.66 603.66 0 0 0 163.3-42.8c2.9-1.2 5.9-2 9.1-1.2 6.7 1.8 9 9 4.1 13.9a70 70 0 0 1-9.6 7.4c-30.7 21.1-64.2 36.4-99.6 47.9a473.31 473.31 0 0 1-75.1 17.6 431 431 0 0 1-53.2 4.8 21.3 21.3 0 0 0-2.5.3H308a21.3 21.3 0 0 0-2.5-.3c-3.6-.2-7.2-.3-10.7-.4a426.3 426.3 0 0 1-50.4-5.3A448.4 448.4 0 0 1 164 420a443.33 443.33 0 0 1-145.6-87c-1.8-1.6-3-3.8-4.4-5.7zM172 65.1l-4.3.6a80.92 80.92 0 0 0-38 15.1c-2.4 1.7-4.6 3.5-7.1 5.4a4.29 4.29 0 0 1-.4-1.4c-.4-2.7-.8-5.5-1.3-8.2-.7-4.6-3-6.6-7.6-6.6h-11.5c-6.9 0-8.2 1.3-8.2 8.2v209.3c0 1 0 2 .1 3 .2 3 2 4.9 4.9 5 7 .1 14.1.1 21.1 0 2.9 0 4.7-2 5-5 .1-1 .1-2 .1-3v-72.4c1.1.9 1.7 1.4 2.2 1.9 17.9 14.9 38.5 19.8 61 15.4 20.4-4 34.6-16.5 43.8-34.9 7-13.9 9.9-28.7 10.3-44.1.5-17.1-1.2-33.9-8.1-49.8-8.5-19.6-22.6-32.5-43.9-36.9-3.2-.7-6.5-1-9.8-1.5-2.8-.1-5.5-.1-8.3-.1zM124.6 107a3.48 3.48 0 0 1 1.7-3.3c13.7-9.5 28.8-14.5 45.6-13.2 14.9 1.1 27.1 8.4 33.5 25.9 3.9 10.7 4.9 21.8 4.9 33 0 10.4-.8 20.6-4 30.6-6.8 21.3-22.4 29.4-42.6 28.5-14-.6-26.2-6-37.4-13.9a3.57 3.57 0 0 1-1.7-3.3c.1-14.1 0-28.1 0-42.2s.1-28 0-42.1zm205.7-41.9c-1 .1-2 .3-2.9.4a148 148 0 0 0-28.9 4.1c-6.1 1.6-12 3.8-17.9 5.8-3.6 1.2-5.4 3.8-5.3 7.7.1 3.3-.1 6.6 0 9.9.1 4.8 2.1 6.1 6.8 4.9 7.8-2 15.6-4.2 23.5-5.7 12.3-2.3 24.7-3.3 37.2-1.4 6.5 1 12.6 2.9 16.8 8.4 3.7 4.8 5.1 10.5 5.3 16.4.3 8.3.2 16.6.3 24.9a7.84 7.84 0 0 1-.2 1.4c-.5-.1-.9 0-1.3-.1a180.56 180.56 0 0 0-32-4.9c-11.3-.6-22.5.1-33.3 3.9-12.9 4.5-23.3 12.3-29.4 24.9-4.7 9.8-5.4 20.2-3.9 30.7 2 14 9 24.8 21.4 31.7 11.9 6.6 24.8 7.4 37.9 5.4 15.1-2.3 28.5-8.7 40.3-18.4a7.36 7.36 0 0 1 1.6-1.1c.6 3.8 1.1 7.4 1.8 11 .6 3.1 2.5 5.1 5.4 5.2 5.4.1 10.9.1 16.3 0a4.84 4.84 0 0 0 4.8-4.7 26.2 26.2 0 0 0 .1-2.8v-106a80 80 0 0 0-.9-12.9c-1.9-12.9-7.4-23.5-19-30.4-6.7-4-14.1-6-21.8-7.1-3.6-.5-7.2-.8-10.8-1.3-3.9.1-7.9.1-11.9.1zm35 127.7a3.33 3.33 0 0 1-1.5 3c-11.2 8.1-23.5 13.5-37.4 14.9-5.7.6-11.4.4-16.8-1.8a20.08 20.08 0 0 1-12.4-13.3 32.9 32.9 0 0 1-.1-19.4c2.5-8.3 8.4-13 16.4-15.6a61.33 61.33 0 0 1 24.8-2.2c8.4.7 16.6 2.3 25 3.4 1.6.2 2.1 1 2.1 2.6-.1 4.8 0 9.5 0 14.3s-.2 9.4-.1 14.1zm259.9 129.4c-1-5-4.8-6.9-9.1-8.3a88.42 88.42 0 0 0-21-3.9 147.32 147.32 0 0 0-39.2 1.9c-14.3 2.7-27.9 7.3-40 15.6a13.75 13.75 0 0 0-3.7 3.5 5.11 5.11 0 0 0-.5 4c.4 1.5 2.1 1.9 3.6 1.8a16.2 16.2 0 0 0 2.2-.1c7.8-.8 15.5-1.7 23.3-2.5 11.4-1.1 22.9-1.8 34.3-.9a71.64 71.64 0 0 1 14.4 2.7c5.1 1.4 7.4 5.2 7.6 10.4.4 8-1.4 15.7-3.5 23.3-4.1 15.4-10 30.3-15.8 45.1a17.6 17.6 0 0 0-1 3c-.5 2.9 1.2 4.8 4.1 4.1a10.56 10.56 0 0 0 4.8-2.5 145.91 145.91 0 0 0 12.7-13.4c12.8-16.4 20.3-35.3 24.7-55.6.8-3.6 1.4-7.3 2.1-10.9v-17.3zM493.1 199q-19.35-53.55-38.7-107.2c-2-5.7-4.2-11.3-6.3-16.9-1.1-2.9-3.2-4.8-6.4-4.8-7.6-.1-15.2-.2-22.9-.1-2.5 0-3.7 2-3.2 4.5a43.1 43.1 0 0 0 1.9 6.1q29.4 72.75 59.1 145.5c1.7 4.1 2.1 7.6.2 11.8-3.3 7.3-5.9 15-9.3 22.3-3 6.5-8 11.4-15.2 13.3a42.13 42.13 0 0 1-15.4 1.1c-2.5-.2-5-.8-7.5-1-3.4-.2-5.1 1.3-5.2 4.8q-.15 5 0 9.9c.1 5.5 2 8 7.4 8.9a108.18 108.18 0 0 0 16.9 2c17.1.4 30.7-6.5 39.5-21.4a131.63 131.63 0 0 0 9.2-18.4q35.55-89.7 70.6-179.6a26.62 26.62 0 0 0 1.6-5.5c.4-2.8-.9-4.4-3.7-4.4-6.6-.1-13.3 0-19.9 0a7.54 7.54 0 0 0-7.7 5.2c-.5 1.4-1.1 2.7-1.6 4.1l-34.8 100c-2.5 7.2-5.1 14.5-7.7 22.2-.4-1.1-.6-1.7-.9-2.4z\"]\n};\nconst faSquareGithub = {\n  prefix: 'fab',\n  iconName: 'square-github',\n  icon: [448, 512, [\"github-square\"], \"f092\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM265.8 407.7c0-1.8 0-6 .1-11.6c.1-11.4 .1-28.8 .1-43.7c0-15.6-5.2-25.5-11.3-30.7c37-4.1 76-9.2 76-73.1c0-18.2-6.5-27.3-17.1-39c1.7-4.3 7.4-22-1.7-45c-13.9-4.3-45.7 17.9-45.7 17.9c-13.2-3.7-27.5-5.6-41.6-5.6s-28.4 1.9-41.6 5.6c0 0-31.8-22.2-45.7-17.9c-9.1 22.9-3.5 40.6-1.7 45c-10.6 11.7-15.6 20.8-15.6 39c0 63.6 37.3 69 74.3 73.1c-4.8 4.3-9.1 11.7-10.6 22.3c-9.5 4.3-33.8 11.7-48.3-13.9c-9.1-15.8-25.5-17.1-25.5-17.1c-16.2-.2-1.1 10.2-1.1 10.2c10.8 5 18.4 24.2 18.4 24.2c9.7 29.7 56.1 19.7 56.1 19.7c0 9 .1 21.7 .1 30.6c0 4.8 .1 8.6 .1 10c0 4.3-3 9.5-11.5 8C106 393.6 59.8 330.8 59.8 257.4c0-91.8 70.2-161.5 162-161.5s166.2 69.7 166.2 161.5c.1 73.4-44.7 136.3-110.7 158.3c-8.4 1.5-11.5-3.7-11.5-8zm-90.5-54.8c-.2-1.5 1.1-2.8 3-3.2c1.9-.2 3.7 .6 3.9 1.9c.3 1.3-1 2.6-3 3c-1.9 .4-3.7-.4-3.9-1.7zm-9.1 3.2c-2.2 .2-3.7-.9-3.7-2.4c0-1.3 1.5-2.4 3.5-2.4c1.9-.2 3.7 .9 3.7 2.4c0 1.3-1.5 2.4-3.5 2.4zm-14.3-2.2c-1.9-.4-3.2-1.9-2.8-3.2s2.4-1.9 4.1-1.5c2 .6 3.3 2.1 2.8 3.4c-.4 1.3-2.4 1.9-4.1 1.3zm-12.5-7.3c-1.5-1.3-1.9-3.2-.9-4.1c.9-1.1 2.8-.9 4.3 .6c1.3 1.3 1.8 3.3 .9 4.1c-.9 1.1-2.8 .9-4.3-.6zm-8.5-10c-1.1-1.5-1.1-3.2 0-3.9c1.1-.9 2.8-.2 3.7 1.3c1.1 1.5 1.1 3.3 0 4.1c-.9 .6-2.6 0-3.7-1.5zm-6.3-8.8c-1.1-1.3-1.3-2.8-.4-3.5c.9-.9 2.4-.4 3.5 .6c1.1 1.3 1.3 2.8 .4 3.5c-.9 .9-2.4 .4-3.5-.6zm-6-6.4c-1.3-.6-1.9-1.7-1.5-2.6c.4-.6 1.5-.9 2.8-.4c1.3 .7 1.9 1.8 1.5 2.6c-.4 .9-1.7 1.1-2.8 .4z\"]\n};\nconst faGithubSquare = faSquareGithub;\nconst faStumbleupon = {\n  prefix: 'fab',\n  iconName: 'stumbleupon',\n  icon: [512, 512, [], \"f1a4\", \"M502.9 266v69.7c0 62.1-50.3 112.4-112.4 112.4-61.8 0-112.4-49.8-112.4-111.3v-70.2l34.3 16 51.1-15.2V338c0 14.7 12 26.5 26.7 26.5S417 352.7 417 338v-72h85.9zm-224.7-58.2l34.3 16 51.1-15.2V173c0-60.5-51.1-109-112.1-109-60.8 0-112.1 48.2-112.1 108.2v162.4c0 14.9-12 26.7-26.7 26.7S86 349.5 86 334.6V266H0v69.7C0 397.7 50.3 448 112.4 448c61.6 0 112.4-49.5 112.4-110.8V176.9c0-14.7 12-26.7 26.7-26.7s26.7 12 26.7 26.7v30.9z\"]\n};\nconst faFedex = {\n  prefix: 'fab',\n  iconName: 'fedex',\n  icon: [640, 512, [], \"f797\", \"M586 284.5l53.3-59.9h-62.4l-21.7 24.8-22.5-24.8H414v-16h56.1v-48.1H318.9V236h-.5c-9.6-11-21.5-14.8-35.4-14.8-28.4 0-49.8 19.4-57.3 44.9-18-59.4-97.4-57.6-121.9-14v-24.2H49v-26.2h60v-41.1H0V345h49v-77.5h48.9c-1.5 5.7-2.3 11.8-2.3 18.2 0 73.1 102.6 91.4 130.2 23.7h-42c-14.7 20.9-45.8 8.9-45.8-14.6h85.5c3.7 30.5 27.4 56.9 60.1 56.9 14.1 0 27-6.9 34.9-18.6h.5V345h212.2l22.1-25 22.3 25H640l-54-60.5zm-446.7-16.6c6.1-26.3 41.7-25.6 46.5 0h-46.5zm153.4 48.9c-34.6 0-34-62.8 0-62.8 32.6 0 34.5 62.8 0 62.8zm167.8 19.1h-94.4V169.4h95v30.2H405v33.9h55.5v28.1h-56.1v44.7h56.1v29.6zm-45.9-39.8v-24.4h56.1v-44l50.7 57-50.7 57v-45.6h-56.1zm138.6 10.3l-26.1 29.5H489l45.6-51.2-45.6-51.2h39.7l26.6 29.3 25.6-29.3h38.5l-45.4 51 46 51.4h-40.5l-26.3-29.5z\"]\n};\nconst faPhoenixFramework = {\n  prefix: 'fab',\n  iconName: 'phoenix-framework',\n  icon: [640, 512, [], \"f3dc\", \"M212.9 344.3c3.8-.1 22.8-1.4 25.6-2.2-2.4-2.6-43.6-1-68-49.6-4.3-8.6-7.5-17.6-6.4-27.6 2.9-25.5 32.9-30 52-18.5 36 21.6 63.3 91.3 113.7 97.5 37 4.5 84.6-17 108.2-45.4-.6-.1-.8-.2-1-.1-.4.1-.8.2-1.1.3-33.3 12.1-94.3 9.7-134.7-14.8-37.6-22.8-53.1-58.7-51.8-74.6 1.8-21.3 22.9-23.2 35.9-19.6 14.4 3.9 24.4 17.6 38.9 27.4 15.6 10.4 32.9 13.7 51.3 10.3 14.9-2.7 34.4-12.3 36.5-14.5-1.1-.1-1.8-.1-2.5-.2-6.2-.6-12.4-.8-18.5-1.7C279.8 194.5 262.1 47.4 138.5 37.9 94.2 34.5 39.1 46 2.2 72.9c-.8.6-1.5 1.2-2.2 1.8.1.2.1.3.2.5.8 0 1.6-.1 2.4-.2 6.3-1 12.5-.8 18.7.3 23.8 4.3 47.7 23.1 55.9 76.5 5.3 34.3-.7 50.8 8 86.1 19 77.1 91 107.6 127.7 106.4zM75.3 64.9c-.9-1-.9-1.2-1.3-2 12.1-2.6 24.2-4.1 36.6-4.8-1.1 14.7-22.2 21.3-35.3 6.8zm196.9 350.5c-42.8 1.2-92-26.7-123.5-61.4-4.6-5-16.8-20.2-18.6-23.4l.4-.4c6.6 4.1 25.7 18.6 54.8 27 24.2 7 48.1 6.3 71.6-3.3 22.7-9.3 41-.5 43.1 2.9-18.5 3.8-20.1 4.4-24 7.9-5.1 4.4-4.6 11.7 7 17.2 26.2 12.4 63-2.8 97.2 25.4 2.4 2 8.1 7.8 10.1 10.7-.1.2-.3.3-.4.5-4.8-1.5-16.4-7.5-40.2-9.3-24.7-2-46.3 5.3-77.5 6.2zm174.8-252c16.4-5.2 41.3-13.4 66.5-3.3 16.1 6.5 26.2 18.7 32.1 34.6 3.5 9.4 5.1 19.7 5.1 28.7-.2 0-.4 0-.6.1-.2-.4-.4-.9-.5-1.3-5-22-29.9-43.8-67.6-29.9-50.2 18.6-130.4 9.7-176.9-48-.7-.9-2.4-1.7-1.3-3.2.1-.2 2.1.6 3 1.3 18.1 13.4 38.3 21.9 60.3 26.2 30.5 6.1 54.6 2.9 79.9-5.2zm102.7 117.5c-32.4.2-33.8 50.1-103.6 64.4-18.2 3.7-38.7 4.6-44.9 4.2v-.4c2.8-1.5 14.7-2.6 29.7-16.6 7.9-7.3 15.3-15.1 22.8-22.9 19.5-20.2 41.4-42.2 81.9-39 23.1 1.8 29.3 8.2 36.1 12.7.3.2.4.5.7.9-.5 0-.7.1-.9 0-7-2.7-14.3-3.3-21.8-3.3zm-12.3-24.1c-.1.2-.1.4-.2.6-28.9-4.4-48-7.9-68.5 4-17 9.9-31.4 20.5-62 24.4-27.1 3.4-45.1 2.4-66.1-8-.3-.2-.6-.4-1-.6 0-.2.1-.3.1-.5 24.9 3.8 36.4 5.1 55.5-5.8 22.3-12.9 40.1-26.6 71.3-31 29.6-4.1 51.3 2.5 70.9 16.9zM268.6 97.3c-.6-.6-1.1-1.2-2.1-2.3 7.6 0 29.7-1.2 53.4 8.4 19.7 8 32.2 21 50.2 32.9 11.1 7.3 23.4 9.3 36.4 8.1 4.3-.4 8.5-1.2 12.8-1.7.4-.1.9 0 1.5.3-.6.4-1.2.9-1.8 1.2-8.1 4-16.7 6.3-25.6 7.1-26.1 2.6-50.3-3.7-73.4-15.4-19.3-9.9-36.4-22.9-51.4-38.6zM640 335.7c-3.5 3.1-22.7 11.6-42.7 5.3-12.3-3.9-19.5-14.9-31.6-24.1-10-7.6-20.9-7.9-28.1-8.4.6-.8.9-1.2 1.2-1.4 14.8-9.2 30.5-12.2 47.3-6.5 12.5 4.2 19.2 13.5 30.4 24.2 10.8 10.4 21 9.9 23.1 10.5.1-.1.2 0 .4.4zm-212.5 137c2.2 1.2 1.6 1.5 1.5 2-18.5-1.4-33.9-7.6-46.8-22.2-21.8-24.7-41.7-27.9-48.6-29.7.5-.2.8-.4 1.1-.4 13.1.1 26.1.7 38.9 3.9 25.3 6.4 35 25.4 41.6 35.3 3.2 4.8 7.3 8.3 12.3 11.1z\"]\n};\nconst faShopify = {\n  prefix: 'fab',\n  iconName: 'shopify',\n  icon: [448, 512, [], \"e057\", \"M388.32,104.1a4.66,4.66,0,0,0-4.4-4c-2,0-37.23-.8-37.23-.8s-21.61-20.82-29.62-28.83V503.2L442.76,472S388.72,106.5,388.32,104.1ZM288.65,70.47a116.67,116.67,0,0,0-7.21-17.61C271,32.85,255.42,22,237,22a15,15,0,0,0-4,.4c-.4-.8-1.2-1.2-1.6-2C223.4,11.63,213,7.63,200.58,8c-24,.8-48,18-67.25,48.83-13.61,21.62-24,48.84-26.82,70.06-27.62,8.4-46.83,14.41-47.23,14.81-14,4.4-14.41,4.8-16,18-1.2,10-38,291.82-38,291.82L307.86,504V65.67a41.66,41.66,0,0,0-4.4.4S297.86,67.67,288.65,70.47ZM233.41,87.69c-16,4.8-33.63,10.4-50.84,15.61,4.8-18.82,14.41-37.63,25.62-50,4.4-4.4,10.41-9.61,17.21-12.81C232.21,54.86,233.81,74.48,233.41,87.69ZM200.58,24.44A27.49,27.49,0,0,1,215,28c-6.4,3.2-12.81,8.41-18.81,14.41-15.21,16.42-26.82,42-31.62,66.45-14.42,4.41-28.83,8.81-42,12.81C131.33,83.28,163.75,25.24,200.58,24.44ZM154.15,244.61c1.6,25.61,69.25,31.22,73.25,91.66,2.8,47.64-25.22,80.06-65.65,82.47-48.83,3.2-75.65-25.62-75.65-25.62l10.4-44s26.82,20.42,48.44,18.82c14-.8,19.22-12.41,18.81-20.42-2-33.62-57.24-31.62-60.84-86.86-3.2-46.44,27.22-93.27,94.47-97.68,26-1.6,39.23,4.81,39.23,4.81L221.4,225.39s-17.21-8-37.63-6.4C154.15,221,153.75,239.8,154.15,244.61ZM249.42,82.88c0-12-1.6-29.22-7.21-43.63,18.42,3.6,27.22,24,31.23,36.43Q262.63,78.68,249.42,82.88Z\"]\n};\nconst faNeos = {\n  prefix: 'fab',\n  iconName: 'neos',\n  icon: [512, 512, [], \"f612\", \"M415.44 512h-95.11L212.12 357.46v91.1L125.69 512H28V29.82L68.47 0h108.05l123.74 176.13V63.45L386.69 0h97.69v461.5zM38.77 35.27V496l72-52.88V194l215.5 307.64h84.79l52.35-38.17h-78.27L69 13zm82.54 466.61l80-58.78v-101l-79.76-114.4v220.94L49 501.89h72.34zM80.63 10.77l310.6 442.57h82.37V10.77h-79.75v317.56L170.91 10.77zM311 191.65l72 102.81V15.93l-72 53v122.72z\"]\n};\nconst faSquareThreads = {\n  prefix: 'fab',\n  iconName: 'square-threads',\n  icon: [448, 512, [], \"e619\", \"M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM294.2 244.3c19.5 9.3 33.7 23.5 41.2 40.9c10.4 24.3 11.4 63.9-20.2 95.4c-24.2 24.1-53.5 35-95.1 35.3h-.2c-46.8-.3-82.8-16.1-106.9-46.8C91.5 341.8 80.4 303.7 80 256v-.1-.1c.4-47.7 11.5-85.7 33-113.1c24.2-30.7 60.2-46.5 106.9-46.8h.2c46.9 .3 83.3 16 108.2 46.6c12.3 15.1 21.3 33.3 27 54.4l-26.9 7.2c-4.7-17.2-11.9-31.9-21.4-43.6c-19.4-23.9-48.7-36.1-87-36.4c-38 .3-66.8 12.5-85.5 36.2c-17.5 22.3-26.6 54.4-26.9 95.5c.3 41.1 9.4 73.3 26.9 95.5c18.7 23.8 47.4 36 85.5 36.2c34.3-.3 56.9-8.4 75.8-27.3c21.5-21.5 21.1-47.9 14.2-64c-4-9.4-11.4-17.3-21.3-23.3c-2.4 18-7.9 32.2-16.5 43.2c-11.4 14.5-27.7 22.4-48.4 23.5c-15.7 .9-30.8-2.9-42.6-10.7c-13.9-9.2-22-23.2-22.9-39.5c-1.7-32.2 23.8-55.3 63.5-57.6c14.1-.8 27.3-.2 39.5 1.9c-1.6-9.9-4.9-17.7-9.8-23.4c-6.7-7.8-17.1-11.8-30.8-11.9h-.4c-11 0-26 3.1-35.6 17.6l-23-15.8c12.8-19.4 33.6-30.1 58.5-30.1h.6c41.8 .3 66.6 26.3 69.1 71.8c1.4 .6 2.8 1.2 4.2 1.9l.1 .5zm-71.8 67.5c17-.9 36.4-7.6 39.7-48.8c-8.8-1.9-18.6-2.9-29-2.9c-3.2 0-6.4 .1-9.6 .3c-28.6 1.6-38.1 15.5-37.4 27.9c.9 16.7 19 24.5 36.4 23.6l-.1-.1z\"]\n};\nconst faHackerrank = {\n  prefix: 'fab',\n  iconName: 'hackerrank',\n  icon: [512, 512, [], \"f5f7\", \"M477.5 128C463 103.05 285.13 0 256.16 0S49.25 102.79 34.84 128s-14.49 230.8 0 256 192.38 128 221.32 128S463 409.08 477.49 384s14.51-231 .01-256zM316.13 414.22c-4 0-40.91-35.77-38-38.69.87-.87 6.26-1.48 17.55-1.83 0-26.23.59-68.59.94-86.32 0-2-.44-3.43-.44-5.85h-79.93c0 7.1-.46 36.2 1.37 72.88.23 4.54-1.58 6-5.74 5.94-10.13 0-20.27-.11-30.41-.08-4.1 0-5.87-1.53-5.74-6.11.92-33.44 3-84-.15-212.67v-3.17c-9.67-.35-16.38-1-17.26-1.84-2.92-2.92 34.54-38.69 38.49-38.69s41.17 35.78 38.27 38.69c-.87.87-7.9 1.49-16.77 1.84v3.16c-2.42 25.75-2 79.59-2.63 105.39h80.26c0-4.55.39-34.74-1.2-83.64-.1-3.39.95-5.17 4.21-5.2 11.07-.08 22.15-.13 33.23-.06 3.46 0 4.57 1.72 4.5 5.38C333 354.64 336 341.29 336 373.69c8.87.35 16.82 1 17.69 1.84 2.88 2.91-33.62 38.69-37.58 38.69z\"]\n};\nconst faResearchgate = {\n  prefix: 'fab',\n  iconName: 'researchgate',\n  icon: [448, 512, [], \"f4f8\", \"M0 32v448h448V32H0zm262.2 334.4c-6.6 3-33.2 6-50-14.2-9.2-10.6-25.3-33.3-42.2-63.6-8.9 0-14.7 0-21.4-.6v46.4c0 23.5 6 21.2 25.8 23.9v8.1c-6.9-.3-23.1-.8-35.6-.8-13.1 0-26.1.6-33.6.8v-8.1c15.5-2.9 22-1.3 22-23.9V225c0-22.6-6.4-21-22-23.9V193c25.8 1 53.1-.6 70.9-.6 31.7 0 55.9 14.4 55.9 45.6 0 21.1-16.7 42.2-39.2 47.5 13.6 24.2 30 45.6 42.2 58.9 7.2 7.8 17.2 14.7 27.2 14.7v7.3zm22.9-135c-23.3 0-32.2-15.7-32.2-32.2V167c0-12.2 8.8-30.4 34-30.4s30.4 17.9 30.4 17.9l-10.7 7.2s-5.5-12.5-19.7-12.5c-7.9 0-19.7 7.3-19.7 19.7v26.8c0 13.4 6.6 23.3 17.9 23.3 14.1 0 21.5-10.9 21.5-26.8h-17.9v-10.7h30.4c0 20.5 4.7 49.9-34 49.9zm-116.5 44.7c-9.4 0-13.6-.3-20-.8v-69.7c6.4-.6 15-.6 22.5-.6 23.3 0 37.2 12.2 37.2 34.5 0 21.9-15 36.6-39.7 36.6z\"]\n};\nconst faSwift = {\n  prefix: 'fab',\n  iconName: 'swift',\n  icon: [448, 512, [], \"f8e1\", \"M448 156.09c0-4.51-.08-9-.2-13.52a196.31 196.31 0 0 0-2.58-29.42 99.62 99.62 0 0 0-9.22-28A94.08 94.08 0 0 0 394.84 44a99.17 99.17 0 0 0-28-9.22 195 195 0 0 0-29.43-2.59c-4.51-.12-9-.17-13.52-.2H124.14c-4.51 0-9 .08-13.52.2-2.45.07-4.91.15-7.37.27a171.68 171.68 0 0 0-22.06 2.32 103.06 103.06 0 0 0-21.21 6.1q-3.46 1.45-6.81 3.12a94.66 94.66 0 0 0-18.39 12.32c-1.88 1.61-3.69 3.28-5.43 5A93.86 93.86 0 0 0 12 85.17a99.45 99.45 0 0 0-9.22 28 196.31 196.31 0 0 0-2.54 29.4c-.13 4.51-.18 9-.21 13.52v199.83c0 4.51.08 9 .21 13.51a196.08 196.08 0 0 0 2.58 29.42 99.3 99.3 0 0 0 9.22 28A94.31 94.31 0 0 0 53.17 468a99.47 99.47 0 0 0 28 9.21 195 195 0 0 0 29.43 2.59c4.5.12 9 .17 13.52.2H323.91c4.51 0 9-.08 13.52-.2a196.59 196.59 0 0 0 29.44-2.59 99.57 99.57 0 0 0 28-9.21A94.22 94.22 0 0 0 436 426.84a99.3 99.3 0 0 0 9.22-28 194.79 194.79 0 0 0 2.59-29.42c.12-4.5.17-9 .2-13.51V172.14c-.01-5.35-.01-10.7-.01-16.05zm-69.88 241c-20-38.93-57.23-29.27-76.31-19.47-1.72 1-3.48 2-5.25 3l-.42.25c-39.5 21-92.53 22.54-145.85-.38A234.64 234.64 0 0 1 45 290.12a230.63 230.63 0 0 0 39.17 23.37c56.36 26.4 113 24.49 153 0-57-43.85-104.6-101-141.09-147.22a197.09 197.09 0 0 1-18.78-25.9c43.7 40 112.7 90.22 137.48 104.12-52.57-55.49-98.89-123.94-96.72-121.74 82.79 83.42 159.18 130.59 159.18 130.59 2.88 1.58 5 2.85 6.73 4a127.44 127.44 0 0 0 4.16-12.47c13.22-48.33-1.66-103.58-35.31-149.2C329.61 141.75 375 229.34 356.4 303.42c-.44 1.73-.95 3.4-1.44 5.09 38.52 47.4 28.04 98.17 23.13 88.59z\"]\n};\nconst faAngular = {\n  prefix: 'fab',\n  iconName: 'angular',\n  icon: [448, 512, [], \"f420\", \"M185.7 268.1h76.2l-38.1-91.6-38.1 91.6zM223.8 32L16 106.4l31.8 275.7 176 97.9 176-97.9 31.8-275.7zM354 373.8h-48.6l-26.2-65.4H168.6l-26.2 65.4H93.7L223.8 81.5z\"]\n};\nconst faSpeakap = {\n  prefix: 'fab',\n  iconName: 'speakap',\n  icon: [448, 512, [], \"f3f3\", \"M64 391.78C-15.41 303.59-8 167.42 80.64 87.64s224.8-73 304.21 15.24 72 224.36-16.64 304.14c-18.74 16.87 64 43.09 42 52.26-82.06 34.21-253.91 35-346.23-67.5zm213.31-211.6l38.5-40.86c-9.61-8.89-32-26.83-76.17-27.6-52.33-.91-95.86 28.3-96.77 80-.2 11.33.29 36.72 29.42 54.83 34.46 21.42 86.52 21.51 86 52.26-.37 21.28-26.42 25.81-38.59 25.6-3-.05-30.23-.46-47.61-24.62l-40 42.61c28.16 27 59 32.62 83.49 33.05 10.23.18 96.42.33 97.84-81 .28-15.81-2.07-39.72-28.86-56.59-34.36-21.64-85-19.45-84.43-49.75.41-23.25 31-25.37 37.53-25.26.43 0 26.62.26 39.62 17.37z\"]\n};\nconst faAngrycreative = {\n  prefix: 'fab',\n  iconName: 'angrycreative',\n  icon: [640, 512, [], \"f36e\", \"M640 238.2l-3.2 28.2-34.5 2.3-2 18.1 34.5-2.3-3.2 28.2-34.4 2.2-2.3 20.1 34.4-2.2-3 26.1-64.7 4.1 12.7-113.2L527 365.2l-31.9 2-23.8-117.8 30.3-2 13.6 79.4 31.7-82.4 93.1-6.2zM426.8 371.5l28.3-1.8L468 249.6l-28.4 1.9-12.8 120zM162 388.1l-19.4-36-3.5 37.4-28.2 1.7 2.7-29.1c-11 18-32 34.3-56.9 35.8C23.9 399.9-3 377 .3 339.7c2.6-29.3 26.7-62.8 67.5-65.4 37.7-2.4 47.6 23.2 51.3 28.8l2.8-30.8 38.9-2.5c20.1-1.3 38.7 3.7 42.5 23.7l2.6-26.6 64.8-4.2-2.7 27.9-36.4 2.4-1.7 17.9 36.4-2.3-2.7 27.9-36.4 2.3-1.9 19.9 36.3-2.3-2.1 20.8 55-117.2 23.8-1.6L370.4 369l8.9-85.6-22.3 1.4 2.9-27.9 75-4.9-3 28-24.3 1.6-9.7 91.9-58 3.7-4.3-15.6-39.4 2.5-8 16.3-126.2 7.7zm-44.3-70.2l-26.4 1.7C84.6 307.2 76.9 303 65 303.8c-19 1.2-33.3 17.5-34.6 33.3-1.4 16 7.3 32.5 28.7 31.2 12.8-.8 21.3-8.6 28.9-18.9l27-1.7 2.7-29.8zm56.1-7.7c1.2-12.9-7.6-13.6-26.1-12.4l-2.7 28.5c14.2-.9 27.5-2.1 28.8-16.1zm21.1 70.8l5.8-60c-5 13.5-14.7 21.1-27.9 26.6l22.1 33.4zm135.4-45l-7.9-37.8-15.8 39.3 23.7-1.5zm-170.1-74.6l-4.3-17.5-39.6 2.6-8.1 18.2-31.9 2.1 57-121.9 23.9-1.6 30.7 102 9.9-104.7 27-1.8 37.8 63.6 6.5-66.6 28.5-1.9-4 41.2c7.4-13.5 22.9-44.7 63.6-47.5 40.5-2.8 52.4 29.3 53.4 30.3l3.3-32 39.3-2.7c12.7-.9 27.8.3 36.3 9.7l-4.4-11.9 32.2-2.2 12.9 43.2 23-45.7 31-2.2-43.6 78.4-4.8 44.3-28.4 1.9 4.8-44.3-15.8-43c1 22.3-9.2 40.1-32 49.6l25.2 38.8-36.4 2.4-19.2-36.8-4 38.3-28.4 1.9 3.3-31.5c-6.7 9.3-19.7 35.4-59.6 38-26.2 1.7-45.6-10.3-55.4-39.2l-4 40.3-25 1.6-37.6-63.3-6.3 66.2-56.8 3.7zm276.6-82.1c10.2-.7 17.5-2.1 21.6-4.3 4.5-2.4 7-6.4 7.6-12.1.6-5.3-.6-8.8-3.4-10.4-3.6-2.1-10.6-2.8-22.9-2l-2.9 28.8zM327.7 214c5.6 5.9 12.7 8.5 21.3 7.9 4.7-.3 9.1-1.8 13.3-4.1 5.5-3 10.6-8 15.1-14.3l-34.2 2.3 2.4-23.9 63.1-4.3 1.2-12-31.2 2.1c-4.1-3.7-7.8-6.6-11.1-8.1-4-1.7-8.1-2.8-12.2-2.5-8 .5-15.3 3.6-22 9.2-7.7 6.4-12 14.5-12.9 24.4-1.1 9.6 1.4 17.3 7.2 23.3zm-201.3 8.2l23.8-1.6-8.3-37.6-15.5 39.2z\"]\n};\nconst faYCombinator = {\n  prefix: 'fab',\n  iconName: 'y-combinator',\n  icon: [448, 512, [], \"f23b\", \"M448 32v448H0V32h448zM236 287.5L313.5 142h-32.7L235 233c-4.7 9.3-9 18.3-12.8 26.8L210 233l-45.2-91h-35l76.7 143.8v94.5H236v-92.8z\"]\n};\nconst faEmpire = {\n  prefix: 'fab',\n  iconName: 'empire',\n  icon: [496, 512, [], \"f1d1\", \"M287.6 54.2c-10.8-2.2-22.1-3.3-33.5-3.6V32.4c78.1 2.2 146.1 44 184.6 106.6l-15.8 9.1c-6.1-9.7-12.7-18.8-20.2-27.1l-18 15.5c-26-29.6-61.4-50.7-101.9-58.4l4.8-23.9zM53.4 322.4l23-7.7c-6.4-18.3-10-38.2-10-58.7s3.3-40.4 9.7-58.7l-22.7-7.7c3.6-10.8 8.3-21.3 13.6-31l-15.8-9.1C34 181 24.1 217.5 24.1 256s10 75 27.1 106.6l15.8-9.1c-5.3-10-9.7-20.3-13.6-31.1zM213.1 434c-40.4-8-75.8-29.1-101.9-58.7l-18 15.8c-7.5-8.6-14.4-17.7-20.2-27.4l-16 9.4c38.5 62.3 106.8 104.3 184.9 106.6v-18.3c-11.3-.3-22.7-1.7-33.5-3.6l4.7-23.8zM93.3 120.9l18 15.5c26-29.6 61.4-50.7 101.9-58.4l-4.7-23.8c10.8-2.2 22.1-3.3 33.5-3.6V32.4C163.9 34.6 95.9 76.4 57.4 139l15.8 9.1c6-9.7 12.6-18.9 20.1-27.2zm309.4 270.2l-18-15.8c-26 29.6-61.4 50.7-101.9 58.7l4.7 23.8c-10.8 1.9-22.1 3.3-33.5 3.6v18.3c78.1-2.2 146.4-44.3 184.9-106.6l-16.1-9.4c-5.7 9.7-12.6 18.8-20.1 27.4zM496 256c0 137-111 248-248 248S0 393 0 256 111 8 248 8s248 111 248 248zm-12.2 0c0-130.1-105.7-235.8-235.8-235.8S12.2 125.9 12.2 256 117.9 491.8 248 491.8 483.8 386.1 483.8 256zm-39-106.6l-15.8 9.1c5.3 9.7 10 20.2 13.6 31l-22.7 7.7c6.4 18.3 9.7 38.2 9.7 58.7s-3.6 40.4-10 58.7l23 7.7c-3.9 10.8-8.3 21-13.6 31l15.8 9.1C462 331 471.9 294.5 471.9 256s-9.9-75-27.1-106.6zm-183 177.7c16.3-3.3 30.4-11.6 40.7-23.5l51.2 44.8c11.9-13.6 21.3-29.3 27.1-46.8l-64.2-22.1c2.5-7.5 3.9-15.2 3.9-23.5s-1.4-16.1-3.9-23.5l64.5-22.1c-6.1-17.4-15.5-33.2-27.4-46.8l-51.2 44.8c-10.2-11.9-24.4-20.5-40.7-23.8l13.3-66.4c-8.6-1.9-17.7-2.8-27.1-2.8-9.4 0-18.5.8-27.1 2.8l13.3 66.4c-16.3 3.3-30.4 11.9-40.7 23.8l-51.2-44.8c-11.9 13.6-21.3 29.3-27.4 46.8l64.5 22.1c-2.5 7.5-3.9 15.2-3.9 23.5s1.4 16.1 3.9 23.5l-64.2 22.1c5.8 17.4 15.2 33.2 27.1 46.8l51.2-44.8c10.2 11.9 24.4 20.2 40.7 23.5l-13.3 66.7c8.6 1.7 17.7 2.8 27.1 2.8 9.4 0 18.5-1.1 27.1-2.8l-13.3-66.7z\"]\n};\nconst faEnvira = {\n  prefix: 'fab',\n  iconName: 'envira',\n  icon: [448, 512, [], \"f299\", \"M0 32c477.6 0 366.6 317.3 367.1 366.3L448 480h-26l-70.4-71.2c-39 4.2-124.4 34.5-214.4-37C47 300.3 52 214.7 0 32zm79.7 46c-49.7-23.5-5.2 9.2-5.2 9.2 45.2 31.2 66 73.7 90.2 119.9 31.5 60.2 79 139.7 144.2 167.7 65 28 34.2 12.5 6-8.5-28.2-21.2-68.2-87-91-130.2-31.7-60-61-118.6-144.2-158.1z\"]\n};\nconst faGoogleScholar = {\n  prefix: 'fab',\n  iconName: 'google-scholar',\n  icon: [512, 512, [], \"e63b\", \"M390.9 298.5c0 0 0 .1 .1 .1c9.2 19.4 14.4 41.1 14.4 64C405.3 445.1 338.5 512 256 512s-149.3-66.9-149.3-149.3c0-22.9 5.2-44.6 14.4-64h0c1.7-3.6 3.6-7.2 5.6-10.7c4.4-7.6 9.4-14.7 15-21.3c27.4-32.6 68.5-53.3 114.4-53.3c33.6 0 64.6 11.1 89.6 29.9c9.1 6.9 17.4 14.7 24.8 23.5c5.6 6.6 10.6 13.8 15 21.3c2 3.4 3.8 7 5.5 10.5zm26.4-18.8c-30.1-58.4-91-98.4-161.3-98.4s-131.2 40-161.3 98.4L0 202.7 256 0 512 202.7l-94.7 77.1z\"]\n};\nconst faSquareGitlab = {\n  prefix: 'fab',\n  iconName: 'square-gitlab',\n  icon: [448, 512, [\"gitlab-square\"], \"e5ae\", \"M0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96zm337.5 12.5l44.6 116.4 .4 1.2c5.6 16.8 7.2 35.2 2.3 52.5c-5 17.2-15.4 32.4-29.8 43.3l-.2 .1-68.4 51.2-54.1 40.9c-.5 .2-1.1 .5-1.7 .8c-2 1-4.4 2-6.7 2c-3 0-6.8-1.8-8.3-2.8l-54.2-40.9L93.5 322.3l-.4-.3-.2-.1c-14.3-10.8-24.8-26-29.7-43.3s-4.2-35.7 2.2-52.5l.5-1.2 44.7-116.4c.9-2.3 2.5-4.3 4.5-5.6c1.6-1 3.4-1.6 5.2-1.8c1.3-.7 2.1-.4 3.4 .1c.6 .2 1.2 .5 2 .7c1 .4 1.6 .9 2.4 1.5c.6 .4 1.2 1 2.1 1.5c1.2 1.4 2.2 3 2.7 4.8l29.2 92.2H285l30.2-92.2c.5-1.8 1.4-3.4 2.6-4.8s2.8-2.4 4.5-3.1c1.7-.6 3.6-.9 5.4-.7s3.6 .8 5.2 1.8c2 1.3 3.7 3.3 4.6 5.6z\"]\n};\nconst faGitlabSquare = faSquareGitlab;\nconst faStudiovinari = {\n  prefix: 'fab',\n  iconName: 'studiovinari',\n  icon: [512, 512, [], \"f3f8\", \"M480.3 187.7l4.2 28v28l-25.1 44.1-39.8 78.4-56.1 67.5-79.1 37.8-17.7 24.5-7.7 12-9.6 4s17.3-63.6 19.4-63.6c2.1 0 20.3.7 20.3.7l66.7-38.6-92.5 26.1-55.9 36.8-22.8 28-6.6 1.4 20.8-73.6 6.9-5.5 20.7 12.9 88.3-45.2 56.8-51.5 14.8-68.4-125.4 23.3 15.2-18.2-173.4-53.3 81.9-10.5-166-122.9L133.5 108 32.2 0l252.9 126.6-31.5-38L378 163 234.7 64l18.7 38.4-49.6-18.1L158.3 0l194.6 122L310 66.2l108 96.4 12-8.9-21-16.4 4.2-37.8L451 89.1l29.2 24.7 11.5 4.2-7 6.2 8.5 12-13.1 7.4-10.3 20.2 10.5 23.9z\"]\n};\nconst faPiedPiper = {\n  prefix: 'fab',\n  iconName: 'pied-piper',\n  icon: [480, 512, [], \"f2ae\", \"M455.93,23.2C429.23,30,387.79,51.69,341.35,90.66A206,206,0,0,0,240,64C125.13,64,32,157.12,32,272s93.13,208,208,208,208-93.13,208-208a207.25,207.25,0,0,0-58.75-144.81,155.35,155.35,0,0,0-17,27.4A176.16,176.16,0,0,1,417.1,272c0,97.66-79.44,177.11-177.09,177.11a175.81,175.81,0,0,1-87.63-23.4c82.94-107.33,150.79-37.77,184.31-226.65,5.79-32.62,28-94.26,126.23-160.18C471,33.45,465.35,20.8,455.93,23.2ZM125,406.4A176.66,176.66,0,0,1,62.9,272C62.9,174.34,142.35,94.9,240,94.9a174,174,0,0,1,76.63,17.75C250.64,174.76,189.77,265.52,125,406.4Z\"]\n};\nconst faWordpress = {\n  prefix: 'fab',\n  iconName: 'wordpress',\n  icon: [512, 512, [], \"f19a\", \"M61.7 169.4l101.5 278C92.2 413 43.3 340.2 43.3 256c0-30.9 6.6-60.1 18.4-86.6zm337.9 75.9c0-26.3-9.4-44.5-17.5-58.7-10.8-17.5-20.9-32.4-20.9-49.9 0-19.6 14.8-37.8 35.7-37.8.9 0 1.8.1 2.8.2-37.9-34.7-88.3-55.9-143.7-55.9-74.3 0-139.7 38.1-177.8 95.9 5 .2 9.7.3 13.7.3 22.2 0 56.7-2.7 56.7-2.7 11.5-.7 12.8 16.2 1.4 17.5 0 0-11.5 1.3-24.3 2l77.5 230.4L249.8 247l-33.1-90.8c-11.5-.7-22.3-2-22.3-2-11.5-.7-10.1-18.2 1.3-17.5 0 0 35.1 2.7 56 2.7 22.2 0 56.7-2.7 56.7-2.7 11.5-.7 12.8 16.2 1.4 17.5 0 0-11.5 1.3-24.3 2l76.9 228.7 21.2-70.9c9-29.4 16-50.5 16-68.7zm-139.9 29.3l-63.8 185.5c19.1 5.6 39.2 8.7 60.1 8.7 24.8 0 48.5-4.3 70.6-12.1-.6-.9-1.1-1.9-1.5-2.9l-65.4-179.2zm183-120.7c.9 6.8 1.4 14 1.4 21.9 0 21.6-4 45.8-16.2 76.2l-65 187.9C426.2 403 468.7 334.5 468.7 256c0-37-9.4-71.8-26-102.1zM504 256c0 136.8-111.3 248-248 248C119.2 504 8 392.7 8 256 8 119.2 119.2 8 256 8c136.7 0 248 111.2 248 248zm-11.4 0c0-130.5-106.2-236.6-236.6-236.6C125.5 19.4 19.4 125.5 19.4 256S125.6 492.6 256 492.6c130.5 0 236.6-106.1 236.6-236.6z\"]\n};\nconst faProductHunt = {\n  prefix: 'fab',\n  iconName: 'product-hunt',\n  icon: [512, 512, [], \"f288\", \"M326.3 218.8c0 20.5-16.7 37.2-37.2 37.2h-70.3v-74.4h70.3c20.5 0 37.2 16.7 37.2 37.2zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-128.1-37.2c0-47.9-38.9-86.8-86.8-86.8H169.2v248h49.6v-74.4h70.3c47.9 0 86.8-38.9 86.8-86.8z\"]\n};\nconst faFirefox = {\n  prefix: 'fab',\n  iconName: 'firefox',\n  icon: [512, 512, [], \"f269\", \"M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z\"]\n};\nconst faLinode = {\n  prefix: 'fab',\n  iconName: 'linode',\n  icon: [448, 512, [], \"f2b8\", \"M366.036,186.867l-59.5,36.871-.838,36.871-29.329-19.273-39.384,24.3c2.238,55.211,2.483,59.271,2.51,59.5l-97.2,65.359L127.214,285.748l108.1-62.01L195.09,197.761l-75.417,38.547L98.723,93.015,227.771,43.574,136.432,0,10.737,39.385,38.39,174.3l41.9,32.681L48.445,222.062,69.394,323.457,98.723,351.11,77.774,363.679l16.76,78.769L160.733,512c-10.8-74.842-11.658-78.641-11.725-78.773l77.925-55.3c16.759-12.57,15.083-10.894,15.083-10.894l.838,24.3,33.519,28.491-.838-77.093,46.927-33.519,26.815-18.435-2.514,36.033,25.139,17.6,6.7-74.579,58.657-43.575Z\"]\n};\nconst faGoodreads = {\n  prefix: 'fab',\n  iconName: 'goodreads',\n  icon: [448, 512, [], \"f3a8\", \"M299.9 191.2c5.1 37.3-4.7 79-35.9 100.7-22.3 15.5-52.8 14.1-70.8 5.7-37.1-17.3-49.5-58.6-46.8-97.2 4.3-60.9 40.9-87.9 75.3-87.5 46.9-.2 71.8 31.8 78.2 78.3zM448 88v336c0 30.9-25.1 56-56 56H56c-30.9 0-56-25.1-56-56V88c0-30.9 25.1-56 56-56h336c30.9 0 56 25.1 56 56zM330 313.2s-.1-34-.1-217.3h-29v40.3c-.8.3-1.2-.5-1.6-1.2-9.6-20.7-35.9-46.3-76-46-51.9.4-87.2 31.2-100.6 77.8-4.3 14.9-5.8 30.1-5.5 45.6 1.7 77.9 45.1 117.8 112.4 115.2 28.9-1.1 54.5-17 69-45.2.5-1 1.1-1.9 1.7-2.9.2.1.4.1.6.2.3 3.8.2 30.7.1 34.5-.2 14.8-2 29.5-7.2 43.5-7.8 21-22.3 34.7-44.5 39.5-17.8 3.9-35.6 3.8-53.2-1.2-21.5-6.1-36.5-19-41.1-41.8-.3-1.6-1.3-1.3-2.3-1.3h-26.8c.8 10.6 3.2 20.3 8.5 29.2 24.2 40.5 82.7 48.5 128.2 37.4 49.9-12.3 67.3-54.9 67.4-106.3z\"]\n};\nconst faSquareOdnoklassniki = {\n  prefix: 'fab',\n  iconName: 'square-odnoklassniki',\n  icon: [448, 512, [\"odnoklassniki-square\"], \"f264\", \"M224 137.1a39.9 39.9 0 1 0 0 79.7 39.9 39.9 0 1 0 0-79.7zM384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zM224 95.9A81 81 0 1 1 224 258a81 81 0 1 1 0-162.1zm59.3 168.3c16.8-13.2 29.5-5.5 34.1 3.6c7.8 16-1.1 23.7-21.5 37c-17.1 10.9-40.7 15.2-56.2 16.8l13 12.9 47.7 47.7c17.4 17.9-11 45.8-28.6 28.6c-12-12.2-29.5-29.7-47.7-47.9l0 0-47.7 47.9c-17.7 17.2-46-11-28.4-28.6c3.7-3.7 7.9-7.9 12.5-12.5c10.4-10.4 22.6-22.7 35.2-35.2l12.9-12.9c-15.4-1.6-39.3-5.7-56.6-16.8c-20.3-13.3-29.3-20.9-21.4-37c4.6-9.1 17.3-16.8 34.1-3.6c0 0 22.7 18 59.3 18s59.3-18 59.3-18z\"]\n};\nconst faOdnoklassnikiSquare = faSquareOdnoklassniki;\nconst faJsfiddle = {\n  prefix: 'fab',\n  iconName: 'jsfiddle',\n  icon: [576, 512, [], \"f1cc\", \"M510.634 237.462c-4.727-2.621-5.664-5.748-6.381-10.776-2.352-16.488-3.539-33.619-9.097-49.095-35.895-99.957-153.99-143.386-246.849-91.646-27.37 15.25-48.971 36.369-65.493 63.903-3.184-1.508-5.458-2.71-7.824-3.686-30.102-12.421-59.049-10.121-85.331 9.167-25.531 18.737-36.422 44.548-32.676 76.408.355 3.025-1.967 7.621-4.514 9.545-39.712 29.992-56.031 78.065-41.902 124.615 13.831 45.569 57.514 79.796 105.608 81.433 30.291 1.031 60.637.546 90.959.539 84.041-.021 168.09.531 252.12-.48 52.664-.634 96.108-36.873 108.212-87.293 11.54-48.074-11.144-97.3-56.832-122.634zm21.107 156.88c-18.23 22.432-42.343 35.253-71.28 35.65-56.874.781-113.767.23-170.652.23 0 .7-163.028.159-163.728.154-43.861-.332-76.739-19.766-95.175-59.995-18.902-41.245-4.004-90.848 34.186-116.106 9.182-6.073 12.505-11.566 10.096-23.136-5.49-26.361 4.453-47.956 26.42-62.981 22.987-15.723 47.422-16.146 72.034-3.083 10.269 5.45 14.607 11.564 22.198-2.527 14.222-26.399 34.557-46.727 60.671-61.294 97.46-54.366 228.37 7.568 230.24 132.697.122 8.15 2.412 12.428 9.848 15.894 57.56 26.829 74.456 96.122 35.142 144.497zm-87.789-80.499c-5.848 31.157-34.622 55.096-66.666 55.095-16.953-.001-32.058-6.545-44.079-17.705-27.697-25.713-71.141-74.98-95.937-93.387-20.056-14.888-41.99-12.333-60.272 3.782-49.996 44.071 15.859 121.775 67.063 77.188 4.548-3.96 7.84-9.543 12.744-12.844 8.184-5.509 20.766-.884 13.168 10.622-17.358 26.284-49.33 38.197-78.863 29.301-28.897-8.704-48.84-35.968-48.626-70.179 1.225-22.485 12.364-43.06 35.414-55.965 22.575-12.638 46.369-13.146 66.991 2.474C295.68 280.7 320.467 323.97 352.185 343.47c24.558 15.099 54.254 7.363 68.823-17.506 28.83-49.209-34.592-105.016-78.868-63.46-3.989 3.744-6.917 8.932-11.41 11.72-10.975 6.811-17.333-4.113-12.809-10.353 20.703-28.554 50.464-40.44 83.271-28.214 31.429 11.714 49.108 44.366 42.76 78.186z\"]\n};\nconst faSith = {\n  prefix: 'fab',\n  iconName: 'sith',\n  icon: [448, 512, [], \"f512\", \"M0 32l69.71 118.75-58.86-11.52 69.84 91.03a146.741 146.741 0 0 0 0 51.45l-69.84 91.03 58.86-11.52L0 480l118.75-69.71-11.52 58.86 91.03-69.84c17.02 3.04 34.47 3.04 51.48 0l91.03 69.84-11.52-58.86L448 480l-69.71-118.78 58.86 11.52-69.84-91.03c3.03-17.01 3.04-34.44 0-51.45l69.84-91.03-58.86 11.52L448 32l-118.75 69.71 11.52-58.9-91.06 69.87c-8.5-1.52-17.1-2.29-25.71-2.29s-17.21.78-25.71 2.29l-91.06-69.87 11.52 58.9L0 32zm224 99.78c31.8 0 63.6 12.12 87.85 36.37 48.5 48.5 48.49 127.21 0 175.7s-127.2 48.46-175.7-.03c-48.5-48.5-48.49-127.21 0-175.7 24.24-24.25 56.05-36.34 87.85-36.34zm0 36.66c-22.42 0-44.83 8.52-61.92 25.61-34.18 34.18-34.19 89.68 0 123.87s89.65 34.18 123.84 0c34.18-34.18 34.19-89.68 0-123.87-17.09-17.09-39.5-25.61-61.92-25.61z\"]\n};\nconst faThemeisle = {\n  prefix: 'fab',\n  iconName: 'themeisle',\n  icon: [512, 512, [], \"f2b2\", \"M208 88.286c0-10 6.286-21.714 17.715-21.714 11.142 0 17.714 11.714 17.714 21.714 0 10.285-6.572 21.714-17.714 21.714C214.286 110 208 98.571 208 88.286zm304 160c0 36.001-11.429 102.286-36.286 129.714-22.858 24.858-87.428 61.143-120.857 70.572l-1.143.286v32.571c0 16.286-12.572 30.571-29.143 30.571-10 0-19.429-5.714-24.572-14.286-5.427 8.572-14.856 14.286-24.856 14.286-10 0-19.429-5.714-24.858-14.286-5.142 8.572-14.571 14.286-24.57 14.286-10.286 0-19.429-5.714-24.858-14.286-5.143 8.572-14.571 14.286-24.571 14.286-18.857 0-29.429-15.714-29.429-32.857-16.286 12.285-35.715 19.428-56.571 19.428-22 0-43.429-8.285-60.286-22.857 10.285-.286 20.571-2.286 30.285-5.714-20.857-5.714-39.428-18.857-52-36.286 21.37 4.645 46.209 1.673 67.143-11.143-22-22-56.571-58.857-68.572-87.428C1.143 321.714 0 303.714 0 289.429c0-49.714 20.286-160 86.286-160 10.571 0 18.857 4.858 23.143 14.857a158.792 158.792 0 0 1 12-15.428c2-2.572 5.714-5.429 7.143-8.286 7.999-12.571 11.714-21.142 21.714-34C182.571 45.428 232 17.143 285.143 17.143c6 0 12 .285 17.714 1.143C313.714 6.571 328.857 0 344.572 0c14.571 0 29.714 6 40 16.286.857.858 1.428 2.286 1.428 3.428 0 3.714-10.285 13.429-12.857 16.286 4.286 1.429 15.714 6.858 15.714 12 0 2.857-2.857 5.143-4.571 7.143 31.429 27.714 49.429 67.143 56.286 108 4.286-5.143 10.285-8.572 17.143-8.572 10.571 0 20.857 7.144 28.571 14.001C507.143 187.143 512 221.714 512 248.286zM188 89.428c0 18.286 12.571 37.143 32.286 37.143 19.714 0 32.285-18.857 32.285-37.143 0-18-12.571-36.857-32.285-36.857-19.715 0-32.286 18.858-32.286 36.857zM237.714 194c0-19.714 3.714-39.143 8.571-58.286-52.039 79.534-13.531 184.571 68.858 184.571 21.428 0 42.571-7.714 60-20 2-7.429 3.714-14.857 3.714-22.572 0-14.286-6.286-21.428-20.572-21.428-4.571 0-9.143.857-13.429 1.714-63.343 12.668-107.142 3.669-107.142-63.999zm-41.142 254.858c0-11.143-8.858-20.857-20.286-20.857-11.429 0-20 9.715-20 20.857v32.571c0 11.143 8.571 21.142 20 21.142 11.428 0 20.286-9.715 20.286-21.142v-32.571zm49.143 0c0-11.143-8.572-20.857-20-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20-10 20-21.142v-32.571zm49.713 0c0-11.143-8.857-20.857-20.285-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20.285-9.715 20.285-21.142v-32.571zm49.715 0c0-11.143-8.857-20.857-20.286-20.857-11.428 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.858 21.142 20.286 21.142 11.429 0 20.286-10 20.286-21.142v-32.571zM421.714 286c-30.857 59.142-90.285 102.572-158.571 102.572-96.571 0-160.571-84.572-160.571-176.572 0-16.857 2-33.429 6-49.714-20 33.715-29.714 72.572-29.714 111.429 0 60.286 24.857 121.715 71.429 160.857 5.143-9.714 14.857-16.286 26-16.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.571-14.286 24.858-14.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.857-14.286 24.858-14.286 10 0 19.428 5.714 24.857 14.286 5.143-8.571 14.571-14.286 24.572-14.286 10.857 0 20.857 6.572 25.714 16 43.427-36.286 68.569-92 71.426-148.286zm10.572-99.714c0-53.714-34.571-105.714-92.572-105.714-30.285 0-58.571 15.143-78.857 36.857C240.862 183.812 233.41 254 302.286 254c28.805 0 97.357-28.538 84.286 36.857 28.857-26 45.714-65.714 45.714-104.571z\"]\n};\nconst faPage4 = {\n  prefix: 'fab',\n  iconName: 'page4',\n  icon: [496, 512, [], \"f3d7\", \"M248 504C111 504 0 393 0 256S111 8 248 8c20.9 0 41.3 2.6 60.7 7.5L42.3 392H248v112zm0-143.6V146.8L98.6 360.4H248zm96 31.6v92.7c45.7-19.2 84.5-51.7 111.4-92.7H344zm57.4-138.2l-21.2 8.4 21.2 8.3v-16.7zm-20.3 54.5c-6.7 0-8 6.3-8 12.9v7.7h16.2v-10c0-5.9-2.3-10.6-8.2-10.6zM496 256c0 37.3-8.2 72.7-23 104.4H344V27.3C433.3 64.8 496 153.1 496 256zM360.4 143.6h68.2V96h-13.9v32.6h-13.9V99h-13.9v29.6h-12.7V96h-13.9v47.6zm68.1 185.3H402v-11c0-15.4-5.6-25.2-20.9-25.2-15.4 0-20.7 10.6-20.7 25.9v25.3h68.2v-15zm0-103l-68.2 29.7V268l68.2 29.5v-16.6l-14.4-5.7v-26.5l14.4-5.9v-16.9zm-4.8-68.5h-35.6V184H402v-12.2h11c8.6 15.8 1.3 35.3-18.6 35.3-22.5 0-28.3-25.3-15.5-37.7l-11.6-10.6c-16.2 17.5-12.2 63.9 27.1 63.9 34 0 44.7-35.9 29.3-65.3z\"]\n};\nconst faHashnode = {\n  prefix: 'fab',\n  iconName: 'hashnode',\n  icon: [512, 512, [], \"e499\", \"M35.19 171.1C-11.72 217.1-11.72 294 35.19 340.9L171.1 476.8C217.1 523.7 294 523.7 340.9 476.8L476.8 340.9C523.7 294 523.7 217.1 476.8 171.1L340.9 35.19C294-11.72 217.1-11.72 171.1 35.19L35.19 171.1zM315.5 315.5C282.6 348.3 229.4 348.3 196.6 315.5C163.7 282.6 163.7 229.4 196.6 196.6C229.4 163.7 282.6 163.7 315.5 196.6C348.3 229.4 348.3 282.6 315.5 315.5z\"]\n};\nconst faReact = {\n  prefix: 'fab',\n  iconName: 'react',\n  icon: [512, 512, [], \"f41b\", \"M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zm-30.3-120.3c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zm-149.7-15c25.3 0 45.8-20.5 45.8-45.8s-20.5-45.8-45.8-45.8c-25.3 0-45.8 20.5-45.8 45.8s20.5 45.8 45.8 45.8z\"]\n};\nconst faCcPaypal = {\n  prefix: 'fab',\n  iconName: 'cc-paypal',\n  icon: [576, 512, [], \"f1f4\", \"M186.3 258.2c0 12.2-9.7 21.5-22 21.5-9.2 0-16-5.2-16-15 0-12.2 9.5-22 21.7-22 9.3 0 16.3 5.7 16.3 15.5zM80.5 209.7h-4.7c-1.5 0-3 1-3.2 2.7l-4.3 26.7 8.2-.3c11 0 19.5-1.5 21.5-14.2 2.3-13.4-6.2-14.9-17.5-14.9zm284 0H360c-1.8 0-3 1-3.2 2.7l-4.2 26.7 8-.3c13 0 22-3 22-18-.1-10.6-9.6-11.1-18.1-11.1zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM128.3 215.4c0-21-16.2-28-34.7-28h-40c-2.5 0-5 2-5.2 4.7L32 294.2c-.3 2 1.2 4 3.2 4h19c2.7 0 5.2-2.9 5.5-5.7l4.5-26.6c1-7.2 13.2-4.7 18-4.7 28.6 0 46.1-17 46.1-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.2 8.2-5.8-8.5-14.2-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9 0 20.2-4.9 26.5-11.9-.5 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H200c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm40.5 97.9l63.7-92.6c.5-.5.5-1 .5-1.7 0-1.7-1.5-3.5-3.2-3.5h-19.2c-1.7 0-3.5 1-4.5 2.5l-26.5 39-11-37.5c-.8-2.2-3-4-5.5-4h-18.7c-1.7 0-3.2 1.8-3.2 3.5 0 1.2 19.5 56.8 21.2 62.1-2.7 3.8-20.5 28.6-20.5 31.6 0 1.8 1.5 3.2 3.2 3.2h19.2c1.8-.1 3.5-1.1 4.5-2.6zm159.3-106.7c0-21-16.2-28-34.7-28h-39.7c-2.7 0-5.2 2-5.5 4.7l-16.2 102c-.2 2 1.3 4 3.2 4h20.5c2 0 3.5-1.5 4-3.2l4.5-29c1-7.2 13.2-4.7 18-4.7 28.4 0 45.9-17 45.9-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.3 8.2-5.5-8.5-14-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9.3 0 20.5-4.9 26.5-11.9-.3 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H484c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm47.5-33.3c0-2-1.5-3.5-3.2-3.5h-18.5c-1.5 0-3 1.2-3.2 2.7l-16.2 104-.3.5c0 1.8 1.5 3.5 3.5 3.5h16.5c2.5 0 5-2.9 5.2-5.7L544 191.2v-.3zm-90 51.8c-12.2 0-21.7 9.7-21.7 22 0 9.7 7 15 16.2 15 12 0 21.7-9.2 21.7-21.5.1-9.8-6.9-15.5-16.2-15.5z\"]\n};\nconst faSquarespace = {\n  prefix: 'fab',\n  iconName: 'squarespace',\n  icon: [512, 512, [], \"f5be\", \"M186.12 343.34c-9.65 9.65-9.65 25.29 0 34.94 9.65 9.65 25.29 9.65 34.94 0L378.24 221.1c19.29-19.29 50.57-19.29 69.86 0s19.29 50.57 0 69.86L293.95 445.1c19.27 19.29 50.53 19.31 69.82.04l.04-.04 119.25-119.24c38.59-38.59 38.59-101.14 0-139.72-38.59-38.59-101.15-38.59-139.72 0l-157.22 157.2zm244.53-104.8c-9.65-9.65-25.29-9.65-34.93 0l-157.2 157.18c-19.27 19.29-50.53 19.31-69.82.05l-.05-.05c-9.64-9.64-25.27-9.65-34.92-.01l-.01.01c-9.65 9.64-9.66 25.28-.02 34.93l.02.02c38.58 38.57 101.14 38.57 139.72 0l157.2-157.2c9.65-9.65 9.65-25.29.01-34.93zm-261.99 87.33l157.18-157.18c9.64-9.65 9.64-25.29 0-34.94-9.64-9.64-25.27-9.64-34.91 0L133.72 290.93c-19.28 19.29-50.56 19.3-69.85.01l-.01-.01c-19.29-19.28-19.31-50.54-.03-69.84l.03-.03L218.03 66.89c-19.28-19.29-50.55-19.3-69.85-.02l-.02.02L28.93 186.14c-38.58 38.59-38.58 101.14 0 139.72 38.6 38.59 101.13 38.59 139.73.01zm-87.33-52.4c9.64 9.64 25.27 9.64 34.91 0l157.21-157.19c19.28-19.29 50.55-19.3 69.84-.02l.02.02c9.65 9.65 25.29 9.65 34.93 0 9.65-9.65 9.65-25.29 0-34.93-38.59-38.59-101.13-38.59-139.72 0L81.33 238.54c-9.65 9.64-9.65 25.28-.01 34.93h.01z\"]\n};\nconst faCcStripe = {\n  prefix: 'fab',\n  iconName: 'cc-stripe',\n  icon: [576, 512, [], \"f1f5\", \"M492.4 220.8c-8.9 0-18.7 6.7-18.7 22.7h36.7c0-16-9.3-22.7-18-22.7zM375 223.4c-8.2 0-13.3 2.9-17 7l.2 52.8c3.5 3.7 8.5 6.7 16.8 6.7 13.1 0 21.9-14.3 21.9-33.4 0-18.6-9-33.2-21.9-33.1zM528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM122.2 281.1c0 25.6-20.3 40.1-49.9 40.3-12.2 0-25.6-2.4-38.8-8.1v-33.9c12 6.4 27.1 11.3 38.9 11.3 7.9 0 13.6-2.1 13.6-8.7 0-17-54-10.6-54-49.9 0-25.2 19.2-40.2 48-40.2 11.8 0 23.5 1.8 35.3 6.5v33.4c-10.8-5.8-24.5-9.1-35.3-9.1-7.5 0-12.1 2.2-12.1 7.7 0 16 54.3 8.4 54.3 50.7zm68.8-56.6h-27V275c0 20.9 22.5 14.4 27 12.6v28.9c-4.7 2.6-13.3 4.7-24.9 4.7-21.1 0-36.9-15.5-36.9-36.5l.2-113.9 34.7-7.4v30.8H191zm74 2.4c-4.5-1.5-18.7-3.6-27.1 7.4v84.4h-35.5V194.2h30.7l2.2 10.5c8.3-15.3 24.9-12.2 29.6-10.5h.1zm44.1 91.8h-35.7V194.2h35.7zm0-142.9l-35.7 7.6v-28.9l35.7-7.6zm74.1 145.5c-12.4 0-20-5.3-25.1-9l-.1 40.2-35.5 7.5V194.2h31.3l1.8 8.8c4.9-4.5 13.9-11.1 27.8-11.1 24.9 0 48.4 22.5 48.4 63.8 0 45.1-23.2 65.5-48.6 65.6zm160.4-51.5h-69.5c1.6 16.6 13.8 21.5 27.6 21.5 14.1 0 25.2-3 34.9-7.9V312c-9.7 5.3-22.4 9.2-39.4 9.2-34.6 0-58.8-21.7-58.8-64.5 0-36.2 20.5-64.9 54.3-64.9 33.7 0 51.3 28.7 51.3 65.1 0 3.5-.3 10.9-.4 12.9z\"]\n};\nconst faCreativeCommonsShare = {\n  prefix: 'fab',\n  iconName: 'creative-commons-share',\n  icon: [496, 512, [], \"f4f2\", \"M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm101 132.4c7.8 0 13.7 6.1 13.7 13.7v182.5c0 7.7-6.1 13.7-13.7 13.7H214.3c-7.7 0-13.7-6-13.7-13.7v-54h-54c-7.8 0-13.7-6-13.7-13.7V131.1c0-8.2 6.6-12.7 12.4-13.7h136.4c7.7 0 13.7 6 13.7 13.7v54h54zM159.9 300.3h40.7V198.9c0-7.4 5.8-12.6 12-13.7h55.8v-40.3H159.9v155.4zm176.2-88.1H227.6v155.4h108.5V212.2z\"]\n};\nconst faBitcoin = {\n  prefix: 'fab',\n  iconName: 'bitcoin',\n  icon: [512, 512, [], \"f379\", \"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-141.651-35.33c4.937-32.999-20.191-50.739-54.55-62.573l11.146-44.702-27.213-6.781-10.851 43.524c-7.154-1.783-14.502-3.464-21.803-5.13l10.929-43.81-27.198-6.781-11.153 44.686c-5.922-1.349-11.735-2.682-17.377-4.084l.031-.14-37.53-9.37-7.239 29.062s20.191 4.627 19.765 4.913c11.022 2.751 13.014 10.044 12.68 15.825l-12.696 50.925c.76.194 1.744.473 2.829.907-.907-.225-1.876-.473-2.876-.713l-17.796 71.338c-1.349 3.348-4.767 8.37-12.471 6.464.271.395-19.78-4.937-19.78-4.937l-13.51 31.147 35.414 8.827c6.588 1.651 13.045 3.379 19.4 5.006l-11.262 45.213 27.182 6.781 11.153-44.733a1038.209 1038.209 0 0 0 21.687 5.627l-11.115 44.523 27.213 6.781 11.262-45.128c46.404 8.781 81.299 5.239 95.986-36.727 11.836-33.79-.589-53.281-25.004-65.991 17.78-4.098 31.174-15.792 34.747-39.949zm-62.177 87.179c-8.41 33.79-65.308 15.523-83.755 10.943l14.944-59.899c18.446 4.603 77.6 13.717 68.811 48.956zm8.417-87.667c-7.673 30.736-55.031 15.12-70.393 11.292l13.548-54.327c15.363 3.828 64.836 10.973 56.845 43.035z\"]\n};\nconst faKeycdn = {\n  prefix: 'fab',\n  iconName: 'keycdn',\n  icon: [512, 512, [], \"f3ba\", \"M63.8 409.3l60.5-59c32.1 42.8 71.1 66 126.6 67.4 30.5.7 60.3-7 86.4-22.4 5.1 5.3 18.5 19.5 20.9 22-32.2 20.7-69.6 31.1-108.1 30.2-43.3-1.1-84.6-16.7-117.7-44.4.3-.6-38.2 37.5-38.6 37.9 9.5 29.8-13.1 62.4-46.3 62.4C20.7 503.3 0 481.7 0 454.9c0-34.3 33.1-56.6 63.8-45.6zm354.9-252.4c19.1 31.3 29.6 67.4 28.7 104-1.1 44.8-19 87.5-48.6 121 .3.3 23.8 25.2 24.1 25.5 9.6-1.3 19.2 2 25.9 9.1 11.3 12 10.9 30.9-1.1 42.4-12 11.3-30.9 10.9-42.4-1.1-6.7-7-9.4-16.8-7.6-26.3-24.9-26.6-44.4-47.2-44.4-47.2 42.7-34.1 63.3-79.6 64.4-124.2.7-28.9-7.2-57.2-21.1-82.2l22.1-21zM104 53.1c6.7 7 9.4 16.8 7.6 26.3l45.9 48.1c-4.7 3.8-13.3 10.4-22.8 21.3-25.4 28.5-39.6 64.8-40.7 102.9-.7 28.9 6.1 57.2 20 82.4l-22 21.5C72.7 324 63.1 287.9 64.2 250.9c1-44.6 18.3-87.6 47.5-121.1l-25.3-26.4c-9.6 1.3-19.2-2-25.9-9.1-11.3-12-10.9-30.9 1.1-42.4C73.5 40.7 92.2 41 104 53.1zM464.9 8c26 0 47.1 22.4 47.1 48.3S490.9 104 464.9 104c-6.3.1-14-1.1-15.9-1.8l-62.9 59.7c-32.7-43.6-76.7-65.9-126.9-67.2-30.5-.7-60.3 6.8-86.2 22.4l-21.1-22C184.1 74.3 221.5 64 260 64.9c43.3 1.1 84.6 16.7 117.7 44.6l41.1-38.6c-1.5-4.7-2.2-9.6-2.2-14.5C416.5 29.7 438.9 8 464.9 8zM256.7 113.4c5.5 0 10.9.4 16.4 1.1 78.1 9.8 133.4 81.1 123.8 159.1-9.8 78.1-81.1 133.4-159.1 123.8-78.1-9.8-133.4-81.1-123.8-159.2 9.3-72.4 70.1-124.6 142.7-124.8zm-59 119.4c.6 22.7 12.2 41.8 32.4 52.2l-11 51.7h73.7l-11-51.7c20.1-10.9 32.1-29 32.4-52.2-.4-32.8-25.8-57.5-58.3-58.3-32.1.8-57.3 24.8-58.2 58.3zM256 160\"]\n};\nconst faOpera = {\n  prefix: 'fab',\n  iconName: 'opera',\n  icon: [496, 512, [], \"f26a\", \"M313.9 32.7c-170.2 0-252.6 223.8-147.5 355.1 36.5 45.4 88.6 75.6 147.5 75.6 36.3 0 70.3-11.1 99.4-30.4-43.8 39.2-101.9 63-165.3 63-3.9 0-8 0-11.9-.3C104.6 489.6 0 381.1 0 248 0 111 111 0 248 0h.8c63.1.3 120.7 24.1 164.4 63.1-29-19.4-63.1-30.4-99.3-30.4zm101.8 397.7c-40.9 24.7-90.7 23.6-132-5.8 56.2-20.5 97.7-91.6 97.7-176.6 0-84.7-41.2-155.8-97.4-176.6 41.8-29.2 91.2-30.3 132.9-5 105.9 98.7 105.5 265.7-1.2 364z\"]\n};\nconst faItchIo = {\n  prefix: 'fab',\n  iconName: 'itch-io',\n  icon: [512, 512, [], \"f83a\", \"M71.92 34.77C50.2 47.67 7.4 96.84 7 109.73v21.34c0 27.06 25.29 50.84 48.25 50.84 27.57 0 50.54-22.85 50.54-50 0 27.12 22.18 50 49.76 50s49-22.85 49-50c0 27.12 23.59 50 51.16 50h.5c27.57 0 51.16-22.85 51.16-50 0 27.12 21.47 50 49 50s49.76-22.85 49.76-50c0 27.12 23 50 50.54 50 23 0 48.25-23.78 48.25-50.84v-21.34c-.4-12.9-43.2-62.07-64.92-75C372.56 32.4 325.76 32 256 32S91.14 33.1 71.92 34.77zm132.32 134.39c-22 38.4-77.9 38.71-99.85.25-13.17 23.14-43.17 32.07-56 27.66-3.87 40.15-13.67 237.13 17.73 269.15 80 18.67 302.08 18.12 379.76 0 31.65-32.27 21.32-232 17.75-269.15-12.92 4.44-42.88-4.6-56-27.66-22 38.52-77.85 38.1-99.85-.24-7.1 12.49-23.05 28.94-51.76 28.94a57.54 57.54 0 0 1-51.75-28.94zm-41.58 53.77c16.47 0 31.09 0 49.22 19.78a436.91 436.91 0 0 1 88.18 0C318.22 223 332.85 223 349.31 223c52.33 0 65.22 77.53 83.87 144.45 17.26 62.15-5.52 63.67-33.95 63.73-42.15-1.57-65.49-32.18-65.49-62.79-39.25 6.43-101.93 8.79-155.55 0 0 30.61-23.34 61.22-65.49 62.79-28.42-.06-51.2-1.58-33.94-63.73 18.67-67 31.56-144.45 83.88-144.45zM256 270.79s-44.38 40.77-52.35 55.21l29-1.17v25.32c0 1.55 21.34.16 23.33.16 11.65.54 23.31 1 23.31-.16v-25.28l29 1.17c-8-14.48-52.35-55.24-52.35-55.24z\"]\n};\nconst faUmbraco = {\n  prefix: 'fab',\n  iconName: 'umbraco',\n  icon: [510, 512, [], \"f8e8\", \"M255.35 8C118.36 7.83 7.14 118.72 7 255.68c-.07 137 111 248.2 248 248.27 136.85 0 247.82-110.7 248-247.67S392.34 8.17 255.35 8zm145 266q-1.14 40.68-14 65t-43.51 35q-30.61 10.7-85.45 10.47h-4.6q-54.78.22-85.44-10.47t-43.52-35q-12.85-24.36-14-65a224.81 224.81 0 0 1 0-30.71 418.37 418.37 0 0 1 3.6-43.88c1.88-13.39 3.57-22.58 5.4-32 1-4.88 1.28-6.42 1.82-8.45a5.09 5.09 0 0 1 4.9-3.89h.69l32 5a5.07 5.07 0 0 1 4.16 5 5 5 0 0 1 0 .77l-1.7 8.78q-2.41 13.25-4.84 33.68a380.62 380.62 0 0 0-2.64 42.15q-.28 40.43 8.13 59.83a43.87 43.87 0 0 0 31.31 25.18A243 243 0 0 0 250 340.6h10.25a242.64 242.64 0 0 0 57.27-5.16 43.86 43.86 0 0 0 31.15-25.23q8.53-19.42 8.13-59.78a388 388 0 0 0-2.6-42.15q-2.48-20.38-4.89-33.68l-1.69-8.78a5 5 0 0 1 0-.77 5 5 0 0 1 4.2-5l32-5h.82a5 5 0 0 1 4.9 3.89c.55 2.05.81 3.57 1.83 8.45 1.82 9.62 3.52 18.78 5.39 32a415.71 415.71 0 0 1 3.61 43.88 228.06 228.06 0 0 1-.04 30.73z\"]\n};\nconst faGalacticSenate = {\n  prefix: 'fab',\n  iconName: 'galactic-senate',\n  icon: [512, 512, [], \"f50d\", \"M249.86 33.48v26.07C236.28 80.17 226 168.14 225.39 274.9c11.74-15.62 19.13-33.33 19.13-48.24v-16.88c-.03-5.32.75-10.53 2.19-15.65.65-2.14 1.39-4.08 2.62-5.82 1.23-1.75 3.43-3.79 6.68-3.79 3.24 0 5.45 2.05 6.68 3.79 1.23 1.75 1.97 3.68 2.62 5.82 1.44 5.12 2.22 10.33 2.19 15.65v16.88c0 14.91 7.39 32.62 19.13 48.24-.63-106.76-10.91-194.73-24.49-215.35V33.48h-12.28zm-26.34 147.77c-9.52 2.15-18.7 5.19-27.46 9.08 8.9 16.12 9.76 32.64 1.71 37.29-8 4.62-21.85-4.23-31.36-19.82-11.58 8.79-21.88 19.32-30.56 31.09 14.73 9.62 22.89 22.92 18.32 30.66-4.54 7.7-20.03 7.14-35.47-.96-5.78 13.25-9.75 27.51-11.65 42.42 9.68.18 18.67 2.38 26.18 6.04 17.78-.3 32.77-1.96 40.49-4.22 5.55-26.35 23.02-48.23 46.32-59.51.73-25.55 1.88-49.67 3.48-72.07zm64.96 0c1.59 22.4 2.75 46.52 3.47 72.07 23.29 11.28 40.77 33.16 46.32 59.51 7.72 2.26 22.71 3.92 40.49 4.22 7.51-3.66 16.5-5.85 26.18-6.04-1.9-14.91-5.86-29.17-11.65-42.42-15.44 8.1-30.93 8.66-35.47.96-4.57-7.74 3.6-21.05 18.32-30.66-8.68-11.77-18.98-22.3-30.56-31.09-9.51 15.59-23.36 24.44-31.36 19.82-8.05-4.65-7.19-21.16 1.71-37.29a147.49 147.49 0 0 0-27.45-9.08zm-32.48 8.6c-3.23 0-5.86 8.81-6.09 19.93h-.05v16.88c0 41.42-49.01 95.04-93.49 95.04-52 0-122.75-1.45-156.37 29.17v2.51c9.42 17.12 20.58 33.17 33.18 47.97C45.7 380.26 84.77 360.4 141.2 360c45.68 1.02 79.03 20.33 90.76 40.87.01.01-.01.04 0 .05 7.67 2.14 15.85 3.23 24.04 3.21 8.19.02 16.37-1.07 24.04-3.21.01-.01-.01-.04 0-.05 11.74-20.54 45.08-39.85 90.76-40.87 56.43.39 95.49 20.26 108.02 41.35 12.6-14.8 23.76-30.86 33.18-47.97v-2.51c-33.61-30.62-104.37-29.17-156.37-29.17-44.48 0-93.49-53.62-93.49-95.04v-16.88h-.05c-.23-11.12-2.86-19.93-6.09-19.93zm0 96.59c22.42 0 40.6 18.18 40.6 40.6s-18.18 40.65-40.6 40.65-40.6-18.23-40.6-40.65c0-22.42 18.18-40.6 40.6-40.6zm0 7.64c-18.19 0-32.96 14.77-32.96 32.96S237.81 360 256 360s32.96-14.77 32.96-32.96-14.77-32.96-32.96-32.96zm0 6.14c14.81 0 26.82 12.01 26.82 26.82s-12.01 26.82-26.82 26.82-26.82-12.01-26.82-26.82 12.01-26.82 26.82-26.82zm-114.8 66.67c-10.19.07-21.6.36-30.5 1.66.43 4.42 1.51 18.63 7.11 29.76 9.11-2.56 18.36-3.9 27.62-3.9 41.28.94 71.48 34.35 78.26 74.47l.11 4.7c10.4 1.91 21.19 2.94 32.21 2.94 11.03 0 21.81-1.02 32.21-2.94l.11-4.7c6.78-40.12 36.98-73.53 78.26-74.47 9.26 0 18.51 1.34 27.62 3.9 5.6-11.13 6.68-25.34 7.11-29.76-8.9-1.3-20.32-1.58-30.5-1.66-18.76.42-35.19 4.17-48.61 9.67-12.54 16.03-29.16 30.03-49.58 33.07-.09.02-.17.04-.27.05-.05.01-.11.04-.16.05-5.24 1.07-10.63 1.6-16.19 1.6-5.55 0-10.95-.53-16.19-1.6-.05-.01-.11-.04-.16-.05-.1-.02-.17-.04-.27-.05-20.42-3.03-37.03-17.04-49.58-33.07-13.42-5.49-29.86-9.25-48.61-9.67z\"]\n};\nconst faUbuntu = {\n  prefix: 'fab',\n  iconName: 'ubuntu',\n  icon: [576, 512, [], \"f7df\", \"M469.2 75A75.6 75.6 0 1 0 317.9 75a75.6 75.6 0 1 0 151.2 0zM154.2 240.7A75.6 75.6 0 1 0 3 240.7a75.6 75.6 0 1 0 151.2 0zM57 346C75.6 392.9 108 433 150 461.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2c-6.8-.9-13.3-2.1-19.5-3.4c-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0 -151.2 0 75.6 75.6 0 1 0 151.2 0zM444 351.6c18.5 14.8 31.6 35.2 37.2 58.2c33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6c15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3c16.6-24.2 38.9-44.1 64.8-58S255.8 70.4 285.2 70c.2-5.9 .9-11.9 2-17.7c3.6-16.7 11.1-32.3 21.8-45.5c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3c7.5 0 15 .8 22.4 2.3z\"]\n};\nconst faDraft2digital = {\n  prefix: 'fab',\n  iconName: 'draft2digital',\n  icon: [480, 512, [], \"f396\", \"M480 398.1l-144-82.2v64.7h-91.3c30.8-35 81.8-95.9 111.8-149.3 35.2-62.6 16.1-123.4-12.8-153.3-4.4-4.6-62.2-62.9-166-41.2-59.1 12.4-89.4 43.4-104.3 67.3-13.1 20.9-17 39.8-18.2 47.7-5.5 33 19.4 67.1 56.7 67.1 31.7 0 57.3-25.7 57.3-57.4 0-27.1-19.7-52.1-48-56.8 1.8-7.3 17.7-21.1 26.3-24.7 41.1-17.3 78 5.2 83.3 33.5 8.3 44.3-37.1 90.4-69.7 127.6C84.5 328.1 18.3 396.8 0 415.9l336-.1V480zM369.9 371l47.1 27.2-47.1 27.2zM134.2 161.4c0 12.4-10 22.4-22.4 22.4s-22.4-10-22.4-22.4 10-22.4 22.4-22.4 22.4 10.1 22.4 22.4zM82.5 380.5c25.6-27.4 97.7-104.7 150.8-169.9 35.1-43.1 40.3-82.4 28.4-112.7-7.4-18.8-17.5-30.2-24.3-35.7 45.3 2.1 68 23.4 82.2 38.3 0 0 42.4 48.2 5.8 113.3-37 65.9-110.9 147.5-128.5 166.7z\"]\n};\nconst faStripe = {\n  prefix: 'fab',\n  iconName: 'stripe',\n  icon: [640, 512, [], \"f429\", \"M165 144.7l-43.3 9.2-.2 142.4c0 26.3 19.8 43.3 46.1 43.3 14.6 0 25.3-2.7 31.2-5.9v-33.8c-5.7 2.3-33.7 10.5-33.7-15.7V221h33.7v-37.8h-33.7zm89.1 51.6l-2.7-13.1H213v153.2h44.3V233.3c10.5-13.8 28.2-11.1 33.9-9.3v-40.8c-6-2.1-26.7-6-37.1 13.1zm92.3-72.3l-44.6 9.5v36.2l44.6-9.5zM44.9 228.3c0-6.9 5.8-9.6 15.1-9.7 13.5 0 30.7 4.1 44.2 11.4v-41.8c-14.7-5.8-29.4-8.1-44.1-8.1-36 0-60 18.8-60 50.2 0 49.2 67.5 41.2 67.5 62.4 0 8.2-7.1 10.9-17 10.9-14.7 0-33.7-6.1-48.6-14.2v40c16.5 7.1 33.2 10.1 48.5 10.1 36.9 0 62.3-15.8 62.3-47.8 0-52.9-67.9-43.4-67.9-63.4zM640 261.6c0-45.5-22-81.4-64.2-81.4s-67.9 35.9-67.9 81.1c0 53.5 30.3 78.2 73.5 78.2 21.2 0 37.1-4.8 49.2-11.5v-33.4c-12.1 6.1-26 9.8-43.6 9.8-17.3 0-32.5-6.1-34.5-26.9h86.9c.2-2.3.6-11.6.6-15.9zm-87.9-16.8c0-20 12.3-28.4 23.4-28.4 10.9 0 22.5 8.4 22.5 28.4zm-112.9-64.6c-17.4 0-28.6 8.2-34.8 13.9l-2.3-11H363v204.8l44.4-9.4.1-50.2c6.4 4.7 15.9 11.2 31.4 11.2 31.8 0 60.8-23.2 60.8-79.6.1-51.6-29.3-79.7-60.5-79.7zm-10.6 122.5c-10.4 0-16.6-3.8-20.9-8.4l-.3-66c4.6-5.1 11-8.8 21.2-8.8 16.2 0 27.4 18.2 27.4 41.4.1 23.9-10.9 41.8-27.4 41.8zm-126.7 33.7h44.6V183.2h-44.6z\"]\n};\nconst faHouzz = {\n  prefix: 'fab',\n  iconName: 'houzz',\n  icon: [448, 512, [], \"f27c\", \"M275.9 330.7H171.3V480H17V32h109.5v104.5l305.1 85.6V480H275.9z\"]\n};\nconst faGg = {\n  prefix: 'fab',\n  iconName: 'gg',\n  icon: [512, 512, [], \"f260\", \"M179.2 230.4l102.4 102.4-102.4 102.4L0 256 179.2 76.8l44.8 44.8-25.6 25.6-19.2-19.2-128 128 128 128 51.5-51.5-77.1-76.5 25.6-25.6zM332.8 76.8L230.4 179.2l102.4 102.4 25.6-25.6-77.1-76.5 51.5-51.5 128 128-128 128-19.2-19.2-25.6 25.6 44.8 44.8L512 256 332.8 76.8z\"]\n};\nconst faDhl = {\n  prefix: 'fab',\n  iconName: 'dhl',\n  icon: [640, 512, [], \"f790\", \"M238 301.2h58.7L319 271h-58.7L238 301.2zM0 282.9v6.4h81.8l4.7-6.4H0zM172.9 271c-8.7 0-6-3.6-4.6-5.5 2.8-3.8 7.6-10.4 10.4-14.1 2.8-3.7 2.8-5.9-2.8-5.9h-51l-41.1 55.8h100.1c33.1 0 51.5-22.5 57.2-30.3h-68.2zm317.5-6.9l39.3-53.4h-62.2l-39.3 53.4h62.2zM95.3 271H0v6.4h90.6l4.7-6.4zm111-26.6c-2.8 3.8-7.5 10.4-10.3 14.2-1.4 2-4.1 5.5 4.6 5.5h45.6s7.3-10 13.5-18.4c8.4-11.4.7-35-29.2-35H112.6l-20.4 27.8h111.4c5.6 0 5.5 2.2 2.7 5.9zM0 301.2h73.1l4.7-6.4H0v6.4zm323 0h58.7L404 271h-58.7c-.1 0-22.3 30.2-22.3 30.2zm222 .1h95v-6.4h-90.3l-4.7 6.4zm22.3-30.3l-4.7 6.4H640V271h-72.7zm-13.5 18.3H640v-6.4h-81.5l-4.7 6.4zm-164.2-78.6l-22.5 30.6h-26.2l22.5-30.6h-58.7l-39.3 53.4H409l39.3-53.4h-58.7zm33.5 60.3s-4.3 5.9-6.4 8.7c-7.4 10-.9 21.6 23.2 21.6h94.3l22.3-30.3H423.1z\"]\n};\nconst faSquarePinterest = {\n  prefix: 'fab',\n  iconName: 'square-pinterest',\n  icon: [448, 512, [\"pinterest-square\"], \"f0d3\", \"M384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64h72.6l-2.2-.8c-5.4-48.1-3.1-57.5 15.7-134.7c3.9-16 8.5-35 13.9-57.9c0 0-7.3-14.8-7.3-36.5c0-70.7 75.5-78 75.5-25c0 13.5-5.4 31.1-11.2 49.8c-3.3 10.6-6.6 21.5-9.1 32c-5.7 24.5 12.3 44.4 36.4 44.4c43.7 0 77.2-46 77.2-112.4c0-58.8-42.3-99.9-102.6-99.9C153 139 112 191.4 112 245.6c0 21.1 8.2 43.7 18.3 56c2 2.4 2.3 4.5 1.7 7c-1.1 4.7-3.1 12.9-4.7 19.2c-1 4-1.8 7.3-2.1 8.6c-1.1 4.5-3.5 5.5-8.2 3.3c-30.6-14.3-49.8-59.1-49.8-95.1C67.2 167.1 123.4 96 229.4 96c85.2 0 151.4 60.7 151.4 141.8c0 84.6-53.3 152.7-127.4 152.7c-24.9 0-48.3-12.9-56.3-28.2c0 0-12.3 46.9-15.3 58.4c-5 19.3-17.6 42.9-27.4 59.3H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64z\"]\n};\nconst faPinterestSquare = faSquarePinterest;\nconst faXing = {\n  prefix: 'fab',\n  iconName: 'xing',\n  icon: [384, 512, [], \"f168\", \"M162.7 210c-1.8 3.3-25.2 44.4-70.1 123.5-4.9 8.3-10.8 12.5-17.7 12.5H9.8c-7.7 0-12.1-7.5-8.5-14.4l69-121.3c.2 0 .2-.1 0-.3l-43.9-75.6c-4.3-7.8.3-14.1 8.5-14.1H100c7.3 0 13.3 4.1 18 12.2l44.7 77.5zM382.6 46.1l-144 253v.3L330.2 466c3.9 7.1.2 14.1-8.5 14.1h-65.2c-7.6 0-13.6-4-18-12.2l-92.4-168.5c3.3-5.8 51.5-90.8 144.8-255.2 4.6-8.1 10.4-12.2 17.5-12.2h65.7c8 0 12.3 6.7 8.5 14.1z\"]\n};\nconst faBlackberry = {\n  prefix: 'fab',\n  iconName: 'blackberry',\n  icon: [512, 512, [], \"f37b\", \"M166 116.9c0 23.4-16.4 49.1-72.5 49.1H23.4l21-88.8h67.8c42.1 0 53.8 23.3 53.8 39.7zm126.2-39.7h-67.8L205.7 166h70.1c53.8 0 70.1-25.7 70.1-49.1.1-16.4-11.6-39.7-53.7-39.7zM88.8 208.1H21L0 296.9h70.1c56.1 0 72.5-23.4 72.5-49.1 0-16.3-11.7-39.7-53.8-39.7zm180.1 0h-67.8l-18.7 88.8h70.1c53.8 0 70.1-23.4 70.1-49.1 0-16.3-11.7-39.7-53.7-39.7zm189.3-53.8h-67.8l-18.7 88.8h70.1c53.8 0 70.1-23.4 70.1-49.1.1-16.3-11.6-39.7-53.7-39.7zm-28 137.9h-67.8L343.7 381h70.1c56.1 0 70.1-23.4 70.1-49.1 0-16.3-11.6-39.7-53.7-39.7zM240.8 346H173l-18.7 88.8h70.1c56.1 0 70.1-25.7 70.1-49.1.1-16.3-11.6-39.7-53.7-39.7z\"]\n};\nconst faCreativeCommonsPd = {\n  prefix: 'fab',\n  iconName: 'creative-commons-pd',\n  icon: [496, 512, [], \"f4ec\", \"M248 8C111 8 0 119.1 0 256c0 137 111 248 248 248s248-111 248-248C496 119.1 385 8 248 8zm0 449.5c-139.2 0-235.8-138-190.2-267.9l78.8 35.1c-2.1 10.5-3.3 21.5-3.3 32.9 0 99 73.9 126.9 120.4 126.9 22.9 0 53.5-6.7 79.4-29.5L297 311.1c-5.5 6.3-17.6 16.7-36.3 16.7-37.8 0-53.7-39.9-53.9-71.9 230.4 102.6 216.5 96.5 217.9 96.8-34.3 62.4-100.6 104.8-176.7 104.8zm194.2-150l-224-100c18.8-34 54.9-30.7 74.7-11l40.4-41.6c-27.1-23.3-58-27.5-78.1-27.5-47.4 0-80.9 20.5-100.7 51.6l-74.9-33.4c36.1-54.9 98.1-91.2 168.5-91.2 111.1 0 201.5 90.4 201.5 201.5 0 18-2.4 35.4-6.8 52-.3-.1-.4-.2-.6-.4z\"]\n};\nconst faPlaystation = {\n  prefix: 'fab',\n  iconName: 'playstation',\n  icon: [576, 512, [], \"f3df\", \"M570.9 372.3c-11.3 14.2-38.8 24.3-38.8 24.3L327 470.2v-54.3l150.9-53.8c17.1-6.1 19.8-14.8 5.8-19.4-13.9-4.6-39.1-3.3-56.2 2.9L327 381.1v-56.4c23.2-7.8 47.1-13.6 75.7-16.8 40.9-4.5 90.9.6 130.2 15.5 44.2 14 49.2 34.7 38 48.9zm-224.4-92.5v-139c0-16.3-3-31.3-18.3-35.6-11.7-3.8-19 7.1-19 23.4v347.9l-93.8-29.8V32c39.9 7.4 98 24.9 129.2 35.4C424.1 94.7 451 128.7 451 205.2c0 74.5-46 102.8-104.5 74.6zM43.2 410.2c-45.4-12.8-53-39.5-32.3-54.8 19.1-14.2 51.7-24.9 51.7-24.9l134.5-47.8v54.5l-96.8 34.6c-17.1 6.1-19.7 14.8-5.8 19.4 13.9 4.6 39.1 3.3 56.2-2.9l46.4-16.9v48.8c-51.6 9.3-101.4 7.3-153.9-10z\"]\n};\nconst faQuinscape = {\n  prefix: 'fab',\n  iconName: 'quinscape',\n  icon: [512, 512, [], \"f459\", \"M313.6 474.6h-1a158.1 158.1 0 0 1 0-316.2c94.9 0 168.2 83.1 157 176.6 4 5.1 8.2 9.6 11.2 15.3 13.4-30.3 20.3-62.4 20.3-97.7C501.1 117.5 391.6 8 256.5 8S12 117.5 12 252.6s109.5 244.6 244.5 244.6a237.36 237.36 0 0 0 70.4-10.1c-5.2-3.5-8.9-8.1-13.3-12.5zm-.1-.1l.4.1zm78.4-168.9a99.2 99.2 0 1 0 99.2 99.2 99.18 99.18 0 0 0-99.2-99.2z\"]\n};\nconst faLess = {\n  prefix: 'fab',\n  iconName: 'less',\n  icon: [640, 512, [], \"f41d\", \"M612.7 219c0-20.5 3.2-32.6 3.2-54.6 0-34.2-12.6-45.2-40.5-45.2h-20.5v24.2h6.3c14.2 0 17.3 4.7 17.3 22.1 0 16.3-1.6 32.6-1.6 51.5 0 24.2 7.9 33.6 23.6 37.3v1.6c-15.8 3.7-23.6 13.1-23.6 37.3 0 18.9 1.6 34.2 1.6 51.5 0 17.9-3.7 22.6-17.3 22.6v.5h-6.3V393h20.5c27.8 0 40.5-11 40.5-45.2 0-22.6-3.2-34.2-3.2-54.6 0-11 6.8-22.6 27.3-23.6v-27.3c-20.5-.7-27.3-12.3-27.3-23.3zm-105.6 32c-15.8-6.3-30.5-10-30.5-20.5 0-7.9 6.3-12.6 17.9-12.6s22.1 4.7 33.6 13.1l21-27.8c-13.1-10-31-20.5-55.2-20.5-35.7 0-59.9 20.5-59.9 49.4 0 25.7 22.6 38.9 41.5 46.2 16.3 6.3 32.1 11.6 32.1 22.1 0 7.9-6.3 13.1-20.5 13.1-13.1 0-26.3-5.3-40.5-16.3l-21 30.5c15.8 13.1 39.9 22.1 59.9 22.1 42 0 64.6-22.1 64.6-51s-22.5-41-43-47.8zm-358.9 59.4c-3.7 0-8.4-3.2-8.4-13.1V119.1H65.2c-28.4 0-41 11-41 45.2 0 22.6 3.2 35.2 3.2 54.6 0 11-6.8 22.6-27.3 23.6v27.3c20.5.5 27.3 12.1 27.3 23.1 0 19.4-3.2 31-3.2 53.6 0 34.2 12.6 45.2 40.5 45.2h20.5v-24.2h-6.3c-13.1 0-17.3-5.3-17.3-22.6s1.6-32.1 1.6-51.5c0-24.2-7.9-33.6-23.6-37.3v-1.6c15.8-3.7 23.6-13.1 23.6-37.3 0-18.9-1.6-34.2-1.6-51.5s3.7-22.1 17.3-22.1H93v150.8c0 32.1 11 53.1 43.1 53.1 10 0 17.9-1.6 23.6-3.7l-5.3-34.2c-3.1.8-4.6.8-6.2.8zM379.9 251c-16.3-6.3-31-10-31-20.5 0-7.9 6.3-12.6 17.9-12.6 11.6 0 22.1 4.7 33.6 13.1l21-27.8c-13.1-10-31-20.5-55.2-20.5-35.7 0-59.9 20.5-59.9 49.4 0 25.7 22.6 38.9 41.5 46.2 16.3 6.3 32.1 11.6 32.1 22.1 0 7.9-6.3 13.1-20.5 13.1-13.1 0-26.3-5.3-40.5-16.3l-20.5 30.5c15.8 13.1 39.9 22.1 59.9 22.1 42 0 64.6-22.1 64.6-51 .1-28.9-22.5-41-43-47.8zm-155-68.8c-38.4 0-75.1 32.1-74.1 82.5 0 52 34.2 82.5 79.3 82.5 18.9 0 39.9-6.8 56.2-17.9l-15.8-27.8c-11.6 6.8-22.6 10-34.2 10-21 0-37.3-10-41.5-34.2H290c.5-3.7 1.6-11 1.6-19.4.6-42.6-22.6-75.7-66.7-75.7zm-30 66.2c3.2-21 15.8-31 30.5-31 18.9 0 26.3 13.1 26.3 31h-56.8z\"]\n};\nconst faBloggerB = {\n  prefix: 'fab',\n  iconName: 'blogger-b',\n  icon: [448, 512, [], \"f37d\", \"M446.6 222.7c-1.8-8-6.8-15.4-12.5-18.5-1.8-1-13-2.2-25-2.7-20.1-.9-22.3-1.3-28.7-5-10.1-5.9-12.8-12.3-12.9-29.5-.1-33-13.8-63.7-40.9-91.3-19.3-19.7-40.9-33-65.5-40.5-5.9-1.8-19.1-2.4-63.3-2.9-69.4-.8-84.8.6-108.4 10C45.9 59.5 14.7 96.1 3.3 142.9 1.2 151.7.7 165.8.2 246.8c-.6 101.5.1 116.4 6.4 136.5 15.6 49.6 59.9 86.3 104.4 94.3 14.8 2.7 197.3 3.3 216 .8 32.5-4.4 58-17.5 81.9-41.9 17.3-17.7 28.1-36.8 35.2-62.1 4.9-17.6 4.5-142.8 2.5-151.7zm-322.1-63.6c7.8-7.9 10-8.2 58.8-8.2 43.9 0 45.4.1 51.8 3.4 9.3 4.7 13.4 11.3 13.4 21.9 0 9.5-3.8 16.2-12.3 21.6-4.6 2.9-7.3 3.1-50.3 3.3-26.5.2-47.7-.4-50.8-1.2-16.6-4.7-22.8-28.5-10.6-40.8zm191.8 199.8l-14.9 2.4-77.5.9c-68.1.8-87.3-.4-90.9-2-7.1-3.1-13.8-11.7-14.9-19.4-1.1-7.3 2.6-17.3 8.2-22.4 7.1-6.4 10.2-6.6 97.3-6.7 89.6-.1 89.1-.1 97.6 7.8 12.1 11.3 9.5 31.2-4.9 39.4z\"]\n};\nconst faOpencart = {\n  prefix: 'fab',\n  iconName: 'opencart',\n  icon: [640, 512, [], \"f23d\", \"M423.3 440.7c0 25.3-20.3 45.6-45.6 45.6s-45.8-20.3-45.8-45.6 20.6-45.8 45.8-45.8c25.4 0 45.6 20.5 45.6 45.8zm-253.9-45.8c-25.3 0-45.6 20.6-45.6 45.8s20.3 45.6 45.6 45.6 45.8-20.3 45.8-45.6-20.5-45.8-45.8-45.8zm291.7-270C158.9 124.9 81.9 112.1 0 25.7c34.4 51.7 53.3 148.9 373.1 144.2 333.3-5 130 86.1 70.8 188.9 186.7-166.7 319.4-233.9 17.2-233.9z\"]\n};\nconst faVine = {\n  prefix: 'fab',\n  iconName: 'vine',\n  icon: [384, 512, [], \"f1ca\", \"M384 254.7v52.1c-18.4 4.2-36.9 6.1-52.1 6.1-36.9 77.4-103 143.8-125.1 156.2-14 7.9-27.1 8.4-42.7-.8C137 452 34.2 367.7 0 102.7h74.5C93.2 261.8 139 343.4 189.3 404.5c27.9-27.9 54.8-65.1 75.6-106.9-49.8-25.3-80.1-80.9-80.1-145.6 0-65.6 37.7-115.1 102.2-115.1 114.9 0 106.2 127.9 81.6 181.5 0 0-46.4 9.2-63.5-20.5 3.4-11.3 8.2-30.8 8.2-48.5 0-31.3-11.3-46.6-28.4-46.6-18.2 0-30.8 17.1-30.8 50 .1 79.2 59.4 118.7 129.9 101.9z\"]\n};\nconst faSignalMessenger = {\n  prefix: 'fab',\n  iconName: 'signal-messenger',\n  icon: [512, 512, [], \"e663\", \"M256 0c13.3 0 26.3 1 39.1 3l-3.7 23.7C279.9 24.9 268 24 256 24s-23.9 .9-35.4 2.7L216.9 3C229.7 1 242.7 0 256 0zm60.8 7.3l-5.7 23.3c23.4 5.7 45.4 14.9 65.4 27.1l12.5-20.5c-22.1-13.4-46.4-23.6-72.2-29.9zm90.5 42.2L393.1 68.8c19.1 14 36 30.9 50.1 50.1l19.4-14.2C447 83.6 428.4 65 407.3 49.5zm67.5 73.6l-20.5 12.5c12.2 20 21.4 42 27.1 65.4l23.3-5.7c-6.3-25.8-16.5-50.1-29.9-72.2zM509 216.9l-23.7 3.7c1.8 11.5 2.7 23.4 2.7 35.4s-.9 23.9-2.7 35.4l23.7 3.7c1.9-12.7 3-25.8 3-39.1s-1-26.3-3-39.1zM454.3 376.5c12.2-20 21.4-42 27.1-65.4l23.3 5.7c-6.3 25.8-16.5 50.1-29.9 72.2l-20.5-12.5zm-11.1 16.6l19.4 14.2c-15.5 21.1-34.1 39.8-55.2 55.2l-14.2-19.4c19.1-14 36-30.9 50.1-50.1zm-66.7 61.2l12.5 20.5c-22.1 13.4-46.4 23.6-72.2 29.9l-5.7-23.3c23.4-5.7 45.4-14.9 65.4-27.1zm-85.1 31l3.7 23.7c-12.7 1.9-25.8 3-39.1 3s-26.3-1-39.1-3l3.7-23.7c11.5 1.8 23.4 2.7 35.4 2.7s23.9-.9 35.4-2.7zm-90.5-3.9l-5.7 23.3c-19.4-4.7-37.9-11.6-55.3-20.5l-24.3 5.7-5.5-23.4 32.8-7.7 7.8 4c15.7 8 32.5 14.3 50.1 18.6zM90 471.3l5.5 23.4-41.6 9.7C26 510.8 1.2 486 7.6 458.2l9.7-41.6L40.7 422 31 463.7c-2.4 10.4 6.9 19.7 17.3 17.3L90 471.3zM45.5 401.8l-23.4-5.5L27.8 372C18.9 354.7 12 336.1 7.3 316.7l23.3-5.7c4.3 17.6 10.6 34.4 18.6 50.1l4 7.8-7.7 32.8zM26.7 291.4L3 295.1C1 282.3 0 269.3 0 256s1-26.3 3-39.1l23.7 3.7C24.9 232.1 24 244 24 256s.9 23.9 2.7 35.4zm3.9-90.5L7.3 195.2c6.3-25.8 16.5-50.1 29.9-72.2l20.5 12.5c-12.2 20-21.4 42-27.1 65.4zm38.3-82.1L49.5 104.7C65 83.6 83.6 65 104.7 49.5l14.2 19.4c-19.1 14-36 30.9-50.1 50.1zm66.7-61.2L123.1 37.2c22.1-13.4 46.4-23.6 72.2-29.9l5.7 23.3c-23.4 5.7-45.4 14.9-65.4 27.1zM464 256c0 114.9-93.1 208-208 208c-36.4 0-70.7-9.4-100.5-25.8c-2.9-1.6-6.2-2.1-9.4-1.4L53.6 458.4l21.6-92.5c.7-3.2 .2-6.5-1.4-9.4C57.4 326.7 48 292.4 48 256C48 141.1 141.1 48 256 48s208 93.1 208 208z\"]\n};\nconst faPaypal = {\n  prefix: 'fab',\n  iconName: 'paypal',\n  icon: [384, 512, [], \"f1ed\", \"M111.4 295.9c-3.5 19.2-17.4 108.7-21.5 134-.3 1.8-1 2.5-3 2.5H12.3c-7.6 0-13.1-6.6-12.1-13.9L58.8 46.6c1.5-9.6 10.1-16.9 20-16.9 152.3 0 165.1-3.7 204 11.4 60.1 23.3 65.6 79.5 44 140.3-21.5 62.6-72.5 89.5-140.1 90.3-43.4.7-69.5-7-75.3 24.2zM357.1 152c-1.8-1.3-2.5-1.8-3 1.3-2 11.4-5.1 22.5-8.8 33.6-39.9 113.8-150.5 103.9-204.5 103.9-6.1 0-10.1 3.3-10.9 9.4-22.6 140.4-27.1 169.7-27.1 169.7-1 7.1 3.5 12.9 10.6 12.9h63.5c8.6 0 15.7-6.3 17.4-14.9.7-5.4-1.1 6.1 14.4-91.3 4.6-22 14.3-19.7 29.3-19.7 71 0 126.4-28.8 142.9-112.3 6.5-34.8 4.6-71.4-23.8-92.6z\"]\n};\nconst faGitlab = {\n  prefix: 'fab',\n  iconName: 'gitlab',\n  icon: [512, 512, [], \"f296\", \"M503.5 204.6L502.8 202.8L433.1 21.02C431.7 17.45 429.2 14.43 425.9 12.38C423.5 10.83 420.8 9.865 417.9 9.57C415 9.275 412.2 9.653 409.5 10.68C406.8 11.7 404.4 13.34 402.4 15.46C400.5 17.58 399.1 20.13 398.3 22.9L351.3 166.9H160.8L113.7 22.9C112.9 20.13 111.5 17.59 109.6 15.47C107.6 13.35 105.2 11.72 102.5 10.7C99.86 9.675 96.98 9.295 94.12 9.587C91.26 9.878 88.51 10.83 86.08 12.38C82.84 14.43 80.33 17.45 78.92 21.02L9.267 202.8L8.543 204.6C-1.484 230.8-2.72 259.6 5.023 286.6C12.77 313.5 29.07 337.3 51.47 354.2L51.74 354.4L52.33 354.8L158.3 434.3L210.9 474L242.9 498.2C246.6 500.1 251.2 502.5 255.9 502.5C260.6 502.5 265.2 500.1 268.9 498.2L300.9 474L353.5 434.3L460.2 354.4L460.5 354.1C482.9 337.2 499.2 313.5 506.1 286.6C514.7 259.6 513.5 230.8 503.5 204.6z\"]\n};\nconst faTypo3 = {\n  prefix: 'fab',\n  iconName: 'typo3',\n  icon: [448, 512, [], \"f42b\", \"M178.7 78.4c0-24.7 5.4-32.4 13.9-39.4-69.5 8.5-149.3 34-176.3 66.4-5.4 7.7-9.3 20.8-9.3 37.1C7 246 113.8 480 191.1 480c36.3 0 97.3-59.5 146.7-139-7 2.3-11.6 2.3-18.5 2.3-57.2 0-140.6-198.5-140.6-264.9zM301.5 32c-30.1 0-41.7 5.4-41.7 36.3 0 66.4 53.8 198.5 101.7 198.5 26.3 0 78.8-99.7 78.8-182.3 0-40.9-67-52.5-138.8-52.5z\"]\n};\nconst faRedditAlien = {\n  prefix: 'fab',\n  iconName: 'reddit-alien',\n  icon: [512, 512, [], \"f281\", \"M373 138.6c-25.2 0-46.3-17.5-51.9-41l0 0c-30.6 4.3-54.2 30.7-54.2 62.4l0 .2c47.4 1.8 90.6 15.1 124.9 36.3c12.6-9.7 28.4-15.5 45.5-15.5c41.3 0 74.7 33.4 74.7 74.7c0 29.8-17.4 55.5-42.7 67.5c-2.4 86.8-97 156.6-213.2 156.6S45.5 410.1 43 323.4C17.6 311.5 0 285.7 0 255.7c0-41.3 33.4-74.7 74.7-74.7c17.2 0 33 5.8 45.7 15.6c34-21.1 76.8-34.4 123.7-36.4l0-.3c0-44.3 33.7-80.9 76.8-85.5C325.8 50.2 347.2 32 373 32c29.4 0 53.3 23.9 53.3 53.3s-23.9 53.3-53.3 53.3zM157.5 255.3c-20.9 0-38.9 20.8-40.2 47.9s17.1 38.1 38 38.1s36.6-9.8 37.8-36.9s-14.7-49.1-35.7-49.1zM395 303.1c-1.2-27.1-19.2-47.9-40.2-47.9s-36.9 22-35.7 49.1c1.2 27.1 16.9 36.9 37.8 36.9s39.3-11 38-38.1zm-60.1 70.8c1.5-3.6-1-7.7-4.9-8.1c-23-2.3-47.9-3.6-73.8-3.6s-50.8 1.3-73.8 3.6c-3.9 .4-6.4 4.5-4.9 8.1c12.9 30.8 43.3 52.4 78.7 52.4s65.8-21.6 78.7-52.4z\"]\n};\nconst faYahoo = {\n  prefix: 'fab',\n  iconName: 'yahoo',\n  icon: [512, 512, [], \"f19e\", \"M223.69,141.06,167,284.23,111,141.06H14.93L120.76,390.19,82.19,480h94.17L317.27,141.06Zm105.4,135.79a58.22,58.22,0,1,0,58.22,58.22A58.22,58.22,0,0,0,329.09,276.85ZM394.65,32l-93,223.47H406.44L499.07,32Z\"]\n};\nconst faDailymotion = {\n  prefix: 'fab',\n  iconName: 'dailymotion',\n  icon: [448, 512, [], \"e052\", \"M298.93,267a48.4,48.4,0,0,0-24.36-6.21q-19.83,0-33.44,13.27t-13.61,33.42q0,21.16,13.28,34.6t33.43,13.44q20.5,0,34.11-13.78T322,307.47A47.13,47.13,0,0,0,315.9,284,44.13,44.13,0,0,0,298.93,267ZM0,32V480H448V32ZM374.71,405.26h-53.1V381.37h-.67q-15.79,26.2-55.78,26.2-27.56,0-48.89-13.1a88.29,88.29,0,0,1-32.94-35.77q-11.6-22.68-11.59-50.89,0-27.56,11.76-50.22a89.9,89.9,0,0,1,32.93-35.78q21.18-13.09,47.72-13.1a80.87,80.87,0,0,1,29.74,5.21q13.28,5.21,25,17V153l55.79-12.09Z\"]\n};\nconst faAffiliatetheme = {\n  prefix: 'fab',\n  iconName: 'affiliatetheme',\n  icon: [512, 512, [], \"f36b\", \"M159.7 237.4C108.4 308.3 43.1 348.2 14 326.6-15.2 304.9 2.8 230 54.2 159.1c51.3-70.9 116.6-110.8 145.7-89.2 29.1 21.6 11.1 96.6-40.2 167.5zm351.2-57.3C437.1 303.5 319 367.8 246.4 323.7c-25-15.2-41.3-41.2-49-73.8-33.6 64.8-92.8 113.8-164.1 133.2 49.8 59.3 124.1 96.9 207 96.9 150 0 271.6-123.1 271.6-274.9.1-8.5-.3-16.8-1-25z\"]\n};\nconst faPiedPiperPp = {\n  prefix: 'fab',\n  iconName: 'pied-piper-pp',\n  icon: [448, 512, [], \"f1a7\", \"M205.3 174.6c0 21.1-14.2 38.1-31.7 38.1-7.1 0-12.8-1.2-17.2-3.7v-68c4.4-2.7 10.1-4.2 17.2-4.2 17.5 0 31.7 16.9 31.7 37.8zm52.6 67c-7.1 0-12.8 1.5-17.2 4.2v68c4.4 2.5 10.1 3.7 17.2 3.7 17.4 0 31.7-16.9 31.7-37.8 0-21.1-14.3-38.1-31.7-38.1zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM185 255.1c41 0 74.2-35.6 74.2-79.6 0-44-33.2-79.6-74.2-79.6-12 0-24.1 3.2-34.6 8.8h-45.7V311l51.8-10.1v-50.6c8.6 3.1 18.1 4.8 28.5 4.8zm158.4 25.3c0-44-33.2-79.6-73.9-79.6-3.2 0-6.4.2-9.6.7-3.7 12.5-10.1 23.8-19.2 33.4-13.8 15-32.2 23.8-51.8 24.8V416l51.8-10.1v-50.6c8.6 3.2 18.2 4.7 28.7 4.7 40.8 0 74-35.6 74-79.6z\"]\n};\nconst faBootstrap = {\n  prefix: 'fab',\n  iconName: 'bootstrap',\n  icon: [576, 512, [], \"f836\", \"M333.5,201.4c0-22.1-15.6-34.3-43-34.3h-50.4v71.2h42.5C315.4,238.2,333.5,225,333.5,201.4z M517,188.6 c-9.5-30.9-10.9-68.8-9.8-98.1c1.1-30.5-22.7-58.5-54.7-58.5H123.7c-32.1,0-55.8,28.1-54.7,58.5c1,29.3-0.3,67.2-9.8,98.1 c-9.6,31-25.7,50.6-52.2,53.1v28.5c26.4,2.5,42.6,22.1,52.2,53.1c9.5,30.9,10.9,68.8,9.8,98.1c-1.1,30.5,22.7,58.5,54.7,58.5h328.7 c32.1,0,55.8-28.1,54.7-58.5c-1-29.3,0.3-67.2,9.8-98.1c9.6-31,25.7-50.6,52.1-53.1v-28.5C542.7,239.2,526.5,219.6,517,188.6z M300.2,375.1h-97.9V136.8h97.4c43.3,0,71.7,23.4,71.7,59.4c0,25.3-19.1,47.9-43.5,51.8v1.3c33.2,3.6,55.5,26.6,55.5,58.3 C383.4,349.7,352.1,375.1,300.2,375.1z M290.2,266.4h-50.1v78.4h52.3c34.2,0,52.3-13.7,52.3-39.5 C344.7,279.6,326.1,266.4,290.2,266.4z\"]\n};\nconst faOdnoklassniki = {\n  prefix: 'fab',\n  iconName: 'odnoklassniki',\n  icon: [320, 512, [], \"f263\", \"M275.1 334c-27.4 17.4-65.1 24.3-90 26.9l20.9 20.6 76.3 76.3c27.9 28.6-17.5 73.3-45.7 45.7-19.1-19.4-47.1-47.4-76.3-76.6L84 503.4c-28.2 27.5-73.6-17.6-45.4-45.7 19.4-19.4 47.1-47.4 76.3-76.3l20.6-20.6c-24.6-2.6-62.9-9.1-90.6-26.9-32.6-21-46.9-33.3-34.3-59 7.4-14.6 27.7-26.9 54.6-5.7 0 0 36.3 28.9 94.9 28.9s94.9-28.9 94.9-28.9c26.9-21.1 47.1-8.9 54.6 5.7 12.4 25.7-1.9 38-34.5 59.1zM30.3 129.7C30.3 58 88.6 0 160 0s129.7 58 129.7 129.7c0 71.4-58.3 129.4-129.7 129.4s-129.7-58-129.7-129.4zm66 0c0 35.1 28.6 63.7 63.7 63.7s63.7-28.6 63.7-63.7c0-35.4-28.6-64-63.7-64s-63.7 28.6-63.7 64z\"]\n};\nconst faNfcSymbol = {\n  prefix: 'fab',\n  iconName: 'nfc-symbol',\n  icon: [576, 512, [], \"e531\", \"M392.9 32.43C400.6 31.1 408.6 32.89 414.1 37.41C498.2 96.14 544 173.7 544 255.1C544 338.2 498.2 415.9 414.1 474.6C409.3 478.6 402.4 480.5 395.5 479.9C388.5 479.3 382 476.3 377.1 471.4L193.7 288.7C188.1 283.2 185 275.7 184.1 267.8C184.1 260 188.1 252.5 193.6 246.9C199.2 241.4 206.7 238.2 214.5 238.2C222.4 238.2 229.9 241.3 235.4 246.8L400.5 411.2C455.1 366.5 484.8 312 484.8 255.1C484.8 193.5 447.9 132.9 380.9 85.76C374.5 81.24 370.1 74.35 368.8 66.62C367.4 58.89 369.2 50.94 373.8 44.53C378.3 38.12 385.2 33.77 392.9 32.43V32.43zM186.9 479.6C179.2 480.9 171.3 479.1 164.8 474.6C81.67 415.9 35.84 338.2 35.84 255.1C35.84 173.7 81.67 96.14 164.8 37.41C170.5 33.4 177.4 31.53 184.4 32.12C191.3 32.71 197.8 35.72 202.7 40.63L386.1 223.3C391.7 228.8 394.8 236.3 394.8 244.2C394.9 251.1 391.8 259.5 386.2 265.1C380.7 270.6 373.2 273.8 365.3 273.8C357.5 273.8 349.1 270.7 344.4 265.2L179.3 100.7C124.7 145.9 95.03 199.9 95.03 255.1C95.03 318.5 131.9 379.1 198.1 426.2C205.4 430.8 209.7 437.6 211.1 445.4C212.4 453.1 210.6 461.1 206.1 467.5C201.6 473.9 194.7 478.2 186.9 479.6V479.6z\"]\n};\nconst faMintbit = {\n  prefix: 'fab',\n  iconName: 'mintbit',\n  icon: [512, 512, [], \"e62f\", \"M73.2 512V438.9H365.7V365.7h73.2V219.4H512V0H292.6V73.1H146.3v73.2H73.2V438.9H0V512H73.2zm73.1-219.4h73.2v73.1H146.3V292.6zm73.2-73.1h73.1v73.1H219.4V219.4zm73.1 0V146.3h73.2v73.1H292.6zM365.7 73.1h73.2v73.2H365.7V73.1z\"]\n};\nconst faEthereum = {\n  prefix: 'fab',\n  iconName: 'ethereum',\n  icon: [320, 512, [], \"f42e\", \"M311.9 260.8L160 353.6 8 260.8 160 0l151.9 260.8zM160 383.4L8 290.6 160 512l152-221.4-152 92.8z\"]\n};\nconst faSpeakerDeck = {\n  prefix: 'fab',\n  iconName: 'speaker-deck',\n  icon: [512, 512, [], \"f83c\", \"M213.86 296H100a100 100 0 0 1 0-200h132.84a40 40 0 0 1 0 80H98c-26.47 0-26.45 40 0 40h113.82a100 100 0 0 1 0 200H40a40 40 0 0 1 0-80h173.86c26.48 0 26.46-40 0-40zM298 416a120.21 120.21 0 0 0 51.11-80h64.55a19.83 19.83 0 0 0 19.66-20V196a19.83 19.83 0 0 0-19.66-20H296.42a60.77 60.77 0 0 0 0-80h136.93c43.44 0 78.65 35.82 78.65 80v160c0 44.18-35.21 80-78.65 80z\"]\n};\nconst faCreativeCommonsNcEu = {\n  prefix: 'fab',\n  iconName: 'creative-commons-nc-eu',\n  icon: [496, 512, [], \"f4e9\", \"M247.7 8C103.6 8 0 124.8 0 256c0 136.3 111.7 248 247.7 248C377.9 504 496 403.1 496 256 496 117 388.4 8 247.7 8zm.6 450.7c-112 0-203.6-92.5-203.6-202.7 0-23.2 3.7-45.2 10.9-66l65.7 29.1h-4.7v29.5h23.3c0 6.2-.4 3.2-.4 19.5h-22.8v29.5h27c11.4 67 67.2 101.3 124.6 101.3 26.6 0 50.6-7.9 64.8-15.8l-10-46.1c-8.7 4.6-28.2 10.8-47.3 10.8-28.2 0-58.1-10.9-67.3-50.2h90.3l128.3 56.8c-1.5 2.1-56.2 104.3-178.8 104.3zm-16.7-190.6l-.5-.4.9.4h-.4zm77.2-19.5h3.7v-29.5h-70.3l-28.6-12.6c2.5-5.5 5.4-10.5 8.8-14.3 12.9-15.8 31.1-22.4 51.1-22.4 18.3 0 35.3 5.4 46.1 10l11.6-47.3c-15-6.6-37-12.4-62.3-12.4-39 0-72.2 15.8-95.9 42.3-5.3 6.1-9.8 12.9-13.9 20.1l-81.6-36.1c64.6-96.8 157.7-93.6 170.7-93.6 113 0 203 90.2 203 203.4 0 18.7-2.1 36.3-6.3 52.9l-136.1-60.5z\"]\n};\nconst faPatreon = {\n  prefix: 'fab',\n  iconName: 'patreon',\n  icon: [512, 512, [], \"f3d9\", \"M489.7 153.8c-.1-65.4-51-119-110.7-138.3C304.8-8.5 207-5 136.1 28.4C50.3 68.9 23.3 157.7 22.3 246.2C21.5 319 28.7 510.6 136.9 512c80.3 1 92.3-102.5 129.5-152.3c26.4-35.5 60.5-45.5 102.4-55.9c72-17.8 121.1-74.7 121-150z\"]\n};\nconst faAvianex = {\n  prefix: 'fab',\n  iconName: 'avianex',\n  icon: [512, 512, [], \"f374\", \"M453.1 32h-312c-38.9 0-76.2 31.2-83.3 69.7L1.2 410.3C-5.9 448.8 19.9 480 58.9 480h312c38.9 0 76.2-31.2 83.3-69.7l56.7-308.5c7-38.6-18.8-69.8-57.8-69.8zm-58.2 347.3l-32 13.5-115.4-110c-14.7 10-29.2 19.5-41.7 27.1l22.1 64.2-17.9 12.7-40.6-61-52.4-48.1 15.7-15.4 58 31.1c9.3-10.5 20.8-22.6 32.8-34.9L203 228.9l-68.8-99.8 18.8-28.9 8.9-4.8L265 207.8l4.9 4.5c19.4-18.8 33.8-32.4 33.8-32.4 7.7-6.5 21.5-2.9 30.7 7.9 9 10.5 10.6 24.7 2.7 31.3-1.8 1.3-15.5 11.4-35.3 25.6l4.5 7.3 94.9 119.4-6.3 7.9z\"]\n};\nconst faEllo = {\n  prefix: 'fab',\n  iconName: 'ello',\n  icon: [496, 512, [], \"f5f1\", \"M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm143.84 285.2C375.31 358.51 315.79 404.8 248 404.8s-127.31-46.29-143.84-111.6c-1.65-7.44 2.48-15.71 9.92-17.36 7.44-1.65 15.71 2.48 17.36 9.92 14.05 52.91 62 90.11 116.56 90.11s102.51-37.2 116.56-90.11c1.65-7.44 9.92-12.4 17.36-9.92 7.44 1.65 12.4 9.92 9.92 17.36z\"]\n};\nconst faGofore = {\n  prefix: 'fab',\n  iconName: 'gofore',\n  icon: [400, 512, [], \"f3a7\", \"M324 319.8h-13.2v34.7c-24.5 23.1-56.3 35.8-89.9 35.8-73.2 0-132.4-60.2-132.4-134.4 0-74.1 59.2-134.4 132.4-134.4 35.3 0 68.6 14 93.6 39.4l62.3-63.3C335 55.3 279.7 32 220.7 32 98 32 0 132.6 0 256c0 122.5 97 224 220.7 224 63.2 0 124.5-26.2 171-82.5-2-27.6-13.4-77.7-67.7-77.7zm-12.1-112.5H205.6v89H324c33.5 0 60.5 15.1 76 41.8v-30.6c0-65.2-40.4-100.2-88.1-100.2z\"]\n};\nconst faBimobject = {\n  prefix: 'fab',\n  iconName: 'bimobject',\n  icon: [448, 512, [], \"f378\", \"M416 32H32C14.4 32 0 46.4 0 64v384c0 17.6 14.4 32 32 32h384c17.6 0 32-14.4 32-32V64c0-17.6-14.4-32-32-32zm-64 257.4c0 49.4-11.4 82.6-103.8 82.6h-16.9c-44.1 0-62.4-14.9-70.4-38.8h-.9V368H96V136h64v74.7h1.1c4.6-30.5 39.7-38.8 69.7-38.8h17.3c92.4 0 103.8 33.1 103.8 82.5v35zm-64-28.9v22.9c0 21.7-3.4 33.8-38.4 33.8h-45.3c-28.9 0-44.1-6.5-44.1-35.7v-19c0-29.3 15.2-35.7 44.1-35.7h45.3c35-.2 38.4 12 38.4 33.7z\"]\n};\nconst faBraveReverse = {\n  prefix: 'fab',\n  iconName: 'brave-reverse',\n  icon: [448, 512, [], \"e63d\", \"M298 0c3 0 5.8 1.3 7.8 3.6l38.1 44c.5-.1 1-.2 1.5-.3c9.2-1.6 18.6-2.2 27.7-1.2c11.6 1.4 21.5 5.4 28.9 12.9c7.7 7.8 15.4 15.8 22.6 23.6c2.5 2.7 4.9 5.2 6.9 7.4c.7 .8 1.4 1.5 1.9 2c3.4 3.7 4.2 8.1 2.7 11.9l-9.8 24.6 13.1 38.1c.7 2 .8 4.1 .2 6.2c-.1 .4-.1 .4-.5 2.1c-.6 2.3-.6 2.3-1.5 5.8c-1.6 6.3-3.5 13.3-5.4 20.9c-5.6 21.6-11.2 43.2-16.4 63.4c-12.9 49.9-21.4 82.7-23.4 90.9c-11.1 44.5-19.9 60-48.3 80.3c-24.9 17.8-76.8 53.6-86.8 60c-1 .6-2 1.3-3.4 2.3c-.5 .4-3.2 2.2-3.9 2.7c-4.9 3.3-8.3 5.5-12.1 7.3c-4.7 2.2-9.3 3.5-13.9 3.5s-9.1-1.2-13.9-3.5c-3.7-1.8-7.2-3.9-12.1-7.3c-.8-.5-3.4-2.4-3.9-2.7c-1.4-1-2.5-1.7-3.4-2.3c-10-6.4-61.9-42.1-86.8-60c-28.4-20.4-37.2-35.8-48.3-80.3c-2-8.2-10.5-41-23.3-90.5c-5.3-20.6-10.9-42.2-16.5-63.8c-2-7.6-3.8-14.6-5.4-20.9c-.9-3.5-.9-3.5-1.5-5.8c-.4-1.7-.4-1.7-.5-2.1c-.5-2-.4-4.2 .2-6.2l13.1-38.1L11.8 104c-1.5-3.8-.7-8.2 2-11.2c1.2-1.3 1.8-2 2.6-2.8c2-2.2 4.4-4.7 6.9-7.4C30.6 74.9 38.3 66.9 46 59.1c7.4-7.5 17.3-11.6 28.9-12.9c9.1-1.1 18.5-.5 27.7 1.2c.5 .1 1 .2 1.5 .3l38.1-44C144.2 1.3 147 0 150 0H298zm-4.7 21.1H154.7L115.6 66.2c-2.6 3-6.7 4.3-10.6 3.2c-.2-.1-.7-.2-1.5-.4c-1.3-.3-2.9-.6-4.5-.9c-7.4-1.3-14.9-1.8-21.7-1C70 68 64.3 70.3 60.7 74c-7.6 7.7-15.2 15.6-22.3 23.3c-1.7 1.8-3.3 3.5-4.8 5.1l8.8 22c1 2.4 1 5 .2 7.5L29.2 170.6c.4 1.4 .5 1.9 1.2 4.8c1.6 6.3 3.5 13.3 5.4 20.9c5.6 21.6 11.2 43.2 16.4 63.4c12.9 50 21.4 82.8 23.4 91C85.7 390.8 92 402 115.8 419c24.6 17.6 76.3 53.2 85.9 59.3c1.2 .8 2.5 1.6 4 2.7c.6 .4 3.2 2.2 3.9 2.7c4 2.8 6.7 4.4 9.2 5.6c2.2 1 3.9 1.5 5.1 1.5s2.9-.5 5.1-1.5c2.5-1.2 5.2-2.8 9.2-5.6c.7-.5 3.3-2.3 3.9-2.7c1.6-1.1 2.8-1.9 4-2.7c9.6-6.1 61.3-41.7 85.9-59.3c23.8-17.1 30.2-28.2 40.1-68.3c2.1-8.3 10.5-41.1 23.3-90.7c5.3-20.6 10.9-42.2 16.5-63.8c2-7.6 3.8-14.6 5.4-20.9c.7-2.9 .9-3.4 1.2-4.8l-13.3-38.8c-.8-2.4-.8-5.1 .2-7.5l8.8-22c-1.5-1.6-3.1-3.3-4.8-5.1c-7.2-7.6-14.7-15.5-22.3-23.3c-3.7-3.7-9.3-6-16.6-6.9c-6.8-.8-14.4-.3-21.7 1c-1.7 .3-3.2 .6-4.5 .9c-.8 .2-1.3 .3-1.5 .4c-3.8 1.1-7.9-.2-10.6-3.2L293.3 21.1zM224 316c2.8 0 20.9 6.5 35.4 14.1s25 13 28.3 15.2s1.3 6.2-1.7 8.4s-44.1 34.6-48.1 38.2s-9.8 9.5-13.8 9.5s-9.8-5.9-13.8-9.5s-45.1-36-48.1-38.2s-5.1-6.2-1.7-8.4s13.9-7.5 28.3-15.2s32.5-14.1 35.4-14.1zm.1-230.7c.7 0 8.8 .2 20.5 4.2c12.3 4.2 25.7 9.4 31.9 9.4s51.9-8.9 51.9-8.9s54.2 66.7 54.2 81s-6.8 18-13.7 25.4s-36.8 39.8-40.7 43.9s-11.9 10.5-7.1 21.8s11.7 25.8 3.9 40.4s-21 24.4-29.4 22.8s-28.4-12.2-35.7-17.1s-30.5-24.3-30.5-31.8s24-20.8 28.4-23.9s24.7-14.8 25.1-19.4s.3-6-5.7-17.4s-16.7-26.7-14.9-36.8s19.1-15.4 31.5-20.2s36.2-13.7 39.2-15.1s2.2-2.7-6.8-3.6s-34.6-4.3-46.1-1.1s-31.2 8.2-32.8 10.9s-3 2.7-1.4 11.8s10.1 52.8 10.9 60.6s2.4 12.9-5.8 14.8s-22.1 5.2-26.8 5.2s-18.6-3.3-26.8-5.2s-6.6-7-5.8-14.8s9.3-51.5 10.9-60.6s.2-9.2-1.4-11.8s-21.3-7.6-32.8-10.9s-37.1 .2-46.1 1.1s-9.8 2.2-6.8 3.6s26.8 10.4 39.2 15.1s29.7 10 31.5 20.2s-9 25.4-14.9 36.8s-6.1 12.8-5.7 17.4s20.6 16.4 25.1 19.4s28.4 16.4 28.4 23.9s-23.2 27-30.5 31.8s-27.2 15.4-35.7 17.1s-21.7-8.2-29.4-22.8s-.8-29.1 3.9-40.4s-3.3-17.7-7.1-21.8s-33.8-36.5-40.7-43.9s-13.7-11.2-13.7-25.4s54.2-81 54.2-81s45.8 8.9 51.9 8.9s19.5-5.2 31.9-9.4s20.6-4.2 20.6-4.2l.1 0z\"]\n};\nconst faFacebookF = {\n  prefix: 'fab',\n  iconName: 'facebook-f',\n  icon: [320, 512, [], \"f39e\", \"M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z\"]\n};\nconst faSquareGooglePlus = {\n  prefix: 'fab',\n  iconName: 'square-google-plus',\n  icon: [448, 512, [\"google-plus-square\"], \"f0d4\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM64 256c0-55.3 44.7-100 100-100c27 0 49.5 9.8 67 26.2l-27.1 26.1c-7.4-7.1-20.3-15.4-39.8-15.4c-34.1 0-61.9 28.2-61.9 63.2c0 34.9 27.8 63.2 61.9 63.2c39.6 0 54.4-28.5 56.8-43.1H164V241.8h94.4c1 5 1.6 10.1 1.6 16.6c0 57.1-38.3 97.6-96 97.6c-55.3 0-100-44.7-100-100zm291 18.2v29H325.8v-29h-29V245h29V216H355v29h29v29.2H355z\"]\n};\nconst faGooglePlusSquare = faSquareGooglePlus;\nconst faWebAwesome = {\n  prefix: 'fab',\n  iconName: 'web-awesome',\n  icon: [640, 512, [], \"e682\", \"M372.2 52c0 20.9-12.4 39-30.2 47.2L448 192l104.4-20.9c-5.3-7.7-8.4-17.1-8.4-27.1c0-26.5 21.5-48 48-48s48 21.5 48 48c0 26-20.6 47.1-46.4 48L481 442.3c-10.3 23-33.2 37.7-58.4 37.7l-205.2 0c-25.2 0-48-14.8-58.4-37.7L46.4 192C20.6 191.1 0 170 0 144c0-26.5 21.5-48 48-48s48 21.5 48 48c0 10.1-3.1 19.4-8.4 27.1L192 192 298.1 99.1c-17.7-8.3-30-26.3-30-47.1c0-28.7 23.3-52 52-52s52 23.3 52 52z\"]\n};\nconst faMandalorian = {\n  prefix: 'fab',\n  iconName: 'mandalorian',\n  icon: [448, 512, [], \"f50f\", \"M232.27 511.89c-1-3.26-1.69-15.83-1.39-24.58.55-15.89 1-24.72 1.4-28.76.64-6.2 2.87-20.72 3.28-21.38.6-1 .4-27.87-.24-33.13-.31-2.58-.63-11.9-.69-20.73-.13-16.47-.53-20.12-2.73-24.76-1.1-2.32-1.23-3.84-1-11.43a92.38 92.38 0 0 0-.34-12.71c-2-13-3.46-27.7-3.25-33.9s.43-7.15 2.06-9.67c3.05-4.71 6.51-14 8.62-23.27 2.26-9.86 3.88-17.18 4.59-20.74a109.54 109.54 0 0 1 4.42-15.05c2.27-6.25 2.49-15.39.37-15.39-.3 0-1.38 1.22-2.41 2.71s-4.76 4.8-8.29 7.36c-8.37 6.08-11.7 9.39-12.66 12.58s-1 7.23-.16 7.76c.34.21 1.29 2.4 2.11 4.88a28.83 28.83 0 0 1 .72 15.36c-.39 1.77-1 5.47-1.46 8.23s-1 6.46-1.25 8.22a9.85 9.85 0 0 1-1.55 4.26c-1 1-1.14.91-2.05-.53a14.87 14.87 0 0 1-1.44-4.75c-.25-1.74-1.63-7.11-3.08-11.93-3.28-10.9-3.52-16.15-1-21a14.24 14.24 0 0 0 1.67-4.61c0-2.39-2.2-5.32-7.41-9.89-7-6.18-8.63-7.92-10.23-11.3-1.71-3.6-3.06-4.06-4.54-1.54-1.78 3-2.6 9.11-3 22l-.34 12.19 2 2.25c3.21 3.7 12.07 16.45 13.78 19.83 3.41 6.74 4.34 11.69 4.41 23.56s.95 22.75 2 24.71c.36.66.51 1.35.34 1.52s.41 2.09 1.29 4.27a38.14 38.14 0 0 1 2.06 9 91 91 0 0 0 1.71 10.37c2.23 9.56 2.77 14.08 2.39 20.14-.2 3.27-.53 11.07-.73 17.32-1.31 41.76-1.85 58-2 61.21-.12 2-.39 11.51-.6 21.07-.36 16.3-1.3 27.37-2.42 28.65-.64.73-8.07-4.91-12.52-9.49-3.75-3.87-4-4.79-2.83-9.95.7-3 2.26-18.29 3.33-32.62.36-4.78.81-10.5 1-12.71.83-9.37 1.66-20.35 2.61-34.78.56-8.46 1.33-16.44 1.72-17.73s.89-9.89 1.13-19.11l.43-16.77-2.26-4.3c-1.72-3.28-4.87-6.94-13.22-15.34-6-6.07-11.84-12.3-12.91-13.85l-1.95-2.81.75-10.9c1.09-15.71 1.1-48.57 0-59.06l-.89-8.7-3.28-4.52c-5.86-8.08-5.8-7.75-6.22-33.27-.1-6.07-.38-11.5-.63-12.06-.83-1.87-3.05-2.66-8.54-3.05-8.86-.62-11-1.9-23.85-14.55-6.15-6-12.34-12-13.75-13.19-2.81-2.42-2.79-2-.56-9.63l1.35-4.65-1.69-3a32.22 32.22 0 0 0-2.59-4.07c-1.33-1.51-5.5-10.89-6-13.49a4.24 4.24 0 0 1 .87-3.9c2.23-2.86 3.4-5.68 4.45-10.73 2.33-11.19 7.74-26.09 10.6-29.22 3.18-3.47 7.7-1 9.41 5 1.34 4.79 1.37 9.79.1 18.55a101.2 101.2 0 0 0-1 11.11c0 4 .19 4.69 2.25 7.39 3.33 4.37 7.73 7.41 15.2 10.52a18.67 18.67 0 0 1 4.72 2.85c11.17 10.72 18.62 16.18 22.95 16.85 5.18.8 8 4.54 10 13.39 1.31 5.65 4 11.14 5.46 11.14a9.38 9.38 0 0 0 3.33-1.39c2-1.22 2.25-1.73 2.25-4.18a132.88 132.88 0 0 0-2-17.84c-.37-1.66-.78-4.06-.93-5.35s-.61-3.85-1-5.69c-2.55-11.16-3.65-15.46-4.1-16-1.55-2-4.08-10.2-4.93-15.92-1.64-11.11-4-14.23-12.91-17.39A43.15 43.15 0 0 1 165.24 78c-1.15-1-4-3.22-6.35-5.06s-4.41-3.53-4.6-3.76a22.7 22.7 0 0 0-2.69-2c-6.24-4.22-8.84-7-11.26-12l-2.44-5-.22-13-.22-13 6.91-6.55c3.95-3.75 8.48-7.35 10.59-8.43 3.31-1.69 4.45-1.89 11.37-2 8.53-.19 10.12 0 11.66 1.56s1.36 6.4-.29 8.5a6.66 6.66 0 0 0-1.34 2.32c0 .58-2.61 4.91-5.42 9a30.39 30.39 0 0 0-2.37 6.82c20.44 13.39 21.55 3.77 14.07 29L194 66.92c3.11-8.66 6.47-17.26 8.61-26.22.29-7.63-12-4.19-15.4-8.68-2.33-5.93 3.13-14.18 6.06-19.2 1.6-2.34 6.62-4.7 8.82-4.15.88.22 4.16-.35 7.37-1.28a45.3 45.3 0 0 1 7.55-1.68 29.57 29.57 0 0 0 6-1.29c3.65-1.11 4.5-1.17 6.35-.4a29.54 29.54 0 0 0 5.82 1.36 18.18 18.18 0 0 1 6 1.91 22.67 22.67 0 0 0 5 2.17c2.51.68 3 .57 7.05-1.67l4.35-2.4L268.32 5c10.44-.4 10.81-.47 15.26-2.68L288.16 0l2.46 1.43c1.76 1 3.14 2.73 4.85 6 2.36 4.51 2.38 4.58 1.37 7.37-.88 2.44-.89 3.3-.1 6.39a35.76 35.76 0 0 0 2.1 5.91 13.55 13.55 0 0 1 1.31 4c.31 4.33 0 5.3-2.41 6.92-2.17 1.47-7 7.91-7 9.34a14.77 14.77 0 0 1-1.07 3c-5 11.51-6.76 13.56-14.26 17-9.2 4.2-12.3 5.19-16.21 5.19-3.1 0-4 .25-4.54 1.26a18.33 18.33 0 0 1-4.09 3.71 13.62 13.62 0 0 0-4.38 4.78 5.89 5.89 0 0 1-2.49 2.91 6.88 6.88 0 0 0-2.45 1.71 67.62 67.62 0 0 1-7 5.38c-3.33 2.34-6.87 5-7.87 6A7.27 7.27 0 0 1 224 100a5.76 5.76 0 0 0-2.13 1.65c-1.31 1.39-1.49 2.11-1.14 4.6a36.45 36.45 0 0 0 1.42 5.88c1.32 3.8 1.31 7.86 0 10.57s-.89 6.65 1.35 9.59c2 2.63 2.16 4.56.71 8.84a33.45 33.45 0 0 0-1.06 8.91c0 4.88.22 6.28 1.46 8.38s1.82 2.48 3.24 2.32c2-.23 2.3-1.05 4.71-12.12 2.18-10 3.71-11.92 13.76-17.08 2.94-1.51 7.46-4 10-5.44s6.79-3.69 9.37-4.91a40.09 40.09 0 0 0 15.22-11.67c7.11-8.79 10-16.22 12.85-33.3a18.37 18.37 0 0 1 2.86-7.73 20.39 20.39 0 0 0 2.89-7.31c1-5.3 2.85-9.08 5.58-11.51 4.7-4.18 6-1.09 4.59 10.87-.46 3.86-1.1 10.33-1.44 14.38l-.61 7.36 4.45 4.09 4.45 4.09.11 8.42c.06 4.63.47 9.53.92 10.89l.82 2.47-6.43 6.28c-8.54 8.33-12.88 13.93-16.76 21.61-1.77 3.49-3.74 7.11-4.38 8-2.18 3.11-6.46 13-8.76 20.26l-2.29 7.22-7 6.49c-3.83 3.57-8 7.25-9.17 8.17-3.05 2.32-4.26 5.15-4.26 10a14.62 14.62 0 0 0 1.59 7.26 42 42 0 0 1 2.09 4.83 9.28 9.28 0 0 0 1.57 2.89c1.4 1.59 1.92 16.12.83 23.22-.68 4.48-3.63 12-4.7 12-1.79 0-4.06 9.27-5.07 20.74-.18 2-.62 5.94-1 8.7s-1 10-1.35 16.05c-.77 12.22-.19 18.77 2 23.15 3.41 6.69.52 12.69-11 22.84l-4 3.49.07 5.19a40.81 40.81 0 0 0 1.14 8.87c4.61 16 4.73 16.92 4.38 37.13-.46 26.4-.26 40.27.63 44.15a61.31 61.31 0 0 1 1.08 7c.17 2 .66 5.33 1.08 7.36.47 2.26.78 11 .79 22.74v19.06l-1.81 2.63c-2.71 3.91-15.11 13.54-15.49 12.29zm29.53-45.11c-.18-.3-.33-6.87-.33-14.59 0-14.06-.89-27.54-2.26-34.45-.4-2-.81-9.7-.9-17.06-.15-11.93-1.4-24.37-2.64-26.38-.66-1.07-3-17.66-3-21.3 0-4.23 1-6 5.28-9.13s4.86-3.14 5.48-.72c.28 1.1 1.45 5.62 2.6 10 3.93 15.12 4.14 16.27 4.05 21.74-.1 5.78-.13 6.13-1.74 17.73-1 7.07-1.17 12.39-1 28.43.17 19.4-.64 35.73-2 41.27-.71 2.78-2.8 5.48-3.43 4.43zm-71-37.58a101 101 0 0 1-1.73-10.79 100.5 100.5 0 0 0-1.73-10.79 37.53 37.53 0 0 1-1-6.49c-.31-3.19-.91-7.46-1.33-9.48-1-4.79-3.35-19.35-3.42-21.07 0-.74-.34-4.05-.7-7.36-.67-6.21-.84-27.67-.22-28.29 1-1 6.63 2.76 11.33 7.43l5.28 5.25-.45 6.47c-.25 3.56-.6 10.23-.78 14.83s-.49 9.87-.67 11.71-.61 9.36-.94 16.72c-.79 17.41-1.94 31.29-2.65 32a.62.62 0 0 1-1-.14zm-87.18-266.59c21.07 12.79 17.84 14.15 28.49 17.66 13 4.29 18.87 7.13 23.15 16.87C111.6 233.28 86.25 255 78.55 268c-31 52-6 101.59 62.75 87.21-14.18 29.23-78 28.63-98.68-4.9-24.68-39.95-22.09-118.3 61-187.66zm210.79 179c56.66 6.88 82.32-37.74 46.54-89.23 0 0-26.87-29.34-64.28-68 3-15.45 9.49-32.12 30.57-53.82 89.2 63.51 92 141.61 92.46 149.36 4.3 70.64-78.7 91.18-105.29 61.71z\"]\n};\nconst faFirstOrderAlt = {\n  prefix: 'fab',\n  iconName: 'first-order-alt',\n  icon: [496, 512, [], \"f50a\", \"M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 488.21C115.34 496.21 7.79 388.66 7.79 256S115.34 15.79 248 15.79 488.21 123.34 488.21 256 380.66 496.21 248 496.21zm0-459.92C126.66 36.29 28.29 134.66 28.29 256S126.66 475.71 248 475.71 467.71 377.34 467.71 256 369.34 36.29 248 36.29zm0 431.22c-116.81 0-211.51-94.69-211.51-211.51S131.19 44.49 248 44.49 459.51 139.19 459.51 256 364.81 467.51 248 467.51zm186.23-162.98a191.613 191.613 0 0 1-20.13 48.69l-74.13-35.88 61.48 54.82a193.515 193.515 0 0 1-37.2 37.29l-54.8-61.57 35.88 74.27a190.944 190.944 0 0 1-48.63 20.23l-27.29-78.47 4.79 82.93c-8.61 1.18-17.4 1.8-26.33 1.8s-17.72-.62-26.33-1.8l4.76-82.46-27.15 78.03a191.365 191.365 0 0 1-48.65-20.2l35.93-74.34-54.87 61.64a193.85 193.85 0 0 1-37.22-37.28l61.59-54.9-74.26 35.93a191.638 191.638 0 0 1-20.14-48.69l77.84-27.11-82.23 4.76c-1.16-8.57-1.78-17.32-1.78-26.21 0-9 .63-17.84 1.82-26.51l82.38 4.77-77.94-27.16a191.726 191.726 0 0 1 20.23-48.67l74.22 35.92-61.52-54.86a193.85 193.85 0 0 1 37.28-37.22l54.76 61.53-35.83-74.17a191.49 191.49 0 0 1 48.65-20.13l26.87 77.25-4.71-81.61c8.61-1.18 17.39-1.8 26.32-1.8s17.71.62 26.32 1.8l-4.74 82.16 27.05-77.76c17.27 4.5 33.6 11.35 48.63 20.17l-35.82 74.12 54.72-61.47a193.13 193.13 0 0 1 37.24 37.23l-61.45 54.77 74.12-35.86a191.515 191.515 0 0 1 20.2 48.65l-77.81 27.1 82.24-4.75c1.19 8.66 1.82 17.5 1.82 26.49 0 8.88-.61 17.63-1.78 26.19l-82.12-4.75 77.72 27.09z\"]\n};\nconst faOsi = {\n  prefix: 'fab',\n  iconName: 'osi',\n  icon: [512, 512, [], \"f41a\", \"M8 266.44C10.3 130.64 105.4 34 221.8 18.34c138.8-18.6 255.6 75.8 278 201.1 21.3 118.8-44 230-151.6 274-9.3 3.8-14.4 1.7-18-7.7q-26.7-69.45-53.4-139c-3.1-8.1-1-13.2 7-16.8 24.2-11 39.3-29.4 43.3-55.8a71.47 71.47 0 0 0-64.5-82.2c-39-3.4-71.8 23.7-77.5 59.7-5.2 33 11.1 63.7 41.9 77.7 9.6 4.4 11.5 8.6 7.8 18.4q-26.85 69.9-53.7 139.9c-2.6 6.9-8.3 9.3-15.5 6.5-52.6-20.3-101.4-61-130.8-119-24.9-49.2-25.2-87.7-26.8-108.7zm20.9-1.9c.4 6.6.6 14.3 1.3 22.1 6.3 71.9 49.6 143.5 131 183.1 3.2 1.5 4.4.8 5.6-2.3q22.35-58.65 45-117.3c1.3-3.3.6-4.8-2.4-6.7-31.6-19.9-47.3-48.5-45.6-86 1-21.6 9.3-40.5 23.8-56.3 30-32.7 77-39.8 115.5-17.6a91.64 91.64 0 0 1 45.2 90.4c-3.6 30.6-19.3 53.9-45.7 69.8-2.7 1.6-3.5 2.9-2.3 6q22.8 58.8 45.2 117.7c1.2 3.1 2.4 3.8 5.6 2.3 35.5-16.6 65.2-40.3 88.1-72 34.8-48.2 49.1-101.9 42.3-161-13.7-117.5-119.4-214.8-255.5-198-106.1 13-195.3 102.5-197.1 225.8z\"]\n};\nconst faGoogleWallet = {\n  prefix: 'fab',\n  iconName: 'google-wallet',\n  icon: [448, 512, [], \"f1ee\", \"M156.8 126.8c37.6 60.6 64.2 113.1 84.3 162.5-8.3 33.8-18.8 66.5-31.3 98.3-13.2-52.3-26.5-101.3-56-148.5 6.5-36.4 2.3-73.6 3-112.3zM109.3 200H16.1c-6.5 0-10.5 7.5-6.5 12.7C51.8 267 81.3 330.5 101.3 400h103.5c-16.2-69.7-38.7-133.7-82.5-193.5-3-4-8-6.5-13-6.5zm47.8-88c68.5 108 130 234.5 138.2 368H409c-12-138-68.4-265-143.2-368H157.1zm251.8-68.5c-1.8-6.8-8.2-11.5-15.2-11.5h-88.3c-5.3 0-9 5-7.8 10.3 13.2 46.5 22.3 95.5 26.5 146 48.2 86.2 79.7 178.3 90.6 270.8 15.8-60.5 25.3-133.5 25.3-203 0-73.6-12.1-145.1-31.1-212.6z\"]\n};\nconst faDAndDBeyond = {\n  prefix: 'fab',\n  iconName: 'd-and-d-beyond',\n  icon: [640, 512, [], \"f6ca\", \"M313.8 241.5c13.8 0 21-10.1 24.8-17.9-1-1.1-5-4.2-7.4-6.6-2.4 4.3-8.2 10.7-13.9 10.7-10.2 0-15.4-14.7-3.2-26.6-.5-.2-4.3-1.8-8 2.4 0-3 1-5.1 2.1-6.6-3.5 1.3-9.8 5.6-11.4 7.9.2-5.8 1.6-7.5.6-9l-.2-.2s-8.5 5.6-9.3 14.7c0 0 1.1-1.6 2.1-1.9.6-.3 1.3 0 .6 1.9-.2.6-5.8 15.7 5.1 26-.6-1.6-1.9-7.6 2.4-1.9-.3.1 5.8 7.1 15.7 7.1zm52.4-21.1c0-4-4.9-4.4-5.6-4.5 2 3.9.9 7.5.2 9 2.5-.4 5.4-1.6 5.4-4.5zm10.3 5.2c0-6.4-6.2-11.4-13.5-10.7 8 1.3 5.6 13.8-5 11.4 3.7-2.6 3.2-9.9-1.3-12.5 1.4 4.2-3 8.2-7.4 4.6-2.4-1.9-8-6.6-10.6-8.6-2.4-2.1-5.5-1-6.6-1.8-1.3-1.1-.5-3.8-2.2-5-1.6-.8-3-.3-4.8-1-1.6-.6-2.7-1.9-2.6-3.5-2.5 4.4 3.4 6.3 4.5 8.5 1 1.9-.8 4.8 4 8.5 14.8 11.6 9.1 8 10.4 18.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7-60.1c-73.9 0-77.5 99.3-.3 99.3 77.9 0 74.1-99.3.3-99.3zm-.3 77.5c-37.4 0-36.9-55.3.2-55.3 36.8.1 38.8 55.3-.2 55.3zm-91.3-8.3l44.1-66.2h-41.7l6.1 7.2-20.5 37.2h-.3l-21-37.2 6.4-7.2h-44.9l44.1 65.8.2 19.4-7.7 8.2h42.6l-7.2-8.2zm-28.4-151.3c1.6 1.3 2.9 2.4 2.9 6.6v38.8c0 4.2-.8 5.3-2.7 6.4-.1.1-7.5 4.5-7.9 4.6h35.1c10 0 17.4-1.5 26-8.6-.6-5 .2-9.5.8-12 0-.2-1.8 1.4-2.7 3.5 0-5.7 1.6-15.4 9.6-20.5-.1 0-3.7-.8-9 1.1 2-3.1 10-7.9 10.4-7.9-8.2-26-38-22.9-32.2-22.9-30.9 0-32.6.3-39.9-4 .1.8.5 8.2 9.6 14.9zm21.5 5.5c4.6 0 23.1-3.3 23.1 17.3 0 20.7-18.4 17.3-23.1 17.3zm228.9 79.6l7 8.3V312h-.3c-5.4-14.4-42.3-41.5-45.2-50.9h-31.6l7.4 8.5v76.9l-7.2 8.3h39l-7.4-8.2v-47.4h.3c3.7 10.6 44.5 42.9 48.5 55.6h21.3v-85.2l7.4-8.3zm-106.7-96.1c-32.2 0-32.8.2-39.9-4 .1.7.5 8.3 9.6 14.9 3.1 2 2.9 4.3 2.9 9.5 1.8-1.1 3.8-2.2 6.1-3-1.1 1.1-2.7 2.7-3.5 4.5 1-1.1 7.5-5.1 14.6-3.5-1.6.3-4 1.1-6.1 2.9.1 0 2.1-1.1 7.5-.3v-4.3c4.7 0 23.1-3.4 23.1 17.3 0 20.5-18.5 17.3-19.7 17.3 5.7 4.4 5.8 12 2.2 16.3h.3c33.4 0 36.7-27.3 36.7-34 0-3.8-1.1-32-33.8-33.6z\"]\n};\nconst faPeriscope = {\n  prefix: 'fab',\n  iconName: 'periscope',\n  icon: [448, 512, [], \"f3da\", \"M370 63.6C331.4 22.6 280.5 0 226.6 0 111.9 0 18.5 96.2 18.5 214.4c0 75.1 57.8 159.8 82.7 192.7C137.8 455.5 192.6 512 226.6 512c41.6 0 112.9-94.2 120.9-105 24.6-33.1 82-118.3 82-192.6 0-56.5-21.1-110.1-59.5-150.8zM226.6 493.9c-42.5 0-190-167.3-190-279.4 0-107.4 83.9-196.3 190-196.3 100.8 0 184.7 89 184.7 196.3.1 112.1-147.4 279.4-184.7 279.4zM338 206.8c0 59.1-51.1 109.7-110.8 109.7-100.6 0-150.7-108.2-92.9-181.8v.4c0 24.5 20.1 44.4 44.8 44.4 24.7 0 44.8-19.9 44.8-44.4 0-18.2-11.1-33.8-26.9-40.7 76.6-19.2 141 39.3 141 112.4z\"]\n};\nconst faFulcrum = {\n  prefix: 'fab',\n  iconName: 'fulcrum',\n  icon: [320, 512, [], \"f50b\", \"M95.75 164.14l-35.38 43.55L25 164.14l35.38-43.55zM144.23 0l-20.54 198.18L72.72 256l51 57.82L144.23 512V300.89L103.15 256l41.08-44.89zm79.67 164.14l35.38 43.55 35.38-43.55-35.38-43.55zm-48.48 47L216.5 256l-41.08 44.89V512L196 313.82 247 256l-51-57.82L175.42 0z\"]\n};\nconst faCloudscale = {\n  prefix: 'fab',\n  iconName: 'cloudscale',\n  icon: [448, 512, [], \"f383\", \"M318.1 154l-9.4 7.6c-22.5-19.3-51.5-33.6-83.3-33.6C153.8 128 96 188.8 96 260.3c0 6.6.4 13.1 1.4 19.4-2-56 41.8-97.4 92.6-97.4 24.2 0 46.2 9.4 62.6 24.7l-25.2 20.4c-8.3-.9-16.8 1.8-23.1 8.1-11.1 11-11.1 28.9 0 40 11.1 11 28.9 11 40 0 6.3-6.3 9-14.9 8.1-23.1l75.2-88.8c6.3-6.5-3.3-15.9-9.5-9.6zm-83.8 111.5c-5.6 5.5-14.6 5.5-20.2 0-5.6-5.6-5.6-14.6 0-20.2s14.6-5.6 20.2 0 5.6 14.7 0 20.2zM224 32C100.5 32 0 132.5 0 256s100.5 224 224 224 224-100.5 224-224S347.5 32 224 32zm0 384c-88.2 0-160-71.8-160-160S135.8 96 224 96s160 71.8 160 160-71.8 160-160 160z\"]\n};\nconst faForumbee = {\n  prefix: 'fab',\n  iconName: 'forumbee',\n  icon: [448, 512, [], \"f211\", \"M5.8 309.7C2 292.7 0 275.5 0 258.3 0 135 99.8 35 223.1 35c16.6 0 33.3 2 49.3 5.5C149 87.5 51.9 186 5.8 309.7zm392.9-189.2C385 103 369 87.8 350.9 75.2c-149.6 44.3-266.3 162.1-309.7 312 12.5 18.1 28 35.6 45.2 49 43.1-151.3 161.2-271.7 312.3-315.7zm15.8 252.7c15.2-25.1 25.4-53.7 29.5-82.8-79.4 42.9-145 110.6-187.6 190.3 30-4.4 58.9-15.3 84.6-31.3 35 13.1 70.9 24.3 107 33.6-9.3-36.5-20.4-74.5-33.5-109.8zm29.7-145.5c-2.6-19.5-7.9-38.7-15.8-56.8C290.5 216.7 182 327.5 137.1 466c18.1 7.6 37 12.5 56.6 15.2C240 367.1 330.5 274.4 444.2 227.7z\"]\n};\nconst faMizuni = {\n  prefix: 'fab',\n  iconName: 'mizuni',\n  icon: [496, 512, [], \"f3cc\", \"M248 8C111 8 0 119.1 0 256c0 137 111 248 248 248s248-111 248-248C496 119.1 385 8 248 8zm-80 351.9c-31.4 10.6-58.8 27.3-80 48.2V136c0-22.1 17.9-40 40-40s40 17.9 40 40v223.9zm120-9.9c-12.9-2-26.2-3.1-39.8-3.1-13.8 0-27.2 1.1-40.2 3.1V136c0-22.1 17.9-40 40-40s40 17.9 40 40v214zm120 57.7c-21.2-20.8-48.6-37.4-80-48V136c0-22.1 17.9-40 40-40s40 17.9 40 40v271.7z\"]\n};\nconst faSchlix = {\n  prefix: 'fab',\n  iconName: 'schlix',\n  icon: [448, 512, [], \"f3ea\", \"M350.5 157.7l-54.2-46.1 73.4-39 78.3 44.2-97.5 40.9zM192 122.1l45.7-28.2 34.7 34.6-55.4 29-25-35.4zm-65.1 6.6l31.9-22.1L176 135l-36.7 22.5-12.4-28.8zm-23.3 88.2l-8.8-34.8 29.6-18.3 13.1 35.3-33.9 17.8zm-21.2-83.7l23.9-18.1 8.9 24-26.7 18.3-6.1-24.2zM59 206.5l-3.6-28.4 22.3-15.5 6.1 28.7L59 206.5zm-30.6 16.6l20.8-12.8 3.3 33.4-22.9 12-1.2-32.6zM1.4 268l19.2-10.2.4 38.2-21 8.8L1.4 268zm59.1 59.3l-28.3 8.3-1.6-46.8 25.1-10.7 4.8 49.2zM99 263.2l-31.1 13-5.2-40.8L90.1 221l8.9 42.2zM123.2 377l-41.6 5.9-8.1-63.5 35.2-10.8 14.5 68.4zm28.5-139.9l21.2 57.1-46.2 13.6-13.7-54.1 38.7-16.6zm85.7 230.5l-70.9-3.3-24.3-95.8 55.2-8.6 40 107.7zm-84.9-279.7l42.2-22.4 28 45.9-50.8 21.3-19.4-44.8zm41 94.9l61.3-18.7 52.8 86.6-79.8 11.3-34.3-79.2zm51.4-85.6l67.3-28.8 65.5 65.4-88.6 26.2-44.2-62.8z\"]\n};\nconst faSquareXing = {\n  prefix: 'fab',\n  iconName: 'square-xing',\n  icon: [448, 512, [\"xing-square\"], \"f169\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM93.8 320.2c-5.5 0-8.7-5.3-6-10.3l49.3-86.7c.1 0 .1-.1 0-.2l-31.4-54c-3-5.6 .2-10.1 6-10.1h46.6c5.2 0 9.5 2.9 12.9 8.7l31.9 55.3c-1.3 2.3-18 31.7-50.1 88.2c-3.5 6.2-7.7 9.1-12.6 9.1H93.8zm163.5-33.4v.2l65.5 119c2.8 5.1 .1 10.1-6 10.1H270.2c-5.5 0-9.7-2.9-12.9-8.7l-66-120.3c1.8-3.2 22.9-40.4 63.3-111.6c11.7-20.7 25.1-44.3 40.1-70.8c3.3-5.8 7.4-8.7 12.5-8.7h46.9c5.7-.1 8.8 4.7 6 10L257.3 286.8z\"]\n};\nconst faXingSquare = faSquareXing;\nconst faBandcamp = {\n  prefix: 'fab',\n  iconName: 'bandcamp',\n  icon: [512, 512, [], \"f2d5\", \"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm48.2,326.1h-181L207.9,178h181Z\"]\n};\nconst faWpforms = {\n  prefix: 'fab',\n  iconName: 'wpforms',\n  icon: [448, 512, [], \"f298\", \"M448 75.2v361.7c0 24.3-19 43.2-43.2 43.2H43.2C19.3 480 0 461.4 0 436.8V75.2C0 51.1 18.8 32 43.2 32h361.7c24 0 43.1 18.8 43.1 43.2zm-37.3 361.6V75.2c0-3-2.6-5.8-5.8-5.8h-9.3L285.3 144 224 94.1 162.8 144 52.5 69.3h-9.3c-3.2 0-5.8 2.8-5.8 5.8v361.7c0 3 2.6 5.8 5.8 5.8h361.7c3.2.1 5.8-2.7 5.8-5.8zM150.2 186v37H76.7v-37h73.5zm0 74.4v37.3H76.7v-37.3h73.5zm11.1-147.3l54-43.7H96.8l64.5 43.7zm210 72.9v37h-196v-37h196zm0 74.4v37.3h-196v-37.3h196zm-84.6-147.3l64.5-43.7H232.8l53.9 43.7zM371.3 335v37.3h-99.4V335h99.4z\"]\n};\nconst faCloudversify = {\n  prefix: 'fab',\n  iconName: 'cloudversify',\n  icon: [616, 512, [], \"f385\", \"M148.6 304c8.2 68.5 67.4 115.5 146 111.3 51.2 43.3 136.8 45.8 186.4-5.6 69.2 1.1 118.5-44.6 131.5-99.5 14.8-62.5-18.2-132.5-92.1-155.1-33-88.1-131.4-101.5-186.5-85-57.3 17.3-84.3 53.2-99.3 109.7-7.8 2.7-26.5 8.9-45 24.1 11.7 0 15.2 8.9 15.2 19.5v20.4c0 10.7-8.7 19.5-19.5 19.5h-20.2c-10.7 0-19.5-6-19.5-16.7V240H98.8C95 240 88 244.3 88 251.9v40.4c0 6.4 5.3 11.8 11.7 11.8h48.9zm227.4 8c-10.7 46.3 21.7 72.4 55.3 86.8C324.1 432.6 259.7 348 296 288c-33.2 21.6-33.7 71.2-29.2 92.9-17.9-12.4-53.8-32.4-57.4-79.8-3-39.9 21.5-75.7 57-93.9C297 191.4 369.9 198.7 400 248c-14.1-48-53.8-70.1-101.8-74.8 30.9-30.7 64.4-50.3 114.2-43.7 69.8 9.3 133.2 82.8 67.7 150.5 35-16.3 48.7-54.4 47.5-76.9l10.5 19.6c11.8 22 15.2 47.6 9.4 72-9.2 39-40.6 68.8-79.7 76.5-32.1 6.3-83.1-5.1-91.8-59.2zM128 208H88.2c-8.9 0-16.2-7.3-16.2-16.2v-39.6c0-8.9 7.3-16.2 16.2-16.2H128c8.9 0 16.2 7.3 16.2 16.2v39.6c0 8.9-7.3 16.2-16.2 16.2zM10.1 168C4.5 168 0 163.5 0 157.9v-27.8c0-5.6 4.5-10.1 10.1-10.1h27.7c5.5 0 10.1 4.5 10.1 10.1v27.8c0 5.6-4.5 10.1-10.1 10.1H10.1zM168 142.7v-21.4c0-5.1 4.2-9.3 9.3-9.3h21.4c5.1 0 9.3 4.2 9.3 9.3v21.4c0 5.1-4.2 9.3-9.3 9.3h-21.4c-5.1 0-9.3-4.2-9.3-9.3zM56 235.5v25c0 6.3-5.1 11.5-11.4 11.5H19.4C13.1 272 8 266.8 8 260.5v-25c0-6.3 5.1-11.5 11.4-11.5h25.1c6.4 0 11.5 5.2 11.5 11.5z\"]\n};\nconst faUsps = {\n  prefix: 'fab',\n  iconName: 'usps',\n  icon: [576, 512, [], \"f7e1\", \"M460.3 241.7c25.8-41.3 15.2-48.8-11.7-48.8h-27c-.1 0-1.5-1.4-10.9 8-11.2 5.6-37.9 6.3-37.9 8.7 0 4.5 70.3-3.1 88.1 0 9.5 1.5-1.5 20.4-4.4 32-.5 4.5 2.4 2.3 3.8.1zm-112.1 22.6c64-21.3 97.3-23.9 102-26.2 4.4-2.9-4.4-6.6-26.2-5.8-51.7 2.2-137.6 37.1-172.6 53.9l-30.7-93.3h196.6c-2.7-28.2-152.9-22.6-337.9-22.6L27 415.8c196.4-97.3 258.9-130.3 321.2-151.5zM94.7 96c253.3 53.7 330 65.7 332.1 85.2 36.4 0 45.9 0 52.4 6.6 21.1 19.7-14.6 67.7-14.6 67.7-4.4 2.9-406.4 160.2-406.4 160.2h423.1L549 96z\"]\n};\nconst faMegaport = {\n  prefix: 'fab',\n  iconName: 'megaport',\n  icon: [496, 512, [], \"f5a3\", \"M214.5 209.6v66.2l33.5 33.5 33.3-33.3v-66.4l-33.4-33.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm145.1 414.4L367 441.6l-26-19.2v-65.5l-33.4-33.4-33.4 33.4v65.5L248 441.6l-26.1-19.2v-65.5l-33.4-33.4-33.5 33.4v65.5l-26.1 19.2-26.1-19.2v-87l59.5-59.5V188l59.5-59.5V52.9l26.1-19.2L274 52.9v75.6l59.5 59.5v87.6l59.7 59.7v87.1z\"]\n};\nconst faMagento = {\n  prefix: 'fab',\n  iconName: 'magento',\n  icon: [448, 512, [], \"f3c4\", \"M445.7 127.9V384l-63.4 36.5V164.7L223.8 73.1 65.2 164.7l.4 255.9L2.3 384V128.1L224.2 0l221.5 127.9zM255.6 420.5L224 438.9l-31.8-18.2v-256l-63.3 36.6.1 255.9 94.9 54.9 95.1-54.9v-256l-63.4-36.6v255.9z\"]\n};\nconst faSpotify = {\n  prefix: 'fab',\n  iconName: 'spotify',\n  icon: [496, 512, [], \"f1bc\", \"M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z\"]\n};\nconst faOptinMonster = {\n  prefix: 'fab',\n  iconName: 'optin-monster',\n  icon: [576, 512, [], \"f23c\", \"M572.6 421.4c5.6-9.5 4.7-15.2-5.4-11.6-3-4.9-7-9.5-11.1-13.8 2.9-9.7-.7-14.2-10.8-9.2-4.6-3.2-10.3-6.5-15.9-9.2 0-15.1-11.6-11.6-17.6-5.7-10.4-1.5-18.7-.3-26.8 5.7.3-6.5.3-13 .3-19.7 12.6 0 40.2-11 45.9-36.2 1.4-6.8 1.6-13.8-.3-21.9-3-13.5-14.3-21.3-25.1-25.7-.8-5.9-7.6-14.3-14.9-15.9s-12.4 4.9-14.1 10.3c-8.5 0-19.2 2.8-21.1 8.4-5.4-.5-11.1-1.4-16.8-1.9 2.7-1.9 5.4-3.5 8.4-4.6 5.4-9.2 14.6-11.4 25.7-11.6V256c19.5-.5 43-5.9 53.8-18.1 12.7-13.8 14.6-37.3 12.4-55.1-2.4-17.3-9.7-37.6-24.6-48.1-8.4-5.9-21.6-.8-22.7 9.5-2.2 19.6 1.2 30-38.6 25.1-10.3-23.8-24.6-44.6-42.7-60C341 49.6 242.9 55.5 166.4 71.7c19.7 4.6 41.1 8.6 59.7 16.5-26.2 2.4-52.7 11.3-76.2 23.2-32.8 17-44 29.9-56.7 42.4 14.9-2.2 28.9-5.1 43.8-3.8-9.7 5.4-18.4 12.2-26.5 20-25.8.9-23.8-5.3-26.2-25.9-1.1-10.5-14.3-15.4-22.7-9.7-28.1 19.9-33.5 79.9-12.2 103.5 10.8 12.2 35.1 17.3 54.9 17.8-.3 1.1-.3 1.9-.3 2.7 10.8.5 19.5 2.7 24.6 11.6 3 1.1 5.7 2.7 8.1 4.6-5.4.5-11.1 1.4-16.5 1.9-3.3-6.6-13.7-8.1-21.1-8.1-1.6-5.7-6.5-12.2-14.1-10.3-6.8 1.9-14.1 10-14.9 15.9-22.5 9.5-30.1 26.8-25.1 47.6 5.3 24.8 33 36.2 45.9 36.2v19.7c-6.6-5-14.3-7.5-26.8-5.7-5.5-5.5-17.3-10.1-17.3 5.7-5.9 2.7-11.4 5.9-15.9 9.2-9.8-4.9-13.6-1.7-11.1 9.2-4.1 4.3-7.8 8.6-11.1 13.8-10.2-3.7-11 2.2-5.4 11.6-1.1 3.5-1.6 7-1.9 10.8-.5 31.6 44.6 64 73.5 65.1 17.3.5 34.6-8.4 43-23.5 113.2 4.9 226.7 4.1 340.2 0 8.1 15.1 25.4 24.3 42.7 23.5 29.2-1.1 74.3-33.5 73.5-65.1.2-3.7-.7-7.2-1.7-10.7zm-73.8-254c1.1-3 2.4-8.4 2.4-14.6 0-5.9 6.8-8.1 14.1-.8 11.1 11.6 14.9 40.5 13.8 51.1-4.1-13.6-13-29-30.3-35.7zm-4.6 6.7c19.5 6.2 28.6 27.6 29.7 48.9-1.1 2.7-3 5.4-4.9 7.6-5.7 5.9-15.4 10-26.2 12.2 4.3-21.3.3-47.3-12.7-63 4.9-.8 10.9-2.4 14.1-5.7zm-24.1 6.8c13.8 11.9 20 39.2 14.1 63.5-4.1.5-8.1.8-11.6.8-1.9-21.9-6.8-44-14.3-64.6 3.7.3 8.1.3 11.8.3zM47.5 203c-1.1-10.5 2.4-39.5 13.8-51.1 7-7.3 14.1-5.1 14.1.8 0 6.2 1.4 11.6 2.4 14.6-17.3 6.8-26.2 22.2-30.3 35.7zm9.7 27.6c-1.9-2.2-3.5-4.9-4.9-7.6 1.4-21.3 10.3-42.7 29.7-48.9 3.2 3.2 9.2 4.9 14.1 5.7-13 15.7-17 41.6-12.7 63-10.8-2.2-20.5-6-26.2-12.2zm47.9 14.6c-4.1 0-8.1-.3-12.7-.8-4.6-18.6-1.9-38.9 5.4-53v.3l12.2-5.1c4.9-1.9 9.7-3.8 14.9-4.9-10.7 19.7-17.4 41.3-19.8 63.5zm184-162.7c41.9 0 76.2 34 76.2 75.9 0 42.2-34.3 76.2-76.2 76.2s-76.2-34-76.2-76.2c0-41.8 34.3-75.9 76.2-75.9zm115.6 174.3c-.3 17.8-7 48.9-23 57-13.2 6.6-6.5-7.5-16.5-58.1 13.3.3 26.6.3 39.5 1.1zm-54-1.6c.8 4.9 3.8 40.3-1.6 41.9-11.6 3.5-40 4.3-51.1-1.1-4.1-3-4.6-35.9-4.3-41.1v.3c18.9-.3 38.1-.3 57 0zM278.3 309c-13 3.5-41.6 4.1-54.6-1.6-6.5-2.7-3.8-42.4-1.9-51.6 19.2-.5 38.4-.5 57.8-.8v.3c1.1 8.3 3.3 51.2-1.3 53.7zm-106.5-51.1c12.2-.8 24.6-1.4 36.8-1.6-2.4 15.4-3 43.5-4.9 52.2-1.1 6.8-4.3 6.8-9.7 4.3-21.9-9.8-27.6-35.2-22.2-54.9zm-35.4 31.3c7.8-1.1 15.7-1.9 23.5-2.7 1.6 6.2 3.8 11.9 7 17.6 10 17 44 35.7 45.1 7 6.2 14.9 40.8 12.2 54.9 10.8 15.7-1.4 23.8-1.4 26.8-14.3 12.4 4.3 30.8 4.1 44 3 11.3-.8 20.8-.5 24.6-8.9 1.1 5.1 1.9 11.6 4.6 16.8 10.8 21.3 37.3 1.4 46.8-31.6 8.6.8 17.6 1.9 26.5 2.7-.4 1.3-3.8 7.3 7.3 11.6-47.6 47-95.7 87.8-163.2 107-63.2-20.8-112.1-59.5-155.9-106.5 9.6-3.4 10.4-8.8 8-12.5zm-21.6 172.5c-3.8 17.8-21.9 29.7-39.7 28.9-19.2-.8-46.5-17-59.2-36.5-2.7-31.1 43.8-61.3 66.2-54.6 14.9 4.3 27.8 30.8 33.5 54 0 3-.3 5.7-.8 8.2zm-8.7-66c-.5-13.5-.5-27-.3-40.5h.3c2.7-1.6 5.7-3.8 7.8-6.5 6.5-1.6 13-5.1 15.1-9.2 3.3-7.1-7-7.5-5.4-12.4 2.7-1.1 5.7-2.2 7.8-3.5 29.2 29.2 58.6 56.5 97.3 77-36.8 11.3-72.4 27.6-105.9 47-1.2-18.6-7.7-35.9-16.7-51.9zm337.6 64.6c-103 3.5-206.2 4.1-309.4 0 0 .3 0 .3-.3.3v-.3h.3c35.1-21.6 72.2-39.2 112.4-50.8 11.6 5.1 23 9.5 34.9 13.2 2.2.8 2.2.8 4.3 0 14.3-4.1 28.4-9.2 42.2-15.4 41.5 11.7 78.8 31.7 115.6 53zm10.5-12.4c-35.9-19.5-73-35.9-111.9-47.6 38.1-20 71.9-47.3 103.5-76.7 2.2 1.4 4.6 2.4 7.6 3.2 0 .8.3 1.9.5 2.4-4.6 2.7-7.8 6.2-5.9 10.3 2.2 3.8 8.6 7.6 15.1 8.9 2.4 2.7 5.1 5.1 8.1 6.8 0 13.8-.3 27.6-.8 41.3l.3-.3c-9.3 15.9-15.5 37-16.5 51.7zm105.9 6.2c-12.7 19.5-40 35.7-59.2 36.5-19.3.9-40.5-13.2-40.5-37 5.7-23.2 18.9-49.7 33.5-54 22.7-6.9 69.2 23.4 66.2 54.5zM372.9 75.2c-3.8-72.1-100.8-79.7-126-23.5 44.6-24.3 90.3-15.7 126 23.5zM74.8 407.1c-15.7 1.6-49.5 25.4-49.5 43.2 0 11.6 15.7 19.5 32.2 14.9 12.2-3.2 31.1-17.6 35.9-27.3 6-11.6-3.7-32.7-18.6-30.8zm215.9-176.2c28.6 0 51.9-21.6 51.9-48.4 0-36.1-40.5-58.1-72.2-44.3 9.5 3 16.5 11.6 16.5 21.6 0 23.3-33.3 32-46.5 11.3-7.3 34.1 19.4 59.8 50.3 59.8zM68 474.1c.5 6.5 12.2 12.7 21.6 9.5 6.8-2.7 14.6-10.5 17.3-16.2 3-7-1.1-20-9.7-18.4-8.9 1.6-29.7 16.7-29.2 25.1zm433.2-67c-14.9-1.9-24.6 19.2-18.9 30.8 4.9 9.7 24.1 24.1 36.2 27.3 16.5 4.6 32.2-3.2 32.2-14.9 0-17.8-33.8-41.6-49.5-43.2zM478.8 449c-8.4-1.6-12.4 11.3-9.5 18.4 2.4 5.7 10.3 13.5 17.3 16.2 9.2 3.2 21.1-3 21.3-9.5.9-8.4-20.2-23.5-29.1-25.1z\"]\n};\nconst faFly = {\n  prefix: 'fab',\n  iconName: 'fly',\n  icon: [384, 512, [], \"f417\", \"M197.8 427.8c12.9 11.7 33.7 33.3 33.2 50.7 0 .8-.1 1.6-.1 2.5-1.8 19.8-18.8 31.1-39.1 31-25-.1-39.9-16.8-38.7-35.8 1-16.2 20.5-36.7 32.4-47.6 2.3-2.1 2.7-2.7 5.6-3.6 3.4 0 3.9.3 6.7 2.8zM331.9 67.3c-16.3-25.7-38.6-40.6-63.3-52.1C243.1 4.5 214-.2 192 0c-44.1 0-71.2 13.2-81.1 17.3C57.3 45.2 26.5 87.2 28 158.6c7.1 82.2 97 176 155.8 233.8 1.7 1.6 4.5 4.5 6.2 5.1l3.3.1c2.1-.7 1.8-.5 3.5-2.1 52.3-49.2 140.7-145.8 155.9-215.7 7-39.2 3.1-72.5-20.8-112.5zM186.8 351.9c-28-51.1-65.2-130.7-69.3-189-3.4-47.5 11.4-131.2 69.3-136.7v325.7zM328.7 180c-16.4 56.8-77.3 128-118.9 170.3C237.6 298.4 275 217 277 158.4c1.6-45.9-9.8-105.8-48-131.4 88.8 18.3 115.5 98.1 99.7 153z\"]\n};\nconst faSquareBluesky = {\n  prefix: 'fab',\n  iconName: 'square-bluesky',\n  icon: [448, 512, [], \"e6a3\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 247.4c14.5-30 54-85.8 90.7-113.3c26.5-19.9 69.3-35.2 69.3 13.7c0 9.8-5.6 82.1-8.9 93.8c-11.4 40.8-53 51.2-90 44.9c64.7 11 81.2 47.5 45.6 84c-67.5 69.3-97-17.4-104.6-39.6c0 0 0 0 0 0l-.3-.9c-.9-2.6-1.4-4.1-1.8-4.1s-.9 1.5-1.8 4.1c-.1 .3-.2 .6-.3 .9c0 0 0 0 0 0c-7.6 22.2-37.1 108.8-104.6 39.6c-35.5-36.5-19.1-73 45.6-84c-37 6.3-78.6-4.1-90-44.9c-3.3-11.7-8.9-84-8.9-93.8c0-48.9 42.9-33.5 69.3-13.7c36.7 27.5 76.2 83.4 90.7 113.3z\"]\n};\nconst faAviato = {\n  prefix: 'fab',\n  iconName: 'aviato',\n  icon: [640, 512, [], \"f421\", \"M107.2 283.5l-19-41.8H36.1l-19 41.8H0l62.2-131.4 62.2 131.4h-17.2zm-45-98.1l-19.6 42.5h39.2l-19.6-42.5zm112.7 102.4l-62.2-131.4h17.1l45.1 96 45.1-96h17l-62.1 131.4zm80.6-4.3V156.4H271v127.1h-15.5zm209.1-115.6v115.6h-17.3V167.9h-41.2v-11.5h99.6v11.5h-41.1zM640 218.8c0 9.2-1.7 17.8-5.1 25.8-3.4 8-8.2 15.1-14.2 21.1-6 6-13.1 10.8-21.1 14.2-8 3.4-16.6 5.1-25.8 5.1s-17.8-1.7-25.8-5.1c-8-3.4-15.1-8.2-21.1-14.2-6-6-10.8-13-14.2-21.1-3.4-8-5.1-16.6-5.1-25.8s1.7-17.8 5.1-25.8c3.4-8 8.2-15.1 14.2-21.1 6-6 13-8.4 21.1-11.9 8-3.4 16.6-5.1 25.8-5.1s17.8 1.7 25.8 5.1c8 3.4 15.1 5.8 21.1 11.9 6 6 10.7 13.1 14.2 21.1 3.4 8 5.1 16.6 5.1 25.8zm-15.5 0c0-7.3-1.3-14-3.9-20.3-2.6-6.3-6.2-11.7-10.8-16.3-4.6-4.6-10-8.2-16.2-10.9-6.2-2.7-12.8-4-19.8-4s-13.6 1.3-19.8 4c-6.2 2.7-11.6 6.3-16.2 10.9-4.6 4.6-8.2 10-10.8 16.3-2.6 6.3-3.9 13.1-3.9 20.3 0 7.3 1.3 14 3.9 20.3 2.6 6.3 6.2 11.7 10.8 16.3 4.6 4.6 10 8.2 16.2 10.9 6.2 2.7 12.8 4 19.8 4s13.6-1.3 19.8-4c6.2-2.7 11.6-6.3 16.2-10.9 4.6-4.6 8.2-10 10.8-16.3 2.6-6.3 3.9-13.1 3.9-20.3zm-94.8 96.7v-6.3l88.9-10-242.9 13.4c.6-2.2 1.1-4.6 1.4-7.2.3-2 .5-4.2.6-6.5l64.8-8.1-64.9 1.9c0-.4-.1-.7-.1-1.1-2.8-17.2-25.5-23.7-25.5-23.7l-1.1-26.3h23.8l19 41.8h17.1L348.6 152l-62.2 131.4h17.1l19-41.8h23.6L345 268s-22.7 6.5-25.5 23.7c-.1.3-.1.7-.1 1.1l-64.9-1.9 64.8 8.1c.1 2.3.3 4.4.6 6.5.3 2.6.8 5 1.4 7.2L78.4 299.2l88.9 10v6.3c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4 0-6.2-4.6-11.3-10.5-12.2v-5.8l80.3 9v5.4c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-4.9l28.4 3.2v23.7h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9V323l38.3 4.3c8.1 11.4 19 13.6 19 13.6l-.1 6.7-5.1.2-.1 12.1h4.1l.1-5h5.2l.1 5h4.1l-.1-12.1-5.1-.2-.1-6.7s10.9-2.1 19-13.6l38.3-4.3v23.2h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9v-23.7l28.4-3.2v4.9c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-5.4l80.3-9v5.8c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4-.2-6.3-4.7-11.4-10.7-12.3zm-200.8-87.6l19.6-42.5 19.6 42.5h-17.9l-1.7-40.3-1.7 40.3h-17.9z\"]\n};\nconst faItunes = {\n  prefix: 'fab',\n  iconName: 'itunes',\n  icon: [448, 512, [], \"f3b4\", \"M223.6 80.3C129 80.3 52.5 157 52.5 251.5S129 422.8 223.6 422.8s171.2-76.7 171.2-171.2c0-94.6-76.7-171.3-171.2-171.3zm79.4 240c-3.2 13.6-13.5 21.2-27.3 23.8-12.1 2.2-22.2 2.8-31.9-5-11.8-10-12-26.4-1.4-36.8 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 3.2-3.6 2.2-2 2.2-80.8 0-5.6-2.7-7.1-8.4-6.1-4 .7-91.9 17.1-91.9 17.1-5 1.1-6.7 2.6-6.7 8.3 0 116.1.5 110.8-1.2 118.5-2.1 9-7.6 15.8-14.9 19.6-8.3 4.6-23.4 6.6-31.4 5.2-21.4-4-28.9-28.7-14.4-42.9 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 5-5.7.9-127 2.6-133.7.4-2.6 1.5-4.8 3.5-6.4 2.1-1.7 5.8-2.7 6.7-2.7 101-19 113.3-21.4 115.1-21.4 5.7-.4 9 3 9 8.7-.1 170.6.4 161.4-1 167.6zM345.2 32H102.8C45.9 32 0 77.9 0 134.8v242.4C0 434.1 45.9 480 102.8 480h242.4c57 0 102.8-45.9 102.8-102.8V134.8C448 77.9 402.1 32 345.2 32zM223.6 444c-106.3 0-192.5-86.2-192.5-192.5S117.3 59 223.6 59s192.5 86.2 192.5 192.5S329.9 444 223.6 444z\"]\n};\nconst faCuttlefish = {\n  prefix: 'fab',\n  iconName: 'cuttlefish',\n  icon: [440, 512, [], \"f38c\", \"M344 305.5c-17.5 31.6-57.4 54.5-96 54.5-56.6 0-104-47.4-104-104s47.4-104 104-104c38.6 0 78.5 22.9 96 54.5 13.7-50.9 41.7-93.3 87-117.8C385.7 39.1 320.5 8 248 8 111 8 0 119 0 256s111 248 248 248c72.5 0 137.7-31.1 183-80.7-45.3-24.5-73.3-66.9-87-117.8z\"]\n};\nconst faBlogger = {\n  prefix: 'fab',\n  iconName: 'blogger',\n  icon: [448, 512, [], \"f37c\", \"M162.4 196c4.8-4.9 6.2-5.1 36.4-5.1 27.2 0 28.1.1 32.1 2.1 5.8 2.9 8.3 7 8.3 13.6 0 5.9-2.4 10-7.6 13.4-2.8 1.8-4.5 1.9-31.1 2.1-16.4.1-29.5-.2-31.5-.8-10.3-2.9-14.1-17.7-6.6-25.3zm61.4 94.5c-53.9 0-55.8.2-60.2 4.1-3.5 3.1-5.7 9.4-5.1 13.9.7 4.7 4.8 10.1 9.2 12 2.2 1 14.1 1.7 56.3 1.2l47.9-.6 9.2-1.5c9-5.1 10.5-17.4 3.1-24.4-5.3-4.7-5-4.7-60.4-4.7zm223.4 130.1c-3.5 28.4-23 50.4-51.1 57.5-7.2 1.8-9.7 1.9-172.9 1.8-157.8 0-165.9-.1-172-1.8-8.4-2.2-15.6-5.5-22.3-10-5.6-3.8-13.9-11.8-17-16.4-3.8-5.6-8.2-15.3-10-22C.1 423 0 420.3 0 256.3 0 93.2 0 89.7 1.8 82.6 8.1 57.9 27.7 39 53 33.4c7.3-1.6 332.1-1.9 340-.3 21.2 4.3 37.9 17.1 47.6 36.4 7.7 15.3 7-1.5 7.3 180.6.2 115.8 0 164.5-.7 170.5zm-85.4-185.2c-1.1-5-4.2-9.6-7.7-11.5-1.1-.6-8-1.3-15.5-1.7-12.4-.6-13.8-.8-17.8-3.1-6.2-3.6-7.9-7.6-8-18.3 0-20.4-8.5-39.4-25.3-56.5-12-12.2-25.3-20.5-40.6-25.1-3.6-1.1-11.8-1.5-39.2-1.8-42.9-.5-52.5.4-67.1 6.2-27 10.7-46.3 33.4-53.4 62.4-1.3 5.4-1.6 14.2-1.9 64.3-.4 62.8 0 72.1 4 84.5 9.7 30.7 37.1 53.4 64.6 58.4 9.2 1.7 122.2 2.1 133.7.5 20.1-2.7 35.9-10.8 50.7-25.9 10.7-10.9 17.4-22.8 21.8-38.5 3.2-10.9 2.9-88.4 1.7-93.9z\"]\n};\nconst faFlickr = {\n  prefix: 'fab',\n  iconName: 'flickr',\n  icon: [448, 512, [], \"f16e\", \"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM144.5 319c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5zm159 0c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5z\"]\n};\nconst faViber = {\n  prefix: 'fab',\n  iconName: 'viber',\n  icon: [512, 512, [], \"f409\", \"M444 49.9C431.3 38.2 379.9.9 265.3.4c0 0-135.1-8.1-200.9 52.3C27.8 89.3 14.9 143 13.5 209.5c-1.4 66.5-3.1 191.1 117 224.9h.1l-.1 51.6s-.8 20.9 13 25.1c16.6 5.2 26.4-10.7 42.3-27.8 8.7-9.4 20.7-23.2 29.8-33.7 82.2 6.9 145.3-8.9 152.5-11.2 16.6-5.4 110.5-17.4 125.7-142 15.8-128.6-7.6-209.8-49.8-246.5zM457.9 287c-12.9 104-89 110.6-103 115.1-6 1.9-61.5 15.7-131.2 11.2 0 0-52 62.7-68.2 79-5.3 5.3-11.1 4.8-11-5.7 0-6.9.4-85.7.4-85.7-.1 0-.1 0 0 0-101.8-28.2-95.8-134.3-94.7-189.8 1.1-55.5 11.6-101 42.6-131.6 55.7-50.5 170.4-43 170.4-43 96.9.4 143.3 29.6 154.1 39.4 35.7 30.6 53.9 103.8 40.6 211.1zm-139-80.8c.4 8.6-12.5 9.2-12.9.6-1.1-22-11.4-32.7-32.6-33.9-8.6-.5-7.8-13.4.7-12.9 27.9 1.5 43.4 17.5 44.8 46.2zm20.3 11.3c1-42.4-25.5-75.6-75.8-79.3-8.5-.6-7.6-13.5.9-12.9 58 4.2 88.9 44.1 87.8 92.5-.1 8.6-13.1 8.2-12.9-.3zm47 13.4c.1 8.6-12.9 8.7-12.9.1-.6-81.5-54.9-125.9-120.8-126.4-8.5-.1-8.5-12.9 0-12.9 73.7.5 133 51.4 133.7 139.2zM374.9 329v.2c-10.8 19-31 40-51.8 33.3l-.2-.3c-21.1-5.9-70.8-31.5-102.2-56.5-16.2-12.8-31-27.9-42.4-42.4-10.3-12.9-20.7-28.2-30.8-46.6-21.3-38.5-26-55.7-26-55.7-6.7-20.8 14.2-41 33.3-51.8h.2c9.2-4.8 18-3.2 23.9 3.9 0 0 12.4 14.8 17.7 22.1 5 6.8 11.7 17.7 15.2 23.8 6.1 10.9 2.3 22-3.7 26.6l-12 9.6c-6.1 4.9-5.3 14-5.3 14s17.8 67.3 84.3 84.3c0 0 9.1.8 14-5.3l9.6-12c4.6-6 15.7-9.8 26.6-3.7 14.7 8.3 33.4 21.2 45.8 32.9 7 5.7 8.6 14.4 3.8 23.6z\"]\n};\nconst faSoundcloud = {\n  prefix: 'fab',\n  iconName: 'soundcloud',\n  icon: [640, 512, [], \"f1be\", \"M639.8 298.6c-1.3 23.1-11.5 44.8-28.4 60.5s-39.2 24.4-62.3 24.1h-218c-4.8 0-9.4-2-12.8-5.4s-5.3-8-5.3-12.8V130.2c-.2-4 .9-8 3.1-11.4s5.3-6.1 9-7.7c0 0 20.1-13.9 62.3-13.9c25.8 0 51.1 6.9 73.3 20.1c17.3 10.2 32.3 23.8 44.1 40.1s20 34.8 24.2 54.4c7.5-2.1 15.3-3.2 23.1-3.2c11.7-.1 23.3 2.2 34.2 6.7S606.8 226.6 615 235s14.6 18.3 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-143.6zm-44.1-7.5c-.2-1.8-1.1-3.5-2.4-4.8s-3.2-1.9-5-1.9s-3.6 .7-5 1.9s-2.2 2.9-2.4 4.8c-9.3 50.2-6.2 94.4 .3 144.5c.7 7.6 13.6 7.5 14.4 0c7.2-50.9 10.5-93.8 .3-144.5zM20.3 250.8c-.2-1.8-1.1-3.5-2.4-4.8s-3.2-1.9-5-1.9s-3.6 .7-5 1.9s-2.3 2.9-2.4 4.8c-8.5 33.7-5.9 61.6 .6 95.4c.2 1.7 1 3.3 2.3 4.4s2.9 1.8 4.7 1.8s3.4-.6 4.7-1.8s2.1-2.7 2.3-4.4c7.5-34.5 11.2-61.8 .4-95.4z\"]\n};\nconst faDigg = {\n  prefix: 'fab',\n  iconName: 'digg',\n  icon: [512, 512, [], \"f1a6\", \"M81.7 172.3H0v174.4h132.7V96h-51v76.3zm0 133.4H50.9v-92.3h30.8v92.3zm297.2-133.4v174.4h81.8v28.5h-81.8V416H512V172.3H378.9zm81.8 133.4h-30.8v-92.3h30.8v92.3zm-235.6 41h82.1v28.5h-82.1V416h133.3V172.3H225.1v174.4zm51.2-133.3h30.8v92.3h-30.8v-92.3zM153.3 96h51.3v51h-51.3V96zm0 76.3h51.3v174.4h-51.3V172.3z\"]\n};\nconst faTencentWeibo = {\n  prefix: 'fab',\n  iconName: 'tencent-weibo',\n  icon: [384, 512, [], \"f1d5\", \"M72.3 495.8c1.4 19.9-27.6 22.2-29.7 2.9C31 368.8 73.7 259.2 144 185.5c-15.6-34 9.2-77.1 50.6-77.1 30.3 0 55.1 24.6 55.1 55.1 0 44-49.5 70.8-86.9 45.1-65.7 71.3-101.4 169.8-90.5 287.2zM192 .1C66.1.1-12.3 134.3 43.7 242.4 52.4 259.8 79 246.9 70 229 23.7 136.4 91 29.8 192 29.8c75.4 0 136.9 61.4 136.9 136.9 0 90.8-86.9 153.9-167.7 133.1-19.1-4.1-25.6 24.4-6.6 29.1 110.7 23.2 204-60 204-162.3C358.6 74.7 284 .1 192 .1z\"]\n};\nconst faLetterboxd = {\n  prefix: 'fab',\n  iconName: 'letterboxd',\n  icon: [640, 512, [], \"e62d\", \"M521.3 128C586.9 128 640 181.1 640 246.6s-53.1 118.6-118.7 118.6c-42.5 0-79.7-22.3-100.7-55.8c11.4-18.2 18-39.7 18-62.8s-6.6-44.6-18-62.8l0 0 .8-1.2c20.8-32.3 56.8-53.9 97.9-54.6l2 0zM320 128c42.5 0 79.7 22.3 100.7 55.8c-11.4 18.2-18 39.7-18 62.8s6.6 44.6 18 62.8l0 0-.8 1.2c-20.8 32.3-56.8 53.9-97.9 54.6l-2 0c-42.5 0-79.7-22.3-100.7-55.8c11.4-18.2 18-39.7 18-62.8s-6.6-44.6-18-62.8l0 0 .8-1.2c20.8-32.3 56.8-53.9 97.9-54.6l2 0zm-201.3 0c42.5 0 79.7 22.3 100.7 55.8c-11.4 18.2-18 39.7-18 62.8s6.6 44.6 18 62.8l0 0-.8 1.2c-20.8 32.3-56.8 53.9-97.9 54.6l-2 0C53.1 365.1 0 312.1 0 246.6S53.1 128 118.7 128z\"]\n};\nconst faSymfony = {\n  prefix: 'fab',\n  iconName: 'symfony',\n  icon: [512, 512, [], \"f83d\", \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm133.74 143.54c-11.47.41-19.4-6.45-19.77-16.87-.27-9.18 6.68-13.44 6.53-18.85-.23-6.55-10.16-6.82-12.87-6.67-39.78 1.29-48.59 57-58.89 113.85 21.43 3.15 36.65-.72 45.14-6.22 12-7.75-3.34-15.72-1.42-24.56 4-18.16 32.55-19 32 5.3-.36 17.86-25.92 41.81-77.6 35.7-10.76 59.52-18.35 115-58.2 161.72-29 34.46-58.4 39.82-71.58 40.26-24.65.85-41-12.31-41.58-29.84-.56-17 14.45-26.26 24.31-26.59 21.89-.75 30.12 25.67 14.88 34-12.09 9.71.11 12.61 2.05 12.55 10.42-.36 17.34-5.51 22.18-9 24-20 33.24-54.86 45.35-118.35 8.19-49.66 17-78 18.23-82-16.93-12.75-27.08-28.55-49.85-34.72-15.61-4.23-25.12-.63-31.81 7.83-7.92 10-5.29 23 2.37 30.7l12.63 14c15.51 17.93 24 31.87 20.8 50.62-5.06 29.93-40.72 52.9-82.88 39.94-36-11.11-42.7-36.56-38.38-50.62 7.51-24.15 42.36-11.72 34.62 13.6-2.79 8.6-4.92 8.68-6.28 13.07-4.56 14.77 41.85 28.4 51-1.39 4.47-14.52-5.3-21.71-22.25-39.85-28.47-31.75-16-65.49 2.95-79.67C204.23 140.13 251.94 197 262 205.29c37.17-109 100.53-105.46 102.43-105.53 25.16-.81 44.19 10.59 44.83 28.65.25 7.69-4.17 22.59-19.52 23.13z\"]\n};\nconst faMaxcdn = {\n  prefix: 'fab',\n  iconName: 'maxcdn',\n  icon: [512, 512, [], \"f136\", \"M461.1 442.7h-97.4L415.6 200c2.3-10.2.9-19.5-4.4-25.7-5-6.1-13.7-9.6-24.2-9.6h-49.3l-59.5 278h-97.4l59.5-278h-83.4l-59.5 278H0l59.5-278-44.6-95.4H387c39.4 0 75.3 16.3 98.3 44.9 23.3 28.6 31.8 67.4 23.6 105.9l-47.8 222.6z\"]\n};\nconst faEtsy = {\n  prefix: 'fab',\n  iconName: 'etsy',\n  icon: [384, 512, [], \"f2d7\", \"M384 348c-1.75 10.75-13.75 110-15.5 132-117.879-4.299-219.895-4.743-368.5 0v-25.5c45.457-8.948 60.627-8.019 61-35.25 1.793-72.322 3.524-244.143 0-322-1.029-28.46-12.13-26.765-61-36v-25.5c73.886 2.358 255.933 8.551 362.999-3.75-3.5 38.25-7.75 126.5-7.75 126.5H332C320.947 115.665 313.241 68 277.25 68h-137c-10.25 0-10.75 3.5-10.75 9.75V241.5c58 .5 88.5-2.5 88.5-2.5 29.77-.951 27.56-8.502 40.75-65.251h25.75c-4.407 101.351-3.91 61.829-1.75 160.25H257c-9.155-40.086-9.065-61.045-39.501-61.5 0 0-21.5-2-88-2v139c0 26 14.25 38.25 44.25 38.25H263c63.636 0 66.564-24.996 98.751-99.75H384z\"]\n};\nconst faFacebookMessenger = {\n  prefix: 'fab',\n  iconName: 'facebook-messenger',\n  icon: [512, 512, [], \"f39f\", \"M256.55 8C116.52 8 8 110.34 8 248.57c0 72.3 29.71 134.78 78.07 177.94 8.35 7.51 6.63 11.86 8.05 58.23A19.92 19.92 0 0 0 122 502.31c52.91-23.3 53.59-25.14 62.56-22.7C337.85 521.8 504 423.7 504 248.57 504 110.34 396.59 8 256.55 8zm149.24 185.13l-73 115.57a37.37 37.37 0 0 1-53.91 9.93l-58.08-43.47a15 15 0 0 0-18 0l-78.37 59.44c-10.46 7.93-24.16-4.6-17.11-15.67l73-115.57a37.36 37.36 0 0 1 53.91-9.93l58.06 43.46a15 15 0 0 0 18 0l78.41-59.38c10.44-7.98 24.14 4.54 17.09 15.62z\"]\n};\nconst faAudible = {\n  prefix: 'fab',\n  iconName: 'audible',\n  icon: [640, 512, [], \"f373\", \"M640 199.9v54l-320 200L0 254v-54l320 200 320-200.1zm-194.5 72l47.1-29.4c-37.2-55.8-100.7-92.6-172.7-92.6-72 0-135.5 36.7-172.6 92.4h.3c2.5-2.3 5.1-4.5 7.7-6.7 89.7-74.4 219.4-58.1 290.2 36.3zm-220.1 18.8c16.9-11.9 36.5-18.7 57.4-18.7 34.4 0 65.2 18.4 86.4 47.6l45.4-28.4c-20.9-29.9-55.6-49.5-94.8-49.5-38.9 0-73.4 19.4-94.4 49zM103.6 161.1c131.8-104.3 318.2-76.4 417.5 62.1l.7 1 48.8-30.4C517.1 112.1 424.8 58.1 319.9 58.1c-103.5 0-196.6 53.5-250.5 135.6 9.9-10.5 22.7-23.5 34.2-32.6zm467 32.7z\"]\n};\nconst faThinkPeaks = {\n  prefix: 'fab',\n  iconName: 'think-peaks',\n  icon: [576, 512, [], \"f731\", \"M465.4 409.4l87.1-150.2-32-.3-55.1 95L259.2 0 23 407.4l32 .3L259.2 55.6zm-355.3-44.1h32.1l117.4-202.5L463 511.9l32.5.1-235.8-404.6z\"]\n};\nconst faBilibili = {\n  prefix: 'fab',\n  iconName: 'bilibili',\n  icon: [512, 512, [], \"e3d9\", \"M488.6 104.1C505.3 122.2 513 143.8 511.9 169.8V372.2C511.5 398.6 502.7 420.3 485.4 437.3C468.2 454.3 446.3 463.2 419.9 464H92.02C65.57 463.2 43.81 454.2 26.74 436.8C9.682 419.4 .7667 396.5 0 368.2V169.8C.7667 143.8 9.682 122.2 26.74 104.1C43.81 87.75 65.57 78.77 92.02 78H121.4L96.05 52.19C90.3 46.46 87.42 39.19 87.42 30.4C87.42 21.6 90.3 14.34 96.05 8.603C101.8 2.868 109.1 0 117.9 0C126.7 0 134 2.868 139.8 8.603L213.1 78H301.1L375.6 8.603C381.7 2.868 389.2 0 398 0C406.8 0 414.1 2.868 419.9 8.603C425.6 14.34 428.5 21.6 428.5 30.4C428.5 39.19 425.6 46.46 419.9 52.19L394.6 78L423.9 78C450.3 78.77 471.9 87.75 488.6 104.1H488.6zM449.8 173.8C449.4 164.2 446.1 156.4 439.1 150.3C433.9 144.2 425.1 140.9 416.4 140.5H96.05C86.46 140.9 78.6 144.2 72.47 150.3C66.33 156.4 63.07 164.2 62.69 173.8V368.2C62.69 377.4 65.95 385.2 72.47 391.7C78.99 398.2 86.85 401.5 96.05 401.5H416.4C425.6 401.5 433.4 398.2 439.7 391.7C446 385.2 449.4 377.4 449.8 368.2L449.8 173.8zM185.5 216.5C191.8 222.8 195.2 230.6 195.6 239.7V273C195.2 282.2 191.9 289.9 185.8 296.2C179.6 302.5 171.8 305.7 162.2 305.7C152.6 305.7 144.7 302.5 138.6 296.2C132.5 289.9 129.2 282.2 128.8 273V239.7C129.2 230.6 132.6 222.8 138.9 216.5C145.2 210.2 152.1 206.9 162.2 206.5C171.4 206.9 179.2 210.2 185.5 216.5H185.5zM377 216.5C383.3 222.8 386.7 230.6 387.1 239.7V273C386.7 282.2 383.4 289.9 377.3 296.2C371.2 302.5 363.3 305.7 353.7 305.7C344.1 305.7 336.3 302.5 330.1 296.2C323.1 289.9 320.7 282.2 320.4 273V239.7C320.7 230.6 324.1 222.8 330.4 216.5C336.7 210.2 344.5 206.9 353.7 206.5C362.9 206.9 370.7 210.2 377 216.5H377z\"]\n};\nconst faErlang = {\n  prefix: 'fab',\n  iconName: 'erlang',\n  icon: [640, 512, [], \"f39d\", \"M87.2 53.5H0v405h100.4c-49.7-52.6-78.8-125.3-78.7-212.1-.1-76.7 24-142.7 65.5-192.9zm238.2 9.7c-45.9.1-85.1 33.5-89.2 83.2h169.9c-1.1-49.7-34.5-83.1-80.7-83.2zm230.7-9.6h.3l-.1-.1zm.3 0c31.4 42.7 48.7 97.5 46.2 162.7.5 6 .5 11.7 0 24.1H230.2c-.2 109.7 38.9 194.9 138.6 195.3 68.5-.3 118-51 151.9-106.1l96.4 48.2c-17.4 30.9-36.5 57.8-57.9 80.8H640v-405z\"]\n};\nconst faXTwitter = {\n  prefix: 'fab',\n  iconName: 'x-twitter',\n  icon: [512, 512, [], \"e61b\", \"M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z\"]\n};\nconst faCottonBureau = {\n  prefix: 'fab',\n  iconName: 'cotton-bureau',\n  icon: [512, 512, [], \"f89e\", \"M474.31 330.41c-23.66 91.85-94.23 144.59-201.9 148.35V429.6c0-48 26.41-74.39 74.39-74.39 62 0 99.2-37.2 99.2-99.21 0-61.37-36.53-98.28-97.38-99.06-33-69.32-146.5-64.65-177.24 0C110.52 157.72 74 194.63 74 256c0 62.13 37.27 99.41 99.4 99.41 48 0 74.55 26.23 74.55 74.39V479c-134.43-5-211.1-85.07-211.1-223 0-141.82 81.35-223.2 223.2-223.2 114.77 0 189.84 53.2 214.69 148.81H500C473.88 71.51 388.22 8 259.82 8 105 8 12 101.19 12 255.82 12 411.14 105.19 504.34 259.82 504c128.27 0 213.87-63.81 239.67-173.59zM357 182.33c41.37 3.45 64.2 29 64.2 73.67 0 48-26.43 74.41-74.4 74.41-28.61 0-49.33-9.59-61.59-27.33 83.06-16.55 75.59-99.67 71.79-120.75zm-81.68 97.36c-2.46-10.34-16.33-87 56.23-97 2.27 10.09 16.52 87.11-56.26 97zM260 132c28.61 0 49 9.67 61.44 27.61-28.36 5.48-49.36 20.59-61.59 43.45-12.23-22.86-33.23-38-61.6-43.45 12.41-17.69 33.27-27.35 61.57-27.35zm-71.52 50.72c73.17 10.57 58.91 86.81 56.49 97-72.41-9.84-59-86.95-56.25-97zM173.2 330.41c-48 0-74.4-26.4-74.4-74.41 0-44.36 22.86-70 64.22-73.67-6.75 37.2-1.38 106.53 71.65 120.75-12.14 17.63-32.84 27.3-61.14 27.3zm53.21 12.39A80.8 80.8 0 0 0 260 309.25c7.77 14.49 19.33 25.54 33.82 33.55a80.28 80.28 0 0 0-33.58 33.83c-8-14.5-19.07-26.23-33.56-33.83z\"]\n};\nconst faDashcube = {\n  prefix: 'fab',\n  iconName: 'dashcube',\n  icon: [448, 512, [], \"f210\", \"M326.6 104H110.4c-51.1 0-91.2 43.3-91.2 93.5V427c0 50.5 40.1 85 91.2 85h227.2c51.1 0 91.2-34.5 91.2-85V0L326.6 104zM153.9 416.5c-17.7 0-32.4-15.1-32.4-32.8V240.8c0-17.7 14.7-32.5 32.4-32.5h140.7c17.7 0 32 14.8 32 32.5v123.5l51.1 52.3H153.9z\"]\n};\nconst fa42Group = {\n  prefix: 'fab',\n  iconName: '42-group',\n  icon: [640, 512, [\"innosoft\"], \"e080\", \"M320 96V416C341.011 416 361.818 411.861 381.23 403.821C400.641 395.78 418.28 383.995 433.138 369.138C447.995 354.28 459.78 336.641 467.821 317.23C475.861 297.818 480 277.011 480 256C480 234.989 475.861 214.182 467.821 194.771C459.78 175.359 447.995 157.72 433.138 142.863C418.28 128.005 400.641 116.22 381.23 108.179C361.818 100.139 341.011 96 320 96ZM0 256L160.002 416L320.003 256L160.002 96L0 256ZM480 256C480 277.011 484.138 297.818 492.179 317.23C500.219 336.643 512.005 354.28 526.862 369.138C541.72 383.995 559.357 395.781 578.77 403.821C598.182 411.862 618.989 416 640 416V96C597.565 96 556.869 112.858 526.862 142.863C496.857 172.869 480 213.565 480 256Z\"]\n};\nconst faInnosoft = fa42Group;\nconst faStackExchange = {\n  prefix: 'fab',\n  iconName: 'stack-exchange',\n  icon: [448, 512, [], \"f18d\", \"M17.7 332.3h412.7v22c0 37.7-29.3 68-65.3 68h-19L259.3 512v-89.7H83c-36 0-65.3-30.3-65.3-68v-22zm0-23.6h412.7v-85H17.7v85zm0-109.4h412.7v-85H17.7v85zM365 0H83C47 0 17.7 30.3 17.7 67.7V90h412.7V67.7C430.3 30.3 401 0 365 0z\"]\n};\nconst faElementor = {\n  prefix: 'fab',\n  iconName: 'elementor',\n  icon: [512, 512, [], \"f430\", \"M.361 256C.361 397 114 511 255 511C397 511 511 397 511 256C511 116 397 2.05 255 2.05C114 2.05 .361 116 .361 256zM192 150V363H149V150H192zM234 150H362V193H234V150zM362 235V278H234V235H362zM234 320H362V363H234V320z\"]\n};\nconst faSquarePiedPiper = {\n  prefix: 'fab',\n  iconName: 'square-pied-piper',\n  icon: [448, 512, [\"pied-piper-square\"], \"e01e\", \"M32 419L0 479.2l.8-328C.8 85.3 54 32 120 32h327.2c-93 28.9-189.9 94.2-253.9 168.6C122.7 282 82.6 338 32 419M448 32S305.2 98.8 261.6 199.1c-23.2 53.6-28.9 118.1-71 158.6-28.9 27.8-69.8 38.2-105.3 56.3-23.2 12-66.4 40.5-84.9 66h328.4c66 0 119.3-53.3 119.3-119.2-.1 0-.1-328.8-.1-328.8z\"]\n};\nconst faPiedPiperSquare = faSquarePiedPiper;\nconst faCreativeCommonsNd = {\n  prefix: 'fab',\n  iconName: 'creative-commons-nd',\n  icon: [496, 512, [], \"f4eb\", \"M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm94 144.3v42.5H162.1V197h180.3zm0 79.8v42.5H162.1v-42.5h180.3z\"]\n};\nconst faPalfed = {\n  prefix: 'fab',\n  iconName: 'palfed',\n  icon: [576, 512, [], \"f3d8\", \"M384.9 193.9c0-47.4-55.2-44.2-95.4-29.8-1.3 39.4-2.5 80.7-3 119.8.7 2.8 2.6 6.2 15.1 6.2 36.8 0 83.4-42.8 83.3-96.2zm-194.5 72.2c.2 0 6.5-2.7 11.2-2.7 26.6 0 20.7 44.1-14.4 44.1-21.5 0-37.1-18.1-37.1-43 0-42 42.9-95.6 100.7-126.5 1-12.4 3-22 10.5-28.2 11.2-9 26.6-3.5 29.5 11.1 72.2-22.2 135.2 1 135.2 72 0 77.9-79.3 152.6-140.1 138.2-.1 39.4.9 74.4 2.7 100v.2c.2 3.4.6 12.5-5.3 19.1-9.6 10.6-33.4 10-36.4-22.3-4.1-44.4.2-206.1 1.4-242.5-21.5 15-58.5 50.3-58.5 75.9.2 2.5.4 4 .6 4.6zM8 181.1s-.1 37.4 38.4 37.4h30l22.4 217.2s0 44.3 44.7 44.3h288.9s44.7-.4 44.7-44.3l22.4-217.2h30s38.4 1.2 38.4-37.4c0 0 .1-37.4-38.4-37.4h-30.1c-7.3-25.6-30.2-74.3-119.4-74.3h-28V50.3s-2.7-18.4-21.1-18.4h-85.8s-21.1 0-21.1 18.4v19.1h-28.1s-105 4.2-120.5 74.3h-29S8 142.5 8 181.1z\"]\n};\nconst faSuperpowers = {\n  prefix: 'fab',\n  iconName: 'superpowers',\n  icon: [448, 512, [], \"f2dd\", \"M448 32c-83.3 11-166.8 22-250 33-92 12.5-163.3 86.7-169 180-3.3 55.5 18 109.5 57.8 148.2L0 480c83.3-11 166.5-22 249.8-33 91.8-12.5 163.3-86.8 168.7-179.8 3.5-55.5-18-109.5-57.7-148.2L448 32zm-79.7 232.3c-4.2 79.5-74 139.2-152.8 134.5-79.5-4.7-140.7-71-136.3-151 4.5-79.2 74.3-139.3 153-134.5 79.3 4.7 140.5 71 136.1 151z\"]\n};\nconst faResolving = {\n  prefix: 'fab',\n  iconName: 'resolving',\n  icon: [496, 512, [], \"f3e7\", \"M281.2 278.2c46-13.3 49.6-23.5 44-43.4L314 195.5c-6.1-20.9-18.4-28.1-71.1-12.8L54.7 236.8l28.6 98.6 197.9-57.2zM248.5 8C131.4 8 33.2 88.7 7.2 197.5l221.9-63.9c34.8-10.2 54.2-11.7 79.3-8.2 36.3 6.1 52.7 25 61.4 55.2l10.7 37.8c8.2 28.1 1 50.6-23.5 73.6-19.4 17.4-31.2 24.5-61.4 33.2L203 351.8l220.4 27.1 9.7 34.2-48.1 13.3-286.8-37.3 23 80.2c36.8 22 80.3 34.7 126.3 34.7 137 0 248.5-111.4 248.5-248.3C497 119.4 385.5 8 248.5 8zM38.3 388.6L0 256.8c0 48.5 14.3 93.4 38.3 131.8z\"]\n};\nconst faXbox = {\n  prefix: 'fab',\n  iconName: 'xbox',\n  icon: [512, 512, [], \"f412\", \"M369.9 318.2c44.3 54.3 64.7 98.8 54.4 118.7-7.9 15.1-56.7 44.6-92.6 55.9-29.6 9.3-68.4 13.3-100.4 10.2-38.2-3.7-76.9-17.4-110.1-39C93.3 445.8 87 438.3 87 423.4c0-29.9 32.9-82.3 89.2-142.1 32-33.9 76.5-73.7 81.4-72.6 9.4 2.1 84.3 75.1 112.3 109.5zM188.6 143.8c-29.7-26.9-58.1-53.9-86.4-63.4-15.2-5.1-16.3-4.8-28.7 8.1-29.2 30.4-53.5 79.7-60.3 122.4-5.4 34.2-6.1 43.8-4.2 60.5 5.6 50.5 17.3 85.4 40.5 120.9 9.5 14.6 12.1 17.3 9.3 9.9-4.2-11-.3-37.5 9.5-64 14.3-39 53.9-112.9 120.3-194.4zm311.6 63.5C483.3 127.3 432.7 77 425.6 77c-7.3 0-24.2 6.5-36 13.9-23.3 14.5-41 31.4-64.3 52.8C367.7 197 427.5 283.1 448.2 346c6.8 20.7 9.7 41.1 7.4 52.3-1.7 8.5-1.7 8.5 1.4 4.6 6.1-7.7 19.9-31.3 25.4-43.5 7.4-16.2 15-40.2 18.6-58.7 4.3-22.5 3.9-70.8-.8-93.4zM141.3 43C189 40.5 251 77.5 255.6 78.4c.7.1 10.4-4.2 21.6-9.7 63.9-31.1 94-25.8 107.4-25.2-63.9-39.3-152.7-50-233.9-11.7-23.4 11.1-24 11.9-9.4 11.2z\"]\n};\nconst faSquareWebAwesomeStroke = {\n  prefix: 'fab',\n  iconName: 'square-web-awesome-stroke',\n  icon: [448, 512, [], \"e684\", \"M64 64C46.3 64 32 78.3 32 96l0 320c0 17.7 14.3 32 32 32l320 0c17.7 0 32-14.3 32-32l0-320c0-17.7-14.3-32-32-32L64 64zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm235 81.6L288 224l52.2-10.4c-2.6-3.9-4.2-8.5-4.2-13.6c0-13.3 10.7-24 24-24s24 10.7 24 24c0 13-10.3 23.6-23.2 24L304.5 349.1c-5.2 11.5-16.6 18.9-29.2 18.9l-102.6 0c-12.6 0-24-7.4-29.2-18.9L87.2 224C74.3 223.6 64 213 64 200c0-13.3 10.7-24 24-24s24 10.7 24 24c0 5-1.5 9.7-4.2 13.6L160 224l53.1-46.4c-8.9-4.1-15-13.1-15-23.6c0-14.4 11.6-26 26-26s26 11.6 26 26c0 10.5-6.2 19.5-15.1 23.6z\"]\n};\nconst faSearchengin = {\n  prefix: 'fab',\n  iconName: 'searchengin',\n  icon: [460, 512, [], \"f3eb\", \"M220.6 130.3l-67.2 28.2V43.2L98.7 233.5l54.7-24.2v130.3l67.2-209.3zm-83.2-96.7l-1.3 4.7-15.2 52.9C80.6 106.7 52 145.8 52 191.5c0 52.3 34.3 95.9 83.4 105.5v53.6C57.5 340.1 0 272.4 0 191.6c0-80.5 59.8-147.2 137.4-158zm311.4 447.2c-11.2 11.2-23.1 12.3-28.6 10.5-5.4-1.8-27.1-19.9-60.4-44.4-33.3-24.6-33.6-35.7-43-56.7-9.4-20.9-30.4-42.6-57.5-52.4l-9.7-14.7c-24.7 16.9-53 26.9-81.3 28.7l2.1-6.6 15.9-49.5c46.5-11.9 80.9-54 80.9-104.2 0-54.5-38.4-102.1-96-107.1V32.3C254.4 37.4 320 106.8 320 191.6c0 33.6-11.2 64.7-29 90.4l14.6 9.6c9.8 27.1 31.5 48 52.4 57.4s32.2 9.7 56.8 43c24.6 33.2 42.7 54.9 44.5 60.3s.7 17.3-10.5 28.5zm-9.9-17.9c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8z\"]\n};\nconst faTiktok = {\n  prefix: 'fab',\n  iconName: 'tiktok',\n  icon: [448, 512, [], \"e07b\", \"M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z\"]\n};\nconst faSquareFacebook = {\n  prefix: 'fab',\n  iconName: 'square-facebook',\n  icon: [448, 512, [\"facebook-square\"], \"f082\", \"M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64h98.2V334.2H109.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H255V480H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z\"]\n};\nconst faFacebookSquare = faSquareFacebook;\nconst faRenren = {\n  prefix: 'fab',\n  iconName: 'renren',\n  icon: [512, 512, [], \"f18b\", \"M214 169.1c0 110.4-61 205.4-147.6 247.4C30 373.2 8 317.7 8 256.6 8 133.9 97.1 32.2 214 12.5v156.6zM255 504c-42.9 0-83.3-11-118.5-30.4C193.7 437.5 239.9 382.9 255 319c15.5 63.9 61.7 118.5 118.8 154.7C338.7 493 298.3 504 255 504zm190.6-87.5C359 374.5 298 279.6 298 169.1V12.5c116.9 19.7 206 121.4 206 244.1 0 61.1-22 116.6-58.4 159.9z\"]\n};\nconst faLinux = {\n  prefix: 'fab',\n  iconName: 'linux',\n  icon: [448, 512, [], \"f17c\", \"M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z\"]\n};\nconst faGlide = {\n  prefix: 'fab',\n  iconName: 'glide',\n  icon: [448, 512, [], \"f2a5\", \"M252.8 148.6c0 8.8-1.6 17.7-3.4 26.4-5.8 27.8-11.6 55.8-17.3 83.6-1.4 6.3-8.3 4.9-13.7 4.9-23.8 0-30.5-26-30.5-45.5 0-29.3 11.2-68.1 38.5-83.1 4.3-2.5 9.2-4.2 14.1-4.2 11.4 0 12.3 8.3 12.3 17.9zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-64 187c0-5.1-20.8-37.7-25.5-39.5-2.2-.9-7.2-2.3-9.6-2.3-23.1 0-38.7 10.5-58.2 21.5l-.5-.5c4.3-29.4 14.6-57.2 14.6-87.4 0-44.6-23.8-62.7-67.5-62.7-71.7 0-108 70.8-108 123.5 0 54.7 32 85 86.3 85 7.5 0 6.9-.6 6.9 2.3-10.5 80.3-56.5 82.9-56.5 58.9 0-24.4 28-36.5 28.3-38-.2-7.6-29.3-17.2-36.7-17.2-21.1 0-32.7 33-32.7 50.6 0 32.3 20.4 54.7 53.3 54.7 48.2 0 83.4-49.7 94.3-91.7 9.4-37.7 7-39.4 12.3-42.1 20-10.1 35.8-16.8 58.4-16.8 11.1 0 19 2.3 36.7 5.2 1.8.1 4.1-1.7 4.1-3.5z\"]\n};\nconst faLinkedin = {\n  prefix: 'fab',\n  iconName: 'linkedin',\n  icon: [448, 512, [], \"f08c\", \"M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z\"]\n};\nconst faHubspot = {\n  prefix: 'fab',\n  iconName: 'hubspot',\n  icon: [512, 512, [], \"f3b2\", \"M267.4 211.6c-25.1 23.7-40.8 57.3-40.8 94.6 0 29.3 9.7 56.3 26 78L203.1 434c-4.4-1.6-9.1-2.5-14-2.5-10.8 0-20.9 4.2-28.5 11.8-7.6 7.6-11.8 17.8-11.8 28.6s4.2 20.9 11.8 28.5c7.6 7.6 17.8 11.6 28.5 11.6 10.8 0 20.9-3.9 28.6-11.6 7.6-7.6 11.8-17.8 11.8-28.5 0-4.2-.6-8.2-1.9-12.1l50-50.2c22 16.9 49.4 26.9 79.3 26.9 71.9 0 130-58.3 130-130.2 0-65.2-47.7-119.2-110.2-128.7V116c17.5-7.4 28.2-23.8 28.2-42.9 0-26.1-20.9-47.9-47-47.9S311.2 47 311.2 73.1c0 19.1 10.7 35.5 28.2 42.9v61.2c-15.2 2.1-29.6 6.7-42.7 13.6-27.6-20.9-117.5-85.7-168.9-124.8 1.2-4.4 2-9 2-13.8C129.8 23.4 106.3 0 77.4 0 48.6 0 25.2 23.4 25.2 52.2c0 28.9 23.4 52.3 52.2 52.3 9.8 0 18.9-2.9 26.8-7.6l163.2 114.7zm89.5 163.6c-38.1 0-69-30.9-69-69s30.9-69 69-69 69 30.9 69 69-30.9 69-69 69z\"]\n};\nconst faDeploydog = {\n  prefix: 'fab',\n  iconName: 'deploydog',\n  icon: [512, 512, [], \"f38e\", \"M382.2 136h51.7v239.6h-51.7v-20.7c-19.8 24.8-52.8 24.1-73.8 14.7-26.2-11.7-44.3-38.1-44.3-71.8 0-29.8 14.8-57.9 43.3-70.8 20.2-9.1 52.7-10.6 74.8 12.9V136zm-64.7 161.8c0 18.2 13.6 33.5 33.2 33.5 19.8 0 33.2-16.4 33.2-32.9 0-17.1-13.7-33.2-33.2-33.2-19.6 0-33.2 16.4-33.2 32.6zM188.5 136h51.7v239.6h-51.7v-20.7c-19.8 24.8-52.8 24.1-73.8 14.7-26.2-11.7-44.3-38.1-44.3-71.8 0-29.8 14.8-57.9 43.3-70.8 20.2-9.1 52.7-10.6 74.8 12.9V136zm-64.7 161.8c0 18.2 13.6 33.5 33.2 33.5 19.8 0 33.2-16.4 33.2-32.9 0-17.1-13.7-33.2-33.2-33.2-19.7 0-33.2 16.4-33.2 32.6zM448 96c17.5 0 32 14.4 32 32v256c0 17.5-14.4 32-32 32H64c-17.5 0-32-14.4-32-32V128c0-17.5 14.4-32 32-32h384m0-32H64C28.8 64 0 92.8 0 128v256c0 35.2 28.8 64 64 64h384c35.2 0 64-28.8 64-64V128c0-35.2-28.8-64-64-64z\"]\n};\nconst faTwitch = {\n  prefix: 'fab',\n  iconName: 'twitch',\n  icon: [512, 512, [], \"f1e8\", \"M391.17,103.47H352.54v109.7h38.63ZM285,103H246.37V212.75H285ZM120.83,0,24.31,91.42V420.58H140.14V512l96.53-91.42h77.25L487.69,256V0ZM449.07,237.75l-77.22,73.12H294.61l-67.6,64v-64H140.14V36.58H449.07Z\"]\n};\nconst faFlutter = {\n  prefix: 'fab',\n  iconName: 'flutter',\n  icon: [448, 512, [], \"e694\", \"M429.5 236.3L291.7 374.1 429.5 512H272l-59.1-59.1-78.8-78.8L272 236.3H429.5zM272 0L16 256l78.8 78.8L429.5 0H272z\"]\n};\nconst faRavelry = {\n  prefix: 'fab',\n  iconName: 'ravelry',\n  icon: [512, 512, [], \"f2d9\", \"M498.252,234.223c-1.208-10.34-1.7-20.826-3.746-31a310.306,310.306,0,0,0-9.622-36.6,184.068,184.068,0,0,0-30.874-57.5,251.154,251.154,0,0,0-18.818-21.689,237.362,237.362,0,0,0-47.113-36.116A240.8,240.8,0,0,0,331.356,26.65c-11.018-3.1-22.272-5.431-33.515-7.615-6.78-1.314-13.749-1.667-20.627-2.482-.316-.036-.6-.358-.9-.553q-16.143.009-32.288.006c-2.41.389-4.808.925-7.236,1.15a179.331,179.331,0,0,0-34.256,7.1,221.5,221.5,0,0,0-39.768,16.355,281.385,281.385,0,0,0-38.08,24.158c-6.167,4.61-12.268,9.36-17.974,14.518C96.539,88.494,86.34,97.72,76.785,107.555a243.878,243.878,0,0,0-33.648,43.95,206.488,206.488,0,0,0-20.494,44.6,198.2,198.2,0,0,0-7.691,34.759A201.13,201.13,0,0,0,13.4,266.385a299.716,299.716,0,0,0,4.425,40.24,226.865,226.865,0,0,0,16.73,53.3,210.543,210.543,0,0,0,24,39.528,213.589,213.589,0,0,0,26.358,28.416A251.313,251.313,0,0,0,126.7,458.455a287.831,287.831,0,0,0,55.9,25.277,269.5,269.5,0,0,0,40.641,9.835c6.071,1.01,12.275,1.253,18.412,1.873a4.149,4.149,0,0,1,1.19.56h32.289c2.507-.389,5-.937,7.527-1.143,16.336-1.332,32.107-5.335,47.489-10.717A219.992,219.992,0,0,0,379.1,460.322c9.749-6.447,19.395-13.077,28.737-20.1,5.785-4.348,10.988-9.5,16.3-14.457,3.964-3.7,7.764-7.578,11.51-11.5a232.162,232.162,0,0,0,31.427-41.639c9.542-16.045,17.355-32.905,22.3-50.926,2.859-10.413,4.947-21.045,7.017-31.652,1.032-5.279,1.251-10.723,1.87-16.087.036-.317.358-.6.552-.9V236.005A9.757,9.757,0,0,1,498.252,234.223Zm-161.117-1.15s-16.572-2.98-28.47-2.98c-27.2,0-33.57,14.9-33.57,37.04V360.8H201.582V170.062H275.1v31.931c8.924-26.822,26.771-36.189,62.04-36.189Z\"]\n};\nconst faMixer = {\n  prefix: 'fab',\n  iconName: 'mixer',\n  icon: [512, 512, [], \"e056\", \"M114.57,76.07a45.71,45.71,0,0,0-67.51-6.41c-17.58,16.18-19,43.52-4.75,62.77l91.78,123L41.76,379.58c-14.23,19.25-13.11,46.59,4.74,62.77A45.71,45.71,0,0,0,114,435.94L242.89,262.7a12.14,12.14,0,0,0,0-14.23ZM470.24,379.58,377.91,255.45l91.78-123c14.22-19.25,12.83-46.59-4.75-62.77a45.71,45.71,0,0,0-67.51,6.41l-128,172.12a12.14,12.14,0,0,0,0,14.23L398,435.94a45.71,45.71,0,0,0,67.51,6.41C483.35,426.17,484.47,398.83,470.24,379.58Z\"]\n};\nconst faSquareLastfm = {\n  prefix: 'fab',\n  iconName: 'square-lastfm',\n  icon: [448, 512, [\"lastfm-square\"], \"f203\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM210.7 280.8c-1.8-5.5-3.4-10.8-5-15.9c-12.9-41.9-21-68.4-58-68.4c-22.4 0-45.1 16.1-45.1 61.2c0 35.2 18 57.2 43.3 57.2c28.6 0 47.6-21.3 47.6-21.3l11.7 31.9s-19.8 19.4-61.2 19.4c-51.3 0-79.9-30.1-79.9-85.8c0-57.9 28.6-92 82.5-92c67.9 0 79.3 35.3 96.4 88.4c1.4 4.4 2.9 8.9 4.4 13.5c8.8 26.8 24.2 46.2 61.2 46.2c24.9 0 38.1-5.5 38.1-19.1c0-17.5-16.9-21.2-40-26.4c-3.2-.7-6.5-1.4-9.9-2.2c-30.4-7.3-42.5-23.1-42.5-48c0-40 32.3-52.4 65.2-52.4c37.4 0 60.1 13.6 63 46.6l-36.7 4.4c-1.5-15.8-11-22.4-28.6-22.4c-16.1 0-26 7.3-26 19.8c0 11 4.8 17.6 20.9 21.3c2.2 .5 4.5 1 6.7 1.4c31.1 6.5 65.1 13.7 65.1 56.1c.1 36.7-30.7 50.6-76.1 50.6c-63.4 0-85.4-28.6-97.1-64.1z\"]\n};\nconst faLastfmSquare = faSquareLastfm;\nconst faVimeo = {\n  prefix: 'fab',\n  iconName: 'vimeo',\n  icon: [448, 512, [], \"f40a\", \"M403.2 32H44.8C20.1 32 0 52.1 0 76.8v358.4C0 459.9 20.1 480 44.8 480h358.4c24.7 0 44.8-20.1 44.8-44.8V76.8c0-24.7-20.1-44.8-44.8-44.8zM377 180.8c-1.4 31.5-23.4 74.7-66 129.4-44 57.2-81.3 85.8-111.7 85.8-18.9 0-34.8-17.4-47.9-52.3-25.5-93.3-36.4-148-57.4-148-2.4 0-10.9 5.1-25.4 15.2l-15.2-19.6c37.3-32.8 72.9-69.2 95.2-71.2 25.2-2.4 40.7 14.8 46.5 51.7 20.7 131.2 29.9 151 67.6 91.6 13.5-21.4 20.8-37.7 21.8-48.9 3.5-33.2-25.9-30.9-45.8-22.4 15.9-52.1 46.3-77.4 91.2-76 33.3.9 49 22.5 47.1 64.7z\"]\n};\nconst faMendeley = {\n  prefix: 'fab',\n  iconName: 'mendeley',\n  icon: [640, 512, [], \"f7b3\", \"M624.6 325.2c-12.3-12.4-29.7-19.2-48.4-17.2-43.3-1-49.7-34.9-37.5-98.8 22.8-57.5-14.9-131.5-87.4-130.8-77.4.7-81.7 82-130.9 82-48.1 0-54-81.3-130.9-82-72.9-.8-110.1 73.3-87.4 130.8 12.2 63.9 5.8 97.8-37.5 98.8-21.2-2.3-37 6.5-53 22.5-19.9 19.7-19.3 94.8 42.6 102.6 47.1 5.9 81.6-42.9 61.2-87.8-47.3-103.7 185.9-106.1 146.5-8.2-.1.1-.2.2-.3.4-26.8 42.8 6.8 97.4 58.8 95.2 52.1 2.1 85.4-52.6 58.8-95.2-.1-.2-.2-.3-.3-.4-39.4-97.9 193.8-95.5 146.5 8.2-4.6 10-6.7 21.3-5.7 33 4.9 53.4 68.7 74.1 104.9 35.2 17.8-14.8 23.1-65.6 0-88.3zm-303.9-19.1h-.6c-43.4 0-62.8-37.5-62.8-62.8 0-34.7 28.2-62.8 62.8-62.8h.6c34.7 0 62.8 28.1 62.8 62.8 0 25-19.2 62.8-62.8 62.8z\"]\n};\nconst faUniregistry = {\n  prefix: 'fab',\n  iconName: 'uniregistry',\n  icon: [384, 512, [], \"f404\", \"M192 480c39.5 0 76.2-11.8 106.8-32.2H85.3C115.8 468.2 152.5 480 192 480zm-89.1-193.1v-12.4H0v12.4c0 2.5 0 5 .1 7.4h103.1c-.2-2.4-.3-4.9-.3-7.4zm20.5 57H8.5c2.6 8.5 5.8 16.8 9.6 24.8h138.3c-12.9-5.7-24.1-14.2-33-24.8zm-17.7-34.7H1.3c.9 7.6 2.2 15 3.9 22.3h109.7c-4-6.9-7.2-14.4-9.2-22.3zm-2.8-69.3H0v17.3h102.9zm0-173.2H0v4.9h102.9zm0-34.7H0v2.5h102.9zm0 69.3H0v7.4h102.9zm0 104H0v14.8h102.9zm0-69.3H0v9.9h102.9zm0 34.6H0V183h102.9zm166.2 160.9h109.7c1.8-7.3 3.1-14.7 3.9-22.3H278.3c-2.1 7.9-5.2 15.4-9.2 22.3zm12-185.7H384V136H281.1zm0 37.2H384v-12.4H281.1zm0-74.3H384v-7.4H281.1zm0-76.7v2.5H384V32zm-203 410.9h227.7c11.8-8.7 22.7-18.6 32.2-29.7H44.9c9.6 11 21.4 21 33.2 29.7zm203-371.3H384v-4.9H281.1zm0 148.5H384v-14.8H281.1zM38.8 405.7h305.3c6.7-8.5 12.6-17.6 17.8-27.2H23c5.2 9.6 9.2 18.7 15.8 27.2zm188.8-37.1H367c3.7-8 5.8-16.2 8.5-24.8h-115c-8.8 10.7-20.1 19.2-32.9 24.8zm53.5-81.7c0 2.5-.1 5-.4 7.4h103.1c.1-2.5.2-4.9.2-7.4v-12.4H281.1zm0-29.7H384v-17.3H281.1z\"]\n};\nconst faFigma = {\n  prefix: 'fab',\n  iconName: 'figma',\n  icon: [384, 512, [], \"f799\", \"M14 95.7924C14 42.8877 56.8878 0 109.793 0H274.161C327.066 0 369.954 42.8877 369.954 95.7924C369.954 129.292 352.758 158.776 326.711 175.897C352.758 193.019 369.954 222.502 369.954 256.002C369.954 308.907 327.066 351.795 274.161 351.795H272.081C247.279 351.795 224.678 342.369 207.666 326.904V415.167C207.666 468.777 163.657 512 110.309 512C57.5361 512 14 469.243 14 416.207C14 382.709 31.1945 353.227 57.2392 336.105C31.1945 318.983 14 289.5 14 256.002C14 222.502 31.196 193.019 57.2425 175.897C31.196 158.776 14 129.292 14 95.7924ZM176.288 191.587H109.793C74.2172 191.587 45.3778 220.427 45.3778 256.002C45.3778 291.44 73.9948 320.194 109.381 320.416C109.518 320.415 109.655 320.415 109.793 320.415H176.288V191.587ZM207.666 256.002C207.666 291.577 236.505 320.417 272.081 320.417H274.161C309.737 320.417 338.576 291.577 338.576 256.002C338.576 220.427 309.737 191.587 274.161 191.587H272.081C236.505 191.587 207.666 220.427 207.666 256.002ZM109.793 351.795C109.655 351.795 109.518 351.794 109.381 351.794C73.9948 352.015 45.3778 380.769 45.3778 416.207C45.3778 451.652 74.6025 480.622 110.309 480.622C146.591 480.622 176.288 451.186 176.288 415.167V351.795H109.793ZM109.793 31.3778C74.2172 31.3778 45.3778 60.2173 45.3778 95.7924C45.3778 131.368 74.2172 160.207 109.793 160.207H176.288V31.3778H109.793ZM207.666 160.207H274.161C309.737 160.207 338.576 131.368 338.576 95.7924C338.576 60.2173 309.737 31.3778 274.161 31.3778H207.666V160.207Z\"]\n};\nconst faCreativeCommonsRemix = {\n  prefix: 'fab',\n  iconName: 'creative-commons-remix',\n  icon: [496, 512, [], \"f4ee\", \"M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm161.7 207.7l4.9 2.2v70c-7.2 3.6-63.4 27.5-67.3 28.8-6.5-1.8-113.7-46.8-137.3-56.2l-64.2 26.6-63.3-27.5v-63.8l59.3-24.8c-.7-.7-.4 5-.4-70.4l67.3-29.7L361 178.5v61.6l49.1 20.3zm-70.4 81.5v-43.8h-.4v-1.8l-113.8-46.5V295l113.8 46.9v-.4l.4.4zm7.5-57.6l39.9-16.4-36.8-15.5-39 16.4 35.9 15.5zm52.3 38.1v-43L355.2 298v43.4l44.3-19z\"]\n};\nconst faCcAmazonPay = {\n  prefix: 'fab',\n  iconName: 'cc-amazon-pay',\n  icon: [576, 512, [], \"f42d\", \"M124.7 201.8c.1-11.8 0-23.5 0-35.3v-35.3c0-1.3.4-2 1.4-2.7 11.5-8 24.1-12.1 38.2-11.1 12.5.9 22.7 7 28.1 21.7 3.3 8.9 4.1 18.2 4.1 27.7 0 8.7-.7 17.3-3.4 25.6-5.7 17.8-18.7 24.7-35.7 23.9-11.7-.5-21.9-5-31.4-11.7-.9-.8-1.4-1.6-1.3-2.8zm154.9 14.6c4.6 1.8 9.3 2 14.1 1.5 11.6-1.2 21.9-5.7 31.3-12.5.9-.6 1.3-1.3 1.3-2.5-.1-3.9 0-7.9 0-11.8 0-4-.1-8 0-12 0-1.4-.4-2-1.8-2.2-7-.9-13.9-2.2-20.9-2.9-7-.6-14-.3-20.8 1.9-6.7 2.2-11.7 6.2-13.7 13.1-1.6 5.4-1.6 10.8.1 16.2 1.6 5.5 5.2 9.2 10.4 11.2zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zm-207.5 23.9c.4 1.7.9 3.4 1.6 5.1 16.5 40.6 32.9 81.3 49.5 121.9 1.4 3.5 1.7 6.4.2 9.9-2.8 6.2-4.9 12.6-7.8 18.7-2.6 5.5-6.7 9.5-12.7 11.2-4.2 1.1-8.5 1.3-12.9.9-2.1-.2-4.2-.7-6.3-.8-2.8-.2-4.2 1.1-4.3 4-.1 2.8-.1 5.6 0 8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98.7 106.9v175.3c0 .8 0 1.7.1 2.5.2 2.5 1.7 4.1 4.1 4.2 5.9.1 11.8.1 17.7 0 2.5 0 4-1.7 4.1-4.1.1-.8.1-1.7.1-2.5v-60.7c.9.7 1.4 1.2 1.9 1.6 15 12.5 32.2 16.6 51.1 12.9 17.1-3.4 28.9-13.9 36.7-29.2 5.8-11.6 8.3-24.1 8.7-37 .5-14.3-1-28.4-6.8-41.7-7.1-16.4-18.9-27.3-36.7-30.9-2.7-.6-5.5-.8-8.2-1.2h-7c-1.2.2-2.4.3-3.6.5-11.7 1.4-22.3 5.8-31.8 12.7-2 1.4-3.9 3-5.9 4.5-.1-.5-.3-.8-.4-1.2-.4-2.3-.7-4.6-1.1-6.9-.6-3.9-2.5-5.5-6.4-5.6h-9.7c-5.9-.1-6.9 1-6.9 6.8zM493.6 339c-2.7-.7-5.1 0-7.6 1-43.9 18.4-89.5 30.2-136.8 35.8-14.5 1.7-29.1 2.8-43.7 3.2-26.6.7-53.2-.8-79.6-4.3-17.8-2.4-35.5-5.7-53-9.9-37-8.9-72.7-21.7-106.7-38.8-8.8-4.4-17.4-9.3-26.1-14-3.8-2.1-6.2-1.5-8.2 2.1v1.7c1.2 1.6 2.2 3.4 3.7 4.8 36 32.2 76.6 56.5 122 72.9 21.9 7.9 44.4 13.7 67.3 17.5 14 2.3 28 3.8 42.2 4.5 3 .1 6 .2 9 .4.7 0 1.4.2 2.1.3h17.7c.7-.1 1.4-.3 2.1-.3 14.9-.4 29.8-1.8 44.6-4 21.4-3.2 42.4-8.1 62.9-14.7 29.6-9.6 57.7-22.4 83.4-40.1 2.8-1.9 5.7-3.8 8-6.2 4.3-4.4 2.3-10.4-3.3-11.9zm50.4-27.7c-.8-4.2-4-5.8-7.6-7-5.7-1.9-11.6-2.8-17.6-3.3-11-.9-22-.4-32.8 1.6-12 2.2-23.4 6.1-33.5 13.1-1.2.8-2.4 1.8-3.1 3-.6.9-.7 2.3-.5 3.4.3 1.3 1.7 1.6 3 1.5.6 0 1.2 0 1.8-.1l19.5-2.1c9.6-.9 19.2-1.5 28.8-.8 4.1.3 8.1 1.2 12 2.2 4.3 1.1 6.2 4.4 6.4 8.7.3 6.7-1.2 13.1-2.9 19.5-3.5 12.9-8.3 25.4-13.3 37.8-.3.8-.7 1.7-.8 2.5-.4 2.5 1 4 3.4 3.5 1.4-.3 3-1.1 4-2.1 3.7-3.6 7.5-7.2 10.6-11.2 10.7-13.8 17-29.6 20.7-46.6.7-3 1.2-6.1 1.7-9.1.2-4.7.2-9.6.2-14.5z\"]\n};\nconst faDropbox = {\n  prefix: 'fab',\n  iconName: 'dropbox',\n  icon: [528, 512, [], \"f16b\", \"M264.4 116.3l-132 84.3 132 84.3-132 84.3L0 284.1l132.3-84.3L0 116.3 132.3 32l132.1 84.3zM131.6 395.7l132-84.3 132 84.3-132 84.3-132-84.3zm132.8-111.6l132-84.3-132-83.6L395.7 32 528 116.3l-132.3 84.3L528 284.8l-132.3 84.3-131.3-85z\"]\n};\nconst faInstagram = {\n  prefix: 'fab',\n  iconName: 'instagram',\n  icon: [448, 512, [], \"f16d\", \"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z\"]\n};\nconst faCmplid = {\n  prefix: 'fab',\n  iconName: 'cmplid',\n  icon: [640, 512, [], \"e360\", \"M226.119,388.165a3.816,3.816,0,0,0-2.294-3.5,3.946,3.946,0,0,0-1.629-.385L72.6,384.3a19.243,19.243,0,0,1-17.924-26.025L81.585,255.692a35.72,35.72,0,0,1,32.373-26H262.525a7.07,7.07,0,0,0,6.392-5.194l10.769-41.131a3.849,3.849,0,0,0-2.237-4.937,3.755,3.755,0,0,0-1.377-.261c-.063,0-.126,0-.189.005H127.38a106.8,106.8,0,0,0-96.99,77.1L3.483,358.824A57.469,57.469,0,0,0,57.314,436q1.43,0,2.86-.072H208.742a7.131,7.131,0,0,0,6.391-5.193L225.839,389.6A3.82,3.82,0,0,0,226.119,388.165ZM306.658,81.2a3.861,3.861,0,0,0,.251-1.367A3.813,3.813,0,0,0,303.079,76c-.064,0-.128,0-.192,0h-41A7.034,7.034,0,0,0,255.5,81.2l-21.347,80.915h51.131ZM180.364,368.249H231.5L263.452,245.69H212.321ZM511.853,79.723a3.809,3.809,0,0,0-3.8-3.661c-.058,0-.137,0-.23.007h-41a7.1,7.1,0,0,0-6.584,5.129L368.91,430.634a3.54,3.54,0,0,0-.262,1.335,3.873,3.873,0,0,0,3.864,3.863c.056,0,.112,0,.169,0h41a7.068,7.068,0,0,0,6.392-5.193L511.533,81.2A3.624,3.624,0,0,0,511.853,79.723ZM324.649,384.47h-41a7.2,7.2,0,0,0-6.392,5.194L266.52,430.8a3.662,3.662,0,0,0-.268,1.374A3.783,3.783,0,0,0,270.023,436c.06,0,.166,0,.3-.012h40.905a7.036,7.036,0,0,0,6.391-5.193l10.769-41.131a3.75,3.75,0,0,0-3.445-5.208c-.108,0-.217,0-.326.014Zm311.324-308.4h-41a7.066,7.066,0,0,0-6.392,5.129l-91.46,349.436a4.073,4.073,0,0,0-.229,1.347,3.872,3.872,0,0,0,3.863,3.851c.056,0,.112,0,.169,0h40.968a7.1,7.1,0,0,0,6.392-5.193L639.68,81.2a3.624,3.624,0,0,0,.32-1.475,3.841,3.841,0,0,0-3.821-3.564c-.068,0-.137,0-.206.006ZM371.562,225.236l10.8-41.1a4.369,4.369,0,0,0,.227-1.388,3.869,3.869,0,0,0-3.861-3.842c-.057,0-.113,0-.169,0h-41.1a7.292,7.292,0,0,0-6.391,5.226l-10.834,41.1a4.417,4.417,0,0,0-.26,1.493c0,.069,0,.138,0,.206a3.776,3.776,0,0,0,3.757,3.507c.076,0,.18,0,.3-.012h41.129A7.034,7.034,0,0,0,371.562,225.236Z\"]\n};\nconst faUpwork = {\n  prefix: 'fab',\n  iconName: 'upwork',\n  icon: [641, 512, [], \"e641\", \"M494.7 295.6c-50.3 0-83.5-38.9-92.8-53.9c11.9-95.3 46.8-125.4 92.8-125.4c45.5 0 80.9 36.4 80.9 89.7s-35.4 89.7-80.9 89.7zm0-237.8c-81.9 0-127.8 53.4-141 108.4c-14.9-28-25.9-65.5-34.5-100.3H206v141c0 51.1-23.3 89-68.8 89s-71.6-37.8-71.6-89l.5-141H.8v141c0 41.1 13.3 78.4 37.6 105.1c25 27.5 59.2 41.8 98.8 41.8c78.8 0 133.8-60.4 133.8-146.9V112.1c8.2 31.2 27.8 91.1 65.3 143.6l-35 199.4h66.4l23.1-141.3c7.6 6.3 15.7 12 24.2 17c22.2 14 47.7 21.9 73.9 22.8c0 0 4 .2 6.1 .2c81.2 0 145.9-62.9 145.9-147.8s-64.8-148.1-146-148.1z\"]\n};\nconst faFacebook = {\n  prefix: 'fab',\n  iconName: 'facebook',\n  icon: [512, 512, [62000], \"f09a\", \"M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z\"]\n};\nconst faGripfire = {\n  prefix: 'fab',\n  iconName: 'gripfire',\n  icon: [384, 512, [], \"f3ac\", \"M112.5 301.4c0-73.8 105.1-122.5 105.1-203 0-47.1-34-88-39.1-90.4.4 3.3.6 6.7.6 10C179.1 110.1 32 171.9 32 286.6c0 49.8 32.2 79.2 66.5 108.3 65.1 46.7 78.1 71.4 78.1 86.6 0 10.1-4.8 17-4.8 22.3 13.1-16.7 17.4-31.9 17.5-46.4 0-29.6-21.7-56.3-44.2-86.5-16-22.3-32.6-42.6-32.6-69.5zm205.3-39c-12.1-66.8-78-124.4-94.7-130.9l4 7.2c2.4 5.1 3.4 10.9 3.4 17.1 0 44.7-54.2 111.2-56.6 116.7-2.2 5.1-3.2 10.5-3.2 15.8 0 20.1 15.2 42.1 17.9 42.1 2.4 0 56.6-55.4 58.1-87.7 6.4 11.7 9.1 22.6 9.1 33.4 0 41.2-41.8 96.9-41.8 96.9 0 11.6 31.9 53.2 35.5 53.2 1 0 2.2-1.4 3.2-2.4 37.9-39.3 67.3-85 67.3-136.8 0-8-.7-16.2-2.2-24.6z\"]\n};\nconst faJediOrder = {\n  prefix: 'fab',\n  iconName: 'jedi-order',\n  icon: [448, 512, [], \"f50e\", \"M398.5 373.6c95.9-122.1 17.2-233.1 17.2-233.1 45.4 85.8-41.4 170.5-41.4 170.5 105-171.5-60.5-271.5-60.5-271.5 96.9 72.7-10.1 190.7-10.1 190.7 85.8 158.4-68.6 230.1-68.6 230.1s-.4-16.9-2.2-85.7c4.3 4.5 34.5 36.2 34.5 36.2l-24.2-47.4 62.6-9.1-62.6-9.1 20.2-55.5-31.4 45.9c-2.2-87.7-7.8-305.1-7.9-306.9v-2.4 1-1 2.4c0 1-5.6 219-7.9 306.9l-31.4-45.9 20.2 55.5-62.6 9.1 62.6 9.1-24.2 47.4 34.5-36.2c-1.8 68.8-2.2 85.7-2.2 85.7s-154.4-71.7-68.6-230.1c0 0-107-118.1-10.1-190.7 0 0-165.5 99.9-60.5 271.5 0 0-86.8-84.8-41.4-170.5 0 0-78.7 111 17.2 233.1 0 0-26.2-16.1-49.4-77.7 0 0 16.9 183.3 222 185.7h4.1c205-2.4 222-185.7 222-185.7-23.6 61.5-49.9 77.7-49.9 77.7z\"]\n};\nconst faUikit = {\n  prefix: 'fab',\n  iconName: 'uikit',\n  icon: [448, 512, [], \"f403\", \"M443.9 128v256L218 512 0 384V169.7l87.6 45.1v117l133.5 75.5 135.8-75.5v-151l-101.1-57.6 87.6-53.1L443.9 128zM308.6 49.1L223.8 0l-88.6 54.8 86 47.3 87.4-53z\"]\n};\nconst faFortAwesomeAlt = {\n  prefix: 'fab',\n  iconName: 'fort-awesome-alt',\n  icon: [512, 512, [], \"f3a3\", \"M208 237.4h-22.2c-2.1 0-3.7 1.6-3.7 3.7v51.7c0 2.1 1.6 3.7 3.7 3.7H208c2.1 0 3.7-1.6 3.7-3.7v-51.7c0-2.1-1.6-3.7-3.7-3.7zm118.2 0H304c-2.1 0-3.7 1.6-3.7 3.7v51.7c0 2.1 1.6 3.7 3.7 3.7h22.2c2.1 0 3.7-1.6 3.7-3.7v-51.7c-.1-2.1-1.7-3.7-3.7-3.7zm132-125.1c-2.3-3.2-4.6-6.4-7.1-9.5-9.8-12.5-20.8-24-32.8-34.4-4.5-3.9-9.1-7.6-13.9-11.2-1.6-1.2-3.2-2.3-4.8-3.5C372 34.1 340.3 20 306 13c-16.2-3.3-32.9-5-50-5s-33.9 1.7-50 5c-34.3 7.1-66 21.2-93.3 40.8-1.6 1.1-3.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1.5.3-2.3.1-1.2.3-2.4.4-3.6 0-.8.1-1.6.2-2.4.1-1.1.2-2.3.3-3.5.1-.8.1-1.6.2-2.4.1 1.7.1.5.2-.7 0-.8.1-1.5.1-2.3.1-1.3.2-2.7.2-4 .1-.7.1-1.3.1-2 .1-2 .1-4 .1-6 0-53.5-16.9-103-45.8-143.7zM448 371.5c-9.4 15.5-20.6 29.9-33.6 42.9-20.6 20.6-44.5 36.7-71.2 48-13.9 5.8-28.2 10.3-42.9 13.2v-75.8c0-58.6-88.6-58.6-88.6 0v75.8c-14.7-2.9-29-7.3-42.9-13.2-26.7-11.3-50.6-27.4-71.2-48-13-13-24.2-27.4-33.6-42.9v-71.3c0-2.1 1.6-3.7 3.7-3.7h22.1c2.1 0 3.7 1.6 3.7 3.7V326h29.6V182c0-2.1 1.6-3.7 3.7-3.7h22.1c2.1 0 3.7 1.6 3.7 3.7v25.9h29.5V182c0-2.1 1.6-3.7 3.7-3.7H208c2.1 0 3.7 1.6 3.7 3.7v25.9h29.5V182c0-4.8 6.5-3.7 9.5-3.7V88.1c-4.4-2-7.4-6.7-7.4-11.5 0-16.8 25.4-16.8 25.4 0 0 4.8-3 9.4-7.4 11.5V92c6.3-1.4 12.7-2.3 19.2-2.3 9.4 0 18.4 3.5 26.3 3.5 7.2 0 15.2-3.5 19.4-3.5 2.1 0 3.7 1.6 3.7 3.7v48.4c0 5.6-18.7 6.5-22.4 6.5-8.6 0-16.6-3.5-25.4-3.5-7 0-14.1 1.2-20.8 2.8v30.7c3 0 9.5-1.1 9.5 3.7v25.9h29.5V182c0-2.1 1.6-3.7 3.7-3.7h22.2c2.1 0 3.7 1.6 3.7 3.7v25.9h29.5V182c0-2.1 1.6-3.7 3.7-3.7h22.1c2.1 0 3.7 1.6 3.7 3.7v144h29.5v-25.8c0-2.1 1.6-3.7 3.7-3.7h22.2c2.1 0 3.7 1.6 3.7 3.7z\"]\n};\nconst faPhabricator = {\n  prefix: 'fab',\n  iconName: 'phabricator',\n  icon: [496, 512, [], \"f3db\", \"M323 262.1l-.1-13s21.7-19.8 21.1-21.2l-9.5-20c-.6-1.4-29.5-.5-29.5-.5l-9.4-9.3s.2-28.5-1.2-29.1l-20.1-9.2c-1.4-.6-20.7 21-20.7 21l-13.1-.2s-20.5-21.4-21.9-20.8l-20 8.3c-1.4.5.2 28.9.2 28.9l-9.1 9.1s-29.2-.9-29.7.4l-8.1 19.8c-.6 1.4 21 21 21 21l.1 12.9s-21.7 19.8-21.1 21.2l9.5 20c.6 1.4 29.5.5 29.5.5l9.4 9.3s-.2 31.8 1.2 32.3l20.1 8.3c1.4.6 20.7-23.5 20.7-23.5l13.1.2s20.5 23.8 21.8 23.3l20-7.5c1.4-.6-.2-32.1-.2-32.1l9.1-9.1s29.2.9 29.7-.5l8.1-19.8c.7-1.1-20.9-20.7-20.9-20.7zm-44.9-8.7c.7 17.1-12.8 31.6-30.1 32.4-17.3.8-32.1-12.5-32.8-29.6-.7-17.1 12.8-31.6 30.1-32.3 17.3-.8 32.1 12.5 32.8 29.5zm201.2-37.9l-97-97-.1.1c-75.1-73.3-195.4-72.8-269.8 1.6-50.9 51-27.8 27.9-95.7 95.3-22.3 22.3-22.3 58.7 0 81 69.9 69.4 46.4 46 97.4 97l.1-.1c75.1 73.3 195.4 72.9 269.8-1.6 51-50.9 27.9-27.9 95.3-95.3 22.3-22.3 22.3-58.7 0-81zM140.4 363.8c-59.6-59.5-59.6-156 0-215.5 59.5-59.6 156-59.5 215.6 0 59.5 59.5 59.6 156 0 215.6-59.6 59.5-156 59.4-215.6-.1z\"]\n};\nconst faUssunnah = {\n  prefix: 'fab',\n  iconName: 'ussunnah',\n  icon: [482, 512, [], \"f407\", \"M481.9 268.1A240.9 240.9 0 1 1 .1 268a240.9 240.9 0 1 1 481.9 0zM24.5 268a216.5 216.5 0 1 0 432.9 0A216.5 216.5 0 1 0 24.5 268zm385.9 63.3c-12.7 0-21.6-1.9-26.7-5.9c-5.5-4.3-8.2-12.3-8.2-23.8V205.1c0-6.5-5.2-20.2-15.7-41.2c7 0 17-9.1 30-27.2V284.5c0 11 2.4 19.4 7 25.3c3.7 4.7 10.1 8.9 19 12.6c1.2 .4 2.6 .9 4.1 1.4c2.9 .9 6.3 2.1 10.3 3.5c-1.8 2.7-8.3 4-19.9 4zm-219 0c-1.3 2.4-3.6 5.5-6.8 9.4l-18.5 22.5c-1-6.1-4-13-9.3-20.6s-9.7-11.4-13.4-11.4h-8.3H53.6c3.3-5.3 4.9-8.8 4.9-10.8c0-2-.8-5.3-2.4-9.7c-1.5-4.4-2.4-8.5-2.4-12.4c0-7.4 2.1-13.9 6.3-19.3L80 253.4l-7.1-17.7L89 215.9l6.7 16.8 8-10.3c-1.8 6.4-2.6 12.3-2.6 17.7c0 4.2 2.8 13.3 8.3 27.3l16.2 40.7H135h8 .3c2.8 .4 7.7 5 14.6 13.9c1.8 2.4 4.3 5.8 7.7 10.2c1.4 1.9 2.9 3.9 4.6 6.1c1.3-2.3 2-4.6 2-7.1c0-2-1.3-6.6-4-13.4L163 304.1c-4-10.6-6.1-17.7-6.1-21.3c0-6.3 1.9-12.3 5.8-17.9c.5-.6 1-1.3 1.5-1.9c4.4-5.6 8.8-11.1 13.3-16.5c-1.1 4.6-1.7 8.7-1.7 12c0 3.7 1.7 9.9 5.1 18.8l7.9 20.4c1.9 4.7 3 8.2 3.7 10.3h17.6 8.3l-.9-2.6c-1.4-3.9-4-7-7.7-9.3l15.6-20.1 12.3 32h13.4L245 292.2c-1.5-3.9-4-7-7.7-9.3L253 262.8 270.3 308h13.4l-11.4-29.4c-1.5-3.9-4-7-7.7-9.3l15.6-20L302.6 308h10.3 8.3 7.6c1.5 0 3-1.1 4.5-3.1s2.2-4.1 2.2-6.3V205.1c0-6.5-4.5-20.3-13.7-41.2c5.4 0 14.1-9.1 26.2-27.2V300.2c0 7.2 .6 12 1.7 14.6c1.6 3.4 5.3 6.2 11.1 8.2c-3.9 5.6-8.7 8.5-14.5 8.5H321.1h-8.3H210.5h-19zM93.4 287.3c-2.7-6.7-4-11.7-4-15c-.6 1.2-2.4 3.7-5.4 7.6c-1.4 1.9-2.2 3.7-2.2 5.3c0 2.6 .8 5.7 2.2 9.3l5.6 13.9h0c5 0 9 0 11.9-.1l-8.2-20.9zm13.5-72.4c-3-5.2-7-9.3-11.9-11.9c-3.5-1.9-5.3-4.3-5.3-7.4c0-2.4 4.6-8.6 14-18.3c.2 3.8 1.9 7.6 4.9 11.2c3.1 3.6 4.6 7 4.6 10.1c0 2.6-2.1 8-6.2 16.3zm-27.6 0c-3-5.2-7-9.3-11.9-11.9c-3.5-1.9-5.3-4.3-5.3-7.4c0-2.4 4.6-8.6 14-18.3c.2 3.8 1.9 7.6 4.9 11.2c3.1 3.6 4.6 7 4.6 10.1c0 2.6-2.1 8-6.2 16.3zm87 27.5c-3-5.2-7-9.3-11.9-11.9c-3.5-1.9-5.3-4.3-5.3-7.4c0-2.4 4.6-8.6 14-18.3c.2 3.8 1.9 7.6 4.9 11.2c3.1 3.6 4.6 7 4.6 10.1c0 2.6-2.1 8-6.2 16.3z\"]\n};\nconst faEarlybirds = {\n  prefix: 'fab',\n  iconName: 'earlybirds',\n  icon: [480, 512, [], \"f39a\", \"M313.2 47.5c1.2-13 21.3-14 36.6-8.7.9.3 26.2 9.7 19 15.2-27.9-7.4-56.4 18.2-55.6-6.5zm-201 6.9c30.7-8.1 62 20 61.1-7.1-1.3-14.2-23.4-15.3-40.2-9.6-1 .3-28.7 10.5-20.9 16.7zM319.4 160c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm-159.7 0c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm318.5 163.2c-9.9 24-40.7 11-63.9-1.2-13.5 69.1-58.1 111.4-126.3 124.2.3.9-2-.1 24 1 33.6 1.4 63.8-3.1 97.4-8-19.8-13.8-11.4-37.1-9.8-38.1 1.4-.9 14.7 1.7 21.6 11.5 8.6-12.5 28.4-14.8 30.2-13.6 1.6 1.1 6.6 20.9-6.9 34.6 4.7-.9 8.2-1.6 9.8-2.1 2.6-.8 17.7 11.3 3.1 13.3-14.3 2.3-22.6 5.1-47.1 10.8-45.9 10.7-85.9 11.8-117.7 12.8l1 11.6c3.8 18.1-23.4 24.3-27.6 6.2.8 17.9-27.1 21.8-28.4-1l-.5 5.3c-.7 18.4-28.4 17.9-28.3-.6-7.5 13.5-28.1 6.8-26.4-8.5l1.2-12.4c-36.7.9-59.7 3.1-61.8 3.1-20.9 0-20.9-31.6 0-31.6 2.4 0 27.7 1.3 63.2 2.8-61.1-15.5-103.7-55-114.9-118.2-25 12.8-57.5 26.8-68.2.8-10.5-25.4 21.5-42.6 66.8-73.4.7-6.6 1.6-13.3 2.7-19.8-14.4-19.6-11.6-36.3-16.1-60.4-16.8 2.4-23.2-9.1-23.6-23.1.3-7.3 2.1-14.9 2.4-15.4 1.1-1.8 10.1-2 12.7-2.6 6-31.7 50.6-33.2 90.9-34.5 19.7-21.8 45.2-41.5 80.9-48.3C203.3 29 215.2 8.5 216.2 8c1.7-.8 21.2 4.3 26.3 23.2 5.2-8.8 18.3-11.4 19.6-10.7 1.1.6 6.4 15-4.9 25.9 40.3 3.5 72.2 24.7 96 50.7 36.1 1.5 71.8 5.9 77.1 34 2.7.6 11.6.8 12.7 2.6.3.5 2.1 8.1 2.4 15.4-.5 13.9-6.8 25.4-23.6 23.1-3.2 17.3-2.7 32.9-8.7 47.7 2.4 11.7 4 23.8 4.8 36.4 37 25.4 70.3 42.5 60.3 66.9zM207.4 159.9c.9-44-37.9-42.2-78.6-40.3-21.7 1-38.9 1.9-45.5 13.9-11.4 20.9 5.9 92.9 23.2 101.2 9.8 4.7 73.4 7.9 86.3-7.1 8.2-9.4 15-49.4 14.6-67.7zm52 58.3c-4.3-12.4-6-30.1-15.3-32.7-2-.5-9-.5-11 0-10 2.8-10.8 22.1-17 37.2 15.4 0 19.3 9.7 23.7 9.7 4.3 0 6.3-11.3 19.6-14.2zm135.7-84.7c-6.6-12.1-24.8-12.9-46.5-13.9-40.2-1.9-78.2-3.8-77.3 40.3-.5 18.3 5 58.3 13.2 67.8 13 14.9 76.6 11.8 86.3 7.1 15.8-7.6 36.5-78.9 24.3-101.3z\"]\n};\nconst faTradeFederation = {\n  prefix: 'fab',\n  iconName: 'trade-federation',\n  icon: [496, 512, [], \"f513\", \"M248 8.8c-137 0-248 111-248 248s111 248 248 248 248-111 248-248-111-248-248-248zm0 482.8c-129.7 0-234.8-105.1-234.8-234.8S118.3 22 248 22s234.8 105.1 234.8 234.8S377.7 491.6 248 491.6zm155.1-328.5v-46.8H209.3V198H54.2l36.7 46h117.7v196.8h48.8V245h83.3v-47h-83.3v-34.8h145.7zm-73.3 45.1v23.9h-82.9v197.4h-26.8V232.1H96.3l-20.1-23.9h143.9v-80.6h171.8V152h-145v56.2zm-161.3-69l-12.4-20.7 2.1 23.8-23.5 5.4 23.3 5.4-2.1 24 12.3-20.5 22.2 9.5-15.7-18.1 15.8-18.1zm-29.6-19.7l9.3-11.5-12.7 5.9-8-12.4 1.7 13.9-14.3 3.8 13.7 2.7-.8 14.7 6.8-12.2 13.8 5.3zm165.4 145.2l-13.1 5.6-7.3-12.2 1.3 14.2-13.9 3.2 13.9 3.2-1.2 14.2 7.3-12.2 13.1 5.5-9.4-10.7zm106.9-77.2l-20.9 9.1-12-19.6 2.2 22.7-22.3 5.4 22.2 4.9-1.8 22.9 11.5-19.6 21.2 8.8-15.1-17zM248 29.9c-125.3 0-226.9 101.6-226.9 226.9S122.7 483.7 248 483.7s226.9-101.6 226.9-226.9S373.3 29.9 248 29.9zM342.6 196v51h-83.3v195.7h-52.7V245.9H89.9l-40-49.9h157.4v-81.6h197.8v50.7H259.4V196zM248 43.2c60.3 0 114.8 25 153.6 65.2H202.5V190H45.1C73.1 104.8 153.4 43.2 248 43.2zm0 427.1c-117.9 0-213.6-95.6-213.6-213.5 0-21.2 3.1-41.8 8.9-61.1L87.1 252h114.7v196.8h64.6V253h83.3v-62.7h-83.2v-19.2h145.6v-50.8c30.8 37 49.3 84.6 49.3 136.5.1 117.9-95.5 213.5-213.4 213.5zM178.8 275l-11-21.4 1.7 24.5-23.7 3.9 23.8 5.9-3.7 23.8 13-20.9 21.5 10.8-15.8-18.8 16.9-17.1z\"]\n};\nconst faAutoprefixer = {\n  prefix: 'fab',\n  iconName: 'autoprefixer',\n  icon: [640, 512, [], \"f41c\", \"M318.4 16l-161 480h77.5l25.4-81.4h119.5L405 496h77.5L318.4 16zm-40.3 341.9l41.2-130.4h1.5l40.9 130.4h-83.6zM640 405l-10-31.4L462.1 358l19.4 56.5L640 405zm-462.1-47L10 373.7 0 405l158.5 9.4 19.4-56.4z\"]\n};\nconst faWhatsapp = {\n  prefix: 'fab',\n  iconName: 'whatsapp',\n  icon: [448, 512, [], \"f232\", \"M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z\"]\n};\nconst faSquareUpwork = {\n  prefix: 'fab',\n  iconName: 'square-upwork',\n  icon: [448, 512, [], \"e67c\", \"M56 32l336 0c30.9 0 56 25.1 56 56l0 336c0 30.9-25.1 56-56 56L56 480c-30.9 0-56-25.1-56-56L0 88C0 57.1 25.1 32 56 32zM270.9 274.2c6.6-52.9 25.9-69.5 51.4-69.5c25.3 0 44.9 20.2 44.9 49.7s-19.7 49.7-44.9 49.7c-27.9 0-46.3-21.5-51.4-29.9zm-26.7-41.8c-8.2-15.5-14.3-36.3-19.2-55.6l-29.7 0-33.2 0 0 78.1c0 28.4-12.9 49.4-38.2 49.4s-39.8-20.9-39.8-49.3l.3-78.1-36.2 0 0 78.1c0 22.8 7.4 43.5 20.9 58.2c13.9 15.2 32.8 23.2 54.8 23.2c43.7 0 74.2-33.5 74.2-81.5l0-52.5c4.6 17.3 15.4 50.5 36.2 79.7L215 392.6l36.8 0 12.8-78.4c4.2 3.5 8.7 6.6 13.4 9.4c12.3 7.8 26.4 12.2 40.9 12.6l.1 0c.5 0 1.1 0 1.6 0c.6 0 1.1 0 1.7 0c45.1 0 80.9-34.9 80.9-81.9s-35.9-82.2-80.9-82.2c-45.4 0-70.9 29.7-78.1 60.1z\"]\n};\nconst faSlideshare = {\n  prefix: 'fab',\n  iconName: 'slideshare',\n  icon: [512, 512, [], \"f1e7\", \"M187.7 153.7c-34 0-61.7 25.7-61.7 57.7 0 31.7 27.7 57.7 61.7 57.7s61.7-26 61.7-57.7c0-32-27.7-57.7-61.7-57.7zm143.4 0c-34 0-61.7 25.7-61.7 57.7 0 31.7 27.7 57.7 61.7 57.7 34.3 0 61.7-26 61.7-57.7.1-32-27.4-57.7-61.7-57.7zm156.6 90l-6 4.3V49.7c0-27.4-20.6-49.7-46-49.7H76.6c-25.4 0-46 22.3-46 49.7V248c-2-1.4-4.3-2.9-6.3-4.3-15.1-10.6-25.1 4-16 17.7 18.3 22.6 53.1 50.3 106.3 72C58.3 525.1 252 555.7 248.9 457.5c0-.7.3-56.6.3-96.6 5.1 1.1 9.4 2.3 13.7 3.1 0 39.7.3 92.8.3 93.5-3.1 98.3 190.6 67.7 134.3-124 53.1-21.7 88-49.4 106.3-72 9.1-13.8-.9-28.3-16.1-17.8zm-30.5 19.2c-68.9 37.4-128.3 31.1-160.6 29.7-23.7-.9-32.6 9.1-33.7 24.9-10.3-7.7-18.6-15.5-20.3-17.1-5.1-5.4-13.7-8-27.1-7.7-31.7 1.1-89.7 7.4-157.4-28V72.3c0-34.9 8.9-45.7 40.6-45.7h317.7c30.3 0 40.9 12.9 40.9 45.7v190.6z\"]\n};\nconst faGooglePlay = {\n  prefix: 'fab',\n  iconName: 'google-play',\n  icon: [512, 512, [], \"f3ab\", \"M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z\"]\n};\nconst faViadeo = {\n  prefix: 'fab',\n  iconName: 'viadeo',\n  icon: [448, 512, [], \"f2a9\", \"M276.2 150.5v.7C258.3 98.6 233.6 47.8 205.4 0c43.3 29.2 67 100 70.8 150.5zm32.7 121.7c7.6 18.2 11 37.5 11 57 0 77.7-57.8 141-137.8 139.4l3.8-.3c74.2-46.7 109.3-118.6 109.3-205.1 0-38.1-6.5-75.9-18.9-112 1 11.7 1 23.7 1 35.4 0 91.8-18.1 241.6-116.6 280C95 455.2 49.4 398 49.4 329.2c0-75.6 57.4-142.3 135.4-142.3 16.8 0 33.7 3.1 49.1 9.6 1.7-15.1 6.5-29.9 13.4-43.3-19.9-7.2-41.2-10.7-62.5-10.7-161.5 0-238.7 195.9-129.9 313.7 67.9 74.6 192 73.9 259.8 0 56.6-61.3 60.9-142.4 36.4-201-12.7 8-27.1 13.9-42.2 17zM418.1 11.7c-31 66.5-81.3 47.2-115.8 80.1-12.4 12-20.6 34-20.6 50.5 0 14.1 4.5 27.1 12 38.8 47.4-11 98.3-46 118.2-90.7-.7 5.5-4.8 14.4-7.2 19.2-20.3 35.7-64.6 65.6-99.7 84.9 14.8 14.4 33.7 25.8 55 25.8 79 0 110.1-134.6 58.1-208.6z\"]\n};\nconst faLine = {\n  prefix: 'fab',\n  iconName: 'line',\n  icon: [512, 512, [], \"f3c0\", \"M311 196.8v81.3c0 2.1-1.6 3.7-3.7 3.7h-13c-1.3 0-2.4-.7-3-1.5l-37.3-50.3v48.2c0 2.1-1.6 3.7-3.7 3.7h-13c-2.1 0-3.7-1.6-3.7-3.7V196.9c0-2.1 1.6-3.7 3.7-3.7h12.9c1.1 0 2.4 .6 3 1.6l37.3 50.3V196.9c0-2.1 1.6-3.7 3.7-3.7h13c2.1-.1 3.8 1.6 3.8 3.5zm-93.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 2.1 1.6 3.7 3.7 3.7h13c2.1 0 3.7-1.6 3.7-3.7V196.8c0-1.9-1.6-3.7-3.7-3.7zm-31.4 68.1H150.3V196.8c0-2.1-1.6-3.7-3.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 1 .3 1.8 1 2.5c.7 .6 1.5 1 2.5 1h52.2c2.1 0 3.7-1.6 3.7-3.7v-13c0-1.9-1.6-3.7-3.5-3.7zm193.7-68.1H327.3c-1.9 0-3.7 1.6-3.7 3.7v81.3c0 1.9 1.6 3.7 3.7 3.7h52.2c2.1 0 3.7-1.6 3.7-3.7V265c0-2.1-1.6-3.7-3.7-3.7H344V247.7h35.5c2.1 0 3.7-1.6 3.7-3.7V230.9c0-2.1-1.6-3.7-3.7-3.7H344V213.5h35.5c2.1 0 3.7-1.6 3.7-3.7v-13c-.1-1.9-1.7-3.7-3.7-3.7zM512 93.4V419.4c-.1 51.2-42.1 92.7-93.4 92.6H92.6C41.4 511.9-.1 469.8 0 418.6V92.6C.1 41.4 42.2-.1 93.4 0H419.4c51.2 .1 92.7 42.1 92.6 93.4zM441.6 233.5c0-83.4-83.7-151.3-186.4-151.3s-186.4 67.9-186.4 151.3c0 74.7 66.3 137.4 155.9 149.3c21.8 4.7 19.3 12.7 14.4 42.1c-.8 4.7-3.8 18.4 16.1 10.1s107.3-63.2 146.5-108.2c27-29.7 39.9-59.8 39.9-93.1z\"]\n};\nconst faGoogleDrive = {\n  prefix: 'fab',\n  iconName: 'google-drive',\n  icon: [512, 512, [], \"f3aa\", \"M339 314.9L175.4 32h161.2l163.6 282.9H339zm-137.5 23.6L120.9 480h310.5L512 338.5H201.5zM154.1 67.4L0 338.5 80.6 480 237 208.8 154.1 67.4z\"]\n};\nconst faServicestack = {\n  prefix: 'fab',\n  iconName: 'servicestack',\n  icon: [496, 512, [], \"f3ec\", \"M88 216c81.7 10.2 273.7 102.3 304 232H0c99.5-8.1 184.5-137 88-232zm32-152c32.3 35.6 47.7 83.9 46.4 133.6C249.3 231.3 373.7 321.3 400 448h96C455.3 231.9 222.8 79.5 120 64z\"]\n};\nconst faSimplybuilt = {\n  prefix: 'fab',\n  iconName: 'simplybuilt',\n  icon: [512, 512, [], \"f215\", \"M481.2 64h-106c-14.5 0-26.6 11.8-26.6 26.3v39.6H163.3V90.3c0-14.5-12-26.3-26.6-26.3h-106C16.1 64 4.3 75.8 4.3 90.3v331.4c0 14.5 11.8 26.3 26.6 26.3h450.4c14.8 0 26.6-11.8 26.6-26.3V90.3c-.2-14.5-12-26.3-26.7-26.3zM149.8 355.8c-36.6 0-66.4-29.7-66.4-66.4 0-36.9 29.7-66.6 66.4-66.6 36.9 0 66.6 29.7 66.6 66.6 0 36.7-29.7 66.4-66.6 66.4zm212.4 0c-36.9 0-66.6-29.7-66.6-66.6 0-36.6 29.7-66.4 66.6-66.4 36.6 0 66.4 29.7 66.4 66.4 0 36.9-29.8 66.6-66.4 66.6z\"]\n};\nconst faBitbucket = {\n  prefix: 'fab',\n  iconName: 'bitbucket',\n  icon: [512, 512, [61810], \"f171\", \"M22.2 32A16 16 0 0 0 6 47.8a26.35 26.35 0 0 0 .2 2.8l67.9 412.1a21.77 21.77 0 0 0 21.3 18.2h325.7a16 16 0 0 0 16-13.4L505 50.7a16 16 0 0 0-13.2-18.3 24.58 24.58 0 0 0-2.8-.2L22.2 32zm285.9 297.8h-104l-28.1-147h157.3l-25.2 147z\"]\n};\nconst faImdb = {\n  prefix: 'fab',\n  iconName: 'imdb',\n  icon: [448, 512, [], \"f2d8\", \"M89.5 323.6H53.93V186.2H89.5V323.6zM156.1 250.5L165.2 186.2H211.5V323.6H180.5V230.9L167.1 323.6H145.8L132.8 232.9L132.7 323.6H101.5V186.2H147.6C148.1 194.5 150.4 204.3 151.9 215.6L156.1 250.5zM223.7 323.6V186.2H250.3C267.3 186.2 277.3 187.1 283.3 188.6C289.4 190.3 294 192.8 297.2 196.5C300.3 199.8 302.3 203.1 303 208.5C303.9 212.9 304.4 221.6 304.4 234.7V282.9C304.4 295.2 303.7 303.4 302.5 307.6C301.4 311.7 299.4 315 296.5 317.3C293.7 319.7 290.1 321.4 285.8 322.3C281.6 323.1 275.2 323.6 266.7 323.6H223.7zM259.2 209.7V299.1C264.3 299.1 267.5 298.1 268.6 296.8C269.7 294.8 270.4 289.2 270.4 280.1V226.8C270.4 220.6 270.3 216.6 269.7 214.8C269.4 213 268.5 211.8 267.1 210.1C265.7 210.1 263 209.7 259.2 209.7V209.7zM316.5 323.6V186.2H350.6V230.1C353.5 227.7 356.7 225.2 360.1 223.5C363.7 222 368.9 221.1 372.9 221.1C377.7 221.1 381.8 221.9 385.2 223.3C388.6 224.8 391.2 226.8 393.2 229.5C394.9 232.1 395.9 234.8 396.3 237.3C396.7 239.9 396.1 245.3 396.1 253.5V292.1C396.1 300.3 396.3 306.4 395.3 310.5C394.2 314.5 391.5 318.1 387.5 320.1C383.4 324 378.6 325.4 372.9 325.4C368.9 325.4 363.7 324.5 360.2 322.9C356.7 321.1 353.5 318.4 350.6 314.9L348.5 323.6L316.5 323.6zM361.6 302.9C362.3 301.1 362.6 296.9 362.6 290.4V255C362.6 249.4 362.3 245.5 361.5 243.8C360.8 241.9 357.8 241.1 355.7 241.1C353.7 241.1 352.3 241.9 351.6 243.4C351 244.9 350.6 248.8 350.6 255V291.4C350.6 297.5 351 301.4 351.8 303C352.4 304.7 353.9 305.5 355.9 305.5C358.1 305.5 360.1 304.7 361.6 302.9L361.6 302.9zM418.4 32.04C434.1 33.27 447.1 47.28 447.1 63.92V448.1C447.1 464.5 435.2 478.5 418.9 479.1C418.6 479.1 418.4 480 418.1 480H29.88C29.6 480 29.32 479.1 29.04 479.9C13.31 478.5 1.093 466.1 0 449.7L.0186 61.78C1.081 45.88 13.82 33.09 30.26 31.1H417.7C417.9 31.1 418.2 32.01 418.4 32.04L418.4 32.04zM30.27 41.26C19 42.01 10.02 51.01 9.257 62.4V449.7C9.63 455.1 11.91 460.2 15.7 464C19.48 467.9 24.51 470.3 29.89 470.7H418.1C429.6 469.7 438.7 459.1 438.7 448.1V63.91C438.7 58.17 436.6 52.65 432.7 48.45C428.8 44.24 423.4 41.67 417.7 41.26L30.27 41.26z\"]\n};\nconst faDeezer = {\n  prefix: 'fab',\n  iconName: 'deezer',\n  icon: [576, 512, [], \"e077\", \"M451.46,244.71H576V172H451.46Zm0-173.89v72.67H576V70.82Zm0,275.06H576V273.2H451.46ZM0,447.09H124.54V374.42H0Zm150.47,0H275V374.42H150.47Zm150.52,0H425.53V374.42H301Zm150.47,0H576V374.42H451.46ZM301,345.88H425.53V273.2H301Zm-150.52,0H275V273.2H150.47Zm0-101.17H275V172H150.47Z\"]\n};\nconst faRaspberryPi = {\n  prefix: 'fab',\n  iconName: 'raspberry-pi',\n  icon: [407, 512, [], \"f7bb\", \"M372 232.5l-3.7-6.5c.1-46.4-21.4-65.3-46.5-79.7 7.6-2 15.4-3.6 17.6-13.2 13.1-3.3 15.8-9.4 17.1-15.8 3.4-2.3 14.8-8.7 13.6-19.7 6.4-4.4 10-10.1 8.1-18.1 6.9-7.5 8.7-13.7 5.8-19.4 8.3-10.3 4.6-15.6 1.1-20.9 6.2-11.2.7-23.2-16.6-21.2-6.9-10.1-21.9-7.8-24.2-7.8-2.6-3.2-6-6-16.5-4.7-6.8-6.1-14.4-5-22.3-2.1-9.3-7.3-15.5-1.4-22.6.8C271.6.6 269 5.5 263.5 7.6c-12.3-2.6-16.1 3-22 8.9l-6.9-.1c-18.6 10.8-27.8 32.8-31.1 44.1-3.3-11.3-12.5-33.3-31.1-44.1l-6.9.1c-5.9-5.9-9.7-11.5-22-8.9-5.6-2-8.1-7-19.4-3.4-4.6-1.4-8.9-4.4-13.9-4.3-2.6.1-5.5 1-8.7 3.5-7.9-3-15.5-4-22.3 2.1-10.5-1.3-14 1.4-16.5 4.7-2.3 0-17.3-2.3-24.2 7.8C21.2 16 15.8 28 22 39.2c-3.5 5.4-7.2 10.7 1.1 20.9-2.9 5.7-1.1 11.9 5.8 19.4-1.8 8 1.8 13.7 8.1 18.1-1.2 11 10.2 17.4 13.6 19.7 1.3 6.4 4 12.4 17.1 15.8 2.2 9.5 10 11.2 17.6 13.2-25.1 14.4-46.6 33.3-46.5 79.7l-3.7 6.5c-28.8 17.2-54.7 72.7-14.2 117.7 2.6 14.1 7.1 24.2 11 35.4 5.9 45.2 44.5 66.3 54.6 68.8 14.9 11.2 30.8 21.8 52.2 29.2C159 504.2 181 512 203 512h1c22.1 0 44-7.8 64.2-28.4 21.5-7.4 37.3-18 52.2-29.2 10.2-2.5 48.7-23.6 54.6-68.8 3.9-11.2 8.4-21.3 11-35.4 40.6-45.1 14.7-100.5-14-117.7zm-22.2-8c-1.5 18.7-98.9-65.1-82.1-67.9 45.7-7.5 83.6 19.2 82.1 67.9zm-43 93.1c-24.5 15.8-59.8 5.6-78.8-22.8s-14.6-64.2 9.9-80c24.5-15.8 59.8-5.6 78.8 22.8s14.6 64.2-9.9 80zM238.9 29.3c.8 4.2 1.8 6.8 2.9 7.6 5.4-5.8 9.8-11.7 16.8-17.3 0 3.3-1.7 6.8 2.5 9.4 3.7-5 8.8-9.5 15.5-13.3-3.2 5.6-.6 7.3 1.2 9.6 5.1-4.4 10-8.8 19.4-12.3-2.6 3.1-6.2 6.2-2.4 9.8 5.3-3.3 10.6-6.6 23.1-8.9-2.8 3.1-8.7 6.3-5.1 9.4 6.6-2.5 14-4.4 22.1-5.4-3.9 3.2-7.1 6.3-3.9 8.8 7.1-2.2 16.9-5.1 26.4-2.6l-6 6.1c-.7.8 14.1.6 23.9.8-3.6 5-7.2 9.7-9.3 18.2 1 1 5.8.4 10.4 0-4.7 9.9-12.8 12.3-14.7 16.6 2.9 2.2 6.8 1.6 11.2.1-3.4 6.9-10.4 11.7-16 17.3 1.4 1 3.9 1.6 9.7.9-5.2 5.5-11.4 10.5-18.8 15 1.3 1.5 5.8 1.5 10 1.6-6.7 6.5-15.3 9.9-23.4 14.2 4 2.7 6.9 2.1 10 2.1-5.7 4.7-15.4 7.1-24.4 10 1.7 2.7 3.4 3.4 7.1 4.1-9.5 5.3-23.2 2.9-27 5.6.9 2.7 3.6 4.4 6.7 5.8-15.4.9-57.3-.6-65.4-32.3 15.7-17.3 44.4-37.5 93.7-62.6-38.4 12.8-73 30-102 53.5-34.3-15.9-10.8-55.9 5.8-71.8zm-34.4 114.6c24.2-.3 54.1 17.8 54 34.7-.1 15-21 27.1-53.8 26.9-32.1-.4-53.7-15.2-53.6-29.8 0-11.9 26.2-32.5 53.4-31.8zm-123-12.8c3.7-.7 5.4-1.5 7.1-4.1-9-2.8-18.7-5.3-24.4-10 3.1 0 6 .7 10-2.1-8.1-4.3-16.7-7.7-23.4-14.2 4.2-.1 8.7 0 10-1.6-7.4-4.5-13.6-9.5-18.8-15 5.8.7 8.3.1 9.7-.9-5.6-5.6-12.7-10.4-16-17.3 4.3 1.5 8.3 2 11.2-.1-1.9-4.2-10-6.7-14.7-16.6 4.6.4 9.4 1 10.4 0-2.1-8.5-5.8-13.3-9.3-18.2 9.8-.1 24.6 0 23.9-.8l-6-6.1c9.5-2.5 19.3.4 26.4 2.6 3.2-2.5-.1-5.6-3.9-8.8 8.1 1.1 15.4 2.9 22.1 5.4 3.5-3.1-2.3-6.3-5.1-9.4 12.5 2.3 17.8 5.6 23.1 8.9 3.8-3.6.2-6.7-2.4-9.8 9.4 3.4 14.3 7.9 19.4 12.3 1.7-2.3 4.4-4 1.2-9.6 6.7 3.8 11.8 8.3 15.5 13.3 4.1-2.6 2.5-6.2 2.5-9.4 7 5.6 11.4 11.5 16.8 17.3 1.1-.8 2-3.4 2.9-7.6 16.6 15.9 40.1 55.9 6 71.8-29-23.5-63.6-40.7-102-53.5 49.3 25 78 45.3 93.7 62.6-8 31.8-50 33.2-65.4 32.3 3.1-1.4 5.8-3.2 6.7-5.8-4-2.8-17.6-.4-27.2-5.6zm60.1 24.1c16.8 2.8-80.6 86.5-82.1 67.9-1.5-48.7 36.5-75.5 82.1-67.9zM38.2 342c-23.7-18.8-31.3-73.7 12.6-98.3 26.5-7 9 107.8-12.6 98.3zm91 98.2c-13.3 7.9-45.8 4.7-68.8-27.9-15.5-27.4-13.5-55.2-2.6-63.4 16.3-9.8 41.5 3.4 60.9 25.6 16.9 20 24.6 55.3 10.5 65.7zm-26.4-119.7c-24.5-15.8-28.9-51.6-9.9-80s54.3-38.6 78.8-22.8 28.9 51.6 9.9 80c-19.1 28.4-54.4 38.6-78.8 22.8zM205 496c-29.4 1.2-58.2-23.7-57.8-32.3-.4-12.7 35.8-22.6 59.3-22 23.7-1 55.6 7.5 55.7 18.9.5 11-28.8 35.9-57.2 35.4zm58.9-124.9c.2 29.7-26.2 53.8-58.8 54-32.6.2-59.2-23.8-59.4-53.4v-.6c-.2-29.7 26.2-53.8 58.8-54 32.6-.2 59.2 23.8 59.4 53.4v.6zm82.2 42.7c-25.3 34.6-59.6 35.9-72.3 26.3-13.3-12.4-3.2-50.9 15.1-72 20.9-23.3 43.3-38.5 58.9-26.6 10.5 10.3 16.7 49.1-1.7 72.3zm22.9-73.2c-21.5 9.4-39-105.3-12.6-98.3 43.9 24.7 36.3 79.6 12.6 98.3z\"]\n};\nconst faJira = {\n  prefix: 'fab',\n  iconName: 'jira',\n  icon: [496, 512, [], \"f7b1\", \"M490 241.7C417.1 169 320.6 71.8 248.5 0 83 164.9 6 241.7 6 241.7c-7.9 7.9-7.9 20.7 0 28.7C138.8 402.7 67.8 331.9 248.5 512c379.4-378 15.7-16.7 241.5-241.7 8-7.9 8-20.7 0-28.6zm-241.5 90l-76-75.7 76-75.7 76 75.7-76 75.7z\"]\n};\nconst faDocker = {\n  prefix: 'fab',\n  iconName: 'docker',\n  icon: [640, 512, [], \"f395\", \"M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z\"]\n};\nconst faScreenpal = {\n  prefix: 'fab',\n  iconName: 'screenpal',\n  icon: [512, 512, [], \"e570\", \"M233.5 22.49C233.5 10.07 243.6 0 256 0C268.4 0 278.5 10.07 278.5 22.49C278.5 34.91 268.4 44.98 256 44.98C243.6 44.98 233.5 34.91 233.5 22.49zM313.4 259C313.4 290.7 287.7 316.4 256 316.4C224.3 316.4 198.6 290.7 198.6 259C198.6 227.3 224.3 201.6 256 201.6C287.7 201.6 313.4 227.3 313.4 259zM337.2 350C359.5 330.1 373.7 302.7 377.1 273H496.6C493.1 334.4 466.2 392.2 421.4 434.4C376.7 476.6 317.5 500.2 256 500.2C194.5 500.2 135.3 476.6 90.56 434.4C45.83 392.2 18.94 334.4 15.39 273H135.1C138.5 302.7 152.7 330.1 175 350C197.3 369.9 226.2 380.9 256.1 380.9C285.1 380.9 314.8 369.9 337.2 350zM73.14 140.3C73.54 152.7 63.81 163.1 51.39 163.5C38.97 163.9 28.59 154.2 28.18 141.8C27.78 129.3 37.52 118.9 49.94 118.5C62.35 118.1 72.74 127.9 73.14 140.3zM438.9 141C438.9 128.6 448.9 118.5 461.4 118.5C473.8 118.5 483.8 128.6 483.8 141C483.8 153.5 473.8 163.5 461.4 163.5C448.9 163.5 438.9 153.5 438.9 141zM317.9 95.27C300.6 109.1 278.7 118.1 256 118.1C233.3 118.1 211.4 109.1 194.1 95.27C176.8 80.55 165.3 60.18 161.7 37.78C176.8 31.37 192.5 26.52 208.6 23.31C208.6 35.88 213.6 47.93 222.5 56.82C231.4 65.7 243.4 70.7 256 70.7C268.6 70.7 280.6 65.7 289.5 56.82C298.4 47.93 303.4 35.88 303.4 23.31C319.5 26.52 335.2 31.37 350.3 37.78C346.7 60.18 335.2 80.55 317.9 95.27H317.9zM82.78 231C61.42 238.6 38.06 238.4 16.86 230.4C18.82 214.1 22.46 198.1 27.71 182.5C33.1 185.6 39.05 187.6 45.22 188.5C51.39 189.3 57.67 188.9 63.68 187.3C69.69 185.6 75.33 182.9 80.27 179.1C85.21 175.3 89.36 170.6 92.47 165.2C95.58 159.8 97.61 153.8 98.42 147.7C99.23 141.5 98.83 135.2 97.22 129.2C95.61 123.2 92.83 117.6 89.04 112.6C85.25 107.7 80.53 103.5 75.14 100.4C85.96 88.11 98.01 76.94 111.1 67.07C128.7 81.42 140.6 101.6 144.7 123.9C148.8 146.2 144.8 169.3 133.5 188.9C122.1 208.5 104.1 223.4 82.78 231V231zM429.2 231.1C407.9 223.5 389.9 208.5 378.5 188.9C367.2 169.3 363.3 146.2 367.4 123.9C371.5 101.7 383.4 81.54 400.9 67.19C414 77.04 426.1 88.21 436.9 100.5C426.2 106.9 418.5 117.2 415.4 129.3C412.2 141.3 413.1 154.1 420.2 164.9C426.4 175.7 436.6 183.6 448.6 186.9C460.6 190.2 473.5 188.6 484.3 182.6C489.6 198.1 493.2 214.2 495.2 230.4C473.1 238.5 450.6 238.7 429.2 231.1L429.2 231.1z\"]\n};\nconst faBluetooth = {\n  prefix: 'fab',\n  iconName: 'bluetooth',\n  icon: [448, 512, [], \"f293\", \"M292.6 171.1L249.7 214l-.3-86 43.2 43.1m-43.2 219.8l43.1-43.1-42.9-42.9-.2 86zM416 259.4C416 465 344.1 512 230.9 512S32 465 32 259.4 115.4 0 228.6 0 416 53.9 416 259.4zm-158.5 0l79.4-88.6L211.8 36.5v176.9L138 139.6l-27 26.9 92.7 93-92.7 93 26.9 26.9 73.8-73.8 2.3 170 127.4-127.5-83.9-88.7z\"]\n};\nconst faGitter = {\n  prefix: 'fab',\n  iconName: 'gitter',\n  icon: [384, 512, [], \"f426\", \"M66.4 322.5H16V0h50.4v322.5zM166.9 76.1h-50.4V512h50.4V76.1zm100.6 0h-50.4V512h50.4V76.1zM368 76h-50.4v247H368V76z\"]\n};\nconst faDAndD = {\n  prefix: 'fab',\n  iconName: 'd-and-d',\n  icon: [576, 512, [], \"f38d\", \"M82.5 98.9c-.6-17.2 2-33.8 12.7-48.2.3 7.4 1.2 14.5 4.2 21.6 5.9-27.5 19.7-49.3 42.3-65.5-1.9 5.9-3.5 11.8-3 17.7 8.7-7.4 18.8-17.8 44.4-22.7 14.7-2.8 29.7-2 42.1 1 38.5 9.3 61 34.3 69.7 72.3 5.3 23.1.7 45-8.3 66.4-5.2 12.4-12 24.4-20.7 35.1-2-1.9-3.9-3.8-5.8-5.6-42.8-40.8-26.8-25.2-37.4-37.4-1.1-1.2-1-2.2-.1-3.6 8.3-13.5 11.8-28.2 10-44-1.1-9.8-4.3-18.9-11.3-26.2-14.5-15.3-39.2-15-53.5.6-11.4 12.5-14.1 27.4-10.9 43.6.2 1.3.4 2.7 0 3.9-3.4 13.7-4.6 27.6-2.5 41.6.1.5.1 1.1.1 1.6 0 .3-.1.5-.2 1.1-21.8-11-36-28.3-43.2-52.2-8.3 17.8-11.1 35.5-6.6 54.1-15.6-15.2-21.3-34.3-22-55.2zm469.6 123.2c-11.6-11.6-25-20.4-40.1-26.6-12.8-5.2-26-7.9-39.9-7.1-10 .6-19.6 3.1-29 6.4-2.5.9-5.1 1.6-7.7 2.2-4.9 1.2-7.3-3.1-4.7-6.8 3.2-4.6 3.4-4.2 15-12 .6-.4 1.2-.8 2.2-1.5h-2.5c-.6 0-1.2.2-1.9.3-19.3 3.3-30.7 15.5-48.9 29.6-10.4 8.1-13.8 3.8-12-.5 1.4-3.5 3.3-6.7 5.1-10 1-1.8 2.3-3.4 3.5-5.1-.2-.2-.5-.3-.7-.5-27 18.3-46.7 42.4-57.7 73.3.3.3.7.6 1 .9.3-.6.5-1.2.9-1.7 10.4-12.1 22.8-21.8 36.6-29.8 18.2-10.6 37.5-18.3 58.7-20.2 4.3-.4 8.7-.1 13.1-.1-1.8.7-3.5.9-5.3 1.1-18.5 2.4-35.5 9-51.5 18.5-30.2 17.9-54.5 42.2-75.1 70.4-.3.4-.4.9-.7 1.3 14.5 5.3 24 17.3 36.1 25.6.2-.1.3-.2.4-.4l1.2-2.7c12.2-26.9 27-52.3 46.7-74.5 16.7-18.8 38-25.3 62.5-20 5.9 1.3 11.4 4.4 17.2 6.8 2.3-1.4 5.1-3.2 8-4.7 8.4-4.3 17.4-7 26.7-9 14.7-3.1 29.5-4.9 44.5-1.3v-.5c-.5-.4-1.2-.8-1.7-1.4zM316.7 397.6c-39.4-33-22.8-19.5-42.7-35.6-.8.9 0-.2-1.9 3-11.2 19.1-25.5 35.3-44 47.6-10.3 6.8-21.5 11.8-34.1 11.8-21.6 0-38.2-9.5-49.4-27.8-12-19.5-13.3-40.7-8.2-62.6 7.8-33.8 30.1-55.2 38.6-64.3-18.7-6.2-33 1.7-46.4 13.9.8-13.9 4.3-26.2 11.8-37.3-24.3 10.6-45.9 25-64.8 43.9-.3-5.8 5.4-43.7 5.6-44.7.3-2.7-.6-5.3-3-7.4-24.2 24.7-44.5 51.8-56.1 84.6 7.4-5.9 14.9-11.4 23.6-16.2-8.3 22.3-19.6 52.8-7.8 101.1 4.6 19 11.9 36.8 24.1 52.3 2.9 3.7 6.3 6.9 9.5 10.3.2-.2.4-.3.6-.5-1.4-7-2.2-14.1-1.5-21.9 2.2 3.2 3.9 6 5.9 8.6 12.6 16 28.7 27.4 47.2 35.6 25 11.3 51.1 13.3 77.9 8.6 54.9-9.7 90.7-48.6 116-98.8 1-1.8.6-2.9-.9-4.2zm172-46.4c-9.5-3.1-22.2-4.2-28.7-2.9 9.9 4 14.1 6.6 18.8 12 12.6 14.4 10.4 34.7-5.4 45.6-11.7 8.1-24.9 10.5-38.9 9.1-1.2-.1-2.3-.4-3-.6 2.8-3.7 6-7 8.1-10.8 9.4-16.8 5.4-42.1-8.7-56.1-2.1-2.1-4.6-3.9-7-5.9-.3 1.3-.1 2.1.1 2.8 4.2 16.6-8.1 32.4-24.8 31.8-7.6-.3-13.9-3.8-19.6-8.5-19.5-16.1-39.1-32.1-58.5-48.3-5.9-4.9-12.5-8.1-20.1-8.7-4.6-.4-9.3-.6-13.9-.9-5.9-.4-8.8-2.8-10.4-8.4-.9-3.4-1.5-6.8-2.2-10.2-1.5-8.1-6.2-13-14.3-14.2-4.4-.7-8.9-1-13.3-1.5-13-1.4-19.8-7.4-22.6-20.3-5 11-1.6 22.4 7.3 29.9 4.5 3.8 9.3 7.3 13.8 11.2 4.6 3.8 7.4 8.7 7.9 14.8.4 4.7.8 9.5 1.8 14.1 2.2 10.6 8.9 18.4 17 25.1 16.5 13.7 33 27.3 49.5 41.1 17.9 15 13.9 32.8 13 56-.9 22.9 12.2 42.9 33.5 51.2 1 .4 2 .6 3.6 1.1-15.7-18.2-10.1-44.1.7-52.3.3 2.2.4 4.3.9 6.4 9.4 44.1 45.4 64.2 85 56.9 16-2.9 30.6-8.9 42.9-19.8 2-1.8 3.7-4.1 5.9-6.5-19.3 4.6-35.8.1-50.9-10.6.7-.3 1.3-.3 1.9-.3 21.3 1.8 40.6-3.4 57-17.4 19.5-16.6 26.6-42.9 17.4-66-8.3-20.1-23.6-32.3-43.8-38.9zM99.4 179.3c-5.3-9.2-13.2-15.6-22.1-21.3 13.7-.5 26.6.2 39.6 3.7-7-12.2-8.5-24.7-5-38.7 5.3 11.9 13.7 20.1 23.6 26.8 19.7 13.2 35.7 19.6 46.7 30.2 3.4 3.3 6.3 7.1 9.6 10.9-.8-2.1-1.4-4.1-2.2-6-5-10.6-13-18.6-22.6-25-1.8-1.2-2.8-2.5-3.4-4.5-3.3-12.5-3-25.1-.7-37.6 1-5.5 2.8-10.9 4.5-16.3.8-2.4 2.3-4.6 4-6.6.6 6.9 0 25.5 19.6 46 10.8 11.3 22.4 21.9 33.9 32.7 9 8.5 18.3 16.7 25.5 26.8 1.1 1.6 2.2 3.3 3.8 4.7-5-13-14.2-24.1-24.2-33.8-9.6-9.3-19.4-18.4-29.2-27.4-3.3-3-4.6-6.7-5.1-10.9-1.2-10.4 0-20.6 4.3-30.2.5-1 1.1-2 1.9-3.3.5 4.2.6 7.9 1.4 11.6 4.8 23.1 20.4 36.3 49.3 63.5 10 9.4 19.3 19.2 25.6 31.6 4.8 9.3 7.3 19 5.7 29.6-.1.6.5 1.7 1.1 2 6.2 2.6 10 6.9 9.7 14.3 7.7-2.6 12.5-8 16.4-14.5 4.2 20.2-9.1 50.3-27.2 58.7.4-4.5 5-23.4-16.5-27.7-6.8-1.3-12.8-1.3-22.9-2.1 4.7-9 10.4-20.6.5-22.4-24.9-4.6-52.8 1.9-57.8 4.6 8.2.4 16.3 1 23.5 3.3-2 6.5-4 12.7-5.8 18.9-1.9 6.5 2.1 14.6 9.3 9.6 1.2-.9 2.3-1.9 3.3-2.7-3.1 17.9-2.9 15.9-2.8 18.3.3 10.2 9.5 7.8 15.7 7.3-2.5 11.8-29.5 27.3-45.4 25.8 7-4.7 12.7-10.3 15.9-17.9-6.5.8-12.9 1.6-19.2 2.4l-.3-.9c4.7-3.4 8-7.8 10.2-13.1 8.7-21.1-3.6-38-25-39.9-9.1-.8-17.8.8-25.9 5.5 6.2-15.6 17.2-26.6 32.6-34.5-15.2-4.3-8.9-2.7-24.6-6.3 14.6-9.3 30.2-13.2 46.5-14.6-5.2-3.2-48.1-3.6-70.2 20.9 7.9 1.4 15.5 2.8 23.2 4.2-23.8 7-44 19.7-62.4 35.6 1.1-4.8 2.7-9.5 3.3-14.3.6-4.5.8-9.2.1-13.6-1.5-9.4-8.9-15.1-19.7-16.3-7.9-.9-15.6.1-23.3 1.3-.9.1-1.7.3-2.9 0 15.8-14.8 36-21.7 53.1-33.5 6-4.5 6.8-8.2 3-14.9zm128.4 26.8c3.3 16 12.6 25.5 23.8 24.3-4.6-11.3-12.1-19.5-23.8-24.3z\"]\n};\nconst faMicroblog = {\n  prefix: 'fab',\n  iconName: 'microblog',\n  icon: [448, 512, [], \"e01a\", \"M399.36,362.23c29.49-34.69,47.1-78.34,47.1-125.79C446.46,123.49,346.86,32,224,32S1.54,123.49,1.54,236.44,101.14,440.87,224,440.87a239.28,239.28,0,0,0,79.44-13.44,7.18,7.18,0,0,1,8.12,2.56c18.58,25.09,47.61,42.74,79.89,49.92a4.42,4.42,0,0,0,5.22-3.43,4.37,4.37,0,0,0-.85-3.62,87,87,0,0,1,3.69-110.69ZM329.52,212.4l-57.3,43.49L293,324.75a6.5,6.5,0,0,1-9.94,7.22L224,290.92,164.94,332a6.51,6.51,0,0,1-9.95-7.22l20.79-68.86-57.3-43.49a6.5,6.5,0,0,1,3.8-11.68l71.88-1.51,23.66-67.92a6.5,6.5,0,0,1,12.28,0l23.66,67.92,71.88,1.51a6.5,6.5,0,0,1,3.88,11.68Z\"]\n};\nconst faCcDinersClub = {\n  prefix: 'fab',\n  iconName: 'cc-diners-club',\n  icon: [576, 512, [], \"f24c\", \"M239.7 79.9c-96.9 0-175.8 78.6-175.8 175.8 0 96.9 78.9 175.8 175.8 175.8 97.2 0 175.8-78.9 175.8-175.8 0-97.2-78.6-175.8-175.8-175.8zm-39.9 279.6c-41.7-15.9-71.4-56.4-71.4-103.8s29.7-87.9 71.4-104.1v207.9zm79.8.3V151.6c41.7 16.2 71.4 56.7 71.4 104.1s-29.7 87.9-71.4 104.1zM528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM329.7 448h-90.3c-106.2 0-193.8-85.5-193.8-190.2C45.6 143.2 133.2 64 239.4 64h90.3c105 0 200.7 79.2 200.7 193.8 0 104.7-95.7 190.2-200.7 190.2z\"]\n};\nconst faGgCircle = {\n  prefix: 'fab',\n  iconName: 'gg-circle',\n  icon: [512, 512, [], \"f261\", \"M257 8C120 8 9 119 9 256s111 248 248 248 248-111 248-248S394 8 257 8zm-49.5 374.8L81.8 257.1l125.7-125.7 35.2 35.4-24.2 24.2-11.1-11.1-77.2 77.2 77.2 77.2 26.6-26.6-53.1-52.9 24.4-24.4 77.2 77.2-75 75.2zm99-2.2l-35.2-35.2 24.1-24.4 11.1 11.1 77.2-77.2-77.2-77.2-26.5 26.5 53.1 52.9-24.4 24.4-77.2-77.2 75-75L432.2 255 306.5 380.6z\"]\n};\nconst faPiedPiperHat = {\n  prefix: 'fab',\n  iconName: 'pied-piper-hat',\n  icon: [640, 512, [], \"f4e5\", \"M640 24.9c-80.8 53.6-89.4 92.5-96.4 104.4-6.7 12.2-11.7 60.3-23.3 83.6-11.7 23.6-54.2 42.2-66.1 50-11.7 7.8-28.3 38.1-41.9 64.2-108.1-4.4-167.4 38.8-259.2 93.6 29.4-9.7 43.3-16.7 43.3-16.7 94.2-36 139.3-68.3 281.1-49.2 1.1 0 1.9.6 2.8.8 3.9 2.2 5.3 6.9 3.1 10.8l-53.9 95.8c-2.5 4.7-7.8 7.2-13.1 6.1-126.8-23.8-226.9 17.3-318.9 18.6C24.1 488 0 453.4 0 451.8c0-1.1.6-1.7 1.7-1.7 0 0 38.3 0 103.1-15.3C178.4 294.5 244 245.4 315.4 245.4c0 0 71.7 0 90.6 61.9 22.8-39.7 28.3-49.2 28.3-49.2 5.3-9.4 35-77.2 86.4-141.4 51.5-64 90.4-79.9 119.3-91.8z\"]\n};\nconst faKickstarterK = {\n  prefix: 'fab',\n  iconName: 'kickstarter-k',\n  icon: [448, 512, [], \"f3bc\", \"M356.6 256.2l40.8-40.5c42.2-41.9 42.2-110.3 0-152.1s-111-41.9-153.2 0L229.3 78.4C209.6 50.3 177.1 32 140.2 32C80.5 32 32 80.2 32 139.5V372.5C32 431.9 80.5 480 140.2 480c37.1 0 69.3-18.3 89-46.4l14.9 14.7c42.2 41.9 111 41.9 153.2 0s42.2-110.3 0-152.1l-40.8-40z\"]\n};\nconst faYandex = {\n  prefix: 'fab',\n  iconName: 'yandex',\n  icon: [256, 512, [], \"f413\", \"M153.1 315.8L65.7 512H2l96-209.8c-45.1-22.9-75.2-64.4-75.2-141.1C22.7 53.7 90.8 0 171.7 0H254v512h-55.1V315.8h-45.8zm45.8-269.3h-29.4c-44.4 0-87.4 29.4-87.4 114.6 0 82.3 39.4 108.8 87.4 108.8h29.4V46.5z\"]\n};\nconst faReadme = {\n  prefix: 'fab',\n  iconName: 'readme',\n  icon: [576, 512, [], \"f4d5\", \"M528.3 46.5H388.5c-48.1 0-89.9 33.3-100.4 80.3-10.6-47-52.3-80.3-100.4-80.3H48c-26.5 0-48 21.5-48 48v245.8c0 26.5 21.5 48 48 48h89.7c102.2 0 132.7 24.4 147.3 75 .7 2.8 5.2 2.8 6 0 14.7-50.6 45.2-75 147.3-75H528c26.5 0 48-21.5 48-48V94.6c0-26.4-21.3-47.9-47.7-48.1zM242 311.9c0 1.9-1.5 3.5-3.5 3.5H78.2c-1.9 0-3.5-1.5-3.5-3.5V289c0-1.9 1.5-3.5 3.5-3.5h160.4c1.9 0 3.5 1.5 3.5 3.5v22.9zm0-60.9c0 1.9-1.5 3.5-3.5 3.5H78.2c-1.9 0-3.5-1.5-3.5-3.5v-22.9c0-1.9 1.5-3.5 3.5-3.5h160.4c1.9 0 3.5 1.5 3.5 3.5V251zm0-60.9c0 1.9-1.5 3.5-3.5 3.5H78.2c-1.9 0-3.5-1.5-3.5-3.5v-22.9c0-1.9 1.5-3.5 3.5-3.5h160.4c1.9 0 3.5 1.5 3.5 3.5v22.9zm259.3 121.7c0 1.9-1.5 3.5-3.5 3.5H337.5c-1.9 0-3.5-1.5-3.5-3.5v-22.9c0-1.9 1.5-3.5 3.5-3.5h160.4c1.9 0 3.5 1.5 3.5 3.5v22.9zm0-60.9c0 1.9-1.5 3.5-3.5 3.5H337.5c-1.9 0-3.5-1.5-3.5-3.5V228c0-1.9 1.5-3.5 3.5-3.5h160.4c1.9 0 3.5 1.5 3.5 3.5v22.9zm0-60.9c0 1.9-1.5 3.5-3.5 3.5H337.5c-1.9 0-3.5-1.5-3.5-3.5v-22.8c0-1.9 1.5-3.5 3.5-3.5h160.4c1.9 0 3.5 1.5 3.5 3.5V190z\"]\n};\nconst faHtml5 = {\n  prefix: 'fab',\n  iconName: 'html5',\n  icon: [384, 512, [], \"f13b\", \"M0 32l34.9 395.8L191.5 480l157.6-52.2L384 32H0zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1l-4.4 47.7z\"]\n};\nconst faSellsy = {\n  prefix: 'fab',\n  iconName: 'sellsy',\n  icon: [640, 512, [], \"f213\", \"M539.71 237.308c3.064-12.257 4.29-24.821 4.29-37.384C544 107.382 468.618 32 376.076 32c-77.22 0-144.634 53.012-163.02 127.781-15.322-13.176-34.934-20.53-55.157-20.53-46.271 0-83.962 37.69-83.962 83.961 0 7.354.92 15.015 3.065 22.369-42.9 20.225-70.785 63.738-70.785 111.234C6.216 424.843 61.68 480 129.401 480h381.198c67.72 0 123.184-55.157 123.184-123.184.001-56.384-38.916-106.025-94.073-119.508zM199.88 401.554c0 8.274-7.048 15.321-15.321 15.321H153.61c-8.274 0-15.321-7.048-15.321-15.321V290.626c0-8.273 7.048-15.321 15.321-15.321h30.949c8.274 0 15.321 7.048 15.321 15.321v110.928zm89.477 0c0 8.274-7.048 15.321-15.322 15.321h-30.949c-8.274 0-15.321-7.048-15.321-15.321V270.096c0-8.274 7.048-15.321 15.321-15.321h30.949c8.274 0 15.322 7.048 15.322 15.321v131.458zm89.477 0c0 8.274-7.047 15.321-15.321 15.321h-30.949c-8.274 0-15.322-7.048-15.322-15.321V238.84c0-8.274 7.048-15.321 15.322-15.321h30.949c8.274 0 15.321 7.048 15.321 15.321v162.714zm87.027 0c0 8.274-7.048 15.321-15.322 15.321h-28.497c-8.274 0-15.321-7.048-15.321-15.321V176.941c0-8.579 7.047-15.628 15.321-15.628h28.497c8.274 0 15.322 7.048 15.322 15.628v224.613z\"]\n};\nconst faSquareWebAwesome = {\n  prefix: 'fab',\n  iconName: 'square-web-awesome',\n  icon: [448, 512, [], \"e683\", \"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM235 177.6L288 224l52.2-10.4c-2.6-3.9-4.2-8.5-4.2-13.6c0-13.3 10.7-24 24-24s24 10.7 24 24c0 13-10.3 23.6-23.2 24L304.5 349.1c-5.2 11.5-16.6 18.9-29.2 18.9l-102.6 0c-12.6 0-24-7.4-29.2-18.9L87.2 224C74.3 223.6 64 213 64 200c0-13.3 10.7-24 24-24s24 10.7 24 24c0 5-1.5 9.7-4.2 13.6L160 224l53.1-46.4c-8.9-4.1-15-13.1-15-23.6c0-14.4 11.6-26 26-26s26 11.6 26 26c0 10.5-6.2 19.5-15.1 23.6z\"]\n};\nconst faSass = {\n  prefix: 'fab',\n  iconName: 'sass',\n  icon: [640, 512, [], \"f41e\", \"M301.84 378.92c-.3.6-.6 1.08 0 0zm249.13-87a131.16 131.16 0 0 0-58 13.5c-5.9-11.9-12-22.3-13-30.1-1.2-9.1-2.5-14.5-1.1-25.3s7.7-26.1 7.6-27.2-1.4-6.6-14.3-6.7-24 2.5-25.29 5.9a122.83 122.83 0 0 0-5.3 19.1c-2.3 11.7-25.79 53.5-39.09 75.3-4.4-8.5-8.1-16-8.9-22-1.2-9.1-2.5-14.5-1.1-25.3s7.7-26.1 7.6-27.2-1.4-6.6-14.29-6.7-24 2.5-25.3 5.9-2.7 11.4-5.3 19.1-33.89 77.3-42.08 95.4c-4.2 9.2-7.8 16.6-10.4 21.6-.4.8-.7 1.3-.9 1.7.3-.5.5-1 .5-.8-2.2 4.3-3.5 6.7-3.5 6.7v.1c-1.7 3.2-3.6 6.1-4.5 6.1-.6 0-1.9-8.4.3-19.9 4.7-24.2 15.8-61.8 15.7-63.1-.1-.7 2.1-7.2-7.3-10.7-9.1-3.3-12.4 2.2-13.2 2.2s-1.4 2-1.4 2 10.1-42.4-19.39-42.4c-18.4 0-44 20.2-56.58 38.5-7.9 4.3-25 13.6-43 23.5-6.9 3.8-14 7.7-20.7 11.4-.5-.5-.9-1-1.4-1.5-35.79-38.2-101.87-65.2-99.07-116.5 1-18.7 7.5-67.8 127.07-127.4 98-48.8 176.35-35.4 189.84-5.6 19.4 42.5-41.89 121.6-143.66 133-38.79 4.3-59.18-10.7-64.28-16.3-5.3-5.9-6.1-6.2-8.1-5.1-3.3 1.8-1.2 7 0 10.1 3 7.9 15.5 21.9 36.79 28.9 18.7 6.1 64.18 9.5 119.17-11.8 61.78-23.8 109.87-90.1 95.77-145.6C386.52 18.32 293-.18 204.57 31.22c-52.69 18.7-109.67 48.1-150.66 86.4-48.69 45.6-56.48 85.3-53.28 101.9 11.39 58.9 92.57 97.3 125.06 125.7-1.6.9-3.1 1.7-4.5 2.5-16.29 8.1-78.18 40.5-93.67 74.7-17.5 38.8 2.9 66.6 16.29 70.4 41.79 11.6 84.58-9.3 107.57-43.6s20.2-79.1 9.6-99.5c-.1-.3-.3-.5-.4-.8 4.2-2.5 8.5-5 12.8-7.5 8.29-4.9 16.39-9.4 23.49-13.3-4 10.8-6.9 23.8-8.4 42.6-1.8 22 7.3 50.5 19.1 61.7 5.2 4.9 11.49 5 15.39 5 13.8 0 20-11.4 26.89-25 8.5-16.6 16-35.9 16-35.9s-9.4 52.2 16.3 52.2c9.39 0 18.79-12.1 23-18.3v.1s.2-.4.7-1.2c1-1.5 1.5-2.4 1.5-2.4v-.3c3.8-6.5 12.1-21.4 24.59-46 16.2-31.8 31.69-71.5 31.69-71.5a201.24 201.24 0 0 0 6.2 25.8c2.8 9.5 8.7 19.9 13.4 30-3.8 5.2-6.1 8.2-6.1 8.2a.31.31 0 0 0 .1.2c-3 4-6.4 8.3-9.9 12.5-12.79 15.2-28 32.6-30 37.6-2.4 5.9-1.8 10.3 2.8 13.7 3.4 2.6 9.4 3 15.69 2.5 11.5-.8 19.6-3.6 23.5-5.4a82.2 82.2 0 0 0 20.19-10.6c12.5-9.2 20.1-22.4 19.4-39.8-.4-9.6-3.5-19.2-7.3-28.2 1.1-1.6 2.3-3.3 3.4-5C434.8 301.72 450.1 270 450.1 270a201.24 201.24 0 0 0 6.2 25.8c2.4 8.1 7.09 17 11.39 25.7-18.59 15.1-30.09 32.6-34.09 44.1-7.4 21.3-1.6 30.9 9.3 33.1 4.9 1 11.9-1.3 17.1-3.5a79.46 79.46 0 0 0 21.59-11.1c12.5-9.2 24.59-22.1 23.79-39.6-.3-7.9-2.5-15.8-5.4-23.4 15.7-6.6 36.09-10.2 62.09-7.2 55.68 6.5 66.58 41.3 64.48 55.8s-13.8 22.6-17.7 25-5.1 3.3-4.8 5.1c.5 2.6 2.3 2.5 5.6 1.9 4.6-.8 29.19-11.8 30.29-38.7 1.6-34-31.09-71.4-89-71.1zm-429.18 144.7c-18.39 20.1-44.19 27.7-55.28 21.3C54.61 451 59.31 421.42 82 400c13.8-13 31.59-25 43.39-32.4 2.7-1.6 6.6-4 11.4-6.9.8-.5 1.2-.7 1.2-.7.9-.6 1.9-1.1 2.9-1.7 8.29 30.4.3 57.2-19.1 78.3zm134.36-91.4c-6.4 15.7-19.89 55.7-28.09 53.6-7-1.8-11.3-32.3-1.4-62.3 5-15.1 15.6-33.1 21.9-40.1 10.09-11.3 21.19-14.9 23.79-10.4 3.5 5.9-12.2 49.4-16.2 59.2zm111 53c-2.7 1.4-5.2 2.3-6.4 1.6-.9-.5 1.1-2.4 1.1-2.4s13.9-14.9 19.4-21.7c3.2-4 6.9-8.7 10.89-13.9 0 .5.1 1 .1 1.6-.13 17.9-17.32 30-25.12 34.8zm85.58-19.5c-2-1.4-1.7-6.1 5-20.7 2.6-5.7 8.59-15.3 19-24.5a36.18 36.18 0 0 1 1.9 10.8c-.1 22.5-16.2 30.9-25.89 34.4z\"]\n};\nconst faWirsindhandwerk = {\n  prefix: 'fab',\n  iconName: 'wirsindhandwerk',\n  icon: [512, 512, [\"wsh\"], \"e2d0\", \"M50.77161,479.81213h83.36071V367.84741l-83.36071,47.009Zm329.04675,0h82.35022V414.85645l-82.35022-47.009Zm.00568-448V251.568L256.1759,179.1861,134.50378,251.568V31.81213H50.77161V392.60565L256.1759,270.31909,462.16858,392.60565V31.81213Z\"]\n};\nconst faWsh = faWirsindhandwerk;\nconst faBuromobelexperte = {\n  prefix: 'fab',\n  iconName: 'buromobelexperte',\n  icon: [448, 512, [], \"f37f\", \"M0 32v128h128V32H0zm120 120H8V40h112v112zm40-120v128h128V32H160zm120 120H168V40h112v112zm40-120v128h128V32H320zm120 120H328V40h112v112zM0 192v128h128V192H0zm120 120H8V200h112v112zm40-120v128h128V192H160zm120 120H168V200h112v112zm40-120v128h128V192H320zm120 120H328V200h112v112zM0 352v128h128V352H0zm120 120H8V360h112v112zm40-120v128h128V352H160zm120 120H168V360h112v112zm40-120v128h128V352H320z\"]\n};\nconst faSalesforce = {\n  prefix: 'fab',\n  iconName: 'salesforce',\n  icon: [640, 512, [], \"f83b\", \"M248.89 245.64h-26.35c.69-5.16 3.32-14.12 13.64-14.12 6.75 0 11.97 3.82 12.71 14.12zm136.66-13.88c-.47 0-14.11-1.77-14.11 20s13.63 20 14.11 20c13 0 14.11-13.54 14.11-20 0-21.76-13.66-20-14.11-20zm-243.22 23.76a8.63 8.63 0 0 0-3.29 7.29c0 4.78 2.08 6.05 3.29 7.05 4.7 3.7 15.07 2.12 20.93.95v-16.94c-5.32-1.07-16.73-1.96-20.93 1.65zM640 232c0 87.58-80 154.39-165.36 136.43-18.37 33-70.73 70.75-132.2 41.63-41.16 96.05-177.89 92.18-213.81-5.17C8.91 428.78-50.19 266.52 53.36 205.61 18.61 126.18 76 32 167.67 32a124.24 124.24 0 0 1 98.56 48.7c20.7-21.4 49.4-34.81 81.15-34.81 42.34 0 79 23.52 98.8 58.57C539 63.78 640 132.69 640 232zm-519.55 31.8c0-11.76-11.69-15.17-17.87-17.17-5.27-2.11-13.41-3.51-13.41-8.94 0-9.46 17-6.66 25.17-2.12 0 0 1.17.71 1.64-.47.24-.7 2.36-6.58 2.59-7.29a1.13 1.13 0 0 0-.7-1.41c-12.33-7.63-40.7-8.51-40.7 12.7 0 12.46 11.49 15.44 17.88 17.17 4.72 1.58 13.17 3 13.17 8.7 0 4-3.53 7.06-9.17 7.06a31.76 31.76 0 0 1-19-6.35c-.47-.23-1.42-.71-1.65.71l-2.4 7.47c-.47.94.23 1.18.23 1.41 1.75 1.4 10.3 6.59 22.82 6.59 13.17 0 21.4-7.06 21.4-18.11zm32-42.58c-10.13 0-18.66 3.17-21.4 5.18a1 1 0 0 0-.24 1.41l2.59 7.06a1 1 0 0 0 1.18.7c.65 0 6.8-4 16.93-4 4 0 7.06.71 9.18 2.36 3.6 2.8 3.06 8.29 3.06 10.58-4.79-.3-19.11-3.44-29.41 3.76a16.92 16.92 0 0 0-7.34 14.54c0 5.9 1.51 10.4 6.59 14.35 12.24 8.16 36.28 2 38.1 1.41 1.58-.32 3.53-.66 3.53-1.88v-33.88c.04-4.61.32-21.64-22.78-21.64zM199 200.24a1.11 1.11 0 0 0-1.18-1.18H188a1.11 1.11 0 0 0-1.17 1.18v79a1.11 1.11 0 0 0 1.17 1.18h9.88a1.11 1.11 0 0 0 1.18-1.18zm55.75 28.93c-2.1-2.31-6.79-7.53-17.65-7.53-3.51 0-14.16.23-20.7 8.94-6.35 7.63-6.58 18.11-6.58 21.41 0 3.12.15 14.26 7.06 21.17 2.64 2.91 9.06 8.23 22.81 8.23 10.82 0 16.47-2.35 18.58-3.76.47-.24.71-.71.24-1.88l-2.35-6.83a1.26 1.26 0 0 0-1.41-.7c-2.59.94-6.35 2.82-15.29 2.82-17.42 0-16.85-14.74-16.94-16.7h37.17a1.23 1.23 0 0 0 1.17-.94c-.29 0 2.07-14.7-6.09-24.23zm36.69 52.69c13.17 0 21.41-7.06 21.41-18.11 0-11.76-11.7-15.17-17.88-17.17-4.14-1.66-13.41-3.38-13.41-8.94 0-3.76 3.29-6.35 8.47-6.35a38.11 38.11 0 0 1 16.7 4.23s1.18.71 1.65-.47c.23-.7 2.35-6.58 2.58-7.29a1.13 1.13 0 0 0-.7-1.41c-7.91-4.9-16.74-4.94-20.23-4.94-12 0-20.46 7.29-20.46 17.64 0 12.46 11.48 15.44 17.87 17.17 6.11 2 13.17 3.26 13.17 8.7 0 4-3.52 7.06-9.17 7.06a31.8 31.8 0 0 1-19-6.35 1 1 0 0 0-1.65.71l-2.35 7.52c-.47.94.23 1.18.23 1.41 1.72 1.4 10.33 6.59 22.79 6.59zM357.09 224c0-.71-.24-1.18-1.18-1.18h-11.76c0-.14.94-8.94 4.47-12.47 4.16-4.15 11.76-1.64 12-1.64 1.17.47 1.41 0 1.64-.47l2.83-7.77c.7-.94 0-1.17-.24-1.41-5.09-2-17.35-2.87-24.46 4.24-5.48 5.48-7 13.92-8 19.52h-8.47a1.28 1.28 0 0 0-1.17 1.18l-1.42 7.76c0 .7.24 1.17 1.18 1.17h8.23c-8.51 47.9-8.75 50.21-10.35 55.52-1.08 3.62-3.29 6.9-5.88 7.76-.09 0-3.88 1.68-9.64-.24 0 0-.94-.47-1.41.71-.24.71-2.59 6.82-2.83 7.53s0 1.41.47 1.41c5.11 2 13 1.77 17.88 0 6.28-2.28 9.72-7.89 11.53-12.94 2.75-7.71 2.81-9.79 11.76-59.74h12.23a1.29 1.29 0 0 0 1.18-1.18zm53.39 16c-.56-1.68-5.1-18.11-25.17-18.11-15.25 0-23 10-25.16 18.11-1 3-3.18 14 0 23.52.09.3 4.41 18.12 25.16 18.12 14.95 0 22.9-9.61 25.17-18.12 3.21-9.61 1.01-20.52 0-23.52zm45.4-16.7c-5-1.65-16.62-1.9-22.11 5.41v-4.47a1.11 1.11 0 0 0-1.18-1.17h-9.4a1.11 1.11 0 0 0-1.18 1.17v55.28a1.12 1.12 0 0 0 1.18 1.18h9.64a1.12 1.12 0 0 0 1.18-1.18v-27.77c0-2.91.05-11.37 4.46-15.05 4.9-4.9 12-3.36 13.41-3.06a1.57 1.57 0 0 0 1.41-.94 74 74 0 0 0 3.06-8 1.16 1.16 0 0 0-.47-1.41zm46.81 54.1l-2.12-7.29c-.47-1.18-1.41-.71-1.41-.71-4.23 1.82-10.15 1.89-11.29 1.89-4.64 0-17.17-1.13-17.17-19.76 0-6.23 1.85-19.76 16.47-19.76a34.85 34.85 0 0 1 11.52 1.65s.94.47 1.18-.71c.94-2.59 1.64-4.47 2.59-7.53.23-.94-.47-1.17-.71-1.17-11.59-3.87-22.34-2.53-27.76 0-1.59.74-16.23 6.49-16.23 27.52 0 2.9-.58 30.11 28.94 30.11a44.45 44.45 0 0 0 15.52-2.83 1.3 1.3 0 0 0 .47-1.42zm53.87-39.52c-.8-3-5.37-16.23-22.35-16.23-16 0-23.52 10.11-25.64 18.59a38.58 38.58 0 0 0-1.65 11.76c0 25.87 18.84 29.4 29.88 29.4 10.82 0 16.46-2.35 18.58-3.76.47-.24.71-.71.24-1.88l-2.36-6.83a1.26 1.26 0 0 0-1.41-.7c-2.59.94-6.35 2.82-15.29 2.82-17.42 0-16.85-14.74-16.93-16.7h37.16a1.25 1.25 0 0 0 1.18-.94c-.24-.01.94-7.07-1.41-15.54zm-23.29-6.35c-10.33 0-13 9-13.64 14.12H546c-.88-11.92-7.62-14.13-12.73-14.13z\"]\n};\nconst faOctopusDeploy = {\n  prefix: 'fab',\n  iconName: 'octopus-deploy',\n  icon: [512, 512, [], \"e082\", \"M455.6,349.2c-45.891-39.09-36.67-77.877-16.095-128.11C475.16,134.04,415.967,34.14,329.93,8.3,237.04-19.6,134.252,24.341,99.677,117.147a180.862,180.862,0,0,0-10.988,73.544c1.733,29.543,14.717,52.97,24.09,80.3,17.2,50.161-28.1,92.743-66.662,117.582-46.806,30.2-36.319,39.857-8.428,41.858,23.378,1.68,44.478-4.548,65.265-15.045,9.2-4.647,40.687-18.931,45.13-28.588C135.9,413.388,111.122,459.5,126.621,488.9c19.1,36.229,67.112-31.77,76.709-45.812,8.591-12.572,42.963-81.279,63.627-46.926,18.865,31.361,8.6,76.391,35.738,104.622,32.854,34.2,51.155-18.312,51.412-44.221.163-16.411-6.1-95.852,29.9-59.944C405.428,418,436.912,467.8,472.568,463.642c38.736-4.516-22.123-67.967-28.262-78.695,5.393,4.279,53.665,34.128,53.818,9.52C498.234,375.678,468.039,359.8,455.6,349.2Z\"]\n};\nconst faMedapps = {\n  prefix: 'fab',\n  iconName: 'medapps',\n  icon: [320, 512, [], \"f3c6\", \"M118.3 238.4c3.5-12.5 6.9-33.6 13.2-33.6 8.3 1.8 9.6 23.4 18.6 36.6 4.6-23.5 5.3-85.1 14.1-86.7 9-.7 19.7 66.5 22 77.5 9.9 4.1 48.9 6.6 48.9 6.6 1.9 7.3-24 7.6-40 7.8-4.6 14.8-5.4 27.7-11.4 28-4.7.2-8.2-28.8-17.5-49.6l-9.4 65.5c-4.4 13-15.5-22.5-21.9-39.3-3.3-.1-62.4-1.6-47.6-7.8l31-5zM228 448c21.2 0 21.2-32 0-32H92c-21.2 0-21.2 32 0 32h136zm-24 64c21.2 0 21.2-32 0-32h-88c-21.2 0-21.2 32 0 32h88zm34.2-141.5c3.2-18.9 5.2-36.4 11.9-48.8 7.9-14.7 16.1-28.1 24-41 24.6-40.4 45.9-75.2 45.9-125.5C320 69.6 248.2 0 160 0S0 69.6 0 155.2c0 50.2 21.3 85.1 45.9 125.5 7.9 12.9 16 26.3 24 41 6.7 12.5 8.7 29.8 11.9 48.9 3.5 21 36.1 15.7 32.6-5.1-3.6-21.7-5.6-40.7-15.3-58.6C66.5 246.5 33 211.3 33 155.2 33 87.3 90 32 160 32s127 55.3 127 123.2c0 56.1-33.5 91.3-66.1 151.6-9.7 18-11.7 37.4-15.3 58.6-3.4 20.6 29 26.4 32.6 5.1z\"]\n};\nconst faNs8 = {\n  prefix: 'fab',\n  iconName: 'ns8',\n  icon: [640, 512, [], \"f3d5\", \"M104.324,269.172h26.067V242.994H104.324Zm52.466-26.178-.055-26.178v-.941a39.325,39.325,0,0,0-78.644.941v.166h26.4v-.166a12.98,12.98,0,0,1,25.956,0v26.178Zm52.356,25.846a91.1,91.1,0,0,1-91.1,91.1h-.609a91.1,91.1,0,0,1-91.1-91.1H0v.166A117.33,117.33,0,0,0,117.44,386.28h.775A117.331,117.331,0,0,0,235.49,268.84V242.828H209.146Zm-157.233,0a65.362,65.362,0,0,0,130.723,0H156.292a39.023,39.023,0,0,1-78.035,0V242.883H51.968v-26.62A65.42,65.42,0,0,1,182.8,217.48v25.293h26.344V217.48a91.761,91.761,0,0,0-183.522,0v25.4H51.913Zm418.4-71.173c13.67,0,24.573,6.642,30.052,18.264l.719,1.549,23.245-11.511-.609-1.439c-8.025-19.26-28.5-31.27-53.407-31.27-23.134,0-43.611,11.4-50.972,28.447-.123,26.876-.158,23.9,0,24.85,4.7,11.013,14.555,19.37,28.668,24.241a102.033,102.033,0,0,0,19.813,3.984c5.479.72,10.626,1.384,15.829,3.1,6.364,2.1,10.46,5.257,12.84,9.851v9.851c-3.708,7.527-13.781,12.342-25.791,12.342-14.334,0-25.956-6.918-31.933-19.039l-.72-1.494L415.026,280.9l.553,1.439c7.915,19.426,29.609,32.044,55.289,32.044,23.632,0,44.608-11.4,52.3-28.447l.166-25.9-.166-.664c-4.87-11.014-15.219-19.647-28.944-24.241-7.693-2.712-14.335-3.6-20.7-4.427a83.777,83.777,0,0,1-14.832-2.878c-6.31-1.937-10.4-5.092-12.619-9.63v-8.412C449.45,202.427,458.969,197.667,470.315,197.667ZM287.568,311.344h26.067v-68.4H287.568Zm352.266-53.3c-2.933-6.254-8.3-12.01-15.441-16.714A37.99,37.99,0,0,0,637.4,226l.166-25.347-.166-.664C630.038,184,610.667,173.26,589.25,173.26S548.461,184,541.1,199.992l-.166,25.347.166.664a39.643,39.643,0,0,0,13.006,15.331c-7.2,4.7-12.508,10.46-15.441,16.714l-.166,28.889.166.72c7.582,15.994,27.893,26.731,50.585,26.731s43.057-10.737,50.584-26.731l.166-28.89Zm-73.22-50.806c3.6-6.31,12.563-10.516,22.58-10.516s19.038,4.206,22.636,10.516v13.725c-3.542,6.2-12.563,10.349-22.636,10.349s-19.094-4.15-22.58-10.349Zm47.319,72.169c-3.764,6.641-13.338,10.9-24.683,10.9-11.125,0-20.976-4.372-24.684-10.9V263.25c3.708-6.309,13.5-10.515,24.684-10.515,11.345,0,20.919,4.15,24.683,10.515ZM376.4,265.962l-59.827-89.713h-29v40.623h26.51v.387l62.539,94.085H402.3V176.249H376.4Z\"]\n};\nconst faPinterestP = {\n  prefix: 'fab',\n  iconName: 'pinterest-p',\n  icon: [384, 512, [], \"f231\", \"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z\"]\n};\nconst faApper = {\n  prefix: 'fab',\n  iconName: 'apper',\n  icon: [640, 512, [], \"f371\", \"M42.1 239.1c22.2 0 29 2.8 33.5 14.6h.8v-22.9c0-11.3-4.8-15.4-17.9-15.4-11.3 0-14.4 2.5-15.1 12.8H4.8c.3-13.9 1.5-19.1 5.8-24.4C17.9 195 29.5 192 56.7 192c33 0 47.1 5 53.9 18.9 2 4.3 4 15.6 4 23.7v76.3H76.3l1.3-19.1h-1c-5.3 15.6-13.6 20.4-35.5 20.4-30.3 0-41.1-10.1-41.1-37.3 0-25.2 12.3-35.8 42.1-35.8zm17.1 48.1c13.1 0 16.9-3 16.9-13.4 0-9.1-4.3-11.6-19.6-11.6-13.1 0-17.9 3-17.9 12.1-.1 10.4 3.7 12.9 20.6 12.9zm77.8-94.9h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.2 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3H137v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm57.9-60.7h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.3 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3h-39.5v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm53.8-3.8c0-25.4 3.3-37.8 12.3-45.8 8.8-8.1 22.2-11.3 45.1-11.3 42.8 0 55.7 12.8 55.7 55.7v11.1h-75.3c-.3 2-.3 4-.3 4.8 0 16.9 4.5 21.9 20.1 21.9 13.9 0 17.9-3 17.9-13.9h37.5v2.3c0 9.8-2.5 18.9-6.8 24.7-7.3 9.8-19.6 13.6-44.3 13.6-27.5 0-41.6-3.3-50.6-12.3-8.5-8.5-11.3-21.3-11.3-50.8zm76.4-11.6c-.3-1.8-.3-3.3-.3-3.8 0-12.3-3.3-14.6-19.6-14.6-14.4 0-17.1 3-18.1 15.1l-.3 3.3h38.3zm55.6-45.3h38.3l-1.8 19.9h.7c6.8-14.9 14.4-20.2 29.7-20.2 10.8 0 19.1 3.3 23.4 9.3 5.3 7.3 6.8 14.4 6.8 34 0 1.5 0 5 .2 9.3h-35c.3-1.8.3-3.3.3-4 0-15.4-2-19.4-10.3-19.4-6.3 0-10.8 3.3-13.1 9.3-1 3-1 4.3-1 12.3v68h-38.3V192.3z\"]\n};\nconst faFortAwesome = {\n  prefix: 'fab',\n  iconName: 'fort-awesome',\n  icon: [512, 512, [], \"f286\", \"M489.2 287.9h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6V146.2c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6v-32c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6v-32c0-6-8-4.6-11.7-4.6v-38c8.3-2 17.1-3.4 25.7-3.4 10.9 0 20.9 4.3 31.4 4.3 4.6 0 27.7-1.1 27.7-8v-60c0-2.6-2-4.6-4.6-4.6-5.1 0-15.1 4.3-24 4.3-9.7 0-20.9-4.3-32.6-4.3-8 0-16 1.1-23.7 2.9v-4.9c5.4-2.6 9.1-8.3 9.1-14.3 0-20.7-31.4-20.8-31.4 0 0 6 3.7 11.7 9.1 14.3v111.7c-3.7 0-11.7-1.4-11.7 4.6v32h-36.6v-32c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32H128v-32c0-2.6-2-4.6-4.6-4.6H96c-2.6 0-4.6 2-4.6 4.6v178.3H54.8v-32c0-2.6-2-4.6-4.6-4.6H22.8c-2.6 0-4.6 2-4.6 4.6V512h182.9v-96c0-72.6 109.7-72.6 109.7 0v96h182.9V292.5c.1-2.6-1.9-4.6-4.5-4.6zm-288.1-4.5c0 2.6-2 4.6-4.6 4.6h-27.4c-2.6 0-4.6-2-4.6-4.6v-64c0-2.6 2-4.6 4.6-4.6h27.4c2.6 0 4.6 2 4.6 4.6v64zm146.4 0c0 2.6-2 4.6-4.6 4.6h-27.4c-2.6 0-4.6-2-4.6-4.6v-64c0-2.6 2-4.6 4.6-4.6h27.4c2.6 0 4.6 2 4.6 4.6v64z\"]\n};\nconst faWaze = {\n  prefix: 'fab',\n  iconName: 'waze',\n  icon: [512, 512, [], \"f83f\", \"M502.17 201.67C516.69 287.53 471.23 369.59 389 409.8c13 34.1-12.4 70.2-48.32 70.2a51.68 51.68 0 0 1-51.57-49c-6.44.19-64.2 0-76.33-.64A51.69 51.69 0 0 1 159 479.92c-33.86-1.36-57.95-34.84-47-67.92-37.21-13.11-72.54-34.87-99.62-70.8-13-17.28-.48-41.8 20.84-41.8 46.31 0 32.22-54.17 43.15-110.26C94.8 95.2 193.12 32 288.09 32c102.48 0 197.15 70.67 214.08 169.67zM373.51 388.28c42-19.18 81.33-56.71 96.29-102.14 40.48-123.09-64.15-228-181.71-228-83.45 0-170.32 55.42-186.07 136-9.53 48.91 5 131.35-68.75 131.35C58.21 358.6 91.6 378.11 127 389.54c24.66-21.8 63.87-15.47 79.83 14.34 14.22 1 79.19 1.18 87.9.82a51.69 51.69 0 0 1 78.78-16.42zM205.12 187.13c0-34.74 50.84-34.75 50.84 0s-50.84 34.74-50.84 0zm116.57 0c0-34.74 50.86-34.75 50.86 0s-50.86 34.75-50.86 0zm-122.61 70.69c-3.44-16.94 22.18-22.18 25.62-5.21l.06.28c4.14 21.42 29.85 44 64.12 43.07 35.68-.94 59.25-22.21 64.11-42.77 4.46-16.05 28.6-10.36 25.47 6-5.23 22.18-31.21 62-91.46 62.9-42.55 0-80.88-27.84-87.9-64.25z\"]\n};\nconst faBluesky = {\n  prefix: 'fab',\n  iconName: 'bluesky',\n  icon: [512, 512, [], \"e671\", \"M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z\"]\n};\nconst faCcJcb = {\n  prefix: 'fab',\n  iconName: 'cc-jcb',\n  icon: [576, 512, [], \"f24b\", \"M431.5 244.3V212c41.2 0 38.5.2 38.5.2 7.3 1.3 13.3 7.3 13.3 16 0 8.8-6 14.5-13.3 15.8-1.2.4-3.3.3-38.5.3zm42.8 20.2c-2.8-.7-3.3-.5-42.8-.5v35c39.6 0 40 .2 42.8-.5 7.5-1.5 13.5-8 13.5-17 0-8.7-6-15.5-13.5-17zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM182 192.3h-57c0 67.1 10.7 109.7-35.8 109.7-19.5 0-38.8-5.7-57.2-14.8v28c30 8.3 68 8.3 68 8.3 97.9 0 82-47.7 82-131.2zm178.5 4.5c-63.4-16-165-14.9-165 59.3 0 77.1 108.2 73.6 165 59.2V287C312.9 311.7 253 309 253 256s59.8-55.6 107.5-31.2v-28zM544 286.5c0-18.5-16.5-30.5-38-32v-.8c19.5-2.7 30.3-15.5 30.3-30.2 0-19-15.7-30-37-31 0 0 6.3-.3-120.3-.3v127.5h122.7c24.3.1 42.3-12.9 42.3-33.2z\"]\n};\nconst faSnapchat = {\n  prefix: 'fab',\n  iconName: 'snapchat',\n  icon: [512, 512, [62124, \"snapchat-ghost\"], \"f2ab\", \"M496.926,366.6c-3.373-9.176-9.8-14.086-17.112-18.153-1.376-.806-2.641-1.451-3.72-1.947-2.182-1.128-4.414-2.22-6.634-3.373-22.8-12.09-40.609-27.341-52.959-45.42a102.889,102.889,0,0,1-9.089-16.12c-1.054-3.013-1-4.724-.248-6.287a10.221,10.221,0,0,1,2.914-3.038c3.918-2.591,7.96-5.22,10.7-6.993,4.885-3.162,8.754-5.667,11.246-7.44,9.362-6.547,15.909-13.5,20-21.278a42.371,42.371,0,0,0,2.1-35.191c-6.2-16.318-21.613-26.449-40.287-26.449a55.543,55.543,0,0,0-11.718,1.24c-1.029.224-2.059.459-3.063.72.174-11.16-.074-22.94-1.066-34.534-3.522-40.758-17.794-62.123-32.674-79.16A130.167,130.167,0,0,0,332.1,36.443C309.515,23.547,283.91,17,256,17S202.6,23.547,180,36.443a129.735,129.735,0,0,0-33.281,26.783c-14.88,17.038-29.152,38.44-32.673,79.161-.992,11.594-1.24,23.435-1.079,34.533-1-.26-2.021-.5-3.051-.719a55.461,55.461,0,0,0-11.717-1.24c-18.687,0-34.125,10.131-40.3,26.449a42.423,42.423,0,0,0,2.046,35.228c4.105,7.774,10.652,14.731,20.014,21.278,2.48,1.736,6.361,4.24,11.246,7.44,2.641,1.711,6.5,4.216,10.28,6.72a11.054,11.054,0,0,1,3.3,3.311c.794,1.624.818,3.373-.36,6.6a102.02,102.02,0,0,1-8.94,15.785c-12.077,17.669-29.363,32.648-51.434,44.639C32.355,348.608,20.2,352.75,15.069,366.7c-3.868,10.528-1.339,22.506,8.494,32.6a49.137,49.137,0,0,0,12.4,9.387,134.337,134.337,0,0,0,30.342,12.139,20.024,20.024,0,0,1,6.126,2.741c3.583,3.137,3.075,7.861,7.849,14.78a34.468,34.468,0,0,0,8.977,9.127c10.019,6.919,21.278,7.353,33.207,7.811,10.776.41,22.989.881,36.939,5.481,5.778,1.91,11.78,5.605,18.736,9.92C194.842,480.951,217.707,495,255.973,495s61.292-14.123,78.118-24.428c6.907-4.24,12.872-7.9,18.489-9.758,13.949-4.613,26.163-5.072,36.939-5.481,11.928-.459,23.187-.893,33.206-7.812a34.584,34.584,0,0,0,10.218-11.16c3.434-5.84,3.348-9.919,6.572-12.771a18.971,18.971,0,0,1,5.753-2.629A134.893,134.893,0,0,0,476.02,408.71a48.344,48.344,0,0,0,13.019-10.193l.124-.149C498.389,388.5,500.708,376.867,496.926,366.6Zm-34.013,18.277c-20.745,11.458-34.533,10.23-45.259,17.137-9.114,5.865-3.72,18.513-10.342,23.076-8.134,5.617-32.177-.4-63.239,9.858-25.618,8.469-41.961,32.822-88.038,32.822s-62.036-24.3-88.076-32.884c-31-10.255-55.092-4.241-63.239-9.858-6.609-4.563-1.24-17.211-10.341-23.076-10.739-6.907-24.527-5.679-45.26-17.075-13.206-7.291-5.716-11.8-1.314-13.937,75.143-36.381,87.133-92.552,87.666-96.719.645-5.046,1.364-9.014-4.191-14.148-5.369-4.96-29.189-19.7-35.8-24.316-10.937-7.638-15.748-15.264-12.2-24.638,2.48-6.485,8.531-8.928,14.879-8.928a27.643,27.643,0,0,1,5.965.67c12,2.6,23.659,8.617,30.392,10.242a10.749,10.749,0,0,0,2.48.335c3.6,0,4.86-1.811,4.612-5.927-.768-13.132-2.628-38.725-.558-62.644,2.84-32.909,13.442-49.215,26.04-63.636,6.051-6.932,34.484-36.976,88.857-36.976s82.88,29.92,88.931,36.827c12.611,14.421,23.225,30.727,26.04,63.636,2.071,23.919.285,49.525-.558,62.644-.285,4.327,1.017,5.927,4.613,5.927a10.648,10.648,0,0,0,2.48-.335c6.745-1.624,18.4-7.638,30.4-10.242a27.641,27.641,0,0,1,5.964-.67c6.386,0,12.4,2.48,14.88,8.928,3.546,9.374-1.24,17-12.189,24.639-6.609,4.612-30.429,19.343-35.8,24.315-5.568,5.134-4.836,9.1-4.191,14.149.533,4.228,12.511,60.4,87.666,96.718C468.629,373.011,476.119,377.524,462.913,384.877Z\"]\n};\nconst faSnapchatGhost = faSnapchat;\nconst faFantasyFlightGames = {\n  prefix: 'fab',\n  iconName: 'fantasy-flight-games',\n  icon: [512, 512, [], \"f6dc\", \"M256 32.86L32.86 256 256 479.14 479.14 256 256 32.86zM88.34 255.83c1.96-2 11.92-12.3 96.49-97.48 41.45-41.75 86.19-43.77 119.77-18.69 24.63 18.4 62.06 58.9 62.15 59 .68.74 1.07 2.86.58 3.38-11.27 11.84-22.68 23.54-33.5 34.69-34.21-32.31-40.52-38.24-48.51-43.95-17.77-12.69-41.4-10.13-56.98 5.1-2.17 2.13-1.79 3.43.12 5.35 2.94 2.95 28.1 28.33 35.09 35.78-11.95 11.6-23.66 22.97-35.69 34.66-12.02-12.54-24.48-25.53-36.54-38.11-21.39 21.09-41.69 41.11-61.85 60.99zm234.82 101.6c-35.49 35.43-78.09 38.14-106.99 20.47-22.08-13.5-39.38-32.08-72.93-66.84 12.05-12.37 23.79-24.42 35.37-36.31 33.02 31.91 37.06 36.01 44.68 42.09 18.48 14.74 42.52 13.67 59.32-1.8 3.68-3.39 3.69-3.64.14-7.24-10.59-10.73-21.19-21.44-31.77-32.18-1.32-1.34-3.03-2.48-.8-4.69 10.79-10.71 21.48-21.52 32.21-32.29.26-.26.65-.38 1.91-1.07 12.37 12.87 24.92 25.92 37.25 38.75 21.01-20.73 41.24-40.68 61.25-60.42 13.68 13.4 27.13 26.58 40.86 40.03-20.17 20.86-81.68 82.71-100.5 101.5zM256 0L0 256l256 256 256-256L256 0zM16 256L256 16l240 240-240 240L16 256z\"]\n};\nconst faRust = {\n  prefix: 'fab',\n  iconName: 'rust',\n  icon: [512, 512, [], \"e07a\", \"M508.52,249.75,486.7,236.24c-.17-2-.34-3.93-.55-5.88l18.72-17.5a7.35,7.35,0,0,0-2.44-12.25l-24-9c-.54-1.88-1.08-3.78-1.67-5.64l15-20.83a7.35,7.35,0,0,0-4.79-11.54l-25.42-4.15c-.9-1.73-1.79-3.45-2.73-5.15l10.68-23.42a7.35,7.35,0,0,0-6.95-10.39l-25.82.91q-1.79-2.22-3.61-4.4L439,81.84A7.36,7.36,0,0,0,430.16,73L405,78.93q-2.17-1.83-4.4-3.61l.91-25.82a7.35,7.35,0,0,0-10.39-7L367.7,53.23c-1.7-.94-3.43-1.84-5.15-2.73L358.4,25.08a7.35,7.35,0,0,0-11.54-4.79L326,35.26c-1.86-.59-3.75-1.13-5.64-1.67l-9-24a7.35,7.35,0,0,0-12.25-2.44l-17.5,18.72c-1.95-.21-3.91-.38-5.88-.55L262.25,3.48a7.35,7.35,0,0,0-12.5,0L236.24,25.3c-2,.17-3.93.34-5.88.55L212.86,7.13a7.35,7.35,0,0,0-12.25,2.44l-9,24c-1.89.55-3.79,1.08-5.66,1.68l-20.82-15a7.35,7.35,0,0,0-11.54,4.79l-4.15,25.41c-1.73.9-3.45,1.79-5.16,2.73L120.88,42.55a7.35,7.35,0,0,0-10.39,7l.92,25.81c-1.49,1.19-3,2.39-4.42,3.61L81.84,73A7.36,7.36,0,0,0,73,81.84L78.93,107c-1.23,1.45-2.43,2.93-3.62,4.41l-25.81-.91a7.42,7.42,0,0,0-6.37,3.26,7.35,7.35,0,0,0-.57,7.13l10.66,23.41c-.94,1.7-1.83,3.43-2.73,5.16L25.08,153.6a7.35,7.35,0,0,0-4.79,11.54l15,20.82c-.59,1.87-1.13,3.77-1.68,5.66l-24,9a7.35,7.35,0,0,0-2.44,12.25l18.72,17.5c-.21,1.95-.38,3.91-.55,5.88L3.48,249.75a7.35,7.35,0,0,0,0,12.5L25.3,275.76c.17,2,.34,3.92.55,5.87L7.13,299.13a7.35,7.35,0,0,0,2.44,12.25l24,9c.55,1.89,1.08,3.78,1.68,5.65l-15,20.83a7.35,7.35,0,0,0,4.79,11.54l25.42,4.15c.9,1.72,1.79,3.45,2.73,5.14L42.56,391.12a7.35,7.35,0,0,0,.57,7.13,7.13,7.13,0,0,0,6.37,3.26l25.83-.91q1.77,2.22,3.6,4.4L73,430.16A7.36,7.36,0,0,0,81.84,439L107,433.07q2.18,1.83,4.41,3.61l-.92,25.82a7.35,7.35,0,0,0,10.39,6.95l23.43-10.68c1.69.94,3.42,1.83,5.14,2.73l4.15,25.42a7.34,7.34,0,0,0,11.54,4.78l20.83-15c1.86.6,3.76,1.13,5.65,1.68l9,24a7.36,7.36,0,0,0,12.25,2.44l17.5-18.72c1.95.21,3.92.38,5.88.55l13.51,21.82a7.35,7.35,0,0,0,12.5,0l13.51-21.82c2-.17,3.93-.34,5.88-.56l17.5,18.73a7.36,7.36,0,0,0,12.25-2.44l9-24c1.89-.55,3.78-1.08,5.65-1.68l20.82,15a7.34,7.34,0,0,0,11.54-4.78l4.15-25.42c1.72-.9,3.45-1.79,5.15-2.73l23.42,10.68a7.35,7.35,0,0,0,10.39-6.95l-.91-25.82q2.22-1.79,4.4-3.61L430.16,439a7.36,7.36,0,0,0,8.84-8.84L433.07,405q1.83-2.17,3.61-4.4l25.82.91a7.23,7.23,0,0,0,6.37-3.26,7.35,7.35,0,0,0,.58-7.13L458.77,367.7c.94-1.7,1.83-3.43,2.73-5.15l25.42-4.15a7.35,7.35,0,0,0,4.79-11.54l-15-20.83c.59-1.87,1.13-3.76,1.67-5.65l24-9a7.35,7.35,0,0,0,2.44-12.25l-18.72-17.5c.21-1.95.38-3.91.55-5.87l21.82-13.51a7.35,7.35,0,0,0,0-12.5Zm-151,129.08A13.91,13.91,0,0,0,341,389.51l-7.64,35.67A187.51,187.51,0,0,1,177,424.44l-7.64-35.66a13.87,13.87,0,0,0-16.46-10.68l-31.51,6.76a187.38,187.38,0,0,1-16.26-19.21H258.3c1.72,0,2.89-.29,2.89-1.91V309.55c0-1.57-1.17-1.91-2.89-1.91H213.47l.05-34.35H262c4.41,0,23.66,1.28,29.79,25.87,1.91,7.55,6.17,32.14,9.06,40,2.89,8.82,14.6,26.46,27.1,26.46H407a187.3,187.3,0,0,1-17.34,20.09Zm25.77,34.49A15.24,15.24,0,1,1,368,398.08h.44A15.23,15.23,0,0,1,383.24,413.32Zm-225.62-.68a15.24,15.24,0,1,1-15.25-15.25h.45A15.25,15.25,0,0,1,157.62,412.64ZM69.57,234.15l32.83-14.6a13.88,13.88,0,0,0,7.06-18.33L102.69,186h26.56V305.73H75.65A187.65,187.65,0,0,1,69.57,234.15ZM58.31,198.09a15.24,15.24,0,0,1,15.23-15.25H74a15.24,15.24,0,1,1-15.67,15.24Zm155.16,24.49.05-35.32h63.26c3.28,0,23.07,3.77,23.07,18.62,0,12.29-15.19,16.7-27.68,16.7ZM399,306.71c-9.8,1.13-20.63-4.12-22-10.09-5.78-32.49-15.39-39.4-30.57-51.4,18.86-11.95,38.46-29.64,38.46-53.26,0-25.52-17.49-41.59-29.4-49.48-16.76-11-35.28-13.23-40.27-13.23H116.32A187.49,187.49,0,0,1,221.21,70.06l23.47,24.6a13.82,13.82,0,0,0,19.6.44l26.26-25a187.51,187.51,0,0,1,128.37,91.43l-18,40.57A14,14,0,0,0,408,220.43l34.59,15.33a187.12,187.12,0,0,1,.4,32.54H423.71c-1.91,0-2.69,1.27-2.69,3.13v8.82C421,301,409.31,305.58,399,306.71ZM240,60.21A15.24,15.24,0,0,1,255.21,45h.45A15.24,15.24,0,1,1,240,60.21ZM436.84,214a15.24,15.24,0,1,1,0-30.48h.44a15.24,15.24,0,0,1-.44,30.48Z\"]\n};\nconst faWix = {\n  prefix: 'fab',\n  iconName: 'wix',\n  icon: [640, 512, [], \"f5cf\", \"M393.38 131.69c0 13.03 2.08 32.69-28.68 43.83-9.52 3.45-15.95 9.66-15.95 9.66 0-31 4.72-42.22 17.4-48.86 9.75-5.11 27.23-4.63 27.23-4.63zm-115.8 35.54l-34.24 132.66-28.48-108.57c-7.69-31.99-20.81-48.53-48.43-48.53-27.37 0-40.66 16.18-48.43 48.53L89.52 299.89 55.28 167.23C49.73 140.51 23.86 128.96 0 131.96l65.57 247.93s21.63 1.56 32.46-3.96c14.22-7.25 20.98-12.84 29.59-46.57 7.67-30.07 29.11-118.41 31.12-124.7 4.76-14.94 11.09-13.81 15.4 0 1.97 6.3 23.45 94.63 31.12 124.7 8.6 33.73 15.37 39.32 29.59 46.57 10.82 5.52 32.46 3.96 32.46 3.96l65.57-247.93c-24.42-3.07-49.82 8.93-55.3 35.27zm115.78 5.21s-4.1 6.34-13.46 11.57c-6.01 3.36-11.78 5.64-17.97 8.61-15.14 7.26-13.18 13.95-13.18 35.2v152.07s16.55 2.09 27.37-3.43c13.93-7.1 17.13-13.95 17.26-44.78V181.41l-.02.01v-8.98zm163.44 84.08L640 132.78s-35.11-5.98-52.5 9.85c-13.3 12.1-24.41 29.55-54.18 72.47-.47.73-6.25 10.54-13.07 0-29.29-42.23-40.8-60.29-54.18-72.47-17.39-15.83-52.5-9.85-52.5-9.85l83.2 123.74-82.97 123.36s36.57 4.62 53.95-11.21c11.49-10.46 17.58-20.37 52.51-70.72 6.81-10.52 12.57-.77 13.07 0 29.4 42.38 39.23 58.06 53.14 70.72 17.39 15.83 53.32 11.21 53.32 11.21L556.8 256.52z\"]\n};\nconst faSquareBehance = {\n  prefix: 'fab',\n  iconName: 'square-behance',\n  icon: [448, 512, [\"behance-square\"], \"f1b5\", \"M155.3 318.4c17.2 0 31.2-6.1 31.2-25.4c0-19.7-11.7-27.4-30.3-27.5h-46v52.9h45.1zm-5.4-129.6H110.3v44.8H153c15.1 0 25.8-6.6 25.8-22.9c0-17.7-13.7-21.9-28.9-21.9zm129.5 74.8h62.2c-1.7-18.5-11.3-29.7-30.5-29.7c-18.3 0-30.5 11.4-31.7 29.7zM384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zM349.5 185H271.7V166.1h77.8V185zM193.7 243.7c23.6 6.7 35 27.5 35 51.6c0 39-32.7 55.7-67.6 55.9H68v-192h90.5c32.9 0 61.4 9.3 61.4 47.5c0 19.3-9 28.8-26.2 37zm118.7-38.6c43.5 0 67.6 34.3 67.6 75.4c0 1.6-.1 3.3-.2 5c0 .8-.1 1.5-.1 2.2H279.5c0 22.2 11.7 35.3 34.1 35.3c11.6 0 26.5-6.2 30.2-18.1h33.7c-10.4 31.9-31.9 46.8-65.1 46.8c-43.8 0-71.1-29.7-71.1-73c0-41.8 28.7-73.6 71.1-73.6z\"]\n};\nconst faBehanceSquare = faSquareBehance;\nconst faSupple = {\n  prefix: 'fab',\n  iconName: 'supple',\n  icon: [640, 512, [], \"f3f9\", \"M640 262.5c0 64.1-109 116.1-243.5 116.1-24.8 0-48.6-1.8-71.1-5 7.7.4 15.5.6 23.4.6 134.5 0 243.5-56.9 243.5-127.1 0-29.4-19.1-56.4-51.2-78 60 21.1 98.9 55.1 98.9 93.4zM47.7 227.9c-.1-70.2 108.8-127.3 243.3-127.6 7.9 0 15.6.2 23.3.5-22.5-3.2-46.3-4.9-71-4.9C108.8 96.3-.1 148.5 0 212.6c.1 38.3 39.1 72.3 99.3 93.3-32.3-21.5-51.5-48.6-51.6-78zm60.2 39.9s10.5 13.2 29.3 13.2c17.9 0 28.4-11.5 28.4-25.1 0-28-40.2-25.1-40.2-39.7 0-5.4 5.3-9.1 12.5-9.1 5.7 0 11.3 2.6 11.3 6.6v3.9h14.2v-7.9c0-12.1-15.4-16.8-25.4-16.8-16.5 0-28.5 10.2-28.5 24.1 0 26.6 40.2 25.4 40.2 39.9 0 6.6-5.8 10.1-12.3 10.1-11.9 0-20.7-10.1-20.7-10.1l-8.8 10.9zm120.8-73.6v54.4c0 11.3-7.1 17.8-17.8 17.8-10.7 0-17.8-6.5-17.8-17.7v-54.5h-15.8v55c0 18.9 13.4 31.9 33.7 31.9 20.1 0 33.4-13 33.4-31.9v-55h-15.7zm34.4 85.4h15.8v-29.5h15.5c16 0 27.2-11.5 27.2-28.1s-11.2-27.8-27.2-27.8h-39.1v13.4h7.8v72zm15.8-43v-29.1h12.9c8.7 0 13.7 5.7 13.7 14.4 0 8.9-5.1 14.7-14 14.7h-12.6zm57 43h15.8v-29.5h15.5c16 0 27.2-11.5 27.2-28.1s-11.2-27.8-27.2-27.8h-39.1v13.4h7.8v72zm15.7-43v-29.1h12.9c8.7 0 13.7 5.7 13.7 14.4 0 8.9-5 14.7-14 14.7h-12.6zm57.1 34.8c0 5.8 2.4 8.2 8.2 8.2h37.6c5.8 0 8.2-2.4 8.2-8.2v-13h-14.3v5.2c0 1.7-1 2.6-2.6 2.6h-18.6c-1.7 0-2.6-1-2.6-2.6v-61.2c0-5.7-2.4-8.2-8.2-8.2H401v13.4h5.2c1.7 0 2.6 1 2.6 2.6v61.2zm63.4 0c0 5.8 2.4 8.2 8.2 8.2H519c5.7 0 8.2-2.4 8.2-8.2v-13h-14.3v5.2c0 1.7-1 2.6-2.6 2.6h-19.7c-1.7 0-2.6-1-2.6-2.6v-20.3h27.7v-13.4H488v-22.4h19.2c1.7 0 2.6 1 2.6 2.6v5.2H524v-13c0-5.7-2.5-8.2-8.2-8.2h-51.6v13.4h7.8v63.9zm58.9-76v5.9h1.6v-5.9h2.7v-1.2h-7v1.2h2.7zm5.7-1.2v7.1h1.5v-5.7l2.3 5.7h1.3l2.3-5.7v5.7h1.5v-7.1h-2.3l-2.1 5.1-2.1-5.1h-2.4z\"]\n};\nconst faWebflow = {\n  prefix: 'fab',\n  iconName: 'webflow',\n  icon: [640, 512, [], \"e65c\", \"M640 64L435.8 463.2H244l85.5-165.5h-3.8C255.1 389.3 149.9 449.5 0 463.2V300.1s95.9-5.7 152.3-64.9H0V64H171.1V204.8l3.8 0L244.9 64H374.3V203.9l3.8 0L450.7 64H640z\"]\n};\nconst faRebel = {\n  prefix: 'fab',\n  iconName: 'rebel',\n  icon: [512, 512, [], \"f1d0\", \"M256.5 504C117.2 504 9 387.8 13.2 249.9 16 170.7 56.4 97.7 129.7 49.5c.3 0 1.9-.6 1.1.8-5.8 5.5-111.3 129.8-14.1 226.4 49.8 49.5 90 2.5 90 2.5 38.5-50.1-.6-125.9-.6-125.9-10-24.9-45.7-40.1-45.7-40.1l28.8-31.8c24.4 10.5 43.2 38.7 43.2 38.7.8-29.6-21.9-61.4-21.9-61.4L255.1 8l44.3 50.1c-20.5 28.8-21.9 62.6-21.9 62.6 13.8-23 43.5-39.3 43.5-39.3l28.5 31.8c-27.4 8.9-45.4 39.9-45.4 39.9-15.8 28.5-27.1 89.4.6 127.3 32.4 44.6 87.7-2.8 87.7-2.8 102.7-91.9-10.5-225-10.5-225-6.1-5.5.8-2.8.8-2.8 50.1 36.5 114.6 84.4 116.2 204.8C500.9 400.2 399 504 256.5 504z\"]\n};\nconst faCss3 = {\n  prefix: 'fab',\n  iconName: 'css3',\n  icon: [512, 512, [], \"f13c\", \"M480 32l-64 368-223.3 80L0 400l19.6-94.8h82l-8 40.6L210 390.2l134.1-44.4 18.8-97.1H29.5l16-82h333.7l10.5-52.7H56.3l16.3-82H480z\"]\n};\nconst faStaylinked = {\n  prefix: 'fab',\n  iconName: 'staylinked',\n  icon: [440, 512, [], \"f3f5\", \"M382.7 292.5l2.7 2.7-170-167.3c-3.5-3.5-9.7-3.7-13.8-.5L144.3 171c-4.2 3.2-4.6 8.7-1.1 12.2l68.1 64.3c3.6 3.5 9.9 3.7 14 .5l.1-.1c4.1-3.2 10.4-3 14 .5l84 81.3c3.6 3.5 3.2 9-.9 12.2l-93.2 74c-4.2 3.3-10.5 3.1-14.2-.4L63.2 268c-3.5-3.5-9.7-3.7-13.9-.5L3.5 302.4c-4.2 3.2-4.7 8.7-1.2 12.2L211 510.7s7.4 6.8 17.3-.8l198-163.9c4-3.2 4.4-8.7.7-12.2zm54.5-83.4L226.7 2.5c-1.5-1.2-8-5.5-16.3 1.1L3.6 165.7c-4.2 3.2-4.8 8.7-1.2 12.2l42.3 41.7 171.7 165.1c3.7 3.5 10.1 3.7 14.3.4l50.2-38.8-.3-.3 7.7-6c4.2-3.2 4.6-8.7.9-12.2l-57.1-54.4c-3.6-3.5-10-3.7-14.2-.5l-.1.1c-4.2 3.2-10.5 3.1-14.2-.4L109 180.8c-3.6-3.5-3.1-8.9 1.1-12.2l92.2-71.5c4.1-3.2 10.3-3 13.9.5l160.4 159c3.7 3.5 10 3.7 14.1.5l45.8-35.8c4.1-3.2 4.4-8.7.7-12.2z\"]\n};\nconst faKaggle = {\n  prefix: 'fab',\n  iconName: 'kaggle',\n  icon: [320, 512, [], \"f5fa\", \"M304.2 501.5L158.4 320.3 298.2 185c2.6-2.7 1.7-10.5-5.3-10.5h-69.2c-3.5 0-7 1.8-10.5 5.3L80.9 313.5V7.5q0-7.5-7.5-7.5H21.5Q14 0 14 7.5v497q0 7.5 7.5 7.5h51.9q7.5 0 7.5-7.5v-109l30.8-29.3 110.5 140.6c3 3.5 6.5 5.3 10.5 5.3h66.9q5.25 0 6-3z\"]\n};\nconst faSpaceAwesome = {\n  prefix: 'fab',\n  iconName: 'space-awesome',\n  icon: [512, 512, [], \"e5ac\", \"M96 256H128V512H0V352H32V320H64V288H96V256zM512 352V512H384V256H416V288H448V320H480V352H512zM320 64H352V448H320V416H192V448H160V64H192V32H224V0H288V32H320V64zM288 128H224V192H288V128z\"]\n};\nconst faDeviantart = {\n  prefix: 'fab',\n  iconName: 'deviantart',\n  icon: [320, 512, [], \"f1bd\", \"M320 93.2l-98.2 179.1 7.4 9.5H320v127.7H159.1l-13.5 9.2-43.7 84c-.3 0-8.6 8.6-9.2 9.2H0v-93.2l93.2-179.4-7.4-9.2H0V102.5h156l13.5-9.2 43.7-84c.3 0 8.6-8.6 9.2-9.2H320v93.1z\"]\n};\nconst faCpanel = {\n  prefix: 'fab',\n  iconName: 'cpanel',\n  icon: [640, 512, [], \"f388\", \"M210.3 220.2c-5.6-24.8-26.9-41.2-51-41.2h-37c-7.1 0-12.5 4.5-14.3 10.9L73.1 320l24.7-.1c6.8 0 12.3-4.5 14.2-10.7l25.8-95.7h19.8c8.4 0 16.2 5.6 18.3 14.8 2.5 10.9-5.9 22.6-18.3 22.6h-10.3c-7 0-12.5 4.6-14.3 10.8l-6.4 23.8h32c37.2 0 58.3-36.2 51.7-65.3zm-156.5 28h18.6c6.9 0 12.4-4.4 14.3-10.9l6.2-23.6h-40C30 213.7 9 227.8 1.7 254.8-7 288.6 18.5 320 52 320h12.4l7.1-26.1c1.2-4.4-2.2-8.3-6.4-8.3H53.8c-24.7 0-24.9-37.4 0-37.4zm247.5-34.8h-77.9l-3.5 13.4c-2.4 9.6 4.5 18.5 14.2 18.5h57.5c4 0 2.4 4.3 2.1 5.3l-8.6 31.8c-.4 1.4-.9 5.3-5.5 5.3h-34.9c-5.3 0-5.3-7.9 0-7.9h21.6c6.8 0 12.3-4.6 14.2-10.8l3.5-13.2h-48.4c-39.2 0-43.6 63.8-.7 63.8l57.5.2c11.2 0 20.6-7.2 23.4-17.8l14-51.8c4.8-19.2-9.7-36.8-28.5-36.8zM633.1 179h-18.9c-4.9 0-9.2 3.2-10.4 7.9L568.2 320c20.7 0 39.8-13.8 44.9-34.5l26.5-98.2c1.2-4.3-2-8.3-6.5-8.3zm-236.3 34.7v.1h-48.3l-26.2 98c-1.2 4.4 2.2 8.3 6.4 8.3h18.9c4.8 0 9.2-3 10.4-7.8l17.2-64H395c12.5 0 21.4 11.8 18.1 23.4l-10.6 40c-1.2 4.3 1.9 8.3 6.4 8.3H428c4.6 0 9.1-2.9 10.3-7.8l8.8-33.1c9-33.1-15.9-65.4-50.3-65.4zm98.3 74.6c-3.6 0-6-3.4-5.1-6.7l8-30c.9-3.9 3.7-6 7.8-6h32.9c2.6 0 4.6 2.4 3.9 5.1l-.7 2.6c-.6 2-1.9 3-3.9 3h-21.6c-7 0-12.6 4.6-14.2 10.8l-3.5 13h53.4c10.5 0 20.3-6.6 23.2-17.6l3.2-12c4.9-19.1-9.3-36.8-28.3-36.8h-47.3c-17.9 0-33.8 12-38.6 29.6l-10.8 40c-5 17.7 8.3 36.7 28.3 36.7h66.7c6.8 0 12.3-4.5 14.2-10.7l5.7-21z\"]\n};\nconst faGoodreadsG = {\n  prefix: 'fab',\n  iconName: 'goodreads-g',\n  icon: [384, 512, [], \"f3a9\", \"M42.6 403.3h2.8c12.7 0 25.5 0 38.2.1 1.6 0 3.1-.4 3.6 2.1 7.1 34.9 30 54.6 62.9 63.9 26.9 7.6 54.1 7.8 81.3 1.8 33.8-7.4 56-28.3 68-60.4 8-21.5 10.7-43.8 11-66.5.1-5.8.3-47-.2-52.8l-.9-.3c-.8 1.5-1.7 2.9-2.5 4.4-22.1 43.1-61.3 67.4-105.4 69.1-103 4-169.4-57-172-176.2-.5-23.7 1.8-46.9 8.3-69.7C58.3 47.7 112.3.6 191.6 0c61.3-.4 101.5 38.7 116.2 70.3.5 1.1 1.3 2.3 2.4 1.9V10.6h44.3c0 280.3.1 332.2.1 332.2-.1 78.5-26.7 143.7-103 162.2-69.5 16.9-159 4.8-196-57.2-8-13.5-11.8-28.3-13-44.5zM188.9 36.5c-52.5-.5-108.5 40.7-115 133.8-4.1 59 14.8 122.2 71.5 148.6 27.6 12.9 74.3 15 108.3-8.7 47.6-33.2 62.7-97 54.8-154-9.7-71.1-47.8-120-119.6-119.7z\"]\n};\nconst faSquareGit = {\n  prefix: 'fab',\n  iconName: 'square-git',\n  icon: [448, 512, [\"git-square\"], \"f1d2\", \"M120.8 335.5c-5.9-.4-12.6-.8-20.2-1.3c-3.3 4.1-6.6 8.4-6.6 13.5c0 18.5 65.5 18.5 65.5-1.5c0-8.3-7.4-8.7-38.8-10.7zm7.8-117.9c-32.3 0-33.7 44.5-.7 44.5c32.5 0 31.7-44.5 .7-44.5zM384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zM243.9 172.2c-14.5 0-22.9-8.4-22.9-22.9c0-14.5 8.4-22.3 22.9-22.3c14.7 0 23.1 7.8 23.1 22.3s-8.4 22.9-23.1 22.9zM149.6 195h49.5l0 21.6-23.4 1.8c4.6 5.8 9.4 14 9.4 25.7c0 48.7-57.2 47.2-74.2 42.4l-8.4 13.4c5 .3 9.8 .6 14.3 .8c56.3 3.2 80.5 4.6 80.5 38.5c0 29.2-25.7 45.7-69.9 45.7c-46 0-63.5-11.6-63.5-31.7c0-11.4 5.1-17.5 14-25.9c-8.4-3.5-11.2-9.9-11.2-16.8c0-9.6 7.4-16.3 23-30.6l.2-.2c-12.4-6.1-21.8-19.3-21.8-38.1c0-51.6 56.6-53.3 81.6-46.8zM270.5 303.1l13 1.8 0 20.1H211.1V304.9c2.7-.4 5-.7 6.9-.9c9.9-1.2 10.1-1.3 10.1-6V223.3c0-4.4-.9-4.7-10.1-7.8c-1.9-.7-4.2-1.4-6.9-2.4l2.8-20.6h52.6V298c0 4.1 .2 4.6 4.1 5.1zm106.6-10.4L384 315c-10.9 5.4-26.9 10.2-41.4 10.2c-30.2 0-41.7-12.2-41.7-40.9V217.7c0-.8 0-1.4-.2-1.8c-.8-1.2-4.2-.7-19.6-.7V192.6c22.3-2.5 31.2-13.7 34-41.4h24.2c0 33.3-.6 38 .7 38.6c.3 .1 .7 0 1.3 0h35.8v25.4H339.3v60.7c0 .2 0 .5 0 .9c-.2 6.3-.9 30.4 37.9 15.9z\"]\n};\nconst faGitSquare = faSquareGit;\nconst faSquareTumblr = {\n  prefix: 'fab',\n  iconName: 'square-tumblr',\n  icon: [448, 512, [\"tumblr-square\"], \"f174\", \"M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM256.8 416c-75.5 0-91.9-55.5-91.9-87.9v-90H135.2c-3.4 0-6.2-2.8-6.2-6.2V189.4c0-4.5 2.8-8.5 7.1-10c38.8-13.7 50.9-47.5 52.7-73.2c.5-6.9 4.1-10.2 10-10.2h44.3c3.4 0 6.2 2.8 6.2 6.2v72h51.9c3.4 0 6.2 2.8 6.2 6.2v51.1c0 3.4-2.8 6.2-6.2 6.2H249.1V321c0 21.4 14.8 33.5 42.5 22.4c3-1.2 5.6-2 8-1.4c2.2 .5 3.6 2.1 4.6 4.9L318 387.1c1 3.2 2 6.7-.3 9.1c-8.5 9.1-31.2 19.8-60.9 19.8z\"]\n};\nconst faTumblrSquare = faSquareTumblr;\nconst faTrello = {\n  prefix: 'fab',\n  iconName: 'trello',\n  icon: [448, 512, [], \"f181\", \"M392.3 32H56.1C25.1 32 0 57.1 0 88c-.1 0 0-4 0 336 0 30.9 25.1 56 56 56h336.2c30.8-.2 55.7-25.2 55.7-56V88c.1-30.8-24.8-55.8-55.6-56zM197 371.3c-.2 14.7-12.1 26.6-26.9 26.6H87.4c-14.8.1-26.9-11.8-27-26.6V117.1c0-14.8 12-26.9 26.9-26.9h82.9c14.8 0 26.9 12 26.9 26.9v254.2zm193.1-112c0 14.8-12 26.9-26.9 26.9h-81c-14.8 0-26.9-12-26.9-26.9V117.2c0-14.8 12-26.9 26.8-26.9h81.1c14.8 0 26.9 12 26.9 26.9v142.1z\"]\n};\nconst faCreativeCommonsNcJp = {\n  prefix: 'fab',\n  iconName: 'creative-commons-nc-jp',\n  icon: [496, 512, [], \"f4ea\", \"M247.7 8C103.6 8 0 124.8 0 256c0 136.4 111.8 248 247.7 248C377.9 504 496 403.2 496 256 496 117.2 388.5 8 247.7 8zm.6 450.7c-112 0-203.6-92.5-203.6-202.7 0-21.1 3-41.2 9-60.3l127 56.5h-27.9v38.6h58.1l5.7 11.8v18.7h-63.8V360h63.8v56h61.7v-56h64.2v-35.7l81 36.1c-1.5 2.2-57.1 98.3-175.2 98.3zm87.6-137.3h-57.6v-18.7l2.9-5.6 54.7 24.3zm6.5-51.4v-17.8h-38.6l63-116H301l-43.4 96-23-10.2-39.6-85.7h-65.8l27.3 51-81.9-36.5c27.8-44.1 82.6-98.1 173.7-98.1 112.8 0 203 90 203 203.4 0 21-2.7 40.6-7.9 59l-101-45.1z\"]\n};\nconst faGetPocket = {\n  prefix: 'fab',\n  iconName: 'get-pocket',\n  icon: [448, 512, [], \"f265\", \"M407.6 64h-367C18.5 64 0 82.5 0 104.6v135.2C0 364.5 99.7 464 224.2 464c124 0 223.8-99.5 223.8-224.2V104.6c0-22.4-17.7-40.6-40.4-40.6zm-162 268.5c-12.4 11.8-31.4 11.1-42.4 0C89.5 223.6 88.3 227.4 88.3 209.3c0-16.9 13.8-30.7 30.7-30.7 17 0 16.1 3.8 105.2 89.3 90.6-86.9 88.6-89.3 105.5-89.3 16.9 0 30.7 13.8 30.7 30.7 0 17.8-2.9 15.7-114.8 123.2z\"]\n};\nconst faPerbyte = {\n  prefix: 'fab',\n  iconName: 'perbyte',\n  icon: [448, 512, [], \"e083\", \"M305.314,284.578H246.6V383.3h58.711q24.423,0,38.193-13.77t13.77-36.11q0-21.826-14.032-35.335T305.314,284.578ZM149.435,128.7H90.724v98.723h58.711q24.42,0,38.19-13.773t13.77-36.107q0-21.826-14.029-35.338T149.435,128.7ZM366.647,32H81.353A81.445,81.445,0,0,0,0,113.352V398.647A81.445,81.445,0,0,0,81.353,480H366.647A81.445,81.445,0,0,0,448,398.647V113.352A81.445,81.445,0,0,0,366.647,32Zm63.635,366.647a63.706,63.706,0,0,1-63.635,63.635H81.353a63.706,63.706,0,0,1-63.635-63.635V113.352A63.706,63.706,0,0,1,81.353,49.718H366.647a63.706,63.706,0,0,1,63.635,63.634ZM305.314,128.7H246.6v98.723h58.711q24.423,0,38.193-13.773t13.77-36.107q0-21.826-14.032-35.338T305.314,128.7Z\"]\n};\nconst faGrunt = {\n  prefix: 'fab',\n  iconName: 'grunt',\n  icon: [384, 512, [], \"f3ad\", \"M61.3 189.3c-1.1 10 5.2 19.1 5.2 19.1.7-7.5 2.2-12.8 4-16.6.4 10.3 3.2 23.5 12.8 34.1 6.9 7.6 35.6 23.3 54.9 6.1 1 2.4 2.1 5.3 3 8.5 2.9 10.3-2.7 25.3-2.7 25.3s15.1-17.1 13.9-32.5c10.8-.5 21.4-8.4 21.1-19.5 0 0-18.9 10.4-35.5-8.8-9.7-11.2-40.9-42-83.1-31.8 4.3 1 8.9 2.4 13.5 4.1h-.1c-4.2 2-6.5 7.1-7 12zm28.3-1.8c19.5 11 37.4 25.7 44.9 37-5.7 3.3-21.7 10.4-38-1.7-10.3-7.6-9.8-26.2-6.9-35.3zm142.1 45.8c-1.2 15.5 13.9 32.5 13.9 32.5s-5.6-15-2.7-25.3c.9-3.2 2-6 3-8.5 19.3 17.3 48 1.5 54.8-6.1 9.6-10.6 12.3-23.8 12.8-34.1 1.8 3.8 3.4 9.1 4 16.6 0 0 6.4-9.1 5.2-19.1-.6-5-2.9-10-7-11.8h-.1c4.6-1.8 9.2-3.2 13.5-4.1-42.3-10.2-73.4 20.6-83.1 31.8-16.7 19.2-35.5 8.8-35.5 8.8-.2 10.9 10.4 18.9 21.2 19.3zm62.7-45.8c3 9.1 3.4 27.7-7 35.4-16.3 12.1-32.2 5-37.9 1.6 7.5-11.4 25.4-26 44.9-37zM160 418.5h-29.4c-5.5 0-8.2 1.6-9.5 2.9-1.9 2-2.2 4.7-.9 8.1 3.5 9.1 11.4 16.5 13.7 18.6 3.1 2.7 7.5 4.3 11.8 4.3 4.4 0 8.3-1.7 11-4.6 7.5-8.2 11.9-17.1 13-19.8.6-1.5 1.3-4.5-.9-6.8-1.8-1.8-4.7-2.7-8.8-2.7zm189.2-101.2c-2.4 17.9-13 33.8-24.6 43.7-3.1-22.7-3.7-55.5-3.7-62.4 0-14.7 9.5-24.5 12.2-26.1 2.5-1.5 5.4-3 8.3-4.6 18-9.6 40.4-21.6 40.4-43.7 0-16.2-9.3-23.2-15.4-27.8-.8-.6-1.5-1.1-2.2-1.7-2.1-1.7-3.7-3-4.3-4.4-4.4-9.8-3.6-34.2-1.7-37.6.6-.6 16.7-20.9 11.8-39.2-2-7.4-6.9-13.3-14.1-17-5.3-2.7-11.9-4.2-19.5-4.5-.1-2-.5-3.9-.9-5.9-.6-2.6-1.1-5.3-.9-8.1.4-4.7.8-9 2.2-11.3 8.4-13.3 28.8-17.6 29-17.6l12.3-2.4-8.1-9.5c-.1-.2-17.3-17.5-46.3-17.5-7.9 0-16 1.3-24.1 3.9-24.2 7.8-42.9 30.5-49.4 39.3-3.1-1-6.3-1.9-9.6-2.7-4.2-15.8 9-38.5 9-38.5s-13.6-3-33.7 15.2c-2.6-6.5-8.1-20.5-1.8-37.2C184.6 10.1 177.2 26 175 40.4c-7.6-5.4-6.7-23.1-7.2-27.6-7.5.9-29.2 21.9-28.2 48.3-2 .5-3.9 1.1-5.9 1.7-6.5-8.8-25.1-31.5-49.4-39.3-7.9-2.2-16-3.5-23.9-3.5-29 0-46.1 17.3-46.3 17.5L6 46.9l12.3 2.4c.2 0 20.6 4.3 29 17.6 1.4 2.2 1.8 6.6 2.2 11.3.2 2.8-.4 5.5-.9 8.1-.4 1.9-.8 3.9-.9 5.9-7.7.3-14.2 1.8-19.5 4.5-7.2 3.7-12.1 9.6-14.1 17-5 18.2 11.2 38.5 11.8 39.2 1.9 3.4 2.7 27.8-1.7 37.6-.6 1.4-2.2 2.7-4.3 4.4-.7.5-1.4 1.1-2.2 1.7-6.1 4.6-15.4 11.7-15.4 27.8 0 22.1 22.4 34.1 40.4 43.7 3 1.6 5.8 3.1 8.3 4.6 2.7 1.6 12.2 11.4 12.2 26.1 0 6.9-.6 39.7-3.7 62.4-11.6-9.9-22.2-25.9-24.6-43.8 0 0-29.2 22.6-20.6 70.8 5.2 29.5 23.2 46.1 47 54.7 8.8 19.1 29.4 45.7 67.3 49.6C143 504.3 163 512 192.2 512h.2c29.1 0 49.1-7.7 63.6-19.5 37.9-3.9 58.5-30.5 67.3-49.6 23.8-8.7 41.7-25.2 47-54.7 8.2-48.4-21.1-70.9-21.1-70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9 3.7 32.9 6 25.1 8 55.4 30.9 64.1 37.7.2.2.4.3.4.3l5.6 3.9-3.5-5.8c-.2-.3-19.1-31.4-53.2-46.5 2-2.9 7.4-8.1 21.6-15.1 21.4-10.5 46.5-15.8 74.3-15.8 27.9 0 52.9 5.3 74.3 15.8 14.2 6.9 19.6 12.2 21.6 15.1-34 15.1-52.9 46.2-53.1 46.5l-3.5 5.8 5.6-3.9s.2-.1.4-.3c8.7-6.8 39-29.8 64.1-37.7 7-2.2 20.6-6 32.9-6 6.3 0 11.3 1 15.1 2.9 3.5 1.8 5.7 4.4 6.7 7.8 2.5 9.1-6.1 22.6-9.4 26.6-.5.6-.9 1.3-1.3 2.2-.3-4.6-.5-9.5-.3-14.4-4 8.8-6.5 31.5-5.1 43 3.6 29.3 15.7 44.3 15.7 44.3-.8-1.6-1.8-7.7-2.7-14.9.7.6 1.5 1.2 2.2 1.8l.5.4c4.6 3.7 8.9 7.1 8.9 18.2 0 14.2-15.4 22.5-30.2 30.5-2.9 1.5-5.7 3.1-8.4 4.6-8.7 5-18 16.7-19.1 34.2-.9 14.6.9 49.9 3.4 75.9-12.4 4.8-26.7 6.4-39.7 6.8-2-4.1-3.9-8.5-5.5-13.1-.7-2-19.6-51.1-26.4-62.2 5.5 39 17.5 73.7 23.5 89.6-3.5-.5-7.3-.7-11.7-.7h-117c-4.4 0-8.3.3-11.7.7 6-15.9 18.1-50.6 23.5-89.6-6.8 11.2-25.7 60.3-26.4 62.2-1.6 4.6-3.5 9-5.5 13.1-13-.4-27.2-2-39.7-6.8 2.5-26 4.3-61.2 3.4-75.9-.9-17.4-10.3-29.2-19-34.2zM34.8 404.6c-12.1-20-8.7-54.1-3.7-59.1 10.9 34.4 47.2 44.3 74.4 45.4-2.7 4.2-5.2 7.6-7 10l-1.4 1.4c-7.2 7.8-8.6 18.5-4.1 31.8-22.7-.1-46.3-9.8-58.2-29.5zm45.7 43.5c6 1.1 12.2 1.9 18.6 2.4 3.5 8 7.4 15.9 12.3 23.1-14.4-5.9-24.4-16-30.9-25.5zM192 498.2c-60.6-.1-78.3-45.8-84.9-64.7-3.7-10.5-3.4-18.2.9-23.1 2.9-3.3 9.5-7.2 24.6-7.2h118.8c15.1 0 21.8 3.9 24.6 7.2 4.2 4.8 4.5 12.6.9 23.1-6.6 18.8-24.3 64.6-84.9 64.7zm80.6-24.6c4.9-7.2 8.8-15.1 12.3-23.1 6.4-.5 12.6-1.3 18.6-2.4-6.5 9.5-16.5 19.6-30.9 25.5zm76.6-69c-12 19.7-35.6 29.3-58.1 29.7 4.5-13.3 3.1-24.1-4.1-31.8-.4-.5-.9-1-1.4-1.5-1.8-2.4-4.3-5.8-7-10 27.2-1.2 63.5-11 74.4-45.4 5 5 8.4 39.1-3.8 59zM191.9 187.7h.2c12.7-.1 27.2-17.8 27.2-17.8-9.9 6-18.8 8.1-27.3 8.3-8.5-.2-17.4-2.3-27.3-8.3 0 0 14.5 17.6 27.2 17.8zm61.7 230.7h-29.4c-4.2 0-7.2.9-8.9 2.7-2.2 2.3-1.5 5.2-.9 6.7 1 2.6 5.5 11.3 13 19.3 2.7 2.9 6.6 4.5 11 4.5s8.7-1.6 11.8-4.2c2.3-2 10.2-9.2 13.7-18.1 1.3-3.3 1-6-.9-7.9-1.3-1.3-4-2.9-9.4-3z\"]\n};\nconst faWeebly = {\n  prefix: 'fab',\n  iconName: 'weebly',\n  icon: [512, 512, [], \"f5cc\", \"M425.09 65.83c-39.88 0-73.28 25.73-83.66 64.33-18.16-58.06-65.5-64.33-84.95-64.33-19.78 0-66.8 6.28-85.28 64.33-10.38-38.6-43.45-64.33-83.66-64.33C38.59 65.83 0 99.72 0 143.03c0 28.96 4.18 33.27 77.17 233.48 22.37 60.57 67.77 69.35 92.74 69.35 39.23 0 70.04-19.46 85.93-53.98 15.89 34.83 46.69 54.29 85.93 54.29 24.97 0 70.36-9.1 92.74-69.67 76.55-208.65 77.5-205.58 77.5-227.2.63-48.32-36.01-83.47-86.92-83.47zm26.34 114.81l-65.57 176.44c-7.92 21.49-21.22 37.22-46.24 37.22-23.44 0-37.38-12.41-44.03-33.9l-39.28-117.42h-.95L216.08 360.4c-6.96 21.5-20.9 33.6-44.02 33.6-25.02 0-38.33-15.74-46.24-37.22L60.88 181.55c-5.38-14.83-7.92-23.91-7.92-34.5 0-16.34 15.84-29.36 38.33-29.36 18.69 0 31.99 11.8 36.11 29.05l44.03 139.82h.95l44.66-136.79c6.02-19.67 16.47-32.08 38.96-32.08s32.94 12.11 38.96 32.08l44.66 136.79h.95l44.03-139.82c4.12-17.25 17.42-29.05 36.11-29.05 22.17 0 38.33 13.32 38.33 35.71-.32 7.87-4.12 16.04-7.61 27.24z\"]\n};\nconst faConnectdevelop = {\n  prefix: 'fab',\n  iconName: 'connectdevelop',\n  icon: [576, 512, [], \"f20e\", \"M550.5 241l-50.089-86.786c1.071-2.142 1.875-4.553 1.875-7.232 0-8.036-6.696-14.733-14.732-15.001l-55.447-95.893c.536-1.607 1.071-3.214 1.071-4.821 0-8.571-6.964-15.268-15.268-15.268-4.821 0-8.839 2.143-11.786 5.625H299.518C296.839 18.143 292.821 16 288 16s-8.839 2.143-11.518 5.625H170.411C167.464 18.143 163.447 16 158.625 16c-8.303 0-15.268 6.696-15.268 15.268 0 1.607.536 3.482 1.072 4.821l-55.983 97.233c-5.356 2.41-9.107 7.5-9.107 13.661 0 .535.268 1.071.268 1.607l-53.304 92.143c-7.232 1.339-12.59 7.5-12.59 15 0 7.232 5.089 13.393 12.054 15l55.179 95.358c-.536 1.607-.804 2.946-.804 4.821 0 7.232 5.089 13.393 12.054 14.732l51.697 89.732c-.536 1.607-1.071 3.482-1.071 5.357 0 8.571 6.964 15.268 15.268 15.268 4.821 0 8.839-2.143 11.518-5.357h106.875C279.161 493.857 283.447 496 288 496s8.839-2.143 11.518-5.357h107.143c2.678 2.946 6.696 4.821 10.982 4.821 8.571 0 15.268-6.964 15.268-15.268 0-1.607-.267-2.946-.803-4.285l51.697-90.268c6.964-1.339 12.054-7.5 12.054-14.732 0-1.607-.268-3.214-.804-4.821l54.911-95.358c6.964-1.339 12.322-7.5 12.322-15-.002-7.232-5.092-13.393-11.788-14.732zM153.535 450.732l-43.66-75.803h43.66v75.803zm0-83.839h-43.66c-.268-1.071-.804-2.142-1.339-3.214l44.999-47.41v50.624zm0-62.411l-50.357 53.304c-1.339-.536-2.679-1.34-4.018-1.607L43.447 259.75c.535-1.339.535-2.679.535-4.018s0-2.41-.268-3.482l51.965-90c2.679-.268 5.357-1.072 7.768-2.679l50.089 51.965v92.946zm0-102.322l-45.803-47.41c1.339-2.143 2.143-4.821 2.143-7.767 0-.268-.268-.804-.268-1.072l43.928-15.804v72.053zm0-80.625l-43.66 15.804 43.66-75.536v59.732zm326.519 39.108l.804 1.339L445.5 329.125l-63.75-67.232 98.036-101.518.268.268zM291.75 355.107l11.518 11.786H280.5l11.25-11.786zm-.268-11.25l-83.303-85.446 79.553-84.375 83.036 87.589-79.286 82.232zm5.357 5.893l79.286-82.232 67.5 71.25-5.892 28.125H313.714l-16.875-17.143zM410.411 44.393c1.071.536 2.142 1.072 3.482 1.34l57.857 100.714v.536c0 2.946.803 5.624 2.143 7.767L376.393 256l-83.035-87.589L410.411 44.393zm-9.107-2.143L287.732 162.518l-57.054-60.268 166.339-60h4.287zm-123.483 0c2.678 2.678 6.16 4.285 10.179 4.285s7.5-1.607 10.179-4.285h75L224.786 95.821 173.893 42.25h103.928zm-116.249 5.625l1.071-2.142a33.834 33.834 0 0 0 2.679-.804l51.161 53.84-54.911 19.821V47.875zm0 79.286l60.803-21.964 59.732 63.214-79.553 84.107-40.982-42.053v-83.304zm0 92.678L198 257.607l-36.428 38.304v-76.072zm0 87.858l42.053-44.464 82.768 85.982-17.143 17.678H161.572v-59.196zm6.964 162.053c-1.607-1.607-3.482-2.678-5.893-3.482l-1.071-1.607v-89.732h99.91l-91.607 94.821h-1.339zm129.911 0c-2.679-2.41-6.428-4.285-10.447-4.285s-7.767 1.875-10.447 4.285h-96.429l91.607-94.821h38.304l91.607 94.821H298.447zm120-11.786l-4.286 7.5c-1.339.268-2.41.803-3.482 1.339l-89.196-91.875h114.376l-17.412 83.036zm12.856-22.232l12.858-60.803h21.964l-34.822 60.803zm34.822-68.839h-20.357l4.553-21.16 17.143 18.214c-.535.803-1.071 1.874-1.339 2.946zm66.161-107.411l-55.447 96.697c-1.339.535-2.679 1.071-4.018 1.874l-20.625-21.964 34.554-163.928 45.803 79.286c-.267 1.339-.803 2.678-.803 4.285 0 1.339.268 2.411.536 3.75z\"]\n};\nconst faLeanpub = {\n  prefix: 'fab',\n  iconName: 'leanpub',\n  icon: [576, 512, [], \"f212\", \"M386.539 111.485l15.096 248.955-10.979-.275c-36.232-.824-71.64 8.783-102.657 27.997-31.016-19.214-66.424-27.997-102.657-27.997-45.564 0-82.07 10.705-123.516 27.723L93.117 129.6c28.546-11.803 61.484-18.115 92.226-18.115 41.173 0 73.836 13.175 102.657 42.544 27.723-28.271 59.013-41.721 98.539-42.544zM569.07 448c-25.526 0-47.485-5.215-70.542-15.645-34.31-15.645-69.993-24.978-107.871-24.978-38.977 0-74.934 12.901-102.657 40.623-27.723-27.723-63.68-40.623-102.657-40.623-37.878 0-73.561 9.333-107.871 24.978C55.239 442.236 32.731 448 8.303 448H6.93L49.475 98.859C88.726 76.626 136.486 64 181.775 64 218.83 64 256.984 71.685 288 93.095 319.016 71.685 357.17 64 394.225 64c45.289 0 93.049 12.626 132.3 34.859L569.07 448zm-43.368-44.741l-34.036-280.246c-30.742-13.999-67.248-21.41-101.009-21.41-38.428 0-74.385 12.077-102.657 38.702-28.272-26.625-64.228-38.702-102.657-38.702-33.761 0-70.267 7.411-101.009 21.41L50.298 403.259c47.211-19.487 82.894-33.486 135.045-33.486 37.604 0 70.817 9.606 102.657 29.644 31.84-20.038 65.052-29.644 102.657-29.644 52.151 0 87.834 13.999 135.045 33.486z\"]\n};\nconst faBlackTie = {\n  prefix: 'fab',\n  iconName: 'black-tie',\n  icon: [448, 512, [], \"f27e\", \"M0 32v448h448V32H0zm316.5 325.2L224 445.9l-92.5-88.7 64.5-184-64.5-86.6h184.9L252 173.2l64.5 184z\"]\n};\nconst faThemeco = {\n  prefix: 'fab',\n  iconName: 'themeco',\n  icon: [448, 512, [], \"f5c6\", \"M202.9 8.43c9.9-5.73 26-5.82 35.95-.21L430 115.85c10 5.6 18 19.44 18 30.86V364c0 11.44-8.06 25.29-18 31L238.81 503.74c-9.93 5.66-26 5.57-35.85-.21L17.86 395.12C8 389.34 0 375.38 0 364V146.71c0-11.44 8-25.36 17.91-31.08zm-77.4 199.83c-15.94 0-31.89.14-47.83.14v101.45H96.8V280h28.7c49.71 0 49.56-71.74 0-71.74zm140.14 100.29l-30.73-34.64c37-7.51 34.8-65.23-10.87-65.51-16.09 0-32.17-.14-48.26-.14v101.59h19.13v-33.91h18.41l29.56 33.91h22.76zm-41.59-82.32c23.34 0 23.26 32.46 0 32.46h-29.13v-32.46zm-95.56-1.6c21.18 0 21.11 38.85 0 38.85H96.18v-38.84zm192.65-18.25c-68.46 0-71 105.8 0 105.8 69.48-.01 69.41-105.8 0-105.8zm0 17.39c44.12 0 44.8 70.86 0 70.86s-44.43-70.86 0-70.86z\"]\n};\nconst faPython = {\n  prefix: 'fab',\n  iconName: 'python',\n  icon: [448, 512, [], \"f3e2\", \"M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z\"]\n};\nconst faAndroid = {\n  prefix: 'fab',\n  iconName: 'android',\n  icon: [576, 512, [], \"f17b\", \"M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55\"]\n};\nconst faBots = {\n  prefix: 'fab',\n  iconName: 'bots',\n  icon: [640, 512, [], \"e340\", \"M86.344,197.834a51.767,51.767,0,0,0-41.57,20.058V156.018a8.19,8.19,0,0,0-8.19-8.19H8.19A8.19,8.19,0,0,0,0,156.018V333.551a8.189,8.189,0,0,0,8.19,8.189H36.584a8.189,8.189,0,0,0,8.19-8.189v-8.088c11.628,13.373,25.874,19.769,41.573,19.769,34.6,0,61.922-26.164,61.922-73.843C148.266,225.452,121.229,197.834,86.344,197.834ZM71.516,305.691c-9.593,0-21.221-4.942-26.745-12.5V250.164c5.528-7.558,17.152-12.791,26.745-12.791,17.734,0,31.107,13.082,31.107,34.013C102.623,292.609,89.25,305.691,71.516,305.691Zm156.372-59.032a17.4,17.4,0,1,0,17.4,17.4A17.4,17.4,0,0,0,227.888,246.659ZM273.956,156.7V112.039a13.308,13.308,0,1,0-10.237,0V156.7a107.49,107.49,0,1,0,10.237,0Zm85.993,107.367c0,30.531-40.792,55.281-91.112,55.281s-91.111-24.75-91.111-55.281,40.792-55.281,91.111-55.281S359.949,233.532,359.949,264.062Zm-50.163,17.4a17.4,17.4,0,1,0-17.4-17.4h0A17.4,17.4,0,0,0,309.786,281.466ZM580.7,250.455c-14.828-2.617-22.387-3.78-22.387-9.885,0-5.523,7.268-9.884,17.735-9.884a65.56,65.56,0,0,1,34.484,10.1,8.171,8.171,0,0,0,11.288-2.468c.07-.11.138-.221.2-.333l8.611-14.886a8.2,8.2,0,0,0-2.867-11.123,99.863,99.863,0,0,0-52.014-14.138c-38.956,0-60.179,21.514-60.179,46.225,0,36.342,33.725,41.864,57.563,45.642,13.373,2.326,24.13,4.361,24.13,11.048,0,6.4-5.523,10.757-18.9,10.757-13.552,0-30.994-6.222-42.623-13.579a8.206,8.206,0,0,0-11.335,2.491c-.035.054-.069.108-.1.164l-10.2,16.891a8.222,8.222,0,0,0,2.491,11.066c15.224,10.3,37.663,16.692,59.441,16.692,40.409,0,63.957-19.769,63.957-46.515C640,260.63,604.537,254.816,580.7,250.455Zm-95.928,60.787a8.211,8.211,0,0,0-9.521-5.938,23.168,23.168,0,0,1-4.155.387c-7.849,0-12.5-6.106-12.5-14.245V240.28h20.349a8.143,8.143,0,0,0,8.141-8.143V209.466a8.143,8.143,0,0,0-8.141-8.143H458.594V171.091a8.143,8.143,0,0,0-8.143-8.143H422.257a8.143,8.143,0,0,0-8.143,8.143h0v30.232H399a8.143,8.143,0,0,0-8.143,8.143h0v22.671A8.143,8.143,0,0,0,399,240.28h15.115v63.667c0,27.037,15.408,41.282,43.9,41.282,12.183,0,21.383-2.2,27.6-5.446a8.161,8.161,0,0,0,4.145-9.278Z\"]\n};\nconst faFreeCodeCamp = {\n  prefix: 'fab',\n  iconName: 'free-code-camp',\n  icon: [576, 512, [], \"f2c5\", \"M97.22,96.21c10.36-10.65,16-17.12,16-21.9,0-2.76-1.92-5.51-3.83-7.42A14.81,14.81,0,0,0,101,64.05c-8.48,0-20.92,8.79-35.84,25.69C23.68,137,2.51,182.81,3.37,250.34s17.47,117,54.06,161.87C76.22,435.86,90.62,448,100.9,448a13.55,13.55,0,0,0,8.37-3.84c1.91-2.76,3.81-5.63,3.81-8.38,0-5.63-3.86-12.2-13.2-20.55-44.45-42.33-67.32-97-67.48-165C32.25,188.8,54,137.83,97.22,96.21ZM239.47,420.07c.58.37.91.55.91.55Zm93.79.55.17-.13C333.24,420.62,333.17,420.67,333.26,420.62Zm3.13-158.18c-16.24-4.15,50.41-82.89-68.05-177.17,0,0,15.54,49.38-62.83,159.57-74.27,104.35,23.46,168.73,34,175.23-6.73-4.35-47.4-35.7,9.55-128.64,11-18.3,25.53-34.87,43.5-72.16,0,0,15.91,22.45,7.6,71.13C287.7,364,354,342.91,355,343.94c22.75,26.78-17.72,73.51-21.58,76.55,5.49-3.65,117.71-78,33-188.1C360.43,238.4,352.62,266.59,336.39,262.44ZM510.88,89.69C496,72.79,483.52,64,475,64a14.81,14.81,0,0,0-8.39,2.84c-1.91,1.91-3.83,4.66-3.83,7.42,0,4.78,5.6,11.26,16,21.9,43.23,41.61,65,92.59,64.82,154.06-.16,68-23,122.63-67.48,165-9.34,8.35-13.18,14.92-13.2,20.55,0,2.75,1.9,5.62,3.81,8.38A13.61,13.61,0,0,0,475.1,448c10.28,0,24.68-12.13,43.47-35.79,36.59-44.85,53.14-94.38,54.06-161.87S552.32,137,510.88,89.69Z\"]\n};\nconst faHornbill = {\n  prefix: 'fab',\n  iconName: 'hornbill',\n  icon: [512, 512, [], \"f592\", \"M76.38 370.3a37.8 37.8 0 1 1-32.07-32.42c-78.28-111.35 52-190.53 52-190.53-5.86 43-8.24 91.16-8.24 91.16-67.31 41.49.93 64.06 39.81 72.87a140.38 140.38 0 0 0 131.66 91.94c1.92 0 3.77-.21 5.67-.28l.11 18.86c-99.22 1.39-158.7-29.14-188.94-51.6zm108-327.7A37.57 37.57 0 0 0 181 21.45a37.95 37.95 0 1 0-31.17 54.22c-22.55 29.91-53.83 89.57-52.42 190l21.84-.15c0-.9-.14-1.77-.14-2.68A140.42 140.42 0 0 1 207 132.71c8-37.71 30.7-114.3 73.8-44.29 0 0 48.14 2.38 91.18 8.24 0 0-77.84-128-187.59-54.06zm304.19 134.17a37.94 37.94 0 1 0-53.84-28.7C403 126.13 344.89 99 251.28 100.33l.14 22.5c2.7-.15 5.39-.41 8.14-.41a140.37 140.37 0 0 1 130.49 88.76c39.1 9 105.06 31.58 38.46 72.54 0 0-2.34 48.13-8.21 91.16 0 0 133.45-81.16 49-194.61a37.45 37.45 0 0 0 19.31-3.5zM374.06 436.24c21.43-32.46 46.42-89.69 45.14-179.66l-19.52.14c.08 2.06.3 4.07.3 6.15a140.34 140.34 0 0 1-91.39 131.45c-8.85 38.95-31.44 106.66-72.77 39.49 0 0-48.12-2.34-91.19-8.22 0 0 79.92 131.34 191.9 51a37.5 37.5 0 0 0 3.64 14 37.93 37.93 0 1 0 33.89-54.29z\"]\n};\nconst faJs = {\n  prefix: 'fab',\n  iconName: 'js',\n  icon: [448, 512, [], \"f3b8\", \"M0 32v448h448V32H0zm243.8 349.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z\"]\n};\nconst faIdeal = {\n  prefix: 'fab',\n  iconName: 'ideal',\n  icon: [576, 512, [], \"e013\", \"M125.61,165.48a49.07,49.07,0,1,0,49.06,49.06A49.08,49.08,0,0,0,125.61,165.48ZM86.15,425.84h78.94V285.32H86.15Zm151.46-211.6c0-20-10-22.53-18.74-22.53H204.82V237.5h14.05C228.62,237.5,237.61,234.69,237.61,214.24Zm201.69,46V168.93h22.75V237.5h33.69C486.5,113.08,388.61,86.19,299.67,86.19H204.84V169h14c25.6,0,41.5,17.35,41.5,45.26,0,28.81-15.52,46-41.5,46h-14V425.88h94.83c144.61,0,194.94-67.16,196.72-165.64Zm-109.75,0H273.3V169h54.43v22.73H296v10.58h30V225H296V237.5h33.51Zm74.66,0-5.16-17.67H369.31l-5.18,17.67H340.47L368,168.92h32.35l27.53,91.34ZM299.65,32H32V480H299.65c161.85,0,251-79.73,251-224.52C550.62,172,518,32,299.65,32Zm0,426.92H53.07V53.07H299.65c142.1,0,229.9,64.61,229.9,202.41C529.55,389.57,448.55,458.92,299.65,458.92Zm83.86-264.85L376,219.88H392.4l-7.52-25.81Z\"]\n};\nconst faGit = {\n  prefix: 'fab',\n  iconName: 'git',\n  icon: [512, 512, [], \"f1d3\", \"M216.29 158.39H137C97 147.9 6.51 150.63 6.51 233.18c0 30.09 15 51.23 35 61-25.1 23-37 33.85-37 49.21 0 11 4.47 21.14 17.89 26.81C8.13 383.61 0 393.35 0 411.65c0 32.11 28.05 50.82 101.63 50.82 70.75 0 111.79-26.42 111.79-73.18 0-58.66-45.16-56.5-151.63-63l13.43-21.55c27.27 7.58 118.7 10 118.7-67.89 0-18.7-7.73-31.71-15-41.07l37.41-2.84zm-63.42 241.9c0 32.06-104.89 32.1-104.89 2.43 0-8.14 5.27-15 10.57-21.54 77.71 5.3 94.32 3.37 94.32 19.11zm-50.81-134.58c-52.8 0-50.46-71.16 1.2-71.16 49.54 0 50.82 71.16-1.2 71.16zm133.3 100.51v-32.1c26.75-3.66 27.24-2 27.24-11V203.61c0-8.5-2.05-7.38-27.24-16.26l4.47-32.92H324v168.71c0 6.51.4 7.32 6.51 8.14l20.73 2.84v32.1zm52.45-244.31c-23.17 0-36.59-13.43-36.59-36.61s13.42-35.77 36.59-35.77c23.58 0 37 12.62 37 35.77s-13.42 36.61-37 36.61zM512 350.46c-17.49 8.53-43.1 16.26-66.28 16.26-48.38 0-66.67-19.5-66.67-65.46V194.75c0-5.42 1.05-4.06-31.71-4.06V154.5c35.78-4.07 50-22 54.47-66.27h38.63c0 65.83-1.34 61.81 3.26 61.81H501v40.65h-60.56v97.15c0 6.92-4.92 51.41 60.57 26.84z\"]\n};\nconst faDev = {\n  prefix: 'fab',\n  iconName: 'dev',\n  icon: [448, 512, [], \"f6cc\", \"M120.12 208.29c-3.88-2.9-7.77-4.35-11.65-4.35H91.03v104.47h17.45c3.88 0 7.77-1.45 11.65-4.35 3.88-2.9 5.82-7.25 5.82-13.06v-69.65c-.01-5.8-1.96-10.16-5.83-13.06zM404.1 32H43.9C19.7 32 .06 51.59 0 75.8v360.4C.06 460.41 19.7 480 43.9 480h360.2c24.21 0 43.84-19.59 43.9-43.8V75.8c-.06-24.21-19.7-43.8-43.9-43.8zM154.2 291.19c0 18.81-11.61 47.31-48.36 47.25h-46.4V172.98h47.38c35.44 0 47.36 28.46 47.37 47.28l.01 70.93zm100.68-88.66H201.6v38.42h32.57v29.57H201.6v38.41h53.29v29.57h-62.18c-11.16.29-20.44-8.53-20.72-19.69V193.7c-.27-11.15 8.56-20.41 19.71-20.69h63.19l-.01 29.52zm103.64 115.29c-13.2 30.75-36.85 24.63-47.44 0l-38.53-144.8h32.57l29.71 113.72 29.57-113.72h32.58l-38.46 144.8z\"]\n};\nconst faSketch = {\n  prefix: 'fab',\n  iconName: 'sketch',\n  icon: [512, 512, [], \"f7c6\", \"M27.5 162.2L9 187.1h90.5l6.9-130.7-78.9 105.8zM396.3 45.7L267.7 32l135.7 147.2-7.1-133.5zM112.2 218.3l-11.2-22H9.9L234.8 458zm2-31.2h284l-81.5-88.5L256.3 33zm297.3 9.1L277.6 458l224.8-261.7h-90.9zM415.4 69L406 56.4l.9 17.3 6.1 113.4h90.3zM113.5 93.5l-4.6 85.6L244.7 32 116.1 45.7zm287.7 102.7h-290l42.4 82.9L256.3 480l144.9-283.8z\"]\n};\nconst faYandexInternational = {\n  prefix: 'fab',\n  iconName: 'yandex-international',\n  icon: [320, 512, [], \"f414\", \"M129.5 512V345.9L18.5 48h55.8l81.8 229.7L250.2 0h51.3L180.8 347.8V512h-51.3z\"]\n};\nconst faCcAmex = {\n  prefix: 'fab',\n  iconName: 'cc-amex',\n  icon: [576, 512, [], \"f1f3\", \"M0 432c0 26.5 21.5 48 48 48H528c26.5 0 48-21.5 48-48v-1.1H514.3l-31.9-35.1-31.9 35.1H246.8V267.1H181L262.7 82.4h78.6l28.1 63.2V82.4h97.2L483.5 130l17-47.6H576V80c0-26.5-21.5-48-48-48H48C21.5 32 0 53.5 0 80V432zm440.4-21.7L482.6 364l42 46.3H576l-68-72.1 68-72.1H525.4l-42 46.7-41.5-46.7H390.5L458 338.6l-67.4 71.6V377.1h-83V354.9h80.9V322.6H307.6V300.2h83V267.1h-122V410.3H440.4zm96.3-72L576 380.2V296.9l-39.3 41.4zm-36.3-92l36.9-100.6V246.3H576V103H515.8l-32.2 89.3L451.7 103H390.5V246.1L327.3 103H276.1L213.7 246.3h43l11.9-28.7h65.9l12 28.7h82.7V146L466 246.3h34.4zM282 185.4l19.5-46.9 19.4 46.9H282z\"]\n};\nconst faUber = {\n  prefix: 'fab',\n  iconName: 'uber',\n  icon: [448, 512, [], \"f402\", \"M414.1 32H33.9C15.2 32 0 47.2 0 65.9V446c0 18.8 15.2 34 33.9 34H414c18.7 0 33.9-15.2 33.9-33.9V65.9C448 47.2 432.8 32 414.1 32zM237.6 391.1C163 398.6 96.4 344.2 88.9 269.6h94.4V290c0 3.7 3 6.8 6.8 6.8H258c3.7 0 6.8-3 6.8-6.8v-67.9c0-3.7-3-6.8-6.8-6.8h-67.9c-3.7 0-6.8 3-6.8 6.8v20.4H88.9c7-69.4 65.4-122.2 135.1-122.2 69.7 0 128.1 52.8 135.1 122.2 7.5 74.5-46.9 141.1-121.5 148.6z\"]\n};\nconst faGithub = {\n  prefix: 'fab',\n  iconName: 'github',\n  icon: [496, 512, [], \"f09b\", \"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z\"]\n};\nconst faPhp = {\n  prefix: 'fab',\n  iconName: 'php',\n  icon: [640, 512, [], \"f457\", \"M320 104.5c171.4 0 303.2 72.2 303.2 151.5S491.3 407.5 320 407.5c-171.4 0-303.2-72.2-303.2-151.5S148.7 104.5 320 104.5m0-16.8C143.3 87.7 0 163 0 256s143.3 168.3 320 168.3S640 349 640 256 496.7 87.7 320 87.7zM218.2 242.5c-7.9 40.5-35.8 36.3-70.1 36.3l13.7-70.6c38 0 63.8-4.1 56.4 34.3zM97.4 350.3h36.7l8.7-44.8c41.1 0 66.6 3 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7h-70.7L97.4 350.3zm185.7-213.6h36.5l-8.7 44.8c31.5 0 60.7-2.3 74.8 10.7 14.8 13.6 7.7 31-8.3 113.1h-37c15.4-79.4 18.3-86 12.7-92-5.4-5.8-17.7-4.6-47.4-4.6l-18.8 96.6h-36.5l32.7-168.6zM505 242.5c-8 41.1-36.7 36.3-70.1 36.3l13.7-70.6c38.2 0 63.8-4.1 56.4 34.3zM384.2 350.3H421l8.7-44.8c43.2 0 67.1 2.5 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7H417l-32.8 168.7z\"]\n};\nconst faAlipay = {\n  prefix: 'fab',\n  iconName: 'alipay',\n  icon: [448, 512, [], \"f642\", \"M377.74 32H70.26C31.41 32 0 63.41 0 102.26v307.48C0 448.59 31.41 480 70.26 480h307.48c38.52 0 69.76-31.08 70.26-69.6-45.96-25.62-110.59-60.34-171.6-88.44-32.07 43.97-84.14 81-148.62 81-70.59 0-93.73-45.3-97.04-76.37-3.97-39.01 14.88-81.5 99.52-81.5 35.38 0 79.35 10.25 127.13 24.96 16.53-30.09 26.45-60.34 26.45-60.34h-178.2v-16.7h92.08v-31.24H88.28v-19.01h109.44V92.34h50.92v50.42h109.44v19.01H248.63v31.24h88.77s-15.21 46.62-38.35 90.92c48.93 16.7 100.01 36.04 148.62 52.74V102.26C447.83 63.57 416.43 32 377.74 32zM47.28 322.95c.99 20.17 10.25 53.73 69.93 53.73 52.07 0 92.58-39.68 117.87-72.9-44.63-18.68-84.48-31.41-109.44-31.41-67.45 0-79.35 33.06-78.36 50.58z\"]\n};\nconst faYoutube = {\n  prefix: 'fab',\n  iconName: 'youtube',\n  icon: [576, 512, [61802], \"f167\", \"M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z\"]\n};\nconst faSkyatlas = {\n  prefix: 'fab',\n  iconName: 'skyatlas',\n  icon: [640, 512, [], \"f216\", \"M640 329.3c0 65.9-52.5 114.4-117.5 114.4-165.9 0-196.6-249.7-359.7-249.7-146.9 0-147.1 212.2 5.6 212.2 42.5 0 90.9-17.8 125.3-42.5 5.6-4.1 16.9-16.3 22.8-16.3s10.9 5 10.9 10.9c0 7.8-13.1 19.1-18.7 24.1-40.9 35.6-100.3 61.2-154.7 61.2-83.4.1-154-59-154-144.9s67.5-149.1 152.8-149.1c185.3 0 222.5 245.9 361.9 245.9 99.9 0 94.8-139.7 3.4-139.7-17.5 0-35 11.6-46.9 11.6-8.4 0-15.9-7.2-15.9-15.6 0-11.6 5.3-23.7 5.3-36.3 0-66.6-50.9-114.7-116.9-114.7-53.1 0-80 36.9-88.8 36.9-6.2 0-11.2-5-11.2-11.2 0-5.6 4.1-10.3 7.8-14.4 25.3-28.8 64.7-43.7 102.8-43.7 79.4 0 139.1 58.4 139.1 137.8 0 6.9-.3 13.7-1.2 20.6 11.9-3.1 24.1-4.7 35.9-4.7 60.7 0 111.9 45.3 111.9 107.2z\"]\n};\nconst faFirefoxBrowser = {\n  prefix: 'fab',\n  iconName: 'firefox-browser',\n  icon: [512, 512, [], \"e007\", \"M130.22 127.548C130.38 127.558 130.3 127.558 130.22 127.548V127.548ZM481.64 172.898C471.03 147.398 449.56 119.898 432.7 111.168C446.42 138.058 454.37 165.048 457.4 185.168C457.405 185.306 457.422 185.443 457.45 185.578C429.87 116.828 383.098 89.1089 344.9 28.7479C329.908 5.05792 333.976 3.51792 331.82 4.08792L331.7 4.15792C284.99 30.1109 256.365 82.5289 249.12 126.898C232.503 127.771 216.219 131.895 201.19 139.035C199.838 139.649 198.736 140.706 198.066 142.031C197.396 143.356 197.199 144.87 197.506 146.323C197.7 147.162 198.068 147.951 198.586 148.639C199.103 149.327 199.76 149.899 200.512 150.318C201.264 150.737 202.096 150.993 202.954 151.071C203.811 151.148 204.676 151.045 205.491 150.768L206.011 150.558C221.511 143.255 238.408 139.393 255.541 139.238C318.369 138.669 352.698 183.262 363.161 201.528C350.161 192.378 326.811 183.338 304.341 187.248C392.081 231.108 368.541 381.784 246.951 376.448C187.487 373.838 149.881 325.467 146.421 285.648C146.421 285.648 157.671 243.698 227.041 243.698C234.541 243.698 255.971 222.778 256.371 216.698C256.281 214.698 213.836 197.822 197.281 181.518C188.434 172.805 184.229 168.611 180.511 165.458C178.499 163.75 176.392 162.158 174.201 160.688C168.638 141.231 168.399 120.638 173.51 101.058C148.45 112.468 128.96 130.508 114.8 146.428H114.68C105.01 134.178 105.68 93.7779 106.25 85.3479C106.13 84.8179 99.022 89.0159 98.1 89.6579C89.5342 95.7103 81.5528 102.55 74.26 110.088C57.969 126.688 30.128 160.242 18.76 211.318C14.224 231.701 12 255.739 12 263.618C12 398.318 121.21 507.508 255.92 507.508C376.56 507.508 478.939 420.281 496.35 304.888C507.922 228.192 481.64 173.82 481.64 172.898Z\"]\n};\nconst faReplyd = {\n  prefix: 'fab',\n  iconName: 'replyd',\n  icon: [448, 512, [], \"f3e6\", \"M320 480H128C57.6 480 0 422.4 0 352V160C0 89.6 57.6 32 128 32h192c70.4 0 128 57.6 128 128v192c0 70.4-57.6 128-128 128zM193.4 273.2c-6.1-2-11.6-3.1-16.4-3.1-7.2 0-13.5 1.9-18.9 5.6-5.4 3.7-9.6 9-12.8 15.8h-1.1l-4.2-18.3h-28v138.9h36.1v-89.7c1.5-5.4 4.4-9.8 8.7-13.2 4.3-3.4 9.8-5.1 16.2-5.1 4.6 0 9.8 1 15.6 3.1l4.8-34zm115.2 103.4c-3.2 2.4-7.7 4.8-13.7 7.1-6 2.3-12.8 3.5-20.4 3.5-12.2 0-21.1-3-26.5-8.9-5.5-5.9-8.5-14.7-9-26.4h83.3c.9-4.8 1.6-9.4 2.1-13.9.5-4.4.7-8.6.7-12.5 0-10.7-1.6-19.7-4.7-26.9-3.2-7.2-7.3-13-12.5-17.2-5.2-4.3-11.1-7.3-17.8-9.2-6.7-1.8-13.5-2.8-20.6-2.8-21.1 0-37.5 6.1-49.2 18.3s-17.5 30.5-17.5 55c0 22.8 5.2 40.7 15.6 53.7 10.4 13.1 26.8 19.6 49.2 19.6 10.7 0 20.9-1.5 30.4-4.6 9.5-3.1 17.1-6.8 22.6-11.2l-12-23.6zm-21.8-70.3c3.8 5.4 5.3 13.1 4.6 23.1h-51.7c.9-9.4 3.7-17 8.2-22.6 4.5-5.6 11.5-8.5 21-8.5 8.2-.1 14.1 2.6 17.9 8zm79.9 2.5c4.1 3.9 9.4 5.8 16.1 5.8 7 0 12.6-1.9 16.7-5.8s6.1-9.1 6.1-15.6-2-11.6-6.1-15.4c-4.1-3.8-9.6-5.7-16.7-5.7-6.7 0-12 1.9-16.1 5.7-4.1 3.8-6.1 8.9-6.1 15.4s2 11.7 6.1 15.6zm0 100.5c4.1 3.9 9.4 5.8 16.1 5.8 7 0 12.6-1.9 16.7-5.8s6.1-9.1 6.1-15.6-2-11.6-6.1-15.4c-4.1-3.8-9.6-5.7-16.7-5.7-6.7 0-12 1.9-16.1 5.7-4.1 3.8-6.1 8.9-6.1 15.4 0 6.6 2 11.7 6.1 15.6z\"]\n};\nconst faSuse = {\n  prefix: 'fab',\n  iconName: 'suse',\n  icon: [640, 512, [], \"f7d6\", \"M593.1 192.6A10.4 10.4 0 1 1 604.5 210a10.4 10.4 0 1 1 -11.4-17.4zm-47.1 12.2a38.5 38.5 0 1 1 75-17.6 38.5 38.5 0 1 1 -75 17.6zM433.7 336.7c3.2 4.6 5.8 9 7.3 13.4c1 3.1 2.4 7.3 5.5 8.9c.2 .1 .3 .2 .5 .2c5.7 2.1 20.3 1.7 20.3 1.7h26.8c2.3 0 22.4 0 21.9-2.3c-2.4-10.8-14.9-12.7-24.4-18.3c-8.7-5.2-17-11.1-20.8-21.3c-2-5.2-.8-17.4 2.6-21.8c2.5-3.2 6.1-5.3 10-6.2c4.3-.9 8.8-.1 13.1 .3c5.3 .5 10.6 1.5 15.9 2.2c10.3 1.3 20.6 1.9 31 1.6c17.1-.5 34.2-3.2 50.4-8.7c11.3-3.8 22.4-8.9 32-16.1c10.9-8.1 8.1-7.4-3-6.2c-13.3 1.4-26.6 1.6-39.9 .8c-12.4-.7-24.7-2.2-35.9-7.9c-8.8-4.6-16.4-9.1-23.4-16.2c-1-1.1-1.7-4.2 .2-6.2c1.9-1.9 5.8-.8 7 .2c12.2 10.2 30.5 18.6 49.3 19.5c10.2 .5 20.1 .7 30.4 .3c5.1-.2 12.8-.2 17.9-.3c2.6 0 9.8 .7 11.2-2.1c.4-.8 .4-1.8 .3-2.7c-1.5-40.9-4.5-86.9-47.3-106.5c-31.9-14.6-79.7-37.2-99.9-46.6c-4.7-2.2-10.2 1.3-10.2 6.5c0 13.6 .7 33.3 .7 51.1c-9.7-9.9-26-16.1-38.4-21.8c-14.1-6.5-28.7-12-43.5-16.6c-29.8-9.2-60.7-14.9-91.7-18c-35.2-3.5-71-1.8-105.7 5.3C147 115.1 90.8 142.6 48.2 182.7C22.1 207.3 1.6 242.4 .2 277.9c-2 50.3 12.1 77.3 38 105.2c41.3 44.4 130.2 50.6 166.2-2c16.2-23.7 19.7-55.8 8-82c-11.8-26.2-38.8-45.1-67.4-46c-22.2-.7-45.9 10.6-54.5 31.1c-6.5 15.7-2.8 35.1 9 47.3c4.6 4.8 10.9 8.7 17.7 7.1c4-.9 7.4-3.9 8-8c.9-6-4.4-9.9-7.6-14.5c-5.8-8.3-4.7-20.9 2.7-27.9c6.2-6 15.3-7.8 23.9-7.7c8 0 16.2 1.4 23.1 5.5c9.7 5.7 16.2 16.2 18.4 27.2c6.7 33-20.2 59.9-56.6 62c-18.6 1.1-37.6-3.8-52.1-15.5C40.1 329.9 31.1 269.4 73.2 237c40-30.7 90.4-22.8 120.2-6.8c23.8 12.8 41.5 33.6 55 56.7c6.7 11.6 12.5 23.7 17.8 36.1c5.1 11.8 9.9 23.8 20.2 32.5c6.8 5.8 15.2 5.6 24.1 5.6h50.8c6.9 0 5.2-4.6 2.2-7.7c-6.7-6.9-16.4-8.4-25.4-10.9c-20.5-5.6-18.4-32.8-12.7-32.8c18.3 0 18.9 .6 34.9 .3c23.2-.3 30.2-1.7 48.3 5c9.7 3.6 19 13.1 25.1 21.7z\"]\n};\nconst faJenkins = {\n  prefix: 'fab',\n  iconName: 'jenkins',\n  icon: [512, 512, [], \"f3b6\", \"M487.1 425c-1.4-11.2-19-23.1-28.2-31.9-5.1-5-29-23.1-30.4-29.9-1.4-6.6 9.7-21.5 13.3-28.9 5.1-10.7 8.8-23.7 11.3-32.6 18.8-66.1 20.7-156.9-6.2-211.2-10.2-20.6-38.6-49-56.4-62.5-42-31.7-119.6-35.3-170.1-16.6-14.1 5.2-27.8 9.8-40.1 17.1-33.1 19.4-68.3 32.5-78.1 71.6-24.2 10.8-31.5 41.8-30.3 77.8.2 7 4.1 15.8 2.7 22.4-.7 3.3-5.2 7.6-6.1 9.8-11.6 27.7-2.3 64 11.1 83.7 8.1 11.9 21.5 22.4 39.2 25.2.7 10.6 3.3 19.7 8.2 30.4 3.1 6.8 14.7 19 10.4 27.7-2.2 4.4-21 13.8-27.3 17.6C89 407.2 73.7 415 54.2 429c-12.6 9-32.3 10.2-29.2 31.1 2.1 14.1 10.1 31.6 14.7 45.8.7 2 1.4 4.1 2.1 6h422c4.9-15.3 9.7-30.9 14.6-47.2 3.4-11.4 10.2-27.8 8.7-39.7zM205.9 33.7c1.8-.5 3.4.7 4.9 2.4-.2 5.2-5.4 5.1-8.9 6.8-5.4 6.7-13.4 9.8-20 17.2-6.8 7.5-14.4 27.7-23.4 30-4.5 1.1-9.7-.8-13.6-.5-10.4.7-17.7 6-28.3 7.5 13.6-29.9 56.1-54 89.3-63.4zm-104.8 93.6c13.5-14.9 32.1-24.1 54.8-25.9 11.7 29.7-8.4 65-.9 97.6 2.3 9.9 10.2 25.4-2.4 25.7.3-28.3-34.8-46.3-61.3-29.6-1.8-21.5-4.9-51.7 9.8-67.8zm36.7 200.2c-1-4.1-2.7-12.9-2.3-15.1 1.6-8.7 17.1-12.5 11-24.7-11.3-.1-13.8 10.2-24.1 11.3-26.7 2.6-45.6-35.4-44.4-58.4 1-19.5 17.6-38.2 40.1-35.8 16 1.8 21.4 19.2 24.5 34.7 9.2.5 22.5-.4 26.9-7.6-.6-17.5-8.8-31.6-8.2-47.7 1-30.3 17.5-57.6 4.8-87.4 13.6-30.9 53.5-55.3 83.1-70 36.6-18.3 94.9-3.7 129.3 15.8 19.7 11.1 34.4 32.7 48.3 50.7-19.5-5.8-36.1 4.2-33.1 20.3 16.3-14.9 44.2-.2 52.5 16.4 7.9 15.8 7.8 39.3 9 62.8 2.9 57-10.4 115.9-39.1 157.1-7.7 11-14.1 23-24.9 30.6-26 18.2-65.4 34.7-99.2 23.4-44.7-15-65-44.8-89.5-78.8.7 18.7 13.8 34.1 26.8 48.4 11.3 12.5 25 26.6 39.7 32.4-12.3-2.9-31.1-3.8-36.2 7.2-28.6-1.9-55.1-4.8-68.7-24.2-10.6-15.4-21.4-41.4-26.3-61.4zm222 124.1c4.1-3 11.1-2.9 17.4-3.6-5.4-2.7-13-3.7-19.3-2.2-.1-4.2-2-6.8-3.2-10.2 10.6-3.8 35.5-28.5 49.6-20.3 6.7 3.9 9.5 26.2 10.1 37 .4 9-.8 18-4.5 22.8-18.8-.6-35.8-2.8-50.7-7 .9-6.1-1-12.1.6-16.5zm-17.2-20c-16.8.8-26-1.2-38.3-10.8.2-.8 1.4-.5 1.5-1.4 18 8 40.8-3.3 59-4.9-7.9 5.1-14.6 11.6-22.2 17.1zm-12.1 33.2c-1.6-9.4-3.5-12-2.8-20.2 25-16.6 29.7 28.6 2.8 20.2zM226 438.6c-11.6-.7-48.1-14-38.5-23.7 9.4 6.5 27.5 4.9 41.3 7.3.8 4.4-2.8 10.2-2.8 16.4zM57.7 497.1c-4.3-12.7-9.2-25.1-14.8-36.9 30.8-23.8 65.3-48.9 102.2-63.5 2.8-1.1 23.2 25.4 26.2 27.6 16.5 11.7 37 21 56.2 30.2 1.2 8.8 3.9 20.2 8.7 35.5.7 2.3 1.4 4.7 2.2 7.2H57.7zm240.6 5.7h-.8c.3-.2.5-.4.8-.5v.5zm7.5-5.7c2.1-1.4 4.3-2.8 6.4-4.3 1.1 1.4 2.2 2.8 3.2 4.3h-9.6zm15.1-24.7c-10.8 7.3-20.6 18.3-33.3 25.2-6 3.3-27 11.7-33.4 10.2-3.6-.8-3.9-5.3-5.4-9.5-3.1-9-10.1-23.4-10.8-37-.8-17.2-2.5-46 16-42.4 14.9 2.9 32.3 9.7 43.9 16.1 7.1 3.9 11.1 8.6 21.9 9.5-.1 1.4-.1 2.8-.2 4.3-5.9 3.9-15.3 3.8-21.8 7.1 9.5.4 17 2.7 23.5 5.9-.1 3.4-.3 7-.4 10.6zm53.4 24.7h-14c-.1-3.2-2.8-5.8-6.1-5.8s-5.9 2.6-6.1 5.8h-17.4c-2.8-4.4-5.7-8.6-8.9-12.5 2.1-2.2 4-4.7 6-6.9 9 3.7 14.8-4.9 21.7-4.2 7.9.8 14.2 11.7 25.4 11l-.6 12.6zm8.7 0c.2-4 .4-7.8.6-11.5 15.6-7.3 29 1.3 35.7 11.5H383zm83.4-37c-2.3 11.2-5.8 24-9.9 37.1-.2-.1-.4-.1-.6-.1H428c.6-1.1 1.2-2.2 1.9-3.3-2.6-6.1-9-8.7-10.9-15.5 12.1-22.7 6.5-93.4-24.2-78.5 4.3-6.3 15.6-11.5 20.8-19.3 13 10.4 20.8 20.3 33.2 31.4 6.8 6 20 13.3 21.4 23.1.8 5.5-2.6 18.9-3.8 25.1zM222.2 130.5c5.4-14.9 27.2-34.7 45-32 7.7 1.2 18 8.2 12.2 17.7-30.2-7-45.2 12.6-54.4 33.1-8.1-2-4.9-13.1-2.8-18.8zm184.1 63.1c8.2-3.6 22.4-.7 29.6-5.3-4.2-11.5-10.3-21.4-9.3-37.7.5 0 1 0 1.4.1 6.8 14.2 12.7 29.2 21.4 41.7-5.7 13.5-43.6 25.4-43.1 1.2zm20.4-43zm-117.2 45.7c-6.8-10.9-19-32.5-14.5-45.3 6.5 11.9 8.6 24.4 17.8 33.3 4.1 4 12.2 9 8.2 20.2-.9 2.7-7.8 8.6-11.7 9.7-14.4 4.3-47.9.9-36.6-17.1 11.9.7 27.9 7.8 36.8-.8zm27.3 70c3.8 6.6 1.4 18.7 12.1 20.6 20.2 3.4 43.6-12.3 58.1-17.8 9-15.2-.8-20.7-8.9-30.5-16.6-20-38.8-44.8-38-74.7 6.7-4.9 7.3 7.4 8.2 9.7 8.7 20.3 30.4 46.2 46.3 63.5 3.9 4.3 10.3 8.4 11 11.2 2.1 8.2-5.4 18-4.5 23.5-21.7 13.9-45.8 29.1-81.4 25.6-7.4-6.7-10.3-21.4-2.9-31.1zm-201.3-9.2c-6.8-3.9-8.4-21-16.4-21.4-11.4-.7-9.3 22.2-9.3 35.5-7.8-7.1-9.2-29.1-3.5-40.3-6.6-3.2-9.5 3.6-13.1 5.9 4.7-34.1 49.8-15.8 42.3 20.3zm299.6 28.8c-10.1 19.2-24.4 40.4-54 41-.6-6.2-1.1-15.6 0-19.4 22.7-2.2 36.6-13.7 54-21.6zm-141.9 12.4c18.9 9.9 53.6 11 79.3 10.2 1.4 5.6 1.3 12.6 1.4 19.4-33 1.8-72-6.4-80.7-29.6zm92.2 46.7c-1.7 4.3-5.3 9.3-9.8 11.1-12.1 4.9-45.6 8.7-62.4-.3-10.7-5.7-17.5-18.5-23.4-26-2.8-3.6-16.9-12.9-.2-12.9 13.1 32.7 58 29 95.8 28.1z\"]\n};\nconst faTwitter = {\n  prefix: 'fab',\n  iconName: 'twitter',\n  icon: [512, 512, [], \"f099\", \"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z\"]\n};\nconst faRockrms = {\n  prefix: 'fab',\n  iconName: 'rockrms',\n  icon: [496, 512, [], \"f3e9\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm157.4 419.5h-90l-112-131.3c-17.9-20.4-3.9-56.1 26.6-56.1h75.3l-84.6-99.3-84.3 98.9h-90L193.5 67.2c14.4-18.4 41.3-17.3 54.5 0l157.7 185.1c19 22.8 2 57.2-27.6 56.1-.6 0-74.2.2-74.2.2l101.5 118.9z\"]\n};\nconst faPinterest = {\n  prefix: 'fab',\n  iconName: 'pinterest',\n  icon: [496, 512, [], \"f0d2\", \"M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z\"]\n};\nconst faBuffer = {\n  prefix: 'fab',\n  iconName: 'buffer',\n  icon: [448, 512, [], \"f837\", \"M427.84 380.67l-196.5 97.82a18.6 18.6 0 0 1-14.67 0L20.16 380.67c-4-2-4-5.28 0-7.29L67.22 350a18.65 18.65 0 0 1 14.69 0l134.76 67a18.51 18.51 0 0 0 14.67 0l134.76-67a18.62 18.62 0 0 1 14.68 0l47.06 23.43c4.05 1.96 4.05 5.24 0 7.24zm0-136.53l-47.06-23.43a18.62 18.62 0 0 0-14.68 0l-134.76 67.08a18.68 18.68 0 0 1-14.67 0L81.91 220.71a18.65 18.65 0 0 0-14.69 0l-47.06 23.43c-4 2-4 5.29 0 7.31l196.51 97.8a18.6 18.6 0 0 0 14.67 0l196.5-97.8c4.05-2.02 4.05-5.3 0-7.31zM20.16 130.42l196.5 90.29a20.08 20.08 0 0 0 14.67 0l196.51-90.29c4-1.86 4-4.89 0-6.74L231.33 33.4a19.88 19.88 0 0 0-14.67 0l-196.5 90.28c-4.05 1.85-4.05 4.88 0 6.74z\"]\n};\nconst faNpm = {\n  prefix: 'fab',\n  iconName: 'npm',\n  icon: [576, 512, [], \"f3d4\", \"M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z\"]\n};\nconst faYammer = {\n  prefix: 'fab',\n  iconName: 'yammer',\n  icon: [512, 512, [], \"f840\", \"M500.676,159.486a12.779,12.779,0,0,0-6.4-8.282,13.954,13.954,0,0,0-10.078-1.125L457.8,156.7l-.043-.2-22.3,5.785-1.243.333-.608-2.17A369.037,369.037,0,0,0,347.538,4.289a14.1,14.1,0,0,0-19.784-.463l-102.9,102.747H24.947A24.9,24.9,0,0,0,0,131.417V380.38a24.963,24.963,0,0,0,24.918,24.9H224.986L328.072,508a13.667,13.667,0,0,0,19.327,0c.126-.126.249-.255.37-.385a368.025,368.025,0,0,0,69.577-107.374,403.45,403.45,0,0,0,17.3-50.8v-.028l20.406,5.336.029-.073L483.345,362a20.253,20.253,0,0,0,2.619.5,13.359,13.359,0,0,0,4.139-.072,13.5,13.5,0,0,0,10.515-9.924,415.855,415.855,0,0,0,.058-193.013ZM337.125,24.65l.013.014h-.013Zm-110.2,165.161L174.311,281.1a11.338,11.338,0,0,0-1.489,5.655v46.189a22.04,22.04,0,0,1-22.041,22h-3.4A22.068,22.068,0,0,1,125.3,332.962V287.294a11.532,11.532,0,0,0-1.388-5.51l-51.6-92.2a21.988,21.988,0,0,1,19.264-32.726h3.268a22.059,22.059,0,0,1,19.611,11.916l36.357,70.281,37.515-70.512a22.066,22.066,0,0,1,38.556-.695,21.7,21.7,0,0,1,0,21.967ZM337.145,24.673a348.147,348.147,0,0,1,75.8,141.335l.564,1.952-114.134,29.6V131.417a25.006,25.006,0,0,0-24.947-24.9H255.067Zm60.5,367.305v-.043l-.014.014a347.19,347.19,0,0,1-60.177,95.227l-82.2-81.893h19.177a24.978,24.978,0,0,0,24.947-24.9v-66.2l114.6,29.862A385.191,385.191,0,0,1,397.648,391.978Zm84-52.45.015.014-50.618-13.131L299.379,292.1V219.572l119.746-30.99,4.468-1.157,39.54-10.253,18.511-4.816A393,393,0,0,1,481.644,339.528Z\"]\n};\nconst faBtc = {\n  prefix: 'fab',\n  iconName: 'btc',\n  icon: [384, 512, [], \"f15a\", \"M310.204 242.638c27.73-14.18 45.377-39.39 41.28-81.3-5.358-57.351-52.458-76.573-114.85-81.929V0h-48.528v77.203c-12.605 0-25.525.315-38.444.63V0h-48.528v79.409c-17.842.539-38.622.276-97.37 0v51.678c38.314-.678 58.417-3.14 63.023 21.427v217.429c-2.925 19.492-18.524 16.685-53.255 16.071L3.765 443.68c88.481 0 97.37.315 97.37.315V512h48.528v-67.06c13.234.315 26.154.315 38.444.315V512h48.528v-68.005c81.299-4.412 135.647-24.894 142.895-101.467 5.671-61.446-23.32-88.862-69.326-99.89zM150.608 134.553c27.415 0 113.126-8.507 113.126 48.528 0 54.515-85.71 48.212-113.126 48.212v-96.74zm0 251.776V279.821c32.772 0 133.127-9.138 133.127 53.255-.001 60.186-100.355 53.253-133.127 53.253z\"]\n};\nconst faDribbble = {\n  prefix: 'fab',\n  iconName: 'dribbble',\n  icon: [512, 512, [], \"f17d\", \"M256 8C119.252 8 8 119.252 8 256s111.252 248 248 248 248-111.252 248-248S392.748 8 256 8zm163.97 114.366c29.503 36.046 47.369 81.957 47.835 131.955-6.984-1.477-77.018-15.682-147.502-6.818-5.752-14.041-11.181-26.393-18.617-41.614 78.321-31.977 113.818-77.482 118.284-83.523zM396.421 97.87c-3.81 5.427-35.697 48.286-111.021 76.519-34.712-63.776-73.185-116.168-79.04-124.008 67.176-16.193 137.966 1.27 190.061 47.489zm-230.48-33.25c5.585 7.659 43.438 60.116 78.537 122.509-99.087 26.313-186.36 25.934-195.834 25.809C62.38 147.205 106.678 92.573 165.941 64.62zM44.17 256.323c0-2.166.043-4.322.108-6.473 9.268.19 111.92 1.513 217.706-30.146 6.064 11.868 11.857 23.915 17.174 35.949-76.599 21.575-146.194 83.527-180.531 142.306C64.794 360.405 44.17 310.73 44.17 256.323zm81.807 167.113c22.127-45.233 82.178-103.622 167.579-132.756 29.74 77.283 42.039 142.053 45.189 160.638-68.112 29.013-150.015 21.053-212.768-27.882zm248.38 8.489c-2.171-12.886-13.446-74.897-41.152-151.033 66.38-10.626 124.7 6.768 131.947 9.055-9.442 58.941-43.273 109.844-90.795 141.978z\"]\n};\nconst faStumbleuponCircle = {\n  prefix: 'fab',\n  iconName: 'stumbleupon-circle',\n  icon: [496, 512, [], \"f1a3\", \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 177.5c-9.8 0-17.8 8-17.8 17.8v106.9c0 40.9-33.9 73.9-74.9 73.9-41.4 0-74.9-33.5-74.9-74.9v-46.5h57.3v45.8c0 10 8 17.8 17.8 17.8s17.8-7.9 17.8-17.8V200.1c0-40 34.2-72.1 74.7-72.1 40.7 0 74.7 32.3 74.7 72.6v23.7l-34.1 10.1-22.9-10.7v-20.6c.1-9.6-7.9-17.6-17.7-17.6zm167.6 123.6c0 41.4-33.5 74.9-74.9 74.9-41.2 0-74.9-33.2-74.9-74.2V263l22.9 10.7 34.1-10.1v47.1c0 9.8 8 17.6 17.8 17.6s17.8-7.9 17.8-17.6v-48h57.3c-.1 45.9-.1 46.4-.1 46.4z\"]\n};\nconst faInternetExplorer = {\n  prefix: 'fab',\n  iconName: 'internet-explorer',\n  icon: [512, 512, [], \"f26b\", \"M483.049 159.706c10.855-24.575 21.424-60.438 21.424-87.871 0-72.722-79.641-98.371-209.673-38.577-107.632-7.181-211.221 73.67-237.098 186.457 30.852-34.862 78.271-82.298 121.977-101.158C125.404 166.85 79.128 228.002 43.992 291.725 23.246 329.651 0 390.94 0 436.747c0 98.575 92.854 86.5 180.251 42.006 31.423 15.43 66.559 15.573 101.695 15.573 97.124 0 184.249-54.294 216.814-146.022H377.927c-52.509 88.593-196.819 52.996-196.819-47.436H509.9c6.407-43.581-1.655-95.715-26.851-141.162zM64.559 346.877c17.711 51.15 53.703 95.871 100.266 123.304-88.741 48.94-173.267 29.096-100.266-123.304zm115.977-108.873c2-55.151 50.276-94.871 103.98-94.871 53.418 0 101.981 39.72 103.981 94.871H180.536zm184.536-187.6c21.425-10.287 48.563-22.003 72.558-22.003 31.422 0 54.274 21.717 54.274 53.722 0 20.003-7.427 49.007-14.569 67.867-26.28-42.292-65.986-81.584-112.263-99.586z\"]\n};\nconst faStubber = {\n  prefix: 'fab',\n  iconName: 'stubber',\n  icon: [448, 512, [], \"e5c7\", \"M136.5 294.2l58.8 22.9c9.1-36.8 25.4-61.1 55-61.1c49.4 0 71.4 63.6 142.4 63.6c15.6 0 35.9-2.8 55.3-13.3V368c0 61.8-50.4 112-112.3 112H0l41.8-56L0 368l41.7-56L0 256.1l41.8-56L0 144.1 41.8 88 0 32H335.7C397.6 32 448 82.3 448 144.1v51.3c-9.2 36.3-25.9 60.6-55 60.6c-49.6 0-71.6-63.5-142.4-63.5c-35.9 0-95.2 14.6-114.1 101.6h0z\"]\n};\nconst faTelegram = {\n  prefix: 'fab',\n  iconName: 'telegram',\n  icon: [496, 512, [62462, \"telegram-plane\"], \"f2c6\", \"M248,8C111.033,8,0,119.033,0,256S111.033,504,248,504,496,392.967,496,256,384.967,8,248,8ZM362.952,176.66c-3.732,39.215-19.881,134.378-28.1,178.3-3.476,18.584-10.322,24.816-16.948,25.425-14.4,1.326-25.338-9.517-39.287-18.661-21.827-14.308-34.158-23.215-55.346-37.177-24.485-16.135-8.612-25,5.342-39.5,3.652-3.793,67.107-61.51,68.335-66.746.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608,69.142-14.845,10.194-26.894,9.934c-8.855-.191-25.888-5.006-38.551-9.123-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7,18.45-13.7,108.446-47.248,144.628-62.3c68.872-28.647,83.183-33.623,92.511-33.789,2.052-.034,6.639.474,9.61,2.885a10.452,10.452,0,0,1,3.53,6.716A43.765,43.765,0,0,1,362.952,176.66Z\"]\n};\nconst faTelegramPlane = faTelegram;\nconst faOldRepublic = {\n  prefix: 'fab',\n  iconName: 'old-republic',\n  icon: [496, 512, [], \"f510\", \"M235.76 10.23c7.5-.31 15-.28 22.5-.09 3.61.14 7.2.4 10.79.73 4.92.27 9.79 1.03 14.67 1.62 2.93.43 5.83.98 8.75 1.46 7.9 1.33 15.67 3.28 23.39 5.4 12.24 3.47 24.19 7.92 35.76 13.21 26.56 12.24 50.94 29.21 71.63 49.88 20.03 20.09 36.72 43.55 48.89 69.19 1.13 2.59 2.44 5.1 3.47 7.74 2.81 6.43 5.39 12.97 7.58 19.63 4.14 12.33 7.34 24.99 9.42 37.83.57 3.14 1.04 6.3 1.4 9.47.55 3.83.94 7.69 1.18 11.56.83 8.34.84 16.73.77 25.1-.07 4.97-.26 9.94-.75 14.89-.24 3.38-.51 6.76-.98 10.12-.39 2.72-.63 5.46-1.11 8.17-.9 5.15-1.7 10.31-2.87 15.41-4.1 18.5-10.3 36.55-18.51 53.63-15.77 32.83-38.83 62.17-67.12 85.12a246.503 246.503 0 0 1-56.91 34.86c-6.21 2.68-12.46 5.25-18.87 7.41-3.51 1.16-7.01 2.38-10.57 3.39-6.62 1.88-13.29 3.64-20.04 5-4.66.91-9.34 1.73-14.03 2.48-5.25.66-10.5 1.44-15.79 1.74-6.69.66-13.41.84-20.12.81-6.82.03-13.65-.12-20.45-.79-3.29-.23-6.57-.5-9.83-.95-2.72-.39-5.46-.63-8.17-1.11-4.12-.72-8.25-1.37-12.35-2.22-4.25-.94-8.49-1.89-12.69-3.02-8.63-2.17-17.08-5.01-25.41-8.13-10.49-4.12-20.79-8.75-30.64-14.25-2.14-1.15-4.28-2.29-6.35-3.57-11.22-6.58-21.86-14.1-31.92-22.34-34.68-28.41-61.41-66.43-76.35-108.7-3.09-8.74-5.71-17.65-7.8-26.68-1.48-6.16-2.52-12.42-3.58-18.66-.4-2.35-.61-4.73-.95-7.09-.6-3.96-.75-7.96-1.17-11.94-.8-9.47-.71-18.99-.51-28.49.14-3.51.34-7.01.7-10.51.31-3.17.46-6.37.92-9.52.41-2.81.65-5.65 1.16-8.44.7-3.94 1.3-7.9 2.12-11.82 3.43-16.52 8.47-32.73 15.26-48.18 1.15-2.92 2.59-5.72 3.86-8.59 8.05-16.71 17.9-32.56 29.49-47.06 20-25.38 45.1-46.68 73.27-62.47 7.5-4.15 15.16-8.05 23.07-11.37 15.82-6.88 32.41-11.95 49.31-15.38 3.51-.67 7.04-1.24 10.56-1.85 2.62-.47 5.28-.7 7.91-1.08 3.53-.53 7.1-.68 10.65-1.04 2.46-.24 4.91-.36 7.36-.51m8.64 24.41c-9.23.1-18.43.99-27.57 2.23-7.3 1.08-14.53 2.6-21.71 4.3-13.91 3.5-27.48 8.34-40.46 14.42-10.46 4.99-20.59 10.7-30.18 17.22-4.18 2.92-8.4 5.8-12.34 9.03-5.08 3.97-9.98 8.17-14.68 12.59-2.51 2.24-4.81 4.7-7.22 7.06-28.22 28.79-48.44 65.39-57.5 104.69-2.04 8.44-3.54 17.02-4.44 25.65-1.1 8.89-1.44 17.85-1.41 26.8.11 7.14.38 14.28 1.22 21.37.62 7.12 1.87 14.16 3.2 21.18 1.07 4.65 2.03 9.32 3.33 13.91 6.29 23.38 16.5 45.7 30.07 65.75 8.64 12.98 18.78 24.93 29.98 35.77 16.28 15.82 35.05 29.04 55.34 39.22 7.28 3.52 14.66 6.87 22.27 9.63 5.04 1.76 10.06 3.57 15.22 4.98 11.26 3.23 22.77 5.6 34.39 7.06 2.91.29 5.81.61 8.72.9 13.82 1.08 27.74 1 41.54-.43 4.45-.6 8.92-.99 13.35-1.78 3.63-.67 7.28-1.25 10.87-2.1 4.13-.98 8.28-1.91 12.36-3.07 26.5-7.34 51.58-19.71 73.58-36.2 15.78-11.82 29.96-25.76 42.12-41.28 3.26-4.02 6.17-8.31 9.13-12.55 3.39-5.06 6.58-10.25 9.6-15.54 2.4-4.44 4.74-8.91 6.95-13.45 5.69-12.05 10.28-24.62 13.75-37.49 2.59-10.01 4.75-20.16 5.9-30.45 1.77-13.47 1.94-27.1 1.29-40.65-.29-3.89-.67-7.77-1-11.66-2.23-19.08-6.79-37.91-13.82-55.8-5.95-15.13-13.53-29.63-22.61-43.13-12.69-18.8-28.24-35.68-45.97-49.83-25.05-20-54.47-34.55-85.65-42.08-7.78-1.93-15.69-3.34-23.63-4.45-3.91-.59-7.85-.82-11.77-1.24-7.39-.57-14.81-.72-22.22-.58zM139.26 83.53c13.3-8.89 28.08-15.38 43.3-20.18-3.17 1.77-6.44 3.38-9.53 5.29-11.21 6.68-21.52 14.9-30.38 24.49-6.8 7.43-12.76 15.73-17.01 24.89-3.29 6.86-5.64 14.19-6.86 21.71-.93 4.85-1.3 9.81-1.17 14.75.13 13.66 4.44 27.08 11.29 38.82 5.92 10.22 13.63 19.33 22.36 27.26 4.85 4.36 10.24 8.09 14.95 12.6 2.26 2.19 4.49 4.42 6.43 6.91 2.62 3.31 4.89 6.99 5.99 11.1.9 3.02.66 6.2.69 9.31.02 4.1-.04 8.2.03 12.3.14 3.54-.02 7.09.11 10.63.08 2.38.02 4.76.05 7.14.16 5.77.06 11.53.15 17.3.11 2.91.02 5.82.13 8.74.03 1.63.13 3.28-.03 4.91-.91.12-1.82.18-2.73.16-10.99 0-21.88-2.63-31.95-6.93-6-2.7-11.81-5.89-17.09-9.83-5.75-4.19-11.09-8.96-15.79-14.31-6.53-7.24-11.98-15.39-16.62-23.95-1.07-2.03-2.24-4.02-3.18-6.12-1.16-2.64-2.62-5.14-3.67-7.82-4.05-9.68-6.57-19.94-8.08-30.31-.49-4.44-1.09-8.88-1.2-13.35-.7-15.73.84-31.55 4.67-46.82 2.12-8.15 4.77-16.18 8.31-23.83 6.32-14.2 15.34-27.18 26.3-38.19 6.28-6.2 13.13-11.84 20.53-16.67zm175.37-20.12c2.74.74 5.41 1.74 8.09 2.68 6.36 2.33 12.68 4.84 18.71 7.96 13.11 6.44 25.31 14.81 35.82 24.97 10.2 9.95 18.74 21.6 25.14 34.34 1.28 2.75 2.64 5.46 3.81 8.26 6.31 15.1 10 31.26 11.23 47.57.41 4.54.44 9.09.45 13.64.07 11.64-1.49 23.25-4.3 34.53-1.97 7.27-4.35 14.49-7.86 21.18-3.18 6.64-6.68 13.16-10.84 19.24-6.94 10.47-15.6 19.87-25.82 27.22-10.48 7.64-22.64 13.02-35.4 15.38-3.51.69-7.08 1.08-10.66 1.21-1.85.06-3.72.16-5.56-.1-.28-2.15 0-4.31-.01-6.46-.03-3.73.14-7.45.1-11.17.19-7.02.02-14.05.21-21.07.03-2.38-.03-4.76.03-7.14.17-5.07-.04-10.14.14-15.21.1-2.99-.24-6.04.51-8.96.66-2.5 1.78-4.86 3.09-7.08 4.46-7.31 11.06-12.96 17.68-18.26 5.38-4.18 10.47-8.77 15.02-13.84 7.68-8.37 14.17-17.88 18.78-28.27 2.5-5.93 4.52-12.1 5.55-18.46.86-4.37 1.06-8.83 1.01-13.27-.02-7.85-1.4-15.65-3.64-23.17-1.75-5.73-4.27-11.18-7.09-16.45-3.87-6.93-8.65-13.31-13.96-19.2-9.94-10.85-21.75-19.94-34.6-27.1-1.85-1.02-3.84-1.82-5.63-2.97zm-100.8 58.45c.98-1.18 1.99-2.33 3.12-3.38-.61.93-1.27 1.81-1.95 2.68-3.1 3.88-5.54 8.31-7.03 13.06-.87 3.27-1.68 6.6-1.73 10-.07 2.52-.08 5.07.32 7.57 1.13 7.63 4.33 14.85 8.77 21.12 2 2.7 4.25 5.27 6.92 7.33 1.62 1.27 3.53 2.09 5.34 3.05 3.11 1.68 6.32 3.23 9.07 5.48 2.67 2.09 4.55 5.33 4.4 8.79-.01 73.67 0 147.34-.01 221.02 0 1.35-.08 2.7.04 4.04.13 1.48.82 2.83 1.47 4.15.86 1.66 1.78 3.34 3.18 4.62.85.77 1.97 1.4 3.15 1.24 1.5-.2 2.66-1.35 3.45-2.57.96-1.51 1.68-3.16 2.28-4.85.76-2.13.44-4.42.54-6.63.14-4.03-.02-8.06.14-12.09.03-5.89.03-11.77.06-17.66.14-3.62.03-7.24.11-10.86.15-4.03-.02-8.06.14-12.09.03-5.99.03-11.98.07-17.97.14-3.62.02-7.24.11-10.86.14-3.93-.02-7.86.14-11.78.03-5.99.03-11.98.06-17.97.16-3.94-.01-7.88.19-11.82.29 1.44.13 2.92.22 4.38.19 3.61.42 7.23.76 10.84.32 3.44.44 6.89.86 10.32.37 3.1.51 6.22.95 9.31.57 4.09.87 8.21 1.54 12.29 1.46 9.04 2.83 18.11 5.09 26.99 1.13 4.82 2.4 9.61 4 14.3 2.54 7.9 5.72 15.67 10.31 22.62 1.73 2.64 3.87 4.98 6.1 7.21.27.25.55.51.88.71.6.25 1.31-.07 1.7-.57.71-.88 1.17-1.94 1.7-2.93 4.05-7.8 8.18-15.56 12.34-23.31.7-1.31 1.44-2.62 2.56-3.61 1.75-1.57 3.84-2.69 5.98-3.63 2.88-1.22 5.9-2.19 9.03-2.42 6.58-.62 13.11.75 19.56 1.85 3.69.58 7.4 1.17 11.13 1.41 3.74.1 7.48.05 11.21-.28 8.55-.92 16.99-2.96 24.94-6.25 5.3-2.24 10.46-4.83 15.31-7.93 11.46-7.21 21.46-16.57 30.04-27.01 1.17-1.42 2.25-2.9 3.46-4.28-1.2 3.24-2.67 6.37-4.16 9.48-1.25 2.9-2.84 5.61-4.27 8.42-5.16 9.63-11.02 18.91-17.75 27.52-4.03 5.21-8.53 10.05-13.33 14.57-6.64 6.05-14.07 11.37-22.43 14.76-8.21 3.37-17.31 4.63-26.09 3.29-3.56-.58-7.01-1.69-10.41-2.88-2.79-.97-5.39-2.38-8.03-3.69-3.43-1.71-6.64-3.81-9.71-6.08 2.71 3.06 5.69 5.86 8.7 8.61 4.27 3.76 8.74 7.31 13.63 10.23 3.98 2.45 8.29 4.4 12.84 5.51 1.46.37 2.96.46 4.45.6-1.25 1.1-2.63 2.04-3.99 2.98-9.61 6.54-20.01 11.86-30.69 16.43-20.86 8.7-43.17 13.97-65.74 15.34-4.66.24-9.32.36-13.98.36-4.98-.11-9.97-.13-14.92-.65-11.2-.76-22.29-2.73-33.17-5.43-10.35-2.71-20.55-6.12-30.3-10.55-8.71-3.86-17.12-8.42-24.99-13.79-1.83-1.31-3.74-2.53-5.37-4.08 6.6-1.19 13.03-3.39 18.99-6.48 5.74-2.86 10.99-6.66 15.63-11.07 2.24-2.19 4.29-4.59 6.19-7.09-3.43 2.13-6.93 4.15-10.62 5.78-4.41 2.16-9.07 3.77-13.81 5.02-5.73 1.52-11.74 1.73-17.61 1.14-8.13-.95-15.86-4.27-22.51-8.98-4.32-2.94-8.22-6.43-11.96-10.06-9.93-10.16-18.2-21.81-25.66-33.86-3.94-6.27-7.53-12.75-11.12-19.22-1.05-2.04-2.15-4.05-3.18-6.1 2.85 2.92 5.57 5.97 8.43 8.88 8.99 8.97 18.56 17.44 29.16 24.48 7.55 4.9 15.67 9.23 24.56 11.03 3.11.73 6.32.47 9.47.81 2.77.28 5.56.2 8.34.3 5.05.06 10.11.04 15.16-.16 3.65-.16 7.27-.66 10.89-1.09 2.07-.25 4.11-.71 6.14-1.2 3.88-.95 8.11-.96 11.83.61 4.76 1.85 8.44 5.64 11.38 9.71 2.16 3.02 4.06 6.22 5.66 9.58 1.16 2.43 2.46 4.79 3.55 7.26 1 2.24 2.15 4.42 3.42 6.52.67 1.02 1.4 2.15 2.62 2.55 1.06-.75 1.71-1.91 2.28-3.03 2.1-4.16 3.42-8.65 4.89-13.05 2.02-6.59 3.78-13.27 5.19-20.02 2.21-9.25 3.25-18.72 4.54-28.13.56-3.98.83-7.99 1.31-11.97.87-10.64 1.9-21.27 2.24-31.94.08-1.86.24-3.71.25-5.57.01-4.35.25-8.69.22-13.03-.01-2.38-.01-4.76 0-7.13.05-5.07-.2-10.14-.22-15.21-.2-6.61-.71-13.2-1.29-19.78-.73-5.88-1.55-11.78-3.12-17.51-2.05-7.75-5.59-15.03-9.8-21.82-3.16-5.07-6.79-9.88-11.09-14.03-3.88-3.86-8.58-7.08-13.94-8.45-1.5-.41-3.06-.45-4.59-.64.07-2.99.7-5.93 1.26-8.85 1.59-7.71 3.8-15.3 6.76-22.6 1.52-4.03 3.41-7.9 5.39-11.72 3.45-6.56 7.62-12.79 12.46-18.46zm31.27 1.7c.35-.06.71-.12 1.07-.19.19 1.79.09 3.58.1 5.37v38.13c-.01 1.74.13 3.49-.15 5.22-.36-.03-.71-.05-1.06-.05-.95-3.75-1.72-7.55-2.62-11.31-.38-1.53-.58-3.09-1.07-4.59-1.7-.24-3.43-.17-5.15-.2-5.06-.01-10.13 0-15.19-.01-1.66-.01-3.32.09-4.98-.03-.03-.39-.26-.91.16-1.18 1.28-.65 2.72-.88 4.06-1.35 3.43-1.14 6.88-2.16 10.31-3.31 1.39-.48 2.9-.72 4.16-1.54.04-.56.02-1.13-.05-1.68-1.23-.55-2.53-.87-3.81-1.28-3.13-1.03-6.29-1.96-9.41-3.02-1.79-.62-3.67-1-5.41-1.79-.03-.37-.07-.73-.11-1.09 5.09-.19 10.2.06 15.3-.12 3.36-.13 6.73.08 10.09-.07.12-.39.26-.77.37-1.16 1.08-4.94 2.33-9.83 3.39-14.75zm5.97-.2c.36.05.72.12 1.08.2.98 3.85 1.73 7.76 2.71 11.61.36 1.42.56 2.88 1.03 4.27 2.53.18 5.07-.01 7.61.05 5.16.12 10.33.12 15.49.07.76-.01 1.52.03 2.28.08-.04.36-.07.72-.1 1.08-1.82.83-3.78 1.25-5.67 1.89-3.73 1.23-7.48 2.39-11.22 3.57-.57.17-1.12.42-1.67.64-.15.55-.18 1.12-.12 1.69.87.48 1.82.81 2.77 1.09 4.88 1.52 9.73 3.14 14.63 4.6.38.13.78.27 1.13.49.4.27.23.79.15 1.18-1.66.13-3.31.03-4.97.04-5.17.01-10.33-.01-15.5.01-1.61.03-3.22-.02-4.82.21-.52 1.67-.72 3.42-1.17 5.11-.94 3.57-1.52 7.24-2.54 10.78-.36.01-.71.02-1.06.06-.29-1.73-.15-3.48-.15-5.22v-38.13c.02-1.78-.08-3.58.11-5.37zM65.05 168.33c1.12-2.15 2.08-4.4 3.37-6.46-1.82 7.56-2.91 15.27-3.62 23-.8 7.71-.85 15.49-.54 23.23 1.05 19.94 5.54 39.83 14.23 57.88 2.99 5.99 6.35 11.83 10.5 17.11 6.12 7.47 12.53 14.76 19.84 21.09 4.8 4.1 9.99 7.78 15.54 10.8 3.27 1.65 6.51 3.39 9.94 4.68 5.01 2.03 10.19 3.61 15.42 4.94 3.83.96 7.78 1.41 11.52 2.71 5 1.57 9.47 4.61 13.03 8.43 4.93 5.23 8.09 11.87 10.2 18.67.99 2.9 1.59 5.91 2.17 8.92.15.75.22 1.52.16 2.29-6.5 2.78-13.26 5.06-20.26 6.18-4.11.78-8.29.99-12.46 1.08-10.25.24-20.47-1.76-30.12-5.12-3.74-1.42-7.49-2.85-11.03-4.72-8.06-3.84-15.64-8.7-22.46-14.46-2.92-2.55-5.83-5.13-8.4-8.03-9.16-9.83-16.3-21.41-21.79-33.65-2.39-5.55-4.61-11.18-6.37-16.96-1.17-3.94-2.36-7.89-3.26-11.91-.75-2.94-1.22-5.95-1.87-8.92-.46-2.14-.69-4.32-1.03-6.48-.85-5.43-1.28-10.93-1.33-16.43.11-6.18.25-12.37 1.07-18.5.4-2.86.67-5.74 1.15-8.6.98-5.7 2.14-11.37 3.71-16.93 3.09-11.65 7.48-22.95 12.69-33.84zm363.73-6.44c1.1 1.66 1.91 3.48 2.78 5.26 2.1 4.45 4.24 8.9 6.02 13.49 7.61 18.76 12.3 38.79 13.04 59.05.02 1.76.07 3.52.11 5.29.13 9.57-1.27 19.09-3.18 28.45-.73 3.59-1.54 7.17-2.58 10.69-4.04 14.72-10 29-18.41 41.78-8.21 12.57-19.01 23.55-31.84 31.41-5.73 3.59-11.79 6.64-18.05 9.19-5.78 2.19-11.71 4.03-17.8 5.11-6.4 1.05-12.91 1.52-19.4 1.23-7.92-.48-15.78-2.07-23.21-4.85-1.94-.8-3.94-1.46-5.84-2.33-.21-1.51.25-2.99.53-4.46 1.16-5.74 3.03-11.36 5.7-16.58 2.37-4.51 5.52-8.65 9.46-11.9 2.43-2.05 5.24-3.61 8.16-4.83 3.58-1.5 7.47-1.97 11.24-2.83 7.23-1.71 14.37-3.93 21.15-7 10.35-4.65 19.71-11.38 27.65-19.46 1.59-1.61 3.23-3.18 4.74-4.87 3.37-3.76 6.71-7.57 9.85-11.53 7.48-10.07 12.82-21.59 16.71-33.48 1.58-5.3 3.21-10.6 4.21-16.05.63-2.87 1.04-5.78 1.52-8.68.87-6.09 1.59-12.22 1.68-18.38.12-6.65.14-13.32-.53-19.94-.73-7.99-1.87-15.96-3.71-23.78z\"]\n};\nconst faOdysee = {\n  prefix: 'fab',\n  iconName: 'odysee',\n  icon: [512, 512, [], \"e5c6\", \"M406.7 463c-42.3 30.8-94.4 49-150.7 49C144.9 512 50.3 441.2 14.9 342.2c2.4 1.7 5.9 3.6 7.9 4.4c16.3 7.4 40.1-5.4 62.9-28.7c6.9-6.9 14.4-12.4 22.8-17.3c18.3-11.9 37.6-20.8 58.4-27.2c0 0 22.3 34.2 43.1 74.8s-22.3 54-27.2 54c-.3 0-.8 0-1.5-.1c-11-.5-70-3-56 51.1c14.9 57.4 97.5 36.6 139.6 8.9s31.7-118.3 31.7-118.3c41.1-6.4 54 37.1 57.9 59.4c.8 4.6 1.1 9.9 1.4 15.5c1.1 21.2 2.3 45.6 35.3 46.4c5.3 0 10.6-.8 15.5-2zm-95.3-23.7c-2-.5-3.5-2.5-3-5c1-2.5 3-3.5 5-3s3.5 3 3 5s-2.5 3.5-5 3zm-207-95.6c1.5-.5 3.5 1 4 3c0 2-1 4-3 4c-1.5 .5-3.5-1-4-3c-.5-1.5 1-3.5 3-4zM451.8 421C489.3 376.4 512 318.8 512 256c0-67.5-26.1-128.9-68.8-174.7c-.1 23.5-6.1 48.2-16.8 69.2c-11.9 20.3-49 58.9-69.8 78.7c-.7 .3-1.1 .9-1.5 1.4c-.2 .2-.3 .4-.5 .6c-5 6.9-4 16.8 3 21.8c21.3 15.8 56.4 45.6 59.4 72.8c3.5 34.9 27.9 75.6 34.2 86.2l0 0c.8 1.3 1.3 2.1 1.4 2.4c0 2.2-.4 4.3-.8 6.5zM390.7 251c-.5 3 1 5.9 4 6.4s5.9-1 6.4-4s-1-5.9-4-6.4c-3-1-5.9 1-6.4 4zm61.4-60.9l-11.4 5.4-3 12.9-5.4-11.4-12.9-3 11.4-5.4 3-12.9 5.4 11.4 12.9 3zM395.5 41.3c-16.2 8.2-22.1 32.8-29 61.4l0 0c-.3 1.4-.7 2.8-1 4.2c-9.5 38.5-30.6 37.6-41.7 37.2c-1.1 0-2-.1-2.9-.1c-5.1 0-6-4-8.9-17.1c-2.6-12.1-6.9-32-17.9-63.6C271.4-2.5 211.4 13.9 165.9 41.1C110.6 74.2 131.5 143 146.1 190.5c.7 2.2 1.4 4.4 2 6.6c-4 4-13.8 7.5-26 11.9c-12.1 4.3-26.6 9.5-40.3 16.9C47.9 243.9 11.5 274.9 2 288.5C.7 277.8 0 267 0 256C0 114.6 114.6 0 256 0c51.4 0 99.4 15.2 139.5 41.3zM58.9 189.6c-1.5-2-4.5-3-6.4-1.5s-3 4.5-1.5 6.4s4.5 3 6.4 1.5c2.5-1.5 3-4.5 1.5-6.4zM327.3 64.9c2-1.5 5-.5 6.4 1.5c1.5 2.5 1 5.4-1.5 6.4c-2 1.5-5 .5-6.4-1.5s-.5-5 1.5-6.4zM95.1 105c-.5 1.5 .5 3 2 3c1.5 .5 3-.5 3-2c.5-1.5-.5-3-2-3s-3 .5-3 2zm84.7-.5c-3.5-43.1 37.1-54 37.1-54c44.1-15.4 56 5.9 66.4 37.6s3 42.6-38.6 58.9s-61.9-4.5-64.9-42.6zm89.6 14.9h1c2.5 0 5-2 5-5c2-6.9 1-14.4-2-20.8c-1.5-2-4-3.5-6.4-2.5c-3 1-4.5 4-3.5 6.9c2 4.5 3 9.9 1.5 14.9c-.5 3 1.5 5.9 4.5 6.4zm-9.9-41.6c-2 0-4-1-5-3s-2-3.5-3-5c-2-2-2-5.4 0-7.4s5.4-2 7.4 0c2 2.5 3.5 5 5 7.4s.5 5.9-2.5 7.4c-.6 0-1 .2-1.3 .3c-.2 .1-.4 .2-.6 .2z\"]\n};\nconst faSquareWhatsapp = {\n  prefix: 'fab',\n  iconName: 'square-whatsapp',\n  icon: [448, 512, [\"whatsapp-square\"], \"f40c\", \"M92.1 254.6c0 24.9 7 49.2 20.2 70.1l3.1 5-13.3 48.6L152 365.2l4.8 2.9c20.2 12 43.4 18.4 67.1 18.4h.1c72.6 0 133.3-59.1 133.3-131.8c0-35.2-15.2-68.3-40.1-93.2c-25-25-58-38.7-93.2-38.7c-72.7 0-131.8 59.1-131.9 131.8zM274.8 330c-12.6 1.9-22.4 .9-47.5-9.9c-36.8-15.9-61.8-51.5-66.9-58.7c-.4-.6-.7-.9-.8-1.1c-2-2.6-16.2-21.5-16.2-41c0-18.4 9-27.9 13.2-32.3c.3-.3 .5-.5 .7-.8c3.6-4 7.9-5 10.6-5c2.6 0 5.3 0 7.6 .1c.3 0 .5 0 .8 0c2.3 0 5.2 0 8.1 6.8c1.2 2.9 3 7.3 4.9 11.8c3.3 8 6.7 16.3 7.3 17.6c1 2 1.7 4.3 .3 6.9c-3.4 6.8-6.9 10.4-9.3 13c-3.1 3.2-4.5 4.7-2.3 8.6c15.3 26.3 30.6 35.4 53.9 47.1c4 2 6.3 1.7 8.6-1c2.3-2.6 9.9-11.6 12.5-15.5c2.6-4 5.3-3.3 8.9-2s23.1 10.9 27.1 12.9c.8 .4 1.5 .7 2.1 1c2.8 1.4 4.7 2.3 5.5 3.6c.9 1.9 .9 9.9-2.4 19.1c-3.3 9.3-19.1 17.7-26.7 18.8zM448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM148.1 393.9L64 416l22.5-82.2c-13.9-24-21.2-51.3-21.2-79.3C65.4 167.1 136.5 96 223.9 96c42.4 0 82.2 16.5 112.2 46.5c29.9 30 47.9 69.8 47.9 112.2c0 87.4-72.7 158.5-160.1 158.5c-26.6 0-52.7-6.7-75.8-19.3z\"]\n};\nconst faWhatsappSquare = faSquareWhatsapp;\nconst faNodeJs = {\n  prefix: 'fab',\n  iconName: 'node-js',\n  icon: [448, 512, [], \"f3d3\", \"M224 508c-6.7 0-13.5-1.8-19.4-5.2l-61.7-36.5c-9.2-5.2-4.7-7-1.7-8 12.3-4.3 14.8-5.2 27.9-12.7 1.4-.8 3.2-.5 4.6.4l47.4 28.1c1.7 1 4.1 1 5.7 0l184.7-106.6c1.7-1 2.8-3 2.8-5V149.3c0-2.1-1.1-4-2.9-5.1L226.8 37.7c-1.7-1-4-1-5.7 0L36.6 144.3c-1.8 1-2.9 3-2.9 5.1v213.1c0 2 1.1 4 2.9 4.9l50.6 29.2c27.5 13.7 44.3-2.4 44.3-18.7V167.5c0-3 2.4-5.3 5.4-5.3h23.4c2.9 0 5.4 2.3 5.4 5.3V378c0 36.6-20 57.6-54.7 57.6-10.7 0-19.1 0-42.5-11.6l-48.4-27.9C8.1 389.2.7 376.3.7 362.4V149.3c0-13.8 7.4-26.8 19.4-33.7L204.6 9c11.7-6.6 27.2-6.6 38.8 0l184.7 106.7c12 6.9 19.4 19.8 19.4 33.7v213.1c0 13.8-7.4 26.7-19.4 33.7L243.4 502.8c-5.9 3.4-12.6 5.2-19.4 5.2zm149.1-210.1c0-39.9-27-50.5-83.7-58-57.4-7.6-63.2-11.5-63.2-24.9 0-11.1 4.9-25.9 47.4-25.9 37.9 0 51.9 8.2 57.7 33.8.5 2.4 2.7 4.2 5.2 4.2h24c1.5 0 2.9-.6 3.9-1.7s1.5-2.6 1.4-4.1c-3.7-44.1-33-64.6-92.2-64.6-52.7 0-84.1 22.2-84.1 59.5 0 40.4 31.3 51.6 81.8 56.6 60.5 5.9 65.2 14.8 65.2 26.7 0 20.6-16.6 29.4-55.5 29.4-48.9 0-59.6-12.3-63.2-36.6-.4-2.6-2.6-4.5-5.3-4.5h-23.9c-3 0-5.3 2.4-5.3 5.3 0 31.1 16.9 68.2 97.8 68.2 58.4-.1 92-23.2 92-63.4z\"]\n};\nconst faEdgeLegacy = {\n  prefix: 'fab',\n  iconName: 'edge-legacy',\n  icon: [512, 512, [], \"e078\", \"M25.71,228.16l.35-.48c0,.16,0,.32-.07.48Zm460.58,15.51c0-44-7.76-84.46-28.81-122.4C416.5,47.88,343.91,8,258.89,8,119,7.72,40.62,113.21,26.06,227.68c42.42-61.31,117.07-121.38,220.37-125,0,0,109.67,0,99.42,105H170c6.37-37.39,18.55-59,34.34-78.93-75.05,34.9-121.85,96.1-120.75,188.32.83,71.45,50.13,144.84,120.75,172,83.35,31.84,192.77,7.2,240.13-21.33V363.31C363.6,419.8,173.6,424.23,172.21,295.74H486.29V243.67Z\"]\n};\nconst faSlack = {\n  prefix: 'fab',\n  iconName: 'slack',\n  icon: [448, 512, [62447, \"slack-hash\"], \"f198\", \"M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z\"]\n};\nconst faSlackHash = faSlack;\nconst faMedrt = {\n  prefix: 'fab',\n  iconName: 'medrt',\n  icon: [544, 512, [], \"f3c8\", \"M113.7 256c0 121.8 83.9 222.8 193.5 241.1-18.7 4.5-38.2 6.9-58.2 6.9C111.4 504 0 393 0 256S111.4 8 248.9 8c20.1 0 39.6 2.4 58.2 6.9C197.5 33.2 113.7 134.2 113.7 256m297.4 100.3c-77.7 55.4-179.6 47.5-240.4-14.6 5.5 14.1 12.7 27.7 21.7 40.5 61.6 88.2 182.4 109.3 269.7 47 87.3-62.3 108.1-184.3 46.5-272.6-9-12.9-19.3-24.3-30.5-34.2 37.4 78.8 10.7 178.5-67 233.9m-218.8-244c-1.4 1-2.7 2.1-4 3.1 64.3-17.8 135.9 4 178.9 60.5 35.7 47 42.9 106.6 24.4 158 56.7-56.2 67.6-142.1 22.3-201.8-50-65.5-149.1-74.4-221.6-19.8M296 224c-4.4 0-8-3.6-8-8v-40c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v40c0 4.4-3.6 8-8 8h-40c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h40c4.4 0 8 3.6 8 8v40c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-40c0-4.4 3.6-8 8-8h40c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-40z\"]\n};\nconst faUsb = {\n  prefix: 'fab',\n  iconName: 'usb',\n  icon: [640, 512, [], \"f287\", \"M641.5 256c0 3.1-1.7 6.1-4.5 7.5L547.9 317c-1.4.8-2.8 1.4-4.5 1.4-1.4 0-3.1-.3-4.5-1.1-2.8-1.7-4.5-4.5-4.5-7.8v-35.6H295.7c25.3 39.6 40.5 106.9 69.6 106.9H392V354c0-5 3.9-8.9 8.9-8.9H490c5 0 8.9 3.9 8.9 8.9v89.1c0 5-3.9 8.9-8.9 8.9h-89.1c-5 0-8.9-3.9-8.9-8.9v-26.7h-26.7c-75.4 0-81.1-142.5-124.7-142.5H140.3c-8.1 30.6-35.9 53.5-69 53.5C32 327.3 0 295.3 0 256s32-71.3 71.3-71.3c33.1 0 61 22.8 69 53.5 39.1 0 43.9 9.5 74.6-60.4C255 88.7 273 95.7 323.8 95.7c7.5-20.9 27-35.6 50.4-35.6 29.5 0 53.5 23.9 53.5 53.5s-23.9 53.5-53.5 53.5c-23.4 0-42.9-14.8-50.4-35.6H294c-29.1 0-44.3 67.4-69.6 106.9h310.1v-35.6c0-3.3 1.7-6.1 4.5-7.8 2.8-1.7 6.4-1.4 8.9.3l89.1 53.5c2.8 1.1 4.5 4.1 4.5 7.2z\"]\n};\nconst faTumblr = {\n  prefix: 'fab',\n  iconName: 'tumblr',\n  icon: [320, 512, [], \"f173\", \"M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z\"]\n};\nconst faVaadin = {\n  prefix: 'fab',\n  iconName: 'vaadin',\n  icon: [448, 512, [], \"f408\", \"M224.5 140.7c1.5-17.6 4.9-52.7 49.8-52.7h98.6c20.7 0 32.1-7.8 32.1-21.6V54.1c0-12.2 9.3-22.1 21.5-22.1S448 41.9 448 54.1v36.5c0 42.9-21.5 62-66.8 62H280.7c-30.1 0-33 14.7-33 27.1 0 1.3-.1 2.5-.2 3.7-.7 12.3-10.9 22.2-23.4 22.2s-22.7-9.8-23.4-22.2c-.1-1.2-.2-2.4-.2-3.7 0-12.3-3-27.1-33-27.1H66.8c-45.3 0-66.8-19.1-66.8-62V54.1C0 41.9 9.4 32 21.6 32s21.5 9.9 21.5 22.1v12.3C43.1 80.2 54.5 88 75.2 88h98.6c44.8 0 48.3 35.1 49.8 52.7h.9zM224 456c11.5 0 21.4-7 25.7-16.3 1.1-1.8 97.1-169.6 98.2-171.4 11.9-19.6-3.2-44.3-27.2-44.3-13.9 0-23.3 6.4-29.8 20.3L224 362l-66.9-117.7c-6.4-13.9-15.9-20.3-29.8-20.3-24 0-39.1 24.6-27.2 44.3 1.1 1.9 97.1 169.6 98.2 171.4 4.3 9.3 14.2 16.3 25.7 16.3z\"]\n};\nconst faQuora = {\n  prefix: 'fab',\n  iconName: 'quora',\n  icon: [448, 512, [], \"f2c4\", \"M440.5 386.7h-29.3c-1.5 13.5-10.5 30.8-33 30.8-20.5 0-35.3-14.2-49.5-35.8 44.2-34.2 74.7-87.5 74.7-153C403.5 111.2 306.8 32 205 32 105.3 32 7.3 111.7 7.3 228.7c0 134.1 131.3 221.6 249 189C276 451.3 302 480 351.5 480c81.8 0 90.8-75.3 89-93.3zM297 329.2C277.5 300 253.3 277 205.5 277c-30.5 0-54.3 10-69 22.8l12.2 24.3c6.2-3 13-4 19.8-4 35.5 0 53.7 30.8 69.2 61.3-10 3-20.7 4.2-32.7 4.2-75 0-107.5-53-107.5-156.7C97.5 124.5 130 71 205 71c76.2 0 108.7 53.5 108.7 157.7.1 41.8-5.4 75.6-16.7 100.5z\"]\n};\nconst faSquareXTwitter = {\n  prefix: 'fab',\n  iconName: 'square-x-twitter',\n  icon: [448, 512, [], \"e61a\", \"M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm297.1 84L257.3 234.6 379.4 396H283.8L209 298.1 123.3 396H75.8l111-126.9L69.7 116h98l67.7 89.5L313.6 116h47.5zM323.3 367.6L153.4 142.9H125.1L296.9 367.6h26.3z\"]\n};\nconst faReacteurope = {\n  prefix: 'fab',\n  iconName: 'reacteurope',\n  icon: [576, 512, [], \"f75d\", \"M250.6 211.74l5.8-4.1 5.8 4.1-2.1-6.8 5.7-4.3-7.1-.1-2.3-6.8-2.3 6.8-7.2.1 5.7 4.3zm63.7 0l5.8-4.1 5.8 4.1-2.1-6.8 5.7-4.3-7.2-.1-2.3-6.8-2.3 6.8-7.2.1 5.7 4.3zm-91.3 50.5h-3.4c-4.8 0-3.8 4-3.8 12.1 0 4.7-2.3 6.1-5.8 6.1s-5.8-1.4-5.8-6.1v-36.6c0-4.7 2.3-6.1 5.8-6.1s5.8 1.4 5.8 6.1c0 7.2-.7 10.5 3.8 10.5h3.4c4.7-.1 3.8-3.9 3.8-12.3 0-9.9-6.7-14.1-16.8-14.1h-.2c-10.1 0-16.8 4.2-16.8 14.1V276c0 10.4 6.7 14.1 16.8 14.1h.2c10.1 0 16.8-3.8 16.8-14.1 0-9.86 1.1-13.76-3.8-13.76zm-80.7 17.4h-14.7v-19.3H139c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.81 0 0 0 2-1.9v-.8a1.84 1.84 0 0 0-2-1.96zm-93.1-62.9h-.8c-10.1 0-15.3 4.7-15.3 14.1V276c0 9.3 5.2 14.1 15.3 14.1h.8c10.1 0 15.3-4.8 15.3-14.1v-40.1c0-9.36-5.2-14.06-15.3-14.06zm10.2 52.4c-.1 8-3 11.1-10.5 11.1s-10.5-3.1-10.5-11.1v-36.6c0-7.9 3-11.1 10.5-11.1s10.5 3.2 10.5 11.1zm-46.5-14.5c6.1-1.6 9.2-6.1 9.2-13.3v-9.7c0-9.4-5.2-14.1-15.3-14.1h-13.7a1.81 1.81 0 0 0-2 1.9v63a1.81 1.81 0 0 0 2 1.9h1.2a1.74 1.74 0 0 0 1.9-1.9v-26.9h11.6l10.4 27.2a2.32 2.32 0 0 0 2.3 1.5h1.5c1.4 0 2-1 1.5-2.3zm-6.4-3.9H355v-28.5h10.2c7.5 0 10.5 3.1 10.5 11.1v6.4c0 7.84-3 11.04-10.5 11.04zm85.9-33.1h-13.7a1.62 1.62 0 0 0-2 1.8v63a1.81 1.81 0 0 0 2 1.9h1.2a1.74 1.74 0 0 0 1.9-1.9v-26.1h10.6c10.1 0 15.3-4.8 15.3-14.1v-10.5c0-9.4-5.2-14.1-15.3-14.1zm10.2 22.8c0 7.9-3 11.1-10.5 11.1h-10.2v-29.2h10.2c7.5-.1 10.5 3.1 10.5 11zM259.5 308l-2.3-6.8-2.3 6.8-7.1.1 5.7 4.3-2.1 6.8 5.8-4.1 5.8 4.1-2.1-6.8 5.7-4.3zm227.6-136.1a364.42 364.42 0 0 0-35.6-11.3c19.6-78 11.6-134.7-22.3-153.9C394.7-12.66 343.3 11 291 61.94q5.1 4.95 10.2 10.2c82.5-80 119.6-53.5 120.9-52.8 22.4 12.7 36 55.8 15.5 137.8a587.83 587.83 0 0 0-84.6-13C281.1 43.64 212.4 2 170.8 2 140 2 127 23 123.2 29.74c-18.1 32-13.3 84.2.1 133.8-70.5 20.3-120.7 54.1-120.3 95 .5 59.6 103.2 87.8 122.1 92.8-20.5 81.9-10.1 135.6 22.3 153.9 28 15.8 75.1 6 138.2-55.2q-5.1-4.95-10.2-10.2c-82.5 80-119.7 53.5-120.9 52.8-22.3-12.6-36-55.6-15.5-137.9 12.4 2.9 41.8 9.5 84.6 13 71.9 100.4 140.6 142 182.1 142 30.8 0 43.8-21 47.6-27.7 18-31.9 13.3-84.1-.1-133.8 152.3-43.8 156.2-130.2 33.9-176.3zM135.9 36.84c2.9-5.1 11.9-20.3 34.9-20.3 36.8 0 98.8 39.6 163.3 126.2a714 714 0 0 0-93.9.9 547.76 547.76 0 0 1 42.2-52.4Q277.3 86 272.2 81a598.25 598.25 0 0 0-50.7 64.2 569.69 569.69 0 0 0-84.4 14.6c-.2-1.4-24.3-82.2-1.2-123zm304.8 438.3c-2.9 5.1-11.8 20.3-34.9 20.3-36.7 0-98.7-39.4-163.3-126.2a695.38 695.38 0 0 0 93.9-.9 547.76 547.76 0 0 1-42.2 52.4q5.1 5.25 10.2 10.2a588.47 588.47 0 0 0 50.7-64.2c47.3-4.7 80.3-13.5 84.4-14.6 22.7 84.4 4.5 117 1.2 123zm9.1-138.6c-3.6-11.9-7.7-24.1-12.4-36.4a12.67 12.67 0 0 1-10.7-5.7l-.1.1a19.61 19.61 0 0 1-5.4 3.6c5.7 14.3 10.6 28.4 14.7 42.2a535.3 535.3 0 0 1-72 13c3.5-5.3 17.2-26.2 32.2-54.2a24.6 24.6 0 0 1-6-3.2c-1.1 1.2-3.6 4.2-10.9 4.2-6.2 11.2-17.4 30.9-33.9 55.2a711.91 711.91 0 0 1-112.4 1c-7.9-11.2-21.5-31.1-36.8-57.8a21 21 0 0 1-3-1.5c-1.9 1.6-3.9 3.2-12.6 3.2 6.3 11.2 17.5 30.7 33.8 54.6a548.81 548.81 0 0 1-72.2-11.7q5.85-21 14.1-42.9c-3.2 0-5.4.2-8.4-1a17.58 17.58 0 0 1-6.9 1c-4.9 13.4-9.1 26.5-12.7 39.4C-31.7 297-12.1 216 126.7 175.64c3.6 11.9 7.7 24.1 12.4 36.4 10.4 0 12.9 3.4 14.4 5.3a12 12 0 0 1 2.3-2.2c-5.8-14.7-10.9-29.2-15.2-43.3 7-1.8 32.4-8.4 72-13-15.9 24.3-26.7 43.9-32.8 55.3a14.22 14.22 0 0 1 6.4 8 23.42 23.42 0 0 1 10.2-8.4c6.5-11.7 17.9-31.9 34.8-56.9a711.72 711.72 0 0 1 112.4-1c31.5 44.6 28.9 48.1 42.5 64.5a21.42 21.42 0 0 1 10.4-7.4c-6.4-11.4-17.6-31-34.3-55.5 40.4 4.1 65 10 72.2 11.7-4 14.4-8.9 29.2-14.6 44.2a20.74 20.74 0 0 1 6.8 4.3l.1.1a12.72 12.72 0 0 1 8.9-5.6c4.9-13.4 9.2-26.6 12.8-39.5a359.71 359.71 0 0 1 34.5 11c106.1 39.9 74 87.9 72.6 90.4-19.8 35.1-80.1 55.2-105.7 62.5zm-114.4-114h-1.2a1.74 1.74 0 0 0-1.9 1.9v49.8c0 7.9-2.6 11.1-10.1 11.1s-10.1-3.1-10.1-11.1v-49.8a1.69 1.69 0 0 0-1.9-1.9H309a1.81 1.81 0 0 0-2 1.9v51.5c0 9.6 5 14.1 15.1 14.1h.4c10.1 0 15.1-4.6 15.1-14.1v-51.5a2 2 0 0 0-2.2-1.9zM321.7 308l-2.3-6.8-2.3 6.8-7.1.1 5.7 4.3-2.1 6.8 5.8-4.1 5.8 4.1-2.1-6.8 5.7-4.3zm-31.1 7.4l-2.3-6.8-2.3 6.8-7.1.1 5.7 4.3-2.1 6.8 5.8-4.1 5.8 4.1-2.1-6.8 5.7-4.3zm5.1-30.8h-19.4v-26.7h16.1a1.89 1.89 0 0 0 2-2v-.8a1.89 1.89 0 0 0-2-2h-16.1v-25.8h19.1a1.89 1.89 0 0 0 2-2v-.8a1.77 1.77 0 0 0-2-1.9h-22.2a1.81 1.81 0 0 0-2 1.9v63a1.81 1.81 0 0 0 2 1.9h22.5a1.77 1.77 0 0 0 2-1.9v-.8a1.83 1.83 0 0 0-2-2.06zm-7.4-99.4L286 192l-7.1.1 5.7 4.3-2.1 6.8 5.8-4.1 5.8 4.1-2.1-6.8 5.7-4.3-7.1-.1z\"]\n};\nconst faMedium = {\n  prefix: 'fab',\n  iconName: 'medium',\n  icon: [640, 512, [62407, \"medium-m\"], \"f23a\", \"M180.5,74.262C80.813,74.262,0,155.633,0,256S80.819,437.738,180.5,437.738,361,356.373,361,256,280.191,74.262,180.5,74.262Zm288.25,10.646c-49.845,0-90.245,76.619-90.245,171.095s40.406,171.1,90.251,171.1,90.251-76.619,90.251-171.1H559C559,161.5,518.6,84.908,468.752,84.908Zm139.506,17.821c-17.526,0-31.735,68.628-31.735,153.274s14.2,153.274,31.735,153.274S640,340.631,640,256C640,171.351,625.785,102.729,608.258,102.729Z\"]\n};\nconst faMediumM = faMedium;\nconst faAmilia = {\n  prefix: 'fab',\n  iconName: 'amilia',\n  icon: [448, 512, [], \"f36d\", \"M240.1 32c-61.9 0-131.5 16.9-184.2 55.4-5.1 3.1-9.1 9.2-7.2 19.4 1.1 5.1 5.1 27.4 10.2 39.6 4.1 10.2 14.2 10.2 20.3 6.1 32.5-22.3 96.5-47.7 152.3-47.7 57.9 0 58.9 28.4 58.9 73.1v38.5C203 227.7 78.2 251 46.7 264.2 11.2 280.5 16.3 357.7 16.3 376s15.2 104 124.9 104c47.8 0 113.7-20.7 153.3-42.1v25.4c0 3 2.1 8.2 6.1 9.1 3.1 1 50.7 2 59.9 2s62.5.3 66.5-.7c4.1-1 5.1-6.1 5.1-9.1V168c-.1-80.3-57.9-136-192-136zm50.2 348c-21.4 13.2-48.7 24.4-79.1 24.4-52.8 0-58.9-33.5-59-44.7 0-12.2-3-42.7 18.3-52.9 24.3-13.2 75.1-29.4 119.8-33.5z\"]\n};\nconst faMixcloud = {\n  prefix: 'fab',\n  iconName: 'mixcloud',\n  icon: [640, 512, [], \"f289\", \"M212.98 346.566H179.789V195.114L185.973 173.47H175.262L137.127 346.566H76.1069L37.7323 173.47H27.276L33.1913 195.114V346.566H0V165H65.6506L102.248 338.096H110.747L147.329 165H212.98L212.98 346.566ZM544.459 283.589L458.434 345.655V307.534L531.329 255.776L458.434 204.017V165.896L544.459 228.231H553.721L640 165.896V204.017L566.866 255.776L640 307.549V345.655L553.721 283.589H544.459ZM430.157 272.311H248.113V239.255H430.157V272.311Z\"]\n};\nconst faFlipboard = {\n  prefix: 'fab',\n  iconName: 'flipboard',\n  icon: [448, 512, [], \"f44d\", \"M0 32v448h448V32H0zm358.4 179.2h-89.6v89.6h-89.6v89.6H89.6V121.6h268.8v89.6z\"]\n};\nconst faViacoin = {\n  prefix: 'fab',\n  iconName: 'viacoin',\n  icon: [384, 512, [], \"f237\", \"M384 32h-64l-80.7 192h-94.5L64 32H0l48 112H0v48h68.5l13.8 32H0v48h102.8L192 480l89.2-208H384v-48h-82.3l13.8-32H384v-48h-48l48-112zM192 336l-27-64h54l-27 64z\"]\n};\nconst faCriticalRole = {\n  prefix: 'fab',\n  iconName: 'critical-role',\n  icon: [448, 512, [], \"f6c9\", \"M225.82 0c.26.15 216.57 124.51 217.12 124.72 3 1.18 3.7 3.46 3.7 6.56q-.11 125.17 0 250.36a5.88 5.88 0 0 1-3.38 5.78c-21.37 12-207.86 118.29-218.93 124.58h-3C142 466.34 3.08 386.56 2.93 386.48a3.29 3.29 0 0 1-1.88-3.24c0-.87 0-225.94-.05-253.1a5 5 0 0 1 2.93-4.93C27.19 112.11 213.2 6 224.07 0zM215.4 20.42l-.22-.16Q118.06 75.55 21 130.87c0 .12.08.23.13.35l30.86 11.64c-7.71 6-8.32 6-10.65 5.13-.1 0-24.17-9.28-26.8-10v230.43c.88-1.41 64.07-110.91 64.13-111 1.62-2.82 3-1.92 9.12-1.52 1.4.09 1.48.22.78 1.42-41.19 71.33-36.4 63-67.48 116.94-.81 1.4-.61 1.13 1.25 1.13h186.5c1.44 0 1.69-.23 1.7-1.64v-8.88c0-1.34 2.36-.81-18.37-1-7.46-.07-14.14-3.22-21.38-12.7-7.38-9.66-14.62-19.43-21.85-29.21-2.28-3.08-3.45-2.38-16.76-2.38-1.75 0-1.78 0-1.76 1.82.29 26.21.15 25.27 1 32.66.52 4.37 2.16 4.2 9.69 4.81 3.14.26 3.88 4.08.52 4.92-1.57.39-31.6.51-33.67-.1a2.42 2.42 0 0 1 .3-4.73c3.29-.76 6.16.81 6.66-4.44 1.3-13.66 1.17-9 1.1-79.42 0-10.82-.35-12.58-5.36-13.55-1.22-.24-3.54-.16-4.69-.55-2.88-1-2-4.84 1.77-4.85 33.67 0 46.08-1.07 56.06 4.86 7.74 4.61 12 11.48 12.51 20.4.88 14.59-6.51 22.35-15 32.59a1.46 1.46 0 0 0 0 2.22c2.6 3.25 5 6.63 7.71 9.83 27.56 33.23 24.11 30.54 41.28 33.06.89.13 1-.42 1-1.15v-11c0-1 .32-1.43 1.41-1.26a72.37 72.37 0 0 0 23.58-.3c1.08-.15 1.5.2 1.48 1.33 0 .11.88 26.69.87 26.8-.05 1.52.67 1.62 1.89 1.62h186.71Q386.51 304.6 346 234.33c2.26-.66-.4 0 6.69-1.39 2-.39 2.05-.41 3.11 1.44 7.31 12.64 77.31 134 77.37 134.06V138c-1.72.5-103.3 38.72-105.76 39.68-1.08.42-1.55.2-1.91-.88-.63-1.9-1.34-3.76-2.09-5.62-.32-.79-.09-1.13.65-1.39.1 0 95.53-35.85 103-38.77-65.42-37.57-130.56-75-196-112.6l86.82 150.39-.28.33c-9.57-.9-10.46-1.6-11.8-3.94-1-1.69-73.5-127.71-82-142.16-9.1 14.67-83.56 146.21-85.37 146.32-2.93.17-5.88.08-9.25.08q43.25-74.74 86.18-149zm51.93 129.92a37.68 37.68 0 0 0 5.54-.85c1.69-.3 2.53.2 2.6 1.92 0 .11.07 19.06-.86 20.45s-1.88 1.22-2.6-.19c-5-9.69 6.22-9.66-39.12-12-.7 0-1 .23-1 .93 0 .13 3.72 122 3.73 122.11 0 .89.52 1.2 1.21 1.51a83.92 83.92 0 0 1 8.7 4.05c7.31 4.33 11.38 10.84 12.41 19.31 1.44 11.8-2.77 35.77-32.21 37.14-2.75.13-28.26 1.08-34.14-23.25-4.66-19.26 8.26-32.7 19.89-36.4a2.45 2.45 0 0 0 2-2.66c.1-5.63 3-107.1 3.71-121.35.05-1.08-.62-1.16-1.35-1.15-32.35.52-36.75-.34-40.22 8.52-2.42 6.18-4.14 1.32-3.95.23q1.59-9 3.31-18c.4-2.11 1.43-2.61 3.43-1.86 5.59 2.11 6.72 1.7 37.25 1.92 1.73 0 1.78-.08 1.82-1.85.68-27.49.58-22.59 1-29.55a2.69 2.69 0 0 0-1.63-2.8c-5.6-2.91-8.75-7.55-8.9-13.87-.35-14.81 17.72-21.67 27.38-11.51 6.84 7.19 5.8 18.91-2.45 24.15a4.35 4.35 0 0 0-2.22 4.34c0 .59-.11-4.31 1 30.05 0 .9.43 1.12 1.24 1.11.1 0 23-.09 34.47-.37zM68.27 141.7c19.84-4.51 32.68-.56 52.49 1.69 2.76.31 3.74 1.22 3.62 4-.21 5-1.16 22.33-1.24 23.15a2.65 2.65 0 0 1-1.63 2.34c-4.06 1.7-3.61-4.45-4-7.29-3.13-22.43-73.87-32.7-74.63 25.4-.31 23.92 17 53.63 54.08 50.88 27.24-2 19-20.19 24.84-20.47a2.72 2.72 0 0 1 3 3.36c-1.83 10.85-3.42 18.95-3.45 19.15-1.54 9.17-86.7 22.09-93.35-42.06-2.71-25.85 10.44-53.37 40.27-60.15zm80 87.67h-19.49a2.57 2.57 0 0 1-2.66-1.79c2.38-3.75 5.89.92 5.86-6.14-.08-25.75.21-38 .23-40.1 0-3.42-.53-4.65-3.32-4.94-7-.72-3.11-3.37-1.11-3.38 11.84-.1 22.62-.18 30.05.72 8.77 1.07 16.71 12.63 7.93 22.62-2 2.25-4 4.42-6.14 6.73.95 1.15 6.9 8.82 17.28 19.68 2.66 2.78 6.15 3.51 9.88 3.13a2.21 2.21 0 0 0 2.23-2.12c.3-3.42.26 4.73.45-40.58 0-5.65-.34-6.58-3.23-6.83-3.95-.35-4-2.26-.69-3.37l19.09-.09c.32 0 4.49.53 1 3.38 0 .05-.16 0-.24 0-3.61.26-3.94 1-4 4.62-.27 43.93.07 40.23.41 42.82.11.84.27 2.23 5.1 2.14 2.49 0 3.86 3.37 0 3.4-10.37.08-20.74 0-31.11.07-10.67 0-13.47-6.2-24.21-20.82-1.6-2.18-8.31-2.36-8.2-.37.88 16.47 0 17.78 4 17.67 4.75-.1 4.73 3.57.83 3.55zm275-10.15c-1.21 7.13.17 10.38-5.3 10.34-61.55-.42-47.82-.22-50.72-.31a18.4 18.4 0 0 1-3.63-.73c-2.53-.6 1.48-1.23-.38-5.6-1.43-3.37-2.78-6.78-4.11-10.19a1.94 1.94 0 0 0-2-1.44 138 138 0 0 0-14.58.07 2.23 2.23 0 0 0-1.62 1.06c-1.58 3.62-3.07 7.29-4.51 11-1.27 3.23 7.86 1.32 12.19 2.16 3 .57 4.53 3.72.66 3.73H322.9c-2.92 0-3.09-3.15-.74-3.21a6.3 6.3 0 0 0 5.92-3.47c1.5-3 2.8-6 4.11-9.09 18.18-42.14 17.06-40.17 18.42-41.61a1.83 1.83 0 0 1 3 0c2.93 3.34 18.4 44.71 23.62 51.92 2 2.7 5.74 2 6.36 2 3.61.13 4-1.11 4.13-4.29.09-1.87.08 1.17.07-41.24 0-4.46-2.36-3.74-5.55-4.27-.26 0-2.56-.63-.08-3.06.21-.2-.89-.24 21.7-.15 2.32 0 5.32 2.75-1.21 3.45a2.56 2.56 0 0 0-2.66 2.83c-.07 1.63-.19 38.89.29 41.21a3.06 3.06 0 0 0 3.23 2.43c13.25.43 14.92.44 16-3.41 1.67-5.78 4.13-2.52 3.73-.19zm-104.72 64.37c-4.24 0-4.42-3.39-.61-3.41 35.91-.16 28.11.38 37.19-.65 1.68-.19 2.38.24 2.25 1.89-.26 3.39-.64 6.78-1 10.16-.25 2.16-3.2 2.61-3.4-.15-.38-5.31-2.15-4.45-15.63-5.08-1.58-.07-1.64 0-1.64 1.52V304c0 1.65 0 1.6 1.62 1.47 3.12-.25 10.31.34 15.69-1.52.47-.16 3.3-1.79 3.07 1.76 0 .21-.76 10.35-1.18 11.39-.53 1.29-1.88 1.51-2.58.32-1.17-2 0-5.08-3.71-5.3-15.42-.9-12.91-2.55-12.91 6 0 12.25-.76 16.11 3.89 16.24 16.64.48 14.4 0 16.43-5.71.84-2.37 3.5-1.77 3.18.58-.44 3.21-.85 6.43-1.23 9.64 0 .36-.16 2.4-4.66 2.39-37.16-.08-34.54-.19-35.21-.31-2.72-.51-2.2-3 .22-3.45 1.1-.19 4 .54 4.16-2.56 2.44-56.22-.07-51.34-3.91-51.33zm-.41-109.52c2.46.61 3.13 1.76 2.95 4.65-.33 5.3-.34 9-.55 9.69-.66 2.23-3.15 2.12-3.34-.27-.38-4.81-3.05-7.82-7.57-9.15-26.28-7.73-32.81 15.46-27.17 30.22 5.88 15.41 22 15.92 28.86 13.78 5.92-1.85 5.88-6.5 6.91-7.58 1.23-1.3 2.25-1.84 3.12 1.1 0 .1.57 11.89-6 12.75-1.6.21-19.38 3.69-32.68-3.39-21-11.19-16.74-35.47-6.88-45.33 14-14.06 39.91-7.06 42.32-6.47zM289.8 280.14c3.28 0 3.66 3 .16 3.43-2.61.32-5-.42-5 5.46 0 2-.19 29.05.4 41.45.11 2.29 1.15 3.52 3.44 3.65 22 1.21 14.95-1.65 18.79-6.34 1.83-2.24 2.76.84 2.76 1.08.35 13.62-4 12.39-5.19 12.4l-38.16-.19c-1.93-.23-2.06-3-.42-3.38 2-.48 4.94.4 5.13-2.8 1-15.87.57-44.65.34-47.81-.27-3.77-2.8-3.27-5.68-3.71-2.47-.38-2-3.22.34-3.22 1.45-.02 17.97-.03 23.09-.02zm-31.63-57.79c.07 4.08 2.86 3.46 6 3.58 2.61.1 2.53 3.41-.07 3.43-6.48 0-13.7 0-21.61-.06-3.84 0-3.38-3.35 0-3.37 4.49 0 3.24 1.61 3.41-45.54 0-5.08-3.27-3.54-4.72-4.23-2.58-1.23-1.36-3.09.41-3.15 1.29 0 20.19-.41 21.17.21s1.87 1.65-.42 2.86c-1 .52-3.86-.28-4.15 2.47 0 .21-.82 1.63-.07 43.8zm-36.91 274.27a2.93 2.93 0 0 0 3.26 0c17-9.79 182-103.57 197.42-112.51-.14-.43 11.26-.18-181.52-.27-1.22 0-1.57.37-1.53 1.56 0 .1 1.25 44.51 1.22 50.38a28.33 28.33 0 0 1-1.36 7.71c-.55 1.83.38-.5-13.5 32.23-.73 1.72-1 2.21-2-.08-4.19-10.34-8.28-20.72-12.57-31a23.6 23.6 0 0 1-2-10.79c.16-2.46.8-16.12 1.51-48 0-1.95 0-2-2-2h-183c2.58 1.63 178.32 102.57 196 112.76zm-90.9-188.75c0 2.4.36 2.79 2.76 3 11.54 1.17 21 3.74 25.64-7.32 6-14.46 2.66-34.41-12.48-38.84-2-.59-16-2.76-15.94 1.51.05 8.04.01 11.61.02 41.65zm105.75-15.05c0 2.13 1.07 38.68 1.09 39.13.34 9.94-25.58 5.77-25.23-2.59.08-2 1.37-37.42 1.1-39.43-14.1 7.44-14.42 40.21 6.44 48.8a17.9 17.9 0 0 0 22.39-7.07c4.91-7.76 6.84-29.47-5.43-39a2.53 2.53 0 0 1-.36.12zm-12.28-198c-9.83 0-9.73 14.75-.07 14.87s10.1-14.88.07-14.91zm-80.15 103.83c0 1.8.41 2.4 2.17 2.58 13.62 1.39 12.51-11 12.16-13.36-1.69-11.22-14.38-10.2-14.35-7.81.05 4.5-.03 13.68.02 18.59zm212.32 6.4l-6.1-15.84c-2.16 5.48-4.16 10.57-6.23 15.84z\"]\n};\nconst faSitrox = {\n  prefix: 'fab',\n  iconName: 'sitrox',\n  icon: [448, 512, [], \"e44a\", \"M212.439 0.00846128V0H448V128H64C64 57.6008 141.755 0.475338 212.439 0.00846128ZM237.256 192V192.007C307.135 192.475 384 249.6 384 320H210.809V319.995C140.915 319.563 64 262.424 64 192H237.256ZM235.565 511.993C306.251 511.521 384 454.399 384 384H0V512H235.565V511.993Z\"]\n};\nconst faDiscourse = {\n  prefix: 'fab',\n  iconName: 'discourse',\n  icon: [448, 512, [], \"f393\", \"M225.9 32C103.3 32 0 130.5 0 252.1 0 256 .1 480 .1 480l225.8-.2c122.7 0 222.1-102.3 222.1-223.9C448 134.3 348.6 32 225.9 32zM224 384c-19.4 0-37.9-4.3-54.4-12.1L88.5 392l22.9-75c-9.8-18.1-15.4-38.9-15.4-61 0-70.7 57.3-128 128-128s128 57.3 128 128-57.3 128-128 128z\"]\n};\nconst faJoomla = {\n  prefix: 'fab',\n  iconName: 'joomla',\n  icon: [448, 512, [], \"f1aa\", \"M.6 92.1C.6 58.8 27.4 32 60.4 32c30 0 54.5 21.9 59.2 50.2 32.6-7.6 67.1.6 96.5 30l-44.3 44.3c-20.5-20.5-42.6-16.3-55.4-3.5-14.3 14.3-14.3 37.9 0 52.2l99.5 99.5-44 44.3c-87.7-87.2-49.7-49.7-99.8-99.7-26.8-26.5-35-64.8-24.8-98.9C20.4 144.6.6 120.7.6 92.1zm129.5 116.4l44.3 44.3c10-10 89.7-89.7 99.7-99.8 14.3-14.3 37.6-14.3 51.9 0 12.8 12.8 17 35-3.5 55.4l44 44.3c31.2-31.2 38.5-67.6 28.9-101.2 29.2-4.1 51.9-29.2 51.9-59.5 0-33.2-26.8-60.1-59.8-60.1-30.3 0-55.4 22.5-59.5 51.6-33.8-9.9-71.7-1.5-98.3 25.1-18.3 19.1-71.1 71.5-99.6 99.9zm266.3 152.2c8.2-32.7-.9-68.5-26.3-93.9-11.8-12.2 5 4.7-99.5-99.7l-44.3 44.3 99.7 99.7c14.3 14.3 14.3 37.6 0 51.9-12.8 12.8-35 17-55.4-3.5l-44 44.3c27.6 30.2 68 38.8 102.7 28 5.5 27.4 29.7 48.1 58.9 48.1 33 0 59.8-26.8 59.8-60.1 0-30.2-22.5-55-51.6-59.1zm-84.3-53.1l-44-44.3c-87 86.4-50.4 50.4-99.7 99.8-14.3 14.3-37.6 14.3-51.9 0-13.1-13.4-16.9-35.3 3.2-55.4l-44-44.3c-30.2 30.2-38 65.2-29.5 98.3-26.7 6-46.2 29.9-46.2 58.2C0 453.2 26.8 480 59.8 480c28.6 0 52.5-19.8 58.6-46.7 32.7 8.2 68.5-.6 94.2-26 32.1-32 12.2-12.4 99.5-99.7z\"]\n};\nconst faMastodon = {\n  prefix: 'fab',\n  iconName: 'mastodon',\n  icon: [448, 512, [], \"f4f6\", \"M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z\"]\n};\nconst faAirbnb = {\n  prefix: 'fab',\n  iconName: 'airbnb',\n  icon: [448, 512, [], \"f834\", \"M224 373.12c-25.24-31.67-40.08-59.43-45-83.18-22.55-88 112.61-88 90.06 0-5.45 24.25-20.29 52-45 83.18zm138.15 73.23c-42.06 18.31-83.67-10.88-119.3-50.47 103.9-130.07 46.11-200-18.85-200-54.92 0-85.16 46.51-73.28 100.5 6.93 29.19 25.23 62.39 54.43 99.5-32.53 36.05-60.55 52.69-85.15 54.92-50 7.43-89.11-41.06-71.3-91.09 15.1-39.16 111.72-231.18 115.87-241.56 15.75-30.07 25.56-57.4 59.38-57.4 32.34 0 43.4 25.94 60.37 59.87 36 70.62 89.35 177.48 114.84 239.09 13.17 33.07-1.37 71.29-37.01 86.64zm47-136.12C280.27 35.93 273.13 32 224 32c-45.52 0-64.87 31.67-84.66 72.79C33.18 317.1 22.89 347.19 22 349.81-3.22 419.14 48.74 480 111.63 480c21.71 0 60.61-6.06 112.37-62.4 58.68 63.78 101.26 62.4 112.37 62.4 62.89.05 114.85-60.86 89.61-130.19.02-3.89-16.82-38.9-16.82-39.58z\"]\n};\nconst faWolfPackBattalion = {\n  prefix: 'fab',\n  iconName: 'wolf-pack-battalion',\n  icon: [512, 512, [], \"f514\", \"M267.73 471.53l10.56 15.84 5.28-12.32 5.28 7V512c21.06-7.92 21.11-66.86 25.51-97.21 4.62-31.89-.88-92.81 81.37-149.11-8.88-23.61-12-49.43-2.64-80.05C421 189 447 196.21 456.43 239.73l-30.35 8.36c11.15 23 17 46.76 13.2 72.14L412 313.18l-6.16 33.43-18.47-7-8.8 33.39-19.35-7 26.39 21.11 8.8-28.15L419 364.2l7-35.63 26.39 14.52c.25-20 7-58.06-8.8-84.45l26.39 5.28c4-22.07-2.38-39.21-7.92-56.74l22.43 9.68c-.44-25.07-29.94-56.79-61.58-58.5-20.22-1.09-56.74-25.17-54.1-51.9 2-19.87 17.45-42.62 43.11-49.7-44 36.51-9.68 67.3 5.28 73.46 4.4-11.44 17.54-69.08 0-130.2-40.39 22.87-89.65 65.1-93.2 147.79l-58 38.71-3.52 93.25L369.78 220l7 7-17.59 3.52-44 38.71-15.84-5.28-28.1 49.25-3.52 119.64 21.11 15.84-32.55 15.84-32.55-15.84 21.11-15.84-3.52-119.64-28.15-49.26-15.84 5.28-44-38.71-17.58-3.51 7-7 107.33 59.82-3.52-93.25-58.06-38.71C185 65.1 135.77 22.87 95.3 0c-17.54 61.12-4.4 118.76 0 130.2 15-6.16 49.26-36.95 5.28-73.46 25.66 7.08 41.15 29.83 43.11 49.7 2.63 26.74-33.88 50.81-54.1 51.9-31.65 1.72-61.15 33.44-61.59 58.51l22.43-9.68c-5.54 17.53-11.91 34.67-7.92 56.74l26.39-5.28c-15.76 26.39-9.05 64.43-8.8 84.45l26.39-14.52 7 35.63 24.63-5.28 8.8 28.15L153.35 366 134 373l-8.8-33.43-18.47 7-6.16-33.43-27.27 7c-3.82-25.38 2-49.1 13.2-72.14l-30.35-8.36c9.4-43.52 35.47-50.77 63.34-54.1 9.36 30.62 6.24 56.45-2.64 80.05 82.25 56.3 76.75 117.23 81.37 149.11 4.4 30.35 4.45 89.29 25.51 97.21v-29.83l5.28-7 5.28 12.32 10.56-15.84 11.44 21.11 11.43-21.1zm79.17-95L331.06 366c7.47-4.36 13.76-8.42 19.35-12.32-.6 7.22-.27 13.84-3.51 22.84zm28.15-49.26c-.4 10.94-.9 21.66-1.76 31.67-7.85-1.86-15.57-3.8-21.11-7 8.24-7.94 15.55-16.32 22.87-24.68zm24.63 5.28c0-13.43-2.05-24.21-5.28-33.43a235 235 0 0 1-18.47 27.27zm3.52-80.94c19.44 12.81 27.8 33.66 29.91 56.3-12.32-4.53-24.63-9.31-36.95-10.56 5.06-12 6.65-28.14 7-45.74zm-1.76-45.74c.81 14.3 1.84 28.82 1.76 42.23 19.22-8.11 29.78-9.72 44-14.08-10.61-18.96-27.2-25.53-45.76-28.16zM165.68 376.52L181.52 366c-7.47-4.36-13.76-8.42-19.35-12.32.6 7.26.27 13.88 3.51 22.88zm-28.15-49.26c.4 10.94.9 21.66 1.76 31.67 7.85-1.86 15.57-3.8 21.11-7-8.24-7.93-15.55-16.31-22.87-24.67zm-24.64 5.28c0-13.43 2-24.21 5.28-33.43a235 235 0 0 0 18.47 27.27zm-3.52-80.94c-19.44 12.81-27.8 33.66-29.91 56.3 12.32-4.53 24.63-9.31 37-10.56-5-12-6.65-28.14-7-45.74zm1.76-45.74c-.81 14.3-1.84 28.82-1.76 42.23-19.22-8.11-29.78-9.72-44-14.08 10.63-18.95 27.23-25.52 45.76-28.15z\"]\n};\nconst faBuyNLarge = {\n  prefix: 'fab',\n  iconName: 'buy-n-large',\n  icon: [576, 512, [], \"f8a6\", \"M288 32C133.27 32 7.79 132.32 7.79 256S133.27 480 288 480s280.21-100.32 280.21-224S442.73 32 288 32zm-85.39 357.19L64.1 390.55l77.25-290.74h133.44c63.15 0 84.93 28.65 78 72.84a60.24 60.24 0 0 1-1.5 6.85 77.39 77.39 0 0 0-17.21-1.93c-42.35 0-76.69 33.88-76.69 75.65 0 37.14 27.14 68 62.93 74.45-18.24 37.16-56.16 60.92-117.71 61.52zM358 207.11h32l-22.16 90.31h-35.41l-11.19-35.63-7.83 35.63h-37.83l26.63-90.31h31.34l15 36.75zm145.86 182.08H306.79L322.63 328a78.8 78.8 0 0 0 11.47.83c42.34 0 76.69-33.87 76.69-75.65 0-32.65-21-60.46-50.38-71.06l21.33-82.35h92.5l-53.05 205.36h103.87zM211.7 269.39H187l-13.8 56.47h24.7c16.14 0 32.11-3.18 37.94-26.65 5.56-22.31-7.99-29.82-24.14-29.82zM233 170h-21.34L200 217.71h21.37c18 0 35.38-14.64 39.21-30.14C265.23 168.71 251.07 170 233 170z\"]\n};\nconst faGulp = {\n  prefix: 'fab',\n  iconName: 'gulp',\n  icon: [256, 512, [], \"f3ae\", \"M209.8 391.1l-14.1 24.6-4.6 80.2c0 8.9-28.3 16.1-63.1 16.1s-63.1-7.2-63.1-16.1l-5.8-79.4-14.9-25.4c41.2 17.3 126 16.7 165.6 0zm-196-253.3l13.6 125.5c5.9-20 20.8-47 40-55.2 6.3-2.7 12.7-2.7 18.7.9 5.2 3 9.6 9.3 10.1 11.8 1.2 6.5-2 9.1-4.5 9.1-3 0-5.3-4.6-6.8-7.3-4.1-7.3-10.3-7.6-16.9-2.8-6.9 5-12.9 13.4-17.1 20.7-5.1 8.8-9.4 18.5-12 28.2-1.5 5.6-2.9 14.6-.6 19.9 1 2.2 2.5 3.6 4.9 3.6 5 0 12.3-6.6 15.8-10.1 4.5-4.5 10.3-11.5 12.5-16l5.2-15.5c2.6-6.8 9.9-5.6 9.9 0 0 10.2-3.7 13.6-10 34.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2.7 8-2.7 11.7 0 3.4 3.7 2.6 6.8 1.2 2.4-1.1 4.8-2.8 6.8-4.5 1.2-4.9.9-3.8 26.4-68.2 1.3-3.3 3.7-4.7 6.1-4.7 1.2 0 2.2.4 3.2 1.1 1.7 1.3 1.7 4.1 1 6.2-.7 1.9-.6 1.3-4.5 10.5-5.2 12.1-8.6 20.8-13.2 31.9-1.9 4.6-7.7 18.9-8.7 22.3-.6 2.2-1.3 5.8 1 5.8 5.4 0 19.3-13.1 23.1-17 .2-.3.5-.4.9-.6.6-1.9 1.2-3.7 1.7-5.5 1.4-3.8 2.7-8.2 5.3-11.3.8-1 1.7-1.6 2.7-1.6 2.8 0 4.2 1.2 4.2 4 0 1.1-.7 5.1-1.1 6.2 1.4-1.5 2.9-3 4.5-4.5 15-13.9 25.7-6.8 25.7.2 0 7.4-8.9 17.7-13.8 23.4-1.6 1.9-4.9 5.4-5 6.4 0 1.3.9 1.8 2.2 1.8 2 0 6.4-3.5 8-4.7 5-3.9 11.8-9.9 16.6-14.1l14.8-136.8c-30.5 17.1-197.6 17.2-228.3.2zm229.7-8.5c0 21-231.2 21-231.2 0 0-8.8 51.8-15.9 115.6-15.9 9 0 17.8.1 26.3.4l12.6-48.7L228.1.6c1.4-1.4 5.8-.2 9.9 3.5s6.6 7.9 5.3 9.3l-.1.1L185.9 74l-10 40.7c39.9 2.6 67.6 8.1 67.6 14.6zm-69.4 4.6c0-.8-.9-1.5-2.5-2.1l-.2.8c0 1.3-5 2.4-11.1 2.4s-11.1-1.1-11.1-2.4c0-.1 0-.2.1-.3l.2-.7c-1.8.6-3 1.4-3 2.3 0 2.1 6.2 3.7 13.7 3.7 7.7.1 13.9-1.6 13.9-3.7z\"]\n};\nconst faCreativeCommonsSamplingPlus = {\n  prefix: 'fab',\n  iconName: 'creative-commons-sampling-plus',\n  icon: [496, 512, [], \"f4f1\", \"M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm107 205.6c-4.7 0-9 2.8-10.7 7.2l-4 9.5-11-92.8c-1.7-13.9-22-13.4-23.1.4l-4.3 51.4-5.2-68.8c-1.1-14.3-22.1-14.2-23.2 0l-3.5 44.9-5.9-94.3c-.9-14.5-22.3-14.4-23.2 0l-5.1 83.7-4.3-66.3c-.9-14.4-22.2-14.4-23.2 0l-5.3 80.2-4.1-57c-1.1-14.3-22-14.3-23.2-.2l-7.7 89.8-1.8-12.2c-1.7-11.4-17.1-13.6-22-3.3l-13.2 27.7H87.5v23.2h51.3c4.4 0 8.4-2.5 10.4-6.4l10.7 73.1c2 13.5 21.9 13 23.1-.7l3.8-43.6 5.7 78.3c1.1 14.4 22.3 14.2 23.2-.1l4.6-70.4 4.8 73.3c.9 14.4 22.3 14.4 23.2-.1l4.9-80.5 4.5 71.8c.9 14.3 22.1 14.5 23.2.2l4.6-58.6 4.9 64.4c1.1 14.3 22 14.2 23.1.1l6.8-83 2.7 22.3c1.4 11.8 17.7 14.1 22.3 3.1l18-43.4h50.5V258l-58.4.3zm-78 5.2h-21.9v21.9c0 4.1-3.3 7.5-7.5 7.5-4.1 0-7.5-3.3-7.5-7.5v-21.9h-21.9c-4.1 0-7.5-3.3-7.5-7.5 0-4.1 3.4-7.5 7.5-7.5h21.9v-21.9c0-4.1 3.4-7.5 7.5-7.5s7.5 3.3 7.5 7.5v21.9h21.9c4.1 0 7.5 3.3 7.5 7.5 0 4.1-3.4 7.5-7.5 7.5z\"]\n};\nconst faStrava = {\n  prefix: 'fab',\n  iconName: 'strava',\n  icon: [384, 512, [], \"f428\", \"M158.4 0L7 292h89.2l62.2-116.1L220.1 292h88.5zm150.2 292l-43.9 88.2-44.6-88.2h-67.6l112.2 220 111.5-220z\"]\n};\nconst faEmber = {\n  prefix: 'fab',\n  iconName: 'ember',\n  icon: [640, 512, [], \"f423\", \"M639.9 254.6c-1.1-10.7-10.7-6.8-10.7-6.8s-15.6 12.1-29.3 10.7c-13.7-1.3-9.4-32-9.4-32s3-28.1-5.1-30.4c-8.1-2.4-18 7.3-18 7.3s-12.4 13.7-18.3 31.2l-1.6.5s1.9-30.6-.3-37.6c-1.6-3.5-16.4-3.2-18.8 3s-14.2 49.2-15 67.2c0 0-23.1 19.6-43.3 22.8s-25-9.4-25-9.4 54.8-15.3 52.9-59.1-44.2-27.6-49-24c-4.6 3.5-29.4 18.4-36.6 59.7-.2 1.4-.7 7.5-.7 7.5s-21.2 14.2-33 18c0 0 33-55.6-7.3-80.9-11.4-6.8-21.3-.5-27.2 5.3 13.6-17.3 46.4-64.2 36.9-105.2-5.8-24.4-18-27.1-29.2-23.1-17 6.7-23.5 16.7-23.5 16.7s-22 32-27.1 79.5-12.6 105.1-12.6 105.1-10.5 10.2-20.2 10.7-5.4-28.7-5.4-28.7 7.5-44.6 7-52.1-1.1-11.6-9.9-14.2c-8.9-2.7-18.5 8.6-18.5 8.6s-25.5 38.7-27.7 44.6l-1.3 2.4-1.3-1.6s18-52.7.8-53.5-28.5 18.8-28.5 18.8-19.6 32.8-20.4 36.5l-1.3-1.6s8.1-38.2 6.4-47.6c-1.6-9.4-10.5-7.5-10.5-7.5s-11.3-1.3-14.2 5.9-13.7 55.3-15 70.7c0 0-28.2 20.2-46.8 20.4-18.5.3-16.7-11.8-16.7-11.8s68-23.3 49.4-69.2c-8.3-11.8-18-15.5-31.7-15.3-13.7.3-30.3 8.6-41.3 33.3-5.3 11.8-6.8 23-7.8 31.5 0 0-12.3 2.4-18.8-2.9s-10 0-10 0-11.2 14-.1 18.3 28.1 6.1 28.1 6.1c1.6 7.5 6.2 19.5 19.6 29.7 20.2 15.3 58.8-1.3 58.8-1.3l15.9-8.8s.5 14.6 12.1 16.7 16.4 1 36.5-47.9c11.8-25 12.6-23.6 12.6-23.6l1.3-.3s-9.1 46.8-5.6 59.7C187.7 319.4 203 318 203 318s8.3 2.4 15-21.2 19.6-49.9 19.6-49.9h1.6s-5.6 48.1 3 63.7 30.9 5.3 30.9 5.3 15.6-7.8 18-10.2c0 0 18.5 15.8 44.6 12.9 58.3-11.5 79.1-25.9 79.1-25.9s10 24.4 41.1 26.7c35.5 2.7 54.8-18.6 54.8-18.6s-.3 13.5 12.1 18.6 20.7-22.8 20.7-22.8l20.7-57.2h1.9s1.1 37.3 21.5 43.2 47-13.7 47-13.7 6.4-3.5 5.3-14.3zm-578 5.3c.8-32 21.8-45.9 29-39 7.3 7 4.6 22-9.1 31.4-13.7 9.5-19.9 7.6-19.9 7.6zm272.8-123.8s19.1-49.7 23.6-25.5-40 96.2-40 96.2c.5-16.2 16.4-70.7 16.4-70.7zm22.8 138.4c-12.6 33-43.3 19.6-43.3 19.6s-3.5-11.8 6.4-44.9 33.3-20.2 33.3-20.2 16.2 12.4 3.6 45.5zm84.6-14.6s-3-10.5 8.1-30.6c11-20.2 19.6-9.1 19.6-9.1s9.4 10.2-1.3 25.5-26.4 14.2-26.4 14.2z\"]\n};\nconst faCanadianMapleLeaf = {\n  prefix: 'fab',\n  iconName: 'canadian-maple-leaf',\n  icon: [512, 512, [], \"f785\", \"M383.8 351.7c2.5-2.5 105.2-92.4 105.2-92.4l-17.5-7.5c-10-4.9-7.4-11.5-5-17.4 2.4-7.6 20.1-67.3 20.1-67.3s-47.7 10-57.7 12.5c-7.5 2.4-10-2.5-12.5-7.5s-15-32.4-15-32.4-52.6 59.9-55.1 62.3c-10 7.5-20.1 0-17.6-10 0-10 27.6-129.6 27.6-129.6s-30.1 17.4-40.1 22.4c-7.5 5-12.6 5-17.6-5C293.5 72.3 255.9 0 255.9 0s-37.5 72.3-42.5 79.8c-5 10-10 10-17.6 5-10-5-40.1-22.4-40.1-22.4S183.3 182 183.3 192c2.5 10-7.5 17.5-17.6 10-2.5-2.5-55.1-62.3-55.1-62.3S98.1 167 95.6 172s-5 9.9-12.5 7.5C73 177 25.4 167 25.4 167s17.6 59.7 20.1 67.3c2.4 6 5 12.5-5 17.4L23 259.3s102.6 89.9 105.2 92.4c5.1 5 10 7.5 5.1 22.5-5.1 15-10.1 35.1-10.1 35.1s95.2-20.1 105.3-22.6c8.7-.9 18.3 2.5 18.3 12.5S241 512 241 512h30s-5.8-102.7-5.8-112.8 9.5-13.4 18.4-12.5c10 2.5 105.2 22.6 105.2 22.6s-5-20.1-10-35.1 0-17.5 5-22.5z\"]\n};\nconst faTeamspeak = {\n  prefix: 'fab',\n  iconName: 'teamspeak',\n  icon: [576, 512, [], \"f4f9\", \"M152.8 37.2c-32.2 38.1-56.1 82.6-69.9 130.5c0 .2-.1 .3-.1 .5C43.5 184.4 16 223 16 268c0 59.6 48.4 108 108 108s108-48.4 108-108c0-53.5-38.9-97.9-90-106.5c15.7-41.8 40.4-79.6 72.3-110.7c1.8-1.6 4-2.6 6.3-3.1c37.2-11.5 76.7-13.3 114.8-5.2C454.7 67.6 534 180.7 517.1 301.3c-8.4 62.6-38.6 112.7-87.7 151.4c-50.1 39.7-107.5 54.3-170.2 52.2l-24-1c12.4 2.8 25 4.9 37.6 6.3c40.7 4.2 81.4 2.1 120.1-12.5c94-35.5 149.3-102.3 162.9-202.5c4.8-52.6-5.8-105.4-30.8-152C454.6 11.3 290.8-38.4 159 32c-2.4 1.4-4.5 3.1-6.3 5.2zM309.4 433.9c-2.1 11.5-4.2 21.9-14.6 31.3c53.2-1 123.2-29.2 161.8-97.1c39.7-69.9 37.6-139.9-6.3-207.8C413.8 105 360.5 77.9 293.7 73.7c1.5 2.3 3.2 4.4 5.2 6.3l5.2 6.3c25.1 31.3 37.6 67.9 42.8 107.5c2.1 15.7-1 30.3-13.6 41.8c-4.2 3.1-5.2 6.3-4.2 10.4l7.3 17.7L365.7 318c5.2 11.5 4.2 19.8-6.3 28.2c-3.2 2.5-6.7 4.6-10.4 6.3l-18.8 8.4 3.1 13.6c3.1 6.3 1 12.5-3.1 17.7c-2.5 2.4-3.8 5.9-3.1 9.4c2.1 11.5-2.1 19.8-12.5 25.1c-2.1 1-4.2 5.2-5.2 7.3zm-133.6-3.1c16.7 11.5 34.5 20.9 53.2 26.1c24 5.2 41.8-6.3 44.9-30.3c1-8.4 5.2-14.6 12.5-17.7c7.3-4.2 8.4-7.3 2.1-13.6l-9.4-8.4 13.6-4.2c6.3-2.1 7.3-5.2 5.2-11.5c-1.4-3-2.4-6.2-3.1-9.4c-3.1-14.6-2.1-15.7 11.5-18.8c8.4-3.1 15.7-6.3 21.9-12.5c3.1-2.1 3.1-4.2 1-8.4l-16.7-30.3c-1-1.9-2.1-3.8-3.1-5.7c-6.4-11.7-13-23.6-15.7-37.1c-2.1-9.4-1-17.7 8.4-24c5.2-4.2 8.4-9.4 8.4-16.7c-.4-10.1-1.5-20.3-3.1-30.3c-6.3-37.6-23-68.9-51.2-95c-5.2-4.2-9.4-6.3-16.7-4.2L203.9 91.5c2 1.2 4 2.4 6 3.6l0 0c6.3 3.7 12.2 7.3 17 12.1c30.3 26.1 41.8 61.6 45.9 100.2c1 8.4 0 16.7-7.3 21.9c-8.4 5.2-10.4 12.5-7.3 20.9c4.9 13.2 10.4 26 16.7 38.6L291.6 318c-6.3 8.4-13.6 11.5-21.9 14.6c-12.5 3.1-14.6 7.3-10.4 20.9c.6 1.5 1.4 2.8 2.1 4.2c2.1 5.2 1 8.4-4.2 10.4l-12.5 3.1 5.2 4.2 4.2 4.2c4.2 5.2 4.2 8.4-2.1 10.4c-7.3 4.2-11.5 9.4-11.5 17.7c0 12.5-7.3 19.8-18.8 24c-3.8 1-7.6 1.5-11.5 1l-34.5-2.1z\"]\n};\nconst faPushed = {\n  prefix: 'fab',\n  iconName: 'pushed',\n  icon: [432, 512, [], \"f3e1\", \"M407 111.9l-98.5-9 14-33.4c10.4-23.5-10.8-40.4-28.7-37L22.5 76.9c-15.1 2.7-26 18.3-21.4 36.6l105.1 348.3c6.5 21.3 36.7 24.2 47.7 7l35.3-80.8 235.2-231.3c16.4-16.8 4.3-42.9-17.4-44.8zM297.6 53.6c5.1-.7 7.5 2.5 5.2 7.4L286 100.9 108.6 84.6l189-31zM22.7 107.9c-3.1-5.1 1-10 6.1-9.1l248.7 22.7-96.9 230.7L22.7 107.9zM136 456.4c-2.6 4-7.9 3.1-9.4-1.2L43.5 179.7l127.7 197.6c-7 15-35.2 79.1-35.2 79.1zm272.8-314.5L210.1 337.3l89.7-213.7 106.4 9.7c4 1.1 5.7 5.3 2.6 8.6z\"]\n};\nconst faWordpressSimple = {\n  prefix: 'fab',\n  iconName: 'wordpress-simple',\n  icon: [512, 512, [], \"f411\", \"M256 8C119.3 8 8 119.2 8 256c0 136.7 111.3 248 248 248s248-111.3 248-248C504 119.2 392.7 8 256 8zM33 256c0-32.3 6.9-63 19.3-90.7l106.4 291.4C84.3 420.5 33 344.2 33 256zm223 223c-21.9 0-43-3.2-63-9.1l66.9-194.4 68.5 187.8c.5 1.1 1 2.1 1.6 3.1-23.1 8.1-48 12.6-74 12.6zm30.7-327.5c13.4-.7 25.5-2.1 25.5-2.1 12-1.4 10.6-19.1-1.4-18.4 0 0-36.1 2.8-59.4 2.8-21.9 0-58.7-2.8-58.7-2.8-12-.7-13.4 17.7-1.4 18.4 0 0 11.4 1.4 23.4 2.1l34.7 95.2L200.6 393l-81.2-241.5c13.4-.7 25.5-2.1 25.5-2.1 12-1.4 10.6-19.1-1.4-18.4 0 0-36.1 2.8-59.4 2.8-4.2 0-9.1-.1-14.4-.3C109.6 73 178.1 33 256 33c58 0 110.9 22.2 150.6 58.5-1-.1-1.9-.2-2.9-.2-21.9 0-37.4 19.1-37.4 39.6 0 18.4 10.6 33.9 21.9 52.3 8.5 14.8 18.4 33.9 18.4 61.5 0 19.1-7.3 41.2-17 72.1l-22.2 74.3-80.7-239.6zm81.4 297.2l68.1-196.9c12.7-31.8 17-57.2 17-79.9 0-8.2-.5-15.8-1.5-22.9 17.4 31.8 27.3 68.2 27.3 107 0 82.3-44.6 154.1-110.9 192.7z\"]\n};\nconst faNutritionix = {\n  prefix: 'fab',\n  iconName: 'nutritionix',\n  icon: [400, 512, [], \"f3d6\", \"M88 8.1S221.4-.1 209 112.5c0 0 19.1-74.9 103-40.6 0 0-17.7 74-88 56 0 0 14.6-54.6 66.1-56.6 0 0-39.9-10.3-82.1 48.8 0 0-19.8-94.5-93.6-99.7 0 0 75.2 19.4 77.6 107.5 0 .1-106.4 7-104-119.8zm312 315.6c0 48.5-9.7 95.3-32 132.3-42.2 30.9-105 48-168 48-62.9 0-125.8-17.1-168-48C9.7 419 0 372.2 0 323.7 0 275.3 17.7 229 40 192c42.2-30.9 97.1-48.6 160-48.6 63 0 117.8 17.6 160 48.6 22.3 37 40 83.3 40 131.7zM120 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zM192 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zM264 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zM336 428c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm0-66.2c0-15.5-12.5-28-28-28s-28 12.5-28 28 12.5 28 28 28 28-12.5 28-28zm24-39.6c-4.8-22.3-7.4-36.9-16-56-38.8-19.9-90.5-32-144-32S94.8 180.1 56 200c-8.8 19.5-11.2 33.9-16 56 42.2-7.9 98.7-14.8 160-14.8s117.8 6.9 160 14.8z\"]\n};\nconst faWodu = {\n  prefix: 'fab',\n  iconName: 'wodu',\n  icon: [640, 512, [], \"e088\", \"M178.414 339.706H141.1L112.166 223.475h-.478L83.228 339.706H45.2L0 168.946H37.548L64.574 285.177h.478L94.707 168.946h35.157l29.178 117.667h.479L187.5 168.946h36.831zM271.4 212.713c38.984 0 64.1 25.828 64.1 65.291 0 39.222-25.111 65.05-64.1 65.05-38.743 0-63.855-25.828-63.855-65.05C207.547 238.541 232.659 212.713 271.4 212.713zm0 104.753c23.2 0 30.133-19.852 30.133-39.462 0-19.852-6.934-39.7-30.133-39.7-27.7 0-29.894 19.85-29.894 39.7C241.508 297.614 248.443 317.466 271.4 317.466zM435.084 323.922h-.478c-7.893 13.392-21.765 19.132-37.548 19.132-37.31 0-55.485-32.045-55.485-66.246 0-33.243 18.415-64.095 54.767-64.095 14.589 0 28.938 6.218 36.831 18.416h.24V168.946h33.96v170.76H435.084zM405.428 238.3c-22.24 0-29.894 19.134-29.894 39.463 0 19.371 8.848 39.7 29.894 39.7 22.482 0 29.178-19.613 29.178-39.94C434.606 257.436 427.432 238.3 405.428 238.3zM592.96 339.706H560.673V322.487h-.718c-8.609 13.87-23.436 20.567-37.786 20.567-36.113 0-45.2-20.328-45.2-50.941V216.061h33.959V285.9c0 20.329 5.979 30.372 21.765 30.372 18.415 0 26.306-10.283 26.306-35.393V216.061H592.96zM602.453 302.876H640v36.83H602.453z\"]\n};\nconst faGooglePay = {\n  prefix: 'fab',\n  iconName: 'google-pay',\n  icon: [640, 512, [], \"e079\", \"M105.72,215v41.25h57.1a49.66,49.66,0,0,1-21.14,32.6c-9.54,6.55-21.72,10.28-36,10.28-27.6,0-50.93-18.91-59.3-44.22a65.61,65.61,0,0,1,0-41l0,0c8.37-25.46,31.7-44.37,59.3-44.37a56.43,56.43,0,0,1,40.51,16.08L176.47,155a101.24,101.24,0,0,0-70.75-27.84,105.55,105.55,0,0,0-94.38,59.11,107.64,107.64,0,0,0,0,96.18v.15a105.41,105.41,0,0,0,94.38,59c28.47,0,52.55-9.53,70-25.91,20-18.61,31.41-46.15,31.41-78.91A133.76,133.76,0,0,0,205.38,215Zm389.41-4c-10.13-9.38-23.93-14.14-41.39-14.14-22.46,0-39.34,8.34-50.5,24.86l20.85,13.26q11.45-17,31.26-17a34.05,34.05,0,0,1,22.75,8.79A28.14,28.14,0,0,1,487.79,248v5.51c-9.1-5.07-20.55-7.75-34.64-7.75-16.44,0-29.65,3.88-39.49,11.77s-14.82,18.31-14.82,31.56a39.74,39.74,0,0,0,13.94,31.27c9.25,8.34,21,12.51,34.79,12.51,16.29,0,29.21-7.3,39-21.89h1v17.72h22.61V250C510.25,233.45,505.26,220.34,495.13,211ZM475.9,300.3a37.32,37.32,0,0,1-26.57,11.16A28.61,28.61,0,0,1,431,305.21a19.41,19.41,0,0,1-7.77-15.63c0-7,3.22-12.81,9.54-17.42s14.53-7,24.07-7C470,265,480.3,268,487.64,273.94,487.64,284.07,483.68,292.85,475.9,300.3Zm-93.65-142A55.71,55.71,0,0,0,341.74,142H279.07V328.74H302.7V253.1h39c16,0,29.5-5.36,40.51-15.93.88-.89,1.76-1.79,2.65-2.68A54.45,54.45,0,0,0,382.25,158.26Zm-16.58,62.23a30.65,30.65,0,0,1-23.34,9.68H302.7V165h39.63a32,32,0,0,1,22.6,9.23A33.18,33.18,0,0,1,365.67,220.49ZM614.31,201,577.77,292.7h-.45L539.9,201H514.21L566,320.55l-29.35,64.32H561L640,201Z\"]\n};\nconst faIntercom = {\n  prefix: 'fab',\n  iconName: 'intercom',\n  icon: [448, 512, [], \"f7af\", \"M392 32H56C25.1 32 0 57.1 0 88v336c0 30.9 25.1 56 56 56h336c30.9 0 56-25.1 56-56V88c0-30.9-25.1-56-56-56zm-108.3 82.1c0-19.8 29.9-19.8 29.9 0v199.5c0 19.8-29.9 19.8-29.9 0V114.1zm-74.6-7.5c0-19.8 29.9-19.8 29.9 0v216.5c0 19.8-29.9 19.8-29.9 0V106.6zm-74.7 7.5c0-19.8 29.9-19.8 29.9 0v199.5c0 19.8-29.9 19.8-29.9 0V114.1zM59.7 144c0-19.8 29.9-19.8 29.9 0v134.3c0 19.8-29.9 19.8-29.9 0V144zm323.4 227.8c-72.8 63-241.7 65.4-318.1 0-15-12.8 4.4-35.5 19.4-22.7 65.9 55.3 216.1 53.9 279.3 0 14.9-12.9 34.3 9.8 19.4 22.7zm5.2-93.5c0 19.8-29.9 19.8-29.9 0V144c0-19.8 29.9-19.8 29.9 0v134.3z\"]\n};\nconst faZhihu = {\n  prefix: 'fab',\n  iconName: 'zhihu',\n  icon: [640, 512, [], \"f63f\", \"M170.54 148.13v217.54l23.43.01 7.71 26.37 42.01-26.37h49.53V148.13H170.54zm97.75 193.93h-27.94l-27.9 17.51-5.08-17.47-11.9-.04V171.75h72.82v170.31zm-118.46-94.39H97.5c1.74-27.1 2.2-51.59 2.2-73.46h51.16s1.97-22.56-8.58-22.31h-88.5c3.49-13.12 7.87-26.66 13.12-40.67 0 0-24.07 0-32.27 21.57-3.39 8.9-13.21 43.14-30.7 78.12 5.89-.64 25.37-1.18 36.84-22.21 2.11-5.89 2.51-6.66 5.14-14.53h28.87c0 10.5-1.2 66.88-1.68 73.44H20.83c-11.74 0-15.56 23.62-15.56 23.62h65.58C66.45 321.1 42.83 363.12 0 396.34c20.49 5.85 40.91-.93 51-9.9 0 0 22.98-20.9 35.59-69.25l53.96 64.94s7.91-26.89-1.24-39.99c-7.58-8.92-28.06-33.06-36.79-41.81L87.9 311.95c4.36-13.98 6.99-27.55 7.87-40.67h61.65s-.09-23.62-7.59-23.62v.01zm412.02-1.6c20.83-25.64 44.98-58.57 44.98-58.57s-18.65-14.8-27.38-4.06c-6 8.15-36.83 48.2-36.83 48.2l19.23 14.43zm-150.09-59.09c-9.01-8.25-25.91 2.13-25.91 2.13s39.52 55.04 41.12 57.45l19.46-13.73s-25.67-37.61-34.66-45.86h-.01zM640 258.35c-19.78 0-130.91.93-131.06.93v-101c4.81 0 12.42-.4 22.85-1.2 40.88-2.41 70.13-4 87.77-4.81 0 0 12.22-27.19-.59-33.44-3.07-1.18-23.17 4.58-23.17 4.58s-165.22 16.49-232.36 18.05c1.6 8.82 7.62 17.08 15.78 19.55 13.31 3.48 22.69 1.7 49.15.89 24.83-1.6 43.68-2.43 56.51-2.43v99.81H351.41s2.82 22.31 25.51 22.85h107.94v70.92c0 13.97-11.19 21.99-24.48 21.12-14.08.11-26.08-1.15-41.69-1.81 1.99 3.97 6.33 14.39 19.31 21.84 9.88 4.81 16.17 6.57 26.02 6.57 29.56 0 45.67-17.28 44.89-45.31v-73.32h122.36c9.68 0 8.7-23.78 8.7-23.78l.03-.01z\"]\n};\nconst faKorvue = {\n  prefix: 'fab',\n  iconName: 'korvue',\n  icon: [446, 512, [], \"f42f\", \"M386.5 34h-327C26.8 34 0 60.8 0 93.5v327.1C0 453.2 26.8 480 59.5 480h327.1c33 0 59.5-26.8 59.5-59.5v-327C446 60.8 419.2 34 386.5 34zM87.1 120.8h96v116l61.8-116h110.9l-81.2 132H87.1v-132zm161.8 272.1l-65.7-113.6v113.6h-96V262.1h191.5l88.6 130.8H248.9z\"]\n};\nconst faPix = {\n  prefix: 'fab',\n  iconName: 'pix',\n  icon: [512, 512, [], \"e43a\", \"M242.4 292.5C247.8 287.1 257.1 287.1 262.5 292.5L339.5 369.5C353.7 383.7 372.6 391.5 392.6 391.5H407.7L310.6 488.6C280.3 518.1 231.1 518.1 200.8 488.6L103.3 391.2H112.6C132.6 391.2 151.5 383.4 165.7 369.2L242.4 292.5zM262.5 218.9C256.1 224.4 247.9 224.5 242.4 218.9L165.7 142.2C151.5 127.1 132.6 120.2 112.6 120.2H103.3L200.7 22.76C231.1-7.586 280.3-7.586 310.6 22.76L407.8 119.9H392.6C372.6 119.9 353.7 127.7 339.5 141.9L262.5 218.9zM112.6 142.7C126.4 142.7 139.1 148.3 149.7 158.1L226.4 234.8C233.6 241.1 243 245.6 252.5 245.6C261.9 245.6 271.3 241.1 278.5 234.8L355.5 157.8C365.3 148.1 378.8 142.5 392.6 142.5H430.3L488.6 200.8C518.9 231.1 518.9 280.3 488.6 310.6L430.3 368.9H392.6C378.8 368.9 365.3 363.3 355.5 353.5L278.5 276.5C264.6 262.6 240.3 262.6 226.4 276.6L149.7 353.2C139.1 363 126.4 368.6 112.6 368.6H80.78L22.76 310.6C-7.586 280.3-7.586 231.1 22.76 200.8L80.78 142.7H112.6z\"]\n};\nconst faSteamSymbol = {\n  prefix: 'fab',\n  iconName: 'steam-symbol',\n  icon: [448, 512, [], \"f3f6\", \"M395.5 177.5c0 33.8-27.5 61-61 61-33.8 0-61-27.3-61-61s27.3-61 61-61c33.5 0 61 27.2 61 61zm52.5.2c0 63-51 113.8-113.7 113.8L225 371.3c-4 43-40.5 76.8-84.5 76.8-40.5 0-74.7-28.8-83-67L0 358V250.7L97.2 290c15.1-9.2 32.2-13.3 52-11.5l71-101.7c.5-62.3 51.5-112.8 114-112.8C397 64 448 115 448 177.7zM203 363c0-34.7-27.8-62.5-62.5-62.5-4.5 0-9 .5-13.5 1.5l26 10.5c25.5 10.2 38 39 27.7 64.5-10.2 25.5-39.2 38-64.7 27.5-10.2-4-20.5-8.3-30.7-12.2 10.5 19.7 31.2 33.2 55.2 33.2 34.7 0 62.5-27.8 62.5-62.5zm207.5-185.3c0-42-34.3-76.2-76.2-76.2-42.3 0-76.5 34.2-76.5 76.2 0 42.2 34.3 76.2 76.5 76.2 41.9.1 76.2-33.9 76.2-76.2z\"]\n};\nvar icons = {\n  faMonero,\n  faHooli,\n  faYelp,\n  faCcVisa,\n  faLastfm,\n  faShopware,\n  faCreativeCommonsNc,\n  faAws,\n  faRedhat,\n  faYoast,\n  faCloudflare,\n  faUps,\n  faPixiv,\n  faWpexplorer,\n  faDyalog,\n  faBity,\n  faStackpath,\n  faBuysellads,\n  faFirstOrder,\n  faModx,\n  faGuilded,\n  faVnv,\n  faSquareJs,\n  faJsSquare,\n  faMicrosoft,\n  faQq,\n  faOrcid,\n  faJava,\n  faInvision,\n  faCreativeCommonsPdAlt,\n  faCentercode,\n  faGlideG,\n  faDrupal,\n  faJxl,\n  faDartLang,\n  faHireAHelper,\n  faCreativeCommonsBy,\n  faUnity,\n  faWhmcs,\n  faRocketchat,\n  faVk,\n  faUntappd,\n  faMailchimp,\n  faCss3Alt,\n  faSquareReddit,\n  faRedditSquare,\n  faVimeoV,\n  faContao,\n  faSquareFontAwesome,\n  faDeskpro,\n  faBrave,\n  faSistrix,\n  faSquareInstagram,\n  faInstagramSquare,\n  faBattleNet,\n  faTheRedYeti,\n  faSquareHackerNews,\n  faHackerNewsSquare,\n  faEdge,\n  faThreads,\n  faNapster,\n  faSquareSnapchat,\n  faSnapchatSquare,\n  faGooglePlusG,\n  faArtstation,\n  faMarkdown,\n  faSourcetree,\n  faGooglePlus,\n  faDiaspora,\n  faFoursquare,\n  faStackOverflow,\n  faGithubAlt,\n  faPhoenixSquadron,\n  faPagelines,\n  faAlgolia,\n  faRedRiver,\n  faCreativeCommonsSa,\n  faSafari,\n  faGoogle,\n  faSquareFontAwesomeStroke,\n  faFontAwesomeAlt,\n  faAtlassian,\n  faLinkedinIn,\n  faDigitalOcean,\n  faNimblr,\n  faChromecast,\n  faEvernote,\n  faHackerNews,\n  faCreativeCommonsSampling,\n  faAdversal,\n  faCreativeCommons,\n  faWatchmanMonitoring,\n  faFonticons,\n  faWeixin,\n  faShirtsinbulk,\n  faCodepen,\n  faGitAlt,\n  faLyft,\n  faRev,\n  faWindows,\n  faWizardsOfTheCoast,\n  faSquareViadeo,\n  faViadeoSquare,\n  faMeetup,\n  faCentos,\n  faAdn,\n  faCloudsmith,\n  faOpensuse,\n  faPiedPiperAlt,\n  faSquareDribbble,\n  faDribbbleSquare,\n  faCodiepie,\n  faNode,\n  faMix,\n  faSteam,\n  faCcApplePay,\n  faScribd,\n  faDebian,\n  faOpenid,\n  faInstalod,\n  faFilesPinwheel,\n  faExpeditedssl,\n  faSellcast,\n  faSquareTwitter,\n  faTwitterSquare,\n  faRProject,\n  faDelicious,\n  faFreebsd,\n  faVuejs,\n  faAccusoft,\n  faIoxhost,\n  faFonticonsFi,\n  faAppStore,\n  faCcMastercard,\n  faItunesNote,\n  faGolang,\n  faKickstarter,\n  faSquareKickstarter,\n  faGrav,\n  faWeibo,\n  faUncharted,\n  faFirstdraft,\n  faSquareYoutube,\n  faYoutubeSquare,\n  faWikipediaW,\n  faWpressr,\n  faRendact,\n  faAngellist,\n  faGalacticRepublic,\n  faNfcDirectional,\n  faSkype,\n  faJoget,\n  faFedora,\n  faStripeS,\n  faMeta,\n  faLaravel,\n  faHotjar,\n  faBluetoothB,\n  faSquareLetterboxd,\n  faStickerMule,\n  faCreativeCommonsZero,\n  faHips,\n  faCss,\n  faBehance,\n  faReddit,\n  faDiscord,\n  faChrome,\n  faAppStoreIos,\n  faCcDiscover,\n  faWpbeginner,\n  faConfluence,\n  faShoelace,\n  faMdb,\n  faDochub,\n  faAccessibleIcon,\n  faEbay,\n  faAmazon,\n  faUnsplash,\n  faYarn,\n  faSquareSteam,\n  faSteamSquare,\n  fa500px,\n  faSquareVimeo,\n  faVimeoSquare,\n  faAsymmetrik,\n  faFontAwesome,\n  faFontAwesomeFlag,\n  faFontAwesomeLogoFull,\n  faGratipay,\n  faApple,\n  faHive,\n  faGitkraken,\n  faKeybase,\n  faApplePay,\n  faPadlet,\n  faAmazonPay,\n  faSquareGithub,\n  faGithubSquare,\n  faStumbleupon,\n  faFedex,\n  faPhoenixFramework,\n  faShopify,\n  faNeos,\n  faSquareThreads,\n  faHackerrank,\n  faResearchgate,\n  faSwift,\n  faAngular,\n  faSpeakap,\n  faAngrycreative,\n  faYCombinator,\n  faEmpire,\n  faEnvira,\n  faGoogleScholar,\n  faSquareGitlab,\n  faGitlabSquare,\n  faStudiovinari,\n  faPiedPiper,\n  faWordpress,\n  faProductHunt,\n  faFirefox,\n  faLinode,\n  faGoodreads,\n  faSquareOdnoklassniki,\n  faOdnoklassnikiSquare,\n  faJsfiddle,\n  faSith,\n  faThemeisle,\n  faPage4,\n  faHashnode,\n  faReact,\n  faCcPaypal,\n  faSquarespace,\n  faCcStripe,\n  faCreativeCommonsShare,\n  faBitcoin,\n  faKeycdn,\n  faOpera,\n  faItchIo,\n  faUmbraco,\n  faGalacticSenate,\n  faUbuntu,\n  faDraft2digital,\n  faStripe,\n  faHouzz,\n  faGg,\n  faDhl,\n  faSquarePinterest,\n  faPinterestSquare,\n  faXing,\n  faBlackberry,\n  faCreativeCommonsPd,\n  faPlaystation,\n  faQuinscape,\n  faLess,\n  faBloggerB,\n  faOpencart,\n  faVine,\n  faSignalMessenger,\n  faPaypal,\n  faGitlab,\n  faTypo3,\n  faRedditAlien,\n  faYahoo,\n  faDailymotion,\n  faAffiliatetheme,\n  faPiedPiperPp,\n  faBootstrap,\n  faOdnoklassniki,\n  faNfcSymbol,\n  faMintbit,\n  faEthereum,\n  faSpeakerDeck,\n  faCreativeCommonsNcEu,\n  faPatreon,\n  faAvianex,\n  faEllo,\n  faGofore,\n  faBimobject,\n  faBraveReverse,\n  faFacebookF,\n  faSquareGooglePlus,\n  faGooglePlusSquare,\n  faWebAwesome,\n  faMandalorian,\n  faFirstOrderAlt,\n  faOsi,\n  faGoogleWallet,\n  faDAndDBeyond,\n  faPeriscope,\n  faFulcrum,\n  faCloudscale,\n  faForumbee,\n  faMizuni,\n  faSchlix,\n  faSquareXing,\n  faXingSquare,\n  faBandcamp,\n  faWpforms,\n  faCloudversify,\n  faUsps,\n  faMegaport,\n  faMagento,\n  faSpotify,\n  faOptinMonster,\n  faFly,\n  faSquareBluesky,\n  faAviato,\n  faItunes,\n  faCuttlefish,\n  faBlogger,\n  faFlickr,\n  faViber,\n  faSoundcloud,\n  faDigg,\n  faTencentWeibo,\n  faLetterboxd,\n  faSymfony,\n  faMaxcdn,\n  faEtsy,\n  faFacebookMessenger,\n  faAudible,\n  faThinkPeaks,\n  faBilibili,\n  faErlang,\n  faXTwitter,\n  faCottonBureau,\n  faDashcube,\n  fa42Group,\n  faInnosoft,\n  faStackExchange,\n  faElementor,\n  faSquarePiedPiper,\n  faPiedPiperSquare,\n  faCreativeCommonsNd,\n  faPalfed,\n  faSuperpowers,\n  faResolving,\n  faXbox,\n  faSquareWebAwesomeStroke,\n  faSearchengin,\n  faTiktok,\n  faSquareFacebook,\n  faFacebookSquare,\n  faRenren,\n  faLinux,\n  faGlide,\n  faLinkedin,\n  faHubspot,\n  faDeploydog,\n  faTwitch,\n  faFlutter,\n  faRavelry,\n  faMixer,\n  faSquareLastfm,\n  faLastfmSquare,\n  faVimeo,\n  faMendeley,\n  faUniregistry,\n  faFigma,\n  faCreativeCommonsRemix,\n  faCcAmazonPay,\n  faDropbox,\n  faInstagram,\n  faCmplid,\n  faUpwork,\n  faFacebook,\n  faGripfire,\n  faJediOrder,\n  faUikit,\n  faFortAwesomeAlt,\n  faPhabricator,\n  faUssunnah,\n  faEarlybirds,\n  faTradeFederation,\n  faAutoprefixer,\n  faWhatsapp,\n  faSquareUpwork,\n  faSlideshare,\n  faGooglePlay,\n  faViadeo,\n  faLine,\n  faGoogleDrive,\n  faServicestack,\n  faSimplybuilt,\n  faBitbucket,\n  faImdb,\n  faDeezer,\n  faRaspberryPi,\n  faJira,\n  faDocker,\n  faScreenpal,\n  faBluetooth,\n  faGitter,\n  faDAndD,\n  faMicroblog,\n  faCcDinersClub,\n  faGgCircle,\n  faPiedPiperHat,\n  faKickstarterK,\n  faYandex,\n  faReadme,\n  faHtml5,\n  faSellsy,\n  faSquareWebAwesome,\n  faSass,\n  faWirsindhandwerk,\n  faWsh,\n  faBuromobelexperte,\n  faSalesforce,\n  faOctopusDeploy,\n  faMedapps,\n  faNs8,\n  faPinterestP,\n  faApper,\n  faFortAwesome,\n  faWaze,\n  faBluesky,\n  faCcJcb,\n  faSnapchat,\n  faSnapchatGhost,\n  faFantasyFlightGames,\n  faRust,\n  faWix,\n  faSquareBehance,\n  faBehanceSquare,\n  faSupple,\n  faWebflow,\n  faRebel,\n  faCss3,\n  faStaylinked,\n  faKaggle,\n  faSpaceAwesome,\n  faDeviantart,\n  faCpanel,\n  faGoodreadsG,\n  faSquareGit,\n  faGitSquare,\n  faSquareTumblr,\n  faTumblrSquare,\n  faTrello,\n  faCreativeCommonsNcJp,\n  faGetPocket,\n  faPerbyte,\n  faGrunt,\n  faWeebly,\n  faConnectdevelop,\n  faLeanpub,\n  faBlackTie,\n  faThemeco,\n  faPython,\n  faAndroid,\n  faBots,\n  faFreeCodeCamp,\n  faHornbill,\n  faJs,\n  faIdeal,\n  faGit,\n  faDev,\n  faSketch,\n  faYandexInternational,\n  faCcAmex,\n  faUber,\n  faGithub,\n  faPhp,\n  faAlipay,\n  faYoutube,\n  faSkyatlas,\n  faFirefoxBrowser,\n  faReplyd,\n  faSuse,\n  faJenkins,\n  faTwitter,\n  faRockrms,\n  faPinterest,\n  faBuffer,\n  faNpm,\n  faYammer,\n  faBtc,\n  faDribbble,\n  faStumbleuponCircle,\n  faInternetExplorer,\n  faStubber,\n  faTelegram,\n  faTelegramPlane,\n  faOldRepublic,\n  faOdysee,\n  faSquareWhatsapp,\n  faWhatsappSquare,\n  faNodeJs,\n  faEdgeLegacy,\n  faSlack,\n  faSlackHash,\n  faMedrt,\n  faUsb,\n  faTumblr,\n  faVaadin,\n  faQuora,\n  faSquareXTwitter,\n  faReacteurope,\n  faMedium,\n  faMediumM,\n  faAmilia,\n  faMixcloud,\n  faFlipboard,\n  faViacoin,\n  faCriticalRole,\n  faSitrox,\n  faDiscourse,\n  faJoomla,\n  faMastodon,\n  faAirbnb,\n  faWolfPackBattalion,\n  faBuyNLarge,\n  faGulp,\n  faCreativeCommonsSamplingPlus,\n  faStrava,\n  faEmber,\n  faCanadianMapleLeaf,\n  faTeamspeak,\n  faPushed,\n  faWordpressSimple,\n  faNutritionix,\n  faWodu,\n  faGooglePay,\n  faIntercom,\n  faZhihu,\n  faKorvue,\n  faPix,\n  faSteamSymbol\n};\n\nexport { icons as fab, prefix, faMonero, faHooli, faYelp, faCcVisa, faLastfm, faShopware, faCreativeCommonsNc, faAws, faRedhat, faYoast, faCloudflare, faUps, faPixiv, faWpexplorer, faDyalog, faBity, faStackpath, faBuysellads, faFirstOrder, faModx, faGuilded, faVnv, faSquareJs, faJsSquare, faMicrosoft, faQq, faOrcid, faJava, faInvision, faCreativeCommonsPdAlt, faCentercode, faGlideG, faDrupal, faJxl, faDartLang, faHireAHelper, faCreativeCommonsBy, faUnity, faWhmcs, faRocketchat, faVk, faUntappd, faMailchimp, faCss3Alt, faSquareReddit, faRedditSquare, faVimeoV, faContao, faSquareFontAwesome, faDeskpro, faBrave, faSistrix, faSquareInstagram, faInstagramSquare, faBattleNet, faTheRedYeti, faSquareHackerNews, faHackerNewsSquare, faEdge, faThreads, faNapster, faSquareSnapchat, faSnapchatSquare, faGooglePlusG, faArtstation, faMarkdown, faSourcetree, faGooglePlus, faDiaspora, faFoursquare, faStackOverflow, faGithubAlt, faPhoenixSquadron, faPagelines, faAlgolia, faRedRiver, faCreativeCommonsSa, faSafari, faGoogle, faSquareFontAwesomeStroke, faFontAwesomeAlt, faAtlassian, faLinkedinIn, faDigitalOcean, faNimblr, faChromecast, faEvernote, faHackerNews, faCreativeCommonsSampling, faAdversal, faCreativeCommons, faWatchmanMonitoring, faFonticons, faWeixin, faShirtsinbulk, faCodepen, faGitAlt, faLyft, faRev, faWindows, faWizardsOfTheCoast, faSquareViadeo, faViadeoSquare, faMeetup, faCentos, faAdn, faCloudsmith, faOpensuse, faPiedPiperAlt, faSquareDribbble, faDribbbleSquare, faCodiepie, faNode, faMix, faSteam, faCcApplePay, faScribd, faDebian, faOpenid, faInstalod, faFilesPinwheel, faExpeditedssl, faSellcast, faSquareTwitter, faTwitterSquare, faRProject, faDelicious, faFreebsd, faVuejs, faAccusoft, faIoxhost, faFonticonsFi, faAppStore, faCcMastercard, faItunesNote, faGolang, faKickstarter, faSquareKickstarter, faGrav, faWeibo, faUncharted, faFirstdraft, faSquareYoutube, faYoutubeSquare, faWikipediaW, faWpressr, faRendact, faAngellist, faGalacticRepublic, faNfcDirectional, faSkype, faJoget, faFedora, faStripeS, faMeta, faLaravel, faHotjar, faBluetoothB, faSquareLetterboxd, faStickerMule, faCreativeCommonsZero, faHips, faCss, faBehance, faReddit, faDiscord, faChrome, faAppStoreIos, faCcDiscover, faWpbeginner, faConfluence, faShoelace, faMdb, faDochub, faAccessibleIcon, faEbay, faAmazon, faUnsplash, faYarn, faSquareSteam, faSteamSquare, fa500px, faSquareVimeo, faVimeoSquare, faAsymmetrik, faFontAwesome, faFontAwesomeFlag, faFontAwesomeLogoFull, faGratipay, faApple, faHive, faGitkraken, faKeybase, faApplePay, faPadlet, faAmazonPay, faSquareGithub, faGithubSquare, faStumbleupon, faFedex, faPhoenixFramework, faShopify, faNeos, faSquareThreads, faHackerrank, faResearchgate, faSwift, faAngular, faSpeakap, faAngrycreative, faYCombinator, faEmpire, faEnvira, faGoogleScholar, faSquareGitlab, faGitlabSquare, faStudiovinari, faPiedPiper, faWordpress, faProductHunt, faFirefox, faLinode, faGoodreads, faSquareOdnoklassniki, faOdnoklassnikiSquare, faJsfiddle, faSith, faThemeisle, faPage4, faHashnode, faReact, faCcPaypal, faSquarespace, faCcStripe, faCreativeCommonsShare, faBitcoin, faKeycdn, faOpera, faItchIo, faUmbraco, faGalacticSenate, faUbuntu, faDraft2digital, faStripe, faHouzz, faGg, faDhl, faSquarePinterest, faPinterestSquare, faXing, faBlackberry, faCreativeCommonsPd, faPlaystation, faQuinscape, faLess, faBloggerB, faOpencart, faVine, faSignalMessenger, faPaypal, faGitlab, faTypo3, faRedditAlien, faYahoo, faDailymotion, faAffiliatetheme, faPiedPiperPp, faBootstrap, faOdnoklassniki, faNfcSymbol, faMintbit, faEthereum, faSpeakerDeck, faCreativeCommonsNcEu, faPatreon, faAvianex, faEllo, faGofore, faBimobject, faBraveReverse, faFacebookF, faSquareGooglePlus, faGooglePlusSquare, faWebAwesome, faMandalorian, faFirstOrderAlt, faOsi, faGoogleWallet, faDAndDBeyond, faPeriscope, faFulcrum, faCloudscale, faForumbee, faMizuni, faSchlix, faSquareXing, faXingSquare, faBandcamp, faWpforms, faCloudversify, faUsps, faMegaport, faMagento, faSpotify, faOptinMonster, faFly, faSquareBluesky, faAviato, faItunes, faCuttlefish, faBlogger, faFlickr, faViber, faSoundcloud, faDigg, faTencentWeibo, faLetterboxd, faSymfony, faMaxcdn, faEtsy, faFacebookMessenger, faAudible, faThinkPeaks, faBilibili, faErlang, faXTwitter, faCottonBureau, faDashcube, fa42Group, faInnosoft, faStackExchange, faElementor, faSquarePiedPiper, faPiedPiperSquare, faCreativeCommonsNd, faPalfed, faSuperpowers, faResolving, faXbox, faSquareWebAwesomeStroke, faSearchengin, faTiktok, faSquareFacebook, faFacebookSquare, faRenren, faLinux, faGlide, faLinkedin, faHubspot, faDeploydog, faTwitch, faFlutter, faRavelry, faMixer, faSquareLastfm, faLastfmSquare, faVimeo, faMendeley, faUniregistry, faFigma, faCreativeCommonsRemix, faCcAmazonPay, faDropbox, faInstagram, faCmplid, faUpwork, faFacebook, faGripfire, faJediOrder, faUikit, faFortAwesomeAlt, faPhabricator, faUssunnah, faEarlybirds, faTradeFederation, faAutoprefixer, faWhatsapp, faSquareUpwork, faSlideshare, faGooglePlay, faViadeo, faLine, faGoogleDrive, faServicestack, faSimplybuilt, faBitbucket, faImdb, faDeezer, faRaspberryPi, faJira, faDocker, faScreenpal, faBluetooth, faGitter, faDAndD, faMicroblog, faCcDinersClub, faGgCircle, faPiedPiperHat, faKickstarterK, faYandex, faReadme, faHtml5, faSellsy, faSquareWebAwesome, faSass, faWirsindhandwerk, faWsh, faBuromobelexperte, faSalesforce, faOctopusDeploy, faMedapps, faNs8, faPinterestP, faApper, faFortAwesome, faWaze, faBluesky, faCcJcb, faSnapchat, faSnapchatGhost, faFantasyFlightGames, faRust, faWix, faSquareBehance, faBehanceSquare, faSupple, faWebflow, faRebel, faCss3, faStaylinked, faKaggle, faSpaceAwesome, faDeviantart, faCpanel, faGoodreadsG, faSquareGit, faGitSquare, faSquareTumblr, faTumblrSquare, faTrello, faCreativeCommonsNcJp, faGetPocket, faPerbyte, faGrunt, faWeebly, faConnectdevelop, faLeanpub, faBlackTie, faThemeco, faPython, faAndroid, faBots, faFreeCodeCamp, faHornbill, faJs, faIdeal, faGit, faDev, faSketch, faYandexInternational, faCcAmex, faUber, faGithub, faPhp, faAlipay, faYoutube, faSkyatlas, faFirefoxBrowser, faReplyd, faSuse, faJenkins, faTwitter, faRockrms, faPinterest, faBuffer, faNpm, faYammer, faBtc, faDribbble, faStumbleuponCircle, faInternetExplorer, faStubber, faTelegram, faTelegramPlane, faOldRepublic, faOdysee, faSquareWhatsapp, faWhatsappSquare, faNodeJs, faEdgeLegacy, faSlack, faSlackHash, faMedrt, faUsb, faTumblr, faVaadin, faQuora, faSquareXTwitter, faReacteurope, faMedium, faMediumM, faAmilia, faMixcloud, faFlipboard, faViacoin, faCriticalRole, faSitrox, faDiscourse, faJoomla, faMastodon, faAirbnb, faWolfPackBattalion, faBuyNLarge, faGulp, faCreativeCommonsSamplingPlus, faStrava, faEmber, faCanadianMapleLeaf, faTeamspeak, faPushed, faWordpressSimple, faNutritionix, faWodu, faGooglePay, faIntercom, faZhihu, faKorvue, faPix, faSteamSymbol };\n", "import {library, dom} from '@fortawesome/fontawesome-svg-core'\nimport {fas} from '@fortawesome/free-solid-svg-icons'\nimport {far} from '@fortawesome/free-regular-svg-icons'\nimport {fab} from '@fortawesome/free-brands-svg-icons'\n\ndocument.addEventListener('DOMContentLoaded', function (_event) {\n    library.add(fas, far, fab)\n    dom.watch()\n})\n", "window.printIframe = function printIframe(iframeId) {\n    try {\n        let iframe = document.getElementById(iframeId)\n        if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {\n            iframe.contentWindow.focus()\n            iframe.contentWindow.print()\n        } else {\n            iframe.contentWindow.document.execCommand('print', false, null)\n        }\n    } catch (_error) {\n        window.print()\n    }\n}\n", "const REFOCUS_ANNOUNCE_HOLD_MS = 1500\n\nconst TOOLBAR_SAFETY_MARGIN_PX = 50\nconst BOTTOM_SAFETY_MARGIN_PX = 50\nconst SETTLE_RECHECK_DELAYS_MS = [150, 450, 900]\n\nwindow.__a11yAnnounceNotBefore = 0\n\nwindow.a11yHoldAnnouncements = function (ms) {\n    window.__a11yAnnounceNotBefore = Math.max(window.__a11yAnnounceNotBefore, performance.now() + ms)\n}\n\nwindow.a11yAnnounceDelay = function (minimum = 300) {\n    return Math.max(minimum, window.__a11yAnnounceNotBefore - performance.now())\n}\n\nfunction getTopOffset() {\n    const toolbar = document.querySelector('nav.navbar.sticky-top, nav.navbar.fixed-top')\n    const height = toolbar ? toolbar.getBoundingClientRect().height : 0\n    return height + TOOLBAR_SAFETY_MARGIN_PX\n}\n\nfunction getBottomOffset() {\n    return BOTTOM_SAFETY_MARGIN_PX\n}\n\nfunction getScrollParent(element) {\n    let node = element.parentElement\n    while (node && node !== document.body && node !== document.documentElement) {\n        const {overflowY} = window.getComputedStyle(node)\n        if (/(auto|scroll)/.test(overflowY) && node.scrollHeight > node.clientHeight) return node\n        node = node.parentElement\n    }\n    return null\n}\n\nfunction resolveElement(element) {\n    if (element && element.isConnected) return element\n    if (element && element.id) return document.getElementById(element.id)\n    return null\n}\n\nfunction scrollByInstantly(scroller, delta) {\n    const root = document.documentElement\n    const target = scroller || root\n    const previous = target.style.scrollBehavior\n\n    target.style.scrollBehavior = 'auto'\n    if (scroller) {\n        scroller.scrollTop += delta\n    } else {\n        window.scrollTo(window.scrollX, window.scrollY + delta)\n    }\n    target.style.scrollBehavior = previous\n}\n\nfunction scrollElementIntoViewRespectingToolbar(element) {\n    element = resolveElement(element)\n    if (!element) return\n\n    const rect = element.getBoundingClientRect()\n    if (rect.width === 0 && rect.height === 0) return\n\n    const topOffset = getTopOffset()\n    const bottomOffset = getBottomOffset()\n    const viewportHeight = window.visualViewport ? window.visualViewport.height : window.innerHeight\n    const scroller = getScrollParent(element)\n\n    let delta = 0\n    if (rect.top < topOffset) {\n        delta = rect.top - topOffset\n    } else if (rect.bottom > viewportHeight - bottomOffset) {\n        delta = rect.bottom - (viewportHeight - bottomOffset)\n    }\n    if (delta === 0) return\n\n    scrollByInstantly(scroller, delta)\n}\n\nfunction getFocusResetContainer(element) {\n    const target = resolveElement(element)\n    return (target && target.closest('.modal')) || document.querySelector('.modal.show') || document.body\n}\n\nfunction ensureFocusResetElement(container) {\n    let resetElement = window.__a11yFocusResetElement\n\n    if (resetElement && resetElement.parentElement === container && container.contains(resetElement)) {\n        return resetElement\n    }\n    if (resetElement && resetElement.parentElement) resetElement.parentElement.removeChild(resetElement)\n\n    resetElement = document.createElement('div')\n    resetElement.setAttribute('tabindex', '-1')\n    resetElement.setAttribute('aria-hidden', 'true')\n    Object.assign(resetElement.style, {\n        position: 'absolute',\n        width: '1px',\n        height: '1px',\n        overflow: 'hidden',\n        clip: 'rect(0 0 0 0)',\n        whiteSpace: 'nowrap'\n    })\n    container.appendChild(resetElement)\n    window.__a11yFocusResetElement = resetElement\n    return resetElement\n}\n\nwindow.refocusAndScrollIntoView = function (element) {\n    if (!element) return\n\n    window.a11yHoldAnnouncements(REFOCUS_ANNOUNCE_HOLD_MS)\n\n    const resetElement = ensureFocusResetElement(getFocusResetContainer(element))\n\n    scrollElementIntoViewRespectingToolbar(element)\n\n    resetElement.focus({preventScroll: true})\n\n    requestAnimationFrame(() => {\n        requestAnimationFrame(() => {\n            const target = resolveElement(element)\n            if (!target) return\n\n            scrollElementIntoViewRespectingToolbar(target)\n            target.focus({preventScroll: true})\n\n            SETTLE_RECHECK_DELAYS_MS.forEach((delay) => {\n                setTimeout(() => {\n                    if (document.activeElement === target) {\n                        scrollElementIntoViewRespectingToolbar(target)\n                    }\n                }, delay)\n            })\n        })\n    })\n}\n\ndocument.addEventListener('ajax:beforeSend', function () {\n    window.__lastFocusedElement = document.activeElement\n})", "// Reads native form validation errors (required, min, max, pattern, setCustomValidity, ...) to screen reader users.\n// Works for every form, including ones using validation_controller.js, because that controller also only sets\n// native validation rules. Nothing is shown on the page; the browser keeps showing its own validation bubble.\n//\n// How it works:\n// 1. When a form is submitted with invalid fields, the browser fires an 'invalid' event on every invalid field and\n//    then moves the focus to the first one.\n// 2. We mark the field as invalid (aria-invalid) and put the browser's error text into aria-description.\n//    Screen readers read aria-description together with the field, e.g. \"Name, edit, invalid, Please fill out ...\".\n// 3. As soon as the user fixes the field, both attributes are removed again.\n\n// For the screen reader, this attribute holds the error text. It also tells us which fields we have marked.\nconst ERROR_ATTRIBUTE = 'aria-description'\n\n// Step 1 + 2: a field failed validation.\n// 'invalid' does not bubble up to the document, so we listen in the capture phase (the third argument \"true\").\ndocument.addEventListener('invalid', (event) => {\n    const field = event.target\n    field.setAttribute('aria-invalid', 'true')\n\n    // If the error text were added directly, the screen reader would read it twice: once with the focus and once more\n    // because the field's description \"changed\". Adding it after the focus announcement reads it exactly once.\n    setTimeout(() => {\n        if (!field.validity.valid) field.setAttribute(ERROR_ATTRIBUTE, field.validationMessage)\n    }, 300)\n}, true)\n\n// Step 3: after every change in any form, update the error text of all marked fields, or remove it once they are\n// valid. All marked fields are checked (not only the changed one), because a change can also fix other fields,\n// e.g. choosing one radio button fixes the whole radio group.\nfunction updateMarkedFields() {\n    document.querySelectorAll(`[${ERROR_ATTRIBUTE}]`).forEach((field) => {\n        if (field.validity.valid) {\n            field.removeAttribute(ERROR_ATTRIBUTE)\n            field.removeAttribute('aria-invalid')\n        } else {\n            field.setAttribute(ERROR_ATTRIBUTE, field.validationMessage)\n        }\n    })\n}\n\ndocument.addEventListener('input', updateMarkedFields)\ndocument.addEventListener('change', updateMarkedFields)\n", "// Reads the transition text of submit buttons (data-disable-with, e.g. \"Saving...\") to screen reader users.\n\ndocument.addEventListener('submit', (event) => {\n    const form = event.target\n    // form.elements also contains buttons outside the form that are linked with the form=\"...\" attribute\n    const button = [event.submitter, ...form.elements].find((el) => el?.matches('[data-disable-with]'))\n    if (!button) return\n\n    // data-disable-with contains HTML (icon + text), we only need the text\n    const template = document.createElement('template')\n    template.innerHTML = button.dataset.disableWith\n    const message = template.content.textContent\n    if (!message) return\n\n    const announcer = document.getElementById('sr-announcer')\n    // The text must differ from the previous one, otherwise the screen reader announces nothing on a second submit\n    // without page reload (AJAX). So we append a non-breaking space every second time, which is not read aloud.\n    // We announce immediately (no timeout), so the text is read before rails-ujs disables the button and it loses focus.\n    announcer.textContent = announcer.textContent === message ? `${message}\\u00A0` : message\n})\n", "// Entry point for the build script in your package.json\nimport Rails from '@rails/ujs'\n// import Turbolinks from 'turbolinks'\n// import * as ActiveStorage from '@rails/activestorage'\nimport './channels'\n\nRails.start()\nwindow.Rails = Rails\n// Turbolinks.start()\n// ActiveStorage.start()\n\nimport { Turbo } from \"@hotwired/turbo-rails\"\nTurbo.session.drive = false\nimport './controllers'\nimport './components/font_awesome'\nimport './components/utility/print_iframe'\nimport './components/utility/a11y_focus_helpers'\nimport './components/utility/a11y_validation_announcer'\nimport './components/utility/a11y_submit_announcer'\n\ndocument.addEventListener('DOMContentLoaded', function (_event) {\n    // Placeholder\n})\n"],
  "mappings": "q9CAAA,IAAOA,GAAPC,GAAAC,GAAA,KAAOF,GAAQ,CACb,OAAQ,OAAO,QAAY,IAAc,QAAU,OACnD,UAAW,OAAO,UAAc,IAAc,UAAY,MAC5D,ICHA,IAcOG,GAdPC,GAAAC,GAAA,KAAAC,KAcOH,GAAQ,CACb,OAAOI,EAAU,CACX,KAAK,UACPA,EAAS,KAAK,KAAK,IAAI,CAAC,EACxBC,GAAS,OAAO,IAAI,gBAAiB,GAAGD,CAAQ,EAEpD,CACF,ICrBA,IAKME,GAEAC,GAEAC,GAkHCC,GA3HPC,GAAAC,GAAA,KAAAC,KAKMN,GAAM,IAAM,IAAI,KAAK,EAAE,QAAQ,EAE/BC,GAAeM,IAASP,GAAI,EAAIO,GAAQ,IAExCL,GAAN,KA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M,IACP,GAED,UAAA,CAAaA,EAAYC,KACjB,CACN,IAAKD,EAAW,IAAMC,EAAU,OAChC,KAAMD,EAAW,KACjB,KAAM,IACP,GAED,UAAA,CAAaA,EAAYC,KACjB,CACN,IAAKD,EAAW,IAAMC,EAAU,OAChC,KAAMD,EAAW,KAAOC,EAAU,MAAQD,EAAW,MACrD,KAAM,IACP,GAED,UAAWA,IACH,CACN,IAAKA,EAAW,IAChB,KAAMA,EAAW,MAAQvB,GACzB,KAAM,IACP,GAED,UAAA,CAAauB,EAAYC,KACjB,CACN,IAAKD,EAAW,IAAMC,EAAU,OAChC,KAAMD,EAAW,MAAQvB,GACzB,KAAM,IACP,GAED,UAAA,CAAauB,EAAYC,KACjB,CACN,IAAKD,EAAW,IAChB,KAAMA,EAAW,KAAOC,EAAU,MAAQxB,GAC1C,KAAM,IACP,GAED,UAAA,CAAauB,EAAYC,KACjB,CACN,IAAKD,EAAW,IAAMC,EAAU,OAChC,KAAMD,EAAW,KAAOC,EAAU,MAAQxB,GAC1C,KAAM,IACP,EAEF,EAiSayB,IAAsD,CAClE,CACC,OAAQ,OACR,MAAO,OACP,OAAQ,CACP,CACC,QAAS,SACT,MAAO,CACN,oBACA,oBACD,CACD,EACA,CACC,QAAS,SACT,MAAO,CACN,oBACD,CACD,EACA,CACC,QAAS,kBACT,MAAO,CACN,yBACD,CACD,CACD,CACD,EACA,CACC,OAAQ,OACR,MAAO,OACP,OAAQ,CACP,CACC,QAAS,OACT,MAAO,CACN,eACA,cACD,CACD,EACA,CACC,QAAS,YACT,MAAO,CACN,mBACD,CACD,EACA,CACC,QAAS,iBACT,MAAO,CACN,wBACD,CACD,CACD,CACD,EACA,CACC,OAAQ,OACR,MAAO,OACP,OAAQ,CACP,CACC,QAAS,wBACT,MAAO,CACN,+BACD,CACD,EACA,CACC,QAAS,gBACT,MAAO,CACN,uBACD,CACD,EACA,CACC,QAAS,aACT,MAAO,CACN,oBACD,CACD,EACA,CACC,QAAS,qBACT,MAAO,CACN,4BACD,CACD,EACA,CACC,QAAS,aACT,MAAO,CACN,oBACD,CACD,EACA,CACC,QAAS,oBACT,MAAO,CACN,2BACD,CACD,CACD,CACD,EACA,CACC,OAAQ,SACR,MAAO,SACP,OAAQ,CACP,CACC,QAAS,oBACT,MAAO,CACN,sBACA,gBACA,mBACA,sBACA,2BACD,CACD,EACA,CACC,QAAS,eACT,MAAO,CACN,eACA,yBACA,mBACA,kBACA,2BACA,eACD,CACD,EACA,CACC,QAAS,qBACT,MAAO,CACN,qBACA,yBACA,4BACA,qBACA,oBACA,mBACD,CACD,EACA,CACC,QAAS,yBACT,MAAO,CACN,yBACA,oBACA,yBACD,CACD,EACA,CACC,QAAS,6BACT,MAAO,CACN,4CACA,0CACD,CACD,CACD,CACD,EACA,CACC,OAAQ,SACR,MAAO,SACP,OAAQ,CACP,CACC,QAAS,cACT,MAAO,CACN,CACC,OAAQ,OACR,MAAO,OACP,OAAQ,CACP,CACC,QAAS,cACT,MAAO,CACN,eACA,iBACA,oBACA,wBACA,sBACA,oBACA,cACD,CACD,EACA,CACC,QAAS,mBACT,MAAO,CACN,0BACD,CACD,CACD,CACD,EACA,CACC,OAAQ,OACR,MAAO,OACP,OAAQ,CACP,CACC,QAAS,iBACT,MAAO,CACN,mBACA,oBACD,CACD,EACA,CACC,QAAS,aACT,MAAO,CACN,oBACA,6BACD,CACD,EACA,CACC,QAAS,YACT,MAAO,CACN,mBACD,CACD,CACD,CACD,EACA,iBACD,CACD,EACA,CACC,QAAS,OACT,MAAO,CACN,uBACA,uBACA,yBACA,kBACD,CACD,EACA,CACC,QAAS,SACT,MAAO,CACN,oBACA,qBACA,iBACA,iBACD,CACD,EACA,CACC,QAAS,aACT,MAAO,CACN,oBACD,CACD,EACA,CACC,QAAS,eACT,MAAO,CACN,sBACD,CACD,CACD,CACD,EACA,CACC,OAAQ,QACR,MAAO,QACP,OAAQ,CACP,CACC,QAAS,UACT,MAAO,CACN,sBACA,qBACA,mBACA,wBACD,CACD,EACA,C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_default", "now", "secondsSince", "ConnectionMonitor", "connection_monitor_default", "init_connection_monitor", "__esmMin", "init_logger", "time", "connection", "logger_default", "staleThreshold", "reconnectionBackoffRate", "backoff", "jitter", "internal_default", "init_internal", "__esmMin", "message_types", "protocols", "supportedProtocols", "indexOf", "Connection", "connection_default", "init_connection", "__esmMin", "init_adapters", "init_connection_monitor", "init_internal", "init_logger", "internal_default", "consumer", "connection_monitor_default", "data", "logger_default", "socketProtocols", "adapters_default", "allowReconnect", "error", "states", "state", "eventName", "handler", "event", "identifier", "message", "reason", "reconnect", "type", "extend", "Subscription", "init_subscription", "__esmMin", "object", "properties", "key", "value", "consumer", "params", "mixin", "action", "data", "SubscriptionGuarantor", "subscription_guarantor_default", "init_subscription_guarantor", "__esmMin", "init_logger", "subscriptions", "subscription", "logger_default", "s", "Subscriptions", "init_subscriptions", "__esmMin", "init_subscription", "init_subscription_guarantor", "init_logger", "consumer", "subscription_guarantor_default", "channelName", "mixin", "channel", "params", "subscription", "Subscription", "identifier", "s", "callbackName", "args", "subscriptions", "logger_default", "command", "createWebSocketURL", "url", "a", "Consumer", "init_consumer", "__esmMin", "init_connection", "init_subscriptions", "Subscriptions", "connection_default", "data", "subprotocol", "src_exports", "__export", "connection_default", "connection_monitor_default", "Consumer", "internal_default", "Subscription", "subscription_guarantor_default", "Subscriptions", "adapters_default", "createConsumer", "createWebSocketURL", "getConfig", "logger_default", "url", "name", "element", "init_src", "__esmMin", "init_connection", "init_connection_monitor", "init_consumer", "init_internal", "init_subscription", "init_subscriptions", "init_subscription_guarantor", "init_adapters", "init_logger", "require_doT", "__commonJSMin", "exports", "module", "doT", "template", "compile", "setDelimiters", "encoderType", "defaultSyntax", "currentSyntax", "TYPES", "resolveDefs", "c", "syn", "block", "def", "_", "code", "assign", "value", "param", "v", "s", "d", "rw", "unescape", "tmpl", "ds", "sameDelimiters", "getSyntax", "sid", "str", "needEncoders", "typ", "val", "error", "enc", "e", "elseCase", "arr", "vName", "iName", "defI", "incI", "args", "properties", "try_", "checkEncoders", "addEncoders", "f", "start", "end", "delimiters", "escape", "syntax", "strToRegExp", "escapeCharacters", "regexpPattern", "rx", "flags", "a", "i", "encoders", "require_debounce", "__commonJSMin", "exports", "module", "debounce", "func", "wait", "immediate", "timeout", "args", "context", "timestamp", "result", "later", "last", "debounced", "callNow", "insertReplacement", "source", "rx", "replacement", "newParts", "chunk", "raw", "i", "list", "interpolate", "phrase", "options", "dollarRegex", "dollarBillsYall", "interpolated", "arg", "defaultOnMissingKey", "_onMissingKey", "_Translator_instances", "apply_fn", "Translator", "init_Translator", "__esmMin", "key", "locales", "onMissingKey", "__privateAdd", "__publicField", "__privateMethod", "__privateSet", "string", "__privateGet", "plural", "locale", "prevLocale", "BasePlugin", "init_BasePlugin", "__esmMin", "init_Translator", "uppy", "opts", "__publicField", "plugins", "update", "newOpts", "translator", "Translator", "plugin", "state", "pad", "number", "getTimeStamp", "date", "hours", "minutes", "seconds", "init_getTimeStamp", "__esmMin", "justErrorsLogger", "debugLogger", "init_loggers", "__esmMin", "init_getTimeStamp", "args", "getTimeStamp", "isDOMElement", "obj", "init_isDOMElement", "__esmMin", "findDOMElement", "element", "context", "isDOMElement", "findDOMElement_default", "init_findDOMElement", "__esmMin", "init_isDOMElement", "getTextDirection", "element", "getTextDirection_default", "init_getTextDirection", "__esmMin", "assign", "obj", "props", "i", "removeNode", "node", "parentNode", "removeChild", "createElement", "type", "children", "key", "ref", "normalizedProps", "arguments", "length", "slice", "call", "defaultProps", "createVNode", "original", "vnode", "__k", "__", "__b", "__e", "__c", "constructor", "__v", "vnodeId", "__i", "__u", "options", "Fragment", "BaseComponent", "context", "this", "getDomSibling", "childIndex", "sibling", "renderComponent", "component", "__P", "__d", "oldVNode", "oldDom", "commitQueue", "refQueue", "newVNode", "diff", "__n", "namespaceURI", "commitRoot", "updateParentDomPointers", "base", "some", "child", "enqueueRender", "c", "rerenderQueue", "push", "process", "__r", "prevDebounce", "debounceRendering", "defer", "l", "sort", "depthSort", "shift", "diffChildren", "parentDom", "renderResult", "newParentVNode", "oldParentVNode", "globalContext", "namespace", "excessDomChildren", "isHydrating", "childVNode", "newDom", "firstChildDom", "result", "shouldPlace", "oldChildren", "EMPTY_ARR", "newChildrenLength", "constructNewChildrenArray", "EMPTY_OBJ", "applyRef", "insert", "nextSibling", "skewedIndex", "matchingIndex", "oldChildrenLength", "remainingOldChildren", "skew", "Array", "String", "isArray", "findMatchingIndex", "unmount", "parentVNode", "insertBefore", "nodeType", "toChildArray", "out", "x", "y", "matched", "shouldSearch", "setStyle", "style", "value", "setProperty", "IS_NON_DIMENSIONAL", "test", "dom", "name", "oldValue", "useCapture", "lowerCaseName", "o", "cssText", "replace", "CAPTURE_REGEX", "toLowerCase", "_attached", "eventClock", "addEventListener", "eventProxyCapture", "eventProxy", "removeEventListener", "e", "removeAttribute", "setAttribute", "createEventProxy", "eventHandler", "_dispatched", "event", "tmp", "isNew", "oldProps", "oldState", "snapshot", "clearProcessingException", "newProps", "isClassComponent", "provider", "componentContext", "renderHook", "count", "newType", "outer", "prototype", "render", "contextType", "__E", "doRender", "sub", "state", "__h", "_sb", "__s", "getDerivedStateFromProps", "componentWillMount", "componentDidMount", "componentWillReceiveProps", "shouldComponentUpdate", "apply", "componentWillUpdate", "componentDidUpdate", "getChildContext", "getSnapshotBeforeUpdate", "cloneNode", "then", "MODE_HYDRATE", "indexOf", "markAsForce", "diffElementNodes", "diffed", "root", "cb", "map", "newHtml", "oldHtml", "newChildren", "inputValue", "checked", "localName", "document", "createTextNode", "createElementNS", "is", "__m", "data", "childNodes", "attributes", "__html", "innerHTML", "content", "undefined", "hasRefUnmount", "current", "skipRemove", "r", "componentWillUnmount", "replaceNode", "documentElement", "firstChild", "isValidElement", "init_preact_module", "__esmMin", "error", "errorInfo", "ctor", "handled", "getDerivedStateFromError", "setState", "componentDidCatch", "update", "callback", "s", "forceUpdate", "Promise", "bind", "resolve", "setTimeout", "a", "b", "flushAfterPaintEffects", "component", "afterPaintEffects", "shift", "hooks", "__H", "__P", "__h", "some", "invokeCleanup", "invokeEffect", "e", "options", "__e", "__v", "afterNextFrame", "callback", "raf", "done", "clearTimeout", "timeout", "HAS_RAF", "cancelAnimationFrame", "setTimeout", "requestAnimationFrame", "hook", "comp", "currentComponent", "cleanup", "__c", "__", "currentIndex", "previousComponent", "prevRaf", "oldBeforeDiff", "oldBeforeRender", "oldAfterDiff", "oldCommit", "oldBeforeUnmount", "oldRoot", "_options", "__b", "__r", "diffed", "unmount", "vnode", "parentDom", "__k", "__m", "hookItem", "__N", "_pendingArgs", "c", "length", "push", "commitQueue", "filter", "cb", "hasErrored", "s", "assign", "obj", "props", "i", "shallowDiffers", "a", "b", "useLayoutEffect", "PureComponent", "p", "c", "this", "context", "detachedClone", "vnode", "detachedParent", "parentDom", "__c", "__H", "__", "forEach", "effect", "__P", "__e", "__k", "map", "child", "removeOriginal", "originalParent", "__v", "appendChild", "Suspense", "__u", "_suspenders", "__b", "suspended", "component", "__a", "SuspenseList", "_next", "_map", "render", "parent", "callback", "textContent", "preactRender", "oldDiffHook", "REACT_FORWARD_SYMBOL", "oldCatchError", "oldUnmount", "resolve", "REACT_ELEMENT_TYPE", "CAMEL_PROPS", "ON_ANI", "CAMEL_REPLACE", "IS_DOM", "onChangeInputType", "oldEventHook", "currentComponent", "classNameDescriptorNonEnumberable", "oldVNodeHook", "oldBeforeRender", "oldDiffed", "prototype", "Component", "isPureReactComponent", "shouldComponentUpdate", "state", "options", "type", "__f", "ref", "Symbol", "for", "error", "newVNode", "oldVNode", "errorInfo", "then", "unmount", "__z", "__R", "promise", "suspendingVNode", "suspendingComponent", "push", "resolved", "onResolved", "onSuspensionComplete", "originalParentDom", "suspendedVNode", "__O", "setState", "pop", "forceUpdate", "componentWillUnmount", "document", "createElement", "detachedComponent", "fallback", "Fragment", "children", "list", "node", "delete", "revealOrder", "size", "length", "delegated", "get", "unsuspend", "wrappedUnsuspend", "Map", "toChildArray", "reverse", "set", "componentDidUpdate", "componentDidMount", "_this", "test", "isReactComponent", "key", "Object", "defineProperty", "configurable", "v", "writable", "value", "event", "e", "persist", "isPropagationStopped", "cancelBubble", "isDefaultPrevented", "defaultPrevented", "nativeEvent", "class", "normalizedProps", "isNonDashedType", "indexOf", "lowerCased", "toLowerCase", "replace", "multiple", "Array", "isArray", "selected", "defaultValue", "className", "$$typeof", "__r", "diffed", "dom", "debounce", "fn", "calling", "latestArgs", "args", "_updateUI", "_UIPlugin", "UIPlugin", "UIPlugin_default", "init_UIPlugin", "__esmMin", "init_findDOMElement", "init_getTextDirection", "init_compat_module", "init_BasePlugin", "BasePlugin", "__privateAdd", "__publicField", "target", "targetPlugin", "Target", "p", "plugin", "callerPluginName", "targetElement", "findDOMElement_default", "uppyRootElement", "__privateSet", "state", "nn", "getTextDirection_default", "message", "container", "_a", "__privateGet", "package_default", "init_package", "__esmMin", "_callbacks", "_DefaultStore_instances", "publish_fn", "DefaultStore", "lib_default", "init_lib", "__esmMin", "init_package", "__privateAdd", "__publicField", "patch", "prevState", "nextState", "__privateMethod", "listener", "__privateGet", "args", "package_default", "getFileNameAndExtension", "fullFileName", "lastDot", "init_getFileNameAndExtension", "__esmMin", "mimeTypes_default", "init_mimeTypes", "__esmMin", "getFileType", "file", "fileExtension", "getFileNameAndExtension", "mimeTypes_default", "init_getFileType", "__esmMin", "init_getFileNameAndExtension", "init_mimeTypes", "encodeCharacter", "character", "encodeFilename", "name", "suffix", "generateFileID", "file", "instanceId", "id", "hasFileStableId", "getSafeFileId", "fileType", "getFileType", "init_generateFileID", "__esmMin", "init_getFileType", "require_isObject", "__commonJSMin", "exports", "module", "isObject", "value", "type", "require_freeGlobal", "__commonJSMin", "exports", "module", "freeGlobal", "require_root", "__commonJSMin", "exports", "module", "freeGlobal", "freeSelf", "root", "require_now", "__commonJSMin", "exports", "module", "root", "now", "require_trimmedEndIndex", "__commonJSMin", "exports", "module", "reWhitespace", "trimmedEndIndex", "string", "index", "require_baseTrim", "__commonJSMin", "exports", "module", "trimmedEndIndex", "reTrimStart", "baseTrim", "string", "require_Symbol", "__commonJSMin", "exports", "module", "root", "Symbol", "require_getRawTag", "__commonJSMin", "exports", "module", "Symbol", "objectProto", "hasOwnProperty", "nativeObjectToString", "symToStringTag", "getRawTag", "value", "isOwn", "tag", "unmasked", "result", "require_objectToString", "__commonJSMin", "exports", "module", "objectProto", "nativeObjectToString", "objectToString", "value", "require_baseGetTag", "__commonJSMin", "exports", "module", "Symbol", "getRawTag", "objectToString", "nullTag", "undefinedTag", "symToStringTag", "baseGetTag", "value", "require_isObjectLike", "__commonJSMin", "exports", "module", "isObjectLike", "value", "require_isSymbol", "__commonJSMin", "exports", "module", "baseGetTag", "isObjectLike", "symbolTag", "isSymbol", "value", "require_toNumber", "__commonJSMin", "exports", "module", "baseTrim", "isObject", "isSymbol", "NAN", "reIsBadHex", "reIsBinary", "reIsOctal", "freeParseInt", "toNumber", "value", "other", "isBinary", "require_debounce", "__commonJSMin", "exports", "module", "isObject", "now", "toNumber", "FUNC_ERROR_TEXT", "nativeMax", "nativeMin", "debounce", "func", "wait", "options", "lastArgs", "lastThis", "maxWait", "result", "timerId", "lastCallTime", "lastInvokeTime", "leading", "maxing", "trailing", "invokeFunc", "time", "args", "thisArg", "leadingEdge", "timerExpired", "remainingWait", "timeSinceLastCall", "timeSinceLastInvoke", "timeWaiting", "shouldInvoke", "trailingEdge", "cancel", "flush", "debounced", "isInvoking", "require_throttle", "__commonJSMin", "exports", "module", "debounce", "isObject", "FUNC_ERROR_TEXT", "throttle", "func", "wait", "options", "leading", "trailing", "require_namespace_emitter", "__commonJSMin", "exports", "module", "emitter", "_fns", "event", "arg1", "arg2", "arg3", "arg4", "arg5", "arg6", "toEmit", "getListeners", "emitAll", "fn", "one", "keep", "fns", "i", "l", "e", "out", "idx", "args", "keys", "key", "urlAlphabet", "nanoid", "init_non_secure", "__esmMin", "size", "id", "package_default", "init_package", "__esmMin", "getFileName", "fileType", "fileDescriptor", "init_getFileName", "__esmMin", "locale_default", "init_locale", "__esmMin", "module", "input", "neg", "num", "units", "exponent", "value", "unit", "require_wildcard", "__commonJSMin", "exports", "module", "WildcardMatcher", "text", "separator", "input", "matches", "parts", "ii", "partsCount", "testParts", "key", "test", "matcher", "require_mime_match", "__commonJSMin", "exports", "module", "wildcard", "reMimePartSplit", "target", "pattern", "test", "result", "import_prettier_bytes", "import_mime_match", "defaultOptions", "RestrictionError", "Restricter", "init_Restricter", "__esmMin", "message", "opts", "__publicField", "getOpts", "getI18n", "existingFiles", "addingFiles", "maxTotalFileSize", "maxNumberOfFiles", "f", "totalFilesSize", "total", "prettierBytes", "file", "maxFileSize", "minFileSize", "allowedFileTypes", "type", "match", "allowedFileTypesString", "addingFile", "files", "minNumberOfFiles", "error", "requiredMetaFields", "missingFields", "field", "supportsUploadProgress", "userAgent", "m", "version", "major", "minor", "init_supportsUploadProgress", "__esmMin", "import_throttle", "import_namespace_emitter", "defaultUploadState", "_plugins", "_restricter", "_storeUnsubscribe", "_emitter", "_preProcessors", "_uploaders", "_postProcessors", "_Uppy_instances", "informAndEmit_fn", "checkRequiredMetaFieldsOnFile_fn", "checkRequiredMetaFields_fn", "assertNewUploadAllowed_fn", "transformFile_fn", "startIfAutoProceed_fn", "checkAndUpdateFileState_fn", "getFilesToRetry_fn", "doRetryAll_fn", "_handleUploadProgress", "updateTotalProgress_fn", "_updateTotalProgressThrottled", "calculateTotalProgress_fn", "addListeners_fn", "_updateOnlineStatus", "_requestClientById", "createUpload_fn", "getUpload_fn", "removeUpload_fn", "runUpload_fn", "_Uppy", "Uppy", "Uppy_default", "init_Uppy", "__esmMin", "init_lib", "init_generateFileID", "init_getFileNameAndExtension", "init_getFileType", "init_Translator", "init_non_secure", "init_package", "init_getFileName", "init_locale", "init_loggers", "init_Restricter", "init_supportsUploadProgress", "opts", "__privateAdd", "ee", "__publicField", "file", "progress", "fileInState", "newProgress", "__privateGet", "throttle", "__privateMethod", "locale_default", "defaultOptions", "files", "lib_default", "justErrorsLogger", "merged", "debugLogger", "supportsUploadProgress", "__privateSet", "Restricter", "prevState", "nextState", "patch", "event", "args", "callback", "state", "plugin", "filesWithNewState", "existingFilesState", "fileID", "newFileState", "onMissingKey", "key", "translator", "Translator", "newOpts", "defaultProgress", "updatedFiles", "capabilities", "currentUploads", "fn", "data", "updatedMeta", "newMeta", "ids", "id", "filesObject", "totalProgress", "error", "inProgressFiles", "newFiles", "startedFiles", "uploadStartedFiles", "pausedFiles", "completeFiles", "erroredFiles", "inProgressNotPausedFiles", "processingFiles", "err", "existingFiles", "nextFilesState", "validFilesToAdd", "errors", "restrictionErrors", "firstValidFileToAdd", "fileDescriptors", "nonRestrictionErrors", "message", "subError", "fileIDs", "updatedUploads", "removedFiles", "fileIsNotRemoved", "uploadFileID", "uploadID", "newFileIDs", "stateUpdate", "removedFileIDs", "isPaused", "updatedFile", "result", "Plugin", "msg", "pluginId", "existsPluginAlready", "plugins", "foundPlugin", "type", "method", "instance", "list", "index", "item", "updatedState", "info", "duration", "isComplexMessage", "logger", "client", "requestClient", "currentUpload", "retryResult", "onBeforeUploadResult", "RestrictionError", "currentlyUploadingFiles", "curr", "waitingFileIDs", "userFacingErrors", "maxNumToShow", "firstErrors", "additionalErrors", "details", "missingFields", "success", "allowNewUpload", "fileDescriptorOrFile", "fileType", "getFileType", "fileName", "getFileName", "fileExtension", "getFileNameAndExtension", "getSafeFileId", "meta", "size", "filesToAdd", "fileToAdd", "newFile", "isGhost", "onBeforeFileAddedResult", "fileId", "filesToRetry", "totalProgressPercent", "filesInProgress", "isSizedFile", "sizedFilesInProgress", "unsizedFilesInProgress", "totalFilesSize", "acc", "totalUploadedSize", "errorHandler", "response", "errorMsg", "newError", "uploadStalledWarningRecentlyEmitted", "onUploadStarted", "filesFiltered", "exists", "filesState", "uploadResp", "currentProgress", "forceAllowNewUpload", "nanoid", "getCurrentUpload", "steps", "step", "successful", "failed", "package_default", "init_lib", "__esmMin", "init_BasePlugin", "init_UIPlugin", "init_Uppy", "require_classnames", "__commonJSMin", "exports", "module", "hasOwn", "classNames", "classes", "i", "arg", "appendClass", "parseValue", "key", "value", "newClass", "isDragDropSupported", "div", "init_isDragDropSupported", "__esmMin", "toArray_default", "init_toArray", "__esmMin", "fallbackApi", "dataTransfer", "files", "toArray_default", "init_fallbackApi", "__esmMin", "init_toArray", "getFilesAndDirectoriesFromDirectory", "directoryReader", "oldEntries", "logDropError", "onSuccess", "entries", "newEntries", "error", "init_getFilesAndDirectoriesFromDirectory", "__esmMin", "getAsFileSystemHandleFromEntry", "entry", "logDropError", "resolve", "reject", "directoryReader", "getFilesAndDirectoriesFromDirectory", "dirEntries", "file", "createPromiseToAddFileOrParseDirectory", "relativePath", "lastResortFile", "getNextRelativePath", "handle", "getFilesFromDataTransfer", "dataTransfer", "fileSystemHandles", "item", "fileSystemHandle", "err", "init_webkitGetAsEntryApi", "__esmMin", "init_getFilesAndDirectoriesFromDirectory", "getDroppedFiles", "dataTransfer", "options", "logDropError", "accumulator", "file", "getFilesFromDataTransfer", "fallbackApi", "init_getDroppedFiles", "__esmMin", "init_fallbackApi", "init_webkitGetAsEntryApi", "require_tut_drag_drop", "__commonJSMin", "exports", "module", "init_lib", "init_Translator", "init_isDragDropSupported", "init_getDroppedFiles", "escapeHtml", "value", "TutDragDrop", "BasePlugin", "uppy", "opts", "defaultOptions", "isDragDropSupported", "newOpts", "Translator", "files", "descriptors", "file", "error", "event", "logDropError", "getDroppedFiles", "randomId", "restrictions", "inputText", "tooltip", "browseScreenReaderText", "browseLabel", "ariaLabel", "_", "ending", "__publicField", "require_mediaelement_and_player", "__commonJSMin", "e", "t", "n", "r", "o", "u", "a", "__require", "i", "f", "l", "_dereq_", "module", "exports", "global", "topLevel", "minDoc", "doccy", "win", "root", "setTimeoutFunc", "noop", "bind", "fn", "thisArg", "Promise", "doResolve", "handle", "self", "deferred", "cb", "resolve", "reject", "ret", "newValue", "then", "finale", "len", "Handler", "onFulfilled", "onRejected", "promise", "done", "value", "reason", "ex", "prom", "arr", "args", "remaining", "res", "val", "values", "err", "factory", "embed", "parent", "svg", "target", "fragment", "viewBox", "clone", "loadreadystatechange", "xhr", "cachedDocument", "item", "svg4everybody", "rawopts", "oninterval", "index", "uses", "use", "getSVGAncestor", "src", "opts", "polyfill", "srcSplit", "url", "id", "requests", "numberOfSvgUseElementsToBypass", "requestAnimationFrame", "newerIEUA", "webkitUA", "olderEdgeUA", "edgeUA", "inIframe", "node", "_typeof", "obj", "_mejs", "_mejs2", "_interopRequireDefault", "_en", "_general", "i18n", "_len", "_key", "message", "pluralParam", "str", "pluralForm", "language", "_plural", "input", "number", "form", "_pluralForms", "_window", "_window2", "_document", "_document2", "_media2", "_renderer", "_constants", "_classCallCheck", "instance", "Constructor", "MediaElement", "idOrNode", "options", "sources", "_this", "error", "tagName", "processURL", "type", "_url", "blobUrl", "mediaFiles", "_sources", "nodeSource", "_type", "rendererName", "media", "newRenderer", "newRendererType", "rendererArray", "_i", "total", "rendererList", "renderOptions", "width", "height", "urlList", "event", "props", "methods", "addProperty", "name", "onGet", "onSet", "oldValue", "getFn", "setFn", "assignGettersSetters", "propName", "capName", "getSrc", "setSrc", "_src", "_type2", "_i2", "_src2", "_type3", "_media", "renderInfo", "shouldChangeRenderer", "triggerAction", "methodName", "response", "tmpResponse", "assignMethods", "_i3", "_i4", "_total", "eventName", "callback", "callbacks", "_i5", "_i6", "mediaElement", "wrapper", "mejs", "_createClass", "defineProperties", "descriptor", "protoProps", "staticProps", "Renderer", "renderer", "renderers", "renderersLength", "rendererIndicator", "rendererRanking", "b", "key", "j", "jl", "order", "_i18n", "_i18n2", "_player", "_player2", "Features", "_interopRequireWildcard", "_dom", "_generate", "newObj", "player", "fullscreenTitle", "fullscreenBtn", "isFullScreen", "fullscreenChanged", "isNative", "mode", "containerStyles", "checkFullscreen", "percentErrorMargin", "windowWidth", "screenWidth", "absDiff", "marginError", "elements", "layers", "zoomFactor", "captionText", "_total2", "controls", "op", "playTitle", "pauseTitle", "play", "playBtn", "togglePlayPause", "which", "_time", "lastKeyPressTime", "mouseIsDown", "startedPaused", "autoRewindInitial", "tooltip", "rail", "timeSlider", "newTime", "element", "handleMouseMove", "totalStyles", "offsetStyles", "transform", "cssMatrix", "percentage", "leftPos", "pos", "x", "matrix", "handleLocation", "hoverScaleX", "half", "offsetContainer", "tooltipStyles", "updateSlider", "seconds", "timeSliderText", "time", "duration", "restartPlayer", "handleMouseup", "keyCode", "seekForward", "seekBackward", "seekTime", "volume", "newVolume", "mutePlayer", "events", "endEvents", "totalEvents", "broadcast", "label", "percent", "fakeTime", "nTime", "tW", "newWidth", "handlePos", "currTime", "currentTime", "timecode", "attr", "tracksTitle", "chaptersTitle", "subtitleCount", "kind", "_kind", "inEvents", "outEvents", "trackId", "keyboard", "labels", "captions", "_total3", "_total4", "radio", "el", "_i7", "_total5", "_i8", "_total6", "tracktags", "track", "srclang", "setByKeyboard", "radios", "_i9", "_total7", "_i10", "_total8", "_i11", "_total9", "_track", "d", "lang", "targetSiblings", "button", "hasSubtitles", "sanitize", "html", "div", "scripts", "allElements", "_i12", "attributesObj", "attributes", "text", "img", "image", "visible", "_visible", "slides", "chapters", "_i13", "_total10", "listItems", "_i14", "_total11", "_i15", "_total12", "tracks", "lo", "hi", "mid", "start", "stop", "trackText", "lines", "entries", "identifier", "trackElem", "container", "styleNode", "styles", "_i16", "_total13", "style", "_temp", "_style", "muteText", "unmuteText", "volumeControlText", "mute", "volumeSlider", "anchor", "mouseIsOver", "modified", "updateVolumeSlider", "volumeTotal", "volumeCurrent", "volumeHandle", "positionVolumeHandle", "_button", "volumePercentage", "volumeStyles", "handleVolumeMove", "totalOffset", "railHeight", "newY", "railWidth", "newX", "toggleMute", "hasFocus", "rendered", "EN", "_mediaelement", "_mediaelement2", "_default", "_default2", "dom", "config", "MediaElementPlayer", "playerOptions", "domNode", "videoPlayerTitle", "offscreen", "btnSelector", "tagType", "capsTagName", "doAnimation", "_loop", "forceHide", "_loop2", "timeout", "autoplayAttr", "autoplay", "defaultControls", "pressed", "playerIndex", "p", "loadingElement", "errorContainer", "errorContent", "imgError", "poster", "parentEl", "parentStyles", "nativeWidth", "nativeHeight", "aspectRatio", "ratio", "parentHeight", "newHeight", "parentWidth", "layerChildren", "isIframe", "targetElement", "initHeight", "initWidth", "scaleX1", "scaleY1", "scaleX2", "scaleY2", "bScaleOnWidth", "finalWidth", "finalHeight", "children", "minWidth", "child", "layer", "posterDiv", "posterImg", "className", "doc", "eventList", "part", "_eventList", "_eventList2", "feature", "posterUrl", "loading", "bigPlay", "hasError", "evt", "keyAction", "userInteraction", "featureIndex", "source", "_loop3", "newTrack", "muted", "DefaultPlayer", "$", "NativeDash", "settings", "DashNativeRenderer", "originalNode", "dashPlayer", "attachNativeEvents", "_dashPlayer", "dashEvents", "assignEvents", "assignMdashEvents", "_event", "eventType", "PluginDetector", "plugin", "v", "pv", "pluginName", "mimeType", "activeX", "axDetect", "version", "description", "ax", "FlashMediaElementRenderer", "flash", "isActive", "initEvents", "stackItem", "flashVars", "isVideo", "flashHeight", "flashWidth", "specialIEContainer", "hasFlash", "FlashMediaElementVideoRenderer", "FlashMediaElementHlsVideoRenderer", "FlashMediaElementMdashVideoRenderer", "FlashMediaElementAudioRenderer", "FlashMediaElementAudioOggRenderer", "NativeFlv", "FlvNativeRenderer", "flvPlayer", "_flvOptions", "_flvConfigs", "_flvPlayer", "flvEvents", "assignFlvEvents", "data", "flvOptions", "flvConfigs", "NativeHls", "HlsNativeRenderer", "preload", "hlsPlayer", "_hlsPlayer", "hlsEvents", "recoverDecodingErrorDate", "recoverSwapAudioCodecDate", "assignHlsEvents", "now", "_message", "_message2", "HtmlMediaElement", "YouTubeApi", "youTubeId", "parts", "parameters", "paramParts", "YouTubeIframeRenderer", "youtube", "apiStack", "readyState", "youTubeApi", "paused", "ended", "youTubeIframe", "percentLoaded", "_videoId", "errorHandler", "youtubeContainer", "isAudio", "videoId", "youtubeSettings", "newEvent", "_youTubeState", "quality", "resolutions", "NAV", "UA", "IS_IPAD", "IS_IPHONE", "IS_IPOD", "IS_IOS", "IS_ANDROID", "IS_IE", "IS_EDGE", "IS_CHROME", "IS_FIREFOX", "IS_SAFARI", "IS_STOCK_ANDROID", "HAS_MSE", "SUPPORT_POINTER_EVENTS", "documentElement", "getComputedStyle", "supports", "SUPPORT_PASSIVE_EVENT", "supportsPassive", "html5Elements", "video", "SUPPORTS_NATIVE_HLS", "hasiOSFullScreen", "hasNativeFullscreen", "hasWebkitNativeFullScreen", "hasMozNativeFullScreen", "hasMsNativeFullScreen", "hasTrueNativeFullScreen", "nativeFullScreenEnabled", "fullScreenEventName", "requestFullScreen", "cancelFullScreen", "HAS_NATIVE_FULLSCREEN", "HAS_WEBKIT_NATIVE_FULLSCREEN", "HAS_MOZ_NATIVE_FULLSCREEN", "HAS_MS_NATIVE_FULLSCREEN", "HAS_IOS_FULLSCREEN", "HAS_TRUE_NATIVE_FULLSCREEN", "HAS_NATIVE_FULLSCREEN_ENABLED", "FULLSCREEN_EVENT_NAME", "loadScript", "offset", "toggleClass", "fadeOut", "fadeIn", "siblings", "ajax", "script", "rect", "scrollLeft", "scrollTop", "hasClassMethod", "addClassMethod", "removeClassMethod", "hasClass", "addClass", "removeClass", "animate", "timestamp", "progress", "opacity", "filter", "elem", "dataType", "success", "completed", "accept", "escapeHTML", "debounce", "isObjectEmpty", "splitEvents", "createEvent", "isNodeAfter", "isString", "map", "c", "func", "wait", "_arguments", "immediate", "context", "later", "callNow", "rwindow", "eventFrags", "detail", "sourceNode", "targetNode", "generateControlButton", "playerId", "ariaLabel", "title", "iconSprite", "icons", "classPrefix", "buttonClass", "ariaDescribedby", "ariaPressed", "ariaDescribedbyAttr", "ariaPressedAttr", "iconHtml", "icon", "absolutizeUrl", "formatType", "getMimeFromType", "getTypeFromFile", "getExtension", "normalizeExtension", "typeChecks", "ext", "normalizedExt", "mime", "baseUrl", "baseName", "extension", "_promisePolyfill", "_promisePolyfill2", "_svg4everybody", "_svg4everybody2", "CustomEvent", "params", "to", "nextSource", "nextKey", "searchString", "position", "s", "matches", "lastTime", "vendors", "timeToCall", "pseudoEl", "constructor", "nodes", "isDropFrame", "secondsToTimeCode", "timeCodeToSeconds", "calculateTimeFormat", "convertSMPTEtoSeconds", "fps", "forceHours", "showFrameCount", "secondsDecimalLength", "timeFormat", "dropFrames", "timeBase", "framesPer24Hours", "framesPer10Minutes", "frameSep", "hours", "minutes", "frames", "m", "timeBaseDivision", "timeFormatFrags", "timeFormatSettings", "unique", "result", "output", "totalMinutes", "hFrames", "mFrames", "lis", "format", "firstTwoPlaces", "separatorIndex", "separator", "firstChar", "required", "hasNextValue", "SMPTE", "decimalLen", "secs", "multiplier", "require_full", "__commonJSMin", "exports", "module", "linkClickSelector", "buttonClickSelector", "inputChangeSelector", "formSubmitSelector", "formInputClickSelector", "formDisableSelector", "formEnableSelector", "fileInputSelector", "linkDisableSelector", "buttonDisableSelector", "nonce", "loadCSPNonce", "metaTag", "cspNonce", "m", "matches", "element", "selector", "EXPANDO", "getData", "key", "setData", "value", "$", "isContentEditable", "isEditable", "csrfToken", "meta", "csrfParam", "CSRFProtection", "xhr", "token", "refreshCSRFTokens", "param", "input", "AcceptHeaders", "ajax", "options", "prepareOptions", "createXHR", "response", "processResponse", "done", "type", "script", "parser", "href", "isCrossDomain", "url", "originAnchor", "urlAnchor", "preventDefault", "CustomEvent", "event", "params", "evt", "result", "fire", "obj", "name", "data", "stopEverything", "e", "delegate", "eventType", "handler", "target", "toArray", "serializeElement", "additionalParam", "inputs", "option", "formElements", "form", "el", "handleConfirmWithRails", "rails", "allowAction", "confirm", "message", "callback", "answer", "handleDisabledElement", "enableElement", "isXhrRedirect", "enableLinkElement", "enableFormElement", "enableFormElements", "disableElement", "disableLinkElement", "disableFormElement", "disableFormElements", "replacement", "originalText", "handleMethodWithRails", "link", "method", "csrfToken$1", "csrfParam$1", "formContent", "isRemote", "handleRemoteWithRails", "withCredentials", "dataType", "button", "args", "formSubmitButtonClick", "preventInsignificantClick", "insignificantMetaClick", "Rails", "handleConfirm", "handleMethod", "handleRemote", "start", "originalOptions", "adapters", "logger", "messages", "now", "secondsSince", "time", "ConnectionMonitor", "connection", "staleThreshold", "reconnectionBackoffRate", "backoff", "jitter", "INTERNAL", "message_types", "protocols", "supportedProtocols", "indexOf", "Connection", "consumer", "data", "socketProtocols", "allowReconnect", "error", "states", "state", "eventName", "handler", "event", "identifier", "message", "reason", "reconnect", "type", "extend", "object", "properties", "key", "value", "Subscription", "params", "mixin", "action", "SubscriptionGuarantor", "subscriptions", "subscription", "s", "Subscriptions", "channelName", "channel", "callbackName", "args", "command", "Consumer", "url", "createWebSocketURL", "subprotocol", "a", "createConsumer", "getConfig", "name", "element", "logger", "createConsumer", "turbo_es2017_esm_exports", "__export", "FetchEnctype", "FetchMethod", "FetchRequest", "FetchResponse", "FrameElement", "FrameLoadingStyle", "FrameRenderer", "PageRenderer", "PageSnapshot", "StreamActions", "StreamElement", "StreamSourceElement", "cache", "config", "connectStreamSource", "disconnectStreamSource", "fetchWithTurboHeaders", "fetchEnctypeFromString", "fetchMethodFromString", "isSafe", "morphBodyElements", "morphChildren", "morphElements", "morphTurboFrameElements", "sessionNavigator", "registerAdapter", "renderStreamMessage", "session", "setConfirmMethod", "setFormMode", "setProgressBarDelay", "start", "visit", "FrameLoadingStyle", "_FrameElement", "__publicField", "name", "value", "frameLoadingStyleFromString", "FrameElement", "style", "drive", "activateScriptElement", "element", "createdScriptElement", "cspNonce", "getCspNonce", "copyElementAttributes", "destinationElement", "sourceElement", "createDocumentFragment", "html", "template", "dispatch", "eventName", "target", "cancelable", "detail", "event", "cancelEvent", "nextRepaint", "nextEventLoopTick", "nextAnimationFrame", "resolve", "parseHTMLDocument", "unindent", "strings", "values", "lines", "interpolate", "match", "indent", "line", "result", "string", "i", "uuid", "_", "getAttribute", "attributeName", "elements", "hasAttribute", "markAsBusy", "clearBusyState", "waitForLoad", "timeoutInMilliseconds", "onComplete", "getHistoryMethodForAction", "action", "isAction", "getVisitAction", "getMetaElement", "getMetaContent", "nonce", "content", "setMetaContent", "findClosestRecursively", "selector", "elementIsFocusable", "queryAutofocusableElement", "elementOrDocumentFragment", "around", "callback", "reader", "before", "after", "doesNotTargetIFrame", "findLinkFromClickTarget", "link", "linkTarget", "debounce", "fn", "delay", "timeoutId", "args", "submitter", "_submitter", "Config", "config", "__privateAdd", "__privateGet", "__privateSet", "forms", "expandURL", "locatable", "getAnchor", "url", "anchorMatch", "getAction$1", "form", "getExtension", "getLastPathComponent", "isPrefixedBy", "baseURL", "prefix", "addTrailingSlash", "locationIsVisitable", "location", "rootLocation", "getLocationForLink", "getRequestURL", "anchor", "toCacheKey", "urlsAreEqual", "left", "right", "getPathComponents", "FetchResponse", "response", "LimitedSet", "maxSize", "oldestValue", "recentRequests", "fetchWithTurboHeaders", "options", "modifiedHeaders", "requestUID", "fetchMethodFromString", "method", "FetchMethod", "fetchEnctypeFromString", "encoding", "FetchEnctype", "_resolveRequestPromise", "_FetchRequest_instances", "allowRequestToBeIntercepted_fn", "willDelegateErrorHandling_fn", "FetchRequest", "delegate", "requestBody", "enctype", "_value", "body", "buildResourceAndBody", "fetchBody", "fetchMethod", "fetchOptions", "__privateMethod", "error", "fetchResponse", "isSafe", "mimeType", "requestInterception", "resource", "searchParams", "entriesExcludingFiles", "mergeIntoURLSearchParams", "entries", "AppearanceObserver", "StreamMessage", "message", "fragment", "importStreamElements", "streamElement", "inertScriptElement", "identity", "key", "_toCacheKey", "LRUCache", "size", "entry", "index", "PREFETCH_DELAY", "_prefetchTimeout", "_maxAges", "PrefetchCache", "prefetchDelay", "request", "ttl", "cacheTtl", "maxAge", "prefetchCache", "FormSubmissionState", "FormSubmission", "_FormSubmission", "formElement", "mustRedirect", "getMethod", "getAction", "getFormAction", "buildFormData", "getEnctype", "initialized", "requesting", "confirmationMessage", "stopping", "stopped", "token", "getCookieValue", "_request", "responseSucceededWithoutRedirect", "input", "formData", "cookieName", "cookie", "formElementAction", "formAction", "Snapshot", "queryPermanentElementsAll", "id", "getPermanentElementById", "snapshot", "permanentElementMap", "currentPermanentElement", "newPermanentElement", "node", "FormSubmitObserver", "eventTarget", "submissionDoesNotDismissDialog", "submissionDoesNotTargetIFrame", "_resolveRenderPromise", "_resolveInterceptionPromise", "View", "x", "y", "renderer", "isPreview", "shouldRender", "willRender", "shouldInvalidate", "renderInterception", "reason", "direction", "FrameView", "LinkInterceptor", "_event", "LinkClickObserver", "FormLinkClickObserver", "originalEvent", "type", "turboFrame", "turboAction", "turboConfirm", "Bardo", "bardo", "permanentElement", "placeholder", "createPlaceholderForPermanentElement", "clone", "_activeElement", "Renderer", "currentSnapshot", "newSnapshot", "reject", "currentElement", "newElement", "FrameRenderer", "destinationRange", "frameElement", "sourceRange", "renderElement", "block", "readScrollLogicalPosition", "behavior", "readScrollBehavior", "activatedScriptElement", "defaultValue", "Idiomorph", "noOp", "defaults", "elt", "morph", "oldNode", "newContent", "normalizeElement", "newNode", "normalizeParent", "ctx", "createMorphContext", "morphedNodes", "saveAndRestoreFocus", "withHeadBlocking", "morphChildren", "morphOuterHTML", "oldParent", "activeElement", "activeElementId", "selectionStart", "selectionEnd", "results", "newParent", "insertionPoint", "endPoint", "newChild", "bestMatch", "findBestMatch", "removeNodesBetween", "morphNode", "newChildId", "movedChild", "moveBeforeById", "insertedNode", "createNode", "tempNode", "removeNode", "newEmptyChild", "newClonedChild", "startPoint", "softMatch", "nextSibling", "siblingSoftMatchCount", "cursor", "isSoftMatch", "isIdSetMatch", "oldSet", "newSet", "oldElt", "newElt", "moveBefore", "startInclusive", "endExclusive", "parentNode", "removeElementFromAncestorsIdMaps", "idSet", "handleHeadElement", "morphAttributes", "ignoreValueOfActiveElement", "oldAttributes", "newAttributes", "newAttribute", "ignoreAttribute", "oldAttribute", "syncInputValue", "oldElement", "newValue", "oldValue", "syncBooleanAttribute", "newLiveValue", "oldLiveValue", "ignoreUpdate", "attr", "updateType", "possibleActiveElement", "oldHead", "newHead", "promises", "newCtx", "added", "removed", "preserved", "nodesToAppend", "srcToNewHeadNodes", "newHeadChild", "currentHeadElt", "inNewContent", "isReAppended", "isPreserved", "promise", "_resolve", "removedElement", "persistentIds", "idMap", "createIdMaps", "mergedConfig", "mergeDefaults", "morphStyle", "createPantry", "createActiveElementAndParents", "finalConfig", "pantry", "activeElementAndParents", "findIdElements", "root", "populateIdMapWithTree", "current", "oldContent", "oldIdElements", "newIdElements", "createPersistentIds", "newRoot", "duplicateIds", "oldIdTagNameMap", "tagName", "generatedByIdiomorph", "parseContent", "SlicedParentNode", "dummyParent", "nodes", "nodeList", "referenceNode", "parser", "contentWithSvgsRemoved", "htmlElement", "morphElements", "callbacks", "DefaultIdiomorphCallbacks", "shouldRefreshFrameWithMorphing", "currentFrame", "newFrame", "areFramesCompatibleForRefreshing", "closestFrameReloadableWithMorphing", "_beforeNodeMorphed", "beforeNodeMorphed", "mutationType", "MorphingFrameRenderer", "_ProgressBar", "ProgressBar", "HeadSnapshot", "elementIsNoscript", "elementWithoutNonce", "outerHTML", "details", "elementType", "elementIsTracked", "matchedType", "tracked", "elementIsMetaElementWithName", "elementIsScript", "elementIsStylesheet", "PageSnapshot", "_PageSnapshot", "documentElement", "head", "headSnapshot", "clonedElement", "selectElements", "clonedSelectElements", "source", "option", "clonedPasswordInput", "clonedNoscriptElement", "_viewTransitionStarted", "_lastOperation", "ViewTransitioner", "useViewTransition", "render", "defaultOptions", "TimingMetric", "VisitState", "SystemStatusCode", "Direction", "Visit", "restorationIdentifier", "historyChanged", "referrer", "snapshotHTML", "visitCachedSnapshot", "updateHistory", "shouldCacheSnapshot", "acceptsStreamResponse", "refresh", "actionForHistory", "statusCode", "isSuccessful", "responseHTML", "_response", "redirected", "_error", "scrollPosition", "metric", "BrowserAdapter", "session", "visit", "_visit", "_formSubmission", "CacheObserver", "_FrameRedirector_instances", "shouldSubmit_fn", "shouldRedirect_fn", "findFrameElement_fn", "FrameRedirector", "_location", "frame", "meta", "History", "turbo", "restorationIndex", "state", "additionalData", "restorationData", "_prefetchedLink", "_enable", "_tryToPrefetchRequest", "_cancelRequestIfObsolete", "_cancelPrefetchRequest", "_tryToUsePrefetchedRequest", "_LinkPrefetchObserver_instances", "cacheTtl_get", "isPrefetchable_fn", "LinkPrefetchObserver", "fetchRequest", "cached", "turboFrameTarget", "unfetchableLink", "linkToTheSamePage", "linkOptsOut", "nonSafeLink", "eventPrevented", "turboPrefetchParent", "turboMethod", "isUJS", "_Navigator_instances", "getActionForFormSubmission_fn", "getDefaultAction_fn", "Navigator", "formSubmission", "visitOptions", "PageStage", "PageObserver", "readyState", "ScrollObserver", "position", "StreamMessageRenderer", "getPermanentElementMapForFragment", "withAutofocusFromFragment", "withPreservedFocus", "permanentElementsInDocument", "permanentElementInDocument", "elementInStream", "generatedID", "turboStreams", "elementWithAutofocus", "firstAutofocusableElementInStreams", "willAutofocusId", "elementToAutofocus", "activeElementBeforeRender", "activeElementAfterRender", "restoreFocusTo", "elementToFocus", "nodeListOfStreamElements", "_started", "StreamObserver", "fetchResponseFromEvent", "fetchResponseIsStream", "ErrorRenderer", "replaceableElement", "_PageRenderer_instances", "setLanguage_fn", "PageRenderer", "mergedHeadElements", "newStylesheetElements", "loadingElements", "newHeadElements", "elementList", "noscriptElement", "dir", "lang", "MorphingPageRenderer", "SnapshotCache", "PageView", "rendererClass", "cachedSnapshot", "_preloadAll", "Preloader", "snapshotCache", "_Cache_instances", "setCacheControl_fn", "Cache", "_pageRefreshDebouncePeriod", "Session", "adapter", "requestId", "scroll", "isRecentRequest", "isCurrentUrl", "isUnsafe", "isStream", "frameTarget", "extendURLWithDeprecatedProperties", "defaultPrevented", "_snapshot", "_isPreview", "renderMethod", "ev", "newBody", "timing", "submitterIsNavigatable", "container", "withinFrame", "deprecatedLocationPropertyDescriptors", "cache", "sessionNavigator", "start", "registerAdapter", "connectStreamSource", "disconnectStreamSource", "renderStreamMessage", "setProgressBarDelay", "setConfirmMethod", "confirmMethod", "setFormMode", "mode", "morphBodyElements", "currentBody", "morphTurboFrameElements", "Turbo", "TurboFrameMissingError", "_currentFetchRequest", "_resolveVisitPromise", "_connected", "_hasBeenLoaded", "_ignoredAttributes", "_shouldMorphFrame", "_FrameController_instances", "loadSourceURL_fn", "loadFrameResponse_fn", "visit_fn", "navigateFrame_fn", "handleUnvisitableFrameResponse_fn", "willHandleFrameMissingFromResponse_fn", "handleFrameMissingFromResponse_fn", "throwFrameMissingError_fn", "visitResponse_fn", "formActionIsVisitable_fn", "shouldInterceptNavigation_fn", "isIgnoringChangesTo_fn", "ignoringChangesToAttribute_fn", "withCurrentNavigationElement_fn", "getFrameElementById_fn", "FrameController", "_fetchResponse", "src", "document", "_renderMethod", "_newElement", "pageSnapshot", "activateElement", "sourceURL", "newFrameElement", "wrapped", "currentURL", "StreamActions", "e", "targetElement", "_StreamElement_instances", "raise_fn", "_StreamElement", "c", "existingChildren", "newChildrenIds", "actionFunction", "StreamElement", "StreamSourceElement", "scriptElement", "consumer", "getConsumer", "setConsumer", "createConsumer", "newConsumer", "subscribeTo", "channel", "mixin", "subscriptions", "walk", "obj", "acc", "key", "camel", "m", "x", "TurboCableStreamSourceElement", "connectStreamSource", "subscribeTo", "disconnectStreamSource", "data", "event", "channel", "signed_stream_name", "walk", "__publicField", "encodeMethodIntoRequestBody", "event", "form", "fetchOptions", "submitter", "body", "isBodyInit", "method", "determineFetchMethod", "formMethod", "determineFormMethod", "overrideMethod", "turbo_es2017_esm_exports", "encodeMethodIntoRequestBody", "EventListener", "eventTarget", "eventName", "eventOptions", "binding", "event", "extendedEvent", "extendEvent", "left", "right", "leftIndex", "rightIndex", "stopImmediatePropagation", "Dispatcher", "application", "eventListener", "listeners", "map", "clearEventListeners", "error", "message", "detail", "eventListenerMap", "cacheKey", "parts", "key", "defaultActionDescriptorFilters", "value", "element", "descriptorPattern", "parseActionDescriptorString", "descriptorString", "matches", "keyFilter", "parseEventTarget", "parseEventOptions", "eventTargetName", "options", "token", "stringifyEventTarget", "camelize", "_", "char", "namespaceCamelize", "capitalize", "dasherize", "tokenize", "isSomething", "object", "hasProperty", "property", "allModifiers", "Action", "index", "descriptor", "schema", "getDefaultEventNameForElement", "eventFilter", "filters", "standardFilter", "params", "pattern", "name", "match", "typecast", "meta", "ctrl", "alt", "shift", "modifier", "defaultEventNames", "e", "tagName", "Binding", "context", "action", "actionEvent", "method", "actionDescriptorFilters", "controller", "passes", "filter", "target", "currentTarget", "identifier", "ElementObserver", "delegate", "mutations", "callback", "mutation", "attributeName", "nodes", "node", "tree", "processor", "AttributeObserver", "add", "fetch", "del", "prune", "values", "Multimap", "set", "size", "_key", "_values", "SelectorObserver", "element", "selector", "delegate", "details", "ElementObserver", "Multimap", "callback", "matches", "tree", "match", "selectors", "_attributeName", "matchedBefore", "StringMapObserver", "mutations", "attributeName", "mutation", "oldValue", "key", "value", "attribute", "TokenListObserver", "AttributeObserver", "unmatchedTokens", "matchedTokens", "tokens", "token", "previousTokens", "currentTokens", "firstDifferingIndex", "zip", "previousToken", "currentToken", "tokensAreEqual", "tokenString", "parseTokenString", "content", "index", "left", "right", "length", "_", "ValueListObserver", "parseResult", "valuesByToken", "error", "BindingObserver", "context", "action", "binding", "Binding", "Action", "ValueObserver", "receiver", "descriptor", "name", "defaultValue", "writer", "rawValue", "rawOldValue", "changedMethodName", "changedMethod", "valueDescriptorMap", "descriptors", "hasMethodName", "capitalize", "TargetObserver", "_a", "readInheritableStaticArrayValues", "constructor", "propertyName", "ancestors", "getAncestorsForConstructor", "values", "getOwnStaticArrayValues", "readInheritableStaticObjectPairs", "pairs", "getOwnStaticObjectPairs", "definition", "OutletObserver", "outletName", "observer", "_selector", "outlet", "hasOutlet", "hasOutletController", "_element", "selectorObserver", "attributeObserver", "dependencies", "module", "identifiers", "Context", "scope", "functionName", "detail", "identifier", "controller", "message", "namespaceCamelize", "methodName", "args", "bless", "shadow", "getBlessedProperties", "properties", "shadowConstructor", "extend", "shadowProperties", "getShadowProperties", "blessedProperties", "blessing", "prototype", "getOwnKeys", "getShadowedDescriptor", "shadowingDescriptor", "object", "extendWithReflect", "extended", "testReflectExtension", "b", "blessDefinition", "Module", "application", "ClassMap", "tokenize", "DataMap", "dasherize", "Guide", "logger", "warnedKeys", "attributeValueContainsToken", "TargetSet", "targetName", "targetNames", "target", "targets", "targetDescriptor", "revisedAttributeName", "OutletSet", "controllerElement", "outletNames", "outlets", "controllerAttribute", "Scope", "_Scope", "schema", "ScopeObserver", "scopesByIdentifier", "referenceCount", "Router", "contexts", "afterLoad", "defaultSchema", "objectFromEntries", "c", "n", "array", "memo", "k", "v", "Application", "Dispatcher", "defaultActionDescriptorFilters", "domReady", "controllerConstructor", "filter", "head", "rest", "resolve", "ClassPropertiesBlessing", "classDefinition", "propertiesForClassDefinition", "classes", "OutletPropertiesBlessing", "outletDefinition", "propertiesForOutletDefinition", "getOutletController", "getControllerAndEnsureConnectedScope", "outletController", "camelizedName", "outletElement", "TargetPropertiesBlessing", "targetDefinition", "propertiesForTargetDefinition", "ValuePropertiesBlessing", "valueDefinitionPairs", "propertyDescriptorMap", "result", "valueDefinitionPair", "valueDescriptor", "parseValueDefinitionPair", "propertiesForValueDefinitionPair", "read", "write", "typeDefinition", "valueDescriptorForTokenAndTypeDefinition", "parseValueTypeConstant", "constant", "parseValueTypeDefault", "parseValueTypeObject", "payload", "typeObject", "hasType", "isSomething", "hasDefault", "fullObject", "onlyType", "onlyDefault", "typeFromObject", "typeFromDefaultValue", "propertyPath", "parseValueTypeDefinition", "typeFromConstant", "type", "defaultValueForDefinition", "defaultValuesByType", "hasProperty", "constantFromType", "camelize", "readers", "writers", "writeString", "writeJSON", "Controller", "_identifier", "_application", "eventName", "prefix", "bubbles", "cancelable", "event", "alphabetic_sort_toggle_controller_default", "Controller", "saved", "event", "icon", "fetchHtmlEl", "currentUrl", "url", "categoryName", "stateText", "__publicField", "application", "Application", "import_dot", "import_debounce", "assignment_controller_default", "Controller", "event", "value", "filterTypeSelectedValue", "data_object", "selectedValue", "filterInputValue", "_event", "tableRow", "objectId", "objectType", "dataLength", "numberOfPages", "isInAddedDeltaData", "isInRemoveDeltaData", "oldDataObject", "paginationId", "pagination", "atPage", "currentPage", "selectedElement", "selectedObject", "typeAheadSearchInput", "searchResult", "addedObjects", "resolve", "flashFirstRow", "tableRowTemplate", "doT", "startItem", "endItem", "object", "emptyTableRow", "elementsListTableBody", "rangeStart", "rangeEnd", "html", "i", "data", "objectIdToRemove", "objectTypeToRemove", "objectIdToSearch", "objectTypeToSearch", "array", "newArray", "message", "__publicField", "AsyncPickMarkup", "options", "expanded", "container", "pos", "offset", "getOffsetFromBoundingBox", "top", "right", "selectOffsetTop", "selectOffsetBot", "wrapper", "button", "buttonClass", "buttonDisabledClass", "buttonIcon", "buttonIconClass", "labelId", "popup", "liveRegion", "message", "self", "searchInputClass", "divider", "selected", "buildUl", "selectedValues", "value", "li", "buildLi", "newEntries", "lowerPage", "scrollTopOffset", "pageUl", "scrollableOffset", "upperPage", "ul", "element", "text", "option", "optionData", "page", "blankOptions", "owner", "activeEntryId", "activeEntry", "setLiSelected", "entry", "prev", "first", "next", "entryOffsetTop", "shouldScrollDown", "shouldScrollUp", "match", "count", "joinSelectedTexts", "additionalClasses", "role", "listClass", "disabled", "subtext", "imgAttributes", "accessibleName", "textSpan", "subtextDom", "imageTag", "attr", "addCheck", "checkedIconClasses", "check", "checkedIconClass", "box", "docElem", "de_default", "en_default", "es_default", "fr_default", "AsyncPick", "e", "onDomRemove", "blank", "inputValue", "clickedButton", "percentage", "getScrollPercent", "url", "request", "xhr", "responseSuccess", "parsedJson", "getObjectKey", "json", "scrollTop", "callback", "newValue", "event", "newLi", "removedLi", "msg", "someObject", "params", "objectToUrlParam", "query", "object", "key", "method", "handler", "context", "onDetachCallback", "observer", "isDetached", "el", "async_pick_controller_default", "Controller", "options", "key", "elementId", "i", "__publicField", "lib_exports", "__export", "afterMain", "afterRead", "afterWrite", "applyStyles_default", "arrow_default", "auto", "basePlacements", "beforeMain", "beforeRead", "beforeWrite", "bottom", "clippingParents", "computeStyles_default", "createPopper", "detectOverflow", "end", "eventListeners_default", "flip_default", "hide_default", "left", "main", "modifierPhases", "offset_default", "placements", "popper", "popperGenerator", "popperOffsets_default", "preventOverflow_default", "read", "reference", "right", "start", "top", "variationPlacements", "viewport", "write", "top", "bottom", "right", "left", "auto", "basePlacements", "start", "end", "clippingParents", "viewport", "popper", "reference", "variationPlacements", "acc", "placement", "placements", "beforeRead", "read", "afterRead", "beforeMain", "main", "afterMain", "beforeWrite", "write", "afterWrite", "modifierPhases", "getNodeName", "element", "getWindow", "node", "ownerDocument", "isElement", "node", "OwnElement", "getWindow", "isHTMLElement", "isShadowRoot", "applyStyles", "_ref", "state", "name", "style", "attributes", "element", "isHTMLElement", "getNodeName", "value", "effect", "_ref2", "initialStyles", "styleProperties", "property", "attribute", "applyStyles_default", "getBasePlacement", "placement", "max", "min", "round", "getUAString", "uaData", "item", "isLayoutViewport", "getUAString", "getBoundingClientRect", "element", "includeScale", "isFixedStrategy", "clientRect", "scaleX", "scaleY", "isHTMLElement", "round", "_ref", "isElement", "getWindow", "visualViewport", "addVisualOffsets", "isLayoutViewport", "x", "y", "width", "height", "getLayoutRect", "element", "clientRect", "getBoundingClientRect", "width", "height", "contains", "parent", "child", "rootNode", "isShadowRoot", "next", "getComputedStyle", "element", "getWindow", "isTableElement", "element", "getNodeName", "getDocumentElement", "element", "isElement", "getParentNode", "element", "getNodeName", "isShadowRoot", "getDocumentElement", "getTrueOffsetParent", "element", "isHTMLElement", "getComputedStyle", "getContainingBlock", "isFirefox", "getUAString", "isIE", "elementCss", "currentNode", "getParentNode", "isShadowRoot", "getNodeName", "css", "getOffsetParent", "window", "getWindow", "offsetParent", "isTableElement", "getMainAxisFromPlacement", "placement", "within", "min", "value", "max", "withinMaxClamp", "v", "getFreshSideObject", "mergePaddingObject", "paddingObject", "getFreshSideObject", "expandToHashMap", "value", "keys", "hashMap", "key", "toPaddingObject", "padding", "state", "mergePaddingObject", "expandToHashMap", "basePlacements", "arrow", "_ref", "_state$modifiersData$", "name", "options", "arrowElement", "popperOffsets", "basePlacement", "getBasePlacement", "axis", "getMainAxisFromPlacement", "isVertical", "left", "right", "len", "paddingObject", "arrowRect", "getLayoutRect", "minProp", "top", "maxProp", "bottom", "endDiff", "startDiff", "arrowOffsetParent", "getOffsetParent", "clientSize", "centerToReference", "min", "max", "center", "offset", "within", "axisProp", "effect", "_ref2", "_options$element", "contains", "arrow_default", "getVariation", "placement", "unsetSides", "roundOffsetsByDPR", "_ref", "win", "x", "y", "dpr", "round", "mapToStyles", "_ref2", "_Object$assign2", "popper", "popperRect", "placement", "variation", "offsets", "position", "gpuAcceleration", "adaptive", "roundOffsets", "isFixed", "_offsets$x", "_offsets$y", "_ref3", "hasX", "hasY", "sideX", "left", "sideY", "top", "offsetParent", "getOffsetParent", "heightProp", "widthProp", "getWindow", "getDocumentElement", "getComputedStyle", "right", "end", "bottom", "offsetY", "offsetX", "commonStyles", "_ref4", "_Object$assign", "computeStyles", "_ref5", "state", "options", "_options$gpuAccelerat", "_options$adaptive", "_options$roundOffsets", "getBasePlacement", "getVariation", "computeStyles_default", "passive", "effect", "_ref", "state", "instance", "options", "_options$scroll", "scroll", "_options$resize", "resize", "window", "getWindow", "scrollParents", "scrollParent", "eventListeners_default", "hash", "getOppositePlacement", "placement", "matched", "hash", "getOppositeVariationPlacement", "placement", "matched", "getWindowScroll", "node", "win", "getWindow", "scrollLeft", "scrollTop", "getWindowScrollBarX", "element", "getBoundingClientRect", "getDocumentElement", "getWindowScroll", "getViewportRect", "element", "strategy", "win", "getWindow", "html", "getDocumentElement", "visualViewport", "width", "height", "x", "y", "layoutViewport", "isLayoutViewport", "getWindowScrollBarX", "getDocumentRect", "element", "_element$ownerDocumen", "html", "getDocumentElement", "winScroll", "getWindowScroll", "body", "width", "max", "height", "x", "getWindowScrollBarX", "y", "getComputedStyle", "isScrollParent", "element", "_getComputedStyle", "getComputedStyle", "overflow", "overflowX", "overflowY", "getScrollParent", "node", "getNodeName", "isHTMLElement", "isScrollParent", "getParentNode", "listScrollParents", "element", "list", "_element$ownerDocumen", "scrollParent", "getScrollParent", "isBody", "win", "getWindow", "target", "isScrollParent", "updatedList", "getParentNode", "rectToClientRect", "rect", "getInnerBoundingClientRect", "element", "strategy", "rect", "getBoundingClientRect", "getClientRectFromMixedType", "clippingParent", "viewport", "rectToClientRect", "getViewportRect", "isElement", "getDocumentRect", "getDocumentElement", "getClippingParents", "clippingParents", "listScrollParents", "getParentNode", "canEscapeClipping", "getComputedStyle", "clipperElement", "isHTMLElement", "getOffsetParent", "contains", "getNodeName", "getClippingRect", "boundary", "rootBoundary", "mainClippingParents", "firstClippingParent", "clippingRect", "accRect", "max", "min", "computeOffsets", "_ref", "reference", "element", "placement", "basePlacement", "getBasePlacement", "variation", "getVariation", "commonX", "commonY", "offsets", "top", "bottom", "right", "left", "mainAxis", "getMainAxisFromPlacement", "len", "start", "end", "detectOverflow", "state", "options", "_options", "_options$placement", "placement", "_options$strategy", "strategy", "_options$boundary", "boundary", "clippingParents", "_options$rootBoundary", "rootBoundary", "viewport", "_options$elementConte", "elementContext", "popper", "_options$altBoundary", "altBoundary", "_options$padding", "padding", "paddingObject", "mergePaddingObject", "expandToHashMap", "basePlacements", "altContext", "reference", "popperRect", "element", "clippingClientRect", "getClippingRect", "isElement", "getDocumentElement", "referenceClientRect", "getBoundingClientRect", "popperOffsets", "computeOffsets", "popperClientRect", "rectToClientRect", "elementClientRect", "overflowOffsets", "offsetData", "offset", "key", "multiply", "right", "bottom", "axis", "top", "computeAutoPlacement", "state", "options", "_options", "placement", "boundary", "rootBoundary", "padding", "flipVariations", "_options$allowedAutoP", "allowedAutoPlacements", "placements", "variation", "getVariation", "variationPlacements", "basePlacements", "allowedPlacements", "overflows", "acc", "detectOverflow", "getBasePlacement", "a", "getExpandedFallbackPlacements", "placement", "getBasePlacement", "auto", "oppositePlacement", "getOppositePlacement", "getOppositeVariationPlacement", "flip", "_ref", "state", "options", "name", "_options$mainAxis", "checkMainAxis", "_options$altAxis", "checkAltAxis", "specifiedFallbackPlacements", "padding", "boundary", "rootBoundary", "altBoundary", "_options$flipVariatio", "flipVariations", "allowedAutoPlacements", "preferredPlacement", "basePlacement", "isBasePlacement", "fallbackPlacements", "placements", "acc", "computeAutoPlacement", "referenceRect", "popperRect", "checksMap", "makeFallbackChecks", "firstFittingPlacement", "i", "_basePlacement", "isStartVariation", "getVariation", "start", "isVertical", "top", "bottom", "len", "overflow", "detectOverflow", "mainVariationSide", "right", "left", "altVariationSide", "checks", "check", "numberOfChecks", "_loop", "_i", "fittingPlacement", "_ret", "flip_default", "getSideOffsets", "overflow", "rect", "preventedOffsets", "isAnySideFullyClipped", "top", "right", "bottom", "left", "side", "hide", "_ref", "state", "name", "referenceRect", "popperRect", "referenceOverflow", "detectOverflow", "popperAltOverflow", "referenceClippingOffsets", "popperEscapeOffsets", "isReferenceHidden", "hasPopperEscaped", "hide_default", "distanceAndSkiddingToXY", "placement", "rects", "offset", "basePlacement", "getBasePlacement", "invertDistance", "left", "top", "_ref", "skidding", "distance", "right", "_ref2", "state", "options", "name", "_options$offset", "data", "placements", "acc", "_data$state$placement", "x", "y", "offset_default", "popperOffsets", "_ref", "state", "name", "computeOffsets", "popperOffsets_default", "getAltAxis", "axis", "preventOverflow", "_ref", "state", "options", "name", "_options$mainAxis", "checkMainAxis", "_options$altAxis", "checkAltAxis", "boundary", "rootBoundary", "altBoundary", "padding", "_options$tether", "tether", "_options$tetherOffset", "tetherOffset", "overflow", "detectOverflow", "basePlacement", "getBasePlacement", "variation", "getVariation", "isBasePlacement", "mainAxis", "getMainAxisFromPlacement", "altAxis", "getAltAxis", "popperOffsets", "referenceRect", "popperRect", "tetherOffsetValue", "normalizedTetherOffsetValue", "offsetModifierState", "data", "_offsetModifierState$", "mainSide", "top", "left", "altSide", "bottom", "right", "len", "offset", "min", "max", "additive", "minLen", "start", "maxLen", "arrowElement", "arrowRect", "getLayoutRect", "arrowPaddingObject", "getFreshSideObject", "arrowPaddingMin", "arrowPaddingMax", "arrowLen", "within", "minOffset", "maxOffset", "arrowOffsetParent", "getOffsetParent", "clientOffset", "offsetModifierValue", "tetherMin", "tetherMax", "preventedOffset", "_offsetModifierState$2", "_mainSide", "_altSide", "_offset", "_len", "_min", "_max", "isOriginSide", "_offsetModifierValue", "_tetherMin", "_tetherMax", "_preventedOffset", "withinMaxClamp", "preventOverflow_default", "getHTMLElementScroll", "element", "getNodeScroll", "node", "getWindow", "isHTMLElement", "getWindowScroll", "getHTMLElementScroll", "isElementScaled", "element", "rect", "scaleX", "round", "scaleY", "getCompositeRect", "elementOrVirtualElement", "offsetParent", "isFixed", "isOffsetParentAnElement", "isHTMLElement", "offsetParentIsScaled", "documentElement", "getDocumentElement", "getBoundingClientRect", "scroll", "offsets", "getNodeName", "isScrollParent", "getNodeScroll", "getWindowScrollBarX", "order", "modifiers", "map", "visited", "result", "modifier", "sort", "requires", "dep", "depModifier", "orderModifiers", "orderedModifiers", "modifierPhases", "acc", "phase", "debounce", "fn", "pending", "resolve", "mergeByName", "modifiers", "merged", "current", "existing", "key", "DEFAULT_OPTIONS", "areValidElements", "_len", "args", "_key", "element", "popperGenerator", "generatorOptions", "_generatorOptions", "_generatorOptions$def", "defaultModifiers", "_generatorOptions$def2", "defaultOptions", "reference", "popper", "options", "state", "effectCleanupFns", "isDestroyed", "instance", "setOptionsAction", "cleanupModifierEffects", "isElement", "listScrollParents", "orderedModifiers", "orderModifiers", "mergeByName", "m", "runModifierEffects", "_state$elements", "getCompositeRect", "getOffsetParent", "getLayoutRect", "modifier", "index", "_state$orderedModifie", "fn", "_state$orderedModifie2", "_options", "name", "debounce", "resolve", "_ref", "_ref$options", "effect", "cleanupFn", "noopFn", "createPopper", "defaultModifiers", "eventListeners_default", "popperOffsets_default", "computeStyles_default", "applyStyles_default", "createPopper", "popperGenerator", "defaultModifiers", "eventListeners_default", "popperOffsets_default", "computeStyles_default", "applyStyles_default", "offset_default", "flip_default", "preventOverflow_default", "arrow_default", "hide_default", "createPopper", "popperGenerator", "elementMap", "Map", "Data", "set", "element", "key", "instance", "has", "instanceMap", "get", "size", "console", "error", "Array", "from", "keys", "remove", "delete", "MAX_UID", "MILLISECONDS_MULTIPLIER", "TRANSITION_END", "parseSelector", "selector", "window", "CSS", "escape", "replace", "match", "id", "toType", "object", "Object", "prototype", "toString", "call", "toLowerCase", "getUID", "prefix", "Math", "floor", "random", "document", "getElementById", "getTransitionDurationFromElement", "transitionDuration", "transitionDelay", "getComputedStyle", "floatTransitionDuration", "Number", "parseFloat", "floatTransitionDelay", "split", "triggerTransitionEnd", "dispatchEvent", "Event", "isElement", "jquery", "nodeType", "getElement", "length", "querySelector", "isVisible", "getClientRects", "elementIsVisible", "getPropertyValue", "closedDetails", "closest", "summary", "parentNode", "isDisabled", "Node", "ELEMENT_NODE", "classList", "contains", "disabled", "hasAttribute", "getAttribute", "findShadowRoot", "documentElement", "attachShadow", "getRootNode", "root", "ShadowRoot", "noop", "reflow", "offsetHeight", "getjQuery", "jQuery", "body", "DOMContentLoadedCallbacks", "onDOMContentLoaded", "callback", "readyState", "addEventListener", "push", "isRTL", "dir", "defineJQueryPlugin", "plugin", "$", "name", "NAME", "JQUERY_NO_CONFLICT", "fn", "jQueryInterface", "Constructor", "noConflict", "execute", "possibleCallback", "args", "defaultValue", "executeAfterTransition", "transitionElement", "waitForTransition", "emulatedDuration", "called", "handler", "target", "removeEventListener", "setTimeout", "getNextActiveElement", "list", "activeElement", "shouldGetNext", "isCycleAllowed", "listLength", "index", "indexOf", "max", "min", "namespaceRegex", "stripNameRegex", "stripUidRegex", "eventRegistry", "uidEvent", "customEvents", "mouseenter", "mouseleave", "nativeEvents", "Set", "makeEventUid", "uid", "getElementEvents", "bootstrapHandler", "event", "hydrateObj", "delegateTarget", "oneOff", "EventHandler", "off", "type", "apply", "bootstrapDelegationHandler", "domElements", "querySelectorAll", "domElement", "findHandler", "events", "callable", "delegationSelector", "values", "find", "normalizeParameters", "originalTypeEvent", "delegationFunction", "isDelegated", "typeEvent", "getTypeEvent", "addHandler", "relatedTarget", "handlers", "previousFunction", "removeHandler", "Boolean", "removeNamespacedHandlers", "namespace", "storeElementEvent", "handlerKey", "entries", "includes", "on", "one", "inNamespace", "isNamespace", "startsWith", "elementEvent", "slice", "keyHandlers", "trigger", "jQueryEvent", "bubbles", "nativeDispatch", "defaultPrevented", "isPropagationStopped", "isImmediatePropagationStopped", "isDefaultPrevented", "evt", "cancelable", "preventDefault", "obj", "meta", "value", "defineProperty", "configurable", "normalizeData", "JSON", "parse", "decodeURIComponent", "normalizeDataKey", "chr", "Manipulator", "setDataAttribute", "setAttribute", "removeDataAttribute", "removeAttribute", "getDataAttributes", "attributes", "bsKeys", "dataset", "filter", "pureKey", "charAt", "getDataAttribute", "Config", "Default", "DefaultType", "Error", "_getConfig", "config", "_mergeConfigObj", "_configAfterMerge", "_typeCheckConfig", "jsonConfig", "constructor", "configTypes", "property", "expectedTypes", "valueType", "RegExp", "test", "TypeError", "toUpperCase", "VERSION", "BaseComponent", "_element", "_config", "DATA_KEY", "dispose", "EVENT_KEY", "propertyName", "getOwnPropertyNames", "_queueCallback", "isAnimated", "getInstance", "getOrCreateInstance", "eventName", "getSelector", "hrefAttribute", "trim", "map", "sel", "join", "SelectorEngine", "concat", "Element", "findOne", "children", "child", "matches", "parents", "ancestor", "prev", "previous", "previousElementSibling", "next", "nextElementSibling", "focusableChildren", "focusables", "el", "getSelectorFromElement", "getElementFromSelector", "getMultipleElementsFromSelector", "enableDismissTrigger", "component", "method", "clickEvent", "tagName", "EVENT_CLOSE", "EVENT_CLOSED", "CLASS_NAME_FADE", "CLASS_NAME_SHOW", "Alert", "close", "_destroyElement", "each", "data", "undefined", "DATA_API_KEY", "CLASS_NAME_ACTIVE", "SELECTOR_DATA_TOGGLE", "EVENT_CLICK_DATA_API", "Button", "toggle", "button", "EVENT_TOUCHSTART", "EVENT_TOUCHMOVE", "EVENT_TOUCHEND", "EVENT_POINTERDOWN", "EVENT_POINTERUP", "POINTER_TYPE_TOUCH", "POINTER_TYPE_PEN", "CLASS_NAME_POINTER_EVENT", "SWIPE_THRESHOLD", "endCallback", "leftCallback", "rightCallback", "Swipe", "isSupported", "_deltaX", "_supportPointerEvents", "PointerEvent", "_initEvents", "_start", "touches", "clientX", "_eventIsPointerPenTouch", "_end", "_handleSwipe", "_move", "absDeltaX", "abs", "direction", "add", "pointerType", "navigator", "maxTouchPoints", "ARROW_LEFT_KEY", "ARROW_RIGHT_KEY", "TOUCHEVENT_COMPAT_WAIT", "ORDER_NEXT", "ORDER_PREV", "DIRECTION_LEFT", "DIRECTION_RIGHT", "EVENT_SLIDE", "EVENT_SLID", "EVENT_KEYDOWN", "EVENT_MOUSEENTER", "EVENT_MOUSELEAVE", "EVENT_DRAG_START", "EVENT_LOAD_DATA_API", "CLASS_NAME_CAROUSEL", "CLASS_NAME_SLIDE", "CLASS_NAME_END", "CLASS_NAME_START", "CLASS_NAME_NEXT", "CLASS_NAME_PREV", "SELECTOR_ACTIVE", "SELECTOR_ITEM", "SELECTOR_ACTIVE_ITEM", "SELECTOR_ITEM_IMG", "SELECTOR_INDICATORS", "SELECTOR_DATA_SLIDE", "SELECTOR_DATA_RIDE", "KEY_TO_DIRECTION", "interval", "keyboard", "pause", "ride", "touch", "wrap", "Carousel", "_interval", "_activeElement", "_isSliding", "touchTimeout", "_swipeHelper", "_indicatorsElement", "_addEventListeners", "cycle", "_slide", "nextWhenVisible", "hidden", "_clearInterval", "_updateInterval", "setInterval", "_maybeEnableCycle", "to", "items", "_getItems", "activeIndex", "_getItemIndex", "_getActive", "order", "defaultInterval", "_keydown", "_addTouchEventListeners", "img", "swipeConfig", "_directionToOrder", "endCallBack", "clearTimeout", "_setActiveIndicatorElement", "activeIndicator", "newActiveIndicator", "elementInterval", "parseInt", "isNext", "nextElement", "nextElementIndex", "triggerEvent", "_orderToDirection", "isCycling", "directionalClassName", "orderClassName", "completeCallBack", "_isAnimated", "clearInterval", "carousel", "slideIndex", "carousels", "EVENT_SHOW", "EVENT_SHOWN", "EVENT_HIDE", "EVENT_HIDDEN", "CLASS_NAME_COLLAPSE", "CLASS_NAME_COLLAPSING", "CLASS_NAME_COLLAPSED", "CLASS_NAME_DEEPER_CHILDREN", "CLASS_NAME_HORIZONTAL", "WIDTH", "HEIGHT", "SELECTOR_ACTIVES", "parent", "Collapse", "_isTransitioning", "_triggerArray", "toggleList", "elem", "filterElement", "foundElement", "_initializeChildren", "_addAriaAndCollapsedClass", "_isShown", "hide", "show", "activeChildren", "_getFirstLevelChildren", "activeInstance", "dimension", "_getDimension", "style", "complete", "scrollSize", "getBoundingClientRect", "selected", "triggerArray", "isOpen", "ESCAPE_KEY", "TAB_KEY", "ARROW_UP_KEY", "ARROW_DOWN_KEY", "RIGHT_MOUSE_BUTTON", "EVENT_KEYDOWN_DATA_API", "EVENT_KEYUP_DATA_API", "CLASS_NAME_DROPUP", "CLASS_NAME_DROPEND", "CLASS_NAME_DROPSTART", "CLASS_NAME_DROPUP_CENTER", "CLASS_NAME_DROPDOWN_CENTER", "SELECTOR_DATA_TOGGLE_SHOWN", "SELECTOR_MENU", "SELECTOR_NAVBAR", "SELECTOR_NAVBAR_NAV", "SELECTOR_VISIBLE_ITEMS", "PLACEMENT_TOP", "PLACEMENT_TOPEND", "PLACEMENT_BOTTOM", "PLACEMENT_BOTTOMEND", "PLACEMENT_RIGHT", "PLACEMENT_LEFT", "PLACEMENT_TOPCENTER", "PLACEMENT_BOTTOMCENTER", "autoClose", "boundary", "display", "offset", "popperConfig", "reference", "Dropdown", "_popper", "_parent", "_menu", "_inNavbar", "_detectNavbar", "showEvent", "_createPopper", "focus", "_completeHide", "destroy", "update", "hideEvent", "Popper", "referenceElement", "_getPopperConfig", "createPopper", "_getPlacement", "parentDropdown", "isEnd", "_getOffset", "popperData", "defaultBsPopperConfig", "placement", "modifiers", "options", "enabled", "_selectMenuItem", "clearMenus", "openToggles", "context", "composedPath", "isMenuTarget", "dataApiKeydownHandler", "isInput", "isEscapeEvent", "isUpOrDownEvent", "getToggleButton", "stopPropagation", "EVENT_MOUSEDOWN", "className", "clickCallback", "rootElement", "Backdrop", "_isAppended", "_append", "_getElement", "_emulateAnimation", "backdrop", "createElement", "append", "EVENT_FOCUSIN", "EVENT_KEYDOWN_TAB", "TAB_NAV_FORWARD", "TAB_NAV_BACKWARD", "autofocus", "trapElement", "FocusTrap", "_isActive", "_lastTabNavDirection", "activate", "_handleFocusin", "_handleKeydown", "deactivate", "elements", "shiftKey", "SELECTOR_FIXED_CONTENT", "SELECTOR_STICKY_CONTENT", "PROPERTY_PADDING", "PROPERTY_MARGIN", "ScrollBarHelper", "getWidth", "documentWidth", "clientWidth", "innerWidth", "width", "_disableOverFlow", "_setElementAttributes", "calculatedValue", "reset", "_resetElementAttributes", "isOverflowing", "_saveInitialAttribute", "overflow", "styleProperty", "scrollbarWidth", "manipulationCallBack", "setProperty", "_applyManipulationCallback", "actualValue", "removeProperty", "callBack", "EVENT_HIDE_PREVENTED", "EVENT_RESIZE", "EVENT_CLICK_DISMISS", "EVENT_MOUSEDOWN_DISMISS", "EVENT_KEYDOWN_DISMISS", "CLASS_NAME_OPEN", "CLASS_NAME_STATIC", "OPEN_SELECTOR", "SELECTOR_DIALOG", "SELECTOR_MODAL_BODY", "Modal", "_dialog", "_backdrop", "_initializeBackDrop", "_focustrap", "_initializeFocusTrap", "_scrollBar", "_adjustDialog", "_showElement", "_hideModal", "handleUpdate", "scrollTop", "modalBody", "transitionComplete", "_triggerBackdropTransition", "event2", "_resetAdjustments", "isModalOverflowing", "scrollHeight", "clientHeight", "initialOverflowY", "overflowY", "isBodyOverflowing", "paddingLeft", "paddingRight", "alreadyOpen", "CLASS_NAME_SHOWING", "CLASS_NAME_HIDING", "CLASS_NAME_BACKDROP", "scroll", "Offcanvas", "blur", "completeCallback", "position", "ARIA_ATTRIBUTE_PATTERN", "DefaultAllowlist", "a", "area", "b", "br", "col", "code", "dd", "div", "dl", "dt", "em", "hr", "h1", "h2", "h3", "h4", "h5", "h6", "i", "li", "ol", "p", "pre", "s", "small", "span", "sub", "sup", "strong", "u", "ul", "uriAttributes", "SAFE_URL_PATTERN", "allowedAttribute", "attribute", "allowedAttributeList", "attributeName", "nodeName", "nodeValue", "attributeRegex", "some", "regex", "sanitizeHtml", "unsafeHtml", "allowList", "sanitizeFunction", "createdDocument", "DOMParser", "parseFromString", "elementName", "attributeList", "allowedAttributes", "innerHTML", "content", "extraClass", "html", "sanitize", "sanitizeFn", "template", "DefaultContentType", "entry", "TemplateFactory", "getContent", "_resolvePossibleFunction", "hasContent", "changeContent", "_checkContent", "toHtml", "templateWrapper", "_maybeSanitize", "text", "_setContent", "arg", "templateElement", "_putElementInTemplate", "textContent", "DISALLOWED_ATTRIBUTES", "CLASS_NAME_MODAL", "SELECTOR_TOOLTIP_INNER", "SELECTOR_MODAL", "EVENT_MODAL_HIDE", "TRIGGER_HOVER", "TRIGGER_FOCUS", "TRIGGER_CLICK", "TRIGGER_MANUAL", "EVENT_INSERTED", "EVENT_CLICK", "EVENT_FOCUSOUT", "AttachmentMap", "AUTO", "TOP", "RIGHT", "BOTTOM", "LEFT", "animation", "container", "customClass", "delay", "fallbackPlacements", "title", "Tooltip", "_isEnabled", "_timeout", "_isHovered", "_activeTrigger", "_templateFactory", "_newContent", "tip", "_setListeners", "_fixTitle", "enable", "disable", "toggleEnabled", "_leave", "_enter", "_hideModalHandler", "_disposePopper", "_isWithContent", "isInTheDom", "ownerDocument", "_getTipElement", "_isWithActiveTrigger", "_getTitle", "_createTipElement", "_getContentForTemplate", "_getTemplateFactory", "tipId", "setContent", "_initializeOnDelegatedTarget", "_getDelegateConfig", "attachment", "phase", "state", "triggers", "eventIn", "eventOut", "_setTimeout", "timeout", "dataAttributes", "dataAttribute", "SELECTOR_TITLE", "SELECTOR_CONTENT", "Popover", "_getContent", "EVENT_ACTIVATE", "CLASS_NAME_DROPDOWN_ITEM", "SELECTOR_DATA_SPY", "SELECTOR_TARGET_LINKS", "SELECTOR_NAV_LIST_GROUP", "SELECTOR_NAV_LINKS", "SELECTOR_NAV_ITEMS", "SELECTOR_LIST_ITEMS", "SELECTOR_LINK_ITEMS", "SELECTOR_DROPDOWN", "SELECTOR_DROPDOWN_TOGGLE", "rootMargin", "smoothScroll", "threshold", "ScrollSpy", "_targetLinks", "_observableSections", "_rootElement", "_activeTarget", "_observer", "_previousScrollData", "visibleEntryTop", "parentScrollTop", "refresh", "_initializeTargetsAndObservables", "_maybeEnableSmoothScroll", "disconnect", "_getNewObserver", "section", "observe", "observableSection", "hash", "height", "offsetTop", "scrollTo", "top", "behavior", "IntersectionObserver", "_observerCallback", "targetElement", "_process", "userScrollsDown", "isIntersecting", "_clearActiveClass", "entryIsLowerThanPrevious", "targetLinks", "anchor", "decodeURI", "_activateParents", "listGroup", "item", "activeNodes", "node", "spy", "HOME_KEY", "END_KEY", "CLASS_DROPDOWN", "SELECTOR_DROPDOWN_MENU", "NOT_SELECTOR_DROPDOWN_TOGGLE", "SELECTOR_TAB_PANEL", "SELECTOR_OUTER", "SELECTOR_INNER", "SELECTOR_INNER_ELEM", "SELECTOR_DATA_TOGGLE_ACTIVE", "Tab", "_setInitialAttributes", "_getChildren", "innerElem", "_elemIsActive", "active", "_getActiveElem", "_deactivate", "_activate", "relatedElem", "_toggleDropDown", "nextActiveElement", "preventScroll", "_setAttributeIfNotExists", "_setInitialAttributesOnChild", "_getInnerElement", "isActive", "outerElem", "_getOuterElement", "_setInitialAttributesOnTargetPanel", "open", "EVENT_MOUSEOVER", "EVENT_MOUSEOUT", "CLASS_NAME_HIDE", "autohide", "Toast", "_hasMouseInteraction", "_hasKeyboardInteraction", "_clearTimeout", "_maybeScheduleHide", "isShown", "_onInteraction", "isInteracting", "auto_redirect_controller_default", "Controller", "Modal", "autoSaveFlags", "flag", "submitButtons", "button", "radioBsTargetId", "form", "bsTargetId", "el", "__publicField", "import_debounce", "autosave_controller_default", "Controller", "noop", "uid", "id", "isNullOrUndef", "value", "isArray", "type", "isObject", "isNumberFinite", "finiteOrDefault", "defaultValue", "valueOrDefault", "toPercentage", "dimension", "toDimension", "callback", "fn", "args", "thisArg", "each", "loopable", "reverse", "i", "len", "keys", "_elementsEqual", "a0", "a1", "ilen", "v0", "v1", "clone$1", "source", "target", "klen", "k", "isValidKey", "key", "_merger", "options", "tval", "sval", "merge", "sources", "merger", "mergeIf", "_mergerIf", "keyResolvers", "v", "o", "resolveObjectKey", "obj", "key", "_getKeyResolver", "keys", "_splitKey", "k", "parts", "tmp", "part", "_capitalize", "str", "defined", "value", "isFunction", "setsEqual", "a", "b", "item", "_isClickEvent", "e", "PI", "TAU", "PITAU", "INFINITY", "RAD_PER_DEG", "HALF_PI", "QUARTER_PI", "TWO_THIRDS_PI", "log10", "sign", "niceNum", "range", "roundedRange", "almostEquals", "niceRange", "fraction", "_factorize", "result", "sqrt", "i", "isNumber", "n", "x", "y", "epsilon", "almostWhole", "rounded", "_setMinAndMaxByKey", "array", "target", "property", "ilen", "toRadians", "degrees", "toDegrees", "radians", "_decimalPlaces", "isNumberFinite", "p", "getAngleFromPoint", "centrePoint", "anglePoint", "distanceFromXCenter", "distanceFromYCenter", "radialDistanceFromCenter", "angle", "distanceBetweenPoints", "pt1", "pt2", "_angleDiff", "_normalizeAngle", "_angleBetween", "start", "end", "sameAngleIsFullCircle", "s", "angleToStart", "angleToEnd", "startToAngle", "endToAngle", "_limitValue", "min", "max", "_int16Range", "_isBetween", "_lookup", "table", "cmp", "index", "hi", "lo", "mid", "_lookupByKey", "last", "_rlookupByKey", "_filterBetween", "values", "arrayEvents", "listenArrayEvents", "listener", "method", "base", "args", "res", "object", "unlistenArrayEvents", "stub", "listeners", "_arrayUnique", "items", "set", "requestAnimFrame", "callback", "throttled", "fn", "thisArg", "updateFn", "updateArgs", "args", "ticking", "rest", "debounce", "delay", "timeout", "_toLeftRightCenter", "align", "_alignStartEnd", "start", "end", "_textX", "left", "right", "rtl", "_getStartAndCountOfVisiblePoints", "meta", "points", "animationsDisabled", "pointCount", "count", "iScale", "_parsed", "axis", "min", "max", "minDefined", "maxDefined", "_limitValue", "_lookupByKey", "_scaleRangesChanged", "xScale", "yScale", "_scaleRanges", "newRanges", "changed", "atEdge", "elasticIn", "s", "p", "TAU", "elasticOut", "effects", "HALF_PI", "PI", "round", "v", "lim", "l", "h", "p2b", "n2b", "b2n", "n2p", "map$1", "hex", "h1", "b", "h2", "eq", "isShort", "hexParse", "str", "len", "ret", "alpha", "a", "f", "hexString", "HUE_RE", "hsl2rgbn", "n", "k", "hsv2rgbn", "hwb2rgbn", "w", "rgb", "i", "hueValue", "r", "g", "d", "rgb2hsl", "calln", "c", "hsl2rgb", "hwb2rgb", "hsv2rgb", "hue", "hueParse", "m", "p1", "p2", "rotate", "deg", "hslString", "map", "names$1", "unpack", "unpacked", "keys", "tkeys", "j", "ok", "nk", "names", "nameParse", "RGB_RE", "rgbParse", "rgbString", "to", "from", "interpolate", "rgb1", "rgb2", "t", "modHSL", "ratio", "tmp", "clone", "proto", "fromObject", "input", "functionParse", "Color", "_Color", "type", "obj", "color", "weight", "c1", "c2", "w2", "w1", "val", "index_esm", "isPatternOrGradient", "value", "getHoverColor", "overrides", "descriptors", "getScope$1", "node", "key", "set", "root", "scope", "values", "merge", "Defaults", "_descriptors", "context", "ctx", "options", "name", "targetScope", "targetName", "scopeObject", "targetScopeObject", "privateName", "local", "target", "isObject", "valueOrDefault", "defaults", "toFontString", "font", "isNullOrUndef", "_measureText", "data", "gc", "longest", "string", "textWidth", "_longestText", "arrayOfThings", "cache", "ilen", "jlen", "thing", "nestedThing", "isArray", "gcLen", "_alignPixel", "chart", "pixel", "width", "devicePixelRatio", "halfWidth", "clearCanvas", "canvas", "drawPoint", "x", "y", "drawPointLegend", "xOffset", "yOffset", "size", "cornerRadius", "style", "rotation", "radius", "rad", "RAD_PER_DEG", "TWO_THIRDS_PI", "QUARTER_PI", "_isPointInArea", "point", "area", "margin", "clipArea", "unclipArea", "_steppedLineTo", "previous", "flip", "mode", "midpoint", "_bezierCurveTo", "renderText", "text", "opts", "lines", "stroke", "line", "setRenderOpts", "decorateText", "metrics", "top", "bottom", "yDecoration", "addRoundedRectPath", "rect", "LINE_HEIGHT", "FONT_STYLE", "toLineHeight", "matches", "numberOrZero", "_readValueToProps", "props", "objProps", "read", "prop", "toTRBL", "toTRBLCorners", "toPadding", "toFont", "fallback", "resolve", "inputs", "index", "info", "cacheable", "_addGrace", "minmax", "grace", "beginAtZero", "change", "toDimension", "keepZero", "add", "createContext", "parentContext", "_createResolver", "scopes", "prefixes", "rootScopes", "getTarget", "defined", "_resolve", "_cached", "_resolveWithPrefixes", "getKeysFromAllScopes", "storage", "_attachContext", "proxy", "subProxy", "descriptorDefaults", "receiver", "_resolveWithContext", "_scriptable", "_indexable", "_allKeys", "isFunction", "readKey", "prefix", "_capitalize", "needsSubResolver", "_proxy", "_context", "_subProxy", "_resolveScriptable", "_resolveArray", "_stack", "createSubResolver", "isIndexable", "arr", "item", "resolver", "resolveFallback", "getScope", "parent", "resolveObjectKey", "addScopes", "parentScopes", "parentFallback", "allScopes", "addScopesFromKey", "subGetTarget", "resolveKeysFromAllScopes", "_parseObjectDataRadialScale", "parsed", "EPSILON", "getPoint", "getValueAxis", "indexAxis", "splineCurve", "firstPoint", "middlePoint", "afterPoint", "current", "next", "d01", "distanceBetweenPoints", "d12", "s01", "s12", "fa", "fb", "monotoneAdjust", "deltaK", "mK", "pointsLen", "alphaK", "betaK", "tauK", "squaredMagnitude", "pointCurrent", "pointAfter", "almostEquals", "monotoneCompute", "valueAxis", "delta", "pointBefore", "iPixel", "vPixel", "splineCurveMonotone", "slopeDelta", "sign", "capControlPoint", "pt", "capBezierPoints", "inArea", "inAreaPrev", "inAreaNext", "_updateBezierControlPoints", "loop", "controlPoints", "prev", "_isDomSupported", "_getParentNode", "domNode", "parseMaxStyle", "styleValue", "parentProperty", "valueInPixels", "getComputedStyle", "element", "getStyle", "el", "property", "positions", "getPositionedStyle", "styles", "suffix", "result", "pos", "useOffsetPos", "getCanvasPosition", "e", "touches", "source", "offsetX", "offsetY", "box", "getRelativePosition", "evt", "currentDevicePixelRatio", "borderBox", "paddings", "borders", "height", "getContainerSize", "maxWidth", "maxHeight", "container", "containerStyle", "containerBorder", "containerPadding", "INFINITY", "round1", "getMaximumSize", "bbWidth", "bbHeight", "aspectRatio", "margins", "containerSize", "retinaScale", "forceRatio", "forceStyle", "pixelRatio", "deviceHeight", "deviceWidth", "supportsEventListenerOptions", "passiveSupported", "readUsedSize", "_pointInLine", "_steppedInterpolation", "_bezierInterpolation", "cp1", "cp2", "intlCache", "getNumberFormat", "locale", "cacheKey", "formatter", "formatNumber", "num", "getRightToLeftAdapter", "rectX", "itemWidth", "getLeftToRightAdapter", "_itemWidth", "getRtlAdapter", "overrideTextDirection", "direction", "original", "restoreTextDirection", "propertyFn", "_angleBetween", "_angleDiff", "_normalizeAngle", "_isBetween", "normalizeSegment", "getSegment", "segment", "bounds", "startBound", "endBound", "between", "normalize", "_boundSegment", "compare", "inside", "subStart", "prevValue", "startIsBefore", "endIsBefore", "shouldStart", "shouldStop", "_boundSegments", "segments", "sub", "findStartAndEnd", "spanGaps", "solidSegments", "last", "cur", "_computeSegments", "segmentOptions", "splitByStyles", "completeLoop", "doSplitByStyles", "chartContext", "baseStyle", "readStyle", "datasetIndex", "prevStyle", "addStyle", "st", "dir", "styleChanged", "Animator", "chart", "anims", "date", "type", "callbacks", "numSteps", "fn", "requestAnimFrame", "remaining", "items", "i", "draw", "item", "charts", "event", "cb", "acc", "cur", "animator", "transparent", "interpolators", "from", "to", "factor", "c0", "color", "c1", "Animation", "cfg", "target", "prop", "currentValue", "resolve", "effects", "elapsed", "remain", "duration", "loop", "promises", "res", "rej", "resolved", "method", "numbers", "colors", "defaults", "animationOptions", "name", "v", "Animations", "config", "isObject", "animatedProps", "key", "option", "isArray", "values", "newOptions", "options", "resolveTargetOptions", "animations", "awaitAll", "running", "props", "value", "animation", "properties", "keys", "anim", "scaleClip", "scale", "allowedOverflow", "opts", "reverse", "min", "max", "defaultClip", "xScale", "yScale", "x", "y", "toClip", "t", "r", "b", "l", "getSortedDatasetIndices", "filterVisible", "metasets", "ilen", "applyStack", "stack", "dsIndex", "singleMode", "datasetIndex", "otherValue", "isNumberFinite", "sign", "convertObjectDataToArray", "data", "adata", "isStacked", "meta", "stacked", "getStackKey", "indexScale", "valueScale", "getUserBounds", "minDefined", "maxDefined", "getOrCreateStack", "stacks", "stackKey", "indexValue", "subStack", "getLastIndexInStack", "vScale", "positive", "updateStacks", "controller", "parsed", "iScale", "iAxis", "vAxis", "index", "itemStacks", "getFirstScaleId", "axis", "scales", "createDatasetContext", "parent", "createContext", "createDataContext", "element", "clearStacks", "isDirectUpdateMode", "mode", "cloneIfNotShared", "cached", "shared", "createStack", "canStack", "DatasetController", "dataset", "chooseId", "xid", "valueOrDefault", "yid", "rid", "indexAxis", "iid", "vid", "scaleID", "unlistenArrayEvents", "_data", "listenArrayEvents", "resetNewElements", "stackChanged", "oldStacked", "scopeKeys", "scopes", "start", "count", "_stacked", "sorted", "prev", "isNotInOrderComparedToPrev", "labels", "singleScale", "xAxisKey", "yAxisKey", "resolveObjectKey", "range", "parsedValue", "_parsed", "otherScale", "otherMin", "otherMax", "_skip", "ctx", "elements", "area", "active", "drawActiveElementsOnTop", "context", "elementType", "cache", "cacheKey", "sharing", "defined", "prefixes", "names", "transition", "sharedOptions", "firstOpts", "previouslySharedOptions", "includeOptions", "arg1", "arg2", "numMeta", "numData", "end", "move", "arr", "removed", "args", "newCount", "getAllScaleValues", "visibleMetas", "_arrayUnique", "a", "computeMinSampleSize", "curr", "updateMinAndPrev", "computeFitCategoryTraits", "ruler", "stackCount", "thickness", "size", "ratio", "isNullOrUndef", "computeFlexCategoryTraits", "pixels", "next", "percent", "parseFloatBar", "entry", "startValue", "endValue", "barStart", "barEnd", "parseValue", "parseArrayOrPrimitive", "isFloatBar", "custom", "barSign", "actualBase", "borderProps", "top", "bottom", "setBorderSkipped", "edge", "parseEdge", "swap", "startEnd", "orig", "v1", "v2", "setInflateAmount", "inflateAmount", "BarController", "iAxisKey", "vAxisKey", "obj", "bars", "reset", "base", "horizontal", "vpixels", "ipixels", "last", "dataIndex", "skipNull", "val", "barThickness", "baseValue", "minBarLength", "floating", "length", "head", "startPixel", "endPixel", "halfGrid", "maxBarThickness", "center", "stackIndex", "rects", "BubbleController", "points", "point", "iPixel", "vPixel", "radius", "getRatioAndOffset", "rotation", "circumference", "cutout", "ratioX", "ratioY", "offsetX", "offsetY", "TAU", "startAngle", "endAngle", "startX", "startY", "endX", "endY", "calcMax", "angle", "_angleBetween", "calcMin", "maxX", "maxY", "HALF_PI", "minX", "PI", "minY", "DoughnutController", "getter", "toRadians", "chartArea", "arcs", "spacing", "maxSize", "toPercentage", "chartWeight", "maxWidth", "maxHeight", "maxRadius", "outerRadius", "toDimension", "innerRadius", "radiusLength", "animationOpts", "centerX", "centerY", "animateScale", "arc", "metaData", "total", "formatNumber", "ringWeightOffset", "pointStyle", "label", "style", "e", "legendItem", "legend", "tooltipItem", "dataLabel", "LineController", "line", "_dataset", "animationsDisabled", "_getStartAndCountOfVisiblePoints", "_scaleRangesChanged", "spanGaps", "segment", "maxGapLength", "isNumber", "directUpdate", "prevParsed", "nullData", "border", "firstPoint", "lastPoint", "PolarAreaController", "_parseObjectDataRadialScale", "minSize", "datasetStartAngle", "defaultAngle", "PieController", "RadarController", "pointPosition", "Element", "useFinalPosition", "final", "ret", "formatters", "tickValue", "ticks", "locale", "notation", "delta", "maxTick", "calculateDelta", "logDelta", "log10", "numDecimal", "Ticks", "_ctx", "autoSkip", "tickOpts", "ticksLimit", "determineMaxTicks", "majorIndices", "getMajorIndices", "numMajorIndices", "first", "newTicks", "skipMajors", "calculateSpacing", "avgMajorSpacing", "skip", "offset", "tickLength", "maxScale", "maxChart", "evenMajorSpacing", "getEvenSpacing", "factors", "_factorize", "result", "majorStart", "majorEnd", "len", "diff", "reverseAlign", "align", "offsetFromEdge", "sample", "numItems", "increment", "getPixelForGridLine", "offsetGridLines", "validIndex", "epsilon", "lineValue", "garbageCollect", "caches", "each", "gc", "gcLen", "getTickMarkLength", "getTitleHeight", "fallback", "font", "toFont", "padding", "toPadding", "createScaleContext", "createTickContext", "tick", "titleAlign", "position", "_toLeftRightCenter", "titleArgs", "left", "right", "titleX", "titleY", "height", "width", "_alignStartEnd", "positionAxisID", "Scale", "_Scale", "raw", "_userMin", "_userMax", "_suggestedMin", "_suggestedMax", "finiteOrDefault", "metas", "callback", "margins", "beginAtZero", "grace", "sampleSize", "_addGrace", "samplingEnabled", "reversePixels", "numTicks", "minRotation", "maxRotation", "labelRotation", "tickWidth", "maxLabelDiagonal", "labelSizes", "maxLabelWidth", "maxLabelHeight", "_limitValue", "toDegrees", "titleOpts", "gridOpts", "display", "isHorizontal", "titleHeight", "widest", "highest", "tickPadding", "angleRadians", "cos", "sin", "labelHeight", "labelWidth", "isRotated", "labelsBelowTicks", "offsetLeft", "offsetRight", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "widths", "heights", "widestLabelSize", "highestLabelSize", "j", "jlen", "tickFont", "fontString", "lineHeight", "nestedLabel", "_measureText", "valueAt", "idx", "pixel", "decimal", "_int16Range", "_alignPixel", "optionTicks", "rot", "w", "h", "grid", "ticksLength", "tl", "borderOpts", "axisWidth", "axisHalfWidth", "alignBorderValue", "borderValue", "alignedLineValue", "tx1", "ty1", "tx2", "ty2", "x1", "y1", "x2", "y2", "limit", "step", "optsAtIndex", "lineWidth", "lineColor", "borderDash", "borderDashOffset", "tickColor", "tickBorderDash", "tickBorderDashOffset", "crossAlign", "mirror", "tickAndPadding", "hTickAndPadding", "textAlign", "lineCount", "textOffset", "textBaseline", "halfCount", "strokeColor", "strokeWidth", "tickTextAlign", "backdrop", "labelPadding", "backgroundColor", "drawLine", "p1", "p2", "lastLineWidth", "clipArea", "renderText", "unclipArea", "title", "tz", "gz", "axisID", "fontSize", "TypedRegistry", "scope", "override", "proto", "parentScope", "isIChartComponent", "id", "registerDefaults", "overrides", "itemDefaults", "merge", "routeDefaults", "routes", "property", "propertyParts", "sourceName", "sourceScope", "parts", "targetName", "targetScope", "Registry", "typedRegistry", "arg", "reg", "itemReg", "registry", "component", "camelMethod", "_capitalize", "ScatterController", "showLine", "controllers", "abstract", "DateAdapter", "chartOptions", "format", "timestamp", "amount", "unit", "weekday", "members", "adapters", "binarySearch", "metaset", "intersect", "_sorted", "lookupMethod", "_rlookupByKey", "_lookupByKey", "el", "evaluateInteractionItems", "handler", "lo", "hi", "getDistanceMetricForAxis", "useX", "useY", "pt1", "pt2", "deltaX", "deltaY", "getIntersectItems", "includeInvisible", "_isPointInArea", "getNearestRadialItems", "evaluationFunc", "getAngleFromPoint", "getNearestCartesianItems", "distanceMetric", "minDistance", "inRange", "distance", "getNearestItems", "getAxisItems", "rangeMethod", "intersectsItem", "Interaction", "getRelativePosition", "STATIC_POSITIONS", "filterByPosition", "array", "filterDynamicPositionByAxis", "sortByWeight", "v0", "wrapBoxes", "boxes", "layoutBoxes", "box", "pos", "stackWeight", "buildStacks", "layouts", "wrap", "_stack", "setLayoutDims", "params", "vBoxMaxWidth", "hBoxMaxHeight", "layout", "fullSize", "buildLayoutBoxes", "centerHorizontal", "centerVertical", "getCombinedMax", "maxPadding", "updateMaxPadding", "boxPadding", "updateDims", "newWidth", "newHeight", "widthChanged", "heightChanged", "handleMaxPadding", "updatePos", "change", "getMargins", "marginForPositions", "positions", "margin", "fitBoxes", "refitBoxes", "refit", "changed", "same", "other", "setBoxDims", "placeBoxes", "userPadding", "weight", "layoutItem", "minPadding", "availableWidth", "availableHeight", "verticalBoxes", "horizontalBoxes", "visibleVerticalBoxCount", "BasePlatform", "canvas", "aspectRatio", "listener", "BasicPlatform", "EXPANDO_KEY", "EVENT_TYPES", "isNullOrEmpty", "initCanvas", "renderHeight", "renderWidth", "displayWidth", "readUsedSize", "displayHeight", "eventListenerOptions", "supportsEventListenerOptions", "addListener", "node", "removeListener", "fromNativeEvent", "nodeListContains", "nodeList", "createAttachObserver", "observer", "entries", "trigger", "createDetachObserver", "drpListeningCharts", "oldDevicePixelRatio", "onWindowResize", "dpr", "resize", "listenDevicePixelRatioChanges", "unlistenDevicePixelRatioChanges", "createResizeObserver", "container", "_getParentNode", "throttled", "releaseObserver", "createProxyAndListen", "proxy", "DomPlatform", "initial", "proxies", "getMaximumSize", "_detectPlatform", "_isDomSupported", "PluginService", "hook", "filter", "descriptors", "descriptor", "plugin", "all", "plugins", "allPlugins", "createDescriptors", "previousDescriptors", "localIds", "local", "getOpts", "pluginOpts", "getIndexAxis", "datasetDefaults", "getAxisFromDefaultScaleID", "getDefaultScaleIDFromAxis", "axisFromPosition", "determineAxis", "scaleOptions", "mergeScaleConfig", "chartDefaults", "configScales", "chartIndexAxis", "firstIDs", "scaleConf", "defaultId", "defaultScaleOptions", "mergeIf", "defaultID", "initOptions", "initData", "initConfig", "keyCache", "keysCached", "cachedKeys", "generate", "addIfFound", "set", "Config", "datasetType", "mainScope", "resetCache", "_scopeCache", "keyLists", "resolver", "subPrefixes", "getResolver", "needContext", "isFunction", "subResolver", "_attachContext", "descriptorDefaults", "resolverCache", "_createResolver", "p", "hasFunction", "isScriptable", "isIndexable", "_descriptors", "scriptable", "indexable", "version", "KNOWN_POSITIONS", "positionIsHorizontal", "compare2Level", "l1", "l2", "onAnimationsComplete", "onAnimationProgress", "getCanvas", "instances", "getChart", "c", "moveNumericKeys", "intKey", "determineLastEvent", "lastEvent", "inChartArea", "isClick", "Chart", "userConfig", "initialCanvas", "existingChart", "uid", "debounce", "maintainAspectRatio", "_aspectRatio", "retinaScale", "clearCanvas", "newSize", "newRatio", "scalesOptions", "axisOptions", "scaleOpts", "updated", "isRadial", "scaleType", "scaleClass", "hasUpdated", "datasets", "newControllers", "ControllerClass", "datasetElementType", "dataElementType", "animsDisabled", "_active", "_lastEvent", "existingEvents", "newEvents", "setsEqual", "_hiddenIndices", "changes", "_dataChanges", "datasetCount", "makeSet", "changeSet", "noArea", "layers", "clip", "useClip", "visible", "listeners", "platform", "_add", "_remove", "detached", "attached", "enabled", "prefix", "activeElements", "lastActive", "_elementsEqual", "replay", "hoverOptions", "deactivated", "activated", "eventFilter", "_isClickEvent", "invalidatePlugins", "enumerable", "clipArc", "pixelMargin", "angleMargin", "toRadiusCorners", "_readValueToProps", "parseBorderRadius$1", "angleDelta", "o", "halfThickness", "innerLimit", "computeOuterLimit", "outerArcLimit", "rThetaToXY", "theta", "pathArc", "circular", "innerR", "spacingOffset", "alpha", "noSpacingInnerRadius", "noSpacingOuterRadius", "avNogSpacingRadius", "adjustedAngle", "beta", "angleOffset", "outerStart", "outerEnd", "innerStart", "innerEnd", "outerStartAdjustedRadius", "outerEndAdjustedRadius", "outerStartAdjustedAngle", "outerEndAdjustedAngle", "innerStartAdjustedRadius", "innerEndAdjustedRadius", "innerStartAdjustedAngle", "innerEndAdjustedAngle", "pCenter", "p4", "p8", "outerStartX", "outerStartY", "outerEndX", "outerEndY", "drawArc", "fullCircles", "drawFullCircleBorders", "inner", "drawBorder", "borderWidth", "borderJoinStyle", "ArcElement", "chartX", "chartY", "rAdjust", "betweenAngles", "withinRadius", "_isBetween", "halfAngle", "halfRadius", "radiusOffset", "setStyle", "lineTo", "previous", "getLineMethod", "_steppedLineTo", "_bezierCurveTo", "pathVars", "paramsStart", "paramsEnd", "segmentStart", "segmentEnd", "outside", "pathSegment", "lineMethod", "fastPathSegment", "avgX", "countX", "prevX", "lastY", "pointIndex", "drawX", "truncX", "_getSegmentMethod", "_getInterpolationMethod", "_steppedInterpolation", "_bezierInterpolation", "_pointInLine", "strokePathWithCache", "path", "strokePathDirect", "segments", "segmentMethod", "usePath2D", "LineElement", "_updateBezierControlPoints", "_computeSegments", "_boundSegments", "_interpolate", "interpolated", "inRange$1", "PointElement", "mouseX", "mouseY", "drawPoint", "getBarBounds", "bar", "half", "skipOrLimit", "parseBorderWidth", "maxW", "maxH", "toTRBL", "parseBorderRadius", "enableBorderRadius", "toTRBLCorners", "maxR", "enableBorder", "boundingRects", "bounds", "skipX", "skipY", "hasRadius", "addNormalRectPath", "rect", "inflateRect", "refRect", "BarElement", "borderColor", "outer", "addRectPath", "addRoundedRectPath", "lttbDecimation", "samples", "decimated", "bucketWidth", "sampledIndex", "endIndex", "maxAreaPoint", "maxArea", "nextA", "avgY", "avgRangeStart", "avgRangeEnd", "avgRangeLength", "rangeOffs", "rangeTo", "pointAx", "pointAy", "minMaxDecimation", "minIndex", "maxIndex", "startIndex", "xMin", "dx", "lastIndex", "intermediateIndex1", "intermediateIndex2", "cleanDecimatedDataset", "cleanDecimatedData", "getStartAndCountOfVisiblePointsSimplified", "pointCount", "plugin_decimation", "xAxis", "threshold", "d", "_segments", "tpoints", "_findSegmentEnd", "_getBounds", "targetSegments", "tgt", "subBounds", "fillSources", "_boundSegment", "fillSource", "_getEdge", "_normalizeAngle", "_pointsFromSegments", "boundary", "linePoints", "_createBoundaryLine", "_loop", "_shouldApplyFill", "source", "_resolveTarget", "sources", "propagate", "fill", "visited", "_decodeFill", "parseFillOption", "decodeTargetIndex", "firstCh", "_getTargetPixel", "_getTargetValue", "fillOption", "_buildStackLine", "sourcePoints", "linesBelow", "getLinesBelow", "addPointsBelow", "below", "sourcePoint", "postponed", "findPoint", "pointValue", "firstValue", "lastValue", "simpleArc", "_getTarget", "getLineByIndex", "computeBoundary", "computeCircularBoundary", "computeLinearBoundary", "_drawfill", "lineOpts", "above", "doFill", "clipVertical", "clipY", "lineLoop", "src", "notShape", "clipBounds", "interpolatedLineTo", "targetLoop", "interpolatedPoint", "_args", "getBoxSize", "labelOpts", "boxHeight", "boxWidth", "itemsEqual", "Legend", "legendItems", "labelFont", "itemHeight", "hitboxes", "lineWidths", "totalHeight", "row", "itemWidth", "columnSizes", "heightLimit", "totalWidth", "currentColWidth", "currentColHeight", "col", "rtl", "rtlHelper", "getRtlAdapter", "hitbox", "defaultColor", "fontColor", "halfFontSize", "cursor", "drawLegendBox", "drawOptions", "drawPointLegend", "yBoxTop", "xBoxLeft", "borderRadius", "fillText", "overrideTextDirection", "textWidth", "realX", "_textX", "restoreTextDirection", "titleFont", "titlePadding", "topPaddingPlusHalfFontSize", "hitBox", "lh", "isListened", "hoveredItem", "sameItem", "plugin_legend", "ci", "usePointStyle", "Title", "textSize", "fontOpts", "createTitle", "plugin_title", "titleBlock", "map", "plugin_subtitle", "positioners", "eventPosition", "nearestElement", "distanceBetweenPoints", "tp", "pushOrConcat", "toPush", "splitNewlines", "str", "createTooltipItem", "getTooltipSize", "tooltip", "body", "footer", "bodyFont", "footerFont", "titleLineCount", "footerLineCount", "bodyLineItemCount", "combinedBodyLength", "bodyItem", "bodyLineHeight", "widthPadding", "maxLineWidth", "determineYAlign", "doesNotFitWithAlign", "xAlign", "caret", "determineXAlign", "yAlign", "chartWidth", "determineAlignment", "alignX", "alignY", "paddingAndSize", "getBackgroundPoint", "alignment", "caretSize", "caretPadding", "cornerRadius", "topLeft", "topRight", "bottomLeft", "bottomRight", "getAlignedX", "getBeforeAfterBodyLines", "createTooltipContext", "tooltipItems", "overrideCallbacks", "Tooltip", "beforeTitle", "afterTitle", "lines", "bodyItems", "scoped", "beforeFooter", "afterFooter", "labelColors", "labelPointStyles", "labelTextColors", "positionAndSize", "backgroundPoint", "tooltipPoint", "caretPosition", "ptX", "ptY", "x3", "y3", "pt", "titleSpacing", "labelPointStyle", "colorX", "rtlColorX", "yOffSet", "colorY", "outerX", "innerX", "bodySpacing", "bodyAlign", "displayColors", "xLinePadding", "fillLineOfText", "bodyAlignForCalculation", "textColor", "tooltipSize", "animX", "animY", "opacity", "hasTooltipContent", "positionChanged", "caretX", "caretY", "plugin_tooltip", "noop", "labelCount", "addIfString", "addedLabels", "findOrAddLabel", "CategoryScale", "added", "generateTicks$1", "generationOptions", "dataRange", "precision", "maxTicks", "maxDigits", "includeBounds", "maxSpaces", "rmin", "rmax", "countDefined", "minSpacing", "niceNum", "niceMin", "niceMax", "numSpaces", "almostWhole", "almostEquals", "decimalPlaces", "_decimalPlaces", "relativeLabelSize", "rad", "LinearScaleBase", "setMin", "setMax", "minSign", "maxSign", "maxTicksLimit", "stepSize", "numericGeneratorOptions", "_setMinAndMaxByKey", "LinearScale", "isMajor", "tickVal", "generateTicks", "endExp", "endSignificand", "exp", "significand", "lastTick", "LogarithmicScale", "m", "getTickBackdropHeight", "measureLabelSize", "_longestText", "determineLimits", "fitWithPointLabels", "limits", "valueCount", "pointLabelOpts", "additionalAngle", "plFont", "hLimits", "vLimits", "updateLimits", "buildPointLabelItems", "extra", "outerDistance", "pointLabelPosition", "yForAngle", "getTextAlignForAngle", "leftForTextAlign", "drawPointLabels", "pointLabels", "backdropColor", "backdropLeft", "backdropTop", "backdropWidth", "backdropHeight", "pathRadiusLine", "drawRadiusLine", "gridLineOpts", "createPointLabelContext", "RadialLinearScale", "leftMovement", "rightMovement", "topMovement", "bottomMovement", "angleMultiplier", "scalingFactor", "scaledDistance", "pointLabel", "distanceFromCenter", "angleLines", "INTERVALS", "UNITS", "sorter", "parse", "input", "adapter", "parser", "round", "isoWeekday", "determineUnitForAutoTicks", "minUnit", "capacity", "interval", "determineUnitForFormatting", "determineMajorUnit", "addTick", "time", "timestamps", "_lookup", "setMajorTicks", "majorUnit", "major", "ticksFromTimestamps", "TimeScale", "_applyBounds", "timeOpts", "_filterBetween", "minor", "hasWeekday", "formats", "minorFormat", "majorFormat", "formatter", "offsets", "ticksOpts", "tickLabelWidth", "cosRotation", "sinRotation", "tickFontSize", "exampleTime", "displayFormats", "exampleLabel", "interpolate", "table", "prevSource", "nextSource", "prevTarget", "nextTarget", "span", "TimeSeriesScale", "registerables", "Chart", "registerables", "auto_default", "__defProp", "__getOwnPropSymbols", "__hasOwnProp", "__propIsEnum", "__defNormalProp", "obj", "key", "value", "__spreadValues", "a", "b", "prop", "src_default", "Controller", "element", "auto_default", "chartjs_controller_default", "src_default", "c", "Controller", "t", "h", "checkbox_select_all_controller_default", "h", "checkbox_to_form_controller_default", "Controller", "checkbox", "element", "event", "currentCheckboxValue", "existingCheckbox", "newHiddenField", "__publicField", "clipboard_controller_default", "Controller", "text", "error", "__publicField", "collapse_all_controller_default", "Controller", "_event", "element", "__publicField", "collapse_aria_label_controller_default", "Controller", "targetId", "event", "hadFocus", "isExpanded", "name", "label", "active", "collapse_controller_default", "Controller", "Collapse", "SUBMIT_DELAY_MS", "countdown_controller_default", "Controller", "date", "difference", "parts", "minutes", "text", "announcerId", "announcer", "form", "__publicField", "import_debounce", "datatable_controller_default", "Controller", "_event", "event", "sortParam", "perPageParam", "link", "th", "target", "pending", "original_form_data", "current_form_data", "searchParamsString", "tbody", "asObject", "formData", "data", "key", "pair", "urlSearchParams", "entry", "name", "value", "input", "option", "_index", "inputValue", "checkbox", "activeRadio", "message", "announcer", "status", "_xhr", "__publicField", "init_lib", "init_lib", "_uppy", "_events", "EventManager", "uppy", "__privateAdd", "__privateSet", "event", "fn", "__privateGet", "fileID", "cb", "file", "isPaused", "eventHandler", "args", "NetworkError", "error", "xhr", "__publicField", "NetworkError_default", "_aliveTimer", "_isDone", "_onTimedOut", "_timeout", "ProgressTimeout", "timeout", "timeoutHandler", "__privateAdd", "__privateSet", "__privateGet", "ProgressTimeout_default", "noop", "fetcher", "url", "options", "body", "headers", "method", "onBeforeRequest", "onUploadProgress", "shouldRetry", "onAfterResponse", "onTimeout", "responseType", "retries", "signal", "timeout", "withCredentials", "delay", "attempt", "timer", "ProgressTimeout_default", "requestWithRetry", "retryCount", "resolve", "reject", "xhr", "onError", "error", "err", "NetworkError_default", "event", "key", "filterNonFailedFiles", "files", "hasError", "file", "filterFilesToEmitUploadStarted", "getAllowedMetaFields", "fields", "meta", "isNetworkError", "xhr", "isNetworkError_default", "createCancelError", "cause", "abortOn", "signal", "abortPromise", "removeAbortListener", "_activeRequests", "_queuedHandlers", "_paused", "_pauseTimer", "_downLimit", "_upperLimit", "_rateLimitingTimer", "_RateLimitedQueue_instances", "call_fn", "queueNext_fn", "next_fn", "queue_fn", "dequeue_fn", "_resume", "_increaseLimit", "RateLimitedQueue", "limit", "__privateAdd", "__publicField", "__privateGet", "__privateSet", "i", "__privateMethod", "fn", "queueOptions", "args", "queuedRequest", "outerPromise", "resolve", "reject", "cancelError", "innerPromise", "err", "result", "duration", "done", "cancelActive", "next", "handler", "options", "index", "other", "internalRateLimitedQueue", "package_default", "locale_default", "buildResponseError", "xhr", "err", "error", "isNetworkError_default", "NetworkError_default", "setTypeInBlob", "file", "defaultOptions", "_getFetcher", "_XHRUpload_instances", "uploadLocalFile_fn", "uploadBundle_fn", "getCompanionClientArgs_fn", "uploadFiles_fn", "_handleUpload", "XHRUpload", "BasePlugin", "uppy", "opts", "__privateAdd", "__publicField", "fileIDs", "internalRateLimitedQueue", "files", "filesFiltered", "filterNonFailedFiles", "filesToEmit", "filterFilesToEmitUploadStarted", "__privateMethod", "locale_default", "RateLimitedQueue", "__privateSet", "url", "options", "res", "fetcher", "retryCount", "timeout", "seconds", "event", "id", "body", "cause", "uploadURL", "request", "overrides", "headers", "formData", "meta", "getAllowedMetaFields", "item", "value", "subItem", "formPost", "dataWithUpdatedType", "capabilities", "__privateGet", "events", "EventManager", "controller", "uppyFetch", "fetch", "endpoint", "optsFromState", "abort", "allowedMetaFields", "name", "getQueue", "removedHandler", "removedFile", "uploadPromise", "package_default", "init_lib", "emaFilter", "newValue", "previousSmoothedValue", "halfLife", "dt", "init_getTextDirection", "init_preact_module", "package_default", "locale_default", "StatusBarStates_default", "vnodeId", "createVNode", "type", "props", "key", "isStaticChildren", "__source", "__self", "ref", "i", "normalizedProps", "vnode", "__k", "__", "__b", "__e", "__c", "constructor", "__v", "vnodeId", "__i", "__u", "defaultProps", "options", "import_classnames", "init_preact_module", "import_prettier_bytes", "secondsToTime", "rawSeconds", "hours", "minutes", "seconds", "prettyETA", "seconds", "time", "secondsToTime", "hoursStr", "minutesStr", "secondsStr", "import_classnames", "init_preact_module", "DOT", "renderDot", "UploadBtn", "props", "newFiles", "isUploadStarted", "recoveredState", "i18n", "uploadState", "isSomeGhost", "startUpload", "uploadBtnClassNames", "classNames", "StatusBarStates_default", "uploadBtnText", "u", "RetryBtn", "uppy", "CancelBtn", "PauseResumeButton", "isAllPaused", "isAllComplete", "resumableUploads", "title", "togglePauseResume", "DoneBtn", "doneButtonHandler", "LoadingSpinner", "ProgressBarProcessing", "progress", "value", "mode", "message", "ProgressDetails", "numUploads", "complete", "totalUploadedSize", "totalSize", "totalETA", "ifShowFilesUploadedOfTotal", "totalUploadedSizeStr", "prettierBytes", "prettyETA", "FileUploadCount", "UploadNewlyAddedFiles", "ProgressBarUploading", "supportsUploadProgress", "totalProgress", "showProgressDetails", "showUploadNewlyAddedFiles", "renderProgressDetails", "ProgressBarComplete", "ProgressBarError", "error", "displayErrorAlert", "errorMessage", "calculateProcessingProgress", "files", "values", "mode", "message", "progress", "preprocess", "postprocess", "value", "total", "progressValue", "STATE_ERROR", "STATE_WAITING", "STATE_PREPROCESSING", "STATE_UPLOADING", "STATE_POSTPROCESSING", "STATE_COMPLETE", "StatusBarStates_default", "StatusBarUI", "newFiles", "allowNewUpload", "isUploadInProgress", "isAllPaused", "resumableUploads", "error", "hideUploadButton", "hidePauseResumeButton", "hideCancelButton", "hideRetryButton", "recoveredState", "uploadState", "totalProgress", "files", "supportsUploadProgress", "hideAfterFinish", "isSomeGhost", "doneButtonHandler", "isUploadStarted", "i18n", "startUpload", "uppy", "isAllComplete", "showProgressDetails", "numUploads", "complete", "totalSize", "totalETA", "totalUploadedSize", "getProgressValue", "progress", "calculateProcessingProgress", "getIsIndeterminate", "mode", "progressValue", "width", "showUploadBtn", "showCancelBtn", "showPauseResumeBtn", "showRetryBtn", "showDoneBtn", "progressClassNames", "classNames", "statusBarClassNames", "progressBarStateEl", "u", "ProgressBarProcessing", "ProgressBarComplete", "ProgressBarError", "ProgressBarUploading", "UploadBtn", "RetryBtn", "PauseResumeButton", "CancelBtn", "DoneBtn", "speedFilterHalfLife", "ETAFilterHalfLife", "getUploadingState", "error", "isAllComplete", "recoveredState", "files", "StatusBarStates_default", "state", "fileIDs", "i", "progress", "defaultOptions", "_lastUpdateTime", "_previousUploadedBytes", "_previousSpeed", "_previousETA", "_StatusBar_instances", "computeSmoothETA_fn", "_onUploadStart", "StatusBar", "UIPlugin_default", "uppy", "opts", "__privateAdd", "__publicField", "__privateSet", "pv", "locale_default", "capabilities", "allowNewUpload", "totalProgress", "newFiles", "startedFiles", "completeFiles", "isUploadStarted", "isAllPaused", "isUploadInProgress", "isSomeGhost", "newFilesOrRecovered", "resumableUploads", "supportsUploadProgress", "totalSize", "totalUploadedSize", "f", "file", "totalETA", "__privateMethod", "StatusBarUI", "element", "getTextDirection_default", "target", "__privateGet", "totalBytes", "remaining", "dt", "uploadedBytesSinceLastTick", "currentSpeed", "filteredSpeed", "emaFilter", "instantETA", "updatedPreviousETA", "filteredETA", "package_default", "import_tut_drag_drop", "de_DE", "count", "de_DE_default", "en_US", "count", "en_US_default", "es_ES", "count", "es_ES_default", "fr_FR", "count", "fr_FR_default", "toast", "message", "type", "overrides", "options", "flashContainer", "accessibility", "prefixes", "displayMessage", "id", "direct_upload_controller_default", "Controller", "__publicField", "file", "response", "toast", "mediaFileId", "existingMediaFileIds", "uniqMediaFileIDs", "error", "label", "result", "uploaded", "f", "firstSuccessfulFileName", "_files", "currentFile", "files", "maxFileSize", "maxNumberOfFiles", "allowedFileTypes", "type", "locale", "de_DE_default", "en_US_default", "es_ES_default", "fr_FR_default", "options", "Uppy_default", "TutDragDrop", "XHRUpload", "StatusBar", "event", "element", "listElement", "form", "searchFormText", "searchFormSearchInput", "mediaFileData", "fileChange", "announcer", "filenames", "li", "message", "text", "div", "display_with_button_controller_default", "Controller", "cardBody", "dom", "__publicField", "display_with_radio_button_controller_default", "Controller", "event", "__publicField", "_defineProperty", "e", "r", "t", "_toPropertyKey", "_extends", "n", "ownKeys", "e", "r", "t", "o", "_objectSpread2", "_defineProperty", "_objectWithoutProperties", "i", "_objectWithoutPropertiesLoose", "n", "_toPrimitive", "r", "e", "i", "_toPropertyKey", "_typeof", "o", "version", "userAgent", "pattern", "IE11OrLess", "Edge", "FireFox", "Safari", "IOS", "ChromeForAndroid", "captureMode", "on", "el", "event", "fn", "off", "matches", "selector", "getParentOrHost", "closest", "ctx", "includeCTX", "R_SPACE", "toggleClass", "name", "state", "className", "css", "prop", "val", "style", "matrix", "selfOnly", "appliedTransforms", "transform", "matrixFn", "find", "tagName", "iterator", "list", "i", "n", "getWindowScrollingElement", "scrollingElement", "getRect", "relativeToContainingBlock", "relativeToNonStaticParent", "undoScale", "container", "elRect", "top", "left", "bottom", "right", "height", "width", "containerRect", "elMatrix", "scaleX", "scaleY", "isScrolledPast", "elSide", "parentSide", "parent", "getParentAutoScrollElement", "elSideVal", "parentSideVal", "visible", "getChild", "childNum", "options", "includeDragEl", "currentChild", "children", "Sortable", "lastChild", "last", "index", "getRelativeScrollOffset", "offsetLeft", "offsetTop", "winScroller", "indexOfObject", "arr", "obj", "key", "includeSelf", "elem", "gotSelf", "elemCSS", "extend", "dst", "src", "isRectEqual", "rect1", "rect2", "_throttleTimeout", "throttle", "callback", "ms", "args", "_this", "cancelThrottle", "scrollBy", "x", "y", "clone", "Polymer", "$", "getChildContainingRectFromElement", "container", "options", "ghostEl", "rect", "child", "_rect$left", "_rect$top", "_rect$right", "_rect$bottom", "closest", "childRect", "getRect", "expando", "AnimationStateManager", "animationStates", "animationCallbackId", "children", "css", "Sortable", "fromRect", "_objectSpread2", "childMatrix", "matrix", "state", "target", "indexOfObject", "callback", "_this", "animating", "animationTime", "time", "toRect", "prevFromRect", "prevToRect", "animatingRect", "targetMatrix", "isRectEqual", "calculateRealTime", "currentRect", "duration", "elMatrix", "scaleX", "scaleY", "translateX", "translateY", "repaint", "plugins", "defaults", "PluginManager", "plugin", "option", "p", "eventName", "sortable", "evt", "eventNameGlobal", "el", "pluginName", "initialized", "_extends", "modified", "name", "eventProperties", "value", "modifiedValue", "dispatchEvent", "_ref", "rootEl", "targetEl", "cloneEl", "toEl", "fromEl", "oldIndex", "newIndex", "oldDraggableIndex", "newDraggableIndex", "originalEvent", "putSortable", "extraEventProperties", "onName", "IE11OrLess", "Edge", "allEventProperties", "_excluded", "pluginEvent", "data", "_objectWithoutProperties", "dragEl", "parentEl", "nextEl", "lastDownEl", "cloneHidden", "moved", "_hideGhostForTarget", "_unhideGhostForTarget", "_dispatchEvent", "info", "activeGroup", "awaitingDragStarted", "ignoreNextClick", "sortables", "tapEvt", "touchEvt", "lastDx", "lastDy", "tapDistanceLeft", "tapDistanceTop", "lastTarget", "lastDirection", "pastFirstInvertThresh", "isCircumstantialInvert", "targetMoveDistance", "ghostRelativeParent", "ghostRelativeParentInitialScroll", "_silent", "savedInputChecked", "documentExists", "PositionGhostAbsolutely", "IOS", "CSSFloatProperty", "supportDraggable", "ChromeForAndroid", "supportCssPointerEvents", "_detectDirection", "elCSS", "elWidth", "child1", "getChild", "child2", "firstChildCSS", "secondChildCSS", "firstChildWidth", "secondChildWidth", "touchingSideChild2", "_dragElInRowColumn", "dragRect", "targetRect", "vertical", "dragElS1Opp", "dragElS2Opp", "dragElOppLength", "targetS1Opp", "targetS2Opp", "targetOppLength", "_detectNearestEmptySortable", "x", "y", "ret", "threshold", "lastChild", "insideHorizontally", "insideVertically", "_prepareGroup", "toFn", "pull", "to", "from", "sameGroup", "otherGroup", "group", "originalGroup", "_typeof", "nearestEmptyInsertDetectEvent", "nearest", "event", "i", "_checkOutsideTargetEl", "dataTransfer", "Safari", "fn", "on", "preventOnFilter", "type", "touch", "originalTarget", "filter", "_saveInputCheckedState", "index", "criteria", "ownerDocument", "dragStartFn", "FireFox", "toggleClass", "find", "_disableDraggable", "off", "_nextTick", "fallback", "parent", "inserted", "getParentOrHost", "fallbackTolerance", "fallbackOffset", "ghostMatrix", "relativeScrollOffset", "getRelativeScrollOffset", "dx", "dy", "cssMatrix", "getWindowScrollingElement", "clone", "revert", "activeSortable", "isOwner", "canSort", "fromSortable", "completedFired", "dragOverEvent", "extra", "completed", "after", "_onMove", "changed", "capture", "insertion", "elLastChild", "_ghostIsLast", "_ghostIsFirst", "firstChild", "direction", "targetBeforeFirstSwap", "differentLevel", "differentRowCol", "side1", "scrolledPastTop", "isScrolledPast", "scrollBefore", "_getSwapDirection", "sibling", "dragIndex", "nextSibling", "moveVector", "_unsilent", "scrollBy", "_cancelNextTick", "checkEl", "_globalDragOver", "order", "n", "_generateId", "useAnimation", "items", "id", "store", "selector", "willInsertAfter", "onMoveFn", "retVal", "firstElRect", "childContainingRect", "spacer", "lastElRect", "swapThreshold", "invertedSwapThreshold", "invertSwap", "isLastTarget", "mouseOnAxis", "targetLength", "targetS1", "targetS2", "invert", "_getInsertDirection", "str", "sum", "root", "inputs", "idx", "extend", "throttle", "element", "_len", "_key", "version", "autoScrolls", "scrollEl", "scrollRootEl", "scrolling", "lastAutoScrollX", "lastAutoScrollY", "touchEvt$1", "pointerElemChangedInterval", "AutoScrollPlugin", "AutoScroll", "_ref2", "clearPointerElemChangedInterval", "clearAutoScrolls", "cancelThrottle", "elem", "autoScroll", "ogElemScroller", "getParentAutoScrollElement", "newElem", "isFallback", "sens", "speed", "winScroller", "scrollThisInstance", "scrollCustomFn", "layersOut", "currentParent", "top", "bottom", "left", "right", "width", "height", "canScrollX", "canScrollY", "scrollWidth", "scrollHeight", "scrollPosX", "scrollPosY", "vx", "vy", "scrollOffsetY", "scrollOffsetX", "drop", "dispatchSortableEvent", "hideGhostForTarget", "unhideGhostForTarget", "toSortable", "Revert", "_ref3", "Remove", "_ref4", "parentSortable", "Sortable", "AutoScrollPlugin", "Remove", "Revert", "sortable_esm_default", "drag_drop_controller_default", "Controller", "element", "sortable_esm_default", "event", "draggedElement", "url", "data", "target", "position", "_response", "_statusText", "_xhr", "el", "oldIndex", "nextSibling", "__publicField", "dropdown_controller_default", "Controller", "Dropdown", "defaultBsPopperConfig", "isArray", "value", "isPlainObject", "object", "tag", "proto", "eq", "value", "other", "noop", "getSymbols", "object", "symbol", "getTag", "value", "regexpTag", "stringTag", "numberTag", "booleanTag", "argumentsTag", "symbolTag", "dateTag", "mapTag", "setTag", "arrayTag", "functionTag", "arrayBufferTag", "objectTag", "errorTag", "dataViewTag", "uint8ArrayTag", "uint8ClampedArrayTag", "uint16ArrayTag", "uint32ArrayTag", "bigUint64ArrayTag", "int8ArrayTag", "int16ArrayTag", "int32ArrayTag", "bigInt64ArrayTag", "float32ArrayTag", "float64ArrayTag", "globalThis_", "isBuffer", "x", "globalThis_", "isPlainObject", "value", "proto", "isEqualWith", "a", "b", "areValuesEqual", "isEqualWithImpl", "property", "aParent", "bParent", "stack", "result", "areObjectsEqual", "aTag", "getTag", "bTag", "objectTag", "stringTag", "numberTag", "eq", "booleanTag", "dateTag", "symbolTag", "regexpTag", "functionTag", "aStack", "bStack", "mapTag", "key", "value", "setTag", "aValues", "bValues", "i", "aValue", "index", "bValue", "arrayTag", "uint8ArrayTag", "uint8ClampedArrayTag", "uint16ArrayTag", "uint32ArrayTag", "bigUint64ArrayTag", "int8ArrayTag", "int16ArrayTag", "int32ArrayTag", "bigInt64ArrayTag", "float32ArrayTag", "float64ArrayTag", "isBuffer", "arrayBufferTag", "dataViewTag", "errorTag", "isPlainObject", "aKeys", "getSymbols", "bKeys", "propKey", "aProp", "bProp", "isEqual", "a", "b", "isEqualWith", "noop", "isLength", "value", "isArrayLike", "value", "isLength", "isSymbol", "value", "toString", "value", "baseToString", "isSymbol", "result", "toKey", "value", "toPath", "deepKey", "toKey", "toString", "result", "length", "index", "key", "quoteChar", "bracket", "bracketHadQuote", "bracketNumberRegex", "char", "segments", "i", "next", "isUnsafeProperty", "key", "regexIsDeepProp", "isDeepKey", "key", "get", "object", "path", "defaultValue", "isUnsafeProperty", "result", "isDeepKey", "toPath", "toKey", "getWithPath", "current", "index", "property", "path", "object", "get", "isObject", "value", "isPrimitive", "value", "isMatchWith", "target", "source", "compare", "isMatchWithInternal", "doesMatch", "objValue", "srcValue", "key", "object", "stack", "isEqual", "isRoot", "isObjectMatch", "eq", "isObject", "isArrayMatch", "isMapMatch", "isSetMatch", "keys", "isPrimitive", "tag", "getTag", "i", "sourceValue", "countedIndex", "sourceItem", "found", "j", "targetItem", "matches", "isMatch", "target", "source", "isMatchWith", "isTypedArray", "x", "cloneDeepWith", "obj", "cloneValue", "cloneDeepWithImpl", "valueToClone", "keyToClone", "objectToClone", "stack", "cloned", "isPrimitive", "result", "i", "key", "value", "isBuffer", "isTypedArray", "copyProperties", "isCloneableObject", "target", "source", "keys", "getSymbols", "descriptor", "object", "getTag", "argumentsTag", "arrayTag", "arrayBufferTag", "dataViewTag", "booleanTag", "dateTag", "float32ArrayTag", "float64ArrayTag", "int8ArrayTag", "int16ArrayTag", "int32ArrayTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "symbolTag", "uint8ArrayTag", "uint8ClampedArrayTag", "uint16ArrayTag", "uint32ArrayTag", "cloneDeep", "obj", "cloneDeepWithImpl", "matches", "source", "cloneDeep", "target", "isMatch", "cloneDeepWith", "obj", "customizer", "value", "key", "object", "stack", "cloned", "getTag", "result", "copyProperties", "numberTag", "stringTag", "booleanTag", "argumentsTag", "cloneDeep", "obj", "cloneDeepWith", "isArguments", "value", "getTag", "IS_UNSIGNED_INTEGER", "isIndex", "value", "length", "has", "object", "path", "resolvedPath", "isDeepKey", "toPath", "current", "i", "key", "toKey", "isArguments", "isIndex", "matchesProperty", "property", "source", "toKey", "cloneDeep", "target", "result", "get", "has", "isMatch", "identity", "x", "iteratee", "value", "identity", "matchesProperty", "matches", "property", "isObjectLike", "value", "isArrayLikeObject", "value", "isObjectLike", "isArrayLike", "toNumber", "value", "isSymbol", "toFinite", "value", "toNumber", "toInteger", "value", "finite", "toFinite", "remainder", "isString", "value", "identity", "x", "regexIsDeepProp", "regexIsPlainProp", "isKey", "value", "object", "isSymbol", "isTypedArray", "x", "times", "n", "getValue", "toInteger", "result", "i", "isPrototype", "value", "constructor", "assignValue", "object", "key", "value", "objValue", "eq", "isUnsafeToWriteProperty", "key", "updateWith", "obj", "path", "updater", "customizer", "isObject", "resolvedPath", "isKey", "toPath", "updateValue", "get", "current", "i", "key", "toKey", "isUnsafeToWriteProperty", "newValue", "objValue", "customizerResult", "isIndex", "assignValue", "set", "obj", "path", "value", "updateWith", "debounce", "func", "debounceMs", "signal", "edges", "pendingThis", "pendingArgs", "leading", "trailing", "invoke", "onTimerEnd", "cancel", "timeoutId", "schedule", "cancelTimer", "flush", "debounced", "args", "isFirstCall", "debounce", "func", "debounceMs", "options", "leading", "trailing", "maxWait", "edges", "result", "pendingAt", "_debounced", "args", "debounced", "flush", "throttle", "func", "throttleMs", "options", "leading", "trailing", "debounce", "keysIn", "object", "isArrayLike", "arrayLikeKeysIn", "isPrototype", "prototypeKeysIn", "keysInImpl", "result", "key", "indices", "times", "index", "filteredKeys", "isBuffer", "isTypedArray", "inheritedKeys", "assignIn", "object", "sources", "assignInImpl", "source", "keys", "keysIn", "i", "key", "eq", "clone", "obj", "isPrimitive", "tag", "getTag", "isCloneableObject", "isArray", "result", "isTypedArray", "typedArray", "Ctor", "dataView", "buffer", "byteOffset", "byteLength", "clonedBuffer", "srcView", "cloneStringObjectProperties", "copyOwnProperties", "regExp", "map", "key", "set", "args", "copyPrototype", "copySymbolProperties", "object", "argumentsTag", "arrayTag", "arrayBufferTag", "dataViewTag", "booleanTag", "dateTag", "float32ArrayTag", "float64ArrayTag", "int8ArrayTag", "int16ArrayTag", "int32ArrayTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "symbolTag", "uint8ArrayTag", "uint8ClampedArrayTag", "uint16ArrayTag", "uint32ArrayTag", "target", "source", "symbols", "i", "symbol", "stringLength", "proto", "mapValues", "object", "getNewValue", "result", "keys", "i", "key", "value", "mapValues", "object", "getNewValue", "identity", "iteratee", "clone", "obj", "isPrimitive", "isTypedArray", "prototype", "Constructor", "newRegExp", "newError", "mergeWith", "object", "otherArgs", "sources", "merge", "result", "i", "source", "mergeWithDeep", "target", "stack", "isPrimitive", "clone", "sourceKeys", "getSymbols", "key", "isUnsafeProperty", "sourceValue", "targetValue", "isArguments", "isBuffer", "cloneDeep", "cloned", "targetKeys", "targetKey", "isArrayLikeObject", "merged", "isObjectLike", "isPlainObject", "isTypedArray", "merge", "object", "sources", "mergeWith", "noop", "isFunction", "value", "isElement", "value", "isObjectLike", "isPlainObject", "isEmpty", "value", "isArrayLike", "isBuffer", "isTypedArray", "isArguments", "keys", "isPrototype", "x", "after", "n", "func", "counter", "args", "isEqualWith", "a", "b", "areValuesEqual", "args", "result", "after", "escapeRegExp", "str", "escapeRegExp", "str", "toString", "upperFirst", "str", "upperFirst", "str", "toString", "globalVar", "getUserAgent", "userAgent", "env", "isMac", "isWindows", "isGecko", "isSafari", "isiOS", "isAndroid", "isBlink", "isMediaForcedColors", "isMotionReduced", "isRegExpUnicodePropertySupported", "isSupported", "global", "fastDiff", "a", "b", "cmp", "atomicChanges", "arrayA", "arrayB", "changeIndexes", "findChangeBoundaryIndexes", "changeIndexesToAtomicChanges", "changeIndexesToChanges", "arr1", "arr2", "firstIndex", "findFirstDifferenceIndex", "lastIndex", "cutAndReverse", "i", "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", "fastDiffFunction", "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", "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", "colonIndex", "node", "eventNode", "callbacksLists", "childCallbacksLists", "currentEventName", "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", "a", "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", "arr", "parsed", "lastObservable", "updateBoundObservables", "toPropertyName", "bindingsToObservable", "chain", "propertyValue", "toBindings", "ElementReplacer", "element", "newElement", "count", "iterable", "_", "compareArrays", "a", "b", "minLen", "i", "isIterable", "value", "createElement", "doc", "name", "attributes", "children", "namespace", "element", "key", "isString", "child", "Config", "configurations", "defaultConfigurations", "__publicField", "cloneConfig", "target", "isDefine", "isPlainObject", "parts", "part", "source", "configuration", "cloneDeepWith", "leaveItemReferences", "isElement", "isNode", "obj", "isWindow", "stringifiedObject", "defaultEmitterClass", "DomEmitterMixin", "EmitterMixin", "ProxyEmitterBase", "base", "Mixin", "emitter", "event", "callback", "options", "global", "proxyOptions", "proxyEmitter", "ProxyEmitter", "proxyEmitters", "proxy", "node", "_getEmitterListenedTo", "getProxyEmitterId", "_setEmitterId", "domListener", "events", "domEvt", "getNodeUID", "uid", "id", "option", "getAncestors", "node", "nodes", "currentNode", "getDataFromElement", "el", "getBorderWidths", "element", "style", "getRangeFromMouseEvent", "domEvent", "domDoc", "x", "y", "domRange", "getPositionedAncestor", "element", "global", "isText", "obj", "isRange", "RECT_PROPERTIES", "POSITIONING_VALUES", "Rect", "source", "__publicField", "isSourceRange", "isDomElement", "rangeRects", "copyRectProperties", "isWindow", "innerWidth", "innerHeight", "x", "y", "anotherRect", "rect", "newRect", "visibleRect", "isBody", "child", "parent", "lastPositionedChildElement", "isNonClippingParent", "getElementOverflow", "isPositioned", "getElementPosition", "parentRect", "intersectionRect", "prop", "intersectRect", "scrollX", "scrollY", "absoluteRect", "positionedAncestor", "shiftRectToCompensatePositionedAncestor", "scrollBarWidth", "scrollBarHeight", "direction", "borderWidths", "getBorderWidths", "range", "rects", "clientRects", "r", "startContainer", "clientRect", "boundingRectData", "rectangleCount", "p", "value", "node", "positionedElementAncestor", "ancestorPosition", "ancestorBorderWidths", "moveX", "moveY", "ResizeObserver", "_a", "callback", "callbacks", "entries", "entry", "setDataInElement", "el", "data", "toUnit", "unit", "indexOf", "index", "insertAt", "parentElement", "nodeToInsert", "isComment", "isValidAttributeName", "name", "globalVar", "isVisible", "getOptimalPosition", "target", "positions", "limiter", "fitInViewport", "viewportOffsetConfig", "isFunction", "constrainedViewportRect", "getConstrainedViewportRect", "elementRect", "visibleTargetRect", "getVisibleViewportIntersectionRect", "bestPosition", "positionOptions", "PositionObject", "visibleLimiterRect", "getBestPosition", "viewportRect", "visibleSourceRect", "options", "elementRectArea", "positionInstances", "positioningFunction", "position", "maxFitFactor", "limiterIntersectionArea", "viewportIntersectionArea", "fitFactor", "positioningFunctionOutput", "left", "top", "config", "limiterRect", "remove", "getVisualViewportOffset", "visualViewport", "env", "scrollViewportToShowTarget", "viewportOffset", "ancestorOffset", "alignToTop", "forceScroll", "targetWindow", "getWindow", "currentWindow", "currentFrame", "normalizeViewportOffset", "firstAncestorToScroll", "getParentElement", "scrollAncestorsToShowRect", "getRectRelativeToWindow", "targetRect", "ancestorWindowRelativeRect", "ancestorTargetIntersection", "scrollWindowToShowRect", "scrollWindowToShowRect", "window", "rect", "alignToTop", "forceScroll", "viewportOffset", "targetShiftedDownRect", "targetShiftedUpRect", "viewportRect", "Rect", "rects", "forceScrollToTop", "allRectsFitInViewport", "scrollX", "scrollY", "initialScrollX", "initialScrollY", "isAbove", "isBelow", "isLeftOf", "isRightOf", "scrollAncestorsToShowRect", "parent", "getRect", "ancestorOffset", "limiterElement", "parentWindow", "getWindow", "parentRect", "targetRect", "targetFitsInTarget", "limiter", "firstRect", "secondRect", "elementOrRange", "isRange", "getParentElement", "isText", "getRectRelativeToWindow", "target", "relativeWindow", "targetWindow", "currentWindow", "frame", "frameRect", "normalizeViewportOffset", "modifiersToGlyphsMac", "modifiersToGlyphsNonMac", "keyCodesToGlyphs", "keyCodes", "generateKnownKeyCodes", "keyCodeNames", "name", "code", "prettyKeyName", "getCode", "key", "keyCode", "CKEditorError", "parseKeystroke", "keystroke", "splitKeystrokeText", "getEnvKeyCode", "sum", "getEnvKeystrokeText", "forcedEnv", "keystrokeCode", "isMac", "env", "modifiers", "glyph", "isArrowKeyCode", "getLocalizedArrowKeyCodeDirection", "contentLanguageDirection", "isLtrContent", "isForwardArrowKeyCode", "localizedKeyCodeDirection", "letter", "RTL_LANGUAGE_CODES", "getLanguageDirection", "languageCode", "toArray", "data", "global", "globalVar", "_translate", "language", "message", "quantity", "translations", "CKEditorError", "normalizedTranslations", "global", "numberOfLanguages", "getNumberOfLanguages", "messageId", "hasTranslation", "dictionary", "getPluralForm", "n", "translation", "_unifyTranslations", "translations", "acc", "translation", "merge", "hasTranslation", "language", "messageId", "getNumberOfLanguages", "Locale", "uiLanguage", "contentLanguage", "__publicField", "getLanguageDirection", "message", "values", "toArray", "quantity", "interpolateString", "_translate", "string", "match", "index", "CollectionBase", "EmitterMixin", "Collection", "initialItemsOrOptions", "options", "hasInitialItems", "isIterable", "item", "items", "CKEditorError", "offset", "itemId", "currentItemIndex", "idOrIndex", "itemOrId", "id", "subject", "callback", "ctx", "removedItems", "externalCollection", "Class", "callbackOrProperty", "factory", "addItem", "evt", "externalItem", "isExternalBoundToThis", "externalItemBound", "finalIndex", "skipped", "i", "result", "idProperty", "uid", "itemDoesNotExist", "first", "iterator", "iteratorItem", "FocusTrackerBase", "DomEmitterMixin", "ObservableMixin", "FocusTracker", "__publicField", "elementOrView", "isElement", "isViewWithFocusTracker", "CKEditorError", "element", "externalFocusedViewInSubtree", "view", "isExternalViewSubtreeFocused", "value", "_isElement", "subTreeRoot", "isFocusedView", "KeystrokeHandler", "emitter", "evt", "keyEvtData", "getCode", "keystroke", "callback", "options", "keyCode", "parseKeystroke", "priority", "objectToMap", "obj", "map", "key", "toMap", "data", "isIterable", "spliceArray", "targetArray", "insertArray", "index", "originalLength", "insertLength", "i", "delay", "func", "wait", "timer", "delayed", "args", "parseBase64EncodedObject", "encoded", "decoded", "makeCrcTable", "crcTable", "n", "c", "k", "crc32", "inputData", "dataArray", "crc", "dataString", "item", "byte", "isCombiningMark", "character", "isHighSurrogateHalf", "isLowSurrogateHalf", "isInsideSurrogatePair", "string", "offset", "isInsideCombinedSymbol", "EMOJI_PATTERN", "buildEmojiRegexp", "isInsideEmojiSequence", "matches", "match", "parts", "flagSequence", "emoji", "part", "sequence", "decodeLicenseKey", "licenseKey", "encodedPayload", "getLicenseKeyPayload", "parseBase64EncodedObject", "isFeatureBlockedByLicenseKey", "licensePayload", "licenseFeatureCode", "tryParseDimensionWithUnit", "dimension", "rawValue", "unit", "parsedValue", "tryCastDimensionsToUnit", "parentDimensionPx", "targetUnit", "documentPlaceholders", "hasDisplayedPlaceholderDeprecationWarning", "enableViewPlaceholder", "view", "element", "text", "isDirectHost", "keepOnFocus", "doc", "writer", "updateDocumentPlaceholders", "evtInfo", "evt", "setPlaceholder", "showViewPlaceholderTextDeprecationWarning", "config", "showViewPlaceholder", "writer", "element", "hideViewPlaceholder", "needsViewPlaceholder", "keepOnFocus", "hasContent", "doc", "selectionAnchor", "child", "updateDocumentPlaceholders", "placeholders", "directHostElements", "wasViewModified", "config", "updatePlaceholder", "hostElement", "getChildPlaceholderHostSubstitute", "text", "isDirectHost", "parent", "firstChild", "showViewPlaceholderTextDeprecationWarning", "hasDisplayedPlaceholderDeprecationWarning", "logWarning", "ViewTypeCheckable", "ViewNodeBase", "EmitterMixin", "ViewNode", "document", "__publicField", "pos", "CKEditorError", "index", "root", "path", "node", "options", "ancestors", "ancestorsA", "ancestorsB", "i", "thisPath", "nodePath", "result", "compareArrays", "type", "data", "json", "ViewText", "otherNode", "ViewTextProxy", "textNode", "offsetInText", "length", "ViewConsumable", "consumables", "elementConsumables", "ViewElementConsumables", "normalizeConsumables", "from", "instance", "name", "token", "attributeTokens", "value", "tokenValue", "toConsume", "attributes", "normalizeConsumablePart", "items", "prefix", "item", "Matcher", "pattern", "singleElement", "match", "results", "matchName", "attributesMatch", "matchAttributes", "matchClasses", "matchStyles", "isPatternMatched", "normalizePatterns", "patterns", "normalizedPatterns", "key", "excludeAttributes", "StylesMap", "styleProcessor", "inlineStyle", "parsedStyles", "parseInlineStyles", "propertyDescriptor", "property", "nameOrObject", "valueOrObject", "isObject", "names", "normalizedStylesToRemove", "toArray", "toPath", "pathValue", "get", "appendStyleValue", "removeStyles", "arr", "propertyName", "expand", "other", "parsed", "keys", "clone", "tokenPattern", "valuePattern", "styleName", "relatedName", "prop", "StylesProcessor", "propertyValue", "styles", "merge", "extractor", "normalizedValue", "styleNamesKeysSet", "style", "callback", "callbackOrPath", "shorthandName", "styleNames", "alsoName", "stylesString", "quoteType", "propertyNameStart", "propertyValueStart", "stylesMap", "char", "stylesObject", "nameOrPath", "valueToSet", "set", "toRemove", "ViewTokenList", "tokens", "ViewElement", "attrs", "children", "usesStylesMap", "usesTokenList", "otherElement", "otherValue", "className", "array", "iterator", "matcher", "classes", "attributeName", "deep", "childrenClone", "cloned", "count", "nodes", "normalize", "howMany", "overwrite", "currentValue", "exclude", "keyPattern", "hasKey", "hasValue", "tokenMatch", "tokenMatchItem", "attrsMap", "toMap", "newValue", "isIterable", "normalizedNodes", "elementName", "ViewContainerElement", "getViewFillerOffset", "lastChild", "ViewEditableElementBase", "ObservableMixin", "ViewEditableElement", "isFocused", "rootNameSymbol", "ViewRootEditableElement", "rootName", "ViewTreeWalker", "ViewPosition", "skip", "nextResult", "prevPosition", "position", "previousPosition", "textLength", "textProxy", "charactersCount", "startOffset", "offset", "nextPosition", "endOffset", "editable", "shift", "shifted", "treeWalker", "otherPosition", "otherPath", "itemOrPosition", "ViewRange", "start", "end", "enlargeTrimSkip", "nodeAfterStart", "nodeBeforeEnd", "otherRange", "loose", "containsStart", "containsEnd", "ranges", "commonRangeStart", "commonRangeEnd", "startElement", "endElement", "size", "ViewSelectionBase", "ViewSelection", "args", "range", "first", "last", "firstRange", "lastRange", "otherSelection", "thisRange", "found", "numOfRangesA", "rangeA", "rangeB", "selectable", "placeOrOffset", "ViewDocumentSelection", "backward", "newFocus", "anchor", "newRanges", "isLastBackward", "isBackward", "storedRange", "ViewDocumentSelectionBase", "BubblingEventInfo", "EventInfo", "source", "startRange", "bubblingEmitterSymbol", "callbackMapSymbol", "contextsSymbol", "BubblingEmitterMixin", "base", "Mixin", "eventOrInfo", "eventArgs", "eventInfo", "bubblingEmitter", "getBubblingEmitter", "customContexts", "getCustomContexts", "updateEventInfo", "fireListenerFor", "selectedElement", "isCustomContext", "hasMatchingCustomContext", "getDeeperRangeParent", "err", "event", "contexts", "callbacksMap", "getCallbackMap", "context", "wrappedCallback", "wrapCallback", "eventPhase", "currentTarget", "emitter", "startParent", "endParent", "startPath", "endPath", "ViewDocumentBase", "ViewDocument", "stylesProcessor", "Collection", "postFixer", "wasFixed", "DEFAULT_PRIORITY", "ViewAttributeElement", "_a", "getFillerOffset", "nonUiChildrenCount", "ViewEmptyElement", "ViewUIElement", "domDocument", "domConverter", "domElement", "injectUiElementHandling", "view", "evt", "jumpOverUiElement", "keyCodes", "domSelection", "domSelectionCollapsed", "domParent", "domOffset", "viewPosition", "jumpedOverAnyUiElement", "nextViewPosition", "newDomPosition", "ViewRawElement", "ViewDocumentFragmentBase", "ViewDocumentFragment", "ViewDowncastWriter", "attributeElement", "childrenOrOptions", "isContainerOptions", "containerElement", "editableElement", "emptyElement", "renderFunction", "uiElement", "rawElement", "elementOrOverwrite", "elementOrTokens", "isPlainObject", "positionOrRange", "newElement", "sourceRange", "targetPosition", "positionOffset", "positionParent", "nodeBefore", "nodeAfter", "mergeTextNodes", "prev", "next", "newPosition", "validateNodesToInsert", "nodeGroups", "groups", "lastGroup", "breakAttributes", "rangeOrItem", "validateRangeContainer", "breakStart", "breakEnd", "parentContainer", "removed", "mergePosition", "walker", "current", "rangeToRemove", "parentElement", "ancestor", "countBefore", "attribute", "_hasNonUiChildren", "viewSelection", "newRange", "newName", "viewElement", "groupName", "modeOrFilter", "slotFactory", "getParentContainer", "insertionPosition", "breakTextNode", "endPosition", "wrapElement", "wrapPositions", "isText", "isAttribute", "shouldABeOutsideB", "newAttribute", "offsetChange", "unwrapElement", "unwrapPositions", "unwrapped", "movePositionToTextNode", "fakeElement", "wrapRange", "forceSplitText", "rangeStart", "rangeEnd", "isContainerOrFragment", "offsetAfter", "clonedNode", "nodesToMove", "id", "group", "a", "b", "textToMove", "t1", "t2", "nodeBeforeLength", "validNodesToInsert", "errorContext", "validNode", "startContainer", "endContainer", "NBSP_FILLER", "MARKED_NBSP_FILLER", "span", "BR_FILLER", "fillerBr", "INLINE_FILLER", "startsWithFiller", "domNode", "isText", "isInlineFiller", "domText", "getDataWithoutFiller", "data", "injectQuirksHandling", "view", "jumpOverInlineFiller", "evt", "keyCodes", "domSelection", "domParent", "domOffset", "ViewRendererBase", "ObservableMixin", "ViewRenderer", "domConverter", "selection", "__publicField", "env", "type", "node", "CKEditorError", "inlineFillerPosition", "isInlineFillerRenderingPossible", "element", "ViewPosition", "fillerDomPosition", "domDocument", "addInlineFiller", "viewElement", "domElement", "actualDomChildren", "expectedDomChildren", "diff", "actions", "areSimilarElements", "counter", "action", "insertIndex", "deleteIndex", "viewChild", "remove", "firstPos", "selectionPosition", "position", "domFillerNode", "selectionParent", "selectionOffset", "isEditable", "nodeBefore", "nodeAfter", "ViewText", "viewText", "options", "expectedText", "filler", "domAttr", "key", "previousDomNode", "areTextNodes", "i", "nodesToUnbind", "insertAt", "filterOutFakeSelectionContainer", "sameNodes", "actualDom", "expectedDom", "comparator", "newActions", "actualSlice", "expectedSlice", "actualText", "fastDiff", "viewNode", "child", "domEditable", "createFakeSelectionContainer", "container", "domRange", "anchor", "focus", "fixGeckoSelectionAfterBr", "oldViewSelection", "doc", "activeDomElement", "editable", "parent", "domParentOrArray", "offset", "childNodes", "nodeAfterFiller", "fillerNode", "node1", "node2", "isNode", "isComment", "actualDomChild", "expectedDomChild", "indexOf", "childAtOffset", "domChildList", "fakeSelectionContainer", "childList", "BR_FILLER_REF", "BR_FILLER", "globalVar", "NBSP_FILLER_REF", "NBSP_FILLER", "MARKED_NBSP_FILLER_REF", "MARKED_NBSP_FILLER", "UNSAFE_ATTRIBUTE_NAME_PREFIX", "UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE", "ViewDomConverter", "document", "blockFillerMode", "renderingMode", "Matcher", "viewDocumentSelection", "ViewSelection", "domFragment", "viewFragment", "attributeKey", "attributeValue", "elementName", "isImage", "isMedia", "html", "fragment", "bodyChildNodes", "treeWalker", "nodes", "currentNode", "attributeName", "_logUnsafeElement", "textData", "viewElementOrFragment", "value", "relatedViewElement", "shouldRenderAttribute", "logWarning", "isValidAttributeName", "fillerPositionOffset", "childView", "transparentRendering", "first", "tempElement", "viewRange", "domStart", "domEnd", "viewPosition", "viewParent", "domBefore", "domAfter", "inlineNodes", "generator", "isViewBrFiller", "domChild", "isGeckoRestrictedDomSelection", "viewSelection", "isBackward", "viewRanges", "viewStart", "viewEnd", "ViewRange", "viewBefore", "domElementOrDocumentFragment", "hostElement", "previousSibling", "nextSibling", "firstChild", "documentFragmentOrElement", "viewEditable", "scrollX", "scrollY", "scrollPositions", "forEachDomElementAncestor", "scrollLeft", "scrollTop", "newViewSelection", "isOnlyBrInBlock", "isNbspBlockFiller", "range", "backward", "ancestors", "getAncestors", "pattern", "textNode", "ViewDocumentFragment", "attrs", "l", "nestedInlineNodes", "inlineNode", "prevNodeEndsWithSpace", "nodeEndsWithSpace", "prevNode", "nextNode", "shouldLeftTrim", "shouldRightTrim", "isViewMarkedNbspFiller", "isViewNbspFiller", "isNextNodeInlineObjectElement", "isNextNodeStartingWithSpace", "nextStartsWithSpace", "_hasViewParentOfType", "ancestor", "getNext", "ViewTreeWalker", "item", "ViewUIElement", "viewName", "ViewElement", "name", "originalDomElement", "newDomElement", "types", "callback", "blockElements", "hasBlockParent", "ObserverBase", "DomEmitterMixin", "Observer", "domTarget", "ViewDocumentDomEventData", "domEvent", "additionalData", "assignIn", "DomEventObserver", "eventInfo", "eventType", "KeyObserver", "domEvt", "getCode", "FakeSelectionObserver", "debounce", "keyCode", "newSelection", "MutationObserver", "domMutations", "mutatedTextNodes", "elementsWithMutatedChildren", "mutation", "text", "mutations", "viewChildren", "newViewChildren", "isEqualWith", "addedNode", "child1", "child2", "FocusObserver", "selectedEditable", "SelectionObserver", "isFocused", "startDocumentIsSelecting", "endDocumentIsSelecting", "isSelectionWithinRootElements", "root", "CompositionObserver", "ViewDataTransfer", "nativeDataTransfer", "getFiles", "image", "x", "y", "files", "items", "InputObserver", "domTargetRanges", "viewDocument", "dataTransfer", "targetRanges", "count", "isFollowedByInlineFiller", "parts", "partTargetRanges", "dataPart", "ArrowKeysObserver", "event", "isArrowKeyCode", "BubblingEventInfo", "TabObserver", "EditingViewBase", "EditingView", "stylesProcessor", "ViewDocument", "ViewDowncastWriter", "injectUiElementHandling", "domRoot", "viewRoot", "initialDomRootAttributes", "updateContenteditableAttribute", "observer", "attribute", "ObserverConstructor", "alignToTop", "forceScroll", "viewportOffset", "ancestorOffset", "originalArgs", "cloneDeep", "scrollViewportToShowTarget", "callbackResult", "err", "itemOrPosition", "start", "end", "args", "flag", "ModelTypeCheckable", "ModelTextProxy", "offsetInText", "length", "path", "ModelTreeWalker", "direction", "ModelPosition", "skip", "done", "prevPosition", "prevVisitedParent", "previousPosition", "textNodeAtPosition", "getTextNodeAtPosition", "getNodeAfterPosition", "formatReturnValue", "charactersCount", "offsetInTextNode", "positionParent", "getNodeBeforePosition", "nextPosition", "stickiness", "newOffset", "otherPosition", "result", "compareArrays", "parentName", "cmp", "diffAt", "ancestorsA", "ancestorsB", "shift", "shifted", "commonLevel", "level", "checkTouchingBranch", "checkOnlyZeroes", "thisParentPath", "posParentPath", "operation", "movedRange", "isContained", "pos", "deletePosition", "howMany", "transformed", "insertPosition", "sourcePosition", "targetPosition", "source", "target", "combined", "json", "left", "right", "checkOnlyMaxOffset", "arr", "idx", "add", "ModelRange", "startParentPath", "endParentPath", "otherRange", "loose", "containsStart", "containsEnd", "ranges", "commonRangeStart", "commonRangeEnd", "shouldJoin", "startPosition", "endPosition", "posParent", "operations", "j", "next", "nodeAfterStart", "nodeBeforeEnd", "spread", "newPos", "moveRange", "differenceSet", "difference", "common", "transformedCommon", "newStart", "newEnd", "ref", "a", "b", "refIndex", "MapperBase", "EmitterMixin", "MapperCacheBase", "Mapper", "MapperCache", "viewContainer", "viewBlock", "modelParent", "modelOffset", "modelElement", "markerName", "elements", "names", "nameToElements", "elementToNames", "markerNames", "modelRange", "modelPosition", "boundElements", "clone", "viewElementName", "lengthCallback", "viewOffset", "stack", "len", "cacheItem", "startViewPosition", "startModelOffset", "targetModelOffset", "useCache", "traversedModelOffset", "lastLength", "cacheViewParent", "cacheViewOffset", "cache", "index", "newCacheItem", "initialCacheItem", "initialCache", "lastValidNode", "cacheListIndex", "clearedItems", "cacheList", "ModelConsumable", "_normalizeConsumableType", "itemConsumables", "test", "eventGroup", "consumables", "canConsume", "eventPrefix", "textProxy", "symbol", "startMap", "endMap", "compareMarkersForDowncast", "name1", "range1", "name2", "range2", "DowncastDispatcherBase", "DowncastDispatcher", "conversionApi", "differ", "markers", "writer", "refreshedItems", "change", "changes", "entry", "markerRange", "markersToAdd", "modelRoot", "markersAtSelection", "marker", "shouldMarkerChangeBeConverted", "walkerValueToEventData", "oldValue", "newValue", "walkerValues", "eventName", "consumable", "getEventName", "itemKey", "eventsFiredForConversion", "eventsFiredForItem", "mapper", "ModelNode", "toMap", "thisPath", "nodePath", "attr", "_deep", "ModelSelectionBase", "ModelSelection", "otherSelection", "thisRange", "found", "last", "lastRange", "selectable", "placeOrOffset", "isIterable", "newRanges", "isLastBackward", "anyNewRange", "newRange", "oldRange", "newFocus", "visited", "startBlock", "getParentBlock", "isStartBlockSelected", "treewalker", "block", "isUnvisitedTopBlock", "endBlock", "isEndBlockSelected", "limitStartPosition", "limitEndPosition", "attributes", "isUnvisitedBlock", "isTopBlockInRange", "schema", "hasParentLimit", "parentBlock", "findAncestorBlock", "ModelLiveRangeBase", "ModelLiveRange", "model", "boundModel", "bindWithModel$1", "bindWithModel", "isDetached", "transform$2", "transform", "deletionPosition", "boundariesChanged", "contentChanged", "doesOperationChangeRangeContent", "ModelText", "storePrefix", "ModelDocumentSelectionBase", "ModelDocumentSelection", "LiveSelection", "prefixOrName", "uid", "Collection", "batch", "clearAttributesStoredInElement", "attributeKeys", "overrideUid", "liveRange", "changed", "markerGroup", "selectionRange", "oldMarkers", "hasMarker", "contained", "clearAll", "newAttributes", "oldAttributes", "priority", "newKey", "oldKey", "directChange", "getTextAttributes", "startNode", "scan", "siblingNodes", "isObject", "changeParent", "storedAttributes", "ModelNodeList", "nodesArray", "spliceArray", "makeOffsetsArray", "indexStart", "lastNode", "removedOffsetSum", "offsets", "ModelElement", "children", "relativePath", "deep", "cloneNodes", "normalize", "normalizedNodes", "clonedNodes", "ConversionHelpers", "dispatchers", "conversionHelper", "dispatcher", "DowncastHelpers", "config", "downcastElementToElement", "downcastElementToStructure", "downcastAttributeToElement", "downcastAttributeToAttribute", "downcastMarkerToElement", "downcastMarkerToHighlight", "downcastMarkerToData", "insertText", "viewWriter", "insertAttributesAndChildren", "modelEnd", "removeRangeAndUnbind", "createViewElementFromDowncastHighlightDescriptor", "descriptor", "convertRangeSelection", "convertCollapsedSelection", "brokenPosition", "cleanSelection", "wrap", "elementCreator", "oldViewElement", "newViewElement", "insertElement", "consumer", "defaultConsumer", "removeElementAndUnbind", "reinsertOrConvertNodes", "insertStructure", "slotsMap", "createSlotFactory", "validateSlotsChildren", "fillSlots", "insertUIElement", "viewStartElement", "viewEndElement", "getBoundaryModelPosition", "el", "endViewPosition", "existingName", "existingStartPos", "boundaryType", "existingEndPos", "removed", "removeUIElement", "insertMarkerData", "viewCreator", "viewMarkerData", "handleMarkerBoundary", "isStart", "elementAfter", "elementBefore", "isBefore", "insertMarkerAsAttribute", "insertMarkerAsElement", "removeMarkerData", "viewData", "removeMarkerFromAttribute", "changeAttribute", "attributeCreator", "oldAttribute", "newAttribute", "StylesMap", "highlightText", "highlightDescriptor", "prepareDescriptor", "rangeAfterWrap", "highlightElement", "removeHighlight", "viewHighlightElement", "normalizeModelElementConfig", "normalizeToElementConfig", "createConsumer", "createChangeReducer", "modelValue", "getFromAttributeCreator", "normalizeToAttributeConfig", "group", "toArray", "viewElementType", "modelData", "createViewElementFromDefinition", "viewElementDefinition", "ViewAttributeElement", "keys", "classes", "className", "modelAttributeValue", "createChangeReducerCallback", "shouldReplace", "reducedChanges", "changeIndex", "positionRelation", "events", "modeOrFilter", "slot", "childrenInSlots", "uniqueChildrenInSlots", "toViewPositionMapping", "currentSlot", "currentSlotNodes", "modelNodes", "modelChildNode", "reinsertNode", "modelNode", "viewChildNode", "preflight", "autoParagraphEmptyRoots", "isParagraphable", "nodeOrType", "context", "wrapInParagraph", "paragraph", "UpcastHelpers", "upcastElementToElement", "upcastElementToAttribute", "upcastAttributeToAttribute", "upcastElementToMarker", "upcastDataToMarker", "convertToModelFragment", "modelCursor", "convertText", "convertSelectionChange", "modelSelection", "converter", "prepareToElementConverter", "getViewElementNameFromConfig", "normalizeModelAttributeConfig", "prepareToAttributeConverter", "viewKey", "normalizeViewAttributeKeyValueConfig", "normalizeElementToMarkerModelConfig", "normalizedConfig", "converterStart", "normalizeDataToMarkerConfig", "converterEnd", "basePriority", "priorities", "maxPriority", "priorityFactor", "upcastAttributeToMarker", "attrName", "addMarkerElements", "markerViewNames", "markerViewName", "viewConfig", "matcher", "matcherResult", "match", "getModelElement", "input", "normalized", "viewAttributeKeyToCopy", "defaultModelValue", "shallow", "onlyViewNameIsDefined", "modelKey", "setAttributeOn", "viewItem", "configToTest", "modelAttribute", "elementCreatorFunction", "EditingControllerBase", "EditingController", "ViewRootEditableElement", "markerOrName", "currentMarker", "ModelSchemaBase", "ModelSchema", "ModelSchemaContext", "itemName", "definition", "def", "isAllowed", "positionOrBaseElement", "elementToMerge", "checks", "properties", "selectionOrRangeOrPosition", "rangeCommonAncestor", "convertToMinimalFlatRanges", "backwardWalker", "forwardWalker", "limitElement", "combineWalkers", "removeDisallowedAttributeFromNode", "positionsInRange", "propertyName", "propertyValue", "attributeProperties", "definitions", "sourceRules", "itemNames", "compileBaseItemRule", "propagateAllowIn", "propagateAllowChildren", "propagateDisallowIn", "propagateDisallowChildren", "resolveDisallows", "compileAllowContentOf", "compileAllowWhere", "compileAllowAttributesOf", "compileInheritPropertiesFrom", "compileDefinitions", "parentItem", "parentItemDefinition", "parentContext", "genericChecks", "childChecks", "check", "place", "selectedElement", "firstBlock", "positionAfter", "mapContextItem", "ctx", "query", "sourceItemRules", "itemRule", "copyTypes", "copyProperty", "resolveInheritAll", "childName", "childItem", "allowContentOfItemName", "baseItem", "allowWhereItemName", "finalDefinitions", "allowAttributeOfItemName", "inheritPropertiesOfItemName", "inheritFrom", "typeNames", "sourceItemRule", "singleValue", "ctxItem", "forward", "step", "UpcastDispatcherBase", "UpcastDispatcher", "positionOrElement", "createContextTree", "ViewConsumable", "documentFragment", "extractMarkersFromModelFragment", "elementOrModelCursor", "nextModelCursor", "splitResult", "savedCursorParent", "allowedParent", "treeWalkerValue", "originalPart", "splitPart", "cursorParent", "list", "toRemove", "modelItem", "markerElements", "markerElement", "currentPosition", "contextDefinition", "current", "BasicHtmlWriter", "HtmlDataProcessor", "DataControllerBase", "DataController", "rootName", "trim", "modelElementOrFragment", "viewDocumentFragment", "_getMarkersRelativeToElement", "initialData", "newData", "rootNames", "elementRange", "isMarkerCollapsed", "isMarkerAtElementBoundary", "updatedMarkerRange", "Conversion", "downcastDispatchers", "upcastDispatchers", "alias", "isDowncast", "groupName", "_getAllUpcastDefinitions", "helpers", "_getUpcastDefinition", "upcastAlso", "upcastAlsoItem", "Operation", "baseVersion", "__publicField", "json", "document", "_insert", "position", "nodes", "normalizedNodes", "_normalizeNodes", "offset", "sum", "node", "parent", "_splitNodeAtPosition", "index", "_mergeNodesAtIndex", "ModelRange", "_remove", "range", "CKEditorError", "removed", "_move", "sourceRange", "targetPosition", "_setAttribute", "key", "value", "item", "normalized", "convert", "ModelText", "ModelTextProxy", "ModelNode", "isIterable", "i", "prev", "_haveSameAttributes", "element", "nodeBefore", "nodeAfter", "mergedNode", "textNode", "offsetDiff", "firstPart", "secondPart", "nodeA", "nodeB", "iteratorA", "iteratorB", "attr", "MoveOperation", "sourcePosition", "howMany", "newTargetPosition", "sourceElement", "targetElement", "sourceOffset", "targetOffset", "compareArrays", "ModelPosition", "InsertOperation", "ModelNodeList", "insert", "graveyard", "gyPosition", "originalNodes", "children", "child", "ModelElement", "SplitOperation", "splitPosition", "insertionPosition", "graveyardPosition", "path", "end", "ranges", "MergeOperation", "splitElement", "newElement", "mergedElement", "MarkerOperation", "name", "oldRange", "newRange", "markers", "affectsData", "AttributeOperation", "oldValue", "newValue", "isEqual", "NoOperation", "RenameOperation", "oldName", "newName", "RootAttributeOperation", "root", "RootOperation", "rootName", "elementName", "isAdd", "operations", "OperationFactory", "transformations", "setTransformation", "OperationA", "OperationB", "transformationFunction", "aGroup", "getTransformation", "noUpdateTransformation", "a", "transform", "b", "context", "e", "transformOperationSets", "operationsA", "operationsB", "options", "contextFactory", "ContextFactory", "originalOperations", "nextTransformIndex", "op", "data", "opA", "indexB", "opB", "newOpsA", "newOpsB", "newOpA", "handlePartialMarkerOperations", "brokenOperationsACount", "brokenOperationsBCount", "padWithNoOps", "updateBaseVersions", "useRelations", "forceWeakRemove", "takeFrom", "originalOperation", "operation", "markerRange", "wasInLeftElement", "wasStartBeforeMergedElement", "wasEndBeforeMergedElement", "wasInRightElement", "aIsStrong", "originalOp", "origB", "undoneB", "origA", "relationsA", "relation", "markerOps", "partialRanges", "common", "result", "r", "_getComplementaryAttributeOperations", "insertOperation", "insertValue", "_breakRangeByMoveOperation", "moveOp", "moveRange", "difference", "diff", "spread", "diffs", "aNewRange", "aToGraveyard", "bToGraveyard", "removedRange", "transformed", "rangeA", "rangeB", "insertBefore", "_moveTargetIntoMovedRange", "_makeMoveOperationsFromRanges", "aCompB", "shouldSpread", "newRanges", "rightRange", "movesGraveyardElement", "movedRange", "results", "gyMoveSource", "splitNodesMoveSource", "aTarget", "gyMoveTarget", "gyMove", "splitNodesMoveTargetPath", "splitNodesMoveTarget", "splitNodesMove", "renamePath", "splitPath", "additionalSplit", "rangeToMove", "gyElementMoved", "newParentPosition", "newTargetPath", "splitAtTarget", "howManyRemoved", "aInGraveyard", "bInGraveyard", "newPositionPath", "newPosition", "j", "ModelLivePositionBase", "EmitterMixin", "ModelLivePosition", "stickiness", "model", "boundModel", "bindWithModel", "type", "isDetached", "event", "args", "transform$1", "oldPosition", "Batch", "logWarning", "isUndoable", "isLocal", "isUndo", "isTyping", "Differ", "_a", "markerCollection", "operationToBuffer", "sourceParentInserted", "targetParentInserted", "marker", "markerData", "graveyardParent", "mergedIntoElement", "markerName", "oldMarkerData", "newMarkerData", "buffered", "change", "markerAdded", "markerRemoved", "markerChanged", "diffSet", "changes", "childrenBefore", "childrenAfter", "_getChildrenSnapshots", "diffInstructions", "_generateDiffInstructionsFromChanges", "instruction", "action", "childSnapshotBefore", "diffItem", "beforeAttributes", "afterAttributes", "diffItems", "prevIndex", "prevDiff", "thisDiff", "isConsecutiveTextRemove", "isConsecutiveTextAdd", "isConsecutiveAttributeChange", "v", "_changesInGraveyardFilter", "entry", "isAttached", "attrs", "attrEntry", "changeItem", "state", "currentStatePriority", "diffItemType", "childrenSnapshots", "snapshot", "inc", "old", "incEnd", "oldEnd", "intersectionLength", "howManyAfter", "attributePart", "elementSnapshot", "elementSnapshotBefore", "oldAttributes", "newAttributes", "_getSingleNodeSnapshot", "snapshots", "oldChildrenLength", "oldChildrenHandled", "posInGy", "rangeInGy", "History", "version", "fromBaseVersion", "toBaseVersion", "firstOperation", "inclusiveTo", "gapFrom", "gapTo", "fromIndex", "toIndex", "operationIndex", "undoneOperation", "undoingOperation", "ModelRootElement", "graveyardName", "ModelDocumentBase", "ModelDocument", "ModelDocumentSelection", "Collection", "evt", "writer", "includeDetached", "postFixer", "clone", "roots", "defaultRoot", "schema", "validateTextNodePosition", "wasFixed", "callback", "rangeBoundary", "isInsideSurrogatePair", "isInsideCombinedSymbol", "MarkerCollectionBase", "MarkerBase", "ModelTypeCheckable", "MarkerCollection", "markerOrName", "Marker", "managedUsingOperations", "oldMarker", "hasChanged", "ModelLiveRange", "liveRange", "prefix", "DetachOperation", "ModelDocumentFragment", "relativePath", "items", "normalize", "ModelWriter", "batch", "attributes", "deep", "itemOrPosition", "isSameTree", "rangeRootPosition", "text", "itemOrPositionOrOffset", "itemOrRange", "setAttributeOnRange", "setAttributeOnItem", "val", "toMap", "removeAttributesFromItem", "attribute", "flat", "applyRemoveOperation", "start", "merge", "renameOperation", "limitElement", "firstSplitElement", "firstCopyElement", "split", "elementOrString", "shiftedRange", "usingOperation", "applyMarkerOperation", "currentMarker", "hasUsingOperationDefined", "affectsDataDefined", "currentRange", "updatedRange", "rootOrName", "keyOrObjectOrIterable", "keyOrIterableOfKeys", "uid", "selection", "storeKey", "positionOrRange", "isAffected", "elementBefore", "elementAfter", "affectedInLeftElement", "affectedInRightElement", "affectedAfterLeftElement", "affectedBeforeRightElement", "doc", "lastSplitPosition", "valueBefore", "valueAfter", "addOperation", "previousValue", "rootA", "rootB", "injectSelectionPostFixer", "selectionPostFixer", "modelRange", "correctedRange", "tryFixingRange", "mergeIntersectingRanges", "tryFixingCollapsedRange", "tryFixingNonCollapsedRage", "originalPosition", "nearestSelectionRange", "ancestorObject", "fixedPosition", "isTextAllowedOnStart", "isTextAllowedOnEnd", "startLimitElement", "endLimitElement", "checkSelectionOnNonLimitElements", "fixedStart", "fixedEnd", "rangeStart", "rangeEnd", "isStartInLimit", "isEndInLimit", "bothInSameParent", "expandStart", "isSelectable", "expandEnd", "findOutermostLimitAncestor", "startingNode", "isLimitNode", "startIsOnBlock", "endIsOnBlock", "rangesToMerge", "rangeIndexesToRemove", "currentRangeIndex", "previousRanges", "previousRangeIndex", "previousRange", "mergedRange", "_", "deleteContent", "selRange", "documentSelection", "selectionIsDocumentSelection", "isRelatedToDocumentSelection", "selectionAttributes", "selectionParentWasEmpty", "shouldEntireContentBeReplacedWithParagraph", "replaceEntireContentWithParagraph", "attributesForAutoparagraph", "selectedElement", "startPosition", "endPosition", "getLivePositionsForSelectedBlocks", "mergeBranches", "collapseSelectionAt", "shouldAutoparagraph", "insertParagraph", "restoreSelectionAttributesOnEmptyParent", "endBlock", "getParentBlock", "newEndPosition", "skippedRange", "ancestors", "checkShouldMerge", "startAncestor", "endAncestor", "getAncestorsJustBelowCommonAncestor", "mergeBranchesRight", "mergeBranchesLeft", "commonAncestor", "startElement", "endElement", "parentToRemove", "mergeRight", "isCrossingLimitElement", "positionA", "positionB", "ancestorsA", "ancestorsB", "isTextAllowed", "isParagraphAllowed", "leftPos", "rightPos", "rangeToCheck", "paragraph", "getSelectedContent", "frag", "commonPath", "commonParent", "flatSubtreeRange", "leftExcessRange", "removeRangeContent", "parentsToCheck", "itemRange", "parentToCheck", "removeRange", "insertContent", "content", "selectable", "insertion", "Insertion", "fakeMarkerElements", "nodesToInsert", "markersPosition", "isCollapsed", "posA", "posB", "fakeElement", "collapsed", "isAtBeginning", "isAtEnd", "selectionLiveRange", "markersData", "isStartBoundary", "elementPosition", "rangeOnInsertion", "affectedRange", "nodesArray", "remove", "unwrap", "walker", "itemParent", "positionAfterLastNode", "positionAfterNode", "livePosition", "mergePosLeft", "mergePosRight", "previousSibling", "nextSibling", "allowedIn", "tempPos", "contextElement", "childNode", "insertObject", "object", "originalSelection", "insertionSelection", "firstSelectedBlock", "first", "attributesToCopy", "elementToInsert", "insertionPositionParent", "updateSelection", "place", "paragraphAttributes", "nextElement", "wordBoundaryCharacters", "modifySelection", "isForward", "unit", "treatEmojiAsSingleUnit", "focus", "ModelTreeWalker", "getSearchRange", "next", "tryExtendingTo", "nextPosition", "getCorrectWordBreakPosition", "getCorrectPosition", "isInsideEmojiSequence", "isAtNodeBoundary", "isAtWordBoundary", "searchEnd", "offsetToCheck", "ModelBase", "ObservableMixin", "Model", "config", "ModelSchema", "methodName", "autoParagraphEmptyRoots", "canEditAt", "err", "batchOrType", "placeOrOffset", "rest", "normalizeSelectable", "subject", "ignoreWhitespaces", "ignoreMarkers", "intersectingMarker", "ModelSelection", "ret", "currentBatch", "callbackReturnValue", "ClickObserver", "DomEventObserver", "domEvent", "MouseObserver", "TouchObserver", "PointerObserver", "ViewUpcastWriter", "ViewDocumentFragment", "ViewElement", "ViewText", "oldElement", "className", "property", "valueOrElement", "isPlainObject", "ViewPosition", "ViewRange", "ViewSelection", "HEX_COLOR_REGEXP", "RGB_COLOR_REGEXP", "RGBA_COLOR_REGEXP", "HSL_COLOR_REGEXP", "HSLA_COLOR_REGEXP", "CSS_SHORTHAND_VALUE_REGEXP", "COLOR_NAMES", "isColorStyleValue", "string", "lineStyleValues", "isLineStyleValue", "lengthRegExp", "isLengthStyleValue", "PERCENTAGE_VALUE_REGEXP", "isPercentageStyleValue", "sizeValues", "isSizeStyleValue", "repeatValues", "isRepeatStyleValue", "positionValues", "isPositionStyleValue", "attachmentValues", "isAttachmentStyleValue", "originValues", "isOriginStyleValue", "clipValues", "isClipStyleValue", "getBoxSidesStyleValues", "value", "values", "getShorthandStylesValues", "top", "bottom", "right", "getBoxSidesStyleValueReducer", "styleShorthand", "left", "reduced", "getBoxSidesStyleShorthandValue", "out", "getPositionStyleShorthandNormalizer", "shorthand", "string", "matches", "CSS_SHORTHAND_VALUE_REGEXP", "BACKGROUND_INITIAL_ARRAY_VALUES", "IMAGE_FUNCTIONS", "addBackgroundStylesRules", "stylesProcessor", "getBackgroundColorNormalizer", "property", "getBackgroundArrayPropertyNormalizer", "getBackgroundArrayPropertyReducer", "getBackgroundNormalizer", "getBackgroundReducer", "layers", "parseBackgroundIntoLayers", "getDefaultBackgroundLayer", "normalizeBackgroundLayers", "path", "splitByTopLevelCommas", "background", "key", "serializeToShorthandBackground", "serializeToLonghandBackground", "result", "extractBackgroundLayers", "layer", "serializeBackgroundLayer", "parts", "positionStr", "isPositionDefault", "sizeStr", "repeatStr", "isOriginDefault", "isClipDefault", "layerCount", "getTotalBackgroundLayers", "_", "i", "layersCount", "parseBackgroundLayer", "obj", "valueWithoutImage", "image", "extractBackgroundImage", "part", "isSizeStyleValue", "isRepeatStyleValue", "isPositionStyleValue", "isPercentageStyleValue", "isAttachmentStyleValue", "isClipStyleValue", "isOriginStyleValue", "isColorStyleValue", "isEmpty", "imageFunction", "prefix", "firstIndex", "acc", "nesting", "char", "current", "addBorderStylesRules", "getBorderNormalizer", "getBorderPositionNormalizer", "getBorderPropertyNormalizer", "getBorderPropertyPositionNormalizer", "getBorderPositionExtractor", "getBorderPositionReducer", "getBorderReducer", "color", "style", "width", "normalizeBorderShorthand", "side", "border", "propertyName", "toBorderPropertyShorthand", "which", "name", "styles", "extractBorderPosition", "isLengthStyleValue", "isLineStyleValue", "topStyles", "rightStyles", "bottomStyles", "leftStyles", "borderStyles", "borderStylesByType", "getReducedStyleValueForType", "reducedBorderStyle", "reduceBorderPosition", "reducedStyleTypes", "type", "borderTypes", "borderValue", "item", "addMarginStylesRules", "addPaddingStylesRules", "Watchdog", "config", "__publicField", "evt", "error", "eventName", "callback", "cb", "args", "callbacks", "causesRestart", "getSubNodes", "head", "excludedProperties", "nodes", "subNodes", "nodeIndex", "node", "shouldNodeBeIncluded", "n", "key", "type", "typeOfNode", "areConnectedThroughProperties", "target1", "target2", "excludedNodes", "isObject", "subNodes1", "subNodes2", "structure", "normalizeRootsConfig", "sourceElementsOrData", "defaultRootName", "mainRootConfig", "rootsConfig", "sourceElementIsPlainObject", "isPlainObject", "legacyInitialData", "getLegacyInitialData", "rootNames", "rootName", "rootConfig", "getLegacyPlainConfigValue", "isElement", "sourceElementIsObject", "legacyValue", "value", "_isElement", "EditorWatchdog", "Editor", "watchdogConfig", "throttle", "elementOrDataOrConfig", "editor", "creator", "destructor", "err", "updatedConfig", "EditorWatchdogInitPlugin", "updatedRootsConfig", "rootData", "getSavedRootEditableOptions", "elementOrData", "configOrContext", "context", "isUsingConfigBasedCreator", "resolvedContext", "rootsCount", "isMultiRootFromLegacy", "version", "props", "roots", "root", "plugins", "commentsRepository", "trackChanges", "data", "marker", "editables", "editable", "values", "v", "cloneDeepWith", "writer", "jsonNode", "element", "child", "content", "attributes", "parsedNodes", "parsedAttributes", "rootElement", "markerName", "markerOptions", "document", "start", "end", "options", "startPosition", "endPosition", "range", "parsedCommentThreads", "parsedSuggestions", "commentThread", "commentThreadData", "channelId", "trackChangesEditing", "suggestion", "suggestionData", "serializedAttributes", "mainQueueId", "ContextWatchdog", "Context", "ActionQueues", "contextConfig", "itemId", "itemConfigurationOrItemConfigurations", "itemConfigurations", "toArray", "item", "watchdog", "res", "rethrowRestartEventOnce", "itemIdOrItemIds", "itemIds", "onEmptyCallback", "queueId", "action", "isMainAction", "queueWithAction", "nonErrorQueue", "elementOrArray", "PluginBase", "ObservableMixin", "Plugin", "editor", "__publicField", "id", "forceDisable", "evt", "CommandBase", "Command", "selection", "canEditAtSelection", "affectsData", "args", "MultiCommand", "command", "options", "insertToPriorityArray", "commandDefinition", "CommandCollection", "commandName", "commandParams", "CKEditorError", "PluginCollectionBase", "EmitterMixin", "PluginCollection", "context", "availablePlugins", "contextPlugins", "PluginConstructor", "pluginInstance", "entry", "key", "plugin", "pluginName", "plugins", "pluginsToRemove", "pluginsSubstitutions", "that", "findAvailablePluginConstructors", "validatePlugins", "pluginConstructors", "getPluginConstructors", "isPluginRemoved", "substitutePlugins", "pluginInstances", "loadPlugins", "initPlugins", "isPluginConstructor", "isContextPlugin", "removedPlugin", "getPluginName", "processed", "result", "parentPluginConstructor", "checkPluginConstructor", "checkMissingPlugin", "checkContextPlugin", "checkRemovedPlugin", "method", "promise", "pluginItem", "pluginToReplace", "indexInPluginConstructors", "promises", "Context", "_a", "config", "translations", "rest", "Config", "languageConfig", "Locale", "Collection", "isContextOwner", "name", "resolve", "ContextPluginBase", "ContextPlugin", "EditingKeystrokeHandler", "KeystrokeHandler", "keystroke", "callback", "evtData", "cancel", "DEFAULT_CATEGORY_ID", "DEFAULT_GROUP_ID", "Accessibility", "isMenuBarVisible", "t", "navigationKeystrokes", "label", "description", "groups", "group", "categoryId", "keystrokes", "category", "groupId", "getEditorUsageData", "getSessionId", "getPageSessionID", "getEditorType", "getPluginsUsageData", "getDistributionUsageData", "getEnvUsageData", "getToolbarUsageData", "collection", "isOfficialPlugin", "isPremiumPlugin", "toolbarConfig", "normalizedToolbar", "flattenToolbarConfigNames", "extractToolbarConfigItemsNames", "stripToolbarSeparatorItems", "items", "item", "os", "browser", "env", "uid", "globalVar", "EditorBase", "Editor", "constructor", "defaultTranslations", "defaultConfig", "language", "checkLicenseKeyIsDefined", "Model", "stylesProcessor", "StylesProcessor", "DataController", "EditingController", "Conversion", "verifyLicenseKey", "licenseKey", "distributionChannel", "blockEditor", "reason", "hasAllRequiredFields", "licensePayload", "field", "getCrcInputData", "checkLicensedHosts", "licensedHosts", "hostname", "segments", "host", "octets", "segment", "index", "warnAboutNonProductionLicenseKey", "licenseType", "capitalizedLicenseType", "article", "decodeLicenseKey", "toArray", "crc32", "releaseDate", "timerId", "request", "collectUsageData", "response", "status", "message", "logError", "value", "lockId", "data", "removePlugins", "extraPlugins", "loadedPlugins", "checkPluginsAllowedByLicenseKey", "decodedPayload", "disallowedPlugin", "pluginConstructor", "isFeatureBlockedByLicenseKey", "err", "rootName", "root", "rootAttributes", "gluePluginName", "containsGluePlugin", "endpoint", "headers", "EditorWatchdog", "ContextWatchdog", "collectedData", "setUsageData", "path", "get", "set", "attachToForm", "isFunction", "sourceElement", "isTextArea", "originalSubmit", "form", "onSubmit", "ElementApiMixin", "base", "Mixin", "shouldUpdateSourceElement", "isSourceElementTextArea", "setDataInElement", "dataToSet", "CONFIG_FIELDS_AS_ROOT_ATTRIBUTES", "registerAndInitializeRootConfigAttributes", "editor", "rootsConfig", "rootName", "rootConfig", "modelAttributes", "configField", "attributeKey", "normalizedRootsConfig", "hasRootAttributes", "key", "writer", "root", "value", "normalizeRootsConfig", "sourceElementsOrData", "config", "defaultRootName", "separateAttachTo", "mainRootConfig", "isPlainObject", "CKEditorError", "sourceElementIsPlainObject", "isSourceElementsOrDataRecord", "legacyInitialData", "getLegacyInitialData", "rootNames", "sourceElementOrDataForRoot", "isElement", "logWarning", "rootConfigElement", "getInitialData", "getLegacyPlainConfigValue", "normalizeViewRootElementDefinition", "normalizeSingleRootEditorConstructorParams", "sourceElementOrDataOrConfig", "editorConfig", "isSourceElementsOrDataRecord", "sourceElementsOrData", "isElement", "getInitialData", "sourceElementOrData", "getDataFromElement", "getLegacyInitialData", "config", "sourceElementIsObject", "defaultRootName", "getLegacyPlainConfigValue", "key", "rootName", "legacyValue", "normalizeViewRootElementDefinition", "spec", "assertAllowedTagName", "name", "classes", "styles", "attributes", "attrClass", "attrStyle", "restAttributes", "hadAttrClass", "hasStyles", "stylesOverrode", "logWarning", "normalizedClasses", "tokenizeClasses", "normalizedAttributes", "value", "toArray", "token", "CKEditorError", "_isElement", "verifyRootElements", "editor", "schema", "document", "root", "rootAcceptsBlocks", "PendingActions", "ContextPlugin", "__publicField", "Collection", "message", "action", "ObservableMixin", "accessibility_default", "align_bottom_default", "align_center_default", "align_justify_default", "align_left_default", "align_middle_default", "align_right_default", "align_top_default", "bold_default", "bulleted_list_default", "cancel_default", "caption_default", "check_default", "code_block_default", "color_palette_default", "color_tile_check_default", "drag_handle_default", "drag_indicator_default", "dropdown_arrow_default", "eraser_default", "font_background_default", "font_color_default", "font_family_default", "font_size_default", "image_default", "image_upload_default", "import_export_default", "indent_default", "italic_default", "link_default", "media_placeholder_default", "media_default", "next_arrow_default", "numbered_list_default", "object_center_default", "object_full_width_default", "object_inline_left_default", "object_inline_right_default", "object_inline_default", "object_left_default", "object_right_default", "object_size_custom_default", "object_size_full_default", "object_size_large_default", "object_size_medium_default", "object_size_small_default", "outdent_default", "paragraph_default", "pencil_default", "pilcrow_default", "plus_default", "previous_arrow_default", "project_logo_default", "redo_default", "remove_format_default", "return_arrow_default", "select_all_default", "settings_default", "strikethrough_default", "table_cell_properties_default", "table_column_default", "table_merge_cell_default", "table_properties_default", "table_row_default", "table_default", "text_alternative_default", "text_default", "three_vertical_dots_default", "underline_default", "undo_default", "unlink_default", "colors", "key", "color_name_default", "color_parse_default", "parse", "baseHues", "cstr", "m", "parts", "alpha", "space", "color_name_default", "base", "size", "isShort", "name", "dims", "x", "i", "value", "reverseKeywords", "key", "color_name_default", "convert", "conversions_default", "LAB_FT", "srgbNonlinearTransform", "c", "cc", "srgbNonlinearTransformInv", "model", "channels", "labels", "rgb", "r", "g", "b", "min", "max", "delta", "h", "s", "l", "rdif", "gdif", "bdif", "v", "diff", "diffc", "w", "lp", "mp", "sp", "aa", "bb", "k", "m", "y", "comparativeDistance", "x", "reversed", "currentClosestDistance", "currentClosestKeyword", "keyword", "value", "distance", "z", "xyz", "a", "hsl", "t3", "t2", "t1", "i", "smin", "lmin", "sv", "hsv", "hi", "f", "p", "q", "t", "vmin", "sl", "hwb", "wh", "bl", "ratio", "n", "cmyk", "oklab", "ll", "oklch", "lab", "y2", "x2", "z2", "lch", "hr", "args", "saturation", "ansi", "color", "mult", "rem", "string", "match", "colorString", "char", "integer", "chroma", "hue", "grayscale", "hcg", "pure", "mg", "apple", "gray", "buildGraph", "graph", "models", "conversions_default", "length", "i", "deriveBFS", "fromModel", "queue", "current", "adjacents", "adjacent", "node", "link", "from", "to", "args", "wrapConversion", "toModel", "path", "fn", "cur", "route", "conversion", "route_default", "convert", "models", "conversions_default", "wrapRaw", "fn", "wrappedFn", "args", "arg0", "wrapRounded", "result", "length", "i", "fromModel", "routes", "route_default", "routeModels", "toModel", "color_convert_default", "clamp", "number", "min", "max", "round", "digits", "base", "angleUnits", "hexToHsva", "hex", "rgbaToHsva", "hexToRgba", "round", "hsvaToHex", "hsva", "rgbaToHex", "hsvaToRgba", "hsvaToHsla", "h", "s", "v", "a", "hh", "round", "hsvaToHslString", "hsva", "h", "s", "l", "hsvaToHsla", "hsvaToRgba", "h", "s", "v", "a", "hh", "b", "c", "d", "module", "round", "format", "number", "hex", "rgbaToHex", "r", "g", "b", "a", "alphaHex", "round", "rgbaToHsva", "max", "delta", "hh", "equalColorObjects", "first", "second", "prop", "equalHex", "first", "second", "equalColorObjects", "hexToRgba", "cache", "tpl", "html", "template", "fire", "target", "type", "detail", "hasTouched", "isTouch", "e", "isValid", "event", "pointerMove", "target", "pointer", "rect", "fire", "clamp", "keyMove", "keyCode", "Slider", "root", "part", "aria", "xy", "template", "tpl", "el", "state", "toggleEvent", "styles", "style", "i", "p", "Hue", "Slider", "root", "h", "hsvaToHslString", "round", "offset", "key", "clamp", "Saturation", "Slider", "root", "hsva", "hsvaToHslString", "round", "offset", "key", "clamp", "color_picker_default", "hue_default", "saturation_default", "$isSame", "$color", "$hsva", "$update", "$parts", "$css", "$sliders", "ColorPicker", "color_picker_default", "hue_default", "saturation_default", "Saturation", "Hue", "newColor", "newHsva", "template", "tpl", "root", "slider", "value", "_attr", "_oldVal", "newVal", "color", "event", "oldHsva", "equalColorObjects", "fire", "hsva", "part", "colorModel", "hexToHsva", "h", "s", "v", "hsvaToHex", "equalHex", "color", "HexBase", "ColorPicker", "ViewCollection", "Collection", "initialItems", "__publicField", "evt", "view", "index", "elementOrDocFragment", "events", "isStringArray", "CKEditorError", "dest", "evtName", "subject", "arr", "a", "xhtmlNs", "TemplateBase", "EmitterMixin", "Template", "def", "normalize", "clone", "node", "getEmptyRevertData", "search", "child", "isView", "isTemplate", "observable", "emitter", "eventNameOrFunctionOrAttribute", "callback", "TemplateToBinding", "attribute", "valueIfTrue", "TemplateIfBinding", "template", "extendTemplate", "data", "isInvalid", "hasTemplateBinding", "getTextUpdater", "revertData", "attrName", "domAttrValue", "attrValue", "attrNs", "isNamespaced", "valueToBind", "shouldExtend", "getAttributeUpdater", "value", "val", "prev", "next", "arrayValueReducer", "isFalsy", "styles", "styleName", "styleValue", "getStyleUpdater", "isCssVariable", "container", "isApplying", "childIndex", "isViewCollection", "isNode", "childRevertData", "key", "revertBindings", "schemaItem", "domEvtName", "domSelector", "schema", "updater", "syncValueSchemaValue", "item", "templateBinding", "binding", "revertBinding", "element", "i", "TemplateBinding", "domEvt", "name", "getValueSchemaValue", "values", "el", "ns", "cloneDeepWith", "normalizePlainTextDefinition", "normalizeTextDefinition", "normalizeListeners", "normalizeAttributes", "children", "attributes", "toArray", "arrayify", "listeners", "l", "obj", "cur", "extendObjectValueArray", "ext", "childDef", "View", "isObject", "ViewBase", "DomEmitterMixin", "ObservableMixin", "locale", "collection", "views", "isIterable", "definition", "c", "AriaLiveAnnouncerPoliteness", "AriaLiveAnnouncer", "editor", "politeness", "announcement", "AriaLiveAnnouncerView", "isUnsafeHTML", "politenessRegionView", "AriaLiveAnnouncerRegionView", "messageListItem", "clickOutsideHandler", "activator", "contextElements", "listenerOptions", "path", "contextElementsList", "contextElement", "CssTransitionDisablerMixin", "Mixin", "args", "DraggableViewMixin", "DraggableMixin", "globalVar", "x", "y", "newX", "newY", "submitHandler", "addKeyboardHandlingForGrid", "keystrokeHandler", "focusTracker", "gridItems", "numberOfColumns", "uiLanguageDirection", "getNumberOfColumns", "getGridItemFocuser", "focusedElementIndex", "getLeftElementIndex", "getRightElementIndex", "nextIndex", "getIndexToFocus", "focusedElement", "nextIndexToFocus", "elementIndex", "collectionLength", "LabelView", "uid", "bind", "AccessibilityHelpContentView", "keystrokes", "t", "helpLabel", "createElement", "categories", "categoryDefinition", "elements", "groupDefinition", "definitionAndDescriptionElements", "b", "keystrokeDefinition", "dt", "dd", "normalizedKeystrokeDefinition", "normalizeKeystrokeDefinition", "keystrokeAlternativeHTMLs", "keystrokeAlternative", "keystrokeToEnvKbd", "env", "keystroke", "getEnvKeystrokeText", "part", "IconView", "_a", "svg", "viewBox", "ButtonLabelView", "ButtonView", "labelView", "ariaLabelUid", "isOn", "isToggleable", "role", "isCheckableRole", "delay", "prop", "newIcon", "oldIcon", "keystrokeView", "text", "tooltip", "label", "FormHeaderView", "options", "FocusCyclerBase", "FocusCycler", "methodName", "actions", "cancel", "isDomFocusable", "viewIndex", "focused", "previous", "chainedFocusCycler", "getCurrentFocusedView", "oldCurrent", "otherFocusCycler", "direction", "step", "current", "focusableItem", "focusableItemCandidate", "isFocusable", "isVisible", "isViewWithFocusCycler", "DialogActionsView", "KeystrokeHandler", "FocusTracker", "definitions", "button", "property", "v", "DialogContentView", "DialogViewPosition", "toPx", "toUnit", "DialogViewBase", "DialogView", "getDomRootElement", "getViewportOffset", "keystrokeHandlerOptions", "isModal", "top", "left", "deltaX", "deltaY", "icon", "title", "hasCloseButton", "content", "actionButtons", "viewportRect", "dialogRect", "configuredPosition", "domRootRect", "visibleDomRootRect", "defaultOffset", "coords", "leftCoordinate", "Rect", "getConstrainedViewportRect", "focusables", "focusable", "buttonView", "cancel_default", "Dialog", "Plugin", "model", "changedRoots", "changes", "dialogDefinition", "id", "className", "position", "onHide", "getRootName", "rootName", "ListItemButtonView", "CheckIconHolderView", "hasCheckSpace", "propertyName", "hasCheck", "_checkIconHolderView", "_checkIconView", "iconView", "check_default", "MenuBarMenuListItemButtonView", "AccessibilityHelp", "ButtonClass", "dialog", "accessibility_default", "editingView", "writer", "root", "addAriaLabelTextToRoot", "modelRoot", "viewRoot", "newAriaLabel", "segment", "BodyCollection", "POSITION_OFF_SCREEN", "BalloonPanelView", "target", "getDomElement", "defaultPositions", "positionOptions", "optimalPosition", "withArrow", "targetElement", "limiterElement", "scrollTarget", "isWithinScrollTarget", "isLimiterWithinScrollTarget", "isText", "checkVisibility", "ResizeObserver", "sideOffset", "heightOffset", "stickyVerticalOffset", "config", "targetRect", "balloonRect", "getNorthTop", "getSouthTop", "boundaryRect", "visibleBoundaryRect", "getOptimalPosition", "object", "isElement", "isRange", "NARROW_ROOT_HEIGHT_THRESHOLD", "NARROW_ROOT_WIDTH_THRESHOLD", "BadgeBase", "Badge", "throttle", "balloon", "isFocused", "attachOptions", "badgeConfig", "positioningFunction", "getLowerRightCornerPosition", "getLowerLeftCornerPosition", "editableEditorElements", "focusedEditableElement", "getLowerCornerPosition", "rootRect", "getBalloonLeft", "visibleEditableElementRect", "editableElementRect", "balloonTop", "balloonLeft", "newBalloonPositionVisibleRect", "DEFAULT_LABEL", "PoweredBy", "licenseKey", "licenseContent", "parseBase64EncodedObject", "PoweredByView", "userConfig", "verticalOffset", "project_logo_default", "SwitchButtonView", "toggleSwitchView", "FileDialogButtonViewMixinBase", "FileDialogViewMixin", "FileDialogListItemButtonViewMixinBase", "FileDialogButtonView", "FileDialogListItemButtonView", "FileDialogView", "FileInputView", "CollapsibleView", "childViews", "dropdown_arrow_default", "isCollapsed", "getLocalizedColorOptions", "localizedColorNames", "colorOption", "normalizeColorOptions", "normalizeSingleColorDefinition", "option", "color", "ColorTileView", "color_tile_check_default", "ColorGridView", "colorDefinitions", "viewStyleAttribute", "colorTile", "selectedColor", "convertColor", "outputFormat", "colorObject", "parseColorString", "canConvertParsedColor", "toColorSpace", "color_convert_default", "formatColorOutput", "convertToHex", "registerCustomElement", "elementName", "constructor", "format", "colorString", "parsedHex", "color_parse_default", "parsed", "parsedColor", "LabeledFieldView", "viewCreator", "viewUid", "statusUid", "errorText", "infoText", "statusView", "InputBase", "isInputElementEmpty", "domElement", "InputView", "InputTextView", "InputNumberView", "min", "max", "DropdownPanelView", "View", "locale", "__publicField", "bind", "value", "evt", "target", "firstChild", "logWarning", "lastChild", "DropdownView", "_a", "buttonView", "panelView", "KeystrokeHandler", "FocusTracker", "name", "isOpen", "optimalPanelPosition", "closeDropdown", "data", "cancel", "south", "north", "southEast", "southWest", "northEast", "northWest", "southMiddleEast", "southMiddleWest", "northMiddleEast", "northMiddleWest", "buttonRect", "panelRect", "getOptimalPosition", "DropdownButtonView", "ButtonView", "arrowView", "IconView", "dropdown_arrow_default", "ListItemView", "View", "locale", "__publicField", "bind", "value", "ListSeparatorView", "ListItemGroupView", "labelView", "LabelView", "nestedList", "ListView", "firstListItem", "item", "ViewCollection", "FocusTracker", "KeystrokeHandler", "FocusCycler", "evt", "data", "removed", "added", "index", "groupView", "groupIndex", "child", "childIndex", "registeredChildIndex", "groupItemsChangeCallback", "ToolbarSeparatorView", "View", "locale", "ToolbarLineBreakView", "preventDefault", "view", "evt", "normalizeToolbarConfig", "config", "predefinedConfigOptions", "NESTED_TOOLBAR_ICONS", "align_left_default", "bold_default", "import_export_default", "paragraph_default", "plus_default", "text_default", "three_vertical_dots_default", "pilcrow_default", "drag_indicator_default", "ToolbarView", "options", "__publicField", "bind", "t", "FocusTracker", "KeystrokeHandler", "ItemsView", "isRtl", "FocusCycler", "classes", "DynamicGrouping", "StaticLayout", "item", "itemsOrConfig", "factory", "removeItems", "newBehaviorType", "normalizedRemoveItems", "isObject", "items", "filteredItems", "idx", "logWarning", "nonSeparatorPredicate", "count", "firstCommandItemIndex", "lastCommandItemIndex", "name", "definition", "componentFactory", "label", "icon", "tooltip", "withText", "dropdownView", "createDropdown", "addToolbarToDropdown", "isFocusable", "changeData", "index", "added", "removedItem", "currentIndex", "addedItem", "isVisible", "initialGroupedItemsCount", "wereItemsGrouped", "element", "uiLanguageDirection", "lastChildRect", "Rect", "toolbarRect", "computedStyle", "globalVar", "paddingProperty", "previousWidth", "ResizeObserver", "entry", "dropdown", "SplitButtonView", "actionButton", "value", "cancel", "actionView", "ButtonView", "arrowView", "dropdown_arrow_default", "ButtonClassOrInstance", "DropdownButtonView", "buttonView", "panelView", "DropdownPanelView", "DropdownView", "addDefaultBehaviors", "addToolbarToDropdown", "dropdownView", "buttonsOrCallback", "options", "addToolbarToOpenDropdown", "focusChildOnDropdownOpen", "item", "locale", "t", "toolbarView", "ToolbarView", "buttons", "ViewCollection", "addListToDropdown", "itemsOrCallback", "addListToOpenDropdown", "ListItemView", "listView", "ListView", "items", "bindViewCollectionItemsToDefinitions", "childSelectorCallback", "childToFocus", "logWarning", "priorities", "addDefaultBehaviors", "closeDropdownOnClickOutside", "closeDropdownOnExecute", "closeDropdownOnBlur", "focusDropdownContentsOnArrows", "focusDropdownButtonOnClose", "focusDropdownPanelOnOpen", "clickOutsideHandler", "getFocusTrackerTreeElements", "element", "focusTracker", "view", "evt", "SwitchButtonView", "name", "isFocused", "data", "cancel", "isOpen", "globalVar", "listItems", "definitions", "bindDropdownToggleableButtonsAlignment", "def", "ListSeparatorView", "groupView", "ListItemGroupView", "isToggleable", "listItemView", "buttonView", "ListItemButtonView", "toggleableButtonsCount", "pickListItemButtonIfPresent", "pickListItemToggleableButtonIfPresent", "listItemButtonView", "updateAllButtonsCheckSpace", "hasSpace", "listItem", "listItemButton", "prevToggleable", "button", "currentToggleable", "createLabeledInputText", "labeledFieldView", "viewUid", "statusUid", "inputView", "InputTextView", "value", "createLabeledInputNumber", "InputNumberView", "createLabeledDropdown", "labeledFieldView", "viewUid", "statusUid", "dropdownView", "createDropdown", "waitingTime", "ColorPickerView", "View", "locale", "config", "__publicField", "children", "debounce", "color", "evt", "propertyName", "newValue", "convertColor", "convertColorToCommonHexFormat", "registerCustomElement", "HexBase", "globalVar", "styleSheetForFocusedColorPicker", "event", "env", "slidersView", "item", "slider", "SliderView", "colorInput", "ColorPickerInputRowView", "labeledInput", "LabeledFieldView", "createLabeledInputText", "t", "pickerColor", "inputValue", "maybeHexColor", "tryParseHexColor", "inputColor", "ret", "convertToHex", "element", "HashView", "inputView", "hashLessColor", "DocumentColorCollectionBase", "ObservableMixin", "Collection", "DocumentColorCollection", "options", "index", "ColorGridsFragmentView", "colors", "columns", "removeButtonLabel", "documentColorsLabel", "documentColorsCount", "colorPickerLabel", "focusTracker", "focusables", "bind", "value", "model", "attributeName", "document", "maxCount", "root", "range", "node", "documentColorsGrid", "staticColorsGrid", "selectedColor", "Template", "label", "ButtonView", "color_palette_default", "buttonView", "eraser_default", "colorGrid", "ColorGridView", "data", "colorObj", "colorTile", "ColorTileView", "name", "val", "predefinedColor", "definition", "ColorPickerFragmentView", "keystrokes", "colorPickerViewConfig", "saveButtonView", "cancelButtonView", "colorPickerView", "stopPropagation", "input", "actionBarRow", "check_default", "cancel_default", "ColorSelectorView", "FocusTracker", "KeystrokeHandler", "ViewCollection", "FocusCycler", "evtName", "ComponentFactory", "editor", "callback", "getNormalized", "CKEditorError", "BALLOON_CLASS", "TooltipManagerBase", "DomEmitterMixin", "TooltipManager", "_a", "BalloonPanelView", "createMutationObserver", "editorBodyViewCollection", "position", "defaultPositions", "domEvent", "target", "elementWithTooltipAttribute", "getDescendantWithTooltip", "getTooltipData", "relatedTarget", "isElement", "balloonElement", "isEnteringBalloon", "isLeavingBalloon", "descendantWithTooltip", "relatedDescendantWithTooltip", "targetDomElement", "text", "cssClass", "bodyViewCollection", "first", "className", "tooltipData", "isVisible", "mutationObserver", "EvaluationBadge", "Badge", "licenseType", "getLicenseTypeFromLicenseKey", "EvaluationBadgeView", "badgeConfig", "userConfig", "licenseKey", "licenseContent", "parseBase64EncodedObject", "MenuBarMenuListItemView", "ListItemView", "parentMenuView", "NESTED_PANEL_HORIZONTAL_OFFSET", "MenuBarBehaviors", "menuBarView", "menuView", "pathLeaf", "isListItemContainingMenu", "isContentRTL", "cycleTopLevelMenus", "currentMenuView", "step", "currentIndex", "isCurrentMenuViewOpen", "menusCount", "menuViewToOpen", "isOpen", "clickOutsideHandler", "child", "isKeyPressed", "_", "MenuBarMenuBehaviors", "cancel", "keystroke", "MenuBarMenuViewPanelPositioningFunctions", "buttonRect", "panelRect", "DefaultMenuBarItems", "normalizeMenuBarConfig", "configObject", "cloneDeep", "processMenuBarConfig", "normalizedConfig", "componentFactory", "extraItems", "configClone", "handleAdditions", "handleRemovals", "purgeUnavailableComponents", "purgeEmptyMenus", "localizeMenuLabels", "originalConfig", "itemsToBeRemoved", "successfullyRemovedItems", "menuId", "walkConfigMenus", "menuDefinition", "groupId", "groupDefinition", "itemId", "getIdFromGroupItem", "itemName", "logWarning", "items", "successFullyAddedItems", "itemToAdd", "relation", "getRelationFromPosition", "relativeId", "getRelativeIdFromPosition", "isMenuBarMenuAddition", "topLevelMenuDefinitionIndex", "addMenuOrItemToGroup", "isMenuBarMenuGroupAddition", "relativeGroupIndex", "group", "addedItemConfig", "itemOrMenuToAdd", "wasAdded", "groupItems", "relativeItemIndex", "groupItem", "isItemUnavailable", "isUsingDefaultConfig", "wasSubMenuPurged", "warnAboutEmptyMenu", "isMenuDefinition", "emptyMenuConfig", "localizedCategoryLabels", "topLevelMenuDefinition", "walk", "match", "EditorUIBase", "EditorUI", "editingView", "PoweredBy", "AriaLiveAnnouncer", "domElement", "rootName", "setUpKeystrokeHandler", "toolbarView", "menuBarViewElement", "normalizedMenuBarConfig", "viewportOffsetConfig", "legacyOffsetConfig", "candidateDefinitions", "currentFocusedToolbarDefinition", "i", "candidateDefinition", "focusedToolbarDef", "focusedElement", "definitions", "toolbarDef", "defA", "defB", "getToolbarDefinitionWeight", "candidateToolbarDefinition", "beforeFocus", "configuredViewportOffset", "body", "view", "visualTop", "updateViewport", "viewportOffset", "visualViewportOffsetTop", "getVisualViewportOffset", "viewportTopOffset", "weight", "EditorUIView", "BodyCollection", "BoxedEditorUIView", "voiceLabel", "LabelView", "EditableUIView", "editableElement", "classes", "styles", "attributes", "toArray", "updateAfterRender", "update", "writer", "viewRoot", "_isElement", "InlineEditableUIView", "editableName", "existingLabel", "FormRowView", "Notification", "ContextPlugin", "evt", "data", "message", "event", "UIModelBase", "ObservableMixin", "UIModel", "attributes", "properties", "assignIn", "toPx", "toUnit", "ContextualBalloon", "Plugin", "editor", "__publicField", "view", "editableElement", "CKEditorError", "stackId", "stack", "position", "id", "BalloonPanelView", "entry", "stacks", "nextIndex", "RotatorView", "t", "value", "isSingleViewMode", "visibleView", "numberOfStacks", "current", "FakePanelsView", "number", "balloonClassName", "withArrow", "singleViewMode", "View", "locale", "bind", "FocusTracker", "previous_arrow_default", "next_arrow_default", "label", "icon", "ButtonView", "balloonPanelView", "name", "next", "prev", "top", "left", "width", "height", "Rect", "StickyPanelView", "Template", "isSticky", "globalVar", "limiterRect", "visibleLimiterRect", "windowRect", "visualViewportOffsetLeft", "visualViewportOffsetTop", "getVisualViewportOffset", "stickyBottomOffset", "topOffset", "MenuBarMenuButtonView", "ListItemButtonView", "locale", "__publicField", "bind", "value", "arrowView", "IconView", "dropdown_arrow_default", "MenuBarMenuPanelView", "View", "evt", "direction", "MenuBarMenuView", "_a", "KeystrokeHandler", "FocusTracker", "MenuBarMenuBehaviors", "data", "cancel", "name", "isEnabled", "isOpen", "optimalPanelPosition", "southEast", "southWest", "northEast", "northWest", "westSouth", "eastSouth", "westNorth", "eastNorth", "MenuBarMenuViewPanelPositioningFunctions", "getOptimalPosition", "MenuBarMenuListView", "ListView", "hasAnyToggleableItem", "item", "listButtonView", "pickListButtonMenuViewIfPresent", "ListItemView", "child", "isNestedMenuLikeView", "ButtonView", "MenuBarMenuListItemFileDialogButtonView", "FileDialogListItemButtonView", "EVENT_NAME_DELEGATES", "MenuBarView", "t", "config", "componentFactory", "extraItems", "topLevelCategoryMenuViews", "processMenuBarConfig", "menuDefinition", "MenuBarBehaviors", "topLevelCategoryMenuView", "menuView", "parentMenuView", "listView", "items", "menuGroupDefinition", "itemDefinition", "menuItemView", "MenuBarMenuListItemView", "isObject", "componentView", "ListSeparatorView", "componentName", "MenuBarMenuListItemButtonView", "logWarning", "menuBarItemsList", "nonSeparatorItems", "closeTimeout", "FileReaderBase", "ObservableMixin", "FileReader", "__publicField", "reader", "evt", "file", "resolve", "reject", "result", "FileLoaderBase", "FileRepository", "Plugin", "Collection", "PendingActions", "uploaded", "total", "fileOrPromise", "logWarning", "loader", "FileLoader", "aggregatedUploaded", "aggregatedTotal", "fileOrPromiseOrLoader", "value", "key", "pendingActions", "t", "getMessage", "filePromise", "uploadAdapterCreator", "uid", "CKEditorError", "data", "err", "status", "wrapper", "supportedOptions", "isSupported", "option", "isDefault", "alignment", "locale", "normalizeAlignmentOptions", "configuredOptions", "normalizedOptions", "result", "isNameValid", "logWarning", "classNameCount", "CKEditorError", "index", "allOptions", "succeedingOptions", "item", "ALIGNMENT", "AlignmentCommand", "Command", "firstBlock", "first", "options", "editor", "model", "doc", "value", "writer", "blocks", "block", "currentAlignment", "removeAlignmentFromSelection", "setAlignmentOnSelection", "AlignmentEditing", "Plugin", "schema", "optionsToConvert", "shouldUseClasses", "getBlockAlignmentAttributeProperty", "buildClassDefinition", "buildDowncastInlineDefinition", "upcastInlineDefinitions", "buildUpcastInlineDefinitions", "definition", "upcastCompatibilityDefinitions", "buildUpcastCompatibilityDefinitions", "blockAlignment", "defaultDirection", "view", "name", "definitions", "iconsMap", "align_left_default", "align_right_default", "align_center_default", "align_justify_default", "AlignmentUI", "buttonAttrs", "command", "buttonView", "ButtonView", "dropdownView", "createDropdown", "tooltipPosition", "t", "addToolbarToDropdown", "defaultIcon", "menuView", "MenuBarMenuView", "listView", "MenuBarMenuListView", "listItemView", "MenuBarMenuListItemView", "MenuBarMenuListItemButtonView", "Alignment", "TypingChangeBuffer", "model", "limit", "__publicField", "evt", "batch", "changeCount", "ignoreLock", "InsertTextCommand", "Command", "editor", "undoStepSize", "options", "doc", "text", "textInsertions", "selection", "resultRange", "writer", "selectionAttributes", "TYPING_INPUT_TYPES", "TYPING_INPUT_TYPES_ANDROID", "InsertTextObserver", "Observer", "view", "FocusObserver", "typingInputTypes", "env", "viewDocument", "data", "targetRanges", "inputType", "domEvent", "isComposing", "eventInfo", "EventInfo", "ViewDocumentDomEventData", "Input", "Plugin", "mapper", "modelSelection", "TypingQueue", "insertTextCommand", "viewSelection", "range", "modelRanges", "viewRange", "modelRange", "tryFixingRange", "insertText", "selectedText", "rangeText", "node", "commandData", "deleteSelectionContent", "mutations", "viewElement", "findMappedViewAncestor", "modelElement", "element", "debounce", "commandLiveData", "ModelLiveRange", "ranges", "liveRange", "detachLiveRange", "reason", "buffer", "result", "viewNode", "DeleteCommand", "direction", "sequence", "doNotResetEntireContent", "count", "limitElement", "limitElementFirstChild", "paragraph", "position", "DELETE_CHARACTER", "DELETE_WORD", "DELETE_CODE_POINT", "DELETE_SELECTION", "DELETE_BACKWARD", "DELETE_FORWARD", "DELETE_EVENT_TYPES", "DeleteObserver", "document", "deleteEventSpec", "deleteData", "shouldUseTargetRanges", "BubblingEventInfo", "enableChromeWorkaround", "observer", "pressedKeyCode", "beforeInputReceived", "keyCode", "shouldFireDeleteEvent", "isDeleteKeyCode", "targetRange", "getDeleteDirection", "keyCodes", "walker", "nextPosition", "item", "offset", "isInsideSurrogatePair", "isInsideCombinedSymbol", "isInsideEmojiSequence", "Delete", "modelDocument", "deleteForwardCommand", "selectionToRemove", "unit", "commandName", "ancestorLimit", "limitStartPosition", "Typing", "getLastTextLine", "start", "TextWatcherBase", "ObservableMixin", "TextWatcher", "testCallback", "directChange", "suffix", "rangeBeforeSelection", "testResult", "eventData", "TwoStepCaretMovement", "locale", "arrowRightPressed", "arrowLeftPressed", "contentDirection", "isMovementHandled", "isBetweenDifferentAttributes", "attribute", "attributes", "hasAnyAttribute", "preventCaretMovement", "clearSelectionAttributes", "setSelectionAttributesFromTheNodeBefore", "isStepAfterAnyAttributeBoundary", "MouseObserver", "TouchObserver", "touched", "clicked", "isBackspace", "shouldPreserveAttributes", "observedAttribute", "nodeBefore", "isInlineObject", "key", "value", "isStrict", "nodeAfter", "attrBefore", "attrAfter", "TRANSFORMATIONS", "buildQuotesRegExp", "TRANSFORMATION_GROUPS", "DEFAULT_TRANSFORMATIONS", "TextTransformation", "anchor", "isInCodeBlock", "isInInlineCode", "deletePlugin", "normalizedTransformations", "normalizeTransformations", "normalizedTransformation", "watcher", "from", "to", "matches", "replaces", "matchedRange", "changeIndex", "i", "match", "replaceWith", "replacePosition", "replaceRange", "getTextAttributesAfterPosition", "normalizeFrom", "escapeRegExp", "normalizeTo", "quoteCharacter", "config", "extra", "remove", "isNotRemoved", "transformation", "expandGroupsAndRemoveDuplicates", "definitions", "definedTransformations", "transformationOrGroup", "findAttributeRange", "attributeName", "findAttributeRangeBound", "lookBack", "lastNode", "inlineHighlight", "tagName", "className", "highlightedElements", "changed", "dispatcher", "removeHighlight", "AttributeCommand", "Command", "editor", "attributeKey", "__publicField", "model", "doc", "options", "selection", "value", "writer", "ranges", "range", "itemOrRange", "ModelDocumentSelection", "schema", "item", "BOLD", "BoldEditing", "Plugin", "t", "viewElement", "fontWeight", "getButtonCreator", "commandName", "plugin", "icon", "label", "keystroke", "ButtonClass", "command", "view", "MenuBarMenuListItemButtonView", "BoldUI", "createButton", "bold_default", "ButtonView", "Bold", "ITALIC", "ItalicEditing", "Plugin", "editor", "t", "AttributeCommand", "ItalicUI", "createButton", "getButtonCreator", "italic_default", "ButtonView", "MenuBarMenuListItemButtonView", "Italic", "STRIKETHROUGH", "StrikethroughEditing", "StrikethroughUI", "strikethrough_default", "Strikethrough", "UNDERLINE", "UnderlineEditing", "Plugin", "editor", "t", "AttributeCommand", "UnderlineUI", "createButton", "getButtonCreator", "underline_default", "ButtonView", "MenuBarMenuListItemButtonView", "Underline", "getCopyOnEnterAttributes", "schema", "allAttributes", "attribute", "EnterCommand", "Command", "writer", "model", "selection", "isSelectionEmpty", "range", "startElement", "endElement", "attributesToCopy", "splitBlock", "leaveUnmerged", "isContainedWithinOneElement", "splitPos", "ENTER_EVENT_TYPES", "EnterObserver", "Observer", "view", "doc", "shiftPressed", "evt", "data", "inputType", "env", "domEvent", "enterEventSpec", "event", "BubblingEventInfo", "ViewDocumentDomEventData", "Enter", "Plugin", "editor", "viewDocument", "t", "ShiftEnterCommand", "softBreakAction", "isEnabled", "anchorPos", "isInsideLimitElement", "insertBreak", "position", "selectionAttributes", "attributes", "breakLineElement", "element", "ShiftEnter", "conversion", "modelElement", "removeStaleSoftBreakAttributes", "parentsToCheck", "change", "wasChanged", "parent", "child", "nextSibling", "attributesToRemove", "key", "value", "hasSameAttribute", "node", "WidgetHighlightStackBase", "EmitterMixin", "WidgetHighlightStack", "__publicField", "descriptor", "writer", "stack", "oldTop", "newTop", "compareDescriptors", "id", "index", "item", "i", "shouldABeBeforeB", "a", "b", "classesToString", "classes", "WIDGET_CLASS_NAME", "WIDGET_SELECTED_CLASS_NAME", "isWidget", "node", "toWidget", "element", "options", "CKEditorError", "getFillerOffset", "setLabel", "addSelectionHandle", "setHighlightHandling", "addHighlight", "toArray", "key", "removeHighlight", "add", "remove", "evt", "data", "addHighlightCallback", "removeHighlightCallback", "labelOrCreator", "getLabel", "prev", "current", "toWidgetEditable", "editable", "property", "isReadonly", "is", "findOptimalInsertionRange", "selection", "model", "selectedElement", "typeAroundFakeCaretPosition", "getTypeAroundFakeCaretPosition", "getFillerOffset", "addSelectionHandle", "widgetElement", "writer", "selectionHandle", "domDocument", "domElement", "icon", "IconView", "drag_handle_default", "calculateResizeHostAncestorWidth", "domResizeHost", "getElementComputedWidth", "element", "width", "paddingLeft", "paddingRight", "domResizeHostParent", "parentWidth", "ancestorLevelLimit", "currentLevel", "checkedElement", "calculateResizeHostPercentageWidth", "resizeHostRect", "Rect", "TYPE_AROUND_SELECTION_ATTRIBUTE", "isTypeAroundWidget", "viewElement", "modelElement", "schema", "isWidget", "getClosestTypeAroundDomButton", "getTypeAroundButtonPosition", "getClosestWidgetViewElement", "domConverter", "widgetDomElement", "getTypeAroundFakeCaretPosition", "selection", "getCopyOnEnterTextAttributesBeforeWidgets", "sibling", "selectionAttributes", "extractStoredSelectionAttributes", "getCopyOnEnterAttributes", "lastChild", "iterator", "attributeKey", "attributeValue", "ModelDocumentSelection", "POSSIBLE_INSERTION_POSITIONS", "RETURN_ARROW_ICON_ELEMENT", "return_arrow_default", "PLUGIN_DISABLED_EDITING_ROOT_CLASS", "WidgetTypeAround", "Plugin", "__publicField", "Enter", "Delete", "editor", "editingView", "evt", "data", "isEnabled", "root", "widgetModelElement", "position", "model", "attributesToCopy", "emitter", "event", "callback", "options", "args", "modelSelection", "typeAroundFakeCaretPosition", "selectedModelElement", "t", "buttonTitles", "conversionApi", "injectUIIntoWidget", "domEventData", "selectedViewElement", "positionToWidgetCssClass", "name", "isFocused", "keyCode", "isForward", "isForwardArrowKeyCode", "shouldStopAndPreventDefault", "widgetPlugin", "modelElementNextToSelection", "viewElementNextToSelection", "mapper", "selectedModelNode", "selectedViewNode", "button", "buttonPosition", "widgetViewElement", "wasHandled", "viewDocument", "env", "direction", "selectedModelWidget", "isFakeCaretBefore", "isDeleteForward", "range", "probe", "deepestEmptyRangeAncestor", "getDeepestEmptyElementAncestor", "documentSelection", "content", "selectable", "selectedElement", "result", "viewWriter", "typeAroundWrapper", "wrapperDomElement", "injectButtons", "injectFakeCaret", "buttonTemplate", "Template", "caretTemplate", "deepestEmptyAncestor", "ancestor", "verticalWidgetNavigationHandler", "editing", "arrowUpPressed", "keyCodes", "arrowDownPressed", "expandSelection", "findTextRangeFromSelection", "isSingleLineRange", "newPosition", "newSelection", "startPosition", "endPosition", "getNearestNonInlineLimit", "lastRangePosition", "getNearestTextPosition", "firstRangePosition", "walkerValueType", "previousPosition", "item", "type", "nextPosition", "modelRange", "viewRange", "domRange", "rects", "boundaryVerticalPosition", "rect", "Widget", "view", "getLabel", "viewSelection", "lastMarked", "value", "node", "isChild", "WIDGET_SELECTED_CLASS_NAME", "MouseObserver", "PointerObserver", "eventInfo", "editableOrWidgetElement", "findClosestEditableOrWidgetAncestor", "clickTargetFromPoint", "getElementFromMouseEvent", "findTextBlockAncestor", "nextTextBlock", "findNextTextBlock", "start", "end", "getLocalizedArrowKeyCodeDirection", "isVerticalNavigation", "hasObjectAtEdge", "newRange", "originalSelection", "getModelSelectionAdjusted", "lastSelectedNode", "nodeBeforeProbe", "nodeAfterProbe", "lastProbeNode", "objectElement", "previousNode", "nodeToRemove", "forward", "widget", "selectionRange", "editableElement", "editablePath", "compareArrays", "modelPosition", "positionParent", "firstPosition", "lastPosition", "firstSelectedNode", "currentElement", "getRangeFromMouseEvent", "viewPosition", "viewNode", "parent", "treeWalker", "ModelTreeWalker", "WidgetToolbarRepository", "ContextualBalloon", "balloonToolbar", "isWidgetSelected", "toolbarConfig", "toolbarId", "ariaLabel", "items", "getRelatedElement", "balloonClassName", "positions", "logWarning", "toolbarView", "ToolbarView", "CKEditorError", "toolbarDefinition", "relatedElement", "maxRelatedElementDepth", "deepestRelatedElement", "deepestToolbarDefinition", "definition", "relatedElementDepth", "repositionContextualBalloon", "getBalloonPositionData", "toolbar", "balloon", "defaultPositions", "BalloonPanelView", "WidgetResizeStateBase", "ObservableMixin", "WidgetResizeState", "domResizeHandle", "domHandleHost", "clientRect", "getHandlePosition", "getAbsoluteBoundaryPoint", "getOppositePosition", "widthStyle", "newSize", "resizerPosition", "elementRect", "positionParts", "ret", "getResizerHandleClass", "domHandle", "parts", "replacements", "SizeView", "View", "bind", "visible", "resizeState", "height", "widthPercents", "WidgetResizerBase", "WidgetResizer", "isSelected", "that", "viewResizerWrapper", "unit", "newWidth", "domHandleHostRect", "handleHostWidth", "handleHostHeight", "domResizeHostRect", "newValue", "handleHostRect", "domWrapper", "existsInDom", "widgetWrapper", "handleHost", "resizerWrapper", "currentDimensions", "newDimensions", "state", "currentCoordinates", "extractCoordinates", "isCentered", "enlargement", "currentPosition", "getResizerClass", "WidgetResize", "globalVar", "DomEmitterMixin", "throttle", "resizer", "plugins", "widgetToolbarRepository", "resizeHandle", "plainTextToHtml", "text", "ClipboardObserver", "DomEventObserver", "view", "__publicField", "viewDocument", "handleInput", "type", "evt", "data", "targetRanges", "dataTransfer", "eventInfo", "EventInfo", "content", "domEvent", "nativeDataTransfer", "cacheFiles", "evtData", "ViewDataTransfer", "domRange", "getRangeFromMouseEvent", "normalizeClipboardData", "fullMatch", "spaces", "smallPaddingElements", "listElements", "viewToPlainText", "converter", "viewItem", "prev", "child", "newLinePadding", "tempElement", "domElementToPlainText", "element", "previous", "ClipboardMarkersUtils", "Plugin", "markerName", "config", "action", "selection", "getCopiedFragment", "writer", "oldSelection", "sourceSelectionInsertedMarkers", "fragment", "fakeMarkersRangesInsideRange", "elements", "range", "markers", "getPastedDocumentElement", "pasteMarkers", "sourceFragmentFakeMarkers", "transformedElement", "removedFakeMarkers", "copyableMarker", "executor", "before", "allowedActions", "markerNamePrefix", "copyableMarkers", "selectionRanges", "markersInRanges", "selectionRange", "isSelectionMarkerCopyable", "marker", "copyPartiallySelected", "markerRange", "model", "copyMarkerConfig", "isInGraveyard", "mappedMarkers", "sortedMarkers", "start", "end", "posA", "posB", "position", "fakeMarker", "rootElement", "fakeMarkersRanges", "acc", "prevFakeMarker", "skipAssign", "mapValues", "ModelRange", "foundFakeMarkers", "item", "prependFakeMarkers", "appendFakeMarkers", "otherFakeMarker", "name", "parts", "newId", "uid", "ClipboardPipeline", "method", "clipboardMarkersUtils", "documentFragment", "editor", "sourceEditorId", "modelFragment", "modelDocument", "onCopyCut", "toPx", "toUnit", "LineView", "View", "bind", "value", "left", "top", "width", "DragDropTarget", "delay", "throttle", "targetRange", "DomEmitterMixin", "resizeObserver", "targetViewElement", "targetViewRanges", "clientX", "clientY", "blockMode", "draggedRange", "findDropTargetRange", "domDocument", "domElement", "editing", "nodeBefore", "nodeAfter", "nodeParent", "viewElementBefore", "domElementBefore", "viewElementAfter", "domElementAfter", "viewElementParent", "domElementParent", "domScrollableRect", "scrollX", "scrollY", "globalVar", "rectBefore", "Rect", "rectAfter", "rectParent", "above", "below", "parentStyle", "right", "leftClamped", "rightClamped", "viewElement", "rootName", "domScrollable", "findScrollableElement", "ResizeObserver", "mapper", "modelElement", "getClosestMappedModelElement", "targetViewPosition", "targetModelPosition", "findDropTargetRangeForElement", "childNodes", "node", "shouldIgnoreElement", "startIndex", "endIndex", "middleIndex", "findElementSide", "domConverter", "rect", "targetModelElement", "viewPosition", "domNode", "overflow", "DragDropBlockToolbar", "isReadOnly", "env", "isEnabled", "blocks", "target", "DragDrop", "Widget", "PointerObserver", "dragDropTarget", "canEditAtDraggedRange", "draggedSelection", "domTarget", "getFinalDropEffect", "clipboardPipeline", "ranges", "viewRange", "isMove", "isSuccess", "draggableElement", "findDraggableWidget", "selectedElement", "isWidget", "moved", "selectionParent", "draggableWidget", "ModelLiveRange", "blockRange", "getRangeIncludingFullySelectedParents", "touchesBlockEdges", "editable", "domEditable", "computedStyle", "createElement", "preview", "domRect", "domEditablePaddingLeft", "domEditablePaddingRight", "editableWidth", "offsetLeft", "ancestor", "firstElement", "lastElement", "parent", "startPosition", "endPosition", "parentRange", "touchesStart", "touchesEnd", "PastePlainText", "isUnformattedInlineContent", "textAttributes", "key", "attribute", "Clipboard", "t", "UndoRedoBaseCommand", "Command", "editor", "__publicField", "evt", "data", "options", "batch", "docSelection", "selection", "ranges", "isBackward", "operations", "model", "document", "selectionRanges", "transformedRangeGroups", "range", "allRanges", "rangeGroup", "transformed", "isRangeContainedByAnyOtherRange", "normalizeRanges", "writer", "batchToUndo", "undoingBatch", "operationsToUndo", "operation", "operationToUndo", "nextBaseVersion", "historyOperations", "reversedOperations", "transformOperationSets", "affectedSelectable", "NoOperation", "a", "b", "i", "joinedRange", "otherRange", "UndoCommand", "batchIndex", "item", "RedoCommand", "redoingBatch", "UndoEditing", "Plugin", "t", "args", "isRedoBatch", "isUndoBatch", "undoneBatch", "UndoUI", "locale", "localizedUndoIcon", "undo_default", "redo_default", "localizedRedoIcon", "name", "label", "keystroke", "Icon", "buttonView", "ButtonView", "MenuBarMenuListItemButtonView", "ButtonClass", "command", "view", "Undo", "createInlineImageViewElement", "writer", "createBlockImageViewElement", "getViewImageType", "element", "imageUtils", "isImageTypePlaceable", "schema", "position", "imageType", "isParagraphable", "determineImageTypeForInsertionAtSelection", "selection", "firstBlock", "first", "getSizeValueIfInPx", "size", "widthAndHeightStylesAreBothSet", "viewElement", "widthStyle", "heightStyle", "IMAGE_WIDGETS_CLASSES_MATCH_REGEXP", "ImageUtils", "Plugin", "__publicField", "DomEmitterMixin", "modelElement", "attributes", "selectable", "options", "editor", "model", "determinedImageType", "determineImageTypeForInsertion", "attributeName", "writer", "setImageSizes", "imageElement", "src", "img", "globalVar", "selectionPosition", "parent", "selectedElement", "imageView", "isImageAllowedInParent", "isNotInsideImage", "label", "toWidget", "altText", "isWidget", "figureView", "editingView", "item", "isBlockImageAllowedAtInsertion", "ancestor", "getInsertImageParent", "findOptimalInsertionRange", "insertionParent", "configImageInsertType", "IMAGE_URL_REGEXP", "ImageTextAlternativeCommand", "Command", "element", "options", "editor", "imageUtils", "model", "imageElement", "writer", "ImageTextAlternativeEditing", "Plugin", "ImageUtils", "TextAlternativeFormView", "View", "locale", "__publicField", "FocusTracker", "KeystrokeHandler", "FormRowView", "ViewCollection", "data", "cancel", "FocusCycler", "submitHandler", "v", "t", "backButton", "ButtonView", "previous_arrow_default", "saveButton", "header", "FormHeaderView", "labeledInput", "LabeledFieldView", "createLabeledInputText", "repositionContextualBalloon", "balloon", "position", "getBalloonPositionData", "editingView", "defaultPositions", "BalloonPanelView", "ImageTextAlternativeUI", "ContextualBalloon", "command", "view", "text_alternative_default", "value", "viewDocument", "CssTransitionDisablerMixin", "clickOutsideHandler", "focusEditable", "ImageTextAlternative", "upcastImageFigure", "converter", "evt", "conversionApi", "viewImage", "isImageTypePlaceable", "conversionResult", "modelImage", "first", "dispatcher", "upcastImg", "matchImageType", "imageType", "getViewImageType", "attributes", "consumables", "modelElement", "downcastSrcsetAttribute", "imageUtils", "imageType", "converter", "evt", "data", "conversionApi", "writer", "element", "img", "dispatcher", "downcastImageAttribute", "imageUtils", "imageType", "attributeKey", "converter", "evt", "data", "conversionApi", "viewWriter", "element", "img", "dispatcher", "ImageLoadObserver", "Observer", "domRoot", "event", "domEvent", "domElement", "InsertImageCommand", "Command", "editor", "configImageInsertType", "logWarning", "options", "sourceDefinitions", "toArray", "selection", "selectionAttributes", "sourceDefinition", "index", "selectedElement", "position", "ReplaceImageSourceCommand", "image", "writer", "ImageEditing", "Plugin", "ImageUtils", "conversion", "insertImageCommand", "replaceImageSourceCommand", "ImageSizeAttributes", "schema", "viewElementName", "viewElement", "widthAndHeightStylesAreBothSet", "getSizeValueIfInPx", "attachDowncastConverter", "width", "height", "modelAttributeName", "viewAttributeName", "setRatioForInlineImage", "isEditingDowncast", "hasSizes", "isResized", "ImageTypeCommand", "modelElementName", "__publicField", "model", "isImageTypePlaceable", "oldElement", "attributes", "setImageSizes", "markers", "marker", "newElement", "newElementRange", "markerRange", "range", "ImagePlaceholder", "editing", "editingView", "imgViewElement", "modelElement", "ImageBlockEditing", "ClipboardPipeline", "t", "createBlockImageViewElement", "downcastSrcsetAttribute", "upcastImg", "upcastImageFigure", "clipboardPipeline", "docFragmentChildren", "modelRange", "selectionPosition", "determineImageTypeForInsertionAtSelection", "ViewUpcastWriter", "blockViewImages", "inlineViewImage", "item", "ImageInsertFormView", "View", "locale", "integrations", "FocusTracker", "KeystrokeHandler", "ViewCollection", "FocusCycler", "view", "CollapsibleView", "submitHandler", "stopPropagation", "ImageInsertUI", "componentCreator", "menuBarComponentCreator", "name", "observable", "buttonViewCreator", "formViewCreator", "menuBarButtonViewCreator", "requiresForm", "override", "dropdownButton", "firstIntegration", "actionButton", "SplitButtonView", "isImageSelected", "dropdownView", "createDropdown", "observables", "isEnabled", "integrationViews", "imageInsertFormView", "resultView", "MenuBarMenuView", "listView", "MenuBarMenuListView", "image_default", "integrationView", "listItemView", "MenuBarMenuListItemView", "items", "result", "ImageBlock", "Widget", "ImageTextAlternative", "ImageInlineEditing", "createInlineImageViewElement", "inlineViewImages", "blockViewImage", "attribute", "ImageInline", "Image", "ImageCaptionUtils", "imageModelElement", "node", "captionElement", "ToggleImageCaptionCommand", "imageCaptionUtils", "ancestorCaptionElement", "focusCaptionOnShow", "imageCaptionEditing", "selectedImage", "savedCaption", "newCaptionElement", "ImageCaptionEditing", "figcaptionElement", "enableViewPlaceholder", "imageAlt", "label", "toWidgetEditable", "imageTypeInlineCommand", "imageTypeBlockCommand", "handleImageTypeChange", "oldCaptionElement", "savedOldElementCaption", "jsonObject", "ModelElement", "caption", "changes", "change", "ImageCaptionUI", "command", "ButtonView", "caption_default", "value", "modelCaptionElement", "ImageCaption", "createImageTypeRegExp", "types", "regExpSafeNames", "type", "fetchLocalImage", "resolve", "reject", "imageSrc", "resource", "blob", "mimeType", "getImageMimeType", "filename", "err", "convertLocalImageOnCanvas", "isLocalImage", "src", "getBlobFromCanvas", "globalVar", "canvas", "ImageUploadUI", "isOnly", "ButtonClass", "imageTypes", "imageTypesRegExp", "image_upload_default", "files", "imagesToUpload", "file", "imageInsertUI", "uploadImageCommand", "button", "FileDialogButtonView", "isAccessAllowed", "MenuBarMenuListItemFileDialogButtonView", "ImageUploadProgress", "modelImage", "uploadId", "fileRepository", "FileRepository", "status", "placeholder", "viewFigure", "_startAppearEffect", "_showPlaceholder", "loader", "_hidePlaceholder", "_showProgressBar", "_displayLocalImage", "_showCompleteIcon", "_hideProgressBar", "_stopAppearEffect", "viewImg", "_getUIElement", "_createPlaceholder", "_removeUIElement", "progressBar", "_createProgressBar", "completeIcon", "imageFigure", "uniqueProperty", "child", "UploadImageCommand", "ImageUploadEditing", "Notification", "doc", "isHtmlInDataTransfer", "images", "viewRange", "notification", "fetchableImages", "fetchableImage", "insertedImagesIds", "entry", "isInsertedInGraveyard", "imageElement", "getImagesFromChangeItem", "uploadStatus", "urls", "imageUploadElements", "elements", "promise", "env", "domFigure", "originalDisplay", "clean", "error", "maxWidth", "srcsetAttribute", "key", "plugins", "dataTransfer", "ImageUpload", "ResizeImageCommand", "Command", "editor", "element", "options", "model", "imageUtils", "imageElement", "writer", "ImageResizeEditing", "Plugin", "ImageUtils", "resizeImageCommand", "schema", "imageType", "dispatcher", "evt", "data", "conversionApi", "viewWriter", "viewImg", "modelAttributeValue", "target", "viewElement", "widthAndHeightStylesAreBothSet", "RESIZE_ICONS", "object_size_small_default", "object_size_medium_default", "object_size_large_default", "object_size_custom_default", "object_size_full_default", "ImageResizeButtons", "__publicField", "command", "option", "name", "value", "icon", "locale", "button", "ButtonView", "labelText", "CKEditorError", "isCustomImageResizeOption", "customResizeUI", "optionValueWithUnit", "getIsOnButtonCallback", "t", "originalSizeOption", "componentCreator", "dropdownView", "createDropdown", "DropdownButtonView", "dropdownButton", "accessibleLabel", "commandValue", "addListToDropdown", "forTooltip", "itemDefinitions", "Collection", "optionsWithSerializedValues", "definition", "UIModel", "allDropdownValues", "getIsOnCustomButtonCallback", "isEnabled", "objectCommandValue", "dropdownValue", "RESIZABLE_IMAGES_CSS_SELECTOR", "RESIZED_IMAGE_CLASS", "ImageResizeHandles", "WidgetResize", "editingView", "ImageLoadObserver", "domEvent", "domConverter", "imageView", "widgetView", "resizer", "mapper", "imageModel", "domWidgetElement", "newValue", "getSelectedImageEditorNodes", "editing", "imageModelElement", "imageViewElement", "getSelectedImageWidthInUnits", "targetUnit", "imageNodes", "parsedResizedWidth", "tryParseDimensionWithUnit", "imageParentWidthPx", "calculateResizeHostAncestorWidth", "imageHolderDimension", "Rect", "tryCastDimensionsToUnit", "ImageCustomResizeFormView", "View", "unit", "validators", "FocusTracker", "KeystrokeHandler", "FormRowView", "ViewCollection", "cancel", "FocusCycler", "submitHandler", "v", "backButton", "previous_arrow_default", "saveButton", "header", "FormHeaderView", "labeledInput", "LabeledFieldView", "createLabeledInputNumber", "validator", "errorText", "rawSize", "parsed", "parsedSize", "getSelectedImagePossibleResizeRange", "minimumImageWidth", "ImageCustomResizeUI", "ContextualBalloon", "CssTransitionDisablerMixin", "getFormValidators", "clickOutsideHandler", "getBalloonPositionData", "currentParsedWidth", "initialInputValue", "possibleRange", "focusEditable", "form", "ImageResize", "ImageStyleCommand", "styles", "style", "modelElementName", "styleName", "typeCommandName", "typeCommand", "requestedStyle", "setImageSizes", "DEFAULT_OPTIONS", "object_inline_default", "object_inline_left_default", "object_left_default", "object_center_default", "object_inline_right_default", "object_right_default", "DEFAULT_ICONS", "object_full_width_default", "DEFAULT_DROPDOWN_DEFINITIONS", "getStyleDefinitionByName", "normalizeStyles", "config", "arrangement", "normalizeDefinition", "isValidOption", "getDefaultStylesConfiguration", "isBlockPluginLoaded", "isInlinePluginLoaded", "getDefaultDropdownDefinitions", "pluginCollection", "extendStyle", "modelElements", "warnInvalidStyle", "supportedElements", "elementName", "logWarning", "source", "extendedStyle", "prop", "info", "utils", "modelToViewStyleAttribute", "newStyle", "oldStyle", "viewToModelStyleAttribute", "nonDefaultStyles", "modelImageElement", "first", "normalizeFloatToDefinitionStyle", "modelElement", "floatStyleName", "builtinDefinition", "isEqual", "ImageStyleEditing", "modelToViewConverter", "viewToModelConverter", "getBlockAlignmentAttributeProperty", "document", "stylesMap", "changed", "change", "imageStyle", "imageStyleDefinition", "pickFirstSupported", "names", "found", "align", "resolved", "ImageStyleUI", "plugins", "toolbarConfig", "definedStyles", "translateStyles", "styleConfig", "definedDropdowns", "isObject", "dropdownConfig", "factory", "defaultButton", "defaultItem", "items", "title", "buttonViews", "itemName", "getUIComponentName", "buttonName", "SplitButtonView", "splitButtonView", "splitButtonViewArrow", "addToolbarToDropdown", "getDropdownButtonTitle", "areOn", "index", "identity", "isOn", "areEnabled", "buttonConfig", "view", "reactiveSources", "imageTypeBlock", "imageTypeInline", "titles", "dropdownTitle", "buttonTitle", "ImageStyle", "ImageToolbar", "WidgetToolbarRepository", "widgetToolbarRepository", "normalizeDeclarativeConfig", "selection", "item", "AutomaticLinkDecorators", "__publicField", "checker", "item", "dispatcher", "elementCreator", "viewWriter", "viewElement", "key", "createConverter", "isApplyingConverter", "evt", "data", "conversionApi", "decorator", "priorities", "writer", "mapper", "viewFigure", "linkInImage", "child", "attributes", "toMap", "val", "ATTRIBUTE_WHITESPACES", "SAFE_URL_TEMPLATE", "EMAIL_REG_EXP", "PROTOCOL_REG_EXP", "DEFAULT_LINK_PROTOCOLS", "LINK_KEYSTROKE", "isLinkElement", "node", "createLinkElement", "href", "linkElement", "ensureSafeUrl", "url", "allowedProtocols", "urlString", "protocolsList", "isSafeUrl", "customRegexp", "getLocalizedDecorators", "decorators", "localizedDecoratorsLabels", "normalizeDecorators", "retArray", "value", "upperFirst", "isLinkableElement", "element", "schema", "isEmail", "addLinkProtocolIfApplicable", "link", "defaultProtocol", "protocol", "isProtocolNeeded", "linkHasProtocol", "openLink", "extractTextFromLinkRange", "range", "text", "areDecoratorsConflicting", "a", "b", "isMergeableAttribute", "resolveConflictingDecorators", "decoratorStates", "allDecorators", "resolved", "name", "isNewlyAddedDecorator", "conflicts", "getConflictingManualDecorators", "conflict", "decoratorId", "manualDecorators", "otherDecorator", "LinkCommand", "Command", "Collection", "manualDecorator", "model", "selection", "selectedElement", "first", "manualDecoratorIds", "displayedText", "resolvedDecoratorsIds", "truthyManualDecorators", "falsyManualDecorators", "updateLinkAttributes", "itemOrRange", "updateLinkTextIfNeeded", "linkHref", "linkText", "newText", "fragment", "fragRange", "changes", "findChanges", "insertsLength", "offset", "actual", "expected", "updatedOffset", "subRange", "getLinkPartTextNode", "formattingAttributes", "newTextNode", "collapseSelectionAtLinkEnd", "linkRange", "plugins", "position", "findAttributeRange", "newLinkRange", "selectionRanges", "ranges", "allowedRanges", "rangesToUpdate", "stickyPseudoRanges", "ModelLivePosition", "pseudoRange", "start", "end", "decoratorName", "allowedRange", "oldText", "diff", "counter", "result", "actualSlice", "expectedSlice", "action", "UnlinkCommand", "editor", "linkCommand", "rangesToUnlink", "LinkManualDecoratorBase", "ObservableMixin", "LinkManualDecorator", "id", "label", "classes", "styles", "defaultValue", "HIGHLIGHT_CLASS", "DECORATOR_AUTOMATIC", "DECORATOR_MANUAL", "EXTERNAL_LINKS_REGEXP", "LinkEditing", "Plugin", "TwoStepCaretMovement", "Input", "ClipboardPipeline", "linkDecorators", "inlineHighlight", "linkOpener", "automaticDecoratorDefinitions", "command", "automaticDecorators", "automaticDecorator", "modelItem", "manualDecoratorDefinitions", "decoratorDefinition", "viewDocument", "handleLinkOpening", "opener", "env", "clickedElement", "keyCodes", "attributeKeys", "removeLinkAttributesFromSelection", "getLinkAttributesAllowedOnText", "newLink", "hasChanged", "elementsToCheck", "manualDecoratorAttributeKeys", "change", "appliedDecorators", "i", "appliedDecorator", "linkAttributes", "attribute", "LinkPreviewButtonView", "ButtonView", "locale", "bind", "cancel", "LinkFormView", "View", "validators", "FocusTracker", "KeystrokeHandler", "ViewCollection", "FocusCycler", "submitHandler", "v", "validator", "errorText", "t", "backButton", "previous_arrow_default", "saveButton", "button", "settings_default", "header", "FormHeaderView", "providersListView", "ListView", "def", "listItemView", "ListItemView", "labeledInput", "LabeledFieldView", "createLabeledInputText", "FormRowView", "LinkProviderItemsView", "propName", "hasItems", "listView", "view", "LinkPropertiesView", "LinkButtonView", "arrowView", "IconView", "next_arrow_default", "VISUAL_SELECTION_MARKER_NAME", "LinkUI", "ContextualBalloon", "ClickObserver", "markerElement", "provider", "insertIndex", "existing", "toolbarView", "ToolbarView", "toolbarItems", "formView", "CssTransitionDisablerMixin", "getFormValidators", "parsedUrl", "icon", "buttonView", "emptyListPlaceholder", "SwitchButtonView", "decoratorValue", "commandValue", "newValue", "accumulator", "previousDecoratorStates", "resolvedStates", "match", "MenuBarMenuListItemButtonView", "setHref", "selectedLinksProviderLink", "tooltip", "navigate", "unlinkCommand", "unlink_default", "pencil_default", "isEnabled", "linkProvider", "linksButton", "ButtonClass", "link_default", "keyEvtData", "clickOutsideHandler", "updateFocus", "forceVisible", "prevSelectedLink", "prevSelectionParent", "getSelectionParent", "update", "selectedLink", "selectionParent", "markerViewElements", "markerViewElementsArray", "newRange", "targetLink", "isWidget", "findLinkElementAncestor", "startLink", "endLink", "editing", "viewLinkRange", "startPosition", "ancestor", "allowCreatingEmptyLinks", "form", "MIN_LINK_LENGTH_WITH_SPACE_AT_END", "URL_REG_EXP", "URL_GROUP_IN_MATCH", "AutoLink", "Delete", "selectedRange", "selStart", "selEnd", "updatedSelection", "clipboardPipeline", "matches", "watcher", "TextWatcher", "mappedText", "isSingleSpaceAtTheEnd", "getUrlAtTextEnd", "batch", "removedTrailingCharacters", "linkEnd", "linkStart", "enterCommand", "rangeToCheck", "shiftEnterCommand", "getLastTextLine", "fullUrl", "isLinkAllowedOnRange", "linkIsAlreadySet", "deletePlugin", "Link", "getNormalizedAndLocalizedLanguageDefinitions", "editor", "t", "languageDefs", "def", "getPropertyAssociation", "key", "value", "association", "newKey", "getLeadingWhiteSpaces", "textNode", "rawSnippetTextToViewDocumentFragment", "writer", "text", "fragment", "textLines", "items", "nodes", "line", "lineIndex", "getIndentOutdentPositions", "model", "selection", "positions", "walker", "item", "node", "parent", "startOffset", "position", "pos", "isModelSelectionInCodeBlock", "firstBlock", "first", "canBeCodeBlock", "schema", "element", "getCodeBlockAriaAnnouncement", "direction", "languagesToLabels", "codeBlockLanguage", "language", "getTextNodeAtLineStart", "nodeAtStart", "CodeBlockCommand", "Command", "__publicField", "options", "firstLanguageInConfig", "blocks", "getLanguage", "allowedBlocks", "block", "child", "currentBlock", "i", "nextBlock", "codeBlocks", "range", "elementAfter", "lastLanguage", "defaultLanguage", "IndentCodeBlockCommand", "indentSequenceTextElement", "OutdentCodeBlockCommand", "getLastOutdentableSequenceRange", "sequence", "nodeAtPosition", "leadingWhiteSpaces", "lastIndexOfSequence", "modelToViewCodeBlockInsertion", "useLabels", "languagesToClasses", "evt", "data", "conversionApi", "mapper", "consumable", "targetViewPosition", "preAttributes", "codeAttributes", "code", "pre", "modelToDataViewSoftBreakInsertion", "dataViewToModelCodeBlockInsertion", "editingView", "classesToLanguages", "defaultLanguageName", "viewCodeElement", "viewPreElement", "codeBlock", "viewChildClasses", "className", "dataViewToModelTextNewlinesInsertion", "lastLine", "softBreak", "dataViewToModelOrphanNodeConsumer", "preElement", "preChildren", "childCodeElement", "DEFAULT_ELEMENT", "CodeBlockEditing", "Plugin", "ShiftEnter", "view", "normalizedLanguagesDefs", "commandName", "context", "attributeName", "insertionRange", "ViewUpcastWriter", "ClipboardPipeline", "contentRange", "anchor", "docFragment", "newDocumentFragment", "commands", "indent", "outdent", "leaveBlockStartOnEnter", "leaveBlockEndOnEnter", "breakLineOnEnter", "ui", "lastFocusedCodeBlock", "focusParent", "modelDoc", "lastSelectionPosition", "isSoftEnter", "nodeAfter", "isSoftBreakNode", "newBlock", "nodeBefore", "emptyLineRangeToRemoveOnEnter", "isEmptyishTextNode", "CodeBlockUI", "componentFactory", "normalizedLanguageDefs", "itemDefinitions", "command", "locale", "dropdownView", "createDropdown", "SplitButtonView", "splitButtonView", "accessibleLabel", "code_block_default", "addListToDropdown", "menuView", "MenuBarMenuView", "listView", "MenuBarMenuListView", "definition", "listItemView", "MenuBarMenuListItemView", "buttonView", "MenuBarMenuListItemButtonView", "Collection", "languageDef", "UIModel", "CodeBlock", "ClassicEditorUI", "EditorUI", "editor", "view", "__publicField", "normalizeToolbarConfig", "ElementReplacer", "replacementElement", "editingView", "editable", "editingRoot", "rootAcceptsBlocks", "editableElement", "visualTop", "sourceElement", "placeholderText", "placeholder", "enableViewPlaceholder", "stickyPanel", "contextualBalloon", "evt", "position", "stickyPanelHeight", "Rect", "target", "limiter", "viewportOffsetConfig", "newTopViewportOffset", "updateBalloonPosition", "data", "originalArgs", "scrollViewportOnPanelGettingSticky", "dialogPlugin", "dialogView", "stickyPanelContentRect", "DialogView", "ClassicEditorUIView", "BoxedEditorUIView", "locale", "options", "StickyPanelView", "ToolbarView", "MenuBarView", "InlineEditableUIView", "ClassicEditorBase", "ElementApiMixin", "Editor", "ClassicEditor", "sourceElementOrDataOrConfig", "config", "sourceElementOrData", "editorConfig", "normalizeSingleRootEditorConstructorParams", "normalizeRootsConfig", "isElement", "CKEditorError", "registerAndInitializeRootConfigAttributes", "shouldToolbarGroupWhenFull", "menuBarConfig", "attachToForm", "verifyRootElements", "value", "_isElement", "BRACKET_PAIRS", "MentionCommand", "Command", "editor", "model", "doc", "options", "selection", "mentionData", "mentionID", "range", "mentionText", "mention", "_addMentionAttributes", "CKEditorError", "writer", "currentAttributes", "toMap", "attributesWithMention", "insertionRange", "nodeBefore", "nodeAfter", "isFollowedByWhiteSpace", "isInsertedInBrackets", "precedingCharacter", "isPrecededByOpeningBracket", "isFollowedByBracketClosure", "MentionEditing", "Plugin", "context", "viewElement", "_toMentionAttribute", "createViewMentionElement", "preventPartialMentionDowncast", "removePartialMentionPostFixer", "extendAttributeOnMentionPostFixer", "selectionMentionAttributePostFixer", "baseMentionData", "data", "uid", "viewElementOrMention", "dataMention", "textNode", "dataUid", "dispatcher", "evt", "conversionApi", "start", "focus", "shouldNotTypeWithMentionAt", "position", "isAtStart", "schema", "changes", "wasChanged", "change", "nodeAfterInsertedTextNode", "checkAndFix", "insertedNode", "item", "nodeAfterInserted", "node", "isBrokenMentionNode", "MentionsView", "ListView", "locale", "__publicField", "index", "indexToGet", "Rect", "MentionDomWrapperView", "View", "domElement", "name", "isOn", "MentionListItemView", "ListItemView", "child", "VERTICAL_SPACING", "defaultHandledKeyCodes", "keyCodes", "defaultCommitKeyCodes", "MentionUI", "Collection", "debounce", "ContextualBalloon", "commitKeys", "handledKeyCodes", "isHandledKey", "clickOutsideHandler", "feeds", "mentionDescription", "feed", "marker", "dropdownLimit", "isValidMentionMarker", "definition", "createFeedCallback", "keyCode", "mentionsView", "markerDropdownLimit", "listItemView", "view", "mentionMarker", "end", "itemRenderer", "feedText", "feedCallback", "feedResponse", "response", "error", "logWarning", "feedsWithPattern", "createRegExp", "watcher", "TextWatcher", "createTestCallback", "markerDefinition", "getLastValidMarkerInText", "markerPosition", "isPositionInExistingMention", "isMarkerInExistingMention", "requestFeedText", "matchedTextLength", "markerRange", "checkIfStillInCompletionMode", "mentionCommand", "feedItem", "markerMarker", "label", "renderer", "renderResult", "buttonView", "ButtonView", "preferredPosition", "editing", "domConverter", "mapper", "uiLanguageDirection", "modelRange", "viewRange", "editableElement", "getBalloonPanelPositions", "positions", "targetRect", "balloonRect", "viewportRect", "fitLeftInViewport", "left", "text", "lastValidMarker", "currentMarkerLastIndex", "minimumCharacters", "numberOfCharacters", "openAfterCharacters", "env", "mentionCharacters", "pattern", "splitStringFrom", "textToTest", "regExp", "feedItems", "hasMention", "Mention", "SelectAllCommand", "Command", "editor", "model", "selection", "scopeElement", "isSelectAllScope", "writer", "schema", "element", "SELECT_ALL_KEYSTROKE", "parseKeystroke", "SelectAllEditing", "Plugin", "t", "viewDocument", "eventInfo", "domEventData", "getCode", "SelectAllUI", "buttonView", "ButtonView", "MenuBarMenuListItemButtonView", "ButtonClass", "locale", "command", "view", "select_all_default", "SelectAll", "Essentials", "Plugin", "AccessibilityHelp", "Clipboard", "Enter", "SelectAll", "ShiftEnter", "Typing", "Undo", "FontCommand", "Command", "editor", "attributeKey", "__publicField", "model", "doc", "options", "selection", "value", "batch", "updateAttribute", "writer", "ranges", "range", "itemOrRange", "ModelDocumentSelection", "FONT_SIZE", "FONT_FAMILY", "FONT_COLOR", "FONT_BACKGROUND_COLOR", "buildDefinition", "modelAttributeKey", "definition", "option", "renderUpcastAttribute", "styleAttr", "viewElement", "normalizeColorCode", "renderDowncastElement", "modelAttributeValue", "addColorSelectorToDropdown", "dropdownView", "colors", "columns", "removeButtonLabel", "colorPickerLabel", "documentColorsLabel", "documentColorsCount", "colorPickerViewConfig", "locale", "colorSelectorView", "ColorSelectorView", "FontFamilyCommand", "normalizeOptions", "configuredOptions", "getOptionDefinition", "normalizeFontFamilies", "fontDefinition", "name", "generateFontPreset", "fontNames", "firstFontName", "cssFontNames", "normalizeFontNameForCSS", "fontName", "FontFamilyEditing", "Plugin", "item", "attributeValue", "FontFamilyUI", "t", "command", "accessibleLabel", "listOptions", "_prepareListOptions", "createDropdown", "addListToDropdown", "font_family_default", "evt", "menuView", "MenuBarMenuView", "listView", "MenuBarMenuListView", "listItemView", "MenuBarMenuListItemView", "buttonView", "MenuBarMenuListItemButtonView", "itemDefinitions", "Collection", "def", "UIModel", "FontFamily", "FontSizeCommand", "namedPresets", "isFullItemDefinition", "attachPriority", "preset", "findPreset", "isNumericalDefinition", "generatePixelPreset", "numberValue", "CKEditorError", "styleFontSize", "FontSizeEditing", "supportAllValues", "presets", "isLengthStyleValue", "isPercentageStyleValue", "isRelative", "size", "maxSize", "FontSizeUI", "font_size_default", "localizedTitles", "title", "FontSize", "FontColorCommand", "FontColorEditing", "FontColorUIBase", "commandName", "componentName", "icon", "dropdownLabel", "componentConfig", "colorsConfig", "normalizeColorOptions", "localizedColors", "getLocalizedColorOptions", "hasColorPicker", "dropdownContentRendered", "data", "isVisible", "focusChildOnDropdownOpen", "contentRendered", "FontColorUI", "font_color_default", "FontColor", "FontBackgroundColorCommand", "FontBackgroundColorEditing", "addBackgroundStylesRules", "FontBackgroundColorUI", "font_background_default", "FontBackgroundColor", "Font", "ParagraphCommand", "Command", "editor", "model", "document", "block", "first", "checkCanBecomeParagraph", "options", "selection", "writer", "blocks", "schema", "InsertParagraphCommand", "attributes", "position", "paragraph", "allowedParent", "positionParent", "isTextAllowed", "Paragraph", "_a", "Plugin", "viewElement", "__publicField", "HeadingCommand", "Command", "editor", "modelElements", "__publicField", "block", "first", "heading", "checkCanBecomeHeading", "options", "model", "document", "modelElement", "writer", "blocks", "schema", "defaultModelElement", "HeadingEditing", "Plugin", "Paragraph", "option", "enterCommand", "evt", "data", "positionParent", "priorities", "getLocalizedOptions", "t", "localizedTitles", "title", "HeadingUI", "defaultTitle", "accessibleLabel", "locale", "titles", "itemDefinitions", "Collection", "headingCommand", "paragraphCommand", "commands", "def", "UIModel", "value", "dropdownView", "createDropdown", "addListToDropdown", "areEnabled", "isEnabled", "paragraph", "whichModel", "commandName", "commandValue", "menuView", "MenuBarMenuView", "listView", "MenuBarMenuListView", "listItemView", "MenuBarMenuListItemView", "buttonView", "MenuBarMenuListItemButtonView", "Heading", "ListWalker", "startElement", "options", "__publicField", "toArray", "iterator", "first", "nestedItems", "node", "SiblingListBlocksIterator", "indent", "attr", "direction", "isListItemBlock", "nodeIndent", "previousNodeInList", "previousNodeIndent", "value", "ListBlocksIterable", "listHead", "ListItemUid", "uid", "getAllListItemBlocks", "listItem", "getListItemBlocks", "isForward", "items", "getNestedListBlocks", "getListItems", "backwardBlocks", "forwardBlocks", "isFirstBlockOfListItem", "listBlock", "isLastBlockOfListItem", "expandListBlocksToCompleteItems", "blocks", "higherIndent", "allBlocks", "block", "itemBlock", "sortBlocks", "expandListBlocksToCompleteList", "splitListItemBefore", "writer", "id", "mergeListItemBefore", "parentBlock", "attributes", "key", "indentBlocks", "expand", "indentBy", "attributeNames", "blockIndent", "removeListAttributes", "outdentBlocksWithMerge", "visited", "referenceIndent", "parentBlocks", "mergedBlocks", "mergeListItemIfNotLast", "mergedBlock", "attributeKey", "isSingleListItem", "firstItemId", "item", "outdentFollowingItems", "lastBlock", "changedBlocks", "currentIndent", "newIndent", "a", "b", "getSelectedBlockObject", "model", "selectedElement", "canBecomeSimpleListItem", "schema", "isNumberedListType", "listType", "isFirstListItemInList", "itemIndent", "itemListType", "itemListItemId", "previous", "sawHigherIndent", "previousIndent", "ListIndentCommand", "Command", "editor", "indentDirection", "getSelectedListBlocks", "previousItemBlock", "firstBlock", "siblingItem", "selection", "firstNonListBlockIndex", "ListCommand", "type", "document", "selectedBlockObject", "turnOff", "itemBlocks", "ListMergeCommand", "shouldMergeOnBlocksContentLevel", "firstElement", "lastElement", "firstIndent", "lastIndent", "lastElementId", "nestedLastElementBlocks", "sel", "lastElementAfterDelete", "nextSibling", "positionParent", "siblingNode", "lastPosition", "firstPosition", "isFirstBlock", "ListSplitCommand", "ListItemBoldIntegration", "Plugin", "ListEditing", "ListFormatting", "listEditing", "viewElement", "env", "context", "ListItemItalicIntegration", "ListItemFontSizeIntegration", "normalizedFontSizeOptions", "normalizeOptions$1", "fontSizeOption", "option", "fontSizeOptions", "ListItemFontColorIntegration", "ListItemFontFamilyIntegration", "changes", "modifiedListItems", "returnValue", "entry", "range", "formats", "getListItemConsistentFormat", "formatAttributeName", "formatValue", "listItemFormatAttributeName", "setFormattingToListItem", "removeFormattingFromListItem", "formatAttribute", "listItemFormatAttribute", "attributeKeys", "getSingleListItemConsistentFormat", "isNumberedOrBulletedList", "attributesToCheck", "valuesMap", "walker", "attributeValue", "listItemBlocks", "wasChanged", "ListUtils", "isListView", "isListItemView", "getIndent", "parent", "previousSibling", "createListElement", "getViewElementIdForListType", "getViewElementNameForListType", "createListItemElement", "findAndAddListHeadToMap", "position", "itemToListHead", "previousNode", "fixListIndents", "listNodes", "maxIndent", "prevIndent", "fixBy", "applied", "fixListItemIds", "seenIds", "listItemId", "listItemSkipLevelConsumer", "evt", "data", "conversionApi", "viewItem", "isSkipLevelWrapper", "modelRange", "modelCursor", "hasNestedList", "child", "listItemUpcastConverter", "listIndent", "firstItemListType", "reconvertItemsOnDataChange", "editing", "itemsToRefresh", "changedItems", "doesItemBlockRequiresRefresh", "collectListItemsToRefresh", "stack", "getListModelAttributes", "fillStackForIntermediates", "doesItemWrappingRequiresRefresh", "i", "siblingAtIndent", "findSiblingListItemAt", "ancestorAtLowerIndent", "k", "referenceItem", "isItemBlockInsideStructureSlot", "useBogus", "shouldUseBogusParagraph", "element", "isListItemElement", "isListElement", "eventName", "listItemDowncastConverter", "strategies", "dataPipeline", "enableSkipLevelLists", "consumer", "createAttributesConsumer", "mapper", "consumable", "findMappedViewElement", "removeCustomMarkerElements", "unwrapListItemBlock", "wrapListItemBlock", "insertCustomMarkerElements", "listItemDowncastRemoveConverter", "elementName", "viewStart", "modelEnd", "viewEnd", "bogusParagraphCreator", "modelElement", "viewWalker", "createModelToViewPositionMapper", "view", "strategy", "viewRange", "positionAfterLastMarker", "previousPosition", "viewWriter", "markersToRemove", "collectMarkersToRemove", "marker", "markerElement", "wrapper", "attributeElement", "parentElement", "listItemIndent", "currentListItem", "isIntermediate", "listItemViewElement", "listViewElement", "nextListItem", "targetIndent", "nonConsumingAttributes", "events", "attributeName", "event", "LIST_BASE_ATTRIBUTES", "Enter", "Delete", "ClipboardPipeline", "multiBlock", "CKEditorError", "attribute", "commands", "outdent", "mergeBackwardCommand", "mergeForwardCommand", "previousBlock", "hasNoMergeTarget", "enterCommand", "doc", "isLastBlock", "splitCommand", "commandName", "dispatcher", "sibling", "modelToViewPositionMapper", "modelAttributes", "modelChangePostFixer", "clipboardPipeline", "createModelIndentPasteFixer", "allContentChildren", "lastItem", "allChildren", "t", "innerItem", "content", "selectable", "refItem", "refType", "refIndent", "firstElementIndent", "indentDiff", "isListItem", "createUIComponents", "label", "icon", "buttonView", "_createButton", "ButtonView", "MenuBarMenuListItemButtonView", "ButtonClass", "command", "ListUI", "numbered_list_default", "bulleted_list_default", "List", "LIST_STYLE_TO_LIST_TYPE", "LIST_STYLE_TO_TYPE_ATTRIBUTE", "TYPE_ATTRIBUTE_TO_LIST_STYLE", "LIST_STYLE_TYPES", "listStyle", "typeAttribute", "listType", "IndentEditing", "Plugin", "editor", "MultiCommand", "IndentUI", "locale", "t", "localizedIndentIcon", "indent_default", "outdent_default", "localizedOutdentIcon", "commandName", "label", "icon", "buttonView", "ButtonView", "MenuBarMenuListItemButtonView", "ButtonClass", "command", "view", "Indent", "IndentBlockCommand", "Command", "indentBehavior", "__publicField", "model", "block", "first", "blocksToChange", "writer", "currentIndent", "nextIndent", "selection", "element", "IndentUsingOffset", "config", "indentAttributeValue", "currentOffset", "isSameUnit", "offsetToSet", "IndentUsingClasses", "currentIndex", "nextIndex", "nextIndexClamped", "IndentBlockListCommand", "listItem", "options", "listUtils", "listItems", "blocks", "isListItemBlock", "expandedListItems", "item", "position", "parent", "schema", "IndentBlockListItemCommand", "blocksInSelection", "ResetIndentUsingOffset", "ResetIndentUsingClasses", "IndentBlockListIntegration", "addMarginStylesRules", "evt", "listNodes", "node", "previousNodeInList", "ensureIndentValuesConsistency", "data", "context", "clearBlockIndentAttributesOnListIndentChange", "_evt", "changedBlocks", "indentListCommand", "outdentListCommand", "indentCommand", "outdentCommand", "attributeName", "scope", "conversion", "marginProperty", "listEditing", "dispatcher", "listBlockIndentUpcastConverter", "consumable", "value", "classes", "cls", "getValue", "consume", "conversionApi", "applied", "indentLevel", "prevNodeIndentListValue", "DEFAULT_ELEMENTS", "IndentBlock", "configuration", "option", "elementName", "viewElement", "modelAttributeValue", "definition", "className", "modelToViewUrlAttributeConverter", "registry", "options", "converter", "evt", "data", "conversionApi", "url", "viewWriter", "figure", "mediaContentElement", "child", "mediaViewElement", "dispatcher", "toMediaWidget", "viewElement", "writer", "label", "toWidget", "createMediaFigureElement", "writer", "registry", "url", "options", "getSelectedMediaModelWidget", "selection", "selectedElement", "insertMedia", "model", "selectable", "findOptimalPosition", "mediaElement", "MediaEmbedCommand", "Command", "selectedMedia", "isMediaSelected", "isAllowedInParent", "parent", "findOptimalInsertionRange", "element", "mediaPlaceholderIconViewBox", "MediaRegistry", "locale", "config", "__publicField", "providers", "extraProviders", "removedProviders", "providerDefinitions", "provider", "name", "logWarning", "Media", "definition", "previewRenderer", "pattern", "toArray", "subPattern", "match", "rawUrl", "attributes", "viewElement", "mediaHtml", "domElement", "domConverter", "icon", "IconView", "t", "media_placeholder_default", "Template", "MediaEmbedEditing", "Plugin", "editor", "id", "isTrack", "time", "schema", "conversion", "renderMediaPreview", "elementName", "modelElement", "modelToViewUrlAttributeConverter", "figure", "toMediaWidget", "viewMedia", "dispatcher", "converter", "evt", "data", "conversionApi", "modelRange", "modelCursor", "first", "URL_REGEXP", "AutoMediaEmbed", "Clipboard", "Delete", "Undo", "modelDocument", "clipboardPipeline", "firstRange", "leftLivePosition", "ModelLivePosition", "rightLivePosition", "globalVar", "leftPosition", "rightPosition", "mediaRegistry", "urlRange", "ModelLiveRange", "walker", "node", "insertionPosition", "MediaFormView", "View", "validators", "FocusTracker", "KeystrokeHandler", "submitHandler", "validator", "errorText", "labeledInput", "LabeledFieldView", "createLabeledInputText", "inputField", "MediaEmbedUI", "Dialog", "button", "ButtonView", "MenuBarMenuListItemButtonView", "ButtonClass", "buttonView", "command", "dialogPlugin", "media_default", "dialog", "CssTransitionDisablerMixin", "getFormValidators", "form", "MediaEmbed", "Widget", "transformBookmarks", "documentFragment", "writer", "elementsToChange", "value", "element", "index", "children", "isHiddenBookmarkAnchor", "name", "convertCssLengthToPx", "numericValue", "toPx", "toPx", "value", "transformListItemLikeElementsIntoLists", "documentFragment", "stylesString", "hasMultiLevelListPlugin", "enableSkipLevelLists", "writer", "ViewUpcastWriter", "itemLikeElements", "findAllItemLikeElements", "encounteredLists", "stack", "topLevelListInfo", "createTopLevelListInfo", "itemLikeElement", "isListContinuation", "applyIndentationToTopLevelList", "originalListId", "indent", "listStyle", "detectListStyle", "intermediateList", "intermediateListItem", "parent", "index", "parentListItems", "listElement", "createNewEmptyList", "existingList", "listParent", "insertIndex", "applyListStyleToElement", "listItem", "applyListItemMarginLeftAndUpdateTopLevelInfo", "removeBulletElement", "stackItem", "listItems", "listItemBlockMarginLeft", "currentListBlockIndent", "ancestorIndex", "ancestorListItems", "ancestorMargin", "adjustedListItemIndent", "listItemBlockMarginLeftPx", "topLevelListItem", "unwrapParagraphInListItem", "element", "firstChild", "range", "foundMargins", "item", "marginLeft", "getMarginLeftNormalized", "className", "itemData", "getListItemData", "currentItem", "previousSibling", "isStrayInlineMarker", "isList", "node", "listLikeItem", "listStyleRegexp", "listStyleTypeRegex", "listStartIndexRegex", "legalStyleListRegex", "multiLevelNumberFormatTypeRegex", "legalStyleListMatch", "multiLevelNumberFormatMatch", "islegalStyleList", "listStyleMatch", "listStyleType", "type", "startIndex", "listStyleTypeMatch", "bulletedStyle", "findBulletedListStyle", "listStartIndexMatch", "mapListStyleDefinition", "listMarkerElement", "findListMarkerNode", "listMarker", "childNode", "textNodeOrElement", "list", "idMatch", "orderMatch", "indentMatch", "bulletMatcher", "Matcher", "convertCssLengthToPx", "replaceImagesSourceWithBase64", "rtfData", "upcastWriter", "shapesIds", "findAllShapesIds", "removeAllImgElementsRepresentingShapes", "insertMissingImgs", "removeAllShapeElements", "images", "findAllImageElementsWithLocalSource", "replaceImagesFileSourceWithInlineRepresentation", "extractImageDataFromRtf", "_convertHexToBase64", "hexString", "char", "shapeElementsMatcher", "el", "prevSiblingName", "exceptionIds", "isElementAShape", "hasElementGfxdataAttribute", "isPreviousSiblingAShapeType", "isElementIdInExceptionsArray", "imageElementsMatcher", "imgs", "shapes", "shape", "img", "shapeIds", "id", "containsMatchingImg", "attrs", "findSrc", "nodes", "child", "currentImageIndex", "regexPictureHeader", "regexPicture", "result", "image", "imageType", "imageElements", "imagesHexSources", "i", "imageIndex", "rtfHexSource", "newSrc", "removeMSAttributes", "elementsToUnwrap", "styleName", "itemParent", "childIndex", "transformTables", "hasTablePropertiesPlugin", "directParent", "grandParent", "divParent", "sides", "side", "props", "prop", "removeInvalidTableWidth", "replaceMSFootnotes", "msFootnotesRefs", "msFootnotesDefs", "msFootnotesDefinitionsList", "msFootnoteDef", "msFootnoteDefId", "msFootnoteRefId", "footnotesList", "createFootnotesListContainerElement", "footnoteId", "msFootnoteRef", "createFootnoteRefViewElement", "defElements", "createFootnoteDefViewElement", "removeMSReferences", "clonedChild", "elementsToRemove", "textNodesToTrim", "nextSibling", "textNode", "trimmedData", "newTextNode", "divider", "sup", "link", "backLink", "content", "msWordMatch1", "msWordMatch2", "msExcelMatch", "PasteFromOfficeMSWordNormalizer", "document", "__publicField", "htmlString", "data", "transformBookmarks", "removeBoldWrapper", "transformBlockBrsToParagraphs", "viewDocument", "ViewDocument", "domConverter", "ViewDomConverter", "blockElements", "inlineObjectElements", "elementsToReplace", "findSibling", "nextSiblingIsBlock", "isBlockViewElement", "viewElement", "direction", "position", "replaceTabsWithinPreWithSpaces", "tabWidth", "textNodesToReplace", "hasPreWrapParent", "replaceTabsInTextNode", "replacedData", "googleDocsMatch", "GoogleDocsNormalizer", "removeXmlns", "removeGoogleSheetsTag", "removeStyleBlock", "googleSheetsMatch", "GoogleSheetsNormalizer", "normalizeSpacing", "normalizeSafariSpaceSpans", "normalizeSpacerunSpans", "htmlDocument", "htmlElement", "innerTextLength", "fullMatch", "spaces", "parsePasteOfficeHtml", "stylesProcessor", "domParser", "normalizedHtml", "cleanContentAfterBody", "removeInBodyStyleBlocks", "bodyString", "bodyView", "documentToView", "stylesObject", "extractStyles", "fragment", "style", "styles", "styleTags", "bodyCloseTag", "htmlCloseTag", "bodyCloseIndex", "htmlCloseIndex", "PasteFromOffice", "Plugin", "ClipboardPipeline", "editor", "clipboardPipeline", "evt", "normalizer", "parsedData", "priorities", "normalizers", "priority", "insertToPriorityArray", "REMOVE_FORMAT", "RemoveFormatUI", "Plugin", "editor", "view", "ButtonView", "MenuBarMenuListItemButtonView", "ButtonClass", "locale", "command", "t", "remove_format_default", "RemoveFormatCommand", "Command", "__publicField", "model", "first", "writer", "item", "attributeName", "itemRange", "isFormatting", "removeFormatting", "customHandled", "nonSelectionAttributeName", "toNonSelectionAttribute", "selection", "schema", "itemHasRemovableFormatting", "curRange", "block", "attributeProperties", "RemoveFormatEditing", "RemoveFormat", "ALIGN_VALUES_REG_EXP", "FLOAT_VALUES_REG_EXP", "upcastStyleToAttribute", "conversion", "options", "modelAttribute", "styleName", "attributeName", "attributeType", "viewElement", "defaultValue", "shouldUpcast", "reduceBoxSides", "conversionApi", "data", "localDefaultValue", "getDefaultValueAdjusted", "normalized", "value", "reduceBoxSidesValue", "parsedValue", "upcastBorderStyles", "editor", "viewElementName", "modelAttributes", "defaultBorder", "dispatcher", "evt", "modelRange", "viewItem", "stylesToConsume", "viewTable", "hasTableBorderAttribute", "matcherPattern", "modelElement", "first", "tableModelElement", "localDefaultBorder", "normalizedBorder", "borderValue", "borderPx", "reducedBorder", "downcastAttributeToStyle", "modelAttributeValue", "downcastTableAttribute", "item", "attributeNewValue", "mapper", "writer", "table", "child", "layoutTableDefault", "tableElement", "style", "sides", "side", "topSideStyle", "upcastTableCellPaddingAttribute", "defaultPadding", "cellpaddingValue", "cellpaddingPx", "tableCellPaddings", "normalizedPaddings", "DEFAULT_TABLE_ALIGNMENT_OPTIONS", "upcastTableAlignmentConfig", "align", "float", "styles", "downcastTableAlignmentConfig", "TableWalker", "__publicField", "row", "outValue", "spanData", "cell", "colspan", "rowspan", "anchorRow", "anchorColumn", "TableSlot", "rowIsMarkedAsSkipped", "rowIsBeforeStartRow", "columnIsBeforeStartColumn", "columnIsAfterEndColumn", "rowMap", "rowToUpdate", "columnToUpdate", "column", "firstRowLength", "i", "rowIndex", "cols", "tableWalker", "isTableHeaderCellType", "cellType", "updateNumericAttribute", "key", "createEmptyTableCell", "insertPosition", "attributes", "tableCell", "isHeadingColumnCell", "tableUtils", "headingColumns", "enableProperty", "schema", "getSelectionAffectedTable", "selection", "selectedElement", "groupCellsByTable", "tableCells", "tableMap", "isEntireCellsLineHeader", "isTableCellTypeEnabled", "getEmptyTableCellBlocks", "block", "cropTableToDimensions", "sourceTable", "cropDimensions", "startRow", "startColumn", "endRow", "endColumn", "croppedTable", "sourceTableType", "cropHeight", "sourceRow", "sourceColumn", "isAnchor", "cellAnchorRow", "cellAnchorColumn", "rowInCroppedTable", "tableCellCopy", "trimTableCellIfNeeded", "addHeadingsToCroppedTable", "addFootersToCroppedTable", "getVerticallyOverlappingCells", "overlapRow", "cells", "slotInfo", "cellHeight", "cellEndRow", "splitHorizontally", "splitRow", "tableRow", "newRowspan", "newCellAttributes", "newCellRowSpan", "newCell", "columnIndex", "tableSlot", "getHorizontallyOverlappingCells", "overlapColumn", "cellsToSplit", "cellWidth", "cellEndColumn", "splitVertically", "splitColumn", "newColspan", "newCellColSpan", "cellRow", "cellColumn", "limitRow", "limitColumn", "trimmedSpan", "headingRows", "headingRowsInCrop", "headingColumnsInCrop", "maxRows", "count", "footerRows", "footerIndex", "footerRowsInCrop", "removeEmptyColumns", "width", "columnsMap", "emptyColumns", "result", "cellsCount", "emptyColumn", "removeEmptyRows", "emptyRows", "tableRowCount", "emptyRow", "removeEmptyRowsColumns", "adjustLastRowIndex", "dimensions", "lastRowMap", "rowspanAdjustment", "adjustLastColumnIndex", "lastColumnMap", "colspanAdjustment", "getViewTableFromWrapper", "wrapperView", "wrapperChild", "upcastTableFigure", "conversionResult", "modelTable", "upcastTable", "rows", "scanTable", "skipEmptyTableRow", "ensureParagraphInTableCell", "elementName", "modelCursor", "childNodes", "node", "paragraph", "shouldAccumulateHeadingRows", "headRows", "bodyRows", "footRows", "firstTheadElement", "firstTfoot", "tableChildren", "childIndex", "tableChild", "trs", "el", "maxPrevColumns", "arePrecedingChildrenFooters", "tr", "trColumns", "isFirstTfoot", "e", "bodyMatrix", "generateCellMatrix", "rowSlots", "index", "prevRowspans", "maxColumns", "slots", "curSlots", "children", "curRowspans", "rowSpan", "entry", "getChangedResizedTables", "model", "affectedTables", "change", "referencePosition", "tableNode", "node", "getColumnGroupElement", "getColumnMinWidthAsPercentage", "modelTable", "editor", "getTableWidthInPixels", "referenceElement", "getChildrenViewElement", "getElementWidthInPixels", "elementName", "domElement", "styles", "globalVar", "getContainerContentWidth", "width", "getEditableContentWidth", "rootName", "domRoot", "getColumnEdgesIndexes", "cell", "tableUtils", "cellColumnIndex", "toPrecision", "value", "multiplier", "clamp", "number", "min", "max", "createFilledArray", "length", "sumArray", "array", "result", "item", "normalizeColumnWidths", "columnWidths", "hasPixels", "hasPercentages", "normalizedWidths", "calculateMissingColumnWidths", "totalWidth", "columnWidth", "columnIndex", "numberOfUninitializedColumns", "totalWidthOfInitializedColumns", "widthForUninitializedColumn", "getDomCellOuterWidth", "domCell", "updateColumnElements", "columns", "tableColumnGroup", "writer", "i", "column", "element", "children", "getTableColumnElements", "columnGroupElement", "getTableColumnsWidths", "isTableWidthInPixels", "table", "tableWidth", "isColumnWidthsInPixels", "translateColSpanAttribute", "acc", "colSpan", "removeCellWidthsFromTable", "row", "TableUtils", "Plugin", "tableCell", "tableRow", "rowIndex", "tableWalker", "TableWalker", "options", "createEmptyRows", "insertAt", "rowsToInsert", "isCopyStructure", "copyStructureFrom", "cellTypeEnabled", "isTableCellTypeEnabled", "scopedHeaders", "rows", "CKEditorError", "headingRows", "footerRows", "rowOffset", "updateTableCellType", "tableIterator", "rowColSpansMap", "cellHeight", "cellWidth", "lastCellRow", "isOverlappingInsertedRow", "isReferenceRow", "cellIndex", "colspan", "insertPosition", "insertedCell", "createEmptyTableCell", "columnsToInsert", "headingColumns", "tableColumns", "insertedCells", "createCells", "columnOffset", "tableSlot", "cellAnchorColumn", "cellAnchorRow", "rowsToRemove", "rowCount", "first", "last", "indexesObject", "cellsToMove", "cellsToTrim", "getCellsToMoveAndTrimOnRemoveRow", "moveCellsToRow", "rowspan", "updateNumericAttribute", "updateHeadingRows", "updateFooterRows", "removeEmptyColumns", "removeEmptyRows", "totalRows", "isEntireCellsLineHeader", "columnsToRemove", "adjustHeadingColumns", "removedColumnIndex", "adjacentColumn", "removedColumnWidthAttribute", "removedColumnWidth", "adjacentColumnWidth", "unit", "totalColumns", "numberOfCells", "newCellsSpan", "updatedSpan", "breakSpanEvenly", "newCellsAttributes", "cellsToInsert", "tableMap", "splitCellColumn", "cellsToUpdate", "isOnSameColumn", "spansOverColumn", "splitCellRow", "cellColumn", "distanceFromLastCellSpan", "isAfterSplitCell", "rowCountBefore", "rowspanToSet", "child", "selection", "cells", "range", "truncatedFooterRows", "newHeadingRows", "updateCellType", "resetFormerHeadingCells", "autoExpand", "oldHeadingRows", "truncatedHeadingRows", "newFooterRows", "cellRow", "oldHeadingColumns", "truncatedHeadingColumns", "cellWithSelection", "selectedCells", "tableCells", "indexes", "entry", "selectedTableCells", "areaOfSelectedCells", "getBiggestRectangleArea", "ranges", "compareRangeOrder", "allIndexesSorted", "indexA", "indexB", "rowIndexes", "columnIndexes", "headingSectionSize", "footerStartIndex", "tableCellToInsert", "attributes", "insertedRows", "createdCells", "currentPosition", "span", "removedColumnIndexes", "headingsRemoved", "newRows", "footerIndex", "lastRowOfCell", "rowSpanToSet", "rowspanAdjustment", "targetRowIndex", "tableRowMap", "previousCell", "isAnchor", "cellToMove", "targetPosition", "rangeA", "rangeB", "posA", "posB", "rowsIndexes", "lastRow", "firstRow", "lastColumn", "firstColumn", "headerCellType", "getSingleValue", "objectOrString", "isObject", "top", "right", "bottom", "left", "addDefaultUnitToNumericValue", "defaultUnit", "numericValue", "getNormalizedDefaultProperties", "config", "normalizedConfig", "getNormalizedDefaultTableProperties", "getNormalizedDefaultCellProperties", "downcastTable", "tableElement", "figureElement", "positionOffset", "filter", "toTableWidget", "downcastRow", "downcastCell", "tableCellType", "createCellElement", "isTableHeaderCellType", "name", "toWidgetEditable", "convertParagraphInTableCell", "modelElement", "isSingleParagraphWithoutAttributes", "viewElement", "hasAnyAttribute", "toWidget", "attributeKey", "convertPlainTable", "conversionApi", "hasPlainTableOutput", "isClipboardPipeline", "stripFigureTagWithLayoutTable", "shouldStripFigureTagWithLayoutTable", "downcastPlainTable", "convertPlainTableCaption", "headRowsSlot", "bodyRowsSlot", "footerRowsSlot", "childrenSlot", "theadElement", "tbodyElement", "tfootElement", "tableContentElements", "tableAttributes", "defaultTableProperties", "tableAlignment", "localDefaultValue", "tableAlignmentValue", "downcastTableAlignmentConfig", "downcastTableBorderAndBackgroundAttributes", "styleName", "modelAttribute", "dispatcher", "evt", "data", "attributeNewValue", "mapper", "hasTableLayout", "stripFigureFromContentTable", "tableType", "InsertTableCommand", "Command", "schema", "isAllowedInParent", "areTableFootersEnabled", "defaultRows", "defaultColumns", "defaultFooterRows", "selectionAttributesToCopy", "getCopyOnEnterAttributes", "cellBlock", "getEmptyTableCellBlocks", "key", "ModelDocumentSelection", "positionParent", "validParent", "InsertRowCommand", "__publicField", "isAnyCellSelected", "insertAbove", "affectedTableCells", "InsertColumnCommand", "insertBefore", "SplitCellCommand", "isHorizontal", "MergeCellCommand", "cellToMerge", "doc", "direction", "isMergeNext", "cellToExpand", "cellToRemove", "removedTableCellRow", "mergeTableCells$1", "spanAttribute", "cellSpan", "cellToMergeSpan", "removeEmptyRowsColumns", "getHorizontalCell", "getVerticalCell", "horizontalCell", "hasHeadingColumns", "cellOnLeft", "cellOnRight", "leftCellColumn", "rightCellColumn", "leftCellSpan", "isCellOnLeftInHeadingColumn", "isHeadingColumnCell", "isCellOnRightInHeadingColumn", "isMergeUpWithBodyCell", "isMergeUpWithHeadCell", "isMergeDownWithBodyCell", "isMergeDownWithFootCell", "currentCellRowSpan", "rowOfCellToMerge", "mergeColumn", "cellToMergeData", "mergeTableCells", "isEmpty", "firstTableChild", "RemoveRowCommand", "firstCell", "lastRowIndex", "selectedRowIndexes", "areAllRowsSelected", "referenceCells", "removedRowIndexes", "columnIndexToFocus", "cellToFocus", "getCellToFocus", "removedRowIndex", "columnToFocus", "tableRowCount", "RemoveColumnCommand", "tableColumnCount", "lastCell", "getBoundaryCells", "returnValue", "SetHeaderRowCommand", "headingRowsToSet", "currentHeadingRows", "overlappingCells", "getVerticallyOverlappingCells", "splitHorizontally", "SetFooterRowCommand", "footerRowsToSet", "currentFooterRows", "splitRow", "currentSplitRow", "SetHeaderColumnCommand", "headingColumnsToSet", "getHorizontallyOverlappingCells", "splitVertically", "MergeCellsCommand", "firstTableCell", "mergeWidth", "mergeHeight", "getMergeDimensions", "cellBeingMerged", "targetCell", "maxWidthOffset", "maxHeightOffset", "getMaxOffset", "firstCellRow", "firstCellColumn", "start", "currentMaxOffset", "which", "dimensionValue", "SelectRowCommand", "rangesToSelect", "SelectColumnCommand", "startLocation", "endLocation", "startColumn", "endColumn", "cellInfo", "injectTableLayoutPostFixer", "tableLayoutPostFixer", "changes", "wasFixed", "analyzedTables", "isTableAttributeEntry", "fixTableCellsRowspan", "fixTableRowsSizes", "findCellsToTrim", "childrenLengths", "getChildrenLengths", "size", "rowsLengths", "tableSize", "maxColumns", "prev", "current", "maxRows", "count", "isInHeader", "isInFooter", "rowLimit", "newRowspan", "lengths", "injectTableCellParagraphPostFixer", "tableCellContentsPostFixer", "fixTable", "fixTableRow", "fixTableCellContent", "checkTableCellChange", "textNodes", "injectTableStructurePostFixer", "changed", "tables", "fixTableSections", "tableStructureRefreshHandler", "editing", "differ", "movedRows", "rowsToReconvert", "cellsToReconvert", "expectedElementName", "tableCellRefreshHandler", "cellsToCheck", "parent", "paragraphsToRefresh", "shouldRefresh", "paragraph", "TableEditing", "conversion", "useFooterElement", "upcastTableFigure", "upcastTable", "skipEmptyTableRow", "ensureParagraphInTableCell", "upcastCellSpan", "root", "slotHandler", "type", "InsertTableView", "View", "locale", "bind", "KeystrokeHandler", "FocusTracker", "domEvt", "focusedElement", "addKeyboardHandlingForGrid", "boxView", "index", "itemRow", "itemColumn", "isOn", "label", "button", "ButtonView", "boxes", "TableUI", "t", "isContentLtr", "command", "dropdownView", "createDropdown", "table_default", "insertTableView", "menuView", "MenuBarMenuView", "event", "isOpen", "table_column_default", "table_row_default", "table_merge_cell_default", "icon", "commands", "areEnabled", "isEnabled", "SwitchButtonView", "SplitButtonView", "mergeCommandName", "mergeCommand", "itemDefinitions", "Collection", "option", "addListOption", "addListToDropdown", "UIModel", "commandName", "bindIsOn", "TableSelection", "view", "args", "documentFragment", "sourceTable", "adjustedLastRow", "adjustedLastColumn", "dimensions", "adjustLastRowIndex", "adjustLastColumnIndex", "cropTableToDimensions", "anchorCell", "cellsToSelect", "highlighted", "viewWriter", "clearHighlightedTableCells", "lastViewCell", "previouslyHighlighted", "position", "isBackward", "tableCellToSelect", "rangeToSelect", "viewRanges", "startRow", "endRow", "endColumnExtraColspan", "selectionMap", "walkerOptions", "flipVertically", "flipHorizontally", "TableClipboard", "ClipboardMarkersUtils", "ClipboardPipeline", "viewDocument", "clipboardPipeline", "tableSelection", "isPaste", "content", "selectable", "clipboardMarkersUtils", "pastedTable", "pastedDimensions", "prepareTableForPasting", "selectionHeight", "selectionWidth", "cropDimensions", "selectedTable", "selectionRanges", "pastedWidth", "pastedHeight", "pastedTableLocationMap", "createLocationMap", "selectedTableMap", "pastedRow", "pastedColumn", "pastedCell", "cellToInsert", "newTableCell", "trimTableCellIfNeeded", "areHeadingRowsIntersectingSelection", "areHeadingColumnsIntersectingSelection", "areFooterRowsIntersectingSelection", "newCells", "doHorizontalSplit", "doVerticalSplit", "contentRange", "rangeBefore", "rangeAfter", "shouldExpandSelection", "expandTableSize", "splitCellsToRectangularSelection", "expectedHeight", "expectedWidth", "tableHeight", "height", "map", "limitColumns", "isAffectedBySelection", "splitColumn", "limitRows", "limit", "endIndex", "TableKeyboard", "bubblingEventInfo", "domEventData", "selectedElement", "isForward", "currentRowIndex", "isLastCellInRow", "isLastRow", "eventInfo", "keyCode", "getLocalizedArrowKeyCodeDirection", "expandSelection", "focusCell", "focus", "probe", "currentCellInfo", "cellToSelect", "positionToSelect", "MouseEventsObserver", "DomEventObserver", "domEvent", "TableMouse", "blockSelectionChange", "haveSameTableParent", "beganCellSelection", "newTargetCell", "viewTargetElement", "viewPosition", "cellA", "cellB", "Table", "Widget", "getSelectionAffectedTableWidget", "selection", "selectedTable", "getSelectedTableWidget", "getTableWidgetAncestor", "viewElement", "isTableWidget", "selectionPosition", "parent", "viewNode", "isWidget", "TableToolbar", "Plugin", "WidgetToolbarRepository", "editor", "t", "widgetToolbarRepository", "tableContentToolbarItems", "tableToolbarItems", "ColorInputView", "View", "locale", "options", "__publicField", "FocusTracker", "ViewCollection", "KeystrokeHandler", "FocusCycler", "evt", "name", "inputValue", "view", "direction", "bind", "colorSelector", "dropdown", "createDropdown", "colorPreview", "value", "isVisible", "inputView", "InputTextView", "mappedColor", "def", "defaultColor", "removeColorButtonLabel", "ColorSelectorView", "data", "backupColor", "normalizedInputValue", "normalizeColor", "colorString", "isEmpty", "val", "getBorderStyleLabels", "getLocalizedColorErrorText", "getLocalizedLengthErrorText", "colorFieldValidator", "isColorStyleValue", "lengthFieldValidator", "isNumberString", "isLengthStyleValue", "isPercentageStyleValue", "lineWidthFieldValidator", "getBorderStyleDefinitions", "defaultStyle", "itemDefinitions", "Collection", "styleLabels", "style", "definition", "UIModel", "fillToolbar", "icons", "toolbar", "labels", "propertyName", "nameToValue", "defaultValue", "button", "ButtonView", "buttonValue", "valueToCompare", "defaultColors", "getLabeledColorInputCreator", "labeledFieldView", "viewUid", "statusUid", "colorInputView", "colorConfigToColorGridDefinitions", "parsedValue", "colorConfig", "item", "TableCellPropertiesView", "borderStyleDropdown", "borderWidthInput", "borderColorInput", "borderRowLabel", "backgroundRowLabel", "backgroundInput", "cellTypeRowLabel", "cellTypeDropdown", "widthInput", "operatorLabel", "heightInput", "dimensionsLabel", "horizontalAlignmentToolbar", "verticalAlignmentToolbar", "alignmentLabel", "saveButtonView", "cancelButtonView", "header", "FormHeaderView", "FormRowView", "submitHandler", "defaultTableCellProperties", "defaultBorder", "colorInputCreator", "accessibleLabel", "LabelView", "LabeledFieldView", "createLabeledDropdown", "addListToDropdown", "createLabeledInputText", "isBorderStyleSet", "newValue", "oldValue", "cellTypeLabels", "paddingInput", "ALIGNMENT_ICONS", "align_left_default", "align_center_default", "align_right_default", "align_justify_default", "align_top_default", "align_middle_default", "align_bottom_default", "ToolbarView", "isContentRTL", "fieldsThatShouldValidateToSave", "errorTexts", "errorText", "backButton", "previous_arrow_default", "types", "type", "left", "center", "right", "justify", "BALLOON_POSITIONS", "BalloonPanelView", "repositionContextualBalloon", "target", "balloon", "position", "getBalloonCellPositionData", "getBalloonTablePositionData", "modelTable", "getSelectionAffectedTable", "viewTable", "mapper", "domConverter", "createBoundingRect", "modelTableCell", "getTableCellAtPosition", "viewTableCell", "ranges", "rects", "range", "Rect", "ERROR_TEXT_TIMEOUT", "propertyToCommandMap", "TableCellPropertiesUI", "ContextualBalloon", "getNormalizedDefaultCellProperties", "getNormalizedDefaultProperties", "table_cell_properties_default", "commands", "commandName", "areEnabled", "isCommandEnabled", "config", "scopedHeaders", "borderColorsConfig", "normalizeColorOptions", "localizedBorderColors", "getLocalizedColorOptions", "backgroundColorsConfig", "localizedBackgroundColors", "hasColorPicker", "cancel", "clickOutsideHandler", "colorErrorText", "lengthErrorText", "cellTypeCommand", "borderStyleCommand", "property", "effectiveCommandName", "command", "propertyKey", "useDefaults", "viewDocument", "viewField", "validator", "setErrorTextDebounced", "debounce", "executedCommandName", "columnWidthCommand", "TableCellPropertyCommand", "Command", "attributeName", "selectedTableCells", "table", "batch", "model", "tableCells", "valueToSet", "writer", "tableCell", "firstCellValue", "TableCellWidthCommand", "addDefaultUnitToNumericValue", "TableCellWidthEditing", "TableEditing", "enableProperty", "TableCellPaddingCommand", "getSingleValue", "TableCellHeightCommand", "TableCellBackgroundColorCommand", "TableCellVerticalAlignmentCommand", "TableCellHorizontalAlignmentCommand", "TableCellBorderStyleCommand", "TableCellBorderColorCommand", "TableCellBorderWidthCommand", "TableCellTypeCommand", "_", "updateTablesHeadingAttributes", "TableUtils", "groupCellsByTable", "tableUtils", "tables", "changed", "headingRows", "headingColumns", "footerRows", "footerIndex", "processColumnsFirst", "newHeadingColumns", "getAdjustedHeadingSectionSize", "newHeadingRows", "mode", "currentSize", "perpendicularHeadingSize", "totalRowsOrColumns", "size", "currentIndex", "walker", "TableWalker", "allCellsAreHeaders", "hasHeaderOutsidePerpendicularSection", "cell", "row", "column", "isTableHeaderCellType", "VALIGN_VALUES_REG_EXP", "ALIGN_VALUES_REG_EXP", "TableCellPropertiesEditing", "schema", "conversion", "addBorderStylesRules", "enableBorderProperties$1", "addPaddingStylesRules", "enableTableCellPaddingAttribute", "addBackgroundStylesRules", "enableHorizontalAlignmentProperty", "enableLegacyHorizontalAlignmentAttribute", "enableVerticalAlignmentProperty", "enableCellTypeProperty", "enableBorderProperties", "modelAttributes", "modelAttribute", "upcastBorderStyles", "downcastAttributeToStyle", "alignment", "conversionApi", "localDefaultValue", "getDefaultValueAdjusted", "align", "dispatcher", "matcher", "Matcher", "modelElement", "alignValue", "child", "applyAlignmentToChild", "attrName", "blockAlignment", "mappedValue", "valign", "editing", "context", "modelRange", "tableCellType", "priorities", "modelAttributeValue", "consumable", "viewItem", "changes", "tablesToCheck", "change", "differ", "cellsToReconvert", "cellType", "expectedElementName", "defaultPadding", "upcastTableCellPaddingAttribute", "TableCellProperties", "TableWidthsCommand", "Command", "options", "model", "plugins", "table", "columnWidths", "tableWidth", "writer", "tableColumnGroup", "widths", "normalizeColumnWidths", "removeCellWidthsFromTable", "column", "index", "colGroupElement", "columnWidth", "TableColumnWidthCommand", "editor", "tableUtils", "tableColumnResize", "tableCells", "columns", "value", "addDefaultUnitToNumericValue", "upcastColgroupElement", "tableUtilsPlugin", "dispatcher", "evt", "data", "conversionApi", "modelTable", "getColumnGroupElement", "columnElements", "getTableColumnElements", "columnsCount", "translateColSpanAttribute", "_", "updateColumnElements", "downcastTableResizedClass", "viewWriter", "viewElement", "viewTable", "viewChild", "upcastTableResizedClass", "toPx", "toUnit", "TableColumnResizeEditing", "Plugin", "__publicField", "DomEmitterMixin", "name", "classAction", "root", "globalVar", "TableEditing", "TableUtils", "columnResizePlugin", "element", "tableWidthsCommand", "isEditorReadOnly", "isPluginEnabled", "isTableWidthsCommandCommandEnabled", "tableWidthCommand", "args", "getSelectionAffectedTable", "getTableColumnsWidths", "cells", "columnIndexes", "cell", "leftEdge", "rightEdge", "getColumnEdgesIndexes", "indexA", "indexB", "isTableWidthInPixels", "applyPixelColumnWidths", "tableIsPixels", "isColumnWidthsInPixels", "reconciledWidths", "tableWidthInPixels", "width", "toPrecision", "totalWidth", "sumArray", "targetPercentage", "getTableWidthInPixels", "nextWidths", "band", "getContiguousBands", "neighbor", "bandCount", "available", "sum", "equalWidth", "target", "clamp", "columnElement", "targetColumns", "targetCount", "otherColumnsShare", "pixelWidth", "scale", "next", "viewFigure", "schema", "changed", "getChangedResizedTables", "isPixelMode", "normalizedWidths", "normalizePixelColumnWidths", "adjustColumnWidths", "scalePixelColumnsToTableWidth", "isEqual", "plugin", "newTableColumnsCount", "cellSet", "getAffectedCells", "currentColumnsDelta", "hasMoreColumns", "currentColumnIndex", "insertedColumnWidth", "getColumnMinWidthAsPercentage", "columnWidthsToInsert", "createFilledArray", "removedColumnWidths", "differ", "change", "referenceNode", "conversion", "viewColWidth", "isViewTableWidthInPixels", "editingView", "MouseEventsObserver", "throttle", "viewResizer", "domConverter", "domTable", "domCell", "item", "rectTable", "Rect", "rectCell", "targetTopPosition", "targetBottomPosition", "eventInfo", "domEventData", "columnWidthsInPx", "_calculateDomColumnWidths", "viewCol", "_insertColgroupElement", "initialWidth", "_applyResizingAttributesToTable", "tableWalker", "TableWalker", "cellSlot", "viewCell", "domCellWidth", "getDomCellOuterWidth", "colgroup", "i", "viewColElement", "resizingData", "figureWidth", "mouseEventData", "mouseEvent", "columnPosition", "isRightEdge", "isTableCentered", "isLtrContent", "isTableWidthWithinContainerAtDragStart", "isTableScrollAllowed", "viewLeftColumn", "viewRightColumn", "viewFigureParentWidth", "leftColumnWidth", "rightColumnWidth", "dxLowerBound", "isTableScrollActive", "containerWidth", "getEditableContentWidth", "dxUpperBound", "rawDx", "ltrSign", "isCenteredRightEdge", "dx", "mouseDelta", "newTableWidth", "crossoverPoint", "resistedTableWidth", "applyContainerWidthResistance", "toWidthValue", "widthInPx", "basisInPx", "tableFigureWidth", "viewColgroup", "viewColumns", "columnWidthsAttributeOld", "columnWidthsAttributeNew", "isColumnWidthsAttributeChanged", "tableWidthAttributeOld", "tableWidthAttributeNew", "isTableWidthAttributeChanged", "tableWidthInPixelsBeforeResize", "viewLeftCell", "modelLeftCell", "leftColumnIndex", "lastColumnIndex", "tableAlignment", "domFigureParent", "getContainerContentWidth", "viewFigureWidth", "getElementWidthInPixels", "tableScrollPlugin", "modelElement", "viewParent", "factor", "pixelWidths", "missingColumns", "knownWidth", "widthForMissingColumn", "toPixels", "targetPixels", "roundedWidths", "bands", "lastBand", "naturalTableWidth", "distance", "resistanceZone", "TableColumnResize", "TableCellWidthEditing", "TablePropertyCommand", "Command", "editor", "attributeName", "defaultValue", "__publicField", "selection", "table", "getSelectionAffectedTable", "options", "model", "value", "batch", "valueToSet", "writer", "TableBackgroundColorCommand", "TableBorderColorCommand", "getSingleValue", "TableBorderStyleCommand", "TableBorderWidthCommand", "newValue", "addDefaultUnitToNumericValue", "TableWidthCommand", "TableHeightCommand", "TableAlignmentCommand", "TablePropertiesEditing", "Plugin", "TableEditing", "schema", "conversion", "defaultTableProperties", "getNormalizedDefaultTableProperties", "useInlineStyles", "addMarginStylesRules", "addBorderStylesRules", "enableBorderProperties", "enableAlignmentProperty", "enableTableToFigureProperty", "addBackgroundStylesRules", "enableProperty$1", "upcastTableCellPaddingAttribute", "viewDoc", "evt", "data", "item", "wrapInDivIfNeeded", "viewItem", "alignAttribute", "floatAttribute", "marginLeft", "marginRight", "insertWrapperWithAlignment", "align", "position", "wrapper", "defaultBorder", "modelAttributes", "modelAttribute", "upcastBorderStyles", "downcastTableAttribute", "modelElement", "DEFAULT_TABLE_ALIGNMENT_OPTIONS", "upcastTableAlignmentConfig", "config", "viewElement", "conversionApi", "isNonTableFigureElement", "localDefaultValue", "getDefaultValueAdjusted", "consumables", "upcastTableAlignedDiv", "dispatcher", "significantChildren", "child", "viewTable", "conversionResult", "modelTable", "first", "convertToTableAlignment", "divAlign", "tableAlign", "enableProperty", "upcastStyleToAttribute", "downcastAttributeToStyle", "TablePropertiesView", "View", "locale", "borderStyleDropdown", "borderWidthInput", "borderColorInput", "borderRowLabel", "backgroundRowLabel", "backgroundInput", "widthInput", "operatorLabel", "heightInput", "dimensionsLabel", "alignmentToolbar", "alignmentLabel", "FocusTracker", "KeystrokeHandler", "saveButtonView", "cancelButtonView", "ViewCollection", "FocusCycler", "headerView", "FormHeaderView", "FormRowView", "submitHandler", "view", "colorInputCreator", "getLabeledColorInputCreator", "t", "accessibleLabel", "LabelView", "styleLabels", "getBorderStyleLabels", "LabeledFieldView", "createLabeledDropdown", "addListToDropdown", "getBorderStyleDefinitions", "createLabeledInputText", "isBorderStyleSet", "name", "oldValue", "backgroundInputCreator", "ToolbarView", "fillToolbar", "object_inline_left_default", "object_center_default", "object_inline_right_default", "object_left_default", "object_right_default", "ButtonView", "fieldsThatShouldValidateToSave", "errorTexts", "errorText", "backButton", "previous_arrow_default", "blockLeft", "blockRight", "left", "center", "right", "ERROR_TEXT_TIMEOUT", "propertyToCommandMap", "TablePropertiesUI", "defaultColors", "ContextualBalloon", "getNormalizedDefaultProperties", "table_properties_default", "commands", "commandName", "areEnabled", "isCommandEnabled", "borderColorsConfig", "normalizeColorOptions", "localizedBorderColors", "getLocalizedColorOptions", "backgroundColorsConfig", "localizedBackgroundColors", "hasColorPicker", "cancel", "clickOutsideHandler", "colorErrorText", "getLocalizedColorErrorText", "lengthErrorText", "getLocalizedLengthErrorText", "colorFieldValidator", "lineWidthFieldValidator", "lengthFieldValidator", "borderStyleCommand", "property", "propertyKey", "getSelectionAffectedTableWidget", "useDefaults", "getBalloonTablePositionData", "viewDocument", "repositionContextualBalloon", "propertyName", "viewField", "validator", "setErrorTextDebounced", "debounce", "TableProperties", "modelElementToPlainText", "item", "element", "text", "prev", "child", "childText", "WordCount", "Plugin", "editor", "__publicField", "env", "throttle", "evt", "data", "isElement", "t", "displayWords", "displayCharacters", "bind", "Template", "children", "View", "words", "txt", "root", "characters", "de_default", "n", "es_default", "n", "fr_default", "n", "import_debounce", "MEDIA_FILE_EMBED_ATTRIBUTES", "TutorizeMediaFileEmbed", "Plugin", "Widget", "schema", "conversion", "editingDowncastHandler", "viewElement", "writer", "getElementMediaFileAttributes", "modelElement", "element", "toWidget", "previewElement", "attributes", "attribute", "TutorizeMediaUploadUI", "Plugin", "locale", "dropdown", "createDropdown", "directUploads", "positionDirectUploads", "pos", "offset", "getOffsetFromBoundingBox", "MEDIA_ICON", "box", "docElem", "TutorizeMediaUpload", "Plugin", "TutorizeMediaUploadUI", "TutorizeMediaFileEmbed", "TutorizeUploadAdapter", "loader", "endpointUrl", "file", "data", "csrfToken", "headers", "response", "json", "message", "TutorizeUploadAdapterPlugin", "Plugin", "fileRepository", "MentionCustomization", "Plugin", "Mention", "editor", "viewItem", "modelAttributeValue", "writer", "mentionItemRenderer", "item", "itemElement", "nameElement", "typeElement", "editor_controller_default", "Controller", "ClassicEditor", "editor", "backgroundImageUrl", "opacity", "writer", "editorDocumentRoot", "wrapper", "de_default", "es_default", "fr_default", "Alignment", "Bold", "Clipboard", "Essentials", "Font", "FontBackgroundColor", "FontColor", "Heading", "Image", "ImageBlock", "ImageCaption", "ImageInline", "ImageResize", "ImageStyle", "ImageToolbar", "ImageUpload", "Indent", "IndentBlock", "Italic", "Link", "List", "MediaEmbed", "Mention", "Paragraph", "PasteFromOffice", "RemoveFormat", "Strikethrough", "Table", "TableCellProperties", "TableColumnResize", "TableProperties", "TableToolbar", "TextTransformation", "TutorizeMediaUpload", "TutorizeUploadAdapterPlugin", "Underline", "WordCount", "CodeBlock", "editorMain", "editable", "skipLink", "height", "maxHeight", "wordCountPlugin", "editorWrapper", "event", "dataLength", "name", "validationInput", "file", "mediaFileEmbed", "element", "directUploads", "buildDirectUploadsElement", "mediaFileEmbedEditingDowncast", "query", "url", "response", "json", "mentionItemRenderer", "plugins", "MentionCustomization", "removePlugins", "__publicField", "opts", "directUploadsWrapper", "fileInputWrapper", "mediaFileIdInput", "statusBar", "modelElement", "raw", "label", "children", "sources", "src", "video", "data", "object", "div", "import_mediaelement", "exports", "exports", "exports", "e", "t", "n", "r", "o", "u", "a", "__require", "i", "f", "l", "_dereq_", "module", "exports", "VimeoApi", "settings", "player", "url", "parts", "playerLinkMatch", "vimeoLinkMatch", "privateVimeoLinkMatch", "vimeoIframeRenderer", "type", "mediaElement", "options", "mediaFiles", "apiStack", "vimeo", "readyState", "paused", "volume", "oldVolume", "currentTime", "bufferedTime", "ended", "duration", "vimeoPlayer", "errorHandler", "error", "props", "assignGettersSetters", "propName", "capName", "value", "_url", "_url2", "videoId", "event", "total", "methods", "assignMethods", "methodName", "_i", "_total", "_vimeoPlayer", "_i2", "_total2", "stackItem", "vimeoIframe", "events", "assignEvents", "_i3", "_total3", "loadProgress", "initEvent", "playingEvent", "seconds", "_i4", "_total4", "height", "width", "vimeoContainer", "standardUrl", "queryArgs", "args", "import_mediaelement", "RATES", "player", "controls", "layers", "media", "prefix", "id", "format", "wrapper", "rate", "select", "e", "current", "editor_media_file_embed_controller_default", "Controller", "oembed", "json", "obj", "video", "src", "source", "wrapper", "__publicField", "element_statistics_controller_default", "Controller", "tab", "event", "elementType", "activeTabPane", "activeTab", "informationsFrame", "tableFrame", "form", "__publicField", "user_profile_controller_default", "Controller", "tab", "event", "elementType", "content", "Tab", "url", "response", "DomParserSupport", "parser", "text", "documentFragment", "doc", "children", "element", "_index", "dom_parser_support_default", "SupportChecker", "support_checker_default", "LoadScripts", "domElement", "content", "script", "load_scripts_default", "handleUnauthorized", "response", "json", "toast", "text", "fetch_html_controller_default", "Controller", "event", "options", "notifyResize", "response", "handleUnauthorized", "text", "parsed", "dom_parser_support_default", "d", "newTitle", "pendingFocus", "newFooter", "triggerFocusParked", "load_scripts_default", "notifyNow", "error", "durationMs", "anchor", "startTop", "active", "correct", "delta", "observer", "container", "candidate", "el", "label", "signature", "replacement", "entries", "entry", "message", "__publicField", "import_debounce", "filterable_controller_default", "Controller", "template", "event", "inputValue", "element", "__publicField", "form_leave_controller_default", "Controller", "value", "type", "event", "message", "modalEl", "Modal", "heartbeat_controller_default", "Controller", "response", "error", "infinite_scroll_controller_default", "Controller", "entries", "observer", "entry", "response", "json", "error", "__publicField", "leave_page_controller_default", "Controller", "event", "_event", "showAlert", "lock_timeout_controller_default", "Controller", "newValue", "oldValue", "modalElement", "modal", "Modal", "err", "lockTimeInMilliseconds", "modalBackdrop", "modalClone", "button", "extendEditLink", "event", "autoSaveFlags", "flag", "submitButtons", "radioBsTargetId", "form", "bsTargetId", "el", "__publicField", "import_mediaelement", "media_element_controller_default", "Controller", "result", "element", "_index", "startVolume", "source", "url", "toggleProgressCheckBox", "__publicField", "modal_controller_default", "Controller", "_event", "Modal", "support_checker_default", "event", "element", "data", "status", "xhr", "entries", "_observer", "entry", "message", "titleEl", "modal_link_controller_default", "Controller", "event", "toggle", "Dropdown", "url", "response", "handleUnauthorized", "text", "dom_parser_support_default", "title", "Modal", "load_scripts_default", "error", "_event", "focusElement", "saved", "nestedModal", "fetchHtml", "trigger", "byId", "element", "menu", "modalDialog", "__publicField", "nav_tabs_scrollable_controller_default", "Controller", "_event", "event", "currentItem", "content", "container", "containerMetrics", "containerMetricsRight", "containerMetricsLeft", "contentMetrics", "contentMetricsRight", "contentMetricsLeft", "__publicField", "r", "Controller", "t", "e", "a", "nested_form_controller_default", "r", "event", "lastWrapper", "no_paste_controller_default", "Controller", "e", "notification_controller_default", "Controller", "response", "json", "error", "responseJson", "target", "_", "targets", "__publicField", "password_show_toggle_controller_default", "Controller", "_event", "user_password_input", "visible", "per_page_dropdown_controller_default", "Controller", "item", "event", "pdf_summary_confirmation_controller_default", "Controller", "generateButton", "collapseElement", "submitButton", "acceptButton", "contentSubmitButton", "summaryAccordionButton", "event", "summary", "generatedTextArea", "editorContainer", "textarea", "__publicField", "currentOpenController", "popover_controller_default", "Controller", "e", "templateEl", "content", "Popover", "_event", "isDetail", "announceAsStatus", "response", "text", "error", "tip", "body", "link", "blocks", "el", "ids", "index", "focusable", "focusableEls", "fallbackBody", "allFocusable", "first", "last", "active", "url", "popoverToDispose", "__publicField", "radio_check_controller_default", "Controller", "event", "currentRadio", "element", "__publicField", "uniqueIdCounter", "isCssEmbeddedFor", "arr", "item", "forEach", "callback", "scope", "i", "extend", "objects", "hasProp", "child", "parent", "args", "key", "c1", "p1", "debounce", "func", "wait", "immediate", "timeout", "callNow", "later", "uniqueId", "setBoxHeights", "element", "expandedHeight", "cssMaxHeight", "defaultHeight", "createElementFromString", "htmlString", "div", "embedCSS", "selector", "options", "styles", "d", "u", "css", "buildToggle", "link", "clickHandler", "event", "text", "toggleLink", "isEnvironmentSupported", "resizeBoxes", "elements", "expanded", "defaults", "Readmore", "heightMargin", "toggleElement", "el", "trigger", "newHeight", "transitionendHandler", "transitionEvent", "readmore_es6_default", "readmore_controller_default", "Controller", "support_checker_default", "entries", "observer", "entry", "readmore_es6_default", "element", "wasTruncated", "trigger", "expanded", "__publicField", "MARGIN_IN_SECONDS", "refresh_csrf_token_controller_default", "Controller", "event", "token", "error", "response", "html", "__publicField", "resizable_chat_controller_default", "Controller", "saved", "width", "height", "event", "rect", "deltaX", "deltaY", "navbar", "navbarBottom", "maxHeight", "newWidth", "newHeight", "maxWidth", "__publicField", "REFOCUS_DELAY_MS", "ANNOUNCE_HOLD_MS", "AUTOSIZE_CLASS", "resize_controller_default", "Controller", "event", "delta", "newHeight", "currentHeight", "button", "contentHeight", "keepHeight", "height", "params", "formData", "key", "value", "__publicField", "resource_lock_channel_controller_default", "Controller", "data", "receivedType", "resourceId", "selector", "htmlElement", "lockHtml", "lockIconContainer", "parentElement", "target", "isThisUser", "__publicField", "LAST_ACTIVITY_KEY", "session_timeout_controller_default", "Controller", "event", "expiresAt", "warningAt", "time", "error", "toast", "extendButton", "response", "previousFocus", "notice", "element", "__publicField", "sidebar_toggle_controller_default", "Controller", "support_checker_default", "toggleElement", "_event", "submit_on_enter_controller_default", "Controller", "event", "submit_other_form_controller_default", "Controller", "dom", "fieldFileIDElement", "fileNameElement", "__publicField", "sum_point_controller_default", "Controller", "_target", "sum", "element", "_index", "__publicField", "SyncPickMarkup", "options", "restoreAttribute", "labelId", "fallbackLabel", "expanded", "items", "container", "pos", "offset", "getOffsetFromBoundingBox", "top", "right", "selectOffsetTop", "selectOffsetBot", "wrapper", "button", "buttonClass", "buttonDisabledClass", "buttonIcon", "buttonIconClass", "popup", "liveRegion", "message", "self", "searchInputClass", "buttongroup", "buttonGroupClass", "dropdownValues", "selectedValues", "valuesOrder", "optGroupLabel", "index", "arr", "pageUl", "buildUl", "label", "order", "hr", "li", "buildLi", "ul", "value", "element", "option", "setLiSelected", "activeLi", "selected", "step", "allLis", "current", "entry", "entryOffsetTop", "shouldScrollDown", "shouldScrollUp", "match", "count", "joinSelectedTexts", "key", "additionalClasses", "listClass", "text", "subtext", "imgAttributes", "textSpan", "subtextDom", "imageTag", "attr", "addCheck", "checkedIconClasses", "check", "checkedIconClass", "name", "box", "docElem", "en_default", "de_default", "es_default", "fr_default", "SyncPick", "e", "nextIndex", "onDomRemove", "optgrouplabel", "newValue", "inputValue", "lowerInputValue", "filteredValues", "optionData", "clickedButton", "keysOfSelectedValues", "event", "msg", "someObject", "onDetachCallback", "observer", "isDetached", "el", "sync_pick_controller_default", "Controller", "options", "key", "elementId", "l", "select", "option", "__publicField", "ZERO_WIDTH_UNICODE_CHAR", "e", "i", "t", "logger", "isEnabled", "window", "TAGIFY_DEBUG", "log", "_len", "arguments", "length", "args", "Array", "_key", "console", "this", "_to_consumable_array", "warn", "sameStr", "s1", "s2", "caseSensitive", "trim", "toLowerCase", "removeCollectionProp", "collection", "unwantedProps", "isArray", "map", "v", "omit", "obj", "props", "p", "newObj", "indexOf", "parseHTML", "s", "DOMParser", "parseFromString", "body", "firstElementChild", "getfirstTextNode", "elm", "action", "nodeType", "escapeHTML", "replace", "isObject", "type", "Object", "prototype", "toString", "call", "split", "slice", "extend", "o", "o1", "o2", "copy", "a", "b", "key", "hasOwnProperty", "assign", "concatWithoutDups", "newArr", "existingObj", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "undefined", "_step", "_iterator", "Symbol", "iterator", "arr", "value", "_iteratorNormalCompletion1", "_didIteratorError1", "_iteratorError1", "_step1", "_iterator1", "item", "push", "includes", "err", "return", "unaccent", "String", "normalize", "isChromeAndroidBrowser", "test", "navigator", "userAgent", "getUID", "c", "crypto", "getRandomValues", "Uint8Array", "isNodeTag", "node", "belongs", "isNodeBelongsToThisTagifyInstance", "isTag", "classList", "contains", "settings", "classNames", "tag", "isWithinNodeTag", "closest", "tagSelector", "namespaceSelector", "DOM", "scope", "injectAtCaret", "content", "range", "selection", "getSelection", "getRangeAt", "document", "createTextNode", "deleteContents", "insertNode", "getSetTagData", "tagElm", "data", "override", "__tagifyTagData", "placeCaretAfterNode", "parentNode", "nextSibling", "sel", "rangeCount", "setStartAfter", "collapse", "removeAllRanges", "addRange", "fixCaretBetweenTags", "tags", "TagifyHasFocuse", "forEach", "previousSibling", "textNode", "before", "DEFAULTS", "delimiters", "pattern", "tagTextProp", "maxTags", "Infinity", "callbacks", "addTagOnBlur", "addTagOn", "onChangeAfterBlur", "duplicates", "whitelist", "blacklist", "enforceWhitelist", "userInput", "focusable", "focusInputOnRemove", "keepInvalidTags", "createInvalidTags", "mixTagsAllowedAfter", "mixTagsInterpolator", "backspace", "skipInvalid", "pasteAsTags", "editTags", "clicks", "keepInvalid", "transformTag", "a11y", "focusableTags", "inputAriaLabel", "mixMode", "insertAfterTag", "autoComplete", "enabled", "rightKey", "tabKey", "namespace", "selectMode", "input", "focus", "tagNoAnimation", "tagInvalid", "tagNotAllowed", "scopeLoading", "hasMaxTags", "hasNoTags", "empty", "inputInvalid", "dropdown", "dropdownWrapper", "dropdownHeader", "dropdownFooter", "dropdownItem", "dropdownItemActive", "dropdownItemHidden", "dropdownItemSelected", "dropdownInital", "tagText", "tagX", "tagLoading", "tagEditing", "tagFlash", "tagHide", "classname", "maxItems", "searchKeys", "fuzzySearch", "accentedSearch", "includeSelectedTags", "highlightFirst", "closeOnSelect", "clearOnSelect", "position", "appendTarget", "hooks", "beforeRemoveTag", "Promise", "resolve", "beforePaste", "suggestionClick", "beforeKeyDown", "initDropdown", "_dropdown", "bind", "refs", "__tagify", "C", "_", "_object_spread_props", "suggestionsMethods", "events", "binding", "bindUnbind", "_CB", "_CBR", "listeners", "onKeyDown", "onMouseOver", "onMouseLeave", "onClick", "onScroll", "state", "hasFocus", "composing", "_s", "selectedElm", "querySelector", "dropdownItemActiveSelector", "selectedElmData", "getSuggestionDataByNode", "isMixMode", "mode", "isSelectMode", "tagify", "then", "result", "preventDefault", "dropdownItems", "_this", "getAllSuggestionsRefs", "actionUp", "getNextOrPrevOption", "matches", "dropdownItemSelector", "highlightOption", "itemsPerPage", "Math", "floor", "clientHeight", "offsetHeight", "isPageUp", "currentIndex", "targetIndex", "max", "min", "hide", "actions", "ArrowLeft", "shouldAutocompleteOnKey", "editing", "getMappedValue", "autoCompleteData", "autocomplete", "set", "selectOption", "setTimeout", "tagData", "suggestionElm", "nextOrPrevOption", "nextOrPrevOptionValue", "getAttribute", "getSuggestionNodeByValue", "addTags", "inputText", "catch", "raw", "charCodeAt", "removeTags", "editTag", "ddItem", "target", "button", "pos", "scrollTop", "scrollHeight", "trigger", "percentage", "round", "refilter", "query", "suggestedListItems", "filterListItems", "fill", "find", "selected", "next", "selectedIdx", "findIndex", "adjustScroll", "itemData", "className", "ddItemElm", "remove", "removeAttribute", "ddItemData", "suggest", "add", "setAttribute", "offsetTop", "event", "onSelect", "isNoMatch", "normalizedTagData", "normalizeTags", "onEditTagDone", "__isValid", "toggleFocusClass", "addEventListener", "fillHeaderFooter", "once", "selectAll", "onlyRendered", "tagsToAdd", "suggestions", "options", "whitelistItem", "valueIsInWhitelist", "searchBy", "isDuplicate", "niddle", "l", "startsWithMatch", "exactMatch", "_searchKeys", "keys", "some", "k", "_sd", "exact", "reduce", "values", "every", "q", "isTagDuplicate", "exactMatchesList", "sortby", "list", "unshift", "d", "suggestionsCount", "hasCustomSort", "filter", "_this1", "filteredList", "concat", "mapValueTo", "createListHTML", "sugegstionsList", "suggestion", "idx", "mappedValue", "templates", "apply", "join", "parseTemplate", "getHeaderRef", "getFooterRef", "querySelectorAll", "show", "firstListItem", "firstListItemValue", "noMatchListItem", "allowNewTags", "noWhitelist", "isManual", "dropdownItemNoMatch", "isLoading", "readonly", "clearTimeout", "dropdownHide__bindEventsTimeout", "visible", "setStateSelection", "render", "overrideManual", "_this_DOM", "removeEventListener", "removeChild", "flaggedTags", "baseOffset", "toggle", "getAppendTarget", "height", "clone", "ddHeight", "cloneNode", "style", "cssText", "appendChild", "HTMLContent", "dropdownContent", "innerHTML", "newHeaderElem", "newFooterElem", "headerRef", "footerRef", "replaceChild", "rect", "top", "bottom", "left", "width", "ancestorsOffsets", "isPlacedAbove", "hasSpaceOnRight", "cssTop", "cssLeft", "ddElm", "isRTL", "RTL", "isDefaultAppendTarget", "isSelfAppended", "appendTargetScrollTop", "pageYOffset", "root", "fullscreenElement", "webkitFullscreenElement", "documentElement", "viewportHeight", "viewportWidth", "clientWidth", "innerWidth", "positionTo", "ddTarget", "r2", "r", "startContainer", "offset", "startOffset", "createRange", "setStart", "setEnd", "getBoundingClientRect", "right", "getCaretGlobalPosition", "offsetLeft", "accumulatedAncestorsScrollTop", "ceil", "placeAbove", "pageXOffset", "STORE_KEY", "TEXTS", "exceed", "duplicate", "notAllowed", "wrapper", "disabled", "required", "placeholder", "param", "title", "class", "getAttributes", "_t", "hasMore", "V", "R", "F", "n", "H", "B", "W", "U", "customBinding", "customEventsList", "name", "on", "mainEvents", "eventName", "main", "bindGlobal", "isJQueryPlugin", "jQuery", "originalInput", "removeAllTags", "keydown", "onKeydown", "click", "onClickScope", "dblclick", "onDoubleClickScope", "paste", "onPaste", "drop", "onDrop", "compositionstart", "onCompositionStart", "compositionend", "onCompositionEnd", "inputMutationObserver", "MutationObserver", "onInputDOMChange", "disconnect", "observe", "childList", "bindOriginaInputListener", "delay", "DELAY", "clearInterval", "originalInputValueObserverInterval", "setInterval", "observeOriginalInputValue", "unbind", "global", "isIE", "cb", "onWindowKeyDown", "onFocusBlur", "onClickAnywhere", "useCapture", "unbindGlobal", "_this_value_", "_this_value", "nodeTag", "relatedTarget", "targetIsTagNode", "isTargetXBtn", "isFocused", "lostFocus", "Date", "text", "textContent", "currentDisplayValue", "ddEnabled", "eventData", "isTargetSelectOption", "isTargetAddNewBtn", "addNew", "postUpdate", "triggerChangeEvent", "dropdownCanBeShown", "tagTextSelector", "setRangeAtStartEnd", "loading", "firstTagNode", "getTagElms", "nextTag", "focusedElm", "activeElement", "isBelong", "isInputNode", "isReadyOnlyTag", "hasAttribute", "isDropdownVisible", "nextElementSibling", "targetIsRemoveBtn", "deleteKeyTagDetected", "anchorOffset", "anchorNode", "prevAnchorSibling", "isCaretAfterTag", "el", "createElement", "enc", "innerText", "lastTagElems", "tagBeforeCaret", "tagElmToBeDeleted", "firstTextNodeBeforeTag", "isZWS", "nodeValue", "previousElementSibling", "_instanceof", "Element", "nodeName", "collapseToEnd", "isManualDropdown", "blur", "inputSuggestion", "thingToAdd", "onInput", "onMixTagsInput", "showSuggestions", "inputElm", "validation", "validateTag", "toggleScopeValidation", "isValid", "search", "rangeText", "match", "matchedPatternCount", "matchFlaggedTag", "matchDelimiters", "lastTagsCount", "tagsElems", "fragment", "createDocumentFragment", "remainingTagsValues", "inputType", "createTagElem", "childNodes", "lastChild", "update", "withoutChangeEvent", "cloneRange", "focusNode", "endOffset", "lastIndexOf", "prefix", "onInputIE", "destroy", "tagifyValue", "loadOriginalValues", "closestTagifyDropdownElem", "dropdownSelector", "timeDiffFocus", "index", "getNodeIndex", "fixFirefoxLastTagNoCaret", "clipboardData", "pastedText", "getData", "interpolatedText", "convertPastedTextToMixTags", "parseMixTags", "skipDOM", "tagsData", "__tagifyTagsData", "addedTags", "onEditTagInput", "editableElm", "_obj", "tagElmIdx", "textValue", "dataForChangedProp", "_define_property", "__tagId", "editTagChangeDetected", "originalIsValid", "newValue", "onEditTagPaste", "newNode", "onEditTagClick", "onEditTagFocus", "onEditTagBlur", "isRelatedTargetNodeTag", "newTagData", "originalData", "__originalData", "hasChanged", "_obj1", "message", "onEditTagkeydown", "__originalHTML", "EDITED_TAG_BLUR_DELAY", "isEditingTag", "editable", "m", "lastInputChild", "record", "addedNodes", "addedNode", "outerHTML", "replaceWith", "newlineText", "nextNode", "anythingAfterNode", "removedNodes", "removedNode", "z", "X", "J", "G", "$", "Q", "Tagify", "mockInstance", "Proxy", "get", "id", "instance", "callbacksPerType", "addRemove", "op", "ev", "removeAllCustomListeners", "entries", "cbArr", "off", "opts", "cloneData", "triggerHandler", "cloneEvent", "prop", "HTMLElement", "CustomEvent", "detail", "dispatchEvent", "isFirefox", "documentMode", "getPersistedData", "localStorage", "persistedData", "customKey", "getItem", "JSON", "parse", "setPersistedData", "setItem", "stringify", "Event", "clearPersistedData", "base", "removeItem", "applySettings", "build", "getCSSVars", "autofocus", "helpers", "dataProps", "template", "setContentEditable", "generateClassSelectors", "currentName", "defineProperty", "mergedDefaults", "attrVal", "RegExp", "_delimiters", "_object_spread", "texts", "persistedWhitelist", "attrs", "getCustomAttributes", "propName", "output", "compStyle", "getComputedStyle", "CSSVars", "tagHideTransition", "unit", "pop", "getPropertyValue", "labelWrapper", "integrated", "originalInput_tabIndex", "tabIndex", "inputSelector", "insertBefore", "_this_DOM_scope_parentNode", "_this_listeners_main", "_this_listeners", "blockChangeEvent", "persistedOriginalValue", "tagName", "insertAdjacentHTML", "lastOriginalValueReported", "clonedEvent", "toggleClass", "force", "setPlaceholder", "str", "changed", "bubbles", "simulated", "_valueTracker", "setValue", "random", "start", "getTagTextNode", "setTagTextNode", "HTML", "getLastTag", "tagIdx", "skipValidation", "editTagToggleValidity", "removeTagsFromValue", "previousData", "replaceTag", "reCheckInvalidTags", "getInvalidTagAttrs", "newTagElm", "updateValueByDOMTags", "clsNames", "skipNodesWithClassNames", "cls", "injectedNode", "_this_state_selection", "insertedNodes", "appendMixTags", "caretTarget", "updateDOM", "hideDropdown", "validate", "source", "charAt", "suggestedText", "suggestionStart", "substr", "suggestionTrimmed", "substring", "dataSuggest", "replaceTextWithNode", "getTagIdx", "classess", "_sc", "tagNodes", "tagId", "dupsCount", "done", "getTagIndexByValue", "indices", "isCaseSensitive", "getTagElmByValue", "flashTag", "isTagBlacklisted", "x", "isTagWhitelisted", "getWhitelistItem", "_wi", "_wiv", "setReadonly", "attrribute", "contentEditable", "setDisabled", "isDisabled", "tagsItems", "_this_settings", "whitelistMatches", "whitelistWithProps", "isCollection", "mapStringToCollection", "acc", "trimmed", "itemCopy", "whitelistMatchesValues", "filteredItem", "matchObj", "tagsDataSet", "textProp", "preInterpolated", "maxTagsReached", "Error", "prefixPatterns", "prefixWhitelistMap", "normalizedPrefix", "originalItem", "searchValue", "sort", "patternRegex", "replacements", "exec", "startIndex", "afterPrefixIndex", "textAfterPrefix", "whitelistItems", "matchedItem", "matchedLength", "itemLength", "charAfterMatch", "replacement", "end", "lastIndex", "reverse", "newWrapperNode", "strToReplace", "nodeToReplace", "nodeAtCaret", "firstSplitOffset", "splitText", "prepareNewTagNode", "aggregatedInvalidInput", "tagElmParams", "__preInvalidData", "postProcessNewTagNode", "selectTag", "lastTagElm", "appendTag", "addEmptyTag", "initialData", "clearInput", "tagElems", "frag", "addMixTags", "newTagNode", "prefixedTextToTag", "children", "savedRange", "hasSavedSelection", "tagsPayload", "_this_state_tag", "newTag", "createdFromDelimiters", "insertBeforeNode", "extraData", "templateData", "textnode", "iter", "createNodeIterator", "NodeFilter", "SHOW_TEXT", "tagValidation", "tagElms", "silent", "tranDuration", "tagsToRemove", "elms", "__removed", "removeNode", "parseFloat", "clientTop", "reason", "removeTagsFromDOM", "splice", "updateCallback", "hasValue", "setOriginalInputValue", "debouncedUpdateTimeout", "inputValue", "getInputValue", "getCleanValue", "getMixedTagsAsString", "originalInputValueFormat", "that", "_interpolator", "iterateChildren", "rootNode", "removeTag", "tag_input_controller_default", "Controller", "dropdownFooterText", "Y", "values", "item", "suggestions", "additionalSuggestions", "__publicField", "MODAL_HIDE_DELAY_MS", "ANNOUNCE_HOLD_MS", "tasks_widget_checkbox_controller_default", "Controller", "url", "confirmed", "modalElement", "modal", "Modal", "confirmBtn", "resolve", "cleanup", "onConfirm", "onHidden", "completed", "response", "error", "toast", "container", "text", "__publicField", "announceTimeout", "pendingMessages", "SENTENCE_END", "toSentence", "message", "toast_controller_default", "Controller", "Toast", "announcer", "delay", "toggle_controller_default", "Controller", "selectedValue", "element", "event", "el", "__publicField", "toggle_radio_group_controller_default", "Controller", "label", "group", "btn", "__publicField", "tutorial_series_course_controller_default", "Controller", "__publicField", "tutorial_time_settings_controller_default", "Controller", "panel", "Collapse", "event", "nextValue", "radio", "selectedPanel", "selectedValue", "isSelected", "value", "open", "__publicField", "optionSelector", "activeSelector", "_Autocomplete", "Controller", "__publicField", "event", "handler", "item", "selected", "query", "url", "html", "error", "response", "debounce", "next", "options", "index", "sibling", "def", "target", "previouslySelected", "textValue", "value", "prefix", "el", "params", "Autocomplete", "fn", "delay", "timeoutId", "args", "typeahead_controller_default", "Autocomplete", "__publicField", "url", "response", "toast", "_event", "html", "import_debounce", "validation_controller_default", "Controller", "event", "input", "validator", "_index", "otherInputs", "indexOfTarget", "bool", "message", "otherField", "fieldStates", "selectors", "selector", "checker", "arr", "element", "inputValid", "ajaxData", "response", "inputs", "maxFileSize", "file", "values", "index", "__publicField", "application", "alphabetic_sort_toggle_controller_default", "assignment_controller_default", "async_pick_controller_default", "auto_redirect_controller_default", "autosave_controller_default", "chartjs_controller_default", "checkbox_select_all_controller_default", "checkbox_to_form_controller_default", "clipboard_controller_default", "collapse_all_controller_default", "collapse_aria_label_controller_default", "collapse_controller_default", "countdown_controller_default", "datatable_controller_default", "direct_upload_controller_default", "display_with_button_controller_default", "display_with_radio_button_controller_default", "drag_drop_controller_default", "dropdown_controller_default", "editor_controller_default", "editor_media_file_embed_controller_default", "element_statistics_controller_default", "user_profile_controller_default", "fetch_html_controller_default", "filterable_controller_default", "form_leave_controller_default", "heartbeat_controller_default", "infinite_scroll_controller_default", "leave_page_controller_default", "lock_timeout_controller_default", "media_element_controller_default", "modal_controller_default", "modal_link_controller_default", "nav_tabs_scrollable_controller_default", "nested_form_controller_default", "no_paste_controller_default", "notification_controller_default", "password_show_toggle_controller_default", "per_page_dropdown_controller_default", "pdf_summary_confirmation_controller_default", "popover_controller_default", "radio_check_controller_default", "readmore_controller_default", "refresh_csrf_token_controller_default", "resizable_chat_controller_default", "resize_controller_default", "resource_lock_channel_controller_default", "session_timeout_controller_default", "sidebar_toggle_controller_default", "submit_on_enter_controller_default", "submit_other_form_controller_default", "sum_point_controller_default", "sync_pick_controller_default", "tag_input_controller_default", "tasks_widget_checkbox_controller_default", "toast_controller_default", "toggle_controller_default", "toggle_radio_group_controller_default", "tutorial_series_course_controller_default", "tutorial_time_settings_controller_default", "typeahead_controller_default", "validation_controller_default", "_defineProperty", "e", "r", "t", "_toPropertyKey", "ownKeys", "e", "r", "t", "o", "_objectSpread2", "_defineProperty", "_toPrimitive", "r", "e", "i", "_toPropertyKey", "noop", "_WINDOW", "_DOCUMENT", "_MUTATION_OBSERVER", "_PERFORMANCE", "userAgent", "WINDOW", "DOCUMENT", "MUTATION_OBSERVER", "PERFORMANCE", "IS_BROWSER", "IS_DOM", "IS_IE", "p", "g", "S", "A", "P", "s", "t", "r", "o", "L", "G", "lt", "pt", "xt", "Ft", "St", "At", "Ct", "Lt", "Wt", "Et", "t$1", "r$1", "bt$1", "Yt", "ua", "I$1", "ga", "x", "Ia", "m$1", "c$1", "F$1", "ma", "a", "wa", "NAMESPACE_IDENTIFIER", "UNITS_IN_GRID", "DEFAULT_CSS_PREFIX", "DEFAULT_REPLACEMENT_CLASS", "DATA_FA_I2SVG", "DATA_FA_PSEUDO_ELEMENT", "DATA_FA_PSEUDO_ELEMENT_PENDING", "DATA_PREFIX", "DATA_ICON", "HTML_CLASS_I2SVG_BASE_CLASS", "MUTATION_APPROACH_ASYNC", "TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS", "PRODUCTION", "familyProxy", "obj", "target", "prop", "_PREFIX_TO_STYLE", "_objectSpread2", "PREFIX_TO_STYLE", "_STYLE_TO_PREFIX", "STYLE_TO_PREFIX", "_PREFIX_TO_LONG_STYLE", "PREFIX_TO_LONG_STYLE", "_LONG_STYLE_TO_PREFIX", "LONG_STYLE_TO_PREFIX", "ICON_SELECTION_SYNTAX_PATTERN", "LAYERS_TEXT_CLASSNAME", "FONT_FAMILY_PATTERN", "_FONT_WEIGHT_TO_PREFIX", "FONT_WEIGHT_TO_PREFIX", "ATTRIBUTES_WATCHED_FOR_MUTATION", "DUOTONE_CLASSES", "RESERVED_CLASSES", "initial", "getAttrConfig", "attr", "element", "coerce", "val", "_ref", "key", "_default", "_config", "config", "_onChangeCb", "cb", "onChange", "d$2", "meaninglessTransform", "insertCss", "css", "style", "headChildren", "beforeChild", "i", "child", "tagName", "idPool", "nextUniqueId", "size", "id", "toArray", "array", "classArray", "node", "htmlEscape", "str", "joinAttributes", "attributes", "acc", "attributeName", "joinStyles", "styles", "styleName", "transformIsMeaningful", "transform", "transformForSvg", "containerWidth", "iconWidth", "outer", "innerTranslate", "innerScale", "innerRotate", "inner", "path", "transformForCss", "_ref2", "width", "height", "startCentered", "baseStyles", "dcp", "drc", "fp", "rc", "dPatt", "customPropPatt", "rPatt", "_cssInserted", "ensureCss", "InjectCSS", "w", "namespace", "functions", "listener", "loaded", "fn", "domready", "toHtml", "abstractNodes", "tag", "children", "iconFromMapping", "mapping", "prefix", "iconName", "bindInternal4", "func", "thisContext", "b", "c", "d", "reduce", "subject", "initialValue", "keys", "length", "iterator", "result", "ucs2decode", "string", "output", "counter", "value", "extra", "toHex", "unicode", "decoded", "codePointAt", "index", "first", "second", "normalizeIcons", "icons", "icon", "defineIcons", "params", "skipHooks", "normalized", "styles", "shims", "namespace", "FAMILY_NAMES", "PREFIX_TO_LONG_STYLE", "PREFIXES_FOR_FAMILY", "acc", "familyId", "_defaultUsablePrefix", "_byUnicode", "_byLigature", "_byOldName", "_byOldUnicode", "_byAlias", "isReserved", "name", "RESERVED_CLASSES", "getIconName", "cssPrefix", "cls", "parts", "prefix", "iconName", "build", "lookup", "reducer", "reduce", "o$$1", "style", "icon", "a$$1", "alias", "aliases", "hasRegular", "config", "shimLookups", "shim", "maybeNameMaybeUnicode", "getCanonicalPrefix", "onChange", "c$$1", "byUnicode", "unicode", "byLigature", "ligature", "byAlias", "byOldName", "byOldUnicode", "oldUnicode", "newUnicode", "getDefaultUsablePrefix", "emptyCanonicalIcon", "getFamilyId", "values", "family", "s", "famProps", "L", "v$$1", "styleOrPrefix", "params", "PREFIX_TO_STYLE", "t", "STYLE_TO_PREFIX", "defined", "moveNonFaClassesToRest", "classNames", "rest", "result", "sortedUniqueValues", "arr", "value", "index", "getCanonicalIcon", "skipLookups", "givenPrefix", "faCombinedClasses", "Ia", "bt$1", "faStyleOrFamilyClasses", "nonStyleOrFamilyClasses", "faStyles", "P", "styleFromValues", "canonical", "_objectSpread2", "getDefaultCanonicalPrefix", "applyShimAndAlias", "aliasIconName", "newCanonicalFamilies", "newCanonicalStyles", "ga", "key", "prefixOptions", "config$$1", "isDuotoneFamily", "valuesHasDuotone", "defaultFamilyIsDuotone", "canonicalPrefixIsDuotone", "defaultPrefix", "pt", "Library", "_len", "definitions", "_key", "additions", "defineIcons", "longPrefix", "definition", "normalized", "_plugins", "_hooks", "providers", "defaultProviderKeys", "registerPlugins", "nextPlugins", "_ref", "obj", "k", "plugin", "mixout", "tk", "sk", "hooks", "hook", "chainHooks", "accumulator", "args", "hookFn", "callHooks", "_len2", "_key2", "callProvided", "findIconDefinition", "iconLookup", "iconFromMapping", "library", "noAuto", "dom", "IS_DOM", "autoReplaceSvgRoot", "domready", "autoReplace", "parse", "ICON_SELECTION_SYNTAX_PATTERN", "canonicalIcon", "api", "toHtml", "DOCUMENT", "domVariants", "val", "abstractCreator", "a", "container", "asIcon", "children", "main", "mask", "attributes", "transform", "transformIsMeaningful", "width", "height", "offset", "joinStyles", "asSymbol", "symbol", "id", "makeInlineSvgAbstract", "title", "maskId", "titleId", "extra", "watchable", "isUploadedIcon", "Lt", "attrClass", "content", "uploadedIconWidthStyle", "DATA_FA_I2SVG", "nextUniqueId", "makeLayersTextAbstract", "transformForCss", "styleString", "makeLayersCounterAbstract", "styles$1", "asFoundIcon", "vectorData", "element", "DUOTONE_CLASSES", "missingIconResolutionMixin", "maybeNotifyMissing", "PRODUCTION", "findIcon", "resolve", "reject", "noop$1", "p$2", "PERFORMANCE", "preamble", "begin", "end", "perf", "noop$2", "isWatched", "node", "hasPrefixAndIcon", "DATA_PREFIX", "DATA_ICON", "hasBeenReplaced", "getMutator", "mutators", "createElementNS", "tag", "createElement", "convertSVG", "abstractObj", "ceFn", "child", "nodeAsComment", "comment", "mutation", "abstract", "classArray", "forSvg", "splitClasses", "newInnerHTML", "performOperationSync", "op", "perform", "mutations", "callback", "callbackFunction", "frame", "MUTATION_APPROACH_ASYNC", "WINDOW", "mutator", "mark", "disabled", "disableObservation", "enableObservation", "mo", "observe", "options", "MUTATION_OBSERVER", "treeCallback", "nodeCallback", "pseudoElementsCallback", "observeMutationsRoot", "objects", "toArray", "mutationRecord", "ATTRIBUTES_WATCHED_FOR_MUTATION", "disconnect", "styleParser", "prop", "classParser", "existingPrefix", "existingIconName", "innerText", "toHex", "attributesParser", "extraAttributes", "attr", "blankMeta", "meaninglessTransform", "parseMeta", "parser", "extraClasses", "pluginMeta", "extraStyles", "styles$2", "generateMutation", "nodeMeta", "LAYERS_TEXT_CLASSNAME", "getKnownPrefixes", "Ft", "onTree", "root", "htmlClassList", "hclAdd", "suffix", "HTML_CLASS_I2SVG_BASE_CLASS", "hclRemove", "prefixes", "prefixesDomQuery", "p$$1", "candidates", "e$$1", "resolvedMutations", "onNode", "resolveIcons", "next", "maybeIconDefinition", "iconDefinition", "render", "classes", "ReplaceElements", "providers$$1", "_ref2", "nextChild", "Layers", "assembler", "LayersCounter", "LayersText", "IS_IE", "computedFontSize", "boundingClientRect", "CLEAN_CONTENT_PATTERN", "SECONDARY_UNICODE_RANGE", "_FONT_FAMILY_WEIGHT_TO_PREFIX", "lt", "wa", "Yt", "FONT_FAMILY_WEIGHT_TO_PREFIX", "FONT_FAMILY_WEIGHT_FALLBACK", "fontFamily", "weights", "hexValueFromContent", "cleaned", "codePoint", "codePointAt", "isPrependTen", "isDoubled", "getPrefix", "fontWeight", "fontFamilySanitized", "fontWeightInteger", "fontWeightSanitized", "replaceForPosition", "position", "pendingAttribute", "DATA_FA_PSEUDO_ELEMENT_PENDING", "alreadyProcessedPseudoElement", "DATA_FA_PSEUDO_ELEMENT", "fontFamilyMatch", "FONT_FAMILY_PATTERN", "hexValue", "isSecondary", "isV4", "iconIdentifier", "iconName4", "meta", "replace", "processable", "TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS", "searchPseudoElements", "operations", "PseudoElements", "_unwatched", "MutationObserver$1", "parseTransformString", "transformString", "first", "PowerTransforms", "containerWidth", "iconWidth", "outer", "innerTranslate", "innerScale", "innerRotate", "inner", "path", "ALL_SPACE", "fillBlack", "force", "deGroup", "Masks", "maskData", "i", "explicitMaskId", "mainWidth", "mainPath", "maskWidth", "maskPath", "trans", "transformForSvg", "maskRect", "maskInnerGroupChildrenMixin", "maskInnerGroup", "maskOuterGroup", "clipId", "maskTag", "defs", "MissingIconIndicator", "reduceMotion", "gChildren", "FILL", "ANIMATION_BASE", "OPACITY_ANIMATE", "dot", "SvgSymbols", "symbolData", "plugins", "InjectCSS", "noAuto$1", "config$1", "library$1", "dom$1", "parse$1", "findIconDefinition$1", "toHtml$1", "layer", "text", "counter", "fa0", "fa1", "fa2", "fa3", "fa4", "fa5", "fa6", "fa7", "fa8", "fa9", "faFillDrip", "faArrowsToCircle", "faCircleChevronRight", "faChevronCircleRight", "faAt", "faTrashCan", "faTrashAlt", "faTextHeight", "faUserXmark", "faUserTimes", "faStethoscope", "faMessage", "faCommentAlt", "faInfo", "faDownLeftAndUpRightToCenter", "faCompressAlt", "faExplosion", "faFileLines", "faFileAlt", "faFileText", "faWaveSquare", "faRing", "faBuildingUn", "faDiceThree", "faCalendarDays", "faCalendarAlt", "faAnchorCircleCheck", "faBuildingCircleArrowRight", "faVolleyball", "faVolleyballBall", "faArrowsUpToLine", "faSortDown", "faSortDesc", "faCircleMinus", "faMinusCircle", "faDoorOpen", "faRightFromBracket", "faSignOutAlt", "faAtom", "faSoap", "faIcons", "faHeartMusicCameraBolt", "faMicrophoneLinesSlash", "faMicrophoneAltSlash", "faBridgeCircleCheck", "faPumpMedical", "faFingerprint", "faHandPointRight", "faMagnifyingGlassLocation", "faSearchLocation", "faForwardStep", "faStepForward", "faFaceSmileBeam", "faSmileBeam", "faFlagCheckered", "faFootball", "faFootballBall", "faSchoolCircleExclamation", "faCrop", "faAnglesDown", "faAngleDoubleDown", "faUsersRectangle", "faPeopleRoof", "faPeopleLine", "faBeerMugEmpty", "faBeer", "faDiagramPredecessor", "faArrowUpLong", "faLongArrowUp", "faFireFlameSimple", "faBurn", "faPerson", "faMale", "faLaptop", "faFileCsv", "faMenorah", "faTruckPlane", "faRecordVinyl", "faFaceGrinStars", "faGrinStars", "faBong", "faSpaghettiMonsterFlying", "faPastafarianism", "faArrowDownUpAcrossLine", "faSpoon", "faUtensilSpoon", "faJarWheat", "faEnvelopesBulk", "faMailBulk", "faFileCircleExclamation", "faCircleH", "faHospitalSymbol", "faPager", "faAddressBook", "faContactBook", "faStrikethrough", "faK", "faLandmarkFlag", "faPencil", "faPencilAlt", "faBackward", "faCaretRight", "faComments", "faPaste", "faFileClipboard", "faCodePullRequest", "faClipboardList", "faTruckRampBox", "faTruckLoading", "faUserCheck", "faVialVirus", "faSheetPlastic", "faBlog", "faUserNinja", "faPersonArrowUpFromLine", "faScrollTorah", "faTorah", "faBroomBall", "faQuidditch", "faQuidditchBroomBall", "faToggleOff", "faBoxArchive", "faArchive", "faPersonDrowning", "faArrowDown91", "faSortNumericDesc", "faSortNumericDownAlt", "faFaceGrinTongueSquint", "faGrinTongueSquint", "faSprayCan", "faTruckMonster", "faW", "faEarthAfrica", "faGlobeAfrica", "faRainbow", "faCircleNotch", "faTabletScreenButton", "faTabletAlt", "faPaw", "faCloud", "faTrowelBricks", "faFaceFlushed", "faFlushed", "faHospitalUser", "faTentArrowLeftRight", "faGavel", "faLegal", "faBinoculars", "faMicrophoneSlash", "faBoxTissue", "faMotorcycle", "faBellConcierge", "faConciergeBell", "faPenRuler", "faPencilRuler", "faPeopleArrows", "faPeopleArrowsLeftRight", "faMarsAndVenusBurst", "faSquareCaretRight", "faCaretSquareRight", "faScissors", "faCut", "faSunPlantWilt", "faToiletsPortable", "faHockeyPuck", "faTable", "faMagnifyingGlassArrowRight", "faTachographDigital", "faDigitalTachograph", "faUsersSlash", "faClover", "faReply", "faMailReply", "faStarAndCrescent", "faHouseFire", "faSquareMinus", "faMinusSquare", "faHelicopter", "faCompass", "faSquareCaretDown", "faCaretSquareDown", "faFileCircleQuestion", "faLaptopCode", "faSwatchbook", "faPrescriptionBottle", "faBars", "faNavicon", "faPeopleGroup", "faHourglassEnd", "faHourglass3", "faHeartCrack", "faHeartBroken", "faSquareUpRight", "faExternalLinkSquareAlt", "faFaceKissBeam", "faKissBeam", "faFilm", "faRulerHorizontal", "faPeopleRobbery", "faLightbulb", "faCaretLeft", "faCircleExclamation", "faExclamationCircle", "faSchoolCircleXmark", "faArrowRightFromBracket", "faSignOut", "faCircleChevronDown", "faChevronCircleDown", "faUnlockKeyhole", "faUnlockAlt", "faCloudShowersHeavy", "faHeadphonesSimple", "faHeadphonesAlt", "faSitemap", "faCircleDollarToSlot", "faDonate", "faMemory", "faRoadSpikes", "faFireBurner", "faFlag", "faHanukiah", "faFeather", "faVolumeLow", "faVolumeDown", "faCommentSlash", "faCloudSunRain", "faCompress", "faWheatAwn", "faWheatAlt", "faAnkh", "faHandsHoldingChild", "faAsterisk", "faSquareCheck", "faCheckSquare", "faPesetaSign", "faHeading", "faHeader", "faGhost", "faList", "faListSquares", "faSquarePhoneFlip", "faPhoneSquareAlt", "faCartPlus", "faGamepad", "faCircleDot", "faDotCircle", "faFaceDizzy", "faDizzy", "faEgg", "faHouseMedicalCircleXmark", "faCampground", "faFolderPlus", "faFutbol", "faFutbolBall", "faSoccerBall", "faPaintbrush", "faPaintBrush", "faLock", "faGasPump", "faHotTubPerson", "faHotTub", "faMapLocation", "faMapMarked", "faHouseFloodWater", "faTree", "faBridgeLock", "faSackDollar", "faPenToSquare", "faEdit", "faCarSide", "faShareNodes", "faShareAlt", "faHeartCircleMinus", "faHourglassHalf", "faHourglass2", "faMicroscope", "faSink", "faBagShopping", "faShoppingBag", "faArrowDownZA", "faSortAlphaDesc", "faSortAlphaDownAlt", "faMitten", "faPersonRays", "faUsers", "faEyeSlash", "faFlaskVial", "faHand", "faHandPaper", "faOm", "faWorm", "faHouseCircleXmark", "faPlug", "faChevronUp", "faHandSpock", "faStopwatch", "faFaceKiss", "faKiss", "faBridgeCircleXmark", "faFaceGrinTongue", "faGrinTongue", "faChessBishop", "faFaceGrinWink", "faGrinWink", "faEarDeaf", "faDeaf", "faDeafness", "faHardOfHearing", "faRoadCircleCheck", "faDiceFive", "faSquareRss", "faRssSquare", "faLandMineOn", "faICursor", "faStamp", "faStairs", "faI", "faHryvniaSign", "faHryvnia", "faPills", "faFaceGrinWide", "faGrinAlt", "faTooth", "faV", "faBangladeshiTakaSign", "faBicycle", "faStaffSnake", "faRodAsclepius", "faRodSnake", "faStaffAesculapius", "faHeadSideCoughSlash", "faTruckMedical", "faAmbulance", "faWheatAwnCircleExclamation", "faSnowman", "faMortarPestle", "faRoadBarrier", "faSchool", "faIgloo", "faJoint", "faAngleRight", "faHorse", "faQ", "faG", "faNotesMedical", "faTemperatureHalf", "faTemperature2", "faThermometer2", "faThermometerHalf", "faDongSign", "faCapsules", "faPooStorm", "faPooBolt", "faFaceFrownOpen", "faFrownOpen", "faHandPointUp", "faMoneyBill", "faBookmark", "faAlignJustify", "faUmbrellaBeach", "faHelmetUn", "faBullseye", "faBacon", "faHandPointDown", "faArrowUpFromBracket", "faFolder", "faFolderBlank", "faFileWaveform", "faFileMedicalAlt", "faRadiation", "faChartSimple", "faMarsStroke", "faVial", "faGauge", "faDashboard", "faGaugeMed", "faTachometerAltAverage", "faWandMagicSparkles", "faMagicWandSparkles", "faE", "faPenClip", "faPenAlt", "faBridgeCircleExclamation", "faUser", "faSchoolCircleCheck", "faDumpster", "faVanShuttle", "faShuttleVan", "faBuildingUser", "faSquareCaretLeft", "faCaretSquareLeft", "faHighlighter", "faKey", "faBullhorn", "faGlobe", "faSynagogue", "faPersonHalfDress", "faRoadBridge", "faLocationArrow", "faC", "faTabletButton", "faBuildingLock", "faPizzaSlice", "faMoneyBillWave", "faChartArea", "faAreaChart", "faHouseFlag", "faPersonCircleMinus", "faBan", "faCancel", "faCameraRotate", "faSprayCanSparkles", "faAirFreshener", "faStar", "faRepeat", "faCross", "faBox", "faVenusMars", "faArrowPointer", "faMousePointer", "faMaximize", "faExpandArrowsAlt", "faChargingStation", "faShapes", "faTriangleCircleSquare", "faShuffle", "faRandom", "faPersonRunning", "faRunning", "faMobileRetro", "faGripLinesVertical", "faSpider", "faHandsBound", "faFileInvoiceDollar", "faPlaneCircleExclamation", "faXRay", "faSpellCheck", "faSlash", "faComputerMouse", "faMouse", "faArrowRightToBracket", "faSignIn", "faShopSlash", "faStoreAltSlash", "faServer", "faVirusCovidSlash", "faShopLock", "faHourglassStart", "faHourglass1", "faBlenderPhone", "faBuildingWheat", "faPersonBreastfeeding", "faRightToBracket", "faSignInAlt", "faVenus", "faPassport", "faThumbtackSlash", "faThumbTackSlash", "faHeartPulse", "faHeartbeat", "faPeopleCarryBox", "faPeopleCarry", "faTemperatureHigh", "faMicrochip", "faCrown", "faWeightHanging", "faXmarksLines", "faFilePrescription", "faWeightScale", "faWeight", "faUserGroup", "faUserFriends", "faArrowUpAZ", "faSortAlphaUp", "faChessKnight", "faFaceLaughSquint", "faLaughSquint", "faWheelchair", "faCircleArrowUp", "faArrowCircleUp", "faToggleOn", "faPersonWalking", "faWalking", "faL", "faFire", "faBedPulse", "faProcedures", "faShuttleSpace", "faSpaceShuttle", "faFaceLaugh", "faLaugh", "faFolderOpen", "faHeartCirclePlus", "faCodeFork", "faCity", "faMicrophoneLines", "faMicrophoneAlt", "faPepperHot", "faUnlock", "faColonSign", "faHeadset", "faStoreSlash", "faRoadCircleXmark", "faUserMinus", "faMarsStrokeUp", "faMarsStrokeV", "faChampagneGlasses", "faGlassCheers", "faClipboard", "faHouseCircleExclamation", "faFileArrowUp", "faFileUpload", "faWifi", "faWifi3", "faWifiStrong", "faBath", "faBathtub", "faUnderline", "faUserPen", "faUserEdit", "faSignature", "faStroopwafel", "faBold", "faAnchorLock", "faBuildingNgo", "faManatSign", "faNotEqual", "faBorderTopLeft", "faBorderStyle", "faMapLocationDot", "faMapMarkedAlt", "faJedi", "faSquarePollVertical", "faPoll", "faMugHot", "faCarBattery", "faBatteryCar", "faGift", "faDiceTwo", "faChessQueen", "faGlasses", "faChessBoard", "faBuildingCircleCheck", "faPersonChalkboard", "faMarsStrokeRight", "faMarsStrokeH", "faHandBackFist", "faHandRock", "faSquareCaretUp", "faCaretSquareUp", "faCloudShowersWater", "faChartBar", "faBarChart", "faHandsBubbles", "faHandsWash", "faLessThanEqual", "faTrain", "faEyeLowVision", "faLowVision", "faCrow", "faSailboat", "faWindowRestore", "faSquarePlus", "faPlusSquare", "faToriiGate", "faFrog", "faBucket", "faImage", "faMicrophone", "faCow", "faCaretUp", "faScrewdriver", "faFolderClosed", "faHouseTsunami", "faSquareNfi", "faArrowUpFromGroundWater", "faMartiniGlass", "faGlassMartiniAlt", "faSquareBinary", "faRotateLeft", "faRotateBack", "faRotateBackward", "faUndoAlt", "faTableColumns", "faColumns", "faLemon", "faHeadSideMask", "faHandshake", "faGem", "faDolly", "faDollyBox", "faSmoking", "faMinimize", "faCompressArrowsAlt", "faMonument", "faSnowplow", "faAnglesRight", "faAngleDoubleRight", "faCannabis", "faCirclePlay", "faPlayCircle", "faTablets", "faEthernet", "faEuroSign", "faEur", "faEuro", "faChair", "faCircleCheck", "faCheckCircle", "faCircleStop", "faStopCircle", "faCompassDrafting", "faDraftingCompass", "faPlateWheat", "faIcicles", "faPersonShelter", "faNeuter", "faIdBadge", "faMarker", "faFaceLaughBeam", "faLaughBeam", "faHelicopterSymbol", "faUniversalAccess", "faCircleChevronUp", "faChevronCircleUp", "faLariSign", "faVolcano", "faPersonWalkingDashedLineArrowRight", "faSterlingSign", "faGbp", "faPoundSign", "faViruses", "faSquarePersonConfined", "faUserTie", "faArrowDownLong", "faLongArrowDown", "faTentArrowDownToLine", "faCertificate", "faReplyAll", "faMailReplyAll", "faSuitcase", "faPersonSkating", "faSkating", "faFilterCircleDollar", "faFunnelDollar", "faCameraRetro", "faCircleArrowDown", "faArrowCircleDown", "faFileImport", "faArrowRightToFile", "faSquareArrowUpRight", "faExternalLinkSquare", "faBoxOpen", "faScroll", "faSpa", "faLocationPinLock", "faPause", "faHillAvalanche", "faTemperatureEmpty", "faTemperature0", "faThermometer0", "faThermometerEmpty", "faBomb", "faRegistered", "faAddressCard", "faContactCard", "faVcard", "faScaleUnbalancedFlip", "faBalanceScaleRight", "faSubscript", "faDiamondTurnRight", "faDirections", "faBurst", "faHouseLaptop", "faLaptopHouse", "faFaceTired", "faTired", "faMoneyBills", "faSmog", "faCrutch", "faFontAwesome", "faFontAwesomeFlag", "faFontAwesomeLogoFull", "faCloudArrowUp", "faCloudUpload", "faCloudUploadAlt", "faPalette", "faArrowsTurnRight", "faVest", "faFerry", "faArrowsDownToPeople", "faSeedling", "faSprout", "faLeftRight", "faArrowsAltH", "faBoxesPacking", "faCircleArrowLeft", "faArrowCircleLeft", "faGroupArrowsRotate", "faBowlFood", "faCandyCane", "faArrowDownWideShort", "faSortAmountAsc", "faSortAmountDown", "faCloudBolt", "faThunderstorm", "faTextSlash", "faRemoveFormat", "faFaceSmileWink", "faSmileWink", "faFileWord", "faFilePowerpoint", "faArrowsLeftRight", "faArrowsH", "faHouseLock", "faCloudArrowDown", "faCloudDownload", "faCloudDownloadAlt", "faChildren", "faChalkboard", "faBlackboard", "faUserLargeSlash", "faUserAltSlash", "faEnvelopeOpen", "faHandshakeSimpleSlash", "faHandshakeAltSlash", "faMattressPillow", "faGuaraniSign", "faArrowsRotate", "faRefresh", "faSync", "faFireExtinguisher", "faCruzeiroSign", "faGreaterThanEqual", "faShieldHalved", "faShieldAlt", "faBookAtlas", "faAtlas", "faVirus", "faEnvelopeCircleCheck", "faLayerGroup", "faArrowsToDot", "faArchway", "faHeartCircleCheck", "faHouseChimneyCrack", "faHouseDamage", "faFileZipper", "faFileArchive", "faSquare", "faMartiniGlassEmpty", "faGlassMartini", "faCouch", "faCediSign", "faItalic", "faTableCellsColumnLock", "faChurch", "faCommentsDollar", "faDemocrat", "faZ", "faPersonSkiing", "faSkiing", "faRoadLock", "faA", "faTemperatureArrowDown", "faTemperatureDown", "faFeatherPointed", "faFeatherAlt", "faP", "faSnowflake", "faNewspaper", "faRectangleAd", "faAd", "faCircleArrowRight", "faArrowCircleRight", "faFilterCircleXmark", "faLocust", "faSort", "faUnsorted", "faListOl", "faList12", "faListNumeric", "faPersonDressBurst", "faMoneyCheckDollar", "faMoneyCheckAlt", "faVectorSquare", "faBreadSlice", "faLanguage", "faFaceKissWinkHeart", "faKissWinkHeart", "faFilter", "faQuestion", "faFileSignature", "faUpDownLeftRight", "faArrowsAlt", "faHouseChimneyUser", "faHandHoldingHeart", "faPuzzlePiece", "faMoneyCheck", "faStarHalfStroke", "faStarHalfAlt", "faCode", "faWhiskeyGlass", "faGlassWhiskey", "faBuildingCircleExclamation", "faMagnifyingGlassChart", "faArrowUpRightFromSquare", "faExternalLink", "faCubesStacked", "faWonSign", "faKrw", "faWon", "faVirusCovid", "faAustralSign", "faF", "faLeaf", "faRoad", "faTaxi", "faCab", "faPersonCirclePlus", "faChartPie", "faPieChart", "faBoltLightning", "faSackXmark", "faFileExcel", "faFileContract", "faFishFins", "faBuildingFlag", "faFaceGrinBeam", "faGrinBeam", "faObjectUngroup", "faPoop", "faLocationPin", "faMapMarker", "faKaaba", "faToiletPaper", "faHelmetSafety", "faHardHat", "faHatHard", "faEject", "faCircleRight", "faArrowAltCircleRight", "faPlaneCircleCheck", "faFaceRollingEyes", "faMehRollingEyes", "faObjectGroup", "faChartLine", "faLineChart", "faMaskVentilator", "faArrowRight", "faSignsPost", "faMapSigns", "faCashRegister", "faPersonCircleQuestion", "faH", "faTarp", "faScrewdriverWrench", "faTools", "faArrowsToEye", "faPlugCircleBolt", "faHeart", "faMarsAndVenus", "faHouseUser", "faHomeUser", "faDumpsterFire", "faHouseCrack", "faMartiniGlassCitrus", "faCocktail", "faFaceSurprise", "faSurprise", "faBottleWater", "faCirclePause", "faPauseCircle", "faToiletPaperSlash", "faAppleWhole", "faAppleAlt", "faKitchenSet", "faR", "faTemperatureQuarter", "faTemperature1", "faThermometer1", "faThermometerQuarter", "faCube", "faBitcoinSign", "faShieldDog", "faSolarPanel", "faLockOpen", "faElevator", "faMoneyBillTransfer", "faMoneyBillTrendUp", "faHouseFloodWaterCircleArrowRight", "faSquarePollHorizontal", "faPollH", "faCircle", "faBackwardFast", "faFastBackward", "faRecycle", "faUserAstronaut", "faPlaneSlash", "faTrademark", "faBasketball", "faBasketballBall", "faSatelliteDish", "faCircleUp", "faArrowAltCircleUp", "faMobileScreenButton", "faMobileAlt", "faVolumeHigh", "faVolumeUp", "faUsersRays", "faWallet", "faClipboardCheck", "faFileAudio", "faBurger", "faHamburger", "faWrench", "faBugs", "faRupeeSign", "faRupee", "faFileImage", "faCircleQuestion", "faQuestionCircle", "faPlaneDeparture", "faHandshakeSlash", "faBookBookmark", "faCodeBranch", "faHatCowboy", "faBridge", "faPhoneFlip", "faPhoneAlt", "faTruckFront", "faCat", "faAnchorCircleExclamation", "faTruckField", "faRoute", "faClipboardQuestion", "faPanorama", "faCommentMedical", "faTeethOpen", "faFileCircleMinus", "faTags", "faWineGlass", "faForwardFast", "faFastForward", "faFaceMehBlank", "faMehBlank", "faSquareParking", "faParking", "faHouseSignal", "faBarsProgress", "faTasksAlt", "faFaucetDrip", "faCartFlatbed", "faDollyFlatbed", "faBanSmoking", "faSmokingBan", "faTerminal", "faMobileButton", "faHouseMedicalFlag", "faBasketShopping", "faShoppingBasket", "faTape", "faBusSimple", "faBusAlt", "faEye", "faFaceSadCry", "faSadCry", "faAudioDescription", "faPersonMilitaryToPerson", "faFileShield", "faUserSlash", "faPen", "faTowerObservation", "faFileCode", "faSignal", "faSignal5", "faSignalPerfect", "faBus", "faHeartCircleXmark", "faHouseChimney", "faHomeLg", "faWindowMaximize", "faFaceFrown", "faFrown", "faPrescription", "faShop", "faStoreAlt", "faFloppyDisk", "faSave", "faVihara", "faScaleUnbalanced", "faBalanceScaleLeft", "faSortUp", "faSortAsc", "faCommentDots", "faCommenting", "faPlantWilt", "faDiamond", "faFaceGrinSquint", "faGrinSquint", "faHandHoldingDollar", "faHandHoldingUsd", "faChartDiagram", "faBacterium", "faHandPointer", "faDrumSteelpan", "faHandScissors", "faHandsPraying", "faPrayingHands", "faArrowRotateRight", "faArrowRightRotate", "faArrowRotateForward", "faRedo", "faWebAwesome", "faBiohazard", "faLocationCrosshairs", "faLocation", "faMarsDouble", "faChildDress", "faUsersBetweenLines", "faLungsVirus", "faFaceGrinTears", "faGrinTears", "faPhone", "faCalendarXmark", "faCalendarTimes", "faChildReaching", "faHeadSideVirus", "faUserGear", "faUserCog", "faArrowUp19", "faSortNumericUp", "faDoorClosed", "faShieldVirus", "faDiceSix", "faMosquitoNet", "faFileFragment", "faBridgeWater", "faPersonBooth", "faTextWidth", "faHatWizard", "faPenFancy", "faPersonDigging", "faDigging", "faTrash", "faGaugeSimple", "faGaugeSimpleMed", "faTachometerAverage", "faBookMedical", "faPoo", "faQuoteRight", "faQuoteRightAlt", "faShirt", "faTShirt", "faTshirt", "faCubes", "faDivide", "faTengeSign", "faTenge", "faHeadphones", "faHandsHolding", "faHandsClapping", "faRepublican", "faArrowLeft", "faPersonCircleXmark", "faRuler", "faAlignLeft", "faDiceD6", "faRestroom", "faJ", "faUsersViewfinder", "faFileVideo", "faUpRightFromSquare", "faExternalLinkAlt", "faTableCells", "faTh", "faFilePdf", "faBookBible", "faBible", "faO", "faSuitcaseMedical", "faMedkit", "faUserSecret", "faOtter", "faPersonDress", "faFemale", "faCommentDollar", "faBusinessTime", "faBriefcaseClock", "faTableCellsLarge", "faThLarge", "faBookTanakh", "faTanakh", "faPhoneVolume", "faVolumeControlPhone", "faHatCowboySide", "faClipboardUser", "faChild", "faLiraSign", "faSatellite", "faPlaneLock", "faTag", "faComment", "faCakeCandles", "faBirthdayCake", "faCake", "faEnvelope", "faAnglesUp", "faAngleDoubleUp", "faPaperclip", "faArrowRightToCity", "faRibbon", "faLungs", "faArrowUp91", "faSortNumericUpAlt", "faLitecoinSign", "faBorderNone", "faCircleNodes", "faParachuteBox", "faIndent", "faTruckFieldUn", "faHourglass", "faHourglassEmpty", "faMountain", "faUserDoctor", "faUserMd", "faCircleInfo", "faInfoCircle", "faCloudMeatball", "faCamera", "faCameraAlt", "faSquareVirus", "faMeteor", "faCarOn", "faSleigh", "faArrowDown19", "faSortNumericAsc", "faSortNumericDown", "faHandHoldingDroplet", "faHandHoldingWater", "faWater", "faCalendarCheck", "faBraille", "faPrescriptionBottleMedical", "faPrescriptionBottleAlt", "faLandmark", "faTruck", "faCrosshairs", "faPersonCane", "faTent", "faVestPatches", "faCheckDouble", "faArrowDownAZ", "faSortAlphaAsc", "faSortAlphaDown", "faMoneyBillWheat", "faCookie", "faArrowRotateLeft", "faArrowLeftRotate", "faArrowRotateBack", "faArrowRotateBackward", "faUndo", "faHardDrive", "faHdd", "faFaceGrinSquintTears", "faGrinSquintTears", "faDumbbell", "faRectangleList", "faListAlt", "faTarpDroplet", "faHouseMedicalCircleCheck", "faPersonSkiingNordic", "faSkiingNordic", "faCalendarPlus", "faPlaneArrival", "faCircleLeft", "faArrowAltCircleLeft", "faTrainSubway", "faSubway", "faChartGantt", "faIndianRupeeSign", "faIndianRupee", "faInr", "faCropSimple", "faCropAlt", "faMoneyBill1", "faMoneyBillAlt", "faLeftLong", "faLongArrowAltLeft", "faDna", "faVirusSlash", "faMinus", "faSubtract", "faChess", "faArrowLeftLong", "faLongArrowLeft", "faPlugCircleCheck", "faStreetView", "faFrancSign", "faVolumeOff", "faHandsAslInterpreting", "faAmericanSignLanguageInterpreting", "faAslInterpreting", "faHandsAmericanSignLanguageInterpreting", "faGear", "faCog", "faDropletSlash", "faTintSlash", "faMosque", "faMosquito", "faStarOfDavid", "faPersonMilitaryRifle", "faCartShopping", "faShoppingCart", "faVials", "faPlugCirclePlus", "faPlaceOfWorship", "faGripVertical", "faHexagonNodes", "faArrowTurnUp", "faLevelUp", "faU", "faSquareRootVariable", "faSquareRootAlt", "faClock", "faClockFour", "faBackwardStep", "faStepBackward", "faPallet", "faFaucet", "faBaseballBatBall", "faS", "faTimeline", "faKeyboard", "faCaretDown", "faHouseChimneyMedical", "faClinicMedical", "faTemperatureThreeQuarters", "faTemperature3", "faThermometer3", "faThermometerThreeQuarters", "faMobileScreen", "faMobileAndroidAlt", "faPlaneUp", "faPiggyBank", "faBatteryHalf", "faBattery3", "faMountainCity", "faCoins", "faKhanda", "faSliders", "faSlidersH", "faFolderTree", "faNetworkWired", "faMapPin", "faHamsa", "faCentSign", "faFlask", "faPersonPregnant", "faWandSparkles", "faEllipsisVertical", "faEllipsisV", "faTicket", "faPowerOff", "faRightLong", "faLongArrowAltRight", "faFlagUsa", "faLaptopFile", "faTty", "faTeletype", "faDiagramNext", "faPersonRifle", "faHouseMedicalCircleExclamation", "faClosedCaptioning", "faPersonHiking", "faHiking", "faVenusDouble", "faImages", "faCalculator", "faPeoplePulling", "faN", "faCableCar", "faTram", "faCloudRain", "faBuildingCircleXmark", "faShip", "faArrowsDownToLine", "faDownload", "faFaceGrin", "faGrin", "faDeleteLeft", "faBackspace", "faEyeDropper", "faEyeDropperEmpty", "faEyedropper", "faFileCircleCheck", "faForward", "faMobile", "faMobileAndroid", "faMobilePhone", "faFaceMeh", "faMeh", "faAlignCenter", "faBookSkull", "faBookDead", "faIdCard", "faDriversLicense", "faOutdent", "faDedent", "faHeartCircleExclamation", "faHouse", "faHome", "faHomeAlt", "faHomeLgAlt", "faCalendarWeek", "faLaptopMedical", "faB", "faFileMedical", "faDiceOne", "faKiwiBird", "faArrowRightArrowLeft", "faExchange", "faRotateRight", "faRedoAlt", "faRotateForward", "faUtensils", "faCutlery", "faArrowUpWideShort", "faSortAmountUp", "faMillSign", "faBowlRice", "faSkull", "faTowerBroadcast", "faBroadcastTower", "faTruckPickup", "faUpLong", "faLongArrowAltUp", "faStop", "faCodeMerge", "faUpload", "faHurricane", "faMound", "faToiletPortable", "faCompactDisc", "faFileArrowDown", "faFileDownload", "faCaravan", "faShieldCat", "faBolt", "faZap", "faGlassWater", "faOilWell", "faVault", "faMars", "faToilet", "faPlaneCircleXmark", "faYenSign", "faCny", "faJpy", "faRmb", "faYen", "faRubleSign", "faRouble", "faRub", "faRuble", "faSun", "faGuitar", "faFaceLaughWink", "faLaughWink", "faHorseHead", "faBoreHole", "faIndustry", "faCircleDown", "faArrowAltCircleDown", "faArrowsTurnToDots", "faFlorinSign", "faArrowDownShortWide", "faSortAmountDesc", "faSortAmountDownAlt", "faLessThan", "faAngleDown", "faCarTunnel", "faHeadSideCough", "faGripLines", "faThumbsDown", "faUserLock", "faArrowRightLong", "faLongArrowRight", "faAnchorCircleXmark", "faEllipsis", "faEllipsisH", "faChessPawn", "faKitMedical", "faFirstAid", "faPersonThroughWindow", "faToolbox", "faHandsHoldingCircle", "faBug", "faCreditCard", "faCreditCardAlt", "faCar", "faAutomobile", "faHandHoldingHand", "faBookOpenReader", "faBookReader", "faMountainSun", "faArrowsLeftRightToLine", "faDiceD20", "faTruckDroplet", "faFileCircleXmark", "faTemperatureArrowUp", "faTemperatureUp", "faMedal", "faBed", "faSquareH", "faHSquare", "faPodcast", "faTemperatureFull", "faTemperature4", "faThermometer4", "faThermometerFull", "faBell", "faSuperscript", "faPlugCircleXmark", "faStarOfLife", "faPhoneSlash", "faPaintRoller", "faHandshakeAngle", "faHandsHelping", "faLocationDot", "faMapMarkerAlt", "faFile", "faGreaterThan", "faPersonSwimming", "faSwimmer", "faArrowDown", "faDroplet", "faTint", "faEraser", "faEarthAmericas", "faEarth", "faEarthAmerica", "faGlobeAmericas", "faPersonBurst", "faDove", "faBatteryEmpty", "faBattery0", "faSocks", "faInbox", "faSection", "faGaugeHigh", "faTachometerAlt", "faTachometerAltFast", "faEnvelopeOpenText", "faHospital", "faHospitalAlt", "faHospitalWide", "faWineBottle", "faChessRook", "faBarsStaggered", "faReorder", "faStream", "faDharmachakra", "faHotdog", "faPersonWalkingWithCane", "faBlind", "faDrum", "faIceCream", "faHeartCircleBolt", "faFax", "faParagraph", "faCheckToSlot", "faVoteYea", "faStarHalf", "faBoxesStacked", "faBoxes", "faBoxesAlt", "faLink", "faChain", "faEarListen", "faAssistiveListeningSystems", "faTreeCity", "faPlay", "faFont", "faTableCellsRowLock", "faRupiahSign", "faMagnifyingGlass", "faSearch", "faTableTennisPaddleBall", "faPingPongPaddleBall", "faTableTennis", "faPersonDotsFromLine", "faDiagnoses", "faTrashCanArrowUp", "faTrashRestoreAlt", "faNairaSign", "faCartArrowDown", "faWalkieTalkie", "faFilePen", "faFileEdit", "faReceipt", "faSquarePen", "faPenSquare", "faPencilSquare", "faSuitcaseRolling", "faPersonCircleExclamation", "faChevronDown", "faBatteryFull", "faBattery", "faBattery5", "faSkullCrossbones", "faCodeCompare", "faListUl", "faListDots", "faSchoolLock", "faTowerCell", "faDownLong", "faLongArrowAltDown", "faRankingStar", "faChessKing", "faPersonHarassing", "faBrazilianRealSign", "faLandmarkDome", "faLandmarkAlt", "faArrowUp", "faTv", "faTelevision", "faTvAlt", "faShrimp", "faListCheck", "faTasks", "faJugDetergent", "faCircleUser", "faUserCircle", "faUserShield", "faWind", "faCarBurst", "faCarCrash", "faY", "faPersonSnowboarding", "faSnowboarding", "faTruckFast", "faShippingFast", "faFish", "faUserGraduate", "faCircleHalfStroke", "faAdjust", "faClapperboard", "faCircleRadiation", "faRadiationAlt", "faBaseball", "faBaseballBall", "faJetFighterUp", "faDiagramProject", "faProjectDiagram", "faCopy", "faVolumeXmark", "faVolumeMute", "faVolumeTimes", "faHandSparkles", "faGrip", "faGripHorizontal", "faShareFromSquare", "faShareSquare", "faChildCombatant", "faChildRifle", "faGun", "faSquarePhone", "faPhoneSquare", "faPlus", "faAdd", "faExpand", "faComputer", "faXmark", "faClose", "faMultiply", "faRemove", "faTimes", "faArrowsUpDownLeftRight", "faArrows", "faChalkboardUser", "faChalkboardTeacher", "faPesoSign", "faBuildingShield", "faBaby", "faUsersLine", "faQuoteLeft", "faQuoteLeftAlt", "faTractor", "faTrashArrowUp", "faTrashRestore", "faArrowDownUpLock", "faLinesLeaning", "faRulerCombined", "faCopyright", "faEquals", "faBlender", "faTeeth", "faShekelSign", "faIls", "faShekel", "faSheqel", "faSheqelSign", "faMap", "faRocket", "faPhotoFilm", "faPhotoVideo", "faFolderMinus", "faHexagonNodesBolt", "faStore", "faArrowTrendUp", "faPlugCircleMinus", "faSignHanging", "faSign", "faBezierCurve", "faBellSlash", "faTablet", "faTabletAndroid", "faSchoolFlag", "faFill", "faAngleUp", "faDrumstickBite", "faHollyBerry", "faChevronLeft", "faBacteria", "faHandLizard", "faNotdef", "faDisease", "faBriefcaseMedical", "faGenderless", "faChevronRight", "faRetweet", "faCarRear", "faCarAlt", "faPumpSoap", "faVideoSlash", "faBatteryQuarter", "faBattery2", "faRadio", "faBabyCarriage", "faCarriageBaby", "faTrafficLight", "faThermometer", "faVrCardboard", "faHandMiddleFinger", "faPercent", "faPercentage", "faTruckMoving", "faGlassWaterDroplet", "faDisplay", "faFaceSmile", "faSmile", "faThumbtack", "faThumbTack", "faTrophy", "faPersonPraying", "faPray", "faHammer", "faHandPeace", "faRotate", "faSyncAlt", "faSpinner", "faRobot", "faPeace", "faGears", "faCogs", "faWarehouse", "faArrowUpRightDots", "faSplotch", "faFaceGrinHearts", "faGrinHearts", "faDiceFour", "faSimCard", "faTransgender", "faTransgenderAlt", "faMercury", "faArrowTurnDown", "faLevelDown", "faPersonFallingBurst", "faAward", "faTicketSimple", "faTicketAlt", "faBuilding", "faAnglesLeft", "faAngleDoubleLeft", "faQrcode", "faClockRotateLeft", "faHistory", "faFaceGrinBeamSweat", "faGrinBeamSweat", "faFileExport", "faArrowRightFromFile", "faShield", "faShieldBlank", "faArrowUpShortWide", "faSortAmountUpAlt", "faCommentNodes", "faHouseMedical", "faGolfBallTee", "faGolfBall", "faCircleChevronLeft", "faChevronCircleLeft", "faHouseChimneyWindow", "faPenNib", "faTentArrowTurnLeft", "faTents", "faWandMagic", "faMagic", "faDog", "faCarrot", "faMoon", "faWineGlassEmpty", "faWineGlassAlt", "faCheese", "faYinYang", "faMusic", "faCodeCommit", "faTemperatureLow", "faPersonBiking", "faBiking", "faBroom", "faShieldHeart", "faGopuram", "faEarthOceania", "faGlobeOceania", "faSquareXmark", "faTimesSquare", "faXmarkSquare", "faHashtag", "faUpRightAndDownLeftFromCenter", "faExpandAlt", "faOilCan", "faT", "faHippo", "faChartColumn", "faInfinity", "faVialCircleCheck", "faPersonArrowDownToLine", "faVoicemail", "faFan", "faPersonWalkingLuggage", "faUpDown", "faArrowsAltV", "faCloudMoonRain", "faCalendar", "faTrailer", "faBahai", "faHaykal", "faSdCard", "faDragon", "faShoePrints", "faCirclePlus", "faPlusCircle", "faFaceGrinTongueWink", "faGrinTongueWink", "faHandHolding", "faPlugCircleExclamation", "faLinkSlash", "faChainBroken", "faChainSlash", "faUnlink", "faClone", "faPersonWalkingArrowLoopLeft", "faArrowUpZA", "faSortAlphaUpAlt", "faFireFlameCurved", "faFireAlt", "faTornado", "faFileCirclePlus", "faBookQuran", "faQuran", "faAnchor", "faBorderAll", "faFaceAngry", "faAngry", "faCookieBite", "faArrowTrendDown", "faRss", "faFeed", "faDrawPolygon", "faScaleBalanced", "faBalanceScale", "faGaugeSimpleHigh", "faTachometer", "faTachometerFast", "faShower", "faDesktop", "faDesktopAlt", "faM", "faTableList", "faThList", "faCommentSms", "faSms", "faBook", "faUserPlus", "faCheck", "faBatteryThreeQuarters", "faBattery4", "faHouseCircleCheck", "faAngleLeft", "faDiagramSuccessor", "faTruckArrowRight", "faArrowsSplitUpAndLeft", "faHandFist", "faFistRaised", "faCloudMoon", "faBriefcase", "faPersonFalling", "faImagePortrait", "faPortrait", "faUserTag", "faRug", "faEarthEurope", "faGlobeEurope", "faCartFlatbedSuitcase", "faLuggageCart", "faRectangleXmark", "faRectangleTimes", "faTimesRectangle", "faWindowClose", "faBahtSign", "faBookOpen", "faBookJournalWhills", "faJournalWhills", "faHandcuffs", "faTriangleExclamation", "faExclamationTriangle", "faWarning", "faDatabase", "faShare", "faMailForward", "faBottleDroplet", "faMaskFace", "faHillRockslide", "faRightLeft", "faExchangeAlt", "faPaperPlane", "faRoadCircleExclamation", "faDungeon", "faAlignRight", "faMoneyBill1Wave", "faMoneyBillWaveAlt", "faLifeRing", "faHands", "faSignLanguage", "faSigning", "faCalendarDay", "faWaterLadder", "faLadderWater", "faSwimmingPool", "faArrowsUpDown", "faArrowsV", "faFaceGrimace", "faGrimace", "faWheelchairMove", "faWheelchairAlt", "faTurnDown", "faLevelDownAlt", "faPersonWalkingArrowRight", "faSquareEnvelope", "faEnvelopeSquare", "faDice", "faBowlingBall", "faBrain", "faBandage", "faBandAid", "faCalendarMinus", "faCircleXmark", "faTimesCircle", "faXmarkCircle", "faGifts", "faHotel", "faEarthAsia", "faGlobeAsia", "faIdCardClip", "faIdCardAlt", "faMagnifyingGlassPlus", "faSearchPlus", "faThumbsUp", "faUserClock", "faHandDots", "faAllergies", "faFileInvoice", "faWindowMinimize", "faMugSaucer", "faCoffee", "faBrush", "faFileHalfDashed", "faMask", "faMagnifyingGlassMinus", "faSearchMinus", "faRulerVertical", "faUserLarge", "faUserAlt", "faTrainTram", "faUserNurse", "faSyringe", "faCloudSun", "faStopwatch20", "faSquareFull", "faMagnet", "faJar", "faNoteSticky", "faStickyNote", "faBugSlash", "faArrowUpFromWaterPump", "faBone", "faTableCellsRowUnlock", "faUserInjured", "faFaceSadTear", "faSadTear", "faPlane", "faTentArrowsDown", "faExclamation", "faArrowsSpin", "faPrint", "faTurkishLiraSign", "faTry", "faTurkishLira", "faDollarSign", "faDollar", "faUsd", "faX", "faMagnifyingGlassDollar", "faSearchDollar", "faUsersGear", "faUsersCog", "faPersonMilitaryPointing", "faBuildingColumns", "faBank", "faInstitution", "faMuseum", "faUniversity", "faUmbrella", "faTrowel", "faD", "faStapler", "faMasksTheater", "faTheaterMasks", "faKipSign", "faHandPointLeft", "faHandshakeSimple", "faHandshakeAlt", "faJetFighter", "faFighterJet", "faSquareShareNodes", "faShareAltSquare", "faBarcode", "faPlusMinus", "faVideo", "faVideoCamera", "faGraduationCap", "faMortarBoard", "faHandHoldingMedical", "faPersonCircleCheck", "faTurnUp", "faLevelUpAlt", "icons", "faTrashCan", "faTrashAlt", "faMessage", "faCommentAlt", "faFileLines", "faFileAlt", "faFileText", "faCalendarDays", "faCalendarAlt", "faHandPointRight", "faFaceSmileBeam", "faSmileBeam", "faFaceGrinStars", "faGrinStars", "faAddressBook", "faContactBook", "faComments", "faPaste", "faFileClipboard", "faFaceGrinTongueSquint", "faGrinTongueSquint", "faFaceFlushed", "faFlushed", "faSquareCaretRight", "faCaretSquareRight", "faSquareMinus", "faMinusSquare", "faCompass", "faSquareCaretDown", "faCaretSquareDown", "faFaceKissBeam", "faKissBeam", "faLightbulb", "faFlag", "faSquareCheck", "faCheckSquare", "faCircleDot", "faDotCircle", "faFaceDizzy", "faDizzy", "faFutbol", "faFutbolBall", "faSoccerBall", "faPenToSquare", "faEdit", "faHourglassHalf", "faHourglass2", "faEyeSlash", "faHand", "faHandPaper", "faHandSpock", "faFaceKiss", "faKiss", "faFaceGrinTongue", "faGrinTongue", "faChessBishop", "faFaceGrinWink", "faGrinWink", "faFaceGrinWide", "faGrinAlt", "faFaceFrownOpen", "faFrownOpen", "faHandPointUp", "faBookmark", "faHandPointDown", "faFolder", "faFolderBlank", "faUser", "faSquareCaretLeft", "faCaretSquareLeft", "faStar", "faChessKnight", "faFaceLaughSquint", "faLaughSquint", "faFaceLaugh", "faLaugh", "faFolderOpen", "faClipboard", "faChessQueen", "faHandBackFist", "faHandRock", "faSquareCaretUp", "faCaretSquareUp", "faChartBar", "faBarChart", "faWindowRestore", "faSquarePlus", "faPlusSquare", "faImage", "faFolderClosed", "faLemon", "faHandshake", "faGem", "faCirclePlay", "faPlayCircle", "faCircleCheck", "faCheckCircle", "faCircleStop", "faStopCircle", "faIdBadge", "faFaceLaughBeam", "faLaughBeam", "faRegistered", "faAddressCard", "faContactCard", "faVcard", "faFaceTired", "faTired", "faFontAwesome", "faFontAwesomeFlag", "faFontAwesomeLogoFull", "faFaceSmileWink", "faSmileWink", "faFileWord", "faFilePowerpoint", "faEnvelopeOpen", "faFileZipper", "faFileArchive", "faSquare", "faSnowflake", "faNewspaper", "faFaceKissWinkHeart", "faKissWinkHeart", "faStarHalfStroke", "faStarHalfAlt", "faFileExcel", "faFaceGrinBeam", "faGrinBeam", "faObjectUngroup", "faCircleRight", "faArrowAltCircleRight", "faFaceRollingEyes", "faMehRollingEyes", "faObjectGroup", "faHeart", "faFaceSurprise", "faSurprise", "faCirclePause", "faPauseCircle", "faCircle", "faCircleUp", "faArrowAltCircleUp", "faFileAudio", "faFileImage", "faCircleQuestion", "faQuestionCircle", "faFaceMehBlank", "faMehBlank", "faEye", "faFaceSadCry", "faSadCry", "faFileCode", "faWindowMaximize", "faFaceFrown", "faFrown", "faFloppyDisk", "faSave", "faCommentDots", "faCommenting", "faFaceGrinSquint", "faGrinSquint", "faHandPointer", "faHandScissors", "faFaceGrinTears", "faGrinTears", "faCalendarXmark", "faCalendarTimes", "faFileVideo", "faFilePdf", "faComment", "faEnvelope", "faHourglass", "faHourglassEmpty", "faCalendarCheck", "faHardDrive", "faHdd", "faFaceGrinSquintTears", "faGrinSquintTears", "faRectangleList", "faListAlt", "faCalendarPlus", "faCircleLeft", "faArrowAltCircleLeft", "faMoneyBill1", "faMoneyBillAlt", "faClock", "faClockFour", "faKeyboard", "faClosedCaptioning", "faImages", "faFaceGrin", "faGrin", "faFaceMeh", "faMeh", "faIdCard", "faDriversLicense", "faSun", "faFaceLaughWink", "faLaughWink", "faCircleDown", "faArrowAltCircleDown", "faThumbsDown", "faChessPawn", "faCreditCard", "faCreditCardAlt", "faBell", "faFile", "faHospital", "faHospitalAlt", "faHospitalWide", "faChessRook", "faStarHalf", "faChessKing", "faCircleUser", "faUserCircle", "faCopy", "faShareFromSquare", "faShareSquare", "faCopyright", "faMap", "faBellSlash", "faHandLizard", "faFaceSmile", "faSmile", "faHandPeace", "faFaceGrinHearts", "faGrinHearts", "faBuilding", "faFaceGrinBeamSweat", "faGrinBeamSweat", "faMoon", "faCalendar", "faFaceGrinTongueWink", "faGrinTongueWink", "faClone", "faFaceAngry", "faAngry", "faRectangleXmark", "faRectangleTimes", "faTimesRectangle", "faWindowClose", "faPaperPlane", "faLifeRing", "faFaceGrimace", "faGrimace", "faCalendarMinus", "faCircleXmark", "faTimesCircle", "faXmarkCircle", "faThumbsUp", "faWindowMinimize", "faSquareFull", "faNoteSticky", "faStickyNote", "faFaceSadTear", "faSadTear", "faHandPointLeft", "icons", "faMonero", "faHooli", "faYelp", "faCcVisa", "faLastfm", "faShopware", "faCreativeCommonsNc", "faAws", "faRedhat", "faYoast", "faCloudflare", "faUps", "faPixiv", "faWpexplorer", "faDyalog", "faBity", "faStackpath", "faBuysellads", "faFirstOrder", "faModx", "faGuilded", "faVnv", "faSquareJs", "faJsSquare", "faMicrosoft", "faQq", "faOrcid", "faJava", "faInvision", "faCreativeCommonsPdAlt", "faCentercode", "faGlideG", "faDrupal", "faJxl", "faDartLang", "faHireAHelper", "faCreativeCommonsBy", "faUnity", "faWhmcs", "faRocketchat", "faVk", "faUntappd", "faMailchimp", "faCss3Alt", "faSquareReddit", "faRedditSquare", "faVimeoV", "faContao", "faSquareFontAwesome", "faDeskpro", "faBrave", "faSistrix", "faSquareInstagram", "faInstagramSquare", "faBattleNet", "faTheRedYeti", "faSquareHackerNews", "faHackerNewsSquare", "faEdge", "faThreads", "faNapster", "faSquareSnapchat", "faSnapchatSquare", "faGooglePlusG", "faArtstation", "faMarkdown", "faSourcetree", "faGooglePlus", "faDiaspora", "faFoursquare", "faStackOverflow", "faGithubAlt", "faPhoenixSquadron", "faPagelines", "faAlgolia", "faRedRiver", "faCreativeCommonsSa", "faSafari", "faGoogle", "faSquareFontAwesomeStroke", "faFontAwesomeAlt", "faAtlassian", "faLinkedinIn", "faDigitalOcean", "faNimblr", "faChromecast", "faEvernote", "faHackerNews", "faCreativeCommonsSampling", "faAdversal", "faCreativeCommons", "faWatchmanMonitoring", "faFonticons", "faWeixin", "faShirtsinbulk", "faCodepen", "faGitAlt", "faLyft", "faRev", "faWindows", "faWizardsOfTheCoast", "faSquareViadeo", "faViadeoSquare", "faMeetup", "faCentos", "faAdn", "faCloudsmith", "faOpensuse", "faPiedPiperAlt", "faSquareDribbble", "faDribbbleSquare", "faCodiepie", "faNode", "faMix", "faSteam", "faCcApplePay", "faScribd", "faDebian", "faOpenid", "faInstalod", "faFilesPinwheel", "faExpeditedssl", "faSellcast", "faSquareTwitter", "faTwitterSquare", "faRProject", "faDelicious", "faFreebsd", "faVuejs", "faAccusoft", "faIoxhost", "faFonticonsFi", "faAppStore", "faCcMastercard", "faItunesNote", "faGolang", "faKickstarter", "faSquareKickstarter", "faGrav", "faWeibo", "faUncharted", "faFirstdraft", "faSquareYoutube", "faYoutubeSquare", "faWikipediaW", "faWpressr", "faRendact", "faAngellist", "faGalacticRepublic", "faNfcDirectional", "faSkype", "faJoget", "faFedora", "faStripeS", "faMeta", "faLaravel", "faHotjar", "faBluetoothB", "faSquareLetterboxd", "faStickerMule", "faCreativeCommonsZero", "faHips", "faCss", "faBehance", "faReddit", "faDiscord", "faChrome", "faAppStoreIos", "faCcDiscover", "faWpbeginner", "faConfluence", "faShoelace", "faMdb", "faDochub", "faAccessibleIcon", "faEbay", "faAmazon", "faUnsplash", "faYarn", "faSquareSteam", "faSteamSquare", "fa500px", "faSquareVimeo", "faVimeoSquare", "faAsymmetrik", "faFontAwesome", "faFontAwesomeFlag", "faFontAwesomeLogoFull", "faGratipay", "faApple", "faHive", "faGitkraken", "faKeybase", "faApplePay", "faPadlet", "faAmazonPay", "faSquareGithub", "faGithubSquare", "faStumbleupon", "faFedex", "faPhoenixFramework", "faShopify", "faNeos", "faSquareThreads", "faHackerrank", "faResearchgate", "faSwift", "faAngular", "faSpeakap", "faAngrycreative", "faYCombinator", "faEmpire", "faEnvira", "faGoogleScholar", "faSquareGitlab", "faGitlabSquare", "faStudiovinari", "faPiedPiper", "faWordpress", "faProductHunt", "faFirefox", "faLinode", "faGoodreads", "faSquareOdnoklassniki", "faOdnoklassnikiSquare", "faJsfiddle", "faSith", "faThemeisle", "faPage4", "faHashnode", "faReact", "faCcPaypal", "faSquarespace", "faCcStripe", "faCreativeCommonsShare", "faBitcoin", "faKeycdn", "faOpera", "faItchIo", "faUmbraco", "faGalacticSenate", "faUbuntu", "faDraft2digital", "faStripe", "faHouzz", "faGg", "faDhl", "faSquarePinterest", "faPinterestSquare", "faXing", "faBlackberry", "faCreativeCommonsPd", "faPlaystation", "faQuinscape", "faLess", "faBloggerB", "faOpencart", "faVine", "faSignalMessenger", "faPaypal", "faGitlab", "faTypo3", "faRedditAlien", "faYahoo", "faDailymotion", "faAffiliatetheme", "faPiedPiperPp", "faBootstrap", "faOdnoklassniki", "faNfcSymbol", "faMintbit", "faEthereum", "faSpeakerDeck", "faCreativeCommonsNcEu", "faPatreon", "faAvianex", "faEllo", "faGofore", "faBimobject", "faBraveReverse", "faFacebookF", "faSquareGooglePlus", "faGooglePlusSquare", "faWebAwesome", "faMandalorian", "faFirstOrderAlt", "faOsi", "faGoogleWallet", "faDAndDBeyond", "faPeriscope", "faFulcrum", "faCloudscale", "faForumbee", "faMizuni", "faSchlix", "faSquareXing", "faXingSquare", "faBandcamp", "faWpforms", "faCloudversify", "faUsps", "faMegaport", "faMagento", "faSpotify", "faOptinMonster", "faFly", "faSquareBluesky", "faAviato", "faItunes", "faCuttlefish", "faBlogger", "faFlickr", "faViber", "faSoundcloud", "faDigg", "faTencentWeibo", "faLetterboxd", "faSymfony", "faMaxcdn", "faEtsy", "faFacebookMessenger", "faAudible", "faThinkPeaks", "faBilibili", "faErlang", "faXTwitter", "faCottonBureau", "faDashcube", "fa42Group", "faInnosoft", "faStackExchange", "faElementor", "faSquarePiedPiper", "faPiedPiperSquare", "faCreativeCommonsNd", "faPalfed", "faSuperpowers", "faResolving", "faXbox", "faSquareWebAwesomeStroke", "faSearchengin", "faTiktok", "faSquareFacebook", "faFacebookSquare", "faRenren", "faLinux", "faGlide", "faLinkedin", "faHubspot", "faDeploydog", "faTwitch", "faFlutter", "faRavelry", "faMixer", "faSquareLastfm", "faLastfmSquare", "faVimeo", "faMendeley", "faUniregistry", "faFigma", "faCreativeCommonsRemix", "faCcAmazonPay", "faDropbox", "faInstagram", "faCmplid", "faUpwork", "faFacebook", "faGripfire", "faJediOrder", "faUikit", "faFortAwesomeAlt", "faPhabricator", "faUssunnah", "faEarlybirds", "faTradeFederation", "faAutoprefixer", "faWhatsapp", "faSquareUpwork", "faSlideshare", "faGooglePlay", "faViadeo", "faLine", "faGoogleDrive", "faServicestack", "faSimplybuilt", "faBitbucket", "faImdb", "faDeezer", "faRaspberryPi", "faJira", "faDocker", "faScreenpal", "faBluetooth", "faGitter", "faDAndD", "faMicroblog", "faCcDinersClub", "faGgCircle", "faPiedPiperHat", "faKickstarterK", "faYandex", "faReadme", "faHtml5", "faSellsy", "faSquareWebAwesome", "faSass", "faWirsindhandwerk", "faWsh", "faBuromobelexperte", "faSalesforce", "faOctopusDeploy", "faMedapps", "faNs8", "faPinterestP", "faApper", "faFortAwesome", "faWaze", "faBluesky", "faCcJcb", "faSnapchat", "faSnapchatGhost", "faFantasyFlightGames", "faRust", "faWix", "faSquareBehance", "faBehanceSquare", "faSupple", "faWebflow", "faRebel", "faCss3", "faStaylinked", "faKaggle", "faSpaceAwesome", "faDeviantart", "faCpanel", "faGoodreadsG", "faSquareGit", "faGitSquare", "faSquareTumblr", "faTumblrSquare", "faTrello", "faCreativeCommonsNcJp", "faGetPocket", "faPerbyte", "faGrunt", "faWeebly", "faConnectdevelop", "faLeanpub", "faBlackTie", "faThemeco", "faPython", "faAndroid", "faBots", "faFreeCodeCamp", "faHornbill", "faJs", "faIdeal", "faGit", "faDev", "faSketch", "faYandexInternational", "faCcAmex", "faUber", "faGithub", "faPhp", "faAlipay", "faYoutube", "faSkyatlas", "faFirefoxBrowser", "faReplyd", "faSuse", "faJenkins", "faTwitter", "faRockrms", "faPinterest", "faBuffer", "faNpm", "faYammer", "faBtc", "faDribbble", "faStumbleuponCircle", "faInternetExplorer", "faStubber", "faTelegram", "faTelegramPlane", "faOldRepublic", "faOdysee", "faSquareWhatsapp", "faWhatsappSquare", "faNodeJs", "faEdgeLegacy", "faSlack", "faSlackHash", "faMedrt", "faUsb", "faTumblr", "faVaadin", "faQuora", "faSquareXTwitter", "faReacteurope", "faMedium", "faMediumM", "faAmilia", "faMixcloud", "faFlipboard", "faViacoin", "faCriticalRole", "faSitrox", "faDiscourse", "faJoomla", "faMastodon", "faAirbnb", "faWolfPackBattalion", "faBuyNLarge", "faGulp", "faCreativeCommonsSamplingPlus", "faStrava", "faEmber", "faCanadianMapleLeaf", "faTeamspeak", "faPushed", "faWordpressSimple", "faNutritionix", "faWodu", "faGooglePay", "faIntercom", "faZhihu", "faKorvue", "faPix", "faSteamSymbol", "icons", "_event", "library$1", "icons", "dom$1", "iframeId", "iframe", "SETTLE_RECHECK_DELAYS_MS", "ms", "minimum", "getTopOffset", "toolbar", "getBottomOffset", "getScrollParent", "element", "node", "overflowY", "resolveElement", "scrollByInstantly", "scroller", "delta", "root", "target", "previous", "scrollElementIntoViewRespectingToolbar", "rect", "topOffset", "bottomOffset", "viewportHeight", "getFocusResetContainer", "ensureFocusResetElement", "container", "resetElement", "delay", "ERROR_ATTRIBUTE", "event", "field", "updateMarkedFields", "event", "form", "button", "el", "template", "message", "announcer", "Rails", "turbo_es2017_esm_exports", "_event"]
}
